diff --git a/JAVASCRIPT.md b/JAVASCRIPT.md
index 484a367..3f1c6b3 100644
--- a/JAVASCRIPT.md
+++ b/JAVASCRIPT.md
@@ -1,5 +1,5 @@
-Flag for Drupal 8
-=================
+Openlayers for Drupal
+=====================
 
 Contents:
 
diff --git a/js/openlayers-field.js b/js/openlayers-field.js
index 5c5fed7..0a94162 100644
--- a/js/openlayers-field.js
+++ b/js/openlayers-field.js
@@ -1 +1 @@
-(()=>{var t={2582:function(t){t.exports=function(){"use strict";function t(t,i,r,o,s){!function t(n,i,r,o,s){for(;o>r;){if(o-r>600){var a=o-r+1,l=i-r+1,h=Math.log(a),u=.5*Math.exp(2*h/3),c=.5*Math.sqrt(h*u*(a-u)/a)*(l-a/2<0?-1:1);t(n,i,Math.max(r,Math.floor(i-l*u/a+c)),Math.min(o,Math.floor(i+(a-l)*u/a+c)),s)}var p=n[i],f=r,d=o;for(e(n,r,i),s(n[o],p)>0&&e(n,r,o);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[r],p)?e(n,r,d):e(n,++d,o),d<=i&&(r=d+1),i<=d&&(o=d-1)}}(t,i,r||0,o||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 r(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 o(t,e){s(t,0,t.children.length,e,t)}function s(t,e,n,i,r){r||(r=d(null)),r.minX=1/0,r.minY=1/0,r.maxX=-1/0,r.maxY=-1/0;for(var o=e;o<n;o++){var s=t.children[o];a(r,t.leaf?i(s):s)}return r}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,r,o){for(var s=[n,i];s.length;)if(!((i=s.pop())-(n=s.pop())<=r)){var a=n+Math.ceil((i-n)/r/2)*r;t(e,a,n,i,o),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,r=[];e;){for(var o=0;o<e.children.length;o++){var s=e.children[o],a=e.leaf?i(s):s;f(t,a)&&(e.leaf?n.push(s):p(t,a)?this._all(s,n):r.push(s))}e=r.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 r=e.children[i],o=e.leaf?this.toBBox(r):r;if(f(t,o)){if(e.leaf||p(t,o))return!0;n.push(r)}}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,o,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(),o=!0),s.leaf){var u=r(t,s.children,e);if(-1!==u)return s.children.splice(u,1),l.push(s),this._condense(l),this}o||s.leaf||!p(s,a)?i?(n++,s=i.children[n],o=!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 r,s=n-e+1,a=this._maxEntries;if(s<=a)return o(r=d(t.slice(e,n+1)),this.toBBox),r;i||(i=Math.ceil(Math.log(s)/Math.log(a)),a=Math.ceil(s/Math.pow(a,i-1))),(r=d([])).leaf=!1,r.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);r.children.push(this._build(t,p,f,i-1))}}return o(r,this.toBBox),r},i.prototype._chooseSubtree=function(t,e,n,i){for(;i.push(e),!e.leaf&&i.length-1!==n;){for(var r=1/0,o=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<o?(o=c,r=h<r?h:r,s=l):c===o&&h<r&&(r=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),r=[],o=this._chooseSubtree(i,this.data,e,r);for(o.children.push(t),a(o,i);e>=0&&r[e].children.length>this._maxEntries;)this._split(r,e),e--;this._adjustParentBBoxes(i,r,e)},i.prototype._split=function(t,e){var n=t[e],i=n.children.length,r=this._minEntries;this._chooseSplitAxis(n,r,i);var s=this._chooseSplitIndex(n,r,i),a=d(n.children.splice(s,n.children.length-s));a.height=n.height,a.leaf=n.leaf,o(n,this.toBBox),o(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,o(this.data,this.toBBox)},i.prototype._chooseSplitIndex=function(t,e,n){for(var i,r,o,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=(r=_,o=g,void 0,void 0,void 0,void 0,a=Math.max(r.minX,o.minX),l=Math.max(r.minY,o.minY),h=Math.min(r.maxX,o.maxX),c=Math.min(r.maxY,o.maxY),Math.max(0,h-a)*Math.max(0,c-l)),v=u(_)+u(g);y<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,r=t.leaf?this.compareMinY:h;this._allDistMargin(t,e,n,i)<this._allDistMargin(t,e,n,r)&&t.children.sort(i)},i.prototype._allDistMargin=function(t,e,n,i){t.children.sort(i);for(var r=this.toBBox,o=s(t,0,e,r),l=s(t,n-e,n,r),h=c(o)+c(l),u=e;u<n-e;u++){var p=t.children[u];a(o,t.leaf?r(p):p),h+=c(o)}for(var f=n-e-1;f>=e;f--){var d=t.children[f];a(l,t.leaf?r(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():o(t[e],this.toBBox)},i}()}},e={};function n(i){var r=e[i];if(void 0!==r)return r.exports;var o=e[i]={exports:{}};return t[i].call(o.exports,o,o.exports,n),o.exports}(()=>{"use strict";const t=function(){function t(){this.disposed=!1}return t.prototype.dispose=function(){this.disposed||(this.disposed=!0,this.disposeInternal())},t.prototype.disposeInternal=function(){},t}();function e(t,e){return t>e?1:t<e?-1:0}function i(t,e,n){var i=t.length;if(t[0]<=e)return 0;if(e<=t[i-1])return i-1;var r=void 0;if(n>0){for(r=1;r<i;++r)if(t[r]<e)return r-1}else if(n<0){for(r=1;r<i;++r)if(t[r]<=e)return r}else for(r=1;r<i;++r){if(t[r]==e)return r;if(t[r]<e)return"function"==typeof n?n(e,t[r-1],t[r])>0?r-1:r:t[r-1]-e<e-t[r]?r-1:r}return i-1}function r(t,e,n){for(;e<n;){var i=t[e];t[e]=t[n],t[n]=i,++e,--n}}function o(t,e){for(var n=Array.isArray(e)?e:[e],i=n.length,r=0;r<i;r++)t[t.length]=n[r]}function s(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 a(){return!0}function l(){return!1}function h(){}function u(){return function(){throw new Error("Unimplemented abstract method.")}()}var c=0;function p(t){return t.ol_uid||(t.ol_uid=String(++c))}var f,d="undefined"!=typeof navigator&&void 0!==navigator.userAgent?navigator.userAgent.toLowerCase():"",_=-1!==d.indexOf("firefox"),g=(-1!==d.indexOf("safari")&&-1==d.indexOf("chrom")&&(d.indexOf("version/15.4")>=0||d.match(/cpu (os|iphone os) 15_4 like mac os x/)),-1!==d.indexOf("webkit")&&-1==d.indexOf("edge")),y=-1!==d.indexOf("macintosh"),v="undefined"!=typeof devicePixelRatio?devicePixelRatio:1,m="undefined"!=typeof WorkerGlobalScope&&"undefined"!=typeof OffscreenCanvas&&self instanceof WorkerGlobalScope,x="undefined"!=typeof Image&&Image.prototype.decode,w=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}(),S=(f=function(t,e){return f=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])},f(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}f(t,e),t.prototype=null===e?Object.create(e):(n.prototype=e.prototype,new n)});const C=function(t){function e(e){var n=this,i="Assertion failed. See https://openlayers.org/en/v"+"6.14.1".split("-")[0]+"/doc/errors/#"+e+" for details.";return(n=t.call(this,i)||this).code=e,n.name="AssertionError",n.message=i,n}return S(e,t),e}(Error);function E(t,e){if(!t)throw new C(e)}var T;function b(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 R(t,e,n,i,r,o,s,a){var l=Math.sin(o),h=Math.cos(o);return t[0]=i*h,t[1]=r*l,t[2]=-i*l,t[3]=r*h,t[4]=s*i*h-a*i*l+e,t[5]=s*r*l+a*r*h+n,t}function O(t,e){var n,i=(n=e)[0]*n[3]-n[1]*n[2];E(0!==i,32);var r=e[0],o=e[1],s=e[2],a=e[3],l=e[4],h=e[5];return t[0]=a/i,t[1]=-o/i,t[2]=-s/i,t[3]=r/i,t[4]=(s*h-a*l)/i,t[5]=-(r*h-o*l)/i,t}function I(t){var e="matrix("+t.join(", ")+")";if(m)return e;var n=T||(T=document.createElement("div"));return n.style.transform=e,n.style.transform}new Array(6);const P="top-left";function M(t){for(var e=[1/0,1/0,-1/0,-1/0],n=0,i=t.length;n<i;++n)X(e,t[n]);return e}function L(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 F(t,e){return e?(e[0]=t[0],e[1]=t[1],e[2]=t[2],e[3]=t[3],e):t.slice()}function A(t,e,n){var i,r;return(i=e<t[0]?t[0]-e:t[2]<e?e-t[2]:0)*i+(r=n<t[1]?t[1]-n:t[3]<n?n-t[3]:0)*r}function D(t,e){return j(t,e[0],e[1])}function k(t,e){return t[0]<=e[0]&&e[2]<=t[2]&&t[1]<=e[1]&&e[3]<=t[3]}function j(t,e,n){return t[0]<=e&&e<=t[2]&&t[1]<=n&&n<=t[3]}function G(t,e){var n=t[0],i=t[1],r=t[2],o=t[3],s=e[0],a=e[1],l=0;return s<n?l|=16:s>r&&(l|=4),a<i?l|=8:a>o&&(l|=2),0===l&&(l=1),l}function z(t,e,n,i,r){return r?(r[0]=t,r[1]=e,r[2]=n,r[3]=i,r):[t,e,n,i]}function W(t){return z(1/0,1/0,-1/0,-1/0,t)}function N(t,e){return t[0]==e[0]&&t[2]==e[2]&&t[1]==e[1]&&t[3]==e[3]}function X(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 Y(t,e,n,i,r){for(;n<i;n+=r)K(t,e[n],e[n+1]);return t}function K(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 Z(t,e){var n;return(n=e(U(t)))||(n=e(V(t)))||(n=e(et(t)))?n:(n=e(tt(t)))||!1}function B(t){var e=0;return rt(t)||(e=nt(t)*Q(t)),e}function U(t){return[t[0],t[1]]}function V(t){return[t[2],t[1]]}function H(t){return[(t[0]+t[2])/2,(t[1]+t[3])/2]}function q(t,e){var n;return"bottom-left"===e?n=U(t):"bottom-right"===e?n=V(t):e===P?n=tt(t):"top-right"===e?n=et(t):E(!1,13),n}function J(t,e,n,i,r){var o=e*i[0]/2,s=e*i[1]/2,a=Math.cos(n),l=Math.sin(n),h=o*a,u=o*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,w=d+u+c,S=d+u-c;return z(Math.min(_,g,y,v),Math.min(m,x,w,S),Math.max(_,g,y,v),Math.max(m,x,w,S),r)}function Q(t){return t[3]-t[1]}function $(t,e,n){var i=n||[1/0,1/0,-1/0,-1/0];return it(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]):W(i),i}function tt(t){return[t[0],t[3]]}function et(t){return[t[2],t[3]]}function nt(t){return t[2]-t[0]}function it(t,e){return t[0]<=e[2]&&t[2]>=e[0]&&t[1]<=e[3]&&t[3]>=e[1]}function rt(t){return t[2]<t[0]||t[3]<t[1]}function ot(t,e,n){return Math.min(Math.max(t,e),n)}var st="cosh"in Math?Math.cosh:function(t){var e=Math.exp(t);return(e+1/e)/2},at="log2"in Math?Math.log2:function(t){return Math.log(t)*Math.LOG2E};function lt(t,e,n,i,r,o){var s=r-n,a=o-i;if(0!==s||0!==a){var l=((t-n)*s+(e-i)*a)/(s*s+a*a);l>1?(n=r,i=o):l>0&&(n+=s*l,i+=a*l)}return ht(t,e,n,i)}function ht(t,e,n,i){var r=n-t,o=i-e;return r*r+o*o}function ut(t){return t*Math.PI/180}function ct(t,e){var n=t%e;return n*e<0?n+e:n}function pt(t,e,n){return t+n*(e-t)}function ft(t,e){var n=Math.pow(10,e);return Math.round(t*n)/n}function dt(t,e){return Math.floor(ft(t,e))}function _t(t,e){return Math.ceil(ft(t,e))}var gt=/^#([a-f0-9]{3}|[a-f0-9]{4}(?:[a-f0-9]{2}){0,2})$/i,yt=/^([a-z]*)$|^hsla?\(.*\)$/i;function vt(t){return"string"==typeof t?t:St(t)}var mt=function(){var t={},e=0;return function(n){var i;if(t.hasOwnProperty(n))i=t[n];else{if(e>=1024){var r=0;for(var o in t)0==(3&r++)&&(delete t[o],--e)}i=function(t){var e,n,i,r,o;if(yt.exec(t)&&(t=function(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""}(t)),gt.exec(t)){var s,a=t.length-1;s=a<=4?1:2;var l=4===a||8===a;e=parseInt(t.substr(1+0*s,s),16),n=parseInt(t.substr(1+1*s,s),16),i=parseInt(t.substr(1+2*s,s),16),r=l?parseInt(t.substr(1+3*s,s),16):255,1==s&&(e=(e<<4)+e,n=(n<<4)+n,i=(i<<4)+i,l&&(r=(r<<4)+r)),o=[e,n,i,r/255]}else 0==t.indexOf("rgba(")?wt(o=t.slice(5,-1).split(",").map(Number)):0==t.indexOf("rgb(")?((o=t.slice(4,-1).split(",").map(Number)).push(1),wt(o)):E(!1,14);return o}(n),t[n]=i,++e}return i}}();function xt(t){return Array.isArray(t)?t:mt(t)}function wt(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 St(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:Math.round(100*t[3])/100)+")"}function Ct(t,e,n){return e+":"+t+":"+(n?vt(n):"null")}var Et=new(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=Ct(t,e,n);return i in this.cache_?this.cache_[i]:null},t.prototype.set=function(t,e,n,i){var r=Ct(t,e,n);this.cache_[r]=i,++this.cacheSize_},t.prototype.setSize=function(t){this.maxCacheSize_=t,this.expire()},t}());const Tt=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}(),bt="propertychange";var Rt="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,r=arguments.length;i<r;++i){var o=arguments[i];if(null!=o)for(var s in o)o.hasOwnProperty(s)&&(n[s]=o[s])}return n};function Ot(t){for(var e in t)delete t[e]}var It="function"==typeof Object.values?Object.values:function(t){var e=[];for(var n in t)e.push(t[n]);return e};function Pt(t){var e;for(e in t)return!1;return!e}var Mt=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])},t(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)}}();const Lt=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 Mt(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,n=e?t:t.type,i=this.listeners_&&this.listeners_[n];if(i){var r=e?new Tt(t):t;r.target||(r.target=this.eventTarget_||this);var o,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,u=i.length;l<u;++l)if(!1===(o="handleEvent"in i[l]?i[l].handleEvent(r):i[l].call(this,r))||r.propagationStopped){o=!1;break}if(0==--s[n]){var c=a[n];for(delete a[n];c--;)this.removeEventListener(n,h);delete s[n]}return o}},e.prototype.disposeInternal=function(){this.listeners_&&Ot(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]=h,++this.pendingRemovals_[t]):(n.splice(i,1),0===n.length&&delete this.listeners_[t]))}},e}(t),Ft="change",At="contextmenu",Dt="click",kt="keydown",jt="keypress",Gt="touchmove",zt="wheel";function Wt(t,e,n,i,r){if(i&&i!==t&&(n=n.bind(i)),r){var o=n;n=function(){t.removeEventListener(e,n),o.apply(this,arguments)}}var s={target:t,type:e,listener:n};return t.addEventListener(e,n),s}function Nt(t,e,n,i){return Wt(t,e,n,i,!0)}function Xt(t){t&&t.target&&(t.target.removeEventListener(t.type,t.listener),Ot(t))}var Yt=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])},t(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=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 Yt(e,t),e.prototype.changed=function(){++this.revision_,this.dispatchEvent(Ft)},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),r=0;r<n;++r)i[r]=Wt(this,t[r],e);return i}return Wt(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 r=0;r<i;++r)n[r]=Nt(this,t[r],e)}else n=Nt(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)Xt(t[e]);else Xt(t)}(n);else if(Array.isArray(t))for(var i=0,r=t.length;i<r;++i)this.removeEventListener(t[i],e);else this.removeEventListener(t,e)},e}(Lt);Kt.prototype.on,Kt.prototype.once,Kt.prototype.un;const Zt=Kt;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])},t(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)}}(),Ut=function(t){function e(e,n,i){var r=t.call(this,e)||this;return r.key=n,r.oldValue=i,r}return Bt(e,t),e}(Tt);const Vt=function(t){function e(e){var n=t.call(this)||this;return n.on,n.once,n.un,p(n),n.values_=null,void 0!==e&&n.setProperties(e),n}return Bt(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_&&Rt({},this.values_)||{}},e.prototype.hasProperties=function(){return!!this.values_},e.prototype.notify=function(t,e){var n;n="change:".concat(t),this.hasListener(n)&&this.dispatchEvent(new Ut(n,t,e)),n=bt,this.hasListener(n)&&this.dispatchEvent(new Ut(n,t,e))},e.prototype.addChangeListener=function(t,e){this.addEventListener("change:".concat(t),e)},e.prototype.removeChangeListener=function(t,e){this.removeEventListener("change:".concat(t),e)},e.prototype.set=function(t,e,n){var i=this.values_||(this.values_={});if(n)i[t]=e;else{var r=i[t];i[t]=e,r!==e&&this.notify(t,r)}},e.prototype.setProperties=function(t,e){for(var n in t)this.set(n,t[n],e)},e.prototype.applyProperties=function(t){t.values_&&Rt(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],Pt(this.values_)&&(this.values_=null),e||this.notify(t,n)}},e}(Zt),Ht="opacity",qt="visible",Jt="extent",Qt="zIndex",$t="maxResolution",te="minResolution",ee="maxZoom",ne="minZoom",ie="source";var re=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])},t(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)}}();const oe=function(t){function e(e){var n=t.call(this)||this;n.on,n.once,n.un,n.background_=e.background;var i=Rt({},e);return"object"==typeof e.properties&&(delete i.properties,Rt(i,e.properties)),i.opacity=void 0!==e.opacity?e.opacity:1,E("number"==typeof i.opacity,64),i.visible=void 0===e.visible||e.visible,i.zIndex=e.zIndex,i.maxResolution=void 0!==e.maxResolution?e.maxResolution:1/0,i.minResolution=void 0!==e.minResolution?e.minResolution:0,i.minZoom=void 0!==e.minZoom?e.minZoom:-1/0,i.maxZoom=void 0!==e.maxZoom?e.maxZoom:1/0,n.className_=void 0!==i.className?i.className:"ol-layer",delete i.className,n.setProperties(i),n.state_=null,n}return re(e,t),e.prototype.getBackground=function(){return this.background_},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.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 u()},e.prototype.getLayerStatesArray=function(t){return u()},e.prototype.getExtent=function(){return this.get(Jt)},e.prototype.getMaxResolution=function(){return this.get($t)},e.prototype.getMinResolution=function(){return this.get(te)},e.prototype.getMinZoom=function(){return this.get(ne)},e.prototype.getMaxZoom=function(){return this.get(ee)},e.prototype.getOpacity=function(){return this.get(Ht)},e.prototype.getSourceState=function(){return u()},e.prototype.getVisible=function(){return this.get(qt)},e.prototype.getZIndex=function(){return this.get(Qt)},e.prototype.setBackground=function(t){this.background_=t,this.changed()},e.prototype.setExtent=function(t){this.set(Jt,t)},e.prototype.setMaxResolution=function(t){this.set($t,t)},e.prototype.setMinResolution=function(t){this.set(te,t)},e.prototype.setMaxZoom=function(t){this.set(ee,t)},e.prototype.setMinZoom=function(t){this.set(ne,t)},e.prototype.setOpacity=function(t){E("number"==typeof t,64),this.set(Ht,t)},e.prototype.setVisible=function(t){this.set(qt,t)},e.prototype.setZIndex=function(t){this.set(Qt,t)},e.prototype.disposeInternal=function(){this.state_&&(this.state_.layer=null,this.state_=null),t.prototype.disposeInternal.call(this)},e}(Vt),se="precompose",ae="rendercomplete",le="undefined",he="ready";var ue=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])},t(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 ce(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}const pe=function(t){function e(e){var n=this,i=Rt({},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,n.rendered=!1,e.render&&(n.render=e.render),e.map&&n.setMap(e.map),n.addChangeListener(ie,n.handleSourcePropertyChange_);var r=e.source?e.source:null;return n.setSource(r),n}return ue(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(ie)||null},e.prototype.getRenderSource=function(){return this.getSource()},e.prototype.getSourceState=function(){var t=this.getSource();return t?t.getState():le},e.prototype.handleSourceChange_=function(){this.changed()},e.prototype.handleSourcePropertyChange_=function(){this.sourceChangeKey_&&(Xt(this.sourceChangeKey_),this.sourceChangeKey_=null);var t=this.getSource();t&&(this.sourceChangeKey_=Wt(t,Ft,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.getData=function(t){return this.renderer_&&this.rendered?this.renderer_.getData(t):null},e.prototype.render=function(t,e){var n=this.getRenderer();if(n.prepareFrame(t))return this.rendered=!0,n.renderFrame(t,e)},e.prototype.unrender=function(){this.rendered=!1},e.prototype.setMapInternal=function(t){t||this.unrender(),this.set("map",t)},e.prototype.getMapInternal=function(){return this.get("map")},e.prototype.setMap=function(t){this.mapPrecomposeKey_&&(Xt(this.mapPrecomposeKey_),this.mapPrecomposeKey_=null),t||this.changed(),this.mapRenderKey_&&(Xt(this.mapRenderKey_),this.mapRenderKey_=null),t&&(this.mapPrecomposeKey_=Wt(t,se,(function(t){var e=t.frameState.layerStatesArray,n=this.getLayerState(!1);E(!e.some((function(t){return t.layer===n.layer})),67),e.push(n)}),this),this.mapRenderKey_=Wt(this,Ft,t.render,t),this.changed())},e.prototype.setSource=function(t){this.set(ie,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.renderer_&&(this.renderer_.dispose(),delete this.renderer_),this.setSource(null),t.prototype.disposeInternal.call(this)},e}(oe);function fe(t,e){for(var n=!0,i=t.length-1;i>=0;--i)if(t[i]!=e[i]){n=!1;break}return n}function de(t,e){var n=Math.cos(e),i=Math.sin(e),r=t[0]*n-t[1]*i,o=t[1]*n+t[0]*i;return t[0]=r,t[1]=o,t}function _e(t,e){if(e.canWrapX()){var n=nt(e.getExtent()),i=function(t,e,n){var i=e.getExtent(),r=0;if(e.canWrapX()&&(t[0]<i[0]||t[0]>i[2])){var o=n||nt(i);r=Math.floor((t[0]-i[0])/o)}return r}(t,e,n);i&&(t[0]-=i*n)}return t}var ge=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])},t(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)}}(),ye=function(t){function e(e){var n=t.call(this)||this;return n.map_=e,n}return ge(e,t),e.prototype.dispatchRenderEvent=function(t,e){u()},e.prototype.calculateMatrices2D=function(t){var e=t.viewState,n=t.coordinateToPixelTransform,i=t.pixelToCoordinateTransform;R(n,t.size[0]/2,t.size[1]/2,1/e.resolution,-1/e.resolution,-e.rotation,-e.center[0],-e.center[1]),O(i,n)},e.prototype.forEachFeatureAtCoordinate=function(t,e,n,i,r,o,s,a){var l,h=e.viewState;function u(t,e,n,i){return r.call(o,e,t?n:null,i)}var c=h.projection,p=_e(t.slice(),c),f=[[0,0]];if(c.canWrapX()&&i){var d=nt(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 w=_[x],S=w.layer;if(S.hasRenderer()&&ce(w,h)&&s.call(a,S)){var C=S.getRenderer(),E=S.getSource();if(C&&E){var T=E.getWrapX()?p:t,b=u.bind(null,w.managed);v[0]=T[0]+f[m][0],v[1]=T[1]+f[m][1],l=C.forEachFeatureAtCoordinate(v,e,n,b,y)}if(l)return l}}if(0!==y.length){var R=1/y.length;return y.forEach((function(t,e){return t.distanceSq+=e*R})),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,r){return u()},e.prototype.hasFeatureAtCoordinate=function(t,e,n,i,r,o){return void 0!==this.forEachFeatureAtCoordinate(t,e,n,i,a,this,r,o)},e.prototype.getMap=function(){return this.map_},e.prototype.renderFrame=function(t){u()},e.prototype.scheduleExpireIconCache=function(t){Et.canExpireCache()&&t.postRenderFunctions.push(ve)},e}(t);function ve(t,e){Et.expire()}const me=ye;var xe=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])},t(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)}}();const we=function(t){function e(e,n,i,r){var o=t.call(this,e)||this;return o.inversePixelTransform=n,o.frameState=i,o.context=r,o}return xe(e,t),e}(Tt);var Se="ol-hidden",Ce="ol-control",Ee=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"),Te=["style","variant","weight","size","lineHeight","family"],be=function(t){var e=t.match(Ee);if(!e)return null;for(var n={lineHeight:"normal",size:"1.2em",style:"normal",weight:"normal",variant:"normal"},i=0,r=Te.length;i<r;++i){var o=e[i+1];void 0!==o&&(n[Te[i]]=o)}return n.families=n.family.split(/,\s?/),n};function Re(t){return 1===t?"":String(Math.round(100*t)/100)}function Oe(t,e,n,i){var r;return r=n&&n.length?n.shift():m?new OffscreenCanvas(t||300,e||300):document.createElement("canvas"),t&&(r.width=t),e&&(r.height=e),r.getContext("2d",i)}function Ie(t,e){var n=e.parentNode;n&&n.replaceChild(t,e)}function Pe(t){return t&&t.parentNode?t.parentNode.removeChild(t):null}var Me="10px sans-serif",Le="#000",Fe="round",Ae=[],De="round",ke="#000",je="center",Ge="middle",ze=[0,0,0,0],We=new Vt;(new Lt).setSize=function(){console.warn("labelCache is deprecated.")};var Ne,Xe,Ye=null,Ke={},Ze=function(){var t,e,n="32px ",i=["monospace","serif"],r=i.length,o="wmytzilWMYTZIL@#/&?$%10";function s(t,s,a){for(var l=!0,h=0;h<r;++h){var u=i[h];if(e=Ve(t+" "+s+" "+n+u,o),a!=u){var c=Ve(t+" "+s+" "+n+a+","+u,o);l=l&&c!=e}}return!!l}function a(){for(var e=!0,n=We.getKeys(),i=0,r=n.length;i<r;++i){var o=n[i];We.get(o)<100&&(s.apply(this,o.split("\n"))?(Ot(Ke),Ye=null,Ne=void 0,We.set(o,100)):(We.set(o,We.get(o)+1,!0),e=!1))}e&&(clearInterval(t),t=void 0)}return function(e){var n=be(e);if(n)for(var i=n.families,r=0,o=i.length;r<o;++r){var l=i[r],h=n.style+"\n"+n.weight+"\n"+l;void 0===We.get(h)&&(We.set(h,100,!0),s(n.style,n.weight,l)||(We.set(h,0,!0),void 0===t&&(t=setInterval(a,32))))}}}(),Be=function(t){var e=Ke[t];if(null==e){if(m){var n=be(t),i=Ue(t,"Žg");e=(isNaN(Number(n.lineHeight))?1.2:Number(n.lineHeight))*(i.actualBoundingBoxAscent+i.actualBoundingBoxDescent)}else Xe||((Xe=document.createElement("div")).innerHTML="M",Xe.style.minHeight="0",Xe.style.maxHeight="none",Xe.style.height="auto",Xe.style.padding="0",Xe.style.border="none",Xe.style.position="absolute",Xe.style.display="block",Xe.style.left="-99999px"),Xe.style.font=t,document.body.appendChild(Xe),e=Xe.offsetHeight,document.body.removeChild(Xe);Ke[t]=e}return e};function Ue(t,e){return Ye||(Ye=Oe(1,1)),t!=Ne&&(Ye.font=t,Ne=Ye.font),Ye.measureText(e)}function Ve(t,e){return Ue(t,e).width}function He(t,e,n){if(e in n)return n[e];var i=Ve(t,e);return n[e]=i,i}var qe=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])},t(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)}}();const Je=function(t){function e(e){var n=t.call(this,e)||this;n.fontChangeListenerKey_=Wt(We,bt,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 qe(e,t),e.prototype.dispatchRenderEvent=function(t,e){var n=this.getMap();if(n.hasListener(t)){var i=new we(t,void 0,e);n.dispatchEvent(i)}},e.prototype.disposeInternal=function(){Xt(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(se,t);var e=t.layerStatesArray.sort((function(t,e){return t.zIndex-e.zIndex})),n=t.viewState;this.children_.length=0;for(var i=[],r=null,o=0,s=e.length;o<s;++o){var a=e[o];t.layerIndex=o;var l=a.layer,h=l.getSourceState();if(!ce(a,n)||h!=he&&h!=le)l.unrender();else{var u=l.render(t,r);u&&(u!==r&&(this.children_.push(u),r=u),"getDeclutter"in l&&i.push(l))}}for(o=i.length-1;o>=0;--o)i[o].renderDeclutter(t);!function(t,e){for(var n=t.childNodes,i=0;;++i){var r=n[i],o=e[i];if(!r&&!o)break;r!==o&&(r?o?t.insertBefore(o,r):(t.removeChild(r),--i):t.appendChild(o))}}(this.element_,this.children_),this.dispatchRenderEvent("postcompose",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,r){for(var o=e.viewState,s=e.layerStatesArray,a=s.length-1;a>=0;--a){var l=s[a],h=l.layer;if(h.hasRenderer()&&ce(l,o)&&r(h)){var u=h.getRenderer().getDataAtPixel(t,e,n);if(u){var c=i(h,u);if(c)return c}}}},e}(me),Qe="add",$e="remove";var tn=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])},t(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="length",nn=function(t){function e(e,n,i){var r=t.call(this,e)||this;return r.element=n,r.index=i,r}return tn(e,t),e}(Tt);const rn=function(t){function e(e,n){var i=t.call(this)||this;i.on,i.once,i.un;var r=n||{};if(i.unique_=!!r.unique,i.array_=e||[],i.unique_)for(var o=0,s=i.array_.length;o<s;++o)i.assertUnique_(i.array_[o],o);return i.updateLength_(),i}return tn(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(en)},e.prototype.insertAt=function(t,e){this.unique_&&this.assertUnique_(e),this.array_.splice(t,0,e),this.updateLength_(),this.dispatchEvent(new nn(Qe,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 nn($e,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 nn($e,i,t)),this.dispatchEvent(new nn(Qe,e,t))}else{for(var r=n;r<t;++r)this.insertAt(r,void 0);this.insertAt(t,e)}},e.prototype.updateLength_=function(){this.set(en,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 C(58)},e}(Vt);var on=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])},t(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)}}(),sn=function(t){function e(e,n){var i=t.call(this,e)||this;return i.layer=n,i}return on(e,t),e}(Tt),an="layers";const ln=function(t){function e(e){var n=this,i=e||{},r=Rt({},i);delete r.layers;var o=i.layers;return(n=t.call(this,r)||this).on,n.once,n.un,n.layersListenerKeys_=[],n.listenerKeys_={},n.addChangeListener(an,n.handleLayersChanged_),o?Array.isArray(o)?o=new rn(o.slice(),{unique:!0}):E("function"==typeof o.getArray,43):o=new rn(void 0,{unique:!0}),n.setLayers(o),n}return on(e,t),e.prototype.handleLayerChange_=function(){this.changed()},e.prototype.handleLayersChanged_=function(){this.layersListenerKeys_.forEach(Xt),this.layersListenerKeys_.length=0;var t=this.getLayers();for(var e in this.layersListenerKeys_.push(Wt(t,Qe,this.handleLayersAdd_,this),Wt(t,$e,this.handleLayersRemove_,this)),this.listenerKeys_)this.listenerKeys_[e].forEach(Xt);Ot(this.listenerKeys_);for(var n=t.getArray(),i=0,r=n.length;i<r;i++){var o=n[i];this.registerLayerListeners_(o),this.dispatchEvent(new sn("addlayer",o))}this.changed()},e.prototype.registerLayerListeners_=function(t){var n=[Wt(t,bt,this.handleLayerChange_,this),Wt(t,Ft,this.handleLayerChange_,this)];t instanceof e&&n.push(Wt(t,"addlayer",this.handleLayerGroupAdd_,this),Wt(t,"removelayer",this.handleLayerGroupRemove_,this)),this.listenerKeys_[p(t)]=n},e.prototype.handleLayerGroupAdd_=function(t){this.dispatchEvent(new sn("addlayer",t.layer))},e.prototype.handleLayerGroupRemove_=function(t){this.dispatchEvent(new sn("removelayer",t.layer))},e.prototype.handleLayersAdd_=function(t){var e=t.element;this.registerLayerListeners_(e),this.dispatchEvent(new sn("addlayer",e)),this.changed()},e.prototype.handleLayersRemove_=function(t){var e=t.element,n=p(e);this.listenerKeys_[n].forEach(Xt),delete this.listenerKeys_[n],this.dispatchEvent(new sn("removelayer",e)),this.changed()},e.prototype.getLayers=function(){return this.get(an)},e.prototype.setLayers=function(t){var e=this.getLayers();if(e)for(var n=e.getArray(),i=0,r=n.length;i<r;++i)this.dispatchEvent(new sn("removelayer",n[i]));this.set(an,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(),r=i.zIndex;t||void 0!==i.zIndex||(r=0);for(var o=n,s=e.length;o<s;o++){var a=e[o];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=$(a.extent,i.extent):a.extent=i.extent),void 0===a.zIndex&&(a.zIndex=r)}return e},e.prototype.getSourceState=function(){return he},e}(oe);var hn=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])},t(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)}}();const un=function(t){function e(e,n,i){var r=t.call(this,e)||this;return r.map=n,r.frameState=void 0!==i?i:null,r}return hn(e,t),e}(Tt);var cn=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])},t(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)}}();const pn=function(t){function e(e,n,i,r,o){var s=t.call(this,e,n,o)||this;return s.originalEvent=i,s.pixel_=null,s.coordinate_=null,s.dragging=void 0!==r&&r,s}return cn(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}(un),fn={SINGLECLICK:"singleclick",CLICK:Dt,DBLCLICK:"dblclick",POINTERDRAG:"pointerdrag",POINTERMOVE:"pointermove",POINTERDOWN:"pointerdown",POINTERUP:"pointerup",POINTEROVER:"pointerover",POINTEROUT:"pointerout",POINTERENTER:"pointerenter",POINTERLEAVE:"pointerleave",POINTERCANCEL:"pointercancel"},dn="pointerdown";var _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])},t(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)}}();const gn=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 r=i.map_.getViewport();return i.activePointers_=0,i.trackedTouches_={},i.element_=r,i.pointerdownListenerKey_=Wt(r,dn,i.handlePointerDown_,i),i.originalPointerMoveEvent_,i.relayedListenerKey_=Wt(r,"pointermove",i.relayEvent_,i),i.boundHandleTouchMove_=i.handleTouchMove_.bind(i),i.element_.addEventListener(Gt,i.boundHandleTouchMove_,!!w&&{passive:!1}),i}return _n(e,t),e.prototype.emulateClick_=function(t){var e=new pn(fn.CLICK,this.map_,t);this.dispatchEvent(e),void 0!==this.clickTimeoutId_?(clearTimeout(this.clickTimeoutId_),this.clickTimeoutId_=void 0,e=new pn(fn.DBLCLICK,this.map_,t),this.dispatchEvent(e)):this.clickTimeoutId_=setTimeout(function(){this.clickTimeoutId_=void 0;var e=new pn(fn.SINGLECLICK,this.map_,t);this.dispatchEvent(e)}.bind(this),250)},e.prototype.updateActivePointers_=function(t){var e=t;e.type==fn.POINTERUP||e.type==fn.POINTERCANCEL?delete this.trackedTouches_[e.pointerId]:e.type==fn.POINTERDOWN&&(this.trackedTouches_[e.pointerId]=!0),this.activePointers_=Object.keys(this.trackedTouches_).length},e.prototype.handlePointerUp_=function(t){this.updateActivePointers_(t);var e=new pn(fn.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(Xt),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 pn(fn.POINTERDOWN,this.map_,t);for(var n in this.dispatchEvent(e),this.down_={},t){var i=t[n];this.down_[n]="function"==typeof i?h:i}if(0===this.dragListenerKeys_.length){var r=this.map_.getOwnerDocument();this.dragListenerKeys_.push(Wt(r,fn.POINTERMOVE,this.handlePointerMove_,this),Wt(r,fn.POINTERUP,this.handlePointerUp_,this),Wt(this.element_,fn.POINTERCANCEL,this.handlePointerUp_,this)),this.element_.getRootNode&&this.element_.getRootNode()!==r&&this.dragListenerKeys_.push(Wt(this.element_.getRootNode(),fn.POINTERUP,this.handlePointerUp_,this))}},e.prototype.handlePointerMove_=function(t){if(this.isMoving_(t)){this.dragging_=!0;var e=new pn(fn.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 pn(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_&&(Xt(this.relayedListenerKey_),this.relayedListenerKey_=null),this.element_.removeEventListener(Gt,this.boundHandleTouchMove_),this.pointerdownListenerKey_&&(Xt(this.pointerdownListenerKey_),this.pointerdownListenerKey_=null),this.dragListenerKeys_.forEach(Xt),this.dragListenerKeys_.length=0,this.element_=null,t.prototype.disposeInternal.call(this)},e}(Lt),yn="postrender",vn="loadstart",mn="loadend",xn="layergroup",wn="size",Sn="target",Cn="view";var En=1/0;const Tn=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,Ot(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){E(!(this.keyFunction_(t)in this.queuedElements_),31);var e=this.priorityFunction_(t);return e!=En&&(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,r=e[t],o=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]=r,n[t]=o,this.siftDown_(s,t)},t.prototype.siftDown_=function(t,e){for(var n=this.elements_,i=this.priorities_,r=n[e],o=i[e];e>t;){var s=this.getParentIndex_(e);if(!(i[s]>o))break;n[e]=n[s],i[e]=i[s],e=s}n[e]=r,i[e]=o},t.prototype.reprioritize=function(){var t,e,n,i=this.priorityFunction_,r=this.elements_,o=this.priorities_,s=0,a=r.length;for(e=0;e<a;++e)(n=i(t=r[e]))==En?delete this.queuedElements_[this.keyFunction_(t)]:(o[s]=n,r[s++]=t);r.length=s,o.length=s,this.heapify_()},t}();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])},t(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)}}();const Rn=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 bn(e,t),e.prototype.enqueue=function(e){var n=t.prototype.enqueue.call(this,e);return n&&e[0].addEventListener(Ft,this.boundHandleTileChange_),n},e.prototype.getTilesLoading=function(){return this.tilesLoading_},e.prototype.handleTileChange=function(t){var e=t.target,n=e.getState();if(2===n||3===n||4===n){e.removeEventListener(Ft,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,r=0;this.tilesLoading_<t&&r<e&&this.getCount()>0;)i=(n=this.dequeue()[0]).getKey(),0!==n.getState()||i in this.tilesLoadingKeys_||(this.tilesLoadingKeys_[i]=!0,++this.tilesLoading_,++r,n.load())},e}(Tn),On="Point",In="LineString",Pn="Polygon",Mn="MultiPoint",Ln="MultiLineString",Fn="MultiPolygon",An="GeometryCollection",Dn="Circle";var kn={RADIANS:"radians",DEGREES:"degrees",FEET:"ft",METERS:"m",PIXELS:"pixels",TILE_PIXELS:"tile-pixels",USFEET:"us-ft"},jn={};jn[kn.RADIANS]=6370997/(2*Math.PI),jn[kn.DEGREES]=2*Math.PI*6370997/360,jn[kn.FEET]=.3048,jn[kn.METERS]=1,jn[kn.USFEET]=1200/3937;const Gn=kn,zn={CENTER:"center",RESOLUTION:"resolution",ROTATION:"rotation"};const Wn=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_||jn[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}();var Nn=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])},t(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)}}(),Xn=6378137,Yn=Math.PI*Xn,Kn=[-Yn,-Yn,Yn,Yn],Zn=[-180,-85,180,85],Bn=Xn*Math.log(Math.tan(Math.PI/2)),Un=function(t){function e(e){return t.call(this,{code:e,units:Gn.METERS,extent:Kn,global:!0,worldExtent:Zn,getPointResolution:function(t,e){return t/st(e[1]/Xn)}})||this}return Nn(e,t),e}(Wn),Vn=[new Un("EPSG:3857"),new Un("EPSG:102100"),new Un("EPSG:102113"),new Un("EPSG:900913"),new Un("http://www.opengis.net/def/crs/EPSG/0/3857"),new Un("http://www.opengis.net/gml/srs/epsg.xml#3857")];var Hn=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])},t(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)}}(),qn=[-180,-90,180,90],Jn=6378137*Math.PI/180,Qn=function(t){function e(e,n){return t.call(this,{code:e,units:Gn.DEGREES,extent:qn,axisOrientation:n,global:!0,metersPerUnit:Jn,worldExtent:qn})||this}return Hn(e,t),e}(Wn),$n=[new Qn("CRS:84"),new Qn("EPSG:4326","neu"),new Qn("urn:ogc:def:crs:OGC:1.3:CRS84"),new Qn("urn:ogc:def:crs:OGC:2:84"),new Qn("http://www.opengis.net/def/crs/OGC/1.3/CRS84"),new Qn("http://www.opengis.net/gml/srs/epsg.xml#4326","neu"),new Qn("http://www.opengis.net/def/crs/EPSG/0/4326","neu")],ti={},ei={};function ni(t,e,n){var i=t.getCode(),r=e.getCode();i in ei||(ei[i]={}),ei[i][r]=n}function ii(t,e,n){var i=n||6371008.8,r=ut(t[1]),o=ut(e[1]),s=(o-r)/2,a=ut(e[0]-t[0])/2,l=Math.sin(s)*Math.sin(s)+Math.sin(a)*Math.sin(a)*Math.cos(r)*Math.cos(o);return 2*i*Math.atan2(Math.sqrt(l),Math.sqrt(1-l))}var ri=!0;function oi(t){ri=!(void 0===t||t)}function si(t,e,n){var i;if(void 0!==e){for(var r=0,o=t.length;r<o;++r)e[r]=t[r];i=e}else i=t.slice();return i}function ai(t,e,n){if(void 0!==e&&t!==e){for(var i=0,r=t.length;i<r;++i)e[i]=t[i];t=e}return t}function li(t){!function(t,e){ti[t]=e}(t.getCode(),t),ni(t,t,si)}function hi(t){return"string"==typeof t?ti[e=t]||ti[e.replace(/urn:(x-)?ogc:def:crs:EPSG:(.*:)?(\w+)$/,"EPSG:$3")]||null:t||null;var e}function ui(t,e,n,i){var r,o=(t=hi(t)).getPointResolutionFunc();if(o)r=o(e,n),i&&i!==t.getUnits()&&(a=t.getMetersPerUnit())&&(r=r*a/jn[i]);else{var s=t.getUnits();if(s==Gn.DEGREES&&!i||i==Gn.DEGREES)r=e;else{var a,l=_i(t,hi("EPSG:4326"));if(l===ai&&s!==Gn.DEGREES)r=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];r=(ii((h=l(h,h,2)).slice(0,2),h.slice(2,4))+ii(h.slice(4,6),h.slice(6,8)))/2}void 0!==(a=i?jn[i]:t.getMetersPerUnit())&&(r/=a)}}return r}function ci(t){!function(t){t.forEach(li)}(t),t.forEach((function(e){t.forEach((function(t){e!==t&&ni(e,t,si)}))}))}function pi(t,e){return t?"string"==typeof t?hi(t):t:hi(e)}function fi(t,e){return oi(),yi(t,"EPSG:4326",void 0!==e?e:"EPSG:3857")}function di(t,e){if(t===e)return!0;var n=t.getUnits()===e.getUnits();return(t.getCode()===e.getCode()||_i(t,e)===si)&&n}function _i(t,e){var n=function(t,e){var n;return t in ei&&e in ei[t]&&(n=ei[t][e]),n}(t.getCode(),e.getCode());return n||(n=ai),n}function gi(t,e){return _i(hi(t),hi(e))}function yi(t,e,n){return gi(e,n)(t,void 0,t.length)}function vi(t,e,n,i){return function(t,e,n,i){var r=[];if(i>1)for(var o=t[2]-t[0],s=t[3]-t[1],a=0;a<i;++a)r.push(t[0]+o*a/i,t[1],t[2],t[1]+s*a/i,t[2]-o*a/i,t[3],t[0],t[3]-s*a/i);else r=[t[0],t[1],t[2],t[1],t[2],t[3],t[0],t[3]];e(r,r,2);for(var l=[],h=[],u=(a=0,r.length);a<u;a+=2)l.push(r[a]),h.push(r[a+1]);return function(t,e,n){return z(Math.min.apply(null,t),Math.min.apply(null,e),Math.max.apply(null,t),Math.max.apply(null,e),n)}(l,h,n)}(t,gi(e,n),void 0,i)}var mi,xi,wi,Si=null;function Ci(){return Si}function Ei(t,e){return t}function Ti(t,e){return ri&&!fe(t,[0,0])&&t[0]>=-180&&t[0]<=180&&t[1]>=-90&&t[1]<=90&&(ri=!1,console.warn("Call useGeographic() from ol/proj once to work with [longitude, latitude] coordinates.")),t}function bi(t,e){return t}function Ri(t,e){return t}function Oi(t,e){return t}function Ii(t,e,n){return function(i,r,o,s,a){if(i){if(!r&&!e)return i;var l=e?0:o[0]*r,h=e?0:o[1]*r,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,_);if(s&&n&&r){var v=30*r;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)}return[g,y]}}}function Pi(t){return t}function Mi(t,e,n,i){var r=nt(e)/n[0],o=Q(e)/n[1];return i?Math.min(t,Math.max(r,o)):Math.min(t,Math.min(r,o))}function Li(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 Fi(t,e,n,i,r){return function(o,s,a,l){if(void 0!==o){var h=i?Mi(t,i,a,r):t;return(void 0===n||n)&&l?Li(o,h,e):ot(o,e,h)}}}function Ai(t){return void 0!==t?0:void 0}function Di(t){return void 0!==t?t:void 0}function ki(t){return Math.pow(t,3)}function ji(t){return 1-ki(1-t)}function Gi(t){return 3*t*t-2*t*t*t}function zi(t){return t}ci(Vn),ci($n),mi=Vn,xi=function(t,e,n){var i=t.length,r=n>1?n:2,o=e;void 0===o&&(o=r>2?t.slice():new Array(i));for(var s=0;s<i;s+=r){o[s]=Yn*t[s]/180;var a=Xn*Math.log(Math.tan(Math.PI*(+t[s+1]+90)/360));a>Bn?a=Bn:a<-Bn&&(a=-Bn),o[s+1]=a}return o},wi=function(t,e,n){var i=t.length,r=n>1?n:2,o=e;void 0===o&&(o=r>2?t.slice():new Array(i));for(var s=0;s<i;s+=r)o[s]=180*t[s]/Yn,o[s+1]=360*Math.atan(Math.exp(t[s+1]/Xn))/Math.PI-90;return o},$n.forEach((function(t){mi.forEach((function(e){ni(t,e,xi),ni(e,t,wi)}))}));const Wi="XY",Ni="XYZM";function Xi(t,e,n,i,r,o){for(var s=o||[],a=0,l=e;l<n;l+=i){var h=t[l],u=t[l+1];s[a++]=r[0]*h+r[2]*u+r[4],s[a++]=r[1]*h+r[3]*u+r[5]}return o&&s.length!=a&&(s.length=a),s}function Yi(t,e,n,i,r,o,s){for(var a=s||[],l=Math.cos(r),h=Math.sin(r),u=o[0],c=o[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 Ki=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])},t(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)}}(),Zi=[1,0,0,1,0,0],Bi=function(t){function e(){var e,n,i,r,o,a=t.call(this)||this;return a.extent_=[1/0,1/0,-1/0,-1/0],a.extentRevision_=-1,a.simplifiedGeometryMaxMinSquaredTolerance=0,a.simplifiedGeometryRevision=0,a.simplifyTransformedInternal=(e=function(t,e,n){if(!n)return this.getSimplifiedGeometry(e);var i=this.clone();return i.applyTransform(n),i.getSimplifiedGeometry(e)},o=!1,function(){var t=Array.prototype.slice.call(arguments);return o&&this===r&&s(t,i)||(o=!0,r=this,i=t,n=e.apply(this,arguments)),n}),a}return Ki(e,t),e.prototype.simplifyTransformed=function(t,e){return this.simplifyTransformedInternal(this.getRevision(),t,e)},e.prototype.clone=function(){return u()},e.prototype.closestPointXY=function(t,e,n,i){return u()},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 u()},e.prototype.getExtent=function(t){if(this.extentRevision_!=this.getRevision()){var e=this.computeExtent(this.extent_);(isNaN(e[0])||isNaN(e[1]))&&W(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){u()},e.prototype.scale=function(t,e,n){u()},e.prototype.simplify=function(t){return this.getSimplifiedGeometry(t*t)},e.prototype.getSimplifiedGeometry=function(t){return u()},e.prototype.getType=function(){return u()},e.prototype.applyTransform=function(t){u()},e.prototype.intersectsExtent=function(t){return u()},e.prototype.translate=function(t,e){u()},e.prototype.transform=function(t,e){var n=hi(t),i=n.getUnits()==Gn.TILE_PIXELS?function(t,i,r){var o=n.getExtent(),s=n.getWorldExtent(),a=Q(s)/Q(o);return R(Zi,s[0],s[3],a,-a,0,0,0),Xi(t,0,t.length,r,Zi,i),gi(n,e)(t,i,r)}:gi(n,e);return this.applyTransform(i),this},e}(Vt);const Ui=Bi;var Vi=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])},t(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)}}(),Hi=function(t){function e(){var e=t.call(this)||this;return e.layout=Wi,e.stride=2,e.flatCoordinates=null,e}return Vi(e,t),e.prototype.computeExtent=function(t){return e=this.flatCoordinates,n=this.flatCoordinates.length,i=this.stride,Y(W(t),e,0,n,i);var e,n,i},e.prototype.getCoordinates=function(){return u()},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=qi(t),this.layout=t,this.flatCoordinates=e},e.prototype.setCoordinates=function(t,e){u()},e.prototype.setLayout=function(t,e,n){var i;if(t)i=qi(t);else{for(var r=0;r<n;++r){if(0===e.length)return this.layout=Wi,void(this.stride=2);e=e[0]}t=function(t){var e;return 2==t?e=Wi:3==t?e="XYZ":4==t&&(e=Ni),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();Yi(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 r=n;r||(r=H(this.getExtent()));var o=this.getFlatCoordinates();if(o){var s=this.getStride();!function(t,e,n,i,r,o,s,a){for(var l=a||[],h=s[0],u=s[1],c=0,p=0;p<n;p+=i){var f=t[p]-h,d=t[p+1]-u;l[c++]=h+r*f,l[c++]=u+o*d;for(var _=p+2;_<p+i;++_)l[c++]=t[_]}a&&l.length!=c&&(l.length=c)}(o,0,o.length,s,t,i,r,o),this.changed()}},e.prototype.translate=function(t,e){var n=this.getFlatCoordinates();if(n){var i=this.getStride();!function(t,e,n,i,r,o,s){for(var a=s||[],l=0,h=0;h<n;h+=i){a[l++]=t[h]+r,a[l++]=t[h+1]+o;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}(Ui);function qi(t){var e;return t==Wi?e=2:"XYZ"==t||"XYM"==t?e=3:t==Ni&&(e=4),e}const Ji=Hi;function Qi(t,e,n,i,r,o,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=((r-l)*u+(o-h)*c)/(u*u+c*c);if(p>1)a=n;else{if(p>0){for(var f=0;f<i;++f)s[f]=pt(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 $i(t,e,n,i,r){var o=t[e],s=t[e+1];for(e+=i;e<n;e+=i){var a=t[e],l=t[e+1],h=ht(o,s,a,l);h>r&&(r=h),o=a,s=l}return r}function tr(t,e,n,i,r,o,s,a,l,h,u){if(e==n)return h;var c,p;if(0===r){if((p=ht(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(Qi(t,d-i,d,i,s,a,f),(p=ht(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))/r|0,1);if(o&&(Qi(t,n-i,e,i,s,a,f),(p=ht(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 er(t,e,n,i){for(var r=0,o=n.length;r<o;++r)for(var s=n[r],a=0;a<i;++a)t[e++]=s[a];return e}function nr(t,e){return e*Math.round(t/e)}function ir(t,e,n,i,r,o,s){if(e==n)return s;var a,l,h=nr(t[e],r),u=nr(t[e+1],r);e+=i,o[s++]=h,o[s++]=u;do{if(a=nr(t[e],r),l=nr(t[e+1],r),(e+=i)==n)return o[s++]=a,o[s++]=l,s}while(a==h&&l==u);for(;e<n;){var c=nr(t[e],r),p=nr(t[e+1],r);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):(o[s++]=a,o[s++]=l,h=a,u=l,a=c,l=p)}}return o[s++]=a,o[s++]=l,s}function rr(t,e,n,i,r){for(var o=void 0!==r?r:[],s=0,a=e;a<n;a+=i)o[s++]=t.slice(a,a+i);return o.length=s,o}function or(t,e,n,i,r){for(var o=void 0!==r?r:[],s=0,a=0,l=n.length;a<l;++a){var h=n[a];o[s++]=rr(t,e,h,i,o[s]),e=h}return o.length=s,o}function sr(t,e,n,i,r){for(var o=void 0!==r?r:[],s=0,a=0,l=n.length;a<l;++a){var h=n[a];o[s++]=or(t,e,h,i,o[s]),e=h[h.length-1]}return o.length=s,o}function ar(t,e,n,i){for(var r=0,o=t[n-i],s=t[n-i+1];e<n;e+=i){var a=t[e],l=t[e+1];r+=s*a-o*l,o=a,s=l}return r/2}var lr=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])},t(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)||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 lr(e,t),e.prototype.clone=function(){return new e(this.flatCoordinates.slice(),this.layout)},e.prototype.closestPointXY=function(t,e,n,i){return i<A(this.getExtent(),t,e)?i:(this.maxDeltaRevision_!=this.getRevision()&&(this.maxDelta_=Math.sqrt($i(this.flatCoordinates,0,this.flatCoordinates.length,this.stride,0)),this.maxDeltaRevision_=this.getRevision()),tr(this.flatCoordinates,0,this.flatCoordinates.length,this.stride,this.maxDelta_,!0,t,e,n,i))},e.prototype.getArea=function(){return ar(this.flatCoordinates,0,this.flatCoordinates.length,this.stride)},e.prototype.getCoordinates=function(){return rr(this.flatCoordinates,0,this.flatCoordinates.length,this.stride)},e.prototype.getSimplifiedGeometryInternal=function(t){var n=[];return n.length=function(t,e,n,i,r,o,s){var a=(n-e)/i;if(a<3){for(;e<n;e+=i)o[s++]=t[e],o[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=lt(t[v],t[v+1],d,_,g,y);m>f&&(u=v,f=m)}f>r&&(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]&&(o[s++]=t[e+v*i],o[s++]=t[e+v*i+1]);return s}(this.flatCoordinates,0,this.flatCoordinates.length,this.stride,t,n,0),new e(n,Wi)},e.prototype.getType=function(){return"LinearRing"},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=er(this.flatCoordinates,0,t,this.stride),this.changed()},e}(Ji);const ur=hr;var 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])},t(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){var i=t.call(this)||this;return i.setCoordinates(e,n),i}return cr(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 r=this.flatCoordinates,o=ht(t,e,r[0],r[1]);if(o<i){for(var s=this.stride,a=0;a<s;++a)n[a]=r[a];return n.length=s,o}return i},e.prototype.getCoordinates=function(){return this.flatCoordinates?this.flatCoordinates.slice():[]},e.prototype.computeExtent=function(t){return n=t,z(i=(e=this.flatCoordinates)[0],r=e[1],i,r,n);var e,n,i,r},e.prototype.getType=function(){return On},e.prototype.intersectsExtent=function(t){return j(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 r=0,o=n.length;r<o;++r)t[e++]=n[r];return e}(this.flatCoordinates,0,t,this.stride),this.changed()},e}(Ji);const fr=pr;function dr(t,e,n,i,r){return!Z(r,(function(r){return!_r(t,e,n,i,r[0],r[1])}))}function _r(t,e,n,i,r,o){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<=o?u>o&&(h-a)*(o-l)-(r-a)*(u-l)>0&&s++:u<=o&&(h-a)*(o-l)-(r-a)*(u-l)<0&&s--,a=h,l=u}return 0!==s}function gr(t,e,n,i,r,o){if(0===n.length)return!1;if(!_r(t,e,n[0],i,r,o))return!1;for(var s=1,a=n.length;s<a;++s)if(_r(t,n[s-1],n[s],i,r,o))return!1;return!0}function yr(t,e,n,i,r){var o=Y([1/0,1/0,-1/0,-1/0],t,e,n,i);return!!it(r,o)&&(!!k(r,o)||o[0]>=r[0]&&o[2]<=r[2]||o[1]>=r[1]&&o[3]<=r[3]||function(t,e,n,i,o){var s,a,l;for(e+=i;e<n;e+=i)if(a=t.slice(e-i,e),l=t.slice(e,e+i),s=function(t,e,n){var i=!1,r=G(t,e),o=G(t,n);if(1===r||1===o)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;2&o&&!(2&r)&&(i=(_=p-(f-h)/d)>=s&&_<=l),i||!(4&o)||4&r||(i=(g=f-(p-l)*d)>=a&&g<=h),i||!(8&o)||8&r||(i=(_=p-(f-a)/d)>=s&&_<=l),i||!(16&o)||16&r||(i=(g=f-(p-s)*d)>=a&&g<=h)}return i}(r,a,l))return s;return!1}(t,e,n,i))}function vr(t,e,n,i){for(;e<n-i;){for(var r=0;r<i;++r){var o=t[e+r];t[e+r]=t[n-i+r],t[n-i+r]=o}e+=i,n-=i}}function mr(t,e,n,i){for(var r=0,o=t[n-i],s=t[n-i+1];e<n;e+=i){var a=t[e],l=t[e+1];r+=(a-o)*(l+s),o=a,s=l}return 0===r?void 0:r>0}function xr(t,e,n,i,r){for(var o=void 0!==r&&r,s=0,a=n.length;s<a;++s){var l=n[s],h=mr(t,e,l,i);(0===s?o&&h||!o&&!h:o&&!h||!o&&h)&&vr(t,e,l,i),e=l}return e}var wr=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])},t(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)}}(),Sr=function(t){function n(e,n,i){var r=t.call(this)||this;return r.ends_=[],r.flatInteriorPointRevision_=-1,r.flatInteriorPoint_=null,r.maxDelta_=-1,r.maxDeltaRevision_=-1,r.orientedRevision_=-1,r.orientedFlatCoordinates_=null,void 0!==n&&i?(r.setFlatCoordinates(n,e),r.ends_=i):r.setCoordinates(e,n),r}return wr(n,t),n.prototype.appendLinearRing=function(t){this.flatCoordinates?o(this.flatCoordinates,t.getFlatCoordinates()):this.flatCoordinates=t.getFlatCoordinates().slice(),this.ends_.push(this.flatCoordinates.length),this.changed()},n.prototype.clone=function(){var t=new n(this.flatCoordinates.slice(),this.layout,this.ends_.slice());return t.applyProperties(this),t},n.prototype.closestPointXY=function(t,e,n,i){return i<A(this.getExtent(),t,e)?i:(this.maxDeltaRevision_!=this.getRevision()&&(this.maxDelta_=Math.sqrt(function(t,e,n,i,r){for(var o=0,s=n.length;o<s;++o){var a=n[o];r=$i(t,e,a,i,r),e=a}return r}(this.flatCoordinates,0,this.ends_,this.stride,0)),this.maxDeltaRevision_=this.getRevision()),function(t,e,n,i,r,o,s,a,l,h,u){for(var c=u||[NaN,NaN],p=0,f=n.length;p<f;++p){var d=n[p];h=tr(t,e,d,i,r,o,s,a,l,h,c),e=d}return h}(this.flatCoordinates,0,this.ends_,this.stride,this.maxDelta_,!0,t,e,n,i))},n.prototype.containsXY=function(t,e){return gr(this.getOrientedFlatCoordinates(),0,this.ends_,this.stride,t,e)},n.prototype.getArea=function(){return function(t,e,n,i){for(var r=0,o=0,s=n.length;o<s;++o){var a=n[o];r+=ar(t,e,a,i),e=a}return r}(this.getOrientedFlatCoordinates(),0,this.ends_,this.stride)},n.prototype.getCoordinates=function(t){var e;return void 0!==t?xr(e=this.getOrientedFlatCoordinates().slice(),0,this.ends_,this.stride,t):e=this.flatCoordinates,or(e,0,this.ends_,this.stride)},n.prototype.getEnds=function(){return this.ends_},n.prototype.getFlatInteriorPoint=function(){if(this.flatInteriorPointRevision_!=this.getRevision()){var t=H(this.getExtent());this.flatInteriorPoint_=function(t,n,i,r,o,s,a){for(var l,h,u,c,p,f,d,_=o[s+1],g=[],y=0,v=i.length;y<v;++y){var m=i[y];for(c=t[m-r],f=t[m-r+1],l=n;l<m;l+=r)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,w=-1/0;for(g.sort(e),c=g[0],l=1,h=g.length;l<h;++l){p=g[l];var S=Math.abs(p-c);S>w&&gr(t,n,i,r,u=(c+p)/2,_)&&(x=u,w=S),c=p}return isNaN(x)&&(x=o[s]),a?(a.push(x,_,w),a):[x,_,w]}(this.getOrientedFlatCoordinates(),0,this.ends_,this.stride,t,0),this.flatInteriorPointRevision_=this.getRevision()}return this.flatInteriorPoint_},n.prototype.getInteriorPoint=function(){return new fr(this.getFlatInteriorPoint(),"XYM")},n.prototype.getLinearRingCount=function(){return this.ends_.length},n.prototype.getLinearRing=function(t){return t<0||this.ends_.length<=t?null:new ur(this.flatCoordinates.slice(0===t?0:this.ends_[t-1],this.ends_[t]),this.layout)},n.prototype.getLinearRings=function(){for(var t=this.layout,e=this.flatCoordinates,n=this.ends_,i=[],r=0,o=0,s=n.length;o<s;++o){var a=n[o],l=new ur(e.slice(r,a),t);i.push(l),r=a}return i},n.prototype.getOrientedFlatCoordinates=function(){if(this.orientedRevision_!=this.getRevision()){var t=this.flatCoordinates;!function(t,e,n,i,r){for(var o=void 0!==r&&r,s=0,a=n.length;s<a;++s){var l=n[s],h=mr(t,e,l,i);if(0===s){if(o&&h||!o&&!h)return!1}else if(o&&!h||!o&&h)return!1;e=l}return!0}(t,0,this.ends_,this.stride)?(this.orientedFlatCoordinates_=t.slice(),this.orientedFlatCoordinates_.length=xr(this.orientedFlatCoordinates_,0,this.ends_,this.stride)):this.orientedFlatCoordinates_=t,this.orientedRevision_=this.getRevision()}return this.orientedFlatCoordinates_},n.prototype.getSimplifiedGeometryInternal=function(t){var e=[],i=[];return e.length=function(t,e,n,i,r,o,s,a){for(var l=0,h=n.length;l<h;++l){var u=n[l];s=ir(t,e,u,i,r,o,s),a.push(s),e=u}return s}(this.flatCoordinates,0,this.ends_,this.stride,Math.sqrt(t),e,0,i),new n(e,Wi,i)},n.prototype.getType=function(){return Pn},n.prototype.intersectsExtent=function(t){return function(t,e,n,i,r){if(!function(t,e,n,i,r){return!!(yr(t,e,n,i,r)||_r(t,e,n,i,r[0],r[1])||_r(t,e,n,i,r[0],r[3])||_r(t,e,n,i,r[2],r[1])||_r(t,e,n,i,r[2],r[3]))}(t,e,n[0],i,r))return!1;if(1===n.length)return!0;for(var o=1,s=n.length;o<s;++o)if(dr(t,n[o-1],n[o],i,r)&&!yr(t,n[o-1],n[o],i,r))return!1;return!0}(this.getOrientedFlatCoordinates(),0,this.ends_,this.stride,t)},n.prototype.setCoordinates=function(t,e){this.setLayout(e,t,2),this.flatCoordinates||(this.flatCoordinates=[]);var n=function(t,e,n,i,r){for(var o=r||[],s=0,a=0,l=n.length;a<l;++a){var h=er(t,e,n[a],i);o[s++]=h,e=h}return o.length=s,o}(this.flatCoordinates,0,t,this.stride,this.ends_);this.flatCoordinates.length=0===n.length?0:n[n.length-1],this.changed()},n}(Ji);const Cr=Sr;function Er(t){var e=t[0],n=t[1],i=t[2],r=t[3],o=[e,n,e,r,i,r,i,n,e,n];return new Sr(o,Wi,[o.length])}var Tr=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])},t(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)}}(),br=function(t){function e(e){var n=t.call(this)||this;n.on,n.once,n.un;var i=Rt({},e);return n.hints_=[0,0],n.animations_=[],n.updateAnimationKey_,n.projection_=pi(i.projection,"EPSG:3857"),n.viewportSize_=[100,100],n.targetCenter_=null,n.targetResolution_,n.targetRotation_,n.nextCenter_=null,n.nextResolution_,n.nextRotation_,n.cancelAnchor_=void 0,i.projection&&oi(),i.center&&(i.center=Ti(i.center,n.projection_)),i.extent&&(i.extent=Ri(i.extent,n.projection_)),n.applyOptions_(i),n}return Tr(e,t),e.prototype.applyOptions_=function(t){var e=Rt({},t);for(var n in zn)delete e[n];this.setProperties(e,!0);var r=function(t){var e,n,r,o=void 0!==t.minZoom?t.minZoom:0,s=void 0!==t.maxZoom?t.maxZoom:28,a=void 0!==t.zoomFactor?t.zoomFactor:2,l=void 0!==t.multiWorld&&t.multiWorld,h=void 0===t.smoothResolutionConstraint||t.smoothResolutionConstraint,u=void 0!==t.showFullExtent&&t.showFullExtent,c=pi(t.projection,"EPSG:3857"),p=c.getExtent(),f=t.constrainOnlyCenter,d=t.extent;if(l||d||!c.isGlobal()||(f=!1,d=p),void 0!==t.resolutions){var _=t.resolutions;n=_[o],r=void 0!==_[s]?_[s]:_[_.length-1],e=t.constrainResolution?function(t,e,n,r){return function(o,s,a,l){if(void 0!==o){var h=t[0],u=t[t.length-1],c=n?Mi(h,n,a,r):h;if(l)return void 0===e||e?Li(o,c,u):ot(o,u,c);var p=Math.min(c,o),f=Math.floor(i(t,p,s));return t[f]>c&&f<t.length-1?t[f+1]:t[f]}}}(_,h,!f&&d,u):Fi(n,r,h,!f&&d,u)}else{var g=(p?Math.max(nt(p),Q(p)):360*jn[Gn.DEGREES]/c.getMetersPerUnit())/256/Math.pow(2,0),y=g/Math.pow(2,28);void 0!==(n=t.maxResolution)?o=0:n=g/Math.pow(a,o),void 0===(r=t.minResolution)&&(r=void 0!==t.maxZoom?void 0!==t.maxResolution?n/Math.pow(a,s):g/Math.pow(a,s):y),s=o+Math.floor(Math.log(n/r)/Math.log(a)),r=n/Math.pow(a,s-o),e=t.constrainResolution?function(t,e,n,i,r,o){return function(s,a,l,h){if(void 0!==s){var u=r?Mi(e,r,l,o):e,c=void 0!==n?n:0;if(h)return void 0===i||i?Li(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)}}}(a,n,r,h,!f&&d,u):Fi(n,r,h,!f&&d,u)}return{constraint:e,maxResolution:n,minResolution:r,minZoom:o,zoomFactor:a}}(t);this.maxResolution_=r.maxResolution,this.minResolution_=r.minResolution,this.zoomFactor_=r.zoomFactor,this.resolutions_=t.resolutions,this.padding_=t.padding,this.minZoom_=r.minZoom;var o=function(t){if(void 0!==t.extent){var e=void 0===t.smoothExtentConstraint||t.smoothExtentConstraint;return Ii(t.extent,t.constrainOnlyCenter,e)}var n=pi(t.projection,"EPSG:3857");if(!0!==t.multiWorld&&n.isGlobal()){var i=n.getExtent().slice();return i[0]=-1/0,i[2]=1/0,Ii(i,!1,!1)}return Pi}(t),s=r.constraint,a=function(t){if(void 0===t.enableRotation||t.enableRotation){var e=t.constrainRotation;return void 0===e||!0===e?(r=ut(5),function(t,e){return e?t:void 0!==t?Math.abs(t)<=r?0:t:void 0}):!1===e?Di:"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}):Di}return Ai;var n,i,r}(t);this.constraints_={center:o,resolution:s,rotation:a},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)},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 r=this.getResolution(),o=r/2*(i[3]-e[3]+e[1]-i[1]),s=r/2*(i[0]-e[0]+e[2]-i[2]);this.setCenterInternal([n[0]+o,n[1]-s])}},enumerable:!1,configurable:!0}),e.prototype.getUpdatedOptions_=function(t){var e=this.getProperties();return void 0!==e.resolution?e.resolution=this.getResolution():e.zoom=this.getZoom(),e.center=this.getCenterInternal(),e.rotation=this.getRotation(),Rt({},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=Rt({},i)).center=Ti(i.center,this.getProjection())),i.anchor&&((i=Rt({},i)).anchor=Ti(i.anchor,this.getProjection())),e[n]=i}this.animateInternal.apply(this,e)},e.prototype.animateInternal=function(t){var e,n=arguments.length;n>1&&"function"==typeof arguments[n-1]&&(e=arguments[n-1],--n);for(var i=0;i<n&&!this.isDef();++i){var r=arguments[i];r.center&&this.setCenterInternal(r.center),void 0!==r.zoom?this.setZoom(r.zoom):r.resolution&&this.setResolution(r.resolution),void 0!==r.rotation&&this.setRotation(r.rotation)}if(i!==n){for(var o=Date.now(),s=this.targetCenter_.slice(),a=this.targetResolution_,l=this.targetRotation_,h=[];i<n;++i){var u=arguments[i],c={start:o,complete:!1,anchor:u.anchor,duration:void 0!==u.duration?u.duration:1e3,easing:u.easing||Gi,callback:e};if(u.center&&(c.sourceCenter=s,c.targetCenter=u.center.slice(),s=c.targetCenter),void 0!==u.zoom?(c.sourceResolution=a,c.targetResolution=this.getResolutionForZoom(u.zoom),a=c.targetResolution):u.resolution&&(c.sourceResolution=a,c.targetResolution=u.resolution,a=c.targetResolution),void 0!==u.rotation){c.sourceRotation=l;var p=ct(u.rotation-l+Math.PI,2*Math.PI)-Math.PI;c.targetRotation=l+p,l=c.targetRotation}Or(c)?c.complete=!0:o+=c.duration,h.push(c)}this.animations_.push(h),this.setHint(0,1),this.updateAnimations_()}else e&&Rr(e,!0)},e.prototype.getAnimating=function(){return this.hints_[0]>0},e.prototype.getInteracting=function(){return this.hints_[1]>0},e.prototype.cancelAnimations=function(){var t;this.setHint(0,-this.hints_[0]);for(var e=0,n=this.animations_.length;e<n;++e){var i=this.animations_[e];if(i[0].callback&&Rr(i[0].callback,!1),!t)for(var r=0,o=i.length;r<o;++r){var s=i[r];if(!s.complete){t=s.anchor;break}}}this.animations_.length=0,this.cancelAnchor_=t,this.nextCenter_=null,this.nextResolution_=NaN,this.nextRotation_=NaN},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],r=!0,o=0,s=i.length;o<s;++o){var a=i[o];if(!a.complete){var l=t-a.start,h=a.duration>0?l/a.duration:1;h>=1?(a.complete=!0,h=1):r=!1;var u=a.easing(h);if(a.sourceCenter){var c=a.sourceCenter[0],p=a.sourceCenter[1],f=a.targetCenter[0],d=a.targetCenter[1];this.nextCenter_=a.targetCenter;var _=c+u*(f-c),g=p+u*(d-p);this.targetCenter_=[_,g]}if(a.sourceResolution&&a.targetResolution){var y=1===u?a.targetResolution:a.sourceResolution+u*(a.targetResolution-a.sourceResolution);if(a.anchor){var v=this.getViewportSize_(this.getRotation()),m=this.constraints_.resolution(y,0,v,!0);this.targetCenter_=this.calculateCenterZoom(m,a.anchor)}this.nextResolution_=a.targetResolution,this.targetResolution_=y,this.applyTargetState_(!0)}if(void 0!==a.sourceRotation&&void 0!==a.targetRotation){var x=1===u?ct(a.targetRotation+Math.PI,2*Math.PI)-Math.PI:a.sourceRotation+u*(a.targetRotation-a.sourceRotation);if(a.anchor){var w=this.constraints_.rotation(x,!0);this.targetCenter_=this.calculateCenterRotate(w,a.anchor)}this.nextRotation_=a.targetRotation,this.targetRotation_=x}if(this.applyTargetState_(!0),e=!0,!a.complete)break}}if(r){this.animations_[n]=null,this.setHint(0,-1),this.nextCenter_=null,this.nextResolution_=NaN,this.nextRotation_=NaN;var S=i[0].callback;S&&Rr(S,!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,r,o=this.getCenterInternal();return void 0!==o&&(de(n=[o[0]-e[0],o[1]-e[1]],t-this.getRotation()),r=e,(i=n)[0]+=+r[0],i[1]+=+r[1]),n},e.prototype.calculateCenterZoom=function(t,e){var n,i=this.getCenterInternal(),r=this.getResolution();return void 0!==i&&void 0!==r&&(n=[e[0]-t*(e[0]-i[0])/r,e[1]-t*(e[1]-i[1])/r]),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?Ei(t,this.getProjection()):t},e.prototype.getCenterInternal=function(){return this.get(zn.CENTER)},e.prototype.getConstraints=function(){return this.constraints_},e.prototype.getConstrainResolution=function(){return this.get("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 bi(this.calculateExtentInternal(t),this.getProjection())},e.prototype.calculateExtentInternal=function(t){var e=t||this.getViewportSizeMinusPadding_(),n=this.getCenterInternal();E(n,1);var i=this.getResolution();E(void 0!==i,2);var r=this.getRotation();return E(void 0!==r,3),J(n,i,r,e)},e.prototype.getMaxResolution=function(){return this.maxResolution_},e.prototype.getMinResolution=function(){return this.minResolution_},e.prototype.getMaxZoom=function(){return this.getZoomForResolution(this.minResolution_)},e.prototype.setMaxZoom=function(t){this.applyOptions_(this.getUpdatedOptions_({maxZoom:t}))},e.prototype.getMinZoom=function(){return this.getZoomForResolution(this.maxResolution_)},e.prototype.setMinZoom=function(t){this.applyOptions_(this.getUpdatedOptions_({minZoom:t}))},e.prototype.setConstrainResolution=function(t){this.applyOptions_(this.getUpdatedOptions_({constrainResolution:t}))},e.prototype.getProjection=function(){return this.projection_},e.prototype.getResolution=function(){return this.get(zn.RESOLUTION)},e.prototype.getResolutions=function(){return this.resolutions_},e.prototype.getResolutionForExtent=function(t,e){return this.getResolutionForExtentInternal(Ri(t,this.getProjection()),e)},e.prototype.getResolutionForExtentInternal=function(t,e){var n=e||this.getViewportSizeMinusPadding_(),i=nt(t)/n[0],r=Q(t)/n[1];return Math.max(i,r)},e.prototype.getResolutionForValueFunction=function(t){var e=t||2,n=this.getConstrainedResolution(this.maxResolution_),i=this.minResolution_,r=Math.log(n/i)/Math.log(e);return function(t){return n/Math.pow(e,t*r)}},e.prototype.getRotation=function(){return this.get(zn.ROTATION)},e.prototype.getValueForResolutionFunction=function(t){var e=Math.log(t||2),n=this.getConstrainedResolution(this.maxResolution_),i=this.minResolution_,r=Math.log(n/i)/e;return function(t){return Math.log(n/t)/e/r}},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(),r=this.padding_;if(r){var o=this.getViewportSizeMinusPadding_();i=Ir(i,this.getViewportSize_(),[o[0]/2+r[3],o[1]/2+r[0]],e,n)}return{center:i.slice(0),projection:void 0!==t?t:null,resolution:e,nextCenter:this.nextCenter_,nextResolution:this.nextResolution_,nextRotation:this.nextRotation_,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,r=this.minZoom_||0;if(this.resolutions_){var o=i(this.resolutions_,t,1);r=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 r+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(E(Array.isArray(t)||"function"==typeof t.getSimplifiedGeometry,24),Array.isArray(t))E(!rt(t),25),n=Er(i=Ri(t,this.getProjection()));else if(t.getType()===Dn){var i;(n=Er(i=Ri(t.getExtent(),this.getProjection()))).rotate(this.getRotation(),H(i))}else{var r=Ci();n=r?t.clone().transform(r,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),r=t.getFlatCoordinates(),o=t.getStride(),s=1/0,a=1/0,l=-1/0,h=-1/0,u=0,c=r.length;u<c;u+=o){var p=r[u]*n-r[u+1]*i,f=r[u]*i+r[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 r,o=void 0!==n.padding?n.padding:[0,0,0,0],s=void 0!==n.nearest&&n.nearest;r=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]-o[1]-o[3],i[1]-o[0]-o[2]]);l=isNaN(l)?r:Math.max(l,r),l=this.getConstrainedResolution(l,s?0:1);var u=this.getRotation(),c=Math.sin(u),p=Math.cos(u),f=H(a);f[0]+=(o[1]-o[3])/2*l,f[1]+=(o[0]-o[2])/2*l;var d=f[0]*p-f[1]*c,_=f[1]*p+f[0]*c,g=this.getConstrainedCenter([d,_],l),y=n.callback?n.callback:h;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),Rr(y,!0))},e.prototype.centerOn=function(t,e,n){this.centerOnInternal(Ti(t,this.getProjection()),e,n)},e.prototype.centerOnInternal=function(t,e,n){this.setCenterInternal(Ir(t,e,n,this.getResolution(),this.getRotation()))},e.prototype.calculateCenterShift=function(t,e,n,i){var r,o=this.padding_;if(o&&t){var s=this.getViewportSizeMinusPadding_(-n),a=Ir(t,i,[s[0]/2+o[3],s[1]/2+o[0]],e,n);r=[t[0]-a[0],t[1]-a[1]]}return r},e.prototype.isDef=function(){return!!this.getCenterInternal()&&void 0!==this.getResolution()},e.prototype.adjustCenter=function(t){var e=Ei(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&&Ti(e,this.getProjection());this.adjustResolutionInternal(t,n)},e.prototype.adjustResolutionInternal=function(t,e){var n=this.getAnimating()||this.getInteracting(),i=this.getViewportSize_(this.getRotation()),r=this.constraints_.resolution(this.targetResolution_*t,0,i,n);e&&(this.targetCenter_=this.calculateCenterZoom(r,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=Ti(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(t?Ti(t,this.getProjection()):t)},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),r=this.getViewportSize_(i),o=this.constraints_.resolution(this.targetResolution_,0,r,n),s=this.constraints_.center(this.targetCenter_,o,r,n,this.calculateCenterShift(this.targetCenter_,o,i,r));this.get(zn.ROTATION)!==i&&this.set(zn.ROTATION,i),this.get(zn.RESOLUTION)!==o&&(this.set(zn.RESOLUTION,o),this.set("zoom",this.getZoom(),!0)),s&&this.get(zn.CENTER)&&fe(this.get(zn.CENTER),s)||this.set(zn.CENTER,s),this.getAnimating()&&!t&&this.cancelAnimations(),this.cancelAnchor_=void 0},e.prototype.resolveConstraints=function(t,e,n){var i=void 0!==t?t:200,r=e||0,o=this.constraints_.rotation(this.targetRotation_),s=this.getViewportSize_(o),a=this.constraints_.resolution(this.targetResolution_,r,s),l=this.constraints_.center(this.targetCenter_,a,s,!1,this.calculateCenterShift(this.targetCenter_,a,o,s));if(0===i&&!this.cancelAnchor_)return this.targetResolution_=a,this.targetRotation_=o,this.targetCenter_=l,void this.applyTargetState_();var h=n||(0===i?this.cancelAnchor_:void 0);this.cancelAnchor_=void 0,this.getResolution()===a&&this.getRotation()===o&&this.getCenterInternal()&&fe(this.getCenterInternal(),l)||(this.getAnimating()&&this.cancelAnimations(),this.animateInternal({rotation:o,center:l,resolution:a,duration:i,easing:ji,anchor:h}))},e.prototype.beginInteraction=function(){this.resolveConstraints(0),this.setHint(1,1)},e.prototype.endInteraction=function(t,e,n){var i=n&&Ti(n,this.getProjection());this.endInteractionInternal(t,e,i)},e.prototype.endInteractionInternal=function(t,e,n){this.setHint(1,-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}(Vt);function Rr(t,e){setTimeout((function(){t(e)}),0)}function Or(t){return!(t.sourceCenter&&t.targetCenter&&!fe(t.sourceCenter,t.targetCenter))&&t.sourceResolution===t.targetResolution&&t.sourceRotation===t.targetRotation}function Ir(t,e,n,i,r){var o=Math.cos(-r),s=Math.sin(-r),a=t[0]*o-t[1]*s,l=t[1]*o+t[0]*s;return[(a+=(e[0]/2-n[0])*i)*o-(l+=(n[1]-e[1]/2)*i)*(s=-s),l*o+a*s]}const Pr=br;function Mr(t,e,n){return void 0===n&&(n=[0,0]),n[0]=t[0]+2*e,n[1]=t[1]+2*e,n}function Lr(t){return t[0]>0&&t[1]>0}function Fr(t,e,n){return void 0===n&&(n=[0,0]),n[0]=t[0]*e+.5|0,n[1]=t[1]*e+.5|0,n}function Ar(t,e){return Array.isArray(t)?t:(void 0===e?e=[t,t]:(e[0]=t,e[1]=t),e)}var 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])},t(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 kr(t){t instanceof pe?t.setMapInternal(null):t instanceof ln&&t.getLayers().forEach(kr)}function jr(t,e){if(t instanceof pe)t.setMapInternal(e);else if(t instanceof ln)for(var n=t.getLayers().getArray(),i=0,r=n.length;i<r;++i)jr(n[i],e)}const Gr=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,r,o={},s=t.layers&&"function"==typeof t.layers.getLayers?t.layers:new ln({layers:t.layers});return o.layergroup=s,o.target=t.target,o.view=t.view instanceof Pr?t.view:new Pr,void 0!==t.controls&&(Array.isArray(t.controls)?n=new rn(t.controls.slice()):(E("function"==typeof t.controls.getArray,47),n=t.controls)),void 0!==t.interactions&&(Array.isArray(t.interactions)?i=new rn(t.interactions.slice()):(E("function"==typeof t.interactions.getArray,48),i=t.interactions)),void 0!==t.overlays?Array.isArray(t.overlays)?r=new rn(t.overlays.slice()):(E("function"==typeof t.overlays.getArray,49),r=t.overlays):r=new rn,{controls:n,interactions:i,keyboardEventTarget:e,overlays:r,values:o}}(e);n.renderComplete_,n.loaded_=!0,n.boundHandleBrowserEvent_=n.handleBrowserEvent.bind(n),n.maxTilesLoading_=void 0!==e.maxTilesLoading?e.maxTilesLoading:16,n.pixelRatio_=void 0!==e.pixelRatio?e.pixelRatio:v,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.targetChangeHandlerKeys_=null,n.controls=i.controls||new rn,n.interactions=i.interactions||new rn,n.overlays_=i.overlays,n.overlayIdIndex_={},n.renderer_=null,n.postRenderFunctions_=[],n.tileQueue_=new Rn(n.getTilePriority.bind(n),n.handleTileChange_.bind(n)),n.addChangeListener(xn,n.handleLayerGroupChanged_),n.addChangeListener(Cn,n.handleViewChanged_),n.addChangeListener(wn,n.handleSizeChanged_),n.addChangeListener(Sn,n.handleTargetChanged_),n.setProperties(i.values);var r=n;return!e.view||e.view instanceof Pr||e.view.then((function(t){r.setView(new Pr(t))})),n.controls.addEventListener(Qe,function(t){t.element.setMap(this)}.bind(n)),n.controls.addEventListener($e,function(t){t.element.setMap(null)}.bind(n)),n.interactions.addEventListener(Qe,function(t){t.element.setMap(this)}.bind(n)),n.interactions.addEventListener($e,function(t){t.element.setMap(null)}.bind(n)),n.overlays_.addEventListener(Qe,function(t){this.addOverlayInternal_(t.element)}.bind(n)),n.overlays_.addEventListener($e,function(t){var e=t.element.getId();void 0!==e&&delete this.overlayIdIndex_[e.toString()],t.element.setMap(null)}.bind(n)),n.controls.forEach(function(t){t.setMap(this)}.bind(n)),n.interactions.forEach(function(t){t.setMap(this)}.bind(n)),n.overlays_.forEach(n.addOverlayInternal_.bind(n)),n}return Dr(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.handleLayerAdd_=function(t){jr(t.layer,this)},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_&&this.renderer_){var i=this.getCoordinateFromPixelInternal(t),r=void 0!==(n=void 0!==n?n:{}).hitTolerance?n.hitTolerance:0,o=void 0!==n.layerFilter?n.layerFilter:a,s=!1!==n.checkWrapped;return this.renderer_.forEachFeatureAtCoordinate(i,this.frameState_,r,s,e,null,o,null)}},e.prototype.getFeaturesAtPixel=function(t,e){var n=[];return this.forEachFeatureAtPixel(t,(function(t){n.push(t)}),e),n},e.prototype.getAllLayers=function(){var t=[];return function e(n){n.forEach((function(n){n instanceof ln?e(n.getLayers()):t.push(n)}))}(this.getLayers()),t},e.prototype.forEachLayerAtPixel=function(t,e,n){if(this.frameState_&&this.renderer_){var i=n||{},r=void 0!==i.hitTolerance?i.hitTolerance:0,o=i.layerFilter||a;return this.renderer_.forEachLayerAtPixel(t,this.frameState_,r,e,o)}},e.prototype.hasFeatureAtPixel=function(t,e){if(!this.frameState_||!this.renderer_)return!1;var n=this.getCoordinateFromPixelInternal(t),i=void 0!==(e=void 0!==e?e:{}).layerFilter?e.layerFilter:a,r=void 0!==e.hitTolerance?e.hitTolerance:0,o=!1!==e.checkWrapped;return this.renderer_.hasFeatureAtCoordinate(n,this.frameState_,r,o,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(Sn)},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 Ei(this.getCoordinateFromPixelInternal(t),this.getView().getProjection())},e.prototype.getCoordinateFromPixelInternal=function(t){var e=this.frameState_;return e?b(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(xn)},e.prototype.setLayers=function(t){var e=this.getLayerGroup();if(t instanceof rn)e.setLayers(t);else{var n=e.getLayers();n.clear(),n.extend(t)}},e.prototype.getLayers=function(){return this.getLayerGroup().getLayers()},e.prototype.getLoadingOrNotReady=function(){for(var t=this.getLayerGroup().getLayerStatesArray(),e=0,n=t.length;e<n;++e){var i=t[e];if(i.visible){var r=i.layer.getRenderer();if(r&&!r.ready)return!0;var o=i.layer.getSource();if(o&&o.loading)return!0}}return!1},e.prototype.getPixelFromCoordinate=function(t){var e=Ti(t,this.getView().getProjection());return this.getPixelFromCoordinateInternal(e)},e.prototype.getPixelFromCoordinateInternal=function(t){var e=this.frameState_;return e?b(e.coordinateToPixelTransform,t.slice(0,2)):null},e.prototype.getRenderer=function(){return this.renderer_},e.prototype.getSize=function(){return this.get(wn)},e.prototype.getView=function(){return this.get(Cn)},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,r){if(!t||!(n in t.wantedTiles))return En;if(!t.wantedTiles[n][e.getKey()])return En;var o=t.viewState.center,s=i[0]-o[0],a=i[1]-o[1];return 65536*Math.log(r)+Math.sqrt(s*s+a*a)/r}(this.frameState_,t,e,n,i)},e.prototype.handleBrowserEvent=function(t,e){var n=e||t.type,i=new pn(n,this,t);this.handleMapBrowserEvent(i)},e.prototype.handleMapBrowserEvent=function(t){if(this.frameState_){var e=t.originalEvent,n=e.type;if(n===dn||n===zt||n===kt){var i=this.getOwnerDocument(),r=this.viewport_.getRootNode?this.viewport_.getRootNode():i,o=e.target;if(this.overlayContainerStopEvent_.contains(o)||!(r===i?i.documentElement:r).contains(o))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()&&(!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 r=t.viewHints;if(r[0]||r[1]){var o=Date.now()-t.time>8;n=o?0:8,i=o?0:2}}e.getTilesLoading()<n&&(e.reprioritize(),e.loadMoreTiles(n,i))}t&&this.renderer_&&!t.animate&&(!0===this.renderComplete_?(this.hasListener(ae)&&this.renderer_.dispatchRenderEvent(ae,t),!1===this.loaded_&&(this.loaded_=!0,this.dispatchEvent(new un(mn,this,t)))):!0===this.loaded_&&(this.loaded_=!1,this.dispatchEvent(new un(vn,this,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(){if(this.mapBrowserEventHandler_){for(var t=0,e=this.targetChangeHandlerKeys_.length;t<e;++t)Xt(this.targetChangeHandlerKeys_[t]);this.targetChangeHandlerKeys_=null,this.viewport_.removeEventListener(At,this.boundHandleBrowserEvent_),this.viewport_.removeEventListener(zt,this.boundHandleBrowserEvent_),this.mapBrowserEventHandler_.dispose(),this.mapBrowserEventHandler_=null,Pe(this.viewport_)}var n=this.getTargetElement();if(n){for(var i in n.appendChild(this.viewport_),this.renderer_||(this.renderer_=this.createRenderer()),this.mapBrowserEventHandler_=new gn(this,this.moveTolerance_),fn)this.mapBrowserEventHandler_.addEventListener(fn[i],this.handleMapBrowserEvent.bind(this));this.viewport_.addEventListener(At,this.boundHandleBrowserEvent_,!1),this.viewport_.addEventListener(zt,this.boundHandleBrowserEvent_,!!w&&{passive:!1});var r=this.getOwnerDocument().defaultView,o=this.keyboardEventTarget_?this.keyboardEventTarget_:n;this.targetChangeHandlerKeys_=[Wt(o,kt,this.handleBrowserEvent,this),Wt(o,jt,this.handleBrowserEvent,this),Wt(r,"resize",this.updateSize,this)]}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_&&(Xt(this.viewPropertyListenerKey_),this.viewPropertyListenerKey_=null),this.viewChangeListenerKey_&&(Xt(this.viewChangeListenerKey_),this.viewChangeListenerKey_=null);var t=this.getView();t&&(this.updateViewportSize_(),this.viewPropertyListenerKey_=Wt(t,bt,this.handleViewPropertyChanged_,this),this.viewChangeListenerKey_=Wt(t,Ft,this.handleViewPropertyChanged_,this),t.resolveConstraints(0)),this.render()},e.prototype.handleLayerGroupChanged_=function(){this.layerGroupPropertyListenerKeys_&&(this.layerGroupPropertyListenerKeys_.forEach(Xt),this.layerGroupPropertyListenerKeys_=null);var t=this.getLayerGroup();t&&(this.handleLayerAdd_(new sn("addlayer",t)),this.layerGroupPropertyListenerKeys_=[Wt(t,bt,this.render,this),Wt(t,Ft,this.render,this),Wt(t,"addlayer",this.handleLayerAdd_,this),Wt(t,"removelayer",this.handleLayerRemove_,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.handleLayerRemove_=function(t){kr(t.layer)},e.prototype.removeOverlay=function(t){return this.getOverlays().remove(t)},e.prototype.renderFrame_=function(t){var e=this,n=this.getSize(),i=this.getView(),r=this.frameState_,o=null;if(void 0!==n&&Lr(n)&&i&&i.isDef()){var s=i.getHints(this.frameState_?this.frameState_.viewHints:void 0),a=i.getState();if(o={animate:!1,coordinateToPixelTransform:this.coordinateToPixelTransform_,declutterTree:null,extent:J(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:{},mapId:p(this),renderTargets:{}},a.nextCenter&&a.nextResolution){var l=isNaN(a.nextRotation)?a.rotation:a.nextRotation;o.nextExtent=J(a.nextCenter,a.nextResolution,l,n)}}this.frameState_=o,this.renderer_.renderFrame(o),o&&(o.animate&&this.render(),Array.prototype.push.apply(this.postRenderFunctions_,o.postRenderFunctions),r&&(!this.previousExtent_||!rt(this.previousExtent_)&&!N(o.extent,this.previousExtent_))&&(this.dispatchEvent(new un("movestart",this,r)),this.previousExtent_=W(this.previousExtent_)),this.previousExtent_&&!o.viewHints[0]&&!o.viewHints[1]&&!N(o.extent,this.previousExtent_)&&(this.dispatchEvent(new un("moveend",this,o)),F(o.extent,this.previousExtent_))),this.dispatchEvent(new un(yn,this,o)),this.renderComplete_=this.hasListener(vn)||this.hasListener(mn)||this.hasListener(ae)?!this.tileQueue_.getTilesLoading()&&!this.tileQueue_.getCount()&&!this.getLoadingOrNotReady():void 0,this.postRenderTimeoutHandle_||(this.postRenderTimeoutHandle_=setTimeout((function(){e.postRenderTimeoutHandle_=void 0,e.handlePostRender()}),0))},e.prototype.setLayerGroup=function(t){var e=this.getLayerGroup();e&&this.handleLayerRemove_(new sn("removelayer",e)),this.set(xn,t)},e.prototype.setSize=function(t){this.set(wn,t)},e.prototype.setTarget=function(t){this.set(Sn,t)},e.prototype.setView=function(t){if(!t||t instanceof Pr)this.set(Cn,t);else{this.set(Cn,new Pr);var e=this;t.then((function(t){e.setView(new Pr(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),r=t.offsetHeight-parseFloat(n.borderTopWidth)-parseFloat(n.paddingTop)-parseFloat(n.paddingBottom)-parseFloat(n.borderBottomWidth);isNaN(i)||isNaN(r)||!Lr(e=[i,r])&&(t.offsetWidth||t.offsetHeight||t.getClientRects().length)&&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}(Vt);var zr=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])},t(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)}}();const Wr=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 zr(e,t),e.prototype.disposeInternal=function(){Pe(this.element),t.prototype.disposeInternal.call(this)},e.prototype.getMap=function(){return this.map_},e.prototype.setMap=function(t){this.map_&&Pe(this.element);for(var e=0,n=this.listenerKeys.length;e<n;++e)Xt(this.listenerKeys[e]);this.listenerKeys.length=0,this.map_=t,t&&((this.target_?this.target_:t.getOverlayContainerStopEvent()).appendChild(this.element),this.render!==h&&this.listenerKeys.push(Wt(t,yn,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}(Vt);var Nr=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])},t(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)}}();const Xr=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 r=void 0!==i.className?i.className:"ol-attribution",o=void 0!==i.tipLabel?i.tipLabel:"Attributions",s=void 0!==i.expandClassName?i.expandClassName:r+"-expand",a=void 0!==i.collapseLabel?i.collapseLabel:"›",l=void 0!==i.collapseClassName?i.collapseClassName:r+"-collapse";"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=o,n.toggleButton_.appendChild(u),n.toggleButton_.addEventListener(Dt,n.handleClick_.bind(n),!1);var c=r+" ol-unselectable "+Ce+(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 Nr(e,t),e.prototype.collectSourceAttributions_=function(t){for(var e={},n=[],i=!0,r=t.layerStatesArray,o=0,s=r.length;o<s;++o){var a=r[o];if(ce(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),!s(e,this.renderedAttributions_)){!function(t){for(;t.lastChild;)t.removeChild(t.lastChild)}(this.ulElement_);for(var i=0,r=e.length;i<r;++i){var o=document.createElement("li");o.innerHTML=e[i],this.ulElement_.appendChild(o)}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("ol-collapsed"),this.collapsed_?Ie(this.collapseLabel_,this.label_):Ie(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}(Wr);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])},t(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){var n=this,i=e||{};n=t.call(this,{element:document.createElement("div"),render:i.render,target:i.target})||this;var r=void 0!==i.className?i.className:"ol-rotate",o=void 0!==i.label?i.label:"⇧",s=void 0!==i.compassClassName?i.compassClassName:"ol-compass";n.label_=null,"string"==typeof o?(n.label_=document.createElement("span"),n.label_.className=s,n.label_.textContent=o):(n.label_=o,n.label_.classList.add(s));var a=i.tipLabel?i.tipLabel:"Reset rotation",l=document.createElement("button");l.className=r+"-reset",l.setAttribute("type","button"),l.title=a,l.appendChild(n.label_),l.addEventListener(Dt,n.handleClick_.bind(n),!1);var h=r+" ol-unselectable "+Ce,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(Se),n}return Yr(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:ji}):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 r=this.element.classList.contains(Se);r||0!==n?r&&0!==n&&this.element.classList.remove(Se):this.element.classList.add(Se)}this.label_.style.transform=i}this.rotation_=n}},e}(Wr);const Zr=Kr;var 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])},t(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)}}();const Ur=function(t){function e(e){var n=this,i=e||{};n=t.call(this,{element:document.createElement("div"),target:i.target})||this;var r=void 0!==i.className?i.className:"ol-zoom",o=void 0!==i.delta?i.delta:1,s=void 0!==i.zoomInClassName?i.zoomInClassName:r+"-in",a=void 0!==i.zoomOutClassName?i.zoomOutClassName:r+"-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(Dt,n.handleClick_.bind(n,o),!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(Dt,n.handleClick_.bind(n,-o),!1);var d=r+" ol-unselectable "+Ce,_=n.element;return _.className=d,_.appendChild(p),_.appendChild(f),n.duration_=void 0!==i.duration?i.duration:250,n}return Br(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:ji})):e.setZoom(i)}}},e}(Wr),Vr="active";var Hr=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])},t(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 qr(t,e,n,i){var r=t.getZoom();if(void 0!==r){var o=t.getConstrainedZoom(r+e),s=t.getResolutionForZoom(o);t.getAnimating()&&t.cancelAnimations(),t.animate({resolution:s,anchor:n,duration:void 0!==i?i:250,easing:ji})}}const Jr=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 Hr(e,t),e.prototype.getActive=function(){return this.get(Vr)},e.prototype.getMap=function(){return this.map_},e.prototype.handleEvent=function(t){return!0},e.prototype.setActive=function(t){this.set(Vr,t)},e.prototype.setMap=function(t){this.map_=t},e}(Vt);var Qr=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])},t(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)}}();const $r=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 Qr(e,t),e.prototype.handleEvent=function(t){var e=!1;if(t.type==fn.DBLCLICK){var n=t.originalEvent,i=t.map,r=t.coordinate,o=n.shiftKey?-this.delta_:this.delta_;qr(i.getView(),o,r,this.duration_),n.preventDefault(),e=!0}return!e},e}(Jr);var to=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])},t(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 eo(t){for(var e=t.length,n=0,i=0,r=0;r<e;r++)n+=t[r].clientX,i+=t[r].clientY;return[n/e,i/e]}const no=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 to(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==fn.POINTERDRAG)this.handleDragEvent(t),t.originalEvent.preventDefault();else if(t.type==fn.POINTERUP){var n=this.handleUpEvent(t);this.handlingDownUpSequence=n&&this.targetPointers.length>0}}else if(t.type==fn.POINTERDOWN){var i=this.handleDownEvent(t);this.handlingDownUpSequence=i,e=this.stopDown(i)}else t.type==fn.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===fn.POINTERDOWN||e===fn.POINTERDRAG||e===fn.POINTERUP}(t)){var e=t.originalEvent,n=e.pointerId.toString();t.type==fn.POINTERUP?delete this.trackedPointers_[n]:(t.type==fn.POINTERDOWN||n in this.trackedPointers_)&&(this.trackedPointers_[n]=e),this.targetPointers=It(this.trackedPointers_)}},e}(Jr);function io(t){var e=arguments;return function(t){for(var n=!0,i=0,r=e.length;i<r&&(n=n&&e[i](t));++i);return n}}var ro=function(t){var e=t.originalEvent;return e.altKey&&!(e.metaKey||e.ctrlKey)&&e.shiftKey},oo=function(t){return!t.map.getTargetElement().hasAttribute("tabindex")||function(t){var e=t.map.getTargetElement(),n=t.map.getOwnerDocument().activeElement;return e.contains(n)}(t)},so=a,ao=function(t){var e=t.originalEvent;return 0==e.button&&!(g&&y&&e.ctrlKey)},lo=function(t){var e=t.originalEvent;return!e.altKey&&!(e.metaKey||e.ctrlKey)&&!e.shiftKey},ho=function(t){var e=t.originalEvent;return!e.altKey&&!(e.metaKey||e.ctrlKey)&&e.shiftKey},uo=function(t){var e=t.originalEvent.target.tagName;return"INPUT"!==e&&"SELECT"!==e&&"TEXTAREA"!==e},co=function(t){var e=t.originalEvent;return E(void 0!==e,56),"mouse"==e.pointerType},po=function(t){var e=t.originalEvent;return E(void 0!==e,56),e.isPrimary&&0===e.button},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])},t(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)}}();const _o=function(t){function e(e){var n=t.call(this,{stopDown:l})||this,i=e||{};n.kinetic_=i.kinetic,n.lastCentroid=null,n.lastPointersCount_,n.panning_=!1;var r=i.condition?i.condition:io(lo,po);return n.condition_=i.onFocusOnly?io(oo,r):r,n.noKinetic_=!1,n}return fo(e,t),e.prototype.handleDragEvent=function(t){this.panning_||(this.panning_=!0,this.getMap().getView().beginInteraction());var e,n,i=this.targetPointers,r=eo(i);if(i.length==this.lastPointersCount_){if(this.kinetic_&&this.kinetic_.update(r[0],r[1]),this.lastCentroid){var o=[this.lastCentroid[0]-r[0],r[1]-this.lastCentroid[1]],s=t.map.getView();e=o,n=s.getResolution(),e[0]*=n,e[1]*=n,de(o,s.getRotation()),s.adjustCenterInternal(o)}}else this.kinetic_&&this.kinetic_.begin();this.lastCentroid=r,this.lastPointersCount_=i.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(),r=this.kinetic_.getAngle(),o=n.getCenterInternal(),s=e.getPixelFromCoordinateInternal(o),a=e.getCoordinateFromPixelInternal([s[0]-i*Math.cos(r),s[1]-i*Math.sin(r)]);n.animateInternal({center:n.getConstrainedCenter(a),duration:500,easing:ji})}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}(no);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])},t(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)}}();const yo=function(t){function e(e){var n=this,i=e||{};return(n=t.call(this,{stopDown:l})||this).condition_=i.condition?i.condition:ro,n.lastAngle_=void 0,n.duration_=void 0!==i.duration?i.duration:250,n}return go(e,t),e.prototype.handleDragEvent=function(t){if(co(t)){var e=t.map,n=e.getView();if(n.getConstraints().rotation!==Ai){var i=e.getSize(),r=t.pixel,o=Math.atan2(i[1]/2-r[1],r[0]-i[0]/2);if(void 0!==this.lastAngle_){var s=o-this.lastAngle_;n.adjustRotationInternal(-s)}this.lastAngle_=o}}},e.prototype.handleUpEvent=function(t){return!co(t)||(t.map.getView().endInteraction(this.duration_),!1)},e.prototype.handleDownEvent=function(t){return!(!co(t)||!ao(t)||!this.condition_(t)||(t.map.getView().beginInteraction(),this.lastAngle_=void 0,0))},e}(no);var vo=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])},t(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)}}(),mo=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 vo(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 Cr([n])},e.prototype.getGeometry=function(){return this.geometry_},e}(t);const xo=mo;var 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])},t(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)}}(),So=function(t){function e(e,n,i){var r=t.call(this,e)||this;return r.coordinate=n,r.mapBrowserEvent=i,r}return wo(e,t),e}(Tt);const Co=function(t){function e(e){var n=t.call(this)||this;n.on,n.once,n.un;var i=e||{};return n.box_=new xo(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:ao,n.boxEndCondition_=i.boxEndCondition?i.boxEndCondition:n.defaultBoxEndCondition,n}return wo(e,t),e.prototype.defaultBoxEndCondition=function(t,e,n){var i=n[0]-e[0],r=n[1]-e[1];return i*i+r*r>=this.minArea_},e.prototype.getGeometry=function(){return this.box_.getGeometry()},e.prototype.handleDragEvent=function(t){this.box_.setPixels(this.startPixel_,t.pixel),this.dispatchEvent(new So("boxdrag",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 So(e?"boxend":"boxcancel",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 So("boxstart",t.coordinate,t)),!0)},e.prototype.onBoxEnd=function(t){},e}(no);var Eo=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])},t(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)}}();const To=function(t){function e(e){var n=this,i=e||{},r=i.condition?i.condition:ho;return(n=t.call(this,{condition:r,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 Eo(e,t),e.prototype.onBoxEnd=function(t){var e=this.getMap().getView(),n=this.getGeometry();if(this.out_){var i=e.rotatedExtentForGeometry(n),r=e.getResolutionForExtentInternal(i),o=e.getResolution()/r;(n=n.clone()).scale(o*o)}e.fitInternal(n,{duration:this.duration_,easing:ji})},e}(Co);var bo=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])},t(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)}}();const Ro=function(t){function e(e){var n=t.call(this)||this,i=e||{};return n.defaultCondition_=function(t){return lo(t)&&uo(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 bo(e,t),e.prototype.handleEvent=function(t){var e=!1;if(t.type==kt){var n=t.originalEvent,i=n.keyCode;if(this.condition_(t)&&(40==i||37==i||39==i||38==i)){var r=t.map.getView(),o=r.getResolution()*this.pixelDelta_,s=0,a=0;40==i?a=-o:37==i?s=-o:39==i?s=o:a=o;var l=[s,a];de(l,r.getRotation()),function(t,e,n){var i=t.getCenterInternal();if(i){var r=[i[0]+e[0],i[1]+e[1]];t.animateInternal({duration:void 0!==n?n:250,easing:zi,center:t.getConstrainedCenter(r)})}}(r,l,this.duration_),n.preventDefault(),e=!0}}return!e},e}(Jr);var Oo=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])},t(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)}}();const Io=function(t){function e(e){var n=t.call(this)||this,i=e||{};return n.condition_=i.condition?i.condition:uo,n.delta_=i.delta?i.delta:1,n.duration_=void 0!==i.duration?i.duration:100,n}return Oo(e,t),e.prototype.handleEvent=function(t){var e=!1;if(t.type==kt||t.type==jt){var n=t.originalEvent,i=n.charCode;if(this.condition_(t)&&(i=="+".charCodeAt(0)||i=="-".charCodeAt(0))){var r=t.map,o=i=="+".charCodeAt(0)?this.delta_:-this.delta_;qr(r.getView(),o,void 0,this.duration_),n.preventDefault(),e=!0}}return!e},e}(Jr),Po=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 r=this.points_[e]-this.points_[n],o=this.points_[e+1]-this.points_[n+1];return this.angle_=Math.atan2(o,r),this.initialVelocity_=Math.sqrt(r*r+o*o)/i,this.initialVelocity_>this.minVelocity_},t.prototype.getDistance=function(){return(this.minVelocity_-this.initialVelocity_)/this.decay_},t.prototype.getAngle=function(){return this.angle_},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])},t(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)}}(),Lo="trackpad";const Fo=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 r=i.condition?i.condition:so;return n.condition_=i.onFocusOnly?io(oo,r):r,n.lastAnchor_=null,n.startTime_=void 0,n.timeoutId_,n.mode_=void 0,n.trackpadEventGap_=400,n.trackpadTimeoutId_,n.deltaPerZoom_=300,n}return Mo(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!==zt)return!0;var e,n=t.map,i=t.originalEvent;if(i.preventDefault(),this.useAnchor_&&(this.lastAnchor_=t.coordinate),t.type==zt&&(e=i.deltaY,_&&i.deltaMode===WheelEvent.DOM_DELTA_PIXEL&&(e/=v),i.deltaMode===WheelEvent.DOM_DELTA_LINE&&(e*=40)),0===e)return!1;this.lastDelta_=e;var r=Date.now();void 0===this.startTime_&&(this.startTime_=r),(!this.mode_||r-this.startTime_>this.trackpadEventGap_)&&(this.mode_=Math.abs(e)<4?Lo:"wheel");var o=n.getView();if(this.mode_===Lo&&!o.getConstrainResolution()&&!this.constrainResolution_)return this.trackpadTimeoutId_?clearTimeout(this.trackpadTimeoutId_):(o.getAnimating()&&o.cancelAnimations(),o.beginInteraction()),this.trackpadTimeoutId_=setTimeout(this.endInteraction_.bind(this),this.timeout_),o.adjustZoom(-e/this.deltaPerZoom_,this.lastAnchor_),this.startTime_=r,!1;this.totalDelta_+=e;var s=Math.max(this.timeout_-(r-this.startTime_),0);return clearTimeout(this.timeoutId_),this.timeoutId_=setTimeout(this.handleWheelZoom_.bind(this,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),qr(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}(Jr);var Ao=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])},t(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)}}();const Do=function(t){function e(e){var n=this,i=e||{},r=i;return r.stopDown||(r.stopDown=l),(n=t.call(this,r)||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 Ao(e,t),e.prototype.handleDragEvent=function(t){var e=0,n=this.targetPointers[0],i=this.targetPointers[1],r=Math.atan2(i.clientY-n.clientY,i.clientX-n.clientX);if(void 0!==this.lastAngle_){var o=r-this.lastAngle_;this.rotationDelta_+=o,!this.rotating_&&Math.abs(this.rotationDelta_)>this.threshold_&&(this.rotating_=!0),e=o}this.lastAngle_=r;var s=t.map,a=s.getView();if(a.getConstraints().rotation!==Ai){var l=s.getViewport().getBoundingClientRect(),h=eo(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}(no);var ko=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])},t(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)}}();const jo=function(t){function e(e){var n=this,i=e||{},r=i;return r.stopDown||(r.stopDown=l),(n=t.call(this,r)||this).anchor_=null,n.duration_=void 0!==i.duration?i.duration:400,n.lastDistance_=void 0,n.lastScaleDelta_=1,n}return ko(e,t),e.prototype.handleDragEvent=function(t){var e=1,n=this.targetPointers[0],i=this.targetPointers[1],r=n.clientX-i.clientX,o=n.clientY-i.clientY,s=Math.sqrt(r*r+o*o);void 0!==this.lastDistance_&&(e=this.lastDistance_/s),this.lastDistance_=s;var a=t.map,l=a.getView();1!=e&&(this.lastScaleDelta_=e);var h=a.getViewport().getBoundingClientRect(),u=eo(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}(no);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])},t(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)}}(),zo=function(t){function e(e){return(e=Rt({},e)).controls||(e.controls=function(t){var e={},n=new rn;return(void 0===e.zoom||e.zoom)&&n.push(new Ur(e.zoomOptions)),(void 0===e.rotate||e.rotate)&&n.push(new Zr(e.rotateOptions)),(void 0===e.attribution||e.attribution)&&n.push(new Xr(e.attributionOptions)),n}()),e.interactions||(e.interactions=function(t){var e={onFocusOnly:!0}||{},n=new rn,i=new Po(-.005,.05,100);return(void 0===e.altShiftDragRotate||e.altShiftDragRotate)&&n.push(new yo),(void 0===e.doubleClickZoom||e.doubleClickZoom)&&n.push(new $r({delta:e.zoomDelta,duration:e.zoomDuration})),(void 0===e.dragPan||e.dragPan)&&n.push(new _o({onFocusOnly:e.onFocusOnly,kinetic:i})),(void 0===e.pinchRotate||e.pinchRotate)&&n.push(new Do),(void 0===e.pinchZoom||e.pinchZoom)&&n.push(new jo({duration:e.zoomDuration})),(void 0===e.keyboard||e.keyboard)&&(n.push(new Ro),n.push(new Io({delta:e.zoomDelta,duration:e.zoomDuration}))),(void 0===e.mouseWheelZoom||e.mouseWheelZoom)&&n.push(new Fo({onFocusOnly:e.onFocusOnly,duration:e.zoomDuration})),(void 0===e.shiftDragZoom||e.shiftDragZoom)&&n.push(new To({duration:e.zoomDuration})),n}()),t.call(this,e)||this}return Go(e,t),e.prototype.createRenderer=function(){return new Je(this)},e}(Gr);const Wo=zo;var No=n(2582);const Xo=function(){function t(t){this.rbush_=new No(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_[p(e)]=n},t.prototype.load=function(t,e){for(var n=new Array(e.length),i=0,r=e.length;i<r;i++){var o=t[i],s=e[i],a={minX:o[0],minY:o[1],maxX:o[2],maxY:o[3],value:s};n[i]=a,this.items_[p(s)]=a}this.rbush_.load(n)},t.prototype.remove=function(t){var e=p(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_[p(e)];N([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,r=t.length;i<r;i++)if(n=e(t[i]))return n;return n},t.prototype.isEmpty=function(){return Pt(this.items_)},t.prototype.clear=function(){this.rbush_.clear(),this.items_={}},t.prototype.getExtent=function(t){var e=this.rbush_.toJSON();return z(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}();var Yo=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])},t(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 Ko(t){return t?Array.isArray(t)?function(e){return t}:"function"==typeof t?t:function(e){return[t]}:null}const Zo=function(t){function e(e){var n=t.call(this)||this;n.projection=hi(e.projection),n.attributions_=Ko(e.attributions),n.attributionsCollapsible_=void 0===e.attributionsCollapsible||e.attributionsCollapsible,n.loading=!1,n.state_=void 0!==e.state?e.state:he,n.wrapX_=void 0!==e.wrapX&&e.wrapX,n.interpolate_=!!e.interpolate,n.viewResolver=null,n.viewRejector=null;var i=n;return n.viewPromise_=new Promise((function(t,e){i.viewResolver=t,i.viewRejector=e})),n}return Yo(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 u()},e.prototype.getView=function(){return this.viewPromise_},e.prototype.getState=function(){return this.state_},e.prototype.getWrapX=function(){return this.wrapX_},e.prototype.getInterpolate=function(){return this.interpolate_},e.prototype.refresh=function(){this.changed()},e.prototype.setAttributions=function(t){this.attributions_=Ko(t),this.changed()},e.prototype.setState=function(t){this.state_=t,this.changed()},e}(Vt),Bo="addfeature",Uo="removefeature";function Vo(t,e){return[[-1/0,-1/0,1/0,1/0]]}const Ho="arraybuffer";function qo(t,e){return function(n,i,r,o,s){var a=this;!function(t,e,n,i,r,o,s){var a=new XMLHttpRequest;a.open("GET","function"==typeof t?t(n,i,r):t,!0),e.getType()==Ho&&(a.responseType="arraybuffer"),a.withCredentials=false,a.onload=function(t){if(!a.status||a.status>=200&&a.status<300){var i=e.getType(),l=void 0;"json"==i||"text"==i?l=a.responseText:"xml"==i?(l=a.responseXML)||(l=(new DOMParser).parseFromString(a.responseText,"application/xml")):i==Ho&&(l=a.response),l?o(e.readFeatures(l,{extent:n,featureProjection:r}),e.readProjection(l)):s()}else s()},a.onerror=s,a.send()}(t,e,n,i,r,(function(t,e){a.addFeatures(t),void 0!==o&&o(t)}),s||h)}}var Jo=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])},t(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){var r=t.call(this,e)||this;return r.feature=n,r.features=i,r}return Jo(e,t),e}(Tt);const $o=function(t){function e(e){var n=this,i=e||{};(n=t.call(this,{attributions:i.attributions,interpolate:!0,projection:void 0,state:he,wrapX:void 0===i.wrapX||i.wrapX})||this).on,n.once,n.un,n.loader_=h,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_&&(E(n.format_,7),n.loader_=qo(n.url_,n.format_)),n.strategy_=void 0!==i.strategy?i.strategy:Vo;var r,o,s=void 0===i.useSpatialIndex||i.useSpatialIndex;return n.featuresRtree_=s?new Xo:null,n.loadedExtentsRtree_=new Xo,n.loadingExtentsCount_=0,n.nullGeometryFeatures_={},n.idIndex_={},n.uidIndex_={},n.featureChangeKeys_={},n.featuresCollection_=null,Array.isArray(i.features)?o=i.features:i.features&&(o=(r=i.features).getArray()),s||void 0!==r||(r=new rn(o)),void 0!==o&&n.addFeaturesInternal(o),void 0!==r&&n.bindFeaturesCollection_(r),n}return Jo(e,t),e.prototype.addFeature=function(t){this.addFeatureInternal(t),this.changed()},e.prototype.addFeatureInternal=function(t){var e=p(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 Qo(Bo,t))}else this.featuresCollection_&&this.featuresCollection_.remove(t)},e.prototype.setupChangeEvents_=function(t,e){this.featureChangeKeys_[t]=[Wt(e,Ft,this.handleFeatureChange_,this),Wt(e,bt,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&&(E(!(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=[],r=0,o=t.length;r<o;r++){var s=p(l=t[r]);this.addToIndex_(s,l)&&n.push(l)}r=0;for(var a=n.length;r<a;r++){var l;s=p(l=n[r]),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}if(this.featuresRtree_&&this.featuresRtree_.load(e,i),this.hasListener(Bo)){r=0;for(var c=n.length;r<c;r++)this.dispatchEvent(new Qo(Bo,n[r]))}},e.prototype.bindFeaturesCollection_=function(t){var e=!1;this.addEventListener(Bo,(function(n){e||(e=!0,t.push(n.feature),e=!1)})),this.addEventListener(Uo,(function(n){e||(e=!0,t.remove(n.feature),e=!1)})),t.addEventListener(Qe,function(t){e||(e=!0,this.addFeature(t.element),e=!1)}.bind(this)),t.addEventListener($e,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(Xt);this.featuresCollection_||(this.featureChangeKeys_={},this.idIndex_={},this.uidIndex_={})}else if(this.featuresRtree_){var n=function(t){this.removeFeatureInternal(t)}.bind(this);for(var i in this.featuresRtree_.forEach(n),this.nullGeometryFeatures_)this.removeFeatureInternal(this.nullGeometryFeatures_[i])}this.featuresCollection_&&this.featuresCollection_.clear(),this.featuresRtree_&&this.featuresRtree_.clear(),this.nullGeometryFeatures_={};var r=new Qo("clear");this.dispatchEvent(r),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(),Pt(this.nullGeometryFeatures_)||o(t,It(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],r=null,o=[NaN,NaN],s=1/0,l=[-1/0,-1/0,1/0,1/0],h=e||a;return this.featuresRtree_.forEachInExtent(l,(function(t){if(h(t)){var e=t.getGeometry(),a=s;if((s=e.closestPointXY(n,i,o,s))<a){r=t;var u=Math.sqrt(s);l[0]=n-u,l[1]=i-u,l[2]=n+u,l[3]=i+u}}})),r},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=p(e),i=e.getGeometry();if(i){var r=i.getExtent();n in this.nullGeometryFeatures_?(delete this.nullGeometryFeatures_[n],this.featuresRtree_&&this.featuresRtree_.insert(r,e)):this.featuresRtree_&&this.featuresRtree_.update(r,e)}else n in this.nullGeometryFeatures_||(this.featuresRtree_&&this.featuresRtree_.remove(e),this.nullGeometryFeatures_[n]=e);var o=e.getId();if(void 0!==o){var s=o.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 Qo("changefeature",e))},e.prototype.hasFeature=function(t){var e=t.getId();return void 0!==e?e in this.idIndex_:p(t)in this.uidIndex_},e.prototype.isEmpty=function(){return this.featuresRtree_?this.featuresRtree_.isEmpty()&&Pt(this.nullGeometryFeatures_):!this.featuresCollection_||0===this.featuresCollection_.getLength()},e.prototype.loadFeatures=function(t,e,n){for(var i=this.loadedExtentsRtree_,r=this.strategy_(t,e,n),o=function(t,o){var a=r[t];i.forEachInExtent(a,(function(t){return k(t.extent,a)}))||(++s.loadingExtentsCount_,s.dispatchEvent(new Qo("featuresloadstart")),s.loader_.call(s,a,e,n,function(t){--this.loadingExtentsCount_,this.dispatchEvent(new Qo("featuresloadend",void 0,t))}.bind(s),function(){--this.loadingExtentsCount_,this.dispatchEvent(new Qo("featuresloaderror"))}.bind(s)),i.insert(a,{extent:a.slice()}))},s=this,a=0,l=r.length;a<l;++a)o(a);this.loading=!(this.loader_.length<4)&&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(N(n.extent,t))return e=n,!0})),e&&n.remove(e)},e.prototype.removeFeature=function(t){if(t){var e=p(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=p(t),n=this.featureChangeKeys_[e];if(n){n.forEach(Xt),delete this.featureChangeKeys_[e];var i=t.getId();return void 0!==i&&delete this.idIndex_[i.toString()],delete this.uidIndex_[e],this.dispatchEvent(new Qo(Uo,t)),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){E(this.format_,7),this.url_=t,this.setLoader(qo(t,this.format_))},e}(Zo);var ts=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])},t(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)}}();const es=function(t){function e(e,n,i){var r=t.call(this)||this,o=i||{};return r.tileCoord=e,r.state=n,r.interimTile=null,r.key="",r.transition_=void 0===o.transition?250:o.transition,r.transitionStarts_={},r.interpolate=!!o.interpolate,r}return ts(e,t),e.prototype.changed=function(){this.dispatchEvent(Ft)},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(2==t.getState())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(2==t.getState()){t.interimTile=null;break}1==t.getState()?e=t:0==t.getState()?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(3!==this.state&&this.state>t)throw new Error("Tile load sequence violation");this.state=t,this.changed()},e.prototype.load=function(){u()},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:ki(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}(Lt);var ns=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])},t(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)}}();const is=function(t){function e(e,n,i,r){var o=t.call(this)||this;return o.extent=e,o.pixelRatio_=i,o.resolution=n,o.state=r,o}return ns(e,t),e.prototype.changed=function(){this.dispatchEvent(Ft)},e.prototype.getExtent=function(){return this.extent},e.prototype.getImage=function(){return u()},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(){u()},e}(Lt);var rs=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])},t(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 os(t,e,n){var i=t,r=!0,o=!1,s=!1,a=[Nt(i,"load",(function(){s=!0,o||e()}))];return i.src&&x?(o=!0,i.decode().then((function(){r&&e()})).catch((function(t){r&&(s?e():n())}))):a.push(Nt(i,"error",n)),function(){r=!1,a.forEach(Xt)}}!function(t){function e(e,n,i,r,o,s){var a=t.call(this,e,n,i,0)||this;return a.src_=r,a.image_=new Image,null!==o&&(a.image_.crossOrigin=o),a.unlisten_=null,a.state=0,a.imageLoadFunction_=s,a}rs(e,t),e.prototype.getImage=function(){return this.image_},e.prototype.handleImageError_=function(){this.state=3,this.unlistenImage_(),this.changed()},e.prototype.handleImageLoad_=function(){void 0===this.resolution&&(this.resolution=Q(this.extent)/this.image_.height),this.state=2,this.unlistenImage_(),this.changed()},e.prototype.load=function(){0!=this.state&&3!=this.state||(this.state=1,this.changed(),this.imageLoadFunction_(this,this.src_),this.unlisten_=os(this.image_,this.handleImageLoad_.bind(this),this.handleImageError_.bind(this)))},e.prototype.setImage=function(t){this.image_=t,this.resolution=Q(this.extent)/this.image_.height},e.prototype.unlistenImage_=function(){this.unlisten_&&(this.unlisten_(),this.unlisten_=null)}}(is);var ss=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])},t(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)}}();const as=function(t){function e(e,n,i,r,o,s){var a=t.call(this,e,n,s)||this;return a.crossOrigin_=r,a.src_=i,a.key=i,a.image_=new Image,null!==r&&(a.image_.crossOrigin=r),a.unlisten_=null,a.tileLoadFunction_=o,a}return ss(e,t),e.prototype.getImage=function(){return this.image_},e.prototype.setImage=function(t){this.image_=t,this.state=2,this.unlistenImage_(),this.changed()},e.prototype.handleImageError_=function(){var t;this.state=3,this.unlistenImage_(),this.image_=((t=Oe(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=2:this.state=4,this.unlistenImage_(),this.changed()},e.prototype.load=function(){3==this.state&&(this.state=0,this.image_=new Image,null!==this.crossOrigin_&&(this.image_.crossOrigin=this.crossOrigin_)),0==this.state&&(this.state=1,this.changed(),this.tileLoadFunction_(this,this.src_),this.unlisten_=os(this.image_,this.handleImageLoad_.bind(this),this.handleImageError_.bind(this)))},e.prototype.unlistenImage_=function(){this.unlisten_&&(this.unlisten_(),this.unlisten_=null)},e}(es),ls=function(){function t(t,e,n,i,r,o){this.sourceProj_=t,this.targetProj_=e;var s={},a=gi(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_=r*r,this.triangles_=[],this.wrapsXInSource_=!1,this.canWrapXInSource_=this.sourceProj_.canWrapX()&&!!i&&!!this.sourceProj_.getExtent()&&nt(i)==nt(this.sourceProj_.getExtent()),this.sourceWorldWidth_=this.sourceProj_.getExtent()?nt(this.sourceProj_.getExtent()):null,this.targetWorldWidth_=this.targetProj_.getExtent()?nt(this.targetProj_.getExtent()):null;var l=tt(n),h=et(n),u=V(n),c=U(n),p=this.transformInv_(l),f=this.transformInv_(h),d=this.transformInv_(u),_=this.transformInv_(c),g=10+(o?Math.max(0,Math.ceil(at(B(n)/(o*o*256*256)))):0);if(this.addQuad_(l,h,u,c,p,f,d,_,g),this.wrapsXInSource_){var y=1/0;this.triangles_.forEach((function(t,e,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,r,o){this.triangles_.push({source:[i,r,o],target:[t,e,n]})},t.prototype.addQuad_=function(t,e,n,i,r,o,s,a,l){var h=M([r,o,s,a]),u=this.sourceWorldWidth_?nt(h)/this.sourceWorldWidth_:null,c=this.sourceWorldWidth_,p=this.sourceProj_.canWrapX()&&u>.5&&u<1,f=!1;if(l>0&&(this.targetProj_.isGlobal()&&this.targetWorldWidth_&&(f=nt(M([t,e,n,i]))/this.targetWorldWidth_>.25||f),!p&&this.sourceProj_.isGlobal()&&u&&(f=u>.25||f)),!(!f&&this.maxSourceExtent_&&isFinite(h[0])&&isFinite(h[1])&&isFinite(h[2])&&isFinite(h[3]))||it(h,this.maxSourceExtent_)){var d=0;if(!(f||isFinite(r[0])&&isFinite(r[1])&&isFinite(o[0])&&isFinite(o[1])&&isFinite(s[0])&&isFinite(s[1])&&isFinite(a[0])&&isFinite(a[1])))if(l>0)f=!0;else if(1!=(d=(isFinite(r[0])&&isFinite(r[1])?0:8)+(isFinite(o[0])&&isFinite(o[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;y=p?(ct(r[0],c)+ct(s[0],c))/2-ct(g[0],c):(r[0]+s[0])/2-g[0];var v=(r[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),w=[(i[0]+t[0])/2,(i[1]+t[1])/2],S=this.transformInv_(w);this.addQuad_(t,e,m,w,r,o,x,S,l-1),this.addQuad_(w,m,n,i,S,x,s,a,l-1)}else{var C=[(t[0]+e[0])/2,(t[1]+e[1])/2],E=this.transformInv_(C),T=[(n[0]+i[0])/2,(n[1]+i[1])/2],b=this.transformInv_(T);this.addQuad_(t,C,T,i,r,E,b,a,l-1),this.addQuad_(C,e,n,T,E,o,s,b,l-1)}return}}if(p){if(!this.canWrapXInSource_)return;this.wrapsXInSource_=!0}0==(11&d)&&this.addTriangle_(t,n,i,r,s,a),0==(14&d)&&this.addTriangle_(t,n,e,r,s,o),d&&(0==(13&d)&&this.addTriangle_(e,i,t,o,a,r),0==(7&d)&&this.addTriangle_(e,i,n,o,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 r=e.source;X(t,r[0]),X(t,r[1]),X(t,r[2])})),t},t.prototype.getTriangles=function(){return this.triangles_},t}();var hs,us={imageSmoothingEnabled:!1,msImageSmoothingEnabled:!1},cs={imageSmoothingEnabled:!0,msImageSmoothingEnabled:!0};function ps(t,e,n,i,r){t.beginPath(),t.moveTo(0,0),t.lineTo(e,n),t.lineTo(i,r),t.closePath(),t.save(),t.clip(),t.fillRect(0,0,Math.max(e,i)+1,Math.max(n,r)),t.restore()}function fs(t,e){return Math.abs(t[4*e]-210)>2||Math.abs(t[4*e+3]-191.25)>2}function ds(t,e,n,i){var r=yi(n,e,t),o=ui(e,i,n),s=e.getMetersPerUnit();void 0!==s&&(o*=s);var a=t.getMetersPerUnit();void 0!==a&&(o/=a);var l=t.getExtent();if(!l||D(l,r)){var h=ui(t,o,r)/o;isFinite(h)&&h>0&&(o/=h)}return o}var _s=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])},t(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)}}();const gs=function(t){function e(e,n,i,r,o,s,a,l,h,u,c,p){var f=t.call(this,o,0,{interpolate:!!p})||this;f.renderEdges_=void 0!==c&&c,f.pixelRatio_=a,f.gutter_=l,f.canvas_=null,f.sourceTileGrid_=n,f.targetTileGrid_=r,f.wrappedTileCoord_=s||o,f.sourceTiles_=[],f.sourcesListenerKeys_=null,f.sourceZ_=0;var d=r.getTileCoordExtent(f.wrappedTileCoord_),_=f.targetTileGrid_.getExtent(),g=f.sourceTileGrid_.getExtent(),y=_?$(d,_):d;if(0===B(y))return f.state=4,f;var v=e.getExtent();v&&(g=g?$(g,v):v);var m=r.getResolution(f.wrappedTileCoord_[0]),x=function(t,e,n,i){var r=H(n),o=ds(t,e,r,i);return(!isFinite(o)||o<=0)&&Z(n,(function(n){return o=ds(t,e,n,i),isFinite(o)&&o>0})),o}(e,i,y,m);if(!isFinite(x)||x<=0)return f.state=4,f;var w=void 0!==u?u:.5;if(f.triangulation_=new ls(e,i,y,g,x*w,m),0===f.triangulation_.getTriangles().length)return f.state=4,f;f.sourceZ_=n.getZForResolution(x);var S=f.triangulation_.calculateSourceExtent();if(g&&(e.canWrapX()?(S[1]=ot(S[1],g[1],g[3]),S[3]=ot(S[3],g[1],g[3])):S=$(S,g)),B(S)){for(var C=n.getTileRangeForExtentAndZ(S,f.sourceZ_),E=C.minX;E<=C.maxX;E++)for(var T=C.minY;T<=C.maxY;T++){var b=h(f.sourceZ_,E,T,a);b&&f.sourceTiles_.push(b)}0===f.sourceTiles_.length&&(f.state=4)}else f.state=4;return f}return _s(e,t),e.prototype.getImage=function(){return this.canvas_},e.prototype.reproject_=function(){var t=[];if(this.sourceTiles_.forEach(function(e,n,i){e&&2==e.getState()&&t.push({extent:this.sourceTileGrid_.getTileCoordExtent(e.tileCoord),image:e.getImage()})}.bind(this)),this.sourceTiles_.length=0,0===t.length)this.state=3;else{var e=this.wrappedTileCoord_[0],n=this.targetTileGrid_.getTileSize(e),i="number"==typeof n?n:n[0],r="number"==typeof n?n:n[1],o=this.targetTileGrid_.getResolution(e),s=this.sourceTileGrid_.getResolution(this.sourceZ_),a=this.targetTileGrid_.getTileCoordExtent(this.wrappedTileCoord_);this.canvas_=function(t,e,n,i,r,o,s,a,l,h,u,c){var p=Oe(Math.round(n*t),Math.round(n*e));if(c||Rt(p,us),0===l.length)return p.canvas;function f(t){return Math.round(t*n)/n}p.scale(n,n),p.globalCompositeOperation="lighter";var d=[1/0,1/0,-1/0,-1/0];l.forEach((function(t,e,n){var i,r;i=d,(r=t.extent)[0]<i[0]&&(i[0]=r[0]),r[2]>i[2]&&(i[2]=r[2]),r[1]<i[1]&&(i[1]=r[1]),r[3]>i[3]&&(i[3]=r[3])}));var _=nt(d),g=Q(d),y=Oe(Math.round(n*_/i),Math.round(n*g/i));c||Rt(y,us);var v=n/i;l.forEach((function(t,e,n){var i=t.extent[0]-d[0],r=-(t.extent[3]-d[3]),o=nt(t.extent),s=Q(t.extent);t.image.width>0&&t.image.height>0&&y.drawImage(t.image,h,h,t.image.width-2*h,t.image.height-2*h,i*v,r*v,o*v,s*v)}));var m=tt(s);return a.getTriangles().forEach((function(t,e,r){var s=t.source,a=t.target,l=s[0][0],h=s[0][1],u=s[1][0],_=s[1][1],g=s[2][0],v=s[2][1],x=f((a[0][0]-m[0])/o),w=f(-(a[0][1]-m[1])/o),S=f((a[1][0]-m[0])/o),C=f(-(a[1][1]-m[1])/o),E=f((a[2][0]-m[0])/o),T=f(-(a[2][1]-m[1])/o),b=l,R=h;l=0,h=0;var O=function(t){for(var e=t.length,n=0;n<e;n++){for(var i=n,r=Math.abs(t[n][n]),o=n+1;o<e;o++){var s=Math.abs(t[o][n]);s>r&&(r=s,i=o)}if(0===r)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-=b,_-=R,0,0,S-x],[g-=b,v-=R,0,0,E-x],[0,0,u,_,C-w],[0,0,g,v,T-w]]);if(O){if(p.save(),p.beginPath(),function(){if(void 0===hs){var t=document.createElement("canvas").getContext("2d");t.globalCompositeOperation="lighter",t.fillStyle="rgba(210, 0, 0, 0.75)",ps(t,4,5,4,0),ps(t,4,5,0,5);var e=t.getImageData(0,0,3,3).data;hs=fs(e,0)||fs(e,4)||fs(e,8)}return hs}()||!c){p.moveTo(S,C);for(var I=x-S,P=w-C,M=0;M<4;M++)p.lineTo(S+f((M+1)*I/4),C+f(M*P/3)),3!=M&&p.lineTo(S+f((M+1)*I/4),C+f((M+1)*P/3));p.lineTo(E,T)}else p.moveTo(S,C),p.lineTo(x,w),p.lineTo(E,T);p.clip(),p.transform(O[0],O[2],O[1],O[3],x,w),p.translate(d[0]-b,d[3]-R),p.scale(i/n,-i/n),p.drawImage(y.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,r=(i[0][0]-m[0])/o,s=-(i[0][1]-m[1])/o,a=(i[1][0]-m[0])/o,l=-(i[1][1]-m[1])/o,h=(i[2][0]-m[0])/o,u=-(i[2][1]-m[1])/o;p.beginPath(),p.moveTo(a,l),p.lineTo(r,s),p.lineTo(h,u),p.closePath(),p.stroke()})),p.restore()),p.canvas}(i,r,this.pixelRatio_,s,this.sourceTileGrid_.getExtent(),o,a,this.triangulation_,t,this.gutter_,this.renderEdges_,this.interpolate),this.state=2}this.changed()},e.prototype.load=function(){if(0==this.state){this.state=1,this.changed();var t=0;this.sourcesListenerKeys_=[],this.sourceTiles_.forEach(function(e,n,i){var r=e.getState();if(0==r||1==r){t++;var o=Wt(e,Ft,(function(n){var i=e.getState();2!=i&&3!=i&&4!=i||(Xt(o),0==--t&&(this.unlistenSources_(),this.reproject_()))}),this);this.sourcesListenerKeys_.push(o)}}.bind(this)),0===t?setTimeout(this.reproject_.bind(this),0):this.sourceTiles_.forEach((function(t,e,n){0==t.getState()&&t.load()}))}},e.prototype.unlistenSources_=function(){this.sourcesListenerKeys_.forEach(Xt),this.sourcesListenerKeys_=null},e}(es),ys=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.expireCache=function(t){for(;this.canExpireCache();)this.pop()},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 E(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 E(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){E(!(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 vs(t,e,n,i){return void 0!==i?(i[0]=t,i[1]=e,i[2]=n,i):[t,e,n]}function ms(t,e,n){return t+"/"+e+"/"+n}function xs(t){return ms(t[0],t[1],t[2])}function ws(t){return(t[1]<<t[0])+t[2]}var Ss=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])},t(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)}}();const Cs=function(t){function e(){return null!==t&&t.apply(this,arguments)||this}return Ss(e,t),e.prototype.expireCache=function(t){for(;this.canExpireCache()&&!(this.peekLast().getKey()in t);)this.pop().release()},e.prototype.pruneExceptNewestZ=function(){if(0!==this.getCount()){var t=this.peekFirstKey().split("/").map(Number)[0];this.forEach(function(e){e.tileCoord[0]!==t&&(this.remove(xs(e.tileCoord)),e.release())}.bind(this))}},e}(ys);var Es=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 Ts(t,e,n,i,r){return void 0!==r?(r.minX=t,r.maxX=e,r.minY=n,r.maxY=i,r):new Es(t,e,n,i)}const bs=Es;var Rs=[0,0,0];const Os=function(){function t(t){var n,i,r;if(this.minZoom=void 0!==t.minZoom?t.minZoom:0,this.resolutions_=t.resolutions,E((n=this.resolutions_,!0,i=function(t,e){return e-t}||e,n.every((function(t,e){if(0===e)return!0;var r=i(n[e-1],t);return!(r>0||0===r)}))),17),!t.origins)for(var o=0,s=this.resolutions_.length-1;o<s;++o)if(r){if(this.resolutions_[o]/this.resolutions_[o+1]!==r){r=void 0;break}}else r=this.resolutions_[o]/this.resolutions_[o+1];this.zoomFactor_=r,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,E(this.origins_.length==this.resolutions_.length,20));var a=t.extent;void 0===a||this.origin_||this.origins_||(this.origin_=tt(a)),E(!this.origin_&&this.origins_||this.origin_&&!this.origins_,18),this.tileSizes_=null,void 0!==t.tileSizes&&(this.tileSizes_=t.tileSizes,E(this.tileSizes_.length==this.resolutions_.length,19)),this.tileSize_=void 0!==t.tileSize?t.tileSize:this.tileSizes_?null:256,E(!this.tileSize_&&this.tileSizes_||this.tileSize_&&!this.tileSizes_,22),this.extent_=void 0!==a?a: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 bs(Math.min(0,t[0]),Math.max(t[0]-1,-1),Math.min(0,t[1]),Math.max(t[1]-1,-1));if(a){var i=this.getTileRangeForExtentAndZ(a,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):a&&this.calculateTileRanges_(a)}return t.prototype.forEachTileCoord=function(t,e,n){for(var i=this.getTileRangeForExtentAndZ(t,e),r=i.minX,o=i.maxX;r<=o;++r)for(var s=i.minY,a=i.maxY;s<=a;++s)n([e,r,s])},t.prototype.forEachTileCoordParentTileRange=function(t,e,n,i){var r,o,s=null,a=t[0]-1;for(2===this.zoomFactor_?(r=t[1],o=t[2]):s=this.getTileCoordExtent(t,i);a>=this.minZoom;){if(e(a,2===this.zoomFactor_?Ts(r=Math.floor(r/2),r,o=Math.floor(o/2),o,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],r=2*t[2];return Ts(i,i+1,r,r+1,e)}var o=this.getTileCoordExtent(t,n||this.tmpExtent_);return this.getTileRangeForExtentAndZ(o,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],r=t[1],o=t[2];if(e===i)return Ts(r,o,r,o,n);if(this.zoomFactor_){var s=Math.pow(this.zoomFactor_,e-i),a=Math.floor(r*s),l=Math.floor(o*s);return e<i?Ts(a,a,l,l,n):Ts(a,Math.floor(s*(r+1))-1,l,Math.floor(s*(o+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),r=this.getResolution(t),o=Ar(this.getTileSize(t),this.tmpSize_),s=i[0]+e.minX*o[0]*r,a=i[0]+(e.maxX+1)*o[0]*r;return z(s,i[1]+e.minY*o[1]*r,a,i[1]+(e.maxY+1)*o[1]*r,n)},t.prototype.getTileRangeForExtentAndZ=function(t,e,n){var i=Rs;this.getTileCoordForXYAndZ_(t[0],t[3],e,!1,i);var r=i[1],o=i[2];return this.getTileCoordForXYAndZ_(t[2],t[1],e,!0,i),Ts(r,i[1],o,i[2],n)},t.prototype.getTileCoordCenter=function(t){var e=this.getOrigin(t[0]),n=this.getResolution(t[0]),i=Ar(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]),r=Ar(this.getTileSize(t[0]),this.tmpSize_),o=n[0]+t[1]*r[0]*i,s=n[1]-(t[2]+1)*r[1]*i;return z(o,s,o+r[0]*i,s+r[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,r){var o=this.getZForResolution(n),s=n/this.getResolution(o),a=this.getOrigin(o),l=Ar(this.getTileSize(o),this.tmpSize_),h=s*(t-a[0])/n/l[0],u=s*(a[1]-e)/n/l[1];return i?(h=_t(h,5)-1,u=_t(u,5)-1):(h=dt(h,5),u=dt(u,5)),vs(o,h,u,r)},t.prototype.getTileCoordForXYAndZ_=function(t,e,n,i,r){var o=this.getOrigin(n),s=this.getResolution(n),a=Ar(this.getTileSize(n),this.tmpSize_),l=(t-o[0])/s/a[0],h=(o[1]-e)/s/a[1];return i?(l=_t(l,5)-1,h=_t(h,5)-1):(l=dt(l,5),h=dt(h,5)),vs(n,l,h,r)},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(i(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 Is(t){var e=t.getDefaultTileGrid();return e||(e=function(t,e,n,i){return function(t,e,n,i){var r=Ps(t,undefined,n);return new Os({extent:t,origin:q(t,"top-left"),resolutions:r,tileSize:n})}(Ms(t),0,void 0)}(t),t.setDefaultTileGrid(e)),e}function Ps(t,e,n,i){for(var r=void 0!==e?e:42,o=Q(t),s=nt(t),a=Ar(void 0!==n?n:256),l=i>0?i:Math.max(s/a[0],o/a[1]),h=r+1,u=new Array(h),c=0;c<h;++c)u[c]=l/Math.pow(2,c);return u}function Ms(t){var e=(t=hi(t)).getExtent();if(!e){var n=180*jn[Gn.DEGREES]/t.getMetersPerUnit();e=z(-n,-n,n,n)}return e}var Ls=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])},t(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)}}(),Fs=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,interpolate:e.interpolate})||this;return 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,n.tileGrid&&Ar(n.tileGrid.getTileSize(n.tileGrid.getMinZoom()),[256,256]),n.tileCache=new Cs(e.cacheSize||0),n.tmpSize=[0,0],n.key_=e.key||"",n.tileOptions={transition:e.transition,interpolate:e.interpolate},n.zDirection=e.zDirection?e.zDirection:0,n}return Ls(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 r=this.getTileCacheForProjection(t);if(!r)return!1;for(var o,s,a,l=!0,h=n.minX;h<=n.maxX;++h)for(var u=n.minY;u<=n.maxY;++u)s=ms(e,h,u),a=!1,r.containsKey(s)&&(a=2===(o=r.get(s)).getState())&&(a=!1!==i(o)),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?this.tileGrid.getResolutions():null},e.prototype.getTile=function(t,e,n,i,r){return u()},e.prototype.getTileGrid=function(){return this.tileGrid},e.prototype.getTileGridForProjection=function(t){return this.tileGrid?this.tileGrid:Is(t)},e.prototype.getTileCacheForProjection=function(t){return E(di(this.getProjection(),t),68),this.tileCache},e.prototype.getTilePixelRatio=function(t){return this.tilePixelRatio_},e.prototype.getTilePixelSize=function(t,e,n){var i=this.getTileGridForProjection(n),r=this.getTilePixelRatio(e),o=Ar(i.getTileSize(t),this.tmpSize);return 1==r?o:Fr(o,r,this.tmpSize)},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],r=t.getTileCoordCenter(e),o=Ms(n);if(D(o,r))return e;var s=nt(o),a=Math.ceil((o[0]-r[0])/s);return r[0]+=s*a,t.getTileCoordForCoordAndZ(r,i)}(i,t,n)),function(t,e){var n=t[0],i=t[1],r=t[2];if(e.getMinZoom()>n||n>e.getMaxZoom())return!1;var o=e.getFullTileRange(n);return!o||o.containsXY(i,r)}(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}(Zo),As=function(t){function e(e,n){var i=t.call(this,e)||this;return i.tile=n,i}return Ls(e,t),e}(Tt);const Ds=Fs;function ks(t,e){var n=/\{z\}/g,i=/\{x\}/g,r=/\{y\}/g,o=/\{-y\}/g;return function(s,a,l){return s?t.replace(n,s[0].toString()).replace(i,s[1].toString()).replace(r,s[2].toString()).replace(o,(function(){var t=s[0],n=e.getFullTileRange(t);return E(n,55),(n.getHeight()-s[2]-1).toString()})):void 0}}var 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])},t(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)}}();const Gs=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,interpolate:n.interpolate,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 js(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=p(n),r=n.getState();1==r?(this.tileLoadingKeys_[i]=!0,e="tileloadstart"):i in this.tileLoadingKeys_&&(delete this.tileLoadingKeys_[i],e=3==r?"tileloaderror":2==r?"tileloadend":void 0),null!=e&&this.dispatchEvent(new As(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),r=n[2].charCodeAt(0),o=void 0;for(o=i;o<=r;++o)e.push(t.replace(n[0],String.fromCharCode(o)));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(function(t,e){for(var n=t.length,i=new Array(n),r=0;r<n;++r)i[r]=ks(t[r],e);return function(t){return 1===t.length?t[0]:function(e,n,i){if(e){var r=ct(ws(e),t.length);return t[r](e,n,i)}}}(i)}(t,this.tileGrid),e):this.setKey(e)},e.prototype.tileUrlFunction=function(t,e,n){},e.prototype.useTile=function(t,e,n){var i=ms(t,e,n);this.tileCache.containsKey(i)&&this.tileCache.get(i)},e}(Ds);var 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])},t(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=void 0===e.imageSmoothing||e.imageSmoothing;return void 0!==e.interpolate&&(i=e.interpolate),(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:Ns,tilePixelRatio:e.tilePixelRatio,tileUrlFunction:e.tileUrlFunction,url:e.url,urls:e.urls,wrapX:e.wrapX,transition:e.transition,interpolate:i,key:e.key,attributionsCollapsible:e.attributionsCollapsible,zDirection:e.zDirection})||this).crossOrigin=void 0!==e.crossOrigin?e.crossOrigin:null,n.tileClass=void 0!==e.tileClass?e.tileClass:as,n.tileCacheForProjection={},n.tileGridForProjection={},n.reprojectionErrorThreshold_=e.reprojectionErrorThreshold,n.renderReprojectionEdges_=!1,n}return zs(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 r=this.tileCacheForProjection[i];r.expireCache(r==n?e:{})}},e.prototype.getGutterForProjection=function(t){return this.getProjection()&&t&&!di(this.getProjection(),t)?0:this.getGutter()},e.prototype.getGutter=function(){return 0},e.prototype.getKey=function(){var e=t.prototype.getKey.call(this);return this.getInterpolate()||(e+=":disable-interpolation"),e},e.prototype.getOpaque=function(e){return!(this.getProjection()&&e&&!di(this.getProjection(),e))&&t.prototype.getOpaque.call(this,e)},e.prototype.getTileGridForProjection=function(t){var e=this.getProjection();if(!this.tileGrid||e&&!di(e,t)){var n=p(t);return n in this.tileGridForProjection||(this.tileGridForProjection[n]=Is(t)),this.tileGridForProjection[n]}return this.tileGrid},e.prototype.getTileCacheForProjection=function(t){var e=this.getProjection();if(!e||di(e,t))return this.tileCache;var n=p(t);return n in this.tileCacheForProjection||(this.tileCacheForProjection[n]=new Cs(this.tileCache.highWaterMark)),this.tileCacheForProjection[n]},e.prototype.createTile_=function(t,e,n,i,r,o){var s=[t,e,n],a=this.getTileCoordForTileUrlFunction(s,r),l=a?this.tileUrlFunction(a,i,r):void 0,h=new this.tileClass(s,void 0!==l?0:4,void 0!==l?l:"",this.crossOrigin,this.tileLoadFunction,this.tileOptions);return h.key=o,h.addEventListener(Ft,this.handleTileChange.bind(this)),h},e.prototype.getTile=function(t,e,n,i,r){var o=this.getProjection();if(o&&r&&!di(o,r)){var s=this.getTileCacheForProjection(r),a=[t,e,n],l=void 0,h=xs(a);s.containsKey(h)&&(l=s.get(h));var u=this.getKey();if(l&&l.key==u)return l;var c=this.getTileGridForProjection(o),p=this.getTileGridForProjection(r),f=this.getTileCoordForTileUrlFunction(a,r),d=new gs(o,c,r,p,a,f,this.getTilePixelRatio(i),this.getGutter(),function(t,e,n,i){return this.getTileInternal(t,e,n,i,o)}.bind(this),this.reprojectionErrorThreshold_,this.renderReprojectionEdges_,this.getInterpolate());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,o||r)},e.prototype.getTileInternal=function(t,e,n,i,r){var o=null,s=ms(t,e,n),a=this.getKey();if(this.tileCache.containsKey(s)){if((o=this.tileCache.get(s)).key!=a){var l=o;o=this.createTile_(t,e,n,i,r,a),0==l.getState()?o.interimTile=l.interimTile:o.interimTile=l,o.refreshInterimChain(),this.tileCache.replace(s,o)}}else o=this.createTile_(t,e,n,i,r,a),this.tileCache.set(s,o);return o},e.prototype.setRenderReprojectionEdges=function(t){if(this.renderReprojectionEdges_!=t){for(var e in this.renderReprojectionEdges_=t,this.tileCacheForProjection)this.tileCacheForProjection[e].clear();this.changed()}},e.prototype.setTileGridForProjection=function(t,e){var n=hi(t);if(n){var i=p(n);i in this.tileGridForProjection||(this.tileGridForProjection[i]=e)}},e}(Gs);function Ns(t,e){t.getImage().src=e}const Xs=Ws;var 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])},t(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)}}();const Ks=function(t){function e(e){var n=e||{},i=void 0===n.imageSmoothing||n.imageSmoothing;void 0!==n.interpolate&&(i=n.interpolate);var r=void 0!==n.projection?n.projection:"EPSG:3857",o=void 0!==n.tileGrid?n.tileGrid:function(t){var e=t||{},n=e.extent||hi("EPSG:3857").getExtent(),i={extent:n,minZoom:e.minZoom,tileSize:e.tileSize,resolutions:Ps(n,e.maxZoom,e.tileSize,e.maxResolution)};return new Os(i)}({extent:Ms(r),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,interpolate:i,opaque:n.opaque,projection:r,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 Ys(e,t),e}(Xs);var 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])},t(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)}}();const Bs=function(t){function e(e){var n,i=e||{},r=void 0===i.imageSmoothing||i.imageSmoothing;void 0!==i.interpolate&&(r=i.interpolate),n=void 0!==i.attributions?i.attributions:['&#169; <a href="https://www.openstreetmap.org/copyright" target="_blank">OpenStreetMap</a> contributors.'];var o=void 0!==i.crossOrigin?i.crossOrigin:"anonymous",s=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,interpolate:r,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:s,wrapX:i.wrapX,zDirection:i.zDirection})||this}return Zs(e,t),e}(Ks);var Us="1.3.0";function Vs(t,e){var n=[];Object.keys(e).forEach((function(t){null!==e[t]&&void 0!==e[t]&&n.push(t+"="+encodeURIComponent(e[t]))}));var i=n.join("&");return(t=-1===(t=t.replace(/[?&]$/,"")).indexOf("?")?t+"?":t+"&")+i}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])},t(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)}}();const qs=function(t){function e(e){var n=this,i=e||{},r=void 0===i.imageSmoothing||i.imageSmoothing;void 0!==i.interpolate&&(r=i.interpolate);var o=i.params||{},s=!("TRANSPARENT"in o)||o.TRANSPARENT;return(n=t.call(this,{attributions:i.attributions,attributionsCollapsible:i.attributionsCollapsible,cacheSize:i.cacheSize,crossOrigin:i.crossOrigin,interpolate:r,opaque:!s,projection:i.projection,reprojectionErrorThreshold:i.reprojectionErrorThreshold,tileClass:i.tileClass,tileGrid:i.tileGrid,tileLoadFunction:i.tileLoadFunction,url:i.url,urls:i.urls,wrapX:void 0===i.wrapX||i.wrapX,transition:i.transition,zDirection:i.zDirection})||this).gutter_=void 0!==i.gutter?i.gutter:0,n.params_=o,n.v13_=!0,n.serverType_=i.serverType,n.hidpi_=void 0===i.hidpi||i.hidpi,n.tmpExtent_=[1/0,1/0,-1/0,-1/0],n.updateV13_(),n.setKey(n.getKeyForParams_()),n}return Hs(e,t),e.prototype.getFeatureInfoUrl=function(t,e,n,i){var r=hi(n),o=this.getProjection(),s=this.getTileGrid();s||(s=this.getTileGridForProjection(r));var a=s.getZForResolution(e,this.zDirection),l=s.getTileCoordForCoordAndZ(t,a);if(!(s.getResolutions().length<=l[0])){var h=s.getResolution(l[0]),u=s.getTileCoordExtent(l,this.tmpExtent_),c=Ar(s.getTileSize(l[0]),this.tmpSize),p=this.gutter_;0!==p&&(c=Mr(c,p,this.tmpSize),u=L(u,h*p,u)),o&&o!==r&&(h=ds(o,r,t,h),u=vi(u,r,o),t=yi(t,r,o));var f={SERVICE:"WMS",VERSION:Us,REQUEST:"GetFeatureInfo",FORMAT:"image/png",TRANSPARENT:!0,QUERY_LAYERS:this.params_.LAYERS};Rt(f,this.params_,i);var d=Math.floor((t[0]-u[0])/h),_=Math.floor((u[3]-t[1])/h);return f[this.v13_?"I":"X"]=d,f[this.v13_?"J":"Y"]=_,this.getRequestUrl_(l,c,u,1,o||r,f)}},e.prototype.getLegendUrl=function(t,e){if(void 0!==this.urls[0]){var n={SERVICE:"WMS",VERSION:Us,REQUEST:"GetLegendGraphic",FORMAT:"image/png"};if(void 0===e||void 0===e.LAYER){var i=this.params_.LAYERS;if(Array.isArray(i)&&1!==i.length)return;n.LAYER=i}if(void 0!==t){var r=this.getProjection()?this.getProjection().getMetersPerUnit():1;n.SCALE=t*r/28e-5}return Rt(n,e),Vs(this.urls[0],n)}},e.prototype.getGutter=function(){return this.gutter_},e.prototype.getParams=function(){return this.params_},e.prototype.getRequestUrl_=function(t,e,n,i,r,o){var s=this.urls;if(s){if(o.WIDTH=e[0],o.HEIGHT=e[1],o[this.v13_?"CRS":"SRS"]=r.getCode(),"STYLES"in this.params_||(o.STYLES=""),1!=i)switch(this.serverType_){case"geoserver":var a=90*i+.5|0;"FORMAT_OPTIONS"in o?o.FORMAT_OPTIONS+=";dpi:"+a:o.FORMAT_OPTIONS="dpi:"+a;break;case"mapserver":o.MAP_RESOLUTION=90*i;break;case"carmentaserver":case"qgis":o.DPI=90*i;break;default:E(!1,52)}var l=r.getAxisOrientation(),h=n;if(this.v13_&&"ne"==l.substr(0,2)){var u=void 0;u=n[0],h[0]=n[1],h[1]=u,u=n[2],h[2]=n[3],h[3]=u}return o.BBOX=h.join(","),Vs(1==s.length?s[0]:s[ct(ws(t),s.length)],o)}},e.prototype.getTilePixelRatio=function(t){return this.hidpi_&&void 0!==this.serverType_?t:1},e.prototype.getKeyForParams_=function(){var t=0,e=[];for(var n in this.params_)e[t++]=n+"-"+this.params_[n];return e.join("/")},e.prototype.updateParams=function(t){Rt(this.params_,t),this.updateV13_(),this.setKey(this.getKeyForParams_())},e.prototype.updateV13_=function(){var t=this.params_.VERSION||Us;this.v13_=function(t,e){for(var n=(""+t).split("."),i="1.3".split("."),r=0;r<Math.max(n.length,i.length);r++){var o=parseInt(n[r]||"0",10),s=parseInt(i[r]||"0",10);if(o>s)return 1;if(s>o)return-1}return 0}(t)>=0},e.prototype.tileUrlFunction=function(t,e,n){var i=this.getTileGrid();if(i||(i=this.getTileGridForProjection(n)),!(i.getResolutions().length<=t[0])){1==e||this.hidpi_&&void 0!==this.serverType_||(e=1);var r=i.getResolution(t[0]),o=i.getTileCoordExtent(t,this.tmpExtent_),s=Ar(i.getTileSize(t[0]),this.tmpSize),a=this.gutter_;0!==a&&(s=Mr(s,a,this.tmpSize),o=L(o,r*a,o)),1!=e&&(s=Fr(s,e,this.tmpSize));var l={SERVICE:"WMS",VERSION:Us,REQUEST:"GetMap",FORMAT:"image/png",TRANSPARENT:!0};return Rt(l,this.params_),this.getRequestUrl_(t,s,o,e,n,l)}},e}(Xs);var 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])},t(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)}}(),Qs=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 r=e;n.setProperties(r)}return n}return Js(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_&&(Xt(this.geometryChangeKey_),this.geometryChangeKey_=null);var t=this.getGeometry();t&&(this.geometryChangeKey_=Wt(t,Ft,this.handleGeometryChange_,this)),this.changed()},e.prototype.setGeometry=function(t){this.set(this.geometryName_,t)},e.prototype.setStyle=function(t){var e,n;this.style_=t,this.styleFunction_=t?"function"==typeof(e=t)?e:(Array.isArray(e)?n=e:(E("function"==typeof e.getZIndex,41),n=[e]),function(){return n}):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}(Vt);const $s=Qs;const ta=function(){function t(t){this.opacity_=t.opacity,this.rotateWithView_=t.rotateWithView,this.rotation_=t.rotation,this.scale_=t.scale,this.scaleArray_=Ar(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 u()},t.prototype.getImage=function(t){return u()},t.prototype.getHitDetectionImage=function(){return u()},t.prototype.getPixelRatio=function(t){return 1},t.prototype.getImageState=function(){return u()},t.prototype.getImageSize=function(){return u()},t.prototype.getOrigin=function(){return u()},t.prototype.getSize=function(){return u()},t.prototype.setDisplacement=function(t){this.displacement_=t},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_=Ar(t)},t.prototype.listenImageChange=function(t){u()},t.prototype.load=function(){u()},t.prototype.unlistenImageChange=function(t){u()},t}();function ea(t){return Array.isArray(t)?St(t):t}var 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])},t(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)}}();const ia=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.size_=null,n.renderOptions_=null,n.render(),n}return na(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(){var t=this.size_;if(!t)return null;var e=this.getDisplacement();return[t[0]/2-e[0],t[1]/2+e[1]]},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=Oe(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 2},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_,r=void 0===this.radius2_?i:this.radius2_;if(i<r){var o=i;i=r,r=o}var s=void 0===this.radius2_?this.points_:2*this.points_,a=2*Math.PI/s,l=r*Math.sin(a),h=i-Math.sqrt(r*r-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=r-Math.sqrt(i*i-_*_),y=Math.sqrt(_*_+g*g)/_;if(y<=n){var v=y*e/2-r-i;return 2*Math.max(d,v)}return 2*d},e.prototype.createRenderOptions=function(){var t,e=De,n=0,i=null,r=0,o=0;this.stroke_&&(null===(t=this.stroke_.getColor())&&(t=ke),t=ea(t),void 0===(o=this.stroke_.getWidth())&&(o=1),i=this.stroke_.getLineDash(),r=this.stroke_.getLineDashOffset(),void 0===(e=this.stroke_.getLineJoin())&&(e=De),void 0===(n=this.stroke_.getMiterLimit())&&(n=10));var s=this.calculateLineJoinSize_(e,o,n),a=Math.max(this.radius_,this.radius2_||0);return{strokeStyle:t,strokeWidth:o,size:Math.ceil(2*a+s),lineDash:i,lineDashOffset:r,lineJoin:e,miterLimit:n}},e.prototype.render=function(){this.renderOptions_=this.createRenderOptions();var t=this.renderOptions_.size;this.canvas_={},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=Le),e.fillStyle=ea(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=xt(e)),null===e?n=1:Array.isArray(e)&&(n=4===e.length?e[3]:1),0===n){var i=Oe(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 r=this.angle_-Math.PI/2,o=2*Math.PI/e,s=0;s<e;s++){var a=r+s*o,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=Le,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}(ta);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])},t(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)}}();const oa=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 ra(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}(ia),sa=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}(),aa=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}();var la=function(){function t(t){var e=t||{};this.geometry_=null,this.geometryFunction_=ca,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.hitDetectionRenderer_=void 0!==e.hitDetectionRenderer?e.hitDetectionRenderer: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"==typeof 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.setHitDetectionRenderer=function(t){this.hitDetectionRenderer_=t},t.prototype.getHitDetectionRenderer=function(){return this.hitDetectionRenderer_},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_=ca,this.geometry_=t},t.prototype.setZIndex=function(t){this.zIndex_=t},t}(),ha=null;function ua(t,e){if(!ha){var n=new sa({color:"rgba(255,255,255,0.4)"}),i=new aa({color:"#3399CC",width:1.25});ha=[new la({image:new oa({fill:n,stroke:i,radius:5}),fill:n,stroke:i})]}return ha}function ca(t){return t.getGeometry()}const pa=la;var 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])},t(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="renderOrder";const _a=function(t){function e(e){var n=this,i=e||{},r=Rt({},i);return delete r.style,delete r.renderBuffer,delete r.updateWhileAnimating,delete r.updateWhileInteracting,(n=t.call(this,r)||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 fa(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(da)},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 No(9)),this.getRenderer().renderDeclutter(t)},e.prototype.setRenderOrder=function(t){this.set(da,t)},e.prototype.setStyle=function(t){this.style_=void 0!==t?t:ua,this.styleFunction_=null===t?void 0:function(t){var e,n;"function"==typeof t?e=t:(Array.isArray(t)?n=t:(E("function"==typeof t.getZIndex,41),n=[t]),e=function(){return n});return e}(this.style_),this.changed()},e}(pe);var ga={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},ya=[ga.FILL],va=[ga.STROKE],ma=[ga.BEGIN_PATH],xa=[ga.CLOSE_PATH];const wa=ga,Sa=function(){function t(){}return t.prototype.drawCustom=function(t,e,n,i){},t.prototype.drawGeometry=function(t){},t.prototype.setStyle=function(t){},t.prototype.drawCircle=function(t,e){},t.prototype.drawFeature=function(t,e){},t.prototype.drawGeometryCollection=function(t,e){},t.prototype.drawLineString=function(t,e){},t.prototype.drawMultiLineString=function(t,e){},t.prototype.drawMultiPoint=function(t,e){},t.prototype.drawMultiPolygon=function(t,e){},t.prototype.drawPoint=function(t,e){},t.prototype.drawPolygon=function(t,e){},t.prototype.drawText=function(t,e){},t.prototype.setFillStrokeStyle=function(t,e){},t.prototype.setImageStyle=function(t,e){},t.prototype.setTextStyle=function(t,e){},t}();var 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])},t(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)}}(),Ea=function(t){function e(e,n,i,r){var o=t.call(this)||this;return o.tolerance=e,o.maxExtent=n,o.pixelRatio=r,o.maxLineWidth=0,o.resolution=i,o.beginGeometryInstruction1_=null,o.beginGeometryInstruction2_=null,o.bufferedMaxExtent_=null,o.instructions=[],o.coordinates=[],o.tmpCoordinate_=[],o.hitDetectionInstructions=[],o.state={},o}return Ca(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_,r=this.coordinates,o=r.length,s=0,a=t.length;s<a;s+=e)i[0]=t[s],i[1]=t[s+1],D(n,i)&&(r[o++]=i[0],r[o++]=i[1]);return o},e.prototype.appendFlatLineCoordinates=function(t,e,n,i,r,o){var s=this.coordinates,a=s.length,l=this.getBufferedMaxExtent();o&&(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=G(l,d))!==u?(_&&(s[a++]=p,s[a++]=f,_=!1),s[a++]=d[0],s[a++]=d[1]):1===c?(s[a++]=d[0],s[a++]=d[1],_=!1):_=!0,p=d[0],f=d[1],u=c;return(r&&_||h===e+i)&&(s[a++]=p,s[a++]=f),a},e.prototype.drawCustomCoordinates_=function(t,e,n,i,r){for(var o=0,s=n.length;o<s;++o){var a=n[o],l=this.appendFlatLineCoordinates(t,e,a,i,!1,!1);r.push(l),e=a}return e},e.prototype.drawCustom=function(t,e,n,i){this.beginGeometry(t,e);var r,o,s,a,l,h=t.getType(),u=t.getStride(),c=this.coordinates.length;switch(h){case Fn:r=t.getOrientedFlatCoordinates(),a=[];var p=t.getEndss();l=0;for(var f=0,d=p.length;f<d;++f){var _=[];l=this.drawCustomCoordinates_(r,l,p[f],u,_),a.push(_)}this.instructions.push([wa.CUSTOM,c,a,t,n,sr]),this.hitDetectionInstructions.push([wa.CUSTOM,c,a,t,i||n,sr]);break;case Pn:case Ln:s=[],r=h==Pn?t.getOrientedFlatCoordinates():t.getFlatCoordinates(),l=this.drawCustomCoordinates_(r,0,t.getEnds(),u,s),this.instructions.push([wa.CUSTOM,c,s,t,n,or]),this.hitDetectionInstructions.push([wa.CUSTOM,c,s,t,i||n,or]);break;case In:case Dn:r=t.getFlatCoordinates(),o=this.appendFlatLineCoordinates(r,0,r.length,u,!1,!1),this.instructions.push([wa.CUSTOM,c,o,t,n,rr]),this.hitDetectionInstructions.push([wa.CUSTOM,c,o,t,i||n,rr]);break;case Mn:r=t.getFlatCoordinates(),(o=this.appendFlatPointCoordinates(r,u))>c&&(this.instructions.push([wa.CUSTOM,c,o,t,n,rr]),this.hitDetectionInstructions.push([wa.CUSTOM,c,o,t,i||n,rr]));break;case On:r=t.getFlatCoordinates(),this.coordinates.push(r[0],r[1]),o=this.coordinates.length,this.instructions.push([wa.CUSTOM,c,o,t,n]),this.hitDetectionInstructions.push([wa.CUSTOM,c,o,t,i||n])}this.endGeometry(e)},e.prototype.beginGeometry=function(t,e){this.beginGeometryInstruction1_=[wa.BEGIN_GEOMETRY,e,0,t],this.instructions.push(this.beginGeometryInstruction1_),this.beginGeometryInstruction2_=[wa.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,s=-1;for(t=0;t<o;++t)(i=(n=e[t])[0])==wa.END_GEOMETRY?s=t:i==wa.BEGIN_GEOMETRY&&(n[2]=t,r(this.hitDetectionInstructions,s,t),s=-1)},e.prototype.setFillStrokeStyle=function(t,e){var n=this.state;if(t){var i=t.getColor();n.fillStyle=ea(i||Le)}else n.fillStyle=void 0;if(e){var r=e.getColor();n.strokeStyle=ea(r||ke);var o=e.getLineCap();n.lineCap=void 0!==o?o:Fe;var s=e.getLineDash();n.lineDash=s?s.slice():Ae;var a=e.getLineDashOffset();n.lineDashOffset=a||0;var l=e.getLineJoin();n.lineJoin=void 0!==l?l:De;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=[wa.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[wa.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,r=t.lineDash,o=t.lineDashOffset,a=t.lineJoin,l=t.lineWidth,h=t.miterLimit;(t.currentStrokeStyle!=n||t.currentLineCap!=i||r!=t.currentLineDash&&!s(t.currentLineDash,r)||t.currentLineDashOffset!=o||t.currentLineJoin!=a||t.currentLineWidth!=l||t.currentMiterLimit!=h)&&(void 0!==n&&e.call(this,t),t.currentStrokeStyle=n,t.currentLineCap=i,t.currentLineDash=r,t.currentLineDashOffset=o,t.currentLineJoin=a,t.currentLineWidth=l,t.currentMiterLimit=h)},e.prototype.endGeometry=function(t){this.beginGeometryInstruction1_[2]=this.instructions.length,this.beginGeometryInstruction1_=null,this.beginGeometryInstruction2_[2]=this.hitDetectionInstructions.length,this.beginGeometryInstruction2_=null;var e=[wa.END_GEOMETRY,t];this.instructions.push(e),this.hitDetectionInstructions.push(e)},e.prototype.getBufferedMaxExtent=function(){if(!this.bufferedMaxExtent_&&(this.bufferedMaxExtent_=F(this.maxExtent),this.maxLineWidth>0)){var t=this.resolution*(this.maxLineWidth+1)/2;L(this.bufferedMaxExtent_,t,this.bufferedMaxExtent_)}return this.bufferedMaxExtent_},e}(Sa);const Ta=Ea;var ba=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])},t(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)}}();const Ra=function(t){function e(e,n,i,r){var o=t.call(this,e,n,i,r)||this;return o.hitDetectionImage_=null,o.image_=null,o.imagePixelRatio_=void 0,o.anchorX_=void 0,o.anchorY_=void 0,o.height_=void 0,o.opacity_=void 0,o.originX_=void 0,o.originY_=void 0,o.rotateWithView_=void 0,o.rotation_=void 0,o.scale_=void 0,o.width_=void 0,o.declutterImageWithText_=void 0,o}return ba(e,t),e.prototype.drawPoint=function(t,e){if(this.image_){this.beginGeometry(t,e);var n=t.getFlatCoordinates(),i=t.getStride(),r=this.coordinates.length,o=this.appendFlatPointCoordinates(n,i);this.instructions.push([wa.DRAW_IMAGE,r,o,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([wa.DRAW_IMAGE,r,o,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(),r=this.coordinates.length,o=this.appendFlatPointCoordinates(n,i);this.instructions.push([wa.DRAW_IMAGE,r,o,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([wa.DRAW_IMAGE,r,o,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(),r=t.getHitDetectionImage(),o=t.getImage(this.pixelRatio),s=t.getOrigin();this.imagePixelRatio_=t.getPixelRatio(this.pixelRatio),this.anchorX_=n[0],this.anchorY_=n[1],this.hitDetectionImage_=r,this.image_=o,this.height_=i[1],this.opacity_=t.getOpacity(),this.originX_=s[0]*this.imagePixelRatio_,this.originY_=s[1]*this.imagePixelRatio_,this.rotateWithView_=t.getRotateWithView(),this.rotation_=t.getRotation(),this.scale_=t.getScaleArray(),this.width_=i[0],this.declutterImageWithText_=e},e}(Ta);var 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])},t(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)}}();const Ia=function(t){function e(e,n,i,r){return t.call(this,e,n,i,r)||this}return Oa(e,t),e.prototype.drawFlatCoordinates_=function(t,e,n,i){var r=this.coordinates.length,o=this.appendFlatLineCoordinates(t,e,n,i,!1,!1),s=[wa.MOVE_TO_LINE_TO,r,o];return this.instructions.push(s),this.hitDetectionInstructions.push(s),n},e.prototype.drawLineString=function(t,e){var n=this.state,i=n.strokeStyle,r=n.lineWidth;if(void 0!==i&&void 0!==r){this.updateStrokeStyle(n,this.applyStroke),this.beginGeometry(t,e),this.hitDetectionInstructions.push([wa.SET_STROKE_STYLE,n.strokeStyle,n.lineWidth,n.lineCap,n.lineJoin,n.miterLimit,Ae,0],ma);var o=t.getFlatCoordinates(),s=t.getStride();this.drawFlatCoordinates_(o,0,o.length,s),this.hitDetectionInstructions.push(va),this.endGeometry(e)}},e.prototype.drawMultiLineString=function(t,e){var n=this.state,i=n.strokeStyle,r=n.lineWidth;if(void 0!==i&&void 0!==r){this.updateStrokeStyle(n,this.applyStroke),this.beginGeometry(t,e),this.hitDetectionInstructions.push([wa.SET_STROKE_STYLE,n.strokeStyle,n.lineWidth,n.lineCap,n.lineJoin,n.miterLimit,n.lineDash,n.lineDashOffset],ma);for(var o=t.getEnds(),s=t.getFlatCoordinates(),a=t.getStride(),l=0,h=0,u=o.length;h<u;++h)l=this.drawFlatCoordinates_(s,l,o[h],a);this.hitDetectionInstructions.push(va),this.endGeometry(e)}},e.prototype.finish=function(){var e=this.state;return null!=e.lastStroke&&e.lastStroke!=this.coordinates.length&&this.instructions.push(va),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(va),e.lastStroke=this.coordinates.length),e.lastStroke=0,t.prototype.applyStroke.call(this,e),this.instructions.push(ma)},e}(Ta);var Pa=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])},t(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)}}(),Ma=function(t){function e(e,n,i,r){return t.call(this,e,n,i,r)||this}return Pa(e,t),e.prototype.drawFlatCoordinatess_=function(t,e,n,i){var r=this.state,o=void 0!==r.fillStyle,s=void 0!==r.strokeStyle,a=n.length;this.instructions.push(ma),this.hitDetectionInstructions.push(ma);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=[wa.MOVE_TO_LINE_TO,u,c];this.instructions.push(p),this.hitDetectionInstructions.push(p),s&&(this.instructions.push(xa),this.hitDetectionInstructions.push(xa)),e=h}return o&&(this.instructions.push(ya),this.hitDetectionInstructions.push(ya)),s&&(this.instructions.push(va),this.hitDetectionInstructions.push(va)),e},e.prototype.drawCircle=function(t,e){var n=this.state,i=n.fillStyle,r=n.strokeStyle;if(void 0!==i||void 0!==r){this.setFillStrokeStyles_(),this.beginGeometry(t,e),void 0!==n.fillStyle&&this.hitDetectionInstructions.push([wa.SET_FILL_STYLE,Le]),void 0!==n.strokeStyle&&this.hitDetectionInstructions.push([wa.SET_STROKE_STYLE,n.strokeStyle,n.lineWidth,n.lineCap,n.lineJoin,n.miterLimit,n.lineDash,n.lineDashOffset]);var o=t.getFlatCoordinates(),s=t.getStride(),a=this.coordinates.length;this.appendFlatLineCoordinates(o,0,o.length,s,!1,!1);var l=[wa.CIRCLE,a];this.instructions.push(ma,l),this.hitDetectionInstructions.push(ma,l),void 0!==n.fillStyle&&(this.instructions.push(ya),this.hitDetectionInstructions.push(ya)),void 0!==n.strokeStyle&&(this.instructions.push(va),this.hitDetectionInstructions.push(va)),this.endGeometry(e)}},e.prototype.drawPolygon=function(t,e){var n=this.state,i=n.fillStyle,r=n.strokeStyle;if(void 0!==i||void 0!==r){this.setFillStrokeStyles_(),this.beginGeometry(t,e),void 0!==n.fillStyle&&this.hitDetectionInstructions.push([wa.SET_FILL_STYLE,Le]),void 0!==n.strokeStyle&&this.hitDetectionInstructions.push([wa.SET_STROKE_STYLE,n.strokeStyle,n.lineWidth,n.lineCap,n.lineJoin,n.miterLimit,n.lineDash,n.lineDashOffset]);var o=t.getEnds(),s=t.getOrientedFlatCoordinates(),a=t.getStride();this.drawFlatCoordinatess_(s,0,o,a),this.endGeometry(e)}},e.prototype.drawMultiPolygon=function(t,e){var n=this.state,i=n.fillStyle,r=n.strokeStyle;if(void 0!==i||void 0!==r){this.setFillStrokeStyles_(),this.beginGeometry(t,e),void 0!==n.fillStyle&&this.hitDetectionInstructions.push([wa.SET_FILL_STYLE,Le]),void 0!==n.strokeStyle&&this.hitDetectionInstructions.push([wa.SET_STROKE_STYLE,n.strokeStyle,n.lineWidth,n.lineCap,n.lineJoin,n.miterLimit,n.lineDash,n.lineDashOffset]);for(var o=t.getEndss(),s=t.getOrientedFlatCoordinates(),a=t.getStride(),l=0,h=0,u=o.length;h<u;++h)l=this.drawFlatCoordinatess_(s,l,o[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,r=n.length;i<r;++i)n[i]=nr(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}(Ta);const La=Ma;function Fa(t,e,n,i,r){var o,s,a,l,h,u,c,p,f,d=n,_=n,g=0,y=0,v=n;for(o=n;o<i;o+=r){var m=e[o],x=e[o+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,_=o),y=0,v=o-r)),s=a,u=p,c=f),l=m,h=x}return(y+=a)>g?[v,o]:[d,_]}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])},t(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={left:0,end:0,center:.5,right:1,start:1,top:0,middle:.5,hanging:.2,alphabetic:.8,ideographic:.8,bottom:1},ka=function(t){function e(e,n,i,r){var o=t.call(this,e,n,i,r)||this;return o.labels_=null,o.text_="",o.textOffsetX_=0,o.textOffsetY_=0,o.textRotateWithView_=void 0,o.textRotation_=0,o.textFillState_=null,o.fillStates={},o.textStrokeState_=null,o.strokeStates={},o.textState_={},o.textStates={},o.textKey_="",o.fillKey_="",o.strokeKey_="",o.declutterImageWithText_=void 0,o}return Aa(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_,r=this.textState_;if(""!==this.text_&&r&&(n||i)){var o=this.coordinates,s=o.length,a=t.getType(),l=null,h=t.getStride();if("line"!==r.placement||a!=In&&a!=Ln&&a!=Pn&&a!=Fn){var u=r.overflow?null:[];switch(a){case On:case Mn:l=t.getFlatCoordinates();break;case In:l=t.getFlatMidpoint();break;case Dn:l=t.getCenter();break;case Ln:l=t.getFlatMidpoints(),h=2;break;case Pn:l=t.getFlatInteriorPoint(),r.overflow||u.push(l[2]/this.resolution),h=3;break;case Fn:var c=t.getFlatInteriorPoints();for(l=[],S=0,C=c.length;S<C;S+=3)r.overflow||u.push(c[S+2]/this.resolution),l.push(c[S],c[S+1]);if(0===l.length)return;h=2}if((P=this.appendFlatPointCoordinates(l,h))===s)return;if(u&&(P-s)/2!=l.length/h){var p=s/2;u=u.filter((function(t,e){var n=o[2*(p+e)]===l[e*h]&&o[2*(p+e)+1]===l[e*h+1];return n||--p,n}))}this.saveTextStates_(),(r.backgroundFill||r.backgroundStroke)&&(this.setFillStrokeStyle(r.backgroundFill,r.backgroundStroke),r.backgroundFill&&(this.updateFillStyle(this.state,this.createFill),this.hitDetectionInstructions.push(this.createFill(this.state))),r.backgroundStroke&&(this.updateStrokeStyle(this.state,this.applyStroke),this.hitDetectionInstructions.push(this.createStroke(this.state)))),this.beginGeometry(t,e);var f=r.padding;if(f!=ze&&(r.scale[0]<0||r.scale[1]<0)){var d=r.padding[0],_=r.padding[1],g=r.padding[2],y=r.padding[3];r.scale[0]<0&&(_=-_,y=-y),r.scale[1]<0&&(d=-d,g=-g),f=[d,_,g,y]}var v=this.pixelRatio;this.instructions.push([wa.DRAW_IMAGE,s,P,null,NaN,NaN,NaN,1,0,0,this.textRotateWithView_,this.textRotation_,[1,1],NaN,this.declutterImageWithText_,f==ze?ze:f.map((function(t){return t*v})),!!r.backgroundFill,!!r.backgroundStroke,this.text_,this.textKey_,this.strokeKey_,this.fillKey_,this.textOffsetX_,this.textOffsetY_,u]);var m=1/v;this.hitDetectionInstructions.push([wa.DRAW_IMAGE,s,P,null,NaN,NaN,NaN,1,0,0,this.textRotateWithView_,this.textRotation_,[m,m],NaN,this.declutterImageWithText_,f,!!r.backgroundFill,!!r.backgroundStroke,this.text_,this.textKey_,this.strokeKey_,this.fillKey_,this.textOffsetX_,this.textOffsetY_,u]),this.endGeometry(e)}else{if(!it(this.getBufferedMaxExtent(),t.getExtent()))return;var x=void 0;if(l=t.getFlatCoordinates(),a==In)x=[l.length];else if(a==Ln)x=t.getEnds();else if(a==Pn)x=t.getEnds().slice(0,1);else if(a==Fn){var w=t.getEndss();x=[];for(var S=0,C=w.length;S<C;++S)x.push(w[S][0])}this.beginGeometry(t,e);for(var E=r.textAlign,T=0,b=void 0,R=0,O=x.length;R<O;++R){if(null==E){var I=Fa(r.maxAngle,l,T,x[R],h);T=I[0],b=I[1]}else b=x[R];for(S=T;S<b;S+=h)o.push(l[S],l[S+1]);var P=o.length;T=x[R],this.drawChars_(s,P),s=P}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 r=this.textKey_;r in this.textStates||(this.textStates[r]={font:e.font,textAlign:e.textAlign||je,textBaseline:e.textBaseline||Ge,scale:e.scale});var o=this.fillKey_;n&&(o in this.fillStates||(this.fillStates[o]={fillStyle:n.fillStyle}))},e.prototype.drawChars_=function(t,e){var n=this.textStrokeState_,i=this.textState_,r=this.strokeKey_,o=this.textKey_,s=this.fillKey_;this.saveTextStates_();var a=this.pixelRatio,l=Da[i.textBaseline],h=this.textOffsetY_*a,u=this.text_,c=n?n.lineWidth*Math.abs(i.scale[0])/2:0;this.instructions.push([wa.DRAW_CHARS,t,e,l,i.overflow,s,i.maxAngle,a,h,r,c*a,u,o,1]),this.hitDetectionInstructions.push([wa.DRAW_CHARS,t,e,l,i.overflow,s,i.maxAngle,1,h,r,c,u,o,1/a])},e.prototype.setTextStyle=function(t,e){var n,i,r;if(t){var o=t.getFill();o?((i=this.textFillState_)||(i={},this.textFillState_=i),i.fillStyle=ea(o.getColor()||Le)):(i=null,this.textFillState_=i);var s=t.getStroke();if(s){(r=this.textStrokeState_)||(r={},this.textStrokeState_=r);var a=s.getLineDash(),l=s.getLineDashOffset(),h=s.getWidth(),u=s.getMiterLimit();r.lineCap=s.getLineCap()||Fe,r.lineDash=a?a.slice():Ae,r.lineDashOffset=void 0===l?0:l,r.lineJoin=s.getLineJoin()||De,r.lineWidth=void 0===h?1:h,r.miterLimit=void 0===u?10:u,r.strokeStyle=ea(s.getColor()||ke)}else r=null,this.textStrokeState_=r;n=this.textState_;var c=t.getFont()||Me;Ze(c);var f=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()||Ge,n.backgroundFill=t.getBackgroundFill(),n.backgroundStroke=t.getBackgroundStroke(),n.padding=t.getPadding()||ze,n.scale=void 0===f?[1,1]:f;var d=t.getOffsetX(),_=t.getOffsetY(),g=t.getRotateWithView(),y=t.getRotation();this.text_=t.getText()||"",this.textOffsetX_=void 0===d?0:d,this.textOffsetY_=void 0===_?0:_,this.textRotateWithView_=void 0!==g&&g,this.textRotation_=void 0===y?0:y,this.strokeKey_=r?("string"==typeof r.strokeStyle?r.strokeStyle:p(r.strokeStyle))+r.lineCap+r.lineDashOffset+"|"+r.lineWidth+r.lineJoin+r.miterLimit+"["+r.lineDash.join()+"]":"",this.textKey_=n.font+n.scale+(n.textAlign||"?")+(n.textBaseline||"?"),this.fillKey_=i?"string"==typeof i.fillStyle?i.fillStyle:"|"+p(i.fillStyle):""}else this.text_="";this.declutterImageWithText_=e},e}(Ta),ja={Circle:La,Default:Ta,Image:Ra,LineString:Ia,Polygon:La,Text:ka};const Ga=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 r=n[i].finish();t[e][i]=r}}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 r=i[e];return void 0===r&&(r=new(0,ja[e])(this.tolerance_,this.maxExtent_,this.resolution_,this.pixelRatio_),i[e]=r),r},t}();var 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])},t(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)}}();const Wa=function(t){function e(e){var n=t.call(this)||this;return n.ready=!0,n.boundHandleImageChange_=n.handleImageChange_.bind(n),n.layer_=e,n.declutterExecutorGroup=null,n}return za(e,t),e.prototype.getFeatures=function(t){return u()},e.prototype.getData=function(t){return null},e.prototype.prepareFrame=function(t){return u()},e.prototype.renderFrame=function(t,e){return u()},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,r){var o=this.loadedTileCallback.bind(this,n,i);return t.forEachLoadedTile(e,i,r,o)}.bind(this)},e.prototype.forEachFeatureAtCoordinate=function(t,e,n,i,r){},e.prototype.getDataAtPixel=function(t,e,n){return null},e.prototype.getLayer=function(){return this.layer_},e.prototype.handleFontsChanged=function(){},e.prototype.handleImageChange_=function(t){2===t.target.getState()&&this.renderIfReadyAndVisible()},e.prototype.loadImage=function(t){var e=t.getState();return 2!=e&&3!=e&&t.addEventListener(Ft,this.boundHandleImageChange_),0==e&&(t.load(),e=t.getState()),2==e},e.prototype.renderIfReadyAndVisible=function(){var t=this.getLayer();t.getVisible()&&t.getSourceState()==he&&t.changed()},e.prototype.disposeInternal=function(){delete this.layer_,t.prototype.disposeInternal.call(this)},e}(Zt);var 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])},t(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)}}(),Xa=null,Ya=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.pixelContext_=null,n.frameState=null,n}return Na(e,t),e.prototype.getImageData=function(t,e,n){var i,r;Xa||((i=document.createElement("canvas")).width=1,i.height=1,Xa=i.getContext("2d")),Xa.clearRect(0,0,1,1);try{Xa.drawImage(t,e,n,1,1,0,0,1,1),r=Xa.getImageData(0,0,1,1).data}catch(t){return null}return r},e.prototype.getBackground=function(t){var e=this.getLayer().getBackground();return"function"==typeof e&&(e=e(t.viewState.resolution)),e||void 0},e.prototype.useContainer=function(t,e,n,i){var r,o,a=this.getLayer().getClassName();if(t&&t.className===a&&""===t.style.opacity&&1===n&&(!i||t.style.backgroundColor&&s(xt(t.style.backgroundColor),xt(i)))&&(h=t.firstElementChild)instanceof HTMLCanvasElement&&(o=h.getContext("2d")),o&&o.canvas.style.transform===e?(this.container=t,this.context=o,this.containerReused=!0):this.containerReused&&(this.container=null,this.context=null,this.containerReused=!1),!this.container){(r=document.createElement("div")).className=a;var l=r.style;l.position="absolute",l.width="100%",l.height="100%",i&&(l.backgroundColor=i);var h=(o=Oe()).canvas;r.appendChild(h),(l=h.style).position="absolute",l.left="0",l.transformOrigin="top left",this.container=r,this.context=o}},e.prototype.clipUnrotated=function(t,e,n){var i=tt(n),r=et(n),o=V(n),s=U(n);b(e.coordinateToPixelTransform,i),b(e.coordinateToPixelTransform,r),b(e.coordinateToPixelTransform,o),b(e.coordinateToPixelTransform,s);var a=this.inversePixelTransform;b(a,i),b(a,r),b(a,o),b(a,s),t.save(),t.beginPath(),t.moveTo(Math.round(i[0]),Math.round(i[1])),t.lineTo(Math.round(r[0]),Math.round(r[1])),t.lineTo(Math.round(o[0]),Math.round(o[1])),t.lineTo(Math.round(s[0]),Math.round(s[1])),t.clip()},e.prototype.dispatchRenderEvent_=function(t,e,n){var i=this.getLayer();if(i.hasListener(t)){var r=new we(t,this.inversePixelTransform,n,e);i.dispatchEvent(r)}},e.prototype.preRender=function(t,e){this.frameState=e,this.dispatchRenderEvent_("prerender",t,e)},e.prototype.postRender=function(t,e){this.dispatchRenderEvent_("postrender",t,e)},e.prototype.getRenderTransform=function(t,e,n,i,r,o,s){var a=r/2,l=o/2,h=i/e,u=-h,c=-t[0]+s,p=-t[1];return R(this.tempTransform,a,l,h,u,-n,c,p)},e.prototype.getDataAtPixel=function(t,e,n){var i=b(this.inversePixelTransform,t.slice()),r=this.context,o=this.getLayer().getExtent();if(o&&!D(o,b(e.pixelToCoordinateTransform,t.slice())))return null;var s,a=Math.round(i[0]),l=Math.round(i[1]),h=this.pixelContext_;if(!h){var u=document.createElement("canvas");u.width=1,u.height=1,h=u.getContext("2d"),this.pixelContext_=h}h.clearRect(0,0,1,1);try{h.drawImage(r.canvas,a,l,1,1,0,0,1,1),s=h.getImageData(0,0,1,1).data}catch(t){return"SecurityError"===t.name?(this.pixelContext_=null,new Uint8Array):s}return 0===s[3]?null:s},e.prototype.disposeInternal=function(){delete this.frameState,t.prototype.disposeInternal.call(this)},e}(Wa);const Ka=Ya,Za="Circle",Ba="Default",Ua="Image",Va="LineString",Ha="Polygon",qa="Text";function Ja(t,e,n,i,r,o,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<o);for(var m=0===g?0:(o-y)/g,x=pt(d,p,m),w=pt(_,f,m),S=e-i,C=y,E=o+a*l(h,r,u);e<n-i&&y+g<E;)v();var T,b=pt(d,p,m=0===g?0:(E-y)/g),R=pt(_,f,m);if(c){var O=[x,w,b,R];Yi(O,0,4,2,c,O,O),T=O[0]>O[2]}else T=x>b;var I,P=Math.PI,M=[],L=S+i===e;if(g=0,y=C,p=t[e=S],f=t[e+1],L){v(),I=Math.atan2(f-_,p-d),T&&(I+=I>0?-P:P);var F=(b+x)/2,A=(R+w)/2;return M[0]=[F,A,(E-o)/2,I,r],M}for(var D=0,k=r.length;D<k;){v();var j=Math.atan2(f-_,p-d);if(T&&(j+=j>0?-P:P),void 0!==I){var G=j-I;if(G+=G>P?-2*P:G<-P?2*P:0,Math.abs(G)>s)return null}I=j;for(var z=D,W=0;D<k;++D){var N=a*l(h,r[T?k-D-1:D],u);if(e+i<n&&y+g<o+W+N/2)break;W+=N}if(D!==z){var X=T?r.substring(k-z,k-D):r.substring(z,D);F=pt(d,p,m=0===g?0:(o+W/2-y)/g),A=pt(_,f,m),M.push([F,A,W/2,j,X]),o+=W}}return M}function Qa(t,e,n,i){for(var r=t[e],o=t[e+1],s=0,a=e+i;a<n;a+=i){var l=t[a],h=t[a+1];s+=Math.sqrt((l-r)*(l-r)+(h-o)*(h-o)),r=l,o=h}return s}var $a=[1/0,1/0,-1/0,-1/0],tl=[],el=[],nl=[],il=[];function rl(t){return t[3].declutterBox}var ol=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 sl(t,e){return"start"!==e&&"end"!==e||ol.test(t)||(e="start"===e?"left":"right"),Da[e]}function al(t,e,n){return n>0&&t.push("\n",""),t.push(e,""),t}var ll=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 r=t+e+n+i;if(this.labels_[r])return this.labels_[r];var o=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=Array.isArray(t),c=sl(u?t[0]:t,a.textAlign||je),p=i&&o.lineWidth?o.lineWidth:0,f=u?t:t.split("\n").reduce(al,[]),d=function(t,e){for(var n=[],i=[],r=[],o=0,s=0,a=0,l=0,h=0,u=e.length;h<=u;h+=2){var c=e[h];if("\n"!==c&&h!==u){var p=e[h+1]||t.font,f=Ve(p,c);n.push(f),s+=f;var d=Be(p);i.push(d),l=Math.max(l,d)}else o=Math.max(o,s),r.push(s),s=0,a+=l}return{width:o,height:a,widths:n,heights:i,lineWidths:r}}(a,f),_=d.width,g=d.height,y=d.widths,v=d.heights,x=d.lineWidths,w=_+p,S=[],C=(w+2)*h[0],E=(g+p)*h[1],T={width:C<0?Math.floor(C):Math.ceil(C),height:E<0?Math.floor(E):Math.ceil(E),contextInstructions:S};1==h[0]&&1==h[1]||S.push("scale",h),i&&(S.push("strokeStyle",o.strokeStyle),S.push("lineWidth",p),S.push("lineCap",o.lineCap),S.push("lineJoin",o.lineJoin),S.push("miterLimit",o.miterLimit),(m?OffscreenCanvasRenderingContext2D:CanvasRenderingContext2D).prototype.setLineDash&&(S.push("setLineDash",[o.lineDash]),S.push("lineDashOffset",o.lineDashOffset))),n&&S.push("fillStyle",s.fillStyle),S.push("textBaseline","middle"),S.push("textAlign","center");for(var b,R=.5-c,O=c*w+R*p,I=[],P=[],M=0,L=0,F=0,A=0,D=0,k=f.length;D<k;D+=2){var j=f[D];if("\n"!==j){var G=f[D+1]||a.font;G!==b&&(i&&I.push("font",G),n&&P.push("font",G),b=G),M=Math.max(M,v[F]);var z=[j,O+R*y[F]+c*(y[F]-x[A]),.5*(p+M)+L];O+=y[F],i&&I.push("strokeText",z),n&&P.push("fillText",z),++F}else L+=M,M=0,O=c*w+R*p,++A}return Array.prototype.push.apply(S,I),Array.prototype.push.apply(S,P),this.labels_[r]=T,T},t.prototype.replayTextBackground_=function(t,e,n,i,r,o,s){t.beginPath(),t.moveTo.apply(t,e),t.lineTo.apply(t,n),t.lineTo.apply(t,i),t.lineTo.apply(t,r),t.lineTo.apply(t,e),o&&(this.alignFill_=o[2],this.fill_(t)),s&&(this.setStrokeStyle_(t,s),t.stroke())},t.prototype.calculateImageOrLabelDimensions_=function(t,e,n,i,r,o,s,a,l,h,u,c,p,f,d,_){var g,y=n-(s*=c[0]),v=i-(a*=c[1]),m=r+l>t?t-l:r,x=o+h>e?e-h:o,w=f[3]+m*c[0]+f[1],S=f[0]+x*c[1]+f[2],C=y-f[3],E=v-f[0];return(d||0!==u)&&(tl[0]=C,il[0]=C,tl[1]=E,el[1]=E,el[0]=C+w,nl[0]=el[0],nl[1]=E+S,il[1]=nl[1]),0!==u?(b(g=R([1,0,0,1,0,0],n,i,1,1,u,-n,-i),tl),b(g,el),b(g,nl),b(g,il),z(Math.min(tl[0],el[0],nl[0],il[0]),Math.min(tl[1],el[1],nl[1],il[1]),Math.max(tl[0],el[0],nl[0],il[0]),Math.max(tl[1],el[1],nl[1],il[1]),$a)):z(Math.min(C,C+w),Math.min(E,E+S),Math.max(C,C+w),Math.max(E,E+S),$a),p&&(y=Math.round(y),v=Math.round(v)),{drawImageX:y,drawImageY:v,drawImageW:m,drawImageH:x,originX:l,originY:h,declutterBox:{minX:$a[0],minY:$a[1],maxX:$a[2],maxY:$a[3],value:_},canvasTransform:g,scale:c}},t.prototype.replayImageOrLabel_=function(t,e,n,i,r,o,s){var a=!(!o&&!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,tl,el,nl,il,o,s),function(t,e,n,i,r,o,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,r=n.length;i<r;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,r,o,s,a,0,0,s,a)):t.drawImage(i,r,o,s,a,l,h,s*u[0],a*u[1]),t.restore()}(t,i.canvasTransform,r,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=b(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 r=this.textStates[e],o=this.createLabel(t,e,i,n),s=this.strokeStates[n],a=this.pixelRatio,l=sl(Array.isArray(t)?t[0]:t,r.textAlign||je),h=Da[r.textBaseline||Ge],u=s&&s.lineWidth?s.lineWidth:0;return{label:o,anchorX:l*(o.width/a-2*r.scale[0])+2*(.5-l)*u,anchorY:h*o.height/a+2*(.5-h)*u}},t.prototype.execute_=function(t,e,n,i,r,o,a,l){var h,u,c;this.pixelCoordinates_&&s(n,this.renderedTransform_)?h=this.pixelCoordinates_:(this.pixelCoordinates_||(this.pixelCoordinates_=[]),h=Xi(this.coordinates,0,this.coordinates.length,2,n,this.pixelCoordinates_),c=n,(u=this.renderedTransform_)[0]=c[0],u[1]=c[1],u[2]=c[2],u[3]=c[3],u[4]=c[4],u[5]=c[5]);for(var p,f,d,_,g,y,v,m,x,w,S,C,E,T,b,R,O=0,I=i.length,P=0,M=0,L=0,F=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;O<I;){var W=i[O];switch(W[0]){case wa.BEGIN_GEOMETRY:E=W[1],R=W[3],E.getGeometry()?void 0===a||it(a,R.getExtent())?++O:O=W[2]+1:O=W[2];break;case wa.BEGIN_PATH:M>z&&(this.fill_(t),M=0),L>z&&(t.stroke(),L=0),M||L||(t.beginPath(),_=NaN,g=NaN),++O;break;case wa.CIRCLE:var N=h[P=W[1]],X=h[P+1],Y=h[P+2]-N,K=h[P+3]-X,Z=Math.sqrt(Y*Y+K*K);t.moveTo(N+Z,X),t.arc(N,X,Z,0,2*Math.PI,!0),++O;break;case wa.CLOSE_PATH:t.closePath(),++O;break;case wa.CUSTOM:P=W[1],p=W[2];var B=W[3],U=W[4],V=6==W.length?W[5]:void 0;G.geometry=B,G.feature=E,O in D||(D[O]=[]);var H=D[O];V?V(h,P,p,2,H):(H[0]=h[P],H[1]=h[P+1],H.length=2),U(H,G),++O;break;case wa.DRAW_IMAGE:P=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],rt=W[13],ot=W[14];if(!m&&W.length>=19){x=W[18],w=W[19],S=W[20],C=W[21];var st=this.drawLabelWithPointPlacement_(x,w,S,C);m=st.label,W[3]=m;var at=W[22];f=(st.anchorX-at)*this.pixelRatio,W[4]=f;var lt=W[23];d=(st.anchorY-lt)*this.pixelRatio,W[5]=d,q=m.height,W[6]=q,rt=m.width,W[13]=rt}var ht=void 0;W.length>24&&(ht=W[24]);var ut=void 0,ct=void 0,pt=void 0;W.length>16?(ut=W[15],ct=W[16],pt=W[17]):(ut=ze,ct=!1,pt=!1),tt&&j?et+=k:tt||j||(et-=k);for(var ft=0;P<p;P+=2)if(!(ht&&ht[ft++]<rt/this.pixelRatio)){var dt=[t,e,m,Nt=this.calculateImageOrLabelDimensions_(m.width,m.height,h[P],h[P+1],rt,q,f,d,Q,$,et,nt,r,ut,ct||pt,E),J,ct?F:null,pt?A:null],_t=void 0,gt=void 0;if(l&&ot){var yt=p-P;if(!ot[yt]){ot[yt]=dt;continue}if(_t=ot[yt],delete ot[yt],gt=rl(_t),l.collides(gt))continue}l&&l.collides(Nt.declutterBox)||(_t&&(l&&l.insert(gt),this.replayImageOrLabel_.apply(this,_t)),l&&l.insert(Nt.declutterBox),this.replayImageOrLabel_.apply(this,dt))}++O;break;case wa.DRAW_CHARS:var vt=W[1],mt=W[2],xt=W[3],wt=W[4];C=W[5];var St=W[6],Ct=W[7],Et=W[8];S=W[9];var Tt=W[10];x=W[11],w=W[12];var bt=[W[13],W[13]],Rt=this.textStates[w],Ot=Rt.font,It=[Rt.scale[0]*Ct,Rt.scale[1]*Ct],Pt=void 0;Ot in this.widths_?Pt=this.widths_[Ot]:(Pt={},this.widths_[Ot]=Pt);var Mt=Qa(h,vt,mt,2),Lt=Math.abs(It[0])*He(Ot,x,Pt);if(wt||Lt<=Mt){var Ft=this.textStates[w].textAlign,At=Ja(h,vt,mt,2,x,(Mt-Lt)*Da[Ft],St,Math.abs(It[0]),He,Ot,Pt,j?0:this.viewRotation_);t:if(At){var Dt=[],kt=void 0,jt=void 0,Gt=void 0,zt=void 0,Wt=void 0;if(S)for(kt=0,jt=At.length;kt<jt;++kt){Gt=(Wt=At[kt])[4],zt=this.createLabel(Gt,w,"",S),f=Wt[2]+(It[0]<0?-Tt:Tt),d=xt*zt.height+2*(.5-xt)*Tt*It[1]/It[0]-Et;var Nt=this.calculateImageOrLabelDimensions_(zt.width,zt.height,Wt[0],Wt[1],zt.width,zt.height,f,d,0,0,Wt[3],bt,!1,ze,!1,E);if(l&&l.collides(Nt.declutterBox))break t;Dt.push([t,e,zt,Nt,1,null,null])}if(C)for(kt=0,jt=At.length;kt<jt;++kt){if(Gt=(Wt=At[kt])[4],zt=this.createLabel(Gt,w,C,""),f=Wt[2],d=xt*zt.height-Et,Nt=this.calculateImageOrLabelDimensions_(zt.width,zt.height,Wt[0],Wt[1],zt.width,zt.height,f,d,0,0,Wt[3],bt,!1,ze,!1,E),l&&l.collides(Nt.declutterBox))break t;Dt.push([t,e,zt,Nt,1,null,null])}l&&l.load(Dt.map(rl));for(var Xt=0,Yt=Dt.length;Xt<Yt;++Xt)this.replayImageOrLabel_.apply(this,Dt[Xt])}}++O;break;case wa.END_GEOMETRY:if(void 0!==o){var Kt=o(E=W[1],R);if(Kt)return Kt}++O;break;case wa.FILL:z?M++:this.fill_(t),++O;break;case wa.MOVE_TO_LINE_TO:for(P=W[1],p=W[2],T=h[P],v=(b=h[P+1])+.5|0,(y=T+.5|0)===_&&v===g||(t.moveTo(T,b),_=y,g=v),P+=2;P<p;P+=2)y=(T=h[P])+.5|0,v=(b=h[P+1])+.5|0,P!=p-2&&y===_&&v===g||(t.lineTo(T,b),_=y,g=v);++O;break;case wa.SET_FILL_STYLE:F=W,this.alignFill_=W[2],M&&(this.fill_(t),M=0,L&&(t.stroke(),L=0)),t.fillStyle=W[1],++O;break;case wa.SET_STROKE_STYLE:A=W,L&&(t.stroke(),L=0),this.setStrokeStyle_(t,W),++O;break;case wa.STROKE:z?L++:t.stroke(),++O;break;default:++O}}M&&this.fill_(t),L&&t.stroke()},t.prototype.execute=function(t,e,n,i,r,o){this.viewRotation_=i,this.execute_(t,e,n,this.instructions,r,void 0,void 0,o)},t.prototype.executeHitDetection=function(t,e,n,i,r){return this.viewRotation_=n,this.execute_(t,1,e,this.hitDetectionInstructions,!0,i,r)},t}();const hl=ll;var ul=[Ha,Za,Va,Ua,qa,Ba],cl=function(){function t(t,e,n,i,r,o){this.maxExtent_=t,this.overlaps_=i,this.pixelRatio_=n,this.resolution_=e,this.renderBuffer_=o,this.executorsByZIndex_={},this.hitDetectionContext_=null,this.hitDetectionTransform_=[1,0,0,1,0,0],this.createExecutors_(r)}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 r in i){var o=i[r];n[r]=new hl(this.resolution_,this.pixelRatio_,this.overlaps_,o)}}},t.prototype.hasExecutors=function(t){for(var e in this.executorsByZIndex_)for(var n=this.executorsByZIndex_[e],i=0,r=t.length;i<r;++i)if(t[i]in n)return!0;return!1},t.prototype.forEachFeatureAtCoordinate=function(t,n,i,r,o,s){var a=2*(r=Math.round(r))+1,l=R(this.hitDetectionTransform_,r+.5,r+.5,1/n,-1/n,-i,-t[0],-t[1]),h=!this.hitDetectionContext_;h&&(this.hitDetectionContext_=Oe(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_&&(X(u=[1/0,1/0,-1/0,-1/0],t),L(u,n*(this.renderBuffer_+r),u));var p,f=function(t){if(void 0!==pl[t])return pl[t];for(var e=2*t+1,n=t*t,i=new Array(n+1),r=0;r<=t;++r)for(var o=0;o<=t;++o){var s=r*r+o*o;if(s>n)break;var a=i[s];a||(a=[],i[s]=a),a.push(4*((t+r)*e+(t+o))+3),r>0&&a.push(4*((t-r)*e+(t+o))+3),o>0&&(a.push(4*((t+r)*e+(t-o))+3),r>0&&a.push(4*((t-r)*e+(t-o))+3))}for(var l=[],h=(r=0,i.length);r<h;++r)i[r]&&l.push.apply(l,i[r]);return pl[t]=l,l}(r);function d(t,e){for(var n=c.getImageData(0,0,a,a).data,i=0,l=f.length;i<l;i++)if(n[f[i]]>0){if(!s||p!==Ua&&p!==qa||-1!==s.indexOf(t)){var h=(f[i]-3)/4,u=r-h%a,d=r-(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(e),_=x.length-1;_>=0;--_){var w=x[_].toString();for(y=this.executorsByZIndex_[w],g=ul.length-1;g>=0;--g)if(void 0!==(v=y[p=ul[g]])&&(m=v.executeHitDetection(c,l,i,d,u)))return m}},t.prototype.getClipCoords=function(t){var e=this.maxExtent_;if(!e)return null;var n=e[0],i=e[1],r=e[2],o=e[3],s=[n,i,n,o,r,o,r,i];return Xi(s,0,8,2,t,s),s},t.prototype.isEmpty=function(){return Pt(this.executorsByZIndex_)},t.prototype.execute=function(t,n,i,r,o,s,a){var l=Object.keys(this.executorsByZIndex_).map(Number);l.sort(e),this.maxExtent_&&(t.save(),this.clip(t,i));var h,u,c,p,f,d,_=s||ul;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,n,i,r,o,a)}this.maxExtent_&&t.restore()},t}(),pl={};const fl=cl;var dl=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])},t(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,n,i,r,o,s,a){var l=t.call(this)||this;return l.context_=e,l.pixelRatio_=n,l.extent_=i,l.transform_=r,l.viewRotation_=o,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 dl(e,t),e.prototype.drawImages_=function(t,e,n,i){if(this.image_){var r=Xi(t,e,n,i,this.transform_,this.pixelCoordinates_),o=this.context_,s=this.tmpLocalTransform_,a=o.globalAlpha;1!=this.imageOpacity_&&(o.globalAlpha=a*this.imageOpacity_);var l=this.imageRotation_;this.imageRotateWithView_&&(l+=this.viewRotation_);for(var h=0,u=r.length;h<u;h+=2){var c=r[h]-this.imageAnchorX_,p=r[h+1]-this.imageAnchorY_;if(0!==l||1!=this.imageScale_[0]||1!=this.imageScale_[1]){var f=c+this.imageAnchorX_,d=p+this.imageAnchorY_;R(s,f,d,1,1,l,-f,-d),o.setTransform.apply(o,s),o.translate(f,d),o.scale(this.imageScale_[0],this.imageScale_[1]),o.drawImage(this.image_,this.imageOriginX_,this.imageOriginY_,this.imageWidth_,this.imageHeight_,-this.imageAnchorX_,-this.imageAnchorY_,this.imageWidth_,this.imageHeight_),o.setTransform(1,0,0,1,0,0)}else o.drawImage(this.image_,this.imageOriginX_,this.imageOriginY_,this.imageWidth_,this.imageHeight_,c,p,this.imageWidth_,this.imageHeight_)}1!=this.imageOpacity_&&(o.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 r=Xi(t,e,n,i,this.transform_,this.pixelCoordinates_),o=this.context_,s=this.textRotation_;for(this.textRotateWithView_&&(s+=this.viewRotation_);e<n;e+=i){var a=r[e]+this.textOffsetX_,l=r[e+1]+this.textOffsetY_;if(0!==s||1!=this.textScale_[0]||1!=this.textScale_[1]){var h=R(this.tmpLocalTransform_,a,l,1,1,s,-a,-l);o.setTransform.apply(o,h),o.translate(a,l),o.scale(this.textScale_[0],this.textScale_[1]),this.textStrokeState_&&o.strokeText(this.text_,0,0),this.textFillState_&&o.fillText(this.text_,0,0),o.setTransform(1,0,0,1,0,0)}else this.textStrokeState_&&o.strokeText(this.text_,a,l),this.textFillState_&&o.fillText(this.text_,a,l)}}},e.prototype.moveToLineTo_=function(t,e,n,i,r){var o=this.context_,s=Xi(t,e,n,i,this.transform_,this.pixelCoordinates_);o.moveTo(s[0],s[1]);var a=s.length;r&&(a-=2);for(var l=2;l<a;l+=2)o.lineTo(s[l],s[l+1]);return r&&o.closePath(),n},e.prototype.drawRings_=function(t,e,n,i){for(var r=0,o=n.length;r<o;++r)e=this.moveToLineTo_(t,e,n[r],i,!0);return e},e.prototype.drawCircle=function(t){if(it(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 r=t.getStride();return Xi(i,0,i.length,r,e,n)}return null}(t,this.transform_,this.pixelCoordinates_),n=e[2]-e[0],i=e[3]-e[1],r=Math.sqrt(n*n+i*i),o=this.context_;o.beginPath(),o.arc(e[0],e[1],r,0,2*Math.PI),this.fillState_&&o.fill(),this.strokeState_&&o.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 On:this.drawPoint(t);break;case In:this.drawLineString(t);break;case Pn:this.drawPolygon(t);break;case Mn:this.drawMultiPoint(t);break;case Ln:this.drawMultiLineString(t);break;case Fn:this.drawMultiPolygon(t);break;case An:this.drawGeometryCollection(t);break;case Dn:this.drawCircle(t)}},e.prototype.drawFeature=function(t,e){var n=e.getGeometryFunction()(t);n&&it(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_)),it(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(it(this.extent_,e)){if(this.strokeState_){this.setContextStrokeState_(this.strokeState_);var n=this.context_,i=t.getFlatCoordinates(),r=0,o=t.getEnds(),s=t.getStride();n.beginPath();for(var a=0,l=o.length;a<l;++a)r=this.moveToLineTo_(i,r,o[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_)),it(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_)),it(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,r=t.getEndss(),o=t.getStride();e.beginPath();for(var s=0,a=r.length;s<a;++s){var l=r[s];i=this.drawRings_(n,i,l,o)}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&&(s(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:je;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:ea(i||Le)}}else this.fillState_=null;if(e){var r=e.getColor(),o=e.getLineCap(),s=e.getLineDash(),a=e.getLineDashOffset(),l=e.getLineJoin(),h=e.getWidth(),u=e.getMiterLimit(),c=s||Ae;this.strokeState_={lineCap:void 0!==o?o:Fe,lineDash:1===this.pixelRatio_?c:c.map((function(t){return t*n.pixelRatio_})),lineDashOffset:(a||0)*this.pixelRatio_,lineJoin:void 0!==l?l:De,lineWidth:(void 0!==h?h:1)*this.pixelRatio_,miterLimit:void 0!==u?u:10,strokeStyle:ea(r||ke)}}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:ea(n||Le)}}else this.textFillState_=null;var i=t.getStroke();if(i){var r=i.getColor(),o=i.getLineCap(),s=i.getLineDash(),a=i.getLineDashOffset(),l=i.getLineJoin(),h=i.getWidth(),u=i.getMiterLimit();this.textStrokeState_={lineCap:void 0!==o?o:Fe,lineDash:s||Ae,lineDashOffset:a||0,lineJoin:void 0!==l?l:De,lineWidth:void 0!==h?h:1,miterLimit:void 0!==u?u:10,strokeStyle:ea(r||ke)}}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:Me,textAlign:void 0!==v?v:je,textBaseline:void 0!==m?m:Ge},this.text_=void 0!==y?Array.isArray(y)?y.reduce((function(t,e,n){return t+(n%2?" ":e)}),""):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}(Sa);const gl=_l,yl="fraction",vl="pixels",ml="bottom-left",xl="bottom-right",wl="top-left",Sl="top-right";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])},t(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)}}(),El=null,Tl=function(t){function e(e,n,i,r,o,s){var a=t.call(this)||this;return a.hitDetectionImage_=null,a.image_=e||new Image,null!==r&&(a.image_.crossOrigin=r),a.canvas_={},a.color_=s,a.unlisten_=null,a.imageState_=o,a.size_=i,a.src_=n,a.tainted_,a}return Cl(e,t),e.prototype.isTainted_=function(){if(void 0===this.tainted_&&2===this.imageState_){El||(El=Oe(1,1)),El.drawImage(this.image_,0,0);try{El.getImageData(0,0,1,1),this.tainted_=!1}catch(t){El=null,this.tainted_=!0}}return!0===this.tainted_},e.prototype.dispatchChangeEvent_=function(){this.dispatchEvent(Ft)},e.prototype.handleImageError_=function(){this.imageState_=3,this.unlistenImage_(),this.dispatchChangeEvent_()},e.prototype.handleImageLoad_=function(){this.imageState_=2,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=Oe(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(0==this.imageState_){this.imageState_=1;try{this.image_.src=this.src_}catch(t){this.handleImageError_()}this.unlisten_=os(this.image_,this.handleImageLoad_.bind(this),this.handleImageError_.bind(this))}},e.prototype.replaceColor_=function(t){if(this.color_&&!this.canvas_[t]&&2===this.imageState_){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=vt(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),r=i.data,o=this.color_[0]/255,s=this.color_[1]/255,a=this.color_[2]/255,l=this.color_[3],h=0,u=r.length;h<u;h+=4)r[h]*=o,r[h+1]*=s,r[h+2]*=a,r[h+3]*=l;n.putImageData(i,0,0)}}},e.prototype.unlistenImage_=function(){this.unlisten_&&(this.unlisten_(),this.unlisten_=null)},e}(Lt),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])},t(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)}}();const Rl=function(t){function e(e){var n=this,i=e||{},r=void 0!==i.opacity?i.opacity:1,o=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:r,rotation:o,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:wl,n.anchorXUnits_=void 0!==i.anchorXUnits?i.anchorXUnits:yl,n.anchorYUnits_=void 0!==i.anchorYUnits?i.anchorYUnits:yl,n.crossOrigin_=void 0!==i.crossOrigin?i.crossOrigin:null;var l=void 0!==i.img?i.img:null;n.imgSize_=i.imgSize;var h=i.src;E(!(void 0!==h&&l),4),E(!l||l&&n.imgSize_,5),void 0!==h&&0!==h.length||!l||(h=l.src||p(l)),E(void 0!==h&&h.length>0,6);var u=void 0!==i.src?0:2;return n.color_=void 0!==i.color?xt(i.color):null,n.iconImage_=function(t,e,n,i,r,o){var s=Et.get(e,i,o);return s||(s=new Tl(t,e,n,i,r,o),Et.set(e,i,o,s)),s}(l,h,void 0!==n.imgSize_?n.imgSize_:null,n.crossOrigin_,u,n.color_),n.offset_=void 0!==i.offset?i.offset:[0,0],n.offsetOrigin_=void 0!==i.offsetOrigin?i.offsetOrigin:wl,n.origin_=null,n.size_=void 0!==i.size?i.size:null,n}return bl(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_,color:this.color_&&this.color_.slice?this.color_.slice():this.color_||void 0,crossOrigin:this.crossOrigin_,imgSize:this.imgSize_,offset:this.offset_.slice(),offsetOrigin:this.offsetOrigin_,opacity:this.getOpacity(),rotateWithView:this.getRotateWithView(),rotation:this.getRotation(),scale:Array.isArray(t)?t.slice():t,size:null!==this.size_?this.size_.slice():void 0,src:this.getSrc()})},e.prototype.getAnchor=function(){var t=this.normalizedAnchor_;if(!t){t=this.anchor_;var e=this.getSize();if(this.anchorXUnits_==yl||this.anchorYUnits_==yl){if(!e)return null;t=this.anchor_.slice(),this.anchorXUnits_==yl&&(t[0]*=e[0]),this.anchorYUnits_==yl&&(t[1]*=e[1])}if(this.anchorOrigin_!=wl){if(!e)return null;t===this.anchor_&&(t=this.anchor_.slice()),this.anchorOrigin_!=Sl&&this.anchorOrigin_!=xl||(t[0]=-t[0]+e[0]),this.anchorOrigin_!=ml&&this.anchorOrigin_!=xl||(t[1]=-t[1]+e[1])}this.normalizedAnchor_=t}var n=this.getDisplacement();return[t[0]-n[0],t[1]+n[1]]},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_!=wl){var e=this.getSize(),n=this.iconImage_.getSize();if(!e||!n)return null;t=t.slice(),this.offsetOrigin_!=Sl&&this.offsetOrigin_!=xl||(t[0]=n[0]-e[0]-t[0]),this.offsetOrigin_!=ml&&this.offsetOrigin_!=xl||(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(Ft,t)},e.prototype.load=function(){this.iconImage_.load()},e.prototype.unlistenImageChange=function(t){this.iconImage_.removeEventListener(Ft,t)},e}(ta);var Ol=.5,Il={Point:function(t,e,n,i,r){var o,s=n.getImage(),a=n.getText();if(r&&(t=r,o=s&&a&&a.getText()?{}:void 0),s){if(2!=s.getImageState())return;var l=t.getBuilder(n.getZIndex(),Ua);l.setImageStyle(s,o),l.drawPoint(e,i)}if(a&&a.getText()){var h=t.getBuilder(n.getZIndex(),qa);h.setTextStyle(a,o),h.drawText(e,i)}},LineString:function(t,e,n,i,r){var o=n.getStroke();if(o){var s=t.getBuilder(n.getZIndex(),Va);s.setFillStrokeStyle(null,o),s.drawLineString(e,i)}var a=n.getText();if(a&&a.getText()){var l=(r||t).getBuilder(n.getZIndex(),qa);l.setTextStyle(a),l.drawText(e,i)}},Polygon:function(t,e,n,i,r){var o=n.getFill(),s=n.getStroke();if(o||s){var a=t.getBuilder(n.getZIndex(),Ha);a.setFillStrokeStyle(o,s),a.drawPolygon(e,i)}var l=n.getText();if(l&&l.getText()){var h=(r||t).getBuilder(n.getZIndex(),qa);h.setTextStyle(l),h.drawText(e,i)}},MultiPoint:function(t,e,n,i,r){var o,s=n.getImage(),a=n.getText();if(r&&(t=r,o=s&&a&&a.getText()?{}:void 0),s){if(2!=s.getImageState())return;var l=t.getBuilder(n.getZIndex(),Ua);l.setImageStyle(s,o),l.drawMultiPoint(e,i)}if(a&&a.getText()){var h=(r||t).getBuilder(n.getZIndex(),qa);h.setTextStyle(a,o),h.drawText(e,i)}},MultiLineString:function(t,e,n,i,r){var o=n.getStroke();if(o){var s=t.getBuilder(n.getZIndex(),Va);s.setFillStrokeStyle(null,o),s.drawMultiLineString(e,i)}var a=n.getText();if(a&&a.getText()){var l=(r||t).getBuilder(n.getZIndex(),qa);l.setTextStyle(a),l.drawText(e,i)}},MultiPolygon:function(t,e,n,i,r){var o=n.getFill(),s=n.getStroke();if(s||o){var a=t.getBuilder(n.getZIndex(),Ha);a.setFillStrokeStyle(o,s),a.drawMultiPolygon(e,i)}var l=n.getText();if(l&&l.getText()){var h=(r||t).getBuilder(n.getZIndex(),qa);h.setTextStyle(l),h.drawText(e,i)}},GeometryCollection:function(t,e,n,i,r){var o,s,a=e.getGeometriesArray();for(o=0,s=a.length;o<s;++o)(0,Il[a[o].getType()])(t,a[o],n,i,r)},Circle:function(t,e,n,i,r){var o=n.getFill(),s=n.getStroke();if(o||s){var a=t.getBuilder(n.getZIndex(),Za);a.setFillStrokeStyle(o,s),a.drawCircle(e,i)}var l=n.getText();if(l&&l.getText()){var h=(r||t).getBuilder(n.getZIndex(),qa);h.setTextStyle(l),h.drawText(e,i)}}};function Pl(t,e){return parseInt(p(t),10)-parseInt(p(e),10)}function Ml(t,e){return.5*t/e}function Ll(t,e,n,i,r,o,s){var a=!1,l=n.getImage();if(l){var h=l.getImageState();2==h||3==h?l.unlistenImageChange(r):(0==h&&l.load(),h=l.getImageState(),l.listenImageChange(r),a=!0)}return function(t,e,n,i,r,o){var s=n.getGeometryFunction()(e);if(s){var a=s.simplifyTransformed(i,r);n.getRenderer()?Fl(t,a,n,e):(0,Il[a.getType()])(t,a,n,e,o)}}(t,e,n,i,o,s),a}function Fl(t,e,n,i){if(e.getType()!=An)t.getBuilder(n.getZIndex(),Ba).drawCustom(e,i,n.getRenderer(),n.getHitDetectionRenderer());else for(var r=e.getGeometries(),o=0,s=r.length;o<s;++o)Fl(t,r[o],n,i)}var 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])},t(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)}}(),Dl=function(t){function n(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 Al(n,t),n.prototype.renderWorlds=function(t,e,n){var i=e.extent,r=e.viewState,o=r.center,s=r.resolution,a=r.projection,l=r.rotation,h=a.getExtent(),u=this.getLayer().getSource(),c=e.pixelRatio,p=e.viewHints,f=!(p[0]||p[1]),d=this.context,_=Math.round(e.size[0]*c),g=Math.round(e.size[1]*c),y=u.getWrapX()&&a.canWrapX(),v=y?nt(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 w=this.getRenderTransform(o,s,l,c,_,g,x*v);t.execute(d,1,w,l,f,void 0,n)}while(++x<m)},n.prototype.renderDeclutter=function(t){this.declutterExecutorGroup&&this.renderWorlds(this.declutterExecutorGroup,t,t.declutterTree)},n.prototype.renderFrame=function(t,e){var n=t.pixelRatio,i=t.layerStatesArray[t.layerIndex];!function(t,e,n){!function(t,e,n,i,r,o,s){t[0]=e,t[1]=n,t[2]=i,t[3]=r,t[4]=o,t[5]=s}(t,e,0,0,n,0,0)}(this.pixelTransform,1/n,1/n),O(this.inversePixelTransform,this.pixelTransform);var r=I(this.pixelTransform);this.useContainer(e,r,i.opacity,this.getBackground(t));var o=this.context,s=o.canvas,a=this.replayGroup_,l=this.declutterExecutorGroup;if((!a||a.isEmpty())&&(!l||l.isEmpty()))return null;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!==r&&(s.style.transform=r)):this.containerReused||o.clearRect(0,0,h,u),this.preRender(o,t);var c=t.viewState,p=(c.projection,!1),f=!0;if(i.extent&&this.clipping){var d=Ri(i.extent);(p=(f=it(d,t.extent))&&!k(d,t.extent))&&this.clipUnrotated(o,t,d)}f&&this.renderWorlds(a,t),p&&o.restore(),this.postRender(o,t);var _=Re(i.opacity),g=this.container;return _!==g.style.opacity&&(g.style.opacity=_),this.renderedRotation_!==c.rotation&&(this.renderedRotation_=c.rotation,this.hitDetectionImageData_=null),this.container},n.prototype.getFeatures=function(t){return new Promise(function(n){if(!this.hitDetectionImageData_&&!this.animatingOrInteracting_){var i=[this.context.canvas.width,this.context.canvas.height];b(this.pixelTransform,i);var r=this.renderedCenter_,o=this.renderedResolution_,s=this.renderedRotation_,a=this.renderedProjection_,l=this.wrappedRenderedExtent_,h=this.getLayer(),u=[],c=i[0]*Ol,p=i[1]*Ol;u.push(this.getRenderTransform(r,o,s,Ol,c,p,0).slice());var f=h.getSource(),d=a.getExtent();if(f.getWrapX()&&a.canWrapX()&&!k(d,l)){for(var _=l[0],g=nt(d),y=0,v=void 0;_<d[0];)v=g*--y,u.push(this.getRenderTransform(r,o,s,Ol,c,p,v).slice()),_+=g;for(y=0,_=l[2];_>d[2];)v=g*++y,u.push(this.getRenderTransform(r,o,s,Ol,c,p,v).slice()),_-=g}this.hitDetectionImageData_=function(t,n,i,r,o,s,a){var l=Oe(t[0]*Ol,t[1]*Ol);l.imageSmoothingEnabled=!1;for(var h=l.canvas,u=new gl(l,Ol,o,null,a),c=i.length,p=Math.floor(16777215/c),f={},d=1;d<=c;++d){var _=i[d-1],g=_.getStyleFunction()||r;if(r){var y=g(_,s);if(y){Array.isArray(y)||(y=[y]);for(var v="#"+("000000"+(d*p).toString(16)).slice(-6),m=0,x=y.length;m<x;++m){var w=y[m],S=w.getGeometryFunction()(_);if(S&&it(o,S.getExtent())){var C=w.clone(),E=C.getFill();E&&E.setColor(v);var T=C.getStroke();T&&(T.setColor(v),T.setLineDash(null)),C.setText(void 0);var b=w.getImage();if(b&&0!==b.getOpacity()){var R=b.getImageSize();if(!R)continue;var O=Oe(R[0],R[1],void 0,{alpha:!1}),I=O.canvas;O.fillStyle=v,O.fillRect(0,0,I.width,I.height),C.setImage(new Rl({img:I,imgSize:R,anchor:b.getAnchor(),anchorXUnits:vl,anchorYUnits:vl,offset:b.getOrigin(),opacity:1,size:b.getSize(),scale:b.getScale(),rotation:b.getRotation(),rotateWithView:b.getRotateWithView()}))}var P=C.getZIndex()||0;(F=f[P])||(F={},f[P]=F,F.Polygon=[],F.Circle=[],F.LineString=[],F.Point=[]),F[S.getType().replace("Multi","")].push(S,C)}}}}}for(var M=Object.keys(f).map(Number).sort(e),L=(d=0,M.length);d<L;++d){var F=f[M[d]];for(var A in F){var D=F[A];for(m=0,x=D.length;m<x;m+=2){u.setStyle(D[m+1]);for(var k=0,j=n.length;k<j;++k)u.setTransform(n[k]),u.drawGeometry(D[m])}}}return l.getImageData(0,0,h.width,h.height)}(i,u,this.renderedFeatures_,h.getStyleFunction(),l,o,s)}n(function(t,e,n){var i=[];if(n){var r=Math.floor(Math.round(t[0])*Ol),o=Math.floor(Math.round(t[1])*Ol),s=4*(ot(r,0,n.width-1)+ot(o,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))},n.prototype.forEachFeatureAtCoordinate=function(t,e,n,i,r){var o=this;if(this.replayGroup_){var s,a=e.viewState.resolution,l=e.viewState.rotation,h=this.getLayer(),u={},c=function(t,e,n){var o=p(t),s=u[o];if(s){if(!0!==s&&n<s.distanceSq){if(0===n)return u[o]=!0,r.splice(r.lastIndexOf(s),1),i(t,h,e);s.geometry=e,s.distanceSq=n}}else{if(0===n)return u[o]=!0,i(t,h,e);r.push(u[o]={feature:t,layer:h,geometry:e,distanceSq:n,callback:i})}},f=[this.replayGroup_];return this.declutterExecutorGroup&&f.push(this.declutterExecutorGroup),f.some((function(i){return s=i.forEachFeatureAtCoordinate(t,a,l,n,c,i===o.declutterExecutorGroup&&e.declutterTree?e.declutterTree.all().map((function(t){return t.value})):null)})),s}},n.prototype.handleFontsChanged=function(){var t=this.getLayer();t.getVisible()&&this.replayGroup_&&t.changed()},n.prototype.handleStyleImageChange_=function(t){this.renderIfReadyAndVisible()},n.prototype.prepareFrame=function(t){var e=this.getLayer(),n=e.getSource();if(!n)return!1;var i=t.viewHints[0],r=t.viewHints[1],o=e.getUpdateWhileAnimating(),a=e.getUpdateWhileInteracting();if(!this.dirty_&&!o&&i||!a&&r)return this.animatingOrInteracting_=!0,!0;this.animatingOrInteracting_=!1;var l=t.extent,h=t.viewState,u=h.projection,c=h.resolution,p=t.pixelRatio,f=e.getRevision(),d=e.getRenderBuffer(),_=e.getRenderOrder();void 0===_&&(_=Pl);var g=h.center.slice(),y=L(l,d*c),v=y.slice(),m=[y.slice()],x=u.getExtent();if(n.getWrapX()&&u.canWrapX()&&!k(x,t.extent)){var w=nt(x),S=Math.max(nt(y)/2,w);y[0]=x[0]-S,y[2]=x[2]+S,_e(g,u);var C=function(t,e){var n=e.getExtent(),i=H(t);if(e.canWrapX()&&(i[0]<n[0]||i[0]>=n[2])){var r=nt(n),o=Math.floor((i[0]-n[0])/r)*r;t[0]-=o,t[2]-=o}return t}(m[0],u);C[0]<x[0]&&C[2]<x[2]?m.push([C[0]+w,C[1],C[2]+w,C[3]]):C[0]>x[0]&&C[2]>x[2]&&m.push([C[0]-w,C[1],C[2]-w,C[3]])}if(!this.dirty_&&this.renderedResolution_==c&&this.renderedRevision_==f&&this.renderedRenderOrder_==_&&k(this.wrappedRenderedExtent_,y))return s(this.renderedExtent_,v)||(this.hitDetectionImageData_=null,this.renderedExtent_=v),this.renderedCenter_=g,this.replayGroupChanged=!1,!0;this.replayGroup_=null,this.dirty_=!1;var E,T=new Ga(Ml(c,p),y,c,p);this.getLayer().getDeclutter()&&(E=new Ga(Ml(c,p),y,c,p));var b,R=Ci();if(R){for(var O=0,I=m.length;O<I;++O){var P=bi(m[O]);n.loadFeatures(P,Oi(c),R)}b=_i(R,u)}else for(O=0,I=m.length;O<I;++O)n.loadFeatures(m[O],c,u);var M=function(t,e){var n=Ml(t,e);return n*n}(c,p),F=function(t){var n,i=t.getStyleFunction()||e.getStyleFunction();if(i&&(n=i(t,c)),n){var r=this.renderFeature(t,M,n,T,b,E);this.dirty_=this.dirty_||r}}.bind(this),A=bi(y),D=n.getFeaturesInExtent(A);for(_&&D.sort(_),O=0,I=D.length;O<I;++O)F(D[O]);this.renderedFeatures_=D;var j=T.finish(),G=new fl(y,c,p,n.getOverlaps(),j,e.getRenderBuffer());return E&&(this.declutterExecutorGroup=new fl(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_=u,this.replayGroup_=G,this.hitDetectionImageData_=null,this.replayGroupChanged=!0,!0},n.prototype.renderFeature=function(t,e,n,i,r,o){if(!n)return!1;var s=!1;if(Array.isArray(n))for(var a=0,l=n.length;a<l;++a)s=Ll(i,t,n[a],e,this.boundHandleStyleImageChange_,r,o)||s;else s=Ll(i,t,n,e,this.boundHandleStyleImageChange_,r,o);return s},n}(Ka);const kl=Dl;var jl=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])},t(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)}}();const Gl=function(t){function e(e){return t.call(this,e)||this}return jl(e,t),e.prototype.createRenderer=function(){return new kl(this)},e}(_a),zl="preload",Wl="useInterimTilesOnError";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])},t(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)}}();const Xl=function(t){function e(e){var n=this,i=e||{},r=Rt({},i);return delete r.preload,delete r.useInterimTilesOnError,(n=t.call(this,r)||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 Nl(e,t),e.prototype.getPreload=function(){return this.get(zl)},e.prototype.setPreload=function(t){this.set(zl,t)},e.prototype.getUseInterimTilesOnError=function(){return this.get(Wl)},e.prototype.setUseInterimTilesOnError=function(t){this.set(Wl,t)},e.prototype.getData=function(e){return t.prototype.getData.call(this,e)},e}(pe);var 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])},t(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 n(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 bs(0,0,0,0),n}return Yl(n,t),n.prototype.isDrawableTile=function(t){var e=this.getLayer(),n=t.getState(),i=e.getUseInterimTilesOnError();return 2==n||4==n||3==n&&!i},n.prototype.getTile=function(t,e,n,i){var r=i.pixelRatio,o=i.viewState.projection,s=this.getLayer(),a=s.getSource().getTile(t,e,n,r,o);return 3==a.getState()&&(s.getUseInterimTilesOnError()?s.getPreload()>0&&(this.newTiles_=!0):a.setState(2)),this.isDrawableTile(a)||(a=a.getInterimTile()),a},n.prototype.getData=function(t){var e=this.frameState;if(!e)return null;var n=this.getLayer(),i=b(e.pixelToCoordinateTransform,t.slice()),r=n.getExtent();if(r&&!D(r,i))return null;for(var o=e.pixelRatio,s=e.viewState.projection,a=e.viewState,l=n.getRenderSource(),h=l.getTileGridForProjection(a.projection),u=l.getTilePixelRatio(e.pixelRatio),c=h.getZForResolution(a.resolution);c>=h.getMinZoom();--c){var p=h.getTileCoordForCoordAndZ(i,c),f=l.getTile(c,p[1],p[2],o,s);if(!(f instanceof as||f instanceof gs))return null;if(2===f.getState()){var d=h.getOrigin(c),_=Ar(h.getTileSize(c)),g=h.getResolution(c),y=Math.floor(u*((i[0]-d[0])/g-p[1]*_[0])),v=Math.floor(u*((d[1]-i[1])/g-p[2]*_[1]));return this.getImageData(f.getImage(),y,v)}}return null},n.prototype.loadedTileCallback=function(e,n,i){return!!this.isDrawableTile(i)&&t.prototype.loadedTileCallback.call(this,e,n,i)},n.prototype.prepareFrame=function(t){return!!this.getLayer().getSource()},n.prototype.renderFrame=function(t,n){var i=t.layerStatesArray[t.layerIndex],r=t.viewState,o=r.projection,s=r.resolution,a=r.center,l=r.rotation,h=t.pixelRatio,u=this.getLayer(),c=u.getSource(),f=c.getRevision(),d=c.getTileGridForProjection(o),_=d.getZForResolution(s,c.zDirection),g=d.getResolution(_),y=t.extent,v=i.extent&&Ri(i.extent);v&&(y=$(y,Ri(i.extent)));var m=c.getTilePixelRatio(h),x=Math.round(t.size[0]*m),w=Math.round(t.size[1]*m);if(l){var S=Math.round(Math.sqrt(x*x+w*w));x=S,w=S}var C=g*x/2/m,E=g*w/2/m,T=[a[0]-C,a[1]-E,a[0]+C,a[1]+E],P=d.getTileRangeForExtentAndZ(y,_),M={};M[_]={};var L=this.createLoadedTileFinder(c,o,M),F=this.tmpExtent,A=this.tmpTileRange_;this.newTiles_=!1;for(var D=P.minX;D<=P.maxX;++D)for(var k=P.minY;k<=P.maxY;++k){var j=this.getTile(_,D,k,t);if(this.isDrawableTile(j)){var G=p(this);if(2==j.getState()){M[_][j.tileCoord.toString()]=j;var z=j.inTransition(G);this.newTiles_||!z&&-1!==this.renderedTiles.indexOf(j)||(this.newTiles_=!0)}if(1===j.getAlpha(G,t.time))continue}var W=d.getTileCoordChildTileRange(j.tileCoord,A,F),X=!1;W&&(X=L(_+1,W)),X||d.forEachTileCoordParentTileRange(j.tileCoord,L,A,F)}var Y=g/s;R(this.pixelTransform,t.size[0]/2,t.size[1]/2,1/m,1/m,l,-x/2,-w/2);var K=I(this.pixelTransform);this.useContainer(n,K,i.opacity,this.getBackground(t));var Z=this.context,B=Z.canvas;O(this.inversePixelTransform,this.pixelTransform),R(this.tempTransform,x/2,w/2,Y,Y,0,-x/2,-w/2),B.width!=x||B.height!=w?(B.width=x,B.height=w):this.containerReused||Z.clearRect(0,0,x,w),v&&this.clipUnrotated(Z,t,v),c.getInterpolate()||Rt(Z,us),this.preRender(Z,t),this.renderedTiles.length=0;var U,V,H,q=Object.keys(M).map(Number);q.sort(e),1!==i.opacity||this.containerReused&&!c.getOpaque(t.viewState.projection)?(U=[],V=[]):q=q.reverse();for(var J=q.length-1;J>=0;--J){var Q=q[J],et=c.getTilePixelSize(Q,h,o),nt=d.getResolution(Q)/g,rt=et[0]*nt*Y,ot=et[1]*nt*Y,st=d.getTileCoordForCoordAndZ(tt(T),Q),at=d.getTileCoordExtent(st),lt=b(this.tempTransform,[m*(at[0]-T[0])/g,m*(T[3]-at[3])/g]),ht=m*c.getGutterForProjection(o),ut=M[Q];for(var ct in ut){var pt=(j=ut[ct]).tileCoord,ft=st[1]-pt[1],dt=Math.round(lt[0]-(ft-1)*rt),_t=st[2]-pt[2],gt=Math.round(lt[1]-(_t-1)*ot),yt=dt-(D=Math.round(lt[0]-ft*rt)),vt=gt-(k=Math.round(lt[1]-_t*ot)),mt=_===Q,xt=!1;if(!(z=mt&&1!==j.getAlpha(p(this),t.time)))if(U){H=[D,k,D+yt,k,D+yt,k+vt,D,k+vt];for(var wt=0,St=U.length;wt<St;++wt)if(_!==Q&&Q<V[wt]){var Ct=U[wt];it([D,k,D+yt,k+vt],[Ct[0],Ct[3],Ct[4],Ct[7]])&&(xt||(Z.save(),xt=!0),Z.beginPath(),Z.moveTo(H[0],H[1]),Z.lineTo(H[2],H[3]),Z.lineTo(H[4],H[5]),Z.lineTo(H[6],H[7]),Z.moveTo(Ct[6],Ct[7]),Z.lineTo(Ct[4],Ct[5]),Z.lineTo(Ct[2],Ct[3]),Z.lineTo(Ct[0],Ct[1]),Z.clip())}U.push(H),V.push(Q)}else Z.clearRect(D,k,yt,vt);this.drawTileImage(j,t,D,k,yt,vt,ht,mt),U&&!z?(xt&&Z.restore(),this.renderedTiles.unshift(j)):this.renderedTiles.push(j),this.updateUsedTiles(t.usedTiles,c,j)}}this.renderedRevision=f,this.renderedResolution=g,this.extentChanged=!this.renderedExtent_||!N(this.renderedExtent_,T),this.renderedExtent_=T,this.renderedPixelRatio=h,this.renderedProjection=o,this.manageTilePyramid(t,c,d,h,o,y,_,u.getPreload()),this.scheduleExpireCache(t,c),this.postRender(Z,t),i.extent&&Z.restore(),Rt(Z,cs),K!==B.style.transform&&(B.style.transform=K);var Et=Re(i.opacity),Tt=this.container;return Et!==Tt.style.opacity&&(Tt.style.opacity=Et),this.container},n.prototype.drawTileImage=function(t,e,n,i,r,o,s,a){var l=this.getTileImage(t);if(l){var h=p(this),u=a?t.getAlpha(h,e.time):1,c=u!==this.context.globalAlpha;c&&(this.context.save(),this.context.globalAlpha=u),this.context.drawImage(l,s,s,l.width-2*s,l.height-2*s,n,i,r,o),c&&this.context.restore(),1!==u?e.animate=!0:a&&t.endTransition(h)}},n.prototype.getImage=function(){var t=this.context;return t?t.canvas:null},n.prototype.getTileImage=function(t){return t.getImage()},n.prototype.scheduleExpireCache=function(t,e){if(e.canExpireCache()){var n=function(t,e,n){var i=p(t);i in n.usedTiles&&t.expireCache(n.viewState.projection,n.usedTiles[i])}.bind(null,e);t.postRenderFunctions.push(n)}},n.prototype.updateUsedTiles=function(t,e,n){var i=p(e);i in t||(t[i]={}),t[i][n.getKey()]=!0},n.prototype.manageTilePyramid=function(t,e,n,i,r,o,s,a,l){var h=p(e);h in t.wantedTiles||(t.wantedTiles[h]={});var u,c,f,d,_,g,y=t.wantedTiles[h],v=t.tileQueue,m=0;for(g=n.getMinZoom();g<=s;++g)for(c=n.getTileRangeForExtentAndZ(o,g,c),f=n.getResolution(g),d=c.minX;d<=c.maxX;++d)for(_=c.minY;_<=c.maxY;++_)s-g<=a?(++m,0==(u=e.getTile(g,d,_,i,r)).getState()&&(y[u.getKey()]=!0,v.isKeyQueued(u.getKey())||v.enqueue([u,h,n.getTileCoordCenter(u.tileCoord),f])),void 0!==l&&l(u)):e.useTile(g,d,_,r);e.updateCacheSize(m,r)},n}(Ka);const Zl=Kl;var 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])},t(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)}}();const Ul=function(t){function e(e){return t.call(this,e)||this}return Bl(e,t),e.prototype.createRenderer=function(){return new Zl(this)},e}(Xl);!function(t,e,n){e.openlayers_field={waitForIcon:function(t){return new Promise((function(e){var n=new Image;n.addEventListener("load",(function(){e(n)})),""===t&&(t="data:image/svg+xml,"+escape('<svg version="1.1" id="Layer_1" xmlns="http://www.w3.org/2000/svg" xmlns:xlink="http://www.w3.org/1999/xlink" x="0px" y="0px" width="40px" height="40px" viewBox="0 0 40 40" enable-background="new 0 0 25 25" xml:space="preserve"><path fill="#156BB1" d="M22.906,10.438c0,4.367-6.281,14.312-7.906,17.031c-1.719-2.75-7.906-12.665-7.906-17.031S10.634,2.531,15,2.531S22.906,6.071,22.906,10.438z"/><circle fill="#FFFFFF" cx="15" cy="10.677" r="3.291"/></svg>')),n.src=t}))}},e.behaviors.openlayers_field={attach:function(i){t(i).find('div[data-type="openlayers6"][data-processed="false"]').each((function(){var i=t(this),r=n.openlayers6[i.prop("id")],o=[],s=i.data("icon");e.openlayers_field.waitForIcon(s).then((function(t){var e=Math.min(40,t.width),n=Math.ceil(t.height*(e/t.width)),s=document.createElement("canvas");s.getContext("2d").drawImage(t,0,0,t.width,t.height,0,0,e,n);var a=s.toDataURL(),l=new Image;l.src=a;var h=new Rl({anchor:[.5,e],anchorXUnits:"fraction",anchorYUnits:"pixels",img:l,imgSize:[e,n]}),u=new pa({image:h});r.points.forEach((function(t){var e=new $s({geometry:new fr(fi([t.lon,t.lat])),name:"item"});e.setStyle(u),o.push(e)}));var c=new $o({features:o}),p=new Gl({source:c});i.width(r.width),i.height(r.height);var f=[];if(f.push(new Ul({source:new Bs({crossOrigin:null})})),void 0!==r.wms){var d=new Ul({source:new qs(r.wms)});f.push(d)}f.push(p),new Wo({layers:f,target:i.prop("id"),view:new Pr({center:fi([r.center.lon,r.center.lat]),zoom:r.zoom})}),i.attr("data-processed","true")}))}))}}}(jQuery,Drupal,drupalSettings)})()})();
\ No newline at end of file
+(()=>{var t={2582:function(t){t.exports=function(){"use strict";function t(t,n,s,r,o){!function t(i,n,s,r,o){for(;r>s;){if(r-s>600){var a=r-s+1,h=n-s+1,l=Math.log(a),c=.5*Math.exp(2*l/3),u=.5*Math.sqrt(l*c*(a-c)/a)*(h-a/2<0?-1:1);t(i,n,Math.max(s,Math.floor(n-h*c/a+u)),Math.min(r,Math.floor(n+(a-h)*c/a+u)),o)}var d=i[n],g=s,_=r;for(e(i,s,n),o(i[r],d)>0&&e(i,s,r);g<_;){for(e(i,g,_),g++,_--;o(i[g],d)<0;)g++;for(;o(i[_],d)>0;)_--}0===o(i[s],d)?e(i,s,_):e(i,++_,r),_<=n&&(s=_+1),n<=_&&(r=_-1)}}(t,n,s||0,r||t.length-1,o||i)}function e(t,e,i){var n=t[e];t[e]=t[i],t[i]=n}function i(t,e){return t<e?-1:t>e?1:0}var n=function(t){void 0===t&&(t=9),this._maxEntries=Math.max(4,t),this._minEntries=Math.max(2,Math.ceil(.4*this._maxEntries)),this.clear()};function s(t,e,i){if(!i)return e.indexOf(t);for(var n=0;n<e.length;n++)if(i(t,e[n]))return n;return-1}function r(t,e){o(t,0,t.children.length,e,t)}function o(t,e,i,n,s){s||(s=_(null)),s.minX=1/0,s.minY=1/0,s.maxX=-1/0,s.maxY=-1/0;for(var r=e;r<i;r++){var o=t.children[r];a(s,t.leaf?n(o):o)}return s}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 h(t,e){return t.minX-e.minX}function l(t,e){return t.minY-e.minY}function c(t){return(t.maxX-t.minX)*(t.maxY-t.minY)}function u(t){return t.maxX-t.minX+(t.maxY-t.minY)}function d(t,e){return t.minX<=e.minX&&t.minY<=e.minY&&e.maxX<=t.maxX&&e.maxY<=t.maxY}function g(t,e){return e.minX<=t.maxX&&e.minY<=t.maxY&&e.maxX>=t.minX&&e.maxY>=t.minY}function _(t){return{children:t,height:1,leaf:!0,minX:1/0,minY:1/0,maxX:-1/0,maxY:-1/0}}function f(e,i,n,s,r){for(var o=[i,n];o.length;)if(!((n=o.pop())-(i=o.pop())<=s)){var a=i+Math.ceil((n-i)/s/2)*s;t(e,a,i,n,r),o.push(i,a,a,n)}}return n.prototype.all=function(){return this._all(this.data,[])},n.prototype.search=function(t){var e=this.data,i=[];if(!g(t,e))return i;for(var n=this.toBBox,s=[];e;){for(var r=0;r<e.children.length;r++){var o=e.children[r],a=e.leaf?n(o):o;g(t,a)&&(e.leaf?i.push(o):d(t,a)?this._all(o,i):s.push(o))}e=s.pop()}return i},n.prototype.collides=function(t){var e=this.data;if(!g(t,e))return!1;for(var i=[];e;){for(var n=0;n<e.children.length;n++){var s=e.children[n],r=e.leaf?this.toBBox(s):s;if(g(t,r)){if(e.leaf||d(t,r))return!0;i.push(s)}}e=i.pop()}return!1},n.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 i=this._build(t.slice(),0,t.length-1,0);if(this.data.children.length)if(this.data.height===i.height)this._splitRoot(this.data,i);else{if(this.data.height<i.height){var n=this.data;this.data=i,i=n}this._insert(i,this.data.height-i.height-1,!0)}else this.data=i;return this},n.prototype.insert=function(t){return t&&this._insert(t,this.data.height-1),this},n.prototype.clear=function(){return this.data=_([]),this},n.prototype.remove=function(t,e){if(!t)return this;for(var i,n,r,o=this.data,a=this.toBBox(t),h=[],l=[];o||h.length;){if(o||(o=h.pop(),n=h[h.length-1],i=l.pop(),r=!0),o.leaf){var c=s(t,o.children,e);if(-1!==c)return o.children.splice(c,1),h.push(o),this._condense(h),this}r||o.leaf||!d(o,a)?n?(i++,o=n.children[i],r=!1):o=null:(h.push(o),l.push(i),i=0,n=o,o=o.children[0])}return this},n.prototype.toBBox=function(t){return t},n.prototype.compareMinX=function(t,e){return t.minX-e.minX},n.prototype.compareMinY=function(t,e){return t.minY-e.minY},n.prototype.toJSON=function(){return this.data},n.prototype.fromJSON=function(t){return this.data=t,this},n.prototype._all=function(t,e){for(var i=[];t;)t.leaf?e.push.apply(e,t.children):i.push.apply(i,t.children),t=i.pop();return e},n.prototype._build=function(t,e,i,n){var s,o=i-e+1,a=this._maxEntries;if(o<=a)return r(s=_(t.slice(e,i+1)),this.toBBox),s;n||(n=Math.ceil(Math.log(o)/Math.log(a)),a=Math.ceil(o/Math.pow(a,n-1))),(s=_([])).leaf=!1,s.height=n;var h=Math.ceil(o/a),l=h*Math.ceil(Math.sqrt(a));f(t,e,i,l,this.compareMinX);for(var c=e;c<=i;c+=l){var u=Math.min(c+l-1,i);f(t,c,u,h,this.compareMinY);for(var d=c;d<=u;d+=h){var g=Math.min(d+h-1,u);s.children.push(this._build(t,d,g,n-1))}}return r(s,this.toBBox),s},n.prototype._chooseSubtree=function(t,e,i,n){for(;n.push(e),!e.leaf&&n.length-1!==i;){for(var s=1/0,r=1/0,o=void 0,a=0;a<e.children.length;a++){var h=e.children[a],l=c(h),u=(d=t,g=h,(Math.max(g.maxX,d.maxX)-Math.min(g.minX,d.minX))*(Math.max(g.maxY,d.maxY)-Math.min(g.minY,d.minY))-l);u<r?(r=u,s=l<s?l:s,o=h):u===r&&l<s&&(s=l,o=h)}e=o||e.children[0]}var d,g;return e},n.prototype._insert=function(t,e,i){var n=i?t:this.toBBox(t),s=[],r=this._chooseSubtree(n,this.data,e,s);for(r.children.push(t),a(r,n);e>=0&&s[e].children.length>this._maxEntries;)this._split(s,e),e--;this._adjustParentBBoxes(n,s,e)},n.prototype._split=function(t,e){var i=t[e],n=i.children.length,s=this._minEntries;this._chooseSplitAxis(i,s,n);var o=this._chooseSplitIndex(i,s,n),a=_(i.children.splice(o,i.children.length-o));a.height=i.height,a.leaf=i.leaf,r(i,this.toBBox),r(a,this.toBBox),e?t[e-1].children.push(a):this._splitRoot(i,a)},n.prototype._splitRoot=function(t,e){this.data=_([t,e]),this.data.height=t.height+1,this.data.leaf=!1,r(this.data,this.toBBox)},n.prototype._chooseSplitIndex=function(t,e,i){for(var n,s,r,a,h,l,u,d=1/0,g=1/0,_=e;_<=i-e;_++){var f=o(t,0,_,this.toBBox),m=o(t,_,i,this.toBBox),p=(s=f,r=m,void 0,void 0,void 0,void 0,a=Math.max(s.minX,r.minX),h=Math.max(s.minY,r.minY),l=Math.min(s.maxX,r.maxX),u=Math.min(s.maxY,r.maxY),Math.max(0,l-a)*Math.max(0,u-h)),y=c(f)+c(m);p<d?(d=p,n=_,g=y<g?y:g):p===d&&y<g&&(g=y,n=_)}return n||i-e},n.prototype._chooseSplitAxis=function(t,e,i){var n=t.leaf?this.compareMinX:h,s=t.leaf?this.compareMinY:l;this._allDistMargin(t,e,i,n)<this._allDistMargin(t,e,i,s)&&t.children.sort(n)},n.prototype._allDistMargin=function(t,e,i,n){t.children.sort(n);for(var s=this.toBBox,r=o(t,0,e,s),h=o(t,i-e,i,s),l=u(r)+u(h),c=e;c<i-e;c++){var d=t.children[c];a(r,t.leaf?s(d):d),l+=u(r)}for(var g=i-e-1;g>=e;g--){var _=t.children[g];a(h,t.leaf?s(_):_),l+=u(h)}return l},n.prototype._adjustParentBBoxes=function(t,e,i){for(var n=i;n>=0;n--)a(e[n],t)},n.prototype._condense=function(t){for(var e=t.length-1,i=void 0;e>=0;e--)0===t[e].children.length?e>0?(i=t[e-1].children).splice(i.indexOf(t[e]),1):this.clear():r(t[e],this.toBBox)},n}()}},e={};function i(n){var s=e[n];if(void 0!==s)return s.exports;var r=e[n]={exports:{}};return t[n].call(r.exports,r,r.exports,i),r.exports}(()=>{"use strict";const t=class{constructor(t){this.propagationStopped,this.defaultPrevented,this.type=t,this.target=null}preventDefault(){this.defaultPrevented=!0}stopPropagation(){this.propagationStopped=!0}},e="propertychange",n=class{constructor(){this.disposed=!1}dispose(){this.disposed||(this.disposed=!0,this.disposeInternal())}disposeInternal(){}};function s(t,e){return t>e?1:t<e?-1:0}function r(t,e,i){if(t[0]<=e)return 0;const n=t.length;if(e<=t[n-1])return n-1;if("function"==typeof i){for(let s=1;s<n;++s){const n=t[s];if(n===e)return s;if(n<e)return i(e,t[s-1],n)>0?s-1:s}return n-1}if(i>0){for(let i=1;i<n;++i)if(t[i]<e)return i-1;return n-1}if(i<0){for(let i=1;i<n;++i)if(t[i]<=e)return i;return n-1}for(let i=1;i<n;++i){if(t[i]==e)return i;if(t[i]<e)return t[i-1]-e<e-t[i]?i-1:i}return n-1}function o(t,e,i){for(;e<i;){const n=t[e];t[e]=t[i],t[i]=n,++e,--i}}function a(t,e){const i=Array.isArray(e)?e:[e],n=i.length;for(let e=0;e<n;e++)t[t.length]=i[e]}function h(t,e){const i=t.length;if(i!==e.length)return!1;for(let n=0;n<i;n++)if(t[n]!==e[n])return!1;return!0}function l(){return!0}function c(){return!1}function u(){}function d(t){for(const e in t)delete t[e]}function g(t){let e;for(e in t)return!1;return!e}const _=class extends n{constructor(t){super(),this.eventTarget_=t,this.pendingRemovals_=null,this.dispatching_=null,this.listeners_=null}addEventListener(t,e){if(!t||!e)return;const i=this.listeners_||(this.listeners_={}),n=i[t]||(i[t]=[]);n.includes(e)||n.push(e)}dispatchEvent(e){const i="string"==typeof e,n=i?e:e.type,s=this.listeners_&&this.listeners_[n];if(!s)return;const r=i?new t(e):e;r.target||(r.target=this.eventTarget_||this);const o=this.dispatching_||(this.dispatching_={}),a=this.pendingRemovals_||(this.pendingRemovals_={});let h;n in o||(o[n]=0,a[n]=0),++o[n];for(let t=0,e=s.length;t<e;++t)if(h="handleEvent"in s[t]?s[t].handleEvent(r):s[t].call(this,r),!1===h||r.propagationStopped){h=!1;break}if(0==--o[n]){let t=a[n];for(delete a[n];t--;)this.removeEventListener(n,u);delete o[n]}return h}disposeInternal(){this.listeners_&&d(this.listeners_)}getListeners(t){return this.listeners_&&this.listeners_[t]||void 0}hasListener(t){return!!this.listeners_&&(t?t in this.listeners_:Object.keys(this.listeners_).length>0)}removeEventListener(t,e){const i=this.listeners_&&this.listeners_[t];if(i){const n=i.indexOf(e);-1!==n&&(this.pendingRemovals_&&t in this.pendingRemovals_?(i[n]=u,++this.pendingRemovals_[t]):(i.splice(n,1),0===i.length&&delete this.listeners_[t]))}}},f="change",m="contextmenu",p="click",y="keydown",x="keypress",v="touchmove",S="wheel";function C(t,e,i,n,s){if(n&&n!==t&&(i=i.bind(n)),s){const n=i;i=function(){t.removeEventListener(e,i),n.apply(this,arguments)}}const r={target:t,type:e,listener:i};return t.addEventListener(e,i),r}function w(t,e,i,n){return C(t,e,i,n,!0)}function E(t){t&&t.target&&(t.target.removeEventListener(t.type,t.listener),d(t))}class T extends _{constructor(){super(),this.on=this.onInternal,this.once=this.onceInternal,this.un=this.unInternal,this.revision_=0}changed(){++this.revision_,this.dispatchEvent(f)}getRevision(){return this.revision_}onInternal(t,e){if(Array.isArray(t)){const i=t.length,n=new Array(i);for(let s=0;s<i;++s)n[s]=C(this,t[s],e);return n}return C(this,t,e)}onceInternal(t,e){let i;if(Array.isArray(t)){const n=t.length;i=new Array(n);for(let s=0;s<n;++s)i[s]=w(this,t[s],e)}else i=w(this,t,e);return e.ol_key=i,i}unInternal(t,e){const i=e.ol_key;if(i)!function(t){if(Array.isArray(t))for(let e=0,i=t.length;e<i;++e)E(t[e]);else E(t)}(i);else if(Array.isArray(t))for(let i=0,n=t.length;i<n;++i)this.removeEventListener(t[i],e);else this.removeEventListener(t,e)}}T.prototype.on,T.prototype.once,T.prototype.un;const R=T;function I(){throw new Error("Unimplemented abstract method.")}let b=0;function M(t){return t.ol_uid||(t.ol_uid=String(++b))}class F extends t{constructor(t,e,i){super(t),this.key=e,this.oldValue=i}}const L=class extends R{constructor(t){super(),this.on,this.once,this.un,M(this),this.values_=null,void 0!==t&&this.setProperties(t)}get(t){let e;return this.values_&&this.values_.hasOwnProperty(t)&&(e=this.values_[t]),e}getKeys(){return this.values_&&Object.keys(this.values_)||[]}getProperties(){return this.values_&&Object.assign({},this.values_)||{}}hasProperties(){return!!this.values_}notify(t,i){let n;n=`change:${t}`,this.hasListener(n)&&this.dispatchEvent(new F(n,t,i)),n=e,this.hasListener(n)&&this.dispatchEvent(new F(n,t,i))}addChangeListener(t,e){this.addEventListener(`change:${t}`,e)}removeChangeListener(t,e){this.removeEventListener(`change:${t}`,e)}set(t,e,i){const n=this.values_||(this.values_={});if(i)n[t]=e;else{const i=n[t];n[t]=e,i!==e&&this.notify(t,i)}}setProperties(t,e){for(const i in t)this.set(i,t[i],e)}applyProperties(t){t.values_&&Object.assign(this.values_||(this.values_={}),t.values_)}unset(t,e){if(this.values_&&t in this.values_){const i=this.values_[t];delete this.values_[t],g(this.values_)&&(this.values_=null),e||this.notify(t,i)}}},P={1:"The view center is not defined",2:"The view resolution is not defined",3:"The view rotation is not defined",4:"`image` and `src` cannot be provided at the same time",5:"`imgSize` must be set when `image` is provided",7:"`format` must be set when `url` is set",8:"Unknown `serverType` configured",9:"`url` must be configured or set using `#setUrl()`",10:"The default `geometryFunction` can only handle `Point` geometries",11:"`options.featureTypes` must be an Array",12:"`options.geometryName` must also be provided when `options.bbox` is set",13:"Invalid corner",14:"Invalid color",15:"Tried to get a value for a key that does not exist in the cache",16:"Tried to set a value for a key that is used already",17:"`resolutions` must be sorted in descending order",18:"Either `origin` or `origins` must be configured, never both",19:"Number of `tileSizes` and `resolutions` must be equal",20:"Number of `origins` and `resolutions` must be equal",22:"Either `tileSize` or `tileSizes` must be configured, never both",24:"Invalid extent or geometry provided as `geometry`",25:"Cannot fit empty extent provided as `geometry`",26:"Features must have an id set",27:"Features must have an id set",28:'`renderMode` must be `"hybrid"` or `"vector"`',30:"The passed `feature` was already added to the source",31:"Tried to enqueue an `element` that was already added to the queue",32:"Transformation matrix cannot be inverted",33:"Invalid units",34:"Invalid geometry layout",36:"Unknown SRS type",37:"Unknown geometry type found",38:"`styleMapValue` has an unknown type",39:"Unknown geometry type",40:"Expected `feature` to have a geometry",41:"Expected an `ol/style/Style` or an array of `ol/style/Style.js`",42:"Question unknown, the answer is 42",43:"Expected `layers` to be an array or a `Collection`",47:"Expected `controls` to be an array or an `ol/Collection`",48:"Expected `interactions` to be an array or an `ol/Collection`",49:"Expected `overlays` to be an array or an `ol/Collection`",50:"`options.featureTypes` should be an Array",51:"Either `url` or `tileJSON` options must be provided",52:"Unknown `serverType` configured",53:"Unknown `tierSizeCalculation` configured",55:"The {-y} placeholder requires a tile grid with extent",56:"mapBrowserEvent must originate from a pointer event",57:"At least 2 conditions are required",59:"Invalid command found in the PBF",60:"Missing or invalid `size`",61:"Cannot determine IIIF Image API version from provided image information JSON",62:"A `WebGLArrayBuffer` must either be of type `ELEMENT_ARRAY_BUFFER` or `ARRAY_BUFFER`",64:"Layer opacity must be a number",66:"`forEachFeatureAtCoordinate` cannot be used on a WebGL layer if the hit detection logic has not been enabled. This is done by providing adequate shaders using the `hitVertexShader` and `hitFragmentShader` properties of `WebGLPointsLayerRenderer`",67:"A layer can only be added to the map once. Use either `layer.setMap()` or `map.addLayer()`, not both",68:"A VectorTile source can only be rendered if it has a projection compatible with the view projection",69:"`width` or `height` cannot be provided together with `scale`"};class k extends Error{constructor(t){const e=P[t];super(e),this.code=t,this.name="AssertionError",this.message=e}}const A=k,O="add",D="remove",z="length";class G extends t{constructor(t,e,i){super(t),this.element=e,this.index=i}}const W=class extends L{constructor(t,e){if(super(),this.on,this.once,this.un,e=e||{},this.unique_=!!e.unique,this.array_=t||[],this.unique_)for(let t=0,e=this.array_.length;t<e;++t)this.assertUnique_(this.array_[t],t);this.updateLength_()}clear(){for(;this.getLength()>0;)this.pop()}extend(t){for(let e=0,i=t.length;e<i;++e)this.push(t[e]);return this}forEach(t){const e=this.array_;for(let i=0,n=e.length;i<n;++i)t(e[i],i,e)}getArray(){return this.array_}item(t){return this.array_[t]}getLength(){return this.get(z)}insertAt(t,e){if(t<0||t>this.getLength())throw new Error("Index out of bounds: "+t);this.unique_&&this.assertUnique_(e),this.array_.splice(t,0,e),this.updateLength_(),this.dispatchEvent(new G(O,e,t))}pop(){return this.removeAt(this.getLength()-1)}push(t){this.unique_&&this.assertUnique_(t);const e=this.getLength();return this.insertAt(e,t),this.getLength()}remove(t){const e=this.array_;for(let i=0,n=e.length;i<n;++i)if(e[i]===t)return this.removeAt(i)}removeAt(t){if(t<0||t>=this.getLength())return;const e=this.array_[t];return this.array_.splice(t,1),this.updateLength_(),this.dispatchEvent(new G(D,e,t)),e}setAt(t,e){if(t>=this.getLength())return void this.insertAt(t,e);if(t<0)throw new Error("Index out of bounds: "+t);this.unique_&&this.assertUnique_(e,t);const i=this.array_[t];this.array_[t]=e,this.dispatchEvent(new G(D,i,t)),this.dispatchEvent(new G(O,e,t))}updateLength_(){this.set(z,this.array_.length)}assertUnique_(t,e){for(let i=0,n=this.array_.length;i<n;++i)if(this.array_[i]===t&&i!==e)throw new A(58)}},X="undefined"!=typeof navigator&&void 0!==navigator.userAgent?navigator.userAgent.toLowerCase():"",N=X.includes("firefox"),Y=(X.includes("safari")&&!X.includes("chrom")&&(X.includes("version/15.4")||/cpu (os|iphone os) 15_4 like mac os x/.test(X)),X.includes("webkit")&&!X.includes("edge")),j=X.includes("macintosh"),B="undefined"!=typeof devicePixelRatio?devicePixelRatio:1,K="undefined"!=typeof WorkerGlobalScope&&"undefined"!=typeof OffscreenCanvas&&self instanceof WorkerGlobalScope,Z="undefined"!=typeof Image&&Image.prototype.decode,V=function(){let t=!1;try{const e=Object.defineProperty({},"passive",{get:function(){t=!0}});window.addEventListener("_",null,e),window.removeEventListener("_",null,e)}catch(t){}return t}();function U(t,e){if(!t)throw new A(e)}function q(t,e){const i=e[0],n=e[1];return e[0]=t[0]*i+t[2]*n+t[4],e[1]=t[1]*i+t[3]*n+t[5],e}function H(t,e,i,n,s,r,o,a){const h=Math.sin(r),l=Math.cos(r);return t[0]=n*l,t[1]=s*h,t[2]=-n*h,t[3]=s*l,t[4]=o*n*l-a*n*h+e,t[5]=o*s*h+a*s*l+i,t}function J(t,e){const i=(n=e)[0]*n[3]-n[1]*n[2];var n;U(0!==i,32);const s=e[0],r=e[1],o=e[2],a=e[3],h=e[4],l=e[5];return t[0]=a/i,t[1]=-r/i,t[2]=-o/i,t[3]=s/i,t[4]=(o*l-a*h)/i,t[5]=-(s*l-r*h)/i,t}let Q;function $(t){const e="matrix("+t.join(", ")+")";if(K)return e;const i=Q||(Q=document.createElement("div"));return i.style.transform=e,i.style.transform}new Array(6);function tt(t){const e=[1/0,1/0,-1/0,-1/0];for(let i=0,n=t.length;i<n;++i)ut(e,t[i]);return e}function et(t,e,i){return i?(i[0]=t[0]-e,i[1]=t[1]-e,i[2]=t[2]+e,i[3]=t[3]+e,i):[t[0]-e,t[1]-e,t[2]+e,t[3]+e]}function it(t,e){return e?(e[0]=t[0],e[1]=t[1],e[2]=t[2],e[3]=t[3],e):t.slice()}function nt(t,e,i){let n,s;return n=e<t[0]?t[0]-e:t[2]<e?e-t[2]:0,s=i<t[1]?t[1]-i:t[3]<i?i-t[3]:0,n*n+s*s}function st(t,e){return ot(t,e[0],e[1])}function rt(t,e){return t[0]<=e[0]&&e[2]<=t[2]&&t[1]<=e[1]&&e[3]<=t[3]}function ot(t,e,i){return t[0]<=e&&e<=t[2]&&t[1]<=i&&i<=t[3]}function at(t,e){const i=t[0],n=t[1],s=t[2],r=t[3],o=e[0],a=e[1];let h=0;return o<i?h|=16:o>s&&(h|=4),a<n?h|=8:a>r&&(h|=2),0===h&&(h=1),h}function ht(t,e,i,n,s){return s?(s[0]=t,s[1]=e,s[2]=i,s[3]=n,s):[t,e,i,n]}function lt(t){return ht(1/0,1/0,-1/0,-1/0,t)}function ct(t,e){return t[0]==e[0]&&t[2]==e[2]&&t[1]==e[1]&&t[3]==e[3]}function ut(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 dt(t,e,i,n,s){for(;i<n;i+=s)gt(t,e[i],e[i+1]);return t}function gt(t,e,i){t[0]=Math.min(t[0],e),t[1]=Math.min(t[1],i),t[2]=Math.max(t[2],e),t[3]=Math.max(t[3],i)}function _t(t,e){let i;return i=e(mt(t)),i||(i=e(pt(t)),i||(i=e(Tt(t)),i||(i=e(Et(t)),i||!1)))}function ft(t){let e=0;return bt(t)||(e=Rt(t)*Ct(t)),e}function mt(t){return[t[0],t[1]]}function pt(t){return[t[2],t[1]]}function yt(t){return[(t[0]+t[2])/2,(t[1]+t[3])/2]}function xt(t,e){let i;return"bottom-left"===e?i=mt(t):"bottom-right"===e?i=pt(t):"top-left"===e?i=Et(t):"top-right"===e?i=Tt(t):U(!1,13),i}function vt(t,e,i,n,s){const[r,o,a,h,l,c,u,d]=St(t,e,i,n);return ht(Math.min(r,a,l,u),Math.min(o,h,c,d),Math.max(r,a,l,u),Math.max(o,h,c,d),s)}function St(t,e,i,n){const s=e*n[0]/2,r=e*n[1]/2,o=Math.cos(i),a=Math.sin(i),h=s*o,l=s*a,c=r*o,u=r*a,d=t[0],g=t[1];return[d-h+u,g-l-c,d-h-u,g-l+c,d+h-u,g+l+c,d+h+u,g+l-c,d-h+u,g-l-c]}function Ct(t){return t[3]-t[1]}function wt(t,e,i){const n=i||[1/0,1/0,-1/0,-1/0];return It(t,e)?(t[0]>e[0]?n[0]=t[0]:n[0]=e[0],t[1]>e[1]?n[1]=t[1]:n[1]=e[1],t[2]<e[2]?n[2]=t[2]:n[2]=e[2],t[3]<e[3]?n[3]=t[3]:n[3]=e[3]):lt(n),n}function Et(t){return[t[0],t[3]]}function Tt(t){return[t[2],t[3]]}function Rt(t){return t[2]-t[0]}function It(t,e){return t[0]<=e[2]&&t[2]>=e[0]&&t[1]<=e[3]&&t[3]>=e[1]}function bt(t){return t[2]<t[0]||t[3]<t[1]}function Mt(t,e){const i=e.getExtent(),n=yt(t);if(e.canWrapX()&&(n[0]<i[0]||n[0]>=i[2])){const e=Rt(i),s=Math.floor((n[0]-i[0])/e)*e;t[0]-=s,t[2]-=s}return t}function Ft(t,e,i){return Math.min(Math.max(t,e),i)}function Lt(t,e,i,n,s,r){const o=s-i,a=r-n;if(0!==o||0!==a){const h=((t-i)*o+(e-n)*a)/(o*o+a*a);h>1?(i=s,n=r):h>0&&(i+=o*h,n+=a*h)}return Pt(t,e,i,n)}function Pt(t,e,i,n){const s=i-t,r=n-e;return s*s+r*r}function kt(t){return t*Math.PI/180}function At(t,e){const i=t%e;return i*e<0?i+e:i}function Ot(t,e,i){return t+i*(e-t)}function Dt(t,e){const i=Math.pow(10,e);return Math.round(t*i)/i}function zt(t,e){return Math.floor(Dt(t,e))}function Gt(t,e){return Math.ceil(Dt(t,e))}const Wt=/^#([a-f0-9]{3}|[a-f0-9]{4}(?:[a-f0-9]{2}){0,2})$/i,Xt=/^([a-z]*)$|^hsla?\(.*\)$/i;function Nt(t){return"string"==typeof t?t:Kt(t)}const Yt=function(){const t={};let e=0;return function(i){let n;if(t.hasOwnProperty(i))n=t[i];else{if(e>=1024){let i=0;for(const n in t)0==(3&i++)&&(delete t[n],--e)}n=function(t){let e,i,n,s,r;if(Xt.exec(t)&&(t=function(t){const e=document.createElement("div");if(e.style.color=t,""!==e.style.color){document.body.appendChild(e);const t=getComputedStyle(e).color;return document.body.removeChild(e),t}return""}(t)),Wt.exec(t)){const o=t.length-1;let a;a=o<=4?1:2;const h=4===o||8===o;e=parseInt(t.substr(1+0*a,a),16),i=parseInt(t.substr(1+1*a,a),16),n=parseInt(t.substr(1+2*a,a),16),s=h?parseInt(t.substr(1+3*a,a),16):255,1==a&&(e=(e<<4)+e,i=(i<<4)+i,n=(n<<4)+n,h&&(s=(s<<4)+s)),r=[e,i,n,s/255]}else t.startsWith("rgba(")?(r=t.slice(5,-1).split(",").map(Number),Bt(r)):t.startsWith("rgb(")?(r=t.slice(4,-1).split(",").map(Number),r.push(1),Bt(r)):U(!1,14);return r}(i),t[i]=n,++e}return n}}();function jt(t){return Array.isArray(t)?t:Yt(t)}function Bt(t){return t[0]=Ft(t[0]+.5|0,0,255),t[1]=Ft(t[1]+.5|0,0,255),t[2]=Ft(t[2]+.5|0,0,255),t[3]=Ft(t[3],0,1),t}function Kt(t){let e=t[0];e!=(0|e)&&(e=e+.5|0);let i=t[1];i!=(0|i)&&(i=i+.5|0);let n=t[2];return n!=(0|n)&&(n=n+.5|0),"rgba("+e+","+i+","+n+","+(void 0===t[3]?1:Math.round(100*t[3])/100)+")"}function Zt(t,e,i){return e+":"+t+":"+(i?Nt(i):"null")}const Vt=new class{constructor(){this.cache_={},this.cacheSize_=0,this.maxCacheSize_=32}clear(){this.cache_={},this.cacheSize_=0}canExpireCache(){return this.cacheSize_>this.maxCacheSize_}expire(){if(this.canExpireCache()){let t=0;for(const e in this.cache_){const i=this.cache_[e];0!=(3&t++)||i.hasListener()||(delete this.cache_[e],--this.cacheSize_)}}}get(t,e,i){const n=Zt(t,e,i);return n in this.cache_?this.cache_[n]:null}set(t,e,i,n){const s=Zt(t,e,i);this.cache_[s]=n,++this.cacheSize_}setSize(t){this.maxCacheSize_=t,this.expire()}},Ut="opacity",qt="visible",Ht="extent",Jt="zIndex",Qt="maxResolution",$t="minResolution",te="maxZoom",ee="minZoom",ie="source",ne=class extends L{constructor(t){super(),this.on,this.once,this.un,this.background_=t.background;const e=Object.assign({},t);"object"==typeof t.properties&&(delete e.properties,Object.assign(e,t.properties)),e.opacity=void 0!==t.opacity?t.opacity:1,U("number"==typeof e.opacity,64),e.visible=void 0===t.visible||t.visible,e.zIndex=t.zIndex,e.maxResolution=void 0!==t.maxResolution?t.maxResolution:1/0,e.minResolution=void 0!==t.minResolution?t.minResolution:0,e.minZoom=void 0!==t.minZoom?t.minZoom:-1/0,e.maxZoom=void 0!==t.maxZoom?t.maxZoom:1/0,this.className_=void 0!==e.className?e.className:"ol-layer",delete e.className,this.setProperties(e),this.state_=null}getBackground(){return this.background_}getClassName(){return this.className_}getLayerState(t){const e=this.state_||{layer:this,managed:void 0===t||t},i=this.getZIndex();return e.opacity=Ft(Math.round(100*this.getOpacity())/100,0,1),e.visible=this.getVisible(),e.extent=this.getExtent(),e.zIndex=void 0!==i||e.managed?i: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}getLayersArray(t){return I()}getLayerStatesArray(t){return I()}getExtent(){return this.get(Ht)}getMaxResolution(){return this.get(Qt)}getMinResolution(){return this.get($t)}getMinZoom(){return this.get(ee)}getMaxZoom(){return this.get(te)}getOpacity(){return this.get(Ut)}getSourceState(){return I()}getVisible(){return this.get(qt)}getZIndex(){return this.get(Jt)}setBackground(t){this.background_=t,this.changed()}setExtent(t){this.set(Ht,t)}setMaxResolution(t){this.set(Qt,t)}setMinResolution(t){this.set($t,t)}setMaxZoom(t){this.set(te,t)}setMinZoom(t){this.set(ee,t)}setOpacity(t){U("number"==typeof t,64),this.set(Ut,t)}setVisible(t){this.set(qt,t)}setZIndex(t){this.set(Jt,t)}disposeInternal(){this.state_&&(this.state_.layer=null,this.state_=null),super.disposeInternal()}},se="prerender",re="postrender",oe="precompose",ae="rendercomplete",he={CENTER:"center",RESOLUTION:"resolution",ROTATION:"rotation"},le={radians:6370997/(2*Math.PI),degrees:2*Math.PI*6370997/360,ft:.3048,m:1,"us-ft":1200/3937},ce=class{constructor(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}canWrapX(){return this.canWrapX_}getCode(){return this.code_}getExtent(){return this.extent_}getUnits(){return this.units_}getMetersPerUnit(){return this.metersPerUnit_||le[this.units_]}getWorldExtent(){return this.worldExtent_}getAxisOrientation(){return this.axisOrientation_}isGlobal(){return this.global_}setGlobal(t){this.global_=t,this.canWrapX_=!(!t||!this.extent_)}getDefaultTileGrid(){return this.defaultTileGrid_}setDefaultTileGrid(t){this.defaultTileGrid_=t}setExtent(t){this.extent_=t,this.canWrapX_=!(!this.global_||!t)}setWorldExtent(t){this.worldExtent_=t}setGetPointResolution(t){this.getPointResolutionFunc_=t}getPointResolutionFunc(){return this.getPointResolutionFunc_}},ue=6378137,de=Math.PI*ue,ge=[-de,-de,de,de],_e=[-180,-85,180,85],fe=ue*Math.log(Math.tan(Math.PI/2));class me extends ce{constructor(t){super({code:t,units:"m",extent:ge,global:!0,worldExtent:_e,getPointResolution:function(t,e){return t/Math.cosh(e[1]/ue)}})}}const pe=[new me("EPSG:3857"),new me("EPSG:102100"),new me("EPSG:102113"),new me("EPSG:900913"),new me("http://www.opengis.net/def/crs/EPSG/0/3857"),new me("http://www.opengis.net/gml/srs/epsg.xml#3857")];const ye=[-180,-90,180,90],xe=6378137*Math.PI/180;class ve extends ce{constructor(t,e){super({code:t,units:"degrees",extent:ye,axisOrientation:e,global:!0,metersPerUnit:xe,worldExtent:ye})}}const Se=[new ve("CRS:84"),new ve("EPSG:4326","neu"),new ve("urn:ogc:def:crs:OGC:1.3:CRS84"),new ve("urn:ogc:def:crs:OGC:2:84"),new ve("http://www.opengis.net/def/crs/OGC/1.3/CRS84"),new ve("http://www.opengis.net/gml/srs/epsg.xml#4326","neu"),new ve("http://www.opengis.net/def/crs/EPSG/0/4326","neu")];let Ce={},we={};function Ee(t,e,i){const n=t.getCode(),s=e.getCode();n in we||(we[n]={}),we[n][s]=i}function Te(t,e){let i=!0;for(let n=t.length-1;n>=0;--n)if(t[n]!=e[n]){i=!1;break}return i}function Re(t,e){const i=Math.cos(e),n=Math.sin(e),s=t[0]*i-t[1]*n,r=t[1]*i+t[0]*n;return t[0]=s,t[1]=r,t}function Ie(t,e){if(e.canWrapX()){const i=Rt(e.getExtent()),n=function(t,e,i){const n=e.getExtent();let s=0;return e.canWrapX()&&(t[0]<n[0]||t[0]>n[2])&&(i=i||Rt(n),s=Math.floor((t[0]-n[0])/i)),s}(t,e,i);n&&(t[0]-=n*i)}return t}function be(t,e,i){i=i||6371008.8;const n=kt(t[1]),s=kt(e[1]),r=(s-n)/2,o=kt(e[0]-t[0])/2,a=Math.sin(r)*Math.sin(r)+Math.sin(o)*Math.sin(o)*Math.cos(n)*Math.cos(s);return 2*i*Math.atan2(Math.sqrt(a),Math.sqrt(1-a))}const Me=2;let Fe=1;function Le(...t){Fe>Me||console.warn(...t)}let Pe=!0;function ke(t){Pe=!(void 0===t||t)}function Ae(t,e){if(void 0!==e){for(let i=0,n=t.length;i<n;++i)e[i]=t[i];e=e}else e=t.slice();return e}function Oe(t,e){if(void 0!==e&&t!==e){for(let i=0,n=t.length;i<n;++i)e[i]=t[i];t=e}return t}function De(t){!function(t,e){Ce[t]=e}(t.getCode(),t),Ee(t,t,Ae)}function ze(t){return"string"==typeof t?Ce[e=t]||Ce[e.replace(/urn:(x-)?ogc:def:crs:EPSG:(.*:)?(\w+)$/,"EPSG:$3")]||null:t||null;var e}function Ge(t,e,i,n){let s;const r=(t=ze(t)).getPointResolutionFunc();if(r){if(s=r(e,i),n&&n!==t.getUnits()){const e=t.getMetersPerUnit();e&&(s=s*e/le[n])}}else{const r=t.getUnits();if("degrees"==r&&!n||"degrees"==n)s=e;else{const o=je(t,ze("EPSG:4326"));if(o===Oe&&"degrees"!==r)s=e*t.getMetersPerUnit();else{let t=[i[0]-e/2,i[1],i[0]+e/2,i[1],i[0],i[1]-e/2,i[0],i[1]+e/2];t=o(t,t,2),s=(be(t.slice(0,2),t.slice(2,4))+be(t.slice(4,6),t.slice(6,8)))/2}const a=n?le[n]:t.getMetersPerUnit();void 0!==a&&(s/=a)}}return s}function We(t){!function(t){t.forEach(De)}(t),t.forEach((function(e){t.forEach((function(t){e!==t&&Ee(e,t,Ae)}))}))}function Xe(t,e){return t?"string"==typeof t?ze(t):t:ze(e)}function Ne(t,e){return ke(),Ke(t,"EPSG:4326",void 0!==e?e:"EPSG:3857")}function Ye(t,e){if(t===e)return!0;const i=t.getUnits()===e.getUnits();return(t.getCode()===e.getCode()||je(t,e)===Ae)&&i}function je(t,e){let i=function(t,e){let i;return t in we&&e in we[t]&&(i=we[t][e]),i}(t.getCode(),e.getCode());return i||(i=Oe),i}function Be(t,e){return je(ze(t),ze(e))}function Ke(t,e,i){return Be(e,i)(t,void 0,t.length)}function Ze(t,e,i,n){return function(t,e,i,n){if(bt(t))return lt(i);let s=[];if(n>1){const e=t[2]-t[0],i=t[3]-t[1];for(let r=0;r<n;++r)s.push(t[0]+e*r/n,t[1],t[2],t[1]+i*r/n,t[2]-e*r/n,t[3],t[0],t[3]-i*r/n)}else s=[t[0],t[1],t[2],t[1],t[2],t[3],t[0],t[3]];e(s,s,2);const r=[],o=[];for(let t=0,e=s.length;t<e;t+=2)r.push(s[t]),o.push(s[t+1]);return function(t,e,i){return ht(Math.min.apply(null,t),Math.min.apply(null,e),Math.max.apply(null,t),Math.max.apply(null,e),i)}(r,o,i)}(t,Be(e,i),void 0,n)}let Ve=null;function Ue(){return Ve}function qe(t,e){return t}function He(t,e){return Pe&&!Te(t,[0,0])&&t[0]>=-180&&t[0]<=180&&t[1]>=-90&&t[1]<=90&&(Pe=!1,Le("Call useGeographic() from ol/proj once to work with [longitude, latitude] coordinates.")),t}function Je(t,e){return t}function Qe(t,e){return t}function $e(t,e){return t}var ti,ei,ii;function ni(t,e,i){return function(n,s,r,o,a){if(!n)return;if(!s&&!e)return n;const h=e?0:r[0]*s,l=e?0:r[1]*s,c=a?a[0]:0,u=a?a[1]:0;let d=t[0]+h/2+c,g=t[2]-h/2+c,_=t[1]+l/2+u,f=t[3]-l/2+u;d>g&&(d=(g+d)/2,g=d),_>f&&(_=(f+_)/2,f=_);let m=Ft(n[0],d,g),p=Ft(n[1],_,f);if(o&&i&&s){const t=30*s;m+=-t*Math.log(1+Math.max(0,d-n[0])/t)+t*Math.log(1+Math.max(0,n[0]-g)/t),p+=-t*Math.log(1+Math.max(0,_-n[1])/t)+t*Math.log(1+Math.max(0,n[1]-f)/t)}return[m,p]}}function si(t){return t}function ri(t,e,i,n){const s=Rt(e)/i[0],r=Ct(e)/i[1];return n?Math.min(t,Math.max(s,r)):Math.min(t,Math.min(s,r))}function oi(t,e,i){let n=Math.min(t,e);return n*=Math.log(1+50*Math.max(0,t/e-1))/50+1,i&&(n=Math.max(n,i),n/=Math.log(1+50*Math.max(0,i/t-1))/50+1),Ft(n,i/2,2*e)}function ai(t,e,i,n,s){return i=void 0===i||i,function(r,o,a,h){if(void 0!==r){const o=n?ri(t,n,a,s):t;return i&&h?oi(r,o,e):Ft(r,e,o)}}}function hi(t){if(void 0!==t)return 0}function li(t){if(void 0!==t)return t}function ci(t){return Math.pow(t,3)}function ui(t){return 1-ci(1-t)}function di(t){return 3*t*t-2*t*t*t}function gi(t){return t}function _i(t,e,i,n,s,r){r=r||[];let o=0;for(let a=e;a<i;a+=n){const e=t[a],i=t[a+1];r[o++]=s[0]*e+s[2]*i+s[4],r[o++]=s[1]*e+s[3]*i+s[5]}return r&&r.length!=o&&(r.length=o),r}function fi(t,e,i,n,s,r,o){o=o||[];const a=Math.cos(s),h=Math.sin(s),l=r[0],c=r[1];let u=0;for(let s=e;s<i;s+=n){const e=t[s]-l,i=t[s+1]-c;o[u++]=l+e*a-i*h,o[u++]=c+e*h+i*a;for(let e=s+2;e<s+n;++e)o[u++]=t[e]}return o&&o.length!=u&&(o.length=u),o}We(pe),We(Se),ti=pe,ei=function(t,e,i){const n=t.length;i=i>1?i:2,void 0===e&&(e=i>2?t.slice():new Array(n));for(let s=0;s<n;s+=i){e[s]=de*t[s]/180;let i=ue*Math.log(Math.tan(Math.PI*(+t[s+1]+90)/360));i>fe?i=fe:i<-fe&&(i=-fe),e[s+1]=i}return e},ii=function(t,e,i){const n=t.length;i=i>1?i:2,void 0===e&&(e=i>2?t.slice():new Array(n));for(let s=0;s<n;s+=i)e[s]=180*t[s]/de,e[s+1]=360*Math.atan(Math.exp(t[s+1]/ue))/Math.PI-90;return e},Se.forEach((function(t){ti.forEach((function(e){Ee(t,e,ei),Ee(e,t,ii)}))}));const mi=[1,0,0,1,0,0],pi=class extends L{constructor(){super(),this.extent_=[1/0,1/0,-1/0,-1/0],this.extentRevision_=-1,this.simplifiedGeometryMaxMinSquaredTolerance=0,this.simplifiedGeometryRevision=0,this.simplifyTransformedInternal=function(t){let e,i,n,s=!1;return function(){const r=Array.prototype.slice.call(arguments);return s&&this===n&&h(r,i)||(s=!0,n=this,i=r,e=t.apply(this,arguments)),e}}((function(t,e,i){if(!i)return this.getSimplifiedGeometry(e);const n=this.clone();return n.applyTransform(i),n.getSimplifiedGeometry(e)}))}simplifyTransformed(t,e){return this.simplifyTransformedInternal(this.getRevision(),t,e)}clone(){return I()}closestPointXY(t,e,i,n){return I()}containsXY(t,e){const i=this.getClosestPoint([t,e]);return i[0]===t&&i[1]===e}getClosestPoint(t,e){return e=e||[NaN,NaN],this.closestPointXY(t[0],t[1],e,1/0),e}intersectsCoordinate(t){return this.containsXY(t[0],t[1])}computeExtent(t){return I()}getExtent(t){if(this.extentRevision_!=this.getRevision()){const t=this.computeExtent(this.extent_);(isNaN(t[0])||isNaN(t[1]))&&lt(t),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)}rotate(t,e){I()}scale(t,e,i){I()}simplify(t){return this.getSimplifiedGeometry(t*t)}getSimplifiedGeometry(t){return I()}getType(){return I()}applyTransform(t){I()}intersectsExtent(t){return I()}translate(t,e){I()}transform(t,e){const i=ze(t),n="tile-pixels"==i.getUnits()?function(t,n,s){const r=i.getExtent(),o=i.getWorldExtent(),a=Ct(o)/Ct(r);return H(mi,o[0],o[3],a,-a,0,0,0),_i(t,0,t.length,s,mi,n),Be(i,e)(t,n,s)}:Be(i,e);return this.applyTransform(n),this}};function yi(t){let e;return"XY"==t?e=2:"XYZ"==t||"XYM"==t?e=3:"XYZM"==t&&(e=4),e}const xi=class extends pi{constructor(){super(),this.layout="XY",this.stride=2,this.flatCoordinates=null}computeExtent(t){return e=this.flatCoordinates,i=this.flatCoordinates.length,n=this.stride,dt(lt(t),e,0,i,n);var e,i,n}getCoordinates(){return I()}getFirstCoordinate(){return this.flatCoordinates.slice(0,this.stride)}getFlatCoordinates(){return this.flatCoordinates}getLastCoordinate(){return this.flatCoordinates.slice(this.flatCoordinates.length-this.stride)}getLayout(){return this.layout}getSimplifiedGeometry(t){if(this.simplifiedGeometryRevision!==this.getRevision()&&(this.simplifiedGeometryMaxMinSquaredTolerance=0,this.simplifiedGeometryRevision=this.getRevision()),t<0||0!==this.simplifiedGeometryMaxMinSquaredTolerance&&t<=this.simplifiedGeometryMaxMinSquaredTolerance)return this;const e=this.getSimplifiedGeometryInternal(t);return e.getFlatCoordinates().length<this.flatCoordinates.length?e:(this.simplifiedGeometryMaxMinSquaredTolerance=t,this)}getSimplifiedGeometryInternal(t){return this}getStride(){return this.stride}setFlatCoordinates(t,e){this.stride=yi(t),this.layout=t,this.flatCoordinates=e}setCoordinates(t,e){I()}setLayout(t,e,i){let n;if(t)n=yi(t);else{for(let t=0;t<i;++t){if(0===e.length)return this.layout="XY",void(this.stride=2);e=e[0]}n=e.length,t=function(t){let e;return 2==t?e="XY":3==t?e="XYZ":4==t&&(e="XYZM"),e}(n)}this.layout=t,this.stride=n}applyTransform(t){this.flatCoordinates&&(t(this.flatCoordinates,this.flatCoordinates,this.stride),this.changed())}rotate(t,e){const i=this.getFlatCoordinates();if(i){const n=this.getStride();fi(i,0,i.length,n,t,e,i),this.changed()}}scale(t,e,i){void 0===e&&(e=t),i||(i=yt(this.getExtent()));const n=this.getFlatCoordinates();if(n){const s=this.getStride();!function(t,e,i,n,s,r,o,a){a=a||[];const h=o[0],l=o[1];let c=0;for(let e=0;e<i;e+=n){const i=t[e]-h,o=t[e+1]-l;a[c++]=h+s*i,a[c++]=l+r*o;for(let i=e+2;i<e+n;++i)a[c++]=t[i]}a&&a.length!=c&&(a.length=c)}(n,0,n.length,s,t,e,i,n),this.changed()}}translate(t,e){const i=this.getFlatCoordinates();if(i){const n=this.getStride();!function(t,e,i,n,s,r,o){o=o||[];let a=0;for(let e=0;e<i;e+=n){o[a++]=t[e]+s,o[a++]=t[e+1]+r;for(let i=e+2;i<e+n;++i)o[a++]=t[i]}o&&o.length!=a&&(o.length=a)}(i,0,i.length,n,t,e,i),this.changed()}}};function vi(t,e,i,n,s,r,o){const a=t[e],h=t[e+1],l=t[i]-a,c=t[i+1]-h;let u;if(0===l&&0===c)u=e;else{const d=((s-a)*l+(r-h)*c)/(l*l+c*c);if(d>1)u=i;else{if(d>0){for(let s=0;s<n;++s)o[s]=Ot(t[e+s],t[i+s],d);return void(o.length=n)}u=e}}for(let e=0;e<n;++e)o[e]=t[u+e];o.length=n}function Si(t,e,i,n,s){let r=t[e],o=t[e+1];for(e+=n;e<i;e+=n){const i=t[e],n=t[e+1],a=Pt(r,o,i,n);a>s&&(s=a),r=i,o=n}return s}function Ci(t,e,i,n,s,r,o,a,h,l,c){if(e==i)return l;let u,d;if(0===s){if(d=Pt(o,a,t[e],t[e+1]),d<l){for(u=0;u<n;++u)h[u]=t[e+u];return h.length=n,d}return l}c=c||[NaN,NaN];let g=e+n;for(;g<i;)if(vi(t,g-n,g,n,o,a,c),d=Pt(o,a,c[0],c[1]),d<l){for(l=d,u=0;u<n;++u)h[u]=c[u];h.length=n,g+=n}else g+=n*Math.max((Math.sqrt(d)-Math.sqrt(l))/s|0,1);if(r&&(vi(t,i-n,e,n,o,a,c),d=Pt(o,a,c[0],c[1]),d<l)){for(l=d,u=0;u<n;++u)h[u]=c[u];h.length=n}return l}function wi(t,e,i,n){for(let s=0,r=i.length;s<r;++s){const r=i[s];for(let i=0;i<n;++i)t[e++]=r[i]}return e}function Ei(t,e){return e*Math.round(t/e)}function Ti(t,e,i,n,s,r,o){if(e==i)return o;let a,h,l=Ei(t[e],s),c=Ei(t[e+1],s);e+=n,r[o++]=l,r[o++]=c;do{if(a=Ei(t[e],s),h=Ei(t[e+1],s),(e+=n)==i)return r[o++]=a,r[o++]=h,o}while(a==l&&h==c);for(;e<i;){const i=Ei(t[e],s),u=Ei(t[e+1],s);if(e+=n,i==a&&u==h)continue;const d=a-l,g=h-c,_=i-l,f=u-c;d*f==g*_&&(d<0&&_<d||d==_||d>0&&_>d)&&(g<0&&f<g||g==f||g>0&&f>g)?(a=i,h=u):(r[o++]=a,r[o++]=h,l=a,c=h,a=i,h=u)}return r[o++]=a,r[o++]=h,o}function Ri(t,e,i,n,s){s=void 0!==s?s:[];let r=0;for(let o=e;o<i;o+=n)s[r++]=t.slice(o,o+n);return s.length=r,s}function Ii(t,e,i,n,s){s=void 0!==s?s:[];let r=0;for(let o=0,a=i.length;o<a;++o){const a=i[o];s[r++]=Ri(t,e,a,n,s[r]),e=a}return s.length=r,s}function bi(t,e,i,n,s){s=void 0!==s?s:[];let r=0;for(let o=0,a=i.length;o<a;++o){const a=i[o];s[r++]=1===a.length&&a[0]===e?[]:Ii(t,e,a,n,s[r]),e=a[a.length-1]}return s.length=r,s}function Mi(t,e,i,n){let s=0,r=t[i-n],o=t[i-n+1];for(;e<i;e+=n){const i=t[e],n=t[e+1];s+=o*i-r*n,r=i,o=n}return s/2}class Fi extends xi{constructor(t,e){super(),this.maxDelta_=-1,this.maxDeltaRevision_=-1,void 0===e||Array.isArray(t[0])?this.setCoordinates(t,e):this.setFlatCoordinates(e,t)}clone(){return new Fi(this.flatCoordinates.slice(),this.layout)}closestPointXY(t,e,i,n){return n<nt(this.getExtent(),t,e)?n:(this.maxDeltaRevision_!=this.getRevision()&&(this.maxDelta_=Math.sqrt(Si(this.flatCoordinates,0,this.flatCoordinates.length,this.stride,0)),this.maxDeltaRevision_=this.getRevision()),Ci(this.flatCoordinates,0,this.flatCoordinates.length,this.stride,this.maxDelta_,!0,t,e,i,n))}getArea(){return Mi(this.flatCoordinates,0,this.flatCoordinates.length,this.stride)}getCoordinates(){return Ri(this.flatCoordinates,0,this.flatCoordinates.length,this.stride)}getSimplifiedGeometryInternal(t){const e=[];return e.length=function(t,e,i,n,s,r,o){const a=(i-e)/n;if(a<3){for(;e<i;e+=n)r[o++]=t[e],r[o++]=t[e+1];return o}const h=new Array(a);h[0]=1,h[a-1]=1;const l=[e,i-n];let c=0;for(;l.length>0;){const i=l.pop(),r=l.pop();let o=0;const a=t[r],u=t[r+1],d=t[i],g=t[i+1];for(let e=r+n;e<i;e+=n){const i=Lt(t[e],t[e+1],a,u,d,g);i>o&&(c=e,o=i)}o>s&&(h[(c-e)/n]=1,r+n<c&&l.push(r,c),c+n<i&&l.push(c,i))}for(let i=0;i<a;++i)h[i]&&(r[o++]=t[e+i*n],r[o++]=t[e+i*n+1]);return o}(this.flatCoordinates,0,this.flatCoordinates.length,this.stride,t,e,0),new Fi(e,"XY")}getType(){return"LinearRing"}intersectsExtent(t){return!1}setCoordinates(t,e){this.setLayout(e,t,1),this.flatCoordinates||(this.flatCoordinates=[]),this.flatCoordinates.length=wi(this.flatCoordinates,0,t,this.stride),this.changed()}}const Li=Fi;class Pi extends xi{constructor(t,e){super(),this.setCoordinates(t,e)}clone(){const t=new Pi(this.flatCoordinates.slice(),this.layout);return t.applyProperties(this),t}closestPointXY(t,e,i,n){const s=this.flatCoordinates,r=Pt(t,e,s[0],s[1]);if(r<n){const t=this.stride;for(let e=0;e<t;++e)i[e]=s[e];return i.length=t,r}return n}getCoordinates(){return this.flatCoordinates?this.flatCoordinates.slice():[]}computeExtent(t){return function(t,e){const i=t[0],n=t[1];return ht(i,n,i,n,e)}(this.flatCoordinates,t)}getType(){return"Point"}intersectsExtent(t){return ot(t,this.flatCoordinates[0],this.flatCoordinates[1])}setCoordinates(t,e){this.setLayout(e,t,0),this.flatCoordinates||(this.flatCoordinates=[]),this.flatCoordinates.length=function(t,e,i,n){for(let n=0,s=i.length;n<s;++n)t[e++]=i[n];return e}(this.flatCoordinates,0,t,this.stride),this.changed()}}const ki=Pi;function Ai(t,e,i,n,s){return!_t(s,(function(s){return!Oi(t,e,i,n,s[0],s[1])}))}function Oi(t,e,i,n,s,r){let o=0,a=t[i-n],h=t[i-n+1];for(;e<i;e+=n){const i=t[e],n=t[e+1];h<=r?n>r&&(i-a)*(r-h)-(s-a)*(n-h)>0&&o++:n<=r&&(i-a)*(r-h)-(s-a)*(n-h)<0&&o--,a=i,h=n}return 0!==o}function Di(t,e,i,n,s,r){if(0===i.length)return!1;if(!Oi(t,e,i[0],n,s,r))return!1;for(let e=1,o=i.length;e<o;++e)if(Oi(t,i[e-1],i[e],n,s,r))return!1;return!0}function zi(t,e,i,n,s){const r=dt([1/0,1/0,-1/0,-1/0],t,e,i,n);return!!It(s,r)&&(!!rt(s,r)||r[0]>=s[0]&&r[2]<=s[2]||r[1]>=s[1]&&r[3]<=s[3]||function(t,e,i,n,r){let o;for(e+=n;e<i;e+=n)if(a=t.slice(e-n,e),h=t.slice(e,e+n),o=function(t,e,i){let n=!1;const s=at(t,e),r=at(t,i);if(1===s||1===r)n=!0;else{const o=t[0],a=t[1],h=t[2],l=t[3],c=e[0],u=e[1],d=i[0],g=i[1],_=(g-u)/(d-c);let f,m;2&r&&!(2&s)&&(f=d-(g-l)/_,n=f>=o&&f<=h),n||!(4&r)||4&s||(m=g-(d-h)*_,n=m>=a&&m<=l),n||!(8&r)||8&s||(f=d-(g-a)/_,n=f>=o&&f<=h),n||!(16&r)||16&s||(m=g-(d-o)*_,n=m>=a&&m<=l)}return n}(s,a,h),o)return o;var a,h;return!1}(t,e,i,n))}function Gi(t,e,i,n,s){return!!(zi(t,e,i,n,s)||Oi(t,e,i,n,s[0],s[1])||Oi(t,e,i,n,s[0],s[3])||Oi(t,e,i,n,s[2],s[1])||Oi(t,e,i,n,s[2],s[3]))}function Wi(t,e,i,n){for(;e<i-n;){for(let s=0;s<n;++s){const r=t[e+s];t[e+s]=t[i-n+s],t[i-n+s]=r}e+=n,i-=n}}function Xi(t,e,i,n){let s=0,r=t[i-n],o=t[i-n+1];for(;e<i;e+=n){const i=t[e],n=t[e+1];s+=(i-r)*(n+o),r=i,o=n}return 0===s?void 0:s>0}function Ni(t,e,i,n,s){s=void 0!==s&&s;for(let r=0,o=i.length;r<o;++r){const o=i[r],a=Xi(t,e,o,n);(0===r?s&&a||!s&&!a:s&&!a||!s&&a)&&Wi(t,e,o,n),e=o}return e}class Yi extends xi{constructor(t,e,i){super(),this.ends_=[],this.flatInteriorPointRevision_=-1,this.flatInteriorPoint_=null,this.maxDelta_=-1,this.maxDeltaRevision_=-1,this.orientedRevision_=-1,this.orientedFlatCoordinates_=null,void 0!==e&&i?(this.setFlatCoordinates(e,t),this.ends_=i):this.setCoordinates(t,e)}appendLinearRing(t){this.flatCoordinates?a(this.flatCoordinates,t.getFlatCoordinates()):this.flatCoordinates=t.getFlatCoordinates().slice(),this.ends_.push(this.flatCoordinates.length),this.changed()}clone(){const t=new Yi(this.flatCoordinates.slice(),this.layout,this.ends_.slice());return t.applyProperties(this),t}closestPointXY(t,e,i,n){return n<nt(this.getExtent(),t,e)?n:(this.maxDeltaRevision_!=this.getRevision()&&(this.maxDelta_=Math.sqrt(function(t,e,i,n,s){for(let r=0,o=i.length;r<o;++r){const o=i[r];s=Si(t,e,o,n,s),e=o}return s}(this.flatCoordinates,0,this.ends_,this.stride,0)),this.maxDeltaRevision_=this.getRevision()),function(t,e,i,n,s,r,o,a,h,l,c){c=c||[NaN,NaN];for(let u=0,d=i.length;u<d;++u){const d=i[u];l=Ci(t,e,d,n,s,r,o,a,h,l,c),e=d}return l}(this.flatCoordinates,0,this.ends_,this.stride,this.maxDelta_,!0,t,e,i,n))}containsXY(t,e){return Di(this.getOrientedFlatCoordinates(),0,this.ends_,this.stride,t,e)}getArea(){return function(t,e,i,n){let s=0;for(let r=0,o=i.length;r<o;++r){const o=i[r];s+=Mi(t,e,o,n),e=o}return s}(this.getOrientedFlatCoordinates(),0,this.ends_,this.stride)}getCoordinates(t){let e;return void 0!==t?(e=this.getOrientedFlatCoordinates().slice(),Ni(e,0,this.ends_,this.stride,t)):e=this.flatCoordinates,Ii(e,0,this.ends_,this.stride)}getEnds(){return this.ends_}getFlatInteriorPoint(){if(this.flatInteriorPointRevision_!=this.getRevision()){const t=yt(this.getExtent());this.flatInteriorPoint_=function(t,e,i,n,r,o,a){let h,l,c,u,d,g,_;const f=r[o+1],m=[];for(let s=0,r=i.length;s<r;++s){const r=i[s];for(u=t[r-n],g=t[r-n+1],h=e;h<r;h+=n)d=t[h],_=t[h+1],(f<=g&&_<=f||g<=f&&f<=_)&&(c=(f-g)/(_-g)*(d-u)+u,m.push(c)),u=d,g=_}let p=NaN,y=-1/0;for(m.sort(s),u=m[0],h=1,l=m.length;h<l;++h){d=m[h];const s=Math.abs(d-u);s>y&&(c=(u+d)/2,Di(t,e,i,n,c,f)&&(p=c,y=s)),u=d}return isNaN(p)&&(p=r[o]),a?(a.push(p,f,y),a):[p,f,y]}(this.getOrientedFlatCoordinates(),0,this.ends_,this.stride,t,0),this.flatInteriorPointRevision_=this.getRevision()}return this.flatInteriorPoint_}getInteriorPoint(){return new ki(this.getFlatInteriorPoint(),"XYM")}getLinearRingCount(){return this.ends_.length}getLinearRing(t){return t<0||this.ends_.length<=t?null:new Li(this.flatCoordinates.slice(0===t?0:this.ends_[t-1],this.ends_[t]),this.layout)}getLinearRings(){const t=this.layout,e=this.flatCoordinates,i=this.ends_,n=[];let s=0;for(let r=0,o=i.length;r<o;++r){const o=i[r],a=new Li(e.slice(s,o),t);n.push(a),s=o}return n}getOrientedFlatCoordinates(){if(this.orientedRevision_!=this.getRevision()){const t=this.flatCoordinates;!function(t,e,i,n,s){s=void 0!==s&&s;for(let r=0,o=i.length;r<o;++r){const o=i[r],a=Xi(t,e,o,n);if(0===r){if(s&&a||!s&&!a)return!1}else if(s&&!a||!s&&a)return!1;e=o}return!0}(t,0,this.ends_,this.stride)?(this.orientedFlatCoordinates_=t.slice(),this.orientedFlatCoordinates_.length=Ni(this.orientedFlatCoordinates_,0,this.ends_,this.stride)):this.orientedFlatCoordinates_=t,this.orientedRevision_=this.getRevision()}return this.orientedFlatCoordinates_}getSimplifiedGeometryInternal(t){const e=[],i=[];return e.length=function(t,e,i,n,s,r,o,a){for(let h=0,l=i.length;h<l;++h){const l=i[h];o=Ti(t,e,l,n,s,r,o),a.push(o),e=l}return o}(this.flatCoordinates,0,this.ends_,this.stride,Math.sqrt(t),e,0,i),new Yi(e,"XY",i)}getType(){return"Polygon"}intersectsExtent(t){return function(t,e,i,n,s){if(!Gi(t,e,i[0],n,s))return!1;if(1===i.length)return!0;for(let e=1,r=i.length;e<r;++e)if(Ai(t,i[e-1],i[e],n,s)&&!zi(t,i[e-1],i[e],n,s))return!1;return!0}(this.getOrientedFlatCoordinates(),0,this.ends_,this.stride,t)}setCoordinates(t,e){this.setLayout(e,t,2),this.flatCoordinates||(this.flatCoordinates=[]);const i=function(t,e,i,n,s){s=s||[];let r=0;for(let o=0,a=i.length;o<a;++o){const a=wi(t,e,i[o],n);s[r++]=a,e=a}return s.length=r,s}(this.flatCoordinates,0,t,this.stride,this.ends_);this.flatCoordinates.length=0===i.length?0:i[i.length-1],this.changed()}}const ji=Yi;function Bi(t){if(bt(t))throw new Error("Cannot create polygon from empty extent");const e=t[0],i=t[1],n=t[2],s=t[3],r=[e,i,e,s,n,s,n,i,e,i];return new Yi(r,"XY",[r.length])}function Ki(t,e){setTimeout((function(){t(e)}),0)}function Zi(t){return!(t.sourceCenter&&t.targetCenter&&!Te(t.sourceCenter,t.targetCenter))&&t.sourceResolution===t.targetResolution&&t.sourceRotation===t.targetRotation}function Vi(t,e,i,n,s){const r=Math.cos(-s);let o=Math.sin(-s),a=t[0]*r-t[1]*o,h=t[1]*r+t[0]*o;return a+=(e[0]/2-i[0])*n,h+=(i[1]-e[1]/2)*n,o=-o,[a*r-h*o,h*r+a*o]}const Ui=class extends L{constructor(t){super(),this.on,this.once,this.un,t=Object.assign({},t),this.hints_=[0,0],this.animations_=[],this.updateAnimationKey_,this.projection_=Xe(t.projection,"EPSG:3857"),this.viewportSize_=[100,100],this.targetCenter_=null,this.targetResolution_,this.targetRotation_,this.nextCenter_=null,this.nextResolution_,this.nextRotation_,this.cancelAnchor_=void 0,t.projection&&ke(),t.center&&(t.center=He(t.center,this.projection_)),t.extent&&(t.extent=Qe(t.extent,this.projection_)),this.applyOptions_(t)}applyOptions_(t){const e=Object.assign({},t);for(const t in he)delete e[t];this.setProperties(e,!0);const i=function(t){let e,i,n;let s=void 0!==t.minZoom?t.minZoom:0,o=void 0!==t.maxZoom?t.maxZoom:28;const a=void 0!==t.zoomFactor?t.zoomFactor:2,h=void 0!==t.multiWorld&&t.multiWorld,l=void 0===t.smoothResolutionConstraint||t.smoothResolutionConstraint,c=void 0!==t.showFullExtent&&t.showFullExtent,u=Xe(t.projection,"EPSG:3857"),d=u.getExtent();let g=t.constrainOnlyCenter,_=t.extent;if(h||_||!u.isGlobal()||(g=!1,_=d),void 0!==t.resolutions){const a=t.resolutions;i=a[s],n=void 0!==a[o]?a[o]:a[a.length-1],e=t.constrainResolution?function(t,e,i,n){return e=void 0===e||e,function(s,o,a,h){if(void 0!==s){const l=t[0],c=t[t.length-1],u=i?ri(l,i,a,n):l;if(h)return e?oi(s,u,c):Ft(s,c,u);const d=Math.min(u,s),g=Math.floor(r(t,d,o));return t[g]>u&&g<t.length-1?t[g+1]:t[g]}}}(a,l,!g&&_,c):ai(i,n,l,!g&&_,c)}else{const r=(d?Math.max(Rt(d),Ct(d)):360*le.degrees/u.getMetersPerUnit())/256/Math.pow(2,0),h=r/Math.pow(2,28);i=t.maxResolution,void 0!==i?s=0:i=r/Math.pow(a,s),n=t.minResolution,void 0===n&&(n=void 0!==t.maxZoom?void 0!==t.maxResolution?i/Math.pow(a,o):r/Math.pow(a,o):h),o=s+Math.floor(Math.log(i/n)/Math.log(a)),n=i/Math.pow(a,o-s),e=t.constrainResolution?function(t,e,i,n,s,r){return n=void 0===n||n,i=void 0!==i?i:0,function(o,a,h,l){if(void 0!==o){const c=s?ri(e,s,h,r):e;if(l)return n?oi(o,c,i):Ft(o,i,c);const u=1e-9,d=Math.ceil(Math.log(e/c)/Math.log(t)-u),g=-a*(.5-u)+.5,_=Math.min(c,o),f=Math.floor(Math.log(e/_)/Math.log(t)+g),m=Math.max(d,f);return Ft(e/Math.pow(t,m),i,c)}}}(a,i,n,l,!g&&_,c):ai(i,n,l,!g&&_,c)}return{constraint:e,maxResolution:i,minResolution:n,minZoom:s,zoomFactor:a}}(t);this.maxResolution_=i.maxResolution,this.minResolution_=i.minResolution,this.zoomFactor_=i.zoomFactor,this.resolutions_=t.resolutions,this.padding_=t.padding,this.minZoom_=i.minZoom;const n=function(t){if(void 0!==t.extent){const e=void 0===t.smoothExtentConstraint||t.smoothExtentConstraint;return ni(t.extent,t.constrainOnlyCenter,e)}const e=Xe(t.projection,"EPSG:3857");if(!0!==t.multiWorld&&e.isGlobal()){const t=e.getExtent().slice();return t[0]=-1/0,t[2]=1/0,ni(t,!1,!1)}return si}(t),s=i.constraint,o=function(t){if(void 0===t.enableRotation||t.enableRotation){const i=t.constrainRotation;return void 0===i||!0===i?(e=e||kt(5),function(t,i){return i?t:void 0!==t?Math.abs(t)<=e?0:t:void 0}):!1===i?li:"number"==typeof i?function(t){const e=2*Math.PI/t;return function(t,i){return i?t:void 0!==t?t=Math.floor(t/e+.5)*e:void 0}}(i):li}var e;return hi}(t);this.constraints_={center:n,resolution:s,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)}get padding(){return this.padding_}set padding(t){let e=this.padding_;this.padding_=t;const i=this.getCenterInternal();if(i){const n=t||[0,0,0,0];e=e||[0,0,0,0];const s=this.getResolution(),r=s/2*(n[3]-e[3]+e[1]-n[1]),o=s/2*(n[0]-e[0]+e[2]-n[2]);this.setCenterInternal([i[0]+r,i[1]-o])}}getUpdatedOptions_(t){const e=this.getProperties();return void 0!==e.resolution?e.resolution=this.getResolution():e.zoom=this.getZoom(),e.center=this.getCenterInternal(),e.rotation=this.getRotation(),Object.assign({},e,t)}animate(t){this.isDef()&&!this.getAnimating()&&this.resolveConstraints(0);const e=new Array(arguments.length);for(let t=0;t<e.length;++t){let i=arguments[t];i.center&&(i=Object.assign({},i),i.center=He(i.center,this.getProjection())),i.anchor&&(i=Object.assign({},i),i.anchor=He(i.anchor,this.getProjection())),e[t]=i}this.animateInternal.apply(this,e)}animateInternal(t){let e,i=arguments.length;i>1&&"function"==typeof arguments[i-1]&&(e=arguments[i-1],--i);let n=0;for(;n<i&&!this.isDef();++n){const t=arguments[n];t.center&&this.setCenterInternal(t.center),void 0!==t.zoom?this.setZoom(t.zoom):t.resolution&&this.setResolution(t.resolution),void 0!==t.rotation&&this.setRotation(t.rotation)}if(n===i)return void(e&&Ki(e,!0));let s=Date.now(),r=this.targetCenter_.slice(),o=this.targetResolution_,a=this.targetRotation_;const h=[];for(;n<i;++n){const t=arguments[n],i={start:s,complete:!1,anchor:t.anchor,duration:void 0!==t.duration?t.duration:1e3,easing:t.easing||di,callback:e};if(t.center&&(i.sourceCenter=r,i.targetCenter=t.center.slice(),r=i.targetCenter),void 0!==t.zoom?(i.sourceResolution=o,i.targetResolution=this.getResolutionForZoom(t.zoom),o=i.targetResolution):t.resolution&&(i.sourceResolution=o,i.targetResolution=t.resolution,o=i.targetResolution),void 0!==t.rotation){i.sourceRotation=a;const e=At(t.rotation-a+Math.PI,2*Math.PI)-Math.PI;i.targetRotation=a+e,a=i.targetRotation}Zi(i)?i.complete=!0:s+=i.duration,h.push(i)}this.animations_.push(h),this.setHint(0,1),this.updateAnimations_()}getAnimating(){return this.hints_[0]>0}getInteracting(){return this.hints_[1]>0}cancelAnimations(){let t;this.setHint(0,-this.hints_[0]);for(let e=0,i=this.animations_.length;e<i;++e){const i=this.animations_[e];if(i[0].callback&&Ki(i[0].callback,!1),!t)for(let e=0,n=i.length;e<n;++e){const n=i[e];if(!n.complete){t=n.anchor;break}}}this.animations_.length=0,this.cancelAnchor_=t,this.nextCenter_=null,this.nextResolution_=NaN,this.nextRotation_=NaN}updateAnimations_(){if(void 0!==this.updateAnimationKey_&&(cancelAnimationFrame(this.updateAnimationKey_),this.updateAnimationKey_=void 0),!this.getAnimating())return;const t=Date.now();let e=!1;for(let i=this.animations_.length-1;i>=0;--i){const n=this.animations_[i];let s=!0;for(let i=0,r=n.length;i<r;++i){const r=n[i];if(r.complete)continue;const o=t-r.start;let a=r.duration>0?o/r.duration:1;a>=1?(r.complete=!0,a=1):s=!1;const h=r.easing(a);if(r.sourceCenter){const t=r.sourceCenter[0],e=r.sourceCenter[1],i=r.targetCenter[0],n=r.targetCenter[1];this.nextCenter_=r.targetCenter;const s=t+h*(i-t),o=e+h*(n-e);this.targetCenter_=[s,o]}if(r.sourceResolution&&r.targetResolution){const t=1===h?r.targetResolution:r.sourceResolution+h*(r.targetResolution-r.sourceResolution);if(r.anchor){const e=this.getViewportSize_(this.getRotation()),i=this.constraints_.resolution(t,0,e,!0);this.targetCenter_=this.calculateCenterZoom(i,r.anchor)}this.nextResolution_=r.targetResolution,this.targetResolution_=t,this.applyTargetState_(!0)}if(void 0!==r.sourceRotation&&void 0!==r.targetRotation){const t=1===h?At(r.targetRotation+Math.PI,2*Math.PI)-Math.PI:r.sourceRotation+h*(r.targetRotation-r.sourceRotation);if(r.anchor){const e=this.constraints_.rotation(t,!0);this.targetCenter_=this.calculateCenterRotate(e,r.anchor)}this.nextRotation_=r.targetRotation,this.targetRotation_=t}if(this.applyTargetState_(!0),e=!0,!r.complete)break}if(s){this.animations_[i]=null,this.setHint(0,-1),this.nextCenter_=null,this.nextResolution_=NaN,this.nextRotation_=NaN;const t=n[0].callback;t&&Ki(t,!0)}}this.animations_=this.animations_.filter(Boolean),e&&void 0===this.updateAnimationKey_&&(this.updateAnimationKey_=requestAnimationFrame(this.updateAnimations_.bind(this)))}calculateCenterRotate(t,e){let i;const n=this.getCenterInternal();var s,r;return void 0!==n&&(i=[n[0]-e[0],n[1]-e[1]],Re(i,t-this.getRotation()),r=e,(s=i)[0]+=+r[0],s[1]+=+r[1]),i}calculateCenterZoom(t,e){let i;const n=this.getCenterInternal(),s=this.getResolution();return void 0!==n&&void 0!==s&&(i=[e[0]-t*(e[0]-n[0])/s,e[1]-t*(e[1]-n[1])/s]),i}getViewportSize_(t){const e=this.viewportSize_;if(t){const i=e[0],n=e[1];return[Math.abs(i*Math.cos(t))+Math.abs(n*Math.sin(t)),Math.abs(i*Math.sin(t))+Math.abs(n*Math.cos(t))]}return e}setViewportSize(t){this.viewportSize_=Array.isArray(t)?t.slice():[100,100],this.getAnimating()||this.resolveConstraints(0)}getCenter(){const t=this.getCenterInternal();return t?qe(t,this.getProjection()):t}getCenterInternal(){return this.get(he.CENTER)}getConstraints(){return this.constraints_}getConstrainResolution(){return this.get("constrainResolution")}getHints(t){return void 0!==t?(t[0]=this.hints_[0],t[1]=this.hints_[1],t):this.hints_.slice()}calculateExtent(t){return Je(this.calculateExtentInternal(t),this.getProjection())}calculateExtentInternal(t){t=t||this.getViewportSizeMinusPadding_();const e=this.getCenterInternal();U(e,1);const i=this.getResolution();U(void 0!==i,2);const n=this.getRotation();return U(void 0!==n,3),vt(e,i,n,t)}getMaxResolution(){return this.maxResolution_}getMinResolution(){return this.minResolution_}getMaxZoom(){return this.getZoomForResolution(this.minResolution_)}setMaxZoom(t){this.applyOptions_(this.getUpdatedOptions_({maxZoom:t}))}getMinZoom(){return this.getZoomForResolution(this.maxResolution_)}setMinZoom(t){this.applyOptions_(this.getUpdatedOptions_({minZoom:t}))}setConstrainResolution(t){this.applyOptions_(this.getUpdatedOptions_({constrainResolution:t}))}getProjection(){return this.projection_}getResolution(){return this.get(he.RESOLUTION)}getResolutions(){return this.resolutions_}getResolutionForExtent(t,e){return this.getResolutionForExtentInternal(Qe(t,this.getProjection()),e)}getResolutionForExtentInternal(t,e){e=e||this.getViewportSizeMinusPadding_();const i=Rt(t)/e[0],n=Ct(t)/e[1];return Math.max(i,n)}getResolutionForValueFunction(t){t=t||2;const e=this.getConstrainedResolution(this.maxResolution_),i=this.minResolution_,n=Math.log(e/i)/Math.log(t);return function(i){return e/Math.pow(t,i*n)}}getRotation(){return this.get(he.ROTATION)}getValueForResolutionFunction(t){const e=Math.log(t||2),i=this.getConstrainedResolution(this.maxResolution_),n=this.minResolution_,s=Math.log(i/n)/e;return function(t){return Math.log(i/t)/e/s}}getViewportSizeMinusPadding_(t){let e=this.getViewportSize_(t);const i=this.padding_;return i&&(e=[e[0]-i[1]-i[3],e[1]-i[0]-i[2]]),e}getState(){const t=this.getProjection(),e=this.getResolution(),i=this.getRotation();let n=this.getCenterInternal();const s=this.padding_;if(s){const t=this.getViewportSizeMinusPadding_();n=Vi(n,this.getViewportSize_(),[t[0]/2+s[3],t[1]/2+s[0]],e,i)}return{center:n.slice(0),projection:void 0!==t?t:null,resolution:e,nextCenter:this.nextCenter_,nextResolution:this.nextResolution_,nextRotation:this.nextRotation_,rotation:i,zoom:this.getZoom()}}getViewStateAndExtent(){return{viewState:this.getState(),extent:this.calculateExtent()}}getZoom(){let t;const e=this.getResolution();return void 0!==e&&(t=this.getZoomForResolution(e)),t}getZoomForResolution(t){let e,i,n=this.minZoom_||0;if(this.resolutions_){const s=r(this.resolutions_,t,1);n=s,e=this.resolutions_[s],i=s==this.resolutions_.length-1?2:e/this.resolutions_[s+1]}else e=this.maxResolution_,i=this.zoomFactor_;return n+Math.log(e/t)/Math.log(i)}getResolutionForZoom(t){if(this.resolutions_){if(this.resolutions_.length<=1)return 0;const e=Ft(Math.floor(t),0,this.resolutions_.length-2),i=this.resolutions_[e]/this.resolutions_[e+1];return this.resolutions_[e]/Math.pow(i,Ft(t-e,0,1))}return this.maxResolution_/Math.pow(this.zoomFactor_,t-this.minZoom_)}fit(t,e){let i;if(U(Array.isArray(t)||"function"==typeof t.getSimplifiedGeometry,24),Array.isArray(t))U(!bt(t),25),i=Bi(Qe(t,this.getProjection()));else if("Circle"===t.getType()){const e=Qe(t.getExtent(),this.getProjection());i=Bi(e),i.rotate(this.getRotation(),yt(e))}else{const e=Ue();i=e?t.clone().transform(e,this.getProjection()):t}this.fitInternal(i,e)}rotatedExtentForGeometry(t){const e=this.getRotation(),i=Math.cos(e),n=Math.sin(-e),s=t.getFlatCoordinates(),r=t.getStride();let o=1/0,a=1/0,h=-1/0,l=-1/0;for(let t=0,e=s.length;t<e;t+=r){const e=s[t]*i-s[t+1]*n,r=s[t]*n+s[t+1]*i;o=Math.min(o,e),a=Math.min(a,r),h=Math.max(h,e),l=Math.max(l,r)}return[o,a,h,l]}fitInternal(t,e){let i=(e=e||{}).size;i||(i=this.getViewportSizeMinusPadding_());const n=void 0!==e.padding?e.padding:[0,0,0,0],s=void 0!==e.nearest&&e.nearest;let r;r=void 0!==e.minResolution?e.minResolution:void 0!==e.maxZoom?this.getResolutionForZoom(e.maxZoom):0;const o=this.rotatedExtentForGeometry(t);let a=this.getResolutionForExtentInternal(o,[i[0]-n[1]-n[3],i[1]-n[0]-n[2]]);a=isNaN(a)?r:Math.max(a,r),a=this.getConstrainedResolution(a,s?0:1);const h=this.getRotation(),l=Math.sin(h),c=Math.cos(h),d=yt(o);d[0]+=(n[1]-n[3])/2*a,d[1]+=(n[0]-n[2])/2*a;const g=d[0]*c-d[1]*l,_=d[1]*c+d[0]*l,f=this.getConstrainedCenter([g,_],a),m=e.callback?e.callback:u;void 0!==e.duration?this.animateInternal({resolution:a,center:f,duration:e.duration,easing:e.easing},m):(this.targetResolution_=a,this.targetCenter_=f,this.applyTargetState_(!1,!0),Ki(m,!0))}centerOn(t,e,i){this.centerOnInternal(He(t,this.getProjection()),e,i)}centerOnInternal(t,e,i){this.setCenterInternal(Vi(t,e,i,this.getResolution(),this.getRotation()))}calculateCenterShift(t,e,i,n){let s;const r=this.padding_;if(r&&t){const o=this.getViewportSizeMinusPadding_(-i),a=Vi(t,n,[o[0]/2+r[3],o[1]/2+r[0]],e,i);s=[t[0]-a[0],t[1]-a[1]]}return s}isDef(){return!!this.getCenterInternal()&&void 0!==this.getResolution()}adjustCenter(t){const e=qe(this.targetCenter_,this.getProjection());this.setCenter([e[0]+t[0],e[1]+t[1]])}adjustCenterInternal(t){const e=this.targetCenter_;this.setCenterInternal([e[0]+t[0],e[1]+t[1]])}adjustResolution(t,e){e=e&&He(e,this.getProjection()),this.adjustResolutionInternal(t,e)}adjustResolutionInternal(t,e){const i=this.getAnimating()||this.getInteracting(),n=this.getViewportSize_(this.getRotation()),s=this.constraints_.resolution(this.targetResolution_*t,0,n,i);e&&(this.targetCenter_=this.calculateCenterZoom(s,e)),this.targetResolution_*=t,this.applyTargetState_()}adjustZoom(t,e){this.adjustResolution(Math.pow(this.zoomFactor_,-t),e)}adjustRotation(t,e){e&&(e=He(e,this.getProjection())),this.adjustRotationInternal(t,e)}adjustRotationInternal(t,e){const i=this.getAnimating()||this.getInteracting(),n=this.constraints_.rotation(this.targetRotation_+t,i);e&&(this.targetCenter_=this.calculateCenterRotate(n,e)),this.targetRotation_+=t,this.applyTargetState_()}setCenter(t){this.setCenterInternal(t?He(t,this.getProjection()):t)}setCenterInternal(t){this.targetCenter_=t,this.applyTargetState_()}setHint(t,e){return this.hints_[t]+=e,this.changed(),this.hints_[t]}setResolution(t){this.targetResolution_=t,this.applyTargetState_()}setRotation(t){this.targetRotation_=t,this.applyTargetState_()}setZoom(t){this.setResolution(this.getResolutionForZoom(t))}applyTargetState_(t,e){const i=this.getAnimating()||this.getInteracting()||e,n=this.constraints_.rotation(this.targetRotation_,i),s=this.getViewportSize_(n),r=this.constraints_.resolution(this.targetResolution_,0,s,i),o=this.constraints_.center(this.targetCenter_,r,s,i,this.calculateCenterShift(this.targetCenter_,r,n,s));this.get(he.ROTATION)!==n&&this.set(he.ROTATION,n),this.get(he.RESOLUTION)!==r&&(this.set(he.RESOLUTION,r),this.set("zoom",this.getZoom(),!0)),o&&this.get(he.CENTER)&&Te(this.get(he.CENTER),o)||this.set(he.CENTER,o),this.getAnimating()&&!t&&this.cancelAnimations(),this.cancelAnchor_=void 0}resolveConstraints(t,e,i){t=void 0!==t?t:200;const n=e||0,s=this.constraints_.rotation(this.targetRotation_),r=this.getViewportSize_(s),o=this.constraints_.resolution(this.targetResolution_,n,r),a=this.constraints_.center(this.targetCenter_,o,r,!1,this.calculateCenterShift(this.targetCenter_,o,s,r));if(0===t&&!this.cancelAnchor_)return this.targetResolution_=o,this.targetRotation_=s,this.targetCenter_=a,void this.applyTargetState_();i=i||(0===t?this.cancelAnchor_:void 0),this.cancelAnchor_=void 0,this.getResolution()===o&&this.getRotation()===s&&this.getCenterInternal()&&Te(this.getCenterInternal(),a)||(this.getAnimating()&&this.cancelAnimations(),this.animateInternal({rotation:s,center:a,resolution:o,duration:t,easing:ui,anchor:i}))}beginInteraction(){this.resolveConstraints(0),this.setHint(1,1)}endInteraction(t,e,i){i=i&&He(i,this.getProjection()),this.endInteractionInternal(t,e,i)}endInteractionInternal(t,e,i){this.getInteracting()&&(this.setHint(1,-1),this.resolveConstraints(t,e,i))}getConstrainedCenter(t,e){const i=this.getViewportSize_(this.getRotation());return this.constraints_.center(t,e||this.getResolution(),i)}getConstrainedZoom(t,e){const i=this.getResolutionForZoom(t);return this.getZoomForResolution(this.getConstrainedResolution(i,e))}getConstrainedResolution(t,e){e=e||0;const i=this.getViewportSize_(this.getRotation());return this.constraints_.resolution(t,e,i)}};function qi(t,e){if(!t.visible)return!1;const i=e.resolution;if(i<t.minResolution||i>=t.maxResolution)return!1;const n=e.zoom;return n>t.minZoom&&n<=t.maxZoom}const Hi=class extends ne{constructor(t){const e=Object.assign({},t);delete e.source,super(e),this.on,this.once,this.un,this.mapPrecomposeKey_=null,this.mapRenderKey_=null,this.sourceChangeKey_=null,this.renderer_=null,this.sourceReady_=!1,this.rendered=!1,t.render&&(this.render=t.render),t.map&&this.setMap(t.map),this.addChangeListener(ie,this.handleSourcePropertyChange_);const i=t.source?t.source:null;this.setSource(i)}getLayersArray(t){return(t=t||[]).push(this),t}getLayerStatesArray(t){return(t=t||[]).push(this.getLayerState()),t}getSource(){return this.get(ie)||null}getRenderSource(){return this.getSource()}getSourceState(){const t=this.getSource();return t?t.getState():"undefined"}handleSourceChange_(){this.changed(),this.sourceReady_||"ready"!==this.getSource().getState()||(this.sourceReady_=!0,this.dispatchEvent("sourceready"))}handleSourcePropertyChange_(){this.sourceChangeKey_&&(E(this.sourceChangeKey_),this.sourceChangeKey_=null),this.sourceReady_=!1;const t=this.getSource();t&&(this.sourceChangeKey_=C(t,f,this.handleSourceChange_,this),"ready"===t.getState()&&(this.sourceReady_=!0,setTimeout((()=>{this.dispatchEvent("sourceready")}),0))),this.changed()}getFeatures(t){return this.renderer_?this.renderer_.getFeatures(t):Promise.resolve([])}getData(t){return this.renderer_&&this.rendered?this.renderer_.getData(t):null}isVisible(t){let e;const i=this.getMapInternal();let n;!t&&i&&(t=i.getView()),e=t instanceof Ui?{viewState:t.getState(),extent:t.calculateExtent()}:t,!e.layerStatesArray&&i&&(e.layerStatesArray=i.getLayerGroup().getLayerStatesArray()),n=e.layerStatesArray?e.layerStatesArray.find((t=>t.layer===this)):this.getLayerState();const s=this.getExtent();return qi(n,e.viewState)&&(!s||It(s,e.extent))}getAttributions(t){if(!this.isVisible(t))return[];let e;const i=this.getSource();if(i&&(e=i.getAttributions()),!e)return[];let n=e(t instanceof Ui?t.getViewStateAndExtent():t);return Array.isArray(n)||(n=[n]),n}render(t,e){const i=this.getRenderer();return i.prepareFrame(t)?(this.rendered=!0,i.renderFrame(t,e)):null}unrender(){this.rendered=!1}setMapInternal(t){t||this.unrender(),this.set("map",t)}getMapInternal(){return this.get("map")}setMap(t){this.mapPrecomposeKey_&&(E(this.mapPrecomposeKey_),this.mapPrecomposeKey_=null),t||this.changed(),this.mapRenderKey_&&(E(this.mapRenderKey_),this.mapRenderKey_=null),t&&(this.mapPrecomposeKey_=C(t,oe,(function(t){const e=t.frameState.layerStatesArray,i=this.getLayerState(!1);U(!e.some((function(t){return t.layer===i.layer})),67),e.push(i)}),this),this.mapRenderKey_=C(this,f,t.render,t),this.changed())}setSource(t){this.set(ie,t)}getRenderer(){return this.renderer_||(this.renderer_=this.createRenderer()),this.renderer_}hasRenderer(){return!!this.renderer_}createRenderer(){return null}disposeInternal(){this.renderer_&&(this.renderer_.dispose(),delete this.renderer_),this.setSource(null),super.disposeInternal()}};function Ji(t,e){Vt.expire()}const Qi=class extends n{constructor(t){super(),this.map_=t}dispatchRenderEvent(t,e){I()}calculateMatrices2D(t){const e=t.viewState,i=t.coordinateToPixelTransform,n=t.pixelToCoordinateTransform;H(i,t.size[0]/2,t.size[1]/2,1/e.resolution,-1/e.resolution,-e.rotation,-e.center[0],-e.center[1]),J(n,i)}forEachFeatureAtCoordinate(t,e,i,n,s,r,o,a){let h;const l=e.viewState;function c(t,e,i,n){return s.call(r,e,t?i:null,n)}const u=l.projection,d=Ie(t.slice(),u),g=[[0,0]];if(u.canWrapX()&&n){const t=Rt(u.getExtent());g.push([-t,0],[t,0])}const _=e.layerStatesArray,f=_.length,m=[],p=[];for(let n=0;n<g.length;n++)for(let s=f-1;s>=0;--s){const r=_[s],u=r.layer;if(u.hasRenderer()&&qi(r,l)&&o.call(a,u)){const s=u.getRenderer(),o=u.getSource();if(s&&o){const a=o.getWrapX()?d:t,l=c.bind(null,r.managed);p[0]=a[0]+g[n][0],p[1]=a[1]+g[n][1],h=s.forEachFeatureAtCoordinate(p,e,i,l,m)}if(h)return h}}if(0===m.length)return;const y=1/m.length;return m.forEach(((t,e)=>t.distanceSq+=e*y)),m.sort(((t,e)=>t.distanceSq-e.distanceSq)),m.some((t=>h=t.callback(t.feature,t.layer,t.geometry))),h}hasFeatureAtCoordinate(t,e,i,n,s,r){return void 0!==this.forEachFeatureAtCoordinate(t,e,i,n,l,this,s,r)}getMap(){return this.map_}renderFrame(t){I()}flushDeclutterItems(t){}scheduleExpireIconCache(t){Vt.canExpireCache()&&t.postRenderFunctions.push(Ji)}},$i=class extends t{constructor(t,e,i,n){super(t),this.inversePixelTransform=e,this.frameState=i,this.context=n}},tn="ol-hidden",en="ol-control",nn=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"),sn=["style","variant","weight","size","lineHeight","family"],rn=function(t){const e=t.match(nn);if(!e)return null;const i={lineHeight:"normal",size:"1.2em",style:"normal",weight:"normal",variant:"normal"};for(let t=0,n=sn.length;t<n;++t){const n=e[t+1];void 0!==n&&(i[sn[t]]=n)}return i.families=i.family.split(/,\s?/),i};function on(t,e,i,n){let s;return s=i&&i.length?i.shift():K?new OffscreenCanvas(t||300,e||300):document.createElement("canvas"),t&&(s.width=t),e&&(s.height=e),s.getContext("2d",n)}function an(t){const e=t.canvas;e.width=1,e.height=1,t.clearRect(0,0,1,1)}function hn(t,e){const i=e.parentNode;i&&i.replaceChild(t,e)}function ln(t){return t&&t.parentNode?t.parentNode.removeChild(t):null}const cn="10px sans-serif",un="#000",dn="round",gn=[],_n="round",fn="#000",mn="center",pn="middle",yn=[0,0,0,0],xn=new L;let vn,Sn=null;const Cn={},wn=function(){const t="32px ",e=["monospace","serif"],i=e.length,n="wmytzilWMYTZIL@#/&?$%10";let s,r;function o(s,o,a){let h=!0;for(let l=0;l<i;++l){const i=e[l];if(r=Rn(s+" "+o+" "+t+i,n),a!=i){const e=Rn(s+" "+o+" "+t+a+","+i,n);h=h&&e!=r}}return!!h}function a(){let t=!0;const e=xn.getKeys();for(let i=0,n=e.length;i<n;++i){const n=e[i];xn.get(n)<100&&(o.apply(this,n.split("\n"))?(d(Cn),Sn=null,vn=void 0,xn.set(n,100)):(xn.set(n,xn.get(n)+1,!0),t=!1))}t&&(clearInterval(s),s=void 0)}return function(t){const e=rn(t);if(!e)return;const i=e.families;for(let t=0,n=i.length;t<n;++t){const n=i[t],r=e.style+"\n"+e.weight+"\n"+n;void 0===xn.get(r)&&(xn.set(r,100,!0),o(e.style,e.weight,n)||(xn.set(r,0,!0),void 0===s&&(s=setInterval(a,32))))}}}(),En=function(){let t;return function(e){let i=Cn[e];if(null==i){if(K){const t=rn(e),n=Tn(e,"Žg");i=(isNaN(Number(t.lineHeight))?1.2:Number(t.lineHeight))*(n.actualBoundingBoxAscent+n.actualBoundingBoxDescent)}else t||(t=document.createElement("div"),t.innerHTML="M",t.style.minHeight="0",t.style.maxHeight="none",t.style.height="auto",t.style.padding="0",t.style.border="none",t.style.position="absolute",t.style.display="block",t.style.left="-99999px"),t.style.font=e,document.body.appendChild(t),i=t.offsetHeight,document.body.removeChild(t);Cn[e]=i}return i}}();function Tn(t,e){return Sn||(Sn=on(1,1)),t!=vn&&(Sn.font=t,vn=Sn.font),Sn.measureText(e)}function Rn(t,e){return Tn(t,e).width}function In(t,e,i){if(e in i)return i[e];const n=e.split("\n").reduce(((e,i)=>Math.max(e,Rn(t,i))),0);return i[e]=n,n}const bn=class extends Qi{constructor(t){super(t),this.fontChangeListenerKey_=C(xn,e,t.redrawText.bind(t)),this.element_=document.createElement("div");const i=this.element_.style;i.position="absolute",i.width="100%",i.height="100%",i.zIndex="0",this.element_.className="ol-unselectable ol-layers";const n=t.getViewport();n.insertBefore(this.element_,n.firstChild||null),this.children_=[],this.renderedVisible_=!0,this.declutterLayers_=[]}dispatchRenderEvent(t,e){const i=this.getMap();if(i.hasListener(t)){const n=new $i(t,void 0,e);i.dispatchEvent(n)}}disposeInternal(){E(this.fontChangeListenerKey_),this.element_.parentNode.removeChild(this.element_),super.disposeInternal()}renderFrame(t){if(!t)return void(this.renderedVisible_&&(this.element_.style.display="none",this.renderedVisible_=!1));this.calculateMatrices2D(t),this.dispatchRenderEvent(oe,t);const e=t.layerStatesArray.sort((function(t,e){return t.zIndex-e.zIndex})),i=t.viewState;this.children_.length=0;const n=this.declutterLayers_;n.length=0;let s=null;for(let r=0,o=e.length;r<o;++r){const o=e[r];t.layerIndex=r;const a=o.layer,h=a.getSourceState();if(!qi(o,i)||"ready"!=h&&"undefined"!=h){a.unrender();continue}const l=a.render(t,s);l&&(l!==s&&(this.children_.push(l),s=l),"getDeclutter"in a&&n.push(a))}this.flushDeclutterItems(t),function(t,e){const i=t.childNodes;for(let n=0;;++n){const s=i[n],r=e[n];if(!s&&!r)break;s!==r&&(s?r?t.insertBefore(r,s):(t.removeChild(s),--n):t.appendChild(r))}}(this.element_,this.children_),this.dispatchRenderEvent("postcompose",t),this.renderedVisible_||(this.element_.style.display="",this.renderedVisible_=!0),this.scheduleExpireIconCache(t)}flushDeclutterItems(t){const e=this.declutterLayers_;for(let i=e.length-1;i>=0;--i)e[i].renderDeclutter(t);e.length=0}};class Mn extends t{constructor(t,e){super(t),this.layer=e}}const Fn="layers";class Ln extends ne{constructor(t){t=t||{};const e=Object.assign({},t);delete e.layers;let i=t.layers;super(e),this.on,this.once,this.un,this.layersListenerKeys_=[],this.listenerKeys_={},this.addChangeListener(Fn,this.handleLayersChanged_),i?Array.isArray(i)?i=new W(i.slice(),{unique:!0}):U("function"==typeof i.getArray,43):i=new W(void 0,{unique:!0}),this.setLayers(i)}handleLayerChange_(){this.changed()}handleLayersChanged_(){this.layersListenerKeys_.forEach(E),this.layersListenerKeys_.length=0;const t=this.getLayers();this.layersListenerKeys_.push(C(t,O,this.handleLayersAdd_,this),C(t,D,this.handleLayersRemove_,this));for(const t in this.listenerKeys_)this.listenerKeys_[t].forEach(E);d(this.listenerKeys_);const e=t.getArray();for(let t=0,i=e.length;t<i;t++){const i=e[t];this.registerLayerListeners_(i),this.dispatchEvent(new Mn("addlayer",i))}this.changed()}registerLayerListeners_(t){const i=[C(t,e,this.handleLayerChange_,this),C(t,f,this.handleLayerChange_,this)];t instanceof Ln&&i.push(C(t,"addlayer",this.handleLayerGroupAdd_,this),C(t,"removelayer",this.handleLayerGroupRemove_,this)),this.listenerKeys_[M(t)]=i}handleLayerGroupAdd_(t){this.dispatchEvent(new Mn("addlayer",t.layer))}handleLayerGroupRemove_(t){this.dispatchEvent(new Mn("removelayer",t.layer))}handleLayersAdd_(t){const e=t.element;this.registerLayerListeners_(e),this.dispatchEvent(new Mn("addlayer",e)),this.changed()}handleLayersRemove_(t){const e=t.element,i=M(e);this.listenerKeys_[i].forEach(E),delete this.listenerKeys_[i],this.dispatchEvent(new Mn("removelayer",e)),this.changed()}getLayers(){return this.get(Fn)}setLayers(t){const e=this.getLayers();if(e){const t=e.getArray();for(let e=0,i=t.length;e<i;++e)this.dispatchEvent(new Mn("removelayer",t[e]))}this.set(Fn,t)}getLayersArray(t){return t=void 0!==t?t:[],this.getLayers().forEach((function(e){e.getLayersArray(t)})),t}getLayerStatesArray(t){const e=void 0!==t?t:[],i=e.length;this.getLayers().forEach((function(t){t.getLayerStatesArray(e)}));const n=this.getLayerState();let s=n.zIndex;t||void 0!==n.zIndex||(s=0);for(let t=i,r=e.length;t<r;t++){const i=e[t];i.opacity*=n.opacity,i.visible=i.visible&&n.visible,i.maxResolution=Math.min(i.maxResolution,n.maxResolution),i.minResolution=Math.max(i.minResolution,n.minResolution),i.minZoom=Math.max(i.minZoom,n.minZoom),i.maxZoom=Math.min(i.maxZoom,n.maxZoom),void 0!==n.extent&&(void 0!==i.extent?i.extent=wt(i.extent,n.extent):i.extent=n.extent),void 0===i.zIndex&&(i.zIndex=s)}return e}getSourceState(){return"ready"}}const Pn=Ln,kn=class extends t{constructor(t,e,i){super(t),this.map=e,this.frameState=void 0!==i?i:null}},An=class extends kn{constructor(t,e,i,n,s,r){super(t,e,s),this.originalEvent=i,this.pixel_=null,this.coordinate_=null,this.dragging=void 0!==n&&n,this.activePointers=r}get pixel(){return this.pixel_||(this.pixel_=this.map.getEventPixel(this.originalEvent)),this.pixel_}set pixel(t){this.pixel_=t}get coordinate(){return this.coordinate_||(this.coordinate_=this.map.getCoordinateFromPixel(this.pixel)),this.coordinate_}set coordinate(t){this.coordinate_=t}preventDefault(){super.preventDefault(),"preventDefault"in this.originalEvent&&this.originalEvent.preventDefault()}stopPropagation(){super.stopPropagation(),"stopPropagation"in this.originalEvent&&this.originalEvent.stopPropagation()}},On={SINGLECLICK:"singleclick",CLICK:p,DBLCLICK:"dblclick",POINTERDRAG:"pointerdrag",POINTERMOVE:"pointermove",POINTERDOWN:"pointerdown",POINTERUP:"pointerup",POINTEROVER:"pointerover",POINTEROUT:"pointerout",POINTERENTER:"pointerenter",POINTERLEAVE:"pointerleave",POINTERCANCEL:"pointercancel"},Dn="pointerdown",zn=class extends _{constructor(t,e){super(t),this.map_=t,this.clickTimeoutId_,this.emulateClicks_=!1,this.dragging_=!1,this.dragListenerKeys_=[],this.moveTolerance_=void 0===e?1:e,this.down_=null;const i=this.map_.getViewport();this.activePointers_=[],this.trackedTouches_={},this.element_=i,this.pointerdownListenerKey_=C(i,Dn,this.handlePointerDown_,this),this.originalPointerMoveEvent_,this.relayedListenerKey_=C(i,"pointermove",this.relayMoveEvent_,this),this.boundHandleTouchMove_=this.handleTouchMove_.bind(this),this.element_.addEventListener(v,this.boundHandleTouchMove_,!!V&&{passive:!1})}emulateClick_(t){let e=new An(On.CLICK,this.map_,t);this.dispatchEvent(e),void 0!==this.clickTimeoutId_?(clearTimeout(this.clickTimeoutId_),this.clickTimeoutId_=void 0,e=new An(On.DBLCLICK,this.map_,t),this.dispatchEvent(e)):this.clickTimeoutId_=setTimeout((()=>{this.clickTimeoutId_=void 0;const e=new An(On.SINGLECLICK,this.map_,t);this.dispatchEvent(e)}),250)}updateActivePointers_(t){const e=t,i=e.pointerId;if(e.type==On.POINTERUP||e.type==On.POINTERCANCEL){delete this.trackedTouches_[i];for(const t in this.trackedTouches_)if(this.trackedTouches_[t].target!==e.target){delete this.trackedTouches_[t];break}}else e.type!=On.POINTERDOWN&&e.type!=On.POINTERMOVE||(this.trackedTouches_[i]=e);this.activePointers_=Object.values(this.trackedTouches_)}handlePointerUp_(t){this.updateActivePointers_(t);const e=new An(On.POINTERUP,this.map_,t,void 0,void 0,this.activePointers_);this.dispatchEvent(e),this.emulateClicks_&&!e.defaultPrevented&&!this.dragging_&&this.isMouseActionButton_(t)&&this.emulateClick_(this.down_),0===this.activePointers_.length&&(this.dragListenerKeys_.forEach(E),this.dragListenerKeys_.length=0,this.dragging_=!1,this.down_=null)}isMouseActionButton_(t){return 0===t.button}handlePointerDown_(t){this.emulateClicks_=0===this.activePointers_.length,this.updateActivePointers_(t);const e=new An(On.POINTERDOWN,this.map_,t,void 0,void 0,this.activePointers_);if(this.dispatchEvent(e),this.down_=new PointerEvent(t.type,t),Object.defineProperty(this.down_,"target",{writable:!1,value:t.target}),0===this.dragListenerKeys_.length){const t=this.map_.getOwnerDocument();this.dragListenerKeys_.push(C(t,On.POINTERMOVE,this.handlePointerMove_,this),C(t,On.POINTERUP,this.handlePointerUp_,this),C(this.element_,On.POINTERCANCEL,this.handlePointerUp_,this)),this.element_.getRootNode&&this.element_.getRootNode()!==t&&this.dragListenerKeys_.push(C(this.element_.getRootNode(),On.POINTERUP,this.handlePointerUp_,this))}}handlePointerMove_(t){if(this.isMoving_(t)){this.updateActivePointers_(t),this.dragging_=!0;const e=new An(On.POINTERDRAG,this.map_,t,this.dragging_,void 0,this.activePointers_);this.dispatchEvent(e)}}relayMoveEvent_(t){this.originalPointerMoveEvent_=t;const e=!(!this.down_||!this.isMoving_(t));this.dispatchEvent(new An(On.POINTERMOVE,this.map_,t,e))}handleTouchMove_(t){const e=this.originalPointerMoveEvent_;e&&!e.defaultPrevented||"boolean"==typeof t.cancelable&&!0!==t.cancelable||t.preventDefault()}isMoving_(t){return this.dragging_||Math.abs(t.clientX-this.down_.clientX)>this.moveTolerance_||Math.abs(t.clientY-this.down_.clientY)>this.moveTolerance_}disposeInternal(){this.relayedListenerKey_&&(E(this.relayedListenerKey_),this.relayedListenerKey_=null),this.element_.removeEventListener(v,this.boundHandleTouchMove_),this.pointerdownListenerKey_&&(E(this.pointerdownListenerKey_),this.pointerdownListenerKey_=null),this.dragListenerKeys_.forEach(E),this.dragListenerKeys_.length=0,this.element_=null,super.disposeInternal()}},Gn="postrender",Wn="loadstart",Xn="loadend",Nn="layergroup",Yn="size",jn="target",Bn="view",Kn=1/0,Zn=class extends L{constructor(t){super();const e=t.element;!e||t.target||e.style.pointerEvents||(e.style.pointerEvents="auto"),this.element=e||null,this.target_=null,this.map_=null,this.listenerKeys=[],t.render&&(this.render=t.render),t.target&&this.setTarget(t.target)}disposeInternal(){ln(this.element),super.disposeInternal()}getMap(){return this.map_}setMap(t){this.map_&&ln(this.element);for(let t=0,e=this.listenerKeys.length;t<e;++t)E(this.listenerKeys[t]);this.listenerKeys.length=0,this.map_=t,t&&((this.target_?this.target_:t.getOverlayContainerStopEvent()).appendChild(this.element),this.render!==u&&this.listenerKeys.push(C(t,Gn,this.render,this)),t.render())}render(t){}setTarget(t){this.target_="string"==typeof t?document.getElementById(t):t}},Vn=class extends Zn{constructor(t){t=t||{},super({element:document.createElement("div"),render:t.render,target:t.target}),this.ulElement_=document.createElement("ul"),this.collapsed_=void 0===t.collapsed||t.collapsed,this.userCollapsed_=this.collapsed_,this.overrideCollapsible_=void 0!==t.collapsible,this.collapsible_=void 0===t.collapsible||t.collapsible,this.collapsible_||(this.collapsed_=!1);const e=void 0!==t.className?t.className:"ol-attribution",i=void 0!==t.tipLabel?t.tipLabel:"Attributions",n=void 0!==t.expandClassName?t.expandClassName:e+"-expand",s=void 0!==t.collapseLabel?t.collapseLabel:"›",r=void 0!==t.collapseClassName?t.collapseClassName:e+"-collapse";"string"==typeof s?(this.collapseLabel_=document.createElement("span"),this.collapseLabel_.textContent=s,this.collapseLabel_.className=r):this.collapseLabel_=s;const o=void 0!==t.label?t.label:"i";"string"==typeof o?(this.label_=document.createElement("span"),this.label_.textContent=o,this.label_.className=n):this.label_=o;const a=this.collapsible_&&!this.collapsed_?this.collapseLabel_:this.label_;this.toggleButton_=document.createElement("button"),this.toggleButton_.setAttribute("type","button"),this.toggleButton_.setAttribute("aria-expanded",String(!this.collapsed_)),this.toggleButton_.title=i,this.toggleButton_.appendChild(a),this.toggleButton_.addEventListener(p,this.handleClick_.bind(this),!1);const h=e+" ol-unselectable "+en+(this.collapsed_&&this.collapsible_?" ol-collapsed":"")+(this.collapsible_?"":" ol-uncollapsible"),l=this.element;l.className=h,l.appendChild(this.toggleButton_),l.appendChild(this.ulElement_),this.renderedAttributions_=[],this.renderedVisible_=!0}collectSourceAttributions_(t){const e=Array.from(new Set(this.getMap().getAllLayers().flatMap((e=>e.getAttributions(t))))),i=!this.getMap().getAllLayers().some((t=>t.getSource()&&!1===t.getSource().getAttributionsCollapsible()));return this.overrideCollapsible_||this.setCollapsible(i),e}updateElement_(t){if(!t)return void(this.renderedVisible_&&(this.element.style.display="none",this.renderedVisible_=!1));const e=this.collectSourceAttributions_(t),i=e.length>0;if(this.renderedVisible_!=i&&(this.element.style.display=i?"":"none",this.renderedVisible_=i),!h(e,this.renderedAttributions_)){!function(t){for(;t.lastChild;)t.removeChild(t.lastChild)}(this.ulElement_);for(let t=0,i=e.length;t<i;++t){const i=document.createElement("li");i.innerHTML=e[t],this.ulElement_.appendChild(i)}this.renderedAttributions_=e}}handleClick_(t){t.preventDefault(),this.handleToggle_(),this.userCollapsed_=this.collapsed_}handleToggle_(){this.element.classList.toggle("ol-collapsed"),this.collapsed_?hn(this.collapseLabel_,this.label_):hn(this.label_,this.collapseLabel_),this.collapsed_=!this.collapsed_,this.toggleButton_.setAttribute("aria-expanded",String(!this.collapsed_))}getCollapsible(){return this.collapsible_}setCollapsible(t){this.collapsible_!==t&&(this.collapsible_=t,this.element.classList.toggle("ol-uncollapsible"),this.userCollapsed_&&this.handleToggle_())}setCollapsed(t){this.userCollapsed_=t,this.collapsible_&&this.collapsed_!==t&&this.handleToggle_()}getCollapsed(){return this.collapsed_}render(t){this.updateElement_(t.frameState)}},Un=class extends Zn{constructor(t){t=t||{},super({element:document.createElement("div"),render:t.render,target:t.target});const e=void 0!==t.className?t.className:"ol-rotate",i=void 0!==t.label?t.label:"⇧",n=void 0!==t.compassClassName?t.compassClassName:"ol-compass";this.label_=null,"string"==typeof i?(this.label_=document.createElement("span"),this.label_.className=n,this.label_.textContent=i):(this.label_=i,this.label_.classList.add(n));const s=t.tipLabel?t.tipLabel:"Reset rotation",r=document.createElement("button");r.className=e+"-reset",r.setAttribute("type","button"),r.title=s,r.appendChild(this.label_),r.addEventListener(p,this.handleClick_.bind(this),!1);const o=e+" ol-unselectable "+en,a=this.element;a.className=o,a.appendChild(r),this.callResetNorth_=t.resetNorth?t.resetNorth:void 0,this.duration_=void 0!==t.duration?t.duration:250,this.autoHide_=void 0===t.autoHide||t.autoHide,this.rotation_=void 0,this.autoHide_&&this.element.classList.add(tn)}handleClick_(t){t.preventDefault(),void 0!==this.callResetNorth_?this.callResetNorth_():this.resetNorth_()}resetNorth_(){const t=this.getMap().getView();if(!t)return;const e=t.getRotation();void 0!==e&&(this.duration_>0&&e%(2*Math.PI)!=0?t.animate({rotation:0,duration:this.duration_,easing:ui}):t.setRotation(0))}render(t){const e=t.frameState;if(!e)return;const i=e.viewState.rotation;if(i!=this.rotation_){const t="rotate("+i+"rad)";if(this.autoHide_){const t=this.element.classList.contains(tn);t||0!==i?t&&0!==i&&this.element.classList.remove(tn):this.element.classList.add(tn)}this.label_.style.transform=t}this.rotation_=i}},qn=class extends Zn{constructor(t){t=t||{},super({element:document.createElement("div"),target:t.target});const e=void 0!==t.className?t.className:"ol-zoom",i=void 0!==t.delta?t.delta:1,n=void 0!==t.zoomInClassName?t.zoomInClassName:e+"-in",s=void 0!==t.zoomOutClassName?t.zoomOutClassName:e+"-out",r=void 0!==t.zoomInLabel?t.zoomInLabel:"+",o=void 0!==t.zoomOutLabel?t.zoomOutLabel:"–",a=void 0!==t.zoomInTipLabel?t.zoomInTipLabel:"Zoom in",h=void 0!==t.zoomOutTipLabel?t.zoomOutTipLabel:"Zoom out",l=document.createElement("button");l.className=n,l.setAttribute("type","button"),l.title=a,l.appendChild("string"==typeof r?document.createTextNode(r):r),l.addEventListener(p,this.handleClick_.bind(this,i),!1);const c=document.createElement("button");c.className=s,c.setAttribute("type","button"),c.title=h,c.appendChild("string"==typeof o?document.createTextNode(o):o),c.addEventListener(p,this.handleClick_.bind(this,-i),!1);const u=e+" ol-unselectable "+en,d=this.element;d.className=u,d.appendChild(l),d.appendChild(c),this.duration_=void 0!==t.duration?t.duration:250}handleClick_(t,e){e.preventDefault(),this.zoomByDelta_(t)}zoomByDelta_(t){const e=this.getMap().getView();if(!e)return;const i=e.getZoom();if(void 0!==i){const n=e.getConstrainedZoom(i+t);this.duration_>0?(e.getAnimating()&&e.cancelAnimations(),e.animate({zoom:n,duration:this.duration_,easing:ui})):e.setZoom(n)}}},Hn="active";function Jn(t,e,i,n){const s=t.getZoom();if(void 0===s)return;const r=t.getConstrainedZoom(s+e),o=t.getResolutionForZoom(r);t.getAnimating()&&t.cancelAnimations(),t.animate({resolution:o,anchor:i,duration:void 0!==n?n:250,easing:ui})}const Qn=class extends L{constructor(t){super(),this.on,this.once,this.un,t&&t.handleEvent&&(this.handleEvent=t.handleEvent),this.map_=null,this.setActive(!0)}getActive(){return this.get(Hn)}getMap(){return this.map_}handleEvent(t){return!0}setActive(t){this.set(Hn,t)}setMap(t){this.map_=t}},$n=class extends Qn{constructor(t){super(),t=t||{},this.delta_=t.delta?t.delta:1,this.duration_=void 0!==t.duration?t.duration:250}handleEvent(t){let e=!1;if(t.type==On.DBLCLICK){const i=t.originalEvent,n=t.map,s=t.coordinate,r=i.shiftKey?-this.delta_:this.delta_;Jn(n.getView(),r,s,this.duration_),i.preventDefault(),e=!0}return!e}};function ts(t){const e=t.length;let i=0,n=0;for(let s=0;s<e;s++)i+=t[s].clientX,n+=t[s].clientY;return{clientX:i/e,clientY:n/e}}const es=class extends Qn{constructor(t){super(t=t||{}),t.handleDownEvent&&(this.handleDownEvent=t.handleDownEvent),t.handleDragEvent&&(this.handleDragEvent=t.handleDragEvent),t.handleMoveEvent&&(this.handleMoveEvent=t.handleMoveEvent),t.handleUpEvent&&(this.handleUpEvent=t.handleUpEvent),t.stopDown&&(this.stopDown=t.stopDown),this.handlingDownUpSequence=!1,this.targetPointers=[]}getPointerCount(){return this.targetPointers.length}handleDownEvent(t){return!1}handleDragEvent(t){}handleEvent(t){if(!t.originalEvent)return!0;let e=!1;if(this.updateTrackedPointers_(t),this.handlingDownUpSequence){if(t.type==On.POINTERDRAG)this.handleDragEvent(t),t.originalEvent.preventDefault();else if(t.type==On.POINTERUP){const e=this.handleUpEvent(t);this.handlingDownUpSequence=e&&this.targetPointers.length>0}}else if(t.type==On.POINTERDOWN){const i=this.handleDownEvent(t);this.handlingDownUpSequence=i,e=this.stopDown(i)}else t.type==On.POINTERMOVE&&this.handleMoveEvent(t);return!e}handleMoveEvent(t){}handleUpEvent(t){return!1}stopDown(t){return t}updateTrackedPointers_(t){t.activePointers&&(this.targetPointers=t.activePointers)}};function is(t){const e=arguments;return function(t){let i=!0;for(let n=0,s=e.length;n<s&&(i=i&&e[n](t),i);++n);return i}}const ns=function(t){const e=t.originalEvent;return e.altKey&&!(e.metaKey||e.ctrlKey)&&e.shiftKey},ss=function(t){return!t.map.getTargetElement().hasAttribute("tabindex")||function(t){const e=t.map.getTargetElement(),i=t.map.getOwnerDocument().activeElement;return e.contains(i)}(t)},rs=l,os=function(t){const e=t.originalEvent;return 0==e.button&&!(Y&&j&&e.ctrlKey)},as=function(t){const e=t.originalEvent;return!e.altKey&&!(e.metaKey||e.ctrlKey)&&!e.shiftKey},hs=function(t){const e=t.originalEvent;return!e.altKey&&!(e.metaKey||e.ctrlKey)&&e.shiftKey},ls=function(t){const e=t.originalEvent,i=e.target.tagName;return"INPUT"!==i&&"SELECT"!==i&&"TEXTAREA"!==i&&!e.target.isContentEditable},cs=function(t){const e=t.originalEvent;return U(void 0!==e,56),"mouse"==e.pointerType},us=function(t){const e=t.originalEvent;return U(void 0!==e,56),e.isPrimary&&0===e.button},ds=class extends es{constructor(t){super({stopDown:c}),t=t||{},this.kinetic_=t.kinetic,this.lastCentroid=null,this.lastPointersCount_,this.panning_=!1;const e=t.condition?t.condition:is(as,us);this.condition_=t.onFocusOnly?is(ss,e):e,this.noKinetic_=!1}handleDragEvent(t){const e=t.map;this.panning_||(this.panning_=!0,e.getView().beginInteraction());const i=this.targetPointers,n=e.getEventPixel(ts(i));if(i.length==this.lastPointersCount_){if(this.kinetic_&&this.kinetic_.update(n[0],n[1]),this.lastCentroid){const e=[this.lastCentroid[0]-n[0],n[1]-this.lastCentroid[1]],i=t.map.getView();s=e,r=i.getResolution(),s[0]*=r,s[1]*=r,Re(e,i.getRotation()),i.adjustCenterInternal(e)}}else this.kinetic_&&this.kinetic_.begin();var s,r;this.lastCentroid=n,this.lastPointersCount_=i.length,t.originalEvent.preventDefault()}handleUpEvent(t){const e=t.map,i=e.getView();if(0===this.targetPointers.length){if(!this.noKinetic_&&this.kinetic_&&this.kinetic_.end()){const t=this.kinetic_.getDistance(),n=this.kinetic_.getAngle(),s=i.getCenterInternal(),r=e.getPixelFromCoordinateInternal(s),o=e.getCoordinateFromPixelInternal([r[0]-t*Math.cos(n),r[1]-t*Math.sin(n)]);i.animateInternal({center:i.getConstrainedCenter(o),duration:500,easing:ui})}return this.panning_&&(this.panning_=!1,i.endInteraction()),!1}return this.kinetic_&&this.kinetic_.begin(),this.lastCentroid=null,!0}handleDownEvent(t){if(this.targetPointers.length>0&&this.condition_(t)){const 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}},gs=class extends es{constructor(t){t=t||{},super({stopDown:c}),this.condition_=t.condition?t.condition:ns,this.lastAngle_=void 0,this.duration_=void 0!==t.duration?t.duration:250}handleDragEvent(t){if(!cs(t))return;const e=t.map,i=e.getView();if(i.getConstraints().rotation===hi)return;const n=e.getSize(),s=t.pixel,r=Math.atan2(n[1]/2-s[1],s[0]-n[0]/2);if(void 0!==this.lastAngle_){const t=r-this.lastAngle_;i.adjustRotationInternal(-t)}this.lastAngle_=r}handleUpEvent(t){return!cs(t)||(t.map.getView().endInteraction(this.duration_),!1)}handleDownEvent(t){return!!cs(t)&&(!(!os(t)||!this.condition_(t))&&(t.map.getView().beginInteraction(),this.lastAngle_=void 0,!0))}},_s=class extends n{constructor(t){super(),this.geometry_=null,this.element_=document.createElement("div"),this.element_.style.position="absolute",this.element_.style.pointerEvents="auto",this.element_.className="ol-box "+t,this.map_=null,this.startPixel_=null,this.endPixel_=null}disposeInternal(){this.setMap(null)}render_(){const t=this.startPixel_,e=this.endPixel_,i="px",n=this.element_.style;n.left=Math.min(t[0],e[0])+i,n.top=Math.min(t[1],e[1])+i,n.width=Math.abs(e[0]-t[0])+i,n.height=Math.abs(e[1]-t[1])+i}setMap(t){if(this.map_){this.map_.getOverlayContainer().removeChild(this.element_);const t=this.element_.style;t.left="inherit",t.top="inherit",t.width="inherit",t.height="inherit"}this.map_=t,this.map_&&this.map_.getOverlayContainer().appendChild(this.element_)}setPixels(t,e){this.startPixel_=t,this.endPixel_=e,this.createOrUpdateGeometry(),this.render_()}createOrUpdateGeometry(){const t=this.startPixel_,e=this.endPixel_,i=[t,[t[0],e[1]],e,[e[0],t[1]]].map(this.map_.getCoordinateFromPixelInternal,this.map_);i[4]=i[0].slice(),this.geometry_?this.geometry_.setCoordinates([i]):this.geometry_=new ji([i])}getGeometry(){return this.geometry_}};class fs extends t{constructor(t,e,i){super(t),this.coordinate=e,this.mapBrowserEvent=i}}const ms=class extends es{constructor(t){super(),this.on,this.once,this.un,t=t||{},this.box_=new _s(t.className||"ol-dragbox"),this.minArea_=void 0!==t.minArea?t.minArea:64,t.onBoxEnd&&(this.onBoxEnd=t.onBoxEnd),this.startPixel_=null,this.condition_=t.condition?t.condition:os,this.boxEndCondition_=t.boxEndCondition?t.boxEndCondition:this.defaultBoxEndCondition}defaultBoxEndCondition(t,e,i){const n=i[0]-e[0],s=i[1]-e[1];return n*n+s*s>=this.minArea_}getGeometry(){return this.box_.getGeometry()}handleDragEvent(t){this.box_.setPixels(this.startPixel_,t.pixel),this.dispatchEvent(new fs("boxdrag",t.coordinate,t))}handleUpEvent(t){this.box_.setMap(null);const e=this.boxEndCondition_(t,this.startPixel_,t.pixel);return e&&this.onBoxEnd(t),this.dispatchEvent(new fs(e?"boxend":"boxcancel",t.coordinate,t)),!1}handleDownEvent(t){return!!this.condition_(t)&&(this.startPixel_=t.pixel,this.box_.setMap(t.map),this.box_.setPixels(this.startPixel_,this.startPixel_),this.dispatchEvent(new fs("boxstart",t.coordinate,t)),!0)}onBoxEnd(t){}},ps=class extends ms{constructor(t){super({condition:(t=t||{}).condition?t.condition:hs,className:t.className||"ol-dragzoom",minArea:t.minArea}),this.duration_=void 0!==t.duration?t.duration:200,this.out_=void 0!==t.out&&t.out}onBoxEnd(t){const e=this.getMap().getView();let i=this.getGeometry();if(this.out_){const t=e.rotatedExtentForGeometry(i),n=e.getResolutionForExtentInternal(t),s=e.getResolution()/n;i=i.clone(),i.scale(s*s)}e.fitInternal(i,{duration:this.duration_,easing:ui})}},ys="ArrowLeft",xs="ArrowRight",vs="ArrowDown",Ss=class extends Qn{constructor(t){super(),t=t||{},this.defaultCondition_=function(t){return as(t)&&ls(t)},this.condition_=void 0!==t.condition?t.condition:this.defaultCondition_,this.duration_=void 0!==t.duration?t.duration:100,this.pixelDelta_=void 0!==t.pixelDelta?t.pixelDelta:128}handleEvent(t){let e=!1;if(t.type==y){const i=t.originalEvent,n=i.key;if(this.condition_(t)&&(n==vs||n==ys||n==xs||"ArrowUp"==n)){const s=t.map.getView(),r=s.getResolution()*this.pixelDelta_;let o=0,a=0;n==vs?a=-r:n==ys?o=-r:n==xs?o=r:a=r;const h=[o,a];Re(h,s.getRotation()),function(t,e,i){const n=t.getCenterInternal();if(n){const s=[n[0]+e[0],n[1]+e[1]];t.animateInternal({duration:void 0!==i?i:250,easing:gi,center:t.getConstrainedCenter(s)})}}(s,h,this.duration_),i.preventDefault(),e=!0}}return!e}},Cs=class extends Qn{constructor(t){super(),t=t||{},this.condition_=t.condition?t.condition:function(t){return!function(t){const e=t.originalEvent;return j?e.metaKey:e.ctrlKey}(t)&&ls(t)},this.delta_=t.delta?t.delta:1,this.duration_=void 0!==t.duration?t.duration:100}handleEvent(t){let e=!1;if(t.type==y||t.type==x){const i=t.originalEvent,n=i.key;if(this.condition_(t)&&("+"===n||"-"===n)){const s=t.map,r="+"===n?this.delta_:-this.delta_;Jn(s.getView(),r,void 0,this.duration_),i.preventDefault(),e=!0}}return!e}},ws=class extends Qn{constructor(t){super(t=t||{}),this.totalDelta_=0,this.lastDelta_=0,this.maxDelta_=void 0!==t.maxDelta?t.maxDelta:1,this.duration_=void 0!==t.duration?t.duration:250,this.timeout_=void 0!==t.timeout?t.timeout:80,this.useAnchor_=void 0===t.useAnchor||t.useAnchor,this.constrainResolution_=void 0!==t.constrainResolution&&t.constrainResolution;const e=t.condition?t.condition:rs;this.condition_=t.onFocusOnly?is(ss,e):e,this.lastAnchor_=null,this.startTime_=void 0,this.timeoutId_,this.mode_=void 0,this.trackpadEventGap_=400,this.trackpadTimeoutId_,this.deltaPerZoom_=300}endInteraction_(){this.trackpadTimeoutId_=void 0;const t=this.getMap();t&&t.getView().endInteraction(void 0,this.lastDelta_?this.lastDelta_>0?1:-1:0,this.lastAnchor_)}handleEvent(t){if(!this.condition_(t))return!0;if(t.type!==S)return!0;const e=t.map,i=t.originalEvent;let n;if(i.preventDefault(),this.useAnchor_&&(this.lastAnchor_=t.coordinate),t.type==S&&(n=i.deltaY,N&&i.deltaMode===WheelEvent.DOM_DELTA_PIXEL&&(n/=B),i.deltaMode===WheelEvent.DOM_DELTA_LINE&&(n*=40)),0===n)return!1;this.lastDelta_=n;const s=Date.now();void 0===this.startTime_&&(this.startTime_=s),(!this.mode_||s-this.startTime_>this.trackpadEventGap_)&&(this.mode_=Math.abs(n)<4?"trackpad":"wheel");const r=e.getView();if("trackpad"===this.mode_&&!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(-n/this.deltaPerZoom_,this.lastAnchor_),this.startTime_=s,!1;this.totalDelta_+=n;const o=Math.max(this.timeout_-(s-this.startTime_),0);return clearTimeout(this.timeoutId_),this.timeoutId_=setTimeout(this.handleWheelZoom_.bind(this,e),o),!1}handleWheelZoom_(t){const e=t.getView();e.getAnimating()&&e.cancelAnimations();let i=-Ft(this.totalDelta_,-this.maxDelta_*this.deltaPerZoom_,this.maxDelta_*this.deltaPerZoom_)/this.deltaPerZoom_;(e.getConstrainResolution()||this.constrainResolution_)&&(i=i?i>0?1:-1:0),Jn(e,i,this.lastAnchor_,this.duration_),this.mode_=void 0,this.totalDelta_=0,this.lastAnchor_=null,this.startTime_=void 0,this.timeoutId_=void 0}setMouseAnchor(t){this.useAnchor_=t,t||(this.lastAnchor_=null)}},Es=class extends es{constructor(t){const e=t=t||{};e.stopDown||(e.stopDown=c),super(e),this.anchor_=null,this.lastAngle_=void 0,this.rotating_=!1,this.rotationDelta_=0,this.threshold_=void 0!==t.threshold?t.threshold:.3,this.duration_=void 0!==t.duration?t.duration:250}handleDragEvent(t){let e=0;const i=this.targetPointers[0],n=this.targetPointers[1],s=Math.atan2(n.clientY-i.clientY,n.clientX-i.clientX);if(void 0!==this.lastAngle_){const t=s-this.lastAngle_;this.rotationDelta_+=t,!this.rotating_&&Math.abs(this.rotationDelta_)>this.threshold_&&(this.rotating_=!0),e=t}this.lastAngle_=s;const r=t.map,o=r.getView();o.getConstraints().rotation!==hi&&(this.anchor_=r.getCoordinateFromPixelInternal(r.getEventPixel(ts(this.targetPointers))),this.rotating_&&(r.render(),o.adjustRotationInternal(e,this.anchor_)))}handleUpEvent(t){return!(this.targetPointers.length<2)||(t.map.getView().endInteraction(this.duration_),!1)}handleDownEvent(t){if(this.targetPointers.length>=2){const 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}},Ts=class extends es{constructor(t){const e=t=t||{};e.stopDown||(e.stopDown=c),super(e),this.anchor_=null,this.duration_=void 0!==t.duration?t.duration:400,this.lastDistance_=void 0,this.lastScaleDelta_=1}handleDragEvent(t){let e=1;const i=this.targetPointers[0],n=this.targetPointers[1],s=i.clientX-n.clientX,r=i.clientY-n.clientY,o=Math.sqrt(s*s+r*r);void 0!==this.lastDistance_&&(e=this.lastDistance_/o),this.lastDistance_=o;const a=t.map,h=a.getView();1!=e&&(this.lastScaleDelta_=e),this.anchor_=a.getCoordinateFromPixelInternal(a.getEventPixel(ts(this.targetPointers))),a.render(),h.adjustResolutionInternal(e,this.anchor_)}handleUpEvent(t){if(this.targetPointers.length<2){const e=t.map.getView(),i=this.lastScaleDelta_>1?1:-1;return e.endInteraction(this.duration_,i),!1}return!0}handleDownEvent(t){if(this.targetPointers.length>=2){const e=t.map;return this.anchor_=null,this.lastDistance_=void 0,this.lastScaleDelta_=1,this.handlingDownUpSequence||e.getView().beginInteraction(),!0}return!1}};function Rs(t,e,i){return void 0===i&&(i=[0,0]),i[0]=t[0]+2*e,i[1]=t[1]+2*e,i}function Is(t){return t[0]>0&&t[1]>0}function bs(t,e,i){return void 0===i&&(i=[0,0]),i[0]=t[0]*e+.5|0,i[1]=t[1]*e+.5|0,i}function Ms(t,e){return Array.isArray(t)?t:(void 0===e?e=[t,t]:(e[0]=t,e[1]=t),e)}function Fs(t){t instanceof Hi?t.setMapInternal(null):t instanceof Pn&&t.getLayers().forEach(Fs)}function Ls(t,e){if(t instanceof Hi)t.setMapInternal(e);else if(t instanceof Pn){const i=t.getLayers().getArray();for(let t=0,n=i.length;t<n;++t)Ls(i[t],e)}}const Ps=class extends L{constructor(t){super(),t=t||{},this.on,this.once,this.un;const e=function(t){let e=null;void 0!==t.keyboardEventTarget&&(e="string"==typeof t.keyboardEventTarget?document.getElementById(t.keyboardEventTarget):t.keyboardEventTarget);const i={},n=t.layers&&"function"==typeof t.layers.getLayers?t.layers:new Pn({layers:t.layers});let s,r,o;return i.layergroup=n,i.target=t.target,i.view=t.view instanceof Ui?t.view:new Ui,void 0!==t.controls&&(Array.isArray(t.controls)?s=new W(t.controls.slice()):(U("function"==typeof t.controls.getArray,47),s=t.controls)),void 0!==t.interactions&&(Array.isArray(t.interactions)?r=new W(t.interactions.slice()):(U("function"==typeof t.interactions.getArray,48),r=t.interactions)),void 0!==t.overlays?Array.isArray(t.overlays)?o=new W(t.overlays.slice()):(U("function"==typeof t.overlays.getArray,49),o=t.overlays):o=new W,{controls:s,interactions:r,keyboardEventTarget:e,overlays:o,values:i}}(t);this.renderComplete_,this.loaded_=!0,this.boundHandleBrowserEvent_=this.handleBrowserEvent.bind(this),this.maxTilesLoading_=void 0!==t.maxTilesLoading?t.maxTilesLoading:16,this.pixelRatio_=void 0!==t.pixelRatio?t.pixelRatio:B,this.postRenderTimeoutHandle_,this.animationDelayKey_,this.animationDelay_=this.animationDelay_.bind(this),this.coordinateToPixelTransform_=[1,0,0,1,0,0],this.pixelToCoordinateTransform_=[1,0,0,1,0,0],this.frameIndex_=0,this.frameState_=null,this.previousExtent_=null,this.viewPropertyListenerKey_=null,this.viewChangeListenerKey_=null,this.layerGroupPropertyListenerKeys_=null,this.viewport_=document.createElement("div"),this.viewport_.className="ol-viewport"+("ontouchstart"in window?" ol-touch":""),this.viewport_.style.position="relative",this.viewport_.style.overflow="hidden",this.viewport_.style.width="100%",this.viewport_.style.height="100%",this.overlayContainer_=document.createElement("div"),this.overlayContainer_.style.position="absolute",this.overlayContainer_.style.zIndex="0",this.overlayContainer_.style.width="100%",this.overlayContainer_.style.height="100%",this.overlayContainer_.style.pointerEvents="none",this.overlayContainer_.className="ol-overlaycontainer",this.viewport_.appendChild(this.overlayContainer_),this.overlayContainerStopEvent_=document.createElement("div"),this.overlayContainerStopEvent_.style.position="absolute",this.overlayContainerStopEvent_.style.zIndex="0",this.overlayContainerStopEvent_.style.width="100%",this.overlayContainerStopEvent_.style.height="100%",this.overlayContainerStopEvent_.style.pointerEvents="none",this.overlayContainerStopEvent_.className="ol-overlaycontainer-stopevent",this.viewport_.appendChild(this.overlayContainerStopEvent_),this.mapBrowserEventHandler_=null,this.moveTolerance_=t.moveTolerance,this.keyboardEventTarget_=e.keyboardEventTarget,this.targetChangeHandlerKeys_=null,this.targetElement_=null,this.resizeObserver_=new ResizeObserver((()=>this.updateSize())),this.controls=e.controls||function(t){t=t||{};const e=new W;return(void 0===t.zoom||t.zoom)&&e.push(new qn(t.zoomOptions)),(void 0===t.rotate||t.rotate)&&e.push(new Un(t.rotateOptions)),(void 0===t.attribution||t.attribution)&&e.push(new Vn(t.attributionOptions)),e}(),this.interactions=e.interactions||function(t){t=t||{};const e=new W,i=new class{constructor(t,e,i){this.decay_=t,this.minVelocity_=e,this.delay_=i,this.points_=[],this.angle_=0,this.initialVelocity_=0}begin(){this.points_.length=0,this.angle_=0,this.initialVelocity_=0}update(t,e){this.points_.push(t,e,Date.now())}end(){if(this.points_.length<6)return!1;const t=Date.now()-this.delay_,e=this.points_.length-3;if(this.points_[e+2]<t)return!1;let i=e-3;for(;i>0&&this.points_[i+2]>t;)i-=3;const n=this.points_[e+2]-this.points_[i+2];if(n<1e3/60)return!1;const s=this.points_[e]-this.points_[i],r=this.points_[e+1]-this.points_[i+1];return this.angle_=Math.atan2(r,s),this.initialVelocity_=Math.sqrt(s*s+r*r)/n,this.initialVelocity_>this.minVelocity_}getDistance(){return(this.minVelocity_-this.initialVelocity_)/this.decay_}getAngle(){return this.angle_}}(-.005,.05,100);return(void 0===t.altShiftDragRotate||t.altShiftDragRotate)&&e.push(new gs),(void 0===t.doubleClickZoom||t.doubleClickZoom)&&e.push(new $n({delta:t.zoomDelta,duration:t.zoomDuration})),(void 0===t.dragPan||t.dragPan)&&e.push(new ds({onFocusOnly:t.onFocusOnly,kinetic:i})),(void 0===t.pinchRotate||t.pinchRotate)&&e.push(new Es),(void 0===t.pinchZoom||t.pinchZoom)&&e.push(new Ts({duration:t.zoomDuration})),(void 0===t.keyboard||t.keyboard)&&(e.push(new Ss),e.push(new Cs({delta:t.zoomDelta,duration:t.zoomDuration}))),(void 0===t.mouseWheelZoom||t.mouseWheelZoom)&&e.push(new ws({onFocusOnly:t.onFocusOnly,duration:t.zoomDuration})),(void 0===t.shiftDragZoom||t.shiftDragZoom)&&e.push(new ps({duration:t.zoomDuration})),e}({onFocusOnly:!0}),this.overlays_=e.overlays,this.overlayIdIndex_={},this.renderer_=null,this.postRenderFunctions_=[],this.tileQueue_=new class extends class{constructor(t,e){this.priorityFunction_=t,this.keyFunction_=e,this.elements_=[],this.priorities_=[],this.queuedElements_={}}clear(){this.elements_.length=0,this.priorities_.length=0,d(this.queuedElements_)}dequeue(){const t=this.elements_,e=this.priorities_,i=t[0];1==t.length?(t.length=0,e.length=0):(t[0]=t.pop(),e[0]=e.pop(),this.siftUp_(0));const n=this.keyFunction_(i);return delete this.queuedElements_[n],i}enqueue(t){U(!(this.keyFunction_(t)in this.queuedElements_),31);const e=this.priorityFunction_(t);return e!=Kn&&(this.elements_.push(t),this.priorities_.push(e),this.queuedElements_[this.keyFunction_(t)]=!0,this.siftDown_(0,this.elements_.length-1),!0)}getCount(){return this.elements_.length}getLeftChildIndex_(t){return 2*t+1}getRightChildIndex_(t){return 2*t+2}getParentIndex_(t){return t-1>>1}heapify_(){let t;for(t=(this.elements_.length>>1)-1;t>=0;t--)this.siftUp_(t)}isEmpty(){return 0===this.elements_.length}isKeyQueued(t){return t in this.queuedElements_}isQueued(t){return this.isKeyQueued(this.keyFunction_(t))}siftUp_(t){const e=this.elements_,i=this.priorities_,n=e.length,s=e[t],r=i[t],o=t;for(;t<n>>1;){const s=this.getLeftChildIndex_(t),r=this.getRightChildIndex_(t),o=r<n&&i[r]<i[s]?r:s;e[t]=e[o],i[t]=i[o],t=o}e[t]=s,i[t]=r,this.siftDown_(o,t)}siftDown_(t,e){const i=this.elements_,n=this.priorities_,s=i[e],r=n[e];for(;e>t;){const t=this.getParentIndex_(e);if(!(n[t]>r))break;i[e]=i[t],n[e]=n[t],e=t}i[e]=s,n[e]=r}reprioritize(){const t=this.priorityFunction_,e=this.elements_,i=this.priorities_;let n=0;const s=e.length;let r,o,a;for(o=0;o<s;++o)r=e[o],a=t(r),a==Kn?delete this.queuedElements_[this.keyFunction_(r)]:(i[n]=a,e[n++]=r);e.length=n,i.length=n,this.heapify_()}}{constructor(t,e){super((function(e){return t.apply(null,e)}),(function(t){return t[0].getKey()})),this.boundHandleTileChange_=this.handleTileChange.bind(this),this.tileChangeCallback_=e,this.tilesLoading_=0,this.tilesLoadingKeys_={}}enqueue(t){const e=super.enqueue(t);return e&&t[0].addEventListener(f,this.boundHandleTileChange_),e}getTilesLoading(){return this.tilesLoading_}handleTileChange(t){const e=t.target,i=e.getState();if(2===i||3===i||4===i){3!==i&&e.removeEventListener(f,this.boundHandleTileChange_);const t=e.getKey();t in this.tilesLoadingKeys_&&(delete this.tilesLoadingKeys_[t],--this.tilesLoading_),this.tileChangeCallback_()}}loadMoreTiles(t,e){let i,n,s,r=0;for(;this.tilesLoading_<t&&r<e&&this.getCount()>0;)n=this.dequeue()[0],s=n.getKey(),i=n.getState(),0!==i||s in this.tilesLoadingKeys_||(this.tilesLoadingKeys_[s]=!0,++this.tilesLoading_,++r,n.load())}}(this.getTilePriority.bind(this),this.handleTileChange_.bind(this)),this.addChangeListener(Nn,this.handleLayerGroupChanged_),this.addChangeListener(Bn,this.handleViewChanged_),this.addChangeListener(Yn,this.handleSizeChanged_),this.addChangeListener(jn,this.handleTargetChanged_),this.setProperties(e.values);const i=this;!t.view||t.view instanceof Ui||t.view.then((function(t){i.setView(new Ui(t))})),this.controls.addEventListener(O,(t=>{t.element.setMap(this)})),this.controls.addEventListener(D,(t=>{t.element.setMap(null)})),this.interactions.addEventListener(O,(t=>{t.element.setMap(this)})),this.interactions.addEventListener(D,(t=>{t.element.setMap(null)})),this.overlays_.addEventListener(O,(t=>{this.addOverlayInternal_(t.element)})),this.overlays_.addEventListener(D,(t=>{const e=t.element.getId();void 0!==e&&delete this.overlayIdIndex_[e.toString()],t.element.setMap(null)})),this.controls.forEach((t=>{t.setMap(this)})),this.interactions.forEach((t=>{t.setMap(this)})),this.overlays_.forEach(this.addOverlayInternal_.bind(this))}addControl(t){this.getControls().push(t)}addInteraction(t){this.getInteractions().push(t)}addLayer(t){this.getLayerGroup().getLayers().push(t)}handleLayerAdd_(t){Ls(t.layer,this)}addOverlay(t){this.getOverlays().push(t)}addOverlayInternal_(t){const e=t.getId();void 0!==e&&(this.overlayIdIndex_[e.toString()]=t),t.setMap(this)}disposeInternal(){this.controls.clear(),this.interactions.clear(),this.overlays_.clear(),this.resizeObserver_.disconnect(),this.setTarget(null),super.disposeInternal()}forEachFeatureAtPixel(t,e,i){if(!this.frameState_||!this.renderer_)return;const n=this.getCoordinateFromPixelInternal(t),s=void 0!==(i=void 0!==i?i:{}).hitTolerance?i.hitTolerance:0,r=void 0!==i.layerFilter?i.layerFilter:l,o=!1!==i.checkWrapped;return this.renderer_.forEachFeatureAtCoordinate(n,this.frameState_,s,o,e,null,r,null)}getFeaturesAtPixel(t,e){const i=[];return this.forEachFeatureAtPixel(t,(function(t){i.push(t)}),e),i}getAllLayers(){const t=[];return function e(i){i.forEach((function(i){i instanceof Pn?e(i.getLayers()):t.push(i)}))}(this.getLayers()),t}hasFeatureAtPixel(t,e){if(!this.frameState_||!this.renderer_)return!1;const i=this.getCoordinateFromPixelInternal(t),n=void 0!==(e=void 0!==e?e:{}).layerFilter?e.layerFilter:l,s=void 0!==e.hitTolerance?e.hitTolerance:0,r=!1!==e.checkWrapped;return this.renderer_.hasFeatureAtCoordinate(i,this.frameState_,s,r,n,null)}getEventCoordinate(t){return this.getCoordinateFromPixel(this.getEventPixel(t))}getEventCoordinateInternal(t){return this.getCoordinateFromPixelInternal(this.getEventPixel(t))}getEventPixel(t){const e=this.viewport_.getBoundingClientRect(),i=this.getSize(),n=e.width/i[0],s=e.height/i[1],r="changedTouches"in t?t.changedTouches[0]:t;return[(r.clientX-e.left)/n,(r.clientY-e.top)/s]}getTarget(){return this.get(jn)}getTargetElement(){return this.targetElement_}getCoordinateFromPixel(t){return qe(this.getCoordinateFromPixelInternal(t),this.getView().getProjection())}getCoordinateFromPixelInternal(t){const e=this.frameState_;return e?q(e.pixelToCoordinateTransform,t.slice()):null}getControls(){return this.controls}getOverlays(){return this.overlays_}getOverlayById(t){const e=this.overlayIdIndex_[t.toString()];return void 0!==e?e:null}getInteractions(){return this.interactions}getLayerGroup(){return this.get(Nn)}setLayers(t){const e=this.getLayerGroup();if(t instanceof W)return void e.setLayers(t);const i=e.getLayers();i.clear(),i.extend(t)}getLayers(){return this.getLayerGroup().getLayers()}getLoadingOrNotReady(){const t=this.getLayerGroup().getLayerStatesArray();for(let e=0,i=t.length;e<i;++e){const i=t[e];if(!i.visible)continue;const n=i.layer.getRenderer();if(n&&!n.ready)return!0;const s=i.layer.getSource();if(s&&s.loading)return!0}return!1}getPixelFromCoordinate(t){const e=He(t,this.getView().getProjection());return this.getPixelFromCoordinateInternal(e)}getPixelFromCoordinateInternal(t){const e=this.frameState_;return e?q(e.coordinateToPixelTransform,t.slice(0,2)):null}getRenderer(){return this.renderer_}getSize(){return this.get(Yn)}getView(){return this.get(Bn)}getViewport(){return this.viewport_}getOverlayContainer(){return this.overlayContainer_}getOverlayContainerStopEvent(){return this.overlayContainerStopEvent_}getOwnerDocument(){const t=this.getTargetElement();return t?t.ownerDocument:document}getTilePriority(t,e,i,n){return function(t,e,i,n,s){if(!t||!(i in t.wantedTiles))return Kn;if(!t.wantedTiles[i][e.getKey()])return Kn;const r=t.viewState.center,o=n[0]-r[0],a=n[1]-r[1];return 65536*Math.log(s)+Math.sqrt(o*o+a*a)/s}(this.frameState_,t,e,i,n)}handleBrowserEvent(t,e){e=e||t.type;const i=new An(e,this,t);this.handleMapBrowserEvent(i)}handleMapBrowserEvent(t){if(!this.frameState_)return;const e=t.originalEvent,i=e.type;if(i===Dn||i===S||i===y){const t=this.getOwnerDocument(),i=this.viewport_.getRootNode?this.viewport_.getRootNode():t,n=e.target;if(this.overlayContainerStopEvent_.contains(n)||!(i===t?t.documentElement:i).contains(n))return}if(t.frameState=this.frameState_,!1!==this.dispatchEvent(t)){const e=this.getInteractions().getArray().slice();for(let i=e.length-1;i>=0;i--){const n=e[i];if(n.getMap()===this&&n.getActive()&&this.getTargetElement()&&(!n.handleEvent(t)||t.propagationStopped))break}}}handlePostRender(){const t=this.frameState_,e=this.tileQueue_;if(!e.isEmpty()){let i=this.maxTilesLoading_,n=i;if(t){const e=t.viewHints;if(e[0]||e[1]){const e=Date.now()-t.time>8;i=e?0:8,n=e?0:2}}e.getTilesLoading()<i&&(e.reprioritize(),e.loadMoreTiles(i,n))}t&&this.renderer_&&!t.animate&&(!0===this.renderComplete_?(this.hasListener(ae)&&this.renderer_.dispatchRenderEvent(ae,t),!1===this.loaded_&&(this.loaded_=!0,this.dispatchEvent(new kn(Xn,this,t)))):!0===this.loaded_&&(this.loaded_=!1,this.dispatchEvent(new kn(Wn,this,t))));const i=this.postRenderFunctions_;for(let e=0,n=i.length;e<n;++e)i[e](this,t);i.length=0}handleSizeChanged_(){this.getView()&&!this.getView().getAnimating()&&this.getView().resolveConstraints(0),this.render()}handleTargetChanged_(){if(this.mapBrowserEventHandler_){for(let t=0,e=this.targetChangeHandlerKeys_.length;t<e;++t)E(this.targetChangeHandlerKeys_[t]);this.targetChangeHandlerKeys_=null,this.viewport_.removeEventListener(m,this.boundHandleBrowserEvent_),this.viewport_.removeEventListener(S,this.boundHandleBrowserEvent_),this.mapBrowserEventHandler_.dispose(),this.mapBrowserEventHandler_=null,ln(this.viewport_)}if(this.targetElement_){this.resizeObserver_.unobserve(this.targetElement_);const t=this.targetElement_.getRootNode();t instanceof ShadowRoot&&this.resizeObserver_.unobserve(t.host),this.setSize(void 0)}const t=this.getTarget(),e="string"==typeof t?document.getElementById(t):t;if(this.targetElement_=e,e){e.appendChild(this.viewport_),this.renderer_||(this.renderer_=new bn(this)),this.mapBrowserEventHandler_=new zn(this,this.moveTolerance_);for(const t in On)this.mapBrowserEventHandler_.addEventListener(On[t],this.handleMapBrowserEvent.bind(this));this.viewport_.addEventListener(m,this.boundHandleBrowserEvent_,!1),this.viewport_.addEventListener(S,this.boundHandleBrowserEvent_,!!V&&{passive:!1});const t=this.keyboardEventTarget_?this.keyboardEventTarget_:e;this.targetChangeHandlerKeys_=[C(t,y,this.handleBrowserEvent,this),C(t,x,this.handleBrowserEvent,this)];const i=e.getRootNode();i instanceof ShadowRoot&&this.resizeObserver_.observe(i.host),this.resizeObserver_.observe(e)}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()}handleTileChange_(){this.render()}handleViewPropertyChanged_(){this.render()}handleViewChanged_(){this.viewPropertyListenerKey_&&(E(this.viewPropertyListenerKey_),this.viewPropertyListenerKey_=null),this.viewChangeListenerKey_&&(E(this.viewChangeListenerKey_),this.viewChangeListenerKey_=null);const t=this.getView();t&&(this.updateViewportSize_(),this.viewPropertyListenerKey_=C(t,e,this.handleViewPropertyChanged_,this),this.viewChangeListenerKey_=C(t,f,this.handleViewPropertyChanged_,this),t.resolveConstraints(0)),this.render()}handleLayerGroupChanged_(){this.layerGroupPropertyListenerKeys_&&(this.layerGroupPropertyListenerKeys_.forEach(E),this.layerGroupPropertyListenerKeys_=null);const t=this.getLayerGroup();t&&(this.handleLayerAdd_(new Mn("addlayer",t)),this.layerGroupPropertyListenerKeys_=[C(t,e,this.render,this),C(t,f,this.render,this),C(t,"addlayer",this.handleLayerAdd_,this),C(t,"removelayer",this.handleLayerRemove_,this)]),this.render()}isRendered(){return!!this.frameState_}animationDelay_(){this.animationDelayKey_=void 0,this.renderFrame_(Date.now())}renderSync(){this.animationDelayKey_&&cancelAnimationFrame(this.animationDelayKey_),this.animationDelay_()}redrawText(){const t=this.getLayerGroup().getLayerStatesArray();for(let e=0,i=t.length;e<i;++e){const i=t[e].layer;i.hasRenderer()&&i.getRenderer().handleFontsChanged()}}render(){this.renderer_&&void 0===this.animationDelayKey_&&(this.animationDelayKey_=requestAnimationFrame(this.animationDelay_))}flushDeclutterItems(){const t=this.frameState_;t&&this.renderer_.flushDeclutterItems(t)}removeControl(t){return this.getControls().remove(t)}removeInteraction(t){return this.getInteractions().remove(t)}removeLayer(t){return this.getLayerGroup().getLayers().remove(t)}handleLayerRemove_(t){Fs(t.layer)}removeOverlay(t){return this.getOverlays().remove(t)}renderFrame_(t){const e=this.getSize(),i=this.getView(),n=this.frameState_;let s=null;if(void 0!==e&&Is(e)&&i&&i.isDef()){const n=i.getHints(this.frameState_?this.frameState_.viewHints:void 0),r=i.getState();if(s={animate:!1,coordinateToPixelTransform:this.coordinateToPixelTransform_,declutterTree:null,extent:vt(r.center,r.resolution,r.rotation,e),index:this.frameIndex_++,layerIndex:0,layerStatesArray:this.getLayerGroup().getLayerStatesArray(),pixelRatio:this.pixelRatio_,pixelToCoordinateTransform:this.pixelToCoordinateTransform_,postRenderFunctions:[],size:e,tileQueue:this.tileQueue_,time:t,usedTiles:{},viewState:r,viewHints:n,wantedTiles:{},mapId:M(this),renderTargets:{}},r.nextCenter&&r.nextResolution){const t=isNaN(r.nextRotation)?r.rotation:r.nextRotation;s.nextExtent=vt(r.nextCenter,r.nextResolution,t,e)}}this.frameState_=s,this.renderer_.renderFrame(s),s&&(s.animate&&this.render(),Array.prototype.push.apply(this.postRenderFunctions_,s.postRenderFunctions),n&&(!this.previousExtent_||!bt(this.previousExtent_)&&!ct(s.extent,this.previousExtent_))&&(this.dispatchEvent(new kn("movestart",this,n)),this.previousExtent_=lt(this.previousExtent_)),this.previousExtent_&&!s.viewHints[0]&&!s.viewHints[1]&&!ct(s.extent,this.previousExtent_)&&(this.dispatchEvent(new kn("moveend",this,s)),it(s.extent,this.previousExtent_))),this.dispatchEvent(new kn(Gn,this,s)),this.renderComplete_=this.hasListener(Wn)||this.hasListener(Xn)||this.hasListener(ae)?!this.tileQueue_.getTilesLoading()&&!this.tileQueue_.getCount()&&!this.getLoadingOrNotReady():void 0,this.postRenderTimeoutHandle_||(this.postRenderTimeoutHandle_=setTimeout((()=>{this.postRenderTimeoutHandle_=void 0,this.handlePostRender()}),0))}setLayerGroup(t){const e=this.getLayerGroup();e&&this.handleLayerRemove_(new Mn("removelayer",e)),this.set(Nn,t)}setSize(t){this.set(Yn,t)}setTarget(t){this.set(jn,t)}setView(t){if(!t||t instanceof Ui)return void this.set(Bn,t);this.set(Bn,new Ui);const e=this;t.then((function(t){e.setView(new Ui(t))}))}updateSize(){const t=this.getTargetElement();let e;if(t){const i=getComputedStyle(t),n=t.offsetWidth-parseFloat(i.borderLeftWidth)-parseFloat(i.paddingLeft)-parseFloat(i.paddingRight)-parseFloat(i.borderRightWidth),s=t.offsetHeight-parseFloat(i.borderTopWidth)-parseFloat(i.paddingTop)-parseFloat(i.paddingBottom)-parseFloat(i.borderBottomWidth);isNaN(n)||isNaN(s)||(e=[n,s],!Is(e)&&(t.offsetWidth||t.offsetHeight||t.getClientRects().length)&&Le("No map visible because the map container's width or height are 0."))}const i=this.getSize();!e||i&&h(e,i)||(this.setSize(e),this.updateViewportSize_())}updateViewportSize_(){const t=this.getView();if(t){let e;const i=getComputedStyle(this.viewport_);i.width&&i.height&&(e=[parseInt(i.width,10),parseInt(i.height,10)]),t.setViewportSize(e)}}};var ks=i(2582);const As=class{constructor(t){this.rbush_=new ks(t),this.items_={}}insert(t,e){const i={minX:t[0],minY:t[1],maxX:t[2],maxY:t[3],value:e};this.rbush_.insert(i),this.items_[M(e)]=i}load(t,e){const i=new Array(e.length);for(let n=0,s=e.length;n<s;n++){const s=t[n],r=e[n],o={minX:s[0],minY:s[1],maxX:s[2],maxY:s[3],value:r};i[n]=o,this.items_[M(r)]=o}this.rbush_.load(i)}remove(t){const e=M(t),i=this.items_[e];return delete this.items_[e],null!==this.rbush_.remove(i)}update(t,e){const i=this.items_[M(e)];ct([i.minX,i.minY,i.maxX,i.maxY],t)||(this.remove(e),this.insert(t,e))}getAll(){return this.rbush_.all().map((function(t){return t.value}))}getInExtent(t){const e={minX:t[0],minY:t[1],maxX:t[2],maxY:t[3]};return this.rbush_.search(e).map((function(t){return t.value}))}forEach(t){return this.forEach_(this.getAll(),t)}forEachInExtent(t,e){return this.forEach_(this.getInExtent(t),e)}forEach_(t,e){let i;for(let n=0,s=t.length;n<s;n++)if(i=e(t[n]),i)return i;return i}isEmpty(){return g(this.items_)}clear(){this.rbush_.clear(),this.items_={}}getExtent(t){const e=this.rbush_.toJSON();return ht(e.minX,e.minY,e.maxX,e.maxY,t)}concat(t){this.rbush_.load(t.rbush_.all());for(const e in t.items_)this.items_[e]=t.items_[e]}};function Os(t){return t?Array.isArray(t)?function(e){return t}:"function"==typeof t?t:function(e){return[t]}:null}const Ds=class extends L{constructor(t){super(),this.projection=ze(t.projection),this.attributions_=Os(t.attributions),this.attributionsCollapsible_=void 0===t.attributionsCollapsible||t.attributionsCollapsible,this.loading=!1,this.state_=void 0!==t.state?t.state:"ready",this.wrapX_=void 0!==t.wrapX&&t.wrapX,this.interpolate_=!!t.interpolate,this.viewResolver=null,this.viewRejector=null;const e=this;this.viewPromise_=new Promise((function(t,i){e.viewResolver=t,e.viewRejector=i}))}getAttributions(){return this.attributions_}getAttributionsCollapsible(){return this.attributionsCollapsible_}getProjection(){return this.projection}getResolutions(t){return null}getView(){return this.viewPromise_}getState(){return this.state_}getWrapX(){return this.wrapX_}getInterpolate(){return this.interpolate_}refresh(){this.changed()}setAttributions(t){this.attributions_=Os(t),this.changed()}setState(t){this.state_=t,this.changed()}},zs="addfeature",Gs="removefeature";function Ws(t,e){return[[-1/0,-1/0,1/0,1/0]]}function Xs(t,e){return function(i,n,s,r,o){const a=this;!function(t,e,i,n,s,r,o){const a=new XMLHttpRequest;a.open("GET","function"==typeof t?t(i,n,s):t,!0),"arraybuffer"==e.getType()&&(a.responseType="arraybuffer"),a.withCredentials=false,a.onload=function(t){if(!a.status||a.status>=200&&a.status<300){const t=e.getType();let n;"json"==t||"text"==t?n=a.responseText:"xml"==t?(n=a.responseXML,n||(n=(new DOMParser).parseFromString(a.responseText,"application/xml"))):"arraybuffer"==t&&(n=a.response),n?r(e.readFeatures(n,{extent:i,featureProjection:s}),e.readProjection(n)):o()}else o()},a.onerror=o,a.send()}(t,e,i,n,s,(function(t,e){a.addFeatures(t),void 0!==r&&r(t)}),o||u)}}class Ns extends t{constructor(t,e,i){super(t),this.feature=e,this.features=i}}const Ys=class extends Ds{constructor(t){super({attributions:(t=t||{}).attributions,interpolate:!0,projection:void 0,state:"ready",wrapX:void 0===t.wrapX||t.wrapX}),this.on,this.once,this.un,this.loader_=u,this.format_=t.format,this.overlaps_=void 0===t.overlaps||t.overlaps,this.url_=t.url,void 0!==t.loader?this.loader_=t.loader:void 0!==this.url_&&(U(this.format_,7),this.loader_=Xs(this.url_,this.format_)),this.strategy_=void 0!==t.strategy?t.strategy:Ws;const e=void 0===t.useSpatialIndex||t.useSpatialIndex;let i,n;this.featuresRtree_=e?new As:null,this.loadedExtentsRtree_=new As,this.loadingExtentsCount_=0,this.nullGeometryFeatures_={},this.idIndex_={},this.uidIndex_={},this.featureChangeKeys_={},this.featuresCollection_=null,Array.isArray(t.features)?n=t.features:t.features&&(i=t.features,n=i.getArray()),e||void 0!==i||(i=new W(n)),void 0!==n&&this.addFeaturesInternal(n),void 0!==i&&this.bindFeaturesCollection_(i)}addFeature(t){this.addFeatureInternal(t),this.changed()}addFeatureInternal(t){const e=M(t);if(!this.addToIndex_(e,t))return void(this.featuresCollection_&&this.featuresCollection_.remove(t));this.setupChangeEvents_(e,t);const i=t.getGeometry();if(i){const e=i.getExtent();this.featuresRtree_&&this.featuresRtree_.insert(e,t)}else this.nullGeometryFeatures_[e]=t;this.dispatchEvent(new Ns(zs,t))}setupChangeEvents_(t,i){this.featureChangeKeys_[t]=[C(i,f,this.handleFeatureChange_,this),C(i,e,this.handleFeatureChange_,this)]}addToIndex_(t,e){let i=!0;const n=e.getId();return void 0!==n&&(n.toString()in this.idIndex_?i=!1:this.idIndex_[n.toString()]=e),i&&(U(!(t in this.uidIndex_),30),this.uidIndex_[t]=e),i}addFeatures(t){this.addFeaturesInternal(t),this.changed()}addFeaturesInternal(t){const e=[],i=[],n=[];for(let e=0,n=t.length;e<n;e++){const n=t[e],s=M(n);this.addToIndex_(s,n)&&i.push(n)}for(let t=0,s=i.length;t<s;t++){const s=i[t],r=M(s);this.setupChangeEvents_(r,s);const o=s.getGeometry();if(o){const t=o.getExtent();e.push(t),n.push(s)}else this.nullGeometryFeatures_[r]=s}if(this.featuresRtree_&&this.featuresRtree_.load(e,n),this.hasListener(zs))for(let t=0,e=i.length;t<e;t++)this.dispatchEvent(new Ns(zs,i[t]))}bindFeaturesCollection_(t){let e=!1;this.addEventListener(zs,(function(i){e||(e=!0,t.push(i.feature),e=!1)})),this.addEventListener(Gs,(function(i){e||(e=!0,t.remove(i.feature),e=!1)})),t.addEventListener(O,(t=>{e||(e=!0,this.addFeature(t.element),e=!1)})),t.addEventListener(D,(t=>{e||(e=!0,this.removeFeature(t.element),e=!1)})),this.featuresCollection_=t}clear(t){if(t){for(const t in this.featureChangeKeys_)this.featureChangeKeys_[t].forEach(E);this.featuresCollection_||(this.featureChangeKeys_={},this.idIndex_={},this.uidIndex_={})}else if(this.featuresRtree_){const t=t=>{this.removeFeatureInternal(t)};this.featuresRtree_.forEach(t);for(const t in this.nullGeometryFeatures_)this.removeFeatureInternal(this.nullGeometryFeatures_[t])}this.featuresCollection_&&this.featuresCollection_.clear(),this.featuresRtree_&&this.featuresRtree_.clear(),this.nullGeometryFeatures_={};const e=new Ns("clear");this.dispatchEvent(e),this.changed()}forEachFeature(t){if(this.featuresRtree_)return this.featuresRtree_.forEach(t);this.featuresCollection_&&this.featuresCollection_.forEach(t)}forEachFeatureAtCoordinateDirect(t,e){const i=[t[0],t[1],t[0],t[1]];return this.forEachFeatureInExtent(i,(function(i){if(i.getGeometry().intersectsCoordinate(t))return e(i)}))}forEachFeatureInExtent(t,e){if(this.featuresRtree_)return this.featuresRtree_.forEachInExtent(t,e);this.featuresCollection_&&this.featuresCollection_.forEach(e)}forEachFeatureIntersectingExtent(t,e){return this.forEachFeatureInExtent(t,(function(i){if(i.getGeometry().intersectsExtent(t)){const t=e(i);if(t)return t}}))}getFeaturesCollection(){return this.featuresCollection_}getFeatures(){let t;return this.featuresCollection_?t=this.featuresCollection_.getArray().slice(0):this.featuresRtree_&&(t=this.featuresRtree_.getAll(),g(this.nullGeometryFeatures_)||a(t,Object.values(this.nullGeometryFeatures_))),t}getFeaturesAtCoordinate(t){const e=[];return this.forEachFeatureAtCoordinateDirect(t,(function(t){e.push(t)})),e}getFeaturesInExtent(t,e){if(this.featuresRtree_){if(!(e&&e.canWrapX()&&this.getWrapX()))return this.featuresRtree_.getInExtent(t);const i=function(t,e){if(e.canWrapX()){const i=e.getExtent();if(!isFinite(t[0])||!isFinite(t[2]))return[[i[0],t[1],i[2],t[3]]];Mt(t,e);const n=Rt(i);if(Rt(t)>n)return[[i[0],t[1],i[2],t[3]]];if(t[0]<i[0])return[[t[0]+n,t[1],i[2],t[3]],[i[0],t[1],t[2],t[3]]];if(t[2]>i[2])return[[t[0],t[1],i[2],t[3]],[i[0],t[1],t[2]-n,t[3]]]}return[t]}(t,e);return[].concat(...i.map((t=>this.featuresRtree_.getInExtent(t))))}return this.featuresCollection_?this.featuresCollection_.getArray().slice(0):[]}getClosestFeatureToCoordinate(t,e){const i=t[0],n=t[1];let s=null;const r=[NaN,NaN];let o=1/0;const a=[-1/0,-1/0,1/0,1/0];return e=e||l,this.featuresRtree_.forEachInExtent(a,(function(t){if(e(t)){const e=t.getGeometry(),h=o;if(o=e.closestPointXY(i,n,r,o),o<h){s=t;const e=Math.sqrt(o);a[0]=i-e,a[1]=n-e,a[2]=i+e,a[3]=n+e}}})),s}getExtent(t){return this.featuresRtree_.getExtent(t)}getFeatureById(t){const e=this.idIndex_[t.toString()];return void 0!==e?e:null}getFeatureByUid(t){const e=this.uidIndex_[t];return void 0!==e?e:null}getFormat(){return this.format_}getOverlaps(){return this.overlaps_}getUrl(){return this.url_}handleFeatureChange_(t){const e=t.target,i=M(e),n=e.getGeometry();if(n){const t=n.getExtent();i in this.nullGeometryFeatures_?(delete this.nullGeometryFeatures_[i],this.featuresRtree_&&this.featuresRtree_.insert(t,e)):this.featuresRtree_&&this.featuresRtree_.update(t,e)}else i in this.nullGeometryFeatures_||(this.featuresRtree_&&this.featuresRtree_.remove(e),this.nullGeometryFeatures_[i]=e);const s=e.getId();if(void 0!==s){const t=s.toString();this.idIndex_[t]!==e&&(this.removeFromIdIndex_(e),this.idIndex_[t]=e)}else this.removeFromIdIndex_(e),this.uidIndex_[i]=e;this.changed(),this.dispatchEvent(new Ns("changefeature",e))}hasFeature(t){const e=t.getId();return void 0!==e?e in this.idIndex_:M(t)in this.uidIndex_}isEmpty(){return this.featuresRtree_?this.featuresRtree_.isEmpty()&&g(this.nullGeometryFeatures_):!this.featuresCollection_||0===this.featuresCollection_.getLength()}loadFeatures(t,e,i){const n=this.loadedExtentsRtree_,s=this.strategy_(t,e,i);for(let t=0,r=s.length;t<r;++t){const r=s[t];n.forEachInExtent(r,(function(t){return rt(t.extent,r)}))||(++this.loadingExtentsCount_,this.dispatchEvent(new Ns("featuresloadstart")),this.loader_.call(this,r,e,i,(t=>{--this.loadingExtentsCount_,this.dispatchEvent(new Ns("featuresloadend",void 0,t))}),(()=>{--this.loadingExtentsCount_,this.dispatchEvent(new Ns("featuresloaderror"))})),n.insert(r,{extent:r.slice()}))}this.loading=!(this.loader_.length<4)&&this.loadingExtentsCount_>0}refresh(){this.clear(!0),this.loadedExtentsRtree_.clear(),super.refresh()}removeLoadedExtent(t){const e=this.loadedExtentsRtree_;let i;e.forEachInExtent(t,(function(e){if(ct(e.extent,t))return i=e,!0})),i&&e.remove(i)}removeFeature(t){if(!t)return;const e=M(t);e in this.nullGeometryFeatures_?delete this.nullGeometryFeatures_[e]:this.featuresRtree_&&this.featuresRtree_.remove(t),this.removeFeatureInternal(t)&&this.changed()}removeFeatureInternal(t){const e=M(t),i=this.featureChangeKeys_[e];if(!i)return;i.forEach(E),delete this.featureChangeKeys_[e];const n=t.getId();return void 0!==n&&delete this.idIndex_[n.toString()],delete this.uidIndex_[e],this.dispatchEvent(new Ns(Gs,t)),t}removeFromIdIndex_(t){let e=!1;for(const i in this.idIndex_)if(this.idIndex_[i]===t){delete this.idIndex_[i],e=!0;break}return e}setLoader(t){this.loader_=t}setUrl(t){U(this.format_,7),this.url_=t,this.setLoader(Xs(t,this.format_))}},js=class extends _{constructor(t,e,i){super(),i=i||{},this.tileCoord=t,this.state=e,this.interimTile=null,this.key="",this.transition_=void 0===i.transition?250:i.transition,this.transitionStarts_={},this.interpolate=!!i.interpolate}changed(){this.dispatchEvent(f)}release(){3===this.state&&this.setState(4)}getKey(){return this.key+"/"+this.tileCoord}getInterimTile(){if(!this.interimTile)return this;let t=this.interimTile;do{if(2==t.getState())return this.transition_=0,t;t=t.interimTile}while(t);return this}refreshInterimChain(){if(!this.interimTile)return;let t=this.interimTile,e=this;do{if(2==t.getState()){t.interimTile=null;break}1==t.getState()?e=t:0==t.getState()?e.interimTile=t.interimTile:e=t,t=e.interimTile}while(t)}getTileCoord(){return this.tileCoord}getState(){return this.state}setState(t){if(3!==this.state&&this.state>t)throw new Error("Tile load sequence violation");this.state=t,this.changed()}load(){I()}getAlpha(t,e){if(!this.transition_)return 1;let i=this.transitionStarts_[t];if(i){if(-1===i)return 1}else i=e,this.transitionStarts_[t]=i;const n=e-i+1e3/60;return n>=this.transition_?1:ci(n/this.transition_)}inTransition(t){return!!this.transition_&&-1!==this.transitionStarts_[t]}endTransition(t){this.transition_&&(this.transitionStarts_[t]=-1)}};function Bs(t,e,i){const n=t;let s=!0,r=!1,o=!1;const a=[w(n,"load",(function(){o=!0,r||e()}))];return n.src&&Z?(r=!0,n.decode().then((function(){s&&e()})).catch((function(t){s&&(o?e():i())}))):a.push(w(n,"error",i)),function(){s=!1,a.forEach(E)}}const Ks=class extends js{constructor(t,e,i,n,s,r){super(t,e,r),this.crossOrigin_=n,this.src_=i,this.key=i,this.image_=new Image,null!==n&&(this.image_.crossOrigin=n),this.unlisten_=null,this.tileLoadFunction_=s}getImage(){return this.image_}setImage(t){this.image_=t,this.state=2,this.unlistenImage_(),this.changed()}handleImageError_(){this.state=3,this.unlistenImage_(),this.image_=function(){const t=on(1,1);return t.fillStyle="rgba(0,0,0,0)",t.fillRect(0,0,1,1),t.canvas}(),this.changed()}handleImageLoad_(){const t=this.image_;t.naturalWidth&&t.naturalHeight?this.state=2:this.state=4,this.unlistenImage_(),this.changed()}load(){3==this.state&&(this.state=0,this.image_=new Image,null!==this.crossOrigin_&&(this.image_.crossOrigin=this.crossOrigin_)),0==this.state&&(this.state=1,this.changed(),this.tileLoadFunction_(this,this.src_),this.unlisten_=Bs(this.image_,this.handleImageLoad_.bind(this),this.handleImageError_.bind(this)))}unlistenImage_(){this.unlisten_&&(this.unlisten_(),this.unlisten_=null)}};let Zs;const Vs=[];function Us(t,e,i,n,s){t.beginPath(),t.moveTo(0,0),t.lineTo(e,i),t.lineTo(n,s),t.closePath(),t.save(),t.clip(),t.fillRect(0,0,Math.max(e,n)+1,Math.max(i,s)),t.restore()}function qs(t,e){return Math.abs(t[4*e]-210)>2||Math.abs(t[4*e+3]-191.25)>2}function Hs(t,e,i,n){const s=Ke(i,e,t);let r=Ge(e,n,i);const o=e.getMetersPerUnit();void 0!==o&&(r*=o);const a=t.getMetersPerUnit();void 0!==a&&(r/=a);const h=t.getExtent();if(!h||st(h,s)){const e=Ge(t,r,s)/r;isFinite(e)&&e>0&&(r/=e)}return r}const Js=class extends js{constructor(t,e,i,n,s,r,o,a,h,l,c,u){super(s,0,{interpolate:!!u}),this.renderEdges_=void 0!==c&&c,this.pixelRatio_=o,this.gutter_=a,this.canvas_=null,this.sourceTileGrid_=e,this.targetTileGrid_=n,this.wrappedTileCoord_=r||s,this.sourceTiles_=[],this.sourcesListenerKeys_=null,this.sourceZ_=0;const d=n.getTileCoordExtent(this.wrappedTileCoord_),g=this.targetTileGrid_.getExtent();let _=this.sourceTileGrid_.getExtent();const f=g?wt(d,g):d;if(0===ft(f))return void(this.state=4);const m=t.getExtent();m&&(_=_?wt(_,m):m);const p=n.getResolution(this.wrappedTileCoord_[0]),y=function(t,e,i,n){const s=yt(i);let r=Hs(t,e,s,n);return(!isFinite(r)||r<=0)&&_t(i,(function(i){return r=Hs(t,e,i,n),isFinite(r)&&r>0})),r}(t,i,f,p);if(!isFinite(y)||y<=0)return void(this.state=4);const x=void 0!==l?l:.5;if(this.triangulation_=new class{constructor(t,e,i,n,s,r){this.sourceProj_=t,this.targetProj_=e;let o={};const a=Be(this.targetProj_,this.sourceProj_);this.transformInv_=function(t){const e=t[0]+"/"+t[1];return o[e]||(o[e]=a(t)),o[e]},this.maxSourceExtent_=n,this.errorThresholdSquared_=s*s,this.triangles_=[],this.wrapsXInSource_=!1,this.canWrapXInSource_=this.sourceProj_.canWrapX()&&!!n&&!!this.sourceProj_.getExtent()&&Rt(n)>=Rt(this.sourceProj_.getExtent()),this.sourceWorldWidth_=this.sourceProj_.getExtent()?Rt(this.sourceProj_.getExtent()):null,this.targetWorldWidth_=this.targetProj_.getExtent()?Rt(this.targetProj_.getExtent()):null;const h=Et(i),l=Tt(i),c=pt(i),u=mt(i),d=this.transformInv_(h),g=this.transformInv_(l),_=this.transformInv_(c),f=this.transformInv_(u),m=10+(r?Math.max(0,Math.ceil(Math.log2(ft(i)/(r*r*256*256)))):0);if(this.addQuad_(h,l,c,u,d,g,_,f,m),this.wrapsXInSource_){let t=1/0;this.triangles_.forEach((function(e,i,n){t=Math.min(t,e.source[0][0],e.source[1][0],e.source[2][0])})),this.triangles_.forEach((e=>{if(Math.max(e.source[0][0],e.source[1][0],e.source[2][0])-t>this.sourceWorldWidth_/2){const i=[[e.source[0][0],e.source[0][1]],[e.source[1][0],e.source[1][1]],[e.source[2][0],e.source[2][1]]];i[0][0]-t>this.sourceWorldWidth_/2&&(i[0][0]-=this.sourceWorldWidth_),i[1][0]-t>this.sourceWorldWidth_/2&&(i[1][0]-=this.sourceWorldWidth_),i[2][0]-t>this.sourceWorldWidth_/2&&(i[2][0]-=this.sourceWorldWidth_);const n=Math.min(i[0][0],i[1][0],i[2][0]);Math.max(i[0][0],i[1][0],i[2][0])-n<this.sourceWorldWidth_/2&&(e.source=i)}}))}o={}}addTriangle_(t,e,i,n,s,r){this.triangles_.push({source:[n,s,r],target:[t,e,i]})}addQuad_(t,e,i,n,s,r,o,a,h){const l=tt([s,r,o,a]),c=this.sourceWorldWidth_?Rt(l)/this.sourceWorldWidth_:null,u=this.sourceWorldWidth_,d=this.sourceProj_.canWrapX()&&c>.5&&c<1;let g=!1;if(h>0&&(this.targetProj_.isGlobal()&&this.targetWorldWidth_&&(g=Rt(tt([t,e,i,n]))/this.targetWorldWidth_>.25||g),!d&&this.sourceProj_.isGlobal()&&c&&(g=c>.25||g)),!g&&this.maxSourceExtent_&&isFinite(l[0])&&isFinite(l[1])&&isFinite(l[2])&&isFinite(l[3])&&!It(l,this.maxSourceExtent_))return;let _=0;if(!(g||isFinite(s[0])&&isFinite(s[1])&&isFinite(r[0])&&isFinite(r[1])&&isFinite(o[0])&&isFinite(o[1])&&isFinite(a[0])&&isFinite(a[1])))if(h>0)g=!0;else if(_=(isFinite(s[0])&&isFinite(s[1])?0:8)+(isFinite(r[0])&&isFinite(r[1])?0:4)+(isFinite(o[0])&&isFinite(o[1])?0:2)+(isFinite(a[0])&&isFinite(a[1])?0:1),1!=_&&2!=_&&4!=_&&8!=_)return;if(h>0){if(!g){const e=[(t[0]+i[0])/2,(t[1]+i[1])/2],n=this.transformInv_(e);let r;r=d?(At(s[0],u)+At(o[0],u))/2-At(n[0],u):(s[0]+o[0])/2-n[0];const a=(s[1]+o[1])/2-n[1];g=r*r+a*a>this.errorThresholdSquared_}if(g){if(Math.abs(t[0]-i[0])<=Math.abs(t[1]-i[1])){const l=[(e[0]+i[0])/2,(e[1]+i[1])/2],c=this.transformInv_(l),u=[(n[0]+t[0])/2,(n[1]+t[1])/2],d=this.transformInv_(u);this.addQuad_(t,e,l,u,s,r,c,d,h-1),this.addQuad_(u,l,i,n,d,c,o,a,h-1)}else{const l=[(t[0]+e[0])/2,(t[1]+e[1])/2],c=this.transformInv_(l),u=[(i[0]+n[0])/2,(i[1]+n[1])/2],d=this.transformInv_(u);this.addQuad_(t,l,u,n,s,c,d,a,h-1),this.addQuad_(l,e,i,u,c,r,o,d,h-1)}return}}if(d){if(!this.canWrapXInSource_)return;this.wrapsXInSource_=!0}0==(11&_)&&this.addTriangle_(t,i,n,s,o,a),0==(14&_)&&this.addTriangle_(t,i,e,s,o,r),_&&(0==(13&_)&&this.addTriangle_(e,n,t,r,a,s),0==(7&_)&&this.addTriangle_(e,n,i,r,a,o))}calculateSourceExtent(){const t=[1/0,1/0,-1/0,-1/0];return this.triangles_.forEach((function(e,i,n){const s=e.source;ut(t,s[0]),ut(t,s[1]),ut(t,s[2])})),t}getTriangles(){return this.triangles_}}(t,i,f,_,y*x,p),0===this.triangulation_.getTriangles().length)return void(this.state=4);this.sourceZ_=e.getZForResolution(y);let v=this.triangulation_.calculateSourceExtent();if(_&&(t.canWrapX()?(v[1]=Ft(v[1],_[1],_[3]),v[3]=Ft(v[3],_[1],_[3])):v=wt(v,_)),ft(v)){const t=e.getTileRangeForExtentAndZ(v,this.sourceZ_);for(let e=t.minX;e<=t.maxX;e++)for(let i=t.minY;i<=t.maxY;i++){const t=h(this.sourceZ_,e,i,o);t&&this.sourceTiles_.push(t)}0===this.sourceTiles_.length&&(this.state=4)}else this.state=4}getImage(){return this.canvas_}reproject_(){const t=[];if(this.sourceTiles_.forEach((e=>{e&&2==e.getState()&&t.push({extent:this.sourceTileGrid_.getTileCoordExtent(e.tileCoord),image:e.getImage()})})),this.sourceTiles_.length=0,0===t.length)this.state=3;else{const e=this.wrappedTileCoord_[0],i=this.targetTileGrid_.getTileSize(e),n="number"==typeof i?i:i[0],s="number"==typeof i?i:i[1],r=this.targetTileGrid_.getResolution(e),o=this.sourceTileGrid_.getResolution(this.sourceZ_),a=this.targetTileGrid_.getTileCoordExtent(this.wrappedTileCoord_);this.canvas_=function(t,e,i,n,s,r,o,a,h,l,c,u){const d=on(Math.round(i*t),Math.round(i*e),Vs);if(u||(d.imageSmoothingEnabled=!1),0===h.length)return d.canvas;function g(t){return Math.round(t*i)/i}d.scale(i,i),d.globalCompositeOperation="lighter";const _=[1/0,1/0,-1/0,-1/0];h.forEach((function(t,e,i){var n,s;n=_,(s=t.extent)[0]<n[0]&&(n[0]=s[0]),s[2]>n[2]&&(n[2]=s[2]),s[1]<n[1]&&(n[1]=s[1]),s[3]>n[3]&&(n[3]=s[3])}));const f=Rt(_),m=Ct(_),p=on(Math.round(i*f/n),Math.round(i*m/n),Vs);u||(p.imageSmoothingEnabled=!1);const y=i/n;h.forEach((function(t,e,i){const n=t.extent[0]-_[0],s=-(t.extent[3]-_[3]),r=Rt(t.extent),o=Ct(t.extent);t.image.width>0&&t.image.height>0&&p.drawImage(t.image,l,l,t.image.width-2*l,t.image.height-2*l,n*y,s*y,r*y,o*y)}));const x=Et(o);return a.getTriangles().forEach((function(t,e,s){const o=t.source,a=t.target;let h=o[0][0],l=o[0][1],c=o[1][0],f=o[1][1],m=o[2][0],y=o[2][1];const v=g((a[0][0]-x[0])/r),S=g(-(a[0][1]-x[1])/r),C=g((a[1][0]-x[0])/r),w=g(-(a[1][1]-x[1])/r),E=g((a[2][0]-x[0])/r),T=g(-(a[2][1]-x[1])/r),R=h,I=l;h=0,l=0,c-=R,f-=I,m-=R,y-=I;const b=function(t){const e=t.length;for(let i=0;i<e;i++){let n=i,s=Math.abs(t[i][i]);for(let r=i+1;r<e;r++){const e=Math.abs(t[r][i]);e>s&&(s=e,n=r)}if(0===s)return null;const r=t[n];t[n]=t[i],t[i]=r;for(let n=i+1;n<e;n++){const s=-t[n][i]/t[i][i];for(let r=i;r<e+1;r++)i==r?t[n][r]=0:t[n][r]+=s*t[i][r]}}const i=new Array(e);for(let n=e-1;n>=0;n--){i[n]=t[n][e]/t[n][n];for(let s=n-1;s>=0;s--)t[s][e]-=t[s][n]*i[n]}return i}([[c,f,0,0,C-v],[m,y,0,0,E-v],[0,0,c,f,w-S],[0,0,m,y,T-S]]);if(b){if(d.save(),d.beginPath(),function(){if(void 0===Zs){const t=on(6,6,Vs);t.globalCompositeOperation="lighter",t.fillStyle="rgba(210, 0, 0, 0.75)",Us(t,4,5,4,0),Us(t,4,5,0,5);const e=t.getImageData(0,0,3,3).data;Zs=qs(e,0)||qs(e,4)||qs(e,8),an(t),Vs.push(t.canvas)}return Zs}()||!u){d.moveTo(C,w);const t=4,e=v-C,i=S-w;for(let n=0;n<t;n++)d.lineTo(C+g((n+1)*e/t),w+g(n*i/(t-1))),n!=t-1&&d.lineTo(C+g((n+1)*e/t),w+g((n+1)*i/(t-1)));d.lineTo(E,T)}else d.moveTo(C,w),d.lineTo(v,S),d.lineTo(E,T);d.clip(),d.transform(b[0],b[2],b[1],b[3],v,S),d.translate(_[0]-R,_[3]-I),d.scale(n/i,-n/i),d.drawImage(p.canvas,0,0),d.restore()}})),an(p),Vs.push(p.canvas),c&&(d.save(),d.globalCompositeOperation="source-over",d.strokeStyle="black",d.lineWidth=1,a.getTriangles().forEach((function(t,e,i){const n=t.target,s=(n[0][0]-x[0])/r,o=-(n[0][1]-x[1])/r,a=(n[1][0]-x[0])/r,h=-(n[1][1]-x[1])/r,l=(n[2][0]-x[0])/r,c=-(n[2][1]-x[1])/r;d.beginPath(),d.moveTo(a,h),d.lineTo(s,o),d.lineTo(l,c),d.closePath(),d.stroke()})),d.restore()),d.canvas}(n,s,this.pixelRatio_,o,this.sourceTileGrid_.getExtent(),r,a,this.triangulation_,t,this.gutter_,this.renderEdges_,this.interpolate),this.state=2}this.changed()}load(){if(0==this.state){this.state=1,this.changed();let t=0;this.sourcesListenerKeys_=[],this.sourceTiles_.forEach((e=>{const i=e.getState();if(0==i||1==i){t++;const i=C(e,f,(function(n){const s=e.getState();2!=s&&3!=s&&4!=s||(E(i),t--,0===t&&(this.unlistenSources_(),this.reproject_()))}),this);this.sourcesListenerKeys_.push(i)}})),0===t?setTimeout(this.reproject_.bind(this),0):this.sourceTiles_.forEach((function(t,e,i){0==t.getState()&&t.load()}))}}unlistenSources_(){this.sourcesListenerKeys_.forEach(E),this.sourcesListenerKeys_=null}release(){this.canvas_&&(an(this.canvas_.getContext("2d")),Vs.push(this.canvas_),this.canvas_=null),super.release()}};function Qs(t,e,i,n){return void 0!==n?(n[0]=t,n[1]=e,n[2]=i,n):[t,e,i]}function $s(t,e,i){return t+"/"+e+"/"+i}function tr(t){return $s(t[0],t[1],t[2])}function er(t){return(t[1]<<t[0])+t[2]}const ir=class extends class{constructor(t){this.highWaterMark=void 0!==t?t:2048,this.count_=0,this.entries_={},this.oldest_=null,this.newest_=null}canExpireCache(){return this.highWaterMark>0&&this.getCount()>this.highWaterMark}expireCache(t){for(;this.canExpireCache();)this.pop()}clear(){this.count_=0,this.entries_={},this.oldest_=null,this.newest_=null}containsKey(t){return this.entries_.hasOwnProperty(t)}forEach(t){let e=this.oldest_;for(;e;)t(e.value_,e.key_,this),e=e.newer}get(t,e){const i=this.entries_[t];return U(void 0!==i,15),i===this.newest_||(i===this.oldest_?(this.oldest_=this.oldest_.newer,this.oldest_.older=null):(i.newer.older=i.older,i.older.newer=i.newer),i.newer=null,i.older=this.newest_,this.newest_.newer=i,this.newest_=i),i.value_}remove(t){const e=this.entries_[t];return U(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_}getCount(){return this.count_}getKeys(){const t=new Array(this.count_);let e,i=0;for(e=this.newest_;e;e=e.older)t[i++]=e.key_;return t}getValues(){const t=new Array(this.count_);let e,i=0;for(e=this.newest_;e;e=e.older)t[i++]=e.value_;return t}peekLast(){return this.oldest_.value_}peekLastKey(){return this.oldest_.key_}peekFirstKey(){return this.newest_.key_}peek(t){if(this.containsKey(t))return this.entries_[t].value_}pop(){const 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_}replace(t,e){this.get(t),this.entries_[t].value_=e}set(t,e){U(!(t in this.entries_),16);const i={key_:t,newer:null,older:this.newest_,value_:e};this.newest_?this.newest_.newer=i:this.oldest_=i,this.newest_=i,this.entries_[t]=i,++this.count_}setSize(t){this.highWaterMark=t}}{clear(){for(;this.getCount()>0;)this.pop().release();super.clear()}expireCache(t){for(;this.canExpireCache()&&!(this.peekLast().getKey()in t);)this.pop().release()}pruneExceptNewestZ(){if(0===this.getCount())return;const t=this.peekFirstKey().split("/").map(Number)[0];this.forEach((e=>{e.tileCoord[0]!==t&&(this.remove(tr(e.tileCoord)),e.release())}))}};class nr{constructor(t,e,i,n){this.minX=t,this.maxX=e,this.minY=i,this.maxY=n}contains(t){return this.containsXY(t[1],t[2])}containsTileRange(t){return this.minX<=t.minX&&t.maxX<=this.maxX&&this.minY<=t.minY&&t.maxY<=this.maxY}containsXY(t,e){return this.minX<=t&&t<=this.maxX&&this.minY<=e&&e<=this.maxY}equals(t){return this.minX==t.minX&&this.minY==t.minY&&this.maxX==t.maxX&&this.maxY==t.maxY}extend(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)}getHeight(){return this.maxY-this.minY+1}getSize(){return[this.getWidth(),this.getHeight()]}getWidth(){return this.maxX-this.minX+1}intersects(t){return this.minX<=t.maxX&&this.maxX>=t.minX&&this.minY<=t.maxY&&this.maxY>=t.minY}}function sr(t,e,i,n,s){return void 0!==s?(s.minX=t,s.maxX=e,s.minY=i,s.maxY=n,s):new nr(t,e,i,n)}const rr=nr,or=[0,0,0],ar=class{constructor(t){let e;if(this.minZoom=void 0!==t.minZoom?t.minZoom:0,this.resolutions_=t.resolutions,U(function(t,e,i){const n=function(t,e){return e-t}||s;return t.every((function(e,i){if(0===i)return!0;const s=n(t[i-1],e);return!(s>0||0===s)}))}(this.resolutions_),17),!t.origins)for(let t=0,i=this.resolutions_.length-1;t<i;++t)if(e){if(this.resolutions_[t]/this.resolutions_[t+1]!==e){e=void 0;break}}else e=this.resolutions_[t]/this.resolutions_[t+1];this.zoomFactor_=e,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,U(this.origins_.length==this.resolutions_.length,20));const i=t.extent;void 0===i||this.origin_||this.origins_||(this.origin_=Et(i)),U(!this.origin_&&this.origins_||this.origin_&&!this.origins_,18),this.tileSizes_=null,void 0!==t.tileSizes&&(this.tileSizes_=t.tileSizes,U(this.tileSizes_.length==this.resolutions_.length,19)),this.tileSize_=void 0!==t.tileSize?t.tileSize:this.tileSizes_?null:256,U(!this.tileSize_&&this.tileSizes_||this.tileSize_&&!this.tileSizes_,22),this.extent_=void 0!==i?i: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){const n=new rr(Math.min(0,t[0]),Math.max(t[0]-1,-1),Math.min(0,t[1]),Math.max(t[1]-1,-1));if(i){const t=this.getTileRangeForExtentAndZ(i,e);n.minX=Math.max(t.minX,n.minX),n.maxX=Math.min(t.maxX,n.maxX),n.minY=Math.max(t.minY,n.minY),n.maxY=Math.min(t.maxY,n.maxY)}return n}),this):i&&this.calculateTileRanges_(i)}forEachTileCoord(t,e,i){const n=this.getTileRangeForExtentAndZ(t,e);for(let t=n.minX,s=n.maxX;t<=s;++t)for(let s=n.minY,r=n.maxY;s<=r;++s)i([e,t,s])}forEachTileCoordParentTileRange(t,e,i,n){let s,r,o,a=null,h=t[0]-1;for(2===this.zoomFactor_?(r=t[1],o=t[2]):a=this.getTileCoordExtent(t,n);h>=this.minZoom;){if(2===this.zoomFactor_?(r=Math.floor(r/2),o=Math.floor(o/2),s=sr(r,r,o,o,i)):s=this.getTileRangeForExtentAndZ(a,h,i),e(h,s))return!0;--h}return!1}getExtent(){return this.extent_}getMaxZoom(){return this.maxZoom}getMinZoom(){return this.minZoom}getOrigin(t){return this.origin_?this.origin_:this.origins_[t]}getResolution(t){return this.resolutions_[t]}getResolutions(){return this.resolutions_}getTileCoordChildTileRange(t,e,i){if(t[0]<this.maxZoom){if(2===this.zoomFactor_){const i=2*t[1],n=2*t[2];return sr(i,i+1,n,n+1,e)}const n=this.getTileCoordExtent(t,i||this.tmpExtent_);return this.getTileRangeForExtentAndZ(n,t[0]+1,e)}return null}getTileRangeForTileCoordAndZ(t,e,i){if(e>this.maxZoom||e<this.minZoom)return null;const n=t[0],s=t[1],r=t[2];if(e===n)return sr(s,r,s,r,i);if(this.zoomFactor_){const t=Math.pow(this.zoomFactor_,e-n),o=Math.floor(s*t),a=Math.floor(r*t);return e<n?sr(o,o,a,a,i):sr(o,Math.floor(t*(s+1))-1,a,Math.floor(t*(r+1))-1,i)}const o=this.getTileCoordExtent(t,this.tmpExtent_);return this.getTileRangeForExtentAndZ(o,e,i)}getTileRangeForExtentAndZ(t,e,i){this.getTileCoordForXYAndZ_(t[0],t[3],e,!1,or);const n=or[1],s=or[2];return this.getTileCoordForXYAndZ_(t[2],t[1],e,!0,or),sr(n,or[1],s,or[2],i)}getTileCoordCenter(t){const e=this.getOrigin(t[0]),i=this.getResolution(t[0]),n=Ms(this.getTileSize(t[0]),this.tmpSize_);return[e[0]+(t[1]+.5)*n[0]*i,e[1]-(t[2]+.5)*n[1]*i]}getTileCoordExtent(t,e){const i=this.getOrigin(t[0]),n=this.getResolution(t[0]),s=Ms(this.getTileSize(t[0]),this.tmpSize_),r=i[0]+t[1]*s[0]*n,o=i[1]-(t[2]+1)*s[1]*n;return ht(r,o,r+s[0]*n,o+s[1]*n,e)}getTileCoordForCoordAndResolution(t,e,i){return this.getTileCoordForXYAndResolution_(t[0],t[1],e,!1,i)}getTileCoordForXYAndResolution_(t,e,i,n,s){const r=this.getZForResolution(i),o=i/this.getResolution(r),a=this.getOrigin(r),h=Ms(this.getTileSize(r),this.tmpSize_);let l=o*(t-a[0])/i/h[0],c=o*(a[1]-e)/i/h[1];return n?(l=Gt(l,5)-1,c=Gt(c,5)-1):(l=zt(l,5),c=zt(c,5)),Qs(r,l,c,s)}getTileCoordForXYAndZ_(t,e,i,n,s){const r=this.getOrigin(i),o=this.getResolution(i),a=Ms(this.getTileSize(i),this.tmpSize_);let h=(t-r[0])/o/a[0],l=(r[1]-e)/o/a[1];return n?(h=Gt(h,5)-1,l=Gt(l,5)-1):(h=zt(h,5),l=zt(l,5)),Qs(i,h,l,s)}getTileCoordForCoordAndZ(t,e,i){return this.getTileCoordForXYAndZ_(t[0],t[1],e,!1,i)}getTileCoordResolution(t){return this.resolutions_[t[0]]}getTileSize(t){return this.tileSize_?this.tileSize_:this.tileSizes_[t]}getFullTileRange(t){return this.fullTileRanges_?this.fullTileRanges_[t]:this.extent_?this.getTileRangeForExtentAndZ(this.extent_,t):null}getZForResolution(t,e){return Ft(r(this.resolutions_,t,e||0),this.minZoom,this.maxZoom)}tileCoordIntersectsViewport(t,e){return Gi(e,0,e.length,2,this.getTileCoordExtent(t))}calculateTileRanges_(t){const e=this.resolutions_.length,i=new Array(e);for(let n=this.minZoom;n<e;++n)i[n]=this.getTileRangeForExtentAndZ(t,n);this.fullTileRanges_=i}};function hr(t){let e=t.getDefaultTileGrid();return e||(e=function(t,e,i,n){return function(t,e,i,n){n=void 0!==n?n:"top-left";const s=lr(t,undefined,i);return new ar({extent:t,origin:xt(t,n),resolutions:s,tileSize:i})}(cr(t),0,void 0,void 0)}(t),t.setDefaultTileGrid(e)),e}function lr(t,e,i,n){e=void 0!==e?e:42,i=Ms(void 0!==i?i:256);const s=Ct(t),r=Rt(t);n=n>0?n:Math.max(r/i[0],s/i[1]);const o=e+1,a=new Array(o);for(let t=0;t<o;++t)a[t]=n/Math.pow(2,t);return a}function cr(t){let e=(t=ze(t)).getExtent();if(!e){const i=180*le.degrees/t.getMetersPerUnit();e=ht(-i,-i,i,i)}return e}class ur extends t{constructor(t,e){super(t),this.tile=e}}const dr=class extends Ds{constructor(t){super({attributions:t.attributions,attributionsCollapsible:t.attributionsCollapsible,projection:t.projection,state:t.state,wrapX:t.wrapX,interpolate:t.interpolate}),this.on,this.once,this.un,this.opaque_=void 0!==t.opaque&&t.opaque,this.tilePixelRatio_=void 0!==t.tilePixelRatio?t.tilePixelRatio:1,this.tileGrid=void 0!==t.tileGrid?t.tileGrid:null;this.tileGrid&&Ms(this.tileGrid.getTileSize(this.tileGrid.getMinZoom()),[256,256]),this.tileCache=new ir(t.cacheSize||0),this.tmpSize=[0,0],this.key_=t.key||"",this.tileOptions={transition:t.transition,interpolate:t.interpolate},this.zDirection=t.zDirection?t.zDirection:0}canExpireCache(){return this.tileCache.canExpireCache()}expireCache(t,e){const i=this.getTileCacheForProjection(t);i&&i.expireCache(e)}forEachLoadedTile(t,e,i,n){const s=this.getTileCacheForProjection(t);if(!s)return!1;let r,o,a,h=!0;for(let t=i.minX;t<=i.maxX;++t)for(let l=i.minY;l<=i.maxY;++l)o=$s(e,t,l),a=!1,s.containsKey(o)&&(r=s.get(o),a=2===r.getState(),a&&(a=!1!==n(r))),a||(h=!1);return h}getGutterForProjection(t){return 0}getKey(){return this.key_}setKey(t){this.key_!==t&&(this.key_=t,this.changed())}getOpaque(t){return this.opaque_}getResolutions(t){const e=t?this.getTileGridForProjection(t):this.tileGrid;return e?e.getResolutions():null}getTile(t,e,i,n,s){return I()}getTileGrid(){return this.tileGrid}getTileGridForProjection(t){return this.tileGrid?this.tileGrid:hr(t)}getTileCacheForProjection(t){const e=this.getProjection();return U(null===e||Ye(e,t),68),this.tileCache}getTilePixelRatio(t){return this.tilePixelRatio_}getTilePixelSize(t,e,i){const n=this.getTileGridForProjection(i),s=this.getTilePixelRatio(e),r=Ms(n.getTileSize(t),this.tmpSize);return 1==s?r:bs(r,s,this.tmpSize)}getTileCoordForTileUrlFunction(t,e){e=void 0!==e?e:this.getProjection();const i=this.getTileGridForProjection(e);return this.getWrapX()&&e.isGlobal()&&(t=function(t,e,i){const n=e[0],s=t.getTileCoordCenter(e),r=cr(i);if(!st(r,s)){const e=Rt(r),i=Math.ceil((r[0]-s[0])/e);return s[0]+=e*i,t.getTileCoordForCoordAndZ(s,n)}return e}(i,t,e)),function(t,e){const i=t[0],n=t[1],s=t[2];if(e.getMinZoom()>i||i>e.getMaxZoom())return!1;const r=e.getFullTileRange(i);return!r||r.containsXY(n,s)}(t,i)?t:null}clear(){this.tileCache.clear()}refresh(){this.clear(),super.refresh()}updateCacheSize(t,e){const i=this.getTileCacheForProjection(e);t>i.highWaterMark&&(i.highWaterMark=t)}useTile(t,e,i,n){}};function gr(t,e){const i=/\{z\}/g,n=/\{x\}/g,s=/\{y\}/g,r=/\{-y\}/g;return function(o,a,h){if(o)return t.replace(i,o[0].toString()).replace(n,o[1].toString()).replace(s,o[2].toString()).replace(r,(function(){const t=o[0],i=e.getFullTileRange(t);return U(i,55),(i.getHeight()-o[2]-1).toString()}))}}class _r extends dr{constructor(t){super({attributions:t.attributions,cacheSize:t.cacheSize,opaque:t.opaque,projection:t.projection,state:t.state,tileGrid:t.tileGrid,tilePixelRatio:t.tilePixelRatio,wrapX:t.wrapX,transition:t.transition,interpolate:t.interpolate,key:t.key,attributionsCollapsible:t.attributionsCollapsible,zDirection:t.zDirection}),this.generateTileUrlFunction_=this.tileUrlFunction===_r.prototype.tileUrlFunction,this.tileLoadFunction=t.tileLoadFunction,t.tileUrlFunction&&(this.tileUrlFunction=t.tileUrlFunction),this.urls=null,t.urls?this.setUrls(t.urls):t.url&&this.setUrl(t.url),this.tileLoadingKeys_={}}getTileLoadFunction(){return this.tileLoadFunction}getTileUrlFunction(){return Object.getPrototypeOf(this).tileUrlFunction===this.tileUrlFunction?this.tileUrlFunction.bind(this):this.tileUrlFunction}getUrls(){return this.urls}handleTileChange(t){const e=t.target,i=M(e),n=e.getState();let s;1==n?(this.tileLoadingKeys_[i]=!0,s="tileloadstart"):i in this.tileLoadingKeys_&&(delete this.tileLoadingKeys_[i],s=3==n?"tileloaderror":2==n?"tileloadend":void 0),null!=s&&this.dispatchEvent(new ur(s,e))}setTileLoadFunction(t){this.tileCache.clear(),this.tileLoadFunction=t,this.changed()}setTileUrlFunction(t,e){this.tileUrlFunction=t,this.tileCache.pruneExceptNewestZ(),void 0!==e?this.setKey(e):this.changed()}setUrl(t){const e=function(t){const e=[];let i=/\{([a-z])-([a-z])\}/.exec(t);if(i){const n=i[1].charCodeAt(0),s=i[2].charCodeAt(0);let r;for(r=n;r<=s;++r)e.push(t.replace(i[0],String.fromCharCode(r)));return e}if(i=/\{(\d+)-(\d+)\}/.exec(t),i){const n=parseInt(i[2],10);for(let s=parseInt(i[1],10);s<=n;s++)e.push(t.replace(i[0],s.toString()));return e}return e.push(t),e}(t);this.urls=e,this.setUrls(e)}setUrls(t){this.urls=t;const e=t.join("\n");this.generateTileUrlFunction_?this.setTileUrlFunction(function(t,e){const i=t.length,n=new Array(i);for(let s=0;s<i;++s)n[s]=gr(t[s],e);return function(t){return 1===t.length?t[0]:function(e,i,n){if(!e)return;const s=At(er(e),t.length);return t[s](e,i,n)}}(n)}(t,this.tileGrid),e):this.setKey(e)}tileUrlFunction(t,e,i){}useTile(t,e,i){const n=$s(t,e,i);this.tileCache.containsKey(n)&&this.tileCache.get(n)}}const fr=_r;function mr(t,e){t.getImage().src=e}const pr=class extends fr{constructor(t){super({attributions:t.attributions,cacheSize:t.cacheSize,opaque:t.opaque,projection:t.projection,state:t.state,tileGrid:t.tileGrid,tileLoadFunction:t.tileLoadFunction?t.tileLoadFunction:mr,tilePixelRatio:t.tilePixelRatio,tileUrlFunction:t.tileUrlFunction,url:t.url,urls:t.urls,wrapX:t.wrapX,transition:t.transition,interpolate:void 0===t.interpolate||t.interpolate,key:t.key,attributionsCollapsible:t.attributionsCollapsible,zDirection:t.zDirection}),this.crossOrigin=void 0!==t.crossOrigin?t.crossOrigin:null,this.tileClass=void 0!==t.tileClass?t.tileClass:Ks,this.tileCacheForProjection={},this.tileGridForProjection={},this.reprojectionErrorThreshold_=t.reprojectionErrorThreshold,this.renderReprojectionEdges_=!1}canExpireCache(){if(this.tileCache.canExpireCache())return!0;for(const t in this.tileCacheForProjection)if(this.tileCacheForProjection[t].canExpireCache())return!0;return!1}expireCache(t,e){const i=this.getTileCacheForProjection(t);this.tileCache.expireCache(this.tileCache==i?e:{});for(const t in this.tileCacheForProjection){const n=this.tileCacheForProjection[t];n.expireCache(n==i?e:{})}}getGutterForProjection(t){return this.getProjection()&&t&&!Ye(this.getProjection(),t)?0:this.getGutter()}getGutter(){return 0}getKey(){let t=super.getKey();return this.getInterpolate()||(t+=":disable-interpolation"),t}getOpaque(t){return!(this.getProjection()&&t&&!Ye(this.getProjection(),t))&&super.getOpaque(t)}getTileGridForProjection(t){const e=this.getProjection();if(this.tileGrid&&(!e||Ye(e,t)))return this.tileGrid;const i=M(t);return i in this.tileGridForProjection||(this.tileGridForProjection[i]=hr(t)),this.tileGridForProjection[i]}getTileCacheForProjection(t){const e=this.getProjection();if(!e||Ye(e,t))return this.tileCache;const i=M(t);return i in this.tileCacheForProjection||(this.tileCacheForProjection[i]=new ir(this.tileCache.highWaterMark)),this.tileCacheForProjection[i]}createTile_(t,e,i,n,s,r){const o=[t,e,i],a=this.getTileCoordForTileUrlFunction(o,s),h=a?this.tileUrlFunction(a,n,s):void 0,l=new this.tileClass(o,void 0!==h?0:4,void 0!==h?h:"",this.crossOrigin,this.tileLoadFunction,this.tileOptions);return l.key=r,l.addEventListener(f,this.handleTileChange.bind(this)),l}getTile(t,e,i,n,s){const r=this.getProjection();if(!r||!s||Ye(r,s))return this.getTileInternal(t,e,i,n,r||s);const o=this.getTileCacheForProjection(s),a=[t,e,i];let h;const l=tr(a);o.containsKey(l)&&(h=o.get(l));const c=this.getKey();if(h&&h.key==c)return h;const u=this.getTileGridForProjection(r),d=this.getTileGridForProjection(s),g=this.getTileCoordForTileUrlFunction(a,s),_=new Js(r,u,s,d,a,g,this.getTilePixelRatio(n),this.getGutter(),((t,e,i,n)=>this.getTileInternal(t,e,i,n,r)),this.reprojectionErrorThreshold_,this.renderReprojectionEdges_,this.getInterpolate());return _.key=c,h?(_.interimTile=h,_.refreshInterimChain(),o.replace(l,_)):o.set(l,_),_}getTileInternal(t,e,i,n,s){let r=null;const o=$s(t,e,i),a=this.getKey();if(this.tileCache.containsKey(o)){if(r=this.tileCache.get(o),r.key!=a){const h=r;r=this.createTile_(t,e,i,n,s,a),0==h.getState()?r.interimTile=h.interimTile:r.interimTile=h,r.refreshInterimChain(),this.tileCache.replace(o,r)}}else r=this.createTile_(t,e,i,n,s,a),this.tileCache.set(o,r);return r}setRenderReprojectionEdges(t){if(this.renderReprojectionEdges_!=t){this.renderReprojectionEdges_=t;for(const t in this.tileCacheForProjection)this.tileCacheForProjection[t].clear();this.changed()}}setTileGridForProjection(t,e){const i=ze(t);if(i){const t=M(i);t in this.tileGridForProjection||(this.tileGridForProjection[t]=e)}}clear(){super.clear();for(const t in this.tileCacheForProjection)this.tileCacheForProjection[t].clear()}},yr=class extends pr{constructor(t){const e=void 0!==(t=t||{}).projection?t.projection:"EPSG:3857",i=void 0!==t.tileGrid?t.tileGrid:function(t){const e=t||{},i=e.extent||ze("EPSG:3857").getExtent(),n={extent:i,minZoom:e.minZoom,tileSize:e.tileSize,resolutions:lr(i,e.maxZoom,e.tileSize,e.maxResolution)};return new ar(n)}({extent:cr(e),maxResolution:t.maxResolution,maxZoom:t.maxZoom,minZoom:t.minZoom,tileSize:t.tileSize});super({attributions:t.attributions,cacheSize:t.cacheSize,crossOrigin:t.crossOrigin,interpolate:t.interpolate,opaque:t.opaque,projection:e,reprojectionErrorThreshold:t.reprojectionErrorThreshold,tileGrid:i,tileLoadFunction:t.tileLoadFunction,tilePixelRatio:t.tilePixelRatio,tileUrlFunction:t.tileUrlFunction,url:t.url,urls:t.urls,wrapX:void 0===t.wrapX||t.wrapX,transition:t.transition,attributionsCollapsible:t.attributionsCollapsible,zDirection:t.zDirection}),this.gutter_=void 0!==t.gutter?t.gutter:0}getGutter(){return this.gutter_}},xr=class extends yr{constructor(t){let e;e=void 0!==(t=t||{}).attributions?t.attributions:['&#169; <a href="https://www.openstreetmap.org/copyright" target="_blank">OpenStreetMap</a> contributors.'];const i=void 0!==t.crossOrigin?t.crossOrigin:"anonymous",n=void 0!==t.url?t.url:"https://tile.openstreetmap.org/{z}/{x}/{y}.png";super({attributions:e,attributionsCollapsible:!1,cacheSize:t.cacheSize,crossOrigin:i,interpolate:t.interpolate,maxZoom:void 0!==t.maxZoom?t.maxZoom:19,opaque:void 0===t.opaque||t.opaque,reprojectionErrorThreshold:t.reprojectionErrorThreshold,tileLoadFunction:t.tileLoadFunction,transition:t.transition,url:n,wrapX:t.wrapX,zDirection:t.zDirection})}},vr="1.3.0";function Sr(t,e){const i=[];Object.keys(e).forEach((function(t){null!==e[t]&&void 0!==e[t]&&i.push(t+"="+encodeURIComponent(e[t]))}));const n=i.join("&");return t=t.replace(/[?&]$/,""),(t+=t.includes("?")?"&":"?")+n}const Cr=class extends pr{constructor(t){t=t||{};const e=Object.assign({},t.params),i=!("TRANSPARENT"in e)||e.TRANSPARENT;super({attributions:t.attributions,attributionsCollapsible:t.attributionsCollapsible,cacheSize:t.cacheSize,crossOrigin:t.crossOrigin,interpolate:t.interpolate,opaque:!i,projection:t.projection,reprojectionErrorThreshold:t.reprojectionErrorThreshold,tileClass:t.tileClass,tileGrid:t.tileGrid,tileLoadFunction:t.tileLoadFunction,url:t.url,urls:t.urls,wrapX:void 0===t.wrapX||t.wrapX,transition:t.transition,zDirection:t.zDirection}),this.gutter_=void 0!==t.gutter?t.gutter:0,this.params_=e,this.v13_=!0,this.serverType_=t.serverType,this.hidpi_=void 0===t.hidpi||t.hidpi,this.tmpExtent_=[1/0,1/0,-1/0,-1/0],this.updateV13_(),this.setKey(this.getKeyForParams_())}getFeatureInfoUrl(t,e,i,n){const s=ze(i),r=this.getProjection();let o=this.getTileGrid();o||(o=this.getTileGridForProjection(s));const a=o.getZForResolution(e,this.zDirection),h=o.getTileCoordForCoordAndZ(t,a);if(o.getResolutions().length<=h[0])return;let l=o.getResolution(h[0]),c=o.getTileCoordExtent(h,this.tmpExtent_),u=Ms(o.getTileSize(h[0]),this.tmpSize);const d=this.gutter_;0!==d&&(u=Rs(u,d,this.tmpSize),c=et(c,l*d,c)),r&&r!==s&&(l=Hs(r,s,t,l),c=Ze(c,s,r),t=Ke(t,s,r));const g={SERVICE:"WMS",VERSION:vr,REQUEST:"GetFeatureInfo",FORMAT:"image/png",TRANSPARENT:!0,QUERY_LAYERS:this.params_.LAYERS};Object.assign(g,this.params_,n);const _=Math.floor((t[0]-c[0])/l),f=Math.floor((c[3]-t[1])/l);return g[this.v13_?"I":"X"]=_,g[this.v13_?"J":"Y"]=f,this.getRequestUrl_(h,u,c,1,r||s,g)}getLegendUrl(t,e){if(void 0===this.urls[0])return;const i={SERVICE:"WMS",VERSION:vr,REQUEST:"GetLegendGraphic",FORMAT:"image/png"};if(void 0===e||void 0===e.LAYER){const t=this.params_.LAYERS;if(Array.isArray(t)&&1!==t.length)return;i.LAYER=t}if(void 0!==t){const e=this.getProjection()?this.getProjection().getMetersPerUnit():1,n=28e-5;i.SCALE=t*e/n}return Object.assign(i,e),Sr(this.urls[0],i)}getGutter(){return this.gutter_}getParams(){return this.params_}getRequestUrl_(t,e,i,n,s,r){const o=this.urls;if(!o)return;if(r.WIDTH=e[0],r.HEIGHT=e[1],r[this.v13_?"CRS":"SRS"]=s.getCode(),"STYLES"in this.params_||(r.STYLES=""),1!=n)switch(this.serverType_){case"geoserver":const t=90*n+.5|0;"FORMAT_OPTIONS"in r?r.FORMAT_OPTIONS+=";dpi:"+t:r.FORMAT_OPTIONS="dpi:"+t;break;case"mapserver":r.MAP_RESOLUTION=90*n;break;case"carmentaserver":case"qgis":r.DPI=90*n;break;default:U(!1,52)}const a=s.getAxisOrientation(),h=i;if(this.v13_&&"ne"==a.substr(0,2)){let t;t=i[0],h[0]=i[1],h[1]=t,t=i[2],h[2]=i[3],h[3]=t}let l;return r.BBOX=h.join(","),l=1==o.length?o[0]:o[At(er(t),o.length)],Sr(l,r)}getTilePixelRatio(t){return this.hidpi_&&void 0!==this.serverType_?t:1}getKeyForParams_(){let t=0;const e=[];for(const i in this.params_)e[t++]=i+"-"+this.params_[i];return e.join("/")}updateParams(t){Object.assign(this.params_,t),this.updateV13_(),this.setKey(this.getKeyForParams_())}updateV13_(){const t=this.params_.VERSION||vr;this.v13_=function(t,e){const i=(""+t).split("."),n="1.3".split(".");for(let t=0;t<Math.max(i.length,n.length);t++){const e=parseInt(i[t]||"0",10),s=parseInt(n[t]||"0",10);if(e>s)return 1;if(s>e)return-1}return 0}(t)>=0}tileUrlFunction(t,e,i){let n=this.getTileGrid();if(n||(n=this.getTileGridForProjection(i)),n.getResolutions().length<=t[0])return;1==e||this.hidpi_&&void 0!==this.serverType_||(e=1);const s=n.getResolution(t[0]);let r=n.getTileCoordExtent(t,this.tmpExtent_),o=Ms(n.getTileSize(t[0]),this.tmpSize);const a=this.gutter_;0!==a&&(o=Rs(o,a,this.tmpSize),r=et(r,s*a,r)),1!=e&&(o=bs(o,e,this.tmpSize));const h={SERVICE:"WMS",VERSION:vr,REQUEST:"GetMap",FORMAT:"image/png",TRANSPARENT:!0};return Object.assign(h,this.params_),this.getRequestUrl_(t,o,r,e,i,h)}};class wr extends L{constructor(t){if(super(),this.on,this.once,this.un,this.id_=void 0,this.geometryName_="geometry",this.style_=null,this.styleFunction_=void 0,this.geometryChangeKey_=null,this.addChangeListener(this.geometryName_,this.handleGeometryChanged_),t)if("function"==typeof t.getSimplifiedGeometry){const e=t;this.setGeometry(e)}else{const e=t;this.setProperties(e)}}clone(){const t=new wr(this.hasProperties()?this.getProperties():null);t.setGeometryName(this.getGeometryName());const e=this.getGeometry();e&&t.setGeometry(e.clone());const i=this.getStyle();return i&&t.setStyle(i),t}getGeometry(){return this.get(this.geometryName_)}getId(){return this.id_}getGeometryName(){return this.geometryName_}getStyle(){return this.style_}getStyleFunction(){return this.styleFunction_}handleGeometryChange_(){this.changed()}handleGeometryChanged_(){this.geometryChangeKey_&&(E(this.geometryChangeKey_),this.geometryChangeKey_=null);const t=this.getGeometry();t&&(this.geometryChangeKey_=C(t,f,this.handleGeometryChange_,this)),this.changed()}setGeometry(t){this.set(this.geometryName_,t)}setStyle(t){this.style_=t,this.styleFunction_=t?function(t){if("function"==typeof t)return t;let e;return Array.isArray(t)?e=t:(U("function"==typeof t.getZIndex,41),e=[t]),function(){return e}}(t):void 0,this.changed()}setId(t){this.id_=t,this.changed()}setGeometryName(t){this.removeChangeListener(this.geometryName_,this.handleGeometryChanged_),this.geometryName_=t,this.addChangeListener(this.geometryName_,this.handleGeometryChanged_),this.handleGeometryChanged_()}}const Er=wr;class Tr{constructor(t){this.opacity_=t.opacity,this.rotateWithView_=t.rotateWithView,this.rotation_=t.rotation,this.scale_=t.scale,this.scaleArray_=Ms(t.scale),this.displacement_=t.displacement,this.declutterMode_=t.declutterMode}clone(){const t=this.getScale();return new Tr({opacity:this.getOpacity(),scale:Array.isArray(t)?t.slice():t,rotation:this.getRotation(),rotateWithView:this.getRotateWithView(),displacement:this.getDisplacement().slice(),declutterMode:this.getDeclutterMode()})}getOpacity(){return this.opacity_}getRotateWithView(){return this.rotateWithView_}getRotation(){return this.rotation_}getScale(){return this.scale_}getScaleArray(){return this.scaleArray_}getDisplacement(){return this.displacement_}getDeclutterMode(){return this.declutterMode_}getAnchor(){return I()}getImage(t){return I()}getHitDetectionImage(){return I()}getPixelRatio(t){return 1}getImageState(){return I()}getImageSize(){return I()}getOrigin(){return I()}getSize(){return I()}setDisplacement(t){this.displacement_=t}setOpacity(t){this.opacity_=t}setRotateWithView(t){this.rotateWithView_=t}setRotation(t){this.rotation_=t}setScale(t){this.scale_=t,this.scaleArray_=Ms(t)}listenImageChange(t){I()}load(){I()}unlistenImageChange(t){I()}}const Rr=Tr;function Ir(t){return Array.isArray(t)?Kt(t):t}class br extends Rr{constructor(t){super({opacity:1,rotateWithView:void 0!==t.rotateWithView&&t.rotateWithView,rotation:void 0!==t.rotation?t.rotation:0,scale:void 0!==t.scale?t.scale:1,displacement:void 0!==t.displacement?t.displacement:[0,0],declutterMode:t.declutterMode}),this.canvas_=void 0,this.hitDetectionCanvas_=null,this.fill_=void 0!==t.fill?t.fill:null,this.origin_=[0,0],this.points_=t.points,this.radius_=void 0!==t.radius?t.radius:t.radius1,this.radius2_=t.radius2,this.angle_=void 0!==t.angle?t.angle:0,this.stroke_=void 0!==t.stroke?t.stroke:null,this.size_=null,this.renderOptions_=null,this.render()}clone(){const t=this.getScale(),e=new br({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(),declutterMode:this.getDeclutterMode()});return e.setOpacity(this.getOpacity()),e}getAnchor(){const t=this.size_;if(!t)return null;const e=this.getDisplacement(),i=this.getScaleArray();return[t[0]/2-e[0]/i[0],t[1]/2+e[1]/i[1]]}getAngle(){return this.angle_}getFill(){return this.fill_}setFill(t){this.fill_=t,this.render()}getHitDetectionImage(){return this.hitDetectionCanvas_||this.createHitDetectionCanvas_(this.renderOptions_),this.hitDetectionCanvas_}getImage(t){let e=this.canvas_[t];if(!e){const i=this.renderOptions_,n=on(i.size*t,i.size*t);this.draw_(i,n,t),e=n.canvas,this.canvas_[t]=e}return e}getPixelRatio(t){return t}getImageSize(){return this.size_}getImageState(){return 2}getOrigin(){return this.origin_}getPoints(){return this.points_}getRadius(){return this.radius_}getRadius2(){return this.radius2_}getSize(){return this.size_}getStroke(){return this.stroke_}setStroke(t){this.stroke_=t,this.render()}listenImageChange(t){}load(){}unlistenImageChange(t){}calculateLineJoinSize_(t,e,i){if(0===e||this.points_===1/0||"bevel"!==t&&"miter"!==t)return e;let n=this.radius_,s=void 0===this.radius2_?n:this.radius2_;if(n<s){const t=n;n=s,s=t}const r=void 0===this.radius2_?this.points_:2*this.points_,o=2*Math.PI/r,a=s*Math.sin(o),h=n-Math.sqrt(s*s-a*a),l=Math.sqrt(a*a+h*h),c=l/a;if("miter"===t&&c<=i)return c*e;const u=e/2/c,d=e/2*(h/l),g=Math.sqrt((n+u)*(n+u)+d*d)-n;if(void 0===this.radius2_||"bevel"===t)return 2*g;const _=n*Math.sin(o),f=s-Math.sqrt(n*n-_*_),m=Math.sqrt(_*_+f*f)/_;if(m<=i){const t=m*e/2-s-n;return 2*Math.max(g,t)}return 2*g}createRenderOptions(){let t,e=_n,i=0,n=null,s=0,r=0;this.stroke_&&(t=this.stroke_.getColor(),null===t&&(t=fn),t=Ir(t),r=this.stroke_.getWidth(),void 0===r&&(r=1),n=this.stroke_.getLineDash(),s=this.stroke_.getLineDashOffset(),e=this.stroke_.getLineJoin(),void 0===e&&(e=_n),i=this.stroke_.getMiterLimit(),void 0===i&&(i=10));const o=this.calculateLineJoinSize_(e,r,i),a=Math.max(this.radius_,this.radius2_||0);return{strokeStyle:t,strokeWidth:r,size:Math.ceil(2*a+o),lineDash:n,lineDashOffset:s,lineJoin:e,miterLimit:i}}render(){this.renderOptions_=this.createRenderOptions();const t=this.renderOptions_.size;this.canvas_={},this.size_=[t,t]}draw_(t,e,i){if(e.scale(i,i),e.translate(t.size/2,t.size/2),this.createPath_(e),this.fill_){let t=this.fill_.getColor();null===t&&(t=un),e.fillStyle=Ir(t),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())}createHitDetectionCanvas_(t){if(this.fill_){let e=this.fill_.getColor(),i=0;if("string"==typeof e&&(e=jt(e)),null===e?i=1:Array.isArray(e)&&(i=4===e.length?e[3]:1),0===i){const e=on(t.size,t.size);this.hitDetectionCanvas_=e.canvas,this.drawHitDetectionCanvas_(t,e)}}this.hitDetectionCanvas_||(this.hitDetectionCanvas_=this.getImage(1))}createPath_(t){let e=this.points_;const i=this.radius_;if(e===1/0)t.arc(0,0,i,0,2*Math.PI);else{const n=void 0===this.radius2_?i:this.radius2_;void 0!==this.radius2_&&(e*=2);const s=this.angle_-Math.PI/2,r=2*Math.PI/e;for(let o=0;o<e;o++){const e=s+o*r,a=o%2==0?i:n;t.lineTo(a*Math.cos(e),a*Math.sin(e))}t.closePath()}}drawHitDetectionCanvas_(t,e){e.translate(t.size/2,t.size/2),this.createPath_(e),e.fillStyle=un,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())}}const Mr=br;class Fr extends Mr{constructor(t){super({points:1/0,fill:(t=t||{radius:5}).fill,radius:t.radius,stroke:t.stroke,scale:void 0!==t.scale?t.scale:1,rotation:void 0!==t.rotation?t.rotation:0,rotateWithView:void 0!==t.rotateWithView&&t.rotateWithView,displacement:void 0!==t.displacement?t.displacement:[0,0],declutterMode:t.declutterMode})}clone(){const t=this.getScale(),e=new Fr({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(),declutterMode:this.getDeclutterMode()});return e.setOpacity(this.getOpacity()),e}setRadius(t){this.radius_=t,this.render()}}const Lr=Fr;class Pr{constructor(t){t=t||{},this.color_=void 0!==t.color?t.color:null}clone(){const t=this.getColor();return new Pr({color:Array.isArray(t)?t.slice():t||void 0})}getColor(){return this.color_}setColor(t){this.color_=t}}const kr=Pr;class Ar{constructor(t){t=t||{},this.color_=void 0!==t.color?t.color:null,this.lineCap_=t.lineCap,this.lineDash_=void 0!==t.lineDash?t.lineDash:null,this.lineDashOffset_=t.lineDashOffset,this.lineJoin_=t.lineJoin,this.miterLimit_=t.miterLimit,this.width_=t.width}clone(){const t=this.getColor();return new Ar({color:Array.isArray(t)?t.slice():t||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()})}getColor(){return this.color_}getLineCap(){return this.lineCap_}getLineDash(){return this.lineDash_}getLineDashOffset(){return this.lineDashOffset_}getLineJoin(){return this.lineJoin_}getMiterLimit(){return this.miterLimit_}getWidth(){return this.width_}setColor(t){this.color_=t}setLineCap(t){this.lineCap_=t}setLineDash(t){this.lineDash_=t}setLineDashOffset(t){this.lineDashOffset_=t}setLineJoin(t){this.lineJoin_=t}setMiterLimit(t){this.miterLimit_=t}setWidth(t){this.width_=t}}const Or=Ar;class Dr{constructor(t){t=t||{},this.geometry_=null,this.geometryFunction_=Wr,void 0!==t.geometry&&this.setGeometry(t.geometry),this.fill_=void 0!==t.fill?t.fill:null,this.image_=void 0!==t.image?t.image:null,this.renderer_=void 0!==t.renderer?t.renderer:null,this.hitDetectionRenderer_=void 0!==t.hitDetectionRenderer?t.hitDetectionRenderer:null,this.stroke_=void 0!==t.stroke?t.stroke:null,this.text_=void 0!==t.text?t.text:null,this.zIndex_=t.zIndex}clone(){let t=this.getGeometry();return t&&"object"==typeof t&&(t=t.clone()),new Dr({geometry:t,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()})}getRenderer(){return this.renderer_}setRenderer(t){this.renderer_=t}setHitDetectionRenderer(t){this.hitDetectionRenderer_=t}getHitDetectionRenderer(){return this.hitDetectionRenderer_}getGeometry(){return this.geometry_}getGeometryFunction(){return this.geometryFunction_}getFill(){return this.fill_}setFill(t){this.fill_=t}getImage(){return this.image_}setImage(t){this.image_=t}getStroke(){return this.stroke_}setStroke(t){this.stroke_=t}getText(){return this.text_}setText(t){this.text_=t}getZIndex(){return this.zIndex_}setGeometry(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_=Wr,this.geometry_=t}setZIndex(t){this.zIndex_=t}}let zr=null;function Gr(t,e){if(!zr){const t=new kr({color:"rgba(255,255,255,0.4)"}),e=new Or({color:"#3399CC",width:1.25});zr=[new Dr({image:new Lr({fill:t,stroke:e,radius:5}),fill:t,stroke:e})]}return zr}function Wr(t){return t.getGeometry()}const Xr=Dr;let Nr=null;class Yr extends _{constructor(t,e,i,n,s,r){super(),this.hitDetectionImage_=null,this.image_=t,this.crossOrigin_=n,this.canvas_={},this.color_=r,this.unlisten_=null,this.imageState_=s,this.size_=i,this.src_=e,this.tainted_}initializeImage_(){this.image_=new Image,null!==this.crossOrigin_&&(this.image_.crossOrigin=this.crossOrigin_)}isTainted_(){if(void 0===this.tainted_&&2===this.imageState_){Nr||(Nr=on(1,1,void 0,{willReadFrequently:!0})),Nr.drawImage(this.image_,0,0);try{Nr.getImageData(0,0,1,1),this.tainted_=!1}catch(t){Nr=null,this.tainted_=!0}}return!0===this.tainted_}dispatchChangeEvent_(){this.dispatchEvent(f)}handleImageError_(){this.imageState_=3,this.unlistenImage_(),this.dispatchChangeEvent_()}handleImageLoad_(){this.imageState_=2,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_()}getImage(t){return this.image_||this.initializeImage_(),this.replaceColor_(t),this.canvas_[t]?this.canvas_[t]:this.image_}getPixelRatio(t){return this.replaceColor_(t),this.canvas_[t]?t:1}getImageState(){return this.imageState_}getHitDetectionImage(){if(this.image_||this.initializeImage_(),!this.hitDetectionImage_)if(this.isTainted_()){const t=this.size_[0],e=this.size_[1],i=on(t,e);i.fillRect(0,0,t,e),this.hitDetectionImage_=i.canvas}else this.hitDetectionImage_=this.image_;return this.hitDetectionImage_}getSize(){return this.size_}getSrc(){return this.src_}load(){if(0===this.imageState_){this.image_||this.initializeImage_(),this.imageState_=1;try{this.image_.src=this.src_}catch(t){this.handleImageError_()}this.unlisten_=Bs(this.image_,this.handleImageLoad_.bind(this),this.handleImageError_.bind(this))}}replaceColor_(t){if(!this.color_||this.canvas_[t]||2!==this.imageState_)return;const e=this.image_,i=document.createElement("canvas");i.width=Math.ceil(e.width*t),i.height=Math.ceil(e.height*t);const n=i.getContext("2d");n.scale(t,t),n.drawImage(e,0,0),n.globalCompositeOperation="multiply",n.fillStyle=Nt(this.color_),n.fillRect(0,0,i.width/t,i.height/t),n.globalCompositeOperation="destination-in",n.drawImage(e,0,0),this.canvas_[t]=i}unlistenImage_(){this.unlisten_&&(this.unlisten_(),this.unlisten_=null)}}function jr(t,e,i,n){return void 0!==i&&void 0!==n?[i/t,n/e]:void 0!==i?i/t:void 0!==n?n/e:1}class Br extends Rr{constructor(t){const e=void 0!==(t=t||{}).opacity?t.opacity:1,i=void 0!==t.rotation?t.rotation:0,n=void 0!==t.scale?t.scale:1,s=void 0!==t.rotateWithView&&t.rotateWithView;super({opacity:e,rotation:i,scale:n,displacement:void 0!==t.displacement?t.displacement:[0,0],rotateWithView:s,declutterMode:t.declutterMode}),this.anchor_=void 0!==t.anchor?t.anchor:[.5,.5],this.normalizedAnchor_=null,this.anchorOrigin_=void 0!==t.anchorOrigin?t.anchorOrigin:"top-left",this.anchorXUnits_=void 0!==t.anchorXUnits?t.anchorXUnits:"fraction",this.anchorYUnits_=void 0!==t.anchorYUnits?t.anchorYUnits:"fraction",this.crossOrigin_=void 0!==t.crossOrigin?t.crossOrigin:null;const r=void 0!==t.img?t.img:null;this.imgSize_=t.imgSize;let o=t.src;U(!(void 0!==o&&r),4),U(!r||r&&this.imgSize_,5),void 0!==o&&0!==o.length||!r||(o=r.src||M(r)),U(void 0!==o&&o.length>0,6),U(!((void 0!==t.width||void 0!==t.height)&&void 0!==t.scale),69);const a=void 0!==t.src?0:2;if(this.color_=void 0!==t.color?jt(t.color):null,this.iconImage_=function(t,e,i,n,s,r){let o=Vt.get(e,n,r);return o||(o=new Yr(t,e,i,n,s,r),Vt.set(e,n,r,o)),o}(r,o,void 0!==this.imgSize_?this.imgSize_:null,this.crossOrigin_,a,this.color_),this.offset_=void 0!==t.offset?t.offset:[0,0],this.offsetOrigin_=void 0!==t.offsetOrigin?t.offsetOrigin:"top-left",this.origin_=null,this.size_=void 0!==t.size?t.size:null,void 0!==t.width||void 0!==t.height){let e,i;if(t.size)[e,i]=t.size;else{const n=this.getImage(1);if(!(n instanceof HTMLCanvasElement||n.src&&n.complete)){this.initialOptions_=t;const e=()=>{if(this.unlistenImageChange(e),!this.initialOptions_)return;const i=this.iconImage_.getSize();this.setScale(jr(i[0],i[1],t.width,t.height))};return void this.listenImageChange(e)}e=n.width,i=n.height}void 0!==e&&this.setScale(jr(e,i,t.width,t.height))}}clone(){let t,e,i;return this.initialOptions_?(e=this.initialOptions_.width,i=this.initialOptions_.height):(t=this.getScale(),t=Array.isArray(t)?t.slice():t),new Br({anchor:this.anchor_.slice(),anchorOrigin:this.anchorOrigin_,anchorXUnits:this.anchorXUnits_,anchorYUnits:this.anchorYUnits_,color:this.color_&&this.color_.slice?this.color_.slice():this.color_||void 0,crossOrigin:this.crossOrigin_,imgSize:this.imgSize_,offset:this.offset_.slice(),offsetOrigin:this.offsetOrigin_,opacity:this.getOpacity(),rotateWithView:this.getRotateWithView(),rotation:this.getRotation(),scale:t,width:e,height:i,size:null!==this.size_?this.size_.slice():void 0,src:this.getSrc(),displacement:this.getDisplacement().slice(),declutterMode:this.getDeclutterMode()})}getAnchor(){let t=this.normalizedAnchor_;if(!t){t=this.anchor_;const e=this.getSize();if("fraction"==this.anchorXUnits_||"fraction"==this.anchorYUnits_){if(!e)return null;t=this.anchor_.slice(),"fraction"==this.anchorXUnits_&&(t[0]*=e[0]),"fraction"==this.anchorYUnits_&&(t[1]*=e[1])}if("top-left"!=this.anchorOrigin_){if(!e)return null;t===this.anchor_&&(t=this.anchor_.slice()),"top-right"!=this.anchorOrigin_&&"bottom-right"!=this.anchorOrigin_||(t[0]=-t[0]+e[0]),"bottom-left"!=this.anchorOrigin_&&"bottom-right"!=this.anchorOrigin_||(t[1]=-t[1]+e[1])}this.normalizedAnchor_=t}const e=this.getDisplacement(),i=this.getScaleArray();return[t[0]-e[0]/i[0],t[1]+e[1]/i[1]]}setAnchor(t){this.anchor_=t,this.normalizedAnchor_=null}getColor(){return this.color_}getImage(t){return this.iconImage_.getImage(t)}getPixelRatio(t){return this.iconImage_.getPixelRatio(t)}getImageSize(){return this.iconImage_.getSize()}getImageState(){return this.iconImage_.getImageState()}getHitDetectionImage(){return this.iconImage_.getHitDetectionImage()}getOrigin(){if(this.origin_)return this.origin_;let t=this.offset_;if("top-left"!=this.offsetOrigin_){const e=this.getSize(),i=this.iconImage_.getSize();if(!e||!i)return null;t=t.slice(),"top-right"!=this.offsetOrigin_&&"bottom-right"!=this.offsetOrigin_||(t[0]=i[0]-e[0]-t[0]),"bottom-left"!=this.offsetOrigin_&&"bottom-right"!=this.offsetOrigin_||(t[1]=i[1]-e[1]-t[1])}return this.origin_=t,this.origin_}getSrc(){return this.iconImage_.getSrc()}getSize(){return this.size_?this.size_:this.iconImage_.getSize()}getWidth(){const t=this.getScaleArray();return this.size_?this.size_[0]*t[0]:2==this.iconImage_.getImageState()?this.iconImage_.getSize()[0]*t[0]:void 0}getHeight(){const t=this.getScaleArray();return this.size_?this.size_[1]*t[1]:2==this.iconImage_.getImageState()?this.iconImage_.getSize()[1]*t[1]:void 0}setScale(t){delete this.initialOptions_,super.setScale(t)}listenImageChange(t){this.iconImage_.addEventListener(f,t)}load(){this.iconImage_.load()}unlistenImageChange(t){this.iconImage_.removeEventListener(f,t)}}const Kr=Br;class Zr{constructor(t){t=t||{},this.font_=t.font,this.rotation_=t.rotation,this.rotateWithView_=t.rotateWithView,this.scale_=t.scale,this.scaleArray_=Ms(void 0!==t.scale?t.scale:1),this.text_=t.text,this.textAlign_=t.textAlign,this.justify_=t.justify,this.repeat_=t.repeat,this.textBaseline_=t.textBaseline,this.fill_=void 0!==t.fill?t.fill:new kr({color:"#333"}),this.maxAngle_=void 0!==t.maxAngle?t.maxAngle:Math.PI/4,this.placement_=void 0!==t.placement?t.placement:"point",this.overflow_=!!t.overflow,this.stroke_=void 0!==t.stroke?t.stroke:null,this.offsetX_=void 0!==t.offsetX?t.offsetX:0,this.offsetY_=void 0!==t.offsetY?t.offsetY:0,this.backgroundFill_=t.backgroundFill?t.backgroundFill:null,this.backgroundStroke_=t.backgroundStroke?t.backgroundStroke:null,this.padding_=void 0===t.padding?null:t.padding}clone(){const t=this.getScale();return new Zr({font:this.getFont(),placement:this.getPlacement(),repeat:this.getRepeat(),maxAngle:this.getMaxAngle(),overflow:this.getOverflow(),rotation:this.getRotation(),rotateWithView:this.getRotateWithView(),scale:Array.isArray(t)?t.slice():t,text:this.getText(),textAlign:this.getTextAlign(),justify:this.getJustify(),textBaseline:this.getTextBaseline(),fill:this.getFill()?this.getFill().clone():void 0,stroke:this.getStroke()?this.getStroke().clone():void 0,offsetX:this.getOffsetX(),offsetY:this.getOffsetY(),backgroundFill:this.getBackgroundFill()?this.getBackgroundFill().clone():void 0,backgroundStroke:this.getBackgroundStroke()?this.getBackgroundStroke().clone():void 0,padding:this.getPadding()||void 0})}getOverflow(){return this.overflow_}getFont(){return this.font_}getMaxAngle(){return this.maxAngle_}getPlacement(){return this.placement_}getRepeat(){return this.repeat_}getOffsetX(){return this.offsetX_}getOffsetY(){return this.offsetY_}getFill(){return this.fill_}getRotateWithView(){return this.rotateWithView_}getRotation(){return this.rotation_}getScale(){return this.scale_}getScaleArray(){return this.scaleArray_}getStroke(){return this.stroke_}getText(){return this.text_}getTextAlign(){return this.textAlign_}getJustify(){return this.justify_}getTextBaseline(){return this.textBaseline_}getBackgroundFill(){return this.backgroundFill_}getBackgroundStroke(){return this.backgroundStroke_}getPadding(){return this.padding_}setOverflow(t){this.overflow_=t}setFont(t){this.font_=t}setMaxAngle(t){this.maxAngle_=t}setOffsetX(t){this.offsetX_=t}setOffsetY(t){this.offsetY_=t}setPlacement(t){this.placement_=t}setRepeat(t){this.repeat_=t}setRotateWithView(t){this.rotateWithView_=t}setFill(t){this.fill_=t}setRotation(t){this.rotation_=t}setScale(t){this.scale_=t,this.scaleArray_=Ms(void 0!==t?t:1)}setStroke(t){this.stroke_=t}setText(t){this.text_=t}setTextAlign(t){this.textAlign_=t}setJustify(t){this.justify_=t}setTextBaseline(t){this.textBaseline_=t}setBackgroundFill(t){this.backgroundFill_=t}setBackgroundStroke(t){this.backgroundStroke_=t}setPadding(t){this.padding_=t}}const Vr=Zr;function Ur(t){return new Xr({fill:qr(t,""),stroke:Hr(t,""),text:Jr(t),image:Qr(t)})}function qr(t,e){const i=t[e+"fill-color"];if(i)return"none"===i?null:new kr({color:i})}function Hr(t,e){const i=t[e+"stroke-width"],n=t[e+"stroke-color"];if(i||n)return new Or({width:i,color:n,lineCap:t[e+"stroke-line-cap"],lineJoin:t[e+"stroke-line-join"],lineDash:t[e+"stroke-line-dash"],lineDashOffset:t[e+"stroke-line-dash-offset"],miterLimit:t[e+"stroke-miter-limit"]})}function Jr(t){const e=t["text-value"];if(e)return new Vr({text:e,font:t["text-font"],maxAngle:t["text-max-angle"],offsetX:t["text-offset-x"],offsetY:t["text-offset-y"],overflow:t["text-overflow"],placement:t["text-placement"],repeat:t["text-repeat"],scale:t["text-scale"],rotateWithView:t["text-rotate-with-view"],rotation:t["text-rotation"],textAlign:t["text-align"],justify:t["text-justify"],textBaseline:t["text-baseline"],padding:t["text-padding"],fill:qr(t,"text-"),backgroundFill:qr(t,"text-background-"),stroke:Hr(t,"text-"),backgroundStroke:Hr(t,"text-background-")})}function Qr(t){const e=t["icon-src"],i=t["icon-img"];if(e||i)return new Kr({src:e,img:i,imgSize:t["icon-img-size"],anchor:t["icon-anchor"],anchorOrigin:t["icon-anchor-origin"],anchorXUnits:t["icon-anchor-x-units"],anchorYUnits:t["icon-anchor-y-units"],color:t["icon-color"],crossOrigin:t["icon-cross-origin"],offset:t["icon-offset"],displacement:t["icon-displacement"],opacity:t["icon-opacity"],scale:t["icon-scale"],width:t["icon-width"],height:t["icon-height"],rotation:t["icon-rotation"],rotateWithView:t["icon-rotate-with-view"],size:t["icon-size"],declutterMode:t["icon-declutter-mode"]});const n=t["shape-points"];if(n){const e="shape-";return new Mr({points:n,fill:qr(t,e),stroke:Hr(t,e),radius:t["shape-radius"],radius1:t["shape-radius1"],radius2:t["shape-radius2"],angle:t["shape-angle"],displacement:t["shape-displacement"],rotation:t["shape-rotation"],rotateWithView:t["shape-rotate-with-view"],scale:t["shape-scale"],declutterMode:t["shape-declutter-mode"]})}const s=t["circle-radius"];if(s){const e="circle-";return new Lr({radius:s,fill:qr(t,e),stroke:Hr(t,e),displacement:t["circle-displacement"],scale:t["circle-scale"],rotation:t["circle-rotation"],rotateWithView:t["circle-rotate-with-view"],declutterMode:t["circle-declutter-mode"]})}}const $r="renderOrder",to=class extends Hi{constructor(t){t=t||{};const e=Object.assign({},t);delete e.style,delete e.renderBuffer,delete e.updateWhileAnimating,delete e.updateWhileInteracting,super(e),this.declutter_=void 0!==t.declutter&&t.declutter,this.renderBuffer_=void 0!==t.renderBuffer?t.renderBuffer:100,this.style_=null,this.styleFunction_=void 0,this.setStyle(t.style),this.updateWhileAnimating_=void 0!==t.updateWhileAnimating&&t.updateWhileAnimating,this.updateWhileInteracting_=void 0!==t.updateWhileInteracting&&t.updateWhileInteracting}getDeclutter(){return this.declutter_}getFeatures(t){return super.getFeatures(t)}getRenderBuffer(){return this.renderBuffer_}getRenderOrder(){return this.get($r)}getStyle(){return this.style_}getStyleFunction(){return this.styleFunction_}getUpdateWhileAnimating(){return this.updateWhileAnimating_}getUpdateWhileInteracting(){return this.updateWhileInteracting_}renderDeclutter(t){t.declutterTree||(t.declutterTree=new ks(9)),this.getRenderer().renderDeclutter(t)}setRenderOrder(t){this.set($r,t)}setStyle(t){let e;if(void 0===t)e=Gr;else if(null===t)e=null;else if("function"==typeof t)e=t;else if(t instanceof Xr)e=t;else if(Array.isArray(t)){const i=t.length,n=new Array(i);for(let e=0;e<i;++e){const i=t[e];n[e]=i instanceof Xr?i:Ur(i)}e=n}else e=Ur(t);this.style_=e,this.styleFunction_=null===t?void 0:function(t){let e;if("function"==typeof t)e=t;else{let i;Array.isArray(t)?i=t:(U("function"==typeof t.getZIndex,41),i=[t]),e=function(){return i}}return e}(this.style_),this.changed()}},eo={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},io=[eo.FILL],no=[eo.STROKE],so=[eo.BEGIN_PATH],ro=[eo.CLOSE_PATH],oo=eo,ao=class{drawCustom(t,e,i,n){}drawGeometry(t){}setStyle(t){}drawCircle(t,e){}drawFeature(t,e){}drawGeometryCollection(t,e){}drawLineString(t,e){}drawMultiLineString(t,e){}drawMultiPoint(t,e){}drawMultiPolygon(t,e){}drawPoint(t,e){}drawPolygon(t,e){}drawText(t,e){}setFillStrokeStyle(t,e){}setImageStyle(t,e){}setTextStyle(t,e){}},ho=class extends ao{constructor(t,e,i,n){super(),this.tolerance=t,this.maxExtent=e,this.pixelRatio=n,this.maxLineWidth=0,this.resolution=i,this.beginGeometryInstruction1_=null,this.beginGeometryInstruction2_=null,this.bufferedMaxExtent_=null,this.instructions=[],this.coordinates=[],this.tmpCoordinate_=[],this.hitDetectionInstructions=[],this.state={}}applyPixelRatio(t){const e=this.pixelRatio;return 1==e?t:t.map((function(t){return t*e}))}appendFlatPointCoordinates(t,e){const i=this.getBufferedMaxExtent(),n=this.tmpCoordinate_,s=this.coordinates;let r=s.length;for(let o=0,a=t.length;o<a;o+=e)n[0]=t[o],n[1]=t[o+1],st(i,n)&&(s[r++]=n[0],s[r++]=n[1]);return r}appendFlatLineCoordinates(t,e,i,n,s,r){const o=this.coordinates;let a=o.length;const h=this.getBufferedMaxExtent();r&&(e+=n);let l=t[e],c=t[e+1];const u=this.tmpCoordinate_;let d,g,_,f=!0;for(d=e+n;d<i;d+=n)u[0]=t[d],u[1]=t[d+1],_=at(h,u),_!==g?(f&&(o[a++]=l,o[a++]=c,f=!1),o[a++]=u[0],o[a++]=u[1]):1===_?(o[a++]=u[0],o[a++]=u[1],f=!1):f=!0,l=u[0],c=u[1],g=_;return(s&&f||d===e+n)&&(o[a++]=l,o[a++]=c),a}drawCustomCoordinates_(t,e,i,n,s){for(let r=0,o=i.length;r<o;++r){const o=i[r],a=this.appendFlatLineCoordinates(t,e,o,n,!1,!1);s.push(a),e=o}return e}drawCustom(t,e,i,n){this.beginGeometry(t,e);const s=t.getType(),r=t.getStride(),o=this.coordinates.length;let a,h,l,c,u;switch(s){case"MultiPolygon":a=t.getOrientedFlatCoordinates(),c=[];const e=t.getEndss();u=0;for(let t=0,i=e.length;t<i;++t){const i=[];u=this.drawCustomCoordinates_(a,u,e[t],r,i),c.push(i)}this.instructions.push([oo.CUSTOM,o,c,t,i,bi]),this.hitDetectionInstructions.push([oo.CUSTOM,o,c,t,n||i,bi]);break;case"Polygon":case"MultiLineString":l=[],a="Polygon"==s?t.getOrientedFlatCoordinates():t.getFlatCoordinates(),u=this.drawCustomCoordinates_(a,0,t.getEnds(),r,l),this.instructions.push([oo.CUSTOM,o,l,t,i,Ii]),this.hitDetectionInstructions.push([oo.CUSTOM,o,l,t,n||i,Ii]);break;case"LineString":case"Circle":a=t.getFlatCoordinates(),h=this.appendFlatLineCoordinates(a,0,a.length,r,!1,!1),this.instructions.push([oo.CUSTOM,o,h,t,i,Ri]),this.hitDetectionInstructions.push([oo.CUSTOM,o,h,t,n||i,Ri]);break;case"MultiPoint":a=t.getFlatCoordinates(),h=this.appendFlatPointCoordinates(a,r),h>o&&(this.instructions.push([oo.CUSTOM,o,h,t,i,Ri]),this.hitDetectionInstructions.push([oo.CUSTOM,o,h,t,n||i,Ri]));break;case"Point":a=t.getFlatCoordinates(),this.coordinates.push(a[0],a[1]),h=this.coordinates.length,this.instructions.push([oo.CUSTOM,o,h,t,i]),this.hitDetectionInstructions.push([oo.CUSTOM,o,h,t,n||i])}this.endGeometry(e)}beginGeometry(t,e){this.beginGeometryInstruction1_=[oo.BEGIN_GEOMETRY,e,0,t],this.instructions.push(this.beginGeometryInstruction1_),this.beginGeometryInstruction2_=[oo.BEGIN_GEOMETRY,e,0,t],this.hitDetectionInstructions.push(this.beginGeometryInstruction2_)}finish(){return{instructions:this.instructions,hitDetectionInstructions:this.hitDetectionInstructions,coordinates:this.coordinates}}reverseHitDetectionInstructions(){const t=this.hitDetectionInstructions;let e;t.reverse();const i=t.length;let n,s,r=-1;for(e=0;e<i;++e)n=t[e],s=n[0],s==oo.END_GEOMETRY?r=e:s==oo.BEGIN_GEOMETRY&&(n[2]=e,o(this.hitDetectionInstructions,r,e),r=-1)}setFillStrokeStyle(t,e){const i=this.state;if(t){const e=t.getColor();i.fillStyle=Ir(e||un)}else i.fillStyle=void 0;if(e){const t=e.getColor();i.strokeStyle=Ir(t||fn);const n=e.getLineCap();i.lineCap=void 0!==n?n:dn;const s=e.getLineDash();i.lineDash=s?s.slice():gn;const r=e.getLineDashOffset();i.lineDashOffset=r||0;const o=e.getLineJoin();i.lineJoin=void 0!==o?o:_n;const a=e.getWidth();i.lineWidth=void 0!==a?a:1;const h=e.getMiterLimit();i.miterLimit=void 0!==h?h:10,i.lineWidth>this.maxLineWidth&&(this.maxLineWidth=i.lineWidth,this.bufferedMaxExtent_=null)}else i.strokeStyle=void 0,i.lineCap=void 0,i.lineDash=null,i.lineDashOffset=void 0,i.lineJoin=void 0,i.lineWidth=void 0,i.miterLimit=void 0}createFill(t){const e=t.fillStyle,i=[oo.SET_FILL_STYLE,e];return"string"!=typeof e&&i.push(!0),i}applyStroke(t){this.instructions.push(this.createStroke(t))}createStroke(t){return[oo.SET_STROKE_STYLE,t.strokeStyle,t.lineWidth*this.pixelRatio,t.lineCap,t.lineJoin,t.miterLimit,this.applyPixelRatio(t.lineDash),t.lineDashOffset*this.pixelRatio]}updateFillStyle(t,e){const i=t.fillStyle;"string"==typeof i&&t.currentFillStyle==i||(void 0!==i&&this.instructions.push(e.call(this,t)),t.currentFillStyle=i)}updateStrokeStyle(t,e){const i=t.strokeStyle,n=t.lineCap,s=t.lineDash,r=t.lineDashOffset,o=t.lineJoin,a=t.lineWidth,l=t.miterLimit;(t.currentStrokeStyle!=i||t.currentLineCap!=n||s!=t.currentLineDash&&!h(t.currentLineDash,s)||t.currentLineDashOffset!=r||t.currentLineJoin!=o||t.currentLineWidth!=a||t.currentMiterLimit!=l)&&(void 0!==i&&e.call(this,t),t.currentStrokeStyle=i,t.currentLineCap=n,t.currentLineDash=s,t.currentLineDashOffset=r,t.currentLineJoin=o,t.currentLineWidth=a,t.currentMiterLimit=l)}endGeometry(t){this.beginGeometryInstruction1_[2]=this.instructions.length,this.beginGeometryInstruction1_=null,this.beginGeometryInstruction2_[2]=this.hitDetectionInstructions.length,this.beginGeometryInstruction2_=null;const e=[oo.END_GEOMETRY,t];this.instructions.push(e),this.hitDetectionInstructions.push(e)}getBufferedMaxExtent(){if(!this.bufferedMaxExtent_&&(this.bufferedMaxExtent_=it(this.maxExtent),this.maxLineWidth>0)){const t=this.resolution*(this.maxLineWidth+1)/2;et(this.bufferedMaxExtent_,t,this.bufferedMaxExtent_)}return this.bufferedMaxExtent_}},lo=class extends ho{constructor(t,e,i,n){super(t,e,i,n)}drawFlatCoordinatess_(t,e,i,n){const s=this.state,r=void 0!==s.fillStyle,o=void 0!==s.strokeStyle,a=i.length;this.instructions.push(so),this.hitDetectionInstructions.push(so);for(let s=0;s<a;++s){const r=i[s],a=this.coordinates.length,h=this.appendFlatLineCoordinates(t,e,r,n,!0,!o),l=[oo.MOVE_TO_LINE_TO,a,h];this.instructions.push(l),this.hitDetectionInstructions.push(l),o&&(this.instructions.push(ro),this.hitDetectionInstructions.push(ro)),e=r}return r&&(this.instructions.push(io),this.hitDetectionInstructions.push(io)),o&&(this.instructions.push(no),this.hitDetectionInstructions.push(no)),e}drawCircle(t,e){const i=this.state,n=i.fillStyle,s=i.strokeStyle;if(void 0===n&&void 0===s)return;this.setFillStrokeStyles_(),this.beginGeometry(t,e),void 0!==i.fillStyle&&this.hitDetectionInstructions.push([oo.SET_FILL_STYLE,un]),void 0!==i.strokeStyle&&this.hitDetectionInstructions.push([oo.SET_STROKE_STYLE,i.strokeStyle,i.lineWidth,i.lineCap,i.lineJoin,i.miterLimit,gn,0]);const r=t.getFlatCoordinates(),o=t.getStride(),a=this.coordinates.length;this.appendFlatLineCoordinates(r,0,r.length,o,!1,!1);const h=[oo.CIRCLE,a];this.instructions.push(so,h),this.hitDetectionInstructions.push(so,h),void 0!==i.fillStyle&&(this.instructions.push(io),this.hitDetectionInstructions.push(io)),void 0!==i.strokeStyle&&(this.instructions.push(no),this.hitDetectionInstructions.push(no)),this.endGeometry(e)}drawPolygon(t,e){const i=this.state,n=i.fillStyle,s=i.strokeStyle;if(void 0===n&&void 0===s)return;this.setFillStrokeStyles_(),this.beginGeometry(t,e),void 0!==i.fillStyle&&this.hitDetectionInstructions.push([oo.SET_FILL_STYLE,un]),void 0!==i.strokeStyle&&this.hitDetectionInstructions.push([oo.SET_STROKE_STYLE,i.strokeStyle,i.lineWidth,i.lineCap,i.lineJoin,i.miterLimit,gn,0]);const r=t.getEnds(),o=t.getOrientedFlatCoordinates(),a=t.getStride();this.drawFlatCoordinatess_(o,0,r,a),this.endGeometry(e)}drawMultiPolygon(t,e){const i=this.state,n=i.fillStyle,s=i.strokeStyle;if(void 0===n&&void 0===s)return;this.setFillStrokeStyles_(),this.beginGeometry(t,e),void 0!==i.fillStyle&&this.hitDetectionInstructions.push([oo.SET_FILL_STYLE,un]),void 0!==i.strokeStyle&&this.hitDetectionInstructions.push([oo.SET_STROKE_STYLE,i.strokeStyle,i.lineWidth,i.lineCap,i.lineJoin,i.miterLimit,gn,0]);const r=t.getEndss(),o=t.getOrientedFlatCoordinates(),a=t.getStride();let h=0;for(let t=0,e=r.length;t<e;++t)h=this.drawFlatCoordinatess_(o,h,r[t],a);this.endGeometry(e)}finish(){this.reverseHitDetectionInstructions(),this.state=null;const t=this.tolerance;if(0!==t){const e=this.coordinates;for(let i=0,n=e.length;i<n;++i)e[i]=Ei(e[i],t)}return super.finish()}setFillStrokeStyles_(){const t=this.state;void 0!==t.fillStyle&&this.updateFillStyle(t,this.createFill),void 0!==t.strokeStyle&&this.updateStrokeStyle(t,this.applyStroke)}};function co(t,e,i,n,s){const r=[];let o=i,a=0,h=e.slice(i,2);for(;a<t&&o+s<n;){const[i,n]=h.slice(-2),l=e[o+s],c=e[o+s+1],u=Math.sqrt((l-i)*(l-i)+(c-n)*(c-n));if(a+=u,a>=t){const e=(t-a+u)/u,d=Ot(i,l,e),g=Ot(n,c,e);h.push(d,g),r.push(h),h=[d,g],a==t&&(o+=s),a=0}else if(a<t)h.push(e[o+s],e[o+s+1]),o+=s;else{const t=u-a,e=Ot(i,l,t/u),d=Ot(n,c,t/u);h.push(e,d),r.push(h),h=[e,d],a=0,o+=s}}return a>0&&r.push(h),r}function uo(t,e,i,n,s){let r,o,a,h,l,c,u,d,g,_,f=i,m=i,p=0,y=0,x=i;for(o=i;o<n;o+=s){const i=e[o],n=e[o+1];void 0!==l&&(g=i-l,_=n-c,h=Math.sqrt(g*g+_*_),void 0!==u&&(y+=a,r=Math.acos((u*g+d*_)/(a*h)),r>t&&(y>p&&(p=y,f=x,m=o),y=0,x=o-s)),a=h,u=g,d=_),l=i,c=n}return y+=h,y>p?[x,o]:[f,m]}const go={left:0,center:.5,right:1,top:0,middle:.5,hanging:.2,alphabetic:.8,ideographic:.8,bottom:1},_o={Circle:lo,Default:ho,Image:class extends ho{constructor(t,e,i,n){super(t,e,i,n),this.hitDetectionImage_=null,this.image_=null,this.imagePixelRatio_=void 0,this.anchorX_=void 0,this.anchorY_=void 0,this.height_=void 0,this.opacity_=void 0,this.originX_=void 0,this.originY_=void 0,this.rotateWithView_=void 0,this.rotation_=void 0,this.scale_=void 0,this.width_=void 0,this.declutterMode_=void 0,this.declutterImageWithText_=void 0}drawPoint(t,e){if(!this.image_)return;this.beginGeometry(t,e);const i=t.getFlatCoordinates(),n=t.getStride(),s=this.coordinates.length,r=this.appendFlatPointCoordinates(i,n);this.instructions.push([oo.DRAW_IMAGE,s,r,this.image_,this.anchorX_*this.imagePixelRatio_,this.anchorY_*this.imagePixelRatio_,Math.ceil(this.height_*this.imagePixelRatio_),this.opacity_,this.originX_*this.imagePixelRatio_,this.originY_*this.imagePixelRatio_,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.declutterMode_,this.declutterImageWithText_]),this.hitDetectionInstructions.push([oo.DRAW_IMAGE,s,r,this.hitDetectionImage_,this.anchorX_,this.anchorY_,this.height_,1,this.originX_,this.originY_,this.rotateWithView_,this.rotation_,this.scale_,this.width_,this.declutterMode_,this.declutterImageWithText_]),this.endGeometry(e)}drawMultiPoint(t,e){if(!this.image_)return;this.beginGeometry(t,e);const i=t.getFlatCoordinates(),n=t.getStride(),s=this.coordinates.length,r=this.appendFlatPointCoordinates(i,n);this.instructions.push([oo.DRAW_IMAGE,s,r,this.image_,this.anchorX_*this.imagePixelRatio_,this.anchorY_*this.imagePixelRatio_,Math.ceil(this.height_*this.imagePixelRatio_),this.opacity_,this.originX_*this.imagePixelRatio_,this.originY_*this.imagePixelRatio_,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.declutterMode_,this.declutterImageWithText_]),this.hitDetectionInstructions.push([oo.DRAW_IMAGE,s,r,this.hitDetectionImage_,this.anchorX_,this.anchorY_,this.height_,1,this.originX_,this.originY_,this.rotateWithView_,this.rotation_,this.scale_,this.width_,this.declutterMode_,this.declutterImageWithText_]),this.endGeometry(e)}finish(){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,super.finish()}setImageStyle(t,e){const i=t.getAnchor(),n=t.getSize(),s=t.getOrigin();this.imagePixelRatio_=t.getPixelRatio(this.pixelRatio),this.anchorX_=i[0],this.anchorY_=i[1],this.hitDetectionImage_=t.getHitDetectionImage(),this.image_=t.getImage(this.pixelRatio),this.height_=n[1],this.opacity_=t.getOpacity(),this.originX_=s[0],this.originY_=s[1],this.rotateWithView_=t.getRotateWithView(),this.rotation_=t.getRotation(),this.scale_=t.getScaleArray(),this.width_=n[0],this.declutterMode_=t.getDeclutterMode(),this.declutterImageWithText_=e}},LineString:class extends ho{constructor(t,e,i,n){super(t,e,i,n)}drawFlatCoordinates_(t,e,i,n){const s=this.coordinates.length,r=this.appendFlatLineCoordinates(t,e,i,n,!1,!1),o=[oo.MOVE_TO_LINE_TO,s,r];return this.instructions.push(o),this.hitDetectionInstructions.push(o),i}drawLineString(t,e){const i=this.state,n=i.strokeStyle,s=i.lineWidth;if(void 0===n||void 0===s)return;this.updateStrokeStyle(i,this.applyStroke),this.beginGeometry(t,e),this.hitDetectionInstructions.push([oo.SET_STROKE_STYLE,i.strokeStyle,i.lineWidth,i.lineCap,i.lineJoin,i.miterLimit,gn,0],so);const r=t.getFlatCoordinates(),o=t.getStride();this.drawFlatCoordinates_(r,0,r.length,o),this.hitDetectionInstructions.push(no),this.endGeometry(e)}drawMultiLineString(t,e){const i=this.state,n=i.strokeStyle,s=i.lineWidth;if(void 0===n||void 0===s)return;this.updateStrokeStyle(i,this.applyStroke),this.beginGeometry(t,e),this.hitDetectionInstructions.push([oo.SET_STROKE_STYLE,i.strokeStyle,i.lineWidth,i.lineCap,i.lineJoin,i.miterLimit,gn,0],so);const r=t.getEnds(),o=t.getFlatCoordinates(),a=t.getStride();let h=0;for(let t=0,e=r.length;t<e;++t)h=this.drawFlatCoordinates_(o,h,r[t],a);this.hitDetectionInstructions.push(no),this.endGeometry(e)}finish(){const t=this.state;return null!=t.lastStroke&&t.lastStroke!=this.coordinates.length&&this.instructions.push(no),this.reverseHitDetectionInstructions(),this.state=null,super.finish()}applyStroke(t){null!=t.lastStroke&&t.lastStroke!=this.coordinates.length&&(this.instructions.push(no),t.lastStroke=this.coordinates.length),t.lastStroke=0,super.applyStroke(t),this.instructions.push(so)}},Polygon:lo,Text:class extends ho{constructor(t,e,i,n){super(t,e,i,n),this.labels_=null,this.text_="",this.textOffsetX_=0,this.textOffsetY_=0,this.textRotateWithView_=void 0,this.textRotation_=0,this.textFillState_=null,this.fillStates={},this.fillStates["#000"]={fillStyle:un},this.textStrokeState_=null,this.strokeStates={},this.textState_={},this.textStates={},this.textKey_="",this.fillKey_="",this.strokeKey_="",this.declutterImageWithText_=void 0}finish(){const t=super.finish();return t.textStates=this.textStates,t.fillStates=this.fillStates,t.strokeStates=this.strokeStates,t}drawText(t,e){const i=this.textFillState_,n=this.textStrokeState_,s=this.textState_;if(""===this.text_||!s||!i&&!n)return;const r=this.coordinates;let o=r.length;const a=t.getType();let h=null,l=t.getStride();if("line"!==s.placement||"LineString"!=a&&"MultiLineString"!=a&&"Polygon"!=a&&"MultiPolygon"!=a){let i=s.overflow?null:[];switch(a){case"Point":case"MultiPoint":h=t.getFlatCoordinates();break;case"LineString":h=t.getFlatMidpoint();break;case"Circle":h=t.getCenter();break;case"MultiLineString":h=t.getFlatMidpoints(),l=2;break;case"Polygon":h=t.getFlatInteriorPoint(),s.overflow||i.push(h[2]/this.resolution),l=3;break;case"MultiPolygon":const e=t.getFlatInteriorPoints();h=[];for(let t=0,n=e.length;t<n;t+=3)s.overflow||i.push(e[t+2]/this.resolution),h.push(e[t],e[t+1]);if(0===h.length)return;l=2}const n=this.appendFlatPointCoordinates(h,l);if(n===o)return;if(i&&(n-o)/2!=h.length/l){let t=o/2;i=i.filter(((e,i)=>{const n=r[2*(t+i)]===h[i*l]&&r[2*(t+i)+1]===h[i*l+1];return n||--t,n}))}this.saveTextStates_(),(s.backgroundFill||s.backgroundStroke)&&(this.setFillStrokeStyle(s.backgroundFill,s.backgroundStroke),s.backgroundFill&&this.updateFillStyle(this.state,this.createFill),s.backgroundStroke&&(this.updateStrokeStyle(this.state,this.applyStroke),this.hitDetectionInstructions.push(this.createStroke(this.state)))),this.beginGeometry(t,e);let c=s.padding;if(c!=yn&&(s.scale[0]<0||s.scale[1]<0)){let t=s.padding[0],e=s.padding[1],i=s.padding[2],n=s.padding[3];s.scale[0]<0&&(e=-e,n=-n),s.scale[1]<0&&(t=-t,i=-i),c=[t,e,i,n]}const u=this.pixelRatio;this.instructions.push([oo.DRAW_IMAGE,o,n,null,NaN,NaN,NaN,1,0,0,this.textRotateWithView_,this.textRotation_,[1,1],NaN,void 0,this.declutterImageWithText_,c==yn?yn:c.map((function(t){return t*u})),!!s.backgroundFill,!!s.backgroundStroke,this.text_,this.textKey_,this.strokeKey_,this.fillKey_,this.textOffsetX_,this.textOffsetY_,i]);const d=1/u,g=this.state.fillStyle;s.backgroundFill&&(this.state.fillStyle=un,this.hitDetectionInstructions.push(this.createFill(this.state))),this.hitDetectionInstructions.push([oo.DRAW_IMAGE,o,n,null,NaN,NaN,NaN,1,0,0,this.textRotateWithView_,this.textRotation_,[d,d],NaN,void 0,this.declutterImageWithText_,c,!!s.backgroundFill,!!s.backgroundStroke,this.text_,this.textKey_,this.strokeKey_,this.fillKey_?un:this.fillKey_,this.textOffsetX_,this.textOffsetY_,i]),s.backgroundFill&&(this.state.fillStyle=g,this.hitDetectionInstructions.push(this.createFill(this.state))),this.endGeometry(e)}else{if(!It(this.getBufferedMaxExtent(),t.getExtent()))return;let i;if(h=t.getFlatCoordinates(),"LineString"==a)i=[h.length];else if("MultiLineString"==a)i=t.getEnds();else if("Polygon"==a)i=t.getEnds().slice(0,1);else if("MultiPolygon"==a){const e=t.getEndss();i=[];for(let t=0,n=e.length;t<n;++t)i.push(e[t][0])}this.beginGeometry(t,e);const n=s.repeat,c=n?void 0:s.textAlign;let u=0;for(let t=0,e=i.length;t<e;++t){let e;e=n?co(n*this.resolution,h,u,i[t],l):[h.slice(u,i[t])];for(let n=0,a=e.length;n<a;++n){const a=e[n];let h=0,d=a.length;if(null==c){const t=uo(s.maxAngle,a,0,a.length,2);h=t[0],d=t[1]}for(let t=h;t<d;t+=l)r.push(a[t],a[t+1]);const g=r.length;u=i[t],this.drawChars_(o,g),o=g}}this.endGeometry(e)}}saveTextStates_(){const t=this.textStrokeState_,e=this.textState_,i=this.textFillState_,n=this.strokeKey_;t&&(n in this.strokeStates||(this.strokeStates[n]={strokeStyle:t.strokeStyle,lineCap:t.lineCap,lineDashOffset:t.lineDashOffset,lineWidth:t.lineWidth,lineJoin:t.lineJoin,miterLimit:t.miterLimit,lineDash:t.lineDash}));const s=this.textKey_;s in this.textStates||(this.textStates[s]={font:e.font,textAlign:e.textAlign||mn,justify:e.justify,textBaseline:e.textBaseline||pn,scale:e.scale});const r=this.fillKey_;i&&(r in this.fillStates||(this.fillStates[r]={fillStyle:i.fillStyle}))}drawChars_(t,e){const i=this.textStrokeState_,n=this.textState_,s=this.strokeKey_,r=this.textKey_,o=this.fillKey_;this.saveTextStates_();const a=this.pixelRatio,h=go[n.textBaseline],l=this.textOffsetY_*a,c=this.text_,u=i?i.lineWidth*Math.abs(n.scale[0])/2:0;this.instructions.push([oo.DRAW_CHARS,t,e,h,n.overflow,o,n.maxAngle,a,l,s,u*a,c,r,1]),this.hitDetectionInstructions.push([oo.DRAW_CHARS,t,e,h,n.overflow,o?un:o,n.maxAngle,1,l,s,u,c,r,1/a])}setTextStyle(t,e){let i,n,s;if(t){const e=t.getFill();e?(n=this.textFillState_,n||(n={},this.textFillState_=n),n.fillStyle=Ir(e.getColor()||un)):(n=null,this.textFillState_=n);const r=t.getStroke();if(r){s=this.textStrokeState_,s||(s={},this.textStrokeState_=s);const t=r.getLineDash(),e=r.getLineDashOffset(),i=r.getWidth(),n=r.getMiterLimit();s.lineCap=r.getLineCap()||dn,s.lineDash=t?t.slice():gn,s.lineDashOffset=void 0===e?0:e,s.lineJoin=r.getLineJoin()||_n,s.lineWidth=void 0===i?1:i,s.miterLimit=void 0===n?10:n,s.strokeStyle=Ir(r.getColor()||fn)}else s=null,this.textStrokeState_=s;i=this.textState_;const o=t.getFont()||cn;wn(o);const a=t.getScaleArray();i.overflow=t.getOverflow(),i.font=o,i.maxAngle=t.getMaxAngle(),i.placement=t.getPlacement(),i.textAlign=t.getTextAlign(),i.repeat=t.getRepeat(),i.justify=t.getJustify(),i.textBaseline=t.getTextBaseline()||pn,i.backgroundFill=t.getBackgroundFill(),i.backgroundStroke=t.getBackgroundStroke(),i.padding=t.getPadding()||yn,i.scale=void 0===a?[1,1]:a;const h=t.getOffsetX(),l=t.getOffsetY(),c=t.getRotateWithView(),u=t.getRotation();this.text_=t.getText()||"",this.textOffsetX_=void 0===h?0:h,this.textOffsetY_=void 0===l?0:l,this.textRotateWithView_=void 0!==c&&c,this.textRotation_=void 0===u?0:u,this.strokeKey_=s?("string"==typeof s.strokeStyle?s.strokeStyle:M(s.strokeStyle))+s.lineCap+s.lineDashOffset+"|"+s.lineWidth+s.lineJoin+s.miterLimit+"["+s.lineDash.join()+"]":"",this.textKey_=i.font+i.scale+(i.textAlign||"?")+(i.repeat||"?")+(i.justify||"?")+(i.textBaseline||"?"),this.fillKey_=n?"string"==typeof n.fillStyle?n.fillStyle:"|"+M(n.fillStyle):""}else this.text_="";this.declutterImageWithText_=e}}},fo=class{constructor(t,e,i,n){this.tolerance_=t,this.maxExtent_=e,this.pixelRatio_=n,this.resolution_=i,this.buildersByZIndex_={}}finish(){const t={};for(const e in this.buildersByZIndex_){t[e]=t[e]||{};const i=this.buildersByZIndex_[e];for(const n in i){const s=i[n].finish();t[e][n]=s}}return t}getBuilder(t,e){const i=void 0!==t?t.toString():"0";let n=this.buildersByZIndex_[i];void 0===n&&(n={},this.buildersByZIndex_[i]=n);let s=n[e];return void 0===s&&(s=new(0,_o[e])(this.tolerance_,this.maxExtent_,this.resolution_,this.pixelRatio_),n[e]=s),s}},mo=class extends R{constructor(t){super(),this.ready=!0,this.boundHandleImageChange_=this.handleImageChange_.bind(this),this.layer_=t,this.declutterExecutorGroup=null}getFeatures(t){return I()}getData(t){return null}prepareFrame(t){return I()}renderFrame(t,e){return I()}loadedTileCallback(t,e,i){t[e]||(t[e]={}),t[e][i.tileCoord.toString()]=i}createLoadedTileFinder(t,e,i){return(n,s)=>{const r=this.loadedTileCallback.bind(this,i,n);return t.forEachLoadedTile(e,n,s,r)}}forEachFeatureAtCoordinate(t,e,i,n,s){}getLayer(){return this.layer_}handleFontsChanged(){}handleImageChange_(t){const e=t.target;2!==e.getState()&&3!==e.getState()||this.renderIfReadyAndVisible()}loadImage(t){let e=t.getState();return 2!=e&&3!=e&&t.addEventListener(f,this.boundHandleImageChange_),0==e&&(t.load(),e=t.getState()),2==e}renderIfReadyAndVisible(){const t=this.getLayer();t&&t.getVisible()&&"ready"===t.getSourceState()&&t.changed()}disposeInternal(){delete this.layer_,super.disposeInternal()}},po=[];let yo=null;const xo=class extends mo{constructor(t){super(t),this.container=null,this.renderedResolution,this.tempTransform=[1,0,0,1,0,0],this.pixelTransform=[1,0,0,1,0,0],this.inversePixelTransform=[1,0,0,1,0,0],this.context=null,this.containerReused=!1,this.pixelContext_=null,this.frameState=null}getImageData(t,e,i){let n;yo||(yo=on(1,1,void 0,{willReadFrequently:!0})),yo.clearRect(0,0,1,1);try{yo.drawImage(t,e,i,1,1,0,0,1,1),n=yo.getImageData(0,0,1,1).data}catch(t){return yo=null,null}return n}getBackground(t){let e=this.getLayer().getBackground();return"function"==typeof e&&(e=e(t.viewState.resolution)),e||void 0}useContainer(t,e,i){const n=this.getLayer().getClassName();let s,r;if(t&&t.className===n&&(!i||t&&t.style.backgroundColor&&h(jt(t.style.backgroundColor),jt(i)))){const e=t.firstElementChild;e instanceof HTMLCanvasElement&&(r=e.getContext("2d"))}if(r&&r.canvas.style.transform===e?(this.container=t,this.context=r,this.containerReused=!0):this.containerReused?(this.container=null,this.context=null,this.containerReused=!1):this.container&&(this.container.style.backgroundColor=null),!this.container){s=document.createElement("div"),s.className=n;let t=s.style;t.position="absolute",t.width="100%",t.height="100%",r=on();const e=r.canvas;s.appendChild(e),t=e.style,t.position="absolute",t.left="0",t.transformOrigin="top left",this.container=s,this.context=r}this.containerReused||!i||this.container.style.backgroundColor||(this.container.style.backgroundColor=i)}clipUnrotated(t,e,i){const n=Et(i),s=Tt(i),r=pt(i),o=mt(i);q(e.coordinateToPixelTransform,n),q(e.coordinateToPixelTransform,s),q(e.coordinateToPixelTransform,r),q(e.coordinateToPixelTransform,o);const a=this.inversePixelTransform;q(a,n),q(a,s),q(a,r),q(a,o),t.save(),t.beginPath(),t.moveTo(Math.round(n[0]),Math.round(n[1])),t.lineTo(Math.round(s[0]),Math.round(s[1])),t.lineTo(Math.round(r[0]),Math.round(r[1])),t.lineTo(Math.round(o[0]),Math.round(o[1])),t.clip()}dispatchRenderEvent_(t,e,i){const n=this.getLayer();if(n.hasListener(t)){const s=new $i(t,this.inversePixelTransform,i,e);n.dispatchEvent(s)}}preRender(t,e){this.frameState=e,this.dispatchRenderEvent_(se,t,e)}postRender(t,e){this.dispatchRenderEvent_(re,t,e)}getRenderTransform(t,e,i,n,s,r,o){const a=s/2,h=r/2,l=n/e,c=-l,u=-t[0]+o,d=-t[1];return H(this.tempTransform,a,h,l,c,-i,u,d)}disposeInternal(){delete this.frameState,super.disposeInternal()}};function vo(t,e,i,n,s,r,o,a,h,l,c,u){let d=t[e],g=t[e+1],_=0,f=0,m=0,p=0;function y(){_=d,f=g,d=t[e+=n],g=t[e+1],p+=m,m=Math.sqrt((d-_)*(d-_)+(g-f)*(g-f))}do{y()}while(e<i-n&&p+m<r);let x=0===m?0:(r-p)/m;const v=Ot(_,d,x),S=Ot(f,g,x),C=e-n,w=p,E=r+a*h(l,s,c);for(;e<i-n&&p+m<E;)y();x=0===m?0:(E-p)/m;const T=Ot(_,d,x),R=Ot(f,g,x);let I;if(u){const t=[v,S,T,R];fi(t,0,4,2,u,t,t),I=t[0]>t[2]}else I=v>T;const b=Math.PI,M=[],F=C+n===e;let L;if(m=0,p=w,d=t[e=C],g=t[e+1],F){y(),L=Math.atan2(g-f,d-_),I&&(L+=L>0?-b:b);const t=(T+v)/2,e=(R+S)/2;return M[0]=[t,e,(E-r)/2,L,s],M}for(let t=0,u=(s=s.replace(/\n/g," ")).length;t<u;){y();let v=Math.atan2(g-f,d-_);if(I&&(v+=v>0?-b:b),void 0!==L){let t=v-L;if(t+=t>b?-2*b:t<-b?2*b:0,Math.abs(t)>o)return null}L=v;const S=t;let C=0;for(;t<u;++t){const o=a*h(l,s[I?u-t-1:t],c);if(e+n<i&&p+m<r+C+o/2)break;C+=o}if(t===S)continue;const w=I?s.substring(u-S,u-t):s.substring(S,t);x=0===m?0:(r+C/2-p)/m;const E=Ot(_,d,x),T=Ot(f,g,x);M.push([E,T,C/2,v,w]),r+=C}return M}function So(t,e,i,n){let s=t[e],r=t[e+1],o=0;for(let a=e+n;a<i;a+=n){const e=t[a],i=t[a+1];o+=Math.sqrt((e-s)*(e-s)+(i-r)*(i-r)),s=e,r=i}return o}const Co=[1/0,1/0,-1/0,-1/0],wo=[],Eo=[],To=[],Ro=[];function Io(t){return t[3].declutterBox}const bo=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 Mo(t,e){return"start"===e?e=bo.test(t)?"right":"left":"end"===e&&(e=bo.test(t)?"left":"right"),go[e]}function Fo(t,e,i){return i>0&&t.push("\n",""),t.push(e,""),t}const Lo=class{constructor(t,e,i,n){this.overlaps=i,this.pixelRatio=e,this.resolution=t,this.alignFill_,this.instructions=n.instructions,this.coordinates=n.coordinates,this.coordinateCache_={},this.renderedTransform_=[1,0,0,1,0,0],this.hitDetectionInstructions=n.hitDetectionInstructions,this.pixelCoordinates_=null,this.viewRotation_=0,this.fillStates=n.fillStates||{},this.strokeStates=n.strokeStates||{},this.textStates=n.textStates||{},this.widths_={},this.labels_={}}createLabel(t,e,i,n){const s=t+e+i+n;if(this.labels_[s])return this.labels_[s];const r=n?this.strokeStates[n]:null,o=i?this.fillStates[i]:null,a=this.textStates[e],h=this.pixelRatio,l=[a.scale[0]*h,a.scale[1]*h],c=Array.isArray(t),u=a.justify?go[a.justify]:Mo(Array.isArray(t)?t[0]:t,a.textAlign||mn),d=n&&r.lineWidth?r.lineWidth:0,g=c?t:t.split("\n").reduce(Fo,[]),{width:_,height:f,widths:m,heights:p,lineWidths:y}=function(t,e){const i=[],n=[],s=[];let r=0,o=0,a=0,h=0;for(let l=0,c=e.length;l<=c;l+=2){const u=e[l];if("\n"===u||l===c){r=Math.max(r,o),s.push(o),o=0,a+=h;continue}const d=e[l+1]||t.font,g=Rn(d,u);i.push(g),o+=g;const _=En(d);n.push(_),h=Math.max(h,_)}return{width:r,height:a,widths:i,heights:n,lineWidths:s}}(a,g),x=_+d,v=[],S=(x+2)*l[0],C=(f+d)*l[1],w={width:S<0?Math.floor(S):Math.ceil(S),height:C<0?Math.floor(C):Math.ceil(C),contextInstructions:v};1==l[0]&&1==l[1]||v.push("scale",l),n&&(v.push("strokeStyle",r.strokeStyle),v.push("lineWidth",d),v.push("lineCap",r.lineCap),v.push("lineJoin",r.lineJoin),v.push("miterLimit",r.miterLimit),v.push("setLineDash",[r.lineDash]),v.push("lineDashOffset",r.lineDashOffset)),i&&v.push("fillStyle",o.fillStyle),v.push("textBaseline","middle"),v.push("textAlign","center");const E=.5-u;let T=u*x+E*d;const R=[],I=[];let b,M=0,F=0,L=0,P=0;for(let t=0,e=g.length;t<e;t+=2){const e=g[t];if("\n"===e){F+=M,M=0,T=u*x+E*d,++P;continue}const s=g[t+1]||a.font;s!==b&&(n&&R.push("font",s),i&&I.push("font",s),b=s),M=Math.max(M,p[L]);const r=[e,T+E*m[L]+u*(m[L]-y[P]),.5*(d+M)+F];T+=m[L],n&&R.push("strokeText",r),i&&I.push("fillText",r),++L}return Array.prototype.push.apply(v,R),Array.prototype.push.apply(v,I),this.labels_[s]=w,w}replayTextBackground_(t,e,i,n,s,r,o){t.beginPath(),t.moveTo.apply(t,e),t.lineTo.apply(t,i),t.lineTo.apply(t,n),t.lineTo.apply(t,s),t.lineTo.apply(t,e),r&&(this.alignFill_=r[2],this.fill_(t)),o&&(this.setStrokeStyle_(t,o),t.stroke())}calculateImageOrLabelDimensions_(t,e,i,n,s,r,o,a,h,l,c,u,d,g,_,f){let m=i-(o*=u[0]),p=n-(a*=u[1]);const y=s+h>t?t-h:s,x=r+l>e?e-l:r,v=g[3]+y*u[0]+g[1],S=g[0]+x*u[1]+g[2],C=m-g[3],w=p-g[0];let E;return(_||0!==c)&&(wo[0]=C,Ro[0]=C,wo[1]=w,Eo[1]=w,Eo[0]=C+v,To[0]=Eo[0],To[1]=w+S,Ro[1]=To[1]),0!==c?(E=H([1,0,0,1,0,0],i,n,1,1,c,-i,-n),q(E,wo),q(E,Eo),q(E,To),q(E,Ro),ht(Math.min(wo[0],Eo[0],To[0],Ro[0]),Math.min(wo[1],Eo[1],To[1],Ro[1]),Math.max(wo[0],Eo[0],To[0],Ro[0]),Math.max(wo[1],Eo[1],To[1],Ro[1]),Co)):ht(Math.min(C,C+v),Math.min(w,w+S),Math.max(C,C+v),Math.max(w,w+S),Co),d&&(m=Math.round(m),p=Math.round(p)),{drawImageX:m,drawImageY:p,drawImageW:y,drawImageH:x,originX:h,originY:l,declutterBox:{minX:Co[0],minY:Co[1],maxX:Co[2],maxY:Co[3],value:f},canvasTransform:E,scale:u}}replayImageOrLabel_(t,e,i,n,s,r,o){const a=!(!r&&!o),h=n.declutterBox,l=t.canvas,c=o?o[2]*n.scale[0]/2:0;return h.minX-c<=l.width/e&&h.maxX+c>=0&&h.minY-c<=l.height/e&&h.maxY+c>=0&&(a&&this.replayTextBackground_(t,wo,Eo,To,Ro,r,o),function(t,e,i,n,s,r,o,a,h,l,c){t.save(),1!==i&&(t.globalAlpha*=i),e&&t.setTransform.apply(t,e),n.contextInstructions?(t.translate(h,l),t.scale(c[0],c[1]),function(t,e){const i=t.contextInstructions;for(let t=0,n=i.length;t<n;t+=2)Array.isArray(i[t+1])?e[i[t]].apply(e,i[t+1]):e[i[t]]=i[t+1]}(n,t)):c[0]<0||c[1]<0?(t.translate(h,l),t.scale(c[0],c[1]),t.drawImage(n,s,r,o,a,0,0,o,a)):t.drawImage(n,s,r,o,a,h,l,o*c[0],a*c[1]),t.restore()}(t,n.canvasTransform,s,i,n.originX,n.originY,n.drawImageW,n.drawImageH,n.drawImageX,n.drawImageY,n.scale)),!0}fill_(t){if(this.alignFill_){const e=q(this.renderedTransform_,[0,0]),i=512*this.pixelRatio;t.save(),t.translate(e[0]%i,e[1]%i),t.rotate(this.viewRotation_)}t.fill(),this.alignFill_&&t.restore()}setStrokeStyle_(t,e){t.strokeStyle=e[1],t.lineWidth=e[2],t.lineCap=e[3],t.lineJoin=e[4],t.miterLimit=e[5],t.lineDashOffset=e[7],t.setLineDash(e[6])}drawLabelWithPointPlacement_(t,e,i,n){const s=this.textStates[e],r=this.createLabel(t,e,n,i),o=this.strokeStates[i],a=this.pixelRatio,h=Mo(Array.isArray(t)?t[0]:t,s.textAlign||mn),l=go[s.textBaseline||pn],c=o&&o.lineWidth?o.lineWidth:0;return{label:r,anchorX:h*(r.width/a-2*s.scale[0])+2*(.5-h)*c,anchorY:l*r.height/a+2*(.5-l)*c}}execute_(t,e,i,n,s,r,o,a){let l;var c,u;this.pixelCoordinates_&&h(i,this.renderedTransform_)?l=this.pixelCoordinates_:(this.pixelCoordinates_||(this.pixelCoordinates_=[]),l=_i(this.coordinates,0,this.coordinates.length,2,i,this.pixelCoordinates_),u=i,(c=this.renderedTransform_)[0]=u[0],c[1]=u[1],c[2]=u[2],c[3]=u[3],c[4]=u[4],c[5]=u[5]);let d=0;const g=n.length;let _,f,m,p,y,x,v,S,C,w,E,T,R=0,I=0,b=0,M=null,F=null;const L=this.coordinateCache_,P=this.viewRotation_,k=Math.round(1e12*Math.atan2(-i[1],i[0]))/1e12,A={context:t,pixelRatio:this.pixelRatio,resolution:this.resolution,rotation:P},O=this.instructions!=n||this.overlaps?0:200;let D,z,G,W;for(;d<g;){const i=n[d];switch(i[0]){case oo.BEGIN_GEOMETRY:D=i[1],W=i[3],D.getGeometry()?void 0===o||It(o,W.getExtent())?++d:d=i[2]+1:d=i[2];break;case oo.BEGIN_PATH:I>O&&(this.fill_(t),I=0),b>O&&(t.stroke(),b=0),I||b||(t.beginPath(),p=NaN,y=NaN),++d;break;case oo.CIRCLE:R=i[1];const n=l[R],h=l[R+1],c=l[R+2]-n,u=l[R+3]-h,g=Math.sqrt(c*c+u*u);t.moveTo(n+g,h),t.arc(n,h,g,0,2*Math.PI,!0),++d;break;case oo.CLOSE_PATH:t.closePath(),++d;break;case oo.CUSTOM:R=i[1],_=i[2];const X=i[3],N=i[4],Y=6==i.length?i[5]:void 0;A.geometry=X,A.feature=D,d in L||(L[d]=[]);const j=L[d];Y?Y(l,R,_,2,j):(j[0]=l[R],j[1]=l[R+1],j.length=2),N(j,A),++d;break;case oo.DRAW_IMAGE:R=i[1],_=i[2],S=i[3],f=i[4],m=i[5];let B=i[6];const K=i[7],Z=i[8],V=i[9],U=i[10];let q=i[11];const H=i[12];let J=i[13];const Q=i[14],$=i[15];if(!S&&i.length>=20){C=i[19],w=i[20],E=i[21],T=i[22];const t=this.drawLabelWithPointPlacement_(C,w,E,T);S=t.label,i[3]=S;const e=i[23];f=(t.anchorX-e)*this.pixelRatio,i[4]=f;const n=i[24];m=(t.anchorY-n)*this.pixelRatio,i[5]=m,B=S.height,i[6]=B,J=S.width,i[13]=J}let tt,et,it,nt;i.length>25&&(tt=i[25]),i.length>17?(et=i[16],it=i[17],nt=i[18]):(et=yn,it=!1,nt=!1),U&&k?q+=P:U||k||(q-=P);let st=0;for(;R<_;R+=2){if(tt&&tt[st++]<J/this.pixelRatio)continue;const i=this.calculateImageOrLabelDimensions_(S.width,S.height,l[R],l[R+1],J,B,f,m,Z,V,q,H,s,et,it||nt,D),n=[t,e,S,i,K,it?M:null,nt?F:null];if(a){if("none"===Q)continue;if("obstacle"===Q){a.insert(i.declutterBox);continue}{let t,e;if($){const i=_-R;if(!$[i]){$[i]=n;continue}if(t=$[i],delete $[i],e=Io(t),a.collides(e))continue}if(a.collides(i.declutterBox))continue;t&&(a.insert(e),this.replayImageOrLabel_.apply(this,t)),a.insert(i.declutterBox)}}this.replayImageOrLabel_.apply(this,n)}++d;break;case oo.DRAW_CHARS:const rt=i[1],ot=i[2],at=i[3],ht=i[4];T=i[5];const lt=i[6],ct=i[7],ut=i[8];E=i[9];const dt=i[10];C=i[11],w=i[12];const gt=[i[13],i[13]],_t=this.textStates[w],ft=_t.font,mt=[_t.scale[0]*ct,_t.scale[1]*ct];let pt;ft in this.widths_?pt=this.widths_[ft]:(pt={},this.widths_[ft]=pt);const yt=So(l,rt,ot,2),xt=Math.abs(mt[0])*In(ft,C,pt);if(ht||xt<=yt){const i=vo(l,rt,ot,2,C,(yt-xt)*Mo(C,this.textStates[w].textAlign),lt,Math.abs(mt[0]),In,ft,pt,k?0:this.viewRotation_);t:if(i){const n=[];let s,r,o,h,l;if(E)for(s=0,r=i.length;s<r;++s){l=i[s],o=l[4],h=this.createLabel(o,w,"",E),f=l[2]+(mt[0]<0?-dt:dt),m=at*h.height+2*(.5-at)*dt*mt[1]/mt[0]-ut;const r=this.calculateImageOrLabelDimensions_(h.width,h.height,l[0],l[1],h.width,h.height,f,m,0,0,l[3],gt,!1,yn,!1,D);if(a&&a.collides(r.declutterBox))break t;n.push([t,e,h,r,1,null,null])}if(T)for(s=0,r=i.length;s<r;++s){l=i[s],o=l[4],h=this.createLabel(o,w,T,""),f=l[2],m=at*h.height-ut;const r=this.calculateImageOrLabelDimensions_(h.width,h.height,l[0],l[1],h.width,h.height,f,m,0,0,l[3],gt,!1,yn,!1,D);if(a&&a.collides(r.declutterBox))break t;n.push([t,e,h,r,1,null,null])}a&&a.load(n.map(Io));for(let t=0,e=n.length;t<e;++t)this.replayImageOrLabel_.apply(this,n[t])}}++d;break;case oo.END_GEOMETRY:if(void 0!==r){D=i[1];const t=r(D,W);if(t)return t}++d;break;case oo.FILL:O?I++:this.fill_(t),++d;break;case oo.MOVE_TO_LINE_TO:for(R=i[1],_=i[2],z=l[R],G=l[R+1],x=z+.5|0,v=G+.5|0,x===p&&v===y||(t.moveTo(z,G),p=x,y=v),R+=2;R<_;R+=2)z=l[R],G=l[R+1],x=z+.5|0,v=G+.5|0,R!=_-2&&x===p&&v===y||(t.lineTo(z,G),p=x,y=v);++d;break;case oo.SET_FILL_STYLE:M=i,this.alignFill_=i[2],I&&(this.fill_(t),I=0,b&&(t.stroke(),b=0)),t.fillStyle=i[1],++d;break;case oo.SET_STROKE_STYLE:F=i,b&&(t.stroke(),b=0),this.setStrokeStyle_(t,i),++d;break;case oo.STROKE:O?b++:t.stroke(),++d;break;default:++d}}I&&this.fill_(t),b&&t.stroke()}execute(t,e,i,n,s,r){this.viewRotation_=n,this.execute_(t,e,i,this.instructions,s,void 0,void 0,r)}executeHitDetection(t,e,i,n,s){return this.viewRotation_=i,this.execute_(t,1,e,this.hitDetectionInstructions,!0,n,s)}},Po=["Polygon","Circle","LineString","Image","Text","Default"],ko={},Ao=class{constructor(t,e,i,n,s,r){this.maxExtent_=t,this.overlaps_=n,this.pixelRatio_=i,this.resolution_=e,this.renderBuffer_=r,this.executorsByZIndex_={},this.hitDetectionContext_=null,this.hitDetectionTransform_=[1,0,0,1,0,0],this.createExecutors_(s)}clip(t,e){const i=this.getClipCoords(e);t.beginPath(),t.moveTo(i[0],i[1]),t.lineTo(i[2],i[3]),t.lineTo(i[4],i[5]),t.lineTo(i[6],i[7]),t.clip()}createExecutors_(t){for(const e in t){let i=this.executorsByZIndex_[e];void 0===i&&(i={},this.executorsByZIndex_[e]=i);const n=t[e];for(const t in n){const e=n[t];i[t]=new Lo(this.resolution_,this.pixelRatio_,this.overlaps_,e)}}}hasExecutors(t){for(const e in this.executorsByZIndex_){const i=this.executorsByZIndex_[e];for(let e=0,n=t.length;e<n;++e)if(t[e]in i)return!0}return!1}forEachFeatureAtCoordinate(t,e,i,n,r,o){const a=2*(n=Math.round(n))+1,h=H(this.hitDetectionTransform_,n+.5,n+.5,1/e,-1/e,-i,-t[0],-t[1]),l=!this.hitDetectionContext_;l&&(this.hitDetectionContext_=on(a,a,void 0,{willReadFrequently:!0}));const c=this.hitDetectionContext_;let u;c.canvas.width!==a||c.canvas.height!==a?(c.canvas.width=a,c.canvas.height=a):l||c.clearRect(0,0,a,a),void 0!==this.renderBuffer_&&(u=[1/0,1/0,-1/0,-1/0],ut(u,t),et(u,e*(this.renderBuffer_+n),u));const d=function(t){if(void 0!==ko[t])return ko[t];const e=2*t+1,i=t*t,n=new Array(i+1);for(let s=0;s<=t;++s)for(let r=0;r<=t;++r){const o=s*s+r*r;if(o>i)break;let a=n[o];a||(a=[],n[o]=a),a.push(4*((t+s)*e+(t+r))+3),s>0&&a.push(4*((t-s)*e+(t+r))+3),r>0&&(a.push(4*((t+s)*e+(t-r))+3),s>0&&a.push(4*((t-s)*e+(t-r))+3))}const s=[];for(let t=0,e=n.length;t<e;++t)n[t]&&s.push(...n[t]);return ko[t]=s,s}(n);let g;function _(t,e){const i=c.getImageData(0,0,a,a).data;for(let s=0,h=d.length;s<h;s++)if(i[d[s]]>0){if(!o||"Image"!==g&&"Text"!==g||o.includes(t)){const i=(d[s]-3)/4,o=n-i%a,h=n-(i/a|0),l=r(t,e,o*o+h*h);if(l)return l}c.clearRect(0,0,a,a);break}}const f=Object.keys(this.executorsByZIndex_).map(Number);let m,p,y,x,v;for(f.sort(s),m=f.length-1;m>=0;--m){const t=f[m].toString();for(y=this.executorsByZIndex_[t],p=Po.length-1;p>=0;--p)if(g=Po[p],x=y[g],void 0!==x&&(v=x.executeHitDetection(c,h,i,_,u),v))return v}}getClipCoords(t){const e=this.maxExtent_;if(!e)return null;const i=e[0],n=e[1],s=e[2],r=e[3],o=[i,n,i,r,s,r,s,n];return _i(o,0,8,2,t,o),o}isEmpty(){return g(this.executorsByZIndex_)}execute(t,e,i,n,r,o,a){const h=Object.keys(this.executorsByZIndex_).map(Number);let l,c,u,d,g,_;for(h.sort(s),this.maxExtent_&&(t.save(),this.clip(t,i)),o=o||Po,a&&h.reverse(),l=0,c=h.length;l<c;++l){const s=h[l].toString();for(g=this.executorsByZIndex_[s],u=0,d=o.length;u<d;++u)_=g[o[u]],void 0!==_&&_.execute(t,e,i,n,r,a)}this.maxExtent_&&t.restore()}},Oo=class extends ao{constructor(t,e,i,n,s,r,o){super(),this.context_=t,this.pixelRatio_=e,this.extent_=i,this.transform_=n,this.transformRotation_=n?Dt(Math.atan2(n[1],n[0]),10):0,this.viewRotation_=s,this.squaredTolerance_=r,this.userTransform_=o,this.contextFillState_=null,this.contextStrokeState_=null,this.contextTextState_=null,this.fillState_=null,this.strokeState_=null,this.image_=null,this.imageAnchorX_=0,this.imageAnchorY_=0,this.imageHeight_=0,this.imageOpacity_=0,this.imageOriginX_=0,this.imageOriginY_=0,this.imageRotateWithView_=!1,this.imageRotation_=0,this.imageScale_=[0,0],this.imageWidth_=0,this.text_="",this.textOffsetX_=0,this.textOffsetY_=0,this.textRotateWithView_=!1,this.textRotation_=0,this.textScale_=[0,0],this.textFillState_=null,this.textStrokeState_=null,this.textState_=null,this.pixelCoordinates_=[],this.tmpLocalTransform_=[1,0,0,1,0,0]}drawImages_(t,e,i,n){if(!this.image_)return;const s=_i(t,e,i,n,this.transform_,this.pixelCoordinates_),r=this.context_,o=this.tmpLocalTransform_,a=r.globalAlpha;1!=this.imageOpacity_&&(r.globalAlpha=a*this.imageOpacity_);let h=this.imageRotation_;0===this.transformRotation_&&(h-=this.viewRotation_),this.imageRotateWithView_&&(h+=this.viewRotation_);for(let t=0,e=s.length;t<e;t+=2){const e=s[t]-this.imageAnchorX_,i=s[t+1]-this.imageAnchorY_;if(0!==h||1!=this.imageScale_[0]||1!=this.imageScale_[1]){const t=e+this.imageAnchorX_,n=i+this.imageAnchorY_;H(o,t,n,1,1,h,-t,-n),r.setTransform.apply(r,o),r.translate(t,n),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_,e,i,this.imageWidth_,this.imageHeight_)}1!=this.imageOpacity_&&(r.globalAlpha=a)}drawText_(t,e,i,n){if(!this.textState_||""===this.text_)return;this.textFillState_&&this.setContextFillState_(this.textFillState_),this.textStrokeState_&&this.setContextStrokeState_(this.textStrokeState_),this.setContextTextState_(this.textState_);const s=_i(t,e,i,n,this.transform_,this.pixelCoordinates_),r=this.context_;let o=this.textRotation_;for(0===this.transformRotation_&&(o-=this.viewRotation_),this.textRotateWithView_&&(o+=this.viewRotation_);e<i;e+=n){const t=s[e]+this.textOffsetX_,i=s[e+1]+this.textOffsetY_;0!==o||1!=this.textScale_[0]||1!=this.textScale_[1]?(r.translate(t-this.textOffsetX_,i-this.textOffsetY_),r.rotate(o),r.translate(this.textOffsetX_,this.textOffsetY_),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)):(this.textStrokeState_&&r.strokeText(this.text_,t,i),this.textFillState_&&r.fillText(this.text_,t,i))}}moveToLineTo_(t,e,i,n,s){const r=this.context_,o=_i(t,e,i,n,this.transform_,this.pixelCoordinates_);r.moveTo(o[0],o[1]);let a=o.length;s&&(a-=2);for(let t=2;t<a;t+=2)r.lineTo(o[t],o[t+1]);return s&&r.closePath(),i}drawRings_(t,e,i,n){for(let s=0,r=i.length;s<r;++s)e=this.moveToLineTo_(t,e,i[s],n,!0);return e}drawCircle(t){if(this.squaredTolerance_&&(t=t.simplifyTransformed(this.squaredTolerance_,this.userTransform_)),It(this.extent_,t.getExtent())){if(this.fillState_||this.strokeState_){this.fillState_&&this.setContextFillState_(this.fillState_),this.strokeState_&&this.setContextStrokeState_(this.strokeState_);const e=function(t,e,i){const n=t.getFlatCoordinates();if(!n)return null;const s=t.getStride();return _i(n,0,n.length,s,e,i)}(t,this.transform_,this.pixelCoordinates_),i=e[2]-e[0],n=e[3]-e[1],s=Math.sqrt(i*i+n*n),r=this.context_;r.beginPath(),r.arc(e[0],e[1],s,0,2*Math.PI),this.fillState_&&r.fill(),this.strokeState_&&r.stroke()}""!==this.text_&&this.drawText_(t.getCenter(),0,2,2)}}setStyle(t){this.setFillStrokeStyle(t.getFill(),t.getStroke()),this.setImageStyle(t.getImage()),this.setTextStyle(t.getText())}setTransform(t){this.transform_=t}drawGeometry(t){switch(t.getType()){case"Point":this.drawPoint(t);break;case"LineString":this.drawLineString(t);break;case"Polygon":this.drawPolygon(t);break;case"MultiPoint":this.drawMultiPoint(t);break;case"MultiLineString":this.drawMultiLineString(t);break;case"MultiPolygon":this.drawMultiPolygon(t);break;case"GeometryCollection":this.drawGeometryCollection(t);break;case"Circle":this.drawCircle(t)}}drawFeature(t,e){const i=e.getGeometryFunction()(t);i&&(this.setStyle(e),this.drawGeometry(i))}drawGeometryCollection(t){const e=t.getGeometriesArray();for(let t=0,i=e.length;t<i;++t)this.drawGeometry(e[t])}drawPoint(t){this.squaredTolerance_&&(t=t.simplifyTransformed(this.squaredTolerance_,this.userTransform_));const e=t.getFlatCoordinates(),i=t.getStride();this.image_&&this.drawImages_(e,0,e.length,i),""!==this.text_&&this.drawText_(e,0,e.length,i)}drawMultiPoint(t){this.squaredTolerance_&&(t=t.simplifyTransformed(this.squaredTolerance_,this.userTransform_));const e=t.getFlatCoordinates(),i=t.getStride();this.image_&&this.drawImages_(e,0,e.length,i),""!==this.text_&&this.drawText_(e,0,e.length,i)}drawLineString(t){if(this.squaredTolerance_&&(t=t.simplifyTransformed(this.squaredTolerance_,this.userTransform_)),It(this.extent_,t.getExtent())){if(this.strokeState_){this.setContextStrokeState_(this.strokeState_);const e=this.context_,i=t.getFlatCoordinates();e.beginPath(),this.moveToLineTo_(i,0,i.length,t.getStride(),!1),e.stroke()}if(""!==this.text_){const e=t.getFlatMidpoint();this.drawText_(e,0,2,2)}}}drawMultiLineString(t){this.squaredTolerance_&&(t=t.simplifyTransformed(this.squaredTolerance_,this.userTransform_));const e=t.getExtent();if(It(this.extent_,e)){if(this.strokeState_){this.setContextStrokeState_(this.strokeState_);const e=this.context_,i=t.getFlatCoordinates();let n=0;const s=t.getEnds(),r=t.getStride();e.beginPath();for(let t=0,e=s.length;t<e;++t)n=this.moveToLineTo_(i,n,s[t],r,!1);e.stroke()}if(""!==this.text_){const e=t.getFlatMidpoints();this.drawText_(e,0,e.length,2)}}}drawPolygon(t){if(this.squaredTolerance_&&(t=t.simplifyTransformed(this.squaredTolerance_,this.userTransform_)),It(this.extent_,t.getExtent())){if(this.strokeState_||this.fillState_){this.fillState_&&this.setContextFillState_(this.fillState_),this.strokeState_&&this.setContextStrokeState_(this.strokeState_);const 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_){const e=t.getFlatInteriorPoint();this.drawText_(e,0,2,2)}}}drawMultiPolygon(t){if(this.squaredTolerance_&&(t=t.simplifyTransformed(this.squaredTolerance_,this.userTransform_)),It(this.extent_,t.getExtent())){if(this.strokeState_||this.fillState_){this.fillState_&&this.setContextFillState_(this.fillState_),this.strokeState_&&this.setContextStrokeState_(this.strokeState_);const e=this.context_,i=t.getOrientedFlatCoordinates();let n=0;const s=t.getEndss(),r=t.getStride();e.beginPath();for(let t=0,e=s.length;t<e;++t){const e=s[t];n=this.drawRings_(i,n,e,r)}this.fillState_&&e.fill(),this.strokeState_&&e.stroke()}if(""!==this.text_){const e=t.getFlatInteriorPoints();this.drawText_(e,0,e.length,2)}}}setContextFillState_(t){const e=this.context_,i=this.contextFillState_;i?i.fillStyle!=t.fillStyle&&(i.fillStyle=t.fillStyle,e.fillStyle=t.fillStyle):(e.fillStyle=t.fillStyle,this.contextFillState_={fillStyle:t.fillStyle})}setContextStrokeState_(t){const e=this.context_,i=this.contextStrokeState_;i?(i.lineCap!=t.lineCap&&(i.lineCap=t.lineCap,e.lineCap=t.lineCap),h(i.lineDash,t.lineDash)||e.setLineDash(i.lineDash=t.lineDash),i.lineDashOffset!=t.lineDashOffset&&(i.lineDashOffset=t.lineDashOffset,e.lineDashOffset=t.lineDashOffset),i.lineJoin!=t.lineJoin&&(i.lineJoin=t.lineJoin,e.lineJoin=t.lineJoin),i.lineWidth!=t.lineWidth&&(i.lineWidth=t.lineWidth,e.lineWidth=t.lineWidth),i.miterLimit!=t.miterLimit&&(i.miterLimit=t.miterLimit,e.miterLimit=t.miterLimit),i.strokeStyle!=t.strokeStyle&&(i.strokeStyle=t.strokeStyle,e.strokeStyle=t.strokeStyle)):(e.lineCap=t.lineCap,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})}setContextTextState_(t){const e=this.context_,i=this.contextTextState_,n=t.textAlign?t.textAlign:mn;i?(i.font!=t.font&&(i.font=t.font,e.font=t.font),i.textAlign!=n&&(i.textAlign=n,e.textAlign=n),i.textBaseline!=t.textBaseline&&(i.textBaseline=t.textBaseline,e.textBaseline=t.textBaseline)):(e.font=t.font,e.textAlign=n,e.textBaseline=t.textBaseline,this.contextTextState_={font:t.font,textAlign:n,textBaseline:t.textBaseline})}setFillStrokeStyle(t,e){if(t){const e=t.getColor();this.fillState_={fillStyle:Ir(e||un)}}else this.fillState_=null;if(e){const t=e.getColor(),i=e.getLineCap(),n=e.getLineDash(),s=e.getLineDashOffset(),r=e.getLineJoin(),o=e.getWidth(),a=e.getMiterLimit(),h=n||gn;this.strokeState_={lineCap:void 0!==i?i:dn,lineDash:1===this.pixelRatio_?h:h.map((t=>t*this.pixelRatio_)),lineDashOffset:(s||0)*this.pixelRatio_,lineJoin:void 0!==r?r:_n,lineWidth:(void 0!==o?o:1)*this.pixelRatio_,miterLimit:void 0!==a?a:10,strokeStyle:Ir(t||fn)}}else this.strokeState_=null}setImageStyle(t){let e;if(!t||!(e=t.getSize()))return void(this.image_=null);const i=t.getPixelRatio(this.pixelRatio_),n=t.getAnchor(),s=t.getOrigin();this.image_=t.getImage(this.pixelRatio_),this.imageAnchorX_=n[0]*i,this.imageAnchorY_=n[1]*i,this.imageHeight_=e[1]*i,this.imageOpacity_=t.getOpacity(),this.imageOriginX_=s[0],this.imageOriginY_=s[1],this.imageRotateWithView_=t.getRotateWithView(),this.imageRotation_=t.getRotation();const r=t.getScaleArray();this.imageScale_=[r[0]*this.pixelRatio_/i,r[1]*this.pixelRatio_/i],this.imageWidth_=e[0]*i}setTextStyle(t){if(t){const e=t.getFill();if(e){const t=e.getColor();this.textFillState_={fillStyle:Ir(t||un)}}else this.textFillState_=null;const i=t.getStroke();if(i){const t=i.getColor(),e=i.getLineCap(),n=i.getLineDash(),s=i.getLineDashOffset(),r=i.getLineJoin(),o=i.getWidth(),a=i.getMiterLimit();this.textStrokeState_={lineCap:void 0!==e?e:dn,lineDash:n||gn,lineDashOffset:s||0,lineJoin:void 0!==r?r:_n,lineWidth:void 0!==o?o:1,miterLimit:void 0!==a?a:10,strokeStyle:Ir(t||fn)}}else this.textStrokeState_=null;const n=t.getFont(),s=t.getOffsetX(),r=t.getOffsetY(),o=t.getRotateWithView(),a=t.getRotation(),h=t.getScaleArray(),l=t.getText(),c=t.getTextAlign(),u=t.getTextBaseline();this.textState_={font:void 0!==n?n:cn,textAlign:void 0!==c?c:mn,textBaseline:void 0!==u?u:pn},this.text_=void 0!==l?Array.isArray(l)?l.reduce(((t,e,i)=>t+(i%2?" ":e)),""):l:"",this.textOffsetX_=void 0!==s?this.pixelRatio_*s:0,this.textOffsetY_=void 0!==r?this.pixelRatio_*r:0,this.textRotateWithView_=void 0!==o&&o,this.textRotation_=void 0!==a?a:0,this.textScale_=[this.pixelRatio_*h[0],this.pixelRatio_*h[1]]}else this.text_=""}},Do=.5,zo={Point:function(t,e,i,n,s){const r=i.getImage(),o=i.getText();let a;if(r){if(2!=r.getImageState())return;let h=t;if(s){const l=r.getDeclutterMode();if("none"!==l)if(h=s,"obstacle"===l){const s=t.getBuilder(i.getZIndex(),"Image");s.setImageStyle(r,a),s.drawPoint(e,n)}else o&&o.getText()&&(a={})}const l=h.getBuilder(i.getZIndex(),"Image");l.setImageStyle(r,a),l.drawPoint(e,n)}if(o&&o.getText()){let r=t;s&&(r=s);const h=r.getBuilder(i.getZIndex(),"Text");h.setTextStyle(o,a),h.drawText(e,n)}},LineString:function(t,e,i,n,s){const r=i.getStroke();if(r){const s=t.getBuilder(i.getZIndex(),"LineString");s.setFillStrokeStyle(null,r),s.drawLineString(e,n)}const o=i.getText();if(o&&o.getText()){const r=(s||t).getBuilder(i.getZIndex(),"Text");r.setTextStyle(o),r.drawText(e,n)}},Polygon:function(t,e,i,n,s){const r=i.getFill(),o=i.getStroke();if(r||o){const s=t.getBuilder(i.getZIndex(),"Polygon");s.setFillStrokeStyle(r,o),s.drawPolygon(e,n)}const a=i.getText();if(a&&a.getText()){const r=(s||t).getBuilder(i.getZIndex(),"Text");r.setTextStyle(a),r.drawText(e,n)}},MultiPoint:function(t,e,i,n,s){const r=i.getImage(),o=i.getText();let a;if(r){if(2!=r.getImageState())return;let h=t;if(s){const l=r.getDeclutterMode();if("none"!==l)if(h=s,"obstacle"===l){const s=t.getBuilder(i.getZIndex(),"Image");s.setImageStyle(r,a),s.drawMultiPoint(e,n)}else o&&o.getText()&&(a={})}const l=h.getBuilder(i.getZIndex(),"Image");l.setImageStyle(r,a),l.drawMultiPoint(e,n)}if(o&&o.getText()){let r=t;s&&(r=s);const h=r.getBuilder(i.getZIndex(),"Text");h.setTextStyle(o,a),h.drawText(e,n)}},MultiLineString:function(t,e,i,n,s){const r=i.getStroke();if(r){const s=t.getBuilder(i.getZIndex(),"LineString");s.setFillStrokeStyle(null,r),s.drawMultiLineString(e,n)}const o=i.getText();if(o&&o.getText()){const r=(s||t).getBuilder(i.getZIndex(),"Text");r.setTextStyle(o),r.drawText(e,n)}},MultiPolygon:function(t,e,i,n,s){const r=i.getFill(),o=i.getStroke();if(o||r){const s=t.getBuilder(i.getZIndex(),"Polygon");s.setFillStrokeStyle(r,o),s.drawMultiPolygon(e,n)}const a=i.getText();if(a&&a.getText()){const r=(s||t).getBuilder(i.getZIndex(),"Text");r.setTextStyle(a),r.drawText(e,n)}},GeometryCollection:function(t,e,i,n,s){const r=e.getGeometriesArray();let o,a;for(o=0,a=r.length;o<a;++o)(0,zo[r[o].getType()])(t,r[o],i,n,s)},Circle:function(t,e,i,n,s){const r=i.getFill(),o=i.getStroke();if(r||o){const s=t.getBuilder(i.getZIndex(),"Circle");s.setFillStrokeStyle(r,o),s.drawCircle(e,n)}const a=i.getText();if(a&&a.getText()){const r=(s||t).getBuilder(i.getZIndex(),"Text");r.setTextStyle(a),r.drawText(e,n)}}};function Go(t,e){return parseInt(M(t),10)-parseInt(M(e),10)}function Wo(t,e){return.5*t/e}function Xo(t,e,i,n,s,r,o){let a=!1;const h=i.getImage();if(h){const t=h.getImageState();2==t||3==t?h.unlistenImageChange(s):(0==t&&h.load(),h.listenImageChange(s),a=!0)}return function(t,e,i,n,s,r){const o=i.getGeometryFunction()(e);if(!o)return;const a=o.simplifyTransformed(n,s);i.getRenderer()?No(t,a,i,e):(0,zo[a.getType()])(t,a,i,e,r)}(t,e,i,n,r,o),a}function No(t,e,i,n){if("GeometryCollection"!=e.getType())t.getBuilder(i.getZIndex(),"Default").drawCustom(e,n,i.getRenderer(),i.getHitDetectionRenderer());else{const s=e.getGeometries();for(let e=0,r=s.length;e<r;++e)No(t,s[e],i,n)}}const Yo=class extends xo{constructor(t){super(t),this.boundHandleStyleImageChange_=this.handleStyleImageChange_.bind(this),this.animatingOrInteracting_,this.hitDetectionImageData_=null,this.renderedFeatures_=null,this.renderedRevision_=-1,this.renderedResolution_=NaN,this.renderedExtent_=[1/0,1/0,-1/0,-1/0],this.wrappedRenderedExtent_=[1/0,1/0,-1/0,-1/0],this.renderedRotation_,this.renderedCenter_=null,this.renderedProjection_=null,this.renderedRenderOrder_=null,this.replayGroup_=null,this.replayGroupChanged=!0,this.declutterExecutorGroup=null,this.clipping=!0,this.compositionContext_=null,this.opacity_=1}renderWorlds(t,e,i){const n=e.extent,s=e.viewState,r=s.center,o=s.resolution,a=s.projection,h=s.rotation,l=a.getExtent(),c=this.getLayer().getSource(),u=e.pixelRatio,d=e.viewHints,g=!(d[0]||d[1]),_=this.compositionContext_,f=Math.round(e.size[0]*u),m=Math.round(e.size[1]*u),p=c.getWrapX()&&a.canWrapX(),y=p?Rt(l):null,x=p?Math.ceil((n[2]-l[2])/y)+1:1;let v=p?Math.floor((n[0]-l[0])/y):0;do{const e=this.getRenderTransform(r,o,h,u,f,m,v*y);t.execute(_,1,e,h,g,void 0,i)}while(++v<x)}setupCompositionContext_(){if(1!==this.opacity_){const t=on(this.context.canvas.width,this.context.canvas.height,po);this.compositionContext_=t}else this.compositionContext_=this.context}releaseCompositionContext_(){if(1!==this.opacity_){const t=this.context.globalAlpha;this.context.globalAlpha=this.opacity_,this.context.drawImage(this.compositionContext_.canvas,0,0),this.context.globalAlpha=t,an(this.compositionContext_),po.push(this.compositionContext_.canvas),this.compositionContext_=null}}renderDeclutter(t){this.declutterExecutorGroup&&(this.setupCompositionContext_(),this.renderWorlds(this.declutterExecutorGroup,t,t.declutterTree),this.releaseCompositionContext_())}renderFrame(t,e){const i=t.pixelRatio,n=t.layerStatesArray[t.layerIndex];!function(t,e,i){!function(t,e,i,n,s,r,o){t[0]=e,t[1]=i,t[2]=n,t[3]=s,t[4]=r,t[5]=o}(t,e,0,0,i,0,0)}(this.pixelTransform,1/i,1/i),J(this.inversePixelTransform,this.pixelTransform);const s=$(this.pixelTransform);this.useContainer(e,s,this.getBackground(t));const r=this.context,o=r.canvas,a=this.replayGroup_,h=this.declutterExecutorGroup;let l=a&&!a.isEmpty()||h&&!h.isEmpty();if(!l&&!this.getLayer().hasListener(se)&&!this.getLayer().hasListener(re))return null;const c=Math.round(t.size[0]*i),u=Math.round(t.size[1]*i);o.width!=c||o.height!=u?(o.width=c,o.height=u,o.style.transform!==s&&(o.style.transform=s)):this.containerReused||r.clearRect(0,0,c,u),this.preRender(r,t);const d=t.viewState;d.projection;this.opacity_=n.opacity,this.setupCompositionContext_();let g=!1;if(l&&n.extent&&this.clipping){const e=Qe(n.extent);l=It(e,t.extent),g=l&&!rt(e,t.extent),g&&this.clipUnrotated(this.compositionContext_,t,e)}return l&&this.renderWorlds(a,t),g&&this.compositionContext_.restore(),this.releaseCompositionContext_(),this.postRender(r,t),this.renderedRotation_!==d.rotation&&(this.renderedRotation_=d.rotation,this.hitDetectionImageData_=null),this.container}getFeatures(t){return new Promise((e=>{if(!this.hitDetectionImageData_&&!this.animatingOrInteracting_){const t=[this.context.canvas.width,this.context.canvas.height];q(this.pixelTransform,t);const e=this.renderedCenter_,i=this.renderedResolution_,n=this.renderedRotation_,r=this.renderedProjection_,o=this.wrappedRenderedExtent_,a=this.getLayer(),h=[],l=t[0]*Do,c=t[1]*Do;h.push(this.getRenderTransform(e,i,n,Do,l,c,0).slice());const u=a.getSource(),d=r.getExtent();if(u.getWrapX()&&r.canWrapX()&&!rt(d,o)){let t=o[0];const s=Rt(d);let r,a=0;for(;t<d[0];)--a,r=s*a,h.push(this.getRenderTransform(e,i,n,Do,l,c,r).slice()),t+=s;for(a=0,t=o[2];t>d[2];)++a,r=s*a,h.push(this.getRenderTransform(e,i,n,Do,l,c,r).slice()),t-=s}this.hitDetectionImageData_=function(t,e,i,n,r,o,a){const h=on(t[0]*Do,t[1]*Do);h.imageSmoothingEnabled=!1;const l=h.canvas,c=new Oo(h,Do,r,null,a),u=i.length,d=Math.floor(16777215/u),g={};for(let t=1;t<=u;++t){const e=i[t-1],s=e.getStyleFunction()||n;if(!s)continue;let a=s(e,o);if(!a)continue;Array.isArray(a)||(a=[a]);const h=(t*d).toString(16).padStart(7,"#00000");for(let t=0,i=a.length;t<i;++t){const i=a[t],n=i.getGeometryFunction()(e);if(!n||!It(r,n.getExtent()))continue;const s=i.clone(),o=s.getFill();o&&o.setColor(h);const l=s.getStroke();l&&(l.setColor(h),l.setLineDash(null)),s.setText(void 0);const c=i.getImage();if(c){const t=c.getImageSize();if(!t)continue;const e=on(t[0],t[1],void 0,{alpha:!1}),i=e.canvas;e.fillStyle=h,e.fillRect(0,0,i.width,i.height),s.setImage(new Kr({img:i,imgSize:t,anchor:c.getAnchor(),anchorXUnits:"pixels",anchorYUnits:"pixels",offset:c.getOrigin(),opacity:1,size:c.getSize(),scale:c.getScale(),rotation:c.getRotation(),rotateWithView:c.getRotateWithView()}))}const u=s.getZIndex()||0;let d=g[u];d||(d={},g[u]=d,d.Polygon=[],d.Circle=[],d.LineString=[],d.Point=[]);const _=n.getType();if("GeometryCollection"===_){const t=n.getGeometriesArrayRecursive();for(let e=0,i=t.length;e<i;++e){const i=t[e];d[i.getType().replace("Multi","")].push(i,s)}}else d[_.replace("Multi","")].push(n,s)}}const _=Object.keys(g).map(Number).sort(s);for(let t=0,i=_.length;t<i;++t){const i=g[_[t]];for(const t in i){const n=i[t];for(let t=0,i=n.length;t<i;t+=2){c.setStyle(n[t+1]);for(let i=0,s=e.length;i<s;++i)c.setTransform(e[i]),c.drawGeometry(n[t])}}}return h.getImageData(0,0,l.width,l.height)}(t,h,this.renderedFeatures_,a.getStyleFunction(),o,i,n)}e(function(t,e,i){const n=[];if(i){const s=Math.floor(Math.round(t[0])*Do),r=Math.floor(Math.round(t[1])*Do),o=4*(Ft(s,0,i.width-1)+Ft(r,0,i.height-1)*i.width),a=i.data[o],h=i.data[o+1],l=i.data[o+2]+256*(h+256*a),c=Math.floor(16777215/e.length);l&&l%c==0&&n.push(e[l/c-1])}return n}(t,this.renderedFeatures_,this.hitDetectionImageData_))}))}forEachFeatureAtCoordinate(t,e,i,n,s){if(!this.replayGroup_)return;const r=e.viewState.resolution,o=e.viewState.rotation,a=this.getLayer(),h={},l=function(t,e,i){const r=M(t),o=h[r];if(o){if(!0!==o&&i<o.distanceSq){if(0===i)return h[r]=!0,s.splice(s.lastIndexOf(o),1),n(t,a,e);o.geometry=e,o.distanceSq=i}}else{if(0===i)return h[r]=!0,n(t,a,e);s.push(h[r]={feature:t,layer:a,geometry:e,distanceSq:i,callback:n})}};let c;const u=[this.replayGroup_];return this.declutterExecutorGroup&&u.push(this.declutterExecutorGroup),u.some((n=>c=n.forEachFeatureAtCoordinate(t,r,o,i,l,n===this.declutterExecutorGroup&&e.declutterTree?e.declutterTree.all().map((t=>t.value)):null))),c}handleFontsChanged(){const t=this.getLayer();t.getVisible()&&this.replayGroup_&&t.changed()}handleStyleImageChange_(t){this.renderIfReadyAndVisible()}prepareFrame(t){const e=this.getLayer(),i=e.getSource();if(!i)return!1;const n=t.viewHints[0],s=t.viewHints[1],r=e.getUpdateWhileAnimating(),o=e.getUpdateWhileInteracting();if(this.ready&&!r&&n||!o&&s)return this.animatingOrInteracting_=!0,!0;this.animatingOrInteracting_=!1;const a=t.extent,l=t.viewState,c=l.projection,u=l.resolution,d=t.pixelRatio,g=e.getRevision(),_=e.getRenderBuffer();let f=e.getRenderOrder();void 0===f&&(f=Go);const m=l.center.slice(),p=et(a,_*u),y=p.slice(),x=[p.slice()],v=c.getExtent();if(i.getWrapX()&&c.canWrapX()&&!rt(v,t.extent)){const t=Rt(v),e=Math.max(Rt(p)/2,t);p[0]=v[0]-e,p[2]=v[2]+e,Ie(m,c);const i=Mt(x[0],c);i[0]<v[0]&&i[2]<v[2]?x.push([i[0]+t,i[1],i[2]+t,i[3]]):i[0]>v[0]&&i[2]>v[2]&&x.push([i[0]-t,i[1],i[2]-t,i[3]])}if(this.ready&&this.renderedResolution_==u&&this.renderedRevision_==g&&this.renderedRenderOrder_==f&&rt(this.wrappedRenderedExtent_,p))return h(this.renderedExtent_,y)||(this.hitDetectionImageData_=null,this.renderedExtent_=y),this.renderedCenter_=m,this.replayGroupChanged=!1,!0;this.replayGroup_=null;const S=new fo(Wo(u,d),p,u,d);let C;this.getLayer().getDeclutter()&&(C=new fo(Wo(u,d),p,u,d));const w=Ue();let E;if(w){for(let t=0,e=x.length;t<e;++t){const e=Je(x[t]);i.loadFeatures(e,$e(u),w)}E=je(w,c)}else for(let t=0,e=x.length;t<e;++t)i.loadFeatures(x[t],u,c);const T=function(t,e){const i=Wo(t,e);return i*i}(u,d);let R=!0;const I=t=>{let i;const n=t.getStyleFunction()||e.getStyleFunction();if(n&&(i=n(t,u)),i){const e=this.renderFeature(t,T,i,S,E,C);R=R&&!e}},b=Je(p),M=i.getFeaturesInExtent(b);f&&M.sort(f);for(let t=0,e=M.length;t<e;++t)I(M[t]);this.renderedFeatures_=M,this.ready=R;const F=S.finish(),L=new Ao(p,u,d,i.getOverlaps(),F,e.getRenderBuffer());return C&&(this.declutterExecutorGroup=new Ao(p,u,d,i.getOverlaps(),C.finish(),e.getRenderBuffer())),this.renderedResolution_=u,this.renderedRevision_=g,this.renderedRenderOrder_=f,this.renderedExtent_=y,this.wrappedRenderedExtent_=p,this.renderedCenter_=m,this.renderedProjection_=c,this.replayGroup_=L,this.hitDetectionImageData_=null,this.replayGroupChanged=!0,!0}renderFeature(t,e,i,n,s,r){if(!i)return!1;let o=!1;if(Array.isArray(i))for(let a=0,h=i.length;a<h;++a)o=Xo(n,t,i[a],e,this.boundHandleStyleImageChange_,s,r)||o;else o=Xo(n,t,i,e,this.boundHandleStyleImageChange_,s,r);return o}},jo=class extends to{constructor(t){super(t)}createRenderer(){return new Yo(this)}},Bo="preload",Ko="useInterimTilesOnError",Zo=class extends Hi{constructor(t){t=t||{};const e=Object.assign({},t);delete e.preload,delete e.useInterimTilesOnError,super(e),this.on,this.once,this.un,this.setPreload(void 0!==t.preload?t.preload:0),this.setUseInterimTilesOnError(void 0===t.useInterimTilesOnError||t.useInterimTilesOnError)}getPreload(){return this.get(Bo)}setPreload(t){this.set(Bo,t)}getUseInterimTilesOnError(){return this.get(Ko)}setUseInterimTilesOnError(t){this.set(Ko,t)}getData(t){return super.getData(t)}},Vo=class extends xo{constructor(t){super(t),this.extentChanged=!0,this.renderedExtent_=null,this.renderedPixelRatio,this.renderedProjection=null,this.renderedRevision,this.renderedTiles=[],this.newTiles_=!1,this.tmpExtent=[1/0,1/0,-1/0,-1/0],this.tmpTileRange_=new rr(0,0,0,0)}isDrawableTile(t){const e=this.getLayer(),i=t.getState(),n=e.getUseInterimTilesOnError();return 2==i||4==i||3==i&&!n}getTile(t,e,i,n){const s=n.pixelRatio,r=n.viewState.projection,o=this.getLayer();let a=o.getSource().getTile(t,e,i,s,r);return 3==a.getState()&&o.getUseInterimTilesOnError()&&o.getPreload()>0&&(this.newTiles_=!0),this.isDrawableTile(a)||(a=a.getInterimTile()),a}getData(t){const e=this.frameState;if(!e)return null;const i=this.getLayer(),n=q(e.pixelToCoordinateTransform,t.slice()),s=i.getExtent();if(s&&!st(s,n))return null;const r=e.pixelRatio,o=e.viewState.projection,a=e.viewState,h=i.getRenderSource(),l=h.getTileGridForProjection(a.projection),c=h.getTilePixelRatio(e.pixelRatio);for(let t=l.getZForResolution(a.resolution);t>=l.getMinZoom();--t){const e=l.getTileCoordForCoordAndZ(n,t),i=h.getTile(t,e[1],e[2],r,o);if(!(i instanceof Ks||i instanceof Js)||i instanceof Js&&4===i.getState())return null;if(2!==i.getState())continue;const s=l.getOrigin(t),u=Ms(l.getTileSize(t)),d=l.getResolution(t),g=Math.floor(c*((n[0]-s[0])/d-e[1]*u[0])),_=Math.floor(c*((s[1]-n[1])/d-e[2]*u[1])),f=Math.round(c*h.getGutterForProjection(a.projection));return this.getImageData(i.getImage(),g+f,_+f)}return null}loadedTileCallback(t,e,i){return!!this.isDrawableTile(i)&&super.loadedTileCallback(t,e,i)}prepareFrame(t){return!!this.getLayer().getSource()}renderFrame(t,e){const i=t.layerStatesArray[t.layerIndex],n=t.viewState,r=n.projection,o=n.resolution,a=n.center,h=n.rotation,l=t.pixelRatio,c=this.getLayer(),u=c.getSource(),d=u.getRevision(),g=u.getTileGridForProjection(r),_=g.getZForResolution(o,u.zDirection),f=g.getResolution(_);let m=t.extent;const p=t.viewState.resolution,y=u.getTilePixelRatio(l),x=Math.round(Rt(m)/p*l),v=Math.round(Ct(m)/p*l),S=i.extent&&Qe(i.extent);S&&(m=wt(m,Qe(i.extent)));const C=f*x/2/y,w=f*v/2/y,E=[a[0]-C,a[1]-w,a[0]+C,a[1]+w],T=g.getTileRangeForExtentAndZ(m,_),R={};R[_]={};const I=this.createLoadedTileFinder(u,r,R),b=this.tmpExtent,F=this.tmpTileRange_;this.newTiles_=!1;const L=h?St(n.center,p,h,t.size):void 0;for(let e=T.minX;e<=T.maxX;++e)for(let n=T.minY;n<=T.maxY;++n){if(h&&!g.tileCoordIntersectsViewport([_,e,n],L))continue;const s=this.getTile(_,e,n,t);if(this.isDrawableTile(s)){const e=M(this);if(2==s.getState()){R[_][s.tileCoord.toString()]=s;let t=s.inTransition(e);t&&1!==i.opacity&&(s.endTransition(e),t=!1),this.newTiles_||!t&&this.renderedTiles.includes(s)||(this.newTiles_=!0)}if(1===s.getAlpha(e,t.time))continue}const r=g.getTileCoordChildTileRange(s.tileCoord,F,b);let o=!1;r&&(o=I(_+1,r)),o||g.forEachTileCoordParentTileRange(s.tileCoord,I,F,b)}const P=f/o*l/y;H(this.pixelTransform,t.size[0]/2,t.size[1]/2,1/l,1/l,h,-x/2,-v/2);const k=$(this.pixelTransform);this.useContainer(e,k,this.getBackground(t));const A=this.context,O=A.canvas;J(this.inversePixelTransform,this.pixelTransform),H(this.tempTransform,x/2,v/2,P,P,0,-x/2,-v/2),O.width!=x||O.height!=v?(O.width=x,O.height=v):this.containerReused||A.clearRect(0,0,x,v),S&&this.clipUnrotated(A,t,S),u.getInterpolate()||(A.imageSmoothingEnabled=!1),this.preRender(A,t),this.renderedTiles.length=0;let D,z,G,W=Object.keys(R).map(Number);W.sort(s),1!==i.opacity||this.containerReused&&!u.getOpaque(t.viewState.projection)?(D=[],z=[]):W=W.reverse();for(let e=W.length-1;e>=0;--e){const i=W[e],n=u.getTilePixelSize(i,l,r),s=g.getResolution(i)/f,o=n[0]*s*P,a=n[1]*s*P,h=g.getTileCoordForCoordAndZ(Et(E),i),c=g.getTileCoordExtent(h),d=q(this.tempTransform,[y*(c[0]-E[0])/f,y*(E[3]-c[3])/f]),m=y*u.getGutterForProjection(r),p=R[i];for(const e in p){const n=p[e],s=n.tileCoord,r=h[1]-s[1],l=Math.round(d[0]-(r-1)*o),c=h[2]-s[2],g=Math.round(d[1]-(c-1)*a),f=Math.round(d[0]-r*o),y=Math.round(d[1]-c*a),x=l-f,v=g-y,S=_===i,C=S&&1!==n.getAlpha(M(this),t.time);let w=!1;if(!C)if(D){G=[f,y,f+x,y,f+x,y+v,f,y+v];for(let t=0,e=D.length;t<e;++t)if(_!==i&&i<z[t]){const e=D[t];It([f,y,f+x,y+v],[e[0],e[3],e[4],e[7]])&&(w||(A.save(),w=!0),A.beginPath(),A.moveTo(G[0],G[1]),A.lineTo(G[2],G[3]),A.lineTo(G[4],G[5]),A.lineTo(G[6],G[7]),A.moveTo(e[6],e[7]),A.lineTo(e[4],e[5]),A.lineTo(e[2],e[3]),A.lineTo(e[0],e[1]),A.clip())}D.push(G),z.push(i)}else A.clearRect(f,y,x,v);this.drawTileImage(n,t,f,y,x,v,m,S),D&&!C?(w&&A.restore(),this.renderedTiles.unshift(n)):this.renderedTiles.push(n),this.updateUsedTiles(t.usedTiles,u,n)}}return this.renderedRevision=d,this.renderedResolution=f,this.extentChanged=!this.renderedExtent_||!ct(this.renderedExtent_,E),this.renderedExtent_=E,this.renderedPixelRatio=l,this.renderedProjection=r,this.manageTilePyramid(t,u,g,l,r,m,_,c.getPreload()),this.scheduleExpireCache(t,u),this.postRender(A,t),i.extent&&A.restore(),A.imageSmoothingEnabled=!0,k!==O.style.transform&&(O.style.transform=k),this.container}drawTileImage(t,e,i,n,s,r,o,a){const h=this.getTileImage(t);if(!h)return;const l=M(this),c=e.layerStatesArray[e.layerIndex],u=c.opacity*(a?t.getAlpha(l,e.time):1),d=u!==this.context.globalAlpha;d&&(this.context.save(),this.context.globalAlpha=u),this.context.drawImage(h,o,o,h.width-2*o,h.height-2*o,i,n,s,r),d&&this.context.restore(),u!==c.opacity?e.animate=!0:a&&t.endTransition(l)}getImage(){const t=this.context;return t?t.canvas:null}getTileImage(t){return t.getImage()}scheduleExpireCache(t,e){if(e.canExpireCache()){const i=function(t,e,i){const n=M(t);n in i.usedTiles&&t.expireCache(i.viewState.projection,i.usedTiles[n])}.bind(null,e);t.postRenderFunctions.push(i)}}updateUsedTiles(t,e,i){const n=M(e);n in t||(t[n]={}),t[n][i.getKey()]=!0}manageTilePyramid(t,e,i,n,s,r,o,a,h){const l=M(e);l in t.wantedTiles||(t.wantedTiles[l]={});const c=t.wantedTiles[l],u=t.tileQueue,d=i.getMinZoom(),g=t.viewState.rotation,_=g?St(t.viewState.center,t.viewState.resolution,g,t.size):void 0;let f,m,p,y,x,v,S=0;for(v=d;v<=o;++v)for(m=i.getTileRangeForExtentAndZ(r,v,m),p=i.getResolution(v),y=m.minX;y<=m.maxX;++y)for(x=m.minY;x<=m.maxY;++x)g&&!i.tileCoordIntersectsViewport([v,y,x],_)||(o-v<=a?(++S,f=e.getTile(v,y,x,n,s),0==f.getState()&&(c[f.getKey()]=!0,u.isKeyQueued(f.getKey())||u.enqueue([f,l,i.getTileCoordCenter(f.tileCoord),p])),void 0!==h&&h(f)):e.useTile(v,y,x,s));e.updateCacheSize(S,s)}},Uo=class extends Zo{constructor(t){super(t)}createRenderer(){return new Vo(this)}};!function(t,e,i){e.openlayers_field={waitForIcon:function(t){return new Promise((function(e){var i=new Image;i.addEventListener("load",(function(){e(i)})),""===t&&(t="data:image/svg+xml,"+escape('<svg version="1.1" id="Layer_1" xmlns="http://www.w3.org/2000/svg" xmlns:xlink="http://www.w3.org/1999/xlink" x="0px" y="0px" width="40px" height="40px" viewBox="0 0 40 40" enable-background="new 0 0 25 25" xml:space="preserve"><path fill="#156BB1" d="M22.906,10.438c0,4.367-6.281,14.312-7.906,17.031c-1.719-2.75-7.906-12.665-7.906-17.031S10.634,2.531,15,2.531S22.906,6.071,22.906,10.438z"/><circle fill="#FFFFFF" cx="15" cy="10.677" r="3.291"/></svg>')),i.src=t}))}},e.behaviors.openlayers_field={attach:function(n){t(n).find('div[data-type="openlayers6"][data-processed="false"]').each((function(){var n=t(this),s=i.openlayers6[n.prop("id")],r=[],o=n.data("icon");e.openlayers_field.waitForIcon(o).then((function(t){var e=Math.min(40,t.width),i=Math.ceil(t.height*(e/t.width)),o=document.createElement("canvas");o.getContext("2d").drawImage(t,0,0,t.width,t.height,0,0,e,i);var a=o.toDataURL(),h=new Image;h.src=a;var l=new Kr({anchor:[.5,e],anchorXUnits:"fraction",anchorYUnits:"pixels",img:h,imgSize:[e,i]}),c=new Xr({image:l});s.points.forEach((function(t){var e=new Er({geometry:new ki(Ne([t.lon,t.lat])),name:"item"});e.setStyle(c),r.push(e)}));var u=new Ys({features:r}),d=new jo({source:u});n.width(s.width),n.height(s.height);var g=[];if(g.push(new Uo({source:new xr({crossOrigin:null})})),void 0!==s.wms){var _=new Uo({source:new Cr(s.wms)});g.push(_)}g.push(d),new Ps({layers:g,target:n.prop("id"),view:new Ui({center:Ne([s.center.lon,s.center.lat]),zoom:s.zoom})}),n.attr("data-processed","true")}))}))}}}(jQuery,Drupal,drupalSettings)})()})();
\ No newline at end of file
diff --git a/js/store-locator.js b/js/store-locator.js
index e65f65b..e226fcf 100644
--- a/js/store-locator.js
+++ b/js/store-locator.js
@@ -1,2 +1,2 @@
 /*! For license information please see store-locator.js.LICENSE.txt */
-(()=>{var t,e,r={645:(t,e)=>{e.read=function(t,e,r,i,n){var o,a,s=8*n-i-1,l=(1<<s)-1,u=l>>1,c=-7,h=r?n-1:0,p=r?-1:1,d=t[e+h];for(h+=p,o=d&(1<<-c)-1,d>>=-c,c+=s;c>0;o=256*o+t[e+h],h+=p,c-=8);for(a=o&(1<<-c)-1,o>>=-c,c+=i;c>0;a=256*a+t[e+h],h+=p,c-=8);if(0===o)o=1-u;else{if(o===l)return a?NaN:1/0*(d?-1:1);a+=Math.pow(2,i),o-=u}return(d?-1:1)*a*Math.pow(2,o-i)},e.write=function(t,e,r,i,n,o){var a,s,l,u=8*o-n-1,c=(1<<u)-1,h=c>>1,p=23===n?Math.pow(2,-24)-Math.pow(2,-77):0,d=i?0:o-1,f=i?1:-1,g=e<0||0===e&&1/e<0?1:0;for(e=Math.abs(e),isNaN(e)||e===1/0?(s=isNaN(e)?1:0,a=c):(a=Math.floor(Math.log(e)/Math.LN2),e*(l=Math.pow(2,-a))<1&&(a--,l*=2),(e+=a+h>=1?p/l:p*Math.pow(2,1-h))*l>=2&&(a++,l/=2),a+h>=c?(s=0,a=c):a+h>=1?(s=(e*l-1)*Math.pow(2,n),a+=h):(s=e*Math.pow(2,h-1)*Math.pow(2,n),a=0));n>=8;t[r+d]=255&s,d+=f,s/=256,n-=8);for(a=a<<n|s,u+=n;u>0;t[r+d]=255&a,d+=f,a/=256,u-=8);t[r+d-f]|=128*g}},4138:t=>{var e={thin:100,hairline:100,"ultra-light":100,"extra-light":100,light:200,book:300,regular:400,normal:400,plain:400,roman:400,standard:400,medium:500,"semi-bold":600,"demi-bold":600,bold:700,heavy:800,black:800,"extra-bold":800,"ultra-black":900,"extra-black":900,"ultra-bold":900,"heavy-black":900,fat:900,poster:900},r=" ",i=/(italic|oblique)$/i,n={};t.exports=function(t,o,a){var s=n[t];if(!s){Array.isArray(t)||(t=[t]);for(var l=400,u="normal",c=[],h=0,p=t.length;h<p;++h){var d=t[h].split(" "),f=d[d.length-1].toLowerCase();for(var g in"normal"==f||"italic"==f||"oblique"==f?(u=f,d.pop(),f=d[d.length-1].toLowerCase()):i.test(f)&&(f=f.replace(i,""),u=d[d.length-1].replace(f,"")),e){var y=d.length>1?d[d.length-2].toLowerCase():"";if(f==g||f==g.replace("-","")||y+"-"+f==g){l=e[g],d.pop(),y&&g.startsWith(y)&&d.pop();break}}"number"==typeof f&&(l=f);var m=d.join(r).replace("Klokantech Noto Sans","Noto Sans");-1!==m.indexOf(r)&&(m='"'+m+'"'),c.push(m)}s=n[t]=[u,l,c]}return s[0]+r+s[1]+r+o+"px"+(a?"/"+a:"")+r+s[2]}},4514:(t,e,r)=>{"use strict";function i(t,e={}){e.sorted||t.sort(o);const r=t.length,i=new Array(2*r);for(var a=0,s=0;s<r;s++){const e=t[s];for(;a>=2&&n(i[a-2],i[a-1],e)<=0;)a--;i[a++]=e}const l=a+1;for(s=r-2;s>=0;s--){const e=t[s];for(;a>=l&&n(i[a-2],i[a-1],e)<=0;)a--;i[a++]=e}return i.slice(0,a-1)}function n(t,e,r){return(e[1]-t[1])*(r[0]-t[0])-(e[0]-t[0])*(r[1]-t[1])}function o(t,e){return t[0]===e[0]?t[1]-e[1]:t[0]-e[0]}r.r(e),r.d(e,{default:()=>i})},3614:(t,e,r)=>{"use strict";t.exports=n;var i=r(645);function n(t){this.buf=ArrayBuffer.isView&&ArrayBuffer.isView(t)?t:new Uint8Array(t||0),this.pos=0,this.type=0,this.length=this.buf.length}n.Varint=0,n.Fixed64=1,n.Bytes=2,n.Fixed32=5;var o=4294967296,a=1/o,s="undefined"==typeof TextDecoder?null:new TextDecoder("utf8");function l(t){return t.type===n.Bytes?t.readVarint()+t.pos:t.pos+1}function u(t,e,r){return r?4294967296*e+(t>>>0):4294967296*(e>>>0)+(t>>>0)}function c(t,e,r){var i=e<=16383?1:e<=2097151?2:e<=268435455?3:Math.floor(Math.log(e)/(7*Math.LN2));r.realloc(i);for(var n=r.pos-1;n>=t;n--)r.buf[n+i]=r.buf[n]}function h(t,e){for(var r=0;r<t.length;r++)e.writeVarint(t[r])}function p(t,e){for(var r=0;r<t.length;r++)e.writeSVarint(t[r])}function d(t,e){for(var r=0;r<t.length;r++)e.writeFloat(t[r])}function f(t,e){for(var r=0;r<t.length;r++)e.writeDouble(t[r])}function g(t,e){for(var r=0;r<t.length;r++)e.writeBoolean(t[r])}function y(t,e){for(var r=0;r<t.length;r++)e.writeFixed32(t[r])}function m(t,e){for(var r=0;r<t.length;r++)e.writeSFixed32(t[r])}function v(t,e){for(var r=0;r<t.length;r++)e.writeFixed64(t[r])}function _(t,e){for(var r=0;r<t.length;r++)e.writeSFixed64(t[r])}function x(t,e){return(t[e]|t[e+1]<<8|t[e+2]<<16)+16777216*t[e+3]}function b(t,e,r){t[r]=e,t[r+1]=e>>>8,t[r+2]=e>>>16,t[r+3]=e>>>24}function w(t,e){return(t[e]|t[e+1]<<8|t[e+2]<<16)+(t[e+3]<<24)}n.prototype={destroy:function(){this.buf=null},readFields:function(t,e,r){for(r=r||this.length;this.pos<r;){var i=this.readVarint(),n=i>>3,o=this.pos;this.type=7&i,t(n,e,this),this.pos===o&&this.skip(i)}return e},readMessage:function(t,e){return this.readFields(t,e,this.readVarint()+this.pos)},readFixed32:function(){var t=x(this.buf,this.pos);return this.pos+=4,t},readSFixed32:function(){var t=w(this.buf,this.pos);return this.pos+=4,t},readFixed64:function(){var t=x(this.buf,this.pos)+x(this.buf,this.pos+4)*o;return this.pos+=8,t},readSFixed64:function(){var t=x(this.buf,this.pos)+w(this.buf,this.pos+4)*o;return this.pos+=8,t},readFloat:function(){var t=i.read(this.buf,this.pos,!0,23,4);return this.pos+=4,t},readDouble:function(){var t=i.read(this.buf,this.pos,!0,52,8);return this.pos+=8,t},readVarint:function(t){var e,r,i=this.buf;return e=127&(r=i[this.pos++]),r<128?e:(e|=(127&(r=i[this.pos++]))<<7,r<128?e:(e|=(127&(r=i[this.pos++]))<<14,r<128?e:(e|=(127&(r=i[this.pos++]))<<21,r<128?e:function(t,e,r){var i,n,o=r.buf;if(i=(112&(n=o[r.pos++]))>>4,n<128)return u(t,i,e);if(i|=(127&(n=o[r.pos++]))<<3,n<128)return u(t,i,e);if(i|=(127&(n=o[r.pos++]))<<10,n<128)return u(t,i,e);if(i|=(127&(n=o[r.pos++]))<<17,n<128)return u(t,i,e);if(i|=(127&(n=o[r.pos++]))<<24,n<128)return u(t,i,e);if(i|=(1&(n=o[r.pos++]))<<31,n<128)return u(t,i,e);throw new Error("Expected varint not more than 10 bytes")}(e|=(15&(r=i[this.pos]))<<28,t,this))))},readVarint64:function(){return this.readVarint(!0)},readSVarint:function(){var t=this.readVarint();return t%2==1?(t+1)/-2:t/2},readBoolean:function(){return Boolean(this.readVarint())},readString:function(){var t=this.readVarint()+this.pos,e=this.pos;return this.pos=t,t-e>=12&&s?function(t,e,r){return s.decode(t.subarray(e,r))}(this.buf,e,t):function(t,e,r){for(var i="",n=e;n<r;){var o,a,s,l=t[n],u=null,c=l>239?4:l>223?3:l>191?2:1;if(n+c>r)break;1===c?l<128&&(u=l):2===c?128==(192&(o=t[n+1]))&&(u=(31&l)<<6|63&o)<=127&&(u=null):3===c?(o=t[n+1],a=t[n+2],128==(192&o)&&128==(192&a)&&((u=(15&l)<<12|(63&o)<<6|63&a)<=2047||u>=55296&&u<=57343)&&(u=null)):4===c&&(o=t[n+1],a=t[n+2],s=t[n+3],128==(192&o)&&128==(192&a)&&128==(192&s)&&((u=(15&l)<<18|(63&o)<<12|(63&a)<<6|63&s)<=65535||u>=1114112)&&(u=null)),null===u?(u=65533,c=1):u>65535&&(u-=65536,i+=String.fromCharCode(u>>>10&1023|55296),u=56320|1023&u),i+=String.fromCharCode(u),n+=c}return i}(this.buf,e,t)},readBytes:function(){var t=this.readVarint()+this.pos,e=this.buf.subarray(this.pos,t);return this.pos=t,e},readPackedVarint:function(t,e){if(this.type!==n.Bytes)return t.push(this.readVarint(e));var r=l(this);for(t=t||[];this.pos<r;)t.push(this.readVarint(e));return t},readPackedSVarint:function(t){if(this.type!==n.Bytes)return t.push(this.readSVarint());var e=l(this);for(t=t||[];this.pos<e;)t.push(this.readSVarint());return t},readPackedBoolean:function(t){if(this.type!==n.Bytes)return t.push(this.readBoolean());var e=l(this);for(t=t||[];this.pos<e;)t.push(this.readBoolean());return t},readPackedFloat:function(t){if(this.type!==n.Bytes)return t.push(this.readFloat());var e=l(this);for(t=t||[];this.pos<e;)t.push(this.readFloat());return t},readPackedDouble:function(t){if(this.type!==n.Bytes)return t.push(this.readDouble());var e=l(this);for(t=t||[];this.pos<e;)t.push(this.readDouble());return t},readPackedFixed32:function(t){if(this.type!==n.Bytes)return t.push(this.readFixed32());var e=l(this);for(t=t||[];this.pos<e;)t.push(this.readFixed32());return t},readPackedSFixed32:function(t){if(this.type!==n.Bytes)return t.push(this.readSFixed32());var e=l(this);for(t=t||[];this.pos<e;)t.push(this.readSFixed32());return t},readPackedFixed64:function(t){if(this.type!==n.Bytes)return t.push(this.readFixed64());var e=l(this);for(t=t||[];this.pos<e;)t.push(this.readFixed64());return t},readPackedSFixed64:function(t){if(this.type!==n.Bytes)return t.push(this.readSFixed64());var e=l(this);for(t=t||[];this.pos<e;)t.push(this.readSFixed64());return t},skip:function(t){var e=7&t;if(e===n.Varint)for(;this.buf[this.pos++]>127;);else if(e===n.Bytes)this.pos=this.readVarint()+this.pos;else if(e===n.Fixed32)this.pos+=4;else{if(e!==n.Fixed64)throw new Error("Unimplemented type: "+e);this.pos+=8}},writeTag:function(t,e){this.writeVarint(t<<3|e)},realloc:function(t){for(var e=this.length||16;e<this.pos+t;)e*=2;if(e!==this.length){var r=new Uint8Array(e);r.set(this.buf),this.buf=r,this.length=e}},finish:function(){return this.length=this.pos,this.pos=0,this.buf.subarray(0,this.length)},writeFixed32:function(t){this.realloc(4),b(this.buf,t,this.pos),this.pos+=4},writeSFixed32:function(t){this.realloc(4),b(this.buf,t,this.pos),this.pos+=4},writeFixed64:function(t){this.realloc(8),b(this.buf,-1&t,this.pos),b(this.buf,Math.floor(t*a),this.pos+4),this.pos+=8},writeSFixed64:function(t){this.realloc(8),b(this.buf,-1&t,this.pos),b(this.buf,Math.floor(t*a),this.pos+4),this.pos+=8},writeVarint:function(t){(t=+t||0)>268435455||t<0?function(t,e){var r,i;if(t>=0?(r=t%4294967296|0,i=t/4294967296|0):(i=~(-t/4294967296),4294967295^(r=~(-t%4294967296))?r=r+1|0:(r=0,i=i+1|0)),t>=0x10000000000000000||t<-0x10000000000000000)throw new Error("Given varint doesn't fit into 10 bytes");e.realloc(10),function(t,e,r){r.buf[r.pos++]=127&t|128,t>>>=7,r.buf[r.pos++]=127&t|128,t>>>=7,r.buf[r.pos++]=127&t|128,t>>>=7,r.buf[r.pos++]=127&t|128,t>>>=7,r.buf[r.pos]=127&t}(r,0,e),function(t,e){var r=(7&t)<<4;e.buf[e.pos++]|=r|((t>>>=3)?128:0),t&&(e.buf[e.pos++]=127&t|((t>>>=7)?128:0),t&&(e.buf[e.pos++]=127&t|((t>>>=7)?128:0),t&&(e.buf[e.pos++]=127&t|((t>>>=7)?128:0),t&&(e.buf[e.pos++]=127&t|((t>>>=7)?128:0),t&&(e.buf[e.pos++]=127&t)))))}(i,e)}(t,this):(this.realloc(4),this.buf[this.pos++]=127&t|(t>127?128:0),t<=127||(this.buf[this.pos++]=127&(t>>>=7)|(t>127?128:0),t<=127||(this.buf[this.pos++]=127&(t>>>=7)|(t>127?128:0),t<=127||(this.buf[this.pos++]=t>>>7&127))))},writeSVarint:function(t){this.writeVarint(t<0?2*-t-1:2*t)},writeBoolean:function(t){this.writeVarint(Boolean(t))},writeString:function(t){t=String(t),this.realloc(4*t.length),this.pos++;var e=this.pos;this.pos=function(t,e,r){for(var i,n,o=0;o<e.length;o++){if((i=e.charCodeAt(o))>55295&&i<57344){if(!n){i>56319||o+1===e.length?(t[r++]=239,t[r++]=191,t[r++]=189):n=i;continue}if(i<56320){t[r++]=239,t[r++]=191,t[r++]=189,n=i;continue}i=n-55296<<10|i-56320|65536,n=null}else n&&(t[r++]=239,t[r++]=191,t[r++]=189,n=null);i<128?t[r++]=i:(i<2048?t[r++]=i>>6|192:(i<65536?t[r++]=i>>12|224:(t[r++]=i>>18|240,t[r++]=i>>12&63|128),t[r++]=i>>6&63|128),t[r++]=63&i|128)}return r}(this.buf,t,this.pos);var r=this.pos-e;r>=128&&c(e,r,this),this.pos=e-1,this.writeVarint(r),this.pos+=r},writeFloat:function(t){this.realloc(4),i.write(this.buf,t,this.pos,!0,23,4),this.pos+=4},writeDouble:function(t){this.realloc(8),i.write(this.buf,t,this.pos,!0,52,8),this.pos+=8},writeBytes:function(t){var e=t.length;this.writeVarint(e),this.realloc(e);for(var r=0;r<e;r++)this.buf[this.pos++]=t[r]},writeRawMessage:function(t,e){this.pos++;var r=this.pos;t(e,this);var i=this.pos-r;i>=128&&c(r,i,this),this.pos=r-1,this.writeVarint(i),this.pos+=i},writeMessage:function(t,e,r){this.writeTag(t,n.Bytes),this.writeRawMessage(e,r)},writePackedVarint:function(t,e){e.length&&this.writeMessage(t,h,e)},writePackedSVarint:function(t,e){e.length&&this.writeMessage(t,p,e)},writePackedBoolean:function(t,e){e.length&&this.writeMessage(t,g,e)},writePackedFloat:function(t,e){e.length&&this.writeMessage(t,d,e)},writePackedDouble:function(t,e){e.length&&this.writeMessage(t,f,e)},writePackedFixed32:function(t,e){e.length&&this.writeMessage(t,y,e)},writePackedSFixed32:function(t,e){e.length&&this.writeMessage(t,m,e)},writePackedFixed64:function(t,e){e.length&&this.writeMessage(t,v,e)},writePackedSFixed64:function(t,e){e.length&&this.writeMessage(t,_,e)},writeBytesField:function(t,e){this.writeTag(t,n.Bytes),this.writeBytes(e)},writeFixed32Field:function(t,e){this.writeTag(t,n.Fixed32),this.writeFixed32(e)},writeSFixed32Field:function(t,e){this.writeTag(t,n.Fixed32),this.writeSFixed32(e)},writeFixed64Field:function(t,e){this.writeTag(t,n.Fixed64),this.writeFixed64(e)},writeSFixed64Field:function(t,e){this.writeTag(t,n.Fixed64),this.writeSFixed64(e)},writeVarintField:function(t,e){this.writeTag(t,n.Varint),this.writeVarint(e)},writeSVarintField:function(t,e){this.writeTag(t,n.Varint),this.writeSVarint(e)},writeStringField:function(t,e){this.writeTag(t,n.Bytes),this.writeString(e)},writeFloatField:function(t,e){this.writeTag(t,n.Fixed32),this.writeFloat(e)},writeDoubleField:function(t,e){this.writeTag(t,n.Fixed64),this.writeDouble(e)},writeBooleanField:function(t,e){this.writeVarintField(t,Boolean(e))}}},2582:function(t){t.exports=function(){"use strict";function t(t,i,n,o,a){!function t(r,i,n,o,a){for(;o>n;){if(o-n>600){var s=o-n+1,l=i-n+1,u=Math.log(s),c=.5*Math.exp(2*u/3),h=.5*Math.sqrt(u*c*(s-c)/s)*(l-s/2<0?-1:1);t(r,i,Math.max(n,Math.floor(i-l*c/s+h)),Math.min(o,Math.floor(i+(s-l)*c/s+h)),a)}var p=r[i],d=n,f=o;for(e(r,n,i),a(r[o],p)>0&&e(r,n,o);d<f;){for(e(r,d,f),d++,f--;a(r[d],p)<0;)d++;for(;a(r[f],p)>0;)f--}0===a(r[n],p)?e(r,n,f):e(r,++f,o),f<=i&&(n=f+1),i<=f&&(o=f-1)}}(t,i,n||0,o||t.length-1,a||r)}function e(t,e,r){var i=t[e];t[e]=t[r],t[r]=i}function r(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 n(t,e,r){if(!r)return e.indexOf(t);for(var i=0;i<e.length;i++)if(r(t,e[i]))return i;return-1}function o(t,e){a(t,0,t.children.length,e,t)}function a(t,e,r,i,n){n||(n=f(null)),n.minX=1/0,n.minY=1/0,n.maxX=-1/0,n.maxY=-1/0;for(var o=e;o<r;o++){var a=t.children[o];s(n,t.leaf?i(a):a)}return n}function s(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 u(t,e){return t.minY-e.minY}function c(t){return(t.maxX-t.minX)*(t.maxY-t.minY)}function h(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 d(t,e){return e.minX<=t.maxX&&e.minY<=t.maxY&&e.maxX>=t.minX&&e.maxY>=t.minY}function f(t){return{children:t,height:1,leaf:!0,minX:1/0,minY:1/0,maxX:-1/0,maxY:-1/0}}function g(e,r,i,n,o){for(var a=[r,i];a.length;)if(!((i=a.pop())-(r=a.pop())<=n)){var s=r+Math.ceil((i-r)/n/2)*n;t(e,s,r,i,o),a.push(r,s,s,i)}}return i.prototype.all=function(){return this._all(this.data,[])},i.prototype.search=function(t){var e=this.data,r=[];if(!d(t,e))return r;for(var i=this.toBBox,n=[];e;){for(var o=0;o<e.children.length;o++){var a=e.children[o],s=e.leaf?i(a):a;d(t,s)&&(e.leaf?r.push(a):p(t,s)?this._all(a,r):n.push(a))}e=n.pop()}return r},i.prototype.collides=function(t){var e=this.data;if(!d(t,e))return!1;for(var r=[];e;){for(var i=0;i<e.children.length;i++){var n=e.children[i],o=e.leaf?this.toBBox(n):n;if(d(t,o)){if(e.leaf||p(t,o))return!0;r.push(n)}}e=r.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 r=this._build(t.slice(),0,t.length-1,0);if(this.data.children.length)if(this.data.height===r.height)this._splitRoot(this.data,r);else{if(this.data.height<r.height){var i=this.data;this.data=r,r=i}this._insert(r,this.data.height-r.height-1,!0)}else this.data=r;return this},i.prototype.insert=function(t){return t&&this._insert(t,this.data.height-1),this},i.prototype.clear=function(){return this.data=f([]),this},i.prototype.remove=function(t,e){if(!t)return this;for(var r,i,o,a=this.data,s=this.toBBox(t),l=[],u=[];a||l.length;){if(a||(a=l.pop(),i=l[l.length-1],r=u.pop(),o=!0),a.leaf){var c=n(t,a.children,e);if(-1!==c)return a.children.splice(c,1),l.push(a),this._condense(l),this}o||a.leaf||!p(a,s)?i?(r++,a=i.children[r],o=!1):a=null:(l.push(a),u.push(r),r=0,i=a,a=a.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 r=[];t;)t.leaf?e.push.apply(e,t.children):r.push.apply(r,t.children),t=r.pop();return e},i.prototype._build=function(t,e,r,i){var n,a=r-e+1,s=this._maxEntries;if(a<=s)return o(n=f(t.slice(e,r+1)),this.toBBox),n;i||(i=Math.ceil(Math.log(a)/Math.log(s)),s=Math.ceil(a/Math.pow(s,i-1))),(n=f([])).leaf=!1,n.height=i;var l=Math.ceil(a/s),u=l*Math.ceil(Math.sqrt(s));g(t,e,r,u,this.compareMinX);for(var c=e;c<=r;c+=u){var h=Math.min(c+u-1,r);g(t,c,h,l,this.compareMinY);for(var p=c;p<=h;p+=l){var d=Math.min(p+l-1,h);n.children.push(this._build(t,p,d,i-1))}}return o(n,this.toBBox),n},i.prototype._chooseSubtree=function(t,e,r,i){for(;i.push(e),!e.leaf&&i.length-1!==r;){for(var n=1/0,o=1/0,a=void 0,s=0;s<e.children.length;s++){var l=e.children[s],u=c(l),h=(p=t,d=l,(Math.max(d.maxX,p.maxX)-Math.min(d.minX,p.minX))*(Math.max(d.maxY,p.maxY)-Math.min(d.minY,p.minY))-u);h<o?(o=h,n=u<n?u:n,a=l):h===o&&u<n&&(n=u,a=l)}e=a||e.children[0]}var p,d;return e},i.prototype._insert=function(t,e,r){var i=r?t:this.toBBox(t),n=[],o=this._chooseSubtree(i,this.data,e,n);for(o.children.push(t),s(o,i);e>=0&&n[e].children.length>this._maxEntries;)this._split(n,e),e--;this._adjustParentBBoxes(i,n,e)},i.prototype._split=function(t,e){var r=t[e],i=r.children.length,n=this._minEntries;this._chooseSplitAxis(r,n,i);var a=this._chooseSplitIndex(r,n,i),s=f(r.children.splice(a,r.children.length-a));s.height=r.height,s.leaf=r.leaf,o(r,this.toBBox),o(s,this.toBBox),e?t[e-1].children.push(s):this._splitRoot(r,s)},i.prototype._splitRoot=function(t,e){this.data=f([t,e]),this.data.height=t.height+1,this.data.leaf=!1,o(this.data,this.toBBox)},i.prototype._chooseSplitIndex=function(t,e,r){for(var i,n,o,s,l,u,h,p=1/0,d=1/0,f=e;f<=r-e;f++){var g=a(t,0,f,this.toBBox),y=a(t,f,r,this.toBBox),m=(n=g,o=y,void 0,void 0,void 0,void 0,s=Math.max(n.minX,o.minX),l=Math.max(n.minY,o.minY),u=Math.min(n.maxX,o.maxX),h=Math.min(n.maxY,o.maxY),Math.max(0,u-s)*Math.max(0,h-l)),v=c(g)+c(y);m<p?(p=m,i=f,d=v<d?v:d):m===p&&v<d&&(d=v,i=f)}return i||r-e},i.prototype._chooseSplitAxis=function(t,e,r){var i=t.leaf?this.compareMinX:l,n=t.leaf?this.compareMinY:u;this._allDistMargin(t,e,r,i)<this._allDistMargin(t,e,r,n)&&t.children.sort(i)},i.prototype._allDistMargin=function(t,e,r,i){t.children.sort(i);for(var n=this.toBBox,o=a(t,0,e,n),l=a(t,r-e,r,n),u=h(o)+h(l),c=e;c<r-e;c++){var p=t.children[c];s(o,t.leaf?n(p):p),u+=h(o)}for(var d=r-e-1;d>=e;d--){var f=t.children[d];s(l,t.leaf?n(f):f),u+=h(l)}return u},i.prototype._adjustParentBBoxes=function(t,e,r){for(var i=r;i>=0;i--)s(e[i],t)},i.prototype._condense=function(t){for(var e=t.length-1,r=void 0;e>=0;e--)0===t[e].children.length?e>0?(r=t[e-1].children).splice(r.indexOf(t[e]),1):this.clear():o(t[e],this.toBBox)},i}()},4559:function(t,e,r){"use strict";var i=this&&this.__assign||function(){return i=Object.assign||function(t){for(var e,r=1,i=arguments.length;r<i;r++)for(var n in e=arguments[r])Object.prototype.hasOwnProperty.call(e,n)&&(t[n]=e[n]);return t},i.apply(this,arguments)};e.__esModule=!0,e.OpenlayerMap=void 0;var n=r(7458),o=r(5340),a=r(6121),s=r(494),l=r(1824),u=r(9461),c=r(9931),h=r(1090),p=r(188),d=r(283),f=r(6528),g=r(4514),y=r(8641),m=r(5311),v=Math.PI/2,_=new c.Fill({color:"rgba(255, 153, 0, 0.4)"}),x=new c.Stroke({color:"rgba(204, 85, 0, 1)",width:1.5}),b=new c.Fill({color:"rgba(255, 153, 102, 0.3)"}),w=new c.Fill({color:"rgba(255, 165, 0, 0.7)"}),E=new c.Fill({color:"#fff"}),T=new c.Stroke({color:"rgba(0, 0, 0, 0.6)",width:3}),S=new d.default({radius:14,fill:w}),C=new d.default({radius:20,fill:b}),O=function(){function t(t,e){void 0===e&&(e=null),this.facetsMapping={},this.facetsMappingUrl={},this.id=t,this.el=m("#"+this.id),this.global={},this.filterInput=m(".openlayers-filters input"),this.szIcon=this.el.data("icon"),this.filterField=this.el.data("filter-field"),this.popupContainer=this.el.closest(".openlayers-wrapper").find(".popup"),this.popupContent=this.el.closest(".openlayers-wrapper").find(".popup-content"),this.popupCloser=this.el.closest(".openlayers-wrapper").find(".popup-closer"),this.loadingElement=this.el.closest(".openlayers-wrapper").find(".openlayers-loading-wrapper"),this.initUrl=e}return t.prototype.init=function(){var t=[];this.layer=new u.Tile({source:new o.OSM({crossOrigin:"anonymous"})}),t.push(this.layer),void 0!==this.el.data("tile-wms")&&"object"==typeof this.el.data("tile-wms")&&(this.wmsLayer=new u.Tile({source:new o.TileWMS(this.el.data("tile-wms"))}),t.push(this.wmsLayer)),this.interactions=(0,l.defaults)(),this.controls=(0,s.defaults)(),this.controls.push(new s.FullScreen),this.controls.push(new s.ZoomSlider),this.center=(0,a.fromLonLat)([parseFloat(this.el.data("center-lon")),parseFloat(this.el.data("center-lat"))]),this.clusterEnabled="1"==this.el.data("cluster-enabled"),this.clusterDistance=parseInt(this.el.data("cluster-distance")),this.view=new n.View({center:this.center,zoom:this.el.data("zoom"),minZoom:1,maxZoom:18}),this.popupOverlay=new n.Overlay({element:this.popupContainer.get(0),positioning:"bottom-center",stopEvent:!1}),this.map=new n.Map({target:this.id,layers:t,interactions:this.interactions,controls:this.controls,view:this.view}),this.map.addOverlay(this.popupOverlay),this.loadData()},t.prototype.clusterMemberStyle=function(t){return new c.Style({geometry:t.getGeometry(),image:this.getIcon()})},t.prototype.loadData=function(t){var e=this;void 0===t&&(t=null);var r=!1;null!=this.initUrl&&(t=this.el.data("url")+"?_format=json&"+this.initUrl,this.initUrl=null,r=!0),this.el.trigger("openlayers_beforeloaddata",[this,t]);var i=this;i.hideFeaturePopup();var n=this.map.getView().calculateExtent(this.map.getSize());if(null===t&&(t=this.el.data("url")+"?_format=json&view="+this.el.data("view")),!r){var s=new RegExp("&openlayers-searchtext=[^&]*(&|$)");t=t.replace(s,"&"),""!==this.filterField&&""!==this.filterInput.val()&&this.filterInput.length>0&&(t+="&openlayers-searchtext="+this.filterInput.val())}t=t.replace(/^https?:/,""),this.currentUrl=t,n=(0,a.transformExtent)(n,"EPSG:3857","EPSG:4326"),this.loadingElement.show();var l=this.el.data("lat"),d=this.el.data("lon"),f=this.el.data("nid");fetch(this.currentUrl,{method:"get",headers:{Accept:"application/json","Content-Type":"application/x-www-form-urlencoded; charset=UTF-8"}}).then((function(r){e.waitForIcon(e.szIcon).then((function(n){r.json().then((function(r){m(e.global).trigger("resultReceived",[{json:r}]);var s=[],g=new c.Style({image:e.getIcon(n)}),y=r;void 0!==r.search_results&&(y=r.search_results);try{y.forEach((function(t){var e=new h.default({geometry:new p.default((0,a.fromLonLat)([t[d],t[l]])),name:"item",properties:{id:t[f]}});e.setStyle(g),s.push(e)})),void 0!==e.vectorLayer&&e.map.removeLayer(e.vectorLayer);var v=new o.Vector({features:s});e.clusterEnabled?(e.cluster=new o.Cluster({distance:e.clusterDistance,source:v}),e.clusterHulls=new u.Vector({source:e.cluster,style:e.clusterHullStyle}),e.vectorLayer=new u.Vector({source:e.cluster,style:function(t){var e=t.get("features").length;if(e>1)return[new c.Style({image:C}),new c.Style({image:S,text:new c.Text({text:e.toString(),fill:E,stroke:T})})];var r=t.get("features")[0];return i.clusterMemberStyle(r)}}),e.clusterCircles=new u.Vector({source:e.cluster,style:e.clusterCircleStyle})):e.vectorLayer=new u.Vector({source:v}),e.map.addLayer(e.vectorLayer)}catch(t){void 0!==e.vectorLayer&&e.map.removeLayer(e.vectorLayer)}e.el.trigger("openlayers_afterloaddata",[e,t,r])}))})),e.poseListeners(!0),e.loadingElement.hide()}))},t.prototype.waitForIcon=function(t){void 0===t&&(t="");var e=this;return new Promise((function(r){e.icon=new Image,e.icon.addEventListener("load",(function(){r(e.icon)})),""===t&&(t="data:image/svg+xml,"+escape('<svg version="1.1" id="Layer_1" xmlns="http://www.w3.org/2000/svg" xmlns:xlink="http://www.w3.org/1999/xlink" x="0px" y="0px" width="40px" height="40px" viewBox="0 0 40 40" enable-background="new 0 0 25 25" xml:space="preserve"><path fill="#156BB1" d="M22.906,10.438c0,4.367-6.281,14.312-7.906,17.031c-1.719-2.75-7.906-12.665-7.906-17.031S10.634,2.531,15,2.531S22.906,6.071,22.906,10.438z"/><circle fill="#FFFFFF" cx="15" cy="10.677" r="3.291"/></svg>')),e.icon.src=t}))},t.prototype.clusterCircleStyle=function(t,e){var r=this;if(t===this.clickFeature&&e===this.clickResolution){this.clusterMembers=t.get("features");var n=t.getGeometry().getCoordinates(),o=t.getGeometry();return this.generatePointsCircle(this.clusterMembers.length,o.getCoordinates(),e).reduce((function(t,e,o){var a=new p.default(e),s=new f.LineString([n,e]);return t.unshift(new c.Style({geometry:s,stroke:x})),t.push(r.clusterMemberStyle(new h.default(i(i({},r.clusterMembers[o].getProperties()),{geometry:a})))),t}),[])}},t.prototype.generatePointsCircle=function(t,e,r){var i,n=28*(2+t)/(2*Math.PI),o=2*Math.PI/t,a=[];n=Math.max(n,35)*r;for(var s=0;s<t;++s)i=v+s*o,a.push([e[0]+n*Math.cos(i),e[1]+n*Math.sin(i)]);return a},t.prototype.clusterHullStyle=function(t){if(t===this.hoverFeature){var e=t.get("features").map((function(t){return t.getGeometry().getCoordinates()}));return new c.Style({geometry:new f.Polygon([(0,g.monotoneChainConvexHull)(e)]),fill:_,stroke:x})}},t.prototype.getIcon=function(t){if(void 0===t&&(t=null),null===this.tplIcon||void 0===this.tplIcon||null!==t){var e=Math.min(40,t.width),r=Math.ceil(t.height*(e/t.width)),i=document.createElement("canvas");i.getContext("2d").drawImage(t,0,0,t.width,t.height,0,0,e,r);var n=i.toDataURL(),o=new Image;o.src=n,this.tplIcon=new c.Icon({anchor:[.5,e],anchorXUnits:"fraction",anchorYUnits:"pixels",img:o,imgSize:[e,r]})}return this.tplIcon},t.prototype.poseListeners=function(t){if(void 0===t&&(t=!0),t){var e=this;this.poseListeners(!1),m(this.global).on("resultReceived",(function(t,r){e.resultReceivedHandler.apply(e,[t,r])}))}else m(this.global).off("resultReceived");this.enableMapClick(t),this.enableFilterChange(t)},t.prototype.vectorLayerReady=function(){var t=this;return new Promise((function(e,r){t.waitForVectorLayer(e)}))},t.prototype.waitForVectorLayer=function(t){void 0===this.vectorLayer?setTimeout(this.waitForVectorLayer.bind(this,t),200):t()},t.prototype.enableMapClick=function(t){var e=this;void 0===t&&(t=!0);var r=this;this.vectorLayerReady().then((function(){e.clusterEnabled?(e.map.on("click",(function(t){e.vectorLayer.getFeatures(t.pixel).then((function(t){if(e.clusterMembers=[],t.length>0&&(e.clusterMembers=t[0].get("features")),void 0!==e.clusterMembers&&e.clusterMembers.length>1){var r=(0,y.createEmpty)();e.clusterMembers.forEach((function(t){return(0,y.extend)(r,t.getGeometry().getExtent())}));var i=e.map.getView(),n=e.map.getView().getResolution();i.getZoom()===i.getMaxZoom()||(0,y.getWidth)(r)<n&&(0,y.getWidth)(r)<n?(e.clickFeature=t[0],e.clickResolution=n,e.clusterCircles.setStyle(e.clusterCircleStyle)):i.fit(r,{duration:500,padding:[50,50,50,50]})}else void 0!==e.clusterMembers&&1===e.clusterMembers.length&&e.showFeaturePopup(e.clusterMembers[0])}))})),e.map.on("pointermove",(function(t){e.clusterEnabled&&e.vectorLayer.getFeatures(t.pixel).then((function(t){t.length>0&&t[0]!==e.hoverFeature&&(e.hoverFeature=t[0],e.clusterHulls.setStyle(e.clusterHullStyle),e.map.getTargetElement().style.cursor=e.hoverFeature&&e.hoverFeature.get("features").length>1?"pointer":"")}));var r=e.map.forEachFeatureAtPixel(t.pixel,(function(t){return t}));e.map.getTargetElement().style.cursor=void 0!==r?"pointer":""}))):e.map.on("click",(function(t){e.vectorLayer.getFeatures(t.pixel).then((function(t){e.clusterMembers=[],1===t.length&&e.showFeaturePopup(t[0])}))})),e.popupCloser.on("click",(function(){return r.hideFeaturePopup(),!1}))}))},t.prototype.hideFeaturePopup=function(){this.popupOverlay.setPosition(void 0),this.popupCloser.get(0).blur()},t.prototype.enableFilterChange=function(t){if(""!==this.filterField&&this.filterInput.length>0){var e=this;t?this.filterInput.on("change",(function(t){e.loadData.apply(e,[e.currentUrl])})):this.filterInput.off("change")}},t.prototype.showFeaturePopup=function(t){var e=t.getGeometry().getCoordinates(),r=t.get("properties"),i='<div id="feature-'+r.id+'"><p style="text-align:center;"> ... loading ...</p></div>';this.popupContent.html(i),this.popupOverlay.setPosition(e);var n=this.el.data("url-feature").replace("__NODE__",r.id).replace("__DISPLAY__",this.el.data("view-mode"));fetch(n,{method:"GET",headers:{"Content-Type":"application/json"}}).then((function(t){t.json().then((function(t){m("#feature-"+r.id).html(t.content)}))}))},t.prototype.resultReceivedHandler=function(t,e){if(void 0!==e.json.facets_metadata)for(var r=0,i=Object.entries(e.json.facets_metadata);r<i.length;r++){var n=i[r],o=n[0],a=n[1],s=(m(".openlayers-facets div#"+o),a);this.facetsMapping[s.field_id]=o,this.facetsMappingUrl[s.field_id]=s.url_alias}void 0!==e.json.facets&&this.fillFacets(e.json.facets),this.enableFacetLinkHandler(!0)},t.prototype.recycleUrlFromFacet=function(t,e){var r=this,i=this.currentUrl.split("?")[1],n=new URLSearchParams(i),o=new URLSearchParams({}),a=0,s=new RegExp("^"+e.data("key")+"\\[");return n.forEach((function(i,n){var l=new RegExp("^"+r.facetsMappingUrl[t]+":");n.match(s)?n.match(s)&&null===i.match(l)&&(o.set(e.data("key")+"["+a+"]",i),a++):o.set(n,i)})),this.el.data("url")+"/?"+o.toString()},t.prototype.enableFacetLinkHandler=function(t){if(void 0===t&&(t=!0),t){var e=this;this.enableFacetLinkHandler(!1),m(".openlayers-facets a").on("click",(function(t){return e.facetLinkClickedHandler.apply(e,[t,m(this)])})),m(".openlayers-facets select").on("change",(function(t){return e.facetSelectChangedHandler.apply(e,[t,m(this)])}))}else m(".openlayers-facets a").off("click"),m(".openlayers-facets select").off("change")},t.prototype.facetLinkClickedHandler=function(t,e){return this.enableFacetLinkHandler(!1),this.loadData(e.prop("href")),!1},t.prototype.facetSelectChangedHandler=function(t,e){return this.enableFacetLinkHandler(!1),this.loadData(e.val()),!1},t.prototype.fillFacets=function(t){var e=this.currentUrl.split("?")[1],r=new URLSearchParams(e);for(var i in this.el.trigger("openlayers_beforefacetresponse",[this,t,r]),m(".openlayers-facets li").hide(),m(".openlayers-facets option").not('[value=""]').hide(),t)for(var n=0,o=Object.entries(t[i]);n<o.length;n++){var a=o[n],s=(a[0],a[1]);for(var l in s){var u=s[l];this.fillFacetsRecurse(u,r)}}this.el.trigger("openlayers_afterfacetresponse",[this,t,r])},t.prototype.fillFacetsRecurse=function(t,e){var r=function(r){var n=t[r];if(void 0!==n.raw_value){var o=new RegExp(n.raw_value+"$"),a=!1;e.forEach((function(t,e){null!==t.match(o)&&(a=!0)}));var s=m('.openlayers-facets option[data-value="'+n.raw_value+'"]'),l=m('.openlayers-facets li[data-value="'+n.raw_value+'"]'),u=m('.openlayers-facets li[data-value="'+n.raw_value+'"] a');s.attr("data-count",n.values.count).attr("value",n.url).removeClass("selected").show(),l.attr("data-count",n.values.count).attr("data-href",n.url).removeClass("selected").show(),u.attr("data-count",n.values.count).attr("href",n.url).removeClass("selected").show(),a&&(s.addClass("selected"),l.addClass("selected"),u.addClass("selected")),void 0!==n.children&&void 0!==n.children[0]&&n.children[0].length>0&&i.fillFacetsRecurse(n.children[0],e)}},i=this;for(var n in t)r(n)},t}();e.OpenlayerMap=O},9975:function(t){(function(){var e;t.exports={icon:"icons/google.svg",name:"google",title:"Google Fonts",link:"google.com/fonts",getNames:function(){return e},getLink:function(t){return"https://fonts.google.com/specimen/"+t.replace(/( )/g,"+")},normalizeName:function(t){return t}},e=["ABeeZee","Abel","Abril Fatface","Aclonica","Acme","Actor","Adamina","Advent Pro","Aguafina Script","Akronim","Aladin","Aldrich","Alef","Alegreya","Alegreya SC","Alegreya Sans","Alegreya Sans SC","Alex Brush","Alfa Slab One","Alice","Alike","Alike Angular","Allan","Allerta","Allerta Stencil","Allura","Almendra","Almendra Display","Almendra SC","Amarante","Amaranth","Amatic SC","Amethysta","Amiri","Amita","Anaheim","Andada","Andika","Angkor","Annie Use Your Telescope","Anonymous Pro","Antic","Antic Didone","Antic Slab","Anton","Arapey","Arbutus","Arbutus Slab","Architects Daughter","Archivo Black","Archivo Narrow","Arimo","Arizonia","Armata","Artifika","Arvo","Arya","Asap","Asar","Asset","Astloch","Asul","Atomic Age","Aubrey","Audiowide","Autour One","Average","Average Sans","Averia Gruesa Libre","Averia Libre","Averia Sans Libre","Averia Serif Libre","Bad Script","Balthazar","Bangers","Basic","Battambang","Baumans","Bayon","Belgrano","Belleza","BenchNine","Bentham","Berkshire Swash","Bevan","Bigelow Rules","Bigshot One","Bilbo","Bilbo Swash Caps","Biryani","Bitter","Black Ops One","Bokor","Bonbon","Boogaloo","Bowlby One","Bowlby One SC","Brawler","Bree Serif","Bubblegum Sans","Bubbler One","Buda","Buenard","Butcherman","Butterfly Kids","Cabin","Cabin Condensed","Cabin Sketch","Caesar Dressing","Cagliostro","Calligraffitti","Cambay","Cambo","Candal","Cantarell","Cantata One","Cantora One","Capriola","Cardo","Carme","Carrois Gothic","Carrois Gothic SC","Carter One","Catamaran","Caudex","Caveat","Caveat Brush","Cedarville Cursive","Ceviche One","Changa One","Chango","Chau Philomene One","Chela One","Chelsea Market","Chenla","Cherry Cream Soda","Cherry Swash","Chewy","Chicle","Chivo","Chonburi","Cinzel","Cinzel Decorative","Clicker Script","Coda","Coda Caption","Codystar","Combo","Comfortaa","Coming Soon","Concert One","Condiment","Content","Contrail One","Convergence","Cookie","Copse","Corben","Courgette","Cousine","Coustard","Covered By Your Grace","Crafty Girls","Creepster","Crete Round","Crimson Text","Croissant One","Crushed","Cuprum","Cutive","Cutive Mono","Damion","Dancing Script","Dangrek","Dawning of a New Day","Days One","Dekko","Delius","Delius Swash Caps","Delius Unicase","Della Respira","Denk One","Devonshire","Dhurjati","Didact Gothic","Diplomata","Diplomata SC","Domine","Donegal One","Doppio One","Dorsa","Dosis","Dr Sugiyama","Droid Sans","Droid Sans Mono","Droid Serif","Duru Sans","Dynalight","EB Garamond","Eagle Lake","Eater","Economica","Eczar","Ek Mukta","Electrolize","Elsie","Elsie Swash Caps","Emblema One","Emilys Candy","Engagement","Englebert","Enriqueta","Erica One","Esteban","Euphoria Script","Ewert","Exo","Exo 2","Expletus Sans","Fanwood Text","Fascinate","Fascinate Inline","Faster One","Fasthand","Fauna One","Federant","Federo","Felipa","Fenix","Finger Paint","Fira Mono","Fira Sans","Fjalla One","Fjord One","Flamenco","Flavors","Fondamento","Fontdiner Swanky","Forum","Francois One","Freckle Face","Fredericka the Great","Fredoka One","Freehand","Fresca","Frijole","Fruktur","Fugaz One","GFS Didot","GFS Neohellenic","Gabriela","Gafata","Galdeano","Galindo","Gentium Basic","Gentium Book Basic","Geo","Geostar","Geostar Fill","Germania One","Gidugu","Gilda Display","Give You Glory","Glass Antiqua","Glegoo","Gloria Hallelujah","Goblin One","Gochi Hand","Gorditas","Goudy Bookletter 1911","Graduate","Grand Hotel","Gravitas One","Great Vibes","Griffy","Gruppo","Gudea","Gurajada","Habibi","Halant","Hammersmith One","Hanalei","Hanalei Fill","Handlee","Hanuman","Happy Monkey","Headland One","Henny Penny","Herr Von Muellerhoff","Hind","Hind Siliguri","Hind Vadodara","Holtwood One SC","Homemade Apple","Homenaje","IM Fell DW Pica","IM Fell DW Pica SC","IM Fell Double Pica","IM Fell Double Pica SC","IM Fell English","IM Fell English SC","IM Fell French Canon","IM Fell French Canon SC","IM Fell Great Primer","IM Fell Great Primer SC","Iceberg","Iceland","Imprima","Inconsolata","Inder","Indie Flower","Inika","Inknut Antiqua","Irish Grover","Istok Web","Italiana","Italianno","Itim","Jacques Francois","Jacques Francois Shadow","Jaldi","Jim Nightshade","Jockey One","Jolly Lodger","Josefin Sans","Josefin Slab","Joti One","Judson","Julee","Julius Sans One","Junge","Jura","Just Another Hand","Just Me Again Down Here","Kadwa","Kalam","Kameron","Kantumruy","Karla","Karma","Kaushan Script","Kavoon","Kdam Thmor","Keania One","Kelly Slab","Kenia","Khand","Khmer","Khula","Kite One","Knewave","Kotta One","Koulen","Kranky","Kreon","Kristi","Krona One","Kurale","La Belle Aurore","Laila","Lakki Reddy","Lancelot","Lateef","Lato","League Script","Leckerli One","Ledger","Lekton","Lemon","Libre Baskerville","Life Savers","Lilita One","Lily Script One","Limelight","Linden Hill","Lobster","Lobster Two","Londrina Outline","Londrina Shadow","Londrina Sketch","Londrina Solid","Lora","Love Ya Like A Sister","Loved by the King","Lovers Quarrel","Luckiest Guy","Lusitana","Lustria","Macondo","Macondo Swash Caps","Magra","Maiden Orange","Mako","Mallanna","Mandali","Marcellus","Marcellus SC","Marck Script","Margarine","Marko One","Marmelad","Martel","Martel Sans","Marvel","Mate","Mate SC","Maven Pro","McLaren","Meddon","MedievalSharp","Medula One","Megrim","Meie Script","Merienda","Merienda One","Merriweather","Merriweather Sans","Metal","Metal Mania","Metamorphous","Metrophobic","Michroma","Milonga","Miltonian","Miltonian Tattoo","Miniver","Miss Fajardose","Modak","Modern Antiqua","Molengo","Molle","Monda","Monofett","Monoton","Monsieur La Doulaise","Montaga","Montez","Montserrat","Montserrat Alternates","Montserrat Subrayada","Moul","Moulpali","Mountains of Christmas","Mouse Memoirs","Mr Bedfort","Mr Dafoe","Mr De Haviland","Mrs Saint Delafield","Mrs Sheppards","Muli","Mystery Quest","NTR","Neucha","Neuton","New Rocker","News Cycle","Niconne","Nixie One","Nobile","Nokora","Norican","Nosifer","Nothing You Could Do","Noticia Text","Noto Sans","Noto Serif","Nova Cut","Nova Flat","Nova Mono","Nova Oval","Nova Round","Nova Script","Nova Slim","Nova Square","Numans","Nunito","Odor Mean Chey","Offside","Old Standard TT","Oldenburg","Oleo Script","Oleo Script Swash Caps","Open Sans","Open Sans Condensed","Oranienbaum","Orbitron","Oregano","Orienta","Original Surfer","Oswald","Over the Rainbow","Overlock","Overlock SC","Ovo","Oxygen","Oxygen Mono","PT Mono","PT Sans","PT Sans Caption","PT Sans Narrow","PT Serif","PT Serif Caption","Pacifico","Palanquin","Palanquin Dark","Paprika","Parisienne","Passero One","Passion One","Pathway Gothic One","Patrick Hand","Patrick Hand SC","Patua One","Paytone One","Peddana","Peralta","Permanent Marker","Petit Formal Script","Petrona","Philosopher","Piedra","Pinyon Script","Pirata One","Plaster","Play","Playball","Playfair Display","Playfair Display SC","Podkova","Poiret One","Poller One","Poly","Pompiere","Pontano Sans","Poppins","Port Lligat Sans","Port Lligat Slab","Pragati Narrow","Prata","Preahvihear","Press Start 2P","Princess Sofia","Prociono","Prosto One","Puritan","Purple Purse","Quando","Quantico","Quattrocento","Quattrocento Sans","Questrial","Quicksand","Quintessential","Qwigley","Racing Sans One","Radley","Rajdhani","Raleway","Raleway Dots","Ramabhadra","Ramaraja","Rambla","Rammetto One","Ranchers","Rancho","Ranga","Rationale","Ravi Prakash","Redressed","Reenie Beanie","Revalia","Rhodium Libre","Ribeye","Ribeye Marrow","Righteous","Risque","Roboto","Roboto Condensed","Roboto Mono","Roboto Slab","Rochester","Rock Salt","Rokkitt","Romanesco","Ropa Sans","Rosario","Rosarivo","Rouge Script","Rozha One","Rubik","Rubik Mono One","Rubik One","Ruda","Rufina","Ruge Boogie","Ruluko","Rum Raisin","Ruslan Display","Russo One","Ruthie","Rye","Sacramento","Sahitya","Sail","Salsa","Sanchez","Sancreek","Sansita One","Sarala","Sarina","Sarpanch","Satisfy","Scada","Scheherazade","Schoolbell","Seaweed Script","Sevillana","Seymour One","Shadows Into Light","Shadows Into Light Two","Shanti","Share","Share Tech","Share Tech Mono","Shojumaru","Short Stack","Siemreap","Sigmar One","Signika","Signika Negative","Simonetta","Sintony","Sirin Stencil","Six Caps","Skranji","Slabo 13px","Slabo 27px","Slackey","Smokum","Smythe","Sniglet","Snippet","Snowburst One","Sofadi One","Sofia","Sonsie One","Sorts Mill Goudy","Source Code Pro","Source Sans Pro","Source Serif Pro","Special Elite","Spicy Rice","Spinnaker","Spirax","Squada One","Sree Krushnadevaraya","Stalemate","Stalinist One","Stardos Stencil","Stint Ultra Condensed","Stint Ultra Expanded","Stoke","Strait","Sue Ellen Francisco","Sumana","Sunshiney","Supermercado One","Sura","Suranna","Suravaram","Suwannaphum","Swanky and Moo Moo","Syncopate","Tangerine","Taprom","Tauri","Teko","Telex","Tenali Ramakrishna","Tenor Sans","Text Me One","The Girl Next Door","Tienne","Tillana","Timmana","Tinos","Titan One","Titillium Web","Trade Winds","Trocchi","Trochut","Trykker","Tulpen One","Ubuntu","Ubuntu Condensed","Ubuntu Mono","Ultra","Uncial Antiqua","Underdog","Unica One","UnifrakturCook","UnifrakturMaguntia","Unkempt","Unlock","Unna","VT323","Vampiro One","Varela","Varela Round","Vast Shadow","Vesper Libre","Vibur","Vidaloka","Viga","Voces","Volkhov","Vollkorn","Voltaire","Waiting for the Sunrise","Wallpoet","Walter Turncoat","Warnes","Wellfleet","Wendy One","Wire One","Work Sans","Yanone Kaffeesatz","Yantramanav","Yellowtail","Yeseva One","Yesteryear","Zeyada"]}).call(this)},4635:(t,e,r)=>{const i=r(9622);t.exports=function(t,e,r){const n=r&&r.debug||!1,o=r&&r.startIndex||0;n&&console.log("starting findTagByName with",e," and ",r);const a=i(t,`<${e}[ >]`,o);if(n&&console.log("start:",a),-1===a)return;const s=t.slice(a+e.length);let l=i(s,"[ /]"+e+">",0);const u=-1===l;u&&(l=i(s,"[ /]>",0));const c=a+e.length+l+1+(u?0:e.length)+1;if(n&&console.log("end:",c),-1===c)return;const h=t.slice(a,c);let p;return p=u?null:h.slice(h.indexOf(">")+1,h.lastIndexOf("<")),{inner:p,outer:h,start:a,end:c}}},8602:(t,e,r)=>{const i=r(4635);t.exports=function(t,e,r){const n=[],o=r&&r.debug||!1;let a,s=r&&r.startIndex||0;for(;a=i(t,e,{debug:o,startIndex:s});)s=a.end,n.push(a);return o&&console.log("findTagsByName found",n.length,"tags"),n}},8330:t=>{t.exports=function(t,e,r){const i=r&&r.debug||!1;i&&console.log("getting "+e+" in "+t);const n="object"==typeof t?t.outer:t,o=`${e}\\="([^"]*)"`;i&&console.log("pattern:",o);const a=new RegExp(o).exec(n);if(i&&console.log("match:",a),a)return a[1]}},9622:t=>{t.exports=function(t,e,r){const i=new RegExp(e).exec(t.slice(r));return i?r+i.index:-1}},5311:t=>{"use strict";t.exports=jQuery},3752:()=>{},3640:()=>{},2630:()=>{},2499:(t,e,r)=>{"use strict";r.d(e,{Ie:()=>l,It:()=>o,L:()=>i,L5:()=>c,P1:()=>p,Qb:()=>h,pd:()=>u,sf:()=>s});const i={315:"Artist",258:"BitsPerSample",265:"CellLength",264:"CellWidth",320:"ColorMap",259:"Compression",33432:"Copyright",306:"DateTime",338:"ExtraSamples",266:"FillOrder",289:"FreeByteCounts",288:"FreeOffsets",291:"GrayResponseCurve",290:"GrayResponseUnit",316:"HostComputer",270:"ImageDescription",257:"ImageLength",256:"ImageWidth",271:"Make",281:"MaxSampleValue",280:"MinSampleValue",272:"Model",254:"NewSubfileType",274:"Orientation",262:"PhotometricInterpretation",284:"PlanarConfiguration",296:"ResolutionUnit",278:"RowsPerStrip",277:"SamplesPerPixel",305:"Software",279:"StripByteCounts",273:"StripOffsets",255:"SubfileType",263:"Threshholding",282:"XResolution",283:"YResolution",326:"BadFaxLines",327:"CleanFaxData",343:"ClipPath",328:"ConsecutiveBadFaxLines",433:"Decode",434:"DefaultImageColor",269:"DocumentName",336:"DotRange",321:"HalftoneHints",346:"Indexed",347:"JPEGTables",285:"PageName",297:"PageNumber",317:"Predictor",319:"PrimaryChromaticities",532:"ReferenceBlackWhite",339:"SampleFormat",340:"SMinSampleValue",341:"SMaxSampleValue",559:"StripRowCounts",330:"SubIFDs",292:"T4Options",293:"T6Options",325:"TileByteCounts",323:"TileLength",324:"TileOffsets",322:"TileWidth",301:"TransferFunction",318:"WhitePoint",344:"XClipPathUnits",286:"XPosition",529:"YCbCrCoefficients",531:"YCbCrPositioning",530:"YCbCrSubSampling",345:"YClipPathUnits",287:"YPosition",37378:"ApertureValue",40961:"ColorSpace",36868:"DateTimeDigitized",36867:"DateTimeOriginal",34665:"Exif IFD",36864:"ExifVersion",33434:"ExposureTime",41728:"FileSource",37385:"Flash",40960:"FlashpixVersion",33437:"FNumber",42016:"ImageUniqueID",37384:"LightSource",37500:"MakerNote",37377:"ShutterSpeedValue",37510:"UserComment",33723:"IPTC",34675:"ICC Profile",700:"XMP",42112:"GDAL_METADATA",42113:"GDAL_NODATA",34377:"Photoshop",33550:"ModelPixelScale",33922:"ModelTiepoint",34264:"ModelTransformation",34735:"GeoKeyDirectory",34736:"GeoDoubleParams",34737:"GeoAsciiParams",50674:"LercParameters"},n={};for(const t in i)i.hasOwnProperty(t)&&(n[i[t]]=parseInt(t,10));const o=[n.BitsPerSample,n.ExtraSamples,n.SampleFormat,n.StripByteCounts,n.StripOffsets,n.StripRowCounts,n.TileByteCounts,n.TileOffsets,n.SubIFDs],a={1:"BYTE",2:"ASCII",3:"SHORT",4:"LONG",5:"RATIONAL",6:"SBYTE",7:"UNDEFINED",8:"SSHORT",9:"SLONG",10:"SRATIONAL",11:"FLOAT",12:"DOUBLE",13:"IFD",16:"LONG8",17:"SLONG8",18:"IFD8"},s={};for(const t in a)a.hasOwnProperty(t)&&(s[a[t]]=parseInt(t,10));const l={WhiteIsZero:0,BlackIsZero:1,RGB:2,Palette:3,TransparencyMask:4,CMYK:5,YCbCr:6,CIELab:8,ICCLab:9},u={Unspecified:0,Assocalpha:1,Unassalpha:2},c={Version:0,AddCompression:1},h={None:0,Deflate:1},p={1024:"GTModelTypeGeoKey",1025:"GTRasterTypeGeoKey",1026:"GTCitationGeoKey",2048:"GeographicTypeGeoKey",2049:"GeogCitationGeoKey",2050:"GeogGeodeticDatumGeoKey",2051:"GeogPrimeMeridianGeoKey",2052:"GeogLinearUnitsGeoKey",2053:"GeogLinearUnitSizeGeoKey",2054:"GeogAngularUnitsGeoKey",2055:"GeogAngularUnitSizeGeoKey",2056:"GeogEllipsoidGeoKey",2057:"GeogSemiMajorAxisGeoKey",2058:"GeogSemiMinorAxisGeoKey",2059:"GeogInvFlatteningGeoKey",2060:"GeogAzimuthUnitsGeoKey",2061:"GeogPrimeMeridianLongGeoKey",2062:"GeogTOWGS84GeoKey",3072:"ProjectedCSTypeGeoKey",3073:"PCSCitationGeoKey",3074:"ProjectionGeoKey",3075:"ProjCoordTransGeoKey",3076:"ProjLinearUnitsGeoKey",3077:"ProjLinearUnitSizeGeoKey",3078:"ProjStdParallel1GeoKey",3079:"ProjStdParallel2GeoKey",3080:"ProjNatOriginLongGeoKey",3081:"ProjNatOriginLatGeoKey",3082:"ProjFalseEastingGeoKey",3083:"ProjFalseNorthingGeoKey",3084:"ProjFalseOriginLongGeoKey",3085:"ProjFalseOriginLatGeoKey",3086:"ProjFalseOriginEastingGeoKey",3087:"ProjFalseOriginNorthingGeoKey",3088:"ProjCenterLongGeoKey",3089:"ProjCenterLatGeoKey",3090:"ProjCenterEastingGeoKey",3091:"ProjCenterNorthingGeoKey",3092:"ProjScaleAtNatOriginGeoKey",3093:"ProjScaleAtCenterGeoKey",3094:"ProjAzimuthAngleGeoKey",3095:"ProjStraightVertPoleLongGeoKey",3096:"ProjRectifiedGridAngleGeoKey",4096:"VerticalCSTypeGeoKey",4097:"VerticalCitationGeoKey",4098:"VerticalDatumGeoKey",4099:"VerticalUnitsGeoKey"},d={};for(const t in p)p.hasOwnProperty(t)&&(d[p[t]]=parseInt(t,10))},6813:(t,e,r)=>{"use strict";r.d(e,{Z:()=>a});var i,n=r(4187),o=(i=function(t,e){return i=Object.setPrototypeOf||{__proto__:[]}instanceof Array&&function(t,e){t.__proto__=e}||function(t,e){for(var r in e)Object.prototype.hasOwnProperty.call(e,r)&&(t[r]=e[r])},i(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 r(){this.constructor=t}i(t,e),t.prototype=null===e?Object.create(e):(r.prototype=e.prototype,new r)});const a=function(t){function e(e){var r=this,i="Assertion failed. See https://openlayers.org/en/"+("latest"===n.q4?n.q4:"v"+n.q4.split("-")[0])+"/doc/errors/#"+e+" for details.";return(r=t.call(this,i)||this).code=e,r.name="AssertionError",r.message=i,r}return o(e,t),e}(Error)},8714:(t,e,r)=>{"use strict";r.d(e,{Z:()=>h});var i,n=r(6813),o=r(2971),a=r(2071),s=r(291),l=(i=function(t,e){return i=Object.setPrototypeOf||{__proto__:[]}instanceof Array&&function(t,e){t.__proto__=e}||function(t,e){for(var r in e)Object.prototype.hasOwnProperty.call(e,r)&&(t[r]=e[r])},i(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 r(){this.constructor=t}i(t,e),t.prototype=null===e?Object.create(e):(r.prototype=e.prototype,new r)}),u="length",c=function(t){function e(e,r,i){var n=t.call(this,e)||this;return n.element=r,n.index=i,n}return l(e,t),e}(s.ZP);const h=function(t){function e(e,r){var i=t.call(this)||this;i.on,i.once,i.un;var n=r||{};if(i.unique_=!!n.unique,i.array_=e||[],i.unique_)for(var o=0,a=i.array_.length;o<a;++o)i.assertUnique_(i.array_[o],o);return i.updateLength_(),i}return l(e,t),e.prototype.clear=function(){for(;this.getLength()>0;)this.pop()},e.prototype.extend=function(t){for(var e=0,r=t.length;e<r;++e)this.push(t[e]);return this},e.prototype.forEach=function(t){for(var e=this.array_,r=0,i=e.length;r<i;++r)t(e[r],r,e)},e.prototype.getArray=function(){return this.array_},e.prototype.item=function(t){return this.array_[t]},e.prototype.getLength=function(){return this.get(u)},e.prototype.insertAt=function(t,e){this.unique_&&this.assertUnique_(e),this.array_.splice(t,0,e),this.updateLength_(),this.dispatchEvent(new c(a.Z.ADD,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_,r=0,i=e.length;r<i;++r)if(e[r]===t)return this.removeAt(r)},e.prototype.removeAt=function(t){var e=this.array_[t];return this.array_.splice(t,1),this.updateLength_(),this.dispatchEvent(new c(a.Z.REMOVE,e,t)),e},e.prototype.setAt=function(t,e){var r=this.getLength();if(t<r){this.unique_&&this.assertUnique_(e,t);var i=this.array_[t];this.array_[t]=e,this.dispatchEvent(new c(a.Z.REMOVE,i,t)),this.dispatchEvent(new c(a.Z.ADD,e,t))}else{for(var n=r;n<t;++n)this.insertAt(n,void 0);this.insertAt(t,e)}},e.prototype.updateLength_=function(){this.set(u,this.array_.length)},e.prototype.assertUnique_=function(t,e){for(var r=0,i=this.array_.length;r<i;++r)if(this.array_[r]===t&&r!==e)throw new n.Z(58)},e}(o.Z)},2071:(t,e,r)=>{"use strict";r.d(e,{Z:()=>i});const i={ADD:"add",REMOVE:"remove"}},349:(t,e,r)=>{"use strict";r.d(e,{Z:()=>s});var i,n=r(4806),o=r(7195),a=(i=function(t,e){return i=Object.setPrototypeOf||{__proto__:[]}instanceof Array&&function(t,e){t.__proto__=e}||function(t,e){for(var r in e)Object.prototype.hasOwnProperty.call(e,r)&&(t[r]=e[r])},i(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 r(){this.constructor=t}i(t,e),t.prototype=null===e?Object.create(e):(r.prototype=e.prototype,new r)});const s=function(t){function e(e){var r=this,i=o.Z.IDLE;return(r=t.call(this,e.tileCoord,i,{transition:e.transition,interpolate:e.interpolate})||this).loader_=e.loader,r.data_=null,r.error_=null,r}return a(e,t),e.prototype.getData=function(){return this.data_},e.prototype.getError=function(){return this.error_},e.prototype.load=function(){this.state=o.Z.LOADING,this.changed();var t=this;this.loader_().then((function(e){t.data_=e,t.state=o.Z.LOADED,t.changed()})).catch((function(e){t.error_=e,t.state=o.Z.ERROR,t.changed()}))},e}(n.Z)},5431:(t,e,r)=>{"use strict";r.d(e,{Z:()=>i});const i=function(){function t(){this.disposed=!1}return t.prototype.dispose=function(){this.disposed||(this.disposed=!0,this.disposeInternal())},t.prototype.disposeInternal=function(){},t}()},1090:(t,e,r)=>{"use strict";r.r(e),r.d(e,{createStyleFunction:()=>u,default:()=>c});var i,n=r(2971),o=r(5487),a=r(9515),s=r(5818),l=(i=function(t,e){return i=Object.setPrototypeOf||{__proto__:[]}instanceof Array&&function(t,e){t.__proto__=e}||function(t,e){for(var r in e)Object.prototype.hasOwnProperty.call(e,r)&&(t[r]=e[r])},i(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 r(){this.constructor=t}i(t,e),t.prototype=null===e?Object.create(e):(r.prototype=e.prototype,new r)});function u(t){return"function"==typeof t?t:(Array.isArray(t)?e=t:((0,a.h)("function"==typeof t.getZIndex,41),e=[t]),function(){return e});var e}const c=function(t){function e(e){var r=t.call(this)||this;if(r.on,r.once,r.un,r.id_=void 0,r.geometryName_="geometry",r.style_=null,r.styleFunction_=void 0,r.geometryChangeKey_=null,r.addChangeListener(r.geometryName_,r.handleGeometryChanged_),e)if("function"==typeof e.getSimplifiedGeometry){var i=e;r.setGeometry(i)}else{var n=e;r.setProperties(n)}return r}return l(e,t),e.prototype.clone=function(){var t=new e(this.hasProperties()?this.getProperties():null);t.setGeometryName(this.getGeometryName());var r=this.getGeometry();r&&t.setGeometry(r.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_&&((0,s.bN)(this.geometryChangeKey_),this.geometryChangeKey_=null);var t=this.getGeometry();t&&(this.geometryChangeKey_=(0,s.oL)(t,o.Z.CHANGE,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?u(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}(n.Z)},8096:(t,e,r)=>{"use strict";r.d(e,{K:()=>h,Z:()=>p});var i,n=r(5487),o=r(1798),a=r(553),s=r(177),l=r(8641),u=r(5818),c=(i=function(t,e){return i=Object.setPrototypeOf||{__proto__:[]}instanceof Array&&function(t,e){t.__proto__=e}||function(t,e){for(var r in e)Object.prototype.hasOwnProperty.call(e,r)&&(t[r]=e[r])},i(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 r(){this.constructor=t}i(t,e),t.prototype=null===e?Object.create(e):(r.prototype=e.prototype,new r)});function h(t,e,r){var i=t,o=!0,a=!1,l=!1,c=[(0,u.Vx)(i,n.Z.LOAD,(function(){l=!0,a||e()}))];return i.src&&s.Tp?(a=!0,i.decode().then((function(){o&&e()})).catch((function(t){o&&(l?e():r())}))):c.push((0,u.Vx)(i,n.Z.ERROR,r)),function(){o=!1,c.forEach(u.bN)}}const p=function(t){function e(e,r,i,n,o,s){var l=t.call(this,e,r,i,a.Z.IDLE)||this;return l.src_=n,l.image_=new Image,null!==o&&(l.image_.crossOrigin=o),l.unlisten_=null,l.state=a.Z.IDLE,l.imageLoadFunction_=s,l}return c(e,t),e.prototype.getImage=function(){return this.image_},e.prototype.handleImageError_=function(){this.state=a.Z.ERROR,this.unlistenImage_(),this.changed()},e.prototype.handleImageLoad_=function(){void 0===this.resolution&&(this.resolution=(0,l.getHeight)(this.extent)/this.image_.height),this.state=a.Z.LOADED,this.unlistenImage_(),this.changed()},e.prototype.load=function(){this.state!=a.Z.IDLE&&this.state!=a.Z.ERROR||(this.state=a.Z.LOADING,this.changed(),this.imageLoadFunction_(this,this.src_),this.unlisten_=h(this.image_,this.handleImageLoad_.bind(this),this.handleImageError_.bind(this)))},e.prototype.setImage=function(t){this.image_=t,this.resolution=(0,l.getHeight)(this.extent)/this.image_.height},e.prototype.unlistenImage_=function(){this.unlisten_&&(this.unlisten_(),this.unlisten_=null)},e}(o.Z)},1798:(t,e,r)=>{"use strict";r.d(e,{Z:()=>l});var i,n=r(208),o=r(5487),a=r(4187),s=(i=function(t,e){return i=Object.setPrototypeOf||{__proto__:[]}instanceof Array&&function(t,e){t.__proto__=e}||function(t,e){for(var r in e)Object.prototype.hasOwnProperty.call(e,r)&&(t[r]=e[r])},i(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 r(){this.constructor=t}i(t,e),t.prototype=null===e?Object.create(e):(r.prototype=e.prototype,new r)});const l=function(t){function e(e,r,i,n){var o=t.call(this)||this;return o.extent=e,o.pixelRatio_=i,o.resolution=r,o.state=n,o}return s(e,t),e.prototype.changed=function(){this.dispatchEvent(o.Z.CHANGE)},e.prototype.getExtent=function(){return this.extent},e.prototype.getImage=function(){return(0,a.O3)()},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(){(0,a.O3)()},e}(n.Z)},8294:(t,e,r)=>{"use strict";r.d(e,{Z:()=>s});var i,n=r(1798),o=r(553),a=(i=function(t,e){return i=Object.setPrototypeOf||{__proto__:[]}instanceof Array&&function(t,e){t.__proto__=e}||function(t,e){for(var r in e)Object.prototype.hasOwnProperty.call(e,r)&&(t[r]=e[r])},i(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 r(){this.constructor=t}i(t,e),t.prototype=null===e?Object.create(e):(r.prototype=e.prototype,new r)});const s=function(t){function e(e,r,i,n,a){var s=this,l=void 0!==a?o.Z.IDLE:o.Z.LOADED;return(s=t.call(this,e,r,i,l)||this).loader_=void 0!==a?a:null,s.canvas_=n,s.error_=null,s}return a(e,t),e.prototype.getError=function(){return this.error_},e.prototype.handleLoad_=function(t){t?(this.error_=t,this.state=o.Z.ERROR):this.state=o.Z.LOADED,this.changed()},e.prototype.load=function(){this.state==o.Z.IDLE&&(this.state=o.Z.LOADING,this.changed(),this.loader_(this.handleLoad_.bind(this)))},e.prototype.getImage=function(){return this.canvas_},e}(n.Z)},553:(t,e,r)=>{"use strict";r.d(e,{Z:()=>i});const i={IDLE:0,LOADING:1,LOADED:2,ERROR:3,EMPTY:4}},825:(t,e,r)=>{"use strict";r.d(e,{Z:()=>u});var i,n=r(4806),o=r(7195),a=r(8326),s=r(8096),l=(i=function(t,e){return i=Object.setPrototypeOf||{__proto__:[]}instanceof Array&&function(t,e){t.__proto__=e}||function(t,e){for(var r in e)Object.prototype.hasOwnProperty.call(e,r)&&(t[r]=e[r])},i(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 r(){this.constructor=t}i(t,e),t.prototype=null===e?Object.create(e):(r.prototype=e.prototype,new r)});const u=function(t){function e(e,r,i,n,o,a){var s=t.call(this,e,r,a)||this;return s.crossOrigin_=n,s.src_=i,s.key=i,s.image_=new Image,null!==n&&(s.image_.crossOrigin=n),s.unlisten_=null,s.tileLoadFunction_=o,s}return l(e,t),e.prototype.getImage=function(){return this.image_},e.prototype.setImage=function(t){this.image_=t,this.state=o.Z.LOADED,this.unlistenImage_(),this.changed()},e.prototype.handleImageError_=function(){var t;this.state=o.Z.ERROR,this.unlistenImage_(),this.image_=((t=(0,a.E4)(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=o.Z.LOADED:this.state=o.Z.EMPTY,this.unlistenImage_(),this.changed()},e.prototype.load=function(){this.state==o.Z.ERROR&&(this.state=o.Z.IDLE,this.image_=new Image,null!==this.crossOrigin_&&(this.image_.crossOrigin=this.crossOrigin_)),this.state==o.Z.IDLE&&(this.state=o.Z.LOADING,this.changed(),this.tileLoadFunction_(this,this.src_),this.unlisten_=(0,s.K)(this.image_,this.handleImageLoad_.bind(this),this.handleImageError_.bind(this)))},e.prototype.unlistenImage_=function(){this.unlisten_&&(this.unlisten_(),this.unlisten_=null)},e}(n.Z)},1230:(t,e,r)=>{"use strict";r.d(e,{Z:()=>i});const i=function(){function t(t,e,r){this.decay_=t,this.minVelocity_=e,this.delay_=r,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 r=e-3;r>0&&this.points_[r+2]>t;)r-=3;var i=this.points_[e+2]-this.points_[r+2];if(i<1e3/60)return!1;var n=this.points_[e]-this.points_[r],o=this.points_[e+1]-this.points_[r+1];return this.angle_=Math.atan2(o,n),this.initialVelocity_=Math.sqrt(n*n+o*o)/i,this.initialVelocity_>this.minVelocity_},t.prototype.getDistance=function(){return(this.minVelocity_-this.initialVelocity_)/this.decay_},t.prototype.getAngle=function(){return this.angle_},t}()},8630:(t,e,r)=>{"use strict";r.d(e,{Z:()=>a});var i,n=r(3536),o=(i=function(t,e){return i=Object.setPrototypeOf||{__proto__:[]}instanceof Array&&function(t,e){t.__proto__=e}||function(t,e){for(var r in e)Object.prototype.hasOwnProperty.call(e,r)&&(t[r]=e[r])},i(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 r(){this.constructor=t}i(t,e),t.prototype=null===e?Object.create(e):(r.prototype=e.prototype,new r)});const a=function(t){function e(e,r,i,n,o){var a=t.call(this,e,r,o)||this;return a.originalEvent=i,a.pixel_=null,a.coordinate_=null,a.dragging=void 0!==n&&n,a}return o(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}(n.Z)},1708:(t,e,r)=>{"use strict";r.d(e,{Z:()=>d});var i,n=r(5487),o=r(8630),a=r(2217),s=r(4238),l=r(208),u=r(177),c=r(6885),h=r(5818),p=(i=function(t,e){return i=Object.setPrototypeOf||{__proto__:[]}instanceof Array&&function(t,e){t.__proto__=e}||function(t,e){for(var r in e)Object.prototype.hasOwnProperty.call(e,r)&&(t[r]=e[r])},i(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 r(){this.constructor=t}i(t,e),t.prototype=null===e?Object.create(e):(r.prototype=e.prototype,new r)});const d=function(t){function e(e,r){var i=t.call(this,e)||this;i.map_=e,i.clickTimeoutId_,i.emulateClicks_=!1,i.dragging_=!1,i.dragListenerKeys_=[],i.moveTolerance_=void 0===r?1:r,i.down_=null;var o=i.map_.getViewport();return i.activePointers_=0,i.trackedTouches_={},i.element_=o,i.pointerdownListenerKey_=(0,h.oL)(o,s.Z.POINTERDOWN,i.handlePointerDown_,i),i.originalPointerMoveEvent_,i.relayedListenerKey_=(0,h.oL)(o,s.Z.POINTERMOVE,i.relayEvent_,i),i.boundHandleTouchMove_=i.handleTouchMove_.bind(i),i.element_.addEventListener(n.Z.TOUCHMOVE,i.boundHandleTouchMove_,!!u.bM&&{passive:!1}),i}return p(e,t),e.prototype.emulateClick_=function(t){var e=new o.Z(a.Z.CLICK,this.map_,t);this.dispatchEvent(e),void 0!==this.clickTimeoutId_?(clearTimeout(this.clickTimeoutId_),this.clickTimeoutId_=void 0,e=new o.Z(a.Z.DBLCLICK,this.map_,t),this.dispatchEvent(e)):this.clickTimeoutId_=setTimeout(function(){this.clickTimeoutId_=void 0;var e=new o.Z(a.Z.SINGLECLICK,this.map_,t);this.dispatchEvent(e)}.bind(this),250)},e.prototype.updateActivePointers_=function(t){var e=t;e.type==a.Z.POINTERUP||e.type==a.Z.POINTERCANCEL?delete this.trackedTouches_[e.pointerId]:e.type==a.Z.POINTERDOWN&&(this.trackedTouches_[e.pointerId]=!0),this.activePointers_=Object.keys(this.trackedTouches_).length},e.prototype.handlePointerUp_=function(t){this.updateActivePointers_(t);var e=new o.Z(a.Z.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(h.bN),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 o.Z(a.Z.POINTERDOWN,this.map_,t);for(var r in this.dispatchEvent(e),this.down_={},t){var i=t[r];this.down_[r]="function"==typeof i?c.Zn:i}if(0===this.dragListenerKeys_.length){var n=this.map_.getOwnerDocument();this.dragListenerKeys_.push((0,h.oL)(n,a.Z.POINTERMOVE,this.handlePointerMove_,this),(0,h.oL)(n,a.Z.POINTERUP,this.handlePointerUp_,this),(0,h.oL)(this.element_,a.Z.POINTERCANCEL,this.handlePointerUp_,this)),this.element_.getRootNode&&this.element_.getRootNode()!==n&&this.dragListenerKeys_.push((0,h.oL)(this.element_.getRootNode(),a.Z.POINTERUP,this.handlePointerUp_,this))}},e.prototype.handlePointerMove_=function(t){if(this.isMoving_(t)){this.dragging_=!0;var e=new o.Z(a.Z.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 o.Z(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_&&((0,h.bN)(this.relayedListenerKey_),this.relayedListenerKey_=null),this.element_.removeEventListener(n.Z.TOUCHMOVE,this.boundHandleTouchMove_),this.pointerdownListenerKey_&&((0,h.bN)(this.pointerdownListenerKey_),this.pointerdownListenerKey_=null),this.dragListenerKeys_.forEach(h.bN),this.dragListenerKeys_.length=0,this.element_=null,t.prototype.disposeInternal.call(this)},e}(l.Z)},2217:(t,e,r)=>{"use strict";r.d(e,{Z:()=>n});var i=r(5487);const n={SINGLECLICK:"singleclick",CLICK:i.Z.CLICK,DBLCLICK:i.Z.DBLCLICK,POINTERDRAG:"pointerdrag",POINTERMOVE:"pointermove",POINTERDOWN:"pointerdown",POINTERUP:"pointerup",POINTEROVER:"pointerover",POINTEROUT:"pointerout",POINTERENTER:"pointerenter",POINTERLEAVE:"pointerleave",POINTERCANCEL:"pointercancel"}},3536:(t,e,r)=>{"use strict";r.d(e,{Z:()=>a});var i,n=r(291),o=(i=function(t,e){return i=Object.setPrototypeOf||{__proto__:[]}instanceof Array&&function(t,e){t.__proto__=e}||function(t,e){for(var r in e)Object.prototype.hasOwnProperty.call(e,r)&&(t[r]=e[r])},i(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 r(){this.constructor=t}i(t,e),t.prototype=null===e?Object.create(e):(r.prototype=e.prototype,new r)});const a=function(t){function e(e,r,i){var n=t.call(this,e)||this;return n.map=r,n.frameState=void 0!==i?i:null,n}return o(e,t),e}(n.ZP)},2126:(t,e,r)=>{"use strict";r.d(e,{Z:()=>i});const i={POSTRENDER:"postrender",MOVESTART:"movestart",MOVEEND:"moveend",LOADSTART:"loadstart",LOADEND:"loadend"}},3222:(t,e,r)=>{"use strict";r.d(e,{Z:()=>i});const i={LAYERGROUP:"layergroup",SIZE:"size",TARGET:"target",VIEW:"view"}},2971:(t,e,r)=>{"use strict";r.d(e,{Z:()=>h});var i,n=r(291),o=r(5990),a=r(2706),s=r(9374),l=r(4187),u=(i=function(t,e){return i=Object.setPrototypeOf||{__proto__:[]}instanceof Array&&function(t,e){t.__proto__=e}||function(t,e){for(var r in e)Object.prototype.hasOwnProperty.call(e,r)&&(t[r]=e[r])},i(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 r(){this.constructor=t}i(t,e),t.prototype=null===e?Object.create(e):(r.prototype=e.prototype,new r)}),c=function(t){function e(e,r,i){var n=t.call(this,e)||this;return n.key=r,n.oldValue=i,n}return u(e,t),e}(n.ZP);const h=function(t){function e(e){var r=t.call(this)||this;return r.on,r.once,r.un,(0,l.sq)(r),r.values_=null,void 0!==e&&r.setProperties(e),r}return u(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_&&(0,s.f0)({},this.values_)||{}},e.prototype.hasProperties=function(){return!!this.values_},e.prototype.notify=function(t,e){var r;r="change:".concat(t),this.hasListener(r)&&this.dispatchEvent(new c(r,t,e)),r=o.Z.PROPERTYCHANGE,this.hasListener(r)&&this.dispatchEvent(new c(r,t,e))},e.prototype.addChangeListener=function(t,e){this.addEventListener("change:".concat(t),e)},e.prototype.removeChangeListener=function(t,e){this.removeEventListener("change:".concat(t),e)},e.prototype.set=function(t,e,r){var i=this.values_||(this.values_={});if(r)i[t]=e;else{var n=i[t];i[t]=e,n!==e&&this.notify(t,n)}},e.prototype.setProperties=function(t,e){for(var r in t)this.set(r,t[r],e)},e.prototype.applyProperties=function(t){t.values_&&(0,s.f0)(this.values_||(this.values_={}),t.values_)},e.prototype.unset=function(t,e){if(this.values_&&t in this.values_){var r=this.values_[t];delete this.values_[t],(0,s.xb)(this.values_)&&(this.values_=null),e||this.notify(t,r)}},e}(a.Z)},5990:(t,e,r)=>{"use strict";r.d(e,{Z:()=>i});const i={PROPERTYCHANGE:"propertychange"}},2706:(t,e,r)=>{"use strict";r.d(e,{B:()=>u,Z:()=>c});var i,n=r(208),o=r(5487),a=r(5818),s=(i=function(t,e){return i=Object.setPrototypeOf||{__proto__:[]}instanceof Array&&function(t,e){t.__proto__=e}||function(t,e){for(var r in e)Object.prototype.hasOwnProperty.call(e,r)&&(t[r]=e[r])},i(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 r(){this.constructor=t}i(t,e),t.prototype=null===e?Object.create(e):(r.prototype=e.prototype,new r)}),l=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 s(e,t),e.prototype.changed=function(){++this.revision_,this.dispatchEvent(o.Z.CHANGE)},e.prototype.getRevision=function(){return this.revision_},e.prototype.onInternal=function(t,e){if(Array.isArray(t)){for(var r=t.length,i=new Array(r),n=0;n<r;++n)i[n]=(0,a.oL)(this,t[n],e);return i}return(0,a.oL)(this,t,e)},e.prototype.onceInternal=function(t,e){var r;if(Array.isArray(t)){var i=t.length;r=new Array(i);for(var n=0;n<i;++n)r[n]=(0,a.Vx)(this,t[n],e)}else r=(0,a.Vx)(this,t,e);return e.ol_key=r,r},e.prototype.unInternal=function(t,e){var r=e.ol_key;if(r)u(r);else if(Array.isArray(t))for(var i=0,n=t.length;i<n;++i)this.removeEventListener(t[i],e);else this.removeEventListener(t,e)},e}(n.Z);function u(t){if(Array.isArray(t))for(var e=0,r=t.length;e<r;++e)(0,a.bN)(t[e]);else(0,a.bN)(t)}l.prototype.on,l.prototype.once,l.prototype.un;const c=l},3223:(t,e,r)=>{"use strict";r.d(e,{Z:()=>m});var i,n=r(2971),o=r(2126),a=r(8835),s=r(245),l=r(8641),u=r(5818),c=r(8326),h=(i=function(t,e){return i=Object.setPrototypeOf||{__proto__:[]}instanceof Array&&function(t,e){t.__proto__=e}||function(t,e){for(var r in e)Object.prototype.hasOwnProperty.call(e,r)&&(t[r]=e[r])},i(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 r(){this.constructor=t}i(t,e),t.prototype=null===e?Object.create(e):(r.prototype=e.prototype,new r)}),p="element",d="map",f="offset",g="position",y="positioning";const m=function(t){function e(e){var r=t.call(this)||this;r.on,r.once,r.un,r.options=e,r.id=e.id,r.insertFirst=void 0===e.insertFirst||e.insertFirst,r.stopEvent=void 0===e.stopEvent||e.stopEvent,r.element=document.createElement("div"),r.element.className=void 0!==e.className?e.className:"ol-overlay-container "+s.$A,r.element.style.position="absolute",r.element.style.pointerEvents="auto";var i=e.autoPan;return i&&"object"!=typeof i&&(i={animation:e.autoPanAnimation,margin:e.autoPanMargin}),r.autoPan=i||!1,r.rendered={transform_:"",visible:!0},r.mapPostrenderListenerKey=null,r.addChangeListener(p,r.handleElementChanged),r.addChangeListener(d,r.handleMapChanged),r.addChangeListener(f,r.handleOffsetChanged),r.addChangeListener(g,r.handlePositionChanged),r.addChangeListener(y,r.handlePositioningChanged),void 0!==e.element&&r.setElement(e.element),r.setOffset(void 0!==e.offset?e.offset:[0,0]),r.setPositioning(void 0!==e.positioning?e.positioning:a.Z.TOP_LEFT),void 0!==e.position&&r.setPosition(e.position),r}return h(e,t),e.prototype.getElement=function(){return this.get(p)},e.prototype.getId=function(){return this.id},e.prototype.getMap=function(){return this.get(d)||null},e.prototype.getOffset=function(){return this.get(f)},e.prototype.getPosition=function(){return this.get(g)},e.prototype.getPositioning=function(){return this.get(y)},e.prototype.handleElementChanged=function(){(0,c.ep)(this.element);var t=this.getElement();t&&this.element.appendChild(t)},e.prototype.handleMapChanged=function(){this.mapPostrenderListenerKey&&((0,c.ZF)(this.element),(0,u.bN)(this.mapPostrenderListenerKey),this.mapPostrenderListenerKey=null);var t=this.getMap();if(t){this.mapPostrenderListenerKey=(0,u.oL)(t,o.Z.POSTRENDER,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(p,t)},e.prototype.setMap=function(t){this.set(d,t)},e.prototype.setOffset=function(t){this.set(f,t)},e.prototype.setPosition=function(t){this.set(g,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(g)){var r=this.getRect(e.getTargetElement(),e.getSize()),i=this.getElement(),n=this.getRect(i,[(0,c.iO)(i),(0,c.Pb)(i)]),o=t||{},a=void 0===o.margin?20:o.margin;if(!(0,l.containsExtent)(r,n)){var s=n[0]-r[0],u=r[2]-n[2],h=n[1]-r[1],p=r[3]-n[3],d=[0,0];if(s<0?d[0]=s-a:u<0&&(d[0]=Math.abs(u)+a),h<0?d[1]=h-a:p<0&&(d[1]=Math.abs(p)+a),0!==d[0]||0!==d[1]){var f=e.getView().getCenterInternal(),y=e.getPixelFromCoordinateInternal(f);if(!y)return;var m=[y[0]+d[0],y[1]+d[1]],v=o.animation||{};e.getView().animateInternal({center:e.getCoordinateFromPixelInternal(m),duration:v.duration,easing:v.easing})}}}},e.prototype.getRect=function(t,e){var r=t.getBoundingClientRect(),i=r.left+window.pageXOffset,n=r.top+window.pageYOffset;return[i,n,i+e[0],n+e[1]]},e.prototype.setPositioning=function(t){this.set(y,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 r=t.getPixelFromCoordinate(e),i=t.getSize();this.updateRenderedPosition(r,i)}else this.setVisible(!1)},e.prototype.updateRenderedPosition=function(t,e){var r=this.element.style,i=this.getOffset(),n=this.getPositioning();this.setVisible(!0);var o=Math.round(t[0]+i[0])+"px",s=Math.round(t[1]+i[1])+"px",l="0%",u="0%";n==a.Z.BOTTOM_RIGHT||n==a.Z.CENTER_RIGHT||n==a.Z.TOP_RIGHT?l="-100%":n!=a.Z.BOTTOM_CENTER&&n!=a.Z.CENTER_CENTER&&n!=a.Z.TOP_CENTER||(l="-50%"),n==a.Z.BOTTOM_LEFT||n==a.Z.BOTTOM_CENTER||n==a.Z.BOTTOM_RIGHT?u="-100%":n!=a.Z.CENTER_LEFT&&n!=a.Z.CENTER_CENTER&&n!=a.Z.CENTER_RIGHT||(u="-50%");var c="translate(".concat(l,", ").concat(u,") translate(").concat(o,", ").concat(s,")");this.rendered.transform_!=c&&(this.rendered.transform_=c,r.transform=c,r.msTransform=c)},e.prototype.getOptions=function(){return this.options},e}(n.Z)},8835:(t,e,r)=>{"use strict";r.d(e,{Z:()=>i});const i={BOTTOM_LEFT:"bottom-left",BOTTOM_CENTER:"bottom-center",BOTTOM_RIGHT:"bottom-right",CENTER_LEFT:"center-left",CENTER_CENTER:"center-center",CENTER_RIGHT:"center-right",TOP_LEFT:"top-left",TOP_CENTER:"top-center",TOP_RIGHT:"top-right"}},7739:(t,e,r)=>{"use strict";r.d(e,{Z:()=>Z});var i,n=r(2971),o=r(8714),a=r(2071),s=r(5487),l=r(1295),u=r(8734),c=r(8630),h=r(1708),p=r(2217),d=r(3536),f=r(2126),g=r(3222),y=r(5990),m=r(4238),v=r(8771),_=r(9882),x=r(7681),b=r(7755),w=r(177),E=r(6885),T=r(6101),S=r(9515),C=r(8641),O=r(6121),R=r(4187),I=r(4307),P=r(5818),L=r(8326),A=(i=function(t,e){return i=Object.setPrototypeOf||{__proto__:[]}instanceof Array&&function(t,e){t.__proto__=e}||function(t,e){for(var r in e)Object.prototype.hasOwnProperty.call(e,r)&&(t[r]=e[r])},i(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 r(){this.constructor=t}i(t,e),t.prototype=null===e?Object.create(e):(r.prototype=e.prototype,new r)});function M(t){t instanceof l.Z?t.setMapInternal(null):t instanceof u.Z&&t.getLayers().forEach(M)}function F(t,e){if(t instanceof l.Z)t.setMapInternal(e);else if(t instanceof u.Z)for(var r=t.getLayers().getArray(),i=0,n=r.length;i<n;++i)F(r[i],e)}const Z=function(t){function e(e){var r=t.call(this)||this;r.on,r.once,r.un;var i=function(t){var e=null;void 0!==t.keyboardEventTarget&&(e="string"==typeof t.keyboardEventTarget?document.getElementById(t.keyboardEventTarget):t.keyboardEventTarget);var r,i,n,a={},s=t.layers&&"function"==typeof t.layers.getLayers?t.layers:new u.Z({layers:t.layers});return a[g.Z.LAYERGROUP]=s,a[g.Z.TARGET]=t.target,a[g.Z.VIEW]=t.view instanceof x.ZP?t.view:new x.ZP,void 0!==t.controls&&(Array.isArray(t.controls)?r=new o.Z(t.controls.slice()):((0,S.h)("function"==typeof t.controls.getArray,47),r=t.controls)),void 0!==t.interactions&&(Array.isArray(t.interactions)?i=new o.Z(t.interactions.slice()):((0,S.h)("function"==typeof t.interactions.getArray,48),i=t.interactions)),void 0!==t.overlays?Array.isArray(t.overlays)?n=new o.Z(t.overlays.slice()):((0,S.h)("function"==typeof t.overlays.getArray,49),n=t.overlays):n=new o.Z,{controls:r,interactions:i,keyboardEventTarget:e,overlays:n,values:a}}(e);r.renderComplete_,r.loaded_=!0,r.boundHandleBrowserEvent_=r.handleBrowserEvent.bind(r),r.maxTilesLoading_=void 0!==e.maxTilesLoading?e.maxTilesLoading:16,r.pixelRatio_=void 0!==e.pixelRatio?e.pixelRatio:w.MP,r.postRenderTimeoutHandle_,r.animationDelayKey_,r.animationDelay_=function(){this.animationDelayKey_=void 0,this.renderFrame_(Date.now())}.bind(r),r.coordinateToPixelTransform_=(0,T.Ue)(),r.pixelToCoordinateTransform_=(0,T.Ue)(),r.frameIndex_=0,r.frameState_=null,r.previousExtent_=null,r.viewPropertyListenerKey_=null,r.viewChangeListenerKey_=null,r.layerGroupPropertyListenerKeys_=null,r.viewport_=document.createElement("div"),r.viewport_.className="ol-viewport"+("ontouchstart"in window?" ol-touch":""),r.viewport_.style.position="relative",r.viewport_.style.overflow="hidden",r.viewport_.style.width="100%",r.viewport_.style.height="100%",r.overlayContainer_=document.createElement("div"),r.overlayContainer_.style.position="absolute",r.overlayContainer_.style.zIndex="0",r.overlayContainer_.style.width="100%",r.overlayContainer_.style.height="100%",r.overlayContainer_.style.pointerEvents="none",r.overlayContainer_.className="ol-overlaycontainer",r.viewport_.appendChild(r.overlayContainer_),r.overlayContainerStopEvent_=document.createElement("div"),r.overlayContainerStopEvent_.style.position="absolute",r.overlayContainerStopEvent_.style.zIndex="0",r.overlayContainerStopEvent_.style.width="100%",r.overlayContainerStopEvent_.style.height="100%",r.overlayContainerStopEvent_.style.pointerEvents="none",r.overlayContainerStopEvent_.className="ol-overlaycontainer-stopevent",r.viewport_.appendChild(r.overlayContainerStopEvent_),r.mapBrowserEventHandler_=null,r.moveTolerance_=e.moveTolerance,r.keyboardEventTarget_=i.keyboardEventTarget,r.targetChangeHandlerKeys_=null,r.controls=i.controls||new o.Z,r.interactions=i.interactions||new o.Z,r.overlays_=i.overlays,r.overlayIdIndex_={},r.renderer_=null,r.postRenderFunctions_=[],r.tileQueue_=new _.Z(r.getTilePriority.bind(r),r.handleTileChange_.bind(r)),r.addChangeListener(g.Z.LAYERGROUP,r.handleLayerGroupChanged_),r.addChangeListener(g.Z.VIEW,r.handleViewChanged_),r.addChangeListener(g.Z.SIZE,r.handleSizeChanged_),r.addChangeListener(g.Z.TARGET,r.handleTargetChanged_),r.setProperties(i.values);var n=r;return!e.view||e.view instanceof x.ZP||e.view.then((function(t){n.setView(new x.ZP(t))})),r.controls.addEventListener(a.Z.ADD,function(t){t.element.setMap(this)}.bind(r)),r.controls.addEventListener(a.Z.REMOVE,function(t){t.element.setMap(null)}.bind(r)),r.interactions.addEventListener(a.Z.ADD,function(t){t.element.setMap(this)}.bind(r)),r.interactions.addEventListener(a.Z.REMOVE,function(t){t.element.setMap(null)}.bind(r)),r.overlays_.addEventListener(a.Z.ADD,function(t){this.addOverlayInternal_(t.element)}.bind(r)),r.overlays_.addEventListener(a.Z.REMOVE,function(t){var e=t.element.getId();void 0!==e&&delete this.overlayIdIndex_[e.toString()],t.element.setMap(null)}.bind(r)),r.controls.forEach(function(t){t.setMap(this)}.bind(r)),r.interactions.forEach(function(t){t.setMap(this)}.bind(r)),r.overlays_.forEach(r.addOverlayInternal_.bind(r)),r}return A(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.handleLayerAdd_=function(t){F(t.layer,this)},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,r){if(this.frameState_&&this.renderer_){var i=this.getCoordinateFromPixelInternal(t),n=void 0!==(r=void 0!==r?r:{}).hitTolerance?r.hitTolerance:0,o=void 0!==r.layerFilter?r.layerFilter:E.uX,a=!1!==r.checkWrapped;return this.renderer_.forEachFeatureAtCoordinate(i,this.frameState_,n,a,e,null,o,null)}},e.prototype.getFeaturesAtPixel=function(t,e){var r=[];return this.forEachFeatureAtPixel(t,(function(t){r.push(t)}),e),r},e.prototype.getAllLayers=function(){var t=[];return function e(r){r.forEach((function(r){r instanceof u.Z?e(r.getLayers()):t.push(r)}))}(this.getLayers()),t},e.prototype.forEachLayerAtPixel=function(t,e,r){if(this.frameState_&&this.renderer_){var i=r||{},n=void 0!==i.hitTolerance?i.hitTolerance:0,o=i.layerFilter||E.uX;return this.renderer_.forEachLayerAtPixel(t,this.frameState_,n,e,o)}},e.prototype.hasFeatureAtPixel=function(t,e){if(!this.frameState_||!this.renderer_)return!1;var r=this.getCoordinateFromPixelInternal(t),i=void 0!==(e=void 0!==e?e:{}).layerFilter?e.layerFilter:E.uX,n=void 0!==e.hitTolerance?e.hitTolerance:0,o=!1!==e.checkWrapped;return this.renderer_.hasFeatureAtCoordinate(r,this.frameState_,n,o,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(),r="changedTouches"in t?t.changedTouches[0]:t;return[r.clientX-e.left,r.clientY-e.top]},e.prototype.getTarget=function(){return this.get(g.Z.TARGET)},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(0,O.toUserCoordinate)(this.getCoordinateFromPixelInternal(t),this.getView().getProjection())},e.prototype.getCoordinateFromPixelInternal=function(t){var e=this.frameState_;return e?(0,T.nn)(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(g.Z.LAYERGROUP)},e.prototype.setLayers=function(t){var e=this.getLayerGroup();if(t instanceof o.Z)e.setLayers(t);else{var r=e.getLayers();r.clear(),r.extend(t)}},e.prototype.getLayers=function(){return this.getLayerGroup().getLayers()},e.prototype.getLoadingOrNotReady=function(){for(var t=this.getLayerGroup().getLayerStatesArray(),e=0,r=t.length;e<r;++e){var i=t[e];if(i.visible){var n=i.layer.getRenderer();if(n&&!n.ready)return!0;var o=i.layer.getSource();if(o&&o.loading)return!0}}return!1},e.prototype.getPixelFromCoordinate=function(t){var e=(0,O.fromUserCoordinate)(t,this.getView().getProjection());return this.getPixelFromCoordinateInternal(e)},e.prototype.getPixelFromCoordinateInternal=function(t){var e=this.frameState_;return e?(0,T.nn)(e.coordinateToPixelTransform,t.slice(0,2)):null},e.prototype.getRenderer=function(){return this.renderer_},e.prototype.getSize=function(){return this.get(g.Z.SIZE)},e.prototype.getView=function(){return this.get(g.Z.VIEW)},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,r,i){return(0,_.R)(this.frameState_,t,e,r,i)},e.prototype.handleBrowserEvent=function(t,e){var r=e||t.type,i=new c.Z(r,this,t);this.handleMapBrowserEvent(i)},e.prototype.handleMapBrowserEvent=function(t){if(this.frameState_){var e=t.originalEvent,r=e.type;if(r===m.Z.POINTERDOWN||r===s.Z.WHEEL||r===s.Z.KEYDOWN){var i=this.getOwnerDocument(),n=this.viewport_.getRootNode?this.viewport_.getRootNode():i,o=e.target;if(this.overlayContainerStopEvent_.contains(o)||!(n===i?i.documentElement:n).contains(o))return}if(t.frameState=this.frameState_,!1!==this.dispatchEvent(t))for(var a=this.getInteractions().getArray().slice(),l=a.length-1;l>=0;l--){var u=a[l];if(u.getMap()===this&&u.getActive()&&this.getTargetElement()&&(!u.handleEvent(t)||t.propagationStopped))break}}},e.prototype.handlePostRender=function(){var t=this.frameState_,e=this.tileQueue_;if(!e.isEmpty()){var r=this.maxTilesLoading_,i=r;if(t){var n=t.viewHints;if(n[b.Z.ANIMATING]||n[b.Z.INTERACTING]){var o=Date.now()-t.time>8;r=o?0:8,i=o?0:2}}e.getTilesLoading()<r&&(e.reprioritize(),e.loadMoreTiles(r,i))}t&&this.renderer_&&!t.animate&&(!0===this.renderComplete_?(this.hasListener(v.Z.RENDERCOMPLETE)&&this.renderer_.dispatchRenderEvent(v.Z.RENDERCOMPLETE,t),!1===this.loaded_&&(this.loaded_=!0,this.dispatchEvent(new d.Z(f.Z.LOADEND,this,t)))):!0===this.loaded_&&(this.loaded_=!1,this.dispatchEvent(new d.Z(f.Z.LOADSTART,this,t))));for(var a=this.postRenderFunctions_,s=0,l=a.length;s<l;++s)a[s](this,t);a.length=0},e.prototype.handleSizeChanged_=function(){this.getView()&&!this.getView().getAnimating()&&this.getView().resolveConstraints(0),this.render()},e.prototype.handleTargetChanged_=function(){if(this.mapBrowserEventHandler_){for(var t=0,e=this.targetChangeHandlerKeys_.length;t<e;++t)(0,P.bN)(this.targetChangeHandlerKeys_[t]);this.targetChangeHandlerKeys_=null,this.viewport_.removeEventListener(s.Z.CONTEXTMENU,this.boundHandleBrowserEvent_),this.viewport_.removeEventListener(s.Z.WHEEL,this.boundHandleBrowserEvent_),this.mapBrowserEventHandler_.dispose(),this.mapBrowserEventHandler_=null,(0,L.ZF)(this.viewport_)}var r=this.getTargetElement();if(r){for(var i in r.appendChild(this.viewport_),this.renderer_||(this.renderer_=this.createRenderer()),this.mapBrowserEventHandler_=new h.Z(this,this.moveTolerance_),p.Z)this.mapBrowserEventHandler_.addEventListener(p.Z[i],this.handleMapBrowserEvent.bind(this));this.viewport_.addEventListener(s.Z.CONTEXTMENU,this.boundHandleBrowserEvent_,!1),this.viewport_.addEventListener(s.Z.WHEEL,this.boundHandleBrowserEvent_,!!w.bM&&{passive:!1});var n=this.getOwnerDocument().defaultView,o=this.keyboardEventTarget_?this.keyboardEventTarget_:r;this.targetChangeHandlerKeys_=[(0,P.oL)(o,s.Z.KEYDOWN,this.handleBrowserEvent,this),(0,P.oL)(o,s.Z.KEYPRESS,this.handleBrowserEvent,this),(0,P.oL)(n,s.Z.RESIZE,this.updateSize,this)]}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_&&((0,P.bN)(this.viewPropertyListenerKey_),this.viewPropertyListenerKey_=null),this.viewChangeListenerKey_&&((0,P.bN)(this.viewChangeListenerKey_),this.viewChangeListenerKey_=null);var t=this.getView();t&&(this.updateViewportSize_(),this.viewPropertyListenerKey_=(0,P.oL)(t,y.Z.PROPERTYCHANGE,this.handleViewPropertyChanged_,this),this.viewChangeListenerKey_=(0,P.oL)(t,s.Z.CHANGE,this.handleViewPropertyChanged_,this),t.resolveConstraints(0)),this.render()},e.prototype.handleLayerGroupChanged_=function(){this.layerGroupPropertyListenerKeys_&&(this.layerGroupPropertyListenerKeys_.forEach(P.bN),this.layerGroupPropertyListenerKeys_=null);var t=this.getLayerGroup();t&&(this.handleLayerAdd_(new u.V("addlayer",t)),this.layerGroupPropertyListenerKeys_=[(0,P.oL)(t,y.Z.PROPERTYCHANGE,this.render,this),(0,P.oL)(t,s.Z.CHANGE,this.render,this),(0,P.oL)(t,"addlayer",this.handleLayerAdd_,this),(0,P.oL)(t,"removelayer",this.handleLayerRemove_,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,r=t.length;e<r;++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.handleLayerRemove_=function(t){M(t.layer)},e.prototype.removeOverlay=function(t){return this.getOverlays().remove(t)},e.prototype.renderFrame_=function(t){var e=this,r=this.getSize(),i=this.getView(),n=this.frameState_,o=null;if(void 0!==r&&(0,I.py)(r)&&i&&i.isDef()){var a=i.getHints(this.frameState_?this.frameState_.viewHints:void 0),s=i.getState();if(o={animate:!1,coordinateToPixelTransform:this.coordinateToPixelTransform_,declutterTree:null,extent:(0,C.getForViewAndSize)(s.center,s.resolution,s.rotation,r),index:this.frameIndex_++,layerIndex:0,layerStatesArray:this.getLayerGroup().getLayerStatesArray(),pixelRatio:this.pixelRatio_,pixelToCoordinateTransform:this.pixelToCoordinateTransform_,postRenderFunctions:[],size:r,tileQueue:this.tileQueue_,time:t,usedTiles:{},viewState:s,viewHints:a,wantedTiles:{},mapId:(0,R.sq)(this),renderTargets:{}},s.nextCenter&&s.nextResolution){var l=isNaN(s.nextRotation)?s.rotation:s.nextRotation;o.nextExtent=(0,C.getForViewAndSize)(s.nextCenter,s.nextResolution,l,r)}}this.frameState_=o,this.renderer_.renderFrame(o),o&&(o.animate&&this.render(),Array.prototype.push.apply(this.postRenderFunctions_,o.postRenderFunctions),n&&(!this.previousExtent_||!(0,C.isEmpty)(this.previousExtent_)&&!(0,C.equals)(o.extent,this.previousExtent_))&&(this.dispatchEvent(new d.Z(f.Z.MOVESTART,this,n)),this.previousExtent_=(0,C.createOrUpdateEmpty)(this.previousExtent_)),this.previousExtent_&&!o.viewHints[b.Z.ANIMATING]&&!o.viewHints[b.Z.INTERACTING]&&!(0,C.equals)(o.extent,this.previousExtent_)&&(this.dispatchEvent(new d.Z(f.Z.MOVEEND,this,o)),(0,C.clone)(o.extent,this.previousExtent_))),this.dispatchEvent(new d.Z(f.Z.POSTRENDER,this,o)),this.renderComplete_=this.hasListener(f.Z.LOADSTART)||this.hasListener(f.Z.LOADEND)||this.hasListener(v.Z.RENDERCOMPLETE)?!this.tileQueue_.getTilesLoading()&&!this.tileQueue_.getCount()&&!this.getLoadingOrNotReady():void 0,this.postRenderTimeoutHandle_||(this.postRenderTimeoutHandle_=setTimeout((function(){e.postRenderTimeoutHandle_=void 0,e.handlePostRender()}),0))},e.prototype.setLayerGroup=function(t){var e=this.getLayerGroup();e&&this.handleLayerRemove_(new u.V("removelayer",e)),this.set(g.Z.LAYERGROUP,t)},e.prototype.setSize=function(t){this.set(g.Z.SIZE,t)},e.prototype.setTarget=function(t){this.set(g.Z.TARGET,t)},e.prototype.setView=function(t){if(!t||t instanceof x.ZP)this.set(g.Z.VIEW,t);else{this.set(g.Z.VIEW,new x.ZP);var e=this;t.then((function(t){e.setView(new x.ZP(t))}))}},e.prototype.updateSize=function(){var t=this.getTargetElement(),e=void 0;if(t){var r=getComputedStyle(t),i=t.offsetWidth-parseFloat(r.borderLeftWidth)-parseFloat(r.paddingLeft)-parseFloat(r.paddingRight)-parseFloat(r.borderRightWidth),n=t.offsetHeight-parseFloat(r.borderTopWidth)-parseFloat(r.paddingTop)-parseFloat(r.paddingBottom)-parseFloat(r.borderBottomWidth);isNaN(i)||isNaN(n)||(e=[i,n],!(0,I.py)(e)&&(t.offsetWidth||t.offsetHeight||t.getClientRects().length)&&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,r=getComputedStyle(this.viewport_);r.width&&r.height&&(e=[parseInt(r.width,10),parseInt(r.height,10)]),t.setViewportSize(e)}},e}(n.Z)},4806:(t,e,r)=>{"use strict";r.d(e,{Z:()=>c});var i,n=r(208),o=r(5487),a=r(7195),s=r(4187),l=r(1015),u=(i=function(t,e){return i=Object.setPrototypeOf||{__proto__:[]}instanceof Array&&function(t,e){t.__proto__=e}||function(t,e){for(var r in e)Object.prototype.hasOwnProperty.call(e,r)&&(t[r]=e[r])},i(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 r(){this.constructor=t}i(t,e),t.prototype=null===e?Object.create(e):(r.prototype=e.prototype,new r)});const c=function(t){function e(e,r,i){var n=t.call(this)||this,o=i||{};return n.tileCoord=e,n.state=r,n.interimTile=null,n.key="",n.transition_=void 0===o.transition?250:o.transition,n.transitionStarts_={},n.interpolate=!!o.interpolate,n}return u(e,t),e.prototype.changed=function(){this.dispatchEvent(o.Z.CHANGE)},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()==a.Z.LOADED)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()==a.Z.LOADED){t.interimTile=null;break}t.getState()==a.Z.LOADING?e=t:t.getState()==a.Z.IDLE?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!==a.Z.ERROR&&this.state>t)throw new Error("Tile load sequence violation");this.state=t,this.changed()},e.prototype.load=function(){(0,s.O3)()},e.prototype.getAlpha=function(t,e){if(!this.transition_)return 1;var r=this.transitionStarts_[t];if(r){if(-1===r)return 1}else r=e,this.transitionStarts_[t]=r;var i=e-r+1e3/60;return i>=this.transition_?1:(0,l.YQ)(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}(n.Z)},1702:(t,e,r)=>{"use strict";r.d(e,{Z:()=>s});var i,n=r(6131),o=r(8634),a=(i=function(t,e){return i=Object.setPrototypeOf||{__proto__:[]}instanceof Array&&function(t,e){t.__proto__=e}||function(t,e){for(var r in e)Object.prototype.hasOwnProperty.call(e,r)&&(t[r]=e[r])},i(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 r(){this.constructor=t}i(t,e),t.prototype=null===e?Object.create(e):(r.prototype=e.prototype,new r)});const s=function(t){function e(){return null!==t&&t.apply(this,arguments)||this}return a(e,t),e.prototype.expireCache=function(t){for(;this.canExpireCache()&&!(this.peekLast().getKey()in t);)this.pop().release()},e.prototype.pruneExceptNewestZ=function(){if(0!==this.getCount()){var t=this.peekFirstKey(),e=(0,o.Ul)(t)[0];this.forEach(function(t){t.tileCoord[0]!==e&&(this.remove((0,o.km)(t.tileCoord)),t.release())}.bind(this))}},e}(n.Z)},9882:(t,e,r)=>{"use strict";r.d(e,{R:()=>u,Z:()=>l});var i,n=r(5487),o=r(2729),a=r(7195),s=(i=function(t,e){return i=Object.setPrototypeOf||{__proto__:[]}instanceof Array&&function(t,e){t.__proto__=e}||function(t,e){for(var r in e)Object.prototype.hasOwnProperty.call(e,r)&&(t[r]=e[r])},i(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 r(){this.constructor=t}i(t,e),t.prototype=null===e?Object.create(e):(r.prototype=e.prototype,new r)});const l=function(t){function e(e,r){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_=r,i.tilesLoading_=0,i.tilesLoadingKeys_={},i}return s(e,t),e.prototype.enqueue=function(e){var r=t.prototype.enqueue.call(this,e);return r&&e[0].addEventListener(n.Z.CHANGE,this.boundHandleTileChange_),r},e.prototype.getTilesLoading=function(){return this.tilesLoading_},e.prototype.handleTileChange=function(t){var e=t.target,r=e.getState();if(r===a.Z.LOADED||r===a.Z.ERROR||r===a.Z.EMPTY){e.removeEventListener(n.Z.CHANGE,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 r,i,n=0;this.tilesLoading_<t&&n<e&&this.getCount()>0;)i=(r=this.dequeue()[0]).getKey(),r.getState()!==a.Z.IDLE||i in this.tilesLoadingKeys_||(this.tilesLoadingKeys_[i]=!0,++this.tilesLoading_,++n,r.load())},e}(o.Z);function u(t,e,r,i,n){if(!t||!(r in t.wantedTiles))return o.r;if(!t.wantedTiles[r][e.getKey()])return o.r;var a=t.viewState.center,s=i[0]-a[0],l=i[1]-a[1];return 65536*Math.log(n)+Math.sqrt(s*s+l*l)/n}},2519:(t,e,r)=>{"use strict";r.d(e,{T:()=>n,Z:()=>o});var i=function(){function t(t,e,r,i){this.minX=t,this.maxX=e,this.minY=r,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 n(t,e,r,n,o){return void 0!==o?(o.minX=t,o.maxX=e,o.minY=r,o.maxY=n,o):new i(t,e,r,n)}const o=i},7195:(t,e,r)=>{"use strict";r.d(e,{Z:()=>i});const i={IDLE:0,LOADING:1,LOADED:2,ERROR:3,EMPTY:4}},2559:(t,e,r)=>{"use strict";r.d(e,{Z:()=>u});var i,n=r(4806),o=r(8326),a=r(4187),s=(i=function(t,e){return i=Object.setPrototypeOf||{__proto__:[]}instanceof Array&&function(t,e){t.__proto__=e}||function(t,e){for(var r in e)Object.prototype.hasOwnProperty.call(e,r)&&(t[r]=e[r])},i(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 r(){this.constructor=t}i(t,e),t.prototype=null===e?Object.create(e):(r.prototype=e.prototype,new r)}),l=[];const u=function(t){function e(e,r,i,n){var o=t.call(this,e,r,{transition:0})||this;return o.context_={},o.executorGroups={},o.declutterExecutorGroups={},o.loadingSourceTiles=0,o.hitDetectionImageData={},o.replayState_={},o.sourceTiles=[],o.errorTileKeys={},o.wantedResolution,o.getSourceTiles=n.bind(void 0,o),o.wrappedTileCoord=i,o}return s(e,t),e.prototype.getContext=function(t){var e=(0,a.sq)(t);return e in this.context_||(this.context_[e]=(0,o.E4)(1,1,l)),this.context_[e]},e.prototype.hasContext=function(t){return(0,a.sq)(t)in this.context_},e.prototype.getImage=function(t){return this.hasContext(t)?this.getContext(t).canvas:null},e.prototype.getReplayState=function(t){var e=(0,a.sq)(t);return e in this.replayState_||(this.replayState_[e]={dirty:!1,renderedRenderOrder:null,renderedResolution:NaN,renderedRevision:-1,renderedTileResolution:NaN,renderedTileRevision:-1,renderedTileZ:-1}),this.replayState_[e]},e.prototype.load=function(){this.getSourceTiles()},e.prototype.release=function(){for(var e in this.context_)l.push(this.context_[e].canvas),delete this.context_[e];t.prototype.release.call(this)},e}(n.Z)},4759:(t,e,r)=>{"use strict";r.d(e,{Z:()=>s});var i,n=r(4806),o=r(7195),a=(i=function(t,e){return i=Object.setPrototypeOf||{__proto__:[]}instanceof Array&&function(t,e){t.__proto__=e}||function(t,e){for(var r in e)Object.prototype.hasOwnProperty.call(e,r)&&(t[r]=e[r])},i(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 r(){this.constructor=t}i(t,e),t.prototype=null===e?Object.create(e):(r.prototype=e.prototype,new r)});const s=function(t){function e(e,r,i,n,o,a){var s=t.call(this,e,r,a)||this;return s.extent=null,s.format_=n,s.features_=null,s.loader_,s.projection=null,s.resolution,s.tileLoadFunction_=o,s.url_=i,s.key=i,s}return a(e,t),e.prototype.getFormat=function(){return this.format_},e.prototype.getFeatures=function(){return this.features_},e.prototype.load=function(){this.state==o.Z.IDLE&&(this.setState(o.Z.LOADING),this.tileLoadFunction_(this,this.url_),this.loader_&&this.loader_(this.extent,this.resolution,this.projection))},e.prototype.onLoad=function(t,e){this.setFeatures(t)},e.prototype.onError=function(){this.setState(o.Z.ERROR)},e.prototype.setFeatures=function(t){this.features_=t,this.setState(o.Z.LOADED)},e.prototype.setLoader=function(t){this.loader_=t},e}(n.Z)},7681:(t,e,r)=>{"use strict";r.d(e,{ZP:()=>O});var i,n=r(2971),o=r(4754),a=r(8375),s=r(7755),l=r(7240),u=r(4768),c=r(6121),h=r(6885),p=r(1900),d=r(9515),f=r(9374),g=r(8427),y=r(3983),m=r(9307),v=r(828),_=r(1015),x=r(8641),b=r(5537),w=r(2033),E=(i=function(t,e){return i=Object.setPrototypeOf||{__proto__:[]}instanceof Array&&function(t,e){t.__proto__=e}||function(t,e){for(var r in e)Object.prototype.hasOwnProperty.call(e,r)&&(t[r]=e[r])},i(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 r(){this.constructor=t}i(t,e),t.prototype=null===e?Object.create(e):(r.prototype=e.prototype,new r)});function T(t,e){setTimeout((function(){t(e)}),0)}function S(t){return!(t.sourceCenter&&t.targetCenter&&!(0,p.fS)(t.sourceCenter,t.targetCenter))&&t.sourceResolution===t.targetResolution&&t.sourceRotation===t.targetRotation}function C(t,e,r,i,n){var o=Math.cos(-n),a=Math.sin(-n),s=t[0]*o-t[1]*a,l=t[1]*o+t[0]*a;return[(s+=(e[0]/2-r[0])*i)*o-(l+=(r[1]-e[1]/2)*i)*(a=-a),l*o+s*a]}const O=function(t){function e(e){var r=t.call(this)||this;r.on,r.once,r.un;var i=(0,f.f0)({},e);return r.hints_=[0,0],r.animations_=[],r.updateAnimationKey_,r.projection_=(0,c.createProjection)(i.projection,"EPSG:3857"),r.viewportSize_=[100,100],r.targetCenter_=null,r.targetResolution_,r.targetRotation_,r.nextCenter_=null,r.nextResolution_,r.nextRotation_,r.cancelAnchor_=void 0,i.projection&&(0,c.disableCoordinateWarning)(),i.center&&(i.center=(0,c.fromUserCoordinate)(i.center,r.projection_)),i.extent&&(i.extent=(0,c.fromUserExtent)(i.extent,r.projection_)),r.applyOptions_(i),r}return E(e,t),e.prototype.applyOptions_=function(t){var e=(0,f.f0)({},t);for(var r in l.Z)delete e[r];this.setProperties(e,!0);var i=function(t){var e,r,i,n=void 0!==t.minZoom?t.minZoom:0,o=void 0!==t.maxZoom?t.maxZoom:28,s=void 0!==t.zoomFactor?t.zoomFactor:2,l=void 0!==t.multiWorld&&t.multiWorld,h=void 0===t.smoothResolutionConstraint||t.smoothResolutionConstraint,p=void 0!==t.showFullExtent&&t.showFullExtent,d=(0,c.createProjection)(t.projection,"EPSG:3857"),f=d.getExtent(),g=t.constrainOnlyCenter,y=t.extent;if(l||y||!d.isGlobal()||(g=!1,y=f),void 0!==t.resolutions){var v=t.resolutions;r=v[n],i=void 0!==v[o]?v[o]:v[v.length-1],e=t.constrainResolution?(0,m.gn)(v,h,!g&&y,p):(0,m.Is)(r,i,h,!g&&y,p)}else{var _=(f?Math.max((0,x.getWidth)(f),(0,x.getHeight)(f)):360*c.METERS_PER_UNIT[a.ZP.DEGREES]/d.getMetersPerUnit())/u.S/Math.pow(2,0),b=_/Math.pow(2,28);void 0!==(r=t.maxResolution)?n=0:r=_/Math.pow(s,n),void 0===(i=t.minResolution)&&(i=void 0!==t.maxZoom?void 0!==t.maxResolution?r/Math.pow(s,o):_/Math.pow(s,o):b),o=n+Math.floor(Math.log(r/i)/Math.log(s)),i=r/Math.pow(s,o-n),e=t.constrainResolution?(0,m.cA)(s,r,i,h,!g&&y,p):(0,m.Is)(r,i,h,!g&&y,p)}return{constraint:e,maxResolution:r,minResolution:i,minZoom:n,zoomFactor:s}}(t);this.maxResolution_=i.maxResolution,this.minResolution_=i.minResolution,this.zoomFactor_=i.zoomFactor,this.resolutions_=t.resolutions,this.padding_=t.padding,this.minZoom_=i.minZoom;var n=function(t){if(void 0!==t.extent){var e=void 0===t.smoothExtentConstraint||t.smoothExtentConstraint;return(0,g.s)(t.extent,t.constrainOnlyCenter,e)}var r=(0,c.createProjection)(t.projection,"EPSG:3857");if(!0!==t.multiWorld&&r.isGlobal()){var i=r.getExtent().slice();return i[0]=-1/0,i[2]=1/0,(0,g.s)(i,!1,!1)}return g.Y}(t),o=i.constraint,s=function(t){if(void 0===t.enableRotation||t.enableRotation){var e=t.constrainRotation;return void 0===e||!0===e?(0,v.Gw)():!1===e?v.YP:"number"==typeof e?(0,v.gE)(e):v.YP}return v.h$}(t);this.constraints_={center:n,resolution:o,rotation:s},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)},Object.defineProperty(e.prototype,"padding",{get:function(){return this.padding_},set:function(t){var e=this.padding_;this.padding_=t;var r=this.getCenter();if(r){var i=t||[0,0,0,0];e=e||[0,0,0,0];var n=this.getResolution(),o=n/2*(i[3]-e[3]+e[1]-i[1]),a=n/2*(i[0]-e[0]+e[2]-i[2]);this.setCenterInternal([r[0]+o,r[1]-a])}},enumerable:!1,configurable:!0}),e.prototype.getUpdatedOptions_=function(t){var e=this.getProperties();return void 0!==e.resolution?e.resolution=this.getResolution():e.zoom=this.getZoom(),e.center=this.getCenterInternal(),e.rotation=this.getRotation(),(0,f.f0)({},e,t)},e.prototype.animate=function(t){this.isDef()&&!this.getAnimating()&&this.resolveConstraints(0);for(var e=new Array(arguments.length),r=0;r<e.length;++r){var i=arguments[r];i.center&&((i=(0,f.f0)({},i)).center=(0,c.fromUserCoordinate)(i.center,this.getProjection())),i.anchor&&((i=(0,f.f0)({},i)).anchor=(0,c.fromUserCoordinate)(i.anchor,this.getProjection())),e[r]=i}this.animateInternal.apply(this,e)},e.prototype.animateInternal=function(t){var e,r=arguments.length;r>1&&"function"==typeof arguments[r-1]&&(e=arguments[r-1],--r);for(var i=0;i<r&&!this.isDef();++i){var n=arguments[i];n.center&&this.setCenterInternal(n.center),void 0!==n.zoom?this.setZoom(n.zoom):n.resolution&&this.setResolution(n.resolution),void 0!==n.rotation&&this.setRotation(n.rotation)}if(i!==r){for(var o=Date.now(),a=this.targetCenter_.slice(),l=this.targetResolution_,u=this.targetRotation_,c=[];i<r;++i){var h=arguments[i],p={start:o,complete:!1,anchor:h.anchor,duration:void 0!==h.duration?h.duration:1e3,easing:h.easing||_.rd,callback:e};if(h.center&&(p.sourceCenter=a,p.targetCenter=h.center.slice(),a=p.targetCenter),void 0!==h.zoom?(p.sourceResolution=l,p.targetResolution=this.getResolutionForZoom(h.zoom),l=p.targetResolution):h.resolution&&(p.sourceResolution=l,p.targetResolution=h.resolution,l=p.targetResolution),void 0!==h.rotation){p.sourceRotation=u;var d=(0,y.$W)(h.rotation-u+Math.PI,2*Math.PI)-Math.PI;p.targetRotation=u+d,u=p.targetRotation}S(p)?p.complete=!0:o+=p.duration,c.push(p)}this.animations_.push(c),this.setHint(s.Z.ANIMATING,1),this.updateAnimations_()}else e&&T(e,!0)},e.prototype.getAnimating=function(){return this.hints_[s.Z.ANIMATING]>0},e.prototype.getInteracting=function(){return this.hints_[s.Z.INTERACTING]>0},e.prototype.cancelAnimations=function(){var t;this.setHint(s.Z.ANIMATING,-this.hints_[s.Z.ANIMATING]);for(var e=0,r=this.animations_.length;e<r;++e){var i=this.animations_[e];if(i[0].callback&&T(i[0].callback,!1),!t)for(var n=0,o=i.length;n<o;++n){var a=i[n];if(!a.complete){t=a.anchor;break}}}this.animations_.length=0,this.cancelAnchor_=t,this.nextCenter_=null,this.nextResolution_=NaN,this.nextRotation_=NaN},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,r=this.animations_.length-1;r>=0;--r){for(var i=this.animations_[r],n=!0,o=0,a=i.length;o<a;++o){var l=i[o];if(!l.complete){var u=t-l.start,c=l.duration>0?u/l.duration:1;c>=1?(l.complete=!0,c=1):n=!1;var h=l.easing(c);if(l.sourceCenter){var p=l.sourceCenter[0],d=l.sourceCenter[1],f=l.targetCenter[0],g=l.targetCenter[1];this.nextCenter_=l.targetCenter;var m=p+h*(f-p),v=d+h*(g-d);this.targetCenter_=[m,v]}if(l.sourceResolution&&l.targetResolution){var _=1===h?l.targetResolution:l.sourceResolution+h*(l.targetResolution-l.sourceResolution);if(l.anchor){var x=this.getViewportSize_(this.getRotation()),b=this.constraints_.resolution(_,0,x,!0);this.targetCenter_=this.calculateCenterZoom(b,l.anchor)}this.nextResolution_=l.targetResolution,this.targetResolution_=_,this.applyTargetState_(!0)}if(void 0!==l.sourceRotation&&void 0!==l.targetRotation){var w=1===h?(0,y.$W)(l.targetRotation+Math.PI,2*Math.PI)-Math.PI:l.sourceRotation+h*(l.targetRotation-l.sourceRotation);if(l.anchor){var E=this.constraints_.rotation(w,!0);this.targetCenter_=this.calculateCenterRotate(E,l.anchor)}this.nextRotation_=l.targetRotation,this.targetRotation_=w}if(this.applyTargetState_(!0),e=!0,!l.complete)break}}if(n){this.animations_[r]=null,this.setHint(s.Z.ANIMATING,-1),this.nextCenter_=null,this.nextResolution_=NaN,this.nextRotation_=NaN;var S=i[0].callback;S&&T(S,!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 r,i=this.getCenterInternal();return void 0!==i&&(r=[i[0]-e[0],i[1]-e[1]],(0,p.U1)(r,t-this.getRotation()),(0,p.IH)(r,e)),r},e.prototype.calculateCenterZoom=function(t,e){var r,i=this.getCenterInternal(),n=this.getResolution();return void 0!==i&&void 0!==n&&(r=[e[0]-t*(e[0]-i[0])/n,e[1]-t*(e[1]-i[1])/n]),r},e.prototype.getViewportSize_=function(t){var e=this.viewportSize_;if(t){var r=e[0],i=e[1];return[Math.abs(r*Math.cos(t))+Math.abs(i*Math.sin(t)),Math.abs(r*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?(0,c.toUserCoordinate)(t,this.getProjection()):t},e.prototype.getCenterInternal=function(){return this.get(l.Z.CENTER)},e.prototype.getConstraints=function(){return this.constraints_},e.prototype.getConstrainResolution=function(){return this.get("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){var e=this.calculateExtentInternal(t);return(0,c.toUserExtent)(e,this.getProjection())},e.prototype.calculateExtentInternal=function(t){var e=t||this.getViewportSizeMinusPadding_(),r=this.getCenterInternal();(0,d.h)(r,1);var i=this.getResolution();(0,d.h)(void 0!==i,2);var n=this.getRotation();return(0,d.h)(void 0!==n,3),(0,x.getForViewAndSize)(r,i,n,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(l.Z.RESOLUTION)},e.prototype.getResolutions=function(){return this.resolutions_},e.prototype.getResolutionForExtent=function(t,e){return this.getResolutionForExtentInternal((0,c.fromUserExtent)(t,this.getProjection()),e)},e.prototype.getResolutionForExtentInternal=function(t,e){var r=e||this.getViewportSizeMinusPadding_(),i=(0,x.getWidth)(t)/r[0],n=(0,x.getHeight)(t)/r[1];return Math.max(i,n)},e.prototype.getResolutionForValueFunction=function(t){var e=t||2,r=this.getConstrainedResolution(this.maxResolution_),i=this.minResolution_,n=Math.log(r/i)/Math.log(e);return function(t){return r/Math.pow(e,t*n)}},e.prototype.getRotation=function(){return this.get(l.Z.ROTATION)},e.prototype.getValueForResolutionFunction=function(t){var e=Math.log(t||2),r=this.getConstrainedResolution(this.maxResolution_),i=this.minResolution_,n=Math.log(r/i)/e;return function(t){return Math.log(r/t)/e/n}},e.prototype.getViewportSizeMinusPadding_=function(t){var e=this.getViewportSize_(t),r=this.padding_;return r&&(e=[e[0]-r[1]-r[3],e[1]-r[0]-r[2]]),e},e.prototype.getState=function(){var t=this.getProjection(),e=this.getResolution(),r=this.getRotation(),i=this.getCenterInternal(),n=this.padding_;if(n){var o=this.getViewportSizeMinusPadding_();i=C(i,this.getViewportSize_(),[o[0]/2+n[3],o[1]/2+n[0]],e,r)}return{center:i.slice(0),projection:void 0!==t?t:null,resolution:e,nextCenter:this.nextCenter_,nextResolution:this.nextResolution_,nextRotation:this.nextRotation_,rotation:r,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,r,i=this.minZoom_||0;if(this.resolutions_){var n=(0,b.h7)(this.resolutions_,t,1);i=n,e=this.resolutions_[n],r=n==this.resolutions_.length-1?2:e/this.resolutions_[n+1]}else e=this.maxResolution_,r=this.zoomFactor_;return i+Math.log(e/t)/Math.log(r)},e.prototype.getResolutionForZoom=function(t){if(this.resolutions_){if(this.resolutions_.length<=1)return 0;var e=(0,y.uZ)(Math.floor(t),0,this.resolutions_.length-2),r=this.resolutions_[e]/this.resolutions_[e+1];return this.resolutions_[e]/Math.pow(r,(0,y.uZ)(t-e,0,1))}return this.maxResolution_/Math.pow(this.zoomFactor_,t-this.minZoom_)},e.prototype.fit=function(t,e){var r;if((0,d.h)(Array.isArray(t)||"function"==typeof t.getSimplifiedGeometry,24),Array.isArray(t)){(0,d.h)(!(0,x.isEmpty)(t),25);var i=(0,c.fromUserExtent)(t,this.getProjection());r=(0,w.oJ)(i)}else if(t.getType()===o.Z.CIRCLE)i=(0,c.fromUserExtent)(t.getExtent(),this.getProjection()),(r=(0,w.oJ)(i)).rotate(this.getRotation(),(0,x.getCenter)(i));else{var n=(0,c.getUserProjection)();r=n?t.clone().transform(n,this.getProjection()):t}this.fitInternal(r,e)},e.prototype.rotatedExtentForGeometry=function(t){for(var e=this.getRotation(),r=Math.cos(e),i=Math.sin(-e),n=t.getFlatCoordinates(),o=t.getStride(),a=1/0,s=1/0,l=-1/0,u=-1/0,c=0,h=n.length;c<h;c+=o){var p=n[c]*r-n[c+1]*i,d=n[c]*i+n[c+1]*r;a=Math.min(a,p),s=Math.min(s,d),l=Math.max(l,p),u=Math.max(u,d)}return[a,s,l,u]},e.prototype.fitInternal=function(t,e){var r=e||{},i=r.size;i||(i=this.getViewportSizeMinusPadding_());var n,o=void 0!==r.padding?r.padding:[0,0,0,0],a=void 0!==r.nearest&&r.nearest;n=void 0!==r.minResolution?r.minResolution:void 0!==r.maxZoom?this.getResolutionForZoom(r.maxZoom):0;var s=this.rotatedExtentForGeometry(t),l=this.getResolutionForExtentInternal(s,[i[0]-o[1]-o[3],i[1]-o[0]-o[2]]);l=isNaN(l)?n:Math.max(l,n),l=this.getConstrainedResolution(l,a?0:1);var u=this.getRotation(),c=Math.sin(u),p=Math.cos(u),d=(0,x.getCenter)(s);d[0]+=(o[1]-o[3])/2*l,d[1]+=(o[0]-o[2])/2*l;var f=d[0]*p-d[1]*c,g=d[1]*p+d[0]*c,y=this.getConstrainedCenter([f,g],l),m=r.callback?r.callback:h.Zn;void 0!==r.duration?this.animateInternal({resolution:l,center:y,duration:r.duration,easing:r.easing},m):(this.targetResolution_=l,this.targetCenter_=y,this.applyTargetState_(!1,!0),T(m,!0))},e.prototype.centerOn=function(t,e,r){this.centerOnInternal((0,c.fromUserCoordinate)(t,this.getProjection()),e,r)},e.prototype.centerOnInternal=function(t,e,r){this.setCenterInternal(C(t,e,r,this.getResolution(),this.getRotation()))},e.prototype.calculateCenterShift=function(t,e,r,i){var n,o=this.padding_;if(o&&t){var a=this.getViewportSizeMinusPadding_(-r),s=C(t,i,[a[0]/2+o[3],a[1]/2+o[0]],e,r);n=[t[0]-s[0],t[1]-s[1]]}return n},e.prototype.isDef=function(){return!!this.getCenterInternal()&&void 0!==this.getResolution()},e.prototype.adjustCenter=function(t){var e=(0,c.toUserCoordinate)(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 r=e&&(0,c.fromUserCoordinate)(e,this.getProjection());this.adjustResolutionInternal(t,r)},e.prototype.adjustResolutionInternal=function(t,e){var r=this.getAnimating()||this.getInteracting(),i=this.getViewportSize_(this.getRotation()),n=this.constraints_.resolution(this.targetResolution_*t,0,i,r);e&&(this.targetCenter_=this.calculateCenterZoom(n,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=(0,c.fromUserCoordinate)(e,this.getProjection())),this.adjustRotationInternal(t,e)},e.prototype.adjustRotationInternal=function(t,e){var r=this.getAnimating()||this.getInteracting(),i=this.constraints_.rotation(this.targetRotation_+t,r);e&&(this.targetCenter_=this.calculateCenterRotate(i,e)),this.targetRotation_+=t,this.applyTargetState_()},e.prototype.setCenter=function(t){this.setCenterInternal(t?(0,c.fromUserCoordinate)(t,this.getProjection()):t)},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 r=this.getAnimating()||this.getInteracting()||e,i=this.constraints_.rotation(this.targetRotation_,r),n=this.getViewportSize_(i),o=this.constraints_.resolution(this.targetResolution_,0,n,r),a=this.constraints_.center(this.targetCenter_,o,n,r,this.calculateCenterShift(this.targetCenter_,o,i,n));this.get(l.Z.ROTATION)!==i&&this.set(l.Z.ROTATION,i),this.get(l.Z.RESOLUTION)!==o&&(this.set(l.Z.RESOLUTION,o),this.set("zoom",this.getZoom(),!0)),a&&this.get(l.Z.CENTER)&&(0,p.fS)(this.get(l.Z.CENTER),a)||this.set(l.Z.CENTER,a),this.getAnimating()&&!t&&this.cancelAnimations(),this.cancelAnchor_=void 0},e.prototype.resolveConstraints=function(t,e,r){var i=void 0!==t?t:200,n=e||0,o=this.constraints_.rotation(this.targetRotation_),a=this.getViewportSize_(o),s=this.constraints_.resolution(this.targetResolution_,n,a),l=this.constraints_.center(this.targetCenter_,s,a,!1,this.calculateCenterShift(this.targetCenter_,s,o,a));if(0===i&&!this.cancelAnchor_)return this.targetResolution_=s,this.targetRotation_=o,this.targetCenter_=l,void this.applyTargetState_();var u=r||(0===i?this.cancelAnchor_:void 0);this.cancelAnchor_=void 0,this.getResolution()===s&&this.getRotation()===o&&this.getCenterInternal()&&(0,p.fS)(this.getCenterInternal(),l)||(this.getAnimating()&&this.cancelAnimations(),this.animateInternal({rotation:o,center:l,resolution:s,duration:i,easing:_.Vv,anchor:u}))},e.prototype.beginInteraction=function(){this.resolveConstraints(0),this.setHint(s.Z.INTERACTING,1)},e.prototype.endInteraction=function(t,e,r){var i=r&&(0,c.fromUserCoordinate)(r,this.getProjection());this.endInteractionInternal(t,e,i)},e.prototype.endInteractionInternal=function(t,e,r){this.setHint(s.Z.INTERACTING,-1),this.resolveConstraints(t,e,r)},e.prototype.getConstrainedCenter=function(t,e){var r=this.getViewportSize_(this.getRotation());return this.constraints_.center(t,e||this.getResolution(),r)},e.prototype.getConstrainedZoom=function(t,e){var r=this.getResolutionForZoom(t);return this.getZoomForResolution(this.getConstrainedResolution(r,e))},e.prototype.getConstrainedResolution=function(t,e){var r=e||0,i=this.getViewportSize_(this.getRotation());return this.constraints_.resolution(t,r,i)},e}(n.Z)},7755:(t,e,r)=>{"use strict";r.d(e,{Z:()=>i});const i={ANIMATING:0,INTERACTING:1}},7240:(t,e,r)=>{"use strict";r.d(e,{Z:()=>i});const i={CENTER:"center",RESOLUTION:"resolution",ROTATION:"rotation"}},5537:(t,e,r)=>{"use strict";function i(t,e,r){for(var i,o,a=r||n,s=0,l=t.length,u=!1;s<l;)(o=+a(t[i=s+(l-s>>1)],e))<0?s=i+1:(l=i,u=!o);return u?s:~s}function n(t,e){return t>e?1:t<e?-1:0}function o(t,e){return t.indexOf(e)>=0}function a(t,e,r){var i=t.length;if(t[0]<=e)return 0;if(e<=t[i-1])return i-1;var n=void 0;if(r>0){for(n=1;n<i;++n)if(t[n]<e)return n-1}else if(r<0){for(n=1;n<i;++n)if(t[n]<=e)return n}else for(n=1;n<i;++n){if(t[n]==e)return n;if(t[n]<e)return"function"==typeof r?r(e,t[n-1],t[n])>0?n-1:n:t[n-1]-e<e-t[n]?n-1:n}return i-1}function s(t,e,r){for(;e<r;){var i=t[e];t[e]=t[r],t[r]=i,++e,--r}}function l(t,e){for(var r=Array.isArray(e)?e:[e],i=r.length,n=0;n<i;n++)t[t.length]=r[n]}function u(t,e){var r=t.length;if(r!==e.length)return!1;for(var i=0;i<r;i++)if(t[i]!==e[i])return!1;return!0}function c(t,e,r){var i=e||n;return t.every((function(e,n){if(0===n)return!0;var o=i(t[n-1],e);return!(o>0||r&&0===o)}))}r.d(e,{FZ:()=>s,fS:()=>u,h7:()=>a,kK:()=>n,l7:()=>l,pT:()=>c,q9:()=>o,ry:()=>i})},9515:(t,e,r)=>{"use strict";r.d(e,{h:()=>n});var i=r(6813);function n(t,e){if(!t)throw new i.Z(e)}},8427:(t,e,r)=>{"use strict";r.d(e,{Y:()=>o,s:()=>n});var i=r(3983);function n(t,e,r){return function(n,o,a,s,l){if(n){if(!o&&!e)return n;var u=e?0:a[0]*o,c=e?0:a[1]*o,h=l?l[0]:0,p=l?l[1]:0,d=t[0]+u/2+h,f=t[2]-u/2+h,g=t[1]+c/2+p,y=t[3]-c/2+p;d>f&&(f=d=(f+d)/2),g>y&&(y=g=(y+g)/2);var m=(0,i.uZ)(n[0],d,f),v=(0,i.uZ)(n[1],g,y);if(s&&r&&o){var _=30*o;m+=-_*Math.log(1+Math.max(0,d-n[0])/_)+_*Math.log(1+Math.max(0,n[0]-f)/_),v+=-_*Math.log(1+Math.max(0,g-n[1])/_)+_*Math.log(1+Math.max(0,n[1]-y)/_)}return[m,v]}}}function o(t){return t}},9706:(t,e,r)=>{"use strict";r.d(e,{BB:()=>f,XC:()=>s,_2:()=>p,e1:()=>g,mL:()=>h});var i=r(9515),n=r(3983),o=/^#([a-f0-9]{3}|[a-f0-9]{4}(?:[a-f0-9]{2}){0,2})$/i,a=/^([a-z]*)$|^hsla?\(.*\)$/i;function s(t){return"string"==typeof t?t:f(t)}function l(t){var e=document.createElement("div");if(e.style.color=t,""!==e.style.color){document.body.appendChild(e);var r=getComputedStyle(e).color;return document.body.removeChild(e),r}return""}var u,c,h=(u={},c=0,function(t){var e;if(u.hasOwnProperty(t))e=u[t];else{if(c>=1024){var r=0;for(var n in u)0==(3&r++)&&(delete u[n],--c)}e=function(t){var e,r,n,s,u;if(a.exec(t)&&(t=l(t)),o.exec(t)){var c,h=t.length-1;c=h<=4?1:2;var p=4===h||8===h;e=parseInt(t.substr(1+0*c,c),16),r=parseInt(t.substr(1+1*c,c),16),n=parseInt(t.substr(1+2*c,c),16),s=p?parseInt(t.substr(1+3*c,c),16):255,1==c&&(e=(e<<4)+e,r=(r<<4)+r,n=(n<<4)+n,p&&(s=(s<<4)+s)),u=[e,r,n,s/255]}else 0==t.indexOf("rgba(")?d(u=t.slice(5,-1).split(",").map(Number)):0==t.indexOf("rgb(")?((u=t.slice(4,-1).split(",").map(Number)).push(1),d(u)):(0,i.h)(!1,14);return u}(t),u[t]=e,++c}return e});function p(t){return Array.isArray(t)?t:h(t)}function d(t){return t[0]=(0,n.uZ)(t[0]+.5|0,0,255),t[1]=(0,n.uZ)(t[1]+.5|0,0,255),t[2]=(0,n.uZ)(t[2]+.5|0,0,255),t[3]=(0,n.uZ)(t[3],0,1),t}function f(t){var e=t[0];e!=(0|e)&&(e=e+.5|0);var r=t[1];r!=(0|r)&&(r=r+.5|0);var i=t[2];return i!=(0|i)&&(i=i+.5|0),"rgba("+e+","+r+","+i+","+(void 0===t[3]?1:Math.round(100*t[3])/100)+")"}function g(t){return a.test(t)&&(t=l(t)),o.test(t)||0===t.indexOf("rgba(")||0===t.indexOf("rgb(")}},6620:(t,e,r)=>{"use strict";r.d(e,{y:()=>n});var i=r(9706);function n(t){return Array.isArray(t)?(0,i.BB)(t):t}},494:(t,e,r)=>{"use strict";r.r(e),r.d(e,{Attribution:()=>i.Z,Control:()=>s.Z,FullScreen:()=>l.Z,MousePosition:()=>u.Z,OverviewMap:()=>c.Z,Rotate:()=>o.Z,ScaleLine:()=>h.Z,Zoom:()=>a.Z,ZoomSlider:()=>p.Z,ZoomToExtent:()=>d.Z,defaults:()=>f});var i=r(2657),n=r(8714),o=r(9965),a=r(3851),s=r(8775),l=r(97),u=r(4540),c=r(5654),h=r(7494),p=r(8168),d=r(559);function f(t){var e=t||{},r=new n.Z;return(void 0===e.zoom||e.zoom)&&r.push(new a.Z(e.zoomOptions)),(void 0===e.rotate||e.rotate)&&r.push(new o.Z(e.rotateOptions)),(void 0===e.attribution||e.attribution)&&r.push(new i.Z(e.attributionOptions)),r}},2657:(t,e,r)=>{"use strict";r.d(e,{Z:()=>h});var i,n=r(8775),o=r(5487),a=r(245),s=r(5537),l=r(1295),u=r(8326),c=(i=function(t,e){return i=Object.setPrototypeOf||{__proto__:[]}instanceof Array&&function(t,e){t.__proto__=e}||function(t,e){for(var r in e)Object.prototype.hasOwnProperty.call(e,r)&&(t[r]=e[r])},i(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 r(){this.constructor=t}i(t,e),t.prototype=null===e?Object.create(e):(r.prototype=e.prototype,new r)});const h=function(t){function e(e){var r=this,i=e||{};(r=t.call(this,{element:document.createElement("div"),render:i.render,target:i.target})||this).ulElement_=document.createElement("ul"),r.collapsed_=void 0===i.collapsed||i.collapsed,r.userCollapsed_=r.collapsed_,r.overrideCollapsible_=void 0!==i.collapsible,r.collapsible_=void 0===i.collapsible||i.collapsible,r.collapsible_||(r.collapsed_=!1);var n=void 0!==i.className?i.className:"ol-attribution",s=void 0!==i.tipLabel?i.tipLabel:"Attributions",l=void 0!==i.expandClassName?i.expandClassName:n+"-expand",u=void 0!==i.collapseLabel?i.collapseLabel:"›",c=void 0!==i.collapseClassName?i.collapseClassName:n+"-collapse";"string"==typeof u?(r.collapseLabel_=document.createElement("span"),r.collapseLabel_.textContent=u,r.collapseLabel_.className=c):r.collapseLabel_=u;var h=void 0!==i.label?i.label:"i";"string"==typeof h?(r.label_=document.createElement("span"),r.label_.textContent=h,r.label_.className=l):r.label_=h;var p=r.collapsible_&&!r.collapsed_?r.collapseLabel_:r.label_;r.toggleButton_=document.createElement("button"),r.toggleButton_.setAttribute("type","button"),r.toggleButton_.setAttribute("aria-expanded",String(!r.collapsed_)),r.toggleButton_.title=s,r.toggleButton_.appendChild(p),r.toggleButton_.addEventListener(o.Z.CLICK,r.handleClick_.bind(r),!1);var d=n+" "+a.XV+" "+a.hg+(r.collapsed_&&r.collapsible_?" "+a.hN:"")+(r.collapsible_?"":" ol-uncollapsible"),f=r.element;return f.className=d,f.appendChild(r.toggleButton_),f.appendChild(r.ulElement_),r.renderedAttributions_=[],r.renderedVisible_=!0,r}return c(e,t),e.prototype.collectSourceAttributions_=function(t){for(var e={},r=[],i=!0,n=t.layerStatesArray,o=0,a=n.length;o<a;++o){var s=n[o];if((0,l.j)(s,t.viewState)){var u=s.layer.getSource();if(u){var c=u.getAttributions();if(c){var h=c(t);if(h)if(i=i&&!1!==u.getAttributionsCollapsible(),Array.isArray(h))for(var p=0,d=h.length;p<d;++p)h[p]in e||(r.push(h[p]),e[h[p]]=!0);else h in e||(r.push(h),e[h]=!0)}}}}return this.overrideCollapsible_||this.setCollapsible(i),r},e.prototype.updateElement_=function(t){if(t){var e=this.collectSourceAttributions_(t),r=e.length>0;if(this.renderedVisible_!=r&&(this.element.style.display=r?"":"none",this.renderedVisible_=r),!(0,s.fS)(e,this.renderedAttributions_)){(0,u.ep)(this.ulElement_);for(var i=0,n=e.length;i<n;++i){var o=document.createElement("li");o.innerHTML=e[i],this.ulElement_.appendChild(o)}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(a.hN),this.collapsed_?(0,u.$H)(this.collapseLabel_,this.label_):(0,u.$H)(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}(n.Z)},8775:(t,e,r)=>{"use strict";r.d(e,{Z:()=>c});var i,n=r(2971),o=r(2126),a=r(6885),s=r(5818),l=r(8326),u=(i=function(t,e){return i=Object.setPrototypeOf||{__proto__:[]}instanceof Array&&function(t,e){t.__proto__=e}||function(t,e){for(var r in e)Object.prototype.hasOwnProperty.call(e,r)&&(t[r]=e[r])},i(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 r(){this.constructor=t}i(t,e),t.prototype=null===e?Object.create(e):(r.prototype=e.prototype,new r)});const c=function(t){function e(e){var r=t.call(this)||this,i=e.element;return!i||e.target||i.style.pointerEvents||(i.style.pointerEvents="auto"),r.element=i||null,r.target_=null,r.map_=null,r.listenerKeys=[],e.render&&(r.render=e.render),e.target&&r.setTarget(e.target),r}return u(e,t),e.prototype.disposeInternal=function(){(0,l.ZF)(this.element),t.prototype.disposeInternal.call(this)},e.prototype.getMap=function(){return this.map_},e.prototype.setMap=function(t){this.map_&&(0,l.ZF)(this.element);for(var e=0,r=this.listenerKeys.length;e<r;++e)(0,s.bN)(this.listenerKeys[e]);this.listenerKeys.length=0,this.map_=t,t&&((this.target_?this.target_:t.getOverlayContainerStopEvent()).appendChild(this.element),this.render!==a.Zn&&this.listenerKeys.push((0,s.oL)(t,o.Z.POSTRENDER,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}(n.Z)},97:(t,e,r)=>{"use strict";r.d(e,{Z:()=>g});var i,n=r(8775),o=r(5487),a=r(3222),s=r(245),l=r(5818),u=r(8326),c=(i=function(t,e){return i=Object.setPrototypeOf||{__proto__:[]}instanceof Array&&function(t,e){t.__proto__=e}||function(t,e){for(var r in e)Object.prototype.hasOwnProperty.call(e,r)&&(t[r]=e[r])},i(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 r(){this.constructor=t}i(t,e),t.prototype=null===e?Object.create(e):(r.prototype=e.prototype,new r)}),h=["fullscreenchange","webkitfullscreenchange","MSFullscreenChange"];function p(t){var e=t.body;return!!(e.webkitRequestFullscreen||e.msRequestFullscreen&&t.msFullscreenEnabled||e.requestFullscreen&&t.fullscreenEnabled)}function d(t){return!!(t.webkitIsFullScreen||t.msFullscreenElement||t.fullscreenElement)}function f(t){t.requestFullscreen?t.requestFullscreen():t.msRequestFullscreen?t.msRequestFullscreen():t.webkitRequestFullscreen&&t.webkitRequestFullscreen()}const g=function(t){function e(e){var r=this,i=e||{};(r=t.call(this,{element:document.createElement("div"),target:i.target})||this).on,r.once,r.un,r.keys_=void 0!==i.keys&&i.keys,r.source_=i.source,r.isInFullscreen_=!1,r.boundHandleMapTargetChange_=r.handleMapTargetChange_.bind(r),r.cssClassName_=void 0!==i.className?i.className:"ol-full-screen",r.documentListeners_=[],r.activeClassName_=void 0!==i.activeClassName?i.activeClassName.split(" "):[r.cssClassName_+"-true"],r.inactiveClassName_=void 0!==i.inactiveClassName?i.inactiveClassName.split(" "):[r.cssClassName_+"-false"];var n=void 0!==i.label?i.label:"⤢";r.labelNode_="string"==typeof n?document.createTextNode(n):n;var a=void 0!==i.labelActive?i.labelActive:"×";r.labelActiveNode_="string"==typeof a?document.createTextNode(a):a;var l=i.tipLabel?i.tipLabel:"Toggle full-screen";return r.button_=document.createElement("button"),r.button_.title=l,r.button_.setAttribute("type","button"),r.button_.appendChild(r.labelNode_),r.button_.addEventListener(o.Z.CLICK,r.handleClick_.bind(r),!1),r.setClassName_(r.button_,r.isInFullscreen_),r.element.className="".concat(r.cssClassName_," ").concat(s.XV," ").concat(s.hg),r.element.appendChild(r.button_),r}return c(e,t),e.prototype.handleClick_=function(t){t.preventDefault(),this.handleFullScreen_()},e.prototype.handleFullScreen_=function(){var t=this.getMap();if(t){var e=t.getOwnerDocument();if(p(e))if(d(e))!function(t){t.exitFullscreen?t.exitFullscreen():t.msExitFullscreen?t.msExitFullscreen():t.webkitExitFullscreen&&t.webkitExitFullscreen()}(e);else{var r;r=this.source_?"string"==typeof this.source_?e.getElementById(this.source_):this.source_:t.getTargetElement(),this.keys_?function(t){t.webkitRequestFullscreen?t.webkitRequestFullscreen():f(t)}(r):f(r)}}},e.prototype.handleFullScreenChange_=function(){var t=this.getMap();if(t){var e=this.isInFullscreen_;this.isInFullscreen_=d(t.getOwnerDocument()),e!==this.isInFullscreen_&&(this.setClassName_(this.button_,this.isInFullscreen_),this.isInFullscreen_?((0,u.$H)(this.labelActiveNode_,this.labelNode_),this.dispatchEvent("enterfullscreen")):((0,u.$H)(this.labelNode_,this.labelActiveNode_),this.dispatchEvent("leavefullscreen")),t.updateSize())}},e.prototype.setClassName_=function(t,e){var r,i,n,o;e?((r=t.classList).remove.apply(r,this.inactiveClassName_),(i=t.classList).add.apply(i,this.activeClassName_)):((n=t.classList).remove.apply(n,this.activeClassName_),(o=t.classList).add.apply(o,this.inactiveClassName_))},e.prototype.setMap=function(e){var r=this.getMap();r&&r.removeChangeListener(a.Z.TARGET,this.boundHandleMapTargetChange_),t.prototype.setMap.call(this,e),this.handleMapTargetChange_(),e&&e.addChangeListener(a.Z.TARGET,this.boundHandleMapTargetChange_)},e.prototype.handleMapTargetChange_=function(){for(var t=this.documentListeners_,e=0,r=t.length;e<r;++e)(0,l.bN)(t[e]);t.length=0;var i=this.getMap();if(i){var n=i.getOwnerDocument();for(p(n)?this.element.classList.remove(s.Qi):this.element.classList.add(s.Qi),e=0,r=h.length;e<r;++e)t.push((0,l.oL)(n,h[e],this.handleFullScreenChange_,this));this.handleFullScreenChange_()}},e}(n.Z)},4540:(t,e,r)=>{"use strict";r.d(e,{Z:()=>h});var i,n=r(8775),o=r(4238),a=r(6121),s=r(5818),l=(i=function(t,e){return i=Object.setPrototypeOf||{__proto__:[]}instanceof Array&&function(t,e){t.__proto__=e}||function(t,e){for(var r in e)Object.prototype.hasOwnProperty.call(e,r)&&(t[r]=e[r])},i(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 r(){this.constructor=t}i(t,e),t.prototype=null===e?Object.create(e):(r.prototype=e.prototype,new r)}),u="projection",c="coordinateFormat";const h=function(t){function e(e){var r=this,i=e||{},n=document.createElement("div");n.className=void 0!==i.className?i.className:"ol-mouse-position",(r=t.call(this,{element:n,render:i.render,target:i.target})||this).on,r.once,r.un,r.addChangeListener(u,r.handleProjectionChanged_),i.coordinateFormat&&r.setCoordinateFormat(i.coordinateFormat),i.projection&&r.setProjection(i.projection);var o=!0,a="&#160;";return"undefinedHTML"in i?(void 0!==i.undefinedHTML&&(a=i.undefinedHTML),o=!!a):"placeholder"in i&&(!1===i.placeholder?o=!1:a=String(i.placeholder)),r.placeholder_=a,r.renderOnMouseOut_=o,r.renderedHTML_=n.innerHTML,r.mapProjection_=null,r.transform_=null,r}return l(e,t),e.prototype.handleProjectionChanged_=function(){this.transform_=null},e.prototype.getCoordinateFormat=function(){return this.get(c)},e.prototype.getProjection=function(){return this.get(u)},e.prototype.handleMouseMove=function(t){var e=this.getMap();this.updateHTML_(e.getEventPixel(t))},e.prototype.handleMouseOut=function(t){this.updateHTML_(null)},e.prototype.setMap=function(e){if(t.prototype.setMap.call(this,e),e){var r=e.getViewport();this.listenerKeys.push((0,s.oL)(r,o.Z.POINTERMOVE,this.handleMouseMove,this)),this.renderOnMouseOut_&&this.listenerKeys.push((0,s.oL)(r,o.Z.POINTEROUT,this.handleMouseOut,this)),this.updateHTML_(null)}},e.prototype.setCoordinateFormat=function(t){this.set(c,t)},e.prototype.setProjection=function(t){this.set(u,(0,a.get)(t))},e.prototype.updateHTML_=function(t){var e=this.placeholder_;if(t&&this.mapProjection_){if(!this.transform_){var r=this.getProjection();this.transform_=r?(0,a.getTransformFromProjections)(this.mapProjection_,r):a.identityTransform}var i=this.getMap().getCoordinateFromPixelInternal(t);if(i){var n=(0,a.getUserProjection)();n&&(this.transform_=(0,a.getTransformFromProjections)(this.mapProjection_,n)),this.transform_(i,i);var o=this.getCoordinateFormat();e=o?o(i):i.toString()}}this.renderedHTML_&&e===this.renderedHTML_||(this.element.innerHTML=e,this.renderedHTML_=e)},e.prototype.render=function(t){var e=t.frameState;e?this.mapProjection_!=e.viewState.projection&&(this.mapProjection_=e.viewState.projection,this.transform_=null):this.mapProjection_=null},e}(n.Z)},5654:(t,e,r)=>{"use strict";r.d(e,{Z:()=>w});var i,n=r(9151),o=r(8775),a=r(5487),s=r(2126),l=r(3222),u=r(5990),c=r(3223),h=r(8835),p=r(7739),d=r(7681),f=r(7240),g=r(245),y=r(8641),m=r(5818),v=r(2033),_=r(8326),x=(i=function(t,e){return i=Object.setPrototypeOf||{__proto__:[]}instanceof Array&&function(t,e){t.__proto__=e}||function(t,e){for(var r in e)Object.prototype.hasOwnProperty.call(e,r)&&(t[r]=e[r])},i(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 r(){this.constructor=t}i(t,e),t.prototype=null===e?Object.create(e):(r.prototype=e.prototype,new r)}),b=function(t){function e(){return null!==t&&t.apply(this,arguments)||this}return x(e,t),e.prototype.createRenderer=function(){return new n.Z(this)},e}(p.Z);const w=function(t){function e(e){var r=this,i=e||{};(r=t.call(this,{element:document.createElement("div"),render:i.render,target:i.target})||this).boundHandleRotationChanged_=r.handleRotationChanged_.bind(r),r.collapsed_=void 0===i.collapsed||i.collapsed,r.collapsible_=void 0===i.collapsible||i.collapsible,r.collapsible_||(r.collapsed_=!1),r.rotateWithView_=void 0!==i.rotateWithView&&i.rotateWithView,r.viewExtent_=void 0;var n=void 0!==i.className?i.className:"ol-overviewmap",o=void 0!==i.tipLabel?i.tipLabel:"Overview map",s=void 0!==i.collapseLabel?i.collapseLabel:"‹";"string"==typeof s?(r.collapseLabel_=document.createElement("span"),r.collapseLabel_.textContent=s):r.collapseLabel_=s;var l=void 0!==i.label?i.label:"›";"string"==typeof l?(r.label_=document.createElement("span"),r.label_.textContent=l):r.label_=l;var u=r.collapsible_&&!r.collapsed_?r.collapseLabel_:r.label_,p=document.createElement("button");p.setAttribute("type","button"),p.title=o,p.appendChild(u),p.addEventListener(a.Z.CLICK,r.handleClick_.bind(r),!1),r.ovmapDiv_=document.createElement("div"),r.ovmapDiv_.className="ol-overviewmap-map",r.view_=i.view,r.ovmap_=new b({view:i.view});var d=r.ovmap_;i.layers&&i.layers.forEach((function(t){d.addLayer(t)}));var f=document.createElement("div");f.className="ol-overviewmap-box",f.style.boxSizing="border-box",r.boxOverlay_=new c.Z({position:[0,0],positioning:h.Z.CENTER_CENTER,element:f}),r.ovmap_.addOverlay(r.boxOverlay_);var y=n+" "+g.XV+" "+g.hg+(r.collapsed_&&r.collapsible_?" "+g.hN:"")+(r.collapsible_?"":" ol-uncollapsible"),m=r.element;m.className=y,m.appendChild(r.ovmapDiv_),m.appendChild(p);var v=r,_=r.boxOverlay_,x=r.boxOverlay_.getElement(),w=function(t){var e,r={clientX:(e=t).clientX,clientY:e.clientY},i=d.getEventCoordinateInternal(r);_.setPosition(i)},E=function(t){var e=d.getEventCoordinateInternal(t);v.getMap().getView().setCenterInternal(e),window.removeEventListener("mousemove",w),window.removeEventListener("mouseup",E)};return x.addEventListener("mousedown",(function(){window.addEventListener("mousemove",w),window.addEventListener("mouseup",E)})),r}return x(e,t),e.prototype.setMap=function(e){var r=this.getMap();if(e!==r){if(r){var i=r.getView();i&&this.unbindView_(i),this.ovmap_.setTarget(null)}if(t.prototype.setMap.call(this,e),e){this.ovmap_.setTarget(this.ovmapDiv_),this.listenerKeys.push((0,m.oL)(e,u.Z.PROPERTYCHANGE,this.handleMapPropertyChange_,this));var n=e.getView();n&&(this.bindView_(n),n.isDef()&&(this.ovmap_.updateSize(),this.resetExtent_())),this.ovmap_.isRendered()||this.updateBoxAfterOvmapIsRendered_()}}},e.prototype.handleMapPropertyChange_=function(t){if(t.key===l.Z.VIEW){var e=t.oldValue;e&&this.unbindView_(e);var r=this.getMap().getView();this.bindView_(r)}else this.ovmap_.isRendered()||t.key!==l.Z.TARGET&&t.key!==l.Z.SIZE||this.ovmap_.updateSize()},e.prototype.bindView_=function(t){if(!this.view_){var e=new d.ZP({projection:t.getProjection()});this.ovmap_.setView(e)}t.addChangeListener(f.Z.ROTATION,this.boundHandleRotationChanged_),this.handleRotationChanged_()},e.prototype.unbindView_=function(t){t.removeChangeListener(f.Z.ROTATION,this.boundHandleRotationChanged_)},e.prototype.handleRotationChanged_=function(){this.rotateWithView_&&this.ovmap_.getView().setRotation(this.getMap().getView().getRotation())},e.prototype.validateExtent_=function(){var t=this.getMap(),e=this.ovmap_;if(t.isRendered()&&e.isRendered()){var r=t.getSize(),i=t.getView().calculateExtentInternal(r);if(!this.viewExtent_||!(0,y.equals)(i,this.viewExtent_)){this.viewExtent_=i;var n=e.getSize(),o=e.getView().calculateExtentInternal(n),a=e.getPixelFromCoordinateInternal((0,y.getTopLeft)(i)),s=e.getPixelFromCoordinateInternal((0,y.getBottomRight)(i)),l=Math.abs(a[0]-s[0]),u=Math.abs(a[1]-s[1]),c=n[0],h=n[1];l<.1*c||u<.1*h||l>.75*c||u>.75*h?this.resetExtent_():(0,y.containsExtent)(o,i)||this.recenter_()}}},e.prototype.resetExtent_=function(){var t=this.getMap(),e=this.ovmap_,r=t.getSize(),i=t.getView().calculateExtentInternal(r),n=e.getView(),o=Math.log(7.5)/Math.LN2,a=1/(.1*Math.pow(2,o/2));(0,y.scaleFromCenter)(i,a),n.fitInternal((0,v.oJ)(i))},e.prototype.recenter_=function(){var t=this.getMap(),e=this.ovmap_,r=t.getView();e.getView().setCenterInternal(r.getCenterInternal())},e.prototype.updateBox_=function(){var t=this.getMap(),e=this.ovmap_;if(t.isRendered()&&e.isRendered()){var r=t.getSize(),i=t.getView(),n=e.getView(),o=this.rotateWithView_?0:-i.getRotation(),a=this.boxOverlay_,s=this.boxOverlay_.getElement(),l=i.getCenterInternal(),u=i.getResolution(),c=n.getResolution(),h=r[0]*u/c,p=r[1]*u/c;if(a.setPosition(l),s){s.style.width=h+"px",s.style.height=p+"px";var d="rotate("+o+"rad)";s.style.transform=d}}},e.prototype.updateBoxAfterOvmapIsRendered_=function(){this.ovmapPostrenderKey_||(this.ovmapPostrenderKey_=(0,m.Vx)(this.ovmap_,s.Z.POSTRENDER,(function(t){delete this.ovmapPostrenderKey_,this.updateBox_()}),this))},e.prototype.handleClick_=function(t){t.preventDefault(),this.handleToggle_()},e.prototype.handleToggle_=function(){this.element.classList.toggle(g.hN),this.collapsed_?(0,_.$H)(this.collapseLabel_,this.label_):(0,_.$H)(this.label_,this.collapseLabel_),this.collapsed_=!this.collapsed_;var t=this.ovmap_;if(!this.collapsed_){if(t.isRendered())return this.viewExtent_=void 0,void t.render();t.updateSize(),this.resetExtent_(),this.updateBoxAfterOvmapIsRendered_()}},e.prototype.getCollapsible=function(){return this.collapsible_},e.prototype.setCollapsible=function(t){this.collapsible_!==t&&(this.collapsible_=t,this.element.classList.toggle("ol-uncollapsible"),!t&&this.collapsed_&&this.handleToggle_())},e.prototype.setCollapsed=function(t){this.collapsible_&&this.collapsed_!==t&&this.handleToggle_()},e.prototype.getCollapsed=function(){return this.collapsed_},e.prototype.getRotateWithView=function(){return this.rotateWithView_},e.prototype.setRotateWithView=function(t){this.rotateWithView_!==t&&(this.rotateWithView_=t,0!==this.getMap().getView().getRotation()&&(this.rotateWithView_?this.handleRotationChanged_():this.ovmap_.getView().setRotation(0),this.viewExtent_=void 0,this.validateExtent_(),this.updateBox_()))},e.prototype.getOverviewMap=function(){return this.ovmap_},e.prototype.render=function(t){this.validateExtent_(),this.updateBox_()},e}(o.Z)},9965:(t,e,r)=>{"use strict";r.d(e,{Z:()=>u});var i,n=r(8775),o=r(5487),a=r(245),s=r(1015),l=(i=function(t,e){return i=Object.setPrototypeOf||{__proto__:[]}instanceof Array&&function(t,e){t.__proto__=e}||function(t,e){for(var r in e)Object.prototype.hasOwnProperty.call(e,r)&&(t[r]=e[r])},i(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 r(){this.constructor=t}i(t,e),t.prototype=null===e?Object.create(e):(r.prototype=e.prototype,new r)});const u=function(t){function e(e){var r=this,i=e||{};r=t.call(this,{element:document.createElement("div"),render:i.render,target:i.target})||this;var n=void 0!==i.className?i.className:"ol-rotate",s=void 0!==i.label?i.label:"⇧",l=void 0!==i.compassClassName?i.compassClassName:"ol-compass";r.label_=null,"string"==typeof s?(r.label_=document.createElement("span"),r.label_.className=l,r.label_.textContent=s):(r.label_=s,r.label_.classList.add(l));var u=i.tipLabel?i.tipLabel:"Reset rotation",c=document.createElement("button");c.className=n+"-reset",c.setAttribute("type","button"),c.title=u,c.appendChild(r.label_),c.addEventListener(o.Z.CLICK,r.handleClick_.bind(r),!1);var h=n+" "+a.XV+" "+a.hg,p=r.element;return p.className=h,p.appendChild(c),r.callResetNorth_=i.resetNorth?i.resetNorth:void 0,r.duration_=void 0!==i.duration?i.duration:250,r.autoHide_=void 0===i.autoHide||i.autoHide,r.rotation_=void 0,r.autoHide_&&r.element.classList.add(a.oj),r}return l(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:s.Vv}):t.setRotation(0))}},e.prototype.render=function(t){var e=t.frameState;if(e){var r=e.viewState.rotation;if(r!=this.rotation_){var i="rotate("+r+"rad)";if(this.autoHide_){var n=this.element.classList.contains(a.oj);n||0!==r?n&&0!==r&&this.element.classList.remove(a.oj):this.element.classList.add(a.oj)}this.label_.style.transform=i}this.rotation_=r}},e}(n.Z)},7494:(t,e,r)=>{"use strict";r.d(e,{Z:()=>g});var i,n=r(8775),o=r(8375),a=r(245),s=r(6121),l=r(9515),u=(i=function(t,e){return i=Object.setPrototypeOf||{__proto__:[]}instanceof Array&&function(t,e){t.__proto__=e}||function(t,e){for(var r in e)Object.prototype.hasOwnProperty.call(e,r)&&(t[r]=e[r])},i(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 r(){this.constructor=t}i(t,e),t.prototype=null===e?Object.create(e):(r.prototype=e.prototype,new r)}),c="units",h="degrees",p="metric",d=[1,2,5],f=25.4/.28;const g=function(t){function e(e){var r=this,i=e||{},n=void 0!==i.className?i.className:i.bar?"ol-scale-bar":"ol-scale-line";return(r=t.call(this,{element:document.createElement("div"),render:i.render,target:i.target})||this).on,r.once,r.un,r.innerElement_=document.createElement("div"),r.innerElement_.className=n+"-inner",r.element.className=n+" "+a.XV,r.element.appendChild(r.innerElement_),r.viewState_=null,r.minWidth_=void 0!==i.minWidth?i.minWidth:64,r.renderedVisible_=!1,r.renderedWidth_=void 0,r.renderedHTML_="",r.addChangeListener(c,r.handleUnitsChanged_),r.setUnits(i.units||p),r.scaleBar_=i.bar||!1,r.scaleBarSteps_=i.steps||4,r.scaleBarText_=i.text||!1,r.dpi_=i.dpi||void 0,r}return u(e,t),e.prototype.getUnits=function(){return this.get(c)},e.prototype.handleUnitsChanged_=function(){this.updateElement_()},e.prototype.setUnits=function(t){this.set(c,t)},e.prototype.setDpi=function(t){this.dpi_=t},e.prototype.updateElement_=function(){var t=this.viewState_;if(t){var e=t.center,r=t.projection,i=this.getUnits(),n=i==h?o.ZP.DEGREES:o.ZP.METERS,a=(0,s.getPointResolution)(r,t.resolution,e,n),u=this.minWidth_*(this.dpi_||f)/f,c=u*a,g="";if(i==h){var y=s.METERS_PER_UNIT[o.ZP.DEGREES];(c*=y)<y/60?(g="″",a*=3600):c<y?(g="′",a*=60):g="°"}else"imperial"==i?c<.9144?(g="in",a/=.0254):c<1609.344?(g="ft",a/=.3048):(g="mi",a/=1609.344):"nautical"==i?(a/=1852,g="nm"):i==p?c<.001?(g="μm",a*=1e6):c<1?(g="mm",a*=1e3):c<1e3?g="m":(g="km",a/=1e3):"us"==i?c<.9144?(g="in",a*=39.37):c<1609.344?(g="ft",a/=.30480061):(g="mi",a/=1609.3472):(0,l.h)(!1,33);for(var m,v,_,x,b=3*Math.floor(Math.log(u*a)/Math.log(10));;){_=Math.floor(b/3);var w=Math.pow(10,_);if(m=d[(b%3+3)%3]*w,v=Math.round(m/a),isNaN(v))return this.element.style.display="none",void(this.renderedVisible_=!1);if(v>=u)break;++b}x=this.scaleBar_?this.createScaleBar(v,m,g):m.toFixed(_<0?-_:0)+" "+g,this.renderedHTML_!=x&&(this.innerElement_.innerHTML=x,this.renderedHTML_=x),this.renderedWidth_!=v&&(this.innerElement_.style.width=v+"px",this.renderedWidth_=v),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,r){for(var i="1 : "+Math.round(this.getScaleForResolution()).toLocaleString(),n=[],o=t/this.scaleBarSteps_,a="#ffffff",s=0;s<this.scaleBarSteps_;s++)0===s&&n.push(this.createMarker("absolute",s)),n.push('<div><div class="ol-scale-singlebar" style="width: '+o+"px;background-color: "+a+';"></div>'+this.createMarker("relative",s)+(s%2==0||2===this.scaleBarSteps_?this.createStepText(s,t,!1,e,r):"")+"</div>"),s===this.scaleBarSteps_-1&&n.push(this.createStepText(s+1,t,!0,e,r)),a="#ffffff"===a?"#000000":"#ffffff";return'<div style="display: flex;">'+(this.scaleBarText_?'<div class="ol-scale-text" style="width: '+t+'px;">'+i+"</div>":"")+n.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,r,i,n){var o=(0===t?0:Math.round(i/this.scaleBarSteps_*t*100)/100)+(0===t?"":" "+n);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: "+(r?e+"px":"unset")+';">'+o+"</div>"},e.prototype.getScaleForResolution=function(){var t=(0,s.getPointResolution)(this.viewState_.projection,this.viewState_.resolution,this.viewState_.center,o.ZP.METERS),e=this.dpi_||f;return parseFloat(t.toString())*(1e3/25.4)*e},e.prototype.render=function(t){var e=t.frameState;this.viewState_=e?e.viewState:null,this.updateElement_()},e}(n.Z)},3851:(t,e,r)=>{"use strict";r.d(e,{Z:()=>u});var i,n=r(8775),o=r(5487),a=r(245),s=r(1015),l=(i=function(t,e){return i=Object.setPrototypeOf||{__proto__:[]}instanceof Array&&function(t,e){t.__proto__=e}||function(t,e){for(var r in e)Object.prototype.hasOwnProperty.call(e,r)&&(t[r]=e[r])},i(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 r(){this.constructor=t}i(t,e),t.prototype=null===e?Object.create(e):(r.prototype=e.prototype,new r)});const u=function(t){function e(e){var r=this,i=e||{};r=t.call(this,{element:document.createElement("div"),target:i.target})||this;var n=void 0!==i.className?i.className:"ol-zoom",s=void 0!==i.delta?i.delta:1,l=void 0!==i.zoomInClassName?i.zoomInClassName:n+"-in",u=void 0!==i.zoomOutClassName?i.zoomOutClassName:n+"-out",c=void 0!==i.zoomInLabel?i.zoomInLabel:"+",h=void 0!==i.zoomOutLabel?i.zoomOutLabel:"–",p=void 0!==i.zoomInTipLabel?i.zoomInTipLabel:"Zoom in",d=void 0!==i.zoomOutTipLabel?i.zoomOutTipLabel:"Zoom out",f=document.createElement("button");f.className=l,f.setAttribute("type","button"),f.title=p,f.appendChild("string"==typeof c?document.createTextNode(c):c),f.addEventListener(o.Z.CLICK,r.handleClick_.bind(r,s),!1);var g=document.createElement("button");g.className=u,g.setAttribute("type","button"),g.title=d,g.appendChild("string"==typeof h?document.createTextNode(h):h),g.addEventListener(o.Z.CLICK,r.handleClick_.bind(r,-s),!1);var y=n+" "+a.XV+" "+a.hg,m=r.element;return m.className=y,m.appendChild(f),m.appendChild(g),r.duration_=void 0!==i.duration?i.duration:250,r}return l(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 r=e.getZoom();if(void 0!==r){var i=e.getConstrainedZoom(r+t);this.duration_>0?(e.getAnimating()&&e.cancelAnimations(),e.animate({zoom:i,duration:this.duration_,easing:s.Vv})):e.setZoom(i)}}},e}(n.Z)},8168:(t,e,r)=>{"use strict";r.d(e,{Z:()=>d});var i,n=r(8775),o=r(5487),a=r(4238),s=r(245),l=r(3983),u=r(1015),c=r(5818),h=r(291),p=(i=function(t,e){return i=Object.setPrototypeOf||{__proto__:[]}instanceof Array&&function(t,e){t.__proto__=e}||function(t,e){for(var r in e)Object.prototype.hasOwnProperty.call(e,r)&&(t[r]=e[r])},i(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 r(){this.constructor=t}i(t,e),t.prototype=null===e?Object.create(e):(r.prototype=e.prototype,new r)});const d=function(t){function e(e){var r=this,i=e||{};(r=t.call(this,{element:document.createElement("div"),render:i.render})||this).dragListenerKeys_=[],r.currentResolution_=void 0,r.direction_=0,r.dragging_,r.heightLimit_=0,r.widthLimit_=0,r.startX_,r.startY_,r.thumbSize_=null,r.sliderInitialized_=!1,r.duration_=void 0!==i.duration?i.duration:200;var n=void 0!==i.className?i.className:"ol-zoomslider",l=document.createElement("button");l.setAttribute("type","button"),l.className=n+"-thumb "+s.XV;var u=r.element;return u.className=n+" "+s.XV+" "+s.hg,u.appendChild(l),u.addEventListener(a.Z.POINTERDOWN,r.handleDraggerStart_.bind(r),!1),u.addEventListener(a.Z.POINTERMOVE,r.handleDraggerDrag_.bind(r),!1),u.addEventListener(a.Z.POINTERUP,r.handleDraggerEnd_.bind(r),!1),u.addEventListener(o.Z.CLICK,r.handleContainerClick_.bind(r),!1),l.addEventListener(o.Z.CLICK,h.UW,!1),r}return p(e,t),e.prototype.setMap=function(e){t.prototype.setMap.call(this,e),e&&e.render()},e.prototype.initSlider_=function(){var t=this.element,e=t.offsetWidth,r=t.offsetHeight;if(0===e&&0===r)return this.sliderInitialized_=!1;var i=getComputedStyle(t);e-=parseFloat(i.paddingRight)+parseFloat(i.paddingLeft),r-=parseFloat(i.paddingTop)+parseFloat(i.paddingBottom);var n=t.firstElementChild,o=getComputedStyle(n),a=n.offsetWidth+parseFloat(o.marginRight)+parseFloat(o.marginLeft),s=n.offsetHeight+parseFloat(o.marginTop)+parseFloat(o.marginBottom);return this.thumbSize_=[a,s],e>r?(this.direction_=1,this.widthLimit_=e-a):(this.direction_=0,this.heightLimit_=r-s),this.sliderInitialized_=!0},e.prototype.handleContainerClick_=function(t){var e=this.getMap().getView(),r=this.getRelativePosition_(t.offsetX-this.thumbSize_[0]/2,t.offsetY-this.thumbSize_[1]/2),i=this.getResolutionForPosition_(r),n=e.getConstrainedZoom(e.getZoomForResolution(i));e.animateInternal({zoom:n,duration:this.duration_,easing:u.Vv})},e.prototype.handleDraggerStart_=function(t){if(!this.dragging_&&t.target===this.element.firstElementChild){var e=this.element.firstElementChild;if(this.getMap().getView().beginInteraction(),this.startX_=t.clientX-parseFloat(e.style.left),this.startY_=t.clientY-parseFloat(e.style.top),this.dragging_=!0,0===this.dragListenerKeys_.length){var r=this.handleDraggerDrag_,i=this.handleDraggerEnd_,n=this.getMap().getOwnerDocument();this.dragListenerKeys_.push((0,c.oL)(n,a.Z.POINTERMOVE,r,this),(0,c.oL)(n,a.Z.POINTERUP,i,this))}}},e.prototype.handleDraggerDrag_=function(t){if(this.dragging_){var e=t.clientX-this.startX_,r=t.clientY-this.startY_,i=this.getRelativePosition_(e,r);this.currentResolution_=this.getResolutionForPosition_(i),this.getMap().getView().setResolution(this.currentResolution_)}},e.prototype.handleDraggerEnd_=function(t){this.dragging_&&(this.getMap().getView().endInteraction(),this.dragging_=!1,this.startX_=void 0,this.startY_=void 0,this.dragListenerKeys_.forEach(c.bN),this.dragListenerKeys_.length=0)},e.prototype.setThumbPosition_=function(t){var e=this.getPositionForResolution_(t),r=this.element.firstElementChild;1==this.direction_?r.style.left=this.widthLimit_*e+"px":r.style.top=this.heightLimit_*e+"px"},e.prototype.getRelativePosition_=function(t,e){var r;return r=1===this.direction_?t/this.widthLimit_:e/this.heightLimit_,(0,l.uZ)(r,0,1)},e.prototype.getResolutionForPosition_=function(t){return this.getMap().getView().getResolutionForValueFunction()(1-t)},e.prototype.getPositionForResolution_=function(t){var e=this.getMap().getView().getValueForResolutionFunction();return(0,l.uZ)(1-e(t),0,1)},e.prototype.render=function(t){if(t.frameState&&(this.sliderInitialized_||this.initSlider_())){var e=t.frameState.viewState.resolution;this.currentResolution_=e,this.setThumbPosition_(e)}},e}(n.Z)},559:(t,e,r)=>{"use strict";r.d(e,{Z:()=>u});var i,n=r(8775),o=r(5487),a=r(245),s=r(2033),l=(i=function(t,e){return i=Object.setPrototypeOf||{__proto__:[]}instanceof Array&&function(t,e){t.__proto__=e}||function(t,e){for(var r in e)Object.prototype.hasOwnProperty.call(e,r)&&(t[r]=e[r])},i(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 r(){this.constructor=t}i(t,e),t.prototype=null===e?Object.create(e):(r.prototype=e.prototype,new r)});const u=function(t){function e(e){var r=this,i=e||{};(r=t.call(this,{element:document.createElement("div"),target:i.target})||this).extent=i.extent?i.extent:null;var n=void 0!==i.className?i.className:"ol-zoom-extent",s=void 0!==i.label?i.label:"E",l=void 0!==i.tipLabel?i.tipLabel:"Fit to extent",u=document.createElement("button");u.setAttribute("type","button"),u.title=l,u.appendChild("string"==typeof s?document.createTextNode(s):s),u.addEventListener(o.Z.CLICK,r.handleClick_.bind(r),!1);var c=n+" "+a.XV+" "+a.hg,h=r.element;return h.className=c,h.appendChild(u),r}return l(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((0,s.oJ)(e))},e}(n.Z)},1900:(t,e,r)=>{"use strict";r.d(e,{Bs:()=>g,Cf:()=>y,Ed:()=>s,I8:()=>u,IH:()=>a,TE:()=>f,U1:()=>h,bA:()=>p,bI:()=>d,fS:()=>c,jk:()=>m,oL:()=>l});var i=r(8641),n=r(3983),o=r(9871);function a(t,e){return t[0]+=+e[0],t[1]+=+e[1],t}function s(t,e){var r=e.getRadius(),i=e.getCenter(),n=i[0],o=i[1],a=t[0]-n,s=t[1]-o;0===a&&0===s&&(a=1);var l=Math.sqrt(a*a+s*s);return[n+r*a/l,o+r*s/l]}function l(t,e){var r,i,n=t[0],o=t[1],a=e[0],s=e[1],l=a[0],u=a[1],c=s[0],h=s[1],p=c-l,d=h-u,f=0===p&&0===d?0:(p*(n-l)+d*(o-u))/(p*p+d*d||0);return f<=0?(r=l,i=u):f>=1?(r=c,i=h):(r=l+f*p,i=u+f*d),[r,i]}function u(t,e,r){var i=(0,n.$W)(e+180,360)-180,a=Math.abs(3600*i),s=r||0,l=Math.pow(10,s),u=Math.floor(a/3600),c=Math.floor((a-3600*u)/60),h=a-3600*u-60*c;return(h=Math.ceil(h*l)/l)>=60&&(h=0,c+=1),c>=60&&(c=0,u+=1),u+"° "+(0,o.v)(c,2)+"′ "+(0,o.v)(h,2,s)+"″"+(0==i?"":" "+t.charAt(i<0?1:0))}function c(t,e){for(var r=!0,i=t.length-1;i>=0;--i)if(t[i]!=e[i]){r=!1;break}return r}function h(t,e){var r=Math.cos(e),i=Math.sin(e),n=t[0]*r-t[1]*i,o=t[1]*r+t[0]*i;return t[0]=n,t[1]=o,t}function p(t,e){return t[0]*=e,t[1]*=e,t}function d(t,e){var r=t[0]-e[0],i=t[1]-e[1];return r*r+i*i}function f(t,e){return Math.sqrt(d(t,e))}function g(t,e){return d(t,l(t,e))}function y(t,e){if(e.canWrapX()){var r=(0,i.getWidth)(e.getExtent()),n=m(t,e,r);n&&(t[0]-=n*r)}return t}function m(t,e,r){var n=e.getExtent(),o=0;if(e.canWrapX()&&(t[0]<n[0]||t[0]>n[2])){var a=r||(0,i.getWidth)(n);o=Math.floor((t[0]-n[0])/a)}return o}},245:(t,e,r)=>{"use strict";r.d(e,{$A:()=>n,Qi:()=>a,XV:()=>o,Xy:()=>p,hN:()=>l,hg:()=>s,oj:()=>i,p:()=>h});var i="ol-hidden",n="ol-selectable",o="ol-unselectable",a="ol-unsupported",s="ol-control",l="ol-collapsed",u=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"),c=["style","variant","weight","size","lineHeight","family"],h=function(t){var e=t.match(u);if(!e)return null;for(var r={lineHeight:"normal",size:"1.2em",style:"normal",weight:"normal",variant:"normal"},i=0,n=c.length;i<n;++i){var o=e[i+1];void 0!==o&&(r[c[i]]=o)}return r.families=r.family.split(/,\s?/),r};function p(t){return 1===t?"":String(Math.round(100*t)/100)}},8326:(t,e,r)=>{"use strict";r.d(e,{$H:()=>s,E4:()=>n,Pb:()=>a,ZF:()=>l,ep:()=>u,hF:()=>c,iO:()=>o});var i=r(177);function n(t,e,r,n){var o;return o=r&&r.length?r.shift():i.Id?new OffscreenCanvas(t||300,e||300):document.createElement("canvas"),t&&(o.width=t),e&&(o.height=e),o.getContext("2d",n)}function o(t){var e=t.offsetWidth,r=getComputedStyle(t);return e+(parseInt(r.marginLeft,10)+parseInt(r.marginRight,10))}function a(t){var e=t.offsetHeight,r=getComputedStyle(t);return e+(parseInt(r.marginTop,10)+parseInt(r.marginBottom,10))}function s(t,e){var r=e.parentNode;r&&r.replaceChild(t,e)}function l(t){return t&&t.parentNode?t.parentNode.removeChild(t):null}function u(t){for(;t.lastChild;)t.removeChild(t.lastChild)}function c(t,e){for(var r=t.childNodes,i=0;;++i){var n=r[i],o=e[i];if(!n&&!o)break;n!==o&&(n?o?t.insertBefore(o,n):(t.removeChild(n),--i):t.appendChild(o))}}},1015:(t,e,r)=>{"use strict";function i(t){return Math.pow(t,3)}function n(t){return 1-i(1-t)}function o(t){return 3*t*t-2*t*t*t}function a(t){return t}r.d(e,{GE:()=>a,Vv:()=>n,YQ:()=>i,rd:()=>o})},5818:(t,e,r)=>{"use strict";r.d(e,{Vx:()=>o,bN:()=>a,oL:()=>n});var i=r(9374);function n(t,e,r,i,n){if(i&&i!==t&&(r=r.bind(i)),n){var o=r;r=function(){t.removeEventListener(e,r),o.apply(this,arguments)}}var a={target:t,type:e,listener:r};return t.addEventListener(e,r),a}function o(t,e,r,i){return n(t,e,r,i,!0)}function a(t){t&&t.target&&(t.target.removeEventListener(t.type,t.listener),(0,i.ZH)(t))}},291:(t,e,r)=>{"use strict";function i(t){t.stopPropagation()}r.d(e,{UW:()=>i,ZP:()=>n});const n=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}()},5487:(t,e,r)=>{"use strict";r.d(e,{Z:()=>i});const i={CHANGE:"change",ERROR:"error",BLUR:"blur",CLEAR:"clear",CONTEXTMENU:"contextmenu",CLICK:"click",DBLCLICK:"dblclick",DRAGENTER:"dragenter",DRAGOVER:"dragover",DROP:"drop",FOCUS:"focus",KEYDOWN:"keydown",KEYPRESS:"keypress",LOAD:"load",RESIZE:"resize",TOUCHMOVE:"touchmove",WHEEL:"wheel"}},2750:(t,e,r)=>{"use strict";r.d(e,{Z:()=>i});const i={LEFT:37,UP:38,RIGHT:39,DOWN:40}},208:(t,e,r)=>{"use strict";r.d(e,{Z:()=>u});var i,n=r(5431),o=r(291),a=r(6885),s=r(9374),l=(i=function(t,e){return i=Object.setPrototypeOf||{__proto__:[]}instanceof Array&&function(t,e){t.__proto__=e}||function(t,e){for(var r in e)Object.prototype.hasOwnProperty.call(e,r)&&(t[r]=e[r])},i(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 r(){this.constructor=t}i(t,e),t.prototype=null===e?Object.create(e):(r.prototype=e.prototype,new r)});const u=function(t){function e(e){var r=t.call(this)||this;return r.eventTarget_=e,r.pendingRemovals_=null,r.dispatching_=null,r.listeners_=null,r}return l(e,t),e.prototype.addEventListener=function(t,e){if(t&&e){var r=this.listeners_||(this.listeners_={}),i=r[t]||(r[t]=[]);-1===i.indexOf(e)&&i.push(e)}},e.prototype.dispatchEvent=function(t){var e="string"==typeof t,r=e?t:t.type,i=this.listeners_&&this.listeners_[r];if(i){var n=e?new o.ZP(t):t;n.target||(n.target=this.eventTarget_||this);var s,l=this.dispatching_||(this.dispatching_={}),u=this.pendingRemovals_||(this.pendingRemovals_={});r in l||(l[r]=0,u[r]=0),++l[r];for(var c=0,h=i.length;c<h;++c)if(!1===(s="handleEvent"in i[c]?i[c].handleEvent(n):i[c].call(this,n))||n.propagationStopped){s=!1;break}if(0==--l[r]){var p=u[r];for(delete u[r];p--;)this.removeEventListener(r,a.Zn);delete l[r]}return s}},e.prototype.disposeInternal=function(){this.listeners_&&(0,s.ZH)(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 r=this.listeners_&&this.listeners_[t];if(r){var i=r.indexOf(e);-1!==i&&(this.pendingRemovals_&&t in this.pendingRemovals_?(r[i]=a.Zn,++this.pendingRemovals_[t]):(r.splice(i,1),0===r.length&&delete this.listeners_[t]))}},e}(n.Z)},8683:(t,e,r)=>{"use strict";r.d(e,{$6:()=>s,Bx:()=>h,Fi:()=>d,Kf:()=>f,Ko:()=>l,QL:()=>v,TN:()=>m,Xp:()=>_,aj:()=>u,rM:()=>g,v8:()=>p,vY:()=>y,yZ:()=>c});var i=r(2217),n=r(6885),o=r(177),a=r(9515);function s(t){var e=arguments;return function(t){for(var r=!0,i=0,n=e.length;i<n&&(r=r&&e[i](t));++i);return r}}var l=function(t){var e=t.originalEvent;return e.altKey&&!(e.metaKey||e.ctrlKey)&&!e.shiftKey},u=function(t){var e=t.originalEvent;return e.altKey&&!(e.metaKey||e.ctrlKey)&&e.shiftKey},c=function(t){return!t.map.getTargetElement().hasAttribute("tabindex")||function(t){var e=t.map.getTargetElement(),r=t.map.getOwnerDocument().activeElement;return e.contains(r)}(t)},h=n.uX,p=function(t){var e=t.originalEvent;return 0==e.button&&!(o.G$&&o.tK&&e.ctrlKey)},d=n.Dv,f=function(t){return t.type==i.Z.SINGLECLICK},g=function(t){var e=t.originalEvent;return!e.altKey&&!(e.metaKey||e.ctrlKey)&&!e.shiftKey},y=function(t){var e=t.originalEvent;return!e.altKey&&!(e.metaKey||e.ctrlKey)&&e.shiftKey},m=function(t){var e=t.originalEvent.target.tagName;return"INPUT"!==e&&"SELECT"!==e&&"TEXTAREA"!==e},v=function(t){var e=t.originalEvent;return(0,a.h)(void 0!==e,56),"mouse"==e.pointerType},_=function(t){var e=t.originalEvent;return(0,a.h)(void 0!==e,56),e.isPrimary&&0===e.button}},8641:(t,e,r)=>{"use strict";r.r(e),r.d(e,{applyTransform:()=>K,approximatelyEquals:()=>w,boundingExtent:()=>a,buffer:()=>s,clone:()=>l,closestSquaredDistanceXY:()=>u,containsCoordinate:()=>c,containsExtent:()=>h,containsXY:()=>p,coordinateRelationship:()=>d,createEmpty:()=>f,createOrUpdate:()=>g,createOrUpdateEmpty:()=>y,createOrUpdateFromCoordinate:()=>m,createOrUpdateFromCoordinates:()=>v,createOrUpdateFromFlatCoordinates:()=>_,createOrUpdateFromRings:()=>x,equals:()=>b,extend:()=>E,extendCoordinate:()=>T,extendCoordinates:()=>S,extendFlatCoordinates:()=>C,extendRings:()=>O,extendXY:()=>R,forEachCorner:()=>I,getArea:()=>P,getBottomLeft:()=>L,getBottomRight:()=>A,getCenter:()=>M,getCorner:()=>F,getEnlargedArea:()=>Z,getForViewAndSize:()=>k,getHeight:()=>j,getIntersection:()=>N,getIntersectionArea:()=>D,getMargin:()=>G,getSize:()=>z,getTopLeft:()=>U,getTopRight:()=>B,getWidth:()=>q,intersects:()=>V,intersectsSegment:()=>H,isEmpty:()=>W,returnOrUpdate:()=>X,scaleFromCenter:()=>Y,wrapX:()=>$});var i=r(9600),n=r(8716),o=r(9515);function a(t){for(var e=[1/0,1/0,-1/0,-1/0],r=0,i=t.length;r<i;++r)T(e,t[r]);return e}function s(t,e,r){return r?(r[0]=t[0]-e,r[1]=t[1]-e,r[2]=t[2]+e,r[3]=t[3]+e,r):[t[0]-e,t[1]-e,t[2]+e,t[3]+e]}function l(t,e){return e?(e[0]=t[0],e[1]=t[1],e[2]=t[2],e[3]=t[3],e):t.slice()}function u(t,e,r){var i,n;return(i=e<t[0]?t[0]-e:t[2]<e?e-t[2]:0)*i+(n=r<t[1]?t[1]-r:t[3]<r?r-t[3]:0)*n}function c(t,e){return p(t,e[0],e[1])}function h(t,e){return t[0]<=e[0]&&e[2]<=t[2]&&t[1]<=e[1]&&e[3]<=t[3]}function p(t,e,r){return t[0]<=e&&e<=t[2]&&t[1]<=r&&r<=t[3]}function d(t,e){var r=t[0],i=t[1],o=t[2],a=t[3],s=e[0],l=e[1],u=n.Z.UNKNOWN;return s<r?u|=n.Z.LEFT:s>o&&(u|=n.Z.RIGHT),l<i?u|=n.Z.BELOW:l>a&&(u|=n.Z.ABOVE),u===n.Z.UNKNOWN&&(u=n.Z.INTERSECTING),u}function f(){return[1/0,1/0,-1/0,-1/0]}function g(t,e,r,i,n){return n?(n[0]=t,n[1]=e,n[2]=r,n[3]=i,n):[t,e,r,i]}function y(t){return g(1/0,1/0,-1/0,-1/0,t)}function m(t,e){var r=t[0],i=t[1];return g(r,i,r,i,e)}function v(t,e){return S(y(e),t)}function _(t,e,r,i,n){return C(y(n),t,e,r,i)}function x(t,e){return O(y(e),t)}function b(t,e){return t[0]==e[0]&&t[2]==e[2]&&t[1]==e[1]&&t[3]==e[3]}function w(t,e,r){return Math.abs(t[0]-e[0])<r&&Math.abs(t[2]-e[2])<r&&Math.abs(t[1]-e[1])<r&&Math.abs(t[3]-e[3])<r}function E(t,e){return e[0]<t[0]&&(t[0]=e[0]),e[2]>t[2]&&(t[2]=e[2]),e[1]<t[1]&&(t[1]=e[1]),e[3]>t[3]&&(t[3]=e[3]),t}function T(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 S(t,e){for(var r=0,i=e.length;r<i;++r)T(t,e[r]);return t}function C(t,e,r,i,n){for(;r<i;r+=n)R(t,e[r],e[r+1]);return t}function O(t,e){for(var r=0,i=e.length;r<i;++r)S(t,e[r]);return t}function R(t,e,r){t[0]=Math.min(t[0],e),t[1]=Math.min(t[1],r),t[2]=Math.max(t[2],e),t[3]=Math.max(t[3],r)}function I(t,e){var r;return(r=e(L(t)))||(r=e(A(t)))||(r=e(B(t)))?r:(r=e(U(t)))||!1}function P(t){var e=0;return W(t)||(e=q(t)*j(t)),e}function L(t){return[t[0],t[1]]}function A(t){return[t[2],t[1]]}function M(t){return[(t[0]+t[2])/2,(t[1]+t[3])/2]}function F(t,e){var r;return e===i.Z.BOTTOM_LEFT?r=L(t):e===i.Z.BOTTOM_RIGHT?r=A(t):e===i.Z.TOP_LEFT?r=U(t):e===i.Z.TOP_RIGHT?r=B(t):(0,o.h)(!1,13),r}function Z(t,e){var r=Math.min(t[0],e[0]),i=Math.min(t[1],e[1]);return(Math.max(t[2],e[2])-r)*(Math.max(t[3],e[3])-i)}function k(t,e,r,i,n){var o=e*i[0]/2,a=e*i[1]/2,s=Math.cos(r),l=Math.sin(r),u=o*s,c=o*l,h=a*s,p=a*l,d=t[0],f=t[1],y=d-u+p,m=d-u-p,v=d+u-p,_=d+u+p,x=f-c-h,b=f-c+h,w=f+c+h,E=f+c-h;return g(Math.min(y,m,v,_),Math.min(x,b,w,E),Math.max(y,m,v,_),Math.max(x,b,w,E),n)}function j(t){return t[3]-t[1]}function D(t,e){return P(N(t,e))}function N(t,e,r){var i=r||[1/0,1/0,-1/0,-1/0];return V(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]):y(i),i}function G(t){return q(t)+j(t)}function z(t){return[t[2]-t[0],t[3]-t[1]]}function U(t){return[t[0],t[3]]}function B(t){return[t[2],t[3]]}function q(t){return t[2]-t[0]}function V(t,e){return t[0]<=e[2]&&t[2]>=e[0]&&t[1]<=e[3]&&t[3]>=e[1]}function W(t){return t[2]<t[0]||t[3]<t[1]}function X(t,e){return e?(e[0]=t[0],e[1]=t[1],e[2]=t[2],e[3]=t[3],e):t}function Y(t,e){var r=(t[2]-t[0])/2*(e-1),i=(t[3]-t[1])/2*(e-1);t[0]-=r,t[2]+=r,t[1]-=i,t[3]+=i}function H(t,e,r){var i=!1,o=d(t,e),a=d(t,r);if(o===n.Z.INTERSECTING||a===n.Z.INTERSECTING)i=!0;else{var s=t[0],l=t[1],u=t[2],c=t[3],h=e[0],p=e[1],f=r[0],g=r[1],y=(g-p)/(f-h),m=void 0,v=void 0;a&n.Z.ABOVE&&!(o&n.Z.ABOVE)&&(i=(m=f-(g-c)/y)>=s&&m<=u),i||!(a&n.Z.RIGHT)||o&n.Z.RIGHT||(i=(v=g-(f-u)*y)>=l&&v<=c),i||!(a&n.Z.BELOW)||o&n.Z.BELOW||(i=(m=f-(g-l)/y)>=s&&m<=u),i||!(a&n.Z.LEFT)||o&n.Z.LEFT||(i=(v=g-(f-s)*y)>=l&&v<=c)}return i}function K(t,e,r,i){var n=[];if(i>1)for(var o=t[2]-t[0],a=t[3]-t[1],s=0;s<i;++s)n.push(t[0]+o*s/i,t[1],t[2],t[1]+a*s/i,t[2]-o*s/i,t[3],t[0],t[3]-a*s/i);else n=[t[0],t[1],t[2],t[1],t[2],t[3],t[0],t[3]];e(n,n,2);for(var l=[],u=[],c=(s=0,n.length);s<c;s+=2)l.push(n[s]),u.push(n[s+1]);return function(t,e,r){return g(Math.min.apply(null,t),Math.min.apply(null,e),Math.max.apply(null,t),Math.max.apply(null,e),r)}(l,u,r)}function $(t,e){var r=e.getExtent(),i=M(t);if(e.canWrapX()&&(i[0]<r[0]||i[0]>=r[2])){var n=q(r),o=Math.floor((i[0]-r[0])/n)*n;t[0]-=o,t[2]-=o}return t}},9600:(t,e,r)=>{"use strict";r.d(e,{Z:()=>i});const i={BOTTOM_LEFT:"bottom-left",BOTTOM_RIGHT:"bottom-right",TOP_LEFT:"top-left",TOP_RIGHT:"top-right"}},8716:(t,e,r)=>{"use strict";r.d(e,{Z:()=>i});const i={UNKNOWN:0,INTERSECTING:1,ABOVE:2,RIGHT:4,BELOW:8,LEFT:16}},7537:(t,e,r)=>{"use strict";r.d(e,{Be:()=>a,ov:()=>o});var i=r(6617),n=r(6885);function o(t,e,r,n,o,a,s){var l=new XMLHttpRequest;l.open("GET","function"==typeof t?t(r,n,o):t,!0),e.getType()==i.Z.ARRAY_BUFFER&&(l.responseType="arraybuffer"),l.withCredentials=false,l.onload=function(t){if(!l.status||l.status>=200&&l.status<300){var n=e.getType(),u=void 0;n==i.Z.JSON||n==i.Z.TEXT?u=l.responseText:n==i.Z.XML?(u=l.responseXML)||(u=(new DOMParser).parseFromString(l.responseText,"application/xml")):n==i.Z.ARRAY_BUFFER&&(u=l.response),u?a(e.readFeatures(u,{extent:r,featureProjection:o}),e.readProjection(u)):s()}else s()},l.onerror=s,l.send()}function a(t,e){return function(r,i,a,s,l){var u=this;o(t,e,r,i,a,(function(t,e){u.addFeatures(t),void 0!==s&&s(t)}),l||n.Zn)}}},6617:(t,e,r)=>{"use strict";r.d(e,{Z:()=>i});const i={ARRAY_BUFFER:"arraybuffer",JSON:"json",TEXT:"text",XML:"xml"}},6885:(t,e,r)=>{"use strict";r.d(e,{Dv:()=>o,Vi:()=>l,Zn:()=>a,qe:()=>s,uX:()=>n});var i=r(5537);function n(){return!0}function o(){return!1}function a(){}function s(t){var e,r,n,o=!1;return function(){var a=Array.prototype.slice.call(arguments);return o&&this===n&&(0,i.fS)(a,r)||(o=!0,n=this,r=a,e=t.apply(this,arguments)),e}}function l(t){return function(){var e;try{e=t()}catch(t){return Promise.reject(t)}return e instanceof Promise?e:Promise.resolve(e)}()}},6528:(t,e,r)=>{"use strict";r.r(e),r.d(e,{Circle:()=>i.Z,Geometry:()=>n.Z,GeometryCollection:()=>o.Z,LineString:()=>s.Z,LinearRing:()=>a.Z,MultiLineString:()=>l.Z,MultiPoint:()=>u.Z,MultiPolygon:()=>c.Z,Point:()=>h.default,Polygon:()=>p.ZP,SimpleGeometry:()=>d.ZP});var i=r(7276),n=r(1694),o=r(3958),a=r(7538),s=r(2083),l=r(7403),u=r(6259),c=r(5063),h=r(188),p=r(2033),d=r(2967)},7276:(t,e,r)=>{"use strict";r.d(e,{Z:()=>h});var i,n=r(4754),o=r(2967),a=r(8641),s=r(8527),l=r(6442),u=(i=function(t,e){return i=Object.setPrototypeOf||{__proto__:[]}instanceof Array&&function(t,e){t.__proto__=e}||function(t,e){for(var r in e)Object.prototype.hasOwnProperty.call(e,r)&&(t[r]=e[r])},i(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 r(){this.constructor=t}i(t,e),t.prototype=null===e?Object.create(e):(r.prototype=e.prototype,new r)}),c=function(t){function e(e,r,i){var n=t.call(this)||this;if(void 0!==i&&void 0===r)n.setFlatCoordinates(i,e);else{var o=r||0;n.setCenterAndRadius(e,o,i)}return n}return u(e,t),e.prototype.clone=function(){var t=new e(this.flatCoordinates.slice(),void 0,this.layout);return t.applyProperties(this),t},e.prototype.closestPointXY=function(t,e,r,i){var n=this.flatCoordinates,o=t-n[0],a=e-n[1],s=o*o+a*a;if(s<i){if(0===s)for(var l=0;l<this.stride;++l)r[l]=n[l];else{var u=this.getRadius()/Math.sqrt(s);for(r[0]=n[0]+u*o,r[1]=n[1]+u*a,l=2;l<this.stride;++l)r[l]=n[l]}return r.length=this.stride,s}return i},e.prototype.containsXY=function(t,e){var r=this.flatCoordinates,i=t-r[0],n=e-r[1];return i*i+n*n<=this.getRadiusSquared_()},e.prototype.getCenter=function(){return this.flatCoordinates.slice(0,this.stride)},e.prototype.computeExtent=function(t){var e=this.flatCoordinates,r=e[this.stride]-e[0];return(0,a.createOrUpdate)(e[0]-r,e[1]-r,e[0]+r,e[1]+r,t)},e.prototype.getRadius=function(){return Math.sqrt(this.getRadiusSquared_())},e.prototype.getRadiusSquared_=function(){var t=this.flatCoordinates[this.stride]-this.flatCoordinates[0],e=this.flatCoordinates[this.stride+1]-this.flatCoordinates[1];return t*t+e*e},e.prototype.getType=function(){return n.Z.CIRCLE},e.prototype.intersectsExtent=function(t){var e=this.getExtent();if((0,a.intersects)(t,e)){var r=this.getCenter();return t[0]<=r[0]&&t[2]>=r[0]||t[1]<=r[1]&&t[3]>=r[1]||(0,a.forEachCorner)(t,this.intersectsCoordinate.bind(this))}return!1},e.prototype.setCenter=function(t){var e=this.stride,r=this.flatCoordinates[e]-this.flatCoordinates[0],i=t.slice();i[e]=i[0]+r;for(var n=1;n<e;++n)i[e+n]=t[n];this.setFlatCoordinates(this.layout,i),this.changed()},e.prototype.setCenterAndRadius=function(t,e,r){this.setLayout(r,t,0),this.flatCoordinates||(this.flatCoordinates=[]);var i=this.flatCoordinates,n=(0,s.IG)(i,0,t,this.stride);i[n++]=i[0]+e;for(var o=1,a=this.stride;o<a;++o)i[n++]=i[o];i.length=n,this.changed()},e.prototype.getCoordinates=function(){return null},e.prototype.setCoordinates=function(t,e){},e.prototype.setRadius=function(t){this.flatCoordinates[this.stride]=this.flatCoordinates[0]+t,this.changed()},e.prototype.rotate=function(t,e){var r=this.getCenter(),i=this.getStride();this.setCenter((0,l.U1)(r,0,r.length,i,t,e,r)),this.changed()},e.prototype.translate=function(t,e){var r=this.getCenter(),i=this.getStride();this.setCenter((0,l.Iu)(r,0,r.length,i,t,e,r)),this.changed()},e}(o.ZP);c.prototype.transform;const h=c},1694:(t,e,r)=>{"use strict";r.d(e,{Z:()=>f});var i,n=r(2971),o=r(8375),a=r(4187),s=r(6101),l=r(8641),u=r(6121),c=r(6885),h=r(6442),p=(i=function(t,e){return i=Object.setPrototypeOf||{__proto__:[]}instanceof Array&&function(t,e){t.__proto__=e}||function(t,e){for(var r in e)Object.prototype.hasOwnProperty.call(e,r)&&(t[r]=e[r])},i(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 r(){this.constructor=t}i(t,e),t.prototype=null===e?Object.create(e):(r.prototype=e.prototype,new r)}),d=(0,s.Ue)();const f=function(t){function e(){var e=t.call(this)||this;return e.extent_=(0,l.createEmpty)(),e.extentRevision_=-1,e.simplifiedGeometryMaxMinSquaredTolerance=0,e.simplifiedGeometryRevision=0,e.simplifyTransformedInternal=(0,c.qe)((function(t,e,r){if(!r)return this.getSimplifiedGeometry(e);var i=this.clone();return i.applyTransform(r),i.getSimplifiedGeometry(e)})),e}return p(e,t),e.prototype.simplifyTransformed=function(t,e){return this.simplifyTransformedInternal(this.getRevision(),t,e)},e.prototype.clone=function(){return(0,a.O3)()},e.prototype.closestPointXY=function(t,e,r,i){return(0,a.O3)()},e.prototype.containsXY=function(t,e){var r=this.getClosestPoint([t,e]);return r[0]===t&&r[1]===e},e.prototype.getClosestPoint=function(t,e){var r=e||[NaN,NaN];return this.closestPointXY(t[0],t[1],r,1/0),r},e.prototype.intersectsCoordinate=function(t){return this.containsXY(t[0],t[1])},e.prototype.computeExtent=function(t){return(0,a.O3)()},e.prototype.getExtent=function(t){if(this.extentRevision_!=this.getRevision()){var e=this.computeExtent(this.extent_);(isNaN(e[0])||isNaN(e[1]))&&(0,l.createOrUpdateEmpty)(e),this.extentRevision_=this.getRevision()}return(0,l.returnOrUpdate)(this.extent_,t)},e.prototype.rotate=function(t,e){(0,a.O3)()},e.prototype.scale=function(t,e,r){(0,a.O3)()},e.prototype.simplify=function(t){return this.getSimplifiedGeometry(t*t)},e.prototype.getSimplifiedGeometry=function(t){return(0,a.O3)()},e.prototype.getType=function(){return(0,a.O3)()},e.prototype.applyTransform=function(t){(0,a.O3)()},e.prototype.intersectsExtent=function(t){return(0,a.O3)()},e.prototype.translate=function(t,e){(0,a.O3)()},e.prototype.transform=function(t,e){var r=(0,u.get)(t),i=r.getUnits()==o.ZP.TILE_PIXELS?function(t,i,n){var o=r.getExtent(),a=r.getWorldExtent(),c=(0,l.getHeight)(a)/(0,l.getHeight)(o);return(0,s.qC)(d,a[0],a[3],c,-c,0,0,0),(0,h.vT)(t,0,t.length,n,d,i),(0,u.getTransform)(r,e)(t,i,n)}:(0,u.getTransform)(r,e);return this.applyTransform(i),this},e}(n.Z)},3958:(t,e,r)=>{"use strict";r.d(e,{Z:()=>h});var i,n=r(5487),o=r(1694),a=r(4754),s=r(8641),l=r(5818),u=(i=function(t,e){return i=Object.setPrototypeOf||{__proto__:[]}instanceof Array&&function(t,e){t.__proto__=e}||function(t,e){for(var r in e)Object.prototype.hasOwnProperty.call(e,r)&&(t[r]=e[r])},i(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 r(){this.constructor=t}i(t,e),t.prototype=null===e?Object.create(e):(r.prototype=e.prototype,new r)});function c(t){for(var e=[],r=0,i=t.length;r<i;++r)e.push(t[r].clone());return e}const h=function(t){function e(e){var r=t.call(this)||this;return r.geometries_=e||null,r.changeEventsKeys_=[],r.listenGeometriesChange_(),r}return u(e,t),e.prototype.unlistenGeometriesChange_=function(){this.changeEventsKeys_.forEach(l.bN),this.changeEventsKeys_.length=0},e.prototype.listenGeometriesChange_=function(){if(this.geometries_)for(var t=0,e=this.geometries_.length;t<e;++t)this.changeEventsKeys_.push((0,l.oL)(this.geometries_[t],n.Z.CHANGE,this.changed,this))},e.prototype.clone=function(){var t=new e(null);return t.setGeometries(this.geometries_),t.applyProperties(this),t},e.prototype.closestPointXY=function(t,e,r,i){if(i<(0,s.closestSquaredDistanceXY)(this.getExtent(),t,e))return i;for(var n=this.geometries_,o=0,a=n.length;o<a;++o)i=n[o].closestPointXY(t,e,r,i);return i},e.prototype.containsXY=function(t,e){for(var r=this.geometries_,i=0,n=r.length;i<n;++i)if(r[i].containsXY(t,e))return!0;return!1},e.prototype.computeExtent=function(t){(0,s.createOrUpdateEmpty)(t);for(var e=this.geometries_,r=0,i=e.length;r<i;++r)(0,s.extend)(t,e[r].getExtent());return t},e.prototype.getGeometries=function(){return c(this.geometries_)},e.prototype.getGeometriesArray=function(){return this.geometries_},e.prototype.getGeometriesArrayRecursive=function(){for(var t=[],e=this.geometries_,r=0,i=e.length;r<i;++r)e[r].getType()===this.getType()?t=t.concat(e[r].getGeometriesArrayRecursive()):t.push(e[r]);return t},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;for(var r=[],i=this.geometries_,n=!1,o=0,a=i.length;o<a;++o){var s=i[o],l=s.getSimplifiedGeometry(t);r.push(l),l!==s&&(n=!0)}if(n){var u=new e(null);return u.setGeometriesArray(r),u}return this.simplifiedGeometryMaxMinSquaredTolerance=t,this},e.prototype.getType=function(){return a.Z.GEOMETRY_COLLECTION},e.prototype.intersectsExtent=function(t){for(var e=this.geometries_,r=0,i=e.length;r<i;++r)if(e[r].intersectsExtent(t))return!0;return!1},e.prototype.isEmpty=function(){return 0===this.geometries_.length},e.prototype.rotate=function(t,e){for(var r=this.geometries_,i=0,n=r.length;i<n;++i)r[i].rotate(t,e);this.changed()},e.prototype.scale=function(t,e,r){var i=r;i||(i=(0,s.getCenter)(this.getExtent()));for(var n=this.geometries_,o=0,a=n.length;o<a;++o)n[o].scale(t,e,i);this.changed()},e.prototype.setGeometries=function(t){this.setGeometriesArray(c(t))},e.prototype.setGeometriesArray=function(t){this.unlistenGeometriesChange_(),this.geometries_=t,this.listenGeometriesChange_(),this.changed()},e.prototype.applyTransform=function(t){for(var e=this.geometries_,r=0,i=e.length;r<i;++r)e[r].applyTransform(t);this.changed()},e.prototype.translate=function(t,e){for(var r=this.geometries_,i=0,n=r.length;i<n;++i)r[i].translate(t,e);this.changed()},e.prototype.disposeInternal=function(){this.unlistenGeometriesChange_(),t.prototype.disposeInternal.call(this)},e}(o.Z)},2450:(t,e,r)=>{"use strict";r.d(e,{Z:()=>i});const i={XY:"XY",XYZ:"XYZ",XYM:"XYM",XYZM:"XYZM"}},4754:(t,e,r)=>{"use strict";r.d(e,{Z:()=>i});const i={POINT:"Point",LINE_STRING:"LineString",LINEAR_RING:"LinearRing",POLYGON:"Polygon",MULTI_POINT:"MultiPoint",MULTI_LINE_STRING:"MultiLineString",MULTI_POLYGON:"MultiPolygon",GEOMETRY_COLLECTION:"GeometryCollection",CIRCLE:"Circle"}},2083:(t,e,r)=>{"use strict";r.d(e,{Z:()=>v});var i,n=r(2450),o=r(4754),a=r(2967),s=r(3042),l=r(8641),u=r(8527),c=r(226),h=r(5537),p=r(3032),d=r(9241),f=r(9405),g=r(3746),y=r(7374),m=(i=function(t,e){return i=Object.setPrototypeOf||{__proto__:[]}instanceof Array&&function(t,e){t.__proto__=e}||function(t,e){for(var r in e)Object.prototype.hasOwnProperty.call(e,r)&&(t[r]=e[r])},i(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 r(){this.constructor=t}i(t,e),t.prototype=null===e?Object.create(e):(r.prototype=e.prototype,new r)});const v=function(t){function e(e,r){var i=t.call(this)||this;return i.flatMidpoint_=null,i.flatMidpointRevision_=-1,i.maxDelta_=-1,i.maxDeltaRevision_=-1,void 0===r||Array.isArray(e[0])?i.setCoordinates(e,r):i.setFlatCoordinates(r,e),i}return m(e,t),e.prototype.appendCoordinate=function(t){this.flatCoordinates?(0,h.l7)(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,r,i){return i<(0,l.closestSquaredDistanceXY)(this.getExtent(),t,e)?i:(this.maxDeltaRevision_!=this.getRevision()&&(this.maxDelta_=Math.sqrt((0,s.Bv)(this.flatCoordinates,0,this.flatCoordinates.length,this.stride,0)),this.maxDeltaRevision_=this.getRevision()),(0,s.H$)(this.flatCoordinates,0,this.flatCoordinates.length,this.stride,this.maxDelta_,!1,t,e,r,i))},e.prototype.forEachSegment=function(t){return(0,p.E)(this.flatCoordinates,0,this.flatCoordinates.length,this.stride,t)},e.prototype.getCoordinateAtM=function(t,e){if(this.layout!=n.Z.XYM&&this.layout!=n.Z.XYZM)return null;var r=void 0!==e&&e;return(0,f.iJ)(this.flatCoordinates,0,this.flatCoordinates.length,this.stride,t,r)},e.prototype.getCoordinates=function(){return(0,d.Ml)(this.flatCoordinates,0,this.flatCoordinates.length,this.stride)},e.prototype.getCoordinateAt=function(t,e){return(0,f.WW)(this.flatCoordinates,0,this.flatCoordinates.length,this.stride,t,e,this.stride)},e.prototype.getLength=function(){return(0,y.W)(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 r=[];return r.length=(0,c.dt)(this.flatCoordinates,0,this.flatCoordinates.length,this.stride,t,r,0),new e(r,n.Z.XY)},e.prototype.getType=function(){return o.Z.LINE_STRING},e.prototype.intersectsExtent=function(t){return(0,g.Kz)(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=(0,u.Sg)(this.flatCoordinates,0,t,this.stride),this.changed()},e}(a.ZP)},7538:(t,e,r)=>{"use strict";r.d(e,{Z:()=>f});var i,n=r(2450),o=r(4754),a=r(2967),s=r(3042),l=r(8641),u=r(8527),c=r(226),h=r(9241),p=r(4078),d=(i=function(t,e){return i=Object.setPrototypeOf||{__proto__:[]}instanceof Array&&function(t,e){t.__proto__=e}||function(t,e){for(var r in e)Object.prototype.hasOwnProperty.call(e,r)&&(t[r]=e[r])},i(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 r(){this.constructor=t}i(t,e),t.prototype=null===e?Object.create(e):(r.prototype=e.prototype,new r)});const f=function(t){function e(e,r){var i=t.call(this)||this;return i.maxDelta_=-1,i.maxDeltaRevision_=-1,void 0===r||Array.isArray(e[0])?i.setCoordinates(e,r):i.setFlatCoordinates(r,e),i}return d(e,t),e.prototype.clone=function(){return new e(this.flatCoordinates.slice(),this.layout)},e.prototype.closestPointXY=function(t,e,r,i){return i<(0,l.closestSquaredDistanceXY)(this.getExtent(),t,e)?i:(this.maxDeltaRevision_!=this.getRevision()&&(this.maxDelta_=Math.sqrt((0,s.Bv)(this.flatCoordinates,0,this.flatCoordinates.length,this.stride,0)),this.maxDeltaRevision_=this.getRevision()),(0,s.H$)(this.flatCoordinates,0,this.flatCoordinates.length,this.stride,this.maxDelta_,!0,t,e,r,i))},e.prototype.getArea=function(){return(0,p.QQ)(this.flatCoordinates,0,this.flatCoordinates.length,this.stride)},e.prototype.getCoordinates=function(){return(0,h.Ml)(this.flatCoordinates,0,this.flatCoordinates.length,this.stride)},e.prototype.getSimplifiedGeometryInternal=function(t){var r=[];return r.length=(0,c.dt)(this.flatCoordinates,0,this.flatCoordinates.length,this.stride,t,r,0),new e(r,n.Z.XY)},e.prototype.getType=function(){return o.Z.LINEAR_RING},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=(0,u.Sg)(this.flatCoordinates,0,t,this.stride),this.changed()},e}(a.ZP)},7403:(t,e,r)=>{"use strict";r.d(e,{Z:()=>m});var i,n=r(2450),o=r(4754),a=r(2083),s=r(2967),l=r(3042),u=r(8641),c=r(8527),h=r(226),p=r(5537),d=r(9241),f=r(9405),g=r(3746),y=(i=function(t,e){return i=Object.setPrototypeOf||{__proto__:[]}instanceof Array&&function(t,e){t.__proto__=e}||function(t,e){for(var r in e)Object.prototype.hasOwnProperty.call(e,r)&&(t[r]=e[r])},i(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 r(){this.constructor=t}i(t,e),t.prototype=null===e?Object.create(e):(r.prototype=e.prototype,new r)});const m=function(t){function e(e,r,i){var n=t.call(this)||this;if(n.ends_=[],n.maxDelta_=-1,n.maxDeltaRevision_=-1,Array.isArray(e[0]))n.setCoordinates(e,r);else if(void 0!==r&&i)n.setFlatCoordinates(r,e),n.ends_=i;else{for(var o=n.getLayout(),a=e,s=[],l=[],u=0,c=a.length;u<c;++u){var h=a[u];0===u&&(o=h.getLayout()),(0,p.l7)(s,h.getFlatCoordinates()),l.push(s.length)}n.setFlatCoordinates(o,s),n.ends_=l}return n}return y(e,t),e.prototype.appendLineString=function(t){this.flatCoordinates?(0,p.l7)(this.flatCoordinates,t.getFlatCoordinates().slice()):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,r,i){return i<(0,u.closestSquaredDistanceXY)(this.getExtent(),t,e)?i:(this.maxDeltaRevision_!=this.getRevision()&&(this.maxDelta_=Math.sqrt((0,l.Af)(this.flatCoordinates,0,this.ends_,this.stride,0)),this.maxDeltaRevision_=this.getRevision()),(0,l.Xl)(this.flatCoordinates,0,this.ends_,this.stride,this.maxDelta_,!1,t,e,r,i))},e.prototype.getCoordinateAtM=function(t,e,r){if(this.layout!=n.Z.XYM&&this.layout!=n.Z.XYZM||0===this.flatCoordinates.length)return null;var i=void 0!==e&&e,o=void 0!==r&&r;return(0,f.dG)(this.flatCoordinates,0,this.ends_,this.stride,t,i,o)},e.prototype.getCoordinates=function(){return(0,d.o1)(this.flatCoordinates,0,this.ends_,this.stride)},e.prototype.getEnds=function(){return this.ends_},e.prototype.getLineString=function(t){return t<0||this.ends_.length<=t?null:new a.Z(this.flatCoordinates.slice(0===t?0:this.ends_[t-1],this.ends_[t]),this.layout)},e.prototype.getLineStrings=function(){for(var t=this.flatCoordinates,e=this.ends_,r=this.layout,i=[],n=0,o=0,s=e.length;o<s;++o){var l=e[o],u=new a.Z(t.slice(n,l),r);i.push(u),n=l}return i},e.prototype.getFlatMidpoints=function(){for(var t=[],e=this.flatCoordinates,r=0,i=this.ends_,n=this.stride,o=0,a=i.length;o<a;++o){var s=i[o],l=(0,f.WW)(e,r,s,n,.5);(0,p.l7)(t,l),r=s}return t},e.prototype.getSimplifiedGeometryInternal=function(t){var r=[],i=[];return r.length=(0,h.UJ)(this.flatCoordinates,0,this.ends_,this.stride,t,r,0,i),new e(r,n.Z.XY,i)},e.prototype.getType=function(){return o.Z.MULTI_LINE_STRING},e.prototype.intersectsExtent=function(t){return(0,g.AW)(this.flatCoordinates,0,this.ends_,this.stride,t)},e.prototype.setCoordinates=function(t,e){this.setLayout(e,t,2),this.flatCoordinates||(this.flatCoordinates=[]);var r=(0,c._5)(this.flatCoordinates,0,t,this.stride,this.ends_);this.flatCoordinates.length=0===r.length?0:r[r.length-1],this.changed()},e}(s.ZP)},6259:(t,e,r)=>{"use strict";r.d(e,{Z:()=>d});var i,n=r(4754),o=r(188),a=r(2967),s=r(8641),l=r(8527),u=r(5537),c=r(9241),h=r(3983),p=(i=function(t,e){return i=Object.setPrototypeOf||{__proto__:[]}instanceof Array&&function(t,e){t.__proto__=e}||function(t,e){for(var r in e)Object.prototype.hasOwnProperty.call(e,r)&&(t[r]=e[r])},i(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 r(){this.constructor=t}i(t,e),t.prototype=null===e?Object.create(e):(r.prototype=e.prototype,new r)});const d=function(t){function e(e,r){var i=t.call(this)||this;return r&&!Array.isArray(e[0])?i.setFlatCoordinates(r,e):i.setCoordinates(e,r),i}return p(e,t),e.prototype.appendPoint=function(t){this.flatCoordinates?(0,u.l7)(this.flatCoordinates,t.getFlatCoordinates()):this.flatCoordinates=t.getFlatCoordinates().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,r,i){if(i<(0,s.closestSquaredDistanceXY)(this.getExtent(),t,e))return i;for(var n=this.flatCoordinates,o=this.stride,a=0,l=n.length;a<l;a+=o){var u=(0,h.bI)(t,e,n[a],n[a+1]);if(u<i){i=u;for(var c=0;c<o;++c)r[c]=n[a+c];r.length=o}}return i},e.prototype.getCoordinates=function(){return(0,c.Ml)(this.flatCoordinates,0,this.flatCoordinates.length,this.stride)},e.prototype.getPoint=function(t){var e=this.flatCoordinates?this.flatCoordinates.length/this.stride:0;return t<0||e<=t?null:new o.default(this.flatCoordinates.slice(t*this.stride,(t+1)*this.stride),this.layout)},e.prototype.getPoints=function(){for(var t=this.flatCoordinates,e=this.layout,r=this.stride,i=[],n=0,a=t.length;n<a;n+=r){var s=new o.default(t.slice(n,n+r),e);i.push(s)}return i},e.prototype.getType=function(){return n.Z.MULTI_POINT},e.prototype.intersectsExtent=function(t){for(var e=this.flatCoordinates,r=this.stride,i=0,n=e.length;i<n;i+=r){var o=e[i],a=e[i+1];if((0,s.containsXY)(t,o,a))return!0}return!1},e.prototype.setCoordinates=function(t,e){this.setLayout(e,t,1),this.flatCoordinates||(this.flatCoordinates=[]),this.flatCoordinates.length=(0,l.Sg)(this.flatCoordinates,0,t,this.stride),this.changed()},e}(a.ZP)},5063:(t,e,r)=>{"use strict";r.d(e,{Z:()=>w});var i,n=r(2450),o=r(4754),a=r(6259),s=r(2033),l=r(2967),u=r(3042),c=r(8641),h=r(8527),p=r(5537),d=r(3448),f=r(9241),g=r(3746),y=r(3157),m=r(4078),v=r(1071),_=r(9679),x=r(226),b=(i=function(t,e){return i=Object.setPrototypeOf||{__proto__:[]}instanceof Array&&function(t,e){t.__proto__=e}||function(t,e){for(var r in e)Object.prototype.hasOwnProperty.call(e,r)&&(t[r]=e[r])},i(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 r(){this.constructor=t}i(t,e),t.prototype=null===e?Object.create(e):(r.prototype=e.prototype,new r)});const w=function(t){function e(e,r,i){var n=t.call(this)||this;if(n.endss_=[],n.flatInteriorPointsRevision_=-1,n.flatInteriorPoints_=null,n.maxDelta_=-1,n.maxDeltaRevision_=-1,n.orientedRevision_=-1,n.orientedFlatCoordinates_=null,!i&&!Array.isArray(e[0])){for(var o=n.getLayout(),a=e,s=[],l=[],u=0,c=a.length;u<c;++u){var h=a[u];0===u&&(o=h.getLayout());for(var d=s.length,f=h.getEnds(),g=0,y=f.length;g<y;++g)f[g]+=d;(0,p.l7)(s,h.getFlatCoordinates()),l.push(f)}r=o,e=s,i=l}return void 0!==r&&i?(n.setFlatCoordinates(r,e),n.endss_=i):n.setCoordinates(e,r),n}return b(e,t),e.prototype.appendPolygon=function(t){var e;if(this.flatCoordinates){var r=this.flatCoordinates.length;(0,p.l7)(this.flatCoordinates,t.getFlatCoordinates());for(var i=0,n=(e=t.getEnds().slice()).length;i<n;++i)e[i]+=r}else this.flatCoordinates=t.getFlatCoordinates().slice(),e=t.getEnds().slice(),this.endss_.push();this.endss_.push(e),this.changed()},e.prototype.clone=function(){for(var t=this.endss_.length,r=new Array(t),i=0;i<t;++i)r[i]=this.endss_[i].slice();var n=new e(this.flatCoordinates.slice(),this.layout,r);return n.applyProperties(this),n},e.prototype.closestPointXY=function(t,e,r,i){return i<(0,c.closestSquaredDistanceXY)(this.getExtent(),t,e)?i:(this.maxDeltaRevision_!=this.getRevision()&&(this.maxDelta_=Math.sqrt((0,u.sD)(this.flatCoordinates,0,this.endss_,this.stride,0)),this.maxDeltaRevision_=this.getRevision()),(0,u.gI)(this.getOrientedFlatCoordinates(),0,this.endss_,this.stride,this.maxDelta_,!0,t,e,r,i))},e.prototype.containsXY=function(t,e){return(0,_.Zl)(this.getOrientedFlatCoordinates(),0,this.endss_,this.stride,t,e)},e.prototype.getArea=function(){return(0,m.Eu)(this.getOrientedFlatCoordinates(),0,this.endss_,this.stride)},e.prototype.getCoordinates=function(t){var e;return void 0!==t?(e=this.getOrientedFlatCoordinates().slice(),(0,y.dL)(e,0,this.endss_,this.stride,t)):e=this.flatCoordinates,(0,f.ug)(e,0,this.endss_,this.stride)},e.prototype.getEndss=function(){return this.endss_},e.prototype.getFlatInteriorPoints=function(){if(this.flatInteriorPointsRevision_!=this.getRevision()){var t=(0,v.E)(this.flatCoordinates,0,this.endss_,this.stride);this.flatInteriorPoints_=(0,d.U)(this.getOrientedFlatCoordinates(),0,this.endss_,this.stride,t),this.flatInteriorPointsRevision_=this.getRevision()}return this.flatInteriorPoints_},e.prototype.getInteriorPoints=function(){return new a.Z(this.getFlatInteriorPoints().slice(),n.Z.XYM)},e.prototype.getOrientedFlatCoordinates=function(){if(this.orientedRevision_!=this.getRevision()){var t=this.flatCoordinates;(0,y.Oj)(t,0,this.endss_,this.stride)?this.orientedFlatCoordinates_=t:(this.orientedFlatCoordinates_=t.slice(),this.orientedFlatCoordinates_.length=(0,y.dL)(this.orientedFlatCoordinates_,0,this.endss_,this.stride)),this.orientedRevision_=this.getRevision()}return this.orientedFlatCoordinates_},e.prototype.getSimplifiedGeometryInternal=function(t){var r=[],i=[];return r.length=(0,x.Pp)(this.flatCoordinates,0,this.endss_,this.stride,Math.sqrt(t),r,0,i),new e(r,n.Z.XY,i)},e.prototype.getPolygon=function(t){if(t<0||this.endss_.length<=t)return null;var e;if(0===t)e=0;else{var r=this.endss_[t-1];e=r[r.length-1]}var i=this.endss_[t].slice(),n=i[i.length-1];if(0!==e)for(var o=0,a=i.length;o<a;++o)i[o]-=e;return new s.ZP(this.flatCoordinates.slice(e,n),this.layout,i)},e.prototype.getPolygons=function(){for(var t=this.layout,e=this.flatCoordinates,r=this.endss_,i=[],n=0,o=0,a=r.length;o<a;++o){var l=r[o].slice(),u=l[l.length-1];if(0!==n)for(var c=0,h=l.length;c<h;++c)l[c]-=n;var p=new s.ZP(e.slice(n,u),t,l);i.push(p),n=u}return i},e.prototype.getType=function(){return o.Z.MULTI_POLYGON},e.prototype.intersectsExtent=function(t){return(0,g.oW)(this.getOrientedFlatCoordinates(),0,this.endss_,this.stride,t)},e.prototype.setCoordinates=function(t,e){this.setLayout(e,t,3),this.flatCoordinates||(this.flatCoordinates=[]);var r=(0,h.QT)(this.flatCoordinates,0,t,this.stride,this.endss_);if(0===r.length)this.flatCoordinates.length=0;else{var i=r[r.length-1];this.flatCoordinates.length=0===i.length?0:i[i.length-1]}this.changed()},e}(l.ZP)},188:(t,e,r)=>{"use strict";r.r(e),r.d(e,{default:()=>c});var i,n=r(4754),o=r(2967),a=r(8641),s=r(8527),l=r(3983),u=(i=function(t,e){return i=Object.setPrototypeOf||{__proto__:[]}instanceof Array&&function(t,e){t.__proto__=e}||function(t,e){for(var r in e)Object.prototype.hasOwnProperty.call(e,r)&&(t[r]=e[r])},i(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 r(){this.constructor=t}i(t,e),t.prototype=null===e?Object.create(e):(r.prototype=e.prototype,new r)});const c=function(t){function e(e,r){var i=t.call(this)||this;return i.setCoordinates(e,r),i}return u(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,r,i){var n=this.flatCoordinates,o=(0,l.bI)(t,e,n[0],n[1]);if(o<i){for(var a=this.stride,s=0;s<a;++s)r[s]=n[s];return r.length=a,o}return i},e.prototype.getCoordinates=function(){return this.flatCoordinates?this.flatCoordinates.slice():[]},e.prototype.computeExtent=function(t){return(0,a.createOrUpdateFromCoordinate)(this.flatCoordinates,t)},e.prototype.getType=function(){return n.Z.POINT},e.prototype.intersectsExtent=function(t){return(0,a.containsXY)(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=(0,s.IG)(this.flatCoordinates,0,t,this.stride),this.changed()},e}(o.ZP)},2033:(t,e,r)=>{"use strict";r.d(e,{Bb:()=>O,ZP:()=>T,iu:()=>S,oJ:()=>C});var i,n=r(2450),o=r(4754),a=r(7538),s=r(188),l=r(2967),u=r(3042),c=r(8641),h=r(8527),p=r(5537),d=r(3448),f=r(9241),g=r(3746),y=r(3157),m=r(4078),v=r(9679),_=r(3983),x=r(226),b=r(7580),w=(i=function(t,e){return i=Object.setPrototypeOf||{__proto__:[]}instanceof Array&&function(t,e){t.__proto__=e}||function(t,e){for(var r in e)Object.prototype.hasOwnProperty.call(e,r)&&(t[r]=e[r])},i(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 r(){this.constructor=t}i(t,e),t.prototype=null===e?Object.create(e):(r.prototype=e.prototype,new r)}),E=function(t){function e(e,r,i){var n=t.call(this)||this;return n.ends_=[],n.flatInteriorPointRevision_=-1,n.flatInteriorPoint_=null,n.maxDelta_=-1,n.maxDeltaRevision_=-1,n.orientedRevision_=-1,n.orientedFlatCoordinates_=null,void 0!==r&&i?(n.setFlatCoordinates(r,e),n.ends_=i):n.setCoordinates(e,r),n}return w(e,t),e.prototype.appendLinearRing=function(t){this.flatCoordinates?(0,p.l7)(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,r,i){return i<(0,c.closestSquaredDistanceXY)(this.getExtent(),t,e)?i:(this.maxDeltaRevision_!=this.getRevision()&&(this.maxDelta_=Math.sqrt((0,u.Af)(this.flatCoordinates,0,this.ends_,this.stride,0)),this.maxDeltaRevision_=this.getRevision()),(0,u.Xl)(this.flatCoordinates,0,this.ends_,this.stride,this.maxDelta_,!0,t,e,r,i))},e.prototype.containsXY=function(t,e){return(0,v.wY)(this.getOrientedFlatCoordinates(),0,this.ends_,this.stride,t,e)},e.prototype.getArea=function(){return(0,m.KP)(this.getOrientedFlatCoordinates(),0,this.ends_,this.stride)},e.prototype.getCoordinates=function(t){var e;return void 0!==t?(e=this.getOrientedFlatCoordinates().slice(),(0,y.zX)(e,0,this.ends_,this.stride,t)):e=this.flatCoordinates,(0,f.o1)(e,0,this.ends_,this.stride)},e.prototype.getEnds=function(){return this.ends_},e.prototype.getFlatInteriorPoint=function(){if(this.flatInteriorPointRevision_!=this.getRevision()){var t=(0,c.getCenter)(this.getExtent());this.flatInteriorPoint_=(0,d.X)(this.getOrientedFlatCoordinates(),0,this.ends_,this.stride,t,0),this.flatInteriorPointRevision_=this.getRevision()}return this.flatInteriorPoint_},e.prototype.getInteriorPoint=function(){return new s.default(this.getFlatInteriorPoint(),n.Z.XYM)},e.prototype.getLinearRingCount=function(){return this.ends_.length},e.prototype.getLinearRing=function(t){return t<0||this.ends_.length<=t?null:new a.Z(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,r=this.ends_,i=[],n=0,o=0,s=r.length;o<s;++o){var l=r[o],u=new a.Z(e.slice(n,l),t);i.push(u),n=l}return i},e.prototype.getOrientedFlatCoordinates=function(){if(this.orientedRevision_!=this.getRevision()){var t=this.flatCoordinates;(0,y.$v)(t,0,this.ends_,this.stride)?this.orientedFlatCoordinates_=t:(this.orientedFlatCoordinates_=t.slice(),this.orientedFlatCoordinates_.length=(0,y.zX)(this.orientedFlatCoordinates_,0,this.ends_,this.stride)),this.orientedRevision_=this.getRevision()}return this.orientedFlatCoordinates_},e.prototype.getSimplifiedGeometryInternal=function(t){var r=[],i=[];return r.length=(0,x.Zh)(this.flatCoordinates,0,this.ends_,this.stride,Math.sqrt(t),r,0,i),new e(r,n.Z.XY,i)},e.prototype.getType=function(){return o.Z.POLYGON},e.prototype.intersectsExtent=function(t){return(0,g.ac)(this.getOrientedFlatCoordinates(),0,this.ends_,this.stride,t)},e.prototype.setCoordinates=function(t,e){this.setLayout(e,t,2),this.flatCoordinates||(this.flatCoordinates=[]);var r=(0,h._5)(this.flatCoordinates,0,t,this.stride,this.ends_);this.flatCoordinates.length=0===r.length?0:r[r.length-1],this.changed()},e}(l.ZP);const T=E;function S(t,e,r,i){for(var o=r||32,a=[],s=0;s<o;++s)(0,p.l7)(a,(0,b.cv)(t,e,2*Math.PI*s/o,i));return a.push(a[0],a[1]),new E(a,n.Z.XY,[a.length])}function C(t){var e=t[0],r=t[1],i=t[2],o=t[3],a=[e,r,e,o,i,o,i,r,e,r];return new E(a,n.Z.XY,[a.length])}function O(t,e,r){for(var i=e||32,n=t.getStride(),o=t.getLayout(),a=t.getCenter(),s=n*(i+1),l=new Array(s),u=0;u<s;u+=n){l[u]=0,l[u+1]=0;for(var c=2;c<n;c++)l[u+c]=a[c]}var h=[l.length],p=new E(l,o,h);return function(t,e,r,i){for(var n=t.getFlatCoordinates(),o=t.getStride(),a=n.length/o-1,s=i||0,l=0;l<=a;++l){var u=l*o,c=s+2*(0,_.$W)(l,a)*Math.PI/a;n[u]=e[0]+r*Math.cos(c),n[u+1]=e[1]+r*Math.sin(c)}t.changed()}(p,a,t.getRadius(),r),p}},2967:(t,e,r)=>{"use strict";r.d(e,{Kr:()=>h,ZP:()=>p});var i,n=r(1694),o=r(2450),a=r(4187),s=r(8641),l=r(6442),u=(i=function(t,e){return i=Object.setPrototypeOf||{__proto__:[]}instanceof Array&&function(t,e){t.__proto__=e}||function(t,e){for(var r in e)Object.prototype.hasOwnProperty.call(e,r)&&(t[r]=e[r])},i(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 r(){this.constructor=t}i(t,e),t.prototype=null===e?Object.create(e):(r.prototype=e.prototype,new r)});function c(t){var e;return t==o.Z.XY?e=2:t==o.Z.XYZ||t==o.Z.XYM?e=3:t==o.Z.XYZM&&(e=4),e}function h(t,e,r){var i=t.getFlatCoordinates();if(i){var n=t.getStride();return(0,l.vT)(i,0,i.length,n,e,r)}return null}const p=function(t){function e(){var e=t.call(this)||this;return e.layout=o.Z.XY,e.stride=2,e.flatCoordinates=null,e}return u(e,t),e.prototype.computeExtent=function(t){return(0,s.createOrUpdateFromFlatCoordinates)(this.flatCoordinates,0,this.flatCoordinates.length,this.stride,t)},e.prototype.getCoordinates=function(){return(0,a.O3)()},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=c(t),this.layout=t,this.flatCoordinates=e},e.prototype.setCoordinates=function(t,e){(0,a.O3)()},e.prototype.setLayout=function(t,e,r){var i;if(t)i=c(t);else{for(var n=0;n<r;++n){if(0===e.length)return this.layout=o.Z.XY,void(this.stride=2);e=e[0]}t=function(t){var e;return 2==t?e=o.Z.XY:3==t?e=o.Z.XYZ:4==t&&(e=o.Z.XYZM),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 r=this.getFlatCoordinates();if(r){var i=this.getStride();(0,l.U1)(r,0,r.length,i,t,e,r),this.changed()}},e.prototype.scale=function(t,e,r){var i=e;void 0===i&&(i=t);var n=r;n||(n=(0,s.getCenter)(this.getExtent()));var o=this.getFlatCoordinates();if(o){var a=this.getStride();(0,l.bA)(o,0,o.length,a,t,i,n,o),this.changed()}},e.prototype.translate=function(t,e){var r=this.getFlatCoordinates();if(r){var i=this.getStride();(0,l.Iu)(r,0,r.length,i,t,e,r),this.changed()}},e}(n.Z)},4078:(t,e,r)=>{"use strict";function i(t,e,r,i){for(var n=0,o=t[r-i],a=t[r-i+1];e<r;e+=i){var s=t[e],l=t[e+1];n+=a*s-o*l,o=s,a=l}return n/2}function n(t,e,r,n){for(var o=0,a=0,s=r.length;a<s;++a){var l=r[a];o+=i(t,e,l,n),e=l}return o}function o(t,e,r,i){for(var o=0,a=0,s=r.length;a<s;++a){var l=r[a];o+=n(t,e,l,i),e=l[l.length-1]}return o}r.d(e,{Eu:()=>o,KP:()=>n,QQ:()=>i})},1071:(t,e,r)=>{"use strict";r.d(e,{E:()=>n});var i=r(8641);function n(t,e,r,n){for(var o=[],a=(0,i.createEmpty)(),s=0,l=r.length;s<l;++s){var u=r[s];a=(0,i.createOrUpdateFromFlatCoordinates)(t,e,u[0],n),o.push((a[0]+a[2])/2,(a[1]+a[3])/2),e=u[u.length-1]}return o}},3042:(t,e,r)=>{"use strict";r.d(e,{Af:()=>a,Bv:()=>o,H$:()=>l,Xl:()=>u,gI:()=>c,sD:()=>s});var i=r(3983);function n(t,e,r,n,o,a,s){var l,u=t[e],c=t[e+1],h=t[r]-u,p=t[r+1]-c;if(0===h&&0===p)l=e;else{var d=((o-u)*h+(a-c)*p)/(h*h+p*p);if(d>1)l=r;else{if(d>0){for(var f=0;f<n;++f)s[f]=(0,i.t7)(t[e+f],t[r+f],d);return void(s.length=n)}l=e}}for(f=0;f<n;++f)s[f]=t[l+f];s.length=n}function o(t,e,r,n,o){var a=t[e],s=t[e+1];for(e+=n;e<r;e+=n){var l=t[e],u=t[e+1],c=(0,i.bI)(a,s,l,u);c>o&&(o=c),a=l,s=u}return o}function a(t,e,r,i,n){for(var a=0,s=r.length;a<s;++a){var l=r[a];n=o(t,e,l,i,n),e=l}return n}function s(t,e,r,i,n){for(var o=0,s=r.length;o<s;++o){var l=r[o];n=a(t,e,l,i,n),e=l[l.length-1]}return n}function l(t,e,r,o,a,s,l,u,c,h,p){if(e==r)return h;var d,f;if(0===a){if((f=(0,i.bI)(l,u,t[e],t[e+1]))<h){for(d=0;d<o;++d)c[d]=t[e+d];return c.length=o,f}return h}for(var g=p||[NaN,NaN],y=e+o;y<r;)if(n(t,y-o,y,o,l,u,g),(f=(0,i.bI)(l,u,g[0],g[1]))<h){for(h=f,d=0;d<o;++d)c[d]=g[d];c.length=o,y+=o}else y+=o*Math.max((Math.sqrt(f)-Math.sqrt(h))/a|0,1);if(s&&(n(t,r-o,e,o,l,u,g),(f=(0,i.bI)(l,u,g[0],g[1]))<h)){for(h=f,d=0;d<o;++d)c[d]=g[d];c.length=o}return h}function u(t,e,r,i,n,o,a,s,u,c,h){for(var p=h||[NaN,NaN],d=0,f=r.length;d<f;++d){var g=r[d];c=l(t,e,g,i,n,o,a,s,u,c,p),e=g}return c}function c(t,e,r,i,n,o,a,s,l,c,h){for(var p=h||[NaN,NaN],d=0,f=r.length;d<f;++d){var g=r[d];c=u(t,e,g,i,n,o,a,s,l,c,p),e=g[g.length-1]}return c}},9679:(t,e,r)=>{"use strict";r.d(e,{TG:()=>o,Zl:()=>s,uG:()=>n,wY:()=>a});var i=r(8641);function n(t,e,r,n,a){return!(0,i.forEachCorner)(a,(function(i){return!o(t,e,r,n,i[0],i[1])}))}function o(t,e,r,i,n,o){for(var a=0,s=t[r-i],l=t[r-i+1];e<r;e+=i){var u=t[e],c=t[e+1];l<=o?c>o&&(u-s)*(o-l)-(n-s)*(c-l)>0&&a++:c<=o&&(u-s)*(o-l)-(n-s)*(c-l)<0&&a--,s=u,l=c}return 0!==a}function a(t,e,r,i,n,a){if(0===r.length)return!1;if(!o(t,e,r[0],i,n,a))return!1;for(var s=1,l=r.length;s<l;++s)if(o(t,r[s-1],r[s],i,n,a))return!1;return!0}function s(t,e,r,i,n,o){if(0===r.length)return!1;for(var s=0,l=r.length;s<l;++s){var u=r[s];if(a(t,e,u,i,n,o))return!0;e=u[u.length-1]}return!1}},8527:(t,e,r)=>{"use strict";function i(t,e,r,i){for(var n=0,o=r.length;n<o;++n)t[e++]=r[n];return e}function n(t,e,r,i){for(var n=0,o=r.length;n<o;++n)for(var a=r[n],s=0;s<i;++s)t[e++]=a[s];return e}function o(t,e,r,i,o){for(var a=o||[],s=0,l=0,u=r.length;l<u;++l){var c=n(t,e,r[l],i);a[s++]=c,e=c}return a.length=s,a}function a(t,e,r,i,n){for(var a=n||[],s=0,l=0,u=r.length;l<u;++l){var c=o(t,e,r[l],i,a[s]);a[s++]=c,e=c[c.length-1]}return a.length=s,a}r.d(e,{IG:()=>i,QT:()=>a,Sg:()=>n,_5:()=>o})},9241:(t,e,r)=>{"use strict";function i(t,e,r,i,n){for(var o=void 0!==n?n:[],a=0,s=e;s<r;s+=i)o[a++]=t.slice(s,s+i);return o.length=a,o}function n(t,e,r,n,o){for(var a=void 0!==o?o:[],s=0,l=0,u=r.length;l<u;++l){var c=r[l];a[s++]=i(t,e,c,n,a[s]),e=c}return a.length=s,a}function o(t,e,r,i,o){for(var a=void 0!==o?o:[],s=0,l=0,u=r.length;l<u;++l){var c=r[l];a[s++]=n(t,e,c,i,a[s]),e=c[c.length-1]}return a.length=s,a}r.d(e,{Ml:()=>i,o1:()=>n,ug:()=>o})},3448:(t,e,r)=>{"use strict";r.d(e,{U:()=>a,X:()=>o});var i=r(9679),n=r(5537);function o(t,e,r,o,a,s,l){for(var u,c,h,p,d,f,g,y=a[s+1],m=[],v=0,_=r.length;v<_;++v){var x=r[v];for(p=t[x-o],f=t[x-o+1],u=e;u<x;u+=o)d=t[u],g=t[u+1],(y<=f&&g<=y||f<=y&&y<=g)&&(h=(y-f)/(g-f)*(d-p)+p,m.push(h)),p=d,f=g}var b=NaN,w=-1/0;for(m.sort(n.kK),p=m[0],u=1,c=m.length;u<c;++u){d=m[u];var E=Math.abs(d-p);E>w&&(h=(p+d)/2,(0,i.wY)(t,e,r,o,h,y)&&(b=h,w=E)),p=d}return isNaN(b)&&(b=a[s]),l?(l.push(b,y,w),l):[b,y,w]}function a(t,e,r,i,n){for(var a=[],s=0,l=r.length;s<l;++s){var u=r[s];a=o(t,e,u,i,n,2*s,a),e=u[u.length-1]}return a}},9405:(t,e,r)=>{"use strict";r.d(e,{WW:()=>o,dG:()=>s,iJ:()=>a});var i=r(5537),n=r(3983);function o(t,e,r,o,a,s,l){var u,c,h=(r-e)/o;if(1===h)u=e;else if(2===h)u=e,c=a;else if(0!==h){for(var p=t[e],d=t[e+1],f=0,g=[0],y=e+o;y<r;y+=o){var m=t[y],v=t[y+1];f+=Math.sqrt((m-p)*(m-p)+(v-d)*(v-d)),g.push(f),p=m,d=v}var _=a*f,x=(0,i.ry)(g,_);x<0?(c=(_-g[-x-2])/(g[-x-1]-g[-x-2]),u=e+(-x-2)*o):u=e+x*o}var b=l>1?l:2,w=s||new Array(b);for(y=0;y<b;++y)w[y]=void 0===u?NaN:void 0===c?t[u+y]:(0,n.t7)(t[u+y],t[u+o+y],c);return w}function a(t,e,r,i,o,a){if(r==e)return null;var s;if(o<t[e+i-1])return a?((s=t.slice(e,e+i))[i-1]=o,s):null;if(t[r-1]<o)return a?((s=t.slice(r-i,r))[i-1]=o,s):null;if(o==t[e+i-1])return t.slice(e,e+i);for(var l=e/i,u=r/i;l<u;){var c=l+u>>1;o<t[(c+1)*i-1]?u=c:l=c+1}var h=t[l*i-1];if(o==h)return t.slice((l-1)*i,(l-1)*i+i);var p=(o-h)/(t[(l+1)*i-1]-h);s=[];for(var d=0;d<i-1;++d)s.push((0,n.t7)(t[(l-1)*i+d],t[l*i+d],p));return s.push(o),s}function s(t,e,r,i,n,o,s){if(s)return a(t,e,r[r.length-1],i,n,o);var l;if(n<t[i-1])return o?((l=t.slice(0,i))[i-1]=n,l):null;if(t[t.length-1]<n)return o?((l=t.slice(t.length-i))[i-1]=n,l):null;for(var u=0,c=r.length;u<c;++u){var h=r[u];if(e!=h){if(n<t[e+i-1])return null;if(n<=t[h-1])return a(t,e,h,i,n,!1);e=h}}return null}},3746:(t,e,r)=>{"use strict";r.d(e,{AW:()=>s,Kz:()=>a,ac:()=>l,oW:()=>u});var i=r(8641),n=r(3032),o=r(9679);function a(t,e,r,o,a){var s=(0,i.extendFlatCoordinates)((0,i.createEmpty)(),t,e,r,o);return!!(0,i.intersects)(a,s)&&(!!(0,i.containsExtent)(a,s)||s[0]>=a[0]&&s[2]<=a[2]||s[1]>=a[1]&&s[3]<=a[3]||(0,n.E)(t,e,r,o,(function(t,e){return(0,i.intersectsSegment)(a,t,e)})))}function s(t,e,r,i,n){for(var o=0,s=r.length;o<s;++o){if(a(t,e,r[o],i,n))return!0;e=r[o]}return!1}function l(t,e,r,i,n){if(!function(t,e,r,i,n){return!!(a(t,e,r,i,n)||(0,o.TG)(t,e,r,i,n[0],n[1])||(0,o.TG)(t,e,r,i,n[0],n[3])||(0,o.TG)(t,e,r,i,n[2],n[1])||(0,o.TG)(t,e,r,i,n[2],n[3]))}(t,e,r[0],i,n))return!1;if(1===r.length)return!0;for(var s=1,l=r.length;s<l;++s)if((0,o.uG)(t,r[s-1],r[s],i,n)&&!a(t,r[s-1],r[s],i,n))return!1;return!0}function u(t,e,r,i,n){for(var o=0,a=r.length;o<a;++o){var s=r[o];if(l(t,e,s,i,n))return!0;e=s[s.length-1]}return!1}},7374:(t,e,r)=>{"use strict";function i(t,e,r,i){for(var n=t[e],o=t[e+1],a=0,s=e+i;s<r;s+=i){var l=t[s],u=t[s+1];a+=Math.sqrt((l-n)*(l-n)+(u-o)*(u-o)),n=l,o=u}return a}r.d(e,{W:()=>i})},3157:(t,e,r)=>{"use strict";r.d(e,{$v:()=>o,Oj:()=>a,Q3:()=>u,dL:()=>l,zX:()=>s});var i=r(1404);function n(t,e,r,i){for(var n=0,o=t[r-i],a=t[r-i+1];e<r;e+=i){var s=t[e],l=t[e+1];n+=(s-o)*(l+a),o=s,a=l}return 0===n?void 0:n>0}function o(t,e,r,i,o){for(var a=void 0!==o&&o,s=0,l=r.length;s<l;++s){var u=r[s],c=n(t,e,u,i);if(0===s){if(a&&c||!a&&!c)return!1}else if(a&&!c||!a&&c)return!1;e=u}return!0}function a(t,e,r,i,n){for(var a=0,s=r.length;a<s;++a){var l=r[a];if(!o(t,e,l,i,n))return!1;l.length&&(e=l[l.length-1])}return!0}function s(t,e,r,o,a){for(var s=void 0!==a&&a,l=0,u=r.length;l<u;++l){var c=r[l],h=n(t,e,c,o);(0===l?s&&h||!s&&!h:s&&!h||!s&&h)&&(0,i.k)(t,e,c,o),e=c}return e}function l(t,e,r,i,n){for(var o=0,a=r.length;o<a;++o)e=s(t,e,r[o],i,n);return e}function u(t,e){for(var r=[],i=0,o=0,a=0,s=e.length;a<s;++a){var l=e[a];if(n(t,i,l,2)){if(0===r.length)continue;r[r.length-1].push(e[o])}else r.push(e.slice(o,a+1));o=a+1,i=l}return r}},1404:(t,e,r)=>{"use strict";function i(t,e,r,i){for(;e<r-i;){for(var n=0;n<i;++n){var o=t[e+n];t[e+n]=t[r-i+n],t[r-i+n]=o}e+=i,r-=i}}r.d(e,{k:()=>i})},3032:(t,e,r)=>{"use strict";function i(t,e,r,i,n){var o;for(e+=i;e<r;e+=i)if(o=n(t.slice(e-i,e),t.slice(e,e+i)))return o;return!1}r.d(e,{E:()=>i})},226:(t,e,r)=>{"use strict";r.d(e,{Pp:()=>u,UJ:()=>o,Zh:()=>l,dt:()=>n,uZ:()=>a});var i=r(3983);function n(t,e,r,n,o,a,s){var l=(r-e)/n;if(l<3){for(;e<r;e+=n)a[s++]=t[e],a[s++]=t[e+1];return s}var u=new Array(l);u[0]=1,u[l-1]=1;for(var c=[e,r-n],h=0;c.length>0;){for(var p=c.pop(),d=c.pop(),f=0,g=t[d],y=t[d+1],m=t[p],v=t[p+1],_=d+n;_<p;_+=n){var x=t[_],b=t[_+1],w=(0,i.rU)(x,b,g,y,m,v);w>f&&(h=_,f=w)}f>o&&(u[(h-e)/n]=1,d+n<h&&c.push(d,h),h+n<p&&c.push(h,p))}for(_=0;_<l;++_)u[_]&&(a[s++]=t[e+_*n],a[s++]=t[e+_*n+1]);return s}function o(t,e,r,i,o,a,s,l){for(var u=0,c=r.length;u<c;++u){var h=r[u];s=n(t,e,h,i,o,a,s),l.push(s),e=h}return s}function a(t,e){return e*Math.round(t/e)}function s(t,e,r,i,n,o,s){if(e==r)return s;var l,u,c=a(t[e],n),h=a(t[e+1],n);e+=i,o[s++]=c,o[s++]=h;do{if(l=a(t[e],n),u=a(t[e+1],n),(e+=i)==r)return o[s++]=l,o[s++]=u,s}while(l==c&&u==h);for(;e<r;){var p=a(t[e],n),d=a(t[e+1],n);if(e+=i,p!=l||d!=u){var f=l-c,g=u-h,y=p-c,m=d-h;f*m==g*y&&(f<0&&y<f||f==y||f>0&&y>f)&&(g<0&&m<g||g==m||g>0&&m>g)?(l=p,u=d):(o[s++]=l,o[s++]=u,c=l,h=u,l=p,u=d)}}return o[s++]=l,o[s++]=u,s}function l(t,e,r,i,n,o,a,l){for(var u=0,c=r.length;u<c;++u){var h=r[u];a=s(t,e,h,i,n,o,a),l.push(a),e=h}return a}function u(t,e,r,i,n,o,a,s){for(var u=0,c=r.length;u<c;++u){var h=r[u],p=[];a=l(t,e,h,i,n,o,a,p),s.push(p),e=h[h.length-1]}return a}},2365:(t,e,r)=>{"use strict";function i(t,e,r,i,n){var o,a,s,l,u,c,h,p,d,f=r,g=r,y=0,m=0,v=r;for(o=r;o<i;o+=n){var _=e[o],x=e[o+1];void 0!==l&&(p=_-l,d=x-u,s=Math.sqrt(p*p+d*d),void 0!==c&&(m+=a,Math.acos((c*p+h*d)/(a*s))>t&&(m>y&&(y=m,f=v,g=o),m=0,v=o-n)),a=s,c=p,h=d),l=_,u=x}return(m+=s)>y?[v,o]:[f,g]}r.d(e,{_:()=>i})},7396:(t,e,r)=>{"use strict";r.d(e,{q:()=>o});var i=r(3983),n=r(6442);function o(t,e,r,o,a,s,l,u,c,h,p,d){var f=t[e],g=t[e+1],y=0,m=0,v=0,_=0;function x(){y=f,m=g,f=t[e+=o],g=t[e+1],_+=v,v=Math.sqrt((f-y)*(f-y)+(g-m)*(g-m))}do{x()}while(e<r-o&&_+v<s);for(var b=0===v?0:(s-_)/v,w=(0,i.t7)(y,f,b),E=(0,i.t7)(m,g,b),T=e-o,S=_,C=s+u*c(h,a,p);e<r-o&&_+v<C;)x();b=0===v?0:(C-_)/v;var O,R=(0,i.t7)(y,f,b),I=(0,i.t7)(m,g,b);if(d){var P=[w,E,R,I];(0,n.U1)(P,0,4,2,d,P,P),O=P[0]>P[2]}else O=w>R;var L,A=Math.PI,M=[],F=T+o===e;if(v=0,_=S,f=t[e=T],g=t[e+1],F){x(),L=Math.atan2(g-m,f-y),O&&(L+=L>0?-A:A);var Z=(R+w)/2,k=(I+E)/2;return M[0]=[Z,k,(C-s)/2,L,a],M}for(var j=0,D=a.length;j<D;){x();var N=Math.atan2(g-m,f-y);if(O&&(N+=N>0?-A:A),void 0!==L){var G=N-L;if(G+=G>A?-2*A:G<-A?2*A:0,Math.abs(G)>l)return null}L=N;for(var z=j,U=0;j<D;++j){var B=u*c(h,a[O?D-j-1:j],p);if(e+o<r&&_+v<s+U+B/2)break;U+=B}if(j!==z){var q=O?a.substring(D-z,D-j):a.substring(z,j);b=0===v?0:(s+U/2-_)/v,Z=(0,i.t7)(y,f,b),k=(0,i.t7)(m,g,b),M.push([Z,k,U/2,N,q]),s+=U}}return M}},6442:(t,e,r)=>{"use strict";function i(t,e,r,i,n,o){for(var a=o||[],s=0,l=e;l<r;l+=i){var u=t[l],c=t[l+1];a[s++]=n[0]*u+n[2]*c+n[4],a[s++]=n[1]*u+n[3]*c+n[5]}return o&&a.length!=s&&(a.length=s),a}function n(t,e,r,i,n,o,a){for(var s=a||[],l=Math.cos(n),u=Math.sin(n),c=o[0],h=o[1],p=0,d=e;d<r;d+=i){var f=t[d]-c,g=t[d+1]-h;s[p++]=c+f*l-g*u,s[p++]=h+f*u+g*l;for(var y=d+2;y<d+i;++y)s[p++]=t[y]}return a&&s.length!=p&&(s.length=p),s}function o(t,e,r,i,n,o,a,s){for(var l=s||[],u=a[0],c=a[1],h=0,p=e;p<r;p+=i){var d=t[p]-u,f=t[p+1]-c;l[h++]=u+n*d,l[h++]=c+o*f;for(var g=p+2;g<p+i;++g)l[h++]=t[g]}return s&&l.length!=h&&(l.length=h),l}function a(t,e,r,i,n,o,a){for(var s=a||[],l=0,u=e;u<r;u+=i){s[l++]=t[u]+n,s[l++]=t[u+1]+o;for(var c=u+2;c<u+i;++c)s[l++]=t[c]}return a&&s.length!=l&&(s.length=l),s}r.d(e,{Iu:()=>a,U1:()=>n,bA:()=>o,vT:()=>i})},177:(t,e,r)=>{"use strict";r.d(e,{G$:()=>a,Id:()=>u,ME:()=>o,MP:()=>l,Tp:()=>c,V:()=>n,bM:()=>h,tK:()=>s});var i="undefined"!=typeof navigator&&void 0!==navigator.userAgent?navigator.userAgent.toLowerCase():"",n=-1!==i.indexOf("firefox"),o=-1!==i.indexOf("safari")&&-1==i.indexOf("chrom")&&!!(i.indexOf("version/15.4")>=0||i.match(/cpu (os|iphone os) 15_4 like mac os x/)),a=-1!==i.indexOf("webkit")&&-1==i.indexOf("edge"),s=-1!==i.indexOf("macintosh"),l="undefined"!=typeof devicePixelRatio?devicePixelRatio:1,u="undefined"!=typeof WorkerGlobalScope&&"undefined"!=typeof OffscreenCanvas&&self instanceof WorkerGlobalScope,c="undefined"!=typeof Image&&Image.prototype.decode,h=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}()},7458:(t,e,r)=>{"use strict";r.r(e),r.d(e,{AssertionError:()=>n.Z,Collection:()=>o.Z,Disposable:()=>a.Z,Feature:()=>s.default,Geolocation:()=>C,Graticule:()=>O.Z,Image:()=>R.Z,ImageBase:()=>I.Z,ImageCanvas:()=>P.Z,ImageTile:()=>L.Z,Kinetic:()=>A.Z,Map:()=>N,MapBrowserEvent:()=>G.Z,MapBrowserEventHandler:()=>z.Z,MapEvent:()=>U.Z,Object:()=>u.Z,Observable:()=>B.Z,Overlay:()=>q.Z,PluggableMap:()=>F.Z,Tile:()=>V.Z,TileCache:()=>W.Z,TileQueue:()=>X.Z,TileRange:()=>Y.Z,VERSION:()=>J.q4,VectorRenderTile:()=>H.Z,VectorTile:()=>K.Z,View:()=>$.ZP,getUid:()=>J.sq});var i,n=r(6813),o=r(8714),a=r(5431),s=r(1090),l=r(291),u=r(2971),c=r(5487),h=r(2033),p=r(6121),d=r(3983),f=(i=function(t,e){return i=Object.setPrototypeOf||{__proto__:[]}instanceof Array&&function(t,e){t.__proto__=e}||function(t,e){for(var r in e)Object.prototype.hasOwnProperty.call(e,r)&&(t[r]=e[r])},i(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 r(){this.constructor=t}i(t,e),t.prototype=null===e?Object.create(e):(r.prototype=e.prototype,new r)}),g="accuracy",y="accuracyGeometry",m="altitude",v="altitudeAccuracy",_="heading",x="position",b="projection",w="speed",E="tracking",T="trackingOptions",S=function(t){function e(e){var r=t.call(this,c.Z.ERROR)||this;return r.code=e.code,r.message=e.message,r}return f(e,t),e}(l.ZP);const C=function(t){function e(e){var r=t.call(this)||this;r.on,r.once,r.un;var i=e||{};return r.position_=null,r.transform_=p.identityTransform,r.watchId_=void 0,r.addChangeListener(b,r.handleProjectionChanged_),r.addChangeListener(E,r.handleTrackingChanged_),void 0!==i.projection&&r.setProjection(i.projection),void 0!==i.trackingOptions&&r.setTrackingOptions(i.trackingOptions),r.setTracking(void 0!==i.tracking&&i.tracking),r}return f(e,t),e.prototype.disposeInternal=function(){this.setTracking(!1),t.prototype.disposeInternal.call(this)},e.prototype.handleProjectionChanged_=function(){var t=this.getProjection();t&&(this.transform_=(0,p.getTransformFromProjections)((0,p.get)("EPSG:4326"),t),this.position_&&this.set(x,this.transform_(this.position_)))},e.prototype.handleTrackingChanged_=function(){if("geolocation"in navigator){var t=this.getTracking();t&&void 0===this.watchId_?this.watchId_=navigator.geolocation.watchPosition(this.positionChange_.bind(this),this.positionError_.bind(this),this.getTrackingOptions()):t||void 0===this.watchId_||(navigator.geolocation.clearWatch(this.watchId_),this.watchId_=void 0)}},e.prototype.positionChange_=function(t){var e=t.coords;this.set(g,e.accuracy),this.set(m,null===e.altitude?void 0:e.altitude),this.set(v,null===e.altitudeAccuracy?void 0:e.altitudeAccuracy),this.set(_,null===e.heading?void 0:(0,d.Yr)(e.heading)),this.position_?(this.position_[0]=e.longitude,this.position_[1]=e.latitude):this.position_=[e.longitude,e.latitude];var r=this.transform_(this.position_);this.set(x,r),this.set(w,null===e.speed?void 0:e.speed);var i=(0,h.iu)(this.position_,e.accuracy);i.applyTransform(this.transform_),this.set(y,i),this.changed()},e.prototype.positionError_=function(t){this.dispatchEvent(new S(t))},e.prototype.getAccuracy=function(){return this.get(g)},e.prototype.getAccuracyGeometry=function(){return this.get(y)||null},e.prototype.getAltitude=function(){return this.get(m)},e.prototype.getAltitudeAccuracy=function(){return this.get(v)},e.prototype.getHeading=function(){return this.get(_)},e.prototype.getPosition=function(){return this.get(x)},e.prototype.getProjection=function(){return this.get(b)},e.prototype.getSpeed=function(){return this.get(w)},e.prototype.getTracking=function(){return this.get(E)},e.prototype.getTrackingOptions=function(){return this.get(T)},e.prototype.setProjection=function(t){this.set(b,(0,p.get)(t))},e.prototype.setTracking=function(t){this.set(E,t)},e.prototype.setTrackingOptions=function(t){this.set(T,t)},e}(u.Z);var O=r(8599),R=r(8096),I=r(1798),P=r(8294),L=r(825),A=r(1230),M=r(9151),F=r(7739),Z=r(9374),k=r(494),j=r(1824),D=function(){var t=function(e,r){return t=Object.setPrototypeOf||{__proto__:[]}instanceof Array&&function(t,e){t.__proto__=e}||function(t,e){for(var r in e)Object.prototype.hasOwnProperty.call(e,r)&&(t[r]=e[r])},t(e,r)};return function(e,r){if("function"!=typeof r&&null!==r)throw new TypeError("Class extends value "+String(r)+" is not a constructor or null");function i(){this.constructor=e}t(e,r),e.prototype=null===r?Object.create(r):(i.prototype=r.prototype,new i)}}();const N=function(t){function e(e){return(e=(0,Z.f0)({},e)).controls||(e.controls=(0,k.defaults)()),e.interactions||(e.interactions=(0,j.defaults)({onFocusOnly:!0})),t.call(this,e)||this}return D(e,t),e.prototype.createRenderer=function(){return new M.Z(this)},e}(F.Z);var G=r(8630),z=r(1708),U=r(3536),B=r(2706),q=r(3223),V=r(4806),W=r(1702),X=r(9882),Y=r(2519),H=r(2559),K=r(4759),$=r(7681),J=r(4187)},1824:(t,e,r)=>{"use strict";r.r(e),r.d(e,{DoubleClickZoom:()=>n.Z,DragAndDrop:()=>f.Z,DragBox:()=>g.Z,DragPan:()=>o.Z,DragRotate:()=>a.Z,DragRotateAndZoom:()=>y.Z,DragZoom:()=>s.Z,Draw:()=>m.ZP,Extent:()=>v.Z,Interaction:()=>_.ZP,KeyboardPan:()=>l.Z,KeyboardZoom:()=>u.Z,Modify:()=>x.Z,MouseWheelZoom:()=>h.Z,PinchRotate:()=>p.Z,PinchZoom:()=>d.Z,Pointer:()=>b.Z,Select:()=>w.Z,Snap:()=>E.Z,Translate:()=>T.Z,defaults:()=>S});var i=r(8714),n=r(3522),o=r(3267),a=r(2857),s=r(519),l=r(222),u=r(834),c=r(1230),h=r(686),p=r(3205),d=r(4474),f=r(95),g=r(9365),y=r(447),m=r(5010),v=r(2420),_=r(7182),x=r(8373),b=r(4515),w=r(7517),E=r(6002),T=r(3232);function S(t){var e=t||{},r=new i.Z,f=new c.Z(-.005,.05,100);return(void 0===e.altShiftDragRotate||e.altShiftDragRotate)&&r.push(new a.Z),(void 0===e.doubleClickZoom||e.doubleClickZoom)&&r.push(new n.Z({delta:e.zoomDelta,duration:e.zoomDuration})),(void 0===e.dragPan||e.dragPan)&&r.push(new o.Z({onFocusOnly:e.onFocusOnly,kinetic:f})),(void 0===e.pinchRotate||e.pinchRotate)&&r.push(new p.Z),(void 0===e.pinchZoom||e.pinchZoom)&&r.push(new d.Z({duration:e.zoomDuration})),(void 0===e.keyboard||e.keyboard)&&(r.push(new l.Z),r.push(new u.Z({delta:e.zoomDelta,duration:e.zoomDuration}))),(void 0===e.mouseWheelZoom||e.mouseWheelZoom)&&r.push(new h.Z({onFocusOnly:e.onFocusOnly,duration:e.zoomDuration})),(void 0===e.shiftDragZoom||e.shiftDragZoom)&&r.push(new s.Z({duration:e.zoomDuration})),r}},3522:(t,e,r)=>{"use strict";r.d(e,{Z:()=>s});var i,n=r(7182),o=r(2217),a=(i=function(t,e){return i=Object.setPrototypeOf||{__proto__:[]}instanceof Array&&function(t,e){t.__proto__=e}||function(t,e){for(var r in e)Object.prototype.hasOwnProperty.call(e,r)&&(t[r]=e[r])},i(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 r(){this.constructor=t}i(t,e),t.prototype=null===e?Object.create(e):(r.prototype=e.prototype,new r)});const s=function(t){function e(e){var r=t.call(this)||this,i=e||{};return r.delta_=i.delta?i.delta:1,r.duration_=void 0!==i.duration?i.duration:250,r}return a(e,t),e.prototype.handleEvent=function(t){var e=!1;if(t.type==o.Z.DBLCLICK){var r=t.originalEvent,i=t.map,a=t.coordinate,s=r.shiftKey?-this.delta_:this.delta_,l=i.getView();(0,n.FW)(l,s,a,this.duration_),r.preventDefault(),e=!0}return!e},e}(n.ZP)},95:(t,e,r)=>{"use strict";r.d(e,{Z:()=>d});var i,n=r(291),o=r(5487),a=r(6617),s=r(7182),l=r(6885),u=r(6121),c=r(5818),h=(i=function(t,e){return i=Object.setPrototypeOf||{__proto__:[]}instanceof Array&&function(t,e){t.__proto__=e}||function(t,e){for(var r in e)Object.prototype.hasOwnProperty.call(e,r)&&(t[r]=e[r])},i(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 r(){this.constructor=t}i(t,e),t.prototype=null===e?Object.create(e):(r.prototype=e.prototype,new r)}),p=function(t){function e(e,r,i,n){var o=t.call(this,e)||this;return o.features=i,o.file=r,o.projection=n,o}return h(e,t),e}(n.ZP);const d=function(t){function e(e){var r=this,i=e||{};(r=t.call(this,{handleEvent:l.uX})||this).on,r.once,r.un,r.readAsBuffer_=!1,r.formats_=[];for(var n=i.formatConstructors?i.formatConstructors:[],o=0,s=n.length;o<s;++o){var c=n[o];"function"==typeof c&&(c=new c),r.formats_.push(c),r.readAsBuffer_=r.readAsBuffer_||c.getType()===a.Z.ARRAY_BUFFER}return r.projection_=i.projection?(0,u.get)(i.projection):null,r.dropListenKeys_=null,r.source_=i.source||null,r.target=i.target?i.target:null,r}return h(e,t),e.prototype.handleResult_=function(t,e){var r,i=e.target.result,n=this.getMap(),o=this.projection_;o||(o=n.getView().getProjection());for(var s=this.formats_,l=0,u=s.length;l<u;++l){var c=s[l],h=i;this.readAsBuffer_&&c.getType()!==a.Z.ARRAY_BUFFER&&(void 0===r&&(r=(new TextDecoder).decode(i)),h=r);var d=this.tryReadFeatures_(c,h,{featureProjection:o});if(d&&d.length>0){this.source_&&(this.source_.clear(),this.source_.addFeatures(d)),this.dispatchEvent(new p("addfeatures",t,d,o));break}}},e.prototype.registerListeners_=function(){var t=this.getMap();if(t){var e=this.target?this.target:t.getViewport();this.dropListenKeys_=[(0,c.oL)(e,o.Z.DROP,this.handleDrop,this),(0,c.oL)(e,o.Z.DRAGENTER,this.handleStop,this),(0,c.oL)(e,o.Z.DRAGOVER,this.handleStop,this),(0,c.oL)(e,o.Z.DROP,this.handleStop,this)]}},e.prototype.setActive=function(e){!this.getActive()&&e&&this.registerListeners_(),this.getActive()&&!e&&this.unregisterListeners_(),t.prototype.setActive.call(this,e)},e.prototype.setMap=function(e){this.unregisterListeners_(),t.prototype.setMap.call(this,e),this.getActive()&&this.registerListeners_()},e.prototype.tryReadFeatures_=function(t,e,r){try{return t.readFeatures(e,r)}catch(t){return null}},e.prototype.unregisterListeners_=function(){this.dropListenKeys_&&(this.dropListenKeys_.forEach(c.bN),this.dropListenKeys_=null)},e.prototype.handleDrop=function(t){for(var e=t.dataTransfer.files,r=0,i=e.length;r<i;++r){var n=e.item(r),a=new FileReader;a.addEventListener(o.Z.LOAD,this.handleResult_.bind(this,n)),this.readAsBuffer_?a.readAsArrayBuffer(n):a.readAsText(n)}},e.prototype.handleStop=function(t){t.stopPropagation(),t.preventDefault(),t.dataTransfer.dropEffect="copy"},e}(s.ZP)},9365:(t,e,r)=>{"use strict";r.d(e,{Z:()=>c});var i,n=r(291),o=r(4515),a=r(747),s=r(8683),l=(i=function(t,e){return i=Object.setPrototypeOf||{__proto__:[]}instanceof Array&&function(t,e){t.__proto__=e}||function(t,e){for(var r in e)Object.prototype.hasOwnProperty.call(e,r)&&(t[r]=e[r])},i(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 r(){this.constructor=t}i(t,e),t.prototype=null===e?Object.create(e):(r.prototype=e.prototype,new r)}),u=function(t){function e(e,r,i){var n=t.call(this,e)||this;return n.coordinate=r,n.mapBrowserEvent=i,n}return l(e,t),e}(n.ZP);const c=function(t){function e(e){var r=t.call(this)||this;r.on,r.once,r.un;var i=e||{};return r.box_=new a.Z(i.className||"ol-dragbox"),r.minArea_=void 0!==i.minArea?i.minArea:64,i.onBoxEnd&&(r.onBoxEnd=i.onBoxEnd),r.startPixel_=null,r.condition_=i.condition?i.condition:s.v8,r.boxEndCondition_=i.boxEndCondition?i.boxEndCondition:r.defaultBoxEndCondition,r}return l(e,t),e.prototype.defaultBoxEndCondition=function(t,e,r){var i=r[0]-e[0],n=r[1]-e[1];return i*i+n*n>=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 u("boxdrag",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 u(e?"boxend":"boxcancel",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 u("boxstart",t.coordinate,t)),!0)},e.prototype.onBoxEnd=function(t){},e}(o.Z)},3267:(t,e,r)=>{"use strict";r.d(e,{Z:()=>c});var i,n=r(4515),o=r(6885),a=r(8683),s=r(1015),l=r(1900),u=(i=function(t,e){return i=Object.setPrototypeOf||{__proto__:[]}instanceof Array&&function(t,e){t.__proto__=e}||function(t,e){for(var r in e)Object.prototype.hasOwnProperty.call(e,r)&&(t[r]=e[r])},i(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 r(){this.constructor=t}i(t,e),t.prototype=null===e?Object.create(e):(r.prototype=e.prototype,new r)});const c=function(t){function e(e){var r=t.call(this,{stopDown:o.Dv})||this,i=e||{};r.kinetic_=i.kinetic,r.lastCentroid=null,r.lastPointersCount_,r.panning_=!1;var n=i.condition?i.condition:(0,a.$6)(a.rM,a.Xp);return r.condition_=i.onFocusOnly?(0,a.$6)(a.yZ,n):n,r.noKinetic_=!1,r}return u(e,t),e.prototype.handleDragEvent=function(t){this.panning_||(this.panning_=!0,this.getMap().getView().beginInteraction());var e=this.targetPointers,r=(0,n.S)(e);if(e.length==this.lastPointersCount_){if(this.kinetic_&&this.kinetic_.update(r[0],r[1]),this.lastCentroid){var i=[this.lastCentroid[0]-r[0],r[1]-this.lastCentroid[1]],o=t.map.getView();(0,l.bA)(i,o.getResolution()),(0,l.U1)(i,o.getRotation()),o.adjustCenterInternal(i)}}else this.kinetic_&&this.kinetic_.begin();this.lastCentroid=r,this.lastPointersCount_=e.length,t.originalEvent.preventDefault()},e.prototype.handleUpEvent=function(t){var e=t.map,r=e.getView();if(0===this.targetPointers.length){if(!this.noKinetic_&&this.kinetic_&&this.kinetic_.end()){var i=this.kinetic_.getDistance(),n=this.kinetic_.getAngle(),o=r.getCenterInternal(),a=e.getPixelFromCoordinateInternal(o),l=e.getCoordinateFromPixelInternal([a[0]-i*Math.cos(n),a[1]-i*Math.sin(n)]);r.animateInternal({center:r.getConstrainedCenter(l),duration:500,easing:s.Vv})}return this.panning_&&(this.panning_=!1,r.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}(n.Z)},2857:(t,e,r)=>{"use strict";r.d(e,{Z:()=>u});var i,n=r(4515),o=r(6885),a=r(8683),s=r(828),l=(i=function(t,e){return i=Object.setPrototypeOf||{__proto__:[]}instanceof Array&&function(t,e){t.__proto__=e}||function(t,e){for(var r in e)Object.prototype.hasOwnProperty.call(e,r)&&(t[r]=e[r])},i(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 r(){this.constructor=t}i(t,e),t.prototype=null===e?Object.create(e):(r.prototype=e.prototype,new r)});const u=function(t){function e(e){var r=this,i=e||{};return(r=t.call(this,{stopDown:o.Dv})||this).condition_=i.condition?i.condition:a.aj,r.lastAngle_=void 0,r.duration_=void 0!==i.duration?i.duration:250,r}return l(e,t),e.prototype.handleDragEvent=function(t){if((0,a.QL)(t)){var e=t.map,r=e.getView();if(r.getConstraints().rotation!==s.h$){var i=e.getSize(),n=t.pixel,o=Math.atan2(i[1]/2-n[1],n[0]-i[0]/2);if(void 0!==this.lastAngle_){var l=o-this.lastAngle_;r.adjustRotationInternal(-l)}this.lastAngle_=o}}},e.prototype.handleUpEvent=function(t){return!(0,a.QL)(t)||(t.map.getView().endInteraction(this.duration_),!1)},e.prototype.handleDownEvent=function(t){return!(!(0,a.QL)(t)||!(0,a.v8)(t)||!this.condition_(t)||(t.map.getView().beginInteraction(),this.lastAngle_=void 0,0))},e}(n.Z)},447:(t,e,r)=>{"use strict";r.d(e,{Z:()=>s});var i,n=r(4515),o=r(8683),a=(i=function(t,e){return i=Object.setPrototypeOf||{__proto__:[]}instanceof Array&&function(t,e){t.__proto__=e}||function(t,e){for(var r in e)Object.prototype.hasOwnProperty.call(e,r)&&(t[r]=e[r])},i(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 r(){this.constructor=t}i(t,e),t.prototype=null===e?Object.create(e):(r.prototype=e.prototype,new r)});const s=function(t){function e(e){var r=this,i=e||{};return(r=t.call(this,i)||this).condition_=i.condition?i.condition:o.vY,r.lastAngle_=void 0,r.lastMagnitude_=void 0,r.lastScaleDelta_=0,r.duration_=void 0!==i.duration?i.duration:400,r}return a(e,t),e.prototype.handleDragEvent=function(t){if((0,o.QL)(t)){var e=t.map,r=e.getSize(),i=t.pixel,n=i[0]-r[0]/2,a=r[1]/2-i[1],s=Math.atan2(a,n),l=Math.sqrt(n*n+a*a),u=e.getView();if(void 0!==this.lastAngle_){var c=this.lastAngle_-s;u.adjustRotationInternal(c)}this.lastAngle_=s,void 0!==this.lastMagnitude_&&u.adjustResolutionInternal(this.lastMagnitude_/l),void 0!==this.lastMagnitude_&&(this.lastScaleDelta_=this.lastMagnitude_/l),this.lastMagnitude_=l}},e.prototype.handleUpEvent=function(t){if(!(0,o.QL)(t))return!0;var e=t.map.getView(),r=this.lastScaleDelta_>1?1:-1;return e.endInteraction(this.duration_,r),this.lastScaleDelta_=0,!1},e.prototype.handleDownEvent=function(t){return!!(0,o.QL)(t)&&!!this.condition_(t)&&(t.map.getView().beginInteraction(),this.lastAngle_=void 0,this.lastMagnitude_=void 0,!0)},e}(n.Z)},519:(t,e,r)=>{"use strict";r.d(e,{Z:()=>l});var i,n=r(9365),o=r(1015),a=r(8683),s=(i=function(t,e){return i=Object.setPrototypeOf||{__proto__:[]}instanceof Array&&function(t,e){t.__proto__=e}||function(t,e){for(var r in e)Object.prototype.hasOwnProperty.call(e,r)&&(t[r]=e[r])},i(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 r(){this.constructor=t}i(t,e),t.prototype=null===e?Object.create(e):(r.prototype=e.prototype,new r)});const l=function(t){function e(e){var r=this,i=e||{},n=i.condition?i.condition:a.vY;return(r=t.call(this,{condition:n,className:i.className||"ol-dragzoom",minArea:i.minArea})||this).duration_=void 0!==i.duration?i.duration:200,r.out_=void 0!==i.out&&i.out,r}return s(e,t),e.prototype.onBoxEnd=function(t){var e=this.getMap().getView(),r=this.getGeometry();if(this.out_){var i=e.rotatedExtentForGeometry(r),n=e.getResolutionForExtentInternal(i),a=e.getResolution()/n;(r=r.clone()).scale(a*a)}e.fitInternal(r,{duration:this.duration_,easing:o.Vv})},e}(n.Z)},5010:(t,e,r)=>{"use strict";r.d(e,{ZP:()=>M});var i,n=r(7276),o=r(291),a=r(5487),s=r(1090),l=r(4754),u=r(4049),c=r(2083),h=r(8630),p=r(2217),d=r(7403),f=r(6259),g=r(5063),y=r(188),m=r(4515),v=r(2033),_=r(2371),x=r(2556),b=r(6885),w=r(8683),E=r(7539),T=r(6121),S=r(1900),C=(i=function(t,e){return i=Object.setPrototypeOf||{__proto__:[]}instanceof Array&&function(t,e){t.__proto__=e}||function(t,e){for(var r in e)Object.prototype.hasOwnProperty.call(e,r)&&(t[r]=e[r])},i(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 r(){this.constructor=t}i(t,e),t.prototype=null===e?Object.create(e):(r.prototype=e.prototype,new r)}),O="Point",R="LineString",I="Polygon",P="Circle",L="drawstart",A=function(t){function e(e,r){var i=t.call(this,e)||this;return i.feature=r,i}return C(e,t),e}(o.ZP);const M=function(t){function e(e){var r=this,i=e;i.stopDown||(i.stopDown=b.Dv),(r=t.call(this,i)||this).on,r.once,r.un,r.shouldHandle_=!1,r.downPx_=null,r.downTimeout_,r.lastDragTime_,r.pointerType_,r.freehand_=!1,r.source_=e.source?e.source:null,r.features_=e.features?e.features:null,r.snapTolerance_=e.snapTolerance?e.snapTolerance:12,r.type_=e.type,r.mode_=function(t){switch(t){case l.Z.POINT:case l.Z.MULTI_POINT:return O;case l.Z.LINE_STRING:case l.Z.MULTI_LINE_STRING:return R;case l.Z.POLYGON:case l.Z.MULTI_POLYGON:return I;case l.Z.CIRCLE:return P;default:throw new Error("Invalid type: "+t)}}(r.type_),r.stopClick_=!!e.stopClick,r.minPoints_=e.minPoints?e.minPoints:r.mode_===I?3:2,r.maxPoints_=r.mode_===P?2:e.maxPoints?e.maxPoints:1/0,r.finishCondition_=e.finishCondition?e.finishCondition:b.uX;var o,a=e.geometryFunction;if(!a){var s,h=r.mode_;h===P?a=function(t,e,r){var i=e||new n.Z([NaN,NaN]),o=(0,T.fromUserCoordinate)(t[0],r),a=(0,S.bI)(o,(0,T.fromUserCoordinate)(t[t.length-1],r));i.setCenterAndRadius(o,Math.sqrt(a));var s=(0,T.getUserProjection)();return s&&i.transform(r,s),i}:(h===O?s=y.default:h===R?s=c.Z:h===I&&(s=v.ZP),a=function(t,e,r){return e?h===I?t[0].length?e.setCoordinates([t[0].concat([t[0][0]])]):e.setCoordinates([]):e.setCoordinates(t):e=new s(t),e})}return r.geometryFunction_=a,r.dragVertexDelay_=void 0!==e.dragVertexDelay?e.dragVertexDelay:500,r.finishCoordinate_=null,r.sketchFeature_=null,r.sketchPoint_=null,r.sketchCoords_=null,r.sketchLine_=null,r.sketchLineCoords_=null,r.squaredClickTolerance_=e.clickTolerance?e.clickTolerance*e.clickTolerance:36,r.overlay_=new _.Z({source:new x.Z({useSpatialIndex:!1,wrapX:!!e.wrapX&&e.wrapX}),style:e.style?e.style:(o=(0,E.Ly)(),function(t,e){return o[t.getGeometry().getType()]}),updateWhileInteracting:!0}),r.geometryName_=e.geometryName,r.condition_=e.condition?e.condition:w.rM,r.freehandCondition_,e.freehand?r.freehandCondition_=w.Bx:r.freehandCondition_=e.freehandCondition?e.freehandCondition:w.vY,r.addChangeListener(u.Z.ACTIVE,r.updateState_),r}return C(e,t),e.prototype.setMap=function(e){t.prototype.setMap.call(this,e),this.updateState_()},e.prototype.getOverlay=function(){return this.overlay_},e.prototype.handleEvent=function(e){e.originalEvent.type===a.Z.CONTEXTMENU&&e.originalEvent.preventDefault(),this.freehand_=this.mode_!==O&&this.freehandCondition_(e);var r=e.type===p.Z.POINTERMOVE,i=!0;return!this.freehand_&&this.lastDragTime_&&e.type===p.Z.POINTERDRAG&&(Date.now()-this.lastDragTime_>=this.dragVertexDelay_?(this.downPx_=e.pixel,this.shouldHandle_=!this.freehand_,r=!0):this.lastDragTime_=void 0,this.shouldHandle_&&void 0!==this.downTimeout_&&(clearTimeout(this.downTimeout_),this.downTimeout_=void 0)),this.freehand_&&e.type===p.Z.POINTERDRAG&&null!==this.sketchFeature_?(this.addToDrawing_(e.coordinate),i=!1):this.freehand_&&e.type===p.Z.POINTERDOWN?i=!1:r&&this.getPointerCount()<2?(i=e.type===p.Z.POINTERMOVE)&&this.freehand_?(this.handlePointerMove_(e),this.shouldHandle_&&e.originalEvent.preventDefault()):("mouse"===e.originalEvent.pointerType||e.type===p.Z.POINTERDRAG&&void 0===this.downTimeout_)&&this.handlePointerMove_(e):e.type===p.Z.DBLCLICK&&(i=!1),t.prototype.handleEvent.call(this,e)&&i},e.prototype.handleDownEvent=function(t){return this.shouldHandle_=!this.freehand_,this.freehand_?(this.downPx_=t.pixel,this.finishCoordinate_||this.startDrawing_(t.coordinate),!0):this.condition_(t)?(this.lastDragTime_=Date.now(),this.downTimeout_=setTimeout(function(){this.handlePointerMove_(new h.Z(p.Z.POINTERMOVE,t.map,t.originalEvent,!1,t.frameState))}.bind(this),this.dragVertexDelay_),this.downPx_=t.pixel,!0):(this.lastDragTime_=void 0,!1)},e.prototype.handleUpEvent=function(t){var e=!0;if(0===this.getPointerCount())if(this.downTimeout_&&(clearTimeout(this.downTimeout_),this.downTimeout_=void 0),this.handlePointerMove_(t),this.shouldHandle_){var r=!this.finishCoordinate_;r&&this.startDrawing_(t.coordinate),!r&&this.freehand_?this.finishDrawing():this.freehand_||r&&this.mode_!==O||(this.atFinish_(t.pixel)?this.finishCondition_(t)&&this.finishDrawing():this.addToDrawing_(t.coordinate)),e=!1}else this.freehand_&&this.abortDrawing();return!e&&this.stopClick_&&t.preventDefault(),e},e.prototype.handlePointerMove_=function(t){if(this.pointerType_=t.originalEvent.pointerType,this.downPx_&&(!this.freehand_&&this.shouldHandle_||this.freehand_&&!this.shouldHandle_)){var e=this.downPx_,r=t.pixel,i=e[0]-r[0],n=e[1]-r[1],o=i*i+n*n;if(this.shouldHandle_=this.freehand_?o>this.squaredClickTolerance_:o<=this.squaredClickTolerance_,!this.shouldHandle_)return}this.finishCoordinate_?this.modifyDrawing_(t.coordinate):this.createOrUpdateSketchPoint_(t.coordinate.slice())},e.prototype.atFinish_=function(t){var e=!1;if(this.sketchFeature_){var r=!1,i=[this.finishCoordinate_],n=this.mode_;if(n===O)e=!0;else if(n===P)e=2===this.sketchCoords_.length;else if(n===R)r=this.sketchCoords_.length>this.minPoints_;else if(n===I){var o=this.sketchCoords_;r=o[0].length>this.minPoints_,i=[o[0][0],o[0][o[0].length-2]]}if(r)for(var a=this.getMap(),s=0,l=i.length;s<l;s++){var u=i[s],c=a.getPixelFromCoordinate(u),h=t[0]-c[0],p=t[1]-c[1],d=this.freehand_?1:this.snapTolerance_;if(e=Math.sqrt(h*h+p*p)<=d){this.finishCoordinate_=u;break}}}return e},e.prototype.createOrUpdateSketchPoint_=function(t){this.sketchPoint_?this.sketchPoint_.getGeometry().setCoordinates(t):(this.sketchPoint_=new s.default(new y.default(t)),this.updateSketchFeatures_())},e.prototype.createOrUpdateCustomSketchLine_=function(t){this.sketchLine_||(this.sketchLine_=new s.default);var e=t.getLinearRing(0),r=this.sketchLine_.getGeometry();r?(r.setFlatCoordinates(e.getLayout(),e.getFlatCoordinates()),r.changed()):(r=new c.Z(e.getFlatCoordinates(),e.getLayout()),this.sketchLine_.setGeometry(r))},e.prototype.startDrawing_=function(t){var e=this.getMap().getView().getProjection();this.finishCoordinate_=t,this.mode_===O?this.sketchCoords_=t.slice():this.mode_===I?(this.sketchCoords_=[[t.slice(),t.slice()]],this.sketchLineCoords_=this.sketchCoords_[0]):this.sketchCoords_=[t.slice(),t.slice()],this.sketchLineCoords_&&(this.sketchLine_=new s.default(new c.Z(this.sketchLineCoords_)));var r=this.geometryFunction_(this.sketchCoords_,void 0,e);this.sketchFeature_=new s.default,this.geometryName_&&this.sketchFeature_.setGeometryName(this.geometryName_),this.sketchFeature_.setGeometry(r),this.updateSketchFeatures_(),this.dispatchEvent(new A(L,this.sketchFeature_))},e.prototype.modifyDrawing_=function(t){var e,r,i=this.getMap(),n=this.sketchFeature_.getGeometry(),o=i.getView().getProjection();this.mode_===O?r=this.sketchCoords_:this.mode_===I?(r=(e=this.sketchCoords_[0])[e.length-1],this.atFinish_(i.getPixelFromCoordinate(t))&&(t=this.finishCoordinate_.slice())):r=(e=this.sketchCoords_)[e.length-1],r[0]=t[0],r[1]=t[1],this.geometryFunction_(this.sketchCoords_,n,o),this.sketchPoint_&&this.sketchPoint_.getGeometry().setCoordinates(t),n.getType()===l.Z.POLYGON&&this.mode_!==I?this.createOrUpdateCustomSketchLine_(n):this.sketchLineCoords_&&this.sketchLine_.getGeometry().setCoordinates(this.sketchLineCoords_),this.updateSketchFeatures_()},e.prototype.addToDrawing_=function(t){var e,r,i=this.sketchFeature_.getGeometry(),n=this.getMap().getView().getProjection(),o=this.mode_;o===R||o===P?(this.finishCoordinate_=t.slice(),(r=this.sketchCoords_).length>=this.maxPoints_&&(this.freehand_?r.pop():e=!0),r.push(t.slice()),this.geometryFunction_(r,i,n)):o===I&&((r=this.sketchCoords_[0]).length>=this.maxPoints_&&(this.freehand_?r.pop():e=!0),r.push(t.slice()),e&&(this.finishCoordinate_=r[0]),this.geometryFunction_(this.sketchCoords_,i,n)),this.createOrUpdateSketchPoint_(t.slice()),this.updateSketchFeatures_(),e&&this.finishDrawing()},e.prototype.removeLastPoint=function(){if(this.sketchFeature_){var t,e=this.sketchFeature_.getGeometry(),r=this.getMap().getView().getProjection(),i=this.mode_;if(i===R||i===P){if((t=this.sketchCoords_).splice(-2,1),t.length>=2){this.finishCoordinate_=t[t.length-2].slice();var n=this.finishCoordinate_.slice();t[t.length-1]=n,this.createOrUpdateSketchPoint_(n)}this.geometryFunction_(t,e,r),e.getType()===l.Z.POLYGON&&this.sketchLine_&&this.createOrUpdateCustomSketchLine_(e)}else if(i===I){(t=this.sketchCoords_[0]).splice(-2,1);var o=this.sketchLine_.getGeometry();t.length>=2&&(n=t[t.length-2].slice(),t[t.length-1]=n,this.createOrUpdateSketchPoint_(n)),o.setCoordinates(t),this.geometryFunction_(this.sketchCoords_,e,r)}1===t.length&&this.abortDrawing(),this.updateSketchFeatures_()}},e.prototype.finishDrawing=function(){var t=this.abortDrawing_();if(t){var e=this.sketchCoords_,r=t.getGeometry(),i=this.getMap().getView().getProjection();this.mode_===R?(e.pop(),this.geometryFunction_(e,r,i)):this.mode_===I&&(e[0].pop(),this.geometryFunction_(e,r,i),e=r.getCoordinates()),this.type_===l.Z.MULTI_POINT?t.setGeometry(new f.Z([e])):this.type_===l.Z.MULTI_LINE_STRING?t.setGeometry(new d.Z([e])):this.type_===l.Z.MULTI_POLYGON&&t.setGeometry(new g.Z([e])),this.dispatchEvent(new A("drawend",t)),this.features_&&this.features_.push(t),this.source_&&this.source_.addFeature(t)}},e.prototype.abortDrawing_=function(){this.finishCoordinate_=null;var t=this.sketchFeature_;return this.sketchFeature_=null,this.sketchPoint_=null,this.sketchLine_=null,this.overlay_.getSource().clear(!0),t},e.prototype.abortDrawing=function(){var t=this.abortDrawing_();t&&this.dispatchEvent(new A("drawabort",t))},e.prototype.appendCoordinates=function(t){var e,r=this.mode_,i=!this.sketchFeature_;if(i&&this.startDrawing_(t[0]),r===R||r===P)e=this.sketchCoords_;else{if(r!==I)return;e=this.sketchCoords_&&this.sketchCoords_.length?this.sketchCoords_[0]:[]}i&&e.shift(),e.pop();for(var n=0;n<t.length;n++)this.addToDrawing_(t[n]);var o=t[t.length-1];this.addToDrawing_(o),this.modifyDrawing_(o)},e.prototype.extend=function(t){var e=t.getGeometry();this.sketchFeature_=t,this.sketchCoords_=e.getCoordinates();var r=this.sketchCoords_[this.sketchCoords_.length-1];this.finishCoordinate_=r.slice(),this.sketchCoords_.push(r.slice()),this.sketchPoint_=new s.default(new y.default(r)),this.updateSketchFeatures_(),this.dispatchEvent(new A(L,this.sketchFeature_))},e.prototype.updateSketchFeatures_=function(){var t=[];this.sketchFeature_&&t.push(this.sketchFeature_),this.sketchLine_&&t.push(this.sketchLine_),this.sketchPoint_&&t.push(this.sketchPoint_);var e=this.overlay_.getSource();e.clear(!0),e.addFeatures(t)},e.prototype.updateState_=function(){var t=this.getMap(),e=this.getActive();t&&e||this.abortDrawing(),this.overlay_.setMap(e?t:null)},e}(m.Z)},2420:(t,e,r)=>{"use strict";r.d(e,{Z:()=>E});var i,n=r(291),o=r(1090),a=r(4754),s=r(2217),l=r(188),u=r(4515),c=r(2371),h=r(2556),p=r(8683),d=r(8641),f=r(1900),g=r(7539),y=r(2033),m=r(6121),v=(i=function(t,e){return i=Object.setPrototypeOf||{__proto__:[]}instanceof Array&&function(t,e){t.__proto__=e}||function(t,e){for(var r in e)Object.prototype.hasOwnProperty.call(e,r)&&(t[r]=e[r])},i(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 r(){this.constructor=t}i(t,e),t.prototype=null===e?Object.create(e):(r.prototype=e.prototype,new r)}),_=function(t){function e(e){var r=t.call(this,"extentchanged")||this;return r.extent=e,r}return v(e,t),e}(n.ZP);function x(){var t=(0,g.Ly)();return function(e,r){return t[a.Z.POINT]}}function b(t){return function(e){return(0,d.boundingExtent)([t,e])}}function w(t,e){return t[0]==e[0]?function(r){return(0,d.boundingExtent)([t,[r[0],e[1]]])}:t[1]==e[1]?function(r){return(0,d.boundingExtent)([t,[e[0],r[1]]])}:null}const E=function(t){function e(e){var r,i=this,n=e||{};return(i=t.call(this,n)||this).on,i.once,i.un,i.condition_=n.condition?n.condition:p.Bx,i.extent_=null,i.pointerHandler_=null,i.pixelTolerance_=void 0!==n.pixelTolerance?n.pixelTolerance:10,i.snappedToVertex_=!1,i.extentFeature_=null,i.vertexFeature_=null,e||(e={}),i.extentOverlay_=new c.Z({source:new h.Z({useSpatialIndex:!1,wrapX:!!e.wrapX}),style:e.boxStyle?e.boxStyle:(r=(0,g.Ly)(),function(t,e){return r[a.Z.POLYGON]}),updateWhileAnimating:!0,updateWhileInteracting:!0}),i.vertexOverlay_=new c.Z({source:new h.Z({useSpatialIndex:!1,wrapX:!!e.wrapX}),style:e.pointerStyle?e.pointerStyle:x(),updateWhileAnimating:!0,updateWhileInteracting:!0}),e.extent&&i.setExtent(e.extent),i}return v(e,t),e.prototype.snapToVertex_=function(t,e){var r=e.getCoordinateFromPixelInternal(t),i=this.getExtentInternal();if(i){var n=function(t){return[[[t[0],t[1]],[t[0],t[3]]],[[t[0],t[3]],[t[2],t[3]]],[[t[2],t[3]],[t[2],t[1]]],[[t[2],t[1]],[t[0],t[1]]]]}(i);n.sort((function(t,e){return(0,f.Bs)(r,t)-(0,f.Bs)(r,e)}));var o=n[0],a=(0,f.oL)(r,o),s=e.getPixelFromCoordinateInternal(a);if((0,f.TE)(t,s)<=this.pixelTolerance_){var l=e.getPixelFromCoordinateInternal(o[0]),u=e.getPixelFromCoordinateInternal(o[1]),c=(0,f.bI)(s,l),h=(0,f.bI)(s,u),p=Math.sqrt(Math.min(c,h));return this.snappedToVertex_=p<=this.pixelTolerance_,this.snappedToVertex_&&(a=c>h?o[1]:o[0]),a}}return null},e.prototype.handlePointerMove_=function(t){var e=t.pixel,r=t.map,i=this.snapToVertex_(e,r);i||(i=r.getCoordinateFromPixelInternal(e)),this.createOrUpdatePointerFeature_(i)},e.prototype.createOrUpdateExtentFeature_=function(t){var e=this.extentFeature_;return e?t?e.setGeometry((0,y.oJ)(t)):e.setGeometry(void 0):(e=t?new o.default((0,y.oJ)(t)):new o.default({}),this.extentFeature_=e,this.extentOverlay_.getSource().addFeature(e)),e},e.prototype.createOrUpdatePointerFeature_=function(t){var e=this.vertexFeature_;return e?e.getGeometry().setCoordinates(t):(e=new o.default(new l.default(t)),this.vertexFeature_=e,this.vertexOverlay_.getSource().addFeature(e)),e},e.prototype.handleEvent=function(e){return!e.originalEvent||!this.condition_(e)||(e.type!=s.Z.POINTERMOVE||this.handlingDownUpSequence||this.handlePointerMove_(e),t.prototype.handleEvent.call(this,e),!1)},e.prototype.handleDownEvent=function(t){var e=t.pixel,r=t.map,i=this.getExtentInternal(),n=this.snapToVertex_(e,r),o=function(t){var e=null,r=null;return t[0]==i[0]?e=i[2]:t[0]==i[2]&&(e=i[0]),t[1]==i[1]?r=i[3]:t[1]==i[3]&&(r=i[1]),null!==e&&null!==r?[e,r]:null};if(n&&i){var a=n[0]==i[0]||n[0]==i[2]?n[0]:null,s=n[1]==i[1]||n[1]==i[3]?n[1]:null;null!==a&&null!==s?this.pointerHandler_=b(o(n)):null!==a?this.pointerHandler_=w(o([a,i[1]]),o([a,i[3]])):null!==s&&(this.pointerHandler_=w(o([i[0],s]),o([i[2],s])))}else n=r.getCoordinateFromPixelInternal(e),this.setExtent([n[0],n[1],n[0],n[1]]),this.pointerHandler_=b(n);return!0},e.prototype.handleDragEvent=function(t){if(this.pointerHandler_){var e=t.coordinate;this.setExtent(this.pointerHandler_(e)),this.createOrUpdatePointerFeature_(e)}},e.prototype.handleUpEvent=function(t){this.pointerHandler_=null;var e=this.getExtentInternal();return e&&0!==(0,d.getArea)(e)||this.setExtent(null),!1},e.prototype.setMap=function(e){this.extentOverlay_.setMap(e),this.vertexOverlay_.setMap(e),t.prototype.setMap.call(this,e)},e.prototype.getExtent=function(){return(0,m.toUserExtent)(this.getExtentInternal(),this.getMap().getView().getProjection())},e.prototype.getExtentInternal=function(){return this.extent_},e.prototype.setExtent=function(t){this.extent_=t||null,this.createOrUpdateExtentFeature_(t),this.dispatchEvent(new _(this.extent_))},e}(u.Z)},7182:(t,e,r)=>{"use strict";r.d(e,{Cv:()=>l,FW:()=>u,ZP:()=>c});var i,n=r(2971),o=r(4049),a=r(1015),s=(i=function(t,e){return i=Object.setPrototypeOf||{__proto__:[]}instanceof Array&&function(t,e){t.__proto__=e}||function(t,e){for(var r in e)Object.prototype.hasOwnProperty.call(e,r)&&(t[r]=e[r])},i(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 r(){this.constructor=t}i(t,e),t.prototype=null===e?Object.create(e):(r.prototype=e.prototype,new r)});function l(t,e,r){var i=t.getCenterInternal();if(i){var n=[i[0]+e[0],i[1]+e[1]];t.animateInternal({duration:void 0!==r?r:250,easing:a.GE,center:t.getConstrainedCenter(n)})}}function u(t,e,r,i){var n=t.getZoom();if(void 0!==n){var o=t.getConstrainedZoom(n+e),s=t.getResolutionForZoom(o);t.getAnimating()&&t.cancelAnimations(),t.animate({resolution:s,anchor:r,duration:void 0!==i?i:250,easing:a.Vv})}}const c=function(t){function e(e){var r=t.call(this)||this;return r.on,r.once,r.un,e&&e.handleEvent&&(r.handleEvent=e.handleEvent),r.map_=null,r.setActive(!0),r}return s(e,t),e.prototype.getActive=function(){return this.get(o.Z.ACTIVE)},e.prototype.getMap=function(){return this.map_},e.prototype.handleEvent=function(t){return!0},e.prototype.setActive=function(t){this.set(o.Z.ACTIVE,t)},e.prototype.setMap=function(t){this.map_=t},e}(n.Z)},222:(t,e,r)=>{"use strict";r.d(e,{Z:()=>c});var i,n=r(5487),o=r(7182),a=r(2750),s=r(8683),l=r(1900),u=(i=function(t,e){return i=Object.setPrototypeOf||{__proto__:[]}instanceof Array&&function(t,e){t.__proto__=e}||function(t,e){for(var r in e)Object.prototype.hasOwnProperty.call(e,r)&&(t[r]=e[r])},i(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 r(){this.constructor=t}i(t,e),t.prototype=null===e?Object.create(e):(r.prototype=e.prototype,new r)});const c=function(t){function e(e){var r=t.call(this)||this,i=e||{};return r.defaultCondition_=function(t){return(0,s.rM)(t)&&(0,s.TN)(t)},r.condition_=void 0!==i.condition?i.condition:r.defaultCondition_,r.duration_=void 0!==i.duration?i.duration:100,r.pixelDelta_=void 0!==i.pixelDelta?i.pixelDelta:128,r}return u(e,t),e.prototype.handleEvent=function(t){var e=!1;if(t.type==n.Z.KEYDOWN){var r=t.originalEvent,i=r.keyCode;if(this.condition_(t)&&(i==a.Z.DOWN||i==a.Z.LEFT||i==a.Z.RIGHT||i==a.Z.UP)){var s=t.map.getView(),u=s.getResolution()*this.pixelDelta_,c=0,h=0;i==a.Z.DOWN?h=-u:i==a.Z.LEFT?c=-u:i==a.Z.RIGHT?c=u:h=u;var p=[c,h];(0,l.U1)(p,s.getRotation()),(0,o.Cv)(s,p,this.duration_),r.preventDefault(),e=!0}}return!e},e}(o.ZP)},834:(t,e,r)=>{"use strict";r.d(e,{Z:()=>l});var i,n=r(5487),o=r(7182),a=r(8683),s=(i=function(t,e){return i=Object.setPrototypeOf||{__proto__:[]}instanceof Array&&function(t,e){t.__proto__=e}||function(t,e){for(var r in e)Object.prototype.hasOwnProperty.call(e,r)&&(t[r]=e[r])},i(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 r(){this.constructor=t}i(t,e),t.prototype=null===e?Object.create(e):(r.prototype=e.prototype,new r)});const l=function(t){function e(e){var r=t.call(this)||this,i=e||{};return r.condition_=i.condition?i.condition:a.TN,r.delta_=i.delta?i.delta:1,r.duration_=void 0!==i.duration?i.duration:100,r}return s(e,t),e.prototype.handleEvent=function(t){var e=!1;if(t.type==n.Z.KEYDOWN||t.type==n.Z.KEYPRESS){var r=t.originalEvent,i=r.charCode;if(this.condition_(t)&&(i=="+".charCodeAt(0)||i=="-".charCodeAt(0))){var a=t.map,s=i=="+".charCodeAt(0)?this.delta_:-this.delta_,l=a.getView();(0,o.FW)(l,s,void 0,this.duration_),r.preventDefault(),e=!0}}return!e},e}(o.ZP)},8373:(t,e,r)=>{"use strict";r.d(e,{Z:()=>M});var i,n=r(8714),o=r(2071),a=r(291),s=r(5487),l=r(1090),u=r(4754),c=r(2217),h=r(188),p=r(4515),d=r(9781),f=r(2796),g=r(2371),y=r(2556),m=r(8683),v=r(8641),_=r(1900),x=r(7539),b=r(5537),w=r(2033),E=r(6121),T=r(4187),S=(i=function(t,e){return i=Object.setPrototypeOf||{__proto__:[]}instanceof Array&&function(t,e){t.__proto__=e}||function(t,e){for(var r in e)Object.prototype.hasOwnProperty.call(e,r)&&(t[r]=e[r])},i(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 r(){this.constructor=t}i(t,e),t.prototype=null===e?Object.create(e):(r.prototype=e.prototype,new r)}),C=[0,0,0,0],O=[],R="modifyend",I=function(t){function e(e,r,i){var n=t.call(this,e)||this;return n.features=r,n.mapBrowserEvent=i,n}return S(e,t),e}(a.ZP);function P(t,e){return t.index-e.index}function L(t,e,r){var i=e.geometry;if(i.getType()===u.Z.CIRCLE){var n=i;if(1===e.index){var o=(0,E.getUserProjection)();o&&(n=n.clone().transform(o,r));var a=(0,_.bI)(n.getCenter(),(0,E.fromUserCoordinate)(t,r)),s=Math.sqrt(a)-n.getRadius();return s*s}}var l=(0,E.fromUserCoordinate)(t,r);return O[0]=(0,E.fromUserCoordinate)(e.segment[0],r),O[1]=(0,E.fromUserCoordinate)(e.segment[1],r),(0,_.Bs)(l,O)}function A(t,e,r){var i=e.geometry;if(i.getType()===u.Z.CIRCLE&&1===e.index){var n=i,o=(0,E.getUserProjection)();return o&&(n=n.clone().transform(o,r)),(0,E.toUserCoordinate)(n.getClosestPoint((0,E.fromUserCoordinate)(t,r)),r)}var a=(0,E.fromUserCoordinate)(t,r);return O[0]=(0,E.fromUserCoordinate)(e.segment[0],r),O[1]=(0,E.fromUserCoordinate)(e.segment[1],r),(0,E.toUserCoordinate)((0,_.oL)(a,O),r)}const M=function(t){function e(e){var r,i,a=t.call(this,e)||this;if(a.on,a.once,a.un,a.boundHandleFeatureChange_=a.handleFeatureChange_.bind(a),a.condition_=e.condition?e.condition:m.Xp,a.defaultDeleteCondition_=function(t){return(0,m.Ko)(t)&&(0,m.Kf)(t)},a.deleteCondition_=e.deleteCondition?e.deleteCondition:a.defaultDeleteCondition_,a.insertVertexCondition_=e.insertVertexCondition?e.insertVertexCondition:m.Bx,a.vertexFeature_=null,a.vertexSegments_=null,a.lastPixel_=[0,0],a.ignoreNextSingleClick_=!1,a.featuresBeingModified_=null,a.rBush_=new d.Z,a.pixelTolerance_=void 0!==e.pixelTolerance?e.pixelTolerance:10,a.snappedToVertex_=!1,a.changingFeature_=!1,a.dragSegments_=[],a.overlay_=new g.Z({source:new y.Z({useSpatialIndex:!1,wrapX:!!e.wrapX}),style:e.style?e.style:(r=(0,x.Ly)(),function(t,e){return r[u.Z.POINT]}),updateWhileAnimating:!0,updateWhileInteracting:!0}),a.SEGMENT_WRITERS_={Point:a.writePointGeometry_.bind(a),LineString:a.writeLineStringGeometry_.bind(a),LinearRing:a.writeLineStringGeometry_.bind(a),Polygon:a.writePolygonGeometry_.bind(a),MultiPoint:a.writeMultiPointGeometry_.bind(a),MultiLineString:a.writeMultiLineStringGeometry_.bind(a),MultiPolygon:a.writeMultiPolygonGeometry_.bind(a),Circle:a.writeCircleGeometry_.bind(a),GeometryCollection:a.writeGeometryCollectionGeometry_.bind(a)},a.source_=null,a.hitDetection_=null,e.features?i=e.features:e.source&&(a.source_=e.source,i=new n.Z(a.source_.getFeatures()),a.source_.addEventListener(f.Z.ADDFEATURE,a.handleSourceAdd_.bind(a)),a.source_.addEventListener(f.Z.REMOVEFEATURE,a.handleSourceRemove_.bind(a))),!i)throw new Error("The modify interaction requires features, a source or a layer");return e.hitDetection&&(a.hitDetection_=e.hitDetection),a.features_=i,a.features_.forEach(a.addFeature_.bind(a)),a.features_.addEventListener(o.Z.ADD,a.handleFeatureAdd_.bind(a)),a.features_.addEventListener(o.Z.REMOVE,a.handleFeatureRemove_.bind(a)),a.lastPointerEvent_=null,a.delta_=[0,0],a.snapToPointer_=void 0===e.snapToPointer?!a.hitDetection_:e.snapToPointer,a}return S(e,t),e.prototype.addFeature_=function(t){var e=t.getGeometry();if(e){var r=this.SEGMENT_WRITERS_[e.getType()];r&&r(t,e)}var i=this.getMap();i&&i.isRendered()&&this.getActive()&&this.handlePointerAtPixel_(this.lastPixel_,i),t.addEventListener(s.Z.CHANGE,this.boundHandleFeatureChange_)},e.prototype.willModifyFeatures_=function(t,e){if(!this.featuresBeingModified_){this.featuresBeingModified_=new n.Z;for(var r=this.featuresBeingModified_.getArray(),i=0,o=e.length;i<o;++i)for(var a=e[i],s=0,l=a.length;s<l;++s){var u=a[s].feature;u&&-1===r.indexOf(u)&&this.featuresBeingModified_.push(u)}0===this.featuresBeingModified_.getLength()?this.featuresBeingModified_=null:this.dispatchEvent(new I("modifystart",this.featuresBeingModified_,t))}},e.prototype.removeFeature_=function(t){this.removeFeatureSegmentData_(t),this.vertexFeature_&&0===this.features_.getLength()&&(this.overlay_.getSource().removeFeature(this.vertexFeature_),this.vertexFeature_=null),t.removeEventListener(s.Z.CHANGE,this.boundHandleFeatureChange_)},e.prototype.removeFeatureSegmentData_=function(t){var e=this.rBush_,r=[];e.forEach((function(e){t===e.feature&&r.push(e)}));for(var i=r.length-1;i>=0;--i){for(var n=r[i],o=this.dragSegments_.length-1;o>=0;--o)this.dragSegments_[o][0]===n&&this.dragSegments_.splice(o,1);e.remove(n)}},e.prototype.setActive=function(e){this.vertexFeature_&&!e&&(this.overlay_.getSource().removeFeature(this.vertexFeature_),this.vertexFeature_=null),t.prototype.setActive.call(this,e)},e.prototype.setMap=function(e){this.overlay_.setMap(e),t.prototype.setMap.call(this,e)},e.prototype.getOverlay=function(){return this.overlay_},e.prototype.handleSourceAdd_=function(t){t.feature&&this.features_.push(t.feature)},e.prototype.handleSourceRemove_=function(t){t.feature&&this.features_.remove(t.feature)},e.prototype.handleFeatureAdd_=function(t){this.addFeature_(t.element)},e.prototype.handleFeatureChange_=function(t){if(!this.changingFeature_){var e=t.target;this.removeFeature_(e),this.addFeature_(e)}},e.prototype.handleFeatureRemove_=function(t){var e=t.element;this.removeFeature_(e)},e.prototype.writePointGeometry_=function(t,e){var r=e.getCoordinates(),i={feature:t,geometry:e,segment:[r,r]};this.rBush_.insert(e.getExtent(),i)},e.prototype.writeMultiPointGeometry_=function(t,e){for(var r=e.getCoordinates(),i=0,n=r.length;i<n;++i){var o=r[i],a={feature:t,geometry:e,depth:[i],index:i,segment:[o,o]};this.rBush_.insert(e.getExtent(),a)}},e.prototype.writeLineStringGeometry_=function(t,e){for(var r=e.getCoordinates(),i=0,n=r.length-1;i<n;++i){var o=r.slice(i,i+2),a={feature:t,geometry:e,index:i,segment:o};this.rBush_.insert((0,v.boundingExtent)(o),a)}},e.prototype.writeMultiLineStringGeometry_=function(t,e){for(var r=e.getCoordinates(),i=0,n=r.length;i<n;++i)for(var o=r[i],a=0,s=o.length-1;a<s;++a){var l=o.slice(a,a+2),u={feature:t,geometry:e,depth:[i],index:a,segment:l};this.rBush_.insert((0,v.boundingExtent)(l),u)}},e.prototype.writePolygonGeometry_=function(t,e){for(var r=e.getCoordinates(),i=0,n=r.length;i<n;++i)for(var o=r[i],a=0,s=o.length-1;a<s;++a){var l=o.slice(a,a+2),u={feature:t,geometry:e,depth:[i],index:a,segment:l};this.rBush_.insert((0,v.boundingExtent)(l),u)}},e.prototype.writeMultiPolygonGeometry_=function(t,e){for(var r=e.getCoordinates(),i=0,n=r.length;i<n;++i)for(var o=r[i],a=0,s=o.length;a<s;++a)for(var l=o[a],u=0,c=l.length-1;u<c;++u){var h=l.slice(u,u+2),p={feature:t,geometry:e,depth:[a,i],index:u,segment:h};this.rBush_.insert((0,v.boundingExtent)(h),p)}},e.prototype.writeCircleGeometry_=function(t,e){var r=e.getCenter(),i={feature:t,geometry:e,index:0,segment:[r,r]},n={feature:t,geometry:e,index:1,segment:[r,r]},o=[i,n];i.featureSegments=o,n.featureSegments=o,this.rBush_.insert((0,v.createOrUpdateFromCoordinate)(r),i);var a=e,s=(0,E.getUserProjection)();if(s&&this.getMap()){var l=this.getMap().getView().getProjection();a=a.clone().transform(s,l),a=(0,w.Bb)(a).transform(l,s)}this.rBush_.insert(a.getExtent(),n)},e.prototype.writeGeometryCollectionGeometry_=function(t,e){for(var r=e.getGeometriesArray(),i=0;i<r.length;++i){var n=r[i];(0,this.SEGMENT_WRITERS_[n.getType()])(t,n)}},e.prototype.createOrUpdateVertexFeature_=function(t,e,r){var i=this.vertexFeature_;return i?i.getGeometry().setCoordinates(t):(i=new l.default(new h.default(t)),this.vertexFeature_=i,this.overlay_.getSource().addFeature(i)),i.set("features",e),i.set("geometries",r),i},e.prototype.handleEvent=function(e){return!e.originalEvent||(this.lastPointerEvent_=e,e.map.getView().getInteracting()||e.type!=c.Z.POINTERMOVE||this.handlingDownUpSequence||this.handlePointerMove_(e),this.vertexFeature_&&this.deleteCondition_(e)&&(r=!(e.type!=c.Z.SINGLECLICK||!this.ignoreNextSingleClick_)||this.removePoint()),e.type==c.Z.SINGLECLICK&&(this.ignoreNextSingleClick_=!1),t.prototype.handleEvent.call(this,e)&&!r);var r},e.prototype.handleDragEvent=function(t){this.ignoreNextSingleClick_=!1,this.willModifyFeatures_(t,this.dragSegments_);for(var e=[t.coordinate[0]+this.delta_[0],t.coordinate[1]+this.delta_[1]],r=[],i=[],n=0,o=this.dragSegments_.length;n<o;++n){var a=this.dragSegments_[n],s=a[0],l=s.feature;-1===r.indexOf(l)&&r.push(l);var c=s.geometry;-1===i.indexOf(c)&&i.push(c);for(var h=s.depth,p=void 0,d=s.segment,f=a[1];e.length<c.getStride();)e.push(d[f][e.length]);switch(c.getType()){case u.Z.POINT:p=e,d[0]=e,d[1]=e;break;case u.Z.MULTI_POINT:(p=c.getCoordinates())[s.index]=e,d[0]=e,d[1]=e;break;case u.Z.LINE_STRING:(p=c.getCoordinates())[s.index+f]=e,d[f]=e;break;case u.Z.MULTI_LINE_STRING:case u.Z.POLYGON:(p=c.getCoordinates())[h[0]][s.index+f]=e,d[f]=e;break;case u.Z.MULTI_POLYGON:(p=c.getCoordinates())[h[1]][h[0]][s.index+f]=e,d[f]=e;break;case u.Z.CIRCLE:if(d[0]=e,d[1]=e,0===s.index)this.changingFeature_=!0,c.setCenter(e),this.changingFeature_=!1;else{this.changingFeature_=!0;var g=t.map.getView().getProjection(),y=(0,_.TE)((0,E.fromUserCoordinate)(c.getCenter(),g),(0,E.fromUserCoordinate)(e,g)),m=(0,E.getUserProjection)();if(m){var v=c.clone().transform(m,g);v.setRadius(y),y=v.transform(g,m).getRadius()}c.setRadius(y),this.changingFeature_=!1}}p&&this.setGeometryCoordinates_(c,p)}this.createOrUpdateVertexFeature_(e,r,i)},e.prototype.handleDownEvent=function(t){if(!this.condition_(t))return!1;var e=t.coordinate;this.handlePointerAtPixel_(t.pixel,t.map,e),this.dragSegments_.length=0,this.featuresBeingModified_=null;var r=this.vertexFeature_;if(r){var i=t.map.getView().getProjection(),n=[],o=r.getGeometry().getCoordinates(),a=(0,v.boundingExtent)([o]),s=this.rBush_.getInExtent(a),l={};s.sort(P);for(var c=0,h=s.length;c<h;++c){var p=s[c],d=p.segment,f=(0,T.sq)(p.geometry),g=p.depth;if(g&&(f+="-"+g.join("-")),l[f]||(l[f]=new Array(2)),p.geometry.getType()!==u.Z.CIRCLE||1!==p.index)if(!(0,_.fS)(d[0],o)||l[f][0])if(!(0,_.fS)(d[1],o)||l[f][1])(0,T.sq)(d)in this.vertexSegments_&&!l[f][0]&&!l[f][1]&&this.insertVertexCondition_(t)&&n.push(p);else{if((p.geometry.getType()===u.Z.LINE_STRING||p.geometry.getType()===u.Z.MULTI_LINE_STRING)&&l[f][0]&&0===l[f][0].index)continue;this.dragSegments_.push([p,1]),l[f][1]=p}else this.dragSegments_.push([p,0]),l[f][0]=p;else{var y=A(e,p,i);(0,_.fS)(y,o)&&!l[f][0]&&(this.dragSegments_.push([p,0]),l[f][0]=p)}}n.length&&this.willModifyFeatures_(t,[n]);for(var m=n.length-1;m>=0;--m)this.insertVertex_(n[m],o)}return!!this.vertexFeature_},e.prototype.handleUpEvent=function(t){for(var e=this.dragSegments_.length-1;e>=0;--e){var r=this.dragSegments_[e][0],i=r.geometry;if(i.getType()===u.Z.CIRCLE){var n=i.getCenter(),o=r.featureSegments[0],a=r.featureSegments[1];o.segment[0]=n,o.segment[1]=n,a.segment[0]=n,a.segment[1]=n,this.rBush_.update((0,v.createOrUpdateFromCoordinate)(n),o);var s=i,l=(0,E.getUserProjection)();if(l){var c=t.map.getView().getProjection();s=s.clone().transform(l,c),s=(0,w.Bb)(s).transform(c,l)}this.rBush_.update(s.getExtent(),a)}else this.rBush_.update((0,v.boundingExtent)(r.segment),r)}return this.featuresBeingModified_&&(this.dispatchEvent(new I(R,this.featuresBeingModified_,t)),this.featuresBeingModified_=null),!1},e.prototype.handlePointerMove_=function(t){this.lastPixel_=t.pixel,this.handlePointerAtPixel_(t.pixel,t.map,t.coordinate)},e.prototype.handlePointerAtPixel_=function(t,e,r){var i,n,o=this,a=r||e.getCoordinateFromPixel(t),s=e.getView().getProjection();if(this.hitDetection_){var l="object"==typeof this.hitDetection_?function(t){return t===o.hitDetection_}:void 0;e.forEachFeatureAtPixel(t,(function(t,e,r){if((r=r||t.getGeometry()).getType()===u.Z.POINT&&(0,b.q9)(o.features_.getArray(),t)){n=r;var a=r.getFlatCoordinates().slice(0,2);i=[{feature:t,geometry:r,segment:[a,a]}]}return!0}),{layerFilter:l})}if(!i){var c=(0,E.fromUserExtent)((0,v.createOrUpdateFromCoordinate)(a,C),s),h=e.getView().getResolution()*this.pixelTolerance_,p=(0,E.toUserExtent)((0,v.buffer)(c,h,C),s);i=this.rBush_.getInExtent(p)}if(i&&i.length>0){var d=i.sort((function(t,e){return L(a,t,s)-L(a,e,s)}))[0],f=d.segment,g=A(a,d,s),y=e.getPixelFromCoordinate(g),m=(0,_.TE)(t,y);if(n||m<=this.pixelTolerance_){var x={};if(x[(0,T.sq)(f)]=!0,this.snapToPointer_||(this.delta_[0]=g[0]-a[0],this.delta_[1]=g[1]-a[1]),d.geometry.getType()===u.Z.CIRCLE&&1===d.index)this.snappedToVertex_=!0,this.createOrUpdateVertexFeature_(g,[d.feature],[d.geometry]);else{var w=e.getPixelFromCoordinate(f[0]),S=e.getPixelFromCoordinate(f[1]),O=(0,_.bI)(y,w),R=(0,_.bI)(y,S);m=Math.sqrt(Math.min(O,R)),this.snappedToVertex_=m<=this.pixelTolerance_,this.snappedToVertex_&&(g=O>R?f[1]:f[0]),this.createOrUpdateVertexFeature_(g,[d.feature],[d.geometry]);var I={};I[(0,T.sq)(d.geometry)]=!0;for(var P=1,M=i.length;P<M;++P){var F=i[P].segment;if(!((0,_.fS)(f[0],F[0])&&(0,_.fS)(f[1],F[1])||(0,_.fS)(f[0],F[1])&&(0,_.fS)(f[1],F[0])))break;var Z=(0,T.sq)(i[P].geometry);Z in I||(I[Z]=!0,x[(0,T.sq)(F)]=!0)}}return void(this.vertexSegments_=x)}}this.vertexFeature_&&(this.overlay_.getSource().removeFeature(this.vertexFeature_),this.vertexFeature_=null)},e.prototype.insertVertex_=function(t,e){for(var r,i=t.segment,n=t.feature,o=t.geometry,a=t.depth,s=t.index;e.length<o.getStride();)e.push(0);switch(o.getType()){case u.Z.MULTI_LINE_STRING:case u.Z.POLYGON:(r=o.getCoordinates())[a[0]].splice(s+1,0,e);break;case u.Z.MULTI_POLYGON:(r=o.getCoordinates())[a[1]][a[0]].splice(s+1,0,e);break;case u.Z.LINE_STRING:(r=o.getCoordinates()).splice(s+1,0,e);break;default:return}this.setGeometryCoordinates_(o,r);var l=this.rBush_;l.remove(t),this.updateSegmentIndices_(o,s,a,1);var c={segment:[i[0],e],feature:n,geometry:o,depth:a,index:s};l.insert((0,v.boundingExtent)(c.segment),c),this.dragSegments_.push([c,1]);var h={segment:[e,i[1]],feature:n,geometry:o,depth:a,index:s+1};l.insert((0,v.boundingExtent)(h.segment),h),this.dragSegments_.push([h,0]),this.ignoreNextSingleClick_=!0},e.prototype.removePoint=function(){if(this.lastPointerEvent_&&this.lastPointerEvent_.type!=c.Z.POINTERDRAG){var t=this.lastPointerEvent_;this.willModifyFeatures_(t,this.dragSegments_);var e=this.removeVertex_();return this.featuresBeingModified_&&this.dispatchEvent(new I(R,this.featuresBeingModified_,t)),this.featuresBeingModified_=null,e}return!1},e.prototype.removeVertex_=function(){var t,e,r,i,n,o,a,s,l,c,h,p=this.dragSegments_,d={},f=!1;for(n=p.length-1;n>=0;--n)c=(r=p[n])[0],h=(0,T.sq)(c.feature),c.depth&&(h+="-"+c.depth.join("-")),h in d||(d[h]={}),0===r[1]?(d[h].right=c,d[h].index=c.index):1==r[1]&&(d[h].left=c,d[h].index=c.index+1);for(h in d){switch(l=d[h].right,a=d[h].left,(s=(o=d[h].index)-1)<0&&(s=0),t=e=(i=(c=void 0!==a?a:l).geometry).getCoordinates(),f=!1,i.getType()){case u.Z.MULTI_LINE_STRING:e[c.depth[0]].length>2&&(e[c.depth[0]].splice(o,1),f=!0);break;case u.Z.LINE_STRING:e.length>2&&(e.splice(o,1),f=!0);break;case u.Z.MULTI_POLYGON:t=t[c.depth[1]];case u.Z.POLYGON:(t=t[c.depth[0]]).length>4&&(o==t.length-1&&(o=0),t.splice(o,1),f=!0,0===o&&(t.pop(),t.push(t[0]),s=t.length-1))}if(f){this.setGeometryCoordinates_(i,e);var g=[];if(void 0!==a&&(this.rBush_.remove(a),g.push(a.segment[0])),void 0!==l&&(this.rBush_.remove(l),g.push(l.segment[1])),void 0!==a&&void 0!==l){var y={depth:c.depth,feature:c.feature,geometry:c.geometry,index:s,segment:g};this.rBush_.insert((0,v.boundingExtent)(y.segment),y)}this.updateSegmentIndices_(i,o,c.depth,-1),this.vertexFeature_&&(this.overlay_.getSource().removeFeature(this.vertexFeature_),this.vertexFeature_=null),p.length=0}}return f},e.prototype.setGeometryCoordinates_=function(t,e){this.changingFeature_=!0,t.setCoordinates(e),this.changingFeature_=!1},e.prototype.updateSegmentIndices_=function(t,e,r,i){this.rBush_.forEachInExtent(t.getExtent(),(function(n){n.geometry===t&&(void 0===r||void 0===n.depth||(0,b.fS)(n.depth,r))&&n.index>e&&(n.index+=i)}))},e}(p.Z)},686:(t,e,r)=>{"use strict";r.d(e,{Z:()=>h});var i,n=r(5487),o=r(7182),a=r(177),s=r(8683),l=r(3983),u=(i=function(t,e){return i=Object.setPrototypeOf||{__proto__:[]}instanceof Array&&function(t,e){t.__proto__=e}||function(t,e){for(var r in e)Object.prototype.hasOwnProperty.call(e,r)&&(t[r]=e[r])},i(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 r(){this.constructor=t}i(t,e),t.prototype=null===e?Object.create(e):(r.prototype=e.prototype,new r)}),c="trackpad";const h=function(t){function e(e){var r=this,i=e||{};(r=t.call(this,i)||this).totalDelta_=0,r.lastDelta_=0,r.maxDelta_=void 0!==i.maxDelta?i.maxDelta:1,r.duration_=void 0!==i.duration?i.duration:250,r.timeout_=void 0!==i.timeout?i.timeout:80,r.useAnchor_=void 0===i.useAnchor||i.useAnchor,r.constrainResolution_=void 0!==i.constrainResolution&&i.constrainResolution;var n=i.condition?i.condition:s.Bx;return r.condition_=i.onFocusOnly?(0,s.$6)(s.yZ,n):n,r.lastAnchor_=null,r.startTime_=void 0,r.timeoutId_,r.mode_=void 0,r.trackpadEventGap_=400,r.trackpadTimeoutId_,r.deltaPerZoom_=300,r}return u(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!==n.Z.WHEEL)return!0;var e,r=t.map,i=t.originalEvent;if(i.preventDefault(),this.useAnchor_&&(this.lastAnchor_=t.coordinate),t.type==n.Z.WHEEL&&(e=i.deltaY,a.V&&i.deltaMode===WheelEvent.DOM_DELTA_PIXEL&&(e/=a.MP),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?c:"wheel");var s=r.getView();if(this.mode_===c&&!s.getConstrainResolution()&&!this.constrainResolution_)return this.trackpadTimeoutId_?clearTimeout(this.trackpadTimeoutId_):(s.getAnimating()&&s.cancelAnimations(),s.beginInteraction()),this.trackpadTimeoutId_=setTimeout(this.endInteraction_.bind(this),this.timeout_),s.adjustZoom(-e/this.deltaPerZoom_,this.lastAnchor_),this.startTime_=o,!1;this.totalDelta_+=e;var l=Math.max(this.timeout_-(o-this.startTime_),0);return clearTimeout(this.timeoutId_),this.timeoutId_=setTimeout(this.handleWheelZoom_.bind(this,r),l),!1},e.prototype.handleWheelZoom_=function(t){var e=t.getView();e.getAnimating()&&e.cancelAnimations();var r=-(0,l.uZ)(this.totalDelta_,-this.maxDelta_*this.deltaPerZoom_,this.maxDelta_*this.deltaPerZoom_)/this.deltaPerZoom_;(e.getConstrainResolution()||this.constrainResolution_)&&(r=r?r>0?1:-1:0),(0,o.FW)(e,r,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}(o.ZP)},3205:(t,e,r)=>{"use strict";r.d(e,{Z:()=>l});var i,n=r(4515),o=r(6885),a=r(828),s=(i=function(t,e){return i=Object.setPrototypeOf||{__proto__:[]}instanceof Array&&function(t,e){t.__proto__=e}||function(t,e){for(var r in e)Object.prototype.hasOwnProperty.call(e,r)&&(t[r]=e[r])},i(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 r(){this.constructor=t}i(t,e),t.prototype=null===e?Object.create(e):(r.prototype=e.prototype,new r)});const l=function(t){function e(e){var r=this,i=e||{},n=i;return n.stopDown||(n.stopDown=o.Dv),(r=t.call(this,n)||this).anchor_=null,r.lastAngle_=void 0,r.rotating_=!1,r.rotationDelta_=0,r.threshold_=void 0!==i.threshold?i.threshold:.3,r.duration_=void 0!==i.duration?i.duration:250,r}return s(e,t),e.prototype.handleDragEvent=function(t){var e=0,r=this.targetPointers[0],i=this.targetPointers[1],o=Math.atan2(i.clientY-r.clientY,i.clientX-r.clientX);if(void 0!==this.lastAngle_){var s=o-this.lastAngle_;this.rotationDelta_+=s,!this.rotating_&&Math.abs(this.rotationDelta_)>this.threshold_&&(this.rotating_=!0),e=s}this.lastAngle_=o;var l=t.map,u=l.getView();if(u.getConstraints().rotation!==a.h$){var c=l.getViewport().getBoundingClientRect(),h=(0,n.S)(this.targetPointers);h[0]-=c.left,h[1]-=c.top,this.anchor_=l.getCoordinateFromPixelInternal(h),this.rotating_&&(l.render(),u.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}(n.Z)},4474:(t,e,r)=>{"use strict";r.d(e,{Z:()=>s});var i,n=r(4515),o=r(6885),a=(i=function(t,e){return i=Object.setPrototypeOf||{__proto__:[]}instanceof Array&&function(t,e){t.__proto__=e}||function(t,e){for(var r in e)Object.prototype.hasOwnProperty.call(e,r)&&(t[r]=e[r])},i(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 r(){this.constructor=t}i(t,e),t.prototype=null===e?Object.create(e):(r.prototype=e.prototype,new r)});const s=function(t){function e(e){var r=this,i=e||{},n=i;return n.stopDown||(n.stopDown=o.Dv),(r=t.call(this,n)||this).anchor_=null,r.duration_=void 0!==i.duration?i.duration:400,r.lastDistance_=void 0,r.lastScaleDelta_=1,r}return a(e,t),e.prototype.handleDragEvent=function(t){var e=1,r=this.targetPointers[0],i=this.targetPointers[1],o=r.clientX-i.clientX,a=r.clientY-i.clientY,s=Math.sqrt(o*o+a*a);void 0!==this.lastDistance_&&(e=this.lastDistance_/s),this.lastDistance_=s;var l=t.map,u=l.getView();1!=e&&(this.lastScaleDelta_=e);var c=l.getViewport().getBoundingClientRect(),h=(0,n.S)(this.targetPointers);h[0]-=c.left,h[1]-=c.top,this.anchor_=l.getCoordinateFromPixelInternal(h),l.render(),u.adjustResolutionInternal(e,this.anchor_)},e.prototype.handleUpEvent=function(t){if(this.targetPointers.length<2){var e=t.map.getView(),r=this.lastScaleDelta_>1?1:-1;return e.endInteraction(this.duration_,r),!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}(n.Z)},4515:(t,e,r)=>{"use strict";r.d(e,{S:()=>l,Z:()=>u});var i,n=r(7182),o=r(2217),a=r(9374),s=(i=function(t,e){return i=Object.setPrototypeOf||{__proto__:[]}instanceof Array&&function(t,e){t.__proto__=e}||function(t,e){for(var r in e)Object.prototype.hasOwnProperty.call(e,r)&&(t[r]=e[r])},i(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 r(){this.constructor=t}i(t,e),t.prototype=null===e?Object.create(e):(r.prototype=e.prototype,new r)});function l(t){for(var e=t.length,r=0,i=0,n=0;n<e;n++)r+=t[n].clientX,i+=t[n].clientY;return[r/e,i/e]}const u=function(t){function e(e){var r=this,i=e||{};return r=t.call(this,i)||this,i.handleDownEvent&&(r.handleDownEvent=i.handleDownEvent),i.handleDragEvent&&(r.handleDragEvent=i.handleDragEvent),i.handleMoveEvent&&(r.handleMoveEvent=i.handleMoveEvent),i.handleUpEvent&&(r.handleUpEvent=i.handleUpEvent),i.stopDown&&(r.stopDown=i.stopDown),r.handlingDownUpSequence=!1,r.trackedPointers_={},r.targetPointers=[],r}return s(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==o.Z.POINTERDRAG)this.handleDragEvent(t),t.originalEvent.preventDefault();else if(t.type==o.Z.POINTERUP){var r=this.handleUpEvent(t);this.handlingDownUpSequence=r&&this.targetPointers.length>0}}else if(t.type==o.Z.POINTERDOWN){var i=this.handleDownEvent(t);this.handlingDownUpSequence=i,e=this.stopDown(i)}else t.type==o.Z.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===o.Z.POINTERDOWN||e===o.Z.POINTERDRAG||e===o.Z.POINTERUP}(t)){var e=t.originalEvent,r=e.pointerId.toString();t.type==o.Z.POINTERUP?delete this.trackedPointers_[r]:(t.type==o.Z.POINTERDOWN||r in this.trackedPointers_)&&(this.trackedPointers_[r]=e),this.targetPointers=(0,a.KX)(this.trackedPointers_)}},e}(n.ZP)},4049:(t,e,r)=>{"use strict";r.d(e,{Z:()=>i});const i={ACTIVE:"active"}},7517:(t,e,r)=>{"use strict";r.d(e,{Z:()=>_});var i,n=r(8714),o=r(2071),a=r(291),s=r(4754),l=r(7182),u=r(2371),c=r(6885),h=r(9374),p=r(7539),d=r(5537),f=r(4187),g=r(8683),y=(i=function(t,e){return i=Object.setPrototypeOf||{__proto__:[]}instanceof Array&&function(t,e){t.__proto__=e}||function(t,e){for(var r in e)Object.prototype.hasOwnProperty.call(e,r)&&(t[r]=e[r])},i(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 r(){this.constructor=t}i(t,e),t.prototype=null===e?Object.create(e):(r.prototype=e.prototype,new r)}),m=function(t){function e(e,r,i,n){var o=t.call(this,e)||this;return o.selected=r,o.deselected=i,o.mapBrowserEvent=n,o}return y(e,t),e}(a.ZP),v={};const _=function(t){function e(e){var r=t.call(this)||this;r.on,r.once,r.un;var i,o,a=e||{};if(r.boundAddFeature_=r.addFeature_.bind(r),r.boundRemoveFeature_=r.removeFeature_.bind(r),r.condition_=a.condition?a.condition:g.Kf,r.addCondition_=a.addCondition?a.addCondition:g.Fi,r.removeCondition_=a.removeCondition?a.removeCondition:g.Fi,r.toggleCondition_=a.toggleCondition?a.toggleCondition:g.vY,r.multi_=!!a.multi&&a.multi,r.filter_=a.filter?a.filter:c.uX,r.hitTolerance_=a.hitTolerance?a.hitTolerance:0,r.style_=void 0!==a.style?a.style:(i=(0,p.Ly)(),(0,d.l7)(i[s.Z.POLYGON],i[s.Z.LINE_STRING]),(0,d.l7)(i[s.Z.GEOMETRY_COLLECTION],i[s.Z.LINE_STRING]),function(t){return t.getGeometry()?i[t.getGeometry().getType()]:null}),r.features_=a.features||new n.Z,a.layers)if("function"==typeof a.layers)o=a.layers;else{var l=a.layers;o=function(t){return(0,d.q9)(l,t)}}else o=c.uX;return r.layerFilter_=o,r.featureLayerAssociation_={},r}return y(e,t),e.prototype.addFeatureLayerAssociation_=function(t,e){this.featureLayerAssociation_[(0,f.sq)(t)]=e},e.prototype.getFeatures=function(){return this.features_},e.prototype.getHitTolerance=function(){return this.hitTolerance_},e.prototype.getLayer=function(t){return this.featureLayerAssociation_[(0,f.sq)(t)]},e.prototype.setHitTolerance=function(t){this.hitTolerance_=t},e.prototype.setMap=function(e){this.getMap()&&this.style_&&this.features_.forEach(this.restorePreviousStyle_.bind(this)),t.prototype.setMap.call(this,e),e?(this.features_.addEventListener(o.Z.ADD,this.boundAddFeature_),this.features_.addEventListener(o.Z.REMOVE,this.boundRemoveFeature_),this.style_&&this.features_.forEach(this.applySelectedStyle_.bind(this))):(this.features_.removeEventListener(o.Z.ADD,this.boundAddFeature_),this.features_.removeEventListener(o.Z.REMOVE,this.boundRemoveFeature_))},e.prototype.addFeature_=function(t){var e=t.element;if(this.style_&&this.applySelectedStyle_(e),!this.getLayer(e)){var r=this.getMap().getAllLayers().find((function(t){if(t instanceof u.Z&&t.getSource()&&t.getSource().hasFeature(e))return t}));r&&this.addFeatureLayerAssociation_(e,r)}},e.prototype.removeFeature_=function(t){var e=t.element;this.style_&&this.restorePreviousStyle_(e)},e.prototype.getStyle=function(){return this.style_},e.prototype.applySelectedStyle_=function(t){var e=(0,f.sq)(t);e in v||(v[e]=t.getStyle()),t.setStyle(this.style_)},e.prototype.restorePreviousStyle_=function(t){for(var r=this.getMap().getInteractions().getArray(),i=r.length-1;i>=0;--i){var n=r[i];if(n!==this&&n instanceof e&&n.getStyle()&&-1!==n.getFeatures().getArray().lastIndexOf(t))return void t.setStyle(n.getStyle())}var o=(0,f.sq)(t);t.setStyle(v[o]),delete v[o]},e.prototype.removeFeatureLayerAssociation_=function(t){delete this.featureLayerAssociation_[(0,f.sq)(t)]},e.prototype.handleEvent=function(t){if(!this.condition_(t))return!0;var e=this.addCondition_(t),r=this.removeCondition_(t),i=this.toggleCondition_(t),n=!e&&!r&&!i,o=t.map,a=this.getFeatures(),s=[],l=[];if(n){(0,h.ZH)(this.featureLayerAssociation_),o.forEachFeatureAtPixel(t.pixel,function(t,e){if(this.filter_(t,e))return this.addFeatureLayerAssociation_(t,e),l.push(t),!this.multi_}.bind(this),{layerFilter:this.layerFilter_,hitTolerance:this.hitTolerance_});for(var u=a.getLength()-1;u>=0;--u){var c=a.item(u),p=l.indexOf(c);p>-1?l.splice(p,1):(a.remove(c),s.push(c))}0!==l.length&&a.extend(l)}else{o.forEachFeatureAtPixel(t.pixel,function(t,n){if(this.filter_(t,n))return!e&&!i||(0,d.q9)(a.getArray(),t)?(r||i)&&(0,d.q9)(a.getArray(),t)&&(s.push(t),this.removeFeatureLayerAssociation_(t)):(this.addFeatureLayerAssociation_(t,n),l.push(t)),!this.multi_}.bind(this),{layerFilter:this.layerFilter_,hitTolerance:this.hitTolerance_});for(var f=s.length-1;f>=0;--f)a.remove(s[f]);a.extend(l)}return(l.length>0||s.length>0)&&this.dispatchEvent(new m("select",l,s,t)),!0},e}(l.ZP)},6002:(t,e,r)=>{"use strict";r.d(e,{Z:()=>b});var i,n=r(2071),o=r(5487),a=r(4754),s=r(4515),l=r(9781),u=r(2796),c=r(6885),h=r(8641),p=r(1900),d=r(2033),f=r(6121),g=r(4187),y=r(9374),m=r(5818),v=(i=function(t,e){return i=Object.setPrototypeOf||{__proto__:[]}instanceof Array&&function(t,e){t.__proto__=e}||function(t,e){for(var r in e)Object.prototype.hasOwnProperty.call(e,r)&&(t[r]=e[r])},i(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 r(){this.constructor=t}i(t,e),t.prototype=null===e?Object.create(e):(r.prototype=e.prototype,new r)});function _(t){return t.feature?t.feature:t.element?t.element:void 0}var x=[];const b=function(t){function e(e){var r=this,i=e||{},n=i;return n.handleDownEvent||(n.handleDownEvent=c.uX),n.stopDown||(n.stopDown=c.Dv),(r=t.call(this,n)||this).source_=i.source?i.source:null,r.vertex_=void 0===i.vertex||i.vertex,r.edge_=void 0===i.edge||i.edge,r.features_=i.features?i.features:null,r.featuresListenerKeys_=[],r.featureChangeListenerKeys_={},r.indexedFeaturesExtents_={},r.pendingFeatures_={},r.pixelTolerance_=void 0!==i.pixelTolerance?i.pixelTolerance:10,r.rBush_=new l.Z,r.GEOMETRY_SEGMENTERS_={Point:r.segmentPointGemetry_.bind(r),LineString:r.segmentLineStringGemetry_.bind(r),LinearRing:r.segmentLineStringGemetry_.bind(r),Polygon:r.segmentPolygonGemetry_.bind(r),MultiPoint:r.segmentMultiPointGemetry_.bind(r),MultiLineString:r.segmentMultiLineStringGemetry_.bind(r),MultiPolygon:r.segmentMultiPolygonGemetry_.bind(r),GeometryCollection:r.segmentGeometryCollectionGemetry_.bind(r),Circle:r.segmentCircleGemetry_.bind(r)},r}return v(e,t),e.prototype.addFeature=function(t,e){var r=void 0===e||e,i=(0,g.sq)(t),n=t.getGeometry();if(n){var a=this.GEOMETRY_SEGMENTERS_[n.getType()];if(a){this.indexedFeaturesExtents_[i]=n.getExtent((0,h.createEmpty)());var s=[];if(a(s,n),1===s.length)this.rBush_.insert((0,h.boundingExtent)(s[0]),{feature:t,segment:s[0]});else if(s.length>1){var l=s.map((function(t){return(0,h.boundingExtent)(t)})),u=s.map((function(e){return{feature:t,segment:e}}));this.rBush_.load(l,u)}}}r&&(this.featureChangeListenerKeys_[i]=(0,m.oL)(t,o.Z.CHANGE,this.handleFeatureChange_,this))},e.prototype.forEachFeatureAdd_=function(t){this.addFeature(t)},e.prototype.forEachFeatureRemove_=function(t){this.removeFeature(t)},e.prototype.getFeatures_=function(){var t;return this.features_?t=this.features_:this.source_&&(t=this.source_.getFeatures()),t},e.prototype.handleEvent=function(e){var r=this.snapTo(e.pixel,e.coordinate,e.map);return r&&(e.coordinate=r.vertex.slice(0,2),e.pixel=r.vertexPixel),t.prototype.handleEvent.call(this,e)},e.prototype.handleFeatureAdd_=function(t){var e=_(t);this.addFeature(e)},e.prototype.handleFeatureRemove_=function(t){var e=_(t);this.removeFeature(e)},e.prototype.handleFeatureChange_=function(t){var e=t.target;if(this.handlingDownUpSequence){var r=(0,g.sq)(e);r in this.pendingFeatures_||(this.pendingFeatures_[r]=e)}else this.updateFeature_(e)},e.prototype.handleUpEvent=function(t){var e=(0,y.KX)(this.pendingFeatures_);return e.length&&(e.forEach(this.updateFeature_.bind(this)),this.pendingFeatures_={}),!1},e.prototype.removeFeature=function(t,e){var r=void 0===e||e,i=(0,g.sq)(t),n=this.indexedFeaturesExtents_[i];if(n){var o=this.rBush_,a=[];o.forEachInExtent(n,(function(e){t===e.feature&&a.push(e)}));for(var s=a.length-1;s>=0;--s)o.remove(a[s])}r&&((0,m.bN)(this.featureChangeListenerKeys_[i]),delete this.featureChangeListenerKeys_[i])},e.prototype.setMap=function(e){var r=this.getMap(),i=this.featuresListenerKeys_,o=this.getFeatures_();r&&(i.forEach(m.bN),i.length=0,o.forEach(this.forEachFeatureRemove_.bind(this))),t.prototype.setMap.call(this,e),e&&(this.features_?i.push((0,m.oL)(this.features_,n.Z.ADD,this.handleFeatureAdd_,this),(0,m.oL)(this.features_,n.Z.REMOVE,this.handleFeatureRemove_,this)):this.source_&&i.push((0,m.oL)(this.source_,u.Z.ADDFEATURE,this.handleFeatureAdd_,this),(0,m.oL)(this.source_,u.Z.REMOVEFEATURE,this.handleFeatureRemove_,this)),o.forEach(this.forEachFeatureAdd_.bind(this)))},e.prototype.snapTo=function(t,e,r){var i=r.getCoordinateFromPixel([t[0]-this.pixelTolerance_,t[1]+this.pixelTolerance_]),n=r.getCoordinateFromPixel([t[0]+this.pixelTolerance_,t[1]-this.pixelTolerance_]),o=(0,h.boundingExtent)([i,n]),s=this.rBush_.getInExtent(o),l=s.length;if(0===l)return null;var u,c=r.getView().getProjection(),d=(0,f.fromUserCoordinate)(e,c),g=1/0,y=this.pixelTolerance_*this.pixelTolerance_,m=function(){if(u){var e=r.getPixelFromCoordinate(u);if((0,p.bI)(t,e)<=y)return{vertex:u,vertexPixel:[Math.round(e[0]),Math.round(e[1])]}}return null};if(this.vertex_){for(var v=0;v<l;++v)(_=s[v]).feature.getGeometry().getType()!==a.Z.CIRCLE&&_.segment.forEach((function(t){var e=(0,f.fromUserCoordinate)(t,c),r=(0,p.bI)(d,e);r<g&&(u=t,g=r)}));if(R=m())return R}if(this.edge_){for(v=0;v<l;++v){var _,b=null;if((_=s[v]).feature.getGeometry().getType()===a.Z.CIRCLE){var w=_.feature.getGeometry(),E=(0,f.getUserProjection)();E&&(w=w.clone().transform(E,c)),b=(0,f.toUserCoordinate)((0,p.Ed)(d,w),c)}else{var T=_.segment,S=T[0],C=T[1];C&&(x[0]=(0,f.fromUserCoordinate)(S,c),x[1]=(0,f.fromUserCoordinate)(C,c),b=(0,p.oL)(d,x))}if(b){var O=(0,p.bI)(d,b);O<g&&(u=b,g=O)}}var R;if(R=m())return R}return null},e.prototype.updateFeature_=function(t){this.removeFeature(t,!1),this.addFeature(t,!1)},e.prototype.segmentCircleGemetry_=function(t,e){var r=this.getMap().getView().getProjection(),i=e,n=(0,f.getUserProjection)();n&&(i=i.clone().transform(n,r));var o=(0,d.Bb)(i);n&&o.transform(r,n);for(var a=o.getCoordinates()[0],s=0,l=a.length-1;s<l;++s)t.push(a.slice(s,s+2))},e.prototype.segmentGeometryCollectionGemetry_=function(t,e){for(var r=e.getGeometriesArray(),i=0;i<r.length;++i){var n=this.GEOMETRY_SEGMENTERS_[r[i].getType()];n&&n(t,r[i])}},e.prototype.segmentLineStringGemetry_=function(t,e){for(var r=e.getCoordinates(),i=0,n=r.length-1;i<n;++i)t.push(r.slice(i,i+2))},e.prototype.segmentMultiLineStringGemetry_=function(t,e){for(var r=e.getCoordinates(),i=0,n=r.length;i<n;++i)for(var o=r[i],a=0,s=o.length-1;a<s;++a)t.push(o.slice(a,a+2))},e.prototype.segmentMultiPointGemetry_=function(t,e){e.getCoordinates().forEach((function(e){t.push([e])}))},e.prototype.segmentMultiPolygonGemetry_=function(t,e){for(var r=e.getCoordinates(),i=0,n=r.length;i<n;++i)for(var o=r[i],a=0,s=o.length;a<s;++a)for(var l=o[a],u=0,c=l.length-1;u<c;++u)t.push(l.slice(u,u+2))},e.prototype.segmentPointGemetry_=function(t,e){t.push([e.getCoordinates()])},e.prototype.segmentPolygonGemetry_=function(t,e){for(var r=e.getCoordinates(),i=0,n=r.length;i<n;++i)for(var o=r[i],a=0,s=o.length-1;a<s;++a)t.push(o.slice(a,a+2))},e}(s.Z)},3232:(t,e,r)=>{"use strict";r.d(e,{Z:()=>d});var i,n=r(8714),o=r(291),a=r(4049),s=r(4515),l=r(6885),u=r(8683),c=r(5537),h=(i=function(t,e){return i=Object.setPrototypeOf||{__proto__:[]}instanceof Array&&function(t,e){t.__proto__=e}||function(t,e){for(var r in e)Object.prototype.hasOwnProperty.call(e,r)&&(t[r]=e[r])},i(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 r(){this.constructor=t}i(t,e),t.prototype=null===e?Object.create(e):(r.prototype=e.prototype,new r)}),p=function(t){function e(e,r,i,n,o){var a=t.call(this,e)||this;return a.features=r,a.coordinate=i,a.startCoordinate=n,a.mapBrowserEvent=o,a}return h(e,t),e}(o.ZP);const d=function(t){function e(e){var r,i=this,n=e||{};if((i=t.call(this,n)||this).on,i.once,i.un,i.lastCoordinate_=null,i.startCoordinate_=null,i.features_=void 0!==n.features?n.features:null,n.layers&&!i.features_)if("function"==typeof n.layers)r=n.layers;else{var o=n.layers;r=function(t){return(0,c.q9)(o,t)}}else r=l.uX;return i.layerFilter_=r,i.filter_=n.filter&&!i.features_?n.filter:l.uX,i.hitTolerance_=n.hitTolerance?n.hitTolerance:0,i.condition_=n.condition?n.condition:u.Bx,i.lastFeature_=null,i.addChangeListener(a.Z.ACTIVE,i.handleActiveChanged_),i}return h(e,t),e.prototype.handleDownEvent=function(t){if(!t.originalEvent||!this.condition_(t))return!1;if(this.lastFeature_=this.featuresAtPixel_(t.pixel,t.map),!this.lastCoordinate_&&this.lastFeature_){this.startCoordinate_=t.coordinate,this.lastCoordinate_=t.coordinate,this.handleMoveEvent(t);var e=this.features_||new n.Z([this.lastFeature_]);return this.dispatchEvent(new p("translatestart",e,t.coordinate,this.startCoordinate_,t)),!0}return!1},e.prototype.handleUpEvent=function(t){if(this.lastCoordinate_){this.lastCoordinate_=null,this.handleMoveEvent(t);var e=this.features_||new n.Z([this.lastFeature_]);return this.dispatchEvent(new p("translateend",e,t.coordinate,this.startCoordinate_,t)),this.startCoordinate_=null,!0}return!1},e.prototype.handleDragEvent=function(t){if(this.lastCoordinate_){var e=t.coordinate,r=e[0]-this.lastCoordinate_[0],i=e[1]-this.lastCoordinate_[1],o=this.features_||new n.Z([this.lastFeature_]);o.forEach((function(t){var e=t.getGeometry();e.translate(r,i),t.setGeometry(e)})),this.lastCoordinate_=e,this.dispatchEvent(new p("translating",o,e,this.startCoordinate_,t))}},e.prototype.handleMoveEvent=function(t){var e=t.map.getViewport();this.featuresAtPixel_(t.pixel,t.map)?(e.classList.remove(this.lastCoordinate_?"ol-grab":"ol-grabbing"),e.classList.add(this.lastCoordinate_?"ol-grabbing":"ol-grab")):e.classList.remove("ol-grab","ol-grabbing")},e.prototype.featuresAtPixel_=function(t,e){return e.forEachFeatureAtPixel(t,function(t,e){if(this.filter_(t,e)&&(!this.features_||(0,c.q9)(this.features_.getArray(),t)))return t}.bind(this),{layerFilter:this.layerFilter_,hitTolerance:this.hitTolerance_})},e.prototype.getHitTolerance=function(){return this.hitTolerance_},e.prototype.setHitTolerance=function(t){this.hitTolerance_=t},e.prototype.setMap=function(e){var r=this.getMap();t.prototype.setMap.call(this,e),this.updateState_(r)},e.prototype.handleActiveChanged_=function(){this.updateState_(null)},e.prototype.updateState_=function(t){var e=this.getMap(),r=this.getActive();e&&r||(e=e||t)&&e.getViewport().classList.remove("ol-grab","ol-grabbing")},e}(s.Z)},9461:(t,e,r)=>{"use strict";r.r(e),r.d(e,{Graticule:()=>i.Z,Group:()=>n.Z,Heatmap:()=>ut,Image:()=>ct.Z,Layer:()=>ht.Z,MapboxVector:()=>ko,Tile:()=>jo.Z,Vector:()=>xe.Z,VectorImage:()=>Wo,VectorTile:()=>se,WebGLPoints:()=>rs,WebGLTile:()=>ss});var i=r(8599),n=r(8734),o=r(2563),a=r(4754),s=r(2796),l=r(7755),u=r(177),c=r(9374),h=34962,p=34963,d=35044,f=35048,g=["experimental-webgl","webgl","webkit-3d","moz-webgl"];function y(t,e){for(var r=(0,c.f0)({preserveDrawingBuffer:!0,antialias:!u.ME},e),i=g.length,n=0;n<i;++n)try{var o=t.getContext(g[n],r);if(o)return o}catch(t){}return null}var m=r(9515),v=function(){function t(t,e){this.array=null,this.type=t,(0,m.h)(t===h||t===p,62),this.usage=void 0!==e?e:35044}return t.prototype.ofSize=function(t){this.array=new(_(this.type))(t)},t.prototype.fromArray=function(t){var e=_(this.type);this.array=e.from?e.from(t):new e(t)},t.prototype.fromArrayBuffer=function(t){this.array=new(_(this.type))(t)},t.prototype.getType=function(){return this.type},t.prototype.getArray=function(){return this.array},t.prototype.getUsage=function(){return this.usage},t.prototype.getSize=function(){return this.array?this.array.length:0},t}();function _(t){switch(t){case h:return Float32Array;case p:return Uint32Array;default:return Float32Array}}const x=v;var b=r(1912),w=r(115),E=r(7380),T=r(8771);const S="webglcontextlost",C="webglcontextrestored";var O=r(5431),R=r(4187),I=function(){function t(t){this.gl_=t.webGlContext;var e=this.gl_;this.scaleRatio_=t.scaleRatio||1,this.renderTargetTexture_=e.createTexture(),this.renderTargetTextureSize_=null,this.frameBuffer_=e.createFramebuffer();var r=e.createShader(e.VERTEX_SHADER);e.shaderSource(r,t.vertexShader||"\n  precision mediump float;\n  \n  attribute vec2 a_position;\n  varying vec2 v_texCoord;\n  varying vec2 v_screenCoord;\n  \n  uniform vec2 u_screenSize;\n   \n  void main() {\n    v_texCoord = a_position * 0.5 + 0.5;\n    v_screenCoord = v_texCoord * u_screenSize;\n    gl_Position = vec4(a_position, 0.0, 1.0);\n  }\n"),e.compileShader(r);var i=e.createShader(e.FRAGMENT_SHADER);e.shaderSource(i,t.fragmentShader||"\n  precision mediump float;\n   \n  uniform sampler2D u_image;\n  uniform float u_opacity;\n   \n  varying vec2 v_texCoord;\n   \n  void main() {\n    gl_FragColor = texture2D(u_image, v_texCoord) * u_opacity;\n  }\n"),e.compileShader(i),this.renderTargetProgram_=e.createProgram(),e.attachShader(this.renderTargetProgram_,r),e.attachShader(this.renderTargetProgram_,i),e.linkProgram(this.renderTargetProgram_),this.renderTargetVerticesBuffer_=e.createBuffer(),e.bindBuffer(e.ARRAY_BUFFER,this.renderTargetVerticesBuffer_),e.bufferData(e.ARRAY_BUFFER,new Float32Array([-1,-1,1,-1,-1,1,1,-1,1,1,-1,1]),e.STATIC_DRAW),this.renderTargetAttribLocation_=e.getAttribLocation(this.renderTargetProgram_,"a_position"),this.renderTargetUniformLocation_=e.getUniformLocation(this.renderTargetProgram_,"u_screenSize"),this.renderTargetOpacityLocation_=e.getUniformLocation(this.renderTargetProgram_,"u_opacity"),this.renderTargetTextureLocation_=e.getUniformLocation(this.renderTargetProgram_,"u_image"),this.uniforms_=[],t.uniforms&&Object.keys(t.uniforms).forEach(function(r){this.uniforms_.push({value:t.uniforms[r],location:e.getUniformLocation(this.renderTargetProgram_,r)})}.bind(this))}return t.prototype.getGL=function(){return this.gl_},t.prototype.init=function(t){var e=this.getGL(),r=[e.drawingBufferWidth*this.scaleRatio_,e.drawingBufferHeight*this.scaleRatio_];if(e.bindFramebuffer(e.FRAMEBUFFER,this.getFrameBuffer()),e.viewport(0,0,r[0],r[1]),!this.renderTargetTextureSize_||this.renderTargetTextureSize_[0]!==r[0]||this.renderTargetTextureSize_[1]!==r[1]){this.renderTargetTextureSize_=r;var i=e.RGBA,n=e.RGBA,o=e.UNSIGNED_BYTE;e.bindTexture(e.TEXTURE_2D,this.renderTargetTexture_),e.texImage2D(e.TEXTURE_2D,0,i,r[0],r[1],0,n,o,null),e.texParameteri(e.TEXTURE_2D,e.TEXTURE_MIN_FILTER,e.LINEAR),e.texParameteri(e.TEXTURE_2D,e.TEXTURE_WRAP_S,e.CLAMP_TO_EDGE),e.texParameteri(e.TEXTURE_2D,e.TEXTURE_WRAP_T,e.CLAMP_TO_EDGE),e.framebufferTexture2D(e.FRAMEBUFFER,e.COLOR_ATTACHMENT0,e.TEXTURE_2D,this.renderTargetTexture_,0)}},t.prototype.apply=function(t,e,r,i){var n=this.getGL(),o=t.size;if(n.bindFramebuffer(n.FRAMEBUFFER,e?e.getFrameBuffer():null),n.activeTexture(n.TEXTURE0),n.bindTexture(n.TEXTURE_2D,this.renderTargetTexture_),!e){var a=(0,R.sq)(n.canvas);if(!t.renderTargets[a]){var s=n.getContextAttributes();s&&s.preserveDrawingBuffer&&(n.clearColor(0,0,0,0),n.clear(n.COLOR_BUFFER_BIT)),t.renderTargets[a]=!0}}n.enable(n.BLEND),n.blendFunc(n.ONE,n.ONE_MINUS_SRC_ALPHA),n.viewport(0,0,n.drawingBufferWidth,n.drawingBufferHeight),n.bindBuffer(n.ARRAY_BUFFER,this.renderTargetVerticesBuffer_),n.useProgram(this.renderTargetProgram_),n.enableVertexAttribArray(this.renderTargetAttribLocation_),n.vertexAttribPointer(this.renderTargetAttribLocation_,2,n.FLOAT,!1,0,0),n.uniform2f(this.renderTargetUniformLocation_,o[0],o[1]),n.uniform1i(this.renderTargetTextureLocation_,0);var l=t.layerStatesArray[t.layerIndex].opacity;n.uniform1f(this.renderTargetOpacityLocation_,l),this.applyUniforms(t),r&&r(n,t),n.drawArrays(n.TRIANGLES,0,6),i&&i(n,t)},t.prototype.getFrameBuffer=function(){return this.frameBuffer_},t.prototype.applyUniforms=function(t){var e,r=this.getGL(),i=1;this.uniforms_.forEach((function(n){if((e="function"==typeof n.value?n.value(t):n.value)instanceof HTMLCanvasElement||e instanceof ImageData)n.texture||(n.texture=r.createTexture()),r.activeTexture(r["TEXTURE".concat(i)]),r.bindTexture(r.TEXTURE_2D,n.texture),r.texParameteri(r.TEXTURE_2D,r.TEXTURE_MIN_FILTER,r.LINEAR),r.texParameteri(r.TEXTURE_2D,r.TEXTURE_WRAP_S,r.CLAMP_TO_EDGE),r.texParameteri(r.TEXTURE_2D,r.TEXTURE_WRAP_T,r.CLAMP_TO_EDGE),e instanceof ImageData?r.texImage2D(r.TEXTURE_2D,0,r.RGBA,r.RGBA,e.width,e.height,0,r.UNSIGNED_BYTE,new Uint8Array(e.data)):r.texImage2D(r.TEXTURE_2D,0,r.RGBA,r.RGBA,r.UNSIGNED_BYTE,e),r.uniform1i(n.location,i++);else if(Array.isArray(e))switch(e.length){case 2:return void r.uniform2f(n.location,e[0],e[1]);case 3:return void r.uniform3f(n.location,e[0],e[1],e[2]);case 4:return void r.uniform4f(n.location,e[0],e[1],e[2],e[3]);default:return}else"number"==typeof e&&r.uniform1f(n.location,e)}))},t}();const P=I;var L=r(6101);function A(t,e){return t[0]=e[0],t[1]=e[1],t[4]=e[2],t[5]=e[3],t[12]=e[4],t[13]=e[5],t}var M,F=(M=function(t,e){return M=Object.setPrototypeOf||{__proto__:[]}instanceof Array&&function(t,e){t.__proto__=e}||function(t,e){for(var r in e)Object.prototype.hasOwnProperty.call(e,r)&&(t[r]=e[r])},M(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 r(){this.constructor=t}M(t,e),t.prototype=null===e?Object.create(e):(r.prototype=e.prototype,new r)}),Z={UNSIGNED_BYTE:5121,UNSIGNED_SHORT:5123,UNSIGNED_INT:5125,FLOAT:5126},k={};function j(t){return"shared/"+t}var D=0,N=function(t){function e(e){var r,i=t.call(this)||this,n=e||{};i.boundHandleWebGLContextLost_=i.handleWebGLContextLost.bind(i),i.boundHandleWebGLContextRestored_=i.handleWebGLContextRestored.bind(i),i.canvasCacheKey_=n.canvasCacheKey?j(n.canvasCacheKey):(r="unique/"+D,D+=1,r),i.canvas_=function(t){var e=k[t];if(!e){var r=document.createElement("canvas");r.style.position="absolute",r.style.left="0",e={users:0,canvas:r},k[t]=e}return e.users+=1,e.canvas}(i.canvasCacheKey_),i.gl_=y(i.canvas_),i.bufferCache_={},i.extensionCache_={},i.currentProgram_=null,i.canvas_.addEventListener(S,i.boundHandleWebGLContextLost_),i.canvas_.addEventListener(C,i.boundHandleWebGLContextRestored_),i.offsetRotateMatrix_=(0,L.Ue)(),i.offsetScaleMatrix_=(0,L.Ue)(),i.tmpMat4_=[1,0,0,0,0,1,0,0,0,0,1,0,0,0,0,1],i.uniformLocations_={},i.attribLocations_={},i.uniforms_=[],n.uniforms&&i.setUniforms(n.uniforms);var o=i.getGL();return i.postProcessPasses_=n.postProcesses?n.postProcesses.map((function(t){return new P({webGlContext:o,scaleRatio:t.scaleRatio,vertexShader:t.vertexShader,fragmentShader:t.fragmentShader,uniforms:t.uniforms})})):[new P({webGlContext:o})],i.shaderCompileErrors_=null,i.startTime_=Date.now(),i}return F(e,t),e.prototype.setUniforms=function(t){for(var e in this.uniforms_=[],t)this.uniforms_.push({name:e,value:t[e]});this.uniformLocations_={}},e.prototype.canvasCacheKeyMatches=function(t){return this.canvasCacheKey_===j(t)},e.prototype.getExtension=function(t){if(t in this.extensionCache_)return this.extensionCache_[t];var e=this.gl_.getExtension(t);return this.extensionCache_[t]=e,e},e.prototype.bindBuffer=function(t){var e=this.getGL(),r=(0,R.sq)(t),i=this.bufferCache_[r];i||(i={buffer:t,webGlBuffer:e.createBuffer()},this.bufferCache_[r]=i),e.bindBuffer(t.getType(),i.webGlBuffer)},e.prototype.flushBufferData=function(t){var e=this.getGL();this.bindBuffer(t),e.bufferData(t.getType(),t.getArray(),t.getUsage())},e.prototype.deleteBuffer=function(t){var e=this.getGL(),r=(0,R.sq)(t),i=this.bufferCache_[r];i&&!e.isContextLost()&&e.deleteBuffer(i.webGlBuffer),delete this.bufferCache_[r]},e.prototype.disposeInternal=function(){this.canvas_.removeEventListener(S,this.boundHandleWebGLContextLost_),this.canvas_.removeEventListener(C,this.boundHandleWebGLContextRestored_),function(t){var e=k[t];if(e&&(e.users-=1,!(e.users>0))){var r=y(e.canvas).getExtension("WEBGL_lose_context");r&&r.loseContext(),delete k[t]}}(this.canvasCacheKey_),delete this.gl_,delete this.canvas_},e.prototype.prepareDraw=function(t,e){var r=this.getGL(),i=this.getCanvas(),n=t.size,o=t.pixelRatio;i.width=n[0]*o,i.height=n[1]*o,i.style.width=n[0]+"px",i.style.height=n[1]+"px",r.useProgram(this.currentProgram_);for(var a=this.postProcessPasses_.length-1;a>=0;a--)this.postProcessPasses_[a].init(t);r.bindTexture(r.TEXTURE_2D,null),r.clearColor(0,0,0,0),r.clear(r.COLOR_BUFFER_BIT),r.enable(r.BLEND),r.blendFunc(r.ONE,e?r.ZERO:r.ONE_MINUS_SRC_ALPHA),r.useProgram(this.currentProgram_),this.applyFrameState(t),this.applyUniforms(t)},e.prototype.prepareDrawToRenderTarget=function(t,e,r){var i=this.getGL(),n=e.getSize();i.bindFramebuffer(i.FRAMEBUFFER,e.getFramebuffer()),i.viewport(0,0,n[0],n[1]),i.bindTexture(i.TEXTURE_2D,e.getTexture()),i.clearColor(0,0,0,0),i.clear(i.COLOR_BUFFER_BIT),i.enable(i.BLEND),i.blendFunc(i.ONE,r?i.ZERO:i.ONE_MINUS_SRC_ALPHA),i.useProgram(this.currentProgram_),this.applyFrameState(t),this.applyUniforms(t)},e.prototype.drawElements=function(t,e){var r=this.getGL();this.getExtension("OES_element_index_uint");var i=r.UNSIGNED_INT,n=e-t,o=4*t;r.drawElements(r.TRIANGLES,n,i,o)},e.prototype.finalizeDraw=function(t,e,r){for(var i=0,n=this.postProcessPasses_.length;i<n;i++)i===n-1?this.postProcessPasses_[i].apply(t,null,e,r):this.postProcessPasses_[i].apply(t,this.postProcessPasses_[i+1])},e.prototype.getCanvas=function(){return this.canvas_},e.prototype.getGL=function(){return this.gl_},e.prototype.applyFrameState=function(t){var e=t.size,r=t.viewState.rotation,i=(0,L.mc)(this.offsetScaleMatrix_);(0,L.bA)(i,2/e[0],2/e[1]);var n=(0,L.mc)(this.offsetRotateMatrix_);0!==r&&(0,L.U1)(n,-r),this.setUniformMatrixValue("u_offsetScaleMatrix",A(this.tmpMat4_,i)),this.setUniformMatrixValue("u_offsetRotateMatrix",A(this.tmpMat4_,n)),this.setUniformFloatValue("u_time",.001*(Date.now()-this.startTime_)),this.setUniformFloatValue("u_zoom",t.viewState.zoom),this.setUniformFloatValue("u_resolution",t.viewState.resolution)},e.prototype.applyUniforms=function(t){var e,r=this.getGL(),i=0;this.uniforms_.forEach(function(n){if((e="function"==typeof n.value?n.value(t):n.value)instanceof HTMLCanvasElement||e instanceof HTMLImageElement||e instanceof ImageData)n.texture||(n.prevValue=void 0,n.texture=r.createTexture()),r.activeTexture(r["TEXTURE".concat(i)]),r.bindTexture(r.TEXTURE_2D,n.texture),r.texParameteri(r.TEXTURE_2D,r.TEXTURE_MIN_FILTER,r.LINEAR),r.texParameteri(r.TEXTURE_2D,r.TEXTURE_WRAP_S,r.CLAMP_TO_EDGE),r.texParameteri(r.TEXTURE_2D,r.TEXTURE_WRAP_T,r.CLAMP_TO_EDGE),(!(e instanceof HTMLImageElement)||e.complete)&&n.prevValue!==e&&(n.prevValue=e,r.texImage2D(r.TEXTURE_2D,0,r.RGBA,r.RGBA,r.UNSIGNED_BYTE,e)),r.uniform1i(this.getUniformLocation(n.name),i++);else if(Array.isArray(e)&&6===e.length)this.setUniformMatrixValue(n.name,A(this.tmpMat4_,e));else if(Array.isArray(e)&&e.length<=4)switch(e.length){case 2:return void r.uniform2f(this.getUniformLocation(n.name),e[0],e[1]);case 3:return void r.uniform3f(this.getUniformLocation(n.name),e[0],e[1],e[2]);case 4:return void r.uniform4f(this.getUniformLocation(n.name),e[0],e[1],e[2],e[3]);default:return}else"number"==typeof e&&r.uniform1f(this.getUniformLocation(n.name),e)}.bind(this))},e.prototype.useProgram=function(t){return t!=this.currentProgram_&&(this.getGL().useProgram(t),this.currentProgram_=t,this.uniformLocations_={},this.attribLocations_={},!0)},e.prototype.compileShader=function(t,e){var r=this.getGL(),i=r.createShader(e);return r.shaderSource(i,t),r.compileShader(i),i},e.prototype.getProgram=function(t,e){var r=this.getGL(),i=this.compileShader(t,r.FRAGMENT_SHADER),n=this.compileShader(e,r.VERTEX_SHADER),o=r.createProgram();if(r.attachShader(o,i),r.attachShader(o,n),r.linkProgram(o),!r.getShaderParameter(i,r.COMPILE_STATUS)){var a="Fragment shader compliation failed: ".concat(r.getShaderInfoLog(i));throw new Error(a)}if(r.deleteShader(i),!r.getShaderParameter(n,r.COMPILE_STATUS))throw a="Vertex shader compilation failed: ".concat(r.getShaderInfoLog(n)),new Error(a);if(r.deleteShader(n),!r.getProgramParameter(o,r.LINK_STATUS))throw a="GL program linking failed: ".concat(r.getShaderInfoLog(n)),new Error(a);return o},e.prototype.getUniformLocation=function(t){return void 0===this.uniformLocations_[t]&&(this.uniformLocations_[t]=this.getGL().getUniformLocation(this.currentProgram_,t)),this.uniformLocations_[t]},e.prototype.getAttributeLocation=function(t){return void 0===this.attribLocations_[t]&&(this.attribLocations_[t]=this.getGL().getAttribLocation(this.currentProgram_,t)),this.attribLocations_[t]},e.prototype.makeProjectionTransform=function(t,e){var r=t.size,i=t.viewState.rotation,n=t.viewState.resolution,o=t.viewState.center;return(0,L.mc)(e),(0,L.qC)(e,0,0,2/(n*r[0]),2/(n*r[1]),-i,-o[0],-o[1]),e},e.prototype.setUniformFloatValue=function(t,e){this.getGL().uniform1f(this.getUniformLocation(t),e)},e.prototype.setUniformFloatVec4=function(t,e){this.getGL().uniform4fv(this.getUniformLocation(t),e)},e.prototype.setUniformMatrixValue=function(t,e){this.getGL().uniformMatrix4fv(this.getUniformLocation(t),!1,e)},e.prototype.enableAttributeArray_=function(t,e,r,i,n){var o=this.getAttributeLocation(t);o<0||(this.getGL().enableVertexAttribArray(o),this.getGL().vertexAttribPointer(o,e,r,!1,i,n))},e.prototype.enableAttributes=function(t){for(var e=function(t){for(var e=0,r=0;r<t.length;r++){var i=t[r];e+=i.size*G(i.type)}return e}(t),r=0,i=0;i<t.length;i++){var n=t[i];this.enableAttributeArray_(n.name,n.size,n.type||5126,e,r),r+=n.size*G(n.type)}},e.prototype.handleWebGLContextLost=function(){(0,c.ZH)(this.bufferCache_),this.currentProgram_=null},e.prototype.handleWebGLContextRestored=function(){},e.prototype.createTexture=function(t,e,r){var i=this.getGL(),n=r||i.createTexture(),o=i.RGBA,a=i.RGBA,s=i.UNSIGNED_BYTE;return i.bindTexture(i.TEXTURE_2D,n),e?i.texImage2D(i.TEXTURE_2D,0,o,a,s,e):i.texImage2D(i.TEXTURE_2D,0,o,t[0],t[1],0,a,s,null),i.texParameteri(i.TEXTURE_2D,i.TEXTURE_MIN_FILTER,i.LINEAR),i.texParameteri(i.TEXTURE_2D,i.TEXTURE_WRAP_S,i.CLAMP_TO_EDGE),i.texParameteri(i.TEXTURE_2D,i.TEXTURE_WRAP_T,i.CLAMP_TO_EDGE),n},e}(O.Z);function G(t){switch(t){case Z.UNSIGNED_BYTE:return Uint8Array.BYTES_PER_ELEMENT;case Z.UNSIGNED_SHORT:return Uint16Array.BYTES_PER_ELEMENT;case Z.UNSIGNED_INT:return Uint32Array.BYTES_PER_ELEMENT;case Z.FLOAT:default:return Float32Array.BYTES_PER_ELEMENT}}const z=N;var U=r(8641),B=function(){var t=function(e,r){return t=Object.setPrototypeOf||{__proto__:[]}instanceof Array&&function(t,e){t.__proto__=e}||function(t,e){for(var r in e)Object.prototype.hasOwnProperty.call(e,r)&&(t[r]=e[r])},t(e,r)};return function(e,r){if("function"!=typeof r&&null!==r)throw new TypeError("Class extends value "+String(r)+" is not a constructor or null");function i(){this.constructor=e}t(e,r),e.prototype=null===r?Object.create(r):(i.prototype=r.prototype,new i)}}(),q="GENERATE_BUFFERS",V=function(t){function e(e,r){var i=t.call(this,e)||this,n=r||{};return i.inversePixelTransform_=(0,L.Ue)(),i.pixelContext_=null,i.postProcesses_=n.postProcesses,i.uniforms_=n.uniforms,i.helper,e.addChangeListener(b.Z.MAP,i.removeHelper.bind(i)),i.dispatchPreComposeEvent=i.dispatchPreComposeEvent.bind(i),i.dispatchPostComposeEvent=i.dispatchPostComposeEvent.bind(i),i}return B(e,t),e.prototype.dispatchPreComposeEvent=function(t,e){var r=this.getLayer();if(r.hasListener(T.Z.PRECOMPOSE)){var i=new E.Z(T.Z.PRECOMPOSE,void 0,e,t);r.dispatchEvent(i)}},e.prototype.dispatchPostComposeEvent=function(t,e){var r=this.getLayer();if(r.hasListener(T.Z.POSTCOMPOSE)){var i=new E.Z(T.Z.POSTCOMPOSE,void 0,e,t);r.dispatchEvent(i)}},e.prototype.reset=function(t){this.uniforms_=t.uniforms,this.helper&&this.helper.setUniforms(this.uniforms_)},e.prototype.removeHelper=function(){this.helper&&(this.helper.dispose(),delete this.helper)},e.prototype.prepareFrame=function(t){if(this.getLayer().getRenderSource()){for(var r=!0,i=-1,n=void 0,o=0,a=t.layerStatesArray.length;o<a;o++){var s=t.layerStatesArray[o].layer,l=s.getRenderer();if(l instanceof e){var u=s.getClassName();if((r||u!==n)&&(i+=1,r=!1),n=u,l===this)break}else r=!0}var c="map/"+t.mapId+"/group/"+i;this.helper&&this.helper.canvasCacheKeyMatches(c)||(this.removeHelper(),this.helper=new z({postProcesses:this.postProcesses_,uniforms:this.uniforms_,canvasCacheKey:c}),n&&(this.helper.getCanvas().className=n),this.afterHelperCreated())}return this.prepareFrameInternal(t)},e.prototype.afterHelperCreated=function(){},e.prototype.prepareFrameInternal=function(t){return!0},e.prototype.disposeInternal=function(){this.removeHelper(),t.prototype.disposeInternal.call(this)},e.prototype.dispatchRenderEvent_=function(t,e,r){var i=this.getLayer();if(i.hasListener(t)){(0,L.qC)(this.inversePixelTransform_,0,0,r.pixelRatio,-r.pixelRatio,0,0,-r.size[1]);var n=new E.Z(t,this.inversePixelTransform_,r,e);i.dispatchEvent(n)}},e.prototype.preRender=function(t,e){this.dispatchRenderEvent_(T.Z.PRERENDER,t,e)},e.prototype.postRender=function(t,e){this.dispatchRenderEvent_(T.Z.POSTRENDER,t,e)},e.prototype.getDataAtPixel=function(t,e,r){var i=(0,L.nn)([e.pixelRatio,0,0,e.pixelRatio,0,0],t.slice()),n=this.helper.getGL();if(!n)return null;var o=this.getLayer().getExtent();if(o){var a=(0,L.nn)(e.pixelToCoordinateTransform,t.slice());if(!(0,U.containsCoordinate)(o,a))return null}var s=n.getContextAttributes();if(!s||!s.preserveDrawingBuffer)return new Uint8Array;var l,u=Math.round(i[0]),c=Math.round(i[1]),h=this.pixelContext_;if(!h){var p=document.createElement("canvas");p.width=1,p.height=1,h=p.getContext("2d"),this.pixelContext_=h}h.clearRect(0,0,1,1);try{h.drawImage(n.canvas,u,c,1,1,0,0,1,1),l=h.getImageData(0,0,1,1).data}catch(t){return l}return 0===l[3]?null:l},e}(w.Z);function W(t,e){var r=e||[],i=256,n=255;return r[0]=Math.floor(t/i/i/i)/n,r[1]=Math.floor(t/i/i)%i/n,r[2]=Math.floor(t/i)%i/n,r[3]=t%i/n,r}const X=V;var Y=r(5537),H=new Uint8Array(4),K=function(){function t(t,e){this.helper_=t;var r=t.getGL();this.texture_=r.createTexture(),this.framebuffer_=r.createFramebuffer(),this.size_=e||[1,1],this.data_=new Uint8Array(0),this.dataCacheDirty_=!0,this.updateSize_()}return t.prototype.setSize=function(t){(0,Y.fS)(t,this.size_)||(this.size_[0]=t[0],this.size_[1]=t[1],this.updateSize_())},t.prototype.getSize=function(){return this.size_},t.prototype.clearCachedData=function(){this.dataCacheDirty_=!0},t.prototype.readAll=function(){if(this.dataCacheDirty_){var t=this.size_,e=this.helper_.getGL();e.bindFramebuffer(e.FRAMEBUFFER,this.framebuffer_),e.readPixels(0,0,t[0],t[1],e.RGBA,e.UNSIGNED_BYTE,this.data_),this.dataCacheDirty_=!1}return this.data_},t.prototype.readPixel=function(t,e){if(t<0||e<0||t>this.size_[0]||e>=this.size_[1])return H[0]=0,H[1]=0,H[2]=0,H[3]=0,H;this.readAll();var r=Math.floor(t)+(this.size_[1]-Math.floor(e)-1)*this.size_[0];return H[0]=this.data_[4*r],H[1]=this.data_[4*r+1],H[2]=this.data_[4*r+2],H[3]=this.data_[4*r+3],H},t.prototype.getTexture=function(){return this.texture_},t.prototype.getFramebuffer=function(){return this.framebuffer_},t.prototype.updateSize_=function(){var t=this.size_,e=this.helper_.getGL();this.texture_=this.helper_.createTexture(t,null,this.texture_),e.bindFramebuffer(e.FRAMEBUFFER,this.framebuffer_),e.viewport(0,0,t[0],t[1]),e.framebufferTexture2D(e.FRAMEBUFFER,e.COLOR_ATTACHMENT0,e.TEXTURE_2D,this.texture_,0),this.data_=new Uint8Array(t[0]*t[1]*4)},t}();const $=K;var J=r(5818),Q=function(){var t=function(e,r){return t=Object.setPrototypeOf||{__proto__:[]}instanceof Array&&function(t,e){t.__proto__=e}||function(t,e){for(var r in e)Object.prototype.hasOwnProperty.call(e,r)&&(t[r]=e[r])},t(e,r)};return function(e,r){if("function"!=typeof r&&null!==r)throw new TypeError("Class extends value "+String(r)+" is not a constructor or null");function i(){this.constructor=e}t(e,r),e.prototype=null===r?Object.create(r):(i.prototype=r.prototype,new i)}}(),tt=function(t){function e(e,r){var i=this,n=r.uniforms||{},o=(0,L.Ue)();n.u_projectionMatrix=o,(i=t.call(this,e,{uniforms:n,postProcesses:r.postProcesses})||this).ready=!1,i.sourceRevision_=-1,i.verticesBuffer_=new x(h,f),i.hitVerticesBuffer_=new x(h,f),i.indicesBuffer_=new x(p,f),i.vertexShader_=r.vertexShader,i.fragmentShader_=r.fragmentShader,i.program_,i.hitDetectionEnabled_=!(!r.hitFragmentShader||!r.hitVertexShader),i.hitVertexShader_=r.hitVertexShader,i.hitFragmentShader_=r.hitFragmentShader,i.hitProgram_;var a=r.attributes?r.attributes.map((function(t){return{name:"a_"+t.name,size:1,type:Z.FLOAT}})):[];i.attributes=[{name:"a_position",size:2,type:Z.FLOAT},{name:"a_index",size:1,type:Z.FLOAT}].concat(a),i.hitDetectionAttributes=[{name:"a_position",size:2,type:Z.FLOAT},{name:"a_index",size:1,type:Z.FLOAT},{name:"a_hitColor",size:4,type:Z.FLOAT},{name:"a_featureUid",size:1,type:Z.FLOAT}].concat(a),i.customAttributes=r.attributes?r.attributes:[],i.previousExtent_=(0,U.createEmpty)(),i.currentTransform_=o,i.renderTransform_=(0,L.Ue)(),i.invertRenderTransform_=(0,L.Ue)(),i.renderInstructions_=new Float32Array(0),i.hitRenderInstructions_=new Float32Array(0),i.hitRenderTarget_,i.generateBuffersRun_=0,i.worker_=function(){var t='var e="function"==typeof Object.assign?Object.assign:function(e,n){if(null==e)throw new TypeError("Cannot convert undefined or null to object");for(var t=Object(e),r=1,o=arguments.length;r<o;++r){var i=arguments[r];if(null!=i)for(var f in i)i.hasOwnProperty(f)&&(t[f]=i[f])}return t},n="GENERATE_BUFFERS",t=[],r={vertexPosition:0,indexPosition:0};function o(e,n,t,r,o){e[n+0]=t,e[n+1]=r,e[n+2]=o}function i(e,n,i,f,s,a){var u=3+s,l=e[n+0],v=e[n+1],c=t;c.length=s;for(var g=0;g<c.length;g++)c[g]=e[n+2+g];var b=a?a.vertexPosition:0,h=a?a.indexPosition:0,d=b/u;return o(i,b,l,v,0),c.length&&i.set(c,b+3),o(i,b+=u,l,v,1),c.length&&i.set(c,b+3),o(i,b+=u,l,v,2),c.length&&i.set(c,b+3),o(i,b+=u,l,v,3),c.length&&i.set(c,b+3),b+=u,f[h++]=d,f[h++]=d+1,f[h++]=d+3,f[h++]=d+1,f[h++]=d+2,f[h++]=d+3,r.vertexPosition=b,r.indexPosition=h,r}var f=self;f.onmessage=function(t){var r=t.data;if(r.type===n){for(var o,s=r.customAttributesCount,a=2+s,u=new Float32Array(r.renderInstructions),l=u.length/a,v=4*l*(s+3),c=new Uint32Array(6*l),g=new Float32Array(v),b=0;b<u.length;b+=a)o=i(u,b,g,c,s,o);var h=e({vertexBuffer:g.buffer,indexBuffer:c.buffer,renderInstructions:u.buffer},r);f.postMessage(h,[g.buffer,c.buffer,u.buffer])}};';return new Worker("undefined"==typeof Blob?"data:application/javascript;base64,"+Buffer.from(t,"binary").toString("base64"):URL.createObjectURL(new Blob([t],{type:"application/javascript"})))}(),i.worker_.addEventListener("message",function(t){var e=t.data;if(e.type===q){var r=e.projectionTransform;e.hitDetection?(this.hitVerticesBuffer_.fromArrayBuffer(e.vertexBuffer),this.helper.flushBufferData(this.hitVerticesBuffer_)):(this.verticesBuffer_.fromArrayBuffer(e.vertexBuffer),this.helper.flushBufferData(this.verticesBuffer_)),this.indicesBuffer_.fromArrayBuffer(e.indexBuffer),this.helper.flushBufferData(this.indicesBuffer_),this.renderTransform_=r,(0,L.nb)(this.invertRenderTransform_,this.renderTransform_),e.hitDetection?this.hitRenderInstructions_=new Float32Array(t.data.renderInstructions):(this.renderInstructions_=new Float32Array(t.data.renderInstructions),e.generateBuffersRun===this.generateBuffersRun_&&(this.ready=!0)),this.getLayer().changed()}}.bind(i)),i.featureCache_={},i.featureCount_=0;var l=i.getLayer().getSource();return i.sourceListenKeys_=[(0,J.oL)(l,s.Z.ADDFEATURE,i.handleSourceFeatureAdded_,i),(0,J.oL)(l,s.Z.CHANGEFEATURE,i.handleSourceFeatureChanged_,i),(0,J.oL)(l,s.Z.REMOVEFEATURE,i.handleSourceFeatureDelete_,i),(0,J.oL)(l,s.Z.CLEAR,i.handleSourceFeatureClear_,i)],l.forEachFeature(function(t){this.featureCache_[(0,R.sq)(t)]={feature:t,properties:t.getProperties(),geometry:t.getGeometry()},this.featureCount_++}.bind(i)),i}return Q(e,t),e.prototype.afterHelperCreated=function(){this.program_=this.helper.getProgram(this.fragmentShader_,this.vertexShader_),this.hitDetectionEnabled_&&(this.hitProgram_=this.helper.getProgram(this.hitFragmentShader_,this.hitVertexShader_),this.hitRenderTarget_=new $(this.helper))},e.prototype.handleSourceFeatureAdded_=function(t){var e=t.feature;this.featureCache_[(0,R.sq)(e)]={feature:e,properties:e.getProperties(),geometry:e.getGeometry()},this.featureCount_++},e.prototype.handleSourceFeatureChanged_=function(t){var e=t.feature;this.featureCache_[(0,R.sq)(e)]={feature:e,properties:e.getProperties(),geometry:e.getGeometry()}},e.prototype.handleSourceFeatureDelete_=function(t){var e=t.feature;delete this.featureCache_[(0,R.sq)(e)],this.featureCount_--},e.prototype.handleSourceFeatureClear_=function(){this.featureCache_={},this.featureCount_=0},e.prototype.renderFrame=function(t){var e=this.helper.getGL();this.preRender(e,t);var r=this.indicesBuffer_.getSize();this.helper.drawElements(0,r),this.helper.finalizeDraw(t,this.dispatchPreComposeEvent,this.dispatchPostComposeEvent);var i=this.helper.getCanvas();return this.hitDetectionEnabled_&&(this.renderHitDetection(t),this.hitRenderTarget_.clearCachedData()),this.postRender(e,t),i},e.prototype.prepareFrameInternal=function(t){var e=this.getLayer(),r=e.getSource(),i=t.viewState,n=!t.viewHints[l.Z.ANIMATING]&&!t.viewHints[l.Z.INTERACTING],a=!(0,U.equals)(this.previousExtent_,t.extent),s=this.sourceRevision_<r.getRevision();if(s&&(this.sourceRevision_=r.getRevision()),n&&(a||s)){var u=i.projection,c=i.resolution,h=e instanceof o.Z?e.getRenderBuffer():0,p=(0,U.buffer)(t.extent,h*c);r.loadFeatures(p,c,u),this.rebuildBuffers_(t),this.previousExtent_=t.extent.slice()}return this.helper.makeProjectionTransform(t,this.currentTransform_),(0,L.Jp)(this.currentTransform_,this.invertRenderTransform_),this.helper.useProgram(this.program_),this.helper.prepareDraw(t),this.helper.bindBuffer(this.verticesBuffer_),this.helper.bindBuffer(this.indicesBuffer_),this.helper.enableAttributes(this.attributes),!0},e.prototype.rebuildBuffers_=function(t){var e=(0,L.Ue)();this.helper.makeProjectionTransform(t,e);var r,i,n=(2+this.customAttributes.length)*this.featureCount_;if(this.renderInstructions_&&this.renderInstructions_.length===n||(this.renderInstructions_=new Float32Array(n)),this.hitDetectionEnabled_){var o=(7+this.customAttributes.length)*this.featureCount_;this.hitRenderInstructions_&&this.hitRenderInstructions_.length===o||(this.hitRenderInstructions_=new Float32Array(o))}var s,l=[],u=[],c=0,h=0;for(var p in this.featureCache_)if((i=(r=this.featureCache_[p]).geometry)&&i.getType()===a.Z.POINT){l[0]=i.getFlatCoordinates()[0],l[1]=i.getFlatCoordinates()[1],(0,L.nn)(e,l),s=W(h+6,u),this.renderInstructions_[c++]=l[0],this.renderInstructions_[c++]=l[1],this.hitDetectionEnabled_&&(this.hitRenderInstructions_[h++]=l[0],this.hitRenderInstructions_[h++]=l[1],this.hitRenderInstructions_[h++]=s[0],this.hitRenderInstructions_[h++]=s[1],this.hitRenderInstructions_[h++]=s[2],this.hitRenderInstructions_[h++]=s[3],this.hitRenderInstructions_[h++]=Number(p));for(var d=void 0,f=0;f<this.customAttributes.length;f++)d=this.customAttributes[f].callback(r.feature,r.properties),this.renderInstructions_[c++]=d,this.hitDetectionEnabled_&&(this.hitRenderInstructions_[h++]=d)}var g={type:q,renderInstructions:this.renderInstructions_.buffer,customAttributesCount:this.customAttributes.length};if(g.projectionTransform=e,g.generateBuffersRun=++this.generateBuffersRun_,this.ready=!1,this.worker_.postMessage(g,[this.renderInstructions_.buffer]),this.renderInstructions_=null,this.hitDetectionEnabled_){var y={type:q,renderInstructions:this.hitRenderInstructions_.buffer,customAttributesCount:5+this.customAttributes.length};y.projectionTransform=e,y.hitDetection=!0,this.worker_.postMessage(y,[this.hitRenderInstructions_.buffer]),this.hitRenderInstructions_=null}},e.prototype.forEachFeatureAtCoordinate=function(t,e,r,i,n){if((0,m.h)(this.hitDetectionEnabled_,66),this.hitRenderInstructions_){var o=(0,L.nn)(e.coordinateToPixelTransform,t.slice()),a=this.hitRenderTarget_.readPixel(o[0]/2,o[1]/2),s=(h=[a[0]/255,a[1]/255,a[2]/255,a[3]/255],p=0,d=256,f=255,p+=Math.round(h[0]*d*d*d*f),p+=Math.round(h[1]*d*d*f),(p+=Math.round(h[2]*d*f))+Math.round(h[3]*f)),l=this.hitRenderInstructions_[s],u=Math.floor(l).toString(),c=this.getLayer().getSource().getFeatureByUid(u);return c?i(c,this.getLayer(),null):void 0}var h,p,d,f},e.prototype.renderHitDetection=function(t){if(this.hitVerticesBuffer_.getSize()){this.hitRenderTarget_.setSize([Math.floor(t.size[0]/2),Math.floor(t.size[1]/2)]),this.helper.useProgram(this.hitProgram_),this.helper.prepareDrawToRenderTarget(t,this.hitRenderTarget_,!0),this.helper.bindBuffer(this.hitVerticesBuffer_),this.helper.bindBuffer(this.indicesBuffer_),this.helper.enableAttributes(this.hitDetectionAttributes);var e=this.indicesBuffer_.getSize();this.helper.drawElements(0,e)}},e.prototype.disposeInternal=function(){this.worker_.terminate(),this.layer_=null,this.sourceListenKeys_.forEach((function(t){(0,J.bN)(t)})),this.sourceListenKeys_=null,t.prototype.disposeInternal.call(this)},e}(X);const et=tt;var rt=r(3983),it=r(8326),nt=function(){var t=function(e,r){return t=Object.setPrototypeOf||{__proto__:[]}instanceof Array&&function(t,e){t.__proto__=e}||function(t,e){for(var r in e)Object.prototype.hasOwnProperty.call(e,r)&&(t[r]=e[r])},t(e,r)};return function(e,r){if("function"!=typeof r&&null!==r)throw new TypeError("Class extends value "+String(r)+" is not a constructor or null");function i(){this.constructor=e}t(e,r),e.prototype=null===r?Object.create(r):(i.prototype=r.prototype,new i)}}(),ot="blur",at="gradient",st="radius",lt=["#00f","#0ff","#0f0","#ff0","#f00"];const ut=function(t){function e(e){var r=this,i=e||{},n=(0,c.f0)({},i);delete n.gradient,delete n.radius,delete n.blur,delete n.weight,(r=t.call(this,n)||this).gradient_=null,r.addChangeListener(at,r.handleGradientChanged_),r.setGradient(i.gradient?i.gradient:lt),r.setBlur(void 0!==i.blur?i.blur:15),r.setRadius(void 0!==i.radius?i.radius:8);var o=i.weight?i.weight:"weight";return r.weightFunction_="string"==typeof o?function(t){return t.get(o)}:o,r.setRenderOrder(null),r}return nt(e,t),e.prototype.getBlur=function(){return this.get(ot)},e.prototype.getGradient=function(){return this.get(at)},e.prototype.getRadius=function(){return this.get(st)},e.prototype.handleGradientChanged_=function(){this.gradient_=function(t){for(var e=(0,it.E4)(1,256),r=e.createLinearGradient(0,0,1,256),i=1/(t.length-1),n=0,o=t.length;n<o;++n)r.addColorStop(n*i,t[n]);return e.fillStyle=r,e.fillRect(0,0,1,256),e.canvas}(this.getGradient())},e.prototype.setBlur=function(t){this.set(ot,t)},e.prototype.setGradient=function(t){this.set(at,t)},e.prototype.setRadius=function(t){this.set(st,t)},e.prototype.createRenderer=function(){return new et(this,{className:this.getClassName(),attributes:[{name:"weight",callback:function(t){var e=this.weightFunction_(t);return void 0!==e?(0,rt.uZ)(e,0,1):1}.bind(this)}],vertexShader:"\n        precision mediump float;\n        uniform mat4 u_projectionMatrix;\n        uniform mat4 u_offsetScaleMatrix;\n        uniform float u_size;\n        attribute vec2 a_position;\n        attribute float a_index;\n        attribute float a_weight;\n\n        varying vec2 v_texCoord;\n        varying float v_weight;\n\n        void main(void) {\n          mat4 offsetMatrix = u_offsetScaleMatrix;\n          float offsetX = a_index == 0.0 || a_index == 3.0 ? -u_size / 2.0 : u_size / 2.0;\n          float offsetY = a_index == 0.0 || a_index == 1.0 ? -u_size / 2.0 : u_size / 2.0;\n          vec4 offsets = offsetMatrix * vec4(offsetX, offsetY, 0.0, 0.0);\n          gl_Position = u_projectionMatrix * vec4(a_position, 0.0, 1.0) + offsets;\n          float u = a_index == 0.0 || a_index == 3.0 ? 0.0 : 1.0;\n          float v = a_index == 0.0 || a_index == 1.0 ? 0.0 : 1.0;\n          v_texCoord = vec2(u, v);\n          v_weight = a_weight;\n        }",fragmentShader:"\n        precision mediump float;\n        uniform float u_blurSlope;\n\n        varying vec2 v_texCoord;\n        varying float v_weight;\n\n        void main(void) {\n          vec2 texCoord = v_texCoord * 2.0 - vec2(1.0, 1.0);\n          float sqRadius = texCoord.x * texCoord.x + texCoord.y * texCoord.y;\n          float value = (1.0 - sqrt(sqRadius)) * u_blurSlope;\n          float alpha = smoothstep(0.0, 1.0, value) * v_weight;\n          gl_FragColor = vec4(alpha, alpha, alpha, alpha);\n        }",hitVertexShader:"\n        precision mediump float;\n        uniform mat4 u_projectionMatrix;\n        uniform mat4 u_offsetScaleMatrix;\n        uniform float u_size;\n        attribute vec2 a_position;\n        attribute float a_index;\n        attribute float a_weight;\n        attribute vec4 a_hitColor;\n\n        varying vec2 v_texCoord;\n        varying float v_weight;\n        varying vec4 v_hitColor;\n\n        void main(void) {\n          mat4 offsetMatrix = u_offsetScaleMatrix;\n          float offsetX = a_index == 0.0 || a_index == 3.0 ? -u_size / 2.0 : u_size / 2.0;\n          float offsetY = a_index == 0.0 || a_index == 1.0 ? -u_size / 2.0 : u_size / 2.0;\n          vec4 offsets = offsetMatrix * vec4(offsetX, offsetY, 0.0, 0.0);\n          gl_Position = u_projectionMatrix * vec4(a_position, 0.0, 1.0) + offsets;\n          float u = a_index == 0.0 || a_index == 3.0 ? 0.0 : 1.0;\n          float v = a_index == 0.0 || a_index == 1.0 ? 0.0 : 1.0;\n          v_texCoord = vec2(u, v);\n          v_hitColor = a_hitColor;\n          v_weight = a_weight;\n        }",hitFragmentShader:"\n        precision mediump float;\n        uniform float u_blurSlope;\n\n        varying vec2 v_texCoord;\n        varying float v_weight;\n        varying vec4 v_hitColor;\n\n        void main(void) {\n          vec2 texCoord = v_texCoord * 2.0 - vec2(1.0, 1.0);\n          float sqRadius = texCoord.x * texCoord.x + texCoord.y * texCoord.y;\n          float value = (1.0 - sqrt(sqRadius)) * u_blurSlope;\n          float alpha = smoothstep(0.0, 1.0, value) * v_weight;\n          if (alpha < 0.05) {\n            discard;\n          }\n\n          gl_FragColor = v_hitColor;\n        }",uniforms:{u_size:function(){return 2*(this.get(st)+this.get(ot))}.bind(this),u_blurSlope:function(){return this.get(st)/Math.max(1,this.get(ot))}.bind(this)},postProcesses:[{fragmentShader:"\n            precision mediump float;\n\n            uniform sampler2D u_image;\n            uniform sampler2D u_gradientTexture;\n            uniform float u_opacity;\n\n            varying vec2 v_texCoord;\n\n            void main() {\n              vec4 color = texture2D(u_image, v_texCoord);\n              gl_FragColor.a = color.a * u_opacity;\n              gl_FragColor.rgb = texture2D(u_gradientTexture, vec2(0.5, color.a)).rgb;\n              gl_FragColor.rgb *= gl_FragColor.a;\n            }",uniforms:{u_gradientTexture:function(){return this.gradient_}.bind(this),u_opacity:function(){return this.getOpacity()}.bind(this)}}]})},e.prototype.renderDeclutter=function(){},e}(o.Z);var ct=r(3028),ht=r(1295),pt=r(291),dt=r(5487),ft=r(8375),gt=r(6121);const yt=function(){function t(){this.dataProjection=void 0,this.defaultFeatureProjection=void 0,this.supportedMediaTypes=null}return t.prototype.getReadOptions=function(t,e){var r;if(e){var i=e.dataProjection?(0,gt.get)(e.dataProjection):this.readProjection(t);e.extent&&i&&i.getUnits()===ft.ZP.TILE_PIXELS&&(i=(0,gt.get)(i)).setWorldExtent(e.extent),r={dataProjection:i,featureProjection:e.featureProjection}}return this.adaptOptions(r)},t.prototype.adaptOptions=function(t){return(0,c.f0)({dataProjection:this.dataProjection,featureProjection:this.defaultFeatureProjection},t)},t.prototype.getType=function(){return(0,R.O3)()},t.prototype.readFeature=function(t,e){return(0,R.O3)()},t.prototype.readFeatures=function(t,e){return(0,R.O3)()},t.prototype.readGeometry=function(t,e){return(0,R.O3)()},t.prototype.readProjection=function(t){return(0,R.O3)()},t.prototype.writeFeature=function(t,e){return(0,R.O3)()},t.prototype.writeFeatures=function(t,e){return(0,R.O3)()},t.prototype.writeGeometry=function(t,e){return(0,R.O3)()},t}();function mt(t,e,r){var i,n=r?(0,gt.get)(r.featureProjection):null,o=r?(0,gt.get)(r.dataProjection):null;if(i=n&&o&&!(0,gt.equivalent)(n,o)?(e?t.clone():t).transform(e?n:o,e?o:n):t,e&&r&&void 0!==r.decimals){var a=Math.pow(10,r.decimals);i===t&&(i=t.clone()),i.applyTransform((function(t){for(var e=0,r=t.length;e<r;++e)t[e]=Math.round(t[e]*a)/a;return t}))}return i}var vt=r(6617),_t=r(2450),xt=r(2083),bt=r(7403),wt=r(6259),Et=r(5063),Tt=r(3614),St=r(188),Ct=r(2033),Ot=r(9619),Rt=r(3448),It=r(9405),Pt=r(1071),Lt=r(6442),At=(0,L.Ue)(),Mt=function(){function t(t,e,r,i,n){this.styleFunction,this.extent_,this.id_=n,this.type_=t,this.flatCoordinates_=e,this.flatInteriorPoints_=null,this.flatMidpoints_=null,this.ends_=r,this.properties_=i}return t.prototype.get=function(t){return this.properties_[t]},t.prototype.getExtent=function(){return this.extent_||(this.extent_=this.type_===a.Z.POINT?(0,U.createOrUpdateFromCoordinate)(this.flatCoordinates_):(0,U.createOrUpdateFromFlatCoordinates)(this.flatCoordinates_,0,this.flatCoordinates_.length,2)),this.extent_},t.prototype.getFlatInteriorPoint=function(){if(!this.flatInteriorPoints_){var t=(0,U.getCenter)(this.getExtent());this.flatInteriorPoints_=(0,Rt.X)(this.flatCoordinates_,0,this.ends_,2,t,0)}return this.flatInteriorPoints_},t.prototype.getFlatInteriorPoints=function(){if(!this.flatInteriorPoints_){var t=(0,Pt.E)(this.flatCoordinates_,0,this.ends_,2);this.flatInteriorPoints_=(0,Rt.U)(this.flatCoordinates_,0,this.ends_,2,t)}return this.flatInteriorPoints_},t.prototype.getFlatMidpoint=function(){return this.flatMidpoints_||(this.flatMidpoints_=(0,It.WW)(this.flatCoordinates_,0,this.flatCoordinates_.length,2,.5)),this.flatMidpoints_},t.prototype.getFlatMidpoints=function(){if(!this.flatMidpoints_){this.flatMidpoints_=[];for(var t=this.flatCoordinates_,e=0,r=this.ends_,i=0,n=r.length;i<n;++i){var o=r[i],a=(0,It.WW)(t,e,o,2,.5);(0,Y.l7)(this.flatMidpoints_,a),e=o}}return this.flatMidpoints_},t.prototype.getId=function(){return this.id_},t.prototype.getOrientedFlatCoordinates=function(){return this.flatCoordinates_},t.prototype.getGeometry=function(){return this},t.prototype.getSimplifiedGeometry=function(t){return this},t.prototype.simplifyTransformed=function(t,e){return this},t.prototype.getProperties=function(){return this.properties_},t.prototype.getStride=function(){return 2},t.prototype.getStyleFunction=function(){return this.styleFunction},t.prototype.getType=function(){return this.type_},t.prototype.transform=function(t){var e=(t=(0,gt.get)(t)).getExtent(),r=t.getWorldExtent();if(e&&r){var i=(0,U.getHeight)(r)/(0,U.getHeight)(e);(0,L.qC)(At,r[0],r[3],i,-i,0,0,0),(0,Lt.vT)(this.flatCoordinates_,0,this.flatCoordinates_.length,2,At,this.flatCoordinates_)}},t.prototype.getEnds=function(){return this.ends_},t}();Mt.prototype.getEndss=Mt.prototype.getEnds,Mt.prototype.getFlatCoordinates=Mt.prototype.getOrientedFlatCoordinates;const Ft=Mt;var Zt=r(3157),kt=function(){var t=function(e,r){return t=Object.setPrototypeOf||{__proto__:[]}instanceof Array&&function(t,e){t.__proto__=e}||function(t,e){for(var r in e)Object.prototype.hasOwnProperty.call(e,r)&&(t[r]=e[r])},t(e,r)};return function(e,r){if("function"!=typeof r&&null!==r)throw new TypeError("Class extends value "+String(r)+" is not a constructor or null");function i(){this.constructor=e}t(e,r),e.prototype=null===r?Object.create(r):(i.prototype=r.prototype,new i)}}();function jt(t,e,r){if(3===t){var i={keys:[],values:[],features:[]},n=r.readVarint()+r.pos;r.readFields(Dt,i,n),i.length=i.features.length,i.length&&(e[i.name]=i)}}function Dt(t,e,r){if(15===t)e.version=r.readVarint();else if(1===t)e.name=r.readString();else if(5===t)e.extent=r.readVarint();else if(2===t)e.features.push(r.pos);else if(3===t)e.keys.push(r.readString());else if(4===t){for(var i=null,n=r.readVarint()+r.pos;r.pos<n;)i=1==(t=r.readVarint()>>3)?r.readString():2===t?r.readFloat():3===t?r.readDouble():4===t?r.readVarint64():5===t?r.readVarint():6===t?r.readSVarint():7===t?r.readBoolean():null;e.values.push(i)}}function Nt(t,e,r){if(1==t)e.id=r.readVarint();else if(2==t)for(var i=r.readVarint()+r.pos;r.pos<i;){var n=e.layer.keys[r.readVarint()],o=e.layer.values[r.readVarint()];e.properties[n]=o}else 3==t?e.type=r.readVarint():4==t&&(e.geometry=r.pos)}function Gt(t,e,r){t.pos=e.features[r];var i=t.readVarint()+t.pos,n={layer:e,type:0,properties:{}};return t.readFields(Nt,n,i),n}const zt=function(t){function e(e){var r=t.call(this)||this,i=e||{};return r.dataProjection=new Ot.Z({code:"",units:ft.ZP.TILE_PIXELS}),r.featureClass_=i.featureClass?i.featureClass:Ft,r.geometryName_=i.geometryName,r.layerName_=i.layerName?i.layerName:"layer",r.layers_=i.layers?i.layers:null,r.idProperty_=i.idProperty,r.supportedMediaTypes=["application/vnd.mapbox-vector-tile","application/x-protobuf"],r}return kt(e,t),e.prototype.readRawGeometry_=function(t,e,r,i){t.pos=e.geometry;for(var n=t.readVarint()+t.pos,o=1,a=0,s=0,l=0,u=0,c=0;t.pos<n;){if(!a){var h=t.readVarint();o=7&h,a=h>>3}a--,1===o||2===o?(s+=t.readSVarint(),l+=t.readSVarint(),1===o&&u>c&&(i.push(u),c=u),r.push(s,l),u+=2):7===o?u>c&&(r.push(r[c],r[c+1]),u+=2):(0,m.h)(!1,59)}u>c&&(i.push(u),c=u)},e.prototype.createFeature_=function(t,e,r){var i,n=e.type;if(0===n)return null;var o,s=e.properties;this.idProperty_?(o=s[this.idProperty_],delete s[this.idProperty_]):o=e.id,s[this.layerName_]=e.layer.name;var l=[],u=[];this.readRawGeometry_(t,e,l,u);var c=function(t,e){var r;return 1===t?r=1===e?a.Z.POINT:a.Z.MULTI_POINT:2===t?r=1===e?a.Z.LINE_STRING:a.Z.MULTI_LINE_STRING:3===t&&(r=a.Z.POLYGON),r}(n,u.length);if(this.featureClass_===Ft)(i=new this.featureClass_(c,l,u,s,o)).transform(r.dataProjection);else{var h=void 0;if(c==a.Z.POLYGON){var p=(0,Zt.Q3)(l,u);h=p.length>1?new Et.Z(l,_t.Z.XY,p):new Ct.ZP(l,_t.Z.XY,u)}else h=c===a.Z.POINT?new St.default(l,_t.Z.XY):c===a.Z.LINE_STRING?new xt.Z(l,_t.Z.XY):c===a.Z.POLYGON?new Ct.ZP(l,_t.Z.XY,u):c===a.Z.MULTI_POINT?new wt.Z(l,_t.Z.XY):c===a.Z.MULTI_LINE_STRING?new bt.Z(l,_t.Z.XY,u):null;i=new(0,this.featureClass_),this.geometryName_&&i.setGeometryName(this.geometryName_);var d=mt(h,!1,r);i.setGeometry(d),void 0!==o&&i.setId(o),i.setProperties(s,!0)}return i},e.prototype.getType=function(){return vt.Z.ARRAY_BUFFER},e.prototype.readFeatures=function(t,e){var r=this.layers_,i=this.adaptOptions(e),n=(0,gt.get)(i.dataProjection);n.setWorldExtent(i.extent),i.dataProjection=n;var o=new Tt(t),a=o.readFields(jt,{}),s=[];for(var l in a)if(!r||-1!=r.indexOf(l)){var u=a[l],c=u?[0,0,u.extent,u.extent]:null;n.setExtent(c);for(var h=0,p=u.length;h<p;++h){var d=Gt(o,u,h),f=this.createFeature_(o,d,i);null!==f&&s.push(f)}}return s},e.prototype.readProjection=function(t){return this.dataProjection},e.prototype.setLayers=function(t){this.layers_=t},e}(yt);var Ut=r(4562),Bt=r(1328),qt=r(2669),Vt=r(8845),Wt=r(2286),Xt=r(7195);const Yt="hybrid",Ht="vector";var Kt=r(9272),$t=r(6234),Jt=r(4307),Qt=r(1900),te=function(){var t=function(e,r){return t=Object.setPrototypeOf||{__proto__:[]}instanceof Array&&function(t,e){t.__proto__=e}||function(t,e){for(var r in e)Object.prototype.hasOwnProperty.call(e,r)&&(t[r]=e[r])},t(e,r)};return function(e,r){if("function"!=typeof r&&null!==r)throw new TypeError("Class extends value "+String(r)+" is not a constructor or null");function i(){this.constructor=e}t(e,r),e.prototype=null===r?Object.create(r):(i.prototype=r.prototype,new i)}}(),ee={image:[Wt.Z.POLYGON,Wt.Z.CIRCLE,Wt.Z.LINE_STRING,Wt.Z.IMAGE,Wt.Z.TEXT],hybrid:[Wt.Z.POLYGON,Wt.Z.LINE_STRING],vector:[]},re={hybrid:[Wt.Z.IMAGE,Wt.Z.TEXT,Wt.Z.DEFAULT],vector:[Wt.Z.POLYGON,Wt.Z.CIRCLE,Wt.Z.LINE_STRING,Wt.Z.IMAGE,Wt.Z.TEXT,Wt.Z.DEFAULT]},ie=function(t){function e(e){var r=t.call(this,e)||this;return r.boundHandleStyleImageChange_=r.handleStyleImageChange_.bind(r),r.dirty_=!1,r.renderedLayerRevision_,r.renderedPixelToCoordinateTransform_=null,r.renderedRotation_,r.tmpTransform_=(0,L.Ue)(),r}return te(e,t),e.prototype.prepareTile=function(t,e,r){var i,n=t.getState();return n!==Xt.Z.LOADED&&n!==Xt.Z.ERROR||(this.updateExecutorGroup_(t,e,r),this.tileImageNeedsRender_(t)&&(i=!0)),i},e.prototype.getTile=function(e,r,i,n){var o=n.pixelRatio,a=n.viewState,s=a.resolution,u=a.projection,c=this.getLayer(),h=c.getSource().getTile(e,r,i,o,u),p=n.viewHints,d=!(p[l.Z.ANIMATING]||p[l.Z.INTERACTING]);return!d&&h.wantedResolution||(h.wantedResolution=s),this.prepareTile(h,o,u)&&(d||Date.now()-n.time<8)&&c.getRenderMode()!==Ht&&this.renderTileImage_(h,n),t.prototype.getTile.call(this,e,r,i,n)},e.prototype.isDrawableTile=function(e){var r=this.getLayer();return t.prototype.isDrawableTile.call(this,e)&&(r.getRenderMode()===Ht?(0,R.sq)(r)in e.executorGroups:e.hasContext(r))},e.prototype.getTileImage=function(t){return t.getImage(this.getLayer())},e.prototype.prepareFrame=function(e){var r=this.getLayer().getRevision();return this.renderedLayerRevision_!=r&&(this.renderedTiles.length=0),this.renderedLayerRevision_=r,t.prototype.prepareFrame.call(this,e)},e.prototype.updateExecutorGroup_=function(t,e,r){var i=this.getLayer(),n=i.getRevision(),o=i.getRenderOrder()||null,a=t.wantedResolution,s=t.getReplayState(i);if(s.dirty||s.renderedResolution!==a||s.renderedRevision!=n||s.renderedRenderOrder!=o){var l=i.getSource(),u=i.getDeclutter(),c=l.getTileGrid(),h=l.getTileGridForProjection(r).getTileCoordExtent(t.wrappedTileCoord),p=l.getSourceTiles(e,r,t),d=(0,R.sq)(i);delete t.hitDetectionImageData[d],t.executorGroups[d]=[],u&&(t.declutterExecutorGroups[d]=[]);for(var f=function(r,n){var f=p[r];if(f.getState()!=Xt.Z.LOADED)return"continue";var y=f.tileCoord,m=c.getTileCoordExtent(y),v=(0,U.getIntersection)(h,m),_=(0,U.buffer)(v,i.getRenderBuffer()*a,g.tmpExtent),x=(0,U.equals)(m,v)?null:_;s.dirty=!1;var b=new Bt.Z(0,_,a,e),w=u?new Bt.Z(0,v,a,e):void 0,E=(0,$t.se)(a,e),T=function(t){var e,r=t.getStyleFunction()||i.getStyleFunction();if(r&&(e=r(t,a)),e){var n=this.renderFeature(t,E,e,b,w);this.dirty_=this.dirty_||n,s.dirty=s.dirty||n}},S=f.getFeatures();o&&o!==s.renderedRenderOrder&&S.sort(o);for(var C=0,O=S.length;C<O;++C){var R=S[C];x&&!(0,U.intersects)(x,R.getGeometry().getExtent())||T.call(g,R)}var I=b.finish(),P=i.getRenderMode()!==Ht&&u&&1===p.length?null:v,L=new qt.Z(P,a,e,l.getOverlaps(),I,i.getRenderBuffer());if(t.executorGroups[d].push(L),w){var A=new qt.Z(null,a,e,l.getOverlaps(),w.finish(),i.getRenderBuffer());t.declutterExecutorGroups[d].push(A)}},g=this,y=0,m=p.length;y<m;++y)f(y);s.renderedRevision=n,s.renderedRenderOrder=o,s.renderedResolution=a}},e.prototype.forEachFeatureAtCoordinate=function(t,e,r,i,n){var o=e.viewState.resolution,a=e.viewState.rotation;r=null==r?0:r;var s=this.getLayer(),l=s.getSource().getTileGridForProjection(e.viewState.projection),u=(0,U.boundingExtent)([t]);(0,U.buffer)(u,o*r,u);for(var c,h={},p=function(t,e,r){var o=t.getId();void 0===o&&(o=(0,R.sq)(t));var a=h[o];if(a){if(!0!==a&&r<a.distanceSq){if(0===r)return h[o]=!0,n.splice(n.lastIndexOf(a),1),i(t,s,e);a.geometry=e,a.distanceSq=r}}else{if(0===r)return h[o]=!0,i(t,s,e);n.push(h[o]={feature:t,layer:s,geometry:e,distanceSq:r,callback:i})}},d=this.renderedTiles,f=function(i,n){var h=d[i],f=l.getTileCoordExtent(h.wrappedTileCoord);if(!(0,U.intersects)(f,u))return"continue";var g=(0,R.sq)(s),y=[h.executorGroups[g]],m=h.declutterExecutorGroups[g];m&&y.push(m),y.some((function(i){for(var n=i===m?e.declutterTree.all().map((function(t){return t.value})):null,s=0,l=i.length;s<l;++s){var u=i[s];if(c=u.forEachFeatureAtCoordinate(t,o,a,r,p,n))return!0}}))},g=0,y=d.length;!c&&g<y;++g)f(g);return c},e.prototype.getFeatures=function(t){return new Promise(function(e,r){for(var i,n=this.getLayer(),o=(0,R.sq)(n),a=n.getSource(),s=this.renderedProjection,l=s.getExtent(),u=this.renderedResolution,c=a.getTileGridForProjection(s),h=(0,L.nn)(this.renderedPixelToCoordinateTransform_,t.slice()),p=c.getTileCoordForCoordAndResolution(h,u),d=0,f=this.renderedTiles.length;d<f;++d)if(p.toString()===this.renderedTiles[d].tileCoord.toString()){if((i=this.renderedTiles[d]).getState()===Xt.Z.LOADED){var g=c.getTileCoordExtent(i.tileCoord);a.getWrapX()&&s.canWrapX()&&!(0,U.containsExtent)(l,g)&&(0,Qt.Cf)(h,s);break}i=void 0}if(!i||i.loadingSourceTiles>0)e([]);else{var y=c.getTileCoordExtent(i.wrappedTileCoord),m=(0,U.getTopLeft)(y),v=[(h[0]-m[0])/u,(m[1]-h[1])/u],_=i.getSourceTiles().reduce((function(t,e){return t.concat(e.getFeatures())}),[]),x=i.hitDetectionImageData[o];if(!x&&!this.animatingOrInteracting_){var b=(0,Jt.Pq)(c.getTileSize(c.getZForResolution(u))),w=this.renderedRotation_,E=[this.getRenderTransform(c.getTileCoordCenter(i.wrappedTileCoord),u,0,Kt.UN,b[0]*Kt.UN,b[1]*Kt.UN,0)];x=(0,Kt.TU)(b,E,_,n.getStyleFunction(),c.getTileCoordExtent(i.wrappedTileCoord),i.getReplayState(n).renderedResolution,w),i.hitDetectionImageData[o]=x}e((0,Kt.ix)(v,_,x))}}.bind(this))},e.prototype.handleFontsChanged=function(){var t=this.getLayer();t.getVisible()&&void 0!==this.renderedLayerRevision_&&t.changed()},e.prototype.handleStyleImageChange_=function(t){this.renderIfReadyAndVisible()},e.prototype.renderDeclutter=function(t){var e=this.context,r=e.globalAlpha;e.globalAlpha=this.getLayer().getOpacity();for(var i=t.viewHints,n=!(i[l.Z.ANIMATING]||i[l.Z.INTERACTING]),o=this.renderedTiles,a=0,s=o.length;a<s;++a){var u=o[a],c=u.declutterExecutorGroups[(0,R.sq)(this.getLayer())];if(c)for(var h=c.length-1;h>=0;--h)c[h].execute(this.context,1,this.getTileRenderTransform(u,t),t.viewState.rotation,n,void 0,t.declutterTree)}e.globalAlpha=r},e.prototype.getTileRenderTransform=function(t,e){var r=e.pixelRatio,i=e.viewState,n=i.center,o=i.resolution,a=i.rotation,s=e.size,l=Math.round(s[0]*r),u=Math.round(s[1]*r),c=this.getLayer().getSource().getTileGridForProjection(e.viewState.projection),h=t.tileCoord,p=c.getTileCoordExtent(t.wrappedTileCoord),d=c.getTileCoordExtent(h,this.tmpExtent)[0]-p[0];return(0,L.Jp)((0,L.bA)(this.inversePixelTransform.slice(),1/r,1/r),this.getRenderTransform(n,o,a,r,l,u,d))},e.prototype.renderFrame=function(e,r){var i=e.viewHints,n=!(i[l.Z.ANIMATING]||i[l.Z.INTERACTING]);t.prototype.renderFrame.call(this,e,r),this.renderedPixelToCoordinateTransform_=e.pixelToCoordinateTransform.slice(),this.renderedRotation_=e.viewState.rotation;var o=this.getLayer(),a=o.getRenderMode(),s=this.context,u=s.globalAlpha;s.globalAlpha=o.getOpacity();for(var c=re[a],h=e.viewState,p=h.rotation,d=o.getSource(),f=d.getTileGridForProjection(h.projection).getZForResolution(h.resolution,d.zDirection),g=this.renderedTiles,y=[],m=[],v=g.length-1;v>=0;--v){var _=g[v],x=_.executorGroups[(0,R.sq)(o)].filter((function(t){return t.hasExecutors(c)}));if(0!==x.length){for(var b=this.getTileRenderTransform(_,e),w=_.tileCoord[0],E=!1,T=x[0].getClipCoords(b),S=0,C=y.length;S<C;++S)if(f!==w&&w<m[S]){var O=y[S];(0,U.intersects)([T[0],T[3],T[4],T[7]],[O[0],O[3],O[4],O[7]])&&(E||(s.save(),E=!0),s.beginPath(),s.moveTo(T[0],T[1]),s.lineTo(T[2],T[3]),s.lineTo(T[4],T[5]),s.lineTo(T[6],T[7]),s.moveTo(O[6],O[7]),s.lineTo(O[4],O[5]),s.lineTo(O[2],O[3]),s.lineTo(O[0],O[1]),s.clip())}y.push(T),m.push(w);for(var I=0,P=x.length;I<P;++I)x[I].execute(s,1,b,p,n,c);E&&s.restore()}}return s.globalAlpha=u,this.container},e.prototype.renderFeature=function(t,e,r,i,n){if(!r)return!1;var o=!1;if(Array.isArray(r))for(var a=0,s=r.length;a<s;++a)o=(0,$t.Pn)(i,t,r[a],e,this.boundHandleStyleImageChange_,void 0,n)||o;else o=(0,$t.Pn)(i,t,r,e,this.boundHandleStyleImageChange_,void 0,n);return o},e.prototype.tileImageNeedsRender_=function(t){var e=this.getLayer();if(e.getRenderMode()===Ht)return!1;var r=t.getReplayState(e),i=e.getRevision(),n=t.wantedResolution;return r.renderedTileResolution!==n||r.renderedTileRevision!==i},e.prototype.renderTileImage_=function(t,e){var r=this.getLayer(),i=t.getReplayState(r),n=r.getRevision(),o=t.executorGroups[(0,R.sq)(r)];i.renderedTileRevision=n;var a=t.wrappedTileCoord,s=a[0],l=r.getSource(),u=e.pixelRatio,c=e.viewState.projection,h=l.getTileGridForProjection(c),p=h.getResolution(t.tileCoord[0]),d=e.pixelRatio/t.wantedResolution*p,f=h.getResolution(s),g=t.getContext(r);u=Math.round(Math.max(u,d/u));var y=l.getTilePixelSize(s,u,c);g.canvas.width=y[0],g.canvas.height=y[1];var m=u/d;if(1!==m){var v=(0,L.mc)(this.tmpTransform_);(0,L.bA)(v,m,m),g.setTransform.apply(g,v)}var _=h.getTileCoordExtent(a,this.tmpExtent),x=d/f,b=(0,L.mc)(this.tmpTransform_);(0,L.bA)(b,x,-x),(0,L.Iu)(b,-_[0],-_[3]);for(var w=0,E=o.length;w<E;++w)o[w].execute(g,m,b,0,!0,ee[r.getRenderMode()]);i.renderedTileResolution=t.wantedResolution},e}(Vt.Z);const ne=ie;var oe=r(8280),ae=function(){var t=function(e,r){return t=Object.setPrototypeOf||{__proto__:[]}instanceof Array&&function(t,e){t.__proto__=e}||function(t,e){for(var r in e)Object.prototype.hasOwnProperty.call(e,r)&&(t[r]=e[r])},t(e,r)};return function(e,r){if("function"!=typeof r&&null!==r)throw new TypeError("Class extends value "+String(r)+" is not a constructor or null");function i(){this.constructor=e}t(e,r),e.prototype=null===r?Object.create(r):(i.prototype=r.prototype,new i)}}();const se=function(t){function e(e){var r=this,i=e||{},n=(0,c.f0)({},i);delete n.preload,delete n.useInterimTilesOnError,(r=t.call(this,n)||this).on,r.once,r.un,"image"===i.renderMode&&(console.warn('renderMode: "image" is deprecated. Option ignored.'),i.renderMode=void 0);var o=i.renderMode||Yt;return(0,m.h)(o==Yt||o==Ht,28),r.renderMode_=o,r.setPreload(i.preload?i.preload:0),r.setUseInterimTilesOnError(void 0===i.useInterimTilesOnError||i.useInterimTilesOnError),r.getBackground,r.setBackground,r}return ae(e,t),e.prototype.createRenderer=function(){return new ne(this)},e.prototype.getFeatures=function(e){return t.prototype.getFeatures.call(this,e)},e.prototype.getRenderMode=function(){return this.renderMode_},e.prototype.getPreload=function(){return this.get(oe.Z.PRELOAD)},e.prototype.getUseInterimTilesOnError=function(){return this.get(oe.Z.USE_INTERIM_TILES_ON_ERROR)},e.prototype.setPreload=function(t){this.set(oe.Z.PRELOAD,t)},e.prototype.setUseInterimTilesOnError=function(t){this.set(oe.Z.USE_INTERIM_TILES_ON_ERROR,t)},e}(o.Z);var le=r(3320),ue=r(1090),ce=r(3958),he=function(){var t=function(e,r){return t=Object.setPrototypeOf||{__proto__:[]}instanceof Array&&function(t,e){t.__proto__=e}||function(t,e){for(var r in e)Object.prototype.hasOwnProperty.call(e,r)&&(t[r]=e[r])},t(e,r)};return function(e,r){if("function"!=typeof r&&null!==r)throw new TypeError("Class extends value "+String(r)+" is not a constructor or null");function i(){this.constructor=e}t(e,r),e.prototype=null===r?Object.create(r):(i.prototype=r.prototype,new i)}}();function pe(t){return"string"==typeof t?JSON.parse(t)||null:null!==t?t:null}const de=function(t){function e(){return t.call(this)||this}return he(e,t),e.prototype.getType=function(){return vt.Z.JSON},e.prototype.readFeature=function(t,e){return this.readFeatureFromObject(pe(t),this.getReadOptions(t,e))},e.prototype.readFeatures=function(t,e){return this.readFeaturesFromObject(pe(t),this.getReadOptions(t,e))},e.prototype.readFeatureFromObject=function(t,e){return(0,R.O3)()},e.prototype.readFeaturesFromObject=function(t,e){return(0,R.O3)()},e.prototype.readGeometry=function(t,e){return this.readGeometryFromObject(pe(t),this.getReadOptions(t,e))},e.prototype.readGeometryFromObject=function(t,e){return(0,R.O3)()},e.prototype.readProjection=function(t){return this.readProjectionFromObject(pe(t))},e.prototype.readProjectionFromObject=function(t){return(0,R.O3)()},e.prototype.writeFeature=function(t,e){return JSON.stringify(this.writeFeatureObject(t,e))},e.prototype.writeFeatureObject=function(t,e){return(0,R.O3)()},e.prototype.writeFeatures=function(t,e){return JSON.stringify(this.writeFeaturesObject(t,e))},e.prototype.writeFeaturesObject=function(t,e){return(0,R.O3)()},e.prototype.writeGeometry=function(t,e){return JSON.stringify(this.writeGeometryObject(t,e))},e.prototype.writeGeometryObject=function(t,e){return(0,R.O3)()},e}(yt);var fe=function(){var t=function(e,r){return t=Object.setPrototypeOf||{__proto__:[]}instanceof Array&&function(t,e){t.__proto__=e}||function(t,e){for(var r in e)Object.prototype.hasOwnProperty.call(e,r)&&(t[r]=e[r])},t(e,r)};return function(e,r){if("function"!=typeof r&&null!==r)throw new TypeError("Class extends value "+String(r)+" is not a constructor or null");function i(){this.constructor=e}t(e,r),e.prototype=null===r?Object.create(r):(i.prototype=r.prototype,new i)}}();function ge(t,e){if(!t)return null;var r;switch(t.type){case a.Z.POINT:r=function(t){return new St.default(t.coordinates)}(t);break;case a.Z.LINE_STRING:r=function(t){return new xt.Z(t.coordinates)}(t);break;case a.Z.POLYGON:r=function(t){return new Ct.ZP(t.coordinates)}(t);break;case a.Z.MULTI_POINT:r=function(t){return new wt.Z(t.coordinates)}(t);break;case a.Z.MULTI_LINE_STRING:r=function(t){return new bt.Z(t.coordinates)}(t);break;case a.Z.MULTI_POLYGON:r=function(t){return new Et.Z(t.coordinates)}(t);break;case a.Z.GEOMETRY_COLLECTION:r=function(t,e){var r=t.geometries.map((function(t){return ge(t,undefined)}));return new ce.Z(r)}(t);break;default:throw new Error("Unsupported GeoJSON type: "+t.type)}return mt(r,!1,e)}function ye(t,e){var r,i=(t=mt(t,!0,e)).getType();switch(i){case a.Z.POINT:r=function(t,e){return{type:"Point",coordinates:t.getCoordinates()}}(t);break;case a.Z.LINE_STRING:r=function(t,e){return{type:"LineString",coordinates:t.getCoordinates()}}(t);break;case a.Z.POLYGON:r=function(t,e){var r;return e&&(r=e.rightHanded),{type:"Polygon",coordinates:t.getCoordinates(r)}}(t,e);break;case a.Z.MULTI_POINT:r=function(t,e){return{type:"MultiPoint",coordinates:t.getCoordinates()}}(t);break;case a.Z.MULTI_LINE_STRING:r=function(t,e){return{type:"MultiLineString",coordinates:t.getCoordinates()}}(t);break;case a.Z.MULTI_POLYGON:r=function(t,e){var r;return e&&(r=e.rightHanded),{type:"MultiPolygon",coordinates:t.getCoordinates(r)}}(t,e);break;case a.Z.GEOMETRY_COLLECTION:r=function(t,e){return{type:"GeometryCollection",geometries:t.getGeometriesArray().map((function(t){var r=(0,c.f0)({},e);return delete r.featureProjection,ye(t,r)}))}}(t,e);break;case a.Z.CIRCLE:r={type:"GeometryCollection",geometries:[]};break;default:throw new Error("Unsupported geometry type: "+i)}return r}const me=function(t){function e(e){var r=this,i=e||{};return(r=t.call(this)||this).dataProjection=(0,gt.get)(i.dataProjection?i.dataProjection:"EPSG:4326"),i.featureProjection&&(r.defaultFeatureProjection=(0,gt.get)(i.featureProjection)),r.geometryName_=i.geometryName,r.extractGeometryName_=i.extractGeometryName,r.supportedMediaTypes=["application/geo+json","application/vnd.geo+json"],r}return fe(e,t),e.prototype.readFeatureFromObject=function(t,e){var r,i=ge((r="Feature"===t.type?t:{type:"Feature",geometry:t,properties:null}).geometry,e),n=new ue.default;return this.geometryName_?n.setGeometryName(this.geometryName_):this.extractGeometryName_&&"geometry_name"in r!==void 0&&n.setGeometryName(r.geometry_name),n.setGeometry(i),"id"in r&&n.setId(r.id),r.properties&&n.setProperties(r.properties,!0),n},e.prototype.readFeaturesFromObject=function(t,e){var r=null;if("FeatureCollection"===t.type){r=[];for(var i=t.features,n=0,o=i.length;n<o;++n)r.push(this.readFeatureFromObject(i[n],e))}else r=[this.readFeatureFromObject(t,e)];return r},e.prototype.readGeometryFromObject=function(t,e){return ge(t,e)},e.prototype.readProjectionFromObject=function(t){var e,r=t.crs;return r?"name"==r.type?e=(0,gt.get)(r.properties.name):"EPSG"===r.type?e=(0,gt.get)("EPSG:"+r.properties.code):(0,m.h)(!1,36):e=this.dataProjection,e},e.prototype.writeFeatureObject=function(t,e){e=this.adaptOptions(e);var r={type:"Feature",geometry:null,properties:null},i=t.getId();if(void 0!==i&&(r.id=i),!t.hasProperties())return r;var n=t.getProperties(),o=t.getGeometry();return o&&(r.geometry=ye(o,e),delete n[t.getGeometryName()]),(0,c.xb)(n)||(r.properties=n),r},e.prototype.writeFeaturesObject=function(t,e){e=this.adaptOptions(e);for(var r=[],i=0,n=t.length;i<n;++i)r.push(this.writeFeatureObject(t[i],e));return{type:"FeatureCollection",features:r}},e.prototype.writeGeometryObject=function(t,e){return ye(t,this.adaptOptions(e))},e}(de);var ve=r(8738),_e=r(902),xe=r(2371),be=r(283),we=r(1345),Ee=r(2370),Te=r(8958),Se=r(7539),Ce=r(1280),Oe=r(4138),Re={$version:8,$root:{version:{required:!0,type:"enum",values:[8],doc:"Style specification version number. Must be 8.",example:8},name:{type:"string",doc:"A human-readable name for the style.",example:"Bright"},metadata:{type:"*",doc:"Arbitrary properties useful to track with the stylesheet, but do not influence rendering. Properties should be prefixed to avoid collisions, like 'mapbox:'."},center:{type:"array",value:"number",doc:"Default map center in longitude and latitude.  The style center will be used only if the map has not been positioned by other means (e.g. map options or user interaction).",example:[-73.9749,40.7736]},zoom:{type:"number",doc:"Default zoom level.  The style zoom will be used only if the map has not been positioned by other means (e.g. map options or user interaction).",example:12.5},bearing:{type:"number",default:0,period:360,units:"degrees",doc:'Default bearing, in degrees. The bearing is the compass direction that is "up"; for example, a bearing of 90° orients the map so that east is up. This value will be used only if the map has not been positioned by other means (e.g. map options or user interaction).',example:29},pitch:{type:"number",default:0,units:"degrees",doc:"Default pitch, in degrees. Zero is perpendicular to the surface, for a look straight down at the map, while a greater value like 60 looks ahead towards the horizon. The style pitch will be used only if the map has not been positioned by other means (e.g. map options or user interaction).",example:50},light:{type:"light",doc:"The global light source.",example:{anchor:"viewport",color:"white",intensity:.4}},terrain:{type:"terrain",doc:"A global modifier that elevates layers and markers based on a DEM data source."},fog:{type:"fog",doc:"A global effect that fades layers and markers based on their distance to the camera. The fog can be used to approximate the effect of atmosphere on distant objects and enhance the depth perception of the map when used with terrain or 3D features."},sources:{required:!0,type:"sources",doc:"Data source specifications.",example:{"mapbox-streets":{type:"vector",url:"mapbox://mapbox.mapbox-streets-v6"}}},sprite:{type:"string",doc:"A base URL for retrieving the sprite image and metadata. The extensions `.png`, `.json` and scale factor `@2x.png` will be automatically appended. This property is required if any layer uses the `background-pattern`, `fill-pattern`, `line-pattern`, `fill-extrusion-pattern`, or `icon-image` properties. The URL must be absolute, containing the [scheme, authority and path components](https://en.wikipedia.org/wiki/URL#Syntax).",example:"mapbox://sprites/mapbox/bright-v8"},glyphs:{type:"string",doc:"A URL template for loading signed-distance-field glyph sets in PBF format. The URL must include `{fontstack}` and `{range}` tokens. This property is required if any layer uses the `text-field` layout property. The URL must be absolute, containing the [scheme, authority and path components](https://en.wikipedia.org/wiki/URL#Syntax).",example:"mapbox://fonts/mapbox/{fontstack}/{range}.pbf"},transition:{type:"transition",doc:"A global transition definition to use as a default across properties, to be used for timing transitions between one value and the next when no property-specific transition is set. Collision-based symbol fading is controlled independently of the style's `transition` property.",example:{duration:300,delay:0}},projection:{type:"projection",doc:"The projection the map should be rendered in. Supported projections are Albers, Equal Earth, Equirectangular (WGS84), Lambert conformal conic, Mercator, Natural Earth, and Winkel Tripel. Terrain, fog, sky and CustomLayerInterface are not supported for projections other than mercator.",example:{name:"albers",center:[-154,50],parallels:[55,65]}},layers:{required:!0,type:"array",value:"layer",doc:"Layers will be drawn in the order of this array.",example:[{id:"water",source:"mapbox-streets","source-layer":"water",type:"fill",paint:{"fill-color":"#00ffff"}}]}},sources:{"*":{type:"source",doc:"Specification of a data source. For vector and raster sources, either TileJSON or a URL to a TileJSON must be provided. For image and video sources, a URL must be provided. For GeoJSON sources, a URL or inline GeoJSON must be provided."}},source:["source_vector","source_raster","source_raster_dem","source_geojson","source_video","source_image"],source_vector:{type:{required:!0,type:"enum",values:{vector:{doc:"A vector tile source."}},doc:"The type of the source."},url:{type:"string",doc:"A URL to a TileJSON resource. Supported protocols are `http:`, `https:`, and `mapbox://<Tileset ID>`."},tiles:{type:"array",value:"string",doc:"An array of one or more tile source URLs, as in the TileJSON spec."},bounds:{type:"array",value:"number",length:4,default:[-180,-85.051129,180,85.051129],doc:"An array containing the longitude and latitude of the southwest and northeast corners of the source's bounding box in the following order: `[sw.lng, sw.lat, ne.lng, ne.lat]`. When this property is included in a source, no tiles outside of the given bounds are requested by Mapbox GL."},scheme:{type:"enum",values:{xyz:{doc:"Slippy map tilenames scheme."},tms:{doc:"OSGeo spec scheme."}},default:"xyz",doc:"Influences the y direction of the tile coordinates. The global-mercator (aka Spherical Mercator) profile is assumed."},minzoom:{type:"number",default:0,doc:"Minimum zoom level for which tiles are available, as in the TileJSON spec."},maxzoom:{type:"number",default:22,doc:"Maximum zoom level for which tiles are available, as in the TileJSON spec. Data from tiles at the maxzoom are used when displaying the map at higher zoom levels."},attribution:{type:"string",doc:"Contains an attribution to be displayed when the map is shown to a user."},promoteId:{type:"promoteId",doc:"A property to use as a feature id (for feature state). Either a property name, or an object of the form `{<sourceLayer>: <propertyName>}`. If specified as a string for a vector tile source, the same property is used across all its source layers."},volatile:{type:"boolean",default:!1,doc:"A setting to determine whether a source's tiles are cached locally.","sdk-support":{"basic functionality":{android:"9.3.0",ios:"5.10.0"}}},"*":{type:"*",doc:"Other keys to configure the data source."}},source_raster:{type:{required:!0,type:"enum",values:{raster:{doc:"A raster tile source."}},doc:"The type of the source."},url:{type:"string",doc:"A URL to a TileJSON resource. Supported protocols are `http:`, `https:`, and `mapbox://<Tileset ID>`."},tiles:{type:"array",value:"string",doc:"An array of one or more tile source URLs, as in the TileJSON spec."},bounds:{type:"array",value:"number",length:4,default:[-180,-85.051129,180,85.051129],doc:"An array containing the longitude and latitude of the southwest and northeast corners of the source's bounding box in the following order: `[sw.lng, sw.lat, ne.lng, ne.lat]`. When this property is included in a source, no tiles outside of the given bounds are requested by Mapbox GL."},minzoom:{type:"number",default:0,doc:"Minimum zoom level for which tiles are available, as in the TileJSON spec."},maxzoom:{type:"number",default:22,doc:"Maximum zoom level for which tiles are available, as in the TileJSON spec. Data from tiles at the maxzoom are used when displaying the map at higher zoom levels."},tileSize:{type:"number",default:512,units:"pixels",doc:"The minimum visual size to display tiles for this layer. Only configurable for raster layers."},scheme:{type:"enum",values:{xyz:{doc:"Slippy map tilenames scheme."},tms:{doc:"OSGeo spec scheme."}},default:"xyz",doc:"Influences the y direction of the tile coordinates. The global-mercator (aka Spherical Mercator) profile is assumed."},attribution:{type:"string",doc:"Contains an attribution to be displayed when the map is shown to a user."},volatile:{type:"boolean",default:!1,doc:"A setting to determine whether a source's tiles are cached locally.","sdk-support":{"basic functionality":{android:"9.3.0",ios:"5.10.0"}}},"*":{type:"*",doc:"Other keys to configure the data source."}},source_raster_dem:{type:{required:!0,type:"enum",values:{"raster-dem":{doc:"A RGB-encoded raster DEM source"}},doc:"The type of the source."},url:{type:"string",doc:"A URL to a TileJSON resource. Supported protocols are `http:`, `https:`, and `mapbox://<Tileset ID>`."},tiles:{type:"array",value:"string",doc:"An array of one or more tile source URLs, as in the TileJSON spec."},bounds:{type:"array",value:"number",length:4,default:[-180,-85.051129,180,85.051129],doc:"An array containing the longitude and latitude of the southwest and northeast corners of the source's bounding box in the following order: `[sw.lng, sw.lat, ne.lng, ne.lat]`. When this property is included in a source, no tiles outside of the given bounds are requested by Mapbox GL."},minzoom:{type:"number",default:0,doc:"Minimum zoom level for which tiles are available, as in the TileJSON spec."},maxzoom:{type:"number",default:22,doc:"Maximum zoom level for which tiles are available, as in the TileJSON spec. Data from tiles at the maxzoom are used when displaying the map at higher zoom levels."},tileSize:{type:"number",default:512,units:"pixels",doc:"The minimum visual size to display tiles for this layer. Only configurable for raster layers."},attribution:{type:"string",doc:"Contains an attribution to be displayed when the map is shown to a user."},encoding:{type:"enum",values:{terrarium:{doc:"Terrarium format PNG tiles. See https://aws.amazon.com/es/public-datasets/terrain/ for more info."},mapbox:{doc:"Mapbox Terrain RGB tiles. See https://www.mapbox.com/help/access-elevation-data/#mapbox-terrain-rgb for more info."}},default:"mapbox",doc:"The encoding used by this source. Mapbox Terrain RGB is used by default"},volatile:{type:"boolean",default:!1,doc:"A setting to determine whether a source's tiles are cached locally.","sdk-support":{"basic functionality":{android:"9.3.0",ios:"5.10.0"}}},"*":{type:"*",doc:"Other keys to configure the data source."}},source_geojson:{type:{required:!0,type:"enum",values:{geojson:{doc:"A GeoJSON data source."}},doc:"The data type of the GeoJSON source."},data:{type:"*",doc:"A URL to a GeoJSON file, or inline GeoJSON."},maxzoom:{type:"number",default:18,doc:"Maximum zoom level at which to create vector tiles (higher means greater detail at high zoom levels)."},attribution:{type:"string",doc:"Contains an attribution to be displayed when the map is shown to a user."},buffer:{type:"number",default:128,maximum:512,minimum:0,doc:"Size of the tile buffer on each side. A value of 0 produces no buffer. A value of 512 produces a buffer as wide as the tile itself. Larger values produce fewer rendering artifacts near tile edges and slower performance."},filter:{type:"*",doc:"An expression for filtering features prior to processing them for rendering."},tolerance:{type:"number",default:.375,doc:"Douglas-Peucker simplification tolerance (higher means simpler geometries and faster performance)."},cluster:{type:"boolean",default:!1,doc:"If the data is a collection of point features, setting this to true clusters the points by radius into groups. Cluster groups become new `Point` features in the source with additional properties:\n * `cluster` Is `true` if the point is a cluster \n * `cluster_id` A unqiue id for the cluster to be used in conjunction with the [cluster inspection methods](https://www.mapbox.com/mapbox-gl-js/api/#geojsonsource#getclusterexpansionzoom)\n * `point_count` Number of original points grouped into this cluster\n * `point_count_abbreviated` An abbreviated point count"},clusterRadius:{type:"number",default:50,minimum:0,doc:"Radius of each cluster if clustering is enabled. A value of 512 indicates a radius equal to the width of a tile."},clusterMaxZoom:{type:"number",doc:"Max zoom on which to cluster points if clustering is enabled. Defaults to one zoom less than maxzoom (so that last zoom features are not clustered). Clusters are re-evaluated at integer zoom levels so setting clusterMaxZoom to 14 means the clusters will be displayed until z15."},clusterMinPoints:{type:"number",doc:"Minimum number of points necessary to form a cluster if clustering is enabled. Defaults to `2`."},clusterProperties:{type:"*",doc:'An object defining custom properties on the generated clusters if clustering is enabled, aggregating values from clustered points. Has the form `{"property_name": [operator, map_expression]}`. `operator` is any expression function that accepts at least 2 operands (e.g. `"+"` or `"max"`) — it accumulates the property value from clusters/points the cluster contains; `map_expression` produces the value of a single point.\n\nExample: `{"sum": ["+", ["get", "scalerank"]]}`.\n\nFor more advanced use cases, in place of `operator`, you can use a custom reduce expression that references a special `["accumulated"]` value, e.g.:\n`{"sum": [["+", ["accumulated"], ["get", "sum"]], ["get", "scalerank"]]}`'},lineMetrics:{type:"boolean",default:!1,doc:"Whether to calculate line distance metrics. This is required for line layers that specify `line-gradient` values."},generateId:{type:"boolean",default:!1,doc:"Whether to generate ids for the geojson features. When enabled, the `feature.id` property will be auto assigned based on its index in the `features` array, over-writing any previous values."},promoteId:{type:"promoteId",doc:"A property to use as a feature id (for feature state). Either a property name, or an object of the form `{<sourceLayer>: <propertyName>}`."}},source_video:{type:{required:!0,type:"enum",values:{video:{doc:"A video data source."}},doc:"The data type of the video source."},urls:{required:!0,type:"array",value:"string",doc:"URLs to video content in order of preferred format."},coordinates:{required:!0,doc:"Corners of video specified in longitude, latitude pairs.",type:"array",length:4,value:{type:"array",length:2,value:"number",doc:"A single longitude, latitude pair."}}},source_image:{type:{required:!0,type:"enum",values:{image:{doc:"An image data source."}},doc:"The data type of the image source."},url:{required:!0,type:"string",doc:"URL that points to an image."},coordinates:{required:!0,doc:"Corners of image specified in longitude, latitude pairs.",type:"array",length:4,value:{type:"array",length:2,value:"number",doc:"A single longitude, latitude pair."}}},layer:{id:{type:"string",doc:"Unique layer name.",required:!0},type:{type:"enum",values:{fill:{doc:"A filled polygon with an optional stroked border.","sdk-support":{"basic functionality":{js:"0.10.0",android:"2.0.1",ios:"2.0.0",macos:"0.1.0"}}},line:{doc:"A stroked line.","sdk-support":{"basic functionality":{js:"0.10.0",android:"2.0.1",ios:"2.0.0",macos:"0.1.0"}}},symbol:{doc:"An icon or a text label.","sdk-support":{"basic functionality":{js:"0.10.0",android:"2.0.1",ios:"2.0.0",macos:"0.1.0"}}},circle:{doc:"A filled circle.","sdk-support":{"basic functionality":{js:"0.10.0",android:"2.0.1",ios:"2.0.0",macos:"0.1.0"}}},heatmap:{doc:"A heatmap.","sdk-support":{"basic functionality":{js:"0.41.0",android:"6.0.0",ios:"4.0.0",macos:"0.7.0"}}},"fill-extrusion":{doc:"An extruded (3D) polygon.","sdk-support":{"basic functionality":{js:"0.27.0",android:"5.1.0",ios:"3.6.0",macos:"0.5.0"}}},raster:{doc:"Raster map textures such as satellite imagery.","sdk-support":{"basic functionality":{js:"0.10.0",android:"2.0.1",ios:"2.0.0",macos:"0.1.0"}}},hillshade:{doc:"Client-side hillshading visualization based on DEM data. Currently, the implementation only supports Mapbox Terrain RGB and Mapzen Terrarium tiles.","sdk-support":{"basic functionality":{js:"0.43.0",android:"6.0.0",ios:"4.0.0",macos:"0.7.0"}}},background:{doc:"The background color or pattern of the map.","sdk-support":{"basic functionality":{js:"0.10.0",android:"2.0.1",ios:"2.0.0",macos:"0.1.0"}}},sky:{doc:"A spherical dome around the map that is always rendered behind all other layers.","sdk-support":{"basic functionality":{js:"2.0.0",ios:"10.0.0",android:"10.0.0"}}}},doc:"Rendering type of this layer.",required:!0},metadata:{type:"*",doc:"Arbitrary properties useful to track with the layer, but do not influence rendering. Properties should be prefixed to avoid collisions, like 'mapbox:'."},source:{type:"string",doc:"Name of a source description to be used for this layer. Required for all layer types except `background`."},"source-layer":{type:"string",doc:"Layer to use from a vector tile source. Required for vector tile sources; prohibited for all other source types, including GeoJSON sources."},minzoom:{type:"number",minimum:0,maximum:24,doc:"The minimum zoom level for the layer. At zoom levels less than the minzoom, the layer will be hidden."},maxzoom:{type:"number",minimum:0,maximum:24,doc:"The maximum zoom level for the layer. At zoom levels equal to or greater than the maxzoom, the layer will be hidden."},filter:{type:"filter",doc:'An expression specifying conditions on source features. Only features that match the filter are displayed. Zoom expressions in filters are only evaluated at integer zoom levels. The `["feature-state", ...]` expression is not supported in filter expressions.  The `["pitch"]` and `["distance-from-center"]` expressions are supported only for filter expressions on the symbol layer.'},layout:{type:"layout",doc:"Layout properties for the layer."},paint:{type:"paint",doc:"Default paint properties for this layer."}},layout:["layout_fill","layout_line","layout_circle","layout_heatmap","layout_fill-extrusion","layout_symbol","layout_raster","layout_hillshade","layout_background","layout_sky"],layout_background:{visibility:{type:"enum",values:{visible:{doc:"The layer is shown."},none:{doc:"The layer is not shown."}},default:"visible",doc:"Whether this layer is displayed.","sdk-support":{"basic functionality":{js:"0.10.0",android:"2.0.1",ios:"2.0.0",macos:"0.1.0"}},"property-type":"constant"}},layout_sky:{visibility:{type:"enum",values:{visible:{doc:"The layer is shown."},none:{doc:"The layer is not shown."}},default:"visible",doc:"Whether this layer is displayed.","sdk-support":{"basic functionality":{js:"2.0.0",ios:"10.0.0",android:"10.0.0"}},"property-type":"constant"}},layout_fill:{"fill-sort-key":{type:"number",doc:"Sorts features in ascending order based on this value. Features with a higher sort key will appear above features with a lower sort key.","sdk-support":{"basic functionality":{js:"1.2.0",android:"9.1.0",ios:"5.8.0",macos:"0.15.0"},"data-driven styling":{js:"1.2.0",android:"9.1.0",ios:"5.8.0",macos:"0.15.0"}},expression:{interpolated:!1,parameters:["zoom","feature"]},"property-type":"data-driven"},visibility:{type:"enum",values:{visible:{doc:"The layer is shown."},none:{doc:"The layer is not shown."}},default:"visible",doc:"Whether this layer is displayed.","sdk-support":{"basic functionality":{js:"0.10.0",android:"2.0.1",ios:"2.0.0",macos:"0.1.0"}},"property-type":"constant"}},layout_circle:{"circle-sort-key":{type:"number",doc:"Sorts features in ascending order based on this value. Features with a higher sort key will appear above features with a lower sort key.","sdk-support":{"basic functionality":{js:"1.2.0",android:"9.2.0",ios:"5.9.0",macos:"0.16.0"},"data-driven styling":{js:"1.2.0",android:"9.2.0",ios:"5.9.0",macos:"0.16.0"}},expression:{interpolated:!1,parameters:["zoom","feature"]},"property-type":"data-driven"},visibility:{type:"enum",values:{visible:{doc:"The layer is shown."},none:{doc:"The layer is not shown."}},default:"visible",doc:"Whether this layer is displayed.","sdk-support":{"basic functionality":{js:"0.10.0",android:"2.0.1",ios:"2.0.0",macos:"0.1.0"}},"property-type":"constant"}},layout_heatmap:{visibility:{type:"enum",values:{visible:{doc:"The layer is shown."},none:{doc:"The layer is not shown."}},default:"visible",doc:"Whether this layer is displayed.","sdk-support":{"basic functionality":{js:"0.41.0",android:"6.0.0",ios:"4.0.0",macos:"0.7.0"}},"property-type":"constant"}},"layout_fill-extrusion":{visibility:{type:"enum",values:{visible:{doc:"The layer is shown."},none:{doc:"The layer is not shown."}},default:"visible",doc:"Whether this layer is displayed.","sdk-support":{"basic functionality":{js:"0.27.0",android:"5.1.0",ios:"3.6.0",macos:"0.5.0"}},"property-type":"constant"}},layout_line:{"line-cap":{type:"enum",values:{butt:{doc:"A cap with a squared-off end which is drawn to the exact endpoint of the line."},round:{doc:"A cap with a rounded end which is drawn beyond the endpoint of the line at a radius of one-half of the line's width and centered on the endpoint of the line."},square:{doc:"A cap with a squared-off end which is drawn beyond the endpoint of the line at a distance of one-half of the line's width."}},default:"butt",doc:"The display of line endings.","sdk-support":{"basic functionality":{js:"0.10.0",android:"2.0.1",ios:"2.0.0",macos:"0.1.0"},"data-driven styling":{js:"2.3.0"}},expression:{interpolated:!1,parameters:["zoom","feature"]},"property-type":"data-driven"},"line-join":{type:"enum",values:{bevel:{doc:"A join with a squared-off end which is drawn beyond the endpoint of the line at a distance of one-half of the line's width."},round:{doc:"A join with a rounded end which is drawn beyond the endpoint of the line at a radius of one-half of the line's width and centered on the endpoint of the line."},miter:{doc:"A join with a sharp, angled corner which is drawn with the outer sides beyond the endpoint of the path until they meet."}},default:"miter",doc:"The display of lines when joining.","sdk-support":{"basic functionality":{js:"0.10.0",android:"2.0.1",ios:"2.0.0",macos:"0.1.0"},"data-driven styling":{js:"0.40.0",android:"5.2.0",ios:"3.7.0",macos:"0.6.0"}},expression:{interpolated:!1,parameters:["zoom","feature"]},"property-type":"data-driven"},"line-miter-limit":{type:"number",default:2,doc:"Used to automatically convert miter joins to bevel joins for sharp angles.",requires:[{"line-join":"miter"}],"sdk-support":{"basic functionality":{js:"0.10.0",android:"2.0.1",ios:"2.0.0",macos:"0.1.0"}},expression:{interpolated:!0,parameters:["zoom"]},"property-type":"data-constant"},"line-round-limit":{type:"number",default:1.05,doc:"Used to automatically convert round joins to miter joins for shallow angles.",requires:[{"line-join":"round"}],"sdk-support":{"basic functionality":{js:"0.10.0",android:"2.0.1",ios:"2.0.0",macos:"0.1.0"}},expression:{interpolated:!0,parameters:["zoom"]},"property-type":"data-constant"},"line-sort-key":{type:"number",doc:"Sorts features in ascending order based on this value. Features with a higher sort key will appear above features with a lower sort key.","sdk-support":{"basic functionality":{js:"1.2.0",android:"9.1.0",ios:"5.8.0",macos:"0.15.0"},"data-driven styling":{js:"1.2.0",android:"9.1.0",ios:"5.8.0",macos:"0.15.0"}},expression:{interpolated:!1,parameters:["zoom","feature"]},"property-type":"data-driven"},visibility:{type:"enum",values:{visible:{doc:"The layer is shown."},none:{doc:"The layer is not shown."}},default:"visible",doc:"Whether this layer is displayed.","sdk-support":{"basic functionality":{js:"0.10.0",android:"2.0.1",ios:"2.0.0",macos:"0.1.0"}},"property-type":"constant"}},layout_symbol:{"symbol-placement":{type:"enum",values:{point:{doc:"The label is placed at the point where the geometry is located."},line:{doc:"The label is placed along the line of the geometry. Can only be used on `LineString` and `Polygon` geometries."},"line-center":{doc:"The label is placed at the center of the line of the geometry. Can only be used on `LineString` and `Polygon` geometries. Note that a single feature in a vector tile may contain multiple line geometries."}},default:"point",doc:"Label placement relative to its geometry.","sdk-support":{"basic functionality":{js:"0.10.0",android:"2.0.1",ios:"2.0.0",macos:"0.1.0"},"`line-center` value":{js:"0.47.0",android:"6.4.0",ios:"4.3.0",macos:"0.10.0"}},expression:{interpolated:!1,parameters:["zoom"]},"property-type":"data-constant"},"symbol-spacing":{type:"number",default:250,minimum:1,units:"pixels",doc:"Distance between two symbol anchors.",requires:[{"symbol-placement":"line"}],"sdk-support":{"basic functionality":{js:"0.10.0",android:"2.0.1",ios:"2.0.0",macos:"0.1.0"}},expression:{interpolated:!0,parameters:["zoom"]},"property-type":"data-constant"},"symbol-avoid-edges":{type:"boolean",default:!1,doc:"If true, the symbols will not cross tile edges to avoid mutual collisions. Recommended in layers that don't have enough padding in the vector tile to prevent collisions, or if it is a point symbol layer placed after a line symbol layer. When using a client that supports global collision detection, like Mapbox GL JS version 0.42.0 or greater, enabling this property is not needed to prevent clipped labels at tile boundaries.","sdk-support":{"basic functionality":{js:"0.10.0",android:"2.0.1",ios:"2.0.0",macos:"0.1.0"}},expression:{interpolated:!1,parameters:["zoom"]},"property-type":"data-constant"},"symbol-sort-key":{type:"number",doc:"Sorts features in ascending order based on this value. Features with lower sort keys are drawn and placed first.  When `icon-allow-overlap` or `text-allow-overlap` is `false`, features with a lower sort key will have priority during placement. When `icon-allow-overlap` or `text-allow-overlap` is set to `true`, features with a higher sort key will overlap over features with a lower sort key.","sdk-support":{"basic functionality":{js:"0.53.0",android:"7.4.0",ios:"4.11.0",macos:"0.14.0"},"data-driven styling":{js:"0.53.0",android:"7.4.0",ios:"4.11.0",macos:"0.14.0"}},expression:{interpolated:!1,parameters:["zoom","feature"]},"property-type":"data-driven"},"symbol-z-order":{type:"enum",values:{auto:{doc:"Sorts symbols by `symbol-sort-key` if set. Otherwise, sorts symbols by their y-position relative to the viewport if `icon-allow-overlap` or `text-allow-overlap` is set to `true` or `icon-ignore-placement` or `text-ignore-placement` is `false`."},"viewport-y":{doc:"Sorts symbols by their y-position relative to the viewport if `icon-allow-overlap` or `text-allow-overlap` is set to `true` or `icon-ignore-placement` or `text-ignore-placement` is `false`."},source:{doc:"Sorts symbols by `symbol-sort-key` if set. Otherwise, no sorting is applied; symbols are rendered in the same order as the source data."}},default:"auto",doc:"Determines whether overlapping symbols in the same layer are rendered in the order that they appear in the data source or by their y-position relative to the viewport. To control the order and prioritization of symbols otherwise, use `symbol-sort-key`.","sdk-support":{"basic functionality":{js:"0.49.0",android:"6.6.0",ios:"4.5.0",macos:"0.12.0"}},expression:{interpolated:!1,parameters:["zoom"]},"property-type":"data-constant"},"icon-allow-overlap":{type:"boolean",default:!1,doc:"If true, the icon will be visible even if it collides with other previously drawn symbols.",requires:["icon-image"],"sdk-support":{"basic functionality":{js:"0.10.0",android:"2.0.1",ios:"2.0.0",macos:"0.1.0"}},expression:{interpolated:!1,parameters:["zoom"]},"property-type":"data-constant"},"icon-ignore-placement":{type:"boolean",default:!1,doc:"If true, other symbols can be visible even if they collide with the icon.",requires:["icon-image"],"sdk-support":{"basic functionality":{js:"0.10.0",android:"2.0.1",ios:"2.0.0",macos:"0.1.0"}},expression:{interpolated:!1,parameters:["zoom"]},"property-type":"data-constant"},"icon-optional":{type:"boolean",default:!1,doc:"If true, text will display without their corresponding icons when the icon collides with other symbols and the text does not.",requires:["icon-image","text-field"],"sdk-support":{"basic functionality":{js:"0.10.0",android:"2.0.1",ios:"2.0.0",macos:"0.1.0"}},expression:{interpolated:!1,parameters:["zoom"]},"property-type":"data-constant"},"icon-rotation-alignment":{type:"enum",values:{map:{doc:"When `symbol-placement` is set to `point`, aligns icons east-west. When `symbol-placement` is set to `line` or `line-center`, aligns icon x-axes with the line."},viewport:{doc:"Produces icons whose x-axes are aligned with the x-axis of the viewport, regardless of the value of `symbol-placement`."},auto:{doc:"When `symbol-placement` is set to `point`, this is equivalent to `viewport`. When `symbol-placement` is set to `line` or `line-center`, this is equivalent to `map`."}},default:"auto",doc:"In combination with `symbol-placement`, determines the rotation behavior of icons.",requires:["icon-image"],"sdk-support":{"basic functionality":{js:"0.10.0",android:"2.0.1",ios:"2.0.0",macos:"0.1.0"},"`auto` value":{js:"0.25.0",android:"4.2.0",ios:"3.4.0",macos:"0.3.0"}},expression:{interpolated:!1,parameters:["zoom"]},"property-type":"data-constant"},"icon-size":{type:"number",default:1,minimum:0,units:"factor of the original icon size",doc:"Scales the original size of the icon by the provided factor. The new pixel size of the image will be the original pixel size multiplied by `icon-size`. 1 is the original size; 3 triples the size of the image.",requires:["icon-image"],"sdk-support":{"basic functionality":{js:"0.10.0",android:"2.0.1",ios:"2.0.0",macos:"0.1.0"},"data-driven styling":{js:"0.35.0",android:"5.1.0",ios:"3.6.0",macos:"0.5.0"}},expression:{interpolated:!0,parameters:["zoom","feature"]},"property-type":"data-driven"},"icon-text-fit":{type:"enum",values:{none:{doc:"The icon is displayed at its intrinsic aspect ratio."},width:{doc:"The icon is scaled in the x-dimension to fit the width of the text."},height:{doc:"The icon is scaled in the y-dimension to fit the height of the text."},both:{doc:"The icon is scaled in both x- and y-dimensions."}},default:"none",doc:"Scales the icon to fit around the associated text.",requires:["icon-image","text-field"],"sdk-support":{"basic functionality":{js:"0.21.0",android:"4.2.0",ios:"3.4.0",macos:"0.2.1"},"stretchable icons":{js:"1.6.0",android:"9.2.0",ios:"5.8.0",macos:"0.15.0"}},expression:{interpolated:!1,parameters:["zoom"]},"property-type":"data-constant"},"icon-text-fit-padding":{type:"array",value:"number",length:4,default:[0,0,0,0],units:"pixels",doc:"Size of the additional area added to dimensions determined by `icon-text-fit`, in clockwise order: top, right, bottom, left.",requires:["icon-image","text-field",{"icon-text-fit":["both","width","height"]}],"sdk-support":{"basic functionality":{js:"0.21.0",android:"4.2.0",ios:"3.4.0",macos:"0.2.1"}},expression:{interpolated:!0,parameters:["zoom"]},"property-type":"data-constant"},"icon-image":{type:"resolvedImage",doc:"Name of image in sprite to use for drawing an image background.",tokens:!0,"sdk-support":{"basic functionality":{js:"0.10.0",android:"2.0.1",ios:"2.0.0",macos:"0.1.0"},"data-driven styling":{js:"0.35.0",android:"5.1.0",ios:"3.6.0",macos:"0.5.0"}},expression:{interpolated:!1,parameters:["zoom","feature"]},"property-type":"data-driven"},"icon-rotate":{type:"number",default:0,period:360,units:"degrees",doc:"Rotates the icon clockwise.",requires:["icon-image"],"sdk-support":{"basic functionality":{js:"0.10.0",android:"2.0.1",ios:"2.0.0",macos:"0.1.0"},"data-driven styling":{js:"0.21.0",android:"5.0.0",ios:"3.5.0",macos:"0.4.0"}},expression:{interpolated:!0,parameters:["zoom","feature"]},"property-type":"data-driven"},"icon-padding":{type:"number",default:2,minimum:0,units:"pixels",doc:"Size of the additional area around the icon bounding box used for detecting symbol collisions.",requires:["icon-image"],"sdk-support":{"basic functionality":{js:"0.10.0",android:"2.0.1",ios:"2.0.0",macos:"0.1.0"}},expression:{interpolated:!0,parameters:["zoom"]},"property-type":"data-constant"},"icon-keep-upright":{type:"boolean",default:!1,doc:"If true, the icon may be flipped to prevent it from being rendered upside-down.",requires:["icon-image",{"icon-rotation-alignment":"map"},{"symbol-placement":["line","line-center"]}],"sdk-support":{"basic functionality":{js:"0.10.0",android:"2.0.1",ios:"2.0.0",macos:"0.1.0"}},expression:{interpolated:!1,parameters:["zoom"]},"property-type":"data-constant"},"icon-offset":{type:"array",value:"number",length:2,default:[0,0],doc:"Offset distance of icon from its anchor. Positive values indicate right and down, while negative values indicate left and up. Each component is multiplied by the value of `icon-size` to obtain the final offset in pixels. When combined with `icon-rotate` the offset will be as if the rotated direction was up.",requires:["icon-image"],"sdk-support":{"basic functionality":{js:"0.10.0",android:"2.0.1",ios:"2.0.0",macos:"0.1.0"},"data-driven styling":{js:"0.29.0",android:"5.0.0",ios:"3.5.0",macos:"0.4.0"}},expression:{interpolated:!0,parameters:["zoom","feature"]},"property-type":"data-driven"},"icon-anchor":{type:"enum",values:{center:{doc:"The center of the icon is placed closest to the anchor."},left:{doc:"The left side of the icon is placed closest to the anchor."},right:{doc:"The right side of the icon is placed closest to the anchor."},top:{doc:"The top of the icon is placed closest to the anchor."},bottom:{doc:"The bottom of the icon is placed closest to the anchor."},"top-left":{doc:"The top left corner of the icon is placed closest to the anchor."},"top-right":{doc:"The top right corner of the icon is placed closest to the anchor."},"bottom-left":{doc:"The bottom left corner of the icon is placed closest to the anchor."},"bottom-right":{doc:"The bottom right corner of the icon is placed closest to the anchor."}},default:"center",doc:"Part of the icon placed closest to the anchor.",requires:["icon-image"],"sdk-support":{"basic functionality":{js:"0.40.0",android:"5.2.0",ios:"3.7.0",macos:"0.6.0"},"data-driven styling":{js:"0.40.0",android:"5.2.0",ios:"3.7.0",macos:"0.6.0"}},expression:{interpolated:!1,parameters:["zoom","feature"]},"property-type":"data-driven"},"icon-pitch-alignment":{type:"enum",values:{map:{doc:"The icon is aligned to the plane of the map."},viewport:{doc:"The icon is aligned to the plane of the viewport."},auto:{doc:"Automatically matches the value of `icon-rotation-alignment`."}},default:"auto",doc:"Orientation of icon when map is pitched.",requires:["icon-image"],"sdk-support":{"basic functionality":{js:"0.39.0",android:"5.2.0",ios:"3.7.0",macos:"0.6.0"}},expression:{interpolated:!1,parameters:["zoom"]},"property-type":"data-constant"},"text-pitch-alignment":{type:"enum",values:{map:{doc:"The text is aligned to the plane of the map."},viewport:{doc:"The text is aligned to the plane of the viewport."},auto:{doc:"Automatically matches the value of `text-rotation-alignment`."}},default:"auto",doc:"Orientation of text when map is pitched.",requires:["text-field"],"sdk-support":{"basic functionality":{js:"0.21.0",android:"4.2.0",ios:"3.4.0",macos:"0.2.1"},"`auto` value":{js:"0.25.0",android:"4.2.0",ios:"3.4.0",macos:"0.3.0"}},expression:{interpolated:!1,parameters:["zoom"]},"property-type":"data-constant"},"text-rotation-alignment":{type:"enum",values:{map:{doc:"When `symbol-placement` is set to `point`, aligns text east-west. When `symbol-placement` is set to `line` or `line-center`, aligns text x-axes with the line."},viewport:{doc:"Produces glyphs whose x-axes are aligned with the x-axis of the viewport, regardless of the value of `symbol-placement`."},auto:{doc:"When `symbol-placement` is set to `point`, this is equivalent to `viewport`. When `symbol-placement` is set to `line` or `line-center`, this is equivalent to `map`."}},default:"auto",doc:"In combination with `symbol-placement`, determines the rotation behavior of the individual glyphs forming the text.",requires:["text-field"],"sdk-support":{"basic functionality":{js:"0.10.0",android:"2.0.1",ios:"2.0.0",macos:"0.1.0"},"`auto` value":{js:"0.25.0",android:"4.2.0",ios:"3.4.0",macos:"0.3.0"}},expression:{interpolated:!1,parameters:["zoom"]},"property-type":"data-constant"},"text-field":{type:"formatted",default:"",tokens:!0,doc:"Value to use for a text label. If a plain `string` is provided, it will be treated as a `formatted` with default/inherited formatting options. SDF images are not supported in formatted text and will be ignored.","sdk-support":{"basic functionality":{js:"0.10.0",android:"2.0.1",ios:"2.0.0",macos:"0.1.0"},"data-driven styling":{js:"0.33.0",android:"5.0.0",ios:"3.5.0",macos:"0.4.0"}},expression:{interpolated:!1,parameters:["zoom","feature"]},"property-type":"data-driven"},"text-font":{type:"array",value:"string",default:["Open Sans Regular","Arial Unicode MS Regular"],doc:"Font stack to use for displaying text.",requires:["text-field"],"sdk-support":{"basic functionality":{js:"0.10.0",android:"2.0.1",ios:"2.0.0",macos:"0.1.0"},"data-driven styling":{js:"0.43.0",android:"6.0.0",ios:"4.0.0",macos:"0.7.0"}},expression:{interpolated:!1,parameters:["zoom","feature"]},"property-type":"data-driven"},"text-size":{type:"number",default:16,minimum:0,units:"pixels",doc:"Font size.",requires:["text-field"],"sdk-support":{"basic functionality":{js:"0.10.0",android:"2.0.1",ios:"2.0.0",macos:"0.1.0"},"data-driven styling":{js:"0.35.0",android:"5.1.0",ios:"3.6.0",macos:"0.5.0"}},expression:{interpolated:!0,parameters:["zoom","feature"]},"property-type":"data-driven"},"text-max-width":{type:"number",default:10,minimum:0,units:"ems",doc:"The maximum line width for text wrapping.",requires:["text-field",{"symbol-placement":["point"]}],"sdk-support":{"basic functionality":{js:"0.10.0",android:"2.0.1",ios:"2.0.0",macos:"0.1.0"},"data-driven styling":{js:"0.40.0",android:"5.2.0",ios:"3.7.0",macos:"0.6.0"}},expression:{interpolated:!0,parameters:["zoom","feature"]},"property-type":"data-driven"},"text-line-height":{type:"number",default:1.2,units:"ems",doc:"Text leading value for multi-line text.",requires:["text-field"],"sdk-support":{"basic functionality":{js:"0.10.0",android:"2.0.1",ios:"2.0.0",macos:"0.1.0"},"data-driven styling":{js:"2.3.0"}},expression:{interpolated:!0,parameters:["zoom","feature"]},"property-type":"data-driven"},"text-letter-spacing":{type:"number",default:0,units:"ems",doc:"Text tracking amount.",requires:["text-field"],"sdk-support":{"basic functionality":{js:"0.10.0",android:"2.0.1",ios:"2.0.0",macos:"0.1.0"},"data-driven styling":{js:"0.40.0",android:"5.2.0",ios:"3.7.0",macos:"0.6.0"}},expression:{interpolated:!0,parameters:["zoom","feature"]},"property-type":"data-driven"},"text-justify":{type:"enum",values:{auto:{doc:"The text is aligned towards the anchor position."},left:{doc:"The text is aligned to the left."},center:{doc:"The text is centered."},right:{doc:"The text is aligned to the right."}},default:"center",doc:"Text justification options.",requires:["text-field"],"sdk-support":{"basic functionality":{js:"0.10.0",android:"2.0.1",ios:"2.0.0",macos:"0.1.0"},"data-driven styling":{js:"0.39.0",android:"5.2.0",ios:"3.7.0",macos:"0.6.0"},auto:{js:"0.54.0",android:"7.4.0",ios:"4.10.0",macos:"0.14.0"}},expression:{interpolated:!1,parameters:["zoom","feature"]},"property-type":"data-driven"},"text-radial-offset":{type:"number",units:"ems",default:0,doc:"Radial offset of text, in the direction of the symbol's anchor. Useful in combination with `text-variable-anchor`, which defaults to using the two-dimensional `text-offset` if present.","sdk-support":{"basic functionality":{js:"0.54.0",android:"7.4.0",ios:"4.10.0",macos:"0.14.0"},"data-driven styling":{js:"0.54.0",android:"7.4.0",ios:"4.10.0",macos:"0.14.0"}},requires:["text-field"],"property-type":"data-driven",expression:{interpolated:!0,parameters:["zoom","feature"]}},"text-variable-anchor":{type:"array",value:"enum",values:{center:{doc:"The center of the text is placed closest to the anchor."},left:{doc:"The left side of the text is placed closest to the anchor."},right:{doc:"The right side of the text is placed closest to the anchor."},top:{doc:"The top of the text is placed closest to the anchor."},bottom:{doc:"The bottom of the text is placed closest to the anchor."},"top-left":{doc:"The top left corner of the text is placed closest to the anchor."},"top-right":{doc:"The top right corner of the text is placed closest to the anchor."},"bottom-left":{doc:"The bottom left corner of the text is placed closest to the anchor."},"bottom-right":{doc:"The bottom right corner of the text is placed closest to the anchor."}},requires:["text-field",{"symbol-placement":["point"]}],doc:"To increase the chance of placing high-priority labels on the map, you can provide an array of `text-anchor` locations: the renderer will attempt to place the label at each location, in order, before moving onto the next label. Use `text-justify: auto` to choose justification based on anchor position. To apply an offset, use the `text-radial-offset` or the two-dimensional `text-offset`.","sdk-support":{"basic functionality":{js:"0.54.0",android:"7.4.0",ios:"4.10.0",macos:"0.14.0"}},expression:{interpolated:!1,parameters:["zoom"]},"property-type":"data-constant"},"text-anchor":{type:"enum",values:{center:{doc:"The center of the text is placed closest to the anchor."},left:{doc:"The left side of the text is placed closest to the anchor."},right:{doc:"The right side of the text is placed closest to the anchor."},top:{doc:"The top of the text is placed closest to the anchor."},bottom:{doc:"The bottom of the text is placed closest to the anchor."},"top-left":{doc:"The top left corner of the text is placed closest to the anchor."},"top-right":{doc:"The top right corner of the text is placed closest to the anchor."},"bottom-left":{doc:"The bottom left corner of the text is placed closest to the anchor."},"bottom-right":{doc:"The bottom right corner of the text is placed closest to the anchor."}},default:"center",doc:"Part of the text placed closest to the anchor.",requires:["text-field",{"!":"text-variable-anchor"}],"sdk-support":{"basic functionality":{js:"0.10.0",android:"2.0.1",ios:"2.0.0",macos:"0.1.0"},"data-driven styling":{js:"0.39.0",android:"5.2.0",ios:"3.7.0",macos:"0.6.0"}},expression:{interpolated:!1,parameters:["zoom","feature"]},"property-type":"data-driven"},"text-max-angle":{type:"number",default:45,units:"degrees",doc:"Maximum angle change between adjacent characters.",requires:["text-field",{"symbol-placement":["line","line-center"]}],"sdk-support":{"basic functionality":{js:"0.10.0",android:"2.0.1",ios:"2.0.0",macos:"0.1.0"}},expression:{interpolated:!0,parameters:["zoom"]},"property-type":"data-constant"},"text-writing-mode":{type:"array",value:"enum",values:{horizontal:{doc:"If a text's language supports horizontal writing mode, symbols would be laid out horizontally."},vertical:{doc:"If a text's language supports vertical writing mode, symbols would be laid out vertically."}},doc:"The property allows control over a symbol's orientation. Note that the property values act as a hint, so that a symbol whose language doesn’t support the provided orientation will be laid out in its natural orientation. Example: English point symbol will be rendered horizontally even if array value contains single 'vertical' enum value. For symbol with point placement, the order of elements in an array define priority order for the placement of an orientation variant. For symbol with line placement, the default text writing mode is either ['horizontal', 'vertical'] or ['vertical', 'horizontal'], the order doesn't affect the placement.",requires:["text-field"],"sdk-support":{"basic functionality":{js:"1.3.0",android:"8.3.0",ios:"5.3.0",macos:"0.15.0"}},expression:{interpolated:!1,parameters:["zoom"]},"property-type":"data-constant"},"text-rotate":{type:"number",default:0,period:360,units:"degrees",doc:"Rotates the text clockwise.",requires:["text-field"],"sdk-support":{"basic functionality":{js:"0.10.0",android:"2.0.1",ios:"2.0.0",macos:"0.1.0"},"data-driven styling":{js:"0.35.0",android:"5.1.0",ios:"3.6.0",macos:"0.5.0"}},expression:{interpolated:!0,parameters:["zoom","feature"]},"property-type":"data-driven"},"text-padding":{type:"number",default:2,minimum:0,units:"pixels",doc:"Size of the additional area around the text bounding box used for detecting symbol collisions.",requires:["text-field"],"sdk-support":{"basic functionality":{js:"0.10.0",android:"2.0.1",ios:"2.0.0",macos:"0.1.0"}},expression:{interpolated:!0,parameters:["zoom"]},"property-type":"data-constant"},"text-keep-upright":{type:"boolean",default:!0,doc:"If true, the text may be flipped vertically to prevent it from being rendered upside-down.",requires:["text-field",{"text-rotation-alignment":"map"},{"symbol-placement":["line","line-center"]}],"sdk-support":{"basic functionality":{js:"0.10.0",android:"2.0.1",ios:"2.0.0",macos:"0.1.0"}},expression:{interpolated:!1,parameters:["zoom"]},"property-type":"data-constant"},"text-transform":{type:"enum",values:{none:{doc:"The text is not altered."},uppercase:{doc:"Forces all letters to be displayed in uppercase."},lowercase:{doc:"Forces all letters to be displayed in lowercase."}},default:"none",doc:"Specifies how to capitalize text, similar to the CSS `text-transform` property.",requires:["text-field"],"sdk-support":{"basic functionality":{js:"0.10.0",android:"2.0.1",ios:"2.0.0",macos:"0.1.0"},"data-driven styling":{js:"0.33.0",android:"5.0.0",ios:"3.5.0",macos:"0.4.0"}},expression:{interpolated:!1,parameters:["zoom","feature"]},"property-type":"data-driven"},"text-offset":{type:"array",doc:"Offset distance of text from its anchor. Positive values indicate right and down, while negative values indicate left and up. If used with text-variable-anchor, input values will be taken as absolute values. Offsets along the x- and y-axis will be applied automatically based on the anchor position.",value:"number",units:"ems",length:2,default:[0,0],requires:["text-field",{"!":"text-radial-offset"}],"sdk-support":{"basic functionality":{js:"0.10.0",android:"2.0.1",ios:"2.0.0",macos:"0.1.0"},"data-driven styling":{js:"0.35.0",android:"5.1.0",ios:"3.6.0",macos:"0.5.0"}},expression:{interpolated:!0,parameters:["zoom","feature"]},"property-type":"data-driven"},"text-allow-overlap":{type:"boolean",default:!1,doc:"If true, the text will be visible even if it collides with other previously drawn symbols.",requires:["text-field"],"sdk-support":{"basic functionality":{js:"0.10.0",android:"2.0.1",ios:"2.0.0",macos:"0.1.0"}},expression:{interpolated:!1,parameters:["zoom"]},"property-type":"data-constant"},"text-ignore-placement":{type:"boolean",default:!1,doc:"If true, other symbols can be visible even if they collide with the text.",requires:["text-field"],"sdk-support":{"basic functionality":{js:"0.10.0",android:"2.0.1",ios:"2.0.0",macos:"0.1.0"}},expression:{interpolated:!1,parameters:["zoom"]},"property-type":"data-constant"},"text-optional":{type:"boolean",default:!1,doc:"If true, icons will display without their corresponding text when the text collides with other symbols and the icon does not.",requires:["text-field","icon-image"],"sdk-support":{"basic functionality":{js:"0.10.0",android:"2.0.1",ios:"2.0.0",macos:"0.1.0"}},expression:{interpolated:!1,parameters:["zoom"]},"property-type":"data-constant"},visibility:{type:"enum",values:{visible:{doc:"The layer is shown."},none:{doc:"The layer is not shown."}},default:"visible",doc:"Whether this layer is displayed.","sdk-support":{"basic functionality":{js:"0.10.0",android:"2.0.1",ios:"2.0.0",macos:"0.1.0"}},"property-type":"constant"}},layout_raster:{visibility:{type:"enum",values:{visible:{doc:"The layer is shown."},none:{doc:"The layer is not shown."}},default:"visible",doc:"Whether this layer is displayed.","sdk-support":{"basic functionality":{js:"0.10.0",android:"2.0.1",ios:"2.0.0",macos:"0.1.0"}},"property-type":"constant"}},layout_hillshade:{visibility:{type:"enum",values:{visible:{doc:"The layer is shown."},none:{doc:"The layer is not shown."}},default:"visible",doc:"Whether this layer is displayed.","sdk-support":{"basic functionality":{js:"0.43.0",android:"6.0.0",ios:"4.0.0",macos:"0.7.0"}},"property-type":"constant"}},filter:{type:"array",value:"*",doc:"A filter selects specific features from a layer."},filter_symbol:{type:"boolean",doc:'Expression which determines whether or not to display a symbol. Symbols support dynamic filtering, meaning this expression can use the `["pitch"]` and `["distance-from-center"]` expressions to reference the current state of the view.',default:!1,transition:!1,"property-type":"data-driven",expression:{interpolated:!1,parameters:["zoom","feature","pitch","distance-from-center"]}},filter_fill:{type:"boolean",doc:'Expression which determines whether or not to display a polygon. Fill layer does NOT support dynamic filtering, meaning this expression can NOT use the `["pitch"]` and `["distance-from-center"]` expressions to reference the current state of the view.',default:!1,transition:!1,"property-type":"data-driven",expression:{interpolated:!1,parameters:["zoom","feature"]}},filter_line:{type:"boolean",doc:'Expression which determines whether or not to display a Polygon or LineString. Line layer does NOT support dynamic filtering, meaning this expression can NOT use the `["pitch"]` and `["distance-from-center"]` expressions to reference the current state of the view.',default:!1,transition:!1,"property-type":"data-driven",expression:{interpolated:!1,parameters:["zoom","feature"]}},filter_circle:{type:"boolean",doc:'Expression which determines whether or not to display a circle. Circle layer does NOT support dynamic filtering, meaning this expression can NOT use the `["pitch"]` and `["distance-from-center"]` expressions to reference the current state of the view.',default:!1,transition:!1,"property-type":"data-driven",expression:{interpolated:!1,parameters:["zoom","feature"]}},"filter_fill-extrusion":{type:"boolean",doc:'Expression which determines whether or not to display a Polygon. Fill-extrusion layer does NOT support dynamic filtering, meaning this expression can NOT use the `["pitch"]` and `["distance-from-center"]` expressions to reference the current state of the view.',default:!1,transition:!1,"property-type":"data-driven",expression:{interpolated:!1,parameters:["zoom","feature"]}},filter_heatmap:{type:"boolean",doc:'Expression used to determine whether a point is being displayed or not. Heatmap layer does NOT support dynamic filtering, meaning this expression can NOT use the `["pitch"]` and `["distance-from-center"]` expressions to reference the current state of the view.',default:!1,transition:!1,"property-type":"data-driven",expression:{interpolated:!1,parameters:["zoom","feature"]}},filter_operator:{type:"enum",values:{"==":{doc:'`["==", key, value]` equality: `feature[key] = value`'},"!=":{doc:'`["!=", key, value]` inequality: `feature[key] ≠ value`'},">":{doc:'`[">", key, value]` greater than: `feature[key] > value`'},">=":{doc:'`[">=", key, value]` greater than or equal: `feature[key] ≥ value`'},"<":{doc:'`["<", key, value]` less than: `feature[key] < value`'},"<=":{doc:'`["<=", key, value]` less than or equal: `feature[key] ≤ value`'},in:{doc:'`["in", key, v0, ..., vn]` set inclusion: `feature[key] ∈ {v0, ..., vn}`'},"!in":{doc:'`["!in", key, v0, ..., vn]` set exclusion: `feature[key] ∉ {v0, ..., vn}`'},all:{doc:'`["all", f0, ..., fn]` logical `AND`: `f0 ∧ ... ∧ fn`'},any:{doc:'`["any", f0, ..., fn]` logical `OR`: `f0 ∨ ... ∨ fn`'},none:{doc:'`["none", f0, ..., fn]` logical `NOR`: `¬f0 ∧ ... ∧ ¬fn`'},has:{doc:'`["has", key]` `feature[key]` exists'},"!has":{doc:'`["!has", key]` `feature[key]` does not exist'},within:{doc:'`["within", object]` feature geometry is within object geometry'}},doc:"The filter operator."},geometry_type:{type:"enum",values:{Point:{doc:"Filter to point geometries."},LineString:{doc:"Filter to line geometries."},Polygon:{doc:"Filter to polygon geometries."}},doc:"The geometry type for the filter to select."},function:{expression:{type:"expression",doc:"An expression."},stops:{type:"array",doc:"An array of stops.",value:"function_stop"},base:{type:"number",default:1,minimum:0,doc:"The exponential base of the interpolation curve. It controls the rate at which the result increases. Higher values make the result increase more towards the high end of the range. With `1` the stops are interpolated linearly."},property:{type:"string",doc:"The name of a feature property to use as the function input.",default:"$zoom"},type:{type:"enum",values:{identity:{doc:"Return the input value as the output value."},exponential:{doc:"Generate an output by interpolating between stops just less than and just greater than the function input."},interval:{doc:"Return the output value of the stop just less than the function input."},categorical:{doc:"Return the output value of the stop equal to the function input."}},doc:"The interpolation strategy to use in function evaluation.",default:"exponential"},colorSpace:{type:"enum",values:{rgb:{doc:"Use the RGB color space to interpolate color values"},lab:{doc:"Use the LAB color space to interpolate color values."},hcl:{doc:"Use the HCL color space to interpolate color values, interpolating the Hue, Chroma, and Luminance channels individually."}},doc:"The color space in which colors interpolated. Interpolating colors in perceptual color spaces like LAB and HCL tend to produce color ramps that look more consistent and produce colors that can be differentiated more easily than those interpolated in RGB space.",default:"rgb"},default:{type:"*",required:!1,doc:"A value to serve as a fallback function result when a value isn't otherwise available. It is used in the following circumstances:\n* In categorical functions, when the feature value does not match any of the stop domain values.\n* In property and zoom-and-property functions, when a feature does not contain a value for the specified property.\n* In identity functions, when the feature value is not valid for the style property (for example, if the function is being used for a `circle-color` property but the feature property value is not a string or not a valid color).\n* In interval or exponential property and zoom-and-property functions, when the feature value is not numeric.\nIf no default is provided, the style property's default is used in these circumstances."}},function_stop:{type:"array",minimum:0,maximum:24,value:["number","color"],length:2,doc:"Zoom level and value pair."},expression:{type:"array",value:"*",minimum:1,doc:"An expression defines a function that can be used for data-driven style properties or feature filters."},expression_name:{doc:"",type:"enum",values:{let:{doc:'Binds expressions to named variables, which can then be referenced in the result expression using ["var", "variable_name"].',group:"Variable binding","sdk-support":{"basic functionality":{js:"0.41.0",android:"6.0.0",ios:"4.0.0",macos:"0.7.0"}}},var:{doc:'References variable bound using "let".',group:"Variable binding","sdk-support":{"basic functionality":{js:"0.41.0",android:"6.0.0",ios:"4.0.0",macos:"0.7.0"}}},literal:{doc:"Provides a literal array or object value.",group:"Types","sdk-support":{"basic functionality":{js:"0.41.0",android:"6.0.0",ios:"4.0.0",macos:"0.7.0"}}},array:{doc:"Asserts that the input is an array (optionally with a specific item type and length).  If, when the input expression is evaluated, it is not of the asserted type, then this assertion will cause the whole expression to be aborted.",group:"Types","sdk-support":{"basic functionality":{js:"0.41.0",android:"6.0.0",ios:"4.0.0",macos:"0.7.0"}}},at:{doc:"Retrieves an item from an array.",group:"Lookup","sdk-support":{"basic functionality":{js:"0.41.0",android:"6.0.0",ios:"4.0.0",macos:"0.7.0"}}},in:{doc:"Determines whether an item exists in an array or a substring exists in a string. In the specific case when the second and third arguments are string literals, you must wrap at least one of them in a [`literal`](#types-literal) expression to hint correct interpretation to the [type system](#type-system).",group:"Lookup","sdk-support":{"basic functionality":{js:"1.6.0",android:"9.1.0",ios:"5.8.0",macos:"0.15.0"}}},"index-of":{doc:"Returns the first position at which an item can be found in an array or a substring can be found in a string, or `-1` if the input cannot be found. Accepts an optional index from where to begin the search.",group:"Lookup","sdk-support":{"basic functionality":{js:"1.10.0"}}},slice:{doc:"Returns an item from an array or a substring from a string from a specified start index, or between a start index and an end index if set. The return value is inclusive of the start index but not of the end index.",group:"Lookup","sdk-support":{"basic functionality":{js:"1.10.0"}}},case:{doc:"Selects the first output whose corresponding test condition evaluates to true, or the fallback value otherwise.",group:"Decision","sdk-support":{"basic functionality":{js:"0.41.0",android:"6.0.0",ios:"4.0.0",macos:"0.7.0"}}},match:{doc:'Selects the output for which the label value matches the input value, or the fallback value if no match is found. The input can be any expression (for example, `["get", "building_type"]`). Each label must be unique, and must be either:\n - a single literal value; or\n - an array of literal values, the values of which must be all strings or all numbers (for example `[100, 101]` or `["c", "b"]`).\n\nThe input matches if any of the values in the array matches using strict equality, similar to the `"in"` operator.\nIf the input type does not match the type of the labels, the result will be the fallback value.',group:"Decision","sdk-support":{"basic functionality":{js:"0.41.0",android:"6.0.0",ios:"4.0.0",macos:"0.7.0"}}},coalesce:{doc:"Evaluates each expression in turn until the first valid value is obtained. Invalid values are `null` and [`'image'`](#types-image) expressions that are unavailable in the style. If all values are invalid, `coalesce` returns the first value listed.",group:"Decision","sdk-support":{"basic functionality":{js:"0.41.0",android:"6.0.0",ios:"4.0.0",macos:"0.7.0"}}},step:{doc:'Produces discrete, stepped results by evaluating a piecewise-constant function defined by pairs of input and output values ("stops"). The `input` may be any numeric expression (e.g., `["get", "population"]`). Stop inputs must be numeric literals in strictly ascending order. Returns the output value of the stop just less than the input, or the first output if the input is less than the first stop.',group:"Ramps, scales, curves","sdk-support":{"basic functionality":{js:"0.42.0",android:"6.0.0",ios:"4.0.0",macos:"0.7.0"}}},interpolate:{doc:'Produces continuous, smooth results by interpolating between pairs of input and output values ("stops"). The `input` may be any numeric expression (e.g., `["get", "population"]`). Stop inputs must be numeric literals in strictly ascending order. The output type must be `number`, `array<number>`, or `color`.\n\nInterpolation types:\n- `["linear"]`: Interpolates linearly between the pair of stops just less than and just greater than the input.\n- `["exponential", base]`: Interpolates exponentially between the stops just less than and just greater than the input. `base` controls the rate at which the output increases: higher values make the output increase more towards the high end of the range. With values close to 1 the output increases linearly.\n- `["cubic-bezier", x1, y1, x2, y2]`: Interpolates using the cubic bezier curve defined by the given control points.',group:"Ramps, scales, curves","sdk-support":{"basic functionality":{js:"0.42.0",android:"6.0.0",ios:"4.0.0",macos:"0.7.0"}}},"interpolate-hcl":{doc:'Produces continuous, smooth results by interpolating between pairs of input and output values ("stops"). Works like `interpolate`, but the output type must be `color`, and the interpolation is performed in the Hue-Chroma-Luminance color space.',group:"Ramps, scales, curves","sdk-support":{"basic functionality":{js:"0.49.0"}}},"interpolate-lab":{doc:'Produces continuous, smooth results by interpolating between pairs of input and output values ("stops"). Works like `interpolate`, but the output type must be `color`, and the interpolation is performed in the CIELAB color space.',group:"Ramps, scales, curves","sdk-support":{"basic functionality":{js:"0.49.0"}}},ln2:{doc:"Returns mathematical constant ln(2).",group:"Math","sdk-support":{"basic functionality":{js:"0.41.0",android:"6.0.0",ios:"4.0.0",macos:"0.7.0"}}},pi:{doc:"Returns the mathematical constant pi.",group:"Math","sdk-support":{"basic functionality":{js:"0.41.0",android:"6.0.0",ios:"4.0.0",macos:"0.7.0"}}},e:{doc:"Returns the mathematical constant e.",group:"Math","sdk-support":{"basic functionality":{js:"0.41.0",android:"6.0.0",ios:"4.0.0",macos:"0.7.0"}}},typeof:{doc:"Returns a string describing the type of the given value.",group:"Types","sdk-support":{"basic functionality":{js:"0.41.0",android:"6.0.0",ios:"4.0.0",macos:"0.7.0"}}},string:{doc:"Asserts that the input value is a string. If multiple values are provided, each one is evaluated in order until a string is obtained. If none of the inputs are strings, the expression is an error.",group:"Types","sdk-support":{"basic functionality":{js:"0.41.0",android:"6.0.0",ios:"4.0.0",macos:"0.7.0"}}},number:{doc:"Asserts that the input value is a number. If multiple values are provided, each one is evaluated in order until a number is obtained. If none of the inputs are numbers, the expression is an error.",group:"Types","sdk-support":{"basic functionality":{js:"0.41.0",android:"6.0.0",ios:"4.0.0",macos:"0.7.0"}}},boolean:{doc:"Asserts that the input value is a boolean. If multiple values are provided, each one is evaluated in order until a boolean is obtained. If none of the inputs are booleans, the expression is an error.",group:"Types","sdk-support":{"basic functionality":{js:"0.41.0",android:"6.0.0",ios:"4.0.0",macos:"0.7.0"}}},object:{doc:"Asserts that the input value is an object. If multiple values are provided, each one is evaluated in order until an object is obtained. If none of the inputs are objects, the expression is an error.",group:"Types","sdk-support":{"basic functionality":{js:"0.41.0",android:"6.0.0",ios:"4.0.0",macos:"0.7.0"}}},collator:{doc:"Returns a `collator` for use in locale-dependent comparison operations. The `case-sensitive` and `diacritic-sensitive` options default to `false`. The `locale` argument specifies the IETF language tag of the locale to use. If none is provided, the default locale is used. If the requested locale is not available, the `collator` will use a system-defined fallback locale. Use `resolved-locale` to test the results of locale fallback behavior.",group:"Types","sdk-support":{"basic functionality":{js:"0.45.0",android:"6.5.0",ios:"4.2.0",macos:"0.9.0"}}},format:{doc:'Returns a `formatted` string for displaying mixed-format text in the `text-field` property. The input may contain a string literal or expression, including an [`\'image\'`](#types-image) expression. Strings may be followed by a style override object that supports the following properties:\n- `"text-font"`: Overrides the font stack specified by the root layout property.\n- `"text-color"`: Overrides the color specified by the root paint property.\n- `"font-scale"`: Applies a scaling factor on `text-size` as specified by the root layout property.',group:"Types","sdk-support":{"basic functionality":{js:"0.48.0",android:"6.7.0",ios:"4.6.0",macos:"0.12.0"},"text-font":{js:"0.48.0",android:"6.7.0",ios:"4.6.0",macos:"0.12.0"},"font-scale":{js:"0.48.0",android:"6.7.0",ios:"4.6.0",macos:"0.12.0"},"text-color":{js:"1.3.0",android:"7.3.0",ios:"4.10.0",macos:"0.14.0"},image:{js:"1.6.0",android:"8.6.0",ios:"5.7.0",macos:"0.15.0"}}},image:{doc:"Returns a [`ResolvedImage`](/mapbox-gl-js/style-spec/types/#resolvedimage) for use in [`icon-image`](/mapbox-gl-js/style-spec/layers/#layout-symbol-icon-image), `*-pattern` entries, and as a section in the [`'format'`](#types-format) expression. A [`'coalesce'`](#coalesce) expression containing `image` expressions will evaluate to the first listed image that is currently in the style. This validation process is synchronous and requires the image to have been added to the style before requesting it in the `'image'` argument.",group:"Types","sdk-support":{"basic functionality":{js:"1.4.0",android:"8.6.0",ios:"5.7.0",macos:"0.15.0"}}},"number-format":{doc:"Converts the input number into a string representation using the providing formatting rules. If set, the `locale` argument specifies the locale to use, as a BCP 47 language tag. If set, the `currency` argument specifies an ISO 4217 code to use for currency-style formatting. If set, the `min-fraction-digits` and `max-fraction-digits` arguments specify the minimum and maximum number of fractional digits to include.",group:"Types","sdk-support":{"basic functionality":{js:"0.54.0",android:"8.4.0",ios:"5.4.0",macos:"0.15.0"}}},"to-string":{doc:'Converts the input value to a string. If the input is `null`, the result is `""`. If the input is a [`boolean`](#types-boolean), the result is `"true"` or `"false"`. If the input is a number, it is converted to a string as specified by the ["NumberToString" algorithm](https://tc39.github.io/ecma262/#sec-tostring-applied-to-the-number-type) of the ECMAScript Language Specification. If the input is a [`color`](#color), it is converted to a string of the form `"rgba(r,g,b,a)"`, where `r`, `g`, and `b` are numerals ranging from 0 to 255, and `a` ranges from 0 to 1. If the input is an [`\'image\'`](#types-image) expression, `\'to-string\'` returns the image name. Otherwise, the input is converted to a string in the format specified by the [`JSON.stringify`](https://tc39.github.io/ecma262/#sec-json.stringify) function of the ECMAScript Language Specification.',group:"Types","sdk-support":{"basic functionality":{js:"0.41.0",android:"6.0.0",ios:"4.0.0",macos:"0.7.0"}}},"to-number":{doc:'Converts the input value to a number, if possible. If the input is `null` or `false`, the result is 0. If the input is `true`, the result is 1. If the input is a string, it is converted to a number as specified by the ["ToNumber Applied to the String Type" algorithm](https://tc39.github.io/ecma262/#sec-tonumber-applied-to-the-string-type) of the ECMAScript Language Specification. If multiple values are provided, each one is evaluated in order until the first successful conversion is obtained. If none of the inputs can be converted, the expression is an error.',group:"Types","sdk-support":{"basic functionality":{js:"0.41.0",android:"6.0.0",ios:"4.0.0",macos:"0.7.0"}}},"to-boolean":{doc:"Converts the input value to a boolean. The result is `false` when then input is an empty string, 0, `false`, `null`, or `NaN`; otherwise it is `true`.",group:"Types","sdk-support":{"basic functionality":{js:"0.41.0",android:"6.0.0",ios:"4.0.0",macos:"0.7.0"}}},"to-rgba":{doc:"Returns a four-element array containing the input color's red, green, blue, and alpha components, in that order.",group:"Color","sdk-support":{"basic functionality":{js:"0.41.0",android:"6.0.0",ios:"4.0.0",macos:"0.7.0"}}},"to-color":{doc:"Converts the input value to a color. If multiple values are provided, each one is evaluated in order until the first successful conversion is obtained. If none of the inputs can be converted, the expression is an error.",group:"Types","sdk-support":{"basic functionality":{js:"0.41.0",android:"6.0.0",ios:"4.0.0",macos:"0.7.0"}}},rgb:{doc:"Creates a color value from red, green, and blue components, which must range between 0 and 255, and an alpha component of 1. If any component is out of range, the expression is an error.",group:"Color","sdk-support":{"basic functionality":{js:"0.41.0",android:"6.0.0",ios:"4.0.0",macos:"0.7.0"}}},rgba:{doc:"Creates a color value from red, green, blue components, which must range between 0 and 255, and an alpha component which must range between 0 and 1. If any component is out of range, the expression is an error.",group:"Color","sdk-support":{"basic functionality":{js:"0.41.0",android:"6.0.0",ios:"4.0.0",macos:"0.7.0"}}},get:{doc:"Retrieves a property value from the current feature's properties, or from another object if a second argument is provided. Returns `null` if the requested property is missing.",group:"Lookup","sdk-support":{"basic functionality":{js:"0.41.0",android:"6.0.0",ios:"4.0.0",macos:"0.7.0"}}},has:{doc:"Tests for the presence of an property value in the current feature's properties, or from another object if a second argument is provided.",group:"Lookup","sdk-support":{"basic functionality":{js:"0.41.0",android:"6.0.0",ios:"4.0.0",macos:"0.7.0"}}},length:{doc:"Returns the length of an array or string.",group:"Lookup","sdk-support":{"basic functionality":{js:"0.41.0",android:"6.0.0",ios:"4.0.0",macos:"0.7.0"}}},properties:{doc:'Returns the feature properties object.  Note that in some cases, it may be more efficient to use `["get", "property_name"]` directly.',group:"Feature data","sdk-support":{"basic functionality":{js:"0.41.0",android:"6.0.0",ios:"4.0.0",macos:"0.7.0"}}},"feature-state":{doc:"Retrieves a property value from the current feature's state. Returns `null` if the requested property is not present on the feature's state. A feature's state is not part of the GeoJSON or vector tile data, and must be set programmatically on each feature. Features are identified by their `id` attribute, which must be an integer or a string that can be cast to an integer. Note that [\"feature-state\"] can only be used with paint properties that support data-driven styling.",group:"Feature data","sdk-support":{"basic functionality":{js:"0.46.0"}}},"geometry-type":{doc:"Returns the feature's geometry type: `Point`, `MultiPoint`, `LineString`, `MultiLineString`, `Polygon`, `MultiPolygon`. `Multi*` feature types are only returned in GeoJSON sources. When working with vector tile sources, use the singular forms.",group:"Feature data","sdk-support":{"basic functionality":{js:"0.41.0",android:"6.0.0",ios:"4.0.0",macos:"0.7.0"}}},id:{doc:"Returns the feature's id, if it has one.",group:"Feature data","sdk-support":{"basic functionality":{js:"0.41.0",android:"6.0.0",ios:"4.0.0",macos:"0.7.0"}}},zoom:{doc:'Returns the current zoom level.  Note that in style layout and paint properties, ["zoom"] may only appear as the input to a top-level "step" or "interpolate" expression.',group:"Camera","sdk-support":{"basic functionality":{js:"0.41.0",android:"6.0.0",ios:"4.0.0",macos:"0.7.0"}}},pitch:{doc:'Returns the current pitch in degrees. `["pitch"]` may only be used in the `filter` expression for a `symbol` layer.',group:"Camera","sdk-support":{"basic functionality":{js:"2.6.0"}}},"distance-from-center":{doc:'Returns the distance of a `symbol` instance from the center of the map. The distance is measured in pixels divided by the height of the map container. It measures 0 at the center, decreases towards the camera and increase away from the camera. For example, if the height of the map is 1000px, a value of -1 means 1000px away from the center towards the camera, and a value of 1 means a distance of 1000px away from the camera from the center. `["distance-from-center"]` may only be used in the `filter` expression for a `symbol` layer.',group:"Camera","sdk-support":{"basic functionality":{js:"2.6.0"}}},"heatmap-density":{doc:"Returns the kernel density estimation of a pixel in a heatmap layer, which is a relative measure of how many data points are crowded around a particular pixel. Can only be used in the `heatmap-color` property.",group:"Heatmap","sdk-support":{"basic functionality":{js:"0.41.0",android:"6.0.0",ios:"4.0.0",macos:"0.7.0"}}},"line-progress":{doc:"Returns the progress along a gradient line. Can only be used in the `line-gradient` property.",group:"Feature data","sdk-support":{"basic functionality":{js:"0.45.0",android:"6.5.0",ios:"4.6.0",macos:"0.12.0"}}},"sky-radial-progress":{doc:"Returns the distance of a point on the sky from the sun position. Returns 0 at sun position and 1 when the distance reaches `sky-gradient-radius`. Can only be used in the `sky-gradient` property.",group:"sky","sdk-support":{"basic functionality":{js:"2.0.0",ios:"10.0.0",android:"10.0.0"}}},accumulated:{doc:"Returns the value of a cluster property accumulated so far. Can only be used in the `clusterProperties` option of a clustered GeoJSON source.",group:"Feature data","sdk-support":{"basic functionality":{js:"0.53.0",android:"8.4.0",ios:"5.5.0",macos:"0.15.0"}}},"+":{doc:"Returns the sum of the inputs.",group:"Math","sdk-support":{"basic functionality":{js:"0.41.0",android:"6.0.0",ios:"4.0.0",macos:"0.7.0"}}},"*":{doc:"Returns the product of the inputs.",group:"Math","sdk-support":{"basic functionality":{js:"0.41.0",android:"6.0.0",ios:"4.0.0",macos:"0.7.0"}}},"-":{doc:"For two inputs, returns the result of subtracting the second input from the first. For a single input, returns the result of subtracting it from 0.",group:"Math","sdk-support":{"basic functionality":{js:"0.41.0",android:"6.0.0",ios:"4.0.0",macos:"0.7.0"}}},"/":{doc:"Returns the result of floating point division of the first input by the second.",group:"Math","sdk-support":{"basic functionality":{js:"0.41.0",android:"6.0.0",ios:"4.0.0",macos:"0.7.0"}}},"%":{doc:"Returns the remainder after integer division of the first input by the second.",group:"Math","sdk-support":{"basic functionality":{js:"0.41.0",android:"6.0.0",ios:"4.0.0",macos:"0.7.0"}}},"^":{doc:"Returns the result of raising the first input to the power specified by the second.",group:"Math","sdk-support":{"basic functionality":{js:"0.41.0",android:"6.0.0",ios:"4.0.0",macos:"0.7.0"}}},sqrt:{doc:"Returns the square root of the input.",group:"Math","sdk-support":{"basic functionality":{js:"0.42.0",android:"6.0.0",ios:"4.0.0",macos:"0.7.0"}}},log10:{doc:"Returns the base-ten logarithm of the input.",group:"Math","sdk-support":{"basic functionality":{js:"0.41.0",android:"6.0.0",ios:"4.0.0",macos:"0.7.0"}}},ln:{doc:"Returns the natural logarithm of the input.",group:"Math","sdk-support":{"basic functionality":{js:"0.41.0",android:"6.0.0",ios:"4.0.0",macos:"0.7.0"}}},log2:{doc:"Returns the base-two logarithm of the input.",group:"Math","sdk-support":{"basic functionality":{js:"0.41.0",android:"6.0.0",ios:"4.0.0",macos:"0.7.0"}}},sin:{doc:"Returns the sine of the input.",group:"Math","sdk-support":{"basic functionality":{js:"0.41.0",android:"6.0.0",ios:"4.0.0",macos:"0.7.0"}}},cos:{doc:"Returns the cosine of the input.",group:"Math","sdk-support":{"basic functionality":{js:"0.41.0",android:"6.0.0",ios:"4.0.0",macos:"0.7.0"}}},tan:{doc:"Returns the tangent of the input.",group:"Math","sdk-support":{"basic functionality":{js:"0.41.0",android:"6.0.0",ios:"4.0.0",macos:"0.7.0"}}},asin:{doc:"Returns the arcsine of the input.",group:"Math","sdk-support":{"basic functionality":{js:"0.41.0",android:"6.0.0",ios:"4.0.0",macos:"0.7.0"}}},acos:{doc:"Returns the arccosine of the input.",group:"Math","sdk-support":{"basic functionality":{js:"0.41.0",android:"6.0.0",ios:"4.0.0",macos:"0.7.0"}}},atan:{doc:"Returns the arctangent of the input.",group:"Math","sdk-support":{"basic functionality":{js:"0.41.0",android:"6.0.0",ios:"4.0.0",macos:"0.7.0"}}},min:{doc:"Returns the minimum value of the inputs.",group:"Math","sdk-support":{"basic functionality":{js:"0.41.0",android:"6.0.0",ios:"4.0.0",macos:"0.7.0"}}},max:{doc:"Returns the maximum value of the inputs.",group:"Math","sdk-support":{"basic functionality":{js:"0.41.0",android:"6.0.0",ios:"4.0.0",macos:"0.7.0"}}},round:{doc:'Rounds the input to the nearest integer. Halfway values are rounded away from zero. For example, `["round", -1.5]` evaluates to -2.',group:"Math","sdk-support":{"basic functionality":{js:"0.45.0",android:"6.0.0",ios:"4.0.0",macos:"0.7.0"}}},abs:{doc:"Returns the absolute value of the input.",group:"Math","sdk-support":{"basic functionality":{js:"0.45.0",android:"6.0.0",ios:"4.0.0",macos:"0.7.0"}}},ceil:{doc:"Returns the smallest integer that is greater than or equal to the input.",group:"Math","sdk-support":{"basic functionality":{js:"0.45.0",android:"6.0.0",ios:"4.0.0",macos:"0.7.0"}}},floor:{doc:"Returns the largest integer that is less than or equal to the input.",group:"Math","sdk-support":{"basic functionality":{js:"0.45.0",android:"6.0.0",ios:"4.0.0",macos:"0.7.0"}}},distance:{doc:"Returns the shortest distance in meters between the evaluated feature and the input geometry. The input value can be a valid GeoJSON of type `Point`, `MultiPoint`, `LineString`, `MultiLineString`, `Polygon`, `MultiPolygon`, `Feature`, or `FeatureCollection`. Distance values returned may vary in precision due to loss in precision from encoding geometries, particularly below zoom level 13.",group:"Math","sdk-support":{"basic functionality":{android:"9.2.0",ios:"5.9.0",macos:"0.16.0"}}},"==":{doc:"Returns `true` if the input values are equal, `false` otherwise. The comparison is strictly typed: values of different runtime types are always considered unequal. Cases where the types are known to be different at parse time are considered invalid and will produce a parse error. Accepts an optional `collator` argument to control locale-dependent string comparisons.",group:"Decision","sdk-support":{"basic functionality":{js:"0.41.0",android:"6.0.0",ios:"4.0.0",macos:"0.7.0"},collator:{js:"0.45.0",android:"6.5.0",ios:"4.2.0",macos:"0.9.0"}}},"!=":{doc:"Returns `true` if the input values are not equal, `false` otherwise. The comparison is strictly typed: values of different runtime types are always considered unequal. Cases where the types are known to be different at parse time are considered invalid and will produce a parse error. Accepts an optional `collator` argument to control locale-dependent string comparisons.",group:"Decision","sdk-support":{"basic functionality":{js:"0.41.0",android:"6.0.0",ios:"4.0.0",macos:"0.7.0"},collator:{js:"0.45.0",android:"6.5.0",ios:"4.2.0",macos:"0.9.0"}}},">":{doc:"Returns `true` if the first input is strictly greater than the second, `false` otherwise. The arguments are required to be either both strings or both numbers; if during evaluation they are not, expression evaluation produces an error. Cases where this constraint is known not to hold at parse time are considered in valid and will produce a parse error. Accepts an optional `collator` argument to control locale-dependent string comparisons.",group:"Decision","sdk-support":{"basic functionality":{js:"0.41.0",android:"6.0.0",ios:"4.0.0",macos:"0.7.0"},collator:{js:"0.45.0",android:"6.5.0",ios:"4.2.0",macos:"0.9.0"}}},"<":{doc:"Returns `true` if the first input is strictly less than the second, `false` otherwise. The arguments are required to be either both strings or both numbers; if during evaluation they are not, expression evaluation produces an error. Cases where this constraint is known not to hold at parse time are considered in valid and will produce a parse error. Accepts an optional `collator` argument to control locale-dependent string comparisons.",group:"Decision","sdk-support":{"basic functionality":{js:"0.41.0",android:"6.0.0",ios:"4.0.0",macos:"0.7.0"},collator:{js:"0.45.0",android:"6.5.0",ios:"4.2.0",macos:"0.9.0"}}},">=":{doc:"Returns `true` if the first input is greater than or equal to the second, `false` otherwise. The arguments are required to be either both strings or both numbers; if during evaluation they are not, expression evaluation produces an error. Cases where this constraint is known not to hold at parse time are considered in valid and will produce a parse error. Accepts an optional `collator` argument to control locale-dependent string comparisons.",group:"Decision","sdk-support":{"basic functionality":{js:"0.41.0",android:"6.0.0",ios:"4.0.0",macos:"0.7.0"},collator:{js:"0.45.0",android:"6.5.0",ios:"4.2.0",macos:"0.9.0"}}},"<=":{doc:"Returns `true` if the first input is less than or equal to the second, `false` otherwise. The arguments are required to be either both strings or both numbers; if during evaluation they are not, expression evaluation produces an error. Cases where this constraint is known not to hold at parse time are considered in valid and will produce a parse error. Accepts an optional `collator` argument to control locale-dependent string comparisons.",group:"Decision","sdk-support":{"basic functionality":{js:"0.41.0",android:"6.0.0",ios:"4.0.0",macos:"0.7.0"},collator:{js:"0.45.0",android:"6.5.0",ios:"4.2.0",macos:"0.9.0"}}},all:{doc:"Returns `true` if all the inputs are `true`, `false` otherwise. The inputs are evaluated in order, and evaluation is short-circuiting: once an input expression evaluates to `false`, the result is `false` and no further input expressions are evaluated.",group:"Decision","sdk-support":{"basic functionality":{js:"0.41.0",android:"6.0.0",ios:"4.0.0",macos:"0.7.0"}}},any:{doc:"Returns `true` if any of the inputs are `true`, `false` otherwise. The inputs are evaluated in order, and evaluation is short-circuiting: once an input expression evaluates to `true`, the result is `true` and no further input expressions are evaluated.",group:"Decision","sdk-support":{"basic functionality":{js:"0.41.0",android:"6.0.0",ios:"4.0.0",macos:"0.7.0"}}},"!":{doc:"Logical negation. Returns `true` if the input is `false`, and `false` if the input is `true`.",group:"Decision","sdk-support":{"basic functionality":{js:"0.41.0",android:"6.0.0",ios:"4.0.0",macos:"0.7.0"}}},within:{doc:"Returns `true` if the evaluated feature is fully contained inside a boundary of the input geometry, `false` otherwise. The input value can be a valid GeoJSON of type `Polygon`, `MultiPolygon`, `Feature`, or `FeatureCollection`. Supported features for evaluation:\n- `Point`: Returns `false` if a point is on the boundary or falls outside the boundary.\n- `LineString`: Returns `false` if any part of a line falls outside the boundary, the line intersects the boundary, or a line's endpoint is on the boundary.",group:"Decision","sdk-support":{"basic functionality":{js:"1.9.0",android:"9.1.0",ios:"5.8.0",macos:"0.15.0"}}},"is-supported-script":{doc:"Returns `true` if the input string is expected to render legibly. Returns `false` if the input string contains sections that cannot be rendered without potential loss of meaning (e.g. Indic scripts that require complex text shaping, or right-to-left scripts if the the `mapbox-gl-rtl-text` plugin is not in use in Mapbox GL JS).",group:"String","sdk-support":{"basic functionality":{js:"0.45.0",android:"6.6.0"}}},upcase:{doc:"Returns the input string converted to uppercase. Follows the Unicode Default Case Conversion algorithm and the locale-insensitive case mappings in the Unicode Character Database.",group:"String","sdk-support":{"basic functionality":{js:"0.41.0",android:"6.0.0",ios:"4.0.0",macos:"0.7.0"}}},downcase:{doc:"Returns the input string converted to lowercase. Follows the Unicode Default Case Conversion algorithm and the locale-insensitive case mappings in the Unicode Character Database.",group:"String","sdk-support":{"basic functionality":{js:"0.41.0",android:"6.0.0",ios:"4.0.0",macos:"0.7.0"}}},concat:{doc:"Returns a `string` consisting of the concatenation of the inputs. Each input is converted to a string as if by `to-string`.",group:"String","sdk-support":{"basic functionality":{js:"0.41.0",android:"6.0.0",ios:"4.0.0",macos:"0.7.0"}}},"resolved-locale":{doc:"Returns the IETF language tag of the locale being used by the provided `collator`. This can be used to determine the default system locale, or to determine if a requested locale was successfully loaded.",group:"String","sdk-support":{"basic functionality":{js:"0.45.0",android:"6.5.0",ios:"4.2.0",macos:"0.9.0"}}}}},fog:{range:{type:"array",default:[.5,10],minimum:-20,maximum:20,length:2,value:"number","property-type":"data-constant",transition:!0,expression:{interpolated:!0,parameters:["zoom"]},doc:"The start and end distance range in which fog fades from fully transparent to fully opaque. The distance to the point at the center of the map is defined as zero, so that negative range values are closer to the camera, and positive values are farther away.",example:[.5,10],"sdk-support":{"basic functionality":{js:"2.3.0"}}},color:{type:"color","property-type":"data-constant",default:"#ffffff",expression:{interpolated:!0,parameters:["zoom"]},transition:!0,doc:"The color of the fog. Using opacity is recommended only for smoothly transitioning fog on/off as anything less than 100% opacity results in more tiles loaded and drawn.","sdk-support":{"basic functionality":{js:"2.3.0"}}},"horizon-blend":{type:"number","property-type":"data-constant",default:.1,minimum:0,maximum:1,expression:{interpolated:!0,parameters:["zoom"]},transition:!0,doc:"Horizon blend applies a smooth fade from the color of the fog to the color of the sky. A value of zero leaves a sharp transition from fog to sky. Increasing the value blends the color of fog into increasingly high angles of the sky.","sdk-support":{"basic functionality":{js:"2.3.0"}}}},light:{anchor:{type:"enum",default:"viewport",values:{map:{doc:"The position of the light source is aligned to the rotation of the map."},viewport:{doc:"The position of the light source is aligned to the rotation of the viewport."}},"property-type":"data-constant",transition:!1,expression:{interpolated:!1,parameters:["zoom"]},doc:"Whether extruded geometries are lit relative to the map or viewport.",example:"map","sdk-support":{"basic functionality":{js:"0.27.0",android:"5.1.0",ios:"3.6.0",macos:"0.5.0"}}},position:{type:"array",default:[1.15,210,30],length:3,value:"number","property-type":"data-constant",transition:!0,expression:{interpolated:!0,parameters:["zoom"]},doc:"Position of the light source relative to lit (extruded) geometries, in [r radial coordinate, a azimuthal angle, p polar angle] where r indicates the distance from the center of the base of an object to its light, a indicates the position of the light relative to 0° (0° when `light.anchor` is set to `viewport` corresponds to the top of the viewport, or 0° when `light.anchor` is set to `map` corresponds to due north, and degrees proceed clockwise), and p indicates the height of the light (from 0°, directly above, to 180°, directly below).",example:[1.5,90,80],"sdk-support":{"basic functionality":{js:"0.27.0",android:"5.1.0",ios:"3.6.0",macos:"0.5.0"}}},color:{type:"color","property-type":"data-constant",default:"#ffffff",expression:{interpolated:!0,parameters:["zoom"]},transition:!0,doc:"Color tint for lighting extruded geometries.","sdk-support":{"basic functionality":{js:"0.27.0",android:"5.1.0",ios:"3.6.0",macos:"0.5.0"}}},intensity:{type:"number","property-type":"data-constant",default:.5,minimum:0,maximum:1,expression:{interpolated:!0,parameters:["zoom"]},transition:!0,doc:"Intensity of lighting (on a scale from 0 to 1). Higher numbers will present as more extreme contrast.","sdk-support":{"basic functionality":{js:"0.27.0",android:"5.1.0",ios:"3.6.0",macos:"0.5.0"}}}},projection:{name:{type:"enum",values:{albers:{doc:"An Albers equal-area projection centered on the continental United States. You can configure the projection for a different region by setting `center` and `parallels` properties. You may want to set max bounds to constrain the map to the relevant region."},equalEarth:{doc:"An Equal Earth projection."},equirectangular:{doc:"An Equirectangular projection. This projection is very similar to the Plate Carrée projection."},lambertConformalConic:{doc:"A Lambert conformal conic projection. You can configure the projection for a region by setting `center` and `parallels` properties. You may want to set max bounds to constrain the map to the relevant region."},mercator:{doc:"The Mercator projection is the default projection."},naturalEarth:{doc:"A Natural Earth projection."},winkelTripel:{doc:"A Winkel Tripel projection."}},default:"mercator",doc:"The name of the projection to be used for rendering the map.",required:!0,"sdk-support":{"basic functionality":{js:"2.6.0"}}},center:{type:"array",length:2,value:"number","property-type":"data-constant",transition:!1,doc:"The reference longitude and latitude of the projection. `center` takes the form of [lng, lat]. This property is only configurable for conic projections (Albers and Lambert Conformal Conic). All other projections are centered on [0, 0].",example:[-96,37.5],requires:[{name:["albers","lambertConformalConic"]}],"sdk-support":{"basic functionality":{js:"2.6.0"}}},parallels:{type:"array",length:2,value:"number","property-type":"data-constant",transition:!1,doc:"The standard parallels of the projection, denoting the desired latitude range with minimal distortion. `parallels` takes the form of [lat0, lat1]. This property is only configurable for conic projections (Albers and Lambert Conformal Conic).",example:[29.5,45.5],requires:[{name:["albers","lambertConformalConic"]}],"sdk-support":{"basic functionality":{js:"2.6.0"}}}},terrain:{source:{type:"string",doc:"Name of a source of `raster_dem` type to be used for terrain elevation.",required:!0,"sdk-support":{"basic functionality":{js:"2.0.0",ios:"10.0.0",android:"10.0.0"}}},exaggeration:{type:"number","property-type":"data-constant",default:1,minimum:0,maximum:1e3,expression:{interpolated:!0,parameters:["zoom"]},transition:!0,doc:"Exaggerates the elevation of the terrain by multiplying the data from the DEM with this value.","sdk-support":{"basic functionality":{js:"2.0.0",ios:"10.0.0",android:"10.0.0"}}}},paint:["paint_fill","paint_line","paint_circle","paint_heatmap","paint_fill-extrusion","paint_symbol","paint_raster","paint_hillshade","paint_background","paint_sky"],paint_fill:{"fill-antialias":{type:"boolean",default:!0,doc:"Whether or not the fill should be antialiased.","sdk-support":{"basic functionality":{js:"0.10.0",android:"2.0.1",ios:"2.0.0",macos:"0.1.0"}},expression:{interpolated:!1,parameters:["zoom"]},"property-type":"data-constant"},"fill-opacity":{type:"number",default:1,minimum:0,maximum:1,doc:"The opacity of the entire fill layer. In contrast to the `fill-color`, this value will also affect the 1px stroke around the fill, if the stroke is used.",transition:!0,"sdk-support":{"basic functionality":{js:"0.10.0",android:"2.0.1",ios:"2.0.0",macos:"0.1.0"},"data-driven styling":{js:"0.21.0",android:"5.0.0",ios:"3.5.0",macos:"0.4.0"}},expression:{interpolated:!0,parameters:["zoom","feature","feature-state"]},"property-type":"data-driven"},"fill-color":{type:"color",default:"#000000",doc:"The color of the filled part of this layer. This color can be specified as `rgba` with an alpha component and the color's opacity will not affect the opacity of the 1px stroke, if it is used.",transition:!0,requires:[{"!":"fill-pattern"}],"sdk-support":{"basic functionality":{js:"0.10.0",android:"2.0.1",ios:"2.0.0",macos:"0.1.0"},"data-driven styling":{js:"0.19.0",android:"5.0.0",ios:"3.5.0",macos:"0.4.0"}},expression:{interpolated:!0,parameters:["zoom","feature","feature-state"]},"property-type":"data-driven"},"fill-outline-color":{type:"color",doc:"The outline color of the fill. Matches the value of `fill-color` if unspecified.",transition:!0,requires:[{"!":"fill-pattern"},{"fill-antialias":!0}],"sdk-support":{"basic functionality":{js:"0.10.0",android:"2.0.1",ios:"2.0.0",macos:"0.1.0"},"data-driven styling":{js:"0.19.0",android:"5.0.0",ios:"3.5.0",macos:"0.4.0"}},expression:{interpolated:!0,parameters:["zoom","feature","feature-state"]},"property-type":"data-driven"},"fill-translate":{type:"array",value:"number",length:2,default:[0,0],transition:!0,units:"pixels",doc:"The geometry's offset. Values are [x, y] where negatives indicate left and up, respectively.","sdk-support":{"basic functionality":{js:"0.10.0",android:"2.0.1",ios:"2.0.0",macos:"0.1.0"}},expression:{interpolated:!0,parameters:["zoom"]},"property-type":"data-constant"},"fill-translate-anchor":{type:"enum",values:{map:{doc:"The fill is translated relative to the map."},viewport:{doc:"The fill is translated relative to the viewport."}},doc:"Controls the frame of reference for `fill-translate`.",default:"map",requires:["fill-translate"],"sdk-support":{"basic functionality":{js:"0.10.0",android:"2.0.1",ios:"2.0.0",macos:"0.1.0"}},expression:{interpolated:!1,parameters:["zoom"]},"property-type":"data-constant"},"fill-pattern":{type:"resolvedImage",transition:!0,doc:"Name of image in sprite to use for drawing image fills. For seamless patterns, image width and height must be a factor of two (2, 4, 8, ..., 512). Note that zoom-dependent expressions will be evaluated only at integer zoom levels.","sdk-support":{"basic functionality":{js:"0.10.0",android:"2.0.1",ios:"2.0.0",macos:"0.1.0"},"data-driven styling":{js:"0.49.0",android:"6.5.0",macos:"0.11.0",ios:"4.4.0"}},expression:{interpolated:!1,parameters:["zoom","feature"]},"property-type":"cross-faded-data-driven"}},"paint_fill-extrusion":{"fill-extrusion-opacity":{type:"number",default:1,minimum:0,maximum:1,doc:"The opacity of the entire fill extrusion layer. This is rendered on a per-layer, not per-feature, basis, and data-driven styling is not available.",transition:!0,"sdk-support":{"basic functionality":{js:"0.27.0",android:"5.1.0",ios:"3.6.0",macos:"0.5.0"}},expression:{interpolated:!0,parameters:["zoom"]},"property-type":"data-constant"},"fill-extrusion-color":{type:"color",default:"#000000",doc:"The base color of the extruded fill. The extrusion's surfaces will be shaded differently based on this color in combination with the root `light` settings. If this color is specified as `rgba` with an alpha component, the alpha component will be ignored; use `fill-extrusion-opacity` to set layer opacity.",transition:!0,requires:[{"!":"fill-extrusion-pattern"}],"sdk-support":{"basic functionality":{js:"0.27.0",android:"5.1.0",ios:"3.6.0",macos:"0.5.0"},"data-driven styling":{js:"0.27.0",android:"5.1.0",ios:"3.6.0",macos:"0.5.0"}},expression:{interpolated:!0,parameters:["zoom","feature","feature-state"]},"property-type":"data-driven"},"fill-extrusion-translate":{type:"array",value:"number",length:2,default:[0,0],transition:!0,units:"pixels",doc:"The geometry's offset. Values are [x, y] where negatives indicate left and up (on the flat plane), respectively.","sdk-support":{"basic functionality":{js:"0.27.0",android:"5.1.0",ios:"3.6.0",macos:"0.5.0"}},expression:{interpolated:!0,parameters:["zoom"]},"property-type":"data-constant"},"fill-extrusion-translate-anchor":{type:"enum",values:{map:{doc:"The fill extrusion is translated relative to the map."},viewport:{doc:"The fill extrusion is translated relative to the viewport."}},doc:"Controls the frame of reference for `fill-extrusion-translate`.",default:"map",requires:["fill-extrusion-translate"],"sdk-support":{"basic functionality":{js:"0.27.0",android:"5.1.0",ios:"3.6.0",macos:"0.5.0"}},expression:{interpolated:!1,parameters:["zoom"]},"property-type":"data-constant"},"fill-extrusion-pattern":{type:"resolvedImage",transition:!0,doc:"Name of image in sprite to use for drawing images on extruded fills. For seamless patterns, image width and height must be a factor of two (2, 4, 8, ..., 512). Note that zoom-dependent expressions will be evaluated only at integer zoom levels.","sdk-support":{"basic functionality":{js:"0.27.0",android:"5.1.0",ios:"3.6.0",macos:"0.5.0"},"data-driven styling":{js:"0.49.0",android:"6.5.0",macos:"0.11.0",ios:"4.4.0"}},expression:{interpolated:!1,parameters:["zoom","feature"]},"property-type":"cross-faded-data-driven"},"fill-extrusion-height":{type:"number",default:0,minimum:0,units:"meters",doc:"The height with which to extrude this layer.",transition:!0,"sdk-support":{"basic functionality":{js:"0.27.0",android:"5.1.0",ios:"3.6.0",macos:"0.5.0"},"data-driven styling":{js:"0.27.0",android:"5.1.0",ios:"3.6.0",macos:"0.5.0"}},expression:{interpolated:!0,parameters:["zoom","feature","feature-state"]},"property-type":"data-driven"},"fill-extrusion-base":{type:"number",default:0,minimum:0,units:"meters",doc:"The height with which to extrude the base of this layer. Must be less than or equal to `fill-extrusion-height`.",transition:!0,requires:["fill-extrusion-height"],"sdk-support":{"basic functionality":{js:"0.27.0",android:"5.1.0",ios:"3.6.0",macos:"0.5.0"},"data-driven styling":{js:"0.27.0",android:"5.1.0",ios:"3.6.0",macos:"0.5.0"}},expression:{interpolated:!0,parameters:["zoom","feature","feature-state"]},"property-type":"data-driven"},"fill-extrusion-vertical-gradient":{type:"boolean",default:!0,doc:"Whether to apply a vertical gradient to the sides of a fill-extrusion layer. If true, sides will be shaded slightly darker farther down.",transition:!1,"sdk-support":{"basic functionality":{js:"0.50.0",android:"7.0.0",ios:"4.7.0",macos:"0.13.0"}},expression:{interpolated:!1,parameters:["zoom"]},"property-type":"data-constant"}},paint_line:{"line-opacity":{type:"number",doc:"The opacity at which the line will be drawn.",default:1,minimum:0,maximum:1,transition:!0,"sdk-support":{"basic functionality":{js:"0.10.0",android:"2.0.1",ios:"2.0.0",macos:"0.1.0"},"data-driven styling":{js:"0.29.0",android:"5.0.0",ios:"3.5.0",macos:"0.4.0"}},expression:{interpolated:!0,parameters:["zoom","feature","feature-state"]},"property-type":"data-driven"},"line-color":{type:"color",doc:"The color with which the line will be drawn.",default:"#000000",transition:!0,requires:[{"!":"line-pattern"}],"sdk-support":{"basic functionality":{js:"0.10.0",android:"2.0.1",ios:"2.0.0",macos:"0.1.0"},"data-driven styling":{js:"0.23.0",android:"5.0.0",ios:"3.5.0",macos:"0.4.0"}},expression:{interpolated:!0,parameters:["zoom","feature","feature-state"]},"property-type":"data-driven"},"line-translate":{type:"array",value:"number",length:2,default:[0,0],transition:!0,units:"pixels",doc:"The geometry's offset. Values are [x, y] where negatives indicate left and up, respectively.","sdk-support":{"basic functionality":{js:"0.10.0",android:"2.0.1",ios:"2.0.0",macos:"0.1.0"}},expression:{interpolated:!0,parameters:["zoom"]},"property-type":"data-constant"},"line-translate-anchor":{type:"enum",values:{map:{doc:"The line is translated relative to the map."},viewport:{doc:"The line is translated relative to the viewport."}},doc:"Controls the frame of reference for `line-translate`.",default:"map",requires:["line-translate"],"sdk-support":{"basic functionality":{js:"0.10.0",android:"2.0.1",ios:"2.0.0",macos:"0.1.0"}},expression:{interpolated:!1,parameters:["zoom"]},"property-type":"data-constant"},"line-width":{type:"number",default:1,minimum:0,transition:!0,units:"pixels",doc:"Stroke thickness.","sdk-support":{"basic functionality":{js:"0.10.0",android:"2.0.1",ios:"2.0.0",macos:"0.1.0"},"data-driven styling":{js:"0.39.0",android:"5.2.0",ios:"3.7.0",macos:"0.6.0"}},expression:{interpolated:!0,parameters:["zoom","feature","feature-state"]},"property-type":"data-driven"},"line-gap-width":{type:"number",default:0,minimum:0,doc:"Draws a line casing outside of a line's actual path. Value indicates the width of the inner gap.",transition:!0,units:"pixels","sdk-support":{"basic functionality":{js:"0.10.0",android:"2.0.1",ios:"2.0.0",macos:"0.1.0"},"data-driven styling":{js:"0.29.0",android:"5.0.0",ios:"3.5.0",macos:"0.4.0"}},expression:{interpolated:!0,parameters:["zoom","feature","feature-state"]},"property-type":"data-driven"},"line-offset":{type:"number",default:0,doc:"The line's offset. For linear features, a positive value offsets the line to the right, relative to the direction of the line, and a negative value to the left. For polygon features, a positive value results in an inset, and a negative value results in an outset.",transition:!0,units:"pixels","sdk-support":{"basic functionality":{js:"0.12.1",android:"3.0.0",ios:"3.1.0",macos:"0.1.0"},"data-driven styling":{js:"0.29.0",android:"5.0.0",ios:"3.5.0",macos:"0.4.0"}},expression:{interpolated:!0,parameters:["zoom","feature","feature-state"]},"property-type":"data-driven"},"line-blur":{type:"number",default:0,minimum:0,transition:!0,units:"pixels",doc:"Blur applied to the line, in pixels.","sdk-support":{"basic functionality":{js:"0.10.0",android:"2.0.1",ios:"2.0.0",macos:"0.1.0"},"data-driven styling":{js:"0.29.0",android:"5.0.0",ios:"3.5.0",macos:"0.4.0"}},expression:{interpolated:!0,parameters:["zoom","feature","feature-state"]},"property-type":"data-driven"},"line-dasharray":{type:"array",value:"number",doc:"Specifies the lengths of the alternating dashes and gaps that form the dash pattern. The lengths are later scaled by the line width. To convert a dash length to pixels, multiply the length by the current line width. Note that GeoJSON sources with `lineMetrics: true` specified won't render dashed lines to the expected scale. Also note that zoom-dependent expressions will be evaluated only at integer zoom levels.",minimum:0,transition:!0,units:"line widths",requires:[{"!":"line-pattern"}],"sdk-support":{"basic functionality":{js:"0.10.0",android:"2.0.1",ios:"2.0.0",macos:"0.1.0"},"data-driven styling":{js:"2.3.0"}},expression:{interpolated:!1,parameters:["zoom","feature"]},"property-type":"cross-faded-data-driven"},"line-pattern":{type:"resolvedImage",transition:!0,doc:"Name of image in sprite to use for drawing image lines. For seamless patterns, image width must be a factor of two (2, 4, 8, ..., 512). Note that zoom-dependent expressions will be evaluated only at integer zoom levels.","sdk-support":{"basic functionality":{js:"0.10.0",android:"2.0.1",ios:"2.0.0",macos:"0.1.0"},"data-driven styling":{js:"0.49.0",android:"6.5.0",macos:"0.11.0",ios:"4.4.0"}},expression:{interpolated:!1,parameters:["zoom","feature"]},"property-type":"cross-faded-data-driven"},"line-gradient":{type:"color",doc:'Defines a gradient with which to color a line feature. Can only be used with GeoJSON sources that specify `"lineMetrics": true`.',transition:!1,requires:[{"!":"line-pattern"},{source:"geojson",has:{lineMetrics:!0}}],"sdk-support":{"basic functionality":{js:"0.45.0",android:"6.5.0",ios:"4.4.0",macos:"0.11.0"},"data-driven styling":{}},expression:{interpolated:!0,parameters:["line-progress"]},"property-type":"color-ramp"}},paint_circle:{"circle-radius":{type:"number",default:5,minimum:0,transition:!0,units:"pixels",doc:"Circle radius.","sdk-support":{"basic functionality":{js:"0.10.0",android:"2.0.1",ios:"2.0.0",macos:"0.1.0"},"data-driven styling":{js:"0.18.0",android:"5.0.0",ios:"3.5.0",macos:"0.4.0"}},expression:{interpolated:!0,parameters:["zoom","feature","feature-state"]},"property-type":"data-driven"},"circle-color":{type:"color",default:"#000000",doc:"The fill color of the circle.",transition:!0,"sdk-support":{"basic functionality":{js:"0.10.0",android:"2.0.1",ios:"2.0.0",macos:"0.1.0"},"data-driven styling":{js:"0.18.0",android:"5.0.0",ios:"3.5.0",macos:"0.4.0"}},expression:{interpolated:!0,parameters:["zoom","feature","feature-state"]},"property-type":"data-driven"},"circle-blur":{type:"number",default:0,doc:"Amount to blur the circle. 1 blurs the circle such that only the centerpoint is full opacity.",transition:!0,"sdk-support":{"basic functionality":{js:"0.10.0",android:"2.0.1",ios:"2.0.0",macos:"0.1.0"},"data-driven styling":{js:"0.20.0",android:"5.0.0",ios:"3.5.0",macos:"0.4.0"}},expression:{interpolated:!0,parameters:["zoom","feature","feature-state"]},"property-type":"data-driven"},"circle-opacity":{type:"number",doc:"The opacity at which the circle will be drawn.",default:1,minimum:0,maximum:1,transition:!0,"sdk-support":{"basic functionality":{js:"0.10.0",android:"2.0.1",ios:"2.0.0",macos:"0.1.0"},"data-driven styling":{js:"0.20.0",android:"5.0.0",ios:"3.5.0",macos:"0.4.0"}},expression:{interpolated:!0,parameters:["zoom","feature","feature-state"]},"property-type":"data-driven"},"circle-translate":{type:"array",value:"number",length:2,default:[0,0],transition:!0,units:"pixels",doc:"The geometry's offset. Values are [x, y] where negatives indicate left and up, respectively.","sdk-support":{"basic functionality":{js:"0.10.0",android:"2.0.1",ios:"2.0.0",macos:"0.1.0"}},expression:{interpolated:!0,parameters:["zoom"]},"property-type":"data-constant"},"circle-translate-anchor":{type:"enum",values:{map:{doc:"The circle is translated relative to the map."},viewport:{doc:"The circle is translated relative to the viewport."}},doc:"Controls the frame of reference for `circle-translate`.",default:"map",requires:["circle-translate"],"sdk-support":{"basic functionality":{js:"0.10.0",android:"2.0.1",ios:"2.0.0",macos:"0.1.0"}},expression:{interpolated:!1,parameters:["zoom"]},"property-type":"data-constant"},"circle-pitch-scale":{type:"enum",values:{map:{doc:"Circles are scaled according to their apparent distance to the camera."},viewport:{doc:"Circles are not scaled."}},default:"map",doc:"Controls the scaling behavior of the circle when the map is pitched.","sdk-support":{"basic functionality":{js:"0.21.0",android:"4.2.0",ios:"3.4.0",macos:"0.2.1"}},expression:{interpolated:!1,parameters:["zoom"]},"property-type":"data-constant"},"circle-pitch-alignment":{type:"enum",values:{map:{doc:"The circle is aligned to the plane of the map."},viewport:{doc:"The circle is aligned to the plane of the viewport."}},default:"viewport",doc:"Orientation of circle when map is pitched.","sdk-support":{"basic functionality":{js:"0.39.0",android:"5.2.0",ios:"3.7.0",macos:"0.6.0"}},expression:{interpolated:!1,parameters:["zoom"]},"property-type":"data-constant"},"circle-stroke-width":{type:"number",default:0,minimum:0,transition:!0,units:"pixels",doc:"The width of the circle's stroke. Strokes are placed outside of the `circle-radius`.","sdk-support":{"basic functionality":{js:"0.29.0",android:"5.0.0",ios:"3.5.0",macos:"0.4.0"},"data-driven styling":{js:"0.29.0",android:"5.0.0",ios:"3.5.0",macos:"0.4.0"}},expression:{interpolated:!0,parameters:["zoom","feature","feature-state"]},"property-type":"data-driven"},"circle-stroke-color":{type:"color",default:"#000000",doc:"The stroke color of the circle.",transition:!0,"sdk-support":{"basic functionality":{js:"0.29.0",android:"5.0.0",ios:"3.5.0",macos:"0.4.0"},"data-driven styling":{js:"0.29.0",android:"5.0.0",ios:"3.5.0",macos:"0.4.0"}},expression:{interpolated:!0,parameters:["zoom","feature","feature-state"]},"property-type":"data-driven"},"circle-stroke-opacity":{type:"number",doc:"The opacity of the circle's stroke.",default:1,minimum:0,maximum:1,transition:!0,"sdk-support":{"basic functionality":{js:"0.29.0",android:"5.0.0",ios:"3.5.0",macos:"0.4.0"},"data-driven styling":{js:"0.29.0",android:"5.0.0",ios:"3.5.0",macos:"0.4.0"}},expression:{interpolated:!0,parameters:["zoom","feature","feature-state"]},"property-type":"data-driven"}},paint_heatmap:{"heatmap-radius":{type:"number",default:30,minimum:1,transition:!0,units:"pixels",doc:"Radius of influence of one heatmap point in pixels. Increasing the value makes the heatmap smoother, but less detailed. `queryRenderedFeatures` on heatmap layers will return points within this radius.","sdk-support":{"basic functionality":{js:"0.41.0",android:"6.0.0",ios:"4.0.0",macos:"0.7.0"},"data-driven styling":{js:"0.43.0",android:"6.0.0",ios:"4.0.0",macos:"0.7.0"}},expression:{interpolated:!0,parameters:["zoom","feature","feature-state"]},"property-type":"data-driven"},"heatmap-weight":{type:"number",default:1,minimum:0,transition:!1,doc:"A measure of how much an individual point contributes to the heatmap. A value of 10 would be equivalent to having 10 points of weight 1 in the same spot. Especially useful when combined with clustering.","sdk-support":{"basic functionality":{js:"0.41.0",android:"6.0.0",ios:"4.0.0",macos:"0.7.0"},"data-driven styling":{js:"0.41.0",android:"6.0.0",ios:"4.0.0",macos:"0.7.0"}},expression:{interpolated:!0,parameters:["zoom","feature","feature-state"]},"property-type":"data-driven"},"heatmap-intensity":{type:"number",default:1,minimum:0,transition:!0,doc:"Similar to `heatmap-weight` but controls the intensity of the heatmap globally. Primarily used for adjusting the heatmap based on zoom level.","sdk-support":{"basic functionality":{js:"0.41.0",android:"6.0.0",ios:"4.0.0",macos:"0.7.0"}},expression:{interpolated:!0,parameters:["zoom"]},"property-type":"data-constant"},"heatmap-color":{type:"color",default:["interpolate",["linear"],["heatmap-density"],0,"rgba(0, 0, 255, 0)",.1,"royalblue",.3,"cyan",.5,"lime",.7,"yellow",1,"red"],doc:'Defines the color of each pixel based on its density value in a heatmap.  Should be an expression that uses `["heatmap-density"]` as input.',transition:!1,"sdk-support":{"basic functionality":{js:"0.41.0",android:"6.0.0",ios:"4.0.0",macos:"0.7.0"},"data-driven styling":{}},expression:{interpolated:!0,parameters:["heatmap-density"]},"property-type":"color-ramp"},"heatmap-opacity":{type:"number",doc:"The global opacity at which the heatmap layer will be drawn.",default:1,minimum:0,maximum:1,transition:!0,"sdk-support":{"basic functionality":{js:"0.41.0",android:"6.0.0",ios:"4.0.0",macos:"0.7.0"}},expression:{interpolated:!0,parameters:["zoom"]},"property-type":"data-constant"}},paint_symbol:{"icon-opacity":{doc:"The opacity at which the icon will be drawn.",type:"number",default:1,minimum:0,maximum:1,transition:!0,requires:["icon-image"],"sdk-support":{"basic functionality":{js:"0.10.0",android:"2.0.1",ios:"2.0.0",macos:"0.1.0"},"data-driven styling":{js:"0.33.0",android:"5.0.0",ios:"3.5.0",macos:"0.4.0"}},expression:{interpolated:!0,parameters:["zoom","feature","feature-state"]},"property-type":"data-driven"},"icon-color":{type:"color",default:"#000000",transition:!0,doc:"The color of the icon. This can only be used with [SDF icons](/help/troubleshooting/using-recolorable-images-in-mapbox-maps/).",requires:["icon-image"],"sdk-support":{"basic functionality":{js:"0.10.0",android:"2.0.1",ios:"2.0.0",macos:"0.1.0"},"data-driven styling":{js:"0.33.0",android:"5.0.0",ios:"3.5.0",macos:"0.4.0"}},expression:{interpolated:!0,parameters:["zoom","feature","feature-state"]},"property-type":"data-driven"},"icon-halo-color":{type:"color",default:"rgba(0, 0, 0, 0)",transition:!0,doc:"The color of the icon's halo. Icon halos can only be used with [SDF icons](/help/troubleshooting/using-recolorable-images-in-mapbox-maps/).",requires:["icon-image"],"sdk-support":{"basic functionality":{js:"0.10.0",android:"2.0.1",ios:"2.0.0",macos:"0.1.0"},"data-driven styling":{js:"0.33.0",android:"5.0.0",ios:"3.5.0",macos:"0.4.0"}},expression:{interpolated:!0,parameters:["zoom","feature","feature-state"]},"property-type":"data-driven"},"icon-halo-width":{type:"number",default:0,minimum:0,transition:!0,units:"pixels",doc:"Distance of halo to the icon outline.",requires:["icon-image"],"sdk-support":{"basic functionality":{js:"0.10.0",android:"2.0.1",ios:"2.0.0",macos:"0.1.0"},"data-driven styling":{js:"0.33.0",android:"5.0.0",ios:"3.5.0",macos:"0.4.0"}},expression:{interpolated:!0,parameters:["zoom","feature","feature-state"]},"property-type":"data-driven"},"icon-halo-blur":{type:"number",default:0,minimum:0,transition:!0,units:"pixels",doc:"Fade out the halo towards the outside.",requires:["icon-image"],"sdk-support":{"basic functionality":{js:"0.10.0",android:"2.0.1",ios:"2.0.0",macos:"0.1.0"},"data-driven styling":{js:"0.33.0",android:"5.0.0",ios:"3.5.0",macos:"0.4.0"}},expression:{interpolated:!0,parameters:["zoom","feature","feature-state"]},"property-type":"data-driven"},"icon-translate":{type:"array",value:"number",length:2,default:[0,0],transition:!0,units:"pixels",doc:"Distance that the icon's anchor is moved from its original placement. Positive values indicate right and down, while negative values indicate left and up.",requires:["icon-image"],"sdk-support":{"basic functionality":{js:"0.10.0",android:"2.0.1",ios:"2.0.0",macos:"0.1.0"}},expression:{interpolated:!0,parameters:["zoom"]},"property-type":"data-constant"},"icon-translate-anchor":{type:"enum",values:{map:{doc:"Icons are translated relative to the map."},viewport:{doc:"Icons are translated relative to the viewport."}},doc:"Controls the frame of reference for `icon-translate`.",default:"map",requires:["icon-image","icon-translate"],"sdk-support":{"basic functionality":{js:"0.10.0",android:"2.0.1",ios:"2.0.0",macos:"0.1.0"}},expression:{interpolated:!1,parameters:["zoom"]},"property-type":"data-constant"},"text-opacity":{type:"number",doc:"The opacity at which the text will be drawn.",default:1,minimum:0,maximum:1,transition:!0,requires:["text-field"],"sdk-support":{"basic functionality":{js:"0.10.0",android:"2.0.1",ios:"2.0.0",macos:"0.1.0"},"data-driven styling":{js:"0.33.0",android:"5.0.0",ios:"3.5.0",macos:"0.4.0"}},expression:{interpolated:!0,parameters:["zoom","feature","feature-state"]},"property-type":"data-driven"},"text-color":{type:"color",doc:"The color with which the text will be drawn.",default:"#000000",transition:!0,overridable:!0,requires:["text-field"],"sdk-support":{"basic functionality":{js:"0.10.0",android:"2.0.1",ios:"2.0.0",macos:"0.1.0"},"data-driven styling":{js:"0.33.0",android:"5.0.0",ios:"3.5.0",macos:"0.4.0"}},expression:{interpolated:!0,parameters:["zoom","feature","feature-state"]},"property-type":"data-driven"},"text-halo-color":{type:"color",default:"rgba(0, 0, 0, 0)",transition:!0,doc:"The color of the text's halo, which helps it stand out from backgrounds.",requires:["text-field"],"sdk-support":{"basic functionality":{js:"0.10.0",android:"2.0.1",ios:"2.0.0",macos:"0.1.0"},"data-driven styling":{js:"0.33.0",android:"5.0.0",ios:"3.5.0",macos:"0.4.0"}},expression:{interpolated:!0,parameters:["zoom","feature","feature-state"]},"property-type":"data-driven"},"text-halo-width":{type:"number",default:0,minimum:0,transition:!0,units:"pixels",doc:"Distance of halo to the font outline. Max text halo width is 1/4 of the font-size.",requires:["text-field"],"sdk-support":{"basic functionality":{js:"0.10.0",android:"2.0.1",ios:"2.0.0",macos:"0.1.0"},"data-driven styling":{js:"0.33.0",android:"5.0.0",ios:"3.5.0",macos:"0.4.0"}},expression:{interpolated:!0,parameters:["zoom","feature","feature-state"]},"property-type":"data-driven"},"text-halo-blur":{type:"number",default:0,minimum:0,transition:!0,units:"pixels",doc:"The halo's fadeout distance towards the outside.",requires:["text-field"],"sdk-support":{"basic functionality":{js:"0.10.0",android:"2.0.1",ios:"2.0.0",macos:"0.1.0"},"data-driven styling":{js:"0.33.0",android:"5.0.0",ios:"3.5.0",macos:"0.4.0"}},expression:{interpolated:!0,parameters:["zoom","feature","feature-state"]},"property-type":"data-driven"},"text-translate":{type:"array",value:"number",length:2,default:[0,0],transition:!0,units:"pixels",doc:"Distance that the text's anchor is moved from its original placement. Positive values indicate right and down, while negative values indicate left and up.",requires:["text-field"],"sdk-support":{"basic functionality":{js:"0.10.0",android:"2.0.1",ios:"2.0.0",macos:"0.1.0"}},expression:{interpolated:!0,parameters:["zoom"]},"property-type":"data-constant"},"text-translate-anchor":{type:"enum",values:{map:{doc:"The text is translated relative to the map."},viewport:{doc:"The text is translated relative to the viewport."}},doc:"Controls the frame of reference for `text-translate`.",default:"map",requires:["text-field","text-translate"],"sdk-support":{"basic functionality":{js:"0.10.0",android:"2.0.1",ios:"2.0.0",macos:"0.1.0"}},expression:{interpolated:!1,parameters:["zoom"]},"property-type":"data-constant"}},paint_raster:{"raster-opacity":{type:"number",doc:"The opacity at which the image will be drawn.",default:1,minimum:0,maximum:1,transition:!0,"sdk-support":{"basic functionality":{js:"0.10.0",android:"2.0.1",ios:"2.0.0",macos:"0.1.0"}},expression:{interpolated:!0,parameters:["zoom"]},"property-type":"data-constant"},"raster-hue-rotate":{type:"number",default:0,period:360,transition:!0,units:"degrees",doc:"Rotates hues around the color wheel.","sdk-support":{"basic functionality":{js:"0.10.0",android:"2.0.1",ios:"2.0.0",macos:"0.1.0"}},expression:{interpolated:!0,parameters:["zoom"]},"property-type":"data-constant"},"raster-brightness-min":{type:"number",doc:"Increase or reduce the brightness of the image. The value is the minimum brightness.",default:0,minimum:0,maximum:1,transition:!0,"sdk-support":{"basic functionality":{js:"0.10.0",android:"2.0.1",ios:"2.0.0",macos:"0.1.0"}},expression:{interpolated:!0,parameters:["zoom"]},"property-type":"data-constant"},"raster-brightness-max":{type:"number",doc:"Increase or reduce the brightness of the image. The value is the maximum brightness.",default:1,minimum:0,maximum:1,transition:!0,"sdk-support":{"basic functionality":{js:"0.10.0",android:"2.0.1",ios:"2.0.0",macos:"0.1.0"}},expression:{interpolated:!0,parameters:["zoom"]},"property-type":"data-constant"},"raster-saturation":{type:"number",doc:"Increase or reduce the saturation of the image.",default:0,minimum:-1,maximum:1,transition:!0,"sdk-support":{"basic functionality":{js:"0.10.0",android:"2.0.1",ios:"2.0.0",macos:"0.1.0"}},expression:{interpolated:!0,parameters:["zoom"]},"property-type":"data-constant"},"raster-contrast":{type:"number",doc:"Increase or reduce the contrast of the image.",default:0,minimum:-1,maximum:1,transition:!0,"sdk-support":{"basic functionality":{js:"0.10.0",android:"2.0.1",ios:"2.0.0",macos:"0.1.0"}},expression:{interpolated:!0,parameters:["zoom"]},"property-type":"data-constant"},"raster-resampling":{type:"enum",doc:"The resampling/interpolation method to use for overscaling, also known as texture magnification filter",values:{linear:{doc:"(Bi)linear filtering interpolates pixel values using the weighted average of the four closest original source pixels creating a smooth but blurry look when overscaled"},nearest:{doc:"Nearest neighbor filtering interpolates pixel values using the nearest original source pixel creating a sharp but pixelated look when overscaled"}},default:"linear","sdk-support":{"basic functionality":{js:"0.47.0",android:"6.3.0",ios:"4.2.0",macos:"0.9.0"}},expression:{interpolated:!1,parameters:["zoom"]},"property-type":"data-constant"},"raster-fade-duration":{type:"number",default:300,minimum:0,transition:!1,units:"milliseconds",doc:"Fade duration when a new tile is added.","sdk-support":{"basic functionality":{js:"0.10.0",android:"2.0.1",ios:"2.0.0",macos:"0.1.0"}},expression:{interpolated:!0,parameters:["zoom"]},"property-type":"data-constant"}},paint_hillshade:{"hillshade-illumination-direction":{type:"number",default:335,minimum:0,maximum:359,doc:"The direction of the light source used to generate the hillshading with 0 as the top of the viewport if `hillshade-illumination-anchor` is set to `viewport` and due north if `hillshade-illumination-anchor` is set to `map`.",transition:!1,"sdk-support":{"basic functionality":{js:"0.43.0",android:"6.0.0",ios:"4.0.0",macos:"0.7.0"}},expression:{interpolated:!0,parameters:["zoom"]},"property-type":"data-constant"},"hillshade-illumination-anchor":{type:"enum",values:{map:{doc:"The hillshade illumination is relative to the north direction."},viewport:{doc:"The hillshade illumination is relative to the top of the viewport."}},default:"viewport",doc:"Direction of light source when map is rotated.","sdk-support":{"basic functionality":{js:"0.43.0",android:"6.0.0",ios:"4.0.0",macos:"0.7.0"}},expression:{interpolated:!1,parameters:["zoom"]},"property-type":"data-constant"},"hillshade-exaggeration":{type:"number",doc:"Intensity of the hillshade",default:.5,minimum:0,maximum:1,transition:!0,"sdk-support":{"basic functionality":{js:"0.43.0",android:"6.0.0",ios:"4.0.0",macos:"0.7.0"}},expression:{interpolated:!0,parameters:["zoom"]},"property-type":"data-constant"},"hillshade-shadow-color":{type:"color",default:"#000000",doc:"The shading color of areas that face away from the light source.",transition:!0,"sdk-support":{"basic functionality":{js:"0.43.0",android:"6.0.0",ios:"4.0.0",macos:"0.7.0"}},expression:{interpolated:!0,parameters:["zoom"]},"property-type":"data-constant"},"hillshade-highlight-color":{type:"color",default:"#FFFFFF",doc:"The shading color of areas that faces towards the light source.",transition:!0,"sdk-support":{"basic functionality":{js:"0.43.0",android:"6.0.0",ios:"4.0.0",macos:"0.7.0"}},expression:{interpolated:!0,parameters:["zoom"]},"property-type":"data-constant"},"hillshade-accent-color":{type:"color",default:"#000000",doc:"The shading color used to accentuate rugged terrain like sharp cliffs and gorges.",transition:!0,"sdk-support":{"basic functionality":{js:"0.43.0",android:"6.0.0",ios:"4.0.0",macos:"0.7.0"}},expression:{interpolated:!0,parameters:["zoom"]},"property-type":"data-constant"}},paint_background:{"background-color":{type:"color",default:"#000000",doc:"The color with which the background will be drawn.",transition:!0,requires:[{"!":"background-pattern"}],"sdk-support":{"basic functionality":{js:"0.10.0",android:"2.0.1",ios:"2.0.0",macos:"0.1.0"}},expression:{interpolated:!0,parameters:["zoom"]},"property-type":"data-constant"},"background-pattern":{type:"resolvedImage",transition:!0,doc:"Name of image in sprite to use for drawing an image background. For seamless patterns, image width and height must be a factor of two (2, 4, 8, ..., 512). Note that zoom-dependent expressions will be evaluated only at integer zoom levels.","sdk-support":{"basic functionality":{js:"0.10.0",android:"2.0.1",ios:"2.0.0",macos:"0.1.0"},"data-driven styling":{}},expression:{interpolated:!1,parameters:["zoom"]},"property-type":"cross-faded"},"background-opacity":{type:"number",default:1,minimum:0,maximum:1,doc:"The opacity at which the background will be drawn.",transition:!0,"sdk-support":{"basic functionality":{js:"0.10.0",android:"2.0.1",ios:"2.0.0",macos:"0.1.0"}},expression:{interpolated:!0,parameters:["zoom"]},"property-type":"data-constant"}},paint_sky:{"sky-type":{type:"enum",values:{gradient:{doc:"Renders the sky with a gradient that can be configured with `sky-gradient-radius` and `sky-gradient`."},atmosphere:{doc:"Renders the sky with a simulated atmospheric scattering algorithm, the sun direction can be attached to the light position or explicitly set through `sky-atmosphere-sun`."}},default:"atmosphere",doc:"The type of the sky","sdk-support":{"basic functionality":{js:"2.0.0",ios:"10.0.0",android:"10.0.0"}},expression:{interpolated:!1,parameters:["zoom"]},"property-type":"data-constant"},"sky-atmosphere-sun":{type:"array",value:"number",length:2,units:"degrees",minimum:[0,0],maximum:[360,180],transition:!1,doc:"Position of the sun center [a azimuthal angle, p polar angle]. The azimuthal angle indicates the position of the sun relative to 0° north, where degrees proceed clockwise. The polar angle indicates the height of the sun, where 0° is directly above, at zenith, and 90° at the horizon. When this property is ommitted, the sun center is directly inherited from the light position.","sdk-support":{"basic functionality":{js:"2.0.0",ios:"10.0.0",android:"10.0.0"}},requires:[{"sky-type":"atmosphere"}],expression:{interpolated:!1,parameters:["zoom"]},"property-type":"data-constant"},"sky-atmosphere-sun-intensity":{type:"number",requires:[{"sky-type":"atmosphere"}],default:10,minimum:0,maximum:100,transition:!1,doc:"Intensity of the sun as a light source in the atmosphere (on a scale from 0 to a 100). Setting higher values will brighten up the sky.","sdk-support":{"basic functionality":{js:"2.0.0",ios:"10.0.0",android:"10.0.0"}},"property-type":"data-constant"},"sky-gradient-center":{type:"array",requires:[{"sky-type":"gradient"}],value:"number",default:[0,0],length:2,units:"degrees",minimum:[0,0],maximum:[360,180],transition:!1,doc:"Position of the gradient center [a azimuthal angle, p polar angle]. The azimuthal angle indicates the position of the gradient center relative to 0° north, where degrees proceed clockwise. The polar angle indicates the height of the gradient center, where 0° is directly above, at zenith, and 90° at the horizon.","sdk-support":{"basic functionality":{js:"2.0.0",ios:"10.0.0",android:"10.0.0"}},expression:{interpolated:!1,parameters:["zoom"]},"property-type":"data-constant"},"sky-gradient-radius":{type:"number",requires:[{"sky-type":"gradient"}],default:90,minimum:0,maximum:180,transition:!1,doc:"The angular distance (measured in degrees) from `sky-gradient-center` up to which the gradient extends. A value of 180 causes the gradient to wrap around to the opposite direction from `sky-gradient-center`.","sdk-support":{"basic functionality":{js:"2.0.0",ios:"10.0.0",android:"10.0.0"}},expression:{interpolated:!1,parameters:["zoom"]},"property-type":"data-constant"},"sky-gradient":{type:"color",default:["interpolate",["linear"],["sky-radial-progress"],.8,"#87ceeb",1,"white"],doc:"Defines a radial color gradient with which to color the sky. The color values can be interpolated with an expression using `sky-radial-progress`. The range [0, 1] for the interpolant covers a radial distance (in degrees) of [0, `sky-gradient-radius`] centered at the position specified by `sky-gradient-center`.",transition:!1,requires:[{"sky-type":"gradient"}],"sdk-support":{"basic functionality":{js:"2.0.0",ios:"10.0.0",android:"10.0.0"},"data-driven styling":{}},expression:{interpolated:!0,parameters:["sky-radial-progress"]},"property-type":"color-ramp"},"sky-atmosphere-halo-color":{type:"color",default:"white",doc:"A color applied to the atmosphere sun halo. The alpha channel describes how strongly the sun halo is represented in an atmosphere sky layer.",transition:!1,requires:[{"sky-type":"atmosphere"}],"sdk-support":{"basic functionality":{js:"2.0.0",ios:"10.0.0",android:"10.0.0"}},"property-type":"data-constant"},"sky-atmosphere-color":{type:"color",default:"white",doc:"A color used to tweak the main atmospheric scattering coefficients. Using white applies the default coefficients giving the natural blue color to the atmosphere. This color affects how heavily the corresponding wavelength is represented during scattering. The alpha channel describes the density of the atmosphere, with 1 maximum density and 0 no density.",transition:!1,requires:[{"sky-type":"atmosphere"}],"sdk-support":{"basic functionality":{js:"2.0.0",ios:"10.0.0",android:"10.0.0"}},"property-type":"data-constant"},"sky-opacity":{type:"number",default:1,minimum:0,maximum:1,doc:"The opacity of the entire sky layer.",transition:!0,"sdk-support":{"basic functionality":{js:"2.0.0",ios:"10.0.0",android:"10.0.0"}},expression:{interpolated:!0,parameters:["zoom"]},"property-type":"data-constant"}},transition:{duration:{type:"number",default:300,minimum:0,units:"milliseconds",doc:"Time allotted for transitions to complete."},delay:{type:"number",default:0,minimum:0,units:"milliseconds",doc:"Length of time before a transition begins."}},"property-type":{"data-driven":{type:"property-type",doc:"Property is interpolable and can be represented using a property expression."},"cross-faded":{type:"property-type",doc:"Property is non-interpolable; rather, its values will be cross-faded to smoothly transition between integer zooms."},"cross-faded-data-driven":{type:"property-type",doc:"Property is non-interpolable; rather, its values will be cross-faded to smoothly transition between integer zooms. It can be represented using a property expression."},"color-ramp":{type:"property-type",doc:"Property should be specified using a color ramp from which the output color can be sampled based on a property calculation."},"data-constant":{type:"property-type",doc:"Property is interpolable but cannot be represented using a property expression."},constant:{type:"property-type",doc:"Property is constant across all zoom levels and property values."}},promoteId:{"*":{type:"string",doc:"A name of a feature property to use as ID for feature state."}}},Ie="undefined"!=typeof globalThis?globalThis:"undefined"!=typeof window?window:"undefined"!=typeof global?global:"undefined"!=typeof self?self:{};function Pe(t){var e={exports:{}};return t(e,e.exports),e.exports}var Le=Pe((function(t,e){!function(r){var i=e&&!e.nodeType&&e,n=t&&!t.nodeType&&t,o="object"==typeof Ie&&Ie;o.global!==o&&o.window!==o&&o.self!==o||(r=o);var a,s,l=2147483647,u=36,c=/^xn--/,h=/[^\x20-\x7E]/,p=/[\x2E\u3002\uFF0E\uFF61]/g,d={overflow:"Overflow: input needs wider integers to process","not-basic":"Illegal input >= 0x80 (not a basic code point)","invalid-input":"Invalid input"},f=Math.floor,g=String.fromCharCode;function y(t){throw RangeError(d[t])}function m(t,e){for(var r=t.length,i=[];r--;)i[r]=e(t[r]);return i}function v(t,e){var r=t.split("@"),i="";return r.length>1&&(i=r[0]+"@",t=r[1]),i+m((t=t.replace(p,".")).split("."),e).join(".")}function _(t){for(var e,r,i=[],n=0,o=t.length;n<o;)(e=t.charCodeAt(n++))>=55296&&e<=56319&&n<o?56320==(64512&(r=t.charCodeAt(n++)))?i.push(((1023&e)<<10)+(1023&r)+65536):(i.push(e),n--):i.push(e);return i}function x(t){return m(t,(function(t){var e="";return t>65535&&(e+=g((t-=65536)>>>10&1023|55296),t=56320|1023&t),e+g(t)})).join("")}function b(t,e){return t+22+75*(t<26)-((0!=e)<<5)}function w(t,e,r){var i=0;for(t=r?f(t/700):t>>1,t+=f(t/e);t>455;i+=u)t=f(t/35);return f(i+36*t/(t+38))}function E(t){var e,r,i,n,o,a,s,c,h,p,d,g=[],m=t.length,v=0,_=128,b=72;for((r=t.lastIndexOf("-"))<0&&(r=0),i=0;i<r;++i)t.charCodeAt(i)>=128&&y("not-basic"),g.push(t.charCodeAt(i));for(n=r>0?r+1:0;n<m;){for(o=v,a=1,s=u;n>=m&&y("invalid-input"),((c=(d=t.charCodeAt(n++))-48<10?d-22:d-65<26?d-65:d-97<26?d-97:u)>=u||c>f((l-v)/a))&&y("overflow"),v+=c*a,!(c<(h=s<=b?1:s>=b+26?26:s-b));s+=u)a>f(l/(p=u-h))&&y("overflow"),a*=p;b=w(v-o,e=g.length+1,0==o),f(v/e)>l-_&&y("overflow"),_+=f(v/e),v%=e,g.splice(v++,0,_)}return x(g)}function T(t){var e,r,i,n,o,a,s,c,h,p,d,m,v,x,E,T=[];for(m=(t=_(t)).length,e=128,r=0,o=72,a=0;a<m;++a)(d=t[a])<128&&T.push(g(d));for(i=n=T.length,n&&T.push("-");i<m;){for(s=l,a=0;a<m;++a)(d=t[a])>=e&&d<s&&(s=d);for(s-e>f((l-r)/(v=i+1))&&y("overflow"),r+=(s-e)*v,e=s,a=0;a<m;++a)if((d=t[a])<e&&++r>l&&y("overflow"),d==e){for(c=r,h=u;!(c<(p=h<=o?1:h>=o+26?26:h-o));h+=u)E=c-p,x=u-p,T.push(g(b(p+E%x,0))),c=f(E/x);T.push(g(b(c,0))),o=w(r,v,i==n),r=0,++i}++r,++e}return T.join("")}if(a={version:"1.3.2",ucs2:{decode:_,encode:x},decode:E,encode:T,toASCII:function(t){return v(t,(function(t){return h.test(t)?"xn--"+T(t):t}))},toUnicode:function(t){return v(t,(function(t){return c.test(t)?E(t.slice(4).toLowerCase()):t}))}},i&&n)if(t.exports==i)n.exports=a;else for(s in a)a.hasOwnProperty(s)&&(i[s]=a[s]);else r.punycode=a}(Ie)})),Ae=function(t){return"string"==typeof t},Me=function(t){return"object"==typeof t&&null!==t},Fe=function(t){return null===t};function Ze(t,e){return Object.prototype.hasOwnProperty.call(t,e)}var ke=function(t,e,r,i){e=e||"&",r=r||"=";var n={};if("string"!=typeof t||0===t.length)return n;var o=/\+/g;t=t.split(e);var a=1e3;i&&"number"==typeof i.maxKeys&&(a=i.maxKeys);var s=t.length;a>0&&s>a&&(s=a);for(var l=0;l<s;++l){var u,c,h,p,d=t[l].replace(o,"%20"),f=d.indexOf(r);f>=0?(u=d.substr(0,f),c=d.substr(f+1)):(u=d,c=""),h=decodeURIComponent(u),p=decodeURIComponent(c),Ze(n,h)?Array.isArray(n[h])?n[h].push(p):n[h]=[n[h],p]:n[h]=p}return n},je=function(t){switch(typeof t){case"string":return t;case"boolean":return t?"true":"false";case"number":return isFinite(t)?t:"";default:return""}},De=function(t,e,r,i){return e=e||"&",r=r||"=",null===t&&(t=void 0),"object"==typeof t?Object.keys(t).map((function(i){var n=encodeURIComponent(je(i))+r;return Array.isArray(t[i])?t[i].map((function(t){return n+encodeURIComponent(je(t))})).join(e):n+encodeURIComponent(je(t[i]))})).join(e):i?encodeURIComponent(je(i))+r+encodeURIComponent(je(t)):""},Ne=Pe((function(t,e){e.decode=e.parse=ke,e.encode=e.stringify=De}));function Ge(){this.protocol=null,this.slashes=null,this.auth=null,this.host=null,this.port=null,this.hostname=null,this.hash=null,this.search=null,this.query=null,this.pathname=null,this.path=null,this.href=null}var ze=/^([a-z0-9.+-]+:)/i,Ue=/:[0-9]*$/,Be=/^(\/\/?(?!\/)[^\?\s]*)(\?[^\s]*)?$/,qe=["{","}","|","\\","^","`"].concat(["<",">",'"',"`"," ","\r","\n","\t"]),Ve=["'"].concat(qe),We=["%","/","?",";","#"].concat(Ve),Xe=["/","?","#"],Ye=/^[+a-z0-9A-Z_-]{0,63}$/,He=/^([+a-z0-9A-Z_-]{0,63})(.*)$/,Ke={javascript:!0,"javascript:":!0},$e={javascript:!0,"javascript:":!0},Je={http:!0,https:!0,ftp:!0,gopher:!0,file:!0,"http:":!0,"https:":!0,"ftp:":!0,"gopher:":!0,"file:":!0};Ge.prototype.parse=function(t,e,r){if(!Ae(t))throw new TypeError("Parameter 'url' must be a string, not "+typeof t);var i=t.indexOf("?"),n=-1!==i&&i<t.indexOf("#")?"?":"#",o=t.split(n);o[0]=o[0].replace(/\\/g,"/");var a=t=o.join(n);if(a=a.trim(),!r&&1===t.split("#").length){var s=Be.exec(a);if(s)return this.path=a,this.href=a,this.pathname=s[1],s[2]?(this.search=s[2],this.query=e?Ne.parse(this.search.substr(1)):this.search.substr(1)):e&&(this.search="",this.query={}),this}var l=ze.exec(a);if(l){var u=(l=l[0]).toLowerCase();this.protocol=u,a=a.substr(l.length)}if(r||l||a.match(/^\/\/[^@\/]+@[^@\/]+/)){var c="//"===a.substr(0,2);!c||l&&$e[l]||(a=a.substr(2),this.slashes=!0)}if(!$e[l]&&(c||l&&!Je[l])){for(var h,p,d=-1,f=0;f<Xe.length;f++)-1!==(g=a.indexOf(Xe[f]))&&(-1===d||g<d)&&(d=g);for(-1!==(p=-1===d?a.lastIndexOf("@"):a.lastIndexOf("@",d))&&(h=a.slice(0,p),a=a.slice(p+1),this.auth=decodeURIComponent(h)),d=-1,f=0;f<We.length;f++){var g;-1!==(g=a.indexOf(We[f]))&&(-1===d||g<d)&&(d=g)}-1===d&&(d=a.length),this.host=a.slice(0,d),a=a.slice(d),this.parseHost(),this.hostname=this.hostname||"";var y="["===this.hostname[0]&&"]"===this.hostname[this.hostname.length-1];if(!y)for(var m=this.hostname.split(/\./),v=(f=0,m.length);f<v;f++){var _=m[f];if(_&&!_.match(Ye)){for(var x="",b=0,w=_.length;b<w;b++)_.charCodeAt(b)>127?x+="x":x+=_[b];if(!x.match(Ye)){var E=m.slice(0,f),T=m.slice(f+1),S=_.match(He);S&&(E.push(S[1]),T.unshift(S[2])),T.length&&(a="/"+T.join(".")+a),this.hostname=E.join(".");break}}}this.hostname.length>255?this.hostname="":this.hostname=this.hostname.toLowerCase(),y||(this.hostname=Le.toASCII(this.hostname));var C=this.port?":"+this.port:"",O=this.hostname||"";this.host=O+C,this.href+=this.host,y&&(this.hostname=this.hostname.substr(1,this.hostname.length-2),"/"!==a[0]&&(a="/"+a))}if(!Ke[u])for(f=0,v=Ve.length;f<v;f++){var R=Ve[f];if(-1!==a.indexOf(R)){var I=encodeURIComponent(R);I===R&&(I=escape(R)),a=a.split(R).join(I)}}var P=a.indexOf("#");-1!==P&&(this.hash=a.substr(P),a=a.slice(0,P));var L=a.indexOf("?");if(-1!==L?(this.search=a.substr(L),this.query=a.substr(L+1),e&&(this.query=Ne.parse(this.query)),a=a.slice(0,L)):e&&(this.search="",this.query={}),a&&(this.pathname=a),Je[u]&&this.hostname&&!this.pathname&&(this.pathname="/"),this.pathname||this.search){C=this.pathname||"";var A=this.search||"";this.path=C+A}return this.href=this.format(),this},Ge.prototype.format=function(){var t=this.auth||"";t&&(t=(t=encodeURIComponent(t)).replace(/%3A/i,":"),t+="@");var e=this.protocol||"",r=this.pathname||"",i=this.hash||"",n=!1,o="";this.host?n=t+this.host:this.hostname&&(n=t+(-1===this.hostname.indexOf(":")?this.hostname:"["+this.hostname+"]"),this.port&&(n+=":"+this.port)),this.query&&Me(this.query)&&Object.keys(this.query).length&&(o=Ne.stringify(this.query));var a=this.search||o&&"?"+o||"";return e&&":"!==e.substr(-1)&&(e+=":"),this.slashes||(!e||Je[e])&&!1!==n?(n="//"+(n||""),r&&"/"!==r.charAt(0)&&(r="/"+r)):n||(n=""),i&&"#"!==i.charAt(0)&&(i="#"+i),a&&"?"!==a.charAt(0)&&(a="?"+a),e+n+(r=r.replace(/[?#]/g,(function(t){return encodeURIComponent(t)})))+(a=a.replace("#","%23"))+i},Ge.prototype.resolve=function(t){return this.resolveObject(function(t,e,r){if(t&&Me(t)&&t instanceof Ge)return t;var i=new Ge;return i.parse(t,e,r),i}(t,!1,!0)).format()},Ge.prototype.resolveObject=function(t){if(Ae(t)){var e=new Ge;e.parse(t,!1,!0),t=e}for(var r=new Ge,i=Object.keys(this),n=0;n<i.length;n++){var o=i[n];r[o]=this[o]}if(r.hash=t.hash,""===t.href)return r.href=r.format(),r;if(t.slashes&&!t.protocol){for(var a=Object.keys(t),s=0;s<a.length;s++){var l=a[s];"protocol"!==l&&(r[l]=t[l])}return Je[r.protocol]&&r.hostname&&!r.pathname&&(r.path=r.pathname="/"),r.href=r.format(),r}if(t.protocol&&t.protocol!==r.protocol){if(!Je[t.protocol]){for(var u=Object.keys(t),c=0;c<u.length;c++){var h=u[c];r[h]=t[h]}return r.href=r.format(),r}if(r.protocol=t.protocol,t.host||$e[t.protocol])r.pathname=t.pathname;else{for(var p=(t.pathname||"").split("/");p.length&&!(t.host=p.shift()););t.host||(t.host=""),t.hostname||(t.hostname=""),""!==p[0]&&p.unshift(""),p.length<2&&p.unshift(""),r.pathname=p.join("/")}if(r.search=t.search,r.query=t.query,r.host=t.host||"",r.auth=t.auth,r.hostname=t.hostname||t.host,r.port=t.port,r.pathname||r.search){var d=r.pathname||"",f=r.search||"";r.path=d+f}return r.slashes=r.slashes||t.slashes,r.href=r.format(),r}var g=r.pathname&&"/"===r.pathname.charAt(0),y=t.host||t.pathname&&"/"===t.pathname.charAt(0),m=y||g||r.host&&t.pathname,v=m,_=r.pathname&&r.pathname.split("/")||[],x=(p=t.pathname&&t.pathname.split("/")||[],r.protocol&&!Je[r.protocol]);if(x&&(r.hostname="",r.port=null,r.host&&(""===_[0]?_[0]=r.host:_.unshift(r.host)),r.host="",t.protocol&&(t.hostname=null,t.port=null,t.host&&(""===p[0]?p[0]=t.host:p.unshift(t.host)),t.host=null),m=m&&(""===p[0]||""===_[0])),y)r.host=t.host||""===t.host?t.host:r.host,r.hostname=t.hostname||""===t.hostname?t.hostname:r.hostname,r.search=t.search,r.query=t.query,_=p;else if(p.length)_||(_=[]),_.pop(),_=_.concat(p),r.search=t.search,r.query=t.query;else if(null!=t.search)return x&&(r.hostname=r.host=_.shift(),(S=!!(r.host&&r.host.indexOf("@")>0)&&r.host.split("@"))&&(r.auth=S.shift(),r.host=r.hostname=S.shift())),r.search=t.search,r.query=t.query,Fe(r.pathname)&&Fe(r.search)||(r.path=(r.pathname?r.pathname:"")+(r.search?r.search:"")),r.href=r.format(),r;if(!_.length)return r.pathname=null,r.search?r.path="/"+r.search:r.path=null,r.href=r.format(),r;for(var b=_.slice(-1)[0],w=(r.host||t.host||_.length>1)&&("."===b||".."===b)||""===b,E=0,T=_.length;T>=0;T--)"."===(b=_[T])?_.splice(T,1):".."===b?(_.splice(T,1),E++):E&&(_.splice(T,1),E--);if(!m&&!v)for(;E--;E)_.unshift("..");!m||""===_[0]||_[0]&&"/"===_[0].charAt(0)||_.unshift(""),w&&"/"!==_.join("/").substr(-1)&&_.push("");var S,C=""===_[0]||_[0]&&"/"===_[0].charAt(0);return x&&(r.hostname=r.host=C?"":_.length?_.shift():"",(S=!!(r.host&&r.host.indexOf("@")>0)&&r.host.split("@"))&&(r.auth=S.shift(),r.host=r.hostname=S.shift())),(m=m||r.host&&_.length)&&!C&&_.unshift(""),_.length?r.pathname=_.join("/"):(r.pathname=null,r.path=null),Fe(r.pathname)&&Fe(r.search)||(r.path=(r.pathname?r.pathname:"")+(r.search?r.search:"")),r.auth=t.auth||r.auth,r.slashes=r.slashes||t.slashes,r.href=r.format(),r},Ge.prototype.parseHost=function(){var t=this.host,e=Ue.exec(t);e&&(":"!==(e=e[0])&&(this.port=e.substr(1)),t=t.substr(0,t.length-e.length)),t&&(this.hostname=t)};class Qe extends Error{constructor(t,e){super(e),this.message=e,this.key=t}}class tr{constructor(t,e=[]){this.parent=t,this.bindings={};for(const[t,r]of e)this.bindings[t]=r}concat(t){return new tr(this,t)}get(t){if(this.bindings[t])return this.bindings[t];if(this.parent)return this.parent.get(t);throw new Error(`${t} not found in scope.`)}has(t){return!!this.bindings[t]||!!this.parent&&this.parent.has(t)}}const er={kind:"null"},rr={kind:"number"},ir={kind:"string"},nr={kind:"boolean"},or={kind:"color"},ar={kind:"object"},sr={kind:"value"},lr={kind:"collator"},ur={kind:"formatted"},cr={kind:"resolvedImage"};function hr(t,e){return{kind:"array",itemType:t,N:e}}function pr(t){if("array"===t.kind){const e=pr(t.itemType);return"number"==typeof t.N?`array<${e}, ${t.N}>`:"value"===t.itemType.kind?"array":`array<${e}>`}return t.kind}const dr=[er,rr,ir,nr,or,ur,ar,hr(sr),cr];function fr(t,e){if("error"===e.kind)return null;if("array"===t.kind){if("array"===e.kind&&(0===e.N&&"value"===e.itemType.kind||!fr(t.itemType,e.itemType))&&("number"!=typeof t.N||t.N===e.N))return null}else{if(t.kind===e.kind)return null;if("value"===t.kind)for(const t of dr)if(!fr(t,e))return null}return`Expected ${pr(t)} but found ${pr(e)} instead.`}function gr(t,e){return e.some((e=>e.kind===t.kind))}function yr(t,e){return e.some((e=>"null"===e?null===t:"array"===e?Array.isArray(t):"object"===e?t&&!Array.isArray(t)&&"object"==typeof t:e===typeof t))}var mr=Pe((function(t,e){var r={transparent:[0,0,0,0],aliceblue:[240,248,255,1],antiquewhite:[250,235,215,1],aqua:[0,255,255,1],aquamarine:[127,255,212,1],azure:[240,255,255,1],beige:[245,245,220,1],bisque:[255,228,196,1],black:[0,0,0,1],blanchedalmond:[255,235,205,1],blue:[0,0,255,1],blueviolet:[138,43,226,1],brown:[165,42,42,1],burlywood:[222,184,135,1],cadetblue:[95,158,160,1],chartreuse:[127,255,0,1],chocolate:[210,105,30,1],coral:[255,127,80,1],cornflowerblue:[100,149,237,1],cornsilk:[255,248,220,1],crimson:[220,20,60,1],cyan:[0,255,255,1],darkblue:[0,0,139,1],darkcyan:[0,139,139,1],darkgoldenrod:[184,134,11,1],darkgray:[169,169,169,1],darkgreen:[0,100,0,1],darkgrey:[169,169,169,1],darkkhaki:[189,183,107,1],darkmagenta:[139,0,139,1],darkolivegreen:[85,107,47,1],darkorange:[255,140,0,1],darkorchid:[153,50,204,1],darkred:[139,0,0,1],darksalmon:[233,150,122,1],darkseagreen:[143,188,143,1],darkslateblue:[72,61,139,1],darkslategray:[47,79,79,1],darkslategrey:[47,79,79,1],darkturquoise:[0,206,209,1],darkviolet:[148,0,211,1],deeppink:[255,20,147,1],deepskyblue:[0,191,255,1],dimgray:[105,105,105,1],dimgrey:[105,105,105,1],dodgerblue:[30,144,255,1],firebrick:[178,34,34,1],floralwhite:[255,250,240,1],forestgreen:[34,139,34,1],fuchsia:[255,0,255,1],gainsboro:[220,220,220,1],ghostwhite:[248,248,255,1],gold:[255,215,0,1],goldenrod:[218,165,32,1],gray:[128,128,128,1],green:[0,128,0,1],greenyellow:[173,255,47,1],grey:[128,128,128,1],honeydew:[240,255,240,1],hotpink:[255,105,180,1],indianred:[205,92,92,1],indigo:[75,0,130,1],ivory:[255,255,240,1],khaki:[240,230,140,1],lavender:[230,230,250,1],lavenderblush:[255,240,245,1],lawngreen:[124,252,0,1],lemonchiffon:[255,250,205,1],lightblue:[173,216,230,1],lightcoral:[240,128,128,1],lightcyan:[224,255,255,1],lightgoldenrodyellow:[250,250,210,1],lightgray:[211,211,211,1],lightgreen:[144,238,144,1],lightgrey:[211,211,211,1],lightpink:[255,182,193,1],lightsalmon:[255,160,122,1],lightseagreen:[32,178,170,1],lightskyblue:[135,206,250,1],lightslategray:[119,136,153,1],lightslategrey:[119,136,153,1],lightsteelblue:[176,196,222,1],lightyellow:[255,255,224,1],lime:[0,255,0,1],limegreen:[50,205,50,1],linen:[250,240,230,1],magenta:[255,0,255,1],maroon:[128,0,0,1],mediumaquamarine:[102,205,170,1],mediumblue:[0,0,205,1],mediumorchid:[186,85,211,1],mediumpurple:[147,112,219,1],mediumseagreen:[60,179,113,1],mediumslateblue:[123,104,238,1],mediumspringgreen:[0,250,154,1],mediumturquoise:[72,209,204,1],mediumvioletred:[199,21,133,1],midnightblue:[25,25,112,1],mintcream:[245,255,250,1],mistyrose:[255,228,225,1],moccasin:[255,228,181,1],navajowhite:[255,222,173,1],navy:[0,0,128,1],oldlace:[253,245,230,1],olive:[128,128,0,1],olivedrab:[107,142,35,1],orange:[255,165,0,1],orangered:[255,69,0,1],orchid:[218,112,214,1],palegoldenrod:[238,232,170,1],palegreen:[152,251,152,1],paleturquoise:[175,238,238,1],palevioletred:[219,112,147,1],papayawhip:[255,239,213,1],peachpuff:[255,218,185,1],peru:[205,133,63,1],pink:[255,192,203,1],plum:[221,160,221,1],powderblue:[176,224,230,1],purple:[128,0,128,1],rebeccapurple:[102,51,153,1],red:[255,0,0,1],rosybrown:[188,143,143,1],royalblue:[65,105,225,1],saddlebrown:[139,69,19,1],salmon:[250,128,114,1],sandybrown:[244,164,96,1],seagreen:[46,139,87,1],seashell:[255,245,238,1],sienna:[160,82,45,1],silver:[192,192,192,1],skyblue:[135,206,235,1],slateblue:[106,90,205,1],slategray:[112,128,144,1],slategrey:[112,128,144,1],snow:[255,250,250,1],springgreen:[0,255,127,1],steelblue:[70,130,180,1],tan:[210,180,140,1],teal:[0,128,128,1],thistle:[216,191,216,1],tomato:[255,99,71,1],turquoise:[64,224,208,1],violet:[238,130,238,1],wheat:[245,222,179,1],white:[255,255,255,1],whitesmoke:[245,245,245,1],yellow:[255,255,0,1],yellowgreen:[154,205,50,1]};function i(t){return(t=Math.round(t))<0?0:t>255?255:t}function n(t){return t<0?0:t>1?1:t}function o(t){return"%"===t[t.length-1]?i(parseFloat(t)/100*255):i(parseInt(t))}function a(t){return"%"===t[t.length-1]?n(parseFloat(t)/100):n(parseFloat(t))}function s(t,e,r){return r<0?r+=1:r>1&&(r-=1),6*r<1?t+(e-t)*r*6:2*r<1?e:3*r<2?t+(e-t)*(2/3-r)*6:t}try{e.parseCSSColor=function(t){var e,n=t.replace(/ /g,"").toLowerCase();if(n in r)return r[n].slice();if("#"===n[0])return 4===n.length?(e=parseInt(n.substr(1),16))>=0&&e<=4095?[(3840&e)>>4|(3840&e)>>8,240&e|(240&e)>>4,15&e|(15&e)<<4,1]:null:7===n.length&&(e=parseInt(n.substr(1),16))>=0&&e<=16777215?[(16711680&e)>>16,(65280&e)>>8,255&e,1]:null;var l=n.indexOf("("),u=n.indexOf(")");if(-1!==l&&u+1===n.length){var c=n.substr(0,l),h=n.substr(l+1,u-(l+1)).split(","),p=1;switch(c){case"rgba":if(4!==h.length)return null;p=a(h.pop());case"rgb":return 3!==h.length?null:[o(h[0]),o(h[1]),o(h[2]),p];case"hsla":if(4!==h.length)return null;p=a(h.pop());case"hsl":if(3!==h.length)return null;var d=(parseFloat(h[0])%360+360)%360/360,f=a(h[1]),g=a(h[2]),y=g<=.5?g*(f+1):g+f-g*f,m=2*g-y;return[i(255*s(m,y,d+1/3)),i(255*s(m,y,d)),i(255*s(m,y,d-1/3)),p];default:return null}}return null}}catch(t){}}));class vr{constructor(t,e,r,i=1){this.r=t,this.g=e,this.b=r,this.a=i}static parse(t){if(!t)return;if(t instanceof vr)return t;if("string"!=typeof t)return;const e=mr.parseCSSColor(t);return e?new vr(e[0]/255*e[3],e[1]/255*e[3],e[2]/255*e[3],e[3]):void 0}toString(){const[t,e,r,i]=this.toArray();return`rgba(${Math.round(t)},${Math.round(e)},${Math.round(r)},${i})`}toArray(){const{r:t,g:e,b:r,a:i}=this;return 0===i?[0,0,0,0]:[255*t/i,255*e/i,255*r/i,i]}}vr.black=new vr(0,0,0,1),vr.white=new vr(1,1,1,1),vr.transparent=new vr(0,0,0,0),vr.red=new vr(1,0,0,1),vr.blue=new vr(0,0,1,1);class _r{constructor(t,e,r){this.sensitivity=t?e?"variant":"case":e?"accent":"base",this.locale=r,this.collator=new Intl.Collator(this.locale?this.locale:[],{sensitivity:this.sensitivity,usage:"search"})}compare(t,e){return this.collator.compare(t,e)}resolvedLocale(){return new Intl.Collator(this.locale?this.locale:[]).resolvedOptions().locale}}class xr{constructor(t,e,r,i,n){this.text=t.normalize?t.normalize():t,this.image=e,this.scale=r,this.fontStack=i,this.textColor=n}}class br{constructor(t){this.sections=t}static fromString(t){return new br([new xr(t,null,null,null,null)])}isEmpty(){return 0===this.sections.length||!this.sections.some((t=>0!==t.text.length||t.image&&0!==t.image.name.length))}static factory(t){return t instanceof br?t:br.fromString(t)}toString(){return 0===this.sections.length?"":this.sections.map((t=>t.text)).join("")}serialize(){const t=["format"];for(const e of this.sections){if(e.image){t.push(["image",e.image.name]);continue}t.push(e.text);const r={};e.fontStack&&(r["text-font"]=["literal",e.fontStack.split(",")]),e.scale&&(r["font-scale"]=e.scale),e.textColor&&(r["text-color"]=["rgba"].concat(e.textColor.toArray())),t.push(r)}return t}}class wr{constructor(t){this.name=t.name,this.available=t.available}toString(){return this.name}static fromString(t){return t?new wr({name:t,available:!1}):null}serialize(){return["image",this.name]}}function Er(t,e,r,i){return"number"==typeof t&&t>=0&&t<=255&&"number"==typeof e&&e>=0&&e<=255&&"number"==typeof r&&r>=0&&r<=255?void 0===i||"number"==typeof i&&i>=0&&i<=1?null:`Invalid rgba value [${[t,e,r,i].join(", ")}]: 'a' must be between 0 and 1.`:`Invalid rgba value [${("number"==typeof i?[t,e,r,i]:[t,e,r]).join(", ")}]: 'r', 'g', and 'b' must be between 0 and 255.`}function Tr(t){if(null===t)return!0;if("string"==typeof t)return!0;if("boolean"==typeof t)return!0;if("number"==typeof t)return!0;if(t instanceof vr)return!0;if(t instanceof _r)return!0;if(t instanceof br)return!0;if(t instanceof wr)return!0;if(Array.isArray(t)){for(const e of t)if(!Tr(e))return!1;return!0}if("object"==typeof t){for(const e in t)if(!Tr(t[e]))return!1;return!0}return!1}function Sr(t){if(null===t)return er;if("string"==typeof t)return ir;if("boolean"==typeof t)return nr;if("number"==typeof t)return rr;if(t instanceof vr)return or;if(t instanceof _r)return lr;if(t instanceof br)return ur;if(t instanceof wr)return cr;if(Array.isArray(t)){const e=t.length;let r;for(const e of t){const t=Sr(e);if(r){if(r===t)continue;r=sr;break}r=t}return hr(r||sr,e)}return ar}function Cr(t){const e=typeof t;return null===t?"":"string"===e||"number"===e||"boolean"===e?String(t):t instanceof vr||t instanceof br||t instanceof wr?t.toString():JSON.stringify(t)}class Or{constructor(t,e){this.type=t,this.value=e}static parse(t,e){if(2!==t.length)return e.error(`'literal' expression requires exactly one argument, but found ${t.length-1} instead.`);if(!Tr(t[1]))return e.error("invalid value");const r=t[1];let i=Sr(r);const n=e.expectedType;return"array"!==i.kind||0!==i.N||!n||"array"!==n.kind||"number"==typeof n.N&&0!==n.N||(i=n),new Or(i,r)}evaluate(){return this.value}eachChild(){}outputDefined(){return!0}serialize(){return"array"===this.type.kind||"object"===this.type.kind?["literal",this.value]:this.value instanceof vr?["rgba"].concat(this.value.toArray()):this.value instanceof br?this.value.serialize():this.value}}class Rr{constructor(t){this.name="ExpressionEvaluationError",this.message=t}toJSON(){return this.message}}const Ir={string:ir,number:rr,boolean:nr,object:ar};class Pr{constructor(t,e){this.type=t,this.args=e}static parse(t,e){if(t.length<2)return e.error("Expected at least one argument.");let r,i=1;const n=t[0];if("array"===n){let n,o;if(t.length>2){const r=t[1];if("string"!=typeof r||!(r in Ir)||"object"===r)return e.error('The item type argument of "array" must be one of string, number, boolean',1);n=Ir[r],i++}else n=sr;if(t.length>3){if(null!==t[2]&&("number"!=typeof t[2]||t[2]<0||t[2]!==Math.floor(t[2])))return e.error('The length argument to "array" must be a positive integer literal',2);o=t[2],i++}r=hr(n,o)}else r=Ir[n];const o=[];for(;i<t.length;i++){const r=e.parse(t[i],i,sr);if(!r)return null;o.push(r)}return new Pr(r,o)}evaluate(t){for(let e=0;e<this.args.length;e++){const r=this.args[e].evaluate(t);if(!fr(this.type,Sr(r)))return r;if(e===this.args.length-1)throw new Rr(`Expected value to be of type ${pr(this.type)}, but found ${pr(Sr(r))} instead.`)}return null}eachChild(t){this.args.forEach(t)}outputDefined(){return this.args.every((t=>t.outputDefined()))}serialize(){const t=this.type,e=[t.kind];if("array"===t.kind){const r=t.itemType;if("string"===r.kind||"number"===r.kind||"boolean"===r.kind){e.push(r.kind);const i=t.N;("number"==typeof i||this.args.length>1)&&e.push(i)}}return e.concat(this.args.map((t=>t.serialize())))}}class Lr{constructor(t){this.type=ur,this.sections=t}static parse(t,e){if(t.length<2)return e.error("Expected at least one argument.");const r=t[1];if(!Array.isArray(r)&&"object"==typeof r)return e.error("First argument must be an image or text section.");const i=[];let n=!1;for(let r=1;r<=t.length-1;++r){const o=t[r];if(n&&"object"==typeof o&&!Array.isArray(o)){n=!1;let t=null;if(o["font-scale"]&&(t=e.parse(o["font-scale"],1,rr),!t))return null;let r=null;if(o["text-font"]&&(r=e.parse(o["text-font"],1,hr(ir)),!r))return null;let a=null;if(o["text-color"]&&(a=e.parse(o["text-color"],1,or),!a))return null;const s=i[i.length-1];s.scale=t,s.font=r,s.textColor=a}else{const o=e.parse(t[r],1,sr);if(!o)return null;const a=o.type.kind;if("string"!==a&&"value"!==a&&"null"!==a&&"resolvedImage"!==a)return e.error("Formatted text type must be 'string', 'value', 'image' or 'null'.");n=!0,i.push({content:o,scale:null,font:null,textColor:null})}}return new Lr(i)}evaluate(t){return new br(this.sections.map((e=>{const r=e.content.evaluate(t);return Sr(r)===cr?new xr("",r,null,null,null):new xr(Cr(r),null,e.scale?e.scale.evaluate(t):null,e.font?e.font.evaluate(t).join(","):null,e.textColor?e.textColor.evaluate(t):null)})))}eachChild(t){for(const e of this.sections)t(e.content),e.scale&&t(e.scale),e.font&&t(e.font),e.textColor&&t(e.textColor)}outputDefined(){return!1}serialize(){const t=["format"];for(const e of this.sections){t.push(e.content.serialize());const r={};e.scale&&(r["font-scale"]=e.scale.serialize()),e.font&&(r["text-font"]=e.font.serialize()),e.textColor&&(r["text-color"]=e.textColor.serialize()),t.push(r)}return t}}class Ar{constructor(t){this.type=cr,this.input=t}static parse(t,e){if(2!==t.length)return e.error("Expected two arguments.");const r=e.parse(t[1],1,ir);return r?new Ar(r):e.error("No image name provided.")}evaluate(t){const e=this.input.evaluate(t),r=wr.fromString(e);return r&&t.availableImages&&(r.available=t.availableImages.indexOf(e)>-1),r}eachChild(t){t(this.input)}outputDefined(){return!1}serialize(){return["image",this.input.serialize()]}}const Mr={"to-boolean":nr,"to-color":or,"to-number":rr,"to-string":ir};class Fr{constructor(t,e){this.type=t,this.args=e}static parse(t,e){if(t.length<2)return e.error("Expected at least one argument.");const r=t[0];if(("to-boolean"===r||"to-string"===r)&&2!==t.length)return e.error("Expected one argument.");const i=Mr[r],n=[];for(let r=1;r<t.length;r++){const i=e.parse(t[r],r,sr);if(!i)return null;n.push(i)}return new Fr(i,n)}evaluate(t){if("boolean"===this.type.kind)return Boolean(this.args[0].evaluate(t));if("color"===this.type.kind){let e,r;for(const i of this.args){if(e=i.evaluate(t),r=null,e instanceof vr)return e;if("string"==typeof e){const r=t.parseColor(e);if(r)return r}else if(Array.isArray(e)&&(r=e.length<3||e.length>4?`Invalid rbga value ${JSON.stringify(e)}: expected an array containing either three or four numeric values.`:Er(e[0],e[1],e[2],e[3]),!r))return new vr(e[0]/255,e[1]/255,e[2]/255,e[3])}throw new Rr(r||`Could not parse color from value '${"string"==typeof e?e:String(JSON.stringify(e))}'`)}if("number"===this.type.kind){let e=null;for(const r of this.args){if(e=r.evaluate(t),null===e)return 0;const i=Number(e);if(!isNaN(i))return i}throw new Rr(`Could not convert ${JSON.stringify(e)} to number.`)}return"formatted"===this.type.kind?br.fromString(Cr(this.args[0].evaluate(t))):"resolvedImage"===this.type.kind?wr.fromString(Cr(this.args[0].evaluate(t))):Cr(this.args[0].evaluate(t))}eachChild(t){this.args.forEach(t)}outputDefined(){return this.args.every((t=>t.outputDefined()))}serialize(){if("formatted"===this.type.kind)return new Lr([{content:this.args[0],scale:null,font:null,textColor:null}]).serialize();if("resolvedImage"===this.type.kind)return new Ar(this.args[0]).serialize();const t=[`to-${this.type.kind}`];return this.eachChild((e=>{t.push(e.serialize())})),t}}const Zr=["Unknown","Point","LineString","Polygon"];class kr{constructor(){this.globals=null,this.feature=null,this.featureState=null,this.formattedSection=null,this._parseColorCache={},this.availableImages=null,this.canonical=null,this.featureTileCoord=null,this.featureDistanceData=null}id(){return this.feature&&"id"in this.feature&&this.feature.id?this.feature.id:null}geometryType(){return this.feature?"number"==typeof this.feature.type?Zr[this.feature.type]:this.feature.type:null}geometry(){return this.feature&&"geometry"in this.feature?this.feature.geometry:null}canonicalID(){return this.canonical}properties(){return this.feature&&this.feature.properties||{}}distanceFromCenter(){if(this.featureTileCoord&&this.featureDistanceData){const t=this.featureDistanceData.center,e=this.featureDistanceData.scale,{x:r,y:i}=this.featureTileCoord,n=r*e-t[0],o=i*e-t[1];return this.featureDistanceData.bearing[0]*n+this.featureDistanceData.bearing[1]*o}return 0}parseColor(t){let e=this._parseColorCache[t];return e||(e=this._parseColorCache[t]=vr.parse(t)),e}}class jr{constructor(t,e,r,i){this.name=t,this.type=e,this._evaluate=r,this.args=i}evaluate(t){return this._evaluate(t,this.args)}eachChild(t){this.args.forEach(t)}outputDefined(){return!1}serialize(){return[this.name].concat(this.args.map((t=>t.serialize())))}static parse(t,e){const r=t[0],i=jr.definitions[r];if(!i)return e.error(`Unknown expression "${r}". If you wanted a literal array, use ["literal", [...]].`,0);const n=Array.isArray(i)?i[0]:i.type,o=Array.isArray(i)?[[i[1],i[2]]]:i.overloads,a=o.filter((([e])=>!Array.isArray(e)||e.length===t.length-1));let s=null;for(const[i,o]of a){s=new si(e.registry,e.path,null,e.scope);const a=[];let l=!1;for(let e=1;e<t.length;e++){const r=t[e],n=Array.isArray(i)?i[e-1]:i.type,o=s.parse(r,1+a.length,n);if(!o){l=!0;break}a.push(o)}if(!l)if(Array.isArray(i)&&i.length!==a.length)s.error(`Expected ${i.length} arguments, but found ${a.length} instead.`);else{for(let t=0;t<a.length;t++){const e=Array.isArray(i)?i[t]:i.type,r=a[t];s.concat(t+1).checkSubtype(e,r.type)}if(0===s.errors.length)return new jr(r,n,o,a)}}if(1===a.length)e.errors.push(...s.errors);else{const r=(a.length?a:o).map((([t])=>{return e=t,Array.isArray(e)?`(${e.map(pr).join(", ")})`:`(${pr(e.type)}...)`;var e})).join(" | "),i=[];for(let r=1;r<t.length;r++){const n=e.parse(t[r],1+i.length);if(!n)return null;i.push(pr(n.type))}e.error(`Expected arguments of type ${r}, but found (${i.join(", ")}) instead.`)}return null}static register(t,e){jr.definitions=e;for(const r in e)t[r]=jr}}class Dr{constructor(t,e,r){this.type=lr,this.locale=r,this.caseSensitive=t,this.diacriticSensitive=e}static parse(t,e){if(2!==t.length)return e.error("Expected one argument.");const r=t[1];if("object"!=typeof r||Array.isArray(r))return e.error("Collator options argument must be an object.");const i=e.parse(void 0!==r["case-sensitive"]&&r["case-sensitive"],1,nr);if(!i)return null;const n=e.parse(void 0!==r["diacritic-sensitive"]&&r["diacritic-sensitive"],1,nr);if(!n)return null;let o=null;return r.locale&&(o=e.parse(r.locale,1,ir),!o)?null:new Dr(i,n,o)}evaluate(t){return new _r(this.caseSensitive.evaluate(t),this.diacriticSensitive.evaluate(t),this.locale?this.locale.evaluate(t):null)}eachChild(t){t(this.caseSensitive),t(this.diacriticSensitive),this.locale&&t(this.locale)}outputDefined(){return!1}serialize(){const t={};return t["case-sensitive"]=this.caseSensitive.serialize(),t["diacritic-sensitive"]=this.diacriticSensitive.serialize(),this.locale&&(t.locale=this.locale.serialize()),["collator",t]}}const Nr=8192;function Gr(t,e){t[0]=Math.min(t[0],e[0]),t[1]=Math.min(t[1],e[1]),t[2]=Math.max(t[2],e[0]),t[3]=Math.max(t[3],e[1])}function zr(t,e){return!(t[0]<=e[0]||t[2]>=e[2]||t[1]<=e[1]||t[3]>=e[3])}function Ur(t,e){const r=(180+t[0])/360,i=(n=t[1],(180-180/Math.PI*Math.log(Math.tan(Math.PI/4+n*Math.PI/360)))/360);var n;const o=Math.pow(2,e.z);return[Math.round(r*o*Nr),Math.round(i*o*Nr)]}function Br(t,e,r){const i=t[0]-e[0],n=t[1]-e[1],o=t[0]-r[0],a=t[1]-r[1];return i*a-o*n==0&&i*o<=0&&n*a<=0}function qr(t,e){let r=!1;for(let a=0,s=e.length;a<s;a++){const s=e[a];for(let e=0,a=s.length;e<a-1;e++){if(Br(t,s[e],s[e+1]))return!1;i=t,n=s[e],o=s[e+1],n[1]>i[1]!=o[1]>i[1]&&i[0]<(o[0]-n[0])*(i[1]-n[1])/(o[1]-n[1])+n[0]&&(r=!r)}}var i,n,o;return r}function Vr(t,e){for(let r=0;r<e.length;r++)if(qr(t,e[r]))return!0;return!1}function Wr(t,e,r,i){const n=t[0]-r[0],o=t[1]-r[1],a=e[0]-r[0],s=e[1]-r[1],l=i[0]-r[0],u=i[1]-r[1],c=n*u-l*o,h=a*u-l*s;return c>0&&h<0||c<0&&h>0}function Xr(t,e,r,i){const n=[e[0]-t[0],e[1]-t[1]];return 0!=(o=[i[0]-r[0],i[1]-r[1]])[0]*(a=n)[1]-o[1]*a[0]&&!(!Wr(t,e,r,i)||!Wr(r,i,t,e));var o,a}function Yr(t,e,r){for(const i of r)for(let r=0;r<i.length-1;++r)if(Xr(t,e,i[r],i[r+1]))return!0;return!1}function Hr(t,e){for(let r=0;r<t.length;++r)if(!qr(t[r],e))return!1;for(let r=0;r<t.length-1;++r)if(Yr(t[r],t[r+1],e))return!1;return!0}function Kr(t,e){for(let r=0;r<e.length;r++)if(Hr(t,e[r]))return!0;return!1}function $r(t,e,r){const i=[];for(let n=0;n<t.length;n++){const o=[];for(let i=0;i<t[n].length;i++){const a=Ur(t[n][i],r);Gr(e,a),o.push(a)}i.push(o)}return i}function Jr(t,e,r){const i=[];for(let n=0;n<t.length;n++){const o=$r(t[n],e,r);i.push(o)}return i}function Qr(t,e,r,i){if(t[0]<r[0]||t[0]>r[2]){const e=.5*i;let n=t[0]-r[0]>e?-i:r[0]-t[0]>e?i:0;0===n&&(n=t[0]-r[2]>e?-i:r[2]-t[0]>e?i:0),t[0]+=n}Gr(e,t)}function ti(t,e,r,i){const n=Math.pow(2,i.z)*Nr,o=[i.x*Nr,i.y*Nr],a=[];if(!t)return a;for(const i of t)for(const t of i){const i=[t.x+o[0],t.y+o[1]];Qr(i,e,r,n),a.push(i)}return a}function ei(t,e,r,i){const n=Math.pow(2,i.z)*Nr,o=[i.x*Nr,i.y*Nr],a=[];if(!t)return a;for(const r of t){const t=[];for(const i of r){const r=[i.x+o[0],i.y+o[1]];Gr(e,r),t.push(r)}a.push(t)}if(e[2]-e[0]<=n/2){(s=e)[0]=s[1]=1/0,s[2]=s[3]=-1/0;for(const t of a)for(const i of t)Qr(i,e,r,n)}var s;return a}class ri{constructor(t,e){this.type=nr,this.geojson=t,this.geometries=e}static parse(t,e){if(2!==t.length)return e.error(`'within' expression requires exactly one argument, but found ${t.length-1} instead.`);if(Tr(t[1])){const e=t[1];if("FeatureCollection"===e.type)for(let t=0;t<e.features.length;++t){const r=e.features[t].geometry.type;if("Polygon"===r||"MultiPolygon"===r)return new ri(e,e.features[t].geometry)}else if("Feature"===e.type){const t=e.geometry.type;if("Polygon"===t||"MultiPolygon"===t)return new ri(e,e.geometry)}else if("Polygon"===e.type||"MultiPolygon"===e.type)return new ri(e,e)}return e.error("'within' expression requires valid geojson object that contains polygon geometry type.")}evaluate(t){if(null!=t.geometry()&&null!=t.canonicalID()){if("Point"===t.geometryType())return function(t,e){const r=[1/0,1/0,-1/0,-1/0],i=[1/0,1/0,-1/0,-1/0],n=t.canonicalID();if(!n)return!1;if("Polygon"===e.type){const o=$r(e.coordinates,i,n),a=ti(t.geometry(),r,i,n);if(!zr(r,i))return!1;for(const t of a)if(!qr(t,o))return!1}if("MultiPolygon"===e.type){const o=Jr(e.coordinates,i,n),a=ti(t.geometry(),r,i,n);if(!zr(r,i))return!1;for(const t of a)if(!Vr(t,o))return!1}return!0}(t,this.geometries);if("LineString"===t.geometryType())return function(t,e){const r=[1/0,1/0,-1/0,-1/0],i=[1/0,1/0,-1/0,-1/0],n=t.canonicalID();if(!n)return!1;if("Polygon"===e.type){const o=$r(e.coordinates,i,n),a=ei(t.geometry(),r,i,n);if(!zr(r,i))return!1;for(const t of a)if(!Hr(t,o))return!1}if("MultiPolygon"===e.type){const o=Jr(e.coordinates,i,n),a=ei(t.geometry(),r,i,n);if(!zr(r,i))return!1;for(const t of a)if(!Kr(t,o))return!1}return!0}(t,this.geometries)}return!1}eachChild(){}outputDefined(){return!0}serialize(){return["within",this.geojson]}}function ii(t){if(t instanceof jr){if("get"===t.name&&1===t.args.length)return!1;if("feature-state"===t.name)return!1;if("has"===t.name&&1===t.args.length)return!1;if("properties"===t.name||"geometry-type"===t.name||"id"===t.name)return!1;if(/^filter-/.test(t.name))return!1}if(t instanceof ri)return!1;let e=!0;return t.eachChild((t=>{e&&!ii(t)&&(e=!1)})),e}function ni(t){if(t instanceof jr&&"feature-state"===t.name)return!1;let e=!0;return t.eachChild((t=>{e&&!ni(t)&&(e=!1)})),e}function oi(t,e){if(t instanceof jr&&e.indexOf(t.name)>=0)return!1;let r=!0;return t.eachChild((t=>{r&&!oi(t,e)&&(r=!1)})),r}class ai{constructor(t,e){this.type=e.type,this.name=t,this.boundExpression=e}static parse(t,e){if(2!==t.length||"string"!=typeof t[1])return e.error("'var' expression requires exactly one string literal argument.");const r=t[1];return e.scope.has(r)?new ai(r,e.scope.get(r)):e.error(`Unknown variable "${r}". Make sure "${r}" has been bound in an enclosing "let" expression before using it.`,1)}evaluate(t){return this.boundExpression.evaluate(t)}eachChild(){}outputDefined(){return!1}serialize(){return["var",this.name]}}class si{constructor(t,e=[],r,i=new tr,n=[]){this.registry=t,this.path=e,this.key=e.map((t=>`[${t}]`)).join(""),this.scope=i,this.errors=n,this.expectedType=r}parse(t,e,r,i,n={}){return e?this.concat(e,r,i)._parse(t,n):this._parse(t,n)}_parse(t,e){function r(t,e,r){return"assert"===r?new Pr(e,[t]):"coerce"===r?new Fr(e,[t]):t}if(null!==t&&"string"!=typeof t&&"boolean"!=typeof t&&"number"!=typeof t||(t=["literal",t]),Array.isArray(t)){if(0===t.length)return this.error('Expected an array with at least one element. If you wanted a literal array, use ["literal", []].');const i=t[0];if("string"!=typeof i)return this.error(`Expression name must be a string, but found ${typeof i} instead. If you wanted a literal array, use ["literal", [...]].`,0),null;const n=this.registry[i];if(n){let i=n.parse(t,this);if(!i)return null;if(this.expectedType){const t=this.expectedType,n=i.type;if("string"!==t.kind&&"number"!==t.kind&&"boolean"!==t.kind&&"object"!==t.kind&&"array"!==t.kind||"value"!==n.kind)if("color"!==t.kind&&"formatted"!==t.kind&&"resolvedImage"!==t.kind||"value"!==n.kind&&"string"!==n.kind){if(this.checkSubtype(t,n))return null}else i=r(i,t,e.typeAnnotation||"coerce");else i=r(i,t,e.typeAnnotation||"assert")}if(!(i instanceof Or)&&"resolvedImage"!==i.type.kind&&li(i)){const t=new kr;try{i=new Or(i.type,i.evaluate(t))}catch(t){return this.error(t.message),null}}return i}return this.error(`Unknown expression "${i}". If you wanted a literal array, use ["literal", [...]].`,0)}return void 0===t?this.error("'undefined' value invalid. Use null instead."):"object"==typeof t?this.error('Bare objects invalid. Use ["literal", {...}] instead.'):this.error(`Expected an array, but found ${typeof t} instead.`)}concat(t,e,r){const i="number"==typeof t?this.path.concat(t):this.path,n=r?this.scope.concat(r):this.scope;return new si(this.registry,i,e||null,n,this.errors)}error(t,...e){const r=`${this.key}${e.map((t=>`[${t}]`)).join("")}`;this.errors.push(new Qe(r,t))}checkSubtype(t,e){const r=fr(t,e);return r&&this.error(r),r}}function li(t){if(t instanceof ai)return li(t.boundExpression);if(t instanceof jr&&"error"===t.name)return!1;if(t instanceof Dr)return!1;if(t instanceof ri)return!1;const e=t instanceof Fr||t instanceof Pr;let r=!0;return t.eachChild((t=>{r=e?r&&li(t):r&&t instanceof Or})),!!r&&ii(t)&&oi(t,["zoom","heatmap-density","line-progress","sky-radial-progress","accumulated","is-supported-script","pitch","distance-from-center"])}function ui(t,e){const r=t.length-1;let i,n,o=0,a=r,s=0;for(;o<=a;)if(s=Math.floor((o+a)/2),i=t[s],n=t[s+1],i<=e){if(s===r||e<n)return s;o=s+1}else{if(!(i>e))throw new Rr("Input is not a number.");a=s-1}return 0}class ci{constructor(t,e,r){this.type=t,this.input=e,this.labels=[],this.outputs=[];for(const[t,e]of r)this.labels.push(t),this.outputs.push(e)}static parse(t,e){if(t.length-1<4)return e.error(`Expected at least 4 arguments, but found only ${t.length-1}.`);if((t.length-1)%2!=0)return e.error("Expected an even number of arguments.");const r=e.parse(t[1],1,rr);if(!r)return null;const i=[];let n=null;e.expectedType&&"value"!==e.expectedType.kind&&(n=e.expectedType);for(let r=1;r<t.length;r+=2){const o=1===r?-1/0:t[r],a=t[r+1],s=r,l=r+1;if("number"!=typeof o)return e.error('Input/output pairs for "step" expressions must be defined using literal numeric values (not computed expressions) for the input values.',s);if(i.length&&i[i.length-1][0]>=o)return e.error('Input/output pairs for "step" expressions must be arranged with input values in strictly ascending order.',s);const u=e.parse(a,l,n);if(!u)return null;n=n||u.type,i.push([o,u])}return new ci(n,r,i)}evaluate(t){const e=this.labels,r=this.outputs;if(1===e.length)return r[0].evaluate(t);const i=this.input.evaluate(t);if(i<=e[0])return r[0].evaluate(t);const n=e.length;return i>=e[n-1]?r[n-1].evaluate(t):r[ui(e,i)].evaluate(t)}eachChild(t){t(this.input);for(const e of this.outputs)t(e)}outputDefined(){return this.outputs.every((t=>t.outputDefined()))}serialize(){const t=["step",this.input.serialize()];for(let e=0;e<this.labels.length;e++)e>0&&t.push(this.labels[e]),t.push(this.outputs[e].serialize());return t}}var hi=pi;function pi(t,e,r,i){this.cx=3*t,this.bx=3*(r-t)-this.cx,this.ax=1-this.cx-this.bx,this.cy=3*e,this.by=3*(i-e)-this.cy,this.ay=1-this.cy-this.by,this.p1x=t,this.p1y=i,this.p2x=r,this.p2y=i}function di(t,e,r){return t*(1-r)+e*r}pi.prototype.sampleCurveX=function(t){return((this.ax*t+this.bx)*t+this.cx)*t},pi.prototype.sampleCurveY=function(t){return((this.ay*t+this.by)*t+this.cy)*t},pi.prototype.sampleCurveDerivativeX=function(t){return(3*this.ax*t+2*this.bx)*t+this.cx},pi.prototype.solveCurveX=function(t,e){var r,i,n,o,a;for(void 0===e&&(e=1e-6),n=t,a=0;a<8;a++){if(o=this.sampleCurveX(n)-t,Math.abs(o)<e)return n;var s=this.sampleCurveDerivativeX(n);if(Math.abs(s)<1e-6)break;n-=o/s}if((n=t)<(r=0))return r;if(n>(i=1))return i;for(;r<i;){if(o=this.sampleCurveX(n),Math.abs(o-t)<e)return n;t>o?r=n:i=n,n=.5*(i-r)+r}return n},pi.prototype.solve=function(t,e){return this.sampleCurveY(this.solveCurveX(t,e))};var fi=Object.freeze({__proto__:null,number:di,color:function(t,e,r){return new vr(di(t.r,e.r,r),di(t.g,e.g,r),di(t.b,e.b,r),di(t.a,e.a,r))},array:function(t,e,r){return t.map(((t,i)=>di(t,e[i],r)))}});const gi=.95047,yi=1.08883,mi=4/29,vi=6/29,_i=3*vi*vi,xi=Math.PI/180,bi=180/Math.PI;function wi(t){return t>.008856451679035631?Math.pow(t,1/3):t/_i+mi}function Ei(t){return t>vi?t*t*t:_i*(t-mi)}function Ti(t){return 255*(t<=.0031308?12.92*t:1.055*Math.pow(t,1/2.4)-.055)}function Si(t){return(t/=255)<=.04045?t/12.92:Math.pow((t+.055)/1.055,2.4)}function Ci(t){const e=Si(t.r),r=Si(t.g),i=Si(t.b),n=wi((.4124564*e+.3575761*r+.1804375*i)/gi),o=wi((.2126729*e+.7151522*r+.072175*i)/1);return{l:116*o-16,a:500*(n-o),b:200*(o-wi((.0193339*e+.119192*r+.9503041*i)/yi)),alpha:t.a}}function Oi(t){let e=(t.l+16)/116,r=isNaN(t.a)?e:e+t.a/500,i=isNaN(t.b)?e:e-t.b/200;return e=1*Ei(e),r=gi*Ei(r),i=yi*Ei(i),new vr(Ti(3.2404542*r-1.5371385*e-.4985314*i),Ti(-.969266*r+1.8760108*e+.041556*i),Ti(.0556434*r-.2040259*e+1.0572252*i),t.alpha)}function Ri(t,e,r){const i=e-t;return t+r*(i>180||i<-180?i-360*Math.round(i/360):i)}const Ii={forward:Ci,reverse:Oi,interpolate:function(t,e,r){return{l:di(t.l,e.l,r),a:di(t.a,e.a,r),b:di(t.b,e.b,r),alpha:di(t.alpha,e.alpha,r)}}},Pi=function(t){const{l:e,a:r,b:i}=Ci(t),n=Math.atan2(i,r)*bi;return{h:n<0?n+360:n,c:Math.sqrt(r*r+i*i),l:e,alpha:t.a}},Li=function(t){const e=t.h*xi,r=t.c;return Oi({l:t.l,a:Math.cos(e)*r,b:Math.sin(e)*r,alpha:t.alpha})},Ai=function(t,e,r){return{h:Ri(t.h,e.h,r),c:di(t.c,e.c,r),l:di(t.l,e.l,r),alpha:di(t.alpha,e.alpha,r)}};class Mi{constructor(t,e,r,i,n){this.type=t,this.operator=e,this.interpolation=r,this.input=i,this.labels=[],this.outputs=[];for(const[t,e]of n)this.labels.push(t),this.outputs.push(e)}static interpolationFactor(t,e,r,i){let n=0;if("exponential"===t.name)n=Fi(e,t.base,r,i);else if("linear"===t.name)n=Fi(e,1,r,i);else if("cubic-bezier"===t.name){const o=t.controlPoints;n=new hi(o[0],o[1],o[2],o[3]).solve(Fi(e,1,r,i))}return n}static parse(t,e){let[r,i,n,...o]=t;if(!Array.isArray(i)||0===i.length)return e.error("Expected an interpolation type expression.",1);if("linear"===i[0])i={name:"linear"};else if("exponential"===i[0]){const t=i[1];if("number"!=typeof t)return e.error("Exponential interpolation requires a numeric base.",1,1);i={name:"exponential",base:t}}else{if("cubic-bezier"!==i[0])return e.error(`Unknown interpolation type ${String(i[0])}`,1,0);{const t=i.slice(1);if(4!==t.length||t.some((t=>"number"!=typeof t||t<0||t>1)))return e.error("Cubic bezier interpolation requires four numeric arguments with values between 0 and 1.",1);i={name:"cubic-bezier",controlPoints:t}}}if(t.length-1<4)return e.error(`Expected at least 4 arguments, but found only ${t.length-1}.`);if((t.length-1)%2!=0)return e.error("Expected an even number of arguments.");if(n=e.parse(n,2,rr),!n)return null;const a=[];let s=null;"interpolate-hcl"===r||"interpolate-lab"===r?s=or:e.expectedType&&"value"!==e.expectedType.kind&&(s=e.expectedType);for(let t=0;t<o.length;t+=2){const r=o[t],i=o[t+1],n=t+3,l=t+4;if("number"!=typeof r)return e.error('Input/output pairs for "interpolate" expressions must be defined using literal numeric values (not computed expressions) for the input values.',n);if(a.length&&a[a.length-1][0]>=r)return e.error('Input/output pairs for "interpolate" expressions must be arranged with input values in strictly ascending order.',n);const u=e.parse(i,l,s);if(!u)return null;s=s||u.type,a.push([r,u])}return"number"===s.kind||"color"===s.kind||"array"===s.kind&&"number"===s.itemType.kind&&"number"==typeof s.N?new Mi(s,r,i,n,a):e.error(`Type ${pr(s)} is not interpolatable.`)}evaluate(t){const e=this.labels,r=this.outputs;if(1===e.length)return r[0].evaluate(t);const i=this.input.evaluate(t);if(i<=e[0])return r[0].evaluate(t);const n=e.length;if(i>=e[n-1])return r[n-1].evaluate(t);const o=ui(e,i),a=e[o],s=e[o+1],l=Mi.interpolationFactor(this.interpolation,i,a,s),u=r[o].evaluate(t),c=r[o+1].evaluate(t);return"interpolate"===this.operator?fi[this.type.kind.toLowerCase()](u,c,l):"interpolate-hcl"===this.operator?Li(Ai(Pi(u),Pi(c),l)):Ii.reverse(Ii.interpolate(Ii.forward(u),Ii.forward(c),l))}eachChild(t){t(this.input);for(const e of this.outputs)t(e)}outputDefined(){return this.outputs.every((t=>t.outputDefined()))}serialize(){let t;t="linear"===this.interpolation.name?["linear"]:"exponential"===this.interpolation.name?1===this.interpolation.base?["linear"]:["exponential",this.interpolation.base]:["cubic-bezier"].concat(this.interpolation.controlPoints);const e=[this.operator,t,this.input.serialize()];for(let t=0;t<this.labels.length;t++)e.push(this.labels[t],this.outputs[t].serialize());return e}}function Fi(t,e,r,i){const n=i-r,o=t-r;return 0===n?0:1===e?o/n:(Math.pow(e,o)-1)/(Math.pow(e,n)-1)}class Zi{constructor(t,e){this.type=t,this.args=e}static parse(t,e){if(t.length<2)return e.error("Expectected at least one argument.");let r=null;const i=e.expectedType;i&&"value"!==i.kind&&(r=i);const n=[];for(const i of t.slice(1)){const t=e.parse(i,1+n.length,r,void 0,{typeAnnotation:"omit"});if(!t)return null;r=r||t.type,n.push(t)}const o=i&&n.some((t=>fr(i,t.type)));return new Zi(o?sr:r,n)}evaluate(t){let e,r=null,i=0;for(const n of this.args){if(i++,r=n.evaluate(t),r&&r instanceof wr&&!r.available&&(e||(e=r),r=null,i===this.args.length))return e;if(null!==r)break}return r}eachChild(t){this.args.forEach(t)}outputDefined(){return this.args.every((t=>t.outputDefined()))}serialize(){const t=["coalesce"];return this.eachChild((e=>{t.push(e.serialize())})),t}}class ki{constructor(t,e){this.type=e.type,this.bindings=[].concat(t),this.result=e}evaluate(t){return this.result.evaluate(t)}eachChild(t){for(const e of this.bindings)t(e[1]);t(this.result)}static parse(t,e){if(t.length<4)return e.error(`Expected at least 3 arguments, but found ${t.length-1} instead.`);const r=[];for(let i=1;i<t.length-1;i+=2){const n=t[i];if("string"!=typeof n)return e.error(`Expected string, but found ${typeof n} instead.`,i);if(/[^a-zA-Z0-9_]/.test(n))return e.error("Variable names must contain only alphanumeric characters or '_'.",i);const o=e.parse(t[i+1],i+1);if(!o)return null;r.push([n,o])}const i=e.parse(t[t.length-1],t.length-1,e.expectedType,r);return i?new ki(r,i):null}outputDefined(){return this.result.outputDefined()}serialize(){const t=["let"];for(const[e,r]of this.bindings)t.push(e,r.serialize());return t.push(this.result.serialize()),t}}class ji{constructor(t,e,r){this.type=t,this.index=e,this.input=r}static parse(t,e){if(3!==t.length)return e.error(`Expected 2 arguments, but found ${t.length-1} instead.`);const r=e.parse(t[1],1,rr),i=e.parse(t[2],2,hr(e.expectedType||sr));if(!r||!i)return null;const n=i.type;return new ji(n.itemType,r,i)}evaluate(t){const e=this.index.evaluate(t),r=this.input.evaluate(t);if(e<0)throw new Rr(`Array index out of bounds: ${e} < 0.`);if(e>=r.length)throw new Rr(`Array index out of bounds: ${e} > ${r.length-1}.`);if(e!==Math.floor(e))throw new Rr(`Array index must be an integer, but found ${e} instead.`);return r[e]}eachChild(t){t(this.index),t(this.input)}outputDefined(){return!1}serialize(){return["at",this.index.serialize(),this.input.serialize()]}}class Di{constructor(t,e){this.type=nr,this.needle=t,this.haystack=e}static parse(t,e){if(3!==t.length)return e.error(`Expected 2 arguments, but found ${t.length-1} instead.`);const r=e.parse(t[1],1,sr),i=e.parse(t[2],2,sr);return r&&i?gr(r.type,[nr,ir,rr,er,sr])?new Di(r,i):e.error(`Expected first argument to be of type boolean, string, number or null, but found ${pr(r.type)} instead`):null}evaluate(t){const e=this.needle.evaluate(t),r=this.haystack.evaluate(t);if(null==r)return!1;if(!yr(e,["boolean","string","number","null"]))throw new Rr(`Expected first argument to be of type boolean, string, number or null, but found ${pr(Sr(e))} instead.`);if(!yr(r,["string","array"]))throw new Rr(`Expected second argument to be of type array or string, but found ${pr(Sr(r))} instead.`);return r.indexOf(e)>=0}eachChild(t){t(this.needle),t(this.haystack)}outputDefined(){return!0}serialize(){return["in",this.needle.serialize(),this.haystack.serialize()]}}class Ni{constructor(t,e,r){this.type=rr,this.needle=t,this.haystack=e,this.fromIndex=r}static parse(t,e){if(t.length<=2||t.length>=5)return e.error(`Expected 3 or 4 arguments, but found ${t.length-1} instead.`);const r=e.parse(t[1],1,sr),i=e.parse(t[2],2,sr);if(!r||!i)return null;if(!gr(r.type,[nr,ir,rr,er,sr]))return e.error(`Expected first argument to be of type boolean, string, number or null, but found ${pr(r.type)} instead`);if(4===t.length){const n=e.parse(t[3],3,rr);return n?new Ni(r,i,n):null}return new Ni(r,i)}evaluate(t){const e=this.needle.evaluate(t),r=this.haystack.evaluate(t);if(!yr(e,["boolean","string","number","null"]))throw new Rr(`Expected first argument to be of type boolean, string, number or null, but found ${pr(Sr(e))} instead.`);if(!yr(r,["string","array"]))throw new Rr(`Expected second argument to be of type array or string, but found ${pr(Sr(r))} instead.`);if(this.fromIndex){const i=this.fromIndex.evaluate(t);return r.indexOf(e,i)}return r.indexOf(e)}eachChild(t){t(this.needle),t(this.haystack),this.fromIndex&&t(this.fromIndex)}outputDefined(){return!1}serialize(){if(null!=this.fromIndex&&void 0!==this.fromIndex){const t=this.fromIndex.serialize();return["index-of",this.needle.serialize(),this.haystack.serialize(),t]}return["index-of",this.needle.serialize(),this.haystack.serialize()]}}class Gi{constructor(t,e,r,i,n,o){this.inputType=t,this.type=e,this.input=r,this.cases=i,this.outputs=n,this.otherwise=o}static parse(t,e){if(t.length<5)return e.error(`Expected at least 4 arguments, but found only ${t.length-1}.`);if(t.length%2!=1)return e.error("Expected an even number of arguments.");let r,i;e.expectedType&&"value"!==e.expectedType.kind&&(i=e.expectedType);const n={},o=[];for(let a=2;a<t.length-1;a+=2){let s=t[a];const l=t[a+1];Array.isArray(s)||(s=[s]);const u=e.concat(a);if(0===s.length)return u.error("Expected at least one branch label.");for(const t of s){if("number"!=typeof t&&"string"!=typeof t)return u.error("Branch labels must be numbers or strings.");if("number"==typeof t&&Math.abs(t)>Number.MAX_SAFE_INTEGER)return u.error(`Branch labels must be integers no larger than ${Number.MAX_SAFE_INTEGER}.`);if("number"==typeof t&&Math.floor(t)!==t)return u.error("Numeric branch labels must be integer values.");if(r){if(u.checkSubtype(r,Sr(t)))return null}else r=Sr(t);if(void 0!==n[String(t)])return u.error("Branch labels must be unique.");n[String(t)]=o.length}const c=e.parse(l,a,i);if(!c)return null;i=i||c.type,o.push(c)}const a=e.parse(t[1],1,sr);if(!a)return null;const s=e.parse(t[t.length-1],t.length-1,i);return s?"value"!==a.type.kind&&e.concat(1).checkSubtype(r,a.type)?null:new Gi(r,i,a,n,o,s):null}evaluate(t){const e=this.input.evaluate(t);return(Sr(e)===this.inputType&&this.outputs[this.cases[e]]||this.otherwise).evaluate(t)}eachChild(t){t(this.input),this.outputs.forEach(t),t(this.otherwise)}outputDefined(){return this.outputs.every((t=>t.outputDefined()))&&this.otherwise.outputDefined()}serialize(){const t=["match",this.input.serialize()],e=Object.keys(this.cases).sort(),r=[],i={};for(const t of e){const e=i[this.cases[t]];void 0===e?(i[this.cases[t]]=r.length,r.push([this.cases[t],[t]])):r[e][1].push(t)}const n=t=>"number"===this.inputType.kind?Number(t):t;for(const[e,i]of r)1===i.length?t.push(n(i[0])):t.push(i.map(n)),t.push(this.outputs[e].serialize());return t.push(this.otherwise.serialize()),t}}class zi{constructor(t,e,r){this.type=t,this.branches=e,this.otherwise=r}static parse(t,e){if(t.length<4)return e.error(`Expected at least 3 arguments, but found only ${t.length-1}.`);if(t.length%2!=0)return e.error("Expected an odd number of arguments.");let r;e.expectedType&&"value"!==e.expectedType.kind&&(r=e.expectedType);const i=[];for(let n=1;n<t.length-1;n+=2){const o=e.parse(t[n],n,nr);if(!o)return null;const a=e.parse(t[n+1],n+1,r);if(!a)return null;i.push([o,a]),r=r||a.type}const n=e.parse(t[t.length-1],t.length-1,r);return n?new zi(r,i,n):null}evaluate(t){for(const[e,r]of this.branches)if(e.evaluate(t))return r.evaluate(t);return this.otherwise.evaluate(t)}eachChild(t){for(const[e,r]of this.branches)t(e),t(r);t(this.otherwise)}outputDefined(){return this.branches.every((([t,e])=>e.outputDefined()))&&this.otherwise.outputDefined()}serialize(){const t=["case"];return this.eachChild((e=>{t.push(e.serialize())})),t}}class Ui{constructor(t,e,r,i){this.type=t,this.input=e,this.beginIndex=r,this.endIndex=i}static parse(t,e){if(t.length<=2||t.length>=5)return e.error(`Expected 3 or 4 arguments, but found ${t.length-1} instead.`);const r=e.parse(t[1],1,sr),i=e.parse(t[2],2,rr);if(!r||!i)return null;if(!gr(r.type,[hr(sr),ir,sr]))return e.error(`Expected first argument to be of type array or string, but found ${pr(r.type)} instead`);if(4===t.length){const n=e.parse(t[3],3,rr);return n?new Ui(r.type,r,i,n):null}return new Ui(r.type,r,i)}evaluate(t){const e=this.input.evaluate(t),r=this.beginIndex.evaluate(t);if(!yr(e,["string","array"]))throw new Rr(`Expected first argument to be of type array or string, but found ${pr(Sr(e))} instead.`);if(this.endIndex){const i=this.endIndex.evaluate(t);return e.slice(r,i)}return e.slice(r)}eachChild(t){t(this.input),t(this.beginIndex),this.endIndex&&t(this.endIndex)}outputDefined(){return!1}serialize(){if(null!=this.endIndex&&void 0!==this.endIndex){const t=this.endIndex.serialize();return["slice",this.input.serialize(),this.beginIndex.serialize(),t]}return["slice",this.input.serialize(),this.beginIndex.serialize()]}}function Bi(t,e){return"=="===t||"!="===t?"boolean"===e.kind||"string"===e.kind||"number"===e.kind||"null"===e.kind||"value"===e.kind:"string"===e.kind||"number"===e.kind||"value"===e.kind}function qi(t,e,r,i){return 0===i.compare(e,r)}function Vi(t,e,r){const i="=="!==t&&"!="!==t;return class n{constructor(t,e,r){this.type=nr,this.lhs=t,this.rhs=e,this.collator=r,this.hasUntypedArgument="value"===t.type.kind||"value"===e.type.kind}static parse(t,e){if(3!==t.length&&4!==t.length)return e.error("Expected two or three arguments.");const r=t[0];let o=e.parse(t[1],1,sr);if(!o)return null;if(!Bi(r,o.type))return e.concat(1).error(`"${r}" comparisons are not supported for type '${pr(o.type)}'.`);let a=e.parse(t[2],2,sr);if(!a)return null;if(!Bi(r,a.type))return e.concat(2).error(`"${r}" comparisons are not supported for type '${pr(a.type)}'.`);if(o.type.kind!==a.type.kind&&"value"!==o.type.kind&&"value"!==a.type.kind)return e.error(`Cannot compare types '${pr(o.type)}' and '${pr(a.type)}'.`);i&&("value"===o.type.kind&&"value"!==a.type.kind?o=new Pr(a.type,[o]):"value"!==o.type.kind&&"value"===a.type.kind&&(a=new Pr(o.type,[a])));let s=null;if(4===t.length){if("string"!==o.type.kind&&"string"!==a.type.kind&&"value"!==o.type.kind&&"value"!==a.type.kind)return e.error("Cannot use collator to compare non-string types.");if(s=e.parse(t[3],3,lr),!s)return null}return new n(o,a,s)}evaluate(n){const o=this.lhs.evaluate(n),a=this.rhs.evaluate(n);if(i&&this.hasUntypedArgument){const e=Sr(o),r=Sr(a);if(e.kind!==r.kind||"string"!==e.kind&&"number"!==e.kind)throw new Rr(`Expected arguments for "${t}" to be (string, string) or (number, number), but found (${e.kind}, ${r.kind}) instead.`)}if(this.collator&&!i&&this.hasUntypedArgument){const t=Sr(o),r=Sr(a);if("string"!==t.kind||"string"!==r.kind)return e(n,o,a)}return this.collator?r(n,o,a,this.collator.evaluate(n)):e(n,o,a)}eachChild(t){t(this.lhs),t(this.rhs),this.collator&&t(this.collator)}outputDefined(){return!0}serialize(){const e=[t];return this.eachChild((t=>{e.push(t.serialize())})),e}}}const Wi=Vi("==",(function(t,e,r){return e===r}),qi),Xi=Vi("!=",(function(t,e,r){return e!==r}),(function(t,e,r,i){return!qi(0,e,r,i)})),Yi=Vi("<",(function(t,e,r){return e<r}),(function(t,e,r,i){return i.compare(e,r)<0})),Hi=Vi(">",(function(t,e,r){return e>r}),(function(t,e,r,i){return i.compare(e,r)>0})),Ki=Vi("<=",(function(t,e,r){return e<=r}),(function(t,e,r,i){return i.compare(e,r)<=0})),$i=Vi(">=",(function(t,e,r){return e>=r}),(function(t,e,r,i){return i.compare(e,r)>=0}));class Ji{constructor(t,e,r,i,n){this.type=ir,this.number=t,this.locale=e,this.currency=r,this.minFractionDigits=i,this.maxFractionDigits=n}static parse(t,e){if(3!==t.length)return e.error("Expected two arguments.");const r=e.parse(t[1],1,rr);if(!r)return null;const i=t[2];if("object"!=typeof i||Array.isArray(i))return e.error("NumberFormat options argument must be an object.");let n=null;if(i.locale&&(n=e.parse(i.locale,1,ir),!n))return null;let o=null;if(i.currency&&(o=e.parse(i.currency,1,ir),!o))return null;let a=null;if(i["min-fraction-digits"]&&(a=e.parse(i["min-fraction-digits"],1,rr),!a))return null;let s=null;return i["max-fraction-digits"]&&(s=e.parse(i["max-fraction-digits"],1,rr),!s)?null:new Ji(r,n,o,a,s)}evaluate(t){return new Intl.NumberFormat(this.locale?this.locale.evaluate(t):[],{style:this.currency?"currency":"decimal",currency:this.currency?this.currency.evaluate(t):void 0,minimumFractionDigits:this.minFractionDigits?this.minFractionDigits.evaluate(t):void 0,maximumFractionDigits:this.maxFractionDigits?this.maxFractionDigits.evaluate(t):void 0}).format(this.number.evaluate(t))}eachChild(t){t(this.number),this.locale&&t(this.locale),this.currency&&t(this.currency),this.minFractionDigits&&t(this.minFractionDigits),this.maxFractionDigits&&t(this.maxFractionDigits)}outputDefined(){return!1}serialize(){const t={};return this.locale&&(t.locale=this.locale.serialize()),this.currency&&(t.currency=this.currency.serialize()),this.minFractionDigits&&(t["min-fraction-digits"]=this.minFractionDigits.serialize()),this.maxFractionDigits&&(t["max-fraction-digits"]=this.maxFractionDigits.serialize()),["number-format",this.number.serialize(),t]}}class Qi{constructor(t){this.type=rr,this.input=t}static parse(t,e){if(2!==t.length)return e.error(`Expected 1 argument, but found ${t.length-1} instead.`);const r=e.parse(t[1],1);return r?"array"!==r.type.kind&&"string"!==r.type.kind&&"value"!==r.type.kind?e.error(`Expected argument of type string or array, but found ${pr(r.type)} instead.`):new Qi(r):null}evaluate(t){const e=this.input.evaluate(t);if("string"==typeof e)return e.length;if(Array.isArray(e))return e.length;throw new Rr(`Expected value to be of type string or array, but found ${pr(Sr(e))} instead.`)}eachChild(t){t(this.input)}outputDefined(){return!1}serialize(){const t=["length"];return this.eachChild((e=>{t.push(e.serialize())})),t}}const tn={"==":Wi,"!=":Xi,">":Hi,"<":Yi,">=":$i,"<=":Ki,array:Pr,at:ji,boolean:Pr,case:zi,coalesce:Zi,collator:Dr,format:Lr,image:Ar,in:Di,"index-of":Ni,interpolate:Mi,"interpolate-hcl":Mi,"interpolate-lab":Mi,length:Qi,let:ki,literal:Or,match:Gi,number:Pr,"number-format":Ji,object:Pr,slice:Ui,step:ci,string:Pr,"to-boolean":Fr,"to-color":Fr,"to-number":Fr,"to-string":Fr,var:ai,within:ri};function en(t,[e,r,i,n]){e=e.evaluate(t),r=r.evaluate(t),i=i.evaluate(t);const o=n?n.evaluate(t):1,a=Er(e,r,i,o);if(a)throw new Rr(a);return new vr(e/255*o,r/255*o,i/255*o,o)}function rn(t,e){return t in e}function nn(t,e){const r=e[t];return void 0===r?null:r}function on(t){return{type:t}}function an(t){return{result:"success",value:t}}function sn(t){return{result:"error",value:t}}function ln(t){return"object"==typeof t&&null!==t&&!Array.isArray(t)}jr.register(tn,{error:[{kind:"error"},[ir],(t,[e])=>{throw new Rr(e.evaluate(t))}],typeof:[ir,[sr],(t,[e])=>pr(Sr(e.evaluate(t)))],"to-rgba":[hr(rr,4),[or],(t,[e])=>e.evaluate(t).toArray()],rgb:[or,[rr,rr,rr],en],rgba:[or,[rr,rr,rr,rr],en],has:{type:nr,overloads:[[[ir],(t,[e])=>rn(e.evaluate(t),t.properties())],[[ir,ar],(t,[e,r])=>rn(e.evaluate(t),r.evaluate(t))]]},get:{type:sr,overloads:[[[ir],(t,[e])=>nn(e.evaluate(t),t.properties())],[[ir,ar],(t,[e,r])=>nn(e.evaluate(t),r.evaluate(t))]]},"feature-state":[sr,[ir],(t,[e])=>nn(e.evaluate(t),t.featureState||{})],properties:[ar,[],t=>t.properties()],"geometry-type":[ir,[],t=>t.geometryType()],id:[sr,[],t=>t.id()],zoom:[rr,[],t=>t.globals.zoom],pitch:[rr,[],t=>t.globals.pitch||0],"distance-from-center":[rr,[],t=>t.distanceFromCenter()],"heatmap-density":[rr,[],t=>t.globals.heatmapDensity||0],"line-progress":[rr,[],t=>t.globals.lineProgress||0],"sky-radial-progress":[rr,[],t=>t.globals.skyRadialProgress||0],accumulated:[sr,[],t=>void 0===t.globals.accumulated?null:t.globals.accumulated],"+":[rr,on(rr),(t,e)=>{let r=0;for(const i of e)r+=i.evaluate(t);return r}],"*":[rr,on(rr),(t,e)=>{let r=1;for(const i of e)r*=i.evaluate(t);return r}],"-":{type:rr,overloads:[[[rr,rr],(t,[e,r])=>e.evaluate(t)-r.evaluate(t)],[[rr],(t,[e])=>-e.evaluate(t)]]},"/":[rr,[rr,rr],(t,[e,r])=>e.evaluate(t)/r.evaluate(t)],"%":[rr,[rr,rr],(t,[e,r])=>e.evaluate(t)%r.evaluate(t)],ln2:[rr,[],()=>Math.LN2],pi:[rr,[],()=>Math.PI],e:[rr,[],()=>Math.E],"^":[rr,[rr,rr],(t,[e,r])=>Math.pow(e.evaluate(t),r.evaluate(t))],sqrt:[rr,[rr],(t,[e])=>Math.sqrt(e.evaluate(t))],log10:[rr,[rr],(t,[e])=>Math.log(e.evaluate(t))/Math.LN10],ln:[rr,[rr],(t,[e])=>Math.log(e.evaluate(t))],log2:[rr,[rr],(t,[e])=>Math.log(e.evaluate(t))/Math.LN2],sin:[rr,[rr],(t,[e])=>Math.sin(e.evaluate(t))],cos:[rr,[rr],(t,[e])=>Math.cos(e.evaluate(t))],tan:[rr,[rr],(t,[e])=>Math.tan(e.evaluate(t))],asin:[rr,[rr],(t,[e])=>Math.asin(e.evaluate(t))],acos:[rr,[rr],(t,[e])=>Math.acos(e.evaluate(t))],atan:[rr,[rr],(t,[e])=>Math.atan(e.evaluate(t))],min:[rr,on(rr),(t,e)=>Math.min(...e.map((e=>e.evaluate(t))))],max:[rr,on(rr),(t,e)=>Math.max(...e.map((e=>e.evaluate(t))))],abs:[rr,[rr],(t,[e])=>Math.abs(e.evaluate(t))],round:[rr,[rr],(t,[e])=>{const r=e.evaluate(t);return r<0?-Math.round(-r):Math.round(r)}],floor:[rr,[rr],(t,[e])=>Math.floor(e.evaluate(t))],ceil:[rr,[rr],(t,[e])=>Math.ceil(e.evaluate(t))],"filter-==":[nr,[ir,sr],(t,[e,r])=>t.properties()[e.value]===r.value],"filter-id-==":[nr,[sr],(t,[e])=>t.id()===e.value],"filter-type-==":[nr,[ir],(t,[e])=>t.geometryType()===e.value],"filter-<":[nr,[ir,sr],(t,[e,r])=>{const i=t.properties()[e.value],n=r.value;return typeof i==typeof n&&i<n}],"filter-id-<":[nr,[sr],(t,[e])=>{const r=t.id(),i=e.value;return typeof r==typeof i&&r<i}],"filter->":[nr,[ir,sr],(t,[e,r])=>{const i=t.properties()[e.value],n=r.value;return typeof i==typeof n&&i>n}],"filter-id->":[nr,[sr],(t,[e])=>{const r=t.id(),i=e.value;return typeof r==typeof i&&r>i}],"filter-<=":[nr,[ir,sr],(t,[e,r])=>{const i=t.properties()[e.value],n=r.value;return typeof i==typeof n&&i<=n}],"filter-id-<=":[nr,[sr],(t,[e])=>{const r=t.id(),i=e.value;return typeof r==typeof i&&r<=i}],"filter->=":[nr,[ir,sr],(t,[e,r])=>{const i=t.properties()[e.value],n=r.value;return typeof i==typeof n&&i>=n}],"filter-id->=":[nr,[sr],(t,[e])=>{const r=t.id(),i=e.value;return typeof r==typeof i&&r>=i}],"filter-has":[nr,[sr],(t,[e])=>e.value in t.properties()],"filter-has-id":[nr,[],t=>null!==t.id()&&void 0!==t.id()],"filter-type-in":[nr,[hr(ir)],(t,[e])=>e.value.indexOf(t.geometryType())>=0],"filter-id-in":[nr,[hr(sr)],(t,[e])=>e.value.indexOf(t.id())>=0],"filter-in-small":[nr,[ir,hr(sr)],(t,[e,r])=>r.value.indexOf(t.properties()[e.value])>=0],"filter-in-large":[nr,[ir,hr(sr)],(t,[e,r])=>function(t,e,r,i){for(;r<=i;){const n=r+i>>1;if(e[n]===t)return!0;e[n]>t?i=n-1:r=n+1}return!1}(t.properties()[e.value],r.value,0,r.value.length-1)],all:{type:nr,overloads:[[[nr,nr],(t,[e,r])=>e.evaluate(t)&&r.evaluate(t)],[on(nr),(t,e)=>{for(const r of e)if(!r.evaluate(t))return!1;return!0}]]},any:{type:nr,overloads:[[[nr,nr],(t,[e,r])=>e.evaluate(t)||r.evaluate(t)],[on(nr),(t,e)=>{for(const r of e)if(r.evaluate(t))return!0;return!1}]]},"!":[nr,[nr],(t,[e])=>!e.evaluate(t)],"is-supported-script":[nr,[ir],(t,[e])=>{const r=t.globals&&t.globals.isSupportedScript;return!r||r(e.evaluate(t))}],upcase:[ir,[ir],(t,[e])=>e.evaluate(t).toUpperCase()],downcase:[ir,[ir],(t,[e])=>e.evaluate(t).toLowerCase()],concat:[ir,on(sr),(t,e)=>e.map((e=>Cr(e.evaluate(t)))).join("")],"resolved-locale":[ir,[lr],(t,[e])=>e.evaluate(t).resolvedLocale()]});class un{constructor(t,e){var r;this.expression=t,this._warningHistory={},this._evaluator=new kr,this._defaultValue=e?"color"===(r=e).type&&ln(r.default)?new vr(0,0,0,0):"color"===r.type?vr.parse(r.default)||null:void 0===r.default?null:r.default:null,this._enumValues=e&&"enum"===e.type?e.values:null}evaluateWithoutErrorHandling(t,e,r,i,n,o,a,s){return this._evaluator.globals=t,this._evaluator.feature=e,this._evaluator.featureState=r,this._evaluator.canonical=i||null,this._evaluator.availableImages=n||null,this._evaluator.formattedSection=o,this._evaluator.featureTileCoord=a||null,this._evaluator.featureDistanceData=s||null,this.expression.evaluate(this._evaluator)}evaluate(t,e,r,i,n,o,a,s){this._evaluator.globals=t,this._evaluator.feature=e||null,this._evaluator.featureState=r||null,this._evaluator.canonical=i||null,this._evaluator.availableImages=n||null,this._evaluator.formattedSection=o||null,this._evaluator.featureTileCoord=a||null,this._evaluator.featureDistanceData=s||null;try{const t=this.expression.evaluate(this._evaluator);if(null==t||"number"==typeof t&&t!=t)return this._defaultValue;if(this._enumValues&&!(t in this._enumValues))throw new Rr(`Expected value to be one of ${Object.keys(this._enumValues).map((t=>JSON.stringify(t))).join(", ")}, but found ${JSON.stringify(t)} instead.`);return t}catch(t){return this._warningHistory[t.message]||(this._warningHistory[t.message]=!0,"undefined"!=typeof console&&console.warn(t.message)),this._defaultValue}}}function cn(t,e){const r=new si(tn,[],e?function(t){const e={color:or,string:ir,number:rr,enum:ir,boolean:nr,formatted:ur,resolvedImage:cr};return"array"===t.type?hr(e[t.value]||sr,t.length):e[t.type]}(e):void 0),i=r.parse(t,void 0,void 0,void 0,e&&"string"===e.type?{typeAnnotation:"coerce"}:void 0);return i?an(new un(i,e)):sn(r.errors)}class hn{constructor(t,e){this.kind=t,this._styleExpression=e,this.isStateDependent="constant"!==t&&!ni(e.expression)}evaluateWithoutErrorHandling(t,e,r,i,n,o){return this._styleExpression.evaluateWithoutErrorHandling(t,e,r,i,n,o)}evaluate(t,e,r,i,n,o){return this._styleExpression.evaluate(t,e,r,i,n,o)}}class pn{constructor(t,e,r,i){this.kind=t,this.zoomStops=r,this._styleExpression=e,this.isStateDependent="camera"!==t&&!ni(e.expression),this.interpolationType=i}evaluateWithoutErrorHandling(t,e,r,i,n,o){return this._styleExpression.evaluateWithoutErrorHandling(t,e,r,i,n,o)}evaluate(t,e,r,i,n,o){return this._styleExpression.evaluate(t,e,r,i,n,o)}interpolationFactor(t,e,r){return this.interpolationType?Mi.interpolationFactor(this.interpolationType,t,e,r):0}}function dn(t){let e=null;if(t instanceof ki)e=dn(t.result);else if(t instanceof Zi){for(const r of t.args)if(e=dn(r),e)break}else(t instanceof ci||t instanceof Mi)&&t.input instanceof jr&&"zoom"===t.input.name&&(e=t);return e instanceof Qe||t.eachChild((t=>{const r=dn(t);r instanceof Qe?e=r:!e&&r?e=new Qe("",'"zoom" expression may only be used as input to a top-level "step" or "interpolate" expression.'):e&&r&&e!==r&&(e=new Qe("",'Only one zoom-based "step" or "interpolate" subexpression may be used in an expression.'))})),e}function fn(t){return"object"==typeof t?["literal",t]:t}function gn(t){switch(t.colorSpace){case"hcl":return"interpolate-hcl";case"lab":return"interpolate-lab";default:return"interpolate"}}function yn(t,e){const r=fn((i=t.default,n=e.default,void 0!==i?i:void 0!==n?n:void 0));var i,n;return void 0===r&&"resolvedImage"===e.type?"":r}function mn(t,e,r){const i=xn(t,e),n=["get",t.property];if("categorical"===i&&"boolean"==typeof r[0][0]){const i=["case"];for(const t of r)i.push(["==",n,t[0]],t[1]);return i.push(yn(t,e)),i}if("categorical"===i){const i=["match",n];for(const t of r)_n(i,t[0],t[1],!1);return i.push(yn(t,e)),i}if("interval"===i){const e=["step",["number",n]];for(const t of r)_n(e,t[0],t[1],!0);return vn(e),void 0===t.default?e:["case",["==",["typeof",n],"number"],e,fn(t.default)]}if("exponential"===i){const e=void 0!==t.base?t.base:1,i=[gn(t),1===e?["linear"]:["exponential",e],["number",n]];for(const t of r)_n(i,t[0],t[1],!1);return void 0===t.default?i:["case",["==",["typeof",n],"number"],i,fn(t.default)]}throw new Error(`Unknown property function type ${i}`)}function vn(t){"step"===t[0]&&3===t.length&&(t.push(0),t.push(t[3]))}function _n(t,e,r,i){t.length>3&&e===t[t.length-2]||(i&&2===t.length||t.push(e),t.push(r))}function xn(t,e){return t.type?t.type:e.expression.interpolated?"exponential":"interval"}function bn(t){const e=["concat"],r=/{([^{}]+)}/g;let i=0;for(let n=r.exec(t);null!==n;n=r.exec(t)){const o=t.slice(i,r.lastIndex-n[0].length);i=r.lastIndex,o.length>0&&e.push(o),e.push(["get",n[1]])}if(1===e.length)return t;if(i<t.length)e.push(t.slice(i));else if(2===e.length)return["to-string",e[1]];return e}function wn(t){if(Array.isArray(t))return t.map(wn);if(t instanceof Object&&!(t instanceof Number||t instanceof String||t instanceof Boolean)){const e={};for(const r in t)e[r]=wn(t[r]);return e}return function(t){return t instanceof Number||t instanceof String||t instanceof Boolean?t.valueOf():t}(t)}function En(t){if(!0===t||!1===t)return!0;if(!Array.isArray(t)||0===t.length)return!1;switch(t[0]){case"has":return t.length>=2&&"$id"!==t[1]&&"$type"!==t[1];case"in":return t.length>=3&&("string"!=typeof t[1]||Array.isArray(t[2]));case"!in":case"!has":case"none":return!1;case"==":case"!=":case">":case">=":case"<":case"<=":return 3!==t.length||Array.isArray(t[1])||Array.isArray(t[2]);case"any":case"all":for(const e of t.slice(1))if(!En(e)&&"boolean"!=typeof e)return!1;return!0;default:return!0}}function Tn(t,e="fill"){if(null==t)return{filter:()=>!0,needGeometry:!1,needFeature:!1};En(t)||(t=Ln(t));const r=t;let i=!0;try{i=function(t){if(!On(t))return t;let e=wn(t);return Cn(e),e=Sn(e),e}(r)}catch(t){console.warn(`Failed to extract static filter. Filter will continue working, but at higher memory usage and slower framerate.\nThis is most likely a bug, please report this via https://github.com/mapbox/mapbox-gl-js/issues/new?assignees=&labels=&template=Bug_report.md\nand paste the contents of this message in the report.\nThank you!\nFilter Expression:\n${JSON.stringify(r,null,2)}\n        `)}const n=Re[`filter_${e}`],o=cn(i,n);let a=null;if("error"===o.result)throw new Error(o.value.map((t=>`${t.key}: ${t.message}`)).join(", "));a=(t,e,r)=>o.value.evaluate(t,e,{},r);let s=null,l=null;if(i!==r){const t=cn(r,n);if("error"===t.result)throw new Error(t.value.map((t=>`${t.key}: ${t.message}`)).join(", "));s=(e,r,i,n,o)=>t.value.evaluate(e,r,{},i,void 0,void 0,n,o),l=!ii(t.value.expression)}return a=a,{filter:a,dynamicFilter:s||void 0,needGeometry:Pn(i),needFeature:!!l}}function Sn(t){if(!Array.isArray(t))return t;const e=function(t){if(Rn.has(t[0]))for(let e=1;e<t.length;e++)if(On(t[e]))return!0;return t}(t);return!0===e?e:e.map((t=>Sn(t)))}function Cn(t){let e=!1;const r=[];if("case"===t[0]){for(let i=1;i<t.length-1;i+=2)e=e||On(t[i]),r.push(t[i+1]);r.push(t[t.length-1])}else if("match"===t[0]){e=e||On(t[1]);for(let e=2;e<t.length-1;e+=2)r.push(t[e+1]);r.push(t[t.length-1])}else if("step"===t[0]){e=e||On(t[1]);for(let e=1;e<t.length-1;e+=2)r.push(t[e+1])}e&&(t.length=0,t.push("any",...r));for(let e=1;e<t.length;e++)Cn(t[e])}function On(t){if(!Array.isArray(t))return!1;if("pitch"===(e=t[0])||"distance-from-center"===e)return!0;var e;for(let e=1;e<t.length;e++)if(On(t[e]))return!0;return!1}const Rn=new Set(["in","==","!=",">",">=","<","<=","to-boolean"]);function In(t,e){return t<e?-1:t>e?1:0}function Pn(t){if(!Array.isArray(t))return!1;if("within"===t[0])return!0;for(let e=1;e<t.length;e++)if(Pn(t[e]))return!0;return!1}function Ln(t){if(!t)return!0;const e=t[0];return t.length<=1?"any"!==e:"=="===e?An(t[1],t[2],"=="):"!="===e?Zn(An(t[1],t[2],"==")):"<"===e||">"===e||"<="===e||">="===e?An(t[1],t[2],e):"any"===e?(r=t.slice(1),["any"].concat(r.map(Ln))):"all"===e?["all"].concat(t.slice(1).map(Ln)):"none"===e?["all"].concat(t.slice(1).map(Ln).map(Zn)):"in"===e?Mn(t[1],t.slice(2)):"!in"===e?Zn(Mn(t[1],t.slice(2))):"has"===e?Fn(t[1]):"!has"===e?Zn(Fn(t[1])):"within"!==e||t;var r}function An(t,e,r){switch(t){case"$type":return[`filter-type-${r}`,e];case"$id":return[`filter-id-${r}`,e];default:return[`filter-${r}`,t,e]}}function Mn(t,e){if(0===e.length)return!1;switch(t){case"$type":return["filter-type-in",["literal",e]];case"$id":return["filter-id-in",["literal",e]];default:return e.length>200&&!e.some((t=>typeof t!=typeof e[0]))?["filter-in-large",t,["literal",e.sort(In)]]:["filter-in-small",t,["literal",e]]}}function Fn(t){switch(t){case"$type":return!0;case"$id":return["filter-has-id"];default:return["filter-has",t]}}function Zn(t){return["!",t]}var kn=["type","source","source-layer","minzoom","maxzoom","filter","layout"];function jn(t,e){const r={};for(const e in t)"ref"!==e&&(r[e]=t[e]);return kn.forEach((t=>{t in e&&(r[t]=e[t])})),r}Pe((function(t,e){var r=function(){var t=function(t,e,r,i){for(r=r||{},i=t.length;i--;r[t[i]]=e);return r},e=[1,12],r=[1,13],i=[1,9],n=[1,10],o=[1,11],a=[1,14],s=[1,15],l=[14,18,22,24],u=[18,22],c=[22,24],h={trace:function(){},yy:{},symbols_:{error:2,JSONString:3,STRING:4,JSONNumber:5,NUMBER:6,JSONNullLiteral:7,NULL:8,JSONBooleanLiteral:9,TRUE:10,FALSE:11,JSONText:12,JSONValue:13,EOF:14,JSONObject:15,JSONArray:16,"{":17,"}":18,JSONMemberList:19,JSONMember:20,":":21,",":22,"[":23,"]":24,JSONElementList:25,$accept:0,$end:1},terminals_:{2:"error",4:"STRING",6:"NUMBER",8:"NULL",10:"TRUE",11:"FALSE",14:"EOF",17:"{",18:"}",21:":",22:",",23:"[",24:"]"},productions_:[0,[3,1],[5,1],[7,1],[9,1],[9,1],[12,2],[13,1],[13,1],[13,1],[13,1],[13,1],[13,1],[15,2],[15,3],[20,3],[19,1],[19,3],[16,2],[16,3],[25,1],[25,3]],performAction:function(t,e,r,i,n,o,a){var s=o.length-1;switch(n){case 1:this.$=new String(t.replace(/\\(\\|")/g,"$1").replace(/\\n/g,"\n").replace(/\\r/g,"\r").replace(/\\t/g,"\t").replace(/\\v/g,"\v").replace(/\\f/g,"\f").replace(/\\b/g,"\b")),this.$.__line__=this._$.first_line;break;case 2:this.$=new Number(t),this.$.__line__=this._$.first_line;break;case 3:this.$=null;break;case 4:this.$=new Boolean(!0),this.$.__line__=this._$.first_line;break;case 5:this.$=new Boolean(!1),this.$.__line__=this._$.first_line;break;case 6:return this.$=o[s-1];case 13:this.$={},Object.defineProperty(this.$,"__line__",{value:this._$.first_line,enumerable:!1});break;case 14:case 19:this.$=o[s-1],Object.defineProperty(this.$,"__line__",{value:this._$.first_line,enumerable:!1});break;case 15:this.$=[o[s-2],o[s]];break;case 16:this.$={},this.$[o[s][0]]=o[s][1];break;case 17:this.$=o[s-2],o[s-2][o[s][0]]=o[s][1];break;case 18:this.$=[],Object.defineProperty(this.$,"__line__",{value:this._$.first_line,enumerable:!1});break;case 20:this.$=[o[s]];break;case 21:this.$=o[s-2],o[s-2].push(o[s])}},table:[{3:5,4:e,5:6,6:r,7:3,8:i,9:4,10:n,11:o,12:1,13:2,15:7,16:8,17:a,23:s},{1:[3]},{14:[1,16]},t(l,[2,7]),t(l,[2,8]),t(l,[2,9]),t(l,[2,10]),t(l,[2,11]),t(l,[2,12]),t(l,[2,3]),t(l,[2,4]),t(l,[2,5]),t([14,18,21,22,24],[2,1]),t(l,[2,2]),{3:20,4:e,18:[1,17],19:18,20:19},{3:5,4:e,5:6,6:r,7:3,8:i,9:4,10:n,11:o,13:23,15:7,16:8,17:a,23:s,24:[1,21],25:22},{1:[2,6]},t(l,[2,13]),{18:[1,24],22:[1,25]},t(u,[2,16]),{21:[1,26]},t(l,[2,18]),{22:[1,28],24:[1,27]},t(c,[2,20]),t(l,[2,14]),{3:20,4:e,20:29},{3:5,4:e,5:6,6:r,7:3,8:i,9:4,10:n,11:o,13:30,15:7,16:8,17:a,23:s},t(l,[2,19]),{3:5,4:e,5:6,6:r,7:3,8:i,9:4,10:n,11:o,13:31,15:7,16:8,17:a,23:s},t(u,[2,17]),t(u,[2,15]),t(c,[2,21])],defaultActions:{16:[2,6]},parseError:function(t,e){if(!e.recoverable)throw new Error(t);this.trace(t)},parse:function(t){var e=this,r=[0],i=[null],n=[],o=this.table,a="",s=0,l=0,u=2,c=1,h=n.slice.call(arguments,1),p=Object.create(this.lexer),d={yy:{}};for(var f in this.yy)Object.prototype.hasOwnProperty.call(this.yy,f)&&(d.yy[f]=this.yy[f]);p.setInput(t,d.yy),d.yy.lexer=p,d.yy.parser=this,void 0===p.yylloc&&(p.yylloc={});var g=p.yylloc;n.push(g);var y=p.options&&p.options.ranges;function m(){var t;return"number"!=typeof(t=p.lex()||c)&&(t=e.symbols_[t]||t),t}"function"==typeof d.yy.parseError?this.parseError=d.yy.parseError:this.parseError=Object.getPrototypeOf(this).parseError;for(var v,_,x,b,w,E,T,S,C={};;){if(_=r[r.length-1],this.defaultActions[_]?x=this.defaultActions[_]:(null==v&&(v=m()),x=o[_]&&o[_][v]),void 0===x||!x.length||!x[0]){var O="";for(w in S=[],o[_])this.terminals_[w]&&w>u&&S.push("'"+this.terminals_[w]+"'");O=p.showPosition?"Parse error on line "+(s+1)+":\n"+p.showPosition()+"\nExpecting "+S.join(", ")+", got '"+(this.terminals_[v]||v)+"'":"Parse error on line "+(s+1)+": Unexpected "+(v==c?"end of input":"'"+(this.terminals_[v]||v)+"'"),this.parseError(O,{text:p.match,token:this.terminals_[v]||v,line:p.yylineno,loc:g,expected:S})}if(x[0]instanceof Array&&x.length>1)throw new Error("Parse Error: multiple actions possible at state: "+_+", token: "+v);switch(x[0]){case 1:r.push(v),i.push(p.yytext),n.push(p.yylloc),r.push(x[1]),v=null,l=p.yyleng,a=p.yytext,s=p.yylineno,g=p.yylloc;break;case 2:if(E=this.productions_[x[1]][1],C.$=i[i.length-E],C._$={first_line:n[n.length-(E||1)].first_line,last_line:n[n.length-1].last_line,first_column:n[n.length-(E||1)].first_column,last_column:n[n.length-1].last_column},y&&(C._$.range=[n[n.length-(E||1)].range[0],n[n.length-1].range[1]]),void 0!==(b=this.performAction.apply(C,[a,l,s,d.yy,x[1],i,n].concat(h))))return b;E&&(r=r.slice(0,-1*E*2),i=i.slice(0,-1*E),n=n.slice(0,-1*E)),r.push(this.productions_[x[1]][0]),i.push(C.$),n.push(C._$),T=o[r[r.length-2]][r[r.length-1]],r.push(T);break;case 3:return!0}}return!0}},p={EOF:1,parseError:function(t,e){if(!this.yy.parser)throw new Error(t);this.yy.parser.parseError(t,e)},setInput:function(t,e){return this.yy=e||this.yy||{},this._input=t,this._more=this._backtrack=this.done=!1,this.yylineno=this.yyleng=0,this.yytext=this.matched=this.match="",this.conditionStack=["INITIAL"],this.yylloc={first_line:1,first_column:0,last_line:1,last_column:0},this.options.ranges&&(this.yylloc.range=[0,0]),this.offset=0,this},input:function(){var t=this._input[0];return this.yytext+=t,this.yyleng++,this.offset++,this.match+=t,this.matched+=t,t.match(/(?:\r\n?|\n).*/g)?(this.yylineno++,this.yylloc.last_line++):this.yylloc.last_column++,this.options.ranges&&this.yylloc.range[1]++,this._input=this._input.slice(1),t},unput:function(t){var e=t.length,r=t.split(/(?:\r\n?|\n)/g);this._input=t+this._input,this.yytext=this.yytext.substr(0,this.yytext.length-e),this.offset-=e;var i=this.match.split(/(?:\r\n?|\n)/g);this.match=this.match.substr(0,this.match.length-1),this.matched=this.matched.substr(0,this.matched.length-1),r.length-1&&(this.yylineno-=r.length-1);var n=this.yylloc.range;return this.yylloc={first_line:this.yylloc.first_line,last_line:this.yylineno+1,first_column:this.yylloc.first_column,last_column:r?(r.length===i.length?this.yylloc.first_column:0)+i[i.length-r.length].length-r[0].length:this.yylloc.first_column-e},this.options.ranges&&(this.yylloc.range=[n[0],n[0]+this.yyleng-e]),this.yyleng=this.yytext.length,this},more:function(){return this._more=!0,this},reject:function(){return this.options.backtrack_lexer?(this._backtrack=!0,this):this.parseError("Lexical error on line "+(this.yylineno+1)+". You can only invoke reject() in the lexer when the lexer is of the backtracking persuasion (options.backtrack_lexer = true).\n"+this.showPosition(),{text:"",token:null,line:this.yylineno})},less:function(t){this.unput(this.match.slice(t))},pastInput:function(){var t=this.matched.substr(0,this.matched.length-this.match.length);return(t.length>20?"...":"")+t.substr(-20).replace(/\n/g,"")},upcomingInput:function(){var t=this.match;return t.length<20&&(t+=this._input.substr(0,20-t.length)),(t.substr(0,20)+(t.length>20?"...":"")).replace(/\n/g,"")},showPosition:function(){var t=this.pastInput(),e=new Array(t.length+1).join("-");return t+this.upcomingInput()+"\n"+e+"^"},test_match:function(t,e){var r,i,n;if(this.options.backtrack_lexer&&(n={yylineno:this.yylineno,yylloc:{first_line:this.yylloc.first_line,last_line:this.last_line,first_column:this.yylloc.first_column,last_column:this.yylloc.last_column},yytext:this.yytext,match:this.match,matches:this.matches,matched:this.matched,yyleng:this.yyleng,offset:this.offset,_more:this._more,_input:this._input,yy:this.yy,conditionStack:this.conditionStack.slice(0),done:this.done},this.options.ranges&&(n.yylloc.range=this.yylloc.range.slice(0))),(i=t[0].match(/(?:\r\n?|\n).*/g))&&(this.yylineno+=i.length),this.yylloc={first_line:this.yylloc.last_line,last_line:this.yylineno+1,first_column:this.yylloc.last_column,last_column:i?i[i.length-1].length-i[i.length-1].match(/\r?\n?/)[0].length:this.yylloc.last_column+t[0].length},this.yytext+=t[0],this.match+=t[0],this.matches=t,this.yyleng=this.yytext.length,this.options.ranges&&(this.yylloc.range=[this.offset,this.offset+=this.yyleng]),this._more=!1,this._backtrack=!1,this._input=this._input.slice(t[0].length),this.matched+=t[0],r=this.performAction.call(this,this.yy,this,e,this.conditionStack[this.conditionStack.length-1]),this.done&&this._input&&(this.done=!1),r)return r;if(this._backtrack){for(var o in n)this[o]=n[o];return!1}return!1},next:function(){if(this.done)return this.EOF;var t,e,r,i;this._input||(this.done=!0),this._more||(this.yytext="",this.match="");for(var n=this._currentRules(),o=0;o<n.length;o++)if((r=this._input.match(this.rules[n[o]]))&&(!e||r[0].length>e[0].length)){if(e=r,i=o,this.options.backtrack_lexer){if(!1!==(t=this.test_match(r,n[o])))return t;if(this._backtrack){e=!1;continue}return!1}if(!this.options.flex)break}return e?!1!==(t=this.test_match(e,n[i]))&&t:""===this._input?this.EOF:this.parseError("Lexical error on line "+(this.yylineno+1)+". Unrecognized text.\n"+this.showPosition(),{text:"",token:null,line:this.yylineno})},lex:function(){return this.next()||this.lex()},begin:function(t){this.conditionStack.push(t)},popState:function(){return this.conditionStack.length-1>0?this.conditionStack.pop():this.conditionStack[0]},_currentRules:function(){return this.conditionStack.length&&this.conditionStack[this.conditionStack.length-1]?this.conditions[this.conditionStack[this.conditionStack.length-1]].rules:this.conditions.INITIAL.rules},topState:function(t){return(t=this.conditionStack.length-1-Math.abs(t||0))>=0?this.conditionStack[t]:"INITIAL"},pushState:function(t){this.begin(t)},stateStackSize:function(){return this.conditionStack.length},options:{},performAction:function(t,e,r,i){switch(r){case 0:break;case 1:return 6;case 2:return e.yytext=e.yytext.substr(1,e.yyleng-2),4;case 3:return 17;case 4:return 18;case 5:return 23;case 6:return 24;case 7:return 22;case 8:return 21;case 9:return 10;case 10:return 11;case 11:return 8;case 12:return 14;case 13:return"INVALID"}},rules:[/^(?:\s+)/,/^(?:(-?([0-9]|[1-9][0-9]+))(\.[0-9]+)?([eE][-+]?[0-9]+)?\b)/,/^(?:"(?:\\[\\"bfnrt/]|\\u[a-fA-F0-9]{4}|[^\\\0-\x09\x0a-\x1f"])*")/,/^(?:\{)/,/^(?:\})/,/^(?:\[)/,/^(?:\])/,/^(?:,)/,/^(?::)/,/^(?:true\b)/,/^(?:false\b)/,/^(?:null\b)/,/^(?:$)/,/^(?:.)/],conditions:{INITIAL:{rules:[0,1,2,3,4,5,6,7,8,9,10,11,12,13],inclusive:!0}}};function d(){this.yy={}}return h.lexer=p,d.prototype=h,h.Parser=d,new d}();e.parser=r,e.Parser=r.Parser,e.parse=function(){return r.parse.apply(r,arguments)}})),new Set(["vector","raster","raster-dem"]);const Dn=function(t){return Array.isArray(t)&&t.length>0&&"string"==typeof t[0]&&t[0]in tn},Nn=function(t,e){if("error"===(t=cn(t,e)).result)return t;const r=t.value.expression,i=ii(r);if(!i&&("data-driven"!==(n=e)["property-type"]&&"cross-faded-data-driven"!==n["property-type"]))return sn([new Qe("","data expressions not supported")]);var n;const o=oi(r,["zoom","pitch","distance-from-center"]);if(!o&&!function(t){return!!t.expression&&t.expression.parameters.indexOf("zoom")>-1}(e))return sn([new Qe("","zoom expressions not supported")]);const a=dn(r);if(!a&&!o)return sn([new Qe("",'"zoom" expression may only be used as input to a top-level "step" or "interpolate" expression.')]);if(a instanceof Qe)return sn([a]);if(a instanceof Mi&&!function(t){return!!t.expression&&t.expression.interpolated}(e))return sn([new Qe("",'"interpolate" expressions cannot be used with this property')]);if(!a)return an(new hn(i?"constant":"source",t.value));const s=a instanceof Mi?a.interpolation:void 0;return an(new pn(i?"camera":"composite",t.value,a.labels,s))},Gn=function(t,e){let r=t.stops;if(!r)return function(t,e){const r=["get",t.property];if(void 0===t.default)return"string"===e.type?["string",r]:r;if("enum"===e.type)return["match",r,Object.keys(e.values),r,t.default];{const i=["color"===e.type?"to-color":e.type,r,fn(t.default)];return"array"===e.type&&i.splice(1,0,e.value,e.length||null),i}}(t,e);const i=r&&"object"==typeof r[0][0],n=i||void 0!==t.property,o=i||!n;return r=r.map((t=>!n&&e.tokens&&"string"==typeof t[1]?[t[0],bn(t[1])]:[t[0],fn(t[1])])),i?function(t,e,r){const i={},n={},o=[];for(let e=0;e<r.length;e++){const a=r[e],s=a[0].zoom;void 0===i[s]&&(i[s]={zoom:s,type:t.type,property:t.property,default:t.default},n[s]=[],o.push(s)),n[s].push([a[0].value,a[1]])}if("exponential"===xn({},e)){const r=[gn(t),["linear"],["zoom"]];for(const t of o)_n(r,t,mn(i[t],e,n[t]),!1);return r}{const t=["step",["zoom"]];for(const r of o)_n(t,r,mn(i[r],e,n[r]),!0);return vn(t),t}}(t,e,r):o?function(t,e,r,i=["zoom"]){const n=xn(t,e);let o,a=!1;if("interval"===n)o=["step",i],a=!0;else{if("exponential"!==n)throw new Error(`Unknown zoom function type "${n}"`);{const e=void 0!==t.base?t.base:1;o=[gn(t),1===e?["linear"]:["exponential",e],i]}}for(const t of r)_n(o,t[0],t[1],a);return vn(o),o}(t,e,r):mn(t,e,r)},zn=ln;var Un=r(147),Bn="function"==typeof Object.assign?Object.assign:function(t,e){if(null==t)throw new TypeError("Cannot convert undefined or null to object");for(var r=Object(t),i=1,n=arguments.length;i<n;++i){var o=arguments[i];if(null!=o)for(var a in o)o.hasOwnProperty(a)&&(r[a]=o[a])}return r};function qn(t){return t*Math.PI/180}var Vn=function(){for(var t=[],e=78271.51696402048;t.length<=24;e/=2)t.push(e);return t}();function Wn(t,e){if("undefined"!=typeof WorkerGlobalScope&&self instanceof WorkerGlobalScope&&"undefined"!=typeof OffscreenCanvas)return new OffscreenCanvas(t,e);var r=document.createElement("canvas");return r.width=t,r.height=e,r}var Xn,Yn=Array(256).join(" ");function Hn(t,e){if(e>=.05){for(var r="",i=t.split("\n"),n=Yn.slice(0,Math.round(e/.1)),o=0,a=i.length;o<a;++o)o>0&&(r+="\n"),r+=i[o].split("").join(n);return r}return t}function Kn(){return Xn||(Xn=Wn(1,1).getContext("2d")),Xn}function $n(t,e){return Kn().measureText(t).width+(t.length-1)*e}var Jn={};function Qn(t,e,r,i){if(-1!==t.indexOf("\n")){for(var n=t.split("\n"),o=[],a=0,s=n.length;a<s;++a)o.push(Qn(n[a],e,r,i));return o.join("\n")}var l=r+","+e+","+t+","+i,u=Jn[l];if(!u){var c=t.split(" ");if(c.length>1){var h=Kn();h.font=e;var p=h.measureText("M").width*r,d="";for(o=[],a=0,s=c.length;a<s;++a){var f=c[a],g=d+(d?" ":"")+f;$n(g,i)<=p?d=g:(d&&o.push(d),d=f)}for(d&&o.push(d),a=0,s=o.length;a<s&&s>1;++a){var y=o[a];if($n(y,i)<.35*p){var m=a>0?$n(o[a-1],i):1/0,v=a<s-1?$n(o[a+1],i):1/0;o.splice(a,1),s-=1,m<v?(o[a-1]+=" "+y,a-=1):o[a]=y+" "+o[a]}}for(a=0,s=o.length-1;a<s;++a){var _=o[a],x=o[a+1];if($n(_,i)>.7*p&&$n(x,i)<.6*p){var b=_.split(" "),w=b.pop();$n(w,i)<.2*p&&(o[a]=b.join(" "),o[a+1]=w+" "+x),s-=1}}u=o.join("\n")}else u=t;u=Hn(u,i),Jn[l]=u}return u}Un.GK&&(0,J.oL)(Un.GK,dt.Z.CLEAR,(function(){Jn={}}));var to,eo,ro=zn,io=Gn,no=Dn,oo=Nn,ao={Point:1,MultiPoint:1,LineString:2,MultiLineString:2,Polygon:3,MultiPolygon:3},so={center:[.5,.5],left:[0,.5],right:[1,.5],top:[.5,0],bottom:[.5,1],"top-left":[0,0],"top-right":[1,0],"bottom-left":[0,1],"bottom-right":[1,1]},lo={},uo={zoom:0};function co(t,e,r,i,n,o){var a=t.id;o||(o={},console.warn("No functionCache provided to getValue()")),o[a]||(o[a]={});var s=o[a];if(!s[r]){var l=(t[e]||lo)[r],u=Re["".concat(e,"_").concat(t.type)][r];void 0===l&&(l=u.default);var c=no(l);if(!c&&ro(l)&&(l=io(l,u),c=!0),c){var h=function(t,e){var r=oo(t,e);if("error"===r.result)throw new Error(r.value.map((function(t){return"".concat(t.key,": ").concat(t.message)})).join(", "));return r.value}(l,u);s[r]=h.evaluate.bind(h)}else"color"==u.type&&(l=vr.parse(l)),s[r]=function(){return l}}return uo.zoom=i,s[r](uo,n)}function ho(t,e){if(t){if(0===t.a||0===e)return;var r=t.a;return e=void 0===e?1:e,0===r?"transparent":"rgba("+Math.round(255*t.r/r)+","+Math.round(255*t.g/r)+","+Math.round(255*t.b/r)+","+r*e+")"}return t}var po=/^([^]*)\{(.*)\}([^]*)$/;function fo(t,e){var r;do{if(r=t.match(po)){var i=e[r[2]]||"";t=r[1]+i+r[3]}}while(r);return t}var go,yo=r(9975),mo=r(2706),vo={},_o=/font-family: ?([^;]*);/,xo=/("|')/g;function bo(t){if(!go){go={};for(var e=document.styleSheets,r=0,i=e.length;r<i;++r){var n=e[r];try{var o=n.rules||n.cssRules;if(o)for(var a=0,s=o.length;a<s;++a){var l=o[a];if(5==l.type){var u=l.cssText.match(_o);go[u[1].replace(xo,"")]=!0}}}catch(t){}}}return t in go}var wo={},Eo=yo.getNames();function To(t){var e=t.toString();if(e in wo)return t;for(var r=t.map((function(t){var e=Oe(t,1).split(" ");return[e.slice(3).join(" ").replace(/"/g,""),e[1]+e[0]]})),i=0,n=r.length;i<n;++i){var o=r[i],a=o[0];if(!bo(a)&&-1!==Eo.indexOf(a)){var s="https://fonts.googleapis.com/css?family="+a.replace(/ /g,"+")+":"+o[1];if(!document.querySelector('link[href="'+s+'"]')){var l=document.createElement("link");l.href=s,l.rel="stylesheet",document.head.appendChild(l)}}}return wo[e]=!0,t}var So=/^(.*)(\?.*)$/;function Co(t,e,r){var i=(t=function(t,e){return e&&0===t.indexOf(".")&&(t=e+t),t}(t,e)).match(So);return i?i[1]+r+(i.length>2?i[2]:""):t+r}function Oo(t,e,r,i,n){return new Promise((function(o,a){if("object"!=typeof e&&(e=JSON.parse(e)),8!=e.version)return a(new Error("glStyle version 8 required."));if(!(t instanceof xe.Z||t instanceof se))return a(new Error("Can only apply to VectorLayer or VectorTileLayer"));var s,l,u;function c(){u||e.sprite&&!s?u?(t.setStyle(u),o()):a(new Error("Something went wrong trying to apply style.")):(u=function(t,e,r,i,n,o,a){if(void 0===i&&(i=Vn),"string"==typeof e&&(e=JSON.parse(e)),8!=e.version)throw new Error("glStyle version 8 required.");var s,l;if(o)if("undefined"!=typeof Image){var u=new Image;u.crossOrigin="anonymous",u.onload=function(){s=u,l=[u.width,u.height],t.changed(),u.onload=null},u.src=o}else if("undefined"!=typeof WorkerGlobalScope&&self instanceof WorkerGlobalScope){var c=self;c.postMessage({action:"loadImage",src:o}),c.addEventListener("message",(function(t){"imageLoaded"===t.data.action&&t.data.src===o&&(s=t.data.image,l=[s.width,s.height])}))}for(var h,p=function(t){t=t.slice();const e=Object.create(null);for(let r=0;r<t.length;r++)e[t[r].id]=t[r];for(let r=0;r<t.length;r++)"ref"in t[r]&&(t[r]=jn(t[r],e[t[r].ref]));return t}(e.layers),d={},f=[],g={},y={},m={},v={},_=0,x=p.length;_<x;++_){var b=p[_],w=b.id;if("string"==typeof r&&b.source==r||-1!==r.indexOf(w)){var E=b["source-layer"];if(!h){h=b.source;var T=e.sources[h];if(!T)throw new Error('Source "'.concat(h,'" is not defined'));var S=T.type;if("vector"!==S&&"geojson"!==S)throw new Error('Source "'.concat(h,'" is not of type "vector" or "geojson", but "').concat(S,'"'))}var C=d[E];C||(C=[],d[E]=C),C.push({layer:b,index:_}),f.push(w)}}var O=new Te.Z,R=new we.Z,I=[],P=function(t,e){var r=t.getProperties(),o=d[r.layer];if(o){var u=i.indexOf(e);-1==u&&(u=function(t,e){for(var r=0,i=e.length;r<i;++r)if(e[r]<t&&r+1<i){var n=e[r]/e[r+1];return r+Math.log(e[r]/t)/Math.log(n)}return i-1}(e,i));for(var c=ao[t.getGeometry().getType()],h={properties:r,type:c},p=-1,f=function(i,d){var f=o[i],_=f.layer,x=_.id,b=_.layout||lo,w=_.paint||lo;if("none"===b.visibility||"minzoom"in _&&u<_.minzoom||"maxzoom"in _&&u>=_.maxzoom)return"continue";var E=_.filter;if(!E||function(t,e,r,i,n){return n||console.warn("No filterCache provided to evaluateFilter()"),t in n||(n[t]=Tn(e).filter),uo.zoom=i,n[t](uo,r)}(x,E,h,u,v)){var T=void 0,S=void 0,C=void 0,P=void 0,L=void 0,A=void 0,M=f.index;if(3==c&&("fill"==_.type||"fill-extrusion"==_.type))if(S=co(_,"paint",_.type+"-opacity",u,h,m),_.type+"-pattern"in w){var F=co(_,"paint",_.type+"-pattern",u,h,m);if(F){var Z="string"==typeof F?fo(F,r):F.toString();if(s&&n&&n[Z]){++p,(A=I[p])&&A.getFill()&&!A.getStroke()&&!A.getText()||(A=new Se.ZP({fill:new we.Z}),I[p]=A),C=A.getFill(),A.setZIndex(M);var k=y[dt=Z+"."+S];if(!k){var j=n[Z],D=Wn(j.width,j.height),N=D.getContext("2d");N.globalAlpha=S,N.drawImage(s,j.x,j.y,j.width,j.height,0,0,j.width,j.height),k=N.createPattern(D,"repeat"),y[dt]=k}C.setColor(k)}}}else T=ho(co(_,"paint",_.type+"-color",u,h,m),S),_.type+"-outline-color"in w&&(L=ho(co(_,"paint",_.type+"-outline-color",u,h,m),S)),L||(L=T),(T||L)&&(++p,(!(A=I[p])||T&&!A.getFill()||!T&&A.getFill()||L&&!A.getStroke()||!L&&A.getStroke()||A.getText())&&(A=new Se.ZP({fill:T?new we.Z:void 0,stroke:L?new Te.Z:void 0}),I[p]=A),T&&(C=A.getFill()).setColor(T),L&&((P=A.getStroke()).setColor(L),P.setWidth(.5)),A.setZIndex(M));if(1!=c&&"line"==_.type){T=!("line-pattern"in w)&&"line-color"in w?ho(co(_,"paint","line-color",u,h,m),co(_,"paint","line-opacity",u,h,m)):void 0;var G=co(_,"paint","line-width",u,h,m);T&&G>0&&(++p,(A=I[p])&&A.getStroke()&&!A.getFill()&&!A.getText()||(A=new Se.ZP({stroke:new Te.Z}),I[p]=A),(P=A.getStroke()).setLineCap(co(_,"layout","line-cap",u,h,m)),P.setLineJoin(co(_,"layout","line-join",u,h,m)),P.setMiterLimit(co(_,"layout","line-miter-limit",u,h,m)),P.setColor(T),P.setWidth(G),P.setLineDash(w["line-dasharray"]?co(_,"paint","line-dasharray",u,h,m).map((function(t){return t*G})):null),A.setZIndex(M))}var z=!1,U=null,B=0,q=void 0,V=void 0,W=void 0;if((1==c||2==c)&&"icon-image"in b){var X=co(_,"layout","icon-image",u,h,m);if(X){q="string"==typeof X?fo(X,r):X.toString();var Y=void 0;if(s&&n&&n[q]){var H=co(_,"layout","icon-rotation-alignment",u,h,m);if(2==c){var K=t.getGeometry();if(K.getFlatMidpoint||K.getFlatMidpoints){var $=K.getExtent();if(Math.sqrt(Math.max(Math.pow(($[2]-$[0])/e,2),Math.pow(($[3]-$[1])/e,2)))>150){var J="MultiLineString"===K.getType()?K.getFlatMidpoints():K.getFlatMidpoint();if(eo||(eo=new Ft("Point",to=[NaN,NaN],[],{},null)),Y=eo,to[0]=J[0],to[1]=J[1],"line"===(Lt=co(_,"layout","symbol-placement",u,h,m))&&"map"===H)for(var Q=K.getStride(),tt=K.getFlatCoordinates(),et=0,rt=tt.length-Q;et<rt;et+=Q){var it=tt[et],nt=tt[et+1],ot=tt[et+Q],at=tt[et+Q+1],st=Math.min(it,ot),lt=Math.min(nt,at),ut=Math.max(it,ot),ct=Math.max(nt,at);if(J[0]>=st&&J[0]<=ut&&J[1]>=lt&&J[1]<=ct){B=Math.atan2(nt-at,ot-it);break}}}}}if(2!==c||Y){var ht=co(_,"layout","icon-size",u,h,m),pt=void 0!==w["icon-color"]?co(_,"paint","icon-color",u,h,m):null;if(!pt||0!==pt.a){var dt=q+"."+ht;if(null!==pt&&(dt+="."+pt),!(V=g[dt])){var ft=n[q];V=new Ee.Z({color:pt?[255*pt.r,255*pt.g,255*pt.b,pt.a]:void 0,img:s,imgSize:l,size:[ft.width,ft.height],offset:[ft.x,ft.y],rotateWithView:"map"===H,scale:ht/ft.pixelRatio,displacement:"icon-offset"in b?co(_,"layout","icon-offset",u,h,m).map((function(t){return-t*ft.pixelRatio})):void 0}),g[dt]=V}}V&&(++p,(A=I[p])&&A.getImage()&&!A.getFill()&&!A.getStroke()||(A=new Se.ZP,I[p]=A),A.setGeometry(Y),V.setRotation(B+qn(co(_,"layout","icon-rotate",u,h,m))),V.setOpacity(co(_,"paint","icon-opacity",u,h,m)),V.setAnchor(so[co(_,"layout","icon-anchor",u,h,m)]),A.setImage(V),U=A.getText(),A.setText(void 0),A.setZIndex(M),z=!0,W=!1)}else W=!0}}}if(1==c&&"circle"===_.type){++p,(A=I[p])&&A.getImage()&&!A.getFill()&&!A.getStroke()||(A=new Se.ZP,I[p]=A);var gt="circle-radius"in w?co(_,"paint","circle-radius",u,h,m):5,yt=ho(co(_,"paint","circle-stroke-color",u,h,m),co(_,"paint","circle-stroke-opacity",u,h,m)),mt=ho(co(_,"paint","circle-color",u,h,m),co(_,"paint","circle-opacity",u,h,m)),vt=co(_,"paint","circle-stroke-width",u,h,m),_t=gt+"."+yt+"."+mt+"."+vt;(V=g[_t])||(V=new be.default({radius:gt,stroke:yt&&vt>0?new Te.Z({width:vt,color:yt}):void 0,fill:mt?new we.Z({color:mt}):void 0}),g[_t]=V),A.setImage(V),U=A.getText(),A.setText(void 0),A.setGeometry(void 0),A.setZIndex(M),z=!0}var xt,bt,wt,Et,Tt=void 0,St=void 0;if("text-field"in b){bt=Math.round(co(_,"layout","text-size",u,h,m));var Ct=co(_,"layout","text-font",u,h,m);xt=co(_,"layout","text-line-height",u,h,m),St=Oe(a?a(Ct):Ct,bt,xt),wt=co(_,"layout","text-letter-spacing",u,h,m),Et=co(_,"layout","text-max-width",u,h,m);var Ot=co(_,"layout","text-field",u,h,m);Tt="object"==typeof Ot&&Ot.sections?1===Ot.sections.length?Ot.toString():Ot.sections.reduce((function(t,e,r){var i=e.fontStack?e.fontStack.split(","):Ct,n=Oe(a?a(i):i,bt*(e.scale||1),xt),o=e.text;if("\n"===o)return t.push("\n",""),t;if(2!=c){for(var s=0,l=(o=Qn(o,n,Et,wt).split("\n")).length;s<l;++s)s>0&&t.push("\n",""),t.push(o[s],n);return t}t.push(Hn(o,wt),n)}),[]):fo(Ot,r).trim(),S=co(_,"paint","text-opacity",u,h,m)}if(Tt&&S&&!W){z||(++p,(A=I[p])&&A.getText()&&!A.getFill()&&!A.getStroke()||(A=new Se.ZP,I[p]=A),A.setImage(void 0),A.setGeometry(void 0)),A.getText()||A.setText(U||new Ce.Z({padding:[2,2,2,2]})),U=A.getText();var Rt=b["text-transform"];"uppercase"==Rt?Tt=Array.isArray(Tt)?Tt.map((function(t,e){return e%2?t:t.toUpperCase()})):Tt.toUpperCase():"lowercase"==Rt&&(Tt=Array.isArray(Tt)?Tt.map((function(t,e){return e%2?t:t.toLowerCase()})):Tt.toLowerCase());var It=Array.isArray(Tt)?Tt:2==c?Hn(Tt,wt):Qn(Tt,St,Et,wt);U.setText(It),U.setFont(St),U.setRotation(qn(co(_,"layout","text-rotate",u,h,m)));var Pt=co(_,"layout","text-anchor",u,h,m),Lt=z||1==c?"point":co(_,"layout","symbol-placement",u,h,m);U.setPlacement(Lt),U.setOverflow("point"===Lt);var At=co(_,"paint","text-halo-width",u,h,m),Mt=co(_,"layout","text-offset",u,h,m),Zt=co(_,"paint","text-translate",u,h,m),kt=0,jt=0;if("point"==Lt){var Dt="center";-1!==Pt.indexOf("left")?(Dt="left",jt=At):-1!==Pt.indexOf("right")&&(Dt="right",jt=-At),U.setTextAlign(Dt);var Nt=co(_,"layout","text-rotation-alignment",u,h,m);U.setRotateWithView("map"==Nt)}else U.setMaxAngle(qn(co(_,"layout","text-max-angle",u,h,m))*Tt.length/It.length),U.setTextAlign(),U.setRotateWithView(!1);var Gt="middle";0==Pt.indexOf("bottom")?(Gt="bottom",kt=-At-.5*(xt-1)*bt):0==Pt.indexOf("top")&&(Gt="top",kt=At+.5*(xt-1)*bt),U.setTextBaseline(Gt),U.setOffsetX(Mt[0]*bt+jt+Zt[0]),U.setOffsetY(Mt[1]*bt+kt+Zt[1]),R.setColor(ho(co(_,"paint","text-color",u,h,m),S)),U.setFill(R);var zt=ho(co(_,"paint","text-halo-color",u,h,m),S);if(zt){O.setColor(zt),At*=2;var Ut=.5*bt;O.setWidth(At<=Ut?At:Ut),U.setStroke(O)}else U.setStroke(void 0);var Bt=co(_,"layout","text-padding",u,h,m),qt=U.getPadding();Bt!==qt[0]&&(qt[0]=Bt,qt[1]=Bt,qt[2]=Bt,qt[3]=Bt),A.setZIndex(M)}}},_=0,x=o.length;_<x;++_)f(_);return p>-1?(I.length=p+1,I):void 0}};return t.setStyle(P),t.set("mapbox-source",h),t.set("mapbox-layers",f),P}(t,e,r,n,s,l,To),t.getStyle()?o():a(new Error("Nothing to show for source [".concat(r,"]"))))}if(e.sprite){var h=.5==(window.devicePixelRatio>=1.5?.5:1)?"@2x":"",p=Co(e.sprite,i,h+".json");fetch(p,{credentials:"same-origin"}).then((function(t){return t.ok||""===h?t:(p=Co(e.sprite,i,".json"),fetch(p,{credentials:"same-origin"}))})).then((function(t){if(t.ok)return t.json();a(new Error("Problem fetching sprite from ".concat(p,": ").concat(t.statusText)))})).then((function(t){if(void 0===t)return a(new Error("No sprites found."));s=t,l=Co(e.sprite,i,h+".png"),c()})).catch((function(t){a(new Error("Sprites cannot be loaded: ".concat(p,": ").concat(t.message)))}))}else c()}))}var Ro={};function Io(t,e){t=Bn({},t);var r=[e,JSON.stringify(t)].toString(),i=vo[r];return i||(i=new _e.Z({url:t.tiles?void 0:e,tileJSON:t.tiles?t:void 0}),vo[r]=i),new Promise((function(t){var r=i.on("change",(function(){var n=i.getState();if("ready"===n){var o=i.getTileJSON(),a=Array.isArray(o.tiles)?o.tiles:[o.tiles];if(e)for(var s=0,l=a.length;s<l;++s)a[s]=decodeURI(new URL(a[s],e).href);var u=i.getTileGrid(),c=function(t){var e=t.bounds;if(e){var r=(0,gt.fromLonLat)([e[0],e[1]]),i=(0,gt.fromLonLat)([e[2],e[3]]);return[r[0],r[1],i[0],i[1]]}}(o),h=o.minzoom||0,p=o.maxzoom||22,d=i.get("ol-source");void 0===d&&(d=new le.Z({attributions:i.getAttributions(),format:new zt,tileGrid:new ve.Z({origin:u.getOrigin(0),extent:c||u.getExtent(),minZoom:h,resolutions:Vn.slice(0,p+1),tileSize:512}),urls:a}),i.set("ol-source",d)),(0,mo.B)(r),t(d)}else"error"===n&&(i.set("ol-source",null),(0,mo.B)(r),t(void 0))}));"ready"===i.getState()&&i.changed()}))}new me;var Po=function(){var t=function(e,r){return t=Object.setPrototypeOf||{__proto__:[]}instanceof Array&&function(t,e){t.__proto__=e}||function(t,e){for(var r in e)Object.prototype.hasOwnProperty.call(e,r)&&(t[r]=e[r])},t(e,r)};return function(e,r){if("function"!=typeof r&&null!==r)throw new TypeError("Class extends value "+String(r)+" is not a constructor or null");function i(){this.constructor=e}t(e,r),e.prototype=null===r?Object.create(r):(i.prototype=r.prototype,new i)}}(),Lo="https://api.mapbox.com";function Ao(t){var e="mapbox://";return 0!==t.indexOf(e)?"":t.slice(e.length)}function Mo(t,e,r,i){var n=new URL(t,i),o=Ao(t);return o?"https://{a-d}.tiles.mapbox.com/v4/".concat(o,"/{z}/{x}/{y}.vector.pbf?access_token=").concat(e):e?(n.searchParams.set(r,e),decodeURI(n.href)):decodeURI(n.href)}var Fo=function(t){function e(e){var r=t.call(this,dt.Z.ERROR)||this;return r.error=e,r}return Po(e,t),e}(pt.ZP),Zo=function(t){function e(e){var r=this,i=!("declutter"in e)||e.declutter,n=new le.Z({state:Ut.Z.LOADING,format:new zt});return(r=t.call(this,{source:n,background:e.background,declutter:i,className:e.className,opacity:e.opacity,visible:e.visible,zIndex:e.zIndex,minResolution:e.minResolution,maxResolution:e.maxResolution,minZoom:e.minZoom,maxZoom:e.maxZoom,renderOrder:e.renderOrder,renderBuffer:e.renderBuffer,renderMode:e.renderMode,map:e.map,updateWhileAnimating:e.updateWhileAnimating,updateWhileInteracting:e.updateWhileInteracting,preload:e.preload,useInterimTilesOnError:e.useInterimTilesOnError,properties:e.properties})||this).setMaxResolutionFromTileGrid_=void 0===e.maxResolution&&void 0===e.minZoom,r.sourceId=e.source,r.layers=e.layers,e.accessToken?r.accessToken=e.accessToken:new URL(e.styleUrl,location.href).searchParams.forEach((function(t,e){r.accessToken=t,r.accessTokenParam_=e})),r.fetchStyle(e.styleUrl),r}return Po(e,t),e.prototype.fetchStyle=function(t){var e=this,r=function(t,e){var r=Ao(t);if(!r)return decodeURI(new URL(t,location.href).href);var i="styles/";if(0!==r.indexOf(i))throw new Error("unexpected style url: ".concat(t));var n=r.slice(i.length);return"".concat(Lo,"/styles/v1/").concat(n,"?&access_token=").concat(e)}(t,this.accessToken);fetch(r).then((function(t){if(!t.ok)throw new Error("unexpected response when fetching style: ".concat(t.status));return t.json()})).then((function(t){e.onStyleLoad(t,r.startsWith("data:")?location.href:r)})).catch((function(t){e.handleError(t)}))},e.prototype.onStyleLoad=function(t,e){var r,i,n=this;if(this.layers){for(var o={},a=0;a<t.layers.length;++a){var s=t.layers[a];s.source&&(o[s.id]=s.source)}var l=void 0;for(a=0;a<this.layers.length;++a){var u=o[this.layers[a]];if(!u)return void this.handleError(new Error("could not find source for ".concat(this.layers[a])));if(l){if(l!==u)return void this.handleError(new Error("layers can only use a single source, found ".concat(l," and ").concat(u)))}else l=u}r=l,i=this.layers}else r=this.sourceId,i=r;i||(r=Object.keys(t.sources)[0],i=r),t.sprite&&(t.sprite=function(t,e,r){var i=Ao(t);if(!i)return decodeURI(new URL(t,r).href);var n="sprites/";if(0!==i.indexOf(n))throw new Error("unexpected sprites url: ".concat(t));var o=i.slice(n.length);return"".concat(Lo,"/styles/v1/").concat(o,"/sprite?access_token=").concat(e)}(t.sprite,this.accessToken,e)),t.glyphs&&(t.glyphs=function(t,e,r){var i=Ao(t);if(!i)return decodeURI(new URL(t,r).href);var n="fonts/";if(0!==i.indexOf(n))throw new Error("unexpected fonts url: ".concat(t));var o=i.slice(n.length);return"".concat(Lo,"/fonts/v1/").concat(o,"/0-255.pbf?access_token=").concat(e)}(t.glyphs,this.accessToken,e));var c=t.sources[r];if("vector"===c.type){var h=this.getSource();c.url&&0===c.url.indexOf("mapbox://")?(h.setUrl(Mo(c.url,this.accessToken,this.accessTokenParam_,e)),Oo(this,t,i).then((function(){n.configureSource(h,t)})).catch((function(t){n.handleError(t)}))):(c.tiles&&(c.tiles=c.tiles.map((function(t){return Mo(t,n.accessToken,n.accessTokenParam_,e)}))),Io(c,c.url?Mo(c.url,this.accessToken,this.accessTokenParam_,e):void 0).then((function(e){Oo(n,t,i).then((function(){n.configureSource(e,t)})).catch((function(r){n.configureSource(e,t),n.handleError(r)}))})))}else this.handleError(new Error("only works for vector sources, found ".concat(c.type)))},e.prototype.configureSource=function(t,e){var r,i=this.getSource();if(t!==i&&(i.setAttributions(t.getAttributions()),i.setTileUrlFunction(t.getTileUrlFunction()),i.setTileLoadFunction(t.getTileLoadFunction()),i.tileGrid=t.tileGrid),void 0===this.getBackground()&&(r=this,e.layers.some((function(t){if("background"==t.type)return function(t,e){var r={id:e.id,type:e.type},i={};function n(n){var o=e.layout||{},a=e.paint||{};r.paint=a;var s,l,u="function"==typeof t.getSource?t.getSource().getTileGrid().getZForResolution(n):t.getView().getZoom(),c="function"==typeof t.getTargetElement?t.getTargetElement():void 0;if(void 0!==a["background-color"]&&(s=co(r,"paint","background-color",u,Ro,i),c&&(c.style.background=vr.parse(s).toString())),void 0!==a["background-opacity"]&&(l=co(r,"paint","background-opacity",u,Ro,i),c&&(c.style.opacity=l)),"none"!=o.visibility)return ho(s,l);c&&(c.style.backgroundColor="",c.style.opacity="")}if("function"==typeof t.getTargetElement)t.getTargetElement()&&n(),t.on(["change:resolution","change:target"],n);else{if("function"!=typeof t.setBackground)throw new Error("Unable to apply background.");t.setBackground(n)}}(r,t),!0}))),this.setMaxResolutionFromTileGrid_){var n=i.getTileGrid();this.setMaxResolution(n.getResolution(n.getMinZoom()))}i.setState(Ut.Z.READY)},e.prototype.handleError=function(t){this.dispatchEvent(new Fo(t)),this.getSource().setState(Ut.Z.ERROR)},e}(se);const ko=Zo;var jo=r(1666),Do=r(9186),No=r(5682),Go=r(8294),zo=r(553),Uo=r(2582),Bo=function(){var t=function(e,r){return t=Object.setPrototypeOf||{__proto__:[]}instanceof Array&&function(t,e){t.__proto__=e}||function(t,e){for(var r in e)Object.prototype.hasOwnProperty.call(e,r)&&(t[r]=e[r])},t(e,r)};return function(e,r){if("function"!=typeof r&&null!==r)throw new TypeError("Class extends value "+String(r)+" is not a constructor or null");function i(){this.constructor=e}t(e,r),e.prototype=null===r?Object.create(r):(i.prototype=r.prototype,new i)}}();const qo=function(t){function e(e){var r=t.call(this,e)||this;return r.vectorRenderer_=new No.Z(e),r.layerImageRatio_=e.getImageRatio(),r.coordinateToVectorPixelTransform_=(0,L.Ue)(),r.renderedPixelToCoordinateTransform_=null,r}return Bo(e,t),e.prototype.disposeInternal=function(){this.vectorRenderer_.dispose(),t.prototype.disposeInternal.call(this)},e.prototype.getFeatures=function(t){if(!this.vectorRenderer_)return new Promise((function(t){return t([])}));var e=(0,L.nn)(this.coordinateToVectorPixelTransform_,(0,L.nn)(this.renderedPixelToCoordinateTransform_,t.slice()));return this.vectorRenderer_.getFeatures(e)},e.prototype.handleFontsChanged=function(){this.vectorRenderer_.handleFontsChanged()},e.prototype.prepareFrame=function(t){var e=t.pixelRatio,r=t.viewState,i=r.resolution,n=t.viewHints,o=this.vectorRenderer_,a=t.extent;1!==this.layerImageRatio_&&(a=a.slice(0),(0,U.scaleFromCenter)(a,this.layerImageRatio_));var s=(0,U.getWidth)(a)/i,u=(0,U.getHeight)(a)/i;if(!n[l.Z.ANIMATING]&&!n[l.Z.INTERACTING]&&!(0,U.isEmpty)(a)){o.useContainer(null,null,1);var h=o.context,p=(0,c.f0)({},t,{declutterTree:new Uo(9),extent:a,size:[s,u],viewState:(0,c.f0)({},t.viewState,{rotation:0})}),d=!0,f=new Go.Z(a,i,e,h.canvas,(function(t){o.prepareFrame(p)&&o.replayGroupChanged&&(o.clipping=!1,o.renderFrame(p,null)&&(o.renderDeclutter(p),d=!1),t())}));f.addEventListener(dt.Z.CHANGE,function(){if(f.getState()===zo.Z.LOADED){this.image_=d?null:f;var t=f.getResolution(),i=f.getPixelRatio(),n=t*e/i;this.renderedResolution=n,this.coordinateToVectorPixelTransform_=(0,L.qC)(this.coordinateToVectorPixelTransform_,s/2,u/2,1/n,-1/n,0,-r.center[0],-r.center[1])}}.bind(this)),f.load()}return this.image_&&(this.renderedPixelToCoordinateTransform_=t.pixelToCoordinateTransform.slice()),!!this.image_},e.prototype.preRender=function(){},e.prototype.postRender=function(){},e.prototype.renderDeclutter=function(){},e.prototype.forEachFeatureAtCoordinate=function(e,r,i,n,o){return this.vectorRenderer_?this.vectorRenderer_.forEachFeatureAtCoordinate(e,r,i,n,o):t.prototype.forEachFeatureAtCoordinate.call(this,e,r,i,n,o)},e}(Do.Z);var Vo=function(){var t=function(e,r){return t=Object.setPrototypeOf||{__proto__:[]}instanceof Array&&function(t,e){t.__proto__=e}||function(t,e){for(var r in e)Object.prototype.hasOwnProperty.call(e,r)&&(t[r]=e[r])},t(e,r)};return function(e,r){if("function"!=typeof r&&null!==r)throw new TypeError("Class extends value "+String(r)+" is not a constructor or null");function i(){this.constructor=e}t(e,r),e.prototype=null===r?Object.create(r):(i.prototype=r.prototype,new i)}}();const Wo=function(t){function e(e){var r=this,i=e||{},n=(0,c.f0)({},i);return delete n.imageRatio,(r=t.call(this,n)||this).imageRatio_=void 0!==i.imageRatio?i.imageRatio:1,r}return Vo(e,t),e.prototype.getImageRatio=function(){return this.imageRatio_},e.prototype.createRenderer=function(){return new qo(this)},e}(o.Z),Xo=function(){function t(t,e){this.name=t,this.data=e,this.texture_=null}return t.prototype.getTexture=function(t){if(!this.texture_){var e=t.createTexture();t.bindTexture(t.TEXTURE_2D,e),t.texParameteri(t.TEXTURE_2D,t.TEXTURE_WRAP_S,t.CLAMP_TO_EDGE),t.texParameteri(t.TEXTURE_2D,t.TEXTURE_WRAP_T,t.CLAMP_TO_EDGE),t.texParameteri(t.TEXTURE_2D,t.TEXTURE_MIN_FILTER,t.NEAREST),t.texParameteri(t.TEXTURE_2D,t.TEXTURE_MAG_FILTER,t.NEAREST),t.texImage2D(t.TEXTURE_2D,0,t.RGBA,this.data.length/4,1,0,t.RGBA,t.UNSIGNED_BYTE,this.data),this.texture_=e}return this.texture_},t}();var Yo=r(6131),Ho=r(2519),Ko=r(349),$o=r(208),Jo=r(825),Qo=r(9494),ta=r(1481),ea=function(){var t=function(e,r){return t=Object.setPrototypeOf||{__proto__:[]}instanceof Array&&function(t,e){t.__proto__=e}||function(t,e){for(var r in e)Object.prototype.hasOwnProperty.call(e,r)&&(t[r]=e[r])},t(e,r)};return function(e,r){if("function"!=typeof r&&null!==r)throw new TypeError("Class extends value "+String(r)+" is not a constructor or null");function i(){this.constructor=e}t(e,r),e.prototype=null===r?Object.create(r):(i.prototype=r.prototype,new i)}}();function ra(t,e,r){var i=r?t.LINEAR:t.NEAREST;t.bindTexture(t.TEXTURE_2D,e),t.texParameteri(t.TEXTURE_2D,t.TEXTURE_WRAP_S,t.CLAMP_TO_EDGE),t.texParameteri(t.TEXTURE_2D,t.TEXTURE_WRAP_T,t.CLAMP_TO_EDGE),t.texParameteri(t.TEXTURE_2D,t.TEXTURE_MIN_FILTER,i),t.texParameteri(t.TEXTURE_2D,t.TEXTURE_MAG_FILTER,i)}function ia(t,e,r,i,n,o){var a,s,l=t.getGL();r instanceof Float32Array?(a=l.FLOAT,t.getExtension("OES_texture_float"),s=null!==t.getExtension("OES_texture_float_linear")):(a=l.UNSIGNED_BYTE,s=!0),ra(l,e,o&&s);var u,c=r.byteLength/i[1],h=1;switch(c%8==0?h=8:c%4==0?h=4:c%2==0&&(h=2),n){case 1:u=l.LUMINANCE;break;case 2:u=l.LUMINANCE_ALPHA;break;case 3:u=l.RGB;break;case 4:u=l.RGBA;break;default:throw new Error("Unsupported number of bands: ".concat(n))}var p=l.getParameter(l.UNPACK_ALIGNMENT);l.pixelStorei(l.UNPACK_ALIGNMENT,h),l.texImage2D(l.TEXTURE_2D,0,u,i[0],i[1],0,u,a,r),l.pixelStorei(l.UNPACK_ALIGNMENT,p)}var na=null,oa=function(t){function e(e){var r=t.call(this)||this;r.tile,r.textures=[],r.handleTileChange_=r.handleTileChange_.bind(r),r.size=(0,Jt.Pq)(e.grid.getTileSize(e.tile.tileCoord[0])),r.tilePixelRatio_=e.tilePixelRatio||1,r.gutter_=e.gutter||0,r.bandCount=NaN,r.helper_=e.helper;var i=new x(h,d);return i.fromArray([0,1,1,1,1,0,0,0]),r.helper_.flushBufferData(i),r.coords=i,r.setTile(e.tile),r}return ea(e,t),e.prototype.setTile=function(t){if(t!==this.tile)if(this.tile&&this.tile.removeEventListener(dt.Z.CHANGE,this.handleTileChange_),this.tile=t,this.textures.length=0,this.loaded=t.getState()===Xt.Z.LOADED,this.loaded)this.uploadTile_();else{if(t instanceof Jo.Z){var e=t.getImage();e instanceof Image&&!e.crossOrigin&&(e.crossOrigin="anonymous")}t.addEventListener(dt.Z.CHANGE,this.handleTileChange_)}},e.prototype.uploadTile_=function(){var t=this.helper_,e=t.getGL(),r=this.tile;if(r instanceof Jo.Z||r instanceof Qo.Z){var i=r.getImage();if(0!==this.gutter_){var n=this.tilePixelRatio_*this.gutter_,o=Math.round(i.width-2*n),a=Math.round(i.height-2*n),s=(0,it.E4)(o,a);r.interpolate||(0,c.f0)(s,ta.$),s.drawImage(i,n,n,o,a,0,0,o,a),i=s.canvas}var l=e.createTexture();return this.textures.push(l),this.bandCount=4,void function(t,e,r,i){ra(t,e,i),t.texImage2D(t.TEXTURE_2D,0,t.RGBA,t.RGBA,t.UNSIGNED_BYTE,r)}(e,l,i,r.interpolate)}var u=[this.size[0]*this.tilePixelRatio_,this.size[1]*this.tilePixelRatio_],h=r.getData(),p=h instanceof Float32Array,d=u[0]*u[1],f=p?Float32Array:Uint8Array,g=f.BYTES_PER_ELEMENT,y=h.byteLength/u[1];this.bandCount=Math.floor(y/g/u[0]);var m=Math.ceil(this.bandCount/4);if(1===m)return l=e.createTexture(),this.textures.push(l),void ia(t,l,h,u,this.bandCount,r.interpolate);for(var v=new Array(m),_=0;_<m;++_){l=e.createTexture(),this.textures.push(l);var x=_<m-1?4:this.bandCount%4;v[_]=new f(d*x)}for(var b=0,w=0,E=u[0]*this.bandCount,T=0;T<u[1];++T){for(var S=0;S<E;++S){var C=h[w+S],O=Math.floor(b/this.bandCount),R=S%this.bandCount;(I=v[_=Math.floor(R/4)])[O*(x=I.length/d)+R%4]=C,++b}w+=y/g}for(_=0;_<m;++_){var I;ia(t,l=this.textures[_],I=v[_],u,x=I.length/d,r.interpolate)}},e.prototype.handleTileChange_=function(){this.tile.getState()===Xt.Z.LOADED&&(this.loaded=!0,this.uploadTile_(),this.dispatchEvent(dt.Z.CHANGE))},e.prototype.disposeInternal=function(){var t=this.helper_.getGL();this.helper_.deleteBuffer(this.coords);for(var e=0;e<this.textures.length;++e)t.deleteTexture(this.textures[e]);this.tile.removeEventListener(dt.Z.CHANGE,this.handleTileChange_)},e.prototype.getPixelData=function(t,e){if(!this.loaded)return null;if(t=Math.floor(this.tilePixelRatio_*t),e=Math.floor(this.tilePixelRatio_*e),this.tile instanceof Ko.Z){var r=this.tile.getData(),i=Math.floor(this.tilePixelRatio_*this.size[0]);if(r instanceof DataView){var n=r.byteLength/(this.size[0]*this.size[1]),o=e*i*n+t*n,a=r.buffer.slice(o,o+n);return new DataView(a)}var s=e*i*this.bandCount+t*this.bandCount;return r.slice(s,s+this.bandCount)}var l;na||function(){var t=document.createElement("canvas");t.width=1,t.height=1,na=t.getContext("2d")}(),na.clearRect(0,0,1,1);var u=this.tile.getImage();try{na.drawImage(u,t,e,1,1,0,0,1,1),l=na.getImageData(0,0,1,1).data}catch(t){return null}return l},e}($o.Z);const aa=oa;var sa=r(8634),la=function(){var t=function(e,r){return t=Object.setPrototypeOf||{__proto__:[]}instanceof Array&&function(t,e){t.__proto__=e}||function(t,e){for(var r in e)Object.prototype.hasOwnProperty.call(e,r)&&(t[r]=e[r])},t(e,r)};return function(e,r){if("function"!=typeof r&&null!==r)throw new TypeError("Class extends value "+String(r)+" is not a constructor or null");function i(){this.constructor=e}t(e,r),e.prototype=null===r?Object.create(r):(i.prototype=r.prototype,new i)}}(),ua="u_tileTextures",ca="u_tileTransform",ha="u_transitionAlpha",pa="u_depth",da="u_texturePixelWidth",fa="u_texturePixelHeight",ga="u_textureResolution",ya="u_textureOriginX",ma="u_textureOriginY",va="u_renderExtent",_a="u_resolution",xa="u_zoom",ba="a_textureCoord",wa=[{name:ba,size:2,type:Z.FLOAT}],Ea={};function Ta(t){return 2*(1-1/(t+1))-1}function Sa(t,e,r){r in t||(t[r]=[]),t[r].push(e)}function Ca(t,e){var r=t.layerStatesArray[t.layerIndex];r.extent&&(e=(0,U.getIntersection)(e,(0,gt.fromUserExtent)(r.extent,t.viewState.projection)));var i=r.layer.getRenderSource();if(!i.getWrapX()){var n=i.getTileGridForProjection(t.viewState.projection).getExtent();n&&(e=(0,U.getIntersection)(e,n))}return e}function Oa(t,e){return"".concat(t.getKey(),",").concat((0,sa.km)(e))}var Ra=function(t){function e(e,r){var i=t.call(this,e,{uniforms:r.uniforms})||this;i.renderComplete=!1,i.tileTransform_=(0,L.Ue)(),i.tempMat4_=[1,0,0,0,0,1,0,0,0,0,1,0,0,0,0,1],i.tempTileRange_=new Ho.Z(0,0,0,0),i.tempTileCoord_=(0,sa.T9)(0,0,0),i.tempSize_=[0,0],i.program_,i.vertexShader_=r.vertexShader,i.fragmentShader_=r.fragmentShader,i.indices_=new x(p,d),i.indices_.fromArray([0,1,3,1,2,3]);var n=void 0!==r.cacheSize?r.cacheSize:512;return i.tileTextureCache_=new Yo.Z(n),i.paletteTextures_=r.paletteTextures||[],i.frameState_=null,i}return la(e,t),e.prototype.reset=function(e){t.prototype.reset.call(this,{uniforms:e.uniforms}),this.vertexShader_=e.vertexShader,this.fragmentShader_=e.fragmentShader,this.paletteTextures_=e.paletteTextures||[],this.helper&&(this.program_=this.helper.getProgram(this.fragmentShader_,this.vertexShader_))},e.prototype.afterHelperCreated=function(){this.program_=this.helper.getProgram(this.fragmentShader_,this.vertexShader_),this.helper.flushBufferData(this.indices_)},e.prototype.isDrawableTile_=function(t){var e=this.getLayer(),r=t.getState(),i=e.getUseInterimTilesOnError();return r==Xt.Z.LOADED||r==Xt.Z.EMPTY||r==Xt.Z.ERROR&&!i},e.prototype.prepareFrameInternal=function(t){var e=this.getLayer().getRenderSource();return!!e&&!(0,U.isEmpty)(Ca(t,t.extent))&&e.getState()===Ut.Z.READY},e.prototype.enqueueTiles=function(t,e,r,i){var n=t.viewState,o=this.getLayer(),a=o.getRenderSource(),s=a.getTileGridForProjection(n.projection),l=a.getTilePixelRatio(t.pixelRatio),u=a.getGutterForProjection(n.projection),c=(0,R.sq)(a);c in t.wantedTiles||(t.wantedTiles[c]={});for(var h=t.wantedTiles[c],p=this.tileTextureCache_,d=Math.max(r-o.getPreload(),s.getMinZoom(),o.getMinZoom()),f=r;f>=d;--f)for(var g=s.getTileRangeForExtentAndZ(e,f,this.tempTileRange_),y=s.getResolution(f),m=g.minX;m<=g.maxX;++m)for(var v=g.minY;v<=g.maxY;++v){var _=(0,sa.T9)(f,m,v,this.tempTileCoord_),x=Oa(a,_),b=void 0,w=void 0;if(p.containsKey(x)&&(w=(b=p.get(x)).tile),!b||b.tile.key!==a.getKey())if(w=a.getTile(f,m,v,t.pixelRatio,n.projection),b)if(this.isDrawableTile_(w))b.setTile(w);else{var E=w.getInterimTile();b.setTile(E)}else b=new aa({tile:w,grid:s,helper:this.helper,tilePixelRatio:l,gutter:u}),p.set(x,b);Sa(i,b,f);var T=w.getKey();h[T]=!0,w.getState()===Xt.Z.IDLE&&(t.tileQueue.isKeyQueued(T)||t.tileQueue.enqueue([w,c,s.getTileCoordCenter(_),y]))}},e.prototype.renderFrame=function(t){this.frameState_=t,this.renderComplete=!0;var e=this.helper.getGL();this.preRender(e,t);var r=t.viewState,i=this.getLayer().getRenderSource(),n=i.getTileGridForProjection(r.projection),o=Ca(t,t.extent),a=n.getZForResolution(r.resolution,i.zDirection),s={};if(t.nextExtent){var l=n.getZForResolution(r.nextResolution,i.zDirection),u=Ca(t,t.nextExtent);this.enqueueTiles(t,u,l,s)}this.enqueueTiles(t,o,a,s);for(var c={},h=(0,R.sq)(this),p=t.time,d=!1,f=s[a],g=0,y=f.length;g<y;++g){var m=(j=($=f[g]).tile).tileCoord;if($.loaded){if(1===(D=j.getAlpha(h,p))){j.endTransition(h);continue}d=!0,c[N=(0,sa.km)(m)]=D}if(this.renderComplete=!1,!this.findAltTiles_(n,m,a+1,s))for(var v=n.getMinZoom(),_=a-1;_>=v&&!this.findAltTiles_(n,m,_,s);--_);}this.helper.useProgram(this.program_),this.helper.prepareDraw(t,!d);for(var x=Object.keys(s).map(Number).sort(Y.kK),b=r.center[0],w=r.center[1],E=0,T=x.length;E<T;++E){var S=x[E],C=n.getResolution(S),O=(0,Jt.Pq)(n.getTileSize(S),this.tempSize_),I=n.getOrigin(S),P=(b-I[0])/(O[0]*C),M=(I[1]-w)/(O[1]*C),F=r.resolution/C,Z=Ta(S),k=s[S];for(g=0,y=k.length;g<y;++g)if(($=k[g]).loaded){m=(j=$.tile).tileCoord;var j,D,N=(0,sa.km)(m),G=m[1],z=m[2];(0,L.qC)(this.tileTransform_,0,0,2/(t.size[0]*F/O[0]),-2/(t.size[1]*F/O[1]),r.rotation,-(P-G),-(M-z)),this.helper.setUniformMatrixValue(ca,A(this.tempMat4_,this.tileTransform_)),this.helper.bindBuffer($.coords),this.helper.bindBuffer(this.indices_),this.helper.enableAttributes(wa);for(var U=0;U<$.textures.length;){var B="TEXTURE"+U,q="".concat(ua,"[").concat(U,"]");e.activeTexture(e[B]),e.bindTexture(e.TEXTURE_2D,$.textures[U]),e.uniform1i(this.helper.getUniformLocation(q),U),++U}for(var V=0;V<this.paletteTextures_.length;++V){var W=this.paletteTextures_[V];e.activeTexture(e["TEXTURE"+U]);var X=W.getTexture(e);e.bindTexture(e.TEXTURE_2D,X),e.uniform1i(this.helper.getUniformLocation(W.name),U),++U}(D=N in c?c[N]:1)<1&&(t.animate=!0),this.helper.setUniformFloatValue(ha,D),this.helper.setUniformFloatValue(pa,Z),this.helper.setUniformFloatValue(da,O[0]),this.helper.setUniformFloatValue(fa,O[1]),this.helper.setUniformFloatValue(ga,C),this.helper.setUniformFloatValue(ya,I[0]+G*O[0]*C),this.helper.setUniformFloatValue(ma,I[1]-z*O[1]*C),this.helper.setUniformFloatVec4(va,o),this.helper.setUniformFloatValue(_a,r.resolution),this.helper.setUniformFloatValue(xa,r.zoom),this.helper.drawElements(0,this.indices_.getSize())}}this.helper.finalizeDraw(t,this.dispatchPreComposeEvent,this.dispatchPostComposeEvent);for(var H=this.helper.getCanvas(),K=this.tileTextureCache_;K.canExpireCache();){var $;($=K.pop()).dispose()}return t.postRenderFunctions.push((function(t,e){i.expireCache(e.viewState.projection,Ea)})),this.postRender(e,t),H},e.prototype.getData=function(t){if(!this.helper.getGL())return null;var e=this.frameState_;if(!e)return null;var r=this.getLayer(),i=(0,L.nn)(e.pixelToCoordinateTransform,t.slice()),n=e.viewState,o=r.getExtent();if(o&&!(0,U.containsCoordinate)((0,gt.fromUserExtent)(o,n.projection),i))return null;var a=r.getRenderSource(),s=a.getTileGridForProjection(n.projection);if(!a.getWrapX()){var l=s.getExtent();if(l&&!(0,U.containsCoordinate)(l,i))return null}for(var u=this.tileTextureCache_,c=s.getZForResolution(n.resolution);c>=s.getMinZoom();--c){var h=s.getTileCoordForCoordAndZ(i,c),p=Oa(a,h);if(u.containsKey(p)){var d=u.get(p);if(d.loaded){var f=s.getOrigin(c),g=(0,Jt.Pq)(s.getTileSize(c)),y=s.getResolution(c),m=(i[0]-f[0])/y-h[1]*g[0],v=(f[1]-i[1])/y-h[2]*g[1];return d.getPixelData(m,v)}}}return null},e.prototype.findAltTiles_=function(t,e,r,i){var n=t.getTileRangeForTileCoordAndZ(e,r,this.tempTileRange_);if(!n)return!1;for(var o=!0,a=this.tileTextureCache_,s=this.getLayer().getRenderSource(),l=n.minX;l<=n.maxX;++l)for(var u=n.minY;u<=n.maxY;++u){var c=Oa(s,[r,l,u]),h=!1;if(a.containsKey(c)){var p=a.get(c);p.loaded&&(Sa(i,p,r),h=!0)}h||(o=!1)}return o},e.prototype.removeHelper=function(){if(this.helper){var e=this.tileTextureCache_;e.forEach((function(t){return t.dispose()})),e.clear()}t.prototype.removeHelper.call(this)},e.prototype.disposeInternal=function(){var e=this.helper;e&&(e.getGL().deleteProgram(this.program_),delete this.program_,e.deleteBuffer(this.indices_)),t.prototype.disposeInternal.call(this),delete this.indices_,delete this.tileTextureCache_,delete this.frameState_},e}(X);const Ia=Ra;var Pa=r(9706),La=16,Aa=31,Ma={};function Fa(t){if("number"==typeof t)return 1;if("boolean"==typeof t)return 8;if("string"==typeof t)return(0,Pa.e1)(t)?6:2;if(!Array.isArray(t))throw new Error("Unhandled value type: ".concat(JSON.stringify(t)));var e=t;if(e.every((function(t){return"number"==typeof t})))return 3===e.length||4===e.length?20:La;if("string"!=typeof e[0])throw new Error("Expected an expression operator but received: ".concat(JSON.stringify(e)));var r=Ma[e[0]];if(void 0===r)throw new Error("Unrecognized expression operator: ".concat(JSON.stringify(e)));return r.getReturnType(e.slice(1))}function Za(t){var e=t.toString();return-1===e.indexOf(".")?e+".0":e}function ka(t){if(t.length<2||t.length>4)throw new Error("`formatArray` can only output `vec2`, `vec3` or `vec4` arrays.");return"vec".concat(t.length,"(").concat(t.map(Za).join(", "),")")}function ja(t,e){return void 0===t.stringLiteralsMap[e]&&(t.stringLiteralsMap[e]=Object.keys(t.stringLiteralsMap).length),t.stringLiteralsMap[e]}function Da(t,e,r){if(Array.isArray(e)&&"string"==typeof e[0]){var i=Ma[e[0]];if(void 0===i)throw new Error("Unrecognized expression operator: ".concat(JSON.stringify(e)));return i.toGlsl(t,e.slice(1),r)}var n=Fa(e);if((1&n)>0)return Za(e);if((8&n)>0)return e.toString();if((2&n)>0&&(void 0===r||2==r))return function(t,e){return Za(ja(t,e))}(t,e.toString());if((4&n)>0&&(void 0===r||4==r))return function(t){var e=(0,Pa._2)(t).slice();return e.length<4&&e.push(1),ka(e.map((function(t,e){return e<3?t/255:t})))}(e);if((n&La)>0)return ka(e);throw new Error("Unexpected expression ".concat(e," (expected type ").concat(r,")"))}function Na(t){if(!(1&Fa(t)))throw new Error("A numeric value was expected, got ".concat(JSON.stringify(t)," instead"))}function Ga(t){for(var e=0;e<t.length;e++)Na(t[e])}function za(t){if(!(2&Fa(t)))throw new Error("A string value was expected, got ".concat(JSON.stringify(t)," instead"))}function Ua(t){if(!(8&Fa(t)))throw new Error("A boolean value was expected, got ".concat(JSON.stringify(t)," instead"))}function Ba(t,e){if(t.length!==e)throw new Error("Exactly ".concat(e," arguments were expected, got ").concat(t.length," instead"))}function qa(t,e){if(t.length<e)throw new Error("At least ".concat(e," arguments were expected, got ").concat(t.length," instead"))}function Va(t,e){if(t.length>e)throw new Error("At most ".concat(e," arguments were expected, got ").concat(t.length," instead"))}function Wa(t){if(t.length%2!=0)throw new Error("An even amount of arguments was expected, got ".concat(t," instead"))}function Xa(t,e){if(r=e,(0,rt.k3)(r)%1!=0)throw new Error("Could not infer only one type from the following expression: ".concat(JSON.stringify(t)));var r}function Ya(t){return"u_var_"+t}Ma.get={getReturnType:function(t){return Aa},toGlsl:function(t,e){Ba(e,1),za(e[0]);var r=e[0].toString();return-1===t.attributes.indexOf(r)&&t.attributes.push(r),(t.inFragmentShader?"v_":"a_")+r}},Ma.var={getReturnType:function(t){return Aa},toGlsl:function(t,e){Ba(e,1),za(e[0]);var r=e[0].toString();return-1===t.variables.indexOf(r)&&t.variables.push(r),Ya(r)}};var Ha="u_paletteTextures";Ma.palette={getReturnType:function(t){return 4},toGlsl:function(t,e){Ba(e,2),Na(e[0]);var r=Da(t,e[0]),i=e[1];if(!Array.isArray(i))throw new Error("The second argument of palette must be an array");for(var n=i.length,o=new Uint8Array(4*n),a=0;a<n;a++){var s=i[a],l=void 0;if("string"==typeof s)l=(0,Pa.mL)(s);else{if(!Array.isArray(s))throw new Error("The second argument of palette must be an array of strings or colors");var u=s.length;if(4===u)l=s;else{if(3!==u)throw new Error("Expected palette color to have 3 or 4 values, got ".concat(u));l=[s[0],s[1],s[2],1]}}var c=4*a;o[c]=l[0],o[c+1]=l[1],o[c+2]=l[2],o[c+3]=255*l[3]}t.paletteTextures||(t.paletteTextures=[]);var h="".concat(Ha,"[").concat(t.paletteTextures.length,"]"),p=new Xo(h,o);return t.paletteTextures.push(p),"texture2D(".concat(h,", vec2((").concat(r," + 0.5) / ").concat(n,".0, 0.5))")}};var Ka="getBandValue";function $a(t){return{getReturnType:function(t){return 8},toGlsl:function(e,r){Ba(r,2);for(var i=Aa,n=0;n<r.length;n++)i&=Fa(r[n]);if(0===i)throw new Error("All arguments should be of compatible type, got ".concat(JSON.stringify(r)," instead"));return i&=-5,"(".concat(Da(e,r[0],i)," ").concat(t," ").concat(Da(e,r[1],i),")")}}}function Ja(t){return{getReturnType:function(t){return 8},toGlsl:function(e,r){qa(r,2);for(var i=0;i<r.length;i++)Ua(r[i]);var n="";return n=r.map((function(t){return Da(e,t)})).join(" ".concat(t," ")),"(".concat(n,")")}}}Ma.band={getReturnType:function(t){return 1},toGlsl:function(t,e){qa(e,1),Va(e,3);var r=e[0];if(!(Ka in t.functions)){for(var i="",n=t.bandCount||1,o=0;o<n;o++){var a=Math.floor(o/4),s=o%4;s===n-1&&1===s&&(s=3);var l="".concat(ua,"[").concat(a,"]");i+="\n          if (band == ".concat(o+1,".0) {\n            return texture2D(").concat(l,", v_textureCoord + vec2(dx, dy))[").concat(s,"];\n          }\n        ")}t.functions.getBandValue="\n        float getBandValue(float band, float xOffset, float yOffset) {\n          float dx = xOffset / ".concat(da,";\n          float dy = yOffset / ").concat(fa,";\n          ").concat(i,"\n        }\n      ")}var u=Da(t,r),c=Da(t,e[1]||0),h=Da(t,e[2]||0);return"".concat(Ka,"(").concat(u,", ").concat(c,", ").concat(h,")")}},Ma.time={getReturnType:function(t){return 1},toGlsl:function(t,e){return Ba(e,0),"u_time"}},Ma.zoom={getReturnType:function(t){return 1},toGlsl:function(t,e){return Ba(e,0),"u_zoom"}},Ma.resolution={getReturnType:function(t){return 1},toGlsl:function(t,e){return Ba(e,0),"u_resolution"}},Ma["*"]={getReturnType:function(t){return 1},toGlsl:function(t,e){return Ba(e,2),Ga(e),"(".concat(Da(t,e[0])," * ").concat(Da(t,e[1]),")")}},Ma["/"]={getReturnType:function(t){return 1},toGlsl:function(t,e){return Ba(e,2),Ga(e),"(".concat(Da(t,e[0])," / ").concat(Da(t,e[1]),")")}},Ma["+"]={getReturnType:function(t){return 1},toGlsl:function(t,e){return Ba(e,2),Ga(e),"(".concat(Da(t,e[0])," + ").concat(Da(t,e[1]),")")}},Ma["-"]={getReturnType:function(t){return 1},toGlsl:function(t,e){return Ba(e,2),Ga(e),"(".concat(Da(t,e[0])," - ").concat(Da(t,e[1]),")")}},Ma.clamp={getReturnType:function(t){return 1},toGlsl:function(t,e){Ba(e,3),Ga(e);var r=Da(t,e[1]),i=Da(t,e[2]);return"clamp(".concat(Da(t,e[0]),", ").concat(r,", ").concat(i,")")}},Ma["%"]={getReturnType:function(t){return 1},toGlsl:function(t,e){return Ba(e,2),Ga(e),"mod(".concat(Da(t,e[0]),", ").concat(Da(t,e[1]),")")}},Ma["^"]={getReturnType:function(t){return 1},toGlsl:function(t,e){return Ba(e,2),Ga(e),"pow(".concat(Da(t,e[0]),", ").concat(Da(t,e[1]),")")}},Ma.abs={getReturnType:function(t){return 1},toGlsl:function(t,e){return Ba(e,1),Ga(e),"abs(".concat(Da(t,e[0]),")")}},Ma.floor={getReturnType:function(t){return 1},toGlsl:function(t,e){return Ba(e,1),Ga(e),"floor(".concat(Da(t,e[0]),")")}},Ma.round={getReturnType:function(t){return 1},toGlsl:function(t,e){return Ba(e,1),Ga(e),"floor(".concat(Da(t,e[0])," + 0.5)")}},Ma.ceil={getReturnType:function(t){return 1},toGlsl:function(t,e){return Ba(e,1),Ga(e),"ceil(".concat(Da(t,e[0]),")")}},Ma.sin={getReturnType:function(t){return 1},toGlsl:function(t,e){return Ba(e,1),Ga(e),"sin(".concat(Da(t,e[0]),")")}},Ma.cos={getReturnType:function(t){return 1},toGlsl:function(t,e){return Ba(e,1),Ga(e),"cos(".concat(Da(t,e[0]),")")}},Ma.atan={getReturnType:function(t){return 1},toGlsl:function(t,e){return qa(e,1),Va(e,2),Ga(e),2===e.length?"atan(".concat(Da(t,e[0]),", ").concat(Da(t,e[1]),")"):"atan(".concat(Da(t,e[0]),")")}},Ma[">"]={getReturnType:function(t){return 8},toGlsl:function(t,e){return Ba(e,2),Ga(e),"(".concat(Da(t,e[0])," > ").concat(Da(t,e[1]),")")}},Ma[">="]={getReturnType:function(t){return 8},toGlsl:function(t,e){return Ba(e,2),Ga(e),"(".concat(Da(t,e[0])," >= ").concat(Da(t,e[1]),")")}},Ma["<"]={getReturnType:function(t){return 8},toGlsl:function(t,e){return Ba(e,2),Ga(e),"(".concat(Da(t,e[0])," < ").concat(Da(t,e[1]),")")}},Ma["<="]={getReturnType:function(t){return 8},toGlsl:function(t,e){return Ba(e,2),Ga(e),"(".concat(Da(t,e[0])," <= ").concat(Da(t,e[1]),")")}},Ma["=="]=$a("=="),Ma["!="]=$a("!="),Ma["!"]={getReturnType:function(t){return 8},toGlsl:function(t,e){return Ba(e,1),Ua(e[0]),"(!".concat(Da(t,e[0]),")")}},Ma.all=Ja("&&"),Ma.any=Ja("||"),Ma.between={getReturnType:function(t){return 8},toGlsl:function(t,e){Ba(e,3),Ga(e);var r=Da(t,e[1]),i=Da(t,e[2]),n=Da(t,e[0]);return"(".concat(n," >= ").concat(r," && ").concat(n," <= ").concat(i,")")}},Ma.array={getReturnType:function(t){return La},toGlsl:function(t,e){qa(e,2),Va(e,4),Ga(e);var r=e.map((function(e){return Da(t,e,1)}));return"vec".concat(e.length,"(").concat(r.join(", "),")")}},Ma.color={getReturnType:function(t){return 4},toGlsl:function(t,e){qa(e,3),Va(e,4),Ga(e);var r=e;3===e.length&&r.push(1);var i=e.map((function(e,r){return Da(t,e,1)+(r<3?" / 255.0":"")}));return"vec".concat(e.length,"(").concat(i.join(", "),")")}},Ma.interpolate={getReturnType:function(t){for(var e=5,r=3;r<t.length;r+=2)e&=Fa(t[r]);return e},toGlsl:function(t,e,r){Wa(e),qa(e,6);var i,n=e[0];switch(n[0]){case"linear":i=1;break;case"exponential":i=n[1];break;default:i=null}if(!i)throw new Error('Invalid interpolation type for "interpolate" operator, received: '.concat(JSON.stringify(n)));var o=void 0!==r?r:Aa,a=Ma.interpolate.getReturnType(e)&o;Xa(e,a);for(var s=Da(t,e[1]),l=Za(i),u="",c=2;c<e.length-2;c+=2){var h=Da(t,e[c]),p=u||Da(t,e[c+1],a),d=Da(t,e[c+2]),f=Da(t,e[c+3],a);u="mix(".concat(p,", ").concat(f,", pow(clamp((").concat(s," - ").concat(h,") / (").concat(d," - ").concat(h,"), 0.0, 1.0), ").concat(l,"))")}return u}},Ma.match={getReturnType:function(t){for(var e=Aa,r=2;r<t.length;r+=2)e&=Fa(t[r]);return e&Fa(t[t.length-1])},toGlsl:function(t,e,r){Wa(e),qa(e,4);var i=void 0!==r?r:Aa,n=Ma.match.getReturnType(e)&i;Xa(e,n);for(var o=Da(t,e[0]),a=Da(t,e[e.length-1],n),s=null,l=e.length-3;l>=1;l-=2){var u=Da(t,e[l]),c=Da(t,e[l+1],n);s="(".concat(o," == ").concat(u," ? ").concat(c," : ").concat(s||a,")")}return s}},Ma.case={getReturnType:function(t){for(var e=Aa,r=1;r<t.length;r+=2)e&=Fa(t[r]);return e&Fa(t[t.length-1])},toGlsl:function(t,e,r){!function(t){if(t.length%2==0)throw new Error("An odd amount of arguments was expected, got ".concat(t," instead"))}(e),qa(e,3);var i=void 0!==r?r:Aa,n=Ma.case.getReturnType(e)&i;Xa(e,n);for(var o=0;o<e.length-1;o+=2)Ua(e[o]);var a=Da(t,e[e.length-1],n),s=null;for(o=e.length-3;o>=0;o-=2){var l=Da(t,e[o]),u=Da(t,e[o+1],n);s="(".concat(l," ? ").concat(u," : ").concat(s||a,")")}return s}};var Qa=function(){function t(){this.uniforms=[],this.attributes=[],this.varyings=[],this.sizeExpression="vec2(1.0)",this.rotationExpression="0.0",this.offsetExpression="vec2(0.0)",this.colorExpression="vec4(1.0)",this.texCoordExpression="vec4(0.0, 0.0, 1.0, 1.0)",this.discardExpression="false",this.rotateWithView=!1}return t.prototype.addUniform=function(t){return this.uniforms.push(t),this},t.prototype.addAttribute=function(t){return this.attributes.push(t),this},t.prototype.addVarying=function(t,e,r){return this.varyings.push({name:t,type:e,expression:r}),this},t.prototype.setSizeExpression=function(t){return this.sizeExpression=t,this},t.prototype.setRotationExpression=function(t){return this.rotationExpression=t,this},t.prototype.setSymbolOffsetExpression=function(t){return this.offsetExpression=t,this},t.prototype.setColorExpression=function(t){return this.colorExpression=t,this},t.prototype.setTextureCoordinateExpression=function(t){return this.texCoordExpression=t,this},t.prototype.setFragmentDiscardExpression=function(t){return this.discardExpression=t,this},t.prototype.setSymbolRotateWithView=function(t){return this.rotateWithView=t,this},t.prototype.getSizeExpression=function(){return this.sizeExpression},t.prototype.getOffsetExpression=function(){return this.offsetExpression},t.prototype.getColorExpression=function(){return this.colorExpression},t.prototype.getTextureCoordinateExpression=function(){return this.texCoordExpression},t.prototype.getFragmentDiscardExpression=function(){return this.discardExpression},t.prototype.getSymbolVertexShader=function(t){var e=this.rotateWithView?"u_offsetScaleMatrix * u_offsetRotateMatrix":"u_offsetScaleMatrix",r=this.attributes,i=this.varyings;return t&&(r=r.concat("vec4 a_hitColor"),i=i.concat({name:"v_hitColor",type:"vec4",expression:"a_hitColor"})),"precision mediump float;\nuniform mat4 u_projectionMatrix;\nuniform mat4 u_offsetScaleMatrix;\nuniform mat4 u_offsetRotateMatrix;\nuniform float u_time;\nuniform float u_zoom;\nuniform float u_resolution;\n".concat(this.uniforms.map((function(t){return"uniform "+t+";"})).join("\n"),"\nattribute vec2 a_position;\nattribute float a_index;\n").concat(r.map((function(t){return"attribute "+t+";"})).join("\n"),"\nvarying vec2 v_texCoord;\nvarying vec2 v_quadCoord;\n").concat(i.map((function(t){return"varying "+t.type+" "+t.name+";"})).join("\n"),"\nvoid main(void) {\n  mat4 offsetMatrix = ").concat(e,";\n  vec2 halfSize = ").concat(this.sizeExpression," * 0.5;\n  vec2 offset = ").concat(this.offsetExpression,";\n  float angle = ").concat(this.rotationExpression,";\n  float offsetX;\n  float offsetY;\n  if (a_index == 0.0) {\n    offsetX = (offset.x - halfSize.x) * cos(angle) + (offset.y - halfSize.y) * sin(angle);\n    offsetY = (offset.y - halfSize.y) * cos(angle) - (offset.x - halfSize.x) * sin(angle);\n  } else if (a_index == 1.0) {\n    offsetX = (offset.x + halfSize.x) * cos(angle) + (offset.y - halfSize.y) * sin(angle);\n    offsetY = (offset.y - halfSize.y) * cos(angle) - (offset.x + halfSize.x) * sin(angle);\n  } else if (a_index == 2.0) {\n    offsetX = (offset.x + halfSize.x) * cos(angle) + (offset.y + halfSize.y) * sin(angle);\n    offsetY = (offset.y + halfSize.y) * cos(angle) - (offset.x + halfSize.x) * sin(angle);\n  } else {\n    offsetX = (offset.x - halfSize.x) * cos(angle) + (offset.y + halfSize.y) * sin(angle);\n    offsetY = (offset.y + halfSize.y) * cos(angle) - (offset.x - halfSize.x) * sin(angle);\n  }\n  vec4 offsets = offsetMatrix * vec4(offsetX, offsetY, 0.0, 0.0);\n  gl_Position = u_projectionMatrix * vec4(a_position, 0.0, 1.0) + offsets;\n  vec4 texCoord = ").concat(this.texCoordExpression,";\n  float u = a_index == 0.0 || a_index == 3.0 ? texCoord.s : texCoord.p;\n  float v = a_index == 2.0 || a_index == 3.0 ? texCoord.t : texCoord.q;\n  v_texCoord = vec2(u, v);\n  u = a_index == 0.0 || a_index == 3.0 ? 0.0 : 1.0;\n  v = a_index == 2.0 || a_index == 3.0 ? 0.0 : 1.0;\n  v_quadCoord = vec2(u, v);\n").concat(i.map((function(t){return"  "+t.name+" = "+t.expression+";"})).join("\n"),"\n}")},t.prototype.getSymbolFragmentShader=function(t){var e=t?"  if (gl_FragColor.a < 0.1) { discard; } gl_FragColor = v_hitColor;":"",r=this.varyings;return t&&(r=r.concat({name:"v_hitColor",type:"vec4",expression:"a_hitColor"})),"precision mediump float;\nuniform float u_time;\nuniform float u_zoom;\nuniform float u_resolution;\n".concat(this.uniforms.map((function(t){return"uniform "+t+";"})).join("\n"),"\nvarying vec2 v_texCoord;\nvarying vec2 v_quadCoord;\n").concat(r.map((function(t){return"varying "+t.type+" "+t.name+";"})).join("\n"),"\nvoid main(void) {\n  if (").concat(this.discardExpression,") { discard; }\n  gl_FragColor = ").concat(this.colorExpression,";\n  gl_FragColor.rgb *= gl_FragColor.a;\n").concat(e,"\n}")},t}(),ts=function(){var t=function(e,r){return t=Object.setPrototypeOf||{__proto__:[]}instanceof Array&&function(t,e){t.__proto__=e}||function(t,e){for(var r in e)Object.prototype.hasOwnProperty.call(e,r)&&(t[r]=e[r])},t(e,r)};return function(e,r){if("function"!=typeof r&&null!==r)throw new TypeError("Class extends value "+String(r)+" is not a constructor or null");function i(){this.constructor=e}t(e,r),e.prototype=null===r?Object.create(r):(i.prototype=r.prototype,new i)}}(),es=function(t){function e(e){var r=this,i=(0,c.f0)({},e);return(r=t.call(this,i)||this).parseResult_=function(t){var e=t.symbol,r=void 0!==e.size?e.size:1,i=e.color||"white",n=e.textureCoord||[0,0,1,1],o=e.offset||[0,0],a=void 0!==e.opacity?e.opacity:1,s=void 0!==e.rotation?e.rotation:0,l={inFragmentShader:!1,variables:[],attributes:[],stringLiteralsMap:{},functions:{}},u=Da(l,r,17),c=Da(l,o,La),h=Da(l,n,La),p=Da(l,s,1),d={inFragmentShader:!0,variables:l.variables,attributes:[],stringLiteralsMap:l.stringLiteralsMap,functions:{}},f=Da(d,i,4),g=Da(d,a,1),y="1.0",m="vec2(".concat(Da(d,r,17),").x");switch(e.symbolType){case"square":case"image":break;case"circle":y="(1.0-smoothstep(1.-4./".concat(m,",1.,dot(v_quadCoord-.5,v_quadCoord-.5)*4.))");break;case"triangle":var v="(v_quadCoord*2.-1.)",_="(atan(".concat(v,".x,").concat(v,".y))");y="(1.0-smoothstep(.5-3./".concat(m,",.5,cos(floor(.5+").concat(_,"/2.094395102)*2.094395102-").concat(_,")*length(").concat(v,")))");break;default:throw new Error("Unexpected symbol type: "+e.symbolType)}var x=(new Qa).setSizeExpression("vec2(".concat(u,")")).setRotationExpression(p).setSymbolOffsetExpression(c).setTextureCoordinateExpression(h).setSymbolRotateWithView(!!e.rotateWithView).setColorExpression("vec4(".concat(f,".rgb, ").concat(f,".a * ").concat(g," * ").concat(y,")"));if(t.filter){var b=Da(d,t.filter,8);x.setFragmentDiscardExpression("!".concat(b))}var w={};if(d.variables.forEach((function(e){var r=Ya(e);x.addUniform("float ".concat(r)),w[r]=function(){if(!t.variables||void 0===t.variables[e])throw new Error("The following variable is missing from the style: ".concat(e));var r=t.variables[e];return"string"==typeof r&&(r=ja(l,r)),void 0!==r?r:-9999999}})),"image"===e.symbolType&&e.src){var E=new Image;E.crossOrigin=void 0===e.crossOrigin?"anonymous":e.crossOrigin,E.src=e.src,x.addUniform("sampler2D u_texture").setColorExpression(x.getColorExpression()+" * texture2D(u_texture, v_texCoord)"),w.u_texture=E}return d.attributes.forEach((function(t){-1===l.attributes.indexOf(t)&&l.attributes.push(t),x.addVarying("v_".concat(t),"float","a_".concat(t))})),l.attributes.forEach((function(t){x.addAttribute("float a_".concat(t))})),{builder:x,attributes:l.attributes.map((function(t){return{name:t,callback:function(e,r){var i=r[t];return"string"==typeof i&&(i=ja(l,i)),void 0!==i?i:-9999999}}})),uniforms:w}}(e.style),r.styleVariables_=e.style.variables||{},r.hitDetectionDisabled_=!!e.disableHitDetection,r}return ts(e,t),e.prototype.createRenderer=function(){return new et(this,{vertexShader:this.parseResult_.builder.getSymbolVertexShader(),fragmentShader:this.parseResult_.builder.getSymbolFragmentShader(),hitVertexShader:!this.hitDetectionDisabled_&&this.parseResult_.builder.getSymbolVertexShader(!0),hitFragmentShader:!this.hitDetectionDisabled_&&this.parseResult_.builder.getSymbolFragmentShader(!0),uniforms:this.parseResult_.uniforms,attributes:this.parseResult_.attributes})},e.prototype.updateStyleVariables=function(t){(0,c.f0)(this.styleVariables_,t),this.changed()},e}(ht.Z);const rs=es;var is=r(4272),ns=function(){var t=function(e,r){return t=Object.setPrototypeOf||{__proto__:[]}instanceof Array&&function(t,e){t.__proto__=e}||function(t,e){for(var r in e)Object.prototype.hasOwnProperty.call(e,r)&&(t[r]=e[r])},t(e,r)};return function(e,r){if("function"!=typeof r&&null!==r)throw new TypeError("Class extends value "+String(r)+" is not a constructor or null");function i(){this.constructor=e}t(e,r),e.prototype=null===r?Object.create(r):(i.prototype=r.prototype,new i)}}();function os(t,e){var r="\n    attribute vec2 ".concat(ba,";\n    uniform mat4 ").concat(ca,";\n    uniform float ").concat(da,";\n    uniform float ").concat(fa,";\n    uniform float ").concat(ga,";\n    uniform float ").concat(ya,";\n    uniform float ").concat(ma,";\n    uniform float ").concat(pa,";\n\n    varying vec2 v_textureCoord;\n    varying vec2 v_mapCoord;\n\n    void main() {\n      v_textureCoord = ").concat(ba,";\n      v_mapCoord = vec2(\n        ").concat(ya," + ").concat(ga," * ").concat(da," * v_textureCoord[0],\n        ").concat(ma," - ").concat(ga," * ").concat(fa," * v_textureCoord[1]\n      );\n      gl_Position = ").concat(ca," * vec4(").concat(ba,", ").concat(pa,", 1.0);\n    }\n  "),i={inFragmentShader:!0,variables:[],attributes:[],stringLiteralsMap:{},functions:{},bandCount:e},n=[];if(void 0!==t.color){var o=Da(i,t.color,4);n.push("color = ".concat(o,";"))}if(void 0!==t.contrast){var a=Da(i,t.contrast,1);n.push("color.rgb = clamp((".concat(a," + 1.0) * color.rgb - (").concat(a," / 2.0), vec3(0.0, 0.0, 0.0), vec3(1.0, 1.0, 1.0));"))}if(void 0!==t.exposure){var s=Da(i,t.exposure,1);n.push("color.rgb = clamp((".concat(s," + 1.0) * color.rgb, vec3(0.0, 0.0, 0.0), vec3(1.0, 1.0, 1.0));"))}if(void 0!==t.saturation){var l=Da(i,t.saturation,1);n.push("\n      float saturation = ".concat(l," + 1.0;\n      float sr = (1.0 - saturation) * 0.2126;\n      float sg = (1.0 - saturation) * 0.7152;\n      float sb = (1.0 - saturation) * 0.0722;\n      mat3 saturationMatrix = mat3(\n        sr + saturation, sr, sr,\n        sg, sg + saturation, sg,\n        sb, sb, sb + saturation\n      );\n      color.rgb = clamp(saturationMatrix * color.rgb, vec3(0.0, 0.0, 0.0), vec3(1.0, 1.0, 1.0));\n    "))}if(void 0!==t.gamma){var u=Da(i,t.gamma,1);n.push("color.rgb = pow(color.rgb, vec3(1.0 / ".concat(u,"));"))}if(void 0!==t.brightness){var c=Da(i,t.brightness,1);n.push("color.rgb = clamp(color.rgb + ".concat(c,", vec3(0.0, 0.0, 0.0), vec3(1.0, 1.0, 1.0));"))}var h={},p=i.variables.length;if(p>1&&!t.variables)throw new Error("Missing variables in style (expected ".concat(i.variables,")"));for(var d=function(e){var r=i.variables[e];if(!(r in t.variables))throw new Error("Missing '".concat(r,"' in style variables"));var n=Ya(r);h[n]=function(){var e=t.variables[r];return"string"==typeof e&&(e=ja(i,e)),void 0!==e?e:-9999999}},f=0;f<p;++f)d(f);var g=Object.keys(h).map((function(t){return"uniform float ".concat(t,";")})),y=Math.ceil(e/4);g.push("uniform sampler2D ".concat(ua,"[").concat(y,"];")),i.paletteTextures&&g.push("uniform sampler2D ".concat(Ha,"[").concat(i.paletteTextures.length,"];"));var m=Object.keys(i.functions).map((function(t){return i.functions[t]}));return{vertexShader:r,fragmentShader:"\n    #ifdef GL_FRAGMENT_PRECISION_HIGH\n    precision highp float;\n    #else\n    precision mediump float;\n    #endif\n\n    varying vec2 v_textureCoord;\n    varying vec2 v_mapCoord;\n    uniform vec4 ".concat(va,";\n    uniform float ").concat(ha,";\n    uniform float ").concat(da,";\n    uniform float ").concat(fa,";\n    uniform float ").concat(_a,";\n    uniform float ").concat(xa,";\n\n    ").concat(g.join("\n"),"\n\n    ").concat(m.join("\n"),"\n\n    void main() {\n      if (\n        v_mapCoord[0] < ").concat(va,"[0] ||\n        v_mapCoord[1] < ").concat(va,"[1] ||\n        v_mapCoord[0] > ").concat(va,"[2] ||\n        v_mapCoord[1] > ").concat(va,"[3]\n      ) {\n        discard;\n      }\n\n      vec4 color = texture2D(").concat(ua,"[0],  v_textureCoord);\n\n      ").concat(n.join("\n"),"\n\n      if (color.a == 0.0) {\n        discard;\n      }\n\n      gl_FragColor = color;\n      gl_FragColor.rgb *= gl_FragColor.a;\n      gl_FragColor *= ").concat(ha,";\n    }"),uniforms:h,paletteTextures:i.paletteTextures}}var as=function(t){function e(e){var r=this,i=e?(0,c.f0)({},e):{},n=i.style||{};delete i.style;var o=i.cacheSize;return delete i.cacheSize,(r=t.call(this,i)||this).sources_=i.sources,r.renderedSource_=null,r.renderedResolution_=NaN,r.style_=n,r.cacheSize_=o,r.styleVariables_=r.style_.variables||{},r.addChangeListener(b.Z.SOURCE,r.handleSourceUpdate_),r}return ns(e,t),e.prototype.getSources=function(t,e){var r=this.getSource();return this.sources_?"function"==typeof this.sources_?this.sources_(t,e):this.sources_:r?[r]:[]},e.prototype.getRenderSource=function(){return this.renderedSource_||this.getSource()},e.prototype.getSourceState=function(){var t=this.getRenderSource();return t?t.getState():Ut.Z.UNDEFINED},e.prototype.handleSourceUpdate_=function(){this.getSource()&&this.setStyle(this.style_)},e.prototype.getSourceBandCount_=function(){var t=this.getSource();return t&&"bandCount"in t?t.bandCount:4},e.prototype.createRenderer=function(){var t=os(this.style_,this.getSourceBandCount_());return new Ia(this,{vertexShader:t.vertexShader,fragmentShader:t.fragmentShader,uniforms:t.uniforms,cacheSize:this.cacheSize_,paletteTextures:t.paletteTextures})},e.prototype.renderSources=function(t,e){for(var r,i=this.getRenderer(),n=0,o=e.length;n<o;++n)this.renderedSource_=e[n],i.prepareFrame(t)&&(r=i.renderFrame(t));return r},e.prototype.render=function(t,e){var r=this;this.rendered=!0;for(var i=t.viewState,n=this.getSources(t.extent,i.resolution),o=!0,a=function(t,e){var i=n[t],a=i.getState();if(a==Ut.Z.LOADING){var s=function(){i.getState()==Ut.Z.READY&&(i.removeEventListener("change",s),r.changed())};i.addEventListener("change",s)}o=o&&a==Ut.Z.READY},s=0,l=n.length;s<l;++s)a(s);var u=this.renderSources(t,n);if(this.getRenderer().renderComplete&&o)return this.renderedResolution_=i.resolution,u;if(this.renderedResolution_>.5*i.resolution){var c=this.getSources(t.extent,this.renderedResolution_).filter((function(t){return!n.includes(t)}));if(c.length>0)return this.renderSources(t,c)}return u},e.prototype.setStyle=function(t){this.styleVariables_=t.variables||{},this.style_=t;var e=os(this.style_,this.getSourceBandCount_());this.getRenderer().reset({vertexShader:e.vertexShader,fragmentShader:e.fragmentShader,uniforms:e.uniforms,paletteTextures:e.paletteTextures}),this.changed()},e.prototype.updateStyleVariables=function(t){(0,c.f0)(this.styleVariables_,t),this.changed()},e}(is.Z);as.prototype.dispose;const ss=as},947:(t,e,r)=>{"use strict";r.d(e,{Z:()=>h});var i,n=r(2971),o=r(1912),a=r(4187),s=r(9515),l=r(9374),u=r(3983),c=(i=function(t,e){return i=Object.setPrototypeOf||{__proto__:[]}instanceof Array&&function(t,e){t.__proto__=e}||function(t,e){for(var r in e)Object.prototype.hasOwnProperty.call(e,r)&&(t[r]=e[r])},i(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 r(){this.constructor=t}i(t,e),t.prototype=null===e?Object.create(e):(r.prototype=e.prototype,new r)});const h=function(t){function e(e){var r=t.call(this)||this;r.on,r.once,r.un,r.background_=e.background;var i=(0,l.f0)({},e);return"object"==typeof e.properties&&(delete i.properties,(0,l.f0)(i,e.properties)),i[o.Z.OPACITY]=void 0!==e.opacity?e.opacity:1,(0,s.h)("number"==typeof i[o.Z.OPACITY],64),i[o.Z.VISIBLE]=void 0===e.visible||e.visible,i[o.Z.Z_INDEX]=e.zIndex,i[o.Z.MAX_RESOLUTION]=void 0!==e.maxResolution?e.maxResolution:1/0,i[o.Z.MIN_RESOLUTION]=void 0!==e.minResolution?e.minResolution:0,i[o.Z.MIN_ZOOM]=void 0!==e.minZoom?e.minZoom:-1/0,i[o.Z.MAX_ZOOM]=void 0!==e.maxZoom?e.maxZoom:1/0,r.className_=void 0!==i.className?i.className:"ol-layer",delete i.className,r.setProperties(i),r.state_=null,r}return c(e,t),e.prototype.getBackground=function(){return this.background_},e.prototype.getClassName=function(){return this.className_},e.prototype.getLayerState=function(t){var e=this.state_||{layer:this,managed:void 0===t||t},r=this.getZIndex();return e.opacity=(0,u.uZ)(Math.round(100*this.getOpacity())/100,0,1),e.visible=this.getVisible(),e.extent=this.getExtent(),e.zIndex=void 0!==r||e.managed?r: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(0,a.O3)()},e.prototype.getLayerStatesArray=function(t){return(0,a.O3)()},e.prototype.getExtent=function(){return this.get(o.Z.EXTENT)},e.prototype.getMaxResolution=function(){return this.get(o.Z.MAX_RESOLUTION)},e.prototype.getMinResolution=function(){return this.get(o.Z.MIN_RESOLUTION)},e.prototype.getMinZoom=function(){return this.get(o.Z.MIN_ZOOM)},e.prototype.getMaxZoom=function(){return this.get(o.Z.MAX_ZOOM)},e.prototype.getOpacity=function(){return this.get(o.Z.OPACITY)},e.prototype.getSourceState=function(){return(0,a.O3)()},e.prototype.getVisible=function(){return this.get(o.Z.VISIBLE)},e.prototype.getZIndex=function(){return this.get(o.Z.Z_INDEX)},e.prototype.setBackground=function(t){this.background_=t,this.changed()},e.prototype.setExtent=function(t){this.set(o.Z.EXTENT,t)},e.prototype.setMaxResolution=function(t){this.set(o.Z.MAX_RESOLUTION,t)},e.prototype.setMinResolution=function(t){this.set(o.Z.MIN_RESOLUTION,t)},e.prototype.setMaxZoom=function(t){this.set(o.Z.MAX_ZOOM,t)},e.prototype.setMinZoom=function(t){this.set(o.Z.MIN_ZOOM,t)},e.prototype.setOpacity=function(t){(0,s.h)("number"==typeof t,64),this.set(o.Z.OPACITY,t)},e.prototype.setVisible=function(t){this.set(o.Z.VISIBLE,t)},e.prototype.setZIndex=function(t){this.set(o.Z.Z_INDEX,t)},e.prototype.disposeInternal=function(){this.state_&&(this.state_.layer=null,this.state_=null),t.prototype.disposeInternal.call(this)},e}(n.Z)},4272:(t,e,r)=>{"use strict";r.d(e,{Z:()=>l});var i,n=r(1295),o=r(8280),a=r(9374),s=(i=function(t,e){return i=Object.setPrototypeOf||{__proto__:[]}instanceof Array&&function(t,e){t.__proto__=e}||function(t,e){for(var r in e)Object.prototype.hasOwnProperty.call(e,r)&&(t[r]=e[r])},i(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 r(){this.constructor=t}i(t,e),t.prototype=null===e?Object.create(e):(r.prototype=e.prototype,new r)});const l=function(t){function e(e){var r=this,i=e||{},n=(0,a.f0)({},i);return delete n.preload,delete n.useInterimTilesOnError,(r=t.call(this,n)||this).on,r.once,r.un,r.setPreload(void 0!==i.preload?i.preload:0),r.setUseInterimTilesOnError(void 0===i.useInterimTilesOnError||i.useInterimTilesOnError),r}return s(e,t),e.prototype.getPreload=function(){return this.get(o.Z.PRELOAD)},e.prototype.setPreload=function(t){this.set(o.Z.PRELOAD,t)},e.prototype.getUseInterimTilesOnError=function(){return this.get(o.Z.USE_INTERIM_TILES_ON_ERROR)},e.prototype.setUseInterimTilesOnError=function(t){this.set(o.Z.USE_INTERIM_TILES_ON_ERROR,t)},e.prototype.getData=function(e){return t.prototype.getData.call(this,e)},e}(n.Z)},2563:(t,e,r)=>{"use strict";r.d(e,{Z:()=>c});var i,n=r(1295),o=r(2582),a=r(9374),s=r(7539),l=(i=function(t,e){return i=Object.setPrototypeOf||{__proto__:[]}instanceof Array&&function(t,e){t.__proto__=e}||function(t,e){for(var r in e)Object.prototype.hasOwnProperty.call(e,r)&&(t[r]=e[r])},i(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 r(){this.constructor=t}i(t,e),t.prototype=null===e?Object.create(e):(r.prototype=e.prototype,new r)}),u="renderOrder";const c=function(t){function e(e){var r=this,i=e||{},n=(0,a.f0)({},i);return delete n.style,delete n.renderBuffer,delete n.updateWhileAnimating,delete n.updateWhileInteracting,(r=t.call(this,n)||this).declutter_=void 0!==i.declutter&&i.declutter,r.renderBuffer_=void 0!==i.renderBuffer?i.renderBuffer:100,r.style_=null,r.styleFunction_=void 0,r.setStyle(i.style),r.updateWhileAnimating_=void 0!==i.updateWhileAnimating&&i.updateWhileAnimating,r.updateWhileInteracting_=void 0!==i.updateWhileInteracting&&i.updateWhileInteracting,r}return l(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(u)},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 o(9)),this.getRenderer().renderDeclutter(t)},e.prototype.setRenderOrder=function(t){this.set(u,t)},e.prototype.setStyle=function(t){this.style_=void 0!==t?t:s.yF,this.styleFunction_=null===t?void 0:(0,s.J$)(this.style_),this.changed()},e}(n.Z)},8599:(t,e,r)=>{"use strict";r.d(e,{Z:()=>R});var i=r(8714),n=r(8771),o=r(1090),a=r(1345),s=r(2450),l=r(2083),u=r(188),c=r(8958),h=r(7539),p=r(1280),d=r(2371),f=r(2556),g=r(8641),y=r(9374),m=r(3983),v=r(1900),_=r(6121),x=r(5069),b=r(6101),w=r(6234);function E(t,e,r){for(var i,n,o,a,s,l,u=[],c=t(0),h=t(1),p=e(c),d=e(h),f=[h,c],g=[d,p],y=[1,0],v={},_=1e5;--_>0&&y.length>0;)o=y.pop(),c=f.pop(),p=g.pop(),(l=o.toString())in v||(u.push(p[0],p[1]),v[l]=!0),a=y.pop(),h=f.pop(),d=g.pop(),n=e(i=t(s=(o+a)/2)),(0,m.rU)(n[0],n[1],p[0],p[1],d[0],d[1])<r?(u.push(d[0],d[1]),v[l=a.toString()]=!0):(y.push(a,s,s,o),g.push(d,n,n,p),f.push(h,i,i,c));return u}var T,S=(T=function(t,e){return T=Object.setPrototypeOf||{__proto__:[]}instanceof Array&&function(t,e){t.__proto__=e}||function(t,e){for(var r in e)Object.prototype.hasOwnProperty.call(e,r)&&(t[r]=e[r])},T(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 r(){this.constructor=t}T(t,e),t.prototype=null===e?Object.create(e):(r.prototype=e.prototype,new r)}),C=new c.Z({color:"rgba(0,0,0,0.2)"}),O=[90,45,30,20,10,5,2,1,.5,.2,.1,.05,.01,.005,.002,.001];const R=function(t){function e(e){var r=this,o=e||{},s=(0,y.f0)({updateWhileAnimating:!0,updateWhileInteracting:!0,renderBuffer:0},o);return delete s.maxLines,delete s.strokeStyle,delete s.targetSize,delete s.showLabels,delete s.lonLabelFormatter,delete s.latLabelFormatter,delete s.lonLabelPosition,delete s.latLabelPosition,delete s.lonLabelStyle,delete s.latLabelStyle,delete s.intervals,(r=t.call(this,s)||this).projection_=null,r.maxLat_=1/0,r.maxLon_=1/0,r.minLat_=-1/0,r.minLon_=-1/0,r.maxX_=1/0,r.maxY_=1/0,r.minX_=-1/0,r.minY_=-1/0,r.targetSize_=void 0!==o.targetSize?o.targetSize:100,r.maxLines_=void 0!==o.maxLines?o.maxLines:100,r.meridians_=[],r.parallels_=[],r.strokeStyle_=void 0!==o.strokeStyle?o.strokeStyle:C,r.fromLonLatTransform_=void 0,r.toLonLatTransform_=void 0,r.projectionCenterLonLat_=null,r.bottomLeft_=null,r.bottomRight_=null,r.topLeft_=null,r.topRight_=null,r.meridiansLabels_=null,r.parallelsLabels_=null,o.showLabels&&(r.lonLabelFormatter_=null==o.lonLabelFormatter?v.I8.bind(r,"EW"):o.lonLabelFormatter,r.latLabelFormatter_=null==o.latLabelFormatter?v.I8.bind(r,"NS"):o.latLabelFormatter,r.lonLabelPosition_=null==o.lonLabelPosition?0:o.lonLabelPosition,r.latLabelPosition_=null==o.latLabelPosition?1:o.latLabelPosition,r.lonLabelStyleBase_=new h.ZP({text:void 0!==o.lonLabelStyle?o.lonLabelStyle.clone():new p.Z({font:"12px Calibri,sans-serif",textBaseline:"bottom",fill:new a.Z({color:"rgba(0,0,0,1)"}),stroke:new c.Z({color:"rgba(255,255,255,1)",width:3})})}),r.lonLabelStyle_=function(t){var e=t.get("graticule_label");return this.lonLabelStyleBase_.getText().setText(e),this.lonLabelStyleBase_}.bind(r),r.latLabelStyleBase_=new h.ZP({text:void 0!==o.latLabelStyle?o.latLabelStyle.clone():new p.Z({font:"12px Calibri,sans-serif",textAlign:"right",fill:new a.Z({color:"rgba(0,0,0,1)"}),stroke:new c.Z({color:"rgba(255,255,255,1)",width:3})})}),r.latLabelStyle_=function(t){var e=t.get("graticule_label");return this.latLabelStyleBase_.getText().setText(e),this.latLabelStyleBase_}.bind(r),r.meridiansLabels_=[],r.parallelsLabels_=[],r.addEventListener(n.Z.POSTRENDER,r.drawLabels_.bind(r))),r.intervals_=void 0!==o.intervals?o.intervals:O,r.setSource(new f.Z({loader:r.loaderFunction.bind(r),strategy:r.strategyFunction.bind(r),features:new i.Z,overlaps:!1,useSpatialIndex:!1,wrapX:o.wrapX})),r.featurePool_=[],r.lineStyle_=new h.ZP({stroke:r.strokeStyle_}),r.loadedExtent_=null,r.renderedExtent_=null,r.renderedResolution_=null,r.setRenderOrder(null),r}return S(e,t),e.prototype.strategyFunction=function(t,e){var r=t.slice();return this.projection_&&this.getSource().getWrapX()&&(0,g.wrapX)(r,this.projection_),this.loadedExtent_&&((0,g.approximatelyEquals)(this.loadedExtent_,r,e)?r=this.loadedExtent_.slice():this.getSource().removeLoadedExtent(this.loadedExtent_)),[r]},e.prototype.loaderFunction=function(t,e,r){this.loadedExtent_=t;var i=this.getSource(),n=this.getExtent()||[-1/0,-1/0,1/0,1/0],a=(0,g.getIntersection)(n,t);if(!(this.renderedExtent_&&(0,g.equals)(this.renderedExtent_,a)&&this.renderedResolution_===e||(this.renderedExtent_=a,this.renderedResolution_=e,(0,g.isEmpty)(a)))){var s=(0,g.getCenter)(a),l=e*e/4;(!this.projection_||!(0,_.equivalent)(this.projection_,r))&&this.updateProjectionInfo_(r),this.createGraticule_(a,s,e,l);var u,c=this.meridians_.length+this.parallels_.length;for(this.meridiansLabels_&&(c+=this.meridians_.length),this.parallelsLabels_&&(c+=this.parallels_.length);c>this.featurePool_.length;)u=new o.default,this.featurePool_.push(u);var h=i.getFeaturesCollection();h.clear();var p,d,f=0;for(p=0,d=this.meridians_.length;p<d;++p)(u=this.featurePool_[f++]).setGeometry(this.meridians_[p]),u.setStyle(this.lineStyle_),h.push(u);for(p=0,d=this.parallels_.length;p<d;++p)(u=this.featurePool_[f++]).setGeometry(this.parallels_[p]),u.setStyle(this.lineStyle_),h.push(u)}},e.prototype.addMeridian_=function(t,e,r,i,n,o){var a=this.getMeridian_(t,e,r,i,o);if((0,g.intersects)(a.getExtent(),n)){if(this.meridiansLabels_){var s=this.lonLabelFormatter_(t);o in this.meridiansLabels_?this.meridiansLabels_[o].text=s:this.meridiansLabels_[o]={geom:new u.default([]),text:s}}this.meridians_[o++]=a}return o},e.prototype.addParallel_=function(t,e,r,i,n,o){var a=this.getParallel_(t,e,r,i,o);if((0,g.intersects)(a.getExtent(),n)){if(this.parallelsLabels_){var s=this.latLabelFormatter_(t);o in this.parallelsLabels_?this.parallelsLabels_[o].text=s:this.parallelsLabels_[o]={geom:new u.default([]),text:s}}this.parallels_[o++]=a}return o},e.prototype.drawLabels_=function(t){var e=t.frameState.viewState.rotation,r=t.frameState.viewState.resolution,i=t.frameState.size,n=t.frameState.extent,o=(0,g.getCenter)(n),a=n;if(e){var s=i[0]*r,l=i[1]*r;a=[o[0]-s/2,o[1]-l/2,o[0]+s/2,o[1]+l/2]}var u=0,c=0,h=this.latLabelPosition_<.5,p=this.projection_.getExtent(),d=(0,g.getWidth)(p);this.getSource().getWrapX()&&this.projection_.canWrapX()&&!(0,g.containsExtent)(p,n)&&(u=Math.floor((n[0]-p[0])/d),c=Math.ceil((n[2]-p[2])/d),h=h!==Math.abs(e)>Math.PI/2);for(var f=function(t){if(!(t.context instanceof CanvasRenderingContext2D))throw new Error("Only works for render events from Canvas 2D layers");var e,r=t.inversePixelTransform[0],i=t.frameState,n=(0,b.Jp)(t.inversePixelTransform.slice(),i.coordinateToPixelTransform),o=(0,w.se)(i.viewState.resolution,r),a=(0,_.getUserProjection)();return a&&(e=(0,_.getTransformFromProjections)(a,i.viewState.projection)),new x.Z(t.context,r,i.extent,n,i.viewState.rotation,o,e)}(t),y=u;y<=c;++y){var m=this.meridians_.length+this.parallels_.length,v=void 0,E=void 0,T=void 0,S=void 0;if(this.meridiansLabels_)for(E=0,T=this.meridiansLabels_.length;E<T;++E){var C=this.meridians_[E];e||0!==y?((O=C.clone()).translate(y*d,0),O.rotate(-e,o),(S=this.getMeridianPoint_(O,a,E)).rotate(e,o)):S=this.getMeridianPoint_(C,n,E),(v=this.featurePool_[m++]).setGeometry(S),v.set("graticule_label",this.meridiansLabels_[E].text),f.drawFeature(v,this.lonLabelStyle_(v))}if(this.parallelsLabels_&&(y===u&&h||y===c&&!h))for(E=0,T=this.parallels_.length;E<T;++E){var O;C=this.parallels_[E],e||0!==y?((O=C.clone()).translate(y*d,0),O.rotate(-e,o),(S=this.getParallelPoint_(O,a,E)).rotate(e,o)):S=this.getParallelPoint_(C,n,E),(v=this.featurePool_[m++]).setGeometry(S),v.set("graticule_label",this.parallelsLabels_[E].text),f.drawFeature(v,this.latLabelStyle_(v))}}},e.prototype.createGraticule_=function(t,e,r,i){var n=this.getInterval_(r);if(-1==n)return this.meridians_.length=0,this.parallels_.length=0,this.meridiansLabels_&&(this.meridiansLabels_.length=0),void(this.parallelsLabels_&&(this.parallelsLabels_.length=0));var o=!1,a=this.projection_.getExtent(),s=(0,g.getWidth)(a);this.getSource().getWrapX()&&this.projection_.canWrapX()&&!(0,g.containsExtent)(a,t)&&((0,g.getWidth)(t)>=s?(t[0]=a[0],t[2]=a[2]):o=!0);var l=[(0,m.uZ)(e[0],this.minX_,this.maxX_),(0,m.uZ)(e[1],this.minY_,this.maxY_)],u=this.toLonLatTransform_(l);isNaN(u[1])&&(u[1]=Math.abs(this.maxLat_)>=Math.abs(this.minLat_)?this.maxLat_:this.minLat_);var c,h,p,d,f=(0,m.uZ)(u[0],this.minLon_,this.maxLon_),y=(0,m.uZ)(u[1],this.minLat_,this.maxLat_),v=this.maxLines_,_=t;o||(_=[(0,m.uZ)(t[0],this.minX_,this.maxX_),(0,m.uZ)(t[1],this.minY_,this.maxY_),(0,m.uZ)(t[2],this.minX_,this.maxX_),(0,m.uZ)(t[3],this.minY_,this.maxY_)]);var x=(0,g.applyTransform)(_,this.toLonLatTransform_,void 0,8),b=x[3],w=x[2],E=x[1],T=x[0];if(o||((0,g.containsCoordinate)(_,this.bottomLeft_)&&(T=this.minLon_,E=this.minLat_),(0,g.containsCoordinate)(_,this.bottomRight_)&&(w=this.maxLon_,E=this.minLat_),(0,g.containsCoordinate)(_,this.topLeft_)&&(T=this.minLon_,b=this.maxLat_),(0,g.containsCoordinate)(_,this.topRight_)&&(w=this.maxLon_,b=this.maxLat_),b=(0,m.uZ)(b,y,this.maxLat_),w=(0,m.uZ)(w,f,this.maxLon_),E=(0,m.uZ)(E,this.minLat_,y),T=(0,m.uZ)(T,this.minLon_,f)),f=Math.floor(f/n)*n,d=(0,m.uZ)(f,this.minLon_,this.maxLon_),h=this.addMeridian_(d,E,b,i,t,0),c=0,o)for(;(d-=n)>=T&&c++<v;)h=this.addMeridian_(d,E,b,i,t,h);else for(;d!=this.minLon_&&c++<v;)d=Math.max(d-n,this.minLon_),h=this.addMeridian_(d,E,b,i,t,h);if(d=(0,m.uZ)(f,this.minLon_,this.maxLon_),c=0,o)for(;(d+=n)<=w&&c++<v;)h=this.addMeridian_(d,E,b,i,t,h);else for(;d!=this.maxLon_&&c++<v;)d=Math.min(d+n,this.maxLon_),h=this.addMeridian_(d,E,b,i,t,h);for(this.meridians_.length=h,this.meridiansLabels_&&(this.meridiansLabels_.length=h),y=Math.floor(y/n)*n,p=(0,m.uZ)(y,this.minLat_,this.maxLat_),h=this.addParallel_(p,T,w,i,t,0),c=0;p!=this.minLat_&&c++<v;)p=Math.max(p-n,this.minLat_),h=this.addParallel_(p,T,w,i,t,h);for(p=(0,m.uZ)(y,this.minLat_,this.maxLat_),c=0;p!=this.maxLat_&&c++<v;)p=Math.min(p+n,this.maxLat_),h=this.addParallel_(p,T,w,i,t,h);this.parallels_.length=h,this.parallelsLabels_&&(this.parallelsLabels_.length=h)},e.prototype.getInterval_=function(t){for(var e=this.projectionCenterLonLat_[0],r=this.projectionCenterLonLat_[1],i=-1,n=Math.pow(this.targetSize_*t,2),o=[],a=[],s=0,l=this.intervals_.length;s<l;++s){var u=(0,m.uZ)(this.intervals_[s]/2,0,90),c=(0,m.uZ)(r,-90+u,90-u);if(o[0]=e-u,o[1]=c-u,a[0]=e+u,a[1]=c+u,this.fromLonLatTransform_(o,o),this.fromLonLatTransform_(a,a),Math.pow(a[0]-o[0],2)+Math.pow(a[1]-o[1],2)<=n)break;i=this.intervals_[s]}return i},e.prototype.getMeridian_=function(t,e,r,i,n){var o=function(t,e,r,i,n){var o=(0,_.get)("EPSG:4326");return E((function(i){return[t,e+(r-e)*i]}),(0,_.getTransform)(o,i),n)}(t,e,r,this.projection_,i),a=this.meridians_[n];return a?(a.setFlatCoordinates(s.Z.XY,o),a.changed()):(a=new l.Z(o,s.Z.XY),this.meridians_[n]=a),a},e.prototype.getMeridianPoint_=function(t,e,r){var i=t.getFlatCoordinates(),n=1,o=i.length-1;i[n]>i[o]&&(n=o,o=1);var a=Math.max(e[1],i[n]),s=Math.min(e[3],i[o]),l=(0,m.uZ)(e[1]+Math.abs(e[1]-e[3])*this.lonLabelPosition_,a,s),u=[i[n-1]+(i[o-1]-i[n-1])*(l-i[n])/(i[o]-i[n]),l],c=this.meridiansLabels_[r].geom;return c.setCoordinates(u),c},e.prototype.getMeridians=function(){return this.meridians_},e.prototype.getParallel_=function(t,e,r,i,n){var o=function(t,e,r,i,n){var o=(0,_.get)("EPSG:4326");return E((function(i){return[e+(r-e)*i,t]}),(0,_.getTransform)(o,i),n)}(t,e,r,this.projection_,i),a=this.parallels_[n];return a?(a.setFlatCoordinates(s.Z.XY,o),a.changed()):a=new l.Z(o,s.Z.XY),a},e.prototype.getParallelPoint_=function(t,e,r){var i=t.getFlatCoordinates(),n=0,o=i.length-2;i[n]>i[o]&&(n=o,o=0);var a=Math.max(e[0],i[n]),s=Math.min(e[2],i[o]),l=(0,m.uZ)(e[0]+Math.abs(e[0]-e[2])*this.latLabelPosition_,a,s),u=[l,i[n+1]+(i[o+1]-i[n+1])*(l-i[n])/(i[o]-i[n])],c=this.parallelsLabels_[r].geom;return c.setCoordinates(u),c},e.prototype.getParallels=function(){return this.parallels_},e.prototype.updateProjectionInfo_=function(t){var e=(0,_.get)("EPSG:4326"),r=t.getWorldExtent();this.maxLat_=r[3],this.maxLon_=r[2],this.minLat_=r[1],this.minLon_=r[0];var i=(0,_.getTransform)(t,e);if(this.minLon_<this.maxLon_)this.toLonLatTransform_=i;else{var n=this.minLon_+this.maxLon_/2;this.maxLon_+=360,this.toLonLatTransform_=function(t,e,r){for(var o=r||2,a=i(t,e,o),s=0,l=a.length;s<l;s+=o)a[s]<n&&(a[s]+=360);return a}}this.fromLonLatTransform_=(0,_.getTransform)(e,t);var o=(0,g.applyTransform)([this.minLon_,this.minLat_,this.maxLon_,this.maxLat_],this.fromLonLatTransform_,void 0,8);this.minX_=o[0],this.maxX_=o[2],this.minY_=o[1],this.maxY_=o[3],this.bottomLeft_=this.fromLonLatTransform_([this.minLon_,this.minLat_]),this.bottomRight_=this.fromLonLatTransform_([this.maxLon_,this.minLat_]),this.topLeft_=this.fromLonLatTransform_([this.minLon_,this.maxLat_]),this.topRight_=this.fromLonLatTransform_([this.maxLon_,this.maxLat_]),this.projectionCenterLonLat_=this.toLonLatTransform_((0,g.getCenter)(t.getExtent())),isNaN(this.projectionCenterLonLat_[1])&&(this.projectionCenterLonLat_[1]=Math.abs(this.maxLat_)>=Math.abs(this.minLat_)?this.maxLat_:this.minLat_),this.projection_=t},e}(d.Z)},8734:(t,e,r)=>{"use strict";r.d(e,{V:()=>m,Z:()=>_});var i,n=r(947),o=r(8714),a=r(2071),s=r(291),l=r(5487),u=r(5990),c=r(4562),h=r(9515),p=r(9374),d=r(8641),f=r(4187),g=r(5818),y=(i=function(t,e){return i=Object.setPrototypeOf||{__proto__:[]}instanceof Array&&function(t,e){t.__proto__=e}||function(t,e){for(var r in e)Object.prototype.hasOwnProperty.call(e,r)&&(t[r]=e[r])},i(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 r(){this.constructor=t}i(t,e),t.prototype=null===e?Object.create(e):(r.prototype=e.prototype,new r)}),m=function(t){function e(e,r){var i=t.call(this,e)||this;return i.layer=r,i}return y(e,t),e}(s.ZP),v="layers";const _=function(t){function e(e){var r=this,i=e||{},n=(0,p.f0)({},i);delete n.layers;var a=i.layers;return(r=t.call(this,n)||this).on,r.once,r.un,r.layersListenerKeys_=[],r.listenerKeys_={},r.addChangeListener(v,r.handleLayersChanged_),a?Array.isArray(a)?a=new o.Z(a.slice(),{unique:!0}):(0,h.h)("function"==typeof a.getArray,43):a=new o.Z(void 0,{unique:!0}),r.setLayers(a),r}return y(e,t),e.prototype.handleLayerChange_=function(){this.changed()},e.prototype.handleLayersChanged_=function(){this.layersListenerKeys_.forEach(g.bN),this.layersListenerKeys_.length=0;var t=this.getLayers();for(var e in this.layersListenerKeys_.push((0,g.oL)(t,a.Z.ADD,this.handleLayersAdd_,this),(0,g.oL)(t,a.Z.REMOVE,this.handleLayersRemove_,this)),this.listenerKeys_)this.listenerKeys_[e].forEach(g.bN);(0,p.ZH)(this.listenerKeys_);for(var r=t.getArray(),i=0,n=r.length;i<n;i++){var o=r[i];this.registerLayerListeners_(o),this.dispatchEvent(new m("addlayer",o))}this.changed()},e.prototype.registerLayerListeners_=function(t){var r=[(0,g.oL)(t,u.Z.PROPERTYCHANGE,this.handleLayerChange_,this),(0,g.oL)(t,l.Z.CHANGE,this.handleLayerChange_,this)];t instanceof e&&r.push((0,g.oL)(t,"addlayer",this.handleLayerGroupAdd_,this),(0,g.oL)(t,"removelayer",this.handleLayerGroupRemove_,this)),this.listenerKeys_[(0,f.sq)(t)]=r},e.prototype.handleLayerGroupAdd_=function(t){this.dispatchEvent(new m("addlayer",t.layer))},e.prototype.handleLayerGroupRemove_=function(t){this.dispatchEvent(new m("removelayer",t.layer))},e.prototype.handleLayersAdd_=function(t){var e=t.element;this.registerLayerListeners_(e),this.dispatchEvent(new m("addlayer",e)),this.changed()},e.prototype.handleLayersRemove_=function(t){var e=t.element,r=(0,f.sq)(e);this.listenerKeys_[r].forEach(g.bN),delete this.listenerKeys_[r],this.dispatchEvent(new m("removelayer",e)),this.changed()},e.prototype.getLayers=function(){return this.get(v)},e.prototype.setLayers=function(t){var e=this.getLayers();if(e)for(var r=e.getArray(),i=0,n=r.length;i<n;++i)this.dispatchEvent(new m("removelayer",r[i]));this.set(v,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:[],r=e.length;this.getLayers().forEach((function(t){t.getLayerStatesArray(e)}));var i=this.getLayerState(),n=i.zIndex;t||void 0!==i.zIndex||(n=0);for(var o=r,a=e.length;o<a;o++){var s=e[o];s.opacity*=i.opacity,s.visible=s.visible&&i.visible,s.maxResolution=Math.min(s.maxResolution,i.maxResolution),s.minResolution=Math.max(s.minResolution,i.minResolution),s.minZoom=Math.max(s.minZoom,i.minZoom),s.maxZoom=Math.min(s.maxZoom,i.maxZoom),void 0!==i.extent&&(void 0!==s.extent?s.extent=(0,d.getIntersection)(s.extent,i.extent):s.extent=i.extent),void 0===s.zIndex&&(s.zIndex=n)}return e},e.prototype.getSourceState=function(){return c.Z.READY},e}(n.Z)},3028:(t,e,r)=>{"use strict";r.d(e,{Z:()=>u});var i,n=r(1295),o=(i=function(t,e){return i=Object.setPrototypeOf||{__proto__:[]}instanceof Array&&function(t,e){t.__proto__=e}||function(t,e){for(var r in e)Object.prototype.hasOwnProperty.call(e,r)&&(t[r]=e[r])},i(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 r(){this.constructor=t}i(t,e),t.prototype=null===e?Object.create(e):(r.prototype=e.prototype,new r)});const a=function(t){function e(e){var r=e||{};return t.call(this,r)||this}return o(e,t),e}(n.Z);var s=r(9186),l=function(){var t=function(e,r){return t=Object.setPrototypeOf||{__proto__:[]}instanceof Array&&function(t,e){t.__proto__=e}||function(t,e){for(var r in e)Object.prototype.hasOwnProperty.call(e,r)&&(t[r]=e[r])},t(e,r)};return function(e,r){if("function"!=typeof r&&null!==r)throw new TypeError("Class extends value "+String(r)+" is not a constructor or null");function i(){this.constructor=e}t(e,r),e.prototype=null===r?Object.create(r):(i.prototype=r.prototype,new i)}}();const u=function(t){function e(e){return t.call(this,e)||this}return l(e,t),e.prototype.createRenderer=function(){return new s.Z(this)},e.prototype.getData=function(e){return t.prototype.getData.call(this,e)},e}(a)},1295:(t,e,r)=>{"use strict";r.d(e,{Z:()=>f,j:()=>d});var i,n=r(947),o=r(5487),a=r(1912),s=r(8771),l=r(4562),u=r(9515),c=r(9374),h=r(5818),p=(i=function(t,e){return i=Object.setPrototypeOf||{__proto__:[]}instanceof Array&&function(t,e){t.__proto__=e}||function(t,e){for(var r in e)Object.prototype.hasOwnProperty.call(e,r)&&(t[r]=e[r])},i(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 r(){this.constructor=t}i(t,e),t.prototype=null===e?Object.create(e):(r.prototype=e.prototype,new r)});function d(t,e){if(!t.visible)return!1;var r=e.resolution;if(r<t.minResolution||r>=t.maxResolution)return!1;var i=e.zoom;return i>t.minZoom&&i<=t.maxZoom}const f=function(t){function e(e){var r=this,i=(0,c.f0)({},e);delete i.source,(r=t.call(this,i)||this).on,r.once,r.un,r.mapPrecomposeKey_=null,r.mapRenderKey_=null,r.sourceChangeKey_=null,r.renderer_=null,r.rendered=!1,e.render&&(r.render=e.render),e.map&&r.setMap(e.map),r.addChangeListener(a.Z.SOURCE,r.handleSourcePropertyChange_);var n=e.source?e.source:null;return r.setSource(n),r}return p(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(a.Z.SOURCE)||null},e.prototype.getRenderSource=function(){return this.getSource()},e.prototype.getSourceState=function(){var t=this.getSource();return t?t.getState():l.Z.UNDEFINED},e.prototype.handleSourceChange_=function(){this.changed()},e.prototype.handleSourcePropertyChange_=function(){this.sourceChangeKey_&&((0,h.bN)(this.sourceChangeKey_),this.sourceChangeKey_=null);var t=this.getSource();t&&(this.sourceChangeKey_=(0,h.oL)(t,o.Z.CHANGE,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.getData=function(t){return this.renderer_&&this.rendered?this.renderer_.getData(t):null},e.prototype.render=function(t,e){var r=this.getRenderer();if(r.prepareFrame(t))return this.rendered=!0,r.renderFrame(t,e)},e.prototype.unrender=function(){this.rendered=!1},e.prototype.setMapInternal=function(t){t||this.unrender(),this.set(a.Z.MAP,t)},e.prototype.getMapInternal=function(){return this.get(a.Z.MAP)},e.prototype.setMap=function(t){this.mapPrecomposeKey_&&((0,h.bN)(this.mapPrecomposeKey_),this.mapPrecomposeKey_=null),t||this.changed(),this.mapRenderKey_&&((0,h.bN)(this.mapRenderKey_),this.mapRenderKey_=null),t&&(this.mapPrecomposeKey_=(0,h.oL)(t,s.Z.PRECOMPOSE,(function(t){var e=t.frameState.layerStatesArray,r=this.getLayerState(!1);(0,u.h)(!e.some((function(t){return t.layer===r.layer})),67),e.push(r)}),this),this.mapRenderKey_=(0,h.oL)(this,o.Z.CHANGE,t.render,t),this.changed())},e.prototype.setSource=function(t){this.set(a.Z.SOURCE,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.renderer_&&(this.renderer_.dispose(),delete this.renderer_),this.setSource(null),t.prototype.disposeInternal.call(this)},e}(n.Z)},1912:(t,e,r)=>{"use strict";r.d(e,{Z:()=>i});const i={OPACITY:"opacity",VISIBLE:"visible",EXTENT:"extent",Z_INDEX:"zIndex",MAX_RESOLUTION:"maxResolution",MIN_RESOLUTION:"minResolution",MAX_ZOOM:"maxZoom",MIN_ZOOM:"minZoom",SOURCE:"source",MAP:"map"}},1666:(t,e,r)=>{"use strict";r.d(e,{Z:()=>s});var i,n=r(4272),o=r(8845),a=(i=function(t,e){return i=Object.setPrototypeOf||{__proto__:[]}instanceof Array&&function(t,e){t.__proto__=e}||function(t,e){for(var r in e)Object.prototype.hasOwnProperty.call(e,r)&&(t[r]=e[r])},i(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 r(){this.constructor=t}i(t,e),t.prototype=null===e?Object.create(e):(r.prototype=e.prototype,new r)});const s=function(t){function e(e){return t.call(this,e)||this}return a(e,t),e.prototype.createRenderer=function(){return new o.Z(this)},e}(n.Z)},8280:(t,e,r)=>{"use strict";r.d(e,{Z:()=>i});const i={PRELOAD:"preload",USE_INTERIM_TILES_ON_ERROR:"useInterimTilesOnError"}},2371:(t,e,r)=>{"use strict";r.d(e,{Z:()=>s});var i,n=r(2563),o=r(5682),a=(i=function(t,e){return i=Object.setPrototypeOf||{__proto__:[]}instanceof Array&&function(t,e){t.__proto__=e}||function(t,e){for(var r in e)Object.prototype.hasOwnProperty.call(e,r)&&(t[r]=e[r])},i(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 r(){this.constructor=t}i(t,e),t.prototype=null===e?Object.create(e):(r.prototype=e.prototype,new r)});const s=function(t){function e(e){return t.call(this,e)||this}return a(e,t),e.prototype.createRenderer=function(){return new o.Z(this)},e}(n.Z)},4087:(t,e,r)=>{"use strict";function i(t,e){return[[-1/0,-1/0,1/0,1/0]]}r.d(e,{$6:()=>i}),r(6121)},3983:(t,e,r)=>{"use strict";function i(t,e,r){return Math.min(Math.max(t,e),r)}r.d(e,{$W:()=>h,GW:()=>g,NM:()=>f,SV:()=>l,Ux:()=>u,Yr:()=>c,bI:()=>s,f9:()=>n,k3:()=>o,mD:()=>y,rU:()=>a,t7:()=>p,uZ:()=>i});var n="cosh"in Math?Math.cosh:function(t){var e=Math.exp(t);return(e+1/e)/2},o="log2"in Math?Math.log2:function(t){return Math.log(t)*Math.LOG2E};function a(t,e,r,i,n,o){var a=n-r,l=o-i;if(0!==a||0!==l){var u=((t-r)*a+(e-i)*l)/(a*a+l*l);u>1?(r=n,i=o):u>0&&(r+=a*u,i+=l*u)}return s(t,e,r,i)}function s(t,e,r,i){var n=r-t,o=i-e;return n*n+o*o}function l(t){for(var e=t.length,r=0;r<e;r++){for(var i=r,n=Math.abs(t[r][r]),o=r+1;o<e;o++){var a=Math.abs(t[o][r]);a>n&&(n=a,i=o)}if(0===n)return null;var s=t[i];t[i]=t[r],t[r]=s;for(var l=r+1;l<e;l++)for(var u=-t[l][r]/t[r][r],c=r;c<e+1;c++)r==c?t[l][c]=0:t[l][c]+=u*t[r][c]}for(var h=new Array(e),p=e-1;p>=0;p--){h[p]=t[p][e]/t[p][p];for(var d=p-1;d>=0;d--)t[d][e]-=t[d][p]*h[p]}return h}function u(t){return 180*t/Math.PI}function c(t){return t*Math.PI/180}function h(t,e){var r=t%e;return r*e<0?r+e:r}function p(t,e,r){return t+r*(e-t)}function d(t,e){var r=Math.pow(10,e);return Math.round(t*r)/r}function f(t,e){return Math.round(d(t,e))}function g(t,e){return Math.floor(d(t,e))}function y(t,e){return Math.ceil(d(t,e))}},3315:(t,e,r)=>{"use strict";r.d(e,{R6:()=>s});var i,n,o=r(4187),a=(i=function(t,e){return i=Object.setPrototypeOf||{__proto__:[]}instanceof Array&&function(t,e){t.__proto__=e}||function(t,e){for(var r in e)Object.prototype.hasOwnProperty.call(e,r)&&(t[r]=e[r])},i(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 r(){this.constructor=t}i(t,e),t.prototype=null===e?Object.create(e):(r.prototype=e.prototype,new r)});function s(t,e,r,i){var n=document.createElement("script"),a="olc_"+(0,o.sq)(e);function s(){delete window[a],n.parentNode.removeChild(n)}n.async=!0,n.src=t+(-1==t.indexOf("?")?"?":"&")+(i||"callback")+"="+a;var l=setTimeout((function(){s(),r&&r()}),1e4);window[a]=function(t){clearTimeout(l),s(),e(t)},document.getElementsByTagName("head")[0].appendChild(n)}n=Error,a((function(t){var e=this,r="Unexpected response status: "+t.status;return(e=n.call(this,r)||this).name="ResponseError",e.response=t,e}),n),function(t){a((function(e){var r=t.call(this,"Failed to issue request")||this;return r.name="ClientError",r.client=e,r}),t)}(Error)},9374:(t,e,r)=>{"use strict";r.d(e,{KX:()=>o,ZH:()=>n,f0:()=>i,xb:()=>a});var i="function"==typeof Object.assign?Object.assign:function(t,e){if(null==t)throw new TypeError("Cannot convert undefined or null to object");for(var r=Object(t),i=1,n=arguments.length;i<n;++i){var o=arguments[i];if(null!=o)for(var a in o)o.hasOwnProperty(a)&&(r[a]=o[a])}return r};function n(t){for(var e in t)delete t[e]}var o="function"==typeof Object.values?Object.values:function(t){var e=[];for(var r in t)e.push(t[r]);return e};function a(t){var e;for(e in t)return!1;return!e}},4238:(t,e,r)=>{"use strict";r.d(e,{Z:()=>i});const i={POINTERMOVE:"pointermove",POINTERDOWN:"pointerdown",POINTERUP:"pointerup",POINTEROVER:"pointerover",POINTEROUT:"pointerout",POINTERENTER:"pointerenter",POINTERLEAVE:"pointerleave",POINTERCANCEL:"pointercancel"}},6121:(t,e,r)=>{"use strict";r.r(e),r.d(e,{METERS_PER_UNIT:()=>n.Wm,Projection:()=>i.Z,addCommon:()=>X,addCoordinateTransforms:()=>C,addEquivalentProjections:()=>b,addEquivalentTransforms:()=>w,addProjection:()=>m,addProjections:()=>v,clearAllProjections:()=>E,clearUserProjection:()=>j,cloneTransform:()=>g,createProjection:()=>T,createSafeCoordinateTransform:()=>W,createTransformFromCoordinateTransform:()=>S,disableCoordinateWarning:()=>f,equivalent:()=>I,fromLonLat:()=>O,fromUserCoordinate:()=>z,fromUserExtent:()=>B,fromUserResolution:()=>V,get:()=>_,getPointResolution:()=>x,getTransform:()=>L,getTransformFromProjections:()=>P,getUserProjection:()=>D,identityTransform:()=>y,setUserProjection:()=>k,toLonLat:()=>R,toUserCoordinate:()=>G,toUserExtent:()=>U,toUserResolution:()=>q,transform:()=>A,transformExtent:()=>M,transformWithProjections:()=>F,useGeographic:()=>N});var i=r(9619),n=r(8375),o=r(5984),a=r(6740),s=r(8920),l=r(9556),u=r(8641),c=r(3983),h=r(1900),p=r(7580),d=!0;function f(t){d=!(void 0===t||t)}function g(t,e,r){var i;if(void 0!==e){for(var n=0,o=t.length;n<o;++n)e[n]=t[n];i=e}else i=t.slice();return i}function y(t,e,r){if(void 0!==e&&t!==e){for(var i=0,n=t.length;i<n;++i)e[i]=t[i];t=e}return t}function m(t){(0,s.IH)(t.getCode(),t),(0,l.IH)(t,t,g)}function v(t){t.forEach(m)}function _(t){return"string"==typeof t?(0,s.U2)(t):t||null}function x(t,e,r,i){var o,a=(t=_(t)).getPointResolutionFunc();if(a)o=a(e,r),i&&i!==t.getUnits()&&(l=t.getMetersPerUnit())&&(o=o*l/n.Wm[i]);else{var s=t.getUnits();if(s==n.ZP.DEGREES&&!i||i==n.ZP.DEGREES)o=e;else{var l,u=P(t,_("EPSG:4326"));if(u===y&&s!==n.ZP.DEGREES)o=e*t.getMetersPerUnit();else{var c=[r[0]-e/2,r[1],r[0]+e/2,r[1],r[0],r[1]-e/2,r[0],r[1]+e/2];c=u(c,c,2),o=((0,p.Sp)(c.slice(0,2),c.slice(2,4))+(0,p.Sp)(c.slice(4,6),c.slice(6,8)))/2}void 0!==(l=i?n.Wm[i]:t.getMetersPerUnit())&&(o/=l)}}return o}function b(t){v(t),t.forEach((function(e){t.forEach((function(t){e!==t&&(0,l.IH)(e,t,g)}))}))}function w(t,e,r,i){t.forEach((function(t){e.forEach((function(e){(0,l.IH)(t,e,r),(0,l.IH)(e,t,i)}))}))}function E(){(0,s.ZH)(),(0,l.ZH)()}function T(t,e){return t?"string"==typeof t?_(t):t:_(e)}function S(t){return function(e,r,i){for(var n=e.length,o=void 0!==i?i:2,a=void 0!==r?r:new Array(n),s=0;s<n;s+=o){var l=t([e[s],e[s+1]]);a[s]=l[0],a[s+1]=l[1];for(var u=o-1;u>=2;--u)a[s+u]=e[s+u]}return a}}function C(t,e,r,i){var n=_(t),o=_(e);(0,l.IH)(n,o,S(r)),(0,l.IH)(o,n,S(i))}function O(t,e){return f(),A(t,"EPSG:4326",void 0!==e?e:"EPSG:3857")}function R(t,e){var r=A(t,void 0!==e?e:"EPSG:3857","EPSG:4326"),i=r[0];return(i<-180||i>180)&&(r[0]=(0,c.$W)(i+180,360)-180),r}function I(t,e){if(t===e)return!0;var r=t.getUnits()===e.getUnits();return(t.getCode()===e.getCode()||P(t,e)===g)&&r}function P(t,e){var r=t.getCode(),i=e.getCode(),n=(0,l.U2)(r,i);return n||(n=y),n}function L(t,e){return P(_(t),_(e))}function A(t,e,r){return L(e,r)(t,void 0,t.length)}function M(t,e,r,i){var n=L(e,r);return(0,u.applyTransform)(t,n,void 0,i)}function F(t,e,r){return P(e,r)(t)}var Z=null;function k(t){Z=_(t)}function j(){Z=null}function D(){return Z}function N(){k("EPSG:4326")}function G(t,e){return Z?A(t,e,Z):t}function z(t,e){return Z?A(t,Z,e):(d&&!(0,h.fS)(t,[0,0])&&t[0]>=-180&&t[0]<=180&&t[1]>=-90&&t[1]<=90&&(d=!1,console.warn("Call useGeographic() from ol/proj once to work with [longitude, latitude] coordinates.")),t)}function U(t,e){return Z?M(t,e,Z):t}function B(t,e){return Z?M(t,Z,e):t}function q(t,e){if(!Z)return t;var r=_(e).getUnits(),i=Z.getUnits();return r&&i?t*n.Wm[r]/n.Wm[i]:t}function V(t,e){if(!Z)return t;var r=_(e).getUnits(),i=Z.getUnits();return r&&i?t*n.Wm[i]/n.Wm[r]:t}function W(t,e,r){return function(i){var n,o,a=i[0],s=i[1];if(t.canWrapX()){var l=t.getExtent(),p=(0,u.getWidth)(l);(o=(0,h.jk)(i,t,p))&&(a-=o*p),a=(0,c.uZ)(a,l[0],l[2]),s=(0,c.uZ)(s,l[1],l[3]),n=r([a,s])}else n=r(i);return o&&e.canWrapX()&&(n[0]+=o*(0,u.getWidth)(e.getExtent())),n}}function X(){b(o.LB),b(a.LB),w(a.LB,o.LB,o.jn,o.DE)}X()},9619:(t,e,r)=>{"use strict";r.d(e,{Z:()=>n});var i=r(8375);const n=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_||i.Wm[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}()},8375:(t,e,r)=>{"use strict";r.d(e,{Ne:()=>o,Wm:()=>a,ZP:()=>s});var i={RADIANS:"radians",DEGREES:"degrees",FEET:"ft",METERS:"m",PIXELS:"pixels",TILE_PIXELS:"tile-pixels",USFEET:"us-ft"},n={9001:i.METERS,9002:i.FEET,9003:i.USFEET,9101:i.RADIANS,9102:i.DEGREES};function o(t){return n[t]}var a={};a[i.RADIANS]=6370997/(2*Math.PI),a[i.DEGREES]=2*Math.PI*6370997/360,a[i.FEET]=.3048,a[i.METERS]=1,a[i.USFEET]=1200/3937;const s=i},5984:(t,e,r)=>{"use strict";r.d(e,{DE:()=>y,LB:()=>f,jn:()=>g});var i,n=r(9619),o=r(8375),a=r(3983),s=(i=function(t,e){return i=Object.setPrototypeOf||{__proto__:[]}instanceof Array&&function(t,e){t.__proto__=e}||function(t,e){for(var r in e)Object.prototype.hasOwnProperty.call(e,r)&&(t[r]=e[r])},i(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 r(){this.constructor=t}i(t,e),t.prototype=null===e?Object.create(e):(r.prototype=e.prototype,new r)}),l=6378137,u=Math.PI*l,c=[-u,-u,u,u],h=[-180,-85,180,85],p=l*Math.log(Math.tan(Math.PI/2)),d=function(t){function e(e){return t.call(this,{code:e,units:o.ZP.METERS,extent:c,global:!0,worldExtent:h,getPointResolution:function(t,e){return t/(0,a.f9)(e[1]/l)}})||this}return s(e,t),e}(n.Z),f=[new d("EPSG:3857"),new d("EPSG:102100"),new d("EPSG:102113"),new d("EPSG:900913"),new d("http://www.opengis.net/def/crs/EPSG/0/3857"),new d("http://www.opengis.net/gml/srs/epsg.xml#3857")];function g(t,e,r){var i=t.length,n=r>1?r:2,o=e;void 0===o&&(o=n>2?t.slice():new Array(i));for(var a=0;a<i;a+=n){o[a]=u*t[a]/180;var s=l*Math.log(Math.tan(Math.PI*(+t[a+1]+90)/360));s>p?s=p:s<-p&&(s=-p),o[a+1]=s}return o}function y(t,e,r){var i=t.length,n=r>1?r:2,o=e;void 0===o&&(o=n>2?t.slice():new Array(i));for(var a=0;a<i;a+=n)o[a]=180*t[a]/u,o[a+1]=360*Math.atan(Math.exp(t[a+1]/l))/Math.PI-90;return o}},6740:(t,e,r)=>{"use strict";r.d(e,{LB:()=>c});var i,n=r(9619),o=r(8375),a=(i=function(t,e){return i=Object.setPrototypeOf||{__proto__:[]}instanceof Array&&function(t,e){t.__proto__=e}||function(t,e){for(var r in e)Object.prototype.hasOwnProperty.call(e,r)&&(t[r]=e[r])},i(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 r(){this.constructor=t}i(t,e),t.prototype=null===e?Object.create(e):(r.prototype=e.prototype,new r)}),s=[-180,-90,180,90],l=6378137*Math.PI/180,u=function(t){function e(e,r){return t.call(this,{code:e,units:o.ZP.DEGREES,extent:s,axisOrientation:r,global:!0,metersPerUnit:l,worldExtent:s})||this}return a(e,t),e}(n.Z),c=[new u("CRS:84"),new u("EPSG:4326","neu"),new u("urn:ogc:def:crs:OGC:1.3:CRS84"),new u("urn:ogc:def:crs:OGC:2:84"),new u("http://www.opengis.net/def/crs/OGC/1.3/CRS84"),new u("http://www.opengis.net/gml/srs/epsg.xml#4326","neu"),new u("http://www.opengis.net/def/crs/EPSG/0/4326","neu")]},8920:(t,e,r)=>{"use strict";r.d(e,{IH:()=>a,U2:()=>o,ZH:()=>n});var i={};function n(){i={}}function o(t){return i[t]||i[t.replace(/urn:(x-)?ogc:def:crs:EPSG:(.*:)?(\w+)$/,"EPSG:$3")]||null}function a(t,e){i[t]=e}},9556:(t,e,r)=>{"use strict";r.d(e,{IH:()=>o,U2:()=>a,ZH:()=>n});var i={};function n(){i={}}function o(t,e,r){var n=t.getCode(),o=e.getCode();n in i||(i[n]={}),i[n][o]=r}function a(t,e){var r;return t in i&&e in i[t]&&(r=i[t][e]),r}},747:(t,e,r)=>{"use strict";r.d(e,{Z:()=>s});var i,n=r(5431),o=r(2033),a=(i=function(t,e){return i=Object.setPrototypeOf||{__proto__:[]}instanceof Array&&function(t,e){t.__proto__=e}||function(t,e){for(var r in e)Object.prototype.hasOwnProperty.call(e,r)&&(t[r]=e[r])},i(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 r(){this.constructor=t}i(t,e),t.prototype=null===e?Object.create(e):(r.prototype=e.prototype,new r)});const s=function(t){function e(e){var r=t.call(this)||this;return r.geometry_=null,r.element_=document.createElement("div"),r.element_.style.position="absolute",r.element_.style.pointerEvents="auto",r.element_.className="ol-box "+e,r.map_=null,r.startPixel_=null,r.endPixel_=null,r}return a(e,t),e.prototype.disposeInternal=function(){this.setMap(null)},e.prototype.render_=function(){var t=this.startPixel_,e=this.endPixel_,r="px",i=this.element_.style;i.left=Math.min(t[0],e[0])+r,i.top=Math.min(t[1],e[1])+r,i.width=Math.abs(e[0]-t[0])+r,i.height=Math.abs(e[1]-t[1])+r},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_,r=[t,[t[0],e[1]],e,[e[0],t[1]]].map(this.map_.getCoordinateFromPixelInternal,this.map_);r[4]=r[0].slice(),this.geometry_?this.geometry_.setCoordinates([r]):this.geometry_=new o.ZP([r])},e.prototype.getGeometry=function(){return this.geometry_},e}(n.Z)},7380:(t,e,r)=>{"use strict";r.d(e,{Z:()=>a});var i,n=r(291),o=(i=function(t,e){return i=Object.setPrototypeOf||{__proto__:[]}instanceof Array&&function(t,e){t.__proto__=e}||function(t,e){for(var r in e)Object.prototype.hasOwnProperty.call(e,r)&&(t[r]=e[r])},i(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 r(){this.constructor=t}i(t,e),t.prototype=null===e?Object.create(e):(r.prototype=e.prototype,new r)});const a=function(t){function e(e,r,i,n){var o=t.call(this,e)||this;return o.inversePixelTransform=r,o.frameState=i,o.context=n,o}return o(e,t),e}(n.ZP)},8771:(t,e,r)=>{"use strict";r.d(e,{Z:()=>i});const i={PRERENDER:"prerender",POSTRENDER:"postrender",PRECOMPOSE:"precompose",POSTCOMPOSE:"postcompose",RENDERCOMPLETE:"rendercomplete"}},5624:(t,e,r)=>{"use strict";r.d(e,{Z:()=>i});const i=function(){function t(){}return t.prototype.drawCustom=function(t,e,r,i){},t.prototype.drawGeometry=function(t){},t.prototype.setStyle=function(t){},t.prototype.drawCircle=function(t,e){},t.prototype.drawFeature=function(t,e){},t.prototype.drawGeometryCollection=function(t,e){},t.prototype.drawLineString=function(t,e){},t.prototype.drawMultiLineString=function(t,e){},t.prototype.drawMultiPoint=function(t,e){},t.prototype.drawMultiPolygon=function(t,e){},t.prototype.drawPoint=function(t,e){},t.prototype.drawPolygon=function(t,e){},t.prototype.drawText=function(t,e){},t.prototype.setFillStrokeStyle=function(t,e){},t.prototype.setImageStyle=function(t,e){},t.prototype.setTextStyle=function(t,e){},t}()},147:(t,e,r)=>{"use strict";r.d(e,{Df:()=>u,GK:()=>w,He:()=>d,Kd:()=>L,PH:()=>m,Qx:()=>O,Tx:()=>y,V4:()=>g,X9:()=>p,Zw:()=>A,_f:()=>M,bL:()=>c,mb:()=>h,oB:()=>_,rc:()=>f,ru:()=>v,sG:()=>b,yC:()=>x});var i=r(2971),n=r(208),o=r(177),a=r(9374),s=r(8326),l=r(245),u="10px sans-serif",c="#000",h="round",p=[],d=0,f="round",g=10,y="#000",m="center",v="middle",_=[0,0,0,0],x=1,b=new i.Z,w=new n.Z;w.setSize=function(){console.warn("labelCache is deprecated.")};var E,T,S=null,C={},O=function(){var t,e,r="32px ",i=["monospace","serif"],n=i.length,o="wmytzilWMYTZIL@#/&?$%10";function s(t,a,s){for(var l=!0,u=0;u<n;++u){var c=i[u];if(e=P(t+" "+a+" "+r+c,o),s!=c){var h=P(t+" "+a+" "+r+s+","+c,o);l=l&&h!=e}}return!!l}function u(){for(var e=!0,r=b.getKeys(),i=0,n=r.length;i<n;++i){var o=r[i];b.get(o)<100&&(s.apply(this,o.split("\n"))?((0,a.ZH)(C),S=null,E=void 0,b.set(o,100)):(b.set(o,b.get(o)+1,!0),e=!1))}e&&(clearInterval(t),t=void 0)}return function(e){var r=(0,l.p)(e);if(r)for(var i=r.families,n=0,o=i.length;n<o;++n){var a=i[n],c=r.style+"\n"+r.weight+"\n"+a;void 0===b.get(c)&&(b.set(c,100,!0),s(r.style,r.weight,a)||(b.set(c,0,!0),void 0===t&&(t=setInterval(u,32))))}}}(),R=function(t){var e=C[t];if(null==e){if(o.Id){var r=(0,l.p)(t),i=I(t,"Žg");e=(isNaN(Number(r.lineHeight))?1.2:Number(r.lineHeight))*(i.actualBoundingBoxAscent+i.actualBoundingBoxDescent)}else T||((T=document.createElement("div")).innerHTML="M",T.style.minHeight="0",T.style.maxHeight="none",T.style.height="auto",T.style.padding="0",T.style.border="none",T.style.position="absolute",T.style.display="block",T.style.left="-99999px"),T.style.font=t,document.body.appendChild(T),e=T.offsetHeight,document.body.removeChild(T);C[t]=e}return e};function I(t,e){return S||(S=(0,s.E4)(1,1)),t!=E&&(S.font=t,E=S.font),S.measureText(e)}function P(t,e){return I(t,e).width}function L(t,e,r){if(e in r)return r[e];var i=P(t,e);return r[e]=i,i}function A(t,e){for(var r=[],i=[],n=[],o=0,a=0,s=0,l=0,u=0,c=e.length;u<=c;u+=2){var h=e[u];if("\n"!==h&&u!==c){var p=e[u+1]||t.font,d=P(p,h);r.push(d),a+=d;var f=R(p);i.push(f),l=Math.max(l,f)}else o=Math.max(o,a),n.push(a),a=0,s+=l}return{width:o,height:s,widths:r,heights:i,lineWidths:n}}function M(t,e,r,i,n,o,a,s,l,u,c){t.save(),1!==r&&(t.globalAlpha*=r),e&&t.setTransform.apply(t,e),i.contextInstructions?(t.translate(l,u),t.scale(c[0],c[1]),function(t,e){for(var r=t.contextInstructions,i=0,n=r.length;i<n;i+=2)Array.isArray(r[i+1])?e[r[i]].apply(e,r[i+1]):e[r[i]]=r[i+1]}(i,t)):c[0]<0||c[1]<0?(t.translate(l,u),t.scale(c[0],c[1]),t.drawImage(i,n,o,a,s,0,0,a,s)):t.drawImage(i,n,o,a,s,l,u,a*c[0],s*c[1]),t.restore()}},9557:(t,e,r)=>{"use strict";r.d(e,{Z:()=>f});var i,n=r(5707),o=r(4754),a=r(8716),s=r(5624),l=r(6620),u=r(8641),c=r(147),h=r(5537),p=r(9241),d=(i=function(t,e){return i=Object.setPrototypeOf||{__proto__:[]}instanceof Array&&function(t,e){t.__proto__=e}||function(t,e){for(var r in e)Object.prototype.hasOwnProperty.call(e,r)&&(t[r]=e[r])},i(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 r(){this.constructor=t}i(t,e),t.prototype=null===e?Object.create(e):(r.prototype=e.prototype,new r)});const f=function(t){function e(e,r,i,n){var o=t.call(this)||this;return o.tolerance=e,o.maxExtent=r,o.pixelRatio=n,o.maxLineWidth=0,o.resolution=i,o.beginGeometryInstruction1_=null,o.beginGeometryInstruction2_=null,o.bufferedMaxExtent_=null,o.instructions=[],o.coordinates=[],o.tmpCoordinate_=[],o.hitDetectionInstructions=[],o.state={},o}return d(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 r=this.getBufferedMaxExtent(),i=this.tmpCoordinate_,n=this.coordinates,o=n.length,a=0,s=t.length;a<s;a+=e)i[0]=t[a],i[1]=t[a+1],(0,u.containsCoordinate)(r,i)&&(n[o++]=i[0],n[o++]=i[1]);return o},e.prototype.appendFlatLineCoordinates=function(t,e,r,i,n,o){var s=this.coordinates,l=s.length,c=this.getBufferedMaxExtent();o&&(e+=i);var h,p,d,f=t[e],g=t[e+1],y=this.tmpCoordinate_,m=!0;for(h=e+i;h<r;h+=i)y[0]=t[h],y[1]=t[h+1],(d=(0,u.coordinateRelationship)(c,y))!==p?(m&&(s[l++]=f,s[l++]=g,m=!1),s[l++]=y[0],s[l++]=y[1]):d===a.Z.INTERSECTING?(s[l++]=y[0],s[l++]=y[1],m=!1):m=!0,f=y[0],g=y[1],p=d;return(n&&m||h===e+i)&&(s[l++]=f,s[l++]=g),l},e.prototype.drawCustomCoordinates_=function(t,e,r,i,n){for(var o=0,a=r.length;o<a;++o){var s=r[o],l=this.appendFlatLineCoordinates(t,e,s,i,!1,!1);n.push(l),e=s}return e},e.prototype.drawCustom=function(t,e,r,i){this.beginGeometry(t,e);var a,s,l,u,c,h=t.getType(),d=t.getStride(),f=this.coordinates.length;switch(h){case o.Z.MULTI_POLYGON:a=t.getOrientedFlatCoordinates(),u=[];var g=t.getEndss();c=0;for(var y=0,m=g.length;y<m;++y){var v=[];c=this.drawCustomCoordinates_(a,c,g[y],d,v),u.push(v)}this.instructions.push([n.ZP.CUSTOM,f,u,t,r,p.ug]),this.hitDetectionInstructions.push([n.ZP.CUSTOM,f,u,t,i||r,p.ug]);break;case o.Z.POLYGON:case o.Z.MULTI_LINE_STRING:l=[],a=h==o.Z.POLYGON?t.getOrientedFlatCoordinates():t.getFlatCoordinates(),c=this.drawCustomCoordinates_(a,0,t.getEnds(),d,l),this.instructions.push([n.ZP.CUSTOM,f,l,t,r,p.o1]),this.hitDetectionInstructions.push([n.ZP.CUSTOM,f,l,t,i||r,p.o1]);break;case o.Z.LINE_STRING:case o.Z.CIRCLE:a=t.getFlatCoordinates(),s=this.appendFlatLineCoordinates(a,0,a.length,d,!1,!1),this.instructions.push([n.ZP.CUSTOM,f,s,t,r,p.Ml]),this.hitDetectionInstructions.push([n.ZP.CUSTOM,f,s,t,i||r,p.Ml]);break;case o.Z.MULTI_POINT:a=t.getFlatCoordinates(),(s=this.appendFlatPointCoordinates(a,d))>f&&(this.instructions.push([n.ZP.CUSTOM,f,s,t,r,p.Ml]),this.hitDetectionInstructions.push([n.ZP.CUSTOM,f,s,t,i||r,p.Ml]));break;case o.Z.POINT:a=t.getFlatCoordinates(),this.coordinates.push(a[0],a[1]),s=this.coordinates.length,this.instructions.push([n.ZP.CUSTOM,f,s,t,r]),this.hitDetectionInstructions.push([n.ZP.CUSTOM,f,s,t,i||r])}this.endGeometry(e)},e.prototype.beginGeometry=function(t,e){this.beginGeometryInstruction1_=[n.ZP.BEGIN_GEOMETRY,e,0,t],this.instructions.push(this.beginGeometryInstruction1_),this.beginGeometryInstruction2_=[n.ZP.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 r,i,o=e.length,a=-1;for(t=0;t<o;++t)(i=(r=e[t])[0])==n.ZP.END_GEOMETRY?a=t:i==n.ZP.BEGIN_GEOMETRY&&(r[2]=t,(0,h.FZ)(this.hitDetectionInstructions,a,t),a=-1)},e.prototype.setFillStrokeStyle=function(t,e){var r=this.state;if(t){var i=t.getColor();r.fillStyle=(0,l.y)(i||c.bL)}else r.fillStyle=void 0;if(e){var n=e.getColor();r.strokeStyle=(0,l.y)(n||c.Tx);var o=e.getLineCap();r.lineCap=void 0!==o?o:c.mb;var a=e.getLineDash();r.lineDash=a?a.slice():c.X9;var s=e.getLineDashOffset();r.lineDashOffset=s||c.He;var u=e.getLineJoin();r.lineJoin=void 0!==u?u:c.rc;var h=e.getWidth();r.lineWidth=void 0!==h?h:c.yC;var p=e.getMiterLimit();r.miterLimit=void 0!==p?p:c.V4,r.lineWidth>this.maxLineWidth&&(this.maxLineWidth=r.lineWidth,this.bufferedMaxExtent_=null)}else r.strokeStyle=void 0,r.lineCap=void 0,r.lineDash=null,r.lineDashOffset=void 0,r.lineJoin=void 0,r.lineWidth=void 0,r.miterLimit=void 0},e.prototype.createFill=function(t){var e=t.fillStyle,r=[n.ZP.SET_FILL_STYLE,e];return"string"!=typeof e&&r.push(!0),r},e.prototype.applyStroke=function(t){this.instructions.push(this.createStroke(t))},e.prototype.createStroke=function(t){return[n.ZP.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 r=t.fillStyle;"string"==typeof r&&t.currentFillStyle==r||(void 0!==r&&this.instructions.push(e.call(this,t)),t.currentFillStyle=r)},e.prototype.updateStrokeStyle=function(t,e){var r=t.strokeStyle,i=t.lineCap,n=t.lineDash,o=t.lineDashOffset,a=t.lineJoin,s=t.lineWidth,l=t.miterLimit;(t.currentStrokeStyle!=r||t.currentLineCap!=i||n!=t.currentLineDash&&!(0,h.fS)(t.currentLineDash,n)||t.currentLineDashOffset!=o||t.currentLineJoin!=a||t.currentLineWidth!=s||t.currentMiterLimit!=l)&&(void 0!==r&&e.call(this,t),t.currentStrokeStyle=r,t.currentLineCap=i,t.currentLineDash=n,t.currentLineDashOffset=o,t.currentLineJoin=a,t.currentLineWidth=s,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=[n.ZP.END_GEOMETRY,t];this.instructions.push(e),this.hitDetectionInstructions.push(e)},e.prototype.getBufferedMaxExtent=function(){if(!this.bufferedMaxExtent_&&(this.bufferedMaxExtent_=(0,u.clone)(this.maxExtent),this.maxLineWidth>0)){var t=this.resolution*(this.maxLineWidth+1)/2;(0,u.buffer)(this.bufferedMaxExtent_,t,this.bufferedMaxExtent_)}return this.bufferedMaxExtent_},e}(s.Z)},1328:(t,e,r)=>{"use strict";r.d(e,{Z:()=>u});var i=r(9557),n=r(3206),o=r(5014),a=r(9353),s=r(7043),l={Circle:a.Z,Default:i.Z,Image:n.Z,LineString:o.Z,Polygon:a.Z,Text:s.Z};const u=function(){function t(t,e,r,i){this.tolerance_=t,this.maxExtent_=e,this.pixelRatio_=i,this.resolution_=r,this.buildersByZIndex_={}}return t.prototype.finish=function(){var t={};for(var e in this.buildersByZIndex_){t[e]=t[e]||{};var r=this.buildersByZIndex_[e];for(var i in r){var n=r[i].finish();t[e][i]=n}}return t},t.prototype.getBuilder=function(t,e){var r=void 0!==t?t.toString():"0",i=this.buildersByZIndex_[r];void 0===i&&(i={},this.buildersByZIndex_[r]=i);var n=i[e];return void 0===n&&(n=new(0,l[e])(this.tolerance_,this.maxExtent_,this.resolution_,this.pixelRatio_),i[e]=n),n},t}()},2286:(t,e,r)=>{"use strict";r.d(e,{Z:()=>i});const i={CIRCLE:"Circle",DEFAULT:"Default",IMAGE:"Image",LINE_STRING:"LineString",POLYGON:"Polygon",TEXT:"Text"}},613:(t,e,r)=>{"use strict";r.d(e,{Z:()=>w});var i=r(5707),n=r(7043),o=r(177),a=r(6101),s=r(8641),l=r(147),u=r(7396),c=r(5537),h=r(7374),p=r(6442),d=(0,s.createEmpty)(),f=[],g=[],y=[],m=[];function v(t){return t[3].declutterBox}var _=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 x(t,e){return"start"!==e&&"end"!==e||_.test(t)||(e="start"===e?"left":"right"),n.I[e]}function b(t,e,r){return r>0&&t.push("\n",""),t.push(e,""),t}const w=function(){function t(t,e,r,i){this.overlaps=r,this.pixelRatio=e,this.resolution=t,this.alignFill_,this.instructions=i.instructions,this.coordinates=i.coordinates,this.coordinateCache_={},this.renderedTransform_=(0,a.Ue)(),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,r,i){var n=t+e+r+i;if(this.labels_[n])return this.labels_[n];var a=i?this.strokeStates[i]:null,s=r?this.fillStates[r]:null,u=this.textStates[e],c=this.pixelRatio,h=[u.scale[0]*c,u.scale[1]*c],p=Array.isArray(t),d=x(p?t[0]:t,u.textAlign||l.PH),f=i&&a.lineWidth?a.lineWidth:0,g=p?t:t.split("\n").reduce(b,[]),y=(0,l.Zw)(u,g),m=y.width,v=y.height,_=y.widths,w=y.heights,E=y.lineWidths,T=m+f,S=[],C=(T+2)*h[0],O=(v+f)*h[1],R={width:C<0?Math.floor(C):Math.ceil(C),height:O<0?Math.floor(O):Math.ceil(O),contextInstructions:S};1==h[0]&&1==h[1]||S.push("scale",h),i&&(S.push("strokeStyle",a.strokeStyle),S.push("lineWidth",f),S.push("lineCap",a.lineCap),S.push("lineJoin",a.lineJoin),S.push("miterLimit",a.miterLimit),(o.Id?OffscreenCanvasRenderingContext2D:CanvasRenderingContext2D).prototype.setLineDash&&(S.push("setLineDash",[a.lineDash]),S.push("lineDashOffset",a.lineDashOffset))),r&&S.push("fillStyle",s.fillStyle),S.push("textBaseline","middle"),S.push("textAlign","center");for(var I,P=.5-d,L=d*T+P*f,A=[],M=[],F=0,Z=0,k=0,j=0,D=0,N=g.length;D<N;D+=2){var G=g[D];if("\n"!==G){var z=g[D+1]||u.font;z!==I&&(i&&A.push("font",z),r&&M.push("font",z),I=z),F=Math.max(F,w[k]);var U=[G,L+P*_[k]+d*(_[k]-E[j]),.5*(f+F)+Z];L+=_[k],i&&A.push("strokeText",U),r&&M.push("fillText",U),++k}else Z+=F,F=0,L=d*T+P*f,++j}return Array.prototype.push.apply(S,A),Array.prototype.push.apply(S,M),this.labels_[n]=R,R},t.prototype.replayTextBackground_=function(t,e,r,i,n,o,a){t.beginPath(),t.moveTo.apply(t,e),t.lineTo.apply(t,r),t.lineTo.apply(t,i),t.lineTo.apply(t,n),t.lineTo.apply(t,e),o&&(this.alignFill_=o[2],this.fill_(t)),a&&(this.setStrokeStyle_(t,a),t.stroke())},t.prototype.calculateImageOrLabelDimensions_=function(t,e,r,i,n,o,l,u,c,h,p,v,_,x,b,w){var E,T=r-(l*=v[0]),S=i-(u*=v[1]),C=n+c>t?t-c:n,O=o+h>e?e-h:o,R=x[3]+C*v[0]+x[1],I=x[0]+O*v[1]+x[2],P=T-x[3],L=S-x[0];return(b||0!==p)&&(f[0]=P,m[0]=P,f[1]=L,g[1]=L,g[0]=P+R,y[0]=g[0],y[1]=L+I,m[1]=y[1]),0!==p?(E=(0,a.qC)((0,a.Ue)(),r,i,1,1,p,-r,-i),(0,a.nn)(E,f),(0,a.nn)(E,g),(0,a.nn)(E,y),(0,a.nn)(E,m),(0,s.createOrUpdate)(Math.min(f[0],g[0],y[0],m[0]),Math.min(f[1],g[1],y[1],m[1]),Math.max(f[0],g[0],y[0],m[0]),Math.max(f[1],g[1],y[1],m[1]),d)):(0,s.createOrUpdate)(Math.min(P,P+R),Math.min(L,L+I),Math.max(P,P+R),Math.max(L,L+I),d),_&&(T=Math.round(T),S=Math.round(S)),{drawImageX:T,drawImageY:S,drawImageW:C,drawImageH:O,originX:c,originY:h,declutterBox:{minX:d[0],minY:d[1],maxX:d[2],maxY:d[3],value:w},canvasTransform:E,scale:v}},t.prototype.replayImageOrLabel_=function(t,e,r,i,n,o,a){var s=!(!o&&!a),u=i.declutterBox,c=t.canvas,h=a?a[2]*i.scale[0]/2:0;return u.minX-h<=c.width/e&&u.maxX+h>=0&&u.minY-h<=c.height/e&&u.maxY+h>=0&&(s&&this.replayTextBackground_(t,f,g,y,m,o,a),(0,l._f)(t,i.canvasTransform,n,r,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=(0,a.nn)(this.renderedTransform_,[0,0]),r=512*this.pixelRatio;t.save(),t.translate(e[0]%r,e[1]%r),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,r,i){var o=this.textStates[e],a=this.createLabel(t,e,i,r),s=this.strokeStates[r],u=this.pixelRatio,c=x(Array.isArray(t)?t[0]:t,o.textAlign||l.PH),h=n.I[o.textBaseline||l.ru],p=s&&s.lineWidth?s.lineWidth:0;return{label:a,anchorX:c*(a.width/u-2*o.scale[0])+2*(.5-c)*p,anchorY:h*a.height/u+2*(.5-h)*p}},t.prototype.execute_=function(t,e,r,o,d,f,g,y){var m;this.pixelCoordinates_&&(0,c.fS)(r,this.renderedTransform_)?m=this.pixelCoordinates_:(this.pixelCoordinates_||(this.pixelCoordinates_=[]),m=(0,p.vT)(this.coordinates,0,this.coordinates.length,2,r,this.pixelCoordinates_),(0,a.lk)(this.renderedTransform_,r));for(var _,x,b,w,E,T,S,C,O,R,I,P,L,A,M,F,Z=0,k=o.length,j=0,D=0,N=0,G=null,z=null,U=this.coordinateCache_,B=this.viewRotation_,q=Math.round(1e12*Math.atan2(-r[1],r[0]))/1e12,V={context:t,pixelRatio:this.pixelRatio,resolution:this.resolution,rotation:B},W=this.instructions!=o||this.overlaps?0:200;Z<k;){var X=o[Z];switch(X[0]){case i.ZP.BEGIN_GEOMETRY:L=X[1],F=X[3],L.getGeometry()?void 0===g||(0,s.intersects)(g,F.getExtent())?++Z:Z=X[2]+1:Z=X[2];break;case i.ZP.BEGIN_PATH:D>W&&(this.fill_(t),D=0),N>W&&(t.stroke(),N=0),D||N||(t.beginPath(),w=NaN,E=NaN),++Z;break;case i.ZP.CIRCLE:var Y=m[j=X[1]],H=m[j+1],K=m[j+2]-Y,$=m[j+3]-H,J=Math.sqrt(K*K+$*$);t.moveTo(Y+J,H),t.arc(Y,H,J,0,2*Math.PI,!0),++Z;break;case i.ZP.CLOSE_PATH:t.closePath(),++Z;break;case i.ZP.CUSTOM:j=X[1],_=X[2];var Q=X[3],tt=X[4],et=6==X.length?X[5]:void 0;V.geometry=Q,V.feature=L,Z in U||(U[Z]=[]);var rt=U[Z];et?et(m,j,_,2,rt):(rt[0]=m[j],rt[1]=m[j+1],rt.length=2),tt(rt,V),++Z;break;case i.ZP.DRAW_IMAGE:j=X[1],_=X[2],C=X[3],x=X[4],b=X[5];var it=X[6],nt=X[7],ot=X[8],at=X[9],st=X[10],lt=X[11],ut=X[12],ct=X[13],ht=X[14];if(!C&&X.length>=19){O=X[18],R=X[19],I=X[20],P=X[21];var pt=this.drawLabelWithPointPlacement_(O,R,I,P);C=pt.label,X[3]=C;var dt=X[22];x=(pt.anchorX-dt)*this.pixelRatio,X[4]=x;var ft=X[23];b=(pt.anchorY-ft)*this.pixelRatio,X[5]=b,it=C.height,X[6]=it,ct=C.width,X[13]=ct}var gt=void 0;X.length>24&&(gt=X[24]);var yt=void 0,mt=void 0,vt=void 0;X.length>16?(yt=X[15],mt=X[16],vt=X[17]):(yt=l.oB,mt=!1,vt=!1),st&&q?lt+=B:st||q||(lt-=B);for(var _t=0;j<_;j+=2)if(!(gt&&gt[_t++]<ct/this.pixelRatio)){var xt=[t,e,C,Yt=this.calculateImageOrLabelDimensions_(C.width,C.height,m[j],m[j+1],ct,it,x,b,ot,at,lt,ut,d,yt,mt||vt,L),nt,mt?G:null,vt?z:null],bt=void 0,wt=void 0;if(y&&ht){var Et=_-j;if(!ht[Et]){ht[Et]=xt;continue}if(bt=ht[Et],delete ht[Et],wt=v(bt),y.collides(wt))continue}y&&y.collides(Yt.declutterBox)||(bt&&(y&&y.insert(wt),this.replayImageOrLabel_.apply(this,bt)),y&&y.insert(Yt.declutterBox),this.replayImageOrLabel_.apply(this,xt))}++Z;break;case i.ZP.DRAW_CHARS:var Tt=X[1],St=X[2],Ct=X[3],Ot=X[4];P=X[5];var Rt=X[6],It=X[7],Pt=X[8];I=X[9];var Lt=X[10];O=X[11],R=X[12];var At=[X[13],X[13]],Mt=this.textStates[R],Ft=Mt.font,Zt=[Mt.scale[0]*It,Mt.scale[1]*It],kt=void 0;Ft in this.widths_?kt=this.widths_[Ft]:(kt={},this.widths_[Ft]=kt);var jt=(0,h.W)(m,Tt,St,2),Dt=Math.abs(Zt[0])*(0,l.Kd)(Ft,O,kt);if(Ot||Dt<=jt){var Nt=this.textStates[R].textAlign,Gt=(jt-Dt)*n.I[Nt],zt=(0,u.q)(m,Tt,St,2,O,Gt,Rt,Math.abs(Zt[0]),l.Kd,Ft,kt,q?0:this.viewRotation_);t:if(zt){var Ut=[],Bt=void 0,qt=void 0,Vt=void 0,Wt=void 0,Xt=void 0;if(I)for(Bt=0,qt=zt.length;Bt<qt;++Bt){Vt=(Xt=zt[Bt])[4],Wt=this.createLabel(Vt,R,"",I),x=Xt[2]+(Zt[0]<0?-Lt:Lt),b=Ct*Wt.height+2*(.5-Ct)*Lt*Zt[1]/Zt[0]-Pt;var Yt=this.calculateImageOrLabelDimensions_(Wt.width,Wt.height,Xt[0],Xt[1],Wt.width,Wt.height,x,b,0,0,Xt[3],At,!1,l.oB,!1,L);if(y&&y.collides(Yt.declutterBox))break t;Ut.push([t,e,Wt,Yt,1,null,null])}if(P)for(Bt=0,qt=zt.length;Bt<qt;++Bt){if(Vt=(Xt=zt[Bt])[4],Wt=this.createLabel(Vt,R,P,""),x=Xt[2],b=Ct*Wt.height-Pt,Yt=this.calculateImageOrLabelDimensions_(Wt.width,Wt.height,Xt[0],Xt[1],Wt.width,Wt.height,x,b,0,0,Xt[3],At,!1,l.oB,!1,L),y&&y.collides(Yt.declutterBox))break t;Ut.push([t,e,Wt,Yt,1,null,null])}y&&y.load(Ut.map(v));for(var Ht=0,Kt=Ut.length;Ht<Kt;++Ht)this.replayImageOrLabel_.apply(this,Ut[Ht])}}++Z;break;case i.ZP.END_GEOMETRY:if(void 0!==f){var $t=f(L=X[1],F);if($t)return $t}++Z;break;case i.ZP.FILL:W?D++:this.fill_(t),++Z;break;case i.ZP.MOVE_TO_LINE_TO:for(j=X[1],_=X[2],A=m[j],S=(M=m[j+1])+.5|0,(T=A+.5|0)===w&&S===E||(t.moveTo(A,M),w=T,E=S),j+=2;j<_;j+=2)T=(A=m[j])+.5|0,S=(M=m[j+1])+.5|0,j!=_-2&&T===w&&S===E||(t.lineTo(A,M),w=T,E=S);++Z;break;case i.ZP.SET_FILL_STYLE:G=X,this.alignFill_=X[2],D&&(this.fill_(t),D=0,N&&(t.stroke(),N=0)),t.fillStyle=X[1],++Z;break;case i.ZP.SET_STROKE_STYLE:z=X,N&&(t.stroke(),N=0),this.setStrokeStyle_(t,X),++Z;break;case i.ZP.STROKE:W?N++:t.stroke(),++Z;break;default:++Z}}D&&this.fill_(t),N&&t.stroke()},t.prototype.execute=function(t,e,r,i,n,o){this.viewRotation_=i,this.execute_(t,e,r,this.instructions,n,void 0,void 0,o)},t.prototype.executeHitDetection=function(t,e,r,i,n){return this.viewRotation_=r,this.execute_(t,1,e,this.hitDetectionInstructions,!0,i,n)},t}()},2669:(t,e,r)=>{"use strict";r.d(e,{Z:()=>f});var i=r(2286),n=r(613),o=r(8641),a=r(6101),s=r(8326),l=r(9374),u=r(5537),c=r(6442),h=[i.Z.POLYGON,i.Z.CIRCLE,i.Z.LINE_STRING,i.Z.IMAGE,i.Z.TEXT,i.Z.DEFAULT],p=function(){function t(t,e,r,i,n,o){this.maxExtent_=t,this.overlaps_=i,this.pixelRatio_=r,this.resolution_=e,this.renderBuffer_=o,this.executorsByZIndex_={},this.hitDetectionContext_=null,this.hitDetectionTransform_=(0,a.Ue)(),this.createExecutors_(n)}return t.prototype.clip=function(t,e){var r=this.getClipCoords(e);t.beginPath(),t.moveTo(r[0],r[1]),t.lineTo(r[2],r[3]),t.lineTo(r[4],r[5]),t.lineTo(r[6],r[7]),t.clip()},t.prototype.createExecutors_=function(t){for(var e in t){var r=this.executorsByZIndex_[e];void 0===r&&(r={},this.executorsByZIndex_[e]=r);var i=t[e];for(var o in i){var a=i[o];r[o]=new n.Z(this.resolution_,this.pixelRatio_,this.overlaps_,a)}}},t.prototype.hasExecutors=function(t){for(var e in this.executorsByZIndex_)for(var r=this.executorsByZIndex_[e],i=0,n=t.length;i<n;++i)if(t[i]in r)return!0;return!1},t.prototype.forEachFeatureAtCoordinate=function(t,e,r,n,l,c){var p=2*(n=Math.round(n))+1,f=(0,a.qC)(this.hitDetectionTransform_,n+.5,n+.5,1/e,-1/e,-r,-t[0],-t[1]),g=!this.hitDetectionContext_;g&&(this.hitDetectionContext_=(0,s.E4)(p,p));var y,m=this.hitDetectionContext_;m.canvas.width!==p||m.canvas.height!==p?(m.canvas.width=p,m.canvas.height=p):g||m.clearRect(0,0,p,p),void 0!==this.renderBuffer_&&(y=(0,o.createEmpty)(),(0,o.extendCoordinate)(y,t),(0,o.buffer)(y,e*(this.renderBuffer_+n),y));var v,_=function(t){if(void 0!==d[t])return d[t];for(var e=2*t+1,r=t*t,i=new Array(r+1),n=0;n<=t;++n)for(var o=0;o<=t;++o){var a=n*n+o*o;if(a>r)break;var s=i[a];s||(s=[],i[a]=s),s.push(4*((t+n)*e+(t+o))+3),n>0&&s.push(4*((t-n)*e+(t+o))+3),o>0&&(s.push(4*((t+n)*e+(t-o))+3),n>0&&s.push(4*((t-n)*e+(t-o))+3))}for(var l=[],u=(n=0,i.length);n<u;++n)i[n]&&l.push.apply(l,i[n]);return d[t]=l,l}(n);function x(t,e){for(var r=m.getImageData(0,0,p,p).data,o=0,a=_.length;o<a;o++)if(r[_[o]]>0){if(!c||v!==i.Z.IMAGE&&v!==i.Z.TEXT||-1!==c.indexOf(t)){var s=(_[o]-3)/4,u=n-s%p,h=n-(s/p|0),d=l(t,e,u*u+h*h);if(d)return d}m.clearRect(0,0,p,p);break}}var b,w,E,T,S,C=Object.keys(this.executorsByZIndex_).map(Number);for(C.sort(u.kK),b=C.length-1;b>=0;--b){var O=C[b].toString();for(E=this.executorsByZIndex_[O],w=h.length-1;w>=0;--w)if(void 0!==(T=E[v=h[w]])&&(S=T.executeHitDetection(m,f,r,x,y)))return S}},t.prototype.getClipCoords=function(t){var e=this.maxExtent_;if(!e)return null;var r=e[0],i=e[1],n=e[2],o=e[3],a=[r,i,r,o,n,o,n,i];return(0,c.vT)(a,0,8,2,t,a),a},t.prototype.isEmpty=function(){return(0,l.xb)(this.executorsByZIndex_)},t.prototype.execute=function(t,e,r,i,n,o,a){var s=Object.keys(this.executorsByZIndex_).map(Number);s.sort(u.kK),this.maxExtent_&&(t.save(),this.clip(t,r));var l,c,p,d,f,g,y=o||h;for(a&&s.reverse(),l=0,c=s.length;l<c;++l){var m=s[l].toString();for(f=this.executorsByZIndex_[m],p=0,d=y.length;p<d;++p)void 0!==(g=f[y[p]])&&g.execute(t,e,r,i,n,a)}this.maxExtent_&&t.restore()},t}(),d={};const f=p},3206:(t,e,r)=>{"use strict";r.d(e,{Z:()=>s});var i,n=r(9557),o=r(5707),a=(i=function(t,e){return i=Object.setPrototypeOf||{__proto__:[]}instanceof Array&&function(t,e){t.__proto__=e}||function(t,e){for(var r in e)Object.prototype.hasOwnProperty.call(e,r)&&(t[r]=e[r])},i(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 r(){this.constructor=t}i(t,e),t.prototype=null===e?Object.create(e):(r.prototype=e.prototype,new r)});const s=function(t){function e(e,r,i,n){var o=t.call(this,e,r,i,n)||this;return o.hitDetectionImage_=null,o.image_=null,o.imagePixelRatio_=void 0,o.anchorX_=void 0,o.anchorY_=void 0,o.height_=void 0,o.opacity_=void 0,o.originX_=void 0,o.originY_=void 0,o.rotateWithView_=void 0,o.rotation_=void 0,o.scale_=void 0,o.width_=void 0,o.declutterImageWithText_=void 0,o}return a(e,t),e.prototype.drawPoint=function(t,e){if(this.image_){this.beginGeometry(t,e);var r=t.getFlatCoordinates(),i=t.getStride(),n=this.coordinates.length,a=this.appendFlatPointCoordinates(r,i);this.instructions.push([o.ZP.DRAW_IMAGE,n,a,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([o.ZP.DRAW_IMAGE,n,a,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 r=t.getFlatCoordinates(),i=t.getStride(),n=this.coordinates.length,a=this.appendFlatPointCoordinates(r,i);this.instructions.push([o.ZP.DRAW_IMAGE,n,a,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([o.ZP.DRAW_IMAGE,n,a,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 r=t.getAnchor(),i=t.getSize(),n=t.getHitDetectionImage(),o=t.getImage(this.pixelRatio),a=t.getOrigin();this.imagePixelRatio_=t.getPixelRatio(this.pixelRatio),this.anchorX_=r[0],this.anchorY_=r[1],this.hitDetectionImage_=n,this.image_=o,this.height_=i[1],this.opacity_=t.getOpacity(),this.originX_=a[0]*this.imagePixelRatio_,this.originY_=a[1]*this.imagePixelRatio_,this.rotateWithView_=t.getRotateWithView(),this.rotation_=t.getRotation(),this.scale_=t.getScaleArray(),this.width_=i[0],this.declutterImageWithText_=e},e}(n.Z)},5069:(t,e,r)=>{"use strict";r.d(e,{Z:()=>f});var i,n=r(4754),o=r(5624),a=r(6620),s=r(6101),l=r(147),u=r(5537),c=r(8641),h=r(6442),p=r(2967),d=(i=function(t,e){return i=Object.setPrototypeOf||{__proto__:[]}instanceof Array&&function(t,e){t.__proto__=e}||function(t,e){for(var r in e)Object.prototype.hasOwnProperty.call(e,r)&&(t[r]=e[r])},i(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 r(){this.constructor=t}i(t,e),t.prototype=null===e?Object.create(e):(r.prototype=e.prototype,new r)});const f=function(t){function e(e,r,i,n,o,a,l){var u=t.call(this)||this;return u.context_=e,u.pixelRatio_=r,u.extent_=i,u.transform_=n,u.viewRotation_=o,u.squaredTolerance_=a,u.userTransform_=l,u.contextFillState_=null,u.contextStrokeState_=null,u.contextTextState_=null,u.fillState_=null,u.strokeState_=null,u.image_=null,u.imageAnchorX_=0,u.imageAnchorY_=0,u.imageHeight_=0,u.imageOpacity_=0,u.imageOriginX_=0,u.imageOriginY_=0,u.imageRotateWithView_=!1,u.imageRotation_=0,u.imageScale_=[0,0],u.imageWidth_=0,u.text_="",u.textOffsetX_=0,u.textOffsetY_=0,u.textRotateWithView_=!1,u.textRotation_=0,u.textScale_=[0,0],u.textFillState_=null,u.textStrokeState_=null,u.textState_=null,u.pixelCoordinates_=[],u.tmpLocalTransform_=(0,s.Ue)(),u}return d(e,t),e.prototype.drawImages_=function(t,e,r,i){if(this.image_){var n=(0,h.vT)(t,e,r,i,this.transform_,this.pixelCoordinates_),o=this.context_,a=this.tmpLocalTransform_,l=o.globalAlpha;1!=this.imageOpacity_&&(o.globalAlpha=l*this.imageOpacity_);var u=this.imageRotation_;this.imageRotateWithView_&&(u+=this.viewRotation_);for(var c=0,p=n.length;c<p;c+=2){var d=n[c]-this.imageAnchorX_,f=n[c+1]-this.imageAnchorY_;if(0!==u||1!=this.imageScale_[0]||1!=this.imageScale_[1]){var g=d+this.imageAnchorX_,y=f+this.imageAnchorY_;(0,s.qC)(a,g,y,1,1,u,-g,-y),o.setTransform.apply(o,a),o.translate(g,y),o.scale(this.imageScale_[0],this.imageScale_[1]),o.drawImage(this.image_,this.imageOriginX_,this.imageOriginY_,this.imageWidth_,this.imageHeight_,-this.imageAnchorX_,-this.imageAnchorY_,this.imageWidth_,this.imageHeight_),o.setTransform(1,0,0,1,0,0)}else o.drawImage(this.image_,this.imageOriginX_,this.imageOriginY_,this.imageWidth_,this.imageHeight_,d,f,this.imageWidth_,this.imageHeight_)}1!=this.imageOpacity_&&(o.globalAlpha=l)}},e.prototype.drawText_=function(t,e,r,i){if(this.textState_&&""!==this.text_){this.textFillState_&&this.setContextFillState_(this.textFillState_),this.textStrokeState_&&this.setContextStrokeState_(this.textStrokeState_),this.setContextTextState_(this.textState_);var n=(0,h.vT)(t,e,r,i,this.transform_,this.pixelCoordinates_),o=this.context_,a=this.textRotation_;for(this.textRotateWithView_&&(a+=this.viewRotation_);e<r;e+=i){var l=n[e]+this.textOffsetX_,u=n[e+1]+this.textOffsetY_;if(0!==a||1!=this.textScale_[0]||1!=this.textScale_[1]){var c=(0,s.qC)(this.tmpLocalTransform_,l,u,1,1,a,-l,-u);o.setTransform.apply(o,c),o.translate(l,u),o.scale(this.textScale_[0],this.textScale_[1]),this.textStrokeState_&&o.strokeText(this.text_,0,0),this.textFillState_&&o.fillText(this.text_,0,0),o.setTransform(1,0,0,1,0,0)}else this.textStrokeState_&&o.strokeText(this.text_,l,u),this.textFillState_&&o.fillText(this.text_,l,u)}}},e.prototype.moveToLineTo_=function(t,e,r,i,n){var o=this.context_,a=(0,h.vT)(t,e,r,i,this.transform_,this.pixelCoordinates_);o.moveTo(a[0],a[1]);var s=a.length;n&&(s-=2);for(var l=2;l<s;l+=2)o.lineTo(a[l],a[l+1]);return n&&o.closePath(),r},e.prototype.drawRings_=function(t,e,r,i){for(var n=0,o=r.length;n<o;++n)e=this.moveToLineTo_(t,e,r[n],i,!0);return e},e.prototype.drawCircle=function(t){if((0,c.intersects)(this.extent_,t.getExtent())){if(this.fillState_||this.strokeState_){this.fillState_&&this.setContextFillState_(this.fillState_),this.strokeState_&&this.setContextStrokeState_(this.strokeState_);var e=(0,p.Kr)(t,this.transform_,this.pixelCoordinates_),r=e[2]-e[0],i=e[3]-e[1],n=Math.sqrt(r*r+i*i),o=this.context_;o.beginPath(),o.arc(e[0],e[1],n,0,2*Math.PI),this.fillState_&&o.fill(),this.strokeState_&&o.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 n.Z.POINT:this.drawPoint(t);break;case n.Z.LINE_STRING:this.drawLineString(t);break;case n.Z.POLYGON:this.drawPolygon(t);break;case n.Z.MULTI_POINT:this.drawMultiPoint(t);break;case n.Z.MULTI_LINE_STRING:this.drawMultiLineString(t);break;case n.Z.MULTI_POLYGON:this.drawMultiPolygon(t);break;case n.Z.GEOMETRY_COLLECTION:this.drawGeometryCollection(t);break;case n.Z.CIRCLE:this.drawCircle(t)}},e.prototype.drawFeature=function(t,e){var r=e.getGeometryFunction()(t);r&&(0,c.intersects)(this.extent_,r.getExtent())&&(this.setStyle(e),this.drawGeometry(r))},e.prototype.drawGeometryCollection=function(t){for(var e=t.getGeometriesArray(),r=0,i=e.length;r<i;++r)this.drawGeometry(e[r])},e.prototype.drawPoint=function(t){this.squaredTolerance_&&(t=t.simplifyTransformed(this.squaredTolerance_,this.userTransform_));var e=t.getFlatCoordinates(),r=t.getStride();this.image_&&this.drawImages_(e,0,e.length,r),""!==this.text_&&this.drawText_(e,0,e.length,r)},e.prototype.drawMultiPoint=function(t){this.squaredTolerance_&&(t=t.simplifyTransformed(this.squaredTolerance_,this.userTransform_));var e=t.getFlatCoordinates(),r=t.getStride();this.image_&&this.drawImages_(e,0,e.length,r),""!==this.text_&&this.drawText_(e,0,e.length,r)},e.prototype.drawLineString=function(t){if(this.squaredTolerance_&&(t=t.simplifyTransformed(this.squaredTolerance_,this.userTransform_)),(0,c.intersects)(this.extent_,t.getExtent())){if(this.strokeState_){this.setContextStrokeState_(this.strokeState_);var e=this.context_,r=t.getFlatCoordinates();e.beginPath(),this.moveToLineTo_(r,0,r.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((0,c.intersects)(this.extent_,e)){if(this.strokeState_){this.setContextStrokeState_(this.strokeState_);var r=this.context_,i=t.getFlatCoordinates(),n=0,o=t.getEnds(),a=t.getStride();r.beginPath();for(var s=0,l=o.length;s<l;++s)n=this.moveToLineTo_(i,n,o[s],a,!1);r.stroke()}if(""!==this.text_){var u=t.getFlatMidpoints();this.drawText_(u,0,u.length,2)}}},e.prototype.drawPolygon=function(t){if(this.squaredTolerance_&&(t=t.simplifyTransformed(this.squaredTolerance_,this.userTransform_)),(0,c.intersects)(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 r=t.getFlatInteriorPoint();this.drawText_(r,0,2,2)}}},e.prototype.drawMultiPolygon=function(t){if(this.squaredTolerance_&&(t=t.simplifyTransformed(this.squaredTolerance_,this.userTransform_)),(0,c.intersects)(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_,r=t.getOrientedFlatCoordinates(),i=0,n=t.getEndss(),o=t.getStride();e.beginPath();for(var a=0,s=n.length;a<s;++a){var l=n[a];i=this.drawRings_(r,i,l,o)}this.fillState_&&e.fill(),this.strokeState_&&e.stroke()}if(""!==this.text_){var u=t.getFlatInteriorPoints();this.drawText_(u,0,u.length,2)}}},e.prototype.setContextFillState_=function(t){var e=this.context_,r=this.contextFillState_;r?r.fillStyle!=t.fillStyle&&(r.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_,r=this.contextStrokeState_;r?(r.lineCap!=t.lineCap&&(r.lineCap=t.lineCap,e.lineCap=t.lineCap),e.setLineDash&&((0,u.fS)(r.lineDash,t.lineDash)||e.setLineDash(r.lineDash=t.lineDash),r.lineDashOffset!=t.lineDashOffset&&(r.lineDashOffset=t.lineDashOffset,e.lineDashOffset=t.lineDashOffset)),r.lineJoin!=t.lineJoin&&(r.lineJoin=t.lineJoin,e.lineJoin=t.lineJoin),r.lineWidth!=t.lineWidth&&(r.lineWidth=t.lineWidth,e.lineWidth=t.lineWidth),r.miterLimit!=t.miterLimit&&(r.miterLimit=t.miterLimit,e.miterLimit=t.miterLimit),r.strokeStyle!=t.strokeStyle&&(r.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_,r=this.contextTextState_,i=t.textAlign?t.textAlign:l.PH;r?(r.font!=t.font&&(r.font=t.font,e.font=t.font),r.textAlign!=i&&(r.textAlign=i,e.textAlign=i),r.textBaseline!=t.textBaseline&&(r.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 r=this;if(t){var i=t.getColor();this.fillState_={fillStyle:(0,a.y)(i||l.bL)}}else this.fillState_=null;if(e){var n=e.getColor(),o=e.getLineCap(),s=e.getLineDash(),u=e.getLineDashOffset(),c=e.getLineJoin(),h=e.getWidth(),p=e.getMiterLimit(),d=s||l.X9;this.strokeState_={lineCap:void 0!==o?o:l.mb,lineDash:1===this.pixelRatio_?d:d.map((function(t){return t*r.pixelRatio_})),lineDashOffset:(u||l.He)*this.pixelRatio_,lineJoin:void 0!==c?c:l.rc,lineWidth:(void 0!==h?h:l.yC)*this.pixelRatio_,miterLimit:void 0!==p?p:l.V4,strokeStyle:(0,a.y)(n||l.Tx)}}else this.strokeState_=null},e.prototype.setImageStyle=function(t){var e;if(t&&(e=t.getSize())){var r=t.getAnchor(),i=t.getOrigin();this.image_=t.getImage(this.pixelRatio_),this.imageAnchorX_=r[0]*this.pixelRatio_,this.imageAnchorY_=r[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 r=e.getColor();this.textFillState_={fillStyle:(0,a.y)(r||l.bL)}}else this.textFillState_=null;var i=t.getStroke();if(i){var n=i.getColor(),o=i.getLineCap(),s=i.getLineDash(),u=i.getLineDashOffset(),c=i.getLineJoin(),h=i.getWidth(),p=i.getMiterLimit();this.textStrokeState_={lineCap:void 0!==o?o:l.mb,lineDash:s||l.X9,lineDashOffset:u||l.He,lineJoin:void 0!==c?c:l.rc,lineWidth:void 0!==h?h:l.yC,miterLimit:void 0!==p?p:l.V4,strokeStyle:(0,a.y)(n||l.Tx)}}else this.textStrokeState_=null;var d=t.getFont(),f=t.getOffsetX(),g=t.getOffsetY(),y=t.getRotateWithView(),m=t.getRotation(),v=t.getScaleArray(),_=t.getText(),x=t.getTextAlign(),b=t.getTextBaseline();this.textState_={font:void 0!==d?d:l.Df,textAlign:void 0!==x?x:l.PH,textBaseline:void 0!==b?b:l.ru},this.text_=void 0!==_?Array.isArray(_)?_.reduce((function(t,e,r){return t+(r%2?" ":e)}),""):_:"",this.textOffsetX_=void 0!==f?this.pixelRatio_*f:0,this.textOffsetY_=void 0!==g?this.pixelRatio_*g:0,this.textRotateWithView_=void 0!==y&&y,this.textRotation_=void 0!==m?m:0,this.textScale_=[this.pixelRatio_*v[0],this.pixelRatio_*v[1]]}else this.text_=""},e}(o.Z)},5707:(t,e,r)=>{"use strict";r.d(e,{$O:()=>a,Yc:()=>o,ZP:()=>l,gO:()=>n,s3:()=>s});var i={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},n=[i.FILL],o=[i.STROKE],a=[i.BEGIN_PATH],s=[i.CLOSE_PATH];const l=i},5014:(t,e,r)=>{"use strict";r.d(e,{Z:()=>l});var i,n=r(9557),o=r(5707),a=r(147),s=(i=function(t,e){return i=Object.setPrototypeOf||{__proto__:[]}instanceof Array&&function(t,e){t.__proto__=e}||function(t,e){for(var r in e)Object.prototype.hasOwnProperty.call(e,r)&&(t[r]=e[r])},i(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 r(){this.constructor=t}i(t,e),t.prototype=null===e?Object.create(e):(r.prototype=e.prototype,new r)});const l=function(t){function e(e,r,i,n){return t.call(this,e,r,i,n)||this}return s(e,t),e.prototype.drawFlatCoordinates_=function(t,e,r,i){var n=this.coordinates.length,a=this.appendFlatLineCoordinates(t,e,r,i,!1,!1),s=[o.ZP.MOVE_TO_LINE_TO,n,a];return this.instructions.push(s),this.hitDetectionInstructions.push(s),r},e.prototype.drawLineString=function(t,e){var r=this.state,i=r.strokeStyle,n=r.lineWidth;if(void 0!==i&&void 0!==n){this.updateStrokeStyle(r,this.applyStroke),this.beginGeometry(t,e),this.hitDetectionInstructions.push([o.ZP.SET_STROKE_STYLE,r.strokeStyle,r.lineWidth,r.lineCap,r.lineJoin,r.miterLimit,a.X9,a.He],o.$O);var s=t.getFlatCoordinates(),l=t.getStride();this.drawFlatCoordinates_(s,0,s.length,l),this.hitDetectionInstructions.push(o.Yc),this.endGeometry(e)}},e.prototype.drawMultiLineString=function(t,e){var r=this.state,i=r.strokeStyle,n=r.lineWidth;if(void 0!==i&&void 0!==n){this.updateStrokeStyle(r,this.applyStroke),this.beginGeometry(t,e),this.hitDetectionInstructions.push([o.ZP.SET_STROKE_STYLE,r.strokeStyle,r.lineWidth,r.lineCap,r.lineJoin,r.miterLimit,r.lineDash,r.lineDashOffset],o.$O);for(var a=t.getEnds(),s=t.getFlatCoordinates(),l=t.getStride(),u=0,c=0,h=a.length;c<h;++c)u=this.drawFlatCoordinates_(s,u,a[c],l);this.hitDetectionInstructions.push(o.Yc),this.endGeometry(e)}},e.prototype.finish=function(){var e=this.state;return null!=e.lastStroke&&e.lastStroke!=this.coordinates.length&&this.instructions.push(o.Yc),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(o.Yc),e.lastStroke=this.coordinates.length),e.lastStroke=0,t.prototype.applyStroke.call(this,e),this.instructions.push(o.$O)},e}(n.Z)},9353:(t,e,r)=>{"use strict";r.d(e,{Z:()=>u});var i,n=r(9557),o=r(5707),a=r(147),s=r(226),l=(i=function(t,e){return i=Object.setPrototypeOf||{__proto__:[]}instanceof Array&&function(t,e){t.__proto__=e}||function(t,e){for(var r in e)Object.prototype.hasOwnProperty.call(e,r)&&(t[r]=e[r])},i(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 r(){this.constructor=t}i(t,e),t.prototype=null===e?Object.create(e):(r.prototype=e.prototype,new r)});const u=function(t){function e(e,r,i,n){return t.call(this,e,r,i,n)||this}return l(e,t),e.prototype.drawFlatCoordinatess_=function(t,e,r,i){var n=this.state,a=void 0!==n.fillStyle,s=void 0!==n.strokeStyle,l=r.length;this.instructions.push(o.$O),this.hitDetectionInstructions.push(o.$O);for(var u=0;u<l;++u){var c=r[u],h=this.coordinates.length,p=this.appendFlatLineCoordinates(t,e,c,i,!0,!s),d=[o.ZP.MOVE_TO_LINE_TO,h,p];this.instructions.push(d),this.hitDetectionInstructions.push(d),s&&(this.instructions.push(o.s3),this.hitDetectionInstructions.push(o.s3)),e=c}return a&&(this.instructions.push(o.gO),this.hitDetectionInstructions.push(o.gO)),s&&(this.instructions.push(o.Yc),this.hitDetectionInstructions.push(o.Yc)),e},e.prototype.drawCircle=function(t,e){var r=this.state,i=r.fillStyle,n=r.strokeStyle;if(void 0!==i||void 0!==n){this.setFillStrokeStyles_(),this.beginGeometry(t,e),void 0!==r.fillStyle&&this.hitDetectionInstructions.push([o.ZP.SET_FILL_STYLE,a.bL]),void 0!==r.strokeStyle&&this.hitDetectionInstructions.push([o.ZP.SET_STROKE_STYLE,r.strokeStyle,r.lineWidth,r.lineCap,r.lineJoin,r.miterLimit,r.lineDash,r.lineDashOffset]);var s=t.getFlatCoordinates(),l=t.getStride(),u=this.coordinates.length;this.appendFlatLineCoordinates(s,0,s.length,l,!1,!1);var c=[o.ZP.CIRCLE,u];this.instructions.push(o.$O,c),this.hitDetectionInstructions.push(o.$O,c),void 0!==r.fillStyle&&(this.instructions.push(o.gO),this.hitDetectionInstructions.push(o.gO)),void 0!==r.strokeStyle&&(this.instructions.push(o.Yc),this.hitDetectionInstructions.push(o.Yc)),this.endGeometry(e)}},e.prototype.drawPolygon=function(t,e){var r=this.state,i=r.fillStyle,n=r.strokeStyle;if(void 0!==i||void 0!==n){this.setFillStrokeStyles_(),this.beginGeometry(t,e),void 0!==r.fillStyle&&this.hitDetectionInstructions.push([o.ZP.SET_FILL_STYLE,a.bL]),void 0!==r.strokeStyle&&this.hitDetectionInstructions.push([o.ZP.SET_STROKE_STYLE,r.strokeStyle,r.lineWidth,r.lineCap,r.lineJoin,r.miterLimit,r.lineDash,r.lineDashOffset]);var s=t.getEnds(),l=t.getOrientedFlatCoordinates(),u=t.getStride();this.drawFlatCoordinatess_(l,0,s,u),this.endGeometry(e)}},e.prototype.drawMultiPolygon=function(t,e){var r=this.state,i=r.fillStyle,n=r.strokeStyle;if(void 0!==i||void 0!==n){this.setFillStrokeStyles_(),this.beginGeometry(t,e),void 0!==r.fillStyle&&this.hitDetectionInstructions.push([o.ZP.SET_FILL_STYLE,a.bL]),void 0!==r.strokeStyle&&this.hitDetectionInstructions.push([o.ZP.SET_STROKE_STYLE,r.strokeStyle,r.lineWidth,r.lineCap,r.lineJoin,r.miterLimit,r.lineDash,r.lineDashOffset]);for(var s=t.getEndss(),l=t.getOrientedFlatCoordinates(),u=t.getStride(),c=0,h=0,p=s.length;h<p;++h)c=this.drawFlatCoordinatess_(l,c,s[h],u);this.endGeometry(e)}},e.prototype.finish=function(){this.reverseHitDetectionInstructions(),this.state=null;var e=this.tolerance;if(0!==e)for(var r=this.coordinates,i=0,n=r.length;i<n;++i)r[i]=(0,s.uZ)(r[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}(n.Z)},7043:(t,e,r)=>{"use strict";r.d(e,{I:()=>f,Z:()=>g});var i,n=r(9557),o=r(5707),a=r(4754),s=r(6313),l=r(6620),u=r(147),c=r(4187),h=r(8641),p=r(2365),d=(i=function(t,e){return i=Object.setPrototypeOf||{__proto__:[]}instanceof Array&&function(t,e){t.__proto__=e}||function(t,e){for(var r in e)Object.prototype.hasOwnProperty.call(e,r)&&(t[r]=e[r])},i(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 r(){this.constructor=t}i(t,e),t.prototype=null===e?Object.create(e):(r.prototype=e.prototype,new r)}),f={left:0,end:0,center:.5,right:1,start:1,top:0,middle:.5,hanging:.2,alphabetic:.8,ideographic:.8,bottom:1};const g=function(t){function e(e,r,i,n){var o=t.call(this,e,r,i,n)||this;return o.labels_=null,o.text_="",o.textOffsetX_=0,o.textOffsetY_=0,o.textRotateWithView_=void 0,o.textRotation_=0,o.textFillState_=null,o.fillStates={},o.textStrokeState_=null,o.strokeStates={},o.textState_={},o.textStates={},o.textKey_="",o.fillKey_="",o.strokeKey_="",o.declutterImageWithText_=void 0,o}return d(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 r=this.textFillState_,i=this.textStrokeState_,n=this.textState_;if(""!==this.text_&&n&&(r||i)){var l=this.coordinates,c=l.length,d=t.getType(),f=null,g=t.getStride();if(n.placement!==s.Z.LINE||d!=a.Z.LINE_STRING&&d!=a.Z.MULTI_LINE_STRING&&d!=a.Z.POLYGON&&d!=a.Z.MULTI_POLYGON){var y=n.overflow?null:[];switch(d){case a.Z.POINT:case a.Z.MULTI_POINT:f=t.getFlatCoordinates();break;case a.Z.LINE_STRING:f=t.getFlatMidpoint();break;case a.Z.CIRCLE:f=t.getCenter();break;case a.Z.MULTI_LINE_STRING:f=t.getFlatMidpoints(),g=2;break;case a.Z.POLYGON:f=t.getFlatInteriorPoint(),n.overflow||y.push(f[2]/this.resolution),g=3;break;case a.Z.MULTI_POLYGON:var m=t.getFlatInteriorPoints();for(f=[],R=0,I=m.length;R<I;R+=3)n.overflow||y.push(m[R+2]/this.resolution),f.push(m[R],m[R+1]);if(0===f.length)return;g=2}if((k=this.appendFlatPointCoordinates(f,g))===c)return;if(y&&(k-c)/2!=f.length/g){var v=c/2;y=y.filter((function(t,e){var r=l[2*(v+e)]===f[e*g]&&l[2*(v+e)+1]===f[e*g+1];return r||--v,r}))}this.saveTextStates_(),(n.backgroundFill||n.backgroundStroke)&&(this.setFillStrokeStyle(n.backgroundFill,n.backgroundStroke),n.backgroundFill&&(this.updateFillStyle(this.state,this.createFill),this.hitDetectionInstructions.push(this.createFill(this.state))),n.backgroundStroke&&(this.updateStrokeStyle(this.state,this.applyStroke),this.hitDetectionInstructions.push(this.createStroke(this.state)))),this.beginGeometry(t,e);var _=n.padding;if(_!=u.oB&&(n.scale[0]<0||n.scale[1]<0)){var x=n.padding[0],b=n.padding[1],w=n.padding[2],E=n.padding[3];n.scale[0]<0&&(b=-b,E=-E),n.scale[1]<0&&(x=-x,w=-w),_=[x,b,w,E]}var T=this.pixelRatio;this.instructions.push([o.ZP.DRAW_IMAGE,c,k,null,NaN,NaN,NaN,1,0,0,this.textRotateWithView_,this.textRotation_,[1,1],NaN,this.declutterImageWithText_,_==u.oB?u.oB:_.map((function(t){return t*T})),!!n.backgroundFill,!!n.backgroundStroke,this.text_,this.textKey_,this.strokeKey_,this.fillKey_,this.textOffsetX_,this.textOffsetY_,y]);var S=1/T;this.hitDetectionInstructions.push([o.ZP.DRAW_IMAGE,c,k,null,NaN,NaN,NaN,1,0,0,this.textRotateWithView_,this.textRotation_,[S,S],NaN,this.declutterImageWithText_,_,!!n.backgroundFill,!!n.backgroundStroke,this.text_,this.textKey_,this.strokeKey_,this.fillKey_,this.textOffsetX_,this.textOffsetY_,y]),this.endGeometry(e)}else{if(!(0,h.intersects)(this.getBufferedMaxExtent(),t.getExtent()))return;var C=void 0;if(f=t.getFlatCoordinates(),d==a.Z.LINE_STRING)C=[f.length];else if(d==a.Z.MULTI_LINE_STRING)C=t.getEnds();else if(d==a.Z.POLYGON)C=t.getEnds().slice(0,1);else if(d==a.Z.MULTI_POLYGON){var O=t.getEndss();C=[];for(var R=0,I=O.length;R<I;++R)C.push(O[R][0])}this.beginGeometry(t,e);for(var P=n.textAlign,L=0,A=void 0,M=0,F=C.length;M<F;++M){if(null==P){var Z=(0,p._)(n.maxAngle,f,L,C[M],g);L=Z[0],A=Z[1]}else A=C[M];for(R=L;R<A;R+=g)l.push(f[R],f[R+1]);var k=l.length;L=C[M],this.drawChars_(c,k),c=k}this.endGeometry(e)}}},e.prototype.saveTextStates_=function(){var t=this.textStrokeState_,e=this.textState_,r=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 n=this.textKey_;n in this.textStates||(this.textStates[n]={font:e.font,textAlign:e.textAlign||u.PH,textBaseline:e.textBaseline||u.ru,scale:e.scale});var o=this.fillKey_;r&&(o in this.fillStates||(this.fillStates[o]={fillStyle:r.fillStyle}))},e.prototype.drawChars_=function(t,e){var r=this.textStrokeState_,i=this.textState_,n=this.strokeKey_,a=this.textKey_,s=this.fillKey_;this.saveTextStates_();var l=this.pixelRatio,u=f[i.textBaseline],c=this.textOffsetY_*l,h=this.text_,p=r?r.lineWidth*Math.abs(i.scale[0])/2:0;this.instructions.push([o.ZP.DRAW_CHARS,t,e,u,i.overflow,s,i.maxAngle,l,c,n,p*l,h,a,1]),this.hitDetectionInstructions.push([o.ZP.DRAW_CHARS,t,e,u,i.overflow,s,i.maxAngle,1,c,n,p,h,a,1/l])},e.prototype.setTextStyle=function(t,e){var r,i,n;if(t){var o=t.getFill();o?((i=this.textFillState_)||(i={},this.textFillState_=i),i.fillStyle=(0,l.y)(o.getColor()||u.bL)):(i=null,this.textFillState_=i);var a=t.getStroke();if(a){(n=this.textStrokeState_)||(n={},this.textStrokeState_=n);var s=a.getLineDash(),h=a.getLineDashOffset(),p=a.getWidth(),d=a.getMiterLimit();n.lineCap=a.getLineCap()||u.mb,n.lineDash=s?s.slice():u.X9,n.lineDashOffset=void 0===h?u.He:h,n.lineJoin=a.getLineJoin()||u.rc,n.lineWidth=void 0===p?u.yC:p,n.miterLimit=void 0===d?u.V4:d,n.strokeStyle=(0,l.y)(a.getColor()||u.Tx)}else n=null,this.textStrokeState_=n;r=this.textState_;var f=t.getFont()||u.Df;(0,u.Qx)(f);var g=t.getScaleArray();r.overflow=t.getOverflow(),r.font=f,r.maxAngle=t.getMaxAngle(),r.placement=t.getPlacement(),r.textAlign=t.getTextAlign(),r.textBaseline=t.getTextBaseline()||u.ru,r.backgroundFill=t.getBackgroundFill(),r.backgroundStroke=t.getBackgroundStroke(),r.padding=t.getPadding()||u.oB,r.scale=void 0===g?[1,1]:g;var y=t.getOffsetX(),m=t.getOffsetY(),v=t.getRotateWithView(),_=t.getRotation();this.text_=t.getText()||"",this.textOffsetX_=void 0===y?0:y,this.textOffsetY_=void 0===m?0:m,this.textRotateWithView_=void 0!==v&&v,this.textRotation_=void 0===_?0:_,this.strokeKey_=n?("string"==typeof n.strokeStyle?n.strokeStyle:(0,c.sq)(n.strokeStyle))+n.lineCap+n.lineDashOffset+"|"+n.lineWidth+n.lineJoin+n.miterLimit+"["+n.lineDash.join()+"]":"",this.textKey_=r.font+r.scale+(r.textAlign||"?")+(r.textBaseline||"?"),this.fillKey_=i?"string"==typeof i.fillStyle?i.fillStyle:"|"+(0,c.sq)(i.fillStyle):""}else this.text_="";this.declutterImageWithText_=e},e}(n.Z)},9272:(t,e,r)=>{"use strict";r.d(e,{TU:()=>p,UN:()=>h,ix:()=>d});var i=r(5069),n=r(4754),o=r(4698),a=r(2370),s=r(3983),l=r(8326),u=r(8641),c=r(5537),h=.5;function p(t,e,r,s,p,d,f){var g=t[0]*h,y=t[1]*h,m=(0,l.E4)(g,y);m.imageSmoothingEnabled=!1;for(var v=m.canvas,_=new i.Z(m,h,p,null,f),x=r.length,b=Math.floor(16777215/x),w={},E=1;E<=x;++E){var T=r[E-1],S=T.getStyleFunction()||s;if(s){var C=S(T,d);if(C){Array.isArray(C)||(C=[C]);for(var O="#"+("000000"+(E*b).toString(16)).slice(-6),R=0,I=C.length;R<I;++R){var P=C[R],L=P.getGeometryFunction()(T);if(L&&(0,u.intersects)(p,L.getExtent())){var A=P.clone(),M=A.getFill();M&&M.setColor(O);var F=A.getStroke();F&&(F.setColor(O),F.setLineDash(null)),A.setText(void 0);var Z=P.getImage();if(Z&&0!==Z.getOpacity()){var k=Z.getImageSize();if(!k)continue;var j=(0,l.E4)(k[0],k[1],void 0,{alpha:!1}),D=j.canvas;j.fillStyle=O,j.fillRect(0,0,D.width,D.height),A.setImage(new a.Z({img:D,imgSize:k,anchor:Z.getAnchor(),anchorXUnits:o.Z.PIXELS,anchorYUnits:o.Z.PIXELS,offset:Z.getOrigin(),opacity:1,size:Z.getSize(),scale:Z.getScale(),rotation:Z.getRotation(),rotateWithView:Z.getRotateWithView()}))}var N=A.getZIndex()||0;(U=w[N])||(U={},w[N]=U,U[n.Z.POLYGON]=[],U[n.Z.CIRCLE]=[],U[n.Z.LINE_STRING]=[],U[n.Z.POINT]=[]),U[L.getType().replace("Multi","")].push(L,A)}}}}}for(var G=Object.keys(w).map(Number).sort(c.kK),z=(E=0,G.length);E<z;++E){var U=w[G[E]];for(var B in U){var q=U[B];for(R=0,I=q.length;R<I;R+=2){_.setStyle(q[R+1]);for(var V=0,W=e.length;V<W;++V)_.setTransform(e[V]),_.drawGeometry(q[R])}}}return m.getImageData(0,0,v.width,v.height)}function d(t,e,r){var i=[];if(r){var n=Math.floor(Math.round(t[0])*h),o=Math.floor(Math.round(t[1])*h),a=4*((0,s.uZ)(n,0,r.width-1)+(0,s.uZ)(o,0,r.height-1)*r.width),l=r.data[a],u=r.data[a+1],c=r.data[a+2]+256*(u+256*l),p=Math.floor(16777215/e.length);c&&c%p==0&&i.push(e[c/p-1])}return i}},9151:(t,e,r)=>{"use strict";r.d(e,{Z:()=>g});var i,n=r(3343),o=r(5990),a=r(7380),s=r(8771),l=r(4562),u=r(245),c=r(147),h=r(1295),p=r(5818),d=r(8326),f=(i=function(t,e){return i=Object.setPrototypeOf||{__proto__:[]}instanceof Array&&function(t,e){t.__proto__=e}||function(t,e){for(var r in e)Object.prototype.hasOwnProperty.call(e,r)&&(t[r]=e[r])},i(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 r(){this.constructor=t}i(t,e),t.prototype=null===e?Object.create(e):(r.prototype=e.prototype,new r)});const g=function(t){function e(e){var r=t.call(this,e)||this;r.fontChangeListenerKey_=(0,p.oL)(c.sG,o.Z.PROPERTYCHANGE,e.redrawText.bind(e)),r.element_=document.createElement("div");var i=r.element_.style;i.position="absolute",i.width="100%",i.height="100%",i.zIndex="0",r.element_.className=u.XV+" ol-layers";var n=e.getViewport();return n.insertBefore(r.element_,n.firstChild||null),r.children_=[],r.renderedVisible_=!0,r}return f(e,t),e.prototype.dispatchRenderEvent=function(t,e){var r=this.getMap();if(r.hasListener(t)){var i=new a.Z(t,void 0,e);r.dispatchEvent(i)}},e.prototype.disposeInternal=function(){(0,p.bN)(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(s.Z.PRECOMPOSE,t);var e=t.layerStatesArray.sort((function(t,e){return t.zIndex-e.zIndex})),r=t.viewState;this.children_.length=0;for(var i=[],n=null,o=0,a=e.length;o<a;++o){var u=e[o];t.layerIndex=o;var c=u.layer,p=c.getSourceState();if(!(0,h.j)(u,r)||p!=l.Z.READY&&p!=l.Z.UNDEFINED)c.unrender();else{var f=c.render(t,n);f&&(f!==n&&(this.children_.push(f),n=f),"getDeclutter"in c&&i.push(c))}}for(o=i.length-1;o>=0;--o)i[o].renderDeclutter(t);(0,d.hF)(this.element_,this.children_),this.dispatchRenderEvent(s.Z.POSTCOMPOSE,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,r,i,n){for(var o=e.viewState,a=e.layerStatesArray,s=a.length-1;s>=0;--s){var l=a[s],u=l.layer;if(u.hasRenderer()&&(0,h.j)(l,o)&&n(u)){var c=u.getRenderer().getDataAtPixel(t,e,r);if(c){var p=i(u,c);if(p)return p}}}},e}(n.Z)},115:(t,e,r)=>{"use strict";r.d(e,{Z:()=>c});var i,n=r(5487),o=r(553),a=r(2706),s=r(4562),l=r(4187),u=(i=function(t,e){return i=Object.setPrototypeOf||{__proto__:[]}instanceof Array&&function(t,e){t.__proto__=e}||function(t,e){for(var r in e)Object.prototype.hasOwnProperty.call(e,r)&&(t[r]=e[r])},i(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 r(){this.constructor=t}i(t,e),t.prototype=null===e?Object.create(e):(r.prototype=e.prototype,new r)});const c=function(t){function e(e){var r=t.call(this)||this;return r.ready=!0,r.boundHandleImageChange_=r.handleImageChange_.bind(r),r.layer_=e,r.declutterExecutorGroup=null,r}return u(e,t),e.prototype.getFeatures=function(t){return(0,l.O3)()},e.prototype.getData=function(t){return null},e.prototype.prepareFrame=function(t){return(0,l.O3)()},e.prototype.renderFrame=function(t,e){return(0,l.O3)()},e.prototype.loadedTileCallback=function(t,e,r){t[e]||(t[e]={}),t[e][r.tileCoord.toString()]=r},e.prototype.createLoadedTileFinder=function(t,e,r){return function(i,n){var o=this.loadedTileCallback.bind(this,r,i);return t.forEachLoadedTile(e,i,n,o)}.bind(this)},e.prototype.forEachFeatureAtCoordinate=function(t,e,r,i,n){},e.prototype.getDataAtPixel=function(t,e,r){return null},e.prototype.getLayer=function(){return this.layer_},e.prototype.handleFontsChanged=function(){},e.prototype.handleImageChange_=function(t){t.target.getState()===o.Z.LOADED&&this.renderIfReadyAndVisible()},e.prototype.loadImage=function(t){var e=t.getState();return e!=o.Z.LOADED&&e!=o.Z.ERROR&&t.addEventListener(n.Z.CHANGE,this.boundHandleImageChange_),e==o.Z.IDLE&&(t.load(),e=t.getState()),e==o.Z.LOADED},e.prototype.renderIfReadyAndVisible=function(){var t=this.getLayer();t.getVisible()&&t.getSourceState()==s.Z.READY&&t.changed()},e.prototype.disposeInternal=function(){delete this.layer_,t.prototype.disposeInternal.call(this)},e}(a.Z)},3343:(t,e,r)=>{"use strict";r.d(e,{Z:()=>f});var i,n=r(5431),o=r(6885),a=r(4187),s=r(6101),l=r(8641),u=r(2710),c=r(1295),h=r(1900),p=(i=function(t,e){return i=Object.setPrototypeOf||{__proto__:[]}instanceof Array&&function(t,e){t.__proto__=e}||function(t,e){for(var r in e)Object.prototype.hasOwnProperty.call(e,r)&&(t[r]=e[r])},i(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 r(){this.constructor=t}i(t,e),t.prototype=null===e?Object.create(e):(r.prototype=e.prototype,new r)});function d(t,e){u.c.expire()}const f=function(t){function e(e){var r=t.call(this)||this;return r.map_=e,r}return p(e,t),e.prototype.dispatchRenderEvent=function(t,e){(0,a.O3)()},e.prototype.calculateMatrices2D=function(t){var e=t.viewState,r=t.coordinateToPixelTransform,i=t.pixelToCoordinateTransform;(0,s.qC)(r,t.size[0]/2,t.size[1]/2,1/e.resolution,-1/e.resolution,-e.rotation,-e.center[0],-e.center[1]),(0,s.nb)(i,r)},e.prototype.forEachFeatureAtCoordinate=function(t,e,r,i,n,o,a,s){var u,p=e.viewState;function d(t,e,r,i){return n.call(o,e,t?r:null,i)}var f=p.projection,g=(0,h.Cf)(t.slice(),f),y=[[0,0]];if(f.canWrapX()&&i){var m=f.getExtent(),v=(0,l.getWidth)(m);y.push([-v,0],[v,0])}for(var _=e.layerStatesArray,x=_.length,b=[],w=[],E=0;E<y.length;E++)for(var T=x-1;T>=0;--T){var S=_[T],C=S.layer;if(C.hasRenderer()&&(0,c.j)(S,p)&&a.call(s,C)){var O=C.getRenderer(),R=C.getSource();if(O&&R){var I=R.getWrapX()?g:t,P=d.bind(null,S.managed);w[0]=I[0]+y[E][0],w[1]=I[1]+y[E][1],u=O.forEachFeatureAtCoordinate(w,e,r,P,b)}if(u)return u}}if(0!==b.length){var L=1/b.length;return b.forEach((function(t,e){return t.distanceSq+=e*L})),b.sort((function(t,e){return t.distanceSq-e.distanceSq})),b.some((function(t){return u=t.callback(t.feature,t.layer,t.geometry)})),u}},e.prototype.forEachLayerAtPixel=function(t,e,r,i,n){return(0,a.O3)()},e.prototype.hasFeatureAtCoordinate=function(t,e,r,i,n,a){return void 0!==this.forEachFeatureAtCoordinate(t,e,r,i,o.uX,this,n,a)},e.prototype.getMap=function(){return this.map_},e.prototype.renderFrame=function(t){(0,a.O3)()},e.prototype.scheduleExpireIconCache=function(t){u.c.canExpireCache()&&t.postRenderFunctions.push(d)},e}(n.Z)},9186:(t,e,r)=>{"use strict";r.d(e,{Z:()=>f});var i,n=r(7581),o=r(553),a=r(7755),s=r(4773),l=r(1481),u=r(6101),c=r(9374),h=r(8641),p=r(6121),d=(i=function(t,e){return i=Object.setPrototypeOf||{__proto__:[]}instanceof Array&&function(t,e){t.__proto__=e}||function(t,e){for(var r in e)Object.prototype.hasOwnProperty.call(e,r)&&(t[r]=e[r])},i(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 r(){this.constructor=t}i(t,e),t.prototype=null===e?Object.create(e):(r.prototype=e.prototype,new r)});const f=function(t){function e(e){var r=t.call(this,e)||this;return r.image_=null,r}return d(e,t),e.prototype.getImage=function(){return this.image_?this.image_.getImage():null},e.prototype.prepareFrame=function(t){var e=t.layerStatesArray[t.layerIndex],r=t.pixelRatio,i=t.viewState,n=i.resolution,l=this.getLayer().getSource(),u=t.viewHints,c=t.extent;if(void 0!==e.extent&&(c=(0,h.getIntersection)(c,(0,p.fromUserExtent)(e.extent,i.projection))),!u[a.Z.ANIMATING]&&!u[a.Z.INTERACTING]&&!(0,h.isEmpty)(c))if(l){var d=i.projection;if(!s.j){var f=l.getProjection();f&&(d=f)}var g=l.getImage(c,n,r,d);g&&(this.loadImage(g)?this.image_=g:g.getState()===o.Z.EMPTY&&(this.image_=null))}else this.image_=null;return!!this.image_},e.prototype.getData=function(t){var e=this.frameState;if(!e)return null;var r=this.getLayer(),i=(0,u.nn)(e.pixelToCoordinateTransform,t.slice()),n=r.getExtent();if(n&&!(0,h.containsCoordinate)(n,i))return null;var o=this.image_.getExtent(),a=this.image_.getImage(),s=(0,h.getWidth)(o),l=Math.floor(a.width*((i[0]-o[0])/s));if(l<0||l>=a.width)return null;var c=(0,h.getHeight)(o),p=Math.floor(a.height*((o[3]-i[1])/c));return p<0||p>=a.height?null:this.getImageData(a,l,p)},e.prototype.renderFrame=function(t,e){var r=this.image_,i=r.getExtent(),n=r.getResolution(),o=r.getPixelRatio(),a=t.layerStatesArray[t.layerIndex],s=t.pixelRatio,d=t.viewState,f=d.center,g=d.resolution,y=t.size,m=s*n/(g*o),v=Math.round(y[0]*s),_=Math.round(y[1]*s),x=d.rotation;if(x){var b=Math.round(Math.sqrt(v*v+_*_));v=b,_=b}(0,u.qC)(this.pixelTransform,t.size[0]/2,t.size[1]/2,1/s,1/s,x,-v/2,-_/2),(0,u.nb)(this.inversePixelTransform,this.pixelTransform);var w=(0,u.BB)(this.pixelTransform);this.useContainer(e,w,a.opacity,this.getBackground(t));var E=this.context,T=E.canvas;T.width!=v||T.height!=_?(T.width=v,T.height=_):this.containerReused||E.clearRect(0,0,v,_);var S=!1,C=!0;if(a.extent){var O=(0,p.fromUserExtent)(a.extent,d.projection);(S=(C=(0,h.intersects)(O,t.extent))&&!(0,h.containsExtent)(O,t.extent))&&this.clipUnrotated(E,t,O)}var R=r.getImage(),I=(0,u.qC)(this.tempTransform,v/2,_/2,m,m,0,o*(i[0]-f[0])/n,o*(f[1]-i[3])/n);this.renderedResolution=n*s/o;var P=R.width*I[0],L=R.height*I[3];if(this.getLayer().getSource().getInterpolate()||(0,c.f0)(E,l.$),this.preRender(E,t),C&&P>=.5&&L>=.5){var A=I[4],M=I[5],F=a.opacity,Z=void 0;1!==F&&(Z=E.globalAlpha,E.globalAlpha=F),E.drawImage(R,0,0,+R.width,+R.height,Math.round(A),Math.round(M),Math.round(P),Math.round(L)),1!==F&&(E.globalAlpha=Z)}return this.postRender(E,t),S&&E.restore(),(0,c.f0)(E,l.s),w!==T.style.transform&&(T.style.transform=w),this.container},e}(n.Z)},7581:(t,e,r)=>{"use strict";r.d(e,{Z:()=>f});var i,n=r(115),o=r(7380),a=r(8771),s=r(6101),l=r(9706),u=r(8641),c=r(8326),h=r(5537),p=(i=function(t,e){return i=Object.setPrototypeOf||{__proto__:[]}instanceof Array&&function(t,e){t.__proto__=e}||function(t,e){for(var r in e)Object.prototype.hasOwnProperty.call(e,r)&&(t[r]=e[r])},i(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 r(){this.constructor=t}i(t,e),t.prototype=null===e?Object.create(e):(r.prototype=e.prototype,new r)}),d=null;const f=function(t){function e(e){var r=t.call(this,e)||this;return r.container=null,r.renderedResolution,r.tempTransform=(0,s.Ue)(),r.pixelTransform=(0,s.Ue)(),r.inversePixelTransform=(0,s.Ue)(),r.context=null,r.containerReused=!1,r.pixelContext_=null,r.frameState=null,r}return p(e,t),e.prototype.getImageData=function(t,e,r){var i,n;d||((i=document.createElement("canvas")).width=1,i.height=1,d=i.getContext("2d")),d.clearRect(0,0,1,1);try{d.drawImage(t,e,r,1,1,0,0,1,1),n=d.getImageData(0,0,1,1).data}catch(t){return null}return n},e.prototype.getBackground=function(t){var e=this.getLayer().getBackground();return"function"==typeof e&&(e=e(t.viewState.resolution)),e||void 0},e.prototype.useContainer=function(t,e,r,i){var n,o,a=this.getLayer().getClassName();if(t&&t.className===a&&""===t.style.opacity&&1===r&&(!i||t.style.backgroundColor&&(0,h.fS)((0,l._2)(t.style.backgroundColor),(0,l._2)(i)))&&(u=t.firstElementChild)instanceof HTMLCanvasElement&&(o=u.getContext("2d")),o&&o.canvas.style.transform===e?(this.container=t,this.context=o,this.containerReused=!0):this.containerReused&&(this.container=null,this.context=null,this.containerReused=!1),!this.container){(n=document.createElement("div")).className=a;var s=n.style;s.position="absolute",s.width="100%",s.height="100%",i&&(s.backgroundColor=i);var u=(o=(0,c.E4)()).canvas;n.appendChild(u),(s=u.style).position="absolute",s.left="0",s.transformOrigin="top left",this.container=n,this.context=o}},e.prototype.clipUnrotated=function(t,e,r){var i=(0,u.getTopLeft)(r),n=(0,u.getTopRight)(r),o=(0,u.getBottomRight)(r),a=(0,u.getBottomLeft)(r);(0,s.nn)(e.coordinateToPixelTransform,i),(0,s.nn)(e.coordinateToPixelTransform,n),(0,s.nn)(e.coordinateToPixelTransform,o),(0,s.nn)(e.coordinateToPixelTransform,a);var l=this.inversePixelTransform;(0,s.nn)(l,i),(0,s.nn)(l,n),(0,s.nn)(l,o),(0,s.nn)(l,a),t.save(),t.beginPath(),t.moveTo(Math.round(i[0]),Math.round(i[1])),t.lineTo(Math.round(n[0]),Math.round(n[1])),t.lineTo(Math.round(o[0]),Math.round(o[1])),t.lineTo(Math.round(a[0]),Math.round(a[1])),t.clip()},e.prototype.dispatchRenderEvent_=function(t,e,r){var i=this.getLayer();if(i.hasListener(t)){var n=new o.Z(t,this.inversePixelTransform,r,e);i.dispatchEvent(n)}},e.prototype.preRender=function(t,e){this.frameState=e,this.dispatchRenderEvent_(a.Z.PRERENDER,t,e)},e.prototype.postRender=function(t,e){this.dispatchRenderEvent_(a.Z.POSTRENDER,t,e)},e.prototype.getRenderTransform=function(t,e,r,i,n,o,a){var l=n/2,u=o/2,c=i/e,h=-c,p=-t[0]+a,d=-t[1];return(0,s.qC)(this.tempTransform,l,u,c,h,-r,p,d)},e.prototype.getDataAtPixel=function(t,e,r){var i=(0,s.nn)(this.inversePixelTransform,t.slice()),n=this.context,o=this.getLayer().getExtent();if(o){var a=(0,s.nn)(e.pixelToCoordinateTransform,t.slice());if(!(0,u.containsCoordinate)(o,a))return null}var l,c=Math.round(i[0]),h=Math.round(i[1]),p=this.pixelContext_;if(!p){var d=document.createElement("canvas");d.width=1,d.height=1,p=d.getContext("2d"),this.pixelContext_=p}p.clearRect(0,0,1,1);try{p.drawImage(n.canvas,c,h,1,1,0,0,1,1),l=p.getImageData(0,0,1,1).data}catch(t){return"SecurityError"===t.name?(this.pixelContext_=null,new Uint8Array):l}return 0===l[3]?null:l},e.prototype.disposeInternal=function(){delete this.frameState,t.prototype.disposeInternal.call(this)},e}(n.Z)},8845:(t,e,r)=>{"use strict";r.d(e,{Z:()=>_});var i,n=r(7581),o=r(825),a=r(9494),s=r(2519),l=r(7195),u=r(1481),c=r(6101),h=r(9374),p=r(8641),d=r(245),f=r(6121),g=r(4187),y=r(5537),m=r(4307),v=(i=function(t,e){return i=Object.setPrototypeOf||{__proto__:[]}instanceof Array&&function(t,e){t.__proto__=e}||function(t,e){for(var r in e)Object.prototype.hasOwnProperty.call(e,r)&&(t[r]=e[r])},i(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 r(){this.constructor=t}i(t,e),t.prototype=null===e?Object.create(e):(r.prototype=e.prototype,new r)});const _=function(t){function e(e){var r=t.call(this,e)||this;return r.extentChanged=!0,r.renderedExtent_=null,r.renderedPixelRatio,r.renderedProjection=null,r.renderedRevision,r.renderedTiles=[],r.newTiles_=!1,r.tmpExtent=(0,p.createEmpty)(),r.tmpTileRange_=new s.Z(0,0,0,0),r}return v(e,t),e.prototype.isDrawableTile=function(t){var e=this.getLayer(),r=t.getState(),i=e.getUseInterimTilesOnError();return r==l.Z.LOADED||r==l.Z.EMPTY||r==l.Z.ERROR&&!i},e.prototype.getTile=function(t,e,r,i){var n=i.pixelRatio,o=i.viewState.projection,a=this.getLayer(),s=a.getSource().getTile(t,e,r,n,o);return s.getState()==l.Z.ERROR&&(a.getUseInterimTilesOnError()?a.getPreload()>0&&(this.newTiles_=!0):s.setState(l.Z.LOADED)),this.isDrawableTile(s)||(s=s.getInterimTile()),s},e.prototype.getData=function(t){var e=this.frameState;if(!e)return null;var r=this.getLayer(),i=(0,c.nn)(e.pixelToCoordinateTransform,t.slice()),n=r.getExtent();if(n&&!(0,p.containsCoordinate)(n,i))return null;for(var s=e.pixelRatio,u=e.viewState.projection,h=e.viewState,d=r.getRenderSource(),f=d.getTileGridForProjection(h.projection),g=d.getTilePixelRatio(e.pixelRatio),y=f.getZForResolution(h.resolution);y>=f.getMinZoom();--y){var v=f.getTileCoordForCoordAndZ(i,y),_=d.getTile(y,v[1],v[2],s,u);if(!(_ instanceof o.Z||_ instanceof a.Z))return null;if(_.getState()===l.Z.LOADED){var x=f.getOrigin(y),b=(0,m.Pq)(f.getTileSize(y)),w=f.getResolution(y),E=Math.floor(g*((i[0]-x[0])/w-v[1]*b[0])),T=Math.floor(g*((x[1]-i[1])/w-v[2]*b[1]));return this.getImageData(_.getImage(),E,T)}}return null},e.prototype.loadedTileCallback=function(e,r,i){return!!this.isDrawableTile(i)&&t.prototype.loadedTileCallback.call(this,e,r,i)},e.prototype.prepareFrame=function(t){return!!this.getLayer().getSource()},e.prototype.renderFrame=function(t,e){var r=t.layerStatesArray[t.layerIndex],i=t.viewState,n=i.projection,o=i.resolution,a=i.center,s=i.rotation,m=t.pixelRatio,v=this.getLayer(),_=v.getSource(),x=_.getRevision(),b=_.getTileGridForProjection(n),w=b.getZForResolution(o,_.zDirection),E=b.getResolution(w),T=t.extent,S=r.extent&&(0,f.fromUserExtent)(r.extent,n);S&&(T=(0,p.getIntersection)(T,(0,f.fromUserExtent)(r.extent,n)));var C=_.getTilePixelRatio(m),O=Math.round(t.size[0]*C),R=Math.round(t.size[1]*C);if(s){var I=Math.round(Math.sqrt(O*O+R*R));O=I,R=I}var P=E*O/2/C,L=E*R/2/C,A=[a[0]-P,a[1]-L,a[0]+P,a[1]+L],M=b.getTileRangeForExtentAndZ(T,w),F={};F[w]={};var Z=this.createLoadedTileFinder(_,n,F),k=this.tmpExtent,j=this.tmpTileRange_;this.newTiles_=!1;for(var D=M.minX;D<=M.maxX;++D)for(var N=M.minY;N<=M.maxY;++N){var G=this.getTile(w,D,N,t);if(this.isDrawableTile(G)){var z=(0,g.sq)(this);if(G.getState()==l.Z.LOADED){F[w][G.tileCoord.toString()]=G;var U=G.inTransition(z);this.newTiles_||!U&&-1!==this.renderedTiles.indexOf(G)||(this.newTiles_=!0)}if(1===G.getAlpha(z,t.time))continue}var B=b.getTileCoordChildTileRange(G.tileCoord,j,k),q=!1;B&&(q=Z(w+1,B)),q||b.forEachTileCoordParentTileRange(G.tileCoord,Z,j,k)}var V=E/o;(0,c.qC)(this.pixelTransform,t.size[0]/2,t.size[1]/2,1/C,1/C,s,-O/2,-R/2);var W=(0,c.BB)(this.pixelTransform);this.useContainer(e,W,r.opacity,this.getBackground(t));var X=this.context,Y=X.canvas;(0,c.nb)(this.inversePixelTransform,this.pixelTransform),(0,c.qC)(this.tempTransform,O/2,R/2,V,V,0,-O/2,-R/2),Y.width!=O||Y.height!=R?(Y.width=O,Y.height=R):this.containerReused||X.clearRect(0,0,O,R),S&&this.clipUnrotated(X,t,S),_.getInterpolate()||(0,h.f0)(X,u.$),this.preRender(X,t),this.renderedTiles.length=0;var H,K,$,J=Object.keys(F).map(Number);J.sort(y.kK),1!==r.opacity||this.containerReused&&!_.getOpaque(t.viewState.projection)?(H=[],K=[]):J=J.reverse();for(var Q=J.length-1;Q>=0;--Q){var tt=J[Q],et=_.getTilePixelSize(tt,m,n),rt=b.getResolution(tt)/E,it=et[0]*rt*V,nt=et[1]*rt*V,ot=b.getTileCoordForCoordAndZ((0,p.getTopLeft)(A),tt),at=b.getTileCoordExtent(ot),st=(0,c.nn)(this.tempTransform,[C*(at[0]-A[0])/E,C*(A[3]-at[3])/E]),lt=C*_.getGutterForProjection(n),ut=F[tt];for(var ct in ut){var ht=(G=ut[ct]).tileCoord,pt=ot[1]-ht[1],dt=Math.round(st[0]-(pt-1)*it),ft=ot[2]-ht[2],gt=Math.round(st[1]-(ft-1)*nt),yt=dt-(D=Math.round(st[0]-pt*it)),mt=gt-(N=Math.round(st[1]-ft*nt)),vt=w===tt,_t=!1;if(!(U=vt&&1!==G.getAlpha((0,g.sq)(this),t.time)))if(H){$=[D,N,D+yt,N,D+yt,N+mt,D,N+mt];for(var xt=0,bt=H.length;xt<bt;++xt)if(w!==tt&&tt<K[xt]){var wt=H[xt];(0,p.intersects)([D,N,D+yt,N+mt],[wt[0],wt[3],wt[4],wt[7]])&&(_t||(X.save(),_t=!0),X.beginPath(),X.moveTo($[0],$[1]),X.lineTo($[2],$[3]),X.lineTo($[4],$[5]),X.lineTo($[6],$[7]),X.moveTo(wt[6],wt[7]),X.lineTo(wt[4],wt[5]),X.lineTo(wt[2],wt[3]),X.lineTo(wt[0],wt[1]),X.clip())}H.push($),K.push(tt)}else X.clearRect(D,N,yt,mt);this.drawTileImage(G,t,D,N,yt,mt,lt,vt),H&&!U?(_t&&X.restore(),this.renderedTiles.unshift(G)):this.renderedTiles.push(G),this.updateUsedTiles(t.usedTiles,_,G)}}this.renderedRevision=x,this.renderedResolution=E,this.extentChanged=!this.renderedExtent_||!(0,p.equals)(this.renderedExtent_,A),this.renderedExtent_=A,this.renderedPixelRatio=m,this.renderedProjection=n,this.manageTilePyramid(t,_,b,m,n,T,w,v.getPreload()),this.scheduleExpireCache(t,_),this.postRender(X,t),r.extent&&X.restore(),(0,h.f0)(X,u.s),W!==Y.style.transform&&(Y.style.transform=W);var Et=(0,d.Xy)(r.opacity),Tt=this.container;return Et!==Tt.style.opacity&&(Tt.style.opacity=Et),this.container},e.prototype.drawTileImage=function(t,e,r,i,n,o,a,s){var l=this.getTileImage(t);if(l){var u=(0,g.sq)(this),c=s?t.getAlpha(u,e.time):1,h=c!==this.context.globalAlpha;h&&(this.context.save(),this.context.globalAlpha=c),this.context.drawImage(l,a,a,l.width-2*a,l.height-2*a,r,i,n,o),h&&this.context.restore(),1!==c?e.animate=!0:s&&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 r=function(t,e,r){var i=(0,g.sq)(t);i in r.usedTiles&&t.expireCache(r.viewState.projection,r.usedTiles[i])}.bind(null,e);t.postRenderFunctions.push(r)}},e.prototype.updateUsedTiles=function(t,e,r){var i=(0,g.sq)(e);i in t||(t[i]={}),t[i][r.getKey()]=!0},e.prototype.manageTilePyramid=function(t,e,r,i,n,o,a,s,u){var c=(0,g.sq)(e);c in t.wantedTiles||(t.wantedTiles[c]={});var h,p,d,f,y,m,v=t.wantedTiles[c],_=t.tileQueue,x=0;for(m=r.getMinZoom();m<=a;++m)for(p=r.getTileRangeForExtentAndZ(o,m,p),d=r.getResolution(m),f=p.minX;f<=p.maxX;++f)for(y=p.minY;y<=p.maxY;++y)a-m<=s?(++x,(h=e.getTile(m,f,y,i,n)).getState()==l.Z.IDLE&&(v[h.getKey()]=!0,_.isKeyQueued(h.getKey())||_.enqueue([h,c,r.getTileCoordCenter(h.tileCoord),d])),void 0!==u&&u(h)):e.useTile(m,f,y,n);e.updateCacheSize(x,n)},e}(n.Z)},5682:(t,e,r)=>{"use strict";r.d(e,{Z:()=>v});var i,n=r(1328),o=r(7581),a=r(2669),s=r(7755),l=r(9272),u=r(6101),c=r(8641),h=r(245),p=r(6234),d=r(5537),f=r(6121),g=r(4187),y=r(1900),m=(i=function(t,e){return i=Object.setPrototypeOf||{__proto__:[]}instanceof Array&&function(t,e){t.__proto__=e}||function(t,e){for(var r in e)Object.prototype.hasOwnProperty.call(e,r)&&(t[r]=e[r])},i(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 r(){this.constructor=t}i(t,e),t.prototype=null===e?Object.create(e):(r.prototype=e.prototype,new r)});const v=function(t){function e(e){var r=t.call(this,e)||this;return r.boundHandleStyleImageChange_=r.handleStyleImageChange_.bind(r),r.animatingOrInteracting_,r.dirty_=!1,r.hitDetectionImageData_=null,r.renderedFeatures_=null,r.renderedRevision_=-1,r.renderedResolution_=NaN,r.renderedExtent_=(0,c.createEmpty)(),r.wrappedRenderedExtent_=(0,c.createEmpty)(),r.renderedRotation_,r.renderedCenter_=null,r.renderedProjection_=null,r.renderedRenderOrder_=null,r.replayGroup_=null,r.replayGroupChanged=!0,r.declutterExecutorGroup=null,r.clipping=!0,r}return m(e,t),e.prototype.renderWorlds=function(t,e,r){var i=e.extent,n=e.viewState,o=n.center,a=n.resolution,l=n.projection,u=n.rotation,h=l.getExtent(),p=this.getLayer().getSource(),d=e.pixelRatio,f=e.viewHints,g=!(f[s.Z.ANIMATING]||f[s.Z.INTERACTING]),y=this.context,m=Math.round(e.size[0]*d),v=Math.round(e.size[1]*d),_=p.getWrapX()&&l.canWrapX(),x=_?(0,c.getWidth)(h):null,b=_?Math.ceil((i[2]-h[2])/x)+1:1,w=_?Math.floor((i[0]-h[0])/x):0;do{var E=this.getRenderTransform(o,a,u,d,m,v,w*x);t.execute(y,1,E,u,g,void 0,r)}while(++w<b)},e.prototype.renderDeclutter=function(t){this.declutterExecutorGroup&&this.renderWorlds(this.declutterExecutorGroup,t,t.declutterTree)},e.prototype.renderFrame=function(t,e){var r=t.pixelRatio,i=t.layerStatesArray[t.layerIndex];(0,u.n3)(this.pixelTransform,1/r,1/r),(0,u.nb)(this.inversePixelTransform,this.pixelTransform);var n=(0,u.BB)(this.pixelTransform);this.useContainer(e,n,i.opacity,this.getBackground(t));var o=this.context,a=o.canvas,s=this.replayGroup_,l=this.declutterExecutorGroup;if((!s||s.isEmpty())&&(!l||l.isEmpty()))return null;var p=Math.round(t.size[0]*r),d=Math.round(t.size[1]*r);a.width!=p||a.height!=d?(a.width=p,a.height=d,a.style.transform!==n&&(a.style.transform=n)):this.containerReused||o.clearRect(0,0,p,d),this.preRender(o,t);var g=t.viewState,y=g.projection,m=!1,v=!0;if(i.extent&&this.clipping){var _=(0,f.fromUserExtent)(i.extent,y);(m=(v=(0,c.intersects)(_,t.extent))&&!(0,c.containsExtent)(_,t.extent))&&this.clipUnrotated(o,t,_)}v&&this.renderWorlds(s,t),m&&o.restore(),this.postRender(o,t);var x=(0,h.Xy)(i.opacity),b=this.container;return x!==b.style.opacity&&(b.style.opacity=x),this.renderedRotation_!==g.rotation&&(this.renderedRotation_=g.rotation,this.hitDetectionImageData_=null),this.container},e.prototype.getFeatures=function(t){return new Promise(function(e){if(!this.hitDetectionImageData_&&!this.animatingOrInteracting_){var r=[this.context.canvas.width,this.context.canvas.height];(0,u.nn)(this.pixelTransform,r);var i=this.renderedCenter_,n=this.renderedResolution_,o=this.renderedRotation_,a=this.renderedProjection_,s=this.wrappedRenderedExtent_,h=this.getLayer(),p=[],d=r[0]*l.UN,f=r[1]*l.UN;p.push(this.getRenderTransform(i,n,o,l.UN,d,f,0).slice());var g=h.getSource(),y=a.getExtent();if(g.getWrapX()&&a.canWrapX()&&!(0,c.containsExtent)(y,s)){for(var m=s[0],v=(0,c.getWidth)(y),_=0,x=void 0;m<y[0];)x=v*--_,p.push(this.getRenderTransform(i,n,o,l.UN,d,f,x).slice()),m+=v;for(_=0,m=s[2];m>y[2];)x=v*++_,p.push(this.getRenderTransform(i,n,o,l.UN,d,f,x).slice()),m-=v}this.hitDetectionImageData_=(0,l.TU)(r,p,this.renderedFeatures_,h.getStyleFunction(),s,n,o)}e((0,l.ix)(t,this.renderedFeatures_,this.hitDetectionImageData_))}.bind(this))},e.prototype.forEachFeatureAtCoordinate=function(t,e,r,i,n){var o=this;if(this.replayGroup_){var a,s=e.viewState.resolution,l=e.viewState.rotation,u=this.getLayer(),c={},h=function(t,e,r){var o=(0,g.sq)(t),a=c[o];if(a){if(!0!==a&&r<a.distanceSq){if(0===r)return c[o]=!0,n.splice(n.lastIndexOf(a),1),i(t,u,e);a.geometry=e,a.distanceSq=r}}else{if(0===r)return c[o]=!0,i(t,u,e);n.push(c[o]={feature:t,layer:u,geometry:e,distanceSq:r,callback:i})}},p=[this.replayGroup_];return this.declutterExecutorGroup&&p.push(this.declutterExecutorGroup),p.some((function(i){return a=i.forEachFeatureAtCoordinate(t,s,l,r,h,i===o.declutterExecutorGroup&&e.declutterTree?e.declutterTree.all().map((function(t){return t.value})):null)})),a}},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(),r=e.getSource();if(!r)return!1;var i=t.viewHints[s.Z.ANIMATING],o=t.viewHints[s.Z.INTERACTING],l=e.getUpdateWhileAnimating(),u=e.getUpdateWhileInteracting();if(!this.dirty_&&!l&&i||!u&&o)return this.animatingOrInteracting_=!0,!0;this.animatingOrInteracting_=!1;var h=t.extent,g=t.viewState,m=g.projection,v=g.resolution,_=t.pixelRatio,x=e.getRevision(),b=e.getRenderBuffer(),w=e.getRenderOrder();void 0===w&&(w=p.eR);var E=g.center.slice(),T=(0,c.buffer)(h,b*v),S=T.slice(),C=[T.slice()],O=m.getExtent();if(r.getWrapX()&&m.canWrapX()&&!(0,c.containsExtent)(O,t.extent)){var R=(0,c.getWidth)(O),I=Math.max((0,c.getWidth)(T)/2,R);T[0]=O[0]-I,T[2]=O[2]+I,(0,y.Cf)(E,m);var P=(0,c.wrapX)(C[0],m);P[0]<O[0]&&P[2]<O[2]?C.push([P[0]+R,P[1],P[2]+R,P[3]]):P[0]>O[0]&&P[2]>O[2]&&C.push([P[0]-R,P[1],P[2]-R,P[3]])}if(!this.dirty_&&this.renderedResolution_==v&&this.renderedRevision_==x&&this.renderedRenderOrder_==w&&(0,c.containsExtent)(this.wrappedRenderedExtent_,T))return(0,d.fS)(this.renderedExtent_,S)||(this.hitDetectionImageData_=null,this.renderedExtent_=S),this.renderedCenter_=E,this.replayGroupChanged=!1,!0;this.replayGroup_=null,this.dirty_=!1;var L,A=new n.Z((0,p.Qz)(v,_),T,v,_);this.getLayer().getDeclutter()&&(L=new n.Z((0,p.Qz)(v,_),T,v,_));var M,F=(0,f.getUserProjection)();if(F){for(var Z=0,k=C.length;Z<k;++Z){var j=C[Z],D=(0,f.toUserExtent)(j,m);r.loadFeatures(D,(0,f.toUserResolution)(v,m),F)}M=(0,f.getTransformFromProjections)(F,m)}else for(Z=0,k=C.length;Z<k;++Z)r.loadFeatures(C[Z],v,m);var N=(0,p.se)(v,_),G=function(t){var r,i=t.getStyleFunction()||e.getStyleFunction();if(i&&(r=i(t,v)),r){var n=this.renderFeature(t,N,r,A,M,L);this.dirty_=this.dirty_||n}}.bind(this),z=(0,f.toUserExtent)(T,m),U=r.getFeaturesInExtent(z);for(w&&U.sort(w),Z=0,k=U.length;Z<k;++Z)G(U[Z]);this.renderedFeatures_=U;var B=A.finish(),q=new a.Z(T,v,_,r.getOverlaps(),B,e.getRenderBuffer());return L&&(this.declutterExecutorGroup=new a.Z(T,v,_,r.getOverlaps(),L.finish(),e.getRenderBuffer())),this.renderedResolution_=v,this.renderedRevision_=x,this.renderedRenderOrder_=w,this.renderedExtent_=S,this.wrappedRenderedExtent_=T,this.renderedCenter_=E,this.renderedProjection_=m,this.replayGroup_=q,this.hitDetectionImageData_=null,this.replayGroupChanged=!0,!0},e.prototype.renderFeature=function(t,e,r,i,n,o){if(!r)return!1;var a=!1;if(Array.isArray(r))for(var s=0,l=r.length;s<l;++s)a=(0,p.Pn)(i,t,r[s],e,this.boundHandleStyleImageChange_,n,o)||a;else a=(0,p.Pn)(i,t,r,e,this.boundHandleStyleImageChange_,n,o);return a},e}(o.Z)},1481:(t,e,r)=>{"use strict";r.d(e,{$:()=>i,s:()=>n});var i={imageSmoothingEnabled:!1,msImageSmoothingEnabled:!1},n={imageSmoothingEnabled:!0,msImageSmoothingEnabled:!0}},6234:(t,e,r)=>{"use strict";r.d(e,{Pn:()=>h,Qz:()=>c,eR:()=>l,se:()=>u});var i=r(2286),n=r(4754),o=r(553),a=r(4187),s={Point:function(t,e,r,n,a){var s,l=r.getImage(),u=r.getText();if(a&&(t=a,s=l&&u&&u.getText()?{}:void 0),l){if(l.getImageState()!=o.Z.LOADED)return;var c=t.getBuilder(r.getZIndex(),i.Z.IMAGE);c.setImageStyle(l,s),c.drawPoint(e,n)}if(u&&u.getText()){var h=t.getBuilder(r.getZIndex(),i.Z.TEXT);h.setTextStyle(u,s),h.drawText(e,n)}},LineString:function(t,e,r,n,o){var a=r.getStroke();if(a){var s=t.getBuilder(r.getZIndex(),i.Z.LINE_STRING);s.setFillStrokeStyle(null,a),s.drawLineString(e,n)}var l=r.getText();if(l&&l.getText()){var u=(o||t).getBuilder(r.getZIndex(),i.Z.TEXT);u.setTextStyle(l),u.drawText(e,n)}},Polygon:function(t,e,r,n,o){var a=r.getFill(),s=r.getStroke();if(a||s){var l=t.getBuilder(r.getZIndex(),i.Z.POLYGON);l.setFillStrokeStyle(a,s),l.drawPolygon(e,n)}var u=r.getText();if(u&&u.getText()){var c=(o||t).getBuilder(r.getZIndex(),i.Z.TEXT);c.setTextStyle(u),c.drawText(e,n)}},MultiPoint:function(t,e,r,n,a){var s,l=r.getImage(),u=r.getText();if(a&&(t=a,s=l&&u&&u.getText()?{}:void 0),l){if(l.getImageState()!=o.Z.LOADED)return;var c=t.getBuilder(r.getZIndex(),i.Z.IMAGE);c.setImageStyle(l,s),c.drawMultiPoint(e,n)}if(u&&u.getText()){var h=(a||t).getBuilder(r.getZIndex(),i.Z.TEXT);h.setTextStyle(u,s),h.drawText(e,n)}},MultiLineString:function(t,e,r,n,o){var a=r.getStroke();if(a){var s=t.getBuilder(r.getZIndex(),i.Z.LINE_STRING);s.setFillStrokeStyle(null,a),s.drawMultiLineString(e,n)}var l=r.getText();if(l&&l.getText()){var u=(o||t).getBuilder(r.getZIndex(),i.Z.TEXT);u.setTextStyle(l),u.drawText(e,n)}},MultiPolygon:function(t,e,r,n,o){var a=r.getFill(),s=r.getStroke();if(s||a){var l=t.getBuilder(r.getZIndex(),i.Z.POLYGON);l.setFillStrokeStyle(a,s),l.drawMultiPolygon(e,n)}var u=r.getText();if(u&&u.getText()){var c=(o||t).getBuilder(r.getZIndex(),i.Z.TEXT);c.setTextStyle(u),c.drawText(e,n)}},GeometryCollection:function(t,e,r,i,n){var o,a,l=e.getGeometriesArray();for(o=0,a=l.length;o<a;++o)(0,s[l[o].getType()])(t,l[o],r,i,n)},Circle:function(t,e,r,n,o){var a=r.getFill(),s=r.getStroke();if(a||s){var l=t.getBuilder(r.getZIndex(),i.Z.CIRCLE);l.setFillStrokeStyle(a,s),l.drawCircle(e,n)}var u=r.getText();if(u&&u.getText()){var c=(o||t).getBuilder(r.getZIndex(),i.Z.TEXT);c.setTextStyle(u),c.drawText(e,n)}}};function l(t,e){return parseInt((0,a.sq)(t),10)-parseInt((0,a.sq)(e),10)}function u(t,e){var r=c(t,e);return r*r}function c(t,e){return.5*t/e}function h(t,e,r,i,n,a,l){var u=!1,c=r.getImage();if(c){var h=c.getImageState();h==o.Z.LOADED||h==o.Z.ERROR?c.unlistenImageChange(n):(h==o.Z.IDLE&&c.load(),h=c.getImageState(),c.listenImageChange(n),u=!0)}return function(t,e,r,i,n,o){var a=r.getGeometryFunction()(e);if(a){var l=a.simplifyTransformed(i,n);r.getRenderer()?p(t,l,r,e):(0,s[l.getType()])(t,l,r,e,o)}}(t,e,r,i,a,l),u}function p(t,e,r,o){if(e.getType()!=n.Z.GEOMETRY_COLLECTION)t.getBuilder(r.getZIndex(),i.Z.DEFAULT).drawCustom(e,o,r.getRenderer(),r.getHitDetectionRenderer());else for(var a=e.getGeometries(),s=0,l=a.length;s<l;++s)p(t,a[s],r,o)}},7161:(t,e,r)=>{"use strict";r.d(e,{Co:()=>d,aA:()=>p,sY:()=>f});var i,n=r(1481),o=r(9374),a=r(8641),s=r(8326),l=r(6121),u=r(3983);function c(t,e,r,i,n){t.beginPath(),t.moveTo(0,0),t.lineTo(e,r),t.lineTo(i,n),t.closePath(),t.save(),t.clip(),t.fillRect(0,0,Math.max(e,i)+1,Math.max(r,n)),t.restore()}function h(t,e){return Math.abs(t[4*e]-210)>2||Math.abs(t[4*e+3]-191.25)>2}function p(t,e,r,i){var n=(0,l.transform)(r,e,t),o=(0,l.getPointResolution)(e,i,r),s=e.getMetersPerUnit();void 0!==s&&(o*=s);var u=t.getMetersPerUnit();void 0!==u&&(o/=u);var c=t.getExtent();if(!c||(0,a.containsCoordinate)(c,n)){var h=(0,l.getPointResolution)(t,o,n)/o;isFinite(h)&&h>0&&(o/=h)}return o}function d(t,e,r,i){var n=(0,a.getCenter)(r),o=p(t,e,n,i);return(!isFinite(o)||o<=0)&&(0,a.forEachCorner)(r,(function(r){return o=p(t,e,r,i),isFinite(o)&&o>0})),o}function f(t,e,r,l,p,d,f,g,y,m,v,_){var x=(0,s.E4)(Math.round(r*t),Math.round(r*e));if(_||(0,o.f0)(x,n.$),0===y.length)return x.canvas;function b(t){return Math.round(t*r)/r}x.scale(r,r),x.globalCompositeOperation="lighter";var w=(0,a.createEmpty)();y.forEach((function(t,e,r){(0,a.extend)(w,t.extent)}));var E=(0,a.getWidth)(w),T=(0,a.getHeight)(w),S=(0,s.E4)(Math.round(r*E/l),Math.round(r*T/l));_||(0,o.f0)(S,n.$);var C=r/l;y.forEach((function(t,e,r){var i=t.extent[0]-w[0],n=-(t.extent[3]-w[3]),o=(0,a.getWidth)(t.extent),s=(0,a.getHeight)(t.extent);t.image.width>0&&t.image.height>0&&S.drawImage(t.image,m,m,t.image.width-2*m,t.image.height-2*m,i*C,n*C,o*C,s*C)}));var O=(0,a.getTopLeft)(f);return g.getTriangles().forEach((function(t,e,n){var o=t.source,a=t.target,s=o[0][0],p=o[0][1],f=o[1][0],g=o[1][1],y=o[2][0],m=o[2][1],v=b((a[0][0]-O[0])/d),E=b(-(a[0][1]-O[1])/d),T=b((a[1][0]-O[0])/d),C=b(-(a[1][1]-O[1])/d),R=b((a[2][0]-O[0])/d),I=b(-(a[2][1]-O[1])/d),P=s,L=p;s=0,p=0;var A=[[f-=P,g-=L,0,0,T-v],[y-=P,m-=L,0,0,R-v],[0,0,f,g,C-E],[0,0,y,m,I-E]],M=(0,u.SV)(A);if(M){if(x.save(),x.beginPath(),function(){if(void 0===i){var t=document.createElement("canvas").getContext("2d");t.globalCompositeOperation="lighter",t.fillStyle="rgba(210, 0, 0, 0.75)",c(t,4,5,4,0),c(t,4,5,0,5);var e=t.getImageData(0,0,3,3).data;i=h(e,0)||h(e,4)||h(e,8)}return i}()||!_){x.moveTo(T,C);for(var F=v-T,Z=E-C,k=0;k<4;k++)x.lineTo(T+b((k+1)*F/4),C+b(k*Z/3)),3!=k&&x.lineTo(T+b((k+1)*F/4),C+b((k+1)*Z/3));x.lineTo(R,I)}else x.moveTo(T,C),x.lineTo(v,E),x.lineTo(R,I);x.clip(),x.transform(M[0],M[2],M[1],M[3],v,E),x.translate(w[0]-P,w[3]-L),x.scale(l/r,-l/r),x.drawImage(S.canvas,0,0),x.restore()}})),v&&(x.save(),x.globalCompositeOperation="source-over",x.strokeStyle="black",x.lineWidth=1,g.getTriangles().forEach((function(t,e,r){var i=t.target,n=(i[0][0]-O[0])/d,o=-(i[0][1]-O[1])/d,a=(i[1][0]-O[0])/d,s=-(i[1][1]-O[1])/d,l=(i[2][0]-O[0])/d,u=-(i[2][1]-O[1])/d;x.beginPath(),x.moveTo(a,s),x.lineTo(n,o),x.lineTo(l,u),x.closePath(),x.stroke()})),x.restore()),x.canvas}},9494:(t,e,r)=>{"use strict";r.d(e,{Z:()=>f});var i,n=r(4773),o=r(5487),a=r(4806),s=r(7195),l=r(5476),u=r(7161),c=r(3983),h=r(8641),p=r(5818),d=(i=function(t,e){return i=Object.setPrototypeOf||{__proto__:[]}instanceof Array&&function(t,e){t.__proto__=e}||function(t,e){for(var r in e)Object.prototype.hasOwnProperty.call(e,r)&&(t[r]=e[r])},i(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 r(){this.constructor=t}i(t,e),t.prototype=null===e?Object.create(e):(r.prototype=e.prototype,new r)});const f=function(t){function e(e,r,i,o,a,p,d,f,g,y,m,v){var _=t.call(this,a,s.Z.IDLE,{interpolate:!!v})||this;_.renderEdges_=void 0!==m&&m,_.pixelRatio_=d,_.gutter_=f,_.canvas_=null,_.sourceTileGrid_=r,_.targetTileGrid_=o,_.wrappedTileCoord_=p||a,_.sourceTiles_=[],_.sourcesListenerKeys_=null,_.sourceZ_=0;var x=o.getTileCoordExtent(_.wrappedTileCoord_),b=_.targetTileGrid_.getExtent(),w=_.sourceTileGrid_.getExtent(),E=b?(0,h.getIntersection)(x,b):x;if(0===(0,h.getArea)(E))return _.state=s.Z.EMPTY,_;var T=e.getExtent();T&&(w=w?(0,h.getIntersection)(w,T):T);var S=o.getResolution(_.wrappedTileCoord_[0]),C=(0,u.Co)(e,i,E,S);if(!isFinite(C)||C<=0)return _.state=s.Z.EMPTY,_;var O=void 0!==y?y:n.m;if(_.triangulation_=new l.Z(e,i,E,w,C*O,S),0===_.triangulation_.getTriangles().length)return _.state=s.Z.EMPTY,_;_.sourceZ_=r.getZForResolution(C);var R=_.triangulation_.calculateSourceExtent();if(w&&(e.canWrapX()?(R[1]=(0,c.uZ)(R[1],w[1],w[3]),R[3]=(0,c.uZ)(R[3],w[1],w[3])):R=(0,h.getIntersection)(R,w)),(0,h.getArea)(R)){for(var I=r.getTileRangeForExtentAndZ(R,_.sourceZ_),P=I.minX;P<=I.maxX;P++)for(var L=I.minY;L<=I.maxY;L++){var A=g(_.sourceZ_,P,L,d);A&&_.sourceTiles_.push(A)}0===_.sourceTiles_.length&&(_.state=s.Z.EMPTY)}else _.state=s.Z.EMPTY;return _}return d(e,t),e.prototype.getImage=function(){return this.canvas_},e.prototype.reproject_=function(){var t=[];if(this.sourceTiles_.forEach(function(e,r,i){e&&e.getState()==s.Z.LOADED&&t.push({extent:this.sourceTileGrid_.getTileCoordExtent(e.tileCoord),image:e.getImage()})}.bind(this)),this.sourceTiles_.length=0,0===t.length)this.state=s.Z.ERROR;else{var e=this.wrappedTileCoord_[0],r=this.targetTileGrid_.getTileSize(e),i="number"==typeof r?r:r[0],n="number"==typeof r?r:r[1],o=this.targetTileGrid_.getResolution(e),a=this.sourceTileGrid_.getResolution(this.sourceZ_),l=this.targetTileGrid_.getTileCoordExtent(this.wrappedTileCoord_);this.canvas_=(0,u.sY)(i,n,this.pixelRatio_,a,this.sourceTileGrid_.getExtent(),o,l,this.triangulation_,t,this.gutter_,this.renderEdges_,this.interpolate),this.state=s.Z.LOADED}this.changed()},e.prototype.load=function(){if(this.state==s.Z.IDLE){this.state=s.Z.LOADING,this.changed();var t=0;this.sourcesListenerKeys_=[],this.sourceTiles_.forEach(function(e,r,i){var n=e.getState();if(n==s.Z.IDLE||n==s.Z.LOADING){t++;var a=(0,p.oL)(e,o.Z.CHANGE,(function(r){var i=e.getState();i!=s.Z.LOADED&&i!=s.Z.ERROR&&i!=s.Z.EMPTY||((0,p.bN)(a),0==--t&&(this.unlistenSources_(),this.reproject_()))}),this);this.sourcesListenerKeys_.push(a)}}.bind(this)),0===t?setTimeout(this.reproject_.bind(this),0):this.sourceTiles_.forEach((function(t,e,r){t.getState()==s.Z.IDLE&&t.load()}))}},e.prototype.unlistenSources_=function(){this.sourcesListenerKeys_.forEach(p.bN),this.sourcesListenerKeys_=null},e}(a.Z)},5476:(t,e,r)=>{"use strict";r.d(e,{Z:()=>a});var i=r(8641),n=r(6121),o=r(3983);const a=function(){function t(t,e,r,a,s,l){this.sourceProj_=t,this.targetProj_=e;var u={},c=(0,n.getTransform)(this.targetProj_,this.sourceProj_);this.transformInv_=function(t){var e=t[0]+"/"+t[1];return u[e]||(u[e]=c(t)),u[e]},this.maxSourceExtent_=a,this.errorThresholdSquared_=s*s,this.triangles_=[],this.wrapsXInSource_=!1,this.canWrapXInSource_=this.sourceProj_.canWrapX()&&!!a&&!!this.sourceProj_.getExtent()&&(0,i.getWidth)(a)==(0,i.getWidth)(this.sourceProj_.getExtent()),this.sourceWorldWidth_=this.sourceProj_.getExtent()?(0,i.getWidth)(this.sourceProj_.getExtent()):null,this.targetWorldWidth_=this.targetProj_.getExtent()?(0,i.getWidth)(this.targetProj_.getExtent()):null;var h=(0,i.getTopLeft)(r),p=(0,i.getTopRight)(r),d=(0,i.getBottomRight)(r),f=(0,i.getBottomLeft)(r),g=this.transformInv_(h),y=this.transformInv_(p),m=this.transformInv_(d),v=this.transformInv_(f),_=10+(l?Math.max(0,Math.ceil((0,o.k3)((0,i.getArea)(r)/(l*l*256*256)))):0);if(this.addQuad_(h,p,d,f,g,y,m,v,_),this.wrapsXInSource_){var x=1/0;this.triangles_.forEach((function(t,e,r){x=Math.min(x,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])-x>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]-x>this.sourceWorldWidth_/2&&(e[0][0]-=this.sourceWorldWidth_),e[1][0]-x>this.sourceWorldWidth_/2&&(e[1][0]-=this.sourceWorldWidth_),e[2][0]-x>this.sourceWorldWidth_/2&&(e[2][0]-=this.sourceWorldWidth_);var r=Math.min(e[0][0],e[1][0],e[2][0]);Math.max(e[0][0],e[1][0],e[2][0])-r<this.sourceWorldWidth_/2&&(t.source=e)}}.bind(this))}u={}}return t.prototype.addTriangle_=function(t,e,r,i,n,o){this.triangles_.push({source:[i,n,o],target:[t,e,r]})},t.prototype.addQuad_=function(t,e,r,n,a,s,l,u,c){var h=(0,i.boundingExtent)([a,s,l,u]),p=this.sourceWorldWidth_?(0,i.getWidth)(h)/this.sourceWorldWidth_:null,d=this.sourceWorldWidth_,f=this.sourceProj_.canWrapX()&&p>.5&&p<1,g=!1;if(c>0){if(this.targetProj_.isGlobal()&&this.targetWorldWidth_){var y=(0,i.boundingExtent)([t,e,r,n]);g=(0,i.getWidth)(y)/this.targetWorldWidth_>.25||g}!f&&this.sourceProj_.isGlobal()&&p&&(g=p>.25||g)}if(!(!g&&this.maxSourceExtent_&&isFinite(h[0])&&isFinite(h[1])&&isFinite(h[2])&&isFinite(h[3]))||(0,i.intersects)(h,this.maxSourceExtent_)){var m=0;if(!(g||isFinite(a[0])&&isFinite(a[1])&&isFinite(s[0])&&isFinite(s[1])&&isFinite(l[0])&&isFinite(l[1])&&isFinite(u[0])&&isFinite(u[1])))if(c>0)g=!0;else if(1!=(m=(isFinite(a[0])&&isFinite(a[1])?0:8)+(isFinite(s[0])&&isFinite(s[1])?0:4)+(isFinite(l[0])&&isFinite(l[1])?0:2)+(isFinite(u[0])&&isFinite(u[1])?0:1))&&2!=m&&4!=m&&8!=m)return;if(c>0){if(!g){var v=[(t[0]+r[0])/2,(t[1]+r[1])/2],_=this.transformInv_(v),x=void 0;x=f?((0,o.$W)(a[0],d)+(0,o.$W)(l[0],d))/2-(0,o.$W)(_[0],d):(a[0]+l[0])/2-_[0];var b=(a[1]+l[1])/2-_[1];g=x*x+b*b>this.errorThresholdSquared_}if(g){if(Math.abs(t[0]-r[0])<=Math.abs(t[1]-r[1])){var w=[(e[0]+r[0])/2,(e[1]+r[1])/2],E=this.transformInv_(w),T=[(n[0]+t[0])/2,(n[1]+t[1])/2],S=this.transformInv_(T);this.addQuad_(t,e,w,T,a,s,E,S,c-1),this.addQuad_(T,w,r,n,S,E,l,u,c-1)}else{var C=[(t[0]+e[0])/2,(t[1]+e[1])/2],O=this.transformInv_(C),R=[(r[0]+n[0])/2,(r[1]+n[1])/2],I=this.transformInv_(R);this.addQuad_(t,C,R,n,a,O,I,u,c-1),this.addQuad_(C,e,r,R,O,s,l,I,c-1)}return}}if(f){if(!this.canWrapXInSource_)return;this.wrapsXInSource_=!0}0==(11&m)&&this.addTriangle_(t,r,n,a,l,u),0==(14&m)&&this.addTriangle_(t,r,e,a,l,s),m&&(0==(13&m)&&this.addTriangle_(e,n,t,s,u,a),0==(7&m)&&this.addTriangle_(e,n,r,s,u,l))}},t.prototype.calculateSourceExtent=function(){var t=(0,i.createEmpty)();return this.triangles_.forEach((function(e,r,n){var o=e.source;(0,i.extendCoordinate)(t,o[0]),(0,i.extendCoordinate)(t,o[1]),(0,i.extendCoordinate)(t,o[2])})),t},t.prototype.getTriangles=function(){return this.triangles_},t}()},4773:(t,e,r)=>{"use strict";r.d(e,{j:()=>n,m:()=>i});var i=.5,n=!0},9307:(t,e,r)=>{"use strict";r.d(e,{Is:()=>c,cA:()=>u,gn:()=>l});var i=r(3983),n=r(8641),o=r(5537);function a(t,e,r,i){var o=(0,n.getWidth)(e)/r[0],a=(0,n.getHeight)(e)/r[1];return i?Math.min(t,Math.max(o,a)):Math.min(t,Math.min(o,a))}function s(t,e,r){var n=Math.min(t,e);return n*=Math.log(1+50*Math.max(0,t/e-1))/50+1,r&&(n=Math.max(n,r),n/=Math.log(1+50*Math.max(0,r/t-1))/50+1),(0,i.uZ)(n,r/2,2*e)}function l(t,e,r,n){return function(l,u,c,h){if(void 0!==l){var p=t[0],d=t[t.length-1],f=r?a(p,r,c,n):p;if(h)return void 0===e||e?s(l,f,d):(0,i.uZ)(l,d,f);var g=Math.min(f,l),y=Math.floor((0,o.h7)(t,g,u));return t[y]>f&&y<t.length-1?t[y+1]:t[y]}}}function u(t,e,r,n,o,l){return function(u,c,h,p){if(void 0!==u){var d=o?a(e,o,h,l):e,f=void 0!==r?r:0;if(p)return void 0===n||n?s(u,d,f):(0,i.uZ)(u,f,d);var g=Math.ceil(Math.log(e/d)/Math.log(t)-1e-9),y=-c*(.5-1e-9)+.5,m=Math.min(d,u),v=Math.floor(Math.log(e/m)/Math.log(t)+y),_=Math.max(g,v),x=e/Math.pow(t,_);return(0,i.uZ)(x,f,d)}}}function c(t,e,r,n,o){return function(l,u,c,h){if(void 0!==l){var p=n?a(t,n,c,o):t;return(void 0===r||r)&&h?s(l,p,e):(0,i.uZ)(l,e,p)}}}},828:(t,e,r)=>{"use strict";r.d(e,{Gw:()=>s,YP:()=>o,gE:()=>a,h$:()=>n});var i=r(3983);function n(t){return void 0!==t?0:void 0}function o(t){return void 0!==t?t:void 0}function a(t){var e=2*Math.PI/t;return function(t,r){return r?t:void 0!==t?t=Math.floor(t/e+.5)*e:void 0}}function s(t){var e=t||(0,i.Yr)(5);return function(t,r){return r?t:void 0!==t?Math.abs(t)<=e?0:t:void 0}}},4307:(t,e,r)=>{"use strict";function i(t,e,r){return void 0===r&&(r=[0,0]),r[0]=t[0]+2*e,r[1]=t[1]+2*e,r}function n(t){return t[0]>0&&t[1]>0}function o(t,e,r){return void 0===r&&(r=[0,0]),r[0]=t[0]*e+.5|0,r[1]=t[1]*e+.5|0,r}function a(t,e){return Array.isArray(t)?t:(void 0===e?e=[t,t]:(e[0]=t,e[1]=t),e)}r.d(e,{Pq:()=>a,bA:()=>o,f3:()=>i,py:()=>n})},5340:(t,e,r)=>{"use strict";r.r(e),r.d(e,{BingMaps:()=>f,CartoDB:()=>_,Cluster:()=>I,DataTile:()=>k,GeoTIFF:()=>Qe,IIIF:()=>_r,Image:()=>Mr,ImageArcGISRest:()=>jr,ImageCanvas:()=>Gr,ImageMapGuide:()=>Ur,ImageStatic:()=>Wr,ImageWMS:()=>ri,OSM:()=>oi,Raster:()=>bi,Source:()=>Ir.Z,Stamen:()=>Ci,Tile:()=>A.Z,TileArcGISRest:()=>Ri,TileDebug:()=>Li,TileImage:()=>s.Z,TileJSON:()=>Ai.Z,TileWMS:()=>Zi,UTFGrid:()=>zi,UrlTile:()=>ki.Z,Vector:()=>T.Z,VectorTile:()=>Ui.Z,WMTS:()=>Wi,XYZ:()=>y,Zoomify:()=>ar,sourcesFromTileGrid:()=>Xi});var i,n=r(6131),o=r(8641),a=r(4562),s=r(928),l=r(7848),u=r(8634),c=r(7248),h=r(6121),p=r(3315),d=(i=function(t,e){return i=Object.setPrototypeOf||{__proto__:[]}instanceof Array&&function(t,e){t.__proto__=e}||function(t,e){for(var r in e)Object.prototype.hasOwnProperty.call(e,r)&&(t[r]=e[r])},i(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 r(){this.constructor=t}i(t,e),t.prototype=null===e?Object.create(e):(r.prototype=e.prototype,new r)});const f=function(t){function e(e){var r=this,i=void 0!==e.hidpi&&e.hidpi,n=void 0===e.imageSmoothing||e.imageSmoothing;void 0!==e.interpolate&&(n=e.interpolate),(r=t.call(this,{cacheSize:e.cacheSize,crossOrigin:"anonymous",interpolate:n,opaque:!0,projection:(0,h.get)("EPSG:3857"),reprojectionErrorThreshold:e.reprojectionErrorThreshold,state:a.Z.LOADING,tileLoadFunction:e.tileLoadFunction,tilePixelRatio:i?2:1,wrapX:void 0===e.wrapX||e.wrapX,transition:e.transition,zDirection:e.zDirection})||this).hidpi_=i,r.culture_=void 0!==e.culture?e.culture:"en-us",r.maxZoom_=void 0!==e.maxZoom?e.maxZoom:-1,r.apiKey_=e.key,r.imagerySet_=e.imagerySet;var o="https://dev.virtualearth.net/REST/v1/Imagery/Metadata/"+r.imagerySet_+"?uriScheme=https&include=ImageryProviders&key="+r.apiKey_+"&c="+r.culture_;return(0,p.R6)(o,r.handleImageryMetadataResponse.bind(r),void 0,"jsonp"),r}return d(e,t),e.prototype.getApiKey=function(){return this.apiKey_},e.prototype.getImagerySet=function(){return this.imagerySet_},e.prototype.handleImageryMetadataResponse=function(t){if(200==t.statusCode&&"OK"==t.statusDescription&&"ValidCredentials"==t.authenticationResultCode&&1==t.resourceSets.length&&1==t.resourceSets[0].resources.length){var e=t.resourceSets[0].resources[0],r=-1==this.maxZoom_?e.zoomMax:this.maxZoom_,i=this.getProjection(),n=(0,c.Tl)(i),s=this.hidpi_?2:1,p=e.imageWidth==e.imageHeight?e.imageWidth/s:[e.imageWidth/s,e.imageHeight/s],d=(0,c.dl)({extent:n,minZoom:e.zoomMin,maxZoom:r,tileSize:p});this.tileGrid=d;var f=this.culture_,g=this.hidpi_;if(this.tileUrlFunction=(0,l.Un)(e.imageUrlSubdomains.map((function(t){var r=[0,0,0],i=e.imageUrl.replace("{subdomain}",t).replace("{culture}",f);return function(t,e,n){if(t){(0,u.T9)(t[0],t[1],t[2],r);var o=i;return g&&(o+="&dpi=d1&device=mobile"),o.replace("{quadkey}",function(t){var e,r,i=t[0],n=new Array(i),o=1<<i-1;for(e=0;e<i;++e)r=48,t[1]&o&&(r+=1),t[2]&o&&(r+=2),n[e]=String.fromCharCode(r),o>>=1;return n.join("")}(r))}}}))),e.imageryProviders){var y=(0,h.getTransformFromProjections)((0,h.get)("EPSG:4326"),this.getProjection());this.setAttributions(function(t){var r=[],i=t.viewState,n=this.getTileGrid(),a=n.getZForResolution(i.resolution,this.zDirection),s=n.getTileCoordForCoordAndZ(i.center,a)[0];return e.imageryProviders.map((function(e){for(var i=!1,n=e.coverageAreas,a=0,l=n.length;a<l;++a){var u=n[a];if(s>=u.zoomMin&&s<=u.zoomMax){var c=u.bbox,h=[c[1],c[0],c[3],c[2]],p=(0,o.applyTransform)(h,y);if((0,o.intersects)(p,t.extent)){i=!0;break}}}i&&r.push(e.attribution)})),r.push('<a class="ol-attribution-bing-tos" href="https://www.microsoft.com/maps/product/terms.html" target="_blank">Terms of Use</a>'),r}.bind(this))}this.setState(a.Z.READY)}else this.setState(a.Z.ERROR)},e}(s.Z);var g=function(){var t=function(e,r){return t=Object.setPrototypeOf||{__proto__:[]}instanceof Array&&function(t,e){t.__proto__=e}||function(t,e){for(var r in e)Object.prototype.hasOwnProperty.call(e,r)&&(t[r]=e[r])},t(e,r)};return function(e,r){if("function"!=typeof r&&null!==r)throw new TypeError("Class extends value "+String(r)+" is not a constructor or null");function i(){this.constructor=e}t(e,r),e.prototype=null===r?Object.create(r):(i.prototype=r.prototype,new i)}}();const y=function(t){function e(e){var r=e||{},i=void 0===r.imageSmoothing||r.imageSmoothing;void 0!==r.interpolate&&(i=r.interpolate);var n=void 0!==r.projection?r.projection:"EPSG:3857",o=void 0!==r.tileGrid?r.tileGrid:(0,c.dl)({extent:(0,c.Tl)(n),maxResolution:r.maxResolution,maxZoom:r.maxZoom,minZoom:r.minZoom,tileSize:r.tileSize});return t.call(this,{attributions:r.attributions,cacheSize:r.cacheSize,crossOrigin:r.crossOrigin,interpolate:i,opaque:r.opaque,projection:n,reprojectionErrorThreshold:r.reprojectionErrorThreshold,tileGrid:o,tileLoadFunction:r.tileLoadFunction,tilePixelRatio:r.tilePixelRatio,tileUrlFunction:r.tileUrlFunction,url:r.url,urls:r.urls,wrapX:void 0===r.wrapX||r.wrapX,transition:r.transition,attributionsCollapsible:r.attributionsCollapsible,zDirection:r.zDirection})||this}return g(e,t),e}(s.Z);var m=r(9374),v=function(){var t=function(e,r){return t=Object.setPrototypeOf||{__proto__:[]}instanceof Array&&function(t,e){t.__proto__=e}||function(t,e){for(var r in e)Object.prototype.hasOwnProperty.call(e,r)&&(t[r]=e[r])},t(e,r)};return function(e,r){if("function"!=typeof r&&null!==r)throw new TypeError("Class extends value "+String(r)+" is not a constructor or null");function i(){this.constructor=e}t(e,r),e.prototype=null===r?Object.create(r):(i.prototype=r.prototype,new i)}}();const _=function(t){function e(e){var r=t.call(this,{attributions:e.attributions,cacheSize:e.cacheSize,crossOrigin:e.crossOrigin,maxZoom:void 0!==e.maxZoom?e.maxZoom:18,minZoom:e.minZoom,projection:e.projection,transition:e.transition,wrapX:e.wrapX,zDirection:e.zDirection})||this;return r.account_=e.account,r.mapId_=e.map||"",r.config_=e.config||{},r.templateCache_={},r.initializeMap_(),r}return v(e,t),e.prototype.getConfig=function(){return this.config_},e.prototype.updateConfig=function(t){(0,m.f0)(this.config_,t),this.initializeMap_()},e.prototype.setConfig=function(t){this.config_=t||{},this.initializeMap_()},e.prototype.initializeMap_=function(){var t=JSON.stringify(this.config_);if(this.templateCache_[t])this.applyTemplate_(this.templateCache_[t]);else{var e="https://"+this.account_+".carto.com/api/v1/map";this.mapId_&&(e+="/named/"+this.mapId_);var r=new XMLHttpRequest;r.addEventListener("load",this.handleInitResponse_.bind(this,t)),r.addEventListener("error",this.handleInitError_.bind(this)),r.open("POST",e),r.setRequestHeader("Content-type","application/json"),r.send(JSON.stringify(this.config_))}},e.prototype.handleInitResponse_=function(t,e){var r=e.target;if(!r.status||r.status>=200&&r.status<300){var i=void 0;try{i=JSON.parse(r.responseText)}catch(t){return void this.setState(a.Z.ERROR)}this.applyTemplate_(i),this.templateCache_[t]=i,this.setState(a.Z.READY)}else this.setState(a.Z.ERROR)},e.prototype.handleInitError_=function(t){this.setState(a.Z.ERROR)},e.prototype.applyTemplate_=function(t){var e="https://"+t.cdn_url.https+"/"+this.account_+"/api/v1/map/"+t.layergroupid+"/{z}/{x}/{y}.png";this.setUrl(e)},e}(y);var x=r(5487),b=r(1090),w=r(4754),E=r(188),T=r(2556),S=r(1900),C=r(9515),O=r(4187),R=function(){var t=function(e,r){return t=Object.setPrototypeOf||{__proto__:[]}instanceof Array&&function(t,e){t.__proto__=e}||function(t,e){for(var r in e)Object.prototype.hasOwnProperty.call(e,r)&&(t[r]=e[r])},t(e,r)};return function(e,r){if("function"!=typeof r&&null!==r)throw new TypeError("Class extends value "+String(r)+" is not a constructor or null");function i(){this.constructor=e}t(e,r),e.prototype=null===r?Object.create(r):(i.prototype=r.prototype,new i)}}();const I=function(t){function e(e){var r=t.call(this,{attributions:e.attributions,wrapX:e.wrapX})||this;return r.resolution=void 0,r.distance=void 0!==e.distance?e.distance:20,r.minDistance=e.minDistance||0,r.interpolationRatio=0,r.features=[],r.geometryFunction=e.geometryFunction||function(t){var e=t.getGeometry();return(0,C.h)(e.getType()==w.Z.POINT,10),e},r.createCustomCluster_=e.createCluster,r.source=null,r.boundRefresh_=r.refresh.bind(r),r.updateDistance(r.distance,r.minDistance),r.setSource(e.source||null),r}return R(e,t),e.prototype.clear=function(e){this.features.length=0,t.prototype.clear.call(this,e)},e.prototype.getDistance=function(){return this.distance},e.prototype.getSource=function(){return this.source},e.prototype.loadFeatures=function(t,e,r){this.source.loadFeatures(t,e,r),e!==this.resolution&&(this.resolution=e,this.refresh())},e.prototype.setDistance=function(t){this.updateDistance(t,this.minDistance)},e.prototype.setMinDistance=function(t){this.updateDistance(this.distance,t)},e.prototype.getMinDistance=function(){return this.minDistance},e.prototype.setSource=function(t){this.source&&this.source.removeEventListener(x.Z.CHANGE,this.boundRefresh_),this.source=t,t&&t.addEventListener(x.Z.CHANGE,this.boundRefresh_),this.refresh()},e.prototype.refresh=function(){this.clear(),this.cluster(),this.addFeatures(this.features)},e.prototype.updateDistance=function(t,e){var r=0===t?0:Math.min(e,t)/t,i=t!==this.distance||this.interpolationRatio!==r;this.distance=t,this.minDistance=e,this.interpolationRatio=r,i&&this.refresh()},e.prototype.cluster=function(){if(void 0!==this.resolution&&this.source)for(var t=(0,o.createEmpty)(),e=this.distance*this.resolution,r=this.source.getFeatures(),i={},n=0,a=r.length;n<a;n++){var s=r[n];if(!((0,O.sq)(s)in i)){var l=this.geometryFunction(s);if(l){var u=l.getCoordinates();(0,o.createOrUpdateFromCoordinate)(u,t),(0,o.buffer)(t,e,t);var c=this.source.getFeaturesInExtent(t).filter((function(t){var e=(0,O.sq)(t);return!(e in i)&&(i[e]=!0,!0)}));this.features.push(this.createCluster(c,t))}}}},e.prototype.createCluster=function(t,e){for(var r=[0,0],i=t.length-1;i>=0;--i){var n=this.geometryFunction(t[i]);n?(0,S.IH)(r,n.getCoordinates()):t.splice(i,1)}(0,S.bA)(r,1/t.length);var a=(0,o.getCenter)(e),s=this.interpolationRatio,l=new E.default([r[0]*(1-s)+a[0]*s,r[1]*(1-s)+a[1]*s]);return this.createCustomCluster_?this.createCustomCluster_(l,t):new b.default({geometry:l,features:t})},e}(T.Z);var P=r(349),L=r(8815),A=r(7302),M=r(7195),F=r(6885),Z=function(){var t=function(e,r){return t=Object.setPrototypeOf||{__proto__:[]}instanceof Array&&function(t,e){t.__proto__=e}||function(t,e){for(var r in e)Object.prototype.hasOwnProperty.call(e,r)&&(t[r]=e[r])},t(e,r)};return function(e,r){if("function"!=typeof r&&null!==r)throw new TypeError("Class extends value "+String(r)+" is not a constructor or null");function i(){this.constructor=e}t(e,r),e.prototype=null===r?Object.create(r):(i.prototype=r.prototype,new i)}}();const k=function(t){function e(e){var r=this,i=void 0===e.projection?"EPSG:3857":e.projection,n=e.tileGrid;return void 0===n&&i&&(n=(0,c.dl)({extent:(0,c.Tl)(i),maxResolution:e.maxResolution,maxZoom:e.maxZoom,minZoom:e.minZoom,tileSize:e.tileSize})),(r=t.call(this,{cacheSize:.1,attributions:e.attributions,attributionsCollapsible:e.attributionsCollapsible,projection:i,tileGrid:n,opaque:e.opaque,state:e.state,tilePixelRatio:e.tilePixelRatio,wrapX:e.wrapX,transition:e.transition,interpolate:e.interpolate})||this).tileLoadingKeys_={},r.loader_=e.loader,r.handleTileChange_=r.handleTileChange_.bind(r),r.bandCount=void 0===e.bandCount?4:e.bandCount,r}return Z(e,t),e.prototype.setLoader=function(t){this.loader_=t},e.prototype.getTile=function(t,e,r,i,n){var o=(0,u.lg)(t,e,r);if(this.tileCache.containsKey(o))return this.tileCache.get(o);var a=this.loader_,s=new P.Z((0,m.f0)({tileCoord:[t,e,r],loader:function(){return(0,F.Vi)((function(){return a(t,e,r)}))}},this.tileOptions));return s.key=this.getKey(),s.addEventListener(x.Z.CHANGE,this.handleTileChange_),this.tileCache.set(o,s),s},e.prototype.handleTileChange_=function(t){var e,r=t.target,i=(0,O.sq)(r),n=r.getState();n==M.Z.LOADING?(this.tileLoadingKeys_[i]=!0,e=L.Z.TILELOADSTART):i in this.tileLoadingKeys_&&(delete this.tileLoadingKeys_[i],e=n==M.Z.ERROR?L.Z.TILELOADERROR:n==M.Z.LOADED?L.Z.TILELOADEND:void 0),e&&this.dispatchEvent(new A.s(e,r))},e}(A.Z);var j=r(8738);function D(t){return(e,...r)=>G(t,e,r)}function N(t,e){return D(q(t,e).get)}const{apply:G,construct:z,defineProperty:U,get:B,getOwnPropertyDescriptor:q,getPrototypeOf:V,has:W,ownKeys:X,set:Y,setPrototypeOf:H}=Reflect,K=(Proxy,Number),{isFinite:$,isNaN:J}=K,{iterator:Q,species:tt,toStringTag:et,for:rt}=Symbol,it=Object,{create:nt,defineProperty:ot,freeze:at,is:st}=it,lt=it.prototype,ut=(lt.__lookupGetter__&&D(lt.__lookupGetter__),it.hasOwn||D(lt.hasOwnProperty),Array),ct=(ut.isArray,ut.prototype),ht=(D(ct.join),D(ct.push),D(ct.toLocaleString),ct[Q]),pt=D(ht),dt=(Math.trunc,ArrayBuffer),ft=(dt.isView,dt.prototype),gt=(D(ft.slice),N(ft,"byteLength"),"undefined"!=typeof SharedArrayBuffer?SharedArrayBuffer:null),yt=(gt&&N(gt.prototype,"byteLength"),V(Uint8Array)),mt=(yt.from,yt.prototype),vt=(mt[Q],D(mt.keys),D(mt.values),D(mt.entries),D(mt.set),D(mt.reverse),D(mt.fill),D(mt.copyWithin),D(mt.sort),D(mt.slice),D(mt.subarray),N(mt,"buffer"),N(mt,"byteOffset"),N(mt,"length"),N(mt,et),Uint16Array,Uint32Array),_t=Float32Array,xt=V([][Q]()),bt=D(xt.next),wt=D(function*(){}().next),Et=V(xt),Tt=DataView.prototype,St=D(Tt.getUint16),Ct=(D(Tt.setUint16),TypeError,RangeError,WeakSet.prototype),Ot=(D(Ct.add),D(Ct.has),WeakMap),Rt=Ot.prototype,It=D(Rt.get),Pt=(D(Rt.has),D(Rt.set)),Lt=new Ot,At=nt(null,{next:{value:function(){const t=It(Lt,this);return bt(t)}},[Q]:{value:function(){return this}}}),Mt=new Ot,Ft=nt(Et,{next:{value:function(){const t=It(Mt,this);return wt(t)},writable:!0,configurable:!0}});for(const t of X(xt))"next"!==t&&ot(Ft,t,q(xt,t));const Zt=new dt(4),kt=new _t(Zt),jt=new vt(Zt),Dt=new vt(512),Nt=new vt(512);for(let t=0;t<256;++t){const e=t-127;e<-27?(Dt[t]=0,Dt[256|t]=32768,Nt[t]=24,Nt[256|t]=24):e<-14?(Dt[t]=1024>>-e-14,Dt[256|t]=1024>>-e-14|32768,Nt[t]=-e-1,Nt[256|t]=-e-1):e<=15?(Dt[t]=e+15<<10,Dt[256|t]=e+15<<10|32768,Nt[t]=13,Nt[256|t]=13):e<128?(Dt[t]=31744,Dt[256|t]=64512,Nt[t]=24,Nt[256|t]=24):(Dt[t]=31744,Dt[256|t]=64512,Nt[t]=13,Nt[256|t]=13)}const Gt=new vt(2048),zt=new vt(64),Ut=new vt(64);for(let t=1;t<1024;++t){let e=t<<13,r=0;for(;0==(8388608&e);)e<<=1,r-=8388608;e&=-8388609,r+=947912704,Gt[t]=e|r}for(let t=1024;t<2048;++t)Gt[t]=939524096+(t-1024<<13);for(let t=1;t<31;++t)zt[t]=t<<23;zt[31]=1199570944,zt[32]=2147483648;for(let t=33;t<63;++t)zt[t]=2147483648+(t-32<<23);zt[63]=3347054592;for(let t=1;t<64;++t)32!==t&&(Ut[t]=1024);function Bt(t,e,...r){return function(t){const e=t>>10;return jt[0]=Gt[Ut[e]+(1023&t)]+zt[e],kt[0]}(St(t,e,...function(t){if(t[Q]===ht)return t;const e=nt(At);return Pt(Lt,e,pt(t)),e}(r)))}var qt=r(8330),Vt=r(8602),Wt=r(2499);const Xt=new Map;function Yt(t,e){Array.isArray(t)||(t=[t]),t.forEach((t=>Xt.set(t,e)))}async function Ht(t){const e=Xt.get(t.Compression);if(!e)throw new Error(`Unknown compression method identifier: ${t.Compression}`);return new(await e())(t)}function Kt(t,e,r,i=1){return new(Object.getPrototypeOf(t).constructor)(e*r*i)}function $t(t,e,r){return(1-r)*t+r*e}function Jt(t,e,r){let i=0;for(let n=e;n<r;++n)i+=t[n];return i}function Qt(t,e,r){switch(t){case 1:if(e<=8)return new Uint8Array(r);if(e<=16)return new Uint16Array(r);if(e<=32)return new Uint32Array(r);break;case 2:if(8===e)return new Int8Array(r);if(16===e)return new Int16Array(r);if(32===e)return new Int32Array(r);break;case 3:switch(e){case 16:case 32:return new Float32Array(r);case 64:return new Float64Array(r)}}throw Error("Unsupported data format/bitsPerSample")}Yt([void 0,1],(()=>r.e(321).then(r.bind(r,3321)).then((t=>t.default)))),Yt(5,(()=>r.e(672).then(r.bind(r,8672)).then((t=>t.default)))),Yt(6,(()=>{throw new Error("old style JPEG compression is not supported.")})),Yt(7,(()=>r.e(347).then(r.bind(r,9347)).then((t=>t.default)))),Yt([8,32946],(()=>Promise.all([r.e(497),r.e(522)]).then(r.bind(r,5522)).then((t=>t.default)))),Yt(32773,(()=>r.e(411).then(r.bind(r,7411)).then((t=>t.default)))),Yt(34887,(()=>Promise.all([r.e(497),r.e(173)]).then(r.bind(r,4173)).then((t=>t.default)))),Yt(50001,(()=>r.e(588).then(r.bind(r,1588)).then((t=>t.default))));const te=class{constructor(t,e,r,i,n,o){this.fileDirectory=t,this.geoKeys=e,this.dataView=r,this.littleEndian=i,this.tiles=n?{}:null,this.isTiled=!t.StripOffsets;const a=t.PlanarConfiguration;if(this.planarConfiguration=void 0===a?1:a,1!==this.planarConfiguration&&2!==this.planarConfiguration)throw new Error("Invalid planar configuration.");this.source=o}getFileDirectory(){return this.fileDirectory}getGeoKeys(){return this.geoKeys}getWidth(){return this.fileDirectory.ImageWidth}getHeight(){return this.fileDirectory.ImageLength}getSamplesPerPixel(){return void 0!==this.fileDirectory.SamplesPerPixel?this.fileDirectory.SamplesPerPixel:1}getTileWidth(){return this.isTiled?this.fileDirectory.TileWidth:this.getWidth()}getTileHeight(){return this.isTiled?this.fileDirectory.TileLength:void 0!==this.fileDirectory.RowsPerStrip?Math.min(this.fileDirectory.RowsPerStrip,this.getHeight()):this.getHeight()}getBlockWidth(){return this.getTileWidth()}getBlockHeight(t){return this.isTiled||(t+1)*this.getTileHeight()<=this.getHeight()?this.getTileHeight():this.getHeight()-t*this.getTileHeight()}getBytesPerPixel(){let t=0;for(let e=0;e<this.fileDirectory.BitsPerSample.length;++e)t+=this.getSampleByteSize(e);return t}getSampleByteSize(t){if(t>=this.fileDirectory.BitsPerSample.length)throw new RangeError(`Sample index ${t} is out of range.`);return Math.ceil(this.fileDirectory.BitsPerSample[t]/8)}getReaderForSample(t){const e=this.fileDirectory.SampleFormat?this.fileDirectory.SampleFormat[t]:1,r=this.fileDirectory.BitsPerSample[t];switch(e){case 1:if(r<=8)return DataView.prototype.getUint8;if(r<=16)return DataView.prototype.getUint16;if(r<=32)return DataView.prototype.getUint32;break;case 2:if(r<=8)return DataView.prototype.getInt8;if(r<=16)return DataView.prototype.getInt16;if(r<=32)return DataView.prototype.getInt32;break;case 3:switch(r){case 16:return function(t,e){return Bt(this,t,e)};case 32:return DataView.prototype.getFloat32;case 64:return DataView.prototype.getFloat64}}throw Error("Unsupported data format/bitsPerSample")}getSampleFormat(t=0){return this.fileDirectory.SampleFormat?this.fileDirectory.SampleFormat[t]:1}getBitsPerSample(t=0){return this.fileDirectory.BitsPerSample[t]}getArrayForSample(t,e){return Qt(this.getSampleFormat(t),this.getBitsPerSample(t),e)}async getTileOrStrip(t,e,r,i,n){const o=Math.ceil(this.getWidth()/this.getTileWidth()),a=Math.ceil(this.getHeight()/this.getTileHeight());let s;const{tiles:l}=this;let u,c;1===this.planarConfiguration?s=e*o+t:2===this.planarConfiguration&&(s=r*o*a+e*o+t),this.isTiled?(u=this.fileDirectory.TileOffsets[s],c=this.fileDirectory.TileByteCounts[s]):(u=this.fileDirectory.StripOffsets[s],c=this.fileDirectory.StripByteCounts[s]);const h=(await this.source.fetch([{offset:u,length:c}],n))[0];let p;return null!==l&&l[s]?p=l[s]:(p=(async()=>{let t=await i.decode(this.fileDirectory,h);const r=this.getSampleFormat(),n=this.getBitsPerSample();return function(t,e){return(1!==t&&2!==t||!(e<=32)||e%8!=0)&&(3!==t||16!==e&&32!==e&&64!==e)}(r,n)&&(t=function(t,e,r,i,n,o,a){const s=new DataView(t),l=2===r?1:i,u=Qt(e,n,2===r?a*o:a*o*i),c=parseInt("1".repeat(n),2);if(1===e){let t;t=1===r?i*n:n;let e=o*t;0!=(7&e)&&(e=e+7&-8);for(let t=0;t<a;++t){const r=t*e;for(let e=0;e<o;++e){const i=r+e*l*n;for(let r=0;r<l;++r){const a=i+r*n,h=(t*o+e)*l+r,p=Math.floor(a/8),d=a%8;if(d+n<=8)u[h]=s.getUint8(p)>>8-n-d&c;else if(d+n<=16)u[h]=s.getUint16(p)>>16-n-d&c;else if(d+n<=24){const t=s.getUint16(p)<<8|s.getUint8(p+2);u[h]=t>>24-n-d&c}else u[h]=s.getUint32(p)>>32-n-d&c}}}}return u.buffer}(t,r,this.planarConfiguration,this.getSamplesPerPixel(),n,this.getTileWidth(),this.getBlockHeight(e))),t})(),null!==l&&(l[s]=p)),{x:t,y:e,sample:r,data:await p}}async _readRaster(t,e,r,i,n,o,a,s,l){const u=this.getTileWidth(),c=this.getTileHeight(),h=this.getWidth(),p=this.getHeight(),d=Math.max(Math.floor(t[0]/u),0),f=Math.min(Math.ceil(t[2]/u),Math.ceil(h/u)),g=Math.max(Math.floor(t[1]/c),0),y=Math.min(Math.ceil(t[3]/c),Math.ceil(p/c)),m=t[2]-t[0];let v=this.getBytesPerPixel();const _=[],x=[];for(let t=0;t<e.length;++t)1===this.planarConfiguration?_.push(Jt(this.fileDirectory.BitsPerSample,0,e[t])/8):_.push(0),x.push(this.getReaderForSample(e[t]));const b=[],{littleEndian:w}=this;for(let o=g;o<y;++o)for(let a=d;a<f;++a)for(let s=0;s<e.length;++s){const d=s,f=e[s];2===this.planarConfiguration&&(v=this.getSampleByteSize(s));const g=this.getTileOrStrip(a,o,f,n,l).then((n=>{const o=n.data,a=new DataView(o),s=this.getBlockHeight(n.y),l=n.y*c,f=n.x*u,g=l+s,y=(n.x+1)*u,b=x[d],E=Math.min(s,s-(g-t[3]),p-l),T=Math.min(u,u-(y-t[2]),h-f);for(let n=Math.max(0,t[1]-l);n<E;++n)for(let o=Math.max(0,t[0]-f);o<T;++o){const s=(n*u+o)*v,c=b.call(a,s+_[d],w);let h;i?(h=(n+l-t[1])*m*e.length+(o+f-t[0])*e.length+d,r[h]=c):(h=(n+l-t[1])*m+o+f-t[0],r[d][h]=c)}}));b.push(g)}if(await Promise.all(b),o&&t[2]-t[0]!==o||a&&t[3]-t[1]!==a){let n;return n=i?function(t,e,r,i,n,o,a="nearest"){switch(a.toLowerCase()){case"nearest":return function(t,e,r,i,n,o){const a=e/i,s=r/n,l=Kt(t,i,n,o);for(let u=0;u<n;++u){const n=Math.min(Math.round(s*u),r-1);for(let r=0;r<i;++r){const s=Math.min(Math.round(a*r),e-1);for(let a=0;a<o;++a){const c=t[n*e*o+s*o+a];l[u*i*o+r*o+a]=c}}}return l}(t,e,r,i,n,o);case"bilinear":case"linear":return function(t,e,r,i,n,o){const a=e/i,s=r/n,l=Kt(t,i,n,o);for(let u=0;u<n;++u){const n=s*u,c=Math.floor(n),h=Math.min(Math.ceil(n),r-1);for(let r=0;r<i;++r){const s=a*r,p=s%1,d=Math.floor(s),f=Math.min(Math.ceil(s),e-1);for(let a=0;a<o;++a){const s=t[c*e*o+d*o+a],g=t[c*e*o+f*o+a],y=t[h*e*o+d*o+a],m=t[h*e*o+f*o+a],v=$t($t(s,g,p),$t(y,m,p),n%1);l[u*i*o+r*o+a]=v}}}return l}(t,e,r,i,n,o);default:throw new Error(`Unsupported resampling method: '${a}'`)}}(r,t[2]-t[0],t[3]-t[1],o,a,e.length,s):function(t,e,r,i,n,o="nearest"){switch(o.toLowerCase()){case"nearest":return function(t,e,r,i,n){const o=e/i,a=r/n;return t.map((t=>{const s=Kt(t,i,n);for(let l=0;l<n;++l){const n=Math.min(Math.round(a*l),r-1);for(let r=0;r<i;++r){const a=Math.min(Math.round(o*r),e-1),u=t[n*e+a];s[l*i+r]=u}}return s}))}(t,e,r,i,n);case"bilinear":case"linear":return function(t,e,r,i,n){const o=e/i,a=r/n;return t.map((t=>{const s=Kt(t,i,n);for(let l=0;l<n;++l){const n=a*l,u=Math.floor(n),c=Math.min(Math.ceil(n),r-1);for(let r=0;r<i;++r){const a=o*r,h=a%1,p=Math.floor(a),d=Math.min(Math.ceil(a),e-1),f=t[u*e+p],g=t[u*e+d],y=t[c*e+p],m=t[c*e+d],v=$t($t(f,g,h),$t(y,m,h),n%1);s[l*i+r]=v}}return s}))}(t,e,r,i,n);default:throw new Error(`Unsupported resampling method: '${o}'`)}}(r,t[2]-t[0],t[3]-t[1],o,a,s),n.width=o,n.height=a,n}return r.width=o||t[2]-t[0],r.height=a||t[3]-t[1],r}async readRasters({window:t,samples:e=[],interleave:r,pool:i=null,width:n,height:o,resampleMethod:a,fillValue:s,signal:l}={}){const u=t||[0,0,this.getWidth(),this.getHeight()];if(u[0]>u[2]||u[1]>u[3])throw new Error("Invalid subsets");const c=(u[2]-u[0])*(u[3]-u[1]),h=this.getSamplesPerPixel();if(e&&e.length){for(let t=0;t<e.length;++t)if(e[t]>=h)return Promise.reject(new RangeError(`Invalid sample index '${e[t]}'.`))}else for(let t=0;t<h;++t)e.push(t);let p;if(r)p=Qt(this.fileDirectory.SampleFormat?Math.max.apply(null,this.fileDirectory.SampleFormat):1,Math.max.apply(null,this.fileDirectory.BitsPerSample),c*e.length),s&&p.fill(s);else{p=[];for(let t=0;t<e.length;++t){const r=this.getArrayForSample(e[t],c);Array.isArray(s)&&t<s.length?r.fill(s[t]):s&&!Array.isArray(s)&&r.fill(s),p.push(r)}}const d=i||await Ht(this.fileDirectory);return await this._readRaster(u,e,p,r,d,n,o,a,l)}async readRGB({window:t,interleave:e=!0,pool:r=null,width:i,height:n,resampleMethod:o,enableAlpha:a=!1,signal:s}={}){const l=t||[0,0,this.getWidth(),this.getHeight()];if(l[0]>l[2]||l[1]>l[3])throw new Error("Invalid subsets");const u=this.fileDirectory.PhotometricInterpretation;if(u===Wt.Ie.RGB){let l=[0,1,2];if(this.fileDirectory.ExtraSamples!==Wt.pd.Unspecified&&a){l=[];for(let t=0;t<this.fileDirectory.BitsPerSample.length;t+=1)l.push(t)}return this.readRasters({window:t,interleave:e,samples:l,pool:r,width:i,height:n,resampleMethod:o,signal:s})}let c;switch(u){case Wt.Ie.WhiteIsZero:case Wt.Ie.BlackIsZero:case Wt.Ie.Palette:c=[0];break;case Wt.Ie.CMYK:c=[0,1,2,3];break;case Wt.Ie.YCbCr:case Wt.Ie.CIELab:c=[0,1,2];break;default:throw new Error("Invalid or unsupported photometric interpretation.")}const h={window:l,interleave:!0,samples:c,pool:r,width:i,height:n,resampleMethod:o,signal:s},{fileDirectory:p}=this,d=await this.readRasters(h),f=2**this.fileDirectory.BitsPerSample[0];let g;switch(u){case Wt.Ie.WhiteIsZero:g=function(t,e){const{width:r,height:i}=t,n=new Uint8Array(r*i*3);let o;for(let r=0,i=0;r<t.length;++r,i+=3)o=256-t[r]/e*256,n[i]=o,n[i+1]=o,n[i+2]=o;return n}(d,f);break;case Wt.Ie.BlackIsZero:g=function(t,e){const{width:r,height:i}=t,n=new Uint8Array(r*i*3);let o;for(let r=0,i=0;r<t.length;++r,i+=3)o=t[r]/e*256,n[i]=o,n[i+1]=o,n[i+2]=o;return n}(d,f);break;case Wt.Ie.Palette:g=function(t,e){const{width:r,height:i}=t,n=new Uint8Array(r*i*3),o=e.length/3,a=e.length/3*2;for(let r=0,i=0;r<t.length;++r,i+=3){const s=t[r];n[i]=e[s]/65536*256,n[i+1]=e[s+o]/65536*256,n[i+2]=e[s+a]/65536*256}return n}(d,p.ColorMap);break;case Wt.Ie.CMYK:g=function(t){const{width:e,height:r}=t,i=new Uint8Array(e*r*3);for(let e=0,r=0;e<t.length;e+=4,r+=3){const n=t[e],o=t[e+1],a=t[e+2],s=t[e+3];i[r]=(255-n)/256*255*((255-s)/256),i[r+1]=(255-o)/256*255*((255-s)/256),i[r+2]=(255-a)/256*255*((255-s)/256)}return i}(d);break;case Wt.Ie.YCbCr:g=function(t){const{width:e,height:r}=t,i=new Uint8ClampedArray(e*r*3);for(let e=0,r=0;e<t.length;e+=3,r+=3){const n=t[e],o=t[e+1],a=t[e+2];i[r]=n+1.402*(a-128),i[r+1]=n-.34414*(o-128)-.71414*(a-128),i[r+2]=n+1.772*(o-128)}return i}(d);break;case Wt.Ie.CIELab:g=function(t){const{width:e,height:r}=t,i=new Uint8Array(e*r*3);for(let e=0,r=0;e<t.length;e+=3,r+=3){let n,o,a,s=(t[e+0]+16)/116,l=(t[e+1]<<24>>24)/500+s,u=s-(t[e+2]<<24>>24)/200;l=.95047*(l*l*l>.008856?l*l*l:(l-16/116)/7.787),s=1*(s*s*s>.008856?s*s*s:(s-16/116)/7.787),u=1.08883*(u*u*u>.008856?u*u*u:(u-16/116)/7.787),n=3.2406*l+-1.5372*s+-.4986*u,o=-.9689*l+1.8758*s+.0415*u,a=.0557*l+-.204*s+1.057*u,n=n>.0031308?1.055*n**(1/2.4)-.055:12.92*n,o=o>.0031308?1.055*o**(1/2.4)-.055:12.92*o,a=a>.0031308?1.055*a**(1/2.4)-.055:12.92*a,i[r]=255*Math.max(0,Math.min(1,n)),i[r+1]=255*Math.max(0,Math.min(1,o)),i[r+2]=255*Math.max(0,Math.min(1,a))}return i}(d);break;default:throw new Error("Unsupported photometric interpretation.")}if(!e){const t=new Uint8Array(g.length/3),e=new Uint8Array(g.length/3),r=new Uint8Array(g.length/3);for(let i=0,n=0;i<g.length;i+=3,++n)t[n]=g[i],e[n]=g[i+1],r[n]=g[i+2];g=[t,e,r]}return g.width=d.width,g.height=d.height,g}getTiePoints(){if(!this.fileDirectory.ModelTiepoint)return[];const t=[];for(let e=0;e<this.fileDirectory.ModelTiepoint.length;e+=6)t.push({i:this.fileDirectory.ModelTiepoint[e],j:this.fileDirectory.ModelTiepoint[e+1],k:this.fileDirectory.ModelTiepoint[e+2],x:this.fileDirectory.ModelTiepoint[e+3],y:this.fileDirectory.ModelTiepoint[e+4],z:this.fileDirectory.ModelTiepoint[e+5]});return t}getGDALMetadata(t=null){const e={};if(!this.fileDirectory.GDAL_METADATA)return null;const r=this.fileDirectory.GDAL_METADATA;let i=Vt(r,"Item");i=null===t?i.filter((t=>void 0===qt(t,"sample"))):i.filter((e=>Number(qt(e,"sample"))===t));for(let t=0;t<i.length;++t){const r=i[t];e[qt(r,"name")]=r.inner}return e}getGDALNoData(){if(!this.fileDirectory.GDAL_NODATA)return null;const t=this.fileDirectory.GDAL_NODATA;return Number(t.substring(0,t.length-1))}getOrigin(){const t=this.fileDirectory.ModelTiepoint,e=this.fileDirectory.ModelTransformation;if(t&&6===t.length)return[t[3],t[4],t[5]];if(e)return[e[3],e[7],e[11]];throw new Error("The image does not have an affine transformation.")}getResolution(t=null){const e=this.fileDirectory.ModelPixelScale,r=this.fileDirectory.ModelTransformation;if(e)return[e[0],-e[1],e[2]];if(r)return[r[0],r[5],r[10]];if(t){const[e,r,i]=t.getResolution();return[e*t.getWidth()/this.getWidth(),r*t.getHeight()/this.getHeight(),i*t.getWidth()/this.getWidth()]}throw new Error("The image does not have an affine transformation.")}pixelIsArea(){return 1===this.geoKeys.GTRasterTypeGeoKey}getBoundingBox(){const t=this.getOrigin(),e=this.getResolution(),r=t[0],i=t[1],n=r+e[0]*this.getWidth(),o=i+e[1]*this.getHeight();return[Math.min(r,n),Math.min(i,o),Math.max(r,n),Math.max(i,o)]}};class ee{constructor(t){this._dataView=new DataView(t)}get buffer(){return this._dataView.buffer}getUint64(t,e){const r=this.getUint32(t,e),i=this.getUint32(t+4,e);let n;if(e){if(n=r+2**32*i,!Number.isSafeInteger(n))throw new Error(`${n} exceeds MAX_SAFE_INTEGER. Precision may be lost. Please report if you get this message to https://github.com/geotiffjs/geotiff.js/issues`);return n}if(n=2**32*r+i,!Number.isSafeInteger(n))throw new Error(`${n} exceeds MAX_SAFE_INTEGER. Precision may be lost. Please report if you get this message to https://github.com/geotiffjs/geotiff.js/issues`);return n}getInt64(t,e){let r=0;const i=(128&this._dataView.getUint8(t+(e?7:0)))>0;let n=!0;for(let o=0;o<8;o++){let a=this._dataView.getUint8(t+(e?o:7-o));i&&(n?0!==a&&(a=255&~(a-1),n=!1):a=255&~a),r+=a*256**o}return i&&(r=-r),r}getUint8(t,e){return this._dataView.getUint8(t,e)}getInt8(t,e){return this._dataView.getInt8(t,e)}getUint16(t,e){return this._dataView.getUint16(t,e)}getInt16(t,e){return this._dataView.getInt16(t,e)}getUint32(t,e){return this._dataView.getUint32(t,e)}getInt32(t,e){return this._dataView.getInt32(t,e)}getFloat16(t,e){return Bt(this._dataView,t,e)}getFloat32(t,e){return this._dataView.getFloat32(t,e)}getFloat64(t,e){return this._dataView.getFloat64(t,e)}}class re{constructor(t,e,r,i){this._dataView=new DataView(t),this._sliceOffset=e,this._littleEndian=r,this._bigTiff=i}get sliceOffset(){return this._sliceOffset}get sliceTop(){return this._sliceOffset+this.buffer.byteLength}get littleEndian(){return this._littleEndian}get bigTiff(){return this._bigTiff}get buffer(){return this._dataView.buffer}covers(t,e){return this.sliceOffset<=t&&this.sliceTop>=t+e}readUint8(t){return this._dataView.getUint8(t-this._sliceOffset,this._littleEndian)}readInt8(t){return this._dataView.getInt8(t-this._sliceOffset,this._littleEndian)}readUint16(t){return this._dataView.getUint16(t-this._sliceOffset,this._littleEndian)}readInt16(t){return this._dataView.getInt16(t-this._sliceOffset,this._littleEndian)}readUint32(t){return this._dataView.getUint32(t-this._sliceOffset,this._littleEndian)}readInt32(t){return this._dataView.getInt32(t-this._sliceOffset,this._littleEndian)}readFloat32(t){return this._dataView.getFloat32(t-this._sliceOffset,this._littleEndian)}readFloat64(t){return this._dataView.getFloat64(t-this._sliceOffset,this._littleEndian)}readUint64(t){const e=this.readUint32(t),r=this.readUint32(t+4);let i;if(this._littleEndian){if(i=e+2**32*r,!Number.isSafeInteger(i))throw new Error(`${i} exceeds MAX_SAFE_INTEGER. Precision may be lost. Please report if you get this message to https://github.com/geotiffjs/geotiff.js/issues`);return i}if(i=2**32*e+r,!Number.isSafeInteger(i))throw new Error(`${i} exceeds MAX_SAFE_INTEGER. Precision may be lost. Please report if you get this message to https://github.com/geotiffjs/geotiff.js/issues`);return i}readInt64(t){let e=0;const r=(128&this._dataView.getUint8(t+(this._littleEndian?7:0)))>0;let i=!0;for(let n=0;n<8;n++){let o=this._dataView.getUint8(t+(this._littleEndian?n:7-n));r&&(i?0!==o&&(o=255&~(o-1),i=!1):o=255&~o),e+=o*256**n}return r&&(e=-e),e}readOffset(t){return this._bigTiff?this.readUint64(t):this.readUint32(t)}}const ie="\r\n\r\n";function ne(t){if(void 0!==Object.fromEntries)return Object.fromEntries(t);const e={};for(const[r,i]of t)e[r.toLowerCase()]=i;return e}function oe(t){return ne(t.split("\r\n").map((t=>{const e=t.split(":").map((t=>t.trim()));return e[0]=e[0].toLowerCase(),e})))}function ae(t){let e,r,i;return t&&([,e,r,i]=t.match(/bytes (\d+)-(\d+)\/(\d+)/),e=parseInt(e,10),r=parseInt(r,10),i=parseInt(i,10)),{start:e,end:r,total:i}}class se{async fetch(t,e){return Promise.all(t.map((t=>this.fetchSlice(t,e))))}async fetchSlice(t){throw new Error(`fetching of slice ${t} not possible, not implemented`)}get fileSize(){return null}async close(){}}class le extends Map{constructor(t={}){if(super(),!(t.maxSize&&t.maxSize>0))throw new TypeError("`maxSize` must be a number greater than 0");if("number"==typeof t.maxAge&&0===t.maxAge)throw new TypeError("`maxAge` must be a number greater than 0");this.maxSize=t.maxSize,this.maxAge=t.maxAge||Number.POSITIVE_INFINITY,this.onEviction=t.onEviction,this.cache=new Map,this.oldCache=new Map,this._size=0}_emitEvictions(t){if("function"==typeof this.onEviction)for(const[e,r]of t)this.onEviction(e,r.value)}_deleteIfExpired(t,e){return"number"==typeof e.expiry&&e.expiry<=Date.now()&&("function"==typeof this.onEviction&&this.onEviction(t,e.value),this.delete(t))}_getOrDeleteIfExpired(t,e){if(!1===this._deleteIfExpired(t,e))return e.value}_getItemValue(t,e){return e.expiry?this._getOrDeleteIfExpired(t,e):e.value}_peek(t,e){const r=e.get(t);return this._getItemValue(t,r)}_set(t,e){this.cache.set(t,e),this._size++,this._size>=this.maxSize&&(this._size=0,this._emitEvictions(this.oldCache),this.oldCache=this.cache,this.cache=new Map)}_moveToRecent(t,e){this.oldCache.delete(t),this._set(t,e)}*_entriesAscending(){for(const t of this.oldCache){const[e,r]=t;this.cache.has(e)||!1===this._deleteIfExpired(e,r)&&(yield t)}for(const t of this.cache){const[e,r]=t;!1===this._deleteIfExpired(e,r)&&(yield t)}}get(t){if(this.cache.has(t)){const e=this.cache.get(t);return this._getItemValue(t,e)}if(this.oldCache.has(t)){const e=this.oldCache.get(t);if(!1===this._deleteIfExpired(t,e))return this._moveToRecent(t,e),e.value}}set(t,e,{maxAge:r=this.maxAge}={}){const i="number"==typeof r&&r!==Number.POSITIVE_INFINITY?Date.now()+r:void 0;this.cache.has(t)?this.cache.set(t,{value:e,expiry:i}):this._set(t,{value:e,expiry:i})}has(t){return this.cache.has(t)?!this._deleteIfExpired(t,this.cache.get(t)):!!this.oldCache.has(t)&&!this._deleteIfExpired(t,this.oldCache.get(t))}peek(t){return this.cache.has(t)?this._peek(t,this.cache):this.oldCache.has(t)?this._peek(t,this.oldCache):void 0}delete(t){const e=this.cache.delete(t);return e&&this._size--,this.oldCache.delete(t)||e}clear(){this.cache.clear(),this.oldCache.clear(),this._size=0}resize(t){if(!(t&&t>0))throw new TypeError("`maxSize` must be a number greater than 0");const e=[...this._entriesAscending()],r=e.length-t;r<0?(this.cache=new Map(e),this.oldCache=new Map,this._size=e.length):(r>0&&this._emitEvictions(e.slice(0,r)),this.oldCache=new Map(e.slice(r)),this.cache=new Map,this._size=0),this.maxSize=t}*keys(){for(const[t]of this)yield t}*values(){for(const[,t]of this)yield t}*[Symbol.iterator](){for(const t of this.cache){const[e,r]=t;!1===this._deleteIfExpired(e,r)&&(yield[e,r.value])}for(const t of this.oldCache){const[e,r]=t;this.cache.has(e)||!1===this._deleteIfExpired(e,r)&&(yield[e,r.value])}}*entriesDescending(){let t=[...this.cache];for(let e=t.length-1;e>=0;--e){const r=t[e],[i,n]=r;!1===this._deleteIfExpired(i,n)&&(yield[i,n.value])}t=[...this.oldCache];for(let e=t.length-1;e>=0;--e){const r=t[e],[i,n]=r;this.cache.has(i)||!1===this._deleteIfExpired(i,n)&&(yield[i,n.value])}}*entriesAscending(){for(const[t,e]of this._entriesAscending())yield[t,e.value]}get size(){if(!this._size)return this.oldCache.size;let t=0;for(const e of this.oldCache.keys())this.cache.has(e)||t++;return Math.min(this._size+t,this.maxSize)}entries(){return this.entriesAscending()}forEach(t,e=this){for(const[r,i]of this.entriesAscending())t.call(e,i,r,this)}get[Symbol.toStringTag](){return JSON.stringify([...this.entriesAscending()])}}class ue extends Error{constructor(t){super(t),Error.captureStackTrace&&Error.captureStackTrace(this,ue),this.name="AbortError"}}class ce extends Error{constructor(t,e){super(e),this.errors=t,this.message=e,this.name="AggregateError"}}const he=ce;class pe{constructor(t,e,r=null){this.offset=t,this.length=e,this.data=r}get top(){return this.offset+this.length}}class de{constructor(t,e,r){this.offset=t,this.length=e,this.blockIds=r}}class fe extends se{constructor(t,{blockSize:e=65536,cacheSize:r=100}={}){super(),this.source=t,this.blockSize=e,this.blockCache=new le({maxSize:r}),this.blockRequests=new Map,this.blockIdsToFetch=new Set,this.abortedBlockIds=new Set}get fileSize(){return this.source.fileSize}async fetch(t,e){const r=[],i=[],n=[];for(const{offset:e,length:o}of t){let t=e+o;const{fileSize:a}=this;null!==a&&(t=Math.min(t,a));for(let o=Math.floor(e/this.blockSize)*this.blockSize;o<t;o+=this.blockSize){const t=Math.floor(o/this.blockSize);this.blockCache.has(t)||this.blockRequests.has(t)||(this.blockIdsToFetch.add(t),i.push(t)),this.blockRequests.has(t)&&r.push(this.blockRequests.get(t)),n.push(t)}}await async function(t){return new Promise((t=>setTimeout(t,undefined)))}(),this.fetchBlocks(e);const o=[];for(const t of i)this.blockRequests.has(t)&&o.push(this.blockRequests.get(t));await Promise.allSettled(r),await Promise.allSettled(o);const a=[],s=n.filter((t=>this.abortedBlockIds.has(t)||!this.blockCache.has(t)));if(s.forEach((t=>this.blockIdsToFetch.add(t))),s.length>0&&e&&!e.aborted){this.fetchBlocks(null);for(const t of s){const e=this.blockRequests.get(t);if(!e)throw new Error(`Block ${t} is not in the block requests`);a.push(e)}await Promise.allSettled(a)}if(e&&e.aborted)throw new ue("Request was aborted");const l=n.map((t=>this.blockCache.get(t))),u=l.filter((t=>!t));if(u.length)throw new he(u,"Request failed");const c=new Map(function(t,e){const r=Array.isArray(t)?t:Array.from(t),i=Array.isArray(e)?e:Array.from(e);return r.map(((t,e)=>[t,i[e]]))}(n,l));return this.readSliceData(t,c)}fetchBlocks(t){if(this.blockIdsToFetch.size>0){const e=this.groupBlocks(this.blockIdsToFetch),r=this.source.fetch(e,t);for(let i=0;i<e.length;++i){const n=e[i];for(const e of n.blockIds)this.blockRequests.set(e,(async()=>{try{const t=(await r)[i],n=e*this.blockSize,o=n-t.offset,a=Math.min(o+this.blockSize,t.data.byteLength),s=t.data.slice(o,a),l=new pe(n,s.byteLength,s,e);this.blockCache.set(e,l),this.abortedBlockIds.delete(e)}catch(r){if("AbortError"!==r.name)throw r;r.signal=t,this.blockCache.delete(e),this.abortedBlockIds.add(e)}finally{this.blockRequests.delete(e)}})())}this.blockIdsToFetch.clear()}}groupBlocks(t){const e=Array.from(t).sort(((t,e)=>t-e));if(0===e.length)return[];let r=[],i=null;const n=[];for(const t of e)null===i||i+1===t?(r.push(t),i=t):(n.push(new de(r[0]*this.blockSize,r.length*this.blockSize,r)),r=[t],i=t);return n.push(new de(r[0]*this.blockSize,r.length*this.blockSize,r)),n}readSliceData(t,e){return t.map((t=>{let r=t.offset+t.length;null!==this.fileSize&&(r=Math.min(this.fileSize,r));const i=Math.floor(t.offset/this.blockSize),n=Math.floor(r/this.blockSize),o=new ArrayBuffer(t.length),a=new Uint8Array(o);for(let o=i;o<=n;++o){const i=e.get(o),n=i.offset-t.offset,s=i.top-r;let l,u=0,c=0;n<0?u=-n:n>0&&(c=n),l=s<0?i.length-u:r-i.offset-u;const h=new Uint8Array(i.data,u,l);a.set(h,c)}return o}))}}class ge{get ok(){return this.status>=200&&this.status<=299}get status(){throw new Error("not implemented")}getHeader(t){throw new Error("not implemented")}async getData(){throw new Error("not implemented")}}class ye{constructor(t){this.url=t}async request({headers:t,credentials:e,signal:r}={}){throw new Error("request is not implemented")}}class me extends ge{constructor(t){super(),this.response=t}get status(){return this.response.status}getHeader(t){return this.response.headers.get(t)}async getData(){return this.response.arrayBuffer?await this.response.arrayBuffer():(await this.response.buffer()).buffer}}class ve extends ye{constructor(t,e){super(t),this.credentials=e}async request({headers:t,credentials:e,signal:r}={}){const i=await fetch(this.url,{headers:t,credentials:e,signal:r});return new me(i)}}class _e extends ge{constructor(t,e){super(),this.xhr=t,this.data=e}get status(){return this.xhr.status}getHeader(t){return this.xhr.getResponseHeader(t)}async getData(){return this.data}}class xe extends ye{constructRequest(t,e){return new Promise(((r,i)=>{const n=new XMLHttpRequest;n.open("GET",this.url),n.responseType="arraybuffer";for(const[e,r]of Object.entries(t))n.setRequestHeader(e,r);n.onload=()=>{const t=n.response;r(new _e(n,t))},n.onerror=i,n.onabort=()=>i(new ue("Request aborted")),n.send(),e&&(e.aborted&&n.abort(),e.addEventListener("abort",(()=>n.abort())))}))}async request({headers:t,signal:e}={}){return await this.constructRequest(t,e)}}var be=r(3752),we=r(3640),Ee=r(2630);class Te extends ge{constructor(t,e){super(),this.response=t,this.dataPromise=e}get status(){return this.response.statusCode}getHeader(t){return this.response.headers[t]}async getData(){return await this.dataPromise}}class Se extends ye{constructor(t){super(t),this.parsedUrl=Ee.parse(this.url),this.httpApi="http:"===this.parsedUrl.protocol?be:we}constructRequest(t,e){return new Promise(((r,i)=>{const n=this.httpApi.get({...this.parsedUrl,headers:t},(t=>{const e=new Promise((e=>{const r=[];t.on("data",(t=>{r.push(t)})),t.on("end",(()=>{const t=Buffer.concat(r).buffer;e(t)})),t.on("error",i)}));r(new Te(t,e))}));n.on("error",i),e&&(e.aborted&&n.destroy(new ue("Request aborted")),e.addEventListener("abort",(()=>n.destroy(new ue("Request aborted")))))}))}async request({headers:t,signal:e}={}){return await this.constructRequest(t,e)}}class Ce extends se{constructor(t,e,r,i){super(),this.client=t,this.headers=e,this.maxRanges=r,this.allowFullFile=i,this._fileSize=null}async fetch(t,e){return this.maxRanges>=t.length?this.fetchSlices(t,e):(this.maxRanges>0&&t.length,Promise.all(t.map((t=>this.fetchSlice(t,e)))))}async fetchSlices(t,e){const r=await this.client.request({headers:{...this.headers,Range:`bytes=${t.map((({offset:t,length:e})=>`${t}-${t+e}`)).join(",")}`},signal:e});if(r.ok){if(206===r.status){const{type:i,params:n}=function(t){const[e,...r]=t.split(";").map((t=>t.trim()));return{type:e,params:ne(r.map((t=>t.split("="))))}}(r.getHeader("content-type"));if("multipart/byteranges"===i){const t=function(t,e){let r=null;const i=new TextDecoder("ascii"),n=[],o=`--${e}`,a=`${o}--`;for(let e=0;e<10;++e)i.decode(new Uint8Array(t,e,o.length))===o&&(r=e);if(null===r)throw new Error("Could not find initial boundary");for(;r<t.byteLength;){const e=i.decode(new Uint8Array(t,r,Math.min(o.length+1024,t.byteLength-r)));if(0===e.length||e.startsWith(a))break;if(!e.startsWith(o))throw new Error("Part does not start with boundary");const s=e.substr(o.length+2);if(0===s.length)break;const l=s.indexOf(ie),u=oe(s.substr(0,l)),{start:c,end:h,total:p}=ae(u["content-range"]),d=r+o.length+l+ie.length,f=parseInt(h,10)+1-parseInt(c,10);n.push({headers:u,data:t.slice(d,d+f),offset:c,length:f,fileSize:p}),r=d+f+4}return n}(await r.getData(),n.boundary);return this._fileSize=t[0].fileSize||null,t}const o=await r.getData(),{start:a,end:s,total:l}=ae(r.getHeader("content-range"));this._fileSize=l||null;const u=[{data:o,offset:a,length:s-a}];if(t.length>1){const r=await Promise.all(t.slice(1).map((t=>this.fetchSlice(t,e))));return u.concat(r)}return u}{if(!this.allowFullFile)throw new Error("Server responded with full file");const t=await r.getData();return this._fileSize=t.byteLength,[{data:t,offset:0,length:t.byteLength}]}}throw new Error("Error fetching data.")}async fetchSlice(t,e){const{offset:r,length:i}=t,n=await this.client.request({headers:{...this.headers,Range:`bytes=${r}-${r+i}`},signal:e});if(n.ok){if(206===n.status){const t=await n.getData(),{total:e}=ae(n.getHeader("content-range"));return this._fileSize=e||null,{data:t,offset:r,length:i}}{if(!this.allowFullFile)throw new Error("Server responded with full file");const t=await n.getData();return this._fileSize=t.byteLength,{data:t,offset:0,length:t.byteLength}}}throw new Error("Error fetching data.")}get fileSize(){return this._fileSize}}function Oe(t,{blockSize:e,cacheSize:r}){return null===e?t:new fe(t,{blockSize:e,cacheSize:r})}function Re(t,{forceXHR:e=!1,...r}={}){return"function"!=typeof fetch||e?"undefined"!=typeof XMLHttpRequest?function(t,{headers:e={},maxRanges:r=0,allowFullFile:i=!1,...n}={}){const o=new xe(t);return Oe(new Ce(o,e,r,i),n)}(t,r):function(t,{headers:e={},maxRanges:r=0,allowFullFile:i=!1,...n}={}){const o=new Se(t);return Oe(new Ce(o,e,r,i),n)}(t,r):function(t,{headers:e={},credentials:r,maxRanges:i=0,allowFullFile:n=!1,...o}={}){const a=new ve(t,r);return Oe(new Ce(a,e,i,n),o)}(t,r)}function Ie(t){switch(t){case Wt.sf.BYTE:case Wt.sf.ASCII:case Wt.sf.SBYTE:case Wt.sf.UNDEFINED:return 1;case Wt.sf.SHORT:case Wt.sf.SSHORT:return 2;case Wt.sf.LONG:case Wt.sf.SLONG:case Wt.sf.FLOAT:case Wt.sf.IFD:return 4;case Wt.sf.RATIONAL:case Wt.sf.SRATIONAL:case Wt.sf.DOUBLE:case Wt.sf.LONG8:case Wt.sf.SLONG8:case Wt.sf.IFD8:return 8;default:throw new RangeError(`Invalid field type: ${t}`)}}function Pe(t,e,r,i){let n=null,o=null;const a=Ie(e);switch(e){case Wt.sf.BYTE:case Wt.sf.ASCII:case Wt.sf.UNDEFINED:n=new Uint8Array(r),o=t.readUint8;break;case Wt.sf.SBYTE:n=new Int8Array(r),o=t.readInt8;break;case Wt.sf.SHORT:n=new Uint16Array(r),o=t.readUint16;break;case Wt.sf.SSHORT:n=new Int16Array(r),o=t.readInt16;break;case Wt.sf.LONG:case Wt.sf.IFD:n=new Uint32Array(r),o=t.readUint32;break;case Wt.sf.SLONG:n=new Int32Array(r),o=t.readInt32;break;case Wt.sf.LONG8:case Wt.sf.IFD8:n=new Array(r),o=t.readUint64;break;case Wt.sf.SLONG8:n=new Array(r),o=t.readInt64;break;case Wt.sf.RATIONAL:n=new Uint32Array(2*r),o=t.readUint32;break;case Wt.sf.SRATIONAL:n=new Int32Array(2*r),o=t.readInt32;break;case Wt.sf.FLOAT:n=new Float32Array(r),o=t.readFloat32;break;case Wt.sf.DOUBLE:n=new Float64Array(r),o=t.readFloat64;break;default:throw new RangeError(`Invalid field type: ${e}`)}if(e!==Wt.sf.RATIONAL&&e!==Wt.sf.SRATIONAL)for(let e=0;e<r;++e)n[e]=o.call(t,i+e*a);else for(let e=0;e<r;e+=2)n[e]=o.call(t,i+e*a),n[e+1]=o.call(t,i+(e*a+4));return e===Wt.sf.ASCII?new TextDecoder("utf-8").decode(n):n}class Le{constructor(t,e,r){this.fileDirectory=t,this.geoKeyDirectory=e,this.nextIFDByteOffset=r}}class Ae extends Error{constructor(t){super(`No image at index ${t}`),this.index=t}}class Me{async readRasters(t={}){const{window:e,width:r,height:i}=t;let{resX:n,resY:o,bbox:a}=t;const s=await this.getImage();let l=s;const u=await this.getImageCount(),c=s.getBoundingBox();if(e&&a)throw new Error('Both "bbox" and "window" passed.');if(r||i){if(e){const[t,r]=s.getOrigin(),[i,n]=s.getResolution();a=[t+e[0]*i,r+e[1]*n,t+e[2]*i,r+e[3]*n]}const t=a||c;if(r){if(n)throw new Error("Both width and resX passed");n=(t[2]-t[0])/r}if(i){if(o)throw new Error("Both width and resY passed");o=(t[3]-t[1])/i}}if(n||o){const t=[];for(let e=0;e<u;++e){const r=await this.getImage(e),{SubfileType:i,NewSubfileType:n}=r.fileDirectory;(0===e||2===i||1&n)&&t.push(r)}t.sort(((t,e)=>t.getWidth()-e.getWidth()));for(let e=0;e<t.length;++e){const r=t[e],i=(c[2]-c[0])/r.getWidth(),a=(c[3]-c[1])/r.getHeight();if(l=r,n&&n>i||o&&o>a)break}}let h=e;if(a){const[t,e]=s.getOrigin(),[r,i]=l.getResolution(s);h=[Math.round((a[0]-t)/r),Math.round((a[1]-e)/i),Math.round((a[2]-t)/r),Math.round((a[3]-e)/i)],h=[Math.min(h[0],h[2]),Math.min(h[1],h[3]),Math.max(h[0],h[2]),Math.max(h[1],h[3])]}return l.readRasters({...t,window:h})}}class Fe extends Me{constructor(t,e,r,i,n={}){super(),this.source=t,this.littleEndian=e,this.bigTiff=r,this.firstIFDOffset=i,this.cache=n.cache||!1,this.ifdRequests=[],this.ghostValues=null}async getSlice(t,e){const r=this.bigTiff?4048:1024;return new re((await this.source.fetch([{offset:t,length:void 0!==e?e:r}]))[0],t,this.littleEndian,this.bigTiff)}async parseFileDirectoryAt(t){const e=this.bigTiff?20:12,r=this.bigTiff?8:2;let i=await this.getSlice(t);const n=this.bigTiff?i.readUint64(t):i.readUint16(t),o=n*e+(this.bigTiff?16:6);i.covers(t,o)||(i=await this.getSlice(t,o));const a={};let s=t+(this.bigTiff?8:2);for(let t=0;t<n;s+=e,++t){const t=i.readUint16(s),e=i.readUint16(s+2),r=this.bigTiff?i.readUint64(s+4):i.readUint32(s+4);let n,o;const l=Ie(e),u=s+(this.bigTiff?12:8);if(l*r<=(this.bigTiff?8:4))n=Pe(i,e,r,u);else{const t=i.readOffset(u),o=Ie(e)*r;n=i.covers(t,o)?Pe(i,e,r,t):Pe(await this.getSlice(t,o),e,r,t)}o=1===r&&-1===Wt.It.indexOf(t)&&e!==Wt.sf.RATIONAL&&e!==Wt.sf.SRATIONAL?n[0]:n,a[Wt.L[t]]=o}const l=function(t){const e=t.GeoKeyDirectory;if(!e)return null;const r={};for(let i=4;i<=4*e[3];i+=4){const n=Wt.P1[e[i]],o=e[i+1]?Wt.L[e[i+1]]:null,a=e[i+2],s=e[i+3];let l=null;if(o){if(l=t[o],null==l)throw new Error(`Could not get value of geoKey '${n}'.`);"string"==typeof l?l=l.substring(s,s+a-1):l.subarray&&(l=l.subarray(s,s+a),1===a&&(l=l[0]))}else l=s;r[n]=l}return r}(a),u=i.readOffset(t+r+e*n);return new Le(a,l,u)}async requestIFD(t){if(this.ifdRequests[t])return this.ifdRequests[t];if(0===t)return this.ifdRequests[t]=this.parseFileDirectoryAt(this.firstIFDOffset),this.ifdRequests[t];if(!this.ifdRequests[t-1])try{this.ifdRequests[t-1]=this.requestIFD(t-1)}catch(e){if(e instanceof Ae)throw new Ae(t);throw e}return this.ifdRequests[t]=(async()=>{const e=await this.ifdRequests[t-1];if(0===e.nextIFDByteOffset)throw new Ae(t);return this.parseFileDirectoryAt(e.nextIFDByteOffset)})(),this.ifdRequests[t]}async getImage(t=0){const e=await this.requestIFD(t);return new te(e.fileDirectory,e.geoKeyDirectory,this.dataView,this.littleEndian,this.cache,this.source)}async getImageCount(){let t=0,e=!0;for(;e;)try{await this.requestIFD(t),++t}catch(t){if(!(t instanceof Ae))throw t;e=!1}return t}async getGhostValues(){const t=this.bigTiff?16:8;if(this.ghostValues)return this.ghostValues;const e="GDAL_STRUCTURAL_METADATA_SIZE=",r=e.length+100;let i=await this.getSlice(t,r);if(e===Pe(i,Wt.sf.ASCII,e.length,t)){const e=Pe(i,Wt.sf.ASCII,r,t).split("\n")[0],n=Number(e.split("=")[1].split(" ")[0])+e.length;n>r&&(i=await this.getSlice(t,n));const o=Pe(i,Wt.sf.ASCII,n,t);this.ghostValues={},o.split("\n").filter((t=>t.length>0)).map((t=>t.split("="))).forEach((([t,e])=>{this.ghostValues[t]=e}))}return this.ghostValues}static async fromSource(t,e,r){const i=(await t.fetch([{offset:0,length:1024}],r))[0],n=new ee(i),o=n.getUint16(0,0);let a;if(18761===o)a=!0;else{if(19789!==o)throw new TypeError("Invalid byte order value.");a=!1}const s=n.getUint16(2,a);let l;if(42===s)l=!1;else{if(43!==s)throw new TypeError("Invalid magic number.");if(l=!0,8!==n.getUint16(4,a))throw new Error("Unsupported offset byte-size.")}const u=l?n.getUint64(8,a):n.getUint32(4,a);return new Fe(t,a,l,u,e)}close(){return"function"==typeof this.source.close&&this.source.close()}}class Ze extends Me{constructor(t,e){super(),this.mainFile=t,this.overviewFiles=e,this.imageFiles=[t].concat(e),this.fileDirectoriesPerFile=null,this.fileDirectoriesPerFileParsing=null,this.imageCount=null}async parseFileDirectoriesPerFile(){const t=[this.mainFile.parseFileDirectoryAt(this.mainFile.firstIFDOffset)].concat(this.overviewFiles.map((t=>t.parseFileDirectoryAt(t.firstIFDOffset))));return this.fileDirectoriesPerFile=await Promise.all(t),this.fileDirectoriesPerFile}async getImage(t=0){await this.getImageCount(),await this.parseFileDirectoriesPerFile();let e=0,r=0;for(let i=0;i<this.imageFiles.length;i++){const n=this.imageFiles[i];for(let o=0;o<this.imageCounts[i];o++){if(t===e){const t=await n.requestIFD(r);return new te(t.fileDirectory,t.geoKeyDirectory,n.dataView,n.littleEndian,n.cache,n.source)}e++,r++}r=0}throw new RangeError("Invalid image index")}async getImageCount(){if(null!==this.imageCount)return this.imageCount;const t=[this.mainFile.getImageCount()].concat(this.overviewFiles.map((t=>t.getImageCount())));return this.imageCounts=await Promise.all(t),this.imageCount=this.imageCounts.reduce(((t,e)=>t+e),0),this.imageCount}}const ke="undefined"!=typeof navigator&&navigator.hardwareConcurrency||2,je=class{constructor(t=ke,e){this.workers=null,this._awaitingDecoder=null,this.size=t,this.messageId=0,t&&(this._awaitingDecoder=e?Promise.resolve(e):new Promise((t=>{r.e(831).then(r.bind(r,8831)).then((e=>{t(e.create)}))})),this._awaitingDecoder.then((e=>{this._awaitingDecoder=null,this.workers=[];for(let r=0;r<t;r++)this.workers.push({worker:e(),idle:!0})})))}async decode(t,e){return this._awaitingDecoder&&await this._awaitingDecoder,0===this.size?Ht(t).then((r=>r.decode(t,e))):new Promise((r=>{const i=this.workers.find((t=>t.idle))||this.workers[Math.floor(Math.random()*this.size)];i.idle=!1;const n=this.messageId++,o=t=>{t.data.id===n&&(i.idle=!0,r(t.data.decoded),i.worker.removeEventListener("message",o))};i.worker.addEventListener("message",o),i.worker.postMessage({fileDirectory:t,buffer:e,id:n},[e])}))}destroy(){this.workers&&(this.workers.forEach((t=>{t.worker.terminate()})),this.workers=null)}};var De,Ne=r(3983),Ge=r(4307),ze=r(8375),Ue=function(){var t=function(e,r){return t=Object.setPrototypeOf||{__proto__:[]}instanceof Array&&function(t,e){t.__proto__=e}||function(t,e){for(var r in e)Object.prototype.hasOwnProperty.call(e,r)&&(t[r]=e[r])},t(e,r)};return function(e,r){if("function"!=typeof r&&null!==r)throw new TypeError("Class extends value "+String(r)+" is not a constructor or null");function i(){this.constructor=e}t(e,r),e.prototype=null===r?Object.create(r):(i.prototype=r.prototype,new i)}}();function Be(t){try{return t.getBoundingBox()}catch(r){var e=t.fileDirectory;return[0,0,e.ImageWidth,e.ImageLength]}}function qe(t){try{return t.getOrigin().slice(0,2)}catch(e){return[0,t.fileDirectory.ImageLength]}}function Ve(t,e){try{return t.getResolution(e)[0]}catch(r){return e.fileDirectory.ImageWidth/t.fileDirectory.ImageWidth}}function We(t){var e,r,i=t.geoKeys;if(!i)return null;if(i.ProjectedCSTypeGeoKey){var n="EPSG:"+i.ProjectedCSTypeGeoKey;return(e=(0,h.get)(n))||(r=(0,ze.Ne)(i.ProjLinearUnitsGeoKey))&&(e=new h.Projection({code:n,units:r})),e}return i.GeographicTypeGeoKey?(n="EPSG:"+i.GeographicTypeGeoKey,(e=(0,h.get)(n))||(r=(0,ze.Ne)(i.GeogAngularUnitsGeoKey))&&(e=new h.Projection({code:n,units:r})),e):null}function Xe(t){return t.getImageCount().then((function(e){for(var r=new Array(e),i=0;i<e;++i)r[i]=t.getImage(i);return Promise.all(r)}))}function Ye(t,e){var r;return r=t.overviews?async function(t,e=[],r={},i){const n=await Fe.fromSource(Re(t,r),i),o=await Promise.all(e.map((t=>Fe.fromSource(Re(t,r)))));return new Ze(n,o)}(t.url,t.overviews,e):async function(t,e={},r){return Fe.fromSource(Re(t,e),r)}(t.url,e),r.then(Xe)}function He(t,e,r,i,n){if(Array.isArray(t)){var o=t.length;if(!Array.isArray(e)||o!=e.length){var a=new Error(i);throw n(a),a}for(var s=0;s<o;++s)He(t[s],e[s],r,i,n)}else if(e=e,Math.abs(t-e)>r*t)throw new Error(i)}function Ke(t){return t instanceof Int8Array?-128:t instanceof Int16Array?-32768:t instanceof Int32Array?-2147483648:t instanceof Float32Array?12e-39:0}function $e(t){return t instanceof Int8Array?127:t instanceof Uint8Array||t instanceof Uint8ClampedArray?255:t instanceof Int16Array?32767:t instanceof Uint16Array?65535:t instanceof Int32Array?2147483647:t instanceof Uint32Array?4294967295:t instanceof Float32Array?34e37:255}var Je=function(t){function e(e){var r=t.call(this,{state:a.Z.LOADING,tileGrid:null,projection:null,opaque:e.opaque,transition:e.transition,interpolate:!1!==e.interpolate,wrapX:e.wrapX})||this;r.sourceInfo_=e.sources;var i=r.sourceInfo_.length;r.sourceOptions_=e.sourceOptions,r.sourceImagery_=new Array(i),r.resolutionFactors_=new Array(i),r.samplesPerPixel_,r.nodataValues_,r.metadata_,r.normalize_=!1!==e.normalize,r.addAlpha_=!1,r.error_=null,r.readMethod_=e.convertToRGB?"readRGB":"readRasters",r.setKey(r.sourceInfo_.map((function(t){return t.url})).join(","));for(var n=r,o=new Array(i),s=0;s<i;++s)o[s]=Ye(r.sourceInfo_[s],r.sourceOptions_);return Promise.all(o).then((function(t){n.configure_(t)})).catch((function(t){console.error(t),n.error_=t,n.setState(a.Z.ERROR)})),r}return Ue(e,t),e.prototype.getError=function(){return this.error_},e.prototype.configure_=function(t){for(var e,r,i,n,s=new Array(t.length),l=new Array(t.length),u=new Array(t.length),c=0,p=t.length,d=function(a){var h=t[a],p=h.length,d=void 0,g=void 0,y=new Array(p),m=new Array(p);l[a]=new Array(p),u[a]=new Array(p);for(var v=0;v<p;++v){var _=h[v],x=_.getGDALNoData();u[a][v]=_.getGDALMetadata(0),l[a][v]=null===x?NaN:x;var b=f.sourceInfo_[a].bands;s[a]=b?b.length:_.getSamplesPerPixel();var w=p-(v+1);d||(d=Be(_)),g||(g=qe(_)),m[w]=Ve(_,h[0]),y[w]=[_.getTileWidth(),_.getTileHeight()]}if(e?(0,o.getIntersection)(e,d,e):e=d,r){var E="Origin mismatch for source ".concat(a,", got [").concat(g,"] but expected [").concat(r,"]");He(r,g,0,E,f.viewRejector)}else r=g;if(n){n.length-c>m.length&&(c=n.length-m.length);var T=n[n.length-1]/m[m.length-1];f.resolutionFactors_[a]=T;var S=m.map((function(t){return t*T}));E="Resolution mismatch for source ".concat(a,", got [").concat(S,"] but expected [").concat(n,"]"),He(n.slice(c,n.length),S,.02,E,f.viewRejector)}else n=m,f.resolutionFactors_[a]=1;i?He(i.slice(c,i.length),y,0,"Tile size mismatch for source ".concat(a),f.viewRejector):i=y,f.sourceImagery_[a]=h.reverse()},f=this,g=0;g<p;++g)d(g);for(var y=0,m=this.sourceImagery_.length;y<m;++y)for(var v=this.sourceImagery_[y];v.length<n.length;)v.unshift(void 0);if(!this.getProjection()){var _=t[0];for(y=_.length-1;y>=0;--y){var x=We(_[y]);if(x){this.projection=x;break}}}this.samplesPerPixel_=s,this.nodataValues_=l,this.metadata_=u;t:for(g=0;g<p;++g){if(void 0!==this.sourceInfo_[g].nodata){this.addAlpha_=!0;break}var b=l[g],w=this.sourceInfo_[g].bands;if(w){for(y=0;y<w.length;++y)if(!isNaN(b[w[y]-1])){this.addAlpha_=!0;break t}}else for(var E=0;E<b.length;++E)if(!isNaN(b[E])){this.addAlpha_=!0;break t}}var T=this.addAlpha_?1:0;this.bandCount=s.reduce((function(t,e){return t+e}),0)+T;var S=new j.Z({extent:e,minZoom:c,origin:r,resolutions:n,tileSizes:i});this.tileGrid=S,this.setLoader(this.loadTile_.bind(this)),this.setState(a.Z.READY),this.viewResolver({projection:this.projection,resolutions:n,center:(0,h.toUserCoordinate)((0,o.getCenter)(e),this.projection),extent:(0,h.toUserExtent)(e,this.projection),zoom:0})},e.prototype.loadTile_=function(t,e,r){for(var i=(0,Ge.Pq)(this.tileGrid.getTileSize(t)),n=this.sourceImagery_.length,o=new Array(n),a=this.addAlpha_,s=this.bandCount,l=this.samplesPerPixel_,u=this.nodataValues_,c=this.sourceInfo_,h=function(n){var a=c[n],s=p.resolutionFactors_[n],l=[Math.round(e*(i[0]*s)),Math.round(r*(i[1]*s)),Math.round((e+1)*(i[0]*s)),Math.round((r+1)*(i[1]*s))],h=p.sourceImagery_[n][t],d=void 0;a.bands&&(d=a.bands.map((function(t){return t-1})));var f;f=isNaN(a.nodata)?d?d.map((function(t){return u[n][t]})):u[n]:a.nodata,o[n]=h[p.readMethod_]({window:l,width:i[0],height:i[1],samples:d,fillValue:f,pool:(De||(De=new je),De),interleave:!1})},p=this,d=0;d<n;++d)h(d);var f=i[0]*i[1],g=f*s,y=this.normalize_,m=this.metadata_;return Promise.all(o).then((function(t){var e;e=y?new Uint8Array(g):new Float32Array(g);for(var r=0,i=0;i<f;++i){for(var o=a,s=0;s<n;++s){var h=c[s],p=h.min,d=h.max,v=void 0,_=void 0;if(y){var x=m[s][0];void 0===p&&(p=x&&"STATISTICS_MINIMUM"in x?parseFloat(x.STATISTICS_MINIMUM):Ke(t[s][0])),void 0===d&&(d=x&&"STATISTICS_MAXIMUM"in x?parseFloat(x.STATISTICS_MAXIMUM):$e(t[s][0])),_=-p*(v=255/(d-p))}for(var b=0;b<l[s];++b){var w,E=t[s][b][i];if(w=y?(0,Ne.uZ)(v*E+_,0,255):E,a){var T=h.nodata;if(void 0===T){var S;S=h.bands?h.bands[b]-1:b,T=u[s][S]}E!==T&&(o=!1,e[r]=w)}else e[r]=w;r++}}a&&(o||(e[r]=255),r++)}return e}))},e}(k);Je.prototype.getView;const Qe=Je;var tr=r(4768),er=r(825),rr=r(8326),ir=function(){var t=function(e,r){return t=Object.setPrototypeOf||{__proto__:[]}instanceof Array&&function(t,e){t.__proto__=e}||function(t,e){for(var r in e)Object.prototype.hasOwnProperty.call(e,r)&&(t[r]=e[r])},t(e,r)};return function(e,r){if("function"!=typeof r&&null!==r)throw new TypeError("Class extends value "+String(r)+" is not a constructor or null");function i(){this.constructor=e}t(e,r),e.prototype=null===r?Object.create(r):(i.prototype=r.prototype,new i)}}(),nr="default",or=function(t){function e(e,r,i,n,o,a,s){var l=t.call(this,r,i,n,o,a,s)||this;return l.zoomifyImage_=null,l.tileSize_=e,l}return ir(e,t),e.prototype.getImage=function(){if(this.zoomifyImage_)return this.zoomifyImage_;var e=t.prototype.getImage.call(this);if(this.state==M.Z.LOADED){var r=this.tileSize_;if(e.width==r[0]&&e.height==r[1])return this.zoomifyImage_=e,e;var i=(0,rr.E4)(r[0],r[1]);return i.drawImage(e,0,0),this.zoomifyImage_=i.canvas,i.canvas}return e},e}(er.Z);const ar=function(t){function e(e){var r=this,i=e,n=void 0===i.imageSmoothing||i.imageSmoothing;void 0!==i.interpolate&&(n=i.interpolate);var a=i.size,s=void 0!==i.tierSizeCalculation?i.tierSizeCalculation:nr,u=i.tilePixelRatio||1,c=a[0],h=a[1],p=[],d=i.tileSize||tr.S,f=d*u;switch(s){case nr:for(;c>f||h>f;)p.push([Math.ceil(c/f),Math.ceil(h/f)]),f+=f;break;case"truncated":for(var g=c,y=h;g>f||y>f;)p.push([Math.ceil(g/f),Math.ceil(y/f)]),g>>=1,y>>=1;break;default:(0,C.h)(!1,53)}p.push([1,1]),p.reverse();for(var m=[u],v=[0],_=1,x=p.length;_<x;_++)m.push(u<<_),v.push(p[_-1][0]*p[_-1][1]+v[_-1]);m.reverse();var b=new j.Z({tileSize:d,extent:i.extent||[0,-h,c,0],resolutions:m}),w=i.url;w&&-1==w.indexOf("{TileGroup}")&&-1==w.indexOf("{tileIndex}")&&(w+="{TileGroup}/{z}-{x}-{y}.jpg");var E=(0,l.Gk)(w),T=d*u,S=(0,l.Un)(E.map((function(t){return function(e,r,i){if(e){var n=e[0],o=e[1],a=e[2],s=o+a*p[n][0],l={z:n,x:o,y:a,tileIndex:s,TileGroup:"TileGroup"+((s+v[n])/T|0)};return t.replace(/\{(\w+?)\}/g,(function(t,e){return l[e]}))}}}))),O=or.bind(null,(0,Ge.Pq)(d*u));(r=t.call(this,{attributions:i.attributions,cacheSize:i.cacheSize,crossOrigin:i.crossOrigin,interpolate:n,projection:i.projection,tilePixelRatio:u,reprojectionErrorThreshold:i.reprojectionErrorThreshold,tileClass:O,tileGrid:b,tileUrlFunction:S,transition:i.transition})||this).zDirection=i.zDirection;var R=S(b.getTileCoordForCoordAndResolution((0,o.getCenter)(b.getExtent()),m[m.length-1]),1,null),I=new Image;return I.addEventListener("error",function(){T=d,this.changed()}.bind(r)),I.src=R,r}return ir(e,t),e}(s.Z);var sr=r(5537),lr=function(t,e,r){if(r||2===arguments.length)for(var i,n=0,o=e.length;n<o;n++)!i&&n in e||(i||(i=Array.prototype.slice.call(e,0,n)),i[n]=e[n]);return t.concat(i||Array.prototype.slice.call(e))},ur="version1",cr="version2",hr="version3",pr={version1:{level0:{supports:[],formats:[],qualities:["native"]},level1:{supports:["regionByPx","sizeByW","sizeByH","sizeByPct"],formats:["jpg"],qualities:["native"]},level2:{supports:["regionByPx","regionByPct","sizeByW","sizeByH","sizeByPct","sizeByConfinedWh","sizeByWh"],formats:["jpg","png"],qualities:["native","color","grey","bitonal"]}},version2:{level0:{supports:[],formats:["jpg"],qualities:["default"]},level1:{supports:["regionByPx","sizeByW","sizeByH","sizeByPct"],formats:["jpg"],qualities:["default"]},level2:{supports:["regionByPx","regionByPct","sizeByW","sizeByH","sizeByPct","sizeByConfinedWh","sizeByDistortedWh","sizeByWh"],formats:["jpg","png"],qualities:["default","bitonal"]}},version3:{level0:{supports:[],formats:["jpg"],qualities:["default"]},level1:{supports:["regionByPx","regionSquare","sizeByW","sizeByH","sizeByWh"],formats:["jpg"],qualities:["default"]},level2:{supports:["regionByPx","regionSquare","regionByPct","sizeByW","sizeByH","sizeByPct","sizeByConfinedWh","sizeByWh"],formats:["jpg","png"],qualities:["default"]}},none:{none:{supports:[],formats:[],qualities:[]}}},dr=/^https?:\/\/library\.stanford\.edu\/iiif\/image-api\/(?:1\.1\/)?compliance\.html#level[0-2]$/,fr=/^https?:\/\/iiif\.io\/api\/image\/2\/level[0-2](?:\.json)?$/,gr=/(^https?:\/\/iiif\.io\/api\/image\/3\/level[0-2](?:\.json)?$)|(^level[0-2]$)/,yr={version1:function(t){var e=t.getComplianceLevelSupportedFeatures();return void 0===e&&(e=pr.version1.level0),{url:void 0===t.imageInfo["@id"]?void 0:t.imageInfo["@id"].replace(/\/?(?:info\.json)?$/g,""),supports:e.supports,formats:lr(lr([],e.formats,!0),[void 0===t.imageInfo.formats?[]:t.imageInfo.formats],!1),qualities:lr(lr([],e.qualities,!0),[void 0===t.imageInfo.qualities?[]:t.imageInfo.qualities],!1),resolutions:t.imageInfo.scale_factors,tileSize:void 0!==t.imageInfo.tile_width?void 0!==t.imageInfo.tile_height?[t.imageInfo.tile_width,t.imageInfo.tile_height]:[t.imageInfo.tile_width,t.imageInfo.tile_width]:null!=t.imageInfo.tile_height?[t.imageInfo.tile_height,t.imageInfo.tile_height]:void 0}},version2:function(t){var e=t.getComplianceLevelSupportedFeatures(),r=Array.isArray(t.imageInfo.profile)&&t.imageInfo.profile.length>1,i=r&&t.imageInfo.profile[1].supports?t.imageInfo.profile[1].supports:[],n=r&&t.imageInfo.profile[1].formats?t.imageInfo.profile[1].formats:[],o=r&&t.imageInfo.profile[1].qualities?t.imageInfo.profile[1].qualities:[];return{url:t.imageInfo["@id"].replace(/\/?(?:info\.json)?$/g,""),sizes:void 0===t.imageInfo.sizes?void 0:t.imageInfo.sizes.map((function(t){return[t.width,t.height]})),tileSize:void 0===t.imageInfo.tiles?void 0:[t.imageInfo.tiles.map((function(t){return t.width}))[0],t.imageInfo.tiles.map((function(t){return void 0===t.height?t.width:t.height}))[0]],resolutions:void 0===t.imageInfo.tiles?void 0:t.imageInfo.tiles.map((function(t){return t.scaleFactors}))[0],supports:lr(lr([],e.supports,!0),i,!0),formats:lr(lr([],e.formats,!0),n,!0),qualities:lr(lr([],e.qualities,!0),o,!0)}},version3:function(t){var e=t.getComplianceLevelSupportedFeatures(),r=void 0===t.imageInfo.extraFormats?e.formats:lr(lr([],e.formats,!0),t.imageInfo.extraFormats,!0),i=void 0!==t.imageInfo.preferredFormats&&Array.isArray(t.imageInfo.preferredFormats)&&t.imageInfo.preferredFormats.length>0?t.imageInfo.preferredFormats.filter((function(t){return(0,sr.q9)(["jpg","png","gif"],t)})).reduce((function(t,e){return void 0===t&&(0,sr.q9)(r,e)?e:t}),void 0):void 0;return{url:t.imageInfo.id,sizes:void 0===t.imageInfo.sizes?void 0:t.imageInfo.sizes.map((function(t){return[t.width,t.height]})),tileSize:void 0===t.imageInfo.tiles?void 0:[t.imageInfo.tiles.map((function(t){return t.width}))[0],t.imageInfo.tiles.map((function(t){return t.height}))[0]],resolutions:void 0===t.imageInfo.tiles?void 0:t.imageInfo.tiles.map((function(t){return t.scaleFactors}))[0],supports:void 0===t.imageInfo.extraFeatures?e.supports:lr(lr([],e.supports,!0),t.imageInfo.extraFeatures,!0),formats:r,qualities:void 0===t.imageInfo.extraQualities?e.qualities:lr(lr([],e.qualities,!0),t.imageInfo.extraQualities,!0),preferredFormat:i}}};!function(){function t(t){this.setImageInfo(t)}t.prototype.setImageInfo=function(t){this.imageInfo="string"==typeof t?JSON.parse(t):t},t.prototype.getImageApiVersion=function(){if(void 0!==this.imageInfo){var t=this.imageInfo["@context"]||"ol-no-context";"string"==typeof t&&(t=[t]);for(var e=0;e<t.length;e++)switch(t[e]){case"http://library.stanford.edu/iiif/image-api/1.1/context.json":case"http://iiif.io/api/image/1/context.json":return ur;case"http://iiif.io/api/image/2/context.json":return cr;case"http://iiif.io/api/image/3/context.json":return hr;case"ol-no-context":if(this.getComplianceLevelEntryFromProfile(ur)&&this.imageInfo.identifier)return ur}(0,C.h)(!1,61)}},t.prototype.getComplianceLevelEntryFromProfile=function(t){if(void 0!==this.imageInfo&&void 0!==this.imageInfo.profile)switch(void 0===t&&(t=this.getImageApiVersion()),t){case ur:if(dr.test(this.imageInfo.profile))return this.imageInfo.profile;break;case hr:if(gr.test(this.imageInfo.profile))return this.imageInfo.profile;break;case cr:if("string"==typeof this.imageInfo.profile&&fr.test(this.imageInfo.profile))return this.imageInfo.profile;if(Array.isArray(this.imageInfo.profile)&&this.imageInfo.profile.length>0&&"string"==typeof this.imageInfo.profile[0]&&fr.test(this.imageInfo.profile[0]))return this.imageInfo.profile[0]}},t.prototype.getComplianceLevelFromProfile=function(t){var e=this.getComplianceLevelEntryFromProfile(t);if(void 0!==e){var r=e.match(/level[0-2](?:\.json)?$/g);return Array.isArray(r)?r[0].replace(".json",""):void 0}},t.prototype.getComplianceLevelSupportedFeatures=function(){if(void 0!==this.imageInfo){var t=this.getImageApiVersion(),e=this.getComplianceLevelFromProfile(t);return void 0===e?pr.none.none:pr[t][e]}},t.prototype.getTileSourceOptions=function(t){var e=t||{},r=this.getImageApiVersion();if(void 0!==r){var i=void 0===r?void 0:yr[r](this);if(void 0!==i)return{url:i.url,version:r,size:[this.imageInfo.width,this.imageInfo.height],sizes:i.sizes,format:void 0!==e.format&&(0,sr.q9)(i.formats,e.format)?e.format:void 0!==i.preferredFormat?i.preferredFormat:"jpg",supports:i.supports,quality:e.quality&&(0,sr.q9)(i.qualities,e.quality)?e.quality:(0,sr.q9)(i.qualities,"native")?"native":"default",resolutions:Array.isArray(i.resolutions)?i.resolutions.sort((function(t,e){return e-t})):void 0,tileSize:i.tileSize}}}}();var mr=function(){var t=function(e,r){return t=Object.setPrototypeOf||{__proto__:[]}instanceof Array&&function(t,e){t.__proto__=e}||function(t,e){for(var r in e)Object.prototype.hasOwnProperty.call(e,r)&&(t[r]=e[r])},t(e,r)};return function(e,r){if("function"!=typeof r&&null!==r)throw new TypeError("Class extends value "+String(r)+" is not a constructor or null");function i(){this.constructor=e}t(e,r),e.prototype=null===r?Object.create(r):(i.prototype=r.prototype,new i)}}();function vr(t){return t.toLocaleString("en",{maximumFractionDigits:10})}const _r=function(t){function e(e){var r=this,i=e||{},n=void 0===i.imageSmoothing||i.imageSmoothing;void 0!==i.interpolate&&(n=i.interpolate);var a=i.url||"";a+=a.lastIndexOf("/")===a.length-1||""===a?"":"/";var s=i.version||cr,l=i.sizes||[],u=i.size;(0,C.h)(null!=u&&Array.isArray(u)&&2==u.length&&!isNaN(u[0])&&u[0]>0&&!isNaN(u[1])&&u[1]>0,60);var c,h,p,d=u[0],f=u[1],g=i.tileSize,y=i.tilePixelRatio||1,m=i.format||"jpg",v=i.quality||(i.version==ur?"native":"default"),_=i.resolutions||[],x=i.supports||[],b=i.extent||[0,-f,d,0],w=null!=l&&Array.isArray(l)&&l.length>0,E=void 0!==g&&("number"==typeof g&&Number.isInteger(g)&&g>0||Array.isArray(g)&&g.length>0),T=null!=x&&Array.isArray(x)&&((0,sr.q9)(x,"regionByPx")||(0,sr.q9)(x,"regionByPct"))&&((0,sr.q9)(x,"sizeByWh")||(0,sr.q9)(x,"sizeByH")||(0,sr.q9)(x,"sizeByW")||(0,sr.q9)(x,"sizeByPct"));if(_.sort((function(t,e){return e-t})),E||T)if(null!=g&&("number"==typeof g&&Number.isInteger(g)&&g>0?(c=g,h=g):Array.isArray(g)&&g.length>0&&((1==g.length||null==g[1]&&Number.isInteger(g[0]))&&(c=g[0],h=g[0]),2==g.length&&(Number.isInteger(g[0])&&Number.isInteger(g[1])?(c=g[0],h=g[1]):null==g[0]&&Number.isInteger(g[1])&&(c=g[1],h=g[1])))),void 0!==c&&void 0!==h||(c=tr.S,h=tr.S),0==_.length)for(var S=p=Math.max(Math.ceil(Math.log(d/c)/Math.LN2),Math.ceil(Math.log(f/h)/Math.LN2));S>=0;S--)_.push(Math.pow(2,S));else{var O=Math.max.apply(Math,_);p=Math.round(Math.log(O)/Math.LN2)}else if(c=d,h=f,_=[],w){l.sort((function(t,e){return t[0]-e[0]})),p=-1;var R=[];for(S=0;S<l.length;S++){var I=d/l[S][0];_.length>0&&_[_.length-1]==I?R.push(S):(_.push(I),p++)}if(R.length>0)for(S=0;S<R.length;S++)l.splice(R[S]-S,1)}else _.push(1),l.push([d,f]),p=0;var P=new j.Z({tileSize:[c,h],extent:b,origin:(0,o.getTopLeft)(b),resolutions:_}),L=or.bind(null,(0,Ge.Pq)(g||256).map((function(t){return t*y})));return(r=t.call(this,{attributions:i.attributions,attributionsCollapsible:i.attributionsCollapsible,cacheSize:i.cacheSize,crossOrigin:i.crossOrigin,interpolate:n,projection:i.projection,reprojectionErrorThreshold:i.reprojectionErrorThreshold,state:i.state,tileClass:L,tileGrid:P,tilePixelRatio:i.tilePixelRatio,tileUrlFunction:function(t,e,r){var i,n,o=t[0];if(!(o>p)){var u=t[1],g=t[2],y=_[o];if(!(void 0===u||void 0===g||void 0===y||u<0||Math.ceil(d/y/c)<=u||g<0||Math.ceil(f/y/h)<=g)){if(T||E){var b=u*c*y,S=g*h*y,C=c*y,O=h*y,R=c,I=h;b+C>d&&(C=d-b),S+O>f&&(O=f-S),b+c*y>d&&(R=Math.floor((d-b+y-1)/y)),S+h*y>f&&(I=Math.floor((f-S+y-1)/y)),0==b&&C==d&&0==S&&O==f?i="full":!T||(0,sr.q9)(x,"regionByPx")?i=b+","+S+","+C+","+O:(0,sr.q9)(x,"regionByPct")&&(i="pct:"+vr(b/d*100)+","+vr(S/f*100)+","+vr(C/d*100)+","+vr(O/f*100)),s!=hr||T&&!(0,sr.q9)(x,"sizeByWh")?!T||(0,sr.q9)(x,"sizeByW")?n=R+",":(0,sr.q9)(x,"sizeByH")?n=","+I:(0,sr.q9)(x,"sizeByWh")?n=R+","+I:(0,sr.q9)(x,"sizeByPct")&&(n="pct:"+vr(100/y)):n=R+","+I}else if(i="full",w){var P=l[o][0],L=l[o][1];n=s==hr?P==d&&L==f?"max":P+","+L:P==d?"full":P+","}else n=s==hr?"max":"full";return a+i+"/"+n+"/0/"+v+"."+m}}},transition:i.transition})||this).zDirection=i.zDirection,r}return mr(e,t),e}(s.Z);var xr=r(291),br=r(553),wr=r(4773),Er=r(1798),Tr=r(5476),Sr=r(7161),Cr=r(5818),Or=function(){var t=function(e,r){return t=Object.setPrototypeOf||{__proto__:[]}instanceof Array&&function(t,e){t.__proto__=e}||function(t,e){for(var r in e)Object.prototype.hasOwnProperty.call(e,r)&&(t[r]=e[r])},t(e,r)};return function(e,r){if("function"!=typeof r&&null!==r)throw new TypeError("Class extends value "+String(r)+" is not a constructor or null");function i(){this.constructor=e}t(e,r),e.prototype=null===r?Object.create(r):(i.prototype=r.prototype,new i)}}();const Rr=function(t){function e(e,r,i,n,a,s,l){var u=this,c=e.getExtent(),h=r.getExtent(),p=h?(0,o.getIntersection)(i,h):i,d=(0,o.getCenter)(p),f=(0,Sr.aA)(e,r,d,n),g=wr.m,y=new Tr.Z(e,r,p,c,f*g,n),m=s(y.calculateSourceExtent(),f,a),v=m?br.Z.IDLE:br.Z.EMPTY,_=m?m.getPixelRatio():1;return(u=t.call(this,i,n,_,v)||this).targetProj_=r,u.maxSourceExtent_=c,u.triangulation_=y,u.targetResolution_=n,u.targetExtent_=i,u.sourceImage_=m,u.sourcePixelRatio_=_,u.interpolate_=l,u.canvas_=null,u.sourceListenerKey_=null,u}return Or(e,t),e.prototype.disposeInternal=function(){this.state==br.Z.LOADING&&this.unlistenSource_(),t.prototype.disposeInternal.call(this)},e.prototype.getImage=function(){return this.canvas_},e.prototype.getProjection=function(){return this.targetProj_},e.prototype.reproject_=function(){var t=this.sourceImage_.getState();if(t==br.Z.LOADED){var e=(0,o.getWidth)(this.targetExtent_)/this.targetResolution_,r=(0,o.getHeight)(this.targetExtent_)/this.targetResolution_;this.canvas_=(0,Sr.sY)(e,r,this.sourcePixelRatio_,this.sourceImage_.getResolution(),this.maxSourceExtent_,this.targetResolution_,this.targetExtent_,this.triangulation_,[{extent:this.sourceImage_.getExtent(),image:this.sourceImage_.getImage()}],0,void 0,this.interpolate_)}this.state=t,this.changed()},e.prototype.load=function(){if(this.state==br.Z.IDLE){this.state=br.Z.LOADING,this.changed();var t=this.sourceImage_.getState();t==br.Z.LOADED||t==br.Z.ERROR?this.reproject_():(this.sourceListenerKey_=(0,Cr.oL)(this.sourceImage_,x.Z.CHANGE,(function(t){var e=this.sourceImage_.getState();e!=br.Z.LOADED&&e!=br.Z.ERROR||(this.unlistenSource_(),this.reproject_())}),this),this.sourceImage_.load())}},e.prototype.unlistenSource_=function(){(0,Cr.bN)(this.sourceListenerKey_),this.sourceListenerKey_=null},e}(Er.Z);var Ir=r(8458),Pr=function(){var t=function(e,r){return t=Object.setPrototypeOf||{__proto__:[]}instanceof Array&&function(t,e){t.__proto__=e}||function(t,e){for(var r in e)Object.prototype.hasOwnProperty.call(e,r)&&(t[r]=e[r])},t(e,r)};return function(e,r){if("function"!=typeof r&&null!==r)throw new TypeError("Class extends value "+String(r)+" is not a constructor or null");function i(){this.constructor=e}t(e,r),e.prototype=null===r?Object.create(r):(i.prototype=r.prototype,new i)}}(),Lr=function(t){function e(e,r){var i=t.call(this,e)||this;return i.image=r,i}return Pr(e,t),e}(xr.ZP);function Ar(t,e){t.getImage().src=e}const Mr=function(t){function e(e){var r=this,i=void 0===e.imageSmoothing||e.imageSmoothing;return void 0!==e.interpolate&&(i=e.interpolate),(r=t.call(this,{attributions:e.attributions,projection:e.projection,state:e.state,interpolate:i})||this).on,r.once,r.un,r.resolutions_=void 0!==e.resolutions?e.resolutions:null,r.reprojectedImage_=null,r.reprojectedRevision_=0,r}return Pr(e,t),e.prototype.getResolutions=function(){return this.resolutions_},e.prototype.findNearestResolution=function(t){if(this.resolutions_){var e=(0,sr.h7)(this.resolutions_,t,0);t=this.resolutions_[e]}return t},e.prototype.getImage=function(t,e,r,i){var n=this.getProjection();if(wr.j&&n&&i&&!(0,h.equivalent)(n,i)){if(this.reprojectedImage_){if(this.reprojectedRevision_==this.getRevision()&&(0,h.equivalent)(this.reprojectedImage_.getProjection(),i)&&this.reprojectedImage_.getResolution()==e&&(0,o.equals)(this.reprojectedImage_.getExtent(),t))return this.reprojectedImage_;this.reprojectedImage_.dispose(),this.reprojectedImage_=null}return this.reprojectedImage_=new Rr(n,i,t,e,r,function(t,e,r){return this.getImageInternal(t,e,r,n)}.bind(this),this.getInterpolate()),this.reprojectedRevision_=this.getRevision(),this.reprojectedImage_}return n&&(i=n),this.getImageInternal(t,e,r,i)},e.prototype.getImageInternal=function(t,e,r,i){return(0,O.O3)()},e.prototype.handleImageChange=function(t){var e,r=t.target;switch(r.getState()){case br.Z.LOADING:this.loading=!0,e="imageloadstart";break;case br.Z.LOADED:this.loading=!1,e="imageloadend";break;case br.Z.ERROR:this.loading=!1,e="imageloaderror";break;default:return}this.hasListener(e)&&this.dispatchEvent(new Lr(e,r))},e}(Ir.Z);var Fr=r(8096);function Zr(t,e){var r=[];Object.keys(e).forEach((function(t){null!==e[t]&&void 0!==e[t]&&r.push(t+"="+encodeURIComponent(e[t]))}));var i=r.join("&");return(t=-1===(t=t.replace(/[?&]$/,"")).indexOf("?")?t+"?":t+"&")+i}var kr=function(){var t=function(e,r){return t=Object.setPrototypeOf||{__proto__:[]}instanceof Array&&function(t,e){t.__proto__=e}||function(t,e){for(var r in e)Object.prototype.hasOwnProperty.call(e,r)&&(t[r]=e[r])},t(e,r)};return function(e,r){if("function"!=typeof r&&null!==r)throw new TypeError("Class extends value "+String(r)+" is not a constructor or null");function i(){this.constructor=e}t(e,r),e.prototype=null===r?Object.create(r):(i.prototype=r.prototype,new i)}}();const jr=function(t){function e(e){var r=this,i=e||{},n=void 0===i.imageSmoothing||i.imageSmoothing;return void 0!==i.interpolate&&(n=i.interpolate),(r=t.call(this,{attributions:i.attributions,interpolate:n,projection:i.projection,resolutions:i.resolutions})||this).crossOrigin_=void 0!==i.crossOrigin?i.crossOrigin:null,r.hidpi_=void 0===i.hidpi||i.hidpi,r.url_=i.url,r.imageLoadFunction_=void 0!==i.imageLoadFunction?i.imageLoadFunction:Ar,r.params_=i.params||{},r.image_=null,r.imageSize_=[0,0],r.renderedRevision_=0,r.ratio_=void 0!==i.ratio?i.ratio:1.5,r}return kr(e,t),e.prototype.getParams=function(){return this.params_},e.prototype.getImageInternal=function(t,e,r,i){if(void 0===this.url_)return null;e=this.findNearestResolution(e),r=this.hidpi_?r:1;var n=this.image_;if(n&&this.renderedRevision_==this.getRevision()&&n.getResolution()==e&&n.getPixelRatio()==r&&(0,o.containsExtent)(n.getExtent(),t))return n;var a={F:"image",FORMAT:"PNG32",TRANSPARENT:!0};(0,m.f0)(a,this.params_);var s=((t=t.slice())[0]+t[2])/2,l=(t[1]+t[3])/2;if(1!=this.ratio_){var u=this.ratio_*(0,o.getWidth)(t)/2,c=this.ratio_*(0,o.getHeight)(t)/2;t[0]=s-u,t[1]=l-c,t[2]=s+u,t[3]=l+c}var h=e/r,p=Math.ceil((0,o.getWidth)(t)/h),d=Math.ceil((0,o.getHeight)(t)/h);t[0]=s-h*p/2,t[2]=s+h*p/2,t[1]=l-h*d/2,t[3]=l+h*d/2,this.imageSize_[0]=p,this.imageSize_[1]=d;var f=this.getRequestUrl_(t,this.imageSize_,r,i,a);return this.image_=new Fr.Z(t,e,r,f,this.crossOrigin_,this.imageLoadFunction_),this.renderedRevision_=this.getRevision(),this.image_.addEventListener(x.Z.CHANGE,this.handleImageChange.bind(this)),this.image_},e.prototype.getImageLoadFunction=function(){return this.imageLoadFunction_},e.prototype.getRequestUrl_=function(t,e,r,i,n){var o=i.getCode().split(/:(?=\d+$)/).pop();n.SIZE=e[0]+","+e[1],n.BBOX=t.join(","),n.BBOXSR=o,n.IMAGESR=o,n.DPI=Math.round(90*r);var a=this.url_,s=a.replace(/MapServer\/?$/,"MapServer/export").replace(/ImageServer\/?$/,"ImageServer/exportImage");return s==a&&(0,C.h)(!1,50),Zr(s,n)},e.prototype.getUrl=function(){return this.url_},e.prototype.setImageLoadFunction=function(t){this.image_=null,this.imageLoadFunction_=t,this.changed()},e.prototype.setUrl=function(t){t!=this.url_&&(this.url_=t,this.image_=null,this.changed())},e.prototype.updateParams=function(t){(0,m.f0)(this.params_,t),this.image_=null,this.changed()},e}(Mr);var Dr=r(8294),Nr=function(){var t=function(e,r){return t=Object.setPrototypeOf||{__proto__:[]}instanceof Array&&function(t,e){t.__proto__=e}||function(t,e){for(var r in e)Object.prototype.hasOwnProperty.call(e,r)&&(t[r]=e[r])},t(e,r)};return function(e,r){if("function"!=typeof r&&null!==r)throw new TypeError("Class extends value "+String(r)+" is not a constructor or null");function i(){this.constructor=e}t(e,r),e.prototype=null===r?Object.create(r):(i.prototype=r.prototype,new i)}}();const Gr=function(t){function e(e){var r=this,i=e||{},n=void 0===i.imageSmoothing||i.imageSmoothing;return void 0!==i.interpolate&&(n=i.interpolate),(r=t.call(this,{attributions:i.attributions,interpolate:n,projection:i.projection,resolutions:i.resolutions,state:i.state})||this).canvasFunction_=i.canvasFunction,r.canvas_=null,r.renderedRevision_=0,r.ratio_=void 0!==i.ratio?i.ratio:1.5,r}return Nr(e,t),e.prototype.getImageInternal=function(t,e,r,i){e=this.findNearestResolution(e);var n=this.canvas_;if(n&&this.renderedRevision_==this.getRevision()&&n.getResolution()==e&&n.getPixelRatio()==r&&(0,o.containsExtent)(n.getExtent(),t))return n;t=t.slice(),(0,o.scaleFromCenter)(t,this.ratio_);var a=[(0,o.getWidth)(t)/e*r,(0,o.getHeight)(t)/e*r],s=this.canvasFunction_.call(this,t,e,r,a,i);return s&&(n=new Dr.Z(t,e,r,s)),this.canvas_=n,this.renderedRevision_=this.getRevision(),n},e}(Mr);var zr=function(){var t=function(e,r){return t=Object.setPrototypeOf||{__proto__:[]}instanceof Array&&function(t,e){t.__proto__=e}||function(t,e){for(var r in e)Object.prototype.hasOwnProperty.call(e,r)&&(t[r]=e[r])},t(e,r)};return function(e,r){if("function"!=typeof r&&null!==r)throw new TypeError("Class extends value "+String(r)+" is not a constructor or null");function i(){this.constructor=e}t(e,r),e.prototype=null===r?Object.create(r):(i.prototype=r.prototype,new i)}}();const Ur=function(t){function e(e){var r=this,i=void 0===e.imageSmoothing||e.imageSmoothing;return void 0!==e.interpolate&&(i=e.interpolate),(r=t.call(this,{interpolate:i,projection:e.projection,resolutions:e.resolutions})||this).crossOrigin_=void 0!==e.crossOrigin?e.crossOrigin:null,r.displayDpi_=void 0!==e.displayDpi?e.displayDpi:96,r.params_=e.params||{},r.url_=e.url,r.imageLoadFunction_=void 0!==e.imageLoadFunction?e.imageLoadFunction:Ar,r.hidpi_=void 0===e.hidpi||e.hidpi,r.metersPerUnit_=void 0!==e.metersPerUnit?e.metersPerUnit:1,r.ratio_=void 0!==e.ratio?e.ratio:1,r.useOverlay_=void 0!==e.useOverlay&&e.useOverlay,r.image_=null,r.renderedRevision_=0,r}return zr(e,t),e.prototype.getParams=function(){return this.params_},e.prototype.getImageInternal=function(t,e,r,i){e=this.findNearestResolution(e),r=this.hidpi_?r:1;var n=this.image_;if(n&&this.renderedRevision_==this.getRevision()&&n.getResolution()==e&&n.getPixelRatio()==r&&(0,o.containsExtent)(n.getExtent(),t))return n;1!=this.ratio_&&(t=t.slice(),(0,o.scaleFromCenter)(t,this.ratio_));var a=[(0,o.getWidth)(t)/e*r,(0,o.getHeight)(t)/e*r];if(void 0!==this.url_){var s=this.getUrl(this.url_,this.params_,t,a,i);(n=new Fr.Z(t,e,r,s,this.crossOrigin_,this.imageLoadFunction_)).addEventListener(x.Z.CHANGE,this.handleImageChange.bind(this))}else n=null;return this.image_=n,this.renderedRevision_=this.getRevision(),n},e.prototype.getImageLoadFunction=function(){return this.imageLoadFunction_},e.prototype.updateParams=function(t){(0,m.f0)(this.params_,t),this.changed()},e.prototype.getUrl=function(t,e,r,i,n){var a=function(t,e,r,i){var n=(0,o.getWidth)(t),a=(0,o.getHeight)(t),s=e[0],l=e[1],u=.0254/i;return l*n>s*a?n*r/(s*u):a*r/(l*u)}(r,i,this.metersPerUnit_,this.displayDpi_),s=(0,o.getCenter)(r),l={OPERATION:this.useOverlay_?"GETDYNAMICMAPOVERLAYIMAGE":"GETMAPIMAGE",VERSION:"2.0.0",LOCALE:"en",CLIENTAGENT:"ol/source/ImageMapGuide source",CLIP:"1",SETDISPLAYDPI:this.displayDpi_,SETDISPLAYWIDTH:Math.round(i[0]),SETDISPLAYHEIGHT:Math.round(i[1]),SETVIEWSCALE:a,SETVIEWCENTERX:s[0],SETVIEWCENTERY:s[1]};return(0,m.f0)(l,e),Zr(t,l)},e.prototype.setImageLoadFunction=function(t){this.image_=null,this.imageLoadFunction_=t,this.changed()},e}(Mr);var Br=r(1481),qr=function(){var t=function(e,r){return t=Object.setPrototypeOf||{__proto__:[]}instanceof Array&&function(t,e){t.__proto__=e}||function(t,e){for(var r in e)Object.prototype.hasOwnProperty.call(e,r)&&(t[r]=e[r])},t(e,r)};return function(e,r){if("function"!=typeof r&&null!==r)throw new TypeError("Class extends value "+String(r)+" is not a constructor or null");function i(){this.constructor=e}t(e,r),e.prototype=null===r?Object.create(r):(i.prototype=r.prototype,new i)}}(),Vr=function(t){function e(e){var r=this,i=void 0!==e.crossOrigin?e.crossOrigin:null,n=void 0!==e.imageLoadFunction?e.imageLoadFunction:Ar,o=void 0===e.imageSmoothing||e.imageSmoothing;return void 0!==e.interpolate&&(o=e.interpolate),(r=t.call(this,{attributions:e.attributions,interpolate:o,projection:(0,h.get)(e.projection)})||this).url_=e.url,r.imageExtent_=e.imageExtent,r.image_=new Fr.Z(r.imageExtent_,void 0,1,r.url_,i,n),r.imageSize_=e.imageSize?e.imageSize:null,r.image_.addEventListener(x.Z.CHANGE,r.handleImageChange.bind(r)),r}return qr(e,t),e.prototype.getImageExtent=function(){return this.imageExtent_},e.prototype.getImageInternal=function(t,e,r,i){return(0,o.intersects)(t,this.image_.getExtent())?this.image_:null},e.prototype.getUrl=function(){return this.url_},e.prototype.handleImageChange=function(e){if(this.image_.getState()==br.Z.LOADED){var r=this.image_.getExtent(),i=this.image_.getImage(),n=void 0,a=void 0;this.imageSize_?(n=this.imageSize_[0],a=this.imageSize_[1]):(n=i.width,a=i.height);var s=(0,o.getWidth)(r),l=(0,o.getHeight)(r),u=s/n,c=l/a,h=n,p=a;if(u>c?h=Math.round(s/c):p=Math.round(l/u),h!==n||p!==a){var d=(0,rr.E4)(h,p);this.getInterpolate()||(0,m.f0)(d,Br.$);var f=d.canvas;d.drawImage(i,0,0,n,a,0,0,f.width,f.height),this.image_.setImage(f)}}t.prototype.handleImageChange.call(this,e)},e}(Mr);const Wr=Vr;var Xr="1.3.0";const Yr="carmentaserver",Hr="geoserver",Kr="mapserver",$r="qgis";var Jr=r(9871),Qr=function(){var t=function(e,r){return t=Object.setPrototypeOf||{__proto__:[]}instanceof Array&&function(t,e){t.__proto__=e}||function(t,e){for(var r in e)Object.prototype.hasOwnProperty.call(e,r)&&(t[r]=e[r])},t(e,r)};return function(e,r){if("function"!=typeof r&&null!==r)throw new TypeError("Class extends value "+String(r)+" is not a constructor or null");function i(){this.constructor=e}t(e,r),e.prototype=null===r?Object.create(r):(i.prototype=r.prototype,new i)}}(),ti=[101,101],ei=function(t){function e(e){var r=this,i=e||{},n=void 0===i.imageSmoothing||i.imageSmoothing;return void 0!==i.interpolate&&(n=i.interpolate),(r=t.call(this,{attributions:i.attributions,interpolate:n,projection:i.projection,resolutions:i.resolutions})||this).crossOrigin_=void 0!==i.crossOrigin?i.crossOrigin:null,r.url_=i.url,r.imageLoadFunction_=void 0!==i.imageLoadFunction?i.imageLoadFunction:Ar,r.params_=i.params||{},r.v13_=!0,r.updateV13_(),r.serverType_=i.serverType,r.hidpi_=void 0===i.hidpi||i.hidpi,r.image_=null,r.imageSize_=[0,0],r.renderedRevision_=0,r.ratio_=void 0!==i.ratio?i.ratio:1.5,r}return Qr(e,t),e.prototype.getFeatureInfoUrl=function(t,e,r,i){if(void 0!==this.url_){var n=(0,h.get)(r),a=this.getProjection();a&&a!==n&&(e=(0,Sr.aA)(a,n,t,e),t=(0,h.transform)(t,n,a));var s=(0,o.getForViewAndSize)(t,e,0,ti),l={SERVICE:"WMS",VERSION:Xr,REQUEST:"GetFeatureInfo",FORMAT:"image/png",TRANSPARENT:!0,QUERY_LAYERS:this.params_.LAYERS};(0,m.f0)(l,this.params_,i);var u=(0,Ne.GW)((t[0]-s[0])/e,4),c=(0,Ne.GW)((s[3]-t[1])/e,4);return l[this.v13_?"I":"X"]=u,l[this.v13_?"J":"Y"]=c,this.getRequestUrl_(s,ti,1,a||n,l)}},e.prototype.getLegendUrl=function(t,e){if(void 0!==this.url_){var r={SERVICE:"WMS",VERSION:Xr,REQUEST:"GetLegendGraphic",FORMAT:"image/png"};if(void 0===e||void 0===e.LAYER){var i=this.params_.LAYERS;if(Array.isArray(i)&&1!==i.length)return;r.LAYER=i}if(void 0!==t){var n=this.getProjection()?this.getProjection().getMetersPerUnit():1;r.SCALE=t*n/28e-5}return(0,m.f0)(r,e),Zr(this.url_,r)}},e.prototype.getParams=function(){return this.params_},e.prototype.getImageInternal=function(t,e,r,i){if(void 0===this.url_)return null;e=this.findNearestResolution(e),1==r||this.hidpi_&&void 0!==this.serverType_||(r=1);var n=e/r,a=(0,o.getCenter)(t),s=(0,Ne.mD)((0,o.getWidth)(t)/n,4),l=(0,Ne.mD)((0,o.getHeight)(t)/n,4),u=(0,o.getForViewAndSize)(a,n,0,[s,l]),c=(0,Ne.mD)(this.ratio_*(0,o.getWidth)(t)/n,4),h=(0,Ne.mD)(this.ratio_*(0,o.getHeight)(t)/n,4),p=(0,o.getForViewAndSize)(a,n,0,[c,h]),d=this.image_;if(d&&this.renderedRevision_==this.getRevision()&&d.getResolution()==e&&d.getPixelRatio()==r&&(0,o.containsExtent)(d.getExtent(),u))return d;var f={SERVICE:"WMS",VERSION:Xr,REQUEST:"GetMap",FORMAT:"image/png",TRANSPARENT:!0};(0,m.f0)(f,this.params_),this.imageSize_[0]=(0,Ne.NM)((0,o.getWidth)(p)/n,4),this.imageSize_[1]=(0,Ne.NM)((0,o.getHeight)(p)/n,4);var g=this.getRequestUrl_(p,this.imageSize_,r,i,f);return this.image_=new Fr.Z(p,e,r,g,this.crossOrigin_,this.imageLoadFunction_),this.renderedRevision_=this.getRevision(),this.image_.addEventListener(x.Z.CHANGE,this.handleImageChange.bind(this)),this.image_},e.prototype.getImageLoadFunction=function(){return this.imageLoadFunction_},e.prototype.getRequestUrl_=function(t,e,r,i,n){if((0,C.h)(void 0!==this.url_,9),n[this.v13_?"CRS":"SRS"]=i.getCode(),"STYLES"in this.params_||(n.STYLES=""),1!=r)switch(this.serverType_){case Hr:var o=90*r+.5|0;"FORMAT_OPTIONS"in n?n.FORMAT_OPTIONS+=";dpi:"+o:n.FORMAT_OPTIONS="dpi:"+o;break;case Kr:n.MAP_RESOLUTION=90*r;break;case Yr:case $r:n.DPI=90*r;break;default:(0,C.h)(!1,8)}n.WIDTH=e[0],n.HEIGHT=e[1];var a,s=i.getAxisOrientation();return a=this.v13_&&"ne"==s.substr(0,2)?[t[1],t[0],t[3],t[2]]:t,n.BBOX=a.join(","),Zr(this.url_,n)},e.prototype.getUrl=function(){return this.url_},e.prototype.setImageLoadFunction=function(t){this.image_=null,this.imageLoadFunction_=t,this.changed()},e.prototype.setUrl=function(t){t!=this.url_&&(this.url_=t,this.image_=null,this.changed())},e.prototype.updateParams=function(t){(0,m.f0)(this.params_,t),this.updateV13_(),this.image_=null,this.changed()},e.prototype.updateV13_=function(){var t=this.params_.VERSION||Xr;this.v13_=(0,Jr.n)(t,"1.3")>=0},e}(Mr);const ri=ei;var ii=function(){var t=function(e,r){return t=Object.setPrototypeOf||{__proto__:[]}instanceof Array&&function(t,e){t.__proto__=e}||function(t,e){for(var r in e)Object.prototype.hasOwnProperty.call(e,r)&&(t[r]=e[r])},t(e,r)};return function(e,r){if("function"!=typeof r&&null!==r)throw new TypeError("Class extends value "+String(r)+" is not a constructor or null");function i(){this.constructor=e}t(e,r),e.prototype=null===r?Object.create(r):(i.prototype=r.prototype,new i)}}(),ni='&#169; <a href="https://www.openstreetmap.org/copyright" target="_blank">OpenStreetMap</a> contributors.';const oi=function(t){function e(e){var r,i=e||{},n=void 0===i.imageSmoothing||i.imageSmoothing;void 0!==i.interpolate&&(n=i.interpolate),r=void 0!==i.attributions?i.attributions:[ni];var o=void 0!==i.crossOrigin?i.crossOrigin:"anonymous",a=void 0!==i.url?i.url:"https://{a-c}.tile.openstreetmap.org/{z}/{x}/{y}.png";return t.call(this,{attributions:r,attributionsCollapsible:!1,cacheSize:i.cacheSize,crossOrigin:o,interpolate:n,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:a,wrapX:i.wrapX,zDirection:i.zDirection})||this}return ii(e,t),e}(y);var ai,si=r(5431),li=r(3028),ui=r(1666),ci=r(9882),hi=r(6101),pi=function(){var t=function(e,r){return t=Object.setPrototypeOf||{__proto__:[]}instanceof Array&&function(t,e){t.__proto__=e}||function(t,e){for(var r in e)Object.prototype.hasOwnProperty.call(e,r)&&(t[r]=e[r])},t(e,r)};return function(e,r){if("function"!=typeof r&&null!==r)throw new TypeError("Class extends value "+String(r)+" is not a constructor or null");function i(){this.constructor=e}t(e,r),e.prototype=null===r?Object.create(r):(i.prototype=r.prototype,new i)}}(),di=!0;try{new ImageData(10,10)}catch(t){di=!1}function fi(t){var e=!0;try{new ImageData(10,10)}catch(t){e=!1}function r(t,r,i){return e?new ImageData(t,r,i):{data:t,width:r,height:i}}return function(e){var i=e.buffers,n=e.meta,o=e.imageOps,a=e.width,s=e.height,l=i.length,u=i[0].byteLength;if(o){for(var c=new Array(l),h=0;h<l;++h)c[h]=r(new Uint8ClampedArray(i[h]),a,s);return t(c,n).data.buffer}var p=new Uint8ClampedArray(u),d=new Array(l),f=new Array(l);for(h=0;h<l;++h)d[h]=new Uint8ClampedArray(i[h]),f[h]=[0,0,0,0];for(var g=0;g<u;g+=4){for(var y=0;y<l;++y){var m=d[y];f[y][0]=m[g],f[y][1]=m[g+1],f[y][2]=m[g+2],f[y][3]=m[g+3]}var v=t(f,n);p[g]=v[0],p[g+1]=v[1],p[g+2]=v[2],p[g+3]=v[3]}return p.buffer}}function gi(t,e){var r=Object.keys(t.lib||{}).map((function(e){return"var "+e+" = "+t.lib[e].toString()+";"})).concat(["var __minion__ = ("+fi.toString()+")(",t.operation.toString(),");",'self.addEventListener("message", function(event) {',"  var buffer = __minion__(event.data);","  self.postMessage({buffer: buffer, meta: event.data.meta}, [buffer]);","});"]),i=new Worker("undefined"==typeof Blob?"data:text/javascript;base64,"+Buffer.from(r.join("\n"),"binary").toString("base64"):URL.createObjectURL(new Blob(r,{type:"text/javascript"})));return i.addEventListener("message",e),i}var yi=function(t){function e(e){var r,i=t.call(this)||this;i._imageOps=!!e.imageOps,r=0===e.threads?0:i._imageOps?1:e.threads||1;var n=new Array(r);if(r)for(var o=0;o<r;++o)n[o]=gi(e,i._onWorkerMessage.bind(i,o));else n[0]=function(t,e){var r=fi(t.operation),i=!1;return{postMessage:function(t){setTimeout((function(){i||e({data:{buffer:r(t),meta:t.meta}})}),0)},terminate:function(){i=!0}}}(e,i._onWorkerMessage.bind(i,0));return i._workers=n,i._queue=[],i._maxQueueLength=e.queue||1/0,i._running=0,i._dataLookup={},i._job=null,i}return pi(e,t),e.prototype.process=function(t,e,r){this._enqueue({inputs:t,meta:e,callback:r}),this._dispatch()},e.prototype._enqueue=function(t){for(this._queue.push(t);this._queue.length>this._maxQueueLength;)this._queue.shift().callback(null,null)},e.prototype._dispatch=function(){if(!this._running&&0!==this._queue.length){var t=this._queue.shift();this._job=t;var e=t.inputs[0].width,r=t.inputs[0].height,i=t.inputs.map((function(t){return t.data.buffer})),n=this._workers.length;if(this._running=n,1!==n)for(var o=t.inputs[0].data.length,a=4*Math.ceil(o/4/n),s=0;s<n;++s){for(var l=s*a,u=[],c=0,h=i.length;c<h;++c)u.push(i[c].slice(l,l+a));this._workers[s].postMessage({buffers:u,meta:t.meta,imageOps:this._imageOps,width:e,height:r},u)}else this._workers[0].postMessage({buffers:i,meta:t.meta,imageOps:this._imageOps,width:e,height:r},i)}},e.prototype._onWorkerMessage=function(t,e){this.disposed||(this._dataLookup[t]=e.data,--this._running,0===this._running&&this._resolveJob())},e.prototype._resolveJob=function(){var t,e,r=this._job,i=this._workers.length;if(1===i)t=new Uint8ClampedArray(this._dataLookup[0].buffer),e=this._dataLookup[0].meta;else{var n=r.inputs[0].data.length;t=new Uint8ClampedArray(n),e=new Array(i);for(var o=4*Math.ceil(n/4/i),a=0;a<i;++a){var s=this._dataLookup[a].buffer,l=a*o;t.set(new Uint8ClampedArray(s),l),e[a]=this._dataLookup[a].meta}}this._job=null,this._dataLookup={},r.callback(null,function(t,e,r){if(di)return new ImageData(t,e,r);ai||(ai=document.createElement("canvas").getContext("2d"));var i=ai.createImageData(e,r);return i.data.set(t),i}(t,r.inputs[0].width,r.inputs[0].height),e),this._dispatch()},e.prototype.disposeInternal=function(){for(var t=0;t<this._workers.length;++t)this._workers[t].terminate();this._workers.length=0},e}(si.Z),mi=function(t){function e(e,r,i){var n=t.call(this,e)||this;return n.extent=r.extent,n.resolution=r.viewState.resolution/r.pixelRatio,n.data=i,n}return pi(e,t),e}(xr.ZP),vi=function(t){function e(e){var r=t.call(this,{projection:null})||this;r.on,r.once,r.un,r.processor_=null,r.operationType_=void 0!==e.operationType?e.operationType:"pixel",r.threads_=void 0!==e.threads?e.threads:1,r.layers_=function(t){for(var e=t.length,r=new Array(e),i=0;i<e;++i)r[i]=(n=t[i],o=void 0,n instanceof Ir.Z?n instanceof A.Z?o=new ui.Z({source:n}):n instanceof Mr&&(o=new li.Z({source:n})):o=n,o);var n,o;return r}(e.sources);for(var i,n=r.changed.bind(r),o=0,a=r.layers_.length;o<a;++o)r.layers_[o].addEventListener(x.Z.CHANGE,n);return r.tileQueue_=new ci.Z((function(){return 1}),r.changed.bind(r)),r.requestedFrameState_,r.renderedImageCanvas_=null,r.renderedRevision_,r.frameState_={animate:!1,coordinateToPixelTransform:(0,hi.Ue)(),declutterTree:null,extent:null,index:0,layerIndex:0,layerStatesArray:(i=r.layers_,i.map((function(t){return t.getLayerState()}))),pixelRatio:1,pixelToCoordinateTransform:(0,hi.Ue)(),postRenderFunctions:[],size:[0,0],tileQueue:r.tileQueue_,time:Date.now(),usedTiles:{},viewState:{rotation:0},viewHints:[],wantedTiles:{},mapId:(0,O.sq)(r),renderTargets:{}},r.setAttributions((function(t){for(var r=[],i=0,n=e.sources.length;i<n;++i){var o=e.sources[i],a=(o instanceof Ir.Z?o:o.getSource()).getAttributions();if("function"==typeof a){var s=a(t);r.push.apply(r,s)}}return 0!==r.length?r:null})),void 0!==e.operation&&r.setOperation(e.operation,e.lib),r}return pi(e,t),e.prototype.setOperation=function(t,e){this.processor_&&this.processor_.dispose(),this.processor_=new yi({operation:t,imageOps:"image"===this.operationType_,queue:1,lib:e,threads:this.threads_}),this.changed()},e.prototype.updateFrameState_=function(t,e,r){var i=(0,m.f0)({},this.frameState_);i.viewState=(0,m.f0)({},i.viewState);var n=(0,o.getCenter)(t);i.extent=t.slice(),i.size[0]=Math.round((0,o.getWidth)(t)/e),i.size[1]=Math.round((0,o.getHeight)(t)/e),i.time=Date.now();var a=i.viewState;return a.center=n,a.projection=r,a.resolution=e,i},e.prototype.allSourcesReady_=function(){for(var t=!0,e=0,r=this.layers_.length;e<r;++e)if(this.layers_[e].getSource().getState()!==a.Z.READY){t=!1;break}return t},e.prototype.getImage=function(t,e,r,i){if(!this.allSourcesReady_())return null;var n=this.updateFrameState_(t,e,i);if(this.requestedFrameState_=n,this.renderedImageCanvas_){var a=this.renderedImageCanvas_.getResolution(),s=this.renderedImageCanvas_.getExtent();e===a&&(0,o.equals)(t,s)||(this.renderedImageCanvas_=null)}return this.renderedImageCanvas_&&this.getRevision()===this.renderedRevision_||this.processSources_(),n.tileQueue.loadMoreTiles(16,16),n.animate&&requestAnimationFrame(this.changed.bind(this)),this.renderedImageCanvas_},e.prototype.processSources_=function(){for(var t=this.requestedFrameState_,e=this.layers_.length,r=new Array(e),i=0;i<e;++i){t.layerIndex=i;var n=xi(this.layers_[i],t);if(!n)return;r[i]=n}var o={};this.dispatchEvent(new mi("beforeoperations",t,o)),this.processor_.process(r,o,this.onWorkerComplete_.bind(this,t))},e.prototype.onWorkerComplete_=function(t,e,r,i){if(!e&&r){var n=t.extent,a=t.viewState.resolution;if(a===this.requestedFrameState_.viewState.resolution&&(0,o.equals)(n,this.requestedFrameState_.extent)){var s;if(this.renderedImageCanvas_)s=this.renderedImageCanvas_.getImage().getContext("2d");else{var l=Math.round((0,o.getWidth)(n)/a),u=Math.round((0,o.getHeight)(n)/a);s=(0,rr.E4)(l,u),this.renderedImageCanvas_=new Dr.Z(n,a,1,s.canvas)}s.putImageData(r,0,0),this.changed(),this.renderedRevision_=this.getRevision(),this.dispatchEvent(new mi("afteroperations",t,i)),t.animate&&requestAnimationFrame(this.changed.bind(this))}}},e.prototype.disposeInternal=function(){this.processor_&&this.processor_.dispose(),t.prototype.disposeInternal.call(this)},e}(Mr);vi.prototype.dispose;var _i=null;function xi(t,e){var r=t.getRenderer();if(!r)throw new Error("Unsupported layer type: "+t);if(!r.prepareFrame(e))return null;var i=e.size[0],n=e.size[1];if(0===i||0===n)return null;var o,a=r.renderFrame(e,null);if(a instanceof HTMLCanvasElement)o=a;else{if(a&&(o=a.firstElementChild),!(o instanceof HTMLCanvasElement))throw new Error("Unsupported rendered element: "+o);if(o.width===i&&o.height===n)return o.getContext("2d").getImageData(0,0,i,n)}if(_i){var s=_i.canvas;s.width!==i||s.height!==n?_i=(0,rr.E4)(i,n):_i.clearRect(0,0,i,n)}else _i=(0,rr.E4)(i,n);return _i.drawImage(o,0,0,i,n),_i.getImageData(0,0,i,n)}const bi=vi;var wi=function(){var t=function(e,r){return t=Object.setPrototypeOf||{__proto__:[]}instanceof Array&&function(t,e){t.__proto__=e}||function(t,e){for(var r in e)Object.prototype.hasOwnProperty.call(e,r)&&(t[r]=e[r])},t(e,r)};return function(e,r){if("function"!=typeof r&&null!==r)throw new TypeError("Class extends value "+String(r)+" is not a constructor or null");function i(){this.constructor=e}t(e,r),e.prototype=null===r?Object.create(r):(i.prototype=r.prototype,new i)}}(),Ei=['Map tiles by <a href="https://stamen.com/" target="_blank">Stamen Design</a>, under <a href="https://creativecommons.org/licenses/by/3.0/" target="_blank">CC BY 3.0</a>.',ni],Ti={terrain:{extension:"jpg",opaque:!0},"terrain-background":{extension:"jpg",opaque:!0},"terrain-labels":{extension:"png",opaque:!1},"terrain-lines":{extension:"png",opaque:!1},"toner-background":{extension:"png",opaque:!0},toner:{extension:"png",opaque:!0},"toner-hybrid":{extension:"png",opaque:!1},"toner-labels":{extension:"png",opaque:!1},"toner-lines":{extension:"png",opaque:!1},"toner-lite":{extension:"png",opaque:!0},watercolor:{extension:"jpg",opaque:!0}},Si={terrain:{minZoom:0,maxZoom:18},toner:{minZoom:0,maxZoom:20},watercolor:{minZoom:0,maxZoom:18}};const Ci=function(t){function e(e){var r=void 0===e.imageSmoothing||e.imageSmoothing;void 0!==e.interpolate&&(r=e.interpolate);var i=e.layer.indexOf("-"),n=-1==i?e.layer:e.layer.slice(0,i),o=Si[n],a=Ti[e.layer],s=void 0!==e.url?e.url:"https://stamen-tiles-{a-d}.a.ssl.fastly.net/"+e.layer+"/{z}/{x}/{y}."+a.extension;return t.call(this,{attributions:Ei,cacheSize:e.cacheSize,crossOrigin:"anonymous",interpolate:r,maxZoom:null!=e.maxZoom?e.maxZoom:o.maxZoom,minZoom:null!=e.minZoom?e.minZoom:o.minZoom,opaque:a.opaque,reprojectionErrorThreshold:e.reprojectionErrorThreshold,tileLoadFunction:e.tileLoadFunction,transition:e.transition,url:s,wrapX:e.wrapX,zDirection:e.zDirection})||this}return wi(e,t),e}(y);var Oi=function(){var t=function(e,r){return t=Object.setPrototypeOf||{__proto__:[]}instanceof Array&&function(t,e){t.__proto__=e}||function(t,e){for(var r in e)Object.prototype.hasOwnProperty.call(e,r)&&(t[r]=e[r])},t(e,r)};return function(e,r){if("function"!=typeof r&&null!==r)throw new TypeError("Class extends value "+String(r)+" is not a constructor or null");function i(){this.constructor=e}t(e,r),e.prototype=null===r?Object.create(r):(i.prototype=r.prototype,new i)}}();const Ri=function(t){function e(e){var r=this,i=e||{},n=void 0===i.imageSmoothing||i.imageSmoothing;return void 0!==i.interpolate&&(n=i.interpolate),(r=t.call(this,{attributions:i.attributions,cacheSize:i.cacheSize,crossOrigin:i.crossOrigin,interpolate:n,projection:i.projection,reprojectionErrorThreshold:i.reprojectionErrorThreshold,tileGrid:i.tileGrid,tileLoadFunction:i.tileLoadFunction,url:i.url,urls:i.urls,wrapX:void 0===i.wrapX||i.wrapX,transition:i.transition,zDirection:i.zDirection})||this).params_=i.params||{},r.hidpi_=void 0===i.hidpi||i.hidpi,r.tmpExtent_=(0,o.createEmpty)(),r.setKey(r.getKeyForParams_()),r}return Oi(e,t),e.prototype.getKeyForParams_=function(){var t=0,e=[];for(var r in this.params_)e[t++]=r+"-"+this.params_[r];return e.join("/")},e.prototype.getParams=function(){return this.params_},e.prototype.getRequestUrl_=function(t,e,r,i,n,o){var a=this.urls;if(a){var s=n.getCode().split(/:(?=\d+$)/).pop();return o.SIZE=e[0]+","+e[1],o.BBOX=r.join(","),o.BBOXSR=s,o.IMAGESR=s,o.DPI=Math.round(o.DPI?o.DPI*i:90*i),Zr((1==a.length?a[0]:a[(0,Ne.$W)((0,u.vp)(t),a.length)]).replace(/MapServer\/?$/,"MapServer/export").replace(/ImageServer\/?$/,"ImageServer/exportImage"),o)}},e.prototype.getTilePixelRatio=function(t){return this.hidpi_?t:1},e.prototype.updateParams=function(t){(0,m.f0)(this.params_,t),this.setKey(this.getKeyForParams_())},e.prototype.tileUrlFunction=function(t,e,r){var i=this.getTileGrid();if(i||(i=this.getTileGridForProjection(r)),!(i.getResolutions().length<=t[0])){1==e||this.hidpi_||(e=1);var n=i.getTileCoordExtent(t,this.tmpExtent_),o=(0,Ge.Pq)(i.getTileSize(t[0]),this.tmpSize);1!=e&&(o=(0,Ge.bA)(o,e,this.tmpSize));var a={F:"image",FORMAT:"PNG32",TRANSPARENT:!0};return(0,m.f0)(a,this.params_),this.getRequestUrl_(t,o,n,e,r,a)}},e}(s.Z);var Ii=function(){var t=function(e,r){return t=Object.setPrototypeOf||{__proto__:[]}instanceof Array&&function(t,e){t.__proto__=e}||function(t,e){for(var r in e)Object.prototype.hasOwnProperty.call(e,r)&&(t[r]=e[r])},t(e,r)};return function(e,r){if("function"!=typeof r&&null!==r)throw new TypeError("Class extends value "+String(r)+" is not a constructor or null");function i(){this.constructor=e}t(e,r),e.prototype=null===r?Object.create(r):(i.prototype=r.prototype,new i)}}(),Pi=function(t){function e(e){var r=this,i=e||{};return r=t.call(this,{opaque:!1,projection:i.projection,tileGrid:i.tileGrid,wrapX:void 0===i.wrapX||i.wrapX,zDirection:i.zDirection,url:i.template||"z:{z} x:{x} y:{y}",tileLoadFunction:function(t,e){var i=t.getTileCoord()[0],n=(0,Ge.Pq)(r.tileGrid.getTileSize(i)),o=(0,rr.E4)(n[0],n[1]);o.strokeStyle="grey",o.strokeRect(.5,.5,n[0]+.5,n[1]+.5),o.fillStyle="grey",o.strokeStyle="white",o.textAlign="center",o.textBaseline="middle",o.font="24px sans-serif",o.lineWidth=4,o.strokeText(e,n[0]/2,n[1]/2,n[0]),o.fillText(e,n[0]/2,n[1]/2,n[0]),t.setImage(o.canvas)}})||this,r}return Ii(e,t),e}(y);const Li=Pi;var Ai=r(902),Mi=function(){var t=function(e,r){return t=Object.setPrototypeOf||{__proto__:[]}instanceof Array&&function(t,e){t.__proto__=e}||function(t,e){for(var r in e)Object.prototype.hasOwnProperty.call(e,r)&&(t[r]=e[r])},t(e,r)};return function(e,r){if("function"!=typeof r&&null!==r)throw new TypeError("Class extends value "+String(r)+" is not a constructor or null");function i(){this.constructor=e}t(e,r),e.prototype=null===r?Object.create(r):(i.prototype=r.prototype,new i)}}(),Fi=function(t){function e(e){var r=this,i=e||{},n=void 0===i.imageSmoothing||i.imageSmoothing;void 0!==i.interpolate&&(n=i.interpolate);var a=i.params||{},s=!("TRANSPARENT"in a)||a.TRANSPARENT;return(r=t.call(this,{attributions:i.attributions,attributionsCollapsible:i.attributionsCollapsible,cacheSize:i.cacheSize,crossOrigin:i.crossOrigin,interpolate:n,opaque:!s,projection:i.projection,reprojectionErrorThreshold:i.reprojectionErrorThreshold,tileClass:i.tileClass,tileGrid:i.tileGrid,tileLoadFunction:i.tileLoadFunction,url:i.url,urls:i.urls,wrapX:void 0===i.wrapX||i.wrapX,transition:i.transition,zDirection:i.zDirection})||this).gutter_=void 0!==i.gutter?i.gutter:0,r.params_=a,r.v13_=!0,r.serverType_=i.serverType,r.hidpi_=void 0===i.hidpi||i.hidpi,r.tmpExtent_=(0,o.createEmpty)(),r.updateV13_(),r.setKey(r.getKeyForParams_()),r}return Mi(e,t),e.prototype.getFeatureInfoUrl=function(t,e,r,i){var n=(0,h.get)(r),a=this.getProjection(),s=this.getTileGrid();s||(s=this.getTileGridForProjection(n));var l=s.getZForResolution(e,this.zDirection),u=s.getTileCoordForCoordAndZ(t,l);if(!(s.getResolutions().length<=u[0])){var c=s.getResolution(u[0]),p=s.getTileCoordExtent(u,this.tmpExtent_),d=(0,Ge.Pq)(s.getTileSize(u[0]),this.tmpSize),f=this.gutter_;0!==f&&(d=(0,Ge.f3)(d,f,this.tmpSize),p=(0,o.buffer)(p,c*f,p)),a&&a!==n&&(c=(0,Sr.aA)(a,n,t,c),p=(0,h.transformExtent)(p,n,a),t=(0,h.transform)(t,n,a));var g={SERVICE:"WMS",VERSION:Xr,REQUEST:"GetFeatureInfo",FORMAT:"image/png",TRANSPARENT:!0,QUERY_LAYERS:this.params_.LAYERS};(0,m.f0)(g,this.params_,i);var y=Math.floor((t[0]-p[0])/c),v=Math.floor((p[3]-t[1])/c);return g[this.v13_?"I":"X"]=y,g[this.v13_?"J":"Y"]=v,this.getRequestUrl_(u,d,p,1,a||n,g)}},e.prototype.getLegendUrl=function(t,e){if(void 0!==this.urls[0]){var r={SERVICE:"WMS",VERSION:Xr,REQUEST:"GetLegendGraphic",FORMAT:"image/png"};if(void 0===e||void 0===e.LAYER){var i=this.params_.LAYERS;if(Array.isArray(i)&&1!==i.length)return;r.LAYER=i}if(void 0!==t){var n=this.getProjection()?this.getProjection().getMetersPerUnit():1;r.SCALE=t*n/28e-5}return(0,m.f0)(r,e),Zr(this.urls[0],r)}},e.prototype.getGutter=function(){return this.gutter_},e.prototype.getParams=function(){return this.params_},e.prototype.getRequestUrl_=function(t,e,r,i,n,o){var a=this.urls;if(a){if(o.WIDTH=e[0],o.HEIGHT=e[1],o[this.v13_?"CRS":"SRS"]=n.getCode(),"STYLES"in this.params_||(o.STYLES=""),1!=i)switch(this.serverType_){case Hr:var s=90*i+.5|0;"FORMAT_OPTIONS"in o?o.FORMAT_OPTIONS+=";dpi:"+s:o.FORMAT_OPTIONS="dpi:"+s;break;case Kr:o.MAP_RESOLUTION=90*i;break;case Yr:case $r:o.DPI=90*i;break;default:(0,C.h)(!1,52)}var l=n.getAxisOrientation(),c=r;if(this.v13_&&"ne"==l.substr(0,2)){var h=void 0;h=r[0],c[0]=r[1],c[1]=h,h=r[2],c[2]=r[3],c[3]=h}return o.BBOX=c.join(","),Zr(1==a.length?a[0]:a[(0,Ne.$W)((0,u.vp)(t),a.length)],o)}},e.prototype.getTilePixelRatio=function(t){return this.hidpi_&&void 0!==this.serverType_?t:1},e.prototype.getKeyForParams_=function(){var t=0,e=[];for(var r in this.params_)e[t++]=r+"-"+this.params_[r];return e.join("/")},e.prototype.updateParams=function(t){(0,m.f0)(this.params_,t),this.updateV13_(),this.setKey(this.getKeyForParams_())},e.prototype.updateV13_=function(){var t=this.params_.VERSION||Xr;this.v13_=(0,Jr.n)(t,"1.3")>=0},e.prototype.tileUrlFunction=function(t,e,r){var i=this.getTileGrid();if(i||(i=this.getTileGridForProjection(r)),!(i.getResolutions().length<=t[0])){1==e||this.hidpi_&&void 0!==this.serverType_||(e=1);var n=i.getResolution(t[0]),a=i.getTileCoordExtent(t,this.tmpExtent_),s=(0,Ge.Pq)(i.getTileSize(t[0]),this.tmpSize),l=this.gutter_;0!==l&&(s=(0,Ge.f3)(s,l,this.tmpSize),a=(0,o.buffer)(a,n*l,a)),1!=e&&(s=(0,Ge.bA)(s,e,this.tmpSize));var u={SERVICE:"WMS",VERSION:Xr,REQUEST:"GetMap",FORMAT:"image/png",TRANSPARENT:!0};return(0,m.f0)(u,this.params_),this.getRequestUrl_(t,s,a,e,r,u)}},e}(s.Z);const Zi=Fi;var ki=r(9939),ji=r(4806),Di=function(){var t=function(e,r){return t=Object.setPrototypeOf||{__proto__:[]}instanceof Array&&function(t,e){t.__proto__=e}||function(t,e){for(var r in e)Object.prototype.hasOwnProperty.call(e,r)&&(t[r]=e[r])},t(e,r)};return function(e,r){if("function"!=typeof r&&null!==r)throw new TypeError("Class extends value "+String(r)+" is not a constructor or null");function i(){this.constructor=e}t(e,r),e.prototype=null===r?Object.create(r):(i.prototype=r.prototype,new i)}}(),Ni=function(t){function e(e,r,i,n,o,a){var s=t.call(this,e,r)||this;return s.src_=i,s.extent_=n,s.preemptive_=o,s.grid_=null,s.keys_=null,s.data_=null,s.jsonp_=a,s}return Di(e,t),e.prototype.getImage=function(){return null},e.prototype.getData=function(t){if(!this.grid_||!this.keys_)return null;var e=(t[0]-this.extent_[0])/(this.extent_[2]-this.extent_[0]),r=(t[1]-this.extent_[1])/(this.extent_[3]-this.extent_[1]),i=this.grid_[Math.floor((1-r)*this.grid_.length)];if("string"!=typeof i)return null;var n=i.charCodeAt(Math.floor(e*i.length));n>=93&&n--,n>=35&&n--;var o=null;if((n-=32)in this.keys_){var a=this.keys_[n];o=this.data_&&a in this.data_?this.data_[a]:a}return o},e.prototype.forDataAtCoordinate=function(t,e,r){this.state==M.Z.EMPTY&&!0===r?(this.state=M.Z.IDLE,(0,Cr.Vx)(this,x.Z.CHANGE,(function(r){e(this.getData(t))}),this),this.loadInternal_()):!0===r?setTimeout(function(){e(this.getData(t))}.bind(this),0):e(this.getData(t))},e.prototype.getKey=function(){return this.src_},e.prototype.handleError_=function(){this.state=M.Z.ERROR,this.changed()},e.prototype.handleLoad_=function(t){this.grid_=t.grid,this.keys_=t.keys,this.data_=t.data,this.state=M.Z.LOADED,this.changed()},e.prototype.loadInternal_=function(){if(this.state==M.Z.IDLE)if(this.state=M.Z.LOADING,this.jsonp_)(0,p.R6)(this.src_,this.handleLoad_.bind(this),this.handleError_.bind(this));else{var t=new XMLHttpRequest;t.addEventListener("load",this.onXHRLoad_.bind(this)),t.addEventListener("error",this.onXHRError_.bind(this)),t.open("GET",this.src_),t.send()}},e.prototype.onXHRLoad_=function(t){var e=t.target;if(!e.status||e.status>=200&&e.status<300){var r=void 0;try{r=JSON.parse(e.responseText)}catch(t){return void this.handleError_()}this.handleLoad_(r)}else this.handleError_()},e.prototype.onXHRError_=function(t){this.handleError_()},e.prototype.load=function(){this.preemptive_?this.loadInternal_():this.setState(M.Z.EMPTY)},e}(ji.Z),Gi=function(t){function e(e){var r=t.call(this,{projection:(0,h.get)("EPSG:3857"),state:a.Z.LOADING,zDirection:e.zDirection})||this;if(r.preemptive_=void 0===e.preemptive||e.preemptive,r.tileUrlFunction_=l.vU,r.template_=void 0,r.jsonp_=e.jsonp||!1,e.url)if(r.jsonp_)(0,p.R6)(e.url,r.handleTileJSONResponse.bind(r),r.handleTileJSONError.bind(r));else{var i=new XMLHttpRequest;i.addEventListener("load",r.onXHRLoad_.bind(r)),i.addEventListener("error",r.onXHRError_.bind(r)),i.open("GET",e.url),i.send()}else e.tileJSON?r.handleTileJSONResponse(e.tileJSON):(0,C.h)(!1,51);return r}return Di(e,t),e.prototype.onXHRLoad_=function(t){var e=t.target;if(!e.status||e.status>=200&&e.status<300){var r=void 0;try{r=JSON.parse(e.responseText)}catch(t){return void this.handleTileJSONError()}this.handleTileJSONResponse(r)}else this.handleTileJSONError()},e.prototype.onXHRError_=function(t){this.handleTileJSONError()},e.prototype.getTemplate=function(){return this.template_},e.prototype.forDataAtCoordinateAndResolution=function(t,e,r,i){if(this.tileGrid){var n=this.tileGrid.getZForResolution(e,this.zDirection),o=this.tileGrid.getTileCoordForCoordAndZ(t,n);this.getTile(o[0],o[1],o[2],1,this.getProjection()).forDataAtCoordinate(t,r,i)}else!0===i?setTimeout((function(){r(null)}),0):r(null)},e.prototype.handleTileJSONError=function(){this.setState(a.Z.ERROR)},e.prototype.handleTileJSONResponse=function(t){var e,r=(0,h.get)("EPSG:4326"),i=this.getProjection();if(void 0!==t.bounds){var n=(0,h.getTransformFromProjections)(r,i);e=(0,o.applyTransform)(t.bounds,n)}var s=(0,c.Tl)(i),u=t.minzoom||0,p=t.maxzoom||22,d=(0,c.dl)({extent:s,maxZoom:p,minZoom:u});this.tileGrid=d,this.template_=t.template;var f=t.grids;if(f){if(this.tileUrlFunction_=(0,l.uR)(f,d),void 0!==t.attribution){var g=void 0!==e?e:s;this.setAttributions((function(e){return(0,o.intersects)(g,e.extent)?[t.attribution]:null}))}this.setState(a.Z.READY)}else this.setState(a.Z.ERROR)},e.prototype.getTile=function(t,e,r,i,n){var o=(0,u.lg)(t,e,r);if(this.tileCache.containsKey(o))return this.tileCache.get(o);var a=[t,e,r],s=this.getTileCoordForTileUrlFunction(a,n),l=this.tileUrlFunction_(s,i,n),c=new Ni(a,void 0!==l?M.Z.IDLE:M.Z.EMPTY,void 0!==l?l:"",this.tileGrid.getTileCoordExtent(a),this.preemptive_,this.jsonp_);return this.tileCache.set(o,c),c},e.prototype.useTile=function(t,e,r){var i=(0,u.lg)(t,e,r);this.tileCache.containsKey(i)&&this.tileCache.get(i)},e}(A.Z);const zi=Gi;var Ui=r(3320);const Bi="KVP";var qi=function(){var t=function(e,r){return t=Object.setPrototypeOf||{__proto__:[]}instanceof Array&&function(t,e){t.__proto__=e}||function(t,e){for(var r in e)Object.prototype.hasOwnProperty.call(e,r)&&(t[r]=e[r])},t(e,r)};return function(e,r){if("function"!=typeof r&&null!==r)throw new TypeError("Class extends value "+String(r)+" is not a constructor or null");function i(){this.constructor=e}t(e,r),e.prototype=null===r?Object.create(r):(i.prototype=r.prototype,new i)}}(),Vi=function(t){function e(e){var r=this,i=void 0===e.imageSmoothing||e.imageSmoothing;void 0!==e.interpolate&&(i=e.interpolate);var n=void 0!==e.requestEncoding?e.requestEncoding:Bi,o=e.tileGrid,a=e.urls;return void 0===a&&void 0!==e.url&&(a=(0,l.Gk)(e.url)),(r=t.call(this,{attributions:e.attributions,attributionsCollapsible:e.attributionsCollapsible,cacheSize:e.cacheSize,crossOrigin:e.crossOrigin,interpolate:i,projection:e.projection,reprojectionErrorThreshold:e.reprojectionErrorThreshold,tileClass:e.tileClass,tileGrid:o,tileLoadFunction:e.tileLoadFunction,tilePixelRatio:e.tilePixelRatio,urls:a,wrapX:void 0!==e.wrapX&&e.wrapX,transition:e.transition,zDirection:e.zDirection})||this).version_=void 0!==e.version?e.version:"1.0.0",r.format_=void 0!==e.format?e.format:"image/jpeg",r.dimensions_=void 0!==e.dimensions?e.dimensions:{},r.layer_=e.layer,r.matrixSet_=e.matrixSet,r.style_=e.style,r.requestEncoding_=n,r.setKey(r.getKeyForDimensions_()),a&&a.length>0&&(r.tileUrlFunction=(0,l.Un)(a.map(r.createFromWMTSTemplate.bind(r)))),r}return qi(e,t),e.prototype.setUrls=function(t){this.urls=t;var e=t.join("\n");this.setTileUrlFunction((0,l.Un)(t.map(this.createFromWMTSTemplate.bind(this))),e)},e.prototype.getDimensions=function(){return this.dimensions_},e.prototype.getFormat=function(){return this.format_},e.prototype.getLayer=function(){return this.layer_},e.prototype.getMatrixSet=function(){return this.matrixSet_},e.prototype.getRequestEncoding=function(){return this.requestEncoding_},e.prototype.getStyle=function(){return this.style_},e.prototype.getVersion=function(){return this.version_},e.prototype.getKeyForDimensions_=function(){var t=0,e=[];for(var r in this.dimensions_)e[t++]=r+"-"+this.dimensions_[r];return e.join("/")},e.prototype.updateDimensions=function(t){(0,m.f0)(this.dimensions_,t),this.setKey(this.getKeyForDimensions_())},e.prototype.createFromWMTSTemplate=function(t){var e=this.requestEncoding_,r={layer:this.layer_,style:this.style_,tilematrixset:this.matrixSet_};e==Bi&&(0,m.f0)(r,{Service:"WMTS",Request:"GetTile",Version:this.version_,Format:this.format_}),t=e==Bi?Zr(t,r):t.replace(/\{(\w+?)\}/g,(function(t,e){return e.toLowerCase()in r?r[e.toLowerCase()]:t}));var i=this.tileGrid,n=this.dimensions_;return function(r,o,a){if(r){var s={TileMatrix:i.getMatrixId(r[0]),TileCol:r[1],TileRow:r[2]};(0,m.f0)(s,n);var l=t;return e==Bi?Zr(l,s):l.replace(/\{(\w+?)\}/g,(function(t,e){return s[e]}))}}},e}(s.Z);const Wi=Vi;function Xi(t,e){var r=new n.Z(32),i=t.getExtent();return function(n,a){r.expireCache(),i&&(n=(0,o.getIntersection)(i,n));var s=t.getZForResolution(a),l=[];return t.forEachTileCoord(n,s,(function(t){var i=t.toString();if(!r.containsKey(i)){var n=e(t);r.set(i,n)}l.push(r.get(i))})),l}}},8458:(t,e,r)=>{"use strict";r.d(e,{Z:()=>c});var i,n=r(2971),o=r(4562),a=r(4187),s=r(6121),l=(i=function(t,e){return i=Object.setPrototypeOf||{__proto__:[]}instanceof Array&&function(t,e){t.__proto__=e}||function(t,e){for(var r in e)Object.prototype.hasOwnProperty.call(e,r)&&(t[r]=e[r])},i(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 r(){this.constructor=t}i(t,e),t.prototype=null===e?Object.create(e):(r.prototype=e.prototype,new r)});function u(t){return t?Array.isArray(t)?function(e){return t}:"function"==typeof t?t:function(e){return[t]}:null}const c=function(t){function e(e){var r=t.call(this)||this;r.projection=(0,s.get)(e.projection),r.attributions_=u(e.attributions),r.attributionsCollapsible_=void 0===e.attributionsCollapsible||e.attributionsCollapsible,r.loading=!1,r.state_=void 0!==e.state?e.state:o.Z.READY,r.wrapX_=void 0!==e.wrapX&&e.wrapX,r.interpolate_=!!e.interpolate,r.viewResolver=null,r.viewRejector=null;var i=r;return r.viewPromise_=new Promise((function(t,e){i.viewResolver=t,i.viewRejector=e})),r}return l(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(0,a.O3)()},e.prototype.getView=function(){return this.viewPromise_},e.prototype.getState=function(){return this.state_},e.prototype.getWrapX=function(){return this.wrapX_},e.prototype.getInterpolate=function(){return this.interpolate_},e.prototype.refresh=function(){this.changed()},e.prototype.setAttributions=function(t){this.attributions_=u(t),this.changed()},e.prototype.setState=function(t){this.state_=t,this.changed()},e}(n.Z)},4562:(t,e,r)=>{"use strict";r.d(e,{Z:()=>i});const i={UNDEFINED:"undefined",LOADING:"loading",READY:"ready",ERROR:"error"}},7302:(t,e,r)=>{"use strict";r.d(e,{Z:()=>m,s:()=>y});var i,n=r(291),o=r(8458),a=r(1702),s=r(7195),l=r(4187),u=r(9515),c=r(6121),h=r(8634),p=r(7248),d=r(4307),f=(i=function(t,e){return i=Object.setPrototypeOf||{__proto__:[]}instanceof Array&&function(t,e){t.__proto__=e}||function(t,e){for(var r in e)Object.prototype.hasOwnProperty.call(e,r)&&(t[r]=e[r])},i(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 r(){this.constructor=t}i(t,e),t.prototype=null===e?Object.create(e):(r.prototype=e.prototype,new r)}),g=function(t){function e(e){var r=t.call(this,{attributions:e.attributions,attributionsCollapsible:e.attributionsCollapsible,projection:e.projection,state:e.state,wrapX:e.wrapX,interpolate:e.interpolate})||this;return r.on,r.once,r.un,r.opaque_=void 0!==e.opaque&&e.opaque,r.tilePixelRatio_=void 0!==e.tilePixelRatio?e.tilePixelRatio:1,r.tileGrid=void 0!==e.tileGrid?e.tileGrid:null,r.tileGrid&&(0,d.Pq)(r.tileGrid.getTileSize(r.tileGrid.getMinZoom()),[256,256]),r.tileCache=new a.Z(e.cacheSize||0),r.tmpSize=[0,0],r.key_=e.key||"",r.tileOptions={transition:e.transition,interpolate:e.interpolate},r.zDirection=e.zDirection?e.zDirection:0,r}return f(e,t),e.prototype.canExpireCache=function(){return this.tileCache.canExpireCache()},e.prototype.expireCache=function(t,e){var r=this.getTileCacheForProjection(t);r&&r.expireCache(e)},e.prototype.forEachLoadedTile=function(t,e,r,i){var n=this.getTileCacheForProjection(t);if(!n)return!1;for(var o,a,l,u=!0,c=r.minX;c<=r.maxX;++c)for(var p=r.minY;p<=r.maxY;++p)a=(0,h.lg)(e,c,p),l=!1,n.containsKey(a)&&(l=(o=n.get(a)).getState()===s.Z.LOADED)&&(l=!1!==i(o)),l||(u=!1);return u},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?this.tileGrid.getResolutions():null},e.prototype.getTile=function(t,e,r,i,n){return(0,l.O3)()},e.prototype.getTileGrid=function(){return this.tileGrid},e.prototype.getTileGridForProjection=function(t){return this.tileGrid?this.tileGrid:(0,p.X$)(t)},e.prototype.getTileCacheForProjection=function(t){return(0,u.h)((0,c.equivalent)(this.getProjection(),t),68),this.tileCache},e.prototype.getTilePixelRatio=function(t){return this.tilePixelRatio_},e.prototype.getTilePixelSize=function(t,e,r){var i=this.getTileGridForProjection(r),n=this.getTilePixelRatio(e),o=(0,d.Pq)(i.getTileSize(t),this.tmpSize);return 1==n?o:(0,d.bA)(o,n,this.tmpSize)},e.prototype.getTileCoordForTileUrlFunction=function(t,e){var r=void 0!==e?e:this.getProjection(),i=this.getTileGridForProjection(r);return this.getWrapX()&&r.isGlobal()&&(t=(0,p.Cf)(i,t,r)),(0,h.tE)(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 r=this.getTileCacheForProjection(e);t>r.highWaterMark&&(r.highWaterMark=t)},e.prototype.useTile=function(t,e,r,i){},e}(o.Z),y=function(t){function e(e,r){var i=t.call(this,e)||this;return i.tile=r,i}return f(e,t),e}(n.ZP);const m=g},8815:(t,e,r)=>{"use strict";r.d(e,{Z:()=>i});const i={TILELOADSTART:"tileloadstart",TILELOADEND:"tileloadend",TILELOADERROR:"tileloaderror"}},928:(t,e,r)=>{"use strict";r.d(e,{Z:()=>m});var i,n=r(5487),o=r(825),a=r(9494),s=r(1702),l=r(7195),u=r(9939),c=r(4773),h=r(6121),p=r(8634),d=r(7248),f=r(4187),g=(i=function(t,e){return i=Object.setPrototypeOf||{__proto__:[]}instanceof Array&&function(t,e){t.__proto__=e}||function(t,e){for(var r in e)Object.prototype.hasOwnProperty.call(e,r)&&(t[r]=e[r])},i(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 r(){this.constructor=t}i(t,e),t.prototype=null===e?Object.create(e):(r.prototype=e.prototype,new r)});function y(t,e){t.getImage().src=e}const m=function(t){function e(e){var r=this,i=void 0===e.imageSmoothing||e.imageSmoothing;return void 0!==e.interpolate&&(i=e.interpolate),(r=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:y,tilePixelRatio:e.tilePixelRatio,tileUrlFunction:e.tileUrlFunction,url:e.url,urls:e.urls,wrapX:e.wrapX,transition:e.transition,interpolate:i,key:e.key,attributionsCollapsible:e.attributionsCollapsible,zDirection:e.zDirection})||this).crossOrigin=void 0!==e.crossOrigin?e.crossOrigin:null,r.tileClass=void 0!==e.tileClass?e.tileClass:o.Z,r.tileCacheForProjection={},r.tileGridForProjection={},r.reprojectionErrorThreshold_=e.reprojectionErrorThreshold,r.renderReprojectionEdges_=!1,r}return g(e,t),e.prototype.canExpireCache=function(){if(!c.j)return t.prototype.canExpireCache.call(this);if(this.tileCache.canExpireCache())return!0;for(var e in this.tileCacheForProjection)if(this.tileCacheForProjection[e].canExpireCache())return!0;return!1},e.prototype.expireCache=function(e,r){if(c.j){var i=this.getTileCacheForProjection(e);for(var n in this.tileCache.expireCache(this.tileCache==i?r:{}),this.tileCacheForProjection){var o=this.tileCacheForProjection[n];o.expireCache(o==i?r:{})}}else t.prototype.expireCache.call(this,e,r)},e.prototype.getGutterForProjection=function(t){return c.j&&this.getProjection()&&t&&!(0,h.equivalent)(this.getProjection(),t)?0:this.getGutter()},e.prototype.getGutter=function(){return 0},e.prototype.getKey=function(){var e=t.prototype.getKey.call(this);return this.getInterpolate()||(e+=":disable-interpolation"),e},e.prototype.getOpaque=function(e){return!(c.j&&this.getProjection()&&e&&!(0,h.equivalent)(this.getProjection(),e))&&t.prototype.getOpaque.call(this,e)},e.prototype.getTileGridForProjection=function(e){if(!c.j)return t.prototype.getTileGridForProjection.call(this,e);var r=this.getProjection();if(!this.tileGrid||r&&!(0,h.equivalent)(r,e)){var i=(0,f.sq)(e);return i in this.tileGridForProjection||(this.tileGridForProjection[i]=(0,d.X$)(e)),this.tileGridForProjection[i]}return this.tileGrid},e.prototype.getTileCacheForProjection=function(e){if(!c.j)return t.prototype.getTileCacheForProjection.call(this,e);var r=this.getProjection();if(!r||(0,h.equivalent)(r,e))return this.tileCache;var i=(0,f.sq)(e);return i in this.tileCacheForProjection||(this.tileCacheForProjection[i]=new s.Z(this.tileCache.highWaterMark)),this.tileCacheForProjection[i]},e.prototype.createTile_=function(t,e,r,i,o,a){var s=[t,e,r],u=this.getTileCoordForTileUrlFunction(s,o),c=u?this.tileUrlFunction(u,i,o):void 0,h=new this.tileClass(s,void 0!==c?l.Z.IDLE:l.Z.EMPTY,void 0!==c?c:"",this.crossOrigin,this.tileLoadFunction,this.tileOptions);return h.key=a,h.addEventListener(n.Z.CHANGE,this.handleTileChange.bind(this)),h},e.prototype.getTile=function(t,e,r,i,n){var o=this.getProjection();if(c.j&&o&&n&&!(0,h.equivalent)(o,n)){var s=this.getTileCacheForProjection(n),l=[t,e,r],u=void 0,d=(0,p.km)(l);s.containsKey(d)&&(u=s.get(d));var f=this.getKey();if(u&&u.key==f)return u;var g=this.getTileGridForProjection(o),y=this.getTileGridForProjection(n),m=this.getTileCoordForTileUrlFunction(l,n),v=new a.Z(o,g,n,y,l,m,this.getTilePixelRatio(i),this.getGutter(),function(t,e,r,i){return this.getTileInternal(t,e,r,i,o)}.bind(this),this.reprojectionErrorThreshold_,this.renderReprojectionEdges_,this.getInterpolate());return v.key=f,u?(v.interimTile=u,v.refreshInterimChain(),s.replace(d,v)):s.set(d,v),v}return this.getTileInternal(t,e,r,i,o||n)},e.prototype.getTileInternal=function(t,e,r,i,n){var o=null,a=(0,p.lg)(t,e,r),s=this.getKey();if(this.tileCache.containsKey(a)){if((o=this.tileCache.get(a)).key!=s){var u=o;o=this.createTile_(t,e,r,i,n,s),u.getState()==l.Z.IDLE?o.interimTile=u.interimTile:o.interimTile=u,o.refreshInterimChain(),this.tileCache.replace(a,o)}}else o=this.createTile_(t,e,r,i,n,s),this.tileCache.set(a,o);return o},e.prototype.setRenderReprojectionEdges=function(t){if(c.j&&this.renderReprojectionEdges_!=t){for(var e in this.renderReprojectionEdges_=t,this.tileCacheForProjection)this.tileCacheForProjection[e].clear();this.changed()}},e.prototype.setTileGridForProjection=function(t,e){if(c.j){var r=(0,h.get)(t);if(r){var i=(0,f.sq)(r);i in this.tileGridForProjection||(this.tileGridForProjection[i]=e)}}},e}(u.Z)},902:(t,e,r)=>{"use strict";r.d(e,{Z:()=>d});var i,n=r(4562),o=r(928),a=r(8641),s=r(9515),l=r(7848),u=r(7248),c=r(6121),h=r(3315),p=(i=function(t,e){return i=Object.setPrototypeOf||{__proto__:[]}instanceof Array&&function(t,e){t.__proto__=e}||function(t,e){for(var r in e)Object.prototype.hasOwnProperty.call(e,r)&&(t[r]=e[r])},i(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 r(){this.constructor=t}i(t,e),t.prototype=null===e?Object.create(e):(r.prototype=e.prototype,new r)});const d=function(t){function e(e){var r=this,i=void 0===e.imageSmoothing||e.imageSmoothing;if(void 0!==e.interpolate&&(i=e.interpolate),(r=t.call(this,{attributions:e.attributions,cacheSize:e.cacheSize,crossOrigin:e.crossOrigin,interpolate:i,projection:(0,c.get)("EPSG:3857"),reprojectionErrorThreshold:e.reprojectionErrorThreshold,state:n.Z.LOADING,tileLoadFunction:e.tileLoadFunction,wrapX:void 0===e.wrapX||e.wrapX,transition:e.transition,zDirection:e.zDirection})||this).tileJSON_=null,r.tileSize_=e.tileSize,e.url)if(e.jsonp)(0,h.R6)(e.url,r.handleTileJSONResponse.bind(r),r.handleTileJSONError.bind(r));else{var o=new XMLHttpRequest;o.addEventListener("load",r.onXHRLoad_.bind(r)),o.addEventListener("error",r.onXHRError_.bind(r)),o.open("GET",e.url),o.send()}else e.tileJSON?r.handleTileJSONResponse(e.tileJSON):(0,s.h)(!1,51);return r}return p(e,t),e.prototype.onXHRLoad_=function(t){var e=t.target;if(!e.status||e.status>=200&&e.status<300){var r=void 0;try{r=JSON.parse(e.responseText)}catch(t){return void this.handleTileJSONError()}this.handleTileJSONResponse(r)}else this.handleTileJSONError()},e.prototype.onXHRError_=function(t){this.handleTileJSONError()},e.prototype.getTileJSON=function(){return this.tileJSON_},e.prototype.handleTileJSONResponse=function(t){var e,r=(0,c.get)("EPSG:4326"),i=this.getProjection();if(void 0!==t.bounds){var o=(0,c.getTransformFromProjections)(r,i);e=(0,a.applyTransform)(t.bounds,o)}var s=(0,u.Tl)(i),h=t.minzoom||0,p=t.maxzoom||22,d=(0,u.dl)({extent:s,maxZoom:p,minZoom:h,tileSize:this.tileSize_});if(this.tileGrid=d,this.tileUrlFunction=(0,l.uR)(t.tiles,d),void 0!==t.attribution&&!this.getAttributions()){var f=void 0!==e?e:s;this.setAttributions((function(e){return(0,a.intersects)(f,e.extent)?[t.attribution]:null}))}this.tileJSON_=t,this.setState(n.Z.READY)},e.prototype.handleTileJSONError=function(){this.setState(n.Z.ERROR)},e}(o.Z)},9939:(t,e,r)=>{"use strict";r.d(e,{Z:()=>h});var i,n=r(8815),o=r(7302),a=r(7195),s=r(7848),l=r(8634),u=r(4187),c=(i=function(t,e){return i=Object.setPrototypeOf||{__proto__:[]}instanceof Array&&function(t,e){t.__proto__=e}||function(t,e){for(var r in e)Object.prototype.hasOwnProperty.call(e,r)&&(t[r]=e[r])},i(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 r(){this.constructor=t}i(t,e),t.prototype=null===e?Object.create(e):(r.prototype=e.prototype,new r)});const h=function(t){function e(r){var i=t.call(this,{attributions:r.attributions,cacheSize:r.cacheSize,opaque:r.opaque,projection:r.projection,state:r.state,tileGrid:r.tileGrid,tilePixelRatio:r.tilePixelRatio,wrapX:r.wrapX,transition:r.transition,interpolate:r.interpolate,key:r.key,attributionsCollapsible:r.attributionsCollapsible,zDirection:r.zDirection})||this;return i.generateTileUrlFunction_=i.tileUrlFunction===e.prototype.tileUrlFunction,i.tileLoadFunction=r.tileLoadFunction,r.tileUrlFunction&&(i.tileUrlFunction=r.tileUrlFunction),i.urls=null,r.urls?i.setUrls(r.urls):r.url&&i.setUrl(r.url),i.tileLoadingKeys_={},i}return c(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,r=t.target,i=(0,u.sq)(r),s=r.getState();s==a.Z.LOADING?(this.tileLoadingKeys_[i]=!0,e=n.Z.TILELOADSTART):i in this.tileLoadingKeys_&&(delete this.tileLoadingKeys_[i],e=s==a.Z.ERROR?n.Z.TILELOADERROR:s==a.Z.LOADED?n.Z.TILELOADEND:void 0),null!=e&&this.dispatchEvent(new o.s(e,r))},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=(0,s.Gk)(t);this.urls=e,this.setUrls(e)},e.prototype.setUrls=function(t){this.urls=t;var e=t.join("\n");this.generateTileUrlFunction_?this.setTileUrlFunction((0,s.uR)(t,this.tileGrid),e):this.setKey(e)},e.prototype.tileUrlFunction=function(t,e,r){},e.prototype.useTile=function(t,e,r){var i=(0,l.lg)(t,e,r);this.tileCache.containsKey(i)&&this.tileCache.get(i)},e}(o.Z)},2556:(t,e,r)=>{"use strict";r.d(e,{Z:()=>T});var i,n=r(8714),o=r(2071),a=r(291),s=r(5487),l=r(5990),u=r(9781),c=r(8458),h=r(4562),p=r(2796),d=r(6885),f=r(4087),g=r(9515),y=r(8641),m=r(5537),v=r(4187),_=r(9374),x=r(5818),b=r(7537),w=(i=function(t,e){return i=Object.setPrototypeOf||{__proto__:[]}instanceof Array&&function(t,e){t.__proto__=e}||function(t,e){for(var r in e)Object.prototype.hasOwnProperty.call(e,r)&&(t[r]=e[r])},i(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 r(){this.constructor=t}i(t,e),t.prototype=null===e?Object.create(e):(r.prototype=e.prototype,new r)}),E=function(t){function e(e,r,i){var n=t.call(this,e)||this;return n.feature=r,n.features=i,n}return w(e,t),e}(a.ZP);const T=function(t){function e(e){var r=this,i=e||{};(r=t.call(this,{attributions:i.attributions,interpolate:!0,projection:void 0,state:h.Z.READY,wrapX:void 0===i.wrapX||i.wrapX})||this).on,r.once,r.un,r.loader_=d.Zn,r.format_=i.format,r.overlaps_=void 0===i.overlaps||i.overlaps,r.url_=i.url,void 0!==i.loader?r.loader_=i.loader:void 0!==r.url_&&((0,g.h)(r.format_,7),r.loader_=(0,b.Be)(r.url_,r.format_)),r.strategy_=void 0!==i.strategy?i.strategy:f.$6;var o,a,s=void 0===i.useSpatialIndex||i.useSpatialIndex;return r.featuresRtree_=s?new u.Z:null,r.loadedExtentsRtree_=new u.Z,r.loadingExtentsCount_=0,r.nullGeometryFeatures_={},r.idIndex_={},r.uidIndex_={},r.featureChangeKeys_={},r.featuresCollection_=null,Array.isArray(i.features)?a=i.features:i.features&&(a=(o=i.features).getArray()),s||void 0!==o||(o=new n.Z(a)),void 0!==a&&r.addFeaturesInternal(a),void 0!==o&&r.bindFeaturesCollection_(o),r}return w(e,t),e.prototype.addFeature=function(t){this.addFeatureInternal(t),this.changed()},e.prototype.addFeatureInternal=function(t){var e=(0,v.sq)(t);if(this.addToIndex_(e,t)){this.setupChangeEvents_(e,t);var r=t.getGeometry();if(r){var i=r.getExtent();this.featuresRtree_&&this.featuresRtree_.insert(i,t)}else this.nullGeometryFeatures_[e]=t;this.dispatchEvent(new E(p.Z.ADDFEATURE,t))}else this.featuresCollection_&&this.featuresCollection_.remove(t)},e.prototype.setupChangeEvents_=function(t,e){this.featureChangeKeys_[t]=[(0,x.oL)(e,s.Z.CHANGE,this.handleFeatureChange_,this),(0,x.oL)(e,l.Z.PROPERTYCHANGE,this.handleFeatureChange_,this)]},e.prototype.addToIndex_=function(t,e){var r=!0,i=e.getId();return void 0!==i&&(i.toString()in this.idIndex_?r=!1:this.idIndex_[i.toString()]=e),r&&((0,g.h)(!(t in this.uidIndex_),30),this.uidIndex_[t]=e),r},e.prototype.addFeatures=function(t){this.addFeaturesInternal(t),this.changed()},e.prototype.addFeaturesInternal=function(t){for(var e=[],r=[],i=[],n=0,o=t.length;n<o;n++){var a=t[n],s=(0,v.sq)(a);this.addToIndex_(s,a)&&r.push(a)}n=0;for(var l=r.length;n<l;n++){a=r[n],s=(0,v.sq)(a),this.setupChangeEvents_(s,a);var u=a.getGeometry();if(u){var c=u.getExtent();e.push(c),i.push(a)}else this.nullGeometryFeatures_[s]=a}if(this.featuresRtree_&&this.featuresRtree_.load(e,i),this.hasListener(p.Z.ADDFEATURE)){n=0;for(var h=r.length;n<h;n++)this.dispatchEvent(new E(p.Z.ADDFEATURE,r[n]))}},e.prototype.bindFeaturesCollection_=function(t){var e=!1;this.addEventListener(p.Z.ADDFEATURE,(function(r){e||(e=!0,t.push(r.feature),e=!1)})),this.addEventListener(p.Z.REMOVEFEATURE,(function(r){e||(e=!0,t.remove(r.feature),e=!1)})),t.addEventListener(o.Z.ADD,function(t){e||(e=!0,this.addFeature(t.element),e=!1)}.bind(this)),t.addEventListener(o.Z.REMOVE,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(x.bN);this.featuresCollection_||(this.featureChangeKeys_={},this.idIndex_={},this.uidIndex_={})}else if(this.featuresRtree_){var r=function(t){this.removeFeatureInternal(t)}.bind(this);for(var i in this.featuresRtree_.forEach(r),this.nullGeometryFeatures_)this.removeFeatureInternal(this.nullGeometryFeatures_[i])}this.featuresCollection_&&this.featuresCollection_.clear(),this.featuresRtree_&&this.featuresRtree_.clear(),this.nullGeometryFeatures_={};var n=new E(p.Z.CLEAR);this.dispatchEvent(n),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 r=[t[0],t[1],t[0],t[1]];return this.forEachFeatureInExtent(r,(function(r){return r.getGeometry().intersectsCoordinate(t)?e(r):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(r){if(r.getGeometry().intersectsExtent(t)){var i=e(r);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(),(0,_.xb)(this.nullGeometryFeatures_)||(0,m.l7)(t,(0,_.KX)(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 r=t[0],i=t[1],n=null,o=[NaN,NaN],a=1/0,s=[-1/0,-1/0,1/0,1/0],l=e||d.uX;return this.featuresRtree_.forEachInExtent(s,(function(t){if(l(t)){var e=t.getGeometry(),u=a;if((a=e.closestPointXY(r,i,o,a))<u){n=t;var c=Math.sqrt(a);s[0]=r-c,s[1]=i-c,s[2]=r+c,s[3]=i+c}}})),n},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,r=(0,v.sq)(e),i=e.getGeometry();if(i){var n=i.getExtent();r in this.nullGeometryFeatures_?(delete this.nullGeometryFeatures_[r],this.featuresRtree_&&this.featuresRtree_.insert(n,e)):this.featuresRtree_&&this.featuresRtree_.update(n,e)}else r in this.nullGeometryFeatures_||(this.featuresRtree_&&this.featuresRtree_.remove(e),this.nullGeometryFeatures_[r]=e);var o=e.getId();if(void 0!==o){var a=o.toString();this.idIndex_[a]!==e&&(this.removeFromIdIndex_(e),this.idIndex_[a]=e)}else this.removeFromIdIndex_(e),this.uidIndex_[r]=e;this.changed(),this.dispatchEvent(new E(p.Z.CHANGEFEATURE,e))},e.prototype.hasFeature=function(t){var e=t.getId();return void 0!==e?e in this.idIndex_:(0,v.sq)(t)in this.uidIndex_},e.prototype.isEmpty=function(){return this.featuresRtree_?this.featuresRtree_.isEmpty()&&(0,_.xb)(this.nullGeometryFeatures_):!this.featuresCollection_||0===this.featuresCollection_.getLength()},e.prototype.loadFeatures=function(t,e,r){for(var i=this.loadedExtentsRtree_,n=this.strategy_(t,e,r),o=function(t,o){var s=n[t];i.forEachInExtent(s,(function(t){return(0,y.containsExtent)(t.extent,s)}))||(++a.loadingExtentsCount_,a.dispatchEvent(new E(p.Z.FEATURESLOADSTART)),a.loader_.call(a,s,e,r,function(t){--this.loadingExtentsCount_,this.dispatchEvent(new E(p.Z.FEATURESLOADEND,void 0,t))}.bind(a),function(){--this.loadingExtentsCount_,this.dispatchEvent(new E(p.Z.FEATURESLOADERROR))}.bind(a)),i.insert(s,{extent:s.slice()}))},a=this,s=0,l=n.length;s<l;++s)o(s);this.loading=!(this.loader_.length<4)&&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,r=this.loadedExtentsRtree_;r.forEachInExtent(t,(function(r){if((0,y.equals)(r.extent,t))return e=r,!0})),e&&r.remove(e)},e.prototype.removeFeature=function(t){if(t){var e=(0,v.sq)(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=(0,v.sq)(t),r=this.featureChangeKeys_[e];if(r){r.forEach(x.bN),delete this.featureChangeKeys_[e];var i=t.getId();return void 0!==i&&delete this.idIndex_[i.toString()],delete this.uidIndex_[e],this.dispatchEvent(new E(p.Z.REMOVEFEATURE,t)),t}},e.prototype.removeFromIdIndex_=function(t){var e=!1;for(var r in this.idIndex_)if(this.idIndex_[r]===t){delete this.idIndex_[r],e=!0;break}return e},e.prototype.setLoader=function(t){this.loader_=t},e.prototype.setUrl=function(t){(0,g.h)(this.format_,7),this.url_=t,this.setLoader((0,b.Be)(t,this.format_))},e}(c.Z)},2796:(t,e,r)=>{"use strict";r.d(e,{Z:()=>i});const i={ADDFEATURE:"addfeature",CHANGEFEATURE:"changefeature",CLEAR:"clear",REMOVEFEATURE:"removefeature",FEATURESLOADSTART:"featuresloadstart",FEATURESLOADEND:"featuresloadend",FEATURESLOADERROR:"featuresloaderror"}},3320:(t,e,r)=>{"use strict";r.d(e,{Z:()=>m});var i,n=r(5487),o=r(4759),a=r(1702),s=r(7195),l=r(9939),u=r(2559),c=r(8641),h=r(7248),p=r(8634),d=r(9374),f=r(7537),g=r(4307),y=(i=function(t,e){return i=Object.setPrototypeOf||{__proto__:[]}instanceof Array&&function(t,e){t.__proto__=e}||function(t,e){for(var r in e)Object.prototype.hasOwnProperty.call(e,r)&&(t[r]=e[r])},i(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 r(){this.constructor=t}i(t,e),t.prototype=null===e?Object.create(e):(r.prototype=e.prototype,new r)});const m=function(t){function e(e){var r=this,i=e.projection||"EPSG:3857",n=e.extent||(0,h.Tl)(i),s=e.tileGrid||(0,h.dl)({extent:n,maxResolution:e.maxResolution,maxZoom:void 0!==e.maxZoom?e.maxZoom:22,minZoom:e.minZoom,tileSize:e.tileSize||512});return(r=t.call(this,{attributions:e.attributions,attributionsCollapsible:e.attributionsCollapsible,cacheSize:e.cacheSize,interpolate:!0,opaque:!1,projection:i,state:e.state,tileGrid:s,tileLoadFunction:e.tileLoadFunction?e.tileLoadFunction:v,tileUrlFunction:e.tileUrlFunction,url:e.url,urls:e.urls,wrapX:void 0===e.wrapX||e.wrapX,transition:e.transition,zDirection:void 0===e.zDirection?1:e.zDirection})||this).format_=e.format?e.format:null,r.sourceTileCache=new a.Z(r.tileCache.highWaterMark),r.overlaps_=null==e.overlaps||e.overlaps,r.tileClass=e.tileClass?e.tileClass:o.Z,r.tileGrids_={},r}return y(e,t),e.prototype.getFeaturesInExtent=function(t){var e=[],r=this.tileCache;if(0===r.getCount())return e;var i=(0,p.Ul)(r.peekFirstKey())[0],n=this.tileGrid;return r.forEach((function(r){if(r.tileCoord[0]===i&&r.getState()===s.Z.LOADED)for(var o=r.getSourceTiles(),a=0,l=o.length;a<l;++a){var u=o[a],h=u.tileCoord;if((0,c.intersects)(t,n.getTileCoordExtent(h))){var p=u.getFeatures();if(p)for(var d=0,f=p.length;d<f;++d){var g=p[d],y=g.getGeometry();(0,c.intersects)(t,y.getExtent())&&e.push(g)}}}})),e},e.prototype.getOverlaps=function(){return this.overlaps_},e.prototype.clear=function(){this.tileCache.clear(),this.sourceTileCache.clear()},e.prototype.expireCache=function(e,r){var i=this.getTileCacheForProjection(e),n=Object.keys(r).reduce((function(t,e){var r=(0,p.MY)(e);if(i.containsKey(r))for(var n=i.get(r).sourceTiles,o=0,a=n.length;o<a;++o)t[n[o].getKey()]=!0;return t}),{});t.prototype.expireCache.call(this,e,r),this.sourceTileCache.expireCache(n)},e.prototype.getSourceTiles=function(t,e,r){var i=this;if(r.getState()===s.Z.IDLE){r.setState(s.Z.LOADING);var o=r.wrappedTileCoord,a=this.getTileGridForProjection(e),l=a.getTileCoordExtent(o),u=o[0],h=a.getResolution(u);(0,c.buffer)(l,-h,l);var p=this.tileGrid,f=p.getExtent();f&&(0,c.getIntersection)(l,f,l);var g=p.getZForResolution(h,1);p.forEachTileCoord(l,g,(function(o){var a=i.tileUrlFunction(o,t,e),l=i.sourceTileCache.containsKey(a)?i.sourceTileCache.get(a):new i.tileClass(o,a?s.Z.IDLE:s.Z.EMPTY,a,i.format_,i.tileLoadFunction);r.sourceTiles.push(l);var u=l.getState();if(u<s.Z.LOADED){var c=function(t){i.handleTileChange(t);var e=l.getState();if(e===s.Z.LOADED||e===s.Z.ERROR){var o=l.getKey();o in r.errorTileKeys?l.getState()===s.Z.LOADED&&delete r.errorTileKeys[o]:r.loadingSourceTiles--,e===s.Z.ERROR?r.errorTileKeys[o]=!0:l.removeEventListener(n.Z.CHANGE,c),0===r.loadingSourceTiles&&r.setState((0,d.xb)(r.errorTileKeys)?s.Z.LOADED:s.Z.ERROR)}};l.addEventListener(n.Z.CHANGE,c),r.loadingSourceTiles++}u===s.Z.IDLE&&(l.extent=p.getTileCoordExtent(o),l.projection=e,l.resolution=p.getResolution(o[0]),i.sourceTileCache.set(a,l),l.load())})),r.loadingSourceTiles||r.setState(r.sourceTiles.some((function(t){return t.getState()===s.Z.ERROR}))?s.Z.ERROR:s.Z.LOADED)}return r.sourceTiles},e.prototype.getTile=function(t,e,r,i,n){var o,a=(0,p.lg)(t,e,r),l=this.getKey();if(this.tileCache.containsKey(a)&&(o=this.tileCache.get(a)).key===l)return o;var h=[t,e,r],d=this.getTileCoordForTileUrlFunction(h,n),f=this.getTileGrid().getExtent(),g=this.getTileGridForProjection(n);if(d&&f){var y=g.getTileCoordExtent(d);(0,c.buffer)(y,-g.getResolution(t),y),(0,c.intersects)(f,y)||(d=null)}var m=!0;if(null!==d){var v=this.tileGrid,_=g.getResolution(t),x=v.getZForResolution(_,1),b=g.getTileCoordExtent(d);(0,c.buffer)(b,-_,b),v.forEachTileCoord(b,x,function(t){m=m&&!this.tileUrlFunction(t,i,n)}.bind(this))}var w=new u.Z(h,m?s.Z.EMPTY:s.Z.IDLE,d,this.getSourceTiles.bind(this,i,n));return w.key=l,o?(w.interimTile=o,w.refreshInterimChain(),this.tileCache.replace(a,w)):this.tileCache.set(a,w),w},e.prototype.getTileGridForProjection=function(t){var e=t.getCode(),r=this.tileGrids_[e];if(!r){var i=this.tileGrid;r=(0,h.RZ)(t,void 0,i?i.getTileSize(i.getMinZoom()):void 0),this.tileGrids_[e]=r}return r},e.prototype.getTilePixelRatio=function(t){return t},e.prototype.getTilePixelSize=function(t,e,r){var i=this.getTileGridForProjection(r),n=(0,g.Pq)(i.getTileSize(t),this.tmpSize);return[Math.round(n[0]*e),Math.round(n[1]*e)]},e.prototype.updateCacheSize=function(e,r){t.prototype.updateCacheSize.call(this,2*e,r),this.sourceTileCache.highWaterMark=this.getTileCacheForProjection(r).highWaterMark},e}(l.Z);function v(t,e){t.setLoader((function(r,i,n){(0,f.ov)(e,t.getFormat(),r,i,n,t.onLoad.bind(t),t.onError.bind(t))}))}},7580:(t,e,r)=>{"use strict";r.d(e,{Sp:()=>o,cv:()=>a});var i=r(3983),n=6371008.8;function o(t,e,r){var o=r||n,a=(0,i.Yr)(t[1]),s=(0,i.Yr)(e[1]),l=(s-a)/2,u=(0,i.Yr)(e[0]-t[0])/2,c=Math.sin(l)*Math.sin(l)+Math.sin(u)*Math.sin(u)*Math.cos(a)*Math.cos(s);return 2*o*Math.atan2(Math.sqrt(c),Math.sqrt(1-c))}function a(t,e,r,o){var a=o||n,s=(0,i.Yr)(t[1]),l=(0,i.Yr)(t[0]),u=e/a,c=Math.asin(Math.sin(s)*Math.cos(u)+Math.cos(s)*Math.sin(u)*Math.cos(r)),h=l+Math.atan2(Math.sin(r)*Math.sin(u)*Math.cos(s),Math.cos(u)-Math.sin(s)*Math.sin(c));return[(0,i.Ux)(h),(0,i.Ux)(c)]}},9871:(t,e,r)=>{"use strict";function i(t,e,r){var i=void 0!==r?t.toFixed(r):""+t,n=i.indexOf(".");return(n=-1===n?i.length:n)>e?i:new Array(1+e-n).join("0")+i}function n(t,e){for(var r=(""+t).split("."),i=(""+e).split("."),n=0;n<Math.max(r.length,i.length);n++){var o=parseInt(r[n]||"0",10),a=parseInt(i[n]||"0",10);if(o>a)return 1;if(a>o)return-1}return 0}r.d(e,{n:()=>n,v:()=>i})},6131:(t,e,r)=>{"use strict";r.d(e,{Z:()=>n});var i=r(9515);const n=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.expireCache=function(t){for(;this.canExpireCache();)this.pop()},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 r=this.entries_[t];return(0,i.h)(void 0!==r,15),r===this.newest_||(r===this.oldest_?(this.oldest_=this.oldest_.newer,this.oldest_.older=null):(r.newer.older=r.older,r.older.newer=r.newer),r.newer=null,r.older=this.newest_,this.newest_.newer=r,this.newest_=r),r.value_},t.prototype.remove=function(t){var e=this.entries_[t];return(0,i.h)(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_),r=0;for(t=this.newest_;t;t=t.older)e[r++]=t.key_;return e},t.prototype.getValues=function(){var t,e=new Array(this.count_),r=0;for(t=this.newest_;t;t=t.older)e[r++]=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){(0,i.h)(!(t in this.entries_),16);var r={key_:t,newer:null,older:this.newest_,value_:e};this.newest_?this.newest_.newer=r:this.oldest_=r,this.newest_=r,this.entries_[t]=r,++this.count_},t.prototype.setSize=function(t){this.highWaterMark=t},t}()},2729:(t,e,r)=>{"use strict";r.d(e,{Z:()=>a,r:()=>o});var i=r(9515),n=r(9374),o=1/0;const a=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,(0,n.ZH)(this.queuedElements_)},t.prototype.dequeue=function(){var t=this.elements_,e=this.priorities_,r=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_(r);return delete this.queuedElements_[i],r},t.prototype.enqueue=function(t){(0,i.h)(!(this.keyFunction_(t)in this.queuedElements_),31);var e=this.priorityFunction_(t);return e!=o&&(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_,r=this.priorities_,i=e.length,n=e[t],o=r[t],a=t;t<i>>1;){var s=this.getLeftChildIndex_(t),l=this.getRightChildIndex_(t),u=l<i&&r[l]<r[s]?l:s;e[t]=e[u],r[t]=r[u],t=u}e[t]=n,r[t]=o,this.siftDown_(a,t)},t.prototype.siftDown_=function(t,e){for(var r=this.elements_,i=this.priorities_,n=r[e],o=i[e];e>t;){var a=this.getParentIndex_(e);if(!(i[a]>o))break;r[e]=r[a],i[e]=i[a],e=a}r[e]=n,i[e]=o},t.prototype.reprioritize=function(){var t,e,r,i=this.priorityFunction_,n=this.elements_,a=this.priorities_,s=0,l=n.length;for(e=0;e<l;++e)(r=i(t=n[e]))==o?delete this.queuedElements_[this.keyFunction_(t)]:(a[s]=r,n[s++]=t);n.length=s,a.length=s,this.heapify_()},t}()},9781:(t,e,r)=>{"use strict";r.d(e,{Z:()=>s});var i=r(2582),n=r(8641),o=r(4187),a=r(9374);const s=function(){function t(t){this.rbush_=new i(t),this.items_={}}return t.prototype.insert=function(t,e){var r={minX:t[0],minY:t[1],maxX:t[2],maxY:t[3],value:e};this.rbush_.insert(r),this.items_[(0,o.sq)(e)]=r},t.prototype.load=function(t,e){for(var r=new Array(e.length),i=0,n=e.length;i<n;i++){var a=t[i],s=e[i],l={minX:a[0],minY:a[1],maxX:a[2],maxY:a[3],value:s};r[i]=l,this.items_[(0,o.sq)(s)]=l}this.rbush_.load(r)},t.prototype.remove=function(t){var e=(0,o.sq)(t),r=this.items_[e];return delete this.items_[e],null!==this.rbush_.remove(r)},t.prototype.update=function(t,e){var r=this.items_[(0,o.sq)(e)],i=[r.minX,r.minY,r.maxX,r.maxY];(0,n.equals)(i,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 r,i=0,n=t.length;i<n;i++)if(r=e(t[i]))return r;return r},t.prototype.isEmpty=function(){return(0,a.xb)(this.items_)},t.prototype.clear=function(){this.rbush_.clear(),this.items_={}},t.prototype.getExtent=function(t){var e=this.rbush_.toJSON();return(0,n.createOrUpdate)(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}()},9931:(t,e,r)=>{"use strict";r.r(e),r.d(e,{Circle:()=>i.default,Fill:()=>n.Z,Icon:()=>o.Z,IconImage:()=>a.Z,Image:()=>s.Z,RegularShape:()=>l.Z,Stroke:()=>u.Z,Style:()=>c.ZP,Text:()=>h.Z});var i=r(283),n=r(1345),o=r(2370),a=r(3713),s=r(8443),l=r(5393),u=r(8958),c=r(7539),h=r(1280)},283:(t,e,r)=>{"use strict";r.r(e),r.d(e,{default:()=>a});var i,n=r(5393),o=(i=function(t,e){return i=Object.setPrototypeOf||{__proto__:[]}instanceof Array&&function(t,e){t.__proto__=e}||function(t,e){for(var r in e)Object.prototype.hasOwnProperty.call(e,r)&&(t[r]=e[r])},i(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 r(){this.constructor=t}i(t,e),t.prototype=null===e?Object.create(e):(r.prototype=e.prototype,new r)});const a=function(t){function e(e){var r=e||{};return t.call(this,{points:1/0,fill:r.fill,radius:r.radius,stroke:r.stroke,scale:void 0!==r.scale?r.scale:1,rotation:void 0!==r.rotation?r.rotation:0,rotateWithView:void 0!==r.rotateWithView&&r.rotateWithView,displacement:void 0!==r.displacement?r.displacement:[0,0]})||this}return o(e,t),e.prototype.clone=function(){var t=this.getScale(),r=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 r.setOpacity(this.getOpacity()),r},e.prototype.setRadius=function(t){this.radius_=t,this.render()},e}(n.Z)},1345:(t,e,r)=>{"use strict";r.d(e,{Z:()=>i});const i=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}()},2370:(t,e,r)=>{"use strict";r.d(e,{Z:()=>f});var i,n=r(5487),o=r(4698),a=r(1083),s=r(553),l=r(8443),u=r(9706),c=r(9515),h=r(3713),p=r(4187),d=(i=function(t,e){return i=Object.setPrototypeOf||{__proto__:[]}instanceof Array&&function(t,e){t.__proto__=e}||function(t,e){for(var r in e)Object.prototype.hasOwnProperty.call(e,r)&&(t[r]=e[r])},i(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 r(){this.constructor=t}i(t,e),t.prototype=null===e?Object.create(e):(r.prototype=e.prototype,new r)});const f=function(t){function e(e){var r=this,i=e||{},n=void 0!==i.opacity?i.opacity:1,l=void 0!==i.rotation?i.rotation:0,d=void 0!==i.scale?i.scale:1,f=void 0!==i.rotateWithView&&i.rotateWithView;(r=t.call(this,{opacity:n,rotation:l,scale:d,displacement:void 0!==i.displacement?i.displacement:[0,0],rotateWithView:f})||this).anchor_=void 0!==i.anchor?i.anchor:[.5,.5],r.normalizedAnchor_=null,r.anchorOrigin_=void 0!==i.anchorOrigin?i.anchorOrigin:a.Z.TOP_LEFT,r.anchorXUnits_=void 0!==i.anchorXUnits?i.anchorXUnits:o.Z.FRACTION,r.anchorYUnits_=void 0!==i.anchorYUnits?i.anchorYUnits:o.Z.FRACTION,r.crossOrigin_=void 0!==i.crossOrigin?i.crossOrigin:null;var g=void 0!==i.img?i.img:null;r.imgSize_=i.imgSize;var y=i.src;(0,c.h)(!(void 0!==y&&g),4),(0,c.h)(!g||g&&r.imgSize_,5),void 0!==y&&0!==y.length||!g||(y=g.src||(0,p.sq)(g)),(0,c.h)(void 0!==y&&y.length>0,6);var m=void 0!==i.src?s.Z.IDLE:s.Z.LOADED;return r.color_=void 0!==i.color?(0,u._2)(i.color):null,r.iconImage_=(0,h.U)(g,y,void 0!==r.imgSize_?r.imgSize_:null,r.crossOrigin_,m,r.color_),r.offset_=void 0!==i.offset?i.offset:[0,0],r.offsetOrigin_=void 0!==i.offsetOrigin?i.offsetOrigin:a.Z.TOP_LEFT,r.origin_=null,r.size_=void 0!==i.size?i.size:null,r}return d(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_,color:this.color_&&this.color_.slice?this.color_.slice():this.color_||void 0,crossOrigin:this.crossOrigin_,imgSize:this.imgSize_,offset:this.offset_.slice(),offsetOrigin:this.offsetOrigin_,opacity:this.getOpacity(),rotateWithView:this.getRotateWithView(),rotation:this.getRotation(),scale:Array.isArray(t)?t.slice():t,size:null!==this.size_?this.size_.slice():void 0,src:this.getSrc()})},e.prototype.getAnchor=function(){var t=this.normalizedAnchor_;if(!t){t=this.anchor_;var e=this.getSize();if(this.anchorXUnits_==o.Z.FRACTION||this.anchorYUnits_==o.Z.FRACTION){if(!e)return null;t=this.anchor_.slice(),this.anchorXUnits_==o.Z.FRACTION&&(t[0]*=e[0]),this.anchorYUnits_==o.Z.FRACTION&&(t[1]*=e[1])}if(this.anchorOrigin_!=a.Z.TOP_LEFT){if(!e)return null;t===this.anchor_&&(t=this.anchor_.slice()),this.anchorOrigin_!=a.Z.TOP_RIGHT&&this.anchorOrigin_!=a.Z.BOTTOM_RIGHT||(t[0]=-t[0]+e[0]),this.anchorOrigin_!=a.Z.BOTTOM_LEFT&&this.anchorOrigin_!=a.Z.BOTTOM_RIGHT||(t[1]=-t[1]+e[1])}this.normalizedAnchor_=t}var r=this.getDisplacement();return[t[0]-r[0],t[1]+r[1]]},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_!=a.Z.TOP_LEFT){var e=this.getSize(),r=this.iconImage_.getSize();if(!e||!r)return null;t=t.slice(),this.offsetOrigin_!=a.Z.TOP_RIGHT&&this.offsetOrigin_!=a.Z.BOTTOM_RIGHT||(t[0]=r[0]-e[0]-t[0]),this.offsetOrigin_!=a.Z.BOTTOM_LEFT&&this.offsetOrigin_!=a.Z.BOTTOM_RIGHT||(t[1]=r[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(n.Z.CHANGE,t)},e.prototype.load=function(){this.iconImage_.load()},e.prototype.unlistenImageChange=function(t){this.iconImage_.removeEventListener(n.Z.CHANGE,t)},e}(l.Z)},4698:(t,e,r)=>{"use strict";r.d(e,{Z:()=>i});const i={FRACTION:"fraction",PIXELS:"pixels"}},3713:(t,e,r)=>{"use strict";r.d(e,{U:()=>f,Z:()=>g});var i,n=r(208),o=r(5487),a=r(553),s=r(9706),l=r(8326),u=r(2710),c=r(8096),h=(i=function(t,e){return i=Object.setPrototypeOf||{__proto__:[]}instanceof Array&&function(t,e){t.__proto__=e}||function(t,e){for(var r in e)Object.prototype.hasOwnProperty.call(e,r)&&(t[r]=e[r])},i(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 r(){this.constructor=t}i(t,e),t.prototype=null===e?Object.create(e):(r.prototype=e.prototype,new r)}),p=null,d=function(t){function e(e,r,i,n,o,a){var s=t.call(this)||this;return s.hitDetectionImage_=null,s.image_=e||new Image,null!==n&&(s.image_.crossOrigin=n),s.canvas_={},s.color_=a,s.unlisten_=null,s.imageState_=o,s.size_=i,s.src_=r,s.tainted_,s}return h(e,t),e.prototype.isTainted_=function(){if(void 0===this.tainted_&&this.imageState_===a.Z.LOADED){p||(p=(0,l.E4)(1,1)),p.drawImage(this.image_,0,0);try{p.getImageData(0,0,1,1),this.tainted_=!1}catch(t){p=null,this.tainted_=!0}}return!0===this.tainted_},e.prototype.dispatchChangeEvent_=function(){this.dispatchEvent(o.Z.CHANGE)},e.prototype.handleImageError_=function(){this.imageState_=a.Z.ERROR,this.unlistenImage_(),this.dispatchChangeEvent_()},e.prototype.handleImageLoad_=function(){this.imageState_=a.Z.LOADED,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],r=(0,l.E4)(t,e);r.fillRect(0,0,t,e),this.hitDetectionImage_=r.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_==a.Z.IDLE){this.imageState_=a.Z.LOADING;try{this.image_.src=this.src_}catch(t){this.handleImageError_()}this.unlisten_=(0,c.K)(this.image_,this.handleImageLoad_.bind(this),this.handleImageError_.bind(this))}},e.prototype.replaceColor_=function(t){if(this.color_&&!this.canvas_[t]&&this.imageState_===a.Z.LOADED){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 r=e.getContext("2d");if(r.scale(t,t),r.drawImage(this.image_,0,0),r.globalCompositeOperation="multiply","multiply"===r.globalCompositeOperation||this.isTainted_())r.fillStyle=(0,s.XC)(this.color_),r.fillRect(0,0,e.width/t,e.height/t),r.globalCompositeOperation="destination-in",r.drawImage(this.image_,0,0);else{for(var i=r.getImageData(0,0,e.width,e.height),n=i.data,o=this.color_[0]/255,l=this.color_[1]/255,u=this.color_[2]/255,c=this.color_[3],h=0,p=n.length;h<p;h+=4)n[h]*=o,n[h+1]*=l,n[h+2]*=u,n[h+3]*=c;r.putImageData(i,0,0)}}},e.prototype.unlistenImage_=function(){this.unlisten_&&(this.unlisten_(),this.unlisten_=null)},e}(n.Z);function f(t,e,r,i,n,o){var a=u.c.get(e,i,o);return a||(a=new d(t,e,r,i,n,o),u.c.set(e,i,o,a)),a}const g=d},2710:(t,e,r)=>{"use strict";r.d(e,{c:()=>o});var i=r(9706);function n(t,e,r){return e+":"+t+":"+(r?(0,i.XC)(r):"null")}var o=new(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 r=this.cache_[e];0!=(3&t++)||r.hasListener()||(delete this.cache_[e],--this.cacheSize_)}}},t.prototype.get=function(t,e,r){var i=n(t,e,r);return i in this.cache_?this.cache_[i]:null},t.prototype.set=function(t,e,r,i){var o=n(t,e,r);this.cache_[o]=i,++this.cacheSize_},t.prototype.setSize=function(t){this.maxCacheSize_=t,this.expire()},t}())},1083:(t,e,r)=>{"use strict";r.d(e,{Z:()=>i});const i={BOTTOM_LEFT:"bottom-left",BOTTOM_RIGHT:"bottom-right",TOP_LEFT:"top-left",TOP_RIGHT:"top-right"}},8443:(t,e,r)=>{"use strict";r.d(e,{Z:()=>o});var i=r(4187),n=r(4307);const o=function(){function t(t){this.opacity_=t.opacity,this.rotateWithView_=t.rotateWithView,this.rotation_=t.rotation,this.scale_=t.scale,this.scaleArray_=(0,n.Pq)(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(0,i.O3)()},t.prototype.getImage=function(t){return(0,i.O3)()},t.prototype.getHitDetectionImage=function(){return(0,i.O3)()},t.prototype.getPixelRatio=function(t){return 1},t.prototype.getImageState=function(){return(0,i.O3)()},t.prototype.getImageSize=function(){return(0,i.O3)()},t.prototype.getOrigin=function(){return(0,i.O3)()},t.prototype.getSize=function(){return(0,i.O3)()},t.prototype.setDisplacement=function(t){this.displacement_=t},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_=(0,n.Pq)(t)},t.prototype.listenImageChange=function(t){(0,i.O3)()},t.prototype.load=function(){(0,i.O3)()},t.prototype.unlistenImageChange=function(t){(0,i.O3)()},t}()},5393:(t,e,r)=>{"use strict";r.d(e,{Z:()=>h});var i,n=r(553),o=r(8443),a=r(9706),s=r(6620),l=r(8326),u=r(147),c=(i=function(t,e){return i=Object.setPrototypeOf||{__proto__:[]}instanceof Array&&function(t,e){t.__proto__=e}||function(t,e){for(var r in e)Object.prototype.hasOwnProperty.call(e,r)&&(t[r]=e[r])},i(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 r(){this.constructor=t}i(t,e),t.prototype=null===e?Object.create(e):(r.prototype=e.prototype,new r)});const h=function(t){function e(e){var r=this,i=void 0!==e.rotateWithView&&e.rotateWithView;return(r=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,r.hitDetectionCanvas_=null,r.fill_=void 0!==e.fill?e.fill:null,r.origin_=[0,0],r.points_=e.points,r.radius_=void 0!==e.radius?e.radius:e.radius1,r.radius2_=e.radius2,r.angle_=void 0!==e.angle?e.angle:0,r.stroke_=void 0!==e.stroke?e.stroke:null,r.size_=null,r.renderOptions_=null,r.render(),r}return c(e,t),e.prototype.clone=function(){var t=this.getScale(),r=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 r.setOpacity(this.getOpacity()),r},e.prototype.getAnchor=function(){var t=this.size_;if(!t)return null;var e=this.getDisplacement();return[t[0]/2-e[0],t[1]/2+e[1]]},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 r=this.renderOptions_,i=(0,l.E4)(r.size*t,r.size*t);this.draw_(r,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 n.Z.LOADED},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,r){if(0===e||this.points_===1/0||"bevel"!==t&&"miter"!==t)return e;var i=this.radius_,n=void 0===this.radius2_?i:this.radius2_;if(i<n){var o=i;i=n,n=o}var a=void 0===this.radius2_?this.points_:2*this.points_,s=2*Math.PI/a,l=n*Math.sin(s),u=i-Math.sqrt(n*n-l*l),c=Math.sqrt(l*l+u*u),h=c/l;if("miter"===t&&h<=r)return h*e;var p=e/2/h,d=e/2*(u/c),f=Math.sqrt((i+p)*(i+p)+d*d)-i;if(void 0===this.radius2_||"bevel"===t)return 2*f;var g=i*Math.sin(s),y=n-Math.sqrt(i*i-g*g),m=Math.sqrt(g*g+y*y)/g;if(m<=r){var v=m*e/2-n-i;return 2*Math.max(f,v)}return 2*f},e.prototype.createRenderOptions=function(){var t,e=u.rc,r=0,i=null,n=0,o=0;this.stroke_&&(null===(t=this.stroke_.getColor())&&(t=u.Tx),t=(0,s.y)(t),void 0===(o=this.stroke_.getWidth())&&(o=u.yC),i=this.stroke_.getLineDash(),n=this.stroke_.getLineDashOffset(),void 0===(e=this.stroke_.getLineJoin())&&(e=u.rc),void 0===(r=this.stroke_.getMiterLimit())&&(r=u.V4));var a=this.calculateLineJoinSize_(e,o,r),l=Math.max(this.radius_,this.radius2_||0);return{strokeStyle:t,strokeWidth:o,size:Math.ceil(2*l+a),lineDash:i,lineDashOffset:n,lineJoin:e,miterLimit:r}},e.prototype.render=function(){this.renderOptions_=this.createRenderOptions();var t=this.renderOptions_.size;this.canvas_={},this.size_=[t,t]},e.prototype.draw_=function(t,e,r){if(e.scale(r,r),e.translate(t.size/2,t.size/2),this.createPath_(e),this.fill_){var i=this.fill_.getColor();null===i&&(i=u.bL),e.fillStyle=(0,s.y)(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(),r=0;if("string"==typeof e&&(e=(0,a._2)(e)),null===e?r=1:Array.isArray(e)&&(r=4===e.length?e[3]:1),0===r){var i=(0,l.E4)(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_,r=this.radius_;if(e===1/0)t.arc(0,0,r,0,2*Math.PI);else{var i=void 0===this.radius2_?r:this.radius2_;void 0!==this.radius2_&&(e*=2);for(var n=this.angle_-Math.PI/2,o=2*Math.PI/e,a=0;a<e;a++){var s=n+a*o,l=a%2==0?r:i;t.lineTo(l*Math.cos(s),l*Math.sin(s))}t.closePath()}},e.prototype.drawHitDetectionCanvas_=function(t,e){e.translate(t.size/2,t.size/2),this.createPath_(e),e.fillStyle=u.bL,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}(o.Z)},8958:(t,e,r)=>{"use strict";r.d(e,{Z:()=>i});const i=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}()},7539:(t,e,r)=>{"use strict";r.d(e,{J$:()=>u,Ly:()=>p,ZP:()=>f,yF:()=>h});var i=r(283),n=r(1345),o=r(4754),a=r(8958),s=r(9515),l=function(){function t(t){var e=t||{};this.geometry_=null,this.geometryFunction_=d,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.hitDetectionRenderer_=void 0!==e.hitDetectionRenderer?e.hitDetectionRenderer: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"==typeof 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.setHitDetectionRenderer=function(t){this.hitDetectionRenderer_=t},t.prototype.getHitDetectionRenderer=function(){return this.hitDetectionRenderer_},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_=d,this.geometry_=t},t.prototype.setZIndex=function(t){this.zIndex_=t},t}();function u(t){var e,r;"function"==typeof t?e=t:(Array.isArray(t)?r=t:((0,s.h)("function"==typeof t.getZIndex,41),r=[t]),e=function(){return r});return e}var c=null;function h(t,e){if(!c){var r=new n.Z({color:"rgba(255,255,255,0.4)"}),o=new a.Z({color:"#3399CC",width:1.25});c=[new l({image:new i.default({fill:r,stroke:o,radius:5}),fill:r,stroke:o})]}return c}function p(){var t={},e=[255,255,255,1],r=[0,153,255,1];return t[o.Z.POLYGON]=[new l({fill:new n.Z({color:[255,255,255,.5]})})],t[o.Z.MULTI_POLYGON]=t[o.Z.POLYGON],t[o.Z.LINE_STRING]=[new l({stroke:new a.Z({color:e,width:5})}),new l({stroke:new a.Z({color:r,width:3})})],t[o.Z.MULTI_LINE_STRING]=t[o.Z.LINE_STRING],t[o.Z.CIRCLE]=t[o.Z.POLYGON].concat(t[o.Z.LINE_STRING]),t[o.Z.POINT]=[new l({image:new i.default({radius:6,fill:new n.Z({color:r}),stroke:new a.Z({color:e,width:1.5})}),zIndex:1/0})],t[o.Z.MULTI_POINT]=t[o.Z.POINT],t[o.Z.GEOMETRY_COLLECTION]=t[o.Z.POLYGON].concat(t[o.Z.LINE_STRING],t[o.Z.POINT]),t}function d(t){return t.getGeometry()}const f=l},1280:(t,e,r)=>{"use strict";r.d(e,{Z:()=>a});var i=r(1345),n=r(6313),o=r(4307);const a=function(){function t(t){var e=t||{};this.font_=e.font,this.rotation_=e.rotation,this.rotateWithView_=e.rotateWithView,this.scale_=e.scale,this.scaleArray_=(0,o.Pq)(void 0!==e.scale?e.scale:1),this.text_=e.text,this.textAlign_=e.textAlign,this.textBaseline_=e.textBaseline,this.fill_=void 0!==e.fill?e.fill:new i.Z({color:"#333"}),this.maxAngle_=void 0!==e.maxAngle?e.maxAngle:Math.PI/4,this.placement_=void 0!==e.placement?e.placement:n.Z.POINT,this.overflow_=!!e.overflow,this.stroke_=void 0!==e.stroke?e.stroke:null,this.offsetX_=void 0!==e.offsetX?e.offsetX:0,this.offsetY_=void 0!==e.offsetY?e.offsetY:0,this.backgroundFill_=e.backgroundFill?e.backgroundFill:null,this.backgroundStroke_=e.backgroundStroke?e.backgroundStroke:null,this.padding_=void 0===e.padding?null:e.padding}return t.prototype.clone=function(){var e=this.getScale();return new t({font:this.getFont(),placement:this.getPlacement(),maxAngle:this.getMaxAngle(),overflow:this.getOverflow(),rotation:this.getRotation(),rotateWithView:this.getRotateWithView(),scale:Array.isArray(e)?e.slice():e,text:this.getText(),textAlign:this.getTextAlign(),textBaseline:this.getTextBaseline(),fill:this.getFill()?this.getFill().clone():void 0,stroke:this.getStroke()?this.getStroke().clone():void 0,offsetX:this.getOffsetX(),offsetY:this.getOffsetY(),backgroundFill:this.getBackgroundFill()?this.getBackgroundFill().clone():void 0,backgroundStroke:this.getBackgroundStroke()?this.getBackgroundStroke().clone():void 0,padding:this.getPadding()||void 0})},t.prototype.getOverflow=function(){return this.overflow_},t.prototype.getFont=function(){return this.font_},t.prototype.getMaxAngle=function(){return this.maxAngle_},t.prototype.getPlacement=function(){return this.placement_},t.prototype.getOffsetX=function(){return this.offsetX_},t.prototype.getOffsetY=function(){return this.offsetY_},t.prototype.getFill=function(){return this.fill_},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.getStroke=function(){return this.stroke_},t.prototype.getText=function(){return this.text_},t.prototype.getTextAlign=function(){return this.textAlign_},t.prototype.getTextBaseline=function(){return this.textBaseline_},t.prototype.getBackgroundFill=function(){return this.backgroundFill_},t.prototype.getBackgroundStroke=function(){return this.backgroundStroke_},t.prototype.getPadding=function(){return this.padding_},t.prototype.setOverflow=function(t){this.overflow_=t},t.prototype.setFont=function(t){this.font_=t},t.prototype.setMaxAngle=function(t){this.maxAngle_=t},t.prototype.setOffsetX=function(t){this.offsetX_=t},t.prototype.setOffsetY=function(t){this.offsetY_=t},t.prototype.setPlacement=function(t){this.placement_=t},t.prototype.setRotateWithView=function(t){this.rotateWithView_=t},t.prototype.setFill=function(t){this.fill_=t},t.prototype.setRotation=function(t){this.rotation_=t},t.prototype.setScale=function(t){this.scale_=t,this.scaleArray_=(0,o.Pq)(void 0!==t?t:1)},t.prototype.setStroke=function(t){this.stroke_=t},t.prototype.setText=function(t){this.text_=t},t.prototype.setTextAlign=function(t){this.textAlign_=t},t.prototype.setTextBaseline=function(t){this.textBaseline_=t},t.prototype.setBackgroundFill=function(t){this.backgroundFill_=t},t.prototype.setBackgroundStroke=function(t){this.backgroundStroke_=t},t.prototype.setPadding=function(t){this.padding_=t},t}()},6313:(t,e,r)=>{"use strict";r.d(e,{Z:()=>i});const i={POINT:"point",LINE:"line"}},8634:(t,e,r)=>{"use strict";function i(t,e,r,i){return void 0!==i?(i[0]=t,i[1]=e,i[2]=r,i):[t,e,r]}function n(t,e,r){return t+"/"+e+"/"+r}function o(t){return n(t[0],t[1],t[2])}function a(t){var e=t.substring(t.lastIndexOf("/")+1,t.length).split(",").map(Number);return n(e[0],e[1],e[2])}function s(t){return t.split("/").map(Number)}function l(t){return(t[1]<<t[0])+t[2]}function u(t,e){var r=t[0],i=t[1],n=t[2];if(e.getMinZoom()>r||r>e.getMaxZoom())return!1;var o=e.getFullTileRange(r);return!o||o.containsXY(i,n)}r.d(e,{MY:()=>a,T9:()=>i,Ul:()=>s,km:()=>o,lg:()=>n,tE:()=>u,vp:()=>l})},7248:(t,e,r)=>{"use strict";r.d(e,{Cf:()=>h,RZ:()=>f,Tl:()=>g,X$:()=>c,dl:()=>p});var i=r(9600),n=r(8738),o=r(8375),a=r(4768),s=r(6121),l=r(8641),u=r(4307);function c(t){var e=t.getDefaultTileGrid();return e||(e=f(t),t.setDefaultTileGrid(e)),e}function h(t,e,r){var i=e[0],n=t.getTileCoordCenter(e),o=g(r);if((0,l.containsCoordinate)(o,n))return e;var a=(0,l.getWidth)(o),s=Math.ceil((o[0]-n[0])/a);return n[0]+=a*s,t.getTileCoordForCoordAndZ(n,i)}function p(t){var e=t||{},r=e.extent||(0,s.get)("EPSG:3857").getExtent(),i={extent:r,minZoom:e.minZoom,tileSize:e.tileSize,resolutions:d(r,e.maxZoom,e.tileSize,e.maxResolution)};return new n.Z(i)}function d(t,e,r,i){for(var n=void 0!==e?e:a.e,o=(0,l.getHeight)(t),s=(0,l.getWidth)(t),c=(0,u.Pq)(void 0!==r?r:a.S),h=i>0?i:Math.max(s/c[0],o/c[1]),p=n+1,d=new Array(p),f=0;f<p;++f)d[f]=h/Math.pow(2,f);return d}function f(t,e,r,o){return function(t,e,r,o){var a=void 0!==o?o:i.Z.TOP_LEFT,s=d(t,e,r);return new n.Z({extent:t,origin:(0,l.getCorner)(t,a),resolutions:s,tileSize:r})}(g(t),e,r,o)}function g(t){var e=(t=(0,s.get)(t)).getExtent();if(!e){var r=180*s.METERS_PER_UNIT[o.ZP.DEGREES]/t.getMetersPerUnit();e=(0,l.createOrUpdate)(-r,-r,r,r)}return e}},8738:(t,e,r)=>{"use strict";r.d(e,{Z:()=>p});var i=r(2519),n=r(4768),o=r(9515),a=r(3983),s=r(8641),l=r(8634),u=r(5537),c=r(4307),h=[0,0,0];const p=function(){function t(t){var e;if(this.minZoom=void 0!==t.minZoom?t.minZoom:0,this.resolutions_=t.resolutions,(0,o.h)((0,u.pT)(this.resolutions_,(function(t,e){return e-t}),!0),17),!t.origins)for(var r=0,a=this.resolutions_.length-1;r<a;++r)if(e){if(this.resolutions_[r]/this.resolutions_[r+1]!==e){e=void 0;break}}else e=this.resolutions_[r]/this.resolutions_[r+1];this.zoomFactor_=e,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,(0,o.h)(this.origins_.length==this.resolutions_.length,20));var l=t.extent;void 0===l||this.origin_||this.origins_||(this.origin_=(0,s.getTopLeft)(l)),(0,o.h)(!this.origin_&&this.origins_||this.origin_&&!this.origins_,18),this.tileSizes_=null,void 0!==t.tileSizes&&(this.tileSizes_=t.tileSizes,(0,o.h)(this.tileSizes_.length==this.resolutions_.length,19)),this.tileSize_=void 0!==t.tileSize?t.tileSize:this.tileSizes_?null:n.S,(0,o.h)(!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 r=new i.Z(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 n=this.getTileRangeForExtentAndZ(l,e);r.minX=Math.max(n.minX,r.minX),r.maxX=Math.min(n.maxX,r.maxX),r.minY=Math.max(n.minY,r.minY),r.maxY=Math.min(n.maxY,r.maxY)}return r}),this):l&&this.calculateTileRanges_(l)}return t.prototype.forEachTileCoord=function(t,e,r){for(var i=this.getTileRangeForExtentAndZ(t,e),n=i.minX,o=i.maxX;n<=o;++n)for(var a=i.minY,s=i.maxY;a<=s;++a)r([e,n,a])},t.prototype.forEachTileCoordParentTileRange=function(t,e,r,n){var o,a,s,l=null,u=t[0]-1;for(2===this.zoomFactor_?(a=t[1],s=t[2]):l=this.getTileCoordExtent(t,n);u>=this.minZoom;){if(2===this.zoomFactor_?(a=Math.floor(a/2),s=Math.floor(s/2),o=(0,i.T)(a,a,s,s,r)):o=this.getTileRangeForExtentAndZ(l,u,r),e(u,o))return!0;--u}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,r){if(t[0]<this.maxZoom){if(2===this.zoomFactor_){var n=2*t[1],o=2*t[2];return(0,i.T)(n,n+1,o,o+1,e)}var a=this.getTileCoordExtent(t,r||this.tmpExtent_);return this.getTileRangeForExtentAndZ(a,t[0]+1,e)}return null},t.prototype.getTileRangeForTileCoordAndZ=function(t,e,r){if(e>this.maxZoom||e<this.minZoom)return null;var n=t[0],o=t[1],a=t[2];if(e===n)return(0,i.T)(o,a,o,a,r);if(this.zoomFactor_){var s=Math.pow(this.zoomFactor_,e-n),l=Math.floor(o*s),u=Math.floor(a*s);if(e<n)return(0,i.T)(l,l,u,u,r);var c=Math.floor(s*(o+1))-1,h=Math.floor(s*(a+1))-1;return(0,i.T)(l,c,u,h,r)}var p=this.getTileCoordExtent(t,this.tmpExtent_);return this.getTileRangeForExtentAndZ(p,e,r)},t.prototype.getTileRangeExtent=function(t,e,r){var i=this.getOrigin(t),n=this.getResolution(t),o=(0,c.Pq)(this.getTileSize(t),this.tmpSize_),a=i[0]+e.minX*o[0]*n,l=i[0]+(e.maxX+1)*o[0]*n,u=i[1]+e.minY*o[1]*n,h=i[1]+(e.maxY+1)*o[1]*n;return(0,s.createOrUpdate)(a,u,l,h,r)},t.prototype.getTileRangeForExtentAndZ=function(t,e,r){var n=h;this.getTileCoordForXYAndZ_(t[0],t[3],e,!1,n);var o=n[1],a=n[2];return this.getTileCoordForXYAndZ_(t[2],t[1],e,!0,n),(0,i.T)(o,n[1],a,n[2],r)},t.prototype.getTileCoordCenter=function(t){var e=this.getOrigin(t[0]),r=this.getResolution(t[0]),i=(0,c.Pq)(this.getTileSize(t[0]),this.tmpSize_);return[e[0]+(t[1]+.5)*i[0]*r,e[1]-(t[2]+.5)*i[1]*r]},t.prototype.getTileCoordExtent=function(t,e){var r=this.getOrigin(t[0]),i=this.getResolution(t[0]),n=(0,c.Pq)(this.getTileSize(t[0]),this.tmpSize_),o=r[0]+t[1]*n[0]*i,a=r[1]-(t[2]+1)*n[1]*i,l=o+n[0]*i,u=a+n[1]*i;return(0,s.createOrUpdate)(o,a,l,u,e)},t.prototype.getTileCoordForCoordAndResolution=function(t,e,r){return this.getTileCoordForXYAndResolution_(t[0],t[1],e,!1,r)},t.prototype.getTileCoordForXYAndResolution_=function(t,e,r,i,n){var o=this.getZForResolution(r),s=r/this.getResolution(o),u=this.getOrigin(o),h=(0,c.Pq)(this.getTileSize(o),this.tmpSize_),p=s*(t-u[0])/r/h[0],d=s*(u[1]-e)/r/h[1];return i?(p=(0,a.mD)(p,5)-1,d=(0,a.mD)(d,5)-1):(p=(0,a.GW)(p,5),d=(0,a.GW)(d,5)),(0,l.T9)(o,p,d,n)},t.prototype.getTileCoordForXYAndZ_=function(t,e,r,i,n){var o=this.getOrigin(r),s=this.getResolution(r),u=(0,c.Pq)(this.getTileSize(r),this.tmpSize_),h=(t-o[0])/s/u[0],p=(o[1]-e)/s/u[1];return i?(h=(0,a.mD)(h,5)-1,p=(0,a.mD)(p,5)-1):(h=(0,a.GW)(h,5),p=(0,a.GW)(p,5)),(0,l.T9)(r,h,p,n)},t.prototype.getTileCoordForCoordAndZ=function(t,e,r){return this.getTileCoordForXYAndZ_(t[0],t[1],e,!1,r)},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){var r=(0,u.h7)(this.resolutions_,t,e||0);return(0,a.uZ)(r,this.minZoom,this.maxZoom)},t.prototype.calculateTileRanges_=function(t){for(var e=this.resolutions_.length,r=new Array(e),i=this.minZoom;i<e;++i)r[i]=this.getTileRangeForExtentAndZ(t,i);this.fullTileRanges_=r},t}()},4768:(t,e,r)=>{"use strict";r.d(e,{S:()=>n,e:()=>i});var i=42,n=256},7848:(t,e,r)=>{"use strict";r.d(e,{Gk:()=>c,Un:()=>l,uR:()=>s,vU:()=>u});var i=r(9515),n=r(3983),o=r(8634);function a(t,e){var r=/\{z\}/g,n=/\{x\}/g,o=/\{y\}/g,a=/\{-y\}/g;return function(s,l,u){return s?t.replace(r,s[0].toString()).replace(n,s[1].toString()).replace(o,s[2].toString()).replace(a,(function(){var t=s[0],r=e.getFullTileRange(t);return(0,i.h)(r,55),(r.getHeight()-s[2]-1).toString()})):void 0}}function s(t,e){for(var r=t.length,i=new Array(r),n=0;n<r;++n)i[n]=a(t[n],e);return l(i)}function l(t){return 1===t.length?t[0]:function(e,r,i){if(e){var a=(0,o.vp)(e),s=(0,n.$W)(a,t.length);return t[s](e,r,i)}}}function u(t,e,r){}function c(t){var e=[],r=/\{([a-z])-([a-z])\}/.exec(t);if(r){var i=r[1].charCodeAt(0),n=r[2].charCodeAt(0),o=void 0;for(o=i;o<=n;++o)e.push(t.replace(r[0],String.fromCharCode(o)));return e}if(r=/\{(\d+)-(\d+)\}/.exec(t)){for(var a=parseInt(r[2],10),s=parseInt(r[1],10);s<=a;s++)e.push(t.replace(r[0],s.toString()));return e}return e.push(t),e}},6101:(t,e,r)=>{"use strict";r.d(e,{BB:()=>_,Iu:()=>y,Jp:()=>u,U1:()=>d,Ue:()=>s,bA:()=>f,lk:()=>h,mc:()=>l,n3:()=>g,nb:()=>v,nn:()=>p,qC:()=>m});var i,n=r(177),o=r(9515),a=new Array(6);function s(){return[1,0,0,1,0,0]}function l(t){return c(t,1,0,0,1,0,0)}function u(t,e){var r=t[0],i=t[1],n=t[2],o=t[3],a=t[4],s=t[5],l=e[0],u=e[1],c=e[2],h=e[3],p=e[4],d=e[5];return t[0]=r*l+n*u,t[1]=i*l+o*u,t[2]=r*c+n*h,t[3]=i*c+o*h,t[4]=r*p+n*d+a,t[5]=i*p+o*d+s,t}function c(t,e,r,i,n,o,a){return t[0]=e,t[1]=r,t[2]=i,t[3]=n,t[4]=o,t[5]=a,t}function h(t,e){return t[0]=e[0],t[1]=e[1],t[2]=e[2],t[3]=e[3],t[4]=e[4],t[5]=e[5],t}function p(t,e){var r=e[0],i=e[1];return e[0]=t[0]*r+t[2]*i+t[4],e[1]=t[1]*r+t[3]*i+t[5],e}function d(t,e){var r=Math.cos(e),i=Math.sin(e);return u(t,c(a,r,i,-i,r,0,0))}function f(t,e,r){return u(t,c(a,e,0,0,r,0,0))}function g(t,e,r){return c(t,e,0,0,r,0,0)}function y(t,e,r){return u(t,c(a,1,0,0,1,e,r))}function m(t,e,r,i,n,o,a,s){var l=Math.sin(o),u=Math.cos(o);return t[0]=i*u,t[1]=n*l,t[2]=-i*l,t[3]=n*u,t[4]=a*i*u-s*i*l+e,t[5]=a*n*l+s*n*u+r,t}function v(t,e){var r,i=(r=e)[0]*r[3]-r[1]*r[2];(0,o.h)(0!==i,32);var n=e[0],a=e[1],s=e[2],l=e[3],u=e[4],c=e[5];return t[0]=l/i,t[1]=-a/i,t[2]=-s/i,t[3]=n/i,t[4]=(s*c-l*u)/i,t[5]=-(n*c-a*u)/i,t}function _(t){var e="matrix("+t.join(", ")+")";if(n.Id)return e;var r=i||(i=document.createElement("div"));return r.style.transform=e,r.style.transform}},4187:(t,e,r)=>{"use strict";function i(){return function(){throw new Error("Unimplemented abstract method.")}()}r.d(e,{O3:()=>i,q4:()=>a,sq:()=>o});var n=0;function o(t){return t.ol_uid||(t.ol_uid=String(++n))}var a="6.14.1"}},i={};function n(t){var e=i[t];if(void 0!==e)return e.exports;var o=i[t]={exports:{}};return r[t].call(o.exports,o,o.exports,n),o.exports}n.m=r,n.n=t=>{var e=t&&t.__esModule?()=>t.default:()=>t;return n.d(e,{a:e}),e},n.d=(t,e)=>{for(var r in e)n.o(e,r)&&!n.o(t,r)&&Object.defineProperty(t,r,{enumerable:!0,get:e[r]})},n.f={},n.e=t=>Promise.all(Object.keys(n.f).reduce(((e,r)=>(n.f[r](t,e),e)),[])),n.u=t=>t+".js",n.g=function(){if("object"==typeof globalThis)return globalThis;try{return this||new Function("return this")()}catch(t){if("object"==typeof window)return window}}(),n.o=(t,e)=>Object.prototype.hasOwnProperty.call(t,e),t={},e="flag:",n.l=(r,i,o,a)=>{if(t[r])t[r].push(i);else{var s,l;if(void 0!==o)for(var u=document.getElementsByTagName("script"),c=0;c<u.length;c++){var h=u[c];if(h.getAttribute("src")==r||h.getAttribute("data-webpack")==e+o){s=h;break}}s||(l=!0,(s=document.createElement("script")).charset="utf-8",s.timeout=120,n.nc&&s.setAttribute("nonce",n.nc),s.setAttribute("data-webpack",e+o),s.src=r),t[r]=[i];var p=(e,i)=>{s.onerror=s.onload=null,clearTimeout(d);var n=t[r];if(delete t[r],s.parentNode&&s.parentNode.removeChild(s),n&&n.forEach((t=>t(i))),e)return e(i)},d=setTimeout(p.bind(null,void 0,{type:"timeout",target:s}),12e4);s.onerror=p.bind(null,s.onerror),s.onload=p.bind(null,s.onload),l&&document.head.appendChild(s)}},n.r=t=>{"undefined"!=typeof Symbol&&Symbol.toStringTag&&Object.defineProperty(t,Symbol.toStringTag,{value:"Module"}),Object.defineProperty(t,"__esModule",{value:!0})},(()=>{var t;n.g.importScripts&&(t=n.g.location+"");var e=n.g.document;if(!t&&e&&(e.currentScript&&(t=e.currentScript.src),!t)){var r=e.getElementsByTagName("script");r.length&&(t=r[r.length-1].src)}if(!t)throw new Error("Automatic publicPath is not supported in this browser");t=t.replace(/#.*$/,"").replace(/\?.*$/,"").replace(/\/[^\/]+$/,"/"),n.p=t+"../"})(),(()=>{var t={774:0};n.f.j=(e,r)=>{var i=n.o(t,e)?t[e]:void 0;if(0!==i)if(i)r.push(i[2]);else{var o=new Promise(((r,n)=>i=t[e]=[r,n]));r.push(i[2]=o);var a=n.p+n.u(e),s=new Error;n.l(a,(r=>{if(n.o(t,e)&&(0!==(i=t[e])&&(t[e]=void 0),i)){var o=r&&("load"===r.type?"missing":r.type),a=r&&r.target&&r.target.src;s.message="Loading chunk "+e+" failed.\n("+o+": "+a+")",s.name="ChunkLoadError",s.type=o,s.request=a,i[1](s)}}),"chunk-"+e,e)}};var e=(e,r)=>{var i,o,[a,s,l]=r,u=0;if(a.some((e=>0!==t[e]))){for(i in s)n.o(s,i)&&(n.m[i]=s[i]);l&&l(n)}for(e&&e(r);u<a.length;u++)o=a[u],n.o(t,o)&&t[o]&&t[o][0](),t[o]=0},r=self.webpackChunkflag=self.webpackChunkflag||[];r.forEach(e.bind(null,0)),r.push=e.bind(null,r.push.bind(r))})(),(()=>{"use strict";var t=n(4559);!function(e,r,i){r.behaviors.openlayers_field={attach:function(r,i){e(r).find('div[data-map="openlayers"]:not([data-inited="true"])').each((function(){e(this).attr("data-inited","true");var r=document.location.href.split("?"),i=null;2===r.length&&(i=r[1].replace(/_format=json&/,"")),new t.OpenlayerMap(e(this).prop("id"),i).init()}))}}}(jQuery,Drupal,drupalSettings)})()})();
\ No newline at end of file
+(()=>{var t,e,i={9187:t=>{"use strict";function e(t,e,n){n=n||2;var s,o,a,l,c,d,p,f=e&&e.length,m=f?e[0]*n:t.length,_=i(t,0,m,n,!0),y=[];if(!_||_.next===_.prev)return y;if(f&&(_=function(t,e,n,r){var s,o,a,l=[];for(s=0,o=e.length;s<o;s++)(a=i(t,e[s]*r,s<o-1?e[s+1]*r:t.length,r,!1))===a.next&&(a.steiner=!0),l.push(g(a));for(l.sort(h),s=0;s<l.length;s++)n=u(l[s],n);return n}(t,e,_,n)),t.length>80*n){s=a=t[0],o=l=t[1];for(var v=n;v<m;v+=n)(c=t[v])<s&&(s=c),(d=t[v+1])<o&&(o=d),c>a&&(a=c),d>l&&(l=d);p=0!==(p=Math.max(a-s,l-o))?32767/p:0}return r(_,y,n,s,o,p,0),y}function i(t,e,i,n,r){var s,o;if(r===C(t,e,i,n)>0)for(s=e;s<i;s+=n)o=w(s,t[s],t[s+1],o);else for(s=i-n;s>=e;s-=n)o=w(s,t[s],t[s+1],o);return o&&_(o,o.next)&&(S(o),o=o.next),o}function n(t,e){if(!t)return t;e||(e=t);var i,n=t;do{if(i=!1,n.steiner||!_(n,n.next)&&0!==m(n.prev,n,n.next))n=n.next;else{if(S(n),(n=e=n.prev)===n.next)break;i=!0}}while(i||n!==e);return e}function r(t,e,i,h,u,c,g){if(t){!g&&c&&function(t,e,i,n){var r=t;do{0===r.z&&(r.z=d(r.x,r.y,e,i,n)),r.prevZ=r.prev,r.nextZ=r.next,r=r.next}while(r!==t);r.prevZ.nextZ=null,r.prevZ=null,function(t){var e,i,n,r,s,o,a,l,h=1;do{for(i=t,t=null,s=null,o=0;i;){for(o++,n=i,a=0,e=0;e<h&&(a++,n=n.nextZ);e++);for(l=h;a>0||l>0&&n;)0!==a&&(0===l||!n||i.z<=n.z)?(r=i,i=i.nextZ,a--):(r=n,n=n.nextZ,l--),s?s.nextZ=r:t=r,r.prevZ=s,s=r;i=n}s.nextZ=null,h*=2}while(o>1)}(r)}(t,h,u,c);for(var p,f,m=t;t.prev!==t.next;)if(p=t.prev,f=t.next,c?o(t,h,u,c):s(t))e.push(p.i/i|0),e.push(t.i/i|0),e.push(f.i/i|0),S(t),t=f.next,m=f.next;else if((t=f)===m){g?1===g?r(t=a(n(t),e,i),e,i,h,u,c,2):2===g&&l(t,e,i,h,u,c):r(n(t),e,i,h,u,c,1);break}}}function s(t){var e=t.prev,i=t,n=t.next;if(m(e,i,n)>=0)return!1;for(var r=e.x,s=i.x,o=n.x,a=e.y,l=i.y,h=n.y,u=r<s?r<o?r:o:s<o?s:o,c=a<l?a<h?a:h:l<h?l:h,d=r>s?r>o?r:o:s>o?s:o,g=a>l?a>h?a:h:l>h?l:h,f=n.next;f!==e;){if(f.x>=u&&f.x<=d&&f.y>=c&&f.y<=g&&p(r,a,s,l,o,h,f.x,f.y)&&m(f.prev,f,f.next)>=0)return!1;f=f.next}return!0}function o(t,e,i,n){var r=t.prev,s=t,o=t.next;if(m(r,s,o)>=0)return!1;for(var a=r.x,l=s.x,h=o.x,u=r.y,c=s.y,g=o.y,f=a<l?a<h?a:h:l<h?l:h,_=u<c?u<g?u:g:c<g?c:g,y=a>l?a>h?a:h:l>h?l:h,v=u>c?u>g?u:g:c>g?c:g,x=d(f,_,e,i,n),E=d(y,v,e,i,n),b=t.prevZ,w=t.nextZ;b&&b.z>=x&&w&&w.z<=E;){if(b.x>=f&&b.x<=y&&b.y>=_&&b.y<=v&&b!==r&&b!==o&&p(a,u,l,c,h,g,b.x,b.y)&&m(b.prev,b,b.next)>=0)return!1;if(b=b.prevZ,w.x>=f&&w.x<=y&&w.y>=_&&w.y<=v&&w!==r&&w!==o&&p(a,u,l,c,h,g,w.x,w.y)&&m(w.prev,w,w.next)>=0)return!1;w=w.nextZ}for(;b&&b.z>=x;){if(b.x>=f&&b.x<=y&&b.y>=_&&b.y<=v&&b!==r&&b!==o&&p(a,u,l,c,h,g,b.x,b.y)&&m(b.prev,b,b.next)>=0)return!1;b=b.prevZ}for(;w&&w.z<=E;){if(w.x>=f&&w.x<=y&&w.y>=_&&w.y<=v&&w!==r&&w!==o&&p(a,u,l,c,h,g,w.x,w.y)&&m(w.prev,w,w.next)>=0)return!1;w=w.nextZ}return!0}function a(t,e,i){var r=t;do{var s=r.prev,o=r.next.next;!_(s,o)&&y(s,r,r.next,o)&&E(s,o)&&E(o,s)&&(e.push(s.i/i|0),e.push(r.i/i|0),e.push(o.i/i|0),S(r),S(r.next),r=t=o),r=r.next}while(r!==t);return n(r)}function l(t,e,i,s,o,a){var l=t;do{for(var h=l.next.next;h!==l.prev;){if(l.i!==h.i&&f(l,h)){var u=b(l,h);return l=n(l,l.next),u=n(u,u.next),r(l,e,i,s,o,a,0),void r(u,e,i,s,o,a,0)}h=h.next}l=l.next}while(l!==t)}function h(t,e){return t.x-e.x}function u(t,e){var i=function(t,e){var i,n=e,r=t.x,s=t.y,o=-1/0;do{if(s<=n.y&&s>=n.next.y&&n.next.y!==n.y){var a=n.x+(s-n.y)*(n.next.x-n.x)/(n.next.y-n.y);if(a<=r&&a>o&&(o=a,i=n.x<n.next.x?n:n.next,a===r))return i}n=n.next}while(n!==e);if(!i)return null;var l,h=i,u=i.x,d=i.y,g=1/0;n=i;do{r>=n.x&&n.x>=u&&r!==n.x&&p(s<d?r:o,s,u,d,s<d?o:r,s,n.x,n.y)&&(l=Math.abs(s-n.y)/(r-n.x),E(n,t)&&(l<g||l===g&&(n.x>i.x||n.x===i.x&&c(i,n)))&&(i=n,g=l)),n=n.next}while(n!==h);return i}(t,e);if(!i)return e;var r=b(i,t);return n(r,r.next),n(i,i.next)}function c(t,e){return m(t.prev,t,e.prev)<0&&m(e.next,t,t.next)<0}function d(t,e,i,n,r){return(t=1431655765&((t=858993459&((t=252645135&((t=16711935&((t=(t-i)*r|0)|t<<8))|t<<4))|t<<2))|t<<1))|(e=1431655765&((e=858993459&((e=252645135&((e=16711935&((e=(e-n)*r|0)|e<<8))|e<<4))|e<<2))|e<<1))<<1}function g(t){var e=t,i=t;do{(e.x<i.x||e.x===i.x&&e.y<i.y)&&(i=e),e=e.next}while(e!==t);return i}function p(t,e,i,n,r,s,o,a){return(r-o)*(e-a)>=(t-o)*(s-a)&&(t-o)*(n-a)>=(i-o)*(e-a)&&(i-o)*(s-a)>=(r-o)*(n-a)}function f(t,e){return t.next.i!==e.i&&t.prev.i!==e.i&&!function(t,e){var i=t;do{if(i.i!==t.i&&i.next.i!==t.i&&i.i!==e.i&&i.next.i!==e.i&&y(i,i.next,t,e))return!0;i=i.next}while(i!==t);return!1}(t,e)&&(E(t,e)&&E(e,t)&&function(t,e){var i=t,n=!1,r=(t.x+e.x)/2,s=(t.y+e.y)/2;do{i.y>s!=i.next.y>s&&i.next.y!==i.y&&r<(i.next.x-i.x)*(s-i.y)/(i.next.y-i.y)+i.x&&(n=!n),i=i.next}while(i!==t);return n}(t,e)&&(m(t.prev,t,e.prev)||m(t,e.prev,e))||_(t,e)&&m(t.prev,t,t.next)>0&&m(e.prev,e,e.next)>0)}function m(t,e,i){return(e.y-t.y)*(i.x-e.x)-(e.x-t.x)*(i.y-e.y)}function _(t,e){return t.x===e.x&&t.y===e.y}function y(t,e,i,n){var r=x(m(t,e,i)),s=x(m(t,e,n)),o=x(m(i,n,t)),a=x(m(i,n,e));return r!==s&&o!==a||!(0!==r||!v(t,i,e))||!(0!==s||!v(t,n,e))||!(0!==o||!v(i,t,n))||!(0!==a||!v(i,e,n))}function v(t,e,i){return e.x<=Math.max(t.x,i.x)&&e.x>=Math.min(t.x,i.x)&&e.y<=Math.max(t.y,i.y)&&e.y>=Math.min(t.y,i.y)}function x(t){return t>0?1:t<0?-1:0}function E(t,e){return m(t.prev,t,t.next)<0?m(t,e,t.next)>=0&&m(t,t.prev,e)>=0:m(t,e,t.prev)<0||m(t,t.next,e)<0}function b(t,e){var i=new T(t.i,t.x,t.y),n=new T(e.i,e.x,e.y),r=t.next,s=e.prev;return t.next=e,e.prev=t,i.next=r,r.prev=i,n.next=i,i.prev=n,s.next=n,n.prev=s,n}function w(t,e,i,n){var r=new T(t,e,i);return n?(r.next=n.next,r.prev=n,n.next.prev=r,n.next=r):(r.prev=r,r.next=r),r}function S(t){t.next.prev=t.prev,t.prev.next=t.next,t.prevZ&&(t.prevZ.nextZ=t.nextZ),t.nextZ&&(t.nextZ.prevZ=t.prevZ)}function T(t,e,i){this.i=t,this.x=e,this.y=i,this.prev=null,this.next=null,this.z=0,this.prevZ=null,this.nextZ=null,this.steiner=!1}function C(t,e,i,n){for(var r=0,s=e,o=i-n;s<i;s+=n)r+=(t[o]-t[s])*(t[s+1]+t[o+1]),o=s;return r}t.exports=e,t.exports.default=e,e.deviation=function(t,e,i,n){var r=e&&e.length,s=r?e[0]*i:t.length,o=Math.abs(C(t,0,s,i));if(r)for(var a=0,l=e.length;a<l;a++){var h=e[a]*i,u=a<l-1?e[a+1]*i:t.length;o-=Math.abs(C(t,h,u,i))}var c=0;for(a=0;a<n.length;a+=3){var d=n[a]*i,g=n[a+1]*i,p=n[a+2]*i;c+=Math.abs((t[d]-t[p])*(t[g+1]-t[d+1])-(t[d]-t[g])*(t[p+1]-t[d+1]))}return 0===o&&0===c?0:Math.abs((c-o)/o)},e.flatten=function(t){for(var e=t[0][0].length,i={vertices:[],holes:[],dimensions:e},n=0,r=0;r<t.length;r++){for(var s=0;s<t[r].length;s++)for(var o=0;o<e;o++)i.vertices.push(t[r][s][o]);r>0&&(n+=t[r-1].length,i.holes.push(n))}return i}},645:(t,e)=>{e.read=function(t,e,i,n,r){var s,o,a=8*r-n-1,l=(1<<a)-1,h=l>>1,u=-7,c=i?r-1:0,d=i?-1:1,g=t[e+c];for(c+=d,s=g&(1<<-u)-1,g>>=-u,u+=a;u>0;s=256*s+t[e+c],c+=d,u-=8);for(o=s&(1<<-u)-1,s>>=-u,u+=n;u>0;o=256*o+t[e+c],c+=d,u-=8);if(0===s)s=1-h;else{if(s===l)return o?NaN:1/0*(g?-1:1);o+=Math.pow(2,n),s-=h}return(g?-1:1)*o*Math.pow(2,s-n)},e.write=function(t,e,i,n,r,s){var o,a,l,h=8*s-r-1,u=(1<<h)-1,c=u>>1,d=23===r?Math.pow(2,-24)-Math.pow(2,-77):0,g=n?0:s-1,p=n?1:-1,f=e<0||0===e&&1/e<0?1:0;for(e=Math.abs(e),isNaN(e)||e===1/0?(a=isNaN(e)?1:0,o=u):(o=Math.floor(Math.log(e)/Math.LN2),e*(l=Math.pow(2,-o))<1&&(o--,l*=2),(e+=o+c>=1?d/l:d*Math.pow(2,1-c))*l>=2&&(o++,l/=2),o+c>=u?(a=0,o=u):o+c>=1?(a=(e*l-1)*Math.pow(2,r),o+=c):(a=e*Math.pow(2,c-1)*Math.pow(2,r),o=0));r>=8;t[i+g]=255&a,g+=p,a/=256,r-=8);for(o=o<<r|a,h+=r;h>0;t[i+g]=255&o,g+=p,o/=256,h-=8);t[i+g-p]|=128*f}},4514:(t,e,i)=>{"use strict";function n(t,e={}){e.sorted||t.sort(s);const i=t.length,n=new Array(2*i);for(var o=0,a=0;a<i;a++){const e=t[a];for(;o>=2&&r(n[o-2],n[o-1],e)<=0;)o--;n[o++]=e}const l=o+1;for(a=i-2;a>=0;a--){const e=t[a];for(;o>=l&&r(n[o-2],n[o-1],e)<=0;)o--;n[o++]=e}return n.slice(0,o-1)}function r(t,e,i){return(e[1]-t[1])*(i[0]-t[0])-(e[0]-t[0])*(i[1]-t[1])}function s(t,e){return t[0]===e[0]?t[1]-e[1]:t[0]-e[0]}i.r(e),i.d(e,{default:()=>n})},3614:(t,e,i)=>{"use strict";t.exports=r;var n=i(645);function r(t){this.buf=ArrayBuffer.isView&&ArrayBuffer.isView(t)?t:new Uint8Array(t||0),this.pos=0,this.type=0,this.length=this.buf.length}r.Varint=0,r.Fixed64=1,r.Bytes=2,r.Fixed32=5;var s=4294967296,o=1/s,a="undefined"==typeof TextDecoder?null:new TextDecoder("utf8");function l(t){return t.type===r.Bytes?t.readVarint()+t.pos:t.pos+1}function h(t,e,i){return i?4294967296*e+(t>>>0):4294967296*(e>>>0)+(t>>>0)}function u(t,e,i){var n=e<=16383?1:e<=2097151?2:e<=268435455?3:Math.floor(Math.log(e)/(7*Math.LN2));i.realloc(n);for(var r=i.pos-1;r>=t;r--)i.buf[r+n]=i.buf[r]}function c(t,e){for(var i=0;i<t.length;i++)e.writeVarint(t[i])}function d(t,e){for(var i=0;i<t.length;i++)e.writeSVarint(t[i])}function g(t,e){for(var i=0;i<t.length;i++)e.writeFloat(t[i])}function p(t,e){for(var i=0;i<t.length;i++)e.writeDouble(t[i])}function f(t,e){for(var i=0;i<t.length;i++)e.writeBoolean(t[i])}function m(t,e){for(var i=0;i<t.length;i++)e.writeFixed32(t[i])}function _(t,e){for(var i=0;i<t.length;i++)e.writeSFixed32(t[i])}function y(t,e){for(var i=0;i<t.length;i++)e.writeFixed64(t[i])}function v(t,e){for(var i=0;i<t.length;i++)e.writeSFixed64(t[i])}function x(t,e){return(t[e]|t[e+1]<<8|t[e+2]<<16)+16777216*t[e+3]}function E(t,e,i){t[i]=e,t[i+1]=e>>>8,t[i+2]=e>>>16,t[i+3]=e>>>24}function b(t,e){return(t[e]|t[e+1]<<8|t[e+2]<<16)+(t[e+3]<<24)}r.prototype={destroy:function(){this.buf=null},readFields:function(t,e,i){for(i=i||this.length;this.pos<i;){var n=this.readVarint(),r=n>>3,s=this.pos;this.type=7&n,t(r,e,this),this.pos===s&&this.skip(n)}return e},readMessage:function(t,e){return this.readFields(t,e,this.readVarint()+this.pos)},readFixed32:function(){var t=x(this.buf,this.pos);return this.pos+=4,t},readSFixed32:function(){var t=b(this.buf,this.pos);return this.pos+=4,t},readFixed64:function(){var t=x(this.buf,this.pos)+x(this.buf,this.pos+4)*s;return this.pos+=8,t},readSFixed64:function(){var t=x(this.buf,this.pos)+b(this.buf,this.pos+4)*s;return this.pos+=8,t},readFloat:function(){var t=n.read(this.buf,this.pos,!0,23,4);return this.pos+=4,t},readDouble:function(){var t=n.read(this.buf,this.pos,!0,52,8);return this.pos+=8,t},readVarint:function(t){var e,i,n=this.buf;return e=127&(i=n[this.pos++]),i<128?e:(e|=(127&(i=n[this.pos++]))<<7,i<128?e:(e|=(127&(i=n[this.pos++]))<<14,i<128?e:(e|=(127&(i=n[this.pos++]))<<21,i<128?e:function(t,e,i){var n,r,s=i.buf;if(n=(112&(r=s[i.pos++]))>>4,r<128)return h(t,n,e);if(n|=(127&(r=s[i.pos++]))<<3,r<128)return h(t,n,e);if(n|=(127&(r=s[i.pos++]))<<10,r<128)return h(t,n,e);if(n|=(127&(r=s[i.pos++]))<<17,r<128)return h(t,n,e);if(n|=(127&(r=s[i.pos++]))<<24,r<128)return h(t,n,e);if(n|=(1&(r=s[i.pos++]))<<31,r<128)return h(t,n,e);throw new Error("Expected varint not more than 10 bytes")}(e|=(15&(i=n[this.pos]))<<28,t,this))))},readVarint64:function(){return this.readVarint(!0)},readSVarint:function(){var t=this.readVarint();return t%2==1?(t+1)/-2:t/2},readBoolean:function(){return Boolean(this.readVarint())},readString:function(){var t=this.readVarint()+this.pos,e=this.pos;return this.pos=t,t-e>=12&&a?function(t,e,i){return a.decode(t.subarray(e,i))}(this.buf,e,t):function(t,e,i){for(var n="",r=e;r<i;){var s,o,a,l=t[r],h=null,u=l>239?4:l>223?3:l>191?2:1;if(r+u>i)break;1===u?l<128&&(h=l):2===u?128==(192&(s=t[r+1]))&&(h=(31&l)<<6|63&s)<=127&&(h=null):3===u?(s=t[r+1],o=t[r+2],128==(192&s)&&128==(192&o)&&((h=(15&l)<<12|(63&s)<<6|63&o)<=2047||h>=55296&&h<=57343)&&(h=null)):4===u&&(s=t[r+1],o=t[r+2],a=t[r+3],128==(192&s)&&128==(192&o)&&128==(192&a)&&((h=(15&l)<<18|(63&s)<<12|(63&o)<<6|63&a)<=65535||h>=1114112)&&(h=null)),null===h?(h=65533,u=1):h>65535&&(h-=65536,n+=String.fromCharCode(h>>>10&1023|55296),h=56320|1023&h),n+=String.fromCharCode(h),r+=u}return n}(this.buf,e,t)},readBytes:function(){var t=this.readVarint()+this.pos,e=this.buf.subarray(this.pos,t);return this.pos=t,e},readPackedVarint:function(t,e){if(this.type!==r.Bytes)return t.push(this.readVarint(e));var i=l(this);for(t=t||[];this.pos<i;)t.push(this.readVarint(e));return t},readPackedSVarint:function(t){if(this.type!==r.Bytes)return t.push(this.readSVarint());var e=l(this);for(t=t||[];this.pos<e;)t.push(this.readSVarint());return t},readPackedBoolean:function(t){if(this.type!==r.Bytes)return t.push(this.readBoolean());var e=l(this);for(t=t||[];this.pos<e;)t.push(this.readBoolean());return t},readPackedFloat:function(t){if(this.type!==r.Bytes)return t.push(this.readFloat());var e=l(this);for(t=t||[];this.pos<e;)t.push(this.readFloat());return t},readPackedDouble:function(t){if(this.type!==r.Bytes)return t.push(this.readDouble());var e=l(this);for(t=t||[];this.pos<e;)t.push(this.readDouble());return t},readPackedFixed32:function(t){if(this.type!==r.Bytes)return t.push(this.readFixed32());var e=l(this);for(t=t||[];this.pos<e;)t.push(this.readFixed32());return t},readPackedSFixed32:function(t){if(this.type!==r.Bytes)return t.push(this.readSFixed32());var e=l(this);for(t=t||[];this.pos<e;)t.push(this.readSFixed32());return t},readPackedFixed64:function(t){if(this.type!==r.Bytes)return t.push(this.readFixed64());var e=l(this);for(t=t||[];this.pos<e;)t.push(this.readFixed64());return t},readPackedSFixed64:function(t){if(this.type!==r.Bytes)return t.push(this.readSFixed64());var e=l(this);for(t=t||[];this.pos<e;)t.push(this.readSFixed64());return t},skip:function(t){var e=7&t;if(e===r.Varint)for(;this.buf[this.pos++]>127;);else if(e===r.Bytes)this.pos=this.readVarint()+this.pos;else if(e===r.Fixed32)this.pos+=4;else{if(e!==r.Fixed64)throw new Error("Unimplemented type: "+e);this.pos+=8}},writeTag:function(t,e){this.writeVarint(t<<3|e)},realloc:function(t){for(var e=this.length||16;e<this.pos+t;)e*=2;if(e!==this.length){var i=new Uint8Array(e);i.set(this.buf),this.buf=i,this.length=e}},finish:function(){return this.length=this.pos,this.pos=0,this.buf.subarray(0,this.length)},writeFixed32:function(t){this.realloc(4),E(this.buf,t,this.pos),this.pos+=4},writeSFixed32:function(t){this.realloc(4),E(this.buf,t,this.pos),this.pos+=4},writeFixed64:function(t){this.realloc(8),E(this.buf,-1&t,this.pos),E(this.buf,Math.floor(t*o),this.pos+4),this.pos+=8},writeSFixed64:function(t){this.realloc(8),E(this.buf,-1&t,this.pos),E(this.buf,Math.floor(t*o),this.pos+4),this.pos+=8},writeVarint:function(t){(t=+t||0)>268435455||t<0?function(t,e){var i,n;if(t>=0?(i=t%4294967296|0,n=t/4294967296|0):(n=~(-t/4294967296),4294967295^(i=~(-t%4294967296))?i=i+1|0:(i=0,n=n+1|0)),t>=0x10000000000000000||t<-0x10000000000000000)throw new Error("Given varint doesn't fit into 10 bytes");e.realloc(10),function(t,e,i){i.buf[i.pos++]=127&t|128,t>>>=7,i.buf[i.pos++]=127&t|128,t>>>=7,i.buf[i.pos++]=127&t|128,t>>>=7,i.buf[i.pos++]=127&t|128,t>>>=7,i.buf[i.pos]=127&t}(i,0,e),function(t,e){var i=(7&t)<<4;e.buf[e.pos++]|=i|((t>>>=3)?128:0),t&&(e.buf[e.pos++]=127&t|((t>>>=7)?128:0),t&&(e.buf[e.pos++]=127&t|((t>>>=7)?128:0),t&&(e.buf[e.pos++]=127&t|((t>>>=7)?128:0),t&&(e.buf[e.pos++]=127&t|((t>>>=7)?128:0),t&&(e.buf[e.pos++]=127&t)))))}(n,e)}(t,this):(this.realloc(4),this.buf[this.pos++]=127&t|(t>127?128:0),t<=127||(this.buf[this.pos++]=127&(t>>>=7)|(t>127?128:0),t<=127||(this.buf[this.pos++]=127&(t>>>=7)|(t>127?128:0),t<=127||(this.buf[this.pos++]=t>>>7&127))))},writeSVarint:function(t){this.writeVarint(t<0?2*-t-1:2*t)},writeBoolean:function(t){this.writeVarint(Boolean(t))},writeString:function(t){t=String(t),this.realloc(4*t.length),this.pos++;var e=this.pos;this.pos=function(t,e,i){for(var n,r,s=0;s<e.length;s++){if((n=e.charCodeAt(s))>55295&&n<57344){if(!r){n>56319||s+1===e.length?(t[i++]=239,t[i++]=191,t[i++]=189):r=n;continue}if(n<56320){t[i++]=239,t[i++]=191,t[i++]=189,r=n;continue}n=r-55296<<10|n-56320|65536,r=null}else r&&(t[i++]=239,t[i++]=191,t[i++]=189,r=null);n<128?t[i++]=n:(n<2048?t[i++]=n>>6|192:(n<65536?t[i++]=n>>12|224:(t[i++]=n>>18|240,t[i++]=n>>12&63|128),t[i++]=n>>6&63|128),t[i++]=63&n|128)}return i}(this.buf,t,this.pos);var i=this.pos-e;i>=128&&u(e,i,this),this.pos=e-1,this.writeVarint(i),this.pos+=i},writeFloat:function(t){this.realloc(4),n.write(this.buf,t,this.pos,!0,23,4),this.pos+=4},writeDouble:function(t){this.realloc(8),n.write(this.buf,t,this.pos,!0,52,8),this.pos+=8},writeBytes:function(t){var e=t.length;this.writeVarint(e),this.realloc(e);for(var i=0;i<e;i++)this.buf[this.pos++]=t[i]},writeRawMessage:function(t,e){this.pos++;var i=this.pos;t(e,this);var n=this.pos-i;n>=128&&u(i,n,this),this.pos=i-1,this.writeVarint(n),this.pos+=n},writeMessage:function(t,e,i){this.writeTag(t,r.Bytes),this.writeRawMessage(e,i)},writePackedVarint:function(t,e){e.length&&this.writeMessage(t,c,e)},writePackedSVarint:function(t,e){e.length&&this.writeMessage(t,d,e)},writePackedBoolean:function(t,e){e.length&&this.writeMessage(t,f,e)},writePackedFloat:function(t,e){e.length&&this.writeMessage(t,g,e)},writePackedDouble:function(t,e){e.length&&this.writeMessage(t,p,e)},writePackedFixed32:function(t,e){e.length&&this.writeMessage(t,m,e)},writePackedSFixed32:function(t,e){e.length&&this.writeMessage(t,_,e)},writePackedFixed64:function(t,e){e.length&&this.writeMessage(t,y,e)},writePackedSFixed64:function(t,e){e.length&&this.writeMessage(t,v,e)},writeBytesField:function(t,e){this.writeTag(t,r.Bytes),this.writeBytes(e)},writeFixed32Field:function(t,e){this.writeTag(t,r.Fixed32),this.writeFixed32(e)},writeSFixed32Field:function(t,e){this.writeTag(t,r.Fixed32),this.writeSFixed32(e)},writeFixed64Field:function(t,e){this.writeTag(t,r.Fixed64),this.writeFixed64(e)},writeSFixed64Field:function(t,e){this.writeTag(t,r.Fixed64),this.writeSFixed64(e)},writeVarintField:function(t,e){this.writeTag(t,r.Varint),this.writeVarint(e)},writeSVarintField:function(t,e){this.writeTag(t,r.Varint),this.writeSVarint(e)},writeStringField:function(t,e){this.writeTag(t,r.Bytes),this.writeString(e)},writeFloatField:function(t,e){this.writeTag(t,r.Fixed32),this.writeFloat(e)},writeDoubleField:function(t,e){this.writeTag(t,r.Fixed64),this.writeDouble(e)},writeBooleanField:function(t,e){this.writeVarintField(t,Boolean(e))}}},2582:function(t){t.exports=function(){"use strict";function t(t,n,r,s,o){!function t(i,n,r,s,o){for(;s>r;){if(s-r>600){var a=s-r+1,l=n-r+1,h=Math.log(a),u=.5*Math.exp(2*h/3),c=.5*Math.sqrt(h*u*(a-u)/a)*(l-a/2<0?-1:1);t(i,n,Math.max(r,Math.floor(n-l*u/a+c)),Math.min(s,Math.floor(n+(a-l)*u/a+c)),o)}var d=i[n],g=r,p=s;for(e(i,r,n),o(i[s],d)>0&&e(i,r,s);g<p;){for(e(i,g,p),g++,p--;o(i[g],d)<0;)g++;for(;o(i[p],d)>0;)p--}0===o(i[r],d)?e(i,r,p):e(i,++p,s),p<=n&&(r=p+1),n<=p&&(s=p-1)}}(t,n,r||0,s||t.length-1,o||i)}function e(t,e,i){var n=t[e];t[e]=t[i],t[i]=n}function i(t,e){return t<e?-1:t>e?1:0}var n=function(t){void 0===t&&(t=9),this._maxEntries=Math.max(4,t),this._minEntries=Math.max(2,Math.ceil(.4*this._maxEntries)),this.clear()};function r(t,e,i){if(!i)return e.indexOf(t);for(var n=0;n<e.length;n++)if(i(t,e[n]))return n;return-1}function s(t,e){o(t,0,t.children.length,e,t)}function o(t,e,i,n,r){r||(r=p(null)),r.minX=1/0,r.minY=1/0,r.maxX=-1/0,r.maxY=-1/0;for(var s=e;s<i;s++){var o=t.children[s];a(r,t.leaf?n(o):o)}return r}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 d(t,e){return t.minX<=e.minX&&t.minY<=e.minY&&e.maxX<=t.maxX&&e.maxY<=t.maxY}function g(t,e){return e.minX<=t.maxX&&e.minY<=t.maxY&&e.maxX>=t.minX&&e.maxY>=t.minY}function p(t){return{children:t,height:1,leaf:!0,minX:1/0,minY:1/0,maxX:-1/0,maxY:-1/0}}function f(e,i,n,r,s){for(var o=[i,n];o.length;)if(!((n=o.pop())-(i=o.pop())<=r)){var a=i+Math.ceil((n-i)/r/2)*r;t(e,a,i,n,s),o.push(i,a,a,n)}}return n.prototype.all=function(){return this._all(this.data,[])},n.prototype.search=function(t){var e=this.data,i=[];if(!g(t,e))return i;for(var n=this.toBBox,r=[];e;){for(var s=0;s<e.children.length;s++){var o=e.children[s],a=e.leaf?n(o):o;g(t,a)&&(e.leaf?i.push(o):d(t,a)?this._all(o,i):r.push(o))}e=r.pop()}return i},n.prototype.collides=function(t){var e=this.data;if(!g(t,e))return!1;for(var i=[];e;){for(var n=0;n<e.children.length;n++){var r=e.children[n],s=e.leaf?this.toBBox(r):r;if(g(t,s)){if(e.leaf||d(t,s))return!0;i.push(r)}}e=i.pop()}return!1},n.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 i=this._build(t.slice(),0,t.length-1,0);if(this.data.children.length)if(this.data.height===i.height)this._splitRoot(this.data,i);else{if(this.data.height<i.height){var n=this.data;this.data=i,i=n}this._insert(i,this.data.height-i.height-1,!0)}else this.data=i;return this},n.prototype.insert=function(t){return t&&this._insert(t,this.data.height-1),this},n.prototype.clear=function(){return this.data=p([]),this},n.prototype.remove=function(t,e){if(!t)return this;for(var i,n,s,o=this.data,a=this.toBBox(t),l=[],h=[];o||l.length;){if(o||(o=l.pop(),n=l[l.length-1],i=h.pop(),s=!0),o.leaf){var u=r(t,o.children,e);if(-1!==u)return o.children.splice(u,1),l.push(o),this._condense(l),this}s||o.leaf||!d(o,a)?n?(i++,o=n.children[i],s=!1):o=null:(l.push(o),h.push(i),i=0,n=o,o=o.children[0])}return this},n.prototype.toBBox=function(t){return t},n.prototype.compareMinX=function(t,e){return t.minX-e.minX},n.prototype.compareMinY=function(t,e){return t.minY-e.minY},n.prototype.toJSON=function(){return this.data},n.prototype.fromJSON=function(t){return this.data=t,this},n.prototype._all=function(t,e){for(var i=[];t;)t.leaf?e.push.apply(e,t.children):i.push.apply(i,t.children),t=i.pop();return e},n.prototype._build=function(t,e,i,n){var r,o=i-e+1,a=this._maxEntries;if(o<=a)return s(r=p(t.slice(e,i+1)),this.toBBox),r;n||(n=Math.ceil(Math.log(o)/Math.log(a)),a=Math.ceil(o/Math.pow(a,n-1))),(r=p([])).leaf=!1,r.height=n;var l=Math.ceil(o/a),h=l*Math.ceil(Math.sqrt(a));f(t,e,i,h,this.compareMinX);for(var u=e;u<=i;u+=h){var c=Math.min(u+h-1,i);f(t,u,c,l,this.compareMinY);for(var d=u;d<=c;d+=l){var g=Math.min(d+l-1,c);r.children.push(this._build(t,d,g,n-1))}}return s(r,this.toBBox),r},n.prototype._chooseSubtree=function(t,e,i,n){for(;n.push(e),!e.leaf&&n.length-1!==i;){for(var r=1/0,s=1/0,o=void 0,a=0;a<e.children.length;a++){var l=e.children[a],h=u(l),c=(d=t,g=l,(Math.max(g.maxX,d.maxX)-Math.min(g.minX,d.minX))*(Math.max(g.maxY,d.maxY)-Math.min(g.minY,d.minY))-h);c<s?(s=c,r=h<r?h:r,o=l):c===s&&h<r&&(r=h,o=l)}e=o||e.children[0]}var d,g;return e},n.prototype._insert=function(t,e,i){var n=i?t:this.toBBox(t),r=[],s=this._chooseSubtree(n,this.data,e,r);for(s.children.push(t),a(s,n);e>=0&&r[e].children.length>this._maxEntries;)this._split(r,e),e--;this._adjustParentBBoxes(n,r,e)},n.prototype._split=function(t,e){var i=t[e],n=i.children.length,r=this._minEntries;this._chooseSplitAxis(i,r,n);var o=this._chooseSplitIndex(i,r,n),a=p(i.children.splice(o,i.children.length-o));a.height=i.height,a.leaf=i.leaf,s(i,this.toBBox),s(a,this.toBBox),e?t[e-1].children.push(a):this._splitRoot(i,a)},n.prototype._splitRoot=function(t,e){this.data=p([t,e]),this.data.height=t.height+1,this.data.leaf=!1,s(this.data,this.toBBox)},n.prototype._chooseSplitIndex=function(t,e,i){for(var n,r,s,a,l,h,c,d=1/0,g=1/0,p=e;p<=i-e;p++){var f=o(t,0,p,this.toBBox),m=o(t,p,i,this.toBBox),_=(r=f,s=m,void 0,void 0,void 0,void 0,a=Math.max(r.minX,s.minX),l=Math.max(r.minY,s.minY),h=Math.min(r.maxX,s.maxX),c=Math.min(r.maxY,s.maxY),Math.max(0,h-a)*Math.max(0,c-l)),y=u(f)+u(m);_<d?(d=_,n=p,g=y<g?y:g):_===d&&y<g&&(g=y,n=p)}return n||i-e},n.prototype._chooseSplitAxis=function(t,e,i){var n=t.leaf?this.compareMinX:l,r=t.leaf?this.compareMinY:h;this._allDistMargin(t,e,i,n)<this._allDistMargin(t,e,i,r)&&t.children.sort(n)},n.prototype._allDistMargin=function(t,e,i,n){t.children.sort(n);for(var r=this.toBBox,s=o(t,0,e,r),l=o(t,i-e,i,r),h=c(s)+c(l),u=e;u<i-e;u++){var d=t.children[u];a(s,t.leaf?r(d):d),h+=c(s)}for(var g=i-e-1;g>=e;g--){var p=t.children[g];a(l,t.leaf?r(p):p),h+=c(l)}return h},n.prototype._adjustParentBBoxes=function(t,e,i){for(var n=i;n>=0;n--)a(e[n],t)},n.prototype._condense=function(t){for(var e=t.length-1,i=void 0;e>=0;e--)0===t[e].children.length?e>0?(i=t[e-1].children).splice(i.indexOf(t[e]),1):this.clear():s(t[e],this.toBBox)},n}()},4559:function(t,e,i){"use strict";var n=this&&this.__assign||function(){return n=Object.assign||function(t){for(var e,i=1,n=arguments.length;i<n;i++)for(var r in e=arguments[i])Object.prototype.hasOwnProperty.call(e,r)&&(t[r]=e[r]);return t},n.apply(this,arguments)};e.__esModule=!0,e.OpenlayerMap=void 0;var r=i(9984),s=i(1533),o=i(6121),a=i(4717),l=i(6944),h=i(2723),u=i(9931),c=i(1090),d=i(188),g=i(283),p=i(6528),f=i(4514),m=i(8641),_=i(5311),y=Math.PI/2,v=new u.Fill({color:"rgba(255, 153, 0, 0.4)"}),x=new u.Stroke({color:"rgba(204, 85, 0, 1)",width:1.5}),E=new u.Fill({color:"rgba(255, 153, 102, 0.3)"}),b=new u.Fill({color:"rgba(255, 165, 0, 0.7)"}),w=new u.Fill({color:"#fff"}),S=new u.Stroke({color:"rgba(0, 0, 0, 0.6)",width:3}),T=new g.default({radius:14,fill:b}),C=new g.default({radius:20,fill:E}),R=function(){function t(t,e){void 0===e&&(e=null),this.facetsMapping={},this.facetsMappingUrl={},this.id=t,this.el=_("#"+this.id),this.global={},this.filterInput=_(".openlayers-filters input"),this.szIcon=this.el.data("icon"),this.filterField=this.el.data("filter-field"),this.popupContainer=this.el.closest(".openlayers-wrapper").find(".popup"),this.popupContent=this.el.closest(".openlayers-wrapper").find(".popup-content"),this.popupCloser=this.el.closest(".openlayers-wrapper").find(".popup-closer"),this.loadingElement=this.el.closest(".openlayers-wrapper").find(".openlayers-loading-wrapper"),this.initUrl=e}return t.prototype.init=function(){var t=[];this.layer=new h.Tile({source:new s.OSM({crossOrigin:"anonymous"})}),t.push(this.layer),void 0!==this.el.data("tile-wms")&&"object"==typeof this.el.data("tile-wms")&&(this.wmsLayer=new h.Tile({source:new s.TileWMS(this.el.data("tile-wms"))}),t.push(this.wmsLayer)),this.interactions=(0,l.defaults)(),this.controls=(0,a.defaults)(),this.controls.push(new a.FullScreen),this.controls.push(new a.ZoomSlider),this.center=(0,o.fromLonLat)([parseFloat(this.el.data("center-lon")),parseFloat(this.el.data("center-lat"))]),this.clusterEnabled="1"==this.el.data("cluster-enabled"),this.clusterDistance=parseInt(this.el.data("cluster-distance")),this.view=new r.View({center:this.center,zoom:this.el.data("zoom"),minZoom:1,maxZoom:18}),this.popupOverlay=new r.Overlay({element:this.popupContainer.get(0),positioning:"bottom-center",stopEvent:!1}),this.map=new r.Map({target:this.id,layers:t,interactions:this.interactions,controls:this.controls,view:this.view}),this.map.addOverlay(this.popupOverlay),this.loadData()},t.prototype.clusterMemberStyle=function(t){return new u.Style({geometry:t.getGeometry(),image:this.getIcon()})},t.prototype.loadData=function(t){var e=this;void 0===t&&(t=null);var i=!1;null!=this.initUrl&&(t=this.el.data("url")+"?_format=json&"+this.initUrl,this.initUrl=null,i=!0),this.el.trigger("openlayers_beforeloaddata",[this,t]);var n=this;n.hideFeaturePopup();var r=this.map.getView().calculateExtent(this.map.getSize());if(null===t&&(t=this.el.data("url")+"?_format=json&view="+this.el.data("view")),!i){var a=new RegExp("&openlayers-searchtext=[^&]*(&|$)");t=t.replace(a,"&"),""!==this.filterField&&""!==this.filterInput.val()&&this.filterInput.length>0&&(t+="&openlayers-searchtext="+this.filterInput.val())}t=t.replace(/^https?:/,""),this.currentUrl=t,r=(0,o.transformExtent)(r,"EPSG:3857","EPSG:4326"),this.loadingElement.show();var l=this.el.data("lat"),g=this.el.data("lon"),p=this.el.data("nid");fetch(this.currentUrl,{method:"get",headers:{Accept:"application/json","Content-Type":"application/x-www-form-urlencoded; charset=UTF-8"}}).then((function(i){e.waitForIcon(e.szIcon).then((function(r){i.json().then((function(i){_(e.global).trigger("resultReceived",[{json:i}]);var a=[],f=new u.Style({image:e.getIcon(r)}),m=i;void 0!==i.search_results&&(m=i.search_results);try{m.forEach((function(t){var e=new c.default({geometry:new d.default((0,o.fromLonLat)([t[g],t[l]])),name:"item",properties:{id:t[p]}});e.setStyle(f),a.push(e)})),void 0!==e.vectorLayer&&e.map.removeLayer(e.vectorLayer);var y=new s.Vector({features:a});e.clusterEnabled?(e.cluster=new s.Cluster({distance:e.clusterDistance,source:y}),e.clusterHulls=new h.Vector({source:e.cluster,style:e.clusterHullStyle}),e.vectorLayer=new h.Vector({source:e.cluster,style:function(t){var e=t.get("features").length;if(e>1)return[new u.Style({image:C}),new u.Style({image:T,text:new u.Text({text:e.toString(),fill:w,stroke:S})})];var i=t.get("features")[0];return n.clusterMemberStyle(i)}}),e.clusterCircles=new h.Vector({source:e.cluster,style:e.clusterCircleStyle})):e.vectorLayer=new h.Vector({source:y}),e.map.addLayer(e.vectorLayer)}catch(t){void 0!==e.vectorLayer&&e.map.removeLayer(e.vectorLayer)}e.el.trigger("openlayers_afterloaddata",[e,t,i])}))})),e.poseListeners(!0),e.loadingElement.hide()}))},t.prototype.waitForIcon=function(t){void 0===t&&(t="");var e=this;return new Promise((function(i){e.icon=new Image,e.icon.addEventListener("load",(function(){i(e.icon)})),""===t&&(t="data:image/svg+xml,"+escape('<svg version="1.1" id="Layer_1" xmlns="http://www.w3.org/2000/svg" xmlns:xlink="http://www.w3.org/1999/xlink" x="0px" y="0px" width="40px" height="40px" viewBox="0 0 40 40" enable-background="new 0 0 25 25" xml:space="preserve"><path fill="#156BB1" d="M22.906,10.438c0,4.367-6.281,14.312-7.906,17.031c-1.719-2.75-7.906-12.665-7.906-17.031S10.634,2.531,15,2.531S22.906,6.071,22.906,10.438z"/><circle fill="#FFFFFF" cx="15" cy="10.677" r="3.291"/></svg>')),e.icon.src=t}))},t.prototype.clusterCircleStyle=function(t,e){var i=this;if(t===this.clickFeature&&e===this.clickResolution){this.clusterMembers=t.get("features");var r=t.getGeometry().getCoordinates(),s=t.getGeometry();return this.generatePointsCircle(this.clusterMembers.length,s.getCoordinates(),e).reduce((function(t,e,s){var o=new d.default(e),a=new p.LineString([r,e]);return t.unshift(new u.Style({geometry:a,stroke:x})),t.push(i.clusterMemberStyle(new c.default(n(n({},i.clusterMembers[s].getProperties()),{geometry:o})))),t}),[])}},t.prototype.generatePointsCircle=function(t,e,i){var n,r=28*(2+t)/(2*Math.PI),s=2*Math.PI/t,o=[];r=Math.max(r,35)*i;for(var a=0;a<t;++a)n=y+a*s,o.push([e[0]+r*Math.cos(n),e[1]+r*Math.sin(n)]);return o},t.prototype.clusterHullStyle=function(t){if(t===this.hoverFeature){var e=t.get("features").map((function(t){return t.getGeometry().getCoordinates()}));return new u.Style({geometry:new p.Polygon([(0,f.monotoneChainConvexHull)(e)]),fill:v,stroke:x})}},t.prototype.getIcon=function(t){if(void 0===t&&(t=null),null===this.tplIcon||void 0===this.tplIcon||null!==t){var e=Math.min(40,t.width),i=Math.ceil(t.height*(e/t.width)),n=document.createElement("canvas");n.getContext("2d").drawImage(t,0,0,t.width,t.height,0,0,e,i);var r=n.toDataURL(),s=new Image;s.src=r,this.tplIcon=new u.Icon({anchor:[.5,e],anchorXUnits:"fraction",anchorYUnits:"pixels",img:s,imgSize:[e,i]})}return this.tplIcon},t.prototype.poseListeners=function(t){if(void 0===t&&(t=!0),t){var e=this;this.poseListeners(!1),_(this.global).on("resultReceived",(function(t,i){e.resultReceivedHandler.apply(e,[t,i])}))}else _(this.global).off("resultReceived");this.enableMapClick(t),this.enableFilterChange(t)},t.prototype.vectorLayerReady=function(){var t=this;return new Promise((function(e,i){t.waitForVectorLayer(e)}))},t.prototype.waitForVectorLayer=function(t){void 0===this.vectorLayer?setTimeout(this.waitForVectorLayer.bind(this,t),200):t()},t.prototype.enableMapClick=function(t){var e=this;void 0===t&&(t=!0);var i=this;this.vectorLayerReady().then((function(){e.clusterEnabled?(e.map.on("click",(function(t){e.vectorLayer.getFeatures(t.pixel).then((function(t){if(e.clusterMembers=[],t.length>0&&(e.clusterMembers=t[0].get("features")),void 0!==e.clusterMembers&&e.clusterMembers.length>1){var i=(0,m.createEmpty)();e.clusterMembers.forEach((function(t){return(0,m.extend)(i,t.getGeometry().getExtent())}));var n=e.map.getView(),r=e.map.getView().getResolution();n.getZoom()===n.getMaxZoom()||(0,m.getWidth)(i)<r&&(0,m.getWidth)(i)<r?(e.clickFeature=t[0],e.clickResolution=r,e.clusterCircles.setStyle(e.clusterCircleStyle)):n.fit(i,{duration:500,padding:[50,50,50,50]})}else void 0!==e.clusterMembers&&1===e.clusterMembers.length&&e.showFeaturePopup(e.clusterMembers[0])}))})),e.map.on("pointermove",(function(t){e.clusterEnabled&&e.vectorLayer.getFeatures(t.pixel).then((function(t){t.length>0&&t[0]!==e.hoverFeature&&(e.hoverFeature=t[0],e.clusterHulls.setStyle(e.clusterHullStyle),e.map.getTargetElement().style.cursor=e.hoverFeature&&e.hoverFeature.get("features").length>1?"pointer":"")}));var i=e.map.forEachFeatureAtPixel(t.pixel,(function(t){return t}));e.map.getTargetElement().style.cursor=void 0!==i?"pointer":""}))):e.map.on("click",(function(t){e.vectorLayer.getFeatures(t.pixel).then((function(t){e.clusterMembers=[],1===t.length&&e.showFeaturePopup(t[0])}))})),e.popupCloser.on("click",(function(){return i.hideFeaturePopup(),!1}))}))},t.prototype.hideFeaturePopup=function(){this.popupOverlay.setPosition(void 0),this.popupCloser.get(0).blur()},t.prototype.enableFilterChange=function(t){if(""!==this.filterField&&this.filterInput.length>0){var e=this;t?this.filterInput.on("change",(function(t){e.loadData.apply(e,[e.currentUrl])})):this.filterInput.off("change")}},t.prototype.showFeaturePopup=function(t){var e=t.getGeometry().getCoordinates(),i=t.get("properties"),n='<div id="feature-'+i.id+'"><p style="text-align:center;"> ... loading ...</p></div>';this.popupContent.html(n),this.popupOverlay.setPosition(e);var r=this.el.data("url-feature").replace("__NODE__",i.id).replace("__DISPLAY__",this.el.data("view-mode"));fetch(r,{method:"GET",headers:{"Content-Type":"application/json"}}).then((function(t){t.json().then((function(t){_("#feature-"+i.id).html(t.content)}))}))},t.prototype.resultReceivedHandler=function(t,e){if(void 0!==e.json.facets_metadata)for(var i=0,n=Object.entries(e.json.facets_metadata);i<n.length;i++){var r=n[i],s=r[0],o=r[1],a=(_(".openlayers-facets div#"+s),o);this.facetsMapping[a.field_id]=s,this.facetsMappingUrl[a.field_id]=a.url_alias}void 0!==e.json.facets&&this.fillFacets(e.json.facets),this.enableFacetLinkHandler(!0)},t.prototype.recycleUrlFromFacet=function(t,e){var i=this,n=this.currentUrl.split("?")[1],r=new URLSearchParams(n),s=new URLSearchParams({}),o=0,a=new RegExp("^"+e.data("key")+"\\[");return r.forEach((function(n,r){var l=new RegExp("^"+i.facetsMappingUrl[t]+":");r.match(a)?r.match(a)&&null===n.match(l)&&(s.set(e.data("key")+"["+o+"]",n),o++):s.set(r,n)})),this.el.data("url")+"/?"+s.toString()},t.prototype.enableFacetLinkHandler=function(t){if(void 0===t&&(t=!0),t){var e=this;this.enableFacetLinkHandler(!1),_(".openlayers-facets a").on("click",(function(t){return e.facetLinkClickedHandler.apply(e,[t,_(this)])})),_(".openlayers-facets select").on("change",(function(t){return e.facetSelectChangedHandler.apply(e,[t,_(this)])}))}else _(".openlayers-facets a").off("click"),_(".openlayers-facets select").off("change")},t.prototype.facetLinkClickedHandler=function(t,e){return this.enableFacetLinkHandler(!1),this.loadData(e.prop("href")),!1},t.prototype.facetSelectChangedHandler=function(t,e){return this.enableFacetLinkHandler(!1),this.loadData(e.val()),!1},t.prototype.fillFacets=function(t){var e=this.currentUrl.split("?")[1],i=new URLSearchParams(e);for(var n in this.el.trigger("openlayers_beforefacetresponse",[this,t,i]),_(".openlayers-facets li").hide(),_(".openlayers-facets option").not('[value=""]').hide(),t)for(var r=0,s=Object.entries(t[n]);r<s.length;r++){var o=s[r],a=(o[0],o[1]);for(var l in a){var h=a[l];this.fillFacetsRecurse(h,i)}}this.el.trigger("openlayers_afterfacetresponse",[this,t,i])},t.prototype.fillFacetsRecurse=function(t,e){var i=function(i){var r=t[i];if(void 0!==r.raw_value){var s=new RegExp(r.raw_value+"$"),o=!1;e.forEach((function(t,e){null!==t.match(s)&&(o=!0)}));var a=_('.openlayers-facets option[data-value="'+r.raw_value+'"]'),l=_('.openlayers-facets li[data-value="'+r.raw_value+'"]'),h=_('.openlayers-facets li[data-value="'+r.raw_value+'"] a');a.attr("data-count",r.values.count).attr("value",r.url).removeClass("selected").show(),l.attr("data-count",r.values.count).attr("data-href",r.url).removeClass("selected").show(),h.attr("data-count",r.values.count).attr("href",r.url).removeClass("selected").show(),o&&(a.addClass("selected"),l.addClass("selected"),h.addClass("selected")),void 0!==r.children&&void 0!==r.children[0]&&r.children[0].length>0&&n.fillFacetsRecurse(r.children[0],e)}},n=this;for(var r in t)i(r)},t}();e.OpenlayerMap=R},4635:(t,e,i)=>{const n=i(9622);t.exports=function(t,e,i){const r=i&&i.debug||!1,s=i&&i.startIndex||0;r&&console.log("starting findTagByName with",e," and ",i);const o=n(t,`<${e}[ >]`,s);if(r&&console.log("start:",o),-1===o)return;const a=t.slice(o+e.length);let l=n(a,"[ /]"+e+">",0);const h=-1===l;h&&(l=n(a,"[ /]>",0));const u=o+e.length+l+1+(h?0:e.length)+1;if(r&&console.log("end:",u),-1===u)return;const c=t.slice(o,u);let d;return d=h?null:c.slice(c.indexOf(">")+1,c.lastIndexOf("<")),{inner:d,outer:c,start:o,end:u}}},8602:(t,e,i)=>{const n=i(4635);t.exports=function(t,e,i){const r=[],s=i&&i.debug||!1;let o,a=i&&i.startIndex||0;for(;o=n(t,e,{debug:s,startIndex:a});)a=o.end,r.push(o);return s&&console.log("findTagsByName found",r.length,"tags"),r}},8330:t=>{t.exports=function(t,e,i){const n=i&&i.debug||!1;n&&console.log("getting "+e+" in "+t);const r="object"==typeof t?t.outer:t,s=`${e}\\="([^"]*)"`;n&&console.log("pattern:",s);const o=new RegExp(s).exec(r);if(n&&console.log("match:",o),o)return o[1]}},9622:t=>{t.exports=function(t,e,i){const n=new RegExp(e).exec(t.slice(i));return n?i+n.index:-1}},5311:t=>{"use strict";t.exports=jQuery},3752:()=>{},3640:()=>{},2630:()=>{},2499:(t,e,i)=>{"use strict";i.d(e,{Ie:()=>l,It:()=>s,L:()=>n,L5:()=>u,P1:()=>d,Qb:()=>c,pd:()=>h,sf:()=>a});const n={315:"Artist",258:"BitsPerSample",265:"CellLength",264:"CellWidth",320:"ColorMap",259:"Compression",33432:"Copyright",306:"DateTime",338:"ExtraSamples",266:"FillOrder",289:"FreeByteCounts",288:"FreeOffsets",291:"GrayResponseCurve",290:"GrayResponseUnit",316:"HostComputer",270:"ImageDescription",257:"ImageLength",256:"ImageWidth",271:"Make",281:"MaxSampleValue",280:"MinSampleValue",272:"Model",254:"NewSubfileType",274:"Orientation",262:"PhotometricInterpretation",284:"PlanarConfiguration",296:"ResolutionUnit",278:"RowsPerStrip",277:"SamplesPerPixel",305:"Software",279:"StripByteCounts",273:"StripOffsets",255:"SubfileType",263:"Threshholding",282:"XResolution",283:"YResolution",326:"BadFaxLines",327:"CleanFaxData",343:"ClipPath",328:"ConsecutiveBadFaxLines",433:"Decode",434:"DefaultImageColor",269:"DocumentName",336:"DotRange",321:"HalftoneHints",346:"Indexed",347:"JPEGTables",285:"PageName",297:"PageNumber",317:"Predictor",319:"PrimaryChromaticities",532:"ReferenceBlackWhite",339:"SampleFormat",340:"SMinSampleValue",341:"SMaxSampleValue",559:"StripRowCounts",330:"SubIFDs",292:"T4Options",293:"T6Options",325:"TileByteCounts",323:"TileLength",324:"TileOffsets",322:"TileWidth",301:"TransferFunction",318:"WhitePoint",344:"XClipPathUnits",286:"XPosition",529:"YCbCrCoefficients",531:"YCbCrPositioning",530:"YCbCrSubSampling",345:"YClipPathUnits",287:"YPosition",37378:"ApertureValue",40961:"ColorSpace",36868:"DateTimeDigitized",36867:"DateTimeOriginal",34665:"Exif IFD",36864:"ExifVersion",33434:"ExposureTime",41728:"FileSource",37385:"Flash",40960:"FlashpixVersion",33437:"FNumber",42016:"ImageUniqueID",37384:"LightSource",37500:"MakerNote",37377:"ShutterSpeedValue",37510:"UserComment",33723:"IPTC",34675:"ICC Profile",700:"XMP",42112:"GDAL_METADATA",42113:"GDAL_NODATA",34377:"Photoshop",33550:"ModelPixelScale",33922:"ModelTiepoint",34264:"ModelTransformation",34735:"GeoKeyDirectory",34736:"GeoDoubleParams",34737:"GeoAsciiParams",50674:"LercParameters"},r={};for(const t in n)n.hasOwnProperty(t)&&(r[n[t]]=parseInt(t,10));const s=[r.BitsPerSample,r.ExtraSamples,r.SampleFormat,r.StripByteCounts,r.StripOffsets,r.StripRowCounts,r.TileByteCounts,r.TileOffsets,r.SubIFDs],o={1:"BYTE",2:"ASCII",3:"SHORT",4:"LONG",5:"RATIONAL",6:"SBYTE",7:"UNDEFINED",8:"SSHORT",9:"SLONG",10:"SRATIONAL",11:"FLOAT",12:"DOUBLE",13:"IFD",16:"LONG8",17:"SLONG8",18:"IFD8"},a={};for(const t in o)o.hasOwnProperty(t)&&(a[o[t]]=parseInt(t,10));const l={WhiteIsZero:0,BlackIsZero:1,RGB:2,Palette:3,TransparencyMask:4,CMYK:5,YCbCr:6,CIELab:8,ICCLab:9},h={Unspecified:0,Assocalpha:1,Unassalpha:2},u={Version:0,AddCompression:1},c={None:0,Deflate:1},d={1024:"GTModelTypeGeoKey",1025:"GTRasterTypeGeoKey",1026:"GTCitationGeoKey",2048:"GeographicTypeGeoKey",2049:"GeogCitationGeoKey",2050:"GeogGeodeticDatumGeoKey",2051:"GeogPrimeMeridianGeoKey",2052:"GeogLinearUnitsGeoKey",2053:"GeogLinearUnitSizeGeoKey",2054:"GeogAngularUnitsGeoKey",2055:"GeogAngularUnitSizeGeoKey",2056:"GeogEllipsoidGeoKey",2057:"GeogSemiMajorAxisGeoKey",2058:"GeogSemiMinorAxisGeoKey",2059:"GeogInvFlatteningGeoKey",2060:"GeogAzimuthUnitsGeoKey",2061:"GeogPrimeMeridianLongGeoKey",2062:"GeogTOWGS84GeoKey",3072:"ProjectedCSTypeGeoKey",3073:"PCSCitationGeoKey",3074:"ProjectionGeoKey",3075:"ProjCoordTransGeoKey",3076:"ProjLinearUnitsGeoKey",3077:"ProjLinearUnitSizeGeoKey",3078:"ProjStdParallel1GeoKey",3079:"ProjStdParallel2GeoKey",3080:"ProjNatOriginLongGeoKey",3081:"ProjNatOriginLatGeoKey",3082:"ProjFalseEastingGeoKey",3083:"ProjFalseNorthingGeoKey",3084:"ProjFalseOriginLongGeoKey",3085:"ProjFalseOriginLatGeoKey",3086:"ProjFalseOriginEastingGeoKey",3087:"ProjFalseOriginNorthingGeoKey",3088:"ProjCenterLongGeoKey",3089:"ProjCenterLatGeoKey",3090:"ProjCenterEastingGeoKey",3091:"ProjCenterNorthingGeoKey",3092:"ProjScaleAtNatOriginGeoKey",3093:"ProjScaleAtCenterGeoKey",3094:"ProjAzimuthAngleGeoKey",3095:"ProjStraightVertPoleLongGeoKey",3096:"ProjRectifiedGridAngleGeoKey",4096:"VerticalCSTypeGeoKey",4097:"VerticalCitationGeoKey",4098:"VerticalDatumGeoKey",4099:"VerticalUnitsGeoKey"},g={};for(const t in d)d.hasOwnProperty(t)&&(g[d[t]]=parseInt(t,10))},6813:(t,e,i)=>{"use strict";i.d(e,{Z:()=>s});const n={1:"The view center is not defined",2:"The view resolution is not defined",3:"The view rotation is not defined",4:"`image` and `src` cannot be provided at the same time",5:"`imgSize` must be set when `image` is provided",7:"`format` must be set when `url` is set",8:"Unknown `serverType` configured",9:"`url` must be configured or set using `#setUrl()`",10:"The default `geometryFunction` can only handle `Point` geometries",11:"`options.featureTypes` must be an Array",12:"`options.geometryName` must also be provided when `options.bbox` is set",13:"Invalid corner",14:"Invalid color",15:"Tried to get a value for a key that does not exist in the cache",16:"Tried to set a value for a key that is used already",17:"`resolutions` must be sorted in descending order",18:"Either `origin` or `origins` must be configured, never both",19:"Number of `tileSizes` and `resolutions` must be equal",20:"Number of `origins` and `resolutions` must be equal",22:"Either `tileSize` or `tileSizes` must be configured, never both",24:"Invalid extent or geometry provided as `geometry`",25:"Cannot fit empty extent provided as `geometry`",26:"Features must have an id set",27:"Features must have an id set",28:'`renderMode` must be `"hybrid"` or `"vector"`',30:"The passed `feature` was already added to the source",31:"Tried to enqueue an `element` that was already added to the queue",32:"Transformation matrix cannot be inverted",33:"Invalid units",34:"Invalid geometry layout",36:"Unknown SRS type",37:"Unknown geometry type found",38:"`styleMapValue` has an unknown type",39:"Unknown geometry type",40:"Expected `feature` to have a geometry",41:"Expected an `ol/style/Style` or an array of `ol/style/Style.js`",42:"Question unknown, the answer is 42",43:"Expected `layers` to be an array or a `Collection`",47:"Expected `controls` to be an array or an `ol/Collection`",48:"Expected `interactions` to be an array or an `ol/Collection`",49:"Expected `overlays` to be an array or an `ol/Collection`",50:"`options.featureTypes` should be an Array",51:"Either `url` or `tileJSON` options must be provided",52:"Unknown `serverType` configured",53:"Unknown `tierSizeCalculation` configured",55:"The {-y} placeholder requires a tile grid with extent",56:"mapBrowserEvent must originate from a pointer event",57:"At least 2 conditions are required",59:"Invalid command found in the PBF",60:"Missing or invalid `size`",61:"Cannot determine IIIF Image API version from provided image information JSON",62:"A `WebGLArrayBuffer` must either be of type `ELEMENT_ARRAY_BUFFER` or `ARRAY_BUFFER`",64:"Layer opacity must be a number",66:"`forEachFeatureAtCoordinate` cannot be used on a WebGL layer if the hit detection logic has not been enabled. This is done by providing adequate shaders using the `hitVertexShader` and `hitFragmentShader` properties of `WebGLPointsLayerRenderer`",67:"A layer can only be added to the map once. Use either `layer.setMap()` or `map.addLayer()`, not both",68:"A VectorTile source can only be rendered if it has a projection compatible with the view projection",69:"`width` or `height` cannot be provided together with `scale`"};class r extends Error{constructor(t){const e=n[t];super(e),this.code=t,this.name="AssertionError",this.message=e}}const s=r},8714:(t,e,i)=>{"use strict";i.d(e,{Z:()=>u});var n=i(6813),r=i(2971),s=i(2071),o=i(291);const a="length";class l extends o.ZP{constructor(t,e,i){super(t),this.element=e,this.index=i}}class h extends r.Z{constructor(t,e){if(super(),this.on,this.once,this.un,e=e||{},this.unique_=!!e.unique,this.array_=t||[],this.unique_)for(let t=0,e=this.array_.length;t<e;++t)this.assertUnique_(this.array_[t],t);this.updateLength_()}clear(){for(;this.getLength()>0;)this.pop()}extend(t){for(let e=0,i=t.length;e<i;++e)this.push(t[e]);return this}forEach(t){const e=this.array_;for(let i=0,n=e.length;i<n;++i)t(e[i],i,e)}getArray(){return this.array_}item(t){return this.array_[t]}getLength(){return this.get(a)}insertAt(t,e){if(t<0||t>this.getLength())throw new Error("Index out of bounds: "+t);this.unique_&&this.assertUnique_(e),this.array_.splice(t,0,e),this.updateLength_(),this.dispatchEvent(new l(s.Z.ADD,e,t))}pop(){return this.removeAt(this.getLength()-1)}push(t){this.unique_&&this.assertUnique_(t);const e=this.getLength();return this.insertAt(e,t),this.getLength()}remove(t){const e=this.array_;for(let i=0,n=e.length;i<n;++i)if(e[i]===t)return this.removeAt(i)}removeAt(t){if(t<0||t>=this.getLength())return;const e=this.array_[t];return this.array_.splice(t,1),this.updateLength_(),this.dispatchEvent(new l(s.Z.REMOVE,e,t)),e}setAt(t,e){if(t>=this.getLength())return void this.insertAt(t,e);if(t<0)throw new Error("Index out of bounds: "+t);this.unique_&&this.assertUnique_(e,t);const i=this.array_[t];this.array_[t]=e,this.dispatchEvent(new l(s.Z.REMOVE,i,t)),this.dispatchEvent(new l(s.Z.ADD,e,t))}updateLength_(){this.set(a,this.array_.length)}assertUnique_(t,e){for(let i=0,r=this.array_.length;i<r;++i)if(this.array_[i]===t&&i!==e)throw new n.Z(58)}}const u=h},2071:(t,e,i)=>{"use strict";i.d(e,{Z:()=>n});const n={ADD:"add",REMOVE:"remove"}},349:(t,e,i)=>{"use strict";i.d(e,{G0:()=>o,ZP:()=>d,px:()=>a,qo:()=>h});var n=i(4806),r=i(7195),s=i(8326);function o(t){return t instanceof Image||t instanceof HTMLCanvasElement||t instanceof HTMLVideoElement?t:null}function a(t){return t instanceof Uint8Array||t instanceof Uint8ClampedArray||t instanceof Float32Array||t instanceof DataView?t:null}let l=null;function h(t){l||(l=(0,s.E4)(t.width,t.height,void 0,{willReadFrequently:!0}));const e=l.canvas,i=t.width;e.width!==i&&(e.width=i);const n=t.height;return e.height!==n&&(e.height=n),l.clearRect(0,0,i,n),l.drawImage(t,0,0),l.getImageData(0,0,i,n).data}const u=[256,256];class c extends n.Z{constructor(t){const e=r.Z.IDLE;super(t.tileCoord,e,{transition:t.transition,interpolate:t.interpolate}),this.loader_=t.loader,this.data_=null,this.error_=null,this.size_=t.size||null}getSize(){if(this.size_)return this.size_;const t=o(this.data_);return t?[t.width,t.height]:u}getData(){return this.data_}getError(){return this.error_}load(){if(this.state!==r.Z.IDLE&&this.state!==r.Z.ERROR)return;this.state=r.Z.LOADING,this.changed();const t=this;this.loader_().then((function(e){t.data_=e,t.state=r.Z.LOADED,t.changed()})).catch((function(e){t.error_=e,t.state=r.Z.ERROR,t.changed()}))}}const d=c},5431:(t,e,i)=>{"use strict";i.d(e,{Z:()=>n});const n=class{constructor(){this.disposed=!1}dispose(){this.disposed||(this.disposed=!0,this.disposeInternal())}disposeInternal(){}}},1090:(t,e,i)=>{"use strict";i.r(e),i.d(e,{createStyleFunction:()=>l,default:()=>h});var n=i(2971),r=i(5487),s=i(9515),o=i(5818);class a extends n.Z{constructor(t){if(super(),this.on,this.once,this.un,this.id_=void 0,this.geometryName_="geometry",this.style_=null,this.styleFunction_=void 0,this.geometryChangeKey_=null,this.addChangeListener(this.geometryName_,this.handleGeometryChanged_),t)if("function"==typeof t.getSimplifiedGeometry){const e=t;this.setGeometry(e)}else{const e=t;this.setProperties(e)}}clone(){const t=new a(this.hasProperties()?this.getProperties():null);t.setGeometryName(this.getGeometryName());const e=this.getGeometry();e&&t.setGeometry(e.clone());const i=this.getStyle();return i&&t.setStyle(i),t}getGeometry(){return this.get(this.geometryName_)}getId(){return this.id_}getGeometryName(){return this.geometryName_}getStyle(){return this.style_}getStyleFunction(){return this.styleFunction_}handleGeometryChange_(){this.changed()}handleGeometryChanged_(){this.geometryChangeKey_&&((0,o.bN)(this.geometryChangeKey_),this.geometryChangeKey_=null);const t=this.getGeometry();t&&(this.geometryChangeKey_=(0,o.oL)(t,r.Z.CHANGE,this.handleGeometryChange_,this)),this.changed()}setGeometry(t){this.set(this.geometryName_,t)}setStyle(t){this.style_=t,this.styleFunction_=t?l(t):void 0,this.changed()}setId(t){this.id_=t,this.changed()}setGeometryName(t){this.removeChangeListener(this.geometryName_,this.handleGeometryChanged_),this.geometryName_=t,this.addChangeListener(this.geometryName_,this.handleGeometryChanged_),this.handleGeometryChanged_()}}function l(t){if("function"==typeof t)return t;let e;return Array.isArray(t)?e=t:((0,s.h)("function"==typeof t.getZIndex,41),e=[t]),function(){return e}}const h=a},8096:(t,e,i)=>{"use strict";i.d(e,{K:()=>u,Z:()=>c});var n=i(5487),r=i(1798),s=i(553),o=i(177),a=i(8641),l=i(5818);class h extends r.Z{constructor(t,e,i,n,r,o,a){super(t,e,i,s.Z.IDLE),this.src_=n,this.image_=new Image,null!==r&&(this.image_.crossOrigin=r),this.context_=a,this.unlisten_=null,this.state=s.Z.IDLE,this.imageLoadFunction_=o}getImage(){if(this.state==s.Z.LOADED&&this.context_&&!(this.image_ instanceof HTMLCanvasElement)){const t=this.context_.canvas;t.width=this.image_.width,t.height=this.image_.height,this.context_.drawImage(this.image_,0,0),this.image_=this.context_.canvas}return this.image_}handleImageError_(){this.state=s.Z.ERROR,this.unlistenImage_(),this.changed()}handleImageLoad_(){void 0===this.resolution&&(this.resolution=(0,a.getHeight)(this.extent)/this.image_.height),this.state=s.Z.LOADED,this.unlistenImage_(),this.changed()}load(){this.state!=s.Z.IDLE&&this.state!=s.Z.ERROR||(this.state=s.Z.LOADING,this.changed(),this.imageLoadFunction_(this,this.src_),this.unlisten_=u(this.image_,this.handleImageLoad_.bind(this),this.handleImageError_.bind(this)))}setImage(t){this.image_=t,this.resolution=(0,a.getHeight)(this.extent)/this.image_.height}unlistenImage_(){this.unlisten_&&(this.unlisten_(),this.unlisten_=null)}}function u(t,e,i){const r=t;let s=!0,a=!1,h=!1;const u=[(0,l.Vx)(r,n.Z.LOAD,(function(){h=!0,a||e()}))];return r.src&&o.Tp?(a=!0,r.decode().then((function(){s&&e()})).catch((function(t){s&&(h?e():i())}))):u.push((0,l.Vx)(r,n.Z.ERROR,i)),function(){s=!1,u.forEach(l.bN)}}const c=h},1798:(t,e,i)=>{"use strict";i.d(e,{Z:()=>a});var n=i(208),r=i(5487),s=i(4187);class o extends n.Z{constructor(t,e,i,n){super(),this.extent=t,this.pixelRatio_=i,this.resolution=e,this.state=n}changed(){this.dispatchEvent(r.Z.CHANGE)}getExtent(){return this.extent}getImage(){return(0,s.O3)()}getPixelRatio(){return this.pixelRatio_}getResolution(){return this.resolution}getState(){return this.state}load(){(0,s.O3)()}}const a=o},8294:(t,e,i)=>{"use strict";i.d(e,{Z:()=>o});var n=i(1798),r=i(553);class s extends n.Z{constructor(t,e,i,n,s){super(t,e,i,void 0!==s?r.Z.IDLE:r.Z.LOADED),this.loader_=void 0!==s?s:null,this.canvas_=n,this.error_=null}getError(){return this.error_}handleLoad_(t){t?(this.error_=t,this.state=r.Z.ERROR):this.state=r.Z.LOADED,this.changed()}load(){this.state==r.Z.IDLE&&(this.state=r.Z.LOADING,this.changed(),this.loader_(this.handleLoad_.bind(this)))}getImage(){return this.canvas_}}const o=s},553:(t,e,i)=>{"use strict";i.d(e,{Z:()=>n});const n={IDLE:0,LOADING:1,LOADED:2,ERROR:3,EMPTY:4}},825:(t,e,i)=>{"use strict";i.d(e,{Z:()=>l});var n=i(4806),r=i(7195),s=i(8326),o=i(8096);class a extends n.Z{constructor(t,e,i,n,r,s){super(t,e,s),this.crossOrigin_=n,this.src_=i,this.key=i,this.image_=new Image,null!==n&&(this.image_.crossOrigin=n),this.unlisten_=null,this.tileLoadFunction_=r}getImage(){return this.image_}setImage(t){this.image_=t,this.state=r.Z.LOADED,this.unlistenImage_(),this.changed()}handleImageError_(){this.state=r.Z.ERROR,this.unlistenImage_(),this.image_=function(){const t=(0,s.E4)(1,1);return t.fillStyle="rgba(0,0,0,0)",t.fillRect(0,0,1,1),t.canvas}(),this.changed()}handleImageLoad_(){const t=this.image_;t.naturalWidth&&t.naturalHeight?this.state=r.Z.LOADED:this.state=r.Z.EMPTY,this.unlistenImage_(),this.changed()}load(){this.state==r.Z.ERROR&&(this.state=r.Z.IDLE,this.image_=new Image,null!==this.crossOrigin_&&(this.image_.crossOrigin=this.crossOrigin_)),this.state==r.Z.IDLE&&(this.state=r.Z.LOADING,this.changed(),this.tileLoadFunction_(this,this.src_),this.unlisten_=(0,o.K)(this.image_,this.handleImageLoad_.bind(this),this.handleImageError_.bind(this)))}unlistenImage_(){this.unlisten_&&(this.unlisten_(),this.unlisten_=null)}}const l=a},1230:(t,e,i)=>{"use strict";i.d(e,{Z:()=>n});const n=class{constructor(t,e,i){this.decay_=t,this.minVelocity_=e,this.delay_=i,this.points_=[],this.angle_=0,this.initialVelocity_=0}begin(){this.points_.length=0,this.angle_=0,this.initialVelocity_=0}update(t,e){this.points_.push(t,e,Date.now())}end(){if(this.points_.length<6)return!1;const t=Date.now()-this.delay_,e=this.points_.length-3;if(this.points_[e+2]<t)return!1;let i=e-3;for(;i>0&&this.points_[i+2]>t;)i-=3;const n=this.points_[e+2]-this.points_[i+2];if(n<1e3/60)return!1;const r=this.points_[e]-this.points_[i],s=this.points_[e+1]-this.points_[i+1];return this.angle_=Math.atan2(s,r),this.initialVelocity_=Math.sqrt(r*r+s*s)/n,this.initialVelocity_>this.minVelocity_}getDistance(){return(this.minVelocity_-this.initialVelocity_)/this.decay_}getAngle(){return this.angle_}}},8658:(t,e,i)=>{"use strict";i.d(e,{Z:()=>z});var n=i(2971),r=i(8714),s=i(2071),o=i(9151),a=i(5487),l=i(1295),h=i(8734),u=i(8630),c=i(1708),d=i(2217),g=i(3536),p=i(2126),f=i(3222),m=i(5990),_=i(4238),y=i(8771),v=i(9882),x=i(7681),E=i(7755),b=i(177),w=i(6885),S=i(6101),T=i(9515),C=i(8641),R=i(8871),P=i(6410),I=i(5537),L=i(6121),M=i(4187),F=i(4307),A=i(5818),Z=i(8326),D=i(44);function O(t){t instanceof l.Z?t.setMapInternal(null):t instanceof h.Z&&t.getLayers().forEach(O)}function k(t,e){if(t instanceof l.Z)t.setMapInternal(e);else if(t instanceof h.Z){const i=t.getLayers().getArray();for(let t=0,n=i.length;t<n;++t)k(i[t],e)}}class G extends n.Z{constructor(t){super(),t=t||{},this.on,this.once,this.un;const e=function(t){let e=null;void 0!==t.keyboardEventTarget&&(e="string"==typeof t.keyboardEventTarget?document.getElementById(t.keyboardEventTarget):t.keyboardEventTarget);const i={},n=t.layers&&"function"==typeof t.layers.getLayers?t.layers:new h.Z({layers:t.layers});let s,o,a;return i[f.Z.LAYERGROUP]=n,i[f.Z.TARGET]=t.target,i[f.Z.VIEW]=t.view instanceof x.ZP?t.view:new x.ZP,void 0!==t.controls&&(Array.isArray(t.controls)?s=new r.Z(t.controls.slice()):((0,T.h)("function"==typeof t.controls.getArray,47),s=t.controls)),void 0!==t.interactions&&(Array.isArray(t.interactions)?o=new r.Z(t.interactions.slice()):((0,T.h)("function"==typeof t.interactions.getArray,48),o=t.interactions)),void 0!==t.overlays?Array.isArray(t.overlays)?a=new r.Z(t.overlays.slice()):((0,T.h)("function"==typeof t.overlays.getArray,49),a=t.overlays):a=new r.Z,{controls:s,interactions:o,keyboardEventTarget:e,overlays:a,values:i}}(t);this.renderComplete_,this.loaded_=!0,this.boundHandleBrowserEvent_=this.handleBrowserEvent.bind(this),this.maxTilesLoading_=void 0!==t.maxTilesLoading?t.maxTilesLoading:16,this.pixelRatio_=void 0!==t.pixelRatio?t.pixelRatio:b.MP,this.postRenderTimeoutHandle_,this.animationDelayKey_,this.animationDelay_=this.animationDelay_.bind(this),this.coordinateToPixelTransform_=(0,S.Ue)(),this.pixelToCoordinateTransform_=(0,S.Ue)(),this.frameIndex_=0,this.frameState_=null,this.previousExtent_=null,this.viewPropertyListenerKey_=null,this.viewChangeListenerKey_=null,this.layerGroupPropertyListenerKeys_=null,this.viewport_=document.createElement("div"),this.viewport_.className="ol-viewport"+("ontouchstart"in window?" ol-touch":""),this.viewport_.style.position="relative",this.viewport_.style.overflow="hidden",this.viewport_.style.width="100%",this.viewport_.style.height="100%",this.overlayContainer_=document.createElement("div"),this.overlayContainer_.style.position="absolute",this.overlayContainer_.style.zIndex="0",this.overlayContainer_.style.width="100%",this.overlayContainer_.style.height="100%",this.overlayContainer_.style.pointerEvents="none",this.overlayContainer_.className="ol-overlaycontainer",this.viewport_.appendChild(this.overlayContainer_),this.overlayContainerStopEvent_=document.createElement("div"),this.overlayContainerStopEvent_.style.position="absolute",this.overlayContainerStopEvent_.style.zIndex="0",this.overlayContainerStopEvent_.style.width="100%",this.overlayContainerStopEvent_.style.height="100%",this.overlayContainerStopEvent_.style.pointerEvents="none",this.overlayContainerStopEvent_.className="ol-overlaycontainer-stopevent",this.viewport_.appendChild(this.overlayContainerStopEvent_),this.mapBrowserEventHandler_=null,this.moveTolerance_=t.moveTolerance,this.keyboardEventTarget_=e.keyboardEventTarget,this.targetChangeHandlerKeys_=null,this.targetElement_=null,this.resizeObserver_=new ResizeObserver((()=>this.updateSize())),this.controls=e.controls||(0,R.c)(),this.interactions=e.interactions||(0,P.c)({onFocusOnly:!0}),this.overlays_=e.overlays,this.overlayIdIndex_={},this.renderer_=null,this.postRenderFunctions_=[],this.tileQueue_=new v.Z(this.getTilePriority.bind(this),this.handleTileChange_.bind(this)),this.addChangeListener(f.Z.LAYERGROUP,this.handleLayerGroupChanged_),this.addChangeListener(f.Z.VIEW,this.handleViewChanged_),this.addChangeListener(f.Z.SIZE,this.handleSizeChanged_),this.addChangeListener(f.Z.TARGET,this.handleTargetChanged_),this.setProperties(e.values);const i=this;!t.view||t.view instanceof x.ZP||t.view.then((function(t){i.setView(new x.ZP(t))})),this.controls.addEventListener(s.Z.ADD,(t=>{t.element.setMap(this)})),this.controls.addEventListener(s.Z.REMOVE,(t=>{t.element.setMap(null)})),this.interactions.addEventListener(s.Z.ADD,(t=>{t.element.setMap(this)})),this.interactions.addEventListener(s.Z.REMOVE,(t=>{t.element.setMap(null)})),this.overlays_.addEventListener(s.Z.ADD,(t=>{this.addOverlayInternal_(t.element)})),this.overlays_.addEventListener(s.Z.REMOVE,(t=>{const e=t.element.getId();void 0!==e&&delete this.overlayIdIndex_[e.toString()],t.element.setMap(null)})),this.controls.forEach((t=>{t.setMap(this)})),this.interactions.forEach((t=>{t.setMap(this)})),this.overlays_.forEach(this.addOverlayInternal_.bind(this))}addControl(t){this.getControls().push(t)}addInteraction(t){this.getInteractions().push(t)}addLayer(t){this.getLayerGroup().getLayers().push(t)}handleLayerAdd_(t){k(t.layer,this)}addOverlay(t){this.getOverlays().push(t)}addOverlayInternal_(t){const e=t.getId();void 0!==e&&(this.overlayIdIndex_[e.toString()]=t),t.setMap(this)}disposeInternal(){this.controls.clear(),this.interactions.clear(),this.overlays_.clear(),this.resizeObserver_.disconnect(),this.setTarget(null),super.disposeInternal()}forEachFeatureAtPixel(t,e,i){if(!this.frameState_||!this.renderer_)return;const n=this.getCoordinateFromPixelInternal(t),r=void 0!==(i=void 0!==i?i:{}).hitTolerance?i.hitTolerance:0,s=void 0!==i.layerFilter?i.layerFilter:w.uX,o=!1!==i.checkWrapped;return this.renderer_.forEachFeatureAtCoordinate(n,this.frameState_,r,o,e,null,s,null)}getFeaturesAtPixel(t,e){const i=[];return this.forEachFeatureAtPixel(t,(function(t){i.push(t)}),e),i}getAllLayers(){const t=[];return function e(i){i.forEach((function(i){i instanceof h.Z?e(i.getLayers()):t.push(i)}))}(this.getLayers()),t}hasFeatureAtPixel(t,e){if(!this.frameState_||!this.renderer_)return!1;const i=this.getCoordinateFromPixelInternal(t),n=void 0!==(e=void 0!==e?e:{}).layerFilter?e.layerFilter:w.uX,r=void 0!==e.hitTolerance?e.hitTolerance:0,s=!1!==e.checkWrapped;return this.renderer_.hasFeatureAtCoordinate(i,this.frameState_,r,s,n,null)}getEventCoordinate(t){return this.getCoordinateFromPixel(this.getEventPixel(t))}getEventCoordinateInternal(t){return this.getCoordinateFromPixelInternal(this.getEventPixel(t))}getEventPixel(t){const e=this.viewport_.getBoundingClientRect(),i=this.getSize(),n=e.width/i[0],r=e.height/i[1],s="changedTouches"in t?t.changedTouches[0]:t;return[(s.clientX-e.left)/n,(s.clientY-e.top)/r]}getTarget(){return this.get(f.Z.TARGET)}getTargetElement(){return this.targetElement_}getCoordinateFromPixel(t){return(0,L.toUserCoordinate)(this.getCoordinateFromPixelInternal(t),this.getView().getProjection())}getCoordinateFromPixelInternal(t){const e=this.frameState_;return e?(0,S.nn)(e.pixelToCoordinateTransform,t.slice()):null}getControls(){return this.controls}getOverlays(){return this.overlays_}getOverlayById(t){const e=this.overlayIdIndex_[t.toString()];return void 0!==e?e:null}getInteractions(){return this.interactions}getLayerGroup(){return this.get(f.Z.LAYERGROUP)}setLayers(t){const e=this.getLayerGroup();if(t instanceof r.Z)return void e.setLayers(t);const i=e.getLayers();i.clear(),i.extend(t)}getLayers(){return this.getLayerGroup().getLayers()}getLoadingOrNotReady(){const t=this.getLayerGroup().getLayerStatesArray();for(let e=0,i=t.length;e<i;++e){const i=t[e];if(!i.visible)continue;const n=i.layer.getRenderer();if(n&&!n.ready)return!0;const r=i.layer.getSource();if(r&&r.loading)return!0}return!1}getPixelFromCoordinate(t){const e=(0,L.fromUserCoordinate)(t,this.getView().getProjection());return this.getPixelFromCoordinateInternal(e)}getPixelFromCoordinateInternal(t){const e=this.frameState_;return e?(0,S.nn)(e.coordinateToPixelTransform,t.slice(0,2)):null}getRenderer(){return this.renderer_}getSize(){return this.get(f.Z.SIZE)}getView(){return this.get(f.Z.VIEW)}getViewport(){return this.viewport_}getOverlayContainer(){return this.overlayContainer_}getOverlayContainerStopEvent(){return this.overlayContainerStopEvent_}getOwnerDocument(){const t=this.getTargetElement();return t?t.ownerDocument:document}getTilePriority(t,e,i,n){return(0,v.R)(this.frameState_,t,e,i,n)}handleBrowserEvent(t,e){e=e||t.type;const i=new u.Z(e,this,t);this.handleMapBrowserEvent(i)}handleMapBrowserEvent(t){if(!this.frameState_)return;const e=t.originalEvent,i=e.type;if(i===_.Z.POINTERDOWN||i===a.Z.WHEEL||i===a.Z.KEYDOWN){const t=this.getOwnerDocument(),i=this.viewport_.getRootNode?this.viewport_.getRootNode():t,n=e.target;if(this.overlayContainerStopEvent_.contains(n)||!(i===t?t.documentElement:i).contains(n))return}if(t.frameState=this.frameState_,!1!==this.dispatchEvent(t)){const e=this.getInteractions().getArray().slice();for(let i=e.length-1;i>=0;i--){const n=e[i];if(n.getMap()===this&&n.getActive()&&this.getTargetElement()&&(!n.handleEvent(t)||t.propagationStopped))break}}}handlePostRender(){const t=this.frameState_,e=this.tileQueue_;if(!e.isEmpty()){let i=this.maxTilesLoading_,n=i;if(t){const e=t.viewHints;if(e[E.Z.ANIMATING]||e[E.Z.INTERACTING]){const e=Date.now()-t.time>8;i=e?0:8,n=e?0:2}}e.getTilesLoading()<i&&(e.reprioritize(),e.loadMoreTiles(i,n))}t&&this.renderer_&&!t.animate&&(!0===this.renderComplete_?(this.hasListener(y.Z.RENDERCOMPLETE)&&this.renderer_.dispatchRenderEvent(y.Z.RENDERCOMPLETE,t),!1===this.loaded_&&(this.loaded_=!0,this.dispatchEvent(new g.Z(p.Z.LOADEND,this,t)))):!0===this.loaded_&&(this.loaded_=!1,this.dispatchEvent(new g.Z(p.Z.LOADSTART,this,t))));const i=this.postRenderFunctions_;for(let e=0,n=i.length;e<n;++e)i[e](this,t);i.length=0}handleSizeChanged_(){this.getView()&&!this.getView().getAnimating()&&this.getView().resolveConstraints(0),this.render()}handleTargetChanged_(){if(this.mapBrowserEventHandler_){for(let t=0,e=this.targetChangeHandlerKeys_.length;t<e;++t)(0,A.bN)(this.targetChangeHandlerKeys_[t]);this.targetChangeHandlerKeys_=null,this.viewport_.removeEventListener(a.Z.CONTEXTMENU,this.boundHandleBrowserEvent_),this.viewport_.removeEventListener(a.Z.WHEEL,this.boundHandleBrowserEvent_),this.mapBrowserEventHandler_.dispose(),this.mapBrowserEventHandler_=null,(0,Z.ZF)(this.viewport_)}if(this.targetElement_){this.resizeObserver_.unobserve(this.targetElement_);const t=this.targetElement_.getRootNode();t instanceof ShadowRoot&&this.resizeObserver_.unobserve(t.host),this.setSize(void 0)}const t=this.getTarget(),e="string"==typeof t?document.getElementById(t):t;if(this.targetElement_=e,e){e.appendChild(this.viewport_),this.renderer_||(this.renderer_=new o.Z(this)),this.mapBrowserEventHandler_=new c.Z(this,this.moveTolerance_);for(const t in d.Z)this.mapBrowserEventHandler_.addEventListener(d.Z[t],this.handleMapBrowserEvent.bind(this));this.viewport_.addEventListener(a.Z.CONTEXTMENU,this.boundHandleBrowserEvent_,!1),this.viewport_.addEventListener(a.Z.WHEEL,this.boundHandleBrowserEvent_,!!b.bM&&{passive:!1});const t=this.keyboardEventTarget_?this.keyboardEventTarget_:e;this.targetChangeHandlerKeys_=[(0,A.oL)(t,a.Z.KEYDOWN,this.handleBrowserEvent,this),(0,A.oL)(t,a.Z.KEYPRESS,this.handleBrowserEvent,this)];const i=e.getRootNode();i instanceof ShadowRoot&&this.resizeObserver_.observe(i.host),this.resizeObserver_.observe(e)}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()}handleTileChange_(){this.render()}handleViewPropertyChanged_(){this.render()}handleViewChanged_(){this.viewPropertyListenerKey_&&((0,A.bN)(this.viewPropertyListenerKey_),this.viewPropertyListenerKey_=null),this.viewChangeListenerKey_&&((0,A.bN)(this.viewChangeListenerKey_),this.viewChangeListenerKey_=null);const t=this.getView();t&&(this.updateViewportSize_(),this.viewPropertyListenerKey_=(0,A.oL)(t,m.Z.PROPERTYCHANGE,this.handleViewPropertyChanged_,this),this.viewChangeListenerKey_=(0,A.oL)(t,a.Z.CHANGE,this.handleViewPropertyChanged_,this),t.resolveConstraints(0)),this.render()}handleLayerGroupChanged_(){this.layerGroupPropertyListenerKeys_&&(this.layerGroupPropertyListenerKeys_.forEach(A.bN),this.layerGroupPropertyListenerKeys_=null);const t=this.getLayerGroup();t&&(this.handleLayerAdd_(new h.V("addlayer",t)),this.layerGroupPropertyListenerKeys_=[(0,A.oL)(t,m.Z.PROPERTYCHANGE,this.render,this),(0,A.oL)(t,a.Z.CHANGE,this.render,this),(0,A.oL)(t,"addlayer",this.handleLayerAdd_,this),(0,A.oL)(t,"removelayer",this.handleLayerRemove_,this)]),this.render()}isRendered(){return!!this.frameState_}animationDelay_(){this.animationDelayKey_=void 0,this.renderFrame_(Date.now())}renderSync(){this.animationDelayKey_&&cancelAnimationFrame(this.animationDelayKey_),this.animationDelay_()}redrawText(){const t=this.getLayerGroup().getLayerStatesArray();for(let e=0,i=t.length;e<i;++e){const i=t[e].layer;i.hasRenderer()&&i.getRenderer().handleFontsChanged()}}render(){this.renderer_&&void 0===this.animationDelayKey_&&(this.animationDelayKey_=requestAnimationFrame(this.animationDelay_))}flushDeclutterItems(){const t=this.frameState_;t&&this.renderer_.flushDeclutterItems(t)}removeControl(t){return this.getControls().remove(t)}removeInteraction(t){return this.getInteractions().remove(t)}removeLayer(t){return this.getLayerGroup().getLayers().remove(t)}handleLayerRemove_(t){O(t.layer)}removeOverlay(t){return this.getOverlays().remove(t)}renderFrame_(t){const e=this.getSize(),i=this.getView(),n=this.frameState_;let r=null;if(void 0!==e&&(0,F.py)(e)&&i&&i.isDef()){const n=i.getHints(this.frameState_?this.frameState_.viewHints:void 0),s=i.getState();if(r={animate:!1,coordinateToPixelTransform:this.coordinateToPixelTransform_,declutterTree:null,extent:(0,C.getForViewAndSize)(s.center,s.resolution,s.rotation,e),index:this.frameIndex_++,layerIndex:0,layerStatesArray:this.getLayerGroup().getLayerStatesArray(),pixelRatio:this.pixelRatio_,pixelToCoordinateTransform:this.pixelToCoordinateTransform_,postRenderFunctions:[],size:e,tileQueue:this.tileQueue_,time:t,usedTiles:{},viewState:s,viewHints:n,wantedTiles:{},mapId:(0,M.sq)(this),renderTargets:{}},s.nextCenter&&s.nextResolution){const t=isNaN(s.nextRotation)?s.rotation:s.nextRotation;r.nextExtent=(0,C.getForViewAndSize)(s.nextCenter,s.nextResolution,t,e)}}this.frameState_=r,this.renderer_.renderFrame(r),r&&(r.animate&&this.render(),Array.prototype.push.apply(this.postRenderFunctions_,r.postRenderFunctions),n&&(!this.previousExtent_||!(0,C.isEmpty)(this.previousExtent_)&&!(0,C.equals)(r.extent,this.previousExtent_))&&(this.dispatchEvent(new g.Z(p.Z.MOVESTART,this,n)),this.previousExtent_=(0,C.createOrUpdateEmpty)(this.previousExtent_)),this.previousExtent_&&!r.viewHints[E.Z.ANIMATING]&&!r.viewHints[E.Z.INTERACTING]&&!(0,C.equals)(r.extent,this.previousExtent_)&&(this.dispatchEvent(new g.Z(p.Z.MOVEEND,this,r)),(0,C.clone)(r.extent,this.previousExtent_))),this.dispatchEvent(new g.Z(p.Z.POSTRENDER,this,r)),this.renderComplete_=this.hasListener(p.Z.LOADSTART)||this.hasListener(p.Z.LOADEND)||this.hasListener(y.Z.RENDERCOMPLETE)?!this.tileQueue_.getTilesLoading()&&!this.tileQueue_.getCount()&&!this.getLoadingOrNotReady():void 0,this.postRenderTimeoutHandle_||(this.postRenderTimeoutHandle_=setTimeout((()=>{this.postRenderTimeoutHandle_=void 0,this.handlePostRender()}),0))}setLayerGroup(t){const e=this.getLayerGroup();e&&this.handleLayerRemove_(new h.V("removelayer",e)),this.set(f.Z.LAYERGROUP,t)}setSize(t){this.set(f.Z.SIZE,t)}setTarget(t){this.set(f.Z.TARGET,t)}setView(t){if(!t||t instanceof x.ZP)return void this.set(f.Z.VIEW,t);this.set(f.Z.VIEW,new x.ZP);const e=this;t.then((function(t){e.setView(new x.ZP(t))}))}updateSize(){const t=this.getTargetElement();let e;if(t){const i=getComputedStyle(t),n=t.offsetWidth-parseFloat(i.borderLeftWidth)-parseFloat(i.paddingLeft)-parseFloat(i.paddingRight)-parseFloat(i.borderRightWidth),r=t.offsetHeight-parseFloat(i.borderTopWidth)-parseFloat(i.paddingTop)-parseFloat(i.paddingBottom)-parseFloat(i.borderBottomWidth);isNaN(n)||isNaN(r)||(e=[n,r],!(0,F.py)(e)&&(t.offsetWidth||t.offsetHeight||t.getClientRects().length)&&(0,D.ZK)("No map visible because the map container's width or height are 0."))}const i=this.getSize();!e||i&&(0,I.fS)(e,i)||(this.setSize(e),this.updateViewportSize_())}updateViewportSize_(){const t=this.getView();if(t){let e;const i=getComputedStyle(this.viewport_);i.width&&i.height&&(e=[parseInt(i.width,10),parseInt(i.height,10)]),t.setViewportSize(e)}}}const z=G},8630:(t,e,i)=>{"use strict";i.d(e,{Z:()=>s});var n=i(3536);class r extends n.Z{constructor(t,e,i,n,r,s){super(t,e,r),this.originalEvent=i,this.pixel_=null,this.coordinate_=null,this.dragging=void 0!==n&&n,this.activePointers=s}get pixel(){return this.pixel_||(this.pixel_=this.map.getEventPixel(this.originalEvent)),this.pixel_}set pixel(t){this.pixel_=t}get coordinate(){return this.coordinate_||(this.coordinate_=this.map.getCoordinateFromPixel(this.pixel)),this.coordinate_}set coordinate(t){this.coordinate_=t}preventDefault(){super.preventDefault(),"preventDefault"in this.originalEvent&&this.originalEvent.preventDefault()}stopPropagation(){super.stopPropagation(),"stopPropagation"in this.originalEvent&&this.originalEvent.stopPropagation()}}const s=r},1708:(t,e,i)=>{"use strict";i.d(e,{Z:()=>c});var n=i(5487),r=i(8630),s=i(2217),o=i(4238),a=i(208),l=i(177),h=i(5818);class u extends a.Z{constructor(t,e){super(t),this.map_=t,this.clickTimeoutId_,this.emulateClicks_=!1,this.dragging_=!1,this.dragListenerKeys_=[],this.moveTolerance_=void 0===e?1:e,this.down_=null;const i=this.map_.getViewport();this.activePointers_=[],this.trackedTouches_={},this.element_=i,this.pointerdownListenerKey_=(0,h.oL)(i,o.Z.POINTERDOWN,this.handlePointerDown_,this),this.originalPointerMoveEvent_,this.relayedListenerKey_=(0,h.oL)(i,o.Z.POINTERMOVE,this.relayMoveEvent_,this),this.boundHandleTouchMove_=this.handleTouchMove_.bind(this),this.element_.addEventListener(n.Z.TOUCHMOVE,this.boundHandleTouchMove_,!!l.bM&&{passive:!1})}emulateClick_(t){let e=new r.Z(s.Z.CLICK,this.map_,t);this.dispatchEvent(e),void 0!==this.clickTimeoutId_?(clearTimeout(this.clickTimeoutId_),this.clickTimeoutId_=void 0,e=new r.Z(s.Z.DBLCLICK,this.map_,t),this.dispatchEvent(e)):this.clickTimeoutId_=setTimeout((()=>{this.clickTimeoutId_=void 0;const e=new r.Z(s.Z.SINGLECLICK,this.map_,t);this.dispatchEvent(e)}),250)}updateActivePointers_(t){const e=t,i=e.pointerId;if(e.type==s.Z.POINTERUP||e.type==s.Z.POINTERCANCEL){delete this.trackedTouches_[i];for(const t in this.trackedTouches_)if(this.trackedTouches_[t].target!==e.target){delete this.trackedTouches_[t];break}}else e.type!=s.Z.POINTERDOWN&&e.type!=s.Z.POINTERMOVE||(this.trackedTouches_[i]=e);this.activePointers_=Object.values(this.trackedTouches_)}handlePointerUp_(t){this.updateActivePointers_(t);const e=new r.Z(s.Z.POINTERUP,this.map_,t,void 0,void 0,this.activePointers_);this.dispatchEvent(e),this.emulateClicks_&&!e.defaultPrevented&&!this.dragging_&&this.isMouseActionButton_(t)&&this.emulateClick_(this.down_),0===this.activePointers_.length&&(this.dragListenerKeys_.forEach(h.bN),this.dragListenerKeys_.length=0,this.dragging_=!1,this.down_=null)}isMouseActionButton_(t){return 0===t.button}handlePointerDown_(t){this.emulateClicks_=0===this.activePointers_.length,this.updateActivePointers_(t);const e=new r.Z(s.Z.POINTERDOWN,this.map_,t,void 0,void 0,this.activePointers_);if(this.dispatchEvent(e),this.down_=new PointerEvent(t.type,t),Object.defineProperty(this.down_,"target",{writable:!1,value:t.target}),0===this.dragListenerKeys_.length){const t=this.map_.getOwnerDocument();this.dragListenerKeys_.push((0,h.oL)(t,s.Z.POINTERMOVE,this.handlePointerMove_,this),(0,h.oL)(t,s.Z.POINTERUP,this.handlePointerUp_,this),(0,h.oL)(this.element_,s.Z.POINTERCANCEL,this.handlePointerUp_,this)),this.element_.getRootNode&&this.element_.getRootNode()!==t&&this.dragListenerKeys_.push((0,h.oL)(this.element_.getRootNode(),s.Z.POINTERUP,this.handlePointerUp_,this))}}handlePointerMove_(t){if(this.isMoving_(t)){this.updateActivePointers_(t),this.dragging_=!0;const e=new r.Z(s.Z.POINTERDRAG,this.map_,t,this.dragging_,void 0,this.activePointers_);this.dispatchEvent(e)}}relayMoveEvent_(t){this.originalPointerMoveEvent_=t;const e=!(!this.down_||!this.isMoving_(t));this.dispatchEvent(new r.Z(s.Z.POINTERMOVE,this.map_,t,e))}handleTouchMove_(t){const e=this.originalPointerMoveEvent_;e&&!e.defaultPrevented||"boolean"==typeof t.cancelable&&!0!==t.cancelable||t.preventDefault()}isMoving_(t){return this.dragging_||Math.abs(t.clientX-this.down_.clientX)>this.moveTolerance_||Math.abs(t.clientY-this.down_.clientY)>this.moveTolerance_}disposeInternal(){this.relayedListenerKey_&&((0,h.bN)(this.relayedListenerKey_),this.relayedListenerKey_=null),this.element_.removeEventListener(n.Z.TOUCHMOVE,this.boundHandleTouchMove_),this.pointerdownListenerKey_&&((0,h.bN)(this.pointerdownListenerKey_),this.pointerdownListenerKey_=null),this.dragListenerKeys_.forEach(h.bN),this.dragListenerKeys_.length=0,this.element_=null,super.disposeInternal()}}const c=u},2217:(t,e,i)=>{"use strict";i.d(e,{Z:()=>r});var n=i(5487);const r={SINGLECLICK:"singleclick",CLICK:n.Z.CLICK,DBLCLICK:n.Z.DBLCLICK,POINTERDRAG:"pointerdrag",POINTERMOVE:"pointermove",POINTERDOWN:"pointerdown",POINTERUP:"pointerup",POINTEROVER:"pointerover",POINTEROUT:"pointerout",POINTERENTER:"pointerenter",POINTERLEAVE:"pointerleave",POINTERCANCEL:"pointercancel"}},3536:(t,e,i)=>{"use strict";i.d(e,{Z:()=>s});var n=i(291);class r extends n.ZP{constructor(t,e,i){super(t),this.map=e,this.frameState=void 0!==i?i:null}}const s=r},2126:(t,e,i)=>{"use strict";i.d(e,{Z:()=>n});const n={POSTRENDER:"postrender",MOVESTART:"movestart",MOVEEND:"moveend",LOADSTART:"loadstart",LOADEND:"loadend"}},3222:(t,e,i)=>{"use strict";i.d(e,{Z:()=>n});const n={LAYERGROUP:"layergroup",SIZE:"size",TARGET:"target",VIEW:"view"}},2971:(t,e,i)=>{"use strict";i.d(e,{Z:()=>u});var n=i(291),r=i(5990),s=i(2706),o=i(4187),a=i(9374);class l extends n.ZP{constructor(t,e,i){super(t),this.key=e,this.oldValue=i}}class h extends s.Z{constructor(t){super(),this.on,this.once,this.un,(0,o.sq)(this),this.values_=null,void 0!==t&&this.setProperties(t)}get(t){let e;return this.values_&&this.values_.hasOwnProperty(t)&&(e=this.values_[t]),e}getKeys(){return this.values_&&Object.keys(this.values_)||[]}getProperties(){return this.values_&&Object.assign({},this.values_)||{}}hasProperties(){return!!this.values_}notify(t,e){let i;i=`change:${t}`,this.hasListener(i)&&this.dispatchEvent(new l(i,t,e)),i=r.Z.PROPERTYCHANGE,this.hasListener(i)&&this.dispatchEvent(new l(i,t,e))}addChangeListener(t,e){this.addEventListener(`change:${t}`,e)}removeChangeListener(t,e){this.removeEventListener(`change:${t}`,e)}set(t,e,i){const n=this.values_||(this.values_={});if(i)n[t]=e;else{const i=n[t];n[t]=e,i!==e&&this.notify(t,i)}}setProperties(t,e){for(const i in t)this.set(i,t[i],e)}applyProperties(t){t.values_&&Object.assign(this.values_||(this.values_={}),t.values_)}unset(t,e){if(this.values_&&t in this.values_){const i=this.values_[t];delete this.values_[t],(0,a.x)(this.values_)&&(this.values_=null),e||this.notify(t,i)}}}const u=h},5990:(t,e,i)=>{"use strict";i.d(e,{Z:()=>n});const n={PROPERTYCHANGE:"propertychange"}},2706:(t,e,i)=>{"use strict";i.d(e,{Z:()=>a});var n=i(208),r=i(5487),s=i(5818);class o extends n.Z{constructor(){super(),this.on=this.onInternal,this.once=this.onceInternal,this.un=this.unInternal,this.revision_=0}changed(){++this.revision_,this.dispatchEvent(r.Z.CHANGE)}getRevision(){return this.revision_}onInternal(t,e){if(Array.isArray(t)){const i=t.length,n=new Array(i);for(let r=0;r<i;++r)n[r]=(0,s.oL)(this,t[r],e);return n}return(0,s.oL)(this,t,e)}onceInternal(t,e){let i;if(Array.isArray(t)){const n=t.length;i=new Array(n);for(let r=0;r<n;++r)i[r]=(0,s.Vx)(this,t[r],e)}else i=(0,s.Vx)(this,t,e);return e.ol_key=i,i}unInternal(t,e){const i=e.ol_key;if(i)!function(t){if(Array.isArray(t))for(let e=0,i=t.length;e<i;++e)(0,s.bN)(t[e]);else(0,s.bN)(t)}(i);else if(Array.isArray(t))for(let i=0,n=t.length;i<n;++i)this.removeEventListener(t[i],e);else this.removeEventListener(t,e)}}o.prototype.on,o.prototype.once,o.prototype.un;const a=o},3223:(t,e,i)=>{"use strict";i.d(e,{Z:()=>f});var n=i(2971),r=i(2126),s=i(245),o=i(8641),a=i(5818),l=i(8326);const h="element",u="map",c="offset",d="position",g="positioning";class p extends n.Z{constructor(t){super(),this.on,this.once,this.un,this.options=t,this.id=t.id,this.insertFirst=void 0===t.insertFirst||t.insertFirst,this.stopEvent=void 0===t.stopEvent||t.stopEvent,this.element=document.createElement("div"),this.element.className=void 0!==t.className?t.className:"ol-overlay-container "+s.$A,this.element.style.position="absolute",this.element.style.pointerEvents="auto",this.autoPan=!0===t.autoPan?{}:t.autoPan||void 0,this.rendered={transform_:"",visible:!0},this.mapPostrenderListenerKey=null,this.addChangeListener(h,this.handleElementChanged),this.addChangeListener(u,this.handleMapChanged),this.addChangeListener(c,this.handleOffsetChanged),this.addChangeListener(d,this.handlePositionChanged),this.addChangeListener(g,this.handlePositioningChanged),void 0!==t.element&&this.setElement(t.element),this.setOffset(void 0!==t.offset?t.offset:[0,0]),this.setPositioning(t.positioning||"top-left"),void 0!==t.position&&this.setPosition(t.position)}getElement(){return this.get(h)}getId(){return this.id}getMap(){return this.get(u)||null}getOffset(){return this.get(c)}getPosition(){return this.get(d)}getPositioning(){return this.get(g)}handleElementChanged(){(0,l.ep)(this.element);const t=this.getElement();t&&this.element.appendChild(t)}handleMapChanged(){this.mapPostrenderListenerKey&&((0,l.ZF)(this.element),(0,a.bN)(this.mapPostrenderListenerKey),this.mapPostrenderListenerKey=null);const t=this.getMap();if(t){this.mapPostrenderListenerKey=(0,a.oL)(t,r.Z.POSTRENDER,this.render,this),this.updatePixelPosition();const e=this.stopEvent?t.getOverlayContainerStopEvent():t.getOverlayContainer();this.insertFirst?e.insertBefore(this.element,e.childNodes[0]||null):e.appendChild(this.element),this.performAutoPan()}}render(){this.updatePixelPosition()}handleOffsetChanged(){this.updatePixelPosition()}handlePositionChanged(){this.updatePixelPosition(),this.performAutoPan()}handlePositioningChanged(){this.updatePixelPosition()}setElement(t){this.set(h,t)}setMap(t){this.set(u,t)}setOffset(t){this.set(c,t)}setPosition(t){this.set(d,t)}performAutoPan(){this.autoPan&&this.panIntoView(this.autoPan)}panIntoView(t){const e=this.getMap();if(!e||!e.getTargetElement()||!this.get(d))return;const i=this.getRect(e.getTargetElement(),e.getSize()),n=this.getElement(),r=this.getRect(n,[(0,l.iO)(n),(0,l.Pb)(n)]),s=void 0===(t=t||{}).margin?20:t.margin;if(!(0,o.containsExtent)(i,r)){const n=r[0]-i[0],o=i[2]-r[2],a=r[1]-i[1],l=i[3]-r[3],h=[0,0];if(n<0?h[0]=n-s:o<0&&(h[0]=Math.abs(o)+s),a<0?h[1]=a-s:l<0&&(h[1]=Math.abs(l)+s),0!==h[0]||0!==h[1]){const i=e.getView().getCenterInternal(),n=e.getPixelFromCoordinateInternal(i);if(!n)return;const r=[n[0]+h[0],n[1]+h[1]],s=t.animation||{};e.getView().animateInternal({center:e.getCoordinateFromPixelInternal(r),duration:s.duration,easing:s.easing})}}}getRect(t,e){const i=t.getBoundingClientRect(),n=i.left+window.pageXOffset,r=i.top+window.pageYOffset;return[n,r,n+e[0],r+e[1]]}setPositioning(t){this.set(g,t)}setVisible(t){this.rendered.visible!==t&&(this.element.style.display=t?"":"none",this.rendered.visible=t)}updatePixelPosition(){const t=this.getMap(),e=this.getPosition();if(!t||!t.isRendered()||!e)return void this.setVisible(!1);const i=t.getPixelFromCoordinate(e),n=t.getSize();this.updateRenderedPosition(i,n)}updateRenderedPosition(t,e){const i=this.element.style,n=this.getOffset(),r=this.getPositioning();this.setVisible(!0);let s="0%",o="0%";"bottom-right"==r||"center-right"==r||"top-right"==r?s="-100%":"bottom-center"!=r&&"center-center"!=r&&"top-center"!=r||(s="-50%"),"bottom-left"==r||"bottom-center"==r||"bottom-right"==r?o="-100%":"center-left"!=r&&"center-center"!=r&&"center-right"!=r||(o="-50%");const a=`translate(${s}, ${o}) translate(${Math.round(t[0]+n[0])+"px"}, ${Math.round(t[1]+n[1])+"px"})`;this.rendered.transform_!=a&&(this.rendered.transform_=a,i.transform=a)}getOptions(){return this.options}}const f=p},4806:(t,e,i)=>{"use strict";i.d(e,{Z:()=>h});var n=i(208),r=i(5487),s=i(7195),o=i(4187),a=i(1015);class l extends n.Z{constructor(t,e,i){super(),i=i||{},this.tileCoord=t,this.state=e,this.interimTile=null,this.key="",this.transition_=void 0===i.transition?250:i.transition,this.transitionStarts_={},this.interpolate=!!i.interpolate}changed(){this.dispatchEvent(r.Z.CHANGE)}release(){this.state===s.Z.ERROR&&this.setState(s.Z.EMPTY)}getKey(){return this.key+"/"+this.tileCoord}getInterimTile(){if(!this.interimTile)return this;let t=this.interimTile;do{if(t.getState()==s.Z.LOADED)return this.transition_=0,t;t=t.interimTile}while(t);return this}refreshInterimChain(){if(!this.interimTile)return;let t=this.interimTile,e=this;do{if(t.getState()==s.Z.LOADED){t.interimTile=null;break}t.getState()==s.Z.LOADING?e=t:t.getState()==s.Z.IDLE?e.interimTile=t.interimTile:e=t,t=e.interimTile}while(t)}getTileCoord(){return this.tileCoord}getState(){return this.state}setState(t){if(this.state!==s.Z.ERROR&&this.state>t)throw new Error("Tile load sequence violation");this.state=t,this.changed()}load(){(0,o.O3)()}getAlpha(t,e){if(!this.transition_)return 1;let i=this.transitionStarts_[t];if(i){if(-1===i)return 1}else i=e,this.transitionStarts_[t]=i;const n=e-i+1e3/60;return n>=this.transition_?1:(0,a.YQ)(n/this.transition_)}inTransition(t){return!!this.transition_&&-1!==this.transitionStarts_[t]}endTransition(t){this.transition_&&(this.transitionStarts_[t]=-1)}}const h=l},1702:(t,e,i)=>{"use strict";i.d(e,{Z:()=>o});var n=i(6131),r=i(8634);class s extends n.Z{clear(){for(;this.getCount()>0;)this.pop().release();super.clear()}expireCache(t){for(;this.canExpireCache()&&!(this.peekLast().getKey()in t);)this.pop().release()}pruneExceptNewestZ(){if(0===this.getCount())return;const t=this.peekFirstKey(),e=(0,r.Ul)(t)[0];this.forEach((t=>{t.tileCoord[0]!==e&&(this.remove((0,r.km)(t.tileCoord)),t.release())}))}}const o=s},9882:(t,e,i)=>{"use strict";i.d(e,{R:()=>l,Z:()=>a});var n=i(5487),r=i(2729),s=i(7195);class o extends r.Z{constructor(t,e){super((function(e){return t.apply(null,e)}),(function(t){return t[0].getKey()})),this.boundHandleTileChange_=this.handleTileChange.bind(this),this.tileChangeCallback_=e,this.tilesLoading_=0,this.tilesLoadingKeys_={}}enqueue(t){const e=super.enqueue(t);return e&&t[0].addEventListener(n.Z.CHANGE,this.boundHandleTileChange_),e}getTilesLoading(){return this.tilesLoading_}handleTileChange(t){const e=t.target,i=e.getState();if(i===s.Z.LOADED||i===s.Z.ERROR||i===s.Z.EMPTY){i!==s.Z.ERROR&&e.removeEventListener(n.Z.CHANGE,this.boundHandleTileChange_);const t=e.getKey();t in this.tilesLoadingKeys_&&(delete this.tilesLoadingKeys_[t],--this.tilesLoading_),this.tileChangeCallback_()}}loadMoreTiles(t,e){let i,n,r,o=0;for(;this.tilesLoading_<t&&o<e&&this.getCount()>0;)n=this.dequeue()[0],r=n.getKey(),i=n.getState(),i!==s.Z.IDLE||r in this.tilesLoadingKeys_||(this.tilesLoadingKeys_[r]=!0,++this.tilesLoading_,++o,n.load())}}const a=o;function l(t,e,i,n,s){if(!t||!(i in t.wantedTiles))return r.r;if(!t.wantedTiles[i][e.getKey()])return r.r;const o=t.viewState.center,a=n[0]-o[0],l=n[1]-o[1];return 65536*Math.log(s)+Math.sqrt(a*a+l*l)/s}},2519:(t,e,i)=>{"use strict";i.d(e,{T:()=>r,Z:()=>s});class n{constructor(t,e,i,n){this.minX=t,this.maxX=e,this.minY=i,this.maxY=n}contains(t){return this.containsXY(t[1],t[2])}containsTileRange(t){return this.minX<=t.minX&&t.maxX<=this.maxX&&this.minY<=t.minY&&t.maxY<=this.maxY}containsXY(t,e){return this.minX<=t&&t<=this.maxX&&this.minY<=e&&e<=this.maxY}equals(t){return this.minX==t.minX&&this.minY==t.minY&&this.maxX==t.maxX&&this.maxY==t.maxY}extend(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)}getHeight(){return this.maxY-this.minY+1}getSize(){return[this.getWidth(),this.getHeight()]}getWidth(){return this.maxX-this.minX+1}intersects(t){return this.minX<=t.maxX&&this.maxX>=t.minX&&this.minY<=t.maxY&&this.maxY>=t.minY}}function r(t,e,i,r,s){return void 0!==s?(s.minX=t,s.maxX=e,s.minY=i,s.maxY=r,s):new n(t,e,i,r)}const s=n},7195:(t,e,i)=>{"use strict";i.d(e,{Z:()=>n});const n={IDLE:0,LOADING:1,LOADED:2,ERROR:3,EMPTY:4}},2559:(t,e,i)=>{"use strict";i.d(e,{Z:()=>l});var n=i(4806),r=i(8326),s=i(4187);const o=[];class a extends n.Z{constructor(t,e,i,n){super(t,e,{transition:0}),this.context_={},this.executorGroups={},this.declutterExecutorGroups={},this.loadingSourceTiles=0,this.hitDetectionImageData={},this.replayState_={},this.sourceTiles=[],this.errorTileKeys={},this.wantedResolution,this.getSourceTiles=n.bind(void 0,this),this.wrappedTileCoord=i}getContext(t){const e=(0,s.sq)(t);return e in this.context_||(this.context_[e]=(0,r.E4)(1,1,o)),this.context_[e]}hasContext(t){return(0,s.sq)(t)in this.context_}getImage(t){return this.hasContext(t)?this.getContext(t).canvas:null}getReplayState(t){const e=(0,s.sq)(t);return e in this.replayState_||(this.replayState_[e]={dirty:!1,renderedRenderOrder:null,renderedResolution:NaN,renderedRevision:-1,renderedTileResolution:NaN,renderedTileRevision:-1,renderedTileZ:-1}),this.replayState_[e]}load(){this.getSourceTiles()}release(){for(const t in this.context_){const e=this.context_[t];(0,r.jy)(e),o.push(e.canvas),delete this.context_[t]}super.release()}}const l=a},4759:(t,e,i)=>{"use strict";i.d(e,{Z:()=>o});var n=i(4806),r=i(7195);class s extends n.Z{constructor(t,e,i,n,r,s){super(t,e,s),this.extent=null,this.format_=n,this.features_=null,this.loader_,this.projection=null,this.resolution,this.tileLoadFunction_=r,this.url_=i,this.key=i}getFormat(){return this.format_}getFeatures(){return this.features_}load(){this.state==r.Z.IDLE&&(this.setState(r.Z.LOADING),this.tileLoadFunction_(this,this.url_),this.loader_&&this.loader_(this.extent,this.resolution,this.projection))}onLoad(t,e){this.setFeatures(t)}onError(){this.setState(r.Z.ERROR)}setFeatures(t){this.features_=t,this.setState(r.Z.LOADED)}setLoader(t){this.loader_=t}}const o=s},7681:(t,e,i)=>{"use strict";i.d(e,{ZP:()=>w});var n=i(2971),r=i(7755),s=i(7240),o=i(4768),a=i(6121),l=i(6885),h=i(1900),u=i(9515),c=i(8427),d=i(3983),g=i(9307),p=i(828),f=i(1015),m=i(8641),_=i(5537),y=i(2033);class v extends n.Z{constructor(t){super(),this.on,this.once,this.un,t=Object.assign({},t),this.hints_=[0,0],this.animations_=[],this.updateAnimationKey_,this.projection_=(0,a.createProjection)(t.projection,"EPSG:3857"),this.viewportSize_=[100,100],this.targetCenter_=null,this.targetResolution_,this.targetRotation_,this.nextCenter_=null,this.nextResolution_,this.nextRotation_,this.cancelAnchor_=void 0,t.projection&&(0,a.disableCoordinateWarning)(),t.center&&(t.center=(0,a.fromUserCoordinate)(t.center,this.projection_)),t.extent&&(t.extent=(0,a.fromUserExtent)(t.extent,this.projection_)),this.applyOptions_(t)}applyOptions_(t){const e=Object.assign({},t);for(const t in s.Z)delete e[t];this.setProperties(e,!0);const i=function(t){let e,i,n;let r=void 0!==t.minZoom?t.minZoom:0,s=void 0!==t.maxZoom?t.maxZoom:28;const l=void 0!==t.zoomFactor?t.zoomFactor:2,h=void 0!==t.multiWorld&&t.multiWorld,u=void 0===t.smoothResolutionConstraint||t.smoothResolutionConstraint,c=void 0!==t.showFullExtent&&t.showFullExtent,d=(0,a.createProjection)(t.projection,"EPSG:3857"),p=d.getExtent();let f=t.constrainOnlyCenter,_=t.extent;if(h||_||!d.isGlobal()||(f=!1,_=p),void 0!==t.resolutions){const o=t.resolutions;i=o[r],n=void 0!==o[s]?o[s]:o[o.length-1],e=t.constrainResolution?(0,g.gn)(o,u,!f&&_,c):(0,g.Is)(i,n,u,!f&&_,c)}else{const h=(p?Math.max((0,m.getWidth)(p),(0,m.getHeight)(p)):360*a.METERS_PER_UNIT.degrees/d.getMetersPerUnit())/o.S/Math.pow(2,0),y=h/Math.pow(2,28);i=t.maxResolution,void 0!==i?r=0:i=h/Math.pow(l,r),n=t.minResolution,void 0===n&&(n=void 0!==t.maxZoom?void 0!==t.maxResolution?i/Math.pow(l,s):h/Math.pow(l,s):y),s=r+Math.floor(Math.log(i/n)/Math.log(l)),n=i/Math.pow(l,s-r),e=t.constrainResolution?(0,g.cA)(l,i,n,u,!f&&_,c):(0,g.Is)(i,n,u,!f&&_,c)}return{constraint:e,maxResolution:i,minResolution:n,minZoom:r,zoomFactor:l}}(t);this.maxResolution_=i.maxResolution,this.minResolution_=i.minResolution,this.zoomFactor_=i.zoomFactor,this.resolutions_=t.resolutions,this.padding_=t.padding,this.minZoom_=i.minZoom;const n=function(t){if(void 0!==t.extent){const e=void 0===t.smoothExtentConstraint||t.smoothExtentConstraint;return(0,c.s)(t.extent,t.constrainOnlyCenter,e)}const e=(0,a.createProjection)(t.projection,"EPSG:3857");if(!0!==t.multiWorld&&e.isGlobal()){const t=e.getExtent().slice();return t[0]=-1/0,t[2]=1/0,(0,c.s)(t,!1,!1)}return c.Y}(t),r=i.constraint,l=function(t){if(void 0===t.enableRotation||t.enableRotation){const e=t.constrainRotation;return void 0===e||!0===e?(0,p.Gw)():!1===e?p.YP:"number"==typeof e?(0,p.gE)(e):p.YP}return p.h$}(t);this.constraints_={center:n,resolution:r,rotation:l},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)}get padding(){return this.padding_}set padding(t){let e=this.padding_;this.padding_=t;const i=this.getCenterInternal();if(i){const n=t||[0,0,0,0];e=e||[0,0,0,0];const r=this.getResolution(),s=r/2*(n[3]-e[3]+e[1]-n[1]),o=r/2*(n[0]-e[0]+e[2]-n[2]);this.setCenterInternal([i[0]+s,i[1]-o])}}getUpdatedOptions_(t){const e=this.getProperties();return void 0!==e.resolution?e.resolution=this.getResolution():e.zoom=this.getZoom(),e.center=this.getCenterInternal(),e.rotation=this.getRotation(),Object.assign({},e,t)}animate(t){this.isDef()&&!this.getAnimating()&&this.resolveConstraints(0);const e=new Array(arguments.length);for(let t=0;t<e.length;++t){let i=arguments[t];i.center&&(i=Object.assign({},i),i.center=(0,a.fromUserCoordinate)(i.center,this.getProjection())),i.anchor&&(i=Object.assign({},i),i.anchor=(0,a.fromUserCoordinate)(i.anchor,this.getProjection())),e[t]=i}this.animateInternal.apply(this,e)}animateInternal(t){let e,i=arguments.length;i>1&&"function"==typeof arguments[i-1]&&(e=arguments[i-1],--i);let n=0;for(;n<i&&!this.isDef();++n){const t=arguments[n];t.center&&this.setCenterInternal(t.center),void 0!==t.zoom?this.setZoom(t.zoom):t.resolution&&this.setResolution(t.resolution),void 0!==t.rotation&&this.setRotation(t.rotation)}if(n===i)return void(e&&x(e,!0));let s=Date.now(),o=this.targetCenter_.slice(),a=this.targetResolution_,l=this.targetRotation_;const h=[];for(;n<i;++n){const t=arguments[n],i={start:s,complete:!1,anchor:t.anchor,duration:void 0!==t.duration?t.duration:1e3,easing:t.easing||f.rd,callback:e};if(t.center&&(i.sourceCenter=o,i.targetCenter=t.center.slice(),o=i.targetCenter),void 0!==t.zoom?(i.sourceResolution=a,i.targetResolution=this.getResolutionForZoom(t.zoom),a=i.targetResolution):t.resolution&&(i.sourceResolution=a,i.targetResolution=t.resolution,a=i.targetResolution),void 0!==t.rotation){i.sourceRotation=l;const e=(0,d.$W)(t.rotation-l+Math.PI,2*Math.PI)-Math.PI;i.targetRotation=l+e,l=i.targetRotation}E(i)?i.complete=!0:s+=i.duration,h.push(i)}this.animations_.push(h),this.setHint(r.Z.ANIMATING,1),this.updateAnimations_()}getAnimating(){return this.hints_[r.Z.ANIMATING]>0}getInteracting(){return this.hints_[r.Z.INTERACTING]>0}cancelAnimations(){let t;this.setHint(r.Z.ANIMATING,-this.hints_[r.Z.ANIMATING]);for(let e=0,i=this.animations_.length;e<i;++e){const i=this.animations_[e];if(i[0].callback&&x(i[0].callback,!1),!t)for(let e=0,n=i.length;e<n;++e){const n=i[e];if(!n.complete){t=n.anchor;break}}}this.animations_.length=0,this.cancelAnchor_=t,this.nextCenter_=null,this.nextResolution_=NaN,this.nextRotation_=NaN}updateAnimations_(){if(void 0!==this.updateAnimationKey_&&(cancelAnimationFrame(this.updateAnimationKey_),this.updateAnimationKey_=void 0),!this.getAnimating())return;const t=Date.now();let e=!1;for(let i=this.animations_.length-1;i>=0;--i){const n=this.animations_[i];let s=!0;for(let i=0,r=n.length;i<r;++i){const r=n[i];if(r.complete)continue;const o=t-r.start;let a=r.duration>0?o/r.duration:1;a>=1?(r.complete=!0,a=1):s=!1;const l=r.easing(a);if(r.sourceCenter){const t=r.sourceCenter[0],e=r.sourceCenter[1],i=r.targetCenter[0],n=r.targetCenter[1];this.nextCenter_=r.targetCenter;const s=t+l*(i-t),o=e+l*(n-e);this.targetCenter_=[s,o]}if(r.sourceResolution&&r.targetResolution){const t=1===l?r.targetResolution:r.sourceResolution+l*(r.targetResolution-r.sourceResolution);if(r.anchor){const e=this.getViewportSize_(this.getRotation()),i=this.constraints_.resolution(t,0,e,!0);this.targetCenter_=this.calculateCenterZoom(i,r.anchor)}this.nextResolution_=r.targetResolution,this.targetResolution_=t,this.applyTargetState_(!0)}if(void 0!==r.sourceRotation&&void 0!==r.targetRotation){const t=1===l?(0,d.$W)(r.targetRotation+Math.PI,2*Math.PI)-Math.PI:r.sourceRotation+l*(r.targetRotation-r.sourceRotation);if(r.anchor){const e=this.constraints_.rotation(t,!0);this.targetCenter_=this.calculateCenterRotate(e,r.anchor)}this.nextRotation_=r.targetRotation,this.targetRotation_=t}if(this.applyTargetState_(!0),e=!0,!r.complete)break}if(s){this.animations_[i]=null,this.setHint(r.Z.ANIMATING,-1),this.nextCenter_=null,this.nextResolution_=NaN,this.nextRotation_=NaN;const t=n[0].callback;t&&x(t,!0)}}this.animations_=this.animations_.filter(Boolean),e&&void 0===this.updateAnimationKey_&&(this.updateAnimationKey_=requestAnimationFrame(this.updateAnimations_.bind(this)))}calculateCenterRotate(t,e){let i;const n=this.getCenterInternal();return void 0!==n&&(i=[n[0]-e[0],n[1]-e[1]],(0,h.U1)(i,t-this.getRotation()),(0,h.IH)(i,e)),i}calculateCenterZoom(t,e){let i;const n=this.getCenterInternal(),r=this.getResolution();return void 0!==n&&void 0!==r&&(i=[e[0]-t*(e[0]-n[0])/r,e[1]-t*(e[1]-n[1])/r]),i}getViewportSize_(t){const e=this.viewportSize_;if(t){const i=e[0],n=e[1];return[Math.abs(i*Math.cos(t))+Math.abs(n*Math.sin(t)),Math.abs(i*Math.sin(t))+Math.abs(n*Math.cos(t))]}return e}setViewportSize(t){this.viewportSize_=Array.isArray(t)?t.slice():[100,100],this.getAnimating()||this.resolveConstraints(0)}getCenter(){const t=this.getCenterInternal();return t?(0,a.toUserCoordinate)(t,this.getProjection()):t}getCenterInternal(){return this.get(s.Z.CENTER)}getConstraints(){return this.constraints_}getConstrainResolution(){return this.get("constrainResolution")}getHints(t){return void 0!==t?(t[0]=this.hints_[0],t[1]=this.hints_[1],t):this.hints_.slice()}calculateExtent(t){const e=this.calculateExtentInternal(t);return(0,a.toUserExtent)(e,this.getProjection())}calculateExtentInternal(t){t=t||this.getViewportSizeMinusPadding_();const e=this.getCenterInternal();(0,u.h)(e,1);const i=this.getResolution();(0,u.h)(void 0!==i,2);const n=this.getRotation();return(0,u.h)(void 0!==n,3),(0,m.getForViewAndSize)(e,i,n,t)}getMaxResolution(){return this.maxResolution_}getMinResolution(){return this.minResolution_}getMaxZoom(){return this.getZoomForResolution(this.minResolution_)}setMaxZoom(t){this.applyOptions_(this.getUpdatedOptions_({maxZoom:t}))}getMinZoom(){return this.getZoomForResolution(this.maxResolution_)}setMinZoom(t){this.applyOptions_(this.getUpdatedOptions_({minZoom:t}))}setConstrainResolution(t){this.applyOptions_(this.getUpdatedOptions_({constrainResolution:t}))}getProjection(){return this.projection_}getResolution(){return this.get(s.Z.RESOLUTION)}getResolutions(){return this.resolutions_}getResolutionForExtent(t,e){return this.getResolutionForExtentInternal((0,a.fromUserExtent)(t,this.getProjection()),e)}getResolutionForExtentInternal(t,e){e=e||this.getViewportSizeMinusPadding_();const i=(0,m.getWidth)(t)/e[0],n=(0,m.getHeight)(t)/e[1];return Math.max(i,n)}getResolutionForValueFunction(t){t=t||2;const e=this.getConstrainedResolution(this.maxResolution_),i=this.minResolution_,n=Math.log(e/i)/Math.log(t);return function(i){return e/Math.pow(t,i*n)}}getRotation(){return this.get(s.Z.ROTATION)}getValueForResolutionFunction(t){const e=Math.log(t||2),i=this.getConstrainedResolution(this.maxResolution_),n=this.minResolution_,r=Math.log(i/n)/e;return function(t){return Math.log(i/t)/e/r}}getViewportSizeMinusPadding_(t){let e=this.getViewportSize_(t);const i=this.padding_;return i&&(e=[e[0]-i[1]-i[3],e[1]-i[0]-i[2]]),e}getState(){const t=this.getProjection(),e=this.getResolution(),i=this.getRotation();let n=this.getCenterInternal();const r=this.padding_;if(r){const t=this.getViewportSizeMinusPadding_();n=b(n,this.getViewportSize_(),[t[0]/2+r[3],t[1]/2+r[0]],e,i)}return{center:n.slice(0),projection:void 0!==t?t:null,resolution:e,nextCenter:this.nextCenter_,nextResolution:this.nextResolution_,nextRotation:this.nextRotation_,rotation:i,zoom:this.getZoom()}}getViewStateAndExtent(){return{viewState:this.getState(),extent:this.calculateExtent()}}getZoom(){let t;const e=this.getResolution();return void 0!==e&&(t=this.getZoomForResolution(e)),t}getZoomForResolution(t){let e,i,n=this.minZoom_||0;if(this.resolutions_){const r=(0,_.h7)(this.resolutions_,t,1);n=r,e=this.resolutions_[r],i=r==this.resolutions_.length-1?2:e/this.resolutions_[r+1]}else e=this.maxResolution_,i=this.zoomFactor_;return n+Math.log(e/t)/Math.log(i)}getResolutionForZoom(t){if(this.resolutions_){if(this.resolutions_.length<=1)return 0;const e=(0,d.uZ)(Math.floor(t),0,this.resolutions_.length-2),i=this.resolutions_[e]/this.resolutions_[e+1];return this.resolutions_[e]/Math.pow(i,(0,d.uZ)(t-e,0,1))}return this.maxResolution_/Math.pow(this.zoomFactor_,t-this.minZoom_)}fit(t,e){let i;if((0,u.h)(Array.isArray(t)||"function"==typeof t.getSimplifiedGeometry,24),Array.isArray(t)){(0,u.h)(!(0,m.isEmpty)(t),25);const e=(0,a.fromUserExtent)(t,this.getProjection());i=(0,y.oJ)(e)}else if("Circle"===t.getType()){const e=(0,a.fromUserExtent)(t.getExtent(),this.getProjection());i=(0,y.oJ)(e),i.rotate(this.getRotation(),(0,m.getCenter)(e))}else{const e=(0,a.getUserProjection)();i=e?t.clone().transform(e,this.getProjection()):t}this.fitInternal(i,e)}rotatedExtentForGeometry(t){const e=this.getRotation(),i=Math.cos(e),n=Math.sin(-e),r=t.getFlatCoordinates(),s=t.getStride();let o=1/0,a=1/0,l=-1/0,h=-1/0;for(let t=0,e=r.length;t<e;t+=s){const e=r[t]*i-r[t+1]*n,s=r[t]*n+r[t+1]*i;o=Math.min(o,e),a=Math.min(a,s),l=Math.max(l,e),h=Math.max(h,s)}return[o,a,l,h]}fitInternal(t,e){let i=(e=e||{}).size;i||(i=this.getViewportSizeMinusPadding_());const n=void 0!==e.padding?e.padding:[0,0,0,0],r=void 0!==e.nearest&&e.nearest;let s;s=void 0!==e.minResolution?e.minResolution:void 0!==e.maxZoom?this.getResolutionForZoom(e.maxZoom):0;const o=this.rotatedExtentForGeometry(t);let a=this.getResolutionForExtentInternal(o,[i[0]-n[1]-n[3],i[1]-n[0]-n[2]]);a=isNaN(a)?s:Math.max(a,s),a=this.getConstrainedResolution(a,r?0:1);const h=this.getRotation(),u=Math.sin(h),c=Math.cos(h),d=(0,m.getCenter)(o);d[0]+=(n[1]-n[3])/2*a,d[1]+=(n[0]-n[2])/2*a;const g=d[0]*c-d[1]*u,p=d[1]*c+d[0]*u,f=this.getConstrainedCenter([g,p],a),_=e.callback?e.callback:l.Zn;void 0!==e.duration?this.animateInternal({resolution:a,center:f,duration:e.duration,easing:e.easing},_):(this.targetResolution_=a,this.targetCenter_=f,this.applyTargetState_(!1,!0),x(_,!0))}centerOn(t,e,i){this.centerOnInternal((0,a.fromUserCoordinate)(t,this.getProjection()),e,i)}centerOnInternal(t,e,i){this.setCenterInternal(b(t,e,i,this.getResolution(),this.getRotation()))}calculateCenterShift(t,e,i,n){let r;const s=this.padding_;if(s&&t){const o=this.getViewportSizeMinusPadding_(-i),a=b(t,n,[o[0]/2+s[3],o[1]/2+s[0]],e,i);r=[t[0]-a[0],t[1]-a[1]]}return r}isDef(){return!!this.getCenterInternal()&&void 0!==this.getResolution()}adjustCenter(t){const e=(0,a.toUserCoordinate)(this.targetCenter_,this.getProjection());this.setCenter([e[0]+t[0],e[1]+t[1]])}adjustCenterInternal(t){const e=this.targetCenter_;this.setCenterInternal([e[0]+t[0],e[1]+t[1]])}adjustResolution(t,e){e=e&&(0,a.fromUserCoordinate)(e,this.getProjection()),this.adjustResolutionInternal(t,e)}adjustResolutionInternal(t,e){const i=this.getAnimating()||this.getInteracting(),n=this.getViewportSize_(this.getRotation()),r=this.constraints_.resolution(this.targetResolution_*t,0,n,i);e&&(this.targetCenter_=this.calculateCenterZoom(r,e)),this.targetResolution_*=t,this.applyTargetState_()}adjustZoom(t,e){this.adjustResolution(Math.pow(this.zoomFactor_,-t),e)}adjustRotation(t,e){e&&(e=(0,a.fromUserCoordinate)(e,this.getProjection())),this.adjustRotationInternal(t,e)}adjustRotationInternal(t,e){const i=this.getAnimating()||this.getInteracting(),n=this.constraints_.rotation(this.targetRotation_+t,i);e&&(this.targetCenter_=this.calculateCenterRotate(n,e)),this.targetRotation_+=t,this.applyTargetState_()}setCenter(t){this.setCenterInternal(t?(0,a.fromUserCoordinate)(t,this.getProjection()):t)}setCenterInternal(t){this.targetCenter_=t,this.applyTargetState_()}setHint(t,e){return this.hints_[t]+=e,this.changed(),this.hints_[t]}setResolution(t){this.targetResolution_=t,this.applyTargetState_()}setRotation(t){this.targetRotation_=t,this.applyTargetState_()}setZoom(t){this.setResolution(this.getResolutionForZoom(t))}applyTargetState_(t,e){const i=this.getAnimating()||this.getInteracting()||e,n=this.constraints_.rotation(this.targetRotation_,i),r=this.getViewportSize_(n),o=this.constraints_.resolution(this.targetResolution_,0,r,i),a=this.constraints_.center(this.targetCenter_,o,r,i,this.calculateCenterShift(this.targetCenter_,o,n,r));this.get(s.Z.ROTATION)!==n&&this.set(s.Z.ROTATION,n),this.get(s.Z.RESOLUTION)!==o&&(this.set(s.Z.RESOLUTION,o),this.set("zoom",this.getZoom(),!0)),a&&this.get(s.Z.CENTER)&&(0,h.fS)(this.get(s.Z.CENTER),a)||this.set(s.Z.CENTER,a),this.getAnimating()&&!t&&this.cancelAnimations(),this.cancelAnchor_=void 0}resolveConstraints(t,e,i){t=void 0!==t?t:200;const n=e||0,r=this.constraints_.rotation(this.targetRotation_),s=this.getViewportSize_(r),o=this.constraints_.resolution(this.targetResolution_,n,s),a=this.constraints_.center(this.targetCenter_,o,s,!1,this.calculateCenterShift(this.targetCenter_,o,r,s));if(0===t&&!this.cancelAnchor_)return this.targetResolution_=o,this.targetRotation_=r,this.targetCenter_=a,void this.applyTargetState_();i=i||(0===t?this.cancelAnchor_:void 0),this.cancelAnchor_=void 0,this.getResolution()===o&&this.getRotation()===r&&this.getCenterInternal()&&(0,h.fS)(this.getCenterInternal(),a)||(this.getAnimating()&&this.cancelAnimations(),this.animateInternal({rotation:r,center:a,resolution:o,duration:t,easing:f.Vv,anchor:i}))}beginInteraction(){this.resolveConstraints(0),this.setHint(r.Z.INTERACTING,1)}endInteraction(t,e,i){i=i&&(0,a.fromUserCoordinate)(i,this.getProjection()),this.endInteractionInternal(t,e,i)}endInteractionInternal(t,e,i){this.getInteracting()&&(this.setHint(r.Z.INTERACTING,-1),this.resolveConstraints(t,e,i))}getConstrainedCenter(t,e){const i=this.getViewportSize_(this.getRotation());return this.constraints_.center(t,e||this.getResolution(),i)}getConstrainedZoom(t,e){const i=this.getResolutionForZoom(t);return this.getZoomForResolution(this.getConstrainedResolution(i,e))}getConstrainedResolution(t,e){e=e||0;const i=this.getViewportSize_(this.getRotation());return this.constraints_.resolution(t,e,i)}}function x(t,e){setTimeout((function(){t(e)}),0)}function E(t){return!(t.sourceCenter&&t.targetCenter&&!(0,h.fS)(t.sourceCenter,t.targetCenter))&&t.sourceResolution===t.targetResolution&&t.sourceRotation===t.targetRotation}function b(t,e,i,n,r){const s=Math.cos(-r);let o=Math.sin(-r),a=t[0]*s-t[1]*o,l=t[1]*s+t[0]*o;return a+=(e[0]/2-i[0])*n,l+=(i[1]-e[1]/2)*n,o=-o,[a*s-l*o,l*s+a*o]}const w=v},7755:(t,e,i)=>{"use strict";i.d(e,{Z:()=>n});const n={ANIMATING:0,INTERACTING:1}},7240:(t,e,i)=>{"use strict";i.d(e,{Z:()=>n});const n={CENTER:"center",RESOLUTION:"resolution",ROTATION:"rotation"}},5537:(t,e,i)=>{"use strict";function n(t,e,i){let n,s;i=i||r;let o=0,a=t.length,l=!1;for(;o<a;)n=o+(a-o>>1),s=+i(t[n],e),s<0?o=n+1:(a=n,l=!s);return l?o:~o}function r(t,e){return t>e?1:t<e?-1:0}function s(t,e){return t<e?1:t>e?-1:0}function o(t,e,i){if(t[0]<=e)return 0;const n=t.length;if(e<=t[n-1])return n-1;if("function"==typeof i){for(let r=1;r<n;++r){const n=t[r];if(n===e)return r;if(n<e)return i(e,t[r-1],n)>0?r-1:r}return n-1}if(i>0){for(let i=1;i<n;++i)if(t[i]<e)return i-1;return n-1}if(i<0){for(let i=1;i<n;++i)if(t[i]<=e)return i;return n-1}for(let i=1;i<n;++i){if(t[i]==e)return i;if(t[i]<e)return t[i-1]-e<e-t[i]?i-1:i}return n-1}function a(t,e,i){for(;e<i;){const n=t[e];t[e]=t[i],t[i]=n,++e,--i}}function l(t,e){const i=Array.isArray(e)?e:[e],n=i.length;for(let e=0;e<n;e++)t[t.length]=i[e]}function h(t,e){const i=t.length;if(i!==e.length)return!1;for(let n=0;n<i;n++)if(t[n]!==e[n])return!1;return!0}function u(t,e,i){const n=e||r;return t.every((function(e,r){if(0===r)return!0;const s=n(t[r-1],e);return!(s>0||i&&0===s)}))}i.d(e,{$1:()=>s,FZ:()=>a,fS:()=>h,h7:()=>o,j2:()=>r,l7:()=>l,pT:()=>u,ry:()=>n})},9515:(t,e,i)=>{"use strict";i.d(e,{h:()=>r});var n=i(6813);function r(t,e){if(!t)throw new n.Z(e)}},8427:(t,e,i)=>{"use strict";i.d(e,{Y:()=>s,s:()=>r});var n=i(3983);function r(t,e,i){return function(r,s,o,a,l){if(!r)return;if(!s&&!e)return r;const h=e?0:o[0]*s,u=e?0:o[1]*s,c=l?l[0]:0,d=l?l[1]:0;let g=t[0]+h/2+c,p=t[2]-h/2+c,f=t[1]+u/2+d,m=t[3]-u/2+d;g>p&&(g=(p+g)/2,p=g),f>m&&(f=(m+f)/2,m=f);let _=(0,n.uZ)(r[0],g,p),y=(0,n.uZ)(r[1],f,m);if(a&&i&&s){const t=30*s;_+=-t*Math.log(1+Math.max(0,g-r[0])/t)+t*Math.log(1+Math.max(0,r[0]-p)/t),y+=-t*Math.log(1+Math.max(0,f-r[1])/t)+t*Math.log(1+Math.max(0,r[1]-m)/t)}return[_,y]}}function s(t){return t}},9706:(t,e,i)=>{"use strict";i.d(e,{BB:()=>d,XC:()=>a,_2:()=>u,e1:()=>g,mL:()=>h});var n=i(9515),r=i(3983);const s=/^#([a-f0-9]{3}|[a-f0-9]{4}(?:[a-f0-9]{2}){0,2})$/i,o=/^([a-z]*)$|^hsla?\(.*\)$/i;function a(t){return"string"==typeof t?t:d(t)}function l(t){const e=document.createElement("div");if(e.style.color=t,""!==e.style.color){document.body.appendChild(e);const t=getComputedStyle(e).color;return document.body.removeChild(e),t}return""}const h=function(){const t={};let e=0;return function(i){let r;if(t.hasOwnProperty(i))r=t[i];else{if(e>=1024){let i=0;for(const n in t)0==(3&i++)&&(delete t[n],--e)}r=function(t){let e,i,r,a,h;if(o.exec(t)&&(t=l(t)),s.exec(t)){const n=t.length-1;let s;s=n<=4?1:2;const o=4===n||8===n;e=parseInt(t.substr(1+0*s,s),16),i=parseInt(t.substr(1+1*s,s),16),r=parseInt(t.substr(1+2*s,s),16),a=o?parseInt(t.substr(1+3*s,s),16):255,1==s&&(e=(e<<4)+e,i=(i<<4)+i,r=(r<<4)+r,o&&(a=(a<<4)+a)),h=[e,i,r,a/255]}else t.startsWith("rgba(")?(h=t.slice(5,-1).split(",").map(Number),c(h)):t.startsWith("rgb(")?(h=t.slice(4,-1).split(",").map(Number),h.push(1),c(h)):(0,n.h)(!1,14);return h}(i),t[i]=r,++e}return r}}();function u(t){return Array.isArray(t)?t:h(t)}function c(t){return t[0]=(0,r.uZ)(t[0]+.5|0,0,255),t[1]=(0,r.uZ)(t[1]+.5|0,0,255),t[2]=(0,r.uZ)(t[2]+.5|0,0,255),t[3]=(0,r.uZ)(t[3],0,1),t}function d(t){let e=t[0];e!=(0|e)&&(e=e+.5|0);let i=t[1];i!=(0|i)&&(i=i+.5|0);let n=t[2];return n!=(0|n)&&(n=n+.5|0),"rgba("+e+","+i+","+n+","+(void 0===t[3]?1:Math.round(100*t[3])/100)+")"}function g(t){return o.test(t)&&(t=l(t)),s.test(t)||t.startsWith("rgba(")||t.startsWith("rgb(")}},6620:(t,e,i)=>{"use strict";i.d(e,{y:()=>r});var n=i(9706);function r(t){return Array.isArray(t)?(0,n.BB)(t):t}},44:(t,e,i)=>{"use strict";i.d(e,{ZK:()=>o,vU:()=>a});const n=2,r=3;let s=1;function o(...t){s>n||console.warn(...t)}function a(...t){s>r||console.error(...t)}},4717:(t,e,i)=>{"use strict";i.r(e),i.d(e,{Attribution:()=>n.Z,Control:()=>r.Z,FullScreen:()=>f,MousePosition:()=>b,OverviewMap:()=>A,Rotate:()=>Z.Z,ScaleLine:()=>N,Zoom:()=>j.Z,ZoomSlider:()=>W,ZoomToExtent:()=>H,defaults:()=>Y.c});var n=i(2657),r=i(8775),s=i(5487),o=i(3222),a=i(245),l=i(5818),h=i(8326);const u=["fullscreenchange","webkitfullscreenchange","MSFullscreenChange"];class c extends r.Z{constructor(t){t=t||{},super({element:document.createElement("div"),target:t.target}),this.on,this.once,this.un,this.keys_=void 0!==t.keys&&t.keys,this.source_=t.source,this.isInFullscreen_=!1,this.boundHandleMapTargetChange_=this.handleMapTargetChange_.bind(this),this.cssClassName_=void 0!==t.className?t.className:"ol-full-screen",this.documentListeners_=[],this.activeClassName_=void 0!==t.activeClassName?t.activeClassName.split(" "):[this.cssClassName_+"-true"],this.inactiveClassName_=void 0!==t.inactiveClassName?t.inactiveClassName.split(" "):[this.cssClassName_+"-false"];const e=void 0!==t.label?t.label:"⤢";this.labelNode_="string"==typeof e?document.createTextNode(e):e;const i=void 0!==t.labelActive?t.labelActive:"×";this.labelActiveNode_="string"==typeof i?document.createTextNode(i):i;const n=t.tipLabel?t.tipLabel:"Toggle full-screen";this.button_=document.createElement("button"),this.button_.title=n,this.button_.setAttribute("type","button"),this.button_.appendChild(this.labelNode_),this.button_.addEventListener(s.Z.CLICK,this.handleClick_.bind(this),!1),this.setClassName_(this.button_,this.isInFullscreen_),this.element.className=`${this.cssClassName_} ${a.XV} ${a.hg}`,this.element.appendChild(this.button_)}handleClick_(t){t.preventDefault(),this.handleFullScreen_()}handleFullScreen_(){const t=this.getMap();if(!t)return;const e=t.getOwnerDocument();if(d(e))if(g(e))!function(t){t.exitFullscreen?t.exitFullscreen():t.webkitExitFullscreen&&t.webkitExitFullscreen()}(e);else{let i;i=this.source_?"string"==typeof this.source_?e.getElementById(this.source_):this.source_:t.getTargetElement(),this.keys_?function(t){t.webkitRequestFullscreen?t.webkitRequestFullscreen():p(t)}(i):p(i)}}handleFullScreenChange_(){const t=this.getMap();if(!t)return;const e=this.isInFullscreen_;this.isInFullscreen_=g(t.getOwnerDocument()),e!==this.isInFullscreen_&&(this.setClassName_(this.button_,this.isInFullscreen_),this.isInFullscreen_?((0,h.$H)(this.labelActiveNode_,this.labelNode_),this.dispatchEvent("enterfullscreen")):((0,h.$H)(this.labelNode_,this.labelActiveNode_),this.dispatchEvent("leavefullscreen")),t.updateSize())}setClassName_(t,e){e?(t.classList.remove(...this.inactiveClassName_),t.classList.add(...this.activeClassName_)):(t.classList.remove(...this.activeClassName_),t.classList.add(...this.inactiveClassName_))}setMap(t){const e=this.getMap();e&&e.removeChangeListener(o.Z.TARGET,this.boundHandleMapTargetChange_),super.setMap(t),this.handleMapTargetChange_(),t&&t.addChangeListener(o.Z.TARGET,this.boundHandleMapTargetChange_)}handleMapTargetChange_(){const t=this.documentListeners_;for(let e=0,i=t.length;e<i;++e)(0,l.bN)(t[e]);t.length=0;const e=this.getMap();if(e){const i=e.getOwnerDocument();d(i)?this.element.classList.remove(a.Qi):this.element.classList.add(a.Qi);for(let e=0,n=u.length;e<n;++e)t.push((0,l.oL)(i,u[e],this.handleFullScreenChange_,this));this.handleFullScreenChange_()}}}function d(t){const e=t.body;return!!(e.webkitRequestFullscreen||e.requestFullscreen&&t.fullscreenEnabled)}function g(t){return!(!t.webkitIsFullScreen&&!t.fullscreenElement)}function p(t){t.requestFullscreen?t.requestFullscreen():t.webkitRequestFullscreen&&t.webkitRequestFullscreen()}const f=c;var m=i(4238),_=i(6121),y=i(1900);const v="projection",x="coordinateFormat";class E extends r.Z{constructor(t){t=t||{};const e=document.createElement("div");e.className=void 0!==t.className?t.className:"ol-mouse-position",super({element:e,render:t.render,target:t.target}),this.on,this.once,this.un,this.addChangeListener(v,this.handleProjectionChanged_),t.coordinateFormat&&this.setCoordinateFormat(t.coordinateFormat),t.projection&&this.setProjection(t.projection),this.renderOnMouseOut_=void 0!==t.placeholder,this.placeholder_=this.renderOnMouseOut_?t.placeholder:"&#160;",this.renderedHTML_=e.innerHTML,this.mapProjection_=null,this.transform_=null,this.wrapX_=!1!==t.wrapX}handleProjectionChanged_(){this.transform_=null}getCoordinateFormat(){return this.get(x)}getProjection(){return this.get(v)}handleMouseMove(t){const e=this.getMap();this.updateHTML_(e.getEventPixel(t))}handleMouseOut(t){this.updateHTML_(null)}setMap(t){if(super.setMap(t),t){const e=t.getViewport();this.listenerKeys.push((0,l.oL)(e,m.Z.POINTERMOVE,this.handleMouseMove,this)),this.renderOnMouseOut_&&this.listenerKeys.push((0,l.oL)(e,m.Z.POINTEROUT,this.handleMouseOut,this)),this.updateHTML_(null)}}setCoordinateFormat(t){this.set(x,t)}setProjection(t){this.set(v,(0,_.get)(t))}updateHTML_(t){let e=this.placeholder_;if(t&&this.mapProjection_){if(!this.transform_){const t=this.getProjection();this.transform_=t?(0,_.getTransformFromProjections)(this.mapProjection_,t):_.identityTransform}const i=this.getMap().getCoordinateFromPixelInternal(t);if(i){const t=(0,_.getUserProjection)();if(t&&(this.transform_=(0,_.getTransformFromProjections)(this.mapProjection_,t)),this.transform_(i,i),this.wrapX_){const e=t||this.getProjection()||this.mapProjection_;(0,y.Cf)(i,e)}const n=this.getCoordinateFormat();e=n?n(i):i.toString()}}this.renderedHTML_&&e===this.renderedHTML_||(this.element.innerHTML=e,this.renderedHTML_=e)}render(t){const e=t.frameState;e?this.mapProjection_!=e.viewState.projection&&(this.mapProjection_=e.viewState.projection,this.transform_=null):this.mapProjection_=null}}const b=E;var w=i(8714),S=i(8658),T=i(2126),C=i(5990),R=i(3223),P=i(7681),I=i(7240),L=i(8641),M=i(2033);class F extends r.Z{constructor(t){t=t||{},super({element:document.createElement("div"),render:t.render,target:t.target}),this.boundHandleRotationChanged_=this.handleRotationChanged_.bind(this),this.collapsed_=void 0===t.collapsed||t.collapsed,this.collapsible_=void 0===t.collapsible||t.collapsible,this.collapsible_||(this.collapsed_=!1),this.rotateWithView_=void 0!==t.rotateWithView&&t.rotateWithView,this.viewExtent_=void 0;const e=void 0!==t.className?t.className:"ol-overviewmap",i=void 0!==t.tipLabel?t.tipLabel:"Overview map",n=void 0!==t.collapseLabel?t.collapseLabel:"‹";"string"==typeof n?(this.collapseLabel_=document.createElement("span"),this.collapseLabel_.textContent=n):this.collapseLabel_=n;const r=void 0!==t.label?t.label:"›";"string"==typeof r?(this.label_=document.createElement("span"),this.label_.textContent=r):this.label_=r;const o=this.collapsible_&&!this.collapsed_?this.collapseLabel_:this.label_,l=document.createElement("button");l.setAttribute("type","button"),l.title=i,l.appendChild(o),l.addEventListener(s.Z.CLICK,this.handleClick_.bind(this),!1),this.ovmapDiv_=document.createElement("div"),this.ovmapDiv_.className="ol-overviewmap-map",this.view_=t.view;const h=new S.Z({view:t.view,controls:new w.Z,interactions:new w.Z});this.ovmap_=h,t.layers&&t.layers.forEach((function(t){h.addLayer(t)}));const u=document.createElement("div");u.className="ol-overviewmap-box",u.style.boxSizing="border-box",this.boxOverlay_=new R.Z({position:[0,0],positioning:"center-center",element:u}),this.ovmap_.addOverlay(this.boxOverlay_);const c=e+" "+a.XV+" "+a.hg+(this.collapsed_&&this.collapsible_?" "+a.hN:"")+(this.collapsible_?"":" ol-uncollapsible"),d=this.element;d.className=c,d.appendChild(this.ovmapDiv_),d.appendChild(l);const g=this,p=this.boxOverlay_,f=this.boxOverlay_.getElement(),m=function(t){const e={clientX:(i=t).clientX,clientY:i.clientY};var i;const n=h.getEventCoordinateInternal(e);p.setPosition(n)},_=function(t){const e=h.getEventCoordinateInternal(t);g.getMap().getView().setCenterInternal(e),window.removeEventListener("mousemove",m),window.removeEventListener("mouseup",_)};f.addEventListener("mousedown",(function(){window.addEventListener("mousemove",m),window.addEventListener("mouseup",_)}))}setMap(t){const e=this.getMap();if(t!==e){if(e){const t=e.getView();t&&this.unbindView_(t),this.ovmap_.setTarget(null)}if(super.setMap(t),t){this.ovmap_.setTarget(this.ovmapDiv_),this.listenerKeys.push((0,l.oL)(t,C.Z.PROPERTYCHANGE,this.handleMapPropertyChange_,this));const e=t.getView();e&&(this.bindView_(e),e.isDef()&&(this.ovmap_.updateSize(),this.resetExtent_())),this.ovmap_.isRendered()||this.updateBoxAfterOvmapIsRendered_()}}}handleMapPropertyChange_(t){if(t.key===o.Z.VIEW){const e=t.oldValue;e&&this.unbindView_(e);const i=this.getMap().getView();this.bindView_(i)}else this.ovmap_.isRendered()||t.key!==o.Z.TARGET&&t.key!==o.Z.SIZE||this.ovmap_.updateSize()}bindView_(t){if(!this.view_){const e=new P.ZP({projection:t.getProjection()});this.ovmap_.setView(e)}t.addChangeListener(I.Z.ROTATION,this.boundHandleRotationChanged_),this.handleRotationChanged_()}unbindView_(t){t.removeChangeListener(I.Z.ROTATION,this.boundHandleRotationChanged_)}handleRotationChanged_(){this.rotateWithView_&&this.ovmap_.getView().setRotation(this.getMap().getView().getRotation())}validateExtent_(){const t=this.getMap(),e=this.ovmap_;if(!t.isRendered()||!e.isRendered())return;const i=t.getSize(),n=t.getView().calculateExtentInternal(i);if(this.viewExtent_&&(0,L.equals)(n,this.viewExtent_))return;this.viewExtent_=n;const r=e.getSize(),s=e.getView().calculateExtentInternal(r),o=e.getPixelFromCoordinateInternal((0,L.getTopLeft)(n)),a=e.getPixelFromCoordinateInternal((0,L.getBottomRight)(n)),l=Math.abs(o[0]-a[0]),h=Math.abs(o[1]-a[1]),u=r[0],c=r[1];l<.1*u||h<.1*c||l>.75*u||h>.75*c?this.resetExtent_():(0,L.containsExtent)(s,n)||this.recenter_()}resetExtent_(){const t=this.getMap(),e=this.ovmap_,i=t.getSize(),n=t.getView().calculateExtentInternal(i),r=e.getView(),s=Math.log(7.5)/Math.LN2,o=1/(.1*Math.pow(2,s/2));(0,L.scaleFromCenter)(n,o),r.fitInternal((0,M.oJ)(n))}recenter_(){const t=this.getMap(),e=this.ovmap_,i=t.getView();e.getView().setCenterInternal(i.getCenterInternal())}updateBox_(){const t=this.getMap(),e=this.ovmap_;if(!t.isRendered()||!e.isRendered())return;const i=t.getSize(),n=t.getView(),r=e.getView(),s=this.rotateWithView_?0:-n.getRotation(),o=this.boxOverlay_,a=this.boxOverlay_.getElement(),l=n.getCenterInternal(),h=n.getResolution(),u=r.getResolution(),c=i[0]*h/u,d=i[1]*h/u;if(o.setPosition(l),a){a.style.width=c+"px",a.style.height=d+"px";const t="rotate("+s+"rad)";a.style.transform=t}}updateBoxAfterOvmapIsRendered_(){this.ovmapPostrenderKey_||(this.ovmapPostrenderKey_=(0,l.Vx)(this.ovmap_,T.Z.POSTRENDER,(function(t){delete this.ovmapPostrenderKey_,this.updateBox_()}),this))}handleClick_(t){t.preventDefault(),this.handleToggle_()}handleToggle_(){this.element.classList.toggle(a.hN),this.collapsed_?(0,h.$H)(this.collapseLabel_,this.label_):(0,h.$H)(this.label_,this.collapseLabel_),this.collapsed_=!this.collapsed_;const t=this.ovmap_;if(!this.collapsed_){if(t.isRendered())return this.viewExtent_=void 0,void t.render();t.updateSize(),this.resetExtent_(),this.updateBoxAfterOvmapIsRendered_()}}getCollapsible(){return this.collapsible_}setCollapsible(t){this.collapsible_!==t&&(this.collapsible_=t,this.element.classList.toggle("ol-uncollapsible"),!t&&this.collapsed_&&this.handleToggle_())}setCollapsed(t){this.collapsible_&&this.collapsed_!==t&&this.handleToggle_()}getCollapsed(){return this.collapsed_}getRotateWithView(){return this.rotateWithView_}setRotateWithView(t){this.rotateWithView_!==t&&(this.rotateWithView_=t,0!==this.getMap().getView().getRotation()&&(this.rotateWithView_?this.handleRotationChanged_():this.ovmap_.getView().setRotation(0),this.viewExtent_=void 0,this.validateExtent_(),this.updateBox_()))}getOverviewMap(){return this.ovmap_}render(t){this.validateExtent_(),this.updateBox_()}}const A=F;var Z=i(9965),D=i(9515);const O="units",k=[1,2,5],G=25.4/.28;class z extends r.Z{constructor(t){t=t||{};const e=document.createElement("div");e.style.pointerEvents="none",super({element:e,render:t.render,target:t.target}),this.on,this.once,this.un;const i=void 0!==t.className?t.className:t.bar?"ol-scale-bar":"ol-scale-line";this.innerElement_=document.createElement("div"),this.innerElement_.className=i+"-inner",this.element.className=i+" "+a.XV,this.element.appendChild(this.innerElement_),this.viewState_=null,this.minWidth_=void 0!==t.minWidth?t.minWidth:64,this.maxWidth_=t.maxWidth,this.renderedVisible_=!1,this.renderedWidth_=void 0,this.renderedHTML_="",this.addChangeListener(O,this.handleUnitsChanged_),this.setUnits(t.units||"metric"),this.scaleBar_=t.bar||!1,this.scaleBarSteps_=t.steps||4,this.scaleBarText_=t.text||!1,this.dpi_=t.dpi||void 0}getUnits(){return this.get(O)}handleUnitsChanged_(){this.updateElement_()}setUnits(t){this.set(O,t)}setDpi(t){this.dpi_=t}updateElement_(){const t=this.viewState_;if(!t)return void(this.renderedVisible_&&(this.element.style.display="none",this.renderedVisible_=!1));const e=t.center,i=t.projection,n=this.getUnits(),r="degrees"==n?"degrees":"m";let s=(0,_.getPointResolution)(i,t.resolution,e,r);const o=this.minWidth_*(this.dpi_||G)/G,a=void 0!==this.maxWidth_?this.maxWidth_*(this.dpi_||G)/G:void 0;let l=o*s,h="";if("degrees"==n){const t=_.METERS_PER_UNIT.degrees;l*=t,l<t/60?(h="″",s*=3600):l<t?(h="′",s*=60):h="°"}else"imperial"==n?l<.9144?(h="in",s/=.0254):l<1609.344?(h="ft",s/=.3048):(h="mi",s/=1609.344):"nautical"==n?(s/=1852,h="NM"):"metric"==n?l<.001?(h="μm",s*=1e6):l<1?(h="mm",s*=1e3):l<1e3?h="m":(h="km",s/=1e3):"us"==n?l<.9144?(h="in",s*=39.37):l<1609.344?(h="ft",s/=.30480061):(h="mi",s/=1609.3472):(0,D.h)(!1,33);let u,c,d,g,p,f,m=3*Math.floor(Math.log(o*s)/Math.log(10));for(;;){d=Math.floor(m/3);const t=Math.pow(10,d);if(u=k[(m%3+3)%3]*t,c=Math.round(u/s),isNaN(c))return this.element.style.display="none",void(this.renderedVisible_=!1);if(void 0!==a&&c>=a){u=g,c=p,d=f;break}if(c>=o)break;g=u,p=c,f=d,++m}const y=this.scaleBar_?this.createScaleBar(c,u,h):u.toFixed(d<0?-d:0)+" "+h;this.renderedHTML_!=y&&(this.innerElement_.innerHTML=y,this.renderedHTML_=y),this.renderedWidth_!=c&&(this.innerElement_.style.width=c+"px",this.renderedWidth_=c),this.renderedVisible_||(this.element.style.display="",this.renderedVisible_=!0)}createScaleBar(t,e,i){const n=this.getScaleForResolution(),r=n<1?Math.round(1/n).toLocaleString()+" : 1":"1 : "+Math.round(n).toLocaleString(),s=this.scaleBarSteps_,o=t/s,a=[this.createMarker("absolute")];for(let n=0;n<s;++n){const r=n%2==0?"ol-scale-singlebar-odd":"ol-scale-singlebar-even";a.push(`<div><div class="ol-scale-singlebar ${r}" style="width: ${o}px;"></div>`+this.createMarker("relative")+(n%2==0||2===s?this.createStepText(n,t,!1,e,i):"")+"</div>")}return a.push(this.createStepText(s,t,!0,e,i)),(this.scaleBarText_?`<div class="ol-scale-text" style="width: ${t}px;">`+r+"</div>":"")+a.join("")}createMarker(t){return`<div class="ol-scale-step-marker" style="position: ${t}; top: ${"absolute"===t?3:-10}px;"></div>`}createStepText(t,e,i,n,r){const s=(0===t?0:Math.round(n/this.scaleBarSteps_*t*100)/100)+(0===t?"":" "+r);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: ${i?e+"px":"unset"};">`+s+"</div>"}getScaleForResolution(){return(0,_.getPointResolution)(this.viewState_.projection,this.viewState_.resolution,this.viewState_.center,"m")*(1e3/25.4)*(this.dpi_||G)}render(t){const e=t.frameState;this.viewState_=e?e.viewState:null,this.updateElement_()}}const N=z;var j=i(3851),U=i(3983),B=i(1015),V=i(291);class q extends r.Z{constructor(t){super({target:(t=t||{}).target,element:document.createElement("div"),render:t.render}),this.dragListenerKeys_=[],this.currentResolution_=void 0,this.direction_=0,this.dragging_,this.heightLimit_=0,this.widthLimit_=0,this.startX_,this.startY_,this.thumbSize_=null,this.sliderInitialized_=!1,this.duration_=void 0!==t.duration?t.duration:200;const e=void 0!==t.className?t.className:"ol-zoomslider",i=document.createElement("button");i.setAttribute("type","button"),i.className=e+"-thumb "+a.XV;const n=this.element;n.className=e+" "+a.XV+" "+a.hg,n.appendChild(i),n.addEventListener(m.Z.POINTERDOWN,this.handleDraggerStart_.bind(this),!1),n.addEventListener(m.Z.POINTERMOVE,this.handleDraggerDrag_.bind(this),!1),n.addEventListener(m.Z.POINTERUP,this.handleDraggerEnd_.bind(this),!1),n.addEventListener(s.Z.CLICK,this.handleContainerClick_.bind(this),!1),i.addEventListener(s.Z.CLICK,V.UW,!1)}setMap(t){super.setMap(t),t&&t.render()}initSlider_(){const t=this.element;let e=t.offsetWidth,i=t.offsetHeight;if(0===e&&0===i)return this.sliderInitialized_=!1;const n=getComputedStyle(t);e-=parseFloat(n.paddingRight)+parseFloat(n.paddingLeft),i-=parseFloat(n.paddingTop)+parseFloat(n.paddingBottom);const r=t.firstElementChild,s=getComputedStyle(r),o=r.offsetWidth+parseFloat(s.marginRight)+parseFloat(s.marginLeft),a=r.offsetHeight+parseFloat(s.marginTop)+parseFloat(s.marginBottom);return this.thumbSize_=[o,a],e>i?(this.direction_=1,this.widthLimit_=e-o):(this.direction_=0,this.heightLimit_=i-a),this.sliderInitialized_=!0}handleContainerClick_(t){const e=this.getMap().getView(),i=this.getRelativePosition_(t.offsetX-this.thumbSize_[0]/2,t.offsetY-this.thumbSize_[1]/2),n=this.getResolutionForPosition_(i),r=e.getConstrainedZoom(e.getZoomForResolution(n));e.animateInternal({zoom:r,duration:this.duration_,easing:B.Vv})}handleDraggerStart_(t){if(!this.dragging_&&t.target===this.element.firstElementChild){const e=this.element.firstElementChild;if(this.getMap().getView().beginInteraction(),this.startX_=t.clientX-parseFloat(e.style.left),this.startY_=t.clientY-parseFloat(e.style.top),this.dragging_=!0,0===this.dragListenerKeys_.length){const t=this.handleDraggerDrag_,e=this.handleDraggerEnd_,i=this.getMap().getOwnerDocument();this.dragListenerKeys_.push((0,l.oL)(i,m.Z.POINTERMOVE,t,this),(0,l.oL)(i,m.Z.POINTERUP,e,this))}}}handleDraggerDrag_(t){if(this.dragging_){const e=t.clientX-this.startX_,i=t.clientY-this.startY_,n=this.getRelativePosition_(e,i);this.currentResolution_=this.getResolutionForPosition_(n),this.getMap().getView().setResolution(this.currentResolution_)}}handleDraggerEnd_(t){this.dragging_&&(this.getMap().getView().endInteraction(),this.dragging_=!1,this.startX_=void 0,this.startY_=void 0,this.dragListenerKeys_.forEach(l.bN),this.dragListenerKeys_.length=0)}setThumbPosition_(t){const e=this.getPositionForResolution_(t),i=this.element.firstElementChild;1==this.direction_?i.style.left=this.widthLimit_*e+"px":i.style.top=this.heightLimit_*e+"px"}getRelativePosition_(t,e){let i;return i=1===this.direction_?t/this.widthLimit_:e/this.heightLimit_,(0,U.uZ)(i,0,1)}getResolutionForPosition_(t){return this.getMap().getView().getResolutionForValueFunction()(1-t)}getPositionForResolution_(t){const e=this.getMap().getView().getValueForResolutionFunction();return(0,U.uZ)(1-e(t),0,1)}render(t){if(!t.frameState)return;if(!this.sliderInitialized_&&!this.initSlider_())return;const e=t.frameState.viewState.resolution;this.currentResolution_=e,this.setThumbPosition_(e)}}const W=q;class X extends r.Z{constructor(t){t=t||{},super({element:document.createElement("div"),target:t.target}),this.extent=t.extent?t.extent:null;const e=void 0!==t.className?t.className:"ol-zoom-extent",i=void 0!==t.label?t.label:"E",n=void 0!==t.tipLabel?t.tipLabel:"Fit to extent",r=document.createElement("button");r.setAttribute("type","button"),r.title=n,r.appendChild("string"==typeof i?document.createTextNode(i):i),r.addEventListener(s.Z.CLICK,this.handleClick_.bind(this),!1);const o=e+" "+a.XV+" "+a.hg,l=this.element;l.className=o,l.appendChild(r)}handleClick_(t){t.preventDefault(),this.handleZoomToExtent()}handleZoomToExtent(){const t=this.getMap().getView(),e=this.extent?this.extent:t.getProjection().getExtent();t.fitInternal((0,M.oJ)(e))}}const H=X;var Y=i(8871)},2657:(t,e,i)=>{"use strict";i.d(e,{Z:()=>h});var n=i(8775),r=i(5487),s=i(245),o=i(5537),a=i(8326);class l extends n.Z{constructor(t){t=t||{},super({element:document.createElement("div"),render:t.render,target:t.target}),this.ulElement_=document.createElement("ul"),this.collapsed_=void 0===t.collapsed||t.collapsed,this.userCollapsed_=this.collapsed_,this.overrideCollapsible_=void 0!==t.collapsible,this.collapsible_=void 0===t.collapsible||t.collapsible,this.collapsible_||(this.collapsed_=!1);const e=void 0!==t.className?t.className:"ol-attribution",i=void 0!==t.tipLabel?t.tipLabel:"Attributions",n=void 0!==t.expandClassName?t.expandClassName:e+"-expand",o=void 0!==t.collapseLabel?t.collapseLabel:"›",a=void 0!==t.collapseClassName?t.collapseClassName:e+"-collapse";"string"==typeof o?(this.collapseLabel_=document.createElement("span"),this.collapseLabel_.textContent=o,this.collapseLabel_.className=a):this.collapseLabel_=o;const l=void 0!==t.label?t.label:"i";"string"==typeof l?(this.label_=document.createElement("span"),this.label_.textContent=l,this.label_.className=n):this.label_=l;const h=this.collapsible_&&!this.collapsed_?this.collapseLabel_:this.label_;this.toggleButton_=document.createElement("button"),this.toggleButton_.setAttribute("type","button"),this.toggleButton_.setAttribute("aria-expanded",String(!this.collapsed_)),this.toggleButton_.title=i,this.toggleButton_.appendChild(h),this.toggleButton_.addEventListener(r.Z.CLICK,this.handleClick_.bind(this),!1);const u=e+" "+s.XV+" "+s.hg+(this.collapsed_&&this.collapsible_?" "+s.hN:"")+(this.collapsible_?"":" ol-uncollapsible"),c=this.element;c.className=u,c.appendChild(this.toggleButton_),c.appendChild(this.ulElement_),this.renderedAttributions_=[],this.renderedVisible_=!0}collectSourceAttributions_(t){const e=Array.from(new Set(this.getMap().getAllLayers().flatMap((e=>e.getAttributions(t))))),i=!this.getMap().getAllLayers().some((t=>t.getSource()&&!1===t.getSource().getAttributionsCollapsible()));return this.overrideCollapsible_||this.setCollapsible(i),e}updateElement_(t){if(!t)return void(this.renderedVisible_&&(this.element.style.display="none",this.renderedVisible_=!1));const e=this.collectSourceAttributions_(t),i=e.length>0;if(this.renderedVisible_!=i&&(this.element.style.display=i?"":"none",this.renderedVisible_=i),!(0,o.fS)(e,this.renderedAttributions_)){(0,a.ep)(this.ulElement_);for(let t=0,i=e.length;t<i;++t){const i=document.createElement("li");i.innerHTML=e[t],this.ulElement_.appendChild(i)}this.renderedAttributions_=e}}handleClick_(t){t.preventDefault(),this.handleToggle_(),this.userCollapsed_=this.collapsed_}handleToggle_(){this.element.classList.toggle(s.hN),this.collapsed_?(0,a.$H)(this.collapseLabel_,this.label_):(0,a.$H)(this.label_,this.collapseLabel_),this.collapsed_=!this.collapsed_,this.toggleButton_.setAttribute("aria-expanded",String(!this.collapsed_))}getCollapsible(){return this.collapsible_}setCollapsible(t){this.collapsible_!==t&&(this.collapsible_=t,this.element.classList.toggle("ol-uncollapsible"),this.userCollapsed_&&this.handleToggle_())}setCollapsed(t){this.userCollapsed_=t,this.collapsible_&&this.collapsed_!==t&&this.handleToggle_()}getCollapsed(){return this.collapsed_}render(t){this.updateElement_(t.frameState)}}const h=l},8775:(t,e,i)=>{"use strict";i.d(e,{Z:()=>h});var n=i(2971),r=i(2126),s=i(6885),o=i(5818),a=i(8326);class l extends n.Z{constructor(t){super();const e=t.element;!e||t.target||e.style.pointerEvents||(e.style.pointerEvents="auto"),this.element=e||null,this.target_=null,this.map_=null,this.listenerKeys=[],t.render&&(this.render=t.render),t.target&&this.setTarget(t.target)}disposeInternal(){(0,a.ZF)(this.element),super.disposeInternal()}getMap(){return this.map_}setMap(t){this.map_&&(0,a.ZF)(this.element);for(let t=0,e=this.listenerKeys.length;t<e;++t)(0,o.bN)(this.listenerKeys[t]);this.listenerKeys.length=0,this.map_=t,t&&((this.target_?this.target_:t.getOverlayContainerStopEvent()).appendChild(this.element),this.render!==s.Zn&&this.listenerKeys.push((0,o.oL)(t,r.Z.POSTRENDER,this.render,this)),t.render())}render(t){}setTarget(t){this.target_="string"==typeof t?document.getElementById(t):t}}const h=l},9965:(t,e,i)=>{"use strict";i.d(e,{Z:()=>l});var n=i(8775),r=i(5487),s=i(245),o=i(1015);class a extends n.Z{constructor(t){t=t||{},super({element:document.createElement("div"),render:t.render,target:t.target});const e=void 0!==t.className?t.className:"ol-rotate",i=void 0!==t.label?t.label:"⇧",n=void 0!==t.compassClassName?t.compassClassName:"ol-compass";this.label_=null,"string"==typeof i?(this.label_=document.createElement("span"),this.label_.className=n,this.label_.textContent=i):(this.label_=i,this.label_.classList.add(n));const o=t.tipLabel?t.tipLabel:"Reset rotation",a=document.createElement("button");a.className=e+"-reset",a.setAttribute("type","button"),a.title=o,a.appendChild(this.label_),a.addEventListener(r.Z.CLICK,this.handleClick_.bind(this),!1);const l=e+" "+s.XV+" "+s.hg,h=this.element;h.className=l,h.appendChild(a),this.callResetNorth_=t.resetNorth?t.resetNorth:void 0,this.duration_=void 0!==t.duration?t.duration:250,this.autoHide_=void 0===t.autoHide||t.autoHide,this.rotation_=void 0,this.autoHide_&&this.element.classList.add(s.oj)}handleClick_(t){t.preventDefault(),void 0!==this.callResetNorth_?this.callResetNorth_():this.resetNorth_()}resetNorth_(){const t=this.getMap().getView();if(!t)return;const e=t.getRotation();void 0!==e&&(this.duration_>0&&e%(2*Math.PI)!=0?t.animate({rotation:0,duration:this.duration_,easing:o.Vv}):t.setRotation(0))}render(t){const e=t.frameState;if(!e)return;const i=e.viewState.rotation;if(i!=this.rotation_){const t="rotate("+i+"rad)";if(this.autoHide_){const t=this.element.classList.contains(s.oj);t||0!==i?t&&0!==i&&this.element.classList.remove(s.oj):this.element.classList.add(s.oj)}this.label_.style.transform=t}this.rotation_=i}}const l=a},3851:(t,e,i)=>{"use strict";i.d(e,{Z:()=>l});var n=i(8775),r=i(5487),s=i(245),o=i(1015);class a extends n.Z{constructor(t){t=t||{},super({element:document.createElement("div"),target:t.target});const e=void 0!==t.className?t.className:"ol-zoom",i=void 0!==t.delta?t.delta:1,n=void 0!==t.zoomInClassName?t.zoomInClassName:e+"-in",o=void 0!==t.zoomOutClassName?t.zoomOutClassName:e+"-out",a=void 0!==t.zoomInLabel?t.zoomInLabel:"+",l=void 0!==t.zoomOutLabel?t.zoomOutLabel:"–",h=void 0!==t.zoomInTipLabel?t.zoomInTipLabel:"Zoom in",u=void 0!==t.zoomOutTipLabel?t.zoomOutTipLabel:"Zoom out",c=document.createElement("button");c.className=n,c.setAttribute("type","button"),c.title=h,c.appendChild("string"==typeof a?document.createTextNode(a):a),c.addEventListener(r.Z.CLICK,this.handleClick_.bind(this,i),!1);const d=document.createElement("button");d.className=o,d.setAttribute("type","button"),d.title=u,d.appendChild("string"==typeof l?document.createTextNode(l):l),d.addEventListener(r.Z.CLICK,this.handleClick_.bind(this,-i),!1);const g=e+" "+s.XV+" "+s.hg,p=this.element;p.className=g,p.appendChild(c),p.appendChild(d),this.duration_=void 0!==t.duration?t.duration:250}handleClick_(t,e){e.preventDefault(),this.zoomByDelta_(t)}zoomByDelta_(t){const e=this.getMap().getView();if(!e)return;const i=e.getZoom();if(void 0!==i){const n=e.getConstrainedZoom(i+t);this.duration_>0?(e.getAnimating()&&e.cancelAnimations(),e.animate({zoom:n,duration:this.duration_,easing:o.Vv})):e.setZoom(n)}}}const l=a},8871:(t,e,i)=>{"use strict";i.d(e,{c:()=>a});var n=i(2657),r=i(8714),s=i(9965),o=i(3851);function a(t){t=t||{};const e=new r.Z;return(void 0===t.zoom||t.zoom)&&e.push(new o.Z(t.zoomOptions)),(void 0===t.rotate||t.rotate)&&e.push(new s.Z(t.rotateOptions)),(void 0===t.attribution||t.attribution)&&e.push(new n.Z(t.attributionOptions)),e}},1900:(t,e,i)=>{"use strict";i.d(e,{Bs:()=>f,Cf:()=>m,Ed:()=>a,I8:()=>h,IH:()=>o,TE:()=>p,U1:()=>c,bA:()=>d,bI:()=>g,fS:()=>u,jk:()=>_,oL:()=>l});var n=i(8641),r=i(3983),s=i(9871);function o(t,e){return t[0]+=+e[0],t[1]+=+e[1],t}function a(t,e){const i=e.getRadius(),n=e.getCenter(),r=n[0],s=n[1];let o=t[0]-r;const a=t[1]-s;0===o&&0===a&&(o=1);const l=Math.sqrt(o*o+a*a);return[r+i*o/l,s+i*a/l]}function l(t,e){const i=t[0],n=t[1],r=e[0],s=e[1],o=r[0],a=r[1],l=s[0],h=s[1],u=l-o,c=h-a,d=0===u&&0===c?0:(u*(i-o)+c*(n-a))/(u*u+c*c||0);let g,p;return d<=0?(g=o,p=a):d>=1?(g=l,p=h):(g=o+d*u,p=a+d*c),[g,p]}function h(t,e,i){const n=(0,r.$W)(e+180,360)-180,o=Math.abs(3600*n),a=i||0;let l=Math.floor(o/3600),h=Math.floor((o-3600*l)/60),u=(0,r.FH)(o-3600*l-60*h,a);u>=60&&(u=0,h+=1),h>=60&&(h=0,l+=1);let c=l+"°";return 0===h&&0===u||(c+=" "+(0,s.v)(h,2)+"′"),0!==u&&(c+=" "+(0,s.v)(u,2,a)+"″"),0!==n&&(c+=" "+t.charAt(n<0?1:0)),c}function u(t,e){let i=!0;for(let n=t.length-1;n>=0;--n)if(t[n]!=e[n]){i=!1;break}return i}function c(t,e){const i=Math.cos(e),n=Math.sin(e),r=t[0]*i-t[1]*n,s=t[1]*i+t[0]*n;return t[0]=r,t[1]=s,t}function d(t,e){return t[0]*=e,t[1]*=e,t}function g(t,e){const i=t[0]-e[0],n=t[1]-e[1];return i*i+n*n}function p(t,e){return Math.sqrt(g(t,e))}function f(t,e){return g(t,l(t,e))}function m(t,e){if(e.canWrapX()){const i=(0,n.getWidth)(e.getExtent()),r=_(t,e,i);r&&(t[0]-=r*i)}return t}function _(t,e,i){const r=e.getExtent();let s=0;return e.canWrapX()&&(t[0]<r[0]||t[0]>r[2])&&(i=i||(0,n.getWidth)(r),s=Math.floor((t[0]-r[0])/i)),s}},245:(t,e,i)=>{"use strict";i.d(e,{$A:()=>r,Qi:()=>o,XV:()=>s,hN:()=>l,hg:()=>a,oj:()=>n,p:()=>c});const n="ol-hidden",r="ol-selectable",s="ol-unselectable",o="ol-unsupported",a="ol-control",l="ol-collapsed",h=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"),u=["style","variant","weight","size","lineHeight","family"],c=function(t){const e=t.match(h);if(!e)return null;const i={lineHeight:"normal",size:"1.2em",style:"normal",weight:"normal",variant:"normal"};for(let t=0,n=u.length;t<n;++t){const n=e[t+1];void 0!==n&&(i[u[t]]=n)}return i.families=i.family.split(/,\s?/),i}},8326:(t,e,i)=>{"use strict";i.d(e,{$H:()=>l,E4:()=>r,Pb:()=>a,ZF:()=>h,ep:()=>u,hF:()=>c,iO:()=>o,jy:()=>s});var n=i(177);function r(t,e,i,r){let s;return s=i&&i.length?i.shift():n.Id?new OffscreenCanvas(t||300,e||300):document.createElement("canvas"),t&&(s.width=t),e&&(s.height=e),s.getContext("2d",r)}function s(t){const e=t.canvas;e.width=1,e.height=1,t.clearRect(0,0,1,1)}function o(t){let e=t.offsetWidth;const i=getComputedStyle(t);return e+=parseInt(i.marginLeft,10)+parseInt(i.marginRight,10),e}function a(t){let e=t.offsetHeight;const i=getComputedStyle(t);return e+=parseInt(i.marginTop,10)+parseInt(i.marginBottom,10),e}function l(t,e){const i=e.parentNode;i&&i.replaceChild(t,e)}function h(t){return t&&t.parentNode?t.parentNode.removeChild(t):null}function u(t){for(;t.lastChild;)t.removeChild(t.lastChild)}function c(t,e){const i=t.childNodes;for(let n=0;;++n){const r=i[n],s=e[n];if(!r&&!s)break;r!==s&&(r?s?t.insertBefore(s,r):(t.removeChild(r),--n):t.appendChild(s))}}},1015:(t,e,i)=>{"use strict";function n(t){return Math.pow(t,3)}function r(t){return 1-n(1-t)}function s(t){return 3*t*t-2*t*t*t}function o(t){return t}i.d(e,{GE:()=>o,Vv:()=>r,YQ:()=>n,rd:()=>s})},5818:(t,e,i)=>{"use strict";i.d(e,{Vx:()=>s,bN:()=>o,oL:()=>r});var n=i(9374);function r(t,e,i,n,r){if(n&&n!==t&&(i=i.bind(n)),r){const n=i;i=function(){t.removeEventListener(e,i),n.apply(this,arguments)}}const s={target:t,type:e,listener:i};return t.addEventListener(e,i),s}function s(t,e,i,n){return r(t,e,i,n,!0)}function o(t){t&&t.target&&(t.target.removeEventListener(t.type,t.listener),(0,n.Z)(t))}},291:(t,e,i)=>{"use strict";function n(t){t.stopPropagation()}i.d(e,{UW:()=>n,ZP:()=>r});const r=class{constructor(t){this.propagationStopped,this.defaultPrevented,this.type=t,this.target=null}preventDefault(){this.defaultPrevented=!0}stopPropagation(){this.propagationStopped=!0}}},5487:(t,e,i)=>{"use strict";i.d(e,{Z:()=>n});const n={CHANGE:"change",ERROR:"error",BLUR:"blur",CLEAR:"clear",CONTEXTMENU:"contextmenu",CLICK:"click",DBLCLICK:"dblclick",DRAGENTER:"dragenter",DRAGOVER:"dragover",DROP:"drop",FOCUS:"focus",KEYDOWN:"keydown",KEYPRESS:"keypress",LOAD:"load",RESIZE:"resize",TOUCHMOVE:"touchmove",WHEEL:"wheel"}},7084:(t,e,i)=>{"use strict";i.d(e,{Z:()=>n});const n={LEFT:"ArrowLeft",UP:"ArrowUp",RIGHT:"ArrowRight",DOWN:"ArrowDown"}},208:(t,e,i)=>{"use strict";i.d(e,{Z:()=>l});var n=i(5431),r=i(291),s=i(6885),o=i(9374);class a extends n.Z{constructor(t){super(),this.eventTarget_=t,this.pendingRemovals_=null,this.dispatching_=null,this.listeners_=null}addEventListener(t,e){if(!t||!e)return;const i=this.listeners_||(this.listeners_={}),n=i[t]||(i[t]=[]);n.includes(e)||n.push(e)}dispatchEvent(t){const e="string"==typeof t,i=e?t:t.type,n=this.listeners_&&this.listeners_[i];if(!n)return;const o=e?new r.ZP(t):t;o.target||(o.target=this.eventTarget_||this);const a=this.dispatching_||(this.dispatching_={}),l=this.pendingRemovals_||(this.pendingRemovals_={});let h;i in a||(a[i]=0,l[i]=0),++a[i];for(let t=0,e=n.length;t<e;++t)if(h="handleEvent"in n[t]?n[t].handleEvent(o):n[t].call(this,o),!1===h||o.propagationStopped){h=!1;break}if(0==--a[i]){let t=l[i];for(delete l[i];t--;)this.removeEventListener(i,s.Zn);delete a[i]}return h}disposeInternal(){this.listeners_&&(0,o.Z)(this.listeners_)}getListeners(t){return this.listeners_&&this.listeners_[t]||void 0}hasListener(t){return!!this.listeners_&&(t?t in this.listeners_:Object.keys(this.listeners_).length>0)}removeEventListener(t,e){const i=this.listeners_&&this.listeners_[t];if(i){const n=i.indexOf(e);-1!==n&&(this.pendingRemovals_&&t in this.pendingRemovals_?(i[n]=s.Zn,++this.pendingRemovals_[t]):(i.splice(n,1),0===i.length&&delete this.listeners_[t]))}}}const l=a},8683:(t,e,i)=>{"use strict";i.d(e,{$6:()=>a,Bx:()=>c,Fi:()=>g,Kf:()=>p,Ko:()=>l,QL:()=>v,TN:()=>y,Xp:()=>x,a5:()=>m,aj:()=>h,rM:()=>f,v8:()=>d,vY:()=>_,yZ:()=>u});var n=i(2217),r=i(6885),s=i(177),o=i(9515);function a(t){const e=arguments;return function(t){let i=!0;for(let n=0,r=e.length;n<r&&(i=i&&e[n](t),i);++n);return i}}const l=function(t){const e=t.originalEvent;return e.altKey&&!(e.metaKey||e.ctrlKey)&&!e.shiftKey},h=function(t){const e=t.originalEvent;return e.altKey&&!(e.metaKey||e.ctrlKey)&&e.shiftKey},u=function(t){return!t.map.getTargetElement().hasAttribute("tabindex")||function(t){const e=t.map.getTargetElement(),i=t.map.getOwnerDocument().activeElement;return e.contains(i)}(t)},c=r.uX,d=function(t){const e=t.originalEvent;return 0==e.button&&!(s.G$&&s.tK&&e.ctrlKey)},g=r.Dv,p=function(t){return t.type==n.Z.SINGLECLICK},f=function(t){const e=t.originalEvent;return!e.altKey&&!(e.metaKey||e.ctrlKey)&&!e.shiftKey},m=function(t){const e=t.originalEvent;return s.tK?e.metaKey:e.ctrlKey},_=function(t){const e=t.originalEvent;return!e.altKey&&!(e.metaKey||e.ctrlKey)&&e.shiftKey},y=function(t){const e=t.originalEvent,i=e.target.tagName;return"INPUT"!==i&&"SELECT"!==i&&"TEXTAREA"!==i&&!e.target.isContentEditable},v=function(t){const e=t.originalEvent;return(0,o.h)(void 0!==e,56),"mouse"==e.pointerType},x=function(t){const e=t.originalEvent;return(0,o.h)(void 0!==e,56),e.isPrimary&&0===e.button}},8641:(t,e,i)=>{"use strict";i.r(e),i.d(e,{applyTransform:()=>K,approximatelyEquals:()=>E,boundingExtent:()=>s,buffer:()=>o,clone:()=>a,closestSquaredDistanceXY:()=>l,containsCoordinate:()=>h,containsExtent:()=>u,containsXY:()=>c,coordinateRelationship:()=>d,createEmpty:()=>g,createOrUpdate:()=>p,createOrUpdateEmpty:()=>f,createOrUpdateFromCoordinate:()=>m,createOrUpdateFromCoordinates:()=>_,createOrUpdateFromFlatCoordinates:()=>y,createOrUpdateFromRings:()=>v,equals:()=>x,extend:()=>b,extendCoordinate:()=>w,extendCoordinates:()=>S,extendFlatCoordinates:()=>T,extendRings:()=>C,extendXY:()=>R,forEachCorner:()=>P,getArea:()=>I,getBottomLeft:()=>L,getBottomRight:()=>M,getCenter:()=>F,getCorner:()=>A,getEnlargedArea:()=>Z,getForViewAndSize:()=>D,getHeight:()=>k,getIntersection:()=>z,getIntersectionArea:()=>G,getMargin:()=>N,getRotatedViewport:()=>O,getSize:()=>j,getTopLeft:()=>U,getTopRight:()=>B,getWidth:()=>V,intersects:()=>q,intersectsSegment:()=>Y,isEmpty:()=>W,returnOrUpdate:()=>X,scaleFromCenter:()=>H,wrapAndSliceX:()=>J,wrapX:()=>$});var n=i(8716),r=i(9515);function s(t){const e=[1/0,1/0,-1/0,-1/0];for(let i=0,n=t.length;i<n;++i)w(e,t[i]);return e}function o(t,e,i){return i?(i[0]=t[0]-e,i[1]=t[1]-e,i[2]=t[2]+e,i[3]=t[3]+e,i):[t[0]-e,t[1]-e,t[2]+e,t[3]+e]}function a(t,e){return e?(e[0]=t[0],e[1]=t[1],e[2]=t[2],e[3]=t[3],e):t.slice()}function l(t,e,i){let n,r;return n=e<t[0]?t[0]-e:t[2]<e?e-t[2]:0,r=i<t[1]?t[1]-i:t[3]<i?i-t[3]:0,n*n+r*r}function h(t,e){return c(t,e[0],e[1])}function u(t,e){return t[0]<=e[0]&&e[2]<=t[2]&&t[1]<=e[1]&&e[3]<=t[3]}function c(t,e,i){return t[0]<=e&&e<=t[2]&&t[1]<=i&&i<=t[3]}function d(t,e){const i=t[0],r=t[1],s=t[2],o=t[3],a=e[0],l=e[1];let h=n.Z.UNKNOWN;return a<i?h|=n.Z.LEFT:a>s&&(h|=n.Z.RIGHT),l<r?h|=n.Z.BELOW:l>o&&(h|=n.Z.ABOVE),h===n.Z.UNKNOWN&&(h=n.Z.INTERSECTING),h}function g(){return[1/0,1/0,-1/0,-1/0]}function p(t,e,i,n,r){return r?(r[0]=t,r[1]=e,r[2]=i,r[3]=n,r):[t,e,i,n]}function f(t){return p(1/0,1/0,-1/0,-1/0,t)}function m(t,e){const i=t[0],n=t[1];return p(i,n,i,n,e)}function _(t,e){return S(f(e),t)}function y(t,e,i,n,r){return T(f(r),t,e,i,n)}function v(t,e){return C(f(e),t)}function x(t,e){return t[0]==e[0]&&t[2]==e[2]&&t[1]==e[1]&&t[3]==e[3]}function E(t,e,i){return Math.abs(t[0]-e[0])<i&&Math.abs(t[2]-e[2])<i&&Math.abs(t[1]-e[1])<i&&Math.abs(t[3]-e[3])<i}function b(t,e){return e[0]<t[0]&&(t[0]=e[0]),e[2]>t[2]&&(t[2]=e[2]),e[1]<t[1]&&(t[1]=e[1]),e[3]>t[3]&&(t[3]=e[3]),t}function w(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 S(t,e){for(let i=0,n=e.length;i<n;++i)w(t,e[i]);return t}function T(t,e,i,n,r){for(;i<n;i+=r)R(t,e[i],e[i+1]);return t}function C(t,e){for(let i=0,n=e.length;i<n;++i)S(t,e[i]);return t}function R(t,e,i){t[0]=Math.min(t[0],e),t[1]=Math.min(t[1],i),t[2]=Math.max(t[2],e),t[3]=Math.max(t[3],i)}function P(t,e){let i;return i=e(L(t)),i||(i=e(M(t)),i||(i=e(B(t)),i||(i=e(U(t)),i||!1)))}function I(t){let e=0;return W(t)||(e=V(t)*k(t)),e}function L(t){return[t[0],t[1]]}function M(t){return[t[2],t[1]]}function F(t){return[(t[0]+t[2])/2,(t[1]+t[3])/2]}function A(t,e){let i;return"bottom-left"===e?i=L(t):"bottom-right"===e?i=M(t):"top-left"===e?i=U(t):"top-right"===e?i=B(t):(0,r.h)(!1,13),i}function Z(t,e){const i=Math.min(t[0],e[0]),n=Math.min(t[1],e[1]);return(Math.max(t[2],e[2])-i)*(Math.max(t[3],e[3])-n)}function D(t,e,i,n,r){const[s,o,a,l,h,u,c,d]=O(t,e,i,n);return p(Math.min(s,a,h,c),Math.min(o,l,u,d),Math.max(s,a,h,c),Math.max(o,l,u,d),r)}function O(t,e,i,n){const r=e*n[0]/2,s=e*n[1]/2,o=Math.cos(i),a=Math.sin(i),l=r*o,h=r*a,u=s*o,c=s*a,d=t[0],g=t[1];return[d-l+c,g-h-u,d-l-c,g-h+u,d+l-c,g+h+u,d+l+c,g+h-u,d-l+c,g-h-u]}function k(t){return t[3]-t[1]}function G(t,e){return I(z(t,e))}function z(t,e,i){const n=i||[1/0,1/0,-1/0,-1/0];return q(t,e)?(t[0]>e[0]?n[0]=t[0]:n[0]=e[0],t[1]>e[1]?n[1]=t[1]:n[1]=e[1],t[2]<e[2]?n[2]=t[2]:n[2]=e[2],t[3]<e[3]?n[3]=t[3]:n[3]=e[3]):f(n),n}function N(t){return V(t)+k(t)}function j(t){return[t[2]-t[0],t[3]-t[1]]}function U(t){return[t[0],t[3]]}function B(t){return[t[2],t[3]]}function V(t){return t[2]-t[0]}function q(t,e){return t[0]<=e[2]&&t[2]>=e[0]&&t[1]<=e[3]&&t[3]>=e[1]}function W(t){return t[2]<t[0]||t[3]<t[1]}function X(t,e){return e?(e[0]=t[0],e[1]=t[1],e[2]=t[2],e[3]=t[3],e):t}function H(t,e){const i=(t[2]-t[0])/2*(e-1),n=(t[3]-t[1])/2*(e-1);t[0]-=i,t[2]+=i,t[1]-=n,t[3]+=n}function Y(t,e,i){let r=!1;const s=d(t,e),o=d(t,i);if(s===n.Z.INTERSECTING||o===n.Z.INTERSECTING)r=!0;else{const a=t[0],l=t[1],h=t[2],u=t[3],c=e[0],d=e[1],g=i[0],p=i[1],f=(p-d)/(g-c);let m,_;o&n.Z.ABOVE&&!(s&n.Z.ABOVE)&&(m=g-(p-u)/f,r=m>=a&&m<=h),r||!(o&n.Z.RIGHT)||s&n.Z.RIGHT||(_=p-(g-h)*f,r=_>=l&&_<=u),r||!(o&n.Z.BELOW)||s&n.Z.BELOW||(m=g-(p-l)/f,r=m>=a&&m<=h),r||!(o&n.Z.LEFT)||s&n.Z.LEFT||(_=p-(g-a)*f,r=_>=l&&_<=u)}return r}function K(t,e,i,n){if(W(t))return f(i);let r=[];if(n>1){const e=t[2]-t[0],i=t[3]-t[1];for(let s=0;s<n;++s)r.push(t[0]+e*s/n,t[1],t[2],t[1]+i*s/n,t[2]-e*s/n,t[3],t[0],t[3]-i*s/n)}else r=[t[0],t[1],t[2],t[1],t[2],t[3],t[0],t[3]];e(r,r,2);const s=[],o=[];for(let t=0,e=r.length;t<e;t+=2)s.push(r[t]),o.push(r[t+1]);return function(t,e,i){return p(Math.min.apply(null,t),Math.min.apply(null,e),Math.max.apply(null,t),Math.max.apply(null,e),i)}(s,o,i)}function $(t,e){const i=e.getExtent(),n=F(t);if(e.canWrapX()&&(n[0]<i[0]||n[0]>=i[2])){const e=V(i),r=Math.floor((n[0]-i[0])/e)*e;t[0]-=r,t[2]-=r}return t}function J(t,e){if(e.canWrapX()){const i=e.getExtent();if(!isFinite(t[0])||!isFinite(t[2]))return[[i[0],t[1],i[2],t[3]]];$(t,e);const n=V(i);if(V(t)>n)return[[i[0],t[1],i[2],t[3]]];if(t[0]<i[0])return[[t[0]+n,t[1],i[2],t[3]],[i[0],t[1],t[2],t[3]]];if(t[2]>i[2])return[[t[0],t[1],i[2],t[3]],[i[0],t[1],t[2]-n,t[3]]]}return[t]}},8716:(t,e,i)=>{"use strict";i.d(e,{Z:()=>n});const n={UNKNOWN:0,INTERSECTING:1,ABOVE:2,RIGHT:4,BELOW:8,LEFT:16}},7537:(t,e,i)=>{"use strict";i.d(e,{Be:()=>s,ov:()=>r});var n=i(6885);function r(t,e,i,n,r,s,o){const a=new XMLHttpRequest;a.open("GET","function"==typeof t?t(i,n,r):t,!0),"arraybuffer"==e.getType()&&(a.responseType="arraybuffer"),a.withCredentials=false,a.onload=function(t){if(!a.status||a.status>=200&&a.status<300){const t=e.getType();let n;"json"==t||"text"==t?n=a.responseText:"xml"==t?(n=a.responseXML,n||(n=(new DOMParser).parseFromString(a.responseText,"application/xml"))):"arraybuffer"==t&&(n=a.response),n?s(e.readFeatures(n,{extent:i,featureProjection:r}),e.readProjection(n)):o()}else o()},a.onerror=o,a.send()}function s(t,e){return function(i,s,o,a,l){const h=this;r(t,e,i,s,o,(function(t,e){h.addFeatures(t),void 0!==a&&a(t)}),l||n.Zn)}}},6885:(t,e,i)=>{"use strict";i.d(e,{Dv:()=>s,Vi:()=>l,Zn:()=>o,qe:()=>a,uX:()=>r});var n=i(5537);function r(){return!0}function s(){return!1}function o(){}function a(t){let e,i,r,s=!1;return function(){const o=Array.prototype.slice.call(arguments);return s&&this===r&&(0,n.fS)(o,i)||(s=!0,r=this,i=o,e=t.apply(this,arguments)),e}}function l(t){return function(){let e;try{e=t()}catch(t){return Promise.reject(t)}return e instanceof Promise?e:Promise.resolve(e)}()}},6528:(t,e,i)=>{"use strict";i.r(e),i.d(e,{Circle:()=>n.Z,Geometry:()=>r.Z,GeometryCollection:()=>s.Z,LineString:()=>a.Z,LinearRing:()=>o.Z,MultiLineString:()=>l.Z,MultiPoint:()=>h.Z,MultiPolygon:()=>u.Z,Point:()=>c.default,Polygon:()=>d.ZP,SimpleGeometry:()=>g.ZP});var n=i(7276),r=i(1694),s=i(3958),o=i(7538),a=i(2083),l=i(7403),h=i(6259),u=i(5063),c=i(188),d=i(2033),g=i(2967)},7276:(t,e,i)=>{"use strict";i.d(e,{Z:()=>l});var n=i(2967),r=i(8641),s=i(8527),o=i(6442);class a extends n.ZP{constructor(t,e,i){super(),void 0!==i&&void 0===e?this.setFlatCoordinates(i,t):(e=e||0,this.setCenterAndRadius(t,e,i))}clone(){const t=new a(this.flatCoordinates.slice(),void 0,this.layout);return t.applyProperties(this),t}closestPointXY(t,e,i,n){const r=this.flatCoordinates,s=t-r[0],o=e-r[1],a=s*s+o*o;if(a<n){if(0===a)for(let t=0;t<this.stride;++t)i[t]=r[t];else{const t=this.getRadius()/Math.sqrt(a);i[0]=r[0]+t*s,i[1]=r[1]+t*o;for(let t=2;t<this.stride;++t)i[t]=r[t]}return i.length=this.stride,a}return n}containsXY(t,e){const i=this.flatCoordinates,n=t-i[0],r=e-i[1];return n*n+r*r<=this.getRadiusSquared_()}getCenter(){return this.flatCoordinates.slice(0,this.stride)}computeExtent(t){const e=this.flatCoordinates,i=e[this.stride]-e[0];return(0,r.createOrUpdate)(e[0]-i,e[1]-i,e[0]+i,e[1]+i,t)}getRadius(){return Math.sqrt(this.getRadiusSquared_())}getRadiusSquared_(){const t=this.flatCoordinates[this.stride]-this.flatCoordinates[0],e=this.flatCoordinates[this.stride+1]-this.flatCoordinates[1];return t*t+e*e}getType(){return"Circle"}intersectsExtent(t){const e=this.getExtent();if((0,r.intersects)(t,e)){const e=this.getCenter();return t[0]<=e[0]&&t[2]>=e[0]||t[1]<=e[1]&&t[3]>=e[1]||(0,r.forEachCorner)(t,this.intersectsCoordinate.bind(this))}return!1}setCenter(t){const e=this.stride,i=this.flatCoordinates[e]-this.flatCoordinates[0],n=t.slice();n[e]=n[0]+i;for(let i=1;i<e;++i)n[e+i]=t[i];this.setFlatCoordinates(this.layout,n),this.changed()}setCenterAndRadius(t,e,i){this.setLayout(i,t,0),this.flatCoordinates||(this.flatCoordinates=[]);const n=this.flatCoordinates;let r=(0,s.IG)(n,0,t,this.stride);n[r++]=n[0]+e;for(let t=1,e=this.stride;t<e;++t)n[r++]=n[t];n.length=r,this.changed()}getCoordinates(){return null}setCoordinates(t,e){}setRadius(t){this.flatCoordinates[this.stride]=this.flatCoordinates[0]+t,this.changed()}rotate(t,e){const i=this.getCenter(),n=this.getStride();this.setCenter((0,o.U1)(i,0,i.length,n,t,e,i)),this.changed()}}a.prototype.transform;const l=a},1694:(t,e,i)=>{"use strict";i.d(e,{Z:()=>d});var n=i(2971),r=i(4187),s=i(6101),o=i(8641),a=i(6121),l=i(6885),h=i(6442);const u=(0,s.Ue)();class c extends n.Z{constructor(){super(),this.extent_=(0,o.createEmpty)(),this.extentRevision_=-1,this.simplifiedGeometryMaxMinSquaredTolerance=0,this.simplifiedGeometryRevision=0,this.simplifyTransformedInternal=(0,l.qe)((function(t,e,i){if(!i)return this.getSimplifiedGeometry(e);const n=this.clone();return n.applyTransform(i),n.getSimplifiedGeometry(e)}))}simplifyTransformed(t,e){return this.simplifyTransformedInternal(this.getRevision(),t,e)}clone(){return(0,r.O3)()}closestPointXY(t,e,i,n){return(0,r.O3)()}containsXY(t,e){const i=this.getClosestPoint([t,e]);return i[0]===t&&i[1]===e}getClosestPoint(t,e){return e=e||[NaN,NaN],this.closestPointXY(t[0],t[1],e,1/0),e}intersectsCoordinate(t){return this.containsXY(t[0],t[1])}computeExtent(t){return(0,r.O3)()}getExtent(t){if(this.extentRevision_!=this.getRevision()){const t=this.computeExtent(this.extent_);(isNaN(t[0])||isNaN(t[1]))&&(0,o.createOrUpdateEmpty)(t),this.extentRevision_=this.getRevision()}return(0,o.returnOrUpdate)(this.extent_,t)}rotate(t,e){(0,r.O3)()}scale(t,e,i){(0,r.O3)()}simplify(t){return this.getSimplifiedGeometry(t*t)}getSimplifiedGeometry(t){return(0,r.O3)()}getType(){return(0,r.O3)()}applyTransform(t){(0,r.O3)()}intersectsExtent(t){return(0,r.O3)()}translate(t,e){(0,r.O3)()}transform(t,e){const i=(0,a.get)(t),n="tile-pixels"==i.getUnits()?function(t,n,r){const l=i.getExtent(),c=i.getWorldExtent(),d=(0,o.getHeight)(c)/(0,o.getHeight)(l);return(0,s.qC)(u,c[0],c[3],d,-d,0,0,0),(0,h.vT)(t,0,t.length,r,u,n),(0,a.getTransform)(i,e)(t,n,r)}:(0,a.getTransform)(i,e);return this.applyTransform(n),this}}const d=c},3958:(t,e,i)=>{"use strict";i.d(e,{Z:()=>h});var n=i(5487),r=i(1694),s=i(8641),o=i(5818);class a extends r.Z{constructor(t){super(),this.geometries_=t||null,this.changeEventsKeys_=[],this.listenGeometriesChange_()}unlistenGeometriesChange_(){this.changeEventsKeys_.forEach(o.bN),this.changeEventsKeys_.length=0}listenGeometriesChange_(){if(this.geometries_)for(let t=0,e=this.geometries_.length;t<e;++t)this.changeEventsKeys_.push((0,o.oL)(this.geometries_[t],n.Z.CHANGE,this.changed,this))}clone(){const t=new a(null);return t.setGeometries(this.geometries_),t.applyProperties(this),t}closestPointXY(t,e,i,n){if(n<(0,s.closestSquaredDistanceXY)(this.getExtent(),t,e))return n;const r=this.geometries_;for(let s=0,o=r.length;s<o;++s)n=r[s].closestPointXY(t,e,i,n);return n}containsXY(t,e){const i=this.geometries_;for(let n=0,r=i.length;n<r;++n)if(i[n].containsXY(t,e))return!0;return!1}computeExtent(t){(0,s.createOrUpdateEmpty)(t);const e=this.geometries_;for(let i=0,n=e.length;i<n;++i)(0,s.extend)(t,e[i].getExtent());return t}getGeometries(){return l(this.geometries_)}getGeometriesArray(){return this.geometries_}getGeometriesArrayRecursive(){let t=[];const e=this.geometries_;for(let i=0,n=e.length;i<n;++i)e[i].getType()===this.getType()?t=t.concat(e[i].getGeometriesArrayRecursive()):t.push(e[i]);return t}getSimplifiedGeometry(t){if(this.simplifiedGeometryRevision!==this.getRevision()&&(this.simplifiedGeometryMaxMinSquaredTolerance=0,this.simplifiedGeometryRevision=this.getRevision()),t<0||0!==this.simplifiedGeometryMaxMinSquaredTolerance&&t<this.simplifiedGeometryMaxMinSquaredTolerance)return this;const e=[],i=this.geometries_;let n=!1;for(let r=0,s=i.length;r<s;++r){const s=i[r],o=s.getSimplifiedGeometry(t);e.push(o),o!==s&&(n=!0)}if(n){const t=new a(null);return t.setGeometriesArray(e),t}return this.simplifiedGeometryMaxMinSquaredTolerance=t,this}getType(){return"GeometryCollection"}intersectsExtent(t){const e=this.geometries_;for(let i=0,n=e.length;i<n;++i)if(e[i].intersectsExtent(t))return!0;return!1}isEmpty(){return 0===this.geometries_.length}rotate(t,e){const i=this.geometries_;for(let n=0,r=i.length;n<r;++n)i[n].rotate(t,e);this.changed()}scale(t,e,i){i||(i=(0,s.getCenter)(this.getExtent()));const n=this.geometries_;for(let r=0,s=n.length;r<s;++r)n[r].scale(t,e,i);this.changed()}setGeometries(t){this.setGeometriesArray(l(t))}setGeometriesArray(t){this.unlistenGeometriesChange_(),this.geometries_=t,this.listenGeometriesChange_(),this.changed()}applyTransform(t){const e=this.geometries_;for(let i=0,n=e.length;i<n;++i)e[i].applyTransform(t);this.changed()}translate(t,e){const i=this.geometries_;for(let n=0,r=i.length;n<r;++n)i[n].translate(t,e);this.changed()}disposeInternal(){this.unlistenGeometriesChange_(),super.disposeInternal()}}function l(t){const e=[];for(let i=0,n=t.length;i<n;++i)e.push(t[i].clone());return e}const h=a},2083:(t,e,i)=>{"use strict";i.d(e,{Z:()=>f});var n=i(2967),r=i(3042),s=i(8641),o=i(8527),a=i(226),l=i(5537),h=i(3032),u=i(9241),c=i(9405),d=i(3746),g=i(7374);class p extends n.ZP{constructor(t,e){super(),this.flatMidpoint_=null,this.flatMidpointRevision_=-1,this.maxDelta_=-1,this.maxDeltaRevision_=-1,void 0===e||Array.isArray(t[0])?this.setCoordinates(t,e):this.setFlatCoordinates(e,t)}appendCoordinate(t){this.flatCoordinates?(0,l.l7)(this.flatCoordinates,t):this.flatCoordinates=t.slice(),this.changed()}clone(){const t=new p(this.flatCoordinates.slice(),this.layout);return t.applyProperties(this),t}closestPointXY(t,e,i,n){return n<(0,s.closestSquaredDistanceXY)(this.getExtent(),t,e)?n:(this.maxDeltaRevision_!=this.getRevision()&&(this.maxDelta_=Math.sqrt((0,r.Bv)(this.flatCoordinates,0,this.flatCoordinates.length,this.stride,0)),this.maxDeltaRevision_=this.getRevision()),(0,r.H$)(this.flatCoordinates,0,this.flatCoordinates.length,this.stride,this.maxDelta_,!1,t,e,i,n))}forEachSegment(t){return(0,h.E)(this.flatCoordinates,0,this.flatCoordinates.length,this.stride,t)}getCoordinateAtM(t,e){return"XYM"!=this.layout&&"XYZM"!=this.layout?null:(e=void 0!==e&&e,(0,c.iJ)(this.flatCoordinates,0,this.flatCoordinates.length,this.stride,t,e))}getCoordinates(){return(0,u.Ml)(this.flatCoordinates,0,this.flatCoordinates.length,this.stride)}getCoordinateAt(t,e){return(0,c.WW)(this.flatCoordinates,0,this.flatCoordinates.length,this.stride,t,e,this.stride)}getLength(){return(0,g.W)(this.flatCoordinates,0,this.flatCoordinates.length,this.stride)}getFlatMidpoint(){return this.flatMidpointRevision_!=this.getRevision()&&(this.flatMidpoint_=this.getCoordinateAt(.5,this.flatMidpoint_),this.flatMidpointRevision_=this.getRevision()),this.flatMidpoint_}getSimplifiedGeometryInternal(t){const e=[];return e.length=(0,a.dt)(this.flatCoordinates,0,this.flatCoordinates.length,this.stride,t,e,0),new p(e,"XY")}getType(){return"LineString"}intersectsExtent(t){return(0,d.Kz)(this.flatCoordinates,0,this.flatCoordinates.length,this.stride,t)}setCoordinates(t,e){this.setLayout(e,t,1),this.flatCoordinates||(this.flatCoordinates=[]),this.flatCoordinates.length=(0,o.Sg)(this.flatCoordinates,0,t,this.stride),this.changed()}}const f=p},7538:(t,e,i)=>{"use strict";i.d(e,{Z:()=>c});var n=i(2967),r=i(3042),s=i(8641),o=i(8527),a=i(226),l=i(9241),h=i(4078);class u extends n.ZP{constructor(t,e){super(),this.maxDelta_=-1,this.maxDeltaRevision_=-1,void 0===e||Array.isArray(t[0])?this.setCoordinates(t,e):this.setFlatCoordinates(e,t)}clone(){return new u(this.flatCoordinates.slice(),this.layout)}closestPointXY(t,e,i,n){return n<(0,s.closestSquaredDistanceXY)(this.getExtent(),t,e)?n:(this.maxDeltaRevision_!=this.getRevision()&&(this.maxDelta_=Math.sqrt((0,r.Bv)(this.flatCoordinates,0,this.flatCoordinates.length,this.stride,0)),this.maxDeltaRevision_=this.getRevision()),(0,r.H$)(this.flatCoordinates,0,this.flatCoordinates.length,this.stride,this.maxDelta_,!0,t,e,i,n))}getArea(){return(0,h.QQ)(this.flatCoordinates,0,this.flatCoordinates.length,this.stride)}getCoordinates(){return(0,l.Ml)(this.flatCoordinates,0,this.flatCoordinates.length,this.stride)}getSimplifiedGeometryInternal(t){const e=[];return e.length=(0,a.dt)(this.flatCoordinates,0,this.flatCoordinates.length,this.stride,t,e,0),new u(e,"XY")}getType(){return"LinearRing"}intersectsExtent(t){return!1}setCoordinates(t,e){this.setLayout(e,t,1),this.flatCoordinates||(this.flatCoordinates=[]),this.flatCoordinates.length=(0,o.Sg)(this.flatCoordinates,0,t,this.stride),this.changed()}}const c=u},7403:(t,e,i)=>{"use strict";i.d(e,{Z:()=>p});var n=i(2083),r=i(2967),s=i(3042),o=i(8641),a=i(8527),l=i(226),h=i(5537),u=i(9241),c=i(9405),d=i(3746);class g extends r.ZP{constructor(t,e,i){if(super(),this.ends_=[],this.maxDelta_=-1,this.maxDeltaRevision_=-1,Array.isArray(t[0]))this.setCoordinates(t,e);else if(void 0!==e&&i)this.setFlatCoordinates(e,t),this.ends_=i;else{let e=this.getLayout();const i=t,n=[],r=[];for(let t=0,s=i.length;t<s;++t){const s=i[t];0===t&&(e=s.getLayout()),(0,h.l7)(n,s.getFlatCoordinates()),r.push(n.length)}this.setFlatCoordinates(e,n),this.ends_=r}}appendLineString(t){this.flatCoordinates?(0,h.l7)(this.flatCoordinates,t.getFlatCoordinates().slice()):this.flatCoordinates=t.getFlatCoordinates().slice(),this.ends_.push(this.flatCoordinates.length),this.changed()}clone(){const t=new g(this.flatCoordinates.slice(),this.layout,this.ends_.slice());return t.applyProperties(this),t}closestPointXY(t,e,i,n){return n<(0,o.closestSquaredDistanceXY)(this.getExtent(),t,e)?n:(this.maxDeltaRevision_!=this.getRevision()&&(this.maxDelta_=Math.sqrt((0,s.Af)(this.flatCoordinates,0,this.ends_,this.stride,0)),this.maxDeltaRevision_=this.getRevision()),(0,s.Xl)(this.flatCoordinates,0,this.ends_,this.stride,this.maxDelta_,!1,t,e,i,n))}getCoordinateAtM(t,e,i){return"XYM"!=this.layout&&"XYZM"!=this.layout||0===this.flatCoordinates.length?null:(e=void 0!==e&&e,i=void 0!==i&&i,(0,c.dG)(this.flatCoordinates,0,this.ends_,this.stride,t,e,i))}getCoordinates(){return(0,u.o1)(this.flatCoordinates,0,this.ends_,this.stride)}getEnds(){return this.ends_}getLineString(t){return t<0||this.ends_.length<=t?null:new n.Z(this.flatCoordinates.slice(0===t?0:this.ends_[t-1],this.ends_[t]),this.layout)}getLineStrings(){const t=this.flatCoordinates,e=this.ends_,i=this.layout,r=[];let s=0;for(let o=0,a=e.length;o<a;++o){const a=e[o],l=new n.Z(t.slice(s,a),i);r.push(l),s=a}return r}getFlatMidpoints(){const t=[],e=this.flatCoordinates;let i=0;const n=this.ends_,r=this.stride;for(let s=0,o=n.length;s<o;++s){const o=n[s],a=(0,c.WW)(e,i,o,r,.5);(0,h.l7)(t,a),i=o}return t}getSimplifiedGeometryInternal(t){const e=[],i=[];return e.length=(0,l.UJ)(this.flatCoordinates,0,this.ends_,this.stride,t,e,0,i),new g(e,"XY",i)}getType(){return"MultiLineString"}intersectsExtent(t){return(0,d.AW)(this.flatCoordinates,0,this.ends_,this.stride,t)}setCoordinates(t,e){this.setLayout(e,t,2),this.flatCoordinates||(this.flatCoordinates=[]);const i=(0,a._5)(this.flatCoordinates,0,t,this.stride,this.ends_);this.flatCoordinates.length=0===i.length?0:i[i.length-1],this.changed()}}const p=g},6259:(t,e,i)=>{"use strict";i.d(e,{Z:()=>c});var n=i(188),r=i(2967),s=i(8641),o=i(8527),a=i(5537),l=i(9241),h=i(3983);class u extends r.ZP{constructor(t,e){super(),e&&!Array.isArray(t[0])?this.setFlatCoordinates(e,t):this.setCoordinates(t,e)}appendPoint(t){this.flatCoordinates?(0,a.l7)(this.flatCoordinates,t.getFlatCoordinates()):this.flatCoordinates=t.getFlatCoordinates().slice(),this.changed()}clone(){const t=new u(this.flatCoordinates.slice(),this.layout);return t.applyProperties(this),t}closestPointXY(t,e,i,n){if(n<(0,s.closestSquaredDistanceXY)(this.getExtent(),t,e))return n;const r=this.flatCoordinates,o=this.stride;for(let s=0,a=r.length;s<a;s+=o){const a=(0,h.bI)(t,e,r[s],r[s+1]);if(a<n){n=a;for(let t=0;t<o;++t)i[t]=r[s+t];i.length=o}}return n}getCoordinates(){return(0,l.Ml)(this.flatCoordinates,0,this.flatCoordinates.length,this.stride)}getPoint(t){const e=this.flatCoordinates?this.flatCoordinates.length/this.stride:0;return t<0||e<=t?null:new n.default(this.flatCoordinates.slice(t*this.stride,(t+1)*this.stride),this.layout)}getPoints(){const t=this.flatCoordinates,e=this.layout,i=this.stride,r=[];for(let s=0,o=t.length;s<o;s+=i){const o=new n.default(t.slice(s,s+i),e);r.push(o)}return r}getType(){return"MultiPoint"}intersectsExtent(t){const e=this.flatCoordinates,i=this.stride;for(let n=0,r=e.length;n<r;n+=i){const i=e[n],r=e[n+1];if((0,s.containsXY)(t,i,r))return!0}return!1}setCoordinates(t,e){this.setLayout(e,t,1),this.flatCoordinates||(this.flatCoordinates=[]),this.flatCoordinates.length=(0,o.Sg)(this.flatCoordinates,0,t,this.stride),this.changed()}}const c=u},5063:(t,e,i)=>{"use strict";i.d(e,{Z:()=>v});var n=i(6259),r=i(2033),s=i(2967),o=i(3042),a=i(8641),l=i(8527),h=i(5537),u=i(3448),c=i(9241),d=i(3746),g=i(3157),p=i(4078),f=i(1071),m=i(9679),_=i(226);class y extends s.ZP{constructor(t,e,i){if(super(),this.endss_=[],this.flatInteriorPointsRevision_=-1,this.flatInteriorPoints_=null,this.maxDelta_=-1,this.maxDeltaRevision_=-1,this.orientedRevision_=-1,this.orientedFlatCoordinates_=null,!i&&!Array.isArray(t[0])){let n=this.getLayout();const r=t,s=[],o=[];for(let t=0,e=r.length;t<e;++t){const e=r[t];0===t&&(n=e.getLayout());const i=s.length,a=e.getEnds();for(let t=0,e=a.length;t<e;++t)a[t]+=i;(0,h.l7)(s,e.getFlatCoordinates()),o.push(a)}e=n,t=s,i=o}void 0!==e&&i?(this.setFlatCoordinates(e,t),this.endss_=i):this.setCoordinates(t,e)}appendPolygon(t){let e;if(this.flatCoordinates){const i=this.flatCoordinates.length;(0,h.l7)(this.flatCoordinates,t.getFlatCoordinates()),e=t.getEnds().slice();for(let t=0,n=e.length;t<n;++t)e[t]+=i}else this.flatCoordinates=t.getFlatCoordinates().slice(),e=t.getEnds().slice(),this.endss_.push();this.endss_.push(e),this.changed()}clone(){const t=this.endss_.length,e=new Array(t);for(let i=0;i<t;++i)e[i]=this.endss_[i].slice();const i=new y(this.flatCoordinates.slice(),this.layout,e);return i.applyProperties(this),i}closestPointXY(t,e,i,n){return n<(0,a.closestSquaredDistanceXY)(this.getExtent(),t,e)?n:(this.maxDeltaRevision_!=this.getRevision()&&(this.maxDelta_=Math.sqrt((0,o.sD)(this.flatCoordinates,0,this.endss_,this.stride,0)),this.maxDeltaRevision_=this.getRevision()),(0,o.gI)(this.getOrientedFlatCoordinates(),0,this.endss_,this.stride,this.maxDelta_,!0,t,e,i,n))}containsXY(t,e){return(0,m.Zl)(this.getOrientedFlatCoordinates(),0,this.endss_,this.stride,t,e)}getArea(){return(0,p.Eu)(this.getOrientedFlatCoordinates(),0,this.endss_,this.stride)}getCoordinates(t){let e;return void 0!==t?(e=this.getOrientedFlatCoordinates().slice(),(0,g.dL)(e,0,this.endss_,this.stride,t)):e=this.flatCoordinates,(0,c.ug)(e,0,this.endss_,this.stride)}getEndss(){return this.endss_}getFlatInteriorPoints(){if(this.flatInteriorPointsRevision_!=this.getRevision()){const t=(0,f.E)(this.flatCoordinates,0,this.endss_,this.stride);this.flatInteriorPoints_=(0,u.U)(this.getOrientedFlatCoordinates(),0,this.endss_,this.stride,t),this.flatInteriorPointsRevision_=this.getRevision()}return this.flatInteriorPoints_}getInteriorPoints(){return new n.Z(this.getFlatInteriorPoints().slice(),"XYM")}getOrientedFlatCoordinates(){if(this.orientedRevision_!=this.getRevision()){const t=this.flatCoordinates;(0,g.Oj)(t,0,this.endss_,this.stride)?this.orientedFlatCoordinates_=t:(this.orientedFlatCoordinates_=t.slice(),this.orientedFlatCoordinates_.length=(0,g.dL)(this.orientedFlatCoordinates_,0,this.endss_,this.stride)),this.orientedRevision_=this.getRevision()}return this.orientedFlatCoordinates_}getSimplifiedGeometryInternal(t){const e=[],i=[];return e.length=(0,_.Pp)(this.flatCoordinates,0,this.endss_,this.stride,Math.sqrt(t),e,0,i),new y(e,"XY",i)}getPolygon(t){if(t<0||this.endss_.length<=t)return null;let e;if(0===t)e=0;else{const i=this.endss_[t-1];e=i[i.length-1]}const i=this.endss_[t].slice(),n=i[i.length-1];if(0!==e)for(let t=0,n=i.length;t<n;++t)i[t]-=e;return new r.ZP(this.flatCoordinates.slice(e,n),this.layout,i)}getPolygons(){const t=this.layout,e=this.flatCoordinates,i=this.endss_,n=[];let s=0;for(let o=0,a=i.length;o<a;++o){const a=i[o].slice(),l=a[a.length-1];if(0!==s)for(let t=0,e=a.length;t<e;++t)a[t]-=s;const h=new r.ZP(e.slice(s,l),t,a);n.push(h),s=l}return n}getType(){return"MultiPolygon"}intersectsExtent(t){return(0,d.oW)(this.getOrientedFlatCoordinates(),0,this.endss_,this.stride,t)}setCoordinates(t,e){this.setLayout(e,t,3),this.flatCoordinates||(this.flatCoordinates=[]);const i=(0,l.QT)(this.flatCoordinates,0,t,this.stride,this.endss_);if(0===i.length)this.flatCoordinates.length=0;else{const t=i[i.length-1];this.flatCoordinates.length=0===t.length?0:t[t.length-1]}this.changed()}}const v=y},188:(t,e,i)=>{"use strict";i.r(e),i.d(e,{default:()=>l});var n=i(2967),r=i(8641),s=i(8527),o=i(3983);class a extends n.ZP{constructor(t,e){super(),this.setCoordinates(t,e)}clone(){const t=new a(this.flatCoordinates.slice(),this.layout);return t.applyProperties(this),t}closestPointXY(t,e,i,n){const r=this.flatCoordinates,s=(0,o.bI)(t,e,r[0],r[1]);if(s<n){const t=this.stride;for(let e=0;e<t;++e)i[e]=r[e];return i.length=t,s}return n}getCoordinates(){return this.flatCoordinates?this.flatCoordinates.slice():[]}computeExtent(t){return(0,r.createOrUpdateFromCoordinate)(this.flatCoordinates,t)}getType(){return"Point"}intersectsExtent(t){return(0,r.containsXY)(t,this.flatCoordinates[0],this.flatCoordinates[1])}setCoordinates(t,e){this.setLayout(e,t,0),this.flatCoordinates||(this.flatCoordinates=[]),this.flatCoordinates.length=(0,s.IG)(this.flatCoordinates,0,t,this.stride),this.changed()}}const l=a},2033:(t,e,i)=>{"use strict";i.d(e,{Bb:()=>w,ZP:()=>x,iu:()=>E,oJ:()=>b});var n=i(7538),r=i(188),s=i(2967),o=i(3042),a=i(8641),l=i(8527),h=i(5537),u=i(3448),c=i(9241),d=i(3746),g=i(3157),p=i(4078),f=i(9679),m=i(3983),_=i(226),y=i(7580);class v extends s.ZP{constructor(t,e,i){super(),this.ends_=[],this.flatInteriorPointRevision_=-1,this.flatInteriorPoint_=null,this.maxDelta_=-1,this.maxDeltaRevision_=-1,this.orientedRevision_=-1,this.orientedFlatCoordinates_=null,void 0!==e&&i?(this.setFlatCoordinates(e,t),this.ends_=i):this.setCoordinates(t,e)}appendLinearRing(t){this.flatCoordinates?(0,h.l7)(this.flatCoordinates,t.getFlatCoordinates()):this.flatCoordinates=t.getFlatCoordinates().slice(),this.ends_.push(this.flatCoordinates.length),this.changed()}clone(){const t=new v(this.flatCoordinates.slice(),this.layout,this.ends_.slice());return t.applyProperties(this),t}closestPointXY(t,e,i,n){return n<(0,a.closestSquaredDistanceXY)(this.getExtent(),t,e)?n:(this.maxDeltaRevision_!=this.getRevision()&&(this.maxDelta_=Math.sqrt((0,o.Af)(this.flatCoordinates,0,this.ends_,this.stride,0)),this.maxDeltaRevision_=this.getRevision()),(0,o.Xl)(this.flatCoordinates,0,this.ends_,this.stride,this.maxDelta_,!0,t,e,i,n))}containsXY(t,e){return(0,f.wY)(this.getOrientedFlatCoordinates(),0,this.ends_,this.stride,t,e)}getArea(){return(0,p.KP)(this.getOrientedFlatCoordinates(),0,this.ends_,this.stride)}getCoordinates(t){let e;return void 0!==t?(e=this.getOrientedFlatCoordinates().slice(),(0,g.zX)(e,0,this.ends_,this.stride,t)):e=this.flatCoordinates,(0,c.o1)(e,0,this.ends_,this.stride)}getEnds(){return this.ends_}getFlatInteriorPoint(){if(this.flatInteriorPointRevision_!=this.getRevision()){const t=(0,a.getCenter)(this.getExtent());this.flatInteriorPoint_=(0,u.X)(this.getOrientedFlatCoordinates(),0,this.ends_,this.stride,t,0),this.flatInteriorPointRevision_=this.getRevision()}return this.flatInteriorPoint_}getInteriorPoint(){return new r.default(this.getFlatInteriorPoint(),"XYM")}getLinearRingCount(){return this.ends_.length}getLinearRing(t){return t<0||this.ends_.length<=t?null:new n.Z(this.flatCoordinates.slice(0===t?0:this.ends_[t-1],this.ends_[t]),this.layout)}getLinearRings(){const t=this.layout,e=this.flatCoordinates,i=this.ends_,r=[];let s=0;for(let o=0,a=i.length;o<a;++o){const a=i[o],l=new n.Z(e.slice(s,a),t);r.push(l),s=a}return r}getOrientedFlatCoordinates(){if(this.orientedRevision_!=this.getRevision()){const t=this.flatCoordinates;(0,g.$v)(t,0,this.ends_,this.stride)?this.orientedFlatCoordinates_=t:(this.orientedFlatCoordinates_=t.slice(),this.orientedFlatCoordinates_.length=(0,g.zX)(this.orientedFlatCoordinates_,0,this.ends_,this.stride)),this.orientedRevision_=this.getRevision()}return this.orientedFlatCoordinates_}getSimplifiedGeometryInternal(t){const e=[],i=[];return e.length=(0,_.Zh)(this.flatCoordinates,0,this.ends_,this.stride,Math.sqrt(t),e,0,i),new v(e,"XY",i)}getType(){return"Polygon"}intersectsExtent(t){return(0,d.ac)(this.getOrientedFlatCoordinates(),0,this.ends_,this.stride,t)}setCoordinates(t,e){this.setLayout(e,t,2),this.flatCoordinates||(this.flatCoordinates=[]);const i=(0,l._5)(this.flatCoordinates,0,t,this.stride,this.ends_);this.flatCoordinates.length=0===i.length?0:i[i.length-1],this.changed()}}const x=v;function E(t,e,i,n){i=i||32;const r=[];for(let s=0;s<i;++s)(0,h.l7)(r,(0,y.cv)(t,e,2*Math.PI*s/i,n));return r.push(r[0],r[1]),new v(r,"XY",[r.length])}function b(t){if((0,a.isEmpty)(t))throw new Error("Cannot create polygon from empty extent");const e=t[0],i=t[1],n=t[2],r=t[3],s=[e,i,e,r,n,r,n,i,e,i];return new v(s,"XY",[s.length])}function w(t,e,i){e=e||32;const n=t.getStride(),r=t.getLayout(),s=t.getCenter(),o=n*(e+1),a=new Array(o);for(let t=0;t<o;t+=n){a[t]=0,a[t+1]=0;for(let e=2;e<n;e++)a[t+e]=s[e]}const l=[a.length],h=new v(a,r,l);return function(t,e,i,n){const r=t.getFlatCoordinates(),s=t.getStride(),o=r.length/s-1,a=n||0;for(let t=0;t<=o;++t){const n=t*s,l=a+2*(0,m.$W)(t,o)*Math.PI/o;r[n]=e[0]+i*Math.cos(l),r[n+1]=e[1]+i*Math.sin(l)}t.changed()}(h,s,t.getRadius(),i),h}},2967:(t,e,i)=>{"use strict";i.d(e,{Kr:()=>h,ZP:()=>u,tP:()=>l});var n=i(1694),r=i(4187),s=i(8641),o=i(6442);class a extends n.Z{constructor(){super(),this.layout="XY",this.stride=2,this.flatCoordinates=null}computeExtent(t){return(0,s.createOrUpdateFromFlatCoordinates)(this.flatCoordinates,0,this.flatCoordinates.length,this.stride,t)}getCoordinates(){return(0,r.O3)()}getFirstCoordinate(){return this.flatCoordinates.slice(0,this.stride)}getFlatCoordinates(){return this.flatCoordinates}getLastCoordinate(){return this.flatCoordinates.slice(this.flatCoordinates.length-this.stride)}getLayout(){return this.layout}getSimplifiedGeometry(t){if(this.simplifiedGeometryRevision!==this.getRevision()&&(this.simplifiedGeometryMaxMinSquaredTolerance=0,this.simplifiedGeometryRevision=this.getRevision()),t<0||0!==this.simplifiedGeometryMaxMinSquaredTolerance&&t<=this.simplifiedGeometryMaxMinSquaredTolerance)return this;const e=this.getSimplifiedGeometryInternal(t);return e.getFlatCoordinates().length<this.flatCoordinates.length?e:(this.simplifiedGeometryMaxMinSquaredTolerance=t,this)}getSimplifiedGeometryInternal(t){return this}getStride(){return this.stride}setFlatCoordinates(t,e){this.stride=l(t),this.layout=t,this.flatCoordinates=e}setCoordinates(t,e){(0,r.O3)()}setLayout(t,e,i){let n;if(t)n=l(t);else{for(let t=0;t<i;++t){if(0===e.length)return this.layout="XY",void(this.stride=2);e=e[0]}n=e.length,t=function(t){let e;return 2==t?e="XY":3==t?e="XYZ":4==t&&(e="XYZM"),e}(n)}this.layout=t,this.stride=n}applyTransform(t){this.flatCoordinates&&(t(this.flatCoordinates,this.flatCoordinates,this.stride),this.changed())}rotate(t,e){const i=this.getFlatCoordinates();if(i){const n=this.getStride();(0,o.U1)(i,0,i.length,n,t,e,i),this.changed()}}scale(t,e,i){void 0===e&&(e=t),i||(i=(0,s.getCenter)(this.getExtent()));const n=this.getFlatCoordinates();if(n){const r=this.getStride();(0,o.bA)(n,0,n.length,r,t,e,i,n),this.changed()}}translate(t,e){const i=this.getFlatCoordinates();if(i){const n=this.getStride();(0,o.Iu)(i,0,i.length,n,t,e,i),this.changed()}}}function l(t){let e;return"XY"==t?e=2:"XYZ"==t||"XYM"==t?e=3:"XYZM"==t&&(e=4),e}function h(t,e,i){const n=t.getFlatCoordinates();if(!n)return null;const r=t.getStride();return(0,o.vT)(n,0,n.length,r,e,i)}const u=a},4078:(t,e,i)=>{"use strict";function n(t,e,i,n){let r=0,s=t[i-n],o=t[i-n+1];for(;e<i;e+=n){const i=t[e],n=t[e+1];r+=o*i-s*n,s=i,o=n}return r/2}function r(t,e,i,r){let s=0;for(let o=0,a=i.length;o<a;++o){const a=i[o];s+=n(t,e,a,r),e=a}return s}function s(t,e,i,n){let s=0;for(let o=0,a=i.length;o<a;++o){const a=i[o];s+=r(t,e,a,n),e=a[a.length-1]}return s}i.d(e,{Eu:()=>s,KP:()=>r,QQ:()=>n})},1071:(t,e,i)=>{"use strict";i.d(e,{E:()=>r});var n=i(8641);function r(t,e,i,r){const s=[];let o=(0,n.createEmpty)();for(let a=0,l=i.length;a<l;++a){const l=i[a];o=(0,n.createOrUpdateFromFlatCoordinates)(t,e,l[0],r),s.push((o[0]+o[2])/2,(o[1]+o[3])/2),e=l[l.length-1]}return s}},3042:(t,e,i)=>{"use strict";i.d(e,{Af:()=>o,Bv:()=>s,H$:()=>l,Xl:()=>h,gI:()=>u,sD:()=>a});var n=i(3983);function r(t,e,i,r,s,o,a){const l=t[e],h=t[e+1],u=t[i]-l,c=t[i+1]-h;let d;if(0===u&&0===c)d=e;else{const g=((s-l)*u+(o-h)*c)/(u*u+c*c);if(g>1)d=i;else{if(g>0){for(let s=0;s<r;++s)a[s]=(0,n.t7)(t[e+s],t[i+s],g);return void(a.length=r)}d=e}}for(let e=0;e<r;++e)a[e]=t[d+e];a.length=r}function s(t,e,i,r,s){let o=t[e],a=t[e+1];for(e+=r;e<i;e+=r){const i=t[e],r=t[e+1],l=(0,n.bI)(o,a,i,r);l>s&&(s=l),o=i,a=r}return s}function o(t,e,i,n,r){for(let o=0,a=i.length;o<a;++o){const a=i[o];r=s(t,e,a,n,r),e=a}return r}function a(t,e,i,n,r){for(let s=0,a=i.length;s<a;++s){const a=i[s];r=o(t,e,a,n,r),e=a[a.length-1]}return r}function l(t,e,i,s,o,a,l,h,u,c,d){if(e==i)return c;let g,p;if(0===o){if(p=(0,n.bI)(l,h,t[e],t[e+1]),p<c){for(g=0;g<s;++g)u[g]=t[e+g];return u.length=s,p}return c}d=d||[NaN,NaN];let f=e+s;for(;f<i;)if(r(t,f-s,f,s,l,h,d),p=(0,n.bI)(l,h,d[0],d[1]),p<c){for(c=p,g=0;g<s;++g)u[g]=d[g];u.length=s,f+=s}else f+=s*Math.max((Math.sqrt(p)-Math.sqrt(c))/o|0,1);if(a&&(r(t,i-s,e,s,l,h,d),p=(0,n.bI)(l,h,d[0],d[1]),p<c)){for(c=p,g=0;g<s;++g)u[g]=d[g];u.length=s}return c}function h(t,e,i,n,r,s,o,a,h,u,c){c=c||[NaN,NaN];for(let d=0,g=i.length;d<g;++d){const g=i[d];u=l(t,e,g,n,r,s,o,a,h,u,c),e=g}return u}function u(t,e,i,n,r,s,o,a,l,u,c){c=c||[NaN,NaN];for(let d=0,g=i.length;d<g;++d){const g=i[d];u=h(t,e,g,n,r,s,o,a,l,u,c),e=g[g.length-1]}return u}},9679:(t,e,i)=>{"use strict";i.d(e,{TG:()=>s,Zl:()=>a,uG:()=>r,wY:()=>o});var n=i(8641);function r(t,e,i,r,o){return!(0,n.forEachCorner)(o,(function(n){return!s(t,e,i,r,n[0],n[1])}))}function s(t,e,i,n,r,s){let o=0,a=t[i-n],l=t[i-n+1];for(;e<i;e+=n){const i=t[e],n=t[e+1];l<=s?n>s&&(i-a)*(s-l)-(r-a)*(n-l)>0&&o++:n<=s&&(i-a)*(s-l)-(r-a)*(n-l)<0&&o--,a=i,l=n}return 0!==o}function o(t,e,i,n,r,o){if(0===i.length)return!1;if(!s(t,e,i[0],n,r,o))return!1;for(let e=1,a=i.length;e<a;++e)if(s(t,i[e-1],i[e],n,r,o))return!1;return!0}function a(t,e,i,n,r,s){if(0===i.length)return!1;for(let a=0,l=i.length;a<l;++a){const l=i[a];if(o(t,e,l,n,r,s))return!0;e=l[l.length-1]}return!1}},8527:(t,e,i)=>{"use strict";function n(t,e,i,n){for(let n=0,r=i.length;n<r;++n)t[e++]=i[n];return e}function r(t,e,i,n){for(let r=0,s=i.length;r<s;++r){const s=i[r];for(let i=0;i<n;++i)t[e++]=s[i]}return e}function s(t,e,i,n,s){s=s||[];let o=0;for(let a=0,l=i.length;a<l;++a){const l=r(t,e,i[a],n);s[o++]=l,e=l}return s.length=o,s}function o(t,e,i,n,r){r=r||[];let o=0;for(let a=0,l=i.length;a<l;++a){const l=s(t,e,i[a],n,r[o]);0===l.length&&(l[0]=e),r[o++]=l,e=l[l.length-1]}return r.length=o,r}i.d(e,{IG:()=>n,QT:()=>o,Sg:()=>r,_5:()=>s})},9241:(t,e,i)=>{"use strict";function n(t,e,i,n,r){r=void 0!==r?r:[];let s=0;for(let o=e;o<i;o+=n)r[s++]=t.slice(o,o+n);return r.length=s,r}function r(t,e,i,r,s){s=void 0!==s?s:[];let o=0;for(let a=0,l=i.length;a<l;++a){const l=i[a];s[o++]=n(t,e,l,r,s[o]),e=l}return s.length=o,s}function s(t,e,i,n,s){s=void 0!==s?s:[];let o=0;for(let a=0,l=i.length;a<l;++a){const l=i[a];s[o++]=1===l.length&&l[0]===e?[]:r(t,e,l,n,s[o]),e=l[l.length-1]}return s.length=o,s}i.d(e,{Ml:()=>n,o1:()=>r,ug:()=>s})},3448:(t,e,i)=>{"use strict";i.d(e,{U:()=>o,X:()=>s});var n=i(5537),r=i(9679);function s(t,e,i,s,o,a,l){let h,u,c,d,g,p,f;const m=o[a+1],_=[];for(let n=0,r=i.length;n<r;++n){const r=i[n];for(d=t[r-s],p=t[r-s+1],h=e;h<r;h+=s)g=t[h],f=t[h+1],(m<=p&&f<=m||p<=m&&m<=f)&&(c=(m-p)/(f-p)*(g-d)+d,_.push(c)),d=g,p=f}let y=NaN,v=-1/0;for(_.sort(n.j2),d=_[0],h=1,u=_.length;h<u;++h){g=_[h];const n=Math.abs(g-d);n>v&&(c=(d+g)/2,(0,r.wY)(t,e,i,s,c,m)&&(y=c,v=n)),d=g}return isNaN(y)&&(y=o[a]),l?(l.push(y,m,v),l):[y,m,v]}function o(t,e,i,n,r){let o=[];for(let a=0,l=i.length;a<l;++a){const l=i[a];o=s(t,e,l,n,r,2*a,o),e=l[l.length-1]}return o}},9405:(t,e,i)=>{"use strict";i.d(e,{WW:()=>s,dG:()=>a,iJ:()=>o});var n=i(5537),r=i(3983);function s(t,e,i,s,o,a,l){let h,u;const c=(i-e)/s;if(1===c)h=e;else if(2===c)h=e,u=o;else if(0!==c){let r=t[e],a=t[e+1],l=0;const c=[0];for(let n=e+s;n<i;n+=s){const e=t[n],i=t[n+1];l+=Math.sqrt((e-r)*(e-r)+(i-a)*(i-a)),c.push(l),r=e,a=i}const d=o*l,g=(0,n.ry)(c,d);g<0?(u=(d-c[-g-2])/(c[-g-1]-c[-g-2]),h=e+(-g-2)*s):h=e+g*s}l=l>1?l:2,a=a||new Array(l);for(let e=0;e<l;++e)a[e]=void 0===h?NaN:void 0===u?t[h+e]:(0,r.t7)(t[h+e],t[h+s+e],u);return a}function o(t,e,i,n,s,o){if(i==e)return null;let a;if(s<t[e+n-1])return o?(a=t.slice(e,e+n),a[n-1]=s,a):null;if(t[i-1]<s)return o?(a=t.slice(i-n,i),a[n-1]=s,a):null;if(s==t[e+n-1])return t.slice(e,e+n);let l=e/n,h=i/n;for(;l<h;){const e=l+h>>1;s<t[(e+1)*n-1]?h=e:l=e+1}const u=t[l*n-1];if(s==u)return t.slice((l-1)*n,(l-1)*n+n);const c=(s-u)/(t[(l+1)*n-1]-u);a=[];for(let e=0;e<n-1;++e)a.push((0,r.t7)(t[(l-1)*n+e],t[l*n+e],c));return a.push(s),a}function a(t,e,i,n,r,s,a){if(a)return o(t,e,i[i.length-1],n,r,s);let l;if(r<t[n-1])return s?(l=t.slice(0,n),l[n-1]=r,l):null;if(t[t.length-1]<r)return s?(l=t.slice(t.length-n),l[n-1]=r,l):null;for(let s=0,a=i.length;s<a;++s){const a=i[s];if(e!=a){if(r<t[e+n-1])return null;if(r<=t[a-1])return o(t,e,a,n,r,!1);e=a}}return null}},3746:(t,e,i)=>{"use strict";i.d(e,{AW:()=>a,Kz:()=>o,ac:()=>h,mV:()=>l,oW:()=>u});var n=i(8641),r=i(3032),s=i(9679);function o(t,e,i,s,o){const a=(0,n.extendFlatCoordinates)((0,n.createEmpty)(),t,e,i,s);return!!(0,n.intersects)(o,a)&&(!!(0,n.containsExtent)(o,a)||a[0]>=o[0]&&a[2]<=o[2]||a[1]>=o[1]&&a[3]<=o[3]||(0,r.E)(t,e,i,s,(function(t,e){return(0,n.intersectsSegment)(o,t,e)})))}function a(t,e,i,n,r){for(let s=0,a=i.length;s<a;++s){if(o(t,e,i[s],n,r))return!0;e=i[s]}return!1}function l(t,e,i,n,r){return!!(o(t,e,i,n,r)||(0,s.TG)(t,e,i,n,r[0],r[1])||(0,s.TG)(t,e,i,n,r[0],r[3])||(0,s.TG)(t,e,i,n,r[2],r[1])||(0,s.TG)(t,e,i,n,r[2],r[3]))}function h(t,e,i,n,r){if(!l(t,e,i[0],n,r))return!1;if(1===i.length)return!0;for(let e=1,a=i.length;e<a;++e)if((0,s.uG)(t,i[e-1],i[e],n,r)&&!o(t,i[e-1],i[e],n,r))return!1;return!0}function u(t,e,i,n,r){for(let s=0,o=i.length;s<o;++s){const o=i[s];if(h(t,e,o,n,r))return!0;e=o[o.length-1]}return!1}},7374:(t,e,i)=>{"use strict";function n(t,e,i,n){let r=t[e],s=t[e+1],o=0;for(let a=e+n;a<i;a+=n){const e=t[a],i=t[a+1];o+=Math.sqrt((e-r)*(e-r)+(i-s)*(i-s)),r=e,s=i}return o}i.d(e,{W:()=>n})},1842:(t,e,i)=>{"use strict";i.d(e,{D:()=>r});var n=i(3983);function r(t,e,i,r,s){const o=[];let a=i,l=0,h=e.slice(i,2);for(;l<t&&a+s<r;){const[i,r]=h.slice(-2),u=e[a+s],c=e[a+s+1],d=Math.sqrt((u-i)*(u-i)+(c-r)*(c-r));if(l+=d,l>=t){const e=(t-l+d)/d,g=(0,n.t7)(i,u,e),p=(0,n.t7)(r,c,e);h.push(g,p),o.push(h),h=[g,p],l==t&&(a+=s),l=0}else if(l<t)h.push(e[a+s],e[a+s+1]),a+=s;else{const t=d-l,e=(0,n.t7)(i,u,t/d),g=(0,n.t7)(r,c,t/d);h.push(e,g),o.push(h),h=[e,g],l=0,a+=s}}return l>0&&o.push(h),o}},3157:(t,e,i)=>{"use strict";i.d(e,{$v:()=>s,Oj:()=>o,Q3:()=>h,dL:()=>l,zX:()=>a});var n=i(1404);function r(t,e,i,n){let r=0,s=t[i-n],o=t[i-n+1];for(;e<i;e+=n){const i=t[e],n=t[e+1];r+=(i-s)*(n+o),s=i,o=n}return 0===r?void 0:r>0}function s(t,e,i,n,s){s=void 0!==s&&s;for(let o=0,a=i.length;o<a;++o){const a=i[o],l=r(t,e,a,n);if(0===o){if(s&&l||!s&&!l)return!1}else if(s&&!l||!s&&l)return!1;e=a}return!0}function o(t,e,i,n,r){for(let o=0,a=i.length;o<a;++o){const a=i[o];if(!s(t,e,a,n,r))return!1;a.length&&(e=a[a.length-1])}return!0}function a(t,e,i,s,o){o=void 0!==o&&o;for(let a=0,l=i.length;a<l;++a){const l=i[a],h=r(t,e,l,s);(0===a?o&&h||!o&&!h:o&&!h||!o&&h)&&(0,n.k)(t,e,l,s),e=l}return e}function l(t,e,i,n,r){for(let s=0,o=i.length;s<o;++s)e=a(t,e,i[s],n,r);return e}function h(t,e){const i=[];let n=0,s=0;for(let o=0,a=e.length;o<a;++o){const a=e[o];if(r(t,n,a,2)){if(0===i.length)continue;i[i.length-1].push(e[s])}else i.push(e.slice(s,o+1));s=o+1,n=a}return i}},1404:(t,e,i)=>{"use strict";function n(t,e,i,n){for(;e<i-n;){for(let r=0;r<n;++r){const s=t[e+r];t[e+r]=t[i-n+r],t[i-n+r]=s}e+=n,i-=n}}i.d(e,{k:()=>n})},3032:(t,e,i)=>{"use strict";function n(t,e,i,n,r){let s;for(e+=n;e<i;e+=n)if(s=r(t.slice(e-n,e),t.slice(e,e+n)),s)return s;return!1}i.d(e,{E:()=>n})},226:(t,e,i)=>{"use strict";i.d(e,{Pp:()=>h,UJ:()=>s,Zh:()=>l,dt:()=>r,uZ:()=>o});var n=i(3983);function r(t,e,i,r,s,o,a){const l=(i-e)/r;if(l<3){for(;e<i;e+=r)o[a++]=t[e],o[a++]=t[e+1];return a}const h=new Array(l);h[0]=1,h[l-1]=1;const u=[e,i-r];let c=0;for(;u.length>0;){const i=u.pop(),o=u.pop();let a=0;const l=t[o],d=t[o+1],g=t[i],p=t[i+1];for(let e=o+r;e<i;e+=r){const i=t[e],r=t[e+1],s=(0,n.rU)(i,r,l,d,g,p);s>a&&(c=e,a=s)}a>s&&(h[(c-e)/r]=1,o+r<c&&u.push(o,c),c+r<i&&u.push(c,i))}for(let i=0;i<l;++i)h[i]&&(o[a++]=t[e+i*r],o[a++]=t[e+i*r+1]);return a}function s(t,e,i,n,s,o,a,l){for(let h=0,u=i.length;h<u;++h){const u=i[h];a=r(t,e,u,n,s,o,a),l.push(a),e=u}return a}function o(t,e){return e*Math.round(t/e)}function a(t,e,i,n,r,s,a){if(e==i)return a;let l,h,u=o(t[e],r),c=o(t[e+1],r);e+=n,s[a++]=u,s[a++]=c;do{if(l=o(t[e],r),h=o(t[e+1],r),(e+=n)==i)return s[a++]=l,s[a++]=h,a}while(l==u&&h==c);for(;e<i;){const i=o(t[e],r),d=o(t[e+1],r);if(e+=n,i==l&&d==h)continue;const g=l-u,p=h-c,f=i-u,m=d-c;g*m==p*f&&(g<0&&f<g||g==f||g>0&&f>g)&&(p<0&&m<p||p==m||p>0&&m>p)?(l=i,h=d):(s[a++]=l,s[a++]=h,u=l,c=h,l=i,h=d)}return s[a++]=l,s[a++]=h,a}function l(t,e,i,n,r,s,o,l){for(let h=0,u=i.length;h<u;++h){const u=i[h];o=a(t,e,u,n,r,s,o),l.push(o),e=u}return o}function h(t,e,i,n,r,s,o,a){for(let h=0,u=i.length;h<u;++h){const u=i[h],c=[];o=l(t,e,u,n,r,s,o,c),a.push(c),e=u[u.length-1]}return o}},2365:(t,e,i)=>{"use strict";function n(t,e,i,n,r){let s,o,a,l,h,u,c,d,g,p,f=i,m=i,_=0,y=0,v=i;for(o=i;o<n;o+=r){const i=e[o],n=e[o+1];void 0!==h&&(g=i-h,p=n-u,l=Math.sqrt(g*g+p*p),void 0!==c&&(y+=a,s=Math.acos((c*g+d*p)/(a*l)),s>t&&(y>_&&(_=y,f=v,m=o),y=0,v=o-r)),a=l,c=g,d=p),h=i,u=n}return y+=l,y>_?[v,o]:[f,m]}i.d(e,{_:()=>n})},7396:(t,e,i)=>{"use strict";i.d(e,{q:()=>s});var n=i(3983),r=i(6442);function s(t,e,i,s,o,a,l,h,u,c,d,g){let p=t[e],f=t[e+1],m=0,_=0,y=0,v=0;function x(){m=p,_=f,p=t[e+=s],f=t[e+1],v+=y,y=Math.sqrt((p-m)*(p-m)+(f-_)*(f-_))}do{x()}while(e<i-s&&v+y<a);let E=0===y?0:(a-v)/y;const b=(0,n.t7)(m,p,E),w=(0,n.t7)(_,f,E),S=e-s,T=v,C=a+h*u(c,o,d);for(;e<i-s&&v+y<C;)x();E=0===y?0:(C-v)/y;const R=(0,n.t7)(m,p,E),P=(0,n.t7)(_,f,E);let I;if(g){const t=[b,w,R,P];(0,r.U1)(t,0,4,2,g,t,t),I=t[0]>t[2]}else I=b>R;const L=Math.PI,M=[],F=S+s===e;let A;if(y=0,v=T,p=t[e=S],f=t[e+1],F){x(),A=Math.atan2(f-_,p-m),I&&(A+=A>0?-L:L);const t=(R+b)/2,e=(P+w)/2;return M[0]=[t,e,(C-a)/2,A,o],M}for(let t=0,r=(o=o.replace(/\n/g," ")).length;t<r;){x();let g=Math.atan2(f-_,p-m);if(I&&(g+=g>0?-L:L),void 0!==A){let t=g-A;if(t+=t>L?-2*L:t<-L?2*L:0,Math.abs(t)>l)return null}A=g;const b=t;let w=0;for(;t<r;++t){const n=h*u(c,o[I?r-t-1:t],d);if(e+s<i&&v+y<a+w+n/2)break;w+=n}if(t===b)continue;const S=I?o.substring(r-b,r-t):o.substring(b,t);E=0===y?0:(a+w/2-v)/y;const T=(0,n.t7)(m,p,E),C=(0,n.t7)(_,f,E);M.push([T,C,w/2,g,S]),a+=w}return M}},6442:(t,e,i)=>{"use strict";function n(t,e,i,n,r,s){s=s||[];let o=0;for(let a=e;a<i;a+=n){const e=t[a],i=t[a+1];s[o++]=r[0]*e+r[2]*i+r[4],s[o++]=r[1]*e+r[3]*i+r[5]}return s&&s.length!=o&&(s.length=o),s}function r(t,e,i,n,r,s,o){o=o||[];const a=Math.cos(r),l=Math.sin(r),h=s[0],u=s[1];let c=0;for(let r=e;r<i;r+=n){const e=t[r]-h,i=t[r+1]-u;o[c++]=h+e*a-i*l,o[c++]=u+e*l+i*a;for(let e=r+2;e<r+n;++e)o[c++]=t[e]}return o&&o.length!=c&&(o.length=c),o}function s(t,e,i,n,r,s,o,a){a=a||[];const l=o[0],h=o[1];let u=0;for(let o=e;o<i;o+=n){const e=t[o]-l,i=t[o+1]-h;a[u++]=l+r*e,a[u++]=h+s*i;for(let e=o+2;e<o+n;++e)a[u++]=t[e]}return a&&a.length!=u&&(a.length=u),a}function o(t,e,i,n,r,s,o){o=o||[];let a=0;for(let l=e;l<i;l+=n){o[a++]=t[l]+r,o[a++]=t[l+1]+s;for(let e=l+2;e<l+n;++e)o[a++]=t[e]}return o&&o.length!=a&&(o.length=a),o}i.d(e,{Iu:()=>o,U1:()=>r,bA:()=>s,vT:()=>n})},177:(t,e,i)=>{"use strict";i.d(e,{G$:()=>o,Id:()=>h,ME:()=>s,MP:()=>l,Tp:()=>u,V:()=>r,bM:()=>c,tK:()=>a});const n="undefined"!=typeof navigator&&void 0!==navigator.userAgent?navigator.userAgent.toLowerCase():"",r=n.includes("firefox"),s=n.includes("safari")&&!n.includes("chrom")&&(n.includes("version/15.4")||/cpu (os|iphone os) 15_4 like mac os x/.test(n)),o=n.includes("webkit")&&!n.includes("edge"),a=n.includes("macintosh"),l="undefined"!=typeof devicePixelRatio?devicePixelRatio:1,h="undefined"!=typeof WorkerGlobalScope&&"undefined"!=typeof OffscreenCanvas&&self instanceof WorkerGlobalScope,u="undefined"!=typeof Image&&Image.prototype.decode,c=function(){let t=!1;try{const e=Object.defineProperty({},"passive",{get:function(){t=!0}});window.addEventListener("_",null,e),window.removeEventListener("_",null,e)}catch(t){}return t}()},9984:(t,e,i)=>{"use strict";i.r(e),i.d(e,{AssertionError:()=>n.Z,Collection:()=>r.Z,Disposable:()=>s.Z,Feature:()=>o.default,Geolocation:()=>S,Graticule:()=>T.Z,Image:()=>C.Z,ImageBase:()=>R.Z,ImageCanvas:()=>P.Z,ImageTile:()=>I.Z,Kinetic:()=>L.Z,Map:()=>M.Z,MapBrowserEvent:()=>F.Z,MapBrowserEventHandler:()=>A.Z,MapEvent:()=>Z.Z,Object:()=>l.Z,Observable:()=>D.Z,Overlay:()=>O.Z,Tile:()=>k.Z,TileCache:()=>G.Z,TileQueue:()=>z.Z,TileRange:()=>N.Z,VERSION:()=>V.q4,VectorRenderTile:()=>j.Z,VectorTile:()=>U.Z,View:()=>B.ZP,getUid:()=>V.sq});var n=i(6813),r=i(8714),s=i(5431),o=i(1090),a=i(291),l=i(2971),h=i(2033),u=i(6121),c=i(3983);const d="accuracy",g="accuracyGeometry",p="altitude",f="altitudeAccuracy",m="heading",_="position",y="projection",v="speed",x="tracking",E="trackingOptions";class b extends a.ZP{constructor(t){super("error"),this.code=t.code,this.message=t.message}}class w extends l.Z{constructor(t){super(),this.on,this.once,this.un,t=t||{},this.position_=null,this.transform_=u.identityTransform,this.watchId_=void 0,this.addChangeListener(y,this.handleProjectionChanged_),this.addChangeListener(x,this.handleTrackingChanged_),void 0!==t.projection&&this.setProjection(t.projection),void 0!==t.trackingOptions&&this.setTrackingOptions(t.trackingOptions),this.setTracking(void 0!==t.tracking&&t.tracking)}disposeInternal(){this.setTracking(!1),super.disposeInternal()}handleProjectionChanged_(){const t=this.getProjection();t&&(this.transform_=(0,u.getTransformFromProjections)((0,u.get)("EPSG:4326"),t),this.position_&&this.set(_,this.transform_(this.position_)))}handleTrackingChanged_(){if("geolocation"in navigator){const t=this.getTracking();t&&void 0===this.watchId_?this.watchId_=navigator.geolocation.watchPosition(this.positionChange_.bind(this),this.positionError_.bind(this),this.getTrackingOptions()):t||void 0===this.watchId_||(navigator.geolocation.clearWatch(this.watchId_),this.watchId_=void 0)}}positionChange_(t){const e=t.coords;this.set(d,e.accuracy),this.set(p,null===e.altitude?void 0:e.altitude),this.set(f,null===e.altitudeAccuracy?void 0:e.altitudeAccuracy),this.set(m,null===e.heading?void 0:(0,c.Yr)(e.heading)),this.position_?(this.position_[0]=e.longitude,this.position_[1]=e.latitude):this.position_=[e.longitude,e.latitude];const i=this.transform_(this.position_);this.set(_,i.slice()),this.set(v,null===e.speed?void 0:e.speed);const n=(0,h.iu)(this.position_,e.accuracy);n.applyTransform(this.transform_),this.set(g,n),this.changed()}positionError_(t){this.dispatchEvent(new b(t))}getAccuracy(){return this.get(d)}getAccuracyGeometry(){return this.get(g)||null}getAltitude(){return this.get(p)}getAltitudeAccuracy(){return this.get(f)}getHeading(){return this.get(m)}getPosition(){return this.get(_)}getProjection(){return this.get(y)}getSpeed(){return this.get(v)}getTracking(){return this.get(x)}getTrackingOptions(){return this.get(E)}setProjection(t){this.set(y,(0,u.get)(t))}setTracking(t){this.set(x,t)}setTrackingOptions(t){this.set(E,t)}}const S=w;var T=i(8599),C=i(8096),R=i(1798),P=i(8294),I=i(825),L=i(1230),M=i(8658),F=i(8630),A=i(1708),Z=i(3536),D=i(2706),O=i(3223),k=i(4806),G=i(1702),z=i(9882),N=i(2519),j=i(2559),U=i(4759),B=i(7681),V=i(4187)},6944:(t,e,i)=>{"use strict";i.r(e),i.d(e,{DblClickDragZoom:()=>a,DoubleClickZoom:()=>n.Z,DragAndDrop:()=>f,DragBox:()=>m.Z,DragPan:()=>_.Z,DragRotate:()=>y.Z,DragRotateAndZoom:()=>b,DragZoom:()=>w.Z,Draw:()=>et,Extent:()=>lt,Interaction:()=>r.ZP,KeyboardPan:()=>ht.Z,KeyboardZoom:()=>ut.Z,Link:()=>mt,Modify:()=>Ft,MouseWheelZoom:()=>At.Z,PinchRotate:()=>Zt.Z,PinchZoom:()=>Dt.Z,Pointer:()=>v.Z,Select:()=>Nt,Snap:()=>qt,Translate:()=>Ht,defaults:()=>Yt.c});var n=i(3522),r=i(7182),s=i(2217);class o extends r.ZP{constructor(t){const e=t||{};super(e),e.stopDown&&(this.stopDown=e.stopDown),this.scaleDeltaByPixel_=e.delta?e.delta:.01,this.duration_=void 0!==e.duration?e.duration:250,this.handlingDownUpSequence_=!1,this.handlingDoubleDownSequence_=!1,this.doubleTapTimeoutId_=void 0,this.trackedPointers_={},this.targetPointers=[]}handleEvent(t){if(!t.originalEvent)return!0;let e=!1;if(this.updateTrackedPointers_(t),this.handlingDownUpSequence_){if(t.type==s.Z.POINTERDRAG)this.handleDragEvent(t),t.originalEvent.preventDefault();else if(t.type==s.Z.POINTERUP){const e=this.handleUpEvent(t);this.handlingDownUpSequence_=e}}else if(t.type==s.Z.POINTERDOWN)if(this.handlingDoubleDownSequence_){this.handlingDoubleDownSequence_=!1;const i=this.handleDownEvent(t);this.handlingDownUpSequence_=i,e=this.stopDown(i)}else e=this.stopDown(!1),this.waitForDblTap_();return!e}handleDragEvent(t){let e=1;const i=this.targetPointers[0],n=this.down_.originalEvent,r=i.clientY-n.clientY;void 0!==this.lastDistance_&&(e=1-(this.lastDistance_-r)*this.scaleDeltaByPixel_),this.lastDistance_=r,1!=e&&(this.lastScaleDelta_=e);const s=t.map,o=s.getView();s.render(),o.adjustResolutionInternal(e)}handleDownEvent(t){if(1==this.targetPointers.length){const e=t.map;return this.anchor_=null,this.lastDistance_=void 0,this.lastScaleDelta_=1,this.down_=t,this.handlingDownUpSequence_||e.getView().beginInteraction(),!0}return!1}handleUpEvent(t){if(0==this.targetPointers.length){const e=t.map.getView(),i=this.lastScaleDelta_>1?1:-1;return e.endInteraction(this.duration_,i),this.handlingDownUpSequence_=!1,this.handlingDoubleDownSequence_=!1,!1}return!0}stopDown(t){return t}updateTrackedPointers_(t){if(function(t){const e=t.type;return e===s.Z.POINTERDOWN||e===s.Z.POINTERDRAG||e===s.Z.POINTERUP}(t)){const e=t.originalEvent,i=e.pointerId.toString();t.type==s.Z.POINTERUP?delete this.trackedPointers_[i]:(t.type==s.Z.POINTERDOWN||i in this.trackedPointers_)&&(this.trackedPointers_[i]=e),this.targetPointers=Object.values(this.trackedPointers_)}}waitForDblTap_(){void 0!==this.doubleTapTimeoutId_?(clearTimeout(this.doubleTapTimeoutId_),this.doubleTapTimeoutId_=void 0):(this.handlingDoubleDownSequence_=!0,this.doubleTapTimeoutId_=setTimeout(this.endInteraction_.bind(this),250))}endInteraction_(){this.handlingDoubleDownSequence_=!1,this.doubleTapTimeoutId_=void 0}}const a=o;var l=i(291),h=i(5487),u=i(6885),c=i(6121),d=i(5818);class g extends l.ZP{constructor(t,e,i,n){super(t),this.features=i,this.file=e,this.projection=n}}class p extends r.ZP{constructor(t){t=t||{},super({handleEvent:u.uX}),this.on,this.once,this.un,this.readAsBuffer_=!1,this.formats_=[];const e=t.formatConstructors?t.formatConstructors:[];for(let t=0,i=e.length;t<i;++t){let i=e[t];"function"==typeof i&&(i=new i),this.formats_.push(i),this.readAsBuffer_=this.readAsBuffer_||"arraybuffer"===i.getType()}this.projection_=t.projection?(0,c.get)(t.projection):null,this.dropListenKeys_=null,this.source_=t.source||null,this.target=t.target?t.target:null}handleResult_(t,e){const i=e.target.result,n=this.getMap();let r,s=this.projection_;s||(s=(0,c.getUserProjection)(),s)||(s=n.getView().getProjection());const o=this.formats_;for(let e=0,n=o.length;e<n;++e){const n=o[e];let a=i;this.readAsBuffer_&&"arraybuffer"!==n.getType()&&(void 0===r&&(r=(new TextDecoder).decode(i)),a=r);const l=this.tryReadFeatures_(n,a,{featureProjection:s});if(l&&l.length>0){this.source_&&(this.source_.clear(),this.source_.addFeatures(l)),this.dispatchEvent(new g("addfeatures",t,l,s));break}}}registerListeners_(){const t=this.getMap();if(t){const e=this.target?this.target:t.getViewport();this.dropListenKeys_=[(0,d.oL)(e,h.Z.DROP,this.handleDrop,this),(0,d.oL)(e,h.Z.DRAGENTER,this.handleStop,this),(0,d.oL)(e,h.Z.DRAGOVER,this.handleStop,this),(0,d.oL)(e,h.Z.DROP,this.handleStop,this)]}}setActive(t){!this.getActive()&&t&&this.registerListeners_(),this.getActive()&&!t&&this.unregisterListeners_(),super.setActive(t)}setMap(t){this.unregisterListeners_(),super.setMap(t),this.getActive()&&this.registerListeners_()}tryReadFeatures_(t,e,i){try{return t.readFeatures(e,i)}catch(t){return null}}unregisterListeners_(){this.dropListenKeys_&&(this.dropListenKeys_.forEach(d.bN),this.dropListenKeys_=null)}handleDrop(t){const e=t.dataTransfer.files;for(let t=0,i=e.length;t<i;++t){const i=e.item(t),n=new FileReader;n.addEventListener(h.Z.LOAD,this.handleResult_.bind(this,i)),this.readAsBuffer_?n.readAsArrayBuffer(i):n.readAsText(i)}}handleStop(t){t.stopPropagation(),t.preventDefault(),t.dataTransfer.dropEffect="copy"}}const f=p;var m=i(9365),_=i(3267),y=i(2857),v=i(4515),x=i(8683);class E extends v.Z{constructor(t){super(t=t||{}),this.condition_=t.condition?t.condition:x.vY,this.lastAngle_=void 0,this.lastMagnitude_=void 0,this.lastScaleDelta_=0,this.duration_=void 0!==t.duration?t.duration:400}handleDragEvent(t){if(!(0,x.QL)(t))return;const e=t.map,i=e.getSize(),n=t.pixel,r=n[0]-i[0]/2,s=i[1]/2-n[1],o=Math.atan2(s,r),a=Math.sqrt(r*r+s*s),l=e.getView();if(void 0!==this.lastAngle_){const t=this.lastAngle_-o;l.adjustRotationInternal(t)}this.lastAngle_=o,void 0!==this.lastMagnitude_&&l.adjustResolutionInternal(this.lastMagnitude_/a),void 0!==this.lastMagnitude_&&(this.lastScaleDelta_=this.lastMagnitude_/a),this.lastMagnitude_=a}handleUpEvent(t){if(!(0,x.QL)(t))return!0;const e=t.map.getView(),i=this.lastScaleDelta_>1?1:-1;return e.endInteraction(this.duration_,i),this.lastScaleDelta_=0,!1}handleDownEvent(t){return!!(0,x.QL)(t)&&!!this.condition_(t)&&(t.map.getView().beginInteraction(),this.lastAngle_=void 0,this.lastMagnitude_=void 0,!0)}}const b=E;var w=i(519),S=i(7276),T=i(1090),C=i(3958),R=i(4049),P=i(2083),I=i(8630),L=i(7403),M=i(6259),F=i(5063),A=i(188),Z=i(2033),D=i(2371),O=i(2556),k=i(8641),G=i(3983),z=i(7539),N=i(1900),j=i(2967);const U="drawstart";class B extends l.ZP{constructor(t,e){super(t),this.feature=e}}function V(t,e){return(0,G.bI)(t[0],t[1],e[0],e[1])}function q(t,e){const i=t.length;return e<0?t[e+i]:e>=i?t[e-i]:t[e]}function W(t,e,i){let n,r;e<i?(n=e,r=i):(n=i,r=e);const s=Math.ceil(n),o=Math.floor(r);if(s>o)return V(J(t,n),J(t,r));let a=0;n<s&&(a+=V(J(t,n),q(t,s))),o<r&&(a+=V(q(t,o),J(t,r)));for(let e=s;e<o-1;++e)a+=V(q(t,e),q(t,e+1));return a}function X(t,e,i){if(e instanceof P.Z)Y(t,e.getCoordinates(),!1,i);else if(e instanceof L.Z){const n=e.getCoordinates();for(let e=0,r=n.length;e<r;++e)Y(t,n[e],!1,i)}else if(e instanceof Z.ZP){const n=e.getCoordinates();for(let e=0,r=n.length;e<r;++e)Y(t,n[e],!0,i)}else if(e instanceof F.Z){const n=e.getCoordinates();for(let e=0,r=n.length;e<r;++e){const r=n[e];for(let e=0,n=r.length;e<n;++e)Y(t,r[e],!0,i)}}else if(e instanceof C.Z){const n=e.getGeometries();for(let e=0;e<n.length;++e)X(t,n[e],i)}}const H={index:-1,endIndex:NaN};function Y(t,e,i,n){const r=t[0],s=t[1];for(let t=0,o=e.length-1;t<o;++t){const o=$(r,s,e[t],e[t+1]);if(0===o.squaredDistance){const r=t+o.along;return void n.push({coordinates:e,ring:i,startIndex:r,endIndex:r})}}}const K={along:0,squaredDistance:0};function $(t,e,i,n){const r=i[0],s=i[1],o=n[0]-r,a=n[1]-s;let l=0,h=r,u=s;return 0===o&&0===a||(l=(0,G.uZ)(((t-r)*o+(e-s)*a)/(o*o+a*a),0,1),h+=o*l,u+=a*l),K.along=l,K.squaredDistance=(0,G.FH)((0,G.bI)(t,e,h,u),10),K}function J(t,e){const i=t.length;let n=Math.floor(e);const r=e-n;n>=i?n-=i:n<0&&(n+=i);let s=n+1;s>=i&&(s-=i);const o=t[n],a=o[0],l=o[1],h=t[s];return[a+(h[0]-a)*r,l+(h[1]-l)*r]}class Q extends v.Z{constructor(t){const e=t;e.stopDown||(e.stopDown=u.Dv),super(e),this.on,this.once,this.un,this.shouldHandle_=!1,this.downPx_=null,this.downTimeout_,this.lastDragTime_,this.pointerType_,this.freehand_=!1,this.source_=t.source?t.source:null,this.features_=t.features?t.features:null,this.snapTolerance_=t.snapTolerance?t.snapTolerance:12,this.type_=t.type,this.mode_=function(t){switch(t){case"Point":case"MultiPoint":return"Point";case"LineString":case"MultiLineString":return"LineString";case"Polygon":case"MultiPolygon":return"Polygon";case"Circle":return"Circle";default:throw new Error("Invalid type: "+t)}}(this.type_),this.stopClick_=!!t.stopClick,this.minPoints_=t.minPoints?t.minPoints:"Polygon"===this.mode_?3:2,this.maxPoints_="Circle"===this.mode_?2:t.maxPoints?t.maxPoints:1/0,this.finishCondition_=t.finishCondition?t.finishCondition:u.uX,this.geometryLayout_=t.geometryLayout?t.geometryLayout:"XY";let i=t.geometryFunction;if(!i){const t=this.mode_;if("Circle"===t)i=function(t,e,i){const n=e||new S.Z([NaN,NaN]),r=(0,c.fromUserCoordinate)(t[0],i),s=(0,N.bI)(r,(0,c.fromUserCoordinate)(t[t.length-1],i));n.setCenterAndRadius(r,Math.sqrt(s),this.geometryLayout_);const o=(0,c.getUserProjection)();return o&&n.transform(i,o),n};else{let e;"Point"===t?e=A.default:"LineString"===t?e=P.Z:"Polygon"===t&&(e=Z.ZP),i=function(i,n,r){return n?"Polygon"===t?i[0].length?n.setCoordinates([i[0].concat([i[0][0]])],this.geometryLayout_):n.setCoordinates([],this.geometryLayout_):n.setCoordinates(i,this.geometryLayout_):n=new e(i,this.geometryLayout_),n}}}this.geometryFunction_=i,this.dragVertexDelay_=void 0!==t.dragVertexDelay?t.dragVertexDelay:500,this.finishCoordinate_=null,this.sketchFeature_=null,this.sketchPoint_=null,this.sketchCoords_=null,this.sketchLine_=null,this.sketchLineCoords_=null,this.squaredClickTolerance_=t.clickTolerance?t.clickTolerance*t.clickTolerance:36,this.overlay_=new D.Z({source:new O.Z({useSpatialIndex:!1,wrapX:!!t.wrapX&&t.wrapX}),style:t.style?t.style:tt(),updateWhileInteracting:!0}),this.geometryName_=t.geometryName,this.condition_=t.condition?t.condition:x.rM,this.freehandCondition_,t.freehand?this.freehandCondition_=x.Bx:this.freehandCondition_=t.freehandCondition?t.freehandCondition:x.vY,this.traceCondition_,this.setTrace(t.trace||!1),this.traceState_={active:!1},this.traceSource_=t.traceSource||t.source||null,this.addChangeListener(R.Z.ACTIVE,this.updateState_)}setTrace(t){let e;e=t?!0===t?x.Bx:t:x.Fi,this.traceCondition_=e}setMap(t){super.setMap(t),this.updateState_()}getOverlay(){return this.overlay_}handleEvent(t){t.originalEvent.type===h.Z.CONTEXTMENU&&t.originalEvent.preventDefault(),this.freehand_="Point"!==this.mode_&&this.freehandCondition_(t);let e=t.type===s.Z.POINTERMOVE,i=!0;return!this.freehand_&&this.lastDragTime_&&t.type===s.Z.POINTERDRAG&&(Date.now()-this.lastDragTime_>=this.dragVertexDelay_?(this.downPx_=t.pixel,this.shouldHandle_=!this.freehand_,e=!0):this.lastDragTime_=void 0,this.shouldHandle_&&void 0!==this.downTimeout_&&(clearTimeout(this.downTimeout_),this.downTimeout_=void 0)),this.freehand_&&t.type===s.Z.POINTERDRAG&&null!==this.sketchFeature_?(this.addToDrawing_(t.coordinate),i=!1):this.freehand_&&t.type===s.Z.POINTERDOWN?i=!1:e&&this.getPointerCount()<2?(i=t.type===s.Z.POINTERMOVE,i&&this.freehand_?(this.handlePointerMove_(t),this.shouldHandle_&&t.originalEvent.preventDefault()):("mouse"===t.originalEvent.pointerType||t.type===s.Z.POINTERDRAG&&void 0===this.downTimeout_)&&this.handlePointerMove_(t)):t.type===s.Z.DBLCLICK&&(i=!1),super.handleEvent(t)&&i}handleDownEvent(t){return this.shouldHandle_=!this.freehand_,this.freehand_?(this.downPx_=t.pixel,this.finishCoordinate_||this.startDrawing_(t.coordinate),!0):this.condition_(t)?(this.lastDragTime_=Date.now(),this.downTimeout_=setTimeout((()=>{this.handlePointerMove_(new I.Z(s.Z.POINTERMOVE,t.map,t.originalEvent,!1,t.frameState))}),this.dragVertexDelay_),this.downPx_=t.pixel,!0):(this.lastDragTime_=void 0,!1)}deactivateTrace_(){this.traceState_={active:!1}}toggleTraceState_(t){if(!this.traceSource_||!this.traceCondition_(t))return;if(this.traceState_.active)return void this.deactivateTrace_();const e=this.getMap(),i=e.getCoordinateFromPixel([t.pixel[0]-this.snapTolerance_,t.pixel[1]+this.snapTolerance_]),n=e.getCoordinateFromPixel([t.pixel[0]+this.snapTolerance_,t.pixel[1]-this.snapTolerance_]),r=(0,k.boundingExtent)([i,n]),s=this.traceSource_.getFeaturesInExtent(r);if(0===s.length)return;const o=function(t,e){const i=[];for(let n=0;n<e.length;++n)X(t,e[n].getGeometry(),i);return i}(t.coordinate,s);o.length&&(this.traceState_={active:!0,startPx:t.pixel.slice(),targets:o,targetIndex:-1})}addOrRemoveTracedCoordinates_(t,e){const i=t.startIndex<=t.endIndex;i===t.startIndex<=e?i&&e>t.endIndex||!i&&e<t.endIndex?this.addTracedCoordinates_(t,t.endIndex,e):(i&&e<t.endIndex||!i&&e>t.endIndex)&&this.removeTracedCoordinates_(e,t.endIndex):(this.removeTracedCoordinates_(t.startIndex,t.endIndex),this.addTracedCoordinates_(t,t.startIndex,e))}removeTracedCoordinates_(t,e){if(t===e)return;let i=0;if(t<e){const n=Math.ceil(t);let r=Math.floor(e);r===e&&(r-=1),i=r-n+1}else{const n=Math.floor(t);let r=Math.ceil(e);r===e&&(r+=1),i=n-r+1}i>0&&this.removeLastPoints_(i)}addTracedCoordinates_(t,e,i){if(e===i)return;const n=[];if(e<i){const r=Math.ceil(e);let s=Math.floor(i);s===i&&(s-=1);for(let e=r;e<=s;++e)n.push(q(t.coordinates,e))}else{const r=Math.floor(e);let s=Math.ceil(i);s===i&&(s+=1);for(let e=r;e>=s;--e)n.push(q(t.coordinates,e))}n.length&&this.appendCoordinates(n)}updateTrace_(t){const e=this.traceState_;if(!e.active)return;if(-1===e.targetIndex&&(0,N.TE)(e.startPx,t.pixel)<this.snapTolerance_)return;const i=function(t,e,i,n){const r=t[0],s=t[1];let o=1/0,a=-1,l=NaN;for(let t=0;t<e.targets.length;++t){const i=e.targets[t],n=i.coordinates;let h,u=1/0;for(let t=0;t<n.length-1;++t){const e=$(r,s,n[t],n[t+1]);e.squaredDistance<u&&(u=e.squaredDistance,h=t+e.along)}u<o&&(o=u,i.ring&&e.targetIndex===t&&(i.endIndex>i.startIndex?h<i.startIndex&&(h+=n.length):i.endIndex<i.startIndex&&h>i.startIndex&&(h-=n.length)),l=h,a=t)}const h=e.targets[a];let u=h.ring;if(e.targetIndex===a&&u){const t=J(h.coordinates,l),r=i.getPixelFromCoordinate(t);(0,N.TE)(r,e.startPx)>n&&(u=!1)}if(u){const t=h.coordinates,e=t.length,i=h.startIndex,n=l;if(i<n){const r=W(t,i,n);W(t,i,n-e)<r&&(l-=e)}else{const r=W(t,i,n);W(t,i,n+e)<r&&(l+=e)}}return H.index=a,H.endIndex=l,H}(t.coordinate,e,this.getMap(),this.snapTolerance_);if(e.targetIndex!==i.index){if(-1!==e.targetIndex){const t=e.targets[e.targetIndex];this.removeTracedCoordinates_(t.startIndex,t.endIndex)}const t=e.targets[i.index];this.addTracedCoordinates_(t,t.startIndex,i.endIndex)}else{const t=e.targets[e.targetIndex];this.addOrRemoveTracedCoordinates_(t,i.endIndex)}e.targetIndex=i.index;const n=e.targets[e.targetIndex];n.endIndex=i.endIndex;const r=J(n.coordinates,n.endIndex),s=this.getMap().getPixelFromCoordinate(r);t.coordinate=r,t.pixel=[Math.round(s[0]),Math.round(s[1])]}handleUpEvent(t){let e=!0;if(0===this.getPointerCount()){this.downTimeout_&&(clearTimeout(this.downTimeout_),this.downTimeout_=void 0),this.handlePointerMove_(t);const i=this.traceState_.active;if(this.toggleTraceState_(t),this.shouldHandle_){const n=!this.finishCoordinate_;n&&this.startDrawing_(t.coordinate),!n&&this.freehand_?this.finishDrawing():this.freehand_||n&&"Point"!==this.mode_||(this.atFinish_(t.pixel,i)?this.finishCondition_(t)&&this.finishDrawing():this.addToDrawing_(t.coordinate)),e=!1}else this.freehand_&&this.abortDrawing()}return!e&&this.stopClick_&&t.preventDefault(),e}handlePointerMove_(t){if(this.pointerType_=t.originalEvent.pointerType,this.downPx_&&(!this.freehand_&&this.shouldHandle_||this.freehand_&&!this.shouldHandle_)){const e=this.downPx_,i=t.pixel,n=e[0]-i[0],r=e[1]-i[1],s=n*n+r*r;if(this.shouldHandle_=this.freehand_?s>this.squaredClickTolerance_:s<=this.squaredClickTolerance_,!this.shouldHandle_)return}this.finishCoordinate_?(this.updateTrace_(t),this.modifyDrawing_(t.coordinate)):this.createOrUpdateSketchPoint_(t.coordinate.slice())}atFinish_(t,e){let i=!1;if(this.sketchFeature_){let n=!1,r=[this.finishCoordinate_];const s=this.mode_;if("Point"===s)i=!0;else if("Circle"===s)i=2===this.sketchCoords_.length;else if("LineString"===s)n=!e&&this.sketchCoords_.length>this.minPoints_;else if("Polygon"===s){const t=this.sketchCoords_;n=t[0].length>this.minPoints_,r=[t[0][0],t[0][t[0].length-2]],r=e?[t[0][0]]:[t[0][0],t[0][t[0].length-2]]}if(n){const e=this.getMap();for(let n=0,s=r.length;n<s;n++){const s=r[n],o=e.getPixelFromCoordinate(s),a=t[0]-o[0],l=t[1]-o[1],h=this.freehand_?1:this.snapTolerance_;if(i=Math.sqrt(a*a+l*l)<=h,i){this.finishCoordinate_=s;break}}}}return i}createOrUpdateSketchPoint_(t){this.sketchPoint_?this.sketchPoint_.getGeometry().setCoordinates(t):(this.sketchPoint_=new T.default(new A.default(t)),this.updateSketchFeatures_())}createOrUpdateCustomSketchLine_(t){this.sketchLine_||(this.sketchLine_=new T.default);const e=t.getLinearRing(0);let i=this.sketchLine_.getGeometry();i?(i.setFlatCoordinates(e.getLayout(),e.getFlatCoordinates()),i.changed()):(i=new P.Z(e.getFlatCoordinates(),e.getLayout()),this.sketchLine_.setGeometry(i))}startDrawing_(t){const e=this.getMap().getView().getProjection(),i=(0,j.tP)(this.geometryLayout_);for(;t.length<i;)t.push(0);this.finishCoordinate_=t,"Point"===this.mode_?this.sketchCoords_=t.slice():"Polygon"===this.mode_?(this.sketchCoords_=[[t.slice(),t.slice()]],this.sketchLineCoords_=this.sketchCoords_[0]):this.sketchCoords_=[t.slice(),t.slice()],this.sketchLineCoords_&&(this.sketchLine_=new T.default(new P.Z(this.sketchLineCoords_)));const n=this.geometryFunction_(this.sketchCoords_,void 0,e);this.sketchFeature_=new T.default,this.geometryName_&&this.sketchFeature_.setGeometryName(this.geometryName_),this.sketchFeature_.setGeometry(n),this.updateSketchFeatures_(),this.dispatchEvent(new B(U,this.sketchFeature_))}modifyDrawing_(t){const e=this.getMap(),i=this.sketchFeature_.getGeometry(),n=e.getView().getProjection(),r=(0,j.tP)(this.geometryLayout_);let s,o;for(;t.length<r;)t.push(0);"Point"===this.mode_?o=this.sketchCoords_:"Polygon"===this.mode_?(s=this.sketchCoords_[0],o=s[s.length-1],this.atFinish_(e.getPixelFromCoordinate(t))&&(t=this.finishCoordinate_.slice())):(s=this.sketchCoords_,o=s[s.length-1]),o[0]=t[0],o[1]=t[1],this.geometryFunction_(this.sketchCoords_,i,n),this.sketchPoint_&&this.sketchPoint_.getGeometry().setCoordinates(t),"Polygon"===i.getType()&&"Polygon"!==this.mode_?this.createOrUpdateCustomSketchLine_(i):this.sketchLineCoords_&&this.sketchLine_.getGeometry().setCoordinates(this.sketchLineCoords_),this.updateSketchFeatures_()}addToDrawing_(t){const e=this.sketchFeature_.getGeometry(),i=this.getMap().getView().getProjection();let n,r;const s=this.mode_;"LineString"===s||"Circle"===s?(this.finishCoordinate_=t.slice(),r=this.sketchCoords_,r.length>=this.maxPoints_&&(this.freehand_?r.pop():n=!0),r.push(t.slice()),this.geometryFunction_(r,e,i)):"Polygon"===s&&(r=this.sketchCoords_[0],r.length>=this.maxPoints_&&(this.freehand_?r.pop():n=!0),r.push(t.slice()),n&&(this.finishCoordinate_=r[0]),this.geometryFunction_(this.sketchCoords_,e,i)),this.createOrUpdateSketchPoint_(t.slice()),this.updateSketchFeatures_(),n&&this.finishDrawing()}removeLastPoints_(t){if(!this.sketchFeature_)return;const e=this.sketchFeature_.getGeometry(),i=this.getMap().getView().getProjection(),n=this.mode_;for(let r=0;r<t;++r){let t;if("LineString"===n||"Circle"===n){if(t=this.sketchCoords_,t.splice(-2,1),t.length>=2){this.finishCoordinate_=t[t.length-2].slice();const e=this.finishCoordinate_.slice();t[t.length-1]=e,this.createOrUpdateSketchPoint_(e)}this.geometryFunction_(t,e,i),"Polygon"===e.getType()&&this.sketchLine_&&this.createOrUpdateCustomSketchLine_(e)}else if("Polygon"===n){t=this.sketchCoords_[0],t.splice(-2,1);const n=this.sketchLine_.getGeometry();if(t.length>=2){const e=t[t.length-2].slice();t[t.length-1]=e,this.createOrUpdateSketchPoint_(e)}n.setCoordinates(t),this.geometryFunction_(this.sketchCoords_,e,i)}if(1===t.length){this.abortDrawing();break}}this.updateSketchFeatures_()}removeLastPoint(){this.removeLastPoints_(1)}finishDrawing(){const t=this.abortDrawing_();if(!t)return;let e=this.sketchCoords_;const i=t.getGeometry(),n=this.getMap().getView().getProjection();"LineString"===this.mode_?(e.pop(),this.geometryFunction_(e,i,n)):"Polygon"===this.mode_&&(e[0].pop(),this.geometryFunction_(e,i,n),e=i.getCoordinates()),"MultiPoint"===this.type_?t.setGeometry(new M.Z([e])):"MultiLineString"===this.type_?t.setGeometry(new L.Z([e])):"MultiPolygon"===this.type_&&t.setGeometry(new F.Z([e])),this.dispatchEvent(new B("drawend",t)),this.features_&&this.features_.push(t),this.source_&&this.source_.addFeature(t)}abortDrawing_(){this.finishCoordinate_=null;const t=this.sketchFeature_;return this.sketchFeature_=null,this.sketchPoint_=null,this.sketchLine_=null,this.overlay_.getSource().clear(!0),this.deactivateTrace_(),t}abortDrawing(){const t=this.abortDrawing_();t&&this.dispatchEvent(new B("drawabort",t))}appendCoordinates(t){const e=this.mode_,i=!this.sketchFeature_;let n;if(i&&this.startDrawing_(t[0]),"LineString"===e||"Circle"===e)n=this.sketchCoords_;else{if("Polygon"!==e)return;n=this.sketchCoords_&&this.sketchCoords_.length?this.sketchCoords_[0]:[]}i&&n.shift(),n.pop();for(let e=0;e<t.length;e++)this.addToDrawing_(t[e]);const r=t[t.length-1];this.addToDrawing_(r),this.modifyDrawing_(r)}extend(t){const e=t.getGeometry();this.sketchFeature_=t,this.sketchCoords_=e.getCoordinates();const i=this.sketchCoords_[this.sketchCoords_.length-1];this.finishCoordinate_=i.slice(),this.sketchCoords_.push(i.slice()),this.sketchPoint_=new T.default(new A.default(i)),this.updateSketchFeatures_(),this.dispatchEvent(new B(U,this.sketchFeature_))}updateSketchFeatures_(){const t=[];this.sketchFeature_&&t.push(this.sketchFeature_),this.sketchLine_&&t.push(this.sketchLine_),this.sketchPoint_&&t.push(this.sketchPoint_);const e=this.overlay_.getSource();e.clear(!0),e.addFeatures(t)}updateState_(){const t=this.getMap(),e=this.getActive();t&&e||this.abortDrawing(),this.overlay_.setMap(e?t:null)}}function tt(){const t=(0,z.Ly)();return function(e,i){return t[e.getGeometry().getType()]}}const et=Q;class it extends l.ZP{constructor(t){super("extentchanged"),this.extent=t}}class nt extends v.Z{constructor(t){super(t=t||{}),this.on,this.once,this.un,this.condition_=t.condition?t.condition:x.Bx,this.extent_=null,this.pointerHandler_=null,this.pixelTolerance_=void 0!==t.pixelTolerance?t.pixelTolerance:10,this.snappedToVertex_=!1,this.extentFeature_=null,this.vertexFeature_=null,t||(t={}),this.extentOverlay_=new D.Z({source:new O.Z({useSpatialIndex:!1,wrapX:!!t.wrapX}),style:t.boxStyle?t.boxStyle:rt(),updateWhileAnimating:!0,updateWhileInteracting:!0}),this.vertexOverlay_=new D.Z({source:new O.Z({useSpatialIndex:!1,wrapX:!!t.wrapX}),style:t.pointerStyle?t.pointerStyle:st(),updateWhileAnimating:!0,updateWhileInteracting:!0}),t.extent&&this.setExtent(t.extent)}snapToVertex_(t,e){const i=e.getCoordinateFromPixelInternal(t),n=function(t,e){return(0,N.Bs)(i,t)-(0,N.Bs)(i,e)},r=this.getExtentInternal();if(r){const s=function(t){return[[[t[0],t[1]],[t[0],t[3]]],[[t[0],t[3]],[t[2],t[3]]],[[t[2],t[3]],[t[2],t[1]]],[[t[2],t[1]],[t[0],t[1]]]]}(r);s.sort(n);const o=s[0];let a=(0,N.oL)(i,o);const l=e.getPixelFromCoordinateInternal(a);if((0,N.TE)(t,l)<=this.pixelTolerance_){const t=e.getPixelFromCoordinateInternal(o[0]),i=e.getPixelFromCoordinateInternal(o[1]),n=(0,N.bI)(l,t),r=(0,N.bI)(l,i),s=Math.sqrt(Math.min(n,r));return this.snappedToVertex_=s<=this.pixelTolerance_,this.snappedToVertex_&&(a=n>r?o[1]:o[0]),a}}return null}handlePointerMove_(t){const e=t.pixel,i=t.map;let n=this.snapToVertex_(e,i);n||(n=i.getCoordinateFromPixelInternal(e)),this.createOrUpdatePointerFeature_(n)}createOrUpdateExtentFeature_(t){let e=this.extentFeature_;return e?t?e.setGeometry((0,Z.oJ)(t)):e.setGeometry(void 0):(e=t?new T.default((0,Z.oJ)(t)):new T.default({}),this.extentFeature_=e,this.extentOverlay_.getSource().addFeature(e)),e}createOrUpdatePointerFeature_(t){let e=this.vertexFeature_;return e?e.getGeometry().setCoordinates(t):(e=new T.default(new A.default(t)),this.vertexFeature_=e,this.vertexOverlay_.getSource().addFeature(e)),e}handleEvent(t){return!t.originalEvent||!this.condition_(t)||(t.type!=s.Z.POINTERMOVE||this.handlingDownUpSequence||this.handlePointerMove_(t),super.handleEvent(t),!1)}handleDownEvent(t){const e=t.pixel,i=t.map,n=this.getExtentInternal();let r=this.snapToVertex_(e,i);const s=function(t){let e=null,i=null;return t[0]==n[0]?e=n[2]:t[0]==n[2]&&(e=n[0]),t[1]==n[1]?i=n[3]:t[1]==n[3]&&(i=n[1]),null!==e&&null!==i?[e,i]:null};if(r&&n){const t=r[0]==n[0]||r[0]==n[2]?r[0]:null,e=r[1]==n[1]||r[1]==n[3]?r[1]:null;null!==t&&null!==e?this.pointerHandler_=ot(s(r)):null!==t?this.pointerHandler_=at(s([t,n[1]]),s([t,n[3]])):null!==e&&(this.pointerHandler_=at(s([n[0],e]),s([n[2],e])))}else r=i.getCoordinateFromPixelInternal(e),this.setExtent([r[0],r[1],r[0],r[1]]),this.pointerHandler_=ot(r);return!0}handleDragEvent(t){if(this.pointerHandler_){const e=t.coordinate;this.setExtent(this.pointerHandler_(e)),this.createOrUpdatePointerFeature_(e)}}handleUpEvent(t){this.pointerHandler_=null;const e=this.getExtentInternal();return e&&0!==(0,k.getArea)(e)||this.setExtent(null),!1}setMap(t){this.extentOverlay_.setMap(t),this.vertexOverlay_.setMap(t),super.setMap(t)}getExtent(){return(0,c.toUserExtent)(this.getExtentInternal(),this.getMap().getView().getProjection())}getExtentInternal(){return this.extent_}setExtent(t){this.extent_=t||null,this.createOrUpdateExtentFeature_(t),this.dispatchEvent(new it(this.extent_))}}function rt(){const t=(0,z.Ly)();return function(e,i){return t.Polygon}}function st(){const t=(0,z.Ly)();return function(e,i){return t.Point}}function ot(t){return function(e){return(0,k.boundingExtent)([t,e])}}function at(t,e){return t[0]==e[0]?function(i){return(0,k.boundingExtent)([t,[i[0],e[1]]])}:t[1]==e[1]?function(i){return(0,k.boundingExtent)([t,[e[0],i[1]]])}:null}const lt=nt;var ht=i(222),ut=i(834),ct=i(2126);function dt(t){return parseFloat(t)}function gt(t){return function(t){return(0,G.FH)(t,5)}(t).toString()}function pt(t,e){return!isNaN(t)&&t!==dt(gt(e))}class ft extends r.ZP{constructor(t){let e;super(),e=!0===(t=Object.assign({animate:!0,params:["x","y","z","r","l"],replace:!1,prefix:""},t||{})).animate?{duration:250}:t.animate?t.animate:null,this.animationOptions_=e,this.params_=t.params.reduce(((t,e)=>(t[e]=!0,t)),{}),this.replace_=t.replace,this.prefix_=t.prefix,this.listenerKeys_=[],this.initial_=!0,this.updateState_=this.updateState_.bind(this)}getParamName_(t){return this.prefix_?this.prefix_+t:t}get_(t,e){return t.get(this.getParamName_(e))}set_(t,e,i){e in this.params_&&t.set(this.getParamName_(e),i)}delete_(t,e){e in this.params_&&t.delete(this.getParamName_(e))}setMap(t){const e=this.getMap();super.setMap(t),t!==e&&(e&&this.unregisterListeners_(e),t&&(this.initial_=!0,this.updateState_(),this.registerListeners_(t)))}registerListeners_(t){this.listenerKeys_.push((0,d.oL)(t,ct.Z.MOVEEND,this.updateUrl_,this),(0,d.oL)(t.getLayerGroup(),h.Z.CHANGE,this.updateUrl_,this),(0,d.oL)(t,"change:layergroup",this.handleChangeLayerGroup_,this)),this.replace_||addEventListener("popstate",this.updateState_)}unregisterListeners_(t){for(let t=0,e=this.listenerKeys_.length;t<e;++t)(0,d.bN)(this.listenerKeys_[t]);this.listenerKeys_.length=0,this.replace_||removeEventListener("popstate",this.updateState_);const e=new URL(window.location.href),i=e.searchParams;this.delete_(i,"x"),this.delete_(i,"y"),this.delete_(i,"z"),this.delete_(i,"r"),this.delete_(i,"l"),window.history.replaceState(null,"",e)}handleChangeLayerGroup_(){const t=this.getMap();t&&(this.unregisterListeners_(t),this.registerListeners_(t),this.initial_=!0,this.updateUrl_())}updateState_(){const t=this.getMap();if(!t)return;const e=t.getView();if(!e)return;const i=new URL(window.location.href).searchParams;let n=!1;const r={},s=dt(this.get_(i,"z"));"z"in this.params_&&pt(s,e.getZoom())&&(n=!0,r.zoom=s);const o=dt(this.get_(i,"r"));"r"in this.params_&&pt(o,e.getRotation())&&(n=!0,r.rotation=o);const a=[dt(this.get_(i,"x")),dt(this.get_(i,"y"))];var l,h;("x"in this.params_||"y"in this.params_)&&(l=a,h=e.getCenter(),pt(l[0],h[0])||pt(l[1],h[1]))&&(n=!0,r.center=a),n&&(!this.initial_&&this.animationOptions_?e.animate(Object.assign(r,this.animationOptions_)):(r.center&&e.setCenter(r.center),"zoom"in r&&e.setZoom(r.zoom),"rotation"in r&&e.setRotation(r.rotation)));const u=t.getAllLayers(),c=this.get_(i,"l");if("l"in this.params_&&c&&c.length===u.length)for(let t=0,e=u.length;t<e;++t){const e=parseInt(c[t]);if(!isNaN(e)){const i=Boolean(e),n=u[t];n.getVisible()!==i&&n.setVisible(i)}}}updateUrl_(){const t=this.getMap();if(!t)return;const e=t.getView();if(!e)return;const i=this.initial_;this.initial_=!1;const n=e.getCenter(),r=e.getZoom(),s=e.getRotation(),o=t.getAllLayers(),a=new Array(o.length);for(let t=0,e=o.length;t<e;++t)a[t]=o[t].getVisible()?"1":"0";const l=new URL(window.location.href),h=l.searchParams;this.set_(h,"x",gt(n[0])),this.set_(h,"y",gt(n[1])),this.set_(h,"z",gt(r)),this.set_(h,"r",gt(s)),this.set_(h,"l",a.join("")),l.href!==window.location.href&&(i||this.replace_?window.history.replaceState(history.state,"",l):window.history.pushState(null,"",l))}}const mt=ft;var _t=i(8714),yt=i(2071),vt=i(9781),xt=i(2796),Et=i(5537),bt=i(4187);const wt=[0,0,0,0],St=[],Tt="modifyend";class Ct extends l.ZP{constructor(t,e,i){super(t),this.features=e,this.mapBrowserEvent=i}}class Rt extends v.Z{constructor(t){let e;if(super(t),this.on,this.once,this.un,this.boundHandleFeatureChange_=this.handleFeatureChange_.bind(this),this.condition_=t.condition?t.condition:x.Xp,this.defaultDeleteCondition_=function(t){return(0,x.Ko)(t)&&(0,x.Kf)(t)},this.deleteCondition_=t.deleteCondition?t.deleteCondition:this.defaultDeleteCondition_,this.insertVertexCondition_=t.insertVertexCondition?t.insertVertexCondition:x.Bx,this.vertexFeature_=null,this.vertexSegments_=null,this.lastPixel_=[0,0],this.ignoreNextSingleClick_=!1,this.featuresBeingModified_=null,this.rBush_=new vt.Z,this.pixelTolerance_=void 0!==t.pixelTolerance?t.pixelTolerance:10,this.snappedToVertex_=!1,this.changingFeature_=!1,this.dragSegments_=[],this.overlay_=new D.Z({source:new O.Z({useSpatialIndex:!1,wrapX:!!t.wrapX}),style:t.style?t.style:Mt(),updateWhileAnimating:!0,updateWhileInteracting:!0}),this.SEGMENT_WRITERS_={Point:this.writePointGeometry_.bind(this),LineString:this.writeLineStringGeometry_.bind(this),LinearRing:this.writeLineStringGeometry_.bind(this),Polygon:this.writePolygonGeometry_.bind(this),MultiPoint:this.writeMultiPointGeometry_.bind(this),MultiLineString:this.writeMultiLineStringGeometry_.bind(this),MultiPolygon:this.writeMultiPolygonGeometry_.bind(this),Circle:this.writeCircleGeometry_.bind(this),GeometryCollection:this.writeGeometryCollectionGeometry_.bind(this)},this.source_=null,this.hitDetection_=null,t.features?e=t.features:t.source&&(this.source_=t.source,e=new _t.Z(this.source_.getFeatures()),this.source_.addEventListener(xt.Z.ADDFEATURE,this.handleSourceAdd_.bind(this)),this.source_.addEventListener(xt.Z.REMOVEFEATURE,this.handleSourceRemove_.bind(this))),!e)throw new Error("The modify interaction requires features, a source or a layer");t.hitDetection&&(this.hitDetection_=t.hitDetection),this.features_=e,this.features_.forEach(this.addFeature_.bind(this)),this.features_.addEventListener(yt.Z.ADD,this.handleFeatureAdd_.bind(this)),this.features_.addEventListener(yt.Z.REMOVE,this.handleFeatureRemove_.bind(this)),this.lastPointerEvent_=null,this.delta_=[0,0],this.snapToPointer_=void 0===t.snapToPointer?!this.hitDetection_:t.snapToPointer}addFeature_(t){const e=t.getGeometry();if(e){const i=this.SEGMENT_WRITERS_[e.getType()];i&&i(t,e)}const i=this.getMap();i&&i.isRendered()&&this.getActive()&&this.handlePointerAtPixel_(this.lastPixel_,i),t.addEventListener(h.Z.CHANGE,this.boundHandleFeatureChange_)}willModifyFeatures_(t,e){if(!this.featuresBeingModified_){this.featuresBeingModified_=new _t.Z;const i=this.featuresBeingModified_.getArray();for(let t=0,n=e.length;t<n;++t){const n=e[t];for(let t=0,e=n.length;t<e;++t){const e=n[t].feature;e&&!i.includes(e)&&this.featuresBeingModified_.push(e)}}0===this.featuresBeingModified_.getLength()?this.featuresBeingModified_=null:this.dispatchEvent(new Ct("modifystart",this.featuresBeingModified_,t))}}removeFeature_(t){this.removeFeatureSegmentData_(t),this.vertexFeature_&&0===this.features_.getLength()&&(this.overlay_.getSource().removeFeature(this.vertexFeature_),this.vertexFeature_=null),t.removeEventListener(h.Z.CHANGE,this.boundHandleFeatureChange_)}removeFeatureSegmentData_(t){const e=this.rBush_,i=[];e.forEach((function(e){t===e.feature&&i.push(e)}));for(let t=i.length-1;t>=0;--t){const n=i[t];for(let t=this.dragSegments_.length-1;t>=0;--t)this.dragSegments_[t][0]===n&&this.dragSegments_.splice(t,1);e.remove(n)}}setActive(t){this.vertexFeature_&&!t&&(this.overlay_.getSource().removeFeature(this.vertexFeature_),this.vertexFeature_=null),super.setActive(t)}setMap(t){this.overlay_.setMap(t),super.setMap(t)}getOverlay(){return this.overlay_}handleSourceAdd_(t){t.feature&&this.features_.push(t.feature)}handleSourceRemove_(t){t.feature&&this.features_.remove(t.feature)}handleFeatureAdd_(t){this.addFeature_(t.element)}handleFeatureChange_(t){if(!this.changingFeature_){const e=t.target;this.removeFeature_(e),this.addFeature_(e)}}handleFeatureRemove_(t){this.removeFeature_(t.element)}writePointGeometry_(t,e){const i=e.getCoordinates(),n={feature:t,geometry:e,segment:[i,i]};this.rBush_.insert(e.getExtent(),n)}writeMultiPointGeometry_(t,e){const i=e.getCoordinates();for(let n=0,r=i.length;n<r;++n){const r=i[n],s={feature:t,geometry:e,depth:[n],index:n,segment:[r,r]};this.rBush_.insert(e.getExtent(),s)}}writeLineStringGeometry_(t,e){const i=e.getCoordinates();for(let n=0,r=i.length-1;n<r;++n){const r=i.slice(n,n+2),s={feature:t,geometry:e,index:n,segment:r};this.rBush_.insert((0,k.boundingExtent)(r),s)}}writeMultiLineStringGeometry_(t,e){const i=e.getCoordinates();for(let n=0,r=i.length;n<r;++n){const r=i[n];for(let i=0,s=r.length-1;i<s;++i){const s=r.slice(i,i+2),o={feature:t,geometry:e,depth:[n],index:i,segment:s};this.rBush_.insert((0,k.boundingExtent)(s),o)}}}writePolygonGeometry_(t,e){const i=e.getCoordinates();for(let n=0,r=i.length;n<r;++n){const r=i[n];for(let i=0,s=r.length-1;i<s;++i){const s=r.slice(i,i+2),o={feature:t,geometry:e,depth:[n],index:i,segment:s};this.rBush_.insert((0,k.boundingExtent)(s),o)}}}writeMultiPolygonGeometry_(t,e){const i=e.getCoordinates();for(let n=0,r=i.length;n<r;++n){const r=i[n];for(let i=0,s=r.length;i<s;++i){const s=r[i];for(let r=0,o=s.length-1;r<o;++r){const o=s.slice(r,r+2),a={feature:t,geometry:e,depth:[i,n],index:r,segment:o};this.rBush_.insert((0,k.boundingExtent)(o),a)}}}}writeCircleGeometry_(t,e){const i=e.getCenter(),n={feature:t,geometry:e,index:0,segment:[i,i]},r={feature:t,geometry:e,index:1,segment:[i,i]},s=[n,r];n.featureSegments=s,r.featureSegments=s,this.rBush_.insert((0,k.createOrUpdateFromCoordinate)(i),n);let o=e;const a=(0,c.getUserProjection)();if(a&&this.getMap()){const t=this.getMap().getView().getProjection();o=o.clone().transform(a,t),o=(0,Z.Bb)(o).transform(t,a)}this.rBush_.insert(o.getExtent(),r)}writeGeometryCollectionGeometry_(t,e){const i=e.getGeometriesArray();for(let e=0;e<i.length;++e){const n=i[e];(0,this.SEGMENT_WRITERS_[n.getType()])(t,n)}}createOrUpdateVertexFeature_(t,e,i){let n=this.vertexFeature_;return n?n.getGeometry().setCoordinates(t):(n=new T.default(new A.default(t)),this.vertexFeature_=n,this.overlay_.getSource().addFeature(n)),n.set("features",e),n.set("geometries",i),n}handleEvent(t){if(!t.originalEvent)return!0;let e;return this.lastPointerEvent_=t,t.map.getView().getInteracting()||t.type!=s.Z.POINTERMOVE||this.handlingDownUpSequence||this.handlePointerMove_(t),this.vertexFeature_&&this.deleteCondition_(t)&&(e=!(t.type!=s.Z.SINGLECLICK||!this.ignoreNextSingleClick_)||this.removePoint()),t.type==s.Z.SINGLECLICK&&(this.ignoreNextSingleClick_=!1),super.handleEvent(t)&&!e}handleDragEvent(t){this.ignoreNextSingleClick_=!1,this.willModifyFeatures_(t,this.dragSegments_);const e=[t.coordinate[0]+this.delta_[0],t.coordinate[1]+this.delta_[1]],i=[],n=[];for(let r=0,s=this.dragSegments_.length;r<s;++r){const s=this.dragSegments_[r],o=s[0],a=o.feature;i.includes(a)||i.push(a);const l=o.geometry;n.includes(l)||n.push(l);const h=o.depth;let u;const d=o.segment,g=s[1];for(;e.length<l.getStride();)e.push(d[g][e.length]);switch(l.getType()){case"Point":u=e,d[0]=e,d[1]=e;break;case"MultiPoint":u=l.getCoordinates(),u[o.index]=e,d[0]=e,d[1]=e;break;case"LineString":u=l.getCoordinates(),u[o.index+g]=e,d[g]=e;break;case"MultiLineString":case"Polygon":u=l.getCoordinates(),u[h[0]][o.index+g]=e,d[g]=e;break;case"MultiPolygon":u=l.getCoordinates(),u[h[1]][h[0]][o.index+g]=e,d[g]=e;break;case"Circle":if(d[0]=e,d[1]=e,0===o.index)this.changingFeature_=!0,l.setCenter(e),this.changingFeature_=!1;else{this.changingFeature_=!0;const i=t.map.getView().getProjection();let n=(0,N.TE)((0,c.fromUserCoordinate)(l.getCenter(),i),(0,c.fromUserCoordinate)(e,i));const r=(0,c.getUserProjection)();if(r){const t=l.clone().transform(r,i);t.setRadius(n),n=t.transform(i,r).getRadius()}l.setRadius(n),this.changingFeature_=!1}}u&&this.setGeometryCoordinates_(l,u)}this.createOrUpdateVertexFeature_(e,i,n)}handleDownEvent(t){if(!this.condition_(t))return!1;const e=t.coordinate;this.handlePointerAtPixel_(t.pixel,t.map,e),this.dragSegments_.length=0,this.featuresBeingModified_=null;const i=this.vertexFeature_;if(i){const n=t.map.getView().getProjection(),r=[],s=i.getGeometry().getCoordinates(),o=(0,k.boundingExtent)([s]),a=this.rBush_.getInExtent(o),l={};a.sort(Pt);for(let i=0,o=a.length;i<o;++i){const o=a[i],h=o.segment;let u=(0,bt.sq)(o.geometry);const c=o.depth;if(c&&(u+="-"+c.join("-")),l[u]||(l[u]=new Array(2)),"Circle"!==o.geometry.getType()||1!==o.index)if(!(0,N.fS)(h[0],s)||l[u][0])if(!(0,N.fS)(h[1],s)||l[u][1])(0,bt.sq)(h)in this.vertexSegments_&&!l[u][0]&&!l[u][1]&&this.insertVertexCondition_(t)&&r.push(o);else{if(l[u][0]&&0===l[u][0].index){let t=o.geometry.getCoordinates();switch(o.geometry.getType()){case"LineString":case"MultiLineString":continue;case"MultiPolygon":t=t[c[1]];case"Polygon":if(o.index!==t[c[0]].length-2)continue}}this.dragSegments_.push([o,1]),l[u][1]=o}else this.dragSegments_.push([o,0]),l[u][0]=o;else{const t=Lt(e,o,n);(0,N.fS)(t,s)&&!l[u][0]&&(this.dragSegments_.push([o,0]),l[u][0]=o)}}r.length&&this.willModifyFeatures_(t,[r]);for(let t=r.length-1;t>=0;--t)this.insertVertex_(r[t],s)}return!!this.vertexFeature_}handleUpEvent(t){for(let e=this.dragSegments_.length-1;e>=0;--e){const i=this.dragSegments_[e][0],n=i.geometry;if("Circle"===n.getType()){const e=n.getCenter(),r=i.featureSegments[0],s=i.featureSegments[1];r.segment[0]=e,r.segment[1]=e,s.segment[0]=e,s.segment[1]=e,this.rBush_.update((0,k.createOrUpdateFromCoordinate)(e),r);let o=n;const a=(0,c.getUserProjection)();if(a){const e=t.map.getView().getProjection();o=o.clone().transform(a,e),o=(0,Z.Bb)(o).transform(e,a)}this.rBush_.update(o.getExtent(),s)}else this.rBush_.update((0,k.boundingExtent)(i.segment),i)}return this.featuresBeingModified_&&(this.dispatchEvent(new Ct(Tt,this.featuresBeingModified_,t)),this.featuresBeingModified_=null),!1}handlePointerMove_(t){this.lastPixel_=t.pixel,this.handlePointerAtPixel_(t.pixel,t.map,t.coordinate)}handlePointerAtPixel_(t,e,i){const n=i||e.getCoordinateFromPixel(t),r=e.getView().getProjection(),s=function(t,e){return It(n,t,r)-It(n,e,r)};let o,a;if(this.hitDetection_){const i="object"==typeof this.hitDetection_?t=>t===this.hitDetection_:void 0;e.forEachFeatureAtPixel(t,((t,e,i)=>{i&&(i=new A.default((0,c.toUserCoordinate)(i.getCoordinates(),r)));const n=i||t.getGeometry();if("Point"===n.getType()&&t instanceof T.default&&this.features_.getArray().includes(t)){a=n;const e=t.getGeometry().getFlatCoordinates().slice(0,2);o=[{feature:t,geometry:a,segment:[e,e]}]}return!0}),{layerFilter:i})}if(!o){const t=(0,c.fromUserExtent)((0,k.createOrUpdateFromCoordinate)(n,wt),r),i=e.getView().getResolution()*this.pixelTolerance_,s=(0,c.toUserExtent)((0,k.buffer)(t,i,wt),r);o=this.rBush_.getInExtent(s)}if(o&&o.length>0){const i=o.sort(s)[0],l=i.segment;let h=Lt(n,i,r);const u=e.getPixelFromCoordinate(h);let c=(0,N.TE)(t,u);if(a||c<=this.pixelTolerance_){const t={};if(t[(0,bt.sq)(l)]=!0,this.snapToPointer_||(this.delta_[0]=h[0]-n[0],this.delta_[1]=h[1]-n[1]),"Circle"===i.geometry.getType()&&1===i.index)this.snappedToVertex_=!0,this.createOrUpdateVertexFeature_(h,[i.feature],[i.geometry]);else{const n=e.getPixelFromCoordinate(l[0]),r=e.getPixelFromCoordinate(l[1]),s=(0,N.bI)(u,n),a=(0,N.bI)(u,r);c=Math.sqrt(Math.min(s,a)),this.snappedToVertex_=c<=this.pixelTolerance_,this.snappedToVertex_&&(h=s>a?l[1]:l[0]),this.createOrUpdateVertexFeature_(h,[i.feature],[i.geometry]);const d={};d[(0,bt.sq)(i.geometry)]=!0;for(let e=1,i=o.length;e<i;++e){const i=o[e].segment;if(!((0,N.fS)(l[0],i[0])&&(0,N.fS)(l[1],i[1])||(0,N.fS)(l[0],i[1])&&(0,N.fS)(l[1],i[0])))break;{const n=(0,bt.sq)(o[e].geometry);n in d||(d[n]=!0,t[(0,bt.sq)(i)]=!0)}}}return void(this.vertexSegments_=t)}}this.vertexFeature_&&(this.overlay_.getSource().removeFeature(this.vertexFeature_),this.vertexFeature_=null)}insertVertex_(t,e){const i=t.segment,n=t.feature,r=t.geometry,s=t.depth,o=t.index;let a;for(;e.length<r.getStride();)e.push(0);switch(r.getType()){case"MultiLineString":case"Polygon":a=r.getCoordinates(),a[s[0]].splice(o+1,0,e);break;case"MultiPolygon":a=r.getCoordinates(),a[s[1]][s[0]].splice(o+1,0,e);break;case"LineString":a=r.getCoordinates(),a.splice(o+1,0,e);break;default:return}this.setGeometryCoordinates_(r,a);const l=this.rBush_;l.remove(t),this.updateSegmentIndices_(r,o,s,1);const h={segment:[i[0],e],feature:n,geometry:r,depth:s,index:o};l.insert((0,k.boundingExtent)(h.segment),h),this.dragSegments_.push([h,1]);const u={segment:[e,i[1]],feature:n,geometry:r,depth:s,index:o+1};l.insert((0,k.boundingExtent)(u.segment),u),this.dragSegments_.push([u,0]),this.ignoreNextSingleClick_=!0}removePoint(){if(this.lastPointerEvent_&&this.lastPointerEvent_.type!=s.Z.POINTERDRAG){const t=this.lastPointerEvent_;this.willModifyFeatures_(t,this.dragSegments_);const e=this.removeVertex_();return this.featuresBeingModified_&&this.dispatchEvent(new Ct(Tt,this.featuresBeingModified_,t)),this.featuresBeingModified_=null,e}return!1}removeVertex_(){const t=this.dragSegments_,e={};let i,n,r,s,o,a,l,h,u,c,d,g=!1;for(o=t.length-1;o>=0;--o)r=t[o],c=r[0],d=(0,bt.sq)(c.feature),c.depth&&(d+="-"+c.depth.join("-")),d in e||(e[d]={}),0===r[1]?(e[d].right=c,e[d].index=c.index):1==r[1]&&(e[d].left=c,e[d].index=c.index+1);for(d in e){switch(u=e[d].right,l=e[d].left,a=e[d].index,h=a-1,c=void 0!==l?l:u,h<0&&(h=0),s=c.geometry,n=s.getCoordinates(),i=n,g=!1,s.getType()){case"MultiLineString":n[c.depth[0]].length>2&&(n[c.depth[0]].splice(a,1),g=!0);break;case"LineString":n.length>2&&(n.splice(a,1),g=!0);break;case"MultiPolygon":i=i[c.depth[1]];case"Polygon":i=i[c.depth[0]],i.length>4&&(a==i.length-1&&(a=0),i.splice(a,1),g=!0,0===a&&(i.pop(),i.push(i[0]),h=i.length-1))}if(g){this.setGeometryCoordinates_(s,n);const e=[];if(void 0!==l&&(this.rBush_.remove(l),e.push(l.segment[0])),void 0!==u&&(this.rBush_.remove(u),e.push(u.segment[1])),void 0!==l&&void 0!==u){const t={depth:c.depth,feature:c.feature,geometry:c.geometry,index:h,segment:e};this.rBush_.insert((0,k.boundingExtent)(t.segment),t)}this.updateSegmentIndices_(s,a,c.depth,-1),this.vertexFeature_&&(this.overlay_.getSource().removeFeature(this.vertexFeature_),this.vertexFeature_=null),t.length=0}}return g}setGeometryCoordinates_(t,e){this.changingFeature_=!0,t.setCoordinates(e),this.changingFeature_=!1}updateSegmentIndices_(t,e,i,n){this.rBush_.forEachInExtent(t.getExtent(),(function(r){r.geometry===t&&(void 0===i||void 0===r.depth||(0,Et.fS)(r.depth,i))&&r.index>e&&(r.index+=n)}))}}function Pt(t,e){return t.index-e.index}function It(t,e,i){const n=e.geometry;if("Circle"===n.getType()){let r=n;if(1===e.index){const e=(0,c.getUserProjection)();e&&(r=r.clone().transform(e,i));const n=(0,N.bI)(r.getCenter(),(0,c.fromUserCoordinate)(t,i)),s=Math.sqrt(n)-r.getRadius();return s*s}}const r=(0,c.fromUserCoordinate)(t,i);return St[0]=(0,c.fromUserCoordinate)(e.segment[0],i),St[1]=(0,c.fromUserCoordinate)(e.segment[1],i),(0,N.Bs)(r,St)}function Lt(t,e,i){const n=e.geometry;if("Circle"===n.getType()&&1===e.index){let e=n;const r=(0,c.getUserProjection)();return r&&(e=e.clone().transform(r,i)),(0,c.toUserCoordinate)(e.getClosestPoint((0,c.fromUserCoordinate)(t,i)),i)}const r=(0,c.fromUserCoordinate)(t,i);return St[0]=(0,c.fromUserCoordinate)(e.segment[0],i),St[1]=(0,c.fromUserCoordinate)(e.segment[1],i),(0,c.toUserCoordinate)((0,N.oL)(r,St),i)}function Mt(){const t=(0,z.Ly)();return function(e,i){return t.Point}}const Ft=Rt;var At=i(686),Zt=i(3205),Dt=i(4474),Ot=i(9374);class kt extends l.ZP{constructor(t,e,i,n){super(t),this.selected=e,this.deselected=i,this.mapBrowserEvent=n}}const Gt={};class zt extends r.ZP{constructor(t){let e;if(super(),this.on,this.once,this.un,t=t||{},this.boundAddFeature_=this.addFeature_.bind(this),this.boundRemoveFeature_=this.removeFeature_.bind(this),this.condition_=t.condition?t.condition:x.Kf,this.addCondition_=t.addCondition?t.addCondition:x.Fi,this.removeCondition_=t.removeCondition?t.removeCondition:x.Fi,this.toggleCondition_=t.toggleCondition?t.toggleCondition:x.vY,this.multi_=!!t.multi&&t.multi,this.filter_=t.filter?t.filter:u.uX,this.hitTolerance_=t.hitTolerance?t.hitTolerance:0,this.style_=void 0!==t.style?t.style:function(){const t=(0,z.Ly)();return(0,Et.l7)(t.Polygon,t.LineString),(0,Et.l7)(t.GeometryCollection,t.LineString),function(e){return e.getGeometry()?t[e.getGeometry().getType()]:null}}(),this.features_=t.features||new _t.Z,t.layers)if("function"==typeof t.layers)e=t.layers;else{const i=t.layers;e=function(t){return i.includes(t)}}else e=u.uX;this.layerFilter_=e,this.featureLayerAssociation_={}}addFeatureLayerAssociation_(t,e){this.featureLayerAssociation_[(0,bt.sq)(t)]=e}getFeatures(){return this.features_}getHitTolerance(){return this.hitTolerance_}getLayer(t){return this.featureLayerAssociation_[(0,bt.sq)(t)]}setHitTolerance(t){this.hitTolerance_=t}setMap(t){this.getMap()&&this.style_&&this.features_.forEach(this.restorePreviousStyle_.bind(this)),super.setMap(t),t?(this.features_.addEventListener(yt.Z.ADD,this.boundAddFeature_),this.features_.addEventListener(yt.Z.REMOVE,this.boundRemoveFeature_),this.style_&&this.features_.forEach(this.applySelectedStyle_.bind(this))):(this.features_.removeEventListener(yt.Z.ADD,this.boundAddFeature_),this.features_.removeEventListener(yt.Z.REMOVE,this.boundRemoveFeature_))}addFeature_(t){const e=t.element;if(this.style_&&this.applySelectedStyle_(e),!this.getLayer(e)){const t=this.getMap().getAllLayers().find((function(t){if(t instanceof D.Z&&t.getSource()&&t.getSource().hasFeature(e))return t}));t&&this.addFeatureLayerAssociation_(e,t)}}removeFeature_(t){this.style_&&this.restorePreviousStyle_(t.element)}getStyle(){return this.style_}applySelectedStyle_(t){const e=(0,bt.sq)(t);e in Gt||(Gt[e]=t.getStyle()),t.setStyle(this.style_)}restorePreviousStyle_(t){const e=this.getMap().getInteractions().getArray();for(let i=e.length-1;i>=0;--i){const n=e[i];if(n!==this&&n instanceof zt&&n.getStyle()&&-1!==n.getFeatures().getArray().lastIndexOf(t))return void t.setStyle(n.getStyle())}const i=(0,bt.sq)(t);t.setStyle(Gt[i]),delete Gt[i]}removeFeatureLayerAssociation_(t){delete this.featureLayerAssociation_[(0,bt.sq)(t)]}handleEvent(t){if(!this.condition_(t))return!0;const e=this.addCondition_(t),i=this.removeCondition_(t),n=this.toggleCondition_(t),r=!e&&!i&&!n,s=t.map,o=this.getFeatures(),a=[],l=[];if(r){(0,Ot.Z)(this.featureLayerAssociation_),s.forEachFeatureAtPixel(t.pixel,((t,e)=>{if(t instanceof T.default&&this.filter_(t,e))return this.addFeatureLayerAssociation_(t,e),l.push(t),!this.multi_}),{layerFilter:this.layerFilter_,hitTolerance:this.hitTolerance_});for(let t=o.getLength()-1;t>=0;--t){const e=o.item(t),i=l.indexOf(e);i>-1?l.splice(i,1):(o.remove(e),a.push(e))}0!==l.length&&o.extend(l)}else{s.forEachFeatureAtPixel(t.pixel,((t,r)=>{if(t instanceof T.default&&this.filter_(t,r))return!e&&!n||o.getArray().includes(t)?(i||n)&&o.getArray().includes(t)&&(a.push(t),this.removeFeatureLayerAssociation_(t)):(this.addFeatureLayerAssociation_(t,r),l.push(t)),!this.multi_}),{layerFilter:this.layerFilter_,hitTolerance:this.hitTolerance_});for(let t=a.length-1;t>=0;--t)o.remove(a[t]);o.extend(l)}return(l.length>0||a.length>0)&&this.dispatchEvent(new kt("select",l,a,t)),!0}}const Nt=zt;class jt extends l.ZP{constructor(t,e){super(t),this.vertex=e.vertex,this.vertexPixel=e.vertexPixel,this.feature=e.feature}}function Ut(t){return t.feature?t.feature:t.element?t.element:null}const Bt=[];class Vt extends v.Z{constructor(t){const e=t=t||{};e.handleDownEvent||(e.handleDownEvent=u.uX),e.stopDown||(e.stopDown=u.Dv),super(e),this.on,this.once,this.un,this.source_=t.source?t.source:null,this.vertex_=void 0===t.vertex||t.vertex,this.edge_=void 0===t.edge||t.edge,this.features_=t.features?t.features:null,this.featuresListenerKeys_=[],this.featureChangeListenerKeys_={},this.indexedFeaturesExtents_={},this.pendingFeatures_={},this.pixelTolerance_=void 0!==t.pixelTolerance?t.pixelTolerance:10,this.rBush_=new vt.Z,this.GEOMETRY_SEGMENTERS_={Point:this.segmentPointGeometry_.bind(this),LineString:this.segmentLineStringGeometry_.bind(this),LinearRing:this.segmentLineStringGeometry_.bind(this),Polygon:this.segmentPolygonGeometry_.bind(this),MultiPoint:this.segmentMultiPointGeometry_.bind(this),MultiLineString:this.segmentMultiLineStringGeometry_.bind(this),MultiPolygon:this.segmentMultiPolygonGeometry_.bind(this),GeometryCollection:this.segmentGeometryCollectionGeometry_.bind(this),Circle:this.segmentCircleGeometry_.bind(this)}}addFeature(t,e){e=void 0===e||e;const i=(0,bt.sq)(t),n=t.getGeometry();if(n){const e=this.GEOMETRY_SEGMENTERS_[n.getType()];if(e){this.indexedFeaturesExtents_[i]=n.getExtent((0,k.createEmpty)());const r=[];if(e(r,n),1===r.length)this.rBush_.insert((0,k.boundingExtent)(r[0]),{feature:t,segment:r[0]});else if(r.length>1){const e=r.map((t=>(0,k.boundingExtent)(t))),i=r.map((e=>({feature:t,segment:e})));this.rBush_.load(e,i)}}}e&&(this.featureChangeListenerKeys_[i]=(0,d.oL)(t,h.Z.CHANGE,this.handleFeatureChange_,this))}getFeatures_(){let t;return this.features_?t=this.features_:this.source_&&(t=this.source_.getFeatures()),t}handleEvent(t){const e=this.snapTo(t.pixel,t.coordinate,t.map);return e&&(t.coordinate=e.vertex.slice(0,2),t.pixel=e.vertexPixel,this.dispatchEvent(new jt("snap",{vertex:t.coordinate,vertexPixel:t.pixel,feature:e.feature}))),super.handleEvent(t)}handleFeatureAdd_(t){const e=Ut(t);e&&this.addFeature(e)}handleFeatureRemove_(t){const e=Ut(t);e&&this.removeFeature(e)}handleFeatureChange_(t){const e=t.target;if(this.handlingDownUpSequence){const t=(0,bt.sq)(e);t in this.pendingFeatures_||(this.pendingFeatures_[t]=e)}else this.updateFeature_(e)}handleUpEvent(t){const e=Object.values(this.pendingFeatures_);return e.length&&(e.forEach(this.updateFeature_.bind(this)),this.pendingFeatures_={}),!1}removeFeature(t,e){const i=void 0===e||e,n=(0,bt.sq)(t),r=this.indexedFeaturesExtents_[n];if(r){const e=this.rBush_,i=[];e.forEachInExtent(r,(function(e){t===e.feature&&i.push(e)}));for(let t=i.length-1;t>=0;--t)e.remove(i[t])}i&&((0,d.bN)(this.featureChangeListenerKeys_[n]),delete this.featureChangeListenerKeys_[n])}setMap(t){const e=this.getMap(),i=this.featuresListenerKeys_,n=this.getFeatures_();e&&(i.forEach(d.bN),i.length=0,this.rBush_.clear(),Object.values(this.featureChangeListenerKeys_).forEach(d.bN),this.featureChangeListenerKeys_={}),super.setMap(t),t&&(this.features_?i.push((0,d.oL)(this.features_,yt.Z.ADD,this.handleFeatureAdd_,this),(0,d.oL)(this.features_,yt.Z.REMOVE,this.handleFeatureRemove_,this)):this.source_&&i.push((0,d.oL)(this.source_,xt.Z.ADDFEATURE,this.handleFeatureAdd_,this),(0,d.oL)(this.source_,xt.Z.REMOVEFEATURE,this.handleFeatureRemove_,this)),n.forEach((t=>this.addFeature(t))))}snapTo(t,e,i){const n=i.getView().getProjection(),r=(0,c.fromUserCoordinate)(e,n),s=(0,c.toUserExtent)((0,k.buffer)((0,k.boundingExtent)([r]),i.getView().getResolution()*this.pixelTolerance_),n),o=this.rBush_.getInExtent(s),a=o.length;if(0===a)return null;let l,h,u=1/0;const d=this.pixelTolerance_*this.pixelTolerance_,g=()=>{if(l){const e=i.getPixelFromCoordinate(l);if((0,N.bI)(t,e)<=d)return{vertex:l,vertexPixel:[Math.round(e[0]),Math.round(e[1])],feature:h}}return null};if(this.vertex_){for(let t=0;t<a;++t){const e=o[t];"Circle"!==e.feature.getGeometry().getType()&&e.segment.forEach((t=>{const i=(0,c.fromUserCoordinate)(t,n),s=(0,N.bI)(r,i);s<u&&(l=t,u=s,h=e.feature)}))}const t=g();if(t)return t}if(this.edge_){for(let t=0;t<a;++t){let e=null;const i=o[t];if("Circle"===i.feature.getGeometry().getType()){let t=i.feature.getGeometry();const s=(0,c.getUserProjection)();s&&(t=t.clone().transform(s,n)),e=(0,N.Ed)(r,t)}else{const[t,s]=i.segment;s&&(Bt[0]=(0,c.fromUserCoordinate)(t,n),Bt[1]=(0,c.fromUserCoordinate)(s,n),e=(0,N.oL)(r,Bt))}if(e){const t=(0,N.bI)(r,e);t<u&&(l=(0,c.toUserCoordinate)(e,n),u=t)}}const t=g();if(t)return t}return null}updateFeature_(t){this.removeFeature(t,!1),this.addFeature(t,!1)}segmentCircleGeometry_(t,e){const i=this.getMap().getView().getProjection();let n=e;const r=(0,c.getUserProjection)();r&&(n=n.clone().transform(r,i));const s=(0,Z.Bb)(n);r&&s.transform(i,r);const o=s.getCoordinates()[0];for(let e=0,i=o.length-1;e<i;++e)t.push(o.slice(e,e+2))}segmentGeometryCollectionGeometry_(t,e){const i=e.getGeometriesArray();for(let e=0;e<i.length;++e){const n=this.GEOMETRY_SEGMENTERS_[i[e].getType()];n&&n(t,i[e])}}segmentLineStringGeometry_(t,e){const i=e.getCoordinates();for(let e=0,n=i.length-1;e<n;++e)t.push(i.slice(e,e+2))}segmentMultiLineStringGeometry_(t,e){const i=e.getCoordinates();for(let e=0,n=i.length;e<n;++e){const n=i[e];for(let e=0,i=n.length-1;e<i;++e)t.push(n.slice(e,e+2))}}segmentMultiPointGeometry_(t,e){e.getCoordinates().forEach((e=>{t.push([e])}))}segmentMultiPolygonGeometry_(t,e){const i=e.getCoordinates();for(let e=0,n=i.length;e<n;++e){const n=i[e];for(let e=0,i=n.length;e<i;++e){const i=n[e];for(let e=0,n=i.length-1;e<n;++e)t.push(i.slice(e,e+2))}}}segmentPointGeometry_(t,e){t.push([e.getCoordinates()])}segmentPolygonGeometry_(t,e){const i=e.getCoordinates();for(let e=0,n=i.length;e<n;++e){const n=i[e];for(let e=0,i=n.length-1;e<i;++e)t.push(n.slice(e,e+2))}}}const qt=Vt;class Wt extends l.ZP{constructor(t,e,i,n,r){super(t),this.features=e,this.coordinate=i,this.startCoordinate=n,this.mapBrowserEvent=r}}class Xt extends v.Z{constructor(t){let e;if(super(t=t||{}),this.on,this.once,this.un,this.lastCoordinate_=null,this.startCoordinate_=null,this.features_=void 0!==t.features?t.features:null,t.layers&&!this.features_)if("function"==typeof t.layers)e=t.layers;else{const i=t.layers;e=function(t){return i.includes(t)}}else e=u.uX;this.layerFilter_=e,this.filter_=t.filter&&!this.features_?t.filter:u.uX,this.hitTolerance_=t.hitTolerance?t.hitTolerance:0,this.condition_=t.condition?t.condition:x.Bx,this.lastFeature_=null,this.addChangeListener(R.Z.ACTIVE,this.handleActiveChanged_)}handleDownEvent(t){if(!t.originalEvent||!this.condition_(t))return!1;if(this.lastFeature_=this.featuresAtPixel_(t.pixel,t.map),!this.lastCoordinate_&&this.lastFeature_){this.startCoordinate_=t.coordinate,this.lastCoordinate_=t.coordinate,this.handleMoveEvent(t);const e=this.features_||new _t.Z([this.lastFeature_]);return this.dispatchEvent(new Wt("translatestart",e,t.coordinate,this.startCoordinate_,t)),!0}return!1}handleUpEvent(t){if(this.lastCoordinate_){this.lastCoordinate_=null,this.handleMoveEvent(t);const e=this.features_||new _t.Z([this.lastFeature_]);return this.dispatchEvent(new Wt("translateend",e,t.coordinate,this.startCoordinate_,t)),this.startCoordinate_=null,!0}return!1}handleDragEvent(t){if(this.lastCoordinate_){const e=t.coordinate,i=t.map.getView().getProjection(),n=(0,c.fromUserCoordinate)(e,i),r=(0,c.fromUserCoordinate)(this.lastCoordinate_,i),s=n[0]-r[0],o=n[1]-r[1],a=this.features_||new _t.Z([this.lastFeature_]),l=(0,c.getUserProjection)();a.forEach((function(t){const e=t.getGeometry();l?(e.transform(l,i),e.translate(s,o),e.transform(i,l)):e.translate(s,o),t.setGeometry(e)})),this.lastCoordinate_=e,this.dispatchEvent(new Wt("translating",a,e,this.startCoordinate_,t))}}handleMoveEvent(t){const e=t.map.getViewport();this.featuresAtPixel_(t.pixel,t.map)?(e.classList.remove(this.lastCoordinate_?"ol-grab":"ol-grabbing"),e.classList.add(this.lastCoordinate_?"ol-grabbing":"ol-grab")):e.classList.remove("ol-grab","ol-grabbing")}featuresAtPixel_(t,e){return e.forEachFeatureAtPixel(t,((t,e)=>{if(t instanceof T.default&&this.filter_(t,e)&&(!this.features_||this.features_.getArray().includes(t)))return t}),{layerFilter:this.layerFilter_,hitTolerance:this.hitTolerance_})}getHitTolerance(){return this.hitTolerance_}setHitTolerance(t){this.hitTolerance_=t}setMap(t){const e=this.getMap();super.setMap(t),this.updateState_(e)}handleActiveChanged_(){this.updateState_(null)}updateState_(t){let e=this.getMap();const i=this.getActive();e&&i||(e=e||t,!e)||e.getViewport().classList.remove("ol-grab","ol-grabbing")}}const Ht=Xt;var Yt=i(6410)},3522:(t,e,i)=>{"use strict";i.d(e,{Z:()=>o});var n=i(7182),r=i(2217);class s extends n.ZP{constructor(t){super(),t=t||{},this.delta_=t.delta?t.delta:1,this.duration_=void 0!==t.duration?t.duration:250}handleEvent(t){let e=!1;if(t.type==r.Z.DBLCLICK){const i=t.originalEvent,r=t.map,s=t.coordinate,o=i.shiftKey?-this.delta_:this.delta_,a=r.getView();(0,n.FW)(a,o,s,this.duration_),i.preventDefault(),e=!0}return!e}}const o=s},9365:(t,e,i)=>{"use strict";i.d(e,{Z:()=>h});var n=i(291),r=i(4515),s=i(747),o=i(8683);class a extends n.ZP{constructor(t,e,i){super(t),this.coordinate=e,this.mapBrowserEvent=i}}class l extends r.Z{constructor(t){super(),this.on,this.once,this.un,t=t||{},this.box_=new s.Z(t.className||"ol-dragbox"),this.minArea_=void 0!==t.minArea?t.minArea:64,t.onBoxEnd&&(this.onBoxEnd=t.onBoxEnd),this.startPixel_=null,this.condition_=t.condition?t.condition:o.v8,this.boxEndCondition_=t.boxEndCondition?t.boxEndCondition:this.defaultBoxEndCondition}defaultBoxEndCondition(t,e,i){const n=i[0]-e[0],r=i[1]-e[1];return n*n+r*r>=this.minArea_}getGeometry(){return this.box_.getGeometry()}handleDragEvent(t){this.box_.setPixels(this.startPixel_,t.pixel),this.dispatchEvent(new a("boxdrag",t.coordinate,t))}handleUpEvent(t){this.box_.setMap(null);const e=this.boxEndCondition_(t,this.startPixel_,t.pixel);return e&&this.onBoxEnd(t),this.dispatchEvent(new a(e?"boxend":"boxcancel",t.coordinate,t)),!1}handleDownEvent(t){return!!this.condition_(t)&&(this.startPixel_=t.pixel,this.box_.setMap(t.map),this.box_.setPixels(this.startPixel_,this.startPixel_),this.dispatchEvent(new a("boxstart",t.coordinate,t)),!0)}onBoxEnd(t){}}const h=l},3267:(t,e,i)=>{"use strict";i.d(e,{Z:()=>h});var n=i(4515),r=i(6885),s=i(8683),o=i(1015),a=i(1900);class l extends n.Z{constructor(t){super({stopDown:r.Dv}),t=t||{},this.kinetic_=t.kinetic,this.lastCentroid=null,this.lastPointersCount_,this.panning_=!1;const e=t.condition?t.condition:(0,s.$6)(s.rM,s.Xp);this.condition_=t.onFocusOnly?(0,s.$6)(s.yZ,e):e,this.noKinetic_=!1}handleDragEvent(t){const e=t.map;this.panning_||(this.panning_=!0,e.getView().beginInteraction());const i=this.targetPointers,r=e.getEventPixel((0,n.S)(i));if(i.length==this.lastPointersCount_){if(this.kinetic_&&this.kinetic_.update(r[0],r[1]),this.lastCentroid){const e=[this.lastCentroid[0]-r[0],r[1]-this.lastCentroid[1]],i=t.map.getView();(0,a.bA)(e,i.getResolution()),(0,a.U1)(e,i.getRotation()),i.adjustCenterInternal(e)}}else this.kinetic_&&this.kinetic_.begin();this.lastCentroid=r,this.lastPointersCount_=i.length,t.originalEvent.preventDefault()}handleUpEvent(t){const e=t.map,i=e.getView();if(0===this.targetPointers.length){if(!this.noKinetic_&&this.kinetic_&&this.kinetic_.end()){const t=this.kinetic_.getDistance(),n=this.kinetic_.getAngle(),r=i.getCenterInternal(),s=e.getPixelFromCoordinateInternal(r),a=e.getCoordinateFromPixelInternal([s[0]-t*Math.cos(n),s[1]-t*Math.sin(n)]);i.animateInternal({center:i.getConstrainedCenter(a),duration:500,easing:o.Vv})}return this.panning_&&(this.panning_=!1,i.endInteraction()),!1}return this.kinetic_&&this.kinetic_.begin(),this.lastCentroid=null,!0}handleDownEvent(t){if(this.targetPointers.length>0&&this.condition_(t)){const 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}}const h=l},2857:(t,e,i)=>{"use strict";i.d(e,{Z:()=>l});var n=i(4515),r=i(6885),s=i(8683),o=i(828);class a extends n.Z{constructor(t){t=t||{},super({stopDown:r.Dv}),this.condition_=t.condition?t.condition:s.aj,this.lastAngle_=void 0,this.duration_=void 0!==t.duration?t.duration:250}handleDragEvent(t){if(!(0,s.QL)(t))return;const e=t.map,i=e.getView();if(i.getConstraints().rotation===o.h$)return;const n=e.getSize(),r=t.pixel,a=Math.atan2(n[1]/2-r[1],r[0]-n[0]/2);if(void 0!==this.lastAngle_){const t=a-this.lastAngle_;i.adjustRotationInternal(-t)}this.lastAngle_=a}handleUpEvent(t){return!(0,s.QL)(t)||(t.map.getView().endInteraction(this.duration_),!1)}handleDownEvent(t){return!!(0,s.QL)(t)&&(!(!(0,s.v8)(t)||!this.condition_(t))&&(t.map.getView().beginInteraction(),this.lastAngle_=void 0,!0))}}const l=a},519:(t,e,i)=>{"use strict";i.d(e,{Z:()=>a});var n=i(9365),r=i(1015),s=i(8683);class o extends n.Z{constructor(t){super({condition:(t=t||{}).condition?t.condition:s.vY,className:t.className||"ol-dragzoom",minArea:t.minArea}),this.duration_=void 0!==t.duration?t.duration:200,this.out_=void 0!==t.out&&t.out}onBoxEnd(t){const e=this.getMap().getView();let i=this.getGeometry();if(this.out_){const t=e.rotatedExtentForGeometry(i),n=e.getResolutionForExtentInternal(t),r=e.getResolution()/n;i=i.clone(),i.scale(r*r)}e.fitInternal(i,{duration:this.duration_,easing:r.Vv})}}const a=o},7182:(t,e,i)=>{"use strict";i.d(e,{Cv:()=>a,FW:()=>l,ZP:()=>h});var n=i(2971),r=i(4049),s=i(1015);class o extends n.Z{constructor(t){super(),this.on,this.once,this.un,t&&t.handleEvent&&(this.handleEvent=t.handleEvent),this.map_=null,this.setActive(!0)}getActive(){return this.get(r.Z.ACTIVE)}getMap(){return this.map_}handleEvent(t){return!0}setActive(t){this.set(r.Z.ACTIVE,t)}setMap(t){this.map_=t}}function a(t,e,i){const n=t.getCenterInternal();if(n){const r=[n[0]+e[0],n[1]+e[1]];t.animateInternal({duration:void 0!==i?i:250,easing:s.GE,center:t.getConstrainedCenter(r)})}}function l(t,e,i,n){const r=t.getZoom();if(void 0===r)return;const o=t.getConstrainedZoom(r+e),a=t.getResolutionForZoom(o);t.getAnimating()&&t.cancelAnimations(),t.animate({resolution:a,anchor:i,duration:void 0!==n?n:250,easing:s.Vv})}const h=o},222:(t,e,i)=>{"use strict";i.d(e,{Z:()=>h});var n=i(5487),r=i(7182),s=i(7084),o=i(8683),a=i(1900);class l extends r.ZP{constructor(t){super(),t=t||{},this.defaultCondition_=function(t){return(0,o.rM)(t)&&(0,o.TN)(t)},this.condition_=void 0!==t.condition?t.condition:this.defaultCondition_,this.duration_=void 0!==t.duration?t.duration:100,this.pixelDelta_=void 0!==t.pixelDelta?t.pixelDelta:128}handleEvent(t){let e=!1;if(t.type==n.Z.KEYDOWN){const i=t.originalEvent,n=i.key;if(this.condition_(t)&&(n==s.Z.DOWN||n==s.Z.LEFT||n==s.Z.RIGHT||n==s.Z.UP)){const o=t.map.getView(),l=o.getResolution()*this.pixelDelta_;let h=0,u=0;n==s.Z.DOWN?u=-l:n==s.Z.LEFT?h=-l:n==s.Z.RIGHT?h=l:u=l;const c=[h,u];(0,a.U1)(c,o.getRotation()),(0,r.Cv)(o,c,this.duration_),i.preventDefault(),e=!0}}return!e}}const h=l},834:(t,e,i)=>{"use strict";i.d(e,{Z:()=>a});var n=i(5487),r=i(7182),s=i(8683);class o extends r.ZP{constructor(t){super(),t=t||{},this.condition_=t.condition?t.condition:function(t){return!(0,s.a5)(t)&&(0,s.TN)(t)},this.delta_=t.delta?t.delta:1,this.duration_=void 0!==t.duration?t.duration:100}handleEvent(t){let e=!1;if(t.type==n.Z.KEYDOWN||t.type==n.Z.KEYPRESS){const i=t.originalEvent,n=i.key;if(this.condition_(t)&&("+"===n||"-"===n)){const s=t.map,o="+"===n?this.delta_:-this.delta_,a=s.getView();(0,r.FW)(a,o,void 0,this.duration_),i.preventDefault(),e=!0}}return!e}}const a=o},686:(t,e,i)=>{"use strict";i.d(e,{Z:()=>h});var n=i(5487),r=i(7182),s=i(177),o=i(8683),a=i(3983);class l extends r.ZP{constructor(t){super(t=t||{}),this.totalDelta_=0,this.lastDelta_=0,this.maxDelta_=void 0!==t.maxDelta?t.maxDelta:1,this.duration_=void 0!==t.duration?t.duration:250,this.timeout_=void 0!==t.timeout?t.timeout:80,this.useAnchor_=void 0===t.useAnchor||t.useAnchor,this.constrainResolution_=void 0!==t.constrainResolution&&t.constrainResolution;const e=t.condition?t.condition:o.Bx;this.condition_=t.onFocusOnly?(0,o.$6)(o.yZ,e):e,this.lastAnchor_=null,this.startTime_=void 0,this.timeoutId_,this.mode_=void 0,this.trackpadEventGap_=400,this.trackpadTimeoutId_,this.deltaPerZoom_=300}endInteraction_(){this.trackpadTimeoutId_=void 0;const t=this.getMap();t&&t.getView().endInteraction(void 0,this.lastDelta_?this.lastDelta_>0?1:-1:0,this.lastAnchor_)}handleEvent(t){if(!this.condition_(t))return!0;if(t.type!==n.Z.WHEEL)return!0;const e=t.map,i=t.originalEvent;let r;if(i.preventDefault(),this.useAnchor_&&(this.lastAnchor_=t.coordinate),t.type==n.Z.WHEEL&&(r=i.deltaY,s.V&&i.deltaMode===WheelEvent.DOM_DELTA_PIXEL&&(r/=s.MP),i.deltaMode===WheelEvent.DOM_DELTA_LINE&&(r*=40)),0===r)return!1;this.lastDelta_=r;const o=Date.now();void 0===this.startTime_&&(this.startTime_=o),(!this.mode_||o-this.startTime_>this.trackpadEventGap_)&&(this.mode_=Math.abs(r)<4?"trackpad":"wheel");const a=e.getView();if("trackpad"===this.mode_&&!a.getConstrainResolution()&&!this.constrainResolution_)return this.trackpadTimeoutId_?clearTimeout(this.trackpadTimeoutId_):(a.getAnimating()&&a.cancelAnimations(),a.beginInteraction()),this.trackpadTimeoutId_=setTimeout(this.endInteraction_.bind(this),this.timeout_),a.adjustZoom(-r/this.deltaPerZoom_,this.lastAnchor_),this.startTime_=o,!1;this.totalDelta_+=r;const l=Math.max(this.timeout_-(o-this.startTime_),0);return clearTimeout(this.timeoutId_),this.timeoutId_=setTimeout(this.handleWheelZoom_.bind(this,e),l),!1}handleWheelZoom_(t){const e=t.getView();e.getAnimating()&&e.cancelAnimations();let i=-(0,a.uZ)(this.totalDelta_,-this.maxDelta_*this.deltaPerZoom_,this.maxDelta_*this.deltaPerZoom_)/this.deltaPerZoom_;(e.getConstrainResolution()||this.constrainResolution_)&&(i=i?i>0?1:-1:0),(0,r.FW)(e,i,this.lastAnchor_,this.duration_),this.mode_=void 0,this.totalDelta_=0,this.lastAnchor_=null,this.startTime_=void 0,this.timeoutId_=void 0}setMouseAnchor(t){this.useAnchor_=t,t||(this.lastAnchor_=null)}}const h=l},3205:(t,e,i)=>{"use strict";i.d(e,{Z:()=>a});var n=i(4515),r=i(6885),s=i(828);class o extends n.Z{constructor(t){const e=t=t||{};e.stopDown||(e.stopDown=r.Dv),super(e),this.anchor_=null,this.lastAngle_=void 0,this.rotating_=!1,this.rotationDelta_=0,this.threshold_=void 0!==t.threshold?t.threshold:.3,this.duration_=void 0!==t.duration?t.duration:250}handleDragEvent(t){let e=0;const i=this.targetPointers[0],r=this.targetPointers[1],o=Math.atan2(r.clientY-i.clientY,r.clientX-i.clientX);if(void 0!==this.lastAngle_){const t=o-this.lastAngle_;this.rotationDelta_+=t,!this.rotating_&&Math.abs(this.rotationDelta_)>this.threshold_&&(this.rotating_=!0),e=t}this.lastAngle_=o;const a=t.map,l=a.getView();l.getConstraints().rotation!==s.h$&&(this.anchor_=a.getCoordinateFromPixelInternal(a.getEventPixel((0,n.S)(this.targetPointers))),this.rotating_&&(a.render(),l.adjustRotationInternal(e,this.anchor_)))}handleUpEvent(t){return!(this.targetPointers.length<2)||(t.map.getView().endInteraction(this.duration_),!1)}handleDownEvent(t){if(this.targetPointers.length>=2){const 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}}const a=o},4474:(t,e,i)=>{"use strict";i.d(e,{Z:()=>o});var n=i(4515),r=i(6885);class s extends n.Z{constructor(t){const e=t=t||{};e.stopDown||(e.stopDown=r.Dv),super(e),this.anchor_=null,this.duration_=void 0!==t.duration?t.duration:400,this.lastDistance_=void 0,this.lastScaleDelta_=1}handleDragEvent(t){let e=1;const i=this.targetPointers[0],r=this.targetPointers[1],s=i.clientX-r.clientX,o=i.clientY-r.clientY,a=Math.sqrt(s*s+o*o);void 0!==this.lastDistance_&&(e=this.lastDistance_/a),this.lastDistance_=a;const l=t.map,h=l.getView();1!=e&&(this.lastScaleDelta_=e),this.anchor_=l.getCoordinateFromPixelInternal(l.getEventPixel((0,n.S)(this.targetPointers))),l.render(),h.adjustResolutionInternal(e,this.anchor_)}handleUpEvent(t){if(this.targetPointers.length<2){const e=t.map.getView(),i=this.lastScaleDelta_>1?1:-1;return e.endInteraction(this.duration_,i),!1}return!0}handleDownEvent(t){if(this.targetPointers.length>=2){const e=t.map;return this.anchor_=null,this.lastDistance_=void 0,this.lastScaleDelta_=1,this.handlingDownUpSequence||e.getView().beginInteraction(),!0}return!1}}const o=s},4515:(t,e,i)=>{"use strict";i.d(e,{S:()=>o,Z:()=>a});var n=i(7182),r=i(2217);class s extends n.ZP{constructor(t){super(t=t||{}),t.handleDownEvent&&(this.handleDownEvent=t.handleDownEvent),t.handleDragEvent&&(this.handleDragEvent=t.handleDragEvent),t.handleMoveEvent&&(this.handleMoveEvent=t.handleMoveEvent),t.handleUpEvent&&(this.handleUpEvent=t.handleUpEvent),t.stopDown&&(this.stopDown=t.stopDown),this.handlingDownUpSequence=!1,this.targetPointers=[]}getPointerCount(){return this.targetPointers.length}handleDownEvent(t){return!1}handleDragEvent(t){}handleEvent(t){if(!t.originalEvent)return!0;let e=!1;if(this.updateTrackedPointers_(t),this.handlingDownUpSequence){if(t.type==r.Z.POINTERDRAG)this.handleDragEvent(t),t.originalEvent.preventDefault();else if(t.type==r.Z.POINTERUP){const e=this.handleUpEvent(t);this.handlingDownUpSequence=e&&this.targetPointers.length>0}}else if(t.type==r.Z.POINTERDOWN){const i=this.handleDownEvent(t);this.handlingDownUpSequence=i,e=this.stopDown(i)}else t.type==r.Z.POINTERMOVE&&this.handleMoveEvent(t);return!e}handleMoveEvent(t){}handleUpEvent(t){return!1}stopDown(t){return t}updateTrackedPointers_(t){t.activePointers&&(this.targetPointers=t.activePointers)}}function o(t){const e=t.length;let i=0,n=0;for(let r=0;r<e;r++)i+=t[r].clientX,n+=t[r].clientY;return{clientX:i/e,clientY:n/e}}const a=s},4049:(t,e,i)=>{"use strict";i.d(e,{Z:()=>n});const n={ACTIVE:"active"}},6410:(t,e,i)=>{"use strict";i.d(e,{c:()=>p});var n=i(8714),r=i(3522),s=i(3267),o=i(2857),a=i(519),l=i(222),h=i(834),u=i(1230),c=i(686),d=i(3205),g=i(4474);function p(t){t=t||{};const e=new n.Z,i=new u.Z(-.005,.05,100);return(void 0===t.altShiftDragRotate||t.altShiftDragRotate)&&e.push(new o.Z),(void 0===t.doubleClickZoom||t.doubleClickZoom)&&e.push(new r.Z({delta:t.zoomDelta,duration:t.zoomDuration})),(void 0===t.dragPan||t.dragPan)&&e.push(new s.Z({onFocusOnly:t.onFocusOnly,kinetic:i})),(void 0===t.pinchRotate||t.pinchRotate)&&e.push(new d.Z),(void 0===t.pinchZoom||t.pinchZoom)&&e.push(new g.Z({duration:t.zoomDuration})),(void 0===t.keyboard||t.keyboard)&&(e.push(new l.Z),e.push(new h.Z({delta:t.zoomDelta,duration:t.zoomDuration}))),(void 0===t.mouseWheelZoom||t.mouseWheelZoom)&&e.push(new c.Z({onFocusOnly:t.onFocusOnly,duration:t.zoomDuration})),(void 0===t.shiftDragZoom||t.shiftDragZoom)&&e.push(new a.Z({duration:t.zoomDuration})),e}},2723:(t,e,i)=>{"use strict";i.r(e),i.d(e,{Graticule:()=>n.Z,Group:()=>r.Z,Heatmap:()=>J,Image:()=>Q.Z,Layer:()=>tt.Z,MapboxVector:()=>Us,Tile:()=>Bs.Z,Vector:()=>le.Z,VectorImage:()=>Js,VectorTile:()=>jt,WebGLPoints:()=>pa,WebGLTile:()=>ya});var n=i(8599),r=i(8734),s=i(2563),o=i(2796),a=i(7755),l=i(177);const h=34962,u=34963,c=35044,d=["experimental-webgl","webgl","webkit-3d","moz-webgl"];function g(t,e){e=Object.assign({preserveDrawingBuffer:!0,antialias:!l.ME},e);const i=d.length;for(let n=0;n<i;++n)try{const i=t.getContext(d[n],e);if(i)return i}catch(t){}return null}var p=i(9515);function f(t){switch(t){case h:return Float32Array;case u:return Uint32Array;default:return Float32Array}}const m=class{constructor(t,e){this.array=null,this.type=t,(0,p.h)(t===h||t===u,62),this.usage=void 0!==e?e:35044}ofSize(t){return this.array=new(f(this.type))(t),this}fromArray(t){return this.array=f(this.type).from(t),this}fromArrayBuffer(t){return this.array=new(f(this.type))(t),this}getType(){return this.type}getArray(){return this.array}getUsage(){return this.usage}getSize(){return this.array?this.array.length:0}};var _=i(1912),y=i(115),v=i(7380),x=i(8771);const E="webglcontextlost",b="webglcontextrestored";var w=i(5431),S=i(4187);const T=class{constructor(t){this.gl_=t.webGlContext;const e=this.gl_;this.scaleRatio_=t.scaleRatio||1,this.renderTargetTexture_=e.createTexture(),this.renderTargetTextureSize_=null,this.frameBuffer_=e.createFramebuffer(),this.depthBuffer_=e.createRenderbuffer();const i=e.createShader(e.VERTEX_SHADER);e.shaderSource(i,t.vertexShader||"\n  precision mediump float;\n  \n  attribute vec2 a_position;\n  varying vec2 v_texCoord;\n  varying vec2 v_screenCoord;\n  \n  uniform vec2 u_screenSize;\n   \n  void main() {\n    v_texCoord = a_position * 0.5 + 0.5;\n    v_screenCoord = v_texCoord * u_screenSize;\n    gl_Position = vec4(a_position, 0.0, 1.0);\n  }\n"),e.compileShader(i);const n=e.createShader(e.FRAGMENT_SHADER);e.shaderSource(n,t.fragmentShader||"\n  precision mediump float;\n   \n  uniform sampler2D u_image;\n  uniform float u_opacity;\n   \n  varying vec2 v_texCoord;\n   \n  void main() {\n    gl_FragColor = texture2D(u_image, v_texCoord) * u_opacity;\n  }\n"),e.compileShader(n),this.renderTargetProgram_=e.createProgram(),e.attachShader(this.renderTargetProgram_,i),e.attachShader(this.renderTargetProgram_,n),e.linkProgram(this.renderTargetProgram_),this.renderTargetVerticesBuffer_=e.createBuffer(),e.bindBuffer(e.ARRAY_BUFFER,this.renderTargetVerticesBuffer_),e.bufferData(e.ARRAY_BUFFER,new Float32Array([-1,-1,1,-1,-1,1,1,-1,1,1,-1,1]),e.STATIC_DRAW),this.renderTargetAttribLocation_=e.getAttribLocation(this.renderTargetProgram_,"a_position"),this.renderTargetUniformLocation_=e.getUniformLocation(this.renderTargetProgram_,"u_screenSize"),this.renderTargetOpacityLocation_=e.getUniformLocation(this.renderTargetProgram_,"u_opacity"),this.renderTargetTextureLocation_=e.getUniformLocation(this.renderTargetProgram_,"u_image"),this.uniforms_=[],t.uniforms&&Object.keys(t.uniforms).forEach((i=>{this.uniforms_.push({value:t.uniforms[i],location:e.getUniformLocation(this.renderTargetProgram_,i)})}))}getGL(){return this.gl_}init(t){const e=this.getGL(),i=[e.drawingBufferWidth*this.scaleRatio_,e.drawingBufferHeight*this.scaleRatio_];if(e.bindFramebuffer(e.FRAMEBUFFER,this.getFrameBuffer()),e.bindRenderbuffer(e.RENDERBUFFER,this.getDepthBuffer()),e.viewport(0,0,i[0],i[1]),!this.renderTargetTextureSize_||this.renderTargetTextureSize_[0]!==i[0]||this.renderTargetTextureSize_[1]!==i[1]){this.renderTargetTextureSize_=i;const t=0,n=e.RGBA,r=0,s=e.RGBA,o=e.UNSIGNED_BYTE,a=null;e.bindTexture(e.TEXTURE_2D,this.renderTargetTexture_),e.texImage2D(e.TEXTURE_2D,t,n,i[0],i[1],r,s,o,a),e.texParameteri(e.TEXTURE_2D,e.TEXTURE_MIN_FILTER,e.LINEAR),e.texParameteri(e.TEXTURE_2D,e.TEXTURE_WRAP_S,e.CLAMP_TO_EDGE),e.texParameteri(e.TEXTURE_2D,e.TEXTURE_WRAP_T,e.CLAMP_TO_EDGE),e.framebufferTexture2D(e.FRAMEBUFFER,e.COLOR_ATTACHMENT0,e.TEXTURE_2D,this.renderTargetTexture_,0),e.renderbufferStorage(e.RENDERBUFFER,e.DEPTH_COMPONENT16,i[0],i[1]),e.framebufferRenderbuffer(e.FRAMEBUFFER,e.DEPTH_ATTACHMENT,e.RENDERBUFFER,this.depthBuffer_)}}apply(t,e,i,n){const r=this.getGL(),s=t.size;if(r.bindFramebuffer(r.FRAMEBUFFER,e?e.getFrameBuffer():null),r.activeTexture(r.TEXTURE0),r.bindTexture(r.TEXTURE_2D,this.renderTargetTexture_),!e){const e=(0,S.sq)(r.canvas);if(!t.renderTargets[e]){const i=r.getContextAttributes();i&&i.preserveDrawingBuffer&&(r.clearColor(0,0,0,0),r.clearDepth(1),r.clear(r.COLOR_BUFFER_BIT|r.DEPTH_BUFFER_BIT)),t.renderTargets[e]=!0}}r.disable(r.DEPTH_TEST),r.enable(r.BLEND),r.blendFunc(r.ONE,r.ONE_MINUS_SRC_ALPHA),r.viewport(0,0,r.drawingBufferWidth,r.drawingBufferHeight),r.bindBuffer(r.ARRAY_BUFFER,this.renderTargetVerticesBuffer_),r.useProgram(this.renderTargetProgram_),r.enableVertexAttribArray(this.renderTargetAttribLocation_),r.vertexAttribPointer(this.renderTargetAttribLocation_,2,r.FLOAT,!1,0,0),r.uniform2f(this.renderTargetUniformLocation_,s[0],s[1]),r.uniform1i(this.renderTargetTextureLocation_,0);const o=t.layerStatesArray[t.layerIndex].opacity;r.uniform1f(this.renderTargetOpacityLocation_,o),this.applyUniforms(t),i&&i(r,t),r.drawArrays(r.TRIANGLES,0,6),n&&n(r,t)}getFrameBuffer(){return this.frameBuffer_}getDepthBuffer(){return this.depthBuffer_}applyUniforms(t){const e=this.getGL();let i,n=1;this.uniforms_.forEach((function(r){if(i="function"==typeof r.value?r.value(t):r.value,i instanceof HTMLCanvasElement||i instanceof ImageData)r.texture||(r.texture=e.createTexture()),e.activeTexture(e[`TEXTURE${n}`]),e.bindTexture(e.TEXTURE_2D,r.texture),e.texParameteri(e.TEXTURE_2D,e.TEXTURE_MIN_FILTER,e.LINEAR),e.texParameteri(e.TEXTURE_2D,e.TEXTURE_WRAP_S,e.CLAMP_TO_EDGE),e.texParameteri(e.TEXTURE_2D,e.TEXTURE_WRAP_T,e.CLAMP_TO_EDGE),i instanceof ImageData?e.texImage2D(e.TEXTURE_2D,0,e.RGBA,e.RGBA,i.width,i.height,0,e.UNSIGNED_BYTE,new Uint8Array(i.data)):e.texImage2D(e.TEXTURE_2D,0,e.RGBA,e.RGBA,e.UNSIGNED_BYTE,i),e.uniform1i(r.location,n++);else if(Array.isArray(i))switch(i.length){case 2:return void e.uniform2f(r.location,i[0],i[1]);case 3:return void e.uniform3f(r.location,i[0],i[1],i[2]);case 4:return void e.uniform4f(r.location,i[0],i[1],i[2],i[3]);default:return}else"number"==typeof i&&e.uniform1f(r.location,i)}))}};var C=i(9374),R=i(6101);function P(t,e){return t[0]=e[0],t[1]=e[1],t[4]=e[2],t[5]=e[3],t[12]=e[4],t[13]=e[5],t}const I=5126,L={};function M(t){return"shared/"+t}let F=0;class A extends w.Z{constructor(t){super(),t=t||{},this.boundHandleWebGLContextLost_=this.handleWebGLContextLost.bind(this),this.boundHandleWebGLContextRestored_=this.handleWebGLContextRestored.bind(this),this.canvasCacheKey_=t.canvasCacheKey?M(t.canvasCacheKey):function(){const t="unique/"+F;return F+=1,t}(),this.gl_=function(t){let e=L[t];if(!e){const i=document.createElement("canvas");i.width=1,i.height=1,i.style.position="absolute",i.style.left="0",e={users:0,context:g(i)},L[t]=e}return e.users+=1,e.context}(this.canvasCacheKey_),this.bufferCache_={},this.extensionCache_={},this.currentProgram_=null;const e=this.gl_.canvas;e.addEventListener(E,this.boundHandleWebGLContextLost_),e.addEventListener(b,this.boundHandleWebGLContextRestored_),this.offsetRotateMatrix_=(0,R.Ue)(),this.offsetScaleMatrix_=(0,R.Ue)(),this.tmpMat4_=[1,0,0,0,0,1,0,0,0,0,1,0,0,0,0,1],this.uniformLocationsByProgram_={},this.attribLocationsByProgram_={},this.uniforms_=[],t.uniforms&&this.setUniforms(t.uniforms),this.postProcessPasses_=t.postProcesses?t.postProcesses.map((t=>new T({webGlContext:this.gl_,scaleRatio:t.scaleRatio,vertexShader:t.vertexShader,fragmentShader:t.fragmentShader,uniforms:t.uniforms}))):[new T({webGlContext:this.gl_})],this.shaderCompileErrors_=null,this.startTime_=Date.now()}setUniforms(t){this.uniforms_=[];for(const e in t)this.uniforms_.push({name:e,value:t[e]})}canvasCacheKeyMatches(t){return this.canvasCacheKey_===M(t)}getExtension(t){if(t in this.extensionCache_)return this.extensionCache_[t];const e=this.gl_.getExtension(t);return this.extensionCache_[t]=e,e}bindBuffer(t){const e=this.gl_,i=(0,S.sq)(t);let n=this.bufferCache_[i];n||(n={buffer:t,webGlBuffer:e.createBuffer()},this.bufferCache_[i]=n),e.bindBuffer(t.getType(),n.webGlBuffer)}flushBufferData(t){const e=this.gl_;this.bindBuffer(t),e.bufferData(t.getType(),t.getArray(),t.getUsage())}deleteBuffer(t){const e=this.gl_,i=(0,S.sq)(t),n=this.bufferCache_[i];n&&!e.isContextLost()&&e.deleteBuffer(n.webGlBuffer),delete this.bufferCache_[i]}disposeInternal(){const t=this.gl_.canvas;t.removeEventListener(E,this.boundHandleWebGLContextLost_),t.removeEventListener(b,this.boundHandleWebGLContextRestored_),function(t){const e=L[t];if(!e)return;if(e.users-=1,e.users>0)return;const i=e.context,n=i.getExtension("WEBGL_lose_context");n&&n.loseContext();const r=i.canvas;r.width=1,r.height=1,delete L[t]}(this.canvasCacheKey_),delete this.gl_}prepareDraw(t,e,i){const n=this.gl_,r=this.getCanvas(),s=t.size,o=t.pixelRatio;r.width===s[0]*o&&r.height===s[1]*o||(r.width=s[0]*o,r.height=s[1]*o,r.style.width=s[0]+"px",r.style.height=s[1]+"px");for(let e=this.postProcessPasses_.length-1;e>=0;e--)this.postProcessPasses_[e].init(t);n.bindTexture(n.TEXTURE_2D,null),n.clearColor(0,0,0,0),n.depthRange(0,1),n.clearDepth(1),n.clear(n.COLOR_BUFFER_BIT|n.DEPTH_BUFFER_BIT),n.enable(n.BLEND),n.blendFunc(n.ONE,e?n.ZERO:n.ONE_MINUS_SRC_ALPHA),i?(n.enable(n.DEPTH_TEST),n.depthFunc(n.LEQUAL)):n.disable(n.DEPTH_TEST)}bindTexture(t,e,i){const n=this.gl_;n.activeTexture(n.TEXTURE0+e),n.bindTexture(n.TEXTURE_2D,t),n.uniform1i(this.getUniformLocation(i),e)}prepareDrawToRenderTarget(t,e,i,n){const r=this.gl_,s=e.getSize();r.bindFramebuffer(r.FRAMEBUFFER,e.getFramebuffer()),r.bindRenderbuffer(r.RENDERBUFFER,e.getDepthbuffer()),r.viewport(0,0,s[0],s[1]),r.bindTexture(r.TEXTURE_2D,e.getTexture()),r.clearColor(0,0,0,0),r.depthRange(0,1),r.clearDepth(1),r.clear(r.COLOR_BUFFER_BIT|r.DEPTH_BUFFER_BIT),r.enable(r.BLEND),r.blendFunc(r.ONE,i?r.ZERO:r.ONE_MINUS_SRC_ALPHA),n?(r.enable(r.DEPTH_TEST),r.depthFunc(r.LEQUAL)):r.disable(r.DEPTH_TEST)}drawElements(t,e){const i=this.gl_;this.getExtension("OES_element_index_uint");const n=i.UNSIGNED_INT,r=e-t,s=4*t;i.drawElements(i.TRIANGLES,r,n,s)}finalizeDraw(t,e,i){for(let n=0,r=this.postProcessPasses_.length;n<r;n++)n===r-1?this.postProcessPasses_[n].apply(t,null,e,i):this.postProcessPasses_[n].apply(t,this.postProcessPasses_[n+1])}getCanvas(){return this.gl_.canvas}getGL(){return this.gl_}applyFrameState(t){const e=t.size,i=t.viewState.rotation,n=t.pixelRatio,r=(0,R.mc)(this.offsetScaleMatrix_);(0,R.bA)(r,2/e[0],2/e[1]);const s=(0,R.mc)(this.offsetRotateMatrix_);0!==i&&(0,R.U1)(s,-i),this.setUniformMatrixValue("u_offsetScaleMatrix",P(this.tmpMat4_,r)),this.setUniformMatrixValue("u_offsetRotateMatrix",P(this.tmpMat4_,s)),this.setUniformFloatValue("u_time",.001*(Date.now()-this.startTime_)),this.setUniformFloatValue("u_zoom",t.viewState.zoom),this.setUniformFloatValue("u_resolution",t.viewState.resolution),this.setUniformFloatValue("u_pixelRatio",n),this.setUniformFloatVec2("u_viewportSizePx",[e[0],e[1]])}applyHitDetectionUniform(t){const e=this.getUniformLocation("u_hitDetection");this.getGL().uniform1i(e,t?1:0)}applyUniforms(t){const e=this.gl_;let i,n=0;this.uniforms_.forEach((r=>{if(i="function"==typeof r.value?r.value(t):r.value,i instanceof HTMLCanvasElement||i instanceof HTMLImageElement||i instanceof ImageData)r.texture||(r.prevValue=void 0,r.texture=e.createTexture()),e.activeTexture(e[`TEXTURE${n}`]),e.bindTexture(e.TEXTURE_2D,r.texture),e.texParameteri(e.TEXTURE_2D,e.TEXTURE_MIN_FILTER,e.LINEAR),e.texParameteri(e.TEXTURE_2D,e.TEXTURE_WRAP_S,e.CLAMP_TO_EDGE),e.texParameteri(e.TEXTURE_2D,e.TEXTURE_WRAP_T,e.CLAMP_TO_EDGE),(!(i instanceof HTMLImageElement)||i.complete)&&r.prevValue!==i&&(r.prevValue=i,e.texImage2D(e.TEXTURE_2D,0,e.RGBA,e.RGBA,e.UNSIGNED_BYTE,i)),e.uniform1i(this.getUniformLocation(r.name),n++);else if(Array.isArray(i)&&6===i.length)this.setUniformMatrixValue(r.name,P(this.tmpMat4_,i));else if(Array.isArray(i)&&i.length<=4)switch(i.length){case 2:return void e.uniform2f(this.getUniformLocation(r.name),i[0],i[1]);case 3:return void e.uniform3f(this.getUniformLocation(r.name),i[0],i[1],i[2]);case 4:return void e.uniform4f(this.getUniformLocation(r.name),i[0],i[1],i[2],i[3]);default:return}else"number"==typeof i&&e.uniform1f(this.getUniformLocation(r.name),i)}))}useProgram(t,e){this.gl_.useProgram(t),this.currentProgram_=t,this.applyFrameState(e),this.applyUniforms(e)}compileShader(t,e){const i=this.gl_,n=i.createShader(e);return i.shaderSource(n,t),i.compileShader(n),n}getProgram(t,e){const i=this.gl_,n=this.compileShader(t,i.FRAGMENT_SHADER),r=this.compileShader(e,i.VERTEX_SHADER),s=i.createProgram();if(i.attachShader(s,n),i.attachShader(s,r),i.linkProgram(s),!i.getShaderParameter(n,i.COMPILE_STATUS)){const t=`Fragment shader compilation failed: ${i.getShaderInfoLog(n)}`;throw new Error(t)}if(i.deleteShader(n),!i.getShaderParameter(r,i.COMPILE_STATUS)){const t=`Vertex shader compilation failed: ${i.getShaderInfoLog(r)}`;throw new Error(t)}if(i.deleteShader(r),!i.getProgramParameter(s,i.LINK_STATUS)){const t=`GL program linking failed: ${i.getProgramInfoLog(s)}`;throw new Error(t)}return s}getUniformLocation(t){const e=(0,S.sq)(this.currentProgram_);return void 0===this.uniformLocationsByProgram_[e]&&(this.uniformLocationsByProgram_[e]={}),void 0===this.uniformLocationsByProgram_[e][t]&&(this.uniformLocationsByProgram_[e][t]=this.gl_.getUniformLocation(this.currentProgram_,t)),this.uniformLocationsByProgram_[e][t]}getAttributeLocation(t){const e=(0,S.sq)(this.currentProgram_);return void 0===this.attribLocationsByProgram_[e]&&(this.attribLocationsByProgram_[e]={}),void 0===this.attribLocationsByProgram_[e][t]&&(this.attribLocationsByProgram_[e][t]=this.gl_.getAttribLocation(this.currentProgram_,t)),this.attribLocationsByProgram_[e][t]}makeProjectionTransform(t,e){const i=t.size,n=t.viewState.rotation,r=t.viewState.resolution,s=t.viewState.center;return(0,R.qC)(e,0,0,2/(r*i[0]),2/(r*i[1]),-n,-s[0],-s[1]),e}setUniformFloatValue(t,e){this.gl_.uniform1f(this.getUniformLocation(t),e)}setUniformFloatVec2(t,e){this.gl_.uniform2fv(this.getUniformLocation(t),e)}setUniformFloatVec4(t,e){this.gl_.uniform4fv(this.getUniformLocation(t),e)}setUniformMatrixValue(t,e){this.gl_.uniformMatrix4fv(this.getUniformLocation(t),!1,e)}enableAttributeArray_(t,e,i,n,r){const s=this.getAttributeLocation(t);s<0||(this.gl_.enableVertexAttribArray(s),this.gl_.vertexAttribPointer(s,e,i,!1,n,r))}enableAttributes(t){const e=function(t){let e=0;for(let i=0;i<t.length;i++){const n=t[i];e+=n.size*Z(n.type)}return e}(t);let i=0;for(let n=0;n<t.length;n++){const r=t[n];this.enableAttributeArray_(r.name,r.size,r.type||5126,e,i),i+=r.size*Z(r.type)}}handleWebGLContextLost(){(0,C.Z)(this.bufferCache_),this.currentProgram_=null}handleWebGLContextRestored(){}createTexture(t,e,i){const n=this.gl_;i=i||n.createTexture();const r=n.RGBA,s=n.RGBA,o=n.UNSIGNED_BYTE;return n.bindTexture(n.TEXTURE_2D,i),e?n.texImage2D(n.TEXTURE_2D,0,r,s,o,e):n.texImage2D(n.TEXTURE_2D,0,r,t[0],t[1],0,s,o,null),n.texParameteri(n.TEXTURE_2D,n.TEXTURE_MIN_FILTER,n.LINEAR),n.texParameteri(n.TEXTURE_2D,n.TEXTURE_WRAP_S,n.CLAMP_TO_EDGE),n.texParameteri(n.TEXTURE_2D,n.TEXTURE_WRAP_T,n.CLAMP_TO_EDGE),i}}function Z(t){switch(t){case 5121:return Uint8Array.BYTES_PER_ELEMENT;case 5123:return Uint16Array.BYTES_PER_ELEMENT;case 5125:return Uint32Array.BYTES_PER_ELEMENT;default:return Float32Array.BYTES_PER_ELEMENT}}const D=A;class O extends y.Z{constructor(t,e){super(t),e=e||{},this.inversePixelTransform_=(0,R.Ue)(),this.pixelContext_=null,this.postProcesses_=e.postProcesses,this.uniforms_=e.uniforms,this.helper,t.addChangeListener(_.Z.MAP,this.removeHelper.bind(this)),this.dispatchPreComposeEvent=this.dispatchPreComposeEvent.bind(this),this.dispatchPostComposeEvent=this.dispatchPostComposeEvent.bind(this)}dispatchPreComposeEvent(t,e){const i=this.getLayer();if(i.hasListener(x.Z.PRECOMPOSE)){const n=new v.Z(x.Z.PRECOMPOSE,void 0,e,t);i.dispatchEvent(n)}}dispatchPostComposeEvent(t,e){const i=this.getLayer();if(i.hasListener(x.Z.POSTCOMPOSE)){const n=new v.Z(x.Z.POSTCOMPOSE,void 0,e,t);i.dispatchEvent(n)}}reset(t){this.uniforms_=t.uniforms,this.helper&&this.helper.setUniforms(this.uniforms_)}removeHelper(){this.helper&&(this.helper.dispose(),delete this.helper)}prepareFrame(t){if(this.getLayer().getRenderSource()){let e,i=!0,n=-1;for(let r=0,s=t.layerStatesArray.length;r<s;r++){const s=t.layerStatesArray[r].layer,o=s.getRenderer();if(!(o instanceof O)){i=!0;continue}const a=s.getClassName();if((i||a!==e)&&(n+=1,i=!1),e=a,o===this)break}const r="map/"+t.mapId+"/group/"+n;this.helper&&this.helper.canvasCacheKeyMatches(r)||(this.removeHelper(),this.helper=new D({postProcesses:this.postProcesses_,uniforms:this.uniforms_,canvasCacheKey:r}),e&&(this.helper.getCanvas().className=e),this.afterHelperCreated())}return this.prepareFrameInternal(t)}afterHelperCreated(){}prepareFrameInternal(t){return!0}disposeInternal(){this.removeHelper(),super.disposeInternal()}dispatchRenderEvent_(t,e,i){const n=this.getLayer();if(n.hasListener(t)){(0,R.qC)(this.inversePixelTransform_,0,0,i.pixelRatio,-i.pixelRatio,0,0,-i.size[1]);const r=new v.Z(t,this.inversePixelTransform_,i,e);n.dispatchEvent(r)}}preRender(t,e){this.dispatchRenderEvent_(x.Z.PRERENDER,t,e)}postRender(t,e){this.dispatchRenderEvent_(x.Z.POSTRENDER,t,e)}}const k=O;var G=i(5537);const z=new Uint8Array(4),N="GENERATE_POINT_BUFFERS";var j=i(8641);function U(t,e){const i=256,n=255;return(e=e||[])[0]=Math.floor(t/i/i/i)/n,e[1]=Math.floor(t/i/i)%i/n,e[2]=Math.floor(t/i)%i/n,e[3]=t%i/n,e}i(9187);var B=i(5818);const V=class extends k{constructor(t,e){const i=e.uniforms||{},n=(0,R.Ue)();i.u_projectionMatrix=n,super(t,{uniforms:i,postProcesses:e.postProcesses}),this.sourceRevision_=-1,this.verticesBuffer_=new m(h,35048),this.indicesBuffer_=new m(u,35048),this.vertexShader_=e.vertexShader,this.fragmentShader_=e.fragmentShader,this.program_,this.hitDetectionEnabled_=e.hitDetectionEnabled??!0;const r=e.attributes?e.attributes.map((function(t){return{name:"a_"+t.name,size:1,type:I}})):[];this.attributes=[{name:"a_position",size:2,type:I},{name:"a_index",size:1,type:I}],this.hitDetectionEnabled_&&(this.attributes.push({name:"a_hitColor",size:4,type:I}),this.attributes.push({name:"a_featureUid",size:1,type:I})),this.attributes.push(...r),this.customAttributes=e.attributes?e.attributes:[],this.previousExtent_=(0,j.createEmpty)(),this.currentTransform_=n,this.renderTransform_=(0,R.Ue)(),this.invertRenderTransform_=(0,R.Ue)(),this.renderInstructions_=new Float32Array(0),this.hitRenderTarget_,this.lastSentId=0,this.worker_=function(){const t='const e="GENERATE_POLYGON_BUFFERS",t="GENERATE_POINT_BUFFERS",n="GENERATE_LINE_STRING_BUFFERS",r={1:"The view center is not defined",2:"The view resolution is not defined",3:"The view rotation is not defined",4:"`image` and `src` cannot be provided at the same time",5:"`imgSize` must be set when `image` is provided",7:"`format` must be set when `url` is set",8:"Unknown `serverType` configured",9:"`url` must be configured or set using `#setUrl()`",10:"The default `geometryFunction` can only handle `Point` geometries",11:"`options.featureTypes` must be an Array",12:"`options.geometryName` must also be provided when `options.bbox` is set",13:"Invalid corner",14:"Invalid color",15:"Tried to get a value for a key that does not exist in the cache",16:"Tried to set a value for a key that is used already",17:"`resolutions` must be sorted in descending order",18:"Either `origin` or `origins` must be configured, never both",19:"Number of `tileSizes` and `resolutions` must be equal",20:"Number of `origins` and `resolutions` must be equal",22:"Either `tileSize` or `tileSizes` must be configured, never both",24:"Invalid extent or geometry provided as `geometry`",25:"Cannot fit empty extent provided as `geometry`",26:"Features must have an id set",27:"Features must have an id set",28:\'`renderMode` must be `"hybrid"` or `"vector"`\',30:"The passed `feature` was already added to the source",31:"Tried to enqueue an `element` that was already added to the queue",32:"Transformation matrix cannot be inverted",33:"Invalid units",34:"Invalid geometry layout",36:"Unknown SRS type",37:"Unknown geometry type found",38:"`styleMapValue` has an unknown type",39:"Unknown geometry type",40:"Expected `feature` to have a geometry",41:"Expected an `ol/style/Style` or an array of `ol/style/Style.js`",42:"Question unknown, the answer is 42",43:"Expected `layers` to be an array or a `Collection`",47:"Expected `controls` to be an array or an `ol/Collection`",48:"Expected `interactions` to be an array or an `ol/Collection`",49:"Expected `overlays` to be an array or an `ol/Collection`",50:"`options.featureTypes` should be an Array",51:"Either `url` or `tileJSON` options must be provided",52:"Unknown `serverType` configured",53:"Unknown `tierSizeCalculation` configured",55:"The {-y} placeholder requires a tile grid with extent",56:"mapBrowserEvent must originate from a pointer event",57:"At least 2 conditions are required",59:"Invalid command found in the PBF",60:"Missing or invalid `size`",61:"Cannot determine IIIF Image API version from provided image information JSON",62:"A `WebGLArrayBuffer` must either be of type `ELEMENT_ARRAY_BUFFER` or `ARRAY_BUFFER`",64:"Layer opacity must be a number",66:"`forEachFeatureAtCoordinate` cannot be used on a WebGL layer if the hit detection logic has not been enabled. This is done by providing adequate shaders using the `hitVertexShader` and `hitFragmentShader` properties of `WebGLPointsLayerRenderer`",67:"A layer can only be added to the map once. Use either `layer.setMap()` or `map.addLayer()`, not both",68:"A VectorTile source can only be rendered if it has a projection compatible with the view projection",69:"`width` or `height` cannot be provided together with `scale`"};class o extends Error{constructor(e){const t=r[e];super(t),this.code=e,this.name="AssertionError",this.message=t}}var i=o;function a(e,t){const n=t[0],r=t[1];return t[0]=e[0]*n+e[2]*r+e[4],t[1]=e[1]*n+e[3]*r+e[5],t}function s(e,t){const n=(r=t)[0]*r[3]-r[1]*r[2];var r;!function(e,t){if(!e)throw new i(t)}(0!==n,32);const o=t[0],a=t[1],s=t[2],u=t[3],f=t[4],x=t[5];return e[0]=u/n,e[1]=-a/n,e[2]=-s/n,e[3]=o/n,e[4]=(s*x-u*f)/n,e[5]=-(o*x-a*f)/n,e}function u(e){return e&&e.__esModule&&Object.prototype.hasOwnProperty.call(e,"default")?e.default:e}new Array(6);var f={exports:{}};function x(e,t,n){n=n||2;var r,o,i,a,s,u,f,x=t&&t.length,h=x?t[0]*n:e.length,v=l(e,0,h,n,!0),d=[];if(!v||v.next===v.prev)return d;if(x&&(v=function(e,t,n,r){var o,i,a,s=[];for(o=0,i=t.length;o<i;o++)(a=l(e,t[o]*r,o<i-1?t[o+1]*r:e.length,r,!1))===a.next&&(a.steiner=!0),s.push(A(a));for(s.sort(b),o=0;o<s.length;o++)n=g(s[o],n);return n}(e,t,v,n)),e.length>80*n){r=i=e[0],o=a=e[1];for(var y=n;y<h;y+=n)(s=e[y])<r&&(r=s),(u=e[y+1])<o&&(o=u),s>i&&(i=s),u>a&&(a=u);f=0!==(f=Math.max(i-r,a-o))?32767/f:0}return c(v,d,n,r,o,f,0),d}function l(e,t,n,r,o){var i,a;if(o===P(e,t,n,r)>0)for(i=t;i<n;i+=r)a=k(i,e[i],e[i+1],a);else for(i=n-r;i>=t;i-=r)a=k(i,e[i],e[i+1],a);return a&&F(a,a.next)&&(R(a),a=a.next),a}function h(e,t){if(!e)return e;t||(t=e);var n,r=e;do{if(n=!1,r.steiner||!F(r,r.next)&&0!==Z(r.prev,r,r.next))r=r.next;else{if(R(r),(r=t=r.prev)===r.next)break;n=!0}}while(n||r!==t);return t}function c(e,t,n,r,o,i,a){if(e){!a&&i&&function(e,t,n,r){var o=e;do{0===o.z&&(o.z=w(o.x,o.y,t,n,r)),o.prevZ=o.prev,o.nextZ=o.next,o=o.next}while(o!==e);o.prevZ.nextZ=null,o.prevZ=null,function(e){var t,n,r,o,i,a,s,u,f=1;do{for(n=e,e=null,i=null,a=0;n;){for(a++,r=n,s=0,t=0;t<f&&(s++,r=r.nextZ);t++);for(u=f;s>0||u>0&&r;)0!==s&&(0===u||!r||n.z<=r.z)?(o=n,n=n.nextZ,s--):(o=r,r=r.nextZ,u--),i?i.nextZ=o:e=o,o.prevZ=i,i=o;n=r}i.nextZ=null,f*=2}while(a>1)}(o)}(e,r,o,i);for(var s,u,f=e;e.prev!==e.next;)if(s=e.prev,u=e.next,i?d(e,r,o,i):v(e))t.push(s.i/n|0),t.push(e.i/n|0),t.push(u.i/n|0),R(e),e=u.next,f=u.next;else if((e=u)===f){a?1===a?c(e=y(h(e),t,n),t,n,r,o,i,2):2===a&&p(e,t,n,r,o,i):c(h(e),t,n,r,o,i,1);break}}}function v(e){var t=e.prev,n=e,r=e.next;if(Z(t,n,r)>=0)return!1;for(var o=t.x,i=n.x,a=r.x,s=t.y,u=n.y,f=r.y,x=o<i?o<a?o:a:i<a?i:a,l=s<u?s<f?s:f:u<f?u:f,h=o>i?o>a?o:a:i>a?i:a,c=s>u?s>f?s:f:u>f?u:f,v=r.next;v!==t;){if(v.x>=x&&v.x<=h&&v.y>=l&&v.y<=c&&E(o,s,i,u,a,f,v.x,v.y)&&Z(v.prev,v,v.next)>=0)return!1;v=v.next}return!0}function d(e,t,n,r){var o=e.prev,i=e,a=e.next;if(Z(o,i,a)>=0)return!1;for(var s=o.x,u=i.x,f=a.x,x=o.y,l=i.y,h=a.y,c=s<u?s<f?s:f:u<f?u:f,v=x<l?x<h?x:h:l<h?l:h,d=s>u?s>f?s:f:u>f?u:f,y=x>l?x>h?x:h:l>h?l:h,p=w(c,v,t,n,r),b=w(d,y,t,n,r),g=e.prevZ,m=e.nextZ;g&&g.z>=p&&m&&m.z<=b;){if(g.x>=c&&g.x<=d&&g.y>=v&&g.y<=y&&g!==o&&g!==a&&E(s,x,u,l,f,h,g.x,g.y)&&Z(g.prev,g,g.next)>=0)return!1;if(g=g.prevZ,m.x>=c&&m.x<=d&&m.y>=v&&m.y<=y&&m!==o&&m!==a&&E(s,x,u,l,f,h,m.x,m.y)&&Z(m.prev,m,m.next)>=0)return!1;m=m.nextZ}for(;g&&g.z>=p;){if(g.x>=c&&g.x<=d&&g.y>=v&&g.y<=y&&g!==o&&g!==a&&E(s,x,u,l,f,h,g.x,g.y)&&Z(g.prev,g,g.next)>=0)return!1;g=g.prevZ}for(;m&&m.z<=b;){if(m.x>=c&&m.x<=d&&m.y>=v&&m.y<=y&&m!==o&&m!==a&&E(s,x,u,l,f,h,m.x,m.y)&&Z(m.prev,m,m.next)>=0)return!1;m=m.nextZ}return!0}function y(e,t,n){var r=e;do{var o=r.prev,i=r.next.next;!F(o,i)&&T(o,r,r.next,i)&&z(o,i)&&z(i,o)&&(t.push(o.i/n|0),t.push(r.i/n|0),t.push(i.i/n|0),R(r),R(r.next),r=e=i),r=r.next}while(r!==e);return h(r)}function p(e,t,n,r,o,i){var a=e;do{for(var s=a.next.next;s!==a.prev;){if(a.i!==s.i&&M(a,s)){var u=U(a,s);return a=h(a,a.next),u=h(u,u.next),c(a,t,n,r,o,i,0),void c(u,t,n,r,o,i,0)}s=s.next}a=a.next}while(a!==e)}function b(e,t){return e.x-t.x}function g(e,t){var n=function(e,t){var n,r=t,o=e.x,i=e.y,a=-1/0;do{if(i<=r.y&&i>=r.next.y&&r.next.y!==r.y){var s=r.x+(i-r.y)*(r.next.x-r.x)/(r.next.y-r.y);if(s<=o&&s>a&&(a=s,n=r.x<r.next.x?r:r.next,s===o))return n}r=r.next}while(r!==t);if(!n)return null;var u,f=n,x=n.x,l=n.y,h=1/0;r=n;do{o>=r.x&&r.x>=x&&o!==r.x&&E(i<l?o:a,i,x,l,i<l?a:o,i,r.x,r.y)&&(u=Math.abs(i-r.y)/(o-r.x),z(r,e)&&(u<h||u===h&&(r.x>n.x||r.x===n.x&&m(n,r)))&&(n=r,h=u)),r=r.next}while(r!==f);return n}(e,t);if(!n)return t;var r=U(n,e);return h(r,r.next),h(n,n.next)}function m(e,t){return Z(e.prev,e,t.prev)<0&&Z(t.next,e,e.next)<0}function w(e,t,n,r,o){return(e=1431655765&((e=858993459&((e=252645135&((e=16711935&((e=(e-n)*o|0)|e<<8))|e<<4))|e<<2))|e<<1))|(t=1431655765&((t=858993459&((t=252645135&((t=16711935&((t=(t-r)*o|0)|t<<8))|t<<4))|t<<2))|t<<1))<<1}function A(e){var t=e,n=e;do{(t.x<n.x||t.x===n.x&&t.y<n.y)&&(n=t),t=t.next}while(t!==e);return n}function E(e,t,n,r,o,i,a,s){return(o-a)*(t-s)>=(e-a)*(i-s)&&(e-a)*(r-s)>=(n-a)*(t-s)&&(n-a)*(i-s)>=(o-a)*(r-s)}function M(e,t){return e.next.i!==t.i&&e.prev.i!==t.i&&!function(e,t){var n=e;do{if(n.i!==e.i&&n.next.i!==e.i&&n.i!==t.i&&n.next.i!==t.i&&T(n,n.next,e,t))return!0;n=n.next}while(n!==e);return!1}(e,t)&&(z(e,t)&&z(t,e)&&function(e,t){var n=e,r=!1,o=(e.x+t.x)/2,i=(e.y+t.y)/2;do{n.y>i!=n.next.y>i&&n.next.y!==n.y&&o<(n.next.x-n.x)*(i-n.y)/(n.next.y-n.y)+n.x&&(r=!r),n=n.next}while(n!==e);return r}(e,t)&&(Z(e.prev,e,t.prev)||Z(e,t.prev,t))||F(e,t)&&Z(e.prev,e,e.next)>0&&Z(t.prev,t,t.next)>0)}function Z(e,t,n){return(t.y-e.y)*(n.x-t.x)-(t.x-e.x)*(n.y-t.y)}function F(e,t){return e.x===t.x&&e.y===t.y}function T(e,t,n,r){var o=S(Z(e,t,n)),i=S(Z(e,t,r)),a=S(Z(n,r,e)),s=S(Z(n,r,t));return o!==i&&a!==s||(!(0!==o||!I(e,n,t))||(!(0!==i||!I(e,r,t))||(!(0!==a||!I(n,e,r))||!(0!==s||!I(n,t,r)))))}function I(e,t,n){return t.x<=Math.max(e.x,n.x)&&t.x>=Math.min(e.x,n.x)&&t.y<=Math.max(e.y,n.y)&&t.y>=Math.min(e.y,n.y)}function S(e){return e>0?1:e<0?-1:0}function z(e,t){return Z(e.prev,e,e.next)<0?Z(e,t,e.next)>=0&&Z(e,e.prev,t)>=0:Z(e,t,e.prev)<0||Z(e,e.next,t)<0}function U(e,t){var n=new B(e.i,e.x,e.y),r=new B(t.i,t.x,t.y),o=e.next,i=t.prev;return e.next=t,t.prev=e,n.next=o,o.prev=n,r.next=n,n.prev=r,i.next=r,r.prev=i,r}function k(e,t,n,r){var o=new B(e,t,n);return r?(o.next=r.next,o.prev=r,r.next.prev=o,r.next=o):(o.prev=o,o.next=o),o}function R(e){e.next.prev=e.prev,e.prev.next=e.next,e.prevZ&&(e.prevZ.nextZ=e.nextZ),e.nextZ&&(e.nextZ.prevZ=e.prevZ)}function B(e,t,n){this.i=e,this.x=t,this.y=n,this.prev=null,this.next=null,this.z=0,this.prevZ=null,this.nextZ=null,this.steiner=!1}function P(e,t,n,r){for(var o=0,i=t,a=n-r;i<n;i+=r)o+=(e[a]-e[i])*(e[i+1]+e[a+1]),a=i;return o}f.exports=x,f.exports.default=x,x.deviation=function(e,t,n,r){var o=t&&t.length,i=o?t[0]*n:e.length,a=Math.abs(P(e,0,i,n));if(o)for(var s=0,u=t.length;s<u;s++){var f=t[s]*n,x=s<u-1?t[s+1]*n:e.length;a-=Math.abs(P(e,f,x,n))}var l=0;for(s=0;s<r.length;s+=3){var h=r[s]*n,c=r[s+1]*n,v=r[s+2]*n;l+=Math.abs((e[h]-e[v])*(e[c+1]-e[h+1])-(e[h]-e[c])*(e[v+1]-e[h+1]))}return 0===a&&0===l?0:Math.abs((l-a)/a)},x.flatten=function(e){for(var t=e[0][0].length,n={vertices:[],holes:[],dimensions:t},r=0,o=0;o<e.length;o++){for(var i=0;i<e[o].length;i++)for(var a=0;a<t;a++)n.vertices.push(e[o][i][a]);o>0&&(r+=e[o-1].length,n.holes.push(r))}return n};var N=u(f.exports);const _=[],O={vertexPosition:0,indexPosition:0};function q(e,t,n,r,o){e[t+0]=n,e[t+1]=r,e[t+2]=o}function L(e,t,n,r,o,i){const a=3+o,s=e[t+0],u=e[t+1],f=_;f.length=o;for(let n=0;n<f.length;n++)f[n]=e[t+2+n];let x=i?i.vertexPosition:0,l=i?i.indexPosition:0;const h=x/a;return q(n,x,s,u,0),f.length&&n.set(f,x+3),x+=a,q(n,x,s,u,1),f.length&&n.set(f,x+3),x+=a,q(n,x,s,u,2),f.length&&n.set(f,x+3),x+=a,q(n,x,s,u,3),f.length&&n.set(f,x+3),x+=a,r[l++]=h,r[l++]=h+1,r[l++]=h+3,r[l++]=h+1,r[l++]=h+2,r[l++]=h+3,O.vertexPosition=x,O.indexPosition=l,O}function C(e,t,n,r,o,i,s,u,f,x){const l=5+u.length,h=i.length/l,c=[e[t+0],e[t+1]],v=[e[n],e[n+1]],d=a(x,[...c]),y=a(x,[...v]);function p(e,t,n){const r=1e4;return Math.round(1500*t)+Math.round(1500*n)*r+e*r*r}function b(e,t,n){const r=Math.sqrt((t[0]-e[0])*(t[0]-e[0])+(t[1]-e[1])*(t[1]-e[1])),o=[(t[0]-e[0])/r,(t[1]-e[1])/r],i=[-o[1],o[0]],a=Math.sqrt((n[0]-e[0])*(n[0]-e[0])+(n[1]-e[1])*(n[1]-e[1])),s=[(n[0]-e[0])/a,(n[1]-e[1])/a],u=0===r||0===a?0:Math.acos((f=s[0]*o[0]+s[1]*o[1],x=-1,l=1,Math.min(Math.max(f,x),l)));var f,x,l;return s[0]*i[0]+s[1]*i[1]>0?u:2*Math.PI-u}const g=null!==o;let m=0,w=0;if(null!==r){m=b(d,y,a(x,[...[e[r],e[r+1]]]))}if(g){w=b(y,d,a(x,[...[e[o],e[o+1]]]))}i.push(c[0],c[1],v[0],v[1],p(0,m,w)),i.push(...u),i.push(c[0],c[1],v[0],v[1],p(1,m,w)),i.push(...u),i.push(c[0],c[1],v[0],v[1],p(2,m,w)),i.push(...u),i.push(c[0],c[1],v[0],v[1],p(3,m,w)),i.push(...u),s.push(h,h+1,h+2,h+1,h+3,h+2)}function G(e,t,n,r,o){const i=2+o;let a=t;const s=e.slice(a,a+o);a+=o;const u=e[a++];let f=0;const x=new Array(u-1);for(let t=0;t<u;t++)f+=e[a++],t<u-1&&(x[t]=f);const l=e.slice(a,a+2*f),h=N(l,x,2);for(let e=0;e<h.length;e++)r.push(h[e]+n.length/i);for(let e=0;e<l.length;e+=2)n.push(l[e],l[e+1],...s);return a+2*f}const j=self;j.onmessage=r=>{const o=r.data;switch(o.type){case t:{const e=3,t=2,n=o.customAttributesSize,r=t+n,i=new Float32Array(o.renderInstructions),a=i.length/r,s=4*a*(n+e),u=new Uint32Array(6*a),f=new Float32Array(s);let x;for(let e=0;e<i.length;e+=r)x=L(i,e,f,u,n,x);const l=Object.assign({vertexBuffer:f.buffer,indexBuffer:u.buffer,renderInstructions:i.buffer},o);j.postMessage(l,[f.buffer,u.buffer,i.buffer]);break}case n:{const e=[],t=[],n=o.customAttributesSize,r=2,i=new Float32Array(o.renderInstructions);let a=0;const u=o.renderInstructionsTransform,f=[1,0,0,1,0,0];let x,l;for(s(f,u);a<i.length;){l=Array.from(i.slice(a,a+n)),a+=n,x=i[a++];for(let n=0;n<x-1;n++)C(i,a+n*r,a+(n+1)*r,n>0?a+(n-1)*r:null,n<x-2?a+(n+2)*r:null,e,t,l,0,f);a+=x*r}const h=Uint32Array.from(t),c=Float32Array.from(e),v=Object.assign({vertexBuffer:c.buffer,indexBuffer:h.buffer,renderInstructions:i.buffer},o);j.postMessage(v,[c.buffer,h.buffer,i.buffer]);break}case e:{const e=[],t=[],n=o.customAttributesSize,r=new Float32Array(o.renderInstructions);let i=0;for(;i<r.length;)i=G(r,i,e,t,n);const a=Uint32Array.from(t),s=Float32Array.from(e),u=Object.assign({vertexBuffer:s.buffer,indexBuffer:a.buffer,renderInstructions:r.buffer},o);j.postMessage(u,[s.buffer,a.buffer,r.buffer]);break}}};';return new Worker("undefined"==typeof Blob?"data:application/javascript;base64,"+Buffer.from(t,"binary").toString("base64"):URL.createObjectURL(new Blob([t],{type:"application/javascript"})))}(),this.worker_.addEventListener("message",(t=>{const e=t.data;if(e.type===N){const i=e.projectionTransform;this.verticesBuffer_.fromArrayBuffer(e.vertexBuffer),this.helper.flushBufferData(this.verticesBuffer_),this.indicesBuffer_.fromArrayBuffer(e.indexBuffer),this.helper.flushBufferData(this.indicesBuffer_),this.renderTransform_=i,(0,R.nb)(this.invertRenderTransform_,this.renderTransform_),this.renderInstructions_=new Float32Array(t.data.renderInstructions),e.id===this.lastSentId&&(this.ready=!0),this.getLayer().changed()}})),this.featureCache_={},this.featureCount_=0;const s=this.getLayer().getSource();this.sourceListenKeys_=[(0,B.oL)(s,o.Z.ADDFEATURE,this.handleSourceFeatureAdded_,this),(0,B.oL)(s,o.Z.CHANGEFEATURE,this.handleSourceFeatureChanged_,this),(0,B.oL)(s,o.Z.REMOVEFEATURE,this.handleSourceFeatureDelete_,this),(0,B.oL)(s,o.Z.CLEAR,this.handleSourceFeatureClear_,this)],s.forEachFeature((t=>{this.featureCache_[(0,S.sq)(t)]={feature:t,properties:t.getProperties(),geometry:t.getGeometry()},this.featureCount_++}))}afterHelperCreated(){this.program_=this.helper.getProgram(this.fragmentShader_,this.vertexShader_),this.hitDetectionEnabled_&&(this.hitRenderTarget_=new class{constructor(t,e){this.helper_=t;const i=t.getGL();this.texture_=i.createTexture(),this.framebuffer_=i.createFramebuffer(),this.depthbuffer_=i.createRenderbuffer(),this.size_=e||[1,1],this.data_=new Uint8Array(0),this.dataCacheDirty_=!0,this.updateSize_()}setSize(t){(0,G.fS)(t,this.size_)||(this.size_[0]=t[0],this.size_[1]=t[1],this.updateSize_())}getSize(){return this.size_}clearCachedData(){this.dataCacheDirty_=!0}readAll(){if(this.dataCacheDirty_){const t=this.size_,e=this.helper_.getGL();e.bindFramebuffer(e.FRAMEBUFFER,this.framebuffer_),e.readPixels(0,0,t[0],t[1],e.RGBA,e.UNSIGNED_BYTE,this.data_),this.dataCacheDirty_=!1}return this.data_}readPixel(t,e){if(t<0||e<0||t>this.size_[0]||e>=this.size_[1])return z[0]=0,z[1]=0,z[2]=0,z[3]=0,z;this.readAll();const i=Math.floor(t)+(this.size_[1]-Math.floor(e)-1)*this.size_[0];return z[0]=this.data_[4*i],z[1]=this.data_[4*i+1],z[2]=this.data_[4*i+2],z[3]=this.data_[4*i+3],z}getTexture(){return this.texture_}getFramebuffer(){return this.framebuffer_}getDepthbuffer(){return this.depthbuffer_}updateSize_(){const t=this.size_,e=this.helper_.getGL();this.texture_=this.helper_.createTexture(t,null,this.texture_),e.bindFramebuffer(e.FRAMEBUFFER,this.framebuffer_),e.viewport(0,0,t[0],t[1]),e.framebufferTexture2D(e.FRAMEBUFFER,e.COLOR_ATTACHMENT0,e.TEXTURE_2D,this.texture_,0),e.bindRenderbuffer(e.RENDERBUFFER,this.depthbuffer_),e.renderbufferStorage(e.RENDERBUFFER,e.DEPTH_COMPONENT16,t[0],t[1]),e.framebufferRenderbuffer(e.FRAMEBUFFER,e.DEPTH_ATTACHMENT,e.RENDERBUFFER,this.depthbuffer_),this.data_=new Uint8Array(t[0]*t[1]*4)}}(this.helper))}handleSourceFeatureAdded_(t){const e=t.feature;this.featureCache_[(0,S.sq)(e)]={feature:e,properties:e.getProperties(),geometry:e.getGeometry()},this.featureCount_++}handleSourceFeatureChanged_(t){const e=t.feature;this.featureCache_[(0,S.sq)(e)]={feature:e,properties:e.getProperties(),geometry:e.getGeometry()}}handleSourceFeatureDelete_(t){const e=t.feature;delete this.featureCache_[(0,S.sq)(e)],this.featureCount_--}handleSourceFeatureClear_(){this.featureCache_={},this.featureCount_=0}renderFrame(t){const e=this.helper.getGL();this.preRender(e,t);const[i,n,r]=this.getWorldParameters_(t);this.renderWorlds(t,!1,i,n,r),this.helper.finalizeDraw(t,this.dispatchPreComposeEvent,this.dispatchPostComposeEvent);const s=this.helper.getCanvas();return this.hitDetectionEnabled_&&(this.renderWorlds(t,!0,i,n,r),this.hitRenderTarget_.clearCachedData()),this.postRender(e,t),s}getWorldParameters_(t){const e=t.viewState.projection,i=this.getLayer().getSource().getWrapX()&&e.canWrapX(),n=e.getExtent(),r=t.extent,s=i?(0,j.getWidth)(n):null,o=i?Math.ceil((r[2]-n[2])/s)+1:1;return[i?Math.floor((r[0]-n[0])/s):0,o,s]}prepareFrameInternal(t){const e=this.getLayer(),i=e.getSource(),n=t.viewState,r=!t.viewHints[a.Z.ANIMATING]&&!t.viewHints[a.Z.INTERACTING],o=!(0,j.equals)(this.previousExtent_,t.extent),l=this.sourceRevision_<i.getRevision();if(l&&(this.sourceRevision_=i.getRevision()),r&&(o||l)){const r=n.projection,o=n.resolution,a=e instanceof s.Z?e.getRenderBuffer():0,l=(0,j.buffer)(t.extent,a*o);i.loadFeatures(l,o,r),this.rebuildBuffers_(t),this.previousExtent_=t.extent.slice()}return this.helper.useProgram(this.program_,t),this.helper.prepareDraw(t),this.helper.bindBuffer(this.verticesBuffer_),this.helper.bindBuffer(this.indicesBuffer_),this.helper.enableAttributes(this.attributes),!0}rebuildBuffers_(t){const e=(0,R.Ue)();this.helper.makeProjectionTransform(t,e);const i=(this.hitDetectionEnabled_?7:2)+this.customAttributes.length,n=i*this.featureCount_;let r,s;this.renderInstructions_&&this.renderInstructions_.length===n||(this.renderInstructions_=new Float32Array(n));const o=[],a=[];let l=-1;for(const t in this.featureCache_)if(r=this.featureCache_[t],s=r.geometry,s&&"Point"===s.getType()){if(o[0]=s.getFlatCoordinates()[0],o[1]=s.getFlatCoordinates()[1],(0,R.nn)(e,o),this.renderInstructions_[++l]=o[0],this.renderInstructions_[++l]=o[1],this.hitDetectionEnabled_){const e=U(l+5,a);this.renderInstructions_[++l]=e[0],this.renderInstructions_[++l]=e[1],this.renderInstructions_[++l]=e[2],this.renderInstructions_[++l]=e[3],this.renderInstructions_[++l]=Number(t)}for(let t=0;t<this.customAttributes.length;t++){const e=this.customAttributes[t].callback(r.feature,r.properties);this.renderInstructions_[++l]=e}}const h={id:++this.lastSentId,type:N,renderInstructions:this.renderInstructions_.buffer,customAttributesSize:i-2};h.projectionTransform=e,this.ready=!1,this.worker_.postMessage(h,[this.renderInstructions_.buffer]),this.renderInstructions_=null}forEachFeatureAtCoordinate(t,e,i,n,r){if((0,p.h)(this.hitDetectionEnabled_,66),!this.renderInstructions_||!this.hitDetectionEnabled_)return;const s=(0,R.nn)(e.coordinateToPixelTransform,t.slice()),o=this.hitRenderTarget_.readPixel(s[0]/2,s[1]/2),a=function(t){let e=0;const i=256,n=255;return e+=Math.round(t[0]*i*i*i*n),e+=Math.round(t[1]*i*i*n),e+=Math.round(t[2]*i*n),e+=Math.round(t[3]*n),e}([o[0]/255,o[1]/255,o[2]/255,o[3]/255]),l=this.renderInstructions_[a],h=Math.floor(l).toString(),u=this.getLayer().getSource().getFeatureByUid(h);return u?n(u,this.getLayer(),null):void 0}renderWorlds(t,e,i,n,r){let s=i;this.helper.useProgram(this.program_,t),e&&(this.hitRenderTarget_.setSize([Math.floor(t.size[0]/2),Math.floor(t.size[1]/2)]),this.helper.prepareDrawToRenderTarget(t,this.hitRenderTarget_,!0)),this.helper.bindBuffer(this.verticesBuffer_),this.helper.bindBuffer(this.indicesBuffer_),this.helper.enableAttributes(this.attributes);do{this.helper.makeProjectionTransform(t,this.currentTransform_),(0,R.Iu)(this.currentTransform_,s*r,0),(0,R.Jp)(this.currentTransform_,this.invertRenderTransform_),this.helper.applyUniforms(t),this.helper.applyHitDetectionUniform(e);const i=this.indicesBuffer_.getSize();this.helper.drawElements(0,i)}while(++s<n)}disposeInternal(){this.worker_.terminate(),this.layer_=null,this.sourceListenKeys_.forEach((function(t){(0,B.bN)(t)})),this.sourceListenKeys_=null,super.disposeInternal()}};var q=i(3983),W=i(8326);const X="blur",H="gradient",Y="radius",K=["#00f","#0ff","#0f0","#ff0","#f00"];class $ extends s.Z{constructor(t){t=t||{};const e=Object.assign({},t);delete e.gradient,delete e.radius,delete e.blur,delete e.weight,super(e),this.gradient_=null,this.addChangeListener(H,this.handleGradientChanged_),this.setGradient(t.gradient?t.gradient:K),this.setBlur(void 0!==t.blur?t.blur:15),this.setRadius(void 0!==t.radius?t.radius:8);const i=t.weight?t.weight:"weight";this.weightFunction_="string"==typeof i?function(t){return t.get(i)}:i,this.setRenderOrder(null)}getBlur(){return this.get(X)}getGradient(){return this.get(H)}getRadius(){return this.get(Y)}handleGradientChanged_(){this.gradient_=function(t){const e=(0,W.E4)(1,256),i=e.createLinearGradient(0,0,1,256),n=1/(t.length-1);for(let e=0,r=t.length;e<r;++e)i.addColorStop(e*n,t[e]);return e.fillStyle=i,e.fillRect(0,0,1,256),e.canvas}(this.getGradient())}setBlur(t){this.set(X,t)}setGradient(t){this.set(H,t)}setRadius(t){this.set(Y,t)}createRenderer(){return new V(this,{className:this.getClassName(),attributes:[{name:"weight",callback:t=>{const e=this.weightFunction_(t);return void 0!==e?(0,q.uZ)(e,0,1):1}}],hitDetectionEnabled:!0,vertexShader:"\n        precision mediump float;\n        uniform mat4 u_projectionMatrix;\n        uniform mat4 u_offsetScaleMatrix;\n        uniform float u_size;\n        attribute vec2 a_position;\n        attribute float a_index;\n        attribute float a_weight;\n        attribute vec4 a_hitColor;\n\n        varying vec2 v_texCoord;\n        varying float v_weight;\n        varying vec4 v_hitColor;\n\n        void main(void) {\n          mat4 offsetMatrix = u_offsetScaleMatrix;\n          float offsetX = a_index == 0.0 || a_index == 3.0 ? -u_size / 2.0 : u_size / 2.0;\n          float offsetY = a_index == 0.0 || a_index == 1.0 ? -u_size / 2.0 : u_size / 2.0;\n          vec4 offsets = offsetMatrix * vec4(offsetX, offsetY, 0.0, 0.0);\n          gl_Position = u_projectionMatrix * vec4(a_position, 0.0, 1.0) + offsets;\n          float u = a_index == 0.0 || a_index == 3.0 ? 0.0 : 1.0;\n          float v = a_index == 0.0 || a_index == 1.0 ? 0.0 : 1.0;\n          v_texCoord = vec2(u, v);\n          v_hitColor = a_hitColor;\n          v_weight = a_weight;\n        }",fragmentShader:"\n        precision mediump float;\n        uniform float u_blurSlope;\n        uniform mediump int u_hitDetection;\n\n        varying vec2 v_texCoord;\n        varying float v_weight;\n        varying vec4 v_hitColor;\n\n        void main(void) {\n          vec2 texCoord = v_texCoord * 2.0 - vec2(1.0, 1.0);\n          float sqRadius = texCoord.x * texCoord.x + texCoord.y * texCoord.y;\n          float value = (1.0 - sqrt(sqRadius)) * u_blurSlope;\n          float alpha = smoothstep(0.0, 1.0, value) * v_weight;\n          gl_FragColor = vec4(alpha, alpha, alpha, alpha);\n          if (u_hitDetection > 0) {\n            if (alpha < 0.05) {\n              discard;\n            }\n            gl_FragColor = v_hitColor;\n          }\n      }",uniforms:{u_size:()=>2*(this.get(Y)+this.get(X)),u_blurSlope:()=>this.get(Y)/Math.max(1,this.get(X))},postProcesses:[{fragmentShader:"\n            precision mediump float;\n\n            uniform sampler2D u_image;\n            uniform sampler2D u_gradientTexture;\n            uniform float u_opacity;\n\n            varying vec2 v_texCoord;\n\n            void main() {\n              vec4 color = texture2D(u_image, v_texCoord);\n              gl_FragColor.a = color.a * u_opacity;\n              gl_FragColor.rgb = texture2D(u_gradientTexture, vec2(0.5, color.a)).rgb;\n              gl_FragColor.rgb *= gl_FragColor.a;\n            }",uniforms:{u_gradientTexture:()=>this.gradient_,u_opacity:()=>this.getOpacity()}}]})}renderDeclutter(){}}const J=$;var Q=i(3028),tt=i(1295),et=i(291),it=i(5487),nt=i(6121);const rt=class{constructor(){this.dataProjection=void 0,this.defaultFeatureProjection=void 0,this.supportedMediaTypes=null}getReadOptions(t,e){if(e){let i=e.dataProjection?(0,nt.get)(e.dataProjection):this.readProjection(t);e.extent&&i&&"tile-pixels"===i.getUnits()&&(i=(0,nt.get)(i),i.setWorldExtent(e.extent)),e={dataProjection:i,featureProjection:e.featureProjection}}return this.adaptOptions(e)}adaptOptions(t){return Object.assign({dataProjection:this.dataProjection,featureProjection:this.defaultFeatureProjection},t)}getType(){return(0,S.O3)()}readFeature(t,e){return(0,S.O3)()}readFeatures(t,e){return(0,S.O3)()}readGeometry(t,e){return(0,S.O3)()}readProjection(t){return(0,S.O3)()}writeFeature(t,e){return(0,S.O3)()}writeFeatures(t,e){return(0,S.O3)()}writeGeometry(t,e){return(0,S.O3)()}};function st(t,e,i){const n=i?(0,nt.get)(i.featureProjection):null,r=i?(0,nt.get)(i.dataProjection):null;let s;if(s=n&&r&&!(0,nt.equivalent)(n,r)?(e?t.clone():t).transform(e?n:r,e?r:n):t,e&&i&&void 0!==i.decimals){const e=Math.pow(10,i.decimals),n=function(t){for(let i=0,n=t.length;i<n;++i)t[i]=Math.round(t[i]*e)/e;return t};s===t&&(s=t.clone()),s.applyTransform(n)}return s}var ot=i(2083),at=i(7403),lt=i(6259),ht=i(5063),ut=i(3614),ct=i(188),dt=i(2033),gt=i(9619),pt=i(3448),ft=i(9405),mt=i(1071),_t=i(6442);const yt=(0,R.Ue)();class vt{constructor(t,e,i,n,r){this.styleFunction,this.extent_,this.id_=r,this.type_=t,this.flatCoordinates_=e,this.flatInteriorPoints_=null,this.flatMidpoints_=null,this.ends_=i,this.properties_=n}get(t){return this.properties_[t]}getExtent(){return this.extent_||(this.extent_="Point"===this.type_?(0,j.createOrUpdateFromCoordinate)(this.flatCoordinates_):(0,j.createOrUpdateFromFlatCoordinates)(this.flatCoordinates_,0,this.flatCoordinates_.length,2)),this.extent_}getFlatInteriorPoint(){if(!this.flatInteriorPoints_){const t=(0,j.getCenter)(this.getExtent());this.flatInteriorPoints_=(0,pt.X)(this.flatCoordinates_,0,this.ends_,2,t,0)}return this.flatInteriorPoints_}getFlatInteriorPoints(){if(!this.flatInteriorPoints_){const t=(0,mt.E)(this.flatCoordinates_,0,this.ends_,2);this.flatInteriorPoints_=(0,pt.U)(this.flatCoordinates_,0,this.ends_,2,t)}return this.flatInteriorPoints_}getFlatMidpoint(){return this.flatMidpoints_||(this.flatMidpoints_=(0,ft.WW)(this.flatCoordinates_,0,this.flatCoordinates_.length,2,.5)),this.flatMidpoints_}getFlatMidpoints(){if(!this.flatMidpoints_){this.flatMidpoints_=[];const t=this.flatCoordinates_;let e=0;const i=this.ends_;for(let n=0,r=i.length;n<r;++n){const r=i[n],s=(0,ft.WW)(t,e,r,2,.5);(0,G.l7)(this.flatMidpoints_,s),e=r}}return this.flatMidpoints_}getId(){return this.id_}getOrientedFlatCoordinates(){return this.flatCoordinates_}getGeometry(){return this}getSimplifiedGeometry(t){return this}simplifyTransformed(t,e){return this}getProperties(){return this.properties_}getStride(){return 2}getStyleFunction(){return this.styleFunction}getType(){return this.type_}transform(t){const e=(t=(0,nt.get)(t)).getExtent(),i=t.getWorldExtent();if(e&&i){const t=(0,j.getHeight)(i)/(0,j.getHeight)(e);(0,R.qC)(yt,i[0],i[3],t,-t,0,0,0),(0,_t.vT)(this.flatCoordinates_,0,this.flatCoordinates_.length,2,yt,this.flatCoordinates_)}}getEnds(){return this.ends_}}vt.prototype.getEndss=vt.prototype.getEnds,vt.prototype.getFlatCoordinates=vt.prototype.getOrientedFlatCoordinates;const xt=vt;var Et=i(3157);function bt(t,e,i){if(3===t){const t={keys:[],values:[],features:[]},n=i.readVarint()+i.pos;i.readFields(wt,t,n),t.length=t.features.length,t.length&&(e[t.name]=t)}}function wt(t,e,i){if(15===t)e.version=i.readVarint();else if(1===t)e.name=i.readString();else if(5===t)e.extent=i.readVarint();else if(2===t)e.features.push(i.pos);else if(3===t)e.keys.push(i.readString());else if(4===t){let n=null;const r=i.readVarint()+i.pos;for(;i.pos<r;)n=1==(t=i.readVarint()>>3)?i.readString():2===t?i.readFloat():3===t?i.readDouble():4===t?i.readVarint64():5===t?i.readVarint():6===t?i.readSVarint():7===t?i.readBoolean():null;e.values.push(n)}}function St(t,e,i){if(1==t)e.id=i.readVarint();else if(2==t){const t=i.readVarint()+i.pos;for(;i.pos<t;){const t=e.layer.keys[i.readVarint()],n=e.layer.values[i.readVarint()];e.properties[t]=n}}else 3==t?e.type=i.readVarint():4==t&&(e.geometry=i.pos)}function Tt(t,e,i){t.pos=e.features[i];const n=t.readVarint()+t.pos,r={layer:e,type:0,properties:{}};return t.readFields(St,r,n),r}const Ct=class extends rt{constructor(t){super(),t=t||{},this.dataProjection=new gt.Z({code:"",units:"tile-pixels"}),this.featureClass_=t.featureClass?t.featureClass:xt,this.geometryName_=t.geometryName,this.layerName_=t.layerName?t.layerName:"layer",this.layers_=t.layers?t.layers:null,this.idProperty_=t.idProperty,this.supportedMediaTypes=["application/vnd.mapbox-vector-tile","application/x-protobuf"]}readRawGeometry_(t,e,i,n){t.pos=e.geometry;const r=t.readVarint()+t.pos;let s=1,o=0,a=0,l=0,h=0,u=0;for(;t.pos<r;){if(!o){const e=t.readVarint();s=7&e,o=e>>3}o--,1===s||2===s?(a+=t.readSVarint(),l+=t.readSVarint(),1===s&&h>u&&(n.push(h),u=h),i.push(a,l),h+=2):7===s?h>u&&(i.push(i[u],i[u+1]),h+=2):(0,p.h)(!1,59)}h>u&&(n.push(h),u=h)}createFeature_(t,e,i){const n=e.type;if(0===n)return null;let r;const s=e.properties;let o;this.idProperty_?(o=s[this.idProperty_],delete s[this.idProperty_]):o=e.id,s[this.layerName_]=e.layer.name;const a=[],l=[];this.readRawGeometry_(t,e,a,l);const h=function(t,e){let i;return 1===t?i=1===e?"Point":"MultiPoint":2===t?i=1===e?"LineString":"MultiLineString":3===t&&(i="Polygon"),i}(n,l.length);if(this.featureClass_===xt)r=new this.featureClass_(h,a,l,s,o),r.transform(i.dataProjection);else{let t;if("Polygon"==h){const e=(0,Et.Q3)(a,l);t=e.length>1?new ht.Z(a,"XY",e):new dt.ZP(a,"XY",l)}else t="Point"===h?new ct.default(a,"XY"):"LineString"===h?new ot.Z(a,"XY"):"MultiPoint"===h?new lt.Z(a,"XY"):"MultiLineString"===h?new at.Z(a,"XY",l):null;r=new(0,this.featureClass_),this.geometryName_&&r.setGeometryName(this.geometryName_);const e=st(t,!1,i);r.setGeometry(e),void 0!==o&&r.setId(o),r.setProperties(s,!0)}return r}getType(){return"arraybuffer"}readFeatures(t,e){const i=this.layers_;e=this.adaptOptions(e);const n=(0,nt.get)(e.dataProjection);n.setWorldExtent(e.extent),e.dataProjection=n;const r=new ut(t),s=r.readFields(bt,{}),o=[];for(const t in s){if(i&&!i.includes(t))continue;const a=s[t],l=a?[0,0,a.extent,a.extent]:null;n.setExtent(l);for(let t=0,i=a.length;t<i;++t){const i=Tt(r,a,t),n=this.createFeature_(r,i,e);null!==n&&o.push(n)}}return o}readProjection(t){return this.dataProjection}setLayers(t){this.layers_=t}};var Rt=i(1328),Pt=i(2669),It=i(8845),Lt=i(7195),Mt=i(9272),Ft=i(6234),At=i(4307),Zt=i(1900);const Dt={image:["Polygon","Circle","LineString","Image","Text"],hybrid:["Polygon","LineString"],vector:[]},Ot={hybrid:["Image","Text","Default"],vector:["Polygon","Circle","LineString","Image","Text","Default"]};class kt extends It.Z{constructor(t){super(t),this.boundHandleStyleImageChange_=this.handleStyleImageChange_.bind(this),this.renderedLayerRevision_,this.renderedPixelToCoordinateTransform_=null,this.renderedRotation_,this.tmpTransform_=(0,R.Ue)()}prepareTile(t,e,i){let n;const r=t.getState();return r!==Lt.Z.LOADED&&r!==Lt.Z.ERROR||(this.updateExecutorGroup_(t,e,i),this.tileImageNeedsRender_(t)&&(n=!0)),n}getTile(t,e,i,n){const r=n.pixelRatio,s=n.viewState,o=s.resolution,l=s.projection,h=this.getLayer(),u=h.getSource().getTile(t,e,i,r,l),c=n.viewHints,d=!(c[a.Z.ANIMATING]||c[a.Z.INTERACTING]);return!d&&u.wantedResolution||(u.wantedResolution=o),this.prepareTile(u,r,l)&&(d||Date.now()-n.time<8)&&"vector"!==h.getRenderMode()&&this.renderTileImage_(u,n),super.getTile(t,e,i,n)}isDrawableTile(t){const e=this.getLayer();return super.isDrawableTile(t)&&("vector"===e.getRenderMode()?(0,S.sq)(e)in t.executorGroups:t.hasContext(e))}getTileImage(t){return t.getImage(this.getLayer())}prepareFrame(t){const e=this.getLayer().getRevision();return this.renderedLayerRevision_!==e&&(this.renderedLayerRevision_=e,this.renderedTiles.length=0),super.prepareFrame(t)}updateExecutorGroup_(t,e,i){const n=this.getLayer(),r=n.getRevision(),s=n.getRenderOrder()||null,o=t.wantedResolution,a=t.getReplayState(n);if(!a.dirty&&a.renderedResolution===o&&a.renderedRevision==r&&a.renderedRenderOrder==s)return;const l=n.getSource(),h=n.getDeclutter(),u=l.getTileGrid(),c=l.getTileGridForProjection(i).getTileCoordExtent(t.wrappedTileCoord),d=l.getSourceTiles(e,i,t),g=(0,S.sq)(n);delete t.hitDetectionImageData[g],t.executorGroups[g]=[],h&&(t.declutterExecutorGroups[g]=[]),a.dirty=!1;for(let i=0,r=d.length;i<r;++i){const r=d[i];if(r.getState()!=Lt.Z.LOADED)continue;const p=r.tileCoord,f=u.getTileCoordExtent(p),m=(0,j.getIntersection)(c,f),_=(0,j.buffer)(m,n.getRenderBuffer()*o,this.tmpExtent),y=(0,j.equals)(f,m)?null:_,v=new Rt.Z(0,_,o,e),x=h?new Rt.Z(0,m,o,e):void 0,E=(0,Ft.se)(o,e),b=function(t){let e;const i=t.getStyleFunction()||n.getStyleFunction();if(i&&(e=i(t,o)),e){const i=this.renderFeature(t,E,e,v,x);a.dirty=a.dirty||i}},w=r.getFeatures();s&&s!==a.renderedRenderOrder&&w.sort(s);for(let t=0,e=w.length;t<e;++t){const e=w[t];y&&!(0,j.intersects)(y,e.getGeometry().getExtent())||b.call(this,e)}const S=v.finish(),T="vector"!==n.getRenderMode()&&h&&1===d.length?null:m,C=new Pt.Z(T,o,e,l.getOverlaps(),S,n.getRenderBuffer());if(t.executorGroups[g].push(C),x){const i=new Pt.Z(null,o,e,l.getOverlaps(),x.finish(),n.getRenderBuffer());t.declutterExecutorGroups[g].push(i)}}a.renderedRevision=r,a.renderedRenderOrder=s,a.renderedResolution=o}forEachFeatureAtCoordinate(t,e,i,n,r){const s=e.viewState.resolution,o=e.viewState.rotation;i=null==i?0:i;const a=this.getLayer(),l=a.getSource().getTileGridForProjection(e.viewState.projection),h=(0,j.boundingExtent)([t]);(0,j.buffer)(h,s*i,h);const u={},c=function(t,e,i){let s=t.getId();void 0===s&&(s=(0,S.sq)(t));const o=u[s];if(o){if(!0!==o&&i<o.distanceSq){if(0===i)return u[s]=!0,r.splice(r.lastIndexOf(o),1),n(t,a,e);o.geometry=e,o.distanceSq=i}}else{if(0===i)return u[s]=!0,n(t,a,e);r.push(u[s]={feature:t,layer:a,geometry:e,distanceSq:i,callback:n})}},d=this.renderedTiles;let g;for(let n=0,r=d.length;!g&&n<r;++n){const r=d[n],u=l.getTileCoordExtent(r.wrappedTileCoord);if(!(0,j.intersects)(u,h))continue;const p=(0,S.sq)(a),f=[r.executorGroups[p]],m=r.declutterExecutorGroups[p];m&&f.push(m),f.some((n=>{const r=n===m?e.declutterTree.all().map((t=>t.value)):null;for(let e=0,a=n.length;e<a;++e){const a=n[e];if(g=a.forEachFeatureAtCoordinate(t,s,o,i,c,r),g)return!0}}))}return g}getFeatures(t){return new Promise(((e,i)=>{const n=this.getLayer(),r=(0,S.sq)(n),s=n.getSource(),o=this.renderedProjection,a=o.getExtent(),l=this.renderedResolution,h=s.getTileGridForProjection(o),u=(0,R.nn)(this.renderedPixelToCoordinateTransform_,t.slice()),c=h.getTileCoordForCoordAndResolution(u,l);let d;for(let t=0,e=this.renderedTiles.length;t<e;++t)if(c.toString()===this.renderedTiles[t].tileCoord.toString()){if(d=this.renderedTiles[t],d.getState()===Lt.Z.LOADED){const t=h.getTileCoordExtent(d.tileCoord);s.getWrapX()&&o.canWrapX()&&!(0,j.containsExtent)(a,t)&&(0,Zt.Cf)(u,o);break}d=void 0}if(!d||d.loadingSourceTiles>0)return void e([]);const g=h.getTileCoordExtent(d.wrappedTileCoord),p=(0,j.getTopLeft)(g),f=[(u[0]-p[0])/l,(p[1]-u[1])/l],m=d.getSourceTiles().reduce((function(t,e){return t.concat(e.getFeatures())}),[]);let _=d.hitDetectionImageData[r];if(!_){const t=(0,At.Pq)(h.getTileSize(h.getZForResolution(l,s.zDirection))),e=this.renderedRotation_,i=[this.getRenderTransform(h.getTileCoordCenter(d.wrappedTileCoord),l,0,Mt.UN,t[0]*Mt.UN,t[1]*Mt.UN,0)];_=(0,Mt.TU)(t,i,m,n.getStyleFunction(),h.getTileCoordExtent(d.wrappedTileCoord),d.getReplayState(n).renderedResolution,e),d.hitDetectionImageData[r]=_}e((0,Mt.ix)(f,m,_))}))}handleFontsChanged(){const t=this.getLayer();t.getVisible()&&void 0!==this.renderedLayerRevision_&&t.changed()}handleStyleImageChange_(t){this.renderIfReadyAndVisible()}renderDeclutter(t){const e=this.context,i=e.globalAlpha;e.globalAlpha=this.getLayer().getOpacity();const n=t.viewHints,r=!(n[a.Z.ANIMATING]||n[a.Z.INTERACTING]),s=this.renderedTiles;for(let e=0,i=s.length;e<i;++e){const i=s[e],n=i.declutterExecutorGroups[(0,S.sq)(this.getLayer())];if(n)for(let e=n.length-1;e>=0;--e)n[e].execute(this.context,1,this.getTileRenderTransform(i,t),t.viewState.rotation,r,void 0,t.declutterTree)}e.globalAlpha=i}getTileRenderTransform(t,e){const i=e.pixelRatio,n=e.viewState,r=n.center,s=n.resolution,o=n.rotation,a=e.size,l=Math.round(a[0]*i),h=Math.round(a[1]*i),u=this.getLayer().getSource().getTileGridForProjection(e.viewState.projection),c=t.tileCoord,d=u.getTileCoordExtent(t.wrappedTileCoord),g=u.getTileCoordExtent(c,this.tmpExtent)[0]-d[0];return(0,R.Jp)((0,R.bA)(this.inversePixelTransform.slice(),1/i,1/i),this.getRenderTransform(r,s,o,i,l,h,g))}postRender(t,e){const i=e.viewHints,n=!(i[a.Z.ANIMATING]||i[a.Z.INTERACTING]);this.renderedPixelToCoordinateTransform_=e.pixelToCoordinateTransform.slice(),this.renderedRotation_=e.viewState.rotation;const r=this.getLayer(),s=r.getRenderMode(),o=t.globalAlpha;t.globalAlpha=r.getOpacity();const l=Ot[s],h=e.viewState,u=h.rotation,c=r.getSource(),d=c.getTileGridForProjection(h.projection).getZForResolution(h.resolution,c.zDirection),g=this.renderedTiles,p=[],f=[];let m=!0;for(let i=g.length-1;i>=0;--i){const s=g[i];m=m&&!s.getReplayState(r).dirty;const o=s.executorGroups[(0,S.sq)(r)].filter((t=>t.hasExecutors(l)));if(0===o.length)continue;const a=this.getTileRenderTransform(s,e),h=s.tileCoord[0];let c=!1;const _=o[0].getClipCoords(a);if(_){for(let e=0,i=p.length;e<i;++e)if(d!==h&&h<f[e]){const i=p[e];(0,j.intersects)([_[0],_[3],_[4],_[7]],[i[0],i[3],i[4],i[7]])&&(c||(t.save(),c=!0),t.beginPath(),t.moveTo(_[0],_[1]),t.lineTo(_[2],_[3]),t.lineTo(_[4],_[5]),t.lineTo(_[6],_[7]),t.moveTo(i[6],i[7]),t.lineTo(i[4],i[5]),t.lineTo(i[2],i[3]),t.lineTo(i[0],i[1]),t.clip())}p.push(_),f.push(h)}for(let e=0,i=o.length;e<i;++e)o[e].execute(t,1,a,u,n,l);c&&t.restore()}t.globalAlpha=o,this.ready=m,super.postRender(t,e)}renderFeature(t,e,i,n,r){if(!i)return!1;let s=!1;if(Array.isArray(i))for(let o=0,a=i.length;o<a;++o)s=(0,Ft.Pn)(n,t,i[o],e,this.boundHandleStyleImageChange_,void 0,r)||s;else s=(0,Ft.Pn)(n,t,i,e,this.boundHandleStyleImageChange_,void 0,r);return s}tileImageNeedsRender_(t){const e=this.getLayer();if("vector"===e.getRenderMode())return!1;const i=t.getReplayState(e),n=e.getRevision(),r=t.wantedResolution;return i.renderedTileResolution!==r||i.renderedTileRevision!==n}renderTileImage_(t,e){const i=this.getLayer(),n=t.getReplayState(i),r=i.getRevision(),s=t.executorGroups[(0,S.sq)(i)];n.renderedTileRevision=r;const o=t.wrappedTileCoord,a=o[0],l=i.getSource();let h=e.pixelRatio;const u=e.viewState.projection,c=l.getTileGridForProjection(u),d=c.getResolution(t.tileCoord[0]),g=e.pixelRatio/t.wantedResolution*d,p=c.getResolution(a),f=t.getContext(i);h=Math.round(Math.max(h,g/h));const m=l.getTilePixelSize(a,h,u);f.canvas.width=m[0],f.canvas.height=m[1];const _=h/g;if(1!==_){const t=(0,R.mc)(this.tmpTransform_);(0,R.bA)(t,_,_),f.setTransform.apply(f,t)}const y=c.getTileCoordExtent(o,this.tmpExtent),v=g/p,x=(0,R.mc)(this.tmpTransform_);(0,R.bA)(x,v,-v),(0,R.Iu)(x,-y[0],-y[3]);for(let t=0,e=s.length;t<e;++t)s[t].execute(f,_,x,0,!0,Dt[i.getRenderMode()]);n.renderedTileResolution=t.wantedResolution}}const Gt=kt;var zt=i(8280);class Nt extends s.Z{constructor(t){t=t||{};const e=Object.assign({},t);delete e.preload,delete e.useInterimTilesOnError,super(e),this.on,this.once,this.un;const i=t.renderMode||"hybrid";(0,p.h)("hybrid"==i||"vector"==i,28),this.renderMode_=i,this.setPreload(t.preload?t.preload:0),this.setUseInterimTilesOnError(void 0===t.useInterimTilesOnError||t.useInterimTilesOnError),this.getBackground,this.setBackground}createRenderer(){return new Gt(this)}getFeatures(t){return super.getFeatures(t)}getRenderMode(){return this.renderMode_}getPreload(){return this.get(zt.Z.PRELOAD)}getUseInterimTilesOnError(){return this.get(zt.Z.USE_INTERIM_TILES_ON_ERROR)}setPreload(t){this.set(zt.Z.PRELOAD,t)}setUseInterimTilesOnError(t){this.set(zt.Z.USE_INTERIM_TILES_ON_ERROR,t)}}const jt=Nt;var Ut=i(3320),Bt=i(283),Vt=i(1345),qt=i(2370),Wt=i(8958),Xt=i(7539),Ht=i(1280),Yt=i(147),Kt=i(7848),$t=i(1090),Jt=i(3958);function Qt(t){if("string"==typeof t){return JSON.parse(t)||null}return null!==t?t:null}const te=class extends rt{constructor(){super()}getType(){return"json"}readFeature(t,e){return this.readFeatureFromObject(Qt(t),this.getReadOptions(t,e))}readFeatures(t,e){return this.readFeaturesFromObject(Qt(t),this.getReadOptions(t,e))}readFeatureFromObject(t,e){return(0,S.O3)()}readFeaturesFromObject(t,e){return(0,S.O3)()}readGeometry(t,e){return this.readGeometryFromObject(Qt(t),this.getReadOptions(t,e))}readGeometryFromObject(t,e){return(0,S.O3)()}readProjection(t){return this.readProjectionFromObject(Qt(t))}readProjectionFromObject(t){return(0,S.O3)()}writeFeature(t,e){return JSON.stringify(this.writeFeatureObject(t,e))}writeFeatureObject(t,e){return(0,S.O3)()}writeFeatures(t,e){return JSON.stringify(this.writeFeaturesObject(t,e))}writeFeaturesObject(t,e){return(0,S.O3)()}writeGeometry(t,e){return JSON.stringify(this.writeGeometryObject(t,e))}writeGeometryObject(t,e){return(0,S.O3)()}};function ee(t,e){if(!t)return null;let i;switch(t.type){case"Point":i=function(t){return new ct.default(t.coordinates)}(t);break;case"LineString":i=function(t){return new ot.Z(t.coordinates)}(t);break;case"Polygon":i=function(t){return new dt.ZP(t.coordinates)}(t);break;case"MultiPoint":i=function(t){return new lt.Z(t.coordinates)}(t);break;case"MultiLineString":i=function(t){return new at.Z(t.coordinates)}(t);break;case"MultiPolygon":i=function(t){return new ht.Z(t.coordinates)}(t);break;case"GeometryCollection":i=function(t,e){const i=t.geometries.map((function(t){return ee(t,undefined)}));return new Jt.Z(i)}(t);break;default:throw new Error("Unsupported GeoJSON type: "+t.type)}return st(i,!1,e)}function ie(t,e){const i=(t=st(t,!0,e)).getType();let n;switch(i){case"Point":n=function(t,e){return{type:"Point",coordinates:t.getCoordinates()}}(t);break;case"LineString":n=function(t,e){return{type:"LineString",coordinates:t.getCoordinates()}}(t);break;case"Polygon":n=function(t,e){let i;return e&&(i=e.rightHanded),{type:"Polygon",coordinates:t.getCoordinates(i)}}(t,e);break;case"MultiPoint":n=function(t,e){return{type:"MultiPoint",coordinates:t.getCoordinates()}}(t);break;case"MultiLineString":n=function(t,e){return{type:"MultiLineString",coordinates:t.getCoordinates()}}(t);break;case"MultiPolygon":n=function(t,e){let i;return e&&(i=e.rightHanded),{type:"MultiPolygon",coordinates:t.getCoordinates(i)}}(t,e);break;case"GeometryCollection":n=function(t,e){return delete(e=Object.assign({},e)).featureProjection,{type:"GeometryCollection",geometries:t.getGeometriesArray().map((function(t){return ie(t,e)}))}}(t,e);break;case"Circle":n={type:"GeometryCollection",geometries:[]};break;default:throw new Error("Unsupported geometry type: "+i)}return n}const ne=class extends te{constructor(t){t=t||{},super(),this.dataProjection=(0,nt.get)(t.dataProjection?t.dataProjection:"EPSG:4326"),t.featureProjection&&(this.defaultFeatureProjection=(0,nt.get)(t.featureProjection)),this.geometryName_=t.geometryName,this.extractGeometryName_=t.extractGeometryName,this.supportedMediaTypes=["application/geo+json","application/vnd.geo+json"]}readFeatureFromObject(t,e){let i=null;i="Feature"===t.type?t:{type:"Feature",geometry:t,properties:null};const n=ee(i.geometry,e),r=new $t.default;return this.geometryName_?r.setGeometryName(this.geometryName_):this.extractGeometryName_&&"geometry_name"in i!==void 0&&r.setGeometryName(i.geometry_name),r.setGeometry(n),"id"in i&&r.setId(i.id),i.properties&&r.setProperties(i.properties,!0),r}readFeaturesFromObject(t,e){let i=null;if("FeatureCollection"===t.type){i=[];const n=t.features;for(let t=0,r=n.length;t<r;++t)i.push(this.readFeatureFromObject(n[t],e))}else i=[this.readFeatureFromObject(t,e)];return i}readGeometryFromObject(t,e){return ee(t,e)}readProjectionFromObject(t){const e=t.crs;let i;return e?"name"==e.type?i=(0,nt.get)(e.properties.name):"EPSG"===e.type?i=(0,nt.get)("EPSG:"+e.properties.code):(0,p.h)(!1,36):i=this.dataProjection,i}writeFeatureObject(t,e){e=this.adaptOptions(e);const i={type:"Feature",geometry:null,properties:null},n=t.getId();if(void 0!==n&&(i.id=n),!t.hasProperties())return i;const r=t.getProperties(),s=t.getGeometry();return s&&(i.geometry=ie(s,e),delete r[t.getGeometryName()]),(0,C.x)(r)||(i.properties=r),i}writeFeaturesObject(t,e){e=this.adaptOptions(e);const i=[];for(let n=0,r=t.length;n<r;++n)i.push(this.writeFeatureObject(t[n],e));return{type:"FeatureCollection",features:i}}writeGeometryObject(t,e){return ie(t,this.adaptOptions(e))}};var re=i(8658),se=i(8458),oe=i(8738),ae=i(902),le=i(2371),he=i(2556),ue=i(4087),ce=i(7248);function de(t){return t&&t.__esModule&&Object.prototype.hasOwnProperty.call(t,"default")?t.default:t}var ge,pe={transparent:[0,0,0,0],aliceblue:[240,248,255,1],antiquewhite:[250,235,215,1],aqua:[0,255,255,1],aquamarine:[127,255,212,1],azure:[240,255,255,1],beige:[245,245,220,1],bisque:[255,228,196,1],black:[0,0,0,1],blanchedalmond:[255,235,205,1],blue:[0,0,255,1],blueviolet:[138,43,226,1],brown:[165,42,42,1],burlywood:[222,184,135,1],cadetblue:[95,158,160,1],chartreuse:[127,255,0,1],chocolate:[210,105,30,1],coral:[255,127,80,1],cornflowerblue:[100,149,237,1],cornsilk:[255,248,220,1],crimson:[220,20,60,1],cyan:[0,255,255,1],darkblue:[0,0,139,1],darkcyan:[0,139,139,1],darkgoldenrod:[184,134,11,1],darkgray:[169,169,169,1],darkgreen:[0,100,0,1],darkgrey:[169,169,169,1],darkkhaki:[189,183,107,1],darkmagenta:[139,0,139,1],darkolivegreen:[85,107,47,1],darkorange:[255,140,0,1],darkorchid:[153,50,204,1],darkred:[139,0,0,1],darksalmon:[233,150,122,1],darkseagreen:[143,188,143,1],darkslateblue:[72,61,139,1],darkslategray:[47,79,79,1],darkslategrey:[47,79,79,1],darkturquoise:[0,206,209,1],darkviolet:[148,0,211,1],deeppink:[255,20,147,1],deepskyblue:[0,191,255,1],dimgray:[105,105,105,1],dimgrey:[105,105,105,1],dodgerblue:[30,144,255,1],firebrick:[178,34,34,1],floralwhite:[255,250,240,1],forestgreen:[34,139,34,1],fuchsia:[255,0,255,1],gainsboro:[220,220,220,1],ghostwhite:[248,248,255,1],gold:[255,215,0,1],goldenrod:[218,165,32,1],gray:[128,128,128,1],green:[0,128,0,1],greenyellow:[173,255,47,1],grey:[128,128,128,1],honeydew:[240,255,240,1],hotpink:[255,105,180,1],indianred:[205,92,92,1],indigo:[75,0,130,1],ivory:[255,255,240,1],khaki:[240,230,140,1],lavender:[230,230,250,1],lavenderblush:[255,240,245,1],lawngreen:[124,252,0,1],lemonchiffon:[255,250,205,1],lightblue:[173,216,230,1],lightcoral:[240,128,128,1],lightcyan:[224,255,255,1],lightgoldenrodyellow:[250,250,210,1],lightgray:[211,211,211,1],lightgreen:[144,238,144,1],lightgrey:[211,211,211,1],lightpink:[255,182,193,1],lightsalmon:[255,160,122,1],lightseagreen:[32,178,170,1],lightskyblue:[135,206,250,1],lightslategray:[119,136,153,1],lightslategrey:[119,136,153,1],lightsteelblue:[176,196,222,1],lightyellow:[255,255,224,1],lime:[0,255,0,1],limegreen:[50,205,50,1],linen:[250,240,230,1],magenta:[255,0,255,1],maroon:[128,0,0,1],mediumaquamarine:[102,205,170,1],mediumblue:[0,0,205,1],mediumorchid:[186,85,211,1],mediumpurple:[147,112,219,1],mediumseagreen:[60,179,113,1],mediumslateblue:[123,104,238,1],mediumspringgreen:[0,250,154,1],mediumturquoise:[72,209,204,1],mediumvioletred:[199,21,133,1],midnightblue:[25,25,112,1],mintcream:[245,255,250,1],mistyrose:[255,228,225,1],moccasin:[255,228,181,1],navajowhite:[255,222,173,1],navy:[0,0,128,1],oldlace:[253,245,230,1],olive:[128,128,0,1],olivedrab:[107,142,35,1],orange:[255,165,0,1],orangered:[255,69,0,1],orchid:[218,112,214,1],palegoldenrod:[238,232,170,1],palegreen:[152,251,152,1],paleturquoise:[175,238,238,1],palevioletred:[219,112,147,1],papayawhip:[255,239,213,1],peachpuff:[255,218,185,1],peru:[205,133,63,1],pink:[255,192,203,1],plum:[221,160,221,1],powderblue:[176,224,230,1],purple:[128,0,128,1],rebeccapurple:[102,51,153,1],red:[255,0,0,1],rosybrown:[188,143,143,1],royalblue:[65,105,225,1],saddlebrown:[139,69,19,1],salmon:[250,128,114,1],sandybrown:[244,164,96,1],seagreen:[46,139,87,1],seashell:[255,245,238,1],sienna:[160,82,45,1],silver:[192,192,192,1],skyblue:[135,206,235,1],slateblue:[106,90,205,1],slategray:[112,128,144,1],slategrey:[112,128,144,1],snow:[255,250,250,1],springgreen:[0,255,127,1],steelblue:[70,130,180,1],tan:[210,180,140,1],teal:[0,128,128,1],thistle:[216,191,216,1],tomato:[255,99,71,1],turquoise:[64,224,208,1],violet:[238,130,238,1],wheat:[245,222,179,1],white:[255,255,255,1],whitesmoke:[245,245,245,1],yellow:[255,255,0,1],yellowgreen:[154,205,50,1]};function fe(t){return(t=Math.round(t))<0?0:t>255?255:t}function me(t){return t<0?0:t>1?1:t}function _e(t){return"%"===t[t.length-1]?fe(parseFloat(t)/100*255):fe(parseInt(t))}function ye(t){return"%"===t[t.length-1]?me(parseFloat(t)/100):me(parseFloat(t))}function ve(t,e,i){return i<0?i+=1:i>1&&(i-=1),6*i<1?t+(e-t)*i*6:2*i<1?e:3*i<2?t+(e-t)*(2/3-i)*6:t}try{ge={}.parseCSSColor=function(t){var e,i=t.replace(/ /g,"").toLowerCase();if(i in pe)return pe[i].slice();if("#"===i[0])return 4===i.length?(e=parseInt(i.substr(1),16))>=0&&e<=4095?[(3840&e)>>4|(3840&e)>>8,240&e|(240&e)>>4,15&e|(15&e)<<4,1]:null:7===i.length&&(e=parseInt(i.substr(1),16))>=0&&e<=16777215?[(16711680&e)>>16,(65280&e)>>8,255&e,1]:null;var n=i.indexOf("("),r=i.indexOf(")");if(-1!==n&&r+1===i.length){var s=i.substr(0,n),o=i.substr(n+1,r-(n+1)).split(","),a=1;switch(s){case"rgba":if(4!==o.length)return null;a=ye(o.pop());case"rgb":return 3!==o.length?null:[_e(o[0]),_e(o[1]),_e(o[2]),a];case"hsla":if(4!==o.length)return null;a=ye(o.pop());case"hsl":if(3!==o.length)return null;var l=(parseFloat(o[0])%360+360)%360/360,h=ye(o[1]),u=ye(o[2]),c=u<=.5?u*(h+1):u+h-u*h,d=2*u-c;return[fe(255*ve(d,c,l+1/3)),fe(255*ve(d,c,l)),fe(255*ve(d,c,l-1/3)),a];default:return null}}return null}}catch(t){}var xe=function(t,e,i,n){void 0===n&&(n=1),this.r=t,this.g=e,this.b=i,this.a=n};xe.parse=function(t){if(t){if(t instanceof xe)return t;if("string"==typeof t){var e=ge(t);if(e)return new xe(e[0]/255*e[3],e[1]/255*e[3],e[2]/255*e[3],e[3])}}},xe.prototype.toString=function(){var t=this.toArray(),e=t[0],i=t[1],n=t[2],r=t[3];return"rgba("+Math.round(e)+","+Math.round(i)+","+Math.round(n)+","+r+")"},xe.prototype.toArray=function(){var t=this,e=t.r,i=t.g,n=t.b,r=t.a;return 0===r?[0,0,0,0]:[255*e/r,255*i/r,255*n/r,r]},xe.prototype.toArray01=function(){var t=this,e=t.r,i=t.g,n=t.b,r=t.a;return 0===r?[0,0,0,0]:[e/r,i/r,n/r,r]},xe.prototype.toArray01PremultipliedAlpha=function(){var t=this;return[t.r,t.g,t.b,t.a]},xe.black=new xe(0,0,0,1),xe.white=new xe(1,1,1,1),xe.transparent=new xe(0,0,0,0),xe.red=new xe(1,0,0,1),xe.blue=new xe(0,0,1,1);var Ee=xe;function be(t){return"object"==typeof t?["literal",t]:t}function we(t){switch(t.colorSpace){case"hcl":return"interpolate-hcl";case"lab":return"interpolate-lab";default:return"interpolate"}}function Se(t,e){var i,n,r=be((i=t.default,n=e.default,void 0!==i?i:void 0!==n?n:void 0));return void 0===r&&"resolvedImage"===e.type?"":r}function Te(t,e,i){var n=Pe(t,e),r=["get",t.property];if("categorical"===n&&"boolean"==typeof i[0][0]){for(var s=["case"],o=0,a=i;o<a.length;o+=1){var l=a[o];s.push(["==",r,l[0]],l[1])}return s.push(Se(t,e)),s}if("categorical"===n){for(var h=["match",r],u=0,c=i;u<c.length;u+=1){var d=c[u];Re(h,d[0],d[1],!1)}return h.push(Se(t,e)),h}if("interval"===n){for(var g=["step",["number",r]],p=0,f=i;p<f.length;p+=1){var m=f[p];Re(g,m[0],m[1],!0)}return Ce(g),void 0===t.default?g:["case",["==",["typeof",r],"number"],g,be(t.default)]}if("exponential"===n){for(var _=void 0!==t.base?t.base:1,y=[we(t),1===_?["linear"]:["exponential",_],["number",r]],v=0,x=i;v<x.length;v+=1){var E=x[v];Re(y,E[0],E[1],!1)}return void 0===t.default?y:["case",["==",["typeof",r],"number"],y,be(t.default)]}throw new Error("Unknown property function type "+n)}function Ce(t){"step"===t[0]&&3===t.length&&(t.push(0),t.push(t[3]))}function Re(t,e,i,n){t.length>3&&e===t[t.length-2]||(n&&2===t.length||t.push(e),t.push(i))}function Pe(t,e){return t.type?t.type:e.expression.interpolated?"exponential":"interval"}function Ie(t){for(var e=["concat"],i=/{([^{}]+)}/g,n=0,r=i.exec(t);null!==r;r=i.exec(t)){var s=t.slice(n,i.lastIndex-r[0].length);n=i.lastIndex,s.length>0&&e.push(s),e.push(["get",r[1]])}if(1===e.length)return t;if(n<t.length)e.push(t.slice(n));else if(2===e.length)return["to-string",e[1]];return e}var Le=function(t){function e(e,i){t.call(this,i),this.message=i,this.key=e}return t&&(e.__proto__=t),e.prototype=Object.create(t&&t.prototype),e.prototype.constructor=e,e}(Error),Me=function(t,e){void 0===e&&(e=[]),this.parent=t,this.bindings={};for(var i=0,n=e;i<n.length;i+=1){var r=n[i],s=r[0],o=r[1];this.bindings[s]=o}};Me.prototype.concat=function(t){return new Me(this,t)},Me.prototype.get=function(t){if(this.bindings[t])return this.bindings[t];if(this.parent)return this.parent.get(t);throw new Error(t+" not found in scope.")},Me.prototype.has=function(t){return!!this.bindings[t]||!!this.parent&&this.parent.has(t)};var Fe=Me,Ae={kind:"null"},Ze={kind:"number"},De={kind:"string"},Oe={kind:"boolean"},ke={kind:"color"},Ge={kind:"object"},ze={kind:"value"},Ne={kind:"collator"},je={kind:"formatted"},Ue={kind:"resolvedImage"};function Be(t,e){return{kind:"array",itemType:t,N:e}}function Ve(t){if("array"===t.kind){var e=Ve(t.itemType);return"number"==typeof t.N?"array<"+e+", "+t.N+">":"value"===t.itemType.kind?"array":"array<"+e+">"}return t.kind}var qe=[Ae,Ze,De,Oe,ke,je,Ge,Be(ze),Ue];function We(t,e){if("error"===e.kind)return null;if("array"===t.kind){if("array"===e.kind&&(0===e.N&&"value"===e.itemType.kind||!We(t.itemType,e.itemType))&&("number"!=typeof t.N||t.N===e.N))return null}else{if(t.kind===e.kind)return null;if("value"===t.kind)for(var i=0,n=qe;i<n.length;i+=1)if(!We(n[i],e))return null}return"Expected "+Ve(t)+" but found "+Ve(e)+" instead."}function Xe(t,e){return e.some((function(e){return e.kind===t.kind}))}function He(t,e){return e.some((function(e){return"null"===e?null===t:"array"===e?Array.isArray(t):"object"===e?t&&!Array.isArray(t)&&"object"==typeof t:e===typeof t}))}var Ye=function(t,e,i){this.sensitivity=t?e?"variant":"case":e?"accent":"base",this.locale=i,this.collator=new Intl.Collator(this.locale?this.locale:[],{sensitivity:this.sensitivity,usage:"search"})};Ye.prototype.compare=function(t,e){return this.collator.compare(t,e)},Ye.prototype.resolvedLocale=function(){return new Intl.Collator(this.locale?this.locale:[]).resolvedOptions().locale};var Ke=Ye,$e=function(t,e,i,n,r){this.text=t.normalize?t.normalize():t,this.image=e,this.scale=i,this.fontStack=n,this.textColor=r},Je=function(t){this.sections=t};Je.fromString=function(t){return new Je([new $e(t,null,null,null,null)])},Je.prototype.isEmpty=function(){return 0===this.sections.length||!this.sections.some((function(t){return 0!==t.text.length||t.image&&0!==t.image.name.length}))},Je.factory=function(t){return t instanceof Je?t:Je.fromString(t)},Je.prototype.toString=function(){return 0===this.sections.length?"":this.sections.map((function(t){return t.text})).join("")},Je.prototype.serialize=function(){for(var t=["format"],e=0,i=this.sections;e<i.length;e+=1){var n=i[e];if(n.image)t.push(["image",n.image.name]);else{t.push(n.text);var r={};n.fontStack&&(r["text-font"]=["literal",n.fontStack.split(",")]),n.scale&&(r["font-scale"]=n.scale),n.textColor&&(r["text-color"]=["rgba"].concat(n.textColor.toArray())),t.push(r)}}return t};var Qe=Je,ti=function(t){this.name=t.name,this.available=t.available};ti.prototype.toString=function(){return this.name},ti.fromString=function(t){return t?new ti({name:t,available:!1}):null},ti.prototype.serialize=function(){return["image",this.name]};var ei=ti;function ii(t,e,i,n){return"number"==typeof t&&t>=0&&t<=255&&"number"==typeof e&&e>=0&&e<=255&&"number"==typeof i&&i>=0&&i<=255?void 0===n||"number"==typeof n&&n>=0&&n<=1?null:"Invalid rgba value ["+[t,e,i,n].join(", ")+"]: 'a' must be between 0 and 1.":"Invalid rgba value ["+("number"==typeof n?[t,e,i,n]:[t,e,i]).join(", ")+"]: 'r', 'g', and 'b' must be between 0 and 255."}function ni(t){if(null===t)return!0;if("string"==typeof t)return!0;if("boolean"==typeof t)return!0;if("number"==typeof t)return!0;if(t instanceof Ee)return!0;if(t instanceof Ke)return!0;if(t instanceof Qe)return!0;if(t instanceof ei)return!0;if(Array.isArray(t)){for(var e=0,i=t;e<i.length;e+=1)if(!ni(i[e]))return!1;return!0}if("object"==typeof t){for(var n in t)if(!ni(t[n]))return!1;return!0}return!1}function ri(t){if(null===t)return Ae;if("string"==typeof t)return De;if("boolean"==typeof t)return Oe;if("number"==typeof t)return Ze;if(t instanceof Ee)return ke;if(t instanceof Ke)return Ne;if(t instanceof Qe)return je;if(t instanceof ei)return Ue;if(Array.isArray(t)){for(var e,i=t.length,n=0,r=t;n<r.length;n+=1){var s=ri(r[n]);if(e){if(e===s)continue;e=ze;break}e=s}return Be(e||ze,i)}return Ge}function si(t){var e=typeof t;return null===t?"":"string"===e||"number"===e||"boolean"===e?String(t):t instanceof Ee||t instanceof Qe||t instanceof ei?t.toString():JSON.stringify(t)}var oi=function(t,e){this.type=t,this.value=e};oi.parse=function(t,e){if(2!==t.length)return e.error("'literal' expression requires exactly one argument, but found "+(t.length-1)+" instead.");if(!ni(t[1]))return e.error("invalid value");var i=t[1],n=ri(i),r=e.expectedType;return"array"!==n.kind||0!==n.N||!r||"array"!==r.kind||"number"==typeof r.N&&0!==r.N||(n=r),new oi(n,i)},oi.prototype.evaluate=function(){return this.value},oi.prototype.eachChild=function(){},oi.prototype.outputDefined=function(){return!0},oi.prototype.serialize=function(){return"array"===this.type.kind||"object"===this.type.kind?["literal",this.value]:this.value instanceof Ee?["rgba"].concat(this.value.toArray()):this.value instanceof Qe?this.value.serialize():this.value};var ai=oi,li=function(t){this.name="ExpressionEvaluationError",this.message=t};li.prototype.toJSON=function(){return this.message};var hi=li,ui={string:De,number:Ze,boolean:Oe,object:Ge},ci=function(t,e){this.type=t,this.args=e};ci.parse=function(t,e){if(t.length<2)return e.error("Expected at least one argument.");var i,n=1,r=t[0];if("array"===r){var s,o;if(t.length>2){var a=t[1];if("string"!=typeof a||!(a in ui)||"object"===a)return e.error('The item type argument of "array" must be one of string, number, boolean',1);s=ui[a],n++}else s=ze;if(t.length>3){if(null!==t[2]&&("number"!=typeof t[2]||t[2]<0||t[2]!==Math.floor(t[2])))return e.error('The length argument to "array" must be a positive integer literal',2);o=t[2],n++}i=Be(s,o)}else i=ui[r];for(var l=[];n<t.length;n++){var h=e.parse(t[n],n,ze);if(!h)return null;l.push(h)}return new ci(i,l)},ci.prototype.evaluate=function(t){for(var e=0;e<this.args.length;e++){var i=this.args[e].evaluate(t);if(!We(this.type,ri(i)))return i;if(e===this.args.length-1)throw new hi("Expected value to be of type "+Ve(this.type)+", but found "+Ve(ri(i))+" instead.")}return null},ci.prototype.eachChild=function(t){this.args.forEach(t)},ci.prototype.outputDefined=function(){return this.args.every((function(t){return t.outputDefined()}))},ci.prototype.serialize=function(){var t=this.type,e=[t.kind];if("array"===t.kind){var i=t.itemType;if("string"===i.kind||"number"===i.kind||"boolean"===i.kind){e.push(i.kind);var n=t.N;("number"==typeof n||this.args.length>1)&&e.push(n)}}return e.concat(this.args.map((function(t){return t.serialize()})))};var di=ci,gi=function(t){this.type=je,this.sections=t};gi.parse=function(t,e){if(t.length<2)return e.error("Expected at least one argument.");var i=t[1];if(!Array.isArray(i)&&"object"==typeof i)return e.error("First argument must be an image or text section.");for(var n=[],r=!1,s=1;s<=t.length-1;++s){var o=t[s];if(r&&"object"==typeof o&&!Array.isArray(o)){r=!1;var a=null;if(o["font-scale"]&&!(a=e.parse(o["font-scale"],1,Ze)))return null;var l=null;if(o["text-font"]&&!(l=e.parse(o["text-font"],1,Be(De))))return null;var h=null;if(o["text-color"]&&!(h=e.parse(o["text-color"],1,ke)))return null;var u=n[n.length-1];u.scale=a,u.font=l,u.textColor=h}else{var c=e.parse(t[s],1,ze);if(!c)return null;var d=c.type.kind;if("string"!==d&&"value"!==d&&"null"!==d&&"resolvedImage"!==d)return e.error("Formatted text type must be 'string', 'value', 'image' or 'null'.");r=!0,n.push({content:c,scale:null,font:null,textColor:null})}}return new gi(n)},gi.prototype.evaluate=function(t){return new Qe(this.sections.map((function(e){var i=e.content.evaluate(t);return ri(i)===Ue?new $e("",i,null,null,null):new $e(si(i),null,e.scale?e.scale.evaluate(t):null,e.font?e.font.evaluate(t).join(","):null,e.textColor?e.textColor.evaluate(t):null)})))},gi.prototype.eachChild=function(t){for(var e=0,i=this.sections;e<i.length;e+=1){var n=i[e];t(n.content),n.scale&&t(n.scale),n.font&&t(n.font),n.textColor&&t(n.textColor)}},gi.prototype.outputDefined=function(){return!1},gi.prototype.serialize=function(){for(var t=["format"],e=0,i=this.sections;e<i.length;e+=1){var n=i[e];t.push(n.content.serialize());var r={};n.scale&&(r["font-scale"]=n.scale.serialize()),n.font&&(r["text-font"]=n.font.serialize()),n.textColor&&(r["text-color"]=n.textColor.serialize()),t.push(r)}return t};var pi=gi,fi=function(t){this.type=Ue,this.input=t};fi.parse=function(t,e){if(2!==t.length)return e.error("Expected two arguments.");var i=e.parse(t[1],1,De);return i?new fi(i):e.error("No image name provided.")},fi.prototype.evaluate=function(t){var e=this.input.evaluate(t),i=ei.fromString(e);return i&&t.availableImages&&(i.available=t.availableImages.indexOf(e)>-1),i},fi.prototype.eachChild=function(t){t(this.input)},fi.prototype.outputDefined=function(){return!1},fi.prototype.serialize=function(){return["image",this.input.serialize()]};var mi=fi,_i={"to-boolean":Oe,"to-color":ke,"to-number":Ze,"to-string":De},yi=function(t,e){this.type=t,this.args=e};yi.parse=function(t,e){if(t.length<2)return e.error("Expected at least one argument.");var i=t[0];if(("to-boolean"===i||"to-string"===i)&&2!==t.length)return e.error("Expected one argument.");for(var n=_i[i],r=[],s=1;s<t.length;s++){var o=e.parse(t[s],s,ze);if(!o)return null;r.push(o)}return new yi(n,r)},yi.prototype.evaluate=function(t){if("boolean"===this.type.kind)return Boolean(this.args[0].evaluate(t));if("color"===this.type.kind){for(var e,i,n=0,r=this.args;n<r.length;n+=1){if(i=null,(e=r[n].evaluate(t))instanceof Ee)return e;if("string"==typeof e){var s=t.parseColor(e);if(s)return s}else if(Array.isArray(e)&&!(i=e.length<3||e.length>4?"Invalid rbga value "+JSON.stringify(e)+": expected an array containing either three or four numeric values.":ii(e[0],e[1],e[2],e[3])))return new Ee(e[0]/255,e[1]/255,e[2]/255,e[3])}throw new hi(i||"Could not parse color from value '"+("string"==typeof e?e:String(JSON.stringify(e)))+"'")}if("number"===this.type.kind){for(var o=null,a=0,l=this.args;a<l.length;a+=1){if(null===(o=l[a].evaluate(t)))return 0;var h=Number(o);if(!isNaN(h))return h}throw new hi("Could not convert "+JSON.stringify(o)+" to number.")}return"formatted"===this.type.kind?Qe.fromString(si(this.args[0].evaluate(t))):"resolvedImage"===this.type.kind?ei.fromString(si(this.args[0].evaluate(t))):si(this.args[0].evaluate(t))},yi.prototype.eachChild=function(t){this.args.forEach(t)},yi.prototype.outputDefined=function(){return this.args.every((function(t){return t.outputDefined()}))},yi.prototype.serialize=function(){if("formatted"===this.type.kind)return new pi([{content:this.args[0],scale:null,font:null,textColor:null}]).serialize();if("resolvedImage"===this.type.kind)return new mi(this.args[0]).serialize();var t=["to-"+this.type.kind];return this.eachChild((function(e){t.push(e.serialize())})),t};var vi=yi,xi=["Unknown","Point","LineString","Polygon"],Ei=function(){this.globals=null,this.feature=null,this.featureState=null,this.formattedSection=null,this._parseColorCache={},this.availableImages=null,this.canonical=null,this.featureTileCoord=null,this.featureDistanceData=null};Ei.prototype.id=function(){return this.feature&&void 0!==this.feature.id?this.feature.id:null},Ei.prototype.geometryType=function(){return this.feature?"number"==typeof this.feature.type?xi[this.feature.type]:this.feature.type:null},Ei.prototype.geometry=function(){return this.feature&&"geometry"in this.feature?this.feature.geometry:null},Ei.prototype.canonicalID=function(){return this.canonical},Ei.prototype.properties=function(){return this.feature&&this.feature.properties||{}},Ei.prototype.distanceFromCenter=function(){if(this.featureTileCoord&&this.featureDistanceData){var t=this.featureDistanceData.center,e=this.featureDistanceData.scale,i=this.featureTileCoord,n=i.x,r=i.y,s=n*e-t[0],o=r*e-t[1];return this.featureDistanceData.bearing[0]*s+this.featureDistanceData.bearing[1]*o}return 0},Ei.prototype.parseColor=function(t){var e=this._parseColorCache[t];return e||(e=this._parseColorCache[t]=Ee.parse(t)),e};var bi=Ei,wi=function(t,e,i,n){this.name=t,this.type=e,this._evaluate=i,this.args=n};wi.prototype.evaluate=function(t){return this._evaluate(t,this.args)},wi.prototype.eachChild=function(t){this.args.forEach(t)},wi.prototype.outputDefined=function(){return!1},wi.prototype.serialize=function(){return[this.name].concat(this.args.map((function(t){return t.serialize()})))},wi.parse=function(t,e){var i,n=t[0],r=wi.definitions[n];if(!r)return e.error('Unknown expression "'+n+'". If you wanted a literal array, use ["literal", [...]].',0);for(var s=Array.isArray(r)?r[0]:r.type,o=Array.isArray(r)?[[r[1],r[2]]]:r.overloads,a=o.filter((function(e){var i=e[0];return!Array.isArray(i)||i.length===t.length-1})),l=null,h=0,u=a;h<u.length;h+=1){var c=u[h],d=c[0],g=c[1];l=new $i(e.registry,e.path,null,e.scope);for(var p=[],f=!1,m=1;m<t.length;m++){var _=t[m],y=Array.isArray(d)?d[m-1]:d.type,v=l.parse(_,1+p.length,y);if(!v){f=!0;break}p.push(v)}if(!f)if(Array.isArray(d)&&d.length!==p.length)l.error("Expected "+d.length+" arguments, but found "+p.length+" instead.");else{for(var x=0;x<p.length;x++){var E=Array.isArray(d)?d[x]:d.type,b=p[x];l.concat(x+1).checkSubtype(E,b.type)}if(0===l.errors.length)return new wi(n,s,g,p)}}if(1===a.length)(i=e.errors).push.apply(i,l.errors);else{for(var w=(a.length?a:o).map((function(t){var e;return e=t[0],Array.isArray(e)?"("+e.map(Ve).join(", ")+")":"("+Ve(e.type)+"...)"})).join(" | "),S=[],T=1;T<t.length;T++){var C=e.parse(t[T],1+S.length);if(!C)return null;S.push(Ve(C.type))}e.error("Expected arguments of type "+w+", but found ("+S.join(", ")+") instead.")}return null},wi.register=function(t,e){for(var i in wi.definitions=e,e)t[i]=wi};var Si=wi,Ti=function(t,e,i){this.type=Ne,this.locale=i,this.caseSensitive=t,this.diacriticSensitive=e};Ti.parse=function(t,e){if(2!==t.length)return e.error("Expected one argument.");var i=t[1];if("object"!=typeof i||Array.isArray(i))return e.error("Collator options argument must be an object.");var n=e.parse(void 0!==i["case-sensitive"]&&i["case-sensitive"],1,Oe);if(!n)return null;var r=e.parse(void 0!==i["diacritic-sensitive"]&&i["diacritic-sensitive"],1,Oe);if(!r)return null;var s=null;return i.locale&&!(s=e.parse(i.locale,1,De))?null:new Ti(n,r,s)},Ti.prototype.evaluate=function(t){return new Ke(this.caseSensitive.evaluate(t),this.diacriticSensitive.evaluate(t),this.locale?this.locale.evaluate(t):null)},Ti.prototype.eachChild=function(t){t(this.caseSensitive),t(this.diacriticSensitive),this.locale&&t(this.locale)},Ti.prototype.outputDefined=function(){return!1},Ti.prototype.serialize=function(){var t={};return t["case-sensitive"]=this.caseSensitive.serialize(),t["diacritic-sensitive"]=this.diacriticSensitive.serialize(),this.locale&&(t.locale=this.locale.serialize()),["collator",t]};var Ci=Ti,Ri=8192;function Pi(t,e){t[0]=Math.min(t[0],e[0]),t[1]=Math.min(t[1],e[1]),t[2]=Math.max(t[2],e[0]),t[3]=Math.max(t[3],e[1])}function Ii(t,e){return!(t[0]<=e[0]||t[2]>=e[2]||t[1]<=e[1]||t[3]>=e[3])}function Li(t,e){var i,n=(180+t[0])/360,r=(i=t[1],(180-180/Math.PI*Math.log(Math.tan(Math.PI/4+i*Math.PI/360)))/360),s=Math.pow(2,e.z);return[Math.round(n*s*Ri),Math.round(r*s*Ri)]}function Mi(t,e,i){return e[1]>t[1]!=i[1]>t[1]&&t[0]<(i[0]-e[0])*(t[1]-e[1])/(i[1]-e[1])+e[0]}function Fi(t,e){for(var i,n,r,s,o,a,l,h=!1,u=0,c=e.length;u<c;u++)for(var d=e[u],g=0,p=d.length;g<p-1;g++){if(i=t,n=d[g],r=d[g+1],void 0,void 0,void 0,void 0,s=i[0]-n[0],o=i[1]-n[1],a=i[0]-r[0],s*(l=i[1]-r[1])-a*o==0&&s*a<=0&&o*l<=0)return!1;Mi(t,d[g],d[g+1])&&(h=!h)}return h}function Ai(t,e){for(var i=0;i<e.length;i++)if(Fi(t,e[i]))return!0;return!1}function Zi(t,e,i,n){var r=t[0]-i[0],s=t[1]-i[1],o=e[0]-i[0],a=e[1]-i[1],l=n[0]-i[0],h=n[1]-i[1],u=r*h-l*s,c=o*h-l*a;return u>0&&c<0||u<0&&c>0}function Di(t,e,i){for(var n=0,r=i;n<r.length;n+=1)for(var s=r[n],o=0;o<s.length-1;++o)if(a=t,l=e,h=s[o],u=s[o+1],void 0,void 0,void 0,void 0,g=[l[0]-a[0],l[1]-a[1]],0!=(c=[u[0]-h[0],u[1]-h[1]])[0]*(d=g)[1]-c[1]*d[0]&&Zi(a,l,h,u)&&Zi(h,u,a,l))return!0;var a,l,h,u,c,d,g;return!1}function Oi(t,e){for(var i=0;i<t.length;++i)if(!Fi(t[i],e))return!1;for(var n=0;n<t.length-1;++n)if(Di(t[n],t[n+1],e))return!1;return!0}function ki(t,e){for(var i=0;i<e.length;i++)if(Oi(t,e[i]))return!0;return!1}function Gi(t,e,i){for(var n=[],r=0;r<t.length;r++){for(var s=[],o=0;o<t[r].length;o++){var a=Li(t[r][o],i);Pi(e,a),s.push(a)}n.push(s)}return n}function zi(t,e,i){for(var n=[],r=0;r<t.length;r++){var s=Gi(t[r],e,i);n.push(s)}return n}function Ni(t,e,i,n){if(t[0]<i[0]||t[0]>i[2]){var r=.5*n,s=t[0]-i[0]>r?-n:i[0]-t[0]>r?n:0;0===s&&(s=t[0]-i[2]>r?-n:i[2]-t[0]>r?n:0),t[0]+=s}Pi(e,t)}function ji(t,e,i,n){var r=Math.pow(2,n.z)*Ri,s=[n.x*Ri,n.y*Ri],o=[];if(!t)return o;for(var a=0,l=t;a<l.length;a+=1)for(var h=0,u=l[a];h<u.length;h+=1){var c=u[h],d=[c.x+s[0],c.y+s[1]];Ni(d,e,i,r),o.push(d)}return o}function Ui(t,e,i,n){var r,s=Math.pow(2,n.z)*Ri,o=[n.x*Ri,n.y*Ri],a=[];if(!t)return a;for(var l=0,h=t;l<h.length;l+=1){for(var u=[],c=0,d=h[l];c<d.length;c+=1){var g=d[c],p=[g.x+o[0],g.y+o[1]];Pi(e,p),u.push(p)}a.push(u)}if(e[2]-e[0]<=s/2){(r=e)[0]=r[1]=1/0,r[2]=r[3]=-1/0;for(var f=0,m=a;f<m.length;f+=1)for(var _=0,y=m[f];_<y.length;_+=1)Ni(y[_],e,i,s)}return a}var Bi=function(t,e){this.type=Oe,this.geojson=t,this.geometries=e};Bi.parse=function(t,e){if(2!==t.length)return e.error("'within' expression requires exactly one argument, but found "+(t.length-1)+" instead.");if(ni(t[1])){var i=t[1];if("FeatureCollection"===i.type)for(var n=0;n<i.features.length;++n){var r=i.features[n].geometry.type;if("Polygon"===r||"MultiPolygon"===r)return new Bi(i,i.features[n].geometry)}else if("Feature"===i.type){var s=i.geometry.type;if("Polygon"===s||"MultiPolygon"===s)return new Bi(i,i.geometry)}else if("Polygon"===i.type||"MultiPolygon"===i.type)return new Bi(i,i)}return e.error("'within' expression requires valid geojson object that contains polygon geometry type.")},Bi.prototype.evaluate=function(t){if(null!=t.geometry()&&null!=t.canonicalID()){if("Point"===t.geometryType())return function(t,e){var i=[1/0,1/0,-1/0,-1/0],n=[1/0,1/0,-1/0,-1/0],r=t.canonicalID();if(!r)return!1;if("Polygon"===e.type){var s=Gi(e.coordinates,n,r),o=ji(t.geometry(),i,n,r);if(!Ii(i,n))return!1;for(var a=0,l=o;a<l.length;a+=1)if(!Fi(l[a],s))return!1}if("MultiPolygon"===e.type){var h=zi(e.coordinates,n,r),u=ji(t.geometry(),i,n,r);if(!Ii(i,n))return!1;for(var c=0,d=u;c<d.length;c+=1)if(!Ai(d[c],h))return!1}return!0}(t,this.geometries);if("LineString"===t.geometryType())return function(t,e){var i=[1/0,1/0,-1/0,-1/0],n=[1/0,1/0,-1/0,-1/0],r=t.canonicalID();if(!r)return!1;if("Polygon"===e.type){var s=Gi(e.coordinates,n,r),o=Ui(t.geometry(),i,n,r);if(!Ii(i,n))return!1;for(var a=0,l=o;a<l.length;a+=1)if(!Oi(l[a],s))return!1}if("MultiPolygon"===e.type){var h=zi(e.coordinates,n,r),u=Ui(t.geometry(),i,n,r);if(!Ii(i,n))return!1;for(var c=0,d=u;c<d.length;c+=1)if(!ki(d[c],h))return!1}return!0}(t,this.geometries)}return!1},Bi.prototype.eachChild=function(){},Bi.prototype.outputDefined=function(){return!0},Bi.prototype.serialize=function(){return["within",this.geojson]};var Vi=Bi;function qi(t){if(t instanceof Si){if("get"===t.name&&1===t.args.length)return!1;if("feature-state"===t.name)return!1;if("has"===t.name&&1===t.args.length)return!1;if("properties"===t.name||"geometry-type"===t.name||"id"===t.name)return!1;if(/^filter-/.test(t.name))return!1}if(t instanceof Vi)return!1;var e=!0;return t.eachChild((function(t){e&&!qi(t)&&(e=!1)})),e}function Wi(t){if(t instanceof Si&&"feature-state"===t.name)return!1;var e=!0;return t.eachChild((function(t){e&&!Wi(t)&&(e=!1)})),e}function Xi(t,e){if(t instanceof Si&&e.indexOf(t.name)>=0)return!1;var i=!0;return t.eachChild((function(t){i&&!Xi(t,e)&&(i=!1)})),i}var Hi=function(t,e){this.type=e.type,this.name=t,this.boundExpression=e};Hi.parse=function(t,e){if(2!==t.length||"string"!=typeof t[1])return e.error("'var' expression requires exactly one string literal argument.");var i=t[1];return e.scope.has(i)?new Hi(i,e.scope.get(i)):e.error('Unknown variable "'+i+'". Make sure "'+i+'" has been bound in an enclosing "let" expression before using it.',1)},Hi.prototype.evaluate=function(t){return this.boundExpression.evaluate(t)},Hi.prototype.eachChild=function(){},Hi.prototype.outputDefined=function(){return!1},Hi.prototype.serialize=function(){return["var",this.name]};var Yi=Hi,Ki=function(t,e,i,n,r){void 0===e&&(e=[]),void 0===n&&(n=new Fe),void 0===r&&(r=[]),this.registry=t,this.path=e,this.key=e.map((function(t){return"["+t+"]"})).join(""),this.scope=n,this.errors=r,this.expectedType=i};Ki.prototype.parse=function(t,e,i,n,r){return void 0===r&&(r={}),e?this.concat(e,i,n)._parse(t,r):this._parse(t,r)},Ki.prototype._parse=function(t,e){function i(t,e,i){return"assert"===i?new di(e,[t]):"coerce"===i?new vi(e,[t]):t}if(null!==t&&"string"!=typeof t&&"boolean"!=typeof t&&"number"!=typeof t||(t=["literal",t]),Array.isArray(t)){if(0===t.length)return this.error('Expected an array with at least one element. If you wanted a literal array, use ["literal", []].');var n=t[0];if("string"!=typeof n)return this.error("Expression name must be a string, but found "+typeof n+' instead. If you wanted a literal array, use ["literal", [...]].',0),null;var r=this.registry[n];if(r){var s=r.parse(t,this);if(!s)return null;if(this.expectedType){var o=this.expectedType,a=s.type;if("string"!==o.kind&&"number"!==o.kind&&"boolean"!==o.kind&&"object"!==o.kind&&"array"!==o.kind||"value"!==a.kind)if("color"!==o.kind&&"formatted"!==o.kind&&"resolvedImage"!==o.kind||"value"!==a.kind&&"string"!==a.kind){if(this.checkSubtype(o,a))return null}else s=i(s,o,e.typeAnnotation||"coerce");else s=i(s,o,e.typeAnnotation||"assert")}if(!(s instanceof ai)&&"resolvedImage"!==s.type.kind&&Ji(s)){var l=new bi;try{s=new ai(s.type,s.evaluate(l))}catch(t){return this.error(t.message),null}}return s}return this.error('Unknown expression "'+n+'". If you wanted a literal array, use ["literal", [...]].',0)}return void 0===t?this.error("'undefined' value invalid. Use null instead."):"object"==typeof t?this.error('Bare objects invalid. Use ["literal", {...}] instead.'):this.error("Expected an array, but found "+typeof t+" instead.")},Ki.prototype.concat=function(t,e,i){var n="number"==typeof t?this.path.concat(t):this.path,r=i?this.scope.concat(i):this.scope;return new Ki(this.registry,n,e||null,r,this.errors)},Ki.prototype.error=function(t){for(var e=[],i=arguments.length-1;i-- >0;)e[i]=arguments[i+1];var n=""+this.key+e.map((function(t){return"["+t+"]"})).join("");this.errors.push(new Le(n,t))},Ki.prototype.checkSubtype=function(t,e){var i=We(t,e);return i&&this.error(i),i};var $i=Ki;function Ji(t){if(t instanceof Yi)return Ji(t.boundExpression);if(t instanceof Si&&"error"===t.name)return!1;if(t instanceof Ci)return!1;if(t instanceof Vi)return!1;var e=t instanceof vi||t instanceof di,i=!0;return t.eachChild((function(t){i=e?i&&Ji(t):i&&t instanceof ai})),!!i&&qi(t)&&Xi(t,["zoom","heatmap-density","line-progress","sky-radial-progress","accumulated","is-supported-script","pitch","distance-from-center"])}function Qi(t,e){for(var i,n,r=t.length-1,s=0,o=r,a=0;s<=o;)if(i=t[a=Math.floor((s+o)/2)],n=t[a+1],i<=e){if(a===r||e<n)return a;s=a+1}else{if(!(i>e))throw new hi("Input is not a number.");o=a-1}return 0}var tn=function(t,e,i){this.type=t,this.input=e,this.labels=[],this.outputs=[];for(var n=0,r=i;n<r.length;n+=1){var s=r[n],o=s[0],a=s[1];this.labels.push(o),this.outputs.push(a)}};tn.parse=function(t,e){if(t.length-1<4)return e.error("Expected at least 4 arguments, but found only "+(t.length-1)+".");if((t.length-1)%2!=0)return e.error("Expected an even number of arguments.");var i=e.parse(t[1],1,Ze);if(!i)return null;var n=[],r=null;e.expectedType&&"value"!==e.expectedType.kind&&(r=e.expectedType);for(var s=1;s<t.length;s+=2){var o=1===s?-1/0:t[s],a=t[s+1],l=s,h=s+1;if("number"!=typeof o)return e.error('Input/output pairs for "step" expressions must be defined using literal numeric values (not computed expressions) for the input values.',l);if(n.length&&n[n.length-1][0]>=o)return e.error('Input/output pairs for "step" expressions must be arranged with input values in strictly ascending order.',l);var u=e.parse(a,h,r);if(!u)return null;r=r||u.type,n.push([o,u])}return new tn(r,i,n)},tn.prototype.evaluate=function(t){var e=this.labels,i=this.outputs;if(1===e.length)return i[0].evaluate(t);var n=this.input.evaluate(t);if(n<=e[0])return i[0].evaluate(t);var r=e.length;return n>=e[r-1]?i[r-1].evaluate(t):i[Qi(e,n)].evaluate(t)},tn.prototype.eachChild=function(t){t(this.input);for(var e=0,i=this.outputs;e<i.length;e+=1)t(i[e])},tn.prototype.outputDefined=function(){return this.outputs.every((function(t){return t.outputDefined()}))},tn.prototype.serialize=function(){for(var t=["step",this.input.serialize()],e=0;e<this.labels.length;e++)e>0&&t.push(this.labels[e]),t.push(this.outputs[e].serialize());return t};var en=tn,nn=rn;function rn(t,e,i,n){this.cx=3*t,this.bx=3*(i-t)-this.cx,this.ax=1-this.cx-this.bx,this.cy=3*e,this.by=3*(n-e)-this.cy,this.ay=1-this.cy-this.by,this.p1x=t,this.p1y=n,this.p2x=i,this.p2y=n}rn.prototype.sampleCurveX=function(t){return((this.ax*t+this.bx)*t+this.cx)*t},rn.prototype.sampleCurveY=function(t){return((this.ay*t+this.by)*t+this.cy)*t},rn.prototype.sampleCurveDerivativeX=function(t){return(3*this.ax*t+2*this.bx)*t+this.cx},rn.prototype.solveCurveX=function(t,e){var i,n,r,s,o;for(void 0===e&&(e=1e-6),r=t,o=0;o<8;o++){if(s=this.sampleCurveX(r)-t,Math.abs(s)<e)return r;var a=this.sampleCurveDerivativeX(r);if(Math.abs(a)<1e-6)break;r-=s/a}if((r=t)<(i=0))return i;if(r>(n=1))return n;for(;i<n;){if(s=this.sampleCurveX(r),Math.abs(s-t)<e)return r;t>s?i=r:n=r,r=.5*(n-i)+i}return r},rn.prototype.solve=function(t,e){return this.sampleCurveY(this.solveCurveX(t,e))};var sn=de(nn);function on(t,e,i){return t*(1-i)+e*i}var an=Object.freeze({__proto__:null,number:on,color:function(t,e,i){return new Ee(on(t.r,e.r,i),on(t.g,e.g,i),on(t.b,e.b,i),on(t.a,e.a,i))},array:function(t,e,i){return t.map((function(t,n){return on(t,e[n],i)}))}}),ln=.95047,hn=1.08883,un=4/29,cn=6/29,dn=3*cn*cn,gn=Math.PI/180,pn=180/Math.PI;function fn(t){return t>.008856451679035631?Math.pow(t,1/3):t/dn+un}function mn(t){return t>cn?t*t*t:dn*(t-un)}function _n(t){return 255*(t<=.0031308?12.92*t:1.055*Math.pow(t,1/2.4)-.055)}function yn(t){return(t/=255)<=.04045?t/12.92:Math.pow((t+.055)/1.055,2.4)}function vn(t){var e=yn(t.r),i=yn(t.g),n=yn(t.b),r=fn((.4124564*e+.3575761*i+.1804375*n)/ln),s=fn((.2126729*e+.7151522*i+.072175*n)/1);return{l:116*s-16,a:500*(r-s),b:200*(s-fn((.0193339*e+.119192*i+.9503041*n)/hn)),alpha:t.a}}function xn(t){var e=(t.l+16)/116,i=isNaN(t.a)?e:e+t.a/500,n=isNaN(t.b)?e:e-t.b/200;return e=1*mn(e),i=ln*mn(i),n=hn*mn(n),new Ee(_n(3.2404542*i-1.5371385*e-.4985314*n),_n(-.969266*i+1.8760108*e+.041556*n),_n(.0556434*i-.2040259*e+1.0572252*n),t.alpha)}function En(t,e,i){var n=e-t;return t+i*(n>180||n<-180?n-360*Math.round(n/360):n)}var bn={forward:vn,reverse:xn,interpolate:function(t,e,i){return{l:on(t.l,e.l,i),a:on(t.a,e.a,i),b:on(t.b,e.b,i),alpha:on(t.alpha,e.alpha,i)}}},wn=function(t){var e=vn(t),i=e.l,n=e.a,r=e.b,s=Math.atan2(r,n)*pn;return{h:s<0?s+360:s,c:Math.sqrt(n*n+r*r),l:i,alpha:t.a}},Sn=function(t){var e=t.h*gn,i=t.c;return xn({l:t.l,a:Math.cos(e)*i,b:Math.sin(e)*i,alpha:t.alpha})},Tn=function(t,e,i){return{h:En(t.h,e.h,i),c:on(t.c,e.c,i),l:on(t.l,e.l,i),alpha:on(t.alpha,e.alpha,i)}},Cn=function(t,e,i,n,r){this.type=t,this.operator=e,this.interpolation=i,this.input=n,this.labels=[],this.outputs=[];for(var s=0,o=r;s<o.length;s+=1){var a=o[s],l=a[0],h=a[1];this.labels.push(l),this.outputs.push(h)}};function Rn(t,e,i,n){var r=n-i,s=t-i;return 0===r?0:1===e?s/r:(Math.pow(e,s)-1)/(Math.pow(e,r)-1)}Cn.interpolationFactor=function(t,e,i,n){var r=0;if("exponential"===t.name)r=Rn(e,t.base,i,n);else if("linear"===t.name)r=Rn(e,1,i,n);else if("cubic-bezier"===t.name){var s=t.controlPoints;r=new sn(s[0],s[1],s[2],s[3]).solve(Rn(e,1,i,n))}return r},Cn.parse=function(t,e){var i=t[0],n=t[1],r=t[2],s=t.slice(3);if(!Array.isArray(n)||0===n.length)return e.error("Expected an interpolation type expression.",1);if("linear"===n[0])n={name:"linear"};else if("exponential"===n[0]){var o=n[1];if("number"!=typeof o)return e.error("Exponential interpolation requires a numeric base.",1,1);n={name:"exponential",base:o}}else{if("cubic-bezier"!==n[0])return e.error("Unknown interpolation type "+String(n[0]),1,0);var a=n.slice(1);if(4!==a.length||a.some((function(t){return"number"!=typeof t||t<0||t>1})))return e.error("Cubic bezier interpolation requires four numeric arguments with values between 0 and 1.",1);n={name:"cubic-bezier",controlPoints:a}}if(t.length-1<4)return e.error("Expected at least 4 arguments, but found only "+(t.length-1)+".");if((t.length-1)%2!=0)return e.error("Expected an even number of arguments.");if(!(r=e.parse(r,2,Ze)))return null;var l=[],h=null;"interpolate-hcl"===i||"interpolate-lab"===i?h=ke:e.expectedType&&"value"!==e.expectedType.kind&&(h=e.expectedType);for(var u=0;u<s.length;u+=2){var c=s[u],d=s[u+1],g=u+3,p=u+4;if("number"!=typeof c)return e.error('Input/output pairs for "interpolate" expressions must be defined using literal numeric values (not computed expressions) for the input values.',g);if(l.length&&l[l.length-1][0]>=c)return e.error('Input/output pairs for "interpolate" expressions must be arranged with input values in strictly ascending order.',g);var f=e.parse(d,p,h);if(!f)return null;h=h||f.type,l.push([c,f])}return"number"===h.kind||"color"===h.kind||"array"===h.kind&&"number"===h.itemType.kind&&"number"==typeof h.N?new Cn(h,i,n,r,l):e.error("Type "+Ve(h)+" is not interpolatable.")},Cn.prototype.evaluate=function(t){var e=this.labels,i=this.outputs;if(1===e.length)return i[0].evaluate(t);var n=this.input.evaluate(t);if(n<=e[0])return i[0].evaluate(t);var r=e.length;if(n>=e[r-1])return i[r-1].evaluate(t);var s=Qi(e,n),o=e[s],a=e[s+1],l=Cn.interpolationFactor(this.interpolation,n,o,a),h=i[s].evaluate(t),u=i[s+1].evaluate(t);return"interpolate"===this.operator?an[this.type.kind.toLowerCase()](h,u,l):"interpolate-hcl"===this.operator?Sn(Tn(wn(h),wn(u),l)):bn.reverse(bn.interpolate(bn.forward(h),bn.forward(u),l))},Cn.prototype.eachChild=function(t){t(this.input);for(var e=0,i=this.outputs;e<i.length;e+=1)t(i[e])},Cn.prototype.outputDefined=function(){return this.outputs.every((function(t){return t.outputDefined()}))},Cn.prototype.serialize=function(){var t;t="linear"===this.interpolation.name?["linear"]:"exponential"===this.interpolation.name?1===this.interpolation.base?["linear"]:["exponential",this.interpolation.base]:["cubic-bezier"].concat(this.interpolation.controlPoints);for(var e=[this.operator,t,this.input.serialize()],i=0;i<this.labels.length;i++)e.push(this.labels[i],this.outputs[i].serialize());return e};var Pn=Cn,In=function(t,e){this.type=t,this.args=e};In.parse=function(t,e){if(t.length<2)return e.error("Expectected at least one argument.");var i=null,n=e.expectedType;n&&"value"!==n.kind&&(i=n);for(var r=[],s=0,o=t.slice(1);s<o.length;s+=1){var a=o[s],l=e.parse(a,1+r.length,i,void 0,{typeAnnotation:"omit"});if(!l)return null;i=i||l.type,r.push(l)}var h=n&&r.some((function(t){return We(n,t.type)}));return new In(h?ze:i,r)},In.prototype.evaluate=function(t){for(var e,i=null,n=0,r=0,s=this.args;r<s.length;r+=1){if(n++,(i=s[r].evaluate(t))&&i instanceof ei&&!i.available&&(e||(e=i),i=null,n===this.args.length))return e;if(null!==i)break}return i},In.prototype.eachChild=function(t){this.args.forEach(t)},In.prototype.outputDefined=function(){return this.args.every((function(t){return t.outputDefined()}))},In.prototype.serialize=function(){var t=["coalesce"];return this.eachChild((function(e){t.push(e.serialize())})),t};var Ln=In,Mn=function(t,e){this.type=e.type,this.bindings=[].concat(t),this.result=e};Mn.prototype.evaluate=function(t){return this.result.evaluate(t)},Mn.prototype.eachChild=function(t){for(var e=0,i=this.bindings;e<i.length;e+=1)t(i[e][1]);t(this.result)},Mn.parse=function(t,e){if(t.length<4)return e.error("Expected at least 3 arguments, but found "+(t.length-1)+" instead.");for(var i=[],n=1;n<t.length-1;n+=2){var r=t[n];if("string"!=typeof r)return e.error("Expected string, but found "+typeof r+" instead.",n);if(/[^a-zA-Z0-9_]/.test(r))return e.error("Variable names must contain only alphanumeric characters or '_'.",n);var s=e.parse(t[n+1],n+1);if(!s)return null;i.push([r,s])}var o=e.parse(t[t.length-1],t.length-1,e.expectedType,i);return o?new Mn(i,o):null},Mn.prototype.outputDefined=function(){return this.result.outputDefined()},Mn.prototype.serialize=function(){for(var t=["let"],e=0,i=this.bindings;e<i.length;e+=1){var n=i[e],r=n[0],s=n[1];t.push(r,s.serialize())}return t.push(this.result.serialize()),t};var Fn=Mn,An=function(t,e,i){this.type=t,this.index=e,this.input=i};An.parse=function(t,e){if(3!==t.length)return e.error("Expected 2 arguments, but found "+(t.length-1)+" instead.");var i=e.parse(t[1],1,Ze),n=e.parse(t[2],2,Be(e.expectedType||ze));if(!i||!n)return null;var r=n.type;return new An(r.itemType,i,n)},An.prototype.evaluate=function(t){var e=this.index.evaluate(t),i=this.input.evaluate(t);if(e<0)throw new hi("Array index out of bounds: "+e+" < 0.");if(e>=i.length)throw new hi("Array index out of bounds: "+e+" > "+(i.length-1)+".");if(e!==Math.floor(e))throw new hi("Array index must be an integer, but found "+e+" instead.");return i[e]},An.prototype.eachChild=function(t){t(this.index),t(this.input)},An.prototype.outputDefined=function(){return!1},An.prototype.serialize=function(){return["at",this.index.serialize(),this.input.serialize()]};var Zn=An,Dn=function(t,e){this.type=Oe,this.needle=t,this.haystack=e};Dn.parse=function(t,e){if(3!==t.length)return e.error("Expected 2 arguments, but found "+(t.length-1)+" instead.");var i=e.parse(t[1],1,ze),n=e.parse(t[2],2,ze);return i&&n?Xe(i.type,[Oe,De,Ze,Ae,ze])?new Dn(i,n):e.error("Expected first argument to be of type boolean, string, number or null, but found "+Ve(i.type)+" instead"):null},Dn.prototype.evaluate=function(t){var e=this.needle.evaluate(t),i=this.haystack.evaluate(t);if(null==i)return!1;if(!He(e,["boolean","string","number","null"]))throw new hi("Expected first argument to be of type boolean, string, number or null, but found "+Ve(ri(e))+" instead.");if(!He(i,["string","array"]))throw new hi("Expected second argument to be of type array or string, but found "+Ve(ri(i))+" instead.");return i.indexOf(e)>=0},Dn.prototype.eachChild=function(t){t(this.needle),t(this.haystack)},Dn.prototype.outputDefined=function(){return!0},Dn.prototype.serialize=function(){return["in",this.needle.serialize(),this.haystack.serialize()]};var On=Dn,kn=function(t,e,i){this.type=Ze,this.needle=t,this.haystack=e,this.fromIndex=i};kn.parse=function(t,e){if(t.length<=2||t.length>=5)return e.error("Expected 3 or 4 arguments, but found "+(t.length-1)+" instead.");var i=e.parse(t[1],1,ze),n=e.parse(t[2],2,ze);if(!i||!n)return null;if(!Xe(i.type,[Oe,De,Ze,Ae,ze]))return e.error("Expected first argument to be of type boolean, string, number or null, but found "+Ve(i.type)+" instead");if(4===t.length){var r=e.parse(t[3],3,Ze);return r?new kn(i,n,r):null}return new kn(i,n)},kn.prototype.evaluate=function(t){var e=this.needle.evaluate(t),i=this.haystack.evaluate(t);if(!He(e,["boolean","string","number","null"]))throw new hi("Expected first argument to be of type boolean, string, number or null, but found "+Ve(ri(e))+" instead.");if(!He(i,["string","array"]))throw new hi("Expected second argument to be of type array or string, but found "+Ve(ri(i))+" instead.");if(this.fromIndex){var n=this.fromIndex.evaluate(t);return i.indexOf(e,n)}return i.indexOf(e)},kn.prototype.eachChild=function(t){t(this.needle),t(this.haystack),this.fromIndex&&t(this.fromIndex)},kn.prototype.outputDefined=function(){return!1},kn.prototype.serialize=function(){if(null!=this.fromIndex&&void 0!==this.fromIndex){var t=this.fromIndex.serialize();return["index-of",this.needle.serialize(),this.haystack.serialize(),t]}return["index-of",this.needle.serialize(),this.haystack.serialize()]};var Gn=kn,zn=function(t,e,i,n,r,s){this.inputType=t,this.type=e,this.input=i,this.cases=n,this.outputs=r,this.otherwise=s};zn.parse=function(t,e){if(t.length<5)return e.error("Expected at least 4 arguments, but found only "+(t.length-1)+".");if(t.length%2!=1)return e.error("Expected an even number of arguments.");var i,n;e.expectedType&&"value"!==e.expectedType.kind&&(n=e.expectedType);for(var r={},s=[],o=2;o<t.length-1;o+=2){var a=t[o],l=t[o+1];Array.isArray(a)||(a=[a]);var h=e.concat(o);if(0===a.length)return h.error("Expected at least one branch label.");for(var u=0,c=a;u<c.length;u+=1){var d=c[u];if("number"!=typeof d&&"string"!=typeof d)return h.error("Branch labels must be numbers or strings.");if("number"==typeof d&&Math.abs(d)>Number.MAX_SAFE_INTEGER)return h.error("Branch labels must be integers no larger than "+Number.MAX_SAFE_INTEGER+".");if("number"==typeof d&&Math.floor(d)!==d)return h.error("Numeric branch labels must be integer values.");if(i){if(h.checkSubtype(i,ri(d)))return null}else i=ri(d);if(void 0!==r[String(d)])return h.error("Branch labels must be unique.");r[String(d)]=s.length}var g=e.parse(l,o,n);if(!g)return null;n=n||g.type,s.push(g)}var p=e.parse(t[1],1,ze);if(!p)return null;var f=e.parse(t[t.length-1],t.length-1,n);return f?"value"!==p.type.kind&&e.concat(1).checkSubtype(i,p.type)?null:new zn(i,n,p,r,s,f):null},zn.prototype.evaluate=function(t){var e=this.input.evaluate(t);return(ri(e)===this.inputType&&this.outputs[this.cases[e]]||this.otherwise).evaluate(t)},zn.prototype.eachChild=function(t){t(this.input),this.outputs.forEach(t),t(this.otherwise)},zn.prototype.outputDefined=function(){return this.outputs.every((function(t){return t.outputDefined()}))&&this.otherwise.outputDefined()},zn.prototype.serialize=function(){for(var t=this,e=["match",this.input.serialize()],i=[],n={},r=0,s=Object.keys(this.cases).sort();r<s.length;r+=1){var o=s[r];void 0===(c=n[this.cases[o]])?(n[this.cases[o]]=i.length,i.push([this.cases[o],[o]])):i[c][1].push(o)}for(var a=function(e){return"number"===t.inputType.kind?Number(e):e},l=0,h=i;l<h.length;l+=1){var u=h[l],c=u[0],d=u[1];1===d.length?e.push(a(d[0])):e.push(d.map(a)),e.push(this.outputs[outputIndex$1].serialize())}return e.push(this.otherwise.serialize()),e};var Nn=zn,jn=function(t,e,i){this.type=t,this.branches=e,this.otherwise=i};jn.parse=function(t,e){if(t.length<4)return e.error("Expected at least 3 arguments, but found only "+(t.length-1)+".");if(t.length%2!=0)return e.error("Expected an odd number of arguments.");var i;e.expectedType&&"value"!==e.expectedType.kind&&(i=e.expectedType);for(var n=[],r=1;r<t.length-1;r+=2){var s=e.parse(t[r],r,Oe);if(!s)return null;var o=e.parse(t[r+1],r+1,i);if(!o)return null;n.push([s,o]),i=i||o.type}var a=e.parse(t[t.length-1],t.length-1,i);return a?new jn(i,n,a):null},jn.prototype.evaluate=function(t){for(var e=0,i=this.branches;e<i.length;e+=1){var n=i[e],r=n[0],s=n[1];if(r.evaluate(t))return s.evaluate(t)}return this.otherwise.evaluate(t)},jn.prototype.eachChild=function(t){for(var e=0,i=this.branches;e<i.length;e+=1){var n=i[e],r=n[0],s=n[1];t(r),t(s)}t(this.otherwise)},jn.prototype.outputDefined=function(){return this.branches.every((function(t){return t[0],t[1].outputDefined()}))&&this.otherwise.outputDefined()},jn.prototype.serialize=function(){var t=["case"];return this.eachChild((function(e){t.push(e.serialize())})),t};var Un=jn,Bn=function(t,e,i,n){this.type=t,this.input=e,this.beginIndex=i,this.endIndex=n};Bn.parse=function(t,e){if(t.length<=2||t.length>=5)return e.error("Expected 3 or 4 arguments, but found "+(t.length-1)+" instead.");var i=e.parse(t[1],1,ze),n=e.parse(t[2],2,Ze);if(!i||!n)return null;if(!Xe(i.type,[Be(ze),De,ze]))return e.error("Expected first argument to be of type array or string, but found "+Ve(i.type)+" instead");if(4===t.length){var r=e.parse(t[3],3,Ze);return r?new Bn(i.type,i,n,r):null}return new Bn(i.type,i,n)},Bn.prototype.evaluate=function(t){var e=this.input.evaluate(t),i=this.beginIndex.evaluate(t);if(!He(e,["string","array"]))throw new hi("Expected first argument to be of type array or string, but found "+Ve(ri(e))+" instead.");if(this.endIndex){var n=this.endIndex.evaluate(t);return e.slice(i,n)}return e.slice(i)},Bn.prototype.eachChild=function(t){t(this.input),t(this.beginIndex),this.endIndex&&t(this.endIndex)},Bn.prototype.outputDefined=function(){return!1},Bn.prototype.serialize=function(){if(null!=this.endIndex&&void 0!==this.endIndex){var t=this.endIndex.serialize();return["slice",this.input.serialize(),this.beginIndex.serialize(),t]}return["slice",this.input.serialize(),this.beginIndex.serialize()]};var Vn=Bn;function qn(t,e){return"=="===t||"!="===t?"boolean"===e.kind||"string"===e.kind||"number"===e.kind||"null"===e.kind||"value"===e.kind:"string"===e.kind||"number"===e.kind||"value"===e.kind}function Wn(t,e,i,n){return 0===n.compare(e,i)}function Xn(t,e,i){var n="=="!==t&&"!="!==t;return function(){function r(t,e,i){this.type=Oe,this.lhs=t,this.rhs=e,this.collator=i,this.hasUntypedArgument="value"===t.type.kind||"value"===e.type.kind}return r.parse=function(t,e){if(3!==t.length&&4!==t.length)return e.error("Expected two or three arguments.");var i=t[0],s=e.parse(t[1],1,ze);if(!s)return null;if(!qn(i,s.type))return e.concat(1).error('"'+i+"\" comparisons are not supported for type '"+Ve(s.type)+"'.");var o=e.parse(t[2],2,ze);if(!o)return null;if(!qn(i,o.type))return e.concat(2).error('"'+i+"\" comparisons are not supported for type '"+Ve(o.type)+"'.");if(s.type.kind!==o.type.kind&&"value"!==s.type.kind&&"value"!==o.type.kind)return e.error("Cannot compare types '"+Ve(s.type)+"' and '"+Ve(o.type)+"'.");n&&("value"===s.type.kind&&"value"!==o.type.kind?s=new di(o.type,[s]):"value"!==s.type.kind&&"value"===o.type.kind&&(o=new di(s.type,[o])));var a=null;if(4===t.length){if("string"!==s.type.kind&&"string"!==o.type.kind&&"value"!==s.type.kind&&"value"!==o.type.kind)return e.error("Cannot use collator to compare non-string types.");if(!(a=e.parse(t[3],3,Ne)))return null}return new r(s,o,a)},r.prototype.evaluate=function(r){var s=this.lhs.evaluate(r),o=this.rhs.evaluate(r);if(n&&this.hasUntypedArgument){var a=ri(s),l=ri(o);if(a.kind!==l.kind||"string"!==a.kind&&"number"!==a.kind)throw new hi('Expected arguments for "'+t+'" to be (string, string) or (number, number), but found ('+a.kind+", "+l.kind+") instead.")}if(this.collator&&!n&&this.hasUntypedArgument){var h=ri(s),u=ri(o);if("string"!==h.kind||"string"!==u.kind)return e(r,s,o)}return this.collator?i(r,s,o,this.collator.evaluate(r)):e(r,s,o)},r.prototype.eachChild=function(t){t(this.lhs),t(this.rhs),this.collator&&t(this.collator)},r.prototype.outputDefined=function(){return!0},r.prototype.serialize=function(){var e=[t];return this.eachChild((function(t){e.push(t.serialize())})),e},r}()}var Hn=Xn("==",(function(t,e,i){return e===i}),Wn),Yn=Xn("!=",(function(t,e,i){return e!==i}),(function(t,e,i,n){return!Wn(0,e,i,n)})),Kn=Xn("<",(function(t,e,i){return e<i}),(function(t,e,i,n){return n.compare(e,i)<0})),$n=Xn(">",(function(t,e,i){return e>i}),(function(t,e,i,n){return n.compare(e,i)>0})),Jn=Xn("<=",(function(t,e,i){return e<=i}),(function(t,e,i,n){return n.compare(e,i)<=0})),Qn=Xn(">=",(function(t,e,i){return e>=i}),(function(t,e,i,n){return n.compare(e,i)>=0})),tr=function(t,e,i,n,r,s){this.type=De,this.number=t,this.locale=e,this.currency=i,this.unit=n,this.minFractionDigits=r,this.maxFractionDigits=s};tr.parse=function(t,e){if(3!==t.length)return e.error("Expected two arguments.");var i=e.parse(t[1],1,Ze);if(!i)return null;var n=t[2];if("object"!=typeof n||Array.isArray(n))return e.error("NumberFormat options argument must be an object.");var r=null;if(n.locale&&!(r=e.parse(n.locale,1,De)))return null;var s=null;if(n.currency&&!(s=e.parse(n.currency,1,De)))return null;var o=null;if(n.unit&&!(o=e.parse(n.unit,1,De)))return null;var a=null;if(n["min-fraction-digits"]&&!(a=e.parse(n["min-fraction-digits"],1,Ze)))return null;var l=null;return n["max-fraction-digits"]&&!(l=e.parse(n["max-fraction-digits"],1,Ze))?null:new tr(i,r,s,o,a,l)},tr.prototype.evaluate=function(t){return new Intl.NumberFormat(this.locale?this.locale.evaluate(t):[],{style:(this.currency?"currency":this.unit&&"unit")||"decimal",currency:this.currency?this.currency.evaluate(t):void 0,unit:this.unit?this.unit.evaluate(t):void 0,minimumFractionDigits:this.minFractionDigits?this.minFractionDigits.evaluate(t):void 0,maximumFractionDigits:this.maxFractionDigits?this.maxFractionDigits.evaluate(t):void 0}).format(this.number.evaluate(t))},tr.prototype.eachChild=function(t){t(this.number),this.locale&&t(this.locale),this.currency&&t(this.currency),this.unit&&t(this.unit),this.minFractionDigits&&t(this.minFractionDigits),this.maxFractionDigits&&t(this.maxFractionDigits)},tr.prototype.outputDefined=function(){return!1},tr.prototype.serialize=function(){var t={};return this.locale&&(t.locale=this.locale.serialize()),this.currency&&(t.currency=this.currency.serialize()),this.unit&&(t.unit=this.unit.serialize()),this.minFractionDigits&&(t["min-fraction-digits"]=this.minFractionDigits.serialize()),this.maxFractionDigits&&(t["max-fraction-digits"]=this.maxFractionDigits.serialize()),["number-format",this.number.serialize(),t]};var er=tr,ir=function(t){this.type=Ze,this.input=t};ir.parse=function(t,e){if(2!==t.length)return e.error("Expected 1 argument, but found "+(t.length-1)+" instead.");var i=e.parse(t[1],1);return i?"array"!==i.type.kind&&"string"!==i.type.kind&&"value"!==i.type.kind?e.error("Expected argument of type string or array, but found "+Ve(i.type)+" instead."):new ir(i):null},ir.prototype.evaluate=function(t){var e=this.input.evaluate(t);if("string"==typeof e)return e.length;if(Array.isArray(e))return e.length;throw new hi("Expected value to be of type string or array, but found "+Ve(ri(e))+" instead.")},ir.prototype.eachChild=function(t){t(this.input)},ir.prototype.outputDefined=function(){return!1},ir.prototype.serialize=function(){var t=["length"];return this.eachChild((function(e){t.push(e.serialize())})),t};var nr={"==":Hn,"!=":Yn,">":$n,"<":Kn,">=":Qn,"<=":Jn,array:di,at:Zn,boolean:di,case:Un,coalesce:Ln,collator:Ci,format:pi,image:mi,in:On,"index-of":Gn,interpolate:Pn,"interpolate-hcl":Pn,"interpolate-lab":Pn,length:ir,let:Fn,literal:ai,match:Nn,number:di,"number-format":er,object:di,slice:Vn,step:en,string:di,"to-boolean":vi,"to-color":vi,"to-number":vi,"to-string":vi,var:Yi,within:Vi};function rr(t,e){var i=e[0],n=e[1],r=e[2],s=e[3];i=i.evaluate(t),n=n.evaluate(t),r=r.evaluate(t);var o=s?s.evaluate(t):1,a=ii(i,n,r,o);if(a)throw new hi(a);return new Ee(i/255*o,n/255*o,r/255*o,o)}function sr(t,e){return t in e}function or(t,e){var i=e[t];return void 0===i?null:i}function ar(t){return{type:t}}Si.register(nr,{error:[{kind:"error"},[De],function(t,e){var i=e[0];throw new hi(i.evaluate(t))}],typeof:[De,[ze],function(t,e){return Ve(ri(e[0].evaluate(t)))}],"to-rgba":[Be(Ze,4),[ke],function(t,e){return e[0].evaluate(t).toArray()}],rgb:[ke,[Ze,Ze,Ze],rr],rgba:[ke,[Ze,Ze,Ze,Ze],rr],has:{type:Oe,overloads:[[[De],function(t,e){return sr(e[0].evaluate(t),t.properties())}],[[De,Ge],function(t,e){var i=e[0],n=e[1];return sr(i.evaluate(t),n.evaluate(t))}]]},get:{type:ze,overloads:[[[De],function(t,e){return or(e[0].evaluate(t),t.properties())}],[[De,Ge],function(t,e){var i=e[0],n=e[1];return or(i.evaluate(t),n.evaluate(t))}]]},"feature-state":[ze,[De],function(t,e){return or(e[0].evaluate(t),t.featureState||{})}],properties:[Ge,[],function(t){return t.properties()}],"geometry-type":[De,[],function(t){return t.geometryType()}],id:[ze,[],function(t){return t.id()}],zoom:[Ze,[],function(t){return t.globals.zoom}],pitch:[Ze,[],function(t){return t.globals.pitch||0}],"distance-from-center":[Ze,[],function(t){return t.distanceFromCenter()}],"heatmap-density":[Ze,[],function(t){return t.globals.heatmapDensity||0}],"line-progress":[Ze,[],function(t){return t.globals.lineProgress||0}],"sky-radial-progress":[Ze,[],function(t){return t.globals.skyRadialProgress||0}],accumulated:[ze,[],function(t){return void 0===t.globals.accumulated?null:t.globals.accumulated}],"+":[Ze,ar(Ze),function(t,e){for(var i=0,n=0,r=e;n<r.length;n+=1)i+=r[n].evaluate(t);return i}],"*":[Ze,ar(Ze),function(t,e){for(var i=1,n=0,r=e;n<r.length;n+=1)i*=r[n].evaluate(t);return i}],"-":{type:Ze,overloads:[[[Ze,Ze],function(t,e){var i=e[0],n=e[1];return i.evaluate(t)-n.evaluate(t)}],[[Ze],function(t,e){return-e[0].evaluate(t)}]]},"/":[Ze,[Ze,Ze],function(t,e){var i=e[0],n=e[1];return i.evaluate(t)/n.evaluate(t)}],"%":[Ze,[Ze,Ze],function(t,e){var i=e[0],n=e[1];return i.evaluate(t)%n.evaluate(t)}],ln2:[Ze,[],function(){return Math.LN2}],pi:[Ze,[],function(){return Math.PI}],e:[Ze,[],function(){return Math.E}],"^":[Ze,[Ze,Ze],function(t,e){var i=e[0],n=e[1];return Math.pow(i.evaluate(t),n.evaluate(t))}],sqrt:[Ze,[Ze],function(t,e){var i=e[0];return Math.sqrt(i.evaluate(t))}],log10:[Ze,[Ze],function(t,e){var i=e[0];return Math.log(i.evaluate(t))/Math.LN10}],ln:[Ze,[Ze],function(t,e){var i=e[0];return Math.log(i.evaluate(t))}],log2:[Ze,[Ze],function(t,e){var i=e[0];return Math.log(i.evaluate(t))/Math.LN2}],sin:[Ze,[Ze],function(t,e){var i=e[0];return Math.sin(i.evaluate(t))}],cos:[Ze,[Ze],function(t,e){var i=e[0];return Math.cos(i.evaluate(t))}],tan:[Ze,[Ze],function(t,e){var i=e[0];return Math.tan(i.evaluate(t))}],asin:[Ze,[Ze],function(t,e){var i=e[0];return Math.asin(i.evaluate(t))}],acos:[Ze,[Ze],function(t,e){var i=e[0];return Math.acos(i.evaluate(t))}],atan:[Ze,[Ze],function(t,e){var i=e[0];return Math.atan(i.evaluate(t))}],min:[Ze,ar(Ze),function(t,e){return Math.min.apply(Math,e.map((function(e){return e.evaluate(t)})))}],max:[Ze,ar(Ze),function(t,e){return Math.max.apply(Math,e.map((function(e){return e.evaluate(t)})))}],abs:[Ze,[Ze],function(t,e){var i=e[0];return Math.abs(i.evaluate(t))}],round:[Ze,[Ze],function(t,e){var i=e[0].evaluate(t);return i<0?-Math.round(-i):Math.round(i)}],floor:[Ze,[Ze],function(t,e){var i=e[0];return Math.floor(i.evaluate(t))}],ceil:[Ze,[Ze],function(t,e){var i=e[0];return Math.ceil(i.evaluate(t))}],"filter-==":[Oe,[De,ze],function(t,e){var i=e[0],n=e[1];return t.properties()[i.value]===n.value}],"filter-id-==":[Oe,[ze],function(t,e){var i=e[0];return t.id()===i.value}],"filter-type-==":[Oe,[De],function(t,e){var i=e[0];return t.geometryType()===i.value}],"filter-<":[Oe,[De,ze],function(t,e){var i=e[0],n=e[1],r=t.properties()[i.value],s=n.value;return typeof r==typeof s&&r<s}],"filter-id-<":[Oe,[ze],function(t,e){var i=e[0],n=t.id(),r=i.value;return typeof n==typeof r&&n<r}],"filter->":[Oe,[De,ze],function(t,e){var i=e[0],n=e[1],r=t.properties()[i.value],s=n.value;return typeof r==typeof s&&r>s}],"filter-id->":[Oe,[ze],function(t,e){var i=e[0],n=t.id(),r=i.value;return typeof n==typeof r&&n>r}],"filter-<=":[Oe,[De,ze],function(t,e){var i=e[0],n=e[1],r=t.properties()[i.value],s=n.value;return typeof r==typeof s&&r<=s}],"filter-id-<=":[Oe,[ze],function(t,e){var i=e[0],n=t.id(),r=i.value;return typeof n==typeof r&&n<=r}],"filter->=":[Oe,[De,ze],function(t,e){var i=e[0],n=e[1],r=t.properties()[i.value],s=n.value;return typeof r==typeof s&&r>=s}],"filter-id->=":[Oe,[ze],function(t,e){var i=e[0],n=t.id(),r=i.value;return typeof n==typeof r&&n>=r}],"filter-has":[Oe,[ze],function(t,e){return e[0].value in t.properties()}],"filter-has-id":[Oe,[],function(t){return null!==t.id()&&void 0!==t.id()}],"filter-type-in":[Oe,[Be(De)],function(t,e){return e[0].value.indexOf(t.geometryType())>=0}],"filter-id-in":[Oe,[Be(ze)],function(t,e){return e[0].value.indexOf(t.id())>=0}],"filter-in-small":[Oe,[De,Be(ze)],function(t,e){var i=e[0];return e[1].value.indexOf(t.properties()[i.value])>=0}],"filter-in-large":[Oe,[De,Be(ze)],function(t,e){var i=e[0],n=e[1];return function(t,e,i,n){for(;i<=n;){var r=i+n>>1;if(e[r]===t)return!0;e[r]>t?n=r-1:i=r+1}return!1}(t.properties()[i.value],n.value,0,n.value.length-1)}],all:{type:Oe,overloads:[[[Oe,Oe],function(t,e){var i=e[0],n=e[1];return i.evaluate(t)&&n.evaluate(t)}],[ar(Oe),function(t,e){for(var i=0,n=e;i<n.length;i+=1)if(!n[i].evaluate(t))return!1;return!0}]]},any:{type:Oe,overloads:[[[Oe,Oe],function(t,e){var i=e[0],n=e[1];return i.evaluate(t)||n.evaluate(t)}],[ar(Oe),function(t,e){for(var i=0,n=e;i<n.length;i+=1)if(n[i].evaluate(t))return!0;return!1}]]},"!":[Oe,[Oe],function(t,e){return!e[0].evaluate(t)}],"is-supported-script":[Oe,[De],function(t,e){var i=e[0],n=t.globals&&t.globals.isSupportedScript;return!n||n(i.evaluate(t))}],upcase:[De,[De],function(t,e){return e[0].evaluate(t).toUpperCase()}],downcase:[De,[De],function(t,e){return e[0].evaluate(t).toLowerCase()}],concat:[De,ar(ze),function(t,e){return e.map((function(e){return si(e.evaluate(t))})).join("")}],"resolved-locale":[De,[Ne],function(t,e){return e[0].evaluate(t).resolvedLocale()}]});var lr=nr;function hr(t){return{result:"success",value:t}}function ur(t){return{result:"error",value:t}}function cr(t){return"object"==typeof t&&null!==t&&!Array.isArray(t)}var dr=function(t,e){this.expression=t,this._warningHistory={},this._evaluator=new bi,this._defaultValue=e?function(t){return"color"===t.type&&(cr(t.default)||Array.isArray(t.default))?new Ee(0,0,0,0):"color"===t.type?Ee.parse(t.default)||null:void 0===t.default?null:t.default}(e):null,this._enumValues=e&&"enum"===e.type?e.values:null};function gr(t,e){var i=new $i(lr,[],e?function(t){var e={color:ke,string:De,number:Ze,enum:De,boolean:Oe,formatted:je,resolvedImage:Ue};return"array"===t.type?Be(e[t.value]||ze,t.length):e[t.type]}(e):void 0),n=i.parse(t,void 0,void 0,void 0,e&&"string"===e.type?{typeAnnotation:"coerce"}:void 0);return n?hr(new dr(n,e)):ur(i.errors)}dr.prototype.evaluateWithoutErrorHandling=function(t,e,i,n,r,s,o,a){return this._evaluator.globals=t,this._evaluator.feature=e,this._evaluator.featureState=i,this._evaluator.canonical=n||null,this._evaluator.availableImages=r||null,this._evaluator.formattedSection=s,this._evaluator.featureTileCoord=o||null,this._evaluator.featureDistanceData=a||null,this.expression.evaluate(this._evaluator)},dr.prototype.evaluate=function(t,e,i,n,r,s,o,a){this._evaluator.globals=t,this._evaluator.feature=e||null,this._evaluator.featureState=i||null,this._evaluator.canonical=n||null,this._evaluator.availableImages=r||null,this._evaluator.formattedSection=s||null,this._evaluator.featureTileCoord=o||null,this._evaluator.featureDistanceData=a||null;try{var l=this.expression.evaluate(this._evaluator);if(null==l||"number"==typeof l&&l!=l)return this._defaultValue;if(this._enumValues&&!(l in this._enumValues))throw new hi("Expected value to be one of "+Object.keys(this._enumValues).map((function(t){return JSON.stringify(t)})).join(", ")+", but found "+JSON.stringify(l)+" instead.");return l}catch(t){return this._warningHistory[t.message]||(this._warningHistory[t.message]=!0,"undefined"!=typeof console&&console.warn(t.message)),this._defaultValue}};var pr=function(t,e){this.kind=t,this._styleExpression=e,this.isStateDependent="constant"!==t&&!Wi(e.expression)};pr.prototype.evaluateWithoutErrorHandling=function(t,e,i,n,r,s){return this._styleExpression.evaluateWithoutErrorHandling(t,e,i,n,r,s)},pr.prototype.evaluate=function(t,e,i,n,r,s){return this._styleExpression.evaluate(t,e,i,n,r,s)};var fr=function(t,e,i,n){this.kind=t,this.zoomStops=i,this._styleExpression=e,this.isStateDependent="camera"!==t&&!Wi(e.expression),this.interpolationType=n};function mr(t,e){if("error"===(t=gr(t,e)).result)return t;var i=t.value.expression,n=qi(i);if(!n&&!function(t){return"data-driven"===t["property-type"]}(e))return ur([new Le("","data expressions not supported")]);var r=Xi(i,["zoom","pitch","distance-from-center"]);if(!r&&!function(t){return!!t.expression&&t.expression.parameters.indexOf("zoom")>-1}(e))return ur([new Le("","zoom expressions not supported")]);var s=_r(i);if(!s&&!r)return ur([new Le("",'"zoom" expression may only be used as input to a top-level "step" or "interpolate" expression.')]);if(s instanceof Le)return ur([s]);if(s instanceof Pn&&!function(t){return!!t.expression&&t.expression.interpolated}(e))return ur([new Le("",'"interpolate" expressions cannot be used with this property')]);if(!s)return hr(new pr(n?"constant":"source",t.value));var o=s instanceof Pn?s.interpolation:void 0;return hr(new fr(n?"camera":"composite",t.value,s.labels,o))}function _r(t){var e=null;if(t instanceof Fn)e=_r(t.result);else if(t instanceof Ln)for(var i=0,n=t.args;i<n.length;i+=1){var r=n[i];if(e=_r(r))break}else(t instanceof en||t instanceof Pn)&&t.input instanceof Si&&"zoom"===t.input.name&&(e=t);return e instanceof Le||t.eachChild((function(t){var i=_r(t);i instanceof Le?e=i:!e&&i?e=new Le("",'"zoom" expression may only be used as input to a top-level "step" or "interpolate" expression.'):e&&i&&e!==i&&(e=new Le("",'Only one zoom-based "step" or "interpolate" subexpression may be used in an expression.'))})),e}function yr(t){if(Array.isArray(t))return t.map(yr);if(t instanceof Object&&!(t instanceof Number||t instanceof String||t instanceof Boolean)){var e={};for(var i in t)e[i]=yr(t[i]);return e}return function(t){return t instanceof Number||t instanceof String||t instanceof Boolean?t.valueOf():t}(t)}fr.prototype.evaluateWithoutErrorHandling=function(t,e,i,n,r,s){return this._styleExpression.evaluateWithoutErrorHandling(t,e,i,n,r,s)},fr.prototype.evaluate=function(t,e,i,n,r,s){return this._styleExpression.evaluate(t,e,i,n,r,s)},fr.prototype.interpolationFactor=function(t,e,i){return this.interpolationType?Pn.interpolationFactor(this.interpolationType,t,e,i):0};var vr={$version:8,$root:{version:{required:!0,type:"enum",values:[8]},name:{type:"string"},metadata:{type:"*"},center:{type:"array",value:"number"},zoom:{type:"number"},bearing:{type:"number",default:0,period:360,units:"degrees"},pitch:{type:"number",default:0,units:"degrees"},light:{type:"light"},terrain:{type:"terrain"},fog:{type:"fog"},sources:{required:!0,type:"sources"},sprite:{type:"string"},glyphs:{type:"string"},transition:{type:"transition"},projection:{type:"projection"},layers:{required:!0,type:"array",value:"layer"}},sources:{"*":{type:"source"}},source:["source_vector","source_raster","source_raster_dem","source_geojson","source_video","source_image"],source_vector:{type:{required:!0,type:"enum",values:{vector:{}}},url:{type:"string"},tiles:{type:"array",value:"string"},bounds:{type:"array",value:"number",length:4,default:[-180,-85.051129,180,85.051129]},scheme:{type:"enum",values:{xyz:{},tms:{}},default:"xyz"},minzoom:{type:"number",default:0},maxzoom:{type:"number",default:22},attribution:{type:"string"},promoteId:{type:"promoteId"},volatile:{type:"boolean",default:!1},"*":{type:"*"}},source_raster:{type:{required:!0,type:"enum",values:{raster:{}}},url:{type:"string"},tiles:{type:"array",value:"string"},bounds:{type:"array",value:"number",length:4,default:[-180,-85.051129,180,85.051129]},minzoom:{type:"number",default:0},maxzoom:{type:"number",default:22},tileSize:{type:"number",default:512,units:"pixels"},scheme:{type:"enum",values:{xyz:{},tms:{}},default:"xyz"},attribution:{type:"string"},volatile:{type:"boolean",default:!1},"*":{type:"*"}},source_raster_dem:{type:{required:!0,type:"enum",values:{"raster-dem":{}}},url:{type:"string"},tiles:{type:"array",value:"string"},bounds:{type:"array",value:"number",length:4,default:[-180,-85.051129,180,85.051129]},minzoom:{type:"number",default:0},maxzoom:{type:"number",default:22},tileSize:{type:"number",default:512,units:"pixels"},attribution:{type:"string"},encoding:{type:"enum",values:{terrarium:{},mapbox:{}},default:"mapbox"},volatile:{type:"boolean",default:!1},"*":{type:"*"}},source_geojson:{type:{required:!0,type:"enum",values:{geojson:{}}},data:{type:"*"},maxzoom:{type:"number",default:18},attribution:{type:"string"},buffer:{type:"number",default:128,maximum:512,minimum:0},filter:{type:"*"},tolerance:{type:"number",default:.375},cluster:{type:"boolean",default:!1},clusterRadius:{type:"number",default:50,minimum:0},clusterMaxZoom:{type:"number"},clusterMinPoints:{type:"number"},clusterProperties:{type:"*"},lineMetrics:{type:"boolean",default:!1},generateId:{type:"boolean",default:!1},promoteId:{type:"promoteId"}},source_video:{type:{required:!0,type:"enum",values:{video:{}}},urls:{required:!0,type:"array",value:"string"},coordinates:{required:!0,type:"array",length:4,value:{type:"array",length:2,value:"number"}}},source_image:{type:{required:!0,type:"enum",values:{image:{}}},url:{required:!0,type:"string"},coordinates:{required:!0,type:"array",length:4,value:{type:"array",length:2,value:"number"}}},layer:{id:{type:"string",required:!0},type:{type:"enum",values:{fill:{},line:{},symbol:{},circle:{},heatmap:{},"fill-extrusion":{},raster:{},hillshade:{},background:{},sky:{}},required:!0},metadata:{type:"*"},source:{type:"string"},"source-layer":{type:"string"},minzoom:{type:"number",minimum:0,maximum:24},maxzoom:{type:"number",minimum:0,maximum:24},filter:{type:"filter"},layout:{type:"layout"},paint:{type:"paint"}},layout:["layout_fill","layout_line","layout_circle","layout_heatmap","layout_fill-extrusion","layout_symbol","layout_raster","layout_hillshade","layout_background","layout_sky"],layout_background:{visibility:{type:"enum",values:{visible:{},none:{}},default:"visible","property-type":"constant"}},layout_sky:{visibility:{type:"enum",values:{visible:{},none:{}},default:"visible","property-type":"constant"}},layout_fill:{"fill-sort-key":{type:"number",expression:{interpolated:!1,parameters:["zoom","feature"]},"property-type":"data-driven"},visibility:{type:"enum",values:{visible:{},none:{}},default:"visible","property-type":"constant"}},layout_circle:{"circle-sort-key":{type:"number",expression:{interpolated:!1,parameters:["zoom","feature"]},"property-type":"data-driven"},visibility:{type:"enum",values:{visible:{},none:{}},default:"visible","property-type":"constant"}},layout_heatmap:{visibility:{type:"enum",values:{visible:{},none:{}},default:"visible","property-type":"constant"}},"layout_fill-extrusion":{visibility:{type:"enum",values:{visible:{},none:{}},default:"visible","property-type":"constant"},"fill-extrusion-edge-radius":{type:"number",private:!0,default:0,minimum:0,maximum:1,"property-type":"constant"}},layout_line:{"line-cap":{type:"enum",values:{butt:{},round:{},square:{}},default:"butt",expression:{interpolated:!1,parameters:["zoom","feature"]},"property-type":"data-driven"},"line-join":{type:"enum",values:{bevel:{},round:{},miter:{}},default:"miter",expression:{interpolated:!1,parameters:["zoom","feature"]},"property-type":"data-driven"},"line-miter-limit":{type:"number",default:2,requires:[{"line-join":"miter"}],expression:{interpolated:!0,parameters:["zoom"]},"property-type":"data-constant"},"line-round-limit":{type:"number",default:1.05,requires:[{"line-join":"round"}],expression:{interpolated:!0,parameters:["zoom"]},"property-type":"data-constant"},"line-sort-key":{type:"number",expression:{interpolated:!1,parameters:["zoom","feature"]},"property-type":"data-driven"},visibility:{type:"enum",values:{visible:{},none:{}},default:"visible","property-type":"constant"}},layout_symbol:{"symbol-placement":{type:"enum",values:{point:{},line:{},"line-center":{}},default:"point",expression:{interpolated:!1,parameters:["zoom"]},"property-type":"data-constant"},"symbol-spacing":{type:"number",default:250,minimum:1,units:"pixels",requires:[{"symbol-placement":"line"}],expression:{interpolated:!0,parameters:["zoom"]},"property-type":"data-constant"},"symbol-avoid-edges":{type:"boolean",default:!1,expression:{interpolated:!1,parameters:["zoom"]},"property-type":"data-constant"},"symbol-sort-key":{type:"number",expression:{interpolated:!1,parameters:["zoom","feature"]},"property-type":"data-driven"},"symbol-z-order":{type:"enum",values:{auto:{},"viewport-y":{},source:{}},default:"auto",expression:{interpolated:!1,parameters:["zoom"]},"property-type":"data-constant"},"icon-allow-overlap":{type:"boolean",default:!1,requires:["icon-image"],expression:{interpolated:!1,parameters:["zoom"]},"property-type":"data-constant"},"icon-ignore-placement":{type:"boolean",default:!1,requires:["icon-image"],expression:{interpolated:!1,parameters:["zoom"]},"property-type":"data-constant"},"icon-optional":{type:"boolean",default:!1,requires:["icon-image","text-field"],expression:{interpolated:!1,parameters:["zoom"]},"property-type":"data-constant"},"icon-rotation-alignment":{type:"enum",values:{map:{},viewport:{},auto:{}},default:"auto",requires:["icon-image"],expression:{interpolated:!1,parameters:["zoom"]},"property-type":"data-constant"},"icon-size":{type:"number",default:1,minimum:0,units:"factor of the original icon size",requires:["icon-image"],expression:{interpolated:!0,parameters:["zoom","feature"]},"property-type":"data-driven"},"icon-text-fit":{type:"enum",values:{none:{},width:{},height:{},both:{}},default:"none",requires:["icon-image","text-field"],expression:{interpolated:!1,parameters:["zoom"]},"property-type":"data-constant"},"icon-text-fit-padding":{type:"array",value:"number",length:4,default:[0,0,0,0],units:"pixels",requires:["icon-image","text-field",{"icon-text-fit":["both","width","height"]}],expression:{interpolated:!0,parameters:["zoom"]},"property-type":"data-constant"},"icon-image":{type:"resolvedImage",tokens:!0,expression:{interpolated:!1,parameters:["zoom","feature"]},"property-type":"data-driven"},"icon-rotate":{type:"number",default:0,period:360,units:"degrees",requires:["icon-image"],expression:{interpolated:!0,parameters:["zoom","feature"]},"property-type":"data-driven"},"icon-padding":{type:"number",default:2,minimum:0,units:"pixels",requires:["icon-image"],expression:{interpolated:!0,parameters:["zoom"]},"property-type":"data-constant"},"icon-keep-upright":{type:"boolean",default:!1,requires:["icon-image",{"icon-rotation-alignment":"map"},{"symbol-placement":["line","line-center"]}],expression:{interpolated:!1,parameters:["zoom"]},"property-type":"data-constant"},"icon-offset":{type:"array",value:"number",length:2,default:[0,0],requires:["icon-image"],expression:{interpolated:!0,parameters:["zoom","feature"]},"property-type":"data-driven"},"icon-anchor":{type:"enum",values:{center:{},left:{},right:{},top:{},bottom:{},"top-left":{},"top-right":{},"bottom-left":{},"bottom-right":{}},default:"center",requires:["icon-image"],expression:{interpolated:!1,parameters:["zoom","feature"]},"property-type":"data-driven"},"icon-pitch-alignment":{type:"enum",values:{map:{},viewport:{},auto:{}},default:"auto",requires:["icon-image"],expression:{interpolated:!1,parameters:["zoom"]},"property-type":"data-constant"},"text-pitch-alignment":{type:"enum",values:{map:{},viewport:{},auto:{}},default:"auto",requires:["text-field"],expression:{interpolated:!1,parameters:["zoom"]},"property-type":"data-constant"},"text-rotation-alignment":{type:"enum",values:{map:{},viewport:{},auto:{}},default:"auto",requires:["text-field"],expression:{interpolated:!1,parameters:["zoom"]},"property-type":"data-constant"},"text-field":{type:"formatted",default:"",tokens:!0,expression:{interpolated:!1,parameters:["zoom","feature"]},"property-type":"data-driven"},"text-font":{type:"array",value:"string",default:["Open Sans Regular","Arial Unicode MS Regular"],requires:["text-field"],expression:{interpolated:!1,parameters:["zoom","feature"]},"property-type":"data-driven"},"text-size":{type:"number",default:16,minimum:0,units:"pixels",requires:["text-field"],expression:{interpolated:!0,parameters:["zoom","feature"]},"property-type":"data-driven"},"text-max-width":{type:"number",default:10,minimum:0,units:"ems",requires:["text-field",{"symbol-placement":["point"]}],expression:{interpolated:!0,parameters:["zoom","feature"]},"property-type":"data-driven"},"text-line-height":{type:"number",default:1.2,units:"ems",requires:["text-field"],expression:{interpolated:!0,parameters:["zoom","feature"]},"property-type":"data-driven"},"text-letter-spacing":{type:"number",default:0,units:"ems",requires:["text-field"],expression:{interpolated:!0,parameters:["zoom","feature"]},"property-type":"data-driven"},"text-justify":{type:"enum",values:{auto:{},left:{},center:{},right:{}},default:"center",requires:["text-field"],expression:{interpolated:!1,parameters:["zoom","feature"]},"property-type":"data-driven"},"text-radial-offset":{type:"number",units:"ems",default:0,requires:["text-field"],"property-type":"data-driven",expression:{interpolated:!0,parameters:["zoom","feature"]}},"text-variable-anchor":{type:"array",value:"enum",values:{center:{},left:{},right:{},top:{},bottom:{},"top-left":{},"top-right":{},"bottom-left":{},"bottom-right":{}},requires:["text-field",{"symbol-placement":["point"]}],expression:{interpolated:!1,parameters:["zoom"]},"property-type":"data-constant"},"text-anchor":{type:"enum",values:{center:{},left:{},right:{},top:{},bottom:{},"top-left":{},"top-right":{},"bottom-left":{},"bottom-right":{}},default:"center",requires:["text-field",{"!":"text-variable-anchor"}],expression:{interpolated:!1,parameters:["zoom","feature"]},"property-type":"data-driven"},"text-max-angle":{type:"number",default:45,units:"degrees",requires:["text-field",{"symbol-placement":["line","line-center"]}],expression:{interpolated:!0,parameters:["zoom"]},"property-type":"data-constant"},"text-writing-mode":{type:"array",value:"enum",values:{horizontal:{},vertical:{}},requires:["text-field"],expression:{interpolated:!1,parameters:["zoom"]},"property-type":"data-constant"},"text-rotate":{type:"number",default:0,period:360,units:"degrees",requires:["text-field"],expression:{interpolated:!0,parameters:["zoom","feature"]},"property-type":"data-driven"},"text-padding":{type:"number",default:2,minimum:0,units:"pixels",requires:["text-field"],expression:{interpolated:!0,parameters:["zoom"]},"property-type":"data-constant"},"text-keep-upright":{type:"boolean",default:!0,requires:["text-field",{"text-rotation-alignment":"map"},{"symbol-placement":["line","line-center"]}],expression:{interpolated:!1,parameters:["zoom"]},"property-type":"data-constant"},"text-transform":{type:"enum",values:{none:{},uppercase:{},lowercase:{}},default:"none",requires:["text-field"],expression:{interpolated:!1,parameters:["zoom","feature"]},"property-type":"data-driven"},"text-offset":{type:"array",value:"number",units:"ems",length:2,default:[0,0],requires:["text-field",{"!":"text-radial-offset"}],expression:{interpolated:!0,parameters:["zoom","feature"]},"property-type":"data-driven"},"text-allow-overlap":{type:"boolean",default:!1,requires:["text-field"],expression:{interpolated:!1,parameters:["zoom"]},"property-type":"data-constant"},"text-ignore-placement":{type:"boolean",default:!1,requires:["text-field"],expression:{interpolated:!1,parameters:["zoom"]},"property-type":"data-constant"},"text-optional":{type:"boolean",default:!1,requires:["text-field","icon-image"],expression:{interpolated:!1,parameters:["zoom"]},"property-type":"data-constant"},visibility:{type:"enum",values:{visible:{},none:{}},default:"visible","property-type":"constant"}},layout_raster:{visibility:{type:"enum",values:{visible:{},none:{}},default:"visible","property-type":"constant"}},layout_hillshade:{visibility:{type:"enum",values:{visible:{},none:{}},default:"visible","property-type":"constant"}},filter:{type:"array",value:"*"},filter_symbol:{type:"boolean",default:!1,transition:!1,"property-type":"data-driven",expression:{interpolated:!1,parameters:["zoom","feature","pitch","distance-from-center"]}},filter_fill:{type:"boolean",default:!1,transition:!1,"property-type":"data-driven",expression:{interpolated:!1,parameters:["zoom","feature"]}},filter_line:{type:"boolean",default:!1,transition:!1,"property-type":"data-driven",expression:{interpolated:!1,parameters:["zoom","feature"]}},filter_circle:{type:"boolean",default:!1,transition:!1,"property-type":"data-driven",expression:{interpolated:!1,parameters:["zoom","feature"]}},"filter_fill-extrusion":{type:"boolean",default:!1,transition:!1,"property-type":"data-driven",expression:{interpolated:!1,parameters:["zoom","feature"]}},filter_heatmap:{type:"boolean",default:!1,transition:!1,"property-type":"data-driven",expression:{interpolated:!1,parameters:["zoom","feature"]}},filter_operator:{type:"enum",values:{"==":{},"!=":{},">":{},">=":{},"<":{},"<=":{},in:{},"!in":{},all:{},any:{},none:{},has:{},"!has":{},within:{}}},geometry_type:{type:"enum",values:{Point:{},LineString:{},Polygon:{}}},function:{expression:{type:"expression"},stops:{type:"array",value:"function_stop"},base:{type:"number",default:1,minimum:0},property:{type:"string",default:"$zoom"},type:{type:"enum",values:{identity:{},exponential:{},interval:{},categorical:{}},default:"exponential"},colorSpace:{type:"enum",values:{rgb:{},lab:{},hcl:{}},default:"rgb"},default:{type:"*",required:!1}},function_stop:{type:"array",minimum:0,maximum:24,value:["number","color"],length:2},expression:{type:"array",value:"*",minimum:1},expression_name:{type:"enum",values:{let:{group:"Variable binding"},var:{group:"Variable binding"},literal:{group:"Types"},array:{group:"Types"},at:{group:"Lookup"},in:{group:"Lookup"},"index-of":{group:"Lookup"},slice:{group:"Lookup"},case:{group:"Decision"},match:{group:"Decision"},coalesce:{group:"Decision"},step:{group:"Ramps, scales, curves"},interpolate:{group:"Ramps, scales, curves"},"interpolate-hcl":{group:"Ramps, scales, curves"},"interpolate-lab":{group:"Ramps, scales, curves"},ln2:{group:"Math"},pi:{group:"Math"},e:{group:"Math"},typeof:{group:"Types"},string:{group:"Types"},number:{group:"Types"},boolean:{group:"Types"},object:{group:"Types"},collator:{group:"Types"},format:{group:"Types"},image:{group:"Types"},"number-format":{group:"Types"},"to-string":{group:"Types"},"to-number":{group:"Types"},"to-boolean":{group:"Types"},"to-rgba":{group:"Color"},"to-color":{group:"Types"},rgb:{group:"Color"},rgba:{group:"Color"},get:{group:"Lookup"},has:{group:"Lookup"},length:{group:"Lookup"},properties:{group:"Feature data"},"feature-state":{group:"Feature data"},"geometry-type":{group:"Feature data"},id:{group:"Feature data"},zoom:{group:"Camera"},pitch:{group:"Camera"},"distance-from-center":{group:"Camera"},"heatmap-density":{group:"Heatmap"},"line-progress":{group:"Feature data"},"sky-radial-progress":{group:"sky"},accumulated:{group:"Feature data"},"+":{group:"Math"},"*":{group:"Math"},"-":{group:"Math"},"/":{group:"Math"},"%":{group:"Math"},"^":{group:"Math"},sqrt:{group:"Math"},log10:{group:"Math"},ln:{group:"Math"},log2:{group:"Math"},sin:{group:"Math"},cos:{group:"Math"},tan:{group:"Math"},asin:{group:"Math"},acos:{group:"Math"},atan:{group:"Math"},min:{group:"Math"},max:{group:"Math"},round:{group:"Math"},abs:{group:"Math"},ceil:{group:"Math"},floor:{group:"Math"},distance:{group:"Math"},"==":{group:"Decision"},"!=":{group:"Decision"},">":{group:"Decision"},"<":{group:"Decision"},">=":{group:"Decision"},"<=":{group:"Decision"},all:{group:"Decision"},any:{group:"Decision"},"!":{group:"Decision"},within:{group:"Decision"},"is-supported-script":{group:"String"},upcase:{group:"String"},downcase:{group:"String"},concat:{group:"String"},"resolved-locale":{group:"String"}}},fog:{range:{type:"array",default:[.5,10],minimum:-20,maximum:20,length:2,value:"number","property-type":"data-constant",transition:!0,expression:{interpolated:!0,parameters:["zoom"]}},color:{type:"color","property-type":"data-constant",default:"#ffffff",expression:{interpolated:!0,parameters:["zoom"]},transition:!0},"high-color":{type:"color","property-type":"data-constant",default:"#245cdf",expression:{interpolated:!0,parameters:["zoom"]},transition:!0},"space-color":{type:"color","property-type":"data-constant",default:["interpolate",["linear"],["zoom"],4,"#010b19",7,"#367ab9"],expression:{interpolated:!0,parameters:["zoom"]},transition:!0},"horizon-blend":{type:"number","property-type":"data-constant",default:["interpolate",["linear"],["zoom"],4,.2,7,.1],minimum:0,maximum:1,expression:{interpolated:!0,parameters:["zoom"]},transition:!0},"star-intensity":{type:"number","property-type":"data-constant",default:["interpolate",["linear"],["zoom"],5,.35,6,0],minimum:0,maximum:1,expression:{interpolated:!0,parameters:["zoom"]},transition:!0}},light:{anchor:{type:"enum",default:"viewport",values:{map:{},viewport:{}},"property-type":"data-constant",transition:!1,expression:{interpolated:!1,parameters:["zoom"]}},position:{type:"array",default:[1.15,210,30],length:3,value:"number","property-type":"data-constant",transition:!0,expression:{interpolated:!0,parameters:["zoom"]}},color:{type:"color","property-type":"data-constant",default:"#ffffff",expression:{interpolated:!0,parameters:["zoom"]},transition:!0},intensity:{type:"number","property-type":"data-constant",default:.5,minimum:0,maximum:1,expression:{interpolated:!0,parameters:["zoom"]},transition:!0}},projection:{name:{type:"enum",values:{albers:{},equalEarth:{},equirectangular:{},lambertConformalConic:{},mercator:{},naturalEarth:{},winkelTripel:{},globe:{}},default:"mercator",required:!0},center:{type:"array",length:2,value:"number","property-type":"data-constant",minimum:[-180,-90],maximum:[180,90],transition:!1,requires:[{name:["albers","lambertConformalConic"]}]},parallels:{type:"array",length:2,value:"number","property-type":"data-constant",minimum:[-90,-90],maximum:[90,90],transition:!1,requires:[{name:["albers","lambertConformalConic"]}]}},terrain:{source:{type:"string",required:!0},exaggeration:{type:"number","property-type":"data-constant",default:1,minimum:0,maximum:1e3,expression:{interpolated:!0,parameters:["zoom"]},transition:!0,requires:["source"]}},paint:["paint_fill","paint_line","paint_circle","paint_heatmap","paint_fill-extrusion","paint_symbol","paint_raster","paint_hillshade","paint_background","paint_sky"],paint_fill:{"fill-antialias":{type:"boolean",default:!0,expression:{interpolated:!1,parameters:["zoom"]},"property-type":"data-constant"},"fill-opacity":{type:"number",default:1,minimum:0,maximum:1,transition:!0,expression:{interpolated:!0,parameters:["zoom","feature","feature-state"]},"property-type":"data-driven"},"fill-color":{type:"color",default:"#000000",transition:!0,requires:[{"!":"fill-pattern"}],expression:{interpolated:!0,parameters:["zoom","feature","feature-state"]},"property-type":"data-driven"},"fill-outline-color":{type:"color",transition:!0,requires:[{"!":"fill-pattern"},{"fill-antialias":!0}],expression:{interpolated:!0,parameters:["zoom","feature","feature-state"]},"property-type":"data-driven"},"fill-translate":{type:"array",value:"number",length:2,default:[0,0],transition:!0,units:"pixels",expression:{interpolated:!0,parameters:["zoom"]},"property-type":"data-constant"},"fill-translate-anchor":{type:"enum",values:{map:{},viewport:{}},default:"map",requires:["fill-translate"],expression:{interpolated:!1,parameters:["zoom"]},"property-type":"data-constant"},"fill-pattern":{type:"resolvedImage",transition:!1,expression:{interpolated:!1,parameters:["zoom","feature"]},"property-type":"data-driven"}},"paint_fill-extrusion":{"fill-extrusion-opacity":{type:"number",default:1,minimum:0,maximum:1,transition:!0,expression:{interpolated:!0,parameters:["zoom"]},"property-type":"data-constant"},"fill-extrusion-color":{type:"color",default:"#000000",transition:!0,requires:[{"!":"fill-extrusion-pattern"}],expression:{interpolated:!0,parameters:["zoom","feature","feature-state"]},"property-type":"data-driven"},"fill-extrusion-translate":{type:"array",value:"number",length:2,default:[0,0],transition:!0,units:"pixels",expression:{interpolated:!0,parameters:["zoom"]},"property-type":"data-constant"},"fill-extrusion-translate-anchor":{type:"enum",values:{map:{},viewport:{}},default:"map",requires:["fill-extrusion-translate"],expression:{interpolated:!1,parameters:["zoom"]},"property-type":"data-constant"},"fill-extrusion-pattern":{type:"resolvedImage",transition:!1,expression:{interpolated:!1,parameters:["zoom","feature"]},"property-type":"data-driven"},"fill-extrusion-height":{type:"number",default:0,minimum:0,units:"meters",transition:!0,expression:{interpolated:!0,parameters:["zoom","feature","feature-state"]},"property-type":"data-driven"},"fill-extrusion-base":{type:"number",default:0,minimum:0,units:"meters",transition:!0,requires:["fill-extrusion-height"],expression:{interpolated:!0,parameters:["zoom","feature","feature-state"]},"property-type":"data-driven"},"fill-extrusion-vertical-gradient":{type:"boolean",default:!0,transition:!1,expression:{interpolated:!1,parameters:["zoom"]},"property-type":"data-constant"},"fill-extrusion-ambient-occlusion-intensity":{"property-type":"data-constant",type:"number",private:!0,default:0,minimum:0,maximum:1,expression:{interpolated:!0,parameters:["zoom"]},transition:!0},"fill-extrusion-ambient-occlusion-radius":{"property-type":"data-constant",type:"number",private:!0,default:3,minimum:0,expression:{interpolated:!0,parameters:["zoom"]},transition:!0,requires:["fill-extrusion-edge-radius"]}},paint_line:{"line-opacity":{type:"number",default:1,minimum:0,maximum:1,transition:!0,expression:{interpolated:!0,parameters:["zoom","feature","feature-state"]},"property-type":"data-driven"},"line-color":{type:"color",default:"#000000",transition:!0,requires:[{"!":"line-pattern"}],expression:{interpolated:!0,parameters:["zoom","feature","feature-state"]},"property-type":"data-driven"},"line-translate":{type:"array",value:"number",length:2,default:[0,0],transition:!0,units:"pixels",expression:{interpolated:!0,parameters:["zoom"]},"property-type":"data-constant"},"line-translate-anchor":{type:"enum",values:{map:{},viewport:{}},default:"map",requires:["line-translate"],expression:{interpolated:!1,parameters:["zoom"]},"property-type":"data-constant"},"line-width":{type:"number",default:1,minimum:0,transition:!0,units:"pixels",expression:{interpolated:!0,parameters:["zoom","feature","feature-state"]},"property-type":"data-driven"},"line-gap-width":{type:"number",default:0,minimum:0,transition:!0,units:"pixels",expression:{interpolated:!0,parameters:["zoom","feature","feature-state"]},"property-type":"data-driven"},"line-offset":{type:"number",default:0,transition:!0,units:"pixels",expression:{interpolated:!0,parameters:["zoom","feature","feature-state"]},"property-type":"data-driven"},"line-blur":{type:"number",default:0,minimum:0,transition:!0,units:"pixels",expression:{interpolated:!0,parameters:["zoom","feature","feature-state"]},"property-type":"data-driven"},"line-dasharray":{type:"array",value:"number",minimum:0,transition:!1,units:"line widths",requires:[{"!":"line-pattern"}],expression:{interpolated:!1,parameters:["zoom","feature"]},"property-type":"data-driven"},"line-pattern":{type:"resolvedImage",transition:!1,expression:{interpolated:!1,parameters:["zoom","feature"]},"property-type":"data-driven"},"line-gradient":{type:"color",transition:!1,requires:[{"!":"line-pattern"},{source:"geojson",has:{lineMetrics:!0}}],expression:{interpolated:!0,parameters:["line-progress"]},"property-type":"color-ramp"},"line-trim-offset":{type:"array",value:"number",length:2,default:[0,0],minimum:[0,0],maximum:[1,1],transition:!1,requires:[{source:"geojson",has:{lineMetrics:!0}}],"property-type":"constant"}},paint_circle:{"circle-radius":{type:"number",default:5,minimum:0,transition:!0,units:"pixels",expression:{interpolated:!0,parameters:["zoom","feature","feature-state"]},"property-type":"data-driven"},"circle-color":{type:"color",default:"#000000",transition:!0,expression:{interpolated:!0,parameters:["zoom","feature","feature-state"]},"property-type":"data-driven"},"circle-blur":{type:"number",default:0,transition:!0,expression:{interpolated:!0,parameters:["zoom","feature","feature-state"]},"property-type":"data-driven"},"circle-opacity":{type:"number",default:1,minimum:0,maximum:1,transition:!0,expression:{interpolated:!0,parameters:["zoom","feature","feature-state"]},"property-type":"data-driven"},"circle-translate":{type:"array",value:"number",length:2,default:[0,0],transition:!0,units:"pixels",expression:{interpolated:!0,parameters:["zoom"]},"property-type":"data-constant"},"circle-translate-anchor":{type:"enum",values:{map:{},viewport:{}},default:"map",requires:["circle-translate"],expression:{interpolated:!1,parameters:["zoom"]},"property-type":"data-constant"},"circle-pitch-scale":{type:"enum",values:{map:{},viewport:{}},default:"map",expression:{interpolated:!1,parameters:["zoom"]},"property-type":"data-constant"},"circle-pitch-alignment":{type:"enum",values:{map:{},viewport:{}},default:"viewport",expression:{interpolated:!1,parameters:["zoom"]},"property-type":"data-constant"},"circle-stroke-width":{type:"number",default:0,minimum:0,transition:!0,units:"pixels",expression:{interpolated:!0,parameters:["zoom","feature","feature-state"]},"property-type":"data-driven"},"circle-stroke-color":{type:"color",default:"#000000",transition:!0,expression:{interpolated:!0,parameters:["zoom","feature","feature-state"]},"property-type":"data-driven"},"circle-stroke-opacity":{type:"number",default:1,minimum:0,maximum:1,transition:!0,expression:{interpolated:!0,parameters:["zoom","feature","feature-state"]},"property-type":"data-driven"}},paint_heatmap:{"heatmap-radius":{type:"number",default:30,minimum:1,transition:!0,units:"pixels",expression:{interpolated:!0,parameters:["zoom","feature","feature-state"]},"property-type":"data-driven"},"heatmap-weight":{type:"number",default:1,minimum:0,transition:!1,expression:{interpolated:!0,parameters:["zoom","feature","feature-state"]},"property-type":"data-driven"},"heatmap-intensity":{type:"number",default:1,minimum:0,transition:!0,expression:{interpolated:!0,parameters:["zoom"]},"property-type":"data-constant"},"heatmap-color":{type:"color",default:["interpolate",["linear"],["heatmap-density"],0,"rgba(0, 0, 255, 0)",.1,"royalblue",.3,"cyan",.5,"lime",.7,"yellow",1,"red"],transition:!1,expression:{interpolated:!0,parameters:["heatmap-density"]},"property-type":"color-ramp"},"heatmap-opacity":{type:"number",default:1,minimum:0,maximum:1,transition:!0,expression:{interpolated:!0,parameters:["zoom"]},"property-type":"data-constant"}},paint_symbol:{"icon-opacity":{type:"number",default:1,minimum:0,maximum:1,transition:!0,requires:["icon-image"],expression:{interpolated:!0,parameters:["zoom","feature","feature-state"]},"property-type":"data-driven"},"icon-color":{type:"color",default:"#000000",transition:!0,requires:["icon-image"],expression:{interpolated:!0,parameters:["zoom","feature","feature-state"]},"property-type":"data-driven"},"icon-halo-color":{type:"color",default:"rgba(0, 0, 0, 0)",transition:!0,requires:["icon-image"],expression:{interpolated:!0,parameters:["zoom","feature","feature-state"]},"property-type":"data-driven"},"icon-halo-width":{type:"number",default:0,minimum:0,transition:!0,units:"pixels",requires:["icon-image"],expression:{interpolated:!0,parameters:["zoom","feature","feature-state"]},"property-type":"data-driven"},"icon-halo-blur":{type:"number",default:0,minimum:0,transition:!0,units:"pixels",requires:["icon-image"],expression:{interpolated:!0,parameters:["zoom","feature","feature-state"]},"property-type":"data-driven"},"icon-translate":{type:"array",value:"number",length:2,default:[0,0],transition:!0,units:"pixels",requires:["icon-image"],expression:{interpolated:!0,parameters:["zoom"]},"property-type":"data-constant"},"icon-translate-anchor":{type:"enum",values:{map:{},viewport:{}},default:"map",requires:["icon-image","icon-translate"],expression:{interpolated:!1,parameters:["zoom"]},"property-type":"data-constant"},"text-opacity":{type:"number",default:1,minimum:0,maximum:1,transition:!0,requires:["text-field"],expression:{interpolated:!0,parameters:["zoom","feature","feature-state"]},"property-type":"data-driven"},"text-color":{type:"color",default:"#000000",transition:!0,overridable:!0,requires:["text-field"],expression:{interpolated:!0,parameters:["zoom","feature","feature-state"]},"property-type":"data-driven"},"text-halo-color":{type:"color",default:"rgba(0, 0, 0, 0)",transition:!0,requires:["text-field"],expression:{interpolated:!0,parameters:["zoom","feature","feature-state"]},"property-type":"data-driven"},"text-halo-width":{type:"number",default:0,minimum:0,transition:!0,units:"pixels",requires:["text-field"],expression:{interpolated:!0,parameters:["zoom","feature","feature-state"]},"property-type":"data-driven"},"text-halo-blur":{type:"number",default:0,minimum:0,transition:!0,units:"pixels",requires:["text-field"],expression:{interpolated:!0,parameters:["zoom","feature","feature-state"]},"property-type":"data-driven"},"text-translate":{type:"array",value:"number",length:2,default:[0,0],transition:!0,units:"pixels",requires:["text-field"],expression:{interpolated:!0,parameters:["zoom"]},"property-type":"data-constant"},"text-translate-anchor":{type:"enum",values:{map:{},viewport:{}},default:"map",requires:["text-field","text-translate"],expression:{interpolated:!1,parameters:["zoom"]},"property-type":"data-constant"}},paint_raster:{"raster-opacity":{type:"number",default:1,minimum:0,maximum:1,transition:!0,expression:{interpolated:!0,parameters:["zoom"]},"property-type":"data-constant"},"raster-hue-rotate":{type:"number",default:0,period:360,transition:!0,units:"degrees",expression:{interpolated:!0,parameters:["zoom"]},"property-type":"data-constant"},"raster-brightness-min":{type:"number",default:0,minimum:0,maximum:1,transition:!0,expression:{interpolated:!0,parameters:["zoom"]},"property-type":"data-constant"},"raster-brightness-max":{type:"number",default:1,minimum:0,maximum:1,transition:!0,expression:{interpolated:!0,parameters:["zoom"]},"property-type":"data-constant"},"raster-saturation":{type:"number",default:0,minimum:-1,maximum:1,transition:!0,expression:{interpolated:!0,parameters:["zoom"]},"property-type":"data-constant"},"raster-contrast":{type:"number",default:0,minimum:-1,maximum:1,transition:!0,expression:{interpolated:!0,parameters:["zoom"]},"property-type":"data-constant"},"raster-resampling":{type:"enum",values:{linear:{},nearest:{}},default:"linear",expression:{interpolated:!1,parameters:["zoom"]},"property-type":"data-constant"},"raster-fade-duration":{type:"number",default:300,minimum:0,transition:!1,units:"milliseconds",expression:{interpolated:!0,parameters:["zoom"]},"property-type":"data-constant"}},paint_hillshade:{"hillshade-illumination-direction":{type:"number",default:335,minimum:0,maximum:359,transition:!1,expression:{interpolated:!0,parameters:["zoom"]},"property-type":"data-constant"},"hillshade-illumination-anchor":{type:"enum",values:{map:{},viewport:{}},default:"viewport",expression:{interpolated:!1,parameters:["zoom"]},"property-type":"data-constant"},"hillshade-exaggeration":{type:"number",default:.5,minimum:0,maximum:1,transition:!0,expression:{interpolated:!0,parameters:["zoom"]},"property-type":"data-constant"},"hillshade-shadow-color":{type:"color",default:"#000000",transition:!0,expression:{interpolated:!0,parameters:["zoom"]},"property-type":"data-constant"},"hillshade-highlight-color":{type:"color",default:"#FFFFFF",transition:!0,expression:{interpolated:!0,parameters:["zoom"]},"property-type":"data-constant"},"hillshade-accent-color":{type:"color",default:"#000000",transition:!0,expression:{interpolated:!0,parameters:["zoom"]},"property-type":"data-constant"}},paint_background:{"background-color":{type:"color",default:"#000000",transition:!0,requires:[{"!":"background-pattern"}],expression:{interpolated:!0,parameters:["zoom"]},"property-type":"data-constant"},"background-pattern":{type:"resolvedImage",transition:!1,expression:{interpolated:!1,parameters:["zoom"]},"property-type":"data-constant"},"background-opacity":{type:"number",default:1,minimum:0,maximum:1,transition:!0,expression:{interpolated:!0,parameters:["zoom"]},"property-type":"data-constant"}},paint_sky:{"sky-type":{type:"enum",values:{gradient:{},atmosphere:{}},default:"atmosphere",expression:{interpolated:!1,parameters:["zoom"]},"property-type":"data-constant"},"sky-atmosphere-sun":{type:"array",value:"number",length:2,units:"degrees",minimum:[0,0],maximum:[360,180],transition:!1,requires:[{"sky-type":"atmosphere"}],expression:{interpolated:!1,parameters:["zoom"]},"property-type":"data-constant"},"sky-atmosphere-sun-intensity":{type:"number",requires:[{"sky-type":"atmosphere"}],default:10,minimum:0,maximum:100,transition:!1,"property-type":"data-constant"},"sky-gradient-center":{type:"array",requires:[{"sky-type":"gradient"}],value:"number",default:[0,0],length:2,units:"degrees",minimum:[0,0],maximum:[360,180],transition:!1,expression:{interpolated:!1,parameters:["zoom"]},"property-type":"data-constant"},"sky-gradient-radius":{type:"number",requires:[{"sky-type":"gradient"}],default:90,minimum:0,maximum:180,transition:!1,expression:{interpolated:!1,parameters:["zoom"]},"property-type":"data-constant"},"sky-gradient":{type:"color",default:["interpolate",["linear"],["sky-radial-progress"],.8,"#87ceeb",1,"white"],transition:!1,requires:[{"sky-type":"gradient"}],expression:{interpolated:!0,parameters:["sky-radial-progress"]},"property-type":"color-ramp"},"sky-atmosphere-halo-color":{type:"color",default:"white",transition:!1,requires:[{"sky-type":"atmosphere"}],"property-type":"data-constant"},"sky-atmosphere-color":{type:"color",default:"white",transition:!1,requires:[{"sky-type":"atmosphere"}],"property-type":"data-constant"},"sky-opacity":{type:"number",default:1,minimum:0,maximum:1,transition:!0,expression:{interpolated:!0,parameters:["zoom"]},"property-type":"data-constant"}},transition:{duration:{type:"number",default:300,minimum:0,units:"milliseconds"},delay:{type:"number",default:0,minimum:0,units:"milliseconds"}},"property-type":{"data-driven":{type:"property-type"},"color-ramp":{type:"property-type"},"data-constant":{type:"property-type"},constant:{type:"property-type"}},promoteId:{"*":{type:"string"}}};function xr(t){if(!0===t||!1===t)return!0;if(!Array.isArray(t)||0===t.length)return!1;switch(t[0]){case"has":return t.length>=2&&"$id"!==t[1]&&"$type"!==t[1];case"in":return t.length>=3&&("string"!=typeof t[1]||Array.isArray(t[2]));case"!in":case"!has":case"none":return!1;case"==":case"!=":case">":case">=":case"<":case"<=":return 3!==t.length||Array.isArray(t[1])||Array.isArray(t[2]);case"any":case"all":for(var e=0,i=t.slice(1);e<i.length;e+=1){var n=i[e];if(!xr(n)&&"boolean"!=typeof n)return!1}return!0;default:return!0}}function Er(t,e){if(void 0===e&&(e="fill"),null==t)return{filter:function(){return!0},needGeometry:!1,needFeature:!1};xr(t)||(t=Pr(t));var i=t,n=!0;try{n=function(t){if(!Sr(t))return t;var e=yr(t);return wr(e),br(e)}(i)}catch(t){console.warn("Failed to extract static filter. Filter will continue working, but at higher memory usage and slower framerate.\nThis is most likely a bug, please report this via https://github.com/mapbox/mapbox-gl-js/issues/new?assignees=&labels=&template=Bug_report.md\nand paste the contents of this message in the report.\nThank you!\nFilter Expression:\n"+JSON.stringify(i,null,2)+"\n        ")}var r=vr["filter_"+e],s=gr(n,r),o=null;if("error"===s.result)throw new Error(s.value.map((function(t){return t.key+": "+t.message})).join(", "));o=function(t,e,i){return s.value.evaluate(t,e,{},i)};var a=null,l=null;if(n!==i){var h=gr(i,r);if("error"===h.result)throw new Error(h.value.map((function(t){return t.key+": "+t.message})).join(", "));a=function(t,e,i,n,r){return h.value.evaluate(t,e,{},i,void 0,void 0,n,r)},l=!qi(h.value.expression)}return{filter:o=o,dynamicFilter:a||void 0,needGeometry:Rr(n),needFeature:!!l}}function br(t){if(!Array.isArray(t))return t;var e=function(t){if(Tr.has(t[0]))for(var e=1;e<t.length;e++)if(Sr(t[e]))return!0;return t}(t);return!0===e?e:e.map((function(t){return br(t)}))}function wr(t){var e=!1,i=[];if("case"===t[0]){for(var n=1;n<t.length-1;n+=2)e=e||Sr(t[n]),i.push(t[n+1]);i.push(t[t.length-1])}else if("match"===t[0]){e=e||Sr(t[1]);for(var r=2;r<t.length-1;r+=2)i.push(t[r+1]);i.push(t[t.length-1])}else if("step"===t[0]){e=e||Sr(t[1]);for(var s=1;s<t.length-1;s+=2)i.push(t[s+1])}e&&(t.length=0,t.push.apply(t,["any"].concat(i)));for(var o=1;o<t.length;o++)wr(t[o])}function Sr(t){if(!Array.isArray(t))return!1;if("pitch"===(e=t[0])||"distance-from-center"===e)return!0;for(var e,i=1;i<t.length;i++)if(Sr(t[i]))return!0;return!1}var Tr=new Set(["in","==","!=",">",">=","<","<=","to-boolean"]);function Cr(t,e){return t<e?-1:t>e?1:0}function Rr(t){if(!Array.isArray(t))return!1;if("within"===t[0])return!0;for(var e=1;e<t.length;e++)if(Rr(t[e]))return!0;return!1}function Pr(t){if(!t)return!0;var e,i=t[0];return t.length<=1?"any"!==i:"=="===i?Ir(t[1],t[2],"=="):"!="===i?Fr(Ir(t[1],t[2],"==")):"<"===i||">"===i||"<="===i||">="===i?Ir(t[1],t[2],i):"any"===i?(e=t.slice(1),["any"].concat(e.map(Pr))):"all"===i?["all"].concat(t.slice(1).map(Pr)):"none"===i?["all"].concat(t.slice(1).map(Pr).map(Fr)):"in"===i?Lr(t[1],t.slice(2)):"!in"===i?Fr(Lr(t[1],t.slice(2))):"has"===i?Mr(t[1]):"!has"===i?Fr(Mr(t[1])):"within"!==i||t}function Ir(t,e,i){switch(t){case"$type":return["filter-type-"+i,e];case"$id":return["filter-id-"+i,e];default:return["filter-"+i,t,e]}}function Lr(t,e){if(0===e.length)return!1;switch(t){case"$type":return["filter-type-in",["literal",e]];case"$id":return["filter-id-in",["literal",e]];default:return e.length>200&&!e.some((function(t){return typeof t!=typeof e[0]}))?["filter-in-large",t,["literal",e.sort(Cr)]]:["filter-in-small",t,["literal",e]]}}function Mr(t){switch(t){case"$type":return!0;case"$id":return["filter-has-id"];default:return["filter-has",t]}}function Fr(t){return["!",t]}var Ar=["type","source","source-layer","minzoom","maxzoom","filter","layout"];function Zr(t,e){var i={};for(var n in t)"ref"!==n&&(i[n]=t[n]);return Ar.forEach((function(t){t in e&&(i[t]=e[t])})),i}function Dr(t){t=t.slice();for(var e=Object.create(null),i=0;i<t.length;i++)e[t[i].id]=t[i];for(var n=0;n<t.length;n++)"ref"in t[n]&&(t[n]=Zr(t[n],e[t[n].ref]));return t}var Or={thin:100,hairline:100,"ultra-light":100,"extra-light":100,light:200,book:300,regular:400,normal:400,plain:400,roman:400,standard:400,medium:500,"semi-bold":600,"demi-bold":600,bold:700,heavy:800,black:800,"extra-bold":800,"ultra-black":900,"extra-black":900,"ultra-bold":900,"heavy-black":900,fat:900,poster:900},kr=" ",Gr=/(italic|oblique)$/i,zr={},Nr=function(t,e,i){var n=zr[t];if(!n){Array.isArray(t)||(t=[t]);for(var r=400,s="normal",o=[],a=0,l=t.length;a<l;++a){var h=t[a].split(" "),u=h[h.length-1].toLowerCase();for(var c in"normal"==u||"italic"==u||"oblique"==u?(s=u,h.pop(),u=h[h.length-1].toLowerCase()):Gr.test(u)&&(u=u.replace(Gr,""),s=h[h.length-1].replace(u,"")),Or){var d=h.length>1?h[h.length-2].toLowerCase():"";if(u==c||u==c.replace("-","")||d+"-"+u==c){r=Or[c],h.pop(),d&&c.startsWith(d)&&h.pop();break}}"number"==typeof u&&(r=u);var g=h.join(kr).replace("Klokantech Noto Sans","Noto Sans");-1!==g.indexOf(kr)&&(g='"'+g+'"'),o.push(g)}n=zr[t]=[s,r,o]}return n[0]+kr+n[1]+kr+e+"px"+(i?"/"+i:"")+kr+n[2]},jr=de(Nr),Ur="https://api.mapbox.com";function Br(t){var e="mapbox://";return 0!==t.indexOf(e)?"":t.slice(e.length)}function Vr(t,e){var i=Br(t);if(!i)return decodeURI(new URL(t,location.href).href);var n="styles/";if(0!==i.indexOf(n))throw new Error("unexpected style url: "+t);var r=i.slice(n.length);return Ur+"/styles/v1/"+r+"?&access_token="+e}function qr(t,e,i,n){var r=new URL(t,n),s=Br(t);return s?"mapbox.satellite"===s?"https://api.mapbox.com/v4/"+s+"/{z}/{x}/{y}"+(window.devicePixelRatio>=1.5?"@2x":"")+".webp?access_token="+e:"https://{a-d}.tiles.mapbox.com/v4/"+s+"/{z}/{x}/{y}.vector.pbf?access_token="+e:e?(r.searchParams.set(i,e),decodeURI(r.href)):decodeURI(r.href)}function Wr(t,e){return void 0===e&&(e=512),t.getExtent()?(0,ce.dl)({extent:t.getExtent(),tileSize:e,maxZoom:22}).getResolutions():ss}function Xr(t,e,i,n,r){var s,o,a,l;void 0===i&&(i=""),void 0===n&&(n={}),void 0===r&&(r=void 0);var h=!0;return"string"==typeof i||Array.isArray(i)?l=i:(l=(a=i).source||a.layers,n=a),"string"==typeof n?(s=n,a={}):(s=n.styleUrl,a=n),!1===a.updateSource&&(h=!1),r||(r=a.resolutions),s||"string"!=typeof e||e.trim().startsWith("{")||(s=e),s&&(s=s.startsWith("data:")?location.href:Vr(s,a.accessToken),a=function(t,e){return e.accessToken||(e=Object.assign({},e),new URL(t).searchParams.forEach((function(t,i){e.accessToken=t,e.accessTokenParam=i}))),e}(s,a)),new Promise((function(i,n){us(e,a).then((function(e){if(8!=e.version)return n(new Error("glStyle version 8 required."));if(!(t instanceof le.Z||t instanceof jt))return n(new Error("Can only apply to VectorLayer or VectorTileLayer"));var u,c,d,g=t instanceof jt?"vector":"geojson";if(l?o=Array.isArray(l)?e.layers.find((function(t){return t.id===l[0]})).source:l:(o=Object.keys(e.sources).find((function(t){return e.sources[t].type===g})),l=o),!o)return n(new Error("No "+g+" source found in the glStyle."));function p(){if(!h)return Promise.resolve();if(t instanceof jt)return function(t,e,i){return new Promise((function(n,r){(function(t,e,i){void 0===i&&(i={});var n=[e,JSON.stringify(t)].toString(),r=ds[n];if(!r||i.transformRequest){var s=t.url;if(s&&!t.tiles){var o=qr(s,i.accessToken,i.accessTokenParam||"access_token",e||location.href);if(s.startsWith("mapbox://"))r=Promise.resolve(Object.assign({},t,{url:void 0,tiles:(0,Kt.Gk)(o)}));else{var a={};r=hs("Source",o,i,a).then((function(t){return t.tiles=t.tiles.map((function(e){return"tms"===t.scheme&&(e=e.replace("{y}","{-y}")),cs(qr(e,i.accessToken,i.accessTokenParam||"access_token",a.request.url),i)})),Promise.resolve(t)}))}}else t=Object.assign({},t,{tiles:t.tiles.map((function(n){return"tms"===t.scheme&&(n=n.replace("{y}","{-y}")),cs(qr(n,i.accessToken,i.accessTokenParam||"access_token",e||location.href),i)}))}),r=Promise.resolve(Object.assign({},t));ds[n]=r}return r})(t,e,i).then((function(e){var r=function(t,e,i){var n=new ae.Z({tileJSON:e,tileSize:t.tileSize||e.tileSize||512}),r=n.getTileJSON(),s=n.getTileGrid(),o=(0,nt.get)(i.projection||"EPSG:3857"),a=function(t,e){var i=t.bounds;if(i){var n=(0,nt.fromLonLat)([i[0],i[1]],e),r=(0,nt.fromLonLat)([i[2],i[3]],e);return[n[0],n[1],r[0],r[1]]}return(0,nt.get)(e).getExtent()}(r,o),l=o.getExtent(),h=r.minzoom||0,u=r.maxzoom||22,c={attributions:n.getAttributions(),projection:o,tileGrid:new oe.Z({origin:l?(0,j.getTopLeft)(l):s.getOrigin(0),extent:a||s.getExtent(),minZoom:h,resolutions:Wr(o,e.tileSize).slice(0,u+1),tileSize:s.getTileSize(0)})};return Array.isArray(r.tiles)?c.urls=r.tiles:c.url=r.tiles,c}(t,e,i);r.format=new Ct,n(new Ut.Z(r))})).catch(r)}))}(e.sources[o],s,a).then((function(e){var i=t.getSource();if(i?e!==i&&(i.setTileUrlFunction(e.getTileUrlFunction()),"function"==typeof i.setUrls&&"function"==typeof e.getUrls&&i.setUrls(e.getUrls()),i.format_||(i.format_=e.format_),i.getAttributions()||i.setAttributions(e.getAttributions()),i.getTileLoadFunction()===Ut.I&&i.setTileLoadFunction(e.getTileLoadFunction()),(0,nt.equivalent)(i.getProjection(),e.getProjection())&&(i.tileGrid=e.getTileGrid())):t.setSource(e),!isFinite(t.getMaxResolution())&&!isFinite(t.getMinZoom())){var n=t.getSource().getTileGrid();t.setMaxResolution(n.getResolution(n.getMinZoom()))}}));var i=e.sources[o],n=t.getSource();n&&n.get("mapbox-source")===i||(n=function(t,e,i){var n=i.projection?new ne({dataProjection:i.projection}):new ne,r=t.data,s={};if("string"==typeof r){var o=qr(r,i.accessToken,i.accessTokenParam||"access_token",e||location.href);if(i.transformRequest){var a=i.transformRequest(o,"GeoJSON");a instanceof Request&&(o=decodeURI(a.url))}if(/\{bbox-[0-9a-z-]+\}/.test(o)){var l=new he.Z({attributions:t.attribution,format:n,url:function(t,e,i){var n=function(t){return"{bbox-"+(t?t.getCode():"EPSG:3857").toLowerCase().replace(/[^a-z0-9]/g,"-")+"}"}(i);return o.replace(n,""+t.join(","))},strategy:ue.VW});return l.set("mapbox-source",t),l}return new he.Z({attributions:t.attribution,format:n,url:o})}s.features=n.readFeatures(r,{featureProjection:(0,nt.getUserProjection)()||"EPSG:3857"});var h=new he.Z(Object.assign({attributions:t.attribution,format:n},s));return h.set("mapbox-source",t),h}(i,s,a));var r=t.getSource();return r?n!==r&&(r.getAttributions()||r.setAttributions(n.getAttributions()),r.format_||(r.format_=n.getFormat()),r.url_=n.getUrl()):t.setSource(n),Promise.resolve()}function f(){if(d||e.sprite&&!u)d?(t.setStyle(d),p().then(i).catch(n)):n(new Error("Something went wrong trying to apply style."));else{if(a.projection&&!r){var s=(0,nt.get)(a.projection).getUnits();"m"!==s&&(r=ss.map((function(t){return t/nt.METERS_PER_UNIT[s]})))}d=function(t,e,i,n,r,s,o,a){if(void 0===n&&(n=ss),void 0===r&&(r=void 0),void 0===s&&(s=void 0),void 0===o&&(o=void 0),void 0===a&&(a=void 0),"string"==typeof e&&(e=JSON.parse(e)),8!=e.version)throw new Error("glStyle version 8 required.");var l,h,u;if(Ns[es(e,t)]=Array.from(arguments),s)if("undefined"!=typeof Image){var c=new Image;c.crossOrigin="anonymous",c.onload=function(){l=c,h=[c.width,c.height],t.changed(),c.onload=null},c.src=s}else if("undefined"!=typeof WorkerGlobalScope&&self instanceof WorkerGlobalScope){var d=self;d.postMessage({action:"loadImage",src:s}),d.addEventListener("message",(function(t){"imageLoaded"===t.data.action&&t.data.src===s&&(l=t.data.image,h=[l.width,l.height])}))}for(var g,p=Dr(e.layers),f={},m=[],_={},y={},v=is(e),x=ns(e),E=0,b=p.length;E<b;++E){var w=p[E],S=w.id;if("string"==typeof i&&w.source==i||-1!==i.indexOf(S)){var T=w["source-layer"];if(g){if(w.source!==g)throw new Error('Layer "'+S+'" does not use source "'+g)}else{g=w.source;var C=e.sources[g];if(!C)throw new Error('Source "'+g+'" is not defined');var R=C.type;if("vector"!==R&&"geojson"!==R)throw new Error('Source "'+g+'" is not of type "vector" or "geojson", but "'+R+'"')}var P=f[T];P||(P=[],f[T]=P),P.push({layer:w,index:E}),m.push(S)}}var I=new Wt.Z,L=new Vt.Z,M=[],F=function(i,s,c){var d=i.getProperties(),g=f[d.layer];if(g){var p=n.indexOf(s);-1==p&&(p=as(s,n));for(var m=Ls[i.getGeometry().getType()],E={id:i.getId(),properties:d,type:m},b=t.get("mapbox-featurestate")[i.getId()],w=-1,S=0,T=g.length;S<T;++S){var C=g[S],R=C.layer,P=R.id;if(void 0===c||c===P){var F=R.layout||Fs,A=R.paint||Fs;if(!("none"===F.visibility||"minzoom"in R&&p<R.minzoom||"maxzoom"in R&&p>=R.maxzoom)){var Z=R.filter;if(!Z||Os(P,Z,E,p,x)){R;var D=void 0,O=void 0,k=void 0,G=void 0,z=void 0,N=void 0,j=C.index;if(3==m&&("fill"==R.type||"fill-extrusion"==R.type))if(O=Zs(R,"paint",R.type+"-opacity",p,E,v,b),R.type+"-pattern"in A){var U=Zs(R,"paint",R.type+"-pattern",p,E,v,b);if(U){var B="string"==typeof U?zs(U,d):U.toString();if(l&&r&&r[B]){++w,(N=M[w])&&N.getFill()&&!N.getStroke()&&!N.getText()||(N=new Xt.ZP({fill:new Vt.Z}),M[w]=N),k=N.getFill(),N.setZIndex(j);var V=B+"."+O,q=y[V];if(!q){var W=r[B],X=os(W.width,W.height),H=X.getContext("2d");H.globalAlpha=O,H.drawImage(l,W.x,W.y,W.width,W.height,0,0,W.width,W.height),q=H.createPattern(X,"repeat"),y[V]=q}k.setColor(q)}}}else D=ks(Zs(R,"paint",R.type+"-color",p,E,v,b),O),R.type+"-outline-color"in A&&(z=ks(Zs(R,"paint",R.type+"-outline-color",p,E,v,b),O)),z||(z=D),(D||z)&&(++w,(!(N=M[w])||D&&!N.getFill()||!D&&N.getFill()||z&&!N.getStroke()||!z&&N.getStroke()||N.getText())&&(N=new Xt.ZP({fill:D?new Vt.Z:void 0,stroke:z?new Wt.Z:void 0}),M[w]=N),D&&(k=N.getFill()).setColor(D),z&&((G=N.getStroke()).setColor(z),G.setWidth(.5)),N.setZIndex(j));if(1!=m&&"line"==R.type){D=!("line-pattern"in A)&&"line-color"in A?ks(Zs(R,"paint","line-color",p,E,v,b),Zs(R,"paint","line-opacity",p,E,v,b)):void 0;var Y=Zs(R,"paint","line-width",p,E,v,b);D&&Y>0&&(++w,(N=M[w])&&N.getStroke()&&!N.getFill()&&!N.getText()||(N=new Xt.ZP({stroke:new Wt.Z}),M[w]=N),(G=N.getStroke()).setLineCap(Zs(R,"layout","line-cap",p,E,v,b)),G.setLineJoin(Zs(R,"layout","line-join",p,E,v,b)),G.setMiterLimit(Zs(R,"layout","line-miter-limit",p,E,v,b)),G.setColor(D),G.setWidth(Y),G.setLineDash(A["line-dasharray"]?Zs(R,"paint","line-dasharray",p,E,v,b).map((function(t){return t*Y})):null),N.setZIndex(j))}var K=!1,$=null,J=0,Q=void 0,tt=void 0,et=void 0;if((1==m||2==m)&&"icon-image"in F){var it=Zs(R,"layout","icon-image",p,E,v,b);if(it){Q="string"==typeof it?zs(it,d):it.toString();var nt=void 0,rt=a?a(t,Q):void 0;if(l&&r&&r[Q]||rt){var st=Zs(R,"layout","icon-rotation-alignment",p,E,v,b);if(2==m){var ot=i.getGeometry();if(ot.getFlatMidpoint||ot.getFlatMidpoints){var at=ot.getExtent();if(Math.sqrt(Math.max(Math.pow((at[2]-at[0])/s,2),Math.pow((at[3]-at[1])/s,2)))>150){var lt="MultiLineString"===ot.getType()?ot.getFlatMidpoints():ot.getFlatMidpoint();if(Is||(Is=new xt("Point",Ps=[NaN,NaN],[],{},null)),nt=Is,Ps[0]=lt[0],Ps[1]=lt[1],"line"===Zs(R,"layout","symbol-placement",p,E,v,b)&&"map"===st)for(var ht=ot.getStride(),ut=ot.getFlatCoordinates(),ct=0,dt=ut.length-ht;ct<dt;ct+=ht){var gt=ut[ct],pt=ut[ct+1],ft=ut[ct+ht],mt=ut[ct+ht+1],_t=Math.min(gt,ft),yt=Math.min(pt,mt),vt=Math.max(gt,ft),Et=Math.max(pt,mt);if(lt[0]>=_t&&lt[0]<=vt&&lt[1]>=yt&&lt[1]<=Et){J=Math.atan2(pt-mt,ft-gt);break}}}}}if(2!==m||nt){var bt=Zs(R,"layout","icon-size",p,E,v,b),wt=void 0!==A["icon-color"]?Zs(R,"paint","icon-color",p,E,v,b):null;if(!wt||0!==wt.a){var St=Zs(R,"paint","icon-halo-color",p,E,v,b),Tt=Zs(R,"paint","icon-halo-width",p,E,v,b),Ct=Q+"."+bt+"."+Tt+"."+St;if(null!==wt&&(Ct+="."+wt),!(tt=_[Ct])){var Rt=Ds(R,p,E,v),Pt=void 0;"icon-offset"in F&&((Pt=Zs(R,"layout","icon-offset",p,E,v,b).slice(0))[1]*=-1);var It=wt?[255*wt.r,255*wt.g,255*wt.b,wt.a]:void 0;if(rt){var Lt={color:It,rotateWithView:"map"===st,displacement:Pt,declutterMode:Rt};"string"==typeof rt?Lt.src=rt:(Lt.img=rt,Lt.imgSize=[rt.width,rt.height]),tt=new qt.Z(Lt)}else{var Mt=r[Q],Ft=void 0,At=void 0,Zt=void 0,Dt=void 0;Tt?(Mt.sdf?(Ft=gs(ps(l,Mt,wt),{x:0,y:0,width:Mt.width,height:Mt.height,pixelRatio:Mt.pixelRatio},Tt,St),It=void 0):Ft=gs(l,Mt,Tt,St),At=[Ft.width,Ft.height]):(Mt.sdf?(u||(u=ps(l,{x:0,y:0,width:h[0],height:h[1]},{r:1,g:1,b:1,a:1})),Ft=u):Ft=l,At=h,Zt=[Mt.width,Mt.height],Dt=[Mt.x,Mt.y]),tt=new qt.Z({color:It,img:Ft,imgSize:At,size:Zt,offset:Dt,rotateWithView:"map"===st,scale:bt/Mt.pixelRatio,displacement:Pt,declutterMode:Rt})}_[Ct]=tt}}tt&&(++w,(N=M[w])&&N.getImage()&&!N.getFill()&&!N.getStroke()||(N=new Xt.ZP,M[w]=N),N.setGeometry(nt),tt.setRotation(J+rs(Zs(R,"layout","icon-rotate",p,E,v,b))),tt.setOpacity(Zs(R,"paint","icon-opacity",p,E,v,b)),tt.setAnchor(Ms[Zs(R,"layout","icon-anchor",p,E,v,b)]),N.setImage(tt),$=N.getText(),N.setText(void 0),N.setZIndex(j),K=!0,et=!1)}else et=!0}}}if(1==m&&"circle"===R.type){++w,(N=M[w])&&N.getImage()&&!N.getFill()&&!N.getStroke()||(N=new Xt.ZP,M[w]=N);var Ot="circle-radius"in A?Zs(R,"paint","circle-radius",p,E,v,b):5,kt=ks(Zs(R,"paint","circle-stroke-color",p,E,v,b),Zs(R,"paint","circle-stroke-opacity",p,E,v,b)),Gt=ks(Zs(R,"paint","circle-color",p,E,v,b),Zs(R,"paint","circle-opacity",p,E,v,b)),zt=Zs(R,"paint","circle-stroke-width",p,E,v,b),Nt=Ot+"."+kt+"."+Gt+"."+zt;(tt=_[Nt])||(tt=new Bt.default({radius:Ot,stroke:kt&&zt>0?new Wt.Z({width:zt,color:kt}):void 0,fill:Gt?new Vt.Z({color:Gt}):void 0,declutterMode:"none"}),_[Nt]=tt),N.setImage(tt),$=N.getText(),N.setText(void 0),N.setGeometry(void 0),N.setZIndex(j),K=!0}var jt=void 0,Ut=void 0,Yt=void 0,Kt=void 0,$t=void 0,Jt=void 0;if("text-field"in F){Kt=Math.round(Zs(R,"layout","text-size",p,E,v,b));var Qt=Zs(R,"layout","text-font",p,E,v,b);Yt=Zs(R,"layout","text-line-height",p,E,v,b),(Ut=jr(o?o(Qt,e.metadata?e.metadata["ol:webfonts"]:void 0):Qt,Kt,Yt)).includes("sans-serif")||(Ut+=",sans-serif"),$t=Zs(R,"layout","text-letter-spacing",p,E,v,b),Jt=Zs(R,"layout","text-max-width",p,E,v,b);var te=Zs(R,"layout","text-field",p,E,v,b);jt="object"==typeof te&&te.sections?1===te.sections.length?te.toString():te.sections.reduce((function(t,e,i){var n=e.fontStack?e.fontStack.split(","):Qt,r=jr(o?o(n):n,Kt*(e.scale||1),Yt),s=e.text;if("\n"===s)return t.push("\n",""),t;if(2!=m){for(var a=0,l=(s=Es(s,r,Jt,$t).split("\n")).length;a<l;++a)a>0&&t.push("\n",""),t.push(s[a],r);return t}t.push(_s(s,$t),r)}),[]):zs(te,d).trim(),O=Zs(R,"paint","text-opacity",p,E,v,b)}if(jt&&O&&!et){K||(++w,(N=M[w])&&N.getText()&&!N.getFill()&&!N.getStroke()||(N=new Xt.ZP,M[w]=N),N.setImage(void 0),N.setGeometry(void 0)),N.getText()||N.setText($||new Ht.Z({padding:[2,2,2,2]})),$=N.getText();var ee=F["text-transform"];"uppercase"==ee?jt=Array.isArray(jt)?jt.map((function(t,e){return e%2?t:t.toUpperCase()})):jt.toUpperCase():"lowercase"==ee&&(jt=Array.isArray(jt)?jt.map((function(t,e){return e%2?t:t.toLowerCase()})):jt.toLowerCase());var ie=Array.isArray(jt)?jt:2==m?_s(jt,$t):Es(jt,Ut,Jt,$t);$.setText(ie),$.setFont(Ut),$.setRotation(rs(Zs(R,"layout","text-rotate",p,E,v,b)));var ne=Zs(R,"layout","text-anchor",p,E,v,b),re=K||1==m?"point":Zs(R,"layout","symbol-placement",p,E,v,b),se=void 0;if("line-center"===re?($.setPlacement("line"),se="center"):$.setPlacement(re),"line"===re&&"function"==typeof $.setRepeat){var oe=Zs(R,"layout","symbol-spacing",p,E,v,b);$.setRepeat(2*oe)}$.setOverflow("point"===re);var ae=Zs(R,"paint","text-halo-width",p,E,v,b),le=Zs(R,"layout","text-offset",p,E,v,b),he=Zs(R,"paint","text-translate",p,E,v,b),ue=0,ce=0;if("point"==re){se="center",-1!==ne.indexOf("left")?(se="left",ce=ae):-1!==ne.indexOf("right")&&(se="right",ce=-ae);var de=Zs(R,"layout","text-rotation-alignment",p,E,v,b);$.setRotateWithView("map"==de)}else $.setMaxAngle(rs(Zs(R,"layout","text-max-angle",p,E,v,b))*jt.length/ie.length),$.setRotateWithView(!1);$.setTextAlign(se);var ge="middle";0==ne.indexOf("bottom")?(ge="bottom",ue=-ae-.5*(Yt-1)*Kt):0==ne.indexOf("top")&&(ge="top",ue=ae+.5*(Yt-1)*Kt),$.setTextBaseline(ge);var pe=Zs(R,"layout","text-justify",p,E,v,b);$.setJustify("auto"===pe?void 0:pe),$.setOffsetX(le[0]*Kt+ce+he[0]),$.setOffsetY(le[1]*Kt+ue+he[1]),L.setColor(ks(Zs(R,"paint","text-color",p,E,v,b),O)),$.setFill(L);var fe=ks(Zs(R,"paint","text-halo-color",p,E,v,b),O);if(fe){I.setColor(fe),ae*=2;var me=.5*Kt;I.setWidth(ae<=me?ae:me),$.setStroke(I)}else $.setStroke(void 0);var _e=Zs(R,"layout","text-padding",p,E,v,b),ye=$.getPadding();_e!==ye[0]&&(ye[0]=_e,ye[1]=_e,ye[2]=_e,ye[3]=_e),N.setZIndex(j)}}}}}return w>-1?(M.length=w+1,M):void 0}};return t.setStyle(F),t.set("mapbox-source",g),t.set("mapbox-layers",m),t.set("mapbox-featurestate",t.get("mapbox-featurestate")||{}),F}(t,e,l,r,u,c,Rs,a.getImage),t.getStyle()?p().then(i).catch(n):n(new Error("Nothing to show for source ["+o+"]"))}}if(e.sprite){var m=new URL(function(t,e,i){var n=Br(t);if(!n)return decodeURI(new URL(t,i).href);var r="sprites/";if(0!==n.indexOf(r))throw new Error("unexpected sprites url: "+t);var s=n.slice(r.length);return Ur+"/styles/v1/"+s+"/sprite?access_token="+e}(e.sprite,a.accessToken,s||location.href)),_=.5==(window.devicePixelRatio>=1.5?.5:1)?"@2x":"",y=m.origin+m.pathname+_+".json"+m.search;new Promise((function(t,e){hs("Sprite",y,a).then(t).catch((function(i){hs("Sprite",y=m.origin+m.pathname+".json"+m.search,a).then(t).catch(e)}))})).then((function(t){if(void 0===t&&n(new Error("No sprites found.")),u=t,c=m.origin+m.pathname+_+".png"+m.search,a.transformRequest){var e=a.transformRequest(c,"SpriteImage");e instanceof Request&&(c=encodeURI(e.url))}f()})).catch((function(t){n(new Error("Sprites cannot be loaded: "+y+": "+t.message))}))}else f()})).catch(n)}))}var Hr={};function Yr(t,e,i){return void 0===i&&(i={}),us(e,i).then((function(e){!function(t,e,i){e.layers.some((function(e){if("background"===e.type){if(t instanceof tt.Z)return t.setBackground((function(t){return Kr(e,t,i,{})})),!0;if(t instanceof re.Z||t instanceof r.Z)return t.getLayers().push(function(t,e,i){var n=document.createElement("div");return n.className="ol-mapbox-style-background",n.style.position="absolute",n.style.width="100%",n.style.height="100%",new tt.Z({source:new se.Z({}),render:function(r){var s=Kr(t,r.viewState.resolution,e,i);return n.style.backgroundColor=s,n}})}(e,i,{})),!0}}))}(t,e,i)}))}function Kr(t,e,i,n){var r={id:t.id,type:t.type},s=t.layout||{},o=t.paint||{};r.paint=o;var a,l,h=as(e,i.resolutions||ss);return void 0!==o["background-color"]&&(a=Zs(r,"paint","background-color",h,Hr,n)),void 0!==o["background-opacity"]&&(l=Zs(r,"paint","background-opacity",h,Hr,n)),"none"==s.visibility?void 0:ks(a,l)}var $r={},Jr={},Qr=0;function ts(t){return t.id||(t.id=Qr++),t.id}function es(t,e){return ts(t)+"."+(0,S.sq)(e)}function is(t){var e=$r[t.id];return e||(e={},$r[ts(t)]=e),e}function ns(t){var e=Jr[t.id];return e||(e={},Jr[ts(t)]=e),e}function rs(t){return t*Math.PI/180}var ss=function(){for(var t=[],e=78271.51696402048;t.length<=24;e/=2)t.push(e);return t}();function os(t,e){if("undefined"!=typeof WorkerGlobalScope&&self instanceof WorkerGlobalScope&&"undefined"!=typeof OffscreenCanvas)return new OffscreenCanvas(t,e);var i=document.createElement("canvas");return i.width=t,i.height=e,i}function as(t,e){for(var i=0,n=e.length;i<n;++i)if(e[i]<t&&i+1<n){var r=e[i]/e[i+1];return i+Math.log(e[i]/t)/Math.log(r)}return n-1}var ls={};function hs(t,e,i,n){if(void 0===i&&(i={}),e in ls)return n&&(n.request=ls[e][0]),ls[e][1];var r=i.transformRequest&&i.transformRequest(e,t)||new Request(e);r.headers.get("Accept")||r.headers.set("Accept","application/json"),n&&(n.request=r);var s=fetch(r).then((function(t){return delete ls[e],t.ok?t.json():Promise.reject(new Error("Error fetching source "+e))})).catch((function(t){return delete ls[e],Promise.reject(new Error("Error fetching source "+e))}));return ls[e]=[r,s],s}function us(t,e){if("string"!=typeof t)return Promise.resolve(t);if(!t.trim().startsWith("{"))return hs("Style",t=Vr(t,e.accessToken),e);try{var i=JSON.parse(t);return Promise.resolve(i)}catch(t){return Promise.reject(t)}}function cs(t,e){if(e.transformRequest){var i=e.transformRequest(t,"Tiles");if(i instanceof Request)return decodeURI(i.url)}return t}var ds={};function gs(t,e,i,n){var r=document.createElement("canvas"),s=[2*i*e.pixelRatio+e.width,2*i*e.pixelRatio+e.height];r.width=s[0],r.height=s[1];var o=r.getContext("2d");o.drawImage(t,e.x,e.y,e.width,e.height,i*e.pixelRatio,i*e.pixelRatio,e.width,e.height);var a=o.getImageData(0,0,s[0],s[1]);o.globalCompositeOperation="destination-over",o.fillStyle="rgba("+255*n.r+","+255*n.g+","+255*n.b+","+n.a+")";for(var l=a.data,h=0,u=a.width;h<u;++h)for(var c=0,d=a.height;c<d;++c)l[4*(c*u+h)+3]>0&&o.arc(h,c,i*e.pixelRatio,0,2*Math.PI);return o.fill(),r}function ps(t,e,i){var n=document.createElement("canvas");n.width=e.width,n.height=e.height;var r=n.getContext("2d");r.drawImage(t,e.x,e.y,e.width,e.height,0,0,e.width,e.height);for(var s,o,a=r.getImageData(0,0,e.width,e.height),l=a.data,h=0,u=a.width;h<u;++h)for(var c=0,d=a.height;c<d;++c){var g=4*(c*u+h),p=(.65,.85,s=l[g+3]/255,void 0,(o=Math.max(0,Math.min(1,(s-.65)/(.85-.65))))*o*(3-2*o));p>0?(l[g+0]=Math.round(255*i.r*p),l[g+1]=Math.round(255*i.g*p),l[g+2]=Math.round(255*i.b*p),l[g+3]=Math.round(255*p)):l[g+3]=0}return r.putImageData(a,0,0),n}var fs,ms=Array(256).join(" ");function _s(t,e){if(e>=.05){for(var i="",n=t.split("\n"),r=ms.slice(0,Math.round(e/.1)),s=0,o=n.length;s<o;++s)s>0&&(i+="\n"),i+=n[s].split("").join(r);return i}return t}function ys(){return fs||(fs=os(1,1).getContext("2d")),fs}function vs(t,e){return ys().measureText(t).width+(t.length-1)*e}var xs={};function Es(t,e,i,n){if(-1!==t.indexOf("\n")){for(var r=t.split("\n"),s=[],o=0,a=r.length;o<a;++o)s.push(Es(r[o],e,i,n));return s.join("\n")}var l=i+","+e+","+t+","+n,h=xs[l];if(!h){var u=t.split(" ");if(u.length>1){var c=ys();c.font=e;for(var d=c.measureText("M").width*i,g="",p=[],f=0,m=u.length;f<m;++f){var _=u[f],y=g+(g?" ":"")+_;vs(y,n)<=d?g=y:(g&&p.push(g),g=_)}g&&p.push(g);for(var v=0,x=p.length;v<x&&x>1;++v){var E=p[v];if(vs(E,n)<.35*d){var b=v>0?vs(p[v-1],n):1/0,w=v<x-1?vs(p[v+1],n):1/0;p.splice(v,1),x-=1,b<w?(p[v-1]+=" "+E,v-=1):p[v]=E+" "+p[v]}}for(var S=0,T=p.length-1;S<T;++S){var C=p[S],R=p[S+1];if(vs(C,n)>.7*d&&vs(R,n)<.6*d){var P=C.split(" "),I=P.pop();vs(I,n)<.2*d&&(p[S]=P.join(" "),p[S+1]=I+" "+R),T-=1}}h=p.join("\n")}else h=t;h=_s(h,n),xs[l]=h}return h}var bs,ws=/font-family: ?([^;]*);/,Ss=/("|')/g;function Ts(t){if(!bs){bs={};for(var e=document.styleSheets,i=0,n=e.length;i<n;++i){var r=e[i];try{var s=r.rules||r.cssRules;if(s)for(var o=0,a=s.length;o<a;++o){var l=s[o];if(5==l.type){var h=l.cssText.match(ws);bs[h[1].replace(Ss,"")]=!0}}}catch(t){}}}return t in bs}var Cs={};function Rs(t,e){void 0===e&&(e="https://cdn.jsdelivr.net/npm/@fontsource/{font-family}/{fontweight}{-fontstyle}.css");var i=t.toString();if(i in Cs)return Cs[i];for(var n=[],r=0,s=t.length;r<s;++r){t[r]=t[r].replace("Arial Unicode MS","Arial");var o=t[r],a=jr(o,1);(0,Yt.Qx)(a);var l=a.split(" ");n.push([l.slice(3).join(" ").replace(/"/g,""),l[1],l[0]])}for(var h=0,u=n.length;h<u;++h){var c=n[h],d=c[0];if(!Ts(d)&&100!==Yt.sG.get(c[2]+"\n"+c[1]+" \n"+d)){var g=e.replace("{font-family}",d.replace(/ /g,"-").toLowerCase()).replace("{Font+Family}",d.replace(/ /g,"+")).replace("{fontweight}",c[1]).replace("{-fontstyle}",c[2].replace("normal","").replace(/(.+)/,"-$1")).replace("{fontstyle}",c[2]);if(!document.querySelector('link[href="'+g+'"]')){var p=document.createElement("link");p.href=g,p.rel="stylesheet",document.head.appendChild(p)}}}return Cs[i]=t,t}var Ps,Is,Ls={Point:1,MultiPoint:1,LineString:2,MultiLineString:2,Polygon:3,MultiPolygon:3},Ms={center:[.5,.5],left:[0,.5],right:[1,.5],top:[.5,0],bottom:[.5,1],"top-left":[0,0],"top-right":[1,0],"bottom-left":[0,1],"bottom-right":[1,1]},Fs={},As={zoom:0};function Zs(t,e,i,n,r,s,o){var a=t.id;s||(s={},console.warn("No functionCache provided to getValue()")),s[a]||(s[a]={});var l,h=s[a];if(!h[i]){var u=(t[e]||Fs)[i],c=vr[e+"_"+t.type][i];void 0===u&&(u=c.default);var d=(l=u,Array.isArray(l)&&l.length>0&&"string"==typeof l[0]&&l[0]in lr);if(!d&&cr(u)&&(u=function(t,e){var i=t.stops;if(!i)return function(t,e){var i=["get",t.property];if(void 0===t.default)return"string"===e.type?["string",i]:i;if("enum"===e.type)return["match",i,Object.keys(e.values),i,t.default];var n=["color"===e.type?"to-color":e.type,i,be(t.default)];return"array"===e.type&&n.splice(1,0,e.value,e.length||null),n}(t,e);var n=i&&"object"==typeof i[0][0],r=n||void 0!==t.property,s=n||!r;return i=i.map((function(t){return!r&&e.tokens&&"string"==typeof t[1]?[t[0],Ie(t[1])]:[t[0],be(t[1])]})),n?function(t,e,i){for(var n={},r={},s=[],o=0;o<i.length;o++){var a=i[o],l=a[0].zoom;void 0===n[l]&&(n[l]={zoom:l,type:t.type,property:t.property,default:t.default},r[l]=[],s.push(l)),r[l].push([a[0].value,a[1]])}if("exponential"===Pe({},e)){for(var h=[we(t),["linear"],["zoom"]],u=0,c=s;u<c.length;u+=1){var d=c[u];Re(h,d,Te(n[d],e,r[d]),!1)}return h}for(var g=["step",["zoom"]],p=0,f=s;p<f.length;p+=1){var m=f[p];Re(g,m,Te(n[m],e,r[m]),!0)}return Ce(g),g}(t,e,i):s?function(t,e,i,n){void 0===n&&(n=["zoom"]);var r,s=Pe(t,e),o=!1;if("interval"===s)r=["step",n],o=!0;else{if("exponential"!==s)throw new Error('Unknown zoom function type "'+s+'"');var a=void 0!==t.base?t.base:1;r=[we(t),1===a?["linear"]:["exponential",a],n]}for(var l=0,h=i;l<h.length;l+=1){var u=h[l];Re(r,u[0],u[1],o)}return Ce(r),r}(t,e,i):Te(t,e,i)}(u,c),d=!0),d){var g=function(t,e){var i=mr(t,e);if("error"===i.result)throw new Error(i.value.map((function(t){return t.key+": "+t.message})).join(", "));return i.value}(u,c);h[i]=g.evaluate.bind(g)}else"color"==c.type&&(u=Ee.parse(u)),h[i]=function(){return u}}return As.zoom=n,h[i](As,r,o)}function Ds(t,e,i,n){return Zs(t,"layout","icon-allow-overlap",e,i,n)?Zs(t,"layout","icon-ignore-placement",e,i,n)?"none":"obstacle":"declutter"}function Os(t,e,i,n,r){return r||console.warn("No filterCache provided to evaluateFilter()"),t in r||(r[t]=Er(e).filter),As.zoom=n,r[t](As,i)}function ks(t,e){if(t){if(0===t.a||0===e)return;var i=t.a;return e=void 0===e?1:e,0===i?"transparent":"rgba("+Math.round(255*t.r/i)+","+Math.round(255*t.g/i)+","+Math.round(255*t.b/i)+","+i*e+")"}return t}var Gs=/\{[^{}}]*\}/g;function zs(t,e){return t.replace(Gs,(function(t){return e[t.slice(1,-1)]||""}))}var Ns={};class js extends et.ZP{constructor(t){super(it.Z.ERROR),this.error=t}}const Us=class extends jt{constructor(t){const e=!("declutter"in t)||t.declutter,i=new Ut.Z({state:"loading",format:new Ct});super({source:i,background:t.background,declutter:e,className:t.className,opacity:t.opacity,visible:t.visible,zIndex:t.zIndex,minResolution:t.minResolution,maxResolution:t.maxResolution,minZoom:t.minZoom,maxZoom:t.maxZoom,renderOrder:t.renderOrder,renderBuffer:t.renderBuffer,renderMode:t.renderMode,map:t.map,updateWhileAnimating:t.updateWhileAnimating,updateWhileInteracting:t.updateWhileInteracting,preload:t.preload,useInterimTilesOnError:t.useInterimTilesOnError,properties:t.properties}),t.accessToken&&(this.accessToken=t.accessToken),Xr(this,t.styleUrl,t.layers||t.source,{accessToken:this.accessToken}).then((()=>{i.setState("ready")})).catch((t=>{this.dispatchEvent(new js(t)),this.getSource().setState("error")})),void 0===this.getBackground()&&Yr(this,t.styleUrl,{accessToken:this.accessToken})}};var Bs=i(1666),Vs=i(9186),qs=i(5682),Ws=i(8294),Xs=i(553),Hs=i(2582);class Ys extends Vs.Z{constructor(t){super(t),this.vectorRenderer_=new qs.Z(t),this.layerImageRatio_=t.getImageRatio(),this.coordinateToVectorPixelTransform_=(0,R.Ue)(),this.renderedPixelToCoordinateTransform_=null}disposeInternal(){this.vectorRenderer_.dispose(),super.disposeInternal()}getFeatures(t){if(!this.vectorRenderer_)return Promise.resolve([]);const e=(0,R.nn)(this.coordinateToVectorPixelTransform_,(0,R.nn)(this.renderedPixelToCoordinateTransform_,t.slice()));return this.vectorRenderer_.getFeatures(e)}handleFontsChanged(){this.vectorRenderer_.handleFontsChanged()}prepareFrame(t){const e=t.pixelRatio,i=t.viewState,n=i.resolution,r=t.viewHints,s=this.vectorRenderer_;let o=t.extent;1!==this.layerImageRatio_&&(o=o.slice(0),(0,j.scaleFromCenter)(o,this.layerImageRatio_));const l=(0,j.getWidth)(o)/n,h=(0,j.getHeight)(o)/n;if(!r[a.Z.ANIMATING]&&!r[a.Z.INTERACTING]&&!(0,j.isEmpty)(o)){s.useContainer(null,null);const r=s.context,a=t.layerStatesArray[t.layerIndex],u=Object.assign({},a,{opacity:1}),c=Object.assign({},t,{declutterTree:new Hs(9),extent:o,size:[l,h],viewState:Object.assign({},t.viewState,{rotation:0}),layerStatesArray:[u],layerIndex:0});let d=!0;const g=new Ws.Z(o,n,e,r.canvas,(function(t){s.prepareFrame(c)&&s.replayGroupChanged&&(s.clipping=!1,s.renderFrame(c,null)&&(s.renderDeclutter(c),d=!1),t())}));g.addEventListener(it.Z.CHANGE,(()=>{if(g.getState()!==Xs.Z.LOADED)return;this.image_=d?null:g;const t=g.getResolution(),n=g.getPixelRatio(),r=t*e/n;this.renderedResolution=r,this.coordinateToVectorPixelTransform_=(0,R.qC)(this.coordinateToVectorPixelTransform_,l/2,h/2,1/r,-1/r,0,-i.center[0],-i.center[1])})),g.load()}return this.image_&&(this.renderedPixelToCoordinateTransform_=t.pixelToCoordinateTransform.slice()),!!this.image_}preRender(){}postRender(){}renderDeclutter(){}forEachFeatureAtCoordinate(t,e,i,n,r){return this.vectorRenderer_?this.vectorRenderer_.forEachFeatureAtCoordinate(t,e,i,n,r):super.forEachFeatureAtCoordinate(t,e,i,n,r)}}const Ks=Ys;class $s extends s.Z{constructor(t){t=t||{};const e=Object.assign({},t);delete e.imageRatio,super(e),this.imageRatio_=void 0!==t.imageRatio?t.imageRatio:1}getImageRatio(){return this.imageRatio_}createRenderer(){return new Ks(this)}}const Js=$s;var Qs=i(3130),to=i(9494),eo=i(208),io=i(825);class no extends eo.Z{constructor(t){super(),this.tile,this.handleTileChange_=this.handleTileChange_.bind(this),this.gutter_=t.gutter||0,this.helper_=t.helper,this.loaded=!1,this.ready=!1}setTile(t){if(t!==this.tile)if(this.tile&&this.tile.removeEventListener(it.Z.CHANGE,this.handleTileChange_),this.tile=t,this.loaded=t.getState()===Lt.Z.LOADED,this.loaded)this.uploadTile();else{if(t instanceof io.Z){const e=t.getImage();e instanceof Image&&!e.crossOrigin&&(e.crossOrigin="anonymous")}t.addEventListener(it.Z.CHANGE,this.handleTileChange_)}}uploadTile(){(0,S.O3)()}setReady(){this.ready=!0,this.dispatchEvent(it.Z.CHANGE)}handleTileChange_(){this.tile.getState()===Lt.Z.LOADED&&(this.loaded=!0,this.uploadTile())}disposeInternal(){this.tile.removeEventListener(it.Z.CHANGE,this.handleTileChange_)}}const ro=no;var so=i(349);function oo(t,e,i){const n=i?t.LINEAR:t.NEAREST;t.bindTexture(t.TEXTURE_2D,e),t.texParameteri(t.TEXTURE_2D,t.TEXTURE_WRAP_S,t.CLAMP_TO_EDGE),t.texParameteri(t.TEXTURE_2D,t.TEXTURE_WRAP_T,t.CLAMP_TO_EDGE),t.texParameteri(t.TEXTURE_2D,t.TEXTURE_MIN_FILTER,n),t.texParameteri(t.TEXTURE_2D,t.TEXTURE_MAG_FILTER,n)}function ao(t,e,i,n,r,s){const o=t.getGL();let a,l;i instanceof Float32Array?(a=o.FLOAT,t.getExtension("OES_texture_float"),l=null!==t.getExtension("OES_texture_float_linear")):(a=o.UNSIGNED_BYTE,l=!0),oo(o,e,s&&l);const h=i.byteLength/n[1];let u,c=1;switch(h%8==0?c=8:h%4==0?c=4:h%2==0&&(c=2),r){case 1:u=o.LUMINANCE;break;case 2:u=o.LUMINANCE_ALPHA;break;case 3:u=o.RGB;break;case 4:u=o.RGBA;break;default:throw new Error(`Unsupported number of bands: ${r}`)}const d=o.getParameter(o.UNPACK_ALIGNMENT);o.pixelStorei(o.UNPACK_ALIGNMENT,c),o.texImage2D(o.TEXTURE_2D,0,u,n[0],n[1],0,u,a,i),o.pixelStorei(o.UNPACK_ALIGNMENT,d)}let lo=null;const ho=class extends ro{constructor(t){super(t),this.textures=[],this.renderSize_=(0,At.Pq)(t.grid.getTileSize(t.tile.tileCoord[0])),this.bandCount=NaN;const e=new m(h,c);e.fromArray([0,1,1,1,1,0,0,0]),this.helper_.flushBufferData(e),this.coords=e,this.setTile(t.tile)}uploadTile(){const t=this.helper_,e=t.getGL(),i=this.tile;let n;this.textures.length=0,n=i instanceof io.Z||i instanceof to.Z?i.getImage():i.getData();const r=(0,so.G0)(n);if(r){const t=e.createTexture();return this.textures.push(t),this.bandCount=4,function(t,e,i,n){oo(t,e,n),t.texImage2D(t.TEXTURE_2D,0,t.RGBA,t.RGBA,t.UNSIGNED_BYTE,i)}(e,t,r,i.interpolate),void this.setReady()}n=(0,so.px)(n);const s=i.getSize(),o=[s[0]+2*this.gutter_,s[1]+2*this.gutter_],a=n instanceof Float32Array,l=o[0]*o[1],h=a?Float32Array:Uint8Array,u=h.BYTES_PER_ELEMENT,c=n.byteLength/o[1];this.bandCount=Math.floor(c/u/o[0]);const d=Math.ceil(this.bandCount/4);if(1===d){const r=e.createTexture();return this.textures.push(r),ao(t,r,n,o,this.bandCount,i.interpolate),void this.setReady()}const g=new Array(d);for(let t=0;t<d;++t){const i=e.createTexture();this.textures.push(i);const n=t<d-1?4:(this.bandCount-1)%4+1;g[t]=new h(l*n)}let p=0,f=0;const m=o[0]*this.bandCount;for(let t=0;t<o[1];++t){for(let t=0;t<m;++t){const e=n[f+t],i=Math.floor(p/this.bandCount),r=t%this.bandCount,s=g[Math.floor(r/4)];s[i*(s.length/l)+r%4]=e,++p}f+=c/u}for(let e=0;e<d;++e){const n=this.textures[e],r=g[e];ao(t,n,r,o,r.length/l,i.interpolate)}this.setReady()}disposeInternal(){const t=this.helper_.getGL();this.helper_.deleteBuffer(this.coords);for(let e=0;e<this.textures.length;++e)t.deleteTexture(this.textures[e]);this.tile.removeEventListener(it.Z.CHANGE,this.handleTileChange_)}getImagePixelData_(t,e,i){const n=this.gutter_,r=this.renderSize_[0],s=this.renderSize_[1];lo||(lo=(0,W.E4)(1,1,void 0,{willReadFrequently:!0})),lo.clearRect(0,0,1,1);const o=t.width-2*n,a=t.height-2*n,l=n+Math.floor(o*(e/r)),h=n+Math.floor(a*(i/s));let u;try{lo.drawImage(t,l,h,1,1,0,0,1,1),u=lo.getImageData(0,0,1,1).data}catch(t){return lo=null,null}return u}getArrayPixelData_(t,e,i,n){const r=this.gutter_,s=this.renderSize_[0],o=this.renderSize_[1],a=e[0],l=e[1],h=a+2*r,u=l+2*r,c=r+Math.floor(a*(i/s)),d=r+Math.floor(l*(n/o));if(t instanceof DataView){const e=t.byteLength/(h*u),i=e*(d*h+c),n=t.buffer.slice(i,i+e);return new DataView(n)}const g=this.bandCount*(d*h+c);return t.slice(g,g+this.bandCount)}getPixelData(t,e){if(!this.loaded)return null;if(this.tile instanceof so.ZP){const i=this.tile.getData(),n=(0,so.px)(i);if(n){const i=this.tile.getSize();return this.getArrayPixelData_(n,i,t,e)}return this.getImagePixelData_((0,so.G0)(i),t,e)}return this.getImagePixelData_(this.tile.getImage(),t,e)}};var uo=i(6131),co=i(2519),go=i(8634);const po={};function fo(t,e){return t.tileIds.has((0,S.sq)(e))}function mo(t,e,i){const n=t.representationsByZ;i in n||(n[i]=new Set),n[i].add(e),t.tileIds.add((0,S.sq)(e.tile))}function _o(t,e){const i=t.layerStatesArray[t.layerIndex];i.extent&&(e=(0,j.getIntersection)(e,(0,nt.fromUserExtent)(i.extent,t.viewState.projection)));const n=i.layer.getRenderSource();if(!n.getWrapX()){const i=n.getTileGridForProjection(t.viewState.projection).getExtent();i&&(e=(0,j.getIntersection)(e,i))}return e}function yo(t,e){return`${t.getKey()},${(0,go.km)(e)}`}const vo=class extends k{constructor(t,e){super(t,{uniforms:e.uniforms,postProcesses:e.postProcesses}),this.renderComplete=!1,this.tileTransform_=(0,R.Ue)(),this.tempMat4=[1,0,0,0,0,1,0,0,0,0,1,0,0,0,0,1],this.tempTileRange_=new co.Z(0,0,0,0),this.tempTileCoord_=(0,go.T9)(0,0,0),this.tempSize_=[0,0];const i=void 0!==e.cacheSize?e.cacheSize:512;this.tileRepresentationCache=new uo.Z(i),this.frameState=null,this.projection_=void 0}reset(t){super.reset({uniforms:t.uniforms})}isDrawableTile_(t){const e=this.getLayer(),i=t.getState(),n=e.getUseInterimTilesOnError();return i==Lt.Z.LOADED||i==Lt.Z.EMPTY||i==Lt.Z.ERROR&&!n}prepareFrameInternal(t){this.projection_?t.viewState.projection!==this.projection_&&(this.clearCache(),this.projection_=t.viewState.projection):this.projection_=t.viewState.projection;const e=this.getLayer().getRenderSource();return!!e&&!(0,j.isEmpty)(_o(t,t.extent))&&"ready"===e.getState()}createTileRepresentation(t){return(0,S.O3)()}enqueueTiles(t,e,i,n,r){const s=t.viewState,o=this.getLayer(),a=o.getRenderSource(),l=a.getTileGridForProjection(s.projection),h=a.getGutterForProjection(s.projection),u=(0,S.sq)(a);u in t.wantedTiles||(t.wantedTiles[u]={});const c=t.wantedTiles[u],d=this.tileRepresentationCache,g=o.getMapInternal(),p=Math.max(i-r,l.getMinZoom(),l.getZForResolution(Math.min(o.getMaxResolution(),g?g.getView().getResolutionForZoom(Math.max(o.getMinZoom(),0)):l.getResolution(0)),a.zDirection));for(let r=i;r>=p;--r){const i=l.getTileRangeForExtentAndZ(e,r,this.tempTileRange_),o=l.getResolution(r);for(let e=i.minX;e<=i.maxX;++e)for(let g=i.minY;g<=i.maxY;++g){const i=(0,go.T9)(r,e,g,this.tempTileCoord_),p=yo(a,i);let f,m;if(d.containsKey(p)&&(f=d.get(p),m=f.tile),f&&f.tile.key===a.getKey()||(m=a.getTile(r,e,g,t.pixelRatio,s.projection)),fo(n,m))continue;if(f)if(this.isDrawableTile_(m))f.setTile(m);else{const t=m.getInterimTile();f.setTile(t)}else f=this.createTileRepresentation({tile:m,grid:l,helper:this.helper,gutter:h}),d.set(p,f);mo(n,f,r);const _=m.getKey();c[_]=!0,m.getState()===Lt.Z.IDLE&&(t.tileQueue.isKeyQueued(_)||t.tileQueue.enqueue([m,u,l.getTileCoordCenter(i),o]))}}}beforeTilesRender(t,e){this.helper.prepareDraw(this.frameState,!e,!0)}renderTile(t,e,i,n,r,s,o,a,l,h,u){}drawTile_(t,e,i,n,r,s,o){if(!e.loaded)return;const a=e.tile.tileCoord,l=(0,go.km)(a),h=l in s?s[l]:1,u=o.getResolution(i),c=(0,At.Pq)(o.getTileSize(i),this.tempSize_),d=o.getOrigin(i),g=o.getTileCoordExtent(a),p=h<1?-1:1/(i+2);h<1&&(t.animate=!0);const f=t.viewState,m=f.center[0],_=f.center[1],y=c[0]+2*n,v=c[1]+2*n,x=y/v,E=(m-d[0])/(c[0]*u),b=(d[1]-_)/(c[1]*u),w=f.resolution/u,S=a[1],T=a[2];(0,R.mc)(this.tileTransform_),(0,R.bA)(this.tileTransform_,2/(t.size[0]*w/y),-2/(t.size[1]*w/y)),(0,R.U1)(this.tileTransform_,f.rotation),(0,R.bA)(this.tileTransform_,1,1/x),(0,R.Iu)(this.tileTransform_,(c[0]*(S-E)-n)/y,(c[1]*(T-b)-n)/v),this.renderTile(e,this.tileTransform_,t,r,u,c,d,g,p,n,h)}renderFrame(t){this.frameState=t,this.renderComplete=!0;const e=this.helper.getGL();this.preRender(e,t);const i=t.viewState,n=this.getLayer(),r=n.getRenderSource(),s=r.getTileGridForProjection(i.projection),o=r.getGutterForProjection(i.projection),a=_o(t,t.extent),l=s.getZForResolution(i.resolution,r.zDirection),h={tileIds:new Set,representationsByZ:{}},u=n.getPreload();if(t.nextExtent){const e=s.getZForResolution(i.nextResolution,r.zDirection),n=_o(t,t.nextExtent);this.enqueueTiles(t,n,e,h,u)}this.enqueueTiles(t,a,l,h,0),u>0&&setTimeout((()=>{this.enqueueTiles(t,a,l-1,h,u-1)}),0);const c={},d=(0,S.sq)(this),g=t.time;let p=!1;for(const t of h.representationsByZ[l]){const e=t.tile;if((e instanceof to.Z||e instanceof Qs.Z)&&e.getState()===Lt.Z.EMPTY)continue;const i=e.tileCoord;if(t.loaded){const t=e.getAlpha(d,g);if(1===t){e.endTransition(d);continue}p=!0,c[(0,go.km)(i)]=t}if(this.renderComplete=!1,this.findAltTiles_(s,i,l+1,h))continue;const n=s.getMinZoom();for(let t=l-1;t>=n&&!this.findAltTiles_(s,i,t,h);--t);}this.beforeTilesRender(t,p);const f=h.representationsByZ,m=Object.keys(f).map(Number).sort(G.$1);for(let e=0,i=m.length;e<i;++e){const i=m[e];for(const e of f[i]){const n=e.tile.tileCoord;(0,go.km)(n)in c||this.drawTile_(t,e,i,o,a,c,s)}}for(const e of f[l]){const i=e.tile.tileCoord;(0,go.km)(i)in c&&this.drawTile_(t,e,l,o,a,c,s)}this.helper.finalizeDraw(t,this.dispatchPreComposeEvent,this.dispatchPostComposeEvent);const _=this.helper.getCanvas(),y=this.tileRepresentationCache;for(;y.canExpireCache();)y.pop().dispose();return t.postRenderFunctions.push((function(t,e){r.updateCacheSize(.1,e.viewState.projection),r.expireCache(e.viewState.projection,po)})),this.postRender(e,t),_}findAltTiles_(t,e,i,n){const r=t.getTileRangeForTileCoordAndZ(e,i,this.tempTileRange_);if(!r)return!1;let s=!0;const o=this.tileRepresentationCache,a=this.getLayer().getRenderSource();for(let t=r.minX;t<=r.maxX;++t)for(let e=r.minY;e<=r.maxY;++e){const r=yo(a,[i,t,e]);let l=!1;if(o.containsKey(r)){const t=o.get(r);t.loaded&&!fo(n,t.tile)&&(mo(n,t,i),l=!0)}l||(s=!1)}return s}clearCache(){const t=this.tileRepresentationCache;t.forEach((t=>t.dispose())),t.clear()}removeHelper(){this.helper&&this.clearCache(),super.removeHelper()}disposeInternal(){super.disposeInternal(),delete this.frameState}},xo="u_tileTransform",Eo="u_transitionAlpha",bo="u_depth",wo="u_renderExtent",So="u_resolution",To="u_zoom",Co="u_tileTextures",Ro="u_texturePixelWidth",Po="u_texturePixelHeight",Io="u_textureResolution",Lo="u_textureOriginX",Mo="u_textureOriginY",Fo="a_textureCoord",Ao=[{name:Fo,size:2,type:I}],Zo=class extends vo{constructor(t,e){super(t,e),this.program_,this.vertexShader_=e.vertexShader,this.fragmentShader_=e.fragmentShader,this.indices_=new m(u,c),this.indices_.fromArray([0,1,3,1,2,3]),this.paletteTextures_=e.paletteTextures||[]}reset(t){super.reset(t),this.vertexShader_=t.vertexShader,this.fragmentShader_=t.fragmentShader,this.helper&&(this.program_=this.helper.getProgram(this.fragmentShader_,this.vertexShader_))}afterHelperCreated(){this.program_=this.helper.getProgram(this.fragmentShader_,this.vertexShader_),this.helper.flushBufferData(this.indices_)}createTileRepresentation(t){return new ho(t)}beforeTilesRender(t,e){super.beforeTilesRender(t,e),this.helper.useProgram(this.program_,t)}renderTile(t,e,i,n,r,s,o,a,l,h,u){const c=this.helper.getGL();this.helper.bindBuffer(t.coords),this.helper.bindBuffer(this.indices_),this.helper.enableAttributes(Ao);let d=0;for(;d<t.textures.length;){const e=`${Co}[${d}]`;this.helper.bindTexture(t.textures[d],d,e),++d}for(let t=0;t<this.paletteTextures_.length;++t){const e=this.paletteTextures_[t],i=e.getTexture(c);this.helper.bindTexture(i,d,e.name),++d}const g=i.viewState,p=s[0]+2*h,f=s[1]+2*h,m=t.tile.tileCoord,_=m[1],y=m[2];this.helper.setUniformMatrixValue(xo,P(this.tempMat4,e)),this.helper.setUniformFloatValue(Eo,u),this.helper.setUniformFloatValue(bo,l);let v=n;h>0&&(v=a,(0,j.getIntersection)(v,n,v)),this.helper.setUniformFloatVec4(wo,v),this.helper.setUniformFloatValue(So,g.resolution),this.helper.setUniformFloatValue(To,g.zoom),this.helper.setUniformFloatValue(Ro,p),this.helper.setUniformFloatValue(Po,f),this.helper.setUniformFloatValue(Io,r),this.helper.setUniformFloatValue(Lo,o[0]+_*s[0]*r-h*r),this.helper.setUniformFloatValue(Mo,o[1]-y*s[1]*r+h*r),this.helper.drawElements(0,this.indices_.getSize())}getData(t){if(!this.helper.getGL())return null;const e=this.frameState;if(!e)return null;const i=this.getLayer(),n=(0,R.nn)(e.pixelToCoordinateTransform,t.slice()),r=e.viewState,s=i.getExtent();if(s&&!(0,j.containsCoordinate)((0,nt.fromUserExtent)(s,r.projection),n))return null;const o=i.getSources((0,j.boundingExtent)([n]),r.resolution);let a,l,h;for(a=o.length-1;a>=0;--a)if(l=o[a],"ready"===l.getState()){if(h=l.getTileGridForProjection(r.projection),l.getWrapX())break;const t=h.getExtent();if(!t||(0,j.containsCoordinate)(t,n))break}if(a<0)return null;const u=this.tileRepresentationCache;for(let t=h.getZForResolution(r.resolution);t>=h.getMinZoom();--t){const e=h.getTileCoordForCoordAndZ(n,t),i=yo(l,e);if(!u.containsKey(i))continue;const r=u.get(i),s=r.tile;if((s instanceof to.Z||s instanceof Qs.Z)&&s.getState()===Lt.Z.EMPTY)return null;if(!r.loaded)continue;const o=h.getOrigin(t),a=(0,At.Pq)(h.getTileSize(t)),c=h.getResolution(t),d=(n[0]-o[0])/c-e[1]*a[0],g=(o[1]-n[1])/c-e[2]*a[1];return r.getPixelData(d,g)}return null}disposeInternal(){const t=this.helper;t&&(t.getGL().deleteProgram(this.program_),delete this.program_,t.deleteBuffer(this.indices_)),super.disposeInternal(),delete this.indices_}};var Do=i(9706);const Oo=16,ko={};function Go(t){if("number"==typeof t)return 1;if("boolean"==typeof t)return 8;if("string"==typeof t)return(0,Do.e1)(t)?6:2;if(!Array.isArray(t))throw new Error(`Unhandled value type: ${JSON.stringify(t)}`);const e=t;if(e.every((function(t){return"number"==typeof t})))return 3===e.length||4===e.length?20:Oo;if("string"!=typeof e[0])throw new Error(`Expected an expression operator but received: ${JSON.stringify(e)}`);const i=ko[e[0]];if(void 0===i)throw new Error(`Unrecognized expression operator: ${JSON.stringify(e)}`);return i.getReturnType(e.slice(1))}function zo(t){const e=[];return(1&t)>0&&e.push("number"),(4&t)>0&&e.push("color"),(8&t)>0&&e.push("boolean"),(t&Oo)>0&&e.push("number[]"),(2&t)>0&&e.push("string"),e.length>0?e.join(", "):"(no type)"}function No(t){const e=t.toString();return e.includes(".")?e:e+".0"}function jo(t){if(t.length<2||t.length>4)throw new Error("`formatArray` can only output `vec2`, `vec3` or `vec4` arrays.");return`vec${t.length}(${t.map(No).join(", ")})`}function Uo(t){const e=(0,Do._2)(t),i=e.length>3?e[3]:1;return jo([e[0]/255*i,e[1]/255*i,e[2]/255*i,i])}function Bo(t,e){return void 0===t.stringLiteralsMap[e]&&(t.stringLiteralsMap[e]=Object.keys(t.stringLiteralsMap).length),t.stringLiteralsMap[e]}function Vo(t,e,i){const n=void 0!==i?i:1;if(Array.isArray(e)&&"string"==typeof e[0]){const i=ko[e[0]];if(void 0===i)throw new Error(`Unrecognized expression operator: ${JSON.stringify(e)}`);return i.toGlsl(t,e.slice(1),n)}const r=Go(e)&n;if(Qo(e,r,""),(1&r)>0)return No(e);if((8&r)>0)return e.toString();if((2&r)>0)return function(t,e){return No(Bo(t,e))}(t,e.toString());if((4&r)>0)return Uo(e);if((r&Oo)>0)return jo(e);throw new Error(`Unexpected expression ${e} (expected type ${zo(n)})`)}function qo(t){if(0==(1&Go(t)))throw new Error(`A numeric value was expected, got ${JSON.stringify(t)} instead`)}function Wo(t){for(let e=0;e<t.length;e++)qo(t[e])}function Xo(t){if(0==(2&Go(t)))throw new Error(`A string value was expected, got ${JSON.stringify(t)} instead`)}function Ho(t){if(0==(8&Go(t)))throw new Error(`A boolean value was expected, got ${JSON.stringify(t)} instead`)}function Yo(t,e){if(t.length!==e)throw new Error(`Exactly ${e} arguments were expected, got ${t.length} instead`)}function Ko(t,e){if(t.length<e)throw new Error(`At least ${e} arguments were expected, got ${t.length} instead`)}function $o(t,e){if(t.length>e)throw new Error(`At most ${e} arguments were expected, got ${t.length} instead`)}function Jo(t){if(t.length%2!=0)throw new Error(`An even amount of arguments was expected, got ${JSON.stringify(t)} instead`)}function Qo(t,e,i){if(0===e)throw new Error(`No matching type was found for the following expression ${i}: ${JSON.stringify(t)}`)}function ta(t,e,i){if(Qo(t,e,i),n=e,Math.log2(n)%1!=0)throw new Error(`Expected to have a unique type for the following expression ${i}: ${JSON.stringify(t)}\nGot the following types instead: ${zo(e)}`);var n}function ea(t,e,i,n){if(0==(e&i))throw new Error(`Expected the ${n} type of the following expression: ${JSON.stringify(t)} to be of the following types: ${zo(i)}\nGot these types instead: ${zo(e)}`)}function ia(t){return"u_var_"+t}ko.get={getReturnType:function(t){return 2===t.length?function(t){switch(t){case"string":return 2;case"color":return 4;case"number":return 1;case"boolean":return 8;case"number[]":return Oo;default:throw new Error(`Unrecognized type hint: ${t}`)}}(t[1]):31},toGlsl:function(t,e,i){Ko(e,1),$o(e,2),Xo(e[0]);const n=i&ko.get.getReturnType(e);ta(["get",...e],n,"");const r=e[0].toString(),s=t.attributes.find((t=>t.name===r));if(s){if(n!==s.type)throw new Error(`The following attribute was used in different places with incompatible types: ${r}\nTypes were: ${zo(s.type)} and ${zo(n)}`)}else t.attributes.push({name:r,type:n});return(t.inFragmentShader?"v_":"a_")+r}},ko.var={getReturnType:function(){return 31},toGlsl:function(t,e,i){Yo(e,1),Xo(e[0]);const n=e[0].toString();if(!t.style.variables||void 0===t.style.variables[n])throw new Error(`The following variable is missing from the style: ${n}`);const r=i&Go(t.style.variables[n]);ta(["var",...e],r,"");const s=t.variables.find((t=>t.name===n));if(s){if(r!==s.type)throw new Error(`The following variable was used in different places with incompatible types: ${n}\nTypes were: ${zo(s.type)} and ${zo(r)}`)}else t.variables.push({name:n,type:r});return ia(n)}},ko.palette={getReturnType:function(){return 4},toGlsl:function(t,e){Yo(e,2),qo(e[0]);const i=Vo(t,e[0]),n=e[1];if(!Array.isArray(n))throw new Error("The second argument of palette must be an array");const r=n.length,s=new Uint8Array(4*r);for(let t=0;t<r;t++){const e=n[t];let i;if("string"==typeof e)i=(0,Do.mL)(e);else{if(!Array.isArray(e))throw new Error("The second argument of palette must be an array of strings or colors");const t=e.length;if(4===t)i=e;else{if(3!==t)throw new Error(`Expected palette color to have 3 or 4 values, got ${t}`);i=[e[0],e[1],e[2],1]}}const r=4*t;s[r]=i[0],s[r+1]=i[1],s[r+2]=i[2],s[r+3]=255*i[3]}t.paletteTextures||(t.paletteTextures=[]);const o=`u_paletteTextures[${t.paletteTextures.length}]`,a=new class{constructor(t,e){this.name=t,this.data=e,this.texture_=null}getTexture(t){if(!this.texture_){const e=t.createTexture();t.bindTexture(t.TEXTURE_2D,e),t.texParameteri(t.TEXTURE_2D,t.TEXTURE_WRAP_S,t.CLAMP_TO_EDGE),t.texParameteri(t.TEXTURE_2D,t.TEXTURE_WRAP_T,t.CLAMP_TO_EDGE),t.texParameteri(t.TEXTURE_2D,t.TEXTURE_MIN_FILTER,t.NEAREST),t.texParameteri(t.TEXTURE_2D,t.TEXTURE_MAG_FILTER,t.NEAREST),t.texImage2D(t.TEXTURE_2D,0,t.RGBA,this.data.length/4,1,0,t.RGBA,t.UNSIGNED_BYTE,this.data),this.texture_=e}return this.texture_}}(o,s);return t.paletteTextures.push(a),`texture2D(${o}, vec2((${i} + 0.5) / ${r}.0, 0.5))`}};function na(t){return{getReturnType:function(){return 8},toGlsl:function(e,i){Yo(i,2);let n=31;for(let t=0;t<i.length;t++)n&=Go(i[t]);if(0===n)throw new Error(`All arguments should be of compatible type, got ${JSON.stringify(i)} instead`);return n&=-5,`(${Vo(e,i[0],n)} ${t} ${Vo(e,i[1],n)})`}}}function ra(t){return{getReturnType:function(){return 8},toGlsl:function(e,i){Ko(i,2);for(let t=0;t<i.length;t++)Ho(i[t]);let n=i.map((t=>Vo(e,t,8))).join(` ${t} `);return n=`(${n})`,n}}}ko.band={getReturnType:function(){return 1},toGlsl:function(t,e){Ko(e,1),$o(e,3);const i=e[0];if(!("getBandValue"in t.functions)){let e="";const i=t.bandCount||1;for(let t=0;t<i;t++){const n=Math.floor(t/4);let r=t%4;t===i-1&&1===r&&(r=3),e+=`\n          if (band == ${t+1}.0) {\n            return texture2D(${Co}[${n}], v_textureCoord + vec2(dx, dy))[${r}];\n          }\n        `}t.functions.getBandValue=`\n        float getBandValue(float band, float xOffset, float yOffset) {\n          float dx = xOffset / ${Ro};\n          float dy = yOffset / ${Po};\n          ${e}\n        }\n      `}return`getBandValue(${Vo(t,i)}, ${Vo(t,e[1]||0)}, ${Vo(t,e[2]||0)})`}},ko.time={getReturnType:function(){return 1},toGlsl:function(t,e){return Yo(e,0),"u_time"}},ko.zoom={getReturnType:function(){return 1},toGlsl:function(t,e){return Yo(e,0),"u_zoom"}},ko.resolution={getReturnType:function(){return 1},toGlsl:function(t,e){return Yo(e,0),"u_resolution"}},ko["geometry-type"]={getReturnType:function(){return 2},toGlsl:function(t,e){Yo(e,0);const i="geometryType",n=t=>{const e=t.getType();switch(e){case"Point":case"LineString":case"Polygon":return e;case"MultiPoint":case"MultiLineString":case"MultiPolygon":return e.substring(5);case"Circle":return"Polygon";case"GeometryCollection":return n(t.getGeometries()[0])}};return t.attributes.find((t=>t.name===i))||t.attributes.push({name:i,type:2,callback:t=>n(t.getGeometry())}),(t.inFragmentShader?"v_":"a_")+i}},ko["*"]={getReturnType:function(t){let e=5;for(let i=0;i<t.length;i++)e&=Go(t[i]);return e},toGlsl:function(t,e,i){Ko(e,2);let n=i;for(let t=0;t<e.length;t++)n&=Go(e[t]);return ea(e,n,5,"output"),`(${e.map((e=>Vo(t,e,n))).join(" * ")})`}},ko["/"]={getReturnType:function(){return 1},toGlsl:function(t,e){return Yo(e,2),Wo(e),`(${Vo(t,e[0])} / ${Vo(t,e[1])})`}},ko["+"]={getReturnType:function(){return 1},toGlsl:function(t,e){return Ko(e,2),Wo(e),`(${e.map((e=>Vo(t,e))).join(" + ")})`}},ko["-"]={getReturnType:function(){return 1},toGlsl:function(t,e){return Yo(e,2),Wo(e),`(${Vo(t,e[0])} - ${Vo(t,e[1])})`}},ko.clamp={getReturnType:function(){return 1},toGlsl:function(t,e){Yo(e,3),Wo(e);const i=Vo(t,e[1]),n=Vo(t,e[2]);return`clamp(${Vo(t,e[0])}, ${i}, ${n})`}},ko["%"]={getReturnType:function(){return 1},toGlsl:function(t,e){return Yo(e,2),Wo(e),`mod(${Vo(t,e[0])}, ${Vo(t,e[1])})`}},ko["^"]={getReturnType:function(){return 1},toGlsl:function(t,e){return Yo(e,2),Wo(e),`pow(${Vo(t,e[0])}, ${Vo(t,e[1])})`}},ko.abs={getReturnType:function(){return 1},toGlsl:function(t,e){return Yo(e,1),Wo(e),`abs(${Vo(t,e[0])})`}},ko.floor={getReturnType:function(){return 1},toGlsl:function(t,e){return Yo(e,1),Wo(e),`floor(${Vo(t,e[0])})`}},ko.round={getReturnType:function(){return 1},toGlsl:function(t,e){return Yo(e,1),Wo(e),`floor(${Vo(t,e[0])} + 0.5)`}},ko.ceil={getReturnType:function(){return 1},toGlsl:function(t,e){return Yo(e,1),Wo(e),`ceil(${Vo(t,e[0])})`}},ko.sin={getReturnType:function(){return 1},toGlsl:function(t,e){return Yo(e,1),Wo(e),`sin(${Vo(t,e[0])})`}},ko.cos={getReturnType:function(){return 1},toGlsl:function(t,e){return Yo(e,1),Wo(e),`cos(${Vo(t,e[0])})`}},ko.atan={getReturnType:function(){return 1},toGlsl:function(t,e){return Ko(e,1),$o(e,2),Wo(e),2===e.length?`atan(${Vo(t,e[0])}, ${Vo(t,e[1])})`:`atan(${Vo(t,e[0])})`}},ko.sqrt={getReturnType:function(){return 1},toGlsl:function(t,e){return Yo(e,1),Wo(e),`sqrt(${Vo(t,e[0])})`}},ko[">"]={getReturnType:function(){return 8},toGlsl:function(t,e){return Yo(e,2),Wo(e),`(${Vo(t,e[0])} > ${Vo(t,e[1])})`}},ko[">="]={getReturnType:function(){return 8},toGlsl:function(t,e){return Yo(e,2),Wo(e),`(${Vo(t,e[0])} >= ${Vo(t,e[1])})`}},ko["<"]={getReturnType:function(){return 8},toGlsl:function(t,e){return Yo(e,2),Wo(e),`(${Vo(t,e[0])} < ${Vo(t,e[1])})`}},ko["<="]={getReturnType:function(){return 8},toGlsl:function(t,e){return Yo(e,2),Wo(e),`(${Vo(t,e[0])} <= ${Vo(t,e[1])})`}},ko["=="]=na("=="),ko["!="]=na("!="),ko["!"]={getReturnType:function(){return 8},toGlsl:function(t,e){return Yo(e,1),Ho(e[0]),`(!${Vo(t,e[0],8)})`}},ko.all=ra("&&"),ko.any=ra("||"),ko.between={getReturnType:function(){return 8},toGlsl:function(t,e){Yo(e,3),Wo(e);const i=Vo(t,e[1]),n=Vo(t,e[2]),r=Vo(t,e[0]);return`(${r} >= ${i} && ${r} <= ${n})`}},ko.array={getReturnType:function(){return Oo},toGlsl:function(t,e){Ko(e,2),$o(e,4),Wo(e);const i=e.map((function(e){return Vo(t,e)}));return`vec${e.length}(${i.join(", ")})`}},ko.color={getReturnType:function(){return 4},toGlsl:function(t,e){Ko(e,3),$o(e,4),Wo(e);const i=e.slice(0,3).map((e=>`${Vo(t,e)} / 255.0`));return 3===e.length?`vec4(${i.join(", ")}, 1.0)`:`(${Vo(t,e[3])} * vec4(${i.join(", ")}, 1.0))`}},ko.interpolate={getReturnType:function(t){let e=5;for(let i=3;i<t.length;i+=2)e&=Go(t[i]);return e},toGlsl:function(t,e,i){Jo(e),Ko(e,6);const n=e[0];let r;switch(n[0]){case"linear":r=1;break;case"exponential":r=n[1];break;default:r=null}if(!r)throw new Error(`Invalid interpolation type for "interpolate" operator, received: ${JSON.stringify(n)}`);const s=ko.interpolate.getReturnType(e)&i;ta(["interpolate",...e],s,"output");const o=Vo(t,e[1],1),a=No(r);let l="";for(let i=2;i<e.length-2;i+=2){const n=Vo(t,e[i],1),h=l||Vo(t,e[i+1],s),u=Vo(t,e[i+2],1),c=Vo(t,e[i+3],s);let d;d=1===r?`(${o} - ${n}) / (${u} - ${n})`:`(pow(${a}, (${o} - ${n})) - 1.0) / (pow(${a}, (${u} - ${n})) - 1.0)`,l=`mix(${h}, ${c}, clamp(${d}, 0.0, 1.0))`}return l}},ko.match={getReturnType:function(t){let e=31;for(let i=2;i<t.length;i+=2)e&=Go(t[i]);return e&=Go(t[t.length-1]),e},toGlsl:function(t,e,i){Jo(e),Ko(e,4);let n=Go(e[0]);for(let t=1;t<e.length-1;t+=2)n&=Go(e[t]);ea(["match",...e],n,11,"input"),n&=11;const r=ko.match.getReturnType(e)&i;ta(["match",...e],r,"output");const s=Vo(t,e[0],n),o=Vo(t,e[e.length-1],r);let a=null;for(let i=e.length-3;i>=1;i-=2)a=`(${s} == ${Vo(t,e[i],n)} ? ${Vo(t,e[i+1],r)} : ${a||o})`;return a}},ko.case={getReturnType:function(t){let e=31;for(let i=1;i<t.length;i+=2)e&=Go(t[i]);return e&=Go(t[t.length-1]),e},toGlsl:function(t,e,i){!function(t){if(t.length%2==0)throw new Error(`An odd amount of arguments was expected, got ${JSON.stringify(t)} instead`)}(e),Ko(e,3);const n=ko.case.getReturnType(e)&i;ta(["case",...e],n,"output");for(let t=0;t<e.length-1;t+=2)Ho(e[t]);const r=Vo(t,e[e.length-1],n);let s=null;for(let i=e.length-3;i>=0;i-=2)s=`(${Vo(t,e[i],8)} ? ${Vo(t,e[i+1],n)} : ${s||r})`;return s}},ko.in={getReturnType:function(t){return 8},toGlsl:function(t,e){Yo(e,2);const i=e[0];let n=e[1];if(!Array.isArray(n))throw new Error('The "in" operator expects an array literal as its second argument.');if("string"==typeof n[0]){if("literal"!==n[0])throw new Error('For the "in" operator, a string array should be wrapped in a "literal" operator to disambiguate from expressions.');if(!Array.isArray(n[1]))throw new Error('The "in" operator was provided a literal value which was not an array as second argument.');n=n[1]}let r=Go(i);for(let t=0;t<n.length-1;t+=1)r&=Go(n[t]);ea(["match",...e],r,11,"input"),r&=11;const s=function(t,e){return`operator_in_${Object.keys(e.functions).length}`}(0,t),o=[];for(let e=0;e<n.length;e+=1)o.push(`  if (inputValue == ${Vo(t,n[e],r)}) { return true; }`);return t.functions[s]=`bool ${s}(float inputValue) {\n${o.join("\n")}\n  return false;\n}`,`${s}(${Vo(t,i,r)})`}};var sa=i(3654);const oa="uniform mat4 u_projectionMatrix;\nuniform mat4 u_screenToWorldMatrix;\nuniform vec2 u_viewportSizePx;\nuniform float u_pixelRatio;\nuniform float u_globalAlpha;\nuniform float u_time;\nuniform float u_zoom;\nuniform float u_resolution;\nuniform vec4 u_renderExtent;\nuniform mediump int u_hitDetection;\n",aa=(0,sa.y)();class la{constructor(){this.uniforms_=[],this.attributes_=[],this.varyings_=[],this.hasSymbol_=!1,this.symbolSizeExpression_=`vec2(${No(aa["circle-radius"])})`,this.symbolRotationExpression_="0.0",this.symbolOffsetExpression_="vec2(0.0)",this.symbolColorExpression_=Uo(aa["circle-fill-color"]),this.texCoordExpression_="vec4(0.0, 0.0, 1.0, 1.0)",this.discardExpression_="false",this.symbolRotateWithView_=!1,this.hasStroke_=!1,this.strokeWidthExpression_=No(aa["stroke-width"]),this.strokeColorExpression_=Uo(aa["stroke-color"]),this.hasFill_=!1,this.fillColorExpression_=Uo(aa["fill-color"]),this.vertexShaderFunctions_=[],this.fragmentShaderFunctions_=[]}addUniform(t){return this.uniforms_.push(t),this}addAttribute(t){return this.attributes_.push(t),this}addVarying(t,e,i){return this.varyings_.push({name:t,type:e,expression:i}),this}setSymbolSizeExpression(t){return this.hasSymbol_=!0,this.symbolSizeExpression_=t,this}getSymbolSizeExpression(){return this.symbolSizeExpression_}setSymbolRotationExpression(t){return this.symbolRotationExpression_=t,this}setSymbolOffsetExpression(t){return this.symbolOffsetExpression_=t,this}setSymbolColorExpression(t){return this.hasSymbol_=!0,this.symbolColorExpression_=t,this}getSymbolColorExpression(){return this.symbolColorExpression_}setTextureCoordinateExpression(t){return this.texCoordExpression_=t,this}setFragmentDiscardExpression(t){return this.discardExpression_=t,this}setSymbolRotateWithView(t){return this.symbolRotateWithView_=t,this}setStrokeWidthExpression(t){return this.hasStroke_=!0,this.strokeWidthExpression_=t,this}setStrokeColorExpression(t){return this.hasStroke_=!0,this.strokeColorExpression_=t,this}setFillColorExpression(t){return this.hasFill_=!0,this.fillColorExpression_=t,this}addVertexShaderFunction(t){this.vertexShaderFunctions_.includes(t)||this.vertexShaderFunctions_.push(t)}addFragmentShaderFunction(t){this.fragmentShaderFunctions_.includes(t)||this.fragmentShaderFunctions_.push(t)}getSymbolVertexShader(){if(!this.hasSymbol_)return null;const t=this.symbolRotateWithView_?"u_offsetScaleMatrix * u_offsetRotateMatrix":"u_offsetScaleMatrix";return`precision mediump float;\nuniform mat4 u_projectionMatrix;\nuniform mat4 u_offsetScaleMatrix;\nuniform mat4 u_offsetRotateMatrix;\nuniform float u_time;\nuniform float u_zoom;\nuniform float u_resolution;\nuniform mediump int u_hitDetection;\n\n${this.uniforms_.map((function(t){return"uniform "+t+";"})).join("\n")}\nattribute vec2 a_position;\nattribute float a_index;\nattribute vec4 a_hitColor;\n${this.attributes_.map((function(t){return"attribute "+t+";"})).join("\n")}\nvarying vec2 v_texCoord;\nvarying vec2 v_quadCoord;\nvarying vec4 v_hitColor;\n${this.varyings_.map((function(t){return"varying "+t.type+" "+t.name+";"})).join("\n")}\n${this.vertexShaderFunctions_.join("\n")}\nvoid main(void) {\n  mat4 offsetMatrix = ${t};\n  vec2 halfSize = ${this.symbolSizeExpression_} * 0.5;\n  vec2 offset = ${this.symbolOffsetExpression_};\n  float angle = ${this.symbolRotationExpression_};\n  float offsetX;\n  float offsetY;\n  if (a_index == 0.0) {\n    offsetX = (offset.x - halfSize.x) * cos(angle) + (offset.y - halfSize.y) * sin(angle);\n    offsetY = (offset.y - halfSize.y) * cos(angle) - (offset.x - halfSize.x) * sin(angle);\n  } else if (a_index == 1.0) {\n    offsetX = (offset.x + halfSize.x) * cos(angle) + (offset.y - halfSize.y) * sin(angle);\n    offsetY = (offset.y - halfSize.y) * cos(angle) - (offset.x + halfSize.x) * sin(angle);\n  } else if (a_index == 2.0) {\n    offsetX = (offset.x + halfSize.x) * cos(angle) + (offset.y + halfSize.y) * sin(angle);\n    offsetY = (offset.y + halfSize.y) * cos(angle) - (offset.x + halfSize.x) * sin(angle);\n  } else {\n    offsetX = (offset.x - halfSize.x) * cos(angle) + (offset.y + halfSize.y) * sin(angle);\n    offsetY = (offset.y + halfSize.y) * cos(angle) - (offset.x - halfSize.x) * sin(angle);\n  }\n  vec4 offsets = offsetMatrix * vec4(offsetX, offsetY, 0.0, 0.0);\n  gl_Position = u_projectionMatrix * vec4(a_position, 0.0, 1.0) + offsets;\n  vec4 texCoord = ${this.texCoordExpression_};\n  float u = a_index == 0.0 || a_index == 3.0 ? texCoord.s : texCoord.p;\n  float v = a_index == 2.0 || a_index == 3.0 ? texCoord.t : texCoord.q;\n  v_texCoord = vec2(u, v);\n  u = a_index == 0.0 || a_index == 3.0 ? 0.0 : 1.0;\n  v = a_index == 2.0 || a_index == 3.0 ? 0.0 : 1.0;\n  v_quadCoord = vec2(u, v);\n  v_hitColor = a_hitColor;\n${this.varyings_.map((function(t){return"  "+t.name+" = "+t.expression+";"})).join("\n")}\n}`}getSymbolFragmentShader(){return this.hasSymbol_?`precision mediump float;\nuniform float u_time;\nuniform float u_zoom;\nuniform float u_resolution;\nuniform mediump int u_hitDetection;\n${this.uniforms_.map((function(t){return"uniform "+t+";"})).join("\n")}\nvarying vec2 v_texCoord;\nvarying vec2 v_quadCoord;\nvarying vec4 v_hitColor;\n${this.varyings_.map((function(t){return"varying "+t.type+" "+t.name+";"})).join("\n")}\n${this.fragmentShaderFunctions_.join("\n")}\nvoid main(void) {\n  if (${this.discardExpression_}) { discard; }\n  gl_FragColor = ${this.symbolColorExpression_};\n  gl_FragColor.rgb *= gl_FragColor.a;\n  if (u_hitDetection > 0) {\n    if (gl_FragColor.a < 0.1) { discard; };\n    gl_FragColor = v_hitColor;\n  }\n}`:null}getStrokeVertexShader(){return this.hasStroke_?`#ifdef GL_FRAGMENT_PRECISION_HIGH\nprecision highp float;\n#else\nprecision mediump float;\n#endif\n${oa}\n${this.uniforms_.map((function(t){return"uniform "+t+";"})).join("\n")}\nattribute vec2 a_position;\nattribute float a_index;\nattribute vec2 a_segmentStart;\nattribute vec2 a_segmentEnd;\nattribute float a_parameters;\nattribute vec4 a_hitColor;\n${this.attributes_.map((function(t){return"attribute "+t+";"})).join("\n")}\nvarying vec2 v_segmentStart;\nvarying vec2 v_segmentEnd;\nvarying float v_angleStart;\nvarying float v_angleEnd;\nvarying float v_width;\nvarying vec4 v_hitColor;\n${this.varyings_.map((function(t){return"varying "+t.type+" "+t.name+";"})).join("\n")}\n${this.vertexShaderFunctions_.join("\n")}\nvec2 worldToPx(vec2 worldPos) {\n  vec4 screenPos = u_projectionMatrix * vec4(worldPos, 0.0, 1.0);\n  return (0.5 * screenPos.xy + 0.5) * u_viewportSizePx;\n}\n\nvec4 pxToScreen(vec2 pxPos) {\n  vec2 screenPos = pxPos * 4.0 / u_viewportSizePx;\n  return vec4(screenPos.xy, 0.0, 0.0);\n}\n\nvec2 getOffsetDirection(vec2 normalPx, vec2 tangentPx, float joinAngle) {\n  if (cos(joinAngle) > 0.93) return normalPx - tangentPx;\n  float halfAngle = joinAngle / 2.0;\n  vec2 angleBisectorNormal = vec2(\n    sin(halfAngle) * normalPx.x + cos(halfAngle) * normalPx.y,\n    -cos(halfAngle) * normalPx.x + sin(halfAngle) * normalPx.y\n  );\n  float length = 1.0 / sin(halfAngle);\n  return angleBisectorNormal * length;\n}\n\nvoid main(void) {\n  float lineWidth = ${this.strokeWidthExpression_};\n  float anglePrecision = 1500.0;\n  float paramShift = 10000.0;\n  v_angleStart = fract(a_parameters / paramShift) * paramShift / anglePrecision;\n  v_angleEnd = fract(floor(a_parameters / paramShift + 0.5) / paramShift) * paramShift / anglePrecision;\n  float vertexNumber = floor(a_parameters / paramShift / paramShift + 0.0001);\n  vec2 tangentPx = worldToPx(a_segmentEnd) - worldToPx(a_segmentStart);\n  tangentPx = normalize(tangentPx);\n  vec2 normalPx = vec2(-tangentPx.y, tangentPx.x);\n  float normalDir = vertexNumber < 0.5 || (vertexNumber > 1.5 && vertexNumber < 2.5) ? 1.0 : -1.0;\n  float tangentDir = vertexNumber < 1.5 ? 1.0 : -1.0;\n  float angle = vertexNumber < 1.5 ? v_angleStart : v_angleEnd;\n  vec2 offsetPx = getOffsetDirection(normalPx * normalDir, tangentDir * tangentPx, angle) * lineWidth * 0.5;\n  vec2 position =  vertexNumber < 1.5 ? a_segmentStart : a_segmentEnd;\n  gl_Position = u_projectionMatrix * vec4(position, 0.0, 1.0) + pxToScreen(offsetPx);\n  v_segmentStart = worldToPx(a_segmentStart);\n  v_segmentEnd = worldToPx(a_segmentEnd);\n  v_width = lineWidth;\n  v_hitColor = a_hitColor;\n${this.varyings_.map((function(t){return"  "+t.name+" = "+t.expression+";"})).join("\n")}\n}`:null}getStrokeFragmentShader(){return this.hasStroke_?`#ifdef GL_FRAGMENT_PRECISION_HIGH\nprecision highp float;\n#else\nprecision mediump float;\n#endif\n${oa}\n${this.uniforms_.map((function(t){return"uniform "+t+";"})).join("\n")}\nvarying vec2 v_segmentStart;\nvarying vec2 v_segmentEnd;\nvarying float v_angleStart;\nvarying float v_angleEnd;\nvarying float v_width;\nvarying vec4 v_hitColor;\n${this.varyings_.map((function(t){return"varying "+t.type+" "+t.name+";"})).join("\n")}\n${this.fragmentShaderFunctions_.join("\n")}\nvec2 pxToWorld(vec2 pxPos) {\n  vec2 screenPos = 2.0 * pxPos / u_viewportSizePx - 1.0;\n  return (u_screenToWorldMatrix * vec4(screenPos, 0.0, 1.0)).xy;\n}\n\nfloat segmentDistanceField(vec2 point, vec2 start, vec2 end, float radius) {\n  vec2 startToPoint = point - start;\n  vec2 startToEnd = end - start;\n  float ratio = clamp(dot(startToPoint, startToEnd) / dot(startToEnd, startToEnd), 0.0, 1.0);\n  float dist = length(startToPoint - ratio * startToEnd);\n  return 1.0 - smoothstep(radius - 1.0, radius, dist);\n}\n\nvoid main(void) {\n  vec2 v_currentPoint = gl_FragCoord.xy / u_pixelRatio;\n  #ifdef GL_FRAGMENT_PRECISION_HIGH\n  vec2 v_worldPos = pxToWorld(v_currentPoint);\n  if (\n    abs(u_renderExtent[0] - u_renderExtent[2]) > 0.0 && (\n      v_worldPos[0] < u_renderExtent[0] ||\n      v_worldPos[1] < u_renderExtent[1] ||\n      v_worldPos[0] > u_renderExtent[2] ||\n      v_worldPos[1] > u_renderExtent[3]\n    )\n  ) {\n    discard;\n  }\n  #endif\n  if (${this.discardExpression_}) { discard; }\n  gl_FragColor = ${this.strokeColorExpression_} * u_globalAlpha;\n  gl_FragColor *= segmentDistanceField(v_currentPoint, v_segmentStart, v_segmentEnd, v_width);\n  if (u_hitDetection > 0) {\n    if (gl_FragColor.a < 0.1) { discard; };\n    gl_FragColor = v_hitColor;\n  }\n}`:null}getFillVertexShader(){return this.hasFill_?`#ifdef GL_FRAGMENT_PRECISION_HIGH\nprecision highp float;\n#else\nprecision mediump float;\n#endif\n${oa}\n${this.uniforms_.map((function(t){return"uniform "+t+";"})).join("\n")}\nattribute vec2 a_position;\nattribute vec4 a_hitColor;\n${this.attributes_.map((function(t){return"attribute "+t+";"})).join("\n")}\nvarying vec4 v_hitColor;\n${this.varyings_.map((function(t){return"varying "+t.type+" "+t.name+";"})).join("\n")}\n${this.vertexShaderFunctions_.join("\n")}\nvoid main(void) {\n  gl_Position = u_projectionMatrix * vec4(a_position, 0.0, 1.0);\n${this.varyings_.map((function(t){return"  "+t.name+" = "+t.expression+";"})).join("\n")}\n}`:null}getFillFragmentShader(){return this.hasFill_?`#ifdef GL_FRAGMENT_PRECISION_HIGH\nprecision highp float;\n#else\nprecision mediump float;\n#endif\n${oa}\n${this.uniforms_.map((function(t){return"uniform "+t+";"})).join("\n")}\nvarying vec4 v_hitColor;\n${this.varyings_.map((function(t){return"varying "+t.type+" "+t.name+";"})).join("\n")}\n${this.fragmentShaderFunctions_.join("\n")}\nvec2 pxToWorld(vec2 pxPos) {\n  vec2 screenPos = 2.0 * pxPos / u_viewportSizePx - 1.0;\n  return (u_screenToWorldMatrix * vec4(screenPos, 0.0, 1.0)).xy;\n}\n\nvoid main(void) {\n  #ifdef GL_FRAGMENT_PRECISION_HIGH\n  vec2 v_worldPos = pxToWorld(gl_FragCoord.xy / u_pixelRatio);\n  if (\n    abs(u_renderExtent[0] - u_renderExtent[2]) > 0.0 && (\n      v_worldPos[0] < u_renderExtent[0] ||\n      v_worldPos[1] < u_renderExtent[1] ||\n      v_worldPos[0] > u_renderExtent[2] ||\n      v_worldPos[1] > u_renderExtent[3]\n    )\n  ) {\n    discard;\n  }\n  #endif\n  if (${this.discardExpression_}) { discard; }\n  gl_FragColor = ${this.fillColorExpression_} * u_globalAlpha;\n  if (u_hitDetection > 0) {\n    if (gl_FragColor.a < 0.1) { discard; };\n    gl_FragColor = v_hitColor;\n  }\n}`:null}}function ha(t){const e=(0,Do._2)(t);return[256*e[0]+e[1],256*e[2]+Math.round(255*e[3])]}function ua(t){return 4===t?2:t===Oo?4:1}function ca(t){const e=ua(t);return e>1?`vec${e}`:"float"}function da(t){const e={inFragmentShader:!1,variables:[],attributes:[],stringLiteralsMap:{},functions:{},style:t},i={inFragmentShader:!0,variables:e.variables,attributes:[],stringLiteralsMap:e.stringLiteralsMap,functions:{},style:t},n=new la,r={};if(function(t,e,i,n,r){if(!("symbol"in t))return;const s=t.symbol;if("color"in s){const t=s.color,i=void 0!==s.opacity?s.opacity:1,n=Vo(r,t,4),o=Vo(r,i,1);e.setSymbolColorExpression(`vec4(${n}.rgb, ${n}.a * ${o})`)}if("image"===s.symbolType&&s.src){const t=new Image;t.crossOrigin=void 0===s.crossOrigin?"anonymous":s.crossOrigin,t.src=s.src,e.addUniform("sampler2D u_texture").setSymbolColorExpression(`${e.getSymbolColorExpression()} * texture2D(u_texture, v_texCoord)`),i.u_texture=t}else if("symbolType"in s){let t=e.getSymbolSizeExpression();"size"in s&&(t=Vo(r,s.size,17));const i=function(t,e){switch(t){case"square":case"image":return"1.0";case"circle":return`(1.0-smoothstep(1.-4./${e},1.,dot(v_quadCoord-.5,v_quadCoord-.5)*4.))`;case"triangle":const i="(v_quadCoord*2.-1.)",n=`(atan(${i}.x,${i}.y))`;return`(1.0-smoothstep(.5-3./${e},.5,cos(floor(.5+${n}/2.094395102)*2.094395102-${n})*length(${i})))`;default:throw new Error(`Unexpected symbol type: ${t}`)}}(s.symbolType,`vec2(${t}).x`);e.setSymbolColorExpression(`${e.getSymbolColorExpression()} * vec4(1.0, 1.0, 1.0, ${i})`)}if("size"in s){const t=Vo(n,s.size,17);e.setSymbolSizeExpression(`vec2(${t})`)}"textureCoord"in s&&e.setTextureCoordinateExpression(Vo(n,s.textureCoord,Oo)),"offset"in s&&e.setSymbolOffsetExpression(Vo(n,s.offset,Oo)),"rotation"in s&&e.setSymbolRotationExpression(Vo(n,s.rotation,1)),"rotateWithView"in s&&e.setSymbolRotateWithView(!!s.rotateWithView)}(t,n,r,e,i),function(t,e,i,n,r){"stroke-color"in t&&e.setStrokeColorExpression(Vo(r,t["stroke-color"],4)),"stroke-width"in t&&e.setStrokeWidthExpression(Vo(n,t["stroke-width"],1))}(t,n,0,e,i),function(t,e,i,n,r){"fill-color"in t&&e.setFillColorExpression(Vo(r,t["fill-color"],4))}(t,n,0,0,i),t.filter){const e=Vo(i,t.filter,8);n.setFragmentDiscardExpression(`!${e}`)}i.variables.forEach((function(i){const s=ia(i.name);let o;n.addUniform(`${ca(i.type)} ${s}`),o=2===i.type?()=>Bo(e,t.variables[i.name]):4===i.type?()=>ha([...(0,Do._2)(t.variables[i.name]||"#eee")]):8===i.type?()=>t.variables[i.name]?1:0:()=>t.variables[i.name],r[s]=o})),i.attributes.forEach((function(t){e.attributes.find((e=>e.name===t.name))||e.attributes.push(t);let i=ca(t.type),r=`a_${t.name}`;4===t.type&&(i="vec4",r=`unpackColor(${r})`,n.addVertexShaderFunction("vec4 unpackColor(vec2 packedColor) {\n  return fract(packedColor[1] / 256.0) * vec4(\n    fract(floor(packedColor[0] / 256.0) / 256.0),\n    fract(packedColor[0] / 256.0),\n    fract(floor(packedColor[1] / 256.0) / 256.0),\n    1.0\n  );\n}")),n.addVarying(`v_${t.name}`,i,r)})),e.attributes.forEach((function(t){n.addAttribute(`${ca(t.type)} a_${t.name}`)}));const s=e.attributes.map((function(t){let i;return i=t.callback?t.callback:2===t.type?i=>Bo(e,i.get(t.name)):4===t.type?e=>ha([...(0,Do._2)(e.get(t.name)||"#eee")]):8===t.type?e=>e.get(t.name)?1:0:e=>e.get(t.name),{name:t.name,size:ua(t.type),callback:i}}));for(const t in e.functions)n.addVertexShaderFunction(e.functions[t]);for(const t in i.functions)n.addFragmentShaderFunction(i.functions[t]);return{builder:n,attributes:s.reduce(((t,e)=>({...t,[e.name]:{callback:e.callback,size:e.size}})),{}),uniforms:r}}class ga extends tt.Z{constructor(t){super(Object.assign({},t)),this.parseResult_=da(t.style),this.styleVariables_=t.style.variables||{},this.hitDetectionDisabled_=!!t.disableHitDetection}createRenderer(){const t=Object.keys(this.parseResult_.attributes).map((t=>({name:t,...this.parseResult_.attributes[t]})));return new V(this,{vertexShader:this.parseResult_.builder.getSymbolVertexShader(),fragmentShader:this.parseResult_.builder.getSymbolFragmentShader(),hitDetectionEnabled:!this.hitDetectionDisabled_,uniforms:this.parseResult_.uniforms,attributes:t})}updateStyleVariables(t){Object.assign(this.styleVariables_,t),this.changed()}}const pa=ga;var fa=i(4272);function ma(t,e){const i=`\n    attribute vec2 a_textureCoord;\n    uniform mat4 ${xo};\n    uniform float ${Ro};\n    uniform float ${Po};\n    uniform float ${Io};\n    uniform float ${Lo};\n    uniform float ${Mo};\n    uniform float ${bo};\n\n    varying vec2 v_textureCoord;\n    varying vec2 v_mapCoord;\n\n    void main() {\n      v_textureCoord = a_textureCoord;\n      v_mapCoord = vec2(\n        ${Lo} + ${Io} * ${Ro} * v_textureCoord[0],\n        ${Mo} - ${Io} * ${Po} * v_textureCoord[1]\n      );\n      gl_Position = ${xo} * vec4(a_textureCoord, ${bo}, 1.0);\n    }\n  `,n={inFragmentShader:!0,variables:[],attributes:[],stringLiteralsMap:{},functions:{},bandCount:e,style:t},r=[];if(void 0!==t.color){const e=Vo(n,t.color,4);r.push(`color = ${e};`)}if(void 0!==t.contrast){const e=Vo(n,t.contrast,1);r.push(`color.rgb = clamp((${e} + 1.0) * color.rgb - (${e} / 2.0), vec3(0.0, 0.0, 0.0), vec3(1.0, 1.0, 1.0));`)}if(void 0!==t.exposure){const e=Vo(n,t.exposure,1);r.push(`color.rgb = clamp((${e} + 1.0) * color.rgb, vec3(0.0, 0.0, 0.0), vec3(1.0, 1.0, 1.0));`)}if(void 0!==t.saturation){const e=Vo(n,t.saturation,1);r.push(`\n      float saturation = ${e} + 1.0;\n      float sr = (1.0 - saturation) * 0.2126;\n      float sg = (1.0 - saturation) * 0.7152;\n      float sb = (1.0 - saturation) * 0.0722;\n      mat3 saturationMatrix = mat3(\n        sr + saturation, sr, sr,\n        sg, sg + saturation, sg,\n        sb, sb, sb + saturation\n      );\n      color.rgb = clamp(saturationMatrix * color.rgb, vec3(0.0, 0.0, 0.0), vec3(1.0, 1.0, 1.0));\n    `)}if(void 0!==t.gamma){const e=Vo(n,t.gamma,1);r.push(`color.rgb = pow(color.rgb, vec3(1.0 / ${e}));`)}if(void 0!==t.brightness){const e=Vo(n,t.brightness,1);r.push(`color.rgb = clamp(color.rgb + ${e}, vec3(0.0, 0.0, 0.0), vec3(1.0, 1.0, 1.0));`)}const s={},o=n.variables.length;if(o>1&&!t.variables)throw new Error(`Missing variables in style (expected ${n.variables})`);for(let e=0;e<o;++e){const i=n.variables[e];if(!(i.name in t.variables))throw new Error(`Missing '${i.name}' in style variables`);s[ia(i.name)]=function(){let e=t.variables[i.name];return"string"==typeof e&&(e=Bo(n,e)),void 0!==e?e:-9999999}}const a=Object.keys(s).map((function(t){return`uniform float ${t};`})),l=Math.ceil(e/4);a.push(`uniform sampler2D ${Co}[${l}];`),n.paletteTextures&&a.push(`uniform sampler2D u_paletteTextures[${n.paletteTextures.length}];`);const h=Object.keys(n.functions).map((function(t){return n.functions[t]}));return{vertexShader:i,fragmentShader:`\n    #ifdef GL_FRAGMENT_PRECISION_HIGH\n    precision highp float;\n    #else\n    precision mediump float;\n    #endif\n\n    varying vec2 v_textureCoord;\n    varying vec2 v_mapCoord;\n    uniform vec4 ${wo};\n    uniform float ${Eo};\n    uniform float ${Ro};\n    uniform float ${Po};\n    uniform float ${So};\n    uniform float ${To};\n\n    ${a.join("\n")}\n\n    ${h.join("\n")}\n\n    void main() {\n      if (\n        v_mapCoord[0] < ${wo}[0] ||\n        v_mapCoord[1] < ${wo}[1] ||\n        v_mapCoord[0] > ${wo}[2] ||\n        v_mapCoord[1] > ${wo}[3]\n      ) {\n        discard;\n      }\n\n      vec4 color = texture2D(${Co}[0],  v_textureCoord);\n\n      ${r.join("\n")}\n\n      gl_FragColor = color;\n      gl_FragColor.rgb *= gl_FragColor.a;\n      gl_FragColor *= ${Eo};\n    }`,uniforms:s,paletteTextures:n.paletteTextures}}class _a extends fa.Z{constructor(t){const e=(t=t?Object.assign({},t):{}).style||{};delete t.style;const i=t.cacheSize;delete t.cacheSize,super(t),this.sources_=t.sources,this.renderedSource_=null,this.renderedResolution_=NaN,this.style_=e,this.cacheSize_=i,this.styleVariables_=this.style_.variables||{},this.addChangeListener(_.Z.SOURCE,this.handleSourceUpdate_)}getSources(t,e){const i=this.getSource();return this.sources_?"function"==typeof this.sources_?this.sources_(t,e):this.sources_:i?[i]:[]}getRenderSource(){return this.renderedSource_||this.getSource()}getSourceState(){const t=this.getRenderSource();return t?t.getState():"undefined"}handleSourceUpdate_(){this.hasRenderer()&&this.getRenderer().clearCache(),this.getSource()&&this.setStyle(this.style_)}getSourceBandCount_(){const t=Number.MAX_SAFE_INTEGER,e=this.getSources([-t,-t,t,t],t);return e&&e.length&&"bandCount"in e[0]?e[0].bandCount:4}createRenderer(){const t=ma(this.style_,this.getSourceBandCount_());return new Zo(this,{vertexShader:t.vertexShader,fragmentShader:t.fragmentShader,uniforms:t.uniforms,cacheSize:this.cacheSize_,paletteTextures:t.paletteTextures})}renderSources(t,e){const i=this.getRenderer();let n;for(let r=0,s=e.length;r<s;++r)this.renderedSource_=e[r],i.prepareFrame(t)&&(n=i.renderFrame(t));return n}render(t,e){this.rendered=!0;const i=t.viewState,n=this.getSources(t.extent,i.resolution);let r=!0;for(let t=0,e=n.length;t<e;++t){const e=n[t],i=e.getState();if("loading"==i){const t=()=>{"ready"==e.getState()&&(e.removeEventListener("change",t),this.changed())};e.addEventListener("change",t)}r=r&&"ready"==i}const s=this.renderSources(t,n);if(this.getRenderer().renderComplete&&r)return this.renderedResolution_=i.resolution,s;if(this.renderedResolution_>.5*i.resolution){const e=this.getSources(t.extent,this.renderedResolution_).filter((t=>!n.includes(t)));if(e.length>0)return this.renderSources(t,e)}return s}setStyle(t){this.styleVariables_=t.variables||{},this.style_=t;const e=ma(this.style_,this.getSourceBandCount_());this.getRenderer().reset({vertexShader:e.vertexShader,fragmentShader:e.fragmentShader,uniforms:e.uniforms}),this.changed()}updateStyleVariables(t){Object.assign(this.styleVariables_,t),this.changed()}}_a.prototype.dispose;const ya=_a},947:(t,e,i)=>{"use strict";i.d(e,{Z:()=>h});var n=i(2971),r=i(1912),s=i(4187),o=i(9515),a=i(3983);class l extends n.Z{constructor(t){super(),this.on,this.once,this.un,this.background_=t.background;const e=Object.assign({},t);"object"==typeof t.properties&&(delete e.properties,Object.assign(e,t.properties)),e[r.Z.OPACITY]=void 0!==t.opacity?t.opacity:1,(0,o.h)("number"==typeof e[r.Z.OPACITY],64),e[r.Z.VISIBLE]=void 0===t.visible||t.visible,e[r.Z.Z_INDEX]=t.zIndex,e[r.Z.MAX_RESOLUTION]=void 0!==t.maxResolution?t.maxResolution:1/0,e[r.Z.MIN_RESOLUTION]=void 0!==t.minResolution?t.minResolution:0,e[r.Z.MIN_ZOOM]=void 0!==t.minZoom?t.minZoom:-1/0,e[r.Z.MAX_ZOOM]=void 0!==t.maxZoom?t.maxZoom:1/0,this.className_=void 0!==e.className?e.className:"ol-layer",delete e.className,this.setProperties(e),this.state_=null}getBackground(){return this.background_}getClassName(){return this.className_}getLayerState(t){const e=this.state_||{layer:this,managed:void 0===t||t},i=this.getZIndex();return e.opacity=(0,a.uZ)(Math.round(100*this.getOpacity())/100,0,1),e.visible=this.getVisible(),e.extent=this.getExtent(),e.zIndex=void 0!==i||e.managed?i: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}getLayersArray(t){return(0,s.O3)()}getLayerStatesArray(t){return(0,s.O3)()}getExtent(){return this.get(r.Z.EXTENT)}getMaxResolution(){return this.get(r.Z.MAX_RESOLUTION)}getMinResolution(){return this.get(r.Z.MIN_RESOLUTION)}getMinZoom(){return this.get(r.Z.MIN_ZOOM)}getMaxZoom(){return this.get(r.Z.MAX_ZOOM)}getOpacity(){return this.get(r.Z.OPACITY)}getSourceState(){return(0,s.O3)()}getVisible(){return this.get(r.Z.VISIBLE)}getZIndex(){return this.get(r.Z.Z_INDEX)}setBackground(t){this.background_=t,this.changed()}setExtent(t){this.set(r.Z.EXTENT,t)}setMaxResolution(t){this.set(r.Z.MAX_RESOLUTION,t)}setMinResolution(t){this.set(r.Z.MIN_RESOLUTION,t)}setMaxZoom(t){this.set(r.Z.MAX_ZOOM,t)}setMinZoom(t){this.set(r.Z.MIN_ZOOM,t)}setOpacity(t){(0,o.h)("number"==typeof t,64),this.set(r.Z.OPACITY,t)}setVisible(t){this.set(r.Z.VISIBLE,t)}setZIndex(t){this.set(r.Z.Z_INDEX,t)}disposeInternal(){this.state_&&(this.state_.layer=null,this.state_=null),super.disposeInternal()}}const h=l},4272:(t,e,i)=>{"use strict";i.d(e,{Z:()=>o});var n=i(1295),r=i(8280);class s extends n.Z{constructor(t){t=t||{};const e=Object.assign({},t);delete e.preload,delete e.useInterimTilesOnError,super(e),this.on,this.once,this.un,this.setPreload(void 0!==t.preload?t.preload:0),this.setUseInterimTilesOnError(void 0===t.useInterimTilesOnError||t.useInterimTilesOnError)}getPreload(){return this.get(r.Z.PRELOAD)}setPreload(t){this.set(r.Z.PRELOAD,t)}getUseInterimTilesOnError(){return this.get(r.Z.USE_INTERIM_TILES_ON_ERROR)}setUseInterimTilesOnError(t){this.set(r.Z.USE_INTERIM_TILES_ON_ERROR,t)}getData(t){return super.getData(t)}}const o=s},2563:(t,e,i)=>{"use strict";i.d(e,{Z:()=>h});var n=i(1295),r=i(2582),s=i(7539),o=i(3654);const a="renderOrder";class l extends n.Z{constructor(t){t=t||{};const e=Object.assign({},t);delete e.style,delete e.renderBuffer,delete e.updateWhileAnimating,delete e.updateWhileInteracting,super(e),this.declutter_=void 0!==t.declutter&&t.declutter,this.renderBuffer_=void 0!==t.renderBuffer?t.renderBuffer:100,this.style_=null,this.styleFunction_=void 0,this.setStyle(t.style),this.updateWhileAnimating_=void 0!==t.updateWhileAnimating&&t.updateWhileAnimating,this.updateWhileInteracting_=void 0!==t.updateWhileInteracting&&t.updateWhileInteracting}getDeclutter(){return this.declutter_}getFeatures(t){return super.getFeatures(t)}getRenderBuffer(){return this.renderBuffer_}getRenderOrder(){return this.get(a)}getStyle(){return this.style_}getStyleFunction(){return this.styleFunction_}getUpdateWhileAnimating(){return this.updateWhileAnimating_}getUpdateWhileInteracting(){return this.updateWhileInteracting_}renderDeclutter(t){t.declutterTree||(t.declutterTree=new r(9)),this.getRenderer().renderDeclutter(t)}setRenderOrder(t){this.set(a,t)}setStyle(t){let e;if(void 0===t)e=s.yF;else if(null===t)e=null;else if("function"==typeof t)e=t;else if(t instanceof s.ZP)e=t;else if(Array.isArray(t)){const i=t.length,n=new Array(i);for(let e=0;e<i;++e){const i=t[e];i instanceof s.ZP?n[e]=i:n[e]=(0,o.M)(i)}e=n}else e=(0,o.M)(t);this.style_=e,this.styleFunction_=null===t?void 0:(0,s.J$)(this.style_),this.changed()}}const h=l},8599:(t,e,i)=>{"use strict";i.d(e,{Z:()=>T});var n=i(8714),r=i(8771),s=i(1090),o=i(1345),a=i(2083),l=i(188),h=i(8958),u=i(7539),c=i(1280),d=i(2371),g=i(2556),p=i(8641),f=i(3983),m=i(1900),_=i(6121),y=i(5069),v=i(6101),x=i(6234);function E(t,e,i){const n=[];let r=t(0),s=t(1),o=e(r),a=e(s);const l=[s,r],h=[a,o],u=[1,0],c={};let d,g,p,m,_,y,v=1e5;for(;--v>0&&u.length>0;)p=u.pop(),r=l.pop(),o=h.pop(),y=p.toString(),y in c||(n.push(o[0],o[1]),c[y]=!0),m=u.pop(),s=l.pop(),a=h.pop(),_=(p+m)/2,d=t(_),g=e(d),(0,f.rU)(g[0],g[1],o[0],o[1],a[0],a[1])<i?(n.push(a[0],a[1]),y=m.toString(),c[y]=!0):(u.push(m,_,_,p),h.push(a,g,g,o),l.push(s,d,d,r));return n}const b=new h.Z({color:"rgba(0,0,0,0.2)"}),w=[90,45,30,20,10,5,2,1,.5,20/60,10/60,5/60,2/60,1/60,30/3600,20/3600,10/3600,5/3600,2/3600,1/3600];class S extends d.Z{constructor(t){t=t||{};const e=Object.assign({updateWhileAnimating:!0,updateWhileInteracting:!0,renderBuffer:0},t);delete e.maxLines,delete e.strokeStyle,delete e.targetSize,delete e.showLabels,delete e.lonLabelFormatter,delete e.latLabelFormatter,delete e.lonLabelPosition,delete e.latLabelPosition,delete e.lonLabelStyle,delete e.latLabelStyle,delete e.intervals,super(e),this.projection_=null,this.maxLat_=1/0,this.maxLon_=1/0,this.minLat_=-1/0,this.minLon_=-1/0,this.maxX_=1/0,this.maxY_=1/0,this.minX_=-1/0,this.minY_=-1/0,this.targetSize_=void 0!==t.targetSize?t.targetSize:100,this.maxLines_=void 0!==t.maxLines?t.maxLines:100,this.meridians_=[],this.parallels_=[],this.strokeStyle_=void 0!==t.strokeStyle?t.strokeStyle:b,this.fromLonLatTransform_=void 0,this.toLonLatTransform_=void 0,this.projectionCenterLonLat_=null,this.bottomLeft_=null,this.bottomRight_=null,this.topLeft_=null,this.topRight_=null,this.meridiansLabels_=null,this.parallelsLabels_=null,t.showLabels&&(this.lonLabelFormatter_=null==t.lonLabelFormatter?m.I8.bind(this,"EW"):t.lonLabelFormatter,this.latLabelFormatter_=null==t.latLabelFormatter?m.I8.bind(this,"NS"):t.latLabelFormatter,this.lonLabelPosition_=null==t.lonLabelPosition?0:t.lonLabelPosition,this.latLabelPosition_=null==t.latLabelPosition?1:t.latLabelPosition,this.lonLabelStyleBase_=new u.ZP({text:void 0!==t.lonLabelStyle?t.lonLabelStyle.clone():new c.Z({font:"12px Calibri,sans-serif",textBaseline:"bottom",fill:new o.Z({color:"rgba(0,0,0,1)"}),stroke:new h.Z({color:"rgba(255,255,255,1)",width:3})})}),this.lonLabelStyle_=t=>{const e=t.get("graticule_label");return this.lonLabelStyleBase_.getText().setText(e),this.lonLabelStyleBase_},this.latLabelStyleBase_=new u.ZP({text:void 0!==t.latLabelStyle?t.latLabelStyle.clone():new c.Z({font:"12px Calibri,sans-serif",textAlign:"right",fill:new o.Z({color:"rgba(0,0,0,1)"}),stroke:new h.Z({color:"rgba(255,255,255,1)",width:3})})}),this.latLabelStyle_=t=>{const e=t.get("graticule_label");return this.latLabelStyleBase_.getText().setText(e),this.latLabelStyleBase_},this.meridiansLabels_=[],this.parallelsLabels_=[],this.addEventListener(r.Z.POSTRENDER,this.drawLabels_.bind(this))),this.intervals_=void 0!==t.intervals?t.intervals:w,this.setSource(new g.Z({loader:this.loaderFunction.bind(this),strategy:this.strategyFunction.bind(this),features:new n.Z,overlaps:!1,useSpatialIndex:!1,wrapX:t.wrapX})),this.featurePool_=[],this.lineStyle_=new u.ZP({stroke:this.strokeStyle_}),this.loadedExtent_=null,this.renderedExtent_=null,this.renderedResolution_=null,this.setRenderOrder(null)}strategyFunction(t,e){let i=t.slice();return this.projection_&&this.getSource().getWrapX()&&(0,p.wrapX)(i,this.projection_),this.loadedExtent_&&((0,p.approximatelyEquals)(this.loadedExtent_,i,e)?i=this.loadedExtent_.slice():this.getSource().removeLoadedExtent(this.loadedExtent_)),[i]}loaderFunction(t,e,i){this.loadedExtent_=t;const n=this.getSource(),r=this.getExtent()||[-1/0,-1/0,1/0,1/0],o=(0,p.getIntersection)(r,t);if(this.renderedExtent_&&(0,p.equals)(this.renderedExtent_,o)&&this.renderedResolution_===e)return;if(this.renderedExtent_=o,this.renderedResolution_=e,(0,p.isEmpty)(o))return;const a=(0,p.getCenter)(o),l=e*e/4;(!this.projection_||!(0,_.equivalent)(this.projection_,i))&&this.updateProjectionInfo_(i),this.createGraticule_(o,a,e,l);let h,u=this.meridians_.length+this.parallels_.length;for(this.meridiansLabels_&&(u+=this.meridians_.length),this.parallelsLabels_&&(u+=this.parallels_.length);u>this.featurePool_.length;)h=new s.default,this.featurePool_.push(h);const c=n.getFeaturesCollection();c.clear();let d,g,f=0;for(d=0,g=this.meridians_.length;d<g;++d)h=this.featurePool_[f++],h.setGeometry(this.meridians_[d]),h.setStyle(this.lineStyle_),c.push(h);for(d=0,g=this.parallels_.length;d<g;++d)h=this.featurePool_[f++],h.setGeometry(this.parallels_[d]),h.setStyle(this.lineStyle_),c.push(h)}addMeridian_(t,e,i,n,r,s){const o=this.getMeridian_(t,e,i,n,s);if((0,p.intersects)(o.getExtent(),r)){if(this.meridiansLabels_){const e=this.lonLabelFormatter_(t);s in this.meridiansLabels_?this.meridiansLabels_[s].text=e:this.meridiansLabels_[s]={geom:new l.default([]),text:e}}this.meridians_[s++]=o}return s}addParallel_(t,e,i,n,r,s){const o=this.getParallel_(t,e,i,n,s);if((0,p.intersects)(o.getExtent(),r)){if(this.parallelsLabels_){const e=this.latLabelFormatter_(t);s in this.parallelsLabels_?this.parallelsLabels_[s].text=e:this.parallelsLabels_[s]={geom:new l.default([]),text:e}}this.parallels_[s++]=o}return s}drawLabels_(t){const e=t.frameState.viewState.rotation,i=t.frameState.viewState.resolution,n=t.frameState.size,r=t.frameState.extent,s=(0,p.getCenter)(r);let o=r;if(e){const t=n[0]*i,e=n[1]*i;o=[s[0]-t/2,s[1]-e/2,s[0]+t/2,s[1]+e/2]}let a=0,l=0,h=this.latLabelPosition_<.5;const u=this.projection_.getExtent(),c=(0,p.getWidth)(u);this.getSource().getWrapX()&&this.projection_.canWrapX()&&!(0,p.containsExtent)(u,r)&&(a=Math.floor((r[0]-u[0])/c),l=Math.ceil((r[2]-u[2])/c),h=h!==Math.abs(e)>Math.PI/2);const d=function(t){if(!(t.context instanceof CanvasRenderingContext2D))throw new Error("Only works for render events from Canvas 2D layers");const e=t.inversePixelTransform[0],i=t.inversePixelTransform[1],n=Math.sqrt(e*e+i*i),r=t.frameState,s=(0,v.Jp)(t.inversePixelTransform.slice(),r.coordinateToPixelTransform),o=(0,x.se)(r.viewState.resolution,n);let a;const l=(0,_.getUserProjection)();return l&&(a=(0,_.getTransformFromProjections)(l,r.viewState.projection)),new y.Z(t.context,n,r.extent,s,r.viewState.rotation,o,a)}(t);for(let t=a;t<=l;++t){let i,n,u,g,p=this.meridians_.length+this.parallels_.length;if(this.meridiansLabels_)for(n=0,u=this.meridiansLabels_.length;n<u;++n){const a=this.meridians_[n];if(e||0!==t){const i=a.clone();i.translate(t*c,0),i.rotate(-e,s),g=this.getMeridianPoint_(i,o,n),g.rotate(e,s)}else g=this.getMeridianPoint_(a,r,n);i=this.featurePool_[p++],i.setGeometry(g),i.set("graticule_label",this.meridiansLabels_[n].text),d.drawFeature(i,this.lonLabelStyle_(i))}if(this.parallelsLabels_&&(t===a&&h||t===l&&!h))for(n=0,u=this.parallels_.length;n<u;++n){const a=this.parallels_[n];if(e||0!==t){const i=a.clone();i.translate(t*c,0),i.rotate(-e,s),g=this.getParallelPoint_(i,o,n),g.rotate(e,s)}else g=this.getParallelPoint_(a,r,n);i=this.featurePool_[p++],i.setGeometry(g),i.set("graticule_label",this.parallelsLabels_[n].text),d.drawFeature(i,this.latLabelStyle_(i))}}}createGraticule_(t,e,i,n){const r=this.getInterval_(i);if(-1==r)return this.meridians_.length=0,this.parallels_.length=0,this.meridiansLabels_&&(this.meridiansLabels_.length=0),void(this.parallelsLabels_&&(this.parallelsLabels_.length=0));let s=!1;const o=this.projection_.getExtent(),a=(0,p.getWidth)(o);this.getSource().getWrapX()&&this.projection_.canWrapX()&&!(0,p.containsExtent)(o,t)&&((0,p.getWidth)(t)>=a?(t[0]=o[0],t[2]=o[2]):s=!0);const l=[(0,f.uZ)(e[0],this.minX_,this.maxX_),(0,f.uZ)(e[1],this.minY_,this.maxY_)],h=this.toLonLatTransform_(l);isNaN(h[1])&&(h[1]=Math.abs(this.maxLat_)>=Math.abs(this.minLat_)?this.maxLat_:this.minLat_);let u=(0,f.uZ)(h[0],this.minLon_,this.maxLon_),c=(0,f.uZ)(h[1],this.minLat_,this.maxLat_);const d=this.maxLines_;let g,m,_,y,v=t;s||(v=[(0,f.uZ)(t[0],this.minX_,this.maxX_),(0,f.uZ)(t[1],this.minY_,this.maxY_),(0,f.uZ)(t[2],this.minX_,this.maxX_),(0,f.uZ)(t[3],this.minY_,this.maxY_)]);const x=(0,p.applyTransform)(v,this.toLonLatTransform_,void 0,8);let E=x[3],b=x[2],w=x[1],S=x[0];if(s||((0,p.containsCoordinate)(v,this.bottomLeft_)&&(S=this.minLon_,w=this.minLat_),(0,p.containsCoordinate)(v,this.bottomRight_)&&(b=this.maxLon_,w=this.minLat_),(0,p.containsCoordinate)(v,this.topLeft_)&&(S=this.minLon_,E=this.maxLat_),(0,p.containsCoordinate)(v,this.topRight_)&&(b=this.maxLon_,E=this.maxLat_),E=(0,f.uZ)(E,c,this.maxLat_),b=(0,f.uZ)(b,u,this.maxLon_),w=(0,f.uZ)(w,this.minLat_,c),S=(0,f.uZ)(S,this.minLon_,u)),u=Math.floor(u/r)*r,y=(0,f.uZ)(u,this.minLon_,this.maxLon_),m=this.addMeridian_(y,w,E,n,t,0),g=0,s)for(;(y-=r)>=S&&g++<d;)m=this.addMeridian_(y,w,E,n,t,m);else for(;y!=this.minLon_&&g++<d;)y=Math.max(y-r,this.minLon_),m=this.addMeridian_(y,w,E,n,t,m);if(y=(0,f.uZ)(u,this.minLon_,this.maxLon_),g=0,s)for(;(y+=r)<=b&&g++<d;)m=this.addMeridian_(y,w,E,n,t,m);else for(;y!=this.maxLon_&&g++<d;)y=Math.min(y+r,this.maxLon_),m=this.addMeridian_(y,w,E,n,t,m);for(this.meridians_.length=m,this.meridiansLabels_&&(this.meridiansLabels_.length=m),c=Math.floor(c/r)*r,_=(0,f.uZ)(c,this.minLat_,this.maxLat_),m=this.addParallel_(_,S,b,n,t,0),g=0;_!=this.minLat_&&g++<d;)_=Math.max(_-r,this.minLat_),m=this.addParallel_(_,S,b,n,t,m);for(_=(0,f.uZ)(c,this.minLat_,this.maxLat_),g=0;_!=this.maxLat_&&g++<d;)_=Math.min(_+r,this.maxLat_),m=this.addParallel_(_,S,b,n,t,m);this.parallels_.length=m,this.parallelsLabels_&&(this.parallelsLabels_.length=m)}getInterval_(t){const e=this.projectionCenterLonLat_[0],i=this.projectionCenterLonLat_[1];let n=-1;const r=Math.pow(this.targetSize_*t,2),s=[],o=[];for(let t=0,a=this.intervals_.length;t<a;++t){const a=(0,f.uZ)(this.intervals_[t]/2,0,90),l=(0,f.uZ)(i,-90+a,90-a);if(s[0]=e-a,s[1]=l-a,o[0]=e+a,o[1]=l+a,this.fromLonLatTransform_(s,s),this.fromLonLatTransform_(o,o),Math.pow(o[0]-s[0],2)+Math.pow(o[1]-s[1],2)<=r)break;n=this.intervals_[t]}return n}getMeridian_(t,e,i,n,r){const s=function(t,e,i,n,r){const s=(0,_.get)("EPSG:4326");return E((function(n){return[t,e+(i-e)*n]}),(0,_.getTransform)(s,n),r)}(t,e,i,this.projection_,n);let o=this.meridians_[r];return o?(o.setFlatCoordinates("XY",s),o.changed()):(o=new a.Z(s,"XY"),this.meridians_[r]=o),o}getMeridianPoint_(t,e,i){const n=t.getFlatCoordinates();let r=1,s=n.length-1;n[r]>n[s]&&(r=s,s=1);const o=Math.max(e[1],n[r]),a=Math.min(e[3],n[s]),l=(0,f.uZ)(e[1]+Math.abs(e[1]-e[3])*this.lonLabelPosition_,o,a),h=[n[r-1]+(n[s-1]-n[r-1])*(l-n[r])/(n[s]-n[r]),l],u=this.meridiansLabels_[i].geom;return u.setCoordinates(h),u}getMeridians(){return this.meridians_}getParallel_(t,e,i,n,r){const s=function(t,e,i,n,r){const s=(0,_.get)("EPSG:4326");return E((function(n){return[e+(i-e)*n,t]}),(0,_.getTransform)(s,n),r)}(t,e,i,this.projection_,n);let o=this.parallels_[r];return o?(o.setFlatCoordinates("XY",s),o.changed()):o=new a.Z(s,"XY"),o}getParallelPoint_(t,e,i){const n=t.getFlatCoordinates();let r=0,s=n.length-2;n[r]>n[s]&&(r=s,s=0);const o=Math.max(e[0],n[r]),a=Math.min(e[2],n[s]),l=(0,f.uZ)(e[0]+Math.abs(e[0]-e[2])*this.latLabelPosition_,o,a),h=[l,n[r+1]+(n[s+1]-n[r+1])*(l-n[r])/(n[s]-n[r])],u=this.parallelsLabels_[i].geom;return u.setCoordinates(h),u}getParallels(){return this.parallels_}updateProjectionInfo_(t){const e=(0,_.get)("EPSG:4326"),i=t.getWorldExtent();this.maxLat_=i[3],this.maxLon_=i[2],this.minLat_=i[1],this.minLon_=i[0];const n=(0,_.getTransform)(t,e);if(this.minLon_<this.maxLon_)this.toLonLatTransform_=n;else{const t=this.minLon_+this.maxLon_/2;this.maxLon_+=360,this.toLonLatTransform_=function(e,i,r){const s=n(e,i,r=r||2);for(let e=0,i=s.length;e<i;e+=r)s[e]<t&&(s[e]+=360);return s}}this.fromLonLatTransform_=(0,_.getTransform)(e,t);const r=(0,p.applyTransform)([this.minLon_,this.minLat_,this.maxLon_,this.maxLat_],this.fromLonLatTransform_,void 0,8);this.minX_=r[0],this.maxX_=r[2],this.minY_=r[1],this.maxY_=r[3],this.bottomLeft_=this.fromLonLatTransform_([this.minLon_,this.minLat_]),this.bottomRight_=this.fromLonLatTransform_([this.maxLon_,this.minLat_]),this.topLeft_=this.fromLonLatTransform_([this.minLon_,this.maxLat_]),this.topRight_=this.fromLonLatTransform_([this.maxLon_,this.maxLat_]),this.projectionCenterLonLat_=this.toLonLatTransform_((0,p.getCenter)(t.getExtent())),isNaN(this.projectionCenterLonLat_[1])&&(this.projectionCenterLonLat_[1]=Math.abs(this.maxLat_)>=Math.abs(this.minLat_)?this.maxLat_:this.minLat_),this.projection_=t}}const T=S},8734:(t,e,i)=>{"use strict";i.d(e,{V:()=>p,Z:()=>_});var n=i(947),r=i(8714),s=i(2071),o=i(291),a=i(5487),l=i(5990),h=i(9515),u=i(9374),c=i(8641),d=i(4187),g=i(5818);class p extends o.ZP{constructor(t,e){super(t),this.layer=e}}const f="layers";class m extends n.Z{constructor(t){t=t||{};const e=Object.assign({},t);delete e.layers;let i=t.layers;super(e),this.on,this.once,this.un,this.layersListenerKeys_=[],this.listenerKeys_={},this.addChangeListener(f,this.handleLayersChanged_),i?Array.isArray(i)?i=new r.Z(i.slice(),{unique:!0}):(0,h.h)("function"==typeof i.getArray,43):i=new r.Z(void 0,{unique:!0}),this.setLayers(i)}handleLayerChange_(){this.changed()}handleLayersChanged_(){this.layersListenerKeys_.forEach(g.bN),this.layersListenerKeys_.length=0;const t=this.getLayers();this.layersListenerKeys_.push((0,g.oL)(t,s.Z.ADD,this.handleLayersAdd_,this),(0,g.oL)(t,s.Z.REMOVE,this.handleLayersRemove_,this));for(const t in this.listenerKeys_)this.listenerKeys_[t].forEach(g.bN);(0,u.Z)(this.listenerKeys_);const e=t.getArray();for(let t=0,i=e.length;t<i;t++){const i=e[t];this.registerLayerListeners_(i),this.dispatchEvent(new p("addlayer",i))}this.changed()}registerLayerListeners_(t){const e=[(0,g.oL)(t,l.Z.PROPERTYCHANGE,this.handleLayerChange_,this),(0,g.oL)(t,a.Z.CHANGE,this.handleLayerChange_,this)];t instanceof m&&e.push((0,g.oL)(t,"addlayer",this.handleLayerGroupAdd_,this),(0,g.oL)(t,"removelayer",this.handleLayerGroupRemove_,this)),this.listenerKeys_[(0,d.sq)(t)]=e}handleLayerGroupAdd_(t){this.dispatchEvent(new p("addlayer",t.layer))}handleLayerGroupRemove_(t){this.dispatchEvent(new p("removelayer",t.layer))}handleLayersAdd_(t){const e=t.element;this.registerLayerListeners_(e),this.dispatchEvent(new p("addlayer",e)),this.changed()}handleLayersRemove_(t){const e=t.element,i=(0,d.sq)(e);this.listenerKeys_[i].forEach(g.bN),delete this.listenerKeys_[i],this.dispatchEvent(new p("removelayer",e)),this.changed()}getLayers(){return this.get(f)}setLayers(t){const e=this.getLayers();if(e){const t=e.getArray();for(let e=0,i=t.length;e<i;++e)this.dispatchEvent(new p("removelayer",t[e]))}this.set(f,t)}getLayersArray(t){return t=void 0!==t?t:[],this.getLayers().forEach((function(e){e.getLayersArray(t)})),t}getLayerStatesArray(t){const e=void 0!==t?t:[],i=e.length;this.getLayers().forEach((function(t){t.getLayerStatesArray(e)}));const n=this.getLayerState();let r=n.zIndex;t||void 0!==n.zIndex||(r=0);for(let t=i,s=e.length;t<s;t++){const i=e[t];i.opacity*=n.opacity,i.visible=i.visible&&n.visible,i.maxResolution=Math.min(i.maxResolution,n.maxResolution),i.minResolution=Math.max(i.minResolution,n.minResolution),i.minZoom=Math.max(i.minZoom,n.minZoom),i.maxZoom=Math.min(i.maxZoom,n.maxZoom),void 0!==n.extent&&(void 0!==i.extent?i.extent=(0,c.getIntersection)(i.extent,n.extent):i.extent=n.extent),void 0===i.zIndex&&(i.zIndex=r)}return e}getSourceState(){return"ready"}}const _=m},3028:(t,e,i)=>{"use strict";i.d(e,{Z:()=>a});var n=i(1295);class r extends n.Z{constructor(t){super(t=t||{})}}const s=r;var o=i(9186);const a=class extends s{constructor(t){super(t)}createRenderer(){return new o.Z(this)}getData(t){return super.getData(t)}}},1295:(t,e,i)=>{"use strict";i.d(e,{Z:()=>g,j:()=>d});var n=i(947),r=i(5487),s=i(1912),o=i(8771),a=i(7681),l=i(9515),h=i(8641),u=i(5818);class c extends n.Z{constructor(t){const e=Object.assign({},t);delete e.source,super(e),this.on,this.once,this.un,this.mapPrecomposeKey_=null,this.mapRenderKey_=null,this.sourceChangeKey_=null,this.renderer_=null,this.sourceReady_=!1,this.rendered=!1,t.render&&(this.render=t.render),t.map&&this.setMap(t.map),this.addChangeListener(s.Z.SOURCE,this.handleSourcePropertyChange_);const i=t.source?t.source:null;this.setSource(i)}getLayersArray(t){return(t=t||[]).push(this),t}getLayerStatesArray(t){return(t=t||[]).push(this.getLayerState()),t}getSource(){return this.get(s.Z.SOURCE)||null}getRenderSource(){return this.getSource()}getSourceState(){const t=this.getSource();return t?t.getState():"undefined"}handleSourceChange_(){this.changed(),this.sourceReady_||"ready"!==this.getSource().getState()||(this.sourceReady_=!0,this.dispatchEvent("sourceready"))}handleSourcePropertyChange_(){this.sourceChangeKey_&&((0,u.bN)(this.sourceChangeKey_),this.sourceChangeKey_=null),this.sourceReady_=!1;const t=this.getSource();t&&(this.sourceChangeKey_=(0,u.oL)(t,r.Z.CHANGE,this.handleSourceChange_,this),"ready"===t.getState()&&(this.sourceReady_=!0,setTimeout((()=>{this.dispatchEvent("sourceready")}),0))),this.changed()}getFeatures(t){return this.renderer_?this.renderer_.getFeatures(t):Promise.resolve([])}getData(t){return this.renderer_&&this.rendered?this.renderer_.getData(t):null}isVisible(t){let e;const i=this.getMapInternal();let n;!t&&i&&(t=i.getView()),e=t instanceof a.ZP?{viewState:t.getState(),extent:t.calculateExtent()}:t,!e.layerStatesArray&&i&&(e.layerStatesArray=i.getLayerGroup().getLayerStatesArray()),n=e.layerStatesArray?e.layerStatesArray.find((t=>t.layer===this)):this.getLayerState();const r=this.getExtent();return d(n,e.viewState)&&(!r||(0,h.intersects)(r,e.extent))}getAttributions(t){if(!this.isVisible(t))return[];let e;const i=this.getSource();if(i&&(e=i.getAttributions()),!e)return[];let n=e(t instanceof a.ZP?t.getViewStateAndExtent():t);return Array.isArray(n)||(n=[n]),n}render(t,e){const i=this.getRenderer();return i.prepareFrame(t)?(this.rendered=!0,i.renderFrame(t,e)):null}unrender(){this.rendered=!1}setMapInternal(t){t||this.unrender(),this.set(s.Z.MAP,t)}getMapInternal(){return this.get(s.Z.MAP)}setMap(t){this.mapPrecomposeKey_&&((0,u.bN)(this.mapPrecomposeKey_),this.mapPrecomposeKey_=null),t||this.changed(),this.mapRenderKey_&&((0,u.bN)(this.mapRenderKey_),this.mapRenderKey_=null),t&&(this.mapPrecomposeKey_=(0,u.oL)(t,o.Z.PRECOMPOSE,(function(t){const e=t.frameState.layerStatesArray,i=this.getLayerState(!1);(0,l.h)(!e.some((function(t){return t.layer===i.layer})),67),e.push(i)}),this),this.mapRenderKey_=(0,u.oL)(this,r.Z.CHANGE,t.render,t),this.changed())}setSource(t){this.set(s.Z.SOURCE,t)}getRenderer(){return this.renderer_||(this.renderer_=this.createRenderer()),this.renderer_}hasRenderer(){return!!this.renderer_}createRenderer(){return null}disposeInternal(){this.renderer_&&(this.renderer_.dispose(),delete this.renderer_),this.setSource(null),super.disposeInternal()}}function d(t,e){if(!t.visible)return!1;const i=e.resolution;if(i<t.minResolution||i>=t.maxResolution)return!1;const n=e.zoom;return n>t.minZoom&&n<=t.maxZoom}const g=c},1912:(t,e,i)=>{"use strict";i.d(e,{Z:()=>n});const n={OPACITY:"opacity",VISIBLE:"visible",EXTENT:"extent",Z_INDEX:"zIndex",MAX_RESOLUTION:"maxResolution",MIN_RESOLUTION:"minResolution",MAX_ZOOM:"maxZoom",MIN_ZOOM:"minZoom",SOURCE:"source",MAP:"map"}},1666:(t,e,i)=>{"use strict";i.d(e,{Z:()=>o});var n=i(4272),r=i(8845);class s extends n.Z{constructor(t){super(t)}createRenderer(){return new r.Z(this)}}const o=s},8280:(t,e,i)=>{"use strict";i.d(e,{Z:()=>n});const n={PRELOAD:"preload",USE_INTERIM_TILES_ON_ERROR:"useInterimTilesOnError"}},2371:(t,e,i)=>{"use strict";i.d(e,{Z:()=>o});var n=i(2563),r=i(5682);class s extends n.Z{constructor(t){super(t)}createRenderer(){return new r.Z(this)}}const o=s},4087:(t,e,i)=>{"use strict";function n(t,e){return[[-1/0,-1/0,1/0,1/0]]}function r(t,e){return[t]}i.d(e,{$6:()=>n,VW:()=>r}),i(6121)},3983:(t,e,i)=>{"use strict";function n(t,e,i){return Math.min(Math.max(t,e),i)}function r(t,e,i,n,r,o){const a=r-i,l=o-n;if(0!==a||0!==l){const s=((t-i)*a+(e-n)*l)/(a*a+l*l);s>1?(i=r,n=o):s>0&&(i+=a*s,n+=l*s)}return s(t,e,i,n)}function s(t,e,i,n){const r=i-t,s=n-e;return r*r+s*s}function o(t){const e=t.length;for(let i=0;i<e;i++){let n=i,r=Math.abs(t[i][i]);for(let s=i+1;s<e;s++){const e=Math.abs(t[s][i]);e>r&&(r=e,n=s)}if(0===r)return null;const s=t[n];t[n]=t[i],t[i]=s;for(let n=i+1;n<e;n++){const r=-t[n][i]/t[i][i];for(let s=i;s<e+1;s++)i==s?t[n][s]=0:t[n][s]+=r*t[i][s]}}const i=new Array(e);for(let n=e-1;n>=0;n--){i[n]=t[n][e]/t[n][n];for(let r=n-1;r>=0;r--)t[r][e]-=t[r][n]*i[n]}return i}function a(t){return 180*t/Math.PI}function l(t){return t*Math.PI/180}function h(t,e){const i=t%e;return i*e<0?i+e:i}function u(t,e,i){return t+i*(e-t)}function c(t,e){const i=Math.pow(10,e);return Math.round(t*i)/i}function d(t,e){return Math.round(c(t,e))}function g(t,e){return Math.floor(c(t,e))}function p(t,e){return Math.ceil(c(t,e))}i.d(e,{$W:()=>h,FH:()=>c,GW:()=>g,NM:()=>d,SV:()=>o,Ux:()=>a,Yr:()=>l,bI:()=>s,mD:()=>p,rU:()=>r,t7:()=>u,uZ:()=>n})},3315:(t,e,i)=>{"use strict";i.d(e,{Kk:()=>l,R6:()=>r,xA:()=>a});var n=i(4187);function r(t,e,i,r){const s=document.createElement("script"),o="olc_"+(0,n.sq)(e);function a(){delete window[o],s.parentNode.removeChild(s)}s.async=!0,s.src=t+(t.includes("?")?"&":"?")+(r||"callback")+"="+o;const l=setTimeout((function(){a(),i&&i()}),1e4);window[o]=function(t){clearTimeout(l),a(),e(t)},document.head.appendChild(s)}class s extends Error{constructor(t){super("Unexpected response status: "+t.status),this.name="ResponseError",this.response=t}}class o extends Error{constructor(t){super("Failed to issue request"),this.name="ClientError",this.client=t}}function a(t){return new Promise((function(e,i){const n=new XMLHttpRequest;n.addEventListener("load",(function(t){const n=t.target;if(!n.status||n.status>=200&&n.status<300){let t;try{t=JSON.parse(n.responseText)}catch(t){const e="Error parsing response text as JSON: "+t.message;return void i(new Error(e))}e(t)}else i(new s(n))})),n.addEventListener("error",(function(t){i(new o(t.target))})),n.open("GET",t),n.setRequestHeader("Accept","application/json"),n.send()}))}function l(t,e){return e.includes("://")?e:new URL(e,t).href}},9374:(t,e,i)=>{"use strict";function n(t){for(const e in t)delete t[e]}function r(t){let e;for(e in t)return!1;return!e}i.d(e,{Z:()=>n,x:()=>r})},4238:(t,e,i)=>{"use strict";i.d(e,{Z:()=>n});const n={POINTERMOVE:"pointermove",POINTERDOWN:"pointerdown",POINTERUP:"pointerup",POINTEROVER:"pointerover",POINTEROUT:"pointerout",POINTERENTER:"pointerenter",POINTERLEAVE:"pointerleave",POINTERCANCEL:"pointercancel"}},6121:(t,e,i)=>{"use strict";i.r(e),i.d(e,{METERS_PER_UNIT:()=>o.W,Projection:()=>n.Z,addCommon:()=>H,addCoordinateTransforms:()=>R,addEquivalentProjections:()=>b,addEquivalentTransforms:()=>w,addProjection:()=>y,addProjections:()=>v,clearAllProjections:()=>S,clearUserProjection:()=>G,cloneTransform:()=>m,createProjection:()=>T,createSafeCoordinateTransform:()=>X,createTransformFromCoordinateTransform:()=>C,disableCoordinateWarning:()=>f,equivalent:()=>L,fromLonLat:()=>P,fromUserCoordinate:()=>U,fromUserExtent:()=>V,fromUserResolution:()=>W,get:()=>x,getPointResolution:()=>E,getTransform:()=>F,getTransformFromProjections:()=>M,getUserProjection:()=>z,identityTransform:()=>_,setUserProjection:()=>k,toLonLat:()=>I,toUserCoordinate:()=>j,toUserExtent:()=>B,toUserResolution:()=>q,transform:()=>A,transformExtent:()=>Z,transformWithProjections:()=>D,useGeographic:()=>N});var n=i(9619),r=i(5984),s=i(6740),o=i(8375),a=i(8920),l=i(9556),h=i(8641),u=i(3983),c=i(1900),d=i(7580),g=i(44);let p=!0;function f(t){p=!(void 0===t||t)}function m(t,e){if(void 0!==e){for(let i=0,n=t.length;i<n;++i)e[i]=t[i];e=e}else e=t.slice();return e}function _(t,e){if(void 0!==e&&t!==e){for(let i=0,n=t.length;i<n;++i)e[i]=t[i];t=e}return t}function y(t){(0,a.IH)(t.getCode(),t),(0,l.IH)(t,t,m)}function v(t){t.forEach(y)}function x(t){return"string"==typeof t?(0,a.U2)(t):t||null}function E(t,e,i,n){let r;const s=(t=x(t)).getPointResolutionFunc();if(s){if(r=s(e,i),n&&n!==t.getUnits()){const e=t.getMetersPerUnit();e&&(r=r*e/o.W[n])}}else{const s=t.getUnits();if("degrees"==s&&!n||"degrees"==n)r=e;else{const a=M(t,x("EPSG:4326"));if(a===_&&"degrees"!==s)r=e*t.getMetersPerUnit();else{let t=[i[0]-e/2,i[1],i[0]+e/2,i[1],i[0],i[1]-e/2,i[0],i[1]+e/2];t=a(t,t,2),r=((0,d.Sp)(t.slice(0,2),t.slice(2,4))+(0,d.Sp)(t.slice(4,6),t.slice(6,8)))/2}const l=n?o.W[n]:t.getMetersPerUnit();void 0!==l&&(r/=l)}}return r}function b(t){v(t),t.forEach((function(e){t.forEach((function(t){e!==t&&(0,l.IH)(e,t,m)}))}))}function w(t,e,i,n){t.forEach((function(t){e.forEach((function(e){(0,l.IH)(t,e,i),(0,l.IH)(e,t,n)}))}))}function S(){(0,a.ZH)(),(0,l.ZH)()}function T(t,e){return t?"string"==typeof t?x(t):t:x(e)}function C(t){return function(e,i,n){const r=e.length;n=void 0!==n?n:2,i=void 0!==i?i:new Array(r);for(let s=0;s<r;s+=n){const r=t(e.slice(s,s+n)),o=r.length;for(let t=0,a=n;t<a;++t)i[s+t]=t>=o?e[s+t]:r[t]}return i}}function R(t,e,i,n){const r=x(t),s=x(e);(0,l.IH)(r,s,C(i)),(0,l.IH)(s,r,C(n))}function P(t,e){return f(),A(t,"EPSG:4326",void 0!==e?e:"EPSG:3857")}function I(t,e){const i=A(t,void 0!==e?e:"EPSG:3857","EPSG:4326"),n=i[0];return(n<-180||n>180)&&(i[0]=(0,u.$W)(n+180,360)-180),i}function L(t,e){if(t===e)return!0;const i=t.getUnits()===e.getUnits();return(t.getCode()===e.getCode()||M(t,e)===m)&&i}function M(t,e){const i=t.getCode(),n=e.getCode();let r=(0,l.U2)(i,n);return r||(r=_),r}function F(t,e){return M(x(t),x(e))}function A(t,e,i){return F(e,i)(t,void 0,t.length)}function Z(t,e,i,n){const r=F(e,i);return(0,h.applyTransform)(t,r,void 0,n)}function D(t,e,i){return M(e,i)(t)}let O=null;function k(t){O=x(t)}function G(){O=null}function z(){return O}function N(){k("EPSG:4326")}function j(t,e){return O?A(t,e,O):t}function U(t,e){return O?A(t,O,e):(p&&!(0,c.fS)(t,[0,0])&&t[0]>=-180&&t[0]<=180&&t[1]>=-90&&t[1]<=90&&(p=!1,(0,g.ZK)("Call useGeographic() from ol/proj once to work with [longitude, latitude] coordinates.")),t)}function B(t,e){return O?Z(t,e,O):t}function V(t,e){return O?Z(t,O,e):t}function q(t,e){if(!O)return t;const i=x(e).getUnits(),n=O.getUnits();return i&&n?t*o.W[i]/o.W[n]:t}function W(t,e){if(!O)return t;const i=x(e).getUnits(),n=O.getUnits();return i&&n?t*o.W[n]/o.W[i]:t}function X(t,e,i){return function(n){let r,s;if(t.canWrapX()){const e=t.getExtent(),o=(0,h.getWidth)(e);n=n.slice(0),s=(0,c.jk)(n,t,o),s&&(n[0]=n[0]-s*o),n[0]=(0,u.uZ)(n[0],e[0],e[2]),n[1]=(0,u.uZ)(n[1],e[1],e[3]),r=i(n)}else r=i(n);return s&&e.canWrapX()&&(r[0]+=s*(0,h.getWidth)(e.getExtent())),r}}function H(){b(r.LB),b(s.LB),w(s.LB,r.LB,r.jn,r.DE)}H()},9619:(t,e,i)=>{"use strict";i.d(e,{Z:()=>r});var n=i(8375);const r=class{constructor(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}canWrapX(){return this.canWrapX_}getCode(){return this.code_}getExtent(){return this.extent_}getUnits(){return this.units_}getMetersPerUnit(){return this.metersPerUnit_||n.W[this.units_]}getWorldExtent(){return this.worldExtent_}getAxisOrientation(){return this.axisOrientation_}isGlobal(){return this.global_}setGlobal(t){this.global_=t,this.canWrapX_=!(!t||!this.extent_)}getDefaultTileGrid(){return this.defaultTileGrid_}setDefaultTileGrid(t){this.defaultTileGrid_=t}setExtent(t){this.extent_=t,this.canWrapX_=!(!this.global_||!t)}setWorldExtent(t){this.worldExtent_=t}setGetPointResolution(t){this.getPointResolutionFunc_=t}getPointResolutionFunc(){return this.getPointResolutionFunc_}}},8375:(t,e,i)=>{"use strict";i.d(e,{N:()=>r,W:()=>s});const n={9001:"m",9002:"ft",9003:"us-ft",9101:"radians",9102:"degrees"};function r(t){return n[t]}const s={radians:6370997/(2*Math.PI),degrees:2*Math.PI*6370997/360,ft:.3048,m:1,"us-ft":1200/3937}},5984:(t,e,i)=>{"use strict";i.d(e,{DE:()=>d,LB:()=>u,jn:()=>c});var n=i(9619);const r=6378137,s=Math.PI*r,o=[-s,-s,s,s],a=[-180,-85,180,85],l=r*Math.log(Math.tan(Math.PI/2));class h extends n.Z{constructor(t){super({code:t,units:"m",extent:o,global:!0,worldExtent:a,getPointResolution:function(t,e){return t/Math.cosh(e[1]/r)}})}}const u=[new h("EPSG:3857"),new h("EPSG:102100"),new h("EPSG:102113"),new h("EPSG:900913"),new h("http://www.opengis.net/def/crs/EPSG/0/3857"),new h("http://www.opengis.net/gml/srs/epsg.xml#3857")];function c(t,e,i){const n=t.length;i=i>1?i:2,void 0===e&&(e=i>2?t.slice():new Array(n));for(let o=0;o<n;o+=i){e[o]=s*t[o]/180;let i=r*Math.log(Math.tan(Math.PI*(+t[o+1]+90)/360));i>l?i=l:i<-l&&(i=-l),e[o+1]=i}return e}function d(t,e,i){const n=t.length;i=i>1?i:2,void 0===e&&(e=i>2?t.slice():new Array(n));for(let o=0;o<n;o+=i)e[o]=180*t[o]/s,e[o+1]=360*Math.atan(Math.exp(t[o+1]/r))/Math.PI-90;return e}},6740:(t,e,i)=>{"use strict";i.d(e,{LB:()=>a});var n=i(9619);const r=[-180,-90,180,90],s=6378137*Math.PI/180;class o extends n.Z{constructor(t,e){super({code:t,units:"degrees",extent:r,axisOrientation:e,global:!0,metersPerUnit:s,worldExtent:r})}}const a=[new o("CRS:84"),new o("EPSG:4326","neu"),new o("urn:ogc:def:crs:OGC:1.3:CRS84"),new o("urn:ogc:def:crs:OGC:2:84"),new o("http://www.opengis.net/def/crs/OGC/1.3/CRS84"),new o("http://www.opengis.net/gml/srs/epsg.xml#4326","neu"),new o("http://www.opengis.net/def/crs/EPSG/0/4326","neu")]},8920:(t,e,i)=>{"use strict";i.d(e,{IH:()=>o,U2:()=>s,ZH:()=>r});let n={};function r(){n={}}function s(t){return n[t]||n[t.replace(/urn:(x-)?ogc:def:crs:EPSG:(.*:)?(\w+)$/,"EPSG:$3")]||null}function o(t,e){n[t]=e}},9556:(t,e,i)=>{"use strict";i.d(e,{IH:()=>s,U2:()=>o,ZH:()=>r});let n={};function r(){n={}}function s(t,e,i){const r=t.getCode(),s=e.getCode();r in n||(n[r]={}),n[r][s]=i}function o(t,e){let i;return t in n&&e in n[t]&&(i=n[t][e]),i}},747:(t,e,i)=>{"use strict";i.d(e,{Z:()=>o});var n=i(5431),r=i(2033);class s extends n.Z{constructor(t){super(),this.geometry_=null,this.element_=document.createElement("div"),this.element_.style.position="absolute",this.element_.style.pointerEvents="auto",this.element_.className="ol-box "+t,this.map_=null,this.startPixel_=null,this.endPixel_=null}disposeInternal(){this.setMap(null)}render_(){const t=this.startPixel_,e=this.endPixel_,i="px",n=this.element_.style;n.left=Math.min(t[0],e[0])+i,n.top=Math.min(t[1],e[1])+i,n.width=Math.abs(e[0]-t[0])+i,n.height=Math.abs(e[1]-t[1])+i}setMap(t){if(this.map_){this.map_.getOverlayContainer().removeChild(this.element_);const t=this.element_.style;t.left="inherit",t.top="inherit",t.width="inherit",t.height="inherit"}this.map_=t,this.map_&&this.map_.getOverlayContainer().appendChild(this.element_)}setPixels(t,e){this.startPixel_=t,this.endPixel_=e,this.createOrUpdateGeometry(),this.render_()}createOrUpdateGeometry(){const t=this.startPixel_,e=this.endPixel_,i=[t,[t[0],e[1]],e,[e[0],t[1]]].map(this.map_.getCoordinateFromPixelInternal,this.map_);i[4]=i[0].slice(),this.geometry_?this.geometry_.setCoordinates([i]):this.geometry_=new r.ZP([i])}getGeometry(){return this.geometry_}}const o=s},7380:(t,e,i)=>{"use strict";i.d(e,{Z:()=>s});var n=i(291);class r extends n.ZP{constructor(t,e,i,n){super(t),this.inversePixelTransform=e,this.frameState=i,this.context=n}}const s=r},8771:(t,e,i)=>{"use strict";i.d(e,{Z:()=>n});const n={PRERENDER:"prerender",POSTRENDER:"postrender",PRECOMPOSE:"precompose",POSTCOMPOSE:"postcompose",RENDERCOMPLETE:"rendercomplete"}},5624:(t,e,i)=>{"use strict";i.d(e,{Z:()=>n});const n=class{drawCustom(t,e,i,n){}drawGeometry(t){}setStyle(t){}drawCircle(t,e){}drawFeature(t,e){}drawGeometryCollection(t,e){}drawLineString(t,e){}drawMultiLineString(t,e){}drawMultiPoint(t,e){}drawMultiPolygon(t,e){}drawPoint(t,e){}drawPolygon(t,e){}drawText(t,e){}setFillStrokeStyle(t,e){}setImageStyle(t,e){}setTextStyle(t,e){}}},147:(t,e,i)=>{"use strict";i.d(e,{Df:()=>l,He:()=>d,Kd:()=>P,PH:()=>m,Qx:()=>S,Tx:()=>f,V4:()=>p,X9:()=>c,Zw:()=>I,_f:()=>L,bL:()=>h,mb:()=>u,oB:()=>y,rc:()=>g,ru:()=>_,sG:()=>x,yC:()=>v});var n=i(2971),r=i(177),s=i(9374),o=i(8326),a=i(245);const l="10px sans-serif",h="#000",u="round",c=[],d=0,g="round",p=10,f="#000",m="center",_="middle",y=[0,0,0,0],v=1,x=new n.Z;let E,b=null;const w={},S=function(){const t="32px ",e=["monospace","serif"],i=e.length,n="wmytzilWMYTZIL@#/&?$%10";let r,o;function l(r,s,a){let l=!0;for(let h=0;h<i;++h){const i=e[h];if(o=R(r+" "+s+" "+t+i,n),a!=i){const e=R(r+" "+s+" "+t+a+","+i,n);l=l&&e!=o}}return!!l}function h(){let t=!0;const e=x.getKeys();for(let i=0,n=e.length;i<n;++i){const n=e[i];x.get(n)<100&&(l.apply(this,n.split("\n"))?((0,s.Z)(w),b=null,E=void 0,x.set(n,100)):(x.set(n,x.get(n)+1,!0),t=!1))}t&&(clearInterval(r),r=void 0)}return function(t){const e=(0,a.p)(t);if(!e)return;const i=e.families;for(let t=0,n=i.length;t<n;++t){const n=i[t],s=e.style+"\n"+e.weight+"\n"+n;void 0===x.get(s)&&(x.set(s,100,!0),l(e.style,e.weight,n)||(x.set(s,0,!0),void 0===r&&(r=setInterval(h,32))))}}}(),T=function(){let t;return function(e){let i=w[e];if(null==i){if(r.Id){const t=(0,a.p)(e),n=C(e,"Žg");i=(isNaN(Number(t.lineHeight))?1.2:Number(t.lineHeight))*(n.actualBoundingBoxAscent+n.actualBoundingBoxDescent)}else t||(t=document.createElement("div"),t.innerHTML="M",t.style.minHeight="0",t.style.maxHeight="none",t.style.height="auto",t.style.padding="0",t.style.border="none",t.style.position="absolute",t.style.display="block",t.style.left="-99999px"),t.style.font=e,document.body.appendChild(t),i=t.offsetHeight,document.body.removeChild(t);w[e]=i}return i}}();function C(t,e){return b||(b=(0,o.E4)(1,1)),t!=E&&(b.font=t,E=b.font),b.measureText(e)}function R(t,e){return C(t,e).width}function P(t,e,i){if(e in i)return i[e];const n=e.split("\n").reduce(((e,i)=>Math.max(e,R(t,i))),0);return i[e]=n,n}function I(t,e){const i=[],n=[],r=[];let s=0,o=0,a=0,l=0;for(let h=0,u=e.length;h<=u;h+=2){const c=e[h];if("\n"===c||h===u){s=Math.max(s,o),r.push(o),o=0,a+=l;continue}const d=e[h+1]||t.font,g=R(d,c);i.push(g),o+=g;const p=T(d);n.push(p),l=Math.max(l,p)}return{width:s,height:a,widths:i,heights:n,lineWidths:r}}function L(t,e,i,n,r,s,o,a,l,h,u){t.save(),1!==i&&(t.globalAlpha*=i),e&&t.setTransform.apply(t,e),n.contextInstructions?(t.translate(l,h),t.scale(u[0],u[1]),function(t,e){const i=t.contextInstructions;for(let t=0,n=i.length;t<n;t+=2)Array.isArray(i[t+1])?e[i[t]].apply(e,i[t+1]):e[i[t]]=i[t+1]}(n,t)):u[0]<0||u[1]<0?(t.translate(l,h),t.scale(u[0],u[1]),t.drawImage(n,r,s,o,a,0,0,o,a)):t.drawImage(n,r,s,o,a,l,h,o*u[0],a*u[1]),t.restore()}},9557:(t,e,i)=>{"use strict";i.d(e,{Z:()=>d});var n=i(5707),r=i(8716),s=i(5624),o=i(6620),a=i(8641),l=i(147),h=i(5537),u=i(9241);class c extends s.Z{constructor(t,e,i,n){super(),this.tolerance=t,this.maxExtent=e,this.pixelRatio=n,this.maxLineWidth=0,this.resolution=i,this.beginGeometryInstruction1_=null,this.beginGeometryInstruction2_=null,this.bufferedMaxExtent_=null,this.instructions=[],this.coordinates=[],this.tmpCoordinate_=[],this.hitDetectionInstructions=[],this.state={}}applyPixelRatio(t){const e=this.pixelRatio;return 1==e?t:t.map((function(t){return t*e}))}appendFlatPointCoordinates(t,e){const i=this.getBufferedMaxExtent(),n=this.tmpCoordinate_,r=this.coordinates;let s=r.length;for(let o=0,l=t.length;o<l;o+=e)n[0]=t[o],n[1]=t[o+1],(0,a.containsCoordinate)(i,n)&&(r[s++]=n[0],r[s++]=n[1]);return s}appendFlatLineCoordinates(t,e,i,n,s,o){const l=this.coordinates;let h=l.length;const u=this.getBufferedMaxExtent();o&&(e+=n);let c=t[e],d=t[e+1];const g=this.tmpCoordinate_;let p,f,m,_=!0;for(p=e+n;p<i;p+=n)g[0]=t[p],g[1]=t[p+1],m=(0,a.coordinateRelationship)(u,g),m!==f?(_&&(l[h++]=c,l[h++]=d,_=!1),l[h++]=g[0],l[h++]=g[1]):m===r.Z.INTERSECTING?(l[h++]=g[0],l[h++]=g[1],_=!1):_=!0,c=g[0],d=g[1],f=m;return(s&&_||p===e+n)&&(l[h++]=c,l[h++]=d),h}drawCustomCoordinates_(t,e,i,n,r){for(let s=0,o=i.length;s<o;++s){const o=i[s],a=this.appendFlatLineCoordinates(t,e,o,n,!1,!1);r.push(a),e=o}return e}drawCustom(t,e,i,r){this.beginGeometry(t,e);const s=t.getType(),o=t.getStride(),a=this.coordinates.length;let l,h,c,d,g;switch(s){case"MultiPolygon":l=t.getOrientedFlatCoordinates(),d=[];const e=t.getEndss();g=0;for(let t=0,i=e.length;t<i;++t){const i=[];g=this.drawCustomCoordinates_(l,g,e[t],o,i),d.push(i)}this.instructions.push([n.ZP.CUSTOM,a,d,t,i,u.ug]),this.hitDetectionInstructions.push([n.ZP.CUSTOM,a,d,t,r||i,u.ug]);break;case"Polygon":case"MultiLineString":c=[],l="Polygon"==s?t.getOrientedFlatCoordinates():t.getFlatCoordinates(),g=this.drawCustomCoordinates_(l,0,t.getEnds(),o,c),this.instructions.push([n.ZP.CUSTOM,a,c,t,i,u.o1]),this.hitDetectionInstructions.push([n.ZP.CUSTOM,a,c,t,r||i,u.o1]);break;case"LineString":case"Circle":l=t.getFlatCoordinates(),h=this.appendFlatLineCoordinates(l,0,l.length,o,!1,!1),this.instructions.push([n.ZP.CUSTOM,a,h,t,i,u.Ml]),this.hitDetectionInstructions.push([n.ZP.CUSTOM,a,h,t,r||i,u.Ml]);break;case"MultiPoint":l=t.getFlatCoordinates(),h=this.appendFlatPointCoordinates(l,o),h>a&&(this.instructions.push([n.ZP.CUSTOM,a,h,t,i,u.Ml]),this.hitDetectionInstructions.push([n.ZP.CUSTOM,a,h,t,r||i,u.Ml]));break;case"Point":l=t.getFlatCoordinates(),this.coordinates.push(l[0],l[1]),h=this.coordinates.length,this.instructions.push([n.ZP.CUSTOM,a,h,t,i]),this.hitDetectionInstructions.push([n.ZP.CUSTOM,a,h,t,r||i])}this.endGeometry(e)}beginGeometry(t,e){this.beginGeometryInstruction1_=[n.ZP.BEGIN_GEOMETRY,e,0,t],this.instructions.push(this.beginGeometryInstruction1_),this.beginGeometryInstruction2_=[n.ZP.BEGIN_GEOMETRY,e,0,t],this.hitDetectionInstructions.push(this.beginGeometryInstruction2_)}finish(){return{instructions:this.instructions,hitDetectionInstructions:this.hitDetectionInstructions,coordinates:this.coordinates}}reverseHitDetectionInstructions(){const t=this.hitDetectionInstructions;let e;t.reverse();const i=t.length;let r,s,o=-1;for(e=0;e<i;++e)r=t[e],s=r[0],s==n.ZP.END_GEOMETRY?o=e:s==n.ZP.BEGIN_GEOMETRY&&(r[2]=e,(0,h.FZ)(this.hitDetectionInstructions,o,e),o=-1)}setFillStrokeStyle(t,e){const i=this.state;if(t){const e=t.getColor();i.fillStyle=(0,o.y)(e||l.bL)}else i.fillStyle=void 0;if(e){const t=e.getColor();i.strokeStyle=(0,o.y)(t||l.Tx);const n=e.getLineCap();i.lineCap=void 0!==n?n:l.mb;const r=e.getLineDash();i.lineDash=r?r.slice():l.X9;const s=e.getLineDashOffset();i.lineDashOffset=s||l.He;const a=e.getLineJoin();i.lineJoin=void 0!==a?a:l.rc;const h=e.getWidth();i.lineWidth=void 0!==h?h:l.yC;const u=e.getMiterLimit();i.miterLimit=void 0!==u?u:l.V4,i.lineWidth>this.maxLineWidth&&(this.maxLineWidth=i.lineWidth,this.bufferedMaxExtent_=null)}else i.strokeStyle=void 0,i.lineCap=void 0,i.lineDash=null,i.lineDashOffset=void 0,i.lineJoin=void 0,i.lineWidth=void 0,i.miterLimit=void 0}createFill(t){const e=t.fillStyle,i=[n.ZP.SET_FILL_STYLE,e];return"string"!=typeof e&&i.push(!0),i}applyStroke(t){this.instructions.push(this.createStroke(t))}createStroke(t){return[n.ZP.SET_STROKE_STYLE,t.strokeStyle,t.lineWidth*this.pixelRatio,t.lineCap,t.lineJoin,t.miterLimit,this.applyPixelRatio(t.lineDash),t.lineDashOffset*this.pixelRatio]}updateFillStyle(t,e){const i=t.fillStyle;"string"==typeof i&&t.currentFillStyle==i||(void 0!==i&&this.instructions.push(e.call(this,t)),t.currentFillStyle=i)}updateStrokeStyle(t,e){const i=t.strokeStyle,n=t.lineCap,r=t.lineDash,s=t.lineDashOffset,o=t.lineJoin,a=t.lineWidth,l=t.miterLimit;(t.currentStrokeStyle!=i||t.currentLineCap!=n||r!=t.currentLineDash&&!(0,h.fS)(t.currentLineDash,r)||t.currentLineDashOffset!=s||t.currentLineJoin!=o||t.currentLineWidth!=a||t.currentMiterLimit!=l)&&(void 0!==i&&e.call(this,t),t.currentStrokeStyle=i,t.currentLineCap=n,t.currentLineDash=r,t.currentLineDashOffset=s,t.currentLineJoin=o,t.currentLineWidth=a,t.currentMiterLimit=l)}endGeometry(t){this.beginGeometryInstruction1_[2]=this.instructions.length,this.beginGeometryInstruction1_=null,this.beginGeometryInstruction2_[2]=this.hitDetectionInstructions.length,this.beginGeometryInstruction2_=null;const e=[n.ZP.END_GEOMETRY,t];this.instructions.push(e),this.hitDetectionInstructions.push(e)}getBufferedMaxExtent(){if(!this.bufferedMaxExtent_&&(this.bufferedMaxExtent_=(0,a.clone)(this.maxExtent),this.maxLineWidth>0)){const t=this.resolution*(this.maxLineWidth+1)/2;(0,a.buffer)(this.bufferedMaxExtent_,t,this.bufferedMaxExtent_)}return this.bufferedMaxExtent_}}const d=c},1328:(t,e,i)=>{"use strict";i.d(e,{Z:()=>h});var n=i(9557),r=i(3206),s=i(5014),o=i(9353),a=i(7043);const l={Circle:o.Z,Default:n.Z,Image:r.Z,LineString:s.Z,Polygon:o.Z,Text:a.Z},h=class{constructor(t,e,i,n){this.tolerance_=t,this.maxExtent_=e,this.pixelRatio_=n,this.resolution_=i,this.buildersByZIndex_={}}finish(){const t={};for(const e in this.buildersByZIndex_){t[e]=t[e]||{};const i=this.buildersByZIndex_[e];for(const n in i){const r=i[n].finish();t[e][n]=r}}return t}getBuilder(t,e){const i=void 0!==t?t.toString():"0";let n=this.buildersByZIndex_[i];void 0===n&&(n={},this.buildersByZIndex_[i]=n);let r=n[e];return void 0===r&&(r=new(0,l[e])(this.tolerance_,this.maxExtent_,this.resolution_,this.pixelRatio_),n[e]=r),r}}},613:(t,e,i)=>{"use strict";i.d(e,{Z:()=>E});var n=i(5707),r=i(7043),s=i(6101),o=i(8641),a=i(147),l=i(7396),h=i(5537),u=i(7374),c=i(6442);const d=(0,o.createEmpty)(),g=[],p=[],f=[],m=[];function _(t){return t[3].declutterBox}const y=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 v(t,e){return"start"===e?e=y.test(t)?"right":"left":"end"===e&&(e=y.test(t)?"left":"right"),r.I[e]}function x(t,e,i){return i>0&&t.push("\n",""),t.push(e,""),t}const E=class{constructor(t,e,i,n){this.overlaps=i,this.pixelRatio=e,this.resolution=t,this.alignFill_,this.instructions=n.instructions,this.coordinates=n.coordinates,this.coordinateCache_={},this.renderedTransform_=(0,s.Ue)(),this.hitDetectionInstructions=n.hitDetectionInstructions,this.pixelCoordinates_=null,this.viewRotation_=0,this.fillStates=n.fillStates||{},this.strokeStates=n.strokeStates||{},this.textStates=n.textStates||{},this.widths_={},this.labels_={}}createLabel(t,e,i,n){const s=t+e+i+n;if(this.labels_[s])return this.labels_[s];const o=n?this.strokeStates[n]:null,l=i?this.fillStates[i]:null,h=this.textStates[e],u=this.pixelRatio,c=[h.scale[0]*u,h.scale[1]*u],d=Array.isArray(t),g=h.justify?r.I[h.justify]:v(Array.isArray(t)?t[0]:t,h.textAlign||a.PH),p=n&&o.lineWidth?o.lineWidth:0,f=d?t:t.split("\n").reduce(x,[]),{width:m,height:_,widths:y,heights:E,lineWidths:b}=(0,a.Zw)(h,f),w=m+p,S=[],T=(w+2)*c[0],C=(_+p)*c[1],R={width:T<0?Math.floor(T):Math.ceil(T),height:C<0?Math.floor(C):Math.ceil(C),contextInstructions:S};1==c[0]&&1==c[1]||S.push("scale",c),n&&(S.push("strokeStyle",o.strokeStyle),S.push("lineWidth",p),S.push("lineCap",o.lineCap),S.push("lineJoin",o.lineJoin),S.push("miterLimit",o.miterLimit),S.push("setLineDash",[o.lineDash]),S.push("lineDashOffset",o.lineDashOffset)),i&&S.push("fillStyle",l.fillStyle),S.push("textBaseline","middle"),S.push("textAlign","center");const P=.5-g;let I=g*w+P*p;const L=[],M=[];let F,A=0,Z=0,D=0,O=0;for(let t=0,e=f.length;t<e;t+=2){const e=f[t];if("\n"===e){Z+=A,A=0,I=g*w+P*p,++O;continue}const r=f[t+1]||h.font;r!==F&&(n&&L.push("font",r),i&&M.push("font",r),F=r),A=Math.max(A,E[D]);const s=[e,I+P*y[D]+g*(y[D]-b[O]),.5*(p+A)+Z];I+=y[D],n&&L.push("strokeText",s),i&&M.push("fillText",s),++D}return Array.prototype.push.apply(S,L),Array.prototype.push.apply(S,M),this.labels_[s]=R,R}replayTextBackground_(t,e,i,n,r,s,o){t.beginPath(),t.moveTo.apply(t,e),t.lineTo.apply(t,i),t.lineTo.apply(t,n),t.lineTo.apply(t,r),t.lineTo.apply(t,e),s&&(this.alignFill_=s[2],this.fill_(t)),o&&(this.setStrokeStyle_(t,o),t.stroke())}calculateImageOrLabelDimensions_(t,e,i,n,r,a,l,h,u,c,_,y,v,x,E,b){let w=i-(l*=y[0]),S=n-(h*=y[1]);const T=r+u>t?t-u:r,C=a+c>e?e-c:a,R=x[3]+T*y[0]+x[1],P=x[0]+C*y[1]+x[2],I=w-x[3],L=S-x[0];let M;return(E||0!==_)&&(g[0]=I,m[0]=I,g[1]=L,p[1]=L,p[0]=I+R,f[0]=p[0],f[1]=L+P,m[1]=f[1]),0!==_?(M=(0,s.qC)((0,s.Ue)(),i,n,1,1,_,-i,-n),(0,s.nn)(M,g),(0,s.nn)(M,p),(0,s.nn)(M,f),(0,s.nn)(M,m),(0,o.createOrUpdate)(Math.min(g[0],p[0],f[0],m[0]),Math.min(g[1],p[1],f[1],m[1]),Math.max(g[0],p[0],f[0],m[0]),Math.max(g[1],p[1],f[1],m[1]),d)):(0,o.createOrUpdate)(Math.min(I,I+R),Math.min(L,L+P),Math.max(I,I+R),Math.max(L,L+P),d),v&&(w=Math.round(w),S=Math.round(S)),{drawImageX:w,drawImageY:S,drawImageW:T,drawImageH:C,originX:u,originY:c,declutterBox:{minX:d[0],minY:d[1],maxX:d[2],maxY:d[3],value:b},canvasTransform:M,scale:y}}replayImageOrLabel_(t,e,i,n,r,s,o){const l=!(!s&&!o),h=n.declutterBox,u=t.canvas,c=o?o[2]*n.scale[0]/2:0;return h.minX-c<=u.width/e&&h.maxX+c>=0&&h.minY-c<=u.height/e&&h.maxY+c>=0&&(l&&this.replayTextBackground_(t,g,p,f,m,s,o),(0,a._f)(t,n.canvasTransform,r,i,n.originX,n.originY,n.drawImageW,n.drawImageH,n.drawImageX,n.drawImageY,n.scale)),!0}fill_(t){if(this.alignFill_){const e=(0,s.nn)(this.renderedTransform_,[0,0]),i=512*this.pixelRatio;t.save(),t.translate(e[0]%i,e[1]%i),t.rotate(this.viewRotation_)}t.fill(),this.alignFill_&&t.restore()}setStrokeStyle_(t,e){t.strokeStyle=e[1],t.lineWidth=e[2],t.lineCap=e[3],t.lineJoin=e[4],t.miterLimit=e[5],t.lineDashOffset=e[7],t.setLineDash(e[6])}drawLabelWithPointPlacement_(t,e,i,n){const s=this.textStates[e],o=this.createLabel(t,e,n,i),l=this.strokeStates[i],h=this.pixelRatio,u=v(Array.isArray(t)?t[0]:t,s.textAlign||a.PH),c=r.I[s.textBaseline||a.ru],d=l&&l.lineWidth?l.lineWidth:0;return{label:o,anchorX:u*(o.width/h-2*s.scale[0])+2*(.5-u)*d,anchorY:c*o.height/h+2*(.5-c)*d}}execute_(t,e,i,r,d,g,p,f){let m;this.pixelCoordinates_&&(0,h.fS)(i,this.renderedTransform_)?m=this.pixelCoordinates_:(this.pixelCoordinates_||(this.pixelCoordinates_=[]),m=(0,c.vT)(this.coordinates,0,this.coordinates.length,2,i,this.pixelCoordinates_),(0,s.lk)(this.renderedTransform_,i));let y=0;const x=r.length;let E,b,w,S,T,C,R,P,I,L,M,F,A=0,Z=0,D=0,O=null,k=null;const G=this.coordinateCache_,z=this.viewRotation_,N=Math.round(1e12*Math.atan2(-i[1],i[0]))/1e12,j={context:t,pixelRatio:this.pixelRatio,resolution:this.resolution,rotation:z},U=this.instructions!=r||this.overlaps?0:200;let B,V,q,W;for(;y<x;){const i=r[y];switch(i[0]){case n.ZP.BEGIN_GEOMETRY:B=i[1],W=i[3],B.getGeometry()?void 0===p||(0,o.intersects)(p,W.getExtent())?++y:y=i[2]+1:y=i[2];break;case n.ZP.BEGIN_PATH:Z>U&&(this.fill_(t),Z=0),D>U&&(t.stroke(),D=0),Z||D||(t.beginPath(),S=NaN,T=NaN),++y;break;case n.ZP.CIRCLE:A=i[1];const r=m[A],s=m[A+1],h=m[A+2]-r,c=m[A+3]-s,x=Math.sqrt(h*h+c*c);t.moveTo(r+x,s),t.arc(r,s,x,0,2*Math.PI,!0),++y;break;case n.ZP.CLOSE_PATH:t.closePath(),++y;break;case n.ZP.CUSTOM:A=i[1],E=i[2];const X=i[3],H=i[4],Y=6==i.length?i[5]:void 0;j.geometry=X,j.feature=B,y in G||(G[y]=[]);const K=G[y];Y?Y(m,A,E,2,K):(K[0]=m[A],K[1]=m[A+1],K.length=2),H(K,j),++y;break;case n.ZP.DRAW_IMAGE:A=i[1],E=i[2],P=i[3],b=i[4],w=i[5];let $=i[6];const J=i[7],Q=i[8],tt=i[9],et=i[10];let it=i[11];const nt=i[12];let rt=i[13];const st=i[14],ot=i[15];if(!P&&i.length>=20){I=i[19],L=i[20],M=i[21],F=i[22];const t=this.drawLabelWithPointPlacement_(I,L,M,F);P=t.label,i[3]=P;const e=i[23];b=(t.anchorX-e)*this.pixelRatio,i[4]=b;const n=i[24];w=(t.anchorY-n)*this.pixelRatio,i[5]=w,$=P.height,i[6]=$,rt=P.width,i[13]=rt}let at,lt,ht,ut;i.length>25&&(at=i[25]),i.length>17?(lt=i[16],ht=i[17],ut=i[18]):(lt=a.oB,ht=!1,ut=!1),et&&N?it+=z:et||N||(it-=z);let ct=0;for(;A<E;A+=2){if(at&&at[ct++]<rt/this.pixelRatio)continue;const i=this.calculateImageOrLabelDimensions_(P.width,P.height,m[A],m[A+1],rt,$,b,w,Q,tt,it,nt,d,lt,ht||ut,B),n=[t,e,P,i,J,ht?O:null,ut?k:null];if(f){if("none"===st)continue;if("obstacle"===st){f.insert(i.declutterBox);continue}{let t,e;if(ot){const i=E-A;if(!ot[i]){ot[i]=n;continue}if(t=ot[i],delete ot[i],e=_(t),f.collides(e))continue}if(f.collides(i.declutterBox))continue;t&&(f.insert(e),this.replayImageOrLabel_.apply(this,t)),f.insert(i.declutterBox)}}this.replayImageOrLabel_.apply(this,n)}++y;break;case n.ZP.DRAW_CHARS:const dt=i[1],gt=i[2],pt=i[3],ft=i[4];F=i[5];const mt=i[6],_t=i[7],yt=i[8];M=i[9];const vt=i[10];I=i[11],L=i[12];const xt=[i[13],i[13]],Et=this.textStates[L],bt=Et.font,wt=[Et.scale[0]*_t,Et.scale[1]*_t];let St;bt in this.widths_?St=this.widths_[bt]:(St={},this.widths_[bt]=St);const Tt=(0,u.W)(m,dt,gt,2),Ct=Math.abs(wt[0])*(0,a.Kd)(bt,I,St);if(ft||Ct<=Tt){const i=(Tt-Ct)*v(I,this.textStates[L].textAlign),n=(0,l.q)(m,dt,gt,2,I,i,mt,Math.abs(wt[0]),a.Kd,bt,St,N?0:this.viewRotation_);t:if(n){const i=[];let r,s,o,l,h;if(M)for(r=0,s=n.length;r<s;++r){h=n[r],o=h[4],l=this.createLabel(o,L,"",M),b=h[2]+(wt[0]<0?-vt:vt),w=pt*l.height+2*(.5-pt)*vt*wt[1]/wt[0]-yt;const s=this.calculateImageOrLabelDimensions_(l.width,l.height,h[0],h[1],l.width,l.height,b,w,0,0,h[3],xt,!1,a.oB,!1,B);if(f&&f.collides(s.declutterBox))break t;i.push([t,e,l,s,1,null,null])}if(F)for(r=0,s=n.length;r<s;++r){h=n[r],o=h[4],l=this.createLabel(o,L,F,""),b=h[2],w=pt*l.height-yt;const s=this.calculateImageOrLabelDimensions_(l.width,l.height,h[0],h[1],l.width,l.height,b,w,0,0,h[3],xt,!1,a.oB,!1,B);if(f&&f.collides(s.declutterBox))break t;i.push([t,e,l,s,1,null,null])}f&&f.load(i.map(_));for(let t=0,e=i.length;t<e;++t)this.replayImageOrLabel_.apply(this,i[t])}}++y;break;case n.ZP.END_GEOMETRY:if(void 0!==g){B=i[1];const t=g(B,W);if(t)return t}++y;break;case n.ZP.FILL:U?Z++:this.fill_(t),++y;break;case n.ZP.MOVE_TO_LINE_TO:for(A=i[1],E=i[2],V=m[A],q=m[A+1],C=V+.5|0,R=q+.5|0,C===S&&R===T||(t.moveTo(V,q),S=C,T=R),A+=2;A<E;A+=2)V=m[A],q=m[A+1],C=V+.5|0,R=q+.5|0,A!=E-2&&C===S&&R===T||(t.lineTo(V,q),S=C,T=R);++y;break;case n.ZP.SET_FILL_STYLE:O=i,this.alignFill_=i[2],Z&&(this.fill_(t),Z=0,D&&(t.stroke(),D=0)),t.fillStyle=i[1],++y;break;case n.ZP.SET_STROKE_STYLE:k=i,D&&(t.stroke(),D=0),this.setStrokeStyle_(t,i),++y;break;case n.ZP.STROKE:U?D++:t.stroke(),++y;break;default:++y}}Z&&this.fill_(t),D&&t.stroke()}execute(t,e,i,n,r,s){this.viewRotation_=n,this.execute_(t,e,i,this.instructions,r,void 0,void 0,s)}executeHitDetection(t,e,i,n,r){return this.viewRotation_=i,this.execute_(t,1,e,this.hitDetectionInstructions,!0,n,r)}}},2669:(t,e,i)=>{"use strict";i.d(e,{Z:()=>d});var n=i(613),r=i(5537),s=i(8641),o=i(6101),a=i(8326),l=i(9374),h=i(6442);const u=["Polygon","Circle","LineString","Image","Text","Default"],c={},d=class{constructor(t,e,i,n,r,s){this.maxExtent_=t,this.overlaps_=n,this.pixelRatio_=i,this.resolution_=e,this.renderBuffer_=s,this.executorsByZIndex_={},this.hitDetectionContext_=null,this.hitDetectionTransform_=(0,o.Ue)(),this.createExecutors_(r)}clip(t,e){const i=this.getClipCoords(e);t.beginPath(),t.moveTo(i[0],i[1]),t.lineTo(i[2],i[3]),t.lineTo(i[4],i[5]),t.lineTo(i[6],i[7]),t.clip()}createExecutors_(t){for(const e in t){let i=this.executorsByZIndex_[e];void 0===i&&(i={},this.executorsByZIndex_[e]=i);const r=t[e];for(const t in r){const e=r[t];i[t]=new n.Z(this.resolution_,this.pixelRatio_,this.overlaps_,e)}}}hasExecutors(t){for(const e in this.executorsByZIndex_){const i=this.executorsByZIndex_[e];for(let e=0,n=t.length;e<n;++e)if(t[e]in i)return!0}return!1}forEachFeatureAtCoordinate(t,e,i,n,l,h){const d=2*(n=Math.round(n))+1,g=(0,o.qC)(this.hitDetectionTransform_,n+.5,n+.5,1/e,-1/e,-i,-t[0],-t[1]),p=!this.hitDetectionContext_;p&&(this.hitDetectionContext_=(0,a.E4)(d,d,void 0,{willReadFrequently:!0}));const f=this.hitDetectionContext_;let m;f.canvas.width!==d||f.canvas.height!==d?(f.canvas.width=d,f.canvas.height=d):p||f.clearRect(0,0,d,d),void 0!==this.renderBuffer_&&(m=(0,s.createEmpty)(),(0,s.extendCoordinate)(m,t),(0,s.buffer)(m,e*(this.renderBuffer_+n),m));const _=function(t){if(void 0!==c[t])return c[t];const e=2*t+1,i=t*t,n=new Array(i+1);for(let r=0;r<=t;++r)for(let s=0;s<=t;++s){const o=r*r+s*s;if(o>i)break;let a=n[o];a||(a=[],n[o]=a),a.push(4*((t+r)*e+(t+s))+3),r>0&&a.push(4*((t-r)*e+(t+s))+3),s>0&&(a.push(4*((t+r)*e+(t-s))+3),r>0&&a.push(4*((t-r)*e+(t-s))+3))}const r=[];for(let t=0,e=n.length;t<e;++t)n[t]&&r.push(...n[t]);return c[t]=r,r}(n);let y;function v(t,e){const i=f.getImageData(0,0,d,d).data;for(let r=0,s=_.length;r<s;r++)if(i[_[r]]>0){if(!h||"Image"!==y&&"Text"!==y||h.includes(t)){const i=(_[r]-3)/4,s=n-i%d,o=n-(i/d|0),a=l(t,e,s*s+o*o);if(a)return a}f.clearRect(0,0,d,d);break}}const x=Object.keys(this.executorsByZIndex_).map(Number);let E,b,w,S,T;for(x.sort(r.j2),E=x.length-1;E>=0;--E){const t=x[E].toString();for(w=this.executorsByZIndex_[t],b=u.length-1;b>=0;--b)if(y=u[b],S=w[y],void 0!==S&&(T=S.executeHitDetection(f,g,i,v,m),T))return T}}getClipCoords(t){const e=this.maxExtent_;if(!e)return null;const i=e[0],n=e[1],r=e[2],s=e[3],o=[i,n,i,s,r,s,r,n];return(0,h.vT)(o,0,8,2,t,o),o}isEmpty(){return(0,l.x)(this.executorsByZIndex_)}execute(t,e,i,n,s,o,a){const l=Object.keys(this.executorsByZIndex_).map(Number);let h,c,d,g,p,f;for(l.sort(r.j2),this.maxExtent_&&(t.save(),this.clip(t,i)),o=o||u,a&&l.reverse(),h=0,c=l.length;h<c;++h){const r=l[h].toString();for(p=this.executorsByZIndex_[r],d=0,g=o.length;d<g;++d)f=p[o[d]],void 0!==f&&f.execute(t,e,i,n,s,a)}this.maxExtent_&&t.restore()}}},3206:(t,e,i)=>{"use strict";i.d(e,{Z:()=>o});var n=i(9557),r=i(5707);class s extends n.Z{constructor(t,e,i,n){super(t,e,i,n),this.hitDetectionImage_=null,this.image_=null,this.imagePixelRatio_=void 0,this.anchorX_=void 0,this.anchorY_=void 0,this.height_=void 0,this.opacity_=void 0,this.originX_=void 0,this.originY_=void 0,this.rotateWithView_=void 0,this.rotation_=void 0,this.scale_=void 0,this.width_=void 0,this.declutterMode_=void 0,this.declutterImageWithText_=void 0}drawPoint(t,e){if(!this.image_)return;this.beginGeometry(t,e);const i=t.getFlatCoordinates(),n=t.getStride(),s=this.coordinates.length,o=this.appendFlatPointCoordinates(i,n);this.instructions.push([r.ZP.DRAW_IMAGE,s,o,this.image_,this.anchorX_*this.imagePixelRatio_,this.anchorY_*this.imagePixelRatio_,Math.ceil(this.height_*this.imagePixelRatio_),this.opacity_,this.originX_*this.imagePixelRatio_,this.originY_*this.imagePixelRatio_,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.declutterMode_,this.declutterImageWithText_]),this.hitDetectionInstructions.push([r.ZP.DRAW_IMAGE,s,o,this.hitDetectionImage_,this.anchorX_,this.anchorY_,this.height_,1,this.originX_,this.originY_,this.rotateWithView_,this.rotation_,this.scale_,this.width_,this.declutterMode_,this.declutterImageWithText_]),this.endGeometry(e)}drawMultiPoint(t,e){if(!this.image_)return;this.beginGeometry(t,e);const i=t.getFlatCoordinates(),n=t.getStride(),s=this.coordinates.length,o=this.appendFlatPointCoordinates(i,n);this.instructions.push([r.ZP.DRAW_IMAGE,s,o,this.image_,this.anchorX_*this.imagePixelRatio_,this.anchorY_*this.imagePixelRatio_,Math.ceil(this.height_*this.imagePixelRatio_),this.opacity_,this.originX_*this.imagePixelRatio_,this.originY_*this.imagePixelRatio_,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.declutterMode_,this.declutterImageWithText_]),this.hitDetectionInstructions.push([r.ZP.DRAW_IMAGE,s,o,this.hitDetectionImage_,this.anchorX_,this.anchorY_,this.height_,1,this.originX_,this.originY_,this.rotateWithView_,this.rotation_,this.scale_,this.width_,this.declutterMode_,this.declutterImageWithText_]),this.endGeometry(e)}finish(){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,super.finish()}setImageStyle(t,e){const i=t.getAnchor(),n=t.getSize(),r=t.getOrigin();this.imagePixelRatio_=t.getPixelRatio(this.pixelRatio),this.anchorX_=i[0],this.anchorY_=i[1],this.hitDetectionImage_=t.getHitDetectionImage(),this.image_=t.getImage(this.pixelRatio),this.height_=n[1],this.opacity_=t.getOpacity(),this.originX_=r[0],this.originY_=r[1],this.rotateWithView_=t.getRotateWithView(),this.rotation_=t.getRotation(),this.scale_=t.getScaleArray(),this.width_=n[0],this.declutterMode_=t.getDeclutterMode(),this.declutterImageWithText_=e}}const o=s},5069:(t,e,i)=>{"use strict";i.d(e,{Z:()=>g});var n=i(5624),r=i(6620),s=i(6101),o=i(147),a=i(5537),l=i(8641),h=i(3983),u=i(6442),c=i(2967);class d extends n.Z{constructor(t,e,i,n,r,o,a){super(),this.context_=t,this.pixelRatio_=e,this.extent_=i,this.transform_=n,this.transformRotation_=n?(0,h.FH)(Math.atan2(n[1],n[0]),10):0,this.viewRotation_=r,this.squaredTolerance_=o,this.userTransform_=a,this.contextFillState_=null,this.contextStrokeState_=null,this.contextTextState_=null,this.fillState_=null,this.strokeState_=null,this.image_=null,this.imageAnchorX_=0,this.imageAnchorY_=0,this.imageHeight_=0,this.imageOpacity_=0,this.imageOriginX_=0,this.imageOriginY_=0,this.imageRotateWithView_=!1,this.imageRotation_=0,this.imageScale_=[0,0],this.imageWidth_=0,this.text_="",this.textOffsetX_=0,this.textOffsetY_=0,this.textRotateWithView_=!1,this.textRotation_=0,this.textScale_=[0,0],this.textFillState_=null,this.textStrokeState_=null,this.textState_=null,this.pixelCoordinates_=[],this.tmpLocalTransform_=(0,s.Ue)()}drawImages_(t,e,i,n){if(!this.image_)return;const r=(0,u.vT)(t,e,i,n,this.transform_,this.pixelCoordinates_),o=this.context_,a=this.tmpLocalTransform_,l=o.globalAlpha;1!=this.imageOpacity_&&(o.globalAlpha=l*this.imageOpacity_);let h=this.imageRotation_;0===this.transformRotation_&&(h-=this.viewRotation_),this.imageRotateWithView_&&(h+=this.viewRotation_);for(let t=0,e=r.length;t<e;t+=2){const e=r[t]-this.imageAnchorX_,i=r[t+1]-this.imageAnchorY_;if(0!==h||1!=this.imageScale_[0]||1!=this.imageScale_[1]){const t=e+this.imageAnchorX_,n=i+this.imageAnchorY_;(0,s.qC)(a,t,n,1,1,h,-t,-n),o.setTransform.apply(o,a),o.translate(t,n),o.scale(this.imageScale_[0],this.imageScale_[1]),o.drawImage(this.image_,this.imageOriginX_,this.imageOriginY_,this.imageWidth_,this.imageHeight_,-this.imageAnchorX_,-this.imageAnchorY_,this.imageWidth_,this.imageHeight_),o.setTransform(1,0,0,1,0,0)}else o.drawImage(this.image_,this.imageOriginX_,this.imageOriginY_,this.imageWidth_,this.imageHeight_,e,i,this.imageWidth_,this.imageHeight_)}1!=this.imageOpacity_&&(o.globalAlpha=l)}drawText_(t,e,i,n){if(!this.textState_||""===this.text_)return;this.textFillState_&&this.setContextFillState_(this.textFillState_),this.textStrokeState_&&this.setContextStrokeState_(this.textStrokeState_),this.setContextTextState_(this.textState_);const r=(0,u.vT)(t,e,i,n,this.transform_,this.pixelCoordinates_),s=this.context_;let o=this.textRotation_;for(0===this.transformRotation_&&(o-=this.viewRotation_),this.textRotateWithView_&&(o+=this.viewRotation_);e<i;e+=n){const t=r[e]+this.textOffsetX_,i=r[e+1]+this.textOffsetY_;0!==o||1!=this.textScale_[0]||1!=this.textScale_[1]?(s.translate(t-this.textOffsetX_,i-this.textOffsetY_),s.rotate(o),s.translate(this.textOffsetX_,this.textOffsetY_),s.scale(this.textScale_[0],this.textScale_[1]),this.textStrokeState_&&s.strokeText(this.text_,0,0),this.textFillState_&&s.fillText(this.text_,0,0),s.setTransform(1,0,0,1,0,0)):(this.textStrokeState_&&s.strokeText(this.text_,t,i),this.textFillState_&&s.fillText(this.text_,t,i))}}moveToLineTo_(t,e,i,n,r){const s=this.context_,o=(0,u.vT)(t,e,i,n,this.transform_,this.pixelCoordinates_);s.moveTo(o[0],o[1]);let a=o.length;r&&(a-=2);for(let t=2;t<a;t+=2)s.lineTo(o[t],o[t+1]);return r&&s.closePath(),i}drawRings_(t,e,i,n){for(let r=0,s=i.length;r<s;++r)e=this.moveToLineTo_(t,e,i[r],n,!0);return e}drawCircle(t){if(this.squaredTolerance_&&(t=t.simplifyTransformed(this.squaredTolerance_,this.userTransform_)),(0,l.intersects)(this.extent_,t.getExtent())){if(this.fillState_||this.strokeState_){this.fillState_&&this.setContextFillState_(this.fillState_),this.strokeState_&&this.setContextStrokeState_(this.strokeState_);const e=(0,c.Kr)(t,this.transform_,this.pixelCoordinates_),i=e[2]-e[0],n=e[3]-e[1],r=Math.sqrt(i*i+n*n),s=this.context_;s.beginPath(),s.arc(e[0],e[1],r,0,2*Math.PI),this.fillState_&&s.fill(),this.strokeState_&&s.stroke()}""!==this.text_&&this.drawText_(t.getCenter(),0,2,2)}}setStyle(t){this.setFillStrokeStyle(t.getFill(),t.getStroke()),this.setImageStyle(t.getImage()),this.setTextStyle(t.getText())}setTransform(t){this.transform_=t}drawGeometry(t){switch(t.getType()){case"Point":this.drawPoint(t);break;case"LineString":this.drawLineString(t);break;case"Polygon":this.drawPolygon(t);break;case"MultiPoint":this.drawMultiPoint(t);break;case"MultiLineString":this.drawMultiLineString(t);break;case"MultiPolygon":this.drawMultiPolygon(t);break;case"GeometryCollection":this.drawGeometryCollection(t);break;case"Circle":this.drawCircle(t)}}drawFeature(t,e){const i=e.getGeometryFunction()(t);i&&(this.setStyle(e),this.drawGeometry(i))}drawGeometryCollection(t){const e=t.getGeometriesArray();for(let t=0,i=e.length;t<i;++t)this.drawGeometry(e[t])}drawPoint(t){this.squaredTolerance_&&(t=t.simplifyTransformed(this.squaredTolerance_,this.userTransform_));const e=t.getFlatCoordinates(),i=t.getStride();this.image_&&this.drawImages_(e,0,e.length,i),""!==this.text_&&this.drawText_(e,0,e.length,i)}drawMultiPoint(t){this.squaredTolerance_&&(t=t.simplifyTransformed(this.squaredTolerance_,this.userTransform_));const e=t.getFlatCoordinates(),i=t.getStride();this.image_&&this.drawImages_(e,0,e.length,i),""!==this.text_&&this.drawText_(e,0,e.length,i)}drawLineString(t){if(this.squaredTolerance_&&(t=t.simplifyTransformed(this.squaredTolerance_,this.userTransform_)),(0,l.intersects)(this.extent_,t.getExtent())){if(this.strokeState_){this.setContextStrokeState_(this.strokeState_);const e=this.context_,i=t.getFlatCoordinates();e.beginPath(),this.moveToLineTo_(i,0,i.length,t.getStride(),!1),e.stroke()}if(""!==this.text_){const e=t.getFlatMidpoint();this.drawText_(e,0,2,2)}}}drawMultiLineString(t){this.squaredTolerance_&&(t=t.simplifyTransformed(this.squaredTolerance_,this.userTransform_));const e=t.getExtent();if((0,l.intersects)(this.extent_,e)){if(this.strokeState_){this.setContextStrokeState_(this.strokeState_);const e=this.context_,i=t.getFlatCoordinates();let n=0;const r=t.getEnds(),s=t.getStride();e.beginPath();for(let t=0,e=r.length;t<e;++t)n=this.moveToLineTo_(i,n,r[t],s,!1);e.stroke()}if(""!==this.text_){const e=t.getFlatMidpoints();this.drawText_(e,0,e.length,2)}}}drawPolygon(t){if(this.squaredTolerance_&&(t=t.simplifyTransformed(this.squaredTolerance_,this.userTransform_)),(0,l.intersects)(this.extent_,t.getExtent())){if(this.strokeState_||this.fillState_){this.fillState_&&this.setContextFillState_(this.fillState_),this.strokeState_&&this.setContextStrokeState_(this.strokeState_);const 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_){const e=t.getFlatInteriorPoint();this.drawText_(e,0,2,2)}}}drawMultiPolygon(t){if(this.squaredTolerance_&&(t=t.simplifyTransformed(this.squaredTolerance_,this.userTransform_)),(0,l.intersects)(this.extent_,t.getExtent())){if(this.strokeState_||this.fillState_){this.fillState_&&this.setContextFillState_(this.fillState_),this.strokeState_&&this.setContextStrokeState_(this.strokeState_);const e=this.context_,i=t.getOrientedFlatCoordinates();let n=0;const r=t.getEndss(),s=t.getStride();e.beginPath();for(let t=0,e=r.length;t<e;++t){const e=r[t];n=this.drawRings_(i,n,e,s)}this.fillState_&&e.fill(),this.strokeState_&&e.stroke()}if(""!==this.text_){const e=t.getFlatInteriorPoints();this.drawText_(e,0,e.length,2)}}}setContextFillState_(t){const e=this.context_,i=this.contextFillState_;i?i.fillStyle!=t.fillStyle&&(i.fillStyle=t.fillStyle,e.fillStyle=t.fillStyle):(e.fillStyle=t.fillStyle,this.contextFillState_={fillStyle:t.fillStyle})}setContextStrokeState_(t){const e=this.context_,i=this.contextStrokeState_;i?(i.lineCap!=t.lineCap&&(i.lineCap=t.lineCap,e.lineCap=t.lineCap),(0,a.fS)(i.lineDash,t.lineDash)||e.setLineDash(i.lineDash=t.lineDash),i.lineDashOffset!=t.lineDashOffset&&(i.lineDashOffset=t.lineDashOffset,e.lineDashOffset=t.lineDashOffset),i.lineJoin!=t.lineJoin&&(i.lineJoin=t.lineJoin,e.lineJoin=t.lineJoin),i.lineWidth!=t.lineWidth&&(i.lineWidth=t.lineWidth,e.lineWidth=t.lineWidth),i.miterLimit!=t.miterLimit&&(i.miterLimit=t.miterLimit,e.miterLimit=t.miterLimit),i.strokeStyle!=t.strokeStyle&&(i.strokeStyle=t.strokeStyle,e.strokeStyle=t.strokeStyle)):(e.lineCap=t.lineCap,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})}setContextTextState_(t){const e=this.context_,i=this.contextTextState_,n=t.textAlign?t.textAlign:o.PH;i?(i.font!=t.font&&(i.font=t.font,e.font=t.font),i.textAlign!=n&&(i.textAlign=n,e.textAlign=n),i.textBaseline!=t.textBaseline&&(i.textBaseline=t.textBaseline,e.textBaseline=t.textBaseline)):(e.font=t.font,e.textAlign=n,e.textBaseline=t.textBaseline,this.contextTextState_={font:t.font,textAlign:n,textBaseline:t.textBaseline})}setFillStrokeStyle(t,e){if(t){const e=t.getColor();this.fillState_={fillStyle:(0,r.y)(e||o.bL)}}else this.fillState_=null;if(e){const t=e.getColor(),i=e.getLineCap(),n=e.getLineDash(),s=e.getLineDashOffset(),a=e.getLineJoin(),l=e.getWidth(),h=e.getMiterLimit(),u=n||o.X9;this.strokeState_={lineCap:void 0!==i?i:o.mb,lineDash:1===this.pixelRatio_?u:u.map((t=>t*this.pixelRatio_)),lineDashOffset:(s||o.He)*this.pixelRatio_,lineJoin:void 0!==a?a:o.rc,lineWidth:(void 0!==l?l:o.yC)*this.pixelRatio_,miterLimit:void 0!==h?h:o.V4,strokeStyle:(0,r.y)(t||o.Tx)}}else this.strokeState_=null}setImageStyle(t){let e;if(!t||!(e=t.getSize()))return void(this.image_=null);const i=t.getPixelRatio(this.pixelRatio_),n=t.getAnchor(),r=t.getOrigin();this.image_=t.getImage(this.pixelRatio_),this.imageAnchorX_=n[0]*i,this.imageAnchorY_=n[1]*i,this.imageHeight_=e[1]*i,this.imageOpacity_=t.getOpacity(),this.imageOriginX_=r[0],this.imageOriginY_=r[1],this.imageRotateWithView_=t.getRotateWithView(),this.imageRotation_=t.getRotation();const s=t.getScaleArray();this.imageScale_=[s[0]*this.pixelRatio_/i,s[1]*this.pixelRatio_/i],this.imageWidth_=e[0]*i}setTextStyle(t){if(t){const e=t.getFill();if(e){const t=e.getColor();this.textFillState_={fillStyle:(0,r.y)(t||o.bL)}}else this.textFillState_=null;const i=t.getStroke();if(i){const t=i.getColor(),e=i.getLineCap(),n=i.getLineDash(),s=i.getLineDashOffset(),a=i.getLineJoin(),l=i.getWidth(),h=i.getMiterLimit();this.textStrokeState_={lineCap:void 0!==e?e:o.mb,lineDash:n||o.X9,lineDashOffset:s||o.He,lineJoin:void 0!==a?a:o.rc,lineWidth:void 0!==l?l:o.yC,miterLimit:void 0!==h?h:o.V4,strokeStyle:(0,r.y)(t||o.Tx)}}else this.textStrokeState_=null;const n=t.getFont(),s=t.getOffsetX(),a=t.getOffsetY(),l=t.getRotateWithView(),h=t.getRotation(),u=t.getScaleArray(),c=t.getText(),d=t.getTextAlign(),g=t.getTextBaseline();this.textState_={font:void 0!==n?n:o.Df,textAlign:void 0!==d?d:o.PH,textBaseline:void 0!==g?g:o.ru},this.text_=void 0!==c?Array.isArray(c)?c.reduce(((t,e,i)=>t+(i%2?" ":e)),""):c:"",this.textOffsetX_=void 0!==s?this.pixelRatio_*s:0,this.textOffsetY_=void 0!==a?this.pixelRatio_*a:0,this.textRotateWithView_=void 0!==l&&l,this.textRotation_=void 0!==h?h:0,this.textScale_=[this.pixelRatio_*u[0],this.pixelRatio_*u[1]]}else this.text_=""}}const g=d},5707:(t,e,i)=>{"use strict";i.d(e,{$O:()=>o,Yc:()=>s,ZP:()=>l,gO:()=>r,s3:()=>a});const n={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},r=[n.FILL],s=[n.STROKE],o=[n.BEGIN_PATH],a=[n.CLOSE_PATH],l=n},5014:(t,e,i)=>{"use strict";i.d(e,{Z:()=>a});var n=i(9557),r=i(5707),s=i(147);class o extends n.Z{constructor(t,e,i,n){super(t,e,i,n)}drawFlatCoordinates_(t,e,i,n){const s=this.coordinates.length,o=this.appendFlatLineCoordinates(t,e,i,n,!1,!1),a=[r.ZP.MOVE_TO_LINE_TO,s,o];return this.instructions.push(a),this.hitDetectionInstructions.push(a),i}drawLineString(t,e){const i=this.state,n=i.strokeStyle,o=i.lineWidth;if(void 0===n||void 0===o)return;this.updateStrokeStyle(i,this.applyStroke),this.beginGeometry(t,e),this.hitDetectionInstructions.push([r.ZP.SET_STROKE_STYLE,i.strokeStyle,i.lineWidth,i.lineCap,i.lineJoin,i.miterLimit,s.X9,s.He],r.$O);const a=t.getFlatCoordinates(),l=t.getStride();this.drawFlatCoordinates_(a,0,a.length,l),this.hitDetectionInstructions.push(r.Yc),this.endGeometry(e)}drawMultiLineString(t,e){const i=this.state,n=i.strokeStyle,o=i.lineWidth;if(void 0===n||void 0===o)return;this.updateStrokeStyle(i,this.applyStroke),this.beginGeometry(t,e),this.hitDetectionInstructions.push([r.ZP.SET_STROKE_STYLE,i.strokeStyle,i.lineWidth,i.lineCap,i.lineJoin,i.miterLimit,s.X9,s.He],r.$O);const a=t.getEnds(),l=t.getFlatCoordinates(),h=t.getStride();let u=0;for(let t=0,e=a.length;t<e;++t)u=this.drawFlatCoordinates_(l,u,a[t],h);this.hitDetectionInstructions.push(r.Yc),this.endGeometry(e)}finish(){const t=this.state;return null!=t.lastStroke&&t.lastStroke!=this.coordinates.length&&this.instructions.push(r.Yc),this.reverseHitDetectionInstructions(),this.state=null,super.finish()}applyStroke(t){null!=t.lastStroke&&t.lastStroke!=this.coordinates.length&&(this.instructions.push(r.Yc),t.lastStroke=this.coordinates.length),t.lastStroke=0,super.applyStroke(t),this.instructions.push(r.$O)}}const a=o},9353:(t,e,i)=>{"use strict";i.d(e,{Z:()=>l});var n=i(9557),r=i(5707),s=i(147),o=i(226);class a extends n.Z{constructor(t,e,i,n){super(t,e,i,n)}drawFlatCoordinatess_(t,e,i,n){const s=this.state,o=void 0!==s.fillStyle,a=void 0!==s.strokeStyle,l=i.length;this.instructions.push(r.$O),this.hitDetectionInstructions.push(r.$O);for(let s=0;s<l;++s){const o=i[s],l=this.coordinates.length,h=this.appendFlatLineCoordinates(t,e,o,n,!0,!a),u=[r.ZP.MOVE_TO_LINE_TO,l,h];this.instructions.push(u),this.hitDetectionInstructions.push(u),a&&(this.instructions.push(r.s3),this.hitDetectionInstructions.push(r.s3)),e=o}return o&&(this.instructions.push(r.gO),this.hitDetectionInstructions.push(r.gO)),a&&(this.instructions.push(r.Yc),this.hitDetectionInstructions.push(r.Yc)),e}drawCircle(t,e){const i=this.state,n=i.fillStyle,o=i.strokeStyle;if(void 0===n&&void 0===o)return;this.setFillStrokeStyles_(),this.beginGeometry(t,e),void 0!==i.fillStyle&&this.hitDetectionInstructions.push([r.ZP.SET_FILL_STYLE,s.bL]),void 0!==i.strokeStyle&&this.hitDetectionInstructions.push([r.ZP.SET_STROKE_STYLE,i.strokeStyle,i.lineWidth,i.lineCap,i.lineJoin,i.miterLimit,s.X9,s.He]);const a=t.getFlatCoordinates(),l=t.getStride(),h=this.coordinates.length;this.appendFlatLineCoordinates(a,0,a.length,l,!1,!1);const u=[r.ZP.CIRCLE,h];this.instructions.push(r.$O,u),this.hitDetectionInstructions.push(r.$O,u),void 0!==i.fillStyle&&(this.instructions.push(r.gO),this.hitDetectionInstructions.push(r.gO)),void 0!==i.strokeStyle&&(this.instructions.push(r.Yc),this.hitDetectionInstructions.push(r.Yc)),this.endGeometry(e)}drawPolygon(t,e){const i=this.state,n=i.fillStyle,o=i.strokeStyle;if(void 0===n&&void 0===o)return;this.setFillStrokeStyles_(),this.beginGeometry(t,e),void 0!==i.fillStyle&&this.hitDetectionInstructions.push([r.ZP.SET_FILL_STYLE,s.bL]),void 0!==i.strokeStyle&&this.hitDetectionInstructions.push([r.ZP.SET_STROKE_STYLE,i.strokeStyle,i.lineWidth,i.lineCap,i.lineJoin,i.miterLimit,s.X9,s.He]);const a=t.getEnds(),l=t.getOrientedFlatCoordinates(),h=t.getStride();this.drawFlatCoordinatess_(l,0,a,h),this.endGeometry(e)}drawMultiPolygon(t,e){const i=this.state,n=i.fillStyle,o=i.strokeStyle;if(void 0===n&&void 0===o)return;this.setFillStrokeStyles_(),this.beginGeometry(t,e),void 0!==i.fillStyle&&this.hitDetectionInstructions.push([r.ZP.SET_FILL_STYLE,s.bL]),void 0!==i.strokeStyle&&this.hitDetectionInstructions.push([r.ZP.SET_STROKE_STYLE,i.strokeStyle,i.lineWidth,i.lineCap,i.lineJoin,i.miterLimit,s.X9,s.He]);const a=t.getEndss(),l=t.getOrientedFlatCoordinates(),h=t.getStride();let u=0;for(let t=0,e=a.length;t<e;++t)u=this.drawFlatCoordinatess_(l,u,a[t],h);this.endGeometry(e)}finish(){this.reverseHitDetectionInstructions(),this.state=null;const t=this.tolerance;if(0!==t){const e=this.coordinates;for(let i=0,n=e.length;i<n;++i)e[i]=(0,o.uZ)(e[i],t)}return super.finish()}setFillStrokeStyles_(){const t=this.state;void 0!==t.fillStyle&&this.updateFillStyle(t,this.createFill),void 0!==t.strokeStyle&&this.updateStrokeStyle(t,this.applyStroke)}}const l=a},7043:(t,e,i)=>{"use strict";i.d(e,{I:()=>c,Z:()=>g});var n=i(9557),r=i(5707),s=i(6620),o=i(147),a=i(4187),l=i(8641),h=i(1842),u=i(2365);const c={left:0,center:.5,right:1,top:0,middle:.5,hanging:.2,alphabetic:.8,ideographic:.8,bottom:1};class d extends n.Z{constructor(t,e,i,n){super(t,e,i,n),this.labels_=null,this.text_="",this.textOffsetX_=0,this.textOffsetY_=0,this.textRotateWithView_=void 0,this.textRotation_=0,this.textFillState_=null,this.fillStates={},this.fillStates[o.bL]={fillStyle:o.bL},this.textStrokeState_=null,this.strokeStates={},this.textState_={},this.textStates={},this.textKey_="",this.fillKey_="",this.strokeKey_="",this.declutterImageWithText_=void 0}finish(){const t=super.finish();return t.textStates=this.textStates,t.fillStates=this.fillStates,t.strokeStates=this.strokeStates,t}drawText(t,e){const i=this.textFillState_,n=this.textStrokeState_,s=this.textState_;if(""===this.text_||!s||!i&&!n)return;const a=this.coordinates;let c=a.length;const d=t.getType();let g=null,p=t.getStride();if("line"!==s.placement||"LineString"!=d&&"MultiLineString"!=d&&"Polygon"!=d&&"MultiPolygon"!=d){let i=s.overflow?null:[];switch(d){case"Point":case"MultiPoint":g=t.getFlatCoordinates();break;case"LineString":g=t.getFlatMidpoint();break;case"Circle":g=t.getCenter();break;case"MultiLineString":g=t.getFlatMidpoints(),p=2;break;case"Polygon":g=t.getFlatInteriorPoint(),s.overflow||i.push(g[2]/this.resolution),p=3;break;case"MultiPolygon":const e=t.getFlatInteriorPoints();g=[];for(let t=0,n=e.length;t<n;t+=3)s.overflow||i.push(e[t+2]/this.resolution),g.push(e[t],e[t+1]);if(0===g.length)return;p=2}const n=this.appendFlatPointCoordinates(g,p);if(n===c)return;if(i&&(n-c)/2!=g.length/p){let t=c/2;i=i.filter(((e,i)=>{const n=a[2*(t+i)]===g[i*p]&&a[2*(t+i)+1]===g[i*p+1];return n||--t,n}))}this.saveTextStates_(),(s.backgroundFill||s.backgroundStroke)&&(this.setFillStrokeStyle(s.backgroundFill,s.backgroundStroke),s.backgroundFill&&this.updateFillStyle(this.state,this.createFill),s.backgroundStroke&&(this.updateStrokeStyle(this.state,this.applyStroke),this.hitDetectionInstructions.push(this.createStroke(this.state)))),this.beginGeometry(t,e);let l=s.padding;if(l!=o.oB&&(s.scale[0]<0||s.scale[1]<0)){let t=s.padding[0],e=s.padding[1],i=s.padding[2],n=s.padding[3];s.scale[0]<0&&(e=-e,n=-n),s.scale[1]<0&&(t=-t,i=-i),l=[t,e,i,n]}const h=this.pixelRatio;this.instructions.push([r.ZP.DRAW_IMAGE,c,n,null,NaN,NaN,NaN,1,0,0,this.textRotateWithView_,this.textRotation_,[1,1],NaN,void 0,this.declutterImageWithText_,l==o.oB?o.oB:l.map((function(t){return t*h})),!!s.backgroundFill,!!s.backgroundStroke,this.text_,this.textKey_,this.strokeKey_,this.fillKey_,this.textOffsetX_,this.textOffsetY_,i]);const u=1/h,f=this.state.fillStyle;s.backgroundFill&&(this.state.fillStyle=o.bL,this.hitDetectionInstructions.push(this.createFill(this.state))),this.hitDetectionInstructions.push([r.ZP.DRAW_IMAGE,c,n,null,NaN,NaN,NaN,1,0,0,this.textRotateWithView_,this.textRotation_,[u,u],NaN,void 0,this.declutterImageWithText_,l,!!s.backgroundFill,!!s.backgroundStroke,this.text_,this.textKey_,this.strokeKey_,this.fillKey_?o.bL:this.fillKey_,this.textOffsetX_,this.textOffsetY_,i]),s.backgroundFill&&(this.state.fillStyle=f,this.hitDetectionInstructions.push(this.createFill(this.state))),this.endGeometry(e)}else{if(!(0,l.intersects)(this.getBufferedMaxExtent(),t.getExtent()))return;let i;if(g=t.getFlatCoordinates(),"LineString"==d)i=[g.length];else if("MultiLineString"==d)i=t.getEnds();else if("Polygon"==d)i=t.getEnds().slice(0,1);else if("MultiPolygon"==d){const e=t.getEndss();i=[];for(let t=0,n=e.length;t<n;++t)i.push(e[t][0])}this.beginGeometry(t,e);const n=s.repeat,r=n?void 0:s.textAlign;let o=0;for(let t=0,e=i.length;t<e;++t){let e;e=n?(0,h.D)(n*this.resolution,g,o,i[t],p):[g.slice(o,i[t])];for(let n=0,l=e.length;n<l;++n){const l=e[n];let h=0,d=l.length;if(null==r){const t=(0,u._)(s.maxAngle,l,0,l.length,2);h=t[0],d=t[1]}for(let t=h;t<d;t+=p)a.push(l[t],l[t+1]);const g=a.length;o=i[t],this.drawChars_(c,g),c=g}}this.endGeometry(e)}}saveTextStates_(){const t=this.textStrokeState_,e=this.textState_,i=this.textFillState_,n=this.strokeKey_;t&&(n in this.strokeStates||(this.strokeStates[n]={strokeStyle:t.strokeStyle,lineCap:t.lineCap,lineDashOffset:t.lineDashOffset,lineWidth:t.lineWidth,lineJoin:t.lineJoin,miterLimit:t.miterLimit,lineDash:t.lineDash}));const r=this.textKey_;r in this.textStates||(this.textStates[r]={font:e.font,textAlign:e.textAlign||o.PH,justify:e.justify,textBaseline:e.textBaseline||o.ru,scale:e.scale});const s=this.fillKey_;i&&(s in this.fillStates||(this.fillStates[s]={fillStyle:i.fillStyle}))}drawChars_(t,e){const i=this.textStrokeState_,n=this.textState_,s=this.strokeKey_,a=this.textKey_,l=this.fillKey_;this.saveTextStates_();const h=this.pixelRatio,u=c[n.textBaseline],d=this.textOffsetY_*h,g=this.text_,p=i?i.lineWidth*Math.abs(n.scale[0])/2:0;this.instructions.push([r.ZP.DRAW_CHARS,t,e,u,n.overflow,l,n.maxAngle,h,d,s,p*h,g,a,1]),this.hitDetectionInstructions.push([r.ZP.DRAW_CHARS,t,e,u,n.overflow,l?o.bL:l,n.maxAngle,1,d,s,p,g,a,1/h])}setTextStyle(t,e){let i,n,r;if(t){const e=t.getFill();e?(n=this.textFillState_,n||(n={},this.textFillState_=n),n.fillStyle=(0,s.y)(e.getColor()||o.bL)):(n=null,this.textFillState_=n);const l=t.getStroke();if(l){r=this.textStrokeState_,r||(r={},this.textStrokeState_=r);const t=l.getLineDash(),e=l.getLineDashOffset(),i=l.getWidth(),n=l.getMiterLimit();r.lineCap=l.getLineCap()||o.mb,r.lineDash=t?t.slice():o.X9,r.lineDashOffset=void 0===e?o.He:e,r.lineJoin=l.getLineJoin()||o.rc,r.lineWidth=void 0===i?o.yC:i,r.miterLimit=void 0===n?o.V4:n,r.strokeStyle=(0,s.y)(l.getColor()||o.Tx)}else r=null,this.textStrokeState_=r;i=this.textState_;const h=t.getFont()||o.Df;(0,o.Qx)(h);const u=t.getScaleArray();i.overflow=t.getOverflow(),i.font=h,i.maxAngle=t.getMaxAngle(),i.placement=t.getPlacement(),i.textAlign=t.getTextAlign(),i.repeat=t.getRepeat(),i.justify=t.getJustify(),i.textBaseline=t.getTextBaseline()||o.ru,i.backgroundFill=t.getBackgroundFill(),i.backgroundStroke=t.getBackgroundStroke(),i.padding=t.getPadding()||o.oB,i.scale=void 0===u?[1,1]:u;const c=t.getOffsetX(),d=t.getOffsetY(),g=t.getRotateWithView(),p=t.getRotation();this.text_=t.getText()||"",this.textOffsetX_=void 0===c?0:c,this.textOffsetY_=void 0===d?0:d,this.textRotateWithView_=void 0!==g&&g,this.textRotation_=void 0===p?0:p,this.strokeKey_=r?("string"==typeof r.strokeStyle?r.strokeStyle:(0,a.sq)(r.strokeStyle))+r.lineCap+r.lineDashOffset+"|"+r.lineWidth+r.lineJoin+r.miterLimit+"["+r.lineDash.join()+"]":"",this.textKey_=i.font+i.scale+(i.textAlign||"?")+(i.repeat||"?")+(i.justify||"?")+(i.textBaseline||"?"),this.fillKey_=n?"string"==typeof n.fillStyle?n.fillStyle:"|"+(0,a.sq)(n.fillStyle):""}else this.text_="";this.declutterImageWithText_=e}}const g=d},9272:(t,e,i)=>{"use strict";i.d(e,{TU:()=>u,UN:()=>h,ix:()=>c});var n=i(5069),r=i(2370),s=i(5537),o=i(3983),a=i(8326),l=i(8641);const h=.5;function u(t,e,i,o,u,c,d){const g=t[0]*h,p=t[1]*h,f=(0,a.E4)(g,p);f.imageSmoothingEnabled=!1;const m=f.canvas,_=new n.Z(f,h,u,null,d),y=i.length,v=Math.floor(16777215/y),x={};for(let t=1;t<=y;++t){const e=i[t-1],n=e.getStyleFunction()||o;if(!n)continue;let s=n(e,c);if(!s)continue;Array.isArray(s)||(s=[s]);const h=(t*v).toString(16).padStart(7,"#00000");for(let t=0,i=s.length;t<i;++t){const i=s[t],n=i.getGeometryFunction()(e);if(!n||!(0,l.intersects)(u,n.getExtent()))continue;const o=i.clone(),c=o.getFill();c&&c.setColor(h);const d=o.getStroke();d&&(d.setColor(h),d.setLineDash(null)),o.setText(void 0);const g=i.getImage();if(g){const t=g.getImageSize();if(!t)continue;const e=(0,a.E4)(t[0],t[1],void 0,{alpha:!1}),i=e.canvas;e.fillStyle=h,e.fillRect(0,0,i.width,i.height),o.setImage(new r.Z({img:i,imgSize:t,anchor:g.getAnchor(),anchorXUnits:"pixels",anchorYUnits:"pixels",offset:g.getOrigin(),opacity:1,size:g.getSize(),scale:g.getScale(),rotation:g.getRotation(),rotateWithView:g.getRotateWithView()}))}const p=o.getZIndex()||0;let f=x[p];f||(f={},x[p]=f,f.Polygon=[],f.Circle=[],f.LineString=[],f.Point=[]);const m=n.getType();if("GeometryCollection"===m){const t=n.getGeometriesArrayRecursive();for(let e=0,i=t.length;e<i;++e){const i=t[e];f[i.getType().replace("Multi","")].push(i,o)}}else f[m.replace("Multi","")].push(n,o)}}const E=Object.keys(x).map(Number).sort(s.j2);for(let t=0,i=E.length;t<i;++t){const i=x[E[t]];for(const t in i){const n=i[t];for(let t=0,i=n.length;t<i;t+=2){_.setStyle(n[t+1]);for(let i=0,r=e.length;i<r;++i)_.setTransform(e[i]),_.drawGeometry(n[t])}}}return f.getImageData(0,0,m.width,m.height)}function c(t,e,i){const n=[];if(i){const r=Math.floor(Math.round(t[0])*h),s=Math.floor(Math.round(t[1])*h),a=4*((0,o.uZ)(r,0,i.width-1)+(0,o.uZ)(s,0,i.height-1)*i.width),l=i.data[a],u=i.data[a+1],c=i.data[a+2]+256*(u+256*l),d=Math.floor(16777215/e.length);c&&c%d==0&&n.push(e[c/d-1])}return n}},9151:(t,e,i)=>{"use strict";i.d(e,{Z:()=>g});var n=i(3343),r=i(5990),s=i(7380),o=i(8771),a=i(245),l=i(147),h=i(1295),u=i(5818),c=i(8326);class d extends n.Z{constructor(t){super(t),this.fontChangeListenerKey_=(0,u.oL)(l.sG,r.Z.PROPERTYCHANGE,t.redrawText.bind(t)),this.element_=document.createElement("div");const e=this.element_.style;e.position="absolute",e.width="100%",e.height="100%",e.zIndex="0",this.element_.className=a.XV+" ol-layers";const i=t.getViewport();i.insertBefore(this.element_,i.firstChild||null),this.children_=[],this.renderedVisible_=!0,this.declutterLayers_=[]}dispatchRenderEvent(t,e){const i=this.getMap();if(i.hasListener(t)){const n=new s.Z(t,void 0,e);i.dispatchEvent(n)}}disposeInternal(){(0,u.bN)(this.fontChangeListenerKey_),this.element_.parentNode.removeChild(this.element_),super.disposeInternal()}renderFrame(t){if(!t)return void(this.renderedVisible_&&(this.element_.style.display="none",this.renderedVisible_=!1));this.calculateMatrices2D(t),this.dispatchRenderEvent(o.Z.PRECOMPOSE,t);const e=t.layerStatesArray.sort((function(t,e){return t.zIndex-e.zIndex})),i=t.viewState;this.children_.length=0;const n=this.declutterLayers_;n.length=0;let r=null;for(let s=0,o=e.length;s<o;++s){const o=e[s];t.layerIndex=s;const a=o.layer,l=a.getSourceState();if(!(0,h.j)(o,i)||"ready"!=l&&"undefined"!=l){a.unrender();continue}const u=a.render(t,r);u&&(u!==r&&(this.children_.push(u),r=u),"getDeclutter"in a&&n.push(a))}this.flushDeclutterItems(t),(0,c.hF)(this.element_,this.children_),this.dispatchRenderEvent(o.Z.POSTCOMPOSE,t),this.renderedVisible_||(this.element_.style.display="",this.renderedVisible_=!0),this.scheduleExpireIconCache(t)}flushDeclutterItems(t){const e=this.declutterLayers_;for(let i=e.length-1;i>=0;--i)e[i].renderDeclutter(t);e.length=0}}const g=d},115:(t,e,i)=>{"use strict";i.d(e,{Z:()=>l});var n=i(5487),r=i(553),s=i(2706),o=i(4187);class a extends s.Z{constructor(t){super(),this.ready=!0,this.boundHandleImageChange_=this.handleImageChange_.bind(this),this.layer_=t,this.declutterExecutorGroup=null}getFeatures(t){return(0,o.O3)()}getData(t){return null}prepareFrame(t){return(0,o.O3)()}renderFrame(t,e){return(0,o.O3)()}loadedTileCallback(t,e,i){t[e]||(t[e]={}),t[e][i.tileCoord.toString()]=i}createLoadedTileFinder(t,e,i){return(n,r)=>{const s=this.loadedTileCallback.bind(this,i,n);return t.forEachLoadedTile(e,n,r,s)}}forEachFeatureAtCoordinate(t,e,i,n,r){}getLayer(){return this.layer_}handleFontsChanged(){}handleImageChange_(t){const e=t.target;e.getState()!==r.Z.LOADED&&e.getState()!==r.Z.ERROR||this.renderIfReadyAndVisible()}loadImage(t){let e=t.getState();return e!=r.Z.LOADED&&e!=r.Z.ERROR&&t.addEventListener(n.Z.CHANGE,this.boundHandleImageChange_),e==r.Z.IDLE&&(t.load(),e=t.getState()),e==r.Z.LOADED}renderIfReadyAndVisible(){const t=this.getLayer();t&&t.getVisible()&&"ready"===t.getSourceState()&&t.changed()}disposeInternal(){delete this.layer_,super.disposeInternal()}}const l=a},3343:(t,e,i)=>{"use strict";i.d(e,{Z:()=>g});var n=i(5431),r=i(6885),s=i(4187),o=i(6101),a=i(8641),l=i(2710),h=i(1295),u=i(1900);class c extends n.Z{constructor(t){super(),this.map_=t}dispatchRenderEvent(t,e){(0,s.O3)()}calculateMatrices2D(t){const e=t.viewState,i=t.coordinateToPixelTransform,n=t.pixelToCoordinateTransform;(0,o.qC)(i,t.size[0]/2,t.size[1]/2,1/e.resolution,-1/e.resolution,-e.rotation,-e.center[0],-e.center[1]),(0,o.nb)(n,i)}forEachFeatureAtCoordinate(t,e,i,n,r,s,o,l){let c;const d=e.viewState;function g(t,e,i,n){return r.call(s,e,t?i:null,n)}const p=d.projection,f=(0,u.Cf)(t.slice(),p),m=[[0,0]];if(p.canWrapX()&&n){const t=p.getExtent(),e=(0,a.getWidth)(t);m.push([-e,0],[e,0])}const _=e.layerStatesArray,y=_.length,v=[],x=[];for(let n=0;n<m.length;n++)for(let r=y-1;r>=0;--r){const s=_[r],a=s.layer;if(a.hasRenderer()&&(0,h.j)(s,d)&&o.call(l,a)){const r=a.getRenderer(),o=a.getSource();if(r&&o){const a=o.getWrapX()?f:t,l=g.bind(null,s.managed);x[0]=a[0]+m[n][0],x[1]=a[1]+m[n][1],c=r.forEachFeatureAtCoordinate(x,e,i,l,v)}if(c)return c}}if(0===v.length)return;const E=1/v.length;return v.forEach(((t,e)=>t.distanceSq+=e*E)),v.sort(((t,e)=>t.distanceSq-e.distanceSq)),v.some((t=>c=t.callback(t.feature,t.layer,t.geometry))),c}hasFeatureAtCoordinate(t,e,i,n,s,o){return void 0!==this.forEachFeatureAtCoordinate(t,e,i,n,r.uX,this,s,o)}getMap(){return this.map_}renderFrame(t){(0,s.O3)()}flushDeclutterItems(t){}scheduleExpireIconCache(t){l.c.canExpireCache()&&t.postRenderFunctions.push(d)}}function d(t,e){l.c.expire()}const g=c},9186:(t,e,i)=>{"use strict";i.d(e,{Z:()=>u});var n=i(7581),r=i(553),s=i(7755),o=i(6101),a=i(8641),l=i(6121);class h extends n.Z{constructor(t){super(t),this.image_=null}getImage(){return this.image_?this.image_.getImage():null}prepareFrame(t){const e=t.layerStatesArray[t.layerIndex],i=t.pixelRatio,n=t.viewState,o=n.resolution,h=this.getLayer().getSource(),u=t.viewHints;let c=t.extent;if(void 0!==e.extent&&(c=(0,a.getIntersection)(c,(0,l.fromUserExtent)(e.extent,n.projection))),!u[s.Z.ANIMATING]&&!u[s.Z.INTERACTING]&&!(0,a.isEmpty)(c))if(h){const t=n.projection,e=h.getImage(c,o,i,t);e&&(this.loadImage(e)?this.image_=e:e.getState()===r.Z.EMPTY&&(this.image_=null))}else this.image_=null;return!!this.image_}getData(t){const e=this.frameState;if(!e)return null;const i=this.getLayer(),n=(0,o.nn)(e.pixelToCoordinateTransform,t.slice()),r=i.getExtent();if(r&&!(0,a.containsCoordinate)(r,n))return null;const s=this.image_.getExtent(),l=this.getImage(),h=(0,a.getWidth)(s),u=Math.floor(l.width*((n[0]-s[0])/h));if(u<0||u>=l.width)return null;const c=(0,a.getHeight)(s),d=Math.floor(l.height*((s[3]-n[1])/c));return d<0||d>=l.height?null:this.getImageData(l,u,d)}renderFrame(t,e){const i=this.image_,n=i.getExtent(),r=i.getResolution(),s=i.getPixelRatio(),h=t.layerStatesArray[t.layerIndex],u=t.pixelRatio,c=t.viewState,d=c.center,g=u*r/(c.resolution*s),p=t.extent,f=c.resolution,m=c.rotation,_=Math.round((0,a.getWidth)(p)/f*u),y=Math.round((0,a.getHeight)(p)/f*u);(0,o.qC)(this.pixelTransform,t.size[0]/2,t.size[1]/2,1/u,1/u,m,-_/2,-y/2),(0,o.nb)(this.inversePixelTransform,this.pixelTransform);const v=(0,o.BB)(this.pixelTransform);this.useContainer(e,v,this.getBackground(t));const x=this.context,E=x.canvas;E.width!=_||E.height!=y?(E.width=_,E.height=y):this.containerReused||x.clearRect(0,0,_,y);let b=!1,w=!0;if(h.extent){const e=(0,l.fromUserExtent)(h.extent,c.projection);w=(0,a.intersects)(e,t.extent),b=w&&!(0,a.containsExtent)(e,t.extent),b&&this.clipUnrotated(x,t,e)}const S=this.getImage(),T=(0,o.qC)(this.tempTransform,_/2,y/2,g,g,0,s*(n[0]-d[0])/r,s*(d[1]-n[3])/r);this.renderedResolution=r*u/s;const C=S.width*T[0],R=S.height*T[3];if(this.getLayer().getSource().getInterpolate()||(x.imageSmoothingEnabled=!1),this.preRender(x,t),w&&C>=.5&&R>=.5){const t=T[4],e=T[5],i=h.opacity;let n;1!==i&&(n=x.globalAlpha,x.globalAlpha=i),x.drawImage(S,0,0,+S.width,+S.height,t,e,C,R),1!==i&&(x.globalAlpha=n)}return this.postRender(x,t),b&&x.restore(),x.imageSmoothingEnabled=!0,v!==E.style.transform&&(E.style.transform=v),this.container}}const u=h},7581:(t,e,i)=>{"use strict";i.d(e,{Z:()=>p,r:()=>c});var n=i(115),r=i(7380),s=i(8771),o=i(6101),a=i(9706),l=i(8326),h=i(5537),u=i(8641);const c=[];let d=null;class g extends n.Z{constructor(t){super(t),this.container=null,this.renderedResolution,this.tempTransform=(0,o.Ue)(),this.pixelTransform=(0,o.Ue)(),this.inversePixelTransform=(0,o.Ue)(),this.context=null,this.containerReused=!1,this.pixelContext_=null,this.frameState=null}getImageData(t,e,i){let n;d||(d=(0,l.E4)(1,1,void 0,{willReadFrequently:!0})),d.clearRect(0,0,1,1);try{d.drawImage(t,e,i,1,1,0,0,1,1),n=d.getImageData(0,0,1,1).data}catch(t){return d=null,null}return n}getBackground(t){let e=this.getLayer().getBackground();return"function"==typeof e&&(e=e(t.viewState.resolution)),e||void 0}useContainer(t,e,i){const n=this.getLayer().getClassName();let r,s;if(t&&t.className===n&&(!i||t&&t.style.backgroundColor&&(0,h.fS)((0,a._2)(t.style.backgroundColor),(0,a._2)(i)))){const e=t.firstElementChild;e instanceof HTMLCanvasElement&&(s=e.getContext("2d"))}if(s&&s.canvas.style.transform===e?(this.container=t,this.context=s,this.containerReused=!0):this.containerReused?(this.container=null,this.context=null,this.containerReused=!1):this.container&&(this.container.style.backgroundColor=null),!this.container){r=document.createElement("div"),r.className=n;let t=r.style;t.position="absolute",t.width="100%",t.height="100%",s=(0,l.E4)();const e=s.canvas;r.appendChild(e),t=e.style,t.position="absolute",t.left="0",t.transformOrigin="top left",this.container=r,this.context=s}this.containerReused||!i||this.container.style.backgroundColor||(this.container.style.backgroundColor=i)}clipUnrotated(t,e,i){const n=(0,u.getTopLeft)(i),r=(0,u.getTopRight)(i),s=(0,u.getBottomRight)(i),a=(0,u.getBottomLeft)(i);(0,o.nn)(e.coordinateToPixelTransform,n),(0,o.nn)(e.coordinateToPixelTransform,r),(0,o.nn)(e.coordinateToPixelTransform,s),(0,o.nn)(e.coordinateToPixelTransform,a);const l=this.inversePixelTransform;(0,o.nn)(l,n),(0,o.nn)(l,r),(0,o.nn)(l,s),(0,o.nn)(l,a),t.save(),t.beginPath(),t.moveTo(Math.round(n[0]),Math.round(n[1])),t.lineTo(Math.round(r[0]),Math.round(r[1])),t.lineTo(Math.round(s[0]),Math.round(s[1])),t.lineTo(Math.round(a[0]),Math.round(a[1])),t.clip()}dispatchRenderEvent_(t,e,i){const n=this.getLayer();if(n.hasListener(t)){const s=new r.Z(t,this.inversePixelTransform,i,e);n.dispatchEvent(s)}}preRender(t,e){this.frameState=e,this.dispatchRenderEvent_(s.Z.PRERENDER,t,e)}postRender(t,e){this.dispatchRenderEvent_(s.Z.POSTRENDER,t,e)}getRenderTransform(t,e,i,n,r,s,a){const l=r/2,h=s/2,u=n/e,c=-u,d=-t[0]+a,g=-t[1];return(0,o.qC)(this.tempTransform,l,h,u,c,-i,d,g)}disposeInternal(){delete this.frameState,super.disposeInternal()}}const p=g},8845:(t,e,i)=>{"use strict";i.d(e,{Z:()=>f});var n=i(7581),r=i(825),s=i(9494),o=i(2519),a=i(7195),l=i(6101),h=i(5537),u=i(8641),c=i(6121),d=i(4187),g=i(4307);class p extends n.Z{constructor(t){super(t),this.extentChanged=!0,this.renderedExtent_=null,this.renderedPixelRatio,this.renderedProjection=null,this.renderedRevision,this.renderedTiles=[],this.newTiles_=!1,this.tmpExtent=(0,u.createEmpty)(),this.tmpTileRange_=new o.Z(0,0,0,0)}isDrawableTile(t){const e=this.getLayer(),i=t.getState(),n=e.getUseInterimTilesOnError();return i==a.Z.LOADED||i==a.Z.EMPTY||i==a.Z.ERROR&&!n}getTile(t,e,i,n){const r=n.pixelRatio,s=n.viewState.projection,o=this.getLayer();let l=o.getSource().getTile(t,e,i,r,s);return l.getState()==a.Z.ERROR&&o.getUseInterimTilesOnError()&&o.getPreload()>0&&(this.newTiles_=!0),this.isDrawableTile(l)||(l=l.getInterimTile()),l}getData(t){const e=this.frameState;if(!e)return null;const i=this.getLayer(),n=(0,l.nn)(e.pixelToCoordinateTransform,t.slice()),o=i.getExtent();if(o&&!(0,u.containsCoordinate)(o,n))return null;const h=e.pixelRatio,c=e.viewState.projection,d=e.viewState,p=i.getRenderSource(),f=p.getTileGridForProjection(d.projection),m=p.getTilePixelRatio(e.pixelRatio);for(let t=f.getZForResolution(d.resolution);t>=f.getMinZoom();--t){const e=f.getTileCoordForCoordAndZ(n,t),i=p.getTile(t,e[1],e[2],h,c);if(!(i instanceof r.Z||i instanceof s.Z)||i instanceof s.Z&&i.getState()===a.Z.EMPTY)return null;if(i.getState()!==a.Z.LOADED)continue;const o=f.getOrigin(t),l=(0,g.Pq)(f.getTileSize(t)),u=f.getResolution(t),_=Math.floor(m*((n[0]-o[0])/u-e[1]*l[0])),y=Math.floor(m*((o[1]-n[1])/u-e[2]*l[1])),v=Math.round(m*p.getGutterForProjection(d.projection));return this.getImageData(i.getImage(),_+v,y+v)}return null}loadedTileCallback(t,e,i){return!!this.isDrawableTile(i)&&super.loadedTileCallback(t,e,i)}prepareFrame(t){return!!this.getLayer().getSource()}renderFrame(t,e){const i=t.layerStatesArray[t.layerIndex],n=t.viewState,r=n.projection,s=n.resolution,o=n.center,g=n.rotation,p=t.pixelRatio,f=this.getLayer(),m=f.getSource(),_=m.getRevision(),y=m.getTileGridForProjection(r),v=y.getZForResolution(s,m.zDirection),x=y.getResolution(v);let E=t.extent;const b=t.viewState.resolution,w=m.getTilePixelRatio(p),S=Math.round((0,u.getWidth)(E)/b*p),T=Math.round((0,u.getHeight)(E)/b*p),C=i.extent&&(0,c.fromUserExtent)(i.extent,r);C&&(E=(0,u.getIntersection)(E,(0,c.fromUserExtent)(i.extent,r)));const R=x*S/2/w,P=x*T/2/w,I=[o[0]-R,o[1]-P,o[0]+R,o[1]+P],L=y.getTileRangeForExtentAndZ(E,v),M={};M[v]={};const F=this.createLoadedTileFinder(m,r,M),A=this.tmpExtent,Z=this.tmpTileRange_;this.newTiles_=!1;const D=g?(0,u.getRotatedViewport)(n.center,b,g,t.size):void 0;for(let e=L.minX;e<=L.maxX;++e)for(let n=L.minY;n<=L.maxY;++n){if(g&&!y.tileCoordIntersectsViewport([v,e,n],D))continue;const r=this.getTile(v,e,n,t);if(this.isDrawableTile(r)){const e=(0,d.sq)(this);if(r.getState()==a.Z.LOADED){M[v][r.tileCoord.toString()]=r;let t=r.inTransition(e);t&&1!==i.opacity&&(r.endTransition(e),t=!1),this.newTiles_||!t&&this.renderedTiles.includes(r)||(this.newTiles_=!0)}if(1===r.getAlpha(e,t.time))continue}const s=y.getTileCoordChildTileRange(r.tileCoord,Z,A);let o=!1;s&&(o=F(v+1,s)),o||y.forEachTileCoordParentTileRange(r.tileCoord,F,Z,A)}const O=x/s*p/w;(0,l.qC)(this.pixelTransform,t.size[0]/2,t.size[1]/2,1/p,1/p,g,-S/2,-T/2);const k=(0,l.BB)(this.pixelTransform);this.useContainer(e,k,this.getBackground(t));const G=this.context,z=G.canvas;(0,l.nb)(this.inversePixelTransform,this.pixelTransform),(0,l.qC)(this.tempTransform,S/2,T/2,O,O,0,-S/2,-T/2),z.width!=S||z.height!=T?(z.width=S,z.height=T):this.containerReused||G.clearRect(0,0,S,T),C&&this.clipUnrotated(G,t,C),m.getInterpolate()||(G.imageSmoothingEnabled=!1),this.preRender(G,t),this.renderedTiles.length=0;let N,j,U,B=Object.keys(M).map(Number);B.sort(h.j2),1!==i.opacity||this.containerReused&&!m.getOpaque(t.viewState.projection)?(N=[],j=[]):B=B.reverse();for(let e=B.length-1;e>=0;--e){const i=B[e],n=m.getTilePixelSize(i,p,r),s=y.getResolution(i)/x,o=n[0]*s*O,a=n[1]*s*O,h=y.getTileCoordForCoordAndZ((0,u.getTopLeft)(I),i),c=y.getTileCoordExtent(h),g=(0,l.nn)(this.tempTransform,[w*(c[0]-I[0])/x,w*(I[3]-c[3])/x]),f=w*m.getGutterForProjection(r),_=M[i];for(const e in _){const n=_[e],r=n.tileCoord,s=h[1]-r[1],l=Math.round(g[0]-(s-1)*o),c=h[2]-r[2],p=Math.round(g[1]-(c-1)*a),y=Math.round(g[0]-s*o),x=Math.round(g[1]-c*a),E=l-y,b=p-x,w=v===i,S=w&&1!==n.getAlpha((0,d.sq)(this),t.time);let T=!1;if(!S)if(N){U=[y,x,y+E,x,y+E,x+b,y,x+b];for(let t=0,e=N.length;t<e;++t)if(v!==i&&i<j[t]){const e=N[t];(0,u.intersects)([y,x,y+E,x+b],[e[0],e[3],e[4],e[7]])&&(T||(G.save(),T=!0),G.beginPath(),G.moveTo(U[0],U[1]),G.lineTo(U[2],U[3]),G.lineTo(U[4],U[5]),G.lineTo(U[6],U[7]),G.moveTo(e[6],e[7]),G.lineTo(e[4],e[5]),G.lineTo(e[2],e[3]),G.lineTo(e[0],e[1]),G.clip())}N.push(U),j.push(i)}else G.clearRect(y,x,E,b);this.drawTileImage(n,t,y,x,E,b,f,w),N&&!S?(T&&G.restore(),this.renderedTiles.unshift(n)):this.renderedTiles.push(n),this.updateUsedTiles(t.usedTiles,m,n)}}return this.renderedRevision=_,this.renderedResolution=x,this.extentChanged=!this.renderedExtent_||!(0,u.equals)(this.renderedExtent_,I),this.renderedExtent_=I,this.renderedPixelRatio=p,this.renderedProjection=r,this.manageTilePyramid(t,m,y,p,r,E,v,f.getPreload()),this.scheduleExpireCache(t,m),this.postRender(G,t),i.extent&&G.restore(),G.imageSmoothingEnabled=!0,k!==z.style.transform&&(z.style.transform=k),this.container}drawTileImage(t,e,i,n,r,s,o,a){const l=this.getTileImage(t);if(!l)return;const h=(0,d.sq)(this),u=e.layerStatesArray[e.layerIndex],c=u.opacity*(a?t.getAlpha(h,e.time):1),g=c!==this.context.globalAlpha;g&&(this.context.save(),this.context.globalAlpha=c),this.context.drawImage(l,o,o,l.width-2*o,l.height-2*o,i,n,r,s),g&&this.context.restore(),c!==u.opacity?e.animate=!0:a&&t.endTransition(h)}getImage(){const t=this.context;return t?t.canvas:null}getTileImage(t){return t.getImage()}scheduleExpireCache(t,e){if(e.canExpireCache()){const i=function(t,e,i){const n=(0,d.sq)(t);n in i.usedTiles&&t.expireCache(i.viewState.projection,i.usedTiles[n])}.bind(null,e);t.postRenderFunctions.push(i)}}updateUsedTiles(t,e,i){const n=(0,d.sq)(e);n in t||(t[n]={}),t[n][i.getKey()]=!0}manageTilePyramid(t,e,i,n,r,s,o,l,h){const c=(0,d.sq)(e);c in t.wantedTiles||(t.wantedTiles[c]={});const g=t.wantedTiles[c],p=t.tileQueue,f=i.getMinZoom(),m=t.viewState.rotation,_=m?(0,u.getRotatedViewport)(t.viewState.center,t.viewState.resolution,m,t.size):void 0;let y,v,x,E,b,w,S=0;for(w=f;w<=o;++w)for(v=i.getTileRangeForExtentAndZ(s,w,v),x=i.getResolution(w),E=v.minX;E<=v.maxX;++E)for(b=v.minY;b<=v.maxY;++b)m&&!i.tileCoordIntersectsViewport([w,E,b],_)||(o-w<=l?(++S,y=e.getTile(w,E,b,n,r),y.getState()==a.Z.IDLE&&(g[y.getKey()]=!0,p.isKeyQueued(y.getKey())||p.enqueue([y,c,i.getTileCoordCenter(y.tileCoord),x])),void 0!==h&&h(y)):e.useTile(w,E,b,r));e.updateCacheSize(S,r)}}const f=p},5682:(t,e,i)=>{"use strict";i.d(e,{Z:()=>y});var n=i(1328),r=i(7581),s=i(2669),o=i(8771),a=i(7755),l=i(9272),h=i(6101),u=i(8641),c=i(8326),d=i(6234),g=i(5537),p=i(6121),f=i(4187),m=i(1900);class _ extends r.Z{constructor(t){super(t),this.boundHandleStyleImageChange_=this.handleStyleImageChange_.bind(this),this.animatingOrInteracting_,this.hitDetectionImageData_=null,this.renderedFeatures_=null,this.renderedRevision_=-1,this.renderedResolution_=NaN,this.renderedExtent_=(0,u.createEmpty)(),this.wrappedRenderedExtent_=(0,u.createEmpty)(),this.renderedRotation_,this.renderedCenter_=null,this.renderedProjection_=null,this.renderedRenderOrder_=null,this.replayGroup_=null,this.replayGroupChanged=!0,this.declutterExecutorGroup=null,this.clipping=!0,this.compositionContext_=null,this.opacity_=1}renderWorlds(t,e,i){const n=e.extent,r=e.viewState,s=r.center,o=r.resolution,l=r.projection,h=r.rotation,c=l.getExtent(),d=this.getLayer().getSource(),g=e.pixelRatio,p=e.viewHints,f=!(p[a.Z.ANIMATING]||p[a.Z.INTERACTING]),m=this.compositionContext_,_=Math.round(e.size[0]*g),y=Math.round(e.size[1]*g),v=d.getWrapX()&&l.canWrapX(),x=v?(0,u.getWidth)(c):null,E=v?Math.ceil((n[2]-c[2])/x)+1:1;let b=v?Math.floor((n[0]-c[0])/x):0;do{const e=this.getRenderTransform(s,o,h,g,_,y,b*x);t.execute(m,1,e,h,f,void 0,i)}while(++b<E)}setupCompositionContext_(){if(1!==this.opacity_){const t=(0,c.E4)(this.context.canvas.width,this.context.canvas.height,r.r);this.compositionContext_=t}else this.compositionContext_=this.context}releaseCompositionContext_(){if(1!==this.opacity_){const t=this.context.globalAlpha;this.context.globalAlpha=this.opacity_,this.context.drawImage(this.compositionContext_.canvas,0,0),this.context.globalAlpha=t,(0,c.jy)(this.compositionContext_),r.r.push(this.compositionContext_.canvas),this.compositionContext_=null}}renderDeclutter(t){this.declutterExecutorGroup&&(this.setupCompositionContext_(),this.renderWorlds(this.declutterExecutorGroup,t,t.declutterTree),this.releaseCompositionContext_())}renderFrame(t,e){const i=t.pixelRatio,n=t.layerStatesArray[t.layerIndex];(0,h.n3)(this.pixelTransform,1/i,1/i),(0,h.nb)(this.inversePixelTransform,this.pixelTransform);const r=(0,h.BB)(this.pixelTransform);this.useContainer(e,r,this.getBackground(t));const s=this.context,a=s.canvas,l=this.replayGroup_,c=this.declutterExecutorGroup;let d=l&&!l.isEmpty()||c&&!c.isEmpty();if(!d&&!this.getLayer().hasListener(o.Z.PRERENDER)&&!this.getLayer().hasListener(o.Z.POSTRENDER))return null;const g=Math.round(t.size[0]*i),f=Math.round(t.size[1]*i);a.width!=g||a.height!=f?(a.width=g,a.height=f,a.style.transform!==r&&(a.style.transform=r)):this.containerReused||s.clearRect(0,0,g,f),this.preRender(s,t);const m=t.viewState,_=m.projection;this.opacity_=n.opacity,this.setupCompositionContext_();let y=!1;if(d&&n.extent&&this.clipping){const e=(0,p.fromUserExtent)(n.extent,_);d=(0,u.intersects)(e,t.extent),y=d&&!(0,u.containsExtent)(e,t.extent),y&&this.clipUnrotated(this.compositionContext_,t,e)}return d&&this.renderWorlds(l,t),y&&this.compositionContext_.restore(),this.releaseCompositionContext_(),this.postRender(s,t),this.renderedRotation_!==m.rotation&&(this.renderedRotation_=m.rotation,this.hitDetectionImageData_=null),this.container}getFeatures(t){return new Promise((e=>{if(!this.hitDetectionImageData_&&!this.animatingOrInteracting_){const t=[this.context.canvas.width,this.context.canvas.height];(0,h.nn)(this.pixelTransform,t);const e=this.renderedCenter_,i=this.renderedResolution_,n=this.renderedRotation_,r=this.renderedProjection_,s=this.wrappedRenderedExtent_,o=this.getLayer(),a=[],c=t[0]*l.UN,d=t[1]*l.UN;a.push(this.getRenderTransform(e,i,n,l.UN,c,d,0).slice());const g=o.getSource(),p=r.getExtent();if(g.getWrapX()&&r.canWrapX()&&!(0,u.containsExtent)(p,s)){let t=s[0];const r=(0,u.getWidth)(p);let o,h=0;for(;t<p[0];)--h,o=r*h,a.push(this.getRenderTransform(e,i,n,l.UN,c,d,o).slice()),t+=r;for(h=0,t=s[2];t>p[2];)++h,o=r*h,a.push(this.getRenderTransform(e,i,n,l.UN,c,d,o).slice()),t-=r}this.hitDetectionImageData_=(0,l.TU)(t,a,this.renderedFeatures_,o.getStyleFunction(),s,i,n)}e((0,l.ix)(t,this.renderedFeatures_,this.hitDetectionImageData_))}))}forEachFeatureAtCoordinate(t,e,i,n,r){if(!this.replayGroup_)return;const s=e.viewState.resolution,o=e.viewState.rotation,a=this.getLayer(),l={},h=function(t,e,i){const s=(0,f.sq)(t),o=l[s];if(o){if(!0!==o&&i<o.distanceSq){if(0===i)return l[s]=!0,r.splice(r.lastIndexOf(o),1),n(t,a,e);o.geometry=e,o.distanceSq=i}}else{if(0===i)return l[s]=!0,n(t,a,e);r.push(l[s]={feature:t,layer:a,geometry:e,distanceSq:i,callback:n})}};let u;const c=[this.replayGroup_];return this.declutterExecutorGroup&&c.push(this.declutterExecutorGroup),c.some((n=>u=n.forEachFeatureAtCoordinate(t,s,o,i,h,n===this.declutterExecutorGroup&&e.declutterTree?e.declutterTree.all().map((t=>t.value)):null))),u}handleFontsChanged(){const t=this.getLayer();t.getVisible()&&this.replayGroup_&&t.changed()}handleStyleImageChange_(t){this.renderIfReadyAndVisible()}prepareFrame(t){const e=this.getLayer(),i=e.getSource();if(!i)return!1;const r=t.viewHints[a.Z.ANIMATING],o=t.viewHints[a.Z.INTERACTING],l=e.getUpdateWhileAnimating(),h=e.getUpdateWhileInteracting();if(this.ready&&!l&&r||!h&&o)return this.animatingOrInteracting_=!0,!0;this.animatingOrInteracting_=!1;const c=t.extent,f=t.viewState,_=f.projection,y=f.resolution,v=t.pixelRatio,x=e.getRevision(),E=e.getRenderBuffer();let b=e.getRenderOrder();void 0===b&&(b=d.eR);const w=f.center.slice(),S=(0,u.buffer)(c,E*y),T=S.slice(),C=[S.slice()],R=_.getExtent();if(i.getWrapX()&&_.canWrapX()&&!(0,u.containsExtent)(R,t.extent)){const t=(0,u.getWidth)(R),e=Math.max((0,u.getWidth)(S)/2,t);S[0]=R[0]-e,S[2]=R[2]+e,(0,m.Cf)(w,_);const i=(0,u.wrapX)(C[0],_);i[0]<R[0]&&i[2]<R[2]?C.push([i[0]+t,i[1],i[2]+t,i[3]]):i[0]>R[0]&&i[2]>R[2]&&C.push([i[0]-t,i[1],i[2]-t,i[3]])}if(this.ready&&this.renderedResolution_==y&&this.renderedRevision_==x&&this.renderedRenderOrder_==b&&(0,u.containsExtent)(this.wrappedRenderedExtent_,S))return(0,g.fS)(this.renderedExtent_,T)||(this.hitDetectionImageData_=null,this.renderedExtent_=T),this.renderedCenter_=w,this.replayGroupChanged=!1,!0;this.replayGroup_=null;const P=new n.Z((0,d.Qz)(y,v),S,y,v);let I;this.getLayer().getDeclutter()&&(I=new n.Z((0,d.Qz)(y,v),S,y,v));const L=(0,p.getUserProjection)();let M;if(L){for(let t=0,e=C.length;t<e;++t){const e=C[t],n=(0,p.toUserExtent)(e,_);i.loadFeatures(n,(0,p.toUserResolution)(y,_),L)}M=(0,p.getTransformFromProjections)(L,_)}else for(let t=0,e=C.length;t<e;++t)i.loadFeatures(C[t],y,_);const F=(0,d.se)(y,v);let A=!0;const Z=t=>{let i;const n=t.getStyleFunction()||e.getStyleFunction();if(n&&(i=n(t,y)),i){const e=this.renderFeature(t,F,i,P,M,I);A=A&&!e}},D=(0,p.toUserExtent)(S,_),O=i.getFeaturesInExtent(D);b&&O.sort(b);for(let t=0,e=O.length;t<e;++t)Z(O[t]);this.renderedFeatures_=O,this.ready=A;const k=P.finish(),G=new s.Z(S,y,v,i.getOverlaps(),k,e.getRenderBuffer());return I&&(this.declutterExecutorGroup=new s.Z(S,y,v,i.getOverlaps(),I.finish(),e.getRenderBuffer())),this.renderedResolution_=y,this.renderedRevision_=x,this.renderedRenderOrder_=b,this.renderedExtent_=T,this.wrappedRenderedExtent_=S,this.renderedCenter_=w,this.renderedProjection_=_,this.replayGroup_=G,this.hitDetectionImageData_=null,this.replayGroupChanged=!0,!0}renderFeature(t,e,i,n,r,s){if(!i)return!1;let o=!1;if(Array.isArray(i))for(let a=0,l=i.length;a<l;++a)o=(0,d.Pn)(n,t,i[a],e,this.boundHandleStyleImageChange_,r,s)||o;else o=(0,d.Pn)(n,t,i,e,this.boundHandleStyleImageChange_,r,s);return o}}const y=_},6234:(t,e,i)=>{"use strict";i.d(e,{Pn:()=>h,Qz:()=>l,eR:()=>o,se:()=>a});var n=i(553),r=i(4187);const s={Point:function(t,e,i,r,s){const o=i.getImage(),a=i.getText();let l;if(o){if(o.getImageState()!=n.Z.LOADED)return;let h=t;if(s){const n=o.getDeclutterMode();if("none"!==n)if(h=s,"obstacle"===n){const n=t.getBuilder(i.getZIndex(),"Image");n.setImageStyle(o,l),n.drawPoint(e,r)}else a&&a.getText()&&(l={})}const u=h.getBuilder(i.getZIndex(),"Image");u.setImageStyle(o,l),u.drawPoint(e,r)}if(a&&a.getText()){let n=t;s&&(n=s);const o=n.getBuilder(i.getZIndex(),"Text");o.setTextStyle(a,l),o.drawText(e,r)}},LineString:function(t,e,i,n,r){const s=i.getStroke();if(s){const r=t.getBuilder(i.getZIndex(),"LineString");r.setFillStrokeStyle(null,s),r.drawLineString(e,n)}const o=i.getText();if(o&&o.getText()){const s=(r||t).getBuilder(i.getZIndex(),"Text");s.setTextStyle(o),s.drawText(e,n)}},Polygon:function(t,e,i,n,r){const s=i.getFill(),o=i.getStroke();if(s||o){const r=t.getBuilder(i.getZIndex(),"Polygon");r.setFillStrokeStyle(s,o),r.drawPolygon(e,n)}const a=i.getText();if(a&&a.getText()){const s=(r||t).getBuilder(i.getZIndex(),"Text");s.setTextStyle(a),s.drawText(e,n)}},MultiPoint:function(t,e,i,r,s){const o=i.getImage(),a=i.getText();let l;if(o){if(o.getImageState()!=n.Z.LOADED)return;let h=t;if(s){const n=o.getDeclutterMode();if("none"!==n)if(h=s,"obstacle"===n){const n=t.getBuilder(i.getZIndex(),"Image");n.setImageStyle(o,l),n.drawMultiPoint(e,r)}else a&&a.getText()&&(l={})}const u=h.getBuilder(i.getZIndex(),"Image");u.setImageStyle(o,l),u.drawMultiPoint(e,r)}if(a&&a.getText()){let n=t;s&&(n=s);const o=n.getBuilder(i.getZIndex(),"Text");o.setTextStyle(a,l),o.drawText(e,r)}},MultiLineString:function(t,e,i,n,r){const s=i.getStroke();if(s){const r=t.getBuilder(i.getZIndex(),"LineString");r.setFillStrokeStyle(null,s),r.drawMultiLineString(e,n)}const o=i.getText();if(o&&o.getText()){const s=(r||t).getBuilder(i.getZIndex(),"Text");s.setTextStyle(o),s.drawText(e,n)}},MultiPolygon:function(t,e,i,n,r){const s=i.getFill(),o=i.getStroke();if(o||s){const r=t.getBuilder(i.getZIndex(),"Polygon");r.setFillStrokeStyle(s,o),r.drawMultiPolygon(e,n)}const a=i.getText();if(a&&a.getText()){const s=(r||t).getBuilder(i.getZIndex(),"Text");s.setTextStyle(a),s.drawText(e,n)}},GeometryCollection:function(t,e,i,n,r){const o=e.getGeometriesArray();let a,l;for(a=0,l=o.length;a<l;++a)(0,s[o[a].getType()])(t,o[a],i,n,r)},Circle:function(t,e,i,n,r){const s=i.getFill(),o=i.getStroke();if(s||o){const r=t.getBuilder(i.getZIndex(),"Circle");r.setFillStrokeStyle(s,o),r.drawCircle(e,n)}const a=i.getText();if(a&&a.getText()){const s=(r||t).getBuilder(i.getZIndex(),"Text");s.setTextStyle(a),s.drawText(e,n)}}};function o(t,e){return parseInt((0,r.sq)(t),10)-parseInt((0,r.sq)(e),10)}function a(t,e){const i=l(t,e);return i*i}function l(t,e){return.5*t/e}function h(t,e,i,r,o,a,l){let h=!1;const c=i.getImage();if(c){const t=c.getImageState();t==n.Z.LOADED||t==n.Z.ERROR?c.unlistenImageChange(o):(t==n.Z.IDLE&&c.load(),c.listenImageChange(o),h=!0)}return function(t,e,i,n,r,o){const a=i.getGeometryFunction()(e);if(!a)return;const l=a.simplifyTransformed(n,r);i.getRenderer()?u(t,l,i,e):(0,s[l.getType()])(t,l,i,e,o)}(t,e,i,r,a,l),h}function u(t,e,i,n){if("GeometryCollection"!=e.getType())t.getBuilder(i.getZIndex(),"Default").drawCustom(e,n,i.getRenderer(),i.getHitDetectionRenderer());else{const r=e.getGeometries();for(let e=0,s=r.length;e<s;++e)u(t,r[e],i,n)}}},7161:(t,e,i)=>{"use strict";i.d(e,{Co:()=>d,aA:()=>c,rX:()=>l,sY:()=>g});var n=i(8641),r=i(8326),s=i(6121),o=i(3983);let a;const l=[];function h(t,e,i,n,r){t.beginPath(),t.moveTo(0,0),t.lineTo(e,i),t.lineTo(n,r),t.closePath(),t.save(),t.clip(),t.fillRect(0,0,Math.max(e,n)+1,Math.max(i,r)),t.restore()}function u(t,e){return Math.abs(t[4*e]-210)>2||Math.abs(t[4*e+3]-191.25)>2}function c(t,e,i,r){const o=(0,s.transform)(i,e,t);let a=(0,s.getPointResolution)(e,r,i);const l=e.getMetersPerUnit();void 0!==l&&(a*=l);const h=t.getMetersPerUnit();void 0!==h&&(a/=h);const u=t.getExtent();if(!u||(0,n.containsCoordinate)(u,o)){const e=(0,s.getPointResolution)(t,a,o)/a;isFinite(e)&&e>0&&(a/=e)}return a}function d(t,e,i,r){const s=(0,n.getCenter)(i);let o=c(t,e,s,r);return(!isFinite(o)||o<=0)&&(0,n.forEachCorner)(i,(function(i){return o=c(t,e,i,r),isFinite(o)&&o>0})),o}function g(t,e,i,s,c,d,g,p,f,m,_,y){const v=(0,r.E4)(Math.round(i*t),Math.round(i*e),l);if(y||(v.imageSmoothingEnabled=!1),0===f.length)return v.canvas;function x(t){return Math.round(t*i)/i}v.scale(i,i),v.globalCompositeOperation="lighter";const E=(0,n.createEmpty)();f.forEach((function(t,e,i){(0,n.extend)(E,t.extent)}));const b=(0,n.getWidth)(E),w=(0,n.getHeight)(E),S=(0,r.E4)(Math.round(i*b/s),Math.round(i*w/s),l);y||(S.imageSmoothingEnabled=!1);const T=i/s;f.forEach((function(t,e,i){const r=t.extent[0]-E[0],s=-(t.extent[3]-E[3]),o=(0,n.getWidth)(t.extent),a=(0,n.getHeight)(t.extent);t.image.width>0&&t.image.height>0&&S.drawImage(t.image,m,m,t.image.width-2*m,t.image.height-2*m,r*T,s*T,o*T,a*T)}));const C=(0,n.getTopLeft)(g);return p.getTriangles().forEach((function(t,e,n){const c=t.source,g=t.target;let p=c[0][0],f=c[0][1],m=c[1][0],_=c[1][1],b=c[2][0],w=c[2][1];const T=x((g[0][0]-C[0])/d),R=x(-(g[0][1]-C[1])/d),P=x((g[1][0]-C[0])/d),I=x(-(g[1][1]-C[1])/d),L=x((g[2][0]-C[0])/d),M=x(-(g[2][1]-C[1])/d),F=p,A=f;p=0,f=0,m-=F,_-=A,b-=F,w-=A;const Z=[[m,_,0,0,P-T],[b,w,0,0,L-T],[0,0,m,_,I-R],[0,0,b,w,M-R]],D=(0,o.SV)(Z);if(D){if(v.save(),v.beginPath(),function(){if(void 0===a){const t=(0,r.E4)(6,6,l);t.globalCompositeOperation="lighter",t.fillStyle="rgba(210, 0, 0, 0.75)",h(t,4,5,4,0),h(t,4,5,0,5);const e=t.getImageData(0,0,3,3).data;a=u(e,0)||u(e,4)||u(e,8),(0,r.jy)(t),l.push(t.canvas)}return a}()||!y){v.moveTo(P,I);const t=4,e=T-P,i=R-I;for(let n=0;n<t;n++)v.lineTo(P+x((n+1)*e/t),I+x(n*i/(t-1))),n!=t-1&&v.lineTo(P+x((n+1)*e/t),I+x((n+1)*i/(t-1)));v.lineTo(L,M)}else v.moveTo(P,I),v.lineTo(T,R),v.lineTo(L,M);v.clip(),v.transform(D[0],D[2],D[1],D[3],T,R),v.translate(E[0]-F,E[3]-A),v.scale(s/i,-s/i),v.drawImage(S.canvas,0,0),v.restore()}})),(0,r.jy)(S),l.push(S.canvas),_&&(v.save(),v.globalCompositeOperation="source-over",v.strokeStyle="black",v.lineWidth=1,p.getTriangles().forEach((function(t,e,i){const n=t.target,r=(n[0][0]-C[0])/d,s=-(n[0][1]-C[1])/d,o=(n[1][0]-C[0])/d,a=-(n[1][1]-C[1])/d,l=(n[2][0]-C[0])/d,h=-(n[2][1]-C[1])/d;v.beginPath(),v.moveTo(o,a),v.lineTo(r,s),v.lineTo(l,h),v.closePath(),v.stroke()})),v.restore()),v.canvas}},3130:(t,e,i)=>{"use strict";i.d(e,{Z:()=>p});var n=i(4773),r=i(349),s=i(5487),o=i(7195),a=i(5476),l=i(7161),h=i(3983),u=i(8326),c=i(8641),d=i(5818);class g extends r.ZP{constructor(t){super({tileCoord:t.tileCoord,loader:()=>Promise.resolve(new Uint8Array(4)),interpolate:t.interpolate,transition:t.transition}),this.pixelRatio_=t.pixelRatio,this.gutter_=t.gutter,this.reprojData_=null,this.reprojError_=null,this.reprojSize_=void 0,this.sourceTileGrid_=t.sourceTileGrid,this.targetTileGrid_=t.targetTileGrid,this.wrappedTileCoord_=t.wrappedTileCoord||t.tileCoord,this.sourceTiles_=[],this.sourcesListenerKeys_=null,this.sourceZ_=0;const e=this.targetTileGrid_.getTileCoordExtent(this.wrappedTileCoord_),i=this.targetTileGrid_.getExtent();let r=this.sourceTileGrid_.getExtent();const s=i?(0,c.getIntersection)(e,i):e;if(0===(0,c.getArea)(s))return void(this.state=o.Z.EMPTY);const u=t.sourceProj,d=u.getExtent();d&&(r=r?(0,c.getIntersection)(r,d):d);const g=this.targetTileGrid_.getResolution(this.wrappedTileCoord_[0]),p=t.targetProj,f=(0,l.Co)(u,p,s,g);if(!isFinite(f)||f<=0)return void(this.state=o.Z.EMPTY);const m=void 0!==t.errorThreshold?t.errorThreshold:n.m;if(this.triangulation_=new a.Z(u,p,s,r,f*m,g),0===this.triangulation_.getTriangles().length)return void(this.state=o.Z.EMPTY);this.sourceZ_=this.sourceTileGrid_.getZForResolution(f);let _=this.triangulation_.calculateSourceExtent();if(r&&(u.canWrapX()?(_[1]=(0,h.uZ)(_[1],r[1],r[3]),_[3]=(0,h.uZ)(_[3],r[1],r[3])):_=(0,c.getIntersection)(_,r)),(0,c.getArea)(_)){const e=this.sourceTileGrid_.getTileRangeForExtentAndZ(_,this.sourceZ_),i=t.getTileFunction;for(let t=e.minX;t<=e.maxX;t++)for(let n=e.minY;n<=e.maxY;n++){const e=i(this.sourceZ_,t,n,this.pixelRatio_);e&&this.sourceTiles_.push(e)}0===this.sourceTiles_.length&&(this.state=o.Z.EMPTY)}else this.state=o.Z.EMPTY}getSize(){return this.reprojSize_}getData(){return this.reprojData_}getError(){return this.reprojError_}reproject_(){const t=[];if(this.sourceTiles_.forEach((e=>{if(!e||e.getState()!==o.Z.LOADED)return;const i=e.getSize(),n=this.gutter_;let s;s=(0,r.px)(e.getData())||(0,r.qo)((0,r.G0)(e.getData()));const a=[i[0]+2*n,i[1]+2*n],l=s instanceof Float32Array,h=a[0]*a[1],u=l?Float32Array:Uint8Array,c=new u(s.buffer),d=u.BYTES_PER_ELEMENT,g=d*c.length/h,p=c.byteLength/a[1],f=Math.floor(p/d/a[0]),m=h*f;let _=c;if(c.length!==m){_=new u(m);let t=0,e=0;const i=a[0]*f;for(let n=0;n<a[1];++n){for(let n=0;n<i;++n)_[t++]=c[e+n];e+=p/d}}t.push({extent:this.sourceTileGrid_.getTileCoordExtent(e.tileCoord),data:new Uint8Array(_.buffer),dataType:u,bytesPerPixel:g,pixelSize:a})})),this.sourceTiles_.length=0,0===t.length)this.state=o.Z.ERROR;else{const e=this.wrappedTileCoord_[0],i=this.targetTileGrid_.getTileSize(e),n="number"==typeof i?i:i[0],r="number"==typeof i?i:i[1],s=this.targetTileGrid_.getResolution(e),a=this.sourceTileGrid_.getResolution(this.sourceZ_),h=this.targetTileGrid_.getTileCoordExtent(this.wrappedTileCoord_);let c,d;const g=t[0].bytesPerPixel;for(let e=Math.ceil(g/3)-1;e>=0;--e){const i=[];for(let n=0,r=t.length;n<r;++n){const r=t[n],s=r.data,o=r.pixelSize,a=o[0],h=o[1],c=(0,u.E4)(a,h,l.rX),d=c.createImageData(a,h),p=d.data;let f=3*e;for(let t=0,e=p.length;t<e;t+=4)p[t]=s[f],p[t+1]=s[f+1],p[t+2]=s[f+2],p[t+3]=255,f+=g;c.putImageData(d,0,0),i.push({extent:r.extent,image:c.canvas})}const o=(0,l.sY)(n,r,this.pixelRatio_,a,this.sourceTileGrid_.getExtent(),s,h,this.triangulation_,i,this.gutter_,!1,!1);for(let t=0,e=i.length;t<e;++t){const e=i[t].image.getContext("2d");(0,u.jy)(e),l.rX.push(e.canvas)}const p=o.getContext("2d"),f=p.getImageData(0,0,o.width,o.height);(0,u.jy)(p),l.rX.push(o),c||(d=new Uint8Array(g*f.width*f.height),c=new t[0].dataType(d.buffer));const m=f.data;let _=3*e;for(let t=0,e=m.length;t<e;t+=4)255===m[t+3]?(d[_]=m[t],d[_+1]=m[t+1],d[_+2]=m[t+2]):(d[_]=0,d[_+1]=0,d[_+2]=0),_+=g}this.reprojData_=c,this.reprojSize_=[Math.round(n*this.pixelRatio_),Math.round(r*this.pixelRatio_)],this.state=o.Z.LOADED}this.changed()}load(){if(this.state!==o.Z.IDLE&&this.state!==o.Z.ERROR)return;this.state=o.Z.LOADING,this.changed();let t=0;this.sourcesListenerKeys_=[],this.sourceTiles_.forEach((e=>{const i=e.getState();if(i!==o.Z.IDLE&&i!==o.Z.LOADING)return;t++;const n=(0,d.oL)(e,s.Z.CHANGE,(function(){const i=e.getState();i!=o.Z.LOADED&&i!=o.Z.ERROR&&i!=o.Z.EMPTY||((0,d.bN)(n),t--,0===t&&(this.unlistenSources_(),this.reproject_()))}),this);this.sourcesListenerKeys_.push(n)})),0===t?setTimeout(this.reproject_.bind(this),0):this.sourceTiles_.forEach((function(t){t.getState()==o.Z.IDLE&&t.load()}))}unlistenSources_(){this.sourcesListenerKeys_.forEach(d.bN),this.sourcesListenerKeys_=null}}const p=g},9494:(t,e,i)=>{"use strict";i.d(e,{Z:()=>p});var n=i(4773),r=i(5487),s=i(4806),o=i(7195),a=i(5476),l=i(7161),h=i(3983),u=i(8641),c=i(5818),d=i(8326);class g extends s.Z{constructor(t,e,i,r,s,c,d,g,p,f,m,_){super(s,o.Z.IDLE,{interpolate:!!_}),this.renderEdges_=void 0!==m&&m,this.pixelRatio_=d,this.gutter_=g,this.canvas_=null,this.sourceTileGrid_=e,this.targetTileGrid_=r,this.wrappedTileCoord_=c||s,this.sourceTiles_=[],this.sourcesListenerKeys_=null,this.sourceZ_=0;const y=r.getTileCoordExtent(this.wrappedTileCoord_),v=this.targetTileGrid_.getExtent();let x=this.sourceTileGrid_.getExtent();const E=v?(0,u.getIntersection)(y,v):y;if(0===(0,u.getArea)(E))return void(this.state=o.Z.EMPTY);const b=t.getExtent();b&&(x=x?(0,u.getIntersection)(x,b):b);const w=r.getResolution(this.wrappedTileCoord_[0]),S=(0,l.Co)(t,i,E,w);if(!isFinite(S)||S<=0)return void(this.state=o.Z.EMPTY);const T=void 0!==f?f:n.m;if(this.triangulation_=new a.Z(t,i,E,x,S*T,w),0===this.triangulation_.getTriangles().length)return void(this.state=o.Z.EMPTY);this.sourceZ_=e.getZForResolution(S);let C=this.triangulation_.calculateSourceExtent();if(x&&(t.canWrapX()?(C[1]=(0,h.uZ)(C[1],x[1],x[3]),C[3]=(0,h.uZ)(C[3],x[1],x[3])):C=(0,u.getIntersection)(C,x)),(0,u.getArea)(C)){const t=e.getTileRangeForExtentAndZ(C,this.sourceZ_);for(let e=t.minX;e<=t.maxX;e++)for(let i=t.minY;i<=t.maxY;i++){const t=p(this.sourceZ_,e,i,d);t&&this.sourceTiles_.push(t)}0===this.sourceTiles_.length&&(this.state=o.Z.EMPTY)}else this.state=o.Z.EMPTY}getImage(){return this.canvas_}reproject_(){const t=[];if(this.sourceTiles_.forEach((e=>{e&&e.getState()==o.Z.LOADED&&t.push({extent:this.sourceTileGrid_.getTileCoordExtent(e.tileCoord),image:e.getImage()})})),this.sourceTiles_.length=0,0===t.length)this.state=o.Z.ERROR;else{const e=this.wrappedTileCoord_[0],i=this.targetTileGrid_.getTileSize(e),n="number"==typeof i?i:i[0],r="number"==typeof i?i:i[1],s=this.targetTileGrid_.getResolution(e),a=this.sourceTileGrid_.getResolution(this.sourceZ_),h=this.targetTileGrid_.getTileCoordExtent(this.wrappedTileCoord_);this.canvas_=(0,l.sY)(n,r,this.pixelRatio_,a,this.sourceTileGrid_.getExtent(),s,h,this.triangulation_,t,this.gutter_,this.renderEdges_,this.interpolate),this.state=o.Z.LOADED}this.changed()}load(){if(this.state==o.Z.IDLE){this.state=o.Z.LOADING,this.changed();let t=0;this.sourcesListenerKeys_=[],this.sourceTiles_.forEach((e=>{const i=e.getState();if(i==o.Z.IDLE||i==o.Z.LOADING){t++;const i=(0,c.oL)(e,r.Z.CHANGE,(function(n){const r=e.getState();r!=o.Z.LOADED&&r!=o.Z.ERROR&&r!=o.Z.EMPTY||((0,c.bN)(i),t--,0===t&&(this.unlistenSources_(),this.reproject_()))}),this);this.sourcesListenerKeys_.push(i)}})),0===t?setTimeout(this.reproject_.bind(this),0):this.sourceTiles_.forEach((function(t,e,i){t.getState()==o.Z.IDLE&&t.load()}))}}unlistenSources_(){this.sourcesListenerKeys_.forEach(c.bN),this.sourcesListenerKeys_=null}release(){this.canvas_&&((0,d.jy)(this.canvas_.getContext("2d")),l.rX.push(this.canvas_),this.canvas_=null),super.release()}}const p=g},5476:(t,e,i)=>{"use strict";i.d(e,{Z:()=>o});var n=i(8641),r=i(6121),s=i(3983);const o=class{constructor(t,e,i,s,o,a){this.sourceProj_=t,this.targetProj_=e;let l={};const h=(0,r.getTransform)(this.targetProj_,this.sourceProj_);this.transformInv_=function(t){const e=t[0]+"/"+t[1];return l[e]||(l[e]=h(t)),l[e]},this.maxSourceExtent_=s,this.errorThresholdSquared_=o*o,this.triangles_=[],this.wrapsXInSource_=!1,this.canWrapXInSource_=this.sourceProj_.canWrapX()&&!!s&&!!this.sourceProj_.getExtent()&&(0,n.getWidth)(s)>=(0,n.getWidth)(this.sourceProj_.getExtent()),this.sourceWorldWidth_=this.sourceProj_.getExtent()?(0,n.getWidth)(this.sourceProj_.getExtent()):null,this.targetWorldWidth_=this.targetProj_.getExtent()?(0,n.getWidth)(this.targetProj_.getExtent()):null;const u=(0,n.getTopLeft)(i),c=(0,n.getTopRight)(i),d=(0,n.getBottomRight)(i),g=(0,n.getBottomLeft)(i),p=this.transformInv_(u),f=this.transformInv_(c),m=this.transformInv_(d),_=this.transformInv_(g),y=10+(a?Math.max(0,Math.ceil(Math.log2((0,n.getArea)(i)/(a*a*256*256)))):0);if(this.addQuad_(u,c,d,g,p,f,m,_,y),this.wrapsXInSource_){let t=1/0;this.triangles_.forEach((function(e,i,n){t=Math.min(t,e.source[0][0],e.source[1][0],e.source[2][0])})),this.triangles_.forEach((e=>{if(Math.max(e.source[0][0],e.source[1][0],e.source[2][0])-t>this.sourceWorldWidth_/2){const i=[[e.source[0][0],e.source[0][1]],[e.source[1][0],e.source[1][1]],[e.source[2][0],e.source[2][1]]];i[0][0]-t>this.sourceWorldWidth_/2&&(i[0][0]-=this.sourceWorldWidth_),i[1][0]-t>this.sourceWorldWidth_/2&&(i[1][0]-=this.sourceWorldWidth_),i[2][0]-t>this.sourceWorldWidth_/2&&(i[2][0]-=this.sourceWorldWidth_);const n=Math.min(i[0][0],i[1][0],i[2][0]);Math.max(i[0][0],i[1][0],i[2][0])-n<this.sourceWorldWidth_/2&&(e.source=i)}}))}l={}}addTriangle_(t,e,i,n,r,s){this.triangles_.push({source:[n,r,s],target:[t,e,i]})}addQuad_(t,e,i,r,o,a,l,h,u){const c=(0,n.boundingExtent)([o,a,l,h]),d=this.sourceWorldWidth_?(0,n.getWidth)(c)/this.sourceWorldWidth_:null,g=this.sourceWorldWidth_,p=this.sourceProj_.canWrapX()&&d>.5&&d<1;let f=!1;if(u>0){if(this.targetProj_.isGlobal()&&this.targetWorldWidth_){const s=(0,n.boundingExtent)([t,e,i,r]);f=(0,n.getWidth)(s)/this.targetWorldWidth_>.25||f}!p&&this.sourceProj_.isGlobal()&&d&&(f=d>.25||f)}if(!f&&this.maxSourceExtent_&&isFinite(c[0])&&isFinite(c[1])&&isFinite(c[2])&&isFinite(c[3])&&!(0,n.intersects)(c,this.maxSourceExtent_))return;let m=0;if(!(f||isFinite(o[0])&&isFinite(o[1])&&isFinite(a[0])&&isFinite(a[1])&&isFinite(l[0])&&isFinite(l[1])&&isFinite(h[0])&&isFinite(h[1])))if(u>0)f=!0;else if(m=(isFinite(o[0])&&isFinite(o[1])?0:8)+(isFinite(a[0])&&isFinite(a[1])?0:4)+(isFinite(l[0])&&isFinite(l[1])?0:2)+(isFinite(h[0])&&isFinite(h[1])?0:1),1!=m&&2!=m&&4!=m&&8!=m)return;if(u>0){if(!f){const e=[(t[0]+i[0])/2,(t[1]+i[1])/2],n=this.transformInv_(e);let r;r=p?((0,s.$W)(o[0],g)+(0,s.$W)(l[0],g))/2-(0,s.$W)(n[0],g):(o[0]+l[0])/2-n[0];const a=(o[1]+l[1])/2-n[1];f=r*r+a*a>this.errorThresholdSquared_}if(f){if(Math.abs(t[0]-i[0])<=Math.abs(t[1]-i[1])){const n=[(e[0]+i[0])/2,(e[1]+i[1])/2],s=this.transformInv_(n),c=[(r[0]+t[0])/2,(r[1]+t[1])/2],d=this.transformInv_(c);this.addQuad_(t,e,n,c,o,a,s,d,u-1),this.addQuad_(c,n,i,r,d,s,l,h,u-1)}else{const n=[(t[0]+e[0])/2,(t[1]+e[1])/2],s=this.transformInv_(n),c=[(i[0]+r[0])/2,(i[1]+r[1])/2],d=this.transformInv_(c);this.addQuad_(t,n,c,r,o,s,d,h,u-1),this.addQuad_(n,e,i,c,s,a,l,d,u-1)}return}}if(p){if(!this.canWrapXInSource_)return;this.wrapsXInSource_=!0}0==(11&m)&&this.addTriangle_(t,i,r,o,l,h),0==(14&m)&&this.addTriangle_(t,i,e,o,l,a),m&&(0==(13&m)&&this.addTriangle_(e,r,t,a,h,o),0==(7&m)&&this.addTriangle_(e,r,i,a,h,l))}calculateSourceExtent(){const t=(0,n.createEmpty)();return this.triangles_.forEach((function(e,i,r){const s=e.source;(0,n.extendCoordinate)(t,s[0]),(0,n.extendCoordinate)(t,s[1]),(0,n.extendCoordinate)(t,s[2])})),t}getTriangles(){return this.triangles_}}},4773:(t,e,i)=>{"use strict";i.d(e,{m:()=>n});const n=.5},9307:(t,e,i)=>{"use strict";i.d(e,{Is:()=>u,cA:()=>h,gn:()=>l});var n=i(3983),r=i(8641),s=i(5537);function o(t,e,i,n){const s=(0,r.getWidth)(e)/i[0],o=(0,r.getHeight)(e)/i[1];return n?Math.min(t,Math.max(s,o)):Math.min(t,Math.min(s,o))}function a(t,e,i){let r=Math.min(t,e);return r*=Math.log(1+50*Math.max(0,t/e-1))/50+1,i&&(r=Math.max(r,i),r/=Math.log(1+50*Math.max(0,i/t-1))/50+1),(0,n.uZ)(r,i/2,2*e)}function l(t,e,i,r){return e=void 0===e||e,function(l,h,u,c){if(void 0!==l){const d=t[0],g=t[t.length-1],p=i?o(d,i,u,r):d;if(c)return e?a(l,p,g):(0,n.uZ)(l,g,p);const f=Math.min(p,l),m=Math.floor((0,s.h7)(t,f,h));return t[m]>p&&m<t.length-1?t[m+1]:t[m]}}}function h(t,e,i,r,s,l){return r=void 0===r||r,i=void 0!==i?i:0,function(h,u,c,d){if(void 0!==h){const g=s?o(e,s,c,l):e;if(d)return r?a(h,g,i):(0,n.uZ)(h,i,g);const p=1e-9,f=Math.ceil(Math.log(e/g)/Math.log(t)-p),m=-u*(.5-p)+.5,_=Math.min(g,h),y=Math.floor(Math.log(e/_)/Math.log(t)+m),v=Math.max(f,y),x=e/Math.pow(t,v);return(0,n.uZ)(x,i,g)}}}function u(t,e,i,r,s){return i=void 0===i||i,function(l,h,u,c){if(void 0!==l){const h=r?o(t,r,u,s):t;return i&&c?a(l,h,e):(0,n.uZ)(l,e,h)}}}},828:(t,e,i)=>{"use strict";i.d(e,{Gw:()=>a,YP:()=>s,gE:()=>o,h$:()=>r});var n=i(3983);function r(t){if(void 0!==t)return 0}function s(t){if(void 0!==t)return t}function o(t){const e=2*Math.PI/t;return function(t,i){return i?t:void 0!==t?t=Math.floor(t/e+.5)*e:void 0}}function a(t){return t=t||(0,n.Yr)(5),function(e,i){return i?e:void 0!==e?Math.abs(e)<=t?0:e:void 0}}},4307:(t,e,i)=>{"use strict";function n(t,e,i){return void 0===i&&(i=[0,0]),i[0]=t[0]+2*e,i[1]=t[1]+2*e,i}function r(t){return t[0]>0&&t[1]>0}function s(t,e,i){return void 0===i&&(i=[0,0]),i[0]=t[0]*e+.5|0,i[1]=t[1]*e+.5|0,i}function o(t,e){return Array.isArray(t)?t:(void 0===e?e=[t,t]:(e[0]=t,e[1]=t),e)}i.d(e,{Pq:()=>o,bA:()=>s,f3:()=>n,py:()=>r})},1533:(t,e,i)=>{"use strict";i.r(e),i.d(e,{BingMaps:()=>c,CartoDB:()=>p,Cluster:()=>w,DataTile:()=>A,GeoTIFF:()=>$e,IIIF:()=>ci,Image:()=>Ci,ImageArcGISRest:()=>Ii,ImageCanvas:()=>Mi,ImageMapGuide:()=>Fi,ImageStatic:()=>Ai,ImageWMS:()=>ki,OGCMapTile:()=>Vi,OGCVectorTile:()=>Xi,OSM:()=>Yi,Raster:()=>dn,Source:()=>Ei.Z,Stamen:()=>mn,Tile:()=>P.Z,TileArcGISRest:()=>yn,TileDebug:()=>vn,TileImage:()=>s.Z,TileJSON:()=>xn.Z,TileWMS:()=>bn,UTFGrid:()=>Rn,UrlTile:()=>wn.Z,Vector:()=>y.Z,VectorTile:()=>qi.Z,WMTS:()=>In,XYZ:()=>g,Zoomify:()=>ni,sourcesFromTileGrid:()=>Ln});var n=i(6131),r=i(8641),s=i(928),o=i(7848),a=i(8634),l=i(7248),h=i(6121);class u extends s.Z{constructor(t){const e=void 0!==t.hidpi&&t.hidpi;super({cacheSize:t.cacheSize,crossOrigin:"anonymous",interpolate:t.interpolate,opaque:!0,projection:(0,h.get)("EPSG:3857"),reprojectionErrorThreshold:t.reprojectionErrorThreshold,state:"loading",tileLoadFunction:t.tileLoadFunction,tilePixelRatio:e?2:1,wrapX:void 0===t.wrapX||t.wrapX,transition:t.transition,zDirection:t.zDirection}),this.hidpi_=e,this.culture_=void 0!==t.culture?t.culture:"en-us",this.maxZoom_=void 0!==t.maxZoom?t.maxZoom:-1,this.apiKey_=t.key,this.imagerySet_=t.imagerySet,this.placeholderTiles_=t.placeholderTiles;const i="https://dev.virtualearth.net/REST/v1/Imagery/Metadata/"+this.imagerySet_+"?uriScheme=https&include=ImageryProviders&key="+this.apiKey_+"&c="+this.culture_;fetch(i).then((t=>t.json())).then((t=>this.handleImageryMetadataResponse(t)))}getApiKey(){return this.apiKey_}getImagerySet(){return this.imagerySet_}handleImageryMetadataResponse(t){if(200!=t.statusCode||"OK"!=t.statusDescription||"ValidCredentials"!=t.authenticationResultCode||1!=t.resourceSets.length||1!=t.resourceSets[0].resources.length)return void this.setState("error");const e=t.resourceSets[0].resources[0],i=-1==this.maxZoom_?e.zoomMax:this.maxZoom_,n=this.getProjection(),s=(0,l.Tl)(n),u=this.hidpi_?2:1,c=e.imageWidth==e.imageHeight?e.imageWidth/u:[e.imageWidth/u,e.imageHeight/u],d=(0,l.dl)({extent:s,minZoom:e.zoomMin,maxZoom:i,tileSize:c});this.tileGrid=d;const g=this.culture_,p=this.hidpi_,f=this.placeholderTiles_;if(this.tileUrlFunction=(0,o.Un)(e.imageUrlSubdomains.map((function(t){const i=[0,0,0],n=e.imageUrl.replace("{subdomain}",t).replace("{culture}",g);return function(t,e,r){if(!t)return;(0,a.T9)(t[0],t[1],t[2],i);const s=new URL(n.replace("{quadkey}",function(t){const e=t[0],i=new Array(e);let n,r,s=1<<e-1;for(n=0;n<e;++n)r=48,t[1]&s&&(r+=1),t[2]&s&&(r+=2),i[n]=String.fromCharCode(r),s>>=1;return i.join("")}(i))),o=s.searchParams;return p&&(o.set("dpi","d1"),o.set("device","mobile")),!0===f?o.delete("n"):!1===f&&o.set("n","z"),s.toString()}}))),e.imageryProviders){const t=(0,h.getTransformFromProjections)((0,h.get)("EPSG:4326"),this.getProjection());this.setAttributions((i=>{const n=[],s=i.viewState,o=this.getTileGrid(),a=o.getZForResolution(s.resolution,this.zDirection),l=o.getTileCoordForCoordAndZ(s.center,a)[0];return e.imageryProviders.map((function(e){let s=!1;const o=e.coverageAreas;for(let e=0,n=o.length;e<n;++e){const n=o[e];if(l>=n.zoomMin&&l<=n.zoomMax){const e=n.bbox,o=[e[1],e[0],e[3],e[2]],a=(0,r.applyTransform)(o,t);if((0,r.intersects)(a,i.extent)){s=!0;break}}}s&&n.push(e.attribution)})),n.push('<a class="ol-attribution-bing-tos" href="https://www.microsoft.com/maps/product/terms.html" target="_blank">Terms of Use</a>'),n}))}this.setState("ready")}}const c=u;class d extends s.Z{constructor(t){const e=void 0!==(t=t||{}).projection?t.projection:"EPSG:3857",i=void 0!==t.tileGrid?t.tileGrid:(0,l.dl)({extent:(0,l.Tl)(e),maxResolution:t.maxResolution,maxZoom:t.maxZoom,minZoom:t.minZoom,tileSize:t.tileSize});super({attributions:t.attributions,cacheSize:t.cacheSize,crossOrigin:t.crossOrigin,interpolate:t.interpolate,opaque:t.opaque,projection:e,reprojectionErrorThreshold:t.reprojectionErrorThreshold,tileGrid:i,tileLoadFunction:t.tileLoadFunction,tilePixelRatio:t.tilePixelRatio,tileUrlFunction:t.tileUrlFunction,url:t.url,urls:t.urls,wrapX:void 0===t.wrapX||t.wrapX,transition:t.transition,attributionsCollapsible:t.attributionsCollapsible,zDirection:t.zDirection}),this.gutter_=void 0!==t.gutter?t.gutter:0}getGutter(){return this.gutter_}}const g=d,p=class extends g{constructor(t){super({attributions:t.attributions,cacheSize:t.cacheSize,crossOrigin:t.crossOrigin,maxZoom:void 0!==t.maxZoom?t.maxZoom:18,minZoom:t.minZoom,projection:t.projection,transition:t.transition,wrapX:t.wrapX,zDirection:t.zDirection}),this.account_=t.account,this.mapId_=t.map||"",this.config_=t.config||{},this.templateCache_={},this.initializeMap_()}getConfig(){return this.config_}updateConfig(t){Object.assign(this.config_,t),this.initializeMap_()}setConfig(t){this.config_=t||{},this.initializeMap_()}initializeMap_(){const t=JSON.stringify(this.config_);if(this.templateCache_[t])return void this.applyTemplate_(this.templateCache_[t]);let e="https://"+this.account_+".carto.com/api/v1/map";this.mapId_&&(e+="/named/"+this.mapId_);const i=new XMLHttpRequest;i.addEventListener("load",this.handleInitResponse_.bind(this,t)),i.addEventListener("error",this.handleInitError_.bind(this)),i.open("POST",e),i.setRequestHeader("Content-type","application/json"),i.send(JSON.stringify(this.config_))}handleInitResponse_(t,e){const i=e.target;if(!i.status||i.status>=200&&i.status<300){let e;try{e=JSON.parse(i.responseText)}catch(t){return void this.setState("error")}this.applyTemplate_(e),this.templateCache_[t]=e,this.setState("ready")}else this.setState("error")}handleInitError_(t){this.setState("error")}applyTemplate_(t){const e="https://"+t.cdn_url.https+"/"+this.account_+"/api/v1/map/"+t.layergroupid+"/{z}/{x}/{y}.png";this.setUrl(e)}};var f=i(5487),m=i(1090),_=i(188),y=i(2556),v=i(1900),x=i(9515),E=i(4187);class b extends y.Z{constructor(t){super({attributions:t.attributions,wrapX:t.wrapX}),this.resolution=void 0,this.distance=void 0!==t.distance?t.distance:20,this.minDistance=t.minDistance||0,this.interpolationRatio=0,this.features=[],this.geometryFunction=t.geometryFunction||function(t){const e=t.getGeometry();return(0,x.h)(!e||"Point"===e.getType(),10),e},this.createCustomCluster_=t.createCluster,this.source=null,this.boundRefresh_=this.refresh.bind(this),this.updateDistance(this.distance,this.minDistance),this.setSource(t.source||null)}clear(t){this.features.length=0,super.clear(t)}getDistance(){return this.distance}getSource(){return this.source}loadFeatures(t,e,i){this.source.loadFeatures(t,e,i),e!==this.resolution&&(this.resolution=e,this.refresh())}setDistance(t){this.updateDistance(t,this.minDistance)}setMinDistance(t){this.updateDistance(this.distance,t)}getMinDistance(){return this.minDistance}setSource(t){this.source&&this.source.removeEventListener(f.Z.CHANGE,this.boundRefresh_),this.source=t,t&&t.addEventListener(f.Z.CHANGE,this.boundRefresh_),this.refresh()}refresh(){this.clear(),this.cluster(),this.addFeatures(this.features)}updateDistance(t,e){const i=0===t?0:Math.min(e,t)/t,n=t!==this.distance||this.interpolationRatio!==i;this.distance=t,this.minDistance=e,this.interpolationRatio=i,n&&this.refresh()}cluster(){if(void 0===this.resolution||!this.source)return;const t=(0,r.createEmpty)(),e=this.distance*this.resolution,i=this.source.getFeatures(),n={};for(let s=0,o=i.length;s<o;s++){const o=i[s];if(!((0,E.sq)(o)in n)){const i=this.geometryFunction(o);if(i){const s=i.getCoordinates();(0,r.createOrUpdateFromCoordinate)(s,t),(0,r.buffer)(t,e,t);const o=this.source.getFeaturesInExtent(t).filter((function(t){const e=(0,E.sq)(t);return!(e in n)&&(n[e]=!0,!0)}));this.features.push(this.createCluster(o,t))}}}}createCluster(t,e){const i=[0,0];for(let e=t.length-1;e>=0;--e){const n=this.geometryFunction(t[e]);n?(0,v.IH)(i,n.getCoordinates()):t.splice(e,1)}(0,v.bA)(i,1/t.length);const n=(0,r.getCenter)(e),s=this.interpolationRatio,o=new _.default([i[0]*(1-s)+n[0]*s,i[1]*(1-s)+n[1]*s]);return this.createCustomCluster_?this.createCustomCluster_(o,t):new m.default({geometry:o,features:t})}}const w=b;var S=i(349),T=i(3130),C=i(1702),R=i(8815),P=i(7302),I=i(7195),L=i(6885),M=i(4307);class F extends P.Z{constructor(t){const e=void 0===t.projection?"EPSG:3857":t.projection;let i=t.tileGrid;void 0===i&&e&&(i=(0,l.dl)({extent:(0,l.Tl)(e),maxResolution:t.maxResolution,maxZoom:t.maxZoom,minZoom:t.minZoom,tileSize:t.tileSize})),super({cacheSize:.1,attributions:t.attributions,attributionsCollapsible:t.attributionsCollapsible,projection:e,tileGrid:i,opaque:t.opaque,state:t.state,wrapX:t.wrapX,transition:t.transition,interpolate:t.interpolate}),this.gutter_=void 0!==t.gutter?t.gutter:0,this.tileSize_=t.tileSize?(0,M.Pq)(t.tileSize):null,this.tileSizes_=null,this.tileLoadingKeys_={},this.loader_=t.loader,this.handleTileChange_=this.handleTileChange_.bind(this),this.bandCount=void 0===t.bandCount?4:t.bandCount,this.tileGridForProjection_={},this.tileCacheForProjection_={}}setTileSizes(t){this.tileSizes_=t}getTileSize(t){if(this.tileSizes_)return this.tileSizes_[t];if(this.tileSize_)return this.tileSize_;const e=this.getTileGrid();return e?(0,M.Pq)(e.getTileSize(t)):[256,256]}getGutterForProjection(t){const e=this.getProjection();return!e||(0,h.equivalent)(e,t)?this.gutter_:0}setLoader(t){this.loader_=t}getReprojTile_(t,e,i,n,r){const s=this.getTileCacheForProjection(n),o=(0,a.lg)(t,e,i);if(s.containsKey(o)){const t=s.get(o);if(t&&t.key==this.getKey())return t}const l=this.getTileGrid(),h=Math.max.apply(null,l.getResolutions().map(((t,e)=>{const i=(0,M.Pq)(l.getTileSize(e)),n=this.getTileSize(e);return Math.max(n[0]/i[0],n[1]/i[1])}))),u=this.getTileGridForProjection(r),c=this.getTileGridForProjection(n),d=[t,e,i],g=this.getTileCoordForTileUrlFunction(d,n),p=Object.assign({sourceProj:r,sourceTileGrid:u,targetProj:n,targetTileGrid:c,tileCoord:d,wrappedTileCoord:g,pixelRatio:h,gutter:this.getGutterForProjection(r),getTileFunction:(t,e,i,n)=>this.getTile(t,e,i,n,r)},this.tileOptions),f=new T.Z(p);return f.key=this.getKey(),f}getTile(t,e,i,n,r){const s=this.getProjection();if(s&&r&&!(0,h.equivalent)(s,r))return this.getReprojTile_(t,e,i,r,s);const o=this.getTileSize(t),l=(0,a.lg)(t,e,i);if(this.tileCache.containsKey(l))return this.tileCache.get(l);const u=this.loader_,c=Object.assign({tileCoord:[t,e,i],loader:function(){return(0,L.Vi)((function(){return u(t,e,i)}))},size:o},this.tileOptions),d=new S.ZP(c);return d.key=this.getKey(),d.addEventListener(f.Z.CHANGE,this.handleTileChange_),this.tileCache.set(l,d),d}handleTileChange_(t){const e=t.target,i=(0,E.sq)(e),n=e.getState();let r;n==I.Z.LOADING?(this.tileLoadingKeys_[i]=!0,r=R.Z.TILELOADSTART):i in this.tileLoadingKeys_&&(delete this.tileLoadingKeys_[i],r=n==I.Z.ERROR?R.Z.TILELOADERROR:n==I.Z.LOADED?R.Z.TILELOADEND:void 0),r&&this.dispatchEvent(new P.s(r,e))}getTileGridForProjection(t){const e=this.getProjection();if(this.tileGrid&&(!e||(0,h.equivalent)(e,t)))return this.tileGrid;const i=(0,E.sq)(t);return i in this.tileGridForProjection_||(this.tileGridForProjection_[i]=(0,l.X$)(t)),this.tileGridForProjection_[i]}setTileGridForProjection(t,e){const i=(0,h.get)(t);if(i){const t=(0,E.sq)(i);t in this.tileGridForProjection_||(this.tileGridForProjection_[t]=e)}}getTileCacheForProjection(t){const e=this.getProjection();if(!e||(0,h.equivalent)(e,t))return this.tileCache;const i=(0,E.sq)(t);return i in this.tileCacheForProjection_||(this.tileCacheForProjection_[i]=new C.Z(.1)),this.tileCacheForProjection_[i]}expireCache(t,e){const i=this.getTileCacheForProjection(t);this.tileCache.expireCache(this.tileCache==i?e:{});for(const t in this.tileCacheForProjection_){const n=this.tileCacheForProjection_[t];n.expireCache(n==i?e:{})}}clear(){super.clear();for(const t in this.tileCacheForProjection_)this.tileCacheForProjection_[t].clear()}}const A=F;var Z=i(8738);function D(t){return(e,...i)=>k(t,e,i)}function O(t,e){return D(j(t,e).get)}const{apply:k,construct:G,defineProperty:z,get:N,getOwnPropertyDescriptor:j,getPrototypeOf:U,has:B,ownKeys:V,set:q,setPrototypeOf:W}=Reflect,X=(Proxy,Number),{isFinite:H,isNaN:Y}=X,{iterator:K,species:$,toStringTag:J,for:Q}=Symbol,tt=Object,{create:et,defineProperty:it,freeze:nt,is:rt}=tt,st=tt.prototype,ot=(st.__lookupGetter__&&D(st.__lookupGetter__),tt.hasOwn||D(st.hasOwnProperty),Array),at=(ot.isArray,ot.prototype),lt=(D(at.join),D(at.push),D(at.toLocaleString),at[K]),ht=D(lt),ut=(Math.trunc,ArrayBuffer),ct=(ut.isView,ut.prototype),dt=(D(ct.slice),O(ct,"byteLength"),"undefined"!=typeof SharedArrayBuffer?SharedArrayBuffer:null),gt=(dt&&O(dt.prototype,"byteLength"),U(Uint8Array)),pt=(gt.from,gt.prototype),ft=(pt[K],D(pt.keys),D(pt.values),D(pt.entries),D(pt.set),D(pt.reverse),D(pt.fill),D(pt.copyWithin),D(pt.sort),D(pt.slice),D(pt.subarray),O(pt,"buffer"),O(pt,"byteOffset"),O(pt,"length"),O(pt,J),Uint16Array,Uint32Array),mt=Float32Array,_t=U([][K]()),yt=D(_t.next),vt=D(function*(){}().next),xt=U(_t),Et=DataView.prototype,bt=D(Et.getUint16),wt=(D(Et.setUint16),TypeError,RangeError,WeakSet.prototype),St=(D(wt.add),D(wt.has),WeakMap),Tt=St.prototype,Ct=D(Tt.get),Rt=(D(Tt.has),D(Tt.set)),Pt=new St,It=et(null,{next:{value:function(){const t=Ct(Pt,this);return yt(t)}},[K]:{value:function(){return this}}}),Lt=new St,Mt=et(xt,{next:{value:function(){const t=Ct(Lt,this);return vt(t)},writable:!0,configurable:!0}});for(const t of V(_t))"next"!==t&&it(Mt,t,j(_t,t));const Ft=new ut(4),At=new mt(Ft),Zt=new ft(Ft),Dt=new ft(512),Ot=new ft(512);for(let t=0;t<256;++t){const e=t-127;e<-27?(Dt[t]=0,Dt[256|t]=32768,Ot[t]=24,Ot[256|t]=24):e<-14?(Dt[t]=1024>>-e-14,Dt[256|t]=1024>>-e-14|32768,Ot[t]=-e-1,Ot[256|t]=-e-1):e<=15?(Dt[t]=e+15<<10,Dt[256|t]=e+15<<10|32768,Ot[t]=13,Ot[256|t]=13):e<128?(Dt[t]=31744,Dt[256|t]=64512,Ot[t]=24,Ot[256|t]=24):(Dt[t]=31744,Dt[256|t]=64512,Ot[t]=13,Ot[256|t]=13)}const kt=new ft(2048),Gt=new ft(64),zt=new ft(64);for(let t=1;t<1024;++t){let e=t<<13,i=0;for(;0==(8388608&e);)e<<=1,i-=8388608;e&=-8388609,i+=947912704,kt[t]=e|i}for(let t=1024;t<2048;++t)kt[t]=939524096+(t-1024<<13);for(let t=1;t<31;++t)Gt[t]=t<<23;Gt[31]=1199570944,Gt[32]=2147483648;for(let t=33;t<63;++t)Gt[t]=2147483648+(t-32<<23);Gt[63]=3347054592;for(let t=1;t<64;++t)32!==t&&(zt[t]=1024);function Nt(t,e,...i){return function(t){const e=t>>10;return Zt[0]=kt[zt[e]+(1023&t)]+Gt[e],At[0]}(bt(t,e,...function(t){if(t[K]===lt)return t;const e=et(It);return Rt(Pt,e,ht(t)),e}(i)))}var jt=i(8330),Ut=i(8602),Bt=i(2499);const Vt=new Map;function qt(t,e){Array.isArray(t)||(t=[t]),t.forEach((t=>Vt.set(t,e)))}async function Wt(t){const e=Vt.get(t.Compression);if(!e)throw new Error(`Unknown compression method identifier: ${t.Compression}`);return new(await e())(t)}function Xt(t,e,i,n=1){return new(Object.getPrototypeOf(t).constructor)(e*i*n)}function Ht(t,e,i){return(1-i)*t+i*e}function Yt(t,e,i){let n=0;for(let r=e;r<i;++r)n+=t[r];return n}function Kt(t,e,i){switch(t){case 1:if(e<=8)return new Uint8Array(i);if(e<=16)return new Uint16Array(i);if(e<=32)return new Uint32Array(i);break;case 2:if(8===e)return new Int8Array(i);if(16===e)return new Int16Array(i);if(32===e)return new Int32Array(i);break;case 3:switch(e){case 16:case 32:return new Float32Array(i);case 64:return new Float64Array(i)}}throw Error("Unsupported data format/bitsPerSample")}qt([void 0,1],(()=>i.e(321).then(i.bind(i,3321)).then((t=>t.default)))),qt(5,(()=>i.e(672).then(i.bind(i,8672)).then((t=>t.default)))),qt(6,(()=>{throw new Error("old style JPEG compression is not supported.")})),qt(7,(()=>i.e(347).then(i.bind(i,9347)).then((t=>t.default)))),qt([8,32946],(()=>Promise.all([i.e(497),i.e(522)]).then(i.bind(i,5522)).then((t=>t.default)))),qt(32773,(()=>i.e(411).then(i.bind(i,7411)).then((t=>t.default)))),qt(34887,(()=>Promise.all([i.e(497),i.e(173)]).then(i.bind(i,4173)).then((t=>t.default)))),qt(50001,(()=>i.e(588).then(i.bind(i,1588)).then((t=>t.default))));const $t=class{constructor(t,e,i,n,r,s){this.fileDirectory=t,this.geoKeys=e,this.dataView=i,this.littleEndian=n,this.tiles=r?{}:null,this.isTiled=!t.StripOffsets;const o=t.PlanarConfiguration;if(this.planarConfiguration=void 0===o?1:o,1!==this.planarConfiguration&&2!==this.planarConfiguration)throw new Error("Invalid planar configuration.");this.source=s}getFileDirectory(){return this.fileDirectory}getGeoKeys(){return this.geoKeys}getWidth(){return this.fileDirectory.ImageWidth}getHeight(){return this.fileDirectory.ImageLength}getSamplesPerPixel(){return void 0!==this.fileDirectory.SamplesPerPixel?this.fileDirectory.SamplesPerPixel:1}getTileWidth(){return this.isTiled?this.fileDirectory.TileWidth:this.getWidth()}getTileHeight(){return this.isTiled?this.fileDirectory.TileLength:void 0!==this.fileDirectory.RowsPerStrip?Math.min(this.fileDirectory.RowsPerStrip,this.getHeight()):this.getHeight()}getBlockWidth(){return this.getTileWidth()}getBlockHeight(t){return this.isTiled||(t+1)*this.getTileHeight()<=this.getHeight()?this.getTileHeight():this.getHeight()-t*this.getTileHeight()}getBytesPerPixel(){let t=0;for(let e=0;e<this.fileDirectory.BitsPerSample.length;++e)t+=this.getSampleByteSize(e);return t}getSampleByteSize(t){if(t>=this.fileDirectory.BitsPerSample.length)throw new RangeError(`Sample index ${t} is out of range.`);return Math.ceil(this.fileDirectory.BitsPerSample[t]/8)}getReaderForSample(t){const e=this.fileDirectory.SampleFormat?this.fileDirectory.SampleFormat[t]:1,i=this.fileDirectory.BitsPerSample[t];switch(e){case 1:if(i<=8)return DataView.prototype.getUint8;if(i<=16)return DataView.prototype.getUint16;if(i<=32)return DataView.prototype.getUint32;break;case 2:if(i<=8)return DataView.prototype.getInt8;if(i<=16)return DataView.prototype.getInt16;if(i<=32)return DataView.prototype.getInt32;break;case 3:switch(i){case 16:return function(t,e){return Nt(this,t,e)};case 32:return DataView.prototype.getFloat32;case 64:return DataView.prototype.getFloat64}}throw Error("Unsupported data format/bitsPerSample")}getSampleFormat(t=0){return this.fileDirectory.SampleFormat?this.fileDirectory.SampleFormat[t]:1}getBitsPerSample(t=0){return this.fileDirectory.BitsPerSample[t]}getArrayForSample(t,e){return Kt(this.getSampleFormat(t),this.getBitsPerSample(t),e)}async getTileOrStrip(t,e,i,n,r){const s=Math.ceil(this.getWidth()/this.getTileWidth()),o=Math.ceil(this.getHeight()/this.getTileHeight());let a;const{tiles:l}=this;let h,u;1===this.planarConfiguration?a=e*s+t:2===this.planarConfiguration&&(a=i*s*o+e*s+t),this.isTiled?(h=this.fileDirectory.TileOffsets[a],u=this.fileDirectory.TileByteCounts[a]):(h=this.fileDirectory.StripOffsets[a],u=this.fileDirectory.StripByteCounts[a]);const c=(await this.source.fetch([{offset:h,length:u}],r))[0];let d;return null!==l&&l[a]?d=l[a]:(d=(async()=>{let t=await n.decode(this.fileDirectory,c);const i=this.getSampleFormat(),r=this.getBitsPerSample();return function(t,e){return(1!==t&&2!==t||!(e<=32)||e%8!=0)&&(3!==t||16!==e&&32!==e&&64!==e)}(i,r)&&(t=function(t,e,i,n,r,s,o){const a=new DataView(t),l=2===i?1:n,h=Kt(e,r,2===i?o*s:o*s*n),u=parseInt("1".repeat(r),2);if(1===e){let t;t=1===i?n*r:r;let e=s*t;0!=(7&e)&&(e=e+7&-8);for(let t=0;t<o;++t){const i=t*e;for(let e=0;e<s;++e){const n=i+e*l*r;for(let i=0;i<l;++i){const o=n+i*r,c=(t*s+e)*l+i,d=Math.floor(o/8),g=o%8;if(g+r<=8)h[c]=a.getUint8(d)>>8-r-g&u;else if(g+r<=16)h[c]=a.getUint16(d)>>16-r-g&u;else if(g+r<=24){const t=a.getUint16(d)<<8|a.getUint8(d+2);h[c]=t>>24-r-g&u}else h[c]=a.getUint32(d)>>32-r-g&u}}}}return h.buffer}(t,i,this.planarConfiguration,this.getSamplesPerPixel(),r,this.getTileWidth(),this.getBlockHeight(e))),t})(),null!==l&&(l[a]=d)),{x:t,y:e,sample:i,data:await d}}async _readRaster(t,e,i,n,r,s,o,a,l){const h=this.getTileWidth(),u=this.getTileHeight(),c=this.getWidth(),d=this.getHeight(),g=Math.max(Math.floor(t[0]/h),0),p=Math.min(Math.ceil(t[2]/h),Math.ceil(c/h)),f=Math.max(Math.floor(t[1]/u),0),m=Math.min(Math.ceil(t[3]/u),Math.ceil(d/u)),_=t[2]-t[0];let y=this.getBytesPerPixel();const v=[],x=[];for(let t=0;t<e.length;++t)1===this.planarConfiguration?v.push(Yt(this.fileDirectory.BitsPerSample,0,e[t])/8):v.push(0),x.push(this.getReaderForSample(e[t]));const E=[],{littleEndian:b}=this;for(let s=f;s<m;++s)for(let o=g;o<p;++o)for(let a=0;a<e.length;++a){const g=a,p=e[a];2===this.planarConfiguration&&(y=this.getSampleByteSize(a));const f=this.getTileOrStrip(o,s,p,r,l).then((r=>{const s=r.data,o=new DataView(s),a=this.getBlockHeight(r.y),l=r.y*u,p=r.x*h,f=l+a,m=(r.x+1)*h,E=x[g],w=Math.min(a,a-(f-t[3]),d-l),S=Math.min(h,h-(m-t[2]),c-p);for(let r=Math.max(0,t[1]-l);r<w;++r)for(let s=Math.max(0,t[0]-p);s<S;++s){const a=(r*h+s)*y,u=E.call(o,a+v[g],b);let c;n?(c=(r+l-t[1])*_*e.length+(s+p-t[0])*e.length+g,i[c]=u):(c=(r+l-t[1])*_+s+p-t[0],i[g][c]=u)}}));E.push(f)}if(await Promise.all(E),s&&t[2]-t[0]!==s||o&&t[3]-t[1]!==o){let r;return r=n?function(t,e,i,n,r,s,o="nearest"){switch(o.toLowerCase()){case"nearest":return function(t,e,i,n,r,s){const o=e/n,a=i/r,l=Xt(t,n,r,s);for(let h=0;h<r;++h){const r=Math.min(Math.round(a*h),i-1);for(let i=0;i<n;++i){const a=Math.min(Math.round(o*i),e-1);for(let o=0;o<s;++o){const u=t[r*e*s+a*s+o];l[h*n*s+i*s+o]=u}}}return l}(t,e,i,n,r,s);case"bilinear":case"linear":return function(t,e,i,n,r,s){const o=e/n,a=i/r,l=Xt(t,n,r,s);for(let h=0;h<r;++h){const r=a*h,u=Math.floor(r),c=Math.min(Math.ceil(r),i-1);for(let i=0;i<n;++i){const a=o*i,d=a%1,g=Math.floor(a),p=Math.min(Math.ceil(a),e-1);for(let o=0;o<s;++o){const a=t[u*e*s+g*s+o],f=t[u*e*s+p*s+o],m=t[c*e*s+g*s+o],_=t[c*e*s+p*s+o],y=Ht(Ht(a,f,d),Ht(m,_,d),r%1);l[h*n*s+i*s+o]=y}}}return l}(t,e,i,n,r,s);default:throw new Error(`Unsupported resampling method: '${o}'`)}}(i,t[2]-t[0],t[3]-t[1],s,o,e.length,a):function(t,e,i,n,r,s="nearest"){switch(s.toLowerCase()){case"nearest":return function(t,e,i,n,r){const s=e/n,o=i/r;return t.map((t=>{const a=Xt(t,n,r);for(let l=0;l<r;++l){const r=Math.min(Math.round(o*l),i-1);for(let i=0;i<n;++i){const o=Math.min(Math.round(s*i),e-1),h=t[r*e+o];a[l*n+i]=h}}return a}))}(t,e,i,n,r);case"bilinear":case"linear":return function(t,e,i,n,r){const s=e/n,o=i/r;return t.map((t=>{const a=Xt(t,n,r);for(let l=0;l<r;++l){const r=o*l,h=Math.floor(r),u=Math.min(Math.ceil(r),i-1);for(let i=0;i<n;++i){const o=s*i,c=o%1,d=Math.floor(o),g=Math.min(Math.ceil(o),e-1),p=t[h*e+d],f=t[h*e+g],m=t[u*e+d],_=t[u*e+g],y=Ht(Ht(p,f,c),Ht(m,_,c),r%1);a[l*n+i]=y}}return a}))}(t,e,i,n,r);default:throw new Error(`Unsupported resampling method: '${s}'`)}}(i,t[2]-t[0],t[3]-t[1],s,o,a),r.width=s,r.height=o,r}return i.width=s||t[2]-t[0],i.height=o||t[3]-t[1],i}async readRasters({window:t,samples:e=[],interleave:i,pool:n=null,width:r,height:s,resampleMethod:o,fillValue:a,signal:l}={}){const h=t||[0,0,this.getWidth(),this.getHeight()];if(h[0]>h[2]||h[1]>h[3])throw new Error("Invalid subsets");const u=(h[2]-h[0])*(h[3]-h[1]),c=this.getSamplesPerPixel();if(e&&e.length){for(let t=0;t<e.length;++t)if(e[t]>=c)return Promise.reject(new RangeError(`Invalid sample index '${e[t]}'.`))}else for(let t=0;t<c;++t)e.push(t);let d;if(i)d=Kt(this.fileDirectory.SampleFormat?Math.max.apply(null,this.fileDirectory.SampleFormat):1,Math.max.apply(null,this.fileDirectory.BitsPerSample),u*e.length),a&&d.fill(a);else{d=[];for(let t=0;t<e.length;++t){const i=this.getArrayForSample(e[t],u);Array.isArray(a)&&t<a.length?i.fill(a[t]):a&&!Array.isArray(a)&&i.fill(a),d.push(i)}}const g=n||await Wt(this.fileDirectory);return await this._readRaster(h,e,d,i,g,r,s,o,l)}async readRGB({window:t,interleave:e=!0,pool:i=null,width:n,height:r,resampleMethod:s,enableAlpha:o=!1,signal:a}={}){const l=t||[0,0,this.getWidth(),this.getHeight()];if(l[0]>l[2]||l[1]>l[3])throw new Error("Invalid subsets");const h=this.fileDirectory.PhotometricInterpretation;if(h===Bt.Ie.RGB){let l=[0,1,2];if(this.fileDirectory.ExtraSamples!==Bt.pd.Unspecified&&o){l=[];for(let t=0;t<this.fileDirectory.BitsPerSample.length;t+=1)l.push(t)}return this.readRasters({window:t,interleave:e,samples:l,pool:i,width:n,height:r,resampleMethod:s,signal:a})}let u;switch(h){case Bt.Ie.WhiteIsZero:case Bt.Ie.BlackIsZero:case Bt.Ie.Palette:u=[0];break;case Bt.Ie.CMYK:u=[0,1,2,3];break;case Bt.Ie.YCbCr:case Bt.Ie.CIELab:u=[0,1,2];break;default:throw new Error("Invalid or unsupported photometric interpretation.")}const c={window:l,interleave:!0,samples:u,pool:i,width:n,height:r,resampleMethod:s,signal:a},{fileDirectory:d}=this,g=await this.readRasters(c),p=2**this.fileDirectory.BitsPerSample[0];let f;switch(h){case Bt.Ie.WhiteIsZero:f=function(t,e){const{width:i,height:n}=t,r=new Uint8Array(i*n*3);let s;for(let i=0,n=0;i<t.length;++i,n+=3)s=256-t[i]/e*256,r[n]=s,r[n+1]=s,r[n+2]=s;return r}(g,p);break;case Bt.Ie.BlackIsZero:f=function(t,e){const{width:i,height:n}=t,r=new Uint8Array(i*n*3);let s;for(let i=0,n=0;i<t.length;++i,n+=3)s=t[i]/e*256,r[n]=s,r[n+1]=s,r[n+2]=s;return r}(g,p);break;case Bt.Ie.Palette:f=function(t,e){const{width:i,height:n}=t,r=new Uint8Array(i*n*3),s=e.length/3,o=e.length/3*2;for(let i=0,n=0;i<t.length;++i,n+=3){const a=t[i];r[n]=e[a]/65536*256,r[n+1]=e[a+s]/65536*256,r[n+2]=e[a+o]/65536*256}return r}(g,d.ColorMap);break;case Bt.Ie.CMYK:f=function(t){const{width:e,height:i}=t,n=new Uint8Array(e*i*3);for(let e=0,i=0;e<t.length;e+=4,i+=3){const r=t[e],s=t[e+1],o=t[e+2],a=t[e+3];n[i]=(255-r)/256*255*((255-a)/256),n[i+1]=(255-s)/256*255*((255-a)/256),n[i+2]=(255-o)/256*255*((255-a)/256)}return n}(g);break;case Bt.Ie.YCbCr:f=function(t){const{width:e,height:i}=t,n=new Uint8ClampedArray(e*i*3);for(let e=0,i=0;e<t.length;e+=3,i+=3){const r=t[e],s=t[e+1],o=t[e+2];n[i]=r+1.402*(o-128),n[i+1]=r-.34414*(s-128)-.71414*(o-128),n[i+2]=r+1.772*(s-128)}return n}(g);break;case Bt.Ie.CIELab:f=function(t){const{width:e,height:i}=t,n=new Uint8Array(e*i*3);for(let e=0,i=0;e<t.length;e+=3,i+=3){let r,s,o,a=(t[e+0]+16)/116,l=(t[e+1]<<24>>24)/500+a,h=a-(t[e+2]<<24>>24)/200;l=.95047*(l*l*l>.008856?l*l*l:(l-16/116)/7.787),a=1*(a*a*a>.008856?a*a*a:(a-16/116)/7.787),h=1.08883*(h*h*h>.008856?h*h*h:(h-16/116)/7.787),r=3.2406*l+-1.5372*a+-.4986*h,s=-.9689*l+1.8758*a+.0415*h,o=.0557*l+-.204*a+1.057*h,r=r>.0031308?1.055*r**(1/2.4)-.055:12.92*r,s=s>.0031308?1.055*s**(1/2.4)-.055:12.92*s,o=o>.0031308?1.055*o**(1/2.4)-.055:12.92*o,n[i]=255*Math.max(0,Math.min(1,r)),n[i+1]=255*Math.max(0,Math.min(1,s)),n[i+2]=255*Math.max(0,Math.min(1,o))}return n}(g);break;default:throw new Error("Unsupported photometric interpretation.")}if(!e){const t=new Uint8Array(f.length/3),e=new Uint8Array(f.length/3),i=new Uint8Array(f.length/3);for(let n=0,r=0;n<f.length;n+=3,++r)t[r]=f[n],e[r]=f[n+1],i[r]=f[n+2];f=[t,e,i]}return f.width=g.width,f.height=g.height,f}getTiePoints(){if(!this.fileDirectory.ModelTiepoint)return[];const t=[];for(let e=0;e<this.fileDirectory.ModelTiepoint.length;e+=6)t.push({i:this.fileDirectory.ModelTiepoint[e],j:this.fileDirectory.ModelTiepoint[e+1],k:this.fileDirectory.ModelTiepoint[e+2],x:this.fileDirectory.ModelTiepoint[e+3],y:this.fileDirectory.ModelTiepoint[e+4],z:this.fileDirectory.ModelTiepoint[e+5]});return t}getGDALMetadata(t=null){const e={};if(!this.fileDirectory.GDAL_METADATA)return null;const i=this.fileDirectory.GDAL_METADATA;let n=Ut(i,"Item");n=null===t?n.filter((t=>void 0===jt(t,"sample"))):n.filter((e=>Number(jt(e,"sample"))===t));for(let t=0;t<n.length;++t){const i=n[t];e[jt(i,"name")]=i.inner}return e}getGDALNoData(){if(!this.fileDirectory.GDAL_NODATA)return null;const t=this.fileDirectory.GDAL_NODATA;return Number(t.substring(0,t.length-1))}getOrigin(){const t=this.fileDirectory.ModelTiepoint,e=this.fileDirectory.ModelTransformation;if(t&&6===t.length)return[t[3],t[4],t[5]];if(e)return[e[3],e[7],e[11]];throw new Error("The image does not have an affine transformation.")}getResolution(t=null){const e=this.fileDirectory.ModelPixelScale,i=this.fileDirectory.ModelTransformation;if(e)return[e[0],-e[1],e[2]];if(i)return[i[0],i[5],i[10]];if(t){const[e,i,n]=t.getResolution();return[e*t.getWidth()/this.getWidth(),i*t.getHeight()/this.getHeight(),n*t.getWidth()/this.getWidth()]}throw new Error("The image does not have an affine transformation.")}pixelIsArea(){return 1===this.geoKeys.GTRasterTypeGeoKey}getBoundingBox(){const t=this.getOrigin(),e=this.getResolution(),i=t[0],n=t[1],r=i+e[0]*this.getWidth(),s=n+e[1]*this.getHeight();return[Math.min(i,r),Math.min(n,s),Math.max(i,r),Math.max(n,s)]}};class Jt{constructor(t){this._dataView=new DataView(t)}get buffer(){return this._dataView.buffer}getUint64(t,e){const i=this.getUint32(t,e),n=this.getUint32(t+4,e);let r;if(e){if(r=i+2**32*n,!Number.isSafeInteger(r))throw new Error(`${r} exceeds MAX_SAFE_INTEGER. Precision may be lost. Please report if you get this message to https://github.com/geotiffjs/geotiff.js/issues`);return r}if(r=2**32*i+n,!Number.isSafeInteger(r))throw new Error(`${r} exceeds MAX_SAFE_INTEGER. Precision may be lost. Please report if you get this message to https://github.com/geotiffjs/geotiff.js/issues`);return r}getInt64(t,e){let i=0;const n=(128&this._dataView.getUint8(t+(e?7:0)))>0;let r=!0;for(let s=0;s<8;s++){let o=this._dataView.getUint8(t+(e?s:7-s));n&&(r?0!==o&&(o=255&~(o-1),r=!1):o=255&~o),i+=o*256**s}return n&&(i=-i),i}getUint8(t,e){return this._dataView.getUint8(t,e)}getInt8(t,e){return this._dataView.getInt8(t,e)}getUint16(t,e){return this._dataView.getUint16(t,e)}getInt16(t,e){return this._dataView.getInt16(t,e)}getUint32(t,e){return this._dataView.getUint32(t,e)}getInt32(t,e){return this._dataView.getInt32(t,e)}getFloat16(t,e){return Nt(this._dataView,t,e)}getFloat32(t,e){return this._dataView.getFloat32(t,e)}getFloat64(t,e){return this._dataView.getFloat64(t,e)}}class Qt{constructor(t,e,i,n){this._dataView=new DataView(t),this._sliceOffset=e,this._littleEndian=i,this._bigTiff=n}get sliceOffset(){return this._sliceOffset}get sliceTop(){return this._sliceOffset+this.buffer.byteLength}get littleEndian(){return this._littleEndian}get bigTiff(){return this._bigTiff}get buffer(){return this._dataView.buffer}covers(t,e){return this.sliceOffset<=t&&this.sliceTop>=t+e}readUint8(t){return this._dataView.getUint8(t-this._sliceOffset,this._littleEndian)}readInt8(t){return this._dataView.getInt8(t-this._sliceOffset,this._littleEndian)}readUint16(t){return this._dataView.getUint16(t-this._sliceOffset,this._littleEndian)}readInt16(t){return this._dataView.getInt16(t-this._sliceOffset,this._littleEndian)}readUint32(t){return this._dataView.getUint32(t-this._sliceOffset,this._littleEndian)}readInt32(t){return this._dataView.getInt32(t-this._sliceOffset,this._littleEndian)}readFloat32(t){return this._dataView.getFloat32(t-this._sliceOffset,this._littleEndian)}readFloat64(t){return this._dataView.getFloat64(t-this._sliceOffset,this._littleEndian)}readUint64(t){const e=this.readUint32(t),i=this.readUint32(t+4);let n;if(this._littleEndian){if(n=e+2**32*i,!Number.isSafeInteger(n))throw new Error(`${n} exceeds MAX_SAFE_INTEGER. Precision may be lost. Please report if you get this message to https://github.com/geotiffjs/geotiff.js/issues`);return n}if(n=2**32*e+i,!Number.isSafeInteger(n))throw new Error(`${n} exceeds MAX_SAFE_INTEGER. Precision may be lost. Please report if you get this message to https://github.com/geotiffjs/geotiff.js/issues`);return n}readInt64(t){let e=0;const i=(128&this._dataView.getUint8(t+(this._littleEndian?7:0)))>0;let n=!0;for(let r=0;r<8;r++){let s=this._dataView.getUint8(t+(this._littleEndian?r:7-r));i&&(n?0!==s&&(s=255&~(s-1),n=!1):s=255&~s),e+=s*256**r}return i&&(e=-e),e}readOffset(t){return this._bigTiff?this.readUint64(t):this.readUint32(t)}}const te="\r\n\r\n";function ee(t){if(void 0!==Object.fromEntries)return Object.fromEntries(t);const e={};for(const[i,n]of t)e[i.toLowerCase()]=n;return e}function ie(t){return ee(t.split("\r\n").map((t=>{const e=t.split(":").map((t=>t.trim()));return e[0]=e[0].toLowerCase(),e})))}function ne(t){let e,i,n;return t&&([,e,i,n]=t.match(/bytes (\d+)-(\d+)\/(\d+)/),e=parseInt(e,10),i=parseInt(i,10),n=parseInt(n,10)),{start:e,end:i,total:n}}class re{async fetch(t,e){return Promise.all(t.map((t=>this.fetchSlice(t,e))))}async fetchSlice(t){throw new Error(`fetching of slice ${t} not possible, not implemented`)}get fileSize(){return null}async close(){}}class se extends Map{constructor(t={}){if(super(),!(t.maxSize&&t.maxSize>0))throw new TypeError("`maxSize` must be a number greater than 0");if("number"==typeof t.maxAge&&0===t.maxAge)throw new TypeError("`maxAge` must be a number greater than 0");this.maxSize=t.maxSize,this.maxAge=t.maxAge||Number.POSITIVE_INFINITY,this.onEviction=t.onEviction,this.cache=new Map,this.oldCache=new Map,this._size=0}_emitEvictions(t){if("function"==typeof this.onEviction)for(const[e,i]of t)this.onEviction(e,i.value)}_deleteIfExpired(t,e){return"number"==typeof e.expiry&&e.expiry<=Date.now()&&("function"==typeof this.onEviction&&this.onEviction(t,e.value),this.delete(t))}_getOrDeleteIfExpired(t,e){if(!1===this._deleteIfExpired(t,e))return e.value}_getItemValue(t,e){return e.expiry?this._getOrDeleteIfExpired(t,e):e.value}_peek(t,e){const i=e.get(t);return this._getItemValue(t,i)}_set(t,e){this.cache.set(t,e),this._size++,this._size>=this.maxSize&&(this._size=0,this._emitEvictions(this.oldCache),this.oldCache=this.cache,this.cache=new Map)}_moveToRecent(t,e){this.oldCache.delete(t),this._set(t,e)}*_entriesAscending(){for(const t of this.oldCache){const[e,i]=t;this.cache.has(e)||!1===this._deleteIfExpired(e,i)&&(yield t)}for(const t of this.cache){const[e,i]=t;!1===this._deleteIfExpired(e,i)&&(yield t)}}get(t){if(this.cache.has(t)){const e=this.cache.get(t);return this._getItemValue(t,e)}if(this.oldCache.has(t)){const e=this.oldCache.get(t);if(!1===this._deleteIfExpired(t,e))return this._moveToRecent(t,e),e.value}}set(t,e,{maxAge:i=this.maxAge}={}){const n="number"==typeof i&&i!==Number.POSITIVE_INFINITY?Date.now()+i:void 0;return this.cache.has(t)?this.cache.set(t,{value:e,expiry:n}):this._set(t,{value:e,expiry:n}),this}has(t){return this.cache.has(t)?!this._deleteIfExpired(t,this.cache.get(t)):!!this.oldCache.has(t)&&!this._deleteIfExpired(t,this.oldCache.get(t))}peek(t){return this.cache.has(t)?this._peek(t,this.cache):this.oldCache.has(t)?this._peek(t,this.oldCache):void 0}delete(t){const e=this.cache.delete(t);return e&&this._size--,this.oldCache.delete(t)||e}clear(){this.cache.clear(),this.oldCache.clear(),this._size=0}resize(t){if(!(t&&t>0))throw new TypeError("`maxSize` must be a number greater than 0");const e=[...this._entriesAscending()],i=e.length-t;i<0?(this.cache=new Map(e),this.oldCache=new Map,this._size=e.length):(i>0&&this._emitEvictions(e.slice(0,i)),this.oldCache=new Map(e.slice(i)),this.cache=new Map,this._size=0),this.maxSize=t}*keys(){for(const[t]of this)yield t}*values(){for(const[,t]of this)yield t}*[Symbol.iterator](){for(const t of this.cache){const[e,i]=t;!1===this._deleteIfExpired(e,i)&&(yield[e,i.value])}for(const t of this.oldCache){const[e,i]=t;this.cache.has(e)||!1===this._deleteIfExpired(e,i)&&(yield[e,i.value])}}*entriesDescending(){let t=[...this.cache];for(let e=t.length-1;e>=0;--e){const i=t[e],[n,r]=i;!1===this._deleteIfExpired(n,r)&&(yield[n,r.value])}t=[...this.oldCache];for(let e=t.length-1;e>=0;--e){const i=t[e],[n,r]=i;this.cache.has(n)||!1===this._deleteIfExpired(n,r)&&(yield[n,r.value])}}*entriesAscending(){for(const[t,e]of this._entriesAscending())yield[t,e.value]}get size(){if(!this._size)return this.oldCache.size;let t=0;for(const e of this.oldCache.keys())this.cache.has(e)||t++;return Math.min(this._size+t,this.maxSize)}entries(){return this.entriesAscending()}forEach(t,e=this){for(const[i,n]of this.entriesAscending())t.call(e,n,i,this)}get[Symbol.toStringTag](){return JSON.stringify([...this.entriesAscending()])}}class oe extends Error{constructor(t){super(t),Error.captureStackTrace&&Error.captureStackTrace(this,oe),this.name="AbortError"}}class ae extends Error{constructor(t,e){super(e),this.errors=t,this.message=e,this.name="AggregateError"}}const le=ae;class he{constructor(t,e,i=null){this.offset=t,this.length=e,this.data=i}get top(){return this.offset+this.length}}class ue{constructor(t,e,i){this.offset=t,this.length=e,this.blockIds=i}}class ce extends re{constructor(t,{blockSize:e=65536,cacheSize:i=100}={}){super(),this.source=t,this.blockSize=e,this.blockCache=new se({maxSize:i,onEviction:(t,e)=>{this.evictedBlocks.set(t,e)}}),this.evictedBlocks=new Map,this.blockRequests=new Map,this.blockIdsToFetch=new Set,this.abortedBlockIds=new Set}get fileSize(){return this.source.fileSize}async fetch(t,e){const i=[],n=[],r=[];this.evictedBlocks.clear();for(const{offset:e,length:s}of t){let t=e+s;const{fileSize:o}=this;null!==o&&(t=Math.min(t,o));for(let s=Math.floor(e/this.blockSize)*this.blockSize;s<t;s+=this.blockSize){const t=Math.floor(s/this.blockSize);this.blockCache.has(t)||this.blockRequests.has(t)||(this.blockIdsToFetch.add(t),n.push(t)),this.blockRequests.has(t)&&i.push(this.blockRequests.get(t)),r.push(t)}}await async function(t){return new Promise((t=>setTimeout(t,undefined)))}(),this.fetchBlocks(e);const s=[];for(const t of n)this.blockRequests.has(t)&&s.push(this.blockRequests.get(t));await Promise.allSettled(i),await Promise.allSettled(s);const o=[],a=r.filter((t=>this.abortedBlockIds.has(t)||!this.blockCache.has(t)));if(a.forEach((t=>this.blockIdsToFetch.add(t))),a.length>0&&e&&!e.aborted){this.fetchBlocks(null);for(const t of a){const e=this.blockRequests.get(t);if(!e)throw new Error(`Block ${t} is not in the block requests`);o.push(e)}await Promise.allSettled(o)}if(e&&e.aborted)throw new oe("Request was aborted");const l=r.map((t=>this.blockCache.get(t)||this.evictedBlocks.get(t))),h=l.filter((t=>!t));if(h.length)throw new le(h,"Request failed");const u=new Map(function(t,e){const i=Array.isArray(t)?t:Array.from(t),n=Array.isArray(e)?e:Array.from(e);return i.map(((t,e)=>[t,n[e]]))}(r,l));return this.readSliceData(t,u)}fetchBlocks(t){if(this.blockIdsToFetch.size>0){const e=this.groupBlocks(this.blockIdsToFetch),i=this.source.fetch(e,t);for(let n=0;n<e.length;++n){const r=e[n];for(const e of r.blockIds)this.blockRequests.set(e,(async()=>{try{const t=(await i)[n],r=e*this.blockSize,s=r-t.offset,o=Math.min(s+this.blockSize,t.data.byteLength),a=t.data.slice(s,o),l=new he(r,a.byteLength,a,e);this.blockCache.set(e,l),this.abortedBlockIds.delete(e)}catch(i){if("AbortError"!==i.name)throw i;i.signal=t,this.blockCache.delete(e),this.abortedBlockIds.add(e)}finally{this.blockRequests.delete(e)}})())}this.blockIdsToFetch.clear()}}groupBlocks(t){const e=Array.from(t).sort(((t,e)=>t-e));if(0===e.length)return[];let i=[],n=null;const r=[];for(const t of e)null===n||n+1===t?(i.push(t),n=t):(r.push(new ue(i[0]*this.blockSize,i.length*this.blockSize,i)),i=[t],n=t);return r.push(new ue(i[0]*this.blockSize,i.length*this.blockSize,i)),r}readSliceData(t,e){return t.map((t=>{let i=t.offset+t.length;null!==this.fileSize&&(i=Math.min(this.fileSize,i));const n=Math.floor(t.offset/this.blockSize),r=Math.floor(i/this.blockSize),s=new ArrayBuffer(t.length),o=new Uint8Array(s);for(let s=n;s<=r;++s){const n=e.get(s),r=n.offset-t.offset,a=n.top-i;let l,h=0,u=0;r<0?h=-r:r>0&&(u=r),l=a<0?n.length-h:i-n.offset-h;const c=new Uint8Array(n.data,h,l);o.set(c,u)}return s}))}}class de{get ok(){return this.status>=200&&this.status<=299}get status(){throw new Error("not implemented")}getHeader(t){throw new Error("not implemented")}async getData(){throw new Error("not implemented")}}class ge{constructor(t){this.url=t}async request({headers:t,credentials:e,signal:i}={}){throw new Error("request is not implemented")}}class pe extends de{constructor(t){super(),this.response=t}get status(){return this.response.status}getHeader(t){return this.response.headers.get(t)}async getData(){return this.response.arrayBuffer?await this.response.arrayBuffer():(await this.response.buffer()).buffer}}class fe extends ge{constructor(t,e){super(t),this.credentials=e}async request({headers:t,credentials:e,signal:i}={}){const n=await fetch(this.url,{headers:t,credentials:e,signal:i});return new pe(n)}}class me extends de{constructor(t,e){super(),this.xhr=t,this.data=e}get status(){return this.xhr.status}getHeader(t){return this.xhr.getResponseHeader(t)}async getData(){return this.data}}class _e extends ge{constructRequest(t,e){return new Promise(((i,n)=>{const r=new XMLHttpRequest;r.open("GET",this.url),r.responseType="arraybuffer";for(const[e,i]of Object.entries(t))r.setRequestHeader(e,i);r.onload=()=>{const t=r.response;i(new me(r,t))},r.onerror=n,r.onabort=()=>n(new oe("Request aborted")),r.send(),e&&(e.aborted&&r.abort(),e.addEventListener("abort",(()=>r.abort())))}))}async request({headers:t,signal:e}={}){return await this.constructRequest(t,e)}}var ye=i(3752),ve=i(3640),xe=i(2630);class Ee extends de{constructor(t,e){super(),this.response=t,this.dataPromise=e}get status(){return this.response.statusCode}getHeader(t){return this.response.headers[t]}async getData(){return await this.dataPromise}}class be extends ge{constructor(t){super(t),this.parsedUrl=xe.parse(this.url),this.httpApi="http:"===this.parsedUrl.protocol?ye:ve}constructRequest(t,e){return new Promise(((i,n)=>{const r=this.httpApi.get({...this.parsedUrl,headers:t},(t=>{const e=new Promise((e=>{const i=[];t.on("data",(t=>{i.push(t)})),t.on("end",(()=>{const t=Buffer.concat(i).buffer;e(t)})),t.on("error",n)}));i(new Ee(t,e))}));r.on("error",n),e&&(e.aborted&&r.destroy(new oe("Request aborted")),e.addEventListener("abort",(()=>r.destroy(new oe("Request aborted")))))}))}async request({headers:t,signal:e}={}){return await this.constructRequest(t,e)}}class we extends re{constructor(t,e,i,n){super(),this.client=t,this.headers=e,this.maxRanges=i,this.allowFullFile=n,this._fileSize=null}async fetch(t,e){return this.maxRanges>=t.length?this.fetchSlices(t,e):(this.maxRanges>0&&t.length,Promise.all(t.map((t=>this.fetchSlice(t,e)))))}async fetchSlices(t,e){const i=await this.client.request({headers:{...this.headers,Range:`bytes=${t.map((({offset:t,length:e})=>`${t}-${t+e}`)).join(",")}`},signal:e});if(i.ok){if(206===i.status){const{type:n,params:r}=function(t){const[e,...i]=t.split(";").map((t=>t.trim()));return{type:e,params:ee(i.map((t=>t.split("="))))}}(i.getHeader("content-type"));if("multipart/byteranges"===n){const t=function(t,e){let i=null;const n=new TextDecoder("ascii"),r=[],s=`--${e}`,o=`${s}--`;for(let e=0;e<10;++e)n.decode(new Uint8Array(t,e,s.length))===s&&(i=e);if(null===i)throw new Error("Could not find initial boundary");for(;i<t.byteLength;){const e=n.decode(new Uint8Array(t,i,Math.min(s.length+1024,t.byteLength-i)));if(0===e.length||e.startsWith(o))break;if(!e.startsWith(s))throw new Error("Part does not start with boundary");const a=e.substr(s.length+2);if(0===a.length)break;const l=a.indexOf(te),h=ie(a.substr(0,l)),{start:u,end:c,total:d}=ne(h["content-range"]),g=i+s.length+l+te.length,p=parseInt(c,10)+1-parseInt(u,10);r.push({headers:h,data:t.slice(g,g+p),offset:u,length:p,fileSize:d}),i=g+p+4}return r}(await i.getData(),r.boundary);return this._fileSize=t[0].fileSize||null,t}const s=await i.getData(),{start:o,end:a,total:l}=ne(i.getHeader("content-range"));this._fileSize=l||null;const h=[{data:s,offset:o,length:a-o}];if(t.length>1){const i=await Promise.all(t.slice(1).map((t=>this.fetchSlice(t,e))));return h.concat(i)}return h}{if(!this.allowFullFile)throw new Error("Server responded with full file");const t=await i.getData();return this._fileSize=t.byteLength,[{data:t,offset:0,length:t.byteLength}]}}throw new Error("Error fetching data.")}async fetchSlice(t,e){const{offset:i,length:n}=t,r=await this.client.request({headers:{...this.headers,Range:`bytes=${i}-${i+n}`},signal:e});if(r.ok){if(206===r.status){const t=await r.getData(),{total:e}=ne(r.getHeader("content-range"));return this._fileSize=e||null,{data:t,offset:i,length:n}}{if(!this.allowFullFile)throw new Error("Server responded with full file");const t=await r.getData();return this._fileSize=t.byteLength,{data:t,offset:0,length:t.byteLength}}}throw new Error("Error fetching data.")}get fileSize(){return this._fileSize}}function Se(t,{blockSize:e,cacheSize:i}){return null===e?t:new ce(t,{blockSize:e,cacheSize:i})}function Te(t,{forceXHR:e=!1,...i}={}){return"function"!=typeof fetch||e?"undefined"!=typeof XMLHttpRequest?function(t,{headers:e={},maxRanges:i=0,allowFullFile:n=!1,...r}={}){const s=new _e(t);return Se(new we(s,e,i,n),r)}(t,i):function(t,{headers:e={},maxRanges:i=0,allowFullFile:n=!1,...r}={}){const s=new be(t);return Se(new we(s,e,i,n),r)}(t,i):function(t,{headers:e={},credentials:i,maxRanges:n=0,allowFullFile:r=!1,...s}={}){const o=new fe(t,i);return Se(new we(o,e,n,r),s)}(t,i)}class Ce extends re{constructor(t){super(),this.file=t}async fetchSlice(t,e){return new Promise(((i,n)=>{const r=this.file.slice(t.offset,t.offset+t.length),s=new FileReader;s.onload=t=>i(t.target.result),s.onerror=n,s.onabort=n,s.readAsArrayBuffer(r),e&&e.addEventListener("abort",(()=>s.abort()))}))}}function Re(t){switch(t){case Bt.sf.BYTE:case Bt.sf.ASCII:case Bt.sf.SBYTE:case Bt.sf.UNDEFINED:return 1;case Bt.sf.SHORT:case Bt.sf.SSHORT:return 2;case Bt.sf.LONG:case Bt.sf.SLONG:case Bt.sf.FLOAT:case Bt.sf.IFD:return 4;case Bt.sf.RATIONAL:case Bt.sf.SRATIONAL:case Bt.sf.DOUBLE:case Bt.sf.LONG8:case Bt.sf.SLONG8:case Bt.sf.IFD8:return 8;default:throw new RangeError(`Invalid field type: ${t}`)}}function Pe(t,e,i,n){let r=null,s=null;const o=Re(e);switch(e){case Bt.sf.BYTE:case Bt.sf.ASCII:case Bt.sf.UNDEFINED:r=new Uint8Array(i),s=t.readUint8;break;case Bt.sf.SBYTE:r=new Int8Array(i),s=t.readInt8;break;case Bt.sf.SHORT:r=new Uint16Array(i),s=t.readUint16;break;case Bt.sf.SSHORT:r=new Int16Array(i),s=t.readInt16;break;case Bt.sf.LONG:case Bt.sf.IFD:r=new Uint32Array(i),s=t.readUint32;break;case Bt.sf.SLONG:r=new Int32Array(i),s=t.readInt32;break;case Bt.sf.LONG8:case Bt.sf.IFD8:r=new Array(i),s=t.readUint64;break;case Bt.sf.SLONG8:r=new Array(i),s=t.readInt64;break;case Bt.sf.RATIONAL:r=new Uint32Array(2*i),s=t.readUint32;break;case Bt.sf.SRATIONAL:r=new Int32Array(2*i),s=t.readInt32;break;case Bt.sf.FLOAT:r=new Float32Array(i),s=t.readFloat32;break;case Bt.sf.DOUBLE:r=new Float64Array(i),s=t.readFloat64;break;default:throw new RangeError(`Invalid field type: ${e}`)}if(e!==Bt.sf.RATIONAL&&e!==Bt.sf.SRATIONAL)for(let e=0;e<i;++e)r[e]=s.call(t,n+e*o);else for(let e=0;e<i;e+=2)r[e]=s.call(t,n+e*o),r[e+1]=s.call(t,n+(e*o+4));return e===Bt.sf.ASCII?new TextDecoder("utf-8").decode(r):r}class Ie{constructor(t,e,i){this.fileDirectory=t,this.geoKeyDirectory=e,this.nextIFDByteOffset=i}}class Le extends Error{constructor(t){super(`No image at index ${t}`),this.index=t}}class Me{async readRasters(t={}){const{window:e,width:i,height:n}=t;let{resX:r,resY:s,bbox:o}=t;const a=await this.getImage();let l=a;const h=await this.getImageCount(),u=a.getBoundingBox();if(e&&o)throw new Error('Both "bbox" and "window" passed.');if(i||n){if(e){const[t,i]=a.getOrigin(),[n,r]=a.getResolution();o=[t+e[0]*n,i+e[1]*r,t+e[2]*n,i+e[3]*r]}const t=o||u;if(i){if(r)throw new Error("Both width and resX passed");r=(t[2]-t[0])/i}if(n){if(s)throw new Error("Both width and resY passed");s=(t[3]-t[1])/n}}if(r||s){const t=[];for(let e=0;e<h;++e){const i=await this.getImage(e),{SubfileType:n,NewSubfileType:r}=i.fileDirectory;(0===e||2===n||1&r)&&t.push(i)}t.sort(((t,e)=>t.getWidth()-e.getWidth()));for(let e=0;e<t.length;++e){const i=t[e],n=(u[2]-u[0])/i.getWidth(),o=(u[3]-u[1])/i.getHeight();if(l=i,r&&r>n||s&&s>o)break}}let c=e;if(o){const[t,e]=a.getOrigin(),[i,n]=l.getResolution(a);c=[Math.round((o[0]-t)/i),Math.round((o[1]-e)/n),Math.round((o[2]-t)/i),Math.round((o[3]-e)/n)],c=[Math.min(c[0],c[2]),Math.min(c[1],c[3]),Math.max(c[0],c[2]),Math.max(c[1],c[3])]}return l.readRasters({...t,window:c})}}class Fe extends Me{constructor(t,e,i,n,r={}){super(),this.source=t,this.littleEndian=e,this.bigTiff=i,this.firstIFDOffset=n,this.cache=r.cache||!1,this.ifdRequests=[],this.ghostValues=null}async getSlice(t,e){const i=this.bigTiff?4048:1024;return new Qt((await this.source.fetch([{offset:t,length:void 0!==e?e:i}]))[0],t,this.littleEndian,this.bigTiff)}async parseFileDirectoryAt(t){const e=this.bigTiff?20:12,i=this.bigTiff?8:2;let n=await this.getSlice(t);const r=this.bigTiff?n.readUint64(t):n.readUint16(t),s=r*e+(this.bigTiff?16:6);n.covers(t,s)||(n=await this.getSlice(t,s));const o={};let a=t+(this.bigTiff?8:2);for(let t=0;t<r;a+=e,++t){const t=n.readUint16(a),e=n.readUint16(a+2),i=this.bigTiff?n.readUint64(a+4):n.readUint32(a+4);let r,s;const l=Re(e),h=a+(this.bigTiff?12:8);if(l*i<=(this.bigTiff?8:4))r=Pe(n,e,i,h);else{const t=n.readOffset(h),s=Re(e)*i;r=n.covers(t,s)?Pe(n,e,i,t):Pe(await this.getSlice(t,s),e,i,t)}s=1===i&&-1===Bt.It.indexOf(t)&&e!==Bt.sf.RATIONAL&&e!==Bt.sf.SRATIONAL?r[0]:r,o[Bt.L[t]]=s}const l=function(t){const e=t.GeoKeyDirectory;if(!e)return null;const i={};for(let n=4;n<=4*e[3];n+=4){const r=Bt.P1[e[n]],s=e[n+1]?Bt.L[e[n+1]]:null,o=e[n+2],a=e[n+3];let l=null;if(s){if(l=t[s],null==l)throw new Error(`Could not get value of geoKey '${r}'.`);"string"==typeof l?l=l.substring(a,a+o-1):l.subarray&&(l=l.subarray(a,a+o),1===o&&(l=l[0]))}else l=a;i[r]=l}return i}(o),h=n.readOffset(t+i+e*r);return new Ie(o,l,h)}async requestIFD(t){if(this.ifdRequests[t])return this.ifdRequests[t];if(0===t)return this.ifdRequests[t]=this.parseFileDirectoryAt(this.firstIFDOffset),this.ifdRequests[t];if(!this.ifdRequests[t-1])try{this.ifdRequests[t-1]=this.requestIFD(t-1)}catch(e){if(e instanceof Le)throw new Le(t);throw e}return this.ifdRequests[t]=(async()=>{const e=await this.ifdRequests[t-1];if(0===e.nextIFDByteOffset)throw new Le(t);return this.parseFileDirectoryAt(e.nextIFDByteOffset)})(),this.ifdRequests[t]}async getImage(t=0){const e=await this.requestIFD(t);return new $t(e.fileDirectory,e.geoKeyDirectory,this.dataView,this.littleEndian,this.cache,this.source)}async getImageCount(){let t=0,e=!0;for(;e;)try{await this.requestIFD(t),++t}catch(t){if(!(t instanceof Le))throw t;e=!1}return t}async getGhostValues(){const t=this.bigTiff?16:8;if(this.ghostValues)return this.ghostValues;const e="GDAL_STRUCTURAL_METADATA_SIZE=",i=e.length+100;let n=await this.getSlice(t,i);if(e===Pe(n,Bt.sf.ASCII,e.length,t)){const e=Pe(n,Bt.sf.ASCII,i,t).split("\n")[0],r=Number(e.split("=")[1].split(" ")[0])+e.length;r>i&&(n=await this.getSlice(t,r));const s=Pe(n,Bt.sf.ASCII,r,t);this.ghostValues={},s.split("\n").filter((t=>t.length>0)).map((t=>t.split("="))).forEach((([t,e])=>{this.ghostValues[t]=e}))}return this.ghostValues}static async fromSource(t,e,i){const n=(await t.fetch([{offset:0,length:1024}],i))[0],r=new Jt(n),s=r.getUint16(0,0);let o;if(18761===s)o=!0;else{if(19789!==s)throw new TypeError("Invalid byte order value.");o=!1}const a=r.getUint16(2,o);let l;if(42===a)l=!1;else{if(43!==a)throw new TypeError("Invalid magic number.");if(l=!0,8!==r.getUint16(4,o))throw new Error("Unsupported offset byte-size.")}const h=l?r.getUint64(8,o):r.getUint32(4,o);return new Fe(t,o,l,h,e)}close(){return"function"==typeof this.source.close&&this.source.close()}}class Ae extends Me{constructor(t,e){super(),this.mainFile=t,this.overviewFiles=e,this.imageFiles=[t].concat(e),this.fileDirectoriesPerFile=null,this.fileDirectoriesPerFileParsing=null,this.imageCount=null}async parseFileDirectoriesPerFile(){const t=[this.mainFile.parseFileDirectoryAt(this.mainFile.firstIFDOffset)].concat(this.overviewFiles.map((t=>t.parseFileDirectoryAt(t.firstIFDOffset))));return this.fileDirectoriesPerFile=await Promise.all(t),this.fileDirectoriesPerFile}async getImage(t=0){await this.getImageCount(),await this.parseFileDirectoriesPerFile();let e=0,i=0;for(let n=0;n<this.imageFiles.length;n++){const r=this.imageFiles[n];for(let s=0;s<this.imageCounts[n];s++){if(t===e){const t=await r.requestIFD(i);return new $t(t.fileDirectory,t.geoKeyDirectory,r.dataView,r.littleEndian,r.cache,r.source)}e++,i++}i=0}throw new RangeError("Invalid image index")}async getImageCount(){if(null!==this.imageCount)return this.imageCount;const t=[this.mainFile.getImageCount()].concat(this.overviewFiles.map((t=>t.getImageCount())));return this.imageCounts=await Promise.all(t),this.imageCount=this.imageCounts.reduce(((t,e)=>t+e),0),this.imageCount}}const Ze="undefined"!=typeof navigator&&navigator.hardwareConcurrency||2;var De=i(3983),Oe=i(44),ke=i(8375);function Ge(t,e){if(!t)return!1;if(!0===t)return!0;if(3!==e.getSamplesPerPixel())return!1;const i=e.fileDirectory.PhotometricInterpretation,n=Bt.Ie;return i===n.CMYK||i===n.YCbCr||i===n.CIELab||i===n.ICCLab}let ze;function Ne(){return ze||(ze=new class{constructor(t=Ze,e){this.workers=null,this._awaitingDecoder=null,this.size=t,this.messageId=0,t&&(this._awaitingDecoder=e?Promise.resolve(e):new Promise((t=>{i.e(831).then(i.bind(i,8831)).then((e=>{t(e.create)}))})),this._awaitingDecoder.then((e=>{this._awaitingDecoder=null,this.workers=[];for(let i=0;i<t;i++)this.workers.push({worker:e(),idle:!0})})))}async decode(t,e){return this._awaitingDecoder&&await this._awaitingDecoder,0===this.size?Wt(t).then((i=>i.decode(t,e))):new Promise((i=>{const n=this.workers.find((t=>t.idle))||this.workers[Math.floor(Math.random()*this.size)];n.idle=!1;const r=this.messageId++,s=t=>{t.data.id===r&&(n.idle=!0,i(t.data.decoded),n.worker.removeEventListener("message",s))};n.worker.addEventListener("message",s),n.worker.postMessage({fileDirectory:t,buffer:e,id:r},[e])}))}destroy(){this.workers&&(this.workers.forEach((t=>{t.worker.terminate()})),this.workers=null)}}),ze}function je(t){try{return t.getBoundingBox()}catch(e){return[0,0,t.getWidth(),t.getHeight()]}}function Ue(t){try{return t.getOrigin().slice(0,2)}catch(e){return[0,t.getHeight()]}}function Be(t,e){try{return t.getResolution(e)}catch(i){return[e.getWidth()/t.getWidth(),e.getHeight()/t.getHeight()]}}function Ve(t){const e=t.geoKeys;if(!e)return null;if(e.ProjectedCSTypeGeoKey&&32767!==e.ProjectedCSTypeGeoKey){const t="EPSG:"+e.ProjectedCSTypeGeoKey;let i=(0,h.get)(t);if(!i){const n=(0,ke.N)(e.ProjLinearUnitsGeoKey);n&&(i=new h.Projection({code:t,units:n}))}return i}if(e.GeographicTypeGeoKey&&32767!==e.GeographicTypeGeoKey){const t="EPSG:"+e.GeographicTypeGeoKey;let i=(0,h.get)(t);if(!i){const n=(0,ke.N)(e.GeogAngularUnitsGeoKey);n&&(i=new h.Projection({code:t,units:n}))}return i}return null}function qe(t){return t.getImageCount().then((function(e){const i=new Array(e);for(let n=0;n<e;++n)i[n]=t.getImage(n);return Promise.all(i)}))}function We(t,e){let i;return i=t.blob?async function(t,e){return Fe.fromSource(new Ce(t),e)}(t.blob):t.overviews?async function(t,e=[],i={},n){const r=await Fe.fromSource(Te(t,i),n),s=await Promise.all(e.map((t=>Fe.fromSource(Te(t,i)))));return new Ae(r,s)}(t.url,t.overviews,e):async function(t,e={},i){return Fe.fromSource(Te(t,e),i)}(t.url,e),i.then(qe)}function Xe(t,e,i,n,r){if(Array.isArray(t)){const s=t.length;if(!Array.isArray(e)||s!=e.length){const t=new Error(n);throw r(t),t}for(let o=0;o<s;++o)Xe(t[o],e[o],i,n,r)}else if(e=e,Math.abs(t-e)>i*t)throw new Error(n)}function He(t){return t instanceof Int8Array?-128:t instanceof Int16Array?-32768:t instanceof Int32Array?-2147483648:t instanceof Float32Array?12e-39:0}function Ye(t){return t instanceof Int8Array?127:t instanceof Uint8Array||t instanceof Uint8ClampedArray?255:t instanceof Int16Array?32767:t instanceof Uint16Array?65535:t instanceof Int32Array?2147483647:t instanceof Uint32Array?4294967295:t instanceof Float32Array?34e37:255}class Ke extends A{constructor(t){super({state:"loading",tileGrid:null,projection:null,opaque:t.opaque,transition:t.transition,interpolate:!1!==t.interpolate,wrapX:t.wrapX}),this.sourceInfo_=t.sources;const e=this.sourceInfo_.length;this.sourceOptions_=t.sourceOptions,this.sourceImagery_=new Array(e),this.sourceMasks_=new Array(e),this.resolutionFactors_=new Array(e),this.samplesPerPixel_,this.nodataValues_,this.metadata_,this.normalize_=!1!==t.normalize,this.addAlpha_=!1,this.error_=null,this.convertToRGB_=t.convertToRGB||!1,this.setKey(this.sourceInfo_.map((t=>t.url)).join(","));const i=this,n=new Array(e);for(let t=0;t<e;++t)n[t]=We(this.sourceInfo_[t],this.sourceOptions_);Promise.all(n).then((function(t){i.configure_(t)})).catch((function(t){(0,Oe.vU)(t),i.error_=t,i.setState("error")}))}getError(){return this.error_}determineProjection(t){const e=t[0];for(let t=e.length-1;t>=0;--t){const i=Ve(e[t]);if(i){this.projection=i;break}}}configure_(t){let e,i,n,s,o;const a=new Array(t.length),l=new Array(t.length),u=new Array(t.length);let c=0;const d=t.length;for(let h=0;h<d;++h){const d=[],g=[];t[h].forEach((t=>{4==(4&(t.fileDirectory.NewSubfileType||0))?g.push(t):d.push(t)}));const p=d.length;if(g.length>0&&g.length!==p)throw new Error(`Expected one mask per image found ${g.length} masks and ${p} images`);let f,m;const _=new Array(p),y=new Array(p),v=new Array(p);l[h]=new Array(p),u[h]=new Array(p);for(let t=0;t<p;++t){const e=d[t],i=e.getGDALNoData();u[h][t]=e.getGDALMetadata(0),l[h][t]=i;const n=this.sourceInfo_[h].bands;a[h]=n?n.length:e.getSamplesPerPixel();const r=p-(t+1);f||(f=je(e)),m||(m=Ue(e));const s=Be(e,d[0]);v[r]=s[0];const o=[e.getTileWidth(),e.getTileHeight()];o[0]!==o[1]&&o[1]<256&&(o[0]=256,o[1]=256),_[r]=o;const c=s[0]/Math.abs(s[1]);y[r]=[o[0],o[1]/c]}if(e?(0,r.getIntersection)(e,f,e):e=f,i?Xe(i,m,0,`Origin mismatch for source ${h}, got [${m}] but expected [${i}]`,this.viewRejector):i=m,o){o.length-c>v.length&&(c=o.length-v.length);const t=o[o.length-1]/v[v.length-1];this.resolutionFactors_[h]=t;const e=v.map((e=>e*t)),i=`Resolution mismatch for source ${h}, got [${e}] but expected [${o}]`;Xe(o.slice(c,o.length),e,.02,i,this.viewRejector)}else o=v,this.resolutionFactors_[h]=1;n?Xe(n.slice(c,n.length),y,.01,`Tile size mismatch for source ${h}`,this.viewRejector):n=y,s?Xe(s.slice(c,s.length),_,0,`Tile size mismatch for source ${h}`,this.viewRejector):s=_,this.sourceImagery_[h]=d.reverse(),this.sourceMasks_[h]=g.reverse()}for(let t=0,e=this.sourceImagery_.length;t<e;++t){const e=this.sourceImagery_[t];for(;e.length<o.length;)e.unshift(void 0)}this.getProjection()||this.determineProjection(t),this.samplesPerPixel_=a,this.nodataValues_=l,this.metadata_=u;t:for(let t=0;t<d;++t){if(void 0!==this.sourceInfo_[t].nodata){this.addAlpha_=!0;break}if(this.sourceMasks_[t].length){this.addAlpha_=!0;break}const e=l[t],i=this.sourceInfo_[t].bands;if(i){for(let t=0;t<i.length;++t)if(null!==e[i[t]-1]){this.addAlpha_=!0;break t}}else for(let t=0;t<e.length;++t)if(null!==e[t]){this.addAlpha_=!0;break t}}let g=this.addAlpha_?1:0;for(let t=0;t<d;++t)g+=a[t];this.bandCount=g;const p=new Z.Z({extent:e,minZoom:c,origin:i,resolutions:o,tileSizes:n});this.tileGrid=p,this.setTileSizes(s),this.setLoader(this.loadTile_.bind(this)),this.setState("ready"),2===o.length?o=[o[0],o[1],o[1]/2]:1===o.length&&(o=[2*o[0],o[0],o[0]/2]),this.viewResolver({showFullExtent:!0,projection:this.projection,resolutions:o,center:(0,h.toUserCoordinate)((0,r.getCenter)(e),this.projection),extent:(0,h.toUserExtent)(e,this.projection),zoom:1})}loadTile_(t,e,i){const n=this.getTileSize(t),r=this.sourceImagery_.length,s=new Array(2*r),o=this.nodataValues_,a=this.sourceInfo_,l=Ne();for(let h=0;h<r;++h){const u=a[h],c=this.resolutionFactors_[h],d=[Math.round(e*(n[0]*c)),Math.round(i*(n[1]*c)),Math.round((e+1)*(n[0]*c)),Math.round((i+1)*(n[1]*c))],g=this.sourceImagery_[h][t];let p,f;u.bands&&(p=u.bands.map((function(t){return t-1}))),f="nodata"in u&&null!==u.nodata?u.nodata:p?p.map((function(t){return o[h][t]})):o[h];const m={window:d,width:n[0],height:n[1],samples:p,fillValue:f,pool:l,interleave:!1};Ge(this.convertToRGB_,g)?s[h]=g.readRGB(m):s[h]=g.readRasters(m);const _=r+h,y=this.sourceMasks_[h][t];s[_]=y?y.readRasters({window:d,width:n[0],height:n[1],samples:[0],pool:l,interleave:!1}):Promise.resolve(null)}return Promise.all(s).then(this.composeTile_.bind(this,n)).catch((function(t){throw(0,Oe.vU)(t),t}))}composeTile_(t,e){const i=this.metadata_,n=this.sourceInfo_,r=this.sourceImagery_.length,s=this.bandCount,o=this.samplesPerPixel_,a=this.nodataValues_,l=this.normalize_,h=this.addAlpha_,u=t[0]*t[1],c=u*s;let d;d=l?new Uint8Array(c):new Float32Array(c);let g=0;for(let t=0;t<u;++t){let s=h;for(let u=0;u<r;++u){const c=n[u];let p,f,m=c.min,_=c.max;if(l){const t=i[u][0];void 0===m&&(m=t&&"STATISTICS_MINIMUM"in t?parseFloat(t.STATISTICS_MINIMUM):He(e[u][0])),void 0===_&&(_=t&&"STATISTICS_MAXIMUM"in t?parseFloat(t.STATISTICS_MAXIMUM):Ye(e[u][0])),p=255/(_-m),f=-m*p}for(let i=0;i<o[u];++i){const n=e[u][i][t];let r;if(r=l?(0,De.uZ)(p*n+f,0,255):n,h){let t=c.nodata;if(void 0===t){let e;e=c.bands?c.bands[i]-1:i,t=a[u][e]}const e=isNaN(t);(!e&&n!==t||e&&!isNaN(n))&&(s=!1,d[g]=r)}else d[g]=r;g++}if(!s){const i=e[r+u];i&&!i[0][t]&&(s=!0)}}h&&(s||(d[g]=255),g++)}return d}}Ke.prototype.getView;const $e=Ke;var Je=i(4768),Qe=i(825),ti=i(8326);class ei extends Qe.Z{constructor(t,e,i,n,r,s,o){super(e,i,n,r,s,o),this.zoomifyImage_=null,this.tileSize_=t}getImage(){if(this.zoomifyImage_)return this.zoomifyImage_;const t=super.getImage();if(this.state==I.Z.LOADED){const e=this.tileSize_;if(t.width==e[0]&&t.height==e[1])return this.zoomifyImage_=t,t;const i=(0,ti.E4)(e[0],e[1]);return i.drawImage(t,0,0),this.zoomifyImage_=i.canvas,i.canvas}return t}}class ii extends s.Z{constructor(t){const e=t.size,i=void 0!==t.tierSizeCalculation?t.tierSizeCalculation:"default",n=t.tilePixelRatio||1,s=e[0],a=e[1],l=[],h=t.tileSize||Je.S;let u=h*n;switch(i){case"default":for(;s>u||a>u;)l.push([Math.ceil(s/u),Math.ceil(a/u)]),u+=u;break;case"truncated":let t=s,e=a;for(;t>u||e>u;)l.push([Math.ceil(t/u),Math.ceil(e/u)]),t>>=1,e>>=1;break;default:(0,x.h)(!1,53)}l.push([1,1]),l.reverse();const c=[n],d=[0];for(let t=1,e=l.length;t<e;t++)c.push(n<<t),d.push(l[t-1][0]*l[t-1][1]+d[t-1]);c.reverse();const g=new Z.Z({tileSize:h,extent:t.extent||[0,-a,s,0],resolutions:c});let p=t.url;!p||p.includes("{TileGroup}")||p.includes("{tileIndex}")||(p+="{TileGroup}/{z}-{x}-{y}.jpg");const f=(0,o.Gk)(p);let m=h*n;const _=(0,o.Un)(f.map((function(t){return function(e,i,n){if(!e)return;const r=e[0],s=e[1],o=e[2],a=s+o*l[r][0],h={z:r,x:s,y:o,tileIndex:a,TileGroup:"TileGroup"+((a+d[r])/m|0)};return t.replace(/\{(\w+?)\}/g,(function(t,e){return h[e]}))}}))),y=ei.bind(null,(0,M.Pq)(h*n));super({attributions:t.attributions,cacheSize:t.cacheSize,crossOrigin:t.crossOrigin,interpolate:t.interpolate,projection:t.projection,tilePixelRatio:n,reprojectionErrorThreshold:t.reprojectionErrorThreshold,tileClass:y,tileGrid:g,tileUrlFunction:_,transition:t.transition}),this.zDirection=t.zDirection;const v=_(g.getTileCoordForCoordAndResolution((0,r.getCenter)(g.getExtent()),c[c.length-1]),1,null),E=new Image;E.addEventListener("error",(()=>{m=h,this.changed()})),E.src=v}}const ni=ii,ri="version1",si="version2",oi="version3",ai={version1:{level0:{supports:[],formats:[],qualities:["native"]},level1:{supports:["regionByPx","sizeByW","sizeByH","sizeByPct"],formats:["jpg"],qualities:["native"]},level2:{supports:["regionByPx","regionByPct","sizeByW","sizeByH","sizeByPct","sizeByConfinedWh","sizeByWh"],formats:["jpg","png"],qualities:["native","color","grey","bitonal"]}},version2:{level0:{supports:[],formats:["jpg"],qualities:["default"]},level1:{supports:["regionByPx","sizeByW","sizeByH","sizeByPct"],formats:["jpg"],qualities:["default"]},level2:{supports:["regionByPx","regionByPct","sizeByW","sizeByH","sizeByPct","sizeByConfinedWh","sizeByDistortedWh","sizeByWh"],formats:["jpg","png"],qualities:["default","bitonal"]}},version3:{level0:{supports:[],formats:["jpg"],qualities:["default"]},level1:{supports:["regionByPx","regionSquare","sizeByW","sizeByH","sizeByWh"],formats:["jpg"],qualities:["default"]},level2:{supports:["regionByPx","regionSquare","regionByPct","sizeByW","sizeByH","sizeByPct","sizeByConfinedWh","sizeByWh"],formats:["jpg","png"],qualities:["default"]}},none:{none:{supports:[],formats:[],qualities:[]}}},li={};function hi(t){return t.toLocaleString("en",{maximumFractionDigits:10})}li.version1=function(t){let e=t.getComplianceLevelSupportedFeatures();return void 0===e&&(e=ai.version1.level0),{url:void 0===t.imageInfo["@id"]?void 0:t.imageInfo["@id"].replace(/\/?(?:info\.json)?$/g,""),supports:e.supports,formats:[...e.formats,void 0===t.imageInfo.formats?[]:t.imageInfo.formats],qualities:[...e.qualities,void 0===t.imageInfo.qualities?[]:t.imageInfo.qualities],resolutions:t.imageInfo.scale_factors,tileSize:void 0!==t.imageInfo.tile_width?void 0!==t.imageInfo.tile_height?[t.imageInfo.tile_width,t.imageInfo.tile_height]:[t.imageInfo.tile_width,t.imageInfo.tile_width]:null!=t.imageInfo.tile_height?[t.imageInfo.tile_height,t.imageInfo.tile_height]:void 0}},li.version2=function(t){const e=t.getComplianceLevelSupportedFeatures(),i=Array.isArray(t.imageInfo.profile)&&t.imageInfo.profile.length>1,n=i&&t.imageInfo.profile[1].supports?t.imageInfo.profile[1].supports:[],r=i&&t.imageInfo.profile[1].formats?t.imageInfo.profile[1].formats:[],s=i&&t.imageInfo.profile[1].qualities?t.imageInfo.profile[1].qualities:[];return{url:t.imageInfo["@id"].replace(/\/?(?:info\.json)?$/g,""),sizes:void 0===t.imageInfo.sizes?void 0:t.imageInfo.sizes.map((function(t){return[t.width,t.height]})),tileSize:void 0===t.imageInfo.tiles?void 0:[t.imageInfo.tiles.map((function(t){return t.width}))[0],t.imageInfo.tiles.map((function(t){return void 0===t.height?t.width:t.height}))[0]],resolutions:void 0===t.imageInfo.tiles?void 0:t.imageInfo.tiles.map((function(t){return t.scaleFactors}))[0],supports:[...e.supports,...n],formats:[...e.formats,...r],qualities:[...e.qualities,...s]}},li.version3=function(t){const e=t.getComplianceLevelSupportedFeatures(),i=void 0===t.imageInfo.extraFormats?e.formats:[...e.formats,...t.imageInfo.extraFormats],n=void 0!==t.imageInfo.preferredFormats&&Array.isArray(t.imageInfo.preferredFormats)&&t.imageInfo.preferredFormats.length>0?t.imageInfo.preferredFormats.filter((function(t){return["jpg","png","gif"].includes(t)})).reduce((function(t,e){return void 0===t&&i.includes(e)?e:t}),void 0):void 0;return{url:t.imageInfo.id,sizes:void 0===t.imageInfo.sizes?void 0:t.imageInfo.sizes.map((function(t){return[t.width,t.height]})),tileSize:void 0===t.imageInfo.tiles?void 0:[t.imageInfo.tiles.map((function(t){return t.width}))[0],t.imageInfo.tiles.map((function(t){return t.height}))[0]],resolutions:void 0===t.imageInfo.tiles?void 0:t.imageInfo.tiles.map((function(t){return t.scaleFactors}))[0],supports:void 0===t.imageInfo.extraFeatures?e.supports:[...e.supports,...t.imageInfo.extraFeatures],formats:i,qualities:void 0===t.imageInfo.extraQualities?e.qualities:[...e.qualities,...t.imageInfo.extraQualities],preferredFormat:n}};class ui extends s.Z{constructor(t){const e=t||{};let i=e.url||"";i+=i.lastIndexOf("/")===i.length-1||""===i?"":"/";const n=e.version||si,s=e.sizes||[],o=e.size;(0,x.h)(null!=o&&Array.isArray(o)&&2==o.length&&!isNaN(o[0])&&o[0]>0&&!isNaN(o[1])&&o[1]>0,60);const a=o[0],l=o[1],h=e.tileSize,u=e.tilePixelRatio||1,c=e.format||"jpg",d=e.quality||(e.version==ri?"native":"default");let g=e.resolutions||[];const p=e.supports||[],f=e.extent||[0,-l,a,0],m=null!=s&&Array.isArray(s)&&s.length>0,_=void 0!==h&&("number"==typeof h&&Number.isInteger(h)&&h>0||Array.isArray(h)&&h.length>0),y=null!=p&&Array.isArray(p)&&(p.includes("regionByPx")||p.includes("regionByPct"))&&(p.includes("sizeByWh")||p.includes("sizeByH")||p.includes("sizeByW")||p.includes("sizeByPct"));let v,E,b;if(g.sort((function(t,e){return e-t})),_||y)if(null!=h&&("number"==typeof h&&Number.isInteger(h)&&h>0?(v=h,E=h):Array.isArray(h)&&h.length>0&&((1==h.length||null==h[1]&&Number.isInteger(h[0]))&&(v=h[0],E=h[0]),2==h.length&&(Number.isInteger(h[0])&&Number.isInteger(h[1])?(v=h[0],E=h[1]):null==h[0]&&Number.isInteger(h[1])&&(v=h[1],E=h[1])))),void 0!==v&&void 0!==E||(v=Je.S,E=Je.S),0==g.length){b=Math.max(Math.ceil(Math.log(a/v)/Math.LN2),Math.ceil(Math.log(l/E)/Math.LN2));for(let t=b;t>=0;t--)g.push(Math.pow(2,t))}else{const t=Math.max(...g);b=Math.round(Math.log(t)/Math.LN2)}else if(v=a,E=l,g=[],m){s.sort((function(t,e){return t[0]-e[0]})),b=-1;const t=[];for(let e=0;e<s.length;e++){const i=a/s[e][0];g.length>0&&g[g.length-1]==i?t.push(e):(g.push(i),b++)}if(t.length>0)for(let e=0;e<t.length;e++)s.splice(t[e]-e,1)}else g.push(1),s.push([a,l]),b=0;const w=new Z.Z({tileSize:[v,E],extent:f,origin:(0,r.getTopLeft)(f),resolutions:g}),S=ei.bind(null,(0,M.Pq)(h||256).map((function(t){return t*u})));super({attributions:e.attributions,attributionsCollapsible:e.attributionsCollapsible,cacheSize:e.cacheSize,crossOrigin:e.crossOrigin,interpolate:e.interpolate,projection:e.projection,reprojectionErrorThreshold:e.reprojectionErrorThreshold,state:e.state,tileClass:S,tileGrid:w,tilePixelRatio:e.tilePixelRatio,tileUrlFunction:function(t,e,r){let o,h;const u=t[0];if(u>b)return;const f=t[1],x=t[2],w=g[u];if(!(void 0===f||void 0===x||void 0===w||f<0||Math.ceil(a/w/v)<=f||x<0||Math.ceil(l/w/E)<=x)){if(y||_){const t=f*v*w,e=x*E*w;let i=v*w,r=E*w,s=v,u=E;t+i>a&&(i=a-t),e+r>l&&(r=l-e),t+v*w>a&&(s=Math.floor((a-t+w-1)/w)),e+E*w>l&&(u=Math.floor((l-e+w-1)/w)),0==t&&i==a&&0==e&&r==l?o="full":!y||p.includes("regionByPx")?o=t+","+e+","+i+","+r:p.includes("regionByPct")&&(o="pct:"+hi(t/a*100)+","+hi(e/l*100)+","+hi(i/a*100)+","+hi(r/l*100)),n!=oi||y&&!p.includes("sizeByWh")?!y||p.includes("sizeByW")?h=s+",":p.includes("sizeByH")?h=","+u:p.includes("sizeByWh")?h=s+","+u:p.includes("sizeByPct")&&(h="pct:"+hi(100/w)):h=s+","+u}else if(o="full",m){const t=s[u][0],e=s[u][1];h=n==oi?t==a&&e==l?"max":t+","+e:t==a?"full":t+","}else h=n==oi?"max":"full";return i+o+"/"+h+"/0/"+d+"."+c}},transition:e.transition}),this.zDirection=e.zDirection}}const ci=ui;var di=i(291),gi=i(553),pi=i(4773),fi=i(1798),mi=i(5476),_i=i(7161),yi=i(5818);class vi extends fi.Z{constructor(t,e,i,n,s,o,a){let l=t.getExtent();l&&t.canWrapX()&&(l=l.slice(),l[0]=-1/0,l[2]=1/0);let h=e.getExtent();h&&e.canWrapX()&&(h=h.slice(),h[0]=-1/0,h[2]=1/0);const u=h?(0,r.getIntersection)(i,h):i,c=(0,r.getCenter)(u),d=(0,_i.aA)(t,e,c,n),g=pi.m,p=new mi.Z(t,e,u,l,d*g,n),f=p.calculateSourceExtent(),m=(0,r.isEmpty)(f)?null:o(f,d,s),_=m?gi.Z.IDLE:gi.Z.EMPTY,y=m?m.getPixelRatio():1;super(i,n,y,_),this.targetProj_=e,this.maxSourceExtent_=l,this.triangulation_=p,this.targetResolution_=n,this.targetExtent_=i,this.sourceImage_=m,this.sourcePixelRatio_=y,this.interpolate_=a,this.canvas_=null,this.sourceListenerKey_=null}disposeInternal(){this.state==gi.Z.LOADING&&this.unlistenSource_(),super.disposeInternal()}getImage(){return this.canvas_}getProjection(){return this.targetProj_}reproject_(){const t=this.sourceImage_.getState();if(t==gi.Z.LOADED){const t=(0,r.getWidth)(this.targetExtent_)/this.targetResolution_,e=(0,r.getHeight)(this.targetExtent_)/this.targetResolution_;this.canvas_=(0,_i.sY)(t,e,this.sourcePixelRatio_,this.sourceImage_.getResolution(),this.maxSourceExtent_,this.targetResolution_,this.targetExtent_,this.triangulation_,[{extent:this.sourceImage_.getExtent(),image:this.sourceImage_.getImage()}],0,void 0,this.interpolate_)}this.state=t,this.changed()}load(){if(this.state==gi.Z.IDLE){this.state=gi.Z.LOADING,this.changed();const t=this.sourceImage_.getState();t==gi.Z.LOADED||t==gi.Z.ERROR?this.reproject_():(this.sourceListenerKey_=(0,yi.oL)(this.sourceImage_,f.Z.CHANGE,(function(t){const e=this.sourceImage_.getState();e!=gi.Z.LOADED&&e!=gi.Z.ERROR||(this.unlistenSource_(),this.reproject_())}),this),this.sourceImage_.load())}}unlistenSource_(){(0,yi.bN)(this.sourceListenerKey_),this.sourceListenerKey_=null}}const xi=vi;var Ei=i(8458),bi=i(5537);class wi extends di.ZP{constructor(t,e){super(t),this.image=e}}class Si extends Ei.Z{constructor(t){super({attributions:t.attributions,projection:t.projection,state:t.state,interpolate:void 0===t.interpolate||t.interpolate}),this.on,this.once,this.un,this.resolutions_=void 0!==t.resolutions?t.resolutions:null,this.reprojectedImage_=null,this.reprojectedRevision_=0}getResolutions(){return this.resolutions_}setResolutions(t){this.resolutions_=t}findNearestResolution(t){const e=this.getResolutions();return e&&(t=e[(0,bi.h7)(e,t,0)]),t}getImage(t,e,i,n){const s=this.getProjection();if(!s||!n||(0,h.equivalent)(s,n))return s&&(n=s),this.getImageInternal(t,e,i,n);if(this.reprojectedImage_){if(this.reprojectedRevision_==this.getRevision()&&(0,h.equivalent)(this.reprojectedImage_.getProjection(),n)&&this.reprojectedImage_.getResolution()==e&&(0,r.equals)(this.reprojectedImage_.getExtent(),t))return this.reprojectedImage_;this.reprojectedImage_.dispose(),this.reprojectedImage_=null}return this.reprojectedImage_=new xi(s,n,t,e,i,((t,e,i)=>this.getImageInternal(t,e,i,s)),this.getInterpolate()),this.reprojectedRevision_=this.getRevision(),this.reprojectedImage_}getImageInternal(t,e,i,n){return(0,E.O3)()}handleImageChange(t){const e=t.target;let i;switch(e.getState()){case gi.Z.LOADING:this.loading=!0,i="imageloadstart";break;case gi.Z.LOADED:this.loading=!1,i="imageloadend";break;case gi.Z.ERROR:this.loading=!1,i="imageloaderror";break;default:return}this.hasListener(i)&&this.dispatchEvent(new wi(i,e))}}function Ti(t,e){t.getImage().src=e}const Ci=Si;var Ri=i(8096);function Pi(t,e){const i=[];Object.keys(e).forEach((function(t){null!==e[t]&&void 0!==e[t]&&i.push(t+"="+encodeURIComponent(e[t]))}));const n=i.join("&");return t=t.replace(/[?&]$/,""),(t+=t.includes("?")?"&":"?")+n}const Ii=class extends Ci{constructor(t){super({attributions:(t=t||{}).attributions,interpolate:t.interpolate,projection:t.projection,resolutions:t.resolutions}),this.context_=(0,ti.E4)(1,1),this.crossOrigin_=void 0!==t.crossOrigin?t.crossOrigin:null,this.hidpi_=void 0===t.hidpi||t.hidpi,this.url_=t.url,this.imageLoadFunction_=void 0!==t.imageLoadFunction?t.imageLoadFunction:Ti,this.params_=t.params||{},this.image_=null,this.imageSize_=[0,0],this.renderedRevision_=0,this.ratio_=void 0!==t.ratio?t.ratio:1.5}getParams(){return this.params_}getImageInternal(t,e,i,n){if(void 0===this.url_)return null;e=this.findNearestResolution(e),i=this.hidpi_?i:1;const s=this.image_;if(s&&this.renderedRevision_==this.getRevision()&&s.getResolution()==e&&s.getPixelRatio()==i&&(0,r.containsExtent)(s.getExtent(),t))return s;const o={F:"image",FORMAT:"PNG32",TRANSPARENT:!0};Object.assign(o,this.params_);const a=((t=t.slice())[0]+t[2])/2,l=(t[1]+t[3])/2;if(1!=this.ratio_){const e=this.ratio_*(0,r.getWidth)(t)/2,i=this.ratio_*(0,r.getHeight)(t)/2;t[0]=a-e,t[1]=l-i,t[2]=a+e,t[3]=l+i}const h=e/i,u=Math.ceil((0,r.getWidth)(t)/h),c=Math.ceil((0,r.getHeight)(t)/h);t[0]=a-h*u/2,t[2]=a+h*u/2,t[1]=l-h*c/2,t[3]=l+h*c/2,this.imageSize_[0]=u,this.imageSize_[1]=c;const d=this.getRequestUrl_(t,this.imageSize_,i,n,o);return this.image_=new Ri.Z(t,e,i,d,this.crossOrigin_,this.imageLoadFunction_,this.context_),this.renderedRevision_=this.getRevision(),this.image_.addEventListener(f.Z.CHANGE,this.handleImageChange.bind(this)),this.image_}getImageLoadFunction(){return this.imageLoadFunction_}getRequestUrl_(t,e,i,n,r){const s=n.getCode().split(/:(?=\d+$)/).pop();r.SIZE=e[0]+","+e[1],r.BBOX=t.join(","),r.BBOXSR=s,r.IMAGESR=s,r.DPI=Math.round(90*i);const o=this.url_,a=o.replace(/MapServer\/?$/,"MapServer/export").replace(/ImageServer\/?$/,"ImageServer/exportImage");return a==o&&(0,x.h)(!1,50),Pi(a,r)}getUrl(){return this.url_}setImageLoadFunction(t){this.image_=null,this.imageLoadFunction_=t,this.changed()}setUrl(t){t!=this.url_&&(this.url_=t,this.image_=null,this.changed())}updateParams(t){Object.assign(this.params_,t),this.image_=null,this.changed()}};var Li=i(8294);const Mi=class extends Ci{constructor(t){super({attributions:(t=t||{}).attributions,interpolate:t.interpolate,projection:t.projection,resolutions:t.resolutions,state:t.state}),this.canvasFunction_=t.canvasFunction,this.canvas_=null,this.renderedRevision_=0,this.ratio_=void 0!==t.ratio?t.ratio:1.5}getImageInternal(t,e,i,n){e=this.findNearestResolution(e);let s=this.canvas_;if(s&&this.renderedRevision_==this.getRevision()&&s.getResolution()==e&&s.getPixelRatio()==i&&(0,r.containsExtent)(s.getExtent(),t))return s;t=t.slice(),(0,r.scaleFromCenter)(t,this.ratio_);const o=[(0,r.getWidth)(t)/e*i,(0,r.getHeight)(t)/e*i],a=this.canvasFunction_.call(this,t,e,i,o,n);return a&&(s=new Li.Z(t,e,i,a)),this.canvas_=s,this.renderedRevision_=this.getRevision(),s}},Fi=class extends Ci{constructor(t){super({interpolate:t.interpolate,projection:t.projection,resolutions:t.resolutions}),this.context_=(0,ti.E4)(1,1),this.crossOrigin_=void 0!==t.crossOrigin?t.crossOrigin:null,this.displayDpi_=void 0!==t.displayDpi?t.displayDpi:96,this.params_=t.params||{},this.url_=t.url,this.imageLoadFunction_=void 0!==t.imageLoadFunction?t.imageLoadFunction:Ti,this.hidpi_=void 0===t.hidpi||t.hidpi,this.metersPerUnit_=void 0!==t.metersPerUnit?t.metersPerUnit:1,this.ratio_=void 0!==t.ratio?t.ratio:1,this.useOverlay_=void 0!==t.useOverlay&&t.useOverlay,this.image_=null,this.renderedRevision_=0}getParams(){return this.params_}getImageInternal(t,e,i,n){e=this.findNearestResolution(e),i=this.hidpi_?i:1;let s=this.image_;if(s&&this.renderedRevision_==this.getRevision()&&s.getResolution()==e&&s.getPixelRatio()==i&&(0,r.containsExtent)(s.getExtent(),t))return s;1!=this.ratio_&&(t=t.slice(),(0,r.scaleFromCenter)(t,this.ratio_));const o=[(0,r.getWidth)(t)/e*i,(0,r.getHeight)(t)/e*i];if(void 0!==this.url_){const r=this.getUrl(this.url_,this.params_,t,o,n);s=new Ri.Z(t,e,i,r,this.crossOrigin_,this.imageLoadFunction_,this.context_),s.addEventListener(f.Z.CHANGE,this.handleImageChange.bind(this))}else s=null;return this.image_=s,this.renderedRevision_=this.getRevision(),s}getImageLoadFunction(){return this.imageLoadFunction_}updateParams(t){Object.assign(this.params_,t),this.changed()}getUrl(t,e,i,n,s){const o=function(t,e,i,n){const s=(0,r.getWidth)(t),o=(0,r.getHeight)(t),a=e[0],l=e[1],h=.0254/n;return l*s>a*o?s*i/(a*h):o*i/(l*h)}(i,n,this.metersPerUnit_,this.displayDpi_),a=(0,r.getCenter)(i),l={OPERATION:this.useOverlay_?"GETDYNAMICMAPOVERLAYIMAGE":"GETMAPIMAGE",VERSION:"2.0.0",LOCALE:"en",CLIENTAGENT:"ol/source/ImageMapGuide source",CLIP:"1",SETDISPLAYDPI:this.displayDpi_,SETDISPLAYWIDTH:Math.round(n[0]),SETDISPLAYHEIGHT:Math.round(n[1]),SETVIEWSCALE:o,SETVIEWCENTERX:a[0],SETVIEWCENTERY:a[1]};return Object.assign(l,e),Pi(t,l)}setImageLoadFunction(t){this.image_=null,this.imageLoadFunction_=t,this.changed()}},Ai=class extends Ci{constructor(t){const e=void 0!==t.crossOrigin?t.crossOrigin:null,i=void 0!==t.imageLoadFunction?t.imageLoadFunction:Ti;super({attributions:t.attributions,interpolate:t.interpolate,projection:(0,h.get)(t.projection)}),this.url_=t.url,this.imageExtent_=t.imageExtent,this.image_=new Ri.Z(this.imageExtent_,void 0,1,this.url_,e,i,(0,ti.E4)(1,1)),this.imageSize_=t.imageSize?t.imageSize:null,this.image_.addEventListener(f.Z.CHANGE,this.handleImageChange.bind(this))}getImageExtent(){return this.imageExtent_}getImageInternal(t,e,i,n){return(0,r.intersects)(t,this.image_.getExtent())?this.image_:null}getUrl(){return this.url_}handleImageChange(t){if(this.image_.getState()==gi.Z.LOADED){const t=this.image_.getExtent(),e=this.image_.getImage();let i,n;this.imageSize_?(i=this.imageSize_[0],n=this.imageSize_[1]):(i=e.width,n=e.height);const s=(0,r.getWidth)(t),o=(0,r.getHeight)(t),a=s/i,l=o/n;let h=i,u=n;if(a>l?h=Math.round(s/l):u=Math.round(o/a),h!==i||u!==n){const t=(0,ti.E4)(h,u);this.getInterpolate()||(t.imageSmoothingEnabled=!1);const r=t.canvas;t.drawImage(e,0,0,i,n,0,0,r.width,r.height),this.image_.setImage(r)}}super.handleImageChange(t)}},Zi="1.3.0";var Di=i(9871);const Oi=[101,101],ki=class extends Ci{constructor(t){super({attributions:(t=t||{}).attributions,interpolate:t.interpolate,projection:t.projection,resolutions:t.resolutions}),this.context_=(0,ti.E4)(1,1),this.crossOrigin_=void 0!==t.crossOrigin?t.crossOrigin:null,this.url_=t.url,this.imageLoadFunction_=void 0!==t.imageLoadFunction?t.imageLoadFunction:Ti,this.params_=Object.assign({},t.params),this.v13_=!0,this.updateV13_(),this.serverType_=t.serverType,this.hidpi_=void 0===t.hidpi||t.hidpi,this.image_=null,this.imageSize_=[0,0],this.renderedRevision_=0,this.ratio_=void 0!==t.ratio?t.ratio:1.5}getFeatureInfoUrl(t,e,i,n){if(void 0===this.url_)return;const s=(0,h.get)(i),o=this.getProjection();o&&o!==s&&(e=(0,_i.aA)(o,s,t,e),t=(0,h.transform)(t,s,o));const a=(0,r.getForViewAndSize)(t,e,0,Oi),l={SERVICE:"WMS",VERSION:Zi,REQUEST:"GetFeatureInfo",FORMAT:"image/png",TRANSPARENT:!0,QUERY_LAYERS:this.params_.LAYERS};Object.assign(l,this.params_,n);const u=(0,De.GW)((t[0]-a[0])/e,4),c=(0,De.GW)((a[3]-t[1])/e,4);return l[this.v13_?"I":"X"]=u,l[this.v13_?"J":"Y"]=c,this.getRequestUrl_(a,Oi,1,o||s,l)}getLegendUrl(t,e){if(void 0===this.url_)return;const i={SERVICE:"WMS",VERSION:Zi,REQUEST:"GetLegendGraphic",FORMAT:"image/png"};if(void 0===e||void 0===e.LAYER){const t=this.params_.LAYERS;if(Array.isArray(t)&&1!==t.length)return;i.LAYER=t}if(void 0!==t){const e=this.getProjection()?this.getProjection().getMetersPerUnit():1,n=28e-5;i.SCALE=t*e/n}return Object.assign(i,e),Pi(this.url_,i)}getParams(){return this.params_}getImageInternal(t,e,i,n){if(void 0===this.url_)return null;e=this.findNearestResolution(e),1==i||this.hidpi_&&void 0!==this.serverType_||(i=1);const s=e/i,o=(0,r.getCenter)(t),a=(0,De.mD)((0,r.getWidth)(t)/s,4),l=(0,De.mD)((0,r.getHeight)(t)/s,4),h=(0,r.getForViewAndSize)(o,s,0,[a,l]),u=a+2*(0,De.mD)((this.ratio_-1)*a/2,4),c=l+2*(0,De.mD)((this.ratio_-1)*l/2,4),d=(0,r.getForViewAndSize)(o,s,0,[u,c]),g=this.image_;if(g&&this.renderedRevision_==this.getRevision()&&g.getResolution()==e&&g.getPixelRatio()==i&&(0,r.containsExtent)(g.getExtent(),h))return g;const p={SERVICE:"WMS",VERSION:Zi,REQUEST:"GetMap",FORMAT:"image/png",TRANSPARENT:!0};Object.assign(p,this.params_),this.imageSize_[0]=(0,De.NM)((0,r.getWidth)(d)/s,4),this.imageSize_[1]=(0,De.NM)((0,r.getHeight)(d)/s,4);const m=this.getRequestUrl_(d,this.imageSize_,i,n,p);return this.image_=new Ri.Z(d,e,i,m,this.crossOrigin_,this.imageLoadFunction_,this.context_),this.renderedRevision_=this.getRevision(),this.image_.addEventListener(f.Z.CHANGE,this.handleImageChange.bind(this)),this.image_}getImageLoadFunction(){return this.imageLoadFunction_}getRequestUrl_(t,e,i,n,r){if((0,x.h)(void 0!==this.url_,9),r[this.v13_?"CRS":"SRS"]=n.getCode(),"STYLES"in this.params_||(r.STYLES=""),1!=i)switch(this.serverType_){case"geoserver":const t=90*i+.5|0;"FORMAT_OPTIONS"in r?r.FORMAT_OPTIONS+=";dpi:"+t:r.FORMAT_OPTIONS="dpi:"+t;break;case"mapserver":r.MAP_RESOLUTION=90*i;break;case"carmentaserver":case"qgis":r.DPI=90*i;break;default:(0,x.h)(!1,8)}r.WIDTH=e[0],r.HEIGHT=e[1];const s=n.getAxisOrientation();let o;return o=this.v13_&&"ne"==s.substr(0,2)?[t[1],t[0],t[3],t[2]]:t,r.BBOX=o.join(","),Pi(this.url_,r)}getUrl(){return this.url_}setImageLoadFunction(t){this.image_=null,this.imageLoadFunction_=t,this.changed()}setUrl(t){t!=this.url_&&(this.url_=t,this.image_=null,this.changed())}updateParams(t){Object.assign(this.params_,t),this.updateV13_(),this.image_=null,this.changed()}updateV13_(){const t=this.params_.VERSION||Zi;this.v13_=(0,Di.n)(t,"1.3")>=0}};var Gi=i(3315);const zi={"image/png":!0,"image/jpeg":!0,"image/gif":!0,"image/webp":!0},Ni={"application/vnd.mapbox-vector-tile":!0,"application/geo+json":!0};function ji(t,e,i,n){let s=t.projection;if(!s&&(s=(0,h.get)(e.crs),!s))throw new Error(`Unsupported CRS: ${e.crs}`);const o="en"!==s.getAxisOrientation().substr(0,2),a=e.tileMatrices,l={};for(let t=0;t<a.length;++t){const e=a[t];l[e.id]=e}const u={},c=[];if(n)for(let t=0;t<n.length;++t){const e=n[t],i=e.tileMatrix;c.push(i),u[i]=e}else for(let t=0;t<a.length;++t){const e=a[t].id;c.push(e)}const d=c.length,g=new Array(d),p=new Array(d),f=new Array(d),m=new Array(d),_=[-1/0,-1/0,1/0,1/0];for(let t=0;t<d;++t){const e=c[t],i=l[e],n=i.pointOfOrigin;g[t]=o?[n[1],n[0]]:n,p[t]=i.cellSize,f[t]=[i.matrixWidth,i.matrixHeight],m[t]=[i.tileWidth,i.tileHeight];const s=u[e];if(s){const e=i.cellSize*i.tileWidth,n=g[t][0]+s.minTileCol*e,o=g[t][0]+(s.maxTileCol+1)*e,a=i.cellSize*i.tileHeight;let l,h;"bottomLeft"===i.cornerOfOrigin?(l=g[t][1]+s.minTileRow*a,h=g[t][1]+(s.maxTileRow+1)*a):(l=g[t][1]-(s.maxTileRow+1)*a,h=g[t][1]-s.minTileRow*a),(0,r.getIntersection)(_,[n,l,o,h],_)}}const y=new Z.Z({origins:g,resolutions:p,sizes:f,tileSizes:m,extent:n?_:void 0}),v=t.context,x=t.url;return{grid:y,urlTemplate:i,urlFunction:function(t,e,r){if(!t)return;const s=c[t[0]],o=l[s],a="bottomLeft"===o.cornerOfOrigin,h={tileMatrix:s,tileCol:t[1],tileRow:a?-t[2]-1:t[2]};if(n){const t=u[o.id];if(h.tileCol<t.minTileCol||h.tileCol>t.maxTileCol||h.tileRow<t.minTileRow||h.tileRow>t.maxTileRow)return}Object.assign(h,v);const d=i.replace(/\{(\w+?)\}/g,(function(t,e){return h[e]}));return(0,Gi.Kk)(x,d)}}}function Ui(t){return(0,Gi.xA)(t.url).then((function(e){return function(t,e){const i=e.tileMatrixSetLimits;let n;if("map"===e.dataType)n=function(t,e){let i,n;for(let r=0;r<t.length;++r){const s=t[r];if("item"===s.rel){if(s.type===e){i=s.href;break}(zi[s.type]||!n&&s.type.startsWith("image/"))&&(n=s.href)}}if(!i){if(!n)throw new Error('Could not find "item" link');i=n}return i}(e.links,t.mediaType);else{if("vector"!==e.dataType)throw new Error('Expected tileset data type to be "map" or "vector"');n=function(t,e,i){let n,r;const s={};for(let i=0;i<t.length;++i){const o=t[i];if(s[o.type]=o.href,"item"===o.rel){if(o.type===e){n=o.href;break}Ni[o.type]&&(r=o.href)}}if(!n&&i)for(let t=0;t<i.length;++t){const e=i[t];if(s[e]){n=s[e];break}}if(!n){if(!r)throw new Error('Could not find "item" link');n=r}return n}(e.links,t.mediaType,t.supportedMediaTypes)}if(e.tileMatrixSet)return ji(t,e.tileMatrixSet,n,i);const r=e.links.find((t=>"http://www.opengis.net/def/rel/ogc/1.0/tiling-scheme"===t.rel));if(!r)throw new Error("Expected http://www.opengis.net/def/rel/ogc/1.0/tiling-scheme link or tileMatrixSet");const s=r.href,o=(0,Gi.Kk)(t.url,s);return(0,Gi.xA)(o).then((function(e){return ji(t,e,n,i)}))}(t,e)}))}class Bi extends s.Z{constructor(t){super({attributions:t.attributions,cacheSize:t.cacheSize,crossOrigin:t.crossOrigin,interpolate:t.interpolate,projection:t.projection,reprojectionErrorThreshold:t.reprojectionErrorThreshold,state:"loading",tileLoadFunction:t.tileLoadFunction,wrapX:void 0===t.wrapX||t.wrapX,transition:t.transition}),Ui({url:t.url,projection:this.getProjection(),mediaType:t.mediaType,context:t.context||null}).then(this.handleTileSetInfo_.bind(this)).catch(this.handleError_.bind(this))}handleTileSetInfo_(t){this.tileGrid=t.grid,this.setTileUrlFunction(t.urlFunction,t.urlTemplate),this.setState("ready")}handleError_(t){(0,Oe.vU)(t),this.setState("error")}}const Vi=Bi;var qi=i(3320);class Wi extends qi.Z{constructor(t){super({attributions:t.attributions,attributionsCollapsible:t.attributionsCollapsible,cacheSize:t.cacheSize,format:t.format,overlaps:t.overlaps,projection:t.projection,tileClass:t.tileClass,transition:t.transition,wrapX:t.wrapX,zDirection:t.zDirection,state:"loading"}),Ui({url:t.url,projection:this.getProjection(),mediaType:t.mediaType,supportedMediaTypes:t.format.supportedMediaTypes,context:t.context||null}).then(this.handleTileSetInfo_.bind(this)).catch(this.handleError_.bind(this))}handleTileSetInfo_(t){this.tileGrid=t.grid,this.setTileUrlFunction(t.urlFunction,t.urlTemplate),this.setState("ready")}handleError_(t){(0,Oe.vU)(t),this.setState("error")}}const Xi=Wi,Hi='&#169; <a href="https://www.openstreetmap.org/copyright" target="_blank">OpenStreetMap</a> contributors.',Yi=class extends g{constructor(t){let e;e=void 0!==(t=t||{}).attributions?t.attributions:[Hi];const i=void 0!==t.crossOrigin?t.crossOrigin:"anonymous",n=void 0!==t.url?t.url:"https://tile.openstreetmap.org/{z}/{x}/{y}.png";super({attributions:e,attributionsCollapsible:!1,cacheSize:t.cacheSize,crossOrigin:i,interpolate:t.interpolate,maxZoom:void 0!==t.maxZoom?t.maxZoom:19,opaque:void 0===t.opaque||t.opaque,reprojectionErrorThreshold:t.reprojectionErrorThreshold,tileLoadFunction:t.tileLoadFunction,transition:t.transition,url:n,wrapX:t.wrapX,zDirection:t.zDirection})}};var Ki=i(5431),$i=i(3028),Ji=i(1666),Qi=i(9882),tn=i(6101);let en,nn=!0;try{new ImageData(10,10)}catch(t){nn=!1}function rn(t){let e=!0;try{new ImageData(10,10)}catch(t){e=!1}function i(t,i,n){return e?new ImageData(t,i,n):{data:t,width:i,height:n}}return function(e){const n=e.buffers,r=e.meta,s=e.imageOps,o=e.width,a=e.height,l=n.length,h=n[0].byteLength;if(s){const e=new Array(l);for(let t=0;t<l;++t)e[t]=i(new Uint8ClampedArray(n[t]),o,a);return t(e,r).data.buffer}const u=new Uint8ClampedArray(h),c=new Array(l),d=new Array(l);for(let t=0;t<l;++t)c[t]=new Uint8ClampedArray(n[t]),d[t]=[0,0,0,0];for(let e=0;e<h;e+=4){for(let t=0;t<l;++t){const i=c[t];d[t][0]=i[e],d[t][1]=i[e+1],d[t][2]=i[e+2],d[t][3]=i[e+3]}const i=t(d,r);u[e]=i[0],u[e+1]=i[1],u[e+2]=i[2],u[e+3]=i[3]}return u.buffer}}function sn(t,e){const i=Object.keys(t.lib||{}).map((function(e){return"const "+e+" = "+t.lib[e].toString()+";"})).concat(["const __minion__ = ("+rn.toString()+")(",t.operation.toString(),");",'self.addEventListener("message", function(event) {',"  const buffer = __minion__(event.data);","  self.postMessage({buffer: buffer, meta: event.data.meta}, [buffer]);","});"]),n=new Worker("undefined"==typeof Blob?"data:text/javascript;base64,"+Buffer.from(i.join("\n"),"binary").toString("base64"):URL.createObjectURL(new Blob(i,{type:"text/javascript"})));return n.addEventListener("message",e),n}class on extends Ki.Z{constructor(t){let e;super(),this._imageOps=!!t.imageOps,e=0===t.threads?0:this._imageOps?1:t.threads||1;const i=new Array(e);if(e)for(let n=0;n<e;++n)i[n]=sn(t,this._onWorkerMessage.bind(this,n));else i[0]=function(t,e){const i=rn(t.operation);let n=!1;return{postMessage:function(t){setTimeout((function(){n||e({data:{buffer:i(t),meta:t.meta}})}),0)},terminate:function(){n=!0}}}(t,this._onWorkerMessage.bind(this,0));this._workers=i,this._queue=[],this._maxQueueLength=t.queue||1/0,this._running=0,this._dataLookup={},this._job=null}process(t,e,i){this._enqueue({inputs:t,meta:e,callback:i}),this._dispatch()}_enqueue(t){for(this._queue.push(t);this._queue.length>this._maxQueueLength;)this._queue.shift().callback(null,null)}_dispatch(){if(this._running||0===this._queue.length)return;const t=this._queue.shift();this._job=t;const e=t.inputs[0].width,i=t.inputs[0].height,n=t.inputs.map((function(t){return t.data.buffer})),r=this._workers.length;if(this._running=r,1===r)return void this._workers[0].postMessage({buffers:n,meta:t.meta,imageOps:this._imageOps,width:e,height:i},n);const s=t.inputs[0].data.length,o=4*Math.ceil(s/4/r);for(let s=0;s<r;++s){const r=s*o,a=[];for(let t=0,e=n.length;t<e;++t)a.push(n[t].slice(r,r+o));this._workers[s].postMessage({buffers:a,meta:t.meta,imageOps:this._imageOps,width:e,height:i},a)}}_onWorkerMessage(t,e){this.disposed||(this._dataLookup[t]=e.data,--this._running,0===this._running&&this._resolveJob())}_resolveJob(){const t=this._job,e=this._workers.length;let i,n;if(1===e)i=new Uint8ClampedArray(this._dataLookup[0].buffer),n=this._dataLookup[0].meta;else{const r=t.inputs[0].data.length;i=new Uint8ClampedArray(r),n=new Array(e);const s=4*Math.ceil(r/4/e);for(let t=0;t<e;++t){const e=this._dataLookup[t].buffer,r=t*s;i.set(new Uint8ClampedArray(e),r),n[t]=this._dataLookup[t].meta}}this._job=null,this._dataLookup={},t.callback(null,function(t,e,i){if(nn)return new ImageData(t,e,i);en||(en=document.createElement("canvas").getContext("2d"));const n=en.createImageData(e,i);return n.data.set(t),n}(i,t.inputs[0].width,t.inputs[0].height),n),this._dispatch()}disposeInternal(){for(let t=0;t<this._workers.length;++t)this._workers[t].terminate();this._workers.length=0}}class an extends di.ZP{constructor(t,e,i){super(t),this.extent=e.extent,this.resolution=e.viewState.resolution/e.pixelRatio,this.data=i}}class ln extends Ci{constructor(t){super({projection:null}),this.on,this.once,this.un,this.processor_=null,this.operationType_=void 0!==t.operationType?t.operationType:"pixel",this.threads_=void 0!==t.threads?t.threads:1,this.layers_=function(t){const e=t.length,i=new Array(e);for(let n=0;n<e;++n)i[n]=cn(t[n]);return i}(t.sources);const e=this.changed.bind(this);for(let t=0,i=this.layers_.length;t<i;++t)this.layers_[t].addEventListener(f.Z.CHANGE,e);var i;this.useResolutions_=null!==t.resolutions,this.tileQueue_=new Qi.Z((function(){return 1}),this.processSources_.bind(this)),this.requestedFrameState_,this.renderedImageCanvas_=null,this.renderedRevision_,this.frameState_={animate:!1,coordinateToPixelTransform:(0,tn.Ue)(),declutterTree:null,extent:null,index:0,layerIndex:0,layerStatesArray:(i=this.layers_,i.map((function(t){return t.getLayerState()}))),pixelRatio:1,pixelToCoordinateTransform:(0,tn.Ue)(),postRenderFunctions:[],size:[0,0],tileQueue:this.tileQueue_,time:Date.now(),usedTiles:{},viewState:{rotation:0},viewHints:[],wantedTiles:{},mapId:(0,E.sq)(this),renderTargets:{}},this.setAttributions((function(e){const i=[];for(let n=0,r=t.sources.length;n<r;++n){const r=t.sources[n],s=r instanceof Ei.Z?r:r.getSource();if(!s)continue;const o=s.getAttributions();if("function"==typeof o){const t=o(e);i.push.apply(i,t)}}return 0!==i.length?i:null})),void 0!==t.operation&&this.setOperation(t.operation,t.lib)}setOperation(t,e){this.processor_&&this.processor_.dispose(),this.processor_=new on({operation:t,imageOps:"image"===this.operationType_,queue:1,lib:e,threads:this.threads_}),this.changed()}updateFrameState_(t,e,i){const n=Object.assign({},this.frameState_);n.viewState=Object.assign({},n.viewState);const s=(0,r.getCenter)(t);n.size[0]=Math.ceil((0,r.getWidth)(t)/e),n.size[1]=Math.ceil((0,r.getHeight)(t)/e),n.extent=[s[0]-n.size[0]*e/2,s[1]-n.size[1]*e/2,s[0]+n.size[0]*e/2,s[1]+n.size[1]*e/2],n.time=Date.now();const o=n.viewState;return o.center=s,o.projection=i,o.resolution=e,n}allSourcesReady_(){let t,e=!0;for(let i=0,n=this.layers_.length;i<n;++i)if(t=this.layers_[i].getSource(),!t||"ready"!==t.getState()){e=!1;break}return e}getImage(t,e,i,n){if(!this.allSourcesReady_())return null;this.tileQueue_.loadMoreTiles(16,16),e=this.findNearestResolution(e);const s=this.updateFrameState_(t,e,n);if(this.requestedFrameState_=s,this.renderedImageCanvas_){const t=this.renderedImageCanvas_.getResolution(),i=this.renderedImageCanvas_.getExtent();e===t&&(0,r.equals)(s.extent,i)||(this.renderedImageCanvas_=null)}return this.renderedImageCanvas_&&this.getRevision()===this.renderedRevision_||this.processSources_(),s.animate&&requestAnimationFrame(this.changed.bind(this)),this.renderedImageCanvas_}processSources_(){const t=this.requestedFrameState_,e=this.layers_.length,i=new Array(e);for(let n=0;n<e;++n){t.layerIndex=n,t.renderTargets={};const e=un(this.layers_[n],t);if(!e)return;i[n]=e}const n={};this.dispatchEvent(new an("beforeoperations",t,n)),this.processor_.process(i,n,this.onWorkerComplete_.bind(this,t))}onWorkerComplete_(t,e,i,n){if(e||!i)return;const s=t.extent,o=t.viewState.resolution;if(o!==this.requestedFrameState_.viewState.resolution||!(0,r.equals)(s,this.requestedFrameState_.extent))return;let a;if(this.renderedImageCanvas_)a=this.renderedImageCanvas_.getImage().getContext("2d");else{const t=Math.round((0,r.getWidth)(s)/o),e=Math.round((0,r.getHeight)(s)/o);a=(0,ti.E4)(t,e),this.renderedImageCanvas_=new Li.Z(s,o,1,a.canvas)}a.putImageData(i,0,0),t.animate?requestAnimationFrame(this.changed.bind(this)):this.changed(),this.renderedRevision_=this.getRevision(),this.dispatchEvent(new an("afteroperations",t,n))}getResolutions(t){if(!this.useResolutions_)return null;let e=super.getResolutions();if(!e)for(let i=0,n=this.layers_.length;i<n&&(e=this.layers_[i].getSource().getResolutions(t),!e);++i);return e}disposeInternal(){this.processor_&&this.processor_.dispose(),super.disposeInternal()}}ln.prototype.dispose;let hn=null;function un(t,e){const i=t.getRenderer();if(!i)throw new Error("Unsupported layer type: "+t);if(!i.prepareFrame(e))return null;const n=e.size[0],r=e.size[1];if(0===n||0===r)return null;const s=i.renderFrame(e,null);let o;if(s instanceof HTMLCanvasElement)o=s;else{if(s&&(o=s.firstElementChild),!(o instanceof HTMLCanvasElement))throw new Error("Unsupported rendered element: "+o);if(o.width===n&&o.height===r)return o.getContext("2d").getImageData(0,0,n,r)}if(hn){const t=hn.canvas;t.width!==n||t.height!==r?hn=(0,ti.E4)(n,r,void 0,{willReadFrequently:!0}):hn.clearRect(0,0,n,r)}else hn=(0,ti.E4)(n,r,void 0,{willReadFrequently:!0});return hn.drawImage(o,0,0,n,r),hn.getImageData(0,0,n,r)}function cn(t){let e;return t instanceof Ei.Z?t instanceof P.Z?e=new Ji.Z({source:t}):t instanceof Ci&&(e=new $i.Z({source:t})):e=t,e}const dn=ln,gn=['Map tiles by <a href="https://stamen.com/" target="_blank">Stamen Design</a>, under <a href="https://creativecommons.org/licenses/by/3.0/" target="_blank">CC BY 3.0</a>.',Hi],pn={terrain:{extension:"png",opaque:!0},"terrain-background":{extension:"png",opaque:!0},"terrain-labels":{extension:"png",opaque:!1},"terrain-lines":{extension:"png",opaque:!1},"toner-background":{extension:"png",opaque:!0},toner:{extension:"png",opaque:!0},"toner-hybrid":{extension:"png",opaque:!1},"toner-labels":{extension:"png",opaque:!1},"toner-lines":{extension:"png",opaque:!1},"toner-lite":{extension:"png",opaque:!0},watercolor:{extension:"jpg",opaque:!0}},fn={terrain:{minZoom:0,maxZoom:18},toner:{minZoom:0,maxZoom:20},watercolor:{minZoom:0,maxZoom:18}},mn=class extends g{constructor(t){const e=t.layer.indexOf("-"),i=-1==e?t.layer:t.layer.slice(0,e),n=fn[i],r=pn[t.layer],s=void 0!==t.url?t.url:"https://stamen-tiles-{a-d}.a.ssl.fastly.net/"+t.layer+"/{z}/{x}/{y}."+r.extension;super({attributions:gn,cacheSize:t.cacheSize,crossOrigin:"anonymous",interpolate:t.interpolate,maxZoom:null!=t.maxZoom?t.maxZoom:n.maxZoom,minZoom:null!=t.minZoom?t.minZoom:n.minZoom,opaque:r.opaque,reprojectionErrorThreshold:t.reprojectionErrorThreshold,tileLoadFunction:t.tileLoadFunction,transition:t.transition,url:s,wrapX:t.wrapX,zDirection:t.zDirection})}};class _n extends s.Z{constructor(t){super({attributions:(t=t||{}).attributions,cacheSize:t.cacheSize,crossOrigin:t.crossOrigin,interpolate:t.interpolate,projection:t.projection,reprojectionErrorThreshold:t.reprojectionErrorThreshold,tileGrid:t.tileGrid,tileLoadFunction:t.tileLoadFunction,url:t.url,urls:t.urls,wrapX:void 0===t.wrapX||t.wrapX,transition:t.transition,zDirection:t.zDirection}),this.params_=t.params||{},this.hidpi_=void 0===t.hidpi||t.hidpi,this.tmpExtent_=(0,r.createEmpty)(),this.setKey(this.getKeyForParams_())}getKeyForParams_(){let t=0;const e=[];for(const i in this.params_)e[t++]=i+"-"+this.params_[i];return e.join("/")}getParams(){return this.params_}getRequestUrl_(t,e,i,n,r,s){const o=this.urls;if(!o)return;const l=r.getCode().split(/:(?=\d+$)/).pop();let h;return s.SIZE=e[0]+","+e[1],s.BBOX=i.join(","),s.BBOXSR=l,s.IMAGESR=l,s.DPI=Math.round(s.DPI?s.DPI*n:90*n),h=1==o.length?o[0]:o[(0,De.$W)((0,a.vp)(t),o.length)],Pi(h.replace(/MapServer\/?$/,"MapServer/export").replace(/ImageServer\/?$/,"ImageServer/exportImage"),s)}getTilePixelRatio(t){return this.hidpi_?t:1}updateParams(t){Object.assign(this.params_,t),this.setKey(this.getKeyForParams_())}tileUrlFunction(t,e,i){let n=this.getTileGrid();if(n||(n=this.getTileGridForProjection(i)),n.getResolutions().length<=t[0])return;1==e||this.hidpi_||(e=1);const r=n.getTileCoordExtent(t,this.tmpExtent_);let s=(0,M.Pq)(n.getTileSize(t[0]),this.tmpSize);1!=e&&(s=(0,M.bA)(s,e,this.tmpSize));const o={F:"image",FORMAT:"PNG32",TRANSPARENT:!0};return Object.assign(o,this.params_),this.getRequestUrl_(t,s,r,e,i,o)}}const yn=_n,vn=class extends g{constructor(t){super({opaque:!1,projection:(t=t||{}).projection,tileGrid:t.tileGrid,wrapX:void 0===t.wrapX||t.wrapX,zDirection:t.zDirection,url:t.template||"z:{z} x:{x} y:{y}",tileLoadFunction:(t,e)=>{const i=t.getTileCoord()[0],n=(0,M.Pq)(this.tileGrid.getTileSize(i)),r=(0,ti.E4)(n[0],n[1]);r.strokeStyle="grey",r.strokeRect(.5,.5,n[0]+.5,n[1]+.5),r.fillStyle="grey",r.strokeStyle="white",r.textAlign="center",r.textBaseline="middle",r.font="24px sans-serif",r.lineWidth=4,r.strokeText(e,n[0]/2,n[1]/2,n[0]),r.fillText(e,n[0]/2,n[1]/2,n[0]),t.setImage(r.canvas)}})}};var xn=i(902);class En extends s.Z{constructor(t){t=t||{};const e=Object.assign({},t.params),i=!("TRANSPARENT"in e)||e.TRANSPARENT;super({attributions:t.attributions,attributionsCollapsible:t.attributionsCollapsible,cacheSize:t.cacheSize,crossOrigin:t.crossOrigin,interpolate:t.interpolate,opaque:!i,projection:t.projection,reprojectionErrorThreshold:t.reprojectionErrorThreshold,tileClass:t.tileClass,tileGrid:t.tileGrid,tileLoadFunction:t.tileLoadFunction,url:t.url,urls:t.urls,wrapX:void 0===t.wrapX||t.wrapX,transition:t.transition,zDirection:t.zDirection}),this.gutter_=void 0!==t.gutter?t.gutter:0,this.params_=e,this.v13_=!0,this.serverType_=t.serverType,this.hidpi_=void 0===t.hidpi||t.hidpi,this.tmpExtent_=(0,r.createEmpty)(),this.updateV13_(),this.setKey(this.getKeyForParams_())}getFeatureInfoUrl(t,e,i,n){const s=(0,h.get)(i),o=this.getProjection();let a=this.getTileGrid();a||(a=this.getTileGridForProjection(s));const l=a.getZForResolution(e,this.zDirection),u=a.getTileCoordForCoordAndZ(t,l);if(a.getResolutions().length<=u[0])return;let c=a.getResolution(u[0]),d=a.getTileCoordExtent(u,this.tmpExtent_),g=(0,M.Pq)(a.getTileSize(u[0]),this.tmpSize);const p=this.gutter_;0!==p&&(g=(0,M.f3)(g,p,this.tmpSize),d=(0,r.buffer)(d,c*p,d)),o&&o!==s&&(c=(0,_i.aA)(o,s,t,c),d=(0,h.transformExtent)(d,s,o),t=(0,h.transform)(t,s,o));const f={SERVICE:"WMS",VERSION:Zi,REQUEST:"GetFeatureInfo",FORMAT:"image/png",TRANSPARENT:!0,QUERY_LAYERS:this.params_.LAYERS};Object.assign(f,this.params_,n);const m=Math.floor((t[0]-d[0])/c),_=Math.floor((d[3]-t[1])/c);return f[this.v13_?"I":"X"]=m,f[this.v13_?"J":"Y"]=_,this.getRequestUrl_(u,g,d,1,o||s,f)}getLegendUrl(t,e){if(void 0===this.urls[0])return;const i={SERVICE:"WMS",VERSION:Zi,REQUEST:"GetLegendGraphic",FORMAT:"image/png"};if(void 0===e||void 0===e.LAYER){const t=this.params_.LAYERS;if(Array.isArray(t)&&1!==t.length)return;i.LAYER=t}if(void 0!==t){const e=this.getProjection()?this.getProjection().getMetersPerUnit():1,n=28e-5;i.SCALE=t*e/n}return Object.assign(i,e),Pi(this.urls[0],i)}getGutter(){return this.gutter_}getParams(){return this.params_}getRequestUrl_(t,e,i,n,r,s){const o=this.urls;if(!o)return;if(s.WIDTH=e[0],s.HEIGHT=e[1],s[this.v13_?"CRS":"SRS"]=r.getCode(),"STYLES"in this.params_||(s.STYLES=""),1!=n)switch(this.serverType_){case"geoserver":const t=90*n+.5|0;"FORMAT_OPTIONS"in s?s.FORMAT_OPTIONS+=";dpi:"+t:s.FORMAT_OPTIONS="dpi:"+t;break;case"mapserver":s.MAP_RESOLUTION=90*n;break;case"carmentaserver":case"qgis":s.DPI=90*n;break;default:(0,x.h)(!1,52)}const l=r.getAxisOrientation(),h=i;if(this.v13_&&"ne"==l.substr(0,2)){let t;t=i[0],h[0]=i[1],h[1]=t,t=i[2],h[2]=i[3],h[3]=t}let u;return s.BBOX=h.join(","),u=1==o.length?o[0]:o[(0,De.$W)((0,a.vp)(t),o.length)],Pi(u,s)}getTilePixelRatio(t){return this.hidpi_&&void 0!==this.serverType_?t:1}getKeyForParams_(){let t=0;const e=[];for(const i in this.params_)e[t++]=i+"-"+this.params_[i];return e.join("/")}updateParams(t){Object.assign(this.params_,t),this.updateV13_(),this.setKey(this.getKeyForParams_())}updateV13_(){const t=this.params_.VERSION||Zi;this.v13_=(0,Di.n)(t,"1.3")>=0}tileUrlFunction(t,e,i){let n=this.getTileGrid();if(n||(n=this.getTileGridForProjection(i)),n.getResolutions().length<=t[0])return;1==e||this.hidpi_&&void 0!==this.serverType_||(e=1);const s=n.getResolution(t[0]);let o=n.getTileCoordExtent(t,this.tmpExtent_),a=(0,M.Pq)(n.getTileSize(t[0]),this.tmpSize);const l=this.gutter_;0!==l&&(a=(0,M.f3)(a,l,this.tmpSize),o=(0,r.buffer)(o,s*l,o)),1!=e&&(a=(0,M.bA)(a,e,this.tmpSize));const h={SERVICE:"WMS",VERSION:Zi,REQUEST:"GetMap",FORMAT:"image/png",TRANSPARENT:!0};return Object.assign(h,this.params_),this.getRequestUrl_(t,a,o,e,i,h)}}const bn=En;var wn=i(9939),Sn=i(4806);class Tn extends Sn.Z{constructor(t,e,i,n,r,s){super(t,e),this.src_=i,this.extent_=n,this.preemptive_=r,this.grid_=null,this.keys_=null,this.data_=null,this.jsonp_=s}getImage(){return null}getData(t){if(!this.grid_||!this.keys_)return null;const e=(t[0]-this.extent_[0])/(this.extent_[2]-this.extent_[0]),i=(t[1]-this.extent_[1])/(this.extent_[3]-this.extent_[1]),n=this.grid_[Math.floor((1-i)*this.grid_.length)];if("string"!=typeof n)return null;let r=n.charCodeAt(Math.floor(e*n.length));r>=93&&r--,r>=35&&r--,r-=32;let s=null;if(r in this.keys_){const t=this.keys_[r];s=this.data_&&t in this.data_?this.data_[t]:t}return s}forDataAtCoordinate(t,e,i){this.state==I.Z.EMPTY&&!0===i?(this.state=I.Z.IDLE,(0,yi.Vx)(this,f.Z.CHANGE,(function(i){e(this.getData(t))}),this),this.loadInternal_()):!0===i?setTimeout((()=>{e(this.getData(t))}),0):e(this.getData(t))}getKey(){return this.src_}handleError_(){this.state=I.Z.ERROR,this.changed()}handleLoad_(t){this.grid_=t.grid,this.keys_=t.keys,this.data_=t.data,this.state=I.Z.LOADED,this.changed()}loadInternal_(){if(this.state==I.Z.IDLE)if(this.state=I.Z.LOADING,this.jsonp_)(0,Gi.R6)(this.src_,this.handleLoad_.bind(this),this.handleError_.bind(this));else{const t=new XMLHttpRequest;t.addEventListener("load",this.onXHRLoad_.bind(this)),t.addEventListener("error",this.onXHRError_.bind(this)),t.open("GET",this.src_),t.send()}}onXHRLoad_(t){const e=t.target;if(!e.status||e.status>=200&&e.status<300){let t;try{t=JSON.parse(e.responseText)}catch(t){return void this.handleError_()}this.handleLoad_(t)}else this.handleError_()}onXHRError_(t){this.handleError_()}load(){this.preemptive_?this.loadInternal_():this.setState(I.Z.EMPTY)}}class Cn extends P.Z{constructor(t){if(super({projection:(0,h.get)("EPSG:3857"),state:"loading",zDirection:t.zDirection}),this.preemptive_=void 0===t.preemptive||t.preemptive,this.tileUrlFunction_=o.vU,this.template_=void 0,this.jsonp_=t.jsonp||!1,t.url)if(this.jsonp_)(0,Gi.R6)(t.url,this.handleTileJSONResponse.bind(this),this.handleTileJSONError.bind(this));else{const e=new XMLHttpRequest;e.addEventListener("load",this.onXHRLoad_.bind(this)),e.addEventListener("error",this.onXHRError_.bind(this)),e.open("GET",t.url),e.send()}else t.tileJSON?this.handleTileJSONResponse(t.tileJSON):(0,x.h)(!1,51)}onXHRLoad_(t){const e=t.target;if(!e.status||e.status>=200&&e.status<300){let t;try{t=JSON.parse(e.responseText)}catch(t){return void this.handleTileJSONError()}this.handleTileJSONResponse(t)}else this.handleTileJSONError()}onXHRError_(t){this.handleTileJSONError()}getTemplate(){return this.template_}forDataAtCoordinateAndResolution(t,e,i,n){if(this.tileGrid){const r=this.tileGrid.getZForResolution(e,this.zDirection),s=this.tileGrid.getTileCoordForCoordAndZ(t,r);this.getTile(s[0],s[1],s[2],1,this.getProjection()).forDataAtCoordinate(t,i,n)}else!0===n?setTimeout((function(){i(null)}),0):i(null)}handleTileJSONError(){this.setState("error")}handleTileJSONResponse(t){const e=(0,h.get)("EPSG:4326"),i=this.getProjection();let n;if(void 0!==t.bounds){const s=(0,h.getTransformFromProjections)(e,i);n=(0,r.applyTransform)(t.bounds,s)}const s=(0,l.Tl)(i),a=t.minzoom||0,u=t.maxzoom||22,c=(0,l.dl)({extent:s,maxZoom:u,minZoom:a});this.tileGrid=c,this.template_=t.template;const d=t.grids;if(d){if(this.tileUrlFunction_=(0,o.uR)(d,c),void 0!==t.attribution){const e=void 0!==n?n:s;this.setAttributions((function(i){return(0,r.intersects)(e,i.extent)?[t.attribution]:null}))}this.setState("ready")}else this.setState("error")}getTile(t,e,i,n,r){const s=(0,a.lg)(t,e,i);if(this.tileCache.containsKey(s))return this.tileCache.get(s);const o=[t,e,i],l=this.getTileCoordForTileUrlFunction(o,r),h=this.tileUrlFunction_(l,n,r),u=new Tn(o,void 0!==h?I.Z.IDLE:I.Z.EMPTY,void 0!==h?h:"",this.tileGrid.getTileCoordExtent(o),this.preemptive_,this.jsonp_);return this.tileCache.set(s,u),u}useTile(t,e,i){const n=(0,a.lg)(t,e,i);this.tileCache.containsKey(n)&&this.tileCache.get(n)}}const Rn=Cn;class Pn extends s.Z{constructor(t){const e=void 0!==t.requestEncoding?t.requestEncoding:"KVP",i=t.tileGrid;let n=t.urls;void 0===n&&void 0!==t.url&&(n=(0,o.Gk)(t.url)),super({attributions:t.attributions,attributionsCollapsible:t.attributionsCollapsible,cacheSize:t.cacheSize,crossOrigin:t.crossOrigin,interpolate:t.interpolate,projection:t.projection,reprojectionErrorThreshold:t.reprojectionErrorThreshold,tileClass:t.tileClass,tileGrid:i,tileLoadFunction:t.tileLoadFunction,tilePixelRatio:t.tilePixelRatio,urls:n,wrapX:void 0!==t.wrapX&&t.wrapX,transition:t.transition,zDirection:t.zDirection}),this.version_=void 0!==t.version?t.version:"1.0.0",this.format_=void 0!==t.format?t.format:"image/jpeg",this.dimensions_=void 0!==t.dimensions?t.dimensions:{},this.layer_=t.layer,this.matrixSet_=t.matrixSet,this.style_=t.style,this.requestEncoding_=e,this.setKey(this.getKeyForDimensions_()),n&&n.length>0&&(this.tileUrlFunction=(0,o.Un)(n.map(this.createFromWMTSTemplate.bind(this))))}setUrls(t){this.urls=t;const e=t.join("\n");this.setTileUrlFunction((0,o.Un)(t.map(this.createFromWMTSTemplate.bind(this))),e)}getDimensions(){return this.dimensions_}getFormat(){return this.format_}getLayer(){return this.layer_}getMatrixSet(){return this.matrixSet_}getRequestEncoding(){return this.requestEncoding_}getStyle(){return this.style_}getVersion(){return this.version_}getKeyForDimensions_(){const t=this.urls?this.urls.slice(0):[];for(const e in this.dimensions_)t.push(e+"-"+this.dimensions_[e]);return t.join("/")}updateDimensions(t){Object.assign(this.dimensions_,t),this.setKey(this.getKeyForDimensions_())}createFromWMTSTemplate(t){const e=this.requestEncoding_,i={layer:this.layer_,style:this.style_,tilematrixset:this.matrixSet_};"KVP"==e&&Object.assign(i,{Service:"WMTS",Request:"GetTile",Version:this.version_,Format:this.format_}),t="KVP"==e?Pi(t,i):t.replace(/\{(\w+?)\}/g,(function(t,e){return e.toLowerCase()in i?i[e.toLowerCase()]:t}));const n=this.tileGrid,r=this.dimensions_;return function(i,s,o){if(!i)return;const a={TileMatrix:n.getMatrixId(i[0]),TileCol:i[1],TileRow:i[2]};Object.assign(a,r);let l=t;return l="KVP"==e?Pi(l,a):l.replace(/\{(\w+?)\}/g,(function(t,e){return a[e]})),l}}}const In=Pn;function Ln(t,e){const i=new n.Z(32),s=t.getExtent();return function(n,o){i.expireCache(),s&&(n=(0,r.getIntersection)(s,n));const a=t.getZForResolution(o),l=[];return t.forEachTileCoord(n,a,(t=>{const n=t.toString();if(!i.containsKey(n)){const r=e(t);i.set(n,r)}l.push(i.get(n))})),l}}},8458:(t,e,i)=>{"use strict";i.d(e,{Z:()=>a});var n=i(2971),r=i(6121);class s extends n.Z{constructor(t){super(),this.projection=(0,r.get)(t.projection),this.attributions_=o(t.attributions),this.attributionsCollapsible_=void 0===t.attributionsCollapsible||t.attributionsCollapsible,this.loading=!1,this.state_=void 0!==t.state?t.state:"ready",this.wrapX_=void 0!==t.wrapX&&t.wrapX,this.interpolate_=!!t.interpolate,this.viewResolver=null,this.viewRejector=null;const e=this;this.viewPromise_=new Promise((function(t,i){e.viewResolver=t,e.viewRejector=i}))}getAttributions(){return this.attributions_}getAttributionsCollapsible(){return this.attributionsCollapsible_}getProjection(){return this.projection}getResolutions(t){return null}getView(){return this.viewPromise_}getState(){return this.state_}getWrapX(){return this.wrapX_}getInterpolate(){return this.interpolate_}refresh(){this.changed()}setAttributions(t){this.attributions_=o(t),this.changed()}setState(t){this.state_=t,this.changed()}}function o(t){return t?Array.isArray(t)?function(e){return t}:"function"==typeof t?t:function(e){return[t]}:null}const a=s},7302:(t,e,i)=>{"use strict";i.d(e,{Z:()=>f,s:()=>p});var n=i(291),r=i(8458),s=i(1702),o=i(7195),a=i(4187),l=i(9515),h=i(6121),u=i(8634),c=i(7248),d=i(4307);class g extends r.Z{constructor(t){super({attributions:t.attributions,attributionsCollapsible:t.attributionsCollapsible,projection:t.projection,state:t.state,wrapX:t.wrapX,interpolate:t.interpolate}),this.on,this.once,this.un,this.opaque_=void 0!==t.opaque&&t.opaque,this.tilePixelRatio_=void 0!==t.tilePixelRatio?t.tilePixelRatio:1,this.tileGrid=void 0!==t.tileGrid?t.tileGrid:null;this.tileGrid&&(0,d.Pq)(this.tileGrid.getTileSize(this.tileGrid.getMinZoom()),[256,256]),this.tileCache=new s.Z(t.cacheSize||0),this.tmpSize=[0,0],this.key_=t.key||"",this.tileOptions={transition:t.transition,interpolate:t.interpolate},this.zDirection=t.zDirection?t.zDirection:0}canExpireCache(){return this.tileCache.canExpireCache()}expireCache(t,e){const i=this.getTileCacheForProjection(t);i&&i.expireCache(e)}forEachLoadedTile(t,e,i,n){const r=this.getTileCacheForProjection(t);if(!r)return!1;let s,a,l,h=!0;for(let t=i.minX;t<=i.maxX;++t)for(let c=i.minY;c<=i.maxY;++c)a=(0,u.lg)(e,t,c),l=!1,r.containsKey(a)&&(s=r.get(a),l=s.getState()===o.Z.LOADED,l&&(l=!1!==n(s))),l||(h=!1);return h}getGutterForProjection(t){return 0}getKey(){return this.key_}setKey(t){this.key_!==t&&(this.key_=t,this.changed())}getOpaque(t){return this.opaque_}getResolutions(t){const e=t?this.getTileGridForProjection(t):this.tileGrid;return e?e.getResolutions():null}getTile(t,e,i,n,r){return(0,a.O3)()}getTileGrid(){return this.tileGrid}getTileGridForProjection(t){return this.tileGrid?this.tileGrid:(0,c.X$)(t)}getTileCacheForProjection(t){const e=this.getProjection();return(0,l.h)(null===e||(0,h.equivalent)(e,t),68),this.tileCache}getTilePixelRatio(t){return this.tilePixelRatio_}getTilePixelSize(t,e,i){const n=this.getTileGridForProjection(i),r=this.getTilePixelRatio(e),s=(0,d.Pq)(n.getTileSize(t),this.tmpSize);return 1==r?s:(0,d.bA)(s,r,this.tmpSize)}getTileCoordForTileUrlFunction(t,e){e=void 0!==e?e:this.getProjection();const i=this.getTileGridForProjection(e);return this.getWrapX()&&e.isGlobal()&&(t=(0,c.Cf)(i,t,e)),(0,u.tE)(t,i)?t:null}clear(){this.tileCache.clear()}refresh(){this.clear(),super.refresh()}updateCacheSize(t,e){const i=this.getTileCacheForProjection(e);t>i.highWaterMark&&(i.highWaterMark=t)}useTile(t,e,i,n){}}class p extends n.ZP{constructor(t,e){super(t),this.tile=e}}const f=g},8815:(t,e,i)=>{"use strict";i.d(e,{Z:()=>n});const n={TILELOADSTART:"tileloadstart",TILELOADEND:"tileloadend",TILELOADERROR:"tileloaderror"}},928:(t,e,i)=>{"use strict";i.d(e,{Z:()=>f});var n=i(5487),r=i(825),s=i(9494),o=i(1702),a=i(7195),l=i(9939),h=i(6121),u=i(8634),c=i(7248),d=i(4187);class g extends l.Z{constructor(t){super({attributions:t.attributions,cacheSize:t.cacheSize,opaque:t.opaque,projection:t.projection,state:t.state,tileGrid:t.tileGrid,tileLoadFunction:t.tileLoadFunction?t.tileLoadFunction:p,tilePixelRatio:t.tilePixelRatio,tileUrlFunction:t.tileUrlFunction,url:t.url,urls:t.urls,wrapX:t.wrapX,transition:t.transition,interpolate:void 0===t.interpolate||t.interpolate,key:t.key,attributionsCollapsible:t.attributionsCollapsible,zDirection:t.zDirection}),this.crossOrigin=void 0!==t.crossOrigin?t.crossOrigin:null,this.tileClass=void 0!==t.tileClass?t.tileClass:r.Z,this.tileCacheForProjection={},this.tileGridForProjection={},this.reprojectionErrorThreshold_=t.reprojectionErrorThreshold,this.renderReprojectionEdges_=!1}canExpireCache(){if(this.tileCache.canExpireCache())return!0;for(const t in this.tileCacheForProjection)if(this.tileCacheForProjection[t].canExpireCache())return!0;return!1}expireCache(t,e){const i=this.getTileCacheForProjection(t);this.tileCache.expireCache(this.tileCache==i?e:{});for(const t in this.tileCacheForProjection){const n=this.tileCacheForProjection[t];n.expireCache(n==i?e:{})}}getGutterForProjection(t){return this.getProjection()&&t&&!(0,h.equivalent)(this.getProjection(),t)?0:this.getGutter()}getGutter(){return 0}getKey(){let t=super.getKey();return this.getInterpolate()||(t+=":disable-interpolation"),t}getOpaque(t){return!(this.getProjection()&&t&&!(0,h.equivalent)(this.getProjection(),t))&&super.getOpaque(t)}getTileGridForProjection(t){const e=this.getProjection();if(this.tileGrid&&(!e||(0,h.equivalent)(e,t)))return this.tileGrid;const i=(0,d.sq)(t);return i in this.tileGridForProjection||(this.tileGridForProjection[i]=(0,c.X$)(t)),this.tileGridForProjection[i]}getTileCacheForProjection(t){const e=this.getProjection();if(!e||(0,h.equivalent)(e,t))return this.tileCache;const i=(0,d.sq)(t);return i in this.tileCacheForProjection||(this.tileCacheForProjection[i]=new o.Z(this.tileCache.highWaterMark)),this.tileCacheForProjection[i]}createTile_(t,e,i,r,s,o){const l=[t,e,i],h=this.getTileCoordForTileUrlFunction(l,s),u=h?this.tileUrlFunction(h,r,s):void 0,c=new this.tileClass(l,void 0!==u?a.Z.IDLE:a.Z.EMPTY,void 0!==u?u:"",this.crossOrigin,this.tileLoadFunction,this.tileOptions);return c.key=o,c.addEventListener(n.Z.CHANGE,this.handleTileChange.bind(this)),c}getTile(t,e,i,n,r){const o=this.getProjection();if(!o||!r||(0,h.equivalent)(o,r))return this.getTileInternal(t,e,i,n,o||r);const a=this.getTileCacheForProjection(r),l=[t,e,i];let c;const d=(0,u.km)(l);a.containsKey(d)&&(c=a.get(d));const g=this.getKey();if(c&&c.key==g)return c;const p=this.getTileGridForProjection(o),f=this.getTileGridForProjection(r),m=this.getTileCoordForTileUrlFunction(l,r),_=new s.Z(o,p,r,f,l,m,this.getTilePixelRatio(n),this.getGutter(),((t,e,i,n)=>this.getTileInternal(t,e,i,n,o)),this.reprojectionErrorThreshold_,this.renderReprojectionEdges_,this.getInterpolate());return _.key=g,c?(_.interimTile=c,_.refreshInterimChain(),a.replace(d,_)):a.set(d,_),_}getTileInternal(t,e,i,n,r){let s=null;const o=(0,u.lg)(t,e,i),l=this.getKey();if(this.tileCache.containsKey(o)){if(s=this.tileCache.get(o),s.key!=l){const h=s;s=this.createTile_(t,e,i,n,r,l),h.getState()==a.Z.IDLE?s.interimTile=h.interimTile:s.interimTile=h,s.refreshInterimChain(),this.tileCache.replace(o,s)}}else s=this.createTile_(t,e,i,n,r,l),this.tileCache.set(o,s);return s}setRenderReprojectionEdges(t){if(this.renderReprojectionEdges_!=t){this.renderReprojectionEdges_=t;for(const t in this.tileCacheForProjection)this.tileCacheForProjection[t].clear();this.changed()}}setTileGridForProjection(t,e){const i=(0,h.get)(t);if(i){const t=(0,d.sq)(i);t in this.tileGridForProjection||(this.tileGridForProjection[t]=e)}}clear(){super.clear();for(const t in this.tileCacheForProjection)this.tileCacheForProjection[t].clear()}}function p(t,e){t.getImage().src=e}const f=g},902:(t,e,i)=>{"use strict";i.d(e,{Z:()=>c});var n=i(928),r=i(8641),s=i(9515),o=i(7848),a=i(7248),l=i(6121),h=i(3315);class u extends n.Z{constructor(t){if(super({attributions:t.attributions,cacheSize:t.cacheSize,crossOrigin:t.crossOrigin,interpolate:t.interpolate,projection:(0,l.get)("EPSG:3857"),reprojectionErrorThreshold:t.reprojectionErrorThreshold,state:"loading",tileLoadFunction:t.tileLoadFunction,wrapX:void 0===t.wrapX||t.wrapX,transition:t.transition,zDirection:t.zDirection}),this.tileJSON_=null,this.tileSize_=t.tileSize,t.url)if(t.jsonp)(0,h.R6)(t.url,this.handleTileJSONResponse.bind(this),this.handleTileJSONError.bind(this));else{const e=new XMLHttpRequest;e.addEventListener("load",this.onXHRLoad_.bind(this)),e.addEventListener("error",this.onXHRError_.bind(this)),e.open("GET",t.url),e.send()}else t.tileJSON?this.handleTileJSONResponse(t.tileJSON):(0,s.h)(!1,51)}onXHRLoad_(t){const e=t.target;if(!e.status||e.status>=200&&e.status<300){let t;try{t=JSON.parse(e.responseText)}catch(t){return void this.handleTileJSONError()}this.handleTileJSONResponse(t)}else this.handleTileJSONError()}onXHRError_(t){this.handleTileJSONError()}getTileJSON(){return this.tileJSON_}handleTileJSONResponse(t){const e=(0,l.get)("EPSG:4326"),i=this.getProjection();let n;if(void 0!==t.bounds){const s=(0,l.getTransformFromProjections)(e,i);n=(0,r.applyTransform)(t.bounds,s)}const s=(0,a.Tl)(i),h=t.minzoom||0,u=t.maxzoom||22,c=(0,a.dl)({extent:s,maxZoom:u,minZoom:h,tileSize:this.tileSize_});if(this.tileGrid=c,this.tileUrlFunction=(0,o.uR)(t.tiles,c),t.attribution&&!this.getAttributions()){const e=void 0!==n?n:s;this.setAttributions((function(i){return(0,r.intersects)(e,i.extent)?[t.attribution]:null}))}this.tileJSON_=t,this.setState("ready")}handleTileJSONError(){this.setState("error")}}const c=u},9939:(t,e,i)=>{"use strict";i.d(e,{Z:()=>u});var n=i(8815),r=i(7302),s=i(7195),o=i(7848),a=i(8634),l=i(4187);class h extends r.Z{constructor(t){super({attributions:t.attributions,cacheSize:t.cacheSize,opaque:t.opaque,projection:t.projection,state:t.state,tileGrid:t.tileGrid,tilePixelRatio:t.tilePixelRatio,wrapX:t.wrapX,transition:t.transition,interpolate:t.interpolate,key:t.key,attributionsCollapsible:t.attributionsCollapsible,zDirection:t.zDirection}),this.generateTileUrlFunction_=this.tileUrlFunction===h.prototype.tileUrlFunction,this.tileLoadFunction=t.tileLoadFunction,t.tileUrlFunction&&(this.tileUrlFunction=t.tileUrlFunction),this.urls=null,t.urls?this.setUrls(t.urls):t.url&&this.setUrl(t.url),this.tileLoadingKeys_={}}getTileLoadFunction(){return this.tileLoadFunction}getTileUrlFunction(){return Object.getPrototypeOf(this).tileUrlFunction===this.tileUrlFunction?this.tileUrlFunction.bind(this):this.tileUrlFunction}getUrls(){return this.urls}handleTileChange(t){const e=t.target,i=(0,l.sq)(e),o=e.getState();let a;o==s.Z.LOADING?(this.tileLoadingKeys_[i]=!0,a=n.Z.TILELOADSTART):i in this.tileLoadingKeys_&&(delete this.tileLoadingKeys_[i],a=o==s.Z.ERROR?n.Z.TILELOADERROR:o==s.Z.LOADED?n.Z.TILELOADEND:void 0),null!=a&&this.dispatchEvent(new r.s(a,e))}setTileLoadFunction(t){this.tileCache.clear(),this.tileLoadFunction=t,this.changed()}setTileUrlFunction(t,e){this.tileUrlFunction=t,this.tileCache.pruneExceptNewestZ(),void 0!==e?this.setKey(e):this.changed()}setUrl(t){const e=(0,o.Gk)(t);this.urls=e,this.setUrls(e)}setUrls(t){this.urls=t;const e=t.join("\n");this.generateTileUrlFunction_?this.setTileUrlFunction((0,o.uR)(t,this.tileGrid),e):this.setKey(e)}tileUrlFunction(t,e,i){}useTile(t,e,i){const n=(0,a.lg)(t,e,i);this.tileCache.containsKey(n)&&this.tileCache.get(n)}}const u=h},2556:(t,e,i)=>{"use strict";i.d(e,{Z:()=>b});var n=i(8714),r=i(2071),s=i(291),o=i(5487),a=i(5990),l=i(9781),h=i(8458),u=i(2796),c=i(6885),d=i(4087),g=i(9515),p=i(8641),f=i(5537),m=i(4187),_=i(9374),y=i(5818),v=i(7537);class x extends s.ZP{constructor(t,e,i){super(t),this.feature=e,this.features=i}}class E extends h.Z{constructor(t){super({attributions:(t=t||{}).attributions,interpolate:!0,projection:void 0,state:"ready",wrapX:void 0===t.wrapX||t.wrapX}),this.on,this.once,this.un,this.loader_=c.Zn,this.format_=t.format,this.overlaps_=void 0===t.overlaps||t.overlaps,this.url_=t.url,void 0!==t.loader?this.loader_=t.loader:void 0!==this.url_&&((0,g.h)(this.format_,7),this.loader_=(0,v.Be)(this.url_,this.format_)),this.strategy_=void 0!==t.strategy?t.strategy:d.$6;const e=void 0===t.useSpatialIndex||t.useSpatialIndex;let i,r;this.featuresRtree_=e?new l.Z:null,this.loadedExtentsRtree_=new l.Z,this.loadingExtentsCount_=0,this.nullGeometryFeatures_={},this.idIndex_={},this.uidIndex_={},this.featureChangeKeys_={},this.featuresCollection_=null,Array.isArray(t.features)?r=t.features:t.features&&(i=t.features,r=i.getArray()),e||void 0!==i||(i=new n.Z(r)),void 0!==r&&this.addFeaturesInternal(r),void 0!==i&&this.bindFeaturesCollection_(i)}addFeature(t){this.addFeatureInternal(t),this.changed()}addFeatureInternal(t){const e=(0,m.sq)(t);if(!this.addToIndex_(e,t))return void(this.featuresCollection_&&this.featuresCollection_.remove(t));this.setupChangeEvents_(e,t);const i=t.getGeometry();if(i){const e=i.getExtent();this.featuresRtree_&&this.featuresRtree_.insert(e,t)}else this.nullGeometryFeatures_[e]=t;this.dispatchEvent(new x(u.Z.ADDFEATURE,t))}setupChangeEvents_(t,e){this.featureChangeKeys_[t]=[(0,y.oL)(e,o.Z.CHANGE,this.handleFeatureChange_,this),(0,y.oL)(e,a.Z.PROPERTYCHANGE,this.handleFeatureChange_,this)]}addToIndex_(t,e){let i=!0;const n=e.getId();return void 0!==n&&(n.toString()in this.idIndex_?i=!1:this.idIndex_[n.toString()]=e),i&&((0,g.h)(!(t in this.uidIndex_),30),this.uidIndex_[t]=e),i}addFeatures(t){this.addFeaturesInternal(t),this.changed()}addFeaturesInternal(t){const e=[],i=[],n=[];for(let e=0,n=t.length;e<n;e++){const n=t[e],r=(0,m.sq)(n);this.addToIndex_(r,n)&&i.push(n)}for(let t=0,r=i.length;t<r;t++){const r=i[t],s=(0,m.sq)(r);this.setupChangeEvents_(s,r);const o=r.getGeometry();if(o){const t=o.getExtent();e.push(t),n.push(r)}else this.nullGeometryFeatures_[s]=r}if(this.featuresRtree_&&this.featuresRtree_.load(e,n),this.hasListener(u.Z.ADDFEATURE))for(let t=0,e=i.length;t<e;t++)this.dispatchEvent(new x(u.Z.ADDFEATURE,i[t]))}bindFeaturesCollection_(t){let e=!1;this.addEventListener(u.Z.ADDFEATURE,(function(i){e||(e=!0,t.push(i.feature),e=!1)})),this.addEventListener(u.Z.REMOVEFEATURE,(function(i){e||(e=!0,t.remove(i.feature),e=!1)})),t.addEventListener(r.Z.ADD,(t=>{e||(e=!0,this.addFeature(t.element),e=!1)})),t.addEventListener(r.Z.REMOVE,(t=>{e||(e=!0,this.removeFeature(t.element),e=!1)})),this.featuresCollection_=t}clear(t){if(t){for(const t in this.featureChangeKeys_)this.featureChangeKeys_[t].forEach(y.bN);this.featuresCollection_||(this.featureChangeKeys_={},this.idIndex_={},this.uidIndex_={})}else if(this.featuresRtree_){const t=t=>{this.removeFeatureInternal(t)};this.featuresRtree_.forEach(t);for(const t in this.nullGeometryFeatures_)this.removeFeatureInternal(this.nullGeometryFeatures_[t])}this.featuresCollection_&&this.featuresCollection_.clear(),this.featuresRtree_&&this.featuresRtree_.clear(),this.nullGeometryFeatures_={};const e=new x(u.Z.CLEAR);this.dispatchEvent(e),this.changed()}forEachFeature(t){if(this.featuresRtree_)return this.featuresRtree_.forEach(t);this.featuresCollection_&&this.featuresCollection_.forEach(t)}forEachFeatureAtCoordinateDirect(t,e){const i=[t[0],t[1],t[0],t[1]];return this.forEachFeatureInExtent(i,(function(i){if(i.getGeometry().intersectsCoordinate(t))return e(i)}))}forEachFeatureInExtent(t,e){if(this.featuresRtree_)return this.featuresRtree_.forEachInExtent(t,e);this.featuresCollection_&&this.featuresCollection_.forEach(e)}forEachFeatureIntersectingExtent(t,e){return this.forEachFeatureInExtent(t,(function(i){if(i.getGeometry().intersectsExtent(t)){const t=e(i);if(t)return t}}))}getFeaturesCollection(){return this.featuresCollection_}getFeatures(){let t;return this.featuresCollection_?t=this.featuresCollection_.getArray().slice(0):this.featuresRtree_&&(t=this.featuresRtree_.getAll(),(0,_.x)(this.nullGeometryFeatures_)||(0,f.l7)(t,Object.values(this.nullGeometryFeatures_))),t}getFeaturesAtCoordinate(t){const e=[];return this.forEachFeatureAtCoordinateDirect(t,(function(t){e.push(t)})),e}getFeaturesInExtent(t,e){if(this.featuresRtree_){if(!(e&&e.canWrapX()&&this.getWrapX()))return this.featuresRtree_.getInExtent(t);const i=(0,p.wrapAndSliceX)(t,e);return[].concat(...i.map((t=>this.featuresRtree_.getInExtent(t))))}return this.featuresCollection_?this.featuresCollection_.getArray().slice(0):[]}getClosestFeatureToCoordinate(t,e){const i=t[0],n=t[1];let r=null;const s=[NaN,NaN];let o=1/0;const a=[-1/0,-1/0,1/0,1/0];return e=e||c.uX,this.featuresRtree_.forEachInExtent(a,(function(t){if(e(t)){const e=t.getGeometry(),l=o;if(o=e.closestPointXY(i,n,s,o),o<l){r=t;const e=Math.sqrt(o);a[0]=i-e,a[1]=n-e,a[2]=i+e,a[3]=n+e}}})),r}getExtent(t){return this.featuresRtree_.getExtent(t)}getFeatureById(t){const e=this.idIndex_[t.toString()];return void 0!==e?e:null}getFeatureByUid(t){const e=this.uidIndex_[t];return void 0!==e?e:null}getFormat(){return this.format_}getOverlaps(){return this.overlaps_}getUrl(){return this.url_}handleFeatureChange_(t){const e=t.target,i=(0,m.sq)(e),n=e.getGeometry();if(n){const t=n.getExtent();i in this.nullGeometryFeatures_?(delete this.nullGeometryFeatures_[i],this.featuresRtree_&&this.featuresRtree_.insert(t,e)):this.featuresRtree_&&this.featuresRtree_.update(t,e)}else i in this.nullGeometryFeatures_||(this.featuresRtree_&&this.featuresRtree_.remove(e),this.nullGeometryFeatures_[i]=e);const r=e.getId();if(void 0!==r){const t=r.toString();this.idIndex_[t]!==e&&(this.removeFromIdIndex_(e),this.idIndex_[t]=e)}else this.removeFromIdIndex_(e),this.uidIndex_[i]=e;this.changed(),this.dispatchEvent(new x(u.Z.CHANGEFEATURE,e))}hasFeature(t){const e=t.getId();return void 0!==e?e in this.idIndex_:(0,m.sq)(t)in this.uidIndex_}isEmpty(){return this.featuresRtree_?this.featuresRtree_.isEmpty()&&(0,_.x)(this.nullGeometryFeatures_):!this.featuresCollection_||0===this.featuresCollection_.getLength()}loadFeatures(t,e,i){const n=this.loadedExtentsRtree_,r=this.strategy_(t,e,i);for(let t=0,s=r.length;t<s;++t){const s=r[t];n.forEachInExtent(s,(function(t){return(0,p.containsExtent)(t.extent,s)}))||(++this.loadingExtentsCount_,this.dispatchEvent(new x(u.Z.FEATURESLOADSTART)),this.loader_.call(this,s,e,i,(t=>{--this.loadingExtentsCount_,this.dispatchEvent(new x(u.Z.FEATURESLOADEND,void 0,t))}),(()=>{--this.loadingExtentsCount_,this.dispatchEvent(new x(u.Z.FEATURESLOADERROR))})),n.insert(s,{extent:s.slice()}))}this.loading=!(this.loader_.length<4)&&this.loadingExtentsCount_>0}refresh(){this.clear(!0),this.loadedExtentsRtree_.clear(),super.refresh()}removeLoadedExtent(t){const e=this.loadedExtentsRtree_;let i;e.forEachInExtent(t,(function(e){if((0,p.equals)(e.extent,t))return i=e,!0})),i&&e.remove(i)}removeFeature(t){if(!t)return;const e=(0,m.sq)(t);e in this.nullGeometryFeatures_?delete this.nullGeometryFeatures_[e]:this.featuresRtree_&&this.featuresRtree_.remove(t),this.removeFeatureInternal(t)&&this.changed()}removeFeatureInternal(t){const e=(0,m.sq)(t),i=this.featureChangeKeys_[e];if(!i)return;i.forEach(y.bN),delete this.featureChangeKeys_[e];const n=t.getId();return void 0!==n&&delete this.idIndex_[n.toString()],delete this.uidIndex_[e],this.dispatchEvent(new x(u.Z.REMOVEFEATURE,t)),t}removeFromIdIndex_(t){let e=!1;for(const i in this.idIndex_)if(this.idIndex_[i]===t){delete this.idIndex_[i],e=!0;break}return e}setLoader(t){this.loader_=t}setUrl(t){(0,g.h)(this.format_,7),this.url_=t,this.setLoader((0,v.Be)(t,this.format_))}}const b=E},2796:(t,e,i)=>{"use strict";i.d(e,{Z:()=>n});const n={ADDFEATURE:"addfeature",CHANGEFEATURE:"changefeature",CLEAR:"clear",REMOVEFEATURE:"removefeature",FEATURESLOADSTART:"featuresloadstart",FEATURESLOADEND:"featuresloadend",FEATURESLOADERROR:"featuresloaderror"}},3320:(t,e,i)=>{"use strict";i.d(e,{I:()=>v,Z:()=>y});var n=i(5487),r=i(4759),s=i(1702),o=i(8738),a=i(7195),l=i(9939),h=i(2559),u=i(4768),c=i(8641),d=i(7248),g=i(8634),p=i(9374),f=i(7537),m=i(4307);class _ extends l.Z{constructor(t){const e=t.projection||"EPSG:3857",i=t.extent||(0,d.Tl)(e),n=t.tileGrid||(0,d.dl)({extent:i,maxResolution:t.maxResolution,maxZoom:void 0!==t.maxZoom?t.maxZoom:22,minZoom:t.minZoom,tileSize:t.tileSize||512});super({attributions:t.attributions,attributionsCollapsible:t.attributionsCollapsible,cacheSize:t.cacheSize,interpolate:!0,opaque:!1,projection:e,state:t.state,tileGrid:n,tileLoadFunction:t.tileLoadFunction?t.tileLoadFunction:v,tileUrlFunction:t.tileUrlFunction,url:t.url,urls:t.urls,wrapX:void 0===t.wrapX||t.wrapX,transition:t.transition,zDirection:void 0===t.zDirection?1:t.zDirection}),this.format_=t.format?t.format:null,this.sourceTileCache=new s.Z(this.tileCache.highWaterMark),this.overlaps_=null==t.overlaps||t.overlaps,this.tileClass=t.tileClass?t.tileClass:r.Z,this.tileGrids_={}}getFeaturesInExtent(t){const e=[],i=this.tileCache;if(0===i.getCount())return e;const n=(0,g.Ul)(i.peekFirstKey())[0],r=this.tileGrid;return i.forEach((function(i){if(i.tileCoord[0]!==n||i.getState()!==a.Z.LOADED)return;const s=i.getSourceTiles();for(let i=0,n=s.length;i<n;++i){const n=s[i],o=n.tileCoord;if((0,c.intersects)(t,r.getTileCoordExtent(o))){const i=n.getFeatures();if(i)for(let n=0,r=i.length;n<r;++n){const r=i[n],s=r.getGeometry();(0,c.intersects)(t,s.getExtent())&&e.push(r)}}}})),e}getOverlaps(){return this.overlaps_}clear(){this.tileCache.clear(),this.sourceTileCache.clear()}expireCache(t,e){const i=this.getTileCacheForProjection(t),n=Object.keys(e).reduce(((t,e)=>{const n=(0,g.MY)(e),r=i.peek(n);if(r){const e=r.sourceTiles;for(let i=0,n=e.length;i<n;++i)t[e[i].getKey()]=!0}return t}),{});super.expireCache(t,e),this.sourceTileCache.expireCache(n)}getSourceTiles(t,e,i){if(i.getState()===a.Z.IDLE){i.setState(a.Z.LOADING);const r=i.wrappedTileCoord,s=this.getTileGridForProjection(e),o=s.getTileCoordExtent(r),l=r[0],h=s.getResolution(l);(0,c.buffer)(o,-h,o);const u=this.tileGrid,d=u.getExtent();d&&(0,c.getIntersection)(o,d,o);const g=u.getZForResolution(h,this.zDirection);u.forEachTileCoord(o,g,(r=>{const s=this.tileUrlFunction(r,t,e),o=this.sourceTileCache.containsKey(s)?this.sourceTileCache.get(s):new this.tileClass(r,s?a.Z.IDLE:a.Z.EMPTY,s,this.format_,this.tileLoadFunction);i.sourceTiles.push(o);const l=o.getState();if(l<a.Z.LOADED){const t=e=>{this.handleTileChange(e);const r=o.getState();if(r===a.Z.LOADED||r===a.Z.ERROR){const e=o.getKey();e in i.errorTileKeys?o.getState()===a.Z.LOADED&&delete i.errorTileKeys[e]:i.loadingSourceTiles--,r===a.Z.ERROR?i.errorTileKeys[e]=!0:o.removeEventListener(n.Z.CHANGE,t),0===i.loadingSourceTiles&&i.setState((0,p.x)(i.errorTileKeys)?a.Z.LOADED:a.Z.ERROR)}};o.addEventListener(n.Z.CHANGE,t),i.loadingSourceTiles++}l===a.Z.IDLE&&(o.extent=u.getTileCoordExtent(r),o.projection=e,o.resolution=u.getResolution(r[0]),this.sourceTileCache.set(s,o),o.load())})),i.loadingSourceTiles||i.setState(i.sourceTiles.some((t=>t.getState()===a.Z.ERROR))?a.Z.ERROR:a.Z.LOADED)}return i.sourceTiles}getTile(t,e,i,n,r){const s=(0,g.lg)(t,e,i),o=this.getKey();let l;if(this.tileCache.containsKey(s)&&(l=this.tileCache.get(s),l.key===o))return l;const u=[t,e,i];let d=this.getTileCoordForTileUrlFunction(u,r);const p=this.getTileGrid().getExtent(),f=this.getTileGridForProjection(r);if(d&&p){const e=f.getTileCoordExtent(d);(0,c.buffer)(e,-f.getResolution(t),e),(0,c.intersects)(p,e)||(d=null)}let m=!0;if(null!==d){const e=this.tileGrid,i=f.getResolution(t),s=e.getZForResolution(i,1),o=f.getTileCoordExtent(d);(0,c.buffer)(o,-i,o),e.forEachTileCoord(o,s,(t=>{m=m&&!this.tileUrlFunction(t,n,r)}))}const _=new h.Z(u,m?a.Z.EMPTY:a.Z.IDLE,d,this.getSourceTiles.bind(this,n,r));return _.key=o,l?(_.interimTile=l,_.refreshInterimChain(),this.tileCache.replace(s,_)):this.tileCache.set(s,_),_}getTileGridForProjection(t){const e=t.getCode();let i=this.tileGrids_[e];if(!i){const t=this.tileGrid,n=t.getResolutions().slice(),r=n.map((function(e,i){return t.getOrigin(i)})),s=n.map((function(e,i){return t.getTileSize(i)})),a=u.e+1;for(let t=n.length;t<a;++t)n.push(n[t-1]/2),r.push(r[t-1]),s.push(s[t-1]);i=new o.Z({extent:t.getExtent(),origins:r,resolutions:n,tileSizes:s}),this.tileGrids_[e]=i}return i}getTilePixelRatio(t){return t}getTilePixelSize(t,e,i){const n=this.getTileGridForProjection(i),r=(0,m.Pq)(n.getTileSize(t),this.tmpSize);return[Math.round(r[0]*e),Math.round(r[1]*e)]}updateCacheSize(t,e){super.updateCacheSize(2*t,e),this.sourceTileCache.highWaterMark=this.getTileCacheForProjection(e).highWaterMark}}const y=_;function v(t,e){t.setLoader((function(i,n,r){(0,f.ov)(e,t.getFormat(),i,n,r,t.onLoad.bind(t),t.onError.bind(t))}))}},7580:(t,e,i)=>{"use strict";i.d(e,{Sp:()=>s,cv:()=>o});var n=i(3983);const r=6371008.8;function s(t,e,i){i=i||r;const s=(0,n.Yr)(t[1]),o=(0,n.Yr)(e[1]),a=(o-s)/2,l=(0,n.Yr)(e[0]-t[0])/2,h=Math.sin(a)*Math.sin(a)+Math.sin(l)*Math.sin(l)*Math.cos(s)*Math.cos(o);return 2*i*Math.atan2(Math.sqrt(h),Math.sqrt(1-h))}function o(t,e,i,s){s=s||r;const o=(0,n.Yr)(t[1]),a=(0,n.Yr)(t[0]),l=e/s,h=Math.asin(Math.sin(o)*Math.cos(l)+Math.cos(o)*Math.sin(l)*Math.cos(i)),u=a+Math.atan2(Math.sin(i)*Math.sin(l)*Math.cos(o),Math.cos(l)-Math.sin(o)*Math.sin(h));return[(0,n.Ux)(u),(0,n.Ux)(h)]}},9871:(t,e,i)=>{"use strict";function n(t,e,i){const n=void 0!==i?t.toFixed(i):""+t;let r=n.indexOf(".");return r=-1===r?n.length:r,r>e?n:new Array(1+e-r).join("0")+n}function r(t,e){const i=(""+t).split("."),n=(""+e).split(".");for(let t=0;t<Math.max(i.length,n.length);t++){const e=parseInt(i[t]||"0",10),r=parseInt(n[t]||"0",10);if(e>r)return 1;if(r>e)return-1}return 0}i.d(e,{n:()=>r,v:()=>n})},6131:(t,e,i)=>{"use strict";i.d(e,{Z:()=>r});var n=i(9515);const r=class{constructor(t){this.highWaterMark=void 0!==t?t:2048,this.count_=0,this.entries_={},this.oldest_=null,this.newest_=null}canExpireCache(){return this.highWaterMark>0&&this.getCount()>this.highWaterMark}expireCache(t){for(;this.canExpireCache();)this.pop()}clear(){this.count_=0,this.entries_={},this.oldest_=null,this.newest_=null}containsKey(t){return this.entries_.hasOwnProperty(t)}forEach(t){let e=this.oldest_;for(;e;)t(e.value_,e.key_,this),e=e.newer}get(t,e){const i=this.entries_[t];return(0,n.h)(void 0!==i,15),i===this.newest_||(i===this.oldest_?(this.oldest_=this.oldest_.newer,this.oldest_.older=null):(i.newer.older=i.older,i.older.newer=i.newer),i.newer=null,i.older=this.newest_,this.newest_.newer=i,this.newest_=i),i.value_}remove(t){const e=this.entries_[t];return(0,n.h)(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_}getCount(){return this.count_}getKeys(){const t=new Array(this.count_);let e,i=0;for(e=this.newest_;e;e=e.older)t[i++]=e.key_;return t}getValues(){const t=new Array(this.count_);let e,i=0;for(e=this.newest_;e;e=e.older)t[i++]=e.value_;return t}peekLast(){return this.oldest_.value_}peekLastKey(){return this.oldest_.key_}peekFirstKey(){return this.newest_.key_}peek(t){if(this.containsKey(t))return this.entries_[t].value_}pop(){const 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_}replace(t,e){this.get(t),this.entries_[t].value_=e}set(t,e){(0,n.h)(!(t in this.entries_),16);const i={key_:t,newer:null,older:this.newest_,value_:e};this.newest_?this.newest_.newer=i:this.oldest_=i,this.newest_=i,this.entries_[t]=i,++this.count_}setSize(t){this.highWaterMark=t}}},2729:(t,e,i)=>{"use strict";i.d(e,{Z:()=>o,r:()=>s});var n=i(9515),r=i(9374);const s=1/0,o=class{constructor(t,e){this.priorityFunction_=t,this.keyFunction_=e,this.elements_=[],this.priorities_=[],this.queuedElements_={}}clear(){this.elements_.length=0,this.priorities_.length=0,(0,r.Z)(this.queuedElements_)}dequeue(){const t=this.elements_,e=this.priorities_,i=t[0];1==t.length?(t.length=0,e.length=0):(t[0]=t.pop(),e[0]=e.pop(),this.siftUp_(0));const n=this.keyFunction_(i);return delete this.queuedElements_[n],i}enqueue(t){(0,n.h)(!(this.keyFunction_(t)in this.queuedElements_),31);const e=this.priorityFunction_(t);return e!=s&&(this.elements_.push(t),this.priorities_.push(e),this.queuedElements_[this.keyFunction_(t)]=!0,this.siftDown_(0,this.elements_.length-1),!0)}getCount(){return this.elements_.length}getLeftChildIndex_(t){return 2*t+1}getRightChildIndex_(t){return 2*t+2}getParentIndex_(t){return t-1>>1}heapify_(){let t;for(t=(this.elements_.length>>1)-1;t>=0;t--)this.siftUp_(t)}isEmpty(){return 0===this.elements_.length}isKeyQueued(t){return t in this.queuedElements_}isQueued(t){return this.isKeyQueued(this.keyFunction_(t))}siftUp_(t){const e=this.elements_,i=this.priorities_,n=e.length,r=e[t],s=i[t],o=t;for(;t<n>>1;){const r=this.getLeftChildIndex_(t),s=this.getRightChildIndex_(t),o=s<n&&i[s]<i[r]?s:r;e[t]=e[o],i[t]=i[o],t=o}e[t]=r,i[t]=s,this.siftDown_(o,t)}siftDown_(t,e){const i=this.elements_,n=this.priorities_,r=i[e],s=n[e];for(;e>t;){const t=this.getParentIndex_(e);if(!(n[t]>s))break;i[e]=i[t],n[e]=n[t],e=t}i[e]=r,n[e]=s}reprioritize(){const t=this.priorityFunction_,e=this.elements_,i=this.priorities_;let n=0;const r=e.length;let o,a,l;for(a=0;a<r;++a)o=e[a],l=t(o),l==s?delete this.queuedElements_[this.keyFunction_(o)]:(i[n]=l,e[n++]=o);e.length=n,i.length=n,this.heapify_()}}},9781:(t,e,i)=>{"use strict";i.d(e,{Z:()=>a});var n=i(2582),r=i(8641),s=i(4187),o=i(9374);const a=class{constructor(t){this.rbush_=new n(t),this.items_={}}insert(t,e){const i={minX:t[0],minY:t[1],maxX:t[2],maxY:t[3],value:e};this.rbush_.insert(i),this.items_[(0,s.sq)(e)]=i}load(t,e){const i=new Array(e.length);for(let n=0,r=e.length;n<r;n++){const r=t[n],o=e[n],a={minX:r[0],minY:r[1],maxX:r[2],maxY:r[3],value:o};i[n]=a,this.items_[(0,s.sq)(o)]=a}this.rbush_.load(i)}remove(t){const e=(0,s.sq)(t),i=this.items_[e];return delete this.items_[e],null!==this.rbush_.remove(i)}update(t,e){const i=this.items_[(0,s.sq)(e)],n=[i.minX,i.minY,i.maxX,i.maxY];(0,r.equals)(n,t)||(this.remove(e),this.insert(t,e))}getAll(){return this.rbush_.all().map((function(t){return t.value}))}getInExtent(t){const e={minX:t[0],minY:t[1],maxX:t[2],maxY:t[3]};return this.rbush_.search(e).map((function(t){return t.value}))}forEach(t){return this.forEach_(this.getAll(),t)}forEachInExtent(t,e){return this.forEach_(this.getInExtent(t),e)}forEach_(t,e){let i;for(let n=0,r=t.length;n<r;n++)if(i=e(t[n]),i)return i;return i}isEmpty(){return(0,o.x)(this.items_)}clear(){this.rbush_.clear(),this.items_={}}getExtent(t){const e=this.rbush_.toJSON();return(0,r.createOrUpdate)(e.minX,e.minY,e.maxX,e.maxY,t)}concat(t){this.rbush_.load(t.rbush_.all());for(const e in t.items_)this.items_[e]=t.items_[e]}}},9931:(t,e,i)=>{"use strict";i.r(e),i.d(e,{Circle:()=>n.default,Fill:()=>r.Z,Icon:()=>s.Z,IconImage:()=>o.Z,Image:()=>a.Z,RegularShape:()=>l.Z,Stroke:()=>h.Z,Style:()=>u.ZP,Text:()=>c.Z});var n=i(283),r=i(1345),s=i(2370),o=i(3713),a=i(8443),l=i(5393),h=i(8958),u=i(7539),c=i(1280)},283:(t,e,i)=>{"use strict";i.r(e),i.d(e,{default:()=>s});var n=i(5393);class r extends n.Z{constructor(t){super({points:1/0,fill:(t=t||{radius:5}).fill,radius:t.radius,stroke:t.stroke,scale:void 0!==t.scale?t.scale:1,rotation:void 0!==t.rotation?t.rotation:0,rotateWithView:void 0!==t.rotateWithView&&t.rotateWithView,displacement:void 0!==t.displacement?t.displacement:[0,0],declutterMode:t.declutterMode})}clone(){const t=this.getScale(),e=new r({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(),declutterMode:this.getDeclutterMode()});return e.setOpacity(this.getOpacity()),e}setRadius(t){this.radius_=t,this.render()}}const s=r},1345:(t,e,i)=>{"use strict";i.d(e,{Z:()=>r});class n{constructor(t){t=t||{},this.color_=void 0!==t.color?t.color:null}clone(){const t=this.getColor();return new n({color:Array.isArray(t)?t.slice():t||void 0})}getColor(){return this.color_}setColor(t){this.color_=t}}const r=n},2370:(t,e,i)=>{"use strict";i.d(e,{Z:()=>d});var n=i(5487),r=i(553),s=i(8443),o=i(9706),a=i(9515),l=i(3713),h=i(4187);function u(t,e,i,n){return void 0!==i&&void 0!==n?[i/t,n/e]:void 0!==i?i/t:void 0!==n?n/e:1}class c extends s.Z{constructor(t){const e=void 0!==(t=t||{}).opacity?t.opacity:1,i=void 0!==t.rotation?t.rotation:0,n=void 0!==t.scale?t.scale:1,s=void 0!==t.rotateWithView&&t.rotateWithView;super({opacity:e,rotation:i,scale:n,displacement:void 0!==t.displacement?t.displacement:[0,0],rotateWithView:s,declutterMode:t.declutterMode}),this.anchor_=void 0!==t.anchor?t.anchor:[.5,.5],this.normalizedAnchor_=null,this.anchorOrigin_=void 0!==t.anchorOrigin?t.anchorOrigin:"top-left",this.anchorXUnits_=void 0!==t.anchorXUnits?t.anchorXUnits:"fraction",this.anchorYUnits_=void 0!==t.anchorYUnits?t.anchorYUnits:"fraction",this.crossOrigin_=void 0!==t.crossOrigin?t.crossOrigin:null;const c=void 0!==t.img?t.img:null;this.imgSize_=t.imgSize;let d=t.src;(0,a.h)(!(void 0!==d&&c),4),(0,a.h)(!c||c&&this.imgSize_,5),void 0!==d&&0!==d.length||!c||(d=c.src||(0,h.sq)(c)),(0,a.h)(void 0!==d&&d.length>0,6),(0,a.h)(!((void 0!==t.width||void 0!==t.height)&&void 0!==t.scale),69);const g=void 0!==t.src?r.Z.IDLE:r.Z.LOADED;if(this.color_=void 0!==t.color?(0,o._2)(t.color):null,this.iconImage_=(0,l.U)(c,d,void 0!==this.imgSize_?this.imgSize_:null,this.crossOrigin_,g,this.color_),this.offset_=void 0!==t.offset?t.offset:[0,0],this.offsetOrigin_=void 0!==t.offsetOrigin?t.offsetOrigin:"top-left",this.origin_=null,this.size_=void 0!==t.size?t.size:null,void 0!==t.width||void 0!==t.height){let e,i;if(t.size)[e,i]=t.size;else{const n=this.getImage(1);if(!(n instanceof HTMLCanvasElement||n.src&&n.complete)){this.initialOptions_=t;const e=()=>{if(this.unlistenImageChange(e),!this.initialOptions_)return;const i=this.iconImage_.getSize();this.setScale(u(i[0],i[1],t.width,t.height))};return void this.listenImageChange(e)}e=n.width,i=n.height}void 0!==e&&this.setScale(u(e,i,t.width,t.height))}}clone(){let t,e,i;return this.initialOptions_?(e=this.initialOptions_.width,i=this.initialOptions_.height):(t=this.getScale(),t=Array.isArray(t)?t.slice():t),new c({anchor:this.anchor_.slice(),anchorOrigin:this.anchorOrigin_,anchorXUnits:this.anchorXUnits_,anchorYUnits:this.anchorYUnits_,color:this.color_&&this.color_.slice?this.color_.slice():this.color_||void 0,crossOrigin:this.crossOrigin_,imgSize:this.imgSize_,offset:this.offset_.slice(),offsetOrigin:this.offsetOrigin_,opacity:this.getOpacity(),rotateWithView:this.getRotateWithView(),rotation:this.getRotation(),scale:t,width:e,height:i,size:null!==this.size_?this.size_.slice():void 0,src:this.getSrc(),displacement:this.getDisplacement().slice(),declutterMode:this.getDeclutterMode()})}getAnchor(){let t=this.normalizedAnchor_;if(!t){t=this.anchor_;const e=this.getSize();if("fraction"==this.anchorXUnits_||"fraction"==this.anchorYUnits_){if(!e)return null;t=this.anchor_.slice(),"fraction"==this.anchorXUnits_&&(t[0]*=e[0]),"fraction"==this.anchorYUnits_&&(t[1]*=e[1])}if("top-left"!=this.anchorOrigin_){if(!e)return null;t===this.anchor_&&(t=this.anchor_.slice()),"top-right"!=this.anchorOrigin_&&"bottom-right"!=this.anchorOrigin_||(t[0]=-t[0]+e[0]),"bottom-left"!=this.anchorOrigin_&&"bottom-right"!=this.anchorOrigin_||(t[1]=-t[1]+e[1])}this.normalizedAnchor_=t}const e=this.getDisplacement(),i=this.getScaleArray();return[t[0]-e[0]/i[0],t[1]+e[1]/i[1]]}setAnchor(t){this.anchor_=t,this.normalizedAnchor_=null}getColor(){return this.color_}getImage(t){return this.iconImage_.getImage(t)}getPixelRatio(t){return this.iconImage_.getPixelRatio(t)}getImageSize(){return this.iconImage_.getSize()}getImageState(){return this.iconImage_.getImageState()}getHitDetectionImage(){return this.iconImage_.getHitDetectionImage()}getOrigin(){if(this.origin_)return this.origin_;let t=this.offset_;if("top-left"!=this.offsetOrigin_){const e=this.getSize(),i=this.iconImage_.getSize();if(!e||!i)return null;t=t.slice(),"top-right"!=this.offsetOrigin_&&"bottom-right"!=this.offsetOrigin_||(t[0]=i[0]-e[0]-t[0]),"bottom-left"!=this.offsetOrigin_&&"bottom-right"!=this.offsetOrigin_||(t[1]=i[1]-e[1]-t[1])}return this.origin_=t,this.origin_}getSrc(){return this.iconImage_.getSrc()}getSize(){return this.size_?this.size_:this.iconImage_.getSize()}getWidth(){const t=this.getScaleArray();return this.size_?this.size_[0]*t[0]:this.iconImage_.getImageState()==r.Z.LOADED?this.iconImage_.getSize()[0]*t[0]:void 0}getHeight(){const t=this.getScaleArray();return this.size_?this.size_[1]*t[1]:this.iconImage_.getImageState()==r.Z.LOADED?this.iconImage_.getSize()[1]*t[1]:void 0}setScale(t){delete this.initialOptions_,super.setScale(t)}listenImageChange(t){this.iconImage_.addEventListener(n.Z.CHANGE,t)}load(){this.iconImage_.load()}unlistenImageChange(t){this.iconImage_.removeEventListener(n.Z.CHANGE,t)}}const d=c},3713:(t,e,i)=>{"use strict";i.d(e,{U:()=>d,Z:()=>g});var n=i(208),r=i(5487),s=i(553),o=i(9706),a=i(8326),l=i(2710),h=i(8096);let u=null;class c extends n.Z{constructor(t,e,i,n,r,s){super(),this.hitDetectionImage_=null,this.image_=t,this.crossOrigin_=n,this.canvas_={},this.color_=s,this.unlisten_=null,this.imageState_=r,this.size_=i,this.src_=e,this.tainted_}initializeImage_(){this.image_=new Image,null!==this.crossOrigin_&&(this.image_.crossOrigin=this.crossOrigin_)}isTainted_(){if(void 0===this.tainted_&&this.imageState_===s.Z.LOADED){u||(u=(0,a.E4)(1,1,void 0,{willReadFrequently:!0})),u.drawImage(this.image_,0,0);try{u.getImageData(0,0,1,1),this.tainted_=!1}catch(t){u=null,this.tainted_=!0}}return!0===this.tainted_}dispatchChangeEvent_(){this.dispatchEvent(r.Z.CHANGE)}handleImageError_(){this.imageState_=s.Z.ERROR,this.unlistenImage_(),this.dispatchChangeEvent_()}handleImageLoad_(){this.imageState_=s.Z.LOADED,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_()}getImage(t){return this.image_||this.initializeImage_(),this.replaceColor_(t),this.canvas_[t]?this.canvas_[t]:this.image_}getPixelRatio(t){return this.replaceColor_(t),this.canvas_[t]?t:1}getImageState(){return this.imageState_}getHitDetectionImage(){if(this.image_||this.initializeImage_(),!this.hitDetectionImage_)if(this.isTainted_()){const t=this.size_[0],e=this.size_[1],i=(0,a.E4)(t,e);i.fillRect(0,0,t,e),this.hitDetectionImage_=i.canvas}else this.hitDetectionImage_=this.image_;return this.hitDetectionImage_}getSize(){return this.size_}getSrc(){return this.src_}load(){if(this.imageState_===s.Z.IDLE){this.image_||this.initializeImage_(),this.imageState_=s.Z.LOADING;try{this.image_.src=this.src_}catch(t){this.handleImageError_()}this.unlisten_=(0,h.K)(this.image_,this.handleImageLoad_.bind(this),this.handleImageError_.bind(this))}}replaceColor_(t){if(!this.color_||this.canvas_[t]||this.imageState_!==s.Z.LOADED)return;const e=this.image_,i=document.createElement("canvas");i.width=Math.ceil(e.width*t),i.height=Math.ceil(e.height*t);const n=i.getContext("2d");n.scale(t,t),n.drawImage(e,0,0),n.globalCompositeOperation="multiply",n.fillStyle=(0,o.XC)(this.color_),n.fillRect(0,0,i.width/t,i.height/t),n.globalCompositeOperation="destination-in",n.drawImage(e,0,0),this.canvas_[t]=i}unlistenImage_(){this.unlisten_&&(this.unlisten_(),this.unlisten_=null)}}function d(t,e,i,n,r,s){let o=l.c.get(e,n,s);return o||(o=new c(t,e,i,n,r,s),l.c.set(e,n,s,o)),o}const g=c},2710:(t,e,i)=>{"use strict";i.d(e,{c:()=>s});var n=i(9706);function r(t,e,i){return e+":"+t+":"+(i?(0,n.XC)(i):"null")}const s=new class{constructor(){this.cache_={},this.cacheSize_=0,this.maxCacheSize_=32}clear(){this.cache_={},this.cacheSize_=0}canExpireCache(){return this.cacheSize_>this.maxCacheSize_}expire(){if(this.canExpireCache()){let t=0;for(const e in this.cache_){const i=this.cache_[e];0!=(3&t++)||i.hasListener()||(delete this.cache_[e],--this.cacheSize_)}}}get(t,e,i){const n=r(t,e,i);return n in this.cache_?this.cache_[n]:null}set(t,e,i,n){const s=r(t,e,i);this.cache_[s]=n,++this.cacheSize_}setSize(t){this.maxCacheSize_=t,this.expire()}}},8443:(t,e,i)=>{"use strict";i.d(e,{Z:()=>o});var n=i(4187),r=i(4307);class s{constructor(t){this.opacity_=t.opacity,this.rotateWithView_=t.rotateWithView,this.rotation_=t.rotation,this.scale_=t.scale,this.scaleArray_=(0,r.Pq)(t.scale),this.displacement_=t.displacement,this.declutterMode_=t.declutterMode}clone(){const t=this.getScale();return new s({opacity:this.getOpacity(),scale:Array.isArray(t)?t.slice():t,rotation:this.getRotation(),rotateWithView:this.getRotateWithView(),displacement:this.getDisplacement().slice(),declutterMode:this.getDeclutterMode()})}getOpacity(){return this.opacity_}getRotateWithView(){return this.rotateWithView_}getRotation(){return this.rotation_}getScale(){return this.scale_}getScaleArray(){return this.scaleArray_}getDisplacement(){return this.displacement_}getDeclutterMode(){return this.declutterMode_}getAnchor(){return(0,n.O3)()}getImage(t){return(0,n.O3)()}getHitDetectionImage(){return(0,n.O3)()}getPixelRatio(t){return 1}getImageState(){return(0,n.O3)()}getImageSize(){return(0,n.O3)()}getOrigin(){return(0,n.O3)()}getSize(){return(0,n.O3)()}setDisplacement(t){this.displacement_=t}setOpacity(t){this.opacity_=t}setRotateWithView(t){this.rotateWithView_=t}setRotation(t){this.rotation_=t}setScale(t){this.scale_=t,this.scaleArray_=(0,r.Pq)(t)}listenImageChange(t){(0,n.O3)()}load(){(0,n.O3)()}unlistenImageChange(t){(0,n.O3)()}}const o=s},5393:(t,e,i)=>{"use strict";i.d(e,{Z:()=>u});var n=i(553),r=i(8443),s=i(9706),o=i(6620),a=i(8326),l=i(147);class h extends r.Z{constructor(t){super({opacity:1,rotateWithView:void 0!==t.rotateWithView&&t.rotateWithView,rotation:void 0!==t.rotation?t.rotation:0,scale:void 0!==t.scale?t.scale:1,displacement:void 0!==t.displacement?t.displacement:[0,0],declutterMode:t.declutterMode}),this.canvas_=void 0,this.hitDetectionCanvas_=null,this.fill_=void 0!==t.fill?t.fill:null,this.origin_=[0,0],this.points_=t.points,this.radius_=void 0!==t.radius?t.radius:t.radius1,this.radius2_=t.radius2,this.angle_=void 0!==t.angle?t.angle:0,this.stroke_=void 0!==t.stroke?t.stroke:null,this.size_=null,this.renderOptions_=null,this.render()}clone(){const t=this.getScale(),e=new h({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(),declutterMode:this.getDeclutterMode()});return e.setOpacity(this.getOpacity()),e}getAnchor(){const t=this.size_;if(!t)return null;const e=this.getDisplacement(),i=this.getScaleArray();return[t[0]/2-e[0]/i[0],t[1]/2+e[1]/i[1]]}getAngle(){return this.angle_}getFill(){return this.fill_}setFill(t){this.fill_=t,this.render()}getHitDetectionImage(){return this.hitDetectionCanvas_||this.createHitDetectionCanvas_(this.renderOptions_),this.hitDetectionCanvas_}getImage(t){let e=this.canvas_[t];if(!e){const i=this.renderOptions_,n=(0,a.E4)(i.size*t,i.size*t);this.draw_(i,n,t),e=n.canvas,this.canvas_[t]=e}return e}getPixelRatio(t){return t}getImageSize(){return this.size_}getImageState(){return n.Z.LOADED}getOrigin(){return this.origin_}getPoints(){return this.points_}getRadius(){return this.radius_}getRadius2(){return this.radius2_}getSize(){return this.size_}getStroke(){return this.stroke_}setStroke(t){this.stroke_=t,this.render()}listenImageChange(t){}load(){}unlistenImageChange(t){}calculateLineJoinSize_(t,e,i){if(0===e||this.points_===1/0||"bevel"!==t&&"miter"!==t)return e;let n=this.radius_,r=void 0===this.radius2_?n:this.radius2_;if(n<r){const t=n;n=r,r=t}const s=void 0===this.radius2_?this.points_:2*this.points_,o=2*Math.PI/s,a=r*Math.sin(o),l=n-Math.sqrt(r*r-a*a),h=Math.sqrt(a*a+l*l),u=h/a;if("miter"===t&&u<=i)return u*e;const c=e/2/u,d=e/2*(l/h),g=Math.sqrt((n+c)*(n+c)+d*d)-n;if(void 0===this.radius2_||"bevel"===t)return 2*g;const p=n*Math.sin(o),f=r-Math.sqrt(n*n-p*p),m=Math.sqrt(p*p+f*f)/p;if(m<=i){const t=m*e/2-r-n;return 2*Math.max(g,t)}return 2*g}createRenderOptions(){let t,e=l.rc,i=0,n=null,r=0,s=0;this.stroke_&&(t=this.stroke_.getColor(),null===t&&(t=l.Tx),t=(0,o.y)(t),s=this.stroke_.getWidth(),void 0===s&&(s=l.yC),n=this.stroke_.getLineDash(),r=this.stroke_.getLineDashOffset(),e=this.stroke_.getLineJoin(),void 0===e&&(e=l.rc),i=this.stroke_.getMiterLimit(),void 0===i&&(i=l.V4));const a=this.calculateLineJoinSize_(e,s,i),h=Math.max(this.radius_,this.radius2_||0);return{strokeStyle:t,strokeWidth:s,size:Math.ceil(2*h+a),lineDash:n,lineDashOffset:r,lineJoin:e,miterLimit:i}}render(){this.renderOptions_=this.createRenderOptions();const t=this.renderOptions_.size;this.canvas_={},this.size_=[t,t]}draw_(t,e,i){if(e.scale(i,i),e.translate(t.size/2,t.size/2),this.createPath_(e),this.fill_){let t=this.fill_.getColor();null===t&&(t=l.bL),e.fillStyle=(0,o.y)(t),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())}createHitDetectionCanvas_(t){if(this.fill_){let e=this.fill_.getColor(),i=0;if("string"==typeof e&&(e=(0,s._2)(e)),null===e?i=1:Array.isArray(e)&&(i=4===e.length?e[3]:1),0===i){const e=(0,a.E4)(t.size,t.size);this.hitDetectionCanvas_=e.canvas,this.drawHitDetectionCanvas_(t,e)}}this.hitDetectionCanvas_||(this.hitDetectionCanvas_=this.getImage(1))}createPath_(t){let e=this.points_;const i=this.radius_;if(e===1/0)t.arc(0,0,i,0,2*Math.PI);else{const n=void 0===this.radius2_?i:this.radius2_;void 0!==this.radius2_&&(e*=2);const r=this.angle_-Math.PI/2,s=2*Math.PI/e;for(let o=0;o<e;o++){const e=r+o*s,a=o%2==0?i:n;t.lineTo(a*Math.cos(e),a*Math.sin(e))}t.closePath()}}drawHitDetectionCanvas_(t,e){e.translate(t.size/2,t.size/2),this.createPath_(e),e.fillStyle=l.bL,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())}}const u=h},8958:(t,e,i)=>{"use strict";i.d(e,{Z:()=>r});class n{constructor(t){t=t||{},this.color_=void 0!==t.color?t.color:null,this.lineCap_=t.lineCap,this.lineDash_=void 0!==t.lineDash?t.lineDash:null,this.lineDashOffset_=t.lineDashOffset,this.lineJoin_=t.lineJoin,this.miterLimit_=t.miterLimit,this.width_=t.width}clone(){const t=this.getColor();return new n({color:Array.isArray(t)?t.slice():t||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()})}getColor(){return this.color_}getLineCap(){return this.lineCap_}getLineDash(){return this.lineDash_}getLineDashOffset(){return this.lineDashOffset_}getLineJoin(){return this.lineJoin_}getMiterLimit(){return this.miterLimit_}getWidth(){return this.width_}setColor(t){this.color_=t}setLineCap(t){this.lineCap_=t}setLineDash(t){this.lineDash_=t}setLineDashOffset(t){this.lineDashOffset_=t}setLineJoin(t){this.lineJoin_=t}setMiterLimit(t){this.miterLimit_=t}setWidth(t){this.width_=t}}const r=n},7539:(t,e,i)=>{"use strict";i.d(e,{J$:()=>l,Ly:()=>c,ZP:()=>g,yF:()=>u});var n=i(283),r=i(1345),s=i(8958),o=i(9515);class a{constructor(t){t=t||{},this.geometry_=null,this.geometryFunction_=d,void 0!==t.geometry&&this.setGeometry(t.geometry),this.fill_=void 0!==t.fill?t.fill:null,this.image_=void 0!==t.image?t.image:null,this.renderer_=void 0!==t.renderer?t.renderer:null,this.hitDetectionRenderer_=void 0!==t.hitDetectionRenderer?t.hitDetectionRenderer:null,this.stroke_=void 0!==t.stroke?t.stroke:null,this.text_=void 0!==t.text?t.text:null,this.zIndex_=t.zIndex}clone(){let t=this.getGeometry();return t&&"object"==typeof t&&(t=t.clone()),new a({geometry:t,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()})}getRenderer(){return this.renderer_}setRenderer(t){this.renderer_=t}setHitDetectionRenderer(t){this.hitDetectionRenderer_=t}getHitDetectionRenderer(){return this.hitDetectionRenderer_}getGeometry(){return this.geometry_}getGeometryFunction(){return this.geometryFunction_}getFill(){return this.fill_}setFill(t){this.fill_=t}getImage(){return this.image_}setImage(t){this.image_=t}getStroke(){return this.stroke_}setStroke(t){this.stroke_=t}getText(){return this.text_}setText(t){this.text_=t}getZIndex(){return this.zIndex_}setGeometry(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_=d,this.geometry_=t}setZIndex(t){this.zIndex_=t}}function l(t){let e;if("function"==typeof t)e=t;else{let i;Array.isArray(t)?i=t:((0,o.h)("function"==typeof t.getZIndex,41),i=[t]),e=function(){return i}}return e}let h=null;function u(t,e){if(!h){const t=new r.Z({color:"rgba(255,255,255,0.4)"}),e=new s.Z({color:"#3399CC",width:1.25});h=[new a({image:new n.default({fill:t,stroke:e,radius:5}),fill:t,stroke:e})]}return h}function c(){const t={},e=[255,255,255,1],i=[0,153,255,1];return t.Polygon=[new a({fill:new r.Z({color:[255,255,255,.5]})})],t.MultiPolygon=t.Polygon,t.LineString=[new a({stroke:new s.Z({color:e,width:5})}),new a({stroke:new s.Z({color:i,width:3})})],t.MultiLineString=t.LineString,t.Circle=t.Polygon.concat(t.LineString),t.Point=[new a({image:new n.default({radius:6,fill:new r.Z({color:i}),stroke:new s.Z({color:e,width:1.5})}),zIndex:1/0})],t.MultiPoint=t.Point,t.GeometryCollection=t.Polygon.concat(t.LineString,t.Point),t}function d(t){return t.getGeometry()}const g=a},1280:(t,e,i)=>{"use strict";i.d(e,{Z:()=>o});var n=i(1345),r=i(4307);class s{constructor(t){t=t||{},this.font_=t.font,this.rotation_=t.rotation,this.rotateWithView_=t.rotateWithView,this.scale_=t.scale,this.scaleArray_=(0,r.Pq)(void 0!==t.scale?t.scale:1),this.text_=t.text,this.textAlign_=t.textAlign,this.justify_=t.justify,this.repeat_=t.repeat,this.textBaseline_=t.textBaseline,this.fill_=void 0!==t.fill?t.fill:new n.Z({color:"#333"}),this.maxAngle_=void 0!==t.maxAngle?t.maxAngle:Math.PI/4,this.placement_=void 0!==t.placement?t.placement:"point",this.overflow_=!!t.overflow,this.stroke_=void 0!==t.stroke?t.stroke:null,this.offsetX_=void 0!==t.offsetX?t.offsetX:0,this.offsetY_=void 0!==t.offsetY?t.offsetY:0,this.backgroundFill_=t.backgroundFill?t.backgroundFill:null,this.backgroundStroke_=t.backgroundStroke?t.backgroundStroke:null,this.padding_=void 0===t.padding?null:t.padding}clone(){const t=this.getScale();return new s({font:this.getFont(),placement:this.getPlacement(),repeat:this.getRepeat(),maxAngle:this.getMaxAngle(),overflow:this.getOverflow(),rotation:this.getRotation(),rotateWithView:this.getRotateWithView(),scale:Array.isArray(t)?t.slice():t,text:this.getText(),textAlign:this.getTextAlign(),justify:this.getJustify(),textBaseline:this.getTextBaseline(),fill:this.getFill()?this.getFill().clone():void 0,stroke:this.getStroke()?this.getStroke().clone():void 0,offsetX:this.getOffsetX(),offsetY:this.getOffsetY(),backgroundFill:this.getBackgroundFill()?this.getBackgroundFill().clone():void 0,backgroundStroke:this.getBackgroundStroke()?this.getBackgroundStroke().clone():void 0,padding:this.getPadding()||void 0})}getOverflow(){return this.overflow_}getFont(){return this.font_}getMaxAngle(){return this.maxAngle_}getPlacement(){return this.placement_}getRepeat(){return this.repeat_}getOffsetX(){return this.offsetX_}getOffsetY(){return this.offsetY_}getFill(){return this.fill_}getRotateWithView(){return this.rotateWithView_}getRotation(){return this.rotation_}getScale(){return this.scale_}getScaleArray(){return this.scaleArray_}getStroke(){return this.stroke_}getText(){return this.text_}getTextAlign(){return this.textAlign_}getJustify(){return this.justify_}getTextBaseline(){return this.textBaseline_}getBackgroundFill(){return this.backgroundFill_}getBackgroundStroke(){return this.backgroundStroke_}getPadding(){return this.padding_}setOverflow(t){this.overflow_=t}setFont(t){this.font_=t}setMaxAngle(t){this.maxAngle_=t}setOffsetX(t){this.offsetX_=t}setOffsetY(t){this.offsetY_=t}setPlacement(t){this.placement_=t}setRepeat(t){this.repeat_=t}setRotateWithView(t){this.rotateWithView_=t}setFill(t){this.fill_=t}setRotation(t){this.rotation_=t}setScale(t){this.scale_=t,this.scaleArray_=(0,r.Pq)(void 0!==t?t:1)}setStroke(t){this.stroke_=t}setText(t){this.text_=t}setTextAlign(t){this.textAlign_=t}setJustify(t){this.justify_=t}setTextBaseline(t){this.textBaseline_=t}setBackgroundFill(t){this.backgroundFill_=t}setBackgroundStroke(t){this.backgroundStroke_=t}setPadding(t){this.padding_=t}}const o=s},3654:(t,e,i)=>{"use strict";i.d(e,{M:()=>u,y:()=>f});var n=i(283),r=i(1345),s=i(2370),o=i(5393),a=i(8958),l=i(7539),h=i(1280);function u(t){return new l.ZP({fill:c(t,""),stroke:d(t,""),text:g(t),image:p(t)})}function c(t,e){const i=t[e+"fill-color"];if(i)return"none"===i?null:new r.Z({color:i})}function d(t,e){const i=t[e+"stroke-width"],n=t[e+"stroke-color"];if(i||n)return new a.Z({width:i,color:n,lineCap:t[e+"stroke-line-cap"],lineJoin:t[e+"stroke-line-join"],lineDash:t[e+"stroke-line-dash"],lineDashOffset:t[e+"stroke-line-dash-offset"],miterLimit:t[e+"stroke-miter-limit"]})}function g(t){const e=t["text-value"];if(e)return new h.Z({text:e,font:t["text-font"],maxAngle:t["text-max-angle"],offsetX:t["text-offset-x"],offsetY:t["text-offset-y"],overflow:t["text-overflow"],placement:t["text-placement"],repeat:t["text-repeat"],scale:t["text-scale"],rotateWithView:t["text-rotate-with-view"],rotation:t["text-rotation"],textAlign:t["text-align"],justify:t["text-justify"],textBaseline:t["text-baseline"],padding:t["text-padding"],fill:c(t,"text-"),backgroundFill:c(t,"text-background-"),stroke:d(t,"text-"),backgroundStroke:d(t,"text-background-")})}function p(t){const e=t["icon-src"],i=t["icon-img"];if(e||i)return new s.Z({src:e,img:i,imgSize:t["icon-img-size"],anchor:t["icon-anchor"],anchorOrigin:t["icon-anchor-origin"],anchorXUnits:t["icon-anchor-x-units"],anchorYUnits:t["icon-anchor-y-units"],color:t["icon-color"],crossOrigin:t["icon-cross-origin"],offset:t["icon-offset"],displacement:t["icon-displacement"],opacity:t["icon-opacity"],scale:t["icon-scale"],width:t["icon-width"],height:t["icon-height"],rotation:t["icon-rotation"],rotateWithView:t["icon-rotate-with-view"],size:t["icon-size"],declutterMode:t["icon-declutter-mode"]});const r=t["shape-points"];if(r){const e="shape-";return new o.Z({points:r,fill:c(t,e),stroke:d(t,e),radius:t["shape-radius"],radius1:t["shape-radius1"],radius2:t["shape-radius2"],angle:t["shape-angle"],displacement:t["shape-displacement"],rotation:t["shape-rotation"],rotateWithView:t["shape-rotate-with-view"],scale:t["shape-scale"],declutterMode:t["shape-declutter-mode"]})}const a=t["circle-radius"];if(a){const e="circle-";return new n.default({radius:a,fill:c(t,e),stroke:d(t,e),displacement:t["circle-displacement"],scale:t["circle-scale"],rotation:t["circle-rotation"],rotateWithView:t["circle-rotate-with-view"],declutterMode:t["circle-declutter-mode"]})}}function f(){return{"fill-color":"rgba(255,255,255,0.4)","stroke-color":"#3399CC","stroke-width":1.25,"circle-radius":5,"circle-fill-color":"rgba(255,255,255,0.4)","circle-stroke-width":1.25,"circle-stroke-color":"#3399CC"}}},8634:(t,e,i)=>{"use strict";function n(t,e,i,n){return void 0!==n?(n[0]=t,n[1]=e,n[2]=i,n):[t,e,i]}function r(t,e,i){return t+"/"+e+"/"+i}function s(t){return r(t[0],t[1],t[2])}function o(t){const[e,i,n]=t.substring(t.lastIndexOf("/")+1,t.length).split(",").map(Number);return r(e,i,n)}function a(t){return t.split("/").map(Number)}function l(t){return(t[1]<<t[0])+t[2]}function h(t,e){const i=t[0],n=t[1],r=t[2];if(e.getMinZoom()>i||i>e.getMaxZoom())return!1;const s=e.getFullTileRange(i);return!s||s.containsXY(n,r)}i.d(e,{MY:()=>o,T9:()=>n,Ul:()=>a,km:()=>s,lg:()=>r,tE:()=>h,vp:()=>l})},7248:(t,e,i)=>{"use strict";i.d(e,{Cf:()=>h,Tl:()=>d,X$:()=>l,dl:()=>u});var n=i(8738),r=i(4768),s=i(6121),o=i(8641),a=i(4307);function l(t){let e=t.getDefaultTileGrid();return e||(e=function(t,e,i,r){return function(t,e,i,r){r=void 0!==r?r:"top-left";const s=c(t,undefined,i);return new n.Z({extent:t,origin:(0,o.getCorner)(t,r),resolutions:s,tileSize:i})}(d(t),0,void 0,void 0)}(t),t.setDefaultTileGrid(e)),e}function h(t,e,i){const n=e[0],r=t.getTileCoordCenter(e),s=d(i);if(!(0,o.containsCoordinate)(s,r)){const e=(0,o.getWidth)(s),i=Math.ceil((s[0]-r[0])/e);return r[0]+=e*i,t.getTileCoordForCoordAndZ(r,n)}return e}function u(t){const e=t||{},i=e.extent||(0,s.get)("EPSG:3857").getExtent(),r={extent:i,minZoom:e.minZoom,tileSize:e.tileSize,resolutions:c(i,e.maxZoom,e.tileSize,e.maxResolution)};return new n.Z(r)}function c(t,e,i,n){e=void 0!==e?e:r.e,i=(0,a.Pq)(void 0!==i?i:r.S);const s=(0,o.getHeight)(t),l=(0,o.getWidth)(t);n=n>0?n:Math.max(l/i[0],s/i[1]);const h=e+1,u=new Array(h);for(let t=0;t<h;++t)u[t]=n/Math.pow(2,t);return u}function d(t){let e=(t=(0,s.get)(t)).getExtent();if(!e){const i=180*s.METERS_PER_UNIT.degrees/t.getMetersPerUnit();e=(0,o.createOrUpdate)(-i,-i,i,i)}return e}},8738:(t,e,i)=>{"use strict";i.d(e,{Z:()=>g});var n=i(2519),r=i(4768),s=i(9515),o=i(3983),a=i(8641),l=i(8634),h=i(3746),u=i(5537),c=i(4307);const d=[0,0,0],g=class{constructor(t){let e;if(this.minZoom=void 0!==t.minZoom?t.minZoom:0,this.resolutions_=t.resolutions,(0,s.h)((0,u.pT)(this.resolutions_,(function(t,e){return e-t}),!0),17),!t.origins)for(let t=0,i=this.resolutions_.length-1;t<i;++t)if(e){if(this.resolutions_[t]/this.resolutions_[t+1]!==e){e=void 0;break}}else e=this.resolutions_[t]/this.resolutions_[t+1];this.zoomFactor_=e,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,(0,s.h)(this.origins_.length==this.resolutions_.length,20));const i=t.extent;void 0===i||this.origin_||this.origins_||(this.origin_=(0,a.getTopLeft)(i)),(0,s.h)(!this.origin_&&this.origins_||this.origin_&&!this.origins_,18),this.tileSizes_=null,void 0!==t.tileSizes&&(this.tileSizes_=t.tileSizes,(0,s.h)(this.tileSizes_.length==this.resolutions_.length,19)),this.tileSize_=void 0!==t.tileSize?t.tileSize:this.tileSizes_?null:r.S,(0,s.h)(!this.tileSize_&&this.tileSizes_||this.tileSize_&&!this.tileSizes_,22),this.extent_=void 0!==i?i: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){const r=new n.Z(Math.min(0,t[0]),Math.max(t[0]-1,-1),Math.min(0,t[1]),Math.max(t[1]-1,-1));if(i){const t=this.getTileRangeForExtentAndZ(i,e);r.minX=Math.max(t.minX,r.minX),r.maxX=Math.min(t.maxX,r.maxX),r.minY=Math.max(t.minY,r.minY),r.maxY=Math.min(t.maxY,r.maxY)}return r}),this):i&&this.calculateTileRanges_(i)}forEachTileCoord(t,e,i){const n=this.getTileRangeForExtentAndZ(t,e);for(let t=n.minX,r=n.maxX;t<=r;++t)for(let r=n.minY,s=n.maxY;r<=s;++r)i([e,t,r])}forEachTileCoordParentTileRange(t,e,i,r){let s,o,a,l=null,h=t[0]-1;for(2===this.zoomFactor_?(o=t[1],a=t[2]):l=this.getTileCoordExtent(t,r);h>=this.minZoom;){if(2===this.zoomFactor_?(o=Math.floor(o/2),a=Math.floor(a/2),s=(0,n.T)(o,o,a,a,i)):s=this.getTileRangeForExtentAndZ(l,h,i),e(h,s))return!0;--h}return!1}getExtent(){return this.extent_}getMaxZoom(){return this.maxZoom}getMinZoom(){return this.minZoom}getOrigin(t){return this.origin_?this.origin_:this.origins_[t]}getResolution(t){return this.resolutions_[t]}getResolutions(){return this.resolutions_}getTileCoordChildTileRange(t,e,i){if(t[0]<this.maxZoom){if(2===this.zoomFactor_){const i=2*t[1],r=2*t[2];return(0,n.T)(i,i+1,r,r+1,e)}const r=this.getTileCoordExtent(t,i||this.tmpExtent_);return this.getTileRangeForExtentAndZ(r,t[0]+1,e)}return null}getTileRangeForTileCoordAndZ(t,e,i){if(e>this.maxZoom||e<this.minZoom)return null;const r=t[0],s=t[1],o=t[2];if(e===r)return(0,n.T)(s,o,s,o,i);if(this.zoomFactor_){const t=Math.pow(this.zoomFactor_,e-r),a=Math.floor(s*t),l=Math.floor(o*t);if(e<r)return(0,n.T)(a,a,l,l,i);const h=Math.floor(t*(s+1))-1,u=Math.floor(t*(o+1))-1;return(0,n.T)(a,h,l,u,i)}const a=this.getTileCoordExtent(t,this.tmpExtent_);return this.getTileRangeForExtentAndZ(a,e,i)}getTileRangeForExtentAndZ(t,e,i){this.getTileCoordForXYAndZ_(t[0],t[3],e,!1,d);const r=d[1],s=d[2];this.getTileCoordForXYAndZ_(t[2],t[1],e,!0,d);const o=d[1],a=d[2];return(0,n.T)(r,o,s,a,i)}getTileCoordCenter(t){const e=this.getOrigin(t[0]),i=this.getResolution(t[0]),n=(0,c.Pq)(this.getTileSize(t[0]),this.tmpSize_);return[e[0]+(t[1]+.5)*n[0]*i,e[1]-(t[2]+.5)*n[1]*i]}getTileCoordExtent(t,e){const i=this.getOrigin(t[0]),n=this.getResolution(t[0]),r=(0,c.Pq)(this.getTileSize(t[0]),this.tmpSize_),s=i[0]+t[1]*r[0]*n,o=i[1]-(t[2]+1)*r[1]*n,l=s+r[0]*n,h=o+r[1]*n;return(0,a.createOrUpdate)(s,o,l,h,e)}getTileCoordForCoordAndResolution(t,e,i){return this.getTileCoordForXYAndResolution_(t[0],t[1],e,!1,i)}getTileCoordForXYAndResolution_(t,e,i,n,r){const s=this.getZForResolution(i),a=i/this.getResolution(s),h=this.getOrigin(s),u=(0,c.Pq)(this.getTileSize(s),this.tmpSize_);let d=a*(t-h[0])/i/u[0],g=a*(h[1]-e)/i/u[1];return n?(d=(0,o.mD)(d,5)-1,g=(0,o.mD)(g,5)-1):(d=(0,o.GW)(d,5),g=(0,o.GW)(g,5)),(0,l.T9)(s,d,g,r)}getTileCoordForXYAndZ_(t,e,i,n,r){const s=this.getOrigin(i),a=this.getResolution(i),h=(0,c.Pq)(this.getTileSize(i),this.tmpSize_);let u=(t-s[0])/a/h[0],d=(s[1]-e)/a/h[1];return n?(u=(0,o.mD)(u,5)-1,d=(0,o.mD)(d,5)-1):(u=(0,o.GW)(u,5),d=(0,o.GW)(d,5)),(0,l.T9)(i,u,d,r)}getTileCoordForCoordAndZ(t,e,i){return this.getTileCoordForXYAndZ_(t[0],t[1],e,!1,i)}getTileCoordResolution(t){return this.resolutions_[t[0]]}getTileSize(t){return this.tileSize_?this.tileSize_:this.tileSizes_[t]}getFullTileRange(t){return this.fullTileRanges_?this.fullTileRanges_[t]:this.extent_?this.getTileRangeForExtentAndZ(this.extent_,t):null}getZForResolution(t,e){const i=(0,u.h7)(this.resolutions_,t,e||0);return(0,o.uZ)(i,this.minZoom,this.maxZoom)}tileCoordIntersectsViewport(t,e){return(0,h.mV)(e,0,e.length,2,this.getTileCoordExtent(t))}calculateTileRanges_(t){const e=this.resolutions_.length,i=new Array(e);for(let n=this.minZoom;n<e;++n)i[n]=this.getTileRangeForExtentAndZ(t,n);this.fullTileRanges_=i}}},4768:(t,e,i)=>{"use strict";i.d(e,{S:()=>r,e:()=>n});const n=42,r=256},7848:(t,e,i)=>{"use strict";i.d(e,{Gk:()=>u,Un:()=>l,uR:()=>a,vU:()=>h});var n=i(9515),r=i(3983),s=i(8634);function o(t,e){const i=/\{z\}/g,r=/\{x\}/g,s=/\{y\}/g,o=/\{-y\}/g;return function(a,l,h){if(a)return t.replace(i,a[0].toString()).replace(r,a[1].toString()).replace(s,a[2].toString()).replace(o,(function(){const t=a[0],i=e.getFullTileRange(t);return(0,n.h)(i,55),(i.getHeight()-a[2]-1).toString()}))}}function a(t,e){const i=t.length,n=new Array(i);for(let r=0;r<i;++r)n[r]=o(t[r],e);return l(n)}function l(t){return 1===t.length?t[0]:function(e,i,n){if(!e)return;const o=(0,s.vp)(e),a=(0,r.$W)(o,t.length);return t[a](e,i,n)}}function h(t,e,i){}function u(t){const e=[];let i=/\{([a-z])-([a-z])\}/.exec(t);if(i){const n=i[1].charCodeAt(0),r=i[2].charCodeAt(0);let s;for(s=n;s<=r;++s)e.push(t.replace(i[0],String.fromCharCode(s)));return e}if(i=/\{(\d+)-(\d+)\}/.exec(t),i){const n=parseInt(i[2],10);for(let r=parseInt(i[1],10);r<=n;r++)e.push(t.replace(i[0],r.toString()));return e}return e.push(t),e}},6101:(t,e,i)=>{"use strict";i.d(e,{BB:()=>v,Iu:()=>f,Jp:()=>l,U1:()=>d,Ue:()=>o,bA:()=>g,lk:()=>u,mc:()=>a,n3:()=>p,nb:()=>_,nn:()=>c,qC:()=>m});var n=i(177),r=i(9515);const s=new Array(6);function o(){return[1,0,0,1,0,0]}function a(t){return h(t,1,0,0,1,0,0)}function l(t,e){const i=t[0],n=t[1],r=t[2],s=t[3],o=t[4],a=t[5],l=e[0],h=e[1],u=e[2],c=e[3],d=e[4],g=e[5];return t[0]=i*l+r*h,t[1]=n*l+s*h,t[2]=i*u+r*c,t[3]=n*u+s*c,t[4]=i*d+r*g+o,t[5]=n*d+s*g+a,t}function h(t,e,i,n,r,s,o){return t[0]=e,t[1]=i,t[2]=n,t[3]=r,t[4]=s,t[5]=o,t}function u(t,e){return t[0]=e[0],t[1]=e[1],t[2]=e[2],t[3]=e[3],t[4]=e[4],t[5]=e[5],t}function c(t,e){const i=e[0],n=e[1];return e[0]=t[0]*i+t[2]*n+t[4],e[1]=t[1]*i+t[3]*n+t[5],e}function d(t,e){const i=Math.cos(e),n=Math.sin(e);return l(t,h(s,i,n,-n,i,0,0))}function g(t,e,i){return l(t,h(s,e,0,0,i,0,0))}function p(t,e,i){return h(t,e,0,0,i,0,0)}function f(t,e,i){return l(t,h(s,1,0,0,1,e,i))}function m(t,e,i,n,r,s,o,a){const l=Math.sin(s),h=Math.cos(s);return t[0]=n*h,t[1]=r*l,t[2]=-n*l,t[3]=r*h,t[4]=o*n*h-a*n*l+e,t[5]=o*r*l+a*r*h+i,t}function _(t,e){const i=(n=e)[0]*n[3]-n[1]*n[2];var n;(0,r.h)(0!==i,32);const s=e[0],o=e[1],a=e[2],l=e[3],h=e[4],u=e[5];return t[0]=l/i,t[1]=-o/i,t[2]=-a/i,t[3]=s/i,t[4]=(a*u-l*h)/i,t[5]=-(s*u-o*h)/i,t}let y;function v(t){const e="matrix("+t.join(", ")+")";if(n.Id)return e;const i=y||(y=document.createElement("div"));return i.style.transform=e,i.style.transform}},4187:(t,e,i)=>{"use strict";function n(){throw new Error("Unimplemented abstract method.")}i.d(e,{O3:()=>n,q4:()=>o,sq:()=>s});let r=0;function s(t){return t.ol_uid||(t.ol_uid=String(++r))}const o="7.5.2"}},n={};function r(t){var e=n[t];if(void 0!==e)return e.exports;var s=n[t]={exports:{}};return i[t].call(s.exports,s,s.exports,r),s.exports}r.m=i,r.n=t=>{var e=t&&t.__esModule?()=>t.default:()=>t;return r.d(e,{a:e}),e},r.d=(t,e)=>{for(var i in e)r.o(e,i)&&!r.o(t,i)&&Object.defineProperty(t,i,{enumerable:!0,get:e[i]})},r.f={},r.e=t=>Promise.all(Object.keys(r.f).reduce(((e,i)=>(r.f[i](t,e),e)),[])),r.u=t=>t+".js",r.g=function(){if("object"==typeof globalThis)return globalThis;try{return this||new Function("return this")()}catch(t){if("object"==typeof window)return window}}(),r.o=(t,e)=>Object.prototype.hasOwnProperty.call(t,e),t={},e="flag:",r.l=(i,n,s,o)=>{if(t[i])t[i].push(n);else{var a,l;if(void 0!==s)for(var h=document.getElementsByTagName("script"),u=0;u<h.length;u++){var c=h[u];if(c.getAttribute("src")==i||c.getAttribute("data-webpack")==e+s){a=c;break}}a||(l=!0,(a=document.createElement("script")).charset="utf-8",a.timeout=120,r.nc&&a.setAttribute("nonce",r.nc),a.setAttribute("data-webpack",e+s),a.src=i),t[i]=[n];var d=(e,n)=>{a.onerror=a.onload=null,clearTimeout(g);var r=t[i];if(delete t[i],a.parentNode&&a.parentNode.removeChild(a),r&&r.forEach((t=>t(n))),e)return e(n)},g=setTimeout(d.bind(null,void 0,{type:"timeout",target:a}),12e4);a.onerror=d.bind(null,a.onerror),a.onload=d.bind(null,a.onload),l&&document.head.appendChild(a)}},r.r=t=>{"undefined"!=typeof Symbol&&Symbol.toStringTag&&Object.defineProperty(t,Symbol.toStringTag,{value:"Module"}),Object.defineProperty(t,"__esModule",{value:!0})},(()=>{var t;r.g.importScripts&&(t=r.g.location+"");var e=r.g.document;if(!t&&e&&(e.currentScript&&(t=e.currentScript.src),!t)){var i=e.getElementsByTagName("script");i.length&&(t=i[i.length-1].src)}if(!t)throw new Error("Automatic publicPath is not supported in this browser");t=t.replace(/#.*$/,"").replace(/\?.*$/,"").replace(/\/[^\/]+$/,"/"),r.p=t+"../"})(),(()=>{var t={774:0};r.f.j=(e,i)=>{var n=r.o(t,e)?t[e]:void 0;if(0!==n)if(n)i.push(n[2]);else{var s=new Promise(((i,r)=>n=t[e]=[i,r]));i.push(n[2]=s);var o=r.p+r.u(e),a=new Error;r.l(o,(i=>{if(r.o(t,e)&&(0!==(n=t[e])&&(t[e]=void 0),n)){var s=i&&("load"===i.type?"missing":i.type),o=i&&i.target&&i.target.src;a.message="Loading chunk "+e+" failed.\n("+s+": "+o+")",a.name="ChunkLoadError",a.type=s,a.request=o,n[1](a)}}),"chunk-"+e,e)}};var e=(e,i)=>{var n,s,[o,a,l]=i,h=0;if(o.some((e=>0!==t[e]))){for(n in a)r.o(a,n)&&(r.m[n]=a[n]);l&&l(r)}for(e&&e(i);h<o.length;h++)s=o[h],r.o(t,s)&&t[s]&&t[s][0](),t[s]=0},i=self.webpackChunkflag=self.webpackChunkflag||[];i.forEach(e.bind(null,0)),i.push=e.bind(null,i.push.bind(i))})(),(()=>{"use strict";var t=r(4559);!function(e,i,n){i.behaviors.openlayers_field={attach:function(i,n){e(i).find('div[data-map="openlayers"]:not([data-inited="true"])').each((function(){e(this).attr("data-inited","true");var i=document.location.href.split("?"),n=null;2===i.length&&(n=i[1].replace(/_format=json&/,"")),new t.OpenlayerMap(e(this).prop("id"),n).init()}))}}}(jQuery,Drupal,drupalSettings)})()})();
\ No newline at end of file
diff --git a/package.json b/package.json
index cef8a59..8ea6b0f 100644
--- a/package.json
+++ b/package.json
@@ -26,7 +26,7 @@
     "jquery": "^3.6.0",
     "minimist": "^1.2.0",
     "monotone-chain-convex-hull": "^1.0.0",
-    "ol": "^6.14.1",
+    "ol": "^7.4",
     "stylelint": "^9.1.1",
     "stylelint-checkstyle-formatter": "^0.1.1",
     "stylelint-config-standard": "^18.2.0",
diff --git a/yarn.lock b/yarn.lock
index 10b204d..ec2672d 100644
--- a/yarn.lock
+++ b/yarn.lock
@@ -212,17 +212,17 @@
   resolved "https://registry.yarnpkg.com/@mapbox/jsonlint-lines-primitives/-/jsonlint-lines-primitives-2.0.2.tgz#ce56e539f83552b58d10d672ea4d6fc9adc7b234"
   integrity sha1-zlblOfg1UrWNENZy6k1vya3HsjQ=
 
-"@mapbox/mapbox-gl-style-spec@^13.20.1":
-  version "13.24.0"
-  resolved "https://registry.yarnpkg.com/@mapbox/mapbox-gl-style-spec/-/mapbox-gl-style-spec-13.24.0.tgz#38e6dbf64eeb934c148cb76b251710d00c0c124f"
-  integrity sha512-9yhRSqnKX+59MrG647x2pACfR2Ewk8Ii5X75Ag8oToEKZU+PSY0+r10EirIVCTDwuHPzp/VuuN3j6n+Hv/gGpQ==
+"@mapbox/mapbox-gl-style-spec@^13.23.1":
+  version "13.28.0"
+  resolved "https://registry.yarnpkg.com/@mapbox/mapbox-gl-style-spec/-/mapbox-gl-style-spec-13.28.0.tgz#2ec226320a0f77856046e000df9b419303a56458"
+  integrity sha512-B8xM7Fp1nh5kejfIl4SWeY0gtIeewbuRencqO3cJDrCHZpaPg7uY+V8abuR+esMeuOjRl5cLhVTP40v+1ywxbg==
   dependencies:
     "@mapbox/jsonlint-lines-primitives" "~2.0.2"
     "@mapbox/point-geometry" "^0.1.0"
     "@mapbox/unitbezier" "^0.0.0"
     csscolorparser "~1.0.2"
     json-stringify-pretty-compact "^2.0.0"
-    minimist "^1.2.5"
+    minimist "^1.2.6"
     rw "^1.3.3"
     sort-object "^0.3.2"
 
@@ -1846,6 +1846,11 @@ dot-prop@^5.2.0:
   dependencies:
     is-obj "^2.0.0"
 
+earcut@^2.2.3:
+  version "2.2.4"
+  resolved "https://registry.yarnpkg.com/earcut/-/earcut-2.2.4.tgz#6d02fd4d68160c114825d06890a92ecaae60343a"
+  integrity sha512-/pjZsA1b4RPHbeWZQn66SWS8nZZWLQQ23oE3Eam7aroEFGEvwKAsJfZ9ytiEMycfzXWpca4FA9QIOehf7PocBQ==
+
 electron-to-chromium@^1.2.7, electron-to-chromium@^1.3.47, electron-to-chromium@^1.4.84:
   version "1.4.118"
   resolved "https://registry.yarnpkg.com/electron-to-chromium/-/electron-to-chromium-1.4.118.tgz#2d917c71712dac9652cc01af46c7d0bd51552974"
@@ -2476,16 +2481,16 @@ gensync@^1.0.0-beta.2:
   resolved "https://registry.yarnpkg.com/gensync/-/gensync-1.0.0-beta.2.tgz#32a6ee76c3d7f52d46b2b1ae5d93fea8580a25e0"
   integrity sha512-3hN7NaskYvMDLQY55gnW3NQ+mesEAepTqlg+VEbj7zzqEMBVNhzcGYYeqFo/TlYz6eQiFcp1HcsCZO+nGgS8zg==
 
-geotiff@^2.0.2:
-  version "2.0.5"
-  resolved "https://registry.yarnpkg.com/geotiff/-/geotiff-2.0.5.tgz#ef94227aba5c1b64167b49c44304b1fea5b01c95"
-  integrity sha512-U5kVYm118YAmw2swiLu8rhfrYnDKOFI7VaMjuQwcq6Intuuid9Pyb4jjxYUxxkq8kOu2r7Am0Rmb52PObGp4pQ==
+geotiff@^2.0.7:
+  version "2.0.7"
+  resolved "https://registry.yarnpkg.com/geotiff/-/geotiff-2.0.7.tgz#358e578233af70bfb0b4dee62d599ad78fc5cfca"
+  integrity sha512-FKvFTNowMU5K6lHYY2f83d4lS2rsCNdpUC28AX61x9ZzzqPNaWFElWv93xj0eJFaNyOYA63ic5OzJ88dHpoA5Q==
   dependencies:
     "@petamoriken/float16" "^3.4.7"
     lerc "^3.0.0"
     pako "^2.0.4"
     parse-headers "^2.0.2"
-    quick-lru "^6.1.0"
+    quick-lru "^6.1.1"
     web-worker "^1.2.0"
     xml-utils "^1.0.2"
 
@@ -3765,22 +3770,23 @@ object.values@^1.1.5:
     define-properties "^1.1.3"
     es-abstract "^1.19.1"
 
-ol-mapbox-style@^7.1.1:
-  version "7.1.1"
-  resolved "https://registry.yarnpkg.com/ol-mapbox-style/-/ol-mapbox-style-7.1.1.tgz#cf33c39badd943c25fc438c689bf678f9aa847a2"
-  integrity sha512-GLTEYiH/Ec9Zn1eS4S/zXyR2sierVrUc+OLVP8Ra0FRyqRhoYbXdko0b7OIeSHWdtJfHssWYefDOGxfTRUUZ/A==
+ol-mapbox-style@^10.1.0:
+  version "10.7.0"
+  resolved "https://registry.yarnpkg.com/ol-mapbox-style/-/ol-mapbox-style-10.7.0.tgz#8837912da2a16fbd22992d76cbc4f491c838b973"
+  integrity sha512-S/UdYBuOjrotcR95Iq9AejGYbifKeZE85D9VtH11ryJLQPTZXZSW1J5bIXcr4AlAH6tyjPPHTK34AdkwB32Myw==
   dependencies:
-    "@mapbox/mapbox-gl-style-spec" "^13.20.1"
+    "@mapbox/mapbox-gl-style-spec" "^13.23.1"
     mapbox-to-css-font "^2.4.1"
-    webfont-matcher "^1.1.0"
+    ol "^7.3.0"
 
-ol@^6.14.1:
-  version "6.14.1"
-  resolved "https://registry.yarnpkg.com/ol/-/ol-6.14.1.tgz#8061bdcf7cd67a665fc8e76545442a702cbc7282"
-  integrity sha512-sIcUWkGud3Y2gT3TJubSHlkyMXiPVh1yxfCPHxmY8+qtm79bB9oRnei9xHVIbRRG0Ro6Ldp5E+BMVSvYCxSpaA==
+ol@^7.3.0, ol@^7.4:
+  version "7.5.2"
+  resolved "https://registry.yarnpkg.com/ol/-/ol-7.5.2.tgz#2e40a16b45331dbee86ca86876fcc7846be0dbb7"
+  integrity sha512-HJbb3CxXrksM6ct367LsP3N+uh+iBBMdP3DeGGipdV9YAYTP0vTJzqGnoqQ6C2IW4qf8krw9yuyQbc9fjOIaOQ==
   dependencies:
-    geotiff "^2.0.2"
-    ol-mapbox-style "^7.1.1"
+    earcut "^2.2.3"
+    geotiff "^2.0.7"
+    ol-mapbox-style "^10.1.0"
     pbf "3.2.1"
     rbush "^3.0.1"
 
@@ -4169,10 +4175,10 @@ quick-lru@^1.0.0:
   resolved "https://registry.yarnpkg.com/quick-lru/-/quick-lru-1.1.0.tgz#4360b17c61136ad38078397ff11416e186dcfbb8"
   integrity sha1-Q2CxfGETatOAeDl/8RQW4Ybc+7g=
 
-quick-lru@^6.1.0:
-  version "6.1.1"
-  resolved "https://registry.yarnpkg.com/quick-lru/-/quick-lru-6.1.1.tgz#f8e5bf9010376c126c80c1a62827a526c0e60adf"
-  integrity sha512-S27GBT+F0NTRiehtbrgaSE1idUAJ5bX8dPAQTdylEyNlrdcH5X4Lz7Edz3DYzecbsCluD5zO8ZNEe04z3D3u6Q==
+quick-lru@^6.1.1:
+  version "6.1.2"
+  resolved "https://registry.yarnpkg.com/quick-lru/-/quick-lru-6.1.2.tgz#e9a90524108629be35287d0b864e7ad6ceb3659e"
+  integrity sha512-AAFUA5O1d83pIHEhJwWCq/RQcRukCkn/NSm2QsTEMle5f2hP0ChI2+3Xb051PZCkLryI/Ir1MVKviT2FIloaTQ==
 
 quickselect@^2.0.0:
   version "2.0.0"
@@ -5410,11 +5416,6 @@ web-worker@^1.2.0:
   resolved "https://registry.yarnpkg.com/web-worker/-/web-worker-1.2.0.tgz#5d85a04a7fbc1e7db58f66595d7a3ac7c9c180da"
   integrity sha512-PgF341avzqyx60neE9DD+XS26MMNMoUQRz9NOZwW32nPQrF6p77f1htcnjBSEV8BGMKZ16choqUG4hyI0Hx7mA==
 
-webfont-matcher@^1.1.0:
-  version "1.1.0"
-  resolved "https://registry.yarnpkg.com/webfont-matcher/-/webfont-matcher-1.1.0.tgz#98ce95097b29e31fbe733053e10e571642d1c6c7"
-  integrity sha1-mM6VCXsp4x++czBT4Q5XFkLRxsc=
-
 webpack-cli@^4.9.2:
   version "4.9.2"
   resolved "https://registry.yarnpkg.com/webpack-cli/-/webpack-cli-4.9.2.tgz#77c1adaea020c3f9e2db8aad8ea78d235c83659d"
