35 lines
346 KiB
HTML
35 lines
346 KiB
HTML
<!DOCTYPE html>
|
||
<html lang="en">
|
||
<head>
|
||
<meta charset="UTF-8" />
|
||
<link rel="icon" type="image/x-icon" href="https://openlayers.org/favicon.ico" />
|
||
<link rel="stylesheet" href="https://cdn.jsdelivr.net/npm/bootstrap@5.2.0/dist/css/bootstrap.min.css">
|
||
<meta name="viewport" content="width=device-width, initial-scale=1.0" />
|
||
<title>Using OpenLayers with Vite</title>
|
||
<script type="module" crossorigin>
|
||
(function(){const t=document.createElement("link").relList;if(t&&t.supports&&t.supports("modulepreload"))return;for(const s of document.querySelectorAll('link[rel="modulepreload"]'))i(s);new MutationObserver(s=>{for(const r of s)if(r.type==="childList")for(const o of r.addedNodes)o.tagName==="LINK"&&o.rel==="modulepreload"&&i(o)}).observe(document,{childList:!0,subtree:!0});function e(s){const r={};return s.integrity&&(r.integrity=s.integrity),s.referrerpolicy&&(r.referrerPolicy=s.referrerpolicy),s.crossorigin==="use-credentials"?r.credentials="include":s.crossorigin==="anonymous"?r.credentials="omit":r.credentials="same-origin",r}function i(s){if(s.ep)return;s.ep=!0;const r=e(s);fetch(s.href,r)}})();const zc={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"};class Bc extends Error{constructor(t){const e=zc[t];super(e),this.code=t,this.name="AssertionError",this.message=e}}const wl=Bc;class Kc{constructor(t){this.propagationStopped,this.defaultPrevented,this.type=t,this.target=null}preventDefault(){this.defaultPrevented=!0}stopPropagation(){this.propagationStopped=!0}}const pe=Kc,Pi={PROPERTYCHANGE:"propertychange"};class Uc{constructor(){this.disposed=!1}dispose(){this.disposed||(this.disposed=!0,this.disposeInternal())}disposeInternal(){}}const Kr=Uc;function Ni(n,t){return n>t?1:n<t?-1:0}function Ur(n,t,e){const i=n.length;if(n[0]<=t)return 0;if(t<=n[i-1])return i-1;{let s;if(e>0){for(s=1;s<i;++s)if(n[s]<t)return s-1}else if(e<0){for(s=1;s<i;++s)if(n[s]<=t)return s}else for(s=1;s<i;++s){if(n[s]==t)return s;if(n[s]<t)return typeof e=="function"?e(t,n[s-1],n[s])>0?s-1:s:n[s-1]-t<t-n[s]?s-1:s}return i-1}}function Hc(n,t,e){for(;t<e;){const i=n[t];n[t]=n[e],n[e]=i,++t,--e}}function Sl(n,t){const e=Array.isArray(t)?t:[t],i=e.length;for(let s=0;s<i;s++)n[n.length]=e[s]}function oi(n,t){const e=n.length;if(e!==t.length)return!1;for(let i=0;i<e;i++)if(n[i]!==t[i])return!1;return!0}function jc(n,t,e){const i=t||Ni;return n.every(function(s,r){if(r===0)return!0;const o=i(n[r-1],s);return!(o>0||e&&o===0)})}function dn(){return!0}function Ss(){return!1}function ii(){}function Zc(n){let t=!1,e,i,s;return function(){const r=Array.prototype.slice.call(arguments);return(!t||this!==s||!oi(r,i))&&(t=!0,s=this,i=r,e=n.apply(this,arguments)),e}}function Rn(n){for(const t in n)delete n[t]}function fn(n){let t;for(t in n)return!1;return!t}class qc extends Kr{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_={}),s=i[t]||(i[t]=[]);s.includes(e)||s.push(e)}dispatchEvent(t){const e=typeof t=="string",i=e?t:t.type,s=this.listeners_&&this.listeners_[i];if(!s)return;const r=e?new pe(t):t;r.target||(r.target=this.eventTarget_||this);const o=this.dispatching_||(this.dispatching_={}),a=this.pendingRemovals_||(this.pendingRemovals_={});i in o||(o[i]=0,a[i]=0),++o[i];let l;for(let h=0,c=s.length;h<c;++h)if("handleEvent"in s[h]?l=s[h].handleEvent(r):l=s[h].call(this,r),l===!1||r.propagationStopped){l=!1;break}if(--o[i]===0){let h=a[i];for(delete a[i];h--;)this.removeEventListener(i,ii);delete o[i]}return l}disposeInternal(){this.listeners_&&Rn(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:!1}removeEventListener(t,e){const i=this.listeners_&&this.listeners_[t];if(i){const s=i.indexOf(e);s!==-1&&(this.pendingRemovals_&&t in this.pendingRemovals_?(i[s]=ii,++this.pendingRemovals_[t]):(i.splice(s,1),i.length===0&&delete this.listeners_[t]))}}}const Rs=qc,W={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"};function z(n,t,e,i,s){if(i&&i!==n&&(e=e.bind(i)),s){const o=e;e=function(){n.removeEventListener(t,e),o.apply(this,arguments)}}const r={target:n,type:t,listener:e};return n.addEventListener(t,e),r}function ls(n,t,e,i){return z(n,t,e,i,!0)}function J(n){n&&n.target&&(n.target.removeEventListener(n.type,n.listener),Rn(n))}class Is extends Rs{constructor(){super(),this.on=this.onInternal,this.once=this.onceInternal,this.un=this.unInternal,this.revision_=0}changed(){++this.revision_,this.dispatchEvent(W.CHANGE)}getRevision(){return this.revision_}onInternal(t,e){if(Array.isArray(t)){const i=t.length,s=new Array(i);for(let r=0;r<i;++r)s[r]=z(this,t[r],e);return s}else return z(this,t,e)}onceInternal(t,e){let i;if(Array.isArray(t)){const s=t.length;i=new Array(s);for(let r=0;r<s;++r)i[r]=ls(this,t[r],e)}else i=ls(this,t,e);return e.ol_key=i,i}unInternal(t,e){const i=e.ol_key;if(i)Jc(i);else if(Array.isArray(t))for(let s=0,r=t.length;s<r;++s)this.removeEventListener(t[s],e);else this.removeEventListener(t,e)}}Is.prototype.on;Is.prototype.once;Is.prototype.un;function Jc(n){if(Array.isArray(n))for(let t=0,e=n.length;t<e;++t)J(n[t]);else J(n)}const Rl=Is;function B(){throw new Error("Unimplemented abstract method.")}let Qc=0;function U(n){return n.ol_uid||(n.ol_uid=String(++Qc))}class jo extends pe{constructor(t,e,i){super(t),this.key=e,this.oldValue=i}}class tu extends Rl{constructor(t){super(),this.on,this.once,this.un,U(this),this.values_=null,t!==void 0&&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 jo(i,t,e)),i=Pi.PROPERTYCHANGE,this.hasListener(i)&&this.dispatchEvent(new jo(i,t,e))}addChangeListener(t,e){this.addEventListener(`change:${t}`,e)}removeChangeListener(t,e){this.removeEventListener(`change:${t}`,e)}set(t,e,i){const s=this.values_||(this.values_={});if(i)s[t]=e;else{const r=s[t];s[t]=e,r!==e&&this.notify(t,r)}}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],fn(this.values_)&&(this.values_=null),e||this.notify(t,i)}}}const zt=tu,yt={ADD:"add",REMOVE:"remove"},Zo={LENGTH:"length"};class Gn extends pe{constructor(t,e,i){super(t),this.element=e,this.index=i}}class eu extends zt{constructor(t,e){if(super(),this.on,this.once,this.un,e=e||{},this.unique_=!!e.unique,this.array_=t||[],this.unique_)for(let i=0,s=this.array_.length;i<s;++i)this.assertUnique_(this.array_[i],i);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,s=e.length;i<s;++i)t(e[i],i,e)}getArray(){return this.array_}item(t){return this.array_[t]}getLength(){return this.get(Zo.LENGTH)}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 Gn(yt.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,s=e.length;i<s;++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 Gn(yt.REMOVE,e,t)),e}setAt(t,e){const i=this.getLength();if(t>=i){this.insertAt(t,e);return}if(t<0)throw new Error("Index out of bounds: "+t);this.unique_&&this.assertUnique_(e,t);const s=this.array_[t];this.array_[t]=e,this.dispatchEvent(new Gn(yt.REMOVE,s,t)),this.dispatchEvent(new Gn(yt.ADD,e,t))}updateLength_(){this.set(Zo.LENGTH,this.array_.length)}assertUnique_(t,e){for(let i=0,s=this.array_.length;i<s;++i)if(this.array_[i]===t&&i!==e)throw new wl(58)}}const Zt=eu;function V(n,t){if(!n)throw new wl(t)}class Hr extends zt{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(typeof t.getSimplifiedGeometry=="function"){const e=t;this.setGeometry(e)}else{const e=t;this.setProperties(e)}}clone(){const t=new Hr(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_&&(J(this.geometryChangeKey_),this.geometryChangeKey_=null);const t=this.getGeometry();t&&(this.geometryChangeKey_=z(t,W.CHANGE,this.handleGeometryChange_,this)),this.changed()}setGeometry(t){this.set(this.geometryName_,t)}setStyle(t){this.style_=t,this.styleFunction_=t?iu(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 iu(n){if(typeof n=="function")return n;{let t;return Array.isArray(n)?t=n:(V(typeof n.getZIndex=="function",41),t=[n]),function(){return t}}}const nu=Hr,De=typeof navigator<"u"&&typeof navigator.userAgent<"u"?navigator.userAgent.toLowerCase():"",su=De.includes("firefox"),ru=De.includes("safari")&&!De.includes("chrom");ru&&(De.includes("version/15.4")||/cpu (os|iphone os) 15_4 like mac os x/.test(De));const ou=De.includes("webkit")&&!De.includes("edge"),au=De.includes("macintosh"),Il=typeof devicePixelRatio<"u"?devicePixelRatio:1,jr=typeof WorkerGlobalScope<"u"&&typeof OffscreenCanvas<"u"&&self instanceof WorkerGlobalScope,lu=typeof Image<"u"&&Image.prototype.decode,bl=function(){let n=!1;try{const t=Object.defineProperty({},"passive",{get:function(){n=!0}});window.addEventListener("_",null,t),window.removeEventListener("_",null,t)}catch{}return n}();new Array(6);function Jt(){return[1,0,0,1,0,0]}function hu(n,t,e,i,s,r,o){return n[0]=t,n[1]=e,n[2]=i,n[3]=s,n[4]=r,n[5]=o,n}function cu(n,t){return n[0]=t[0],n[1]=t[1],n[2]=t[2],n[3]=t[3],n[4]=t[4],n[5]=t[5],n}function rt(n,t){const e=t[0],i=t[1];return t[0]=n[0]*e+n[2]*i+n[4],t[1]=n[1]*e+n[3]*i+n[5],t}function uu(n,t,e){return hu(n,t,0,0,e,0,0)}function Me(n,t,e,i,s,r,o,a){const l=Math.sin(r),h=Math.cos(r);return n[0]=i*h,n[1]=s*l,n[2]=-i*l,n[3]=s*h,n[4]=o*i*h-a*i*l+t,n[5]=o*s*l+a*s*h+e,n}function Zr(n,t){const e=du(t);V(e!==0,32);const i=t[0],s=t[1],r=t[2],o=t[3],a=t[4],l=t[5];return n[0]=o/e,n[1]=-s/e,n[2]=-r/e,n[3]=i/e,n[4]=(r*l-o*a)/e,n[5]=-(i*l-s*a)/e,n}function du(n){return n[0]*n[3]-n[1]*n[2]}let qo;function Al(n){const t="matrix("+n.join(", ")+")";if(jr)return t;const e=qo||(qo=document.createElement("div"));return e.style.transform=t,e.style.transform}const st={UNKNOWN:0,INTERSECTING:1,ABOVE:2,RIGHT:4,BELOW:8,LEFT:16};function Jo(n){const t=Xt();for(let e=0,i=n.length;e<i;++e)on(t,n[e]);return t}function fu(n,t,e){const i=Math.min.apply(null,n),s=Math.min.apply(null,t),r=Math.max.apply(null,n),o=Math.max.apply(null,t);return ee(i,s,r,o,e)}function qr(n,t,e){return e?(e[0]=n[0]-t,e[1]=n[1]-t,e[2]=n[2]+t,e[3]=n[3]+t,e):[n[0]-t,n[1]-t,n[2]+t,n[3]+t]}function Ol(n,t){return t?(t[0]=n[0],t[1]=n[1],t[2]=n[2],t[3]=n[3],t):n.slice()}function Ll(n,t,e){let i,s;return t<n[0]?i=n[0]-t:n[2]<t?i=t-n[2]:i=0,e<n[1]?s=n[1]-e:n[3]<e?s=e-n[3]:s=0,i*i+s*s}function bs(n,t){return Dl(n,t[0],t[1])}function Ue(n,t){return n[0]<=t[0]&&t[2]<=n[2]&&n[1]<=t[1]&&t[3]<=n[3]}function Dl(n,t,e){return n[0]<=t&&t<=n[2]&&n[1]<=e&&e<=n[3]}function Sr(n,t){const e=n[0],i=n[1],s=n[2],r=n[3],o=t[0],a=t[1];let l=st.UNKNOWN;return o<e?l=l|st.LEFT:o>s&&(l=l|st.RIGHT),a<i?l=l|st.BELOW:a>r&&(l=l|st.ABOVE),l===st.UNKNOWN&&(l=st.INTERSECTING),l}function Xt(){return[1/0,1/0,-1/0,-1/0]}function ee(n,t,e,i,s){return s?(s[0]=n,s[1]=t,s[2]=e,s[3]=i,s):[n,t,e,i]}function As(n){return ee(1/0,1/0,-1/0,-1/0,n)}function gu(n,t){const e=n[0],i=n[1];return ee(e,i,e,i,t)}function _u(n,t,e,i,s){const r=As(s);return Ml(r,n,t,e,i)}function gn(n,t){return n[0]==t[0]&&n[2]==t[2]&&n[1]==t[1]&&n[3]==t[3]}function mu(n,t){return t[0]<n[0]&&(n[0]=t[0]),t[2]>n[2]&&(n[2]=t[2]),t[1]<n[1]&&(n[1]=t[1]),t[3]>n[3]&&(n[3]=t[3]),n}function on(n,t){t[0]<n[0]&&(n[0]=t[0]),t[0]>n[2]&&(n[2]=t[0]),t[1]<n[1]&&(n[1]=t[1]),t[1]>n[3]&&(n[3]=t[1])}function Ml(n,t,e,i,s){for(;e<i;e+=s)pu(n,t[e],t[e+1]);return n}function pu(n,t,e){n[0]=Math.min(n[0],t),n[1]=Math.min(n[1],e),n[2]=Math.max(n[2],t),n[3]=Math.max(n[3],e)}function Pl(n,t){let e;return e=t(Os(n)),e||(e=t(Ls(n)),e)||(e=t(Ds(n)),e)||(e=t(ai(n)),e)?e:!1}function Rr(n){let t=0;return Jr(n)||(t=q(n)*ie(n)),t}function Os(n){return[n[0],n[1]]}function Ls(n){return[n[2],n[1]]}function Fi(n){return[(n[0]+n[2])/2,(n[1]+n[3])/2]}function Eu(n,t){let e;return t==="bottom-left"?e=Os(n):t==="bottom-right"?e=Ls(n):t==="top-left"?e=ai(n):t==="top-right"?e=Ds(n):V(!1,13),e}function Ir(n,t,e,i,s){const[r,o,a,l,h,c,u,d]=br(n,t,e,i);return ee(Math.min(r,a,h,u),Math.min(o,l,c,d),Math.max(r,a,h,u),Math.max(o,l,c,d),s)}function br(n,t,e,i){const s=t*i[0]/2,r=t*i[1]/2,o=Math.cos(e),a=Math.sin(e),l=s*o,h=s*a,c=r*o,u=r*a,d=n[0],f=n[1];return[d-l+u,f-h-c,d-l-u,f-h+c,d+l-u,f+h+c,d+l+u,f+h-c,d-l+u,f-h-c]}function ie(n){return n[3]-n[1]}function an(n,t,e){const i=e||Xt();return vt(n,t)?(n[0]>t[0]?i[0]=n[0]:i[0]=t[0],n[1]>t[1]?i[1]=n[1]:i[1]=t[1],n[2]<t[2]?i[2]=n[2]:i[2]=t[2],n[3]<t[3]?i[3]=n[3]:i[3]=t[3]):As(i),i}function ai(n){return[n[0],n[3]]}function Ds(n){return[n[2],n[3]]}function q(n){return n[2]-n[0]}function vt(n,t){return n[0]<=t[2]&&n[2]>=t[0]&&n[1]<=t[3]&&n[3]>=t[1]}function Jr(n){return n[2]<n[0]||n[3]<n[1]}function yu(n,t){return t?(t[0]=n[0],t[1]=n[1],t[2]=n[2],t[3]=n[3],t):n}function vu(n,t,e){let i=!1;const s=Sr(n,t),r=Sr(n,e);if(s===st.INTERSECTING||r===st.INTERSECTING)i=!0;else{const o=n[0],a=n[1],l=n[2],h=n[3],c=t[0],u=t[1],d=e[0],f=e[1],g=(f-u)/(d-c);let _,m;r&st.ABOVE&&!(s&st.ABOVE)&&(_=d-(f-h)/g,i=_>=o&&_<=l),!i&&r&st.RIGHT&&!(s&st.RIGHT)&&(m=f-(d-l)*g,i=m>=a&&m<=h),!i&&r&st.BELOW&&!(s&st.BELOW)&&(_=d-(f-a)/g,i=_>=o&&_<=l),!i&&r&st.LEFT&&!(s&st.LEFT)&&(m=f-(d-o)*g,i=m>=a&&m<=h)}return i}function xu(n,t,e,i){let s=[];if(i>1){const a=n[2]-n[0],l=n[3]-n[1];for(let h=0;h<i;++h)s.push(n[0]+a*h/i,n[1],n[2],n[1]+l*h/i,n[2]-a*h/i,n[3],n[0],n[3]-l*h/i)}else s=[n[0],n[1],n[2],n[1],n[2],n[3],n[0],n[3]];t(s,s,2);const r=[],o=[];for(let a=0,l=s.length;a<l;a+=2)r.push(s[a]),o.push(s[a+1]);return fu(r,o,e)}function Nl(n,t){const e=t.getExtent(),i=Fi(n);if(t.canWrapX()&&(i[0]<e[0]||i[0]>=e[2])){const s=q(e),o=Math.floor((i[0]-e[0])/s)*s;n[0]-=o,n[2]-=o}return n}function Tu(n,t){if(t.canWrapX()){const e=t.getExtent();if(!isFinite(n[0])||!isFinite(n[2]))return[[e[0],n[1],e[2],n[3]]];Nl(n,t);const i=q(e);if(q(n)>i)return[[e[0],n[1],e[2],n[3]]];if(n[0]<e[0])return[[n[0]+i,n[1],e[2],n[3]],[e[0],n[1],n[2],n[3]]];if(n[2]>e[2])return[[n[0],n[1],e[2],n[3]],[e[0],n[1],n[2]-i,n[3]]]}return[n]}const ni={radians:6370997/(2*Math.PI),degrees:2*Math.PI*6370997/360,ft:.3048,m:1,"us-ft":1200/3937};class Cu{constructor(t){this.code_=t.code,this.units_=t.units,this.extent_=t.extent!==void 0?t.extent:null,this.worldExtent_=t.worldExtent!==void 0?t.worldExtent:null,this.axisOrientation_=t.axisOrientation!==void 0?t.axisOrientation:"enu",this.global_=t.global!==void 0?t.global:!1,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_||ni[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_}}const Fl=Cu,In=6378137,bi=Math.PI*In,wu=[-bi,-bi,bi,bi],Su=[-180,-85,180,85],Yn=In*Math.log(Math.tan(Math.PI/2));class gi extends Fl{constructor(t){super({code:t,units:"m",extent:wu,global:!0,worldExtent:Su,getPointResolution:function(e,i){return e/Math.cosh(i[1]/In)}})}}const Qo=[new gi("EPSG:3857"),new gi("EPSG:102100"),new gi("EPSG:102113"),new gi("EPSG:900913"),new gi("http://www.opengis.net/def/crs/EPSG/0/3857"),new gi("http://www.opengis.net/gml/srs/epsg.xml#3857")];function Ru(n,t,e){const i=n.length;e=e>1?e:2,t===void 0&&(e>2?t=n.slice():t=new Array(i));for(let s=0;s<i;s+=e){t[s]=bi*n[s]/180;let r=In*Math.log(Math.tan(Math.PI*(+n[s+1]+90)/360));r>Yn?r=Yn:r<-Yn&&(r=-Yn),t[s+1]=r}return t}function Iu(n,t,e){const i=n.length;e=e>1?e:2,t===void 0&&(e>2?t=n.slice():t=new Array(i));for(let s=0;s<i;s+=e)t[s]=180*n[s]/bi,t[s+1]=360*Math.atan(Math.exp(n[s+1]/In))/Math.PI-90;return t}const bu=6378137,ta=[-180,-90,180,90],Au=Math.PI*bu/180;class Xe extends Fl{constructor(t,e){super({code:t,units:"degrees",extent:ta,axisOrientation:e,global:!0,metersPerUnit:Au,worldExtent:ta})}}const ea=[new Xe("CRS:84"),new Xe("EPSG:4326","neu"),new Xe("urn:ogc:def:crs:OGC:1.3:CRS84"),new Xe("urn:ogc:def:crs:OGC:2:84"),new Xe("http://www.opengis.net/def/crs/OGC/1.3/CRS84"),new Xe("http://www.opengis.net/gml/srs/epsg.xml#4326","neu"),new Xe("http://www.opengis.net/def/crs/EPSG/0/4326","neu")];let Ar={};function Ou(n){return Ar[n]||Ar[n.replace(/urn:(x-)?ogc:def:crs:EPSG:(.*:)?(\w+)$/,"EPSG:$3")]||null}function Lu(n,t){Ar[n]=t}let Li={};function hs(n,t,e){const i=n.getCode(),s=t.getCode();i in Li||(Li[i]={}),Li[i][s]=e}function Du(n,t){let e;return n in Li&&t in Li[n]&&(e=Li[n][t]),e}function et(n,t,e){return Math.min(Math.max(n,t),e)}function Mu(n,t,e,i,s,r){const o=s-e,a=r-i;if(o!==0||a!==0){const l=((n-e)*o+(t-i)*a)/(o*o+a*a);l>1?(e=s,i=r):l>0&&(e+=o*l,i+=a*l)}return Di(n,t,e,i)}function Di(n,t,e,i){const s=e-n,r=i-t;return s*s+r*r}function Pu(n){const t=n.length;for(let i=0;i<t;i++){let s=i,r=Math.abs(n[i][i]);for(let a=i+1;a<t;a++){const l=Math.abs(n[a][i]);l>r&&(r=l,s=a)}if(r===0)return null;const o=n[s];n[s]=n[i],n[i]=o;for(let a=i+1;a<t;a++){const l=-n[a][i]/n[i][i];for(let h=i;h<t+1;h++)i==h?n[a][h]=0:n[a][h]+=l*n[i][h]}}const e=new Array(t);for(let i=t-1;i>=0;i--){e[i]=n[i][t]/n[i][i];for(let s=i-1;s>=0;s--)n[s][t]-=n[s][i]*e[i]}return e}function ss(n){return n*Math.PI/180}function Mi(n,t){const e=n%t;return e*t<0?e+t:e}function Be(n,t,e){return n+e*(t-n)}function kl(n,t){const e=Math.pow(10,t);return Math.round(n*e)/e}function Vn(n,t){return Math.floor(kl(n,t))}function Xn(n,t){return Math.ceil(kl(n,t))}function Nu(n,t){return n[0]+=+t[0],n[1]+=+t[1],n}function cs(n,t){let e=!0;for(let i=n.length-1;i>=0;--i)if(n[i]!=t[i]){e=!1;break}return e}function Qr(n,t){const e=Math.cos(t),i=Math.sin(t),s=n[0]*e-n[1]*i,r=n[1]*e+n[0]*i;return n[0]=s,n[1]=r,n}function Fu(n,t){return n[0]*=t,n[1]*=t,n}function $l(n,t){if(t.canWrapX()){const e=q(t.getExtent()),i=ku(n,t,e);i&&(n[0]-=i*e)}return n}function ku(n,t,e){const i=t.getExtent();let s=0;return t.canWrapX()&&(n[0]<i[0]||n[0]>i[2])&&(e=e||q(i),s=Math.floor((n[0]-i[0])/e)),s}const $u=63710088e-1;function ia(n,t,e){e=e||$u;const i=ss(n[1]),s=ss(t[1]),r=(s-i)/2,o=ss(t[0]-n[0])/2,a=Math.sin(r)*Math.sin(r)+Math.sin(o)*Math.sin(o)*Math.cos(i)*Math.cos(s);return 2*e*Math.atan2(Math.sqrt(a),Math.sqrt(1-a))}let Or=!0;function Wu(n){Or=!(n===void 0?!0:n)}function to(n,t,e){if(t!==void 0){for(let i=0,s=n.length;i<s;++i)t[i]=n[i];t=t}else t=n.slice();return t}function Wl(n,t,e){if(t!==void 0&&n!==t){for(let i=0,s=n.length;i<s;++i)t[i]=n[i];n=t}return n}function Gu(n){Lu(n.getCode(),n),hs(n,n,to)}function Yu(n){n.forEach(Gu)}function Rt(n){return typeof n=="string"?Ou(n):n||null}function na(n,t,e,i){n=Rt(n);let s;const r=n.getPointResolutionFunc();if(r){if(s=r(t,e),i&&i!==n.getUnits()){const o=n.getMetersPerUnit();o&&(s=s*o/ni[i])}}else{const o=n.getUnits();if(o=="degrees"&&!i||i=="degrees")s=t;else{const a=Ms(n,Rt("EPSG:4326"));if(a===Wl&&o!=="degrees")s=t*n.getMetersPerUnit();else{let h=[e[0]-t/2,e[1],e[0]+t/2,e[1],e[0],e[1]-t/2,e[0],e[1]+t/2];h=a(h,h,2);const c=ia(h.slice(0,2),h.slice(2,4)),u=ia(h.slice(4,6),h.slice(6,8));s=(c+u)/2}const l=i?ni[i]:n.getMetersPerUnit();l!==void 0&&(s/=l)}}return s}function sa(n){Yu(n),n.forEach(function(t){n.forEach(function(e){t!==e&&hs(t,e,to)})})}function Vu(n,t,e,i){n.forEach(function(s){t.forEach(function(r){hs(s,r,e),hs(r,s,i)})})}function eo(n,t){return n?typeof n=="string"?Rt(n):n:Rt(t)}function vi(n,t){if(n===t)return!0;const e=n.getUnits()===t.getUnits();return(n.getCode()===t.getCode()||Ms(n,t)===to)&&e}function Ms(n,t){const e=n.getCode(),i=t.getCode();let s=Du(e,i);return s||(s=Wl),s}function _n(n,t){const e=Rt(n),i=Rt(t);return Ms(e,i)}function io(n,t,e){return _n(t,e)(n,void 0,n.length)}function Gl(n,t,e,i){const s=_n(t,e);return xu(n,s,void 0,i)}let Nt=null;function Xu(n){Nt=Rt(n)}function Yl(){return Nt}function zu(){Xu("EPSG:4326")}function Lr(n,t){return Nt?io(n,t,Nt):n}function he(n,t){return Nt?io(n,Nt,t):(Or&&!cs(n,[0,0])&&n[0]>=-180&&n[0]<=180&&n[1]>=-90&&n[1]<=90&&(Or=!1,console.warn("Call useGeographic() from ol/proj once to work with [longitude, latitude] coordinates.")),n)}function Dr(n,t){return Nt?Gl(n,t,Nt):n}function He(n,t){return Nt?Gl(n,Nt,t):n}function Bu(n,t){if(!Nt)return n;const e=Rt(t).getUnits(),i=Nt.getUnits();return e&&i?n*ni[e]/ni[i]:n}function Ku(){sa(Qo),sa(ea),Vu(ea,Qo,Ru,Iu)}Ku();function ti(n,t,e,i,s,r){r=r||[];let o=0;for(let a=t;a<e;a+=i){const l=n[a],h=n[a+1];r[o++]=s[0]*l+s[2]*h+s[4],r[o++]=s[1]*l+s[3]*h+s[5]}return r&&r.length!=o&&(r.length=o),r}function Vl(n,t,e,i,s,r,o){o=o||[];const a=Math.cos(s),l=Math.sin(s),h=r[0],c=r[1];let u=0;for(let d=t;d<e;d+=i){const f=n[d]-h,g=n[d+1]-c;o[u++]=h+f*a-g*l,o[u++]=c+f*l+g*a;for(let _=d+2;_<d+i;++_)o[u++]=n[_]}return o&&o.length!=u&&(o.length=u),o}function Uu(n,t,e,i,s,r,o,a){a=a||[];const l=o[0],h=o[1];let c=0;for(let u=t;u<e;u+=i){const d=n[u]-l,f=n[u+1]-h;a[c++]=l+s*d,a[c++]=h+r*f;for(let g=u+2;g<u+i;++g)a[c++]=n[g]}return a&&a.length!=c&&(a.length=c),a}function Hu(n,t,e,i,s,r,o){o=o||[];let a=0;for(let l=t;l<e;l+=i){o[a++]=n[l]+s,o[a++]=n[l+1]+r;for(let h=l+2;h<l+i;++h)o[a++]=n[h]}return o&&o.length!=a&&(o.length=a),o}const ra=Jt();class ju extends zt{constructor(){super(),this.extent_=Xt(),this.extentRevision_=-1,this.simplifiedGeometryMaxMinSquaredTolerance=0,this.simplifiedGeometryRevision=0,this.simplifyTransformedInternal=Zc(function(t,e,i){if(!i)return this.getSimplifiedGeometry(e);const s=this.clone();return s.applyTransform(i),s.getSimplifiedGeometry(e)})}simplifyTransformed(t,e){return this.simplifyTransformedInternal(this.getRevision(),t,e)}clone(){return B()}closestPointXY(t,e,i,s){return B()}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 B()}getExtent(t){if(this.extentRevision_!=this.getRevision()){const e=this.computeExtent(this.extent_);(isNaN(e[0])||isNaN(e[1]))&&As(e),this.extentRevision_=this.getRevision()}return yu(this.extent_,t)}rotate(t,e){B()}scale(t,e,i){B()}simplify(t){return this.getSimplifiedGeometry(t*t)}getSimplifiedGeometry(t){return B()}getType(){return B()}applyTransform(t){B()}intersectsExtent(t){return B()}translate(t,e){B()}transform(t,e){const i=Rt(t),s=i.getUnits()=="tile-pixels"?function(r,o,a){const l=i.getExtent(),h=i.getWorldExtent(),c=ie(h)/ie(l);return Me(ra,h[0],h[3],c,-c,0,0,0),ti(r,0,r.length,a,ra,o),_n(i,e)(r,o,a)}:_n(i,e);return this.applyTransform(s),this}}const Zu=ju;class qu extends Zu{constructor(){super(),this.layout="XY",this.stride=2,this.flatCoordinates=null}computeExtent(t){return _u(this.flatCoordinates,0,this.flatCoordinates.length,this.stride,t)}getCoordinates(){return B()}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||this.simplifiedGeometryMaxMinSquaredTolerance!==0&&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=oa(t),this.layout=t,this.flatCoordinates=e}setCoordinates(t,e){B()}setLayout(t,e,i){let s;if(t)s=oa(t);else{for(let r=0;r<i;++r)if(e.length===0){this.layout="XY",this.stride=2;return}else e=e[0];s=e.length,t=Ju(s)}this.layout=t,this.stride=s}applyTransform(t){this.flatCoordinates&&(t(this.flatCoordinates,this.flatCoordinates,this.stride),this.changed())}rotate(t,e){const i=this.getFlatCoordinates();if(i){const s=this.getStride();Vl(i,0,i.length,s,t,e,i),this.changed()}}scale(t,e,i){e===void 0&&(e=t),i||(i=Fi(this.getExtent()));const s=this.getFlatCoordinates();if(s){const r=this.getStride();Uu(s,0,s.length,r,t,e,i,s),this.changed()}}translate(t,e){const i=this.getFlatCoordinates();if(i){const s=this.getStride();Hu(i,0,i.length,s,t,e,i),this.changed()}}}function Ju(n){let t;return n==2?t="XY":n==3?t="XYZ":n==4&&(t="XYZM"),t}function oa(n){let t;return n=="XY"?t=2:n=="XYZ"||n=="XYM"?t=3:n=="XYZM"&&(t=4),t}function Qu(n,t,e){const i=n.getFlatCoordinates();if(i){const s=n.getStride();return ti(i,0,i.length,s,t,e)}else return null}const no=qu;function aa(n,t,e,i,s,r,o){const a=n[t],l=n[t+1],h=n[e]-a,c=n[e+1]-l;let u;if(h===0&&c===0)u=t;else{const d=((s-a)*h+(r-l)*c)/(h*h+c*c);if(d>1)u=e;else if(d>0){for(let f=0;f<i;++f)o[f]=Be(n[t+f],n[e+f],d);o.length=i;return}else u=t}for(let d=0;d<i;++d)o[d]=n[u+d];o.length=i}function Xl(n,t,e,i,s){let r=n[t],o=n[t+1];for(t+=i;t<e;t+=i){const a=n[t],l=n[t+1],h=Di(r,o,a,l);h>s&&(s=h),r=a,o=l}return s}function td(n,t,e,i,s){for(let r=0,o=e.length;r<o;++r){const a=e[r];s=Xl(n,t,a,i,s),t=a}return s}function zl(n,t,e,i,s,r,o,a,l,h,c){if(t==e)return h;let u,d;if(s===0)if(d=Di(o,a,n[t],n[t+1]),d<h){for(u=0;u<i;++u)l[u]=n[t+u];return l.length=i,d}else return h;c=c||[NaN,NaN];let f=t+i;for(;f<e;)if(aa(n,f-i,f,i,o,a,c),d=Di(o,a,c[0],c[1]),d<h){for(h=d,u=0;u<i;++u)l[u]=c[u];l.length=i,f+=i}else f+=i*Math.max((Math.sqrt(d)-Math.sqrt(h))/s|0,1);if(r&&(aa(n,e-i,t,i,o,a,c),d=Di(o,a,c[0],c[1]),d<h)){for(h=d,u=0;u<i;++u)l[u]=c[u];l.length=i}return h}function ed(n,t,e,i,s,r,o,a,l,h,c){c=c||[NaN,NaN];for(let u=0,d=e.length;u<d;++u){const f=e[u];h=zl(n,t,f,i,s,r,o,a,l,h,c),t=f}return h}function id(n,t,e,i){for(let s=0,r=e.length;s<r;++s)n[t++]=e[s];return t}function Bl(n,t,e,i){for(let s=0,r=e.length;s<r;++s){const o=e[s];for(let a=0;a<i;++a)n[t++]=o[a]}return t}function nd(n,t,e,i,s){s=s||[];let r=0;for(let o=0,a=e.length;o<a;++o){const l=Bl(n,t,e[o],i);s[r++]=l,t=l}return s.length=r,s}function sd(n,t,e,i,s,r,o){const a=(e-t)/i;if(a<3){for(;t<e;t+=i)r[o++]=n[t],r[o++]=n[t+1];return o}const l=new Array(a);l[0]=1,l[a-1]=1;const h=[t,e-i];let c=0;for(;h.length>0;){const u=h.pop(),d=h.pop();let f=0;const g=n[d],_=n[d+1],m=n[u],p=n[u+1];for(let E=d+i;E<u;E+=i){const v=n[E],y=n[E+1],x=Mu(v,y,g,_,m,p);x>f&&(c=E,f=x)}f>s&&(l[(c-t)/i]=1,d+i<c&&h.push(d,c),c+i<u&&h.push(c,u))}for(let u=0;u<a;++u)l[u]&&(r[o++]=n[t+u*i],r[o++]=n[t+u*i+1]);return o}function Ke(n,t){return t*Math.round(n/t)}function rd(n,t,e,i,s,r,o){if(t==e)return o;let a=Ke(n[t],s),l=Ke(n[t+1],s);t+=i,r[o++]=a,r[o++]=l;let h,c;do if(h=Ke(n[t],s),c=Ke(n[t+1],s),t+=i,t==e)return r[o++]=h,r[o++]=c,o;while(h==a&&c==l);for(;t<e;){const u=Ke(n[t],s),d=Ke(n[t+1],s);if(t+=i,u==h&&d==c)continue;const f=h-a,g=c-l,_=u-a,m=d-l;if(f*m==g*_&&(f<0&&_<f||f==_||f>0&&_>f)&&(g<0&&m<g||g==m||g>0&&m>g)){h=u,c=d;continue}r[o++]=h,r[o++]=c,a=h,l=c,h=u,c=d}return r[o++]=h,r[o++]=c,o}function od(n,t,e,i,s,r,o,a){for(let l=0,h=e.length;l<h;++l){const c=e[l];o=rd(n,t,c,i,s,r,o),a.push(o),t=c}return o}function Ai(n,t,e,i,s){s=s!==void 0?s:[];let r=0;for(let o=t;o<e;o+=i)s[r++]=n.slice(o,o+i);return s.length=r,s}function us(n,t,e,i,s){s=s!==void 0?s:[];let r=0;for(let o=0,a=e.length;o<a;++o){const l=e[o];s[r++]=Ai(n,t,l,i,s[r]),t=l}return s.length=r,s}function la(n,t,e,i,s){s=s!==void 0?s:[];let r=0;for(let o=0,a=e.length;o<a;++o){const l=e[o];s[r++]=l.length===1&&l[0]===t?[]:us(n,t,l,i,s[r]),t=l[l.length-1]}return s.length=r,s}function Kl(n,t,e,i){let s=0,r=n[e-i],o=n[e-i+1];for(;t<e;t+=i){const a=n[t],l=n[t+1];s+=o*a-r*l,r=a,o=l}return s/2}function ad(n,t,e,i){let s=0;for(let r=0,o=e.length;r<o;++r){const a=e[r];s+=Kl(n,t,a,i),t=a}return s}class ds extends no{constructor(t,e){super(),this.maxDelta_=-1,this.maxDeltaRevision_=-1,e!==void 0&&!Array.isArray(t[0])?this.setFlatCoordinates(e,t):this.setCoordinates(t,e)}clone(){return new ds(this.flatCoordinates.slice(),this.layout)}closestPointXY(t,e,i,s){return s<Ll(this.getExtent(),t,e)?s:(this.maxDeltaRevision_!=this.getRevision()&&(this.maxDelta_=Math.sqrt(Xl(this.flatCoordinates,0,this.flatCoordinates.length,this.stride,0)),this.maxDeltaRevision_=this.getRevision()),zl(this.flatCoordinates,0,this.flatCoordinates.length,this.stride,this.maxDelta_,!0,t,e,i,s))}getArea(){return Kl(this.flatCoordinates,0,this.flatCoordinates.length,this.stride)}getCoordinates(){return Ai(this.flatCoordinates,0,this.flatCoordinates.length,this.stride)}getSimplifiedGeometryInternal(t){const e=[];return e.length=sd(this.flatCoordinates,0,this.flatCoordinates.length,this.stride,t,e,0),new ds(e,"XY")}getType(){return"LinearRing"}intersectsExtent(t){return!1}setCoordinates(t,e){this.setLayout(e,t,1),this.flatCoordinates||(this.flatCoordinates=[]),this.flatCoordinates.length=Bl(this.flatCoordinates,0,t,this.stride),this.changed()}}const ha=ds;class so extends no{constructor(t,e){super(),this.setCoordinates(t,e)}clone(){const t=new so(this.flatCoordinates.slice(),this.layout);return t.applyProperties(this),t}closestPointXY(t,e,i,s){const r=this.flatCoordinates,o=Di(t,e,r[0],r[1]);if(o<s){const a=this.stride;for(let l=0;l<a;++l)i[l]=r[l];return i.length=a,o}else return s}getCoordinates(){return this.flatCoordinates?this.flatCoordinates.slice():[]}computeExtent(t){return gu(this.flatCoordinates,t)}getType(){return"Point"}intersectsExtent(t){return Dl(t,this.flatCoordinates[0],this.flatCoordinates[1])}setCoordinates(t,e){this.setLayout(e,t,0),this.flatCoordinates||(this.flatCoordinates=[]),this.flatCoordinates.length=id(this.flatCoordinates,0,t,this.stride),this.changed()}}const Ul=so;function ld(n,t,e,i,s){return!Pl(s,function(o){return!je(n,t,e,i,o[0],o[1])})}function je(n,t,e,i,s,r){let o=0,a=n[e-i],l=n[e-i+1];for(;t<e;t+=i){const h=n[t],c=n[t+1];l<=r?c>r&&(h-a)*(r-l)-(s-a)*(c-l)>0&&o++:c<=r&&(h-a)*(r-l)-(s-a)*(c-l)<0&&o--,a=h,l=c}return o!==0}function Hl(n,t,e,i,s,r){if(e.length===0||!je(n,t,e[0],i,s,r))return!1;for(let o=1,a=e.length;o<a;++o)if(je(n,e[o-1],e[o],i,s,r))return!1;return!0}function hd(n,t,e,i,s,r,o){let a,l,h,c,u,d,f;const g=s[r+1],_=[];for(let E=0,v=e.length;E<v;++E){const y=e[E];for(c=n[y-i],d=n[y-i+1],a=t;a<y;a+=i)u=n[a],f=n[a+1],(g<=d&&f<=g||d<=g&&g<=f)&&(h=(g-d)/(f-d)*(u-c)+c,_.push(h)),c=u,d=f}let m=NaN,p=-1/0;for(_.sort(Ni),c=_[0],a=1,l=_.length;a<l;++a){u=_[a];const E=Math.abs(u-c);E>p&&(h=(c+u)/2,Hl(n,t,e,i,h,g)&&(m=h,p=E)),c=u}return isNaN(m)&&(m=s[r]),o?(o.push(m,g,p),o):[m,g,p]}function cd(n,t,e,i,s){let r;for(t+=i;t<e;t+=i)if(r=s(n.slice(t-i,t),n.slice(t,t+i)),r)return r;return!1}function jl(n,t,e,i,s){const r=Ml(Xt(),n,t,e,i);return vt(s,r)?Ue(s,r)||r[0]>=s[0]&&r[2]<=s[2]||r[1]>=s[1]&&r[3]<=s[3]?!0:cd(n,t,e,i,function(o,a){return vu(s,o,a)}):!1}function Zl(n,t,e,i,s){return!!(jl(n,t,e,i,s)||je(n,t,e,i,s[0],s[1])||je(n,t,e,i,s[0],s[3])||je(n,t,e,i,s[2],s[1])||je(n,t,e,i,s[2],s[3]))}function ud(n,t,e,i,s){if(!Zl(n,t,e[0],i,s))return!1;if(e.length===1)return!0;for(let r=1,o=e.length;r<o;++r)if(ld(n,e[r-1],e[r],i,s)&&!jl(n,e[r-1],e[r],i,s))return!1;return!0}function dd(n,t,e,i){for(;t<e-i;){for(let s=0;s<i;++s){const r=n[t+s];n[t+s]=n[e-i+s],n[e-i+s]=r}t+=i,e-=i}}function ql(n,t,e,i){let s=0,r=n[e-i],o=n[e-i+1];for(;t<e;t+=i){const a=n[t],l=n[t+1];s+=(a-r)*(l+o),r=a,o=l}return s===0?void 0:s>0}function fd(n,t,e,i,s){s=s!==void 0?s:!1;for(let r=0,o=e.length;r<o;++r){const a=e[r],l=ql(n,t,a,i);if(r===0){if(s&&l||!s&&!l)return!1}else if(s&&!l||!s&&l)return!1;t=a}return!0}function ca(n,t,e,i,s){s=s!==void 0?s:!1;for(let r=0,o=e.length;r<o;++r){const a=e[r],l=ql(n,t,a,i);(r===0?s&&l||!s&&!l:s&&!l||!s&&l)&&dd(n,t,a,i),t=a}return t}class mn extends no{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,e!==void 0&&i?(this.setFlatCoordinates(e,t),this.ends_=i):this.setCoordinates(t,e)}appendLinearRing(t){this.flatCoordinates?Sl(this.flatCoordinates,t.getFlatCoordinates()):this.flatCoordinates=t.getFlatCoordinates().slice(),this.ends_.push(this.flatCoordinates.length),this.changed()}clone(){const t=new mn(this.flatCoordinates.slice(),this.layout,this.ends_.slice());return t.applyProperties(this),t}closestPointXY(t,e,i,s){return s<Ll(this.getExtent(),t,e)?s:(this.maxDeltaRevision_!=this.getRevision()&&(this.maxDelta_=Math.sqrt(td(this.flatCoordinates,0,this.ends_,this.stride,0)),this.maxDeltaRevision_=this.getRevision()),ed(this.flatCoordinates,0,this.ends_,this.stride,this.maxDelta_,!0,t,e,i,s))}containsXY(t,e){return Hl(this.getOrientedFlatCoordinates(),0,this.ends_,this.stride,t,e)}getArea(){return ad(this.getOrientedFlatCoordinates(),0,this.ends_,this.stride)}getCoordinates(t){let e;return t!==void 0?(e=this.getOrientedFlatCoordinates().slice(),ca(e,0,this.ends_,this.stride,t)):e=this.flatCoordinates,us(e,0,this.ends_,this.stride)}getEnds(){return this.ends_}getFlatInteriorPoint(){if(this.flatInteriorPointRevision_!=this.getRevision()){const t=Fi(this.getExtent());this.flatInteriorPoint_=hd(this.getOrientedFlatCoordinates(),0,this.ends_,this.stride,t,0),this.flatInteriorPointRevision_=this.getRevision()}return this.flatInteriorPoint_}getInteriorPoint(){return new Ul(this.getFlatInteriorPoint(),"XYM")}getLinearRingCount(){return this.ends_.length}getLinearRing(t){return t<0||this.ends_.length<=t?null:new ha(this.flatCoordinates.slice(t===0?0:this.ends_[t-1],this.ends_[t]),this.layout)}getLinearRings(){const t=this.layout,e=this.flatCoordinates,i=this.ends_,s=[];let r=0;for(let o=0,a=i.length;o<a;++o){const l=i[o],h=new ha(e.slice(r,l),t);s.push(h),r=l}return s}getOrientedFlatCoordinates(){if(this.orientedRevision_!=this.getRevision()){const t=this.flatCoordinates;fd(t,0,this.ends_,this.stride)?this.orientedFlatCoordinates_=t:(this.orientedFlatCoordinates_=t.slice(),this.orientedFlatCoordinates_.length=ca(this.orientedFlatCoordinates_,0,this.ends_,this.stride)),this.orientedRevision_=this.getRevision()}return this.orientedFlatCoordinates_}getSimplifiedGeometryInternal(t){const e=[],i=[];return e.length=od(this.flatCoordinates,0,this.ends_,this.stride,Math.sqrt(t),e,0,i),new mn(e,"XY",i)}getType(){return"Polygon"}intersectsExtent(t){return ud(this.getOrientedFlatCoordinates(),0,this.ends_,this.stride,t)}setCoordinates(t,e){this.setLayout(e,t,2),this.flatCoordinates||(this.flatCoordinates=[]);const i=nd(this.flatCoordinates,0,t,this.stride,this.ends_);this.flatCoordinates.length=i.length===0?0:i[i.length-1],this.changed()}}function ua(n){const t=n[0],e=n[1],i=n[2],s=n[3],r=[t,e,t,s,i,s,i,e,t,e];return new mn(r,"XY",[r.length])}const Le={PRERENDER:"prerender",POSTRENDER:"postrender",PRECOMPOSE:"precompose",POSTCOMPOSE:"postcompose",RENDERCOMPLETE:"rendercomplete"};class ro{constructor(t){t=t||{},this.color_=t.color!==void 0?t.color:null}clone(){const t=this.getColor();return new ro({color:Array.isArray(t)?t.slice():t||void 0})}getColor(){return this.color_}setColor(t){this.color_=t}}const oo=ro;function gd(n,t,e,i){let s=n[t],r=n[t+1],o=0;for(let a=t+i;a<e;a+=i){const l=n[a],h=n[a+1];o+=Math.sqrt((l-s)*(l-s)+(h-r)*(h-r)),s=l,r=h}return o}class ao{constructor(t){t=t||{},this.color_=t.color!==void 0?t.color:null,this.lineCap_=t.lineCap,this.lineDash_=t.lineDash!==void 0?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 ao({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 Jl=ao,it={IDLE:0,LOADING:1,LOADED:2,ERROR:3,EMPTY:4};function da(n){return n[0]>0&&n[1]>0}function _d(n,t,e){return e===void 0&&(e=[0,0]),e[0]=n[0]*t+.5|0,e[1]=n[1]*t+.5|0,e}function St(n,t){return Array.isArray(n)?n:(t===void 0?t=[n,n]:(t[0]=n,t[1]=n),t)}class lo{constructor(t){this.opacity_=t.opacity,this.rotateWithView_=t.rotateWithView,this.rotation_=t.rotation,this.scale_=t.scale,this.scaleArray_=St(t.scale),this.displacement_=t.displacement,this.declutterMode_=t.declutterMode}clone(){const t=this.getScale();return new lo({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 B()}getImage(t){return B()}getHitDetectionImage(){return B()}getPixelRatio(t){return 1}getImageState(){return B()}getImageSize(){return B()}getOrigin(){return B()}getSize(){return B()}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_=St(t)}listenImageChange(t){B()}load(){B()}unlistenImageChange(t){B()}}const Ql=lo,md=/^#([a-f0-9]{3}|[a-f0-9]{4}(?:[a-f0-9]{2}){0,2})$/i,pd=/^([a-z]*)$|^hsla?\(.*\)$/i;function th(n){return typeof n=="string"?n:eh(n)}function Ed(n){const t=document.createElement("div");if(t.style.color=n,t.style.color!==""){document.body.appendChild(t);const e=getComputedStyle(t).color;return document.body.removeChild(t),e}else return""}const yd=function(){const t={};let e=0;return function(i){let s;if(t.hasOwnProperty(i))s=t[i];else{if(e>=1024){let r=0;for(const o in t)r++&3||(delete t[o],--e)}s=vd(i),t[i]=s,++e}return s}}();function fs(n){return Array.isArray(n)?n:yd(n)}function vd(n){let t,e,i,s,r;if(pd.exec(n)&&(n=Ed(n)),md.exec(n)){const o=n.length-1;let a;o<=4?a=1:a=2;const l=o===4||o===8;t=parseInt(n.substr(1+0*a,a),16),e=parseInt(n.substr(1+1*a,a),16),i=parseInt(n.substr(1+2*a,a),16),l?s=parseInt(n.substr(1+3*a,a),16):s=255,a==1&&(t=(t<<4)+t,e=(e<<4)+e,i=(i<<4)+i,l&&(s=(s<<4)+s)),r=[t,e,i,s/255]}else n.startsWith("rgba(")?(r=n.slice(5,-1).split(",").map(Number),fa(r)):n.startsWith("rgb(")?(r=n.slice(4,-1).split(",").map(Number),r.push(1),fa(r)):V(!1,14);return r}function fa(n){return n[0]=et(n[0]+.5|0,0,255),n[1]=et(n[1]+.5|0,0,255),n[2]=et(n[2]+.5|0,0,255),n[3]=et(n[3],0,1),n}function eh(n){let t=n[0];t!=(t|0)&&(t=t+.5|0);let e=n[1];e!=(e|0)&&(e=e+.5|0);let i=n[2];i!=(i|0)&&(i=i+.5|0);const s=n[3]===void 0?1:Math.round(n[3]*100)/100;return"rgba("+t+","+e+","+i+","+s+")"}function qt(n){return Array.isArray(n)?eh(n):n}function It(n,t,e,i){let s;return e&&e.length?s=e.shift():jr?s=new OffscreenCanvas(n||300,t||300):s=document.createElement("canvas"),n&&(s.width=n),t&&(s.height=t),s.getContext("2d",i)}function ih(n){const t=n.canvas;t.width=1,t.height=1,n.clearRect(0,0,1,1)}function xd(n){let t=n.offsetWidth;const e=getComputedStyle(n);return t+=parseInt(e.marginLeft,10)+parseInt(e.marginRight,10),t}function Td(n){let t=n.offsetHeight;const e=getComputedStyle(n);return t+=parseInt(e.marginTop,10)+parseInt(e.marginBottom,10),t}function ga(n,t){const e=t.parentNode;e&&e.replaceChild(n,t)}function gs(n){return n&&n.parentNode?n.parentNode.removeChild(n):null}function nh(n){for(;n.lastChild;)n.removeChild(n.lastChild)}function Cd(n,t){const e=n.childNodes;for(let i=0;;++i){const s=e[i],r=t[i];if(!s&&!r)break;if(s!==r){if(!s){n.appendChild(r);continue}if(!r){n.removeChild(s),--i;continue}n.insertBefore(r,s)}}}const zn="ol-hidden",wd="ol-selectable",Ps="ol-unselectable",ho="ol-control",_a="ol-collapsed",Sd=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"),ma=["style","variant","weight","size","lineHeight","family"],sh=function(n){const t=n.match(Sd);if(!t)return null;const e={lineHeight:"normal",size:"1.2em",style:"normal",weight:"normal",variant:"normal"};for(let i=0,s=ma.length;i<s;++i){const r=t[i+1];r!==void 0&&(e[ma[i]]=r)}return e.families=e.family.split(/,\s?/),e},rh="10px sans-serif",fe="#000",_s="round",pn=[],En=0,ki="round",yn=10,vn="#000",xn="center",ms="middle",Ze=[0,0,0,0],Tn=1,ce=new zt;let xi=null,Mr;const Pr={},Rd=function(){const t="32px ",e=["monospace","serif"],i=e.length,s="wmytzilWMYTZIL@#/&?$%10";let r,o;function a(h,c,u){let d=!0;for(let f=0;f<i;++f){const g=e[f];if(o=ps(h+" "+c+" "+t+g,s),u!=g){const _=ps(h+" "+c+" "+t+u+","+g,s);d=d&&_!=o}}return!!d}function l(){let h=!0;const c=ce.getKeys();for(let u=0,d=c.length;u<d;++u){const f=c[u];ce.get(f)<100&&(a.apply(this,f.split(`
|
||
`))?(Rn(Pr),xi=null,Mr=void 0,ce.set(f,100)):(ce.set(f,ce.get(f)+1,!0),h=!1))}h&&(clearInterval(r),r=void 0)}return function(h){const c=sh(h);if(!c)return;const u=c.families;for(let d=0,f=u.length;d<f;++d){const g=u[d],_=c.style+`
|
||
`+c.weight+`
|
||
`+g;ce.get(_)===void 0&&(ce.set(_,100,!0),a(c.style,c.weight,g)||(ce.set(_,0,!0),r===void 0&&(r=setInterval(l,32))))}}}(),Id=function(){let n;return function(t){let e=Pr[t];if(e==null){if(jr){const i=sh(t),s=oh(t,"Žg");e=(isNaN(Number(i.lineHeight))?1.2:Number(i.lineHeight))*(s.actualBoundingBoxAscent+s.actualBoundingBoxDescent)}else n||(n=document.createElement("div"),n.innerHTML="M",n.style.minHeight="0",n.style.maxHeight="none",n.style.height="auto",n.style.padding="0",n.style.border="none",n.style.position="absolute",n.style.display="block",n.style.left="-99999px"),n.style.font=t,document.body.appendChild(n),e=n.offsetHeight,document.body.removeChild(n);Pr[t]=e}return e}}();function oh(n,t){return xi||(xi=It(1,1)),n!=Mr&&(xi.font=n,Mr=xi.font),xi.measureText(t)}function ps(n,t){return oh(n,t).width}function pa(n,t,e){if(t in e)return e[t];const i=t.split(`
|
||
`).reduce((s,r)=>Math.max(s,ps(n,r)),0);return e[t]=i,i}function bd(n,t){const e=[],i=[],s=[];let r=0,o=0,a=0,l=0;for(let h=0,c=t.length;h<=c;h+=2){const u=t[h];if(u===`
|
||
`||h===c){r=Math.max(r,o),s.push(o),o=0,a+=l;continue}const d=t[h+1]||n.font,f=ps(d,u);e.push(f),o+=f;const g=Id(d);i.push(g),l=Math.max(l,g)}return{width:r,height:a,widths:e,heights:i,lineWidths:s}}function Ad(n,t,e,i,s,r,o,a,l,h,c){n.save(),e!==1&&(n.globalAlpha*=e),t&&n.setTransform.apply(n,t),i.contextInstructions?(n.translate(l,h),n.scale(c[0],c[1]),Od(i,n)):c[0]<0||c[1]<0?(n.translate(l,h),n.scale(c[0],c[1]),n.drawImage(i,s,r,o,a,0,0,o,a)):n.drawImage(i,s,r,o,a,l,h,o*c[0],a*c[1]),n.restore()}function Od(n,t){const e=n.contextInstructions;for(let i=0,s=e.length;i<s;i+=2)Array.isArray(e[i+1])?t[e[i]].apply(t,e[i+1]):t[e[i]]=e[i+1]}class co extends Ql{constructor(t){const e=t.rotateWithView!==void 0?t.rotateWithView:!1;super({opacity:1,rotateWithView:e,rotation:t.rotation!==void 0?t.rotation:0,scale:t.scale!==void 0?t.scale:1,displacement:t.displacement!==void 0?t.displacement:[0,0],declutterMode:t.declutterMode}),this.canvas_=void 0,this.hitDetectionCanvas_=null,this.fill_=t.fill!==void 0?t.fill:null,this.origin_=[0,0],this.points_=t.points,this.radius_=t.radius!==void 0?t.radius:t.radius1,this.radius2_=t.radius2,this.angle_=t.angle!==void 0?t.angle:0,this.stroke_=t.stroke!==void 0?t.stroke:null,this.size_=null,this.renderOptions_=null,this.render()}clone(){const t=this.getScale(),e=new co({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_,s=It(i.size*t,i.size*t);this.draw_(i,s,t),e=s.canvas,this.canvas_[t]=e}return e}getPixelRatio(t){return t}getImageSize(){return this.size_}getImageState(){return it.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(e===0||this.points_===1/0||t!=="bevel"&&t!=="miter")return e;let s=this.radius_,r=this.radius2_===void 0?s:this.radius2_;if(s<r){const C=s;s=r,r=C}const o=this.radius2_===void 0?this.points_:this.points_*2,a=2*Math.PI/o,l=r*Math.sin(a),h=Math.sqrt(r*r-l*l),c=s-h,u=Math.sqrt(l*l+c*c),d=u/l;if(t==="miter"&&d<=i)return d*e;const f=e/2/d,g=e/2*(c/u),m=Math.sqrt((s+f)*(s+f)+g*g)-s;if(this.radius2_===void 0||t==="bevel")return m*2;const p=s*Math.sin(a),E=Math.sqrt(s*s-p*p),v=r-E,x=Math.sqrt(p*p+v*v)/p;if(x<=i){const C=x*e/2-r-s;return 2*Math.max(m,C)}return m*2}createRenderOptions(){let t=ki,e=0,i=null,s=0,r,o=0;this.stroke_&&(r=this.stroke_.getColor(),r===null&&(r=vn),r=qt(r),o=this.stroke_.getWidth(),o===void 0&&(o=Tn),i=this.stroke_.getLineDash(),s=this.stroke_.getLineDashOffset(),t=this.stroke_.getLineJoin(),t===void 0&&(t=ki),e=this.stroke_.getMiterLimit(),e===void 0&&(e=yn));const a=this.calculateLineJoinSize_(t,o,e),l=Math.max(this.radius_,this.radius2_||0),h=Math.ceil(2*l+a);return{strokeStyle:r,strokeWidth:o,size:h,lineDash:i,lineDashOffset:s,lineJoin:t,miterLimit:e}}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 s=this.fill_.getColor();s===null&&(s=fe),e.fillStyle=qt(s),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(typeof e=="string"&&(e=fs(e)),e===null?i=1:Array.isArray(e)&&(i=e.length===4?e[3]:1),i===0){const s=It(t.size,t.size);this.hitDetectionCanvas_=s.canvas,this.drawHitDetectionCanvas_(t,s)}}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 s=this.radius2_===void 0?i:this.radius2_;this.radius2_!==void 0&&(e*=2);const r=this.angle_-Math.PI/2,o=2*Math.PI/e;for(let a=0;a<e;a++){const l=r+a*o,h=a%2===0?i:s;t.lineTo(h*Math.cos(l),h*Math.sin(l))}t.closePath()}}drawHitDetectionCanvas_(t,e){e.translate(t.size/2,t.size/2),this.createPath_(e),e.fillStyle=fe,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 ah=co;class uo extends ah{constructor(t){t=t||{radius:5},super({points:1/0,fill:t.fill,radius:t.radius,stroke:t.stroke,scale:t.scale!==void 0?t.scale:1,rotation:t.rotation!==void 0?t.rotation:0,rotateWithView:t.rotateWithView!==void 0?t.rotateWithView:!1,displacement:t.displacement!==void 0?t.displacement:[0,0],declutterMode:t.declutterMode})}clone(){const t=this.getScale(),e=new uo({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 lh=uo;class Ns{constructor(t){t=t||{},this.geometry_=null,this.geometryFunction_=Ea,t.geometry!==void 0&&this.setGeometry(t.geometry),this.fill_=t.fill!==void 0?t.fill:null,this.image_=t.image!==void 0?t.image:null,this.renderer_=t.renderer!==void 0?t.renderer:null,this.hitDetectionRenderer_=t.hitDetectionRenderer!==void 0?t.hitDetectionRenderer:null,this.stroke_=t.stroke!==void 0?t.stroke:null,this.text_=t.text!==void 0?t.text:null,this.zIndex_=t.zIndex}clone(){let t=this.getGeometry();return t&&typeof t=="object"&&(t=t.clone()),new Ns({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){typeof t=="function"?this.geometryFunction_=t:typeof t=="string"?this.geometryFunction_=function(e){return e.get(t)}:t?t!==void 0&&(this.geometryFunction_=function(){return t}):this.geometryFunction_=Ea,this.geometry_=t}setZIndex(t){this.zIndex_=t}}function Ld(n){let t;if(typeof n=="function")t=n;else{let e;Array.isArray(n)?e=n:(V(typeof n.getZIndex=="function",41),e=[n]),t=function(){return e}}return t}let qs=null;function Dd(n,t){if(!qs){const e=new oo({color:"rgba(255,255,255,0.4)"}),i=new Jl({color:"#3399CC",width:1.25});qs=[new Ns({image:new lh({fill:e,stroke:i,radius:5}),fill:e,stroke:i})]}return qs}function Ea(n){return n.getGeometry()}const Es=Ns,Md="#333";class fo{constructor(t){t=t||{},this.font_=t.font,this.rotation_=t.rotation,this.rotateWithView_=t.rotateWithView,this.scale_=t.scale,this.scaleArray_=St(t.scale!==void 0?t.scale:1),this.text_=t.text,this.textAlign_=t.textAlign,this.justify_=t.justify,this.textBaseline_=t.textBaseline,this.fill_=t.fill!==void 0?t.fill:new oo({color:Md}),this.maxAngle_=t.maxAngle!==void 0?t.maxAngle:Math.PI/4,this.placement_=t.placement!==void 0?t.placement:"point",this.overflow_=!!t.overflow,this.stroke_=t.stroke!==void 0?t.stroke:null,this.offsetX_=t.offsetX!==void 0?t.offsetX:0,this.offsetY_=t.offsetY!==void 0?t.offsetY:0,this.backgroundFill_=t.backgroundFill?t.backgroundFill:null,this.backgroundStroke_=t.backgroundStroke?t.backgroundStroke:null,this.padding_=t.padding===void 0?null:t.padding}clone(){const t=this.getScale();return new fo({font:this.getFont(),placement:this.getPlacement(),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_}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}setRotateWithView(t){this.rotateWithView_=t}setFill(t){this.fill_=t}setRotation(t){this.rotation_=t}setScale(t){this.scale_=t,this.scaleArray_=St(t!==void 0?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 Pd=fo,H={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"};class Nd extends zt{constructor(t){super(),this.on,this.once,this.un,this.background_=t.background;const e=Object.assign({},t);typeof t.properties=="object"&&(delete e.properties,Object.assign(e,t.properties)),e[H.OPACITY]=t.opacity!==void 0?t.opacity:1,V(typeof e[H.OPACITY]=="number",64),e[H.VISIBLE]=t.visible!==void 0?t.visible:!0,e[H.Z_INDEX]=t.zIndex,e[H.MAX_RESOLUTION]=t.maxResolution!==void 0?t.maxResolution:1/0,e[H.MIN_RESOLUTION]=t.minResolution!==void 0?t.minResolution:0,e[H.MIN_ZOOM]=t.minZoom!==void 0?t.minZoom:-1/0,e[H.MAX_ZOOM]=t.maxZoom!==void 0?t.maxZoom:1/0,this.className_=e.className!==void 0?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:t===void 0?!0:t},i=this.getZIndex();return e.opacity=et(Math.round(this.getOpacity()*100)/100,0,1),e.visible=this.getVisible(),e.extent=this.getExtent(),e.zIndex=i===void 0&&!e.managed?1/0:i,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 B()}getLayerStatesArray(t){return B()}getExtent(){return this.get(H.EXTENT)}getMaxResolution(){return this.get(H.MAX_RESOLUTION)}getMinResolution(){return this.get(H.MIN_RESOLUTION)}getMinZoom(){return this.get(H.MIN_ZOOM)}getMaxZoom(){return this.get(H.MAX_ZOOM)}getOpacity(){return this.get(H.OPACITY)}getSourceState(){return B()}getVisible(){return this.get(H.VISIBLE)}getZIndex(){return this.get(H.Z_INDEX)}setBackground(t){this.background_=t,this.changed()}setExtent(t){this.set(H.EXTENT,t)}setMaxResolution(t){this.set(H.MAX_RESOLUTION,t)}setMinResolution(t){this.set(H.MIN_RESOLUTION,t)}setMaxZoom(t){this.set(H.MAX_ZOOM,t)}setMinZoom(t){this.set(H.MIN_ZOOM,t)}setOpacity(t){V(typeof t=="number",64),this.set(H.OPACITY,t)}setVisible(t){this.set(H.VISIBLE,t)}setZIndex(t){this.set(H.Z_INDEX,t)}disposeInternal(){this.state_&&(this.state_.layer=null,this.state_=null),super.disposeInternal()}}const hh=Nd;class Fd extends hh{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.rendered=!1,t.render&&(this.render=t.render),t.map&&this.setMap(t.map),this.addChangeListener(H.SOURCE,this.handleSourcePropertyChange_);const i=t.source?t.source:null;this.setSource(i)}getLayersArray(t){return t=t||[],t.push(this),t}getLayerStatesArray(t){return t=t||[],t.push(this.getLayerState()),t}getSource(){return this.get(H.SOURCE)||null}getRenderSource(){return this.getSource()}getSourceState(){const t=this.getSource();return t?t.getState():"undefined"}handleSourceChange_(){this.changed()}handleSourcePropertyChange_(){this.sourceChangeKey_&&(J(this.sourceChangeKey_),this.sourceChangeKey_=null);const t=this.getSource();t&&(this.sourceChangeKey_=z(t,W.CHANGE,this.handleSourceChange_,this)),this.changed()}getFeatures(t){return this.renderer_?this.renderer_.getFeatures(t):new Promise(e=>e([]))}getData(t){return!this.renderer_||!this.rendered?null:this.renderer_.getData(t)}render(t,e){const i=this.getRenderer();if(i.prepareFrame(t))return this.rendered=!0,i.renderFrame(t,e)}unrender(){this.rendered=!1}setMapInternal(t){t||this.unrender(),this.set(H.MAP,t)}getMapInternal(){return this.get(H.MAP)}setMap(t){this.mapPrecomposeKey_&&(J(this.mapPrecomposeKey_),this.mapPrecomposeKey_=null),t||this.changed(),this.mapRenderKey_&&(J(this.mapRenderKey_),this.mapRenderKey_=null),t&&(this.mapPrecomposeKey_=z(t,Le.PRECOMPOSE,function(e){const s=e.frameState.layerStatesArray,r=this.getLayerState(!1);V(!s.some(function(o){return o.layer===r.layer}),67),s.push(r)},this),this.mapRenderKey_=z(this,W.CHANGE,t.render,t),this.changed())}setSource(t){this.set(H.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 go(n,t){if(!n.visible)return!1;const e=t.resolution;if(e<n.minResolution||e>=n.maxResolution)return!1;const i=t.zoom;return i>n.minZoom&&i<=n.maxZoom}const Fs=Fd;function kd(n,t,e,i,s){ch(n,t,e||0,i||n.length-1,s||$d)}function ch(n,t,e,i,s){for(;i>e;){if(i-e>600){var r=i-e+1,o=t-e+1,a=Math.log(r),l=.5*Math.exp(2*a/3),h=.5*Math.sqrt(a*l*(r-l)/r)*(o-r/2<0?-1:1),c=Math.max(e,Math.floor(t-o*l/r+h)),u=Math.min(i,Math.floor(t+(r-o)*l/r+h));ch(n,t,c,u,s)}var d=n[t],f=e,g=i;for(Qi(n,e,t),s(n[i],d)>0&&Qi(n,e,i);f<g;){for(Qi(n,f,g),f++,g--;s(n[f],d)<0;)f++;for(;s(n[g],d)>0;)g--}s(n[e],d)===0?Qi(n,e,g):(g++,Qi(n,g,i)),g<=t&&(e=g+1),t<=g&&(i=g-1)}}function Qi(n,t,e){var i=n[t];n[t]=n[e],n[e]=i}function $d(n,t){return n<t?-1:n>t?1:0}let uh=class{constructor(t=9){this._maxEntries=Math.max(4,t),this._minEntries=Math.max(2,Math.ceil(this._maxEntries*.4)),this.clear()}all(){return this._all(this.data,[])}search(t){let e=this.data;const i=[];if(!Kn(t,e))return i;const s=this.toBBox,r=[];for(;e;){for(let o=0;o<e.children.length;o++){const a=e.children[o],l=e.leaf?s(a):a;Kn(t,l)&&(e.leaf?i.push(a):Qs(t,l)?this._all(a,i):r.push(a))}e=r.pop()}return i}collides(t){let e=this.data;if(!Kn(t,e))return!1;const i=[];for(;e;){for(let s=0;s<e.children.length;s++){const r=e.children[s],o=e.leaf?this.toBBox(r):r;if(Kn(t,o)){if(e.leaf||Qs(t,o))return!0;i.push(r)}}e=i.pop()}return!1}load(t){if(!(t&&t.length))return this;if(t.length<this._minEntries){for(let i=0;i<t.length;i++)this.insert(t[i]);return this}let e=this._build(t.slice(),0,t.length-1,0);if(!this.data.children.length)this.data=e;else if(this.data.height===e.height)this._splitRoot(this.data,e);else{if(this.data.height<e.height){const i=this.data;this.data=e,e=i}this._insert(e,this.data.height-e.height-1,!0)}return this}insert(t){return t&&this._insert(t,this.data.height-1),this}clear(){return this.data=Ti([]),this}remove(t,e){if(!t)return this;let i=this.data;const s=this.toBBox(t),r=[],o=[];let a,l,h;for(;i||r.length;){if(i||(i=r.pop(),l=r[r.length-1],a=o.pop(),h=!0),i.leaf){const c=Wd(t,i.children,e);if(c!==-1)return i.children.splice(c,1),r.push(i),this._condense(r),this}!h&&!i.leaf&&Qs(i,s)?(r.push(i),o.push(a),a=0,l=i,i=i.children[0]):l?(a++,i=l.children[a],h=!1):i=null}return this}toBBox(t){return t}compareMinX(t,e){return t.minX-e.minX}compareMinY(t,e){return t.minY-e.minY}toJSON(){return this.data}fromJSON(t){return this.data=t,this}_all(t,e){const i=[];for(;t;)t.leaf?e.push(...t.children):i.push(...t.children),t=i.pop();return e}_build(t,e,i,s){const r=i-e+1;let o=this._maxEntries,a;if(r<=o)return a=Ti(t.slice(e,i+1)),_i(a,this.toBBox),a;s||(s=Math.ceil(Math.log(r)/Math.log(o)),o=Math.ceil(r/Math.pow(o,s-1))),a=Ti([]),a.leaf=!1,a.height=s;const l=Math.ceil(r/o),h=l*Math.ceil(Math.sqrt(o));ya(t,e,i,h,this.compareMinX);for(let c=e;c<=i;c+=h){const u=Math.min(c+h-1,i);ya(t,c,u,l,this.compareMinY);for(let d=c;d<=u;d+=l){const f=Math.min(d+l-1,u);a.children.push(this._build(t,d,f,s-1))}}return _i(a,this.toBBox),a}_chooseSubtree(t,e,i,s){for(;s.push(e),!(e.leaf||s.length-1===i);){let r=1/0,o=1/0,a;for(let l=0;l<e.children.length;l++){const h=e.children[l],c=Js(h),u=Vd(t,h)-c;u<o?(o=u,r=c<r?c:r,a=h):u===o&&c<r&&(r=c,a=h)}e=a||e.children[0]}return e}_insert(t,e,i){const s=i?t:this.toBBox(t),r=[],o=this._chooseSubtree(s,this.data,e,r);for(o.children.push(t),rn(o,s);e>=0&&r[e].children.length>this._maxEntries;)this._split(r,e),e--;this._adjustParentBBoxes(s,r,e)}_split(t,e){const i=t[e],s=i.children.length,r=this._minEntries;this._chooseSplitAxis(i,r,s);const o=this._chooseSplitIndex(i,r,s),a=Ti(i.children.splice(o,i.children.length-o));a.height=i.height,a.leaf=i.leaf,_i(i,this.toBBox),_i(a,this.toBBox),e?t[e-1].children.push(a):this._splitRoot(i,a)}_splitRoot(t,e){this.data=Ti([t,e]),this.data.height=t.height+1,this.data.leaf=!1,_i(this.data,this.toBBox)}_chooseSplitIndex(t,e,i){let s,r=1/0,o=1/0;for(let a=e;a<=i-e;a++){const l=sn(t,0,a,this.toBBox),h=sn(t,a,i,this.toBBox),c=Xd(l,h),u=Js(l)+Js(h);c<r?(r=c,s=a,o=u<o?u:o):c===r&&u<o&&(o=u,s=a)}return s||i-e}_chooseSplitAxis(t,e,i){const s=t.leaf?this.compareMinX:Gd,r=t.leaf?this.compareMinY:Yd,o=this._allDistMargin(t,e,i,s),a=this._allDistMargin(t,e,i,r);o<a&&t.children.sort(s)}_allDistMargin(t,e,i,s){t.children.sort(s);const r=this.toBBox,o=sn(t,0,e,r),a=sn(t,i-e,i,r);let l=Bn(o)+Bn(a);for(let h=e;h<i-e;h++){const c=t.children[h];rn(o,t.leaf?r(c):c),l+=Bn(o)}for(let h=i-e-1;h>=e;h--){const c=t.children[h];rn(a,t.leaf?r(c):c),l+=Bn(a)}return l}_adjustParentBBoxes(t,e,i){for(let s=i;s>=0;s--)rn(e[s],t)}_condense(t){for(let e=t.length-1,i;e>=0;e--)t[e].children.length===0?e>0?(i=t[e-1].children,i.splice(i.indexOf(t[e]),1)):this.clear():_i(t[e],this.toBBox)}};function Wd(n,t,e){if(!e)return t.indexOf(n);for(let i=0;i<t.length;i++)if(e(n,t[i]))return i;return-1}function _i(n,t){sn(n,0,n.children.length,t,n)}function sn(n,t,e,i,s){s||(s=Ti(null)),s.minX=1/0,s.minY=1/0,s.maxX=-1/0,s.maxY=-1/0;for(let r=t;r<e;r++){const o=n.children[r];rn(s,n.leaf?i(o):o)}return s}function rn(n,t){return n.minX=Math.min(n.minX,t.minX),n.minY=Math.min(n.minY,t.minY),n.maxX=Math.max(n.maxX,t.maxX),n.maxY=Math.max(n.maxY,t.maxY),n}function Gd(n,t){return n.minX-t.minX}function Yd(n,t){return n.minY-t.minY}function Js(n){return(n.maxX-n.minX)*(n.maxY-n.minY)}function Bn(n){return n.maxX-n.minX+(n.maxY-n.minY)}function Vd(n,t){return(Math.max(t.maxX,n.maxX)-Math.min(t.minX,n.minX))*(Math.max(t.maxY,n.maxY)-Math.min(t.minY,n.minY))}function Xd(n,t){const e=Math.max(n.minX,t.minX),i=Math.max(n.minY,t.minY),s=Math.min(n.maxX,t.maxX),r=Math.min(n.maxY,t.maxY);return Math.max(0,s-e)*Math.max(0,r-i)}function Qs(n,t){return n.minX<=t.minX&&n.minY<=t.minY&&t.maxX<=n.maxX&&t.maxY<=n.maxY}function Kn(n,t){return t.minX<=n.maxX&&t.minY<=n.maxY&&t.maxX>=n.minX&&t.maxY>=n.minY}function Ti(n){return{children:n,height:1,leaf:!0,minX:1/0,minY:1/0,maxX:-1/0,maxY:-1/0}}function ya(n,t,e,i,s){const r=[t,e];for(;r.length;){if(e=r.pop(),t=r.pop(),e-t<=i)continue;const o=t+Math.ceil((e-t)/i/2)*i;kd(n,o,t,e,s),r.push(t,o,o,e)}}class zd{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];!(t++&3)&&!i.hasListener()&&(delete this.cache_[e],--this.cacheSize_)}}}get(t,e,i){const s=va(t,e,i);return s in this.cache_?this.cache_[s]:null}set(t,e,i,s){const r=va(t,e,i);this.cache_[r]=s,++this.cacheSize_}setSize(t){this.maxCacheSize_=t,this.expire()}}function va(n,t,e){const i=e?th(e):"null";return t+":"+n+":"+i}const ys=new zd;function dh(n,t,e){const i=n;let s=!0,r=!1,o=!1;const a=[ls(i,W.LOAD,function(){o=!0,r||t()})];return i.src&&lu?(r=!0,i.decode().then(function(){s&&t()}).catch(function(l){s&&(o?t():e())})):a.push(ls(i,W.ERROR,e)),function(){s=!1,a.forEach(J)}}let tn=null;class Bd extends Rs{constructor(t,e,i,s,r,o){super(),this.hitDetectionImage_=null,this.image_=t,this.crossOrigin_=s,this.canvas_={},this.color_=o,this.unlisten_=null,this.imageState_=r,this.size_=i,this.src_=e,this.tainted_}initializeImage_(){this.image_=new Image,this.crossOrigin_!==null&&(this.image_.crossOrigin=this.crossOrigin_)}isTainted_(){if(this.tainted_===void 0&&this.imageState_===it.LOADED){tn||(tn=It(1,1)),tn.drawImage(this.image_,0,0);try{tn.getImageData(0,0,1,1),this.tainted_=!1}catch{tn=null,this.tainted_=!0}}return this.tainted_===!0}dispatchChangeEvent_(){this.dispatchEvent(W.CHANGE)}handleImageError_(){this.imageState_=it.ERROR,this.unlistenImage_(),this.dispatchChangeEvent_()}handleImageLoad_(){this.imageState_=it.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=It(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_===it.IDLE){this.image_||this.initializeImage_(),this.imageState_=it.LOADING;try{this.image_.src=this.src_}catch{this.handleImageError_()}this.unlisten_=dh(this.image_,this.handleImageLoad_.bind(this),this.handleImageError_.bind(this))}}replaceColor_(t){if(!this.color_||this.canvas_[t]||this.imageState_!==it.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 s=i.getContext("2d");s.scale(t,t),s.drawImage(e,0,0),s.globalCompositeOperation="multiply",s.fillStyle=th(this.color_),s.fillRect(0,0,i.width/t,i.height/t),s.globalCompositeOperation="destination-in",s.drawImage(e,0,0),this.canvas_[t]=i}unlistenImage_(){this.unlisten_&&(this.unlisten_(),this.unlisten_=null)}}function Kd(n,t,e,i,s,r){let o=ys.get(t,i,r);return o||(o=new Bd(n,t,e,i,s,r),ys.set(t,i,r,o)),o}class _o extends Ql{constructor(t){t=t||{};const e=t.opacity!==void 0?t.opacity:1,i=t.rotation!==void 0?t.rotation:0,s=t.scale!==void 0?t.scale:1,r=t.rotateWithView!==void 0?t.rotateWithView:!1;super({opacity:e,rotation:i,scale:s,displacement:t.displacement!==void 0?t.displacement:[0,0],rotateWithView:r,declutterMode:t.declutterMode}),this.anchor_=t.anchor!==void 0?t.anchor:[.5,.5],this.normalizedAnchor_=null,this.anchorOrigin_=t.anchorOrigin!==void 0?t.anchorOrigin:"top-left",this.anchorXUnits_=t.anchorXUnits!==void 0?t.anchorXUnits:"fraction",this.anchorYUnits_=t.anchorYUnits!==void 0?t.anchorYUnits:"fraction",this.crossOrigin_=t.crossOrigin!==void 0?t.crossOrigin:null;const o=t.img!==void 0?t.img:null;this.imgSize_=t.imgSize;let a=t.src;V(!(a!==void 0&&o),4),V(!o||o&&this.imgSize_,5),(a===void 0||a.length===0)&&o&&(a=o.src||U(o)),V(a!==void 0&&a.length>0,6);const l=t.src!==void 0?it.IDLE:it.LOADED;this.color_=t.color!==void 0?fs(t.color):null,this.iconImage_=Kd(o,a,this.imgSize_!==void 0?this.imgSize_:null,this.crossOrigin_,l,this.color_),this.offset_=t.offset!==void 0?t.offset:[0,0],this.offsetOrigin_=t.offsetOrigin!==void 0?t.offsetOrigin:"top-left",this.origin_=null,this.size_=t.size!==void 0?t.size:null}clone(){const t=this.getScale();return new _o({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:this.size_!==null?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 s=this.getSize();if(this.anchorXUnits_=="fraction"||this.anchorYUnits_=="fraction"){if(!s)return null;t=this.anchor_.slice(),this.anchorXUnits_=="fraction"&&(t[0]*=s[0]),this.anchorYUnits_=="fraction"&&(t[1]*=s[1])}if(this.anchorOrigin_!="top-left"){if(!s)return null;t===this.anchor_&&(t=this.anchor_.slice()),(this.anchorOrigin_=="top-right"||this.anchorOrigin_=="bottom-right")&&(t[0]=-t[0]+s[0]),(this.anchorOrigin_=="bottom-left"||this.anchorOrigin_=="bottom-right")&&(t[1]=-t[1]+s[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(this.offsetOrigin_!="top-left"){const e=this.getSize(),i=this.iconImage_.getSize();if(!e||!i)return null;t=t.slice(),(this.offsetOrigin_=="top-right"||this.offsetOrigin_=="bottom-right")&&(t[0]=i[0]-e[0]-t[0]),(this.offsetOrigin_=="bottom-left"||this.offsetOrigin_=="bottom-right")&&(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()}listenImageChange(t){this.iconImage_.addEventListener(W.CHANGE,t)}load(){this.iconImage_.load()}unlistenImageChange(t){this.iconImage_.removeEventListener(W.CHANGE,t)}}const mo=_o;function xa(n){return new Es({fill:Cn(n,""),stroke:wn(n,""),text:Ud(n),image:Hd(n)})}function Cn(n,t){const e=n[t+"fill-color"];if(e)return new oo({color:e})}function wn(n,t){const e=n[t+"stroke-width"],i=n[t+"stroke-color"];if(!(!e&&!i))return new Jl({width:e,color:i,lineCap:n[t+"stroke-line-cap"],lineJoin:n[t+"stroke-line-join"],lineDash:n[t+"stroke-line-dash"],lineDashOffset:n[t+"stroke-line-dash-offset"],miterLimit:n[t+"stroke-miter-limit"]})}function Ud(n){const t=n["text-value"];return t?new Pd({text:t,font:n["text-font"],maxAngle:n["text-max-angle"],offsetX:n["text-offset-x"],offsetY:n["text-offset-y"],overflow:n["text-overflow"],placement:n["text-placement"],scale:n["text-scale"],rotateWithView:n["text-rotate-with-view"],rotation:n["text-rotation"],textAlign:n["text-align"],justify:n["text-justify"],textBaseline:n["text-baseline"],padding:n["text-padding"],fill:Cn(n,"text-"),backgroundFill:Cn(n,"text-background-"),stroke:wn(n,"text-"),backgroundStroke:wn(n,"text-background-")}):void 0}function Hd(n){const t=n["icon-src"],e=n["icon-img"];if(t||e)return new mo({src:t,img:e,imgSize:n["icon-img-size"],anchor:n["icon-anchor"],anchorOrigin:n["icon-anchor-origin"],anchorXUnits:n["icon-anchor-x-units"],anchorYUnits:n["icon-anchor-y-units"],color:n["icon-color"],crossOrigin:n["icon-cross-origin"],offset:n["icon-offset"],displacement:n["icon-displacement"],opacity:n["icon-opacity"],scale:n["icon-scale"],rotation:n["icon-rotation"],rotateWithView:n["icon-rotate-with-view"],size:n["icon-size"],declutterMode:n["icon-declutter-mode"]});const i=n["shape-points"];if(i){const r="shape-";return new ah({points:i,fill:Cn(n,r),stroke:wn(n,r),radius:n["shape-radius"],radius1:n["shape-radius1"],radius2:n["shape-radius2"],angle:n["shape-angle"],displacement:n["shape-displacement"],rotation:n["shape-rotation"],rotateWithView:n["shape-rotate-with-view"],scale:n["shape-scale"],declutterMode:n["shape-declutter-mode"]})}const s=n["circle-radius"];if(s){const r="circle-";return new lh({radius:s,fill:Cn(n,r),stroke:wn(n,r),displacement:n["circle-displacement"],scale:n["circle-scale"],rotation:n["circle-rotation"],rotateWithView:n["circle-rotate-with-view"],declutterMode:n["circle-declutter-mode"]})}}const Ta={RENDER_ORDER:"renderOrder"};class jd extends Fs{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_=t.declutter!==void 0?t.declutter:!1,this.renderBuffer_=t.renderBuffer!==void 0?t.renderBuffer:100,this.style_=null,this.styleFunction_=void 0,this.setStyle(t.style),this.updateWhileAnimating_=t.updateWhileAnimating!==void 0?t.updateWhileAnimating:!1,this.updateWhileInteracting_=t.updateWhileInteracting!==void 0?t.updateWhileInteracting:!1}getDeclutter(){return this.declutter_}getFeatures(t){return super.getFeatures(t)}getRenderBuffer(){return this.renderBuffer_}getRenderOrder(){return this.get(Ta.RENDER_ORDER)}getStyle(){return this.style_}getStyleFunction(){return this.styleFunction_}getUpdateWhileAnimating(){return this.updateWhileAnimating_}getUpdateWhileInteracting(){return this.updateWhileInteracting_}renderDeclutter(t){t.declutterTree||(t.declutterTree=new uh(9)),this.getRenderer().renderDeclutter(t)}setRenderOrder(t){this.set(Ta.RENDER_ORDER,t)}setStyle(t){let e;if(t===void 0)e=Dd;else if(t===null)e=null;else if(typeof t=="function")e=t;else if(t instanceof Es)e=t;else if(Array.isArray(t)){const i=t.length,s=new Array(i);for(let r=0;r<i;++r){const o=t[r];o instanceof Es?s[r]=o:s[r]=xa(o)}e=s}else e=xa(t);this.style_=e,this.styleFunction_=t===null?void 0:Ld(this.style_),this.changed()}}const Zd=jd,bn={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},Un=[bn.FILL],Oe=[bn.STROKE],qe=[bn.BEGIN_PATH],Ca=[bn.CLOSE_PATH],F=bn;class qd{drawCustom(t,e,i,s){}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){}}const fh=qd;class Jd extends fh{constructor(t,e,i,s){super(),this.tolerance=t,this.maxExtent=e,this.pixelRatio=s,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 e==1?t:t.map(function(i){return i*e})}appendFlatPointCoordinates(t,e){const i=this.getBufferedMaxExtent(),s=this.tmpCoordinate_,r=this.coordinates;let o=r.length;for(let a=0,l=t.length;a<l;a+=e)s[0]=t[a],s[1]=t[a+1],bs(i,s)&&(r[o++]=s[0],r[o++]=s[1]);return o}appendFlatLineCoordinates(t,e,i,s,r,o){const a=this.coordinates;let l=a.length;const h=this.getBufferedMaxExtent();o&&(e+=s);let c=t[e],u=t[e+1];const d=this.tmpCoordinate_;let f=!0,g,_,m;for(g=e+s;g<i;g+=s)d[0]=t[g],d[1]=t[g+1],m=Sr(h,d),m!==_?(f&&(a[l++]=c,a[l++]=u,f=!1),a[l++]=d[0],a[l++]=d[1]):m===st.INTERSECTING?(a[l++]=d[0],a[l++]=d[1],f=!1):f=!0,c=d[0],u=d[1],_=m;return(r&&f||g===e+s)&&(a[l++]=c,a[l++]=u),l}drawCustomCoordinates_(t,e,i,s,r){for(let o=0,a=i.length;o<a;++o){const l=i[o],h=this.appendFlatLineCoordinates(t,e,l,s,!1,!1);r.push(h),e=l}return e}drawCustom(t,e,i,s){this.beginGeometry(t,e);const r=t.getType(),o=t.getStride(),a=this.coordinates.length;let l,h,c,u,d;switch(r){case"MultiPolygon":l=t.getOrientedFlatCoordinates(),u=[];const f=t.getEndss();d=0;for(let g=0,_=f.length;g<_;++g){const m=[];d=this.drawCustomCoordinates_(l,d,f[g],o,m),u.push(m)}this.instructions.push([F.CUSTOM,a,u,t,i,la]),this.hitDetectionInstructions.push([F.CUSTOM,a,u,t,s||i,la]);break;case"Polygon":case"MultiLineString":c=[],l=r=="Polygon"?t.getOrientedFlatCoordinates():t.getFlatCoordinates(),d=this.drawCustomCoordinates_(l,0,t.getEnds(),o,c),this.instructions.push([F.CUSTOM,a,c,t,i,us]),this.hitDetectionInstructions.push([F.CUSTOM,a,c,t,s||i,us]);break;case"LineString":case"Circle":l=t.getFlatCoordinates(),h=this.appendFlatLineCoordinates(l,0,l.length,o,!1,!1),this.instructions.push([F.CUSTOM,a,h,t,i,Ai]),this.hitDetectionInstructions.push([F.CUSTOM,a,h,t,s||i,Ai]);break;case"MultiPoint":l=t.getFlatCoordinates(),h=this.appendFlatPointCoordinates(l,o),h>a&&(this.instructions.push([F.CUSTOM,a,h,t,i,Ai]),this.hitDetectionInstructions.push([F.CUSTOM,a,h,t,s||i,Ai]));break;case"Point":l=t.getFlatCoordinates(),this.coordinates.push(l[0],l[1]),h=this.coordinates.length,this.instructions.push([F.CUSTOM,a,h,t,i]),this.hitDetectionInstructions.push([F.CUSTOM,a,h,t,s||i]);break}this.endGeometry(e)}beginGeometry(t,e){this.beginGeometryInstruction1_=[F.BEGIN_GEOMETRY,e,0,t],this.instructions.push(this.beginGeometryInstruction1_),this.beginGeometryInstruction2_=[F.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;t.reverse();let e;const i=t.length;let s,r,o=-1;for(e=0;e<i;++e)s=t[e],r=s[0],r==F.END_GEOMETRY?o=e:r==F.BEGIN_GEOMETRY&&(s[2]=e,Hc(this.hitDetectionInstructions,o,e),o=-1)}setFillStrokeStyle(t,e){const i=this.state;if(t){const s=t.getColor();i.fillStyle=qt(s||fe)}else i.fillStyle=void 0;if(e){const s=e.getColor();i.strokeStyle=qt(s||vn);const r=e.getLineCap();i.lineCap=r!==void 0?r:_s;const o=e.getLineDash();i.lineDash=o?o.slice():pn;const a=e.getLineDashOffset();i.lineDashOffset=a||En;const l=e.getLineJoin();i.lineJoin=l!==void 0?l:ki;const h=e.getWidth();i.lineWidth=h!==void 0?h:Tn;const c=e.getMiterLimit();i.miterLimit=c!==void 0?c:yn,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=[F.SET_FILL_STYLE,e];return typeof e!="string"&&i.push(!0),i}applyStroke(t){this.instructions.push(this.createStroke(t))}createStroke(t){return[F.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;(typeof i!="string"||t.currentFillStyle!=i)&&(i!==void 0&&this.instructions.push(e.call(this,t)),t.currentFillStyle=i)}updateStrokeStyle(t,e){const i=t.strokeStyle,s=t.lineCap,r=t.lineDash,o=t.lineDashOffset,a=t.lineJoin,l=t.lineWidth,h=t.miterLimit;(t.currentStrokeStyle!=i||t.currentLineCap!=s||r!=t.currentLineDash&&!oi(t.currentLineDash,r)||t.currentLineDashOffset!=o||t.currentLineJoin!=a||t.currentLineWidth!=l||t.currentMiterLimit!=h)&&(i!==void 0&&e.call(this,t),t.currentStrokeStyle=i,t.currentLineCap=s,t.currentLineDash=r,t.currentLineDashOffset=o,t.currentLineJoin=a,t.currentLineWidth=l,t.currentMiterLimit=h)}endGeometry(t){this.beginGeometryInstruction1_[2]=this.instructions.length,this.beginGeometryInstruction1_=null,this.beginGeometryInstruction2_[2]=this.hitDetectionInstructions.length,this.beginGeometryInstruction2_=null;const e=[F.END_GEOMETRY,t];this.instructions.push(e),this.hitDetectionInstructions.push(e)}getBufferedMaxExtent(){if(!this.bufferedMaxExtent_&&(this.bufferedMaxExtent_=Ol(this.maxExtent),this.maxLineWidth>0)){const t=this.resolution*(this.maxLineWidth+1)/2;qr(this.bufferedMaxExtent_,t,this.bufferedMaxExtent_)}return this.bufferedMaxExtent_}}const An=Jd;class Qd extends An{constructor(t,e,i,s){super(t,e,i,s),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(),s=t.getStride(),r=this.coordinates.length,o=this.appendFlatPointCoordinates(i,s);this.instructions.push([F.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.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([F.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.declutterMode_,this.declutterImageWithText_]),this.endGeometry(e)}drawMultiPoint(t,e){if(!this.image_)return;this.beginGeometry(t,e);const i=t.getFlatCoordinates(),s=t.getStride(),r=this.coordinates.length,o=this.appendFlatPointCoordinates(i,s);this.instructions.push([F.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.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([F.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.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(),s=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_=s[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_=s[0],this.declutterMode_=t.getDeclutterMode(),this.declutterImageWithText_=e}}const tf=Qd;class ef extends An{constructor(t,e,i,s){super(t,e,i,s)}drawFlatCoordinates_(t,e,i,s){const r=this.coordinates.length,o=this.appendFlatLineCoordinates(t,e,i,s,!1,!1),a=[F.MOVE_TO_LINE_TO,r,o];return this.instructions.push(a),this.hitDetectionInstructions.push(a),i}drawLineString(t,e){const i=this.state,s=i.strokeStyle,r=i.lineWidth;if(s===void 0||r===void 0)return;this.updateStrokeStyle(i,this.applyStroke),this.beginGeometry(t,e),this.hitDetectionInstructions.push([F.SET_STROKE_STYLE,i.strokeStyle,i.lineWidth,i.lineCap,i.lineJoin,i.miterLimit,pn,En],qe);const o=t.getFlatCoordinates(),a=t.getStride();this.drawFlatCoordinates_(o,0,o.length,a),this.hitDetectionInstructions.push(Oe),this.endGeometry(e)}drawMultiLineString(t,e){const i=this.state,s=i.strokeStyle,r=i.lineWidth;if(s===void 0||r===void 0)return;this.updateStrokeStyle(i,this.applyStroke),this.beginGeometry(t,e),this.hitDetectionInstructions.push([F.SET_STROKE_STYLE,i.strokeStyle,i.lineWidth,i.lineCap,i.lineJoin,i.miterLimit,i.lineDash,i.lineDashOffset],qe);const o=t.getEnds(),a=t.getFlatCoordinates(),l=t.getStride();let h=0;for(let c=0,u=o.length;c<u;++c)h=this.drawFlatCoordinates_(a,h,o[c],l);this.hitDetectionInstructions.push(Oe),this.endGeometry(e)}finish(){const t=this.state;return t.lastStroke!=null&&t.lastStroke!=this.coordinates.length&&this.instructions.push(Oe),this.reverseHitDetectionInstructions(),this.state=null,super.finish()}applyStroke(t){t.lastStroke!=null&&t.lastStroke!=this.coordinates.length&&(this.instructions.push(Oe),t.lastStroke=this.coordinates.length),t.lastStroke=0,super.applyStroke(t),this.instructions.push(qe)}}const nf=ef;class sf extends An{constructor(t,e,i,s){super(t,e,i,s)}drawFlatCoordinatess_(t,e,i,s){const r=this.state,o=r.fillStyle!==void 0,a=r.strokeStyle!==void 0,l=i.length;this.instructions.push(qe),this.hitDetectionInstructions.push(qe);for(let h=0;h<l;++h){const c=i[h],u=this.coordinates.length,d=this.appendFlatLineCoordinates(t,e,c,s,!0,!a),f=[F.MOVE_TO_LINE_TO,u,d];this.instructions.push(f),this.hitDetectionInstructions.push(f),a&&(this.instructions.push(Ca),this.hitDetectionInstructions.push(Ca)),e=c}return o&&(this.instructions.push(Un),this.hitDetectionInstructions.push(Un)),a&&(this.instructions.push(Oe),this.hitDetectionInstructions.push(Oe)),e}drawCircle(t,e){const i=this.state,s=i.fillStyle,r=i.strokeStyle;if(s===void 0&&r===void 0)return;this.setFillStrokeStyles_(),this.beginGeometry(t,e),i.fillStyle!==void 0&&this.hitDetectionInstructions.push([F.SET_FILL_STYLE,fe]),i.strokeStyle!==void 0&&this.hitDetectionInstructions.push([F.SET_STROKE_STYLE,i.strokeStyle,i.lineWidth,i.lineCap,i.lineJoin,i.miterLimit,i.lineDash,i.lineDashOffset]);const o=t.getFlatCoordinates(),a=t.getStride(),l=this.coordinates.length;this.appendFlatLineCoordinates(o,0,o.length,a,!1,!1);const h=[F.CIRCLE,l];this.instructions.push(qe,h),this.hitDetectionInstructions.push(qe,h),i.fillStyle!==void 0&&(this.instructions.push(Un),this.hitDetectionInstructions.push(Un)),i.strokeStyle!==void 0&&(this.instructions.push(Oe),this.hitDetectionInstructions.push(Oe)),this.endGeometry(e)}drawPolygon(t,e){const i=this.state,s=i.fillStyle,r=i.strokeStyle;if(s===void 0&&r===void 0)return;this.setFillStrokeStyles_(),this.beginGeometry(t,e),i.fillStyle!==void 0&&this.hitDetectionInstructions.push([F.SET_FILL_STYLE,fe]),i.strokeStyle!==void 0&&this.hitDetectionInstructions.push([F.SET_STROKE_STYLE,i.strokeStyle,i.lineWidth,i.lineCap,i.lineJoin,i.miterLimit,i.lineDash,i.lineDashOffset]);const o=t.getEnds(),a=t.getOrientedFlatCoordinates(),l=t.getStride();this.drawFlatCoordinatess_(a,0,o,l),this.endGeometry(e)}drawMultiPolygon(t,e){const i=this.state,s=i.fillStyle,r=i.strokeStyle;if(s===void 0&&r===void 0)return;this.setFillStrokeStyles_(),this.beginGeometry(t,e),i.fillStyle!==void 0&&this.hitDetectionInstructions.push([F.SET_FILL_STYLE,fe]),i.strokeStyle!==void 0&&this.hitDetectionInstructions.push([F.SET_STROKE_STYLE,i.strokeStyle,i.lineWidth,i.lineCap,i.lineJoin,i.miterLimit,i.lineDash,i.lineDashOffset]);const o=t.getEndss(),a=t.getOrientedFlatCoordinates(),l=t.getStride();let h=0;for(let c=0,u=o.length;c<u;++c)h=this.drawFlatCoordinatess_(a,h,o[c],l);this.endGeometry(e)}finish(){this.reverseHitDetectionInstructions(),this.state=null;const t=this.tolerance;if(t!==0){const e=this.coordinates;for(let i=0,s=e.length;i<s;++i)e[i]=Ke(e[i],t)}return super.finish()}setFillStrokeStyles_(){const t=this.state;t.fillStyle!==void 0&&this.updateFillStyle(t,this.createFill),t.strokeStyle!==void 0&&this.updateStrokeStyle(t,this.applyStroke)}}const wa=sf;function rf(n,t,e,i,s){let r=e,o=e,a=0,l=0,h=e,c,u,d,f,g,_,m,p,E,v;for(u=e;u<i;u+=s){const y=t[u],x=t[u+1];g!==void 0&&(E=y-g,v=x-_,f=Math.sqrt(E*E+v*v),m!==void 0&&(l+=d,c=Math.acos((m*E+p*v)/(d*f)),c>n&&(l>a&&(a=l,r=h,o=u),l=0,h=u-s)),d=f,m=E,p=v),g=y,_=x}return l+=f,l>a?[h,u]:[r,o]}const ln={left:0,end:0,center:.5,right:1,start:1,top:0,middle:.5,hanging:.2,alphabetic:.8,ideographic:.8,bottom:1};class of extends An{constructor(t,e,i,s){super(t,e,i,s),this.labels_=null,this.text_="",this.textOffsetX_=0,this.textOffsetY_=0,this.textRotateWithView_=void 0,this.textRotation_=0,this.textFillState_=null,this.fillStates={},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_,s=this.textStrokeState_,r=this.textState_;if(this.text_===""||!r||!i&&!s)return;const o=this.coordinates;let a=o.length;const l=t.getType();let h=null,c=t.getStride();if(r.placement==="line"&&(l=="LineString"||l=="MultiLineString"||l=="Polygon"||l=="MultiPolygon")){if(!vt(this.getBufferedMaxExtent(),t.getExtent()))return;let u;if(h=t.getFlatCoordinates(),l=="LineString")u=[h.length];else if(l=="MultiLineString")u=t.getEnds();else if(l=="Polygon")u=t.getEnds().slice(0,1);else if(l=="MultiPolygon"){const _=t.getEndss();u=[];for(let m=0,p=_.length;m<p;++m)u.push(_[m][0])}this.beginGeometry(t,e);const d=r.textAlign;let f=0,g;for(let _=0,m=u.length;_<m;++_){if(d==null){const E=rf(r.maxAngle,h,f,u[_],c);f=E[0],g=E[1]}else g=u[_];for(let E=f;E<g;E+=c)o.push(h[E],h[E+1]);const p=o.length;f=u[_],this.drawChars_(a,p),a=p}this.endGeometry(e)}else{let u=r.overflow?null:[];switch(l){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(),c=2;break;case"Polygon":h=t.getFlatInteriorPoint(),r.overflow||u.push(h[2]/this.resolution),c=3;break;case"MultiPolygon":const m=t.getFlatInteriorPoints();h=[];for(let p=0,E=m.length;p<E;p+=3)r.overflow||u.push(m[p+2]/this.resolution),h.push(m[p],m[p+1]);if(h.length===0)return;c=2;break}const d=this.appendFlatPointCoordinates(h,c);if(d===a)return;if(u&&(d-a)/2!==h.length/c){let m=a/2;u=u.filter((p,E)=>{const v=o[(m+E)*2]===h[E*c]&&o[(m+E)*2+1]===h[E*c+1];return v||--m,v})}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);let f=r.padding;if(f!=Ze&&(r.scale[0]<0||r.scale[1]<0)){let m=r.padding[0],p=r.padding[1],E=r.padding[2],v=r.padding[3];r.scale[0]<0&&(p=-p,v=-v),r.scale[1]<0&&(m=-m,E=-E),f=[m,p,E,v]}const g=this.pixelRatio;this.instructions.push([F.DRAW_IMAGE,a,d,null,NaN,NaN,NaN,1,0,0,this.textRotateWithView_,this.textRotation_,[1,1],NaN,void 0,this.declutterImageWithText_,f==Ze?Ze:f.map(function(m){return m*g}),!!r.backgroundFill,!!r.backgroundStroke,this.text_,this.textKey_,this.strokeKey_,this.fillKey_,this.textOffsetX_,this.textOffsetY_,u]);const _=1/g;this.hitDetectionInstructions.push([F.DRAW_IMAGE,a,d,null,NaN,NaN,NaN,1,0,0,this.textRotateWithView_,this.textRotation_,[_,_],NaN,void 0,this.declutterImageWithText_,f,!!r.backgroundFill,!!r.backgroundStroke,this.text_,this.textKey_,this.strokeKey_,this.fillKey_,this.textOffsetX_,this.textOffsetY_,u]),this.endGeometry(e)}}saveTextStates_(){const t=this.textStrokeState_,e=this.textState_,i=this.textFillState_,s=this.strokeKey_;t&&(s in this.strokeStates||(this.strokeStates[s]={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||xn,justify:e.justify,textBaseline:e.textBaseline||ms,scale:e.scale});const o=this.fillKey_;i&&(o in this.fillStates||(this.fillStates[o]={fillStyle:i.fillStyle}))}drawChars_(t,e){const i=this.textStrokeState_,s=this.textState_,r=this.strokeKey_,o=this.textKey_,a=this.fillKey_;this.saveTextStates_();const l=this.pixelRatio,h=ln[s.textBaseline],c=this.textOffsetY_*l,u=this.text_,d=i?i.lineWidth*Math.abs(s.scale[0])/2:0;this.instructions.push([F.DRAW_CHARS,t,e,h,s.overflow,a,s.maxAngle,l,c,r,d*l,u,o,1]),this.hitDetectionInstructions.push([F.DRAW_CHARS,t,e,h,s.overflow,a,s.maxAngle,1,c,r,d,u,o,1/l])}setTextStyle(t,e){let i,s,r;if(!t)this.text_="";else{const o=t.getFill();o?(s=this.textFillState_,s||(s={},this.textFillState_=s),s.fillStyle=qt(o.getColor()||fe)):(s=null,this.textFillState_=s);const a=t.getStroke();if(!a)r=null,this.textStrokeState_=r;else{r=this.textStrokeState_,r||(r={},this.textStrokeState_=r);const g=a.getLineDash(),_=a.getLineDashOffset(),m=a.getWidth(),p=a.getMiterLimit();r.lineCap=a.getLineCap()||_s,r.lineDash=g?g.slice():pn,r.lineDashOffset=_===void 0?En:_,r.lineJoin=a.getLineJoin()||ki,r.lineWidth=m===void 0?Tn:m,r.miterLimit=p===void 0?yn:p,r.strokeStyle=qt(a.getColor()||vn)}i=this.textState_;const l=t.getFont()||rh;Rd(l);const h=t.getScaleArray();i.overflow=t.getOverflow(),i.font=l,i.maxAngle=t.getMaxAngle(),i.placement=t.getPlacement(),i.textAlign=t.getTextAlign(),i.justify=t.getJustify(),i.textBaseline=t.getTextBaseline()||ms,i.backgroundFill=t.getBackgroundFill(),i.backgroundStroke=t.getBackgroundStroke(),i.padding=t.getPadding()||Ze,i.scale=h===void 0?[1,1]:h;const c=t.getOffsetX(),u=t.getOffsetY(),d=t.getRotateWithView(),f=t.getRotation();this.text_=t.getText()||"",this.textOffsetX_=c===void 0?0:c,this.textOffsetY_=u===void 0?0:u,this.textRotateWithView_=d===void 0?!1:d,this.textRotation_=f===void 0?0:f,this.strokeKey_=r?(typeof r.strokeStyle=="string"?r.strokeStyle:U(r.strokeStyle))+r.lineCap+r.lineDashOffset+"|"+r.lineWidth+r.lineJoin+r.miterLimit+"["+r.lineDash.join()+"]":"",this.textKey_=i.font+i.scale+(i.textAlign||"?")+(i.justify||"?")+(i.textBaseline||"?"),this.fillKey_=s?typeof s.fillStyle=="string"?s.fillStyle:"|"+U(s.fillStyle):""}this.declutterImageWithText_=e}}const af={Circle:wa,Default:An,Image:tf,LineString:nf,Polygon:wa,Text:of};class lf{constructor(t,e,i,s){this.tolerance_=t,this.maxExtent_=e,this.pixelRatio_=s,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 s in i){const r=i[s].finish();t[e][s]=r}}return t}getBuilder(t,e){const i=t!==void 0?t.toString():"0";let s=this.buildersByZIndex_[i];s===void 0&&(s={},this.buildersByZIndex_[i]=s);let r=s[e];if(r===void 0){const o=af[e];r=new o(this.tolerance_,this.maxExtent_,this.resolution_,this.pixelRatio_),s[e]=r}return r}}const Sa=lf;class hf extends Rl{constructor(t){super(),this.ready=!0,this.boundHandleImageChange_=this.handleImageChange_.bind(this),this.layer_=t,this.declutterExecutorGroup=null}getFeatures(t){return B()}getData(t){return null}prepareFrame(t){return B()}renderFrame(t,e){return B()}loadedTileCallback(t,e,i){t[e]||(t[e]={}),t[e][i.tileCoord.toString()]=i}createLoadedTileFinder(t,e,i){return function(s,r){const o=this.loadedTileCallback.bind(this,i,s);return t.forEachLoadedTile(e,s,r,o)}.bind(this)}forEachFeatureAtCoordinate(t,e,i,s,r){}getLayer(){return this.layer_}handleFontsChanged(){}handleImageChange_(t){t.target.getState()===it.LOADED&&this.renderIfReadyAndVisible()}loadImage(t){let e=t.getState();return e!=it.LOADED&&e!=it.ERROR&&t.addEventListener(W.CHANGE,this.boundHandleImageChange_),e==it.IDLE&&(t.load(),e=t.getState()),e==it.LOADED}renderIfReadyAndVisible(){const t=this.getLayer();t&&t.getVisible()&&t.getSourceState()==="ready"&&t.changed()}disposeInternal(){delete this.layer_,super.disposeInternal()}}const cf=hf;class uf extends pe{constructor(t,e,i,s){super(t),this.inversePixelTransform=e,this.frameState=i,this.context=s}}const gh=uf,Ra=[];let Ci=null;function df(){const n=document.createElement("canvas");n.width=1,n.height=1,Ci=n.getContext("2d")}class ff extends cf{constructor(t){super(t),this.container=null,this.renderedResolution,this.tempTransform=Jt(),this.pixelTransform=Jt(),this.inversePixelTransform=Jt(),this.context=null,this.containerReused=!1,this.pixelContext_=null,this.frameState=null}getImageData(t,e,i){Ci||df(),Ci.clearRect(0,0,1,1);let s;try{Ci.drawImage(t,e,i,1,1,0,0,1,1),s=Ci.getImageData(0,0,1,1).data}catch{return Ci=null,null}return s}getBackground(t){let i=this.getLayer().getBackground();return typeof i=="function"&&(i=i(t.viewState.resolution)),i||void 0}useContainer(t,e,i){const s=this.getLayer().getClassName();let r,o;if(t&&t.className===s&&(!i||t&&t.style.backgroundColor&&oi(fs(t.style.backgroundColor),fs(i)))){const a=t.firstElementChild;a instanceof HTMLCanvasElement&&(o=a.getContext("2d"))}if(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"),r.className=s;let a=r.style;a.position="absolute",a.width="100%",a.height="100%",o=It();const l=o.canvas;r.appendChild(l),a=l.style,a.position="absolute",a.left="0",a.transformOrigin="top left",this.container=r,this.context=o}!this.containerReused&&i&&!this.container.style.backgroundColor&&(this.container.style.backgroundColor=i)}clipUnrotated(t,e,i){const s=ai(i),r=Ds(i),o=Ls(i),a=Os(i);rt(e.coordinateToPixelTransform,s),rt(e.coordinateToPixelTransform,r),rt(e.coordinateToPixelTransform,o),rt(e.coordinateToPixelTransform,a);const l=this.inversePixelTransform;rt(l,s),rt(l,r),rt(l,o),rt(l,a),t.save(),t.beginPath(),t.moveTo(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.lineTo(Math.round(a[0]),Math.round(a[1])),t.clip()}dispatchRenderEvent_(t,e,i){const s=this.getLayer();if(s.hasListener(t)){const r=new gh(t,this.inversePixelTransform,i,e);s.dispatchEvent(r)}}preRender(t,e){this.frameState=e,this.dispatchRenderEvent_(Le.PRERENDER,t,e)}postRender(t,e){this.dispatchRenderEvent_(Le.POSTRENDER,t,e)}getRenderTransform(t,e,i,s,r,o,a){const l=r/2,h=o/2,c=s/e,u=-c,d=-t[0]+a,f=-t[1];return Me(this.tempTransform,l,h,c,u,-i,d,f)}disposeInternal(){delete this.frameState,super.disposeInternal()}}const _h=ff;function gf(n,t,e,i,s,r,o,a,l,h,c,u){let d=n[t],f=n[t+1],g=0,_=0,m=0,p=0;function E(){g=d,_=f,t+=i,d=n[t],f=n[t+1],p+=m,m=Math.sqrt((d-g)*(d-g)+(f-_)*(f-_))}do E();while(t<e-i&&p+m<r);let v=m===0?0:(r-p)/m;const y=Be(g,d,v),x=Be(_,f,v),C=t-i,S=p,R=r+a*l(h,s,c);for(;t<e-i&&p+m<R;)E();v=m===0?0:(R-p)/m;const A=Be(g,d,v),O=Be(_,f,v);let N;if(u){const I=[y,x,A,O];Vl(I,0,4,2,u,I,I),N=I[0]>I[2]}else N=y>A;const $=Math.PI,D=[],j=C+i===t;t=C,m=0,p=S,d=n[t],f=n[t+1];let k;if(j){E(),k=Math.atan2(f-_,d-g),N&&(k+=k>0?-$:$);const I=(A+y)/2,b=(O+x)/2;return D[0]=[I,b,(R-r)/2,k,s],D}s=s.replace(/\n/g," ");for(let I=0,b=s.length;I<b;){E();let L=Math.atan2(f-_,d-g);if(N&&(L+=L>0?-$:$),k!==void 0){let G=L-k;if(G+=G>$?-2*$:G<-$?2*$:0,Math.abs(G)>o)return null}k=L;const X=I;let K=0;for(;I<b;++I){const G=N?b-I-1:I,Y=a*l(h,s[G],c);if(t+i<e&&p+m<r+K+Y/2)break;K+=Y}if(I===X)continue;const Q=N?s.substring(b-X,b-I):s.substring(X,I);v=m===0?0:(r+K/2-p)/m;const w=Be(g,d,v),nt=Be(_,f,v);D.push([w,nt,K/2,L,Q]),r+=K}return D}const mi=Xt(),Ce=[],ae=[],le=[],we=[];function Ia(n){return n[3].declutterBox}const _f=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 ba(n,t){return(t==="start"||t==="end")&&!_f.test(n)&&(t=t==="start"?"left":"right"),ln[t]}function mf(n,t,e){return e>0&&n.push(`
|
||
`,""),n.push(t,""),n}class pf{constructor(t,e,i,s){this.overlaps=i,this.pixelRatio=e,this.resolution=t,this.alignFill_,this.instructions=s.instructions,this.coordinates=s.coordinates,this.coordinateCache_={},this.renderedTransform_=Jt(),this.hitDetectionInstructions=s.hitDetectionInstructions,this.pixelCoordinates_=null,this.viewRotation_=0,this.fillStates=s.fillStates||{},this.strokeStates=s.strokeStates||{},this.textStates=s.textStates||{},this.widths_={},this.labels_={}}createLabel(t,e,i,s){const r=t+e+i+s;if(this.labels_[r])return this.labels_[r];const o=s?this.strokeStates[s]:null,a=i?this.fillStates[i]:null,l=this.textStates[e],h=this.pixelRatio,c=[l.scale[0]*h,l.scale[1]*h],u=Array.isArray(t),d=l.justify?ln[l.justify]:ba(Array.isArray(t)?t[0]:t,l.textAlign||xn),f=s&&o.lineWidth?o.lineWidth:0,g=u?t:t.split(`
|
||
`).reduce(mf,[]),{width:_,height:m,widths:p,heights:E,lineWidths:v}=bd(l,g),y=_+f,x=[],C=(y+2)*c[0],S=(m+f)*c[1],R={width:C<0?Math.floor(C):Math.ceil(C),height:S<0?Math.floor(S):Math.ceil(S),contextInstructions:x};(c[0]!=1||c[1]!=1)&&x.push("scale",c),s&&(x.push("strokeStyle",o.strokeStyle),x.push("lineWidth",f),x.push("lineCap",o.lineCap),x.push("lineJoin",o.lineJoin),x.push("miterLimit",o.miterLimit),x.push("setLineDash",[o.lineDash]),x.push("lineDashOffset",o.lineDashOffset)),i&&x.push("fillStyle",a.fillStyle),x.push("textBaseline","middle"),x.push("textAlign","center");const A=.5-d;let O=d*y+A*f;const N=[],$=[];let D=0,j=0,k=0,I=0,b;for(let L=0,X=g.length;L<X;L+=2){const K=g[L];if(K===`
|
||
`){j+=D,D=0,O=d*y+A*f,++I;continue}const Q=g[L+1]||l.font;Q!==b&&(s&&N.push("font",Q),i&&$.push("font",Q),b=Q),D=Math.max(D,E[k]);const w=[K,O+A*p[k]+d*(p[k]-v[I]),.5*(f+D)+j];O+=p[k],s&&N.push("strokeText",w),i&&$.push("fillText",w),++k}return Array.prototype.push.apply(x,N),Array.prototype.push.apply(x,$),this.labels_[r]=R,R}replayTextBackground_(t,e,i,s,r,o,a){t.beginPath(),t.moveTo.apply(t,e),t.lineTo.apply(t,i),t.lineTo.apply(t,s),t.lineTo.apply(t,r),t.lineTo.apply(t,e),o&&(this.alignFill_=o[2],this.fill_(t)),a&&(this.setStrokeStyle_(t,a),t.stroke())}calculateImageOrLabelDimensions_(t,e,i,s,r,o,a,l,h,c,u,d,f,g,_,m){a*=d[0],l*=d[1];let p=i-a,E=s-l;const v=r+h>t?t-h:r,y=o+c>e?e-c:o,x=g[3]+v*d[0]+g[1],C=g[0]+y*d[1]+g[2],S=p-g[3],R=E-g[0];(_||u!==0)&&(Ce[0]=S,we[0]=S,Ce[1]=R,ae[1]=R,ae[0]=S+x,le[0]=ae[0],le[1]=R+C,we[1]=le[1]);let A;return u!==0?(A=Me(Jt(),i,s,1,1,u,-i,-s),rt(A,Ce),rt(A,ae),rt(A,le),rt(A,we),ee(Math.min(Ce[0],ae[0],le[0],we[0]),Math.min(Ce[1],ae[1],le[1],we[1]),Math.max(Ce[0],ae[0],le[0],we[0]),Math.max(Ce[1],ae[1],le[1],we[1]),mi)):ee(Math.min(S,S+x),Math.min(R,R+C),Math.max(S,S+x),Math.max(R,R+C),mi),f&&(p=Math.round(p),E=Math.round(E)),{drawImageX:p,drawImageY:E,drawImageW:v,drawImageH:y,originX:h,originY:c,declutterBox:{minX:mi[0],minY:mi[1],maxX:mi[2],maxY:mi[3],value:m},canvasTransform:A,scale:d}}replayImageOrLabel_(t,e,i,s,r,o,a){const l=!!(o||a),h=s.declutterBox,c=t.canvas,u=a?a[2]*s.scale[0]/2:0;return h.minX-u<=c.width/e&&h.maxX+u>=0&&h.minY-u<=c.height/e&&h.maxY+u>=0&&(l&&this.replayTextBackground_(t,Ce,ae,le,we,o,a),Ad(t,s.canvasTransform,r,i,s.originX,s.originY,s.drawImageW,s.drawImageH,s.drawImageX,s.drawImageY,s.scale)),!0}fill_(t){if(this.alignFill_){const e=rt(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,s){const r=this.textStates[e],o=this.createLabel(t,e,s,i),a=this.strokeStates[i],l=this.pixelRatio,h=ba(Array.isArray(t)?t[0]:t,r.textAlign||xn),c=ln[r.textBaseline||ms],u=a&&a.lineWidth?a.lineWidth:0,d=o.width/l-2*r.scale[0],f=h*d+2*(.5-h)*u,g=c*o.height/l+2*(.5-c)*u;return{label:o,anchorX:f,anchorY:g}}execute_(t,e,i,s,r,o,a,l){let h;this.pixelCoordinates_&&oi(i,this.renderedTransform_)?h=this.pixelCoordinates_:(this.pixelCoordinates_||(this.pixelCoordinates_=[]),h=ti(this.coordinates,0,this.coordinates.length,2,i,this.pixelCoordinates_),cu(this.renderedTransform_,i));let c=0;const u=s.length;let d=0,f,g,_,m,p,E,v,y,x,C,S,R,A=0,O=0,N=null,$=null;const D=this.coordinateCache_,j=this.viewRotation_,k=Math.round(Math.atan2(-i[1],i[0])*1e12)/1e12,I={context:t,pixelRatio:this.pixelRatio,resolution:this.resolution,rotation:j},b=this.instructions!=s||this.overlaps?0:200;let L,X,K,Q;for(;c<u;){const w=s[c];switch(w[0]){case F.BEGIN_GEOMETRY:L=w[1],Q=w[3],L.getGeometry()?a!==void 0&&!vt(a,Q.getExtent())?c=w[2]+1:++c:c=w[2];break;case F.BEGIN_PATH:A>b&&(this.fill_(t),A=0),O>b&&(t.stroke(),O=0),!A&&!O&&(t.beginPath(),m=NaN,p=NaN),++c;break;case F.CIRCLE:d=w[1];const G=h[d],Y=h[d+1],mt=h[d+2],ct=h[d+3],Z=mt-G,Tt=ct-Y,ye=Math.sqrt(Z*Z+Tt*Tt);t.moveTo(G+ye,Y),t.arc(G,Y,ye,0,2*Math.PI,!0),++c;break;case F.CLOSE_PATH:t.closePath(),++c;break;case F.CUSTOM:d=w[1],f=w[2];const ve=w[3],xe=w[4],Ge=w.length==6?w[5]:void 0;I.geometry=ve,I.feature=L,c in D||(D[c]=[]);const Kt=D[c];Ge?Ge(h,d,f,2,Kt):(Kt[0]=h[d],Kt[1]=h[d+1],Kt.length=2),xe(Kt,I),++c;break;case F.DRAW_IMAGE:d=w[1],f=w[2],y=w[3],g=w[4],_=w[5];let Ye=w[6];const Wt=w[7],Ve=w[8],ci=w[9],ui=w[10];let pt=w[11];const Te=w[12];let ot=w[13];const ut=w[14],dt=w[15];if(!y&&w.length>=20){x=w[19],C=w[20],S=w[21],R=w[22];const Ct=this.drawLabelWithPointPlacement_(x,C,S,R);y=Ct.label,w[3]=y;const fi=w[23];g=(Ct.anchorX-fi)*this.pixelRatio,w[4]=g;const Dt=w[24];_=(Ct.anchorY-Dt)*this.pixelRatio,w[5]=_,Ye=y.height,w[6]=Ye,ot=y.width,w[13]=ot}let Lt;w.length>25&&(Lt=w[25]);let se,Ut,Gt;w.length>17?(se=w[16],Ut=w[17],Gt=w[18]):(se=Ze,Ut=!1,Gt=!1),ui&&k?pt+=j:!ui&&!k&&(pt-=j);let di=0;for(;d<f;d+=2){if(Lt&&Lt[di++]<ot/this.pixelRatio)continue;const Ct=this.calculateImageOrLabelDimensions_(y.width,y.height,h[d],h[d+1],ot,Ye,g,_,Ve,ci,pt,Te,r,se,Ut||Gt,L),fi=[t,e,y,Ct,Wt,Ut?N:null,Gt?$:null];if(l){if(ut==="none")continue;if(ut==="obstacle"){l.insert(Ct.declutterBox);continue}else{let Dt,re;if(dt){const wt=f-d;if(!dt[wt]){dt[wt]=fi;continue}if(Dt=dt[wt],delete dt[wt],re=Ia(Dt),l.collides(re))continue}if(l.collides(Ct.declutterBox))continue;Dt&&(l.insert(re),this.replayImageOrLabel_.apply(this,Dt)),l.insert(Ct.declutterBox)}}this.replayImageOrLabel_.apply(this,fi)}++c;break;case F.DRAW_CHARS:const kn=w[1],ft=w[2],Hs=w[3],Yc=w[4];R=w[5];const Vc=w[6],zo=w[7],Bo=w[8];S=w[9];const js=w[10];x=w[11],C=w[12];const Ko=[w[13],w[13]],Zs=this.textStates[C],Zi=Zs.font,qi=[Zs.scale[0]*zo,Zs.scale[1]*zo];let Ji;Zi in this.widths_?Ji=this.widths_[Zi]:(Ji={},this.widths_[Zi]=Ji);const Uo=gd(h,kn,ft,2),Ho=Math.abs(qi[0])*pa(Zi,x,Ji);if(Yc||Ho<=Uo){const Ct=this.textStates[C].textAlign,fi=(Uo-Ho)*ln[Ct],Dt=gf(h,kn,ft,2,x,fi,Vc,Math.abs(qi[0]),pa,Zi,Ji,k?0:this.viewRotation_);t:if(Dt){const re=[];let wt,$n,Wn,Et,Mt;if(S)for(wt=0,$n=Dt.length;wt<$n;++wt){Mt=Dt[wt],Wn=Mt[4],Et=this.createLabel(Wn,C,"",S),g=Mt[2]+(qi[0]<0?-js:js),_=Hs*Et.height+(.5-Hs)*2*js*qi[1]/qi[0]-Bo;const oe=this.calculateImageOrLabelDimensions_(Et.width,Et.height,Mt[0],Mt[1],Et.width,Et.height,g,_,0,0,Mt[3],Ko,!1,Ze,!1,L);if(l&&l.collides(oe.declutterBox))break t;re.push([t,e,Et,oe,1,null,null])}if(R)for(wt=0,$n=Dt.length;wt<$n;++wt){Mt=Dt[wt],Wn=Mt[4],Et=this.createLabel(Wn,C,R,""),g=Mt[2],_=Hs*Et.height-Bo;const oe=this.calculateImageOrLabelDimensions_(Et.width,Et.height,Mt[0],Mt[1],Et.width,Et.height,g,_,0,0,Mt[3],Ko,!1,Ze,!1,L);if(l&&l.collides(oe.declutterBox))break t;re.push([t,e,Et,oe,1,null,null])}l&&l.load(re.map(Ia));for(let oe=0,Xc=re.length;oe<Xc;++oe)this.replayImageOrLabel_.apply(this,re[oe])}}++c;break;case F.END_GEOMETRY:if(o!==void 0){L=w[1];const Ct=o(L,Q);if(Ct)return Ct}++c;break;case F.FILL:b?A++:this.fill_(t),++c;break;case F.MOVE_TO_LINE_TO:for(d=w[1],f=w[2],X=h[d],K=h[d+1],E=X+.5|0,v=K+.5|0,(E!==m||v!==p)&&(t.moveTo(X,K),m=E,p=v),d+=2;d<f;d+=2)X=h[d],K=h[d+1],E=X+.5|0,v=K+.5|0,(d==f-2||E!==m||v!==p)&&(t.lineTo(X,K),m=E,p=v);++c;break;case F.SET_FILL_STYLE:N=w,this.alignFill_=w[2],A&&(this.fill_(t),A=0,O&&(t.stroke(),O=0)),t.fillStyle=w[1],++c;break;case F.SET_STROKE_STYLE:$=w,O&&(t.stroke(),O=0),this.setStrokeStyle_(t,w),++c;break;case F.STROKE:b?O++:t.stroke(),++c;break;default:++c;break}}A&&this.fill_(t),O&&t.stroke()}execute(t,e,i,s,r,o){this.viewRotation_=s,this.execute_(t,e,i,this.instructions,r,void 0,void 0,o)}executeHitDetection(t,e,i,s,r){return this.viewRotation_=i,this.execute_(t,1,e,this.hitDetectionInstructions,!0,s,r)}}const Ef=pf,tr=["Polygon","Circle","LineString","Image","Text","Default"];class yf{constructor(t,e,i,s,r,o){this.maxExtent_=t,this.overlaps_=s,this.pixelRatio_=i,this.resolution_=e,this.renderBuffer_=o,this.executorsByZIndex_={},this.hitDetectionContext_=null,this.hitDetectionTransform_=Jt(),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];i===void 0&&(i={},this.executorsByZIndex_[e]=i);const s=t[e];for(const r in s){const o=s[r];i[r]=new Ef(this.resolution_,this.pixelRatio_,this.overlaps_,o)}}}hasExecutors(t){for(const e in this.executorsByZIndex_){const i=this.executorsByZIndex_[e];for(let s=0,r=t.length;s<r;++s)if(t[s]in i)return!0}return!1}forEachFeatureAtCoordinate(t,e,i,s,r,o){s=Math.round(s);const a=s*2+1,l=Me(this.hitDetectionTransform_,s+.5,s+.5,1/e,-1/e,-i,-t[0],-t[1]),h=!this.hitDetectionContext_;h&&(this.hitDetectionContext_=It(a,a));const 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);let u;this.renderBuffer_!==void 0&&(u=Xt(),on(u,t),qr(u,e*(this.renderBuffer_+s),u));const d=vf(s);let f;function g(x,C){const S=c.getImageData(0,0,a,a).data;for(let R=0,A=d.length;R<A;R++)if(S[d[R]]>0){if(!o||f!=="Image"&&f!=="Text"||o.includes(x)){const O=(d[R]-3)/4,N=s-O%a,$=s-(O/a|0),D=r(x,C,N*N+$*$);if(D)return D}c.clearRect(0,0,a,a);break}}const _=Object.keys(this.executorsByZIndex_).map(Number);_.sort(Ni);let m,p,E,v,y;for(m=_.length-1;m>=0;--m){const x=_[m].toString();for(E=this.executorsByZIndex_[x],p=tr.length-1;p>=0;--p)if(f=tr[p],v=E[f],v!==void 0&&(y=v.executeHitDetection(c,l,i,g,u),y))return y}}getClipCoords(t){const e=this.maxExtent_;if(!e)return null;const i=e[0],s=e[1],r=e[2],o=e[3],a=[i,s,i,o,r,o,r,s];return ti(a,0,8,2,t,a),a}isEmpty(){return fn(this.executorsByZIndex_)}execute(t,e,i,s,r,o,a){const l=Object.keys(this.executorsByZIndex_).map(Number);l.sort(Ni),this.maxExtent_&&(t.save(),this.clip(t,i)),o=o||tr;let h,c,u,d,f,g;for(a&&l.reverse(),h=0,c=l.length;h<c;++h){const _=l[h].toString();for(f=this.executorsByZIndex_[_],u=0,d=o.length;u<d;++u){const m=o[u];g=f[m],g!==void 0&&g.execute(t,e,i,s,r,a)}}this.maxExtent_&&t.restore()}}const er={};function vf(n){if(er[n]!==void 0)return er[n];const t=n*2+1,e=n*n,i=new Array(e+1);for(let r=0;r<=n;++r)for(let o=0;o<=n;++o){const a=r*r+o*o;if(a>e)break;let l=i[a];l||(l=[],i[a]=l),l.push(((n+r)*t+(n+o))*4+3),r>0&&l.push(((n-r)*t+(n+o))*4+3),o>0&&(l.push(((n+r)*t+(n-o))*4+3),r>0&&l.push(((n-r)*t+(n-o))*4+3))}const s=[];for(let r=0,o=i.length;r<o;++r)i[r]&&s.push(...i[r]);return er[n]=s,s}const Aa=yf,ht={ANIMATING:0,INTERACTING:1};class xf extends fh{constructor(t,e,i,s,r,o,a){super(),this.context_=t,this.pixelRatio_=e,this.extent_=i,this.transform_=s,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_=Jt()}drawImages_(t,e,i,s){if(!this.image_)return;const r=ti(t,e,i,s,this.transform_,this.pixelCoordinates_),o=this.context_,a=this.tmpLocalTransform_,l=o.globalAlpha;this.imageOpacity_!=1&&(o.globalAlpha=l*this.imageOpacity_);let h=this.imageRotation_;this.imageRotateWithView_&&(h+=this.viewRotation_);for(let c=0,u=r.length;c<u;c+=2){const d=r[c]-this.imageAnchorX_,f=r[c+1]-this.imageAnchorY_;if(h!==0||this.imageScale_[0]!=1||this.imageScale_[1]!=1){const g=d+this.imageAnchorX_,_=f+this.imageAnchorY_;Me(a,g,_,1,1,h,-g,-_),o.setTransform.apply(o,a),o.translate(g,_),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_)}this.imageOpacity_!=1&&(o.globalAlpha=l)}drawText_(t,e,i,s){if(!this.textState_||this.text_==="")return;this.textFillState_&&this.setContextFillState_(this.textFillState_),this.textStrokeState_&&this.setContextStrokeState_(this.textStrokeState_),this.setContextTextState_(this.textState_);const r=ti(t,e,i,s,this.transform_,this.pixelCoordinates_),o=this.context_;let a=this.textRotation_;for(this.textRotateWithView_&&(a+=this.viewRotation_);e<i;e+=s){const l=r[e]+this.textOffsetX_,h=r[e+1]+this.textOffsetY_;a!==0||this.textScale_[0]!=1||this.textScale_[1]!=1?(o.translate(l-this.textOffsetX_,h-this.textOffsetY_),o.rotate(a),o.translate(this.textOffsetX_,this.textOffsetY_),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)):(this.textStrokeState_&&o.strokeText(this.text_,l,h),this.textFillState_&&o.fillText(this.text_,l,h))}}moveToLineTo_(t,e,i,s,r){const o=this.context_,a=ti(t,e,i,s,this.transform_,this.pixelCoordinates_);o.moveTo(a[0],a[1]);let l=a.length;r&&(l-=2);for(let h=2;h<l;h+=2)o.lineTo(a[h],a[h+1]);return r&&o.closePath(),i}drawRings_(t,e,i,s){for(let r=0,o=i.length;r<o;++r)e=this.moveToLineTo_(t,e,i[r],s,!0);return e}drawCircle(t){if(vt(this.extent_,t.getExtent())){if(this.fillState_||this.strokeState_){this.fillState_&&this.setContextFillState_(this.fillState_),this.strokeState_&&this.setContextStrokeState_(this.strokeState_);const e=Qu(t,this.transform_,this.pixelCoordinates_),i=e[2]-e[0],s=e[3]-e[1],r=Math.sqrt(i*i+s*s),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)}}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);break}}drawFeature(t,e){const i=e.getGeometryFunction()(t);!i||!vt(this.extent_,i.getExtent())||(this.setStyle(e),this.drawGeometry(i))}drawGeometryCollection(t){const e=t.getGeometriesArray();for(let i=0,s=e.length;i<s;++i)this.drawGeometry(e[i])}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_)),!!vt(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(vt(this.extent_,e)){if(this.strokeState_){this.setContextStrokeState_(this.strokeState_);const i=this.context_,s=t.getFlatCoordinates();let r=0;const o=t.getEnds(),a=t.getStride();i.beginPath();for(let l=0,h=o.length;l<h;++l)r=this.moveToLineTo_(s,r,o[l],a,!1);i.stroke()}if(this.text_!==""){const i=t.getFlatMidpoints();this.drawText_(i,0,i.length,2)}}}drawPolygon(t){if(this.squaredTolerance_&&(t=t.simplifyTransformed(this.squaredTolerance_,this.userTransform_)),!!vt(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_)),!!vt(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 s=0;const r=t.getEndss(),o=t.getStride();e.beginPath();for(let a=0,l=r.length;a<l;++a){const h=r[a];s=this.drawRings_(i,s,h,o)}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),oi(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_,s=t.textAlign?t.textAlign:xn;i?(i.font!=t.font&&(i.font=t.font,e.font=t.font),i.textAlign!=s&&(i.textAlign=s,e.textAlign=s),i.textBaseline!=t.textBaseline&&(i.textBaseline=t.textBaseline,e.textBaseline=t.textBaseline)):(e.font=t.font,e.textAlign=s,e.textBaseline=t.textBaseline,this.contextTextState_={font:t.font,textAlign:s,textBaseline:t.textBaseline})}setFillStrokeStyle(t,e){if(!t)this.fillState_=null;else{const i=t.getColor();this.fillState_={fillStyle:qt(i||fe)}}if(!e)this.strokeState_=null;else{const i=e.getColor(),s=e.getLineCap(),r=e.getLineDash(),o=e.getLineDashOffset(),a=e.getLineJoin(),l=e.getWidth(),h=e.getMiterLimit(),c=r||pn;this.strokeState_={lineCap:s!==void 0?s:_s,lineDash:this.pixelRatio_===1?c:c.map(u=>u*this.pixelRatio_),lineDashOffset:(o||En)*this.pixelRatio_,lineJoin:a!==void 0?a:ki,lineWidth:(l!==void 0?l:Tn)*this.pixelRatio_,miterLimit:h!==void 0?h:yn,strokeStyle:qt(i||vn)}}}setImageStyle(t){let e;if(!t||!(e=t.getSize())){this.image_=null;return}const i=t.getPixelRatio(this.pixelRatio_),s=t.getAnchor(),r=t.getOrigin();this.image_=t.getImage(this.pixelRatio_),this.imageAnchorX_=s[0]*i,this.imageAnchorY_=s[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 o=t.getScaleArray();this.imageScale_=[o[0]*this.pixelRatio_/i,o[1]*this.pixelRatio_/i],this.imageWidth_=e[0]*i}setTextStyle(t){if(!t)this.text_="";else{const e=t.getFill();if(!e)this.textFillState_=null;else{const f=e.getColor();this.textFillState_={fillStyle:qt(f||fe)}}const i=t.getStroke();if(!i)this.textStrokeState_=null;else{const f=i.getColor(),g=i.getLineCap(),_=i.getLineDash(),m=i.getLineDashOffset(),p=i.getLineJoin(),E=i.getWidth(),v=i.getMiterLimit();this.textStrokeState_={lineCap:g!==void 0?g:_s,lineDash:_||pn,lineDashOffset:m||En,lineJoin:p!==void 0?p:ki,lineWidth:E!==void 0?E:Tn,miterLimit:v!==void 0?v:yn,strokeStyle:qt(f||vn)}}const s=t.getFont(),r=t.getOffsetX(),o=t.getOffsetY(),a=t.getRotateWithView(),l=t.getRotation(),h=t.getScaleArray(),c=t.getText(),u=t.getTextAlign(),d=t.getTextBaseline();this.textState_={font:s!==void 0?s:rh,textAlign:u!==void 0?u:xn,textBaseline:d!==void 0?d:ms},this.text_=c!==void 0?Array.isArray(c)?c.reduce((f,g,_)=>f+=_%2?" ":g,""):c:"",this.textOffsetX_=r!==void 0?this.pixelRatio_*r:0,this.textOffsetY_=o!==void 0?this.pixelRatio_*o:0,this.textRotateWithView_=a!==void 0?a:!1,this.textRotation_=l!==void 0?l:0,this.textScale_=[this.pixelRatio_*h[0],this.pixelRatio_*h[1]]}}}const Tf=xf,Ht=.5;function Cf(n,t,e,i,s,r,o){const a=n[0]*Ht,l=n[1]*Ht,h=It(a,l);h.imageSmoothingEnabled=!1;const c=h.canvas,u=new Tf(h,Ht,s,null,o),d=e.length,f=Math.floor((256*256*256-1)/d),g={};for(let m=1;m<=d;++m){const p=e[m-1],E=p.getStyleFunction()||i;if(!i)continue;let v=E(p,r);if(!v)continue;Array.isArray(v)||(v=[v]);const x="#"+("000000"+(m*f).toString(16)).slice(-6);for(let C=0,S=v.length;C<S;++C){const R=v[C],A=R.getGeometryFunction()(p);if(!A||!vt(s,A.getExtent()))continue;const O=R.clone(),N=O.getFill();N&&N.setColor(x);const $=O.getStroke();$&&($.setColor(x),$.setLineDash(null)),O.setText(void 0);const D=R.getImage();if(D&&D.getOpacity()!==0){const I=D.getImageSize();if(!I)continue;const b=It(I[0],I[1],void 0,{alpha:!1}),L=b.canvas;b.fillStyle=x,b.fillRect(0,0,L.width,L.height),O.setImage(new mo({img:L,imgSize:I,anchor:D.getAnchor(),anchorXUnits:"pixels",anchorYUnits:"pixels",offset:D.getOrigin(),opacity:1,size:D.getSize(),scale:D.getScale(),rotation:D.getRotation(),rotateWithView:D.getRotateWithView()}))}const j=O.getZIndex()||0;let k=g[j];k||(k={},g[j]=k,k.Polygon=[],k.Circle=[],k.LineString=[],k.Point=[]),k[A.getType().replace("Multi","")].push(A,O)}}const _=Object.keys(g).map(Number).sort(Ni);for(let m=0,p=_.length;m<p;++m){const E=g[_[m]];for(const v in E){const y=E[v];for(let x=0,C=y.length;x<C;x+=2){u.setStyle(y[x+1]);for(let S=0,R=t.length;S<R;++S)u.setTransform(t[S]),u.drawGeometry(y[x])}}}return h.getImageData(0,0,c.width,c.height)}function wf(n,t,e){const i=[];if(e){const s=Math.floor(Math.round(n[0])*Ht),r=Math.floor(Math.round(n[1])*Ht),o=(et(s,0,e.width-1)+et(r,0,e.height-1)*e.width)*4,a=e.data[o],l=e.data[o+1],c=e.data[o+2]+256*(l+256*a),u=Math.floor((256*256*256-1)/t.length);c&&c%u===0&&i.push(t[c/u-1])}return i}const Sf=.5,mh={Point:Pf,LineString:Lf,Polygon:Ff,MultiPoint:Nf,MultiLineString:Df,MultiPolygon:Mf,GeometryCollection:Of,Circle:bf};function Rf(n,t){return parseInt(U(n),10)-parseInt(U(t),10)}function If(n,t){const e=Nr(n,t);return e*e}function Nr(n,t){return Sf*n/t}function bf(n,t,e,i,s){const r=e.getFill(),o=e.getStroke();if(r||o){const l=n.getBuilder(e.getZIndex(),"Circle");l.setFillStrokeStyle(r,o),l.drawCircle(t,i)}const a=e.getText();if(a&&a.getText()){const l=(s||n).getBuilder(e.getZIndex(),"Text");l.setTextStyle(a),l.drawText(t,i)}}function Oa(n,t,e,i,s,r,o){let a=!1;const l=e.getImage();if(l){const h=l.getImageState();h==it.LOADED||h==it.ERROR?l.unlistenImageChange(s):(h==it.IDLE&&l.load(),l.listenImageChange(s),a=!0)}return Af(n,t,e,i,r,o),a}function Af(n,t,e,i,s,r){const o=e.getGeometryFunction()(t);if(!o)return;const a=o.simplifyTransformed(i,s);if(e.getRenderer())ph(n,a,e,t);else{const h=mh[a.getType()];h(n,a,e,t,r)}}function ph(n,t,e,i){if(t.getType()=="GeometryCollection"){const r=t.getGeometries();for(let o=0,a=r.length;o<a;++o)ph(n,r[o],e,i);return}n.getBuilder(e.getZIndex(),"Default").drawCustom(t,i,e.getRenderer(),e.getHitDetectionRenderer())}function Of(n,t,e,i,s){const r=t.getGeometriesArray();let o,a;for(o=0,a=r.length;o<a;++o){const l=mh[r[o].getType()];l(n,r[o],e,i,s)}}function Lf(n,t,e,i,s){const r=e.getStroke();if(r){const a=n.getBuilder(e.getZIndex(),"LineString");a.setFillStrokeStyle(null,r),a.drawLineString(t,i)}const o=e.getText();if(o&&o.getText()){const a=(s||n).getBuilder(e.getZIndex(),"Text");a.setTextStyle(o),a.drawText(t,i)}}function Df(n,t,e,i,s){const r=e.getStroke();if(r){const a=n.getBuilder(e.getZIndex(),"LineString");a.setFillStrokeStyle(null,r),a.drawMultiLineString(t,i)}const o=e.getText();if(o&&o.getText()){const a=(s||n).getBuilder(e.getZIndex(),"Text");a.setTextStyle(o),a.drawText(t,i)}}function Mf(n,t,e,i,s){const r=e.getFill(),o=e.getStroke();if(o||r){const l=n.getBuilder(e.getZIndex(),"Polygon");l.setFillStrokeStyle(r,o),l.drawMultiPolygon(t,i)}const a=e.getText();if(a&&a.getText()){const l=(s||n).getBuilder(e.getZIndex(),"Text");l.setTextStyle(a),l.drawText(t,i)}}function Pf(n,t,e,i,s){const r=e.getImage(),o=e.getText();let a;if(r){if(r.getImageState()!=it.LOADED)return;let l=n;if(s){const c=r.getDeclutterMode();if(c!=="none")if(l=s,c==="obstacle"){const u=n.getBuilder(e.getZIndex(),"Image");u.setImageStyle(r,a),u.drawPoint(t,i)}else o&&o.getText()&&(a={})}const h=l.getBuilder(e.getZIndex(),"Image");h.setImageStyle(r,a),h.drawPoint(t,i)}if(o&&o.getText()){let l=n;s&&(l=s);const h=l.getBuilder(e.getZIndex(),"Text");h.setTextStyle(o,a),h.drawText(t,i)}}function Nf(n,t,e,i,s){const r=e.getImage(),o=e.getText();let a;if(r){if(r.getImageState()!=it.LOADED)return;let l=n;if(s){const c=r.getDeclutterMode();if(c!=="none")if(l=s,c==="obstacle"){const u=n.getBuilder(e.getZIndex(),"Image");u.setImageStyle(r,a),u.drawMultiPoint(t,i)}else o&&o.getText()&&(a={})}const h=l.getBuilder(e.getZIndex(),"Image");h.setImageStyle(r,a),h.drawMultiPoint(t,i)}if(o&&o.getText()){let l=n;s&&(l=s);const h=l.getBuilder(e.getZIndex(),"Text");h.setTextStyle(o,a),h.drawText(t,i)}}function Ff(n,t,e,i,s){const r=e.getFill(),o=e.getStroke();if(r||o){const l=n.getBuilder(e.getZIndex(),"Polygon");l.setFillStrokeStyle(r,o),l.drawPolygon(t,i)}const a=e.getText();if(a&&a.getText()){const l=(s||n).getBuilder(e.getZIndex(),"Text");l.setTextStyle(a),l.drawText(t,i)}}class kf extends _h{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_=Xt(),this.wrappedRenderedExtent_=Xt(),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 s=e.extent,r=e.viewState,o=r.center,a=r.resolution,l=r.projection,h=r.rotation,c=l.getExtent(),u=this.getLayer().getSource(),d=e.pixelRatio,f=e.viewHints,g=!(f[ht.ANIMATING]||f[ht.INTERACTING]),_=this.compositionContext_,m=Math.round(e.size[0]*d),p=Math.round(e.size[1]*d),E=u.getWrapX()&&l.canWrapX(),v=E?q(c):null,y=E?Math.ceil((s[2]-c[2])/v)+1:1;let x=E?Math.floor((s[0]-c[0])/v):0;do{const C=this.getRenderTransform(o,a,h,d,m,p,x*v);t.execute(_,1,C,h,g,void 0,i)}while(++x<y)}setupCompositionContext_(){if(this.opacity_!==1){const t=It(this.context.canvas.width,this.context.canvas.height,Ra);this.compositionContext_=t}else this.compositionContext_=this.context}releaseCompositionContext_(){if(this.opacity_!==1){const t=this.context.globalAlpha;this.context.globalAlpha=this.opacity_,this.context.drawImage(this.compositionContext_.canvas,0,0),this.context.globalAlpha=t,ih(this.compositionContext_),Ra.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,s=t.layerStatesArray[t.layerIndex];uu(this.pixelTransform,1/i,1/i),Zr(this.inversePixelTransform,this.pixelTransform);const r=Al(this.pixelTransform);this.useContainer(e,r,this.getBackground(t));const o=this.context,a=o.canvas,l=this.replayGroup_,h=this.declutterExecutorGroup;if((!l||l.isEmpty())&&(!h||h.isEmpty()))return null;const c=Math.round(t.size[0]*i),u=Math.round(t.size[1]*i);a.width!=c||a.height!=u?(a.width=c,a.height=u,a.style.transform!==r&&(a.style.transform=r)):this.containerReused||o.clearRect(0,0,c,u),this.preRender(o,t);const d=t.viewState,f=d.projection;this.opacity_=s.opacity,this.setupCompositionContext_();let g=!1,_=!0;if(s.extent&&this.clipping){const m=He(s.extent,f);_=vt(m,t.extent),g=_&&!Ue(m,t.extent),g&&this.clipUnrotated(this.compositionContext_,t,m)}return _&&this.renderWorlds(l,t),g&&this.compositionContext_.restore(),this.releaseCompositionContext_(),this.postRender(o,t),this.renderedRotation_!==d.rotation&&(this.renderedRotation_=d.rotation,this.hitDetectionImageData_=null),this.container}getFeatures(t){return new Promise(function(e){if(!this.hitDetectionImageData_&&!this.animatingOrInteracting_){const i=[this.context.canvas.width,this.context.canvas.height];rt(this.pixelTransform,i);const s=this.renderedCenter_,r=this.renderedResolution_,o=this.renderedRotation_,a=this.renderedProjection_,l=this.wrappedRenderedExtent_,h=this.getLayer(),c=[],u=i[0]*Ht,d=i[1]*Ht;c.push(this.getRenderTransform(s,r,o,Ht,u,d,0).slice());const f=h.getSource(),g=a.getExtent();if(f.getWrapX()&&a.canWrapX()&&!Ue(g,l)){let _=l[0];const m=q(g);let p=0,E;for(;_<g[0];)--p,E=m*p,c.push(this.getRenderTransform(s,r,o,Ht,u,d,E).slice()),_+=m;for(p=0,_=l[2];_>g[2];)++p,E=m*p,c.push(this.getRenderTransform(s,r,o,Ht,u,d,E).slice()),_-=m}this.hitDetectionImageData_=Cf(i,c,this.renderedFeatures_,h.getStyleFunction(),l,r,o)}e(wf(t,this.renderedFeatures_,this.hitDetectionImageData_))}.bind(this))}forEachFeatureAtCoordinate(t,e,i,s,r){if(!this.replayGroup_)return;const o=e.viewState.resolution,a=e.viewState.rotation,l=this.getLayer(),h={},c=function(f,g,_){const m=U(f),p=h[m];if(p){if(p!==!0&&_<p.distanceSq){if(_===0)return h[m]=!0,r.splice(r.lastIndexOf(p),1),s(f,l,g);p.geometry=g,p.distanceSq=_}}else{if(_===0)return h[m]=!0,s(f,l,g);r.push(h[m]={feature:f,layer:l,geometry:g,distanceSq:_,callback:s})}};let u;const d=[this.replayGroup_];return this.declutterExecutorGroup&&d.push(this.declutterExecutorGroup),d.some(f=>u=f.forEachFeatureAtCoordinate(t,o,a,i,c,f===this.declutterExecutorGroup&&e.declutterTree?e.declutterTree.all().map(g=>g.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 s=t.viewHints[ht.ANIMATING],r=t.viewHints[ht.INTERACTING],o=e.getUpdateWhileAnimating(),a=e.getUpdateWhileInteracting();if(this.ready&&!o&&s||!a&&r)return this.animatingOrInteracting_=!0,!0;this.animatingOrInteracting_=!1;const l=t.extent,h=t.viewState,c=h.projection,u=h.resolution,d=t.pixelRatio,f=e.getRevision(),g=e.getRenderBuffer();let _=e.getRenderOrder();_===void 0&&(_=Rf);const m=h.center.slice(),p=qr(l,g*u),E=p.slice(),v=[p.slice()],y=c.getExtent();if(i.getWrapX()&&c.canWrapX()&&!Ue(y,t.extent)){const I=q(y),b=Math.max(q(p)/2,I);p[0]=y[0]-b,p[2]=y[2]+b,$l(m,c);const L=Nl(v[0],c);L[0]<y[0]&&L[2]<y[2]?v.push([L[0]+I,L[1],L[2]+I,L[3]]):L[0]>y[0]&&L[2]>y[2]&&v.push([L[0]-I,L[1],L[2]-I,L[3]])}if(this.ready&&this.renderedResolution_==u&&this.renderedRevision_==f&&this.renderedRenderOrder_==_&&Ue(this.wrappedRenderedExtent_,p))return oi(this.renderedExtent_,E)||(this.hitDetectionImageData_=null,this.renderedExtent_=E),this.renderedCenter_=m,this.replayGroupChanged=!1,!0;this.replayGroup_=null;const x=new Sa(Nr(u,d),p,u,d);let C;this.getLayer().getDeclutter()&&(C=new Sa(Nr(u,d),p,u,d));const S=Yl();let R;if(S){for(let I=0,b=v.length;I<b;++I){const L=v[I],X=Dr(L,c);i.loadFeatures(X,Bu(u,c),S)}R=Ms(S,c)}else for(let I=0,b=v.length;I<b;++I)i.loadFeatures(v[I],u,c);const A=If(u,d);let O=!0;const N=function(I){let b;const L=I.getStyleFunction()||e.getStyleFunction();if(L&&(b=L(I,u)),b){const X=this.renderFeature(I,A,b,x,R,C);O=O&&!X}}.bind(this),$=Dr(p,c),D=i.getFeaturesInExtent($);_&&D.sort(_);for(let I=0,b=D.length;I<b;++I)N(D[I]);this.renderedFeatures_=D,this.ready=O;const j=x.finish(),k=new Aa(p,u,d,i.getOverlaps(),j,e.getRenderBuffer());return C&&(this.declutterExecutorGroup=new Aa(p,u,d,i.getOverlaps(),C.finish(),e.getRenderBuffer())),this.renderedResolution_=u,this.renderedRevision_=f,this.renderedRenderOrder_=_,this.renderedExtent_=E,this.wrappedRenderedExtent_=p,this.renderedCenter_=m,this.renderedProjection_=c,this.replayGroup_=k,this.hitDetectionImageData_=null,this.replayGroupChanged=!0,!0}renderFeature(t,e,i,s,r,o){if(!i)return!1;let a=!1;if(Array.isArray(i))for(let l=0,h=i.length;l<h;++l)a=Oa(s,t,i[l],e,this.boundHandleStyleImageChange_,r,o)||a;else a=Oa(s,t,i,e,this.boundHandleStyleImageChange_,r,o);return a}}const $f=kf;class Wf extends Zd{constructor(t){super(t)}createRenderer(){return new $f(this)}}const Gf=Wf;class Yf{constructor(t){this.rbush_=new uh(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_[U(e)]=i}load(t,e){const i=new Array(e.length);for(let s=0,r=e.length;s<r;s++){const o=t[s],a=e[s],l={minX:o[0],minY:o[1],maxX:o[2],maxY:o[3],value:a};i[s]=l,this.items_[U(a)]=l}this.rbush_.load(i)}remove(t){const e=U(t),i=this.items_[e];return delete this.items_[e],this.rbush_.remove(i)!==null}update(t,e){const i=this.items_[U(e)],s=[i.minX,i.minY,i.maxX,i.maxY];gn(s,t)||(this.remove(e),this.insert(t,e))}getAll(){return this.rbush_.all().map(function(e){return e.value})}getInExtent(t){const e={minX:t[0],minY:t[1],maxX:t[2],maxY:t[3]};return this.rbush_.search(e).map(function(s){return s.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 s=0,r=t.length;s<r;s++)if(i=e(t[s]),i)return i;return i}isEmpty(){return fn(this.items_)}clear(){this.rbush_.clear(),this.items_={}}getExtent(t){const e=this.rbush_.toJSON();return ee(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]}}const La=Yf;class Vf extends zt{constructor(t){super(),this.projection=Rt(t.projection),this.attributions_=Da(t.attributions),this.attributionsCollapsible_=t.attributionsCollapsible!==void 0?t.attributionsCollapsible:!0,this.loading=!1,this.state_=t.state!==void 0?t.state:"ready",this.wrapX_=t.wrapX!==void 0?t.wrapX:!1,this.interpolate_=!!t.interpolate,this.viewResolver=null,this.viewRejector=null;const e=this;this.viewPromise_=new Promise(function(i,s){e.viewResolver=i,e.viewRejector=s})}getAttributions(){return this.attributions_}getAttributionsCollapsible(){return this.attributionsCollapsible_}getProjection(){return this.projection}getResolutions(){return B()}getView(){return this.viewPromise_}getState(){return this.state_}getWrapX(){return this.wrapX_}getInterpolate(){return this.interpolate_}refresh(){this.changed()}setAttributions(t){this.attributions_=Da(t),this.changed()}setState(t){this.state_=t,this.changed()}}function Da(n){return n?Array.isArray(n)?function(t){return n}:typeof n=="function"?n:function(t){return[n]}:null}const Eh=Vf,Yt={ADDFEATURE:"addfeature",CHANGEFEATURE:"changefeature",CLEAR:"clear",REMOVEFEATURE:"removefeature",FEATURESLOADSTART:"featuresloadstart",FEATURESLOADEND:"featuresloadend",FEATURESLOADERROR:"featuresloaderror"};function Xf(n,t){return[[-1/0,-1/0,1/0,1/0]]}let zf=!1;function Bf(n,t,e,i,s,r,o){const a=new XMLHttpRequest;a.open("GET",typeof n=="function"?n(e,i,s):n,!0),t.getType()=="arraybuffer"&&(a.responseType="arraybuffer"),a.withCredentials=zf,a.onload=function(l){if(!a.status||a.status>=200&&a.status<300){const h=t.getType();let c;h=="json"||h=="text"?c=a.responseText:h=="xml"?(c=a.responseXML,c||(c=new DOMParser().parseFromString(a.responseText,"application/xml"))):h=="arraybuffer"&&(c=a.response),c?r(t.readFeatures(c,{extent:e,featureProjection:s}),t.readProjection(c)):o()}else o()},a.onerror=o,a.send()}function Ma(n,t){return function(e,i,s,r,o){const a=this;Bf(n,t,e,i,s,function(l,h){a.addFeatures(l),r!==void 0&&r(l)},o||ii)}}class Se extends pe{constructor(t,e,i){super(t),this.feature=e,this.features=i}}class Kf extends Eh{constructor(t){t=t||{},super({attributions:t.attributions,interpolate:!0,projection:void 0,state:"ready",wrapX:t.wrapX!==void 0?t.wrapX:!0}),this.on,this.once,this.un,this.loader_=ii,this.format_=t.format,this.overlaps_=t.overlaps===void 0?!0:t.overlaps,this.url_=t.url,t.loader!==void 0?this.loader_=t.loader:this.url_!==void 0&&(V(this.format_,7),this.loader_=Ma(this.url_,this.format_)),this.strategy_=t.strategy!==void 0?t.strategy:Xf;const e=t.useSpatialIndex!==void 0?t.useSpatialIndex:!0;this.featuresRtree_=e?new La:null,this.loadedExtentsRtree_=new La,this.loadingExtentsCount_=0,this.nullGeometryFeatures_={},this.idIndex_={},this.uidIndex_={},this.featureChangeKeys_={},this.featuresCollection_=null;let i,s;Array.isArray(t.features)?s=t.features:t.features&&(i=t.features,s=i.getArray()),!e&&i===void 0&&(i=new Zt(s)),s!==void 0&&this.addFeaturesInternal(s),i!==void 0&&this.bindFeaturesCollection_(i)}addFeature(t){this.addFeatureInternal(t),this.changed()}addFeatureInternal(t){const e=U(t);if(!this.addToIndex_(e,t)){this.featuresCollection_&&this.featuresCollection_.remove(t);return}this.setupChangeEvents_(e,t);const i=t.getGeometry();if(i){const s=i.getExtent();this.featuresRtree_&&this.featuresRtree_.insert(s,t)}else this.nullGeometryFeatures_[e]=t;this.dispatchEvent(new Se(Yt.ADDFEATURE,t))}setupChangeEvents_(t,e){this.featureChangeKeys_[t]=[z(e,W.CHANGE,this.handleFeatureChange_,this),z(e,Pi.PROPERTYCHANGE,this.handleFeatureChange_,this)]}addToIndex_(t,e){let i=!0;const s=e.getId();return s!==void 0&&(s.toString()in this.idIndex_?i=!1:this.idIndex_[s.toString()]=e),i&&(V(!(t in this.uidIndex_),30),this.uidIndex_[t]=e),i}addFeatures(t){this.addFeaturesInternal(t),this.changed()}addFeaturesInternal(t){const e=[],i=[],s=[];for(let r=0,o=t.length;r<o;r++){const a=t[r],l=U(a);this.addToIndex_(l,a)&&i.push(a)}for(let r=0,o=i.length;r<o;r++){const a=i[r],l=U(a);this.setupChangeEvents_(l,a);const h=a.getGeometry();if(h){const c=h.getExtent();e.push(c),s.push(a)}else this.nullGeometryFeatures_[l]=a}if(this.featuresRtree_&&this.featuresRtree_.load(e,s),this.hasListener(Yt.ADDFEATURE))for(let r=0,o=i.length;r<o;r++)this.dispatchEvent(new Se(Yt.ADDFEATURE,i[r]))}bindFeaturesCollection_(t){let e=!1;this.addEventListener(Yt.ADDFEATURE,function(i){e||(e=!0,t.push(i.feature),e=!1)}),this.addEventListener(Yt.REMOVEFEATURE,function(i){e||(e=!0,t.remove(i.feature),e=!1)}),t.addEventListener(yt.ADD,function(i){e||(e=!0,this.addFeature(i.element),e=!1)}.bind(this)),t.addEventListener(yt.REMOVE,function(i){e||(e=!0,this.removeFeature(i.element),e=!1)}.bind(this)),this.featuresCollection_=t}clear(t){if(t){for(const i in this.featureChangeKeys_)this.featureChangeKeys_[i].forEach(J);this.featuresCollection_||(this.featureChangeKeys_={},this.idIndex_={},this.uidIndex_={})}else if(this.featuresRtree_){const i=function(s){this.removeFeatureInternal(s)}.bind(this);this.featuresRtree_.forEach(i);for(const s in this.nullGeometryFeatures_)this.removeFeatureInternal(this.nullGeometryFeatures_[s])}this.featuresCollection_&&this.featuresCollection_.clear(),this.featuresRtree_&&this.featuresRtree_.clear(),this.nullGeometryFeatures_={};const e=new Se(Yt.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(s){if(s.getGeometry().intersectsCoordinate(t))return e(s)})}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 r=e(i);if(r)return r}})}getFeaturesCollection(){return this.featuresCollection_}getFeatures(){let t;return this.featuresCollection_?t=this.featuresCollection_.getArray().slice(0):this.featuresRtree_&&(t=this.featuresRtree_.getAll(),fn(this.nullGeometryFeatures_)||Sl(t,Object.values(this.nullGeometryFeatures_))),t}getFeaturesAtCoordinate(t){const e=[];return this.forEachFeatureAtCoordinateDirect(t,function(i){e.push(i)}),e}getFeaturesInExtent(t,e){if(this.featuresRtree_){if(!(e&&e.canWrapX()&&this.getWrapX()))return this.featuresRtree_.getInExtent(t);const s=Tu(t,e);return[].concat(...s.map(r=>this.featuresRtree_.getInExtent(r)))}else return this.featuresCollection_?this.featuresCollection_.getArray().slice(0):[]}getClosestFeatureToCoordinate(t,e){const i=t[0],s=t[1];let r=null;const o=[NaN,NaN];let a=1/0;const l=[-1/0,-1/0,1/0,1/0];return e=e||dn,this.featuresRtree_.forEachInExtent(l,function(h){if(e(h)){const c=h.getGeometry(),u=a;if(a=c.closestPointXY(i,s,o,a),a<u){r=h;const d=Math.sqrt(a);l[0]=i-d,l[1]=s-d,l[2]=i+d,l[3]=s+d}}}),r}getExtent(t){return this.featuresRtree_.getExtent(t)}getFeatureById(t){const e=this.idIndex_[t.toString()];return e!==void 0?e:null}getFeatureByUid(t){const e=this.uidIndex_[t];return e!==void 0?e:null}getFormat(){return this.format_}getOverlaps(){return this.overlaps_}getUrl(){return this.url_}handleFeatureChange_(t){const e=t.target,i=U(e),s=e.getGeometry();if(!s)i in this.nullGeometryFeatures_||(this.featuresRtree_&&this.featuresRtree_.remove(e),this.nullGeometryFeatures_[i]=e);else{const o=s.getExtent();i in this.nullGeometryFeatures_?(delete this.nullGeometryFeatures_[i],this.featuresRtree_&&this.featuresRtree_.insert(o,e)):this.featuresRtree_&&this.featuresRtree_.update(o,e)}const r=e.getId();if(r!==void 0){const o=r.toString();this.idIndex_[o]!==e&&(this.removeFromIdIndex_(e),this.idIndex_[o]=e)}else this.removeFromIdIndex_(e),this.uidIndex_[i]=e;this.changed(),this.dispatchEvent(new Se(Yt.CHANGEFEATURE,e))}hasFeature(t){const e=t.getId();return e!==void 0?e in this.idIndex_:U(t)in this.uidIndex_}isEmpty(){return this.featuresRtree_?this.featuresRtree_.isEmpty()&&fn(this.nullGeometryFeatures_):this.featuresCollection_?this.featuresCollection_.getLength()===0:!0}loadFeatures(t,e,i){const s=this.loadedExtentsRtree_,r=this.strategy_(t,e,i);for(let o=0,a=r.length;o<a;++o){const l=r[o];s.forEachInExtent(l,function(c){return Ue(c.extent,l)})||(++this.loadingExtentsCount_,this.dispatchEvent(new Se(Yt.FEATURESLOADSTART)),this.loader_.call(this,l,e,i,function(c){--this.loadingExtentsCount_,this.dispatchEvent(new Se(Yt.FEATURESLOADEND,void 0,c))}.bind(this),function(){--this.loadingExtentsCount_,this.dispatchEvent(new Se(Yt.FEATURESLOADERROR))}.bind(this)),s.insert(l,{extent:l.slice()}))}this.loading=this.loader_.length<4?!1:this.loadingExtentsCount_>0}refresh(){this.clear(!0),this.loadedExtentsRtree_.clear(),super.refresh()}removeLoadedExtent(t){const e=this.loadedExtentsRtree_;let i;e.forEachInExtent(t,function(s){if(gn(s.extent,t))return i=s,!0}),i&&e.remove(i)}removeFeature(t){if(!t)return;const e=U(t);e in this.nullGeometryFeatures_?delete this.nullGeometryFeatures_[e]:this.featuresRtree_&&this.featuresRtree_.remove(t),this.removeFeatureInternal(t)&&this.changed()}removeFeatureInternal(t){const e=U(t),i=this.featureChangeKeys_[e];if(!i)return;i.forEach(J),delete this.featureChangeKeys_[e];const s=t.getId();return s!==void 0&&delete this.idIndex_[s.toString()],delete this.uidIndex_[e],this.dispatchEvent(new Se(Yt.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){V(this.format_,7),this.url_=t,this.setLoader(Ma(t,this.format_))}}const Uf=Kf,P={IDLE:0,LOADING:1,LOADED:2,ERROR:3,EMPTY:4};function yh(n){return Math.pow(n,3)}function Bi(n){return 1-yh(1-n)}function Hf(n){return 3*n*n-2*n*n*n}function jf(n){return n}class Zf extends Rs{constructor(t,e,i){super(),i=i||{},this.tileCoord=t,this.state=e,this.interimTile=null,this.key="",this.transition_=i.transition===void 0?250:i.transition,this.transitionStarts_={},this.interpolate=!!i.interpolate}changed(){this.dispatchEvent(W.CHANGE)}release(){this.state===P.ERROR&&this.setState(P.EMPTY)}getKey(){return this.key+"/"+this.tileCoord}getInterimTile(){if(!this.interimTile)return this;let t=this.interimTile;do{if(t.getState()==P.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()==P.LOADED){t.interimTile=null;break}else t.getState()==P.LOADING?e=t:t.getState()==P.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!==P.ERROR&&this.state>t)throw new Error("Tile load sequence violation");this.state=t,this.changed()}load(){B()}getAlpha(t,e){if(!this.transition_)return 1;let i=this.transitionStarts_[t];if(!i)i=e,this.transitionStarts_[t]=i;else if(i===-1)return 1;const s=e-i+1e3/60;return s>=this.transition_?1:yh(s/this.transition_)}inTransition(t){return this.transition_?this.transitionStarts_[t]!==-1:!1}endTransition(t){this.transition_&&(this.transitionStarts_[t]=-1)}}const vh=Zf;class qf extends vh{constructor(t,e,i,s,r,o){super(t,e,o),this.crossOrigin_=s,this.src_=i,this.key=i,this.image_=new Image,s!==null&&(this.image_.crossOrigin=s),this.unlisten_=null,this.tileLoadFunction_=r}getImage(){return this.image_}setImage(t){this.image_=t,this.state=P.LOADED,this.unlistenImage_(),this.changed()}handleImageError_(){this.state=P.ERROR,this.unlistenImage_(),this.image_=Jf(),this.changed()}handleImageLoad_(){const t=this.image_;t.naturalWidth&&t.naturalHeight?this.state=P.LOADED:this.state=P.EMPTY,this.unlistenImage_(),this.changed()}load(){this.state==P.ERROR&&(this.state=P.IDLE,this.image_=new Image,this.crossOrigin_!==null&&(this.image_.crossOrigin=this.crossOrigin_)),this.state==P.IDLE&&(this.state=P.LOADING,this.changed(),this.tileLoadFunction_(this,this.src_),this.unlisten_=dh(this.image_,this.handleImageLoad_.bind(this),this.handleImageError_.bind(this)))}unlistenImage_(){this.unlisten_&&(this.unlisten_(),this.unlisten_=null)}}function Jf(){const n=It(1,1);return n.fillStyle="rgba(0,0,0,0)",n.fillRect(0,0,1,1),n.canvas}const xh=qf;class Qf{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 s=this.points_[e+2]-this.points_[i+2];if(s<1e3/60)return!1;const r=this.points_[e]-this.points_[i],o=this.points_[e+1]-this.points_[i+1];return this.angle_=Math.atan2(o,r),this.initialVelocity_=Math.sqrt(r*r+o*o)/s,this.initialVelocity_>this.minVelocity_}getDistance(){return(this.minVelocity_-this.initialVelocity_)/this.decay_}getAngle(){return this.angle_}}const tg=Qf;class eg extends Kr{constructor(t){super(),this.map_=t}dispatchRenderEvent(t,e){B()}calculateMatrices2D(t){const e=t.viewState,i=t.coordinateToPixelTransform,s=t.pixelToCoordinateTransform;Me(i,t.size[0]/2,t.size[1]/2,1/e.resolution,-1/e.resolution,-e.rotation,-e.center[0],-e.center[1]),Zr(s,i)}forEachFeatureAtCoordinate(t,e,i,s,r,o,a,l){let h;const c=e.viewState;function u(y,x,C,S){return r.call(o,x,y?C:null,S)}const d=c.projection,f=$l(t.slice(),d),g=[[0,0]];if(d.canWrapX()&&s){const y=d.getExtent(),x=q(y);g.push([-x,0],[x,0])}const _=e.layerStatesArray,m=_.length,p=[],E=[];for(let y=0;y<g.length;y++)for(let x=m-1;x>=0;--x){const C=_[x],S=C.layer;if(S.hasRenderer()&&go(C,c)&&a.call(l,S)){const R=S.getRenderer(),A=S.getSource();if(R&&A){const O=A.getWrapX()?f:t,N=u.bind(null,C.managed);E[0]=O[0]+g[y][0],E[1]=O[1]+g[y][1],h=R.forEachFeatureAtCoordinate(E,e,i,N,p)}if(h)return h}}if(p.length===0)return;const v=1/p.length;return p.forEach((y,x)=>y.distanceSq+=x*v),p.sort((y,x)=>y.distanceSq-x.distanceSq),p.some(y=>h=y.callback(y.feature,y.layer,y.geometry)),h}hasFeatureAtCoordinate(t,e,i,s,r,o){return this.forEachFeatureAtCoordinate(t,e,i,s,dn,this,r,o)!==void 0}getMap(){return this.map_}renderFrame(t){B()}scheduleExpireIconCache(t){ys.canExpireCache()&&t.postRenderFunctions.push(ig)}}function ig(n,t){ys.expire()}const ng=eg;class sg extends ng{constructor(t){super(t),this.fontChangeListenerKey_=z(ce,Pi.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=Ps+" ol-layers";const i=t.getViewport();i.insertBefore(this.element_,i.firstChild||null),this.children_=[],this.renderedVisible_=!0}dispatchRenderEvent(t,e){const i=this.getMap();if(i.hasListener(t)){const s=new gh(t,void 0,e);i.dispatchEvent(s)}}disposeInternal(){J(this.fontChangeListenerKey_),this.element_.parentNode.removeChild(this.element_),super.disposeInternal()}renderFrame(t){if(!t){this.renderedVisible_&&(this.element_.style.display="none",this.renderedVisible_=!1);return}this.calculateMatrices2D(t),this.dispatchRenderEvent(Le.PRECOMPOSE,t);const e=t.layerStatesArray.sort(function(o,a){return o.zIndex-a.zIndex}),i=t.viewState;this.children_.length=0;const s=[];let r=null;for(let o=0,a=e.length;o<a;++o){const l=e[o];t.layerIndex=o;const h=l.layer,c=h.getSourceState();if(!go(l,i)||c!="ready"&&c!="undefined"){h.unrender();continue}const u=h.render(t,r);u&&(u!==r&&(this.children_.push(u),r=u),"getDeclutter"in h&&s.push(h))}for(let o=s.length-1;o>=0;--o)s[o].renderDeclutter(t);Cd(this.element_,this.children_),this.dispatchRenderEvent(Le.POSTCOMPOSE,t),this.renderedVisible_||(this.element_.style.display="",this.renderedVisible_=!0),this.scheduleExpireIconCache(t)}}const rg=sg;class Ae extends pe{constructor(t,e){super(t),this.layer=e}}const ir={LAYERS:"layers"};class po extends hh{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(ir.LAYERS,this.handleLayersChanged_),i?Array.isArray(i)?i=new Zt(i.slice(),{unique:!0}):V(typeof i.getArray=="function",43):i=new Zt(void 0,{unique:!0}),this.setLayers(i)}handleLayerChange_(){this.changed()}handleLayersChanged_(){this.layersListenerKeys_.forEach(J),this.layersListenerKeys_.length=0;const t=this.getLayers();this.layersListenerKeys_.push(z(t,yt.ADD,this.handleLayersAdd_,this),z(t,yt.REMOVE,this.handleLayersRemove_,this));for(const i in this.listenerKeys_)this.listenerKeys_[i].forEach(J);Rn(this.listenerKeys_);const e=t.getArray();for(let i=0,s=e.length;i<s;i++){const r=e[i];this.registerLayerListeners_(r),this.dispatchEvent(new Ae("addlayer",r))}this.changed()}registerLayerListeners_(t){const e=[z(t,Pi.PROPERTYCHANGE,this.handleLayerChange_,this),z(t,W.CHANGE,this.handleLayerChange_,this)];t instanceof po&&e.push(z(t,"addlayer",this.handleLayerGroupAdd_,this),z(t,"removelayer",this.handleLayerGroupRemove_,this)),this.listenerKeys_[U(t)]=e}handleLayerGroupAdd_(t){this.dispatchEvent(new Ae("addlayer",t.layer))}handleLayerGroupRemove_(t){this.dispatchEvent(new Ae("removelayer",t.layer))}handleLayersAdd_(t){const e=t.element;this.registerLayerListeners_(e),this.dispatchEvent(new Ae("addlayer",e)),this.changed()}handleLayersRemove_(t){const e=t.element,i=U(e);this.listenerKeys_[i].forEach(J),delete this.listenerKeys_[i],this.dispatchEvent(new Ae("removelayer",e)),this.changed()}getLayers(){return this.get(ir.LAYERS)}setLayers(t){const e=this.getLayers();if(e){const i=e.getArray();for(let s=0,r=i.length;s<r;++s)this.dispatchEvent(new Ae("removelayer",i[s]))}this.set(ir.LAYERS,t)}getLayersArray(t){return t=t!==void 0?t:[],this.getLayers().forEach(function(e){e.getLayersArray(t)}),t}getLayerStatesArray(t){const e=t!==void 0?t:[],i=e.length;this.getLayers().forEach(function(o){o.getLayerStatesArray(e)});const s=this.getLayerState();let r=s.zIndex;!t&&s.zIndex===void 0&&(r=0);for(let o=i,a=e.length;o<a;o++){const l=e[o];l.opacity*=s.opacity,l.visible=l.visible&&s.visible,l.maxResolution=Math.min(l.maxResolution,s.maxResolution),l.minResolution=Math.max(l.minResolution,s.minResolution),l.minZoom=Math.max(l.minZoom,s.minZoom),l.maxZoom=Math.min(l.maxZoom,s.maxZoom),s.extent!==void 0&&(l.extent!==void 0?l.extent=an(l.extent,s.extent):l.extent=s.extent),l.zIndex===void 0&&(l.zIndex=r)}return e}getSourceState(){return"ready"}}const ks=po;class og extends pe{constructor(t,e,i){super(t),this.map=e,this.frameState=i!==void 0?i:null}}const wi=og;class ag extends wi{constructor(t,e,i,s,r,o){super(t,e,r),this.originalEvent=i,this.pixel_=null,this.coordinate_=null,this.dragging=s!==void 0?s:!1,this.activePointers=o}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 be=ag,tt={SINGLECLICK:"singleclick",CLICK:W.CLICK,DBLCLICK:W.DBLCLICK,POINTERDRAG:"pointerdrag",POINTERMOVE:"pointermove",POINTERDOWN:"pointerdown",POINTERUP:"pointerup",POINTEROVER:"pointerover",POINTEROUT:"pointerout",POINTERENTER:"pointerenter",POINTERLEAVE:"pointerleave",POINTERCANCEL:"pointercancel"},Fr={POINTERMOVE:"pointermove",POINTERDOWN:"pointerdown",POINTERUP:"pointerup",POINTEROVER:"pointerover",POINTEROUT:"pointerout",POINTERENTER:"pointerenter",POINTERLEAVE:"pointerleave",POINTERCANCEL:"pointercancel"};class lg extends Rs{constructor(t,e){super(t),this.map_=t,this.clickTimeoutId_,this.emulateClicks_=!1,this.dragging_=!1,this.dragListenerKeys_=[],this.moveTolerance_=e===void 0?1:e,this.down_=null;const i=this.map_.getViewport();this.activePointers_=[],this.trackedTouches_={},this.element_=i,this.pointerdownListenerKey_=z(i,Fr.POINTERDOWN,this.handlePointerDown_,this),this.originalPointerMoveEvent_,this.relayedListenerKey_=z(i,Fr.POINTERMOVE,this.relayMoveEvent_,this),this.boundHandleTouchMove_=this.handleTouchMove_.bind(this),this.element_.addEventListener(W.TOUCHMOVE,this.boundHandleTouchMove_,bl?{passive:!1}:!1)}emulateClick_(t){let e=new be(tt.CLICK,this.map_,t);this.dispatchEvent(e),this.clickTimeoutId_!==void 0?(clearTimeout(this.clickTimeoutId_),this.clickTimeoutId_=void 0,e=new be(tt.DBLCLICK,this.map_,t),this.dispatchEvent(e)):this.clickTimeoutId_=setTimeout(function(){this.clickTimeoutId_=void 0;const i=new be(tt.SINGLECLICK,this.map_,t);this.dispatchEvent(i)}.bind(this),250)}updateActivePointers_(t){const e=t,i=e.pointerId;if(e.type==tt.POINTERUP||e.type==tt.POINTERCANCEL){delete this.trackedTouches_[i];for(const s in this.trackedTouches_)if(this.trackedTouches_[s].target!==e.target){delete this.trackedTouches_[s];break}}else(e.type==tt.POINTERDOWN||e.type==tt.POINTERMOVE)&&(this.trackedTouches_[i]=e);this.activePointers_=Object.values(this.trackedTouches_)}handlePointerUp_(t){this.updateActivePointers_(t);const e=new be(tt.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_),this.activePointers_.length===0&&(this.dragListenerKeys_.forEach(J),this.dragListenerKeys_.length=0,this.dragging_=!1,this.down_=null)}isMouseActionButton_(t){return t.button===0}handlePointerDown_(t){this.emulateClicks_=this.activePointers_.length===0,this.updateActivePointers_(t);const e=new be(tt.POINTERDOWN,this.map_,t,void 0,void 0,this.activePointers_);this.dispatchEvent(e),this.down_={};for(const i in t){const s=t[i];this.down_[i]=typeof s=="function"?ii:s}if(this.dragListenerKeys_.length===0){const i=this.map_.getOwnerDocument();this.dragListenerKeys_.push(z(i,tt.POINTERMOVE,this.handlePointerMove_,this),z(i,tt.POINTERUP,this.handlePointerUp_,this),z(this.element_,tt.POINTERCANCEL,this.handlePointerUp_,this)),this.element_.getRootNode&&this.element_.getRootNode()!==i&&this.dragListenerKeys_.push(z(this.element_.getRootNode(),tt.POINTERUP,this.handlePointerUp_,this))}}handlePointerMove_(t){if(this.isMoving_(t)){this.updateActivePointers_(t),this.dragging_=!0;const e=new be(tt.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 be(tt.POINTERMOVE,this.map_,t,e))}handleTouchMove_(t){const e=this.originalPointerMoveEvent_;(!e||e.defaultPrevented)&&(typeof t.cancelable!="boolean"||t.cancelable===!0)&&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_&&(J(this.relayedListenerKey_),this.relayedListenerKey_=null),this.element_.removeEventListener(W.TOUCHMOVE,this.boundHandleTouchMove_),this.pointerdownListenerKey_&&(J(this.pointerdownListenerKey_),this.pointerdownListenerKey_=null),this.dragListenerKeys_.forEach(J),this.dragListenerKeys_.length=0,this.element_=null,super.disposeInternal()}}const hg=lg,ue={POSTRENDER:"postrender",MOVESTART:"movestart",MOVEEND:"moveend",LOADSTART:"loadstart",LOADEND:"loadend"},lt={LAYERGROUP:"layergroup",SIZE:"size",TARGET:"target",VIEW:"view"},vs=1/0;class cg{constructor(t,e){this.priorityFunction_=t,this.keyFunction_=e,this.elements_=[],this.priorities_=[],this.queuedElements_={}}clear(){this.elements_.length=0,this.priorities_.length=0,Rn(this.queuedElements_)}dequeue(){const t=this.elements_,e=this.priorities_,i=t[0];t.length==1?(t.length=0,e.length=0):(t[0]=t.pop(),e[0]=e.pop(),this.siftUp_(0));const s=this.keyFunction_(i);return delete this.queuedElements_[s],i}enqueue(t){V(!(this.keyFunction_(t)in this.queuedElements_),31);const e=this.priorityFunction_(t);return e!=vs?(this.elements_.push(t),this.priorities_.push(e),this.queuedElements_[this.keyFunction_(t)]=!0,this.siftDown_(0,this.elements_.length-1),!0):!1}getCount(){return this.elements_.length}getLeftChildIndex_(t){return t*2+1}getRightChildIndex_(t){return t*2+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 this.elements_.length===0}isKeyQueued(t){return t in this.queuedElements_}isQueued(t){return this.isKeyQueued(this.keyFunction_(t))}siftUp_(t){const e=this.elements_,i=this.priorities_,s=e.length,r=e[t],o=i[t],a=t;for(;t<s>>1;){const l=this.getLeftChildIndex_(t),h=this.getRightChildIndex_(t),c=h<s&&i[h]<i[l]?h:l;e[t]=e[c],i[t]=i[c],t=c}e[t]=r,i[t]=o,this.siftDown_(a,t)}siftDown_(t,e){const i=this.elements_,s=this.priorities_,r=i[e],o=s[e];for(;e>t;){const a=this.getParentIndex_(e);if(s[a]>o)i[e]=i[a],s[e]=s[a],e=a;else break}i[e]=r,s[e]=o}reprioritize(){const t=this.priorityFunction_,e=this.elements_,i=this.priorities_;let s=0;const r=e.length;let o,a,l;for(a=0;a<r;++a)o=e[a],l=t(o),l==vs?delete this.queuedElements_[this.keyFunction_(o)]:(i[s]=l,e[s++]=o);e.length=s,i.length=s,this.heapify_()}}const ug=cg;class dg extends ug{constructor(t,e){super(function(i){return t.apply(null,i)},function(i){return i[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(W.CHANGE,this.boundHandleTileChange_),e}getTilesLoading(){return this.tilesLoading_}handleTileChange(t){const e=t.target,i=e.getState();if(i===P.LOADED||i===P.ERROR||i===P.EMPTY){i!==P.ERROR&&e.removeEventListener(W.CHANGE,this.boundHandleTileChange_);const s=e.getKey();s in this.tilesLoadingKeys_&&(delete this.tilesLoadingKeys_[s],--this.tilesLoading_),this.tileChangeCallback_()}}loadMoreTiles(t,e){let i=0,s,r,o;for(;this.tilesLoading_<t&&i<e&&this.getCount()>0;)r=this.dequeue()[0],o=r.getKey(),s=r.getState(),s===P.IDLE&&!(o in this.tilesLoadingKeys_)&&(this.tilesLoadingKeys_[o]=!0,++this.tilesLoading_,++i,r.load())}}const fg=dg;function gg(n,t,e,i,s){if(!n||!(e in n.wantedTiles)||!n.wantedTiles[e][t.getKey()])return vs;const r=n.viewState.center,o=i[0]-r[0],a=i[1]-r[1];return 65536*Math.log(s)+Math.sqrt(o*o+a*a)/s}const Vt={CENTER:"center",RESOLUTION:"resolution",ROTATION:"rotation"},_g=42,Eo=256;function Pa(n,t,e){return function(i,s,r,o,a){if(!i)return;if(!s&&!t)return i;const l=t?0:r[0]*s,h=t?0:r[1]*s,c=a?a[0]:0,u=a?a[1]:0;let d=n[0]+l/2+c,f=n[2]-l/2+c,g=n[1]+h/2+u,_=n[3]-h/2+u;d>f&&(d=(f+d)/2,f=d),g>_&&(g=(_+g)/2,_=g);let m=et(i[0],d,f),p=et(i[1],g,_);if(o&&e&&s){const E=30*s;m+=-E*Math.log(1+Math.max(0,d-i[0])/E)+E*Math.log(1+Math.max(0,i[0]-f)/E),p+=-E*Math.log(1+Math.max(0,g-i[1])/E)+E*Math.log(1+Math.max(0,i[1]-_)/E)}return[m,p]}}function mg(n){return n}function yo(n,t,e,i){const s=q(t)/e[0],r=ie(t)/e[1];return i?Math.min(n,Math.max(s,r)):Math.min(n,Math.min(s,r))}function vo(n,t,e){let i=Math.min(n,t);const s=50;return i*=Math.log(1+s*Math.max(0,n/t-1))/s+1,e&&(i=Math.max(i,e),i/=Math.log(1+s*Math.max(0,e/n-1))/s+1),et(i,e/2,t*2)}function pg(n,t,e,i){return t=t!==void 0?t:!0,function(s,r,o,a){if(s!==void 0){const l=n[0],h=n[n.length-1],c=e?yo(l,e,o,i):l;if(a)return t?vo(s,c,h):et(s,h,c);const u=Math.min(c,s),d=Math.floor(Ur(n,u,r));return n[d]>c&&d<n.length-1?n[d+1]:n[d]}else return}}function Eg(n,t,e,i,s,r){return i=i!==void 0?i:!0,e=e!==void 0?e:0,function(o,a,l,h){if(o!==void 0){const c=s?yo(t,s,l,r):t;if(h)return i?vo(o,c,e):et(o,e,c);const u=1e-9,d=Math.ceil(Math.log(t/c)/Math.log(n)-u),f=-a*(.5-u)+.5,g=Math.min(c,o),_=Math.floor(Math.log(t/g)/Math.log(n)+f),m=Math.max(d,_),p=t/Math.pow(n,m);return et(p,e,c)}else return}}function Na(n,t,e,i,s){return e=e!==void 0?e:!0,function(r,o,a,l){if(r!==void 0){const h=i?yo(n,i,a,s):n;return!e||!l?et(r,t,h):vo(r,h,t)}else return}}function xo(n){if(n!==void 0)return 0}function Fa(n){if(n!==void 0)return n}function yg(n){const t=2*Math.PI/n;return function(e,i){if(i)return e;if(e!==void 0)return e=Math.floor(e/t+.5)*t,e}}function vg(n){return n=n||ss(5),function(t,e){if(e)return t;if(t!==void 0)return Math.abs(t)<=n?0:t}}const nr=0;class xg extends zt{constructor(t){super(),this.on,this.once,this.un,t=Object.assign({},t),this.hints_=[0,0],this.animations_=[],this.updateAnimationKey_,this.projection_=eo(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&&Wu(),t.center&&(t.center=he(t.center,this.projection_)),t.extent&&(t.extent=He(t.extent,this.projection_)),this.applyOptions_(t)}applyOptions_(t){const e=Object.assign({},t);for(const a in Vt)delete e[a];this.setProperties(e,!0);const i=Cg(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 s=Tg(t),r=i.constraint,o=wg(t);this.constraints_={center:s,resolution:r,rotation:o},this.setRotation(t.rotation!==void 0?t.rotation:0),this.setCenterInternal(t.center!==void 0?t.center:null),t.resolution!==void 0?this.setResolution(t.resolution):t.zoom!==void 0&&this.setZoom(t.zoom)}get padding(){return this.padding_}set padding(t){let e=this.padding_;this.padding_=t;const i=this.getCenter();if(i){const s=t||[0,0,0,0];e=e||[0,0,0,0];const r=this.getResolution(),o=r/2*(s[3]-e[3]+e[1]-s[1]),a=r/2*(s[0]-e[0]+e[2]-s[2]);this.setCenterInternal([i[0]+o,i[1]-a])}}getUpdatedOptions_(t){const e=this.getProperties();return e.resolution!==void 0?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 i=0;i<e.length;++i){let s=arguments[i];s.center&&(s=Object.assign({},s),s.center=he(s.center,this.getProjection())),s.anchor&&(s=Object.assign({},s),s.anchor=he(s.anchor,this.getProjection())),e[i]=s}this.animateInternal.apply(this,e)}animateInternal(t){let e=arguments.length,i;e>1&&typeof arguments[e-1]=="function"&&(i=arguments[e-1],--e);let s=0;for(;s<e&&!this.isDef();++s){const c=arguments[s];c.center&&this.setCenterInternal(c.center),c.zoom!==void 0?this.setZoom(c.zoom):c.resolution&&this.setResolution(c.resolution),c.rotation!==void 0&&this.setRotation(c.rotation)}if(s===e){i&&Hn(i,!0);return}let r=Date.now(),o=this.targetCenter_.slice(),a=this.targetResolution_,l=this.targetRotation_;const h=[];for(;s<e;++s){const c=arguments[s],u={start:r,complete:!1,anchor:c.anchor,duration:c.duration!==void 0?c.duration:1e3,easing:c.easing||Hf,callback:i};if(c.center&&(u.sourceCenter=o,u.targetCenter=c.center.slice(),o=u.targetCenter),c.zoom!==void 0?(u.sourceResolution=a,u.targetResolution=this.getResolutionForZoom(c.zoom),a=u.targetResolution):c.resolution&&(u.sourceResolution=a,u.targetResolution=c.resolution,a=u.targetResolution),c.rotation!==void 0){u.sourceRotation=l;const d=Mi(c.rotation-l+Math.PI,2*Math.PI)-Math.PI;u.targetRotation=l+d,l=u.targetRotation}Sg(u)?u.complete=!0:r+=u.duration,h.push(u)}this.animations_.push(h),this.setHint(ht.ANIMATING,1),this.updateAnimations_()}getAnimating(){return this.hints_[ht.ANIMATING]>0}getInteracting(){return this.hints_[ht.INTERACTING]>0}cancelAnimations(){this.setHint(ht.ANIMATING,-this.hints_[ht.ANIMATING]);let t;for(let e=0,i=this.animations_.length;e<i;++e){const s=this.animations_[e];if(s[0].callback&&Hn(s[0].callback,!1),!t)for(let r=0,o=s.length;r<o;++r){const a=s[r];if(!a.complete){t=a.anchor;break}}}this.animations_.length=0,this.cancelAnchor_=t,this.nextCenter_=null,this.nextResolution_=NaN,this.nextRotation_=NaN}updateAnimations_(){if(this.updateAnimationKey_!==void 0&&(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 s=this.animations_[i];let r=!0;for(let o=0,a=s.length;o<a;++o){const l=s[o];if(l.complete)continue;const h=t-l.start;let c=l.duration>0?h/l.duration:1;c>=1?(l.complete=!0,c=1):r=!1;const u=l.easing(c);if(l.sourceCenter){const d=l.sourceCenter[0],f=l.sourceCenter[1],g=l.targetCenter[0],_=l.targetCenter[1];this.nextCenter_=l.targetCenter;const m=d+u*(g-d),p=f+u*(_-f);this.targetCenter_=[m,p]}if(l.sourceResolution&&l.targetResolution){const d=u===1?l.targetResolution:l.sourceResolution+u*(l.targetResolution-l.sourceResolution);if(l.anchor){const f=this.getViewportSize_(this.getRotation()),g=this.constraints_.resolution(d,0,f,!0);this.targetCenter_=this.calculateCenterZoom(g,l.anchor)}this.nextResolution_=l.targetResolution,this.targetResolution_=d,this.applyTargetState_(!0)}if(l.sourceRotation!==void 0&&l.targetRotation!==void 0){const d=u===1?Mi(l.targetRotation+Math.PI,2*Math.PI)-Math.PI:l.sourceRotation+u*(l.targetRotation-l.sourceRotation);if(l.anchor){const f=this.constraints_.rotation(d,!0);this.targetCenter_=this.calculateCenterRotate(f,l.anchor)}this.nextRotation_=l.targetRotation,this.targetRotation_=d}if(this.applyTargetState_(!0),e=!0,!l.complete)break}if(r){this.animations_[i]=null,this.setHint(ht.ANIMATING,-1),this.nextCenter_=null,this.nextResolution_=NaN,this.nextRotation_=NaN;const o=s[0].callback;o&&Hn(o,!0)}}this.animations_=this.animations_.filter(Boolean),e&&this.updateAnimationKey_===void 0&&(this.updateAnimationKey_=requestAnimationFrame(this.updateAnimations_.bind(this)))}calculateCenterRotate(t,e){let i;const s=this.getCenterInternal();return s!==void 0&&(i=[s[0]-e[0],s[1]-e[1]],Qr(i,t-this.getRotation()),Nu(i,e)),i}calculateCenterZoom(t,e){let i;const s=this.getCenterInternal(),r=this.getResolution();if(s!==void 0&&r!==void 0){const o=e[0]-t*(e[0]-s[0])/r,a=e[1]-t*(e[1]-s[1])/r;i=[o,a]}return i}getViewportSize_(t){const e=this.viewportSize_;if(t){const i=e[0],s=e[1];return[Math.abs(i*Math.cos(t))+Math.abs(s*Math.sin(t)),Math.abs(i*Math.sin(t))+Math.abs(s*Math.cos(t))]}else 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&&Lr(t,this.getProjection())}getCenterInternal(){return this.get(Vt.CENTER)}getConstraints(){return this.constraints_}getConstrainResolution(){return this.get("constrainResolution")}getHints(t){return t!==void 0?(t[0]=this.hints_[0],t[1]=this.hints_[1],t):this.hints_.slice()}calculateExtent(t){const e=this.calculateExtentInternal(t);return Dr(e,this.getProjection())}calculateExtentInternal(t){t=t||this.getViewportSizeMinusPadding_();const e=this.getCenterInternal();V(e,1);const i=this.getResolution();V(i!==void 0,2);const s=this.getRotation();return V(s!==void 0,3),Ir(e,i,s,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(Vt.RESOLUTION)}getResolutions(){return this.resolutions_}getResolutionForExtent(t,e){return this.getResolutionForExtentInternal(He(t,this.getProjection()),e)}getResolutionForExtentInternal(t,e){e=e||this.getViewportSizeMinusPadding_();const i=q(t)/e[0],s=ie(t)/e[1];return Math.max(i,s)}getResolutionForValueFunction(t){t=t||2;const e=this.getConstrainedResolution(this.maxResolution_),i=this.minResolution_,s=Math.log(e/i)/Math.log(t);return function(r){return e/Math.pow(t,r*s)}}getRotation(){return this.get(Vt.ROTATION)}getValueForResolutionFunction(t){const e=Math.log(t||2),i=this.getConstrainedResolution(this.maxResolution_),s=this.minResolution_,r=Math.log(i/s)/e;return function(o){return Math.log(i/o)/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 s=this.getCenterInternal();const r=this.padding_;if(r){const o=this.getViewportSizeMinusPadding_();s=sr(s,this.getViewportSize_(),[o[0]/2+r[3],o[1]/2+r[0]],e,i)}return{center:s.slice(0),projection:t!==void 0?t:null,resolution:e,nextCenter:this.nextCenter_,nextResolution:this.nextResolution_,nextRotation:this.nextRotation_,rotation:i,zoom:this.getZoom()}}getZoom(){let t;const e=this.getResolution();return e!==void 0&&(t=this.getZoomForResolution(e)),t}getZoomForResolution(t){let e=this.minZoom_||0,i,s;if(this.resolutions_){const r=Ur(this.resolutions_,t,1);e=r,i=this.resolutions_[r],r==this.resolutions_.length-1?s=2:s=i/this.resolutions_[r+1]}else i=this.maxResolution_,s=this.zoomFactor_;return e+Math.log(i/t)/Math.log(s)}getResolutionForZoom(t){if(this.resolutions_){if(this.resolutions_.length<=1)return 0;const e=et(Math.floor(t),0,this.resolutions_.length-2),i=this.resolutions_[e]/this.resolutions_[e+1];return this.resolutions_[e]/Math.pow(i,et(t-e,0,1))}else return this.maxResolution_/Math.pow(this.zoomFactor_,t-this.minZoom_)}fit(t,e){let i;if(V(Array.isArray(t)||typeof t.getSimplifiedGeometry=="function",24),Array.isArray(t)){V(!Jr(t),25);const s=He(t,this.getProjection());i=ua(s)}else if(t.getType()==="Circle"){const s=He(t.getExtent(),this.getProjection());i=ua(s),i.rotate(this.getRotation(),Fi(s))}else{const s=Yl();s?i=t.clone().transform(s,this.getProjection()):i=t}this.fitInternal(i,e)}rotatedExtentForGeometry(t){const e=this.getRotation(),i=Math.cos(e),s=Math.sin(-e),r=t.getFlatCoordinates(),o=t.getStride();let a=1/0,l=1/0,h=-1/0,c=-1/0;for(let u=0,d=r.length;u<d;u+=o){const f=r[u]*i-r[u+1]*s,g=r[u]*s+r[u+1]*i;a=Math.min(a,f),l=Math.min(l,g),h=Math.max(h,f),c=Math.max(c,g)}return[a,l,h,c]}fitInternal(t,e){e=e||{};let i=e.size;i||(i=this.getViewportSizeMinusPadding_());const s=e.padding!==void 0?e.padding:[0,0,0,0],r=e.nearest!==void 0?e.nearest:!1;let o;e.minResolution!==void 0?o=e.minResolution:e.maxZoom!==void 0?o=this.getResolutionForZoom(e.maxZoom):o=0;const a=this.rotatedExtentForGeometry(t);let l=this.getResolutionForExtentInternal(a,[i[0]-s[1]-s[3],i[1]-s[0]-s[2]]);l=isNaN(l)?o:Math.max(l,o),l=this.getConstrainedResolution(l,r?0:1);const h=this.getRotation(),c=Math.sin(h),u=Math.cos(h),d=Fi(a);d[0]+=(s[1]-s[3])/2*l,d[1]+=(s[0]-s[2])/2*l;const f=d[0]*u-d[1]*c,g=d[1]*u+d[0]*c,_=this.getConstrainedCenter([f,g],l),m=e.callback?e.callback:ii;e.duration!==void 0?this.animateInternal({resolution:l,center:_,duration:e.duration,easing:e.easing},m):(this.targetResolution_=l,this.targetCenter_=_,this.applyTargetState_(!1,!0),Hn(m,!0))}centerOn(t,e,i){this.centerOnInternal(he(t,this.getProjection()),e,i)}centerOnInternal(t,e,i){this.setCenterInternal(sr(t,e,i,this.getResolution(),this.getRotation()))}calculateCenterShift(t,e,i,s){let r;const o=this.padding_;if(o&&t){const a=this.getViewportSizeMinusPadding_(-i),l=sr(t,s,[a[0]/2+o[3],a[1]/2+o[0]],e,i);r=[t[0]-l[0],t[1]-l[1]]}return r}isDef(){return!!this.getCenterInternal()&&this.getResolution()!==void 0}adjustCenter(t){const e=Lr(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(),s=this.getViewportSize_(this.getRotation()),r=this.constraints_.resolution(this.targetResolution_*t,0,s,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=he(e,this.getProjection())),this.adjustRotationInternal(t,e)}adjustRotationInternal(t,e){const i=this.getAnimating()||this.getInteracting(),s=this.constraints_.rotation(this.targetRotation_+t,i);e&&(this.targetCenter_=this.calculateCenterRotate(s,e)),this.targetRotation_+=t,this.applyTargetState_()}setCenter(t){this.setCenterInternal(t&&he(t,this.getProjection()))}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,s=this.constraints_.rotation(this.targetRotation_,i),r=this.getViewportSize_(s),o=this.constraints_.resolution(this.targetResolution_,0,r,i),a=this.constraints_.center(this.targetCenter_,o,r,i,this.calculateCenterShift(this.targetCenter_,o,s,r));this.get(Vt.ROTATION)!==s&&this.set(Vt.ROTATION,s),this.get(Vt.RESOLUTION)!==o&&(this.set(Vt.RESOLUTION,o),this.set("zoom",this.getZoom(),!0)),(!a||!this.get(Vt.CENTER)||!cs(this.get(Vt.CENTER),a))&&this.set(Vt.CENTER,a),this.getAnimating()&&!t&&this.cancelAnimations(),this.cancelAnchor_=void 0}resolveConstraints(t,e,i){t=t!==void 0?t:200;const s=e||0,r=this.constraints_.rotation(this.targetRotation_),o=this.getViewportSize_(r),a=this.constraints_.resolution(this.targetResolution_,s,o),l=this.constraints_.center(this.targetCenter_,a,o,!1,this.calculateCenterShift(this.targetCenter_,a,r,o));if(t===0&&!this.cancelAnchor_){this.targetResolution_=a,this.targetRotation_=r,this.targetCenter_=l,this.applyTargetState_();return}i=i||(t===0?this.cancelAnchor_:void 0),this.cancelAnchor_=void 0,(this.getResolution()!==a||this.getRotation()!==r||!this.getCenterInternal()||!cs(this.getCenterInternal(),l))&&(this.getAnimating()&&this.cancelAnimations(),this.animateInternal({rotation:r,center:l,resolution:a,duration:t,easing:Bi,anchor:i}))}beginInteraction(){this.resolveConstraints(0),this.setHint(ht.INTERACTING,1)}endInteraction(t,e,i){i=i&&he(i,this.getProjection()),this.endInteractionInternal(t,e,i)}endInteractionInternal(t,e,i){this.setHint(ht.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 Hn(n,t){setTimeout(function(){n(t)},0)}function Tg(n){if(n.extent!==void 0){const e=n.smoothExtentConstraint!==void 0?n.smoothExtentConstraint:!0;return Pa(n.extent,n.constrainOnlyCenter,e)}const t=eo(n.projection,"EPSG:3857");if(n.multiWorld!==!0&&t.isGlobal()){const e=t.getExtent().slice();return e[0]=-1/0,e[2]=1/0,Pa(e,!1,!1)}return mg}function Cg(n){let t,e,i,o=n.minZoom!==void 0?n.minZoom:nr,a=n.maxZoom!==void 0?n.maxZoom:28;const l=n.zoomFactor!==void 0?n.zoomFactor:2,h=n.multiWorld!==void 0?n.multiWorld:!1,c=n.smoothResolutionConstraint!==void 0?n.smoothResolutionConstraint:!0,u=n.showFullExtent!==void 0?n.showFullExtent:!1,d=eo(n.projection,"EPSG:3857"),f=d.getExtent();let g=n.constrainOnlyCenter,_=n.extent;if(!h&&!_&&d.isGlobal()&&(g=!1,_=f),n.resolutions!==void 0){const m=n.resolutions;e=m[o],i=m[a]!==void 0?m[a]:m[m.length-1],n.constrainResolution?t=pg(m,c,!g&&_,u):t=Na(e,i,c,!g&&_,u)}else{const p=(f?Math.max(q(f),ie(f)):360*ni.degrees/d.getMetersPerUnit())/Eo/Math.pow(2,nr),E=p/Math.pow(2,28-nr);e=n.maxResolution,e!==void 0?o=0:e=p/Math.pow(l,o),i=n.minResolution,i===void 0&&(n.maxZoom!==void 0?n.maxResolution!==void 0?i=e/Math.pow(l,a):i=p/Math.pow(l,a):i=E),a=o+Math.floor(Math.log(e/i)/Math.log(l)),i=e/Math.pow(l,a-o),n.constrainResolution?t=Eg(l,e,i,c,!g&&_,u):t=Na(e,i,c,!g&&_,u)}return{constraint:t,maxResolution:e,minResolution:i,minZoom:o,zoomFactor:l}}function wg(n){if(n.enableRotation!==void 0?n.enableRotation:!0){const e=n.constrainRotation;return e===void 0||e===!0?vg():e===!1?Fa:typeof e=="number"?yg(e):Fa}else return xo}function Sg(n){return!(n.sourceCenter&&n.targetCenter&&!cs(n.sourceCenter,n.targetCenter)||n.sourceResolution!==n.targetResolution||n.sourceRotation!==n.targetRotation)}function sr(n,t,e,i,s){const r=Math.cos(-s);let o=Math.sin(-s),a=n[0]*r-n[1]*o,l=n[1]*r+n[0]*o;a+=(t[0]/2-e[0])*i,l+=(e[1]-t[1]/2)*i,o=-o;const h=a*r-l*o,c=l*r+a*o;return[h,c]}const de=xg;class Rg extends zt{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(){gs(this.element),super.disposeInternal()}getMap(){return this.map_}setMap(t){this.map_&&gs(this.element);for(let e=0,i=this.listenerKeys.length;e<i;++e)J(this.listenerKeys[e]);this.listenerKeys.length=0,this.map_=t,t&&((this.target_?this.target_:t.getOverlayContainerStopEvent()).appendChild(this.element),this.render!==ii&&this.listenerKeys.push(z(t,ue.POSTRENDER,this.render,this)),t.render())}render(t){}setTarget(t){this.target_=typeof t=="string"?document.getElementById(t):t}}const To=Rg;class Ig extends To{constructor(t){t=t||{},super({element:document.createElement("div"),render:t.render,target:t.target}),this.ulElement_=document.createElement("ul"),this.collapsed_=t.collapsed!==void 0?t.collapsed:!0,this.userCollapsed_=this.collapsed_,this.overrideCollapsible_=t.collapsible!==void 0,this.collapsible_=t.collapsible!==void 0?t.collapsible:!0,this.collapsible_||(this.collapsed_=!1);const e=t.className!==void 0?t.className:"ol-attribution",i=t.tipLabel!==void 0?t.tipLabel:"Attributions",s=t.expandClassName!==void 0?t.expandClassName:e+"-expand",r=t.collapseLabel!==void 0?t.collapseLabel:"›",o=t.collapseClassName!==void 0?t.collapseClassName:e+"-collapse";typeof r=="string"?(this.collapseLabel_=document.createElement("span"),this.collapseLabel_.textContent=r,this.collapseLabel_.className=o):this.collapseLabel_=r;const a=t.label!==void 0?t.label:"i";typeof a=="string"?(this.label_=document.createElement("span"),this.label_.textContent=a,this.label_.className=s):this.label_=a;const l=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(l),this.toggleButton_.addEventListener(W.CLICK,this.handleClick_.bind(this),!1);const h=e+" "+Ps+" "+ho+(this.collapsed_&&this.collapsible_?" "+_a:"")+(this.collapsible_?"":" ol-uncollapsible"),c=this.element;c.className=h,c.appendChild(this.toggleButton_),c.appendChild(this.ulElement_),this.renderedAttributions_=[],this.renderedVisible_=!0}collectSourceAttributions_(t){const e={},i=[];let s=!0;const r=t.layerStatesArray;for(let o=0,a=r.length;o<a;++o){const l=r[o];if(!go(l,t.viewState))continue;const h=l.layer.getSource();if(!h)continue;const c=h.getAttributions();if(!c)continue;const u=c(t);if(u)if(s=s&&h.getAttributionsCollapsible()!==!1,Array.isArray(u))for(let d=0,f=u.length;d<f;++d)u[d]in e||(i.push(u[d]),e[u[d]]=!0);else u in e||(i.push(u),e[u]=!0)}return this.overrideCollapsible_||this.setCollapsible(s),i}updateElement_(t){if(!t){this.renderedVisible_&&(this.element.style.display="none",this.renderedVisible_=!1);return}const e=this.collectSourceAttributions_(t),i=e.length>0;if(this.renderedVisible_!=i&&(this.element.style.display=i?"":"none",this.renderedVisible_=i),!oi(e,this.renderedAttributions_)){nh(this.ulElement_);for(let s=0,r=e.length;s<r;++s){const o=document.createElement("li");o.innerHTML=e[s],this.ulElement_.appendChild(o)}this.renderedAttributions_=e}}handleClick_(t){t.preventDefault(),this.handleToggle_(),this.userCollapsed_=this.collapsed_}handleToggle_(){this.element.classList.toggle(_a),this.collapsed_?ga(this.collapseLabel_,this.label_):ga(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 bg=Ig;class Ag extends To{constructor(t){t=t||{},super({element:document.createElement("div"),render:t.render,target:t.target});const e=t.className!==void 0?t.className:"ol-rotate",i=t.label!==void 0?t.label:"⇧",s=t.compassClassName!==void 0?t.compassClassName:"ol-compass";this.label_=null,typeof i=="string"?(this.label_=document.createElement("span"),this.label_.className=s,this.label_.textContent=i):(this.label_=i,this.label_.classList.add(s));const r=t.tipLabel?t.tipLabel:"Reset rotation",o=document.createElement("button");o.className=e+"-reset",o.setAttribute("type","button"),o.title=r,o.appendChild(this.label_),o.addEventListener(W.CLICK,this.handleClick_.bind(this),!1);const a=e+" "+Ps+" "+ho,l=this.element;l.className=a,l.appendChild(o),this.callResetNorth_=t.resetNorth?t.resetNorth:void 0,this.duration_=t.duration!==void 0?t.duration:250,this.autoHide_=t.autoHide!==void 0?t.autoHide:!0,this.rotation_=void 0,this.autoHide_&&this.element.classList.add(zn)}handleClick_(t){t.preventDefault(),this.callResetNorth_!==void 0?this.callResetNorth_():this.resetNorth_()}resetNorth_(){const e=this.getMap().getView();if(!e)return;const i=e.getRotation();i!==void 0&&(this.duration_>0&&i%(2*Math.PI)!==0?e.animate({rotation:0,duration:this.duration_,easing:Bi}):e.setRotation(0))}render(t){const e=t.frameState;if(!e)return;const i=e.viewState.rotation;if(i!=this.rotation_){const s="rotate("+i+"rad)";if(this.autoHide_){const r=this.element.classList.contains(zn);!r&&i===0?this.element.classList.add(zn):r&&i!==0&&this.element.classList.remove(zn)}this.label_.style.transform=s}this.rotation_=i}}const Og=Ag;class Lg extends To{constructor(t){t=t||{},super({element:document.createElement("div"),target:t.target});const e=t.className!==void 0?t.className:"ol-zoom",i=t.delta!==void 0?t.delta:1,s=t.zoomInClassName!==void 0?t.zoomInClassName:e+"-in",r=t.zoomOutClassName!==void 0?t.zoomOutClassName:e+"-out",o=t.zoomInLabel!==void 0?t.zoomInLabel:"+",a=t.zoomOutLabel!==void 0?t.zoomOutLabel:"–",l=t.zoomInTipLabel!==void 0?t.zoomInTipLabel:"Zoom in",h=t.zoomOutTipLabel!==void 0?t.zoomOutTipLabel:"Zoom out",c=document.createElement("button");c.className=s,c.setAttribute("type","button"),c.title=l,c.appendChild(typeof o=="string"?document.createTextNode(o):o),c.addEventListener(W.CLICK,this.handleClick_.bind(this,i),!1);const u=document.createElement("button");u.className=r,u.setAttribute("type","button"),u.title=h,u.appendChild(typeof a=="string"?document.createTextNode(a):a),u.addEventListener(W.CLICK,this.handleClick_.bind(this,-i),!1);const d=e+" "+Ps+" "+ho,f=this.element;f.className=d,f.appendChild(c),f.appendChild(u),this.duration_=t.duration!==void 0?t.duration:250}handleClick_(t,e){e.preventDefault(),this.zoomByDelta_(t)}zoomByDelta_(t){const i=this.getMap().getView();if(!i)return;const s=i.getZoom();if(s!==void 0){const r=i.getConstrainedZoom(s+t);this.duration_>0?(i.getAnimating()&&i.cancelAnimations(),i.animate({zoom:r,duration:this.duration_,easing:Bi})):i.setZoom(r)}}}const Dg=Lg;function Mg(n){n=n||{};const t=new Zt;return(n.zoom!==void 0?n.zoom:!0)&&t.push(new Dg(n.zoomOptions)),(n.rotate!==void 0?n.rotate:!0)&&t.push(new Og(n.rotateOptions)),(n.attribution!==void 0?n.attribution:!0)&&t.push(new bg(n.attributionOptions)),t}const ka={ACTIVE:"active"};class Pg extends zt{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(ka.ACTIVE)}getMap(){return this.map_}handleEvent(t){return!0}setActive(t){this.set(ka.ACTIVE,t)}setMap(t){this.map_=t}}function Ng(n,t,e){const i=n.getCenterInternal();if(i){const s=[i[0]+t[0],i[1]+t[1]];n.animateInternal({duration:e!==void 0?e:250,easing:jf,center:n.getConstrainedCenter(s)})}}function Co(n,t,e,i){const s=n.getZoom();if(s===void 0)return;const r=n.getConstrainedZoom(s+t),o=n.getResolutionForZoom(r);n.getAnimating()&&n.cancelAnimations(),n.animate({resolution:o,anchor:e,duration:i!==void 0?i:250,easing:Bi})}const On=Pg;class Fg extends On{constructor(t){super(),t=t||{},this.delta_=t.delta?t.delta:1,this.duration_=t.duration!==void 0?t.duration:250}handleEvent(t){let e=!1;if(t.type==tt.DBLCLICK){const i=t.originalEvent,s=t.map,r=t.coordinate,o=i.shiftKey?-this.delta_:this.delta_,a=s.getView();Co(a,o,r,this.duration_),i.preventDefault(),e=!0}return!e}}const kg=Fg;class $g extends On{constructor(t){t=t||{},super(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==tt.POINTERDRAG)this.handleDragEvent(t),t.originalEvent.preventDefault();else if(t.type==tt.POINTERUP){const i=this.handleUpEvent(t);this.handlingDownUpSequence=i&&this.targetPointers.length>0}}else if(t.type==tt.POINTERDOWN){const i=this.handleDownEvent(t);this.handlingDownUpSequence=i,e=this.stopDown(i)}else t.type==tt.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 wo(n){const t=n.length;let e=0,i=0;for(let s=0;s<t;s++)e+=n[s].clientX,i+=n[s].clientY;return[e/t,i/t]}const Ln=$g;function kr(n){const t=arguments;return function(e){let i=!0;for(let s=0,r=t.length;s<r&&(i=i&&t[s](e),!!i);++s);return i}}const Wg=function(n){const t=n.originalEvent;return t.altKey&&!(t.metaKey||t.ctrlKey)&&t.shiftKey},Gg=function(n){const t=n.map.getTargetElement(),e=n.map.getOwnerDocument().activeElement;return t.contains(e)},Th=function(n){return n.map.getTargetElement().hasAttribute("tabindex")?Gg(n):!0},Yg=dn,Ch=function(n){const t=n.originalEvent;return t.button==0&&!(ou&&au&&t.ctrlKey)},wh=function(n){const t=n.originalEvent;return!t.altKey&&!(t.metaKey||t.ctrlKey)&&!t.shiftKey},Vg=function(n){const t=n.originalEvent;return!t.altKey&&!(t.metaKey||t.ctrlKey)&&t.shiftKey},Sh=function(n){const t=n.originalEvent,e=t.target.tagName;return e!=="INPUT"&&e!=="SELECT"&&e!=="TEXTAREA"&&!t.target.isContentEditable},rr=function(n){const t=n.originalEvent;return V(t!==void 0,56),t.pointerType=="mouse"},Xg=function(n){const t=n.originalEvent;return V(t!==void 0,56),t.isPrimary&&t.button===0};class zg extends Ln{constructor(t){super({stopDown:Ss}),t=t||{},this.kinetic_=t.kinetic,this.lastCentroid=null,this.lastPointersCount_,this.panning_=!1;const e=t.condition?t.condition:kr(wh,Xg);this.condition_=t.onFocusOnly?kr(Th,e):e,this.noKinetic_=!1}handleDragEvent(t){this.panning_||(this.panning_=!0,this.getMap().getView().beginInteraction());const e=this.targetPointers,i=wo(e);if(e.length==this.lastPointersCount_){if(this.kinetic_&&this.kinetic_.update(i[0],i[1]),this.lastCentroid){const s=[this.lastCentroid[0]-i[0],i[1]-this.lastCentroid[1]],o=t.map.getView();Fu(s,o.getResolution()),Qr(s,o.getRotation()),o.adjustCenterInternal(s)}}else this.kinetic_&&this.kinetic_.begin();this.lastCentroid=i,this.lastPointersCount_=e.length,t.originalEvent.preventDefault()}handleUpEvent(t){const e=t.map,i=e.getView();if(this.targetPointers.length===0){if(!this.noKinetic_&&this.kinetic_&&this.kinetic_.end()){const s=this.kinetic_.getDistance(),r=this.kinetic_.getAngle(),o=i.getCenterInternal(),a=e.getPixelFromCoordinateInternal(o),l=e.getCoordinateFromPixelInternal([a[0]-s*Math.cos(r),a[1]-s*Math.sin(r)]);i.animateInternal({center:i.getConstrainedCenter(l),duration:500,easing:Bi})}return this.panning_&&(this.panning_=!1,i.endInteraction()),!1}else return this.kinetic_&&this.kinetic_.begin(),this.lastCentroid=null,!0}handleDownEvent(t){if(this.targetPointers.length>0&&this.condition_(t)){const i=t.map.getView();return this.lastCentroid=null,i.getAnimating()&&i.cancelAnimations(),this.kinetic_&&this.kinetic_.begin(),this.noKinetic_=this.targetPointers.length>1,!0}else return!1}}const Bg=zg;class Kg extends Ln{constructor(t){t=t||{},super({stopDown:Ss}),this.condition_=t.condition?t.condition:Wg,this.lastAngle_=void 0,this.duration_=t.duration!==void 0?t.duration:250}handleDragEvent(t){if(!rr(t))return;const e=t.map,i=e.getView();if(i.getConstraints().rotation===xo)return;const s=e.getSize(),r=t.pixel,o=Math.atan2(s[1]/2-r[1],r[0]-s[0]/2);if(this.lastAngle_!==void 0){const a=o-this.lastAngle_;i.adjustRotationInternal(-a)}this.lastAngle_=o}handleUpEvent(t){return rr(t)?(t.map.getView().endInteraction(this.duration_),!1):!0}handleDownEvent(t){return rr(t)&&Ch(t)&&this.condition_(t)?(t.map.getView().beginInteraction(),this.lastAngle_=void 0,!0):!1}}const Ug=Kg;class Hg extends Kr{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",s=this.element_.style;s.left=Math.min(t[0],e[0])+i,s.top=Math.min(t[1],e[1])+i,s.width=Math.abs(e[0]-t[0])+i,s.height=Math.abs(e[1]-t[1])+i}setMap(t){if(this.map_){this.map_.getOverlayContainer().removeChild(this.element_);const 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_)}setPixels(t,e){this.startPixel_=t,this.endPixel_=e,this.createOrUpdateGeometry(),this.render_()}createOrUpdateGeometry(){const t=this.startPixel_,e=this.endPixel_,s=[t,[t[0],e[1]],e,[e[0],t[1]]].map(this.map_.getCoordinateFromPixelInternal,this.map_);s[4]=s[0].slice(),this.geometry_?this.geometry_.setCoordinates([s]):this.geometry_=new mn([s])}getGeometry(){return this.geometry_}}const jg=Hg,jn={BOXSTART:"boxstart",BOXDRAG:"boxdrag",BOXEND:"boxend",BOXCANCEL:"boxcancel"};class or extends pe{constructor(t,e,i){super(t),this.coordinate=e,this.mapBrowserEvent=i}}class Zg extends Ln{constructor(t){super(),this.on,this.once,this.un,t=t||{},this.box_=new jg(t.className||"ol-dragbox"),this.minArea_=t.minArea!==void 0?t.minArea:64,t.onBoxEnd&&(this.onBoxEnd=t.onBoxEnd),this.startPixel_=null,this.condition_=t.condition?t.condition:Ch,this.boxEndCondition_=t.boxEndCondition?t.boxEndCondition:this.defaultBoxEndCondition}defaultBoxEndCondition(t,e,i){const s=i[0]-e[0],r=i[1]-e[1];return s*s+r*r>=this.minArea_}getGeometry(){return this.box_.getGeometry()}handleDragEvent(t){this.box_.setPixels(this.startPixel_,t.pixel),this.dispatchEvent(new or(jn.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 or(e?jn.BOXEND:jn.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 or(jn.BOXSTART,t.coordinate,t)),!0):!1}onBoxEnd(t){}}const qg=Zg;class Jg extends qg{constructor(t){t=t||{};const e=t.condition?t.condition:Vg;super({condition:e,className:t.className||"ol-dragzoom",minArea:t.minArea}),this.duration_=t.duration!==void 0?t.duration:200,this.out_=t.out!==void 0?t.out:!1}onBoxEnd(t){const i=this.getMap().getView();let s=this.getGeometry();if(this.out_){const r=i.rotatedExtentForGeometry(s),o=i.getResolutionForExtentInternal(r),a=i.getResolution()/o;s=s.clone(),s.scale(a*a)}i.fitInternal(s,{duration:this.duration_,easing:Bi})}}const Qg=Jg,ze={LEFT:37,UP:38,RIGHT:39,DOWN:40};class t_ extends On{constructor(t){super(),t=t||{},this.defaultCondition_=function(e){return wh(e)&&Sh(e)},this.condition_=t.condition!==void 0?t.condition:this.defaultCondition_,this.duration_=t.duration!==void 0?t.duration:100,this.pixelDelta_=t.pixelDelta!==void 0?t.pixelDelta:128}handleEvent(t){let e=!1;if(t.type==W.KEYDOWN){const i=t.originalEvent,s=i.keyCode;if(this.condition_(t)&&(s==ze.DOWN||s==ze.LEFT||s==ze.RIGHT||s==ze.UP)){const o=t.map.getView(),a=o.getResolution()*this.pixelDelta_;let l=0,h=0;s==ze.DOWN?h=-a:s==ze.LEFT?l=-a:s==ze.RIGHT?l=a:h=a;const c=[l,h];Qr(c,o.getRotation()),Ng(o,c,this.duration_),i.preventDefault(),e=!0}}return!e}}const e_=t_;class i_ extends On{constructor(t){super(),t=t||{},this.condition_=t.condition?t.condition:Sh,this.delta_=t.delta?t.delta:1,this.duration_=t.duration!==void 0?t.duration:100}handleEvent(t){let e=!1;if(t.type==W.KEYDOWN||t.type==W.KEYPRESS){const i=t.originalEvent,s=i.charCode;if(this.condition_(t)&&(s=="+".charCodeAt(0)||s=="-".charCodeAt(0))){const r=t.map,o=s=="+".charCodeAt(0)?this.delta_:-this.delta_,a=r.getView();Co(a,o,void 0,this.duration_),i.preventDefault(),e=!0}}return!e}}const n_=i_;class s_ extends On{constructor(t){t=t||{},super(t),this.totalDelta_=0,this.lastDelta_=0,this.maxDelta_=t.maxDelta!==void 0?t.maxDelta:1,this.duration_=t.duration!==void 0?t.duration:250,this.timeout_=t.timeout!==void 0?t.timeout:80,this.useAnchor_=t.useAnchor!==void 0?t.useAnchor:!0,this.constrainResolution_=t.constrainResolution!==void 0?t.constrainResolution:!1;const e=t.condition?t.condition:Yg;this.condition_=t.onFocusOnly?kr(Th,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();if(!t)return;t.getView().endInteraction(void 0,this.lastDelta_?this.lastDelta_>0?1:-1:0,this.lastAnchor_)}handleEvent(t){if(!this.condition_(t)||t.type!==W.WHEEL)return!0;const i=t.map,s=t.originalEvent;s.preventDefault(),this.useAnchor_&&(this.lastAnchor_=t.coordinate);let r;if(t.type==W.WHEEL&&(r=s.deltaY,su&&s.deltaMode===WheelEvent.DOM_DELTA_PIXEL&&(r/=Il),s.deltaMode===WheelEvent.DOM_DELTA_LINE&&(r*=40)),r===0)return!1;this.lastDelta_=r;const o=Date.now();this.startTime_===void 0&&(this.startTime_=o),(!this.mode_||o-this.startTime_>this.trackpadEventGap_)&&(this.mode_=Math.abs(r)<4?"trackpad":"wheel");const a=i.getView();if(this.mode_==="trackpad"&&!(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,i),l),!1}handleWheelZoom_(t){const e=t.getView();e.getAnimating()&&e.cancelAnimations();let i=-et(this.totalDelta_,-this.maxDelta_*this.deltaPerZoom_,this.maxDelta_*this.deltaPerZoom_)/this.deltaPerZoom_;(e.getConstrainResolution()||this.constrainResolution_)&&(i=i?i>0?1:-1:0),Co(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 r_=s_;class o_ extends Ln{constructor(t){t=t||{};const e=t;e.stopDown||(e.stopDown=Ss),super(e),this.anchor_=null,this.lastAngle_=void 0,this.rotating_=!1,this.rotationDelta_=0,this.threshold_=t.threshold!==void 0?t.threshold:.3,this.duration_=t.duration!==void 0?t.duration:250}handleDragEvent(t){let e=0;const i=this.targetPointers[0],s=this.targetPointers[1],r=Math.atan2(s.clientY-i.clientY,s.clientX-i.clientX);if(this.lastAngle_!==void 0){const c=r-this.lastAngle_;this.rotationDelta_+=c,!this.rotating_&&Math.abs(this.rotationDelta_)>this.threshold_&&(this.rotating_=!0),e=c}this.lastAngle_=r;const o=t.map,a=o.getView();if(a.getConstraints().rotation===xo)return;const l=o.getViewport().getBoundingClientRect(),h=wo(this.targetPointers);h[0]-=l.left,h[1]-=l.top,this.anchor_=o.getCoordinateFromPixelInternal(h),this.rotating_&&(o.render(),a.adjustRotationInternal(e,this.anchor_))}handleUpEvent(t){return this.targetPointers.length<2?(t.map.getView().endInteraction(this.duration_),!1):!0}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}else return!1}}const a_=o_;class l_ extends Ln{constructor(t){t=t||{};const e=t;e.stopDown||(e.stopDown=Ss),super(e),this.anchor_=null,this.duration_=t.duration!==void 0?t.duration:400,this.lastDistance_=void 0,this.lastScaleDelta_=1}handleDragEvent(t){let e=1;const i=this.targetPointers[0],s=this.targetPointers[1],r=i.clientX-s.clientX,o=i.clientY-s.clientY,a=Math.sqrt(r*r+o*o);this.lastDistance_!==void 0&&(e=this.lastDistance_/a),this.lastDistance_=a;const l=t.map,h=l.getView();e!=1&&(this.lastScaleDelta_=e);const c=l.getViewport().getBoundingClientRect(),u=wo(this.targetPointers);u[0]-=c.left,u[1]-=c.top,this.anchor_=l.getCoordinateFromPixelInternal(u),l.render(),h.adjustResolutionInternal(e,this.anchor_)}handleUpEvent(t){if(this.targetPointers.length<2){const i=t.map.getView(),s=this.lastScaleDelta_>1?1:-1;return i.endInteraction(this.duration_,s),!1}else 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}else return!1}}const h_=l_;function c_(n){n=n||{};const t=new Zt,e=new tg(-.005,.05,100);return(n.altShiftDragRotate!==void 0?n.altShiftDragRotate:!0)&&t.push(new Ug),(n.doubleClickZoom!==void 0?n.doubleClickZoom:!0)&&t.push(new kg({delta:n.zoomDelta,duration:n.zoomDuration})),(n.dragPan!==void 0?n.dragPan:!0)&&t.push(new Bg({onFocusOnly:n.onFocusOnly,kinetic:e})),(n.pinchRotate!==void 0?n.pinchRotate:!0)&&t.push(new a_),(n.pinchZoom!==void 0?n.pinchZoom:!0)&&t.push(new h_({duration:n.zoomDuration})),(n.keyboard!==void 0?n.keyboard:!0)&&(t.push(new e_),t.push(new n_({delta:n.zoomDelta,duration:n.zoomDuration}))),(n.mouseWheelZoom!==void 0?n.mouseWheelZoom:!0)&&t.push(new r_({onFocusOnly:n.onFocusOnly,duration:n.zoomDuration})),(n.shiftDragZoom!==void 0?n.shiftDragZoom:!0)&&t.push(new Qg({duration:n.zoomDuration})),t}function Rh(n){if(n instanceof Fs){n.setMapInternal(null);return}n instanceof ks&&n.getLayers().forEach(Rh)}function Ih(n,t){if(n instanceof Fs){n.setMapInternal(t);return}if(n instanceof ks){const e=n.getLayers().getArray();for(let i=0,s=e.length;i<s;++i)Ih(e[i],t)}}let u_=class extends zt{constructor(t){super(),t=t||{},this.on,this.once,this.un;const e=d_(t);this.renderComplete_,this.loaded_=!0,this.boundHandleBrowserEvent_=this.handleBrowserEvent.bind(this),this.maxTilesLoading_=t.maxTilesLoading!==void 0?t.maxTilesLoading:16,this.pixelRatio_=t.pixelRatio!==void 0?t.pixelRatio:Il,this.postRenderTimeoutHandle_,this.animationDelayKey_,this.animationDelay_=this.animationDelay_.bind(this),this.coordinateToPixelTransform_=Jt(),this.pixelToCoordinateTransform_=Jt(),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.controls=e.controls||Mg(),this.interactions=e.interactions||c_({onFocusOnly:!0}),this.overlays_=e.overlays,this.overlayIdIndex_={},this.renderer_=null,this.postRenderFunctions_=[],this.tileQueue_=new fg(this.getTilePriority.bind(this),this.handleTileChange_.bind(this)),this.addChangeListener(lt.LAYERGROUP,this.handleLayerGroupChanged_),this.addChangeListener(lt.VIEW,this.handleViewChanged_),this.addChangeListener(lt.SIZE,this.handleSizeChanged_),this.addChangeListener(lt.TARGET,this.handleTargetChanged_),this.setProperties(e.values);const i=this;t.view&&!(t.view instanceof de)&&t.view.then(function(s){i.setView(new de(s))}),this.controls.addEventListener(yt.ADD,function(s){s.element.setMap(this)}.bind(this)),this.controls.addEventListener(yt.REMOVE,function(s){s.element.setMap(null)}.bind(this)),this.interactions.addEventListener(yt.ADD,function(s){s.element.setMap(this)}.bind(this)),this.interactions.addEventListener(yt.REMOVE,function(s){s.element.setMap(null)}.bind(this)),this.overlays_.addEventListener(yt.ADD,function(s){this.addOverlayInternal_(s.element)}.bind(this)),this.overlays_.addEventListener(yt.REMOVE,function(s){const r=s.element.getId();r!==void 0&&delete this.overlayIdIndex_[r.toString()],s.element.setMap(null)}.bind(this)),this.controls.forEach(function(s){s.setMap(this)}.bind(this)),this.interactions.forEach(function(s){s.setMap(this)}.bind(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){Ih(t.layer,this)}addOverlay(t){this.getOverlays().push(t)}addOverlayInternal_(t){const e=t.getId();e!==void 0&&(this.overlayIdIndex_[e.toString()]=t),t.setMap(this)}disposeInternal(){this.controls.clear(),this.interactions.clear(),this.overlays_.clear(),this.setTarget(null),super.disposeInternal()}forEachFeatureAtPixel(t,e,i){if(!this.frameState_||!this.renderer_)return;const s=this.getCoordinateFromPixelInternal(t);i=i!==void 0?i:{};const r=i.hitTolerance!==void 0?i.hitTolerance:0,o=i.layerFilter!==void 0?i.layerFilter:dn,a=i.checkWrapped!==!1;return this.renderer_.forEachFeatureAtCoordinate(s,this.frameState_,r,a,e,null,o,null)}getFeaturesAtPixel(t,e){const i=[];return this.forEachFeatureAtPixel(t,function(s){i.push(s)},e),i}getAllLayers(){const t=[];function e(i){i.forEach(function(s){s instanceof ks?e(s.getLayers()):t.push(s)})}return e(this.getLayers()),t}hasFeatureAtPixel(t,e){if(!this.frameState_||!this.renderer_)return!1;const i=this.getCoordinateFromPixelInternal(t);e=e!==void 0?e:{};const s=e.layerFilter!==void 0?e.layerFilter:dn,r=e.hitTolerance!==void 0?e.hitTolerance:0,o=e.checkWrapped!==!1;return this.renderer_.hasFeatureAtCoordinate(i,this.frameState_,r,o,s,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="changedTouches"in t?t.changedTouches[0]:t;return[i.clientX-e.left,i.clientY-e.top]}getTarget(){return this.get(lt.TARGET)}getTargetElement(){const t=this.getTarget();return t!==void 0?typeof t=="string"?document.getElementById(t):t:null}getCoordinateFromPixel(t){return Lr(this.getCoordinateFromPixelInternal(t),this.getView().getProjection())}getCoordinateFromPixelInternal(t){const e=this.frameState_;return e?rt(e.pixelToCoordinateTransform,t.slice()):null}getControls(){return this.controls}getOverlays(){return this.overlays_}getOverlayById(t){const e=this.overlayIdIndex_[t.toString()];return e!==void 0?e:null}getInteractions(){return this.interactions}getLayerGroup(){return this.get(lt.LAYERGROUP)}setLayers(t){const e=this.getLayerGroup();if(t instanceof Zt){e.setLayers(t);return}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 s=t[e];if(!s.visible)continue;const r=s.layer.getRenderer();if(r&&!r.ready)return!0;const o=s.layer.getSource();if(o&&o.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?rt(e.coordinateToPixelTransform,t.slice(0,2)):null}getRenderer(){return this.renderer_}getSize(){return this.get(lt.SIZE)}getView(){return this.get(lt.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,s){return gg(this.frameState_,t,e,i,s)}handleBrowserEvent(t,e){e=e||t.type;const i=new be(e,this,t);this.handleMapBrowserEvent(i)}handleMapBrowserEvent(t){if(!this.frameState_)return;const e=t.originalEvent,i=e.type;if(i===Fr.POINTERDOWN||i===W.WHEEL||i===W.KEYDOWN){const s=this.getOwnerDocument(),r=this.viewport_.getRootNode?this.viewport_.getRootNode():s,o=e.target;if(this.overlayContainerStopEvent_.contains(o)||!(r===s?s.documentElement:r).contains(o))return}if(t.frameState=this.frameState_,this.dispatchEvent(t)!==!1){const s=this.getInteractions().getArray().slice();for(let r=s.length-1;r>=0;r--){const o=s[r];if(o.getMap()!==this||!o.getActive()||!this.getTargetElement())continue;if(!o.handleEvent(t)||t.propagationStopped)break}}}handlePostRender(){const t=this.frameState_,e=this.tileQueue_;if(!e.isEmpty()){let s=this.maxTilesLoading_,r=s;if(t){const o=t.viewHints;if(o[ht.ANIMATING]||o[ht.INTERACTING]){const a=Date.now()-t.time>8;s=a?0:8,r=a?0:2}}e.getTilesLoading()<s&&(e.reprioritize(),e.loadMoreTiles(s,r))}t&&this.renderer_&&!t.animate&&(this.renderComplete_===!0?(this.hasListener(Le.RENDERCOMPLETE)&&this.renderer_.dispatchRenderEvent(Le.RENDERCOMPLETE,t),this.loaded_===!1&&(this.loaded_=!0,this.dispatchEvent(new wi(ue.LOADEND,this,t)))):this.loaded_===!0&&(this.loaded_=!1,this.dispatchEvent(new wi(ue.LOADSTART,this,t))));const i=this.postRenderFunctions_;for(let s=0,r=i.length;s<r;++s)i[s](this,t);i.length=0}handleSizeChanged_(){this.getView()&&!this.getView().getAnimating()&&this.getView().resolveConstraints(0),this.render()}handleTargetChanged_(){if(this.mapBrowserEventHandler_){for(let e=0,i=this.targetChangeHandlerKeys_.length;e<i;++e)J(this.targetChangeHandlerKeys_[e]);this.targetChangeHandlerKeys_=null,this.viewport_.removeEventListener(W.CONTEXTMENU,this.boundHandleBrowserEvent_),this.viewport_.removeEventListener(W.WHEEL,this.boundHandleBrowserEvent_),this.mapBrowserEventHandler_.dispose(),this.mapBrowserEventHandler_=null,gs(this.viewport_)}const t=this.getTargetElement();if(!t)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);else{t.appendChild(this.viewport_),this.renderer_||(this.renderer_=new rg(this)),this.mapBrowserEventHandler_=new hg(this,this.moveTolerance_);for(const s in tt)this.mapBrowserEventHandler_.addEventListener(tt[s],this.handleMapBrowserEvent.bind(this));this.viewport_.addEventListener(W.CONTEXTMENU,this.boundHandleBrowserEvent_,!1),this.viewport_.addEventListener(W.WHEEL,this.boundHandleBrowserEvent_,bl?{passive:!1}:!1);const e=this.getOwnerDocument().defaultView,i=this.keyboardEventTarget_?this.keyboardEventTarget_:t;this.targetChangeHandlerKeys_=[z(i,W.KEYDOWN,this.handleBrowserEvent,this),z(i,W.KEYPRESS,this.handleBrowserEvent,this),z(e,W.RESIZE,this.updateSize,this)]}this.updateSize()}handleTileChange_(){this.render()}handleViewPropertyChanged_(){this.render()}handleViewChanged_(){this.viewPropertyListenerKey_&&(J(this.viewPropertyListenerKey_),this.viewPropertyListenerKey_=null),this.viewChangeListenerKey_&&(J(this.viewChangeListenerKey_),this.viewChangeListenerKey_=null);const t=this.getView();t&&(this.updateViewportSize_(),this.viewPropertyListenerKey_=z(t,Pi.PROPERTYCHANGE,this.handleViewPropertyChanged_,this),this.viewChangeListenerKey_=z(t,W.CHANGE,this.handleViewPropertyChanged_,this),t.resolveConstraints(0)),this.render()}handleLayerGroupChanged_(){this.layerGroupPropertyListenerKeys_&&(this.layerGroupPropertyListenerKeys_.forEach(J),this.layerGroupPropertyListenerKeys_=null);const t=this.getLayerGroup();t&&(this.handleLayerAdd_(new Ae("addlayer",t)),this.layerGroupPropertyListenerKeys_=[z(t,Pi.PROPERTYCHANGE,this.render,this),z(t,W.CHANGE,this.render,this),z(t,"addlayer",this.handleLayerAdd_,this),z(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 s=t[e].layer;s.hasRenderer()&&s.getRenderer().handleFontsChanged()}}render(){this.renderer_&&this.animationDelayKey_===void 0&&(this.animationDelayKey_=requestAnimationFrame(this.animationDelay_))}removeControl(t){return this.getControls().remove(t)}removeInteraction(t){return this.getInteractions().remove(t)}removeLayer(t){return this.getLayerGroup().getLayers().remove(t)}handleLayerRemove_(t){Rh(t.layer)}removeOverlay(t){return this.getOverlays().remove(t)}renderFrame_(t){const e=this.getSize(),i=this.getView(),s=this.frameState_;let r=null;if(e!==void 0&&da(e)&&i&&i.isDef()){const o=i.getHints(this.frameState_?this.frameState_.viewHints:void 0),a=i.getState();if(r={animate:!1,coordinateToPixelTransform:this.coordinateToPixelTransform_,declutterTree:null,extent:Ir(a.center,a.resolution,a.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:a,viewHints:o,wantedTiles:{},mapId:U(this),renderTargets:{}},a.nextCenter&&a.nextResolution){const l=isNaN(a.nextRotation)?a.rotation:a.nextRotation;r.nextExtent=Ir(a.nextCenter,a.nextResolution,l,e)}}this.frameState_=r,this.renderer_.renderFrame(r),r&&(r.animate&&this.render(),Array.prototype.push.apply(this.postRenderFunctions_,r.postRenderFunctions),s&&(!this.previousExtent_||!Jr(this.previousExtent_)&&!gn(r.extent,this.previousExtent_))&&(this.dispatchEvent(new wi(ue.MOVESTART,this,s)),this.previousExtent_=As(this.previousExtent_)),this.previousExtent_&&!r.viewHints[ht.ANIMATING]&&!r.viewHints[ht.INTERACTING]&&!gn(r.extent,this.previousExtent_)&&(this.dispatchEvent(new wi(ue.MOVEEND,this,r)),Ol(r.extent,this.previousExtent_))),this.dispatchEvent(new wi(ue.POSTRENDER,this,r)),this.renderComplete_=this.hasListener(ue.LOADSTART)||this.hasListener(ue.LOADEND)||this.hasListener(Le.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 Ae("removelayer",e)),this.set(lt.LAYERGROUP,t)}setSize(t){this.set(lt.SIZE,t)}setTarget(t){this.set(lt.TARGET,t)}setView(t){if(!t||t instanceof de){this.set(lt.VIEW,t);return}this.set(lt.VIEW,new de);const e=this;t.then(function(i){e.setView(new de(i))})}updateSize(){const t=this.getTargetElement();let e;if(t){const i=getComputedStyle(t),s=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(s)&&!isNaN(r)&&(e=[s,r],!da(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_()}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)}}};function d_(n){let t=null;n.keyboardEventTarget!==void 0&&(t=typeof n.keyboardEventTarget=="string"?document.getElementById(n.keyboardEventTarget):n.keyboardEventTarget);const e={},i=n.layers&&typeof n.layers.getLayers=="function"?n.layers:new ks({layers:n.layers});e[lt.LAYERGROUP]=i,e[lt.TARGET]=n.target,e[lt.VIEW]=n.view instanceof de?n.view:new de;let s;n.controls!==void 0&&(Array.isArray(n.controls)?s=new Zt(n.controls.slice()):(V(typeof n.controls.getArray=="function",47),s=n.controls));let r;n.interactions!==void 0&&(Array.isArray(n.interactions)?r=new Zt(n.interactions.slice()):(V(typeof n.interactions.getArray=="function",48),r=n.interactions));let o;return n.overlays!==void 0?Array.isArray(n.overlays)?o=new Zt(n.overlays.slice()):(V(typeof n.overlays.getArray=="function",49),o=n.overlays):o=new Zt,{controls:s,interactions:r,keyboardEventTarget:t,overlays:o,values:e}}const f_=u_,at={ELEMENT:"element",MAP:"map",OFFSET:"offset",POSITION:"position",POSITIONING:"positioning"};class g_ extends zt{constructor(t){super(),this.on,this.once,this.un,this.options=t,this.id=t.id,this.insertFirst=t.insertFirst!==void 0?t.insertFirst:!0,this.stopEvent=t.stopEvent!==void 0?t.stopEvent:!0,this.element=document.createElement("div"),this.element.className=t.className!==void 0?t.className:"ol-overlay-container "+wd,this.element.style.position="absolute",this.element.style.pointerEvents="auto",this.autoPan=t.autoPan===!0?{}:t.autoPan||void 0,this.rendered={transform_:"",visible:!0},this.mapPostrenderListenerKey=null,this.addChangeListener(at.ELEMENT,this.handleElementChanged),this.addChangeListener(at.MAP,this.handleMapChanged),this.addChangeListener(at.OFFSET,this.handleOffsetChanged),this.addChangeListener(at.POSITION,this.handlePositionChanged),this.addChangeListener(at.POSITIONING,this.handlePositioningChanged),t.element!==void 0&&this.setElement(t.element),this.setOffset(t.offset!==void 0?t.offset:[0,0]),this.setPositioning(t.positioning||"top-left"),t.position!==void 0&&this.setPosition(t.position)}getElement(){return this.get(at.ELEMENT)}getId(){return this.id}getMap(){return this.get(at.MAP)||null}getOffset(){return this.get(at.OFFSET)}getPosition(){return this.get(at.POSITION)}getPositioning(){return this.get(at.POSITIONING)}handleElementChanged(){nh(this.element);const t=this.getElement();t&&this.element.appendChild(t)}handleMapChanged(){this.mapPostrenderListenerKey&&(gs(this.element),J(this.mapPostrenderListenerKey),this.mapPostrenderListenerKey=null);const t=this.getMap();if(t){this.mapPostrenderListenerKey=z(t,ue.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(at.ELEMENT,t)}setMap(t){this.set(at.MAP,t)}setOffset(t){this.set(at.OFFSET,t)}setPosition(t){this.set(at.POSITION,t)}performAutoPan(){this.autoPan&&this.panIntoView(this.autoPan)}panIntoView(t){const e=this.getMap();if(!e||!e.getTargetElement()||!this.get(at.POSITION))return;const i=this.getRect(e.getTargetElement(),e.getSize()),s=this.getElement(),r=this.getRect(s,[xd(s),Td(s)]);t=t||{};const o=t.margin===void 0?20:t.margin;if(!Ue(i,r)){const a=r[0]-i[0],l=i[2]-r[2],h=r[1]-i[1],c=i[3]-r[3],u=[0,0];if(a<0?u[0]=a-o:l<0&&(u[0]=Math.abs(l)+o),h<0?u[1]=h-o:c<0&&(u[1]=Math.abs(c)+o),u[0]!==0||u[1]!==0){const d=e.getView().getCenterInternal(),f=e.getPixelFromCoordinateInternal(d);if(!f)return;const g=[f[0]+u[0],f[1]+u[1]],_=t.animation||{};e.getView().animateInternal({center:e.getCoordinateFromPixelInternal(g),duration:_.duration,easing:_.easing})}}}getRect(t,e){const i=t.getBoundingClientRect(),s=i.left+window.pageXOffset,r=i.top+window.pageYOffset;return[s,r,s+e[0],r+e[1]]}setPositioning(t){this.set(at.POSITIONING,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){this.setVisible(!1);return}const i=t.getPixelFromCoordinate(e),s=t.getSize();this.updateRenderedPosition(i,s)}updateRenderedPosition(t,e){const i=this.element.style,s=this.getOffset(),r=this.getPositioning();this.setVisible(!0);const o=Math.round(t[0]+s[0])+"px",a=Math.round(t[1]+s[1])+"px";let l="0%",h="0%";r=="bottom-right"||r=="center-right"||r=="top-right"?l="-100%":(r=="bottom-center"||r=="center-center"||r=="top-center")&&(l="-50%"),r=="bottom-left"||r=="bottom-center"||r=="bottom-right"?h="-100%":(r=="center-left"||r=="center-center"||r=="center-right")&&(h="-50%");const c=`translate(${l}, ${h}) translate(${o}, ${a})`;this.rendered.transform_!=c&&(this.rendered.transform_=c,i.transform=c)}getOptions(){return this.options}}const __=g_;class m_{constructor(t){this.highWaterMark=t!==void 0?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 V(i!==void 0,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 V(e!==void 0,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=0,i;for(i=this.newest_;i;i=i.older)t[e++]=i.key_;return t}getValues(){const t=new Array(this.count_);let e=0,i;for(i=this.newest_;i;i=i.older)t[e++]=i.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){V(!(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}}const p_=m_;function $a(n,t,e,i){return i!==void 0?(i[0]=n,i[1]=t,i[2]=e,i):[n,t,e]}function $s(n,t,e){return n+"/"+t+"/"+e}function bh(n){return $s(n[0],n[1],n[2])}function E_(n){return n.split("/").map(Number)}function y_(n){return(n[1]<<n[0])+n[2]}function v_(n,t){const e=n[0],i=n[1],s=n[2];if(t.getMinZoom()>e||e>t.getMaxZoom())return!1;const r=t.getFullTileRange(e);return r?r.containsXY(i,s):!0}class x_ extends p_{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(this.getCount()===0)return;const t=this.peekFirstKey(),i=E_(t)[0];this.forEach(function(s){s.tileCoord[0]!==i&&(this.remove(bh(s.tileCoord)),s.release())}.bind(this))}}const Ah=x_;class Oh{constructor(t,e,i,s){this.minX=t,this.maxX=e,this.minY=i,this.maxY=s}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 pi(n,t,e,i,s){return s!==void 0?(s.minX=n,s.maxX=t,s.minY=e,s.maxY=i,s):new Oh(n,t,e,i)}const Lh=Oh,T_=.5,C_=10,Wa=.25;class w_{constructor(t,e,i,s,r,o){this.sourceProj_=t,this.targetProj_=e;let a={};const l=_n(this.targetProj_,this.sourceProj_);this.transformInv_=function(E){const v=E[0]+"/"+E[1];return a[v]||(a[v]=l(E)),a[v]},this.maxSourceExtent_=s,this.errorThresholdSquared_=r*r,this.triangles_=[],this.wrapsXInSource_=!1,this.canWrapXInSource_=this.sourceProj_.canWrapX()&&!!s&&!!this.sourceProj_.getExtent()&&q(s)==q(this.sourceProj_.getExtent()),this.sourceWorldWidth_=this.sourceProj_.getExtent()?q(this.sourceProj_.getExtent()):null,this.targetWorldWidth_=this.targetProj_.getExtent()?q(this.targetProj_.getExtent()):null;const h=ai(i),c=Ds(i),u=Ls(i),d=Os(i),f=this.transformInv_(h),g=this.transformInv_(c),_=this.transformInv_(u),m=this.transformInv_(d),p=C_+(o?Math.max(0,Math.ceil(Math.log2(Rr(i)/(o*o*256*256)))):0);if(this.addQuad_(h,c,u,d,f,g,_,m,p),this.wrapsXInSource_){let E=1/0;this.triangles_.forEach(function(v,y,x){E=Math.min(E,v.source[0][0],v.source[1][0],v.source[2][0])}),this.triangles_.forEach(function(v){if(Math.max(v.source[0][0],v.source[1][0],v.source[2][0])-E>this.sourceWorldWidth_/2){const y=[[v.source[0][0],v.source[0][1]],[v.source[1][0],v.source[1][1]],[v.source[2][0],v.source[2][1]]];y[0][0]-E>this.sourceWorldWidth_/2&&(y[0][0]-=this.sourceWorldWidth_),y[1][0]-E>this.sourceWorldWidth_/2&&(y[1][0]-=this.sourceWorldWidth_),y[2][0]-E>this.sourceWorldWidth_/2&&(y[2][0]-=this.sourceWorldWidth_);const x=Math.min(y[0][0],y[1][0],y[2][0]);Math.max(y[0][0],y[1][0],y[2][0])-x<this.sourceWorldWidth_/2&&(v.source=y)}}.bind(this))}a={}}addTriangle_(t,e,i,s,r,o){this.triangles_.push({source:[s,r,o],target:[t,e,i]})}addQuad_(t,e,i,s,r,o,a,l,h){const c=Jo([r,o,a,l]),u=this.sourceWorldWidth_?q(c)/this.sourceWorldWidth_:null,d=this.sourceWorldWidth_,f=this.sourceProj_.canWrapX()&&u>.5&&u<1;let g=!1;if(h>0){if(this.targetProj_.isGlobal()&&this.targetWorldWidth_){const m=Jo([t,e,i,s]);g=q(m)/this.targetWorldWidth_>Wa||g}!f&&this.sourceProj_.isGlobal()&&u&&(g=u>Wa||g)}if(!g&&this.maxSourceExtent_&&isFinite(c[0])&&isFinite(c[1])&&isFinite(c[2])&&isFinite(c[3])&&!vt(c,this.maxSourceExtent_))return;let _=0;if(!g&&(!isFinite(r[0])||!isFinite(r[1])||!isFinite(o[0])||!isFinite(o[1])||!isFinite(a[0])||!isFinite(a[1])||!isFinite(l[0])||!isFinite(l[1]))){if(h>0)g=!0;else if(_=(!isFinite(r[0])||!isFinite(r[1])?8:0)+(!isFinite(o[0])||!isFinite(o[1])?4:0)+(!isFinite(a[0])||!isFinite(a[1])?2:0)+(!isFinite(l[0])||!isFinite(l[1])?1:0),_!=1&&_!=2&&_!=4&&_!=8)return}if(h>0){if(!g){const m=[(t[0]+i[0])/2,(t[1]+i[1])/2],p=this.transformInv_(m);let E;f?E=(Mi(r[0],d)+Mi(a[0],d))/2-Mi(p[0],d):E=(r[0]+a[0])/2-p[0];const v=(r[1]+a[1])/2-p[1];g=E*E+v*v>this.errorThresholdSquared_}if(g){if(Math.abs(t[0]-i[0])<=Math.abs(t[1]-i[1])){const m=[(e[0]+i[0])/2,(e[1]+i[1])/2],p=this.transformInv_(m),E=[(s[0]+t[0])/2,(s[1]+t[1])/2],v=this.transformInv_(E);this.addQuad_(t,e,m,E,r,o,p,v,h-1),this.addQuad_(E,m,i,s,v,p,a,l,h-1)}else{const m=[(t[0]+e[0])/2,(t[1]+e[1])/2],p=this.transformInv_(m),E=[(i[0]+s[0])/2,(i[1]+s[1])/2],v=this.transformInv_(E);this.addQuad_(t,m,E,s,r,p,v,l,h-1),this.addQuad_(m,e,i,E,p,o,a,v,h-1)}return}}if(f){if(!this.canWrapXInSource_)return;this.wrapsXInSource_=!0}_&11||this.addTriangle_(t,i,s,r,a,l),_&14||this.addTriangle_(t,i,e,r,a,o),_&&(_&13||this.addTriangle_(e,s,t,o,l,r),_&7||this.addTriangle_(e,s,i,o,l,a))}calculateSourceExtent(){const t=Xt();return this.triangles_.forEach(function(e,i,s){const r=e.source;on(t,r[0]),on(t,r[1]),on(t,r[2])}),t}getTriangles(){return this.triangles_}}const S_=w_;let ar;const Dh=[];function Ga(n,t,e,i,s){n.beginPath(),n.moveTo(0,0),n.lineTo(t,e),n.lineTo(i,s),n.closePath(),n.save(),n.clip(),n.fillRect(0,0,Math.max(t,i)+1,Math.max(e,s)),n.restore()}function lr(n,t){return Math.abs(n[t*4]-210)>2||Math.abs(n[t*4+3]-.75*255)>2}function R_(){if(ar===void 0){const n=document.createElement("canvas").getContext("2d");n.globalCompositeOperation="lighter",n.fillStyle="rgba(210, 0, 0, 0.75)",Ga(n,4,5,4,0),Ga(n,4,5,0,5);const t=n.getImageData(0,0,3,3).data;ar=lr(t,0)||lr(t,4)||lr(t,8)}return ar}function Ya(n,t,e,i){const s=io(e,t,n);let r=na(t,i,e);const o=t.getMetersPerUnit();o!==void 0&&(r*=o);const a=n.getMetersPerUnit();a!==void 0&&(r/=a);const l=n.getExtent();if(!l||bs(l,s)){const h=na(n,r,s)/r;isFinite(h)&&h>0&&(r/=h)}return r}function I_(n,t,e,i){const s=Fi(e);let r=Ya(n,t,s,i);return(!isFinite(r)||r<=0)&&Pl(e,function(o){return r=Ya(n,t,o,i),isFinite(r)&&r>0}),r}function b_(n,t,e,i,s,r,o,a,l,h,c,u){const d=It(Math.round(e*n),Math.round(e*t),Dh);if(u||(d.imageSmoothingEnabled=!1),l.length===0)return d.canvas;d.scale(e,e);function f(y){return Math.round(y*e)/e}d.globalCompositeOperation="lighter";const g=Xt();l.forEach(function(y,x,C){mu(g,y.extent)});const _=q(g),m=ie(g),p=It(Math.round(e*_/i),Math.round(e*m/i));u||(p.imageSmoothingEnabled=!1);const E=e/i;l.forEach(function(y,x,C){const S=y.extent[0]-g[0],R=-(y.extent[3]-g[3]),A=q(y.extent),O=ie(y.extent);y.image.width>0&&y.image.height>0&&p.drawImage(y.image,h,h,y.image.width-2*h,y.image.height-2*h,S*E,R*E,A*E,O*E)});const v=ai(o);return a.getTriangles().forEach(function(y,x,C){const S=y.source,R=y.target;let A=S[0][0],O=S[0][1],N=S[1][0],$=S[1][1],D=S[2][0],j=S[2][1];const k=f((R[0][0]-v[0])/r),I=f(-(R[0][1]-v[1])/r),b=f((R[1][0]-v[0])/r),L=f(-(R[1][1]-v[1])/r),X=f((R[2][0]-v[0])/r),K=f(-(R[2][1]-v[1])/r),Q=A,w=O;A=0,O=0,N-=Q,$-=w,D-=Q,j-=w;const nt=[[N,$,0,0,b-k],[D,j,0,0,X-k],[0,0,N,$,L-I],[0,0,D,j,K-I]],G=Pu(nt);if(G){if(d.save(),d.beginPath(),R_()||!u){d.moveTo(b,L);const Y=4,mt=k-b,ct=I-L;for(let Z=0;Z<Y;Z++)d.lineTo(b+f((Z+1)*mt/Y),L+f(Z*ct/(Y-1))),Z!=Y-1&&d.lineTo(b+f((Z+1)*mt/Y),L+f((Z+1)*ct/(Y-1)));d.lineTo(X,K)}else d.moveTo(b,L),d.lineTo(k,I),d.lineTo(X,K);d.clip(),d.transform(G[0],G[2],G[1],G[3],k,I),d.translate(g[0]-Q,g[3]-w),d.scale(i/e,-i/e),d.drawImage(p.canvas,0,0),d.restore()}}),c&&(d.save(),d.globalCompositeOperation="source-over",d.strokeStyle="black",d.lineWidth=1,a.getTriangles().forEach(function(y,x,C){const S=y.target,R=(S[0][0]-v[0])/r,A=-(S[0][1]-v[1])/r,O=(S[1][0]-v[0])/r,N=-(S[1][1]-v[1])/r,$=(S[2][0]-v[0])/r,D=-(S[2][1]-v[1])/r;d.beginPath(),d.moveTo(O,N),d.lineTo(R,A),d.lineTo($,D),d.closePath(),d.stroke()}),d.restore()),d.canvas}class A_ extends vh{constructor(t,e,i,s,r,o,a,l,h,c,u,d){super(r,P.IDLE,{interpolate:!!d}),this.renderEdges_=u!==void 0?u:!1,this.pixelRatio_=a,this.gutter_=l,this.canvas_=null,this.sourceTileGrid_=e,this.targetTileGrid_=s,this.wrappedTileCoord_=o||r,this.sourceTiles_=[],this.sourcesListenerKeys_=null,this.sourceZ_=0;const f=s.getTileCoordExtent(this.wrappedTileCoord_),g=this.targetTileGrid_.getExtent();let _=this.sourceTileGrid_.getExtent();const m=g?an(f,g):f;if(Rr(m)===0){this.state=P.EMPTY;return}const p=t.getExtent();p&&(_?_=an(_,p):_=p);const E=s.getResolution(this.wrappedTileCoord_[0]),v=I_(t,i,m,E);if(!isFinite(v)||v<=0){this.state=P.EMPTY;return}const y=c!==void 0?c:T_;if(this.triangulation_=new S_(t,i,m,_,v*y,E),this.triangulation_.getTriangles().length===0){this.state=P.EMPTY;return}this.sourceZ_=e.getZForResolution(v);let x=this.triangulation_.calculateSourceExtent();if(_&&(t.canWrapX()?(x[1]=et(x[1],_[1],_[3]),x[3]=et(x[3],_[1],_[3])):x=an(x,_)),!Rr(x))this.state=P.EMPTY;else{const C=e.getTileRangeForExtentAndZ(x,this.sourceZ_);for(let S=C.minX;S<=C.maxX;S++)for(let R=C.minY;R<=C.maxY;R++){const A=h(this.sourceZ_,S,R,a);A&&this.sourceTiles_.push(A)}this.sourceTiles_.length===0&&(this.state=P.EMPTY)}}getImage(){return this.canvas_}reproject_(){const t=[];if(this.sourceTiles_.forEach(function(e,i,s){e&&e.getState()==P.LOADED&&t.push({extent:this.sourceTileGrid_.getTileCoordExtent(e.tileCoord),image:e.getImage()})}.bind(this)),this.sourceTiles_.length=0,t.length===0)this.state=P.ERROR;else{const e=this.wrappedTileCoord_[0],i=this.targetTileGrid_.getTileSize(e),s=typeof i=="number"?i:i[0],r=typeof i=="number"?i:i[1],o=this.targetTileGrid_.getResolution(e),a=this.sourceTileGrid_.getResolution(this.sourceZ_),l=this.targetTileGrid_.getTileCoordExtent(this.wrappedTileCoord_);this.canvas_=b_(s,r,this.pixelRatio_,a,this.sourceTileGrid_.getExtent(),o,l,this.triangulation_,t,this.gutter_,this.renderEdges_,this.interpolate),this.state=P.LOADED}this.changed()}load(){if(this.state==P.IDLE){this.state=P.LOADING,this.changed();let t=0;this.sourcesListenerKeys_=[],this.sourceTiles_.forEach(function(e,i,s){const r=e.getState();if(r==P.IDLE||r==P.LOADING){t++;const o=z(e,W.CHANGE,function(a){const l=e.getState();(l==P.LOADED||l==P.ERROR||l==P.EMPTY)&&(J(o),t--,t===0&&(this.unlistenSources_(),this.reproject_()))},this);this.sourcesListenerKeys_.push(o)}}.bind(this)),t===0?setTimeout(this.reproject_.bind(this),0):this.sourceTiles_.forEach(function(e,i,s){e.getState()==P.IDLE&&e.load()})}}unlistenSources_(){this.sourcesListenerKeys_.forEach(J),this.sourcesListenerKeys_=null}release(){this.canvas_&&(ih(this.canvas_.getContext("2d")),Dh.push(this.canvas_),this.canvas_=null),super.release()}}const $r=A_;class O_ extends _h{constructor(t){super(t),this.extentChanged=!0,this.renderedExtent_=null,this.renderedPixelRatio,this.renderedProjection=null,this.renderedRevision,this.renderedTiles=[],this.newTiles_=!1,this.tmpExtent=Xt(),this.tmpTileRange_=new Lh(0,0,0,0)}isDrawableTile(t){const e=this.getLayer(),i=t.getState(),s=e.getUseInterimTilesOnError();return i==P.LOADED||i==P.EMPTY||i==P.ERROR&&!s}getTile(t,e,i,s){const r=s.pixelRatio,o=s.viewState.projection,a=this.getLayer();let h=a.getSource().getTile(t,e,i,r,o);return h.getState()==P.ERROR&&a.getUseInterimTilesOnError()&&a.getPreload()>0&&(this.newTiles_=!0),this.isDrawableTile(h)||(h=h.getInterimTile()),h}getData(t){const e=this.frameState;if(!e)return null;const i=this.getLayer(),s=rt(e.pixelToCoordinateTransform,t.slice()),r=i.getExtent();if(r&&!bs(r,s))return null;const o=e.pixelRatio,a=e.viewState.projection,l=e.viewState,h=i.getRenderSource(),c=h.getTileGridForProjection(l.projection),u=h.getTilePixelRatio(e.pixelRatio);for(let d=c.getZForResolution(l.resolution);d>=c.getMinZoom();--d){const f=c.getTileCoordForCoordAndZ(s,d),g=h.getTile(d,f[1],f[2],o,a);if(!(g instanceof xh||g instanceof $r)||g instanceof $r&&g.getState()===P.EMPTY)return null;if(g.getState()!==P.LOADED)continue;const _=c.getOrigin(d),m=St(c.getTileSize(d)),p=c.getResolution(d),E=Math.floor(u*((s[0]-_[0])/p-f[1]*m[0])),v=Math.floor(u*((_[1]-s[1])/p-f[2]*m[1])),y=Math.round(u*h.getGutterForProjection(l.projection));return this.getImageData(g.getImage(),E+y,v+y)}return null}loadedTileCallback(t,e,i){return this.isDrawableTile(i)?super.loadedTileCallback(t,e,i):!1}prepareFrame(t){return!!this.getLayer().getSource()}renderFrame(t,e){const i=t.layerStatesArray[t.layerIndex],s=t.viewState,r=s.projection,o=s.resolution,a=s.center,l=s.rotation,h=t.pixelRatio,c=this.getLayer(),u=c.getSource(),d=u.getRevision(),f=u.getTileGridForProjection(r),g=f.getZForResolution(o,u.zDirection),_=f.getResolution(g);let m=t.extent;const p=t.viewState.resolution,E=u.getTilePixelRatio(h),v=Math.round(q(m)/p*h),y=Math.round(ie(m)/p*h),x=i.extent&&He(i.extent,r);x&&(m=an(m,He(i.extent,r)));const C=_*v/2/E,S=_*y/2/E,R=[a[0]-C,a[1]-S,a[0]+C,a[1]+S],A=f.getTileRangeForExtentAndZ(m,g),O={};O[g]={};const N=this.createLoadedTileFinder(u,r,O),$=this.tmpExtent,D=this.tmpTileRange_;this.newTiles_=!1;const j=l?br(s.center,p,l,t.size):void 0;for(let nt=A.minX;nt<=A.maxX;++nt)for(let G=A.minY;G<=A.maxY;++G){if(l&&!f.tileCoordIntersectsViewport([g,nt,G],j))continue;const Y=this.getTile(g,nt,G,t);if(this.isDrawableTile(Y)){const Z=U(this);if(Y.getState()==P.LOADED){O[g][Y.tileCoord.toString()]=Y;let Tt=Y.inTransition(Z);Tt&&i.opacity!==1&&(Y.endTransition(Z),Tt=!1),!this.newTiles_&&(Tt||!this.renderedTiles.includes(Y))&&(this.newTiles_=!0)}if(Y.getAlpha(Z,t.time)===1)continue}const mt=f.getTileCoordChildTileRange(Y.tileCoord,D,$);let ct=!1;mt&&(ct=N(g+1,mt)),ct||f.forEachTileCoordParentTileRange(Y.tileCoord,N,D,$)}const k=_/o*h/E;Me(this.pixelTransform,t.size[0]/2,t.size[1]/2,1/h,1/h,l,-v/2,-y/2);const I=Al(this.pixelTransform);this.useContainer(e,I,this.getBackground(t));const b=this.context,L=b.canvas;Zr(this.inversePixelTransform,this.pixelTransform),Me(this.tempTransform,v/2,y/2,k,k,0,-v/2,-y/2),L.width!=v||L.height!=y?(L.width=v,L.height=y):this.containerReused||b.clearRect(0,0,v,y),x&&this.clipUnrotated(b,t,x),u.getInterpolate()||(b.imageSmoothingEnabled=!1),this.preRender(b,t),this.renderedTiles.length=0;let X=Object.keys(O).map(Number);X.sort(Ni);let K,Q,w;i.opacity===1&&(!this.containerReused||u.getOpaque(t.viewState.projection))?X=X.reverse():(K=[],Q=[]);for(let nt=X.length-1;nt>=0;--nt){const G=X[nt],Y=u.getTilePixelSize(G,h,r),ct=f.getResolution(G)/_,Z=Y[0]*ct*k,Tt=Y[1]*ct*k,ye=f.getTileCoordForCoordAndZ(ai(R),G),ve=f.getTileCoordExtent(ye),xe=rt(this.tempTransform,[E*(ve[0]-R[0])/_,E*(R[3]-ve[3])/_]),Ge=E*u.getGutterForProjection(r),Kt=O[G];for(const Ye in Kt){const Wt=Kt[Ye],Ve=Wt.tileCoord,ci=ye[1]-Ve[1],ui=Math.round(xe[0]-(ci-1)*Z),pt=ye[2]-Ve[2],Te=Math.round(xe[1]-(pt-1)*Tt),ot=Math.round(xe[0]-ci*Z),ut=Math.round(xe[1]-pt*Tt),dt=ui-ot,Lt=Te-ut,se=g===G,Ut=se&&Wt.getAlpha(U(this),t.time)!==1;let Gt=!1;if(!Ut)if(K){w=[ot,ut,ot+dt,ut,ot+dt,ut+Lt,ot,ut+Lt];for(let di=0,kn=K.length;di<kn;++di)if(g!==G&&G<Q[di]){const ft=K[di];vt([ot,ut,ot+dt,ut+Lt],[ft[0],ft[3],ft[4],ft[7]])&&(Gt||(b.save(),Gt=!0),b.beginPath(),b.moveTo(w[0],w[1]),b.lineTo(w[2],w[3]),b.lineTo(w[4],w[5]),b.lineTo(w[6],w[7]),b.moveTo(ft[6],ft[7]),b.lineTo(ft[4],ft[5]),b.lineTo(ft[2],ft[3]),b.lineTo(ft[0],ft[1]),b.clip())}K.push(w),Q.push(G)}else b.clearRect(ot,ut,dt,Lt);this.drawTileImage(Wt,t,ot,ut,dt,Lt,Ge,se),K&&!Ut?(Gt&&b.restore(),this.renderedTiles.unshift(Wt)):this.renderedTiles.push(Wt),this.updateUsedTiles(t.usedTiles,u,Wt)}}return this.renderedRevision=d,this.renderedResolution=_,this.extentChanged=!this.renderedExtent_||!gn(this.renderedExtent_,R),this.renderedExtent_=R,this.renderedPixelRatio=h,this.renderedProjection=r,this.manageTilePyramid(t,u,f,h,r,m,g,c.getPreload()),this.scheduleExpireCache(t,u),this.postRender(b,t),i.extent&&b.restore(),b.imageSmoothingEnabled=!0,I!==L.style.transform&&(L.style.transform=I),this.container}drawTileImage(t,e,i,s,r,o,a,l){const h=this.getTileImage(t);if(!h)return;const c=U(this),u=e.layerStatesArray[e.layerIndex],d=u.opacity*(l?t.getAlpha(c,e.time):1),f=d!==this.context.globalAlpha;f&&(this.context.save(),this.context.globalAlpha=d),this.context.drawImage(h,a,a,h.width-2*a,h.height-2*a,i,s,r,o),f&&this.context.restore(),d!==u.opacity?e.animate=!0:l&&t.endTransition(c)}getImage(){const t=this.context;return t?t.canvas:null}getTileImage(t){return t.getImage()}scheduleExpireCache(t,e){if(e.canExpireCache()){const i=function(s,r,o){const a=U(s);a in o.usedTiles&&s.expireCache(o.viewState.projection,o.usedTiles[a])}.bind(null,e);t.postRenderFunctions.push(i)}}updateUsedTiles(t,e,i){const s=U(e);s in t||(t[s]={}),t[s][i.getKey()]=!0}manageTilePyramid(t,e,i,s,r,o,a,l,h){const c=U(e);c in t.wantedTiles||(t.wantedTiles[c]={});const u=t.wantedTiles[c],d=t.tileQueue,f=i.getMinZoom(),g=t.viewState.rotation,_=g?br(t.viewState.center,t.viewState.resolution,g,t.size):void 0;let m=0,p,E,v,y,x,C;for(C=f;C<=a;++C)for(E=i.getTileRangeForExtentAndZ(o,C,E),v=i.getResolution(C),y=E.minX;y<=E.maxX;++y)for(x=E.minY;x<=E.maxY;++x)g&&!i.tileCoordIntersectsViewport([C,y,x],_)||(a-C<=l?(++m,p=e.getTile(C,y,x,s,r),p.getState()==P.IDLE&&(u[p.getKey()]=!0,d.isKeyQueued(p.getKey())||d.enqueue([p,c,i.getTileCoordCenter(p.tileCoord),v])),h!==void 0&&h(p)):e.useTile(C,y,x,r));e.updateCacheSize(m,r)}}const L_=O_,Zn={PRELOAD:"preload",USE_INTERIM_TILES_ON_ERROR:"useInterimTilesOnError"},D_=[0,0,0],Re=5;class M_{constructor(t){this.minZoom=t.minZoom!==void 0?t.minZoom:0,this.resolutions_=t.resolutions,V(jc(this.resolutions_,function(s,r){return r-s},!0),17);let e;if(!t.origins){for(let s=0,r=this.resolutions_.length-1;s<r;++s)if(!e)e=this.resolutions_[s]/this.resolutions_[s+1];else if(this.resolutions_[s]/this.resolutions_[s+1]!==e){e=void 0;break}}this.zoomFactor_=e,this.maxZoom=this.resolutions_.length-1,this.origin_=t.origin!==void 0?t.origin:null,this.origins_=null,t.origins!==void 0&&(this.origins_=t.origins,V(this.origins_.length==this.resolutions_.length,20));const i=t.extent;i!==void 0&&!this.origin_&&!this.origins_&&(this.origin_=ai(i)),V(!this.origin_&&this.origins_||this.origin_&&!this.origins_,18),this.tileSizes_=null,t.tileSizes!==void 0&&(this.tileSizes_=t.tileSizes,V(this.tileSizes_.length==this.resolutions_.length,19)),this.tileSize_=t.tileSize!==void 0?t.tileSize:this.tileSizes_?null:Eo,V(!this.tileSize_&&this.tileSizes_||this.tileSize_&&!this.tileSizes_,22),this.extent_=i!==void 0?i:null,this.fullTileRanges_=null,this.tmpSize_=[0,0],this.tmpExtent_=[0,0,0,0],t.sizes!==void 0?this.fullTileRanges_=t.sizes.map(function(s,r){const o=new Lh(Math.min(0,s[0]),Math.max(s[0]-1,-1),Math.min(0,s[1]),Math.max(s[1]-1,-1));if(i){const a=this.getTileRangeForExtentAndZ(i,r);o.minX=Math.max(a.minX,o.minX),o.maxX=Math.min(a.maxX,o.maxX),o.minY=Math.max(a.minY,o.minY),o.maxY=Math.min(a.maxY,o.maxY)}return o},this):i&&this.calculateTileRanges_(i)}forEachTileCoord(t,e,i){const s=this.getTileRangeForExtentAndZ(t,e);for(let r=s.minX,o=s.maxX;r<=o;++r)for(let a=s.minY,l=s.maxY;a<=l;++a)i([e,r,a])}forEachTileCoordParentTileRange(t,e,i,s){let r,o,a,l=null,h=t[0]-1;for(this.zoomFactor_===2?(o=t[1],a=t[2]):l=this.getTileCoordExtent(t,s);h>=this.minZoom;){if(this.zoomFactor_===2?(o=Math.floor(o/2),a=Math.floor(a/2),r=pi(o,o,a,a,i)):r=this.getTileRangeForExtentAndZ(l,h,i),e(h,r))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(this.zoomFactor_===2){const r=t[1]*2,o=t[2]*2;return pi(r,r+1,o,o+1,e)}const s=this.getTileCoordExtent(t,i||this.tmpExtent_);return this.getTileRangeForExtentAndZ(s,t[0]+1,e)}return null}getTileRangeForTileCoordAndZ(t,e,i){if(e>this.maxZoom||e<this.minZoom)return null;const s=t[0],r=t[1],o=t[2];if(e===s)return pi(r,o,r,o,i);if(this.zoomFactor_){const l=Math.pow(this.zoomFactor_,e-s),h=Math.floor(r*l),c=Math.floor(o*l);if(e<s)return pi(h,h,c,c,i);const u=Math.floor(l*(r+1))-1,d=Math.floor(l*(o+1))-1;return pi(h,u,c,d,i)}const a=this.getTileCoordExtent(t,this.tmpExtent_);return this.getTileRangeForExtentAndZ(a,e,i)}getTileRangeExtent(t,e,i){const s=this.getOrigin(t),r=this.getResolution(t),o=St(this.getTileSize(t),this.tmpSize_),a=s[0]+e.minX*o[0]*r,l=s[0]+(e.maxX+1)*o[0]*r,h=s[1]+e.minY*o[1]*r,c=s[1]+(e.maxY+1)*o[1]*r;return ee(a,h,l,c,i)}getTileRangeForExtentAndZ(t,e,i){const s=D_;this.getTileCoordForXYAndZ_(t[0],t[3],e,!1,s);const r=s[1],o=s[2];return this.getTileCoordForXYAndZ_(t[2],t[1],e,!0,s),pi(r,s[1],o,s[2],i)}getTileCoordCenter(t){const e=this.getOrigin(t[0]),i=this.getResolution(t[0]),s=St(this.getTileSize(t[0]),this.tmpSize_);return[e[0]+(t[1]+.5)*s[0]*i,e[1]-(t[2]+.5)*s[1]*i]}getTileCoordExtent(t,e){const i=this.getOrigin(t[0]),s=this.getResolution(t[0]),r=St(this.getTileSize(t[0]),this.tmpSize_),o=i[0]+t[1]*r[0]*s,a=i[1]-(t[2]+1)*r[1]*s,l=o+r[0]*s,h=a+r[1]*s;return ee(o,a,l,h,e)}getTileCoordForCoordAndResolution(t,e,i){return this.getTileCoordForXYAndResolution_(t[0],t[1],e,!1,i)}getTileCoordForXYAndResolution_(t,e,i,s,r){const o=this.getZForResolution(i),a=i/this.getResolution(o),l=this.getOrigin(o),h=St(this.getTileSize(o),this.tmpSize_);let c=a*(t-l[0])/i/h[0],u=a*(l[1]-e)/i/h[1];return s?(c=Xn(c,Re)-1,u=Xn(u,Re)-1):(c=Vn(c,Re),u=Vn(u,Re)),$a(o,c,u,r)}getTileCoordForXYAndZ_(t,e,i,s,r){const o=this.getOrigin(i),a=this.getResolution(i),l=St(this.getTileSize(i),this.tmpSize_);let h=(t-o[0])/a/l[0],c=(o[1]-e)/a/l[1];return s?(h=Xn(h,Re)-1,c=Xn(c,Re)-1):(h=Vn(h,Re),c=Vn(c,Re)),$a(i,h,c,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=Ur(this.resolutions_,t,e||0);return et(i,this.minZoom,this.maxZoom)}tileCoordIntersectsViewport(t,e){return Zl(e,0,e.length,2,this.getTileCoordExtent(t))}calculateTileRanges_(t){const e=this.resolutions_.length,i=new Array(e);for(let s=this.minZoom;s<e;++s)i[s]=this.getTileRangeForExtentAndZ(t,s);this.fullTileRanges_=i}}const Mh=M_,hr={TILELOADSTART:"tileloadstart",TILELOADEND:"tileloadend",TILELOADERROR:"tileloaderror"};function Ph(n){let t=n.getDefaultTileGrid();return t||(t=k_(n),n.setDefaultTileGrid(t)),t}function P_(n,t,e){const i=t[0],s=n.getTileCoordCenter(t),r=So(e);if(bs(r,s))return t;{const o=q(r),a=Math.ceil((r[0]-s[0])/o);return s[0]+=o*a,n.getTileCoordForCoordAndZ(s,i)}}function N_(n,t,e,i){i=i!==void 0?i:"top-left";const s=Nh(n,t,e);return new Mh({extent:n,origin:Eu(n,i),resolutions:s,tileSize:e})}function F_(n){const t=n||{},e=t.extent||Rt("EPSG:3857").getExtent(),i={extent:e,minZoom:t.minZoom,tileSize:t.tileSize,resolutions:Nh(e,t.maxZoom,t.tileSize,t.maxResolution)};return new Mh(i)}function Nh(n,t,e,i){t=t!==void 0?t:_g,e=St(e!==void 0?e:Eo);const s=ie(n),r=q(n);i=i>0?i:Math.max(r/e[0],s/e[1]);const o=t+1,a=new Array(o);for(let l=0;l<o;++l)a[l]=i/Math.pow(2,l);return a}function k_(n,t,e,i){const s=So(n);return N_(s,t,e,i)}function So(n){n=Rt(n);let t=n.getExtent();if(!t){const e=180*ni.degrees/n.getMetersPerUnit();t=ee(-e,-e,e,e)}return t}class $_ extends Eh{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_=t.opaque!==void 0?t.opaque:!1,this.tilePixelRatio_=t.tilePixelRatio!==void 0?t.tilePixelRatio:1,this.tileGrid=t.tileGrid!==void 0?t.tileGrid:null;const e=[256,256];this.tileGrid&&St(this.tileGrid.getTileSize(this.tileGrid.getMinZoom()),e),this.tileCache=new Ah(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,s){const r=this.getTileCacheForProjection(t);if(!r)return!1;let o=!0,a,l,h;for(let c=i.minX;c<=i.maxX;++c)for(let u=i.minY;u<=i.maxY;++u)l=$s(e,c,u),h=!1,r.containsKey(l)&&(a=r.get(l),h=a.getState()===P.LOADED,h&&(h=s(a)!==!1)),h||(o=!1);return o}getGutterForProjection(t){return 0}getKey(){return this.key_}setKey(t){this.key_!==t&&(this.key_=t,this.changed())}getOpaque(t){return this.opaque_}getResolutions(){return this.tileGrid?this.tileGrid.getResolutions():null}getTile(t,e,i,s,r){return B()}getTileGrid(){return this.tileGrid}getTileGridForProjection(t){return this.tileGrid?this.tileGrid:Ph(t)}getTileCacheForProjection(t){const e=this.getProjection();return V(e===null||vi(e,t),68),this.tileCache}getTilePixelRatio(t){return this.tilePixelRatio_}getTilePixelSize(t,e,i){const s=this.getTileGridForProjection(i),r=this.getTilePixelRatio(e),o=St(s.getTileSize(t),this.tmpSize);return r==1?o:_d(o,r,this.tmpSize)}getTileCoordForTileUrlFunction(t,e){e=e!==void 0?e:this.getProjection();const i=this.getTileGridForProjection(e);return this.getWrapX()&&e.isGlobal()&&(t=P_(i,t,e)),v_(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,s){}}class W_ extends pe{constructor(t,e){super(t),this.tile=e}}const G_=$_;function Y_(n,t){const e=/\{z\}/g,i=/\{x\}/g,s=/\{y\}/g,r=/\{-y\}/g;return function(o,a,l){if(o)return n.replace(e,o[0].toString()).replace(i,o[1].toString()).replace(s,o[2].toString()).replace(r,function(){const h=o[0],c=t.getFullTileRange(h);return V(c,55),(c.getHeight()-o[2]-1).toString()})}}function V_(n,t){const e=n.length,i=new Array(e);for(let s=0;s<e;++s)i[s]=Y_(n[s],t);return X_(i)}function X_(n){return n.length===1?n[0]:function(t,e,i){if(t){const s=y_(t),r=Mi(s,n.length);return n[r](t,e,i)}else return}}function z_(n){const t=[];let e=/\{([a-z])-([a-z])\}/.exec(n);if(e){const i=e[1].charCodeAt(0),s=e[2].charCodeAt(0);let r;for(r=i;r<=s;++r)t.push(n.replace(e[0],String.fromCharCode(r)));return t}if(e=/\{(\d+)-(\d+)\}/.exec(n),e){const i=parseInt(e[2],10);for(let s=parseInt(e[1],10);s<=i;s++)t.push(n.replace(e[0],s.toString()));return t}return t.push(n),t}class Ro extends G_{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===Ro.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=U(e),s=e.getState();let r;s==P.LOADING?(this.tileLoadingKeys_[i]=!0,r=hr.TILELOADSTART):i in this.tileLoadingKeys_&&(delete this.tileLoadingKeys_[i],r=s==P.ERROR?hr.TILELOADERROR:s==P.LOADED?hr.TILELOADEND:void 0),r!=null&&this.dispatchEvent(new W_(r,e))}setTileLoadFunction(t){this.tileCache.clear(),this.tileLoadFunction=t,this.changed()}setTileUrlFunction(t,e){this.tileUrlFunction=t,this.tileCache.pruneExceptNewestZ(),typeof e<"u"?this.setKey(e):this.changed()}setUrl(t){const e=z_(t);this.urls=e,this.setUrls(e)}setUrls(t){this.urls=t;const e=t.join(`
|
||
`);this.generateTileUrlFunction_?this.setTileUrlFunction(V_(t,this.tileGrid),e):this.setKey(e)}tileUrlFunction(t,e,i){}useTile(t,e,i){const s=$s(t,e,i);this.tileCache.containsKey(s)&&this.tileCache.get(s)}}const B_=Ro;class K_ extends B_{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:U_,tilePixelRatio:t.tilePixelRatio,tileUrlFunction:t.tileUrlFunction,url:t.url,urls:t.urls,wrapX:t.wrapX,transition:t.transition,interpolate:t.interpolate!==void 0?t.interpolate:!0,key:t.key,attributionsCollapsible:t.attributionsCollapsible,zDirection:t.zDirection}),this.crossOrigin=t.crossOrigin!==void 0?t.crossOrigin:null,this.tileClass=t.tileClass!==void 0?t.tileClass:xh,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 s in this.tileCacheForProjection){const r=this.tileCacheForProjection[s];r.expireCache(r==i?e:{})}}getGutterForProjection(t){return this.getProjection()&&t&&!vi(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&&!vi(this.getProjection(),t)?!1:super.getOpaque(t)}getTileGridForProjection(t){const e=this.getProjection();if(this.tileGrid&&(!e||vi(e,t)))return this.tileGrid;{const i=U(t);return i in this.tileGridForProjection||(this.tileGridForProjection[i]=Ph(t)),this.tileGridForProjection[i]}}getTileCacheForProjection(t){const e=this.getProjection();if(!e||vi(e,t))return this.tileCache;{const i=U(t);return i in this.tileCacheForProjection||(this.tileCacheForProjection[i]=new Ah(this.tileCache.highWaterMark)),this.tileCacheForProjection[i]}}createTile_(t,e,i,s,r,o){const a=[t,e,i],l=this.getTileCoordForTileUrlFunction(a,r),h=l?this.tileUrlFunction(l,s,r):void 0,c=new this.tileClass(a,h!==void 0?P.IDLE:P.EMPTY,h!==void 0?h:"",this.crossOrigin,this.tileLoadFunction,this.tileOptions);return c.key=o,c.addEventListener(W.CHANGE,this.handleTileChange.bind(this)),c}getTile(t,e,i,s,r){const o=this.getProjection();if(!o||!r||vi(o,r))return this.getTileInternal(t,e,i,s,o||r);{const a=this.getTileCacheForProjection(r),l=[t,e,i];let h;const c=bh(l);a.containsKey(c)&&(h=a.get(c));const u=this.getKey();if(h&&h.key==u)return h;{const d=this.getTileGridForProjection(o),f=this.getTileGridForProjection(r),g=this.getTileCoordForTileUrlFunction(l,r),_=new $r(o,d,r,f,l,g,this.getTilePixelRatio(s),this.getGutter(),function(m,p,E,v){return this.getTileInternal(m,p,E,v,o)}.bind(this),this.reprojectionErrorThreshold_,this.renderReprojectionEdges_,this.getInterpolate());return _.key=u,h?(_.interimTile=h,_.refreshInterimChain(),a.replace(c,_)):a.set(c,_),_}}}getTileInternal(t,e,i,s,r){let o=null;const a=$s(t,e,i),l=this.getKey();if(!this.tileCache.containsKey(a))o=this.createTile_(t,e,i,s,r,l),this.tileCache.set(a,o);else if(o=this.tileCache.get(a),o.key!=l){const h=o;o=this.createTile_(t,e,i,s,r,l),h.getState()==P.IDLE?o.interimTile=h.interimTile:o.interimTile=h,o.refreshInterimChain(),this.tileCache.replace(a,o)}return o}setRenderReprojectionEdges(t){if(this.renderReprojectionEdges_!=t){this.renderReprojectionEdges_=t;for(const e in this.tileCacheForProjection)this.tileCacheForProjection[e].clear();this.changed()}}setTileGridForProjection(t,e){const i=Rt(t);if(i){const s=U(i);s in this.tileGridForProjection||(this.tileGridForProjection[s]=e)}}clear(){super.clear();for(const t in this.tileCacheForProjection)this.tileCacheForProjection[t].clear()}}function U_(n,t){n.getImage().src=t}const H_=K_;class j_ extends Fs{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(t.preload!==void 0?t.preload:0),this.setUseInterimTilesOnError(t.useInterimTilesOnError!==void 0?t.useInterimTilesOnError:!0)}getPreload(){return this.get(Zn.PRELOAD)}setPreload(t){this.set(Zn.PRELOAD,t)}getUseInterimTilesOnError(){return this.get(Zn.USE_INTERIM_TILES_ON_ERROR)}setUseInterimTilesOnError(t){this.set(Zn.USE_INTERIM_TILES_ON_ERROR,t)}getData(t){return super.getData(t)}}const Z_=j_;class q_ extends Z_{constructor(t){super(t)}createRenderer(){return new L_(this)}}const J_=q_;class Q_ extends H_{constructor(t){t=t||{};const e=t.projection!==void 0?t.projection:"EPSG:3857",i=t.tileGrid!==void 0?t.tileGrid:F_({extent:So(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:t.wrapX!==void 0?t.wrapX:!0,transition:t.transition,attributionsCollapsible:t.attributionsCollapsible,zDirection:t.zDirection}),this.gutter_=t.gutter!==void 0?t.gutter:0}getGutter(){return this.gutter_}}const tm=Q_,em='© <a href="https://www.openstreetmap.org/copyright" target="_blank">OpenStreetMap</a> contributors.';class im extends tm{constructor(t){t=t||{};let e;t.attributions!==void 0?e=t.attributions:e=[em];const i=t.crossOrigin!==void 0?t.crossOrigin:"anonymous",s=t.url!==void 0?t.url:"https://tile.openstreetmap.org/{z}/{x}/{y}.png";super({attributions:e,attributionsCollapsible:!1,cacheSize:t.cacheSize,crossOrigin:i,interpolate:t.interpolate,maxZoom:t.maxZoom!==void 0?t.maxZoom:19,opaque:t.opaque!==void 0?t.opaque:!0,reprojectionErrorThreshold:t.reprojectionErrorThreshold,tileLoadFunction:t.tileLoadFunction,transition:t.transition,url:s,wrapX:t.wrapX,zDirection:t.zDirection})}}const nm=im;var gt="top",bt="bottom",At="right",_t="left",Ws="auto",Ki=[gt,bt,At,_t],si="start",$i="end",Fh="clippingParents",Io="viewport",Si="popper",kh="reference",Wr=Ki.reduce(function(n,t){return n.concat([t+"-"+si,t+"-"+$i])},[]),bo=[].concat(Ki,[Ws]).reduce(function(n,t){return n.concat([t,t+"-"+si,t+"-"+$i])},[]),$h="beforeRead",Wh="read",Gh="afterRead",Yh="beforeMain",Vh="main",Xh="afterMain",zh="beforeWrite",Bh="write",Kh="afterWrite",Uh=[$h,Wh,Gh,Yh,Vh,Xh,zh,Bh,Kh];function ne(n){return n?(n.nodeName||"").toLowerCase():null}function Ot(n){if(n==null)return window;if(n.toString()!=="[object Window]"){var t=n.ownerDocument;return t&&t.defaultView||window}return n}function ri(n){var t=Ot(n).Element;return n instanceof t||n instanceof Element}function Pt(n){var t=Ot(n).HTMLElement;return n instanceof t||n instanceof HTMLElement}function Ao(n){if(typeof ShadowRoot>"u")return!1;var t=Ot(n).ShadowRoot;return n instanceof t||n instanceof ShadowRoot}function sm(n){var t=n.state;Object.keys(t.elements).forEach(function(e){var i=t.styles[e]||{},s=t.attributes[e]||{},r=t.elements[e];!Pt(r)||!ne(r)||(Object.assign(r.style,i),Object.keys(s).forEach(function(o){var a=s[o];a===!1?r.removeAttribute(o):r.setAttribute(o,a===!0?"":a)}))})}function rm(n){var t=n.state,e={popper:{position:t.options.strategy,left:"0",top:"0",margin:"0"},arrow:{position:"absolute"},reference:{}};return Object.assign(t.elements.popper.style,e.popper),t.styles=e,t.elements.arrow&&Object.assign(t.elements.arrow.style,e.arrow),function(){Object.keys(t.elements).forEach(function(i){var s=t.elements[i],r=t.attributes[i]||{},o=Object.keys(t.styles.hasOwnProperty(i)?t.styles[i]:e[i]),a=o.reduce(function(l,h){return l[h]="",l},{});!Pt(s)||!ne(s)||(Object.assign(s.style,a),Object.keys(r).forEach(function(l){s.removeAttribute(l)}))})}}const Oo={name:"applyStyles",enabled:!0,phase:"write",fn:sm,effect:rm,requires:["computeStyles"]};function Qt(n){return n.split("-")[0]}var ei=Math.max,xs=Math.min,Wi=Math.round;function Gr(){var n=navigator.userAgentData;return n!=null&&n.brands&&Array.isArray(n.brands)?n.brands.map(function(t){return t.brand+"/"+t.version}).join(" "):navigator.userAgent}function Hh(){return!/^((?!chrome|android).)*safari/i.test(Gr())}function Gi(n,t,e){t===void 0&&(t=!1),e===void 0&&(e=!1);var i=n.getBoundingClientRect(),s=1,r=1;t&&Pt(n)&&(s=n.offsetWidth>0&&Wi(i.width)/n.offsetWidth||1,r=n.offsetHeight>0&&Wi(i.height)/n.offsetHeight||1);var o=ri(n)?Ot(n):window,a=o.visualViewport,l=!Hh()&&e,h=(i.left+(l&&a?a.offsetLeft:0))/s,c=(i.top+(l&&a?a.offsetTop:0))/r,u=i.width/s,d=i.height/r;return{width:u,height:d,top:c,right:h+u,bottom:c+d,left:h,x:h,y:c}}function Lo(n){var t=Gi(n),e=n.offsetWidth,i=n.offsetHeight;return Math.abs(t.width-e)<=1&&(e=t.width),Math.abs(t.height-i)<=1&&(i=t.height),{x:n.offsetLeft,y:n.offsetTop,width:e,height:i}}function jh(n,t){var e=t.getRootNode&&t.getRootNode();if(n.contains(t))return!0;if(e&&Ao(e)){var i=t;do{if(i&&n.isSameNode(i))return!0;i=i.parentNode||i.host}while(i)}return!1}function me(n){return Ot(n).getComputedStyle(n)}function om(n){return["table","td","th"].indexOf(ne(n))>=0}function ke(n){return((ri(n)?n.ownerDocument:n.document)||window.document).documentElement}function Gs(n){return ne(n)==="html"?n:n.assignedSlot||n.parentNode||(Ao(n)?n.host:null)||ke(n)}function Va(n){return!Pt(n)||me(n).position==="fixed"?null:n.offsetParent}function am(n){var t=/firefox/i.test(Gr()),e=/Trident/i.test(Gr());if(e&&Pt(n)){var i=me(n);if(i.position==="fixed")return null}var s=Gs(n);for(Ao(s)&&(s=s.host);Pt(s)&&["html","body"].indexOf(ne(s))<0;){var r=me(s);if(r.transform!=="none"||r.perspective!=="none"||r.contain==="paint"||["transform","perspective"].indexOf(r.willChange)!==-1||t&&r.willChange==="filter"||t&&r.filter&&r.filter!=="none")return s;s=s.parentNode}return null}function Dn(n){for(var t=Ot(n),e=Va(n);e&&om(e)&&me(e).position==="static";)e=Va(e);return e&&(ne(e)==="html"||ne(e)==="body"&&me(e).position==="static")?t:e||am(n)||t}function Do(n){return["top","bottom"].indexOf(n)>=0?"x":"y"}function hn(n,t,e){return ei(n,xs(t,e))}function lm(n,t,e){var i=hn(n,t,e);return i>e?e:i}function Zh(){return{top:0,right:0,bottom:0,left:0}}function qh(n){return Object.assign({},Zh(),n)}function Jh(n,t){return t.reduce(function(e,i){return e[i]=n,e},{})}var hm=function(t,e){return t=typeof t=="function"?t(Object.assign({},e.rects,{placement:e.placement})):t,qh(typeof t!="number"?t:Jh(t,Ki))};function cm(n){var t,e=n.state,i=n.name,s=n.options,r=e.elements.arrow,o=e.modifiersData.popperOffsets,a=Qt(e.placement),l=Do(a),h=[_t,At].indexOf(a)>=0,c=h?"height":"width";if(!(!r||!o)){var u=hm(s.padding,e),d=Lo(r),f=l==="y"?gt:_t,g=l==="y"?bt:At,_=e.rects.reference[c]+e.rects.reference[l]-o[l]-e.rects.popper[c],m=o[l]-e.rects.reference[l],p=Dn(r),E=p?l==="y"?p.clientHeight||0:p.clientWidth||0:0,v=_/2-m/2,y=u[f],x=E-d[c]-u[g],C=E/2-d[c]/2+v,S=hn(y,C,x),R=l;e.modifiersData[i]=(t={},t[R]=S,t.centerOffset=S-C,t)}}function um(n){var t=n.state,e=n.options,i=e.element,s=i===void 0?"[data-popper-arrow]":i;s!=null&&(typeof s=="string"&&(s=t.elements.popper.querySelector(s),!s)||jh(t.elements.popper,s)&&(t.elements.arrow=s))}const Qh={name:"arrow",enabled:!0,phase:"main",fn:cm,effect:um,requires:["popperOffsets"],requiresIfExists:["preventOverflow"]};function Yi(n){return n.split("-")[1]}var dm={top:"auto",right:"auto",bottom:"auto",left:"auto"};function fm(n,t){var e=n.x,i=n.y,s=t.devicePixelRatio||1;return{x:Wi(e*s)/s||0,y:Wi(i*s)/s||0}}function Xa(n){var t,e=n.popper,i=n.popperRect,s=n.placement,r=n.variation,o=n.offsets,a=n.position,l=n.gpuAcceleration,h=n.adaptive,c=n.roundOffsets,u=n.isFixed,d=o.x,f=d===void 0?0:d,g=o.y,_=g===void 0?0:g,m=typeof c=="function"?c({x:f,y:_}):{x:f,y:_};f=m.x,_=m.y;var p=o.hasOwnProperty("x"),E=o.hasOwnProperty("y"),v=_t,y=gt,x=window;if(h){var C=Dn(e),S="clientHeight",R="clientWidth";if(C===Ot(e)&&(C=ke(e),me(C).position!=="static"&&a==="absolute"&&(S="scrollHeight",R="scrollWidth")),C=C,s===gt||(s===_t||s===At)&&r===$i){y=bt;var A=u&&C===x&&x.visualViewport?x.visualViewport.height:C[S];_-=A-i.height,_*=l?1:-1}if(s===_t||(s===gt||s===bt)&&r===$i){v=At;var O=u&&C===x&&x.visualViewport?x.visualViewport.width:C[R];f-=O-i.width,f*=l?1:-1}}var N=Object.assign({position:a},h&&dm),$=c===!0?fm({x:f,y:_},Ot(e)):{x:f,y:_};if(f=$.x,_=$.y,l){var D;return Object.assign({},N,(D={},D[y]=E?"0":"",D[v]=p?"0":"",D.transform=(x.devicePixelRatio||1)<=1?"translate("+f+"px, "+_+"px)":"translate3d("+f+"px, "+_+"px, 0)",D))}return Object.assign({},N,(t={},t[y]=E?_+"px":"",t[v]=p?f+"px":"",t.transform="",t))}function gm(n){var t=n.state,e=n.options,i=e.gpuAcceleration,s=i===void 0?!0:i,r=e.adaptive,o=r===void 0?!0:r,a=e.roundOffsets,l=a===void 0?!0:a,h={placement:Qt(t.placement),variation:Yi(t.placement),popper:t.elements.popper,popperRect:t.rects.popper,gpuAcceleration:s,isFixed:t.options.strategy==="fixed"};t.modifiersData.popperOffsets!=null&&(t.styles.popper=Object.assign({},t.styles.popper,Xa(Object.assign({},h,{offsets:t.modifiersData.popperOffsets,position:t.options.strategy,adaptive:o,roundOffsets:l})))),t.modifiersData.arrow!=null&&(t.styles.arrow=Object.assign({},t.styles.arrow,Xa(Object.assign({},h,{offsets:t.modifiersData.arrow,position:"absolute",adaptive:!1,roundOffsets:l})))),t.attributes.popper=Object.assign({},t.attributes.popper,{"data-popper-placement":t.placement})}const Mo={name:"computeStyles",enabled:!0,phase:"beforeWrite",fn:gm,data:{}};var qn={passive:!0};function _m(n){var t=n.state,e=n.instance,i=n.options,s=i.scroll,r=s===void 0?!0:s,o=i.resize,a=o===void 0?!0:o,l=Ot(t.elements.popper),h=[].concat(t.scrollParents.reference,t.scrollParents.popper);return r&&h.forEach(function(c){c.addEventListener("scroll",e.update,qn)}),a&&l.addEventListener("resize",e.update,qn),function(){r&&h.forEach(function(c){c.removeEventListener("scroll",e.update,qn)}),a&&l.removeEventListener("resize",e.update,qn)}}const Po={name:"eventListeners",enabled:!0,phase:"write",fn:function(){},effect:_m,data:{}};var mm={left:"right",right:"left",bottom:"top",top:"bottom"};function rs(n){return n.replace(/left|right|bottom|top/g,function(t){return mm[t]})}var pm={start:"end",end:"start"};function za(n){return n.replace(/start|end/g,function(t){return pm[t]})}function No(n){var t=Ot(n),e=t.pageXOffset,i=t.pageYOffset;return{scrollLeft:e,scrollTop:i}}function Fo(n){return Gi(ke(n)).left+No(n).scrollLeft}function Em(n,t){var e=Ot(n),i=ke(n),s=e.visualViewport,r=i.clientWidth,o=i.clientHeight,a=0,l=0;if(s){r=s.width,o=s.height;var h=Hh();(h||!h&&t==="fixed")&&(a=s.offsetLeft,l=s.offsetTop)}return{width:r,height:o,x:a+Fo(n),y:l}}function ym(n){var t,e=ke(n),i=No(n),s=(t=n.ownerDocument)==null?void 0:t.body,r=ei(e.scrollWidth,e.clientWidth,s?s.scrollWidth:0,s?s.clientWidth:0),o=ei(e.scrollHeight,e.clientHeight,s?s.scrollHeight:0,s?s.clientHeight:0),a=-i.scrollLeft+Fo(n),l=-i.scrollTop;return me(s||e).direction==="rtl"&&(a+=ei(e.clientWidth,s?s.clientWidth:0)-r),{width:r,height:o,x:a,y:l}}function ko(n){var t=me(n),e=t.overflow,i=t.overflowX,s=t.overflowY;return/auto|scroll|overlay|hidden/.test(e+s+i)}function tc(n){return["html","body","#document"].indexOf(ne(n))>=0?n.ownerDocument.body:Pt(n)&&ko(n)?n:tc(Gs(n))}function cn(n,t){var e;t===void 0&&(t=[]);var i=tc(n),s=i===((e=n.ownerDocument)==null?void 0:e.body),r=Ot(i),o=s?[r].concat(r.visualViewport||[],ko(i)?i:[]):i,a=t.concat(o);return s?a:a.concat(cn(Gs(o)))}function Yr(n){return Object.assign({},n,{left:n.x,top:n.y,right:n.x+n.width,bottom:n.y+n.height})}function vm(n,t){var e=Gi(n,!1,t==="fixed");return e.top=e.top+n.clientTop,e.left=e.left+n.clientLeft,e.bottom=e.top+n.clientHeight,e.right=e.left+n.clientWidth,e.width=n.clientWidth,e.height=n.clientHeight,e.x=e.left,e.y=e.top,e}function Ba(n,t,e){return t===Io?Yr(Em(n,e)):ri(t)?vm(t,e):Yr(ym(ke(n)))}function xm(n){var t=cn(Gs(n)),e=["absolute","fixed"].indexOf(me(n).position)>=0,i=e&&Pt(n)?Dn(n):n;return ri(i)?t.filter(function(s){return ri(s)&&jh(s,i)&&ne(s)!=="body"}):[]}function Tm(n,t,e,i){var s=t==="clippingParents"?xm(n):[].concat(t),r=[].concat(s,[e]),o=r[0],a=r.reduce(function(l,h){var c=Ba(n,h,i);return l.top=ei(c.top,l.top),l.right=xs(c.right,l.right),l.bottom=xs(c.bottom,l.bottom),l.left=ei(c.left,l.left),l},Ba(n,o,i));return a.width=a.right-a.left,a.height=a.bottom-a.top,a.x=a.left,a.y=a.top,a}function ec(n){var t=n.reference,e=n.element,i=n.placement,s=i?Qt(i):null,r=i?Yi(i):null,o=t.x+t.width/2-e.width/2,a=t.y+t.height/2-e.height/2,l;switch(s){case gt:l={x:o,y:t.y-e.height};break;case bt:l={x:o,y:t.y+t.height};break;case At:l={x:t.x+t.width,y:a};break;case _t:l={x:t.x-e.width,y:a};break;default:l={x:t.x,y:t.y}}var h=s?Do(s):null;if(h!=null){var c=h==="y"?"height":"width";switch(r){case si:l[h]=l[h]-(t[c]/2-e[c]/2);break;case $i:l[h]=l[h]+(t[c]/2-e[c]/2);break}}return l}function Vi(n,t){t===void 0&&(t={});var e=t,i=e.placement,s=i===void 0?n.placement:i,r=e.strategy,o=r===void 0?n.strategy:r,a=e.boundary,l=a===void 0?Fh:a,h=e.rootBoundary,c=h===void 0?Io:h,u=e.elementContext,d=u===void 0?Si:u,f=e.altBoundary,g=f===void 0?!1:f,_=e.padding,m=_===void 0?0:_,p=qh(typeof m!="number"?m:Jh(m,Ki)),E=d===Si?kh:Si,v=n.rects.popper,y=n.elements[g?E:d],x=Tm(ri(y)?y:y.contextElement||ke(n.elements.popper),l,c,o),C=Gi(n.elements.reference),S=ec({reference:C,element:v,strategy:"absolute",placement:s}),R=Yr(Object.assign({},v,S)),A=d===Si?R:C,O={top:x.top-A.top+p.top,bottom:A.bottom-x.bottom+p.bottom,left:x.left-A.left+p.left,right:A.right-x.right+p.right},N=n.modifiersData.offset;if(d===Si&&N){var $=N[s];Object.keys(O).forEach(function(D){var j=[At,bt].indexOf(D)>=0?1:-1,k=[gt,bt].indexOf(D)>=0?"y":"x";O[D]+=$[k]*j})}return O}function Cm(n,t){t===void 0&&(t={});var e=t,i=e.placement,s=e.boundary,r=e.rootBoundary,o=e.padding,a=e.flipVariations,l=e.allowedAutoPlacements,h=l===void 0?bo:l,c=Yi(i),u=c?a?Wr:Wr.filter(function(g){return Yi(g)===c}):Ki,d=u.filter(function(g){return h.indexOf(g)>=0});d.length===0&&(d=u);var f=d.reduce(function(g,_){return g[_]=Vi(n,{placement:_,boundary:s,rootBoundary:r,padding:o})[Qt(_)],g},{});return Object.keys(f).sort(function(g,_){return f[g]-f[_]})}function wm(n){if(Qt(n)===Ws)return[];var t=rs(n);return[za(n),t,za(t)]}function Sm(n){var t=n.state,e=n.options,i=n.name;if(!t.modifiersData[i]._skip){for(var s=e.mainAxis,r=s===void 0?!0:s,o=e.altAxis,a=o===void 0?!0:o,l=e.fallbackPlacements,h=e.padding,c=e.boundary,u=e.rootBoundary,d=e.altBoundary,f=e.flipVariations,g=f===void 0?!0:f,_=e.allowedAutoPlacements,m=t.options.placement,p=Qt(m),E=p===m,v=l||(E||!g?[rs(m)]:wm(m)),y=[m].concat(v).reduce(function(G,Y){return G.concat(Qt(Y)===Ws?Cm(t,{placement:Y,boundary:c,rootBoundary:u,padding:h,flipVariations:g,allowedAutoPlacements:_}):Y)},[]),x=t.rects.reference,C=t.rects.popper,S=new Map,R=!0,A=y[0],O=0;O<y.length;O++){var N=y[O],$=Qt(N),D=Yi(N)===si,j=[gt,bt].indexOf($)>=0,k=j?"width":"height",I=Vi(t,{placement:N,boundary:c,rootBoundary:u,altBoundary:d,padding:h}),b=j?D?At:_t:D?bt:gt;x[k]>C[k]&&(b=rs(b));var L=rs(b),X=[];if(r&&X.push(I[$]<=0),a&&X.push(I[b]<=0,I[L]<=0),X.every(function(G){return G})){A=N,R=!1;break}S.set(N,X)}if(R)for(var K=g?3:1,Q=function(Y){var mt=y.find(function(ct){var Z=S.get(ct);if(Z)return Z.slice(0,Y).every(function(Tt){return Tt})});if(mt)return A=mt,"break"},w=K;w>0;w--){var nt=Q(w);if(nt==="break")break}t.placement!==A&&(t.modifiersData[i]._skip=!0,t.placement=A,t.reset=!0)}}const ic={name:"flip",enabled:!0,phase:"main",fn:Sm,requiresIfExists:["offset"],data:{_skip:!1}};function Ka(n,t,e){return e===void 0&&(e={x:0,y:0}),{top:n.top-t.height-e.y,right:n.right-t.width+e.x,bottom:n.bottom-t.height+e.y,left:n.left-t.width-e.x}}function Ua(n){return[gt,At,bt,_t].some(function(t){return n[t]>=0})}function Rm(n){var t=n.state,e=n.name,i=t.rects.reference,s=t.rects.popper,r=t.modifiersData.preventOverflow,o=Vi(t,{elementContext:"reference"}),a=Vi(t,{altBoundary:!0}),l=Ka(o,i),h=Ka(a,s,r),c=Ua(l),u=Ua(h);t.modifiersData[e]={referenceClippingOffsets:l,popperEscapeOffsets:h,isReferenceHidden:c,hasPopperEscaped:u},t.attributes.popper=Object.assign({},t.attributes.popper,{"data-popper-reference-hidden":c,"data-popper-escaped":u})}const nc={name:"hide",enabled:!0,phase:"main",requiresIfExists:["preventOverflow"],fn:Rm};function Im(n,t,e){var i=Qt(n),s=[_t,gt].indexOf(i)>=0?-1:1,r=typeof e=="function"?e(Object.assign({},t,{placement:n})):e,o=r[0],a=r[1];return o=o||0,a=(a||0)*s,[_t,At].indexOf(i)>=0?{x:a,y:o}:{x:o,y:a}}function bm(n){var t=n.state,e=n.options,i=n.name,s=e.offset,r=s===void 0?[0,0]:s,o=bo.reduce(function(c,u){return c[u]=Im(u,t.rects,r),c},{}),a=o[t.placement],l=a.x,h=a.y;t.modifiersData.popperOffsets!=null&&(t.modifiersData.popperOffsets.x+=l,t.modifiersData.popperOffsets.y+=h),t.modifiersData[i]=o}const sc={name:"offset",enabled:!0,phase:"main",requires:["popperOffsets"],fn:bm};function Am(n){var t=n.state,e=n.name;t.modifiersData[e]=ec({reference:t.rects.reference,element:t.rects.popper,strategy:"absolute",placement:t.placement})}const $o={name:"popperOffsets",enabled:!0,phase:"read",fn:Am,data:{}};function Om(n){return n==="x"?"y":"x"}function Lm(n){var t=n.state,e=n.options,i=n.name,s=e.mainAxis,r=s===void 0?!0:s,o=e.altAxis,a=o===void 0?!1:o,l=e.boundary,h=e.rootBoundary,c=e.altBoundary,u=e.padding,d=e.tether,f=d===void 0?!0:d,g=e.tetherOffset,_=g===void 0?0:g,m=Vi(t,{boundary:l,rootBoundary:h,padding:u,altBoundary:c}),p=Qt(t.placement),E=Yi(t.placement),v=!E,y=Do(p),x=Om(y),C=t.modifiersData.popperOffsets,S=t.rects.reference,R=t.rects.popper,A=typeof _=="function"?_(Object.assign({},t.rects,{placement:t.placement})):_,O=typeof A=="number"?{mainAxis:A,altAxis:A}:Object.assign({mainAxis:0,altAxis:0},A),N=t.modifiersData.offset?t.modifiersData.offset[t.placement]:null,$={x:0,y:0};if(C){if(r){var D,j=y==="y"?gt:_t,k=y==="y"?bt:At,I=y==="y"?"height":"width",b=C[y],L=b+m[j],X=b-m[k],K=f?-R[I]/2:0,Q=E===si?S[I]:R[I],w=E===si?-R[I]:-S[I],nt=t.elements.arrow,G=f&&nt?Lo(nt):{width:0,height:0},Y=t.modifiersData["arrow#persistent"]?t.modifiersData["arrow#persistent"].padding:Zh(),mt=Y[j],ct=Y[k],Z=hn(0,S[I],G[I]),Tt=v?S[I]/2-K-Z-mt-O.mainAxis:Q-Z-mt-O.mainAxis,ye=v?-S[I]/2+K+Z+ct+O.mainAxis:w+Z+ct+O.mainAxis,ve=t.elements.arrow&&Dn(t.elements.arrow),xe=ve?y==="y"?ve.clientTop||0:ve.clientLeft||0:0,Ge=(D=N==null?void 0:N[y])!=null?D:0,Kt=b+Tt-Ge-xe,Ye=b+ye-Ge,Wt=hn(f?xs(L,Kt):L,b,f?ei(X,Ye):X);C[y]=Wt,$[y]=Wt-b}if(a){var Ve,ci=y==="x"?gt:_t,ui=y==="x"?bt:At,pt=C[x],Te=x==="y"?"height":"width",ot=pt+m[ci],ut=pt-m[ui],dt=[gt,_t].indexOf(p)!==-1,Lt=(Ve=N==null?void 0:N[x])!=null?Ve:0,se=dt?ot:pt-S[Te]-R[Te]-Lt+O.altAxis,Ut=dt?pt+S[Te]+R[Te]-Lt-O.altAxis:ut,Gt=f&&dt?lm(se,pt,Ut):hn(f?se:ot,pt,f?Ut:ut);C[x]=Gt,$[x]=Gt-pt}t.modifiersData[i]=$}}const rc={name:"preventOverflow",enabled:!0,phase:"main",fn:Lm,requiresIfExists:["offset"]};function Dm(n){return{scrollLeft:n.scrollLeft,scrollTop:n.scrollTop}}function Mm(n){return n===Ot(n)||!Pt(n)?No(n):Dm(n)}function Pm(n){var t=n.getBoundingClientRect(),e=Wi(t.width)/n.offsetWidth||1,i=Wi(t.height)/n.offsetHeight||1;return e!==1||i!==1}function Nm(n,t,e){e===void 0&&(e=!1);var i=Pt(t),s=Pt(t)&&Pm(t),r=ke(t),o=Gi(n,s,e),a={scrollLeft:0,scrollTop:0},l={x:0,y:0};return(i||!i&&!e)&&((ne(t)!=="body"||ko(r))&&(a=Mm(t)),Pt(t)?(l=Gi(t,!0),l.x+=t.clientLeft,l.y+=t.clientTop):r&&(l.x=Fo(r))),{x:o.left+a.scrollLeft-l.x,y:o.top+a.scrollTop-l.y,width:o.width,height:o.height}}function Fm(n){var t=new Map,e=new Set,i=[];n.forEach(function(r){t.set(r.name,r)});function s(r){e.add(r.name);var o=[].concat(r.requires||[],r.requiresIfExists||[]);o.forEach(function(a){if(!e.has(a)){var l=t.get(a);l&&s(l)}}),i.push(r)}return n.forEach(function(r){e.has(r.name)||s(r)}),i}function km(n){var t=Fm(n);return Uh.reduce(function(e,i){return e.concat(t.filter(function(s){return s.phase===i}))},[])}function $m(n){var t;return function(){return t||(t=new Promise(function(e){Promise.resolve().then(function(){t=void 0,e(n())})})),t}}function Wm(n){var t=n.reduce(function(e,i){var s=e[i.name];return e[i.name]=s?Object.assign({},s,i,{options:Object.assign({},s.options,i.options),data:Object.assign({},s.data,i.data)}):i,e},{});return Object.keys(t).map(function(e){return t[e]})}var Ha={placement:"bottom",modifiers:[],strategy:"absolute"};function ja(){for(var n=arguments.length,t=new Array(n),e=0;e<n;e++)t[e]=arguments[e];return!t.some(function(i){return!(i&&typeof i.getBoundingClientRect=="function")})}function Ys(n){n===void 0&&(n={});var t=n,e=t.defaultModifiers,i=e===void 0?[]:e,s=t.defaultOptions,r=s===void 0?Ha:s;return function(a,l,h){h===void 0&&(h=r);var c={placement:"bottom",orderedModifiers:[],options:Object.assign({},Ha,r),modifiersData:{},elements:{reference:a,popper:l},attributes:{},styles:{}},u=[],d=!1,f={state:c,setOptions:function(p){var E=typeof p=="function"?p(c.options):p;_(),c.options=Object.assign({},r,c.options,E),c.scrollParents={reference:ri(a)?cn(a):a.contextElement?cn(a.contextElement):[],popper:cn(l)};var v=km(Wm([].concat(i,c.options.modifiers)));return c.orderedModifiers=v.filter(function(y){return y.enabled}),g(),f.update()},forceUpdate:function(){if(!d){var p=c.elements,E=p.reference,v=p.popper;if(ja(E,v)){c.rects={reference:Nm(E,Dn(v),c.options.strategy==="fixed"),popper:Lo(v)},c.reset=!1,c.placement=c.options.placement,c.orderedModifiers.forEach(function(O){return c.modifiersData[O.name]=Object.assign({},O.data)});for(var y=0;y<c.orderedModifiers.length;y++){if(c.reset===!0){c.reset=!1,y=-1;continue}var x=c.orderedModifiers[y],C=x.fn,S=x.options,R=S===void 0?{}:S,A=x.name;typeof C=="function"&&(c=C({state:c,options:R,name:A,instance:f})||c)}}}},update:$m(function(){return new Promise(function(m){f.forceUpdate(),m(c)})}),destroy:function(){_(),d=!0}};if(!ja(a,l))return f;f.setOptions(h).then(function(m){!d&&h.onFirstUpdate&&h.onFirstUpdate(m)});function g(){c.orderedModifiers.forEach(function(m){var p=m.name,E=m.options,v=E===void 0?{}:E,y=m.effect;if(typeof y=="function"){var x=y({state:c,name:p,instance:f,options:v}),C=function(){};u.push(x||C)}})}function _(){u.forEach(function(m){return m()}),u=[]}return f}}var Gm=Ys(),Ym=[Po,$o,Mo,Oo],Vm=Ys({defaultModifiers:Ym}),Xm=[Po,$o,Mo,Oo,sc,ic,rc,Qh,nc],Wo=Ys({defaultModifiers:Xm});const oc=Object.freeze(Object.defineProperty({__proto__:null,afterMain:Xh,afterRead:Gh,afterWrite:Kh,applyStyles:Oo,arrow:Qh,auto:Ws,basePlacements:Ki,beforeMain:Yh,beforeRead:$h,beforeWrite:zh,bottom:bt,clippingParents:Fh,computeStyles:Mo,createPopper:Wo,createPopperBase:Gm,createPopperLite:Vm,detectOverflow:Vi,end:$i,eventListeners:Po,flip:ic,hide:nc,left:_t,main:Vh,modifierPhases:Uh,offset:sc,placements:bo,popper:Si,popperGenerator:Ys,popperOffsets:$o,preventOverflow:rc,read:Wh,reference:kh,right:At,start:si,top:gt,variationPlacements:Wr,viewport:Io,write:Bh},Symbol.toStringTag,{value:"Module"}));/*!
|
||
* Bootstrap v5.3.2 (https://getbootstrap.com/)
|
||
* Copyright 2011-2023 The Bootstrap Authors (https://github.com/twbs/bootstrap/graphs/contributors)
|
||
* Licensed under MIT (https://github.com/twbs/bootstrap/blob/main/LICENSE)
|
||
*/const Ie=new Map,cr={set(n,t,e){Ie.has(n)||Ie.set(n,new Map);const i=Ie.get(n);if(!i.has(t)&&i.size!==0){console.error(`Bootstrap doesn't allow more than one instance per element. Bound instance: ${Array.from(i.keys())[0]}.`);return}i.set(t,e)},get(n,t){return Ie.has(n)&&Ie.get(n).get(t)||null},remove(n,t){if(!Ie.has(n))return;const e=Ie.get(n);e.delete(t),e.size===0&&Ie.delete(n)}},zm=1e6,Bm=1e3,Vr="transitionend",ac=n=>(n&&window.CSS&&window.CSS.escape&&(n=n.replace(/#([^\s"#']+)/g,(t,e)=>`#${CSS.escape(e)}`)),n),Km=n=>n==null?`${n}`:Object.prototype.toString.call(n).match(/\s([a-z]+)/i)[1].toLowerCase(),Um=n=>{do n+=Math.floor(Math.random()*zm);while(document.getElementById(n));return n},Hm=n=>{if(!n)return 0;let{transitionDuration:t,transitionDelay:e}=window.getComputedStyle(n);const i=Number.parseFloat(t),s=Number.parseFloat(e);return!i&&!s?0:(t=t.split(",")[0],e=e.split(",")[0],(Number.parseFloat(t)+Number.parseFloat(e))*Bm)},lc=n=>{n.dispatchEvent(new Event(Vr))},ge=n=>!n||typeof n!="object"?!1:(typeof n.jquery<"u"&&(n=n[0]),typeof n.nodeType<"u"),Pe=n=>ge(n)?n.jquery?n[0]:n:typeof n=="string"&&n.length>0?document.querySelector(ac(n)):null,Ui=n=>{if(!ge(n)||n.getClientRects().length===0)return!1;const t=getComputedStyle(n).getPropertyValue("visibility")==="visible",e=n.closest("details:not([open])");if(!e)return t;if(e!==n){const i=n.closest("summary");if(i&&i.parentNode!==e||i===null)return!1}return t},Ne=n=>!n||n.nodeType!==Node.ELEMENT_NODE||n.classList.contains("disabled")?!0:typeof n.disabled<"u"?n.disabled:n.hasAttribute("disabled")&&n.getAttribute("disabled")!=="false",hc=n=>{if(!document.documentElement.attachShadow)return null;if(typeof n.getRootNode=="function"){const t=n.getRootNode();return t instanceof ShadowRoot?t:null}return n instanceof ShadowRoot?n:n.parentNode?hc(n.parentNode):null},Ts=()=>{},Mn=n=>{n.offsetHeight},cc=()=>window.jQuery&&!document.body.hasAttribute("data-bs-no-jquery")?window.jQuery:null,ur=[],jm=n=>{document.readyState==="loading"?(ur.length||document.addEventListener("DOMContentLoaded",()=>{for(const t of ur)t()}),ur.push(n)):n()},Ft=()=>document.documentElement.dir==="rtl",$t=n=>{jm(()=>{const t=cc();if(t){const e=n.NAME,i=t.fn[e];t.fn[e]=n.jQueryInterface,t.fn[e].Constructor=n,t.fn[e].noConflict=()=>(t.fn[e]=i,n.jQueryInterface)}})},xt=(n,t=[],e=n)=>typeof n=="function"?n(...t):e,uc=(n,t,e=!0)=>{if(!e){xt(n);return}const i=5,s=Hm(t)+i;let r=!1;const o=({target:a})=>{a===t&&(r=!0,t.removeEventListener(Vr,o),xt(n))};t.addEventListener(Vr,o),setTimeout(()=>{r||lc(t)},s)},Go=(n,t,e,i)=>{const s=n.length;let r=n.indexOf(t);return r===-1?!e&&i?n[s-1]:n[0]:(r+=e?1:-1,i&&(r=(r+s)%s),n[Math.max(0,Math.min(r,s-1))])},Zm=/[^.]*(?=\..*)\.|.*/,qm=/\..*/,Jm=/::\d+$/,dr={};let Za=1;const dc={mouseenter:"mouseover",mouseleave:"mouseout"},Qm=new Set(["click","dblclick","mouseup","mousedown","contextmenu","mousewheel","DOMMouseScroll","mouseover","mouseout","mousemove","selectstart","selectend","keydown","keypress","keyup","orientationchange","touchstart","touchmove","touchend","touchcancel","pointerdown","pointermove","pointerup","pointerleave","pointercancel","gesturestart","gesturechange","gestureend","focus","blur","change","reset","select","submit","focusin","focusout","load","unload","beforeunload","resize","move","DOMContentLoaded","readystatechange","error","abort","scroll"]);function fc(n,t){return t&&`${t}::${Za++}`||n.uidEvent||Za++}function gc(n){const t=fc(n);return n.uidEvent=t,dr[t]=dr[t]||{},dr[t]}function tp(n,t){return function e(i){return Yo(i,{delegateTarget:n}),e.oneOff&&T.off(n,i.type,t),t.apply(n,[i])}}function ep(n,t,e){return function i(s){const r=n.querySelectorAll(t);for(let{target:o}=s;o&&o!==this;o=o.parentNode)for(const a of r)if(a===o)return Yo(s,{delegateTarget:o}),i.oneOff&&T.off(n,s.type,t,e),e.apply(o,[s])}}function _c(n,t,e=null){return Object.values(n).find(i=>i.callable===t&&i.delegationSelector===e)}function mc(n,t,e){const i=typeof t=="string",s=i?e:t||e;let r=pc(n);return Qm.has(r)||(r=n),[i,s,r]}function qa(n,t,e,i,s){if(typeof t!="string"||!n)return;let[r,o,a]=mc(t,e,i);t in dc&&(o=(g=>function(_){if(!_.relatedTarget||_.relatedTarget!==_.delegateTarget&&!_.delegateTarget.contains(_.relatedTarget))return g.call(this,_)})(o));const l=gc(n),h=l[a]||(l[a]={}),c=_c(h,o,r?e:null);if(c){c.oneOff=c.oneOff&&s;return}const u=fc(o,t.replace(Zm,"")),d=r?ep(n,e,o):tp(n,o);d.delegationSelector=r?e:null,d.callable=o,d.oneOff=s,d.uidEvent=u,h[u]=d,n.addEventListener(a,d,r)}function Xr(n,t,e,i,s){const r=_c(t[e],i,s);r&&(n.removeEventListener(e,r,Boolean(s)),delete t[e][r.uidEvent])}function ip(n,t,e,i){const s=t[e]||{};for(const[r,o]of Object.entries(s))r.includes(i)&&Xr(n,t,e,o.callable,o.delegationSelector)}function pc(n){return n=n.replace(qm,""),dc[n]||n}const T={on(n,t,e,i){qa(n,t,e,i,!1)},one(n,t,e,i){qa(n,t,e,i,!0)},off(n,t,e,i){if(typeof t!="string"||!n)return;const[s,r,o]=mc(t,e,i),a=o!==t,l=gc(n),h=l[o]||{},c=t.startsWith(".");if(typeof r<"u"){if(!Object.keys(h).length)return;Xr(n,l,o,r,s?e:null);return}if(c)for(const u of Object.keys(l))ip(n,l,u,t.slice(1));for(const[u,d]of Object.entries(h)){const f=u.replace(Jm,"");(!a||t.includes(f))&&Xr(n,l,o,d.callable,d.delegationSelector)}},trigger(n,t,e){if(typeof t!="string"||!n)return null;const i=cc(),s=pc(t),r=t!==s;let o=null,a=!0,l=!0,h=!1;r&&i&&(o=i.Event(t,e),i(n).trigger(o),a=!o.isPropagationStopped(),l=!o.isImmediatePropagationStopped(),h=o.isDefaultPrevented());const c=Yo(new Event(t,{bubbles:a,cancelable:!0}),e);return h&&c.preventDefault(),l&&n.dispatchEvent(c),c.defaultPrevented&&o&&o.preventDefault(),c}};function Yo(n,t={}){for(const[e,i]of Object.entries(t))try{n[e]=i}catch{Object.defineProperty(n,e,{configurable:!0,get(){return i}})}return n}function Ja(n){if(n==="true")return!0;if(n==="false")return!1;if(n===Number(n).toString())return Number(n);if(n===""||n==="null")return null;if(typeof n!="string")return n;try{return JSON.parse(decodeURIComponent(n))}catch{return n}}function fr(n){return n.replace(/[A-Z]/g,t=>`-${t.toLowerCase()}`)}const _e={setDataAttribute(n,t,e){n.setAttribute(`data-bs-${fr(t)}`,e)},removeDataAttribute(n,t){n.removeAttribute(`data-bs-${fr(t)}`)},getDataAttributes(n){if(!n)return{};const t={},e=Object.keys(n.dataset).filter(i=>i.startsWith("bs")&&!i.startsWith("bsConfig"));for(const i of e){let s=i.replace(/^bs/,"");s=s.charAt(0).toLowerCase()+s.slice(1,s.length),t[s]=Ja(n.dataset[i])}return t},getDataAttribute(n,t){return Ja(n.getAttribute(`data-bs-${fr(t)}`))}};class Pn{static get Default(){return{}}static get DefaultType(){return{}}static get NAME(){throw new Error('You have to implement the static method "NAME", for each component!')}_getConfig(t){return t=this._mergeConfigObj(t),t=this._configAfterMerge(t),this._typeCheckConfig(t),t}_configAfterMerge(t){return t}_mergeConfigObj(t,e){const i=ge(e)?_e.getDataAttribute(e,"config"):{};return{...this.constructor.Default,...typeof i=="object"?i:{},...ge(e)?_e.getDataAttributes(e):{},...typeof t=="object"?t:{}}}_typeCheckConfig(t,e=this.constructor.DefaultType){for(const[i,s]of Object.entries(e)){const r=t[i],o=ge(r)?"element":Km(r);if(!new RegExp(s).test(o))throw new TypeError(`${this.constructor.NAME.toUpperCase()}: Option "${i}" provided type "${o}" but expected type "${s}".`)}}}const np="5.3.2";class Bt extends Pn{constructor(t,e){super(),t=Pe(t),t&&(this._element=t,this._config=this._getConfig(e),cr.set(this._element,this.constructor.DATA_KEY,this))}dispose(){cr.remove(this._element,this.constructor.DATA_KEY),T.off(this._element,this.constructor.EVENT_KEY);for(const t of Object.getOwnPropertyNames(this))this[t]=null}_queueCallback(t,e,i=!0){uc(t,e,i)}_getConfig(t){return t=this._mergeConfigObj(t,this._element),t=this._configAfterMerge(t),this._typeCheckConfig(t),t}static getInstance(t){return cr.get(Pe(t),this.DATA_KEY)}static getOrCreateInstance(t,e={}){return this.getInstance(t)||new this(t,typeof e=="object"?e:null)}static get VERSION(){return np}static get DATA_KEY(){return`bs.${this.NAME}`}static get EVENT_KEY(){return`.${this.DATA_KEY}`}static eventName(t){return`${t}${this.EVENT_KEY}`}}const gr=n=>{let t=n.getAttribute("data-bs-target");if(!t||t==="#"){let e=n.getAttribute("href");if(!e||!e.includes("#")&&!e.startsWith("."))return null;e.includes("#")&&!e.startsWith("#")&&(e=`#${e.split("#")[1]}`),t=e&&e!=="#"?ac(e.trim()):null}return t},M={find(n,t=document.documentElement){return[].concat(...Element.prototype.querySelectorAll.call(t,n))},findOne(n,t=document.documentElement){return Element.prototype.querySelector.call(t,n)},children(n,t){return[].concat(...n.children).filter(e=>e.matches(t))},parents(n,t){const e=[];let i=n.parentNode.closest(t);for(;i;)e.push(i),i=i.parentNode.closest(t);return e},prev(n,t){let e=n.previousElementSibling;for(;e;){if(e.matches(t))return[e];e=e.previousElementSibling}return[]},next(n,t){let e=n.nextElementSibling;for(;e;){if(e.matches(t))return[e];e=e.nextElementSibling}return[]},focusableChildren(n){const t=["a","button","input","textarea","select","details","[tabindex]",'[contenteditable="true"]'].map(e=>`${e}:not([tabindex^="-"])`).join(",");return this.find(t,n).filter(e=>!Ne(e)&&Ui(e))},getSelectorFromElement(n){const t=gr(n);return t&&M.findOne(t)?t:null},getElementFromSelector(n){const t=gr(n);return t?M.findOne(t):null},getMultipleElementsFromSelector(n){const t=gr(n);return t?M.find(t):[]}},Vs=(n,t="hide")=>{const e=`click.dismiss${n.EVENT_KEY}`,i=n.NAME;T.on(document,e,`[data-bs-dismiss="${i}"]`,function(s){if(["A","AREA"].includes(this.tagName)&&s.preventDefault(),Ne(this))return;const r=M.getElementFromSelector(this)||this.closest(`.${i}`);n.getOrCreateInstance(r)[t]()})},sp="alert",rp="bs.alert",Ec=`.${rp}`,op=`close${Ec}`,ap=`closed${Ec}`,lp="fade",hp="show";class Xs extends Bt{static get NAME(){return sp}close(){if(T.trigger(this._element,op).defaultPrevented)return;this._element.classList.remove(hp);const e=this._element.classList.contains(lp);this._queueCallback(()=>this._destroyElement(),this._element,e)}_destroyElement(){this._element.remove(),T.trigger(this._element,ap),this.dispose()}static jQueryInterface(t){return this.each(function(){const e=Xs.getOrCreateInstance(this);if(typeof t=="string"){if(e[t]===void 0||t.startsWith("_")||t==="constructor")throw new TypeError(`No method named "${t}"`);e[t](this)}})}}Vs(Xs,"close");$t(Xs);const cp="button",up="bs.button",dp=`.${up}`,fp=".data-api",gp="active",Qa='[data-bs-toggle="button"]',_p=`click${dp}${fp}`;class zs extends Bt{static get NAME(){return cp}toggle(){this._element.setAttribute("aria-pressed",this._element.classList.toggle(gp))}static jQueryInterface(t){return this.each(function(){const e=zs.getOrCreateInstance(this);t==="toggle"&&e[t]()})}}T.on(document,_p,Qa,n=>{n.preventDefault();const t=n.target.closest(Qa);zs.getOrCreateInstance(t).toggle()});$t(zs);const mp="swipe",Hi=".bs.swipe",pp=`touchstart${Hi}`,Ep=`touchmove${Hi}`,yp=`touchend${Hi}`,vp=`pointerdown${Hi}`,xp=`pointerup${Hi}`,Tp="touch",Cp="pen",wp="pointer-event",Sp=40,Rp={endCallback:null,leftCallback:null,rightCallback:null},Ip={endCallback:"(function|null)",leftCallback:"(function|null)",rightCallback:"(function|null)"};class Cs extends Pn{constructor(t,e){super(),this._element=t,!(!t||!Cs.isSupported())&&(this._config=this._getConfig(e),this._deltaX=0,this._supportPointerEvents=Boolean(window.PointerEvent),this._initEvents())}static get Default(){return Rp}static get DefaultType(){return Ip}static get NAME(){return mp}dispose(){T.off(this._element,Hi)}_start(t){if(!this._supportPointerEvents){this._deltaX=t.touches[0].clientX;return}this._eventIsPointerPenTouch(t)&&(this._deltaX=t.clientX)}_end(t){this._eventIsPointerPenTouch(t)&&(this._deltaX=t.clientX-this._deltaX),this._handleSwipe(),xt(this._config.endCallback)}_move(t){this._deltaX=t.touches&&t.touches.length>1?0:t.touches[0].clientX-this._deltaX}_handleSwipe(){const t=Math.abs(this._deltaX);if(t<=Sp)return;const e=t/this._deltaX;this._deltaX=0,e&&xt(e>0?this._config.rightCallback:this._config.leftCallback)}_initEvents(){this._supportPointerEvents?(T.on(this._element,vp,t=>this._start(t)),T.on(this._element,xp,t=>this._end(t)),this._element.classList.add(wp)):(T.on(this._element,pp,t=>this._start(t)),T.on(this._element,Ep,t=>this._move(t)),T.on(this._element,yp,t=>this._end(t)))}_eventIsPointerPenTouch(t){return this._supportPointerEvents&&(t.pointerType===Cp||t.pointerType===Tp)}static isSupported(){return"ontouchstart"in document.documentElement||navigator.maxTouchPoints>0}}const bp="carousel",Ap="bs.carousel",$e=`.${Ap}`,yc=".data-api",Op="ArrowLeft",Lp="ArrowRight",Dp=500,en="next",Ei="prev",Ri="left",os="right",Mp=`slide${$e}`,_r=`slid${$e}`,Pp=`keydown${$e}`,Np=`mouseenter${$e}`,Fp=`mouseleave${$e}`,kp=`dragstart${$e}`,$p=`load${$e}${yc}`,Wp=`click${$e}${yc}`,vc="carousel",Jn="active",Gp="slide",Yp="carousel-item-end",Vp="carousel-item-start",Xp="carousel-item-next",zp="carousel-item-prev",xc=".active",Tc=".carousel-item",Bp=xc+Tc,Kp=".carousel-item img",Up=".carousel-indicators",Hp="[data-bs-slide], [data-bs-slide-to]",jp='[data-bs-ride="carousel"]',Zp={[Op]:os,[Lp]:Ri},qp={interval:5e3,keyboard:!0,pause:"hover",ride:!1,touch:!0,wrap:!0},Jp={interval:"(number|boolean)",keyboard:"boolean",pause:"(string|boolean)",ride:"(boolean|string)",touch:"boolean",wrap:"boolean"};class Nn extends Bt{constructor(t,e){super(t,e),this._interval=null,this._activeElement=null,this._isSliding=!1,this.touchTimeout=null,this._swipeHelper=null,this._indicatorsElement=M.findOne(Up,this._element),this._addEventListeners(),this._config.ride===vc&&this.cycle()}static get Default(){return qp}static get DefaultType(){return Jp}static get NAME(){return bp}next(){this._slide(en)}nextWhenVisible(){!document.hidden&&Ui(this._element)&&this.next()}prev(){this._slide(Ei)}pause(){this._isSliding&&lc(this._element),this._clearInterval()}cycle(){this._clearInterval(),this._updateInterval(),this._interval=setInterval(()=>this.nextWhenVisible(),this._config.interval)}_maybeEnableCycle(){if(this._config.ride){if(this._isSliding){T.one(this._element,_r,()=>this.cycle());return}this.cycle()}}to(t){const e=this._getItems();if(t>e.length-1||t<0)return;if(this._isSliding){T.one(this._element,_r,()=>this.to(t));return}const i=this._getItemIndex(this._getActive());if(i===t)return;const s=t>i?en:Ei;this._slide(s,e[t])}dispose(){this._swipeHelper&&this._swipeHelper.dispose(),super.dispose()}_configAfterMerge(t){return t.defaultInterval=t.interval,t}_addEventListeners(){this._config.keyboard&&T.on(this._element,Pp,t=>this._keydown(t)),this._config.pause==="hover"&&(T.on(this._element,Np,()=>this.pause()),T.on(this._element,Fp,()=>this._maybeEnableCycle())),this._config.touch&&Cs.isSupported()&&this._addTouchEventListeners()}_addTouchEventListeners(){for(const i of M.find(Kp,this._element))T.on(i,kp,s=>s.preventDefault());const e={leftCallback:()=>this._slide(this._directionToOrder(Ri)),rightCallback:()=>this._slide(this._directionToOrder(os)),endCallback:()=>{this._config.pause==="hover"&&(this.pause(),this.touchTimeout&&clearTimeout(this.touchTimeout),this.touchTimeout=setTimeout(()=>this._maybeEnableCycle(),Dp+this._config.interval))}};this._swipeHelper=new Cs(this._element,e)}_keydown(t){if(/input|textarea/i.test(t.target.tagName))return;const e=Zp[t.key];e&&(t.preventDefault(),this._slide(this._directionToOrder(e)))}_getItemIndex(t){return this._getItems().indexOf(t)}_setActiveIndicatorElement(t){if(!this._indicatorsElement)return;const e=M.findOne(xc,this._indicatorsElement);e.classList.remove(Jn),e.removeAttribute("aria-current");const i=M.findOne(`[data-bs-slide-to="${t}"]`,this._indicatorsElement);i&&(i.classList.add(Jn),i.setAttribute("aria-current","true"))}_updateInterval(){const t=this._activeElement||this._getActive();if(!t)return;const e=Number.parseInt(t.getAttribute("data-bs-interval"),10);this._config.interval=e||this._config.defaultInterval}_slide(t,e=null){if(this._isSliding)return;const i=this._getActive(),s=t===en,r=e||Go(this._getItems(),i,s,this._config.wrap);if(r===i)return;const o=this._getItemIndex(r),a=f=>T.trigger(this._element,f,{relatedTarget:r,direction:this._orderToDirection(t),from:this._getItemIndex(i),to:o});if(a(Mp).defaultPrevented||!i||!r)return;const h=Boolean(this._interval);this.pause(),this._isSliding=!0,this._setActiveIndicatorElement(o),this._activeElement=r;const c=s?Vp:Yp,u=s?Xp:zp;r.classList.add(u),Mn(r),i.classList.add(c),r.classList.add(c);const d=()=>{r.classList.remove(c,u),r.classList.add(Jn),i.classList.remove(Jn,u,c),this._isSliding=!1,a(_r)};this._queueCallback(d,i,this._isAnimated()),h&&this.cycle()}_isAnimated(){return this._element.classList.contains(Gp)}_getActive(){return M.findOne(Bp,this._element)}_getItems(){return M.find(Tc,this._element)}_clearInterval(){this._interval&&(clearInterval(this._interval),this._interval=null)}_directionToOrder(t){return Ft()?t===Ri?Ei:en:t===Ri?en:Ei}_orderToDirection(t){return Ft()?t===Ei?Ri:os:t===Ei?os:Ri}static jQueryInterface(t){return this.each(function(){const e=Nn.getOrCreateInstance(this,t);if(typeof t=="number"){e.to(t);return}if(typeof t=="string"){if(e[t]===void 0||t.startsWith("_")||t==="constructor")throw new TypeError(`No method named "${t}"`);e[t]()}})}}T.on(document,Wp,Hp,function(n){const t=M.getElementFromSelector(this);if(!t||!t.classList.contains(vc))return;n.preventDefault();const e=Nn.getOrCreateInstance(t),i=this.getAttribute("data-bs-slide-to");if(i){e.to(i),e._maybeEnableCycle();return}if(_e.getDataAttribute(this,"slide")==="next"){e.next(),e._maybeEnableCycle();return}e.prev(),e._maybeEnableCycle()});T.on(window,$p,()=>{const n=M.find(jp);for(const t of n)Nn.getOrCreateInstance(t)});$t(Nn);const Qp="collapse",tE="bs.collapse",Fn=`.${tE}`,eE=".data-api",iE=`show${Fn}`,nE=`shown${Fn}`,sE=`hide${Fn}`,rE=`hidden${Fn}`,oE=`click${Fn}${eE}`,mr="show",Oi="collapse",Qn="collapsing",aE="collapsed",lE=`:scope .${Oi} .${Oi}`,hE="collapse-horizontal",cE="width",uE="height",dE=".collapse.show, .collapse.collapsing",zr='[data-bs-toggle="collapse"]',fE={parent:null,toggle:!0},gE={parent:"(null|element)",toggle:"boolean"};class Sn extends Bt{constructor(t,e){super(t,e),this._isTransitioning=!1,this._triggerArray=[];const i=M.find(zr);for(const s of i){const r=M.getSelectorFromElement(s),o=M.find(r).filter(a=>a===this._element);r!==null&&o.length&&this._triggerArray.push(s)}this._initializeChildren(),this._config.parent||this._addAriaAndCollapsedClass(this._triggerArray,this._isShown()),this._config.toggle&&this.toggle()}static get Default(){return fE}static get DefaultType(){return gE}static get NAME(){return Qp}toggle(){this._isShown()?this.hide():this.show()}show(){if(this._isTransitioning||this._isShown())return;let t=[];if(this._config.parent&&(t=this._getFirstLevelChildren(dE).filter(a=>a!==this._element).map(a=>Sn.getOrCreateInstance(a,{toggle:!1}))),t.length&&t[0]._isTransitioning||T.trigger(this._element,iE).defaultPrevented)return;for(const a of t)a.hide();const i=this._getDimension();this._element.classList.remove(Oi),this._element.classList.add(Qn),this._element.style[i]=0,this._addAriaAndCollapsedClass(this._triggerArray,!0),this._isTransitioning=!0;const s=()=>{this._isTransitioning=!1,this._element.classList.remove(Qn),this._element.classList.add(Oi,mr),this._element.style[i]="",T.trigger(this._element,nE)},o=`scroll${i[0].toUpperCase()+i.slice(1)}`;this._queueCallback(s,this._element,!0),this._element.style[i]=`${this._element[o]}px`}hide(){if(this._isTransitioning||!this._isShown()||T.trigger(this._element,sE).defaultPrevented)return;const e=this._getDimension();this._element.style[e]=`${this._element.getBoundingClientRect()[e]}px`,Mn(this._element),this._element.classList.add(Qn),this._element.classList.remove(Oi,mr);for(const s of this._triggerArray){const r=M.getElementFromSelector(s);r&&!this._isShown(r)&&this._addAriaAndCollapsedClass([s],!1)}this._isTransitioning=!0;const i=()=>{this._isTransitioning=!1,this._element.classList.remove(Qn),this._element.classList.add(Oi),T.trigger(this._element,rE)};this._element.style[e]="",this._queueCallback(i,this._element,!0)}_isShown(t=this._element){return t.classList.contains(mr)}_configAfterMerge(t){return t.toggle=Boolean(t.toggle),t.parent=Pe(t.parent),t}_getDimension(){return this._element.classList.contains(hE)?cE:uE}_initializeChildren(){if(!this._config.parent)return;const t=this._getFirstLevelChildren(zr);for(const e of t){const i=M.getElementFromSelector(e);i&&this._addAriaAndCollapsedClass([e],this._isShown(i))}}_getFirstLevelChildren(t){const e=M.find(lE,this._config.parent);return M.find(t,this._config.parent).filter(i=>!e.includes(i))}_addAriaAndCollapsedClass(t,e){if(t.length)for(const i of t)i.classList.toggle(aE,!e),i.setAttribute("aria-expanded",e)}static jQueryInterface(t){const e={};return typeof t=="string"&&/show|hide/.test(t)&&(e.toggle=!1),this.each(function(){const i=Sn.getOrCreateInstance(this,e);if(typeof t=="string"){if(typeof i[t]>"u")throw new TypeError(`No method named "${t}"`);i[t]()}})}}T.on(document,oE,zr,function(n){(n.target.tagName==="A"||n.delegateTarget&&n.delegateTarget.tagName==="A")&&n.preventDefault();for(const t of M.getMultipleElementsFromSelector(this))Sn.getOrCreateInstance(t,{toggle:!1}).toggle()});$t(Sn);const tl="dropdown",_E="bs.dropdown",li=`.${_E}`,Vo=".data-api",mE="Escape",el="Tab",pE="ArrowUp",il="ArrowDown",EE=2,yE=`hide${li}`,vE=`hidden${li}`,xE=`show${li}`,TE=`shown${li}`,Cc=`click${li}${Vo}`,wc=`keydown${li}${Vo}`,CE=`keyup${li}${Vo}`,Ii="show",wE="dropup",SE="dropend",RE="dropstart",IE="dropup-center",bE="dropdown-center",Je='[data-bs-toggle="dropdown"]:not(.disabled):not(:disabled)',AE=`${Je}.${Ii}`,as=".dropdown-menu",OE=".navbar",LE=".navbar-nav",DE=".dropdown-menu .dropdown-item:not(.disabled):not(:disabled)",ME=Ft()?"top-end":"top-start",PE=Ft()?"top-start":"top-end",NE=Ft()?"bottom-end":"bottom-start",FE=Ft()?"bottom-start":"bottom-end",kE=Ft()?"left-start":"right-start",$E=Ft()?"right-start":"left-start",WE="top",GE="bottom",YE={autoClose:!0,boundary:"clippingParents",display:"dynamic",offset:[0,2],popperConfig:null,reference:"toggle"},VE={autoClose:"(boolean|string)",boundary:"(string|element)",display:"string",offset:"(array|string|function)",popperConfig:"(null|object|function)",reference:"(string|element|object)"};class te extends Bt{constructor(t,e){super(t,e),this._popper=null,this._parent=this._element.parentNode,this._menu=M.next(this._element,as)[0]||M.prev(this._element,as)[0]||M.findOne(as,this._parent),this._inNavbar=this._detectNavbar()}static get Default(){return YE}static get DefaultType(){return VE}static get NAME(){return tl}toggle(){return this._isShown()?this.hide():this.show()}show(){if(Ne(this._element)||this._isShown())return;const t={relatedTarget:this._element};if(!T.trigger(this._element,xE,t).defaultPrevented){if(this._createPopper(),"ontouchstart"in document.documentElement&&!this._parent.closest(LE))for(const i of[].concat(...document.body.children))T.on(i,"mouseover",Ts);this._element.focus(),this._element.setAttribute("aria-expanded",!0),this._menu.classList.add(Ii),this._element.classList.add(Ii),T.trigger(this._element,TE,t)}}hide(){if(Ne(this._element)||!this._isShown())return;const t={relatedTarget:this._element};this._completeHide(t)}dispose(){this._popper&&this._popper.destroy(),super.dispose()}update(){this._inNavbar=this._detectNavbar(),this._popper&&this._popper.update()}_completeHide(t){if(!T.trigger(this._element,yE,t).defaultPrevented){if("ontouchstart"in document.documentElement)for(const i of[].concat(...document.body.children))T.off(i,"mouseover",Ts);this._popper&&this._popper.destroy(),this._menu.classList.remove(Ii),this._element.classList.remove(Ii),this._element.setAttribute("aria-expanded","false"),_e.removeDataAttribute(this._menu,"popper"),T.trigger(this._element,vE,t)}}_getConfig(t){if(t=super._getConfig(t),typeof t.reference=="object"&&!ge(t.reference)&&typeof t.reference.getBoundingClientRect!="function")throw new TypeError(`${tl.toUpperCase()}: Option "reference" provided type "object" without a required "getBoundingClientRect" method.`);return t}_createPopper(){if(typeof oc>"u")throw new TypeError("Bootstrap's dropdowns require Popper (https://popper.js.org)");let t=this._element;this._config.reference==="parent"?t=this._parent:ge(this._config.reference)?t=Pe(this._config.reference):typeof this._config.reference=="object"&&(t=this._config.reference);const e=this._getPopperConfig();this._popper=Wo(t,this._menu,e)}_isShown(){return this._menu.classList.contains(Ii)}_getPlacement(){const t=this._parent;if(t.classList.contains(SE))return kE;if(t.classList.contains(RE))return $E;if(t.classList.contains(IE))return WE;if(t.classList.contains(bE))return GE;const e=getComputedStyle(this._menu).getPropertyValue("--bs-position").trim()==="end";return t.classList.contains(wE)?e?PE:ME:e?FE:NE}_detectNavbar(){return this._element.closest(OE)!==null}_getOffset(){const{offset:t}=this._config;return typeof t=="string"?t.split(",").map(e=>Number.parseInt(e,10)):typeof t=="function"?e=>t(e,this._element):t}_getPopperConfig(){const t={placement:this._getPlacement(),modifiers:[{name:"preventOverflow",options:{boundary:this._config.boundary}},{name:"offset",options:{offset:this._getOffset()}}]};return(this._inNavbar||this._config.display==="static")&&(_e.setDataAttribute(this._menu,"popper","static"),t.modifiers=[{name:"applyStyles",enabled:!1}]),{...t,...xt(this._config.popperConfig,[t])}}_selectMenuItem({key:t,target:e}){const i=M.find(DE,this._menu).filter(s=>Ui(s));i.length&&Go(i,e,t===il,!i.includes(e)).focus()}static jQueryInterface(t){return this.each(function(){const e=te.getOrCreateInstance(this,t);if(typeof t=="string"){if(typeof e[t]>"u")throw new TypeError(`No method named "${t}"`);e[t]()}})}static clearMenus(t){if(t.button===EE||t.type==="keyup"&&t.key!==el)return;const e=M.find(AE);for(const i of e){const s=te.getInstance(i);if(!s||s._config.autoClose===!1)continue;const r=t.composedPath(),o=r.includes(s._menu);if(r.includes(s._element)||s._config.autoClose==="inside"&&!o||s._config.autoClose==="outside"&&o||s._menu.contains(t.target)&&(t.type==="keyup"&&t.key===el||/input|select|option|textarea|form/i.test(t.target.tagName)))continue;const a={relatedTarget:s._element};t.type==="click"&&(a.clickEvent=t),s._completeHide(a)}}static dataApiKeydownHandler(t){const e=/input|textarea/i.test(t.target.tagName),i=t.key===mE,s=[pE,il].includes(t.key);if(!s&&!i||e&&!i)return;t.preventDefault();const r=this.matches(Je)?this:M.prev(this,Je)[0]||M.next(this,Je)[0]||M.findOne(Je,t.delegateTarget.parentNode),o=te.getOrCreateInstance(r);if(s){t.stopPropagation(),o.show(),o._selectMenuItem(t);return}o._isShown()&&(t.stopPropagation(),o.hide(),r.focus())}}T.on(document,wc,Je,te.dataApiKeydownHandler);T.on(document,wc,as,te.dataApiKeydownHandler);T.on(document,Cc,te.clearMenus);T.on(document,CE,te.clearMenus);T.on(document,Cc,Je,function(n){n.preventDefault(),te.getOrCreateInstance(this).toggle()});$t(te);const Sc="backdrop",XE="fade",nl="show",sl=`mousedown.bs.${Sc}`,zE={className:"modal-backdrop",clickCallback:null,isAnimated:!1,isVisible:!0,rootElement:"body"},BE={className:"string",clickCallback:"(function|null)",isAnimated:"boolean",isVisible:"boolean",rootElement:"(element|string)"};class Rc extends Pn{constructor(t){super(),this._config=this._getConfig(t),this._isAppended=!1,this._element=null}static get Default(){return zE}static get DefaultType(){return BE}static get NAME(){return Sc}show(t){if(!this._config.isVisible){xt(t);return}this._append();const e=this._getElement();this._config.isAnimated&&Mn(e),e.classList.add(nl),this._emulateAnimation(()=>{xt(t)})}hide(t){if(!this._config.isVisible){xt(t);return}this._getElement().classList.remove(nl),this._emulateAnimation(()=>{this.dispose(),xt(t)})}dispose(){this._isAppended&&(T.off(this._element,sl),this._element.remove(),this._isAppended=!1)}_getElement(){if(!this._element){const t=document.createElement("div");t.className=this._config.className,this._config.isAnimated&&t.classList.add(XE),this._element=t}return this._element}_configAfterMerge(t){return t.rootElement=Pe(t.rootElement),t}_append(){if(this._isAppended)return;const t=this._getElement();this._config.rootElement.append(t),T.on(t,sl,()=>{xt(this._config.clickCallback)}),this._isAppended=!0}_emulateAnimation(t){uc(t,this._getElement(),this._config.isAnimated)}}const KE="focustrap",UE="bs.focustrap",ws=`.${UE}`,HE=`focusin${ws}`,jE=`keydown.tab${ws}`,ZE="Tab",qE="forward",rl="backward",JE={autofocus:!0,trapElement:null},QE={autofocus:"boolean",trapElement:"element"};class Ic extends Pn{constructor(t){super(),this._config=this._getConfig(t),this._isActive=!1,this._lastTabNavDirection=null}static get Default(){return JE}static get DefaultType(){return QE}static get NAME(){return KE}activate(){this._isActive||(this._config.autofocus&&this._config.trapElement.focus(),T.off(document,ws),T.on(document,HE,t=>this._handleFocusin(t)),T.on(document,jE,t=>this._handleKeydown(t)),this._isActive=!0)}deactivate(){this._isActive&&(this._isActive=!1,T.off(document,ws))}_handleFocusin(t){const{trapElement:e}=this._config;if(t.target===document||t.target===e||e.contains(t.target))return;const i=M.focusableChildren(e);i.length===0?e.focus():this._lastTabNavDirection===rl?i[i.length-1].focus():i[0].focus()}_handleKeydown(t){t.key===ZE&&(this._lastTabNavDirection=t.shiftKey?rl:qE)}}const ol=".fixed-top, .fixed-bottom, .is-fixed, .sticky-top",al=".sticky-top",ts="padding-right",ll="margin-right";class Br{constructor(){this._element=document.body}getWidth(){const t=document.documentElement.clientWidth;return Math.abs(window.innerWidth-t)}hide(){const t=this.getWidth();this._disableOverFlow(),this._setElementAttributes(this._element,ts,e=>e+t),this._setElementAttributes(ol,ts,e=>e+t),this._setElementAttributes(al,ll,e=>e-t)}reset(){this._resetElementAttributes(this._element,"overflow"),this._resetElementAttributes(this._element,ts),this._resetElementAttributes(ol,ts),this._resetElementAttributes(al,ll)}isOverflowing(){return this.getWidth()>0}_disableOverFlow(){this._saveInitialAttribute(this._element,"overflow"),this._element.style.overflow="hidden"}_setElementAttributes(t,e,i){const s=this.getWidth(),r=o=>{if(o!==this._element&&window.innerWidth>o.clientWidth+s)return;this._saveInitialAttribute(o,e);const a=window.getComputedStyle(o).getPropertyValue(e);o.style.setProperty(e,`${i(Number.parseFloat(a))}px`)};this._applyManipulationCallback(t,r)}_saveInitialAttribute(t,e){const i=t.style.getPropertyValue(e);i&&_e.setDataAttribute(t,e,i)}_resetElementAttributes(t,e){const i=s=>{const r=_e.getDataAttribute(s,e);if(r===null){s.style.removeProperty(e);return}_e.removeDataAttribute(s,e),s.style.setProperty(e,r)};this._applyManipulationCallback(t,i)}_applyManipulationCallback(t,e){if(ge(t)){e(t);return}for(const i of M.find(t,this._element))e(i)}}const ty="modal",ey="bs.modal",kt=`.${ey}`,iy=".data-api",ny="Escape",sy=`hide${kt}`,ry=`hidePrevented${kt}`,bc=`hidden${kt}`,Ac=`show${kt}`,oy=`shown${kt}`,ay=`resize${kt}`,ly=`click.dismiss${kt}`,hy=`mousedown.dismiss${kt}`,cy=`keydown.dismiss${kt}`,uy=`click${kt}${iy}`,hl="modal-open",dy="fade",cl="show",pr="modal-static",fy=".modal.show",gy=".modal-dialog",_y=".modal-body",my='[data-bs-toggle="modal"]',py={backdrop:!0,focus:!0,keyboard:!0},Ey={backdrop:"(boolean|string)",focus:"boolean",keyboard:"boolean"};class Xi extends Bt{constructor(t,e){super(t,e),this._dialog=M.findOne(gy,this._element),this._backdrop=this._initializeBackDrop(),this._focustrap=this._initializeFocusTrap(),this._isShown=!1,this._isTransitioning=!1,this._scrollBar=new Br,this._addEventListeners()}static get Default(){return py}static get DefaultType(){return Ey}static get NAME(){return ty}toggle(t){return this._isShown?this.hide():this.show(t)}show(t){this._isShown||this._isTransitioning||T.trigger(this._element,Ac,{relatedTarget:t}).defaultPrevented||(this._isShown=!0,this._isTransitioning=!0,this._scrollBar.hide(),document.body.classList.add(hl),this._adjustDialog(),this._backdrop.show(()=>this._showElement(t)))}hide(){!this._isShown||this._isTransitioning||T.trigger(this._element,sy).defaultPrevented||(this._isShown=!1,this._isTransitioning=!0,this._focustrap.deactivate(),this._element.classList.remove(cl),this._queueCallback(()=>this._hideModal(),this._element,this._isAnimated()))}dispose(){T.off(window,kt),T.off(this._dialog,kt),this._backdrop.dispose(),this._focustrap.deactivate(),super.dispose()}handleUpdate(){this._adjustDialog()}_initializeBackDrop(){return new Rc({isVisible:Boolean(this._config.backdrop),isAnimated:this._isAnimated()})}_initializeFocusTrap(){return new Ic({trapElement:this._element})}_showElement(t){document.body.contains(this._element)||document.body.append(this._element),this._element.style.display="block",this._element.removeAttribute("aria-hidden"),this._element.setAttribute("aria-modal",!0),this._element.setAttribute("role","dialog"),this._element.scrollTop=0;const e=M.findOne(_y,this._dialog);e&&(e.scrollTop=0),Mn(this._element),this._element.classList.add(cl);const i=()=>{this._config.focus&&this._focustrap.activate(),this._isTransitioning=!1,T.trigger(this._element,oy,{relatedTarget:t})};this._queueCallback(i,this._dialog,this._isAnimated())}_addEventListeners(){T.on(this._element,cy,t=>{if(t.key===ny){if(this._config.keyboard){this.hide();return}this._triggerBackdropTransition()}}),T.on(window,ay,()=>{this._isShown&&!this._isTransitioning&&this._adjustDialog()}),T.on(this._element,hy,t=>{T.one(this._element,ly,e=>{if(!(this._element!==t.target||this._element!==e.target)){if(this._config.backdrop==="static"){this._triggerBackdropTransition();return}this._config.backdrop&&this.hide()}})})}_hideModal(){this._element.style.display="none",this._element.setAttribute("aria-hidden",!0),this._element.removeAttribute("aria-modal"),this._element.removeAttribute("role"),this._isTransitioning=!1,this._backdrop.hide(()=>{document.body.classList.remove(hl),this._resetAdjustments(),this._scrollBar.reset(),T.trigger(this._element,bc)})}_isAnimated(){return this._element.classList.contains(dy)}_triggerBackdropTransition(){if(T.trigger(this._element,ry).defaultPrevented)return;const e=this._element.scrollHeight>document.documentElement.clientHeight,i=this._element.style.overflowY;i==="hidden"||this._element.classList.contains(pr)||(e||(this._element.style.overflowY="hidden"),this._element.classList.add(pr),this._queueCallback(()=>{this._element.classList.remove(pr),this._queueCallback(()=>{this._element.style.overflowY=i},this._dialog)},this._dialog),this._element.focus())}_adjustDialog(){const t=this._element.scrollHeight>document.documentElement.clientHeight,e=this._scrollBar.getWidth(),i=e>0;if(i&&!t){const s=Ft()?"paddingLeft":"paddingRight";this._element.style[s]=`${e}px`}if(!i&&t){const s=Ft()?"paddingRight":"paddingLeft";this._element.style[s]=`${e}px`}}_resetAdjustments(){this._element.style.paddingLeft="",this._element.style.paddingRight=""}static jQueryInterface(t,e){return this.each(function(){const i=Xi.getOrCreateInstance(this,t);if(typeof t=="string"){if(typeof i[t]>"u")throw new TypeError(`No method named "${t}"`);i[t](e)}})}}T.on(document,uy,my,function(n){const t=M.getElementFromSelector(this);["A","AREA"].includes(this.tagName)&&n.preventDefault(),T.one(t,Ac,s=>{s.defaultPrevented||T.one(t,bc,()=>{Ui(this)&&this.focus()})});const e=M.findOne(fy);e&&Xi.getInstance(e).hide(),Xi.getOrCreateInstance(t).toggle(this)});Vs(Xi);$t(Xi);const yy="offcanvas",vy="bs.offcanvas",Ee=`.${vy}`,Oc=".data-api",xy=`load${Ee}${Oc}`,Ty="Escape",ul="show",dl="showing",fl="hiding",Cy="offcanvas-backdrop",Lc=".offcanvas.show",wy=`show${Ee}`,Sy=`shown${Ee}`,Ry=`hide${Ee}`,gl=`hidePrevented${Ee}`,Dc=`hidden${Ee}`,Iy=`resize${Ee}`,by=`click${Ee}${Oc}`,Ay=`keydown.dismiss${Ee}`,Oy='[data-bs-toggle="offcanvas"]',Ly={backdrop:!0,keyboard:!0,scroll:!1},Dy={backdrop:"(boolean|string)",keyboard:"boolean",scroll:"boolean"};class Fe extends Bt{constructor(t,e){super(t,e),this._isShown=!1,this._backdrop=this._initializeBackDrop(),this._focustrap=this._initializeFocusTrap(),this._addEventListeners()}static get Default(){return Ly}static get DefaultType(){return Dy}static get NAME(){return yy}toggle(t){return this._isShown?this.hide():this.show(t)}show(t){if(this._isShown||T.trigger(this._element,wy,{relatedTarget:t}).defaultPrevented)return;this._isShown=!0,this._backdrop.show(),this._config.scroll||new Br().hide(),this._element.setAttribute("aria-modal",!0),this._element.setAttribute("role","dialog"),this._element.classList.add(dl);const i=()=>{(!this._config.scroll||this._config.backdrop)&&this._focustrap.activate(),this._element.classList.add(ul),this._element.classList.remove(dl),T.trigger(this._element,Sy,{relatedTarget:t})};this._queueCallback(i,this._element,!0)}hide(){if(!this._isShown||T.trigger(this._element,Ry).defaultPrevented)return;this._focustrap.deactivate(),this._element.blur(),this._isShown=!1,this._element.classList.add(fl),this._backdrop.hide();const e=()=>{this._element.classList.remove(ul,fl),this._element.removeAttribute("aria-modal"),this._element.removeAttribute("role"),this._config.scroll||new Br().reset(),T.trigger(this._element,Dc)};this._queueCallback(e,this._element,!0)}dispose(){this._backdrop.dispose(),this._focustrap.deactivate(),super.dispose()}_initializeBackDrop(){const t=()=>{if(this._config.backdrop==="static"){T.trigger(this._element,gl);return}this.hide()},e=Boolean(this._config.backdrop);return new Rc({className:Cy,isVisible:e,isAnimated:!0,rootElement:this._element.parentNode,clickCallback:e?t:null})}_initializeFocusTrap(){return new Ic({trapElement:this._element})}_addEventListeners(){T.on(this._element,Ay,t=>{if(t.key===Ty){if(this._config.keyboard){this.hide();return}T.trigger(this._element,gl)}})}static jQueryInterface(t){return this.each(function(){const e=Fe.getOrCreateInstance(this,t);if(typeof t=="string"){if(e[t]===void 0||t.startsWith("_")||t==="constructor")throw new TypeError(`No method named "${t}"`);e[t](this)}})}}T.on(document,by,Oy,function(n){const t=M.getElementFromSelector(this);if(["A","AREA"].includes(this.tagName)&&n.preventDefault(),Ne(this))return;T.one(t,Dc,()=>{Ui(this)&&this.focus()});const e=M.findOne(Lc);e&&e!==t&&Fe.getInstance(e).hide(),Fe.getOrCreateInstance(t).toggle(this)});T.on(window,xy,()=>{for(const n of M.find(Lc))Fe.getOrCreateInstance(n).show()});T.on(window,Iy,()=>{for(const n of M.find("[aria-modal][class*=show][class*=offcanvas-]"))getComputedStyle(n).position!=="fixed"&&Fe.getOrCreateInstance(n).hide()});Vs(Fe);$t(Fe);const My=/^aria-[\w-]*$/i,Mc={"*":["class","dir","id","lang","role",My],a:["target","href","title","rel"],area:[],b:[],br:[],col:[],code:[],div:[],em:[],hr:[],h1:[],h2:[],h3:[],h4:[],h5:[],h6:[],i:[],img:["src","srcset","alt","title","width","height"],li:[],ol:[],p:[],pre:[],s:[],small:[],span:[],sub:[],sup:[],strong:[],u:[],ul:[]},Py=new Set(["background","cite","href","itemtype","longdesc","poster","src","xlink:href"]),Ny=/^(?!javascript:)(?:[a-z0-9+.-]+:|[^&:/?#]*(?:[/?#]|$))/i,Fy=(n,t)=>{const e=n.nodeName.toLowerCase();return t.includes(e)?Py.has(e)?Boolean(Ny.test(n.nodeValue)):!0:t.filter(i=>i instanceof RegExp).some(i=>i.test(e))};function ky(n,t,e){if(!n.length)return n;if(e&&typeof e=="function")return e(n);const s=new window.DOMParser().parseFromString(n,"text/html"),r=[].concat(...s.body.querySelectorAll("*"));for(const o of r){const a=o.nodeName.toLowerCase();if(!Object.keys(t).includes(a)){o.remove();continue}const l=[].concat(...o.attributes),h=[].concat(t["*"]||[],t[a]||[]);for(const c of l)Fy(c,h)||o.removeAttribute(c.nodeName)}return s.body.innerHTML}const $y="TemplateFactory",Wy={allowList:Mc,content:{},extraClass:"",html:!1,sanitize:!0,sanitizeFn:null,template:"<div></div>"},Gy={allowList:"object",content:"object",extraClass:"(string|function)",html:"boolean",sanitize:"boolean",sanitizeFn:"(null|function)",template:"string"},Yy={entry:"(string|element|function|null)",selector:"(string|element)"};class Vy extends Pn{constructor(t){super(),this._config=this._getConfig(t)}static get Default(){return Wy}static get DefaultType(){return Gy}static get NAME(){return $y}getContent(){return Object.values(this._config.content).map(t=>this._resolvePossibleFunction(t)).filter(Boolean)}hasContent(){return this.getContent().length>0}changeContent(t){return this._checkContent(t),this._config.content={...this._config.content,...t},this}toHtml(){const t=document.createElement("div");t.innerHTML=this._maybeSanitize(this._config.template);for(const[s,r]of Object.entries(this._config.content))this._setContent(t,r,s);const e=t.children[0],i=this._resolvePossibleFunction(this._config.extraClass);return i&&e.classList.add(...i.split(" ")),e}_typeCheckConfig(t){super._typeCheckConfig(t),this._checkContent(t.content)}_checkContent(t){for(const[e,i]of Object.entries(t))super._typeCheckConfig({selector:e,entry:i},Yy)}_setContent(t,e,i){const s=M.findOne(i,t);if(s){if(e=this._resolvePossibleFunction(e),!e){s.remove();return}if(ge(e)){this._putElementInTemplate(Pe(e),s);return}if(this._config.html){s.innerHTML=this._maybeSanitize(e);return}s.textContent=e}}_maybeSanitize(t){return this._config.sanitize?ky(t,this._config.allowList,this._config.sanitizeFn):t}_resolvePossibleFunction(t){return xt(t,[this])}_putElementInTemplate(t,e){if(this._config.html){e.innerHTML="",e.append(t);return}e.textContent=t.textContent}}const Xy="tooltip",zy=new Set(["sanitize","allowList","sanitizeFn"]),Er="fade",By="modal",es="show",Ky=".tooltip-inner",_l=`.${By}`,ml="hide.bs.modal",nn="hover",yr="focus",Uy="click",Hy="manual",jy="hide",Zy="hidden",qy="show",Jy="shown",Qy="inserted",t0="click",e0="focusin",i0="focusout",n0="mouseenter",s0="mouseleave",r0={AUTO:"auto",TOP:"top",RIGHT:Ft()?"left":"right",BOTTOM:"bottom",LEFT:Ft()?"right":"left"},o0={allowList:Mc,animation:!0,boundary:"clippingParents",container:!1,customClass:"",delay:0,fallbackPlacements:["top","right","bottom","left"],html:!1,offset:[0,6],placement:"top",popperConfig:null,sanitize:!0,sanitizeFn:null,selector:!1,template:'<div class="tooltip" role="tooltip"><div class="tooltip-arrow"></div><div class="tooltip-inner"></div></div>',title:"",trigger:"hover focus"},a0={allowList:"object",animation:"boolean",boundary:"(string|element)",container:"(string|element|boolean)",customClass:"(string|function)",delay:"(number|object)",fallbackPlacements:"array",html:"boolean",offset:"(array|string|function)",placement:"(string|function)",popperConfig:"(null|object|function)",sanitize:"boolean",sanitizeFn:"(null|function)",selector:"(string|boolean)",template:"string",title:"(string|element|function)",trigger:"string"};class ji extends Bt{constructor(t,e){if(typeof oc>"u")throw new TypeError("Bootstrap's tooltips require Popper (https://popper.js.org)");super(t,e),this._isEnabled=!0,this._timeout=0,this._isHovered=null,this._activeTrigger={},this._popper=null,this._templateFactory=null,this._newContent=null,this.tip=null,this._setListeners(),this._config.selector||this._fixTitle()}static get Default(){return o0}static get DefaultType(){return a0}static get NAME(){return Xy}enable(){this._isEnabled=!0}disable(){this._isEnabled=!1}toggleEnabled(){this._isEnabled=!this._isEnabled}toggle(){if(this._isEnabled){if(this._activeTrigger.click=!this._activeTrigger.click,this._isShown()){this._leave();return}this._enter()}}dispose(){clearTimeout(this._timeout),T.off(this._element.closest(_l),ml,this._hideModalHandler),this._element.getAttribute("data-bs-original-title")&&this._element.setAttribute("title",this._element.getAttribute("data-bs-original-title")),this._disposePopper(),super.dispose()}show(){if(this._element.style.display==="none")throw new Error("Please use show on visible elements");if(!(this._isWithContent()&&this._isEnabled))return;const t=T.trigger(this._element,this.constructor.eventName(qy)),i=(hc(this._element)||this._element.ownerDocument.documentElement).contains(this._element);if(t.defaultPrevented||!i)return;this._disposePopper();const s=this._getTipElement();this._element.setAttribute("aria-describedby",s.getAttribute("id"));const{container:r}=this._config;if(this._element.ownerDocument.documentElement.contains(this.tip)||(r.append(s),T.trigger(this._element,this.constructor.eventName(Qy))),this._popper=this._createPopper(s),s.classList.add(es),"ontouchstart"in document.documentElement)for(const a of[].concat(...document.body.children))T.on(a,"mouseover",Ts);const o=()=>{T.trigger(this._element,this.constructor.eventName(Jy)),this._isHovered===!1&&this._leave(),this._isHovered=!1};this._queueCallback(o,this.tip,this._isAnimated())}hide(){if(!this._isShown()||T.trigger(this._element,this.constructor.eventName(jy)).defaultPrevented)return;if(this._getTipElement().classList.remove(es),"ontouchstart"in document.documentElement)for(const s of[].concat(...document.body.children))T.off(s,"mouseover",Ts);this._activeTrigger[Uy]=!1,this._activeTrigger[yr]=!1,this._activeTrigger[nn]=!1,this._isHovered=null;const i=()=>{this._isWithActiveTrigger()||(this._isHovered||this._disposePopper(),this._element.removeAttribute("aria-describedby"),T.trigger(this._element,this.constructor.eventName(Zy)))};this._queueCallback(i,this.tip,this._isAnimated())}update(){this._popper&&this._popper.update()}_isWithContent(){return Boolean(this._getTitle())}_getTipElement(){return this.tip||(this.tip=this._createTipElement(this._newContent||this._getContentForTemplate())),this.tip}_createTipElement(t){const e=this._getTemplateFactory(t).toHtml();if(!e)return null;e.classList.remove(Er,es),e.classList.add(`bs-${this.constructor.NAME}-auto`);const i=Um(this.constructor.NAME).toString();return e.setAttribute("id",i),this._isAnimated()&&e.classList.add(Er),e}setContent(t){this._newContent=t,this._isShown()&&(this._disposePopper(),this.show())}_getTemplateFactory(t){return this._templateFactory?this._templateFactory.changeContent(t):this._templateFactory=new Vy({...this._config,content:t,extraClass:this._resolvePossibleFunction(this._config.customClass)}),this._templateFactory}_getContentForTemplate(){return{[Ky]:this._getTitle()}}_getTitle(){return this._resolvePossibleFunction(this._config.title)||this._element.getAttribute("data-bs-original-title")}_initializeOnDelegatedTarget(t){return this.constructor.getOrCreateInstance(t.delegateTarget,this._getDelegateConfig())}_isAnimated(){return this._config.animation||this.tip&&this.tip.classList.contains(Er)}_isShown(){return this.tip&&this.tip.classList.contains(es)}_createPopper(t){const e=xt(this._config.placement,[this,t,this._element]),i=r0[e.toUpperCase()];return Wo(this._element,t,this._getPopperConfig(i))}_getOffset(){const{offset:t}=this._config;return typeof t=="string"?t.split(",").map(e=>Number.parseInt(e,10)):typeof t=="function"?e=>t(e,this._element):t}_resolvePossibleFunction(t){return xt(t,[this._element])}_getPopperConfig(t){const e={placement:t,modifiers:[{name:"flip",options:{fallbackPlacements:this._config.fallbackPlacements}},{name:"offset",options:{offset:this._getOffset()}},{name:"preventOverflow",options:{boundary:this._config.boundary}},{name:"arrow",options:{element:`.${this.constructor.NAME}-arrow`}},{name:"preSetPlacement",enabled:!0,phase:"beforeMain",fn:i=>{this._getTipElement().setAttribute("data-popper-placement",i.state.placement)}}]};return{...e,...xt(this._config.popperConfig,[e])}}_setListeners(){const t=this._config.trigger.split(" ");for(const e of t)if(e==="click")T.on(this._element,this.constructor.eventName(t0),this._config.selector,i=>{this._initializeOnDelegatedTarget(i).toggle()});else if(e!==Hy){const i=e===nn?this.constructor.eventName(n0):this.constructor.eventName(e0),s=e===nn?this.constructor.eventName(s0):this.constructor.eventName(i0);T.on(this._element,i,this._config.selector,r=>{const o=this._initializeOnDelegatedTarget(r);o._activeTrigger[r.type==="focusin"?yr:nn]=!0,o._enter()}),T.on(this._element,s,this._config.selector,r=>{const o=this._initializeOnDelegatedTarget(r);o._activeTrigger[r.type==="focusout"?yr:nn]=o._element.contains(r.relatedTarget),o._leave()})}this._hideModalHandler=()=>{this._element&&this.hide()},T.on(this._element.closest(_l),ml,this._hideModalHandler)}_fixTitle(){const t=this._element.getAttribute("title");t&&(!this._element.getAttribute("aria-label")&&!this._element.textContent.trim()&&this._element.setAttribute("aria-label",t),this._element.setAttribute("data-bs-original-title",t),this._element.removeAttribute("title"))}_enter(){if(this._isShown()||this._isHovered){this._isHovered=!0;return}this._isHovered=!0,this._setTimeout(()=>{this._isHovered&&this.show()},this._config.delay.show)}_leave(){this._isWithActiveTrigger()||(this._isHovered=!1,this._setTimeout(()=>{this._isHovered||this.hide()},this._config.delay.hide))}_setTimeout(t,e){clearTimeout(this._timeout),this._timeout=setTimeout(t,e)}_isWithActiveTrigger(){return Object.values(this._activeTrigger).includes(!0)}_getConfig(t){const e=_e.getDataAttributes(this._element);for(const i of Object.keys(e))zy.has(i)&&delete e[i];return t={...e,...typeof t=="object"&&t?t:{}},t=this._mergeConfigObj(t),t=this._configAfterMerge(t),this._typeCheckConfig(t),t}_configAfterMerge(t){return t.container=t.container===!1?document.body:Pe(t.container),typeof t.delay=="number"&&(t.delay={show:t.delay,hide:t.delay}),typeof t.title=="number"&&(t.title=t.title.toString()),typeof t.content=="number"&&(t.content=t.content.toString()),t}_getDelegateConfig(){const t={};for(const[e,i]of Object.entries(this._config))this.constructor.Default[e]!==i&&(t[e]=i);return t.selector=!1,t.trigger="manual",t}_disposePopper(){this._popper&&(this._popper.destroy(),this._popper=null),this.tip&&(this.tip.remove(),this.tip=null)}static jQueryInterface(t){return this.each(function(){const e=ji.getOrCreateInstance(this,t);if(typeof t=="string"){if(typeof e[t]>"u")throw new TypeError(`No method named "${t}"`);e[t]()}})}}$t(ji);const l0="popover",h0=".popover-header",c0=".popover-body",u0={...ji.Default,content:"",offset:[0,8],placement:"right",template:'<div class="popover" role="tooltip"><div class="popover-arrow"></div><h3 class="popover-header"></h3><div class="popover-body"></div></div>',trigger:"click"},d0={...ji.DefaultType,content:"(null|string|element|function)"};class Bs extends ji{static get Default(){return u0}static get DefaultType(){return d0}static get NAME(){return l0}_isWithContent(){return this._getTitle()||this._getContent()}_getContentForTemplate(){return{[h0]:this._getTitle(),[c0]:this._getContent()}}_getContent(){return this._resolvePossibleFunction(this._config.content)}static jQueryInterface(t){return this.each(function(){const e=Bs.getOrCreateInstance(this,t);if(typeof t=="string"){if(typeof e[t]>"u")throw new TypeError(`No method named "${t}"`);e[t]()}})}}$t(Bs);const f0="scrollspy",g0="bs.scrollspy",Xo=`.${g0}`,_0=".data-api",m0=`activate${Xo}`,pl=`click${Xo}`,p0=`load${Xo}${_0}`,E0="dropdown-item",yi="active",y0='[data-bs-spy="scroll"]',vr="[href]",v0=".nav, .list-group",El=".nav-link",x0=".nav-item",T0=".list-group-item",C0=`${El}, ${x0} > ${El}, ${T0}`,w0=".dropdown",S0=".dropdown-toggle",R0={offset:null,rootMargin:"0px 0px -25%",smoothScroll:!1,target:null,threshold:[.1,.5,1]},I0={offset:"(number|null)",rootMargin:"string",smoothScroll:"boolean",target:"element",threshold:"array"};class Ks extends Bt{constructor(t,e){super(t,e),this._targetLinks=new Map,this._observableSections=new Map,this._rootElement=getComputedStyle(this._element).overflowY==="visible"?null:this._element,this._activeTarget=null,this._observer=null,this._previousScrollData={visibleEntryTop:0,parentScrollTop:0},this.refresh()}static get Default(){return R0}static get DefaultType(){return I0}static get NAME(){return f0}refresh(){this._initializeTargetsAndObservables(),this._maybeEnableSmoothScroll(),this._observer?this._observer.disconnect():this._observer=this._getNewObserver();for(const t of this._observableSections.values())this._observer.observe(t)}dispose(){this._observer.disconnect(),super.dispose()}_configAfterMerge(t){return t.target=Pe(t.target)||document.body,t.rootMargin=t.offset?`${t.offset}px 0px -30%`:t.rootMargin,typeof t.threshold=="string"&&(t.threshold=t.threshold.split(",").map(e=>Number.parseFloat(e))),t}_maybeEnableSmoothScroll(){this._config.smoothScroll&&(T.off(this._config.target,pl),T.on(this._config.target,pl,vr,t=>{const e=this._observableSections.get(t.target.hash);if(e){t.preventDefault();const i=this._rootElement||window,s=e.offsetTop-this._element.offsetTop;if(i.scrollTo){i.scrollTo({top:s,behavior:"smooth"});return}i.scrollTop=s}}))}_getNewObserver(){const t={root:this._rootElement,threshold:this._config.threshold,rootMargin:this._config.rootMargin};return new IntersectionObserver(e=>this._observerCallback(e),t)}_observerCallback(t){const e=o=>this._targetLinks.get(`#${o.target.id}`),i=o=>{this._previousScrollData.visibleEntryTop=o.target.offsetTop,this._process(e(o))},s=(this._rootElement||document.documentElement).scrollTop,r=s>=this._previousScrollData.parentScrollTop;this._previousScrollData.parentScrollTop=s;for(const o of t){if(!o.isIntersecting){this._activeTarget=null,this._clearActiveClass(e(o));continue}const a=o.target.offsetTop>=this._previousScrollData.visibleEntryTop;if(r&&a){if(i(o),!s)return;continue}!r&&!a&&i(o)}}_initializeTargetsAndObservables(){this._targetLinks=new Map,this._observableSections=new Map;const t=M.find(vr,this._config.target);for(const e of t){if(!e.hash||Ne(e))continue;const i=M.findOne(decodeURI(e.hash),this._element);Ui(i)&&(this._targetLinks.set(decodeURI(e.hash),e),this._observableSections.set(e.hash,i))}}_process(t){this._activeTarget!==t&&(this._clearActiveClass(this._config.target),this._activeTarget=t,t.classList.add(yi),this._activateParents(t),T.trigger(this._element,m0,{relatedTarget:t}))}_activateParents(t){if(t.classList.contains(E0)){M.findOne(S0,t.closest(w0)).classList.add(yi);return}for(const e of M.parents(t,v0))for(const i of M.prev(e,C0))i.classList.add(yi)}_clearActiveClass(t){t.classList.remove(yi);const e=M.find(`${vr}.${yi}`,t);for(const i of e)i.classList.remove(yi)}static jQueryInterface(t){return this.each(function(){const e=Ks.getOrCreateInstance(this,t);if(typeof t=="string"){if(e[t]===void 0||t.startsWith("_")||t==="constructor")throw new TypeError(`No method named "${t}"`);e[t]()}})}}T.on(window,p0,()=>{for(const n of M.find(y0))Ks.getOrCreateInstance(n)});$t(Ks);const b0="tab",A0="bs.tab",hi=`.${A0}`,O0=`hide${hi}`,L0=`hidden${hi}`,D0=`show${hi}`,M0=`shown${hi}`,P0=`click${hi}`,N0=`keydown${hi}`,F0=`load${hi}`,k0="ArrowLeft",yl="ArrowRight",$0="ArrowUp",vl="ArrowDown",xr="Home",xl="End",Qe="active",Tl="fade",Tr="show",W0="dropdown",Pc=".dropdown-toggle",G0=".dropdown-menu",Cr=`:not(${Pc})`,Y0='.list-group, .nav, [role="tablist"]',V0=".nav-item, .list-group-item",X0=`.nav-link${Cr}, .list-group-item${Cr}, [role="tab"]${Cr}`,Nc='[data-bs-toggle="tab"], [data-bs-toggle="pill"], [data-bs-toggle="list"]',wr=`${X0}, ${Nc}`,z0=`.${Qe}[data-bs-toggle="tab"], .${Qe}[data-bs-toggle="pill"], .${Qe}[data-bs-toggle="list"]`;class zi extends Bt{constructor(t){super(t),this._parent=this._element.closest(Y0),this._parent&&(this._setInitialAttributes(this._parent,this._getChildren()),T.on(this._element,N0,e=>this._keydown(e)))}static get NAME(){return b0}show(){const t=this._element;if(this._elemIsActive(t))return;const e=this._getActiveElem(),i=e?T.trigger(e,O0,{relatedTarget:t}):null;T.trigger(t,D0,{relatedTarget:e}).defaultPrevented||i&&i.defaultPrevented||(this._deactivate(e,t),this._activate(t,e))}_activate(t,e){if(!t)return;t.classList.add(Qe),this._activate(M.getElementFromSelector(t));const i=()=>{if(t.getAttribute("role")!=="tab"){t.classList.add(Tr);return}t.removeAttribute("tabindex"),t.setAttribute("aria-selected",!0),this._toggleDropDown(t,!0),T.trigger(t,M0,{relatedTarget:e})};this._queueCallback(i,t,t.classList.contains(Tl))}_deactivate(t,e){if(!t)return;t.classList.remove(Qe),t.blur(),this._deactivate(M.getElementFromSelector(t));const i=()=>{if(t.getAttribute("role")!=="tab"){t.classList.remove(Tr);return}t.setAttribute("aria-selected",!1),t.setAttribute("tabindex","-1"),this._toggleDropDown(t,!1),T.trigger(t,L0,{relatedTarget:e})};this._queueCallback(i,t,t.classList.contains(Tl))}_keydown(t){if(![k0,yl,$0,vl,xr,xl].includes(t.key))return;t.stopPropagation(),t.preventDefault();const e=this._getChildren().filter(s=>!Ne(s));let i;if([xr,xl].includes(t.key))i=e[t.key===xr?0:e.length-1];else{const s=[yl,vl].includes(t.key);i=Go(e,t.target,s,!0)}i&&(i.focus({preventScroll:!0}),zi.getOrCreateInstance(i).show())}_getChildren(){return M.find(wr,this._parent)}_getActiveElem(){return this._getChildren().find(t=>this._elemIsActive(t))||null}_setInitialAttributes(t,e){this._setAttributeIfNotExists(t,"role","tablist");for(const i of e)this._setInitialAttributesOnChild(i)}_setInitialAttributesOnChild(t){t=this._getInnerElement(t);const e=this._elemIsActive(t),i=this._getOuterElement(t);t.setAttribute("aria-selected",e),i!==t&&this._setAttributeIfNotExists(i,"role","presentation"),e||t.setAttribute("tabindex","-1"),this._setAttributeIfNotExists(t,"role","tab"),this._setInitialAttributesOnTargetPanel(t)}_setInitialAttributesOnTargetPanel(t){const e=M.getElementFromSelector(t);e&&(this._setAttributeIfNotExists(e,"role","tabpanel"),t.id&&this._setAttributeIfNotExists(e,"aria-labelledby",`${t.id}`))}_toggleDropDown(t,e){const i=this._getOuterElement(t);if(!i.classList.contains(W0))return;const s=(r,o)=>{const a=M.findOne(r,i);a&&a.classList.toggle(o,e)};s(Pc,Qe),s(G0,Tr),i.setAttribute("aria-expanded",e)}_setAttributeIfNotExists(t,e,i){t.hasAttribute(e)||t.setAttribute(e,i)}_elemIsActive(t){return t.classList.contains(Qe)}_getInnerElement(t){return t.matches(wr)?t:M.findOne(wr,t)}_getOuterElement(t){return t.closest(V0)||t}static jQueryInterface(t){return this.each(function(){const e=zi.getOrCreateInstance(this);if(typeof t=="string"){if(e[t]===void 0||t.startsWith("_")||t==="constructor")throw new TypeError(`No method named "${t}"`);e[t]()}})}}T.on(document,P0,Nc,function(n){["A","AREA"].includes(this.tagName)&&n.preventDefault(),!Ne(this)&&zi.getOrCreateInstance(this).show()});T.on(window,F0,()=>{for(const n of M.find(z0))zi.getOrCreateInstance(n)});$t(zi);const B0="toast",K0="bs.toast",We=`.${K0}`,U0=`mouseover${We}`,H0=`mouseout${We}`,j0=`focusin${We}`,Z0=`focusout${We}`,q0=`hide${We}`,J0=`hidden${We}`,Q0=`show${We}`,tv=`shown${We}`,ev="fade",Cl="hide",is="show",ns="showing",iv={animation:"boolean",autohide:"boolean",delay:"number"},nv={animation:!0,autohide:!0,delay:5e3};class Us extends Bt{constructor(t,e){super(t,e),this._timeout=null,this._hasMouseInteraction=!1,this._hasKeyboardInteraction=!1,this._setListeners()}static get Default(){return nv}static get DefaultType(){return iv}static get NAME(){return B0}show(){if(T.trigger(this._element,Q0).defaultPrevented)return;this._clearTimeout(),this._config.animation&&this._element.classList.add(ev);const e=()=>{this._element.classList.remove(ns),T.trigger(this._element,tv),this._maybeScheduleHide()};this._element.classList.remove(Cl),Mn(this._element),this._element.classList.add(is,ns),this._queueCallback(e,this._element,this._config.animation)}hide(){if(!this.isShown()||T.trigger(this._element,q0).defaultPrevented)return;const e=()=>{this._element.classList.add(Cl),this._element.classList.remove(ns,is),T.trigger(this._element,J0)};this._element.classList.add(ns),this._queueCallback(e,this._element,this._config.animation)}dispose(){this._clearTimeout(),this.isShown()&&this._element.classList.remove(is),super.dispose()}isShown(){return this._element.classList.contains(is)}_maybeScheduleHide(){this._config.autohide&&(this._hasMouseInteraction||this._hasKeyboardInteraction||(this._timeout=setTimeout(()=>{this.hide()},this._config.delay)))}_onInteraction(t,e){switch(t.type){case"mouseover":case"mouseout":{this._hasMouseInteraction=e;break}case"focusin":case"focusout":{this._hasKeyboardInteraction=e;break}}if(e){this._clearTimeout();return}const i=t.relatedTarget;this._element===i||this._element.contains(i)||this._maybeScheduleHide()}_setListeners(){T.on(this._element,U0,t=>this._onInteraction(t,!0)),T.on(this._element,H0,t=>this._onInteraction(t,!1)),T.on(this._element,j0,t=>this._onInteraction(t,!0)),T.on(this._element,Z0,t=>this._onInteraction(t,!1))}_clearTimeout(){clearTimeout(this._timeout),this._timeout=null}static jQueryInterface(t){return this.each(function(){const e=Us.getOrCreateInstance(this,t);if(typeof t=="string"){if(typeof e[t]>"u")throw new TypeError(`No method named "${t}"`);e[t](this)}})}}Vs(Us);$t(Us);zu();const sv='<svg width="32px" height="32px" viewBox="-0.12 -0.12 12.24 12.24" enable-background="new 0 0 12 12" id="Слой_1" version="1.1" xml:space="preserve" xmlns="http://www.w3.org/2000/svg" xmlns:xlink="http://www.w3.org/1999/xlink" fill="#000000" stroke="#000000" stroke-width="0.12000000000000002"><g id="SVGRepo_bgCarrier" stroke-width="0"></g><g id="SVGRepo_tracerCarrier" stroke-linecap="round" stroke-linejoin="round"></g><g id="SVGRepo_iconCarrier"><path d="M6,0C3.2385864,0,1,2.2385864,1,5s2.5,5,5,7c2.5-2,5-4.2385864,5-7S8.7614136,0,6,0z M6,7 C4.8954468,7,4,6.1045532,4,5s0.8954468-2,2-2s2,0.8954468,2,2S7.1045532,7,6,7z" fill="#ed333b"></path></g></svg>',rv=new Blob([sv],{type:"image/svg+xml"}),ov=URL.createObjectURL(rv),av=new Es({image:new mo({src:ov,anchor:[.5,1],anchorXUnits:"fraction",anchorYUnits:"fraction"})});let Fc=new nu({geometry:new Ul([0,0]),store:"Null Store",cheapestItem:"Modelo",price:"8.99"});Fc.setStyle(av);const kc=new Uf;kc.addFeature(Fc);const lv=new Gf({source:kc}),jt=new f_({target:document.getElementById("map"),layers:[new J_({source:new nm}),lv],view:new de({center:[0,0],zoom:2})}),$c=document.getElementById("popup"),Wc=new __({element:$c,positioning:"bottom-center",stopEvent:!1});jt.addOverlay(Wc);let un;const Gc=()=>{un&&(un.dispose(),un=void 0)};jt.on("click",n=>{const t=jt.forEachFeatureAtPixel(n.pixel,e=>e);Gc(),t&&(Wc.setPosition(n.coordinate),un=new Bs($c,{placement:"top",html:!0,title:t.get("store"),content:`Cheapest Item: ${t.get("cheapestItem")}<br/>Price:$${t.get("price")}<br/>Cheapest $/oz.: $0.30`}),un.show())});jt.on("pointermove",n=>{jt.hasFeatureAtPixel(jt.getEventPixel(n.originalEvent))?jt.getTarget().style.cursor="pointer":jt.getTarget().style.cursor=""});jt.on("movestart",Gc);window.passLocation=(n,t)=>{jt.setView(new de({center:[n,t],zoom:18}))};
|
||
|
||
</script>
|
||
<style>
|
||
:root,:host{--ol-background-color: white;--ol-accent-background-color: #F5F5F5;--ol-subtle-background-color: rgba(128, 128, 128, .25);--ol-partial-background-color: rgba(255, 255, 255, .75);--ol-foreground-color: #333333;--ol-subtle-foreground-color: #666666;--ol-brand-color: #00AAFF}.ol-box{box-sizing:border-box;border-radius:2px;border:1.5px solid var(--ol-background-color);background-color:var(--ol-partial-background-color)}.ol-mouse-position{top:8px;right:8px;position:absolute}.ol-scale-line{background:var(--ol-partial-background-color);border-radius:4px;bottom:8px;left:8px;padding:2px;position:absolute}.ol-scale-line-inner{border:1px solid var(--ol-subtle-foreground-color);border-top:none;color:var(--ol-foreground-color);font-size:10px;text-align:center;margin:1px;will-change:contents,width;transition:all .25s}.ol-scale-bar{position:absolute;bottom:8px;left:8px}.ol-scale-bar-inner{display:flex}.ol-scale-step-marker{width:1px;height:15px;background-color:var(--ol-foreground-color);float:right;z-index:10}.ol-scale-step-text{position:absolute;bottom:-5px;font-size:10px;z-index:11;color:var(--ol-foreground-color);text-shadow:-1.5px 0 var(--ol-partial-background-color),0 1.5px var(--ol-partial-background-color),1.5px 0 var(--ol-partial-background-color),0 -1.5px var(--ol-partial-background-color)}.ol-scale-text{position:absolute;font-size:12px;text-align:center;bottom:25px;color:var(--ol-foreground-color);text-shadow:-1.5px 0 var(--ol-partial-background-color),0 1.5px var(--ol-partial-background-color),1.5px 0 var(--ol-partial-background-color),0 -1.5px var(--ol-partial-background-color)}.ol-scale-singlebar{position:relative;height:10px;z-index:9;box-sizing:border-box;border:1px solid var(--ol-foreground-color)}.ol-scale-singlebar-even{background-color:var(--ol-subtle-foreground-color)}.ol-scale-singlebar-odd{background-color:var(--ol-background-color)}.ol-unsupported{display:none}.ol-viewport,.ol-unselectable{-webkit-touch-callout:none;-webkit-user-select:none;-moz-user-select:none;user-select:none;-webkit-tap-highlight-color:transparent}.ol-viewport canvas{all:unset}.ol-selectable{-webkit-touch-callout:default;-webkit-user-select:text;-moz-user-select:text;user-select:text}.ol-grabbing{cursor:-webkit-grabbing;cursor:-moz-grabbing;cursor:grabbing}.ol-grab{cursor:move;cursor:-webkit-grab;cursor:-moz-grab;cursor:grab}.ol-control{position:absolute;background-color:var(--ol-subtle-background-color);border-radius:4px}.ol-zoom{top:.5em;left:.5em}.ol-rotate{top:.5em;right:.5em;transition:opacity .25s linear,visibility 0s linear}.ol-rotate.ol-hidden{opacity:0;visibility:hidden;transition:opacity .25s linear,visibility 0s linear .25s}.ol-zoom-extent{top:4.643em;left:.5em}.ol-full-screen{right:.5em;top:.5em}.ol-control button{display:block;margin:1px;padding:0;color:var(--ol-subtle-foreground-color);font-weight:700;text-decoration:none;font-size:inherit;text-align:center;height:1.375em;width:1.375em;line-height:.4em;background-color:var(--ol-background-color);border:none;border-radius:2px}.ol-control button::-moz-focus-inner{border:none;padding:0}.ol-zoom-extent button{line-height:1.4em}.ol-compass{display:block;font-weight:400;will-change:transform}.ol-touch .ol-control button{font-size:1.5em}.ol-touch .ol-zoom-extent{top:5.5em}.ol-control button:hover,.ol-control button:focus{text-decoration:none;outline:1px solid var(--ol-subtle-foreground-color);color:var(--ol-foreground-color)}.ol-zoom .ol-zoom-in{border-radius:2px 2px 0 0}.ol-zoom .ol-zoom-out{border-radius:0 0 2px 2px}.ol-attribution{text-align:right;bottom:.5em;right:.5em;max-width:calc(100% - 1.3em);display:flex;flex-flow:row-reverse;align-items:center}.ol-attribution a{color:var(--ol-subtle-foreground-color);text-decoration:none}.ol-attribution ul{margin:0;padding:1px .5em;color:var(--ol-foreground-color);text-shadow:0 0 2px var(--ol-background-color);font-size:12px}.ol-attribution li{display:inline;list-style:none}.ol-attribution li:not(:last-child):after{content:" "}.ol-attribution img{max-height:2em;max-width:inherit;vertical-align:middle}.ol-attribution button{flex-shrink:0}.ol-attribution.ol-collapsed ul{display:none}.ol-attribution:not(.ol-collapsed){background:var(--ol-partial-background-color)}.ol-attribution.ol-uncollapsible{bottom:0;right:0;border-radius:4px 0 0}.ol-attribution.ol-uncollapsible img{margin-top:-.2em;max-height:1.6em}.ol-attribution.ol-uncollapsible button{display:none}.ol-zoomslider{top:4.5em;left:.5em;height:200px}.ol-zoomslider button{position:relative;height:10px}.ol-touch .ol-zoomslider{top:5.5em}.ol-overviewmap{left:.5em;bottom:.5em}.ol-overviewmap.ol-uncollapsible{bottom:0;left:0;border-radius:0 4px 0 0}.ol-overviewmap .ol-overviewmap-map,.ol-overviewmap button{display:block}.ol-overviewmap .ol-overviewmap-map{border:1px solid var(--ol-subtle-foreground-color);height:150px;width:150px}.ol-overviewmap:not(.ol-collapsed) button{bottom:0;left:0;position:absolute}.ol-overviewmap.ol-collapsed .ol-overviewmap-map,.ol-overviewmap.ol-uncollapsible button{display:none}.ol-overviewmap:not(.ol-collapsed){background:var(--ol-subtle-background-color)}.ol-overviewmap-box{border:1.5px dotted var(--ol-subtle-foreground-color)}.ol-overviewmap .ol-overviewmap-box:hover{cursor:move}html,body{margin:0;height:100%}#map{position:absolute;top:0;bottom:0;width:100%}
|
||
|
||
</style>
|
||
</head>
|
||
<body>
|
||
<div id="map"><div id="popup"></div>
|
||
|
||
</body>
|
||
</html>
|