From af21fa3daa37e6a31fbeae89002a1127dc425f3b Mon Sep 17 00:00:00 2001 From: mpeltriaux Date: Tue, 31 Jan 2023 16:26:59 +0100 Subject: [PATCH 1/6] # WIP: Netgis Client Update --- templates/map/client/config.json | 8 +- templates/map/client/index.html | 6 +- .../libs/geopackage/4.2.3/geopackage.min.js | 3 + .../4.2.3/geopackage.min.js.LICENSE.txt | 34 + .../libs/geopackage/4.2.3/sql-wasm.wasm | Bin 0 -> 631155 bytes templates/map/client/libs/netgis/Client.js | 2 + templates/map/client/libs/netgis/Events.js | 17 +- .../map/client/libs/netgis/LayerTree.css | 24 + templates/map/client/libs/netgis/LayerTree.js | 93 ++- .../map/client/libs/netgis/MapOpenLayers.js | 712 ++++++++++++++---- templates/map/client/libs/netgis/Menu.js | 12 + templates/map/client/libs/netgis/Modal.css | 3 +- templates/map/client/libs/netgis/Modal.js | 412 ++++++++++ templates/map/client/libs/netgis/Toolbar.js | 121 ++- templates/map/client/libs/netgis/Util.js | 57 +- .../map/client/libs/openlayers/6.14.1/ol.css | 2 - .../client/libs/openlayers/6.14.1/ol.css.map | 1 - .../map/client/libs/openlayers/6.14.1/ol.js | 3 - .../libs/openlayers/6.14.1/ol.js.LICENSE.txt | 3 - .../client/libs/openlayers/6.14.1/ol.js.map | 1 - .../client/libs/openlayers/7.2.2/LICENSE.md | 25 + .../map/client/libs/openlayers/7.2.2/ol.css | 345 +++++++++ .../map/client/libs/openlayers/7.2.2/ol.js | 4 + .../client/libs/openlayers/7.2.2/ol.js.map | 1 + templates/map/client/libs/sqljs/1.8.0/sql.js | 218 ++++++ templates/map/client/netgis.min.css | 2 +- templates/map/client/netgis.min.js | 232 +++--- 27 files changed, 2090 insertions(+), 251 deletions(-) create mode 100644 templates/map/client/libs/geopackage/4.2.3/geopackage.min.js create mode 100644 templates/map/client/libs/geopackage/4.2.3/geopackage.min.js.LICENSE.txt create mode 100644 templates/map/client/libs/geopackage/4.2.3/sql-wasm.wasm delete mode 100644 templates/map/client/libs/openlayers/6.14.1/ol.css delete mode 100644 templates/map/client/libs/openlayers/6.14.1/ol.css.map delete mode 100644 templates/map/client/libs/openlayers/6.14.1/ol.js delete mode 100644 templates/map/client/libs/openlayers/6.14.1/ol.js.LICENSE.txt delete mode 100644 templates/map/client/libs/openlayers/6.14.1/ol.js.map create mode 100644 templates/map/client/libs/openlayers/7.2.2/LICENSE.md create mode 100644 templates/map/client/libs/openlayers/7.2.2/ol.css create mode 100644 templates/map/client/libs/openlayers/7.2.2/ol.js create mode 100644 templates/map/client/libs/openlayers/7.2.2/ol.js.map create mode 100644 templates/map/client/libs/sqljs/1.8.0/sql.js diff --git a/templates/map/client/config.json b/templates/map/client/config.json index 805f7e3..02b076b 100644 --- a/templates/map/client/config.json +++ b/templates/map/client/config.json @@ -95,7 +95,11 @@ "nameURL": "/client/proxy?https://geodaten.naturschutz.rlp.de/kartendienste_naturschutz/mod_alkis/gem_search.php?placename={q}", "parcelURL": "/client/proxy?https://geodaten.naturschutz.rlp.de/kartendienste_naturschutz/mod_alkis/flur_search.php?gmk_gmn={district}&fln={field}&fsn_zae={parcelA}&fsn_nen={parcelB}&export=json" }, - + + "import": + { + "geopackageLibURL": "/libs/geopackage/4.2.3/" + }, "export": { "logo": "/static/assets/logo.png", @@ -108,7 +112,7 @@ { "buffer": { - "defaultRadius": 2, + "defaultRadius": 5, "defaultSegments": 2 } }, diff --git a/templates/map/client/index.html b/templates/map/client/index.html index d9a9cd9..9d77add 100644 --- a/templates/map/client/index.html +++ b/templates/map/client/index.html @@ -1,7 +1,7 @@ {% load static %} - + @@ -24,12 +24,14 @@ - + + + diff --git a/templates/map/client/libs/geopackage/4.2.3/geopackage.min.js b/templates/map/client/libs/geopackage/4.2.3/geopackage.min.js new file mode 100644 index 0000000..415d9af --- /dev/null +++ b/templates/map/client/libs/geopackage/4.2.3/geopackage.min.js @@ -0,0 +1,3 @@ +/*! For license information please see geopackage.min.js.LICENSE.txt */ +!function(t,e){"object"==typeof exports&&"object"==typeof module?module.exports=e(function(){try{return require("better-sqlite3")}catch(t){}}()):"function"==typeof define&&define.amd?define(["better-sqlite3"],e):"object"==typeof exports?exports.GeoPackage=e(function(){try{return require("better-sqlite3")}catch(t){}}()):t.GeoPackage=e(t["better-sqlite3"])}(self,(function(__WEBPACK_EXTERNAL_MODULE__3730__){return(()=>{var __webpack_modules__={8927:(t,e,n)=>{var r,i=n(3085).Buffer,o=n(4155),a=n(5108),s=(r=(r="undefined"!=typeof document&&document.currentScript?document.currentScript.src:void 0)||"/index.js",function(t){var e,s,u,l;t=t||{},e||(e=void 0!==t?t:{}),e.ready=new Promise((function(t,e){s=t,u=e})),(l=e).Ud=l.Ud||[],l.Ud.push((function(){l.MakeSWCanvasSurface=function(t){var e=t;if("CANVAS"!==e.tagName&&!(e=document.getElementById(t)))throw"Canvas with id "+t+" was not found";return(t=l.MakeSurface(e.width,e.height))&&(t.Hd=e),t},l.MakeCanvasSurface||(l.MakeCanvasSurface=l.MakeSWCanvasSurface),l.MakeSurface=function(t,e){var n={width:t,height:e,colorType:l.ColorType.RGBA_8888,alphaType:l.AlphaType.Unpremul,colorSpace:l.ColorSpace.SRGB},r=t*e*4,i=l._malloc(r);return(n=l.Surface._makeRasterDirect(n,i,4*t))&&(n.Hd=null,n.zf=t,n.wf=e,n.yf=r,n.$e=i,n.getCanvas().clear(l.TRANSPARENT)),n},l.MakeRasterDirectSurface=function(t,e,n){return l.Surface._makeRasterDirect(t,e.byteOffset,n)},l.Surface.prototype.flush=function(t){if(this._flush(),this.Hd){var e=new Uint8ClampedArray(l.HEAPU8.buffer,this.$e,this.yf);e=new ImageData(e,this.zf,this.wf),t?this.Hd.getContext("2d").putImageData(e,0,0,t[0],t[1],t[2]-t[0],t[3]-t[1]):this.Hd.getContext("2d").putImageData(e,0,0)}},l.Surface.prototype.dispose=function(){this.$e&&l._free(this.$e),this.delete()},l.currentContext=l.currentContext||function(){},l.setCurrentContext=l.setCurrentContext||function(){}})),function(t){t.Ud=t.Ud||[],t.Ud.push((function(){function e(t,e,n){return t&&t.hasOwnProperty(e)?t[e]:n}t.GetWebGLContext=function(t,n){if(!t)throw"null canvas passed into makeWebGLContext";var r={alpha:e(n,"alpha",1),depth:e(n,"depth",1),stencil:e(n,"stencil",8),antialias:e(n,"antialias",0),premultipliedAlpha:e(n,"premultipliedAlpha",1),preserveDrawingBuffer:e(n,"preserveDrawingBuffer",0),preferLowPowerToHighPerformance:e(n,"preferLowPowerToHighPerformance",0),failIfMajorPerformanceCaveat:e(n,"failIfMajorPerformanceCaveat",0),enableExtensionsByDefault:e(n,"enableExtensionsByDefault",1),explicitSwapControl:e(n,"explicitSwapControl",0),renderViaOffscreenBackBuffer:e(n,"renderViaOffscreenBackBuffer",0)};if(r.majorVersion=n&&n.majorVersion?n.majorVersion:"undefined"!=typeof WebGL2RenderingContext?2:1,r.explicitSwapControl)throw"explicitSwapControl is not supported";return t=function(t,e){t.rf||(t.rf=t.getContext,t.getContext=function(e,n){return"webgl"==e==(n=t.rf(e,n))instanceof WebGLRenderingContext?n:null});var n=1t.version||!e.pf)&&(e.pf=e.getExtension("EXT_disjoint_timer_query")),e.tg=e.getExtension("WEBGL_multi_draw"),(e.getSupportedExtensions()||[]).forEach((function(t){t.includes("lose_context")||t.includes("debug")||e.getExtension(t)}))}}(r),n}(n,e):0}(t,r),t?(je(t),t):0},t.deleteContext=function(t){We===Pe[t]&&(We=null),"object"==typeof JSEvents&&JSEvents.wg(Pe[t].Ce.canvas),Pe[t]&&Pe[t].Ce.canvas&&(Pe[t].Ce.canvas.jf=void 0),Pe[t]=null},t.MakeWebGLCanvasSurface=function(e,n,r){n=n||null;var i=e,o="undefined"!=typeof OffscreenCanvas&&i instanceof OffscreenCanvas;if(!("undefined"!=typeof HTMLCanvasElement&&i instanceof HTMLCanvasElement||o||(i=document.getElementById(e),i)))throw"Canvas with id "+e+" was not found";if(!(e=this.GetWebGLContext(i,r))||0>e)throw"failed to create webgl context: err "+e;return r=this.MakeGrContext(e),(n=this.MakeOnScreenGLSurface(r,i.width,i.height,n))?(n.he=e,n.grContext=r,n.openGLversion=i.jf.version,n):(n=i.cloneNode(!0),i.parentNode.replaceChild(n,i),n.classList.add("ck-replaced"),t.MakeSWCanvasSurface(n))},t.MakeCanvasSurface=t.MakeWebGLCanvasSurface}))}(e),function(t){function e(t,e,n,r,i){for(var o=0;o>>0}function a(t){if(t instanceof Float32Array){for(var e=Math.floor(t.length/4),n=new Uint32Array(e),r=0;rs;s++)t.HEAPF32[o+i]=e[a][s],i++;e=r}else e=X;n.Zd=e}return n}function f(e){if(!e)return X;if(e.length){if(6===e.length||9===e.length)return c(e,"HEAPF32",P),6===e.length&&t.HEAPF32.set(z,6+P/4),P;if(16===e.length){var n=E.toTypedArray();return n[0]=e[0],n[1]=e[1],n[2]=e[3],n[3]=e[4],n[4]=e[5],n[5]=e[7],n[6]=e[12],n[7]=e[13],n[8]=e[15],P}throw"invalid matrix size"}return(n=E.toTypedArray())[0]=e.m11,n[1]=e.m21,n[2]=e.m41,n[3]=e.m12,n[4]=e.m22,n[5]=e.m42,n[6]=e.m14,n[7]=e.m24,n[8]=e.m44,P}function p(e){for(var n=Array(16),r=0;16>r;r++)n[r]=t.HEAPF32[e/4+r];return n}function d(t,e){return c(t,"HEAPF32",e||L)}function y(t,e,n,r){var i=x.toTypedArray();return i[0]=t,i[1]=e,i[2]=n,i[3]=r,L}function m(e){for(var n=new Float32Array(4),r=0;4>r;r++)n[r]=t.HEAPF32[e/4+r];return n}function g(t,e){return c(t,"HEAPF32",e||F)}function _(t,e){return c(t,"HEAPF32",e||q)}function b(){for(var t=0,e=0;e>>0},t.Color4f=function(t,e,n,r){return void 0===r&&(r=1),Float32Array.of(t,e,n,r)},Object.defineProperty(t,"TRANSPARENT",{get:function(){return t.Color4f(0,0,0,0)}}),Object.defineProperty(t,"BLACK",{get:function(){return t.Color4f(0,0,0,1)}}),Object.defineProperty(t,"WHITE",{get:function(){return t.Color4f(1,1,1,1)}}),Object.defineProperty(t,"RED",{get:function(){return t.Color4f(1,0,0,1)}}),Object.defineProperty(t,"GREEN",{get:function(){return t.Color4f(0,1,0,1)}}),Object.defineProperty(t,"BLUE",{get:function(){return t.Color4f(0,0,1,1)}}),Object.defineProperty(t,"YELLOW",{get:function(){return t.Color4f(1,1,0,1)}}),Object.defineProperty(t,"CYAN",{get:function(){return t.Color4f(0,1,1,1)}}),Object.defineProperty(t,"MAGENTA",{get:function(){return t.Color4f(1,0,1,1)}}),t.getColorComponents=function(t){return[Math.floor(255*t[0]),Math.floor(255*t[1]),Math.floor(255*t[2]),t[3]]},t.parseColorString=function(e,n){if((e=e.toLowerCase()).startsWith("#")){switch(n=255,e.length){case 9:n=parseInt(e.slice(7,9),16);case 7:var r=parseInt(e.slice(1,3),16),i=parseInt(e.slice(3,5),16),o=parseInt(e.slice(5,7),16);break;case 5:n=17*parseInt(e.slice(4,5),16);case 4:r=17*parseInt(e.slice(1,2),16),i=17*parseInt(e.slice(2,3),16),o=17*parseInt(e.slice(3,4),16)}return t.Color(r,i,o,n/255)}return e.startsWith("rgba")?(e=(e=e.slice(5,-1)).split(","),t.Color(+e[0],+e[1],+e[2],s(e[3]))):e.startsWith("rgb")?(e=(e=e.slice(4,-1)).split(","),t.Color(+e[0],+e[1],+e[2],s(e[3]))):e.startsWith("gray(")||e.startsWith("hsl")||!n||void 0===(e=n[e])?t.BLACK:e},t.multiplyByAlpha=function(t,e){return(t=t.slice())[3]=Math.max(0,Math.min(t[3]*e,1)),t},t.Malloc=function(e,n){var r=t._malloc(n*e.BYTES_PER_ELEMENT);return{_ck:!0,length:n,byteOffset:r,je:null,subarray:function(t,e){return(t=this.toTypedArray().subarray(t,e))._ck=!0,t},toTypedArray:function(){return this.je&&this.je.length||(this.je=new e(t.HEAPU8.buffer,r,n),this.je._ck=!0),this.je}}},t.Free=function(e){t._free(e.byteOffset),e.byteOffset=X,e.toTypedArray=null,e.je=null};var E,w,x,C,M,S,N,O,A,I,P=X,R=X,L=X,F=X,U=X,j=X,G=X,W=X,q=X,H=X,z=Float32Array.of(0,0,1),V={};t.ke=function(){this.ge=[],this.Od=null,Object.defineProperty(this,"length",{enumerable:!0,get:function(){return this.ge.length/4}})},t.ke.prototype.push=function(t,e,n,r){this.Od||this.ge.push(t,e,n,r)},t.ke.prototype.set=function(e,n,r,i,o){0>e||e>=this.ge.length/4||(e*=4,this.Od?(e=this.Od/4+e,t.HEAPF32[e]=n,t.HEAPF32[e+1]=r,t.HEAPF32[e+2]=i,t.HEAPF32[e+3]=o):(this.ge[e]=n,this.ge[e+1]=r,this.ge[e+2]=i,this.ge[e+3]=o))},t.ke.prototype.build=function(){return this.Od?this.Od:this.Od=c(this.ge,"HEAPF32")},t.ke.prototype.delete=function(){this.Od&&(t._free(this.Od),this.Od=null)},t.De=function(){this.Ie=[],this.Od=null,Object.defineProperty(this,"length",{enumerable:!0,get:function(){return this.Ie.length}})},t.De.prototype.push=function(t){this.Od||this.Ie.push(t)},t.De.prototype.set=function(e,n){0>e||e>=this.Ie.length||(e*=4,this.Od?t.HEAPU32[this.Od/4+e]=n:this.Ie[e]=n)},t.De.prototype.build=function(){return this.Od?this.Od:this.Od=c(this.Ie,"HEAPU32")},t.De.prototype.delete=function(){this.Od&&(t._free(this.Od),this.Od=null)},t.RectBuilder=t.ke,t.RSXFormBuilder=t.ke,t.ColorBuilder=t.De;var X=0,Y=!new Function("try {return this===window;}catch(e){ return false;}")();t.onRuntimeInitialized=function(){function e(e,n,r,i,o,a){a||(a=4*i.width,i.colorType===t.ColorType.RGBA_F16?a*=2:i.colorType===t.ColorType.RGBA_F32&&(a*=4));var s=a*i.height,u=o?o.byteOffset:t._malloc(s);if(!e._readPixels(i,u,a,n,r))return o||t._free(u),null;if(o)return o.toTypedArray();switch(i.colorType){case t.ColorType.RGBA_8888:case t.ColorType.RGBA_F16:e=new Uint8Array(t.HEAPU8.buffer,u,s).slice();break;case t.ColorType.RGBA_F32:e=new Float32Array(t.HEAPU8.buffer,u,s).slice();break;default:return null}return t._free(u),e}x=t.Malloc(Float32Array,4),L=x.byteOffset,w=t.Malloc(Float32Array,16),R=w.byteOffset,E=t.Malloc(Float32Array,9),P=E.byteOffset,A=t.Malloc(Float32Array,12),q=A.byteOffset,I=t.Malloc(Float32Array,12),H=I.byteOffset,C=t.Malloc(Float32Array,4),F=C.byteOffset,M=t.Malloc(Float32Array,4),U=M.byteOffset,S=t.Malloc(Float32Array,3),j=S.byteOffset,N=t.Malloc(Float32Array,3),G=N.byteOffset,O=t.Malloc(Int32Array,4),W=O.byteOffset,t.ColorSpace.SRGB=t.ColorSpace._MakeSRGB(),t.ColorSpace.DISPLAY_P3=t.ColorSpace._MakeDisplayP3(),t.ColorSpace.ADOBE_RGB=t.ColorSpace._MakeAdobeRGB(),t.Path.MakeFromCmds=function(e){for(var n=0,r=0;rn;n++)e[n]=t.HEAPF32[P/4+n];return e},t.Canvas.prototype.readPixels=function(t,n,r,i,o){return e(this,t,n,r,i,o)},t.Canvas.prototype.saveLayer=function(t,e,n,r){return e=g(e),this._saveLayer(t||null,e,n||null,r||0)},t.Canvas.prototype.writePixels=function(e,n,r,i,o,a,s,u){if(e.byteLength%(n*r))throw"pixels length must be a multiple of the srcWidth * srcHeight";var h=e.byteLength/(n*r);a=a||t.AlphaType.Unpremul,s=s||t.ColorType.RGBA_8888,u=u||t.ColorSpace.SRGB;var f=h*n;return h=c(e,"HEAPU8"),n=this._writePixels({width:n,height:r,colorType:s,alphaType:a,colorSpace:u},h,f,i,o),l(h,e),n},t.ColorFilter.MakeBlend=function(e,n){return e=d(e),t.ColorFilter._MakeBlend(e,n)},t.ColorFilter.MakeMatrix=function(e){if(!e||20!==e.length)throw"invalid color matrix";var n=c(e,"HEAPF32"),r=t.ColorFilter._makeMatrix(n);return l(n,e),r},t.ContourMeasure.prototype.getPosTan=function(t,e){return this._getPosTan(t,F),t=C.toTypedArray(),e?(e.set(t),e):t.slice()},t.ImageFilter.MakeMatrixTransform=function(e,n,r){return e=f(e),t.ImageFilter._MakeMatrixTransform(e,n,r)},t.Paint.prototype.getColor=function(){return this._getColor(L),m(L)},t.Paint.prototype.setColor=function(t,e){e=e||null,t=d(t),this._setColor(t,e)},t.Paint.prototype.setColorComponents=function(t,e,n,r,i){i=i||null,t=y(t,e,n,r),this._setColor(t,i)},t.Path.prototype.getPoint=function(t,e){return this._getPoint(t,F),t=C.toTypedArray(),e?(e[0]=t[0],e[1]=t[1],e):t.slice(0,2)},t.PictureRecorder.prototype.beginRecording=function(t){return t=g(t),this._beginRecording(t)},t.Surface.prototype.makeImageSnapshot=function(t){return t=c(t,"HEAP32",W),this._makeImageSnapshot(t)},t.Surface.prototype.requestAnimationFrame=function(e,n){this.Ee||(this.Ee=this.getCanvas()),requestAnimationFrame(function(){void 0!==this.he&&t.setCurrentContext(this.he),e(this.Ee),this.flush(n)}.bind(this))},t.Surface.prototype.drawOnce=function(e,n){this.Ee||(this.Ee=this.getCanvas()),requestAnimationFrame(function(){void 0!==this.he&&t.setCurrentContext(this.he),e(this.Ee),this.flush(n),this.dispose()}.bind(this))},t.PathEffect.MakeDash=function(e,n){if(n||(n=0),!e.length||1==e.length%2)throw"Intervals array must have even length";var r=c(e,"HEAPF32");return n=t.PathEffect._MakeDash(r,e.length,n),l(r,e),n},t.Shader.MakeColor=function(e,n){return n=n||null,e=d(e),t.Shader._MakeColor(e,n)},t.Shader.Blend=t.Shader.MakeBlend,t.Shader.Color=t.Shader.MakeColor,t.Shader.Lerp=t.Shader.MakeLerp,t.Shader.MakeLinearGradient=function(e,n,r,i,o,a,s,u){u=u||null;var p=h(r),d=c(i,"HEAPF32");s=s||0,a=f(a);var y=C.toTypedArray();return y.set(e),y.set(n,2),e=t.Shader._MakeLinearGradient(F,p.Zd,p.Je,d,p.count,o,s,a,u),l(p.Zd,r),i&&l(d,i),e},t.Shader.MakeRadialGradient=function(e,n,r,i,o,a,s,u){u=u||null;var p=h(r),d=c(i,"HEAPF32");return s=s||0,a=f(a),e=t.Shader._MakeRadialGradient(e[0],e[1],n,p.Zd,p.Je,d,p.count,o,s,a,u),l(p.Zd,r),i&&l(d,i),e},t.Shader.MakeSweepGradient=function(e,n,r,i,o,a,s,u,p,d){d=d||null;var y=h(r),m=c(i,"HEAPF32");return s=s||0,u=u||0,p=p||360,a=f(a),e=t.Shader._MakeSweepGradient(e,n,y.Zd,y.Je,m,y.count,o,u,p,s,a,d),l(y.Zd,r),i&&l(m,i),e},t.Shader.MakeTwoPointConicalGradient=function(e,n,r,i,o,a,s,u,p,d){d=d||null;var y=h(o),m=c(a,"HEAPF32");p=p||0,u=f(u);var g=C.toTypedArray();return g.set(e),g.set(r,2),e=t.Shader._MakeTwoPointConicalGradient(F,n,i,y.Zd,y.Je,m,y.count,s,p,u,d),l(y.Zd,o),a&&l(m,a),e},t.Vertices.prototype.bounds=function(t){this._bounds(F);var e=C.toTypedArray();return t?(t.set(e),t):e.slice()},t.Ud&&t.Ud.forEach((function(t){t()}))},t.computeTonalColors=function(t){var e=c(t.ambient,"HEAPF32"),n=c(t.spot,"HEAPF32");this._computeTonalColors(e,n);var r={ambient:m(e),spot:m(n)};return l(e,t.ambient),l(n,t.spot),r},t.LTRBRect=function(t,e,n,r){return Float32Array.of(t,e,n,r)},t.XYWHRect=function(t,e,n,r){return Float32Array.of(t,e,t+n,e+r)},t.LTRBiRect=function(t,e,n,r){return Int32Array.of(t,e,n,r)},t.XYWHiRect=function(t,e,n,r){return Int32Array.of(t,e,t+n,e+r)},t.RRectXY=function(t,e,n){return Float32Array.of(t[0],t[1],t[2],t[3],e,n,e,n,e,n,e,n)},t.MakeAnimatedImageFromEncoded=function(e){e=new Uint8Array(e);var n=t._malloc(e.byteLength);return t.HEAPU8.set(e,n),(e=t._decodeAnimatedImage(n,e.byteLength))?e:null},t.MakeImageFromEncoded=function(e){e=new Uint8Array(e);var n=t._malloc(e.byteLength);return t.HEAPU8.set(e,n),(e=t._decodeImage(n,e.byteLength))?e:null};var Z=null;t.MakeImageFromCanvasImageSource=function(e){var n=e.width,r=e.height;Z||(Z=document.createElement("canvas")),Z.width=n,Z.height=r;var i=Z.getContext("2d");return i.drawImage(e,0,0),e=i.getImageData(0,0,n,r),t.MakeImage({width:n,height:r,alphaType:t.AlphaType.Unpremul,colorType:t.ColorType.RGBA_8888,colorSpace:t.ColorSpace.SRGB},e.data,4*n)},t.MakeImage=function(e,n,r){var i=t._malloc(n.length);return t.HEAPU8.set(n,i),t._MakeImage(e,i,n.length,r)},t.MakeVertices=function(e,n,r,i,o,s){var u=o&&o.length||0,l=0;if(r&&r.length&&(l|=1),i&&i.length&&(l|=2),void 0===s||s||(l|=4),c(n,"HEAPF32",(e=new t._VerticesBuilder(e,n.length/2,u,l)).positions()),e.texCoords()&&c(r,"HEAPF32",e.texCoords()),e.colors()){if(i.build)throw"Color builder not accepted by MakeVertices, use array of ints";c(a(i),"HEAPU32",e.colors())}return e.indices()&&c(o,"HEAPU16",e.indices()),e.detach()},t.Matrix={},t.Matrix.identity=function(){return n(3)},t.Matrix.invert=function(t){var e=t[0]*t[4]*t[8]+t[1]*t[5]*t[6]+t[2]*t[3]*t[7]-t[2]*t[4]*t[6]-t[1]*t[3]*t[8]-t[0]*t[5]*t[7];return e?[(t[4]*t[8]-t[5]*t[7])/e,(t[2]*t[7]-t[1]*t[8])/e,(t[1]*t[5]-t[2]*t[4])/e,(t[5]*t[6]-t[3]*t[8])/e,(t[0]*t[8]-t[2]*t[6])/e,(t[2]*t[3]-t[0]*t[5])/e,(t[3]*t[7]-t[4]*t[6])/e,(t[1]*t[6]-t[0]*t[7])/e,(t[0]*t[4]-t[1]*t[3])/e]:null},t.Matrix.mapPoints=function(t,e){for(var n=0;ni;i+=5){for(var o=0;4>o;o++)n[r++]=t[i]*e[o]+t[i+1]*e[o+5]+t[i+2]*e[o+10]+t[i+3]*e[o+15];n[r++]=t[i]*e[4]+t[i+1]*e[9]+t[i+2]*e[14]+t[i+3]*e[19]+t[i+4]}return n},t.Ud=t.Ud||[],t.Ud.push((function(){t.Path.prototype.op=function(t,e){return this._op(t,e)?this:null},t.Path.prototype.simplify=function(){return this._simplify()?this:null}})),t.Ud=t.Ud||[],t.Ud.push((function(){t.Canvas.prototype.drawText=function(e,n,r,i,o){var a=k(e),s=t._malloc(a+1);D(e,B,s,a+1),this._drawSimpleText(s,a,n,r,o,i),t._free(s)},t.Font.prototype.getGlyphBounds=function(e,n,r){var i=c(e,"HEAPU16"),o=t._malloc(16*e.length);return this._getGlyphWidthBounds(i,e.length,X,o,n||null),n=new Float32Array(t.HEAPU8.buffer,o,4*e.length),l(i,e),r?(r.set(n),t._free(o),r):(e=Float32Array.from(n),t._free(o),e)},t.Font.prototype.getGlyphIDs=function(e,n,r){n||(n=e.length);var i=k(e)+1,o=t._malloc(i);return D(e,B,o,i),e=t._malloc(2*n),n=this._getGlyphIDs(o,i-1,n,e),t._free(o),0>n?(t._free(e),null):(o=new Uint16Array(t.HEAPU8.buffer,e,n),r?(r.set(o),t._free(e),r):(r=Uint32Array.from(o),t._free(e),r))},t.Font.prototype.getGlyphWidths=function(e,n,r){var i=c(e,"HEAPU16"),o=t._malloc(4*e.length);return this._getGlyphWidthBounds(i,e.length,o,X,n||null),n=new Float32Array(t.HEAPU8.buffer,o,e.length),l(i,e),r?(r.set(n),t._free(o),r):(e=Float32Array.from(n),t._free(o),e)},t.FontMgr.FromData=function(){if(!arguments.length)return null;var e=arguments;if(1===e.length&&Array.isArray(e[0])&&(e=arguments[0]),!e.length)return null;for(var n=[],r=[],i=0;is.length()){if(s.delete(),!(s=n.next())){e=e.substring(0,l);break}i=c/2}s.getPosTan(i,u);var h=u[2],f=u[3];o.push(h,f,u[0]-c/2*h,u[1]-c/2*f),i+=c/2}return e=this.MakeFromRSXform(e,o,r),o.delete(),s&&s.delete(),n.delete(),e}},t.TextBlob.MakeFromRSXform=function(e,n,r){var i=k(e)+1,o=t._malloc(i);return D(e,B,o,i),e=n.build?n.build():c(n,"HEAPF32"),r=t.TextBlob._MakeFromRSXform(o,i-1,e,r),t._free(o),r||null},t.TextBlob.MakeFromRSXformGlyphs=function(e,n,r){var i=c(e,"HEAPU16");return n=n.build?n.build():c(n,"HEAPF32"),r=t.TextBlob._MakeFromRSXformGlyphs(i,2*e.length,n,r),l(i,e),r||null},t.TextBlob.MakeFromGlyphs=function(e,n){var r=c(e,"HEAPU16");return n=t.TextBlob._MakeFromGlyphs(r,2*e.length,n),l(r,e),n||null},t.TextBlob.MakeFromText=function(e,n){var r=k(e)+1,i=t._malloc(r);return D(e,B,i,r),e=t.TextBlob._MakeFromText(i,r-1,n),t._free(i),e||null},t.MallocGlyphIDs=function(e){return t.Malloc(Uint16Array,e)}})),function(){function e(t){for(var e=0;et||1=t||!t||(this.He=t,this.Jd.setStrokeWidth(t))}}),Object.defineProperty(this,"miterLimit",{enumerable:!0,get:function(){return this.Jd.getStrokeMiter()},set:function(t){0>=t||!t||this.Jd.setStrokeMiter(t)}}),Object.defineProperty(this,"shadowBlur",{enumerable:!0,get:function(){return this.qe},set:function(t){0>t||!isFinite(t)||(this.qe=t)}}),Object.defineProperty(this,"shadowColor",{enumerable:!0,get:function(){return n(this.Ge)},set:function(t){this.Ge=o(t)}}),Object.defineProperty(this,"shadowOffsetX",{enumerable:!0,get:function(){return this.re},set:function(t){isFinite(t)&&(this.re=t)}}),Object.defineProperty(this,"shadowOffsetY",{enumerable:!0,get:function(){return this.se},set:function(t){isFinite(t)&&(this.se=t)}}),Object.defineProperty(this,"strokeStyle",{enumerable:!0,get:function(){return n(this.be)},set:function(t){"string"==typeof t?this.be=o(t):t.oe&&(this.be=t)}}),this.arc=function(t,e,n,r,i,o){d(this.Ld,t,e,n,n,0,r,i,o)},this.arcTo=function(t,e,n,r,i){h(this.Ld,t,e,n,r,i)},this.beginPath=function(){this.Ld.delete(),this.Ld=new t.Path},this.bezierCurveTo=function(t,n,r,i,o,a){var s=this.Ld;e([t,n,r,i,o,a])&&(s.isEmpty()&&s.moveTo(t,n),s.cubicTo(t,n,r,i,o,a))},this.clearRect=function(e,n,r,i){this.Jd.setStyle(t.PaintStyle.Fill),this.Jd.setBlendMode(t.BlendMode.Clear),this.Hd.drawRect(t.XYWHRect(e,n,r,i),this.Jd),this.Jd.setBlendMode(this.Id)},this.clip=function(e,n){"string"==typeof e?(n=e,e=this.Ld):e&&e.Ze&&(e=e.Pd),e||(e=this.Ld),e=e.copy(),n&&"evenodd"===n.toLowerCase()?e.setFillType(t.FillType.EvenOdd):e.setFillType(t.FillType.Winding),this.Hd.clipPath(e,t.ClipOp.Intersect,!0),e.delete()},this.closePath=function(){f(this.Ld)},this.createImageData=function(){if(1===arguments.length){var t=arguments[0];return new l(new Uint8ClampedArray(4*t.width*t.height),t.width,t.height)}if(2===arguments.length){t=arguments[0];var e=arguments[1];return new l(new Uint8ClampedArray(4*t*e),t,e)}throw"createImageData expects 1 or 2 arguments, got "+arguments.length},this.createLinearGradient=function(t,n,r,i){if(e(arguments)){var o=new c(t,n,r,i);return this.we.push(o),o}},this.createPattern=function(t,e){return t=new g(t,e),this.we.push(t),t},this.createRadialGradient=function(t,n,r,i,o,a){if(e(arguments)){var s=new _(t,n,r,i,o,a);return this.we.push(s),s}},this.drawImage=function(e){var n=this.Ne();if(3===arguments.length||5===arguments.length)var r=t.XYWHRect(arguments[1],arguments[2],arguments[3]||e.width(),arguments[4]||e.height()),i=t.XYWHRect(0,0,e.width(),e.height());else{if(9!==arguments.length)throw"invalid number of args for drawImage, need 3, 5, or 9; got "+arguments.length;r=t.XYWHRect(arguments[5],arguments[6],arguments[7],arguments[8]),i=t.XYWHRect(arguments[1],arguments[2],arguments[3],arguments[4])}this.Hd.drawImageRect(e,i,r,n,!1),n.dispose()},this.ellipse=function(t,e,n,r,i,o,a,s){d(this.Ld,t,e,n,r,i,o,a,s)},this.Ne=function(){var e=this.Jd.copy();if(e.setStyle(t.PaintStyle.Fill),r(this.Wd)){var n=t.multiplyByAlpha(this.Wd,this.de);e.setColor(n)}else n=this.Wd.oe(this.Nd),e.setColor(t.Color(0,0,0,this.de)),e.setShader(n);return e.dispose=function(){this.delete()},e},this.fill=function(e,n){if("string"==typeof e?(n=e,e=this.Ld):e&&e.Ze&&(e=e.Pd),"evenodd"===n)this.Ld.setFillType(t.FillType.EvenOdd);else{if("nonzero"!==n&&n)throw"invalid fill rule";this.Ld.setFillType(t.FillType.Winding)}e||(e=this.Ld),n=this.Ne();var r=this.te(n);r&&(this.Hd.save(),this.le(),this.Hd.drawPath(e,r),this.Hd.restore(),r.dispose()),this.Hd.drawPath(e,n),n.dispose()},this.fillRect=function(e,n,r,i){var o=this.Ne(),a=this.te(o);a&&(this.Hd.save(),this.le(),this.Hd.drawRect(t.XYWHRect(e,n,r,i),a),this.Hd.restore(),a.dispose()),this.Hd.drawRect(t.XYWHRect(e,n,r,i),o),o.dispose()},this.fillText=function(e,n,r){var i=this.Ne();e=t.TextBlob.MakeFromText(e,this.ne);var o=this.te(i);o&&(this.Hd.save(),this.le(),this.Hd.drawTextBlob(e,n,r,o),this.Hd.restore(),o.dispose()),this.Hd.drawTextBlob(e,n,r,i),e.delete(),i.dispose()},this.getImageData=function(e,n,r,i){return(e=this.Hd.readPixels(e,n,{width:r,height:i,colorType:t.ColorType.RGBA_8888,alphaType:t.AlphaType.Unpremul,colorSpace:t.ColorSpace.SRGB}))?new l(new Uint8ClampedArray(e.buffer),r,i):null},this.getLineDash=function(){return this.pe.slice()},this.lf=function(e){var n=t.Matrix.invert(this.Nd);return t.Matrix.mapPoints(n,e),e},this.isPointInPath=function(e,n,r){var i=arguments;if(3===i.length)var o=this.Ld;else{if(4!==i.length)throw"invalid arg count, need 3 or 4, got "+i.length;o=i[0],e=i[1],n=i[2],r=i[3]}return!(!isFinite(e)||!isFinite(n))&&("nonzero"===(r=r||"nonzero")||"evenodd"===r)&&(e=(i=this.lf([e,n]))[0],n=i[1],o.setFillType("nonzero"===r?t.FillType.Winding:t.FillType.EvenOdd),o.contains(e,n))},this.isPointInStroke=function(e,n){var r=arguments;if(2===r.length)var i=this.Ld;else{if(3!==r.length)throw"invalid arg count, need 2 or 3, got "+r.length;i=r[0],e=r[1],n=r[2]}return!(!isFinite(e)||!isFinite(n))&&(e=(r=this.lf([e,n]))[0],n=r[1],(i=i.copy()).setFillType(t.FillType.Winding),i.stroke({width:this.lineWidth,miter_limit:this.miterLimit,cap:this.Jd.getStrokeCap(),join:this.Jd.getStrokeJoin(),precision:.3}),r=i.contains(e,n),i.delete(),r)},this.lineTo=function(t,e){y(this.Ld,t,e)},this.measureText=function(){throw Error("Clients wishing to properly measure text should use the Paragraph API")},this.moveTo=function(t,n){var r=this.Ld;e([t,n])&&r.moveTo(t,n)},this.putImageData=function(n,r,i,o,a,s,u){if(e([r,i,o,a,s,u]))if(void 0===o)this.Hd.writePixels(n.data,n.width,n.height,r,i);else if(o=o||0,a=a||0,s=s||n.width,u=u||n.height,0>s&&(o+=s,s=Math.abs(s)),0>u&&(a+=u,u=Math.abs(u)),0>o&&(s+=o,o=0),0>a&&(u+=a,a=0),!(0>=s||0>=u)){n=t.MakeImage({width:n.width,height:n.height,alphaType:t.AlphaType.Unpremul,colorType:t.ColorType.RGBA_8888,colorSpace:t.ColorSpace.SRGB},n.data,4*n.width);var l=t.XYWHRect(o,a,s,u);r=t.XYWHRect(r+o,i+a,s,u),i=t.Matrix.invert(this.Nd),this.Hd.save(),this.Hd.concat(i),this.Hd.drawImageRect(n,l,r,null,!1),this.Hd.restore(),n.delete()}},this.quadraticCurveTo=function(t,n,r,i){var o=this.Ld;e([t,n,r,i])&&(o.isEmpty()&&o.moveTo(t,n),o.quadTo(t,n,r,i))},this.rect=function(n,r,i,o){var a=this.Ld;e(n=t.XYWHRect(n,r,i,o))&&a.addRect(n)},this.resetTransform=function(){this.Ld.transform(this.Nd);var e=t.Matrix.invert(this.Nd);this.Hd.concat(e),this.Nd=this.Hd.getTotalMatrix()},this.restore=function(){var e=this.kf.pop();if(e){var n=t.Matrix.multiply(this.Nd,t.Matrix.invert(e.Cf));this.Ld.transform(n),this.Jd.delete(),this.Jd=e.Zf,this.pe=e.Vf,this.He=e.lg,this.be=e.kg,this.Wd=e.fs,this.re=e.ig,this.se=e.jg,this.qe=e.cg,this.Ge=e.hg,this.de=e.Jf,this.Id=e.Kf,this.Fe=e.Wf,this.Oe=e.If,this.Hd.restore(),this.Nd=this.Hd.getTotalMatrix()}},this.rotate=function(e){if(isFinite(e)){var n=t.Matrix.rotated(-e);this.Ld.transform(n),this.Hd.rotate(e/Math.PI*180,0,0),this.Nd=this.Hd.getTotalMatrix()}},this.save=function(){if(this.Wd.me){var t=this.Wd.me();this.we.push(t)}else t=this.Wd;if(this.be.me){var e=this.be.me();this.we.push(e)}else e=this.be;this.kf.push({Cf:this.Nd.slice(),Vf:this.pe.slice(),lg:this.He,kg:e,fs:t,ig:this.re,jg:this.se,cg:this.qe,hg:this.Ge,Jf:this.de,Wf:this.Fe,Kf:this.Id,Zf:this.Jd.copy(),If:this.Oe}),this.Hd.save()},this.scale=function(n,r){if(e(arguments)){var i=t.Matrix.scaled(1/n,1/r);this.Ld.transform(i),this.Hd.scale(n,r),this.Nd=this.Hd.getTotalMatrix()}},this.setLineDash=function(t){for(var e=0;et[e])return;1==t.length%2&&Array.prototype.push.apply(t,t),this.pe=t},this.setTransform=function(t,n,r,i,o,a){e(arguments)&&(this.resetTransform(),this.transform(t,n,r,i,o,a))},this.le=function(){var e=t.Matrix.invert(this.Nd);this.Hd.concat(e),this.Hd.concat(t.Matrix.translated(this.re,this.se)),this.Hd.concat(this.Nd)},this.te=function(e){var n=t.multiplyByAlpha(this.Ge,this.de);if(!t.getColorComponents(n)[3]||!(this.qe||this.se||this.re))return null;(e=e.copy()).setColor(n);var r=t.MaskFilter.MakeBlur(t.BlurStyle.Normal,this.qe/2,!1);return e.setMaskFilter(r),e.dispose=function(){r.delete(),this.delete()},e},this.af=function(){var e=this.Jd.copy();if(e.setStyle(t.PaintStyle.Stroke),r(this.be)){var n=t.multiplyByAlpha(this.be,this.de);e.setColor(n)}else n=this.be.oe(this.Nd),e.setColor(t.Color(0,0,0,this.de)),e.setShader(n);if(e.setStrokeWidth(this.He),this.pe.length){var i=t.PathEffect.MakeDash(this.pe,this.Fe);e.setPathEffect(i)}return e.dispose=function(){i&&i.delete(),this.delete()},e},this.stroke=function(t){t=t?t.Pd:this.Ld;var e=this.af(),n=this.te(e);n&&(this.Hd.save(),this.le(),this.Hd.drawPath(t,n),this.Hd.restore(),n.dispose()),this.Hd.drawPath(t,e),e.dispose()},this.strokeRect=function(e,n,r,i){var o=this.af(),a=this.te(o);a&&(this.Hd.save(),this.le(),this.Hd.drawRect(t.XYWHRect(e,n,r,i),a),this.Hd.restore(),a.dispose()),this.Hd.drawRect(t.XYWHRect(e,n,r,i),o),o.dispose()},this.strokeText=function(e,n,r){var i=this.af();e=t.TextBlob.MakeFromText(e,this.ne);var o=this.te(i);o&&(this.Hd.save(),this.le(),this.Hd.drawTextBlob(e,n,r,o),this.Hd.restore(),o.dispose()),this.Hd.drawTextBlob(e,n,r,i),e.delete(),i.dispose()},this.translate=function(n,r){if(e(arguments)){var i=t.Matrix.translated(-n,-r);this.Ld.transform(i),this.Hd.translate(n,r),this.Nd=this.Hd.getTotalMatrix()}},this.transform=function(e,n,r,i,o,a){e=[e,r,o,n,i,a,0,0,1],n=t.Matrix.invert(e),this.Ld.transform(n),this.Hd.concat(e),this.Nd=this.Hd.getTotalMatrix()},this.addHitRegion=function(){},this.clearHitRegions=function(){},this.drawFocusIfNeeded=function(){},this.removeHitRegion=function(){},this.scrollPathIntoView=function(){},Object.defineProperty(this,"canvas",{value:null,writable:!1})}function u(e){this.bf=e,this.he=new s(e.getCanvas()),this.Pe=[],this.vf=t.FontMgr.RefDefault(),this.decodeImage=function(e){if(!(e=t.MakeImageFromEncoded(e)))throw"Invalid input";return this.Pe.push(e),e},this.loadFont=function(t,e){if(!(t=this.vf.MakeTypefaceFromData(t)))return null;this.Pe.push(t);var n=(e.style||"normal")+"|"+(e.variant||"normal")+"|"+(e.weight||"normal");e=e.family,T[e]||(T[e]={"*":t}),T[e][n]=t},this.makePath2D=function(t){return t=new m(t),this.Pe.push(t.Pd),t},this.getContext=function(t){return"2d"===t?this.he:null},this.toDataURL=function(e,n){this.bf.flush();var r=this.bf.makeImageSnapshot();if(r){e=e||"image/png";var o=t.ImageFormat.PNG;if("image/jpeg"===e&&(o=t.ImageFormat.JPEG),n=r.encodeToBytes(o,n||.92)){if(r.delete(),e="data:"+e+";base64,",Y)n=i.from(n).toString("base64");else{r=0,o=n.length;for(var a,s="";rt||1t);n++);this.Td.splice(n,0,t),this.Yd.splice(n,0,e)}},this.me=function(){var t=new c(e,n,r,i);return t.Yd=this.Yd.slice(),t.Td=this.Td.slice(),t},this.fe=function(){this.Rd&&(this.Rd.delete(),this.Rd=null)},this.oe=function(o){var a=[e,n,r,i];t.Matrix.mapPoints(o,a),o=a[0];var s=a[1],u=a[2];return a=a[3],this.fe(),this.Rd=t.Shader.MakeLinearGradient([o,s],[u,a],this.Yd,this.Td,t.TileMode.Clamp)}}function h(t,n,r,i,o,a){if(e([n,r,i,o,a])){if(0>a)throw"radii cannot be negative";t.isEmpty()&&t.moveTo(n,r),t.arcToTangent(n,r,i,o,a)}}function f(t){if(!t.isEmpty()){var e=t.getBounds();(e[3]-e[1]||e[2]-e[0])&&t.close()}}function p(e,n,r,i,o,a,s){s=(s-a)/Math.PI*180,a=a/Math.PI*180,n=t.LTRBRect(n-i,r-o,n+i,r+o),1e-5>Math.abs(Math.abs(s)-360)?(r=s/2,e.arcToOval(n,a,r,!1),e.arcToOval(n,a+r,r,!1)):e.arcToOval(n,a,s,!1)}function d(n,r,i,o,a,s,u,l,c){if(e([r,i,o,a,s,u,l])){if(0>o||0>a)throw"radii cannot be negative";var h=2*Math.PI,f=u%h;0>f&&(f+=h);var d=f-u;u=f,l+=d,!c&&l-u>=h?l=u+h:c&&u-l>=h?l=u-h:!c&&u>l?l=u+(h-(u-l)%h):c&&ut||1t);n++);this.Td.splice(n,0,t),this.Yd.splice(n,0,e)}},this.me=function(){var t=new _(e,n,r,i,a,s);return t.Yd=this.Yd.slice(),t.Td=this.Td.slice(),t},this.fe=function(){this.Rd&&(this.Rd.delete(),this.Rd=null)},this.oe=function(o){var u=[e,n,i,a];t.Matrix.mapPoints(o,u);var l=u[0],c=u[1],h=u[2];u=u[3];var f=(Math.abs(o[0])+Math.abs(o[4]))/2;return o=r*f,f*=s,this.fe(),this.Rd=t.Shader.MakeTwoPointConicalGradient([l,c],o,[h,u],f,this.Yd,this.Td,t.TileMode.Clamp)}}t._testing={};var b={aliceblue:Float32Array.of(.941,.973,1,1),antiquewhite:Float32Array.of(.98,.922,.843,1),aqua:Float32Array.of(0,1,1,1),aquamarine:Float32Array.of(.498,1,.831,1),azure:Float32Array.of(.941,1,1,1),beige:Float32Array.of(.961,.961,.863,1),bisque:Float32Array.of(1,.894,.769,1),black:Float32Array.of(0,0,0,1),blanchedalmond:Float32Array.of(1,.922,.804,1),blue:Float32Array.of(0,0,1,1),blueviolet:Float32Array.of(.541,.169,.886,1),brown:Float32Array.of(.647,.165,.165,1),burlywood:Float32Array.of(.871,.722,.529,1),cadetblue:Float32Array.of(.373,.62,.627,1),chartreuse:Float32Array.of(.498,1,0,1),chocolate:Float32Array.of(.824,.412,.118,1),coral:Float32Array.of(1,.498,.314,1),cornflowerblue:Float32Array.of(.392,.584,.929,1),cornsilk:Float32Array.of(1,.973,.863,1),crimson:Float32Array.of(.863,.078,.235,1),cyan:Float32Array.of(0,1,1,1),darkblue:Float32Array.of(0,0,.545,1),darkcyan:Float32Array.of(0,.545,.545,1),darkgoldenrod:Float32Array.of(.722,.525,.043,1),darkgray:Float32Array.of(.663,.663,.663,1),darkgreen:Float32Array.of(0,.392,0,1),darkgrey:Float32Array.of(.663,.663,.663,1),darkkhaki:Float32Array.of(.741,.718,.42,1),darkmagenta:Float32Array.of(.545,0,.545,1),darkolivegreen:Float32Array.of(.333,.42,.184,1),darkorange:Float32Array.of(1,.549,0,1),darkorchid:Float32Array.of(.6,.196,.8,1),darkred:Float32Array.of(.545,0,0,1),darksalmon:Float32Array.of(.914,.588,.478,1),darkseagreen:Float32Array.of(.561,.737,.561,1),darkslateblue:Float32Array.of(.282,.239,.545,1),darkslategray:Float32Array.of(.184,.31,.31,1),darkslategrey:Float32Array.of(.184,.31,.31,1),darkturquoise:Float32Array.of(0,.808,.82,1),darkviolet:Float32Array.of(.58,0,.827,1),deeppink:Float32Array.of(1,.078,.576,1),deepskyblue:Float32Array.of(0,.749,1,1),dimgray:Float32Array.of(.412,.412,.412,1),dimgrey:Float32Array.of(.412,.412,.412,1),dodgerblue:Float32Array.of(.118,.565,1,1),firebrick:Float32Array.of(.698,.133,.133,1),floralwhite:Float32Array.of(1,.98,.941,1),forestgreen:Float32Array.of(.133,.545,.133,1),fuchsia:Float32Array.of(1,0,1,1),gainsboro:Float32Array.of(.863,.863,.863,1),ghostwhite:Float32Array.of(.973,.973,1,1),gold:Float32Array.of(1,.843,0,1),goldenrod:Float32Array.of(.855,.647,.125,1),gray:Float32Array.of(.502,.502,.502,1),green:Float32Array.of(0,.502,0,1),greenyellow:Float32Array.of(.678,1,.184,1),grey:Float32Array.of(.502,.502,.502,1),honeydew:Float32Array.of(.941,1,.941,1),hotpink:Float32Array.of(1,.412,.706,1),indianred:Float32Array.of(.804,.361,.361,1),indigo:Float32Array.of(.294,0,.51,1),ivory:Float32Array.of(1,1,.941,1),khaki:Float32Array.of(.941,.902,.549,1),lavender:Float32Array.of(.902,.902,.98,1),lavenderblush:Float32Array.of(1,.941,.961,1),lawngreen:Float32Array.of(.486,.988,0,1),lemonchiffon:Float32Array.of(1,.98,.804,1),lightblue:Float32Array.of(.678,.847,.902,1),lightcoral:Float32Array.of(.941,.502,.502,1),lightcyan:Float32Array.of(.878,1,1,1),lightgoldenrodyellow:Float32Array.of(.98,.98,.824,1),lightgray:Float32Array.of(.827,.827,.827,1),lightgreen:Float32Array.of(.565,.933,.565,1),lightgrey:Float32Array.of(.827,.827,.827,1),lightpink:Float32Array.of(1,.714,.757,1),lightsalmon:Float32Array.of(1,.627,.478,1),lightseagreen:Float32Array.of(.125,.698,.667,1),lightskyblue:Float32Array.of(.529,.808,.98,1),lightslategray:Float32Array.of(.467,.533,.6,1),lightslategrey:Float32Array.of(.467,.533,.6,1),lightsteelblue:Float32Array.of(.69,.769,.871,1),lightyellow:Float32Array.of(1,1,.878,1),lime:Float32Array.of(0,1,0,1),limegreen:Float32Array.of(.196,.804,.196,1),linen:Float32Array.of(.98,.941,.902,1),magenta:Float32Array.of(1,0,1,1),maroon:Float32Array.of(.502,0,0,1),mediumaquamarine:Float32Array.of(.4,.804,.667,1),mediumblue:Float32Array.of(0,0,.804,1),mediumorchid:Float32Array.of(.729,.333,.827,1),mediumpurple:Float32Array.of(.576,.439,.859,1),mediumseagreen:Float32Array.of(.235,.702,.443,1),mediumslateblue:Float32Array.of(.482,.408,.933,1),mediumspringgreen:Float32Array.of(0,.98,.604,1),mediumturquoise:Float32Array.of(.282,.82,.8,1),mediumvioletred:Float32Array.of(.78,.082,.522,1),midnightblue:Float32Array.of(.098,.098,.439,1),mintcream:Float32Array.of(.961,1,.98,1),mistyrose:Float32Array.of(1,.894,.882,1),moccasin:Float32Array.of(1,.894,.71,1),navajowhite:Float32Array.of(1,.871,.678,1),navy:Float32Array.of(0,0,.502,1),oldlace:Float32Array.of(.992,.961,.902,1),olive:Float32Array.of(.502,.502,0,1),olivedrab:Float32Array.of(.42,.557,.137,1),orange:Float32Array.of(1,.647,0,1),orangered:Float32Array.of(1,.271,0,1),orchid:Float32Array.of(.855,.439,.839,1),palegoldenrod:Float32Array.of(.933,.91,.667,1),palegreen:Float32Array.of(.596,.984,.596,1),paleturquoise:Float32Array.of(.686,.933,.933,1),palevioletred:Float32Array.of(.859,.439,.576,1),papayawhip:Float32Array.of(1,.937,.835,1),peachpuff:Float32Array.of(1,.855,.725,1),peru:Float32Array.of(.804,.522,.247,1),pink:Float32Array.of(1,.753,.796,1),plum:Float32Array.of(.867,.627,.867,1),powderblue:Float32Array.of(.69,.878,.902,1),purple:Float32Array.of(.502,0,.502,1),rebeccapurple:Float32Array.of(.4,.2,.6,1),red:Float32Array.of(1,0,0,1),rosybrown:Float32Array.of(.737,.561,.561,1),royalblue:Float32Array.of(.255,.412,.882,1),saddlebrown:Float32Array.of(.545,.271,.075,1),salmon:Float32Array.of(.98,.502,.447,1),sandybrown:Float32Array.of(.957,.643,.376,1),seagreen:Float32Array.of(.18,.545,.341,1),seashell:Float32Array.of(1,.961,.933,1),sienna:Float32Array.of(.627,.322,.176,1),silver:Float32Array.of(.753,.753,.753,1),skyblue:Float32Array.of(.529,.808,.922,1),slateblue:Float32Array.of(.416,.353,.804,1),slategray:Float32Array.of(.439,.502,.565,1),slategrey:Float32Array.of(.439,.502,.565,1),snow:Float32Array.of(1,.98,.98,1),springgreen:Float32Array.of(0,1,.498,1),steelblue:Float32Array.of(.275,.51,.706,1),tan:Float32Array.of(.824,.706,.549,1),teal:Float32Array.of(0,.502,.502,1),thistle:Float32Array.of(.847,.749,.847,1),tomato:Float32Array.of(1,.388,.278,1),transparent:Float32Array.of(0,0,0,0),turquoise:Float32Array.of(.251,.878,.816,1),violet:Float32Array.of(.933,.51,.933,1),wheat:Float32Array.of(.961,.871,.702,1),white:Float32Array.of(1,1,1,1),whitesmoke:Float32Array.of(.961,.961,.961,1),yellow:Float32Array.of(1,1,0,1),yellowgreen:Float32Array.of(.604,.804,.196,1)};t._testing.parseColor=o,t._testing.colorToString=n;var v=/(italic|oblique|normal|)\s*(small-caps|normal|)\s*(bold|bolder|lighter|[1-9]00|normal|)\s*([\d\.]+)(px|pt|pc|in|cm|mm|%|em|ex|ch|rem|q)(.+)/,T={"Noto Mono":{"*":null},monospace:{"*":null}};t._testing.parseFontString=a,t.MakeCanvas=function(e,n){return(e=t.MakeSurface(e,n))?new u(e):null},t.ImageData=function(){if(2===arguments.length){var t=arguments[0],e=arguments[1];return new l(new Uint8ClampedArray(4*t*e),t,e)}if(3===arguments.length){var n=arguments[0];if(n.prototype.constructor!==Uint8ClampedArray)throw"bytes must be given as a Uint8ClampedArray";if(n%4)throw"bytes must be given in a multiple of 4";if(n%(t=arguments[1]))throw"bytes must divide evenly by width";if((e=arguments[2])&&e!==n/(4*t))throw"invalid height given";return new l(n,t,n/(4*t))}throw"invalid number of arguments - takes 2 or 3, saw "+arguments.length}}()}(e);var c,h={};for(c in e)e.hasOwnProperty(c)&&(h[c]=e[c]);var f,p,d,y,m="./this.program";function g(t,e){throw e}f="object"==typeof window,p="function"==typeof importScripts,d="object"==typeof o&&"object"==typeof o.versions&&"string"==typeof o.versions.node,y=!f&&!d&&!p;var _,b,v,T,E,w="";d?(w=p?n(3935).dirname(w)+"/":"//",_=function(t,e){return T||(T=n(5699)),E||(E=n(3935)),t=E.normalize(t),T.readFileSync(t,e?null:"utf8")},v=function(t){return(t=_(t,!0)).buffer||(t=new Uint8Array(t)),I(t.buffer),t},1=r);)++n;if(16(i=224==(240&i)?(15&i)<<12|o<<6|a:(7&i)<<18|o<<12|a<<6|63&t[e++])?r+=String.fromCharCode(i):(i-=65536,r+=String.fromCharCode(55296|i>>10,56320|1023&i))}}else r+=String.fromCharCode(i)}return r}function L(t,e){return t?R(B,t,e):""}function D(t,e,n,r){if(!(0=a&&(a=65536+((1023&a)<<10)|1023&t.charCodeAt(++o)),127>=a){if(n>=r)break;e[n++]=a}else{if(2047>=a){if(n+1>=r)break;e[n++]=192|a>>6}else{if(65535>=a){if(n+2>=r)break;e[n++]=224|a>>12}else{if(n+3>=r)break;e[n++]=240|a>>18,e[n++]=128|a>>12&63}e[n++]=128|a>>6&63}e[n++]=128|63&a}}return e[n]=0,n-i}function k(t){for(var e=0,n=0;n=r&&(r=65536+((1023&r)<<10)|1023&t.charCodeAt(++n)),127>=r?++e:e=2047>=r?e+2:65535>=r?e+3:e+4}return e}var F,U,B,j,G,W,q,H,z,V="undefined"!=typeof TextDecoder?new TextDecoder("utf-16le"):void 0;function X(t,e){for(var n=t>>1,r=n+e/2;!(n>=r)&&G[n];)++n;if(32<(n<<=1)-t&&V)return V.decode(B.subarray(t,n));for(n="",r=0;!(r>=e/2);++r){var i=j[t+2*r>>1];if(0==i)break;n+=String.fromCharCode(i)}return n}function Y(t,e,n){if(void 0===n&&(n=2147483647),2>n)return 0;var r=e;n=(n-=2)<2*t.length?n/2:t.length;for(var i=0;i>1]=t.charCodeAt(i),e+=2;return j[e>>1]=0,e-r}function Z(t){return 2*t.length}function Q(t,e){for(var n=0,r="";!(n>=e/4);){var i=W[t+4*n>>2];if(0==i)break;++n,65536<=i?(i-=65536,r+=String.fromCharCode(55296|i>>10,56320|1023&i)):r+=String.fromCharCode(i)}return r}function K(t,e,n){if(void 0===n&&(n=2147483647),4>n)return 0;var r=e;n=r+n-4;for(var i=0;i=o&&(o=65536+((1023&o)<<10)|1023&t.charCodeAt(++i)),W[e>>2]=o,(e+=4)+4>n)break}return W[e>>2]=0,e-r}function J(t){for(var e=0,n=0;n=r&&++n,e+=4}return e}function $(){var t=O.buffer;F=t,e.HEAP8=U=new Int8Array(t),e.HEAP16=j=new Int16Array(t),e.HEAP32=W=new Int32Array(t),e.HEAPU8=B=new Uint8Array(t),e.HEAPU16=G=new Uint16Array(t),e.HEAPU32=q=new Uint32Array(t),e.HEAPF32=H=new Float32Array(t),e.HEAPF64=z=new Float64Array(t)}var tt,et=[],nt=[],rt=[];function it(){var t=e.preRun.shift();et.unshift(t)}var ot=0,at=null,st=null;function ut(t){throw e.onAbort&&e.onAbort(t),C(t),A=!0,t=new WebAssembly.RuntimeError("abort("+t+"). Build with -s ASSERTIONS=1 for more info."),u(t),t}function lt(){return ct.startsWith("data:application/octet-stream;base64,")}e.preloadedImages={},e.preloadedAudios={};var ct="canvaskit.wasm";if(!lt()){var ht=ct;ct=e.locateFile?e.locateFile(ht,w):w+ht}function ft(){var t=ct;try{if(t==ct&&M)return new Uint8Array(M);if(v)return v(t);throw"both async and sync fetching of the wasm failed"}catch(t){ut(t)}}function pt(t){for(;0>2])}var vt={},Tt={},Et={};function wt(t){if(void 0===t)return"_unknown";var e=(t=t.replace(/[^a-zA-Z0-9_]/g,"$")).charCodeAt(0);return 48<=e&&57>=e?"_"+t:t}function xt(t,e){return t=wt(t),new Function("body","return function "+t+'() {\n "use strict"; return body.apply(this, arguments);\n};\n')(e)}function Ct(t){var e=Error,n=xt(t,(function(e){this.name=t,this.message=e,void 0!==(e=Error(e).stack)&&(this.stack=this.toString()+"\n"+e.replace(/^Error(:[^\n]*)?\n/,""))}));return n.prototype=Object.create(e.prototype),n.prototype.constructor=n,n.prototype.toString=function(){return void 0===this.message?this.name:this.name+": "+this.message},n}var Mt=void 0;function St(t){throw new Mt(t)}function Nt(t,e,n){function r(e){(e=n(e)).length!==t.length&&St("Mismatched type converter count");for(var r=0;ro&&Rt("argTypes array size mismatch! Must at least get return value and 'this' types!");var a=null!==e[1]&&null!==n,s=!1;for(n=1;n>2)+r]);return n}var ce=[],he=[{},{value:void 0},{value:null},{value:!0},{value:!1}];function fe(t){4>1])};case 2:return function(t){return this.fromWireType((n?W:q)[t>>2])};default:throw new TypeError("Unknown integer type: "+t)}}function ye(t,e){var n=Tt[t];return void 0===n&&Rt(e+" has unknown type "+oe(t)),n}function me(t){if(null===t)return"null";var e=typeof t;return"object"===e||"array"===e||"function"===e?t.toString():""+t}function ge(t,e){switch(e){case 2:return function(t){return this.fromWireType(H[t>>2])};case 3:return function(t){return this.fromWireType(z[t>>3])};default:throw new TypeError("Unknown float type: "+t)}}function _e(t,e,n){switch(e){case 0:return n?function(t){return U[t]}:function(t){return B[t]};case 1:return n?function(t){return j[t>>1]}:function(t){return G[t>>1]};case 2:return n?function(t){return W[t>>2]}:function(t){return q[t>>2]};default:throw new TypeError("Unknown integer type: "+t)}}var be={};function ve(t){var e=be[t];return void 0===e?It(t):e}var Te,Ee=[];function we(t){return t||Rt("Cannot use deleted val. handle = "+t),he[t].value}Te=d?function(){var t=o.hrtime();return 1e3*t[0]+t[1]/1e6}:"undefined"!=typeof dateNow?dateNow:function(){return performance.now()};var xe=1,Ce=[],Me=[],Se=[],Ne=[],Oe=[],Ae=[],Ie=[],Pe=[],Re=[],Le=[],De={},ke={},Fe=4;function Ue(t){Ge||(Ge=t)}function Be(t){for(var e=xe++,n=t.length;n>2]=a}}function ze(t,e){if(e){var n=void 0;switch(t){case 36346:n=1;break;case 36344:return;case 34814:case 36345:n=0;break;case 34466:var r=ln.getParameter(34467);n=r?r.length:0;break;case 33309:if(2>We.version)return void Ue(1282);n=2*(ln.getSupportedExtensions()||[]).length;break;case 33307:case 33308:if(2>We.version)return void Ue(1280);n=33307==t?3:0}if(void 0===n)switch(r=ln.getParameter(t),typeof r){case"number":n=r;break;case"boolean":n=r?1:0;break;case"string":return void Ue(1280);case"object":if(null===r)switch(t){case 34964:case 35725:case 34965:case 36006:case 36007:case 32873:case 34229:case 36662:case 36663:case 35053:case 35055:case 36010:case 35097:case 35869:case 32874:case 36389:case 35983:case 35368:case 34068:n=0;break;default:return void Ue(1280)}else{if(r instanceof Float32Array||r instanceof Uint32Array||r instanceof Int32Array||r instanceof Array){for(t=0;t>2]=r[t];return}try{n=0|r.name}catch(e){return Ue(1280),void C("GL_INVALID_ENUM in glGet0v: Unknown object returned from WebGL getParameter("+t+")! (error: "+e+")")}}break;default:return Ue(1280),void C("GL_INVALID_ENUM in glGet0v: Native code calling glGet0v("+t+") and it returns "+r+" of type "+typeof r+"!")}W[e>>2]=n}else Ue(1281)}function Ve(t){var e=k(t)+1,n=gn(e);return D(t,B,n,e),n}function Xe(t){return 0==(t-=5120)?U:1==t?B:2==t?j:4==t?W:6==t?H:5==t||28922==t||28520==t||30779==t||30782==t?q:G}function Ye(t,e,n,r,i){t=Xe(t);var o=31-Math.clz32(t.BYTES_PER_ELEMENT),a=Fe;return t.subarray(i>>o,i+r*(n*({5:3,6:4,8:2,29502:3,29504:4,26917:2,26918:2,29846:3,29847:4}[e-6402]||1)*(1<>o)}function Ze(t){var e=ln.Df,n=e.Ye[t];return 0<=n&&(e.Ye[t]=n=ln.getUniformLocation(e,e.uf[t]+(0un;++un)sn[un]=String.fromCharCode(un);At=sn,Pt=e.BindingError=Ct("BindingError"),qt.prototype.isAliasOf=function(t){if(!(this instanceof qt&&t instanceof qt))return!1;var e=this.Gd.Qd.Kd,n=this.Gd.Md,r=t.Gd.Qd.Kd;for(t=t.Gd.Md;e.ce;)n=e.Me(n),e=e.ce;for(;r.ce;)t=r.Me(t),r=r.ce;return e===r&&n===t},qt.prototype.clone=function(){if(this.Gd.Md||Dt(this),this.Gd.Ke)return this.Gd.count.value+=1,this;var t=Bt,e=Object,n=e.create,r=Object.getPrototypeOf(this),i=this.Gd;return(t=t(n.call(e,r,{Gd:{value:{count:i.count,ze:i.ze,Ke:i.Ke,Md:i.Md,Qd:i.Qd,Xd:i.Xd,ae:i.ae}}}))).Gd.count.value+=1,t.Gd.ze=!1,t},qt.prototype.delete=function(){this.Gd.Md||Dt(this),this.Gd.ze&&!this.Gd.Ke&&Rt("Object already scheduled for deletion"),Ft(this),Ut(this.Gd),this.Gd.Ke||(this.Gd.Xd=void 0,this.Gd.Md=void 0)},qt.prototype.isDeleted=function(){return!this.Gd.Md},qt.prototype.deleteLater=function(){return this.Gd.Md||Dt(this),this.Gd.ze&&!this.Gd.Ke&&Rt("Object already scheduled for deletion"),Gt.push(this),1===Gt.length&&jt&&jt(Wt),this.Gd.ze=!0,this},ee.prototype.Mf=function(t){return this.tf&&(t=this.tf(t)),t},ee.prototype.mf=function(t){this.ee&&this.ee(t)},ee.prototype.argPackAdvance=8,ee.prototype.readValueFromPointer=bt,ee.prototype.deleteObject=function(t){null!==t&&t.delete()},ee.prototype.fromWireType=function(t){function e(){return this.Re?te(this.Kd.Ae,{Qd:this.$f,Md:n,ae:this,Xd:t}):te(this.Kd.Ae,{Qd:this,Md:t})}var n=this.Mf(t);if(!n)return this.mf(t),null;var r=function(t,e){for(void 0===e&&Rt("ptr should not be undefined");t.ce;)e=t.Me(e),t=t.ce;return $t[e]}(this.Kd,n);if(void 0!==r)return 0===r.Gd.count.value?(r.Gd.Md=n,r.Gd.Xd=t,r.clone()):(r=r.clone(),this.mf(t),r);if(r=this.Kd.Lf(n),!(r=Ht[r]))return e.call(this);r=this.Qe?r.Bf:r.pointerType;var i=Jt(n,this.Kd,r.Kd);return null===i?e.call(this):this.Re?te(r.Kd.Ae,{Qd:r,Md:i,ae:this,Xd:t}):te(r.Kd.Ae,{Qd:r,Md:i})},e.getInheritedInstanceCount=function(){return Object.keys($t).length},e.getLiveInheritedInstances=function(){var t,e=[];for(t in $t)$t.hasOwnProperty(t)&&e.push($t[t]);return e},e.flushPendingDeletes=Wt,e.setDelayFunction=function(t){jt=t,Gt.length&&jt&&jt(Wt)},ie=e.UnboundTypeError=Ct("UnboundTypeError"),e.count_emval_handles=function(){for(var t=0,e=5;ecn;++cn)qe.push(Array(cn));var hn=new Float32Array(288);for(cn=0;288>cn;++cn)Ke[cn]=hn.subarray(0,cn+1);var fn=new Int32Array(288);for(cn=0;288>cn;++cn)Je[cn]=fn.subarray(0,cn+1);var pn={F:function(){return 0},xb:function(){},zb:function(){return 0},vb:function(t,e,n,r,i,o){return o<<=12,0!=(16&r)&&0!=t%65536?e=-28:0!=(32&r)?(t=wn(65536,e))?(dn(t,0,e),dt[t]={Yf:t,Xf:e,Af:!0,fd:i,vg:n,flags:r,offset:o},e=t):e=-48:e=-52,e},ub:function(t,e){if(-1==(0|t)||0===e)t=-28;else{var n=dt[t];n&&e===n.Xf&&(dt[t]=null,n.Af&&mn(n.Yf)),t=0}return t},Bb:function(){},wb:function(){},E:function(t){var e=gt[t];delete gt[t];var n=e.ff,r=e.ee,i=e.qf;Nt([t],i.map((function(t){return t.Qf})).concat(i.map((function(t){return t.eg}))),(function(t){var o={};return i.forEach((function(e,n){var r=t[n],a=e.Of,s=e.Pf,u=t[n+i.length],l=e.dg,c=e.fg;o[e.Hf]={read:function(t){return r.fromWireType(a(s,t))},write:function(t,e){var n=[];l(c,t,u.toWireType(n,e)),_t(n)}}})),[{name:e.name,fromWireType:function(t){var e,n={};for(e in o)n[e]=o[e].read(t);return r(t),n},toWireType:function(t,e){for(var i in o)if(!(i in e))throw new TypeError('Missing field: "'+i+'"');var a=n();for(i in o)o[i].write(a,e[i]);return null!==t&&t.push(r,a),a},argPackAdvance:8,readValueFromPointer:bt,$d:r}]}))},nb:function(){},Db:function(t,e,n,r,i){var o=Ot(n);Lt(t,{name:e=It(e),fromWireType:function(t){return!!t},toWireType:function(t,e){return e?r:i},argPackAdvance:8,readValueFromPointer:function(t){if(1===n)var r=U;else if(2===n)r=j;else{if(4!==n)throw new TypeError("Unknown boolean type size: "+e);r=W}return this.fromWireType(r[t>>o])},$d:null})},k:function(t,e,n,r,i,o,a,s,u,l,c,h,f){c=It(c),o=re(i,o),s&&(s=re(a,s)),l&&(l=re(u,l)),f=re(h,f);var p=wt(c);Vt(p,(function(){ae("Cannot construct "+c+" due to unbound types",[r])})),Nt([t,e,n],r?[r]:[],(function(e){if(e=e[0],r)var n=e.Kd,i=n.Ae;else i=qt.prototype;e=xt(p,(function(){if(Object.getPrototypeOf(this)!==a)throw new Pt("Use 'new' to construct "+c);if(void 0===u.ie)throw new Pt(c+" has no accessible constructor");var t=u.ie[arguments.length];if(void 0===t)throw new Pt("Tried to invoke ctor of "+c+" with invalid number of parameters ("+arguments.length+") - expected ("+Object.keys(u.ie).toString()+") parameters instead!");return t.apply(this,arguments)}));var a=Object.create(i,{constructor:{value:e}});e.prototype=a;var u=new Xt(c,e,a,f,n,o,s,l);n=new ee(c,u,!0,!1,!1),i=new ee(c+"*",u,!1,!1,!1);var h=new ee(c+" const*",u,!1,!0,!1);return Ht[t]={pointerType:i,Bf:h},ne(p,e),[n,i,h]}))},f:function(t,e,n,r,i,o,a){var s=le(n,r);e=It(e),o=re(i,o),Nt([],[t],(function(t){function r(){ae("Cannot call "+i+" due to unbound types",s)}var i=(t=t[0]).name+"."+e,u=t.Kd.constructor;return void 0===u[e]?(r.xe=n-1,u[e]=r):(zt(u,e,i),u[e].Sd[n-1]=r),Nt([],s,(function(t){return t=[t[0],null].concat(t.slice(1)),t=ue(i,t,null,o,a),void 0===u[e].Sd?(t.xe=n-1,u[e]=t):u[e].Sd[n-1]=t,[]})),[]}))},t:function(t,e,n,r,i,o){I(0>>s}}var u=e.includes("unsigned");Lt(t,{name:e,fromWireType:o,toWireType:function(t,n){if("number"!=typeof n&&"boolean"!=typeof n)throw new TypeError('Cannot convert "'+me(n)+'" to '+this.name);if(ni)throw new TypeError('Passing a number "'+me(n)+'" from JS side to C/C++ side to an argument of type "'+e+'", which is outside the valid range ['+r+", "+i+"]!");return u?n>>>0:0|n},argPackAdvance:8,readValueFromPointer:_e(e,a,0!==r),$d:null})},s:function(t,e,n){function r(t){var e=q;return new i(F,e[1+(t>>=2)],e[t])}var i=[Int8Array,Uint8Array,Int16Array,Uint16Array,Int32Array,Uint32Array,Float32Array,Float64Array][e];Lt(t,{name:n=It(n),fromWireType:r,argPackAdvance:8,readValueFromPointer:r},{Sf:!0})},p:function(t,e,n,r,i,o,a,s,u,l,c,h){n=It(n),o=re(i,o),s=re(a,s),l=re(u,l),h=re(c,h),Nt([t],[e],(function(t){return t=t[0],[new ee(n,t.Kd,!1,!1,!0,t,r,o,s,l,h)]}))},J:function(t,e){var n="std::string"===(e=It(e));Lt(t,{name:e,fromWireType:function(t){var e=q[t>>2];if(n)for(var r=t+4,i=0;i<=e;++i){var o=t+4+i;if(i==e||0==B[o]){if(r=L(r,o-r),void 0===a)var a=r;else a+=String.fromCharCode(0),a+=r;r=o+1}}else{for(a=Array(e),i=0;i>2]=i,n&&r)D(e,B,o+4,i+1);else if(r)for(r=0;r>2],o=a(),u=t+4,l=0;l<=i;++l){var c=t+4+l*e;l!=i&&0!=o[c>>s]||(u=r(u,c-u),void 0===n?n=u:(n+=String.fromCharCode(0),n+=u),u=c+e)}return mn(t),n},toWireType:function(t,r){"string"!=typeof r&&Rt("Cannot pass non-string to C++ string type "+n);var a=o(r),u=gn(4+a+e);return q[u>>2]=a>>s,i(r,u+4,a+e),null!==t&&t.push(mn,u),u},argPackAdvance:8,readValueFromPointer:bt,$d:function(t){mn(t)}})},N:function(t,e,n,r,i,o){gt[t]={name:It(e),ff:re(n,r),ee:re(i,o),qf:[]}},w:function(t,e,n,r,i,o,a,s,u,l){gt[t].qf.push({Hf:It(e),Qf:n,Of:re(r,i),Pf:o,eg:a,dg:re(s,u),fg:l})},Eb:function(t,e){Lt(t,{Uf:!0,name:e=It(e),argPackAdvance:0,fromWireType:function(){},toWireType:function(){}})},jb:function(t,e,n,r,i){t=Ee[t],e=we(e),n=ve(n);var o=[];return W[r>>2]=pe(o),t(e,n,o,i)},x:function(t,e,n,r){(t=Ee[t])(e=we(e),n=ve(n),null,r)},_:fe,v:function(t,e){e=function(t,e){for(var n=Array(t),r=0;r>2)+r],"parameter "+r);return n}(t,e);for(var n=e[0],r=n.name+"_$"+e.slice(1).map((function(t){return t.name})).join("_")+"$",i=["retType"],o=[n],a="",s=0;s>2]=28,-1;t=Te()}return W[e>>2]=t/1e3|0,W[e+4>>2]=t%1e3*1e6|0,0},Yc:function(t){ln.activeTexture(t)},Q:function(t,e){ln.attachShader(Me[t],Ae[e])},R:function(t,e,n){ln.bindAttribLocation(Me[t],e,L(n))},S:function(t,e){35051==t?ln.df=e:35052==t&&(ln.ye=e),ln.bindBuffer(t,Ce[e])},$b:function(t,e){ln.bindFramebuffer(t,Se[e])},ac:function(t,e){ln.bindRenderbuffer(t,Ne[e])},Nb:function(t,e){ln.bindSampler(t,Re[e])},T:function(t,e){ln.bindTexture(t,Oe[e])},uc:function(t){ln.bindVertexArray(Ie[t])},xc:function(t){ln.bindVertexArray(Ie[t])},U:function(t,e,n,r){ln.blendColor(t,e,n,r)},V:function(t){ln.blendEquation(t)},W:function(t,e){ln.blendFunc(t,e)},Ub:function(t,e,n,r,i,o,a,s,u,l){ln.blitFramebuffer(t,e,n,r,i,o,a,s,u,l)},X:function(t,e,n,r){2<=We.version?n?ln.bufferData(t,B,r,n,e):ln.bufferData(t,e,r):ln.bufferData(t,n?B.subarray(n,n+e):e,r)},Y:function(t,e,n,r){2<=We.version?ln.bufferSubData(t,e,B,r,n):ln.bufferSubData(t,e,B.subarray(r,r+n))},bc:function(t){return ln.checkFramebufferStatus(t)},Z:function(t){ln.clear(t)},$:function(t,e,n,r){ln.clearColor(t,e,n,r)},aa:function(t){ln.clearStencil(t)},eb:function(t,e,n,r){return ln.clientWaitSync(Le[t],e,(n>>>0)+4294967296*r)},ba:function(t,e,n,r){ln.colorMask(!!t,!!e,!!n,!!r)},ca:function(t){ln.compileShader(Ae[t])},da:function(t,e,n,r,i,o,a,s){2<=We.version?ln.ye?ln.compressedTexImage2D(t,e,n,r,i,o,a,s):ln.compressedTexImage2D(t,e,n,r,i,o,B,s,a):ln.compressedTexImage2D(t,e,n,r,i,o,s?B.subarray(s,s+a):null)},ea:function(t,e,n,r,i,o,a,s,u){2<=We.version?ln.ye?ln.compressedTexSubImage2D(t,e,n,r,i,o,a,s,u):ln.compressedTexSubImage2D(t,e,n,r,i,o,a,B,u,s):ln.compressedTexSubImage2D(t,e,n,r,i,o,a,u?B.subarray(u,u+s):null)},fa:function(t,e,n,r,i,o,a,s){ln.copyTexSubImage2D(t,e,n,r,i,o,a,s)},ga:function(){var t=Be(Me),e=ln.createProgram();return e.name=t,e.Ue=e.Se=e.Te=0,e.hf=1,Me[t]=e,t},ha:function(t){var e=Be(Ae);return Ae[e]=ln.createShader(t),e},ia:function(t){ln.cullFace(t)},ka:function(t,e){for(var n=0;n>2],i=Ce[r];i&&(ln.deleteBuffer(i),i.name=0,Ce[r]=null,r==ln.df&&(ln.df=0),r==ln.ye&&(ln.ye=0))}},cc:function(t,e){for(var n=0;n>2],i=Se[r];i&&(ln.deleteFramebuffer(i),i.name=0,Se[r]=null)}},la:function(t){if(t){var e=Me[t];e?(ln.deleteProgram(e),e.name=0,Me[t]=null):Ue(1281)}},dc:function(t,e){for(var n=0;n>2],i=Ne[r];i&&(ln.deleteRenderbuffer(i),i.name=0,Ne[r]=null)}},Ob:function(t,e){for(var n=0;n>2],i=Re[r];i&&(ln.deleteSampler(i),i.name=0,Re[r]=null)}},ma:function(t){if(t){var e=Ae[t];e?(ln.deleteShader(e),Ae[t]=null):Ue(1281)}},Wb:function(t){if(t){var e=Le[t];e?(ln.deleteSync(e),e.name=0,Le[t]=null):Ue(1281)}},na:function(t,e){for(var n=0;n>2],i=Oe[r];i&&(ln.deleteTexture(i),i.name=0,Oe[r]=null)}},vc:function(t,e){for(var n=0;n>2];ln.deleteVertexArray(Ie[r]),Ie[r]=null}},yc:function(t,e){for(var n=0;n>2];ln.deleteVertexArray(Ie[r]),Ie[r]=null}},oa:function(t){ln.depthMask(!!t)},pa:function(t){ln.disable(t)},qa:function(t){ln.disableVertexAttribArray(t)},ra:function(t,e,n){ln.drawArrays(t,e,n)},sc:function(t,e,n,r){ln.drawArraysInstanced(t,e,n,r)},qc:function(t,e,n,r,i){ln.nf.drawArraysInstancedBaseInstanceWEBGL(t,e,n,r,i)},oc:function(t,e){for(var n=qe[t],r=0;r>2];ln.drawBuffers(n)},sa:function(t,e,n,r){ln.drawElements(t,e,n,r)},tc:function(t,e,n,r,i){ln.drawElementsInstanced(t,e,n,r,i)},rc:function(t,e,n,r,i,o,a){ln.nf.drawElementsInstancedBaseVertexBaseInstanceWEBGL(t,e,n,r,i,o,a)},ic:function(t,e,n,r,i,o){ln.drawElements(t,r,i,o)},ta:function(t){ln.enable(t)},va:function(t){ln.enableVertexAttribArray(t)},Sb:function(t,e){return(t=ln.fenceSync(t,e))?(e=Be(Le),t.name=e,Le[e]=t,e):0},wa:function(){ln.finish()},xa:function(){ln.flush()},ec:function(t,e,n,r){ln.framebufferRenderbuffer(t,e,n,Ne[r])},fc:function(t,e,n,r,i){ln.framebufferTexture2D(t,e,n,Oe[r],i)},ya:function(t){ln.frontFace(t)},za:function(t,e){He(t,e,"createBuffer",Ce)},gc:function(t,e){He(t,e,"createFramebuffer",Se)},hc:function(t,e){He(t,e,"createRenderbuffer",Ne)},Pb:function(t,e){He(t,e,"createSampler",Re)},Aa:function(t,e){He(t,e,"createTexture",Oe)},wc:function(t,e){He(t,e,"createVertexArray",Ie)},zc:function(t,e){He(t,e,"createVertexArray",Ie)},Xb:function(t){ln.generateMipmap(t)},Ba:function(t,e,n){n?W[n>>2]=ln.getBufferParameter(t,e):Ue(1281)},Ca:function(){var t=ln.getError()||Ge;return Ge=0,t},Yb:function(t,e,n,r){((t=ln.getFramebufferAttachmentParameter(t,e,n))instanceof WebGLRenderbuffer||t instanceof WebGLTexture)&&(t=0|t.name),W[r>>2]=t},cb:function(t,e){ze(t,e)},Da:function(t,e,n,r){null===(t=ln.getProgramInfoLog(Me[t]))&&(t="(unknown error)"),e=0>2]=e)},Ea:function(t,e,n){if(n)if(t>=xe)Ue(1281);else if(t=Me[t],35716==e)null===(t=ln.getProgramInfoLog(t))&&(t="(unknown error)"),W[n>>2]=t.length+1;else if(35719==e){if(!t.Ue)for(e=0;e>2]=t.Ue}else if(35722==e){if(!t.Se)for(e=0;e>2]=t.Se}else if(35381==e){if(!t.Te)for(e=0;e>2]=t.Te}else W[n>>2]=ln.getProgramParameter(t,e);else Ue(1281)},Zb:function(t,e,n){n?W[n>>2]=ln.getRenderbufferParameter(t,e):Ue(1281)},Fa:function(t,e,n,r){null===(t=ln.getShaderInfoLog(Ae[t]))&&(t="(unknown error)"),e=0>2]=e)},Kb:function(t,e,n,r){t=ln.getShaderPrecisionFormat(t,e),W[n>>2]=t.rangeMin,W[n+4>>2]=t.rangeMax,W[r>>2]=t.precision},Ga:function(t,e,n){n?35716==e?(null===(t=ln.getShaderInfoLog(Ae[t]))&&(t="(unknown error)"),W[n>>2]=t?t.length+1:0):35720==e?(t=ln.getShaderSource(Ae[t]),W[n>>2]=t?t.length+1:0):W[n>>2]=ln.getShaderParameter(Ae[t],e):Ue(1281)},D:function(t){var e=De[t];if(!e){switch(t){case 7939:e=Ve((e=(e=ln.getSupportedExtensions()||[]).concat(e.map((function(t){return"GL_"+t})))).join(" "));break;case 7936:case 7937:case 37445:case 37446:(e=ln.getParameter(t))||Ue(1280),e=e&&Ve(e);break;case 7938:e=ln.getParameter(7938),e=Ve(e=2<=We.version?"OpenGL ES 3.0 ("+e+")":"OpenGL ES 2.0 ("+e+")");break;case 35724:var n=(e=ln.getParameter(35724)).match(/^WebGL GLSL ES ([0-9]\.[0-9][0-9]?)(?:$| .*)/);null!==n&&(3==n[1].length&&(n[1]+="0"),e="OpenGL ES GLSL ES "+n[1]+" ("+e+")"),e=Ve(e);break;default:Ue(1280)}De[t]=e}return e},db:function(t,e){if(2>We.version)return Ue(1282),0;var n=ke[t];return n?0>e||e>=n.length?(Ue(1281),0):n[e]:7939===t?(n=(n=(n=ln.getSupportedExtensions()||[]).concat(n.map((function(t){return"GL_"+t})))).map((function(t){return Ve(t)})),n=ke[t]=n,0>e||e>=n.length?(Ue(1281),0):n[e]):(Ue(1280),0)},Ha:function(t,e){function n(t){return"]"==t.slice(-1)&&t.lastIndexOf("[")}e=L(e);var r,i=(t=Me[t]).Ye,o=t.qg,a=0,s=e,u=n(e);if(!i)for(t.Ye=i={},t.uf={},r=0;r>>0,s=e.slice(0,u)),(o=o[s])&&a>2];ln.invalidateFramebuffer(t,r)},Mb:function(t,e,n,r,i,o,a){for(var s=qe[e],u=0;u>2];ln.invalidateSubFramebuffer(t,s,r,i,o,a)},Tb:function(t){return ln.isSync(Le[t])},Ia:function(t){return(t=Oe[t])?ln.isTexture(t):0},Ja:function(t){ln.lineWidth(t)},Ka:function(t){t=Me[t],ln.linkProgram(t),t.Ye=0,t.qg={}},mc:function(t,e,n,r,i,o){ln.sf.multiDrawArraysInstancedBaseInstanceWEBGL(t,W,e>>2,W,n>>2,W,r>>2,q,i>>2,o)},nc:function(t,e,n,r,i,o,a,s){ln.sf.multiDrawElementsInstancedBaseVertexBaseInstanceWEBGL(t,W,e>>2,n,W,r>>2,W,i>>2,W,o>>2,q,a>>2,s)},La:function(t,e){3317==t&&(Fe=e),ln.pixelStorei(t,e)},pc:function(t){ln.readBuffer(t)},Ma:function(t,e,n,r,i,o,a){if(2<=We.version)if(ln.df)ln.readPixels(t,e,n,r,i,o,a);else{var s=Xe(o);ln.readPixels(t,e,n,r,i,o,s,a>>31-Math.clz32(s.BYTES_PER_ELEMENT))}else(a=Ye(o,i,n,r,a))?ln.readPixels(t,e,n,r,i,o,a):Ue(1280)},_b:function(t,e,n,r){ln.renderbufferStorage(t,e,n,r)},Vb:function(t,e,n,r,i){ln.renderbufferStorageMultisample(t,e,n,r,i)},Qb:function(t,e,n){ln.samplerParameteri(Re[t],e,n)},Rb:function(t,e,n){ln.samplerParameteri(Re[t],e,W[n>>2])},Na:function(t,e,n,r){ln.scissor(t,e,n,r)},Oa:function(t,e,n,r){for(var i="",o=0;o>2]:-1;i+=L(W[n+4*o>>2],0>a?void 0:a)}ln.shaderSource(Ae[t],i)},Pa:function(t,e,n){ln.stencilFunc(t,e,n)},Qa:function(t,e,n,r){ln.stencilFuncSeparate(t,e,n,r)},Ra:function(t){ln.stencilMask(t)},Sa:function(t,e){ln.stencilMaskSeparate(t,e)},Ta:function(t,e,n){ln.stencilOp(t,e,n)},Ua:function(t,e,n,r){ln.stencilOpSeparate(t,e,n,r)},Va:function(t,e,n,r,i,o,a,s,u){if(2<=We.version)if(ln.ye)ln.texImage2D(t,e,n,r,i,o,a,s,u);else if(u){var l=Xe(s);ln.texImage2D(t,e,n,r,i,o,a,s,l,u>>31-Math.clz32(l.BYTES_PER_ELEMENT))}else ln.texImage2D(t,e,n,r,i,o,a,s,null);else ln.texImage2D(t,e,n,r,i,o,a,s,u?Ye(s,a,r,i,u):null)},Wa:function(t,e,n){ln.texParameterf(t,e,n)},Xa:function(t,e,n){ln.texParameterf(t,e,H[n>>2])},Ya:function(t,e,n){ln.texParameteri(t,e,n)},_a:function(t,e,n){ln.texParameteri(t,e,W[n>>2])},jc:function(t,e,n,r,i){ln.texStorage2D(t,e,n,r,i)},$a:function(t,e,n,r,i,o,a,s,u){if(2<=We.version)if(ln.ye)ln.texSubImage2D(t,e,n,r,i,o,a,s,u);else if(u){var l=Xe(s);ln.texSubImage2D(t,e,n,r,i,o,a,s,l,u>>31-Math.clz32(l.BYTES_PER_ELEMENT))}else ln.texSubImage2D(t,e,n,r,i,o,a,s,null);else l=null,u&&(l=Ye(s,a,i,o,u)),ln.texSubImage2D(t,e,n,r,i,o,a,s,l)},ab:function(t,e){ln.uniform1f(Ze(t),e)},bb:function(t,e,n){if(2<=We.version)ln.uniform1fv(Ze(t),H,n>>2,e);else{if(288>=e)for(var r=Ke[e-1],i=0;i>2];else r=H.subarray(n>>2,n+4*e>>2);ln.uniform1fv(Ze(t),r)}},Uc:function(t,e){ln.uniform1i(Ze(t),e)},Vc:function(t,e,n){if(2<=We.version)ln.uniform1iv(Ze(t),W,n>>2,e);else{if(288>=e)for(var r=Je[e-1],i=0;i>2];else r=W.subarray(n>>2,n+4*e>>2);ln.uniform1iv(Ze(t),r)}},Wc:function(t,e,n){ln.uniform2f(Ze(t),e,n)},Xc:function(t,e,n){if(2<=We.version)ln.uniform2fv(Ze(t),H,n>>2,2*e);else{if(144>=e)for(var r=Ke[2*e-1],i=0;i<2*e;i+=2)r[i]=H[n+4*i>>2],r[i+1]=H[n+(4*i+4)>>2];else r=H.subarray(n>>2,n+8*e>>2);ln.uniform2fv(Ze(t),r)}},Tc:function(t,e,n){ln.uniform2i(Ze(t),e,n)},Sc:function(t,e,n){if(2<=We.version)ln.uniform2iv(Ze(t),W,n>>2,2*e);else{if(144>=e)for(var r=Je[2*e-1],i=0;i<2*e;i+=2)r[i]=W[n+4*i>>2],r[i+1]=W[n+(4*i+4)>>2];else r=W.subarray(n>>2,n+8*e>>2);ln.uniform2iv(Ze(t),r)}},Rc:function(t,e,n,r){ln.uniform3f(Ze(t),e,n,r)},Qc:function(t,e,n){if(2<=We.version)ln.uniform3fv(Ze(t),H,n>>2,3*e);else{if(96>=e)for(var r=Ke[3*e-1],i=0;i<3*e;i+=3)r[i]=H[n+4*i>>2],r[i+1]=H[n+(4*i+4)>>2],r[i+2]=H[n+(4*i+8)>>2];else r=H.subarray(n>>2,n+12*e>>2);ln.uniform3fv(Ze(t),r)}},Pc:function(t,e,n,r){ln.uniform3i(Ze(t),e,n,r)},Oc:function(t,e,n){if(2<=We.version)ln.uniform3iv(Ze(t),W,n>>2,3*e);else{if(96>=e)for(var r=Je[3*e-1],i=0;i<3*e;i+=3)r[i]=W[n+4*i>>2],r[i+1]=W[n+(4*i+4)>>2],r[i+2]=W[n+(4*i+8)>>2];else r=W.subarray(n>>2,n+12*e>>2);ln.uniform3iv(Ze(t),r)}},Nc:function(t,e,n,r,i){ln.uniform4f(Ze(t),e,n,r,i)},Mc:function(t,e,n){if(2<=We.version)ln.uniform4fv(Ze(t),H,n>>2,4*e);else{if(72>=e){var r=Ke[4*e-1],i=H;n>>=2;for(var o=0;o<4*e;o+=4){var a=n+o;r[o]=i[a],r[o+1]=i[a+1],r[o+2]=i[a+2],r[o+3]=i[a+3]}}else r=H.subarray(n>>2,n+16*e>>2);ln.uniform4fv(Ze(t),r)}},Ac:function(t,e,n,r,i){ln.uniform4i(Ze(t),e,n,r,i)},Bc:function(t,e,n){if(2<=We.version)ln.uniform4iv(Ze(t),W,n>>2,4*e);else{if(72>=e)for(var r=Je[4*e-1],i=0;i<4*e;i+=4)r[i]=W[n+4*i>>2],r[i+1]=W[n+(4*i+4)>>2],r[i+2]=W[n+(4*i+8)>>2],r[i+3]=W[n+(4*i+12)>>2];else r=W.subarray(n>>2,n+16*e>>2);ln.uniform4iv(Ze(t),r)}},Cc:function(t,e,n,r){if(2<=We.version)ln.uniformMatrix2fv(Ze(t),!!n,H,r>>2,4*e);else{if(72>=e)for(var i=Ke[4*e-1],o=0;o<4*e;o+=4)i[o]=H[r+4*o>>2],i[o+1]=H[r+(4*o+4)>>2],i[o+2]=H[r+(4*o+8)>>2],i[o+3]=H[r+(4*o+12)>>2];else i=H.subarray(r>>2,r+16*e>>2);ln.uniformMatrix2fv(Ze(t),!!n,i)}},Dc:function(t,e,n,r){if(2<=We.version)ln.uniformMatrix3fv(Ze(t),!!n,H,r>>2,9*e);else{if(32>=e)for(var i=Ke[9*e-1],o=0;o<9*e;o+=9)i[o]=H[r+4*o>>2],i[o+1]=H[r+(4*o+4)>>2],i[o+2]=H[r+(4*o+8)>>2],i[o+3]=H[r+(4*o+12)>>2],i[o+4]=H[r+(4*o+16)>>2],i[o+5]=H[r+(4*o+20)>>2],i[o+6]=H[r+(4*o+24)>>2],i[o+7]=H[r+(4*o+28)>>2],i[o+8]=H[r+(4*o+32)>>2];else i=H.subarray(r>>2,r+36*e>>2);ln.uniformMatrix3fv(Ze(t),!!n,i)}},Ec:function(t,e,n,r){if(2<=We.version)ln.uniformMatrix4fv(Ze(t),!!n,H,r>>2,16*e);else{if(18>=e){var i=Ke[16*e-1],o=H;r>>=2;for(var a=0;a<16*e;a+=16){var s=r+a;i[a]=o[s],i[a+1]=o[s+1],i[a+2]=o[s+2],i[a+3]=o[s+3],i[a+4]=o[s+4],i[a+5]=o[s+5],i[a+6]=o[s+6],i[a+7]=o[s+7],i[a+8]=o[s+8],i[a+9]=o[s+9],i[a+10]=o[s+10],i[a+11]=o[s+11],i[a+12]=o[s+12],i[a+13]=o[s+13],i[a+14]=o[s+14],i[a+15]=o[s+15]}}else i=H.subarray(r>>2,r+64*e>>2);ln.uniformMatrix4fv(Ze(t),!!n,i)}},Fc:function(t){t=Me[t],ln.useProgram(t),ln.Df=t},Gc:function(t,e){ln.vertexAttrib1f(t,e)},Hc:function(t,e){ln.vertexAttrib2f(t,H[e>>2],H[e+4>>2])},Ic:function(t,e){ln.vertexAttrib3f(t,H[e>>2],H[e+4>>2],H[e+8>>2])},Jc:function(t,e){ln.vertexAttrib4f(t,H[e>>2],H[e+4>>2],H[e+8>>2],H[e+12>>2])},kc:function(t,e){ln.vertexAttribDivisor(t,e)},lc:function(t,e,n,r,i){ln.vertexAttribIPointer(t,e,n,r,i)},Kc:function(t,e,n,r,i,o){ln.vertexAttribPointer(t,e,n,!!r,i,o)},Lc:function(t,e,n,r){ln.viewport(t,e,n,r)},fb:function(t,e,n,r){ln.waitSync(Le[t],e,(n>>>0)+4294967296*r)},e:function(t,e){throw En(t,e||1),"longjmp"},ob:function(t){var e=B.length;if(2147483648<(t>>>=0))return!1;for(var n=1;4>=n;n*=2){var r=e*(1+.2/n);r=Math.min(r,t+100663296),0<(r=Math.max(t,r))%65536&&(r+=65536-r%65536);t:{try{O.grow(Math.min(2147483648,r)-F.byteLength+65535>>>16),$();var i=1;break t}catch(t){}i=void 0}if(i)return!0}return!1},Zc:function(){return We?We.Rf:0},P:function(t){return je(t)?0:-5},sb:function(t,e){var n=0;return tn().forEach((function(r,i){var o=e+n;for(i=W[t+4*i>>2]=o,o=0;o>0]=r.charCodeAt(o);U[i>>0]=0,n+=r.length+1})),0},tb:function(t,e){var n=tn();W[t>>2]=n.length;var r=0;return n.forEach((function(t){r+=t.length+1})),W[e>>2]=r,0},Fb:function(t){N||(e.onExit&&e.onExit(t),A=!0),g(t,new xn(t))},H:function(){return 0},rb:function(t,e){return t=1==t||2==t?2:ut(),U[e>>0]=t,0},mb:function(t,e,n,r,i,o){return t=mt.Nf(t),e=mt.Ef(t,e,n,r),W[o>>2]=e,0},yb:function(t,e,n,r){return t=mt.Nf(t),e=mt.Ef(t,e,n),W[r>>2]=e,0},lb:function(){},G:function(t,e,n,r){for(var i=0,o=0;o>2],s=W[e+(8*o+4)>>2],u=0;u>2]=i,0},a:function(){return S},_c:function(t,e){ln.bindFramebuffer(t,Se[e])},Za:function(t){ln.clear(t)},Ab:function(t,e,n,r){ln.clearColor(t,e,n,r)},gb:function(t){ln.clearStencil(t)},C:function(t,e){ze(t,e)},i:function(t,e){var n=vn();try{return tt.get(t)(e)}catch(t){if(Tn(n),t!==t+0&&"longjmp"!==t)throw t;En(1,0)}},n:function(t,e,n){var r=vn();try{return tt.get(t)(e,n)}catch(t){if(Tn(r),t!==t+0&&"longjmp"!==t)throw t;En(1,0)}},g:function(t,e,n,r){var i=vn();try{return tt.get(t)(e,n,r)}catch(t){if(Tn(i),t!==t+0&&"longjmp"!==t)throw t;En(1,0)}},z:function(t,e,n,r,i){var o=vn();try{return tt.get(t)(e,n,r,i)}catch(t){if(Tn(o),t!==t+0&&"longjmp"!==t)throw t;En(1,0)}},Jb:function(t,e,n,r,i,o){var a=vn();try{return tt.get(t)(e,n,r,i,o)}catch(t){if(Tn(a),t!==t+0&&"longjmp"!==t)throw t;En(1,0)}},M:function(t,e,n,r,i,o,a){var s=vn();try{return tt.get(t)(e,n,r,i,o,a)}catch(t){if(Tn(s),t!==t+0&&"longjmp"!==t)throw t;En(1,0)}},L:function(t,e,n,r,i,o,a,s,u,l){var c=vn();try{return tt.get(t)(e,n,r,i,o,a,s,u,l)}catch(t){if(Tn(c),t!==t+0&&"longjmp"!==t)throw t;En(1,0)}},K:function(t){var e=vn();try{tt.get(t)()}catch(t){if(Tn(e),t!==t+0&&"longjmp"!==t)throw t;En(1,0)}},j:function(t,e){var n=vn();try{tt.get(t)(e)}catch(t){if(Tn(n),t!==t+0&&"longjmp"!==t)throw t;En(1,0)}},q:function(t,e,n){var r=vn();try{tt.get(t)(e,n)}catch(t){if(Tn(r),t!==t+0&&"longjmp"!==t)throw t;En(1,0)}},h:function(t,e,n,r){var i=vn();try{tt.get(t)(e,n,r)}catch(t){if(Tn(i),t!==t+0&&"longjmp"!==t)throw t;En(1,0)}},o:function(t,e,n,r,i){var o=vn();try{tt.get(t)(e,n,r,i)}catch(t){if(Tn(o),t!==t+0&&"longjmp"!==t)throw t;En(1,0)}},Ib:function(t,e,n,r,i,o){var a=vn();try{tt.get(t)(e,n,r,i,o)}catch(t){if(Tn(a),t!==t+0&&"longjmp"!==t)throw t;En(1,0)}},Gb:function(t,e,n,r,i,o,a){var s=vn();try{tt.get(t)(e,n,r,i,o,a)}catch(t){if(Tn(s),t!==t+0&&"longjmp"!==t)throw t;En(1,0)}},Hb:function(t,e,n,r,i,o,a,s,u,l){var c=vn();try{tt.get(t)(e,n,r,i,o,a,s,u,l)}catch(t){if(Tn(c),t!==t+0&&"longjmp"!==t)throw t;En(1,0)}},b:function(t){S=t},qb:function(t,e,n,r){return function(t,e,n,r){function i(t,e,n){for(t="number"==typeof t?t.toString():t||"";t.lengtht?-1:0=a(n,t)?0>=a(e,t)?t.getFullYear()+1:t.getFullYear():t.getFullYear()-1}var l=W[r+40>>2];for(var c in r={og:W[r>>2],ng:W[r+4>>2],Ve:W[r+8>>2],Le:W[r+12>>2],Be:W[r+16>>2],Vd:W[r+20>>2],We:W[r+24>>2],Xe:W[r+28>>2],xg:W[r+32>>2],mg:W[r+36>>2],pg:l?L(l):""},n=L(n),l={"%c":"%a %b %d %H:%M:%S %Y","%D":"%m/%d/%y","%F":"%Y-%m-%d","%h":"%b","%r":"%I:%M:%S %p","%R":"%H:%M","%T":"%H:%M:%S","%x":"%m/%d/%y","%X":"%H:%M:%S","%Ec":"%c","%EC":"%C","%Ex":"%m/%d/%y","%EX":"%H:%M:%S","%Ey":"%y","%EY":"%Y","%Od":"%d","%Oe":"%e","%OH":"%H","%OI":"%I","%Om":"%m","%OM":"%M","%OS":"%S","%Ou":"%u","%OU":"%U","%OV":"%V","%Ow":"%w","%OW":"%W","%Oy":"%y"})n=n.replace(new RegExp(c,"g"),l[c]);var h="Sunday Monday Tuesday Wednesday Thursday Friday Saturday".split(" "),f="January February March April May June July August September October November December".split(" ");for(c in l={"%a":function(t){return h[t.We].substring(0,3)},"%A":function(t){return h[t.We]},"%b":function(t){return f[t.Be].substring(0,3)},"%B":function(t){return f[t.Be]},"%C":function(t){return o((t.Vd+1900)/100|0,2)},"%d":function(t){return o(t.Le,2)},"%e":function(t){return i(t.Le,2," ")},"%g":function(t){return u(t).toString().substring(2)},"%G":function(t){return u(t)},"%H":function(t){return o(t.Ve,2)},"%I":function(t){return 0==(t=t.Ve)?t=12:12t.Ve?"AM":"PM"},"%S":function(t){return o(t.og,2)},"%t":function(){return"\t"},"%u":function(t){return t.We||7},"%U":function(t){var e=new Date(t.Vd+1900,0,1),n=0===e.getDay()?e:an(e,7-e.getDay());return 0>a(n,t=new Date(t.Vd+1900,t.Be,t.Le))?o(Math.ceil((31-n.getDate()+(nn(en(t.getFullYear())?rn:on,t.getMonth()-1)-31)+t.getDate())/7),2):0===a(n,e)?"01":"00"},"%V":function(t){var e=new Date(t.Vd+1901,0,4),n=s(new Date(t.Vd+1900,0,4));e=s(e);var r=an(new Date(t.Vd+1900,0,1),t.Xe);return 0>a(r,n)?"53":0>=a(e,r)?"01":o(Math.ceil((n.getFullYear()a(n,t=new Date(t.Vd+1900,t.Be,t.Le))?o(Math.ceil((31-n.getDate()+(nn(en(t.getFullYear())?rn:on,t.getMonth()-1)-31)+t.getDate())/7),2):0===a(n,e)?"01":"00"},"%y":function(t){return(t.Vd+1900).toString().substring(2)},"%Y":function(t){return t.Vd+1900},"%z":function(t){var e=0<=(t=t.mg);return t=Math.abs(t)/60,(e?"+":"-")+String("0000"+(t/60*100+t%60)).slice(-4)},"%Z":function(t){return t.pg},"%%":function(){return"%"}})n.includes(c)&&(n=n.replace(new RegExp(c,"g"),l[c](r)));return c=function(t){var e=Array(k(t)+1);return D(t,e,0,e.length),e}(n),c.length>e?0:(U.set(c,t),c.length-1)}(t,e,n,r)}};!function(){function t(t){e.asm=t.exports,O=e.asm.$c,$(),tt=e.asm.cd,nt.unshift(e.asm.ad),ot--,e.monitorRunDependencies&&e.monitorRunDependencies(ot),0==ot&&(null!==at&&(clearInterval(at),at=null),st&&(t=st,st=null,t()))}function n(e){t(e.instance)}function r(t){return function(){if(!M&&(f||p)){if("function"==typeof fetch&&!ct.startsWith("file://"))return fetch(ct,{credentials:"same-origin"}).then((function(t){if(!t.ok)throw"failed to load wasm binary file at '"+ct+"'";return t.arrayBuffer()})).catch((function(){return ft()}));if(b)return new Promise((function(t,e){b(ct,(function(e){t(new Uint8Array(e))}),e)}))}return Promise.resolve().then((function(){return ft()}))}().then((function(t){return WebAssembly.instantiate(t,i)})).then(t,(function(t){C("failed to asynchronously prepare wasm: "+t),ut(t)}))}var i={a:pn};if(ot++,e.monitorRunDependencies&&e.monitorRunDependencies(ot),e.instantiateWasm)try{return e.instantiateWasm(i,t)}catch(t){return C("Module.instantiateWasm callback failed with error: "+t),!1}(M||"function"!=typeof WebAssembly.instantiateStreaming||lt()||ct.startsWith("file://")||"function"!=typeof fetch?r(n):fetch(ct,{credentials:"same-origin"}).then((function(t){return WebAssembly.instantiateStreaming(t,i).then(n,(function(t){return C("wasm streaming compile failed: "+t),C("falling back to ArrayBuffer instantiation"),r(n)}))}))).catch(u)}(),e.___wasm_call_ctors=function(){return(e.___wasm_call_ctors=e.asm.ad).apply(null,arguments)};var dn=e._memset=function(){return(dn=e._memset=e.asm.bd).apply(null,arguments)},yn=e.___errno_location=function(){return(yn=e.___errno_location=e.asm.dd).apply(null,arguments)},mn=e._free=function(){return(mn=e._free=e.asm.ed).apply(null,arguments)},gn=e._malloc=function(){return(gn=e._malloc=e.asm.fd).apply(null,arguments)},_n=e.___getTypeName=function(){return(_n=e.___getTypeName=e.asm.gd).apply(null,arguments)};e.___embind_register_native_and_builtin_types=function(){return(e.___embind_register_native_and_builtin_types=e.asm.hd).apply(null,arguments)};var bn,vn=e.stackSave=function(){return(vn=e.stackSave=e.asm.id).apply(null,arguments)},Tn=e.stackRestore=function(){return(Tn=e.stackRestore=e.asm.jd).apply(null,arguments)},En=e._setThrew=function(){return(En=e._setThrew=e.asm.kd).apply(null,arguments)},wn=e._memalign=function(){return(wn=e._memalign=e.asm.ld).apply(null,arguments)};function xn(t){this.name="ExitStatus",this.message="Program terminated with exit("+t+")",this.status=t}function Cn(){function t(){if(!bn&&(bn=!0,e.calledRun=!0,!A)){if(pt(nt),s(e),e.onRuntimeInitialized&&e.onRuntimeInitialized(),e.postRun)for("function"==typeof e.postRun&&(e.postRun=[e.postRun]);e.postRun.length;){var t=e.postRun.shift();rt.unshift(t)}pt(rt)}}if(!(0{let r=n(4472);r="default"in r?r.default:r,t.exports=function(t){const e=JSON.parse(t.tilePieceBoundingBox),n=JSON.parse(t.tileBoundingBox),i=t.height,o=t.width,a=new Uint8ClampedArray(o*i*4),s=new Uint8ClampedArray(t.sourceImageData);let u,l;try{null==r.defs(t.projectionTo)&&r.defs(t.projectionTo,t.projectionToDefinition),null==r.defs(t.projectionFrom)&&r.defs(t.projectionFrom,t.projectionFromDefinition),u=r(t.projectionTo,t.projectionFrom)}catch(e){throw new Error("Error creating projection conversion between "+t.projectionTo+" and "+t.projectionFrom+".")}for(let r=0;r=0&&d=0&&y{"use strict";n.r(e),n.d(e,{TileUtilities:()=>o});var r=n(1375),i=n(5604);class o{static getPiecePosition(t,e,n,o,a,s,u,l,c,h,f,p){let d;try{null==i.Projection.hasProjection(a)&&i.Projection.loadProjection(a,s),null==i.Projection.hasProjection(u)&&i.Projection.loadProjection(u,l),d=i.Projection.getConverter(a,u)}catch(t){throw new Error("Error creating projection conversion between "+a+" and "+u+".")}let y=t.maxLatitude,m=t.minLatitude,g=t.minLongitude-f,_=t.maxLongitude+f;a.toUpperCase()===r.ProjectionConstants.EPSG_3857&&u.toUpperCase()===r.ProjectionConstants.EPSG_4326&&(y=y>r.ProjectionConstants.WEB_MERCATOR_MAX_LAT_RANGE?r.ProjectionConstants.WEB_MERCATOR_MAX_LAT_RANGE:y,m=mr.ProjectionConstants.WEB_MERCATOR_MAX_LON_RANGE?r.ProjectionConstants.WEB_MERCATOR_MAX_LON_RANGE:_);const b=i.Projection.convertCoordinates(r.ProjectionConstants.EPSG_4326,a,[-180,0]),v=i.Projection.convertCoordinates(r.ProjectionConstants.EPSG_4326,a,[180,0]);g=gv[0]?v[0]:_;const T=d.inverse([g,m]),E=d.inverse([_,y]),w=isNaN(T[1])?e.minLatitude:T[1],x=isNaN(E[1])?e.maxLatitude:E[1],C=T[0],M=E[0];return{startY:Math.max(0,Math.floor((e.maxLatitude-x)/c)),startX:Math.max(0,Math.floor((C-e.minLongitude)/h)),endY:Math.min(n,n-Math.floor((w-e.minLatitude)/c)),endX:Math.min(o,o-Math.floor((e.maxLongitude-M)/h))}}}},7591:(t,e,n)=>{var r=n(5108);const i=n(2331);function o(t){const e=t.data,n=i(e);this.postMessage(n),this.close()}t.exports=function(t){t.onmessage=o,t.onerror=function(t){r.log("error",t)}}},9705:(t,e,n)=>{"use strict";Object.defineProperty(e,"__esModule",{value:!0});var r=n(1540);function i(t){var e=[1/0,1/0,-1/0,-1/0];return r.coordEach(t,(function(t){e[0]>t[0]&&(e[0]=t[0]),e[1]>t[1]&&(e[1]=t[1]),e[2]{"use strict";Object.defineProperty(e,"__esModule",{value:!0});var r=n(611);e.default=function(t){for(var e,n,i=r.getCoords(t),o=0,a=1;a0}},8147:(t,e,n)=>{"use strict";Object.defineProperty(e,"__esModule",{value:!0});var r=n(611);function i(t,e,n){var r=!1;e[0][0]===e[e.length-1][0]&&e[0][1]===e[e.length-1][1]&&(e=e.slice(0,e.length-1));for(var i=0,o=e.length-1;it[1]!=l>t[1]&&t[0]<(u-a)*(t[1]-s)/(l-s)+a&&(r=!r)}return r}e.default=function(t,e,n){if(void 0===n&&(n={}),!t)throw new Error("point is required");if(!e)throw new Error("polygon is required");var o=r.getCoord(t),a=r.getGeom(e),s=a.type,u=e.bbox,l=a.coordinates;if(u&&!1===function(t,e){return e[0]<=t[0]&&e[1]<=t[1]&&e[2]>=t[0]&&e[3]>=t[1]}(o,u))return!1;"Polygon"===s&&(l=[l]);for(var c=!1,h=0;h{"use strict";Object.defineProperty(e,"__esModule",{value:!0});var r=n(611);function i(t,e,n,r,i){var o=n[0],a=n[1],s=t[0],u=t[1],l=e[0],c=e[1],h=l-s,f=c-u,p=(n[0]-s)*f-(n[1]-u)*h;if(null!==i){if(Math.abs(p)>i)return!1}else if(0!==p)return!1;return r?"start"===r?Math.abs(h)>=Math.abs(f)?h>0?s0?u=Math.abs(f)?h>0?s<=o&&o0?u<=a&&a=Math.abs(f)?h>0?s0?u=Math.abs(f)?h>0?s<=o&&o<=l:l<=o&&o<=s:f>0?u<=a&&a<=c:c<=a&&a<=u}e.default=function(t,e,n){void 0===n&&(n={});for(var o=r.getCoord(t),a=r.getCoords(e),s=0;se[0]||t[2]e[1]||t[3]{"use strict";Object.defineProperty(e,"__esModule",{value:!0});var r=n(1540);function i(t){var e=[1/0,1/0,-1/0,-1/0];return r.coordEach(t,(function(t){e[0]>t[0]&&(e[0]=t[0]),e[1]>t[1]&&(e[1]=t[1]),e[2]{"use strict";Object.defineProperty(e,"__esModule",{value:!0});var r=n(611),i=n(4102);e.default=function(t,e,n){void 0===n&&(n={});var o=r.getCoord(t),a=r.getCoord(e),s=i.degreesToRadians(a[1]-o[1]),u=i.degreesToRadians(a[0]-o[0]),l=i.degreesToRadians(o[1]),c=i.degreesToRadians(a[1]),h=Math.pow(Math.sin(s/2),2)+Math.pow(Math.sin(u/2),2)*Math.cos(l)*Math.cos(c);return i.radiansToLength(2*Math.atan2(Math.sqrt(h),Math.sqrt(1-h)),n.units)}},4102:(t,e)=>{"use strict";function n(t,e,n){void 0===n&&(n={});var r={type:"Feature"};return(0===n.id||n.id)&&(r.id=n.id),n.bbox&&(r.bbox=n.bbox),r.properties=e||{},r.geometry=t,r}function r(t,e,r){if(void 0===r&&(r={}),!t)throw new Error("coordinates is required");if(!Array.isArray(t))throw new Error("coordinates must be an Array");if(t.length<2)throw new Error("coordinates must be at least 2 numbers long");if(!p(t[0])||!p(t[1]))throw new Error("coordinates must contain numbers");return n({type:"Point",coordinates:t},e,r)}function i(t,e,r){void 0===r&&(r={});for(var i=0,o=t;i=0))throw new Error("precision must be a positive number");var n=Math.pow(10,e||0);return Math.round(t*n)/n},e.radiansToLength=c,e.lengthToRadians=h,e.lengthToDegrees=function(t,e){return f(h(t,e))},e.bearingToAzimuth=function(t){var e=t%360;return e<0&&(e+=360),e},e.radiansToDegrees=f,e.degreesToRadians=function(t){return t%360*Math.PI/180},e.convertLength=function(t,e,n){if(void 0===e&&(e="kilometers"),void 0===n&&(n="kilometers"),!(t>=0))throw new Error("length must be a positive number");return c(h(t,e),n)},e.convertArea=function(t,n,r){if(void 0===n&&(n="meters"),void 0===r&&(r="kilometers"),!(t>=0))throw new Error("area must be a positive number");var i=e.areaFactors[n];if(!i)throw new Error("invalid original units");var o=e.areaFactors[r];if(!o)throw new Error("invalid final units");return t/i*o},e.isNumber=p,e.isObject=function(t){return!!t&&t.constructor===Object},e.validateBBox=function(t){if(!t)throw new Error("bbox is required");if(!Array.isArray(t))throw new Error("bbox must be an Array");if(4!==t.length&&6!==t.length)throw new Error("bbox must be an Array of 4 or 6 numbers");t.forEach((function(t){if(!p(t))throw new Error("bbox must only contain numbers")}))},e.validateId=function(t){if(!t)throw new Error("id is required");if(-1===["string","number"].indexOf(typeof t))throw new Error("id must be a number or a string")}},4170:function(t,e,n){"use strict";var r=this&&this.__importDefault||function(t){return t&&t.__esModule?t:{default:t}};Object.defineProperty(e,"__esModule",{value:!0});var i=n(4102),o=n(611),a=r(n(2676));e.default=function(t,e,n){void 0===n&&(n={});var r=o.getGeom(t),s=o.getGeom(e),u=a.default.intersection(r.coordinates,s.coordinates);return 0===u.length?null:1===u.length?i.polygon(u[0],n.properties):i.multiPolygon(u,n.properties)}},611:(t,e,n)=>{"use strict";Object.defineProperty(e,"__esModule",{value:!0});var r=n(4102);e.getCoord=function(t){if(!t)throw new Error("coord is required");if(!Array.isArray(t)){if("Feature"===t.type&&null!==t.geometry&&"Point"===t.geometry.type)return t.geometry.coordinates;if("Point"===t.type)return t.coordinates}if(Array.isArray(t)&&t.length>=2&&!Array.isArray(t[0])&&!Array.isArray(t[1]))return t;throw new Error("coord must be GeoJSON Point or an Array of numbers")},e.getCoords=function(t){if(Array.isArray(t))return t;if("Feature"===t.type){if(null!==t.geometry)return t.geometry.coordinates}else if(t.coordinates)return t.coordinates;throw new Error("coords must be GeoJSON Feature, Geometry Object or an Array")},e.containsNumber=function t(e){if(e.length>1&&r.isNumber(e[0])&&r.isNumber(e[1]))return!0;if(Array.isArray(e[0])&&e[0].length)return t(e[0]);throw new Error("coordinates must only contain numbers")},e.geojsonType=function(t,e,n){if(!e||!n)throw new Error("type and name required");if(!t||t.type!==e)throw new Error("Invalid input to "+n+": must be a "+e+", given "+t.type)},e.featureOf=function(t,e,n){if(!t)throw new Error("No feature passed");if(!n)throw new Error(".featureOf() requires a name");if(!t||"Feature"!==t.type||!t.geometry)throw new Error("Invalid input to "+n+", Feature with geometry required");if(!t.geometry||t.geometry.type!==e)throw new Error("Invalid input to "+n+": must be a "+e+", given "+t.geometry.type)},e.collectionOf=function(t,e,n){if(!t)throw new Error("No featureCollection passed");if(!n)throw new Error(".collectionOf() requires a name");if(!t||"FeatureCollection"!==t.type)throw new Error("Invalid input to "+n+", FeatureCollection required");for(var r=0,i=t.features;r line1 must only contain 2 coordinates");if(2!==r.length)throw new Error(" line2 must only contain 2 coordinates");var a=n[0][0],s=n[0][1],u=n[1][0],l=n[1][1],c=r[0][0],h=r[0][1],f=r[1][0],p=r[1][1],d=(p-h)*(u-a)-(f-c)*(l-s);if(0===d)return null;var y=((f-c)*(s-h)-(p-h)*(a-c))/d,m=((u-a)*(s-h)-(l-s)*(a-c))/d;if(y>=0&&y<=1&&m>=0&&m<=1){var g=a+y*(u-a),_=s+y*(l-s);return i.point([g,_])}return null}e.default=function(t,e){var n={},r=[];if("LineString"===t.type&&(t=i.feature(t)),"LineString"===e.type&&(e=i.feature(e)),"Feature"===t.type&&"Feature"===e.type&&null!==t.geometry&&null!==e.geometry&&"LineString"===t.geometry.type&&"LineString"===e.geometry.type&&2===t.geometry.coordinates.length&&2===e.geometry.coordinates.length){var c=l(t,e);return c&&r.push(c),i.featureCollection(r)}var h=u.default();return h.load(a.default(e)),s.featureEach(a.default(t),(function(t){s.featureEach(h.search(t),(function(e){var i=l(t,e);if(i){var a=o.getCoords(i).join(",");n[a]||(n[a]=!0,r.push(i))}}))})),i.featureCollection(r)}},4590:(t,e,n)=>{"use strict";Object.defineProperty(e,"__esModule",{value:!0});var r=n(4102),i=n(611),o=n(1540);e.default=function(t){if(!t)throw new Error("geojson is required");var e=[];return o.flattenEach(t,(function(t){!function(t,e){var n=[],o=t.geometry;if(null!==o){switch(o.type){case"Polygon":n=i.getCoords(o);break;case"LineString":n=[i.getCoords(o)]}n.forEach((function(n){var i=function(t,e){var n=[];return t.reduce((function(t,i){var o,a,s,u,l,c,h=r.lineString([t,i],e);return h.bbox=(a=i,s=(o=t)[0],u=o[1],[s<(l=a[0])?s:l,u<(c=a[1])?u:c,s>l?s:l,u>c?u:c]),n.push(h),i})),n}(n,t.properties);i.forEach((function(t){t.id=e.length,e.push(t)}))}))}}(t,e)})),r.featureCollection(e)}},1540:(t,e,n)=>{"use strict";Object.defineProperty(e,"__esModule",{value:!0});var r=n(4102);function i(t,e,n){if(null!==t)for(var r,o,a,s,u,l,c,h,f=0,p=0,d=t.type,y="FeatureCollection"===d,m="Feature"===d,g=y?t.features.length:1,_=0;_l||p>c||d>h)return u=i,l=n,c=p,h=d,void(a=0);var y=r.lineString([u,i],t.properties);if(!1===e(y,n,o,d,a))return!1;a++,u=i}))&&void 0}}}))}function c(t,e){if(!t)throw new Error("geojson is required");u(t,(function(t,n,i){if(null!==t.geometry){var o=t.geometry.type,a=t.geometry.coordinates;switch(o){case"LineString":if(!1===e(t,n,i,0,0))return!1;break;case"Polygon":for(var s=0;s{"use strict";Object.defineProperty(e,"__esModule",{value:!0});var r=n(4102),i=n(611);function o(t,e){return void 0===e&&(e={}),s(i.getGeom(t).coordinates,e.properties?e.properties:"Feature"===t.type?t.properties:{})}function a(t,e){void 0===e&&(e={});var n=i.getGeom(t).coordinates,o=e.properties?e.properties:"Feature"===t.type?t.properties:{},a=[];return n.forEach((function(t){a.push(s(t,o))})),r.featureCollection(a)}function s(t,e){return t.length>1?r.multiLineString(t,e):r.lineString(t[0],e)}e.default=function(t,e){void 0===e&&(e={});var n=i.getGeom(t);switch(e.properties||"Feature"!==t.type||(e.properties=t.properties),n.type){case"Polygon":return o(n,e);case"MultiPolygon":return a(n,e);default:throw new Error("invalid poly")}},e.polygonToLine=o,e.multiPolygonToLine=a,e.coordsToLine=s},6213:(t,e,n)=>{"use strict";Object.defineProperty(e,"__esModule",{value:!0});var r=n(4102),i=n(611);e.default=function(t,e,n){void 0===n&&(n={});var o=i.getCoord(t),a=i.getCoord(e);a[0]+=a[0]-o[0]>180?-360:o[0]-a[0]>180?360:0;var s=function(t,e,n){var i=n=void 0===n?r.earthRadius:Number(n),o=t[1]*Math.PI/180,a=e[1]*Math.PI/180,s=a-o,u=Math.abs(e[0]-t[0])*Math.PI/180;u>Math.PI&&(u-=2*Math.PI);var l=Math.log(Math.tan(a/2+Math.PI/4)/Math.tan(o/2+Math.PI/4)),c=Math.abs(l)>1e-11?s/l:Math.cos(o);return Math.sqrt(s*s+c*c*u*u)*i}(o,a);return r.convertLength(s,"meters",n.units)}},8583:(t,e,n)=>{"use strict";var r=n(7418);function i(t,e){if(t===e)return 0;for(var n=t.length,r=e.length,i=0,o=Math.min(n,r);i=0;l--)if(c[l]!==h[l])return!1;for(l=c.length-1;l>=0;l--)if(!b(t[s=c[l]],e[s],n,r))return!1;return!0}(t,e,n,r))}return n?t===e:t==e}function v(t){return"[object Arguments]"==Object.prototype.toString.call(t)}function T(t,e){if(!t||!e)return!1;if("[object RegExp]"==Object.prototype.toString.call(e))return e.test(t);try{if(t instanceof e)return!0}catch(t){}return!Error.isPrototypeOf(e)&&!0===e.call({},t)}function E(t,e,n,r){var i;if("function"!=typeof e)throw new TypeError('"block" argument must be a function');"string"==typeof n&&(r=n,n=null),i=function(t){var e;try{t()}catch(t){e=t}return e}(e),r=(n&&n.name?" ("+n.name+").":".")+(r?" "+r:"."),t&&!i&&g(i,n,"Missing expected exception"+r);var o="string"==typeof r,s=!t&&i&&!n;if((!t&&a.isError(i)&&o&&T(i,n)||s)&&g(i,n,"Got unwanted exception"+r),t&&i&&n&&!T(i,n)||!t&&i)throw i}f.AssertionError=function(t){this.name="AssertionError",this.actual=t.actual,this.expected=t.expected,this.operator=t.operator,t.message?(this.message=t.message,this.generatedMessage=!1):(this.message=function(t){return y(m(t.actual),128)+" "+t.operator+" "+y(m(t.expected),128)}(this),this.generatedMessage=!0);var e=t.stackStartFunction||g;if(Error.captureStackTrace)Error.captureStackTrace(this,e);else{var n=new Error;if(n.stack){var r=n.stack,i=d(e),o=r.indexOf("\n"+i);if(o>=0){var a=r.indexOf("\n",o+1);r=r.substring(a+1)}this.stack=r}}},a.inherits(f.AssertionError,Error),f.fail=g,f.ok=_,f.equal=function(t,e,n){t!=e&&g(t,e,n,"==",f.equal)},f.notEqual=function(t,e,n){t==e&&g(t,e,n,"!=",f.notEqual)},f.deepEqual=function(t,e,n){b(t,e,!1)||g(t,e,n,"deepEqual",f.deepEqual)},f.deepStrictEqual=function(t,e,n){b(t,e,!0)||g(t,e,n,"deepStrictEqual",f.deepStrictEqual)},f.notDeepEqual=function(t,e,n){b(t,e,!1)&&g(t,e,n,"notDeepEqual",f.notDeepEqual)},f.notDeepStrictEqual=function t(e,n,r){b(e,n,!0)&&g(e,n,r,"notDeepStrictEqual",t)},f.strictEqual=function(t,e,n){t!==e&&g(t,e,n,"===",f.strictEqual)},f.notStrictEqual=function(t,e,n){t===e&&g(t,e,n,"!==",f.notStrictEqual)},f.throws=function(t,e,n){E(!0,t,e,n)},f.doesNotThrow=function(t,e,n){E(!1,t,e,n)},f.ifError=function(t){if(t)throw t},f.strict=r((function t(e,n){e||g(e,!0,n,"==",t)}),f,{equal:f.strictEqual,deepEqual:f.deepStrictEqual,notEqual:f.notStrictEqual,notDeepEqual:f.notDeepStrictEqual}),f.strict.strict=f.strict;var w=Object.keys||function(t){var e=[];for(var n in t)s.call(t,n)&&e.push(n);return e}},6076:t=>{"function"==typeof Object.create?t.exports=function(t,e){t.super_=e,t.prototype=Object.create(e.prototype,{constructor:{value:t,enumerable:!1,writable:!0,configurable:!0}})}:t.exports=function(t,e){t.super_=e;var n=function(){};n.prototype=e.prototype,t.prototype=new n,t.prototype.constructor=t}},2014:t=>{t.exports=function(t){return t&&"object"==typeof t&&"function"==typeof t.copy&&"function"==typeof t.fill&&"function"==typeof t.readUInt8}},69:(t,e,n)=>{var r=n(4155),i=n(5108),o=/%[sdj%]/g;e.format=function(t){if(!_(t)){for(var e=[],n=0;n=i)return t;switch(t){case"%s":return String(r[n++]);case"%d":return Number(r[n++]);case"%j":try{return JSON.stringify(r[n++])}catch(t){return"[Circular]"}default:return t}})),s=r[n];n=3&&(r.depth=arguments[2]),arguments.length>=4&&(r.colors=arguments[3]),y(n)?r.showHidden=n:n&&e._extend(r,n),b(r.showHidden)&&(r.showHidden=!1),b(r.depth)&&(r.depth=2),b(r.colors)&&(r.colors=!1),b(r.customInspect)&&(r.customInspect=!0),r.colors&&(r.stylize=l),h(r,t,r.depth)}function l(t,e){var n=u.styles[e];return n?"["+u.colors[n][0]+"m"+t+"["+u.colors[n][1]+"m":t}function c(t,e){return t}function h(t,n,r){if(t.customInspect&&n&&x(n.inspect)&&n.inspect!==e.inspect&&(!n.constructor||n.constructor.prototype!==n)){var i=n.inspect(r,t);return _(i)||(i=h(t,i,r)),i}var o=function(t,e){if(b(e))return t.stylize("undefined","undefined");if(_(e)){var n="'"+JSON.stringify(e).replace(/^"|"$/g,"").replace(/'/g,"\\'").replace(/\\"/g,'"')+"'";return t.stylize(n,"string")}return g(e)?t.stylize(""+e,"number"):y(e)?t.stylize(""+e,"boolean"):m(e)?t.stylize("null","null"):void 0}(t,n);if(o)return o;var a=Object.keys(n),s=function(t){var e={};return t.forEach((function(t,n){e[t]=!0})),e}(a);if(t.showHidden&&(a=Object.getOwnPropertyNames(n)),w(n)&&(a.indexOf("message")>=0||a.indexOf("description")>=0))return f(n);if(0===a.length){if(x(n)){var u=n.name?": "+n.name:"";return t.stylize("[Function"+u+"]","special")}if(v(n))return t.stylize(RegExp.prototype.toString.call(n),"regexp");if(E(n))return t.stylize(Date.prototype.toString.call(n),"date");if(w(n))return f(n)}var l,c="",T=!1,C=["{","}"];return d(n)&&(T=!0,C=["[","]"]),x(n)&&(c=" [Function"+(n.name?": "+n.name:"")+"]"),v(n)&&(c=" "+RegExp.prototype.toString.call(n)),E(n)&&(c=" "+Date.prototype.toUTCString.call(n)),w(n)&&(c=" "+f(n)),0!==a.length||T&&0!=n.length?r<0?v(n)?t.stylize(RegExp.prototype.toString.call(n),"regexp"):t.stylize("[Object]","special"):(t.seen.push(n),l=T?function(t,e,n,r,i){for(var o=[],a=0,s=e.length;a60?n[0]+(""===e?"":e+"\n ")+" "+t.join(",\n ")+" "+n[1]:n[0]+e+" "+t.join(", ")+" "+n[1]}(l,c,C)):C[0]+c+C[1]}function f(t){return"["+Error.prototype.toString.call(t)+"]"}function p(t,e,n,r,i,o){var a,s,u;if((u=Object.getOwnPropertyDescriptor(e,i)||{value:e[i]}).get?s=u.set?t.stylize("[Getter/Setter]","special"):t.stylize("[Getter]","special"):u.set&&(s=t.stylize("[Setter]","special")),O(r,i)||(a="["+i+"]"),s||(t.seen.indexOf(u.value)<0?(s=m(n)?h(t,u.value,null):h(t,u.value,n-1)).indexOf("\n")>-1&&(s=o?s.split("\n").map((function(t){return" "+t})).join("\n").substr(2):"\n"+s.split("\n").map((function(t){return" "+t})).join("\n")):s=t.stylize("[Circular]","special")),b(a)){if(o&&i.match(/^\d+$/))return s;(a=JSON.stringify(""+i)).match(/^"([a-zA-Z_][a-zA-Z_0-9]*)"$/)?(a=a.substr(1,a.length-2),a=t.stylize(a,"name")):(a=a.replace(/'/g,"\\'").replace(/\\"/g,'"').replace(/(^"|"$)/g,"'"),a=t.stylize(a,"string"))}return a+": "+s}function d(t){return Array.isArray(t)}function y(t){return"boolean"==typeof t}function m(t){return null===t}function g(t){return"number"==typeof t}function _(t){return"string"==typeof t}function b(t){return void 0===t}function v(t){return T(t)&&"[object RegExp]"===C(t)}function T(t){return"object"==typeof t&&null!==t}function E(t){return T(t)&&"[object Date]"===C(t)}function w(t){return T(t)&&("[object Error]"===C(t)||t instanceof Error)}function x(t){return"function"==typeof t}function C(t){return Object.prototype.toString.call(t)}function M(t){return t<10?"0"+t.toString(10):t.toString(10)}e.debuglog=function(t){if(b(a)&&(a=r.env.NODE_DEBUG||""),t=t.toUpperCase(),!s[t])if(new RegExp("\\b"+t+"\\b","i").test(a)){var n=r.pid;s[t]=function(){var r=e.format.apply(e,arguments);i.error("%s %d: %s",t,n,r)}}else s[t]=function(){};return s[t]},e.inspect=u,u.colors={bold:[1,22],italic:[3,23],underline:[4,24],inverse:[7,27],white:[37,39],grey:[90,39],black:[30,39],blue:[34,39],cyan:[36,39],green:[32,39],magenta:[35,39],red:[31,39],yellow:[33,39]},u.styles={special:"cyan",number:"yellow",boolean:"yellow",undefined:"grey",null:"bold",string:"green",date:"magenta",regexp:"red"},e.isArray=d,e.isBoolean=y,e.isNull=m,e.isNullOrUndefined=function(t){return null==t},e.isNumber=g,e.isString=_,e.isSymbol=function(t){return"symbol"==typeof t},e.isUndefined=b,e.isRegExp=v,e.isObject=T,e.isDate=E,e.isError=w,e.isFunction=x,e.isPrimitive=function(t){return null===t||"boolean"==typeof t||"number"==typeof t||"string"==typeof t||"symbol"==typeof t||void 0===t},e.isBuffer=n(2014);var S=["Jan","Feb","Mar","Apr","May","Jun","Jul","Aug","Sep","Oct","Nov","Dec"];function N(){var t=new Date,e=[M(t.getHours()),M(t.getMinutes()),M(t.getSeconds())].join(":");return[t.getDate(),S[t.getMonth()],e].join(" ")}function O(t,e){return Object.prototype.hasOwnProperty.call(t,e)}e.log=function(){i.log("%s - %s",N(),e.format.apply(e,arguments))},e.inherits=n(6076),e._extend=function(t,e){if(!e||!T(e))return t;for(var n=Object.keys(e),r=n.length;r--;)t[n[r]]=e[n[r]];return t}},9742:(t,e)=>{"use strict";e.byteLength=function(t){var e=u(t),n=e[0],r=e[1];return 3*(n+r)/4-r},e.toByteArray=function(t){var e,n,o=u(t),a=o[0],s=o[1],l=new i(function(t,e,n){return 3*(e+n)/4-n}(0,a,s)),c=0,h=s>0?a-4:a;for(n=0;n>16&255,l[c++]=e>>8&255,l[c++]=255&e;return 2===s&&(e=r[t.charCodeAt(n)]<<2|r[t.charCodeAt(n+1)]>>4,l[c++]=255&e),1===s&&(e=r[t.charCodeAt(n)]<<10|r[t.charCodeAt(n+1)]<<4|r[t.charCodeAt(n+2)]>>2,l[c++]=e>>8&255,l[c++]=255&e),l},e.fromByteArray=function(t){for(var e,r=t.length,i=r%3,o=[],a=16383,s=0,u=r-i;su?u:s+a));return 1===i?(e=t[r-1],o.push(n[e>>2]+n[e<<4&63]+"==")):2===i&&(e=(t[r-2]<<8)+t[r-1],o.push(n[e>>10]+n[e>>4&63]+n[e<<2&63]+"=")),o.join("")};for(var n=[],r=[],i="undefined"!=typeof Uint8Array?Uint8Array:Array,o="ABCDEFGHIJKLMNOPQRSTUVWXYZabcdefghijklmnopqrstuvwxyz0123456789+/",a=0,s=o.length;a0)throw new Error("Invalid string. Length must be a multiple of 4");var n=t.indexOf("=");return-1===n&&(n=e),[n,n===e?0:4-n%4]}function l(t,e,r){for(var i,o,a=[],s=e;s>18&63]+n[o>>12&63]+n[o>>6&63]+n[63&o]);return a.join("")}r["-".charCodeAt(0)]=62,r["_".charCodeAt(0)]=63},8764:(t,e,n)=>{"use strict";var r=n(5108),i=n(9742),o=n(645),a="function"==typeof Symbol&&"function"==typeof Symbol.for?Symbol.for("nodejs.util.inspect.custom"):null;e.Buffer=l,e.SlowBuffer=function(t){return+t!=t&&(t=0),l.alloc(+t)},e.INSPECT_MAX_BYTES=50;var s=2147483647;function u(t){if(t>s)throw new RangeError('The value "'+t+'" is invalid for option "size"');var e=new Uint8Array(t);return Object.setPrototypeOf(e,l.prototype),e}function l(t,e,n){if("number"==typeof t){if("string"==typeof e)throw new TypeError('The "string" argument must be of type string. Received type number');return f(t)}return c(t,e,n)}function c(t,e,n){if("string"==typeof t)return function(t,e){if("string"==typeof e&&""!==e||(e="utf8"),!l.isEncoding(e))throw new TypeError("Unknown encoding: "+e);var n=0|m(t,e),r=u(n),i=r.write(t,e);return i!==n&&(r=r.slice(0,i)),r}(t,e);if(ArrayBuffer.isView(t))return function(t){if(W(t,Uint8Array)){var e=new Uint8Array(t);return d(e.buffer,e.byteOffset,e.byteLength)}return p(t)}(t);if(null==t)throw new TypeError("The first argument must be one of type string, Buffer, ArrayBuffer, Array, or Array-like Object. Received type "+typeof t);if(W(t,ArrayBuffer)||t&&W(t.buffer,ArrayBuffer))return d(t,e,n);if("undefined"!=typeof SharedArrayBuffer&&(W(t,SharedArrayBuffer)||t&&W(t.buffer,SharedArrayBuffer)))return d(t,e,n);if("number"==typeof t)throw new TypeError('The "value" argument must not be of type number. Received type number');var r=t.valueOf&&t.valueOf();if(null!=r&&r!==t)return l.from(r,e,n);var i=function(t){if(l.isBuffer(t)){var e=0|y(t.length),n=u(e);return 0===n.length||t.copy(n,0,0,e),n}return void 0!==t.length?"number"!=typeof t.length||q(t.length)?u(0):p(t):"Buffer"===t.type&&Array.isArray(t.data)?p(t.data):void 0}(t);if(i)return i;if("undefined"!=typeof Symbol&&null!=Symbol.toPrimitive&&"function"==typeof t[Symbol.toPrimitive])return l.from(t[Symbol.toPrimitive]("string"),e,n);throw new TypeError("The first argument must be one of type string, Buffer, ArrayBuffer, Array, or Array-like Object. Received type "+typeof t)}function h(t){if("number"!=typeof t)throw new TypeError('"size" argument must be of type number');if(t<0)throw new RangeError('The value "'+t+'" is invalid for option "size"')}function f(t){return h(t),u(t<0?0:0|y(t))}function p(t){for(var e=t.length<0?0:0|y(t.length),n=u(e),r=0;r=s)throw new RangeError("Attempt to allocate Buffer larger than maximum size: 0x"+s.toString(16)+" bytes");return 0|t}function m(t,e){if(l.isBuffer(t))return t.length;if(ArrayBuffer.isView(t)||W(t,ArrayBuffer))return t.byteLength;if("string"!=typeof t)throw new TypeError('The "string" argument must be one of type string, Buffer, or ArrayBuffer. Received type '+typeof t);var n=t.length,r=arguments.length>2&&!0===arguments[2];if(!r&&0===n)return 0;for(var i=!1;;)switch(e){case"ascii":case"latin1":case"binary":return n;case"utf8":case"utf-8":return B(t).length;case"ucs2":case"ucs-2":case"utf16le":case"utf-16le":return 2*n;case"hex":return n>>>1;case"base64":return j(t).length;default:if(i)return r?-1:B(t).length;e=(""+e).toLowerCase(),i=!0}}function g(t,e,n){var r=!1;if((void 0===e||e<0)&&(e=0),e>this.length)return"";if((void 0===n||n>this.length)&&(n=this.length),n<=0)return"";if((n>>>=0)<=(e>>>=0))return"";for(t||(t="utf8");;)switch(t){case"hex":return I(this,e,n);case"utf8":case"utf-8":return S(this,e,n);case"ascii":return O(this,e,n);case"latin1":case"binary":return A(this,e,n);case"base64":return M(this,e,n);case"ucs2":case"ucs-2":case"utf16le":case"utf-16le":return P(this,e,n);default:if(r)throw new TypeError("Unknown encoding: "+t);t=(t+"").toLowerCase(),r=!0}}function _(t,e,n){var r=t[e];t[e]=t[n],t[n]=r}function b(t,e,n,r,i){if(0===t.length)return-1;if("string"==typeof n?(r=n,n=0):n>2147483647?n=2147483647:n<-2147483648&&(n=-2147483648),q(n=+n)&&(n=i?0:t.length-1),n<0&&(n=t.length+n),n>=t.length){if(i)return-1;n=t.length-1}else if(n<0){if(!i)return-1;n=0}if("string"==typeof e&&(e=l.from(e,r)),l.isBuffer(e))return 0===e.length?-1:v(t,e,n,r,i);if("number"==typeof e)return e&=255,"function"==typeof Uint8Array.prototype.indexOf?i?Uint8Array.prototype.indexOf.call(t,e,n):Uint8Array.prototype.lastIndexOf.call(t,e,n):v(t,[e],n,r,i);throw new TypeError("val must be string, number or Buffer")}function v(t,e,n,r,i){var o,a=1,s=t.length,u=e.length;if(void 0!==r&&("ucs2"===(r=String(r).toLowerCase())||"ucs-2"===r||"utf16le"===r||"utf-16le"===r)){if(t.length<2||e.length<2)return-1;a=2,s/=2,u/=2,n/=2}function l(t,e){return 1===a?t[e]:t.readUInt16BE(e*a)}if(i){var c=-1;for(o=n;os&&(n=s-u),o=n;o>=0;o--){for(var h=!0,f=0;fi&&(r=i):r=i;var o=e.length;r>o/2&&(r=o/2);for(var a=0;a>8,i=n%256,o.push(i),o.push(r);return o}(e,t.length-n),t,n,r)}function M(t,e,n){return 0===e&&n===t.length?i.fromByteArray(t):i.fromByteArray(t.slice(e,n))}function S(t,e,n){n=Math.min(t.length,n);for(var r=[],i=e;i239?4:l>223?3:l>191?2:1;if(i+h<=n)switch(h){case 1:l<128&&(c=l);break;case 2:128==(192&(o=t[i+1]))&&(u=(31&l)<<6|63&o)>127&&(c=u);break;case 3:o=t[i+1],a=t[i+2],128==(192&o)&&128==(192&a)&&(u=(15&l)<<12|(63&o)<<6|63&a)>2047&&(u<55296||u>57343)&&(c=u);break;case 4:o=t[i+1],a=t[i+2],s=t[i+3],128==(192&o)&&128==(192&a)&&128==(192&s)&&(u=(15&l)<<18|(63&o)<<12|(63&a)<<6|63&s)>65535&&u<1114112&&(c=u)}null===c?(c=65533,h=1):c>65535&&(c-=65536,r.push(c>>>10&1023|55296),c=56320|1023&c),r.push(c),i+=h}return function(t){var e=t.length;if(e<=N)return String.fromCharCode.apply(String,t);for(var n="",r=0;rr.length?l.from(o).copy(r,i):Uint8Array.prototype.set.call(r,o,i);else{if(!l.isBuffer(o))throw new TypeError('"list" argument must be an Array of Buffers');o.copy(r,i)}i+=o.length}return r},l.byteLength=m,l.prototype._isBuffer=!0,l.prototype.swap16=function(){var t=this.length;if(t%2!=0)throw new RangeError("Buffer size must be a multiple of 16-bits");for(var e=0;en&&(t+=" ... "),""},a&&(l.prototype[a]=l.prototype.inspect),l.prototype.compare=function(t,e,n,r,i){if(W(t,Uint8Array)&&(t=l.from(t,t.offset,t.byteLength)),!l.isBuffer(t))throw new TypeError('The "target" argument must be one of type Buffer or Uint8Array. Received type '+typeof t);if(void 0===e&&(e=0),void 0===n&&(n=t?t.length:0),void 0===r&&(r=0),void 0===i&&(i=this.length),e<0||n>t.length||r<0||i>this.length)throw new RangeError("out of range index");if(r>=i&&e>=n)return 0;if(r>=i)return-1;if(e>=n)return 1;if(this===t)return 0;for(var o=(i>>>=0)-(r>>>=0),a=(n>>>=0)-(e>>>=0),s=Math.min(o,a),u=this.slice(r,i),c=t.slice(e,n),h=0;h>>=0,isFinite(n)?(n>>>=0,void 0===r&&(r="utf8")):(r=n,n=void 0)}var i=this.length-e;if((void 0===n||n>i)&&(n=i),t.length>0&&(n<0||e<0)||e>this.length)throw new RangeError("Attempt to write outside buffer bounds");r||(r="utf8");for(var o=!1;;)switch(r){case"hex":return T(this,t,e,n);case"utf8":case"utf-8":return E(this,t,e,n);case"ascii":case"latin1":case"binary":return w(this,t,e,n);case"base64":return x(this,t,e,n);case"ucs2":case"ucs-2":case"utf16le":case"utf-16le":return C(this,t,e,n);default:if(o)throw new TypeError("Unknown encoding: "+r);r=(""+r).toLowerCase(),o=!0}},l.prototype.toJSON=function(){return{type:"Buffer",data:Array.prototype.slice.call(this._arr||this,0)}};var N=4096;function O(t,e,n){var r="";n=Math.min(t.length,n);for(var i=e;ir)&&(n=r);for(var i="",o=e;on)throw new RangeError("Trying to access beyond buffer length")}function L(t,e,n,r,i,o){if(!l.isBuffer(t))throw new TypeError('"buffer" argument must be a Buffer instance');if(e>i||et.length)throw new RangeError("Index out of range")}function D(t,e,n,r,i,o){if(n+r>t.length)throw new RangeError("Index out of range");if(n<0)throw new RangeError("Index out of range")}function k(t,e,n,r,i){return e=+e,n>>>=0,i||D(t,0,n,4),o.write(t,e,n,r,23,4),n+4}function F(t,e,n,r,i){return e=+e,n>>>=0,i||D(t,0,n,8),o.write(t,e,n,r,52,8),n+8}l.prototype.slice=function(t,e){var n=this.length;(t=~~t)<0?(t+=n)<0&&(t=0):t>n&&(t=n),(e=void 0===e?n:~~e)<0?(e+=n)<0&&(e=0):e>n&&(e=n),e>>=0,e>>>=0,n||R(t,e,this.length);for(var r=this[t],i=1,o=0;++o>>=0,e>>>=0,n||R(t,e,this.length);for(var r=this[t+--e],i=1;e>0&&(i*=256);)r+=this[t+--e]*i;return r},l.prototype.readUint8=l.prototype.readUInt8=function(t,e){return t>>>=0,e||R(t,1,this.length),this[t]},l.prototype.readUint16LE=l.prototype.readUInt16LE=function(t,e){return t>>>=0,e||R(t,2,this.length),this[t]|this[t+1]<<8},l.prototype.readUint16BE=l.prototype.readUInt16BE=function(t,e){return t>>>=0,e||R(t,2,this.length),this[t]<<8|this[t+1]},l.prototype.readUint32LE=l.prototype.readUInt32LE=function(t,e){return t>>>=0,e||R(t,4,this.length),(this[t]|this[t+1]<<8|this[t+2]<<16)+16777216*this[t+3]},l.prototype.readUint32BE=l.prototype.readUInt32BE=function(t,e){return t>>>=0,e||R(t,4,this.length),16777216*this[t]+(this[t+1]<<16|this[t+2]<<8|this[t+3])},l.prototype.readIntLE=function(t,e,n){t>>>=0,e>>>=0,n||R(t,e,this.length);for(var r=this[t],i=1,o=0;++o=(i*=128)&&(r-=Math.pow(2,8*e)),r},l.prototype.readIntBE=function(t,e,n){t>>>=0,e>>>=0,n||R(t,e,this.length);for(var r=e,i=1,o=this[t+--r];r>0&&(i*=256);)o+=this[t+--r]*i;return o>=(i*=128)&&(o-=Math.pow(2,8*e)),o},l.prototype.readInt8=function(t,e){return t>>>=0,e||R(t,1,this.length),128&this[t]?-1*(255-this[t]+1):this[t]},l.prototype.readInt16LE=function(t,e){t>>>=0,e||R(t,2,this.length);var n=this[t]|this[t+1]<<8;return 32768&n?4294901760|n:n},l.prototype.readInt16BE=function(t,e){t>>>=0,e||R(t,2,this.length);var n=this[t+1]|this[t]<<8;return 32768&n?4294901760|n:n},l.prototype.readInt32LE=function(t,e){return t>>>=0,e||R(t,4,this.length),this[t]|this[t+1]<<8|this[t+2]<<16|this[t+3]<<24},l.prototype.readInt32BE=function(t,e){return t>>>=0,e||R(t,4,this.length),this[t]<<24|this[t+1]<<16|this[t+2]<<8|this[t+3]},l.prototype.readFloatLE=function(t,e){return t>>>=0,e||R(t,4,this.length),o.read(this,t,!0,23,4)},l.prototype.readFloatBE=function(t,e){return t>>>=0,e||R(t,4,this.length),o.read(this,t,!1,23,4)},l.prototype.readDoubleLE=function(t,e){return t>>>=0,e||R(t,8,this.length),o.read(this,t,!0,52,8)},l.prototype.readDoubleBE=function(t,e){return t>>>=0,e||R(t,8,this.length),o.read(this,t,!1,52,8)},l.prototype.writeUintLE=l.prototype.writeUIntLE=function(t,e,n,r){t=+t,e>>>=0,n>>>=0,r||L(this,t,e,n,Math.pow(2,8*n)-1,0);var i=1,o=0;for(this[e]=255&t;++o>>=0,n>>>=0,r||L(this,t,e,n,Math.pow(2,8*n)-1,0);var i=n-1,o=1;for(this[e+i]=255&t;--i>=0&&(o*=256);)this[e+i]=t/o&255;return e+n},l.prototype.writeUint8=l.prototype.writeUInt8=function(t,e,n){return t=+t,e>>>=0,n||L(this,t,e,1,255,0),this[e]=255&t,e+1},l.prototype.writeUint16LE=l.prototype.writeUInt16LE=function(t,e,n){return t=+t,e>>>=0,n||L(this,t,e,2,65535,0),this[e]=255&t,this[e+1]=t>>>8,e+2},l.prototype.writeUint16BE=l.prototype.writeUInt16BE=function(t,e,n){return t=+t,e>>>=0,n||L(this,t,e,2,65535,0),this[e]=t>>>8,this[e+1]=255&t,e+2},l.prototype.writeUint32LE=l.prototype.writeUInt32LE=function(t,e,n){return t=+t,e>>>=0,n||L(this,t,e,4,4294967295,0),this[e+3]=t>>>24,this[e+2]=t>>>16,this[e+1]=t>>>8,this[e]=255&t,e+4},l.prototype.writeUint32BE=l.prototype.writeUInt32BE=function(t,e,n){return t=+t,e>>>=0,n||L(this,t,e,4,4294967295,0),this[e]=t>>>24,this[e+1]=t>>>16,this[e+2]=t>>>8,this[e+3]=255&t,e+4},l.prototype.writeIntLE=function(t,e,n,r){if(t=+t,e>>>=0,!r){var i=Math.pow(2,8*n-1);L(this,t,e,n,i-1,-i)}var o=0,a=1,s=0;for(this[e]=255&t;++o>0)-s&255;return e+n},l.prototype.writeIntBE=function(t,e,n,r){if(t=+t,e>>>=0,!r){var i=Math.pow(2,8*n-1);L(this,t,e,n,i-1,-i)}var o=n-1,a=1,s=0;for(this[e+o]=255&t;--o>=0&&(a*=256);)t<0&&0===s&&0!==this[e+o+1]&&(s=1),this[e+o]=(t/a>>0)-s&255;return e+n},l.prototype.writeInt8=function(t,e,n){return t=+t,e>>>=0,n||L(this,t,e,1,127,-128),t<0&&(t=255+t+1),this[e]=255&t,e+1},l.prototype.writeInt16LE=function(t,e,n){return t=+t,e>>>=0,n||L(this,t,e,2,32767,-32768),this[e]=255&t,this[e+1]=t>>>8,e+2},l.prototype.writeInt16BE=function(t,e,n){return t=+t,e>>>=0,n||L(this,t,e,2,32767,-32768),this[e]=t>>>8,this[e+1]=255&t,e+2},l.prototype.writeInt32LE=function(t,e,n){return t=+t,e>>>=0,n||L(this,t,e,4,2147483647,-2147483648),this[e]=255&t,this[e+1]=t>>>8,this[e+2]=t>>>16,this[e+3]=t>>>24,e+4},l.prototype.writeInt32BE=function(t,e,n){return t=+t,e>>>=0,n||L(this,t,e,4,2147483647,-2147483648),t<0&&(t=4294967295+t+1),this[e]=t>>>24,this[e+1]=t>>>16,this[e+2]=t>>>8,this[e+3]=255&t,e+4},l.prototype.writeFloatLE=function(t,e,n){return k(this,t,e,!0,n)},l.prototype.writeFloatBE=function(t,e,n){return k(this,t,e,!1,n)},l.prototype.writeDoubleLE=function(t,e,n){return F(this,t,e,!0,n)},l.prototype.writeDoubleBE=function(t,e,n){return F(this,t,e,!1,n)},l.prototype.copy=function(t,e,n,r){if(!l.isBuffer(t))throw new TypeError("argument should be a Buffer");if(n||(n=0),r||0===r||(r=this.length),e>=t.length&&(e=t.length),e||(e=0),r>0&&r=this.length)throw new RangeError("Index out of range");if(r<0)throw new RangeError("sourceEnd out of bounds");r>this.length&&(r=this.length),t.length-e>>=0,n=void 0===n?this.length:n>>>0,t||(t=0),"number"==typeof t)for(o=e;o55295&&n<57344){if(!i){if(n>56319){(e-=3)>-1&&o.push(239,191,189);continue}if(a+1===r){(e-=3)>-1&&o.push(239,191,189);continue}i=n;continue}if(n<56320){(e-=3)>-1&&o.push(239,191,189),i=n;continue}n=65536+(i-55296<<10|n-56320)}else i&&(e-=3)>-1&&o.push(239,191,189);if(i=null,n<128){if((e-=1)<0)break;o.push(n)}else if(n<2048){if((e-=2)<0)break;o.push(n>>6|192,63&n|128)}else if(n<65536){if((e-=3)<0)break;o.push(n>>12|224,n>>6&63|128,63&n|128)}else{if(!(n<1114112))throw new Error("Invalid code point");if((e-=4)<0)break;o.push(n>>18|240,n>>12&63|128,n>>6&63|128,63&n|128)}}return o}function j(t){return i.toByteArray(function(t){if((t=(t=t.split("=")[0]).trim().replace(U,"")).length<2)return"";for(;t.length%4!=0;)t+="=";return t}(t))}function G(t,e,n,r){for(var i=0;i=e.length||i>=t.length);++i)e[i+n]=t[i];return i}function W(t,e){return t instanceof e||null!=t&&null!=t.constructor&&null!=t.constructor.name&&t.constructor.name===e.name}function q(t){return t!=t}var H=function(){for(var t="0123456789abcdef",e=new Array(256),n=0;n<16;++n)for(var r=16*n,i=0;i<16;++i)e[r+i]=t[n]+t[i];return e}()},584:t=>{t.exports={100:"Continue",101:"Switching Protocols",102:"Processing",200:"OK",201:"Created",202:"Accepted",203:"Non-Authoritative Information",204:"No Content",205:"Reset Content",206:"Partial Content",207:"Multi-Status",208:"Already Reported",226:"IM Used",300:"Multiple Choices",301:"Moved Permanently",302:"Found",303:"See Other",304:"Not Modified",305:"Use Proxy",307:"Temporary Redirect",308:"Permanent Redirect",400:"Bad Request",401:"Unauthorized",402:"Payment Required",403:"Forbidden",404:"Not Found",405:"Method Not Allowed",406:"Not Acceptable",407:"Proxy Authentication Required",408:"Request Timeout",409:"Conflict",410:"Gone",411:"Length Required",412:"Precondition Failed",413:"Payload Too Large",414:"URI Too Long",415:"Unsupported Media Type",416:"Range Not Satisfiable",417:"Expectation Failed",418:"I'm a teapot",421:"Misdirected Request",422:"Unprocessable Entity",423:"Locked",424:"Failed Dependency",425:"Unordered Collection",426:"Upgrade Required",428:"Precondition Required",429:"Too Many Requests",431:"Request Header Fields Too Large",451:"Unavailable For Legal Reasons",500:"Internal Server Error",501:"Not Implemented",502:"Bad Gateway",503:"Service Unavailable",504:"Gateway Timeout",505:"HTTP Version Not Supported",506:"Variant Also Negotiates",507:"Insufficient Storage",508:"Loop Detected",509:"Bandwidth Limit Exceeded",510:"Not Extended",511:"Network Authentication Required"}},5108:(t,e,n)=>{var r=n(9539),i=n(8583);function o(){return(new Date).getTime()}var a,s=Array.prototype.slice,u={};a=void 0!==n.g&&n.g.console?n.g.console:"undefined"!=typeof window&&window.console?window.console:{};for(var l=[[function(){},"log"],[function(){a.log.apply(a,arguments)},"info"],[function(){a.log.apply(a,arguments)},"warn"],[function(){a.warn.apply(a,arguments)},"error"],[function(t){u[t]=o()},"time"],[function(t){var e=u[t];if(!e)throw new Error("No such label: "+t);delete u[t];var n=o()-e;a.log(t+": "+n+"ms")},"timeEnd"],[function(){var t=new Error;t.name="Trace",t.message=r.format.apply(null,arguments),a.error(t.stack)},"trace"],[function(t){a.log(r.inspect(t)+"\n")},"dir"],[function(t){if(!t){var e=s.call(arguments,1);i.ok(!1,r.format.apply(null,e))}},"assert"]],c=0;c{var r=n(5108),i=Object.create||function(t){var e=function(){};return e.prototype=t,new e},o=Object.keys||function(t){var e=[];for(var n in t)Object.prototype.hasOwnProperty.call(t,n)&&e.push(n);return n},a=Function.prototype.bind||function(t){var e=this;return function(){return e.apply(t,arguments)}};function s(){this._events&&Object.prototype.hasOwnProperty.call(this,"_events")||(this._events=i(null),this._eventsCount=0),this._maxListeners=this._maxListeners||void 0}t.exports=s,s.EventEmitter=s,s.prototype._events=void 0,s.prototype._maxListeners=void 0;var u,l=10;try{var c={};Object.defineProperty&&Object.defineProperty(c,"x",{value:0}),u=0===c.x}catch(t){u=!1}function h(t){return void 0===t._maxListeners?s.defaultMaxListeners:t._maxListeners}function f(t,e,n){if(e)t.call(n);else for(var r=t.length,i=E(t,r),o=0;o0&&u.length>a){u.warned=!0;var l=new Error("Possible EventEmitter memory leak detected. "+u.length+' "'+String(e)+'" listeners added. Use emitter.setMaxListeners() to increase limit.');l.name="MaxListenersExceededWarning",l.emitter=t,l.type=e,l.count=u.length,"object"==typeof r&&r.warn&&r.warn("%s: %s",l.name,l.message)}}else u=s[e]=n,++t._eventsCount;return t}function _(){if(!this.fired)switch(this.target.removeListener(this.type,this.wrapFn),this.fired=!0,arguments.length){case 0:return this.listener.call(this.target);case 1:return this.listener.call(this.target,arguments[0]);case 2:return this.listener.call(this.target,arguments[0],arguments[1]);case 3:return this.listener.call(this.target,arguments[0],arguments[1],arguments[2]);default:for(var t=new Array(arguments.length),e=0;e1&&(e=arguments[1]),e instanceof Error)throw e;var u=new Error('Unhandled "error" event. ('+e+")");throw u.context=e,u}if(!(n=a[t]))return!1;var l="function"==typeof n;switch(r=arguments.length){case 1:f(n,l,this);break;case 2:p(n,l,this,arguments[1]);break;case 3:d(n,l,this,arguments[1],arguments[2]);break;case 4:y(n,l,this,arguments[1],arguments[2],arguments[3]);break;default:for(i=new Array(r-1),o=1;o=0;a--)if(n[a]===e||n[a].listener===e){s=n[a].listener,o=a;break}if(o<0)return this;0===o?n.shift():function(t,e){for(var n=e,r=n+1,i=t.length;r=0;r--)this.removeListener(t,e[r]);return this},s.prototype.listeners=function(t){return v(this,t,!0)},s.prototype.rawListeners=function(t){return v(this,t,!1)},s.listenerCount=function(t,e){return"function"==typeof t.listenerCount?t.listenerCount(e):T.call(t,e)},s.prototype.listenerCount=T,s.prototype.eventNames=function(){return this._eventsCount>0?Reflect.ownKeys(this._events):[]}},7769:(module,__unused_webpack_exports,__webpack_require__)=>{"use strict";var Buffer=__webpack_require__(3085).Buffer;const{multiByteIndexOf,stringToBytes,readUInt64LE,tarHeaderChecksumMatches,uint8ArrayUtf8ByteString}=__webpack_require__(6188),supported=__webpack_require__(9898),xpiZipFilename=stringToBytes("META-INF/mozilla.rsa"),oxmlContentTypes=stringToBytes("[Content_Types].xml"),oxmlRels=stringToBytes("_rels/.rels"),fileType=t=>{if(!(t instanceof Uint8Array||t instanceof ArrayBuffer||Buffer.isBuffer(t)))throw new TypeError(`Expected the \`input\` argument to be of type \`Uint8Array\` or \`Buffer\` or \`ArrayBuffer\`, got \`${typeof t}\``);const e=t instanceof Uint8Array?t:new Uint8Array(t);if(!(e&&e.length>1))return;const n=(t,n)=>{n={offset:0,...n};for(let r=0;rn(stringToBytes(t),e);if(n([255,216,255]))return{ext:"jpg",mime:"image/jpeg"};if(n([137,80,78,71,13,10,26,10])){const t=33,n=e.findIndex(((n,r)=>r>=t&&73===e[r]&&68===e[r+1]&&65===e[r+2]&&84===e[r+3])),r=e.subarray(t,n);return r.findIndex(((t,e)=>97===r[e]&&99===r[e+1]&&84===r[e+2]&&76===r[e+3]))>=0?{ext:"apng",mime:"image/apng"}:{ext:"png",mime:"image/png"}}if(n([71,73,70]))return{ext:"gif",mime:"image/gif"};if(n([87,69,66,80],{offset:8}))return{ext:"webp",mime:"image/webp"};if(n([70,76,73,70]))return{ext:"flif",mime:"image/flif"};if((n([73,73,42,0])||n([77,77,0,42]))&&n([67,82],{offset:8}))return{ext:"cr2",mime:"image/x-canon-cr2"};if(n([73,73,82,79,8,0,0,0,24]))return{ext:"orf",mime:"image/x-olympus-orf"};if(n([73,73,42,0])&&(n([16,251,134,1],{offset:4})||n([8,0,0,0],{offset:4}))&&n([0,254,0,4,0,1,0,0,0,1,0,0,0,3,1],{offset:9}))return{ext:"arw",mime:"image/x-sony-arw"};if(n([73,73,42,0,8,0,0,0])&&(n([45,0,254,0],{offset:8})||n([39,0,254,0],{offset:8})))return{ext:"dng",mime:"image/x-adobe-dng"};if(n([73,73,42,0])&&n([28,0,254,0],{offset:8}))return{ext:"nef",mime:"image/x-nikon-nef"};if(n([73,73,85,0,24,0,0,0,136,231,116,216]))return{ext:"rw2",mime:"image/x-panasonic-rw2"};if(r("FUJIFILMCCD-RAW"))return{ext:"raf",mime:"image/x-fujifilm-raf"};if(n([73,73,42,0])||n([77,77,0,42]))return{ext:"tif",mime:"image/tiff"};if(n([66,77]))return{ext:"bmp",mime:"image/bmp"};if(n([73,73,188]))return{ext:"jxr",mime:"image/vnd.ms-photo"};if(n([56,66,80,83]))return{ext:"psd",mime:"image/vnd.adobe.photoshop"};const i=[80,75,3,4];if(n(i)){if(n([109,105,109,101,116,121,112,101,97,112,112,108,105,99,97,116,105,111,110,47,101,112,117,98,43,122,105,112],{offset:30}))return{ext:"epub",mime:"application/epub+zip"};if(n(xpiZipFilename,{offset:30}))return{ext:"xpi",mime:"application/x-xpinstall"};if(r("mimetypeapplication/vnd.oasis.opendocument.text",{offset:30}))return{ext:"odt",mime:"application/vnd.oasis.opendocument.text"};if(r("mimetypeapplication/vnd.oasis.opendocument.spreadsheet",{offset:30}))return{ext:"ods",mime:"application/vnd.oasis.opendocument.spreadsheet"};if(r("mimetypeapplication/vnd.oasis.opendocument.presentation",{offset:30}))return{ext:"odp",mime:"application/vnd.oasis.opendocument.presentation"};let t,o=0,a=!1;do{const s=o+30;if(a||(a=n(oxmlContentTypes,{offset:s})||n(oxmlRels,{offset:s})),t||(r("word/",{offset:s})?t={ext:"docx",mime:"application/vnd.openxmlformats-officedocument.wordprocessingml.document"}:r("ppt/",{offset:s})?t={ext:"pptx",mime:"application/vnd.openxmlformats-officedocument.presentationml.presentation"}:r("xl/",{offset:s})&&(t={ext:"xlsx",mime:"application/vnd.openxmlformats-officedocument.spreadsheetml.sheet"})),a&&t)return t;o=multiByteIndexOf(e,i,s)}while(o>=0);if(t)return t}if(n([80,75])&&(3===e[2]||5===e[2]||7===e[2])&&(4===e[3]||6===e[3]||8===e[3]))return{ext:"zip",mime:"application/zip"};if(n([48,48,48,48,48,48],{offset:148,mask:[248,248,248,248,248,248]})&&tarHeaderChecksumMatches(e))return{ext:"tar",mime:"application/x-tar"};if(n([82,97,114,33,26,7])&&(0===e[6]||1===e[6]))return{ext:"rar",mime:"application/x-rar-compressed"};if(n([31,139,8]))return{ext:"gz",mime:"application/gzip"};if(n([66,90,104]))return{ext:"bz2",mime:"application/x-bzip2"};if(n([55,122,188,175,39,28]))return{ext:"7z",mime:"application/x-7z-compressed"};if(n([120,1]))return{ext:"dmg",mime:"application/x-apple-diskimage"};if(n([102,114,101,101],{offset:4})||n([109,100,97,116],{offset:4})||n([109,111,111,118],{offset:4})||n([119,105,100,101],{offset:4}))return{ext:"mov",mime:"video/quicktime"};if(n([102,116,121,112],{offset:4})&&0!=(96&e[8])&&0!=(96&e[9])&&0!=(96&e[10])&&0!=(96&e[11])){const t=uint8ArrayUtf8ByteString(e,8,12);switch(t){case"mif1":return{ext:"heic",mime:"image/heif"};case"msf1":return{ext:"heic",mime:"image/heif-sequence"};case"heic":case"heix":return{ext:"heic",mime:"image/heic"};case"hevc":case"hevx":return{ext:"heic",mime:"image/heic-sequence"};case"qt ":return{ext:"mov",mime:"video/quicktime"};case"M4V ":case"M4VH":case"M4VP":return{ext:"m4v",mime:"video/x-m4v"};case"M4P ":return{ext:"m4p",mime:"video/mp4"};case"M4B ":return{ext:"m4b",mime:"audio/mp4"};case"M4A ":return{ext:"m4a",mime:"audio/x-m4a"};case"F4V ":return{ext:"f4v",mime:"video/mp4"};case"F4P ":return{ext:"f4p",mime:"video/mp4"};case"F4A ":return{ext:"f4a",mime:"audio/mp4"};case"F4B ":return{ext:"f4b",mime:"audio/mp4"};default:return t.startsWith("3g")?t.startsWith("3g2")?{ext:"3g2",mime:"video/3gpp2"}:{ext:"3gp",mime:"video/3gpp"}:{ext:"mp4",mime:"video/mp4"}}}if(n([77,84,104,100]))return{ext:"mid",mime:"audio/midi"};if(n([26,69,223,163])){const t=e.subarray(4,4100),n=t.findIndex(((t,e,n)=>66===n[e]&&130===n[e+1]));if(-1!==n){const e=n+3,r=n=>[...n].every(((n,r)=>t[e+r]===n.charCodeAt(0)));if(r("matroska"))return{ext:"mkv",mime:"video/x-matroska"};if(r("webm"))return{ext:"webm",mime:"video/webm"}}}if(n([82,73,70,70])){if(n([65,86,73],{offset:8}))return{ext:"avi",mime:"video/vnd.avi"};if(n([87,65,86,69],{offset:8}))return{ext:"wav",mime:"audio/vnd.wave"};if(n([81,76,67,77],{offset:8}))return{ext:"qcp",mime:"audio/qcelp"}}if(n([48,38,178,117,142,102,207,17,166,217])){let t=30;do{const r=readUInt64LE(e,t+16);if(n([145,7,220,183,183,169,207,17,142,230,0,192,12,32,83,101],{offset:t})){if(n([64,158,105,248,77,91,207,17,168,253,0,128,95,92,68,43],{offset:t+24}))return{ext:"wma",mime:"audio/x-ms-wma"};if(n([192,239,25,188,77,91,207,17,168,253,0,128,95,92,68,43],{offset:t+24}))return{ext:"wmv",mime:"video/x-ms-asf"};break}t+=r}while(t+24<=e.length);return{ext:"asf",mime:"application/vnd.ms-asf"}}if(n([0,0,1,186])||n([0,0,1,179]))return{ext:"mpg",mime:"video/mpeg"};for(let t=0;t<2&&tnew Promise(((resolve,reject)=>{const stream=eval("require")("stream");readableStream.on("error",reject),readableStream.once("readable",(()=>{const t=new stream.PassThrough,e=readableStream.read(module.exports.minimumBytes)||readableStream.read();try{t.fileType=fileType(e)}catch(t){reject(t)}readableStream.unshift(e),stream.pipeline?resolve(stream.pipeline(readableStream,t,(()=>{}))):resolve(readableStream.pipe(t))}))})),Object.defineProperty(fileType,"extensions",{get:()=>new Set(supported.extensions)}),Object.defineProperty(fileType,"mimeTypes",{get:()=>new Set(supported.mimeTypes)})},9898:t=>{"use strict";t.exports={extensions:["jpg","png","apng","gif","webp","flif","cr2","orf","arw","dng","nef","rw2","raf","tif","bmp","jxr","psd","zip","tar","rar","gz","bz2","7z","dmg","mp4","mid","mkv","webm","mov","avi","mpg","mp2","mp3","m4a","oga","ogg","ogv","opus","flac","wav","spx","amr","pdf","epub","exe","swf","rtf","wasm","woff","woff2","eot","ttf","otf","ico","flv","ps","xz","sqlite","nes","crx","xpi","cab","deb","ar","rpm","Z","lz","msi","mxf","mts","blend","bpg","docx","pptx","xlsx","3gp","3g2","jp2","jpm","jpx","mj2","aif","qcp","odt","ods","odp","xml","mobi","heic","cur","ktx","ape","wv","wmv","wma","dcm","ics","glb","pcap","dsf","lnk","alias","voc","ac3","m4v","m4p","m4b","f4v","f4p","f4b","f4a","mie","asf","ogm","ogx","mpc","arrow","shp"],mimeTypes:["image/jpeg","image/png","image/gif","image/webp","image/flif","image/x-canon-cr2","image/tiff","image/bmp","image/vnd.ms-photo","image/vnd.adobe.photoshop","application/epub+zip","application/x-xpinstall","application/vnd.oasis.opendocument.text","application/vnd.oasis.opendocument.spreadsheet","application/vnd.oasis.opendocument.presentation","application/vnd.openxmlformats-officedocument.wordprocessingml.document","application/vnd.openxmlformats-officedocument.presentationml.presentation","application/vnd.openxmlformats-officedocument.spreadsheetml.sheet","application/zip","application/x-tar","application/x-rar-compressed","application/gzip","application/x-bzip2","application/x-7z-compressed","application/x-apple-diskimage","application/x-apache-arrow","video/mp4","audio/midi","video/x-matroska","video/webm","video/quicktime","video/vnd.avi","audio/vnd.wave","audio/qcelp","audio/x-ms-wma","video/x-ms-asf","application/vnd.ms-asf","video/mpeg","video/3gpp","audio/mpeg","audio/mp4","audio/opus","video/ogg","audio/ogg","application/ogg","audio/x-flac","audio/ape","audio/wavpack","audio/amr","application/pdf","application/x-msdownload","application/x-shockwave-flash","application/rtf","application/wasm","font/woff","font/woff2","application/vnd.ms-fontobject","font/ttf","font/otf","image/x-icon","video/x-flv","application/postscript","application/x-xz","application/x-sqlite3","application/x-nintendo-nes-rom","application/x-google-chrome-extension","application/vnd.ms-cab-compressed","application/x-deb","application/x-unix-archive","application/x-rpm","application/x-compress","application/x-lzip","application/x-msi","application/x-mie","application/mxf","video/mp2t","application/x-blender","image/bpg","image/jp2","image/jpx","image/jpm","image/mj2","audio/aiff","application/xml","application/x-mobipocket-ebook","image/heif","image/heif-sequence","image/heic","image/heic-sequence","image/ktx","application/dicom","audio/x-musepack","text/calendar","model/gltf-binary","application/vnd.tcpdump.pcap","audio/x-dsf","application/x.ms.shortcut","application/x.apple.alias","audio/x-voc","audio/vnd.dolby.dd-raw","audio/x-m4a","image/apng","image/x-olympus-orf","image/x-sony-arw","image/x-adobe-dng","image/x-nikon-nef","image/x-panasonic-rw2","image/x-fujifilm-raf","video/x-m4v","video/3gpp2","application/x-esri-shape"]}},6188:(t,e,n)=>{"use strict";var r=n(3085).Buffer;e.stringToBytes=t=>[...t].map((t=>t.charCodeAt(0)));const i=(t,e,n)=>String.fromCharCode(...t.slice(e,n));e.readUInt64LE=(t,e=0)=>{let n=t[e],r=1,i=0;for(;++i<8;)r*=256,n+=t[e+i]*r;return n},e.tarHeaderChecksumMatches=t=>{if(t.length<512)return!1;let e=256,n=0;for(let r=0;r<148;r++){const i=t[r];e+=i,n+=128&i}for(let r=156;r<512;r++){const i=t[r];e+=i,n+=128&i}const r=parseInt(i(t,148,154),8);return r===e||r===e-(n<<1)},e.multiByteIndexOf=(t,e,n=0)=>{if(r&&r.isBuffer(t))return t.indexOf(r.from(e),n);const i=(t,e,n)=>{for(let r=1;r=0;){if(i(t,e,o))return o;o=t.indexOf(e[0],o+1)}return-1},e.uint8ArrayUtf8ByteString=i},1787:(t,e,n)=>{var r=n(2582),i=n(4102),o=n(1540),a=n(9705).default,s=o.featureEach,u=(o.coordEach,i.polygon,i.featureCollection);function l(t){var e=new r(t);return e.insert=function(t){if("Feature"!==t.type)throw new Error("invalid feature");return t.bbox=t.bbox?t.bbox:a(t),r.prototype.insert.call(this,t)},e.load=function(t){var e=[];return Array.isArray(t)?t.forEach((function(t){if("Feature"!==t.type)throw new Error("invalid features");t.bbox=t.bbox?t.bbox:a(t),e.push(t)})):s(t,(function(t){if("Feature"!==t.type)throw new Error("invalid features");t.bbox=t.bbox?t.bbox:a(t),e.push(t)})),r.prototype.load.call(this,e)},e.remove=function(t,e){if("Feature"!==t.type)throw new Error("invalid feature");return t.bbox=t.bbox?t.bbox:a(t),r.prototype.remove.call(this,t,e)},e.clear=function(){return r.prototype.clear.call(this)},e.search=function(t){var e=r.prototype.search.call(this,this.toBBox(t));return u(e)},e.collides=function(t){return r.prototype.collides.call(this,this.toBBox(t))},e.all=function(){var t=r.prototype.all.call(this);return u(t)},e.toJSON=function(){return r.prototype.toJSON.call(this)},e.fromJSON=function(t){return r.prototype.fromJSON.call(this,t)},e.toBBox=function(t){var e;if(t.bbox)e=t.bbox;else if(Array.isArray(t)&&4===t.length)e=t;else if(Array.isArray(t)&&6===t.length)e=[t[0],t[1],t[3],t[4]];else if("Feature"===t.type)e=a(t);else{if("FeatureCollection"!==t.type)throw new Error("invalid geojson");e=a(t)}return{minX:e[0],minY:e[1],maxX:e[2],maxY:e[3]}},e}t.exports=l,t.exports.default=l},645:(t,e)=>{e.read=function(t,e,n,r,i){var o,a,s=8*i-r-1,u=(1<>1,c=-7,h=n?i-1:0,f=n?-1:1,p=t[e+h];for(h+=f,o=p&(1<<-c)-1,p>>=-c,c+=s;c>0;o=256*o+t[e+h],h+=f,c-=8);for(a=o&(1<<-c)-1,o>>=-c,c+=r;c>0;a=256*a+t[e+h],h+=f,c-=8);if(0===o)o=1-l;else{if(o===u)return a?NaN:1/0*(p?-1:1);a+=Math.pow(2,r),o-=l}return(p?-1:1)*a*Math.pow(2,o-r)},e.write=function(t,e,n,r,i,o){var a,s,u,l=8*o-i-1,c=(1<>1,f=23===i?Math.pow(2,-24)-Math.pow(2,-77):0,p=r?0:o-1,d=r?1:-1,y=e<0||0===e&&1/e<0?1:0;for(e=Math.abs(e),isNaN(e)||e===1/0?(s=isNaN(e)?1:0,a=c):(a=Math.floor(Math.log(e)/Math.LN2),e*(u=Math.pow(2,-a))<1&&(a--,u*=2),(e+=a+h>=1?f/u:f*Math.pow(2,1-h))*u>=2&&(a++,u/=2),a+h>=c?(s=0,a=c):a+h>=1?(s=(e*u-1)*Math.pow(2,i),a+=h):(s=e*Math.pow(2,h-1)*Math.pow(2,i),a=0));i>=8;t[n+p]=255&s,p+=d,s/=256,i-=8);for(a=a<0;t[n+p]=255&a,p+=d,a/=256,l-=8);t[n+p-d]|=128*y}},8849:(t,e,n)=>{"use strict";Object.defineProperty(e,"__esModule",{value:!0});const r=n(9126),i=Object.keys(r.typeHandlers),o={56:"psd",66:"bmp",68:"dds",71:"gif",73:"tiff",77:"tiff",82:"webp",105:"icns",137:"png",255:"jpg"};e.detector=function(t){const e=t[0];if(e in o){const n=o[e];if(r.typeHandlers[n].validate(t))return n}return i.find((e=>r.typeHandlers[e].validate(t)))}},9248:(t,e,n)=>{"use strict";Object.defineProperty(e,"__esModule",{value:!0});const r=n(8497);if(!("promises"in r)){class t{constructor(t){this.fd=t}stat(){return new Promise(((t,e)=>{r.fstat(this.fd,((n,r)=>{n?e(n):t(r)}))}))}read(t,e,n,i){return new Promise(((o,a)=>{r.read(this.fd,t,e,n,i,(t=>{t?a(t):o()}))}))}close(){return new Promise(((t,e)=>{r.close(this.fd,(n=>{n?e(n):t()}))}))}}Object.defineProperty(r,"promises",{value:{open:(e,n)=>new Promise(((i,o)=>{r.open(e,n,((e,n)=>{e?o(e):i(new t(n))}))}))},writable:!1})}},7935:function(t,e,n){"use strict";var r=n(3085).Buffer,i=n(4155),o=this&&this.__awaiter||function(t,e,n,r){return new(n||(n=Promise))((function(i,o){function a(t){try{u(r.next(t))}catch(t){o(t)}}function s(t){try{u(r.throw(t))}catch(t){o(t)}}function u(t){var e;t.done?i(t.value):(e=t.value,e instanceof n?e:new n((function(t){t(e)}))).then(a,s)}u((r=r.apply(t,e||[])).next())}))};Object.defineProperty(e,"__esModule",{value:!0});const a=n(8497),s=n(3935),u=n(9189),l=n(9126),c=n(8849);n(9248);const h=524288,f=new u.default({concurrency:100,autostart:!0});function p(t,e){const n=c.detector(t);if(n&&n in l.typeHandlers){const r=l.typeHandlers[n].calculate(t,e);if(void 0!==r)return r.type=n,r}throw new TypeError("unsupported file type: "+n+" (file: "+e+")")}function d(t,e){if(r.isBuffer(t))return p(t);if("string"!=typeof t)throw new TypeError("invalid invocation");const n=s.resolve(t);if("function"!=typeof e){const t=function(t){const e=a.openSync(t,"r"),n=a.fstatSync(e).size,i=Math.min(n,h),o=r.alloc(i);return a.readSync(e,o,0,i,0),a.closeSync(e),o}(n);return p(t,n)}f.push((()=>function(t){return o(this,void 0,void 0,(function*(){const e=yield a.promises.open(t,"r"),{size:n}=yield e.stat();if(n<=0)throw new Error("Empty file");const i=Math.min(n,h),o=r.alloc(i);return yield e.read(o,0,i,0),yield e.close(),o}))}(n).then((t=>i.nextTick(e,null,p(t,n)))).catch(e)))}t.exports=e=d,e.imageSize=d,e.setConcurrency=t=>{f.concurrency=t},e.types=Object.keys(l.typeHandlers)},8557:(t,e)=>{"use strict";Object.defineProperty(e,"__esModule",{value:!0}),e.readUInt=function(t,e,n,r){return n=n||0,t["readUInt"+e+(r?"BE":"LE")].call(t,n)}},9126:(t,e,n)=>{"use strict";Object.defineProperty(e,"__esModule",{value:!0});const r=n(3645),i=n(3552),o=n(1680),a=n(1542),s=n(7163),u=n(7800),l=n(6625),c=n(1558),h=n(2229),f=n(4663),p=n(6221),d=n(7851),y=n(2602),m=n(8531),g=n(9948),_=n(5236);e.typeHandlers={bmp:r.BMP,cur:i.CUR,dds:o.DDS,gif:a.GIF,icns:s.ICNS,ico:u.ICO,j2c:l.J2C,jp2:c.JP2,jpg:h.JPG,ktx:f.KTX,png:p.PNG,pnm:d.PNM,psd:y.PSD,svg:m.SVG,tiff:g.TIFF,webp:_.WEBP}},3645:(t,e)=>{"use strict";Object.defineProperty(e,"__esModule",{value:!0}),e.BMP={validate:t=>"BM"===t.toString("ascii",0,2),calculate:t=>({height:Math.abs(t.readInt32LE(22)),width:t.readUInt32LE(18)})}},3552:(t,e,n)=>{"use strict";Object.defineProperty(e,"__esModule",{value:!0});const r=n(7800);e.CUR={validate:t=>0===t.readUInt16LE(0)&&2===t.readUInt16LE(2),calculate:t=>r.ICO.calculate(t)}},1680:(t,e)=>{"use strict";Object.defineProperty(e,"__esModule",{value:!0}),e.DDS={validate:t=>542327876===t.readUInt32LE(0),calculate:t=>({height:t.readUInt32LE(12),width:t.readUInt32LE(16)})}},1542:(t,e)=>{"use strict";Object.defineProperty(e,"__esModule",{value:!0});const n=/^GIF8[79]a/;e.GIF={validate(t){const e=t.toString("ascii",0,6);return n.test(e)},calculate:t=>({height:t.readUInt16LE(8),width:t.readUInt16LE(6)})}},7163:(t,e)=>{"use strict";Object.defineProperty(e,"__esModule",{value:!0});const n={ICON:32,"ICN#":32,"icm#":16,icm4:16,icm8:16,"ics#":16,ics4:16,ics8:16,is32:16,s8mk:16,icp4:16,icl4:32,icl8:32,il32:32,l8mk:32,icp5:32,ic11:32,ich4:48,ich8:48,ih32:48,h8mk:48,icp6:64,ic12:32,it32:128,t8mk:128,ic07:128,ic08:256,ic13:256,ic09:512,ic14:512,ic10:1024};function r(t,e){const n=e+4;return[t.toString("ascii",e,n),t.readUInt32BE(n)]}function i(t){const e=n[t];return{width:e,height:e,type:t}}e.ICNS={validate:t=>"icns"===t.toString("ascii",0,4),calculate(t){const e=t.length,n=t.readUInt32BE(4);let o=8,a=r(t,o),s=i(a[0]);if(o+=a[1],o===n)return s;const u={height:s.height,images:[s],width:s.width};for(;o{"use strict";function n(t,e){const n=t.readUInt8(e);return 0===n?256:n}function r(t,e){const r=6+16*e;return{height:n(t,r+1),width:n(t,r)}}Object.defineProperty(e,"__esModule",{value:!0}),e.ICO={validate:t=>0===t.readUInt16LE(0)&&1===t.readUInt16LE(2),calculate(t){const e=t.readUInt16LE(4),n=r(t,0);if(1===e)return n;const i=[n];for(let n=1;n{"use strict";Object.defineProperty(e,"__esModule",{value:!0}),e.J2C={validate:t=>"ff4fff51"===t.toString("hex",0,4),calculate:t=>({height:t.readUInt32BE(12),width:t.readUInt32BE(8)})}},1558:(t,e)=>{"use strict";Object.defineProperty(e,"__esModule",{value:!0});const n=t=>({height:t.readUInt32BE(4),width:t.readUInt32BE(8)});e.JP2={validate(t){const e=t.toString("hex",4,8),n=t.readUInt32BE(0);if("6a502020"!==e||n<1)return!1;const r=n+4,i=t.readUInt32BE(n);return"66747970"===t.slice(r,r+i).toString("hex",0,4)},calculate(t){const e=t.readUInt32BE(0);let r=e+4+t.readUInt16BE(e+2);switch(t.toString("hex",r,r+4)){case"72726571":return r=r+4+4+(t=>{const e=t.readUInt8(0);let n=1+2*e;return n=n+2+t.readUInt16BE(n)*(2+e),n+2+t.readUInt16BE(n)*(16+e)})(t.slice(r+4)),n(t.slice(r+8,r+24));case"6a703268":return n(t.slice(r+8,r+24));default:throw new TypeError("Unsupported header found: "+t.toString("ascii",r,r+4))}}}},2229:(t,e,n)=>{"use strict";Object.defineProperty(e,"__esModule",{value:!0});const r=n(8557);function i(t){return"45786966"===t.toString("hex",2,6)}function o(t,e){return{height:t.readUInt16BE(e),width:t.readUInt16BE(e+2)}}function a(t,e){const n=t.slice(2,e),i=n.toString("hex",6,8),o="4d4d"===i;if(o||"4949"===i)return function(t,e){const n=r.readUInt(t,16,14,e);for(let i=0;it.length)return;const a=t.slice(n,o);if(274===r.readUInt(a,16,0,e)){if(3!==r.readUInt(a,16,2,e))return;if(1!==r.readUInt(a,32,4,e))return;return r.readUInt(a,16,8,e)}}}(n,o)}function s(t,e){if(e>t.length)throw new TypeError("Corrupt JPG, exceeded buffer limits");if(255!==t[e])throw new TypeError("Invalid JPG, marker table corrupted")}e.JPG={validate:t=>"ffd8"===t.toString("hex",0,2),calculate(t){let e,n;for(t=t.slice(4);t.length;){const r=t.readUInt16BE(0);if(i(t)&&(e=a(t,r)),s(t,r),n=t[r+1],192===n||193===n||194===n){const n=o(t,r+5);return e?{height:n.height,orientation:e,width:n.width}:n}t=t.slice(r+2)}throw new TypeError("Invalid JPG, no size found")}}},4663:(t,e)=>{"use strict";Object.defineProperty(e,"__esModule",{value:!0}),e.KTX={validate:t=>"KTX 11"===t.toString("ascii",1,7),calculate:t=>({height:t.readUInt32LE(40),width:t.readUInt32LE(36)})}},6221:(t,e)=>{"use strict";Object.defineProperty(e,"__esModule",{value:!0});const n="CgBI";e.PNG={validate(t){if("PNG\r\n\n"===t.toString("ascii",1,8)){let e=t.toString("ascii",12,16);if(e===n&&(e=t.toString("ascii",28,32)),"IHDR"!==e)throw new TypeError("Invalid PNG");return!0}return!1},calculate:t=>t.toString("ascii",12,16)===n?{height:t.readUInt32BE(36),width:t.readUInt32BE(32)}:{height:t.readUInt32BE(20),width:t.readUInt32BE(16)}}},7851:(t,e)=>{"use strict";Object.defineProperty(e,"__esModule",{value:!0});const n={P1:"pbm/ascii",P2:"pgm/ascii",P3:"ppm/ascii",P4:"pbm",P5:"pgm",P6:"ppm",P7:"pam",PF:"pfm"},r=Object.keys(n),i={default:t=>{let e=[];for(;t.length>0;){const n=t.shift();if("#"!==n[0]){e=n.split(" ");break}}if(2===e.length)return{height:parseInt(e[1],10),width:parseInt(e[0],10)};throw new TypeError("Invalid PNM")},pam:t=>{const e={};for(;t.length>0;){const n=t.shift();if(n.length>16||n.charCodeAt(0)>128)continue;const[r,i]=n.split(" ");if(r&&i&&(e[r.toLowerCase()]=parseInt(i,10)),e.height&&e.width)break}if(e.height&&e.width)return{height:e.height,width:e.width};throw new TypeError("Invalid PAM")}};e.PNM={validate(t){const e=t.toString("ascii",0,2);return r.includes(e)},calculate(t){const e=t.toString("ascii",0,2),r=n[e],o=t.toString("ascii",3).split(/[\r\n]+/);return(i[r]||i.default)(o)}}},2602:(t,e)=>{"use strict";Object.defineProperty(e,"__esModule",{value:!0}),e.PSD={validate:t=>"8BPS"===t.toString("ascii",0,4),calculate:t=>({height:t.readUInt32BE(14),width:t.readUInt32BE(18)})}},8531:(t,e)=>{"use strict";Object.defineProperty(e,"__esModule",{value:!0});const n=/"']|"[^"]*"|'[^']*')*>/,r={height:/\sheight=(['"])([^%]+?)\1/,root:n,viewbox:/\sviewBox=(['"])(.+?)\1/,width:/\swidth=(['"])([^%]+?)\1/},i=2.54,o={cm:96/i,em:16,ex:8,m:96/i*100,mm:96/i/10,pc:96/72/12,pt:96/72};function a(t){const e=/([0-9.]+)([a-z]*)/.exec(t);if(e)return Math.round(parseFloat(e[1])*(o[e[2]]||1))}function s(t){const e=t.split(" ");return{height:a(e[3]),width:a(e[2])}}e.SVG={validate(t){const e=String(t);return n.test(e)},calculate(t){const e=t.toString("utf8").match(r.root);if(e){const t=function(t){const e=t.match(r.width),n=t.match(r.height),i=t.match(r.viewbox);return{height:n&&a(n[2]),viewbox:i&&s(i[2]),width:e&&a(e[2])}}(e[0]);if(t.width&&t.height)return function(t){return{height:t.height,width:t.width}}(t);if(t.viewbox)return function(t,e){const n=e.width/e.height;return t.width?{height:Math.floor(t.width/n),width:t.width}:t.height?{height:t.height,width:Math.floor(t.height*n)}:{height:e.height,width:e.width}}(t,t.viewbox)}throw new TypeError("Invalid SVG")}}},9948:(t,e,n)=>{"use strict";var r=n(3085).Buffer;Object.defineProperty(e,"__esModule",{value:!0});const i=n(7990),o=n(8557);function a(t,e){const n=o.readUInt(t,16,8,e);return(o.readUInt(t,16,10,e)<<16)+n}function s(t){if(t.length>24)return t.slice(12)}const u=["49492a00","4d4d002a"];e.TIFF={validate:t=>u.includes(t.toString("hex",0,4)),calculate(t,e){if(!e)throw new TypeError("Tiff doesn't support buffer");const n="BE"===function(t){const e=t.toString("ascii",0,2);return"II"===e?"LE":"MM"===e?"BE":void 0}(t),u=function(t,e,n){const a=o.readUInt(t,32,4,n);let s=1024;const u=i.statSync(e).size;a+s>u&&(s=u-a-10);const l=r.alloc(s),c=i.openSync(e,"r");return i.readSync(c,l,0,s,a),l.slice(2)}(t,e,n),l=function(t,e){const n={};let r=t;for(;r&&r.length;){const t=o.readUInt(r,16,0,e),i=o.readUInt(r,16,2,e),u=o.readUInt(r,32,4,e);if(0===t)break;1!==u||3!==i&&4!==i||(n[t]=a(r,e)),r=s(r)}return n}(u,n),c=l[256],h=l[257];if(!c||!h)throw new TypeError("Invalid Tiff. Missing tags");return{height:h,width:c}}}},5236:(t,e)=>{"use strict";Object.defineProperty(e,"__esModule",{value:!0}),e.WEBP={validate(t){const e="RIFF"===t.toString("ascii",0,4),n="WEBP"===t.toString("ascii",8,12),r="VP8"===t.toString("ascii",12,15);return e&&n&&r},calculate(t){const e=t.toString("ascii",12,16);if(t=t.slice(20,30),"VP8X"===e){const e=t[0],n=0==(1&e);if(0==(192&e)&&n)return function(t){return{height:1+t.readUIntLE(7,3),width:1+t.readUIntLE(4,3)}}(t);throw new TypeError("Invalid WebP")}if("VP8 "===e&&47!==t[0])return function(t){return{height:16383&t.readInt16LE(8),width:16383&t.readInt16LE(6)}}(t);const n=t.toString("hex",3,6);if("VP8L"===e&&"9d012a"!==n)return function(t){return{height:1+((15&t[4])<<10|t[3]<<2|(192&t[2])>>6),width:1+((63&t[2])<<8|t[1])}}(t);throw new TypeError("Invalid WebP")}}},5717:t=>{"function"==typeof Object.create?t.exports=function(t,e){e&&(t.super_=e,t.prototype=Object.create(e.prototype,{constructor:{value:t,enumerable:!1,writable:!0,configurable:!0}}))}:t.exports=function(t,e){if(e){t.super_=e;var n=function(){};n.prototype=e.prototype,t.prototype=new n,t.prototype.constructor=t}}},8552:(t,e,n)=>{var r=n(852)(n(5639),"DataView");t.exports=r},1989:(t,e,n)=>{var r=n(1789),i=n(401),o=n(7667),a=n(1327),s=n(1866);function u(t){var e=-1,n=null==t?0:t.length;for(this.clear();++e{var r=n(7040),i=n(4125),o=n(2117),a=n(7518),s=n(4705);function u(t){var e=-1,n=null==t?0:t.length;for(this.clear();++e{var r=n(852)(n(5639),"Map");t.exports=r},3369:(t,e,n)=>{var r=n(4785),i=n(1285),o=n(6e3),a=n(9916),s=n(5265);function u(t){var e=-1,n=null==t?0:t.length;for(this.clear();++e{var r=n(852)(n(5639),"Promise");t.exports=r},8525:(t,e,n)=>{var r=n(852)(n(5639),"Set");t.exports=r},8668:(t,e,n)=>{var r=n(3369),i=n(619),o=n(2385);function a(t){var e=-1,n=null==t?0:t.length;for(this.__data__=new r;++e{var r=n(8407),i=n(7465),o=n(3779),a=n(7599),s=n(4758),u=n(4309);function l(t){var e=this.__data__=new r(t);this.size=e.size}l.prototype.clear=i,l.prototype.delete=o,l.prototype.get=a,l.prototype.has=s,l.prototype.set=u,t.exports=l},2705:(t,e,n)=>{var r=n(5639).Symbol;t.exports=r},1149:(t,e,n)=>{var r=n(5639).Uint8Array;t.exports=r},577:(t,e,n)=>{var r=n(852)(n(5639),"WeakMap");t.exports=r},4963:t=>{t.exports=function(t,e){for(var n=-1,r=null==t?0:t.length,i=0,o=[];++n{var r=n(2545),i=n(5694),o=n(1469),a=n(4144),s=n(5776),u=n(6719),l=Object.prototype.hasOwnProperty;t.exports=function(t,e){var n=o(t),c=!n&&i(t),h=!n&&!c&&a(t),f=!n&&!c&&!h&&u(t),p=n||c||h||f,d=p?r(t.length,String):[],y=d.length;for(var m in t)!e&&!l.call(t,m)||p&&("length"==m||h&&("offset"==m||"parent"==m)||f&&("buffer"==m||"byteLength"==m||"byteOffset"==m)||s(m,y))||d.push(m);return d}},9932:t=>{t.exports=function(t,e){for(var n=-1,r=null==t?0:t.length,i=Array(r);++n{t.exports=function(t,e){for(var n=-1,r=e.length,i=t.length;++n{t.exports=function(t,e){for(var n=-1,r=null==t?0:t.length;++n{var r=n(7813);t.exports=function(t,e){for(var n=t.length;n--;)if(r(t[n][0],e))return n;return-1}},8866:(t,e,n)=>{var r=n(2488),i=n(1469);t.exports=function(t,e,n){var o=e(t);return i(t)?o:r(o,n(t))}},4239:(t,e,n)=>{var r=n(2705),i=n(9607),o=n(2333),a=r?r.toStringTag:void 0;t.exports=function(t){return null==t?void 0===t?"[object Undefined]":"[object Null]":a&&a in Object(t)?i(t):o(t)}},9454:(t,e,n)=>{var r=n(4239),i=n(7005);t.exports=function(t){return i(t)&&"[object Arguments]"==r(t)}},939:(t,e,n)=>{var r=n(2492),i=n(7005);t.exports=function t(e,n,o,a,s){return e===n||(null==e||null==n||!i(e)&&!i(n)?e!=e&&n!=n:r(e,n,o,a,t,s))}},2492:(t,e,n)=>{var r=n(6384),i=n(7114),o=n(8351),a=n(6096),s=n(4160),u=n(1469),l=n(4144),c=n(6719),h="[object Arguments]",f="[object Array]",p="[object Object]",d=Object.prototype.hasOwnProperty;t.exports=function(t,e,n,y,m,g){var _=u(t),b=u(e),v=_?f:s(t),T=b?f:s(e),E=(v=v==h?p:v)==p,w=(T=T==h?p:T)==p,x=v==T;if(x&&l(t)){if(!l(e))return!1;_=!0,E=!1}if(x&&!E)return g||(g=new r),_||c(t)?i(t,e,n,y,m,g):o(t,e,v,n,y,m,g);if(!(1&n)){var C=E&&d.call(t,"__wrapped__"),M=w&&d.call(e,"__wrapped__");if(C||M){var S=C?t.value():t,N=M?e.value():e;return g||(g=new r),m(S,N,n,y,g)}}return!!x&&(g||(g=new r),a(t,e,n,y,m,g))}},8458:(t,e,n)=>{var r=n(3560),i=n(5346),o=n(3218),a=n(346),s=/^\[object .+?Constructor\]$/,u=Function.prototype,l=Object.prototype,c=u.toString,h=l.hasOwnProperty,f=RegExp("^"+c.call(h).replace(/[\\^$.*+?()[\]{}|]/g,"\\$&").replace(/hasOwnProperty|(function).*?(?=\\\()| for .+?(?=\\\])/g,"$1.*?")+"$");t.exports=function(t){return!(!o(t)||i(t))&&(r(t)?f:s).test(a(t))}},8749:(t,e,n)=>{var r=n(4239),i=n(1780),o=n(7005),a={};a["[object Float32Array]"]=a["[object Float64Array]"]=a["[object Int8Array]"]=a["[object Int16Array]"]=a["[object Int32Array]"]=a["[object Uint8Array]"]=a["[object Uint8ClampedArray]"]=a["[object Uint16Array]"]=a["[object Uint32Array]"]=!0,a["[object Arguments]"]=a["[object Array]"]=a["[object ArrayBuffer]"]=a["[object Boolean]"]=a["[object DataView]"]=a["[object Date]"]=a["[object Error]"]=a["[object Function]"]=a["[object Map]"]=a["[object Number]"]=a["[object Object]"]=a["[object RegExp]"]=a["[object Set]"]=a["[object String]"]=a["[object WeakMap]"]=!1,t.exports=function(t){return o(t)&&i(t.length)&&!!a[r(t)]}},280:(t,e,n)=>{var r=n(5726),i=n(6916),o=Object.prototype.hasOwnProperty;t.exports=function(t){if(!r(t))return i(t);var e=[];for(var n in Object(t))o.call(t,n)&&"constructor"!=n&&e.push(n);return e}},4949:(t,e,n)=>{var r=n(7226),i=n(6557),o=n(3448);t.exports=function(t,e,n){var a=0,s=null==t?a:t.length;if("number"==typeof e&&e==e&&s<=2147483647){for(;a>>1,l=t[u];null!==l&&!o(l)&&(n?l<=e:l{var r=n(3448),i=Math.floor,o=Math.min;t.exports=function(t,e,n,a){var s=0,u=null==t?0:t.length;if(0===u)return 0;for(var l=(e=n(e))!=e,c=null===e,h=r(e),f=void 0===e;s{t.exports=function(t,e){for(var n=-1,r=Array(t);++n{t.exports=function(t){return function(e){return t(e)}}},7415:(t,e,n)=>{var r=n(9932);t.exports=function(t,e){return r(e,(function(e){return t[e]}))}},4757:t=>{t.exports=function(t,e){return t.has(e)}},4429:(t,e,n)=>{var r=n(5639)["__core-js_shared__"];t.exports=r},7114:(t,e,n)=>{var r=n(8668),i=n(2908),o=n(4757);t.exports=function(t,e,n,a,s,u){var l=1&n,c=t.length,h=e.length;if(c!=h&&!(l&&h>c))return!1;var f=u.get(t),p=u.get(e);if(f&&p)return f==e&&p==t;var d=-1,y=!0,m=2&n?new r:void 0;for(u.set(t,e),u.set(e,t);++d{var r=n(2705),i=n(1149),o=n(7813),a=n(7114),s=n(8776),u=n(1814),l=r?r.prototype:void 0,c=l?l.valueOf:void 0;t.exports=function(t,e,n,r,l,h,f){switch(n){case"[object DataView]":if(t.byteLength!=e.byteLength||t.byteOffset!=e.byteOffset)return!1;t=t.buffer,e=e.buffer;case"[object ArrayBuffer]":return!(t.byteLength!=e.byteLength||!h(new i(t),new i(e)));case"[object Boolean]":case"[object Date]":case"[object Number]":return o(+t,+e);case"[object Error]":return t.name==e.name&&t.message==e.message;case"[object RegExp]":case"[object String]":return t==e+"";case"[object Map]":var p=s;case"[object Set]":var d=1&r;if(p||(p=u),t.size!=e.size&&!d)return!1;var y=f.get(t);if(y)return y==e;r|=2,f.set(t,e);var m=a(p(t),p(e),r,l,h,f);return f.delete(t),m;case"[object Symbol]":if(c)return c.call(t)==c.call(e)}return!1}},6096:(t,e,n)=>{var r=n(8234),i=Object.prototype.hasOwnProperty;t.exports=function(t,e,n,o,a,s){var u=1&n,l=r(t),c=l.length;if(c!=r(e).length&&!u)return!1;for(var h=c;h--;){var f=l[h];if(!(u?f in e:i.call(e,f)))return!1}var p=s.get(t),d=s.get(e);if(p&&d)return p==e&&d==t;var y=!0;s.set(t,e),s.set(e,t);for(var m=u;++h{var r="object"==typeof n.g&&n.g&&n.g.Object===Object&&n.g;t.exports=r},8234:(t,e,n)=>{var r=n(8866),i=n(9551),o=n(3674);t.exports=function(t){return r(t,o,i)}},5050:(t,e,n)=>{var r=n(7019);t.exports=function(t,e){var n=t.__data__;return r(e)?n["string"==typeof e?"string":"hash"]:n.map}},852:(t,e,n)=>{var r=n(8458),i=n(7801);t.exports=function(t,e){var n=i(t,e);return r(n)?n:void 0}},9607:(t,e,n)=>{var r=n(2705),i=Object.prototype,o=i.hasOwnProperty,a=i.toString,s=r?r.toStringTag:void 0;t.exports=function(t){var e=o.call(t,s),n=t[s];try{t[s]=void 0;var r=!0}catch(t){}var i=a.call(t);return r&&(e?t[s]=n:delete t[s]),i}},9551:(t,e,n)=>{var r=n(4963),i=n(479),o=Object.prototype.propertyIsEnumerable,a=Object.getOwnPropertySymbols,s=a?function(t){return null==t?[]:(t=Object(t),r(a(t),(function(e){return o.call(t,e)})))}:i;t.exports=s},4160:(t,e,n)=>{var r=n(8552),i=n(7071),o=n(3818),a=n(8525),s=n(577),u=n(4239),l=n(346),c="[object Map]",h="[object Promise]",f="[object Set]",p="[object WeakMap]",d="[object DataView]",y=l(r),m=l(i),g=l(o),_=l(a),b=l(s),v=u;(r&&v(new r(new ArrayBuffer(1)))!=d||i&&v(new i)!=c||o&&v(o.resolve())!=h||a&&v(new a)!=f||s&&v(new s)!=p)&&(v=function(t){var e=u(t),n="[object Object]"==e?t.constructor:void 0,r=n?l(n):"";if(r)switch(r){case y:return d;case m:return c;case g:return h;case _:return f;case b:return p}return e}),t.exports=v},7801:t=>{t.exports=function(t,e){return null==t?void 0:t[e]}},1789:(t,e,n)=>{var r=n(4536);t.exports=function(){this.__data__=r?r(null):{},this.size=0}},401:t=>{t.exports=function(t){var e=this.has(t)&&delete this.__data__[t];return this.size-=e?1:0,e}},7667:(t,e,n)=>{var r=n(4536),i=Object.prototype.hasOwnProperty;t.exports=function(t){var e=this.__data__;if(r){var n=e[t];return"__lodash_hash_undefined__"===n?void 0:n}return i.call(e,t)?e[t]:void 0}},1327:(t,e,n)=>{var r=n(4536),i=Object.prototype.hasOwnProperty;t.exports=function(t){var e=this.__data__;return r?void 0!==e[t]:i.call(e,t)}},1866:(t,e,n)=>{var r=n(4536);t.exports=function(t,e){var n=this.__data__;return this.size+=this.has(t)?0:1,n[t]=r&&void 0===e?"__lodash_hash_undefined__":e,this}},5776:t=>{var e=/^(?:0|[1-9]\d*)$/;t.exports=function(t,n){var r=typeof t;return!!(n=null==n?9007199254740991:n)&&("number"==r||"symbol"!=r&&e.test(t))&&t>-1&&t%1==0&&t{t.exports=function(t){var e=typeof t;return"string"==e||"number"==e||"symbol"==e||"boolean"==e?"__proto__"!==t:null===t}},5346:(t,e,n)=>{var r,i=n(4429),o=(r=/[^.]+$/.exec(i&&i.keys&&i.keys.IE_PROTO||""))?"Symbol(src)_1."+r:"";t.exports=function(t){return!!o&&o in t}},5726:t=>{var e=Object.prototype;t.exports=function(t){var n=t&&t.constructor;return t===("function"==typeof n&&n.prototype||e)}},7040:t=>{t.exports=function(){this.__data__=[],this.size=0}},4125:(t,e,n)=>{var r=n(8470),i=Array.prototype.splice;t.exports=function(t){var e=this.__data__,n=r(e,t);return!(n<0||(n==e.length-1?e.pop():i.call(e,n,1),--this.size,0))}},2117:(t,e,n)=>{var r=n(8470);t.exports=function(t){var e=this.__data__,n=r(e,t);return n<0?void 0:e[n][1]}},7518:(t,e,n)=>{var r=n(8470);t.exports=function(t){return r(this.__data__,t)>-1}},4705:(t,e,n)=>{var r=n(8470);t.exports=function(t,e){var n=this.__data__,i=r(n,t);return i<0?(++this.size,n.push([t,e])):n[i][1]=e,this}},4785:(t,e,n)=>{var r=n(1989),i=n(8407),o=n(7071);t.exports=function(){this.size=0,this.__data__={hash:new r,map:new(o||i),string:new r}}},1285:(t,e,n)=>{var r=n(5050);t.exports=function(t){var e=r(this,t).delete(t);return this.size-=e?1:0,e}},6e3:(t,e,n)=>{var r=n(5050);t.exports=function(t){return r(this,t).get(t)}},9916:(t,e,n)=>{var r=n(5050);t.exports=function(t){return r(this,t).has(t)}},5265:(t,e,n)=>{var r=n(5050);t.exports=function(t,e){var n=r(this,t),i=n.size;return n.set(t,e),this.size+=n.size==i?0:1,this}},8776:t=>{t.exports=function(t){var e=-1,n=Array(t.size);return t.forEach((function(t,r){n[++e]=[r,t]})),n}},4536:(t,e,n)=>{var r=n(852)(Object,"create");t.exports=r},6916:(t,e,n)=>{var r=n(5569)(Object.keys,Object);t.exports=r},1167:(t,e,n)=>{t=n.nmd(t);var r=n(1957),i=e&&!e.nodeType&&e,o=i&&t&&!t.nodeType&&t,a=o&&o.exports===i&&r.process,s=function(){try{return o&&o.require&&o.require("util").types||a&&a.binding&&a.binding("util")}catch(t){}}();t.exports=s},2333:t=>{var e=Object.prototype.toString;t.exports=function(t){return e.call(t)}},5569:t=>{t.exports=function(t,e){return function(n){return t(e(n))}}},5639:(t,e,n)=>{var r=n(1957),i="object"==typeof self&&self&&self.Object===Object&&self,o=r||i||Function("return this")();t.exports=o},619:t=>{t.exports=function(t){return this.__data__.set(t,"__lodash_hash_undefined__"),this}},2385:t=>{t.exports=function(t){return this.__data__.has(t)}},1814:t=>{t.exports=function(t){var e=-1,n=Array(t.size);return t.forEach((function(t){n[++e]=t})),n}},7465:(t,e,n)=>{var r=n(8407);t.exports=function(){this.__data__=new r,this.size=0}},3779:t=>{t.exports=function(t){var e=this.__data__,n=e.delete(t);return this.size=e.size,n}},7599:t=>{t.exports=function(t){return this.__data__.get(t)}},4758:t=>{t.exports=function(t){return this.__data__.has(t)}},4309:(t,e,n)=>{var r=n(8407),i=n(7071),o=n(3369);t.exports=function(t,e){var n=this.__data__;if(n instanceof r){var a=n.__data__;if(!i||a.length<199)return a.push([t,e]),this.size=++n.size,this;n=this.__data__=new o(a)}return n.set(t,e),this.size=n.size,this}},346:t=>{var e=Function.prototype.toString;t.exports=function(t){if(null!=t){try{return e.call(t)}catch(t){}try{return t+""}catch(t){}}return""}},7813:t=>{t.exports=function(t,e){return t===e||t!=t&&e!=e}},6557:t=>{t.exports=function(t){return t}},5694:(t,e,n)=>{var r=n(9454),i=n(7005),o=Object.prototype,a=o.hasOwnProperty,s=o.propertyIsEnumerable,u=r(function(){return arguments}())?r:function(t){return i(t)&&a.call(t,"callee")&&!s.call(t,"callee")};t.exports=u},1469:t=>{var e=Array.isArray;t.exports=e},8612:(t,e,n)=>{var r=n(3560),i=n(1780);t.exports=function(t){return null!=t&&i(t.length)&&!r(t)}},4144:(t,e,n)=>{t=n.nmd(t);var r=n(5639),i=n(5062),o=e&&!e.nodeType&&e,a=o&&t&&!t.nodeType&&t,s=a&&a.exports===o?r.Buffer:void 0,u=(s?s.isBuffer:void 0)||i;t.exports=u},8446:(t,e,n)=>{var r=n(939);t.exports=function(t,e){return r(t,e)}},3560:(t,e,n)=>{var r=n(4239),i=n(3218);t.exports=function(t){if(!i(t))return!1;var e=r(t);return"[object Function]"==e||"[object GeneratorFunction]"==e||"[object AsyncFunction]"==e||"[object Proxy]"==e}},1780:t=>{t.exports=function(t){return"number"==typeof t&&t>-1&&t%1==0&&t<=9007199254740991}},4293:t=>{t.exports=function(t){return null==t}},3218:t=>{t.exports=function(t){var e=typeof t;return null!=t&&("object"==e||"function"==e)}},7005:t=>{t.exports=function(t){return null!=t&&"object"==typeof t}},3448:(t,e,n)=>{var r=n(4239),i=n(7005);t.exports=function(t){return"symbol"==typeof t||i(t)&&"[object Symbol]"==r(t)}},6719:(t,e,n)=>{var r=n(8749),i=n(1717),o=n(1167),a=o&&o.isTypedArray,s=a?i(a):r;t.exports=s},3674:(t,e,n)=>{var r=n(4636),i=n(280),o=n(8612);t.exports=function(t){return o(t)?r(t):i(t)}},1159:(t,e,n)=>{var r=n(4949);t.exports=function(t,e){return r(t,e)}},5871:(t,e,n)=>{var r=n(4949),i=n(7813);t.exports=function(t,e){var n=null==t?0:t.length;if(n){var o=r(t,e);if(o{t.exports=function(){return[]}},5062:t=>{t.exports=function(){return!1}},2628:(t,e,n)=>{var r=n(7415),i=n(3674);t.exports=function(t){return null==t?[]:r(t,i(t))}},3085:(t,e,n)=>{"use strict";var r=n(5108);const i=n(9742),o=n(645),a="function"==typeof Symbol&&"function"==typeof Symbol.for?Symbol.for("nodejs.util.inspect.custom"):null;e.Buffer=l,e.SlowBuffer=function(t){return+t!=t&&(t=0),l.alloc(+t)},e.INSPECT_MAX_BYTES=50;const s=2147483647;function u(t){if(t>s)throw new RangeError('The value "'+t+'" is invalid for option "size"');const e=new Uint8Array(t);return Object.setPrototypeOf(e,l.prototype),e}function l(t,e,n){if("number"==typeof t){if("string"==typeof e)throw new TypeError('The "string" argument must be of type string. Received type number');return f(t)}return c(t,e,n)}function c(t,e,n){if("string"==typeof t)return function(t,e){if("string"==typeof e&&""!==e||(e="utf8"),!l.isEncoding(e))throw new TypeError("Unknown encoding: "+e);const n=0|m(t,e);let r=u(n);const i=r.write(t,e);return i!==n&&(r=r.slice(0,i)),r}(t,e);if(ArrayBuffer.isView(t))return function(t){if(Q(t,Uint8Array)){const e=new Uint8Array(t);return d(e.buffer,e.byteOffset,e.byteLength)}return p(t)}(t);if(null==t)throw new TypeError("The first argument must be one of type string, Buffer, ArrayBuffer, Array, or Array-like Object. Received type "+typeof t);if(Q(t,ArrayBuffer)||t&&Q(t.buffer,ArrayBuffer))return d(t,e,n);if("undefined"!=typeof SharedArrayBuffer&&(Q(t,SharedArrayBuffer)||t&&Q(t.buffer,SharedArrayBuffer)))return d(t,e,n);if("number"==typeof t)throw new TypeError('The "value" argument must not be of type number. Received type number');const r=t.valueOf&&t.valueOf();if(null!=r&&r!==t)return l.from(r,e,n);const i=function(t){if(l.isBuffer(t)){const e=0|y(t.length),n=u(e);return 0===n.length||t.copy(n,0,0,e),n}return void 0!==t.length?"number"!=typeof t.length||K(t.length)?u(0):p(t):"Buffer"===t.type&&Array.isArray(t.data)?p(t.data):void 0}(t);if(i)return i;if("undefined"!=typeof Symbol&&null!=Symbol.toPrimitive&&"function"==typeof t[Symbol.toPrimitive])return l.from(t[Symbol.toPrimitive]("string"),e,n);throw new TypeError("The first argument must be one of type string, Buffer, ArrayBuffer, Array, or Array-like Object. Received type "+typeof t)}function h(t){if("number"!=typeof t)throw new TypeError('"size" argument must be of type number');if(t<0)throw new RangeError('The value "'+t+'" is invalid for option "size"')}function f(t){return h(t),u(t<0?0:0|y(t))}function p(t){const e=t.length<0?0:0|y(t.length),n=u(e);for(let r=0;r=s)throw new RangeError("Attempt to allocate Buffer larger than maximum size: 0x"+s.toString(16)+" bytes");return 0|t}function m(t,e){if(l.isBuffer(t))return t.length;if(ArrayBuffer.isView(t)||Q(t,ArrayBuffer))return t.byteLength;if("string"!=typeof t)throw new TypeError('The "string" argument must be one of type string, Buffer, or ArrayBuffer. Received type '+typeof t);const n=t.length,r=arguments.length>2&&!0===arguments[2];if(!r&&0===n)return 0;let i=!1;for(;;)switch(e){case"ascii":case"latin1":case"binary":return n;case"utf8":case"utf-8":return X(t).length;case"ucs2":case"ucs-2":case"utf16le":case"utf-16le":return 2*n;case"hex":return n>>>1;case"base64":return Y(t).length;default:if(i)return r?-1:X(t).length;e=(""+e).toLowerCase(),i=!0}}function g(t,e,n){let r=!1;if((void 0===e||e<0)&&(e=0),e>this.length)return"";if((void 0===n||n>this.length)&&(n=this.length),n<=0)return"";if((n>>>=0)<=(e>>>=0))return"";for(t||(t="utf8");;)switch(t){case"hex":return I(this,e,n);case"utf8":case"utf-8":return S(this,e,n);case"ascii":return O(this,e,n);case"latin1":case"binary":return A(this,e,n);case"base64":return M(this,e,n);case"ucs2":case"ucs-2":case"utf16le":case"utf-16le":return P(this,e,n);default:if(r)throw new TypeError("Unknown encoding: "+t);t=(t+"").toLowerCase(),r=!0}}function _(t,e,n){const r=t[e];t[e]=t[n],t[n]=r}function b(t,e,n,r,i){if(0===t.length)return-1;if("string"==typeof n?(r=n,n=0):n>2147483647?n=2147483647:n<-2147483648&&(n=-2147483648),K(n=+n)&&(n=i?0:t.length-1),n<0&&(n=t.length+n),n>=t.length){if(i)return-1;n=t.length-1}else if(n<0){if(!i)return-1;n=0}if("string"==typeof e&&(e=l.from(e,r)),l.isBuffer(e))return 0===e.length?-1:v(t,e,n,r,i);if("number"==typeof e)return e&=255,"function"==typeof Uint8Array.prototype.indexOf?i?Uint8Array.prototype.indexOf.call(t,e,n):Uint8Array.prototype.lastIndexOf.call(t,e,n):v(t,[e],n,r,i);throw new TypeError("val must be string, number or Buffer")}function v(t,e,n,r,i){let o,a=1,s=t.length,u=e.length;if(void 0!==r&&("ucs2"===(r=String(r).toLowerCase())||"ucs-2"===r||"utf16le"===r||"utf-16le"===r)){if(t.length<2||e.length<2)return-1;a=2,s/=2,u/=2,n/=2}function l(t,e){return 1===a?t[e]:t.readUInt16BE(e*a)}if(i){let r=-1;for(o=n;os&&(n=s-u),o=n;o>=0;o--){let n=!0;for(let r=0;ri&&(r=i):r=i;const o=e.length;let a;for(r>o/2&&(r=o/2),a=0;a>8,i=n%256,o.push(i),o.push(r);return o}(e,t.length-n),t,n,r)}function M(t,e,n){return 0===e&&n===t.length?i.fromByteArray(t):i.fromByteArray(t.slice(e,n))}function S(t,e,n){n=Math.min(t.length,n);const r=[];let i=e;for(;i239?4:e>223?3:e>191?2:1;if(i+a<=n){let n,r,s,u;switch(a){case 1:e<128&&(o=e);break;case 2:n=t[i+1],128==(192&n)&&(u=(31&e)<<6|63&n,u>127&&(o=u));break;case 3:n=t[i+1],r=t[i+2],128==(192&n)&&128==(192&r)&&(u=(15&e)<<12|(63&n)<<6|63&r,u>2047&&(u<55296||u>57343)&&(o=u));break;case 4:n=t[i+1],r=t[i+2],s=t[i+3],128==(192&n)&&128==(192&r)&&128==(192&s)&&(u=(15&e)<<18|(63&n)<<12|(63&r)<<6|63&s,u>65535&&u<1114112&&(o=u))}}null===o?(o=65533,a=1):o>65535&&(o-=65536,r.push(o>>>10&1023|55296),o=56320|1023&o),r.push(o),i+=a}return function(t){const e=t.length;if(e<=N)return String.fromCharCode.apply(String,t);let n="",r=0;for(;rr.length?(l.isBuffer(e)||(e=l.from(e)),e.copy(r,i)):Uint8Array.prototype.set.call(r,e,i);else{if(!l.isBuffer(e))throw new TypeError('"list" argument must be an Array of Buffers');e.copy(r,i)}i+=e.length}return r},l.byteLength=m,l.prototype._isBuffer=!0,l.prototype.swap16=function(){const t=this.length;if(t%2!=0)throw new RangeError("Buffer size must be a multiple of 16-bits");for(let e=0;en&&(t+=" ... "),""},a&&(l.prototype[a]=l.prototype.inspect),l.prototype.compare=function(t,e,n,r,i){if(Q(t,Uint8Array)&&(t=l.from(t,t.offset,t.byteLength)),!l.isBuffer(t))throw new TypeError('The "target" argument must be one of type Buffer or Uint8Array. Received type '+typeof t);if(void 0===e&&(e=0),void 0===n&&(n=t?t.length:0),void 0===r&&(r=0),void 0===i&&(i=this.length),e<0||n>t.length||r<0||i>this.length)throw new RangeError("out of range index");if(r>=i&&e>=n)return 0;if(r>=i)return-1;if(e>=n)return 1;if(this===t)return 0;let o=(i>>>=0)-(r>>>=0),a=(n>>>=0)-(e>>>=0);const s=Math.min(o,a),u=this.slice(r,i),c=t.slice(e,n);for(let t=0;t>>=0,isFinite(n)?(n>>>=0,void 0===r&&(r="utf8")):(r=n,n=void 0)}const i=this.length-e;if((void 0===n||n>i)&&(n=i),t.length>0&&(n<0||e<0)||e>this.length)throw new RangeError("Attempt to write outside buffer bounds");r||(r="utf8");let o=!1;for(;;)switch(r){case"hex":return T(this,t,e,n);case"utf8":case"utf-8":return E(this,t,e,n);case"ascii":case"latin1":case"binary":return w(this,t,e,n);case"base64":return x(this,t,e,n);case"ucs2":case"ucs-2":case"utf16le":case"utf-16le":return C(this,t,e,n);default:if(o)throw new TypeError("Unknown encoding: "+r);r=(""+r).toLowerCase(),o=!0}},l.prototype.toJSON=function(){return{type:"Buffer",data:Array.prototype.slice.call(this._arr||this,0)}};const N=4096;function O(t,e,n){let r="";n=Math.min(t.length,n);for(let i=e;ir)&&(n=r);let i="";for(let r=e;rn)throw new RangeError("Trying to access beyond buffer length")}function L(t,e,n,r,i,o){if(!l.isBuffer(t))throw new TypeError('"buffer" argument must be a Buffer instance');if(e>i||et.length)throw new RangeError("Index out of range")}function D(t,e,n,r,i){q(e,r,i,t,n,7);let o=Number(e&BigInt(4294967295));t[n++]=o,o>>=8,t[n++]=o,o>>=8,t[n++]=o,o>>=8,t[n++]=o;let a=Number(e>>BigInt(32)&BigInt(4294967295));return t[n++]=a,a>>=8,t[n++]=a,a>>=8,t[n++]=a,a>>=8,t[n++]=a,n}function k(t,e,n,r,i){q(e,r,i,t,n,7);let o=Number(e&BigInt(4294967295));t[n+7]=o,o>>=8,t[n+6]=o,o>>=8,t[n+5]=o,o>>=8,t[n+4]=o;let a=Number(e>>BigInt(32)&BigInt(4294967295));return t[n+3]=a,a>>=8,t[n+2]=a,a>>=8,t[n+1]=a,a>>=8,t[n]=a,n+8}function F(t,e,n,r,i,o){if(n+r>t.length)throw new RangeError("Index out of range");if(n<0)throw new RangeError("Index out of range")}function U(t,e,n,r,i){return e=+e,n>>>=0,i||F(t,0,n,4),o.write(t,e,n,r,23,4),n+4}function B(t,e,n,r,i){return e=+e,n>>>=0,i||F(t,0,n,8),o.write(t,e,n,r,52,8),n+8}l.prototype.slice=function(t,e){const n=this.length;(t=~~t)<0?(t+=n)<0&&(t=0):t>n&&(t=n),(e=void 0===e?n:~~e)<0?(e+=n)<0&&(e=0):e>n&&(e=n),e>>=0,e>>>=0,n||R(t,e,this.length);let r=this[t],i=1,o=0;for(;++o>>=0,e>>>=0,n||R(t,e,this.length);let r=this[t+--e],i=1;for(;e>0&&(i*=256);)r+=this[t+--e]*i;return r},l.prototype.readUint8=l.prototype.readUInt8=function(t,e){return t>>>=0,e||R(t,1,this.length),this[t]},l.prototype.readUint16LE=l.prototype.readUInt16LE=function(t,e){return t>>>=0,e||R(t,2,this.length),this[t]|this[t+1]<<8},l.prototype.readUint16BE=l.prototype.readUInt16BE=function(t,e){return t>>>=0,e||R(t,2,this.length),this[t]<<8|this[t+1]},l.prototype.readUint32LE=l.prototype.readUInt32LE=function(t,e){return t>>>=0,e||R(t,4,this.length),(this[t]|this[t+1]<<8|this[t+2]<<16)+16777216*this[t+3]},l.prototype.readUint32BE=l.prototype.readUInt32BE=function(t,e){return t>>>=0,e||R(t,4,this.length),16777216*this[t]+(this[t+1]<<16|this[t+2]<<8|this[t+3])},l.prototype.readBigUInt64LE=$((function(t){H(t>>>=0,"offset");const e=this[t],n=this[t+7];void 0!==e&&void 0!==n||z(t,this.length-8);const r=e+256*this[++t]+65536*this[++t]+this[++t]*2**24,i=this[++t]+256*this[++t]+65536*this[++t]+n*2**24;return BigInt(r)+(BigInt(i)<>>=0,"offset");const e=this[t],n=this[t+7];void 0!==e&&void 0!==n||z(t,this.length-8);const r=e*2**24+65536*this[++t]+256*this[++t]+this[++t],i=this[++t]*2**24+65536*this[++t]+256*this[++t]+n;return(BigInt(r)<>>=0,e>>>=0,n||R(t,e,this.length);let r=this[t],i=1,o=0;for(;++o=i&&(r-=Math.pow(2,8*e)),r},l.prototype.readIntBE=function(t,e,n){t>>>=0,e>>>=0,n||R(t,e,this.length);let r=e,i=1,o=this[t+--r];for(;r>0&&(i*=256);)o+=this[t+--r]*i;return i*=128,o>=i&&(o-=Math.pow(2,8*e)),o},l.prototype.readInt8=function(t,e){return t>>>=0,e||R(t,1,this.length),128&this[t]?-1*(255-this[t]+1):this[t]},l.prototype.readInt16LE=function(t,e){t>>>=0,e||R(t,2,this.length);const n=this[t]|this[t+1]<<8;return 32768&n?4294901760|n:n},l.prototype.readInt16BE=function(t,e){t>>>=0,e||R(t,2,this.length);const n=this[t+1]|this[t]<<8;return 32768&n?4294901760|n:n},l.prototype.readInt32LE=function(t,e){return t>>>=0,e||R(t,4,this.length),this[t]|this[t+1]<<8|this[t+2]<<16|this[t+3]<<24},l.prototype.readInt32BE=function(t,e){return t>>>=0,e||R(t,4,this.length),this[t]<<24|this[t+1]<<16|this[t+2]<<8|this[t+3]},l.prototype.readBigInt64LE=$((function(t){H(t>>>=0,"offset");const e=this[t],n=this[t+7];void 0!==e&&void 0!==n||z(t,this.length-8);const r=this[t+4]+256*this[t+5]+65536*this[t+6]+(n<<24);return(BigInt(r)<>>=0,"offset");const e=this[t],n=this[t+7];void 0!==e&&void 0!==n||z(t,this.length-8);const r=(e<<24)+65536*this[++t]+256*this[++t]+this[++t];return(BigInt(r)<>>=0,e||R(t,4,this.length),o.read(this,t,!0,23,4)},l.prototype.readFloatBE=function(t,e){return t>>>=0,e||R(t,4,this.length),o.read(this,t,!1,23,4)},l.prototype.readDoubleLE=function(t,e){return t>>>=0,e||R(t,8,this.length),o.read(this,t,!0,52,8)},l.prototype.readDoubleBE=function(t,e){return t>>>=0,e||R(t,8,this.length),o.read(this,t,!1,52,8)},l.prototype.writeUintLE=l.prototype.writeUIntLE=function(t,e,n,r){t=+t,e>>>=0,n>>>=0,r||L(this,t,e,n,Math.pow(2,8*n)-1,0);let i=1,o=0;for(this[e]=255&t;++o>>=0,n>>>=0,r||L(this,t,e,n,Math.pow(2,8*n)-1,0);let i=n-1,o=1;for(this[e+i]=255&t;--i>=0&&(o*=256);)this[e+i]=t/o&255;return e+n},l.prototype.writeUint8=l.prototype.writeUInt8=function(t,e,n){return t=+t,e>>>=0,n||L(this,t,e,1,255,0),this[e]=255&t,e+1},l.prototype.writeUint16LE=l.prototype.writeUInt16LE=function(t,e,n){return t=+t,e>>>=0,n||L(this,t,e,2,65535,0),this[e]=255&t,this[e+1]=t>>>8,e+2},l.prototype.writeUint16BE=l.prototype.writeUInt16BE=function(t,e,n){return t=+t,e>>>=0,n||L(this,t,e,2,65535,0),this[e]=t>>>8,this[e+1]=255&t,e+2},l.prototype.writeUint32LE=l.prototype.writeUInt32LE=function(t,e,n){return t=+t,e>>>=0,n||L(this,t,e,4,4294967295,0),this[e+3]=t>>>24,this[e+2]=t>>>16,this[e+1]=t>>>8,this[e]=255&t,e+4},l.prototype.writeUint32BE=l.prototype.writeUInt32BE=function(t,e,n){return t=+t,e>>>=0,n||L(this,t,e,4,4294967295,0),this[e]=t>>>24,this[e+1]=t>>>16,this[e+2]=t>>>8,this[e+3]=255&t,e+4},l.prototype.writeBigUInt64LE=$((function(t,e=0){return D(this,t,e,BigInt(0),BigInt("0xffffffffffffffff"))})),l.prototype.writeBigUInt64BE=$((function(t,e=0){return k(this,t,e,BigInt(0),BigInt("0xffffffffffffffff"))})),l.prototype.writeIntLE=function(t,e,n,r){if(t=+t,e>>>=0,!r){const r=Math.pow(2,8*n-1);L(this,t,e,n,r-1,-r)}let i=0,o=1,a=0;for(this[e]=255&t;++i>0)-a&255;return e+n},l.prototype.writeIntBE=function(t,e,n,r){if(t=+t,e>>>=0,!r){const r=Math.pow(2,8*n-1);L(this,t,e,n,r-1,-r)}let i=n-1,o=1,a=0;for(this[e+i]=255&t;--i>=0&&(o*=256);)t<0&&0===a&&0!==this[e+i+1]&&(a=1),this[e+i]=(t/o>>0)-a&255;return e+n},l.prototype.writeInt8=function(t,e,n){return t=+t,e>>>=0,n||L(this,t,e,1,127,-128),t<0&&(t=255+t+1),this[e]=255&t,e+1},l.prototype.writeInt16LE=function(t,e,n){return t=+t,e>>>=0,n||L(this,t,e,2,32767,-32768),this[e]=255&t,this[e+1]=t>>>8,e+2},l.prototype.writeInt16BE=function(t,e,n){return t=+t,e>>>=0,n||L(this,t,e,2,32767,-32768),this[e]=t>>>8,this[e+1]=255&t,e+2},l.prototype.writeInt32LE=function(t,e,n){return t=+t,e>>>=0,n||L(this,t,e,4,2147483647,-2147483648),this[e]=255&t,this[e+1]=t>>>8,this[e+2]=t>>>16,this[e+3]=t>>>24,e+4},l.prototype.writeInt32BE=function(t,e,n){return t=+t,e>>>=0,n||L(this,t,e,4,2147483647,-2147483648),t<0&&(t=4294967295+t+1),this[e]=t>>>24,this[e+1]=t>>>16,this[e+2]=t>>>8,this[e+3]=255&t,e+4},l.prototype.writeBigInt64LE=$((function(t,e=0){return D(this,t,e,-BigInt("0x8000000000000000"),BigInt("0x7fffffffffffffff"))})),l.prototype.writeBigInt64BE=$((function(t,e=0){return k(this,t,e,-BigInt("0x8000000000000000"),BigInt("0x7fffffffffffffff"))})),l.prototype.writeFloatLE=function(t,e,n){return U(this,t,e,!0,n)},l.prototype.writeFloatBE=function(t,e,n){return U(this,t,e,!1,n)},l.prototype.writeDoubleLE=function(t,e,n){return B(this,t,e,!0,n)},l.prototype.writeDoubleBE=function(t,e,n){return B(this,t,e,!1,n)},l.prototype.copy=function(t,e,n,r){if(!l.isBuffer(t))throw new TypeError("argument should be a Buffer");if(n||(n=0),r||0===r||(r=this.length),e>=t.length&&(e=t.length),e||(e=0),r>0&&r=this.length)throw new RangeError("Index out of range");if(r<0)throw new RangeError("sourceEnd out of bounds");r>this.length&&(r=this.length),t.length-e>>=0,n=void 0===n?this.length:n>>>0,t||(t=0),"number"==typeof t)for(i=e;i=r+4;n-=3)e=`_${t.slice(n-3,n)}${e}`;return`${t.slice(0,n)}${e}`}function q(t,e,n,r,i,o){if(t>n||t3?0===e||e===BigInt(0)?`>= 0${r} and < 2${r} ** ${8*(o+1)}${r}`:`>= -(2${r} ** ${8*(o+1)-1}${r}) and < 2 ** ${8*(o+1)-1}${r}`:`>= ${e}${r} and <= ${n}${r}`,new j.ERR_OUT_OF_RANGE("value",i,t)}!function(t,e,n){H(e,"offset"),void 0!==t[e]&&void 0!==t[e+n]||z(e,t.length-(n+1))}(r,i,o)}function H(t,e){if("number"!=typeof t)throw new j.ERR_INVALID_ARG_TYPE(e,"number",t)}function z(t,e,n){if(Math.floor(t)!==t)throw H(t,n),new j.ERR_OUT_OF_RANGE(n||"offset","an integer",t);if(e<0)throw new j.ERR_BUFFER_OUT_OF_BOUNDS;throw new j.ERR_OUT_OF_RANGE(n||"offset",`>= ${n?1:0} and <= ${e}`,t)}G("ERR_BUFFER_OUT_OF_BOUNDS",(function(t){return t?`${t} is outside of buffer bounds`:"Attempt to access memory outside buffer bounds"}),RangeError),G("ERR_INVALID_ARG_TYPE",(function(t,e){return`The "${t}" argument must be of type number. Received type ${typeof e}`}),TypeError),G("ERR_OUT_OF_RANGE",(function(t,e,n){let r=`The value of "${t}" is out of range.`,i=n;return Number.isInteger(n)&&Math.abs(n)>2**32?i=W(String(n)):"bigint"==typeof n&&(i=String(n),(n>BigInt(2)**BigInt(32)||n<-(BigInt(2)**BigInt(32)))&&(i=W(i)),i+="n"),r+=` It must be ${e}. Received ${i}`,r}),RangeError);const V=/[^+/0-9A-Za-z-_]/g;function X(t,e){let n;e=e||1/0;const r=t.length;let i=null;const o=[];for(let a=0;a55295&&n<57344){if(!i){if(n>56319){(e-=3)>-1&&o.push(239,191,189);continue}if(a+1===r){(e-=3)>-1&&o.push(239,191,189);continue}i=n;continue}if(n<56320){(e-=3)>-1&&o.push(239,191,189),i=n;continue}n=65536+(i-55296<<10|n-56320)}else i&&(e-=3)>-1&&o.push(239,191,189);if(i=null,n<128){if((e-=1)<0)break;o.push(n)}else if(n<2048){if((e-=2)<0)break;o.push(n>>6|192,63&n|128)}else if(n<65536){if((e-=3)<0)break;o.push(n>>12|224,n>>6&63|128,63&n|128)}else{if(!(n<1114112))throw new Error("Invalid code point");if((e-=4)<0)break;o.push(n>>18|240,n>>12&63|128,n>>6&63|128,63&n|128)}}return o}function Y(t){return i.toByteArray(function(t){if((t=(t=t.split("=")[0]).trim().replace(V,"")).length<2)return"";for(;t.length%4!=0;)t+="=";return t}(t))}function Z(t,e,n,r){let i;for(i=0;i=e.length||i>=t.length);++i)e[i+n]=t[i];return i}function Q(t,e){return t instanceof e||null!=t&&null!=t.constructor&&null!=t.constructor.name&&t.constructor.name===e.name}function K(t){return t!=t}const J=function(){const t="0123456789abcdef",e=new Array(256);for(let n=0;n<16;++n){const r=16*n;for(let i=0;i<16;++i)e[r+i]=t[n]+t[i]}return e}();function $(t){return"undefined"==typeof BigInt?tt:t}function tt(){throw new Error("BigInt not supported")}},3935:(t,e,n)=>{"use strict";var r=n(4155);function i(t){if("string"!=typeof t)throw new TypeError("Path must be a string. Received "+JSON.stringify(t))}function o(t,e){for(var n,r="",i=0,o=-1,a=0,s=0;s<=t.length;++s){if(s2){var u=r.lastIndexOf("/");if(u!==r.length-1){-1===u?(r="",i=0):i=(r=r.slice(0,u)).length-1-r.lastIndexOf("/"),o=s,a=0;continue}}else if(2===r.length||1===r.length){r="",i=0,o=s,a=0;continue}e&&(r.length>0?r+="/..":r="..",i=2)}else r.length>0?r+="/"+t.slice(o+1,s):r=t.slice(o+1,s),i=s-o-1;o=s,a=0}else 46===n&&-1!==a?++a:a=-1}return r}var a={resolve:function(){for(var t,e="",n=!1,a=arguments.length-1;a>=-1&&!n;a--){var s;a>=0?s=arguments[a]:(void 0===t&&(t=r.cwd()),s=t),i(s),0!==s.length&&(e=s+"/"+e,n=47===s.charCodeAt(0))}return e=o(e,!n),n?e.length>0?"/"+e:"/":e.length>0?e:"."},normalize:function(t){if(i(t),0===t.length)return".";var e=47===t.charCodeAt(0),n=47===t.charCodeAt(t.length-1);return 0!==(t=o(t,!e)).length||e||(t="."),t.length>0&&n&&(t+="/"),e?"/"+t:t},isAbsolute:function(t){return i(t),t.length>0&&47===t.charCodeAt(0)},join:function(){if(0===arguments.length)return".";for(var t,e=0;e0&&(void 0===t?t=n:t+="/"+n)}return void 0===t?".":a.normalize(t)},relative:function(t,e){if(i(t),i(e),t===e)return"";if((t=a.resolve(t))===(e=a.resolve(e)))return"";for(var n=1;nl){if(47===e.charCodeAt(s+h))return e.slice(s+h+1);if(0===h)return e.slice(s+h)}else o>l&&(47===t.charCodeAt(n+h)?c=h:0===h&&(c=0));break}var f=t.charCodeAt(n+h);if(f!==e.charCodeAt(s+h))break;47===f&&(c=h)}var p="";for(h=n+c+1;h<=r;++h)h!==r&&47!==t.charCodeAt(h)||(0===p.length?p+="..":p+="/..");return p.length>0?p+e.slice(s+c):(s+=c,47===e.charCodeAt(s)&&++s,e.slice(s))},_makeLong:function(t){return t},dirname:function(t){if(i(t),0===t.length)return".";for(var e=t.charCodeAt(0),n=47===e,r=-1,o=!0,a=t.length-1;a>=1;--a)if(47===(e=t.charCodeAt(a))){if(!o){r=a;break}}else o=!1;return-1===r?n?"/":".":n&&1===r?"//":t.slice(0,r)},basename:function(t,e){if(void 0!==e&&"string"!=typeof e)throw new TypeError('"ext" argument must be a string');i(t);var n,r=0,o=-1,a=!0;if(void 0!==e&&e.length>0&&e.length<=t.length){if(e.length===t.length&&e===t)return"";var s=e.length-1,u=-1;for(n=t.length-1;n>=0;--n){var l=t.charCodeAt(n);if(47===l){if(!a){r=n+1;break}}else-1===u&&(a=!1,u=n+1),s>=0&&(l===e.charCodeAt(s)?-1==--s&&(o=n):(s=-1,o=u))}return r===o?o=u:-1===o&&(o=t.length),t.slice(r,o)}for(n=t.length-1;n>=0;--n)if(47===t.charCodeAt(n)){if(!a){r=n+1;break}}else-1===o&&(a=!1,o=n+1);return-1===o?"":t.slice(r,o)},extname:function(t){i(t);for(var e=-1,n=0,r=-1,o=!0,a=0,s=t.length-1;s>=0;--s){var u=t.charCodeAt(s);if(47!==u)-1===r&&(o=!1,r=s+1),46===u?-1===e?e=s:1!==a&&(a=1):-1!==e&&(a=-1);else if(!o){n=s+1;break}}return-1===e||-1===r||0===a||1===a&&e===r-1&&e===n+1?"":t.slice(e,r)},format:function(t){if(null===t||"object"!=typeof t)throw new TypeError('The "pathObject" argument must be of type Object. Received type '+typeof t);return function(t,e){var n=e.dir||e.root,r=e.base||(e.name||"")+(e.ext||"");return n?n===e.root?n+r:n+"/"+r:r}(0,t)},parse:function(t){i(t);var e={root:"",dir:"",base:"",ext:"",name:""};if(0===t.length)return e;var n,r=t.charCodeAt(0),o=47===r;o?(e.root="/",n=1):n=0;for(var a=-1,s=0,u=-1,l=!0,c=t.length-1,h=0;c>=n;--c)if(47!==(r=t.charCodeAt(c)))-1===u&&(l=!1,u=c+1),46===r?-1===a?a=c:1!==h&&(h=1):-1!==a&&(h=-1);else if(!l){s=c+1;break}return-1===a||-1===u||0===h||1===h&&a===u-1&&a===s+1?-1!==u&&(e.base=e.name=0===s&&o?t.slice(1,u):t.slice(s,u)):(0===s&&o?(e.name=t.slice(1,a),e.base=t.slice(1,u)):(e.name=t.slice(s,a),e.base=t.slice(s,u)),e.ext=t.slice(a,u)),s>0?e.dir=t.slice(0,s-1):o&&(e.dir="/"),e},sep:"/",delimiter:":",win32:null,posix:null};a.posix=a,t.exports=a},7418:t=>{"use strict";var e=Object.getOwnPropertySymbols,n=Object.prototype.hasOwnProperty,r=Object.prototype.propertyIsEnumerable;function i(t){if(null==t)throw new TypeError("Object.assign cannot be called with null or undefined");return Object(t)}t.exports=function(){try{if(!Object.assign)return!1;var t=new String("abc");if(t[5]="de","5"===Object.getOwnPropertyNames(t)[0])return!1;for(var e={},n=0;n<10;n++)e["_"+String.fromCharCode(n)]=n;if("0123456789"!==Object.getOwnPropertyNames(e).map((function(t){return e[t]})).join(""))return!1;var r={};return"abcdefghijklmnopqrst".split("").forEach((function(t){r[t]=t})),"abcdefghijklmnopqrst"===Object.keys(Object.assign({},r)).join("")}catch(t){return!1}}()?Object.assign:function(t,o){for(var a,s,u=i(t),l=1;l{e.endianness=function(){return"LE"},e.hostname=function(){return"undefined"!=typeof location?location.hostname:""},e.loadavg=function(){return[]},e.uptime=function(){return 0},e.freemem=function(){return Number.MAX_VALUE},e.totalmem=function(){return Number.MAX_VALUE},e.cpus=function(){return[]},e.type=function(){return"Browser"},e.release=function(){return"undefined"!=typeof navigator?navigator.appVersion:""},e.networkInterfaces=e.getNetworkInterfaces=function(){return{}},e.arch=function(){return"javascript"},e.platform=function(){return"browser"},e.tmpdir=e.tmpDir=function(){return"/tmp"},e.EOL="\n",e.homedir=function(){return"/"}},2676:function(t,e,n){var r=n(4155);t.exports=function(){"use strict";function t(t,e){if(!(t instanceof e))throw new TypeError("Cannot call a class as a function")}function e(t,e){for(var n=0;ne?1:t0))break;if(null===e.right)break;if(n(t,e.right.key)>0&&(u=e.right,e.right=u.left,u.left=e,null===(e=u).right))break;o.right=e,o=e,e=e.right}}return o.right=e.left,a.left=e.right,e.left=r.right,e.right=r.left,e}function s(t,e,n,r){var o=new i(t,e);if(null===n)return o.left=o.right=null,o;var s=r(t,(n=a(t,n,r)).key);return s<0?(o.left=n.left,o.right=n,n.left=null):s>=0&&(o.right=n.right,o.left=n,n.right=null),o}function u(t,e,n){var r=null,i=null;if(e){var o=n((e=a(t,e,n)).key,t);0===o?(r=e.left,i=e.right):o<0?(i=e.right,e.right=null,r=e):(r=e.left,e.left=null,i=e)}return{left:r,right:i}}function l(t,e,n,r,i){if(t){r(e+(n?"└── ":"├── ")+i(t)+"\n");var o=e+(n?" ":"│ ");t.left&&l(t.left,o,!1,r,i),t.right&&l(t.right,o,!0,r,i)}}var c=function(){function t(t){void 0===t&&(t=o),this._root=null,this._size=0,this._comparator=t}return t.prototype.insert=function(t,e){return this._size++,this._root=s(t,e,this._root,this._comparator)},t.prototype.add=function(t,e){var n=new i(t,e);null===this._root&&(n.left=n.right=null,this._size++,this._root=n);var r=this._comparator,o=a(t,this._root,r),s=r(t,o.key);return 0===s?this._root=o:(s<0?(n.left=o.left,n.right=o,o.left=null):s>0&&(n.right=o.right,n.left=o,o.right=null),this._size++,this._root=n),this._root},t.prototype.remove=function(t){this._root=this._remove(t,this._root,this._comparator)},t.prototype._remove=function(t,e,n){var r;return null===e?null:0===n(t,(e=a(t,e,n)).key)?(null===e.left?r=e.right:(r=a(t,e.left,n)).right=e.right,this._size--,r):e},t.prototype.pop=function(){var t=this._root;if(t){for(;t.left;)t=t.left;return this._root=a(t.key,this._root,this._comparator),this._root=this._remove(t.key,this._root,this._comparator),{key:t.key,data:t.data}}return null},t.prototype.findStatic=function(t){for(var e=this._root,n=this._comparator;e;){var r=n(t,e.key);if(0===r)return e;e=r<0?e.left:e.right}return null},t.prototype.find=function(t){return this._root&&(this._root=a(t,this._root,this._comparator),0!==this._comparator(t,this._root.key))?null:this._root},t.prototype.contains=function(t){for(var e=this._root,n=this._comparator;e;){var r=n(t,e.key);if(0===r)return!0;e=r<0?e.left:e.right}return!1},t.prototype.forEach=function(t,e){for(var n=this._root,r=[],i=!1;!i;)null!==n?(r.push(n),n=n.left):0!==r.length?(n=r.pop(),t.call(e,n),n=n.right):i=!0;return this},t.prototype.range=function(t,e,n,r){for(var i=[],o=this._comparator,a=this._root;0!==i.length||a;)if(a)i.push(a),a=a.left;else{if(o((a=i.pop()).key,e)>0)break;if(o(a.key,t)>=0&&n.call(r,a))return this;a=a.right}return this},t.prototype.keys=function(){var t=[];return this.forEach((function(e){var n=e.key;return t.push(n)})),t},t.prototype.values=function(){var t=[];return this.forEach((function(e){var n=e.data;return t.push(n)})),t},t.prototype.min=function(){return this._root?this.minNode(this._root).key:null},t.prototype.max=function(){return this._root?this.maxNode(this._root).key:null},t.prototype.minNode=function(t){if(void 0===t&&(t=this._root),t)for(;t.left;)t=t.left;return t},t.prototype.maxNode=function(t){if(void 0===t&&(t=this._root),t)for(;t.right;)t=t.right;return t},t.prototype.at=function(t){for(var e=this._root,n=!1,r=0,i=[];!n;)if(e)i.push(e),e=e.left;else if(i.length>0){if(e=i.pop(),r===t)return e;r++,e=e.right}else n=!0;return null},t.prototype.next=function(t){var e=this._root,n=null;if(t.right){for(n=t.right;n.left;)n=n.left;return n}for(var r=this._comparator;e;){var i=r(t.key,e.key);if(0===i)break;i<0?(n=e,e=e.left):e=e.right}return n},t.prototype.prev=function(t){var e=this._root,n=null;if(null!==t.left){for(n=t.left;n.right;)n=n.right;return n}for(var r=this._comparator;e;){var i=r(t.key,e.key);if(0===i)break;i<0?e=e.left:(n=e,e=e.right)}return n},t.prototype.clear=function(){return this._root=null,this._size=0,this},t.prototype.toList=function(){return function(t){for(var e=t,n=[],r=!1,o=new i(null,null),a=o;!r;)e?(n.push(e),e=e.left):n.length>0?e=(e=a=a.next=n.pop()).right:r=!0;return a.next=null,o.next}(this._root)},t.prototype.load=function(t,e,n){void 0===e&&(e=[]),void 0===n&&(n=!1);var r=t.length,o=this._comparator;if(n&&p(t,e,0,r-1,o),null===this._root)this._root=h(t,e,0,r),this._size=r;else{var a=function(t,e,n){for(var r=new i(null,null),o=r,a=t,s=e;null!==a&&null!==s;)n(a.key,s.key)<0?(o.next=a,a=a.next):(o.next=s,s=s.next),o=o.next;return null!==a?o.next=a:null!==s&&(o.next=s),r.next}(this.toList(),function(t,e){for(var n=new i(null,null),r=n,o=0;o0){var a=n+Math.floor(o/2),s=t[a],u=e[a],l=new i(s,u);return l.left=h(t,e,n,a),l.right=h(t,e,a+1,r),l}return null}function f(t,e,n){var r=n-e;if(r>0){var i=e+Math.floor(r/2),o=f(t,e,i),a=t.head;return a.left=o,t.head=t.head.next,a.right=f(t,i+1,n),a}return null}function p(t,e,n,r,i){if(!(n>=r)){for(var o=t[n+r>>1],a=n-1,s=r+1;;){do{a++}while(i(t[a],o)<0);do{s--}while(i(t[s],o)>0);if(a>=s)break;var u=t[a];t[a]=t[s],t[s]=u,u=e[a],e[a]=e[s],e[s]=u}p(t,e,n,s,i),p(t,e,s+1,r,i)}}var d=function(t,e){return t.ll.x<=e.x&&e.x<=t.ur.x&&t.ll.y<=e.y&&e.y<=t.ur.y},y=function(t,e){if(e.ur.xe.x?1:t.ye.y?1:0}}]),n(e,[{key:"link",value:function(t){if(t.point===this.point)throw new Error("Tried to link already linked events");for(var e=t.point.events,n=0,r=e.length;n=0&&u>=0?al?-1:0:o<0&&u<0?al?1:0:uo?1:0}}}]),e}(),A=0,I=function(){function e(n,r,i,o){t(this,e),this.id=++A,this.leftSE=n,n.segment=this,n.otherSE=r,this.rightSE=r,r.segment=this,r.otherSE=n,this.rings=i,this.windings=o}return n(e,null,[{key:"compare",value:function(t,e){var n=t.leftSE.point.x,r=e.leftSE.point.x,i=t.rightSE.point.x,o=e.rightSE.point.x;if(oa&&s>u)return-1;var c=t.comparePoint(e.leftSE.point);if(c<0)return 1;if(c>0)return-1;var h=e.comparePoint(t.rightSE.point);return 0!==h?h:-1}if(n>r){if(as&&a>l)return 1;var f=e.comparePoint(t.leftSE.point);if(0!==f)return f;var p=t.comparePoint(e.rightSE.point);return p<0?1:p>0?-1:1}if(as)return 1;if(io){var y=t.comparePoint(e.rightSE.point);if(y<0)return 1;if(y>0)return-1}if(i!==o){var m=u-a,g=i-n,_=l-s,b=o-r;if(m>g&&_b)return-1}return i>o?1:il?1:t.ide.id?1:0}}]),n(e,[{key:"replaceRightSE",value:function(t){this.rightSE=t,this.rightSE.segment=this,this.rightSE.otherSE=this.leftSE,this.leftSE.otherSE=this.rightSE}},{key:"bbox",value:function(){var t=this.leftSE.point.y,e=this.rightSE.point.y;return{ll:{x:this.leftSE.point.x,y:te?t:e}}}},{key:"vector",value:function(){return{x:this.rightSE.point.x-this.leftSE.point.x,y:this.rightSE.point.y-this.leftSE.point.y}}},{key:"isAnEndpoint",value:function(t){return t.x===this.leftSE.point.x&&t.y===this.leftSE.point.y||t.x===this.rightSE.point.x&&t.y===this.rightSE.point.y}},{key:"comparePoint",value:function(t){if(this.isAnEndpoint(t))return 0;var e=this.leftSE.point,n=this.rightSE.point,r=this.vector();if(e.x===n.x)return t.x===e.x?0:t.x0&&s.swapEvents(),O.comparePoints(this.leftSE.point,this.rightSE.point)>0&&this.swapEvents(),r&&(i.checkForConsuming(),o.checkForConsuming()),n}},{key:"swapEvents",value:function(){var t=this.rightSE;this.rightSE=this.leftSE,this.leftSE=t,this.leftSE.isLeft=!0,this.rightSE.isLeft=!1;for(var e=0,n=this.windings.length;e0){var o=n;n=r,r=o}if(n.prev===r){var a=n;n=r,r=a}for(var s=0,u=r.rings.length;s0))throw new Error("Tried to create degenerate segment at [".concat(t.x,", ").concat(t.y,"]"));i=n,o=t,a=-1}return new e(new O(i,!0),new O(o,!1),[r],[a])}}]),e}(),P=function(){function e(n,r,i){if(t(this,e),!Array.isArray(n)||0===n.length)throw new Error("Input geometry is not a valid Polygon or MultiPolygon");if(this.poly=r,this.isExterior=i,this.segments=[],"number"!=typeof n[0][0]||"number"!=typeof n[0][1])throw new Error("Input geometry is not a valid Polygon or MultiPolygon");var o=T.round(n[0][0],n[0][1]);this.bbox={ll:{x:o.x,y:o.y},ur:{x:o.x,y:o.y}};for(var a=o,s=1,u=n.length;sthis.bbox.ur.x&&(this.bbox.ur.x=l.x),l.y>this.bbox.ur.y&&(this.bbox.ur.y=l.y),a=l)}o.x===a.x&&o.y===a.y||this.segments.push(I.fromRing(a,o,this))}return n(e,[{key:"getSweepEvents",value:function(){for(var t=[],e=0,n=this.segments.length;ethis.bbox.ur.x&&(this.bbox.ur.x=a.bbox.ur.x),a.bbox.ur.y>this.bbox.ur.y&&(this.bbox.ur.y=a.bbox.ur.y),this.interiorRings.push(a)}this.multiPoly=r}return n(e,[{key:"getSweepEvents",value:function(){for(var t=this.exteriorRing.getSweepEvents(),e=0,n=this.interiorRings.length;ethis.bbox.ur.x&&(this.bbox.ur.x=a.bbox.ur.x),a.bbox.ur.y>this.bbox.ur.y&&(this.bbox.ur.y=a.bbox.ur.y),this.polys.push(a)}this.isSubject=r}return n(e,[{key:"getSweepEvents",value:function(){for(var t=[],e=0,n=this.polys.length;e0&&(t=r)}for(var i=t.segment.prevInResult(),o=i?i.prevInResult():null;;){if(!i)return null;if(!o)return i.ringOut;if(o.ringOut!==i.ringOut)return o.ringOut.enclosingRing()!==i.ringOut?i.ringOut:i.ringOut.enclosingRing();i=o.prevInResult(),o=i?i.prevInResult():null}}}]),e}(),k=function(){function e(n){t(this,e),this.exteriorRing=n,n.poly=this,this.interiorRings=[]}return n(e,[{key:"addInterior",value:function(t){this.interiorRings.push(t),t.poly=this}},{key:"getGeom",value:function(){var t=[this.exteriorRing.getGeom()];if(null===t[0])return null;for(var e=0,n=this.interiorRings.length;e1&&void 0!==arguments[1]?arguments[1]:I.compare;t(this,e),this.queue=n,this.tree=new c(r),this.segments=[]}return n(e,[{key:"process",value:function(t){var e=t.segment,n=[];if(t.consumedBy)return t.isLeft?this.queue.remove(t.otherSE):this.tree.remove(e),n;var r=t.isLeft?this.tree.insert(e):this.tree.find(e);if(!r)throw new Error("Unable to find segment #".concat(e.id," ")+"[".concat(e.leftSE.point.x,", ").concat(e.leftSE.point.y,"] -> ")+"[".concat(e.rightSE.point.x,", ").concat(e.rightSE.point.y,"] ")+"in SweepLine tree. Please submit a bug report.");for(var i=r,o=r,a=void 0,s=void 0;void 0===a;)null===(i=this.tree.prev(i))?a=null:void 0===i.key.consumedBy&&(a=i.key);for(;void 0===s;)null===(o=this.tree.next(o))?s=null:void 0===o.key.consumedBy&&(s=o.key);if(t.isLeft){var u=null;if(a){var l=a.getIntersection(e);if(null!==l&&(e.isAnEndpoint(l)||(u=l),!a.isAnEndpoint(l)))for(var c=this._splitSafely(a,l),h=0,f=c.length;h0?(this.tree.remove(e),n.push(t)):(this.segments.push(e),e.prev=a)}else{if(a&&s){var E=a.getIntersection(s);if(null!==E){if(!a.isAnEndpoint(E))for(var w=this._splitSafely(a,E),x=0,C=w.length;xB)throw new Error("Infinite loop when putting segment endpoints in a priority queue (queue size too big). Please file a bug report.");for(var E=new U(d),w=d.size,x=d.pop();x;){var C=x.key;if(d.size===w){var M=C.segment;throw new Error("Unable to pop() ".concat(C.isLeft?"left":"right"," SweepEvent ")+"[".concat(C.point.x,", ").concat(C.point.y,"] from segment #").concat(M.id," ")+"[".concat(M.leftSE.point.x,", ").concat(M.leftSE.point.y,"] -> ")+"[".concat(M.rightSE.point.x,", ").concat(M.rightSE.point.y,"] from queue. ")+"Please file a bug report.")}if(d.size>B)throw new Error("Infinite loop when passing sweep line over endpoints (queue size too big). Please file a bug report.");if(E.segments.length>j)throw new Error("Infinite loop when passing sweep line over endpoints (too many sweep line segments). Please file a bug report.");for(var S=E.process(C),N=0,A=S.length;N1?e-1:0),r=1;r1?e-1:0),r=1;r1?e-1:0),r=1;r1?e-1:0),r=1;r{var e,n,r=t.exports={};function i(){throw new Error("setTimeout has not been defined")}function o(){throw new Error("clearTimeout has not been defined")}function a(t){if(e===setTimeout)return setTimeout(t,0);if((e===i||!e)&&setTimeout)return e=setTimeout,setTimeout(t,0);try{return e(t,0)}catch(n){try{return e.call(null,t,0)}catch(n){return e.call(this,t,0)}}}!function(){try{e="function"==typeof setTimeout?setTimeout:i}catch(t){e=i}try{n="function"==typeof clearTimeout?clearTimeout:o}catch(t){n=o}}();var s,u=[],l=!1,c=-1;function h(){l&&s&&(l=!1,s.length?u=s.concat(u):c=-1,u.length&&f())}function f(){if(!l){var t=a(h);l=!0;for(var e=u.length;e;){for(s=u,u=[];++c1)for(var n=1;n{"use strict";n.r(e),n.d(e,{default:()=>Ve});var r=6378137,i=.0066943799901413165,o=484813681109536e-20,a=Math.PI/2,s=1e-10,u=.017453292519943295,l=57.29577951308232,c=Math.PI/4,h=2*Math.PI,f=3.14159265359,p={greenwich:0,lisbon:-9.131906111111,paris:2.337229166667,bogota:-74.080916666667,madrid:-3.687938888889,rome:12.452333333333,bern:7.439583333333,jakarta:106.807719444444,ferro:-17.666666666667,brussels:4.367975,stockholm:18.058277777778,athens:23.7163375,oslo:10.722916666667};const d={ft:{to_meter:.3048},"us-ft":{to_meter:1200/3937}};var y=/[\s_\-\/\(\)]/g;function m(t,e){if(t[e])return t[e];for(var n,r=Object.keys(t),i=e.toLowerCase().replace(y,""),o=-1;++o0?90:-90),t.lat_ts=t.lat1)}(i),i}w.prototype.readCharicter=function(){var t=this.text[this.place++];if(4!==this.state)for(;_.test(t);){if(this.place>=this.text.length)return;t=this.text[this.place++]}switch(this.state){case 1:return this.neutral(t);case 2:return this.keyword(t);case 4:return this.quoted(t);case 5:return this.afterquote(t);case 3:return this.number(t);case-1:return}},w.prototype.afterquote=function(t){if('"'===t)return this.word+='"',void(this.state=4);if(T.test(t))return this.word=this.word.trim(),void this.afterItem(t);throw new Error("havn't handled \""+t+'" in afterquote yet, index '+this.place)},w.prototype.afterItem=function(t){return","===t?(null!==this.word&&this.currentObject.push(this.word),this.word=null,void(this.state=1)):"]"===t?(this.level--,null!==this.word&&(this.currentObject.push(this.word),this.word=null),this.state=1,this.currentObject=this.stack.pop(),void(this.currentObject||(this.state=-1))):void 0},w.prototype.number=function(t){if(!E.test(t)){if(T.test(t))return this.word=parseFloat(this.word),void this.afterItem(t);throw new Error("havn't handled \""+t+'" in number yet, index '+this.place)}this.word+=t},w.prototype.quoted=function(t){'"'!==t?this.word+=t:this.state=5},w.prototype.keyword=function(t){if(v.test(t))this.word+=t;else{if("["===t){var e=[];return e.push(this.word),this.level++,null===this.root?this.root=e:this.currentObject.push(e),this.stack.push(this.currentObject),this.currentObject=e,void(this.state=1)}if(!T.test(t))throw new Error("havn't handled \""+t+'" in keyword yet, index '+this.place);this.afterItem(t)}},w.prototype.neutral=function(t){if(b.test(t))return this.word=t,void(this.state=2);if('"'===t)return this.word="",void(this.state=4);if(E.test(t))return this.word=t,void(this.state=3);if(!T.test(t))throw new Error("havn't handled \""+t+'" in neutral yet, index '+this.place);this.afterItem(t)},w.prototype.output=function(){for(;this.place90&&i*l<-90&&r*l>180&&r*l<-180)return null;if(Math.abs(Math.abs(i)-a)<=s)return null;if(this.sphere)e=this.x0+this.a*this.k0*k(r-this.long0),n=this.y0+this.a*this.k0*Math.log(Math.tan(c+.5*i));else{var o=Math.sin(i),u=F(this.e,i,o);e=this.x0+this.a*this.k0*k(r-this.long0),n=this.y0-this.a*this.k0*Math.log(u)}return t.x=e,t.y=n,t},inverse:function(t){var e,n,r=t.x-this.x0,i=t.y-this.y0;if(this.sphere)n=a-2*Math.atan(Math.exp(-i/(this.a*this.k0)));else{var o=Math.exp(-i/(this.a*this.k0));if(-9999===(n=U(this.e,o)))return null}return e=k(this.long0+r/(this.a*this.k0)),t.x=e,t.y=n,t},names:["Mercator","Popular Visualisation Pseudo Mercator","Mercator_1SP","Mercator_Auxiliary_Sphere","merc"]};function j(t){return t}const G={init:function(){},forward:j,inverse:j,names:["longlat","identity"]};var W=n(5108),q=[B,G],H={},z=[];function V(t,e){var n=z.length;return t.names?(z[n]=t,t.names.forEach((function(t){H[t.toLowerCase()]=n})),this):(W.log(e),!0)}const X={start:function(){q.forEach(V)},add:V,get:function(t){if(!t)return!1;var e=t.toLowerCase();return void 0!==H[e]&&z[H[e]]?z[H[e]]:void 0}};var Y={MERIT:{a:6378137,rf:298.257,ellipseName:"MERIT 1983"},SGS85:{a:6378136,rf:298.257,ellipseName:"Soviet Geodetic System 85"},GRS80:{a:6378137,rf:298.257222101,ellipseName:"GRS 1980(IUGG, 1980)"},IAU76:{a:6378140,rf:298.257,ellipseName:"IAU 1976"},airy:{a:6377563.396,b:6356256.91,ellipseName:"Airy 1830"},APL4:{a:6378137,rf:298.25,ellipseName:"Appl. Physics. 1965"},NWL9D:{a:6378145,rf:298.25,ellipseName:"Naval Weapons Lab., 1965"},mod_airy:{a:6377340.189,b:6356034.446,ellipseName:"Modified Airy"},andrae:{a:6377104.43,rf:300,ellipseName:"Andrae 1876 (Den., Iclnd.)"},aust_SA:{a:6378160,rf:298.25,ellipseName:"Australian Natl & S. Amer. 1969"},GRS67:{a:6378160,rf:298.247167427,ellipseName:"GRS 67(IUGG 1967)"},bessel:{a:6377397.155,rf:299.1528128,ellipseName:"Bessel 1841"},bess_nam:{a:6377483.865,rf:299.1528128,ellipseName:"Bessel 1841 (Namibia)"},clrk66:{a:6378206.4,b:6356583.8,ellipseName:"Clarke 1866"},clrk80:{a:6378249.145,rf:293.4663,ellipseName:"Clarke 1880 mod."},clrk58:{a:6378293.645208759,rf:294.2606763692654,ellipseName:"Clarke 1858"},CPM:{a:6375738.7,rf:334.29,ellipseName:"Comm. des Poids et Mesures 1799"},delmbr:{a:6376428,rf:311.5,ellipseName:"Delambre 1810 (Belgium)"},engelis:{a:6378136.05,rf:298.2566,ellipseName:"Engelis 1985"},evrst30:{a:6377276.345,rf:300.8017,ellipseName:"Everest 1830"},evrst48:{a:6377304.063,rf:300.8017,ellipseName:"Everest 1948"},evrst56:{a:6377301.243,rf:300.8017,ellipseName:"Everest 1956"},evrst69:{a:6377295.664,rf:300.8017,ellipseName:"Everest 1969"},evrstSS:{a:6377298.556,rf:300.8017,ellipseName:"Everest (Sabah & Sarawak)"},fschr60:{a:6378166,rf:298.3,ellipseName:"Fischer (Mercury Datum) 1960"},fschr60m:{a:6378155,rf:298.3,ellipseName:"Fischer 1960"},fschr68:{a:6378150,rf:298.3,ellipseName:"Fischer 1968"},helmert:{a:6378200,rf:298.3,ellipseName:"Helmert 1906"},hough:{a:6378270,rf:297,ellipseName:"Hough"},intl:{a:6378388,rf:297,ellipseName:"International 1909 (Hayford)"},kaula:{a:6378163,rf:298.24,ellipseName:"Kaula 1961"},lerch:{a:6378139,rf:298.257,ellipseName:"Lerch 1979"},mprts:{a:6397300,rf:191,ellipseName:"Maupertius 1738"},new_intl:{a:6378157.5,b:6356772.2,ellipseName:"New International 1967"},plessis:{a:6376523,rf:6355863,ellipseName:"Plessis 1817 (France)"},krass:{a:6378245,rf:298.3,ellipseName:"Krassovsky, 1942"},SEasia:{a:6378155,b:6356773.3205,ellipseName:"Southeast Asia"},walbeck:{a:6376896,b:6355834.8467,ellipseName:"Walbeck"},WGS60:{a:6378165,rf:298.3,ellipseName:"WGS 60"},WGS66:{a:6378145,rf:298.25,ellipseName:"WGS 66"},WGS7:{a:6378135,rf:298.26,ellipseName:"WGS 72"}},Z=Y.WGS84={a:6378137,rf:298.257223563,ellipseName:"WGS 84"};Y.sphere={a:6370997,b:6370997,ellipseName:"Normal Sphere (r=6370997)"};var Q={wgs84:{towgs84:"0,0,0",ellipse:"WGS84",datumName:"WGS84"},ch1903:{towgs84:"674.374,15.056,405.346",ellipse:"bessel",datumName:"swiss"},ggrs87:{towgs84:"-199.87,74.79,246.62",ellipse:"GRS80",datumName:"Greek_Geodetic_Reference_System_1987"},nad83:{towgs84:"0,0,0",ellipse:"GRS80",datumName:"North_American_Datum_1983"},nad27:{nadgrids:"@conus,@alaska,@ntv2_0.gsb,@ntv1_can.dat",ellipse:"clrk66",datumName:"North_American_Datum_1927"},potsdam:{towgs84:"598.1,73.7,418.2,0.202,0.045,-2.455,6.7",ellipse:"bessel",datumName:"Potsdam Rauenberg 1950 DHDN"},carthage:{towgs84:"-263.0,6.0,431.0",ellipse:"clark80",datumName:"Carthage 1934 Tunisia"},hermannskogel:{towgs84:"577.326,90.129,463.919,5.137,1.474,5.297,2.4232",ellipse:"bessel",datumName:"Hermannskogel"},osni52:{towgs84:"482.530,-130.596,564.557,-1.042,-0.214,-0.631,8.15",ellipse:"airy",datumName:"Irish National"},ire65:{towgs84:"482.530,-130.596,564.557,-1.042,-0.214,-0.631,8.15",ellipse:"mod_airy",datumName:"Ireland 1965"},rassadiran:{towgs84:"-133.63,-157.5,-158.62",ellipse:"intl",datumName:"Rassadiran"},nzgd49:{towgs84:"59.47,-5.04,187.44,0.47,-0.1,1.024,-4.5993",ellipse:"intl",datumName:"New Zealand Geodetic Datum 1949"},osgb36:{towgs84:"446.448,-125.157,542.060,0.1502,0.2470,0.8421,-20.4894",ellipse:"airy",datumName:"Airy 1830"},s_jtsk:{towgs84:"589,76,480",ellipse:"bessel",datumName:"S-JTSK (Ferro)"},beduaram:{towgs84:"-106,-87,188",ellipse:"clrk80",datumName:"Beduaram"},gunung_segara:{towgs84:"-403,684,41",ellipse:"bessel",datumName:"Gunung Segara Jakarta"},rnb72:{towgs84:"106.869,-52.2978,103.724,-0.33657,0.456955,-1.84218,1",ellipse:"intl",datumName:"Reseau National Belge 1972"}};var K=n(5108),J={};function $(t){if(0===t.length)return null;var e="@"===t[0];return e&&(t=t.slice(1)),"null"===t?{name:"null",mandatory:!e,grid:null,isNull:!0}:{name:t,mandatory:!e,grid:J[t]||null,isNull:!1}}function tt(t){return t/3600*Math.PI/180}function et(t,e,n){return String.fromCharCode.apply(null,new Uint8Array(t.buffer.slice(e,n)))}function nt(t){return t.map((function(t){return[tt(t.longitudeShift),tt(t.latitudeShift)]}))}function rt(t,e,n){return{name:et(t,e+8,e+16).trim(),parent:et(t,e+24,e+24+8).trim(),lowerLatitude:t.getFloat64(e+72,n),upperLatitude:t.getFloat64(e+88,n),lowerLongitude:t.getFloat64(e+104,n),upperLongitude:t.getFloat64(e+120,n),latitudeInterval:t.getFloat64(e+136,n),longitudeInterval:t.getFloat64(e+152,n),gridNodeCount:t.getInt32(e+168,n)}}function it(t,e,n,r){for(var i=e+176,o=[],a=0;a-1}))}(t)){var e=S(t);if(function(t){var e=m(t,"authority");if(e){var n=m(e,"epsg");return n&&P.indexOf(n)>-1}}(e))return A["EPSG:3857"];var n=function(t){var e=m(t,"extension");if(e)return m(e,"proj4")}(e);return n?g(n):e}return function(t){return"+"===t[0]}(t)?g(t):void 0}(t);if("object"==typeof n){var r=ot.projections.get(n.projName);if(r){if(n.datumCode&&"none"!==n.datumCode){var i=m(Q,n.datumCode);i&&(n.datum_params=n.datum_params||(i.towgs84?i.towgs84.split(","):null),n.ellps=i.ellipse,n.datumName=i.datumName?i.datumName:n.datumCode)}n.k0=n.k0||1,n.axis=n.axis||"enu",n.ellps=n.ellps||"wgs84",n.lat1=n.lat1||n.lat0;var a,u,l,c,h,f,p=function(t,e,n,r,i){if(!t){var o=m(Y,r);o||(o=Z),t=o.a,e=o.b,n=o.rf}return n&&!e&&(e=(1-1/n)*t),(0===n||Math.abs(t-e)3&&(0===u.datum_params[3]&&0===u.datum_params[4]&&0===u.datum_params[5]&&0===u.datum_params[6]||(u.datum_type=2,u.datum_params[3]*=o,u.datum_params[4]*=o,u.datum_params[5]*=o,u.datum_params[6]=u.datum_params[6]/1e6+1))),s&&(u.datum_type=3,u.grids=s),u.a=n,u.b=r,u.es=i,u.ep2=a,u}(n.datumCode,n.datum_params,p.a,p.b,d.es,d.ep2,y);R(this,n),R(this,r),this.a=p.a,this.b=p.b,this.rf=p.rf,this.sphere=p.sphere,this.es=d.es,this.e=d.e,this.ep2=d.ep2,this.datum=_,this.init(),e(null,this)}else e(t)}else e(t)}ot.projections=X,ot.projections.start();const at=ot;function st(t,e,n){var r,i,o,s,u=t.x,l=t.y,c=t.z?t.z:0;if(l<-a&&l>-1.001*a)l=-a;else if(l>a&&l<1.001*a)l=a;else{if(l<-a)return{x:-1/0,y:-1/0,z:t.z};if(l>a)return{x:1/0,y:1/0,z:t.z}}return u>Math.PI&&(u-=2*Math.PI),i=Math.sin(l),s=Math.cos(l),o=i*i,{x:((r=n/Math.sqrt(1-e*o))+c)*s*Math.cos(u),y:(r+c)*s*Math.sin(u),z:(r*(1-e)+c)*i}}function ut(t,e,n,r){var i,o,a,s,u,l,c,h,f,p,d,y,m,g,_,b=t.x,v=t.y,T=t.z?t.z:0;if(i=Math.sqrt(b*b+v*v),o=Math.sqrt(b*b+v*v+T*T),i/n<1e-12){if(g=0,o/n<1e-12)return _=-r,{x:t.x,y:t.y,z:t.z}}else g=Math.atan2(v,b);a=T/o,h=(s=i/o)*(1-e)*(u=1/Math.sqrt(1-e*(2-e)*s*s)),f=a*u,m=0;do{m++,l=e*(c=n/Math.sqrt(1-e*f*f))/(c+(_=i*h+T*f-c*(1-e*f*f))),y=(d=a*(u=1/Math.sqrt(1-l*(2-l)*s*s)))*h-(p=s*(1-l)*u)*f,h=p,f=d}while(y*y>1e-24&&m<30);return{x:g,y:Math.atan(d/Math.abs(p)),z:_}}var lt=n(5108);function ct(t){return 1===t||2===t}function ht(t,e,n){if(null===t.grids||0===t.grids.length)return lt.log("Grid shift grids not found"),-1;for(var r={x:-n.x,y:n.y},i={x:Number.NaN,y:Number.NaN},o=[],a=0;ar.y||h>r.x||d1e-12&&Math.abs(a.y)>1e-12);if(u<0)return lt.log("Inverse grid shift iterator failed to converge."),r;r.x=k(o.x+n.ll[0]),r.y=o.y+n.ll[1]}else isNaN(o.x)||(r.x=t.x+o.x,r.y=t.y+o.y);return r}function pt(t,e){var n,r={x:t.x/e.del[0],y:t.y/e.del[1]},i=Math.floor(r.x),o=Math.floor(r.y),a=r.x-1*i,s=r.y-1*o,u={x:Number.NaN,y:Number.NaN};if(i<0||i>=e.lim[0])return u;if(o<0||o>=e.lim[1])return u;n=o*e.lim[0]+i;var l=e.cvs[n][0],c=e.cvs[n][1];n++;var h=e.cvs[n][0],f=e.cvs[n][1];n+=e.lim[0];var p=e.cvs[n][0],d=e.cvs[n][1];n--;var y=e.cvs[n][0],m=e.cvs[n][1],g=a*s,_=a*(1-s),b=(1-a)*(1-s),v=(1-a)*s;return u.x=b*l+_*h+v*y+g*p,u.y=b*c+_*f+v*m+g*d,u}function dt(t,e,n){var r,i,o,a=n.x,s=n.y,u=n.z||0,l={};for(o=0;o<3;o++)if(!e||2!==o||void 0!==n.z)switch(0===o?(r=a,i=-1!=="ew".indexOf(t.axis[o])?"x":"y"):1===o?(r=s,i=-1!=="ns".indexOf(t.axis[o])?"y":"x"):(r=u,i="z"),t.axis[o]){case"e":case"n":l[i]=r;break;case"w":case"s":l[i]=-r;break;case"u":void 0!==n[i]&&(l.z=r);break;case"d":void 0!==n[i]&&(l.z=-r);break;default:return null}return l}function yt(t){var e={x:t[0],y:t[1]};return t.length>2&&(e.z=t[2]),t.length>3&&(e.m=t[3]),e}function mt(t){if("function"==typeof Number.isFinite){if(Number.isFinite(t))return;throw new TypeError("coordinates must be finite numbers")}if("number"!=typeof t||t!=t||!isFinite(t))throw new TypeError("coordinates must be finite numbers")}function gt(t,e,n,o){var a;if(Array.isArray(n)&&(n=yt(n)),function(t){mt(t.x),mt(t.y)}(n),t.datum&&e.datum&&function(t,e){return(1===t.datum.datum_type||2===t.datum.datum_type)&&"WGS84"!==e.datumCode||(1===e.datum.datum_type||2===e.datum.datum_type)&&"WGS84"!==t.datumCode}(t,e)&&(n=gt(t,a=new at("WGS84"),n,o),t=a),o&&"enu"!==t.axis&&(n=dt(t,!1,n)),"longlat"===t.projName)n={x:n.x*u,y:n.y*u,z:n.z||0};else if(t.to_meter&&(n={x:n.x*t.to_meter,y:n.y*t.to_meter,z:n.z||0}),!(n=t.inverse(n)))return;if(t.from_greenwich&&(n.x+=t.from_greenwich),n=function(t,e,n){if(function(t,e){return t.datum_type===e.datum_type&&!(t.a!==e.a||Math.abs(t.es-e.es)>5e-11)&&(1===t.datum_type?t.datum_params[0]===e.datum_params[0]&&t.datum_params[1]===e.datum_params[1]&&t.datum_params[2]===e.datum_params[2]:2!==t.datum_type||t.datum_params[0]===e.datum_params[0]&&t.datum_params[1]===e.datum_params[1]&&t.datum_params[2]===e.datum_params[2]&&t.datum_params[3]===e.datum_params[3]&&t.datum_params[4]===e.datum_params[4]&&t.datum_params[5]===e.datum_params[5]&&t.datum_params[6]===e.datum_params[6])}(t,e))return n;if(5===t.datum_type||5===e.datum_type)return n;var o=t.a,a=t.es;if(3===t.datum_type){if(0!==ht(t,!1,n))return;o=r,a=i}var s=e.a,u=e.b,l=e.es;return 3===e.datum_type&&(s=r,u=6356752.314,l=i),a!==l||o!==s||ct(t.datum_type)||ct(e.datum_type)?(n=st(n,a,o),ct(t.datum_type)&&(n=function(t,e,n){if(1===e)return{x:t.x+n[0],y:t.y+n[1],z:t.z+n[2]};if(2===e){var r=n[0],i=n[1],o=n[2],a=n[3],s=n[4],u=n[5],l=n[6];return{x:l*(t.x-u*t.y+s*t.z)+r,y:l*(u*t.x+t.y-a*t.z)+i,z:l*(-s*t.x+a*t.y+t.z)+o}}}(n,t.datum_type,t.datum_params)),ct(e.datum_type)&&(n=function(t,e,n){if(1===e)return{x:t.x-n[0],y:t.y-n[1],z:t.z-n[2]};if(2===e){var r=n[0],i=n[1],o=n[2],a=n[3],s=n[4],u=n[5],l=n[6],c=(t.x-r)/l,h=(t.y-i)/l,f=(t.z-o)/l;return{x:c+u*h-s*f,y:-u*c+h+a*f,z:s*c-a*h+f}}}(n,e.datum_type,e.datum_params)),n=ut(n,l,s,u),3!==e.datum_type||0===ht(e,!0,n)?n:void 0):n}(t.datum,e.datum,n))return e.from_greenwich&&(n={x:n.x-e.from_greenwich,y:n.y,z:n.z||0}),"longlat"===e.projName?n={x:n.x*l,y:n.y*l,z:n.z||0}:(n=e.forward(n),e.to_meter&&(n={x:n.x/e.to_meter,y:n.y/e.to_meter,z:n.z||0})),o&&"enu"!==e.axis?dt(e,!0,n):n}var _t=at("WGS84");function bt(t,e,n,r){var i,o,a;return Array.isArray(n)?(i=gt(t,e,n,r)||{x:NaN,y:NaN},n.length>2?void 0!==t.name&&"geocent"===t.name||void 0!==e.name&&"geocent"===e.name?"number"==typeof i.z?[i.x,i.y,i.z].concat(n.splice(3)):[i.x,i.y,n[2]].concat(n.splice(3)):[i.x,i.y].concat(n.splice(2)):[i.x,i.y]):(o=gt(t,e,n,r),2===(a=Object.keys(n)).length||a.forEach((function(r){if(void 0!==t.name&&"geocent"===t.name||void 0!==e.name&&"geocent"===e.name){if("x"===r||"y"===r||"z"===r)return}else if("x"===r||"y"===r)return;o[r]=n[r]})),o)}function vt(t){return t instanceof at?t:t.oProj?t.oProj:at(t)}const Tt=function(t,e,n){t=vt(t);var r,i=!1;return void 0===e?(e=t,t=_t,i=!0):(void 0!==e.x||Array.isArray(e))&&(n=e,e=t,t=_t,i=!0),e=vt(e),n?bt(t,e,n):(r={forward:function(n,r){return bt(t,e,n,r)},inverse:function(n,r){return bt(e,t,n,r)}},i&&(r.oProj=e),r)};var Et="AJSAJS",wt="AFAFAF",xt=65,Ct=73,Mt=79;const St={forward:Nt,inverse:function(t){var e=Pt(Lt(t.toUpperCase()));return e.lat&&e.lon?[e.lon,e.lat,e.lon,e.lat]:[e.left,e.bottom,e.right,e.top]},toPoint:Ot};function Nt(t,e){return e=e||5,function(t,e){var n,r,i,o,a,s,u,l,c,h,f,p="00000"+t.easting,d="00000"+t.northing;return t.zoneNumber+t.zoneLetter+(c=t.easting,h=t.northing,f=Rt(t.zoneNumber),n=Math.floor(c/1e5),r=Math.floor(h/1e5)%20,o=Et.charCodeAt(i=f-1),a=wt.charCodeAt(i),l=!1,(s=o+n-1)>90&&(s=s-90+xt-1,l=!0),(s===Ct||oCt||(s>Ct||oMt||(s>Mt||o90&&(s=s-90+xt-1),(u=a+r)>86?(u=u-86+xt-1,l=!0):l=!1,(u===Ct||aCt||(u>Ct||aMt||(u>Mt||a86&&(u=u-86+xt-1),String.fromCharCode(s)+String.fromCharCode(u))+p.substr(p.length-5,e)+d.substr(d.length-5,e)}(function(t){var e,n,r,i,o,a,s,u=t.lat,l=t.lon,c=6378137,h=.00669438,f=.9996,p=At(u),d=At(l);s=Math.floor((l+180)/6)+1,180===l&&(s=60),u>=56&&u<64&&l>=3&&l<12&&(s=32),u>=72&&u<84&&(l>=0&&l<9?s=31:l>=9&&l<21?s=33:l>=21&&l<33?s=35:l>=33&&l<42&&(s=37)),a=At(6*(s-1)-180+3),e=.006739496752268451,n=c/Math.sqrt(1-h*Math.sin(p)*Math.sin(p)),r=Math.tan(p)*Math.tan(p),i=e*Math.cos(p)*Math.cos(p);var y,m,g=f*n*((o=Math.cos(p)*(d-a))+(1-r+i)*o*o*o/6+(5-18*r+r*r+72*i-58*e)*o*o*o*o*o/120)+5e5,_=f*(c*(.9983242984503243*p-.002514607064228144*Math.sin(2*p)+2639046602129982e-21*Math.sin(4*p)-3.418046101696858e-9*Math.sin(6*p))+n*Math.tan(p)*(o*o/2+(5-r+9*i+4*i*i)*o*o*o*o/24+(61-58*r+r*r+600*i-2.2240339282485886)*o*o*o*o*o*o/720));return u<0&&(_+=1e7),{northing:Math.round(_),easting:Math.round(g),zoneNumber:s,zoneLetter:(y=u,m="Z",84>=y&&y>=72?m="X":72>y&&y>=64?m="W":64>y&&y>=56?m="V":56>y&&y>=48?m="U":48>y&&y>=40?m="T":40>y&&y>=32?m="S":32>y&&y>=24?m="R":24>y&&y>=16?m="Q":16>y&&y>=8?m="P":8>y&&y>=0?m="N":0>y&&y>=-8?m="M":-8>y&&y>=-16?m="L":-16>y&&y>=-24?m="K":-24>y&&y>=-32?m="J":-32>y&&y>=-40?m="H":-40>y&&y>=-48?m="G":-48>y&&y>=-56?m="F":-56>y&&y>=-64?m="E":-64>y&&y>=-72?m="D":-72>y&&y>=-80&&(m="C"),m)}}({lat:t[1],lon:t[0]}),e)}function Ot(t){var e=Pt(Lt(t.toUpperCase()));return e.lat&&e.lon?[e.lon,e.lat]:[(e.left+e.right)/2,(e.top+e.bottom)/2]}function At(t){return t*(Math.PI/180)}function It(t){return t/Math.PI*180}function Pt(t){var e=t.northing,n=t.easting,r=t.zoneLetter,i=t.zoneNumber;if(i<0||i>60)return null;var o,a,s,u,l,c,h,f,p,d=.9996,y=6378137,m=.00669438,g=(1-Math.sqrt(.99330562))/(1+Math.sqrt(.99330562)),_=n-5e5,b=e;r<"N"&&(b-=1e7),h=6*(i-1)-180+3,o=.006739496752268451,p=(f=b/d/6367449.145945056)+(3*g/2-27*g*g*g/32)*Math.sin(2*f)+(21*g*g/16-55*g*g*g*g/32)*Math.sin(4*f)+151*g*g*g/96*Math.sin(6*f),a=y/Math.sqrt(1-m*Math.sin(p)*Math.sin(p)),s=Math.tan(p)*Math.tan(p),u=o*Math.cos(p)*Math.cos(p),l=.99330562*y/Math.pow(1-m*Math.sin(p)*Math.sin(p),1.5),c=_/(a*d);var v=p-a*Math.tan(p)/l*(c*c/2-(5+3*s+10*u-4*u*u-9*o)*c*c*c*c/24+(61+90*s+298*u+45*s*s-1.6983531815716497-3*u*u)*c*c*c*c*c*c/720);v=It(v);var T,E=(c-(1+2*s+u)*c*c*c/6+(5-2*u+28*s-3*u*u+8*o+24*s*s)*c*c*c*c*c/120)/Math.cos(p);if(E=h+It(E),t.accuracy){var w=Pt({northing:t.northing+t.accuracy,easting:t.easting+t.accuracy,zoneLetter:t.zoneLetter,zoneNumber:t.zoneNumber});T={top:w.lat,right:w.lon,bottom:v,left:E}}else T={lat:v,lon:E};return T}function Rt(t){var e=t%6;return 0===e&&(e=6),e}function Lt(t){if(t&&0===t.length)throw"MGRSPoint coverting from nothing";for(var e,n=t.length,r=null,i="",o=0;!/[A-Z]/.test(e=t.charAt(o));){if(o>=2)throw"MGRSPoint bad conversion from: "+t;i+=e,o++}var a=parseInt(i,10);if(0===o||o+3>n)throw"MGRSPoint bad conversion from: "+t;var s=t.charAt(o++);if(s<="A"||"B"===s||"Y"===s||s>="Z"||"I"===s||"O"===s)throw"MGRSPoint zone letter "+s+" not handled: "+t;r=t.substring(o,o+=2);for(var u=Rt(a),l=function(t,e){for(var n=Et.charCodeAt(e-1),r=1e5,i=!1;n!==t.charCodeAt(0);){if(++n===Ct&&n++,n===Mt&&n++,n>90){if(i)throw"Bad character: "+t;n=xt,i=!0}r+=1e5}return r}(r.charAt(0),u),c=function(t,e){if(t>"V")throw"MGRSPoint given invalid Northing "+t;for(var n=wt.charCodeAt(e-1),r=0,i=!1;n!==t.charCodeAt(0);){if(++n===Ct&&n++,n===Mt&&n++,n>86){if(i)throw"Bad character: "+t;n=xt,i=!0}r+=1e5}return r}(r.charAt(1),u);c0&&(f=1e5/Math.pow(10,y),p=t.substring(o,o+y),m=parseFloat(p)*f,d=t.substring(o+y),g=parseFloat(d)*f),{easting:m+l,northing:g+c,zoneLetter:s,zoneNumber:a,accuracy:f}}function Dt(t){var e;switch(t){case"C":e=11e5;break;case"D":e=2e6;break;case"E":e=28e5;break;case"F":e=37e5;break;case"G":e=46e5;break;case"H":e=55e5;break;case"J":e=64e5;break;case"K":e=73e5;break;case"L":e=82e5;break;case"M":e=91e5;break;case"N":e=0;break;case"P":e=8e5;break;case"Q":e=17e5;break;case"R":e=26e5;break;case"S":e=35e5;break;case"T":e=44e5;break;case"U":e=53e5;break;case"V":e=62e5;break;case"W":e=7e6;break;case"X":e=79e5;break;default:e=-1}if(e>=0)return e;throw"Invalid zone letter: "+t}var kt=n(5108);function Ft(t,e,n){if(!(this instanceof Ft))return new Ft(t,e,n);if(Array.isArray(t))this.x=t[0],this.y=t[1],this.z=t[2]||0;else if("object"==typeof t)this.x=t.x,this.y=t.y,this.z=t.z||0;else if("string"==typeof t&&void 0===e){var r=t.split(",");this.x=parseFloat(r[0],10),this.y=parseFloat(r[1],10),this.z=parseFloat(r[2],10)||0}else this.x=t,this.y=e,this.z=n||0;kt.warn("proj4.Point will be removed in version 3, use proj4.toPoint")}Ft.fromMGRS=function(t){return new Ft(Ot(t))},Ft.prototype.toMGRS=function(t){return Nt([this.x,this.y],t)};const Ut=Ft;var Bt=.046875,jt=.01953125,Gt=.01068115234375;function Wt(t){var e=[];e[0]=1-t*(.25+t*(Bt+t*(jt+t*Gt))),e[1]=t*(.75-t*(Bt+t*(jt+t*Gt)));var n=t*t;return e[2]=n*(.46875-t*(.013020833333333334+.007120768229166667*t)),n*=t,e[3]=n*(.3645833333333333-.005696614583333333*t),e[4]=n*t*.3076171875,e}function qt(t,e,n,r){return n*=e,e*=e,r[0]*t-n*(r[1]+e*(r[2]+e*(r[3]+e*r[4])))}function Ht(t,e,n){for(var r=1/(1-e),i=t,o=20;o;--o){var a=Math.sin(i),u=1-e*a*a;if(i-=u=(qt(i,a,Math.cos(i),n)-t)*(u*Math.sqrt(u))*r,Math.abs(u)s?Math.tan(o):0,y=Math.pow(d,2),m=Math.pow(y,2);e=1-this.es*Math.pow(u,2),c/=Math.sqrt(e);var g=qt(o,u,l,this.en);n=this.a*(this.k0*c*(1+h/6*(1-y+f+h/20*(5-18*y+m+14*f-58*y*f+h/42*(61+179*m-m*y-479*y)))))+this.x0,r=this.a*(this.k0*(g-this.ml0+u*a*c/2*(1+h/12*(5-y+9*f+4*p+h/30*(61+m-58*y+270*f-330*y*f+h/56*(1385+543*m-m*y-3111*y))))))+this.y0}else{var _=l*Math.sin(a);if(Math.abs(Math.abs(_)-1)=1){if(_-1>s)return 93;r=0}else r=Math.acos(r);o<0&&(r=-r),r=this.a*this.k0*(r-this.lat0)+this.y0}return t.x=n,t.y=r,t},inverse:function(t){var e,n,r,i,o=(t.x-this.x0)*(1/this.a),u=(t.y-this.y0)*(1/this.a);if(this.es)if(n=Ht(e=this.ml0+u/this.k0,this.es,this.en),Math.abs(n)s?Math.tan(n):0,f=this.ep2*Math.pow(c,2),p=Math.pow(f,2),d=Math.pow(h,2),y=Math.pow(d,2);e=1-this.es*Math.pow(l,2);var m=o*Math.sqrt(e)/this.k0,g=Math.pow(m,2);r=n-(e*=h)*g/(1-this.es)*.5*(1-g/12*(5+3*d-9*f*d+f-4*p-g/30*(61+90*d-252*f*d+45*y+46*f-g/56*(1385+3633*d+4095*y+1574*y*d)))),i=k(this.long0+m*(1-g/6*(1+2*d+f-g/20*(5+28*d+24*y+8*f*d+6*f-g/42*(61+662*d+1320*y+720*y*d))))/c)}else r=a*D(u),i=0;else{var _=Math.exp(o/this.k0),b=.5*(_-1/_),v=this.lat0+u/this.k0,T=Math.cos(v);e=Math.sqrt((1-Math.pow(T,2))/(1+Math.pow(b,2))),r=Math.asin(e),u<0&&(r=-r),i=0===b&&0===T?0:k(Math.atan2(b,T)+this.long0)}return t.x=i,t.y=r,t},names:["Fast_Transverse_Mercator","Fast Transverse Mercator"]};function Vt(t){var e=Math.exp(t);return(e-1/e)/2}function Xt(t,e){t=Math.abs(t),e=Math.abs(e);var n=Math.max(t,e),r=Math.min(t,e)/(n||1);return n*Math.sqrt(1+Math.pow(r,2))}function Yt(t,e){for(var n,r=2*Math.cos(2*e),i=t.length-1,o=t[i],a=0;--i>=0;)n=r*o-a+t[i],a=o,o=n;return e+n*Math.sin(2*e)}function Zt(t,e,n){for(var r,i,o=Math.sin(e),a=Math.cos(e),s=Vt(n),u=function(t){var e=Math.exp(t);return(e+1/e)/2}(n),l=2*a*u,c=-2*o*s,h=t.length-1,f=t[h],p=0,d=0,y=0;--h>=0;)r=d,i=p,f=l*(d=f)-r-c*(p=y)+t[h],y=c*d-i+l*p;return[(l=o*u)*f-(c=a*s)*y,l*y+c*f]}const Qt={init:function(){if(!this.approx&&(isNaN(this.es)||this.es<=0))throw new Error('Incorrect elliptical usage. Try using the +approx option in the proj string, or PROJECTION["Fast_Transverse_Mercator"] in the WKT.');this.approx&&(zt.init.apply(this),this.forward=zt.forward,this.inverse=zt.inverse),this.x0=void 0!==this.x0?this.x0:0,this.y0=void 0!==this.y0?this.y0:0,this.long0=void 0!==this.long0?this.long0:0,this.lat0=void 0!==this.lat0?this.lat0:0,this.cgb=[],this.cbg=[],this.utg=[],this.gtu=[];var t=this.es/(1+Math.sqrt(1-this.es)),e=t/(2-t),n=e;this.cgb[0]=e*(2+e*(-2/3+e*(e*(116/45+e*(26/45+e*(-2854/675)))-2))),this.cbg[0]=e*(e*(2/3+e*(4/3+e*(-82/45+e*(32/45+e*(4642/4725)))))-2),n*=e,this.cgb[1]=n*(7/3+e*(e*(-227/45+e*(2704/315+e*(2323/945)))-1.6)),this.cbg[1]=n*(5/3+e*(-16/15+e*(-13/9+e*(904/315+e*(-1522/945))))),n*=e,this.cgb[2]=n*(56/15+e*(-136/35+e*(-1262/105+e*(73814/2835)))),this.cbg[2]=n*(-26/15+e*(34/21+e*(1.6+e*(-12686/2835)))),n*=e,this.cgb[3]=n*(4279/630+e*(-332/35+e*(-399572/14175))),this.cbg[3]=n*(1237/630+e*(e*(-24832/14175)-2.4)),n*=e,this.cgb[4]=n*(4174/315+e*(-144838/6237)),this.cbg[4]=n*(-734/315+e*(109598/31185)),n*=e,this.cgb[5]=n*(601676/22275),this.cbg[5]=n*(444337/155925),n=Math.pow(e,2),this.Qn=this.k0/(1+e)*(1+n*(1/4+n*(1/64+n/256))),this.utg[0]=e*(e*(2/3+e*(-37/96+e*(1/360+e*(81/512+e*(-96199/604800)))))-.5),this.gtu[0]=e*(.5+e*(-2/3+e*(5/16+e*(41/180+e*(-127/288+e*(7891/37800)))))),this.utg[1]=n*(-1/48+e*(-1/15+e*(437/1440+e*(-46/105+e*(1118711/3870720))))),this.gtu[1]=n*(13/48+e*(e*(557/1440+e*(281/630+e*(-1983433/1935360)))-.6)),n*=e,this.utg[2]=n*(-17/480+e*(37/840+e*(209/4480+e*(-5569/90720)))),this.gtu[2]=n*(61/240+e*(-103/140+e*(15061/26880+e*(167603/181440)))),n*=e,this.utg[3]=n*(-4397/161280+e*(11/504+e*(830251/7257600))),this.gtu[3]=n*(49561/161280+e*(-179/168+e*(6601661/7257600))),n*=e,this.utg[4]=n*(-4583/161280+e*(108847/3991680)),this.gtu[4]=n*(34729/80640+e*(-3418889/1995840)),n*=e,this.utg[5]=n*(-20648693/638668800),this.gtu[5]=.6650675310896665*n;var r=Yt(this.cbg,this.lat0);this.Zb=-this.Qn*(r+function(t,e){for(var n,r=2*Math.cos(e),i=t.length-1,o=t[i],a=0;--i>=0;)n=r*o-a+t[i],a=o,o=n;return Math.sin(e)*n}(this.gtu,2*r))},forward:function(t){var e=k(t.x-this.long0),n=t.y;n=Yt(this.cbg,n);var r=Math.sin(n),i=Math.cos(n),o=Math.sin(e),a=Math.cos(e);n=Math.atan2(r,a*i),e=Math.atan2(o*i,Xt(r,i*a)),e=function(t){var e=Math.abs(t);return e=function(t){var e=1+t,n=e-1;return 0===n?t:t*Math.log(e)/n}(e*(1+e/(Xt(1,e)+1))),t<0?-e:e}(Math.tan(e));var s,u,l=Zt(this.gtu,2*n,2*e);return n+=l[0],e+=l[1],Math.abs(e)<=2.623395162778?(s=this.a*(this.Qn*e)+this.x0,u=this.a*(this.Qn*n+this.Zb)+this.y0):(s=1/0,u=1/0),t.x=s,t.y=u,t},inverse:function(t){var e,n,r=(t.x-this.x0)*(1/this.a),i=(t.y-this.y0)*(1/this.a);if(i=(i-this.Zb)/this.Qn,r/=this.Qn,Math.abs(r)<=2.623395162778){var o=Zt(this.utg,2*i,2*r);i+=o[0],r+=o[1],r=Math.atan(Vt(r));var a=Math.sin(i),s=Math.cos(i),u=Math.sin(r),l=Math.cos(r);i=Math.atan2(a*l,Xt(u,l*s)),e=k((r=Math.atan2(u,l*s))+this.long0),n=Yt(this.cgb,i)}else e=1/0,n=1/0;return t.x=e,t.y=n,t},names:["Extended_Transverse_Mercator","Extended Transverse Mercator","etmerc","Transverse_Mercator","Transverse Mercator","tmerc"]},Kt={init:function(){var t=function(t,e){if(void 0===t){if((t=Math.floor(30*(k(e)+Math.PI)/Math.PI)+1)<0)return 0;if(t>60)return 60}return t}(this.zone,this.long0);if(void 0===t)throw new Error("unknown utm zone");this.lat0=0,this.long0=(6*Math.abs(t)-183)*u,this.x0=5e5,this.y0=this.utmSouth?1e7:0,this.k0=.9996,Qt.init.apply(this),this.forward=Qt.forward,this.inverse=Qt.inverse},names:["Universal Transverse Mercator System","utm"],dependsOn:"etmerc"};function Jt(t,e){return Math.pow((1-t)/(1+t),e)}const $t={init:function(){var t=Math.sin(this.lat0),e=Math.cos(this.lat0);e*=e,this.rc=Math.sqrt(1-this.es)/(1-this.es*t*t),this.C=Math.sqrt(1+this.es*e*e/(1-this.es)),this.phic0=Math.asin(t/this.C),this.ratexp=.5*this.C*this.e,this.K=Math.tan(.5*this.phic0+c)/(Math.pow(Math.tan(.5*this.lat0+c),this.C)*Jt(this.e*t,this.ratexp))},forward:function(t){var e=t.x,n=t.y;return t.y=2*Math.atan(this.K*Math.pow(Math.tan(.5*n+c),this.C)*Jt(this.e*Math.sin(n),this.ratexp))-a,t.x=this.C*e,t},inverse:function(t){for(var e=t.x/this.C,n=t.y,r=Math.pow(Math.tan(.5*n+c)/this.K,1/this.C),i=20;i>0&&(n=2*Math.atan(r*Jt(this.e*Math.sin(t.y),-.5*this.e))-a,!(Math.abs(n-t.y)<1e-14));--i)t.y=n;return i?(t.x=e,t.y=n,t):null},names:["gauss"]},te={init:function(){$t.init.apply(this),this.rc&&(this.sinc0=Math.sin(this.phic0),this.cosc0=Math.cos(this.phic0),this.R2=2*this.rc,this.title||(this.title="Oblique Stereographic Alternative"))},forward:function(t){var e,n,r,i;return t.x=k(t.x-this.long0),$t.forward.apply(this,[t]),e=Math.sin(t.y),n=Math.cos(t.y),r=Math.cos(t.x),i=this.k0*this.R2/(1+this.sinc0*e+this.cosc0*n*r),t.x=i*n*Math.sin(t.x),t.y=i*(this.cosc0*e-this.sinc0*n*r),t.x=this.a*t.x+this.x0,t.y=this.a*t.y+this.y0,t},inverse:function(t){var e,n,r,i,o;if(t.x=(t.x-this.x0)/this.a,t.y=(t.y-this.y0)/this.a,t.x/=this.k0,t.y/=this.k0,o=Math.sqrt(t.x*t.x+t.y*t.y)){var a=2*Math.atan2(o,this.R2);e=Math.sin(a),n=Math.cos(a),i=Math.asin(n*this.sinc0+t.y*e*this.cosc0/o),r=Math.atan2(t.x*e,o*this.cosc0*n-t.y*this.sinc0*e)}else i=this.phic0,r=0;return t.x=r,t.y=i,$t.inverse.apply(this,[t]),t.x=k(t.x+this.long0),t},names:["Stereographic_North_Pole","Oblique_Stereographic","Polar_Stereographic","sterea","Oblique Stereographic Alternative","Double_Stereographic"]},ee={init:function(){this.coslat0=Math.cos(this.lat0),this.sinlat0=Math.sin(this.lat0),this.sphere?1===this.k0&&!isNaN(this.lat_ts)&&Math.abs(this.coslat0)<=s&&(this.k0=.5*(1+D(this.lat0)*Math.sin(this.lat_ts))):(Math.abs(this.coslat0)<=s&&(this.lat0>0?this.con=1:this.con=-1),this.cons=Math.sqrt(Math.pow(1+this.e,1+this.e)*Math.pow(1-this.e,1-this.e)),1===this.k0&&!isNaN(this.lat_ts)&&Math.abs(this.coslat0)<=s&&(this.k0=.5*this.cons*L(this.e,Math.sin(this.lat_ts),Math.cos(this.lat_ts))/F(this.e,this.con*this.lat_ts,this.con*Math.sin(this.lat_ts))),this.ms1=L(this.e,this.sinlat0,this.coslat0),this.X0=2*Math.atan(this.ssfn_(this.lat0,this.sinlat0,this.e))-a,this.cosX0=Math.cos(this.X0),this.sinX0=Math.sin(this.X0))},forward:function(t){var e,n,r,i,o,u,l=t.x,c=t.y,h=Math.sin(c),f=Math.cos(c),p=k(l-this.long0);return Math.abs(Math.abs(l-this.long0)-Math.PI)<=s&&Math.abs(c+this.lat0)<=s?(t.x=NaN,t.y=NaN,t):this.sphere?(e=2*this.k0/(1+this.sinlat0*h+this.coslat0*f*Math.cos(p)),t.x=this.a*e*f*Math.sin(p)+this.x0,t.y=this.a*e*(this.coslat0*h-this.sinlat0*f*Math.cos(p))+this.y0,t):(n=2*Math.atan(this.ssfn_(c,h,this.e))-a,i=Math.cos(n),r=Math.sin(n),Math.abs(this.coslat0)<=s?(o=F(this.e,c*this.con,this.con*h),u=2*this.a*this.k0*o/this.cons,t.x=this.x0+u*Math.sin(l-this.long0),t.y=this.y0-this.con*u*Math.cos(l-this.long0),t):(Math.abs(this.sinlat0)0?k(this.long0+Math.atan2(t.x,-1*t.y)):k(this.long0+Math.atan2(t.x,t.y)):k(this.long0+Math.atan2(t.x*Math.sin(l),u*this.coslat0*Math.cos(l)-t.y*this.sinlat0*Math.sin(l))),t.x=e,t.y=n,t)}if(Math.abs(this.coslat0)<=s){if(u<=s)return n=this.lat0,e=this.long0,t.x=e,t.y=n,t;t.x*=this.con,t.y*=this.con,r=u*this.cons/(2*this.a*this.k0),n=this.con*U(this.e,r),e=this.con*k(this.con*this.long0+Math.atan2(t.x,-1*t.y))}else i=2*Math.atan(u*this.cosX0/(2*this.a*this.k0*this.ms1)),e=this.long0,u<=s?o=this.X0:(o=Math.asin(Math.cos(i)*this.sinX0+t.y*Math.sin(i)*this.cosX0/u),e=k(this.long0+Math.atan2(t.x*Math.sin(i),u*this.cosX0*Math.cos(i)-t.y*this.sinX0*Math.sin(i)))),n=-1*U(this.e,Math.tan(.5*(a+o)));return t.x=e,t.y=n,t},names:["stere","Stereographic_South_Pole","Polar Stereographic (variant B)"],ssfn_:function(t,e,n){return e*=n,Math.tan(.5*(a+t))*Math.pow((1-e)/(1+e),.5*n)}},ne={init:function(){var t=this.lat0;this.lambda0=this.long0;var e=Math.sin(t),n=this.a,r=1/this.rf,i=2*r-Math.pow(r,2),o=this.e=Math.sqrt(i);this.R=this.k0*n*Math.sqrt(1-i)/(1-i*Math.pow(e,2)),this.alpha=Math.sqrt(1+i/(1-i)*Math.pow(Math.cos(t),4)),this.b0=Math.asin(e/this.alpha);var a=Math.log(Math.tan(Math.PI/4+this.b0/2)),s=Math.log(Math.tan(Math.PI/4+t/2)),u=Math.log((1+o*e)/(1-o*e));this.K=a-this.alpha*s+this.alpha*o/2*u},forward:function(t){var e=Math.log(Math.tan(Math.PI/4-t.y/2)),n=this.e/2*Math.log((1+this.e*Math.sin(t.y))/(1-this.e*Math.sin(t.y))),r=-this.alpha*(e+n)+this.K,i=2*(Math.atan(Math.exp(r))-Math.PI/4),o=this.alpha*(t.x-this.lambda0),a=Math.atan(Math.sin(o)/(Math.sin(this.b0)*Math.tan(i)+Math.cos(this.b0)*Math.cos(o))),s=Math.asin(Math.cos(this.b0)*Math.sin(i)-Math.sin(this.b0)*Math.cos(i)*Math.cos(o));return t.y=this.R/2*Math.log((1+Math.sin(s))/(1-Math.sin(s)))+this.y0,t.x=this.R*a+this.x0,t},inverse:function(t){for(var e=t.x-this.x0,n=t.y-this.y0,r=e/this.R,i=2*(Math.atan(Math.exp(n/this.R))-Math.PI/4),o=Math.asin(Math.cos(this.b0)*Math.sin(i)+Math.sin(this.b0)*Math.cos(i)*Math.cos(r)),a=Math.atan(Math.sin(r)/(Math.cos(this.b0)*Math.cos(r)-Math.sin(this.b0)*Math.tan(i))),s=this.lambda0+a/this.alpha,u=0,l=o,c=-1e3,h=0;Math.abs(l-c)>1e-7;){if(++h>20)return;u=1/this.alpha*(Math.log(Math.tan(Math.PI/4+o/2))-this.K)+this.e*Math.log(Math.tan(Math.PI/4+Math.asin(this.e*Math.sin(l))/2)),c=l,l=2*Math.atan(Math.exp(u))-Math.PI/2}return t.x=s,t.y=l,t},names:["somerc"]};var re=1e-7;const ie={init:function(){var t,e,n,r,i,o,l,f,p,d,y,m,g,_=0,b=0,v=0,T=0,E=0,w=0,x=0;this.no_off=(g="object"==typeof(m=this).PROJECTION?Object.keys(m.PROJECTION)[0]:m.PROJECTION,"no_uoff"in m||"no_off"in m||-1!==["Hotine_Oblique_Mercator","Hotine_Oblique_Mercator_Azimuth_Natural_Origin"].indexOf(g)),this.no_rot="no_rot"in this;var C=!1;"alpha"in this&&(C=!0);var M=!1;if("rectified_grid_angle"in this&&(M=!0),C&&(x=this.alpha),M&&(_=this.rectified_grid_angle*u),C||M)b=this.longc;else if(v=this.long1,E=this.lat1,T=this.long2,w=this.lat2,Math.abs(E-w)<=re||(t=Math.abs(E))<=re||Math.abs(t-a)<=re||Math.abs(Math.abs(this.lat0)-a)<=re||Math.abs(Math.abs(w)-a)<=re)throw new Error;var S=1-this.es;e=Math.sqrt(S),Math.abs(this.lat0)>s?(f=Math.sin(this.lat0),n=Math.cos(this.lat0),t=1-this.es*f*f,this.B=n*n,this.B=Math.sqrt(1+this.es*this.B*this.B/S),this.A=this.B*this.k0*e/t,(i=(r=this.B*e/(n*Math.sqrt(t)))*r-1)<=0?i=0:(i=Math.sqrt(i),this.lat0<0&&(i=-i)),this.E=i+=r,this.E*=Math.pow(F(this.e,this.lat0,f),this.B)):(this.B=1/e,this.A=this.k0,this.E=r=i=1),C||M?(C?(y=Math.asin(Math.sin(x)/r),M||(_=x)):(y=_,x=Math.asin(r*Math.sin(y))),this.lam0=b-Math.asin(.5*(i-1/i)*Math.tan(y))/this.B):(o=Math.pow(F(this.e,E,Math.sin(E)),this.B),l=Math.pow(F(this.e,w,Math.sin(w)),this.B),i=this.E/o,p=(l-o)/(l+o),d=((d=this.E*this.E)-l*o)/(d+l*o),(t=v-T)<-Math.pi?T-=h:t>Math.pi&&(T+=h),this.lam0=k(.5*(v+T)-Math.atan(d*Math.tan(.5*this.B*(v-T))/p)/this.B),y=Math.atan(2*Math.sin(this.B*k(v-this.lam0))/(i-1/i)),_=x=Math.asin(r*Math.sin(y))),this.singam=Math.sin(y),this.cosgam=Math.cos(y),this.sinrot=Math.sin(_),this.cosrot=Math.cos(_),this.rB=1/this.B,this.ArB=this.A*this.rB,this.BrA=1/this.ArB,this.A,this.B,this.no_off?this.u_0=0:(this.u_0=Math.abs(this.ArB*Math.atan(Math.sqrt(r*r-1)/Math.cos(x))),this.lat0<0&&(this.u_0=-this.u_0)),i=.5*y,this.v_pole_n=this.ArB*Math.log(Math.tan(c-i)),this.v_pole_s=this.ArB*Math.log(Math.tan(c+i))},forward:function(t){var e,n,r,i,o,u,l,c,h={};if(t.x=t.x-this.lam0,Math.abs(Math.abs(t.y)-a)>s){if(e=.5*((o=this.E/Math.pow(F(this.e,t.y,Math.sin(t.y)),this.B))-(u=1/o)),n=.5*(o+u),i=Math.sin(this.B*t.x),r=(e*this.singam-i*this.cosgam)/n,Math.abs(Math.abs(r)-1)0?this.v_pole_n:this.v_pole_s,l=this.ArB*t.y;return this.no_rot?(h.x=l,h.y=c):(l-=this.u_0,h.x=c*this.cosrot+l*this.sinrot,h.y=l*this.cosrot-c*this.sinrot),h.x=this.a*h.x+this.x0,h.y=this.a*h.y+this.y0,h},inverse:function(t){var e,n,r,i,o,u,l,c={};if(t.x=(t.x-this.x0)*(1/this.a),t.y=(t.y-this.y0)*(1/this.a),this.no_rot?(n=t.y,e=t.x):(n=t.x*this.cosrot-t.y*this.sinrot,e=t.y*this.cosrot+t.x*this.sinrot+this.u_0),i=.5*((r=Math.exp(-this.BrA*n))-1/r),o=.5*(r+1/r),l=((u=Math.sin(this.BrA*e))*this.cosgam+i*this.singam)/o,Math.abs(Math.abs(l)-1)s?this.ns=Math.log(r/u)/Math.log(i/l):this.ns=e,isNaN(this.ns)&&(this.ns=e),this.f0=r/(this.ns*Math.pow(i,this.ns)),this.rh=this.a*this.f0*Math.pow(c,this.ns),this.title||(this.title="Lambert Conformal Conic")}},forward:function(t){var e=t.x,n=t.y;Math.abs(2*Math.abs(n)-Math.PI)<=s&&(n=D(n)*(a-2e-10));var r,i,o=Math.abs(Math.abs(n)-a);if(o>s)r=F(this.e,n,Math.sin(n)),i=this.a*this.f0*Math.pow(r,this.ns);else{if((o=n*this.ns)<=0)return null;i=0}var u=this.ns*k(e-this.long0);return t.x=this.k0*(i*Math.sin(u))+this.x0,t.y=this.k0*(this.rh-i*Math.cos(u))+this.y0,t},inverse:function(t){var e,n,r,i,o,s=(t.x-this.x0)/this.k0,u=this.rh-(t.y-this.y0)/this.k0;this.ns>0?(e=Math.sqrt(s*s+u*u),n=1):(e=-Math.sqrt(s*s+u*u),n=-1);var l=0;if(0!==e&&(l=Math.atan2(n*s,n*u)),0!==e||this.ns>0){if(n=1/this.ns,r=Math.pow(e/(this.a*this.f0),n),-9999===(i=U(this.e,r)))return null}else i=-a;return o=k(l/this.ns+this.long0),t.x=o,t.y=i,t},names:["Lambert Tangential Conformal Conic Projection","Lambert_Conformal_Conic","Lambert_Conformal_Conic_1SP","Lambert_Conformal_Conic_2SP","lcc","Lambert Conic Conformal (1SP)","Lambert Conic Conformal (2SP)"]},ae={init:function(){this.a=6377397.155,this.es=.006674372230614,this.e=Math.sqrt(this.es),this.lat0||(this.lat0=.863937979737193),this.long0||(this.long0=.4334234309119251),this.k0||(this.k0=.9999),this.s45=.785398163397448,this.s90=2*this.s45,this.fi0=this.lat0,this.e2=this.es,this.e=Math.sqrt(this.e2),this.alfa=Math.sqrt(1+this.e2*Math.pow(Math.cos(this.fi0),4)/(1-this.e2)),this.uq=1.04216856380474,this.u0=Math.asin(Math.sin(this.fi0)/this.alfa),this.g=Math.pow((1+this.e*Math.sin(this.fi0))/(1-this.e*Math.sin(this.fi0)),this.alfa*this.e/2),this.k=Math.tan(this.u0/2+this.s45)/Math.pow(Math.tan(this.fi0/2+this.s45),this.alfa)*this.g,this.k1=this.k0,this.n0=this.a*Math.sqrt(1-this.e2)/(1-this.e2*Math.pow(Math.sin(this.fi0),2)),this.s0=1.37008346281555,this.n=Math.sin(this.s0),this.ro0=this.k1*this.n0/Math.tan(this.s0),this.ad=this.s90-this.uq},forward:function(t){var e,n,r,i,o,a,s,u=t.x,l=t.y,c=k(u-this.long0);return e=Math.pow((1+this.e*Math.sin(l))/(1-this.e*Math.sin(l)),this.alfa*this.e/2),n=2*(Math.atan(this.k*Math.pow(Math.tan(l/2+this.s45),this.alfa)/e)-this.s45),r=-c*this.alfa,i=Math.asin(Math.cos(this.ad)*Math.sin(n)+Math.sin(this.ad)*Math.cos(n)*Math.cos(r)),o=Math.asin(Math.cos(n)*Math.sin(r)/Math.cos(i)),a=this.n*o,s=this.ro0*Math.pow(Math.tan(this.s0/2+this.s45),this.n)/Math.pow(Math.tan(i/2+this.s45),this.n),t.y=s*Math.cos(a)/1,t.x=s*Math.sin(a)/1,this.czech||(t.y*=-1,t.x*=-1),t},inverse:function(t){var e,n,r,i,o,a,s,u=t.x;t.x=t.y,t.y=u,this.czech||(t.y*=-1,t.x*=-1),o=Math.sqrt(t.x*t.x+t.y*t.y),i=Math.atan2(t.y,t.x)/Math.sin(this.s0),r=2*(Math.atan(Math.pow(this.ro0/o,1/this.n)*Math.tan(this.s0/2+this.s45))-this.s45),e=Math.asin(Math.cos(this.ad)*Math.sin(r)-Math.sin(this.ad)*Math.cos(r)*Math.cos(i)),n=Math.asin(Math.cos(r)*Math.sin(i)/Math.cos(e)),t.x=this.long0-n/this.alfa,a=e,s=0;var l=0;do{t.y=2*(Math.atan(Math.pow(this.k,-1/this.alfa)*Math.pow(Math.tan(e/2+this.s45),1/this.alfa)*Math.pow((1+this.e*Math.sin(a))/(1-this.e*Math.sin(a)),this.e/2))-this.s45),Math.abs(a-t.y)<1e-10&&(s=1),a=t.y,l+=1}while(0===s&&l<15);return l>=15?null:t},names:["Krovak","krovak"]};function se(t,e,n,r,i){return t*i-e*Math.sin(2*i)+n*Math.sin(4*i)-r*Math.sin(6*i)}function ue(t){return 1-.25*t*(1+t/16*(3+1.25*t))}function le(t){return.375*t*(1+.25*t*(1+.46875*t))}function ce(t){return.05859375*t*t*(1+.75*t)}function he(t){return t*t*t*(35/3072)}function fe(t,e,n){var r=e*n;return t/Math.sqrt(1-r*r)}function pe(t){return Math.abs(t)1e-7?(1-t*t)*(e/(1-(n=t*e)*n)-.5/t*Math.log((1-n)/(1+n))):2*e}const ge={init:function(){var t,e=Math.abs(this.lat0);if(Math.abs(e-a)0)switch(this.qp=me(this.e,1),this.mmf=.5/(1-this.es),this.apa=function(t){var e,n=[];return n[0]=.3333333333333333*t,e=t*t,n[0]+=.17222222222222222*e,n[1]=.06388888888888888*e,e*=t,n[0]+=.10257936507936508*e,n[1]+=.0664021164021164*e,n[2]=.016415012942191543*e,n}(this.es),this.mode){case this.N_POLE:case this.S_POLE:this.dd=1;break;case this.EQUIT:this.rq=Math.sqrt(.5*this.qp),this.dd=1/this.rq,this.xmf=1,this.ymf=.5*this.qp;break;case this.OBLIQ:this.rq=Math.sqrt(.5*this.qp),t=Math.sin(this.lat0),this.sinb1=me(this.e,t)/this.qp,this.cosb1=Math.sqrt(1-this.sinb1*this.sinb1),this.dd=Math.cos(this.lat0)/(Math.sqrt(1-this.es*t*t)*this.rq*this.cosb1),this.ymf=(this.xmf=this.rq)/this.dd,this.xmf*=this.dd}else this.mode===this.OBLIQ&&(this.sinph0=Math.sin(this.lat0),this.cosph0=Math.cos(this.lat0))},forward:function(t){var e,n,r,i,o,u,l,h,f,p,d=t.x,y=t.y;if(d=k(d-this.long0),this.sphere){if(o=Math.sin(y),p=Math.cos(y),r=Math.cos(d),this.mode===this.OBLIQ||this.mode===this.EQUIT){if((n=this.mode===this.EQUIT?1+p*r:1+this.sinph0*o+this.cosph0*p*r)<=s)return null;e=(n=Math.sqrt(2/n))*p*Math.sin(d),n*=this.mode===this.EQUIT?o:this.cosph0*o-this.sinph0*p*r}else if(this.mode===this.N_POLE||this.mode===this.S_POLE){if(this.mode===this.N_POLE&&(r=-r),Math.abs(y+this.lat0)=0?(e=(f=Math.sqrt(u))*i,n=r*(this.mode===this.S_POLE?f:-f)):e=n=0}}return t.x=this.a*e+this.x0,t.y=this.a*n+this.y0,t},inverse:function(t){t.x-=this.x0,t.y-=this.y0;var e,n,r,i,o,u,l,c,h,f,p=t.x/this.a,d=t.y/this.a;if(this.sphere){var y,m=0,g=0;if((n=.5*(y=Math.sqrt(p*p+d*d)))>1)return null;switch(n=2*Math.asin(n),this.mode!==this.OBLIQ&&this.mode!==this.EQUIT||(g=Math.sin(n),m=Math.cos(n)),this.mode){case this.EQUIT:n=Math.abs(y)<=s?0:Math.asin(d*g/y),p*=g,d=m*y;break;case this.OBLIQ:n=Math.abs(y)<=s?this.lat0:Math.asin(m*this.sinph0+d*g*this.cosph0/y),p*=g*this.cosph0,d=(m-Math.sin(n)*this.sinph0)*y;break;case this.N_POLE:d=-d,n=a-n;break;case this.S_POLE:n-=a}e=0!==d||this.mode!==this.EQUIT&&this.mode!==this.OBLIQ?Math.atan2(p,d):0}else{if(l=0,this.mode===this.OBLIQ||this.mode===this.EQUIT){if(p/=this.dd,d*=this.dd,(u=Math.sqrt(p*p+d*d))1&&(t=t>1?1:-1),Math.asin(t)}const be={init:function(){Math.abs(this.lat1+this.lat2)s?this.ns0=(this.ms1*this.ms1-this.ms2*this.ms2)/(this.qs2-this.qs1):this.ns0=this.con,this.c=this.ms1*this.ms1+this.ns0*this.qs1,this.rh=this.a*Math.sqrt(this.c-this.ns0*this.qs0)/this.ns0)},forward:function(t){var e=t.x,n=t.y;this.sin_phi=Math.sin(n),this.cos_phi=Math.cos(n);var r=me(this.e3,this.sin_phi,this.cos_phi),i=this.a*Math.sqrt(this.c-this.ns0*r)/this.ns0,o=this.ns0*k(e-this.long0),a=i*Math.sin(o)+this.x0,s=this.rh-i*Math.cos(o)+this.y0;return t.x=a,t.y=s,t},inverse:function(t){var e,n,r,i,o,a;return t.x-=this.x0,t.y=this.rh-t.y+this.y0,this.ns0>=0?(e=Math.sqrt(t.x*t.x+t.y*t.y),r=1):(e=-Math.sqrt(t.x*t.x+t.y*t.y),r=-1),i=0,0!==e&&(i=Math.atan2(r*t.x,r*t.y)),r=e*this.ns0/this.a,this.sphere?a=Math.asin((this.c-r*r)/(2*this.ns0)):(n=(this.c-r*r)/this.ns0,a=this.phi1z(this.e3,n)),o=k(i/this.ns0+this.long0),t.x=o,t.y=a,t},names:["Albers_Conic_Equal_Area","Albers","aea"],phi1z:function(t,e){var n,r,i,o,a=_e(.5*e);if(t0||Math.abs(o)<=s?(a=this.x0+1*this.a*n*Math.sin(r)/o,u=this.y0+1*this.a*(this.cos_p14*e-this.sin_p14*n*i)/o):(a=this.x0+this.infinity_dist*n*Math.sin(r),u=this.y0+this.infinity_dist*(this.cos_p14*e-this.sin_p14*n*i)),t.x=a,t.y=u,t},inverse:function(t){var e,n,r,i,o,a;return t.x=(t.x-this.x0)/this.a,t.y=(t.y-this.y0)/this.a,t.x/=this.k0,t.y/=this.k0,(e=Math.sqrt(t.x*t.x+t.y*t.y))?(i=Math.atan2(e,this.rc),n=Math.sin(i),a=_e((r=Math.cos(i))*this.sin_p14+t.y*n*this.cos_p14/e),o=Math.atan2(t.x*n,e*this.cos_p14*r-t.y*this.sin_p14*n),o=k(this.long0+o)):(a=this.phic0,o=0),t.x=o,t.y=a,t},names:["gnom"]},Te={init:function(){this.sphere||(this.k0=L(this.e,Math.sin(this.lat_ts),Math.cos(this.lat_ts)))},forward:function(t){var e,n,r=t.x,i=t.y,o=k(r-this.long0);if(this.sphere)e=this.x0+this.a*o*Math.cos(this.lat_ts),n=this.y0+this.a*Math.sin(i)/Math.cos(this.lat_ts);else{var a=me(this.e,Math.sin(i));e=this.x0+this.a*this.k0*o,n=this.y0+this.a*a*.5/this.k0}return t.x=e,t.y=n,t},inverse:function(t){var e,n;return t.x-=this.x0,t.y-=this.y0,this.sphere?(e=k(this.long0+t.x/this.a/Math.cos(this.lat_ts)),n=Math.asin(t.y/this.a*Math.cos(this.lat_ts))):(n=function(t,e){var n=1-(1-t*t)/(2*t)*Math.log((1-t)/(1+t));if(Math.abs(Math.abs(e)-n)<1e-6)return e<0?-1*a:a;for(var r,i,o,s,u=Math.asin(.5*e),l=0;l<30;l++)if(i=Math.sin(u),o=Math.cos(u),s=t*i,u+=r=Math.pow(1-s*s,2)/(2*o)*(e/(1-t*t)-i/(1-s*s)+.5/t*Math.log((1-s)/(1+s))),Math.abs(r)<=1e-10)return u;return NaN}(this.e,2*t.y*this.k0/this.a),e=k(this.long0+t.x/(this.a*this.k0))),t.x=e,t.y=n,t},names:["cea"]},Ee={init:function(){this.x0=this.x0||0,this.y0=this.y0||0,this.lat0=this.lat0||0,this.long0=this.long0||0,this.lat_ts=this.lat_ts||0,this.title=this.title||"Equidistant Cylindrical (Plate Carre)",this.rc=Math.cos(this.lat_ts)},forward:function(t){var e=t.x,n=t.y,r=k(e-this.long0),i=pe(n-this.lat0);return t.x=this.x0+this.a*r*this.rc,t.y=this.y0+this.a*i,t},inverse:function(t){var e=t.x,n=t.y;return t.x=k(this.long0+(e-this.x0)/(this.a*this.rc)),t.y=pe(this.lat0+(n-this.y0)/this.a),t},names:["Equirectangular","Equidistant_Cylindrical","eqc"]},we={init:function(){this.temp=this.b/this.a,this.es=1-Math.pow(this.temp,2),this.e=Math.sqrt(this.es),this.e0=ue(this.es),this.e1=le(this.es),this.e2=ce(this.es),this.e3=he(this.es),this.ml0=this.a*se(this.e0,this.e1,this.e2,this.e3,this.lat0)},forward:function(t){var e,n,r,i=t.x,o=t.y,a=k(i-this.long0);if(r=a*Math.sin(o),this.sphere)Math.abs(o)<=s?(e=this.a*a,n=-1*this.a*this.lat0):(e=this.a*Math.sin(r)/Math.tan(o),n=this.a*(pe(o-this.lat0)+(1-Math.cos(r))/Math.tan(o)));else if(Math.abs(o)<=s)e=this.a*a,n=-1*this.ml0;else{var u=fe(this.a,this.e,Math.sin(o))/Math.tan(o);e=u*Math.sin(r),n=this.a*se(this.e0,this.e1,this.e2,this.e3,o)-this.ml0+u*(1-Math.cos(r))}return t.x=e+this.x0,t.y=n+this.y0,t},inverse:function(t){var e,n,r,i,o,a,u,l,c;if(r=t.x-this.x0,i=t.y-this.y0,this.sphere)if(Math.abs(i+this.a*this.lat0)<=s)e=k(r/this.a+this.long0),n=0;else{var h;for(a=this.lat0+i/this.a,u=r*r/this.a/this.a+a*a,l=a,o=20;o;--o)if(l+=c=-1*(a*(l*(h=Math.tan(l))+1)-l-.5*(l*l+u)*h)/((l-a)/h-1),Math.abs(c)<=s){n=l;break}e=k(this.long0+Math.asin(r*Math.tan(l)/this.a)/Math.sin(n))}else if(Math.abs(i+this.ml0)<=s)n=0,e=k(this.long0+r/this.a);else{var f,p,d,y,m;for(a=(this.ml0+i)/this.a,u=r*r/this.a/this.a+a*a,l=a,o=20;o;--o)if(m=this.e*Math.sin(l),f=Math.sqrt(1-m*m)*Math.tan(l),p=this.a*se(this.e0,this.e1,this.e2,this.e3,l),d=this.e0-2*this.e1*Math.cos(2*l)+4*this.e2*Math.cos(4*l)-6*this.e3*Math.cos(6*l),l-=c=(a*(f*(y=p/this.a)+1)-y-.5*f*(y*y+u))/(this.es*Math.sin(2*l)*(y*y+u-2*a*y)/(4*f)+(a-y)*(f*d-2/Math.sin(2*l))-d),Math.abs(c)<=s){n=l;break}f=Math.sqrt(1-this.es*Math.pow(Math.sin(n),2))*Math.tan(n),e=k(this.long0+Math.asin(r*f/this.a)/Math.sin(n))}return t.x=e,t.y=n,t},names:["Polyconic","poly"]},xe={init:function(){this.A=[],this.A[1]=.6399175073,this.A[2]=-.1358797613,this.A[3]=.063294409,this.A[4]=-.02526853,this.A[5]=.0117879,this.A[6]=-.0055161,this.A[7]=.0026906,this.A[8]=-.001333,this.A[9]=67e-5,this.A[10]=-34e-5,this.B_re=[],this.B_im=[],this.B_re[1]=.7557853228,this.B_im[1]=0,this.B_re[2]=.249204646,this.B_im[2]=.003371507,this.B_re[3]=-.001541739,this.B_im[3]=.04105856,this.B_re[4]=-.10162907,this.B_im[4]=.01727609,this.B_re[5]=-.26623489,this.B_im[5]=-.36249218,this.B_re[6]=-.6870983,this.B_im[6]=-1.1651967,this.C_re=[],this.C_im=[],this.C_re[1]=1.3231270439,this.C_im[1]=0,this.C_re[2]=-.577245789,this.C_im[2]=-.007809598,this.C_re[3]=.508307513,this.C_im[3]=-.112208952,this.C_re[4]=-.15094762,this.C_im[4]=.18200602,this.C_re[5]=1.01418179,this.C_im[5]=1.64497696,this.C_re[6]=1.9660549,this.C_im[6]=2.5127645,this.D=[],this.D[1]=1.5627014243,this.D[2]=.5185406398,this.D[3]=-.03333098,this.D[4]=-.1052906,this.D[5]=-.0368594,this.D[6]=.007317,this.D[7]=.0122,this.D[8]=.00394,this.D[9]=-.0013},forward:function(t){var e,n=t.x,r=t.y-this.lat0,i=n-this.long0,a=r/o*1e-5,s=i,u=1,l=0;for(e=1;e<=10;e++)u*=a,l+=this.A[e]*u;var c,h=l,f=s,p=1,d=0,y=0,m=0;for(e=1;e<=6;e++)c=d*h+p*f,p=p*h-d*f,d=c,y=y+this.B_re[e]*p-this.B_im[e]*d,m=m+this.B_im[e]*p+this.B_re[e]*d;return t.x=m*this.a+this.x0,t.y=y*this.a+this.y0,t},inverse:function(t){var e,n,r=t.x,i=t.y,a=r-this.x0,s=(i-this.y0)/this.a,u=a/this.a,l=1,c=0,h=0,f=0;for(e=1;e<=6;e++)n=c*s+l*u,l=l*s-c*u,c=n,h=h+this.C_re[e]*l-this.C_im[e]*c,f=f+this.C_im[e]*l+this.C_re[e]*c;for(var p=0;p.999999999999&&(n=.999999999999),e=Math.asin(n);var r=k(this.long0+t.x/(.900316316158*this.a*Math.cos(e)));r<-Math.PI&&(r=-Math.PI),r>Math.PI&&(r=Math.PI),n=(2*e+Math.sin(2*e))/Math.PI,Math.abs(n)>1&&(n=1);var i=Math.asin(n);return t.x=r,t.y=i,t},names:["Mollweide","moll"]},Ne={init:function(){Math.abs(this.lat1+this.lat2)=0?(n=Math.sqrt(t.x*t.x+t.y*t.y),e=1):(n=-Math.sqrt(t.x*t.x+t.y*t.y),e=-1);var o=0;return 0!==n&&(o=Math.atan2(e*t.x,e*t.y)),this.sphere?(i=k(this.long0+o/this.ns),r=pe(this.g-n/this.a),t.x=i,t.y=r,t):(r=de(this.g-n/this.a,this.e0,this.e1,this.e2,this.e3),i=k(this.long0+o/this.ns),t.x=i,t.y=r,t)},names:["Equidistant_Conic","eqdc"]},Oe={init:function(){this.R=this.a},forward:function(t){var e,n,r=t.x,i=t.y,o=k(r-this.long0);Math.abs(i)<=s&&(e=this.x0+this.R*o,n=this.y0);var u=_e(2*Math.abs(i/Math.PI));(Math.abs(o)<=s||Math.abs(Math.abs(i)-a)<=s)&&(e=this.x0,n=i>=0?this.y0+Math.PI*this.R*Math.tan(.5*u):this.y0+Math.PI*this.R*-Math.tan(.5*u));var l=.5*Math.abs(Math.PI/o-o/Math.PI),c=l*l,h=Math.sin(u),f=Math.cos(u),p=f/(h+f-1),d=p*p,y=p*(2/h-1),m=y*y,g=Math.PI*this.R*(l*(p-m)+Math.sqrt(c*(p-m)*(p-m)-(m+c)*(d-m)))/(m+c);o<0&&(g=-g),e=this.x0+g;var _=c+p;return g=Math.PI*this.R*(y*_-l*Math.sqrt((m+c)*(c+1)-_*_))/(m+c),n=i>=0?this.y0+g:this.y0-g,t.x=e,t.y=n,t},inverse:function(t){var e,n,r,i,o,a,u,l,c,h,f,p;return t.x-=this.x0,t.y-=this.y0,f=Math.PI*this.R,o=(r=t.x/f)*r+(i=t.y/f)*i,f=3*(i*i/(l=-2*(a=-Math.abs(i)*(1+o))+1+2*i*i+o*o)+(2*(u=a-2*i*i+r*r)*u*u/l/l/l-9*a*u/l/l)/27)/(c=(a-u*u/3/l)/l)/(h=2*Math.sqrt(-c/3)),Math.abs(f)>1&&(f=f>=0?1:-1),p=Math.acos(f)/3,n=t.y>=0?(-h*Math.cos(p+Math.PI/3)-u/3/l)*Math.PI:-(-h*Math.cos(p+Math.PI/3)-u/3/l)*Math.PI,e=Math.abs(r)2*a*this.a)return;return n=e/this.a,r=Math.sin(n),i=Math.cos(n),o=this.long0,Math.abs(e)<=s?u=this.lat0:(u=_e(i*this.sin_p12+t.y*r*this.cos_p12/e),l=Math.abs(this.lat0)-a,o=Math.abs(l)<=s?this.lat0>=0?k(this.long0+Math.atan2(t.x,-t.y)):k(this.long0-Math.atan2(-t.x,t.y)):k(this.long0+Math.atan2(t.x*r,e*this.cos_p12*i-t.y*this.sin_p12*r))),t.x=o,t.y=u,t}return c=ue(this.es),h=le(this.es),f=ce(this.es),p=he(this.es),Math.abs(this.sin_p12-1)<=s?(u=de(((d=this.a*se(c,h,f,p,a))-(e=Math.sqrt(t.x*t.x+t.y*t.y)))/this.a,c,h,f,p),o=k(this.long0+Math.atan2(t.x,-1*t.y)),t.x=o,t.y=u,t):Math.abs(this.sin_p12+1)<=s?(d=this.a*se(c,h,f,p,a),u=de(((e=Math.sqrt(t.x*t.x+t.y*t.y))-d)/this.a,c,h,f,p),o=k(this.long0+Math.atan2(t.x,t.y)),t.x=o,t.y=u,t):(e=Math.sqrt(t.x*t.x+t.y*t.y),g=Math.atan2(t.x,t.y),y=fe(this.a,this.e,this.sin_p12),_=Math.cos(g),v=-(b=this.e*this.cos_p12*_)*b/(1-this.es),T=3*this.es*(1-v)*this.sin_p12*this.cos_p12*_/(1-this.es),x=1-v*(w=(E=e/y)-v*(1+v)*Math.pow(E,3)/6-T*(1+3*v)*Math.pow(E,4)/24)*w/2-E*w*w*w/6,m=Math.asin(this.sin_p12*Math.cos(w)+this.cos_p12*Math.sin(w)*_),o=k(this.long0+Math.asin(Math.sin(g)*Math.sin(w)/Math.cos(m))),C=Math.sin(m),u=Math.atan2((C-this.es*x*this.sin_p12)*Math.tan(m),C*(1-this.es)),t.x=o,t.y=u,t)},names:["Azimuthal_Equidistant","aeqd"]},Ie={init:function(){this.sin_p14=Math.sin(this.lat0),this.cos_p14=Math.cos(this.lat0)},forward:function(t){var e,n,r,i,o,a,u,l=t.x,c=t.y;return r=k(l-this.long0),e=Math.sin(c),n=Math.cos(c),i=Math.cos(r),((o=this.sin_p14*e+this.cos_p14*n*i)>0||Math.abs(o)<=s)&&(a=1*this.a*n*Math.sin(r),u=this.y0+1*this.a*(this.cos_p14*e-this.sin_p14*n*i)),t.x=a,t.y=u,t},inverse:function(t){var e,n,r,i,o,u,l;return t.x-=this.x0,t.y-=this.y0,n=_e((e=Math.sqrt(t.x*t.x+t.y*t.y))/this.a),r=Math.sin(n),i=Math.cos(n),u=this.long0,Math.abs(e)<=s?(l=this.lat0,t.x=u,t.y=l,t):(l=_e(i*this.sin_p14+t.y*r*this.cos_p14/e),o=Math.abs(this.lat0)-a,Math.abs(o)<=s?(u=this.lat0>=0?k(this.long0+Math.atan2(t.x,-t.y)):k(this.long0-Math.atan2(-t.x,t.y)),t.x=u,t.y=l,t):(u=k(this.long0+Math.atan2(t.x*r,e*this.cos_p14*i-t.y*this.sin_p14*r)),t.x=u,t.y=l,t))},names:["ortho"]};function Pe(t,e,n,r){var i;return tc&&i<=a+c?(r.value=2,i-=a):i>a+c||i<=-(a+c)?(r.value=3,i=i>=0?i-f:i+f):(r.value=4,i+=a)),i}function Re(t,e){var n=t+e;return n<-f?n+=h:n>+f&&(n-=h),n}const Le={init:function(){this.x0=this.x0||0,this.y0=this.y0||0,this.lat0=this.lat0||0,this.long0=this.long0||0,this.lat_ts=this.lat_ts||0,this.title=this.title||"Quadrilateralized Spherical Cube",this.lat0>=a-c/2?this.face=5:this.lat0<=-(a-c/2)?this.face=6:Math.abs(this.long0)<=c?this.face=1:Math.abs(this.long0)<=a+c?this.face=this.long0>0?2:4:this.face=3,0!==this.es&&(this.one_minus_f=1-(this.a-this.b)/this.a,this.one_minus_f_squared=this.one_minus_f*this.one_minus_f)},forward:function(t){var e,n,r,i,o,s,u={x:0,y:0},l={value:0};if(t.x-=this.long0,e=0!==this.es?Math.atan(this.one_minus_f_squared*Math.tan(t.y)):t.y,n=t.x,5===this.face)i=a-e,n>=c&&n<=a+c?(l.value=1,r=n-a):n>a+c||n<=-(a+c)?(l.value=2,r=n>0?n-f:n+f):n>-(a+c)&&n<=-c?(l.value=3,r=n+a):(l.value=4,r=n);else if(6===this.face)i=a+e,n>=c&&n<=a+c?(l.value=1,r=-n+a):n=-c?(l.value=2,r=-n):n<-c&&n>=-(a+c)?(l.value=3,r=-n-a):(l.value=4,r=n>0?-n+f:-n-f);else{var h,p,d,y,m,g;2===this.face?n=Re(n,+a):3===this.face?n=Re(n,+f):4===this.face&&(n=Re(n,-a)),y=Math.sin(e),m=Math.cos(e),g=Math.sin(n),h=m*Math.cos(n),p=m*g,d=y,1===this.face?r=Pe(i=Math.acos(h),d,p,l):2===this.face?r=Pe(i=Math.acos(p),d,-h,l):3===this.face?r=Pe(i=Math.acos(-h),d,-p,l):4===this.face?r=Pe(i=Math.acos(-p),d,h,l):(i=r=0,l.value=1)}return s=Math.atan(12/f*(r+Math.acos(Math.sin(r)*Math.cos(c))-a)),o=Math.sqrt((1-Math.cos(i))/(Math.cos(s)*Math.cos(s))/(1-Math.cos(Math.atan(1/Math.cos(r))))),2===l.value?s+=a:3===l.value?s+=f:4===l.value&&(s+=1.5*f),u.x=o*Math.cos(s),u.y=o*Math.sin(s),u.x=u.x*this.a+this.x0,u.y=u.y*this.a+this.y0,t.x=u.x,t.y=u.y,t},inverse:function(t){var e,n,r,i,o,s,u,l,c,h,p,d,y={lam:0,phi:0},m={value:0};if(t.x=(t.x-this.x0)/this.a,t.y=(t.y-this.y0)/this.a,n=Math.atan(Math.sqrt(t.x*t.x+t.y*t.y)),e=Math.atan2(t.y,t.x),t.x>=0&&t.x>=Math.abs(t.y)?m.value=1:t.y>=0&&t.y>=Math.abs(t.x)?(m.value=2,e-=a):t.x<0&&-t.x>=Math.abs(t.y)?(m.value=3,e=e<0?e+f:e-f):(m.value=4,e+=a),c=f/12*Math.tan(e),o=Math.sin(c)/(Math.cos(c)-1/Math.sqrt(2)),s=Math.atan(o),(u=1-(r=Math.cos(e))*r*(i=Math.tan(n))*i*(1-Math.cos(Math.atan(1/Math.cos(s)))))<-1?u=-1:u>1&&(u=1),5===this.face)l=Math.acos(u),y.phi=a-l,1===m.value?y.lam=s+a:2===m.value?y.lam=s<0?s+f:s-f:3===m.value?y.lam=s-a:y.lam=s;else if(6===this.face)l=Math.acos(u),y.phi=l-a,1===m.value?y.lam=-s+a:2===m.value?y.lam=-s:3===m.value?y.lam=-s-a:y.lam=s<0?-s-f:-s+f;else{var g,_,b;c=(g=u)*g,_=(c+=(b=c>=1?0:Math.sqrt(1-c)*Math.sin(s))*b)>=1?0:Math.sqrt(1-c),2===m.value?(c=_,_=-b,b=c):3===m.value?(_=-_,b=-b):4===m.value&&(c=_,_=b,b=-c),2===this.face?(c=g,g=-_,_=c):3===this.face?(g=-g,_=-_):4===this.face&&(c=g,g=_,_=-c),y.phi=Math.acos(-b)-a,y.lam=Math.atan2(_,g),2===this.face?y.lam=Re(y.lam,-a):3===this.face?y.lam=Re(y.lam,-f):4===this.face&&(y.lam=Re(y.lam,+a))}return 0!==this.es&&(h=y.phi<0?1:0,p=Math.tan(y.phi),d=this.b/Math.sqrt(p*p+this.one_minus_f_squared),y.phi=Math.atan(Math.sqrt(this.a*this.a-d*d)/(this.one_minus_f*d)),h&&(y.phi=-y.phi)),y.lam+=this.long0,t.x=y.lam,t.y=y.phi,t},names:["Quadrilateralized Spherical Cube","Quadrilateralized_Spherical_Cube","qsc"]};var De=[[1,22199e-21,-715515e-10,31103e-10],[.9986,-482243e-9,-24897e-9,-13309e-10],[.9954,-83103e-8,-448605e-10,-9.86701e-7],[.99,-.00135364,-59661e-9,36777e-10],[.9822,-.00167442,-449547e-11,-572411e-11],[.973,-.00214868,-903571e-10,1.8736e-8],[.96,-.00305085,-900761e-10,164917e-11],[.9427,-.00382792,-653386e-10,-26154e-10],[.9216,-.00467746,-10457e-8,481243e-11],[.8962,-.00536223,-323831e-10,-543432e-11],[.8679,-.00609363,-113898e-9,332484e-11],[.835,-.00698325,-640253e-10,9.34959e-7],[.7986,-.00755338,-500009e-10,9.35324e-7],[.7597,-.00798324,-35971e-9,-227626e-11],[.7186,-.00851367,-701149e-10,-86303e-10],[.6732,-.00986209,-199569e-9,191974e-10],[.6213,-.010418,883923e-10,624051e-11],[.5722,-.00906601,182e-6,624051e-11],[.5322,-.00677797,275608e-9,624051e-11]],ke=[[-520417e-23,.0124,121431e-23,-845284e-16],[.062,.0124,-1.26793e-9,4.22642e-10],[.124,.0124,5.07171e-9,-1.60604e-9],[.186,.0123999,-1.90189e-8,6.00152e-9],[.248,.0124002,7.10039e-8,-2.24e-8],[.31,.0123992,-2.64997e-7,8.35986e-8],[.372,.0124029,9.88983e-7,-3.11994e-7],[.434,.0123893,-369093e-11,-4.35621e-7],[.4958,.0123198,-102252e-10,-3.45523e-7],[.5571,.0121916,-154081e-10,-5.82288e-7],[.6176,.0119938,-241424e-10,-5.25327e-7],[.6769,.011713,-320223e-10,-5.16405e-7],[.7346,.0113541,-397684e-10,-6.09052e-7],[.7903,.0109107,-489042e-10,-104739e-11],[.8435,.0103431,-64615e-9,-1.40374e-9],[.8936,.00969686,-64636e-9,-8547e-9],[.9394,.00840947,-192841e-9,-42106e-10],[.9761,.00616527,-256e-6,-42106e-10],[1,.00328947,-319159e-9,-42106e-10]],Fe=.8487,Ue=1.3523,Be=function(t,e){return t[0]+e*(t[1]+e*(t[2]+e*t[3]))};const je={init:function(){this.x0=this.x0||0,this.y0=this.y0||0,this.long0=this.long0||0,this.es=0,this.title=this.title||"Robinson"},forward:function(t){var e=k(t.x-this.long0),n=Math.abs(t.y),r=Math.floor(11.459155902616464*n);r<0?r=0:r>=18&&(r=17);var i={x:Be(De[r],n=l*(n-.08726646259971647*r))*e,y:Be(ke[r],n)};return t.y<0&&(i.y=-i.y),i.x=i.x*this.a*Fe+this.x0,i.y=i.y*this.a*Ue+this.y0,i},inverse:function(t){var e={x:(t.x-this.x0)/(this.a*Fe),y:Math.abs(t.y-this.y0)/(this.a*Ue)};if(e.y>=1)e.x/=De[18][0],e.y=t.y<0?-a:a;else{var n=Math.floor(18*e.y);for(n<0?n=0:n>=18&&(n=17);;)if(ke[n][0]>e.y)--n;else{if(!(ke[n+1][0]<=e.y))break;++n}var r=ke[n],i=5*(e.y-r[0])/(ke[n+1][0]-r[0]);i=function(t,e,n,r){for(var i=e;r;--r){var o=t(i);if(i-=o,Math.abs(o)<1e-10)break}return i}((function(t){return(Be(r,t)-e.y)/function(t,e){return t[1]+e*(2*t[2]+3*e*t[3])}(r,t)}),i,0,100),e.x/=Be(De[n],i),e.y=(5*n+i)*u,t.y<0&&(e.y=-e.y)}return e.x=k(e.x+this.long0),e},names:["Robinson","robin"]},Ge={init:function(){this.name="geocent"},forward:function(t){return st(t,this.es,this.a)},inverse:function(t){return ut(t,this.es,this.a,this.b)},names:["Geocentric","geocentric","geocent","Geocent"]};var We={h:{def:1e5,num:!0},azi:{def:0,num:!0,degrees:!0},tilt:{def:0,num:!0,degrees:!0},long0:{def:0,num:!0},lat0:{def:0,num:!0}};const qe={init:function(){if(Object.keys(We).forEach(function(t){if(void 0===this[t])this[t]=We[t].def;else{if(We[t].num&&isNaN(this[t]))throw new Error("Invalid parameter value, must be numeric "+t+" = "+this[t]);We[t].num&&(this[t]=parseFloat(this[t]))}We[t].degrees&&(this[t]=this[t]*u)}.bind(this)),Math.abs(Math.abs(this.lat0)-a)1e10)throw new Error("Invalid height");this.p=1+this.pn1,this.rp=1/this.p,this.h1=1/this.pn1,this.pfact=(this.p+1)*this.h1,this.es=0;var t=this.tilt,e=this.azi;this.cg=Math.cos(e),this.sg=Math.sin(e),this.cw=Math.cos(t),this.sw=Math.sin(t)},forward:function(t){t.x-=this.long0;var e,n,r,i,o=Math.sin(t.y),a=Math.cos(t.y),s=Math.cos(t.x);switch(this.mode){case 3:n=this.sinph0*o+this.cosph0*a*s;break;case 2:n=a*s;break;case 1:n=-o;break;case 0:n=o}switch(e=(n=this.pn1/(this.p-n))*a*Math.sin(t.x),this.mode){case 3:n*=this.cosph0*o-this.sinph0*a*s;break;case 2:n*=o;break;case 0:n*=-a*s;break;case 1:n*=a*s}return i=1/((r=n*this.cg+e*this.sg)*this.sw*this.h1+this.cw),e=(e*this.cg-n*this.sg)*this.cw*i,n=r*i,t.x=e*this.a,t.y=n*this.a,t},inverse:function(t){t.x/=this.a,t.y/=this.a;var e,n,r,i={x:t.x,y:t.y};r=1/(this.pn1-t.y*this.sw),e=this.pn1*t.x*r,n=this.pn1*t.y*this.cw*r,t.x=e*this.cg+n*this.sg,t.y=n*this.cg-e*this.sg;var o=Xt(t.x,t.y);if(Math.abs(o)1e10)throw new Error;if(this.radius_g=1+this.radius_g_1,this.C=this.radius_g*this.radius_g-1,0!==this.es){var t=1-this.es,e=1/t;this.radius_p=Math.sqrt(t),this.radius_p2=t,this.radius_p_inv2=e,this.shape="ellipse"}else this.radius_p=1,this.radius_p2=1,this.radius_p_inv2=1,this.shape="sphere";this.title||(this.title="Geostationary Satellite View")},forward:function(t){var e,n,r,i,o=t.x,a=t.y;if(o-=this.long0,"ellipse"===this.shape){a=Math.atan(this.radius_p2*Math.tan(a));var s=this.radius_p/Xt(this.radius_p*Math.cos(a),Math.sin(a));if(n=s*Math.cos(o)*Math.cos(a),r=s*Math.sin(o)*Math.cos(a),i=s*Math.sin(a),(this.radius_g-n)*n-r*r-i*i*this.radius_p_inv2<0)return t.x=Number.NaN,t.y=Number.NaN,t;e=this.radius_g-n,this.flip_axis?(t.x=this.radius_g_1*Math.atan(r/Xt(i,e)),t.y=this.radius_g_1*Math.atan(i/e)):(t.x=this.radius_g_1*Math.atan(r/e),t.y=this.radius_g_1*Math.atan(i/Xt(r,e)))}else"sphere"===this.shape&&(e=Math.cos(a),n=Math.cos(o)*e,r=Math.sin(o)*e,i=Math.sin(a),e=this.radius_g-n,this.flip_axis?(t.x=this.radius_g_1*Math.atan(r/Xt(i,e)),t.y=this.radius_g_1*Math.atan(i/e)):(t.x=this.radius_g_1*Math.atan(r/e),t.y=this.radius_g_1*Math.atan(i/Xt(r,e))));return t.x=t.x*this.a,t.y=t.y*this.a,t},inverse:function(t){var e,n,r,i,o=-1,a=0,s=0;if(t.x=t.x/this.a,t.y=t.y/this.a,"ellipse"===this.shape){this.flip_axis?(s=Math.tan(t.y/this.radius_g_1),a=Math.tan(t.x/this.radius_g_1)*Xt(1,s)):(a=Math.tan(t.x/this.radius_g_1),s=Math.tan(t.y/this.radius_g_1)*Xt(1,a));var u=s/this.radius_p;if(e=a*a+u*u+o*o,(r=(n=2*this.radius_g*o)*n-4*e*this.C)<0)return t.x=Number.NaN,t.y=Number.NaN,t;i=(-n-Math.sqrt(r))/(2*e),o=this.radius_g+i*o,a*=i,s*=i,t.x=Math.atan2(a,o),t.y=Math.atan(s*Math.cos(t.x)/o),t.y=Math.atan(this.radius_p_inv2*Math.tan(t.y))}else if("sphere"===this.shape){if(this.flip_axis?(s=Math.tan(t.y/this.radius_g_1),a=Math.tan(t.x/this.radius_g_1)*Math.sqrt(1+s*s)):(a=Math.tan(t.x/this.radius_g_1),s=Math.tan(t.y/this.radius_g_1)*Math.sqrt(1+a*a)),e=a*a+s*s+o*o,(r=(n=2*this.radius_g*o)*n-4*e*this.C)<0)return t.x=Number.NaN,t.y=Number.NaN,t;i=(-n-Math.sqrt(r))/(2*e),o=this.radius_g+i*o,a*=i,s*=i,t.x=Math.atan2(a,o),t.y=Math.atan(s*Math.cos(t.x)/o)}return t.x=t.x+this.long0,t},names:["Geostationary Satellite View","Geostationary_Satellite","geos"]};var ze;Tt.defaultDatum="WGS84",Tt.Proj=at,Tt.WGS84=new Tt.Proj("WGS84"),Tt.Point=Ut,Tt.toPoint=yt,Tt.defs=A,Tt.nadgrid=function(t,e){var n=new DataView(e),r=function(t){var e=t.getInt32(8,!1);return 11!==e&&(11!==(e=t.getInt32(8,!0))&&K.warn("Failed to detect nadgrid endian-ness, defaulting to little-endian"),!0)}(n),i=function(t,e){return{nFields:t.getInt32(8,e),nSubgridFields:t.getInt32(24,e),nSubgrids:t.getInt32(40,e),shiftType:et(t,56,64).trim(),fromSemiMajorAxis:t.getFloat64(120,e),fromSemiMinorAxis:t.getFloat64(136,e),toSemiMajorAxis:t.getFloat64(152,e),toSemiMinorAxis:t.getFloat64(168,e)}}(n,r);i.nSubgrids>1&&K.log("Only single NTv2 subgrids are currently supported, subsequent sub grids are ignored");var o=function(t,e,n){for(var r=[],i=0;i{"use strict";function e(t,e){return Object.prototype.hasOwnProperty.call(t,e)}t.exports=function(t,n,r,i){n=n||"&",r=r||"=";var o={};if("string"!=typeof t||0===t.length)return o;var a=/\+/g;t=t.split(n);var s=1e3;i&&"number"==typeof i.maxKeys&&(s=i.maxKeys);var u=t.length;s>0&&u>s&&(u=s);for(var l=0;l=0?(c=d.substr(0,y),h=d.substr(y+1)):(c=d,h=""),f=decodeURIComponent(c),p=decodeURIComponent(h),e(o,f)?Array.isArray(o[f])?o[f].push(p):o[f]=[o[f],p]:o[f]=p}return o}},2361:t=>{"use strict";var e=function(t){switch(typeof t){case"string":return t;case"boolean":return t?"true":"false";case"number":return isFinite(t)?t:"";default:return""}};t.exports=function(t,n,r,i){return n=n||"&",r=r||"=",null===t&&(t=void 0),"object"==typeof t?Object.keys(t).map((function(i){var o=encodeURIComponent(e(i))+r;return Array.isArray(t[i])?t[i].map((function(t){return o+encodeURIComponent(e(t))})).join(n):o+encodeURIComponent(e(t[i]))})).join(n):i?encodeURIComponent(e(i))+r+encodeURIComponent(e(t)):""}},7673:(t,e,n)=>{"use strict";e.decode=e.parse=n(2587),e.encode=e.stringify=n(2361)},9189:(t,e,n)=>{var r=n(5717),i=n(7187).EventEmitter;function o(t){if(!(this instanceof o))return new o(t);i.call(this),t=t||{},this.concurrency=t.concurrency||1/0,this.timeout=t.timeout||0,this.autostart=t.autostart||!1,this.results=t.results||null,this.pending=0,this.session=0,this.running=!1,this.jobs=[],this.timers={}}function a(){for(var t in this.timers){var e=this.timers[t];delete this.timers[t],clearTimeout(e)}}function s(t){var e=this;function n(t){e.end(t)}this.on("error",n),this.on("end",(function r(i){e.removeListener("error",n),e.removeListener("end",r),t(i,this.results)}))}function u(t){this.session++,this.running=!1,this.emit("end",t)}t.exports=o,t.exports.default=o,r(o,i),["pop","shift","indexOf","lastIndexOf"].forEach((function(t){o.prototype[t]=function(){return Array.prototype[t].apply(this.jobs,arguments)}})),o.prototype.slice=function(t,e){return this.jobs=this.jobs.slice(t,e),this},o.prototype.reverse=function(){return this.jobs.reverse(),this},["push","unshift","splice"].forEach((function(t){o.prototype[t]=function(){var e=Array.prototype[t].apply(this.jobs,arguments);return this.autostart&&this.start(),e}})),Object.defineProperty(o.prototype,"length",{get:function(){return this.pending+this.jobs.length}}),o.prototype.start=function(t){if(t&&s.call(this,t),this.running=!0,!(this.pending>=this.concurrency))if(0!==this.jobs.length){var e=this,n=this.jobs.shift(),r=!0,i=this.session,o=null,a=!1,l=null,c=n.timeout||this.timeout;c&&(o=setTimeout((function(){a=!0,e.listeners("timeout").length>0?e.emit("timeout",f,n):f()}),c),this.timers[o]=o),this.results&&(l=this.results.length,this.results[l]=null),this.pending++,e.emit("start",n);var h=n(f);h&&h.then&&"function"==typeof h.then&&h.then((function(t){return f(null,t)})).catch((function(t){return f(t||!0)})),this.running&&this.jobs.length>0&&this.start()}else 0===this.pending&&u.call(this);function f(t,s){r&&e.session===i&&(r=!1,e.pending--,null!==o&&(delete e.timers[o],clearTimeout(o)),t?e.emit("error",t,n):!1===a&&(null!==l&&(e.results[l]=Array.prototype.slice.call(arguments,1)),e.emit("success",s,n)),e.session===i&&(0===e.pending&&0===e.jobs.length?u.call(e):e.running&&e.start()))}},o.prototype.stop=function(){this.running=!1},o.prototype.end=function(t){a.call(this),this.jobs.length=0,this.pending=0,u.call(this,t)}},2582:function(t){t.exports=function(){"use strict";function t(t,r,i,o,a){!function t(n,r,i,o,a){for(;o>i;){if(o-i>600){var s=o-i+1,u=r-i+1,l=Math.log(s),c=.5*Math.exp(2*l/3),h=.5*Math.sqrt(l*c*(s-c)/s)*(u-s/2<0?-1:1);t(n,r,Math.max(i,Math.floor(r-u*c/s+h)),Math.min(o,Math.floor(r+(s-u)*c/s+h)),a)}var f=n[r],p=i,d=o;for(e(n,i,r),a(n[o],f)>0&&e(n,i,o);p0;)d--}0===a(n[i],f)?e(n,i,d):e(n,++d,o),d<=r&&(i=d+1),r<=d&&(o=d-1)}}(t,r,i||0,o||t.length-1,a||n)}function e(t,e,n){var r=t[e];t[e]=t[n],t[n]=r}function n(t,e){return te?1:0}var r=function(t){void 0===t&&(t=9),this._maxEntries=Math.max(4,t),this._minEntries=Math.max(2,Math.ceil(.4*this._maxEntries)),this.clear()};function i(t,e,n){if(!n)return e.indexOf(t);for(var r=0;r=t.minX&&e.maxY>=t.minY}function d(t){return{children:t,height:1,leaf:!0,minX:1/0,minY:1/0,maxX:-1/0,maxY:-1/0}}function y(e,n,r,i,o){for(var a=[n,r];a.length;)if(!((r=a.pop())-(n=a.pop())<=i)){var s=n+Math.ceil((r-n)/i/2)*i;t(e,s,n,r,o),a.push(n,s,s,r)}}return r.prototype.all=function(){return this._all(this.data,[])},r.prototype.search=function(t){var e=this.data,n=[];if(!p(t,e))return n;for(var r=this.toBBox,i=[];e;){for(var o=0;o=0&&i[e].children.length>this._maxEntries;)this._split(i,e),e--;this._adjustParentBBoxes(r,i,e)},r.prototype._split=function(t,e){var n=t[e],r=n.children.length,i=this._minEntries;this._chooseSplitAxis(n,i,r);var a=this._chooseSplitIndex(n,i,r),s=d(n.children.splice(a,n.children.length-a));s.height=n.height,s.leaf=n.leaf,o(n,this.toBBox),o(s,this.toBBox),e?t[e-1].children.push(s):this._splitRoot(n,s)},r.prototype._splitRoot=function(t,e){this.data=d([t,e]),this.data.height=t.height+1,this.data.leaf=!1,o(this.data,this.toBBox)},r.prototype._chooseSplitIndex=function(t,e,n){for(var r,i,o,s,u,l,h,f=1/0,p=1/0,d=e;d<=n-e;d++){var y=a(t,0,d,this.toBBox),m=a(t,d,n,this.toBBox),g=(i=y,o=m,void 0,void 0,void 0,void 0,s=Math.max(i.minX,o.minX),u=Math.max(i.minY,o.minY),l=Math.min(i.maxX,o.maxX),h=Math.min(i.maxY,o.maxY),Math.max(0,l-s)*Math.max(0,h-u)),_=c(y)+c(m);g=e;p--){var d=t.children[p];s(u,t.leaf?i(d):d),l+=h(u)}return l},r.prototype._adjustParentBBoxes=function(t,e,n){for(var r=n;r>=0;r--)s(e[r],t)},r.prototype._condense=function(t){for(var e=t.length-1,n=void 0;e>=0;e--)0===t[e].children.length?e>0?(n=t[e-1].children).splice(n.indexOf(t[e]),1):this.clear():o(t[e],this.toBBox)},r}()},6102:(t,e,n)=>{"use strict";var r=n(4472).hasOwnProperty("default")?n(4472).default:n(4472);function i(t,e){return(n=t).length>=2&&"number"==typeof n[0]&&"number"==typeof n[1]?e(t):t.map((function(t){return i(t,e)}));var n}function o(t,e,n){if(null==n)return n;var r=function(t){if(null==t||"object"!=typeof t)return t;var e=t.constructor();for(var n in t)t.hasOwnProperty(n)&&(e[n]=t[n]);return e}(n),i=o.bind(this,t,e);switch(n.type){case"Feature":r.geometry=i(n.geometry);break;case"FeatureCollection":r.features=r.features.map(i);break;case"GeometryCollection":r.geometries=r.geometries.map(i);break;default:t(r)}return e&&e(r),r}function a(t,e){var n,r=t.crs;if(void 0===r)throw new Error('Unable to detect CRS, GeoJSON has no "crs" property.');if("name"===r.type?n=e[r.properties.name]:"EPSG"===r.type&&(n=e["EPSG:"+r.properties.code]),!n)throw new Error("CRS defined in crs section could not be identified: "+JSON.stringify(r));return n}function s(t,e){return"string"==typeof t||t instanceof String?e[t]||r.Proj(t):t}function u(t,e,n,u){u=u||{},e=e?s(e,u):a(t,u),n=s(n,u);var l=r(e,n).forward.bind(l);function c(t){var e=l(t);return 3===t.length&&void 0!==t[2]&&void 0===e[2]&&(e[2]=t[2]),e}return o((function(t){t.crs&&delete t.crs,t.coordinates=i(t.coordinates,c)}),(function(t){t.bbox&&(t.bbox=function(t){var e=[Number.MAX_VALUE,Number.MAX_VALUE],n=[-Number.MAX_VALUE,-Number.MAX_VALUE];return o((function(t){i(t.coordinates,(function(t){e[0]=Math.min(e[0],t[0]),e[1]=Math.min(e[1],t[1]),n[0]=Math.max(n[0],t[0]),n[1]=Math.max(n[1],t[1])}))}),null,t),[e[0],e[1],n[0],n[1]]}(t))}),t)}t.exports={detectCrs:a,reproject:u,reverse:function(t){return o((function(t){t.coordinates=i(t.coordinates,(function(t){return[t[1],t[0]]}))}),null,t)},toWgs84:function(t,e,n){return u(t,e,r.WGS84,n)}}},3686:function(t,e){var n=void 0,r=function(e){return n||(n=new Promise((function(n,r){var i,o=void 0!==e?e:{},a=o.onAbort;o.onAbort=function(t){r(new Error(t)),a&&a(t)},o.postRun=o.postRun||[],o.postRun.push((function(){n(o)})),t=void 0,i||(i=void 0!==o?o:{}),i.onRuntimeInitialized=function(){function t(t,e){this.Ka=t,this.db=e,this.Ia=1,this.cb=[]}function e(t,e){if(this.db=e,e=W(t)+1,this.Xa=xe(e),null===this.Xa)throw Error("Unable to allocate memory for the SQL string");G(t,R,this.Xa,e),this.bb=this.Xa,this.Ta=this.hb=null}function n(t){if(this.filename="dbfile_"+(4294967295*Math.random()>>>0),null!=t){var e=this.filename,n="/",i=e;if(n&&(n="string"==typeof n?n:It(n),i=e?ut(n+"/"+e):n),e=ue(!0,!0),i=Ht(i,4095&(void 0!==e?e:438)|32768,0),t){if("string"==typeof t){n=Array(t.length);for(var o=0,s=t.length;on;++n)i.parameters.push(r["viii"[n]]);n=new WebAssembly.Function(i,t)}else{for(i={i:127,j:126,f:125,d:124},(r=[1,0,1,96]).push(3),n=0;3>n;++n)r.push(i["iii"[n]]);r.push(0),r[1]=r.length-2,n=new Uint8Array([0,97,115,109,1,0,0,0].concat(r,[2,7,1,1,101,1,102,0,0,7,5,1,1,102,0,0])),n=new WebAssembly.Module(n),n=new WebAssembly.Instance(n,{e:{f:t}}).exports.f}z.set(e,n)}return T.set(t,e),e}((function(t,n,r){for(var i,o=[],a=0;a{h||(c=require("fs"),h=require("path"))},s=function(t,e){return f(),t=h.normalize(t),c.readFileSync(t,e?void 0:"utf8")},l=t=>((t=s(t,!0)).buffer||(t=new Uint8Array(t)),t),u=(t,e,n)=>{f(),t=h.normalize(t),c.readFile(t,(function(t,r){t?n(t):e(r.buffer)}))},1{var e=new XMLHttpRequest;return e.open("GET",t,!1),e.send(null),e.responseText},m&&(l=t=>{var e=new XMLHttpRequest;return e.open("GET",t,!1),e.responseType="arraybuffer",e.send(null),new Uint8Array(e.response)}),u=(t,e,n)=>{var r=new XMLHttpRequest;r.open("GET",t,!0),r.responseType="arraybuffer",r.onload=()=>{200==r.status||0==r.status&&r.response?e(r.response):n()},r.onerror=n,r.send(null)});var b=i.print||console.log.bind(console),v=i.printErr||console.warn.bind(console);Object.assign(i,p),p=null,i.thisProgram&&(d=i.thisProgram);var T,E,w=[];function x(t){T.delete(z.get(t)),w.push(t)}function C(t){var e="i32";switch("*"===e.charAt(e.length-1)&&(e="i32"),e){case"i1":case"i8":P[t>>0]=0;break;case"i16":L[t>>1]=0;break;case"i32":D[t>>2]=0;break;case"i64":J=[0,(K=0,1<=+Math.abs(K)?0>>0:~~+Math.ceil((K-+(~~K>>>0))/4294967296)>>>0:0)],D[t>>2]=J[0],D[t+4>>2]=J[1];break;case"float":k[t>>2]=0;break;case"double":F[t>>3]=0;break;default:nt("invalid type for setValue: "+e)}}function M(t,e="i8"){switch("*"===e.charAt(e.length-1)&&(e="i32"),e){case"i1":case"i8":return P[t>>0];case"i16":return L[t>>1];case"i32":case"i64":return D[t>>2];case"float":return k[t>>2];case"double":return Number(F[t>>3]);default:nt("invalid type for getValue: "+e)}return null}i.wasmBinary&&(E=i.wasmBinary),i.noExitRuntime,"object"!=typeof WebAssembly&&nt("no native wasm support detected");var S,N=!1;function O(t,e,n,r){var o={string:function(t){var e=0;if(null!=t&&0!==t){var n=1+(t.length<<2);e=Ae(n),G(t,R,e,n)}return e},array:function(t){var e=Ae(t.length);return P.set(t,e),e}};t=i["_"+t];var a,s=[],u=0;if(r)for(var l=0;l=r);)++n;if(16(i=224==(240&i)?(15&i)<<12|o<<6|a:(7&i)<<18|o<<12|a<<6|63&t[e++])?r+=String.fromCharCode(i):(i-=65536,r+=String.fromCharCode(55296|i>>10,56320|1023&i))}}else r+=String.fromCharCode(i)}return r}function j(t,e){return t?B(R,t,e):""}function G(t,e,n,r){if(!(0=a&&(a=65536+((1023&a)<<10)|1023&t.charCodeAt(++o)),127>=a){if(n>=r)break;e[n++]=a}else{if(2047>=a){if(n+1>=r)break;e[n++]=192|a>>6}else{if(65535>=a){if(n+2>=r)break;e[n++]=224|a>>12}else{if(n+3>=r)break;e[n++]=240|a>>18,e[n++]=128|a>>12&63}e[n++]=128|a>>6&63}e[n++]=128|63&a}}return e[n]=0,n-i}function W(t){for(var e=0,n=0;n=r&&(r=65536+((1023&r)<<10)|1023&t.charCodeAt(++n)),127>=r?++e:e=2047>=r?e+2:65535>=r?e+3:e+4}return e}function q(t){var e=W(t)+1,n=xe(e);return n&&G(t,P,n,e),n}function H(){var t=S.buffer;I=t,i.HEAP8=P=new Int8Array(t),i.HEAP16=L=new Int16Array(t),i.HEAP32=D=new Int32Array(t),i.HEAPU8=R=new Uint8Array(t),i.HEAPU16=new Uint16Array(t),i.HEAPU32=new Uint32Array(t),i.HEAPF32=k=new Float32Array(t),i.HEAPF64=F=new Float64Array(t)}var z,V=[],X=[],Y=[];function Z(){var t=i.preRun.shift();V.unshift(t)}var Q,K,J,$=0,tt=null,et=null;function nt(t){throw i.onAbort&&i.onAbort(t),v(t="Aborted("+t+")"),N=!0,new WebAssembly.RuntimeError(t+". Build with -s ASSERTIONS=1 for more info.")}function rt(){return Q.startsWith("data:application/octet-stream;base64,")}if(i.preloadedImages={},i.preloadedAudios={},Q="sql-wasm.wasm",!rt()){var it=Q;Q=i.locateFile?i.locateFile(it,_):_+it}function ot(){var t=Q;try{if(t==Q&&E)return new Uint8Array(E);if(l)return l(t);throw"both async and sync fetching of the wasm failed"}catch(t){nt(t)}}function at(t){for(;0=e||(e=Math.max(e,n*(1048576>n?2:1.125)>>>0),0!=n&&(e=Math.max(e,256)),n=t.Ha,t.Ha=new Uint8Array(e),0=t.node.La)return 0;if(8<(t=Math.min(t.node.La-i,r))&&o.subarray)e.set(o.subarray(i,i+t),n);else for(r=0;re)throw new Nt(28);return e},kb:function(t,e,n){Tt.pb(t.node,e+n),t.node.La=Math.max(t.node.La,e+n)},$a:function(t,e,n,r,i,o){if(0!==e)throw new Nt(28);if(32768!=(61440&t.node.mode))throw new Nt(43);if(t=t.node.Ha,2&o||t.buffer!==I){if((0{if(!(t=ht("/",t)))return{path:"",node:null};if(8<(e=Object.assign({qb:!0,jb:0},e)).jb)throw new Nt(32);t=st(t.split("/").filter((t=>!!t)),!1);for(var n=Et,r="/",i=0;i{for(var e;;){if(t===t.parent)return t=t.Pa.tb,e?"/"!==t[t.length-1]?t+"/"+e:t+e:t;e=e?t.name+"/"+e:t.name,t=t.parent}},Pt=(t,e)=>{for(var n=0,r=0;r>>0)%Mt.length},Rt=t=>{var e=Pt(t.parent.id,t.name);if(Mt[e]===t)Mt[e]=t.Va;else for(e=Mt[e];e;){if(e.Va===t){e.Va=t.Va;break}e=e.Va}},Lt=(t,e)=>{var n;if(n=(n=Ut(t,"x"))?n:t.Fa.lookup?0:2)throw new Nt(n,t);for(n=Mt[Pt(t.id,e)];n;n=n.Va){var r=n.name;if(n.parent.id===t.id&&r===e)return n}return t.Fa.lookup(t,e)},Dt=(t,e,n,r)=>(t=new ve(t,e,n,r),e=Pt(t.parent.id,t.name),t.Va=Mt[e],Mt[e]=t),kt={r:0,"r+":2,w:577,"w+":578,a:1089,"a+":1090},Ft=t=>{var e=["r","w","rw"][3&t];return 512&t&&(e+="w"),e},Ut=(t,e)=>St?0:!e.includes("r")||292&t.mode?e.includes("w")&&!(146&t.mode)||e.includes("x")&&!(73&t.mode)?2:0:2,Bt=(t,e)=>{try{return Lt(t,e),20}catch(t){}return Ut(t,"wx")},jt=(t,e,n)=>{try{var r=Lt(t,e)}catch(t){return t.Ja}if(t=Ut(t,"wx"))return t;if(n){if(16384!=(61440&r.mode))return 54;if(r===r.parent||"/"===It(r))return 10}else if(16384==(61440&r.mode))return 31;return 0},Gt={open:t=>{t.Ga=wt[t.node.rdev].Ga,t.Ga.open&&t.Ga.open(t)},Sa:()=>{throw new Nt(70)}},Wt=(t,e)=>{wt[t]={Ga:e}},qt=(t,e)=>{var n="/"===e,r=!e;if(n&&Et)throw new Nt(10);if(!n&&!r){var i=At(e,{qb:!1});if(e=i.path,(i=i.node).Ua)throw new Nt(10);if(16384!=(61440&i.mode))throw new Nt(54)}e={type:t,Kb:{},tb:e,Db:[]},(t=t.Pa(e)).Pa=e,e.root=t,n?Et=t:i&&(i.Ua=e,i.Pa&&i.Pa.Db.push(e))},Ht=(t,e,n)=>{var r=At(t,{parent:!0}).node;if(!(t=ct(t))||"."===t||".."===t)throw new Nt(28);var i=Bt(r,t);if(i)throw new Nt(i);if(!r.Fa.Za)throw new Nt(63);return r.Fa.Za(r,t,e,n)},zt=(t,e)=>Ht(t,1023&(void 0!==e?e:511)|16384,0),Vt=(t,e,n)=>{void 0===n&&(n=e,e=438),Ht(t,8192|e,n)},Xt=(t,e)=>{if(!ht(t))throw new Nt(44);var n=At(e,{parent:!0}).node;if(!n)throw new Nt(44);e=ct(e);var r=Bt(n,e);if(r)throw new Nt(r);if(!n.Fa.symlink)throw new Nt(63);n.Fa.symlink(n,e,t)},Yt=t=>{var e=At(t,{parent:!0}).node;t=ct(t);var n=Lt(e,t),r=jt(e,t,!0);if(r)throw new Nt(r);if(!e.Fa.rmdir)throw new Nt(63);if(n.Ua)throw new Nt(10);e.Fa.rmdir(e,t),Rt(n)},Zt=t=>{var e=At(t,{parent:!0}).node;if(!e)throw new Nt(44);t=ct(t);var n=Lt(e,t),r=jt(e,t,!1);if(r)throw new Nt(r);if(!e.Fa.unlink)throw new Nt(63);if(n.Ua)throw new Nt(10);e.Fa.unlink(e,t),Rt(n)},Qt=t=>{if(!(t=At(t).node))throw new Nt(44);if(!t.Fa.readlink)throw new Nt(28);return ht(It(t.parent),t.Fa.readlink(t))},Kt=(t,e)=>{if(!(t=At(t,{Ra:!e}).node))throw new Nt(44);if(!t.Fa.Na)throw new Nt(63);return t.Fa.Na(t)},Jt=t=>Kt(t,!0),$t=(t,e)=>{if(!(t="string"==typeof t?At(t,{Ra:!0}).node:t).Fa.Ma)throw new Nt(63);t.Fa.Ma(t,{mode:4095&e|-4096&t.mode,timestamp:Date.now()})},te=(t,e)=>{if(0>e)throw new Nt(28);if(!(t="string"==typeof t?At(t,{Ra:!0}).node:t).Fa.Ma)throw new Nt(63);if(16384==(61440&t.mode))throw new Nt(31);if(32768!=(61440&t.mode))throw new Nt(28);var n=Ut(t,"w");if(n)throw new Nt(n);t.Fa.Ma(t,{size:e,timestamp:Date.now()})},ee=(t,e,n,r)=>{if(""===t)throw new Nt(44);if("string"==typeof e){var o=kt[e];if(void 0===o)throw Error("Unknown file open mode: "+e);e=o}if(n=64&e?4095&(void 0===n?438:n)|32768:0,"object"==typeof t)var a=t;else{t=ut(t);try{a=At(t,{Ra:!(131072&e)}).node}catch(t){}}if(o=!1,64&e)if(a){if(128&e)throw new Nt(20)}else a=Ht(t,n,0),o=!0;if(!a)throw new Nt(44);if(8192==(61440&a.mode)&&(e&=-513),65536&e&&16384!=(61440&a.mode))throw new Nt(54);if(!o&&(n=a?40960==(61440&a.mode)?32:16384==(61440&a.mode)&&("r"!==Ft(e)||512&e)?31:Ut(a,Ft(e)):44))throw new Nt(n);return 512&e&&te(a,0),e&=-131713,(r=((t,e)=>(mt||((mt=function(){}).prototype={}),t=Object.assign(new mt,t),e=((t=0,e=4096)=>{for(;t<=e;t++)if(!xt[t])return t;throw new Nt(33)})(e,void 0),t.fd=e,xt[e]=t))({node:a,path:It(a),flags:e,seekable:!0,position:0,Ga:a.Ga,Hb:[],error:!1},r)).Ga.open&&r.Ga.open(r),!i.logReadFiles||1&e||(gt||(gt={}),t in gt||(gt[t]=1)),r},ne=t=>{if(null===t.fd)throw new Nt(8);t.gb&&(t.gb=null);try{t.Ga.close&&t.Ga.close(t)}catch(t){throw t}finally{xt[t.fd]=null}t.fd=null},re=(t,e,n)=>{if(null===t.fd)throw new Nt(8);if(!t.seekable||!t.Ga.Sa)throw new Nt(70);if(0!=n&&1!=n&&2!=n)throw new Nt(28);t.position=t.Ga.Sa(t,e,n),t.Hb=[]},ie=(t,e,n,r,i)=>{if(0>r||0>i)throw new Nt(28);if(null===t.fd)throw new Nt(8);if(1==(2097155&t.flags))throw new Nt(8);if(16384==(61440&t.node.mode))throw new Nt(31);if(!t.Ga.read)throw new Nt(28);var o=void 0!==i;if(o){if(!t.seekable)throw new Nt(70)}else i=t.position;return e=t.Ga.read(t,e,n,r,i),o||(t.position+=e),e},oe=(t,e,n,r,i,o)=>{if(0>r||0>i)throw new Nt(28);if(null===t.fd)throw new Nt(8);if(0==(2097155&t.flags))throw new Nt(8);if(16384==(61440&t.node.mode))throw new Nt(31);if(!t.Ga.write)throw new Nt(28);t.seekable&&1024&t.flags&&re(t,0,2);var a=void 0!==i;if(a){if(!t.seekable)throw new Nt(70)}else i=t.position;return e=t.Ga.write(t,e,n,r,i,o),a||(t.position+=e),e},ae=t=>{var e,n=ee(t,n||0);t=Kt(t).size;var r=new Uint8Array(t);return ie(n,r,0,t,0),e=r,ne(n),e},se=()=>{Nt||((Nt=function(t,e){this.node=e,this.Gb=function(t){this.Ja=t},this.Gb(t),this.message="FS error"}).prototype=Error(),Nt.prototype.constructor=Nt,[44].forEach((t=>{Ot[t]=new Nt(t),Ot[t].stack=""})))},ue=(t,e)=>{var n=0;return t&&(n|=365),e&&(n|=146),n},le=(t,e,n)=>{t=ut("/dev/"+t);var r=ue(!!e,!!n);yt||(yt=64);var i=yt++<<8|0;Wt(i,{open:t=>{t.seekable=!1},close:()=>{n&&n.buffer&&n.buffer.length&&n(10)},read:(t,n,r,i)=>{for(var o=0,a=0;a{for(var o=0;o>2]=r.dev,D[n+4>>2]=0,D[n+8>>2]=r.ino,D[n+12>>2]=r.mode,D[n+16>>2]=r.nlink,D[n+20>>2]=r.uid,D[n+24>>2]=r.gid,D[n+28>>2]=r.rdev,D[n+32>>2]=0,J=[r.size>>>0,(K=r.size,1<=+Math.abs(K)?0>>0:~~+Math.ceil((K-+(~~K>>>0))/4294967296)>>>0:0)],D[n+40>>2]=J[0],D[n+44>>2]=J[1],D[n+48>>2]=4096,D[n+52>>2]=r.blocks,D[n+56>>2]=r.atime.getTime()/1e3|0,D[n+60>>2]=0,D[n+64>>2]=r.mtime.getTime()/1e3|0,D[n+68>>2]=0,D[n+72>>2]=r.ctime.getTime()/1e3|0,D[n+76>>2]=0,J=[r.ino>>>0,(K=r.ino,1<=+Math.abs(K)?0>>0:~~+Math.ceil((K-+(~~K>>>0))/4294967296)>>>0:0)],D[n+80>>2]=J[0],D[n+84>>2]=J[1],0}var pe,de=void 0;function ye(){return D[(de+=4)-4>>2]}function me(t){if(!(t=xt[t]))throw new Nt(8);return t}pe=g?()=>{var t=process.hrtime();return 1e3*t[0]+t[1]/1e6}:()=>performance.now();var ge,_e={};function be(){if(!ge){var t,e={USER:"web_user",LOGNAME:"web_user",PATH:"/",PWD:"/",HOME:"/home/web_user",LANG:("object"==typeof navigator&&navigator.languages&&navigator.languages[0]||"C").replace("-","_")+".UTF-8",_:d||"./this.program"};for(t in _e)void 0===_e[t]?delete e[t]:e[t]=_e[t];var n=[];for(t in e)n.push(t+"="+e[t]);ge=n}return ge}function ve(t,e,n,r){t||(t=this),this.parent=t,this.Pa=t.Pa,this.Ua=null,this.id=Ct++,this.name=e,this.mode=n,this.Fa={},this.Ga={},this.rdev=r}function Te(t,e){var n=Array(W(t)+1);return t=G(t,n,0,n.length),e&&(n.length=t),n}Object.defineProperties(ve.prototype,{read:{get:function(){return 365==(365&this.mode)},set:function(t){t?this.mode|=365:this.mode&=-366}},write:{get:function(){return 146==(146&this.mode)},set:function(t){t?this.mode|=146:this.mode&=-147}}}),se(),Mt=Array(4096),qt(Tt,"/"),zt("/tmp"),zt("/home"),zt("/home/web_user"),(()=>{zt("/dev"),Wt(259,{read:()=>0,write:(t,e,n,r)=>r}),Vt("/dev/null",259),pt(1280,bt),pt(1536,vt),Vt("/dev/tty",1280),Vt("/dev/tty1",1536);var t=function(){if("object"==typeof crypto&&"function"==typeof crypto.getRandomValues){var t=new Uint8Array(1);return function(){return crypto.getRandomValues(t),t[0]}}if(g)try{var e=require("crypto");return function(){return e.randomBytes(1)[0]}}catch(t){}return function(){nt("randomDevice")}}();le("random",t),le("urandom",t),zt("/dev/shm"),zt("/dev/shm/tmp")})(),(()=>{zt("/proc");var t=zt("/proc/self");zt("/proc/self/fd"),qt({Pa:()=>{var e=Dt(t,"fd",16895,73);return e.Fa={lookup:(t,e)=>{var n=xt[+e];if(!n)throw new Nt(8);return(t={parent:null,Pa:{tb:"fake"},Fa:{readlink:()=>n.path}}).parent=t}},e}},"/proc/self/fd")})();var Ee={a:function(t,e,n,r){nt("Assertion failed: "+j(t)+", at: "+[e?j(e):"unknown filename",n,r?j(r):"unknown function"])},h:function(t,e){try{return t=j(t),$t(t,e),0}catch(t){if(void 0===ce||!(t instanceof Nt))throw t;return-t.Ja}},H:function(t,e,n){try{if(e=he(t,e=j(e)),-8&n)var r=-28;else{var i=At(e,{Ra:!0}).node;i?(t="",4&n&&(t+="r"),2&n&&(t+="w"),1&n&&(t+="x"),r=t&&Ut(i,t)?-2:0):r=-44}return r}catch(t){if(void 0===ce||!(t instanceof Nt))throw t;return-t.Ja}},i:function(t,e){try{var n=xt[t];if(!n)throw new Nt(8);return $t(n.node,e),0}catch(t){if(void 0===ce||!(t instanceof Nt))throw t;return-t.Ja}},g:function(t){try{var e=xt[t];if(!e)throw new Nt(8);var n=e.node,r="string"==typeof n?At(n,{Ra:!0}).node:n;if(!r.Fa.Ma)throw new Nt(63);return r.Fa.Ma(r,{timestamp:Date.now()}),0}catch(t){if(void 0===ce||!(t instanceof Nt))throw t;return-t.Ja}},b:function(t,e,n){de=n;try{var r=me(t);switch(e){case 0:var i=ye();return 0>i?-28:ee(r.path,r.flags,0,i).fd;case 1:case 2:case 6:case 7:return 0;case 3:return r.flags;case 4:return i=ye(),r.flags|=i,0;case 5:return i=ye(),L[i+0>>1]=2,0;case 16:case 8:default:return-28;case 9:return D[we()>>2]=28,-1}}catch(t){if(void 0===ce||!(t instanceof Nt))throw t;return-t.Ja}},G:function(t,e){try{var n=me(t);return fe(Kt,n.path,e)}catch(t){if(void 0===ce||!(t instanceof Nt))throw t;return-t.Ja}},B:function(t,e){try{var n=xt[t];if(!n)throw new Nt(8);if(0==(2097155&n.flags))throw new Nt(28);return te(n.node,e),0}catch(t){if(void 0===ce||!(t instanceof Nt))throw t;return-t.Ja}},A:function(t,e){try{return 0===e?-28:e=r)var i=-28;else{var o=Qt(e),a=Math.min(r,W(o)),s=P[n+a];G(o,R,n,r+1),P[n+a]=s,i=a}return i}catch(t){if(void 0===ce||!(t instanceof Nt))throw t;return-t.Ja}},r:function(t){try{return t=j(t),Yt(t),0}catch(t){if(void 0===ce||!(t instanceof Nt))throw t;return-t.Ja}},F:function(t,e){try{return t=j(t),fe(Kt,t,e)}catch(t){if(void 0===ce||!(t instanceof Nt))throw t;return-t.Ja}},o:function(t,e,n){try{return e=he(t,e=j(e)),0===n?Zt(e):512===n?Yt(e):nt("Invalid flags passed to unlinkat"),0}catch(t){if(void 0===ce||!(t instanceof Nt))throw t;return-t.Ja}},m:function(t,e,n){try{if(e=he(t,e=j(e),!0),n){var r=D[n>>2],i=D[n+4>>2];o=1e3*r+i/1e6,a=1e3*(r=D[(n+=8)>>2])+(i=D[n+4>>2])/1e6}else var o=Date.now(),a=o;t=o;var s=At(e,{Ra:!0}).node;return s.Fa.Ma(s,{timestamp:Math.max(t,a)}),0}catch(t){if(void 0===ce||!(t instanceof Nt))throw t;return-t.Ja}},e:function(){return Date.now()},j:function(t,e){t=new Date(1e3*D[t>>2]),D[e>>2]=t.getSeconds(),D[e+4>>2]=t.getMinutes(),D[e+8>>2]=t.getHours(),D[e+12>>2]=t.getDate(),D[e+16>>2]=t.getMonth(),D[e+20>>2]=t.getFullYear()-1900,D[e+24>>2]=t.getDay();var n=new Date(t.getFullYear(),0,1);D[e+28>>2]=(t.getTime()-n.getTime())/864e5|0,D[e+36>>2]=-60*t.getTimezoneOffset();var r=new Date(t.getFullYear(),6,1).getTimezoneOffset();n=n.getTimezoneOffset(),D[e+32>>2]=0|(r!=n&&t.getTimezoneOffset()==Math.min(n,r))},v:function(t,e,n,r,i,o,a){try{var s=xt[i];if(!s)return-8;if(0!=(2&n)&&0==(2&r)&&2!=(2097155&s.flags))throw new Nt(2);if(1==(2097155&s.flags))throw new Nt(2);if(!s.Ga.$a)throw new Nt(43);var u=s.Ga.$a(s,t,e,o,n,r),l=u.Eb;return D[a>>2]=u.ub,l}catch(t){if(void 0===ce||!(t instanceof Nt))throw t;return-t.Ja}},w:function(t,e,n,r,i,o){try{var a=xt[i];if(a&&2&n){var s=R.slice(t,t+e);a&&a.Ga.ab&&a.Ga.ab(a,s,o,e,r)}}catch(t){if(void 0===ce||!(t instanceof Nt))throw t;return-t.Ja}},n:function t(e,n,r){t.Ab||(t.Ab=!0,function(t,e,n){function r(t){return(t=t.toTimeString().match(/\(([A-Za-z ]+)\)$/))?t[1]:"GMT"}var i=(new Date).getFullYear(),o=new Date(i,0,1),a=new Date(i,6,1);i=o.getTimezoneOffset();var s=a.getTimezoneOffset();D[t>>2]=60*Math.max(i,s),D[e>>2]=Number(i!=s),t=r(o),e=r(a),t=q(t),e=q(e),s>2]=t,D[n+4>>2]=e):(D[n>>2]=e,D[n+4>>2]=t)}(e,n,r))},p:function(){return 2147483648},d:pe,c:function(t){var e=R.length;if(2147483648<(t>>>=0))return!1;for(var n=1;4>=n;n*=2){var r=e*(1+.2/n);r=Math.min(r,t+100663296);var i=Math;r=Math.max(t,r),i=i.min.call(i,2147483648,r+(65536-r%65536)%65536);t:{try{S.grow(i-I.byteLength+65535>>>16),H();var o=1;break t}catch(t){}o=void 0}if(o)return!0}return!1},y:function(t,e){var n=0;return be().forEach((function(r,i){var o=e+n;for(i=D[t+4*i>>2]=o,o=0;o>0]=r.charCodeAt(o);P[i>>0]=0,n+=r.length+1})),0},z:function(t,e){var n=be();D[t>>2]=n.length;var r=0;return n.forEach((function(t){r+=t.length+1})),D[e>>2]=r,0},f:function(t){try{var e=me(t);return ne(e),0}catch(t){if(void 0===ce||!(t instanceof Nt))throw t;return t.Ja}},l:function(t,e){try{var n=me(t);return P[e>>0]=n.tty?2:16384==(61440&n.mode)?3:40960==(61440&n.mode)?7:4,0}catch(t){if(void 0===ce||!(t instanceof Nt))throw t;return t.Ja}},t:function(t,e,n,r){try{t:{for(var i=me(t),o=t=0;o>2],s=ie(i,P,D[e+8*o>>2],a,void 0);if(0>s){var u=-1;break t}if(t+=s,s>2]=u,0}catch(t){if(void 0===ce||!(t instanceof Nt))throw t;return t.Ja}},k:function(t,e,n,r,i){try{var o=me(t);return-9007199254740992>=(t=4294967296*n+(e>>>0))||9007199254740992<=t?-61:(re(o,t,r),J=[o.position>>>0,(K=o.position,1<=+Math.abs(K)?0>>0:~~+Math.ceil((K-+(~~K>>>0))/4294967296)>>>0:0)],D[i>>2]=J[0],D[i+4>>2]=J[1],o.gb&&0===t&&0===r&&(o.gb=null),0)}catch(t){if(void 0===ce||!(t instanceof Nt))throw t;return t.Ja}},C:function(t){try{var e=me(t);return e.Ga&&e.Ga.fsync?-e.Ga.fsync(e):0}catch(t){if(void 0===ce||!(t instanceof Nt))throw t;return t.Ja}},q:function(t,e,n,r){try{t:{for(var i=me(t),o=t=0;o>2],D[e+(8*o+4)>>2],void 0);if(0>a){var s=-1;break t}t+=a}s=t}return D[r>>2]=s,0}catch(t){if(void 0===ce||!(t instanceof Nt))throw t;return t.Ja}}};!function(){function t(t){i.asm=t.exports,S=i.asm.I,H(),z=i.asm.za,X.unshift(i.asm.J),$--,i.monitorRunDependencies&&i.monitorRunDependencies($),0==$&&(null!==tt&&(clearInterval(tt),tt=null),et&&(t=et,et=null,t()))}function e(e){t(e.instance)}function n(t){return function(){if(!E&&(y||m)){if("function"==typeof fetch&&!Q.startsWith("file://"))return fetch(Q,{credentials:"same-origin"}).then((function(t){if(!t.ok)throw"failed to load wasm binary file at '"+Q+"'";return t.arrayBuffer()})).catch((function(){return ot()}));if(u)return new Promise((function(t,e){u(Q,(function(e){t(new Uint8Array(e))}),e)}))}return Promise.resolve().then((function(){return ot()}))}().then((function(t){return WebAssembly.instantiate(t,r)})).then((function(t){return t})).then(t,(function(t){v("failed to asynchronously prepare wasm: "+t),nt(t)}))}var r={a:Ee};if($++,i.monitorRunDependencies&&i.monitorRunDependencies($),i.instantiateWasm)try{return i.instantiateWasm(r,t)}catch(t){return v("Module.instantiateWasm callback failed with error: "+t),!1}E||"function"!=typeof WebAssembly.instantiateStreaming||rt()||Q.startsWith("file://")||"function"!=typeof fetch?n(e):fetch(Q,{credentials:"same-origin"}).then((function(t){return WebAssembly.instantiateStreaming(t,r).then(e,(function(t){return v("wasm streaming compile failed: "+t),v("falling back to ArrayBuffer instantiation"),n(e)}))}))}(),i.___wasm_call_ctors=function(){return(i.___wasm_call_ctors=i.asm.J).apply(null,arguments)},i._sqlite3_free=function(){return(i._sqlite3_free=i.asm.K).apply(null,arguments)},i._sqlite3_value_double=function(){return(i._sqlite3_value_double=i.asm.L).apply(null,arguments)},i._sqlite3_value_text=function(){return(i._sqlite3_value_text=i.asm.M).apply(null,arguments)};var we=i.___errno_location=function(){return(we=i.___errno_location=i.asm.N).apply(null,arguments)};i._sqlite3_prepare_v2=function(){return(i._sqlite3_prepare_v2=i.asm.O).apply(null,arguments)},i._sqlite3_step=function(){return(i._sqlite3_step=i.asm.P).apply(null,arguments)},i._sqlite3_finalize=function(){return(i._sqlite3_finalize=i.asm.Q).apply(null,arguments)},i._sqlite3_reset=function(){return(i._sqlite3_reset=i.asm.R).apply(null,arguments)},i._sqlite3_value_int=function(){return(i._sqlite3_value_int=i.asm.S).apply(null,arguments)},i._sqlite3_clear_bindings=function(){return(i._sqlite3_clear_bindings=i.asm.T).apply(null,arguments)},i._sqlite3_value_blob=function(){return(i._sqlite3_value_blob=i.asm.U).apply(null,arguments)},i._sqlite3_value_bytes=function(){return(i._sqlite3_value_bytes=i.asm.V).apply(null,arguments)},i._sqlite3_value_type=function(){return(i._sqlite3_value_type=i.asm.W).apply(null,arguments)},i._sqlite3_result_blob=function(){return(i._sqlite3_result_blob=i.asm.X).apply(null,arguments)},i._sqlite3_result_double=function(){return(i._sqlite3_result_double=i.asm.Y).apply(null,arguments)},i._sqlite3_result_error=function(){return(i._sqlite3_result_error=i.asm.Z).apply(null,arguments)},i._sqlite3_result_int=function(){return(i._sqlite3_result_int=i.asm._).apply(null,arguments)},i._sqlite3_result_int64=function(){return(i._sqlite3_result_int64=i.asm.$).apply(null,arguments)},i._sqlite3_result_null=function(){return(i._sqlite3_result_null=i.asm.aa).apply(null,arguments)},i._sqlite3_result_text=function(){return(i._sqlite3_result_text=i.asm.ba).apply(null,arguments)},i._sqlite3_sql=function(){return(i._sqlite3_sql=i.asm.ca).apply(null,arguments)},i._sqlite3_column_count=function(){return(i._sqlite3_column_count=i.asm.da).apply(null,arguments)},i._sqlite3_data_count=function(){return(i._sqlite3_data_count=i.asm.ea).apply(null,arguments)},i._sqlite3_column_blob=function(){return(i._sqlite3_column_blob=i.asm.fa).apply(null,arguments)},i._sqlite3_column_bytes=function(){return(i._sqlite3_column_bytes=i.asm.ga).apply(null,arguments)},i._sqlite3_column_double=function(){return(i._sqlite3_column_double=i.asm.ha).apply(null,arguments)},i._sqlite3_column_text=function(){return(i._sqlite3_column_text=i.asm.ia).apply(null,arguments)},i._sqlite3_column_type=function(){return(i._sqlite3_column_type=i.asm.ja).apply(null,arguments)},i._sqlite3_column_name=function(){return(i._sqlite3_column_name=i.asm.ka).apply(null,arguments)},i._sqlite3_bind_blob=function(){return(i._sqlite3_bind_blob=i.asm.la).apply(null,arguments)},i._sqlite3_bind_double=function(){return(i._sqlite3_bind_double=i.asm.ma).apply(null,arguments)},i._sqlite3_bind_int=function(){return(i._sqlite3_bind_int=i.asm.na).apply(null,arguments)},i._sqlite3_bind_text=function(){return(i._sqlite3_bind_text=i.asm.oa).apply(null,arguments)},i._sqlite3_bind_parameter_index=function(){return(i._sqlite3_bind_parameter_index=i.asm.pa).apply(null,arguments)},i._sqlite3_normalized_sql=function(){return(i._sqlite3_normalized_sql=i.asm.qa).apply(null,arguments)},i._sqlite3_errmsg=function(){return(i._sqlite3_errmsg=i.asm.ra).apply(null,arguments)},i._sqlite3_exec=function(){return(i._sqlite3_exec=i.asm.sa).apply(null,arguments)},i._sqlite3_changes=function(){return(i._sqlite3_changes=i.asm.ta).apply(null,arguments)},i._sqlite3_close_v2=function(){return(i._sqlite3_close_v2=i.asm.ua).apply(null,arguments)},i._sqlite3_create_function_v2=function(){return(i._sqlite3_create_function_v2=i.asm.va).apply(null,arguments)},i._sqlite3_open=function(){return(i._sqlite3_open=i.asm.wa).apply(null,arguments)};var xe=i._malloc=function(){return(xe=i._malloc=i.asm.xa).apply(null,arguments)},Ce=i._free=function(){return(Ce=i._free=i.asm.ya).apply(null,arguments)};i._RegisterExtensionFunctions=function(){return(i._RegisterExtensionFunctions=i.asm.Aa).apply(null,arguments)};var Me,Se=i._emscripten_builtin_memalign=function(){return(Se=i._emscripten_builtin_memalign=i.asm.Ba).apply(null,arguments)},Ne=i.stackSave=function(){return(Ne=i.stackSave=i.asm.Ca).apply(null,arguments)},Oe=i.stackRestore=function(){return(Oe=i.stackRestore=i.asm.Da).apply(null,arguments)},Ae=i.stackAlloc=function(){return(Ae=i.stackAlloc=i.asm.Ea).apply(null,arguments)};function Ie(){function t(){if(!Me&&(Me=!0,i.calledRun=!0,!N)){if(i.noFSInit||dt||(dt=!0,se(),i.stdin=i.stdin,i.stdout=i.stdout,i.stderr=i.stderr,i.stdin?le("stdin",i.stdin):Xt("/dev/tty","/dev/stdin"),i.stdout?le("stdout",null,i.stdout):Xt("/dev/tty","/dev/stdout"),i.stderr?le("stderr",null,i.stderr):Xt("/dev/tty1","/dev/stderr"),ee("/dev/stdin",0),ee("/dev/stdout",1),ee("/dev/stderr",1)),St=!1,at(X),i.onRuntimeInitialized&&i.onRuntimeInitialized(),i.postRun)for("function"==typeof i.postRun&&(i.postRun=[i.postRun]);i.postRun.length;){var t=i.postRun.shift();Y.unshift(t)}at(Y)}}if(!(0<$)){if(i.preRun)for("function"==typeof i.preRun&&(i.preRun=[i.preRun]);i.preRun.length;)Z();at(V),0<$||(i.setStatus?(i.setStatus("Running..."),setTimeout((function(){setTimeout((function(){i.setStatus("")}),1),t()}),1)):t())}}if(i.cwrap=function(t,e,n,r){var o=(n=n||[]).every((function(t){return"number"===t}));return"string"!==e&&o&&!r?i["_"+t]:function(){return O(t,e,n,arguments)}},i.UTF8ToString=j,i.stackSave=Ne,i.stackRestore=Oe,i.stackAlloc=Ae,et=function t(){Me||Ie(),Me||(et=t)},i.run=Ie,i.preInit)for("function"==typeof i.preInit&&(i.preInit=[i.preInit]);0{var r=n(8764),i=r.Buffer;function o(t,e){for(var n in t)e[n]=t[n]}function a(t,e,n){return i(t,e,n)}i.from&&i.alloc&&i.allocUnsafe&&i.allocUnsafeSlow?t.exports=r:(o(r,e),e.Buffer=a),a.prototype=Object.create(i.prototype),o(i,a),a.from=function(t,e,n){if("number"==typeof t)throw new TypeError("Argument must not be a number");return i(t,e,n)},a.alloc=function(t,e,n){if("number"!=typeof t)throw new TypeError("Argument must be a number");var r=i(t);return void 0!==e?"string"==typeof n?r.fill(e,n):r.fill(e):r.fill(0),r},a.allocUnsafe=function(t){if("number"!=typeof t)throw new TypeError("Argument must be a number");return i(t)},a.allocUnsafeSlow=function(t){if("number"!=typeof t)throw new TypeError("Argument must be a number");return r.SlowBuffer(t)}},6479:(t,e,n)=>{var r;!function(){"use strict";function i(t,e,n){var r=e.x,i=e.y,o=n.x-r,a=n.y-i;if(0!==o||0!==a){var s=((t.x-r)*o+(t.y-i)*a)/(o*o+a*a);s>1?(r=n.x,i=n.y):s>0&&(r+=o*s,i+=a*s)}return(o=t.x-r)*o+(a=t.y-i)*a}function o(t,e,n,r,a){for(var s,u=r,l=e+1;lu&&(s=l,u=c)}u>r&&(s-e>1&&o(t,e,s,r,a),a.push(t[s]),n-s>1&&o(t,s,n,r,a))}function a(t,e){var n=t.length-1,r=[t[0]];return o(t,0,n,e,r),r.push(t[n]),r}function s(t,e,n){if(t.length<=2)return t;var r=void 0!==e?e*e:1;return t=n?t:function(t,e){for(var n,r,i,o,a,s=t[0],u=[s],l=1,c=t.length;le&&(u.push(n),s=n);return s!==n&&u.push(n),u}(t,r),a(t,r)}void 0===(r=function(){return s}.call(e,n,e,t))||(t.exports=r)}()},8501:(t,e,n)=>{var r=n(3570),i=n(5676),o=n(7529),a=n(584),s=n(8575),u=e;u.request=function(t,e){t="string"==typeof t?s.parse(t):o(t);var i=-1===n.g.location.protocol.search(/^https?:$/)?"http:":"",a=t.protocol||i,u=t.hostname||t.host,l=t.port,c=t.path||"/";u&&-1!==u.indexOf(":")&&(u="["+u+"]"),t.url=(u?a+"//"+u:"")+(l?":"+l:"")+c,t.method=(t.method||"GET").toUpperCase(),t.headers=t.headers||{};var h=new r(t);return e&&h.on("response",e),h},u.get=function(t,e){var n=u.request(t,e);return n.end(),n},u.ClientRequest=r,u.IncomingMessage=i.IncomingMessage,u.Agent=function(){},u.Agent.defaultMaxSockets=4,u.globalAgent=new u.Agent,u.STATUS_CODES=a,u.METHODS=["CHECKOUT","CONNECT","COPY","DELETE","GET","HEAD","LOCK","M-SEARCH","MERGE","MKACTIVITY","MKCOL","MOVE","NOTIFY","OPTIONS","PATCH","POST","PROPFIND","PROPPATCH","PURGE","PUT","REPORT","SEARCH","SUBSCRIBE","TRACE","UNLOCK","UNSUBSCRIBE"]},8725:(t,e,n)=>{var r;function i(){if(void 0!==r)return r;if(n.g.XMLHttpRequest){r=new n.g.XMLHttpRequest;try{r.open("GET",n.g.XDomainRequest?"/":"https://example.com")}catch(t){r=null}}else r=null;return r}function o(t){var e=i();if(!e)return!1;try{return e.responseType=t,e.responseType===t}catch(t){}return!1}function a(t){return"function"==typeof t}e.fetch=a(n.g.fetch)&&a(n.g.ReadableStream),e.writableStream=a(n.g.WritableStream),e.abortController=a(n.g.AbortController),e.arraybuffer=e.fetch||o("arraybuffer"),e.msstream=!e.fetch&&o("ms-stream"),e.mozchunkedarraybuffer=!e.fetch&&o("moz-chunked-arraybuffer"),e.overrideMimeType=e.fetch||!!i()&&a(i().overrideMimeType),r=null},3570:(t,e,n)=>{var r=n(3085).Buffer,i=n(4155),o=n(8725),a=n(5717),s=n(5676),u=n(925),l=s.IncomingMessage,c=s.readyStates,h=t.exports=function(t){var e,n=this;u.Writable.call(n),n._opts=t,n._body=[],n._headers={},t.auth&&n.setHeader("Authorization","Basic "+r.from(t.auth).toString("base64")),Object.keys(t.headers).forEach((function(e){n.setHeader(e,t.headers[e])}));var i=!0;if("disable-fetch"===t.mode||"requestTimeout"in t&&!o.abortController)i=!1,e=!0;else if("prefer-streaming"===t.mode)e=!1;else if("allow-wrong-content-type"===t.mode)e=!o.overrideMimeType;else{if(t.mode&&"default"!==t.mode&&"prefer-fast"!==t.mode)throw new Error("Invalid value for opts.mode");e=!0}n._mode=function(t,e){return o.fetch&&e?"fetch":o.mozchunkedarraybuffer?"moz-chunked-arraybuffer":o.msstream?"ms-stream":o.arraybuffer&&t?"arraybuffer":"text"}(e,i),n._fetchTimer=null,n._socketTimeout=null,n._socketTimer=null,n.on("finish",(function(){n._onFinish()}))};a(h,u.Writable),h.prototype.setHeader=function(t,e){var n=t.toLowerCase();-1===f.indexOf(n)&&(this._headers[n]={name:t,value:e})},h.prototype.getHeader=function(t){var e=this._headers[t.toLowerCase()];return e?e.value:null},h.prototype.removeHeader=function(t){delete this._headers[t.toLowerCase()]},h.prototype._onFinish=function(){var t=this;if(!t._destroyed){var e=t._opts;"timeout"in e&&0!==e.timeout&&t.setTimeout(e.timeout);var r=t._headers,a=null;"GET"!==e.method&&"HEAD"!==e.method&&(a=new Blob(t._body,{type:(r["content-type"]||{}).value||""}));var s=[];if(Object.keys(r).forEach((function(t){var e=r[t].name,n=r[t].value;Array.isArray(n)?n.forEach((function(t){s.push([e,t])})):s.push([e,n])})),"fetch"===t._mode){var u=null;if(o.abortController){var l=new AbortController;u=l.signal,t._fetchAbortController=l,"requestTimeout"in e&&0!==e.requestTimeout&&(t._fetchTimer=n.g.setTimeout((function(){t.emit("requestTimeout"),t._fetchAbortController&&t._fetchAbortController.abort()}),e.requestTimeout))}n.g.fetch(t._opts.url,{method:t._opts.method,headers:s,body:a||void 0,mode:"cors",credentials:e.withCredentials?"include":"same-origin",signal:u}).then((function(e){t._fetchResponse=e,t._resetTimers(!1),t._connect()}),(function(e){t._resetTimers(!0),t._destroyed||t.emit("error",e)}))}else{var h=t._xhr=new n.g.XMLHttpRequest;try{h.open(t._opts.method,t._opts.url,!0)}catch(e){return void i.nextTick((function(){t.emit("error",e)}))}"responseType"in h&&(h.responseType=t._mode),"withCredentials"in h&&(h.withCredentials=!!e.withCredentials),"text"===t._mode&&"overrideMimeType"in h&&h.overrideMimeType("text/plain; charset=x-user-defined"),"requestTimeout"in e&&(h.timeout=e.requestTimeout,h.ontimeout=function(){t.emit("requestTimeout")}),s.forEach((function(t){h.setRequestHeader(t[0],t[1])})),t._response=null,h.onreadystatechange=function(){switch(h.readyState){case c.LOADING:case c.DONE:t._onXHRProgress()}},"moz-chunked-arraybuffer"===t._mode&&(h.onprogress=function(){t._onXHRProgress()}),h.onerror=function(){t._destroyed||(t._resetTimers(!0),t.emit("error",new Error("XHR error")))};try{h.send(a)}catch(e){return void i.nextTick((function(){t.emit("error",e)}))}}}},h.prototype._onXHRProgress=function(){var t=this;t._resetTimers(!1),function(t){try{var e=t.status;return null!==e&&0!==e}catch(t){return!1}}(t._xhr)&&!t._destroyed&&(t._response||t._connect(),t._response._onXHRProgress(t._resetTimers.bind(t)))},h.prototype._connect=function(){var t=this;t._destroyed||(t._response=new l(t._xhr,t._fetchResponse,t._mode,t._resetTimers.bind(t)),t._response.on("error",(function(e){t.emit("error",e)})),t.emit("response",t._response))},h.prototype._write=function(t,e,n){this._body.push(t),n()},h.prototype._resetTimers=function(t){var e=this;n.g.clearTimeout(e._socketTimer),e._socketTimer=null,t?(n.g.clearTimeout(e._fetchTimer),e._fetchTimer=null):e._socketTimeout&&(e._socketTimer=n.g.setTimeout((function(){e.emit("timeout")}),e._socketTimeout))},h.prototype.abort=h.prototype.destroy=function(t){var e=this;e._destroyed=!0,e._resetTimers(!0),e._response&&(e._response._destroyed=!0),e._xhr?e._xhr.abort():e._fetchAbortController&&e._fetchAbortController.abort(),t&&e.emit("error",t)},h.prototype.end=function(t,e,n){"function"==typeof t&&(n=t,t=void 0),u.Writable.prototype.end.call(this,t,e,n)},h.prototype.setTimeout=function(t,e){var n=this;e&&n.once("timeout",e),n._socketTimeout=t,n._resetTimers(!1)},h.prototype.flushHeaders=function(){},h.prototype.setNoDelay=function(){},h.prototype.setSocketKeepAlive=function(){};var f=["accept-charset","accept-encoding","access-control-request-headers","access-control-request-method","connection","content-length","cookie","cookie2","date","dnt","expect","host","keep-alive","origin","referer","te","trailer","transfer-encoding","upgrade","via"]},5676:(t,e,n)=>{var r=n(4155),i=n(3085).Buffer,o=n(8725),a=n(5717),s=n(925),u=e.readyStates={UNSENT:0,OPENED:1,HEADERS_RECEIVED:2,LOADING:3,DONE:4},l=e.IncomingMessage=function(t,e,n,a){var u=this;if(s.Readable.call(u),u._mode=n,u.headers={},u.rawHeaders=[],u.trailers={},u.rawTrailers=[],u.on("end",(function(){r.nextTick((function(){u.emit("close")}))})),"fetch"===n){if(u._fetchResponse=e,u.url=e.url,u.statusCode=e.status,u.statusMessage=e.statusText,e.headers.forEach((function(t,e){u.headers[e.toLowerCase()]=t,u.rawHeaders.push(e,t)})),o.writableStream){var l=new WritableStream({write:function(t){return a(!1),new Promise((function(e,n){u._destroyed?n():u.push(i.from(t))?e():u._resumeFetch=e}))},close:function(){a(!0),u._destroyed||u.push(null)},abort:function(t){a(!0),u._destroyed||u.emit("error",t)}});try{return void e.body.pipeTo(l).catch((function(t){a(!0),u._destroyed||u.emit("error",t)}))}catch(t){}}var c=e.body.getReader();!function t(){c.read().then((function(e){u._destroyed||(a(e.done),e.done?u.push(null):(u.push(i.from(e.value)),t()))})).catch((function(t){a(!0),u._destroyed||u.emit("error",t)}))}()}else if(u._xhr=t,u._pos=0,u.url=t.responseURL,u.statusCode=t.status,u.statusMessage=t.statusText,t.getAllResponseHeaders().split(/\r?\n/).forEach((function(t){var e=t.match(/^([^:]+):\s*(.*)/);if(e){var n=e[1].toLowerCase();"set-cookie"===n?(void 0===u.headers[n]&&(u.headers[n]=[]),u.headers[n].push(e[2])):void 0!==u.headers[n]?u.headers[n]+=", "+e[2]:u.headers[n]=e[2],u.rawHeaders.push(e[1],e[2])}})),u._charset="x-user-defined",!o.overrideMimeType){var h=u.rawHeaders["mime-type"];if(h){var f=h.match(/;\s*charset=([^;])(;|$)/);f&&(u._charset=f[1].toLowerCase())}u._charset||(u._charset="utf-8")}};a(l,s.Readable),l.prototype._read=function(){var t=this._resumeFetch;t&&(this._resumeFetch=null,t())},l.prototype._onXHRProgress=function(t){var e=this,r=e._xhr,o=null;switch(e._mode){case"text":if((o=r.responseText).length>e._pos){var a=o.substr(e._pos);if("x-user-defined"===e._charset){for(var s=i.alloc(a.length),l=0;le._pos&&(e.push(i.from(new Uint8Array(c.result.slice(e._pos)))),e._pos=c.result.byteLength)},c.onload=function(){t(!0),e.push(null)},c.readAsArrayBuffer(o)}e._xhr.readyState===u.DONE&&"ms-stream"!==e._mode&&(t(!0),e.push(null))}},7303:t=>{"use strict";var e={};function n(t,n,r){r||(r=Error);var i=function(t){var e,r;function i(e,r,i){return t.call(this,function(t,e,r){return"string"==typeof n?n:n(t,e,r)}(e,r,i))||this}return r=t,(e=i).prototype=Object.create(r.prototype),e.prototype.constructor=e,e.__proto__=r,i}(r);i.prototype.name=r.name,i.prototype.code=t,e[t]=i}function r(t,e){if(Array.isArray(t)){var n=t.length;return t=t.map((function(t){return String(t)})),n>2?"one of ".concat(e," ").concat(t.slice(0,n-1).join(", "),", or ")+t[n-1]:2===n?"one of ".concat(e," ").concat(t[0]," or ").concat(t[1]):"of ".concat(e," ").concat(t[0])}return"of ".concat(e," ").concat(String(t))}n("ERR_INVALID_OPT_VALUE",(function(t,e){return'The value "'+e+'" is invalid for option "'+t+'"'}),TypeError),n("ERR_INVALID_ARG_TYPE",(function(t,e,n){var i,o,a,s,u;if("string"==typeof e&&(o="not ",e.substr(0,o.length)===o)?(i="must not be",e=e.replace(/^not /,"")):i="must be",function(t,e,n){return(void 0===n||n>t.length)&&(n=t.length),t.substring(n-e.length,n)===e}(t," argument"))a="The ".concat(t," ").concat(i," ").concat(r(e,"type"));else{var l=("number"!=typeof u&&(u=0),u+".".length>(s=t).length||-1===s.indexOf(".",u)?"argument":"property");a='The "'.concat(t,'" ').concat(l," ").concat(i," ").concat(r(e,"type"))}return a+". Received type ".concat(typeof n)}),TypeError),n("ERR_STREAM_PUSH_AFTER_EOF","stream.push() after EOF"),n("ERR_METHOD_NOT_IMPLEMENTED",(function(t){return"The "+t+" method is not implemented"})),n("ERR_STREAM_PREMATURE_CLOSE","Premature close"),n("ERR_STREAM_DESTROYED",(function(t){return"Cannot call "+t+" after a stream was destroyed"})),n("ERR_MULTIPLE_CALLBACK","Callback called multiple times"),n("ERR_STREAM_CANNOT_PIPE","Cannot pipe, not readable"),n("ERR_STREAM_WRITE_AFTER_END","write after end"),n("ERR_STREAM_NULL_VALUES","May not write null values to stream",TypeError),n("ERR_UNKNOWN_ENCODING",(function(t){return"Unknown encoding: "+t}),TypeError),n("ERR_STREAM_UNSHIFT_AFTER_END_EVENT","stream.unshift() after end event"),t.exports.q=e},9560:(t,e,n)=>{"use strict";var r=n(4155),i=Object.keys||function(t){var e=[];for(var n in t)e.push(n);return e};t.exports=c;var o=n(4002),a=n(3313);n(5717)(c,o);for(var s=i(a.prototype),u=0;u{"use strict";t.exports=i;var r=n(1846);function i(t){if(!(this instanceof i))return new i(t);r.call(this,t)}n(5717)(i,r),i.prototype._transform=function(t,e,n){n(null,t)}},4002:(t,e,n)=>{"use strict";var r,i=n(4155);t.exports=C,C.ReadableState=x,n(7187).EventEmitter;var o,a=function(t,e){return t.listeners(e).length},s=n(1463),u=n(8764).Buffer,l=n.g.Uint8Array||function(){},c=n(3646);o=c&&c.debuglog?c.debuglog("stream"):function(){};var h,f,p,d=n(6641),y=n(4910),m=n(7855).getHighWaterMark,g=n(7303).q,_=g.ERR_INVALID_ARG_TYPE,b=g.ERR_STREAM_PUSH_AFTER_EOF,v=g.ERR_METHOD_NOT_IMPLEMENTED,T=g.ERR_STREAM_UNSHIFT_AFTER_END_EVENT;n(5717)(C,s);var E=y.errorOrDestroy,w=["error","close","destroy","pause","resume"];function x(t,e,i){r=r||n(9560),t=t||{},"boolean"!=typeof i&&(i=e instanceof r),this.objectMode=!!t.objectMode,i&&(this.objectMode=this.objectMode||!!t.readableObjectMode),this.highWaterMark=m(this,t,"readableHighWaterMark",i),this.buffer=new d,this.length=0,this.pipes=null,this.pipesCount=0,this.flowing=null,this.ended=!1,this.endEmitted=!1,this.reading=!1,this.sync=!0,this.needReadable=!1,this.emittedReadable=!1,this.readableListening=!1,this.resumeScheduled=!1,this.paused=!0,this.emitClose=!1!==t.emitClose,this.autoDestroy=!!t.autoDestroy,this.destroyed=!1,this.defaultEncoding=t.defaultEncoding||"utf8",this.awaitDrain=0,this.readingMore=!1,this.decoder=null,this.encoding=null,t.encoding&&(h||(h=n(2553).s),this.decoder=new h(t.encoding),this.encoding=t.encoding)}function C(t){if(r=r||n(9560),!(this instanceof C))return new C(t);var e=this instanceof r;this._readableState=new x(t,this,e),this.readable=!0,t&&("function"==typeof t.read&&(this._read=t.read),"function"==typeof t.destroy&&(this._destroy=t.destroy)),s.call(this)}function M(t,e,n,r,i){o("readableAddChunk",e);var a,s=t._readableState;if(null===e)s.reading=!1,function(t,e){if(o("onEofChunk"),!e.ended){if(e.decoder){var n=e.decoder.end();n&&n.length&&(e.buffer.push(n),e.length+=e.objectMode?1:n.length)}e.ended=!0,e.sync?A(t):(e.needReadable=!1,e.emittedReadable||(e.emittedReadable=!0,I(t)))}}(t,s);else if(i||(a=function(t,e){var n,r;return r=e,u.isBuffer(r)||r instanceof l||"string"==typeof e||void 0===e||t.objectMode||(n=new _("chunk",["string","Buffer","Uint8Array"],e)),n}(s,e)),a)E(t,a);else if(s.objectMode||e&&e.length>0)if("string"==typeof e||s.objectMode||Object.getPrototypeOf(e)===u.prototype||(e=function(t){return u.from(t)}(e)),r)s.endEmitted?E(t,new T):S(t,s,e,!0);else if(s.ended)E(t,new b);else{if(s.destroyed)return!1;s.reading=!1,s.decoder&&!n?(e=s.decoder.write(e),s.objectMode||0!==e.length?S(t,s,e,!1):P(t,s)):S(t,s,e,!1)}else r||(s.reading=!1,P(t,s));return!s.ended&&(s.lengthe.highWaterMark&&(e.highWaterMark=function(t){return t>=N?t=N:(t--,t|=t>>>1,t|=t>>>2,t|=t>>>4,t|=t>>>8,t|=t>>>16,t++),t}(t)),t<=e.length?t:e.ended?e.length:(e.needReadable=!0,0))}function A(t){var e=t._readableState;o("emitReadable",e.needReadable,e.emittedReadable),e.needReadable=!1,e.emittedReadable||(o("emitReadable",e.flowing),e.emittedReadable=!0,i.nextTick(I,t))}function I(t){var e=t._readableState;o("emitReadable_",e.destroyed,e.length,e.ended),e.destroyed||!e.length&&!e.ended||(t.emit("readable"),e.emittedReadable=!1),e.needReadable=!e.flowing&&!e.ended&&e.length<=e.highWaterMark,F(t)}function P(t,e){e.readingMore||(e.readingMore=!0,i.nextTick(R,t,e))}function R(t,e){for(;!e.reading&&!e.ended&&(e.length0,e.resumeScheduled&&!e.paused?e.flowing=!0:t.listenerCount("data")>0&&t.resume()}function D(t){o("readable nexttick read 0"),t.read(0)}function k(t,e){o("resume",e.reading),e.reading||t.read(0),e.resumeScheduled=!1,t.emit("resume"),F(t),e.flowing&&!e.reading&&t.read(0)}function F(t){var e=t._readableState;for(o("flow",e.flowing);e.flowing&&null!==t.read(););}function U(t,e){return 0===e.length?null:(e.objectMode?n=e.buffer.shift():!t||t>=e.length?(n=e.decoder?e.buffer.join(""):1===e.buffer.length?e.buffer.first():e.buffer.concat(e.length),e.buffer.clear()):n=e.buffer.consume(t,e.decoder),n);var n}function B(t){var e=t._readableState;o("endReadable",e.endEmitted),e.endEmitted||(e.ended=!0,i.nextTick(j,e,t))}function j(t,e){if(o("endReadableNT",t.endEmitted,t.length),!t.endEmitted&&0===t.length&&(t.endEmitted=!0,e.readable=!1,e.emit("end"),t.autoDestroy)){var n=e._writableState;(!n||n.autoDestroy&&n.finished)&&e.destroy()}}function G(t,e){for(var n=0,r=t.length;n=e.highWaterMark:e.length>0)||e.ended))return o("read: emitReadable",e.length,e.ended),0===e.length&&e.ended?B(this):A(this),null;if(0===(t=O(t,e))&&e.ended)return 0===e.length&&B(this),null;var r,i=e.needReadable;return o("need readable",i),(0===e.length||e.length-t0?U(t,e):null)?(e.needReadable=e.length<=e.highWaterMark,t=0):(e.length-=t,e.awaitDrain=0),0===e.length&&(e.ended||(e.needReadable=!0),n!==t&&e.ended&&B(this)),null!==r&&this.emit("data",r),r},C.prototype._read=function(t){E(this,new v("_read()"))},C.prototype.pipe=function(t,e){var n=this,r=this._readableState;switch(r.pipesCount){case 0:r.pipes=t;break;case 1:r.pipes=[r.pipes,t];break;default:r.pipes.push(t)}r.pipesCount+=1,o("pipe count=%d opts=%j",r.pipesCount,e);var s=e&&!1===e.end||t===i.stdout||t===i.stderr?y:u;function u(){o("onend"),t.end()}r.endEmitted?i.nextTick(s):n.once("end",s),t.on("unpipe",(function e(i,a){o("onunpipe"),i===n&&a&&!1===a.hasUnpiped&&(a.hasUnpiped=!0,o("cleanup"),t.removeListener("close",p),t.removeListener("finish",d),t.removeListener("drain",l),t.removeListener("error",f),t.removeListener("unpipe",e),n.removeListener("end",u),n.removeListener("end",y),n.removeListener("data",h),c=!0,!r.awaitDrain||t._writableState&&!t._writableState.needDrain||l())}));var l=function(t){return function(){var e=t._readableState;o("pipeOnDrain",e.awaitDrain),e.awaitDrain&&e.awaitDrain--,0===e.awaitDrain&&a(t,"data")&&(e.flowing=!0,F(t))}}(n);t.on("drain",l);var c=!1;function h(e){o("ondata");var i=t.write(e);o("dest.write",i),!1===i&&((1===r.pipesCount&&r.pipes===t||r.pipesCount>1&&-1!==G(r.pipes,t))&&!c&&(o("false write response, pause",r.awaitDrain),r.awaitDrain++),n.pause())}function f(e){o("onerror",e),y(),t.removeListener("error",f),0===a(t,"error")&&E(t,e)}function p(){t.removeListener("finish",d),y()}function d(){o("onfinish"),t.removeListener("close",p),y()}function y(){o("unpipe"),n.unpipe(t)}return n.on("data",h),function(t,e,n){if("function"==typeof t.prependListener)return t.prependListener(e,n);t._events&&t._events.error?Array.isArray(t._events.error)?t._events.error.unshift(n):t._events.error=[n,t._events.error]:t.on(e,n)}(t,"error",f),t.once("close",p),t.once("finish",d),t.emit("pipe",n),r.flowing||(o("pipe resume"),n.resume()),t},C.prototype.unpipe=function(t){var e=this._readableState,n={hasUnpiped:!1};if(0===e.pipesCount)return this;if(1===e.pipesCount)return t&&t!==e.pipes||(t||(t=e.pipes),e.pipes=null,e.pipesCount=0,e.flowing=!1,t&&t.emit("unpipe",this,n)),this;if(!t){var r=e.pipes,i=e.pipesCount;e.pipes=null,e.pipesCount=0,e.flowing=!1;for(var o=0;o0,!1!==r.flowing&&this.resume()):"readable"===t&&(r.endEmitted||r.readableListening||(r.readableListening=r.needReadable=!0,r.flowing=!1,r.emittedReadable=!1,o("on readable",r.length,r.reading),r.length?A(this):r.reading||i.nextTick(D,this))),n},C.prototype.addListener=C.prototype.on,C.prototype.removeListener=function(t,e){var n=s.prototype.removeListener.call(this,t,e);return"readable"===t&&i.nextTick(L,this),n},C.prototype.removeAllListeners=function(t){var e=s.prototype.removeAllListeners.apply(this,arguments);return"readable"!==t&&void 0!==t||i.nextTick(L,this),e},C.prototype.resume=function(){var t=this._readableState;return t.flowing||(o("resume"),t.flowing=!t.readableListening,function(t,e){e.resumeScheduled||(e.resumeScheduled=!0,i.nextTick(k,t,e))}(this,t)),t.paused=!1,this},C.prototype.pause=function(){return o("call pause flowing=%j",this._readableState.flowing),!1!==this._readableState.flowing&&(o("pause"),this._readableState.flowing=!1,this.emit("pause")),this._readableState.paused=!0,this},C.prototype.wrap=function(t){var e=this,n=this._readableState,r=!1;for(var i in t.on("end",(function(){if(o("wrapped end"),n.decoder&&!n.ended){var t=n.decoder.end();t&&t.length&&e.push(t)}e.push(null)})),t.on("data",(function(i){o("wrapped data"),n.decoder&&(i=n.decoder.write(i)),n.objectMode&&null==i||(n.objectMode||i&&i.length)&&(e.push(i)||(r=!0,t.pause()))})),t)void 0===this[i]&&"function"==typeof t[i]&&(this[i]=function(e){return function(){return t[e].apply(t,arguments)}}(i));for(var a=0;a{"use strict";t.exports=c;var r=n(7303).q,i=r.ERR_METHOD_NOT_IMPLEMENTED,o=r.ERR_MULTIPLE_CALLBACK,a=r.ERR_TRANSFORM_ALREADY_TRANSFORMING,s=r.ERR_TRANSFORM_WITH_LENGTH_0,u=n(9560);function l(t,e){var n=this._transformState;n.transforming=!1;var r=n.writecb;if(null===r)return this.emit("error",new o);n.writechunk=null,n.writecb=null,null!=e&&this.push(e),r(t);var i=this._readableState;i.reading=!1,(i.needReadable||i.length{"use strict";var r,i=n(4155);function o(t){var e=this;this.next=null,this.entry=null,this.finish=function(){!function(t,e,n){var r=t.entry;for(t.entry=null;r;){var i=r.callback;e.pendingcb--,i(undefined),r=r.next}e.corkedRequestsFree.next=t}(e,t)}}t.exports=C,C.WritableState=x;var a,s={deprecate:n(4927)},u=n(1463),l=n(8764).Buffer,c=n.g.Uint8Array||function(){},h=n(4910),f=n(7855).getHighWaterMark,p=n(7303).q,d=p.ERR_INVALID_ARG_TYPE,y=p.ERR_METHOD_NOT_IMPLEMENTED,m=p.ERR_MULTIPLE_CALLBACK,g=p.ERR_STREAM_CANNOT_PIPE,_=p.ERR_STREAM_DESTROYED,b=p.ERR_STREAM_NULL_VALUES,v=p.ERR_STREAM_WRITE_AFTER_END,T=p.ERR_UNKNOWN_ENCODING,E=h.errorOrDestroy;function w(){}function x(t,e,a){r=r||n(9560),t=t||{},"boolean"!=typeof a&&(a=e instanceof r),this.objectMode=!!t.objectMode,a&&(this.objectMode=this.objectMode||!!t.writableObjectMode),this.highWaterMark=f(this,t,"writableHighWaterMark",a),this.finalCalled=!1,this.needDrain=!1,this.ending=!1,this.ended=!1,this.finished=!1,this.destroyed=!1;var s=!1===t.decodeStrings;this.decodeStrings=!s,this.defaultEncoding=t.defaultEncoding||"utf8",this.length=0,this.writing=!1,this.corked=0,this.sync=!0,this.bufferProcessing=!1,this.onwrite=function(t){!function(t,e){var n=t._writableState,r=n.sync,o=n.writecb;if("function"!=typeof o)throw new m;if(function(t){t.writing=!1,t.writecb=null,t.length-=t.writelen,t.writelen=0}(n),e)!function(t,e,n,r,o){--e.pendingcb,n?(i.nextTick(o,r),i.nextTick(I,t,e),t._writableState.errorEmitted=!0,E(t,r)):(o(r),t._writableState.errorEmitted=!0,E(t,r),I(t,e))}(t,n,r,e,o);else{var a=O(n)||t.destroyed;a||n.corked||n.bufferProcessing||!n.bufferedRequest||N(t,n),r?i.nextTick(S,t,n,a,o):S(t,n,a,o)}}(e,t)},this.writecb=null,this.writelen=0,this.bufferedRequest=null,this.lastBufferedRequest=null,this.pendingcb=0,this.prefinished=!1,this.errorEmitted=!1,this.emitClose=!1!==t.emitClose,this.autoDestroy=!!t.autoDestroy,this.bufferedRequestCount=0,this.corkedRequestsFree=new o(this)}function C(t){var e=this instanceof(r=r||n(9560));if(!e&&!a.call(C,this))return new C(t);this._writableState=new x(t,this,e),this.writable=!0,t&&("function"==typeof t.write&&(this._write=t.write),"function"==typeof t.writev&&(this._writev=t.writev),"function"==typeof t.destroy&&(this._destroy=t.destroy),"function"==typeof t.final&&(this._final=t.final)),u.call(this)}function M(t,e,n,r,i,o,a){e.writelen=r,e.writecb=a,e.writing=!0,e.sync=!0,e.destroyed?e.onwrite(new _("write")):n?t._writev(i,e.onwrite):t._write(i,o,e.onwrite),e.sync=!1}function S(t,e,n,r){n||function(t,e){0===e.length&&e.needDrain&&(e.needDrain=!1,t.emit("drain"))}(t,e),e.pendingcb--,r(),I(t,e)}function N(t,e){e.bufferProcessing=!0;var n=e.bufferedRequest;if(t._writev&&n&&n.next){var r=e.bufferedRequestCount,i=new Array(r),a=e.corkedRequestsFree;a.entry=n;for(var s=0,u=!0;n;)i[s]=n,n.isBuf||(u=!1),n=n.next,s+=1;i.allBuffers=u,M(t,e,!0,e.length,i,"",a.finish),e.pendingcb++,e.lastBufferedRequest=null,a.next?(e.corkedRequestsFree=a.next,a.next=null):e.corkedRequestsFree=new o(e),e.bufferedRequestCount=0}else{for(;n;){var l=n.chunk,c=n.encoding,h=n.callback;if(M(t,e,!1,e.objectMode?1:l.length,l,c,h),n=n.next,e.bufferedRequestCount--,e.writing)break}null===n&&(e.lastBufferedRequest=null)}e.bufferedRequest=n,e.bufferProcessing=!1}function O(t){return t.ending&&0===t.length&&null===t.bufferedRequest&&!t.finished&&!t.writing}function A(t,e){t._final((function(n){e.pendingcb--,n&&E(t,n),e.prefinished=!0,t.emit("prefinish"),I(t,e)}))}function I(t,e){var n=O(e);if(n&&(function(t,e){e.prefinished||e.finalCalled||("function"!=typeof t._final||e.destroyed?(e.prefinished=!0,t.emit("prefinish")):(e.pendingcb++,e.finalCalled=!0,i.nextTick(A,t,e)))}(t,e),0===e.pendingcb&&(e.finished=!0,t.emit("finish"),e.autoDestroy))){var r=t._readableState;(!r||r.autoDestroy&&r.endEmitted)&&t.destroy()}return n}n(5717)(C,u),x.prototype.getBuffer=function(){for(var t=this.bufferedRequest,e=[];t;)e.push(t),t=t.next;return e},function(){try{Object.defineProperty(x.prototype,"buffer",{get:s.deprecate((function(){return this.getBuffer()}),"_writableState.buffer is deprecated. Use _writableState.getBuffer instead.","DEP0003")})}catch(t){}}(),"function"==typeof Symbol&&Symbol.hasInstance&&"function"==typeof Function.prototype[Symbol.hasInstance]?(a=Function.prototype[Symbol.hasInstance],Object.defineProperty(C,Symbol.hasInstance,{value:function(t){return!!a.call(this,t)||this===C&&t&&t._writableState instanceof x}})):a=function(t){return t instanceof this},C.prototype.pipe=function(){E(this,new g)},C.prototype.write=function(t,e,n){var r,o=this._writableState,a=!1,s=!o.objectMode&&(r=t,l.isBuffer(r)||r instanceof c);return s&&!l.isBuffer(t)&&(t=function(t){return l.from(t)}(t)),"function"==typeof e&&(n=e,e=null),s?e="buffer":e||(e=o.defaultEncoding),"function"!=typeof n&&(n=w),o.ending?function(t,e){var n=new v;E(t,n),i.nextTick(e,n)}(this,n):(s||function(t,e,n,r){var o;return null===n?o=new b:"string"==typeof n||e.objectMode||(o=new d("chunk",["string","Buffer"],n)),!o||(E(t,o),i.nextTick(r,o),!1)}(this,o,t,n))&&(o.pendingcb++,a=function(t,e,n,r,i,o){if(!n){var a=function(t,e,n){return t.objectMode||!1===t.decodeStrings||"string"!=typeof e||(e=l.from(e,n)),e}(e,r,i);r!==a&&(n=!0,i="buffer",r=a)}var s=e.objectMode?1:r.length;e.length+=s;var u=e.length-1))throw new T(t);return this._writableState.defaultEncoding=t,this},Object.defineProperty(C.prototype,"writableBuffer",{enumerable:!1,get:function(){return this._writableState&&this._writableState.getBuffer()}}),Object.defineProperty(C.prototype,"writableHighWaterMark",{enumerable:!1,get:function(){return this._writableState.highWaterMark}}),C.prototype._write=function(t,e,n){n(new y("_write()"))},C.prototype._writev=null,C.prototype.end=function(t,e,n){var r=this._writableState;return"function"==typeof t?(n=t,t=null,e=null):"function"==typeof e&&(n=e,e=null),null!=t&&this.write(t,e),r.corked&&(r.corked=1,this.uncork()),r.ending||function(t,e,n){e.ending=!0,I(t,e),n&&(e.finished?i.nextTick(n):t.once("finish",n)),e.ended=!0,t.writable=!1}(this,r,n),this},Object.defineProperty(C.prototype,"writableLength",{enumerable:!1,get:function(){return this._writableState.length}}),Object.defineProperty(C.prototype,"destroyed",{enumerable:!1,get:function(){return void 0!==this._writableState&&this._writableState.destroyed},set:function(t){this._writableState&&(this._writableState.destroyed=t)}}),C.prototype.destroy=h.destroy,C.prototype._undestroy=h.undestroy,C.prototype._destroy=function(t,e){e(t)}},6819:(t,e,n)=>{"use strict";var r,i=n(4155);function o(t,e,n){return e in t?Object.defineProperty(t,e,{value:n,enumerable:!0,configurable:!0,writable:!0}):t[e]=n,t}var a=n(5467),s=Symbol("lastResolve"),u=Symbol("lastReject"),l=Symbol("error"),c=Symbol("ended"),h=Symbol("lastPromise"),f=Symbol("handlePromise"),p=Symbol("stream");function d(t,e){return{value:t,done:e}}function y(t){var e=t[s];if(null!==e){var n=t[p].read();null!==n&&(t[h]=null,t[s]=null,t[u]=null,e(d(n,!1)))}}function m(t){i.nextTick(y,t)}var g=Object.getPrototypeOf((function(){})),_=Object.setPrototypeOf((o(r={get stream(){return this[p]},next:function(){var t=this,e=this[l];if(null!==e)return Promise.reject(e);if(this[c])return Promise.resolve(d(void 0,!0));if(this[p].destroyed)return new Promise((function(e,n){i.nextTick((function(){t[l]?n(t[l]):e(d(void 0,!0))}))}));var n,r=this[h];if(r)n=new Promise(function(t,e){return function(n,r){t.then((function(){e[c]?n(d(void 0,!0)):e[f](n,r)}),r)}}(r,this));else{var o=this[p].read();if(null!==o)return Promise.resolve(d(o,!1));n=new Promise(this[f])}return this[h]=n,n}},Symbol.asyncIterator,(function(){return this})),o(r,"return",(function(){var t=this;return new Promise((function(e,n){t[p].destroy(null,(function(t){t?n(t):e(d(void 0,!0))}))}))})),r),g);t.exports=function(t){var e,n=Object.create(_,(o(e={},p,{value:t,writable:!0}),o(e,s,{value:null,writable:!0}),o(e,u,{value:null,writable:!0}),o(e,l,{value:null,writable:!0}),o(e,c,{value:t._readableState.endEmitted,writable:!0}),o(e,f,{value:function(t,e){var r=n[p].read();r?(n[h]=null,n[s]=null,n[u]=null,t(d(r,!1))):(n[s]=t,n[u]=e)},writable:!0}),e));return n[h]=null,a(t,(function(t){if(t&&"ERR_STREAM_PREMATURE_CLOSE"!==t.code){var e=n[u];return null!==e&&(n[h]=null,n[s]=null,n[u]=null,e(t)),void(n[l]=t)}var r=n[s];null!==r&&(n[h]=null,n[s]=null,n[u]=null,r(d(void 0,!0))),n[c]=!0})),t.on("readable",m.bind(null,n)),n}},6641:(t,e,n)=>{"use strict";function r(t,e){var n=Object.keys(t);if(Object.getOwnPropertySymbols){var r=Object.getOwnPropertySymbols(t);e&&(r=r.filter((function(e){return Object.getOwnPropertyDescriptor(t,e).enumerable}))),n.push.apply(n,r)}return n}function i(t,e,n){return e in t?Object.defineProperty(t,e,{value:n,enumerable:!0,configurable:!0,writable:!0}):t[e]=n,t}function o(t,e){for(var n=0;n0?this.tail.next=e:this.head=e,this.tail=e,++this.length}},{key:"unshift",value:function(t){var e={data:t,next:this.head};0===this.length&&(this.tail=e),this.head=e,++this.length}},{key:"shift",value:function(){if(0!==this.length){var t=this.head.data;return 1===this.length?this.head=this.tail=null:this.head=this.head.next,--this.length,t}}},{key:"clear",value:function(){this.head=this.tail=null,this.length=0}},{key:"join",value:function(t){if(0===this.length)return"";for(var e=this.head,n=""+e.data;e=e.next;)n+=t+e.data;return n}},{key:"concat",value:function(t){if(0===this.length)return a.alloc(0);for(var e,n,r,i=a.allocUnsafe(t>>>0),o=this.head,s=0;o;)e=o.data,n=i,r=s,a.prototype.copy.call(e,n,r),s+=o.data.length,o=o.next;return i}},{key:"consume",value:function(t,e){var n;return ti.length?i.length:t;if(o===i.length?r+=i:r+=i.slice(0,t),0==(t-=o)){o===i.length?(++n,e.next?this.head=e.next:this.head=this.tail=null):(this.head=e,e.data=i.slice(o));break}++n}return this.length-=n,r}},{key:"_getBuffer",value:function(t){var e=a.allocUnsafe(t),n=this.head,r=1;for(n.data.copy(e),t-=n.data.length;n=n.next;){var i=n.data,o=t>i.length?i.length:t;if(i.copy(e,e.length-t,0,o),0==(t-=o)){o===i.length?(++r,n.next?this.head=n.next:this.head=this.tail=null):(this.head=n,n.data=i.slice(o));break}++r}return this.length-=r,e}},{key:u,value:function(t,e){return s(this,function(t){for(var e=1;e{"use strict";var r=n(4155);function i(t,e){a(t,e),o(t)}function o(t){t._writableState&&!t._writableState.emitClose||t._readableState&&!t._readableState.emitClose||t.emit("close")}function a(t,e){t.emit("error",e)}t.exports={destroy:function(t,e){var n=this,s=this._readableState&&this._readableState.destroyed,u=this._writableState&&this._writableState.destroyed;return s||u?(e?e(t):t&&(this._writableState?this._writableState.errorEmitted||(this._writableState.errorEmitted=!0,r.nextTick(a,this,t)):r.nextTick(a,this,t)),this):(this._readableState&&(this._readableState.destroyed=!0),this._writableState&&(this._writableState.destroyed=!0),this._destroy(t||null,(function(t){!e&&t?n._writableState?n._writableState.errorEmitted?r.nextTick(o,n):(n._writableState.errorEmitted=!0,r.nextTick(i,n,t)):r.nextTick(i,n,t):e?(r.nextTick(o,n),e(t)):r.nextTick(o,n)})),this)},undestroy:function(){this._readableState&&(this._readableState.destroyed=!1,this._readableState.reading=!1,this._readableState.ended=!1,this._readableState.endEmitted=!1),this._writableState&&(this._writableState.destroyed=!1,this._writableState.ended=!1,this._writableState.ending=!1,this._writableState.finalCalled=!1,this._writableState.prefinished=!1,this._writableState.finished=!1,this._writableState.errorEmitted=!1)},errorOrDestroy:function(t,e){var n=t._readableState,r=t._writableState;n&&n.autoDestroy||r&&r.autoDestroy?t.destroy(e):t.emit("error",e)}}},5467:(t,e,n)=>{"use strict";var r=n(7303).q.ERR_STREAM_PREMATURE_CLOSE;function i(){}t.exports=function t(e,n,o){if("function"==typeof n)return t(e,null,n);n||(n={}),o=function(t){var e=!1;return function(){if(!e){e=!0;for(var n=arguments.length,r=new Array(n),i=0;i{t.exports=function(){throw new Error("Readable.from is not available in the browser")}},9689:(t,e,n)=>{"use strict";var r,i=n(7303).q,o=i.ERR_MISSING_ARGS,a=i.ERR_STREAM_DESTROYED;function s(t){if(t)throw t}function u(t,e,i,o){o=function(t){var e=!1;return function(){e||(e=!0,t.apply(void 0,arguments))}}(o);var s=!1;t.on("close",(function(){s=!0})),void 0===r&&(r=n(5467)),r(t,{readable:e,writable:i},(function(t){if(t)return o(t);s=!0,o()}));var u=!1;return function(e){if(!s&&!u)return u=!0,function(t){return t.setHeader&&"function"==typeof t.abort}(t)?t.abort():"function"==typeof t.destroy?t.destroy():void o(e||new a("pipe"))}}function l(t){t()}function c(t,e){return t.pipe(e)}function h(t){return t.length?"function"!=typeof t[t.length-1]?s:t.pop():s}t.exports=function(){for(var t=arguments.length,e=new Array(t),n=0;n0,(function(t){r||(r=t),t&&a.forEach(l),o||(a.forEach(l),i(r))}))}));return e.reduce(c)}},7855:(t,e,n)=>{"use strict";var r=n(7303).q.ERR_INVALID_OPT_VALUE;t.exports={getHighWaterMark:function(t,e,n,i){var o=function(t,e,n){return null!=t.highWaterMark?t.highWaterMark:e?t[n]:null}(e,i,n);if(null!=o){if(!isFinite(o)||Math.floor(o)!==o||o<0)throw new r(i?n:"highWaterMark",o);return Math.floor(o)}return t.objectMode?16:16384}}},1463:(t,e,n)=>{t.exports=n(7187).EventEmitter},925:(t,e,n)=>{(e=t.exports=n(4002)).Stream=e,e.Readable=e,e.Writable=n(3313),e.Duplex=n(9560),e.Transform=n(1846),e.PassThrough=n(4842),e.finished=n(5467),e.pipeline=n(9689)},2553:(t,e,n)=>{"use strict";var r=n(9509).Buffer,i=r.isEncoding||function(t){switch((t=""+t)&&t.toLowerCase()){case"hex":case"utf8":case"utf-8":case"ascii":case"binary":case"base64":case"ucs2":case"ucs-2":case"utf16le":case"utf-16le":case"raw":return!0;default:return!1}};function o(t){var e;switch(this.encoding=function(t){var e=function(t){if(!t)return"utf8";for(var e;;)switch(t){case"utf8":case"utf-8":return"utf8";case"ucs2":case"ucs-2":case"utf16le":case"utf-16le":return"utf16le";case"latin1":case"binary":return"latin1";case"base64":case"ascii":case"hex":return t;default:if(e)return;t=(""+t).toLowerCase(),e=!0}}(t);if("string"!=typeof e&&(r.isEncoding===i||!i(t)))throw new Error("Unknown encoding: "+t);return e||t}(t),this.encoding){case"utf16le":this.text=u,this.end=l,e=4;break;case"utf8":this.fillLast=s,e=4;break;case"base64":this.text=c,this.end=h,e=3;break;default:return this.write=f,void(this.end=p)}this.lastNeed=0,this.lastTotal=0,this.lastChar=r.allocUnsafe(e)}function a(t){return t<=127?0:t>>5==6?2:t>>4==14?3:t>>3==30?4:t>>6==2?-1:-2}function s(t){var e=this.lastTotal-this.lastNeed,n=function(t,e,n){if(128!=(192&e[0]))return t.lastNeed=0,"�";if(t.lastNeed>1&&e.length>1){if(128!=(192&e[1]))return t.lastNeed=1,"�";if(t.lastNeed>2&&e.length>2&&128!=(192&e[2]))return t.lastNeed=2,"�"}}(this,t);return void 0!==n?n:this.lastNeed<=t.length?(t.copy(this.lastChar,e,0,this.lastNeed),this.lastChar.toString(this.encoding,0,this.lastTotal)):(t.copy(this.lastChar,e,0,t.length),void(this.lastNeed-=t.length))}function u(t,e){if((t.length-e)%2==0){var n=t.toString("utf16le",e);if(n){var r=n.charCodeAt(n.length-1);if(r>=55296&&r<=56319)return this.lastNeed=2,this.lastTotal=4,this.lastChar[0]=t[t.length-2],this.lastChar[1]=t[t.length-1],n.slice(0,-1)}return n}return this.lastNeed=1,this.lastTotal=2,this.lastChar[0]=t[t.length-1],t.toString("utf16le",e,t.length-1)}function l(t){var e=t&&t.length?this.write(t):"";if(this.lastNeed){var n=this.lastTotal-this.lastNeed;return e+this.lastChar.toString("utf16le",0,n)}return e}function c(t,e){var n=(t.length-e)%3;return 0===n?t.toString("base64",e):(this.lastNeed=3-n,this.lastTotal=3,1===n?this.lastChar[0]=t[t.length-1]:(this.lastChar[0]=t[t.length-2],this.lastChar[1]=t[t.length-1]),t.toString("base64",e,t.length-n))}function h(t){var e=t&&t.length?this.write(t):"";return this.lastNeed?e+this.lastChar.toString("base64",0,3-this.lastNeed):e}function f(t){return t.toString(this.encoding)}function p(t){return t&&t.length?this.write(t):""}e.s=o,o.prototype.write=function(t){if(0===t.length)return"";var e,n;if(this.lastNeed){if(void 0===(e=this.fillLast(t)))return"";n=this.lastNeed,this.lastNeed=0}else n=0;return n=0?(i>0&&(t.lastNeed=i-1),i):--r=0?(i>0&&(t.lastNeed=i-2),i):--r=0?(i>0&&(2===i?i=0:t.lastNeed=i-3),i):0}(this,t,e);if(!this.lastNeed)return t.toString("utf8",e);this.lastTotal=n;var r=t.length-(n-this.lastNeed);return t.copy(this.lastChar,0,r),t.toString("utf8",e,r)},o.prototype.fillLast=function(t){if(this.lastNeed<=t.length)return t.copy(this.lastChar,this.lastTotal-this.lastNeed,0,this.lastNeed),this.lastChar.toString(this.encoding,0,this.lastTotal);t.copy(this.lastChar,this.lastTotal-this.lastNeed,0,t.length),this.lastNeed-=t.length}},1191:function(t,e,n){"use strict";var r=n(4155),i=this&&this.__awaiter||function(t,e,n,r){return new(n||(n=Promise))((function(i,o){function a(t){try{u(r.next(t))}catch(t){o(t)}}function s(t){try{u(r.throw(t))}catch(t){o(t)}}function u(t){var e;t.done?i(t.value):(e=t.value,e instanceof n?e:new n((function(t){t(e)}))).then(a,s)}u((r=r.apply(t,e||[])).next())}))},o=this&&this.__generator||function(t,e){var n,r,i,o,a={label:0,sent:function(){if(1&i[0])throw i[1];return i[1]},trys:[],ops:[]};return o={next:s(0),throw:s(1),return:s(2)},"function"==typeof Symbol&&(o[Symbol.iterator]=function(){return this}),o;function s(o){return function(s){return function(o){if(n)throw new TypeError("Generator is already executing.");for(;a;)try{if(n=1,r&&(i=2&o[0]?r.return:o[0]?r.throw||((i=r.return)&&i.call(r),0):r.next)&&!(i=i.call(r,o[1])).done)return i;switch(r=0,i&&(o=[2&o[0],i.value]),o[0]){case 0:case 1:i=o;break;case 4:return a.label++,{value:o[1],done:!1};case 5:a.label++,r=o[1],o=[0];continue;case 7:o=a.ops.pop(),a.trys.pop();continue;default:if(!((i=(i=a.trys).length>0&&i[i.length-1])||6!==o[0]&&2!==o[0])){a=0;continue}if(3===o[0]&&(!i||o[1]>i[0]&&o[1]{"use strict";Object.defineProperty(e,"__esModule",{value:!0}),e.BoundingBox=void 0;var r=n(5604),i=n(1375),o=function(){function t(e,n,r,i){e instanceof t?(this.minLongitude=e.minLongitude,this.maxLongitude=e.maxLongitude,this.minLatitude=e.minLatitude,this.maxLatitude=e.maxLatitude):(this.minLongitude=e,this.maxLongitude=n,this.minLatitude=r,this.maxLatitude=i)}return Object.defineProperty(t.prototype,"minLongitude",{get:function(){return this._minLongitude},set:function(t){this._minLongitude=t,this.width=this.maxLongitude-this.minLongitude},enumerable:!1,configurable:!0}),Object.defineProperty(t.prototype,"maxLongitude",{get:function(){return this._maxLongitude},set:function(t){this._maxLongitude=t,this.width=this.maxLongitude-this.minLongitude},enumerable:!1,configurable:!0}),Object.defineProperty(t.prototype,"minLatitude",{get:function(){return this._minLatitude},set:function(t){this._minLatitude=t,this.height=this.maxLatitude-this.minLatitude},enumerable:!1,configurable:!0}),Object.defineProperty(t.prototype,"maxLatitude",{get:function(){return this._maxLatitude},set:function(t){this._maxLatitude=t,this.height=this.maxLatitude-this.minLatitude},enumerable:!1,configurable:!0}),Object.defineProperty(t.prototype,"width",{get:function(){return this._width},set:function(t){this._width=t},enumerable:!1,configurable:!0}),Object.defineProperty(t.prototype,"height",{get:function(){return this._height},set:function(t){this._height=t},enumerable:!1,configurable:!0}),t.prototype.buildEnvelope=function(){return{minY:this.minLatitude,minX:this.minLongitude,maxY:this.maxLatitude,maxX:this.maxLongitude}},t.prototype.toGeoJSON=function(){return{type:"Feature",properties:{},geometry:{type:"Polygon",coordinates:[[[this.minLongitude,this.minLatitude],[this.maxLongitude,this.minLatitude],[this.maxLongitude,this.maxLatitude],[this.minLongitude,this.maxLatitude],[this.minLongitude,this.minLatitude]]]}}},t.prototype.equals=function(t){return!!t&&(this===t||this.maxLatitude===t.maxLatitude&&this.minLatitude===t.minLatitude&&this.maxLongitude===t.maxLongitude&&this.maxLatitude===t.maxLatitude)},t.prototype.projectBoundingBox=function(e,n){var o=this.minLatitude,a=this.maxLatitude,s=this.minLongitude,u=this.maxLongitude;if(e&&"undefined"!==e&&n&&"undefined"!==n){r.Projection.isWebMercator(n)&&r.Projection.isWGS84(e)&&(a=Math.min(a,i.ProjectionConstants.WEB_MERCATOR_MAX_LAT_RANGE),o=Math.max(o,i.ProjectionConstants.WEB_MERCATOR_MIN_LAT_RANGE),u=Math.min(u,i.ProjectionConstants.WEB_MERCATOR_MAX_LON_RANGE),s=Math.max(s,i.ProjectionConstants.WEB_MERCATOR_MIN_LON_RANGE));var l=void 0;l=r.Projection.isConverter(n)?n:r.Projection.getConverter(n);var c=void 0;if(c=r.Projection.isConverter(e)?e:r.Projection.getConverter(e),r.Projection.convertersMatch(l,c))return new t(s,u,o,a);var h=l.forward(c.inverse([s,o])),f=l.forward(c.inverse([u,a])),p=l.forward(c.inverse([u,o])),d=l.forward(c.inverse([s,a]));return new t(Math.min(h[0],d[0]),Math.max(f[0],p[0]),Math.min(h[1],p[1]),Math.max(f[1],p[1]))}return this},t}();e.BoundingBox=o},3437:function(t,e){"use strict";var n=this&&this.__awaiter||function(t,e,n,r){return new(n||(n=Promise))((function(i,o){function a(t){try{u(r.next(t))}catch(t){o(t)}}function s(t){try{u(r.throw(t))}catch(t){o(t)}}function u(t){var e;t.done?i(t.value):(e=t.value,e instanceof n?e:new n((function(t){t(e)}))).then(a,s)}u((r=r.apply(t,e||[])).next())}))},r=this&&this.__generator||function(t,e){var n,r,i,o,a={label:0,sent:function(){if(1&i[0])throw i[1];return i[1]},trys:[],ops:[]};return o={next:s(0),throw:s(1),return:s(2)},"function"==typeof Symbol&&(o[Symbol.iterator]=function(){return this}),o;function s(o){return function(s){return function(o){if(n)throw new TypeError("Generator is already executing.");for(;a;)try{if(n=1,r&&(i=2&o[0]?r.return:o[0]?r.throw||((i=r.return)&&i.call(r),0):r.next)&&!(i=i.call(r,o[1])).done)return i;switch(r=0,i&&(o=[2&o[0],i.value]),o[0]){case 0:case 1:i=o;break;case 4:return a.label++,{value:o[1],done:!1};case 5:a.label++,r=o[1],o=[0];continue;case 7:o=a.ops.pop(),a.trys.pop();continue;default:if(!((i=(i=a.trys).length>0&&i[i.length-1])||6!==o[0]&&2!==o[0])){a=0;continue}if(3===o[0]&&(!i||o[1]>i[0]&&o[1]0&&i[i.length-1])||6!==o[0]&&2!==o[0])){a=0;continue}if(3===o[0]&&(!i||o[1]>i[0]&&o[1]{"use strict";var r=n(3085).Buffer;Object.defineProperty(e,"__esModule",{value:!0}),e.CanvasUtils=void 0;var i=function(){function t(){}return t.base64toUInt8Array=function(t){for(var e=r.from(t,"base64").toString("binary"),n=e.length,i=new Uint8Array(n);n--;)i[n]=e.charCodeAt(n);return i},t}();e.CanvasUtils=i},2807:function(t,e,n){"use strict";var r=n(3085).Buffer,i=this&&this.__awaiter||function(t,e,n,r){return new(n||(n=Promise))((function(i,o){function a(t){try{u(r.next(t))}catch(t){o(t)}}function s(t){try{u(r.throw(t))}catch(t){o(t)}}function u(t){var e;t.done?i(t.value):(e=t.value,e instanceof n?e:new n((function(t){t(e)}))).then(a,s)}u((r=r.apply(t,e||[])).next())}))},o=this&&this.__generator||function(t,e){var n,r,i,o,a={label:0,sent:function(){if(1&i[0])throw i[1];return i[1]},trys:[],ops:[]};return o={next:s(0),throw:s(1),return:s(2)},"function"==typeof Symbol&&(o[Symbol.iterator]=function(){return this}),o;function s(o){return function(s){return function(o){if(n)throw new TypeError("Generator is already executing.");for(;a;)try{if(n=1,r&&(i=2&o[0]?r.return:o[0]?r.throw||((i=r.return)&&i.call(r),0):r.next)&&!(i=i.call(r,o[1])).done)return i;switch(r=0,i&&(o=[2&o[0],i.value]),o[0]){case 0:case 1:i=o;break;case 4:return a.label++,{value:o[1],done:!1};case 5:a.label++,r=o[1],o=[0];continue;case 7:o=a.ops.pop(),a.trys.pop();continue;default:if(!((i=(i=a.trys).length>0&&i[i.length-1])||6!==o[0]&&2!==o[0])){a=0;continue}if(3===o[0]&&(!i||o[1]>i[0]&&o[1]0&&i[i.length-1])||6!==o[0]&&2!==o[0])){a=0;continue}if(3===o[0]&&(!i||o[1]>i[0]&&o[1]0&&i[i.length-1])||6!==o[0]&&2!==o[0])){a=0;continue}if(3===o[0]&&(!i||o[1]>i[0]&&o[1]{"use strict";Object.defineProperty(e,"__esModule",{value:!0}),e.Contents=void 0;var n=function(){function t(){}return t.prototype.copy=function(){var e=new t;return e.table_name=this.table_name,e.data_type=this.data_type,e.identifier=this.identifier,e.description=this.description,e.min_x=this.min_x,e.max_x=this.max_x,e.min_y=this.min_y,e.max_y=this.max_y,e.srs_id=this.srs_id,e},t.prototype.getTableName=function(){return this.table_name},t}();e.Contents=n},6638:function(t,e,n){"use strict";var r,i=this&&this.__extends||(r=function(t,e){return r=Object.setPrototypeOf||{__proto__:[]}instanceof Array&&function(t,e){t.__proto__=e}||function(t,e){for(var n in e)Object.prototype.hasOwnProperty.call(e,n)&&(t[n]=e[n])},r(t,e)},function(t,e){if("function"!=typeof e&&null!==e)throw new TypeError("Class extends value "+String(e)+" is not a constructor or null");function n(){this.constructor=t}r(t,e),t.prototype=null===e?Object.create(e):(n.prototype=e.prototype,new n)}),o=this&&this.__values||function(t){var e="function"==typeof Symbol&&Symbol.iterator,n=e&&t[e],r=0;if(n)return n.call(t);if(t&&"number"==typeof t.length)return{next:function(){return t&&r>=t.length&&(t=void 0),{value:t&&t[r++],done:!t}}};throw new TypeError(e?"Object is not iterable.":"Symbol.iterator is not defined.")};Object.defineProperty(e,"__esModule",{value:!0}),e.ContentsDao=void 0;var a=n(4115),s=n(3506),u=n(5925),l=n(1968),c=n(5897),h=n(8572),f=n(2527),p=n(9971),d=n(1375),y=function(t){function e(){var n=null!==t&&t.apply(this,arguments)||this;return n.gpkgTableName=e.TABLE_NAME,n.idColumns=[e.COLUMN_PK],n}return i(e,t),e.prototype.createObject=function(t){var e=new c.Contents;return t&&(e.table_name=t.table_name,e.data_type=t.data_type,e.identifier=t.identifier,e.description=t.description,e.last_change=t.last_change,e.min_y=t.min_y,e.max_y=t.max_y,e.min_x=t.min_x,e.max_x=t.max_x,e.srs_id=t.srs_id),e},e.prototype.getTables=function(t){var n;if(t){var r=new h.ColumnValues;r.addColumn(e.COLUMN_DATA_TYPE,t),n=this.queryForColumns("table_name",r)}else n=this.queryForColumns("table_name");for(var i=[],o=0;o0&&a.forEach((function(t){o.deleteByMultiId([t.table_name,t.zoom_level])}))}var s=this.geoPackage.tileMatrixSetDao;if(s.isTableExists()){var u=this.getTileMatrixSet(t);null!=u&&s.deleteById(u.table_name)}break;case p.ContentsDataType.ATTRIBUTES:this.dropTableWithTableName(t.table_name)}else this.dropTableWithTableName(t.table_name);e=this.delete(t)}return e},e.prototype.deleteCascade=function(t,e){var n=this.deleteCascadeContents(t);return e&&this.dropTableWithTableName(t.table_name),n},e.prototype.deleteByIdCascade=function(t,e){var n=0;if(null!=t){var r=this.queryForId(t);null!=r?n=this.deleteCascade(r,e):e&&this.dropTableWithTableName(t)}return n},e.prototype.deleteTable=function(t){try{this.deleteByIdCascade(t,!0)}catch(e){throw new Error("Failed to delete table: "+t)}},e.TABLE_NAME="gpkg_contents",e.COLUMN_PK="table_name",e.COLUMN_TABLE_NAME="table_name",e.COLUMN_DATA_TYPE="data_type",e.COLUMN_IDENTIFIER="identifier",e.COLUMN_DESCRIPTION="description",e.COLUMN_LAST_CHANGE="last_change",e.COLUMN_MIN_X="min_x",e.COLUMN_MIN_Y="min_y",e.COLUMN_MAX_X="max_x",e.COLUMN_MAX_Y="max_y",e.COLUMN_SRS_ID="srs_id",e}(a.Dao);e.ContentsDao=y},9971:(t,e)=>{"use strict";var n;Object.defineProperty(e,"__esModule",{value:!0}),e.ContentsDataType=void 0,(n=e.ContentsDataType||(e.ContentsDataType={})).FEATURES="features",n.TILES="tiles",n.ATTRIBUTES="attributes",function(t){t.nameFromType=function(e){return t[e]},t.fromName=function(e){var n=null;if(null!=e)switch(e.toLowerCase()){case t.FEATURES:n=t.FEATURES;break;case t.TILES:n=t.TILES;break;case t.ATTRIBUTES:n=t.ATTRIBUTES}return n}}(e.ContentsDataType||(e.ContentsDataType={}))},341:(t,e,n)=>{"use strict";Object.defineProperty(e,"__esModule",{value:!0}),e.SpatialReferenceSystem=void 0;var r=n(5604),i=n(1375),o=function(){function t(){}return Object.defineProperty(t.prototype,"projection",{get:function(){return"NONE"===this.organization?null:!this.organization||this.organization.toUpperCase()!==i.ProjectionConstants.EPSG||this.organization_coordsys_id!==i.ProjectionConstants.EPSG_CODE_4326&&this.organization_coordsys_id!==i.ProjectionConstants.EPSG_CODE_3857?this.definition_12_063&&""!==this.definition_12_063&&"undefined"!==this.definition_12_063?r.Projection.getConverter(this.definition_12_063):this.definition&&""!==this.definition&&"undefined"!==this.definition?r.Projection.getConverter(this.definition):null:r.Projection.getEPSGConverter(this.organization_coordsys_id)},enumerable:!1,configurable:!0}),t.TABLE_NAME="gpkg_spatial_ref_sys",t}();e.SpatialReferenceSystem=o},5965:function(t,e,n){"use strict";var r,i=this&&this.__extends||(r=function(t,e){return r=Object.setPrototypeOf||{__proto__:[]}instanceof Array&&function(t,e){t.__proto__=e}||function(t,e){for(var n in e)Object.prototype.hasOwnProperty.call(e,n)&&(t[n]=e[n])},r(t,e)},function(t,e){if("function"!=typeof e&&null!==e)throw new TypeError("Class extends value "+String(e)+" is not a constructor or null");function n(){this.constructor=t}r(t,e),t.prototype=null===e?Object.create(e):(n.prototype=e.prototype,new n)});Object.defineProperty(e,"__esModule",{value:!0}),e.SpatialReferenceSystemDao=void 0;var o=n(4115),a=n(341),s=n(8572),u=n(1375),l=function(t){function e(){var n=null!==t&&t.apply(this,arguments)||this;return n.idColumns=[e.COLUMN_SRS_ID],n.gpkgTableName=e.TABLE_NAME,n}return i(e,t),e.prototype.createObject=function(t){var e=new a.SpatialReferenceSystem;return t&&(e.srs_name=t.srs_name,e.srs_id=t.srs_id,e.organization=t.organization,e.organization_coordsys_id=t.organization_coordsys_id,e.definition=t.definition,e.definition_12_063=t.definition,e.description=t.description),e},e.prototype.getAllSpatialReferenceSystems=function(){var t=[];if(null!=this.connection&&this.isTableExists()){var e=this.queryForAll();if(e&&e.length)for(var n=0;n{"use strict";Object.defineProperty(e,"__esModule",{value:!0}),e.ColumnValues=void 0;var n=function(){function t(){this.values={},this.columns=[]}return t.prototype.addColumn=function(t,e){this.columns.push(t),this.values[t]=e},t.prototype.getValue=function(t){return this.values[t]},t}();e.ColumnValues=n},4115:(t,e,n)=>{"use strict";Object.defineProperty(e,"__esModule",{value:!0}),e.Dao=void 0;var r=n(8572),i=n(8877),o=n(5042),a=function(){function t(t){this.geoPackage=t,this.connection=t.database}return t.prototype.isTableExists=function(){return this.connection.isTableExists(this.gpkgTableName)},t.prototype.refresh=function(t){return this.queryForSameId(t)},t.prototype.queryForId=function(t){var e=this.buildPkWhere(t),n=this.buildPkWhereArgs(t),r=i.SqliteQueryBuilder.buildQuery(!1,"'"+this.gpkgTableName+"'",void 0,e),o=this.connection.get(r,n);if(o)return this.createObject(o)},t.prototype.queryForSameId=function(t){var e=this.getMultiId(t);return this.queryForMultiId(e)},t.prototype.getMultiId=function(t){for(var e=[],n=0;n{"use strict";Object.defineProperty(e,"__esModule",{value:!0}),e.DataColumnConstraints=void 0;e.DataColumnConstraints=function(){}},7175:function(t,e,n){"use strict";var r,i=this&&this.__extends||(r=function(t,e){return r=Object.setPrototypeOf||{__proto__:[]}instanceof Array&&function(t,e){t.__proto__=e}||function(t,e){for(var n in e)Object.prototype.hasOwnProperty.call(e,n)&&(t[n]=e[n])},r(t,e)},function(t,e){if("function"!=typeof e&&null!==e)throw new TypeError("Class extends value "+String(e)+" is not a constructor or null");function n(){this.constructor=t}r(t,e),t.prototype=null===e?Object.create(e):(n.prototype=e.prototype,new n)});Object.defineProperty(e,"__esModule",{value:!0}),e.DataColumnConstraintsDao=void 0;var o=n(4115),a=n(8590),s=function(t){function e(){var n=null!==t&&t.apply(this,arguments)||this;return n.gpkgTableName=e.TABLE_NAME,n.idColumns=[e.COLUMN_CONSTRAINT_NAME,e.COLUMN_CONSTRAINT_TYPE,e.COLUMN_VALUE],n}return i(e,t),e.prototype.createObject=function(t){var e=new a.DataColumnConstraints;return t&&(e.constraint_name=t.constraint_name,e.constraint_type=t.constraint_type,e.value=t.value,e.min=t.min,e.max=t.max,e.min_is_inclusive=t.min_is_inclusive,e.max_is_inclusive=t.max_is_inclusive,e.description=t.description),e},e.prototype.queryByConstraintName=function(t){return this.queryForEach(e.COLUMN_CONSTRAINT_NAME,t)},e.prototype.queryUnique=function(t,e,n){var r=new a.DataColumnConstraints;return r.constraint_name=t,r.constraint_type=e,r.value=n,this.queryForSameId(r)},e.TABLE_NAME="gpkg_data_column_constraints",e.COLUMN_CONSTRAINT_NAME="constraint_name",e.COLUMN_CONSTRAINT_TYPE="constraint_type",e.COLUMN_VALUE="value",e.COLUMN_MIN="min",e.COLUMN_MIN_IS_INCLUSIVE="min_is_inclusive",e.COLUMN_MAX="max",e.COLUMN_MAX_IS_INCLUSIVE="max_is_inclusive",e.COLUMN_DESCRIPTION="description",e.ENUM_TYPE="enum",e.GLOB_TYPE="glob",e.RANGE_TYPE="range",e}(o.Dao);e.DataColumnConstraintsDao=s},8133:(t,e)=>{"use strict";Object.defineProperty(e,"__esModule",{value:!0}),e.DataColumns=void 0;e.DataColumns=function(t){t=t||{},this.table_name=t.table_name,this.column_name=t.column_name,this.name=t.name,this.title=t.title,this.description=t.description,this.mime_type=t.mime_type,this.constraint_name=t.constraint_name}},4941:function(t,e,n){"use strict";var r,i=this&&this.__extends||(r=function(t,e){return r=Object.setPrototypeOf||{__proto__:[]}instanceof Array&&function(t,e){t.__proto__=e}||function(t,e){for(var n in e)Object.prototype.hasOwnProperty.call(e,n)&&(t[n]=e[n])},r(t,e)},function(t,e){if("function"!=typeof e&&null!==e)throw new TypeError("Class extends value "+String(e)+" is not a constructor or null");function n(){this.constructor=t}r(t,e),t.prototype=null===e?Object.create(e):(n.prototype=e.prototype,new n)}),o=this&&this.__values||function(t){var e="function"==typeof Symbol&&Symbol.iterator,n=e&&t[e],r=0;if(n)return n.call(t);if(t&&"number"==typeof t.length)return{next:function(){return t&&r>=t.length&&(t=void 0),{value:t&&t[r++],done:!t}}};throw new TypeError(e?"Object is not iterable.":"Symbol.iterator is not defined.")};Object.defineProperty(e,"__esModule",{value:!0}),e.DataColumnsDao=void 0;var a=n(4115),s=n(6638),u=n(8133),l=function(t){function e(){var n=null!==t&&t.apply(this,arguments)||this;return n.gpkgTableName=e.TABLE_NAME,n.idColumns=[e.COLUMN_PK1,e.COLUMN_PK2],n}return i(e,t),e.prototype.createObject=function(t){var e=new u.DataColumns;return t&&(e.table_name=t.table_name,e.column_name=t.column_name,e.name=t.name,e.title=t.title,e.description=t.description,e.mime_type=t.mime_type,e.constraint_name=t.constraint_name),e},e.prototype.getContents=function(t){return new s.ContentsDao(this.geoPackage).queryForId(t.table_name)},e.prototype.queryByConstraintName=function(t){return this.queryForEach(e.COLUMN_CONSTRAINT_NAME,t)},e.prototype.getDataColumns=function(t,n){var r,i;if(this.isTableExists()){var a,s=this.buildWhereWithFieldAndValue(e.COLUMN_TABLE_NAME,t)+" and "+this.buildWhereWithFieldAndValue(e.COLUMN_COLUMN_NAME,n),u=[t,n];try{for(var l=o(this.queryWhere(s,u)),c=l.next();!c.done;c=l.next()){var h=c.value;a=this.createObject(h)}}catch(t){r={error:t}}finally{try{c&&!c.done&&(i=l.return)&&i.call(l)}finally{if(r)throw r.error}}return a}},e.prototype.deleteByTableName=function(t){var n="";n+=this.buildWhereWithFieldAndValue(e.COLUMN_TABLE_NAME,t);var r=this.buildWhereArgs(t);return this.deleteWhere(n,r)},e.TABLE_NAME="gpkg_data_columns",e.COLUMN_PK1="table_name",e.COLUMN_PK2="column_name",e.COLUMN_TABLE_NAME="table_name",e.COLUMN_COLUMN_NAME="column_name",e.COLUMN_NAME="name",e.COLUMN_TITLE="title",e.COLUMN_DESCRIPTION="description",e.COLUMN_MIME_TYPE="mime_type",e.COLUMN_CONSTRAINT_NAME="constraint_name",e}(a.Dao);e.DataColumnsDao=l},8314:(t,e,n)=>{"use strict";var r=n(5108);Object.defineProperty(e,"__esModule",{value:!0}),e.AlterTable=void 0;var i=n(362),o=n(5042),a=n(5329),s=n(2431),u=n(2841),l=n(1133),c=n(7043),h=n(175),f=n(8934),p=n(1078),d=n(735),y=function(){function t(){}return t.alterTableSQL=function(t){return"ALTER TABLE "+a.StringUtils.quoteWrap(t)},t.renameTable=function(e,n,r){var i=t.renameTableSQL(n,r);e.run(i)},t.renameTableSQL=function(e,n){return t.alterTableSQL(e)+" RENAME TO "+a.StringUtils.quoteWrap(n)},t.renameColumn=function(e,n,r,i){var o=t.renameColumnSQL(n,r,i);e.run(o)},t.renameColumnSQL=function(e,n,r){return t.alterTableSQL(e)+" RENAME COLUMN "+a.StringUtils.quoteWrap(n)+" TO "+a.StringUtils.quoteWrap(r)},t.addColumn=function(e,n,r,i){var o=t.addColumnSQL(n,r,i);e.run(o)},t.addColumnSQL=function(e,n,r){return t.alterTableSQL(e)+" ADD COLUMN "+a.StringUtils.quoteWrap(n)+" "+r},t.dropColumnForUserTable=function(e,n,r){t.dropColumnsForUserTable(e,n,[r])},t.dropColumnsForUserTable=function(e,n,r){var i=n.copy();r.forEach((function(t){i.dropColumnWithName(t)}));var o=new s.TableMapping(i.getTableName(),i.getTableName(),i.getUserColumns().getColumns());r.forEach((function(t){o.addDroppedColumn(t)})),t.alterTableWithTableMapping(e,i,o),r.forEach((function(t){n.dropColumnWithName(t)}))},t.dropColumn=function(e,n,r){t.dropColumns(e,n,[r])},t.dropColumns=function(e,n,r){var o=new i.UserCustomTableReader(n).readTable(e);t.dropColumnsForUserTable(e,o,r)},t.alterColumnForTable=function(e,n,r){t.alterColumnsForTable(e,n,[r])},t.alterColumnsForTable=function(e,n,r){var i=n.copy();r.forEach((function(t){i.alterColumn(t)})),t.alterTable(e,i),r.forEach((function(t){n.alterColumn(t)}))},t.alterColumn=function(e,n,r){t.alterColumns(e,n,[r])},t.alterColumns=function(e,n,r){var o=new i.UserCustomTableReader(n).readTable(e);t.alterColumnsForTable(e,o,r)},t.copyTable=function(e,n,r,i){void 0===i&&(i=!0);var o=new s.TableMapping(n.getTableName(),r,n.getUserColumns().getColumns());o.transferContent=i,t.alterTableWithTableMapping(e,n,o)},t.copyTableWithName=function(e,n,r,o){void 0===o&&(o=!0);var a=new i.UserCustomTableReader(n).readTable(e);t.copyTable(e,a,r,o)},t.alterTable=function(e,n){var r=new s.TableMapping(n.getTableName(),n.getTableName(),n.getUserColumns().getColumns());t.alterTableWithTableMapping(e,n,r)},t.alterTableWithTableMapping=function(e,n,r){n.getUserColumns().getColumns().forEach((function(t){t.clearConstraints().forEach((function(e){var n=o.CoreSQLUtils.modifySQL(null,e.name,e.buildSql(),r);null!=n&&t.addConstraint(new u.RawConstraint(e.type,l.ConstraintParser.getName(n),n))}))})),n.clearConstraints().forEach((function(t){var e=o.CoreSQLUtils.modifySQL(null,t.name,t.buildSql(),r);null!=e&&n.addConstraint(new u.RawConstraint(t.type,t.name,e))}));var i=o.CoreSQLUtils.createTableSQL(n);t.alterTableWithSQLAndTableMapping(e,i,r)},t.alterTableWithSQLAndTableMapping=function(e,n,i){var a=i.fromTable,s=i.isNewTable(),u=o.CoreSQLUtils.setForeignKeys(e,!1);e.transaction((function(){try{var l=c.SQLiteMaster.queryViewsOnTable(e,[h.SQLiteMasterColumn.NAME,h.SQLiteMasterColumn.SQL],a);if(!s)for(var y=0;y0){for(var n=[],r=0;r0&&(n=n.concat(" ")),n=n.concat(r+1).concat(": ");for(var i=e[r],a=0;a0&&(n=n.concat(", ")),n=n.concat(i.get(a))}throw new Error("Foreign Key Check Violations: "+n)}},t}();e.AlterTable=y},5042:(t,e,n)=>{"use strict";Object.defineProperty(e,"__esModule",{value:!0}),e.CoreSQLUtils=void 0;var r=n(5329),i=n(2431),o=n(5045),a=n(7043),s=n(1078),u=n(175),l=function(){function t(){}return t.createTableSQL=function(e){var n="";n=n.concat("CREATE TABLE ").concat(r.StringUtils.quoteWrap(e.getTableName())).concat(" (");for(var i=e.getUserColumns().getColumns(),o=0;o0&&(n=n.concat(",")),n=(n=n.concat("\n ")).concat(t.columnSQL(a))}return e.getConstraints().all().forEach((function(t){n=(n=n.concat(",\n ")).concat(t.buildSql())})),n=n.concat("\n);")},t.columnSQL=function(e){return r.StringUtils.quoteWrap(e.getName())+" "+t.columnDefinition(e)},t.columnDefinition=function(t){var e="";return e=e.concat(t.getType()),t.hasMax()&&(e=e.concat("(").concat(t.getMax().toString()).concat(")")),t.getConstraints().all().forEach((function(n){e=(e=e.concat(" ")).concat(t.buildConstraintSql(n))})),e.toString()},t.foreignKeys=function(t){var e=t.get("PRAGMA foreign_keys",null)[0];return null!=e&&e},t.setForeignKeys=function(e,n){var r=t.foreignKeys(e);if(r!==n){var i=t.foreignKeysSQL(n);e.run(i)}return r},t.foreignKeysSQL=function(t){return"PRAGMA foreign_keys = "+t},t.foreignKeyCheck=function(e){var n=t.foreignKeyCheckSQL(null);return e.all(n,null)},t.foreignKeyCheckForTable=function(e,n){var r=t.foreignKeyCheckSQL(n);return e.all(r,null)},t.foreignKeyCheckSQL=function(t){return"PRAGMA foreign_key_check"+(null!=t?"("+r.StringUtils.quoteWrap(t)+")":"")},t.integrityCheckSQL=function(){return"PRAGMA integrity_check"},t.quickCheckSQL=function(){return"PRAGMA quick_check"},t.dropTable=function(e,n){var r=t.dropTableSQL(n);e.run(r)},t.dropTableSQL=function(t){return"DROP TABLE IF EXISTS "+r.StringUtils.quoteWrap(t)},t.dropView=function(e,n){var r=t.dropViewSQL(n);e.run(r)},t.dropViewSQL=function(t){return"DROP VIEW IF EXISTS "+r.StringUtils.quoteWrap(t)},t.transferTableContentForTableMapping=function(e,n){var r=t.transferTableContentSQL(n);e.run(r)},t.transferTableContentSQL=function(t){var e="INSERT INTO ";e=(e=e.concat(r.StringUtils.quoteWrap(t.toTable))).concat(" (");var n="",i="";t.hasWhere()&&(i=i.concat(t.where));var o=t.getColumns();return t.getColumnNames().forEach((function(t){var a=t,s=o[t];n.length>0&&(e=e.concat(", "),n=n.concat(", ")),e=e.concat(r.StringUtils.quoteWrap(a)),s.hasConstantValue()?n=n.concat(s.getConstantValueAsString()):(s.hasDefaultValue()&&(n=n.concat("ifnull(")),n=n.concat(r.StringUtils.quoteWrap(s.fromColumn)),s.hasDefaultValue()&&(n=(n=(n=n.concat(",")).concat(s.getDefaultValueAsString())).concat(")"))),s.hasWhereValue()&&(i.length>0&&(i=i.concat(" AND ")),i=(i=(i=(i=(i=i.concat(r.StringUtils.quoteWrap(s.fromColumn))).concat(" ")).concat(s.whereOperator)).concat(" ")).concat(s.getWhereValueAsString()))})),e=(e=(e=(e=e.concat(") SELECT ")).concat(n)).concat(" FROM ")).concat(r.StringUtils.quoteWrap(t.fromTable)),i.length>0&&(e=(e=e.concat(" WHERE ")).concat(i)),e.toString()},t.transferTableContent=function(e,n,r,a,s,u){var l=o.TableInfo.info(e,n),c=i.TableMapping.fromTableInfo(l);null!=u&&c.removeColumn(u);var h=c.getColumn(r);h.constantValue=a,h.whereValue=s,t.transferTableContentForTableMapping(e,c)},t.tempTableName=function(t,e,n){for(var r=e+"_"+n,i=0;t.tableExists(r);)r=e+ ++i+"_"+n;return r},t.modifySQL=function(e,n,r,i){var o=r;if(null!=n&&i.isNewTable()){var a=t.createName(e,n,i.fromTable,i.toTable),s=t.replaceName(o,n,a);null!=s&&(o=s);var u=t.replaceName(o,i.fromTable,i.toTable);null!=u&&(o=u)}return t.modifySQLWithTableMapping(o,i)},t.modifySQLWithTableMapping=function(e,n){for(var r=e,i=Array.from(n.droppedColumns),o=0;o=0){for(var i=!1,o="",a=t.split(e),s=0;s<=a.length;s++){if(s>0){var u="_",l=a[s-1];0===l.length?1==s&&(u=" "):u=l.substring(l.length-1);var c="_";if(s0&&c.match("\\W").length>0?(o=o.concat(n),i=!0):o=o.concat(e)}s=0&&h+10&&(l=l.substring(0,h),c=parseInt(f))}if(o=l+"_"+ ++c,null!=e)for(;a.SQLiteMaster.count(e,null,s.SQLiteMasterQuery.createForColumnValue(u.SQLiteMasterColumn.NAME,o))>0;)o=l+"_"+ ++c}return o},t.vacuum=function(t){t.run("VACUUM")},t.NUMBER_PATTERN="\\d+",t}();e.CoreSQLUtils=l},4777:(t,e)=>{"use strict";Object.defineProperty(e,"__esModule",{value:!0}),e.Db=void 0;var n=function(){function t(){}return t.registerDbAdapter=function(e){t.adapterCreator=e},t.create=function(e){return new t.adapterCreator(e)},t.adapterCreator=void 0,t}();e.Db=n},5116:function(t,e,n){"use strict";var r=n(5108),i=n(3085).Buffer,o=this&&this.__awaiter||function(t,e,n,r){return new(n||(n=Promise))((function(i,o){function a(t){try{u(r.next(t))}catch(t){o(t)}}function s(t){try{u(r.throw(t))}catch(t){o(t)}}function u(t){var e;t.done?i(t.value):(e=t.value,e instanceof n?e:new n((function(t){t(e)}))).then(a,s)}u((r=r.apply(t,e||[])).next())}))},a=this&&this.__generator||function(t,e){var n,r,i,o,a={label:0,sent:function(){if(1&i[0])throw i[1];return i[1]},trys:[],ops:[]};return o={next:s(0),throw:s(1),return:s(2)},"function"==typeof Symbol&&(o[Symbol.iterator]=function(){return this}),o;function s(o){return function(s){return function(o){if(n)throw new TypeError("Generator is already executing.");for(;a;)try{if(n=1,r&&(i=2&o[0]?r.return:o[0]?r.throw||((i=r.return)&&i.call(r),0):r.next)&&!(i=i.call(r,o[1])).done)return i;switch(r=0,i&&(o=[2&o[0],i.value]),o[0]){case 0:case 1:i=o;break;case 4:return a.label++,{value:o[1],done:!1};case 5:a.label++,r=o[1],o=[0];continue;case 7:o=a.ops.pop(),a.trys.pop();continue;default:if(!((i=(i=a.trys).length>0&&i[i.length-1])||6!==o[0]&&2!==o[0])){a=0;continue}if(3===o[0]&&(!i||o[1]>i[0]&&o[1]{"use strict";var n;Object.defineProperty(e,"__esModule",{value:!0}),e.GeoPackageDataType=void 0,(n=e.GeoPackageDataType||(e.GeoPackageDataType={}))[n.BOOLEAN=0]="BOOLEAN",n[n.TINYINT=1]="TINYINT",n[n.SMALLINT=2]="SMALLINT",n[n.MEDIUMINT=3]="MEDIUMINT",n[n.INT=4]="INT",n[n.INTEGER=5]="INTEGER",n[n.FLOAT=6]="FLOAT",n[n.DOUBLE=7]="DOUBLE",n[n.REAL=8]="REAL",n[n.TEXT=9]="TEXT",n[n.BLOB=10]="BLOB",n[n.DATE=11]="DATE",n[n.DATETIME=12]="DATETIME",function(t){t.nameFromType=function(e){return t[e]},t.fromName=function(e){return t[e]},t.columnDefaultValue=function(e,n){var r=null;if(null!=e){if(null!=n)switch(n){case t.BOOLEAN:var i=null;if("boolean"==typeof e)i=e;else if("string"==typeof e)switch(e){case"0":case"false":i=!1;break;case"1":case"true":i=!0}null!=i&&(r=i?"1":"0");break;case t.TEXT:(r=e.toString()).startsWith("'")&&r.endsWith("'")||(r="'"+r+"'")}null==r&&(r=e.toString())}return r}}(e.GeoPackageDataType||(e.GeoPackageDataType={}))},1790:function(t,e,n){"use strict";var r=this&&this.__importDefault||function(t){return t&&t.__esModule?t:{default:t}};Object.defineProperty(e,"__esModule",{value:!0}),e.MappedColumn=void 0;var i=n(7319),o=r(n(4293)),a=r(n(8446)),s=function(){function t(t,e,n,r){this._toColumn=t,this._fromColumn=e,this._defaultValue=n,this._dataType=r}return Object.defineProperty(t.prototype,"toColumn",{get:function(){return this._toColumn},set:function(t){this._toColumn=t},enumerable:!1,configurable:!0}),t.prototype.hasNewName=function(){return!(0,o.default)(this._fromColumn)&&!(0,a.default)(this._fromColumn,this._toColumn)},Object.defineProperty(t.prototype,"fromColumn",{get:function(){return this._fromColumn},set:function(t){this._fromColumn=t},enumerable:!1,configurable:!0}),t.prototype.hasDefaultValue=function(){return!(0,o.default)(this._defaultValue)},Object.defineProperty(t.prototype,"defaultValue",{get:function(){return this._defaultValue},set:function(t){this._defaultValue=t},enumerable:!1,configurable:!0}),t.prototype.getDefaultValueAsString=function(){return i.GeoPackageDataType.columnDefaultValue(this._defaultValue,this._dataType)},Object.defineProperty(t.prototype,"dataType",{get:function(){return this._dataType},set:function(t){this._dataType=t},enumerable:!1,configurable:!0}),t.prototype.hasConstantValue=function(){return!(0,o.default)(this._constantValue)},Object.defineProperty(t.prototype,"constantValue",{get:function(){return this._constantValue},set:function(t){this._constantValue=t},enumerable:!1,configurable:!0}),t.prototype.getConstantValueAsString=function(){return i.GeoPackageDataType.columnDefaultValue(this._constantValue,this._dataType)},t.prototype.hasWhereValue=function(){return!(0,o.default)(this._whereValue)},Object.defineProperty(t.prototype,"whereValue",{get:function(){return this._whereValue},set:function(t){this._whereValue=t},enumerable:!1,configurable:!0}),t.prototype.getWhereValueAsString=function(){return i.GeoPackageDataType.columnDefaultValue(this._whereValue,this._dataType)},t.prototype.setWhereValueAndOperator=function(t,e){this._whereValue=t,this.whereOperator=e},Object.defineProperty(t.prototype,"whereOperator",{get:function(){return(0,o.default)(this._whereOperator)?"=":this._whereOperator},set:function(t){this._whereOperator=t},enumerable:!1,configurable:!0}),t}();e.MappedColumn=s},7043:function(t,e,n){"use strict";var r=this&&this.__read||function(t,e){var n="function"==typeof Symbol&&t[Symbol.iterator];if(!n)return t;var r,i,o=n.call(t),a=[];try{for(;(void 0===e||e-- >0)&&!(r=o.next()).done;)a.push(r.value)}catch(t){i={error:t}}finally{try{r&&!r.done&&(n=o.return)&&n.call(o)}finally{if(i)throw i.error}}return a},i=this&&this.__spreadArray||function(t,e,n){if(n||2===arguments.length)for(var r,i=0,o=e.length;i0){this._results=t,this._count=t.length;for(var n=0;n=this._results.length){var e;throw e=0===this._results.length?"Results are empty":"Row index: "+t+", not within range 0 to "+(this._results.length-1),new Error(e)}return this._results[t]},t.getValue=function(t,e){return t[o.SQLiteMasterColumn.nameFromType(e).toLowerCase()]},t.prototype.getConstraints=function(t){var e=new s.TableConstraints;if(this.getType(t)===a.SQLiteMasterType.TABLE){var n=this.getSql(t);null!=n&&(e=u.ConstraintParser.getConstraints(n))}return e},t.count=function(e,n,r){return t.query(e,null,n,r).count()},t.query=function(e,n,s,u){var l="SELECT ",c=[];if(null!=n&&n.length>0)for(var h=0;h0&&(l=l.concat(", ")),l=l.concat(o.SQLiteMasterColumn.nameFromType(n[h]).toLowerCase());else l=l.concat("count(*) as cnt");l=(l=l.concat(" FROM ")).concat(t.TABLE_NAME);var f=null!=u&&u.has(),p=null!=s&&s.length>0;if((f||p)&&(l=l.concat(" WHERE "),f&&(l=l.concat(u.buildSQL()),c.push.apply(c,i([],r(u.getArguments()),!1))),p)){for(f&&(l=l.concat(" AND")),l=l.concat(" type IN ("),h=0;h0&&(l=l.concat(", ")),l=l.concat("?"),c.push(a.SQLiteMasterType.nameFromType(s[h]).toLowerCase());l=l.concat(")")}return new t(e.all(l,c),n)},t.queryViewsOnTable=function(e,n,r){return t.query(e,n,[a.SQLiteMasterType.VIEW],l.SQLiteMasterQuery.createTableViewQuery(r))},t.countViewsOnTable=function(e,n){return t.count(e,[a.SQLiteMasterType.VIEW],l.SQLiteMasterQuery.createTableViewQuery(n))},t.queryForConstraints=function(e,n){for(var r=new s.TableConstraints,i=t.query(e,[o.SQLiteMasterColumn.TYPE,o.SQLiteMasterColumn.NAME,o.SQLiteMasterColumn.TBL_NAME,o.SQLiteMasterColumn.ROOTPAGE,o.SQLiteMasterColumn.SQL],[a.SQLiteMasterType.TABLE],l.SQLiteMasterQuery.createForColumnValue(o.SQLiteMasterColumn.TBL_NAME,n)),u=0;u{"use strict";var n;Object.defineProperty(e,"__esModule",{value:!0}),e.SQLiteMasterColumn=void 0,(n=e.SQLiteMasterColumn||(e.SQLiteMasterColumn={}))[n.TYPE=0]="TYPE",n[n.NAME=1]="NAME",n[n.TBL_NAME=2]="TBL_NAME",n[n.ROOTPAGE=3]="ROOTPAGE",n[n.SQL=4]="SQL",function(t){t.nameFromType=function(e){return t[e]},t.fromName=function(e){return t[e]},t.asArray=function(){return[t.TYPE,t.NAME,t.TBL_NAME,t.ROOTPAGE,t.SQL]}}(e.SQLiteMasterColumn||(e.SQLiteMasterColumn={}))},1078:(t,e,n)=>{"use strict";Object.defineProperty(e,"__esModule",{value:!0}),e.SQLiteMasterQuery=void 0;var r=n(175),i=n(5329),o=function(){function t(t){this.queries=[],this.arguments=[],this.combineOperation=t}return t.prototype.add=function(t,e,n){this.validateAdd(),this.queries.push("LOWER("+i.StringUtils.quoteWrap(r.SQLiteMasterColumn.nameFromType(t).toLowerCase())+") "+e+" LOWER(?)"),this.arguments.push(n)},t.prototype.addIsNull=function(t){this.validateAdd(),this.queries.push(i.StringUtils.quoteWrap(r.SQLiteMasterColumn.nameFromType(t).toLowerCase())+" IS NULL")},t.prototype.addIsNotNull=function(t){this.validateAdd(),this.queries.push(i.StringUtils.quoteWrap(r.SQLiteMasterColumn.nameFromType(t).toLowerCase())+" IS NOT NULL")},t.prototype.validateAdd=function(){if((null===this.combineOperation||void 0===this.combineOperation)&&0!==this.queries.length)throw new Error("Query without a combination operation supports only a single query")},t.prototype.has=function(){return 0!==this.queries.length},t.prototype.buildSQL=function(){var t="";this.queries.length>1&&(t=t.concat("( "));for(var e=0;e0&&(t=(t=(t=t.concat(" ")).concat(this.combineOperation)).concat(" ")),t=t.concat(this.queries[e]);return this.queries.length>1&&(t=t.concat(" )")),t},t.prototype.getArguments=function(){return this.arguments},t.create=function(){return new t(null)},t.createOr=function(){return new t("OR")},t.createAnd=function(){return new t("AND")},t.createForColumnValue=function(t,e){var n=this.create();return n.add(t,"=",e),n},t.createForOperationAndColumnValue=function(t,e,n){var r=this.create();return r.add(t,e,n),r},t.createOrForColumnValue=function(t,e){var n=this.createOr();return e.forEach((function(e){n.add(t,"=",e)})),n},t.createOrForOperationAndColumnValue=function(t,e,n){var r=this.createOr();return n.forEach((function(n){r.add(t,e,n)})),r},t.createAndForColumnValue=function(t,e){var n=this.createAnd();return e.forEach((function(e){n.add(t,"=",e)})),n},t.createAndForOperationAndColumnValue=function(t,e,n){var r=this.createAnd();return n.forEach((function(n){r.add(t,e,n)})),r},t.createTableViewQuery=function(e){var n=[];return n.push('%"'+e+'"%'),n.push("% "+e+" %"),n.push("%,"+e+" %"),n.push("% "+e+",%"),n.push("%,"+e+",%"),n.push("% "+e),n.push("%,"+e),t.createOrForOperationAndColumnValue(r.SQLiteMasterColumn.SQL,"LIKE",n)},t}();e.SQLiteMasterQuery=o},8934:(t,e)=>{"use strict";var n;Object.defineProperty(e,"__esModule",{value:!0}),e.SQLiteMasterType=void 0,(n=e.SQLiteMasterType||(e.SQLiteMasterType={}))[n.TABLE=0]="TABLE",n[n.INDEX=1]="INDEX",n[n.VIEW=2]="VIEW",n[n.TRIGGER=3]="TRIGGER",function(t){t.nameFromType=function(e){return t[e]},t.fromName=function(e){return t[e]}}(e.SQLiteMasterType||(e.SQLiteMasterType={}))},922:function(t,e,n){"use strict";var r=n(5108),i=this&&this.__awaiter||function(t,e,n,r){return new(n||(n=Promise))((function(i,o){function a(t){try{u(r.next(t))}catch(t){o(t)}}function s(t){try{u(r.throw(t))}catch(t){o(t)}}function u(t){var e;t.done?i(t.value):(e=t.value,e instanceof n?e:new n((function(t){t(e)}))).then(a,s)}u((r=r.apply(t,e||[])).next())}))},o=this&&this.__generator||function(t,e){var n,r,i,o,a={label:0,sent:function(){if(1&i[0])throw i[1];return i[1]},trys:[],ops:[]};return o={next:s(0),throw:s(1),return:s(2)},"function"==typeof Symbol&&(o[Symbol.iterator]=function(){return this}),o;function s(o){return function(s){return function(o){if(n)throw new TypeError("Generator is already executing.");for(;a;)try{if(n=1,r&&(i=2&o[0]?r.return:o[0]?r.throw||((i=r.return)&&i.call(r),0):r.next)&&!(i=i.call(r,o[1])).done)return i;switch(r=0,i&&(o=[2&o[0],i.value]),o[0]){case 0:case 1:i=o;break;case 4:return a.label++,{value:o[1],done:!1};case 5:a.label++,r=o[1],o=[0];continue;case 7:o=a.ops.pop(),a.trys.pop();continue;default:if(!((i=(i=a.trys).length>0&&i[i.length-1])||6!==o[0]&&2!==o[0])){a=0;continue}if(3===o[0]&&(!i||o[1]>i[0]&&o[1]{"use strict";Object.defineProperty(e,"__esModule",{value:!0}),e.SqliteQueryBuilder=void 0;var n=function(){function t(){}return t.fixColumnName=function(t){return t.replace(/\W+/g,"_")},t.buildQuery=function(e,n,r,i,o,a,s,u,l,c){var h="";if(t.isEmpty(a)&&!t.isEmpty(s))throw new Error("Illegal Arguments: having clauses require a groupBy clause");return h+="select ",e&&(h+="distinct "),r&&r.length?h=t.appendColumnsToString(r,h):h+="* ",h+="from "+n,o&&(h+=" "+o),h=t.appendClauseToString(h," where ",i),h=t.appendClauseToString(h," group by ",a),h=t.appendClauseToString(h," having ",s),h=t.appendClauseToString(h," order by ",u),h=t.appendClauseToString(h," limit ",l),t.appendClauseToString(h," offset ",c)},t.buildCount=function(e,n){var r="select count(*) as count from "+e;return t.appendClauseToString(r," where ",n)},t.buildInsert=function(e,n){if(n.columnNames)return t.buildInsertFromColumnNames(e,n);var r="insert into "+e+" (",i="",o="",a=!0;for(var s in n)Object.prototype.hasOwnProperty.call(n,s)&&void 0!==n[s]&&(a||(i+=",",o+=","),a=!1,i+=s,o+="$"+t.fixColumnName(s));return r+(i+") values (")+o+")"},t.buildInsertFromColumnNames=function(e,n){for(var r="insert into "+e+" (",i="",o="",a=!0,s=n.columnNames,u=0;u0&&i[i.length-1])||6!==o[0]&&2!==o[0])){a=0;continue}if(3===o[0]&&(!i||o[1]>i[0]&&o[1]=t.length&&(t=void 0),{value:t&&t[r++],done:!t}}};throw new TypeError(e?"Object is not iterable.":"Symbol.iterator is not defined.")},u=this&&this.__importDefault||function(t){return t&&t.__esModule?t:{default:t}};Object.defineProperty(e,"__esModule",{value:!0}),e.SqljsAdapter=void 0;var l=u(n(3686)),c=function(){function t(t){this.filePath=t}return t.setSqljsWasmLocateFile=function(e){t.sqljsWasmLocateFile=e},t.prototype.initialize=function(){var e=this;return new Promise((function(o,a){new Promise((function(e){null==t.SQL?(0,l.default)({locateFile:t.sqljsWasmLocateFile}).then((function(n){t.SQL=n,e(n)})).catch((function(t){a(t)})):e(t.SQL)})).then((function(t){if(!e.filePath||"string"!=typeof e.filePath){if(e.filePath){var s=e.filePath;return e.db=new t.Database(s),o(e)}return e.db=new t.Database,o(e)}if(void 0!==r&&r.version){var u=n(1929);if(0!==e.filePath.indexOf("http")){try{u.statSync(e.filePath)}catch(n){return e.db=new t.Database,o(e)}var l=u.readFileSync(e.filePath),c=new Uint8Array(l);return e.db=new t.Database(c),o(e)}n(8501).get(e.filePath,(function(n){if(200!==n.statusCode)return a(new Error("Unable to reach url: "+e.filePath));var r=[];n.on("data",(function(t){return r.push(t)})),n.on("end",(function(){var n=new Uint8Array(i.concat(r));e.db=new t.Database(n),o(e)}))})).on("error",(function(t){return a(t)}))}else{var h=new XMLHttpRequest;h.open("GET",e.filePath,!0),h.responseType="arraybuffer",h.onload=function(){if(200!==h.status)return a(new Error("Unable to reach url: "+e.filePath));var n=new Uint8Array(h.response);return e.db=new t.Database(n),o(e)},h.onerror=function(){return a(new Error("Error reaching url: "+e.filePath))},h.send()}})).catch((function(t){a(t)}))}))},t.prototype.close=function(){this.db.close()},t.prototype.getDBConnection=function(){return this.db},t.prototype.export=function(){return o(this,void 0,void 0,(function(){return a(this,(function(t){return[2,this.db.export()]}))}))},t.prototype.registerFunction=function(t,e){return this.db.create_function(t,e),this},t.prototype.get=function(t,e){e=e||[];var n,r=this.db.prepare(t);return r.bind(e),r.step()&&(n=r.getAsObject()),r.free(),n},t.prototype.isTableExists=function(t){var e,n=this.db.prepare("SELECT name FROM sqlite_master WHERE type='table' AND name=:name");return n.bind([t]),n.step()&&(e=n.getAsObject()),n.free(),!!e},t.prototype.all=function(t,e){var n,r,i=[],o=this.each(t,e);try{for(var a=s(o),u=a.next();!u.done;u=a.next()){var l=u.value;i.push(l)}}catch(t){n={error:t}}finally{try{u&&!u.done&&(r=a.return)&&r.call(a)}finally{if(n)throw n.error}}return i},t.prototype.each=function(t,e){var n,r=this.db.prepare(t);return r.bind(e),(n={})[Symbol.iterator]=function(){return this},n.next=function(){return r.step()?{value:r.getAsObject(),done:!1}:(r.free(),{value:void 0,done:!0})},n},t.prototype.run=function(t,e){if(e&&!(e instanceof Array))for(var n in e)e["$"+n]=e[n];this.db.run(t,e);var r,i=this.db.exec("select last_insert_rowid();");return i&&(r=i[0].values[0][0]),{lastInsertRowid:r,changes:this.db.getRowsModified()}},t.prototype.insert=function(t,e){if(e&&!(e instanceof Array))for(var n in e)e["$"+n]=e[n];var r=this.db.prepare(t,e);r.step(),r.free();var i=this.db.exec("select last_insert_rowid();");return i?i[0].values[0][0]:void 0},t.prototype.prepareStatement=function(t){return this.db.prepare(t)},t.prototype.bindAndInsert=function(t,e){if(e&&!(e instanceof Array))for(var n in e)e["$"+n]=e[n];return t.run(e).lastInsertRowid},t.prototype.closeStatement=function(t){t.free()},t.prototype.delete=function(t,e){var n,r=this.db.prepare(t,e);return r.step(),n=this.db.getRowsModified(),r.free(),n},t.prototype.dropTable=function(t){var e=this.db.exec('DROP TABLE IF EXISTS "'+t+'"');return this.db.exec("VACUUM"),!!e},t.prototype.count=function(t,e,n){var r='SELECT COUNT(*) as count FROM "'+t+'"';return e&&(r+=" where "+e),this.get(r,n).count},t.prototype.transaction=function(t){this.db.exec("BEGIN TRANSACTION");try{t(),this.db.exec("COMMIT TRANSACTION")}catch(t){throw this.db.exec("ROLLBACK TRANSACTION"),t}},t.sqljsWasmLocateFile=function(t){return t},t}();e.SqljsAdapter=c},5329:(t,e)=>{"use strict";Object.defineProperty(e,"__esModule",{value:!0}),e.StringUtils=void 0;var n=function(){function t(){}return t.quoteWrap=function(t){var e=null;return null!==t&&(e=t.startsWith('"')&&t.endsWith('"')?t:'"'+t+'"'),e},t.quoteUnwrap=function(t){var e=null;return null!=t&&(e=t.startsWith('"')&&t.endsWith('"')?t.substring(1,t.length-1):t),e},t}();e.StringUtils=n},3765:(t,e,n)=>{"use strict";Object.defineProperty(e,"__esModule",{value:!0}),e.ColumnConstraints=void 0;var r=n(7686),i=function(){function t(t){this.name=t,this.constraints=new r.Constraints}return t.prototype.addConstraint=function(t){this.constraints.add(t)},t.prototype.addConstraints=function(t){this.constraints.addConstraints(t)},t.prototype.getConstraints=function(){return this.constraints},t.prototype.getConstraint=function(t){return t>=this.constraints.size()?null:this.constraints.get(t)},t.prototype.numConstraints=function(){return this.constraints.size()},t.prototype.addColumnConstraints=function(t){null!=t&&this.addConstraints(t.getConstraints())},t.prototype.hasConstraints=function(){return this.constraints.has()},t}();e.ColumnConstraints=i},8007:(t,e,n)=>{"use strict";Object.defineProperty(e,"__esModule",{value:!0}),e.Constraint=void 0;var r=n(5329),i=function(){function t(t,e,n){void 0===n&&(n=Number.MAX_SAFE_INTEGER),this.type=t,this.name=e,this.order=n}return t.prototype.buildNameSql=function(){var e="";return null!==this.name&&void 0!==this.name&&(e=t.CONSTRAINT+" "+r.StringUtils.quoteWrap(this.name)+" "),e},t.prototype.buildSql=function(){return""},t.prototype.copy=function(){return new t(this.type,this.name)},t.prototype.getName=function(){return this.name},t.prototype.getType=function(){return this.type},t.prototype.compareTo=function(t){return this.getOrder(this.order)-this.getOrder(t.order)<=0?-1:1},t.prototype.getOrder=function(t){return null!=t?t:Number.MAX_VALUE},t.CONSTRAINT="CONSTRAINT",t}();e.Constraint=i},1133:(t,e,n)=>{"use strict";Object.defineProperty(e,"__esModule",{value:!0}),e.ConstraintParser=void 0;var r=n(4980),i=n(3765),o=n(8007),a=n(91),s=n(2841),u=n(5329),l=function(){function t(){}return t.getConstraints=function(e){var n=new r.TableConstraints,i=-1,o=-1;if(null!=e&&(i=e.indexOf("("),o=e.lastIndexOf(")")),i>=0&&o>=0){for(var a=e.substring(i+1,o).trim(),s=0,u=0,l=0;l0&&(o=o.concat(" ")),o=o.concat(e[a]);var u=t.getName(o);return new s.RawConstraint(i,u,o)},t.getConstraint=function(e,n){var r=null,i=t.getNameAndDefinition(e),o=i[1];if(null!=o){var u,l=o.split(/\s+/)[0];null!=(u=n?a.ConstraintType.getTableType(l):a.ConstraintType.getColumnType(l))&&(r=new s.RawConstraint(u,i[0],e.trim()))}return r},t.getTableConstraint=function(e){return t.getConstraint(e,!0)},t.isTableConstraint=function(e){return null!==t.getTableConstraint(e)},t.getTableType=function(e){var n=null,r=t.getTableConstraint(e);return null!=r&&(n=r.type),n},t.isTableType=function(e,n){var r=!1,i=t.getTableType(n);return null!=i&&(r=e===i),r},t.getColumnConstraint=function(e){return t.getConstraint(e,!1)},t.isColumnConstraint=function(e){return null!=t.getColumnConstraint(e)},t.getColumnType=function(e){var n=null,r=t.getColumnConstraint(e);return null!=r&&(n=r.type),n},t.isColumnType=function(e,n){var r=!1,i=t.getColumnType(n);return null!=i&&(r=e==i),r},t.getTableOrColumnConstraint=function(e){var n=t.getTableConstraint(e);return null==n&&(n=t.getColumnConstraint(e)),n},t.isConstraint=function(e){return null!==t.getTableOrColumnConstraint(e)},t.getType=function(e){var n=null,r=t.getTableOrColumnConstraint(e);return null!=r&&(n=r.getType()),n},t.isType=function(e,n){var r=!1,i=t.getType(n);return null!=i&&(r=e===i),r},t.getName=function(e){var n=null,r=t.NAME_PATTERN(e);return null!==r&&r.length>t.NAME_PATTERN_NAME_GROUP&&(n=u.StringUtils.quoteUnwrap(r[t.NAME_PATTERN_NAME_GROUP])),n},t.getNameAndDefinition=function(e){var n=[null,e],r=t.CONSTRAINT_PATTERN(e.trim());if(null!==r&&r.length>t.CONSTRAINT_PATTERN_DEFINITION_GROUP){var i=u.StringUtils.quoteUnwrap(r[t.CONSTRAINT_PATTERN_NAME_GROUP]);null!=i&&(i=i.trim());var o=r[t.CONSTRAINT_PATTERN_DEFINITION_GROUP];null!=o&&(o=o.trim()),n=[i,o]}return n},t.NAME_PATTERN=function(t){return t.match(/CONSTRAINT\s+("[\s\S]+"|\S+)\s/i)},t.NAME_PATTERN_NAME_GROUP=1,t.CONSTRAINT_PATTERN=function(t){return t.match(/(CONSTRAINT\s+("[\s\S]+"|\S+)\s)?([\s\S]*)/i)},t.CONSTRAINT_PATTERN_NAME_GROUP=2,t.CONSTRAINT_PATTERN_DEFINITION_GROUP=3,t}();e.ConstraintParser=l},91:(t,e)=>{"use strict";var n;Object.defineProperty(e,"__esModule",{value:!0}),e.ConstraintType=void 0,(n=e.ConstraintType||(e.ConstraintType={}))[n.PRIMARY_KEY=0]="PRIMARY_KEY",n[n.UNIQUE=1]="UNIQUE",n[n.CHECK=2]="CHECK",n[n.FOREIGN_KEY=3]="FOREIGN_KEY",n[n.NOT_NULL=4]="NOT_NULL",n[n.DEFAULT=5]="DEFAULT",n[n.COLLATE=6]="COLLATE",n[n.AUTOINCREMENT=7]="AUTOINCREMENT",function(t){t.nameFromType=function(e){return t[e]},t.fromName=function(e){return t[e]},t.TABLE_CONSTRAINTS=new Set([t.PRIMARY_KEY,t.UNIQUE,t.CHECK,t.FOREIGN_KEY]),t.COLUMN_CONSTRAINTS=new Set([t.PRIMARY_KEY,t.NOT_NULL,t.UNIQUE,t.CHECK,t.DEFAULT,t.COLLATE,t.FOREIGN_KEY,t.AUTOINCREMENT]);var e=new Map;Array.from(t.TABLE_CONSTRAINTS).forEach((function(t){r(e,t)}));var n=new Map;function r(e,n){var r=t.nameFromType(n),i=r.split("_");e.set(i[0],n),i.length>0&&e.set(r.replace("_"," "),n)}function i(t){return e.get(t.toUpperCase())}function o(t){return n.get(t.toUpperCase())}Array.from(t.COLUMN_CONSTRAINTS).forEach((function(t){r(n,t)})),t.getTableType=i,t.getColumnType=o,t.getType=function(t){var e=i(t);return null==e&&(e=o(t)),e}}(e.ConstraintType||(e.ConstraintType={}))},7686:function(t,e,n){"use strict";var r=this&&this.__importDefault||function(t){return t&&t.__esModule?t:{default:t}};Object.defineProperty(e,"__esModule",{value:!0}),e.Constraints=void 0;var i=r(n(1159)),o=function(){function t(){this.constraints=[],this.typedConstraints={}}return t.prototype.add=function(t){var e=this.constraints.map((function(t){return t.order})).lastIndexOf(t.order),n=e+1;-1===e&&(n=(0,i.default)(this.constraints.map((function(t){return t.order})),t.order)),n===this.constraints.length?this.constraints.push(t):this.constraints.splice(n,0,t),null!==this.typedConstraints[t.getType()]&&void 0!==this.typedConstraints[t.getType()]||(this.typedConstraints[t.getType()]=[]),this.typedConstraints[t.getType()].push(t)},t.prototype.addConstraintArray=function(t){for(var e=0;e0},t.prototype.hasType=function(t){return 0!==this.getConstraintsForType(t).length},t.prototype.all=function(){return this.constraints},t.prototype.get=function(t){return this.constraints[t]},t.prototype.getConstraintsForType=function(t){var e=this.typedConstraints[t];return null==e&&(e=[]),e},t.prototype.clear=function(){var t=this.constraints.slice();return this.constraints=[],this.typedConstraints={},t},t.prototype.clearConstraintsByType=function(t){var e=this.typedConstraints[t];return delete this.typedConstraints[t],null===e?e=[]:0===e.length&&(this.constraints=this.constraints.filter((function(e){return e.getType()!==t}))),e},t.prototype.copy=function(){var e=new t;return e.addConstraints(this),e},t.prototype.size=function(){return this.constraints.length},t}();e.Constraints=o},2841:function(t,e,n){"use strict";var r,i=this&&this.__extends||(r=function(t,e){return r=Object.setPrototypeOf||{__proto__:[]}instanceof Array&&function(t,e){t.__proto__=e}||function(t,e){for(var n in e)Object.prototype.hasOwnProperty.call(e,n)&&(t[n]=e[n])},r(t,e)},function(t,e){if("function"!=typeof e&&null!==e)throw new TypeError("Class extends value "+String(e)+" is not a constructor or null");function n(){this.constructor=t}r(t,e),t.prototype=null===e?Object.create(e):(n.prototype=e.prototype,new n)});Object.defineProperty(e,"__esModule",{value:!0}),e.RawConstraint=void 0;var o=n(8007),a=function(t){function e(e,n,r,i){void 0===i&&(i=null);var o=t.call(this,e,n,i)||this;return o.sql=r,o}return i(e,t),e.prototype.buildSql=function(){var t=this.sql;return t.toUpperCase().startsWith(o.Constraint.CONSTRAINT)||(t=this.buildNameSql()+t),t},e}(o.Constraint);e.RawConstraint=a},4033:(t,e)=>{"use strict";Object.defineProperty(e,"__esModule",{value:!0}),e.TableColumn=void 0;var n=function(){function t(t,e,n,r,i,o,a,s,u,l){this.index=t,this.name=e,this.type=n,this.dataType=r,this.max=i,this.notNull=o,this.defaultValueString=a,this.defaultValue=s,this.primaryKey=u,this.autoincrement=l}return t.prototype.getIndex=function(){return this.index},t.prototype.getName=function(){return this.name},t.prototype.getType=function(){return this.type},t.prototype.getDataType=function(){return this.dataType},t.prototype.isDataType=function(t){return this.dataType===t},t.prototype.getMax=function(){return this.max},t.prototype.isNotNull=function(){return this.notNull},t.prototype.getDefaultValueString=function(){return this.defaultValueString},t.prototype.getDefaultValue=function(){return this.defaultValue},t.prototype.isPrimaryKey=function(){return this.primaryKey},t.prototype.isAutoIncrement=function(){return this.autoincrement},t}();e.TableColumn=n},4980:(t,e,n)=>{"use strict";Object.defineProperty(e,"__esModule",{value:!0}),e.TableConstraints=void 0;var r=n(3765),i=n(7686),o=function(){function t(){this.constraints=new i.Constraints,this.columnConstraints={}}return t.prototype.addTableConstraint=function(t){this.constraints.add(t)},t.prototype.addTableConstraints=function(t){this.constraints.addConstraints(t)},t.prototype.getTableConstraints=function(){return this.constraints},t.prototype.getTableConstraint=function(t){return t>=this.constraints.size()?null:this.constraints.get(t)},t.prototype.numTableConstraints=function(){return this.constraints.size()},t.prototype.addColumnConstraint=function(t,e){this.getOrCreateColumnConstraints(t).addConstraint(e)},t.prototype.addConstraints=function(t,e){this.getOrCreateColumnConstraints(t).addConstraints(e)},t.prototype.addColumnConstraints=function(t){this.getOrCreateColumnConstraints(t.name).addColumnConstraints(t)},t.prototype.getOrCreateColumnConstraints=function(t){var e=this.columnConstraints[t];return null==e&&(e=new r.ColumnConstraints(t),this.columnConstraints[t]=e),e},t.prototype.addColumnConstraintsMap=function(t){var e=this;t.forEach((function(t){e.addColumnConstraints(t)}))},t.prototype.getColumnConstraintsMap=function(){return this.columnConstraints},t.prototype.getColumnsWithConstraints=function(){return Array.from(Object.keys(this.columnConstraints))},t.prototype.getColumnConstraints=function(t){return this.columnConstraints[t]},t.prototype.getColumnConstraint=function(t,e){var n=null,r=this.getColumnConstraints(t);return null!=r&&(n=r.getConstraint(e)),n},t.prototype.numColumnConstraints=function(t){var e=0,n=this.getColumnConstraints(t);return null!=n&&(e=n.numConstraints()),e},t.prototype.addAllConstraints=function(t){null!=t&&(this.addTableConstraints(t.getTableConstraints()),this.addColumnConstraintsMap(t.getColumnConstraintsMap()))},t.prototype.hasConstraints=function(){return this.hasTableConstraints()||this.hasColumnConstraints()},t.prototype.hasTableConstraints=function(){return this.constraints.has()},t.prototype.hasColumnConstraints=function(){return Object.keys(this.columnConstraints).length>0},t.prototype.hasColumnConstraintsForColumn=function(t){return this.numColumnConstraints(t)>0},t}();e.TableConstraints=o},5045:(t,e,n)=>{"use strict";var r=n(5108);Object.defineProperty(e,"__esModule",{value:!0}),e.TableInfo=void 0;var i=n(4033),o=n(7319),a=n(9211),s=n(7043),u=n(175),l=n(5329),c=function(){function t(t,e){var n=this;this.namesToColumns=new Map,this.primaryKeys=[],this.tableName=t,this.columns=e,e.forEach((function(t){n.namesToColumns.set(t.getName(),t),t.isPrimaryKey()&&n.primaryKeys.push(t)}))}return t.prototype.getTableName=function(){return this.tableName},t.prototype.numColumns=function(){return this.columns.length},t.prototype.getColumns=function(){return this.columns.slice()},t.prototype.getColumnAtIndex=function(t){if(t<0||t>=this.columns.length)throw new Error("Column index: "+t+", not within range 0 to "+(this.columns.length-1));return this.columns[t]},t.prototype.hasColumn=function(t){return null!==this.getColumn(t)&&void 0!==this.getColumn(t)},t.prototype.getColumn=function(t){return this.namesToColumns.get(t)},t.prototype.hasPrimaryKey=function(){return 0!==this.primaryKeys.length},t.prototype.getPrimaryKeys=function(){return this.primaryKeys.slice()},t.prototype.getPrimaryKey=function(){var t=null;return this.hasPrimaryKey()&&(t=this.primaryKeys[0]),t},t.info=function(e,n){var o="PRAGMA table_info("+l.StringUtils.quoteWrap(n)+")",a=e.all(o,null),c=[];a.forEach((function(o){var a=o.cid,l=o.name,h=o.type,f=1===o.notnull,p=o.dflt_value,d=1===o.pk,y=!1;d&&(y=1===e.all("SELECT tbl_name FROM "+s.SQLiteMaster.TABLE_NAME+" WHERE "+u.SQLiteMasterColumn.nameFromType(u.SQLiteMasterColumn.TBL_NAME)+"=? AND "+u.SQLiteMasterColumn.nameFromType(u.SQLiteMasterColumn.SQL)+" LIKE ?",[n,"%AUTOINCREMENT%"]).length);var m=null;if(null!=h&&h.endsWith(")")){var g=h.indexOf("(");if(g>-1){var _=h.substring(g+1,h.length-1);if(0!==_.length)try{m=parseInt(_),h=h.substring(0,g)}catch(t){r.error(t)}}}var b=t.getDataType(h),v=void 0;o.dflt_value&&(v=o.dflt_value.replace(/\\'/g,""));var T=new i.TableColumn(a,l,h,b,m,f,p,v,d,y);c.push(T)}));var h=null;return 0!==c.length&&(h=new t(n,c)),h},t.getDataType=function(t){var e=o.GeoPackageDataType.fromName(t);null==e&&(null!=a.GeometryType.fromName(t)&&(e=o.GeoPackageDataType.BLOB));return e},t.CID="cid",t.NAME="name",t.TYPE="type",t.NOT_NULL="notnull",t.DFLT_VALUE="dflt_value",t.PK="pk",t.DEFAULT_NULL="NULL",t}();e.TableInfo=c},1648:function(t,e,n){"use strict";var r,i=this&&this.__extends||(r=function(t,e){return r=Object.setPrototypeOf||{__proto__:[]}instanceof Array&&function(t,e){t.__proto__=e}||function(t,e){for(var n in e)Object.prototype.hasOwnProperty.call(e,n)&&(t[n]=e[n])},r(t,e)},function(t,e){if("function"!=typeof e&&null!==e)throw new TypeError("Class extends value "+String(e)+" is not a constructor or null");function n(){this.constructor=t}r(t,e),t.prototype=null===e?Object.create(e):(n.prototype=e.prototype,new n)}),o=this&&this.__read||function(t,e){var n="function"==typeof Symbol&&t[Symbol.iterator];if(!n)return t;var r,i,o=n.call(t),a=[];try{for(;(void 0===e||e-- >0)&&!(r=o.next()).done;)a.push(r.value)}catch(t){i={error:t}}finally{try{r&&!r.done&&(n=o.return)&&n.call(o)}finally{if(i)throw i.error}}return a},a=this&&this.__spreadArray||function(t,e,n){if(n||2===arguments.length)for(var r,i=0,o=e.length;i0&&(t=t.concat(", ")),t=t.concat(r.getName())}return t.concat(")")},e.prototype.copy=function(){return new(e.bind.apply(e,a([void 0,this.name],o(this.columns),!1)))},e.prototype.add=function(){for(var t=this,e=[],n=0;n{"use strict";Object.defineProperty(e,"__esModule",{value:!0}),e.TableCreator=void 0;var r=n(5965),i=n(5042),o=function(){function t(t){this.geopackage=t,this.connection=t.database}return t.prototype.createRequired=function(){var t=new r.SpatialReferenceSystemDao(this.geopackage);return this.createSpatialReferenceSystem(),this.createContents(),t.createUndefinedGeographic(),t.createWgs84(),t.createUndefinedCartesian(),t.createWebMercator(),!0},t.prototype.createSpatialReferenceSystem=function(){return this.createTable("spatial_reference_system")},t.prototype.createContents=function(){return this.createTable("contents")},t.prototype.createGeometryColumns=function(){return this.createTable("geometry_columns")},t.prototype.createTileMatrixSet=function(){return this.createTable("tile_matrix_set")},t.prototype.createTileMatrix=function(){return this.createTable("tile_matrix")},t.prototype.createDataColumns=function(){return this.createTable("data_columns")},t.prototype.createDataColumnConstraints=function(){return this.createTable("data_column_constraints")},t.prototype.createMetadata=function(){return this.createTable("metadata")},t.prototype.createMetadataReference=function(){return this.createTable("metadata_reference")},t.prototype.createExtensions=function(){return this.createTable("extensions")},t.prototype.createTableIndex=function(){return this.createTable("table_index")},t.prototype.createGeometryIndex=function(){return this.createTable("geometry_index")},t.prototype.createFeatureTileLink=function(){return this.createTable("feature_tile_link")},t.prototype.createExtendedRelations=function(){return this.createTable("extended_relations")},t.prototype.createContentsId=function(){return this.createTable("contents_id")},t.prototype.createTileScaling=function(){return this.createTable("tile_scaling")},t.prototype.createTable=function(e){for(var n=!0,r=t.tableCreationScripts[e],i=0;i 0);END","CREATE TRIGGER 'gpkg_tile_matrix_pixel_x_size_update'BEFORE UPDATE OF pixel_x_size ON 'gpkg_tile_matrix'FOR EACH ROW BEGIN SELECT RAISE(ABORT, 'update on table ''gpkg_tile_matrix'' violates constraint: pixel_x_size must be greater than 0')WHERE NOT (NEW.pixel_x_size > 0);END","CREATE TRIGGER 'gpkg_tile_matrix_pixel_y_size_insert'BEFORE INSERT ON 'gpkg_tile_matrix'FOR EACH ROW BEGIN SELECT RAISE(ABORT, 'insert on table ''gpkg_tile_matrix'' violates constraint: pixel_y_size must be greater than 0')WHERE NOT (NEW.pixel_y_size > 0);END","CREATE TRIGGER 'gpkg_tile_matrix_pixel_y_size_update'BEFORE UPDATE OF pixel_y_size ON 'gpkg_tile_matrix'FOR EACH ROW BEGIN SELECT RAISE(ABORT, 'update on table ''gpkg_tile_matrix'' violates constraint: pixel_y_size must be greater than 0')WHERE NOT (NEW.pixel_y_size > 0);END"],data_columns:["CREATE TABLE gpkg_data_columns ( table_name TEXT NOT NULL, column_name TEXT NOT NULL, name TEXT, title TEXT, description TEXT, mime_type TEXT, constraint_name TEXT, CONSTRAINT pk_gdc PRIMARY KEY (table_name, column_name), CONSTRAINT gdc_tn UNIQUE (table_name, name))"],data_column_constraints:['CREATE TABLE gpkg_data_column_constraints ( constraint_name TEXT NOT NULL, constraint_type TEXT NOT NULL, /* "range" | "enum" | "glob" */ value TEXT, min NUMERIC, min_is_inclusive BOOLEAN, /* 0 = false, 1 = true */ max NUMERIC, max_is_inclusive BOOLEAN, /* 0 = false, 1 = true */ description TEXT, CONSTRAINT gdcc_ntv UNIQUE (constraint_name, constraint_type, value))'],metadata:['CREATE TABLE gpkg_metadata ( id INTEGER CONSTRAINT m_pk PRIMARY KEY ASC NOT NULL, md_scope TEXT NOT NULL DEFAULT "dataset", md_standard_uri TEXT NOT NULL, mime_type TEXT NOT NULL DEFAULT "text/xml", metadata TEXT NOT NULL)',"CREATE TRIGGER 'gpkg_metadata_md_scope_insert' BEFORE INSERT ON 'gpkg_metadata' FOR EACH ROW BEGIN SELECT RAISE(ABORT, 'insert on table gpkg_metadata violates constraint: md_scope must be one of undefined | fieldSession | collectionSession | series | dataset | featureType | feature | attributeType | attribute | tile | model | catalogue | schema | taxonomy software | service | collectionHardware | nonGeographicDataset | dimensionGroup') WHERE NOT(NEW.md_scope IN ('undefined','fieldSession','collectionSession','series','dataset', 'featureType','feature','attributeType','attribute','tile','model', 'catalogue','schema','taxonomy','software','service', 'collectionHardware','nonGeographicDataset','dimensionGroup')); END","CREATE TRIGGER 'gpkg_metadata_md_scope_update' BEFORE UPDATE OF 'md_scope' ON 'gpkg_metadata' FOR EACH ROW BEGIN SELECT RAISE(ABORT, 'update on table gpkg_metadata violates constraint: md_scope must be one of undefined | fieldSession | collectionSession | series | dataset | featureType | feature | attributeType | attribute | tile | model | catalogue | schema | taxonomy software | service | collectionHardware | nonGeographicDataset | dimensionGroup') WHERE NOT(NEW.md_scope IN ('undefined','fieldSession','collectionSession','series','dataset', 'featureType','feature','attributeType','attribute','tile','model', 'catalogue','schema','taxonomy','software','service', 'collectionHardware','nonGeographicDataset','dimensionGroup')); END"],metadata_reference:["CREATE TABLE gpkg_metadata_reference ( reference_scope TEXT NOT NULL, table_name TEXT, column_name TEXT, row_id_value INTEGER, timestamp DATETIME NOT NULL DEFAULT (strftime('%Y-%m-%dT%H:%M:%fZ','now')), md_file_id INTEGER NOT NULL, md_parent_id INTEGER, CONSTRAINT crmr_mfi_fk FOREIGN KEY (md_file_id) REFERENCES gpkg_metadata(id), CONSTRAINT crmr_mpi_fk FOREIGN KEY (md_parent_id) REFERENCES gpkg_metadata(id))","CREATE TRIGGER 'gpkg_metadata_reference_reference_scope_insert' BEFORE INSERT ON 'gpkg_metadata_reference' FOR EACH ROW BEGIN SELECT RAISE(ABORT, 'insert on table gpkg_metadata_reference violates constraint: reference_scope must be one of \"geopackage\", table\", \"column\", \"row\", \"row/col\"') WHERE NOT NEW.reference_scope IN ('geopackage','table','column','row','row/col'); END","CREATE TRIGGER 'gpkg_metadata_reference_reference_scope_update' BEFORE UPDATE OF 'reference_scope' ON 'gpkg_metadata_reference' FOR EACH ROW BEGIN SELECT RAISE(ABORT, 'update on table gpkg_metadata_reference violates constraint: referrence_scope must be one of \"geopackage\", \"table\", \"column\", \"row\", \"row/col\"') WHERE NOT NEW.reference_scope IN ('geopackage','table','column','row','row/col'); END","CREATE TRIGGER 'gpkg_metadata_reference_column_name_insert' BEFORE INSERT ON 'gpkg_metadata_reference' FOR EACH ROW BEGIN SELECT RAISE(ABORT, 'insert on table gpkg_metadata_reference violates constraint: column name must be NULL when reference_scope is \"geopackage\", \"table\" or \"row\"') WHERE (NEW.reference_scope IN ('geopackage','table','row') AND NEW.column_name IS NOT NULL); SELECT RAISE(ABORT, 'insert on table gpkg_metadata_reference violates constraint: column name must be defined for the specified table when reference_scope is \"column\" or \"row/col\"') WHERE (NEW.reference_scope IN ('column','row/col') AND NOT NEW.table_name IN ( SELECT name FROM SQLITE_MASTER WHERE type = 'table' AND name = NEW.table_name AND sql LIKE ('%' || NEW.column_name || '%'))); END","CREATE TRIGGER 'gpkg_metadata_reference_column_name_update' BEFORE UPDATE OF column_name ON 'gpkg_metadata_reference' FOR EACH ROW BEGIN SELECT RAISE(ABORT, 'update on table gpkg_metadata_reference violates constraint: column name must be NULL when reference_scope is \"geopackage\", \"table\" or \"row\"') WHERE (NEW.reference_scope IN ('geopackage','table','row') AND NEW.column_nameIS NOT NULL); SELECT RAISE(ABORT, 'update on table gpkg_metadata_reference violates constraint: column name must be defined for the specified table when reference_scope is \"column\" or \"row/col\"') WHERE (NEW.reference_scope IN ('column','row/col') AND NOT NEW.table_name IN ( SELECT name FROM SQLITE_MASTER WHERE type = 'table' AND name = NEW.table_name AND sql LIKE ('%' || NEW.column_name || '%'))); END","CREATE TRIGGER 'gpkg_metadata_reference_row_id_value_insert' BEFORE INSERT ON 'gpkg_metadata_reference' FOR EACH ROW BEGIN SELECT RAISE(ABORT, 'insert on table gpkg_metadata_reference violates constraint: row_id_value must be NULL when reference_scope is \"geopackage\", \"table\" or \"column\"') WHERE NEW.reference_scope IN ('geopackage','table','column') AND NEW.row_id_value IS NOT NULL; END ","CREATE TRIGGER 'gpkg_metadata_reference_row_id_value_update' BEFORE UPDATE OF 'row_id_value' ON 'gpkg_metadata_reference' FOR EACH ROW BEGIN SELECT RAISE(ABORT, 'update on table gpkg_metadata_reference violates constraint: row_id_value must be NULL when reference_scope is \"geopackage\", \"table\" or \"column\"') WHERE NEW.reference_scope IN ('geopackage','table','column') AND NEW.row_id_value IS NOT NULL; END","CREATE TRIGGER 'gpkg_metadata_reference_timestamp_insert' BEFORE INSERT ON 'gpkg_metadata_reference' FOR EACH ROW BEGIN SELECT RAISE(ABORT, 'insert on table gpkg_metadata_reference violates constraint: timestamp must be a valid time in ISO 8601 \"yyyy-mm-ddThh:mm:ss.cccZ\" form') WHERE NOT (NEW.timestamp GLOB '[1-2][0-9][0-9][0-9]-[0-1][0-9]-[0-3][0-9]T[0-2][0-9]:[0-5][0-9]:[0-5][0-9].[0-9][0-9][0-9]Z' AND strftime('%s',NEW.timestamp) NOT NULL); END","CREATE TRIGGER 'gpkg_metadata_reference_timestamp_update' BEFORE UPDATE OF 'timestamp' ON 'gpkg_metadata_reference' FOR EACH ROW BEGIN SELECT RAISE(ABORT, 'update on table gpkg_metadata_reference violates constraint: timestamp must be a valid time in ISO 8601 \"yyyy-mm-ddThh:mm:ss.cccZ\" form') WHERE NOT (NEW.timestamp GLOB '[1-2][0-9][0-9][0-9]-[0-1][0-9]-[0-3][0-9]T[0-2][0-9]:[0-5][0-9]:[0-5][0-9].[0-9][0-9][0-9]Z' AND strftime('%s',NEW.timestamp) NOT NULL); END "],extensions:["CREATE TABLE gpkg_extensions ( table_name TEXT, column_name TEXT, extension_name TEXT NOT NULL, definition TEXT NOT NULL, scope TEXT NOT NULL, CONSTRAINT ge_tce UNIQUE (table_name, column_name, extension_name))"],table_index:["CREATE TABLE nga_table_index ( table_name TEXT NOT NULL PRIMARY KEY, last_indexed DATETIME)"],geometry_index:["CREATE TABLE nga_geometry_index ( table_name TEXT NOT NULL, geom_id INTEGER NOT NULL, min_x DOUBLE NOT NULL, max_x DOUBLE NOT NULL, min_y DOUBLE NOT NULL, max_y DOUBLE NOT NULL, min_z DOUBLE, max_z DOUBLE, min_m DOUBLE, max_m DOUBLE, CONSTRAINT pk_ngi PRIMARY KEY (table_name, geom_id), CONSTRAINT fk_ngi_nti_tn FOREIGN KEY (table_name) REFERENCES nga_table_index(table_name))"],feature_tile_link:["CREATE TABLE nga_feature_tile_link ( feature_table_name TEXT NOT NULL, tile_table_name TEXT NOT NULL, CONSTRAINT pk_nftl PRIMARY KEY (feature_table_name, tile_table_name))"],extended_relations:["CREATE TABLE gpkgext_relations ( id INTEGER PRIMARY KEY AUTOINCREMENT, base_table_name TEXT NOT NULL, base_primary_column TEXT NOT NULL DEFAULT 'id', related_table_name TEXT NOT NULL, related_primary_column TEXT NOT NULL DEFAULT 'id', relation_name TEXT NOT NULL, mapping_table_name TEXT NOT NULL UNIQUE)"],contents_id:["CREATE TABLE nga_contents_id ( id INTEGER PRIMARY KEY AUTOINCREMENT NOT NULL, table_name TEXT NOT NULL, CONSTRAINT uk_nci_table_name UNIQUE (table_name), CONSTRAINT fk_nci_gc_tn FOREIGN KEY (table_name) REFERENCES gpkg_contents(table_name))"],tile_scaling:["CREATE TABLE nga_tile_scaling ( table_name TEXT PRIMARY KEY NOT NULL, scaling_type TEXT NOT NULL, zoom_in INTEGER, zoom_out INTEGER, CONSTRAINT fk_nts_gtms_tn FOREIGN KEY (table_name) REFERENCES gpkg_tile_matrix_set (table_name), CHECK (scaling_type in ('in','out','in_out','out_in','closest_in_out','closest_out_in')))"]},t}();e.TableCreator=o},2431:function(t,e,n){"use strict";var r=this&&this.__importDefault||function(t){return t&&t.__esModule?t:{default:t}};Object.defineProperty(e,"__esModule",{value:!0}),e.TableMapping=void 0;var i=r(n(4293)),o=r(n(8446)),a=r(n(3674)),s=r(n(2628)),u=n(1790),l=function(){function t(t,e,n){var r=this;this._transferContent=!0,this._columns={},this._droppedColumns=new Set,this._fromTable=t,this._toTable=e,n.forEach((function(t){r.addMappedColumn(new u.MappedColumn(t.name,t.name,t.defaultValue,t.dataType))}))}return t.fromTableInfo=function(e){var n=new t(e.getTableName(),e.getTableName(),[]);return e.getColumns().forEach((function(t){n.addMappedColumn(new u.MappedColumn(t.getName(),t.getName(),t.getDefaultValue(),t.getDataType()))})),n},Object.defineProperty(t.prototype,"fromTable",{get:function(){return this._fromTable},set:function(t){this._fromTable=t},enumerable:!1,configurable:!0}),Object.defineProperty(t.prototype,"toTable",{get:function(){return this._toTable},set:function(t){this._toTable=t},enumerable:!1,configurable:!0}),t.prototype.isNewTable=function(){return!(0,i.default)(this._toTable)&&!(0,o.default)(this._toTable,this._fromTable)},t.prototype.isTransferContent=function(){return this._transferContent},Object.defineProperty(t.prototype,"transferContent",{set:function(t){this._transferContent=t},enumerable:!1,configurable:!0}),t.prototype.addMappedColumn=function(t){this._columns[t.toColumn]=t},t.prototype.addColumnWithName=function(t){this._columns[t]=new u.MappedColumn(t,null,null,null)},t.prototype.removeColumn=function(t){var e=this._columns[t];return delete this._columns[t],e},t.prototype.getColumnNames=function(){return(0,a.default)(this._columns)},t.prototype.getColumns=function(){return this._columns},t.prototype.getMappedColumns=function(){return(0,s.default)(this._columns)},t.prototype.getColumn=function(t){return this._columns[t]},t.prototype.addDroppedColumn=function(t){this._droppedColumns.add(t)},t.prototype.removeDroppedColumn=function(t){return this._droppedColumns.delete(t)},Object.defineProperty(t.prototype,"droppedColumns",{get:function(){return this._droppedColumns},enumerable:!1,configurable:!0}),t.prototype.isDroppedColumn=function(t){return this._droppedColumns.has(t)},t.prototype.hasWhere=function(){return!(0,i.default)(this._where)},Object.defineProperty(t.prototype,"where",{get:function(){return this._where},set:function(t){this._where=t},enumerable:!1,configurable:!0}),t}();e.TableMapping=l},8140:(t,e,n)=>{"use strict";Object.defineProperty(e,"__esModule",{value:!0}),e.BaseExtension=void 0;var r=n(624),i=function(){function t(t){this.geoPackage=t,this.connection=t.connection,this.extensionsDao=t.extensionDao}return t.prototype.getOrCreate=function(t,e,n,r,i){var o=this.getExtension(t,e,n);return o.length?o[0]:(this.extensionsDao.createTable(),this.createExtension(t,e,n,r,i),this.getExtension(t,e,n)[0])},t.prototype.getExtension=function(t,e,n){return this.extensionsDao.isTableExists()?this.extensionsDao.queryByExtensionAndTableNameAndColumnName(t,e,n):[]},t.prototype.hasExtension=function(t,e,n){return!!this.getExtension(t,e,n).length},t.prototype.hasExtensions=function(t){return 0!==this.extensionsDao.queryAllByExtension(t).length},t.prototype.createExtension=function(t,e,n,i,o){var a=new r.Extension;return a.table_name=e,a.column_name=n,a.extension_name=t,a.definition=i,a.scope=o,this.extensionsDao.create(a)},t}();e.BaseExtension=i},4650:(t,e)=>{"use strict";Object.defineProperty(e,"__esModule",{value:!0}),e.ContentsId=void 0;e.ContentsId=function(){}},7092:function(t,e,n){"use strict";var r,i=this&&this.__extends||(r=function(t,e){return r=Object.setPrototypeOf||{__proto__:[]}instanceof Array&&function(t,e){t.__proto__=e}||function(t,e){for(var n in e)Object.prototype.hasOwnProperty.call(e,n)&&(t[n]=e[n])},r(t,e)},function(t,e){if("function"!=typeof e&&null!==e)throw new TypeError("Class extends value "+String(e)+" is not a constructor or null");function n(){this.constructor=t}r(t,e),t.prototype=null===e?Object.create(e):(n.prototype=e.prototype,new n)});Object.defineProperty(e,"__esModule",{value:!0}),e.ContentsIdDao=void 0;var o=n(4115),a=n(4650),s=function(t){function e(){var n=null!==t&&t.apply(this,arguments)||this;return n.gpkgTableName=e.TABLE_NAME,n.idColumns=["id"],n}return i(e,t),e.prototype.createObject=function(t){var e=new a.ContentsId;return t&&(e.id=t.id,e.table_name=t.table_name),e},e.prototype.createTable=function(){return this.geoPackage.getTableCreator().createContentsId()},e.prototype.getTableNames=function(){for(var t=[],e=this.queryForColumns("table_name"),n=0;n0?n[0]:null},e.prototype.deleteByTableName=function(t){return this.deleteWhere(this.buildWhereWithFieldAndValue(e.COLUMN_TABLE_NAME,t),this.buildWhereArgs(t))},e.TABLE_NAME="nga_contents_id",e.COLUMN_ID="id",e.COLUMN_TABLE_NAME="table_name",e}(o.Dao);e.ContentsIdDao=s},1314:function(t,e,n){"use strict";var r,i=this&&this.__extends||(r=function(t,e){return r=Object.setPrototypeOf||{__proto__:[]}instanceof Array&&function(t,e){t.__proto__=e}||function(t,e){for(var n in e)Object.prototype.hasOwnProperty.call(e,n)&&(t[n]=e[n])},r(t,e)},function(t,e){if("function"!=typeof e&&null!==e)throw new TypeError("Class extends value "+String(e)+" is not a constructor or null");function n(){this.constructor=t}r(t,e),t.prototype=null===e?Object.create(e):(n.prototype=e.prototype,new n)});Object.defineProperty(e,"__esModule",{value:!0}),e.ContentsIdExtension=void 0;var o=n(8140),a=n(624),s=n(7092),u=n(6638),l=function(t){function e(e){var n=t.call(this,e)||this;return n.contentsIdDao=e.contentsIdDao,n}return i(e,t),e.prototype.getOrCreateExtension=function(){var t=this.getOrCreate(e.EXTENSION_NAME,null,null,e.EXTENSION_DEFINITION,a.Extension.READ_WRITE);return this.contentsIdDao.createTable(),t},Object.defineProperty(e.prototype,"dao",{get:function(){return this.contentsIdDao},enumerable:!1,configurable:!0}),e.prototype.has=function(){return this.hasExtension(e.EXTENSION_NAME,null,null)&&this.contentsIdDao.isTableExists()},e.prototype.get=function(t){var e=null;return t&&t.table_name&&(e=this.getByTableName(t.table_name)),e},e.prototype.getByTableName=function(t){var e=null;return this.contentsIdDao.isTableExists()&&(e=this.contentsIdDao.queryForTableName(t)),e},e.prototype.getId=function(t){var e=null;return t&&t.table_name&&(e=this.getIdByTableName(t.table_name)),e},e.prototype.getIdByTableName=function(t){var e=null;if(this.contentsIdDao.isTableExists()){var n=this.contentsIdDao.queryForTableName(t);n&&(e=n.id)}return e},e.prototype.create=function(t){var e=null;return t&&t.table_name&&(e=this.createWithTableName(t.table_name)),e},e.prototype.createWithTableName=function(t){var e=this.contentsIdDao.createObject();return e.table_name=t,e.id=this.contentsIdDao.create(e),e},e.prototype.createId=function(t){var e=null;return t&&t.table_name&&(e=this.createIdWithTableName(t.table_name)),e},e.prototype.createIdWithTableName=function(t){return this.createWithTableName(t)},e.prototype.getOrCreateId=function(t){var e=null;return t&&t.table_name&&(e=this.getOrCreateIdByTableName(t.table_name)),e},e.prototype.getOrCreateIdByTableName=function(t){var e=this.getByTableName(t);return null==e&&(e=this.createWithTableName(t)),e},e.prototype.deleteId=function(t){var e=0;return t&&t.table_name&&(e=this.deleteIdByTableName(t.table_name)),e},e.prototype.deleteIdByTableName=function(t){return this.contentsIdDao.deleteByTableName(t)},e.prototype.count=function(){var t=0;return this.has()&&(t=this.contentsIdDao.count()),t},e.prototype.createIds=function(t){void 0===t&&(t="");for(var e=this.getMissing(t),n=0;n0&&(r+=u.ContentsDao.COLUMN_DATA_TYPE,r+=" = ?",i.push(t)),r.length>0&&(n+=" WHERE "+r),n+=")",e=this.connection.all(n,i)}return e},e.prototype.getMissing=function(t){void 0===t&&(t="");var e="SELECT "+u.ContentsDao.COLUMN_TABLE_NAME+" FROM "+u.ContentsDao.TABLE_NAME,n="",r=[];return null!=t&&t.length>0&&(n+=u.ContentsDao.COLUMN_DATA_TYPE,n+=" = ?",r.push(t)),this.has()&&(n.length>0&&(n+=" AND "),n+=u.ContentsDao.COLUMN_TABLE_NAME,n+=" NOT IN (SELECT ",n+=s.ContentsIdDao.COLUMN_TABLE_NAME,n+=" FROM ",n+=s.ContentsIdDao.TABLE_NAME,n+=")"),n.length>0&&(e+=" WHERE "+n),this.connection.all(e,r)},e.prototype.removeExtension=function(){this.contentsIdDao.isTableExists()&&this.geoPackage.deleteTable(s.ContentsIdDao.TABLE_NAME),this.extensionsDao.isTableExists()&&this.extensionsDao.deleteByExtension(e.EXTENSION_NAME)},e.EXTENSION_NAME="nga_contents_id",e.EXTENSION_AUTHOR="nga",e.EXTENSION_NAME_NO_AUTHOR="contents_id",e.EXTENSION_DEFINITION="http://ngageoint.github.io/GeoPackage/docs/extensions/contents-id.html",e}(o.BaseExtension);e.ContentsIdExtension=l},5306:function(t,e,n){"use strict";var r,i=this&&this.__extends||(r=function(t,e){return r=Object.setPrototypeOf||{__proto__:[]}instanceof Array&&function(t,e){t.__proto__=e}||function(t,e){for(var n in e)Object.prototype.hasOwnProperty.call(e,n)&&(t[n]=e[n])},r(t,e)},function(t,e){if("function"!=typeof e&&null!==e)throw new TypeError("Class extends value "+String(e)+" is not a constructor or null");function n(){this.constructor=t}r(t,e),t.prototype=null===e?Object.create(e):(n.prototype=e.prototype,new n)});Object.defineProperty(e,"__esModule",{value:!0}),e.CrsWktExtension=void 0;var o=n(624),a=function(t){function e(n){var r=t.call(this,n)||this;return r.extensionName=e.EXTENSION_NAME,r.extensionDefinition=e.EXTENSION_CRS_WKT_DEFINITION,r}return i(e,t),e.prototype.getOrCreateExtension=function(){return this.getOrCreate(this.extensionName,null,null,this.extensionDefinition,o.Extension.READ_WRITE)},e.prototype.has=function(){return this.hasExtension(e.EXTENSION_NAME,null,null)},e.prototype.removeExtension=function(){try{this.extensionsDao.isTableExists()&&this.extensionsDao.deleteByExtension(e.EXTENSION_NAME)}catch(t){throw new Error("Failed to delete CrsWkt extension. GeoPackage: "+this.geoPackage.name)}},e.EXTENSION_NAME="gpkg_crs_wkt",e.EXTENSION_CRS_WKT_AUTHOR="gpkg",e.EXTENSION_CRS_WKT_NAME_NO_AUTHOR="crs_wkt",e.EXTENSION_CRS_WKT_DEFINITION="http://www.geopackage.org/spec/#extension_crs_wkt",e}(n(8140).BaseExtension);e.CrsWktExtension=a},624:(t,e)=>{"use strict";Object.defineProperty(e,"__esModule",{value:!0}),e.Extension=void 0;var n=function(){function t(){}return t.prototype.setExtensionName=function(e,n){this.extension_name=t.buildExtensionName(e,n)},Object.defineProperty(t.prototype,"author",{get:function(){return t.getAuthorWithExtensionName(this.extension_name)},enumerable:!1,configurable:!0}),Object.defineProperty(t.prototype,"extensionNameNoAuthor",{get:function(){return t.getExtensionNameNoAuthor(this.extension_name)},enumerable:!1,configurable:!0}),t.buildExtensionName=function(e,n){return e+t.EXTENSION_NAME_DIVIDER+n},t.getAuthorWithExtensionName=function(e){return e.split(t.EXTENSION_NAME_DIVIDER)[0]},t.getExtensionNameNoAuthor=function(e){return e.slice(e.indexOf(t.EXTENSION_NAME_DIVIDER)+1)},t.prototype.getTableName=function(){return this.table_name},t.prototype.setTableName=function(t){this.table_name=t,null==t&&(this.column_name=null)},t.EXTENSION_NAME_DIVIDER="_",t.READ_WRITE="read-write",t.WRITE_ONLY="write-only",t}();e.Extension=n},5698:function(t,e,n){"use strict";var r,i=this&&this.__extends||(r=function(t,e){return r=Object.setPrototypeOf||{__proto__:[]}instanceof Array&&function(t,e){t.__proto__=e}||function(t,e){for(var n in e)Object.prototype.hasOwnProperty.call(e,n)&&(t[n]=e[n])},r(t,e)},function(t,e){if("function"!=typeof e&&null!==e)throw new TypeError("Class extends value "+String(e)+" is not a constructor or null");function n(){this.constructor=t}r(t,e),t.prototype=null===e?Object.create(e):(n.prototype=e.prototype,new n)}),o=this&&this.__values||function(t){var e="function"==typeof Symbol&&Symbol.iterator,n=e&&t[e],r=0;if(n)return n.call(t);if(t&&"number"==typeof t.length)return{next:function(){return t&&r>=t.length&&(t=void 0),{value:t&&t[r++],done:!t}}};throw new TypeError(e?"Object is not iterable.":"Symbol.iterator is not defined.")};Object.defineProperty(e,"__esModule",{value:!0}),e.ExtensionDao=void 0;var a=n(624),s=n(4115),u=n(8572),l=n(1459),c=function(t){function e(){var n=null!==t&&t.apply(this,arguments)||this;return n.gpkgTableName=e.TABLE_NAME,n.idColumns=[e.COLUMN_TABLE_NAME,e.COLUMN_COLUMN_NAME,e.COLUMN_EXTENSION_NAME],n}return i(e,t),e.prototype.createObject=function(t){var e=new a.Extension;return e.table_name=t.table_name,e.column_name=t.column_name,e.extension_name=t.extension_name,e.definition=t.definition,e.scope=t.scope,e},e.prototype.queryByExtension=function(t){var n=this.queryForAllEq(e.COLUMN_EXTENSION_NAME,t);if(n[0])return this.createObject(n[0])},e.prototype.queryAllByExtension=function(t){var n,r,i=[];try{for(var a=o(this.queryForAllEq(e.COLUMN_EXTENSION_NAME,t)),s=a.next();!s.done;s=a.next()){var u=s.value,l=this.createObject(u);i.push(l)}}catch(t){n={error:t}}finally{try{s&&!s.done&&(r=a.return)&&r.call(a)}finally{if(n)throw n.error}}return i},e.prototype.queryByExtensionAndTableName=function(t,n){var r,i,a=new u.ColumnValues;a.addColumn(e.COLUMN_EXTENSION_NAME,t),a.addColumn(e.COLUMN_TABLE_NAME,n);var s=[];try{for(var l=o(this.queryForFieldValues(a)),c=l.next();!c.done;c=l.next()){var h=c.value;s.push(this.createObject(h))}}catch(t){r={error:t}}finally{try{c&&!c.done&&(i=l.return)&&i.call(l)}finally{if(r)throw r.error}}return s},e.prototype.queryByExtensionAndTableNameAndColumnName=function(t,n,r){var i,a,s=new u.ColumnValues;s.addColumn(e.COLUMN_EXTENSION_NAME,t),null!=n&&s.addColumn(e.COLUMN_TABLE_NAME,n),null!=r&&s.addColumn(e.COLUMN_COLUMN_NAME,r);var l=[];try{for(var c=o(this.queryForFieldValues(s)),h=c.next();!h.done;h=c.next()){var f=h.value,p=this.createObject(f);l.push(p)}}catch(t){i={error:t}}finally{try{h&&!h.done&&(a=c.return)&&a.call(c)}finally{if(i)throw i.error}}return l},e.prototype.createTable=function(){return new l.TableCreator(this.geoPackage).createExtensions()},e.prototype.deleteByExtension=function(t){var n=new u.ColumnValues;return n.addColumn(e.COLUMN_EXTENSION_NAME,t),this.deleteWhere(this.buildWhere(n,"="),this.buildWhereArgs(n))},e.prototype.deleteByExtensionAndTableName=function(t,n){var r=new u.ColumnValues;return r.addColumn(e.COLUMN_EXTENSION_NAME,t),r.addColumn(e.COLUMN_TABLE_NAME,n),this.deleteWhere(this.buildWhere(r,"and"),this.buildWhereArgs(r))},e.prototype.deleteByExtensionAndTableNameAndColumnName=function(t,n,r){var i=new u.ColumnValues;return i.addColumn(e.COLUMN_EXTENSION_NAME,t),i.addColumn(e.COLUMN_TABLE_NAME,n),i.addColumn(e.COLUMN_COLUMN_NAME,r),this.deleteWhere(this.buildWhere(i,"and"),this.buildWhereArgs(i))},e.TABLE_NAME="gpkg_extensions",e.COLUMN_TABLE_NAME="table_name",e.COLUMN_COLUMN_NAME="column_name",e.COLUMN_EXTENSION_NAME="extension_name",e.COLUMN_DEFINITION="definition",e.COLUMN_SCOPE="scope",e}(s.Dao);e.ExtensionDao=c},9406:(t,e,n)=>{"use strict";var r=n(5108);Object.defineProperty(e,"__esModule",{value:!0}),e.GeoPackageExtensions=void 0;var i=n(6131),o=n(5859),a=n(1832),s=n(5045),u=n(5042),l=n(362),c=n(8314),h=n(2431),f=n(8904),p=n(8116),d=n(4941),y=n(1459),m=n(1133),g=n(3501),_=n(2056),b=n(5306),v=function(){function t(){}return t.deleteTableExtensions=function(e,n){i.NGAExtensions.deleteTableExtensions(e,n),t.deleteRTreeSpatialIndex(e,n),t.deleteRelatedTables(e,n),t.deleteSchema(e,n),t.deleteMetadata(e,n),t.deleteExtensionForTable(e,n)},t.deleteExtensions=function(t){i.NGAExtensions.deleteExtensions(t),this.deleteRTreeSpatialIndexExtension(t),this.deleteRelatedTablesExtension(t),this.deleteSchemaExtension(t),this.deleteMetadataExtension(t),this.deleteCrsWktExtension(t),this.delete(t)},t.copyTableExtensions=function(e,n,o){try{t.copyRTreeSpatialIndex(e,n,o),t.copyRelatedTables(e,n,o),t.copySchema(e,n,o),t.copyMetadata(e,n,o),i.NGAExtensions.copyTableExtensions(e,n,o)}catch(t){r.warn("Failed to copy extensions for table: "+o+", copied from table: "+n,t)}},t.deleteExtensionForTable=function(t,e){var n=t.extensionDao;try{n.isTableExists()&&n.deleteByExtension(e)}catch(n){throw new Error("Failed to delete Table extensions. GeoPackage: "+t.name+", Table: "+e)}},t.delete=function(t){var e=t.extensionDao;try{e.isTableExists()&&t.dropTable(e.gpkgTableName)}catch(e){throw new Error("Failed to delete all extensions. GeoPackage: "+t.name)}},t.deleteRTreeSpatialIndex=function(e,n){var r=t.getRTreeIndexExtension(e);r.has(n)&&r.deleteTable(n)},t.deleteRTreeSpatialIndexExtension=function(e){var n=t.getRTreeIndexExtension(e);n.has()&&n.deleteAll()},t.copyRTreeSpatialIndex=function(e,n,i){try{var o=t.getRTreeIndexExtension(e);if(o.has(n)){var a=e.geometryColumnsDao.queryForTableName(i);if(null!=a){var u=s.TableInfo.info(e.connection,i);if(null!=u){var l=u.getPrimaryKey().getName();o.createWithParameters(i,a.column_name,l)}}}}catch(t){r.warn("Failed to create RTree for table: "+i+", copied from table: "+n,t)}},t.getRTreeIndexExtension=function(t){return new o.RTreeIndex(t,null)},t.deleteRelatedTables=function(e,n){var r=t.getRelatedTableExtension(e);r.has()&&r.removeRelationships(n)},t.deleteRelatedTablesExtension=function(e){var n=t.getRelatedTableExtension(e);n.has()&&n.removeExtension()},t.copyRelatedTables=function(e,n,i){try{var o=t.getRelatedTableExtension(e);if(o.has()){var p=o.extendedRelationDao,d=e.extensionDao;p.getBaseTableRelations(n).forEach((function(t){var r=t.mapping_table_name,o=d.queryByExtensionAndTableName(a.RelatedTablesExtension.EXTENSION_NAME,r).concat(d.queryByExtensionAndTableName(a.RelatedTablesExtension.EXTENSION_RELATED_TABLES_NAME_NO_AUTHOR,r));if(o.length>0){var p=u.CoreSQLUtils.createName(e.connection,r,n,i),y=new l.UserCustomTableReader(r).readTable(e.connection);c.AlterTable.copyTable(e.connection,y,p);var m=o[0];m.setTableName(p),d.create(m);var g=h.TableMapping.fromTableInfo(s.TableInfo.info(e.connection,f.ExtendedRelationDao.TABLE_NAME));g.removeColumn(f.ExtendedRelationDao.ID);var _=g.getColumn(f.ExtendedRelationDao.BASE_TABLE_NAME);_.constantValue=i,_.whereValue=n;var b=g.getColumn(f.ExtendedRelationDao.MAPPING_TABLE_NAME);b.constantValue=p,b.whereValue=r,u.CoreSQLUtils.transferTableContentForTableMapping(e.connection,g)}}))}}catch(t){r.warn("Failed to create Related Tables for table: "+i+", copied from table: "+n,t)}},t.getRelatedTableExtension=function(t){return new a.RelatedTablesExtension(t)},t.deleteSchema=function(t,e){var n=t.dataColumnsDao;try{n.isTableExists()&&n.deleteByTableName(e)}catch(n){throw new Error("Failed to delete Schema extension. GeoPackage: "+t.name+", Table: "+e)}},t.deleteSchemaExtension=function(t){var e=new p.SchemaExtension(t);e.has()&&e.removeExtension()},t.copySchema=function(t,e,n){try{if(t.isTable(d.DataColumnsDao.TABLE_NAME)){var i=new l.UserCustomTableReader(d.DataColumnsDao.TABLE_NAME).readUserCustomTable(t),o=i.getColumnWithColumnName(d.DataColumnsDao.COLUMN_NAME);if(o.hasConstraints()){if(o.clearConstraints(),i.hasConstraints()){i.clearConstraints();var a=y.TableCreator.tableCreationScripts.data_columns[0],s=m.ConstraintParser.getConstraints(a);i.addConstraints(s.getTableConstraints())}c.AlterTable.alterColumnForTable(t.connection,i,o)}u.CoreSQLUtils.transferTableContent(t.connection,d.DataColumnsDao.TABLE_NAME,d.DataColumnsDao.COLUMN_TABLE_NAME,n,e)}}catch(t){r.warn("Failed to create Schema for table: "+n+", copied from table: "+e,t)}},t.deleteMetadata=function(t,e){var n=t.metadataReferenceDao;try{n.isTableExists()&&n.deleteByTableName(e)}catch(n){throw new Error("Failed to delete Metadata extension. GeoPackage: "+t.name+", Table: "+e)}},t.deleteMetadataExtension=function(t){var e=new g.MetadataExtension(t);e.has()&&e.removeExtension()},t.copyMetadata=function(t,e,n){try{t.isTable(_.MetadataReferenceDao.TABLE_NAME)&&u.CoreSQLUtils.transferTableContent(t.connection,_.MetadataReferenceDao.TABLE_NAME,_.MetadataReferenceDao.COLUMN_TABLE_NAME,n,e)}catch(t){r.warn("Failed to create Metadata for table: "+n+", copied from table: "+e,t)}},t.deleteCrsWktExtension=function(t){var e=new b.CrsWktExtension(t);e.has()&&e.removeExtension()},t}();e.GeoPackageExtensions=v},5626:function(t,e,n){"use strict";var r,i=this&&this.__extends||(r=function(t,e){return r=Object.setPrototypeOf||{__proto__:[]}instanceof Array&&function(t,e){t.__proto__=e}||function(t,e){for(var n in e)Object.prototype.hasOwnProperty.call(e,n)&&(t[n]=e[n])},r(t,e)},function(t,e){if("function"!=typeof e&&null!==e)throw new TypeError("Class extends value "+String(e)+" is not a constructor or null");function n(){this.constructor=t}r(t,e),t.prototype=null===e?Object.create(e):(n.prototype=e.prototype,new n)}),o=this&&this.__awaiter||function(t,e,n,r){return new(n||(n=Promise))((function(i,o){function a(t){try{u(r.next(t))}catch(t){o(t)}}function s(t){try{u(r.throw(t))}catch(t){o(t)}}function u(t){var e;t.done?i(t.value):(e=t.value,e instanceof n?e:new n((function(t){t(e)}))).then(a,s)}u((r=r.apply(t,e||[])).next())}))},a=this&&this.__generator||function(t,e){var n,r,i,o,a={label:0,sent:function(){if(1&i[0])throw i[1];return i[1]},trys:[],ops:[]};return o={next:s(0),throw:s(1),return:s(2)},"function"==typeof Symbol&&(o[Symbol.iterator]=function(){return this}),o;function s(o){return function(s){return function(o){if(n)throw new TypeError("Generator is already executing.");for(;a;)try{if(n=1,r&&(i=2&o[0]?r.return:o[0]?r.throw||((i=r.return)&&i.call(r),0):r.next)&&!(i=i.call(r,o[1])).done)return i;switch(r=0,i&&(o=[2&o[0],i.value]),o[0]){case 0:case 1:i=o;break;case 4:return a.label++,{value:o[1],done:!1};case 5:a.label++,r=o[1],o=[0];continue;case 7:o=a.ops.pop(),a.trys.pop();continue;default:if(!((i=(i=a.trys).length>0&&i[i.length-1])||6!==o[0]&&2!==o[0])){a=0;continue}if(3===o[0]&&(!i||o[1]>i[0]&&o[1]=r}return!1}catch(t){return!1}},e.prototype.getFeatureTableIndexExtension=function(){return this.getExtension(this.extensionName,this.tableName,this.columnName)[0]},e.prototype.getOrCreateExtension=function(){return this.getOrCreate(this.extensionName,this.tableName,this.columnName,this.extensionDefinition,l.Extension.READ_WRITE)},e.prototype.getOrCreateTableIndex=function(){return this.tableIndex||(this.tableIndexDao.createTable(),this.createTableIndex(),this.tableIndex)},e.prototype.createTableIndex=function(){var t=new c.TableIndex;return t.table_name=this.tableName,t.last_indexed=new Date,this.tableIndexDao.create(t)},Object.defineProperty(e.prototype,"tableIndex",{get:function(){return this.tableIndexDao.isTableExists()?this.tableIndexDao.queryForId(this.tableName):void 0},enumerable:!1,configurable:!0}),e.prototype.createOrClearGeometryIndicies=function(){return this.geometryIndexDao.createTable(),this.clearGeometryIndicies()},e.prototype.clearGeometryIndicies=function(){var t=this.geometryIndexDao.buildWhereWithFieldAndValue(h.GeometryIndexDao.COLUMN_TABLE_NAME,this.tableName),e=this.geometryIndexDao.buildWhereArgs(this.tableName);return this.geometryIndexDao.deleteWhere(t,e)},e.prototype.indexTable=function(t){return o(this,void 0,void 0,(function(){var e=this;return a(this,(function(n){return[2,new Promise((function(n,r){setTimeout((function(){e.indexChunk(0,t,n,r)}))})).then((function(){return 1===e.updateLastIndexed(t)}))]}))}))},e.prototype.indexChunk=function(t,e,n,r){var i=this,o=this.featureDao.queryForChunk(100,t);o.length?(this.progress("Indexing "+100*t+" to "+100*(t+1)),o.forEach((function(t){var n=i.featureDao.getRow(t);i.indexRow(e,n.id,n.geometry)})),setTimeout((function(){i.indexChunk(++t,e,n,r)}))):n()},e.prototype.indexRow=function(t,e,n){if(!n)return!1;var r=n.envelope;if(!r){var i=n.geometry;i&&(r=p.EnvelopeBuilder.buildEnvelopeWithGeometry(i))}if(r){var o=this.geometryIndexDao.populate(t,e,r);return 1===this.geometryIndexDao.createOrUpdate(o)}return!1},e.prototype.updateLastIndexed=function(t){return t||((t=new c.TableIndex).table_name=this.tableName),t.last_indexed=(new Date).toISOString(),this.tableIndexDao.createOrUpdate(t)},e.prototype.queryWithBoundingBox=function(t,e){var n=t.projectBoundingBox(e,this.featureDao.projection).buildEnvelope();return this.queryWithGeometryEnvelope(n)},e.prototype.queryWithGeometryEnvelope=function(t){return this.rtreeIndexed?this.rtreeIndexDao.queryWithGeometryEnvelope(t):this.geometryIndexDao.queryWithGeometryEnvelope(t)},e.prototype.countWithBoundingBox=function(t,e){var n=t.projectBoundingBox(e,this.featureDao.projection).buildEnvelope();return this.countWithGeometryEnvelope(n)},e.prototype.countWithGeometryEnvelope=function(t){return this.rtreeIndexed?this.rtreeIndexDao.countWithGeometryEnvelope(t):this.geometryIndexDao.countWithGeometryEnvelope(t)},e.EXTENSION_GEOMETRY_INDEX_AUTHOR="nga",e.EXTENSION_GEOMETRY_INDEX_NAME_NO_AUTHOR="geometry_index",e.EXTENSION_NAME=l.Extension.buildExtensionName(e.EXTENSION_GEOMETRY_INDEX_AUTHOR,e.EXTENSION_GEOMETRY_INDEX_NAME_NO_AUTHOR),e.EXTENSION_GEOMETRY_INDEX_DEFINITION="http://ngageoint.github.io/GeoPackage/docs/extensions/geometry-index.html",e}(u.BaseExtension);e.FeatureTableIndex=d},8021:(t,e)=>{"use strict";Object.defineProperty(e,"__esModule",{value:!0}),e.GeometryIndex=void 0;var n=function(){function t(){}return Object.defineProperty(t.prototype,"tableIndex",{set:function(t){this.table_name=t.table_name},enumerable:!1,configurable:!0}),t}();e.GeometryIndex=n},9095:function(t,e,n){"use strict";var r,i=this&&this.__extends||(r=function(t,e){return r=Object.setPrototypeOf||{__proto__:[]}instanceof Array&&function(t,e){t.__proto__=e}||function(t,e){for(var n in e)Object.prototype.hasOwnProperty.call(e,n)&&(t[n]=e[n])},r(t,e)},function(t,e){if("function"!=typeof e&&null!==e)throw new TypeError("Class extends value "+String(e)+" is not a constructor or null");function n(){this.constructor=t}r(t,e),t.prototype=null===e?Object.create(e):(n.prototype=e.prototype,new n)});Object.defineProperty(e,"__esModule",{value:!0}),e.GeometryIndexDao=void 0;var o=n(4115),a=n(8021),s=n(1459),u=function(t){function e(n,r){var i=t.call(this,n)||this;return i.gpkgTableName=e.TABLE_NAME,i.idColumns=["table_name","geom_id"],i.featureDao=r,i}return i(e,t),e.prototype.createObject=function(t){var e=new a.GeometryIndex;return t&&(e.table_name=t.table_name,e.geom_id=t.geom_id,e.min_x=t.min_x,e.max_x=t.max_x,e.min_y=t.min_y,e.max_y=t.max_y,e.min_z=t.min_z,e.max_z=t.max_z,e.min_m=t.min_m,e.max_m=t.max_m),e},e.prototype.getTableIndex=function(t){return this.geoPackage.tableIndexDao.queryForId(t.table_name)},e.prototype.queryForTableName=function(t){return this.queryForEach(e.COLUMN_TABLE_NAME,t)},e.prototype.countByTableName=function(t){return this.count(e.COLUMN_TABLE_NAME,t)},e.prototype.populate=function(t,e,n){var r=new a.GeometryIndex;return r.tableIndex=t,r.geom_id=e,r.min_x=n.minX,r.min_y=n.minY,r.max_x=n.maxX,r.max_y=n.maxY,n.hasZ&&(r.min_z=n.minZ,r.max_z=n.maxZ),n.hasM&&(r.min_m=n.minM,r.max_m=n.maxM),r},e.prototype.createTable=function(){return!!this.isTableExists()||new s.TableCreator(this.geoPackage).createGeometryIndex()},e.prototype._generateGeometryEnvelopeQuery=function(t){var n=this.featureDao.gpkgTableName,r="";r+=this.buildWhereWithFieldAndValue(e.COLUMN_TABLE_NAME,n),r+=" and ";var i=t.minX=")):(r+="(",r+=this.buildWhereWithFieldAndValue(e.COLUMN_MIN_X,t.maxX,"<="),r+=" or ",r+=this.buildWhereWithFieldAndValue(e.COLUMN_MAX_X,t.minX,">="),r+=" or ",r+=this.buildWhereWithFieldAndValue(e.COLUMN_MIN_X,t.minX,">="),r+=" or ",r+=this.buildWhereWithFieldAndValue(e.COLUMN_MAX_X,t.maxX,"<="),r+=")"),r+=" and ",r+=this.buildWhereWithFieldAndValue(e.COLUMN_MIN_Y,t.maxY,"<="),r+=" and ",r+=this.buildWhereWithFieldAndValue(e.COLUMN_MAX_Y,t.minY,">=");var o=[n,t.maxX,t.minX];return i||o.push(t.minX,t.maxX),o.push(t.maxY,t.minY),t.hasZ&&(r+=" and ",r+=this.buildWhereWithFieldAndValue(e.COLUMN_MIN_Z,t.minZ,"<="),r+=" and ",r+=this.buildWhereWithFieldAndValue(e.COLUMN_MAX_Z,t.maxZ,">="),o.push(t.maxZ,t.minZ)),t.hasM&&(r+=" and ",r+=this.buildWhereWithFieldAndValue(e.COLUMN_MIN_M,t.minM,"<="),r+=" and ",r+=this.buildWhereWithFieldAndValue(e.COLUMN_MAX_M,t.maxM,">="),o.push(t.maxM,t.minM)),{join:'inner join "'+n+'" on "'+n+'".'+this.featureDao.idColumns[0]+" = "+e.COLUMN_GEOM_ID,where:r,whereArgs:o,tableNameArr:['"'+n+'".*']}},e.prototype.queryWithGeometryEnvelope=function(t){var e=this._generateGeometryEnvelopeQuery(t);return this.queryJoinWhereWithArgs(e.join,e.where,e.whereArgs,e.tableNameArr)},e.prototype.countWithGeometryEnvelope=function(t){var e=this._generateGeometryEnvelopeQuery(t);return this.countJoinWhereWithArgs(e.join,e.where,e.whereArgs)},e.TABLE_NAME="nga_geometry_index",e.COLUMN_TABLE_NAME=e.TABLE_NAME+".table_name",e.COLUMN_TABLE_NAME_FIELD="table_name",e.COLUMN_GEOM_ID=e.TABLE_NAME+".geom_id",e.COLUMN_MIN_X=e.TABLE_NAME+".min_x",e.COLUMN_MAX_X=e.TABLE_NAME+".max_x",e.COLUMN_MIN_Y=e.TABLE_NAME+".min_y",e.COLUMN_MAX_Y=e.TABLE_NAME+".max_y",e.COLUMN_MIN_Z=e.TABLE_NAME+".min_z",e.COLUMN_MAX_Z=e.TABLE_NAME+".max_z",e.COLUMN_MIN_M=e.TABLE_NAME+".min_m",e.COLUMN_MAX_M=e.TABLE_NAME+".max_m",e}(o.Dao);e.GeometryIndexDao=u},7049:(t,e)=>{"use strict";Object.defineProperty(e,"__esModule",{value:!0}),e.TableIndex=void 0;e.TableIndex=function(){}},9581:function(t,e,n){"use strict";var r,i=this&&this.__extends||(r=function(t,e){return r=Object.setPrototypeOf||{__proto__:[]}instanceof Array&&function(t,e){t.__proto__=e}||function(t,e){for(var n in e)Object.prototype.hasOwnProperty.call(e,n)&&(t[n]=e[n])},r(t,e)},function(t,e){if("function"!=typeof e&&null!==e)throw new TypeError("Class extends value "+String(e)+" is not a constructor or null");function n(){this.constructor=t}r(t,e),t.prototype=null===e?Object.create(e):(n.prototype=e.prototype,new n)});Object.defineProperty(e,"__esModule",{value:!0}),e.TableIndexDao=void 0;var o=n(4115),a=n(1459),s=n(7049),u=function(t){function e(){var n=null!==t&&t.apply(this,arguments)||this;return n.gpkgTableName=e.TABLE_NAME,n.idColumns=[e.COLUMN_TABLE_NAME],n}return i(e,t),e.prototype.createObject=function(t){var e=new s.TableIndex;return t&&(e.table_name=t.table_name,e.last_indexed=t.last_indexed),e},e.prototype.createTable=function(){return new a.TableCreator(this.geoPackage).createTableIndex()},e.TABLE_NAME="nga_table_index",e.COLUMN_TABLE_NAME="table_name",e.COLUMN_LAST_INDEXED="last_indexed",e}(o.Dao);e.TableIndexDao=u},3501:function(t,e,n){"use strict";var r,i=this&&this.__extends||(r=function(t,e){return r=Object.setPrototypeOf||{__proto__:[]}instanceof Array&&function(t,e){t.__proto__=e}||function(t,e){for(var n in e)Object.prototype.hasOwnProperty.call(e,n)&&(t[n]=e[n])},r(t,e)},function(t,e){if("function"!=typeof e&&null!==e)throw new TypeError("Class extends value "+String(e)+" is not a constructor or null");function n(){this.constructor=t}r(t,e),t.prototype=null===e?Object.create(e):(n.prototype=e.prototype,new n)});Object.defineProperty(e,"__esModule",{value:!0}),e.MetadataExtension=void 0;var o=n(8140),a=n(624),s=n(2056),u=n(663),l=function(t){function e(n){var r=t.call(this,n)||this;return r.extensionName=e.EXTENSION_NAME,r.extensionDefinition=e.EXTENSION_Metadata_DEFINITION,r}return i(e,t),e.prototype.getOrCreateExtension=function(){return this.getOrCreate(this.extensionName,null,null,this.extensionDefinition,a.Extension.READ_WRITE)},e.prototype.has=function(){return this.hasExtension(e.EXTENSION_NAME,null,null)},e.prototype.removeExtension=function(){this.geoPackage.isTable(s.MetadataReferenceDao.TABLE_NAME)&&this.geoPackage.dropTable(s.MetadataReferenceDao.TABLE_NAME),this.geoPackage.isTable(u.MetadataDao.TABLE_NAME)&&this.geoPackage.dropTable(u.MetadataDao.TABLE_NAME);try{this.extensionsDao.isTableExists()&&this.extensionsDao.deleteByExtension(e.EXTENSION_NAME)}catch(t){throw new Error("Failed to delete Schema extension. GeoPackage: "+this.geoPackage.name)}},e.EXTENSION_NAME="gpkg_metadata",e.EXTENSION_Metadata_AUTHOR="gpkg",e.EXTENSION_Metadata_NAME_NO_AUTHOR="metadata",e.EXTENSION_Metadata_DEFINITION="http://www.geopackage.org/spec/#extension_metadata",e}(o.BaseExtension);e.MetadataExtension=l},6131:(t,e,n)=>{"use strict";var r=n(5108);Object.defineProperty(e,"__esModule",{value:!0}),e.NGAExtensions=void 0;var i=n(5626),o=n(9095),a=n(9581),s=n(5042),u=n(7960),l=n(7523),c=n(8479),h=n(1832),f=n(1314),p=n(362),d=n(8314),y=n(2431),m=n(233),g=n(8904),_=n(5045),b=n(7092),v=function(){function t(){}return t.deleteTableExtensions=function(e,n){t.deleteGeometryIndex(e,n),t.deleteTileScaling(e,n),t.deleteFeatureStyle(e,n),t.deleteContentsId(e,n)},t.deleteExtensions=function(e){t.deleteGeometryIndexExtension(e),t.deleteTileScalingExtension(e),t.deleteFeatureStyleExtension(e),t.deleteContentsIdExtension(e)},t.copyTableExtensions=function(e,n,i){try{t.copyContentsId(e,n,i),t.copyFeatureStyle(e,n,i),t.copyTileScaling(e,n,i),t.copyGeometryIndex(e,n,i)}catch(t){r.warn("Failed to copy extensions for table: "+i+", copied from table: "+n,t)}},t.deleteGeometryIndex=function(t,e){var n=t.getGeometryIndexDao(null),r=t.tableIndexDao,s=t.extensionDao;try{n.isTableExists()&&n.deleteWhere(n.buildWhereWithFieldAndValue(o.GeometryIndexDao.COLUMN_TABLE_NAME_FIELD,e),n.buildWhereArgs(e)),r.isTableExists()&&r.deleteWhere(r.buildWhereWithFieldAndValue(a.TableIndexDao.COLUMN_TABLE_NAME,e),r.buildWhereArgs(e)),s.isTableExists()&&s.deleteByExtensionAndTableName(i.FeatureTableIndex.EXTENSION_NAME,e)}catch(n){throw new Error("Failed to delete Table Index. GeoPackage: "+t.name+", Table: "+e)}},t.deleteGeometryIndexExtension=function(t){var e=t.getGeometryIndexDao(null),n=t.tableIndexDao,r=t.extensionDao;try{e.isTableExists()&&t.dropTable(o.GeometryIndexDao.TABLE_NAME),n.isTableExists()&&t.dropTable(a.TableIndexDao.TABLE_NAME),r.isTableExists()&&r.deleteByExtension(i.FeatureTableIndex.EXTENSION_NAME)}catch(e){throw new Error("Failed to delete Table Index extension and tables. GeoPackage: "+t.name)}},t.copyGeometryIndex=function(t,e,n){try{var a=t.extensionDao;if(a.isTableExists()){var u=a.queryByExtensionAndTableName(i.FeatureTableIndex.EXTENSION_NAME,e);if(u.length>0){var l=u[0];l.table_name=n,a.create(l);var c=t.tableIndexDao;if(c.isTableExists()){var h=c.queryForId(e);null!=h&&(h.table_name=n,c.create(h),t.isTable(o.GeometryIndexDao.TABLE_NAME)&&s.CoreSQLUtils.transferTableContent(t.connection,o.GeometryIndexDao.TABLE_NAME,o.GeometryIndexDao.COLUMN_TABLE_NAME_FIELD,n,e))}}}}catch(t){r.warn("Failed to create Geometry Index for table: "+n+", copied from table: "+e,t)}},t.deleteTileScaling=function(t,e){var n=t.tileScalingDao,r=t.extensionDao;try{n.isTableExists()&&n.deleteByTableName(e),r.isTableExists()&&r.deleteByExtensionAndTableName(l.TileScalingExtension.EXTENSION_NAME,e)}catch(n){throw new Error("Failed to delete Tile Scaling. GeoPackage: "+t.name+", Table: "+e)}},t.deleteTileScalingExtension=function(t){var e=t.tileScalingDao,n=t.extensionDao;try{e.isTableExists()&&t.dropTable(e.gpkgTableName),n.isTableExists()&&n.deleteByExtension(l.TileScalingExtension.EXTENSION_NAME)}catch(e){throw new Error("Failed to delete Tile Scaling extension and table. GeoPackage: "+t.name)}},t.copyTileScaling=function(t,e,n){try{var i=new l.TileScalingExtension(t,e);if(i.has()){var o=i.getOrCreateExtension();null!=o&&(o.setTableName(n),i.extensionsDao.create(o),t.isTable(u.TileScalingDao.TABLE_NAME)&&s.CoreSQLUtils.transferTableContent(t.connection,u.TileScalingDao.TABLE_NAME,u.TileScalingDao.COLUMN_TABLE_NAME,n,e))}}catch(t){r.warn("Failed to create Tile Scaling for table: "+n+", copied from table: "+e,t)}},t.deleteFeatureStyle=function(e,n){var r=t.getFeatureStyleExtension(e);r.has(n)&&r.deleteRelationships(n)},t.deleteFeatureStyleExtension=function(e){var n=t.getFeatureStyleExtension(e);n.has(null)&&n.removeExtension()},t.copyFeatureStyle=function(e,n,i){try{var o=t.getFeatureStyleExtension(e);if(o.hasRelationship(n)){var a=o.getOrCreateExtension(n);if(null!=a){a.setTableName(i),o.extensionsDao.create(a);var s=o.getContentsId(),u=s.getIdByTableName(n),l=s.getIdByTableName(i);null!=u&&null!=l&&(o.hasTableStyleRelationship(n)&&t.copyFeatureTableStyle(o,c.FeatureStyleExtension.TABLE_MAPPING_TABLE_STYLE,n,i,u,l),o.hasTableIconRelationship(n)&&t.copyFeatureTableStyle(o,c.FeatureStyleExtension.TABLE_MAPPING_TABLE_ICON,n,i,u,l))}}}catch(t){r.warn("Failed to create Feature Style for table: "+i+", copied from table: "+n,t)}},t.copyFeatureTableStyle=function(t,e,n,r,i,o){var a=t.geoPackage,u=t.getMappingTableName(e,n),l=a.extensionDao,c=l.queryByExtensionAndTableName(h.RelatedTablesExtension.EXTENSION_NAME,u).concat(l.queryByExtensionAndTableName(h.RelatedTablesExtension.EXTENSION_RELATED_TABLES_NAME_NO_AUTHOR,u));if(c.length>0){var f=t.getMappingTableName(e,r),v=new p.UserCustomTableReader(u).readTable(a.connection);d.AlterTable.copyTable(a.connection,v,f,!1);var T=new y.TableMapping(v.getTableName(),f,v.getUserColumns().getColumns()),E=T.getColumn(m.UserMappingTable.COLUMN_BASE_ID);E.constantValue=o,E.whereValue=i,s.CoreSQLUtils.transferTableContentForTableMapping(a.connection,T);var w=c[0];w.setTableName(f),l.create(w);var x=y.TableMapping.fromTableInfo(_.TableInfo.info(a.connection,g.ExtendedRelationDao.TABLE_NAME));x.removeColumn(g.ExtendedRelationDao.ID),x.getColumn(g.ExtendedRelationDao.BASE_TABLE_NAME).whereValue=b.ContentsIdDao.TABLE_NAME;var C=x.getColumn(g.ExtendedRelationDao.MAPPING_TABLE_NAME);C.constantValue=f,C.whereValue=u,s.CoreSQLUtils.transferTableContentForTableMapping(a.connection,x)}},t.getFeatureStyleExtension=function(t){return new c.FeatureStyleExtension(t)},t.deleteContentsId=function(t,e){var n=new f.ContentsIdExtension(t);n.has()&&n.deleteIdByTableName(e)},t.deleteContentsIdExtension=function(t){var e=new f.ContentsIdExtension(t);e.has()&&e.removeExtension()},t.copyContentsId=function(t,e,n){try{var i=new f.ContentsIdExtension(t);if(i.has())null!=i.getByTableName(e)&&i.createWithTableName(n)}catch(t){r.warn("Failed to create Contents Id for table: "+n+", copied from table: "+e,t)}},t}();e.NGAExtensions=v},3096:(t,e,n)=>{"use strict";Object.defineProperty(e,"__esModule",{value:!0}),e.DublinCoreMetadata=void 0;var r=n(2224),i=function(){function t(){}return t.hasColumn=function(t,e){var n,i=(n=t instanceof r.UserRow?t.table:t).hasColumn(e.name);if(!n.hasColumn(e.name)){var o=e.synonyms;if(o)for(var a=0;a{"use strict";Object.defineProperty(e,"__esModule",{value:!0}),e.DublinCoreType=void 0;var n=function(){function t(t,e){this.name=t,this.synonyms=e}return t.fromName=function(e){for(var n in t)if((r=t[n]).name===e)return r;for(var n in t){var r;if((r=t[n]).synonyms)for(var i=0;i{"use strict";Object.defineProperty(e,"__esModule",{value:!0}),e.ExtendedRelation=void 0;e.ExtendedRelation=function(){}},8904:function(t,e,n){"use strict";var r,i=this&&this.__extends||(r=function(t,e){return r=Object.setPrototypeOf||{__proto__:[]}instanceof Array&&function(t,e){t.__proto__=e}||function(t,e){for(var n in e)Object.prototype.hasOwnProperty.call(e,n)&&(t[n]=e[n])},r(t,e)},function(t,e){if("function"!=typeof e&&null!==e)throw new TypeError("Class extends value "+String(e)+" is not a constructor or null");function n(){this.constructor=t}r(t,e),t.prototype=null===e?Object.create(e):(n.prototype=e.prototype,new n)}),o=this&&this.__values||function(t){var e="function"==typeof Symbol&&Symbol.iterator,n=e&&t[e],r=0;if(n)return n.call(t);if(t&&"number"==typeof t.length)return{next:function(){return t&&r>=t.length&&(t=void 0),{value:t&&t[r++],done:!t}}};throw new TypeError(e?"Object is not iterable.":"Symbol.iterator is not defined.")};Object.defineProperty(e,"__esModule",{value:!0}),e.ExtendedRelationDao=void 0;var a=n(4115),s=n(8572),u=n(7817),l=function(t){function e(){var n=null!==t&&t.apply(this,arguments)||this;return n.gpkgTableName=e.TABLE_NAME,n.idColumns=["id"],n}return i(e,t),e.prototype.createObject=function(t){var e=new u.ExtendedRelation;return t&&(e.base_table_name=t.base_table_name,e.base_primary_column=t.base_primary_column,e.related_table_name=t.base_primary_column,e.related_table_name=t.related_table_name,e.relation_name=t.relation_name,e.mapping_table_name=t.mapping_table_name,e.related_primary_column=t.related_primary_column,e.id=t.id),e},e.prototype.createTable=function(){return this.geoPackage.getTableCreator().createExtendedRelations()},e.prototype.getBaseTables=function(){for(var t=[],e=this.queryForColumns("base_table_name"),n=0;n=t.length&&(t=void 0),{value:t&&t[r++],done:!t}}};throw new TypeError(e?"Object is not iterable.":"Symbol.iterator is not defined.")};Object.defineProperty(e,"__esModule",{value:!0}),e.RelatedTablesExtension=void 0;var s=n(8140),u=n(624),l=n(7502),c=n(6366),h=n(2702),f=n(4599),p=n(233),d=n(6302),y=n(1447),m=n(8904),g=n(8483),_=n(5897),b=n(8572),v=n(7817),T=n(7403),E=n(362),w=n(8008),x=n(2071),C=n(1394),M=function(t){function e(e){var n=t.call(this,e)||this;return n.extendedRelationDao=e.extendedRelationDao,n}return o(e,t),e.prototype.getOrCreateExtension=function(){var t=this.getOrCreate(e.EXTENSION_NAME,"gpkgext_relations",void 0,e.EXTENSION_RELATED_TABLES_DEFINITION,u.Extension.READ_WRITE);return this.extendedRelationDao.createTable(),t},e.prototype.getOrCreateMappingTable=function(t){return this.getOrCreateExtension(),this.getOrCreate(e.EXTENSION_NAME,t,void 0,e.EXTENSION_RELATED_TABLES_DEFINITION,u.Extension.READ_WRITE)},e.prototype.setContents=function(t){var e=this.geoPackage.contentsDao.queryForId(t.getTableName());return t.setContents(e)},e.prototype.getUserDao=function(t){return y.UserCustomDao.readTable(this.geoPackage,t)},e.prototype.getMappingDao=function(t){var e;return e=t instanceof v.ExtendedRelation?t.mapping_table_name:t,new d.UserMappingDao(this.getUserDao(e),this.geoPackage)},e.prototype.getRelationships=function(t){return this.extendedRelationDao.isTableExists()?t?this.geoPackage.extendedRelationDao.getBaseTableRelations(t):this.extendedRelationDao.queryForAll():[]},e.prototype.hasRelations=function(t,e,n){var r=[];return this.extendedRelationDao.isTableExists()&&(r=this.extendedRelationDao.getRelations(t,e,n)),!!r.length},e.prototype.getRelatedRows=function(t,e){for(var n=this.getRelationships(t),r=0;r{"use strict";Object.defineProperty(e,"__esModule",{value:!0}),e.RelationType=void 0;var r=n(9971),i=function(){function t(t,e){this.name=t,this.dataType=e}return t.fromName=function(e){return t[e.toUpperCase()]},t.FEATURES=new t("features",r.ContentsDataType.FEATURES),t.SIMPLE_ATTRIBUTES=new t("simple_attributes",r.ContentsDataType.ATTRIBUTES),t.MEDIA=new t("media",r.ContentsDataType.ATTRIBUTES),t.ATTRIBUTES=new t("attributes",r.ContentsDataType.ATTRIBUTES),t.TILES=new t("tiles",r.ContentsDataType.TILES),t}();e.RelationType=i},2702:function(t,e,n){"use strict";var r,i=this&&this.__extends||(r=function(t,e){return r=Object.setPrototypeOf||{__proto__:[]}instanceof Array&&function(t,e){t.__proto__=e}||function(t,e){for(var n in e)Object.prototype.hasOwnProperty.call(e,n)&&(t[n]=e[n])},r(t,e)},function(t,e){if("function"!=typeof e&&null!==e)throw new TypeError("Class extends value "+String(e)+" is not a constructor or null");function n(){this.constructor=t}r(t,e),t.prototype=null===e?Object.create(e):(n.prototype=e.prototype,new n)});Object.defineProperty(e,"__esModule",{value:!0}),e.SimpleAttributesDao=void 0;var o=n(4668),a=n(7374),s=function(t){function e(e,n){return t.call(this,e,n)||this}return i(e,t),e.prototype.newRow=function(t,e){return new a.SimpleAttributesRow(this.table,t,e)},Object.defineProperty(e.prototype,"table",{get:function(){return this._table},enumerable:!1,configurable:!0}),e.prototype.getRows=function(t){for(var e=[],n=0;n-1))throw n;this.geoPackage.connection.run('DROP TABLE IF EXISTS "rtree_'+t+"_"+e+'_node"'),this.geoPackage.connection.run('DROP TABLE IF EXISTS "rtree_'+t+"_"+e+'_parent"'),this.geoPackage.connection.run('DROP TABLE IF EXISTS "rtree_'+t+"_"+e+'_rowid"'),this.geoPackage.connection.run("PRAGMA writable_schema = ON"),this.geoPackage.connection.run('DELETE FROM sqlite_master WHERE type = "table" AND name = "rtree_'+t+"_"+e+'"'),this.geoPackage.connection.run("PRAGMA writable_schema = OFF")}},e.prototype.dropTriggersByFeatureTable=function(t){this.dropTriggers(t.getTableName(),t.getGeometryColumnName())},e.prototype.dropTriggers=function(t,e){var n=this.has(t,e);return n&&this.dropAllTriggers(t,e),n},e.prototype.dropAllTriggersByFeatureTable=function(t){this.dropAllTriggers(t.getTableName(),t.getGeometryColumnName())},e.prototype.dropAllTriggers=function(t,e){this.dropInsertTrigger(t,e),this.dropUpdate1Trigger(t,e),this.dropUpdate2Trigger(t,e),this.dropUpdate3Trigger(t,e),this.dropUpdate4Trigger(t,e),this.dropDeleteTrigger(t,e)},e.prototype.dropInsertTrigger=function(t,n){this.dropTrigger(t,n,e.TRIGGER_INSERT_NAME)},e.prototype.dropUpdate1Trigger=function(t,n){this.dropTrigger(t,n,e.TRIGGER_UPDATE1_NAME)},e.prototype.dropUpdate2Trigger=function(t,n){this.dropTrigger(t,n,e.TRIGGER_UPDATE2_NAME)},e.prototype.dropUpdate3Trigger=function(t,n){this.dropTrigger(t,n,e.TRIGGER_UPDATE3_NAME)},e.prototype.dropUpdate4Trigger=function(t,n){this.dropTrigger(t,n,e.TRIGGER_UPDATE4_NAME)},e.prototype.dropDeleteTrigger=function(t,n){this.dropTrigger(t,n,e.TRIGGER_DELETE_NAME)},e.prototype.dropTrigger=function(t,e,n){this.geoPackage.connection.run('DROP TRIGGER IF EXISTS "rtree_'+t+"_"+e+"_"+n+'"')},e.TRIGGER_INSERT_NAME="insert",e.TRIGGER_UPDATE1_NAME="update1",e.TRIGGER_UPDATE2_NAME="update2",e.TRIGGER_UPDATE3_NAME="update3",e.TRIGGER_UPDATE4_NAME="update4",e.TRIGGER_DELETE_NAME="delete",e}(a.BaseExtension);e.RTreeIndex=h},735:function(t,e,n){"use strict";var r,i=this&&this.__extends||(r=function(t,e){return r=Object.setPrototypeOf||{__proto__:[]}instanceof Array&&function(t,e){t.__proto__=e}||function(t,e){for(var n in e)Object.prototype.hasOwnProperty.call(e,n)&&(t[n]=e[n])},r(t,e)},function(t,e){if("function"!=typeof e&&null!==e)throw new TypeError("Class extends value "+String(e)+" is not a constructor or null");function n(){this.constructor=t}r(t,e),t.prototype=null===e?Object.create(e):(n.prototype=e.prototype,new n)});Object.defineProperty(e,"__esModule",{value:!0}),e.RTreeIndexDao=void 0;var o=n(4115),a=n(5859),s=n(8877),u=function(t){function e(n,r){var i=t.call(this,n)||this;return i.gpkgTableName=e.TABLE_NAME,i.featureDao=r,i}return i(e,t),e.prototype.createObject=function(t){return new a.RTreeIndex(this.geoPackage,this.featureDao)},e.prototype._generateGeometryEnvelopeQuery=function(t){var e=this.featureDao.gpkgTableName,n="",r=t.minX=")):(n+="(",n+=this.buildWhereWithFieldAndValue("minx",t.maxX,"<="),n+=" or ",n+=this.buildWhereWithFieldAndValue("maxx",t.minX,">="),n+=" or ",n+=this.buildWhereWithFieldAndValue("minx",t.minX,">="),n+=" or ",n+=this.buildWhereWithFieldAndValue("maxx",t.maxX,"<="),n+=")"),n+=" and ",n+=this.buildWhereWithFieldAndValue("miny",t.maxY,"<="),n+=" and ",n+=this.buildWhereWithFieldAndValue("maxy",t.minY,">=");var i=[];return i.push(t.maxX,t.minX),r||i.push(t.minX,t.maxX),i.push(t.maxY,t.minY),{join:'inner join "'+e+'" on "'+e+'".'+this.featureDao.idColumns[0]+' = "'+this.gpkgTableName+'".id',where:n,whereArgs:i,tableNameArr:['"'+e+'".*']}},e.prototype.queryWithGeometryEnvelope=function(t){var e=this._generateGeometryEnvelopeQuery(t);return this.queryJoinWhereWithArgs(e.join,e.where,e.whereArgs,e.tableNameArr)},e.prototype.countWithGeometryEnvelope=function(t){var e=this._generateGeometryEnvelopeQuery(t);return this.connection.get(s.SqliteQueryBuilder.buildCount("'"+this.gpkgTableName+"'",e.where),e.whereArgs).count},e.TABLE_NAME="rtree",e.PREFIX="rtree_",e.COLUMN_TABLE_NAME=e.TABLE_NAME+".table_name",e.COLUMN_GEOM_ID=e.TABLE_NAME+".geom_id",e.COLUMN_MIN_X=e.TABLE_NAME+".minx",e.COLUMN_MAX_X=e.TABLE_NAME+".maxx",e.COLUMN_MIN_Y=e.TABLE_NAME+".miny",e.COLUMN_MAX_Y=e.TABLE_NAME+".maxy",e.COLUMN_MIN_Z=e.TABLE_NAME+".minz",e.COLUMN_MAX_Z=e.TABLE_NAME+".maxz",e.COLUMN_MIN_M=e.TABLE_NAME+".minm",e.COLUMN_MAX_M=e.TABLE_NAME+".maxm",e.EXTENSION_NAME="gpkg_rtree_index",e.EXTENSION_RTREE_INDEX_AUTHOR="gpkg",e.EXTENSION_RTREE_INDEX_NAME_NO_AUTHOR="rtree_index",e.EXTENSION_RTREE_INDEX_DEFINITION="http://www.geopackage.org/spec/#extension_rtree",e}(o.Dao);e.RTreeIndexDao=u},7523:function(t,e,n){"use strict";var r,i=this&&this.__extends||(r=function(t,e){return r=Object.setPrototypeOf||{__proto__:[]}instanceof Array&&function(t,e){t.__proto__=e}||function(t,e){for(var n in e)Object.prototype.hasOwnProperty.call(e,n)&&(t[n]=e[n])},r(t,e)},function(t,e){if("function"!=typeof e&&null!==e)throw new TypeError("Class extends value "+String(e)+" is not a constructor or null");function n(){this.constructor=t}r(t,e),t.prototype=null===e?Object.create(e):(n.prototype=e.prototype,new n)});Object.defineProperty(e,"__esModule",{value:!0}),e.TileScalingExtension=void 0;var o=n(8140),a=n(624),s=n(7960),u=function(t){function e(e,n){var r=t.call(this,e)||this;return r.tableName=n,r.tileScalingDao=e.tileScalingDao,r}return i(e,t),e.prototype.getOrCreateExtension=function(){var t=this.getOrCreate(e.EXTENSION_NAME,this.tableName,null,e.EXTENSION_DEFINITION,a.Extension.READ_WRITE);return this.tileScalingDao.createTable(),t},e.prototype.createOrUpdate=function(t){return t.table_name=this.tableName,this.tileScalingDao.createOrUpdate(t)},Object.defineProperty(e.prototype,"dao",{get:function(){return this.tileScalingDao},enumerable:!1,configurable:!0}),e.prototype.has=function(){return this.hasExtension(e.EXTENSION_NAME,this.tableName,null)&&this.tileScalingDao.isTableExists()},e.prototype.removeExtension=function(){this.tileScalingDao.isTableExists()&&this.geoPackage.deleteTable(s.TileScalingDao.TABLE_NAME),this.extensionsDao.isTableExists()&&this.extensionsDao.deleteByExtension(e.EXTENSION_NAME)},e.EXTENSION_NAME="nga_tile_scaling",e.EXTENSION_AUTHOR="nga",e.EXTENSION_NAME_NO_AUTHOR="tile_scaling",e.EXTENSION_DEFINITION="http://ngageoint.github.io/GeoPackage/docs/extensions/tile-scaling.html",e}(o.BaseExtension);e.TileScalingExtension=u},4301:(t,e,n)=>{"use strict";Object.defineProperty(e,"__esModule",{value:!0}),e.TileScaling=void 0;var r=n(2777),i=function(){function t(){}return t.prototype.isZoomIn=function(){return(null==this.zoom_in||this.zoom_in>0)&&null!=this.scaling_type&&this.scaling_type!=r.TileScalingType.OUT},t.prototype.isZoomOut=function(){return(null==this.zoom_out||this.zoom_out>0)&&null!=this.scaling_type&&this.scaling_type!=r.TileScalingType.IN},t}();e.TileScaling=i},7960:function(t,e,n){"use strict";var r,i=this&&this.__extends||(r=function(t,e){return r=Object.setPrototypeOf||{__proto__:[]}instanceof Array&&function(t,e){t.__proto__=e}||function(t,e){for(var n in e)Object.prototype.hasOwnProperty.call(e,n)&&(t[n]=e[n])},r(t,e)},function(t,e){if("function"!=typeof e&&null!==e)throw new TypeError("Class extends value "+String(e)+" is not a constructor or null");function n(){this.constructor=t}r(t,e),t.prototype=null===e?Object.create(e):(n.prototype=e.prototype,new n)});Object.defineProperty(e,"__esModule",{value:!0}),e.TileScalingDao=void 0;var o=n(4115),a=n(4301),s=function(t){function e(){var n=null!==t&&t.apply(this,arguments)||this;return n.gpkgTableName=e.TABLE_NAME,n.idColumns=[e.COLUMN_TABLE_NAME],n}return i(e,t),e.prototype.createObject=function(t){var e=new a.TileScaling;return t&&(e.table_name=t.table_name,e.scaling_type=t.scaling_type,e.zoom_in=t.zoom_in,e.zoom_out=t.zoom_out),e},e.prototype.createTable=function(){return this.geoPackage.getTableCreator().createTileScaling()},e.prototype.queryForTableName=function(t){var n=this.queryForAll(this.buildWhereWithFieldAndValue(e.COLUMN_TABLE_NAME,t),this.buildWhereArgs(t));return n.length>0?this.createObject(n[0]):null},e.prototype.deleteByTableName=function(t){return this.deleteWhere(this.buildWhereWithFieldAndValue(e.COLUMN_TABLE_NAME,t),this.buildWhereArgs(t))},e.TABLE_NAME="nga_tile_scaling",e.COLUMN_TABLE_NAME="table_name",e.COLUMN_SCALING_TYPE="scaling_type",e.COLUMN_ZOOM_IN="zoom_in",e.COLUMN_ZOOM_OUT="zoom_out",e}(o.Dao);e.TileScalingDao=s},2777:(t,e)=>{"use strict";var n;Object.defineProperty(e,"__esModule",{value:!0}),e.TileScalingType=void 0,(n=e.TileScalingType||(e.TileScalingType={})).IN="in",n.OUT="out",n.IN_OUT="in_out",n.OUT_IN="out_in",n.CLOSEST_IN_OUT="closest_in_out",n.CLOSEST_OUT_IN="closest_out_in"},8116:function(t,e,n){"use strict";var r,i=this&&this.__extends||(r=function(t,e){return r=Object.setPrototypeOf||{__proto__:[]}instanceof Array&&function(t,e){t.__proto__=e}||function(t,e){for(var n in e)Object.prototype.hasOwnProperty.call(e,n)&&(t[n]=e[n])},r(t,e)},function(t,e){if("function"!=typeof e&&null!==e)throw new TypeError("Class extends value "+String(e)+" is not a constructor or null");function n(){this.constructor=t}r(t,e),t.prototype=null===e?Object.create(e):(n.prototype=e.prototype,new n)});Object.defineProperty(e,"__esModule",{value:!0}),e.SchemaExtension=void 0;var o=n(8140),a=n(624),s=n(4941),u=n(7175),l=function(t){function e(e){return t.call(this,e)||this}return i(e,t),e.prototype.getOrCreateExtension=function(){var t=[];return t.push(this.getOrCreate(e.EXTENSION_NAME,s.DataColumnsDao.TABLE_NAME,null,e.EXTENSION_SCHEMA_DEFINITION,a.Extension.READ_WRITE)),t.push(this.getOrCreate(e.EXTENSION_NAME,u.DataColumnConstraintsDao.TABLE_NAME,null,e.EXTENSION_SCHEMA_DEFINITION,a.Extension.READ_WRITE)),t},e.prototype.has=function(){return this.hasExtensions(e.EXTENSION_NAME)},e.prototype.removeExtension=function(){this.geoPackage.isTable(s.DataColumnsDao.TABLE_NAME)&&this.geoPackage.dropTable(s.DataColumnsDao.TABLE_NAME),this.geoPackage.isTable(u.DataColumnConstraintsDao.TABLE_NAME)&&this.geoPackage.dropTable(u.DataColumnConstraintsDao.TABLE_NAME),this.extensionsDao.isTableExists()&&this.extensionsDao.deleteByExtension(e.EXTENSION_NAME)},e.EXTENSION_SCHEMA_AUTHOR="gpkg",e.EXTENSION_SCHEMA_NAME_NO_AUTHOR="schema",e.EXTENSION_NAME=e.EXTENSION_SCHEMA_AUTHOR+"_"+e.EXTENSION_SCHEMA_NAME_NO_AUTHOR,e.EXTENSION_SCHEMA_DEFINITION="http://www.geopackage.org/spec/#extension_schema",e}(o.BaseExtension);e.SchemaExtension=l},612:(t,e)=>{"use strict";Object.defineProperty(e,"__esModule",{value:!0}),e.FeatureStyle=void 0;var n=function(){function t(t,e){this.styleRow=t,this.iconRow=e}return Object.defineProperty(t.prototype,"style",{get:function(){return this.styleRow},set:function(t){this.styleRow=t},enumerable:!1,configurable:!0}),t.prototype.hasStyle=function(){return!!this.styleRow},Object.defineProperty(t.prototype,"icon",{get:function(){return this.iconRow},set:function(t){this.iconRow=t},enumerable:!1,configurable:!0}),t.prototype.hasIcon=function(){return!!this.iconRow},t.prototype.useIcon=function(){return this.hasIcon()&&(!this.iconRow.isTableIcon()||!this.hasStyle()||this.styleRow.isTableStyle())},t}();e.FeatureStyle=n},2752:(t,e)=>{"use strict";Object.defineProperty(e,"__esModule",{value:!0}),e.FeatureStyles=void 0;e.FeatureStyles=function(t,e){void 0===t&&(t=null),void 0===e&&(e=null),this.styles=t,this.icons=e}},6536:(t,e,n)=>{"use strict";Object.defineProperty(e,"__esModule",{value:!0}),e.FeatureTableStyles=void 0;var r=n(2752),i=n(612),o=n(7924),a=n(4725),s=n(8412),u=n(9211),l=function(){function t(t,e){this.geoPackage=t,e instanceof s.FeatureTable?this.tableName=e.getTableName():this.tableName=e,this.featureStyleExtension=t.featureStyleExtension,this.cachedTableFeatureStyles=new r.FeatureStyles}return t.prototype.getFeatureStyleExtension=function(){return this.featureStyleExtension},t.prototype.getTableName=function(){return this.tableName},t.prototype.has=function(){return this.featureStyleExtension.has(this.tableName)},t.prototype.createRelationships=function(){return this.featureStyleExtension.createRelationships(this.tableName)},t.prototype.hasRelationship=function(){return this.featureStyleExtension.hasRelationship(this.tableName)},t.prototype.createStyleRelationship=function(){return this.featureStyleExtension.createStyleRelationship(this.tableName)},t.prototype.hasStyleRelationship=function(){return this.featureStyleExtension.hasStyleRelationship(this.tableName)},t.prototype.createTableStyleRelationship=function(){return this.featureStyleExtension.createTableStyleRelationship(this.tableName)},t.prototype.hasTableStyleRelationship=function(){return this.featureStyleExtension.hasTableStyleRelationship(this.tableName)},t.prototype.createIconRelationship=function(){return this.featureStyleExtension.createIconRelationship(this.tableName)},t.prototype.hasIconRelationship=function(){return this.featureStyleExtension.hasIconRelationship(this.tableName)},t.prototype.createTableIconRelationship=function(){return this.featureStyleExtension.createTableIconRelationship(this.tableName)},t.prototype.hasTableIconRelationship=function(){return this.featureStyleExtension.hasTableIconRelationship(this.tableName)},t.prototype.deleteRelationships=function(){return this.featureStyleExtension.deleteRelationships(this.tableName)},t.prototype.deleteStyleRelationship=function(){return this.featureStyleExtension.deleteStyleRelationship(this.tableName)},t.prototype.deleteTableStyleRelationship=function(){return this.featureStyleExtension.deleteTableStyleRelationship(this.tableName)},t.prototype.deleteIconRelationship=function(){return this.featureStyleExtension.deleteIconRelationship(this.tableName)},t.prototype.deleteTableIconRelationship=function(){return this.featureStyleExtension.deleteTableIconRelationship(this.tableName)},t.prototype.getStyleMappingDao=function(){return this.featureStyleExtension.getStyleMappingDao(this.tableName)},t.prototype.getTableStyleMappingDao=function(){return this.featureStyleExtension.getTableStyleMappingDao(this.tableName)},t.prototype.getIconMappingDao=function(){return this.featureStyleExtension.getIconMappingDao(this.tableName)},t.prototype.getTableIconMappingDao=function(){return this.featureStyleExtension.getTableIconMappingDao(this.tableName)},t.prototype.getStyleDao=function(){return this.featureStyleExtension.getStyleDao()},t.prototype.getIconDao=function(){return this.featureStyleExtension.getIconDao()},t.prototype.getTableFeatureStyles=function(){return this.featureStyleExtension.getTableFeatureStyles(this.tableName)},t.prototype.getTableStyles=function(){return this.featureStyleExtension.getTableStyles(this.tableName)},t.prototype.getCachedTableStyles=function(){var t=this.cachedTableFeatureStyles.styles;return null===t&&(null===(t=this.getTableStyles())&&(t=new o.Styles(!0)),this.cachedTableFeatureStyles.styles=t),t.isEmpty()&&(t=null),t},t.prototype.getTableStyle=function(t){return this.featureStyleExtension.getTableStyle(this.tableName,t)},t.prototype.getTableStyleDefault=function(){return this.featureStyleExtension.getTableStyleDefault(this.tableName)},t.prototype.getTableIcons=function(){return this.featureStyleExtension.getTableIcons(this.tableName)},t.prototype.getCachedTableIcons=function(){var t=this.cachedTableFeatureStyles.icons;return null===t&&(null===(t=this.getTableIcons())&&(t=new a.Icons(!0)),this.cachedTableFeatureStyles.icons=t),t.isEmpty()&&(t=null),t},t.prototype.getTableIcon=function(t){return this.featureStyleExtension.getTableIcon(this.tableName,t)},t.prototype.getTableIconDefault=function(){return this.featureStyleExtension.getTableIconDefault(this.tableName)},t.prototype.getFeatureStylesForFeatureRow=function(t){return this.featureStyleExtension.getFeatureStylesForFeatureRow(t)},t.prototype.getFeatureStyles=function(t){return this.featureStyleExtension.getFeatureStyles(this.tableName,t)},t.prototype.getFeatureStyleForFeatureRow=function(t){return this.getFeatureStyleForFeatureRowAndGeometryType(t,u.GeometryType.fromName(t.geometryType.toUpperCase()))},t.prototype.getFeatureStyleForFeatureRowAndGeometryType=function(t,e){return this.getFeatureStyle(t.id,e)},t.prototype.getFeatureStyleDefaultForFeatureRow=function(t){return this.getFeatureStyle(t.id,null)},t.prototype.getFeatureStyle=function(t,e){var n=null,r=this.getStyle(t,e),o=this.getIcon(t,e);return null==r&&null==o||(n=new i.FeatureStyle(r,o)),n},t.prototype.getFeatureStyleDefault=function(t){return this.getFeatureStyle(t,null)},t.prototype.getStylesForFeatureRow=function(t){return this.featureStyleExtension.getStylesForFeatureRow(t)},t.prototype.getStylesForFeatureId=function(t){return this.featureStyleExtension.getStylesForFeatureId(this.tableName,t)},t.prototype.getStyleForFeatureRow=function(t){return this.getStyleForFeatureRowAndGeometryType(t,u.GeometryType.fromName(t.geometryType.toUpperCase()))},t.prototype.getStyleForFeatureRowAndGeometryType=function(t,e){return this.getStyle(t.id,e)},t.prototype.getStyleDefaultForFeatureRow=function(t){return this.getStyle(t.id,null)},t.prototype.getStyle=function(t,e){var n=this.featureStyleExtension.getStyle(this.tableName,t,e,!1);if(null===n){var r=this.getCachedTableStyles();null!==r&&(n=r.getStyle(e))}return n},t.prototype.getStyleDefault=function(t){return this.getStyle(t,null)},t.prototype.getIconsForFeatureRow=function(t){return this.featureStyleExtension.getIconsForFeatureRow(t)},t.prototype.getIconsForFeatureId=function(t){return this.featureStyleExtension.getIconsForFeatureId(this.tableName,t)},t.prototype.getIconForFeatureRow=function(t){return this.getIconForFeatureRowAndGeometryType(t,u.GeometryType.fromName(t.geometryType.toUpperCase()))},t.prototype.getIconForFeatureRowAndGeometryType=function(t,e){return this.getIcon(t.id,e)},t.prototype.getIconDefaultForFeatureRow=function(t){return this.getIcon(t.id,null)},t.prototype.getIcon=function(t,e){var n=this.featureStyleExtension.getIcon(this.tableName,t,e,!1);if(null===n){var r=this.getCachedTableIcons();null!==r&&(n=r.getIcon(e))}return n},t.prototype.getIconDefault=function(t){return this.getIcon(t,null)},t.prototype.setTableFeatureStyles=function(t){var e=this.featureStyleExtension.setTableFeatureStyles(this.tableName,t);return this.clearCachedTableFeatureStyles(),e},t.prototype.setTableStyles=function(t){var e=this.featureStyleExtension.setTableStyles(this.tableName,t);return this.clearCachedTableStyles(),e},t.prototype.setTableStyleDefault=function(t){var e=this.featureStyleExtension.setTableStyleDefault(this.tableName,t);return this.clearCachedTableStyles(),e},t.prototype.setTableStyle=function(t,e){var n=this.featureStyleExtension.setTableStyle(this.tableName,t,e);return this.clearCachedTableStyles(),n},t.prototype.setTableIcons=function(t){var e=this.featureStyleExtension.setTableIcons(this.tableName,t);return this.clearCachedTableIcons(),e},t.prototype.setTableIconDefault=function(t){var e=this.featureStyleExtension.setTableIconDefault(this.tableName,t);return this.clearCachedTableIcons(),e},t.prototype.setTableIcon=function(t,e){var n=this.featureStyleExtension.setTableIcon(this.tableName,t,e);return this.clearCachedTableIcons(),n},t.prototype.setFeatureStylesForFeatureRow=function(t,e){return this.featureStyleExtension.setFeatureStylesForFeatureRow(t,e)},t.prototype.setFeatureStyles=function(t,e){return this.featureStyleExtension.setFeatureStyles(this.tableName,t,e)},t.prototype.setFeatureStyleForFeatureRow=function(t,e){return this.featureStyleExtension.setFeatureStyleForFeatureRow(t,e)},t.prototype.setFeatureStyleForFeatureRowAndGeometryType=function(t,e,n){return this.featureStyleExtension.setFeatureStyleForFeatureRowAndGeometryType(t,e,n)},t.prototype.setFeatureStyleDefaultForFeatureRow=function(t,e){return this.featureStyleExtension.setFeatureStyleDefaultForFeatureRow(t,e)},t.prototype.setFeatureStyle=function(t,e,n){return this.featureStyleExtension.setFeatureStyle(this.tableName,t,e,n)},t.prototype.setFeatureStyleDefault=function(t,e){return this.featureStyleExtension.setFeatureStyleDefault(this.tableName,t,e)},t.prototype.setStylesForFeatureRow=function(t,e){return this.featureStyleExtension.setStylesForFeatureRow(t,e)},t.prototype.setStyles=function(t,e){return this.featureStyleExtension.setStyles(this.tableName,t,e)},t.prototype.setStyleForFeatureRow=function(t,e){return this.featureStyleExtension.setStyleForFeatureRow(t,e)},t.prototype.setStyleForFeatureRowAndGeometryType=function(t,e,n){return this.featureStyleExtension.setStyleForFeatureRowAndGeometryType(t,e,n)},t.prototype.setStyleDefaultForFeatureRow=function(t,e){return this.featureStyleExtension.setStyleDefaultForFeatureRow(t,e)},t.prototype.setStyle=function(t,e,n){return this.featureStyleExtension.setStyle(this.tableName,t,e,n)},t.prototype.setStyleDefault=function(t,e){return this.featureStyleExtension.setStyleDefault(this.tableName,t,e)},t.prototype.setIconsForFeatureRow=function(t,e){return this.featureStyleExtension.setIconsForFeatureRow(t,e)},t.prototype.setIcons=function(t,e){return this.featureStyleExtension.setIcons(this.tableName,t,e)},t.prototype.setIconForFeatureRow=function(t,e){return this.featureStyleExtension.setIconForFeatureRow(t,e)},t.prototype.setIconForFeatureRowAndGeometryType=function(t,e,n){return this.featureStyleExtension.setIconForFeatureRowAndGeometryType(t,e,n)},t.prototype.setIconDefaultForFeatureRow=function(t,e){return this.featureStyleExtension.setIconDefaultForFeatureRow(t,e)},t.prototype.setIcon=function(t,e,n){return this.featureStyleExtension.setIcon(this.tableName,t,e,n)},t.prototype.setIconDefault=function(t,e){return this.featureStyleExtension.setIconDefault(this.tableName,t,e)},t.prototype.deleteAllFeatureStyles=function(){var t=this.featureStyleExtension.deleteAllFeatureStyles(this.tableName);return this.clearCachedTableFeatureStyles(),t},t.prototype.deleteAllStyles=function(){var t=this.featureStyleExtension.deleteAllStyles(this.tableName);return this.clearCachedTableStyles(),t},t.prototype.deleteAllIcons=function(){var t=this.featureStyleExtension.deleteAllIcons(this.tableName);return this.clearCachedTableIcons(),t},t.prototype.deleteTableFeatureStyles=function(){var t=this.featureStyleExtension.deleteTableFeatureStyles(this.tableName);return this.clearCachedTableFeatureStyles(),t},t.prototype.deleteTableStyles=function(){var t=this.featureStyleExtension.deleteTableStyles(this.tableName);return this.clearCachedTableStyles(),t},t.prototype.deleteTableStyleDefault=function(){var t=this.featureStyleExtension.deleteTableStyleDefault(this.tableName);return this.clearCachedTableStyles(),t},t.prototype.deleteTableStyle=function(t){var e=this.featureStyleExtension.deleteTableStyle(this.tableName,t);return this.clearCachedTableStyles(),e},t.prototype.deleteTableIcons=function(){var t=this.featureStyleExtension.deleteTableIcons(this.tableName);return this.clearCachedTableIcons(),t},t.prototype.deleteTableIconDefault=function(){var t=this.featureStyleExtension.deleteTableIconDefault(this.tableName);return this.clearCachedTableIcons(),t},t.prototype.deleteTableIcon=function(t){var e=this.featureStyleExtension.deleteTableIcon(this.tableName,t);return this.clearCachedTableIcons(),e},t.prototype.clearCachedTableFeatureStyles=function(){this.cachedTableFeatureStyles.styles=null,this.cachedTableFeatureStyles.icons=null},t.prototype.clearCachedTableStyles=function(){this.cachedTableFeatureStyles.styles=null},t.prototype.clearCachedTableIcons=function(){this.cachedTableFeatureStyles.icons=null},t.prototype.deleteFeatureStyles=function(){return this.featureStyleExtension.deleteFeatureStyles(this.tableName)},t.prototype.deleteStyles=function(){return this.featureStyleExtension.deleteStyles(this.tableName)},t.prototype.deleteStylesForFeatureRow=function(t){return this.featureStyleExtension.deleteStylesForFeatureRow(t)},t.prototype.deleteStylesForFeatureId=function(t){return this.featureStyleExtension.deleteStylesForFeatureId(this.tableName,t)},t.prototype.deleteStyleDefaultForFeatureRow=function(t){return this.featureStyleExtension.deleteStyleDefaultForFeatureRow(t)},t.prototype.deleteStyleDefault=function(t){return this.featureStyleExtension.deleteStyleDefault(this.tableName,t)},t.prototype.deleteStyleForFeatureRow=function(t){return this.featureStyleExtension.deleteStyleForFeatureRow(t)},t.prototype.deleteStyleForFeatureRowAndGeometryType=function(t,e){return this.featureStyleExtension.deleteStyleForFeatureRowAndGeometryType(t,e)},t.prototype.deleteStyle=function(t,e){return this.featureStyleExtension.deleteStyle(this.tableName,t,e)},t.prototype.deleteStyleAndMappingsByStyleRow=function(t){return this.featureStyleExtension.deleteStyleAndMappingsByStyleRow(this.tableName,t)},t.prototype.deleteStyleAndMappingsByStyleRowId=function(t){return this.featureStyleExtension.deleteStyleAndMappingsByStyleRowId(this.tableName,t)},t.prototype.deleteIcons=function(){return this.featureStyleExtension.deleteIcons(this.tableName)},t.prototype.deleteIconsForFeatureRow=function(t){return this.featureStyleExtension.deleteIconsForFeatureRow(t)},t.prototype.deleteIconsForFeatureId=function(t){return this.featureStyleExtension.deleteIconsForFeatureId(this.tableName,t)},t.prototype.deleteIconDefaultForFeatureRow=function(t){return this.featureStyleExtension.deleteIconDefaultForFeatureRow(t)},t.prototype.deleteIconDefault=function(t){return this.featureStyleExtension.deleteIconDefault(this.tableName,t)},t.prototype.deleteIconForFeatureRow=function(t){return this.featureStyleExtension.deleteIconForFeatureRow(t)},t.prototype.deleteIconForFeatureRowAndGeometryType=function(t,e){return this.featureStyleExtension.deleteIconForFeatureRowAndGeometryType(t,e)},t.prototype.deleteIcon=function(t,e){return this.featureStyleExtension.deleteIcon(this.tableName,t,e)},t.prototype.deleteIconAndMappingsByIconRow=function(t){return this.featureStyleExtension.deleteIconAndMappingsByIconRow(this.tableName,t)},t.prototype.deleteIconAndMappingsByIconRowId=function(t){return this.featureStyleExtension.deleteIconAndMappingsByIconRowId(this.tableName,t)},t.prototype.getAllTableStyleIds=function(){return this.featureStyleExtension.getAllTableStyleIds(this.tableName)},t.prototype.getAllTableIconIds=function(){return this.featureStyleExtension.getAllTableIconIds(this.tableName)},t.prototype.getAllStyleIds=function(){return this.featureStyleExtension.getAllStyleIds(this.tableName)},t.prototype.getAllIconIds=function(){return this.featureStyleExtension.getAllIconIds(this.tableName)},t}();e.FeatureTableStyles=l},8600:function(t,e,n){"use strict";var r=this&&this.__awaiter||function(t,e,n,r){return new(n||(n=Promise))((function(i,o){function a(t){try{u(r.next(t))}catch(t){o(t)}}function s(t){try{u(r.throw(t))}catch(t){o(t)}}function u(t){var e;t.done?i(t.value):(e=t.value,e instanceof n?e:new n((function(t){t(e)}))).then(a,s)}u((r=r.apply(t,e||[])).next())}))},i=this&&this.__generator||function(t,e){var n,r,i,o,a={label:0,sent:function(){if(1&i[0])throw i[1];return i[1]},trys:[],ops:[]};return o={next:s(0),throw:s(1),return:s(2)},"function"==typeof Symbol&&(o[Symbol.iterator]=function(){return this}),o;function s(o){return function(s){return function(o){if(n)throw new TypeError("Generator is already executing.");for(;a;)try{if(n=1,r&&(i=2&o[0]?r.return:o[0]?r.throw||((i=r.return)&&i.call(r),0):r.next)&&!(i=i.call(r,o[1])).done)return i;switch(r=0,i&&(o=[2&o[0],i.value]),o[0]){case 0:case 1:i=o;break;case 4:return a.label++,{value:o[1],done:!1};case 5:a.label++,r=o[1],o=[0];continue;case 7:o=a.ops.pop(),a.trys.pop();continue;default:if(!((i=(i=a.trys).length>0&&i[i.length-1])||6!==o[0]&&2!==o[0])){a=0;continue}if(3===o[0]&&(!i||o[1]>i[0]&&o[1]-1&&this.accessHistory.splice(n,1),this.accessHistory.push(t)}return e},t.prototype.putIconForIconRow=function(t,e){return this.put(t.id,e)},t.prototype.put=function(t,e){var n=this.iconCache[t];if(this.iconCache[t]=e,n){var r=this.accessHistory.indexOf(t);r>-1&&this.accessHistory.splice(r,1)}if(this.accessHistory.push(t),Object.keys(this.iconCache).length>this.cacheSize){var i=this.accessHistory.shift();if(i){var a=this.iconCache[i];a&&o.Canvas.disposeImage(a),delete this.iconCache[i]}}return n},t.prototype.removeIconForIconRow=function(t){return this.remove(t.id)},t.prototype.remove=function(t){var e=this.iconCache[t];if(delete this.iconCache[t],e){var n=this.accessHistory.indexOf(t);n>-1&&this.accessHistory.splice(n,1)}return e},t.prototype.clear=function(){var t=this;Object.keys(this.iconCache).forEach((function(e){var n=t.iconCache[e];o.Canvas.disposeImage(n)})),this.iconCache={},this.accessHistory=[]},t.prototype.resize=function(t){this.cacheSize=t;var e=Object.keys(this.iconCache);if(e.length>t)for(var n=e.length-t,r=0;r1))throw new Error("Anchor must be set inclusively between 0.0 and 1.0, invalid value: "+t);return!0},e.prototype.isTableIcon=function(){return this.tableIcon},e.prototype.setTableIcon=function(t){this.tableIcon=t},e}(o.MediaRow);e.IconRow=s},2015:function(t,e,n){"use strict";var r,i=this&&this.__extends||(r=function(t,e){return r=Object.setPrototypeOf||{__proto__:[]}instanceof Array&&function(t,e){t.__proto__=e}||function(t,e){for(var n in e)Object.prototype.hasOwnProperty.call(e,n)&&(t[n]=e[n])},r(t,e)},function(t,e){if("function"!=typeof e&&null!==e)throw new TypeError("Class extends value "+String(e)+" is not a constructor or null");function n(){this.constructor=t}r(t,e),t.prototype=null===e?Object.create(e):(n.prototype=e.prototype,new n)});Object.defineProperty(e,"__esModule",{value:!0}),e.IconTable=void 0;var o=n(6366),a=n(7319),s=n(5865),u=function(t){function e(){var e=null!==t&&t.apply(this,arguments)||this;return e.TABLE_TYPE="media",e}return i(e,t),e.prototype.getNameColumnIndex=function(){return this.getColumnIndex(e.COLUMN_NAME)},e.prototype.getNameColumn=function(){return this.getColumnWithColumnName(e.COLUMN_NAME)},e.prototype.getDescriptionColumnIndex=function(){return this.getColumnIndex(e.COLUMN_DESCRIPTION)},e.prototype.getDescriptionColumn=function(){return this.getColumnWithColumnName(e.COLUMN_DESCRIPTION)},e.prototype.getWidthColumnIndex=function(){return this.getColumnIndex(e.COLUMN_WIDTH)},e.prototype.getWidthColumn=function(){return this.getColumnWithColumnName(e.COLUMN_WIDTH)},e.prototype.getHeightColumnIndex=function(){return this.getColumnIndex(e.COLUMN_HEIGHT)},e.prototype.getHeightColumn=function(){return this.getColumnWithColumnName(e.COLUMN_HEIGHT)},e.prototype.getAnchorUColumnIndex=function(){return this.getColumnIndex(e.COLUMN_ANCHOR_U)},e.prototype.getAnchorUColumn=function(){return this.getColumnWithColumnName(e.COLUMN_ANCHOR_U)},e.prototype.getAnchorVColumnIndex=function(){return this.getColumnIndex(e.COLUMN_ANCHOR_V)},e.prototype.getAnchorVColumn=function(){return this.getColumnWithColumnName(e.COLUMN_ANCHOR_V)},e.create=function(){return new e(e.TABLE_NAME,e.createColumns(),e.requiredColumns())},e.createRequiredColumns=function(){return o.MediaTable.createRequiredColumns()},e.requiredColumns=function(){return o.MediaTable.requiredColumns()},e.createColumns=function(){var t=e.createRequiredColumns(),n=t.length;return t.push(s.UserColumn.createColumn(n++,e.COLUMN_NAME,a.GeoPackageDataType.TEXT,!1)),t.push(s.UserColumn.createColumn(n++,e.COLUMN_DESCRIPTION,a.GeoPackageDataType.TEXT,!1)),t.push(s.UserColumn.createColumn(n++,e.COLUMN_WIDTH,a.GeoPackageDataType.REAL,!1)),t.push(s.UserColumn.createColumn(n++,e.COLUMN_HEIGHT,a.GeoPackageDataType.REAL,!1)),t.push(s.UserColumn.createColumn(n++,e.COLUMN_ANCHOR_U,a.GeoPackageDataType.REAL,!1)),t.push(s.UserColumn.createColumn(n,e.COLUMN_ANCHOR_V,a.GeoPackageDataType.REAL,!1)),t},e.TABLE_NAME="nga_icon",e.COLUMN_NAME="name",e.COLUMN_DESCRIPTION="description",e.COLUMN_WIDTH="width",e.COLUMN_HEIGHT="height",e.COLUMN_ANCHOR_U="anchor_u",e.COLUMN_ANCHOR_V="anchor_v",e}(o.MediaTable);e.IconTable=u},4725:(t,e)=>{"use strict";Object.defineProperty(e,"__esModule",{value:!0}),e.Icons=void 0;var n=function(){function t(t){void 0===t&&(t=!1),this.defaultIcon=null,this.icons=new Map,this.tableIcons=t}return t.prototype.setDefault=function(t){null!=t&&t.setTableIcon(this.tableIcons),this.defaultIcon=t},t.prototype.getDefault=function(){return this.defaultIcon},t.prototype.setIcon=function(t,e){void 0===e&&(e=null),null!==e?null!=t?(t.setTableIcon(this.tableIcons),this.icons.set(e,t)):this.icons.delete(e):this.setDefault(t)},t.prototype.getIcon=function(t){void 0===t&&(t=null);var e=null;return null!==t&&this.icons.has(t)&&(e=this.icons.get(t)),null!=e&&null!==t||(e=this.getDefault()),e},t.prototype.isEmpty=function(){return 0===this.icons.size&&null===this.defaultIcon},t.prototype.getGeometryTypes=function(){return Array.from(this.icons.keys())},t}();e.Icons=n},8479:function(t,e,n){"use strict";var r,i=this&&this.__extends||(r=function(t,e){return r=Object.setPrototypeOf||{__proto__:[]}instanceof Array&&function(t,e){t.__proto__=e}||function(t,e){for(var n in e)Object.prototype.hasOwnProperty.call(e,n)&&(t[n]=e[n])},r(t,e)},function(t,e){if("function"!=typeof e&&null!==e)throw new TypeError("Class extends value "+String(e)+" is not a constructor or null");function n(){this.constructor=t}r(t,e),t.prototype=null===e?Object.create(e):(n.prototype=e.prototype,new n)});Object.defineProperty(e,"__esModule",{value:!0}),e.FeatureStyleExtension=void 0;var o=n(8140),a=n(624),s=n(7092),u=n(2015),l=n(9529),c=n(3934),h=n(3237),f=n(8138),p=n(3410),d=n(1553),y=n(8412),m=n(2752),g=n(612),_=n(7924),b=n(4725),v=n(362),T=n(9211),E=function(t){function e(e){var n=t.call(this,e)||this;return n.relatedTablesExtension=e.relatedTablesExtension,n.contentsIdExtension=e.contentsIdExtension,n}return i(e,t),e.prototype.getOrCreateExtension=function(t){return this.getOrCreate(e.EXTENSION_NAME,this.getFeatureTableName(t),null,e.EXTENSION_DEFINITION,a.Extension.READ_WRITE)},e.prototype.has=function(t){return this.hasExtension(e.EXTENSION_NAME,this.getFeatureTableName(t),null)},e.prototype.getTables=function(){var t=[];if(this.extensionsDao.isTableExists())for(var n=this.extensionsDao.queryAllByExtension(e.EXTENSION_NAME),r=0;r1))throw new Error("Opacity must be set inclusively between 0.0 and 1.0, invalid value: "+t);return!0},e.prototype.createColor=function(t,e){var n="#000000";if(null!==t&&(n=t),null!==e){var r=Math.round(255*e).toString(16);1===r.length&&(r="0"+r),n+=r}return n.toUpperCase()},e.prototype._hasColor=function(t,e){return null!==t||null!==e},e.prototype.isTableStyle=function(){return this.tableStyle},e.prototype.setTableStyle=function(t){this.tableStyle=t},e.colorPattern=/^#([0-9a-fA-F]{3}){1,2}$/,e}(n(6861).AttributesRow);e.StyleRow=o},3934:function(t,e,n){"use strict";var r,i=this&&this.__extends||(r=function(t,e){return r=Object.setPrototypeOf||{__proto__:[]}instanceof Array&&function(t,e){t.__proto__=e}||function(t,e){for(var n in e)Object.prototype.hasOwnProperty.call(e,n)&&(t[n]=e[n])},r(t,e)},function(t,e){if("function"!=typeof e&&null!==e)throw new TypeError("Class extends value "+String(e)+" is not a constructor or null");function n(){this.constructor=t}r(t,e),t.prototype=null===e?Object.create(e):(n.prototype=e.prototype,new n)});Object.defineProperty(e,"__esModule",{value:!0}),e.StyleTable=void 0;var o=n(3931),a=n(8483),s=n(5865),u=n(7319),l=function(t){function e(){var e=null!==t&&t.apply(this,arguments)||this;return e.TABLE_TYPE="media",e.data_type=a.RelationType.ATTRIBUTES.dataType,e.relation_name=a.RelationType.ATTRIBUTES.name,e}return i(e,t),e.prototype.getNameColumnIndex=function(){return this.getColumnIndex(e.COLUMN_NAME)},e.prototype.getNameColumn=function(){return this.getColumnWithColumnName(e.COLUMN_NAME)},e.prototype.getDescriptionColumnIndex=function(){return this.getColumnIndex(e.COLUMN_DESCRIPTION)},e.prototype.getDescriptionColumn=function(){return this.getColumnWithColumnName(e.COLUMN_DESCRIPTION)},e.prototype.getColorColumnIndex=function(){return this.getColumnIndex(e.COLUMN_COLOR)},e.prototype.getColorColumn=function(){return this.getColumnWithColumnName(e.COLUMN_COLOR)},e.prototype.getOpacityColumnIndex=function(){return this.getColumnIndex(e.COLUMN_OPACITY)},e.prototype.getOpacityColumn=function(){return this.getColumnWithColumnName(e.COLUMN_OPACITY)},e.prototype.getWidthColumnIndex=function(){return this.getColumnIndex(e.COLUMN_WIDTH)},e.prototype.getWidthColumn=function(){return this.getColumnWithColumnName(e.COLUMN_WIDTH)},e.prototype.getFillColorColumnIndex=function(){return this.getColumnIndex(e.COLUMN_FILL_COLOR)},e.prototype.getFillColorColumn=function(){return this.getColumnWithColumnName(e.COLUMN_FILL_COLOR)},e.prototype.getFillOpacityColumnIndex=function(){return this.getColumnIndex(e.COLUMN_FILL_OPACITY)},e.prototype.getFillOpacityColumn=function(){return this.getColumnWithColumnName(e.COLUMN_FILL_OPACITY)},e.create=function(){return new e(e.TABLE_NAME,e.createColumns())},e.createColumns=function(){var t=[],n=0;return t.push(s.UserColumn.createPrimaryKeyColumn(n++,e.COLUMN_ID)),t.push(s.UserColumn.createColumn(n++,e.COLUMN_NAME,u.GeoPackageDataType.TEXT,!1)),t.push(s.UserColumn.createColumn(n++,e.COLUMN_DESCRIPTION,u.GeoPackageDataType.TEXT,!1)),t.push(s.UserColumn.createColumn(n++,e.COLUMN_COLOR,u.GeoPackageDataType.TEXT,!1)),t.push(s.UserColumn.createColumn(n++,e.COLUMN_OPACITY,u.GeoPackageDataType.REAL,!1)),t.push(s.UserColumn.createColumn(n++,e.COLUMN_WIDTH,u.GeoPackageDataType.REAL,!1)),t.push(s.UserColumn.createColumn(n++,e.COLUMN_FILL_COLOR,u.GeoPackageDataType.TEXT,!1)),t.push(s.UserColumn.createColumn(7,e.COLUMN_FILL_OPACITY,u.GeoPackageDataType.REAL,!1)),t},e.TABLE_NAME="nga_style",e.COLUMN_ID="id",e.COLUMN_NAME="name",e.COLUMN_DESCRIPTION="description",e.COLUMN_COLOR="color",e.COLUMN_OPACITY="opacity",e.COLUMN_WIDTH="width",e.COLUMN_FILL_COLOR="fill_color",e.COLUMN_FILL_OPACITY="fill_opacity",e}(o.AttributesTable);e.StyleTable=l},1553:function(t,e,n){"use strict";var r,i=this&&this.__extends||(r=function(t,e){return r=Object.setPrototypeOf||{__proto__:[]}instanceof Array&&function(t,e){t.__proto__=e}||function(t,e){for(var n in e)Object.prototype.hasOwnProperty.call(e,n)&&(t[n]=e[n])},r(t,e)},function(t,e){if("function"!=typeof e&&null!==e)throw new TypeError("Class extends value "+String(e)+" is not a constructor or null");function n(){this.constructor=t}r(t,e),t.prototype=null===e?Object.create(e):(n.prototype=e.prototype,new n)});Object.defineProperty(e,"__esModule",{value:!0}),e.StyleTableReader=void 0;var o=n(464),a=n(3934),s=function(t){function e(){return null!==t&&t.apply(this,arguments)||this}return i(e,t),e.prototype.createTable=function(t,e){return new a.StyleTable(t,e)},e}(o.AttributesTableReader);e.StyleTableReader=s},7924:(t,e)=>{"use strict";Object.defineProperty(e,"__esModule",{value:!0}),e.Styles=void 0;var n=function(){function t(t){void 0===t&&(t=!1),this.defaultStyle=null,this.styles=new Map,this.tableStyles=t}return t.prototype.setDefault=function(t){null!=t&&t.setTableStyle(this.tableStyles),this.defaultStyle=t},t.prototype.getDefault=function(){return this.defaultStyle},t.prototype.setStyle=function(t,e){void 0===e&&(e=null),null!==e?null!=t?(t.setTableStyle(this.tableStyles),this.styles.set(e,t)):this.styles.delete(e):this.setDefault(t)},t.prototype.getStyle=function(t){void 0===t&&(t=null);var e=null;return null!==t&&(e=this.styles.get(t)),null!=e&&null!==t||(e=this.getDefault()),e},t.prototype.isEmpty=function(){return 0===this.styles.size&&null===this.defaultStyle},t.prototype.getGeometryTypes=function(){return Array.from(this.styles.keys())},t}();e.Styles=n},7719:function(t,e,n){"use strict";var r,i=this&&this.__extends||(r=function(t,e){return r=Object.setPrototypeOf||{__proto__:[]}instanceof Array&&function(t,e){t.__proto__=e}||function(t,e){for(var n in e)Object.prototype.hasOwnProperty.call(e,n)&&(t[n]=e[n])},r(t,e)},function(t,e){if("function"!=typeof e&&null!==e)throw new TypeError("Class extends value "+String(e)+" is not a constructor or null");function n(){this.constructor=t}r(t,e),t.prototype=null===e?Object.create(e):(n.prototype=e.prototype,new n)});Object.defineProperty(e,"__esModule",{value:!0}),e.WebPExtension=void 0;var o=n(8140),a=n(624),s=function(t){function e(e,n){var r=t.call(this,e)||this;return r.tableName=n,r}return i(e,t),e.prototype.getOrCreateExtension=function(){return this.getOrCreate(e.EXTENSION_NAME,this.tableName,"tile_data",e.EXTENSION_WEBP_DEFINITION,a.Extension.READ_WRITE)},e.EXTENSION_NAME="gpkg_webp",e.EXTENSION_WEBP_AUTHOR="gpkg",e.EXTENSION_WEBP_NAME_NO_AUTHOR="webp",e.EXTENSION_WEBP_DEFINITION="http://www.geopackage.org/spec/#extension_webp",e}(o.BaseExtension);e.WebPExtension=s},812:(t,e,n)=>{"use strict";Object.defineProperty(e,"__esModule",{value:!0}),e.GeometryColumns=void 0;var r=n(9971),i=function(){function t(){}return Object.defineProperty(t.prototype,"geometryType",{get:function(){return this.geometry_type_name},enumerable:!1,configurable:!0}),Object.defineProperty(t.prototype,"id",{get:function(){return"".concat(this.table_name," ").concat(this.column_name)},enumerable:!1,configurable:!0}),t.prototype.setContents=function(t){if(null!=t){var e=t.data_type;if(null==e||e!==r.ContentsDataType.FEATURES)throw new Error("The Contents of a GeometryColumns must have a data type of "+r.ContentsDataType.nameFromType(r.ContentsDataType.FEATURES));this.table_name=t.table_name}else this.table_name=null},t.TABLE_NAME="tableName",t.COLUMN_NAME="columnName",t.GEOMETRY_TYPE_NAME="geometryTypeName",t.SRS_ID="srsId",t.Z="z",t.M="m",t}();e.GeometryColumns=i},1968:function(t,e,n){"use strict";var r,i=this&&this.__extends||(r=function(t,e){return r=Object.setPrototypeOf||{__proto__:[]}instanceof Array&&function(t,e){t.__proto__=e}||function(t,e){for(var n in e)Object.prototype.hasOwnProperty.call(e,n)&&(t[n]=e[n])},r(t,e)},function(t,e){if("function"!=typeof e&&null!==e)throw new TypeError("Class extends value "+String(e)+" is not a constructor or null");function n(){this.constructor=t}r(t,e),t.prototype=null===e?Object.create(e):(n.prototype=e.prototype,new n)}),o=this&&this.__values||function(t){var e="function"==typeof Symbol&&Symbol.iterator,n=e&&t[e],r=0;if(n)return n.call(t);if(t&&"number"==typeof t.length)return{next:function(){return t&&r>=t.length&&(t=void 0),{value:t&&t[r++],done:!t}}};throw new TypeError(e?"Object is not iterable.":"Symbol.iterator is not defined.")};Object.defineProperty(e,"__esModule",{value:!0}),e.GeometryColumnsDao=void 0;var a=n(4115),s=n(812),u=function(t){function e(){var n=null!==t&&t.apply(this,arguments)||this;return n.gpkgTableName="gpkg_geometry_columns",n.idColumns=[e.COLUMN_ID_1,e.COLUMN_ID_2],n.columns=[e.COLUMN_TABLE_NAME,e.COLUMN_COLUMN_NAME,e.COLUMN_GEOMETRY_TYPE_NAME,e.COLUMN_SRS_ID,e.COLUMN_Z,e.COLUMN_M],n}return i(e,t),e.prototype.createObject=function(t){var e=new s.GeometryColumns;return t&&(e.table_name=t.table_name,e.column_name=t.column_name,e.geometry_type_name=t.geometry_type_name,e.srs_id=t.srs_id,e.z=t.z,e.m=t.m),e},e.prototype.queryForTableName=function(t){var n=this.queryForAllEq(e.COLUMN_TABLE_NAME,t);if(n&&n.length)return this.createObject(n[0])},e.prototype.getFeatureTables=function(){var t,n,r=[];try{for(var i=o(this.connection.each("select "+e.COLUMN_TABLE_NAME+" from "+this.gpkgTableName)),a=i.next();!a.done;a=i.next()){var s=a.value;r.push(s[e.COLUMN_TABLE_NAME])}}catch(e){t={error:e}}finally{try{a&&!a.done&&(n=i.return)&&n.call(i)}finally{if(t)throw t.error}}return r},e.prototype.getSrs=function(t){return this.geoPackage.spatialReferenceSystemDao.queryForId(t.srs_id)},e.prototype.getContents=function(t){return this.geoPackage.contentsDao.queryForId(t.table_name)},e.prototype.getProjection=function(t){var e=this.getSrs(t);return this.geoPackage.spatialReferenceSystemDao.getProjection(e)},e.COLUMN_TABLE_NAME="table_name",e.COLUMN_COLUMN_NAME="column_name",e.COLUMN_ID_1=e.COLUMN_TABLE_NAME,e.COLUMN_ID_2=e.COLUMN_COLUMN_NAME,e.COLUMN_GEOMETRY_TYPE_NAME="geometry_type_name",e.COLUMN_SRS_ID="srs_id",e.COLUMN_Z="z",e.COLUMN_M="m",e}(a.Dao);e.GeometryColumnsDao=u},961:function(t,e,n){"use strict";var r,i=this&&this.__extends||(r=function(t,e){return r=Object.setPrototypeOf||{__proto__:[]}instanceof Array&&function(t,e){t.__proto__=e}||function(t,e){for(var n in e)Object.prototype.hasOwnProperty.call(e,n)&&(t[n]=e[n])},r(t,e)},function(t,e){if("function"!=typeof e&&null!==e)throw new TypeError("Class extends value "+String(e)+" is not a constructor or null");function n(){this.constructor=t}r(t,e),t.prototype=null===e?Object.create(e):(n.prototype=e.prototype,new n)});Object.defineProperty(e,"__esModule",{value:!0}),e.FeatureColumn=void 0;var o=n(5865),a=n(7319),s=n(9211),u=n(5071),l=function(t){function e(e,n,r,i,o,a,s,u,l){var c=t.call(this,e,n,r,i,o,a,s,l)||this;return c.geometryType=u,c.type=c.getTypeName(n,r,u),c}return i(e,t),e.createPrimaryKeyColumn=function(t,n,r){return void 0===r&&(r=u.UserTableDefaults.DEFAULT_AUTOINCREMENT),new e(t,n,a.GeoPackageDataType.INTEGER,void 0,!0,void 0,!0,void 0,r)},e.createGeometryColumn=function(t,n,r,i,o){if(null==r)throw new Error("Geometry Type is required to create column: "+n);return new e(t,n,a.GeoPackageDataType.BLOB,void 0,i,o,!1,r,!1)},e.createColumn=function(t,n,r,i,o,a,s){return void 0===i&&(i=!1),new e(t,n,r,a,i,o,!1,void 0,s)},e.prototype.getTypeName=function(e,n,r){return null!=r?s.GeometryType.nameFromType(r):t.prototype.getTypeName.call(this,e,n)},e.getGeometryTypeFromTableColumn=function(t){var e=null;return t.isDataType(a.GeoPackageDataType.BLOB)&&(e=s.GeometryType.fromName(t.type)),e},e.prototype.copy=function(){return new e(this.index,this.name,this.dataType,this.max,this.notNull,this.defaultValue,this.primaryKey,this.geometryType,this.autoincrement)},e.prototype.isGeometry=function(){return null!==this.geometryType},e.prototype.getGeometryType=function(){return this.geometryType},e}(o.UserColumn);e.FeatureColumn=l},5053:function(t,e,n){"use strict";var r,i=this&&this.__extends||(r=function(t,e){return r=Object.setPrototypeOf||{__proto__:[]}instanceof Array&&function(t,e){t.__proto__=e}||function(t,e){for(var n in e)Object.prototype.hasOwnProperty.call(e,n)&&(t[n]=e[n])},r(t,e)},function(t,e){if("function"!=typeof e&&null!==e)throw new TypeError("Class extends value "+String(e)+" is not a constructor or null");function n(){this.constructor=t}r(t,e),t.prototype=null===e?Object.create(e):(n.prototype=e.prototype,new n)});Object.defineProperty(e,"__esModule",{value:!0}),e.FeatureColumns=void 0;var o=n(2114),a=n(7319),s=function(t){function e(e,n,r,i){var o=t.call(this,e,r,i)||this;return o.geometryIndex=-1,o.geometryColumn=n,o.updateColumns(),o}return i(e,t),e.prototype.copy=function(){return new e(this.getTableName(),this.getGeometryColumnName(),this.getColumns(),this.isCustom())},e.prototype.updateColumns=function(){t.prototype.updateColumns.call(this);var e=null;if(null!==this.geometryColumn&&void 0!==this.geometryColumn)e=this.getColumnIndex(this.geometryColumn,!1);else for(var n=0;n=0},e.prototype.getGeometryColumn=function(){var t=null;return this.hasGeometryColumn()&&(t=this.getColumnForIndex(this.geometryIndex)),t},e}(o.UserColumns);e.FeatureColumns=s},2071:function(t,e,n){"use strict";var r,i=n(5108),o=this&&this.__extends||(r=function(t,e){return r=Object.setPrototypeOf||{__proto__:[]}instanceof Array&&function(t,e){t.__proto__=e}||function(t,e){for(var n in e)Object.prototype.hasOwnProperty.call(e,n)&&(t[n]=e[n])},r(t,e)},function(t,e){if("function"!=typeof e&&null!==e)throw new TypeError("Class extends value "+String(e)+" is not a constructor or null");function n(){this.constructor=t}r(t,e),t.prototype=null===e?Object.create(e):(n.prototype=e.prototype,new n)}),a=this&&this.__awaiter||function(t,e,n,r){return new(n||(n=Promise))((function(i,o){function a(t){try{u(r.next(t))}catch(t){o(t)}}function s(t){try{u(r.throw(t))}catch(t){o(t)}}function u(t){var e;t.done?i(t.value):(e=t.value,e instanceof n?e:new n((function(t){t(e)}))).then(a,s)}u((r=r.apply(t,e||[])).next())}))},s=this&&this.__generator||function(t,e){var n,r,i,o,a={label:0,sent:function(){if(1&i[0])throw i[1];return i[1]},trys:[],ops:[]};return o={next:s(0),throw:s(1),return:s(2)},"function"==typeof Symbol&&(o[Symbol.iterator]=function(){return this}),o;function s(o){return function(s){return function(o){if(n)throw new TypeError("Generator is already executing.");for(;a;)try{if(n=1,r&&(i=2&o[0]?r.return:o[0]?r.throw||((i=r.return)&&i.call(r),0):r.next)&&!(i=i.call(r,o[1])).done)return i;switch(r=0,i&&(o=[2&o[0],i.value]),o[0]){case 0:case 1:i=o;break;case 4:return a.label++,{value:o[1],done:!1};case 5:a.label++,r=o[1],o=[0];continue;case 7:o=a.ops.pop(),a.trys.pop();continue;default:if(!((i=(i=a.trys).length>0&&i[i.length-1])||6!==o[0]&&2!==o[0])){a=0;continue}if(3===o[0]&&(!i||o[1]>i[0]&&o[1]0;break;case"Polygon":case"MultiPolygon":r=null!==(0,h.default)(o,n);break;case"MultiPoint":r=e.multiPointIntersects(o,n);break;case"GeometryCollection":r=e.geometryCollectionIntersects(o,n)}}return r},e.verifyGeometryCollection=function(t,n){return e.geometryCollectionIntersects(t,n.toGeoJSON().geometry)||(0,f.default)(t,n.toGeoJSON().geometry)?t:void 0},e.readTable=function(t,e){return t.getFeatureDao(e)},e}(y.UserDao);e.FeatureDao=T},234:function(t,e,n){"use strict";var r,i=n(3085).Buffer,o=this&&this.__extends||(r=function(t,e){return r=Object.setPrototypeOf||{__proto__:[]}instanceof Array&&function(t,e){t.__proto__=e}||function(t,e){for(var n in e)Object.prototype.hasOwnProperty.call(e,n)&&(t[n]=e[n])},r(t,e)},function(t,e){if("function"!=typeof e&&null!==e)throw new TypeError("Class extends value "+String(e)+" is not a constructor or null");function n(){this.constructor=t}r(t,e),t.prototype=null===e?Object.create(e):(n.prototype=e.prototype,new n)});Object.defineProperty(e,"__esModule",{value:!0}),e.FeatureRow=void 0;var a=n(2224),s=n(961),u=n(857),l=function(t){function e(e,n,r){var i=t.call(this,e,n,r)||this;return i.featureTable=e,i}return o(e,t),Object.defineProperty(e.prototype,"geometryColumnIndex",{get:function(){return this.featureTable.getGeometryColumnIndex()},enumerable:!1,configurable:!0}),Object.defineProperty(e.prototype,"geometryColumn",{get:function(){return this.featureTable.getGeometryColumn()},enumerable:!1,configurable:!0}),Object.defineProperty(e.prototype,"geometry",{get:function(){return this.getValueWithIndex(this.featureTable.getGeometryColumnIndex())},set:function(t){this.setValueWithIndex(this.featureTable.getGeometryColumnIndex(),t)},enumerable:!1,configurable:!0}),Object.defineProperty(e.prototype,"geometryType",{get:function(){var t=null,e=this.getValueWithIndex(this.featureTable.getGeometryColumnIndex());return null!==e&&(t=e.toGeoJSON().type),t},enumerable:!1,configurable:!0}),e.prototype.toObjectValue=function(e,n){var r=this.getColumnWithIndex(e);return r instanceof s.FeatureColumn&&r.isGeometry()&&n&&n instanceof i||n instanceof Uint8Array?new u.GeometryData(n):t.prototype.toObjectValue.call(this,e,n)},e.prototype.getValueWithColumnName=function(e){var n=this.values[e],r=this.getColumnWithColumnName(e);return null!=n&&r instanceof s.FeatureColumn&&r.isGeometry()&&n.toData?n.toData():t.prototype.getValueWithColumnName.call(this,e)},e}(a.UserRow);e.FeatureRow=l},8412:function(t,e,n){"use strict";var r,i=this&&this.__extends||(r=function(t,e){return r=Object.setPrototypeOf||{__proto__:[]}instanceof Array&&function(t,e){t.__proto__=e}||function(t,e){for(var n in e)Object.prototype.hasOwnProperty.call(e,n)&&(t[n]=e[n])},r(t,e)},function(t,e){if("function"!=typeof e&&null!==e)throw new TypeError("Class extends value "+String(e)+" is not a constructor or null");function n(){this.constructor=t}r(t,e),t.prototype=null===e?Object.create(e):(n.prototype=e.prototype,new n)});Object.defineProperty(e,"__esModule",{value:!0}),e.FeatureTable=void 0;var o=n(8018),a=n(5053),s=n(9971),u=function(t){function e(e,n,r){return t.call(this,new a.FeatureColumns(e,n,r,!1))||this}return i(e,t),e.prototype.copy=function(){return new e(this.getTableName(),this.getGeometryColumnName(),this.getUserColumns().getColumns())},e.prototype.getGeometryColumnIndex=function(){return this.getUserColumns().getGeometryIndex()},e.prototype.getUserColumns=function(){return t.prototype.getUserColumns.call(this)},e.prototype.getGeometryColumn=function(){return this.getUserColumns().getGeometryColumn()},e.prototype.getGeometryColumnName=function(){return this.getUserColumns().getGeometryColumnName()},e.prototype.getIdAndGeometryColumnNames=function(){return[this.getPkColumnName(),this.getGeometryColumnName()]},e.prototype.validateContents=function(t){var e=t.data_type;if(null==e||e!==s.ContentsDataType.FEATURES)throw new Error("The Contents of a FeatureTable must have a data type of "+s.ContentsDataType.FEATURES)},e}(o.UserTable);e.FeatureTable=u},4896:function(t,e,n){"use strict";var r,i=this&&this.__extends||(r=function(t,e){return r=Object.setPrototypeOf||{__proto__:[]}instanceof Array&&function(t,e){t.__proto__=e}||function(t,e){for(var n in e)Object.prototype.hasOwnProperty.call(e,n)&&(t[n]=e[n])},r(t,e)},function(t,e){if("function"!=typeof e&&null!==e)throw new TypeError("Class extends value "+String(e)+" is not a constructor or null");function n(){this.constructor=t}r(t,e),t.prototype=null===e?Object.create(e):(n.prototype=e.prototype,new n)});Object.defineProperty(e,"__esModule",{value:!0}),e.FeatureTableReader=void 0;var o=n(1968),a=n(8412),s=n(4880),u=n(961),l=n(812),c=function(t){function e(e){var n=t.call(this,e instanceof l.GeometryColumns?e.table_name:e)||this;return e instanceof l.GeometryColumns&&(n.columnName=e.column_name),n}return i(e,t),e.prototype.readFeatureTable=function(t){if(null===this.columnName||void 0===this.columnName){var e=new o.GeometryColumnsDao(t);this.columnName=e.queryForTableName(this.table_name).column_name}return this.readTable(t.database)},e.prototype.createTable=function(t,e){return new a.FeatureTable(t,this.columnName,e)},e.prototype.createColumn=function(t){return new u.FeatureColumn(t.index,t.name,t.dataType,t.max,t.notNull,t.defaultValue,t.primaryKey,u.FeatureColumn.getGeometryTypeFromTableColumn(t),t.autoincrement)},e}(s.UserTableReader);e.FeatureTableReader=c},9211:(t,e)=>{"use strict";var n;Object.defineProperty(e,"__esModule",{value:!0}),e.GeometryType=void 0,(n=e.GeometryType||(e.GeometryType={}))[n.GEOMETRY=0]="GEOMETRY",n[n.POINT=1]="POINT",n[n.LINESTRING=2]="LINESTRING",n[n.POLYGON=3]="POLYGON",n[n.MULTIPOINT=4]="MULTIPOINT",n[n.MULTILINESTRING=5]="MULTILINESTRING",n[n.MULTIPOLYGON=6]="MULTIPOLYGON",n[n.GEOMETRYCOLLECTION=7]="GEOMETRYCOLLECTION",n[n.CIRCULARSTRING=8]="CIRCULARSTRING",n[n.COMPOUNDCURVE=9]="COMPOUNDCURVE",n[n.CURVEPOLYGON=10]="CURVEPOLYGON",n[n.MULTICURVE=11]="MULTICURVE",n[n.MULTISURFACE=12]="MULTISURFACE",n[n.CURVE=13]="CURVE",n[n.SURFACE=14]="SURFACE",n[n.POLYHEDRALSURFACE=15]="POLYHEDRALSURFACE",n[n.TIN=16]="TIN",n[n.TRIANGLE=17]="TRIANGLE",function(t){t.nameFromType=function(e){var n=null;return null!=e&&(n=t[e]),n},t.fromName=function(e){return t[e]}}(e.GeometryType||(e.GeometryType={}))},4325:function(t,e,n){"use strict";var r=this&&this.__createBinding||(Object.create?function(t,e,n,r){void 0===r&&(r=n);var i=Object.getOwnPropertyDescriptor(e,n);i&&!("get"in i?!e.__esModule:i.writable||i.configurable)||(i={enumerable:!0,get:function(){return e[n]}}),Object.defineProperty(t,r,i)}:function(t,e,n,r){void 0===r&&(r=n),t[r]=e[n]}),i=this&&this.__setModuleDefault||(Object.create?function(t,e){Object.defineProperty(t,"default",{enumerable:!0,value:e})}:function(t,e){t.default=e}),o=this&&this.__importStar||function(t){if(t&&t.__esModule)return t;var e={};if(null!=t)for(var n in t)"default"!==n&&Object.prototype.hasOwnProperty.call(t,n)&&r(e,t,n);return i(e,t),e},a=this&&this.__awaiter||function(t,e,n,r){return new(n||(n=Promise))((function(i,o){function a(t){try{u(r.next(t))}catch(t){o(t)}}function s(t){try{u(r.throw(t))}catch(t){o(t)}}function u(t){var e;t.done?i(t.value):(e=t.value,e instanceof n?e:new n((function(t){t(e)}))).then(a,s)}u((r=r.apply(t,e||[])).next())}))},s=this&&this.__generator||function(t,e){var n,r,i,o,a={label:0,sent:function(){if(1&i[0])throw i[1];return i[1]},trys:[],ops:[]};return o={next:s(0),throw:s(1),return:s(2)},"function"==typeof Symbol&&(o[Symbol.iterator]=function(){return this}),o;function s(o){return function(s){return function(o){if(n)throw new TypeError("Generator is already executing.");for(;a;)try{if(n=1,r&&(i=2&o[0]?r.return:o[0]?r.throw||((i=r.return)&&i.call(r),0):r.next)&&!(i=i.call(r,o[1])).done)return i;switch(r=0,i&&(o=[2&o[0],i.value]),o[0]){case 0:case 1:i=o;break;case 4:return a.label++,{value:o[1],done:!1};case 5:a.label++,r=o[1],o=[0];continue;case 7:o=a.ops.pop(),a.trys.pop();continue;default:if(!((i=(i=a.trys).length>0&&i[i.length-1])||6!==o[0]&&2!==o[0])){a=0;continue}if(3===o[0]&&(!i||o[1]>i[0]&&o[1]=t.length&&(t=void 0),{value:t&&t[r++],done:!t}}};throw new TypeError(e?"Object is not iterable.":"Symbol.iterator is not defined.")},l=this&&this.__importDefault||function(t){return t&&t.__esModule?t:{default:t}};Object.defineProperty(e,"__esModule",{value:!0}),e.GeoPackage=void 0;var c=l(n(1011)),h=l(n(6102)),f=l(n(3892)),p=l(n(7383)),d=l(n(8147)),y=l(n(1013)),m=o(n(4102)),g=l(n(4472)),_=n(857),b=n(5306),v=n(1832),T=n(8479),E=n(1314),w=n(7523),x=n(5965),C=n(1968),M=n(2071),S=n(4896),N=n(6638),O=n(5925),A=n(3506),I=n(4941),P=n(7175),R=n(663),L=n(2056),D=n(5698),k=n(9581),F=n(9095),U=n(8904),B=n(8008),j=n(1394),G=n(7092),W=n(7960),q=n(3931),H=n(9631),z=n(464),V=n(8412),X=n(8138),Y=n(8704),Z=n(5897),Q=n(7319),K=n(8116),J=n(812),$=n(1459),tt=n(1938),et=n(3684),nt=n(2527),rt=n(5899),it=n(5865),ot=n(8133),at=n(4275),st=n(961),ut=n(6366),lt=n(8483),ct=n(4599),ht=n(297),ft=n(731),pt=n(4301),dt=n(2777),yt=n(8375),mt=n(8314),gt=n(9406),_t=n(9971),bt=n(9211),vt=n(7686),Tt=n(5604),Et=n(1375),wt=n(8877),xt=function(){function t(t,e,n){this.name=t,this.path=e,this.connection=n,this.tableCreator=new $.TableCreator(this),this.loadSpatialReferenceSystemsIntoProj4()}return t.prototype.close=function(){this.connection.close()},Object.defineProperty(t.prototype,"database",{get:function(){return this.connection},enumerable:!1,configurable:!0}),t.prototype.export=function(){return a(this,void 0,void 0,(function(){return s(this,(function(t){return[2,this.connection.export()]}))}))},t.prototype.loadSpatialReferenceSystemsIntoProj4=function(){this.spatialReferenceSystemDao.getAllSpatialReferenceSystems().forEach((function(t){try{t.srs_id>0&&(t.organization!==Et.ProjectionConstants.EPSG||t.organization_coordsys_id!==Et.ProjectionConstants.EPSG_CODE_4326&&t.organization_coordsys_id!==Et.ProjectionConstants.EPSG_CODE_3857)&&Tt.Projection.loadProjection([t.organization,t.organization_coordsys_id].join(":"),t.definition)}catch(t){}}))},t.prototype.validate=function(){var t=[];return t.concat(at.GeoPackageValidate.validateMinimumTables(this))},Object.defineProperty(t.prototype,"spatialReferenceSystemDao",{get:function(){return this._spatialReferenceSystemDao||(this._spatialReferenceSystemDao=new x.SpatialReferenceSystemDao(this))},enumerable:!1,configurable:!0}),Object.defineProperty(t.prototype,"contentsDao",{get:function(){return this._contentsDao||(this._contentsDao=new N.ContentsDao(this))},enumerable:!1,configurable:!0}),Object.defineProperty(t.prototype,"tileMatrixSetDao",{get:function(){return this._tileMatrixSetDao||(this._tileMatrixSetDao=new O.TileMatrixSetDao(this))},enumerable:!1,configurable:!0}),Object.defineProperty(t.prototype,"tileMatrixDao",{get:function(){return this._tileMatrixDao||(this._tileMatrixDao=new A.TileMatrixDao(this))},enumerable:!1,configurable:!0}),Object.defineProperty(t.prototype,"dataColumnsDao",{get:function(){return this._dataColumnsDao||(this._dataColumnsDao=new I.DataColumnsDao(this))},enumerable:!1,configurable:!0}),Object.defineProperty(t.prototype,"extensionDao",{get:function(){return this._extensionDao||(this._extensionDao=new D.ExtensionDao(this))},enumerable:!1,configurable:!0}),Object.defineProperty(t.prototype,"tableIndexDao",{get:function(){return this._tableIndexDao||(this._tableIndexDao=new k.TableIndexDao(this))},enumerable:!1,configurable:!0}),Object.defineProperty(t.prototype,"geometryColumnsDao",{get:function(){return this._geometryColumnsDao||(this._geometryColumnsDao=new C.GeometryColumnsDao(this))},enumerable:!1,configurable:!0}),Object.defineProperty(t.prototype,"dataColumnConstraintsDao",{get:function(){return this._dataColumnConstraintsDao||(this._dataColumnConstraintsDao=new P.DataColumnConstraintsDao(this))},enumerable:!1,configurable:!0}),Object.defineProperty(t.prototype,"metadataReferenceDao",{get:function(){return this._metadataReferenceDao||(this._metadataReferenceDao=new L.MetadataReferenceDao(this))},enumerable:!1,configurable:!0}),Object.defineProperty(t.prototype,"metadataDao",{get:function(){return this._metadataDao||(this._metadataDao=new R.MetadataDao(this))},enumerable:!1,configurable:!0}),Object.defineProperty(t.prototype,"extendedRelationDao",{get:function(){return this._extendedRelationDao||(this._extendedRelationDao=new U.ExtendedRelationDao(this))},enumerable:!1,configurable:!0}),Object.defineProperty(t.prototype,"contentsIdDao",{get:function(){return this._contentsIdDao||(this._contentsIdDao=new G.ContentsIdDao(this))},enumerable:!1,configurable:!0}),Object.defineProperty(t.prototype,"tileScalingDao",{get:function(){return this._tileScalingDao||(this._tileScalingDao=new W.TileScalingDao(this))},enumerable:!1,configurable:!0}),Object.defineProperty(t.prototype,"contentsIdExtension",{get:function(){return this._contentsIdExtension||(this._contentsIdExtension=new E.ContentsIdExtension(this))},enumerable:!1,configurable:!0}),Object.defineProperty(t.prototype,"featureStyleExtension",{get:function(){return this._featureStyleExtension||(this._featureStyleExtension=new T.FeatureStyleExtension(this))},enumerable:!1,configurable:!0}),t.prototype.getTileScalingExtension=function(t){return new w.TileScalingExtension(this,t)},t.prototype.getGeometryIndexDao=function(t){return new F.GeometryIndexDao(this,t)},Object.defineProperty(t.prototype,"relatedTablesExtension",{get:function(){return this._relatedTablesExtension||(this._relatedTablesExtension=new v.RelatedTablesExtension(this))},enumerable:!1,configurable:!0}),t.prototype.getSrs=function(t){return this.spatialReferenceSystemDao.queryForId(t)},t.prototype.createRequiredTables=function(){return this.tableCreator.createRequired(),this},t.prototype.createSupportedExtensions=function(){return new b.CrsWktExtension(this).getOrCreateExtension(),new K.SchemaExtension(this).getOrCreateExtension(),this},t.prototype.getTileDao=function(t){if(t instanceof Z.Contents)t=this.contentsDao.getTileMatrixSet(t);else if(!(t instanceof rt.TileMatrixSet)){var e=this.tileMatrixSetDao,n=e.queryForAllEq(O.TileMatrixSetDao.COLUMN_TABLE_NAME,t);if(n.length>1)throw new Error("Unexpected state. More than one Tile Matrix Set matched for table name: "+t+", count: "+n.length);if(0===n.length)throw new Error("No Tile Matrix found for table name: "+t);t=e.createObject(n[0])}if(!t)throw new Error("Non null TileMatrixSet is required to create Tile DAO");var r=[],i=this.tileMatrixDao;i.queryForAllEq(A.TileMatrixDao.COLUMN_TABLE_NAME,t.table_name,null,null,A.TileMatrixDao.COLUMN_ZOOM_LEVEL+" ASC, "+A.TileMatrixDao.COLUMN_PIXEL_X_SIZE+" DESC, "+A.TileMatrixDao.COLUMN_PIXEL_Y_SIZE+" DESC").forEach((function(t){var e=i.createObject(t);i.hasTiles(e)&&r.push(e)}));var o=new H.TileTableReader(t).readTileTable(this);return new j.TileDao(this,o,t,r)},t.prototype.getTables=function(t){return void 0===t&&(t=!1),t?{features:this.contentsDao.getContentsForTableType(_t.ContentsDataType.FEATURES),tiles:this.contentsDao.getContentsForTableType(_t.ContentsDataType.TILES),attributes:this.contentsDao.getContentsForTableType(_t.ContentsDataType.ATTRIBUTES)}:{features:this.getFeatureTables(),tiles:this.getTileTables(),attributes:this.getAttributesTables()}},t.prototype.getAttributesTables=function(){return this.contentsDao.getTables(_t.ContentsDataType.ATTRIBUTES)},t.prototype.hasAttributeTable=function(t){var e=this.getAttributesTables();return e&&-1!=e.indexOf(t)},t.prototype.getTileTables=function(){var t=this.contentsDao;return t.isTableExists()?t.getTables(_t.ContentsDataType.TILES):[]},t.prototype.hasTileTable=function(t){var e=this.getTileTables();return e&&-1!==e.indexOf(t)},t.prototype.hasFeatureTable=function(t){var e=this.getFeatureTables();return e&&-1!=e.indexOf(t)},t.prototype.getFeatureTables=function(){var t=this.contentsDao;return t.isTableExists()?t.getTables(_t.ContentsDataType.FEATURES):[]},t.prototype.isTable=function(t){return!!this.connection.tableExists(t)},t.prototype.isTableType=function(t,e){return t===this.getTableType(e)},t.prototype.getTableType=function(t){var e=this.getTableContents(t);if(e)return e.data_type},t.prototype.getTableContents=function(t){return this.contentsDao.queryForId(t)},t.prototype.dropTable=function(t){return this.connection.dropTable(t)},t.prototype.deleteTable=function(t){gt.GeoPackageExtensions.deleteTableExtensions(this,t),this.contentsDao.deleteTable(t)},t.prototype.deleteTableQuietly=function(t){try{this.deleteTable(t)}catch(t){}},t.prototype.getTableCreator=function(){return this.tableCreator},t.prototype.index=function(){return a(this,void 0,void 0,(function(){var t,e;return s(this,(function(n){switch(n.label){case 0:t=this.getFeatureTables(),e=0,n.label=1;case 1:return e0&&n[0]instanceof it.UserColumn)s=n;else{var u=0;s.push(st.FeatureColumn.createPrimaryKeyColumn(u++,"id")),s.push(st.FeatureColumn.createGeometryColumn(u++,a.column_name,bt.GeometryType.GEOMETRY,!1,null));for(var l=0;n&&lc.maxZoom)){for(var h=0;hc.maxWebMapZoom)){l.columns=[];for(var h=0;h1e4){var p=f.toGeoJSON();return p.feature_count=h,p.coverage=!0,p.gp_table=e,p.gp_name=this.name,p}var d=[f.maxLongitude,f.maxLatitude],y=[f.minLongitude,f.minLatitude],g=(d[0]-y[0])/256*10;f.maxLongitude=a+g,f.minLongitude=a-g,f.maxLatitude=o+g,f.minLatitude=o-g;var _,b=c.queryForGeoJSONIndexedFeaturesWithBoundingBox(f),v=[],T=1e11,E=m.point([a,o]);try{for(var w=u(b),x=w.next();!x.done;x=w.next()){var C=x.value;C.type="Feature";var M=t.determineDistance(E.geometry,C);(M{"use strict";Object.defineProperty(e,"__esModule",{value:!0}),e.GeoPackageConstants=void 0;var n=function(){function t(){}return t.GEOPACKAGE_EXTENSION="gpkg",t.GEOPACKAGE_EXTENDED_EXTENSION="gpkx",t.APPLICATION_ID="GPKG",t.USER_VERSION="10200",t.GEOPACKAGE_EXTENSION_AUTHOR=t.GEOPACKAGE_EXTENSION,t.GEOMETRY_EXTENSION_PREFIX="geom",t.GEOPACKAGE_GEOMETRY_MAGIC_NUMBER="GP",t.GEOPACKAGE_GEOMETRY_VERSION_1=0,t.SQLITE_HEADER_PREFIX="SQLite format 3",t}();e.GeoPackageConstants=n},5095:(t,e)=>{"use strict";Object.defineProperty(e,"__esModule",{value:!0}),e.Envelope=void 0;e.Envelope=function(){}},1895:function(t,e,n){"use strict";var r=this&&this.__importDefault||function(t){return t&&t.__esModule?t:{default:t}};Object.defineProperty(e,"__esModule",{value:!0}),e.EnvelopeBuilder=void 0;var i=r(n(9705)),o=function(){function t(){}return t.buildEnvelopeWithGeometry=function(t){var e=t.toGeoJSON(),n=(0,i.default)(e);return{minX:n[0],minY:n[1],maxX:n[2],maxY:n[3]}},t}();e.EnvelopeBuilder=o},857:function(t,e,n){"use strict";var r=n(3085).Buffer,i=n(5108),o=this&&this.__importDefault||function(t){return t&&t.__esModule?t:{default:t}};Object.defineProperty(e,"__esModule",{value:!0}),e.GeometryData=void 0;var a=o(n(1011)),s=n(1506),u=n(5095),l=function(){function t(e){this.empty=!0,this.byteOrder=t.BIG_ENDIAN,e&&this.fromData(e)}return t.prototype.setSrsId=function(t){this.srsId=t},t.prototype.setGeometry=function(t){this.empty=!1,this.geometry=t},t.prototype.setEnvelope=function(t){this.envelope=t},t.prototype.toGeoJSON=function(){return this.geometry.toGeoJSON()},t.prototype.fromData=function(t){t instanceof Uint8Array?this.buffer=t=r.from(t):this.buffer=t;var e=this.buffer.toString("ascii",0,2);if(e!==s.GeoPackageConstants.GEOPACKAGE_GEOMETRY_MAGIC_NUMBER)throw new Error("Unexpected GeoPackage Geometry magic number: "+e+", Expected: "+s.GeoPackageConstants.GEOPACKAGE_GEOMETRY_MAGIC_NUMBER);var n=this.buffer.readUInt8(2);if(n!==s.GeoPackageConstants.GEOPACKAGE_GEOMETRY_VERSION_1)throw new Error("Unexpected GeoPackage Geometry version "+n+", Expected: "+s.GeoPackageConstants.GEOPACKAGE_GEOMETRY_VERSION_1);var o=this.buffer.readUInt8(3),u=this.readFlags(o);this.srsId=this.buffer[this.byteOrder?"readUInt32LE":"readUInt32BE"](4);var l=this.readEnvelope(u,this.buffer);this.envelope=l.envelope;var c=l.offset,h=this.buffer.slice(c);try{this.geometry=a.default.Geometry.parse(h),this.geometryError=void 0}catch(t){this.geometryError=t.message,i.log("Error parsing geometry")}},t.prototype.toData=function(){var t=r.alloc(8);t.write(s.GeoPackageConstants.GEOPACKAGE_GEOMETRY_MAGIC_NUMBER),t.writeUInt8(s.GeoPackageConstants.GEOPACKAGE_GEOMETRY_VERSION_1,2);var e=this.buildFlagsByte();t.writeUInt8(e,3),t[this.byteOrder?"writeUInt32LE":"writeUInt32BE"](this.srsId,4);var n=[t,this.writeEnvelope()];try{n.push(this.geometry.toWkb()),this.geometryError=void 0}catch(t){this.geometryError=t.message}return this.buffer=r.concat(n),this.buffer},t.prototype.writeEnvelope=function(){if(!this.envelope)return r.alloc(0);var t=32;this.envelope.hasZ&&(t+=16),this.envelope.hasM&&(t+=16);var e,n=r.alloc(t);(e=this.byteOrder?n.writeDoubleLE.bind(n):n.writeDoubleBE.bind(n))(this.envelope.minX,0),e(this.envelope.maxX,8),e(this.envelope.minY,16),e(this.envelope.maxY,24);var i=32;return this.envelope.hasZ&&(e(this.envelope.minZ,i),e(this.envelope.maxZ,i+8),i=48),this.envelope.hasM&&(e(this.envelope.minM,i),e(this.envelope.maxM,i+8)),n},t.prototype.buildFlagsByte=function(){var e=0;return e+=(this.extended?1:0)<<5,e+=(this.empty?1:0)<<4,(e+=(this.envelope?this.getIndicatorWithEnvelope(this.envelope):0)<<1)+(this.byteOrder===t.BIG_ENDIAN?0:1)},t.prototype.getIndicatorWithEnvelope=function(t){var e=1;return t.hasZ&&e++,t.hasM&&(e+=2),e},t.prototype.readFlags=function(t){var e=t>>7&1,n=t>>6&1;if(0!==e||0!==n)throw new Error("Unexpected GeoPackage Geometry flags. Flag bit 7 and 6 should both be 0, 7="+e+", 6="+n);var r=t>>5&1;this.extended=1===r;var i=t>>4&1;this.empty=1===i;var o=t>>1&7;if(o>4)throw new Error("Unexpected GeoPackage Geometry flags. Envelope contents indicator must be between 0 and 4. Actual: "+o);var a=1&t;return this.byteOrder=a,o},t.prototype.readEnvelope=function(t,e){var n;n=this.byteOrder?e.readDoubleLE.bind(e):e.readDoubleBE.bind(e);var r=0,i={envelope:void 0,offset:8};if(t<=0)return i;var o=new u.Envelope;return o.minX=n(8+8*r++),o.maxX=n(8+8*r++),o.minY=n(8+8*r++),o.maxY=n(8+8*r++),o.hasZ=!1,o.hasM=!1,2!==t&&4!==t||(o.hasZ=!0,o.minZ=n(8+8*r++),o.maxZ=n(8+8*r++)),3!==t&&4!==t||(o.hasM=!0,o.minM=n(8+8*r++),o.maxM=n(8+8*r++)),i.envelope=o,i.offset=8+8*r,i},t.BIG_ENDIAN=0,t.LITTLE_ENDIAN=1,t}();e.GeometryData=l},3026:(t,e)=>{"use strict";Object.defineProperty(e,"__esModule",{value:!0}),e.Metadata=void 0;var n=function(){function t(){}return t.prototype.getScopeInformation=function(e){switch(e){case t.UNDEFINED:return{name:t.UNDEFINED,code:"NA",definition:"Metadata information scope is undefined"};case t.FIELD_SESSION:return{name:t.FIELD_SESSION,code:"012",definition:"Information applies to the field session"};case t.COLLECTION_SESSION:return{name:t.COLLECTION_SESSION,code:"004",definition:"Information applies to the collection session"};case t.SERIES:return{name:t.SERIES,code:"006",definition:"Information applies to the (dataset) series"};case t.DATASET:return{name:t.DATASET,code:"005",definition:"Information applies to the (geographic feature) dataset"};case t.FEATURE_TYPE:return{name:t.FEATURE_TYPE,code:"010",definition:"Information applies to a feature type (class)"};case t.FEATURE:return{name:t.FEATURE,code:"009",definition:"Information applies to a feature (instance)"};case t.ATTRIBUTE_TYPE:return{name:t.ATTRIBUTE_TYPE,code:"002",definition:"Information applies to the attribute class"};case t.ATTRIBUTE:return{name:t.ATTRIBUTE,code:"001",definition:"Information applies to the characteristic of a feature (instance)"};case t.TILE:return{name:t.TILE,code:"016",definition:"Information applies to a tile, a spatial subset of geographic data"};case t.MODEL:return{name:t.MODEL,code:"015",definition:"Information applies to a copy or imitation of an existing or hypothetical object"};case t.CATALOG:return{name:t.CATALOG,code:"NA",definition:"Metadata applies to a feature catalog"};case t.SCHEMA:return{name:t.SCHEMA,code:"NA",definition:"Metadata applies to an application schema"};case t.TAXONOMY:return{name:t.TAXONOMY,code:"NA",definition:"Metadata applies to a taxonomy or knowledge system"};case t.SOFTWARE:return{name:t.SOFTWARE,code:"013",definition:"Information applies to a computer program or routine"};case t.SERVICE:return{name:t.SERVICE,code:"014",definition:"Information applies to a capability which a service provider entity makes available to a service user entity through a set of interfaces that define a behaviour, such as a use case"};case t.COLLECTION_HARDWARE:return{name:t.COLLECTION_HARDWARE,code:"003",definition:"Information applies to the collection hardware class"};case t.NON_GEOGRAPHIC_DATASET:return{name:t.NON_GEOGRAPHIC_DATASET,code:"007",definition:"Information applies to non-geographic data"};case t.DIMENSION_GROUP:return{name:t.DIMENSION_GROUP,code:"008",definition:"Information applies to a dimension group"}}},t.UNDEFINED="undefined",t.FIELD_SESSION="fieldSession",t.COLLECTION_SESSION="collectionSession",t.SERIES="series",t.DATASET="dataset",t.FEATURE_TYPE="featureType",t.FEATURE="feature",t.ATTRIBUTE_TYPE="attributeType",t.ATTRIBUTE="attribute",t.TILE="tile",t.MODEL="model",t.CATALOG="catalog",t.SCHEMA="schema",t.TAXONOMY="taxonomy",t.SOFTWARE="software",t.SERVICE="service",t.COLLECTION_HARDWARE="collectionHardware",t.NON_GEOGRAPHIC_DATASET="nonGeographicDataset",t.DIMENSION_GROUP="dimensionGroup",t}();e.Metadata=n},663:function(t,e,n){"use strict";var r,i=this&&this.__extends||(r=function(t,e){return r=Object.setPrototypeOf||{__proto__:[]}instanceof Array&&function(t,e){t.__proto__=e}||function(t,e){for(var n in e)Object.prototype.hasOwnProperty.call(e,n)&&(t[n]=e[n])},r(t,e)},function(t,e){if("function"!=typeof e&&null!==e)throw new TypeError("Class extends value "+String(e)+" is not a constructor or null");function n(){this.constructor=t}r(t,e),t.prototype=null===e?Object.create(e):(n.prototype=e.prototype,new n)});Object.defineProperty(e,"__esModule",{value:!0}),e.MetadataDao=void 0;var o=n(4115),a=n(3026),s=function(t){function e(){var n=null!==t&&t.apply(this,arguments)||this;return n.gpkgTableName=e.TABLE_NAME,n.idColumns=[e.COLUMN_ID],n}return i(e,t),e.prototype.createObject=function(t){var e=new a.Metadata;return t&&(e.id=t.id,e.md_scope=t.md_scope,e.md_standard_uri=t.md_standard_uri,e.mime_type=t.mime_type,e.metadata=t.metadata),e},e.TABLE_NAME="gpkg_metadata",e.COLUMN_ID="id",e.COLUMN_MD_SCOPE="md_scope",e.COLUMN_MD_STANDARD_URI="md_standard_uri",e.COLUMN_MIME_TYPE="mime_type",e.COLUMN_METADATA="metadata",e}(o.Dao);e.MetadataDao=s},9173:(t,e)=>{"use strict";Object.defineProperty(e,"__esModule",{value:!0}),e.MetadataReference=void 0;var n=function(){function t(){}return t.prototype.toDatabaseValue=function(t){return"timestamp"===t?this.timestamp.toISOString():this[t]},t.prototype.setMetadata=function(t){this.md_file_id=t?t.id:-1},t.prototype.setParentMetadata=function(t){this.md_parent_id=t?t.id:-1},t.prototype.setReferenceScopeType=function(e){switch(this.reference_scope=e,e){case t.GEOPACKAGE:this.table_name=void 0,this.column_name=void 0,this.row_id_value=void 0;break;case t.TABLE:this.column_name=void 0,this.row_id_value=void 0;break;case t.ROW:this.column_name=void 0;break;case t.COLUMN:this.row_id_value=void 0}},t.GEOPACKAGE="geopackage",t.TABLE="table",t.COLUMN="column",t.ROW="row",t.ROW_COL="row/col",t}();e.MetadataReference=n},2056:function(t,e,n){"use strict";var r,i=this&&this.__extends||(r=function(t,e){return r=Object.setPrototypeOf||{__proto__:[]}instanceof Array&&function(t,e){t.__proto__=e}||function(t,e){for(var n in e)Object.prototype.hasOwnProperty.call(e,n)&&(t[n]=e[n])},r(t,e)},function(t,e){if("function"!=typeof e&&null!==e)throw new TypeError("Class extends value "+String(e)+" is not a constructor or null");function n(){this.constructor=t}r(t,e),t.prototype=null===e?Object.create(e):(n.prototype=e.prototype,new n)});Object.defineProperty(e,"__esModule",{value:!0}),e.MetadataReferenceDao=void 0;var o=n(4115),a=n(8572),s=n(9173),u=function(t){function e(){var n=null!==t&&t.apply(this,arguments)||this;return n.gpkgTableName=e.TABLE_NAME,n.idColumns=[e.COLUMN_MD_FILE_ID,e.COLUMN_MD_PARENT_ID],n}return i(e,t),e.prototype.createObject=function(t){var e=new s.MetadataReference;return t&&(e.reference_scope=t.reference_scope,e.table_name=t.table_name,e.column_name=t.column_name,e.row_id_value=t.row_id_value,e.timestamp=new Date(t.timestamp),e.md_file_id=t.md_file_id,e.md_parent_id=t.md_parent_id),e},e.prototype.removeMetadataParent=function(t){var n={};n[e.COLUMN_MD_PARENT_ID]=null;var r=this.buildWhereWithFieldAndValue(e.COLUMN_MD_PARENT_ID,t),i=this.buildWhereArgs(t);return this.updateWithValues(n,r,i).changes},e.prototype.queryByMetadataAndParent=function(t,n){var r=new a.ColumnValues;return r.addColumn(e.COLUMN_MD_FILE_ID,t),r.addColumn(e.COLUMN_MD_PARENT_ID,n),this.queryForFieldValues(r)},e.prototype.queryByMetadata=function(t){var n=new a.ColumnValues;return n.addColumn(e.COLUMN_MD_FILE_ID,t),this.queryForFieldValues(n)},e.prototype.queryByMetadataParent=function(t){var n=new a.ColumnValues;return n.addColumn(e.COLUMN_MD_PARENT_ID,t),this.queryForFieldValues(n)},e.prototype.deleteByTableName=function(t){var n="";n+=this.buildWhereWithFieldAndValue(e.COLUMN_TABLE_NAME,t);var r=this.buildWhereArgs(t);return this.deleteWhere(n,r)},e.TABLE_NAME="gpkg_metadata_reference",e.COLUMN_REFERENCE_SCOPE="reference_scope",e.COLUMN_TABLE_NAME="table_name",e.COLUMN_COLUMN_NAME="column_name",e.COLUMN_ROW_ID="row_id_value",e.COLUMN_TIMESTAMP="timestamp",e.COLUMN_MD_FILE_ID="md_file_id",e.COLUMN_MD_PARENT_ID="md_parent_id",e}(o.Dao);e.MetadataReferenceDao=u},7403:(t,e)=>{"use strict";Object.defineProperty(e,"__esModule",{value:!0}),e.OptionBuilder=void 0;var n=function(){function t(){}return t.build=function(t){var e={};return t.forEach((function(t){e["set"+t.slice(0,1).toUpperCase()+t.slice(1)]=function(e){return this[t]=e,this},e["get"+t.slice(0,1).toUpperCase()+t.slice(1)]=function(){return this[t]}})),e},t}();e.OptionBuilder=n},5604:function(t,e,n){"use strict";var r=this&&this.__importDefault||function(t){return t&&t.__esModule?t:{default:t}};Object.defineProperty(e,"__esModule",{value:!0}),e.Projection=void 0;var i=r(n(4472)),o=r(n(8446)),a=n(1375),s=function(){function t(){}return t.loadProjection=function(t,e){if(!t||!e)throw new Error("Invalid projection name/definition");null==i.default.defs(t)&&i.default.defs(t,e)},t.loadProjections=function(e){if(!e)throw new Error("Invalid array of projections");for(var n=0;n{"use strict";Object.defineProperty(e,"__esModule",{value:!0}),e.ProjectionConstants=void 0;var n=function(){function t(){}return t.EPSG="EPSG",t.EPSG_PREFIX="EPSG:",t.EPSG_CODE_3857=3857,t.EPSG_CODE_4326=4326,t.EPSG_CODE_900913=900913,t.EPSG_CODE_102113=102113,t.EPSG_3857=t.EPSG_PREFIX+t.EPSG_CODE_3857,t.EPSG_4326=t.EPSG_PREFIX+t.EPSG_CODE_4326,t.EPSG_900913=t.EPSG_PREFIX+t.EPSG_CODE_900913,t.EPSG_102113=t.EPSG_PREFIX+t.EPSG_CODE_102113,t.WEB_MERCATOR_MAX_LAT_RANGE=85.0511287798066,t.WEB_MERCATOR_MIN_LAT_RANGE=-85.05112877980659,t.WEB_MERCATOR_MAX_LON_RANGE=180,t.WEB_MERCATOR_MIN_LON_RANGE=-180,t.WEB_MERCATOR_HALF_WORLD_WIDTH=20037508.342789244,t.WGS84_HALF_WORLD_LON_WIDTH=180,t.WGS84_HALF_WORLD_LAT_HEIGHT=90,t}();e.ProjectionConstants=n},7977:function(t,e,n){"use strict";var r=this&&this.__awaiter||function(t,e,n,r){return new(n||(n=Promise))((function(i,o){function a(t){try{u(r.next(t))}catch(t){o(t)}}function s(t){try{u(r.throw(t))}catch(t){o(t)}}function u(t){var e;t.done?i(t.value):(e=t.value,e instanceof n?e:new n((function(t){t(e)}))).then(a,s)}u((r=r.apply(t,e||[])).next())}))},i=this&&this.__generator||function(t,e){var n,r,i,o,a={label:0,sent:function(){if(1&i[0])throw i[1];return i[1]},trys:[],ops:[]};return o={next:s(0),throw:s(1),return:s(2)},"function"==typeof Symbol&&(o[Symbol.iterator]=function(){return this}),o;function s(o){return function(s){return function(o){if(n)throw new TypeError("Generator is already executing.");for(;a;)try{if(n=1,r&&(i=2&o[0]?r.return:o[0]?r.throw||((i=r.return)&&i.call(r),0):r.next)&&!(i=i.call(r,o[1])).done)return i;switch(r=0,i&&(o=[2&o[0],i.value]),o[0]){case 0:case 1:i=o;break;case 4:return a.label++,{value:o[1],done:!1};case 5:a.label++,r=o[1],o=[0];continue;case 7:o=a.ops.pop(),a.trys.pop();continue;default:if(!((i=(i=a.trys).length>0&&i[i.length-1])||6!==o[0]&&2!==o[0])){a=0;continue}if(3===o[0]&&(!i||o[1]>i[0]&&o[1]=this.width||n.yPositionInFinalTileStart>=this.height||this.addChunk(t,n)},t.prototype.addChunk=function(t,e){this.chunks.push({chunk:t,position:e})},t.prototype.reproject=function(t,e){return r(this,void 0,void 0,(function(){var t,r,o,a,l,c,h,d,y,m,g,_,b,v=this;return i(this,(function(i){if("undefined"!=typeof window&&window.Worker)return f.TileUtilities.getPiecePosition(e,this.tileBoundingBox,this.height,this.width,this.projectionTo,this.projectionToDefinition,this.projectionFrom,this.projectionFromDefinition,this.tileHeightUnitsPerPixel,this.tileWidthUnitsPerPixel,this.tileMatrix.pixel_x_size,this.tileMatrix.pixel_y_size),t={sourceImageData:this.tileContext.getImageData(0,0,this.tileMatrix.tile_width,this.tileMatrix.tile_height).data.buffer,height:this.height,width:this.width,projectionTo:this.projectionTo,projectionToDefinition:this.projectionToDefinition,projectionFrom:this.projectionFrom,projectionFromDefinition:this.projectionFromDefinition,maxLatitude:this.tileBoundingBox.maxLatitude,minLongitude:this.tileBoundingBox.minLongitude,tileWidthUnitsPerPixel:this.tileWidthUnitsPerPixel,tileHeightUnitsPerPixel:this.tileHeightUnitsPerPixel,tilePieceBoundingBox:JSON.stringify(e),tileBoundingBox:JSON.stringify(this.tileBoundingBox),pixel_y_size:this.tileMatrix.pixel_y_size,pixel_x_size:this.tileMatrix.pixel_x_size,tile_width:this.tileMatrix.tile_width,tile_height:this.tileMatrix.tile_height},[2,new Promise((function(e){try{(r=n(8034)(n(7591))).onmessage=function(t){v.canvas.getContext("2d").putImageData(new ImageData(new Uint8ClampedArray(t.data),v.height,v.width),0,0),e()},r.postMessage(t,[v.tileContext.getImageData(0,0,v.tileMatrix.tile_width,v.tileMatrix.tile_height).data.buffer])}catch(n){var r,i=(r=u.default)(t);v.canvas.getContext("2d").putImageData(new ImageData(new Uint8ClampedArray(i),v.height,v.width),0,0),e()}}))];r=this.height,o=this.width,a=this.tileMatrix.tile_height,l=this.tileMatrix.tile_width,c=void 0;try{null==p.Projection.hasProjection(this.projectionTo)&&p.Projection.loadProjection(this.projectionTo,this.projectionToDefinition),null==p.Projection.hasProjection(this.projectionFrom)&&p.Projection.loadProjection(this.projectionFrom,this.projectionFromDefinition),c=(0,s.default)(this.projectionTo,this.projectionFrom)}catch(t){}for(h=void 0,d=0;d=0&&_=0&&b{"use strict";Object.defineProperty(e,"__esModule",{value:!0}),e.CustomFeaturesTile=void 0;e.CustomFeaturesTile=function(){this.compressFormat="png",this.tileBorderStrokeWidth=2,this.tileBorderColor="rgba(0, 0, 0, 1.0)",this.tileFillColor="rgba(0, 0, 0, 0.0625)",this.drawUnindexedTiles=!0}},3060:function(t,e,n){"use strict";var r,i=this&&this.__extends||(r=function(t,e){return r=Object.setPrototypeOf||{__proto__:[]}instanceof Array&&function(t,e){t.__proto__=e}||function(t,e){for(var n in e)Object.prototype.hasOwnProperty.call(e,n)&&(t[n]=e[n])},r(t,e)},function(t,e){if("function"!=typeof e&&null!==e)throw new TypeError("Class extends value "+String(e)+" is not a constructor or null");function n(){this.constructor=t}r(t,e),t.prototype=null===e?Object.create(e):(n.prototype=e.prototype,new n)}),o=this&&this.__awaiter||function(t,e,n,r){return new(n||(n=Promise))((function(i,o){function a(t){try{u(r.next(t))}catch(t){o(t)}}function s(t){try{u(r.throw(t))}catch(t){o(t)}}function u(t){var e;t.done?i(t.value):(e=t.value,e instanceof n?e:new n((function(t){t(e)}))).then(a,s)}u((r=r.apply(t,e||[])).next())}))},a=this&&this.__generator||function(t,e){var n,r,i,o,a={label:0,sent:function(){if(1&i[0])throw i[1];return i[1]},trys:[],ops:[]};return o={next:s(0),throw:s(1),return:s(2)},"function"==typeof Symbol&&(o[Symbol.iterator]=function(){return this}),o;function s(o){return function(s){return function(o){if(n)throw new TypeError("Generator is already executing.");for(;a;)try{if(n=1,r&&(i=2&o[0]?r.return:o[0]?r.throw||((i=r.return)&&i.call(r),0):r.next)&&!(i=i.call(r,o[1])).done)return i;switch(r=0,i&&(o=[2&o[0],i.value]),o[0]){case 0:case 1:i=o;break;case 4:return a.label++,{value:o[1],done:!1};case 5:a.label++,r=o[1],o=[0];continue;case 7:o=a.ops.pop(),a.trys.pop();continue;default:if(!((i=(i=a.trys).length>0&&i[i.length-1])||6!==o[0]&&2!==o[0])){a=0;continue}if(3===o[0]&&(!i||o[1]>i[0]&&o[1]1)throw new Error("Circle padding percentage must be between 0.0 and 1.0: "+t);this.circlePaddingPercentage=t},e.prototype.getTileBorderStrokeWidth=function(){return this.tileBorderStrokeWidth},e.prototype.setTileBorderStrokeWidth=function(t){this.tileBorderStrokeWidth=t},e.prototype.getTileBorderColor=function(){return this.tileBorderColor},e.prototype.setTileBorderColor=function(t){this.tileBorderColor=t},e.prototype.getTileFillColor=function(){return this.tileFillColor},e.prototype.setTileFillColor=function(t){this.tileFillColor=t},e.prototype.isDrawUnindexedTiles=function(){return this.drawUnindexedTiles},e.prototype.setDrawUnindexedTiles=function(t){this.drawUnindexedTiles=t},e.prototype.getCompressFormat=function(){return this.compressFormat},e.prototype.setCompressFormat=function(t){this.compressFormat=t},e.prototype.drawUnindexedTile=function(t,e,n){return void 0===n&&(n=null),o(this,void 0,void 0,(function(){var r;return a(this,(function(i){return r=null,this.drawUnindexedTiles&&(r=this.drawTile(t,e,"?",n)),[2,r]}))}))},e.prototype.drawTile=function(t,e,n,r){return o(this,void 0,void 0,(function(){var i=this;return a(this,(function(o){switch(o.label){case 0:return[4,s.Canvas.initializeAdapter()];case 1:return o.sent(),[2,new Promise((function(o){var a,u=!1;null!=r?a=r:(a=s.Canvas.create(t,e),u=!0);var l=a.getContext("2d");l.clearRect(0,0,t,e),null!==i.tileFillColor&&(l.fillStyle=i.tileFillColor,l.fillRect(0,0,t,e)),null!==i.tileBorderColor&&(l.strokeStyle=i.tileBorderColor,l.lineWidth=i.tileBorderStrokeWidth,l.strokeRect(0,0,t,e));var c=s.Canvas.measureText(l,i.textFont,i.textSize,n),h=i.textSize,f=Math.round(t/2),p=Math.round(e/2);if(null!=i.circleBorderColor||null!=i.circleFillColor){var d=Math.max(c,h),y=Math.round(d/2);y=Math.round(y+d*i.circlePaddingPercentage),null!=i.circleFillColor&&(l.fillStyle=i.circleFillColor,l.beginPath(),l.arc(f,p,y,0,2*Math.PI,!0),l.closePath(),l.fill()),null!=i.circleBorderColor&&(l.strokeStyle=i.circleBorderColor,l.lineWidth=i.circleStrokeWidth,l.beginPath(),l.arc(f,p,y,0,2*Math.PI,!0),l.closePath(),l.stroke())}s.Canvas.drawText(l,n,[f,p],i.textFont,i.textSize,i.textColor),s.Canvas.toDataURL(a,"image/"+i.compressFormat).then((function(t){u&&s.Canvas.disposeCanvas(a),o(t)}))}))]}}))}))},e}(n(2544).CustomFeaturesTile);e.NumberFeaturesTile=u},6667:function(t,e,n){"use strict";var r,i=this&&this.__extends||(r=function(t,e){return r=Object.setPrototypeOf||{__proto__:[]}instanceof Array&&function(t,e){t.__proto__=e}||function(t,e){for(var n in e)Object.prototype.hasOwnProperty.call(e,n)&&(t[n]=e[n])},r(t,e)},function(t,e){if("function"!=typeof e&&null!==e)throw new TypeError("Class extends value "+String(e)+" is not a constructor or null");function n(){this.constructor=t}r(t,e),t.prototype=null===e?Object.create(e):(n.prototype=e.prototype,new n)}),o=this&&this.__awaiter||function(t,e,n,r){return new(n||(n=Promise))((function(i,o){function a(t){try{u(r.next(t))}catch(t){o(t)}}function s(t){try{u(r.throw(t))}catch(t){o(t)}}function u(t){var e;t.done?i(t.value):(e=t.value,e instanceof n?e:new n((function(t){t(e)}))).then(a,s)}u((r=r.apply(t,e||[])).next())}))},a=this&&this.__generator||function(t,e){var n,r,i,o,a={label:0,sent:function(){if(1&i[0])throw i[1];return i[1]},trys:[],ops:[]};return o={next:s(0),throw:s(1),return:s(2)},"function"==typeof Symbol&&(o[Symbol.iterator]=function(){return this}),o;function s(o){return function(s){return function(o){if(n)throw new TypeError("Generator is already executing.");for(;a;)try{if(n=1,r&&(i=2&o[0]?r.return:o[0]?r.throw||((i=r.return)&&i.call(r),0):r.next)&&!(i=i.call(r,o[1])).done)return i;switch(r=0,i&&(o=[2&o[0],i.value]),o[0]){case 0:case 1:i=o;break;case 4:return a.label++,{value:o[1],done:!1};case 5:a.label++,r=o[1],o=[0];continue;case 7:o=a.ops.pop(),a.trys.pop();continue;default:if(!((i=(i=a.trys).length>0&&i[i.length-1])||6!==o[0]&&2!==o[0])){a=0;continue}if(3===o[0]&&(!i||o[1]>i[0]&&o[1]{"use strict";var n;Object.defineProperty(e,"__esModule",{value:!0}),e.FeatureDrawType=void 0,(n=e.FeatureDrawType||(e.FeatureDrawType={})).CIRCLE="CIRCLE",n.STROKE="STROKE",n.FILL="FILL",function(t){t.nameFromType=function(e){return t[e]},t.fromName=function(e){switch(e){case"CIRCLE":return t.CIRCLE;case"STROKE":return t.STROKE;case"FILL":return t.FILL}}}(e.FeatureDrawType||(e.FeatureDrawType={}))},6063:(t,e)=>{"use strict";Object.defineProperty(e,"__esModule",{value:!0}),e.FeaturePaint=void 0;var n=function(){function t(){this.featurePaints={}}return t.prototype.getPaint=function(t){return this.featurePaints[t]},t.prototype.setPaint=function(t,e){this.featurePaints[t]=e},t}();e.FeaturePaint=n},9957:(t,e,n)=>{"use strict";Object.defineProperty(e,"__esModule",{value:!0}),e.FeaturePaintCache=void 0;var r=n(6063),i=function(){function t(e){void 0===e&&(e=t.DEFAULT_STYLE_PAINT_CACHE_SIZE),this.cacheSize=e,this.paintCache={},this.accessHistory=[]}return t.prototype.getFeaturePaintForStyleRow=function(t){return this.getFeaturePaint(t.id)},t.prototype.getFeaturePaint=function(t){var e=this.paintCache[t];if(e){var n=this.accessHistory.indexOf(t);n>-1&&this.accessHistory.splice(n,1),this.accessHistory.push(t)}return e},t.prototype.getPaintForStyleRow=function(t,e){return this.getPaint(t.id,e)},t.prototype.getPaint=function(t,e){var n=null,r=this.getFeaturePaint(t);return null!=r&&(n=r.getPaint(e)),n},t.prototype.setPaintForStyleRow=function(t,e,n){this.setPaint(t.id,e,n)},t.prototype.setPaint=function(t,e,n){var i=this.paintCache[t];if(i){var o=this.accessHistory.indexOf(t);o>-1&&this.accessHistory.splice(o,1)}else i=new r.FeaturePaint;if(i.setPaint(e,n),this.paintCache[t]=i,this.accessHistory.push(t),Object.keys(this.paintCache).length>this.cacheSize){var a=this.accessHistory.shift();a&&delete this.paintCache[a]}},t.prototype.remove=function(t){var e=this.paintCache[t];if(delete this.paintCache[t],e){var n=this.accessHistory.indexOf(t);n>-1&&this.accessHistory.splice(n,1)}return e},t.prototype.clear=function(){this.paintCache={},this.accessHistory=[]},t.prototype.resize=function(t){this.cacheSize=t;var e=Object.keys(this.paintCache);if(e.length>t)for(var n=e.length-t,r=0;r{"use strict";Object.defineProperty(e,"__esModule",{value:!0}),e.GeometryCache=void 0;var n=function(){function t(e){void 0===e&&(e=t.DEFAULT_GEOMETRY_CACHE_SIZE),this.cacheSize=e,this.geometryCache={},this.accessHistory=[]}return t.prototype.getGeometryForFeatureRow=function(t){return this.getGeometry(t.id)},t.prototype.getGeometry=function(t){var e=this.geometryCache[t];if(e){var n=this.accessHistory.indexOf(t);n>-1&&this.accessHistory.splice(n,1),this.accessHistory.push(t)}return e},t.prototype.setGeometry=function(t,e){var n=this.accessHistory.indexOf(t);if(n>-1&&this.accessHistory.splice(n,1),this.geometryCache[t]=e,this.accessHistory.push(t),Object.keys(this.geometryCache).length>this.cacheSize){var r=this.accessHistory.shift();r&&delete this.geometryCache[r]}},t.prototype.remove=function(t){var e=this.geometryCache[t];if(delete this.geometryCache[t],e){var n=this.accessHistory.indexOf(t);n>-1&&this.accessHistory.splice(n,1)}return e},t.prototype.clear=function(){this.geometryCache={},this.accessHistory=[]},t.prototype.resize=function(t){this.cacheSize=t;var e=Object.keys(this.geometryCache);if(e.length>t)for(var n=e.length-t,r=0;r0&&i[i.length-1])||6!==o[0]&&2!==o[0])){a=0;continue}if(3===o[0]&&(!i||o[1]>i[0]&&o[1]=t.length&&(t=void 0),{value:t&&t[r++],done:!t}}};throw new TypeError(e?"Object is not iterable.":"Symbol.iterator is not defined.")},s=this&&this.__importDefault||function(t){return t&&t.__esModule?t:{default:t}};Object.defineProperty(e,"__esModule",{value:!0}),e.FeatureTiles=void 0;var u=s(n(7383)),l=s(n(3809)),c=s(n(6479)),h=n(3684),f=n(2527),p=n(8600),d=n(943),y=n(4538),m=n(9957),g=n(5211),_=n(6536),b=n(3437),v=n(5604),T=n(1375),E=function(){function t(t,e,n){void 0===e&&(e=256),void 0===n&&(n=256),this.featureDao=t,this.tileWidth=e,this.tileHeight=n,this.projection=null,this.webMercatorProjection=null,this.simplifyGeometries=!0,this.simplifyToleranceInPixels=1,this.compressFormat="png",this.pointRadius=4,this.pointPaint=new g.Paint,this.pointIcon=null,this.linePaint=new g.Paint,this._lineStrokeWidth=2,this.polygonPaint=new g.Paint,this._polygonStrokeWidth=2,this.fillPolygon=!0,this.polygonFillPaint=new g.Paint,this.featurePaintCache=new m.FeaturePaintCache,this.geometryCache=new d.GeometryCache,this.cacheGeometries=!0,this.iconCache=new p.IconCache,this._scale=1,this.maxFeaturesPerTile=null,this.maxFeaturesTileDraw=null,this.projection=this.featureDao.projection,this.linePaint.strokeWidth=2,this.polygonPaint.strokeWidth=2,this.polygonFillPaint.color="#00000011",this.geoPackage=this.featureDao.geoPackage,null!=this.geoPackage&&(this.featureTableStyles=new _.FeatureTableStyles(this.geoPackage,t.table),this.featureTableStyles.has()||(this.featureTableStyles=null)),this.webMercatorProjection=v.Projection.getWebMercatorToWGS84Converter(),this.calculateDrawOverlap()}return t.prototype.cleanup=function(){this.clearIconCache(),this.pointIcon&&(b.Canvas.disposeImage(this.pointIcon.getIcon()),this.pointIcon=null)},Object.defineProperty(t.prototype,"drawOverlap",{set:function(t){this.widthDrawOverlap=t,this.heightDrawOverlap=t},enumerable:!1,configurable:!0}),Object.defineProperty(t.prototype,"simplifyTolerance",{get:function(){return this.simplifyToleranceInPixels},set:function(t){this.simplifyToleranceInPixels=t},enumerable:!1,configurable:!0}),Object.defineProperty(t.prototype,"widthDrawOverlap",{get:function(){return this.widthOverlap},set:function(t){this.widthOverlap=t},enumerable:!1,configurable:!0}),Object.defineProperty(t.prototype,"heightDrawOverlap",{get:function(){return this.heightOverlap},set:function(t){this.heightOverlap=t},enumerable:!1,configurable:!0}),t.prototype.ignoreFeatureTableStyles=function(){this.featureTableStyles=null,this.calculateDrawOverlap()},t.prototype.clearCache=function(){this.clearStylePaintCache(),this.clearIconCache()},t.prototype.clearStylePaintCache=function(){this.featurePaintCache.clear()},Object.defineProperty(t.prototype,"stylePaintCacheSize",{set:function(t){this.featurePaintCache.resize(t)},enumerable:!1,configurable:!0}),t.prototype.clearIconCache=function(){this.iconCache.clear()},Object.defineProperty(t.prototype,"iconCacheSize",{set:function(t){this.iconCache.resize(t)},enumerable:!1,configurable:!0}),Object.defineProperty(t.prototype,"scale",{get:function(){return this._scale},set:function(t){this._scale=t,this.linePaint.strokeWidth=t*this.lineStrokeWidth,this.polygonPaint.strokeWidth=t*this.polygonStrokeWidth,this.featurePaintCache.clear()},enumerable:!1,configurable:!0}),Object.defineProperty(t.prototype,"geometryCacheMaxSize",{set:function(t){this.geometryCache.resize(t)},enumerable:!1,configurable:!0}),t.prototype.calculateDrawOverlap=function(){this.pointIcon?(this.heightOverlap=this.scale*this.pointIcon.getHeight(),this.widthOverlap=this.scale*this.pointIcon.getWidth()):(this.heightOverlap=this.scale*this.pointRadius,this.widthOverlap=this.scale*this.pointRadius);var t=this.scale*this.lineStrokeWidth/2;this.heightOverlap=Math.max(this.heightOverlap,t),this.widthOverlap=Math.max(this.widthOverlap,t);var e=this.scale*this.polygonStrokeWidth/2;if(this.heightOverlap=Math.max(this.heightOverlap,e),this.widthOverlap=Math.max(this.widthOverlap,e),null!=this.featureTableStyles&&this.featureTableStyles.has()){var n=[],r=this.featureTableStyles.getAllTableStyleIds();null!=r&&(n=n.concat(r));var i=this.featureTableStyles.getAllStyleIds();null!=i&&(n=n.concat(i.filter((function(t){return-1===n.indexOf(t)}))));for(var o=this.featureTableStyles.getStyleDao(),a=0;a0))return[3,16];if(!(null==this.maxFeaturesPerTile||g<=this.maxFeaturesPerTile))return[3,13];_=this.getTransformFunction(s),v=this.featureDao.fastQueryBoundingBox(d,s),o.label=2;case 2:o.trys.push([2,9,10,11]),E=a(v),w=E.next(),o.label=3;case 3:if(w.done)return[3,8];if(null==(x=w.value).geometry)return[3,7];C=null,this.cacheGeometries&&(C=this.geometryCache.getGeometry(x.id)),null==C&&(C=x.geometry.geometry.toGeoJSON(),this.geometryCache.setGeometry(x.id,C)),M=this.getFeatureStyle(x),o.label=4;case 4:return o.trys.push([4,6,,7]),[4,this.drawGeometry(C,l,p,M,_)];case 5:return o.sent(),[3,7];case 6:return o.sent(),r.error("Failed to draw feature in tile. Id: "+x.id+", Table: "+this.featureDao.table_name),[3,7];case 7:return w=E.next(),[3,3];case 8:return[3,11];case 9:return S=o.sent(),N={error:S},[3,11];case 10:try{w&&!w.done&&(O=E.return)&&O.call(E)}finally{if(N)throw N.error}return[7];case 11:return[4,b.Canvas.toDataURL(i,"image/"+this.compressFormat)];case 12:return f=o.sent(),[3,15];case 13:return null==this.maxFeaturesTileDraw?[3,15]:[4,this.maxFeaturesTileDraw.drawTile(y,m,g.toString(),i)];case 14:f=o.sent(),o.label=15;case 15:return[3,18];case 16:return[4,b.Canvas.toDataURL(i,"image/"+this.compressFormat)];case 17:f=o.sent(),o.label=18;case 18:return c&&b.Canvas.disposeCanvas(i),[2,f]}}))}))},t.prototype.drawTileWithBoundingBox=function(t,e,n,s){return i(this,void 0,void 0,(function(){var e,i,u,l,c,h,f,p,d,y,m,g,_,v,T,E,w,x;return o(this,(function(o){switch(o.label){case 0:return e=this.tileWidth,i=this.tileHeight,l=!1,[4,b.Canvas.initializeAdapter()];case 1:o.sent(),null!=s?u=s:(u=b.Canvas.create(e,i),l=!0),(c=u.getContext("2d")).clearRect(0,0,e,i),h=this.featureDao,f=h.queryForEach(void 0,void 0,void 0,void 0,void 0,[h.table.getIdColumn().getName(),h.table.getGeometryColumn().getName()]),p=this.getTransformFunction(n),o.label=2;case 2:o.trys.push([2,9,10,11]),d=a(f),y=d.next(),o.label=3;case 3:if(y.done)return[3,8];if(m=y.value,null==(g=h.getRow(m)).geometry)return[3,7];if(_=null,this.cacheGeometries&&(_=this.geometryCache.getGeometryForFeatureRow(g)),null==_&&(_=g.geometry.geometry.toGeoJSON(),this.geometryCache.setGeometry(g.id,_)),null==_)return[3,7];v=this.getFeatureStyle(g),o.label=4;case 4:return o.trys.push([4,6,,7]),[4,this.drawGeometry(_,c,t,v,p)];case 5:return o.sent(),[3,7];case 6:return o.sent(),r.error("Failed to draw feature in tile. Id: "+g.id+", Table: "+this.featureDao.table_name),[3,7];case 7:return y=d.next(),[3,3];case 8:return[3,11];case 9:return T=o.sent(),w={error:T},[3,11];case 10:try{y&&!y.done&&(x=d.return)&&x.call(d)}finally{if(w)throw w.error}return[7];case 11:return[4,b.Canvas.toDataURL(u,"image/"+this.compressFormat)];case 12:return E=o.sent(),l&&b.Canvas.disposeCanvas(u),[2,E]}}))}))},t.prototype.drawPoint=function(t,e,n,r,a){return i(this,void 0,void 0,(function(){var i,s,u,l,c,f,p,d,y,m,g,_,b,v;return o(this,(function(o){switch(o.label){case 0:return c=a(t.coordinates),f=h.TileBoundingBoxUtils.getXPixel(this.tileWidth,n,c[0]),p=h.TileBoundingBoxUtils.getYPixel(this.tileHeight,n,c[1]),null!=r&&r.useIcon()?(d=r.icon,[4,this.iconCache.createIcon(d)]):[3,2];case 1:return y=o.sent(),i=Math.round(this.scale*y.width),s=Math.round(this.scale*y.height),f>=0-i&&f<=this.tileWidth+i&&p>=0-s&&p<=this.tileHeight+s&&(u=Math.round(f-d.anchorUOrDefault*i),l=Math.round(p-d.anchorVOrDefault*s),e.drawImage(y.image,u,l,i,s)),[3,3];case 2:if(null!=this.pointIcon){if(i=Math.round(this.scale*this.pointIcon.getWidth()),s=Math.round(this.scale*this.pointIcon.getHeight()),f>=0-i&&f<=this.tileWidth+i&&p>=0-s&&p<=this.tileHeight+s){u=Math.round(f-this.scale*this.pointIcon.getXOffset()),l=Math.round(p-this.scale*this.pointIcon.getYOffset());try{e.drawImage(this.pointIcon.getIcon().image,u,l,i,s)}catch(t){}}}else e.save(),m=null,null!=r&&null!=(g=r.style)&&(m=this.scale*(g.getWidthOrDefault()/2)),null==m&&(m=this.scale*this.pointRadius),_=this.getPointPaint(r),f>=0-m&&f<=this.tileWidth+m&&p>=0-m&&p<=this.tileHeight+m&&(b=Math.round(f),v=Math.round(p),e.beginPath(),e.arc(b,v,m,0,2*Math.PI,!0),e.closePath(),e.fillStyle=_.colorRGBA,e.fill()),e.restore();o.label=3;case 3:return[2]}}))}))},t.prototype.simplifyPoints=function(t,e){return void 0===e&&(e=!1),(0,c.default)(t.map((function(t){return{x:t[0],y:t[1]}})),this.simplifyToleranceInPixels,!1).map((function(t){return[t.x,t.y]}))},t.prototype.getPath=function(t,e,n,r,i){var o=this;void 0===r&&(r=!1);var a=t.coordinates.map((function(t){var e=i(t.slice());return[h.TileBoundingBoxUtils.getXPixel(o.tileWidth,n,e[0]),h.TileBoundingBoxUtils.getYPixel(o.tileHeight,n,e[1])]})),s=this.simplifyGeometries?this.simplifyPoints(a,r):a;if(s.length>1){e.moveTo(s[0][0],s[0][1]);for(var u=1;u{"use strict";Object.defineProperty(e,"__esModule",{value:!0}),e.Paint=void 0;var n=function(){function t(){this._color="#000000FF",this._strokeWidth=1}return Object.defineProperty(t.prototype,"color",{get:function(){return this._color},set:function(t){this._color=t},enumerable:!1,configurable:!0}),Object.defineProperty(t.prototype,"colorRGBA",{get:function(){var t=parseInt(this.color.substr(1,2),16),e=parseInt(this.color.substr(3,2),16),n=parseInt(this.color.substr(5,2),16),r=1;return this.color.length>7&&(r=parseInt(this.color.substr(7,2),16)/255),"rgba("+t+","+e+","+n+","+r+")"},enumerable:!1,configurable:!0}),Object.defineProperty(t.prototype,"strokeWidth",{get:function(){return this._strokeWidth},set:function(t){this._strokeWidth=t},enumerable:!1,configurable:!0}),t}();e.Paint=n},9325:function(t,e,n){"use strict";var r=n(5108),i=this&&this.__awaiter||function(t,e,n,r){return new(n||(n=Promise))((function(i,o){function a(t){try{u(r.next(t))}catch(t){o(t)}}function s(t){try{u(r.throw(t))}catch(t){o(t)}}function u(t){var e;t.done?i(t.value):(e=t.value,e instanceof n?e:new n((function(t){t(e)}))).then(a,s)}u((r=r.apply(t,e||[])).next())}))},o=this&&this.__generator||function(t,e){var n,r,i,o,a={label:0,sent:function(){if(1&i[0])throw i[1];return i[1]},trys:[],ops:[]};return o={next:s(0),throw:s(1),return:s(2)},"function"==typeof Symbol&&(o[Symbol.iterator]=function(){return this}),o;function s(o){return function(s){return function(o){if(n)throw new TypeError("Generator is already executing.");for(;a;)try{if(n=1,r&&(i=2&o[0]?r.return:o[0]?r.throw||((i=r.return)&&i.call(r),0):r.next)&&!(i=i.call(r,o[1])).done)return i;switch(r=0,i&&(o=[2&o[0],i.value]),o[0]){case 0:case 1:i=o;break;case 4:return a.label++,{value:o[1],done:!1};case 5:a.label++,r=o[1],o=[0];continue;case 7:o=a.ops.pop(),a.trys.pop();continue;default:if(!((i=(i=a.trys).length>0&&i[i.length-1])||6!==o[0]&&2!==o[0])){a=0;continue}if(3===o[0]&&(!i||o[1]>i[0]&&o[1]{"use strict";Object.defineProperty(e,"__esModule",{value:!0}),e.TileMatrix=void 0;var n=function(){function t(){}return Object.defineProperty(t.prototype,"contents",{set:function(t){t&&"tiles"===t.data_type&&(this.table_name=t.table_name)},enumerable:!1,configurable:!0}),t.TABLE_NAME="tableName",t.ZOOM_LEVEL="zoomLevel",t.MATRIX_WIDTH="matrixWidth",t.MATRIX_HEIGHT="matrixHeight",t.TILE_WIDTH="tileWidth",t.TILE_HEIGHT="tileHeight",t.PIXEL_X_SIZE="pixelXSize",t.PIXEL_Y_SIZE="pixelYSize",t}();e.TileMatrix=n},3506:function(t,e,n){"use strict";var r,i=this&&this.__extends||(r=function(t,e){return r=Object.setPrototypeOf||{__proto__:[]}instanceof Array&&function(t,e){t.__proto__=e}||function(t,e){for(var n in e)Object.prototype.hasOwnProperty.call(e,n)&&(t[n]=e[n])},r(t,e)},function(t,e){if("function"!=typeof e&&null!==e)throw new TypeError("Class extends value "+String(e)+" is not a constructor or null");function n(){this.constructor=t}r(t,e),t.prototype=null===e?Object.create(e):(n.prototype=e.prototype,new n)});Object.defineProperty(e,"__esModule",{value:!0}),e.TileMatrixDao=void 0;var o=n(4115),a=n(1938),s=n(8877),u=n(8334),l=function(t){function e(){var n=null!==t&&t.apply(this,arguments)||this;return n.gpkgTableName="gpkg_tile_matrix",n.idColumns=[e.COLUMN_PK1,e.COLUMN_PK2],n.columns=[e.COLUMN_TABLE_NAME,e.COLUMN_ZOOM_LEVEL,e.COLUMN_MATRIX_WIDTH,e.COLUMN_MATRIX_HEIGHT,e.COLUMN_TILE_WIDTH,e.COLUMN_TILE_HEIGHT,e.COLUMN_PIXEL_X_SIZE,e.COLUMN_PIXEL_Y_SIZE],n}return i(e,t),e.prototype.createObject=function(t){var e=new a.TileMatrix;return t&&(e.table_name=t.table_name,e.zoom_level=t.zoom_level,e.matrix_width=t.matrix_width,e.matrix_height=t.matrix_height,e.tile_width=t.tile_width,e.tile_height=t.tile_height,e.pixel_x_size=t.pixel_x_size,e.pixel_y_size=t.pixel_y_size),e},e.prototype.getContents=function(t){return this.geoPackage.contentsDao.queryForId(t.table_name)},e.prototype.getTileMatrixSet=function(t){return this.geoPackage.tileMatrixSetDao.queryForId(t.table_name)},e.prototype.tileCount=function(t){var e=this.buildWhereWithFieldAndValue(u.TileColumn.COLUMN_ZOOM_LEVEL,t.zoom_level),n=this.buildWhereArgs([t.zoom_level]),r=s.SqliteQueryBuilder.buildCount("'"+t.table_name+"'",e),i=this.connection.get(r,n);return null==i?void 0:i.count},e.prototype.hasTiles=function(t){var e=this.buildWhereWithFieldAndValue(u.TileColumn.COLUMN_ZOOM_LEVEL,t.zoom_level),n=this.buildWhereArgs([t.zoom_level]),r=s.SqliteQueryBuilder.buildQuery(!1,"'"+t.table_name+"'",void 0,e);return null!=this.connection.get(r,n)},e.TABLE_NAME="gpkg_tile_matrix",e.COLUMN_PK1="table_name",e.COLUMN_PK2="zoom_level",e.COLUMN_TABLE_NAME="table_name",e.COLUMN_ZOOM_LEVEL="zoom_level",e.COLUMN_MATRIX_WIDTH="matrix_width",e.COLUMN_MATRIX_HEIGHT="matrix_height",e.COLUMN_TILE_WIDTH="tile_width",e.COLUMN_TILE_HEIGHT="tile_height",e.COLUMN_PIXEL_X_SIZE="pixel_x_size",e.COLUMN_PIXEL_Y_SIZE="pixel_y_size",e}(o.Dao);e.TileMatrixDao=l},5899:(t,e,n)=>{"use strict";Object.defineProperty(e,"__esModule",{value:!0}),e.TileMatrixSet=void 0;var r=n(2527),i=function(){function t(){}return Object.defineProperty(t.prototype,"boundingBox",{get:function(){return new r.BoundingBox(this.min_x,this.max_x,this.min_y,this.max_y)},set:function(t){this.min_x=t.minLongitude,this.max_x=t.maxLongitude,this.min_y=t.minLatitude,this.max_y=t.maxLatitude},enumerable:!1,configurable:!0}),Object.defineProperty(t.prototype,"contents",{set:function(t){t&&"tiles"===t.data_type&&(this.table_name=t.table_name)},enumerable:!1,configurable:!0}),t.TABLE_NAME="tableName",t.MIN_X="minX",t.MIN_Y="minY",t.MAX_X="maxX",t.MAX_Y="maxY",t.SRS_ID="srsId",t}();e.TileMatrixSet=i},5925:function(t,e,n){"use strict";var r,i=this&&this.__extends||(r=function(t,e){return r=Object.setPrototypeOf||{__proto__:[]}instanceof Array&&function(t,e){t.__proto__=e}||function(t,e){for(var n in e)Object.prototype.hasOwnProperty.call(e,n)&&(t[n]=e[n])},r(t,e)},function(t,e){if("function"!=typeof e&&null!==e)throw new TypeError("Class extends value "+String(e)+" is not a constructor or null");function n(){this.constructor=t}r(t,e),t.prototype=null===e?Object.create(e):(n.prototype=e.prototype,new n)}),o=this&&this.__values||function(t){var e="function"==typeof Symbol&&Symbol.iterator,n=e&&t[e],r=0;if(n)return n.call(t);if(t&&"number"==typeof t.length)return{next:function(){return t&&r>=t.length&&(t=void 0),{value:t&&t[r++],done:!t}}};throw new TypeError(e?"Object is not iterable.":"Symbol.iterator is not defined.")};Object.defineProperty(e,"__esModule",{value:!0}),e.TileMatrixSetDao=void 0;var a=n(4115),s=n(5899),u=function(t){function e(n){var r=t.call(this,n)||this;return r.gpkgTableName="gpkg_tile_matrix_set",r.idColumns=[e.COLUMN_PK],r.columns=[e.COLUMN_TABLE_NAME,e.COLUMN_SRS_ID,e.COLUMN_MIN_X,e.COLUMN_MIN_Y,e.COLUMN_MAX_X,e.COLUMN_MAX_Y],r.columnToPropertyMap={},r.columnToPropertyMap[e.COLUMN_TABLE_NAME]=s.TileMatrixSet.TABLE_NAME,r.columnToPropertyMap[e.COLUMN_SRS_ID]=s.TileMatrixSet.SRS_ID,r.columnToPropertyMap[e.COLUMN_MIN_X]=s.TileMatrixSet.MIN_X,r.columnToPropertyMap[e.COLUMN_MIN_Y]=s.TileMatrixSet.MIN_Y,r.columnToPropertyMap[e.COLUMN_MAX_X]=s.TileMatrixSet.MAX_X,r.columnToPropertyMap[e.COLUMN_MAX_Y]=s.TileMatrixSet.MAX_Y,r}return i(e,t),e.prototype.createObject=function(t){var e=new s.TileMatrixSet;return t&&(e.table_name=t.table_name,e.srs_id=t.srs_id,e.min_y=t.min_y,e.min_x=t.min_x,e.max_y=t.max_y,e.max_x=t.max_x),e},e.prototype.getTileTables=function(){var t,n,r=[];try{for(var i=o(this.connection.each("select "+e.COLUMN_TABLE_NAME+" from "+e.TABLE_NAME)),a=i.next();!a.done;a=i.next()){var s=a.value;r.push(s[e.COLUMN_TABLE_NAME])}}catch(e){t={error:e}}finally{try{a&&!a.done&&(n=i.return)&&n.call(i)}finally{if(t)throw t.error}}return r},e.prototype.getProjection=function(t){var e=this.getSrs(t);if(e)return this.geoPackage.spatialReferenceSystemDao.getProjection(e)},e.prototype.getSrs=function(t){return this.geoPackage.spatialReferenceSystemDao.queryForId(t.srs_id)},e.prototype.getContents=function(t){return this.geoPackage.contentsDao.queryForId(t.table_name)},e.TABLE_NAME="gpkg_tile_matrix_set",e.COLUMN_PK="table_name",e.COLUMN_TABLE_NAME="table_name",e.COLUMN_SRS_ID="srs_id",e.COLUMN_MIN_X="min_x",e.COLUMN_MIN_Y="min_y",e.COLUMN_MAX_X="max_x",e.COLUMN_MAX_Y="max_y",e}(a.Dao);e.TileMatrixSetDao=u},731:function(t,e,n){"use strict";var r=this&&this.__awaiter||function(t,e,n,r){return new(n||(n=Promise))((function(i,o){function a(t){try{u(r.next(t))}catch(t){o(t)}}function s(t){try{u(r.throw(t))}catch(t){o(t)}}function u(t){var e;t.done?i(t.value):(e=t.value,e instanceof n?e:new n((function(t){t(e)}))).then(a,s)}u((r=r.apply(t,e||[])).next())}))},i=this&&this.__generator||function(t,e){var n,r,i,o,a={label:0,sent:function(){if(1&i[0])throw i[1];return i[1]},trys:[],ops:[]};return o={next:s(0),throw:s(1),return:s(2)},"function"==typeof Symbol&&(o[Symbol.iterator]=function(){return this}),o;function s(o){return function(s){return function(o){if(n)throw new TypeError("Generator is already executing.");for(;a;)try{if(n=1,r&&(i=2&o[0]?r.return:o[0]?r.throw||((i=r.return)&&i.call(r),0):r.next)&&!(i=i.call(r,o[1])).done)return i;switch(r=0,i&&(o=[2&o[0],i.value]),o[0]){case 0:case 1:i=o;break;case 4:return a.label++,{value:o[1],done:!1};case 5:a.label++,r=o[1],o=[0];continue;case 7:o=a.ops.pop(),a.trys.pop();continue;default:if(!((i=(i=a.trys).length>0&&i[i.length-1])||6!==o[0]&&2!==o[0])){a=0;continue}if(3===o[0]&&(!i||o[1]>i[0]&&o[1]=t.length&&(t=void 0),{value:t&&t[r++],done:!t}}};throw new TypeError(e?"Object is not iterable.":"Symbol.iterator is not defined.")};Object.defineProperty(e,"__esModule",{value:!0}),e.GeoPackageTileRetriever=void 0;var a=n(3684),s=n(7977),u=n(2777),l=n(5604),c=n(1375),h=function(){function t(t,e,n){this.tileDao=t,this.tileDao.adjustTileMatrixLengths(),this.width=e,this.height=n,this.scaling=null}return t.prototype.setScaling=function(t){this.scaling=t},t.prototype.getWebMercatorBoundingBox=function(){return null==this.setWebMercatorBoundingBox&&(this.setWebMercatorBoundingBox=this.tileDao.tileMatrixSet.boundingBox.projectBoundingBox(this.tileDao.projection,c.ProjectionConstants.EPSG_3857)),this.setWebMercatorBoundingBox},t.prototype.hasTile=function(t,e,n){var r=!1;if(t>=0&&e>=0&&n>=0){var i=a.TileBoundingBoxUtils.getWebMercatorBoundingBoxFromXYZ(t,e,n);r=this.hasTileForBoundingBox(i,c.ProjectionConstants.EPSG_3857)}return r},t.prototype.hasTileForBoundingBox=function(t,e){for(var n=t.projectBoundingBox(e,this.tileDao.projection),r=this.getTileMatrices(n),i=!1,o=0;!i&&o0}return i},t.prototype.getTile=function(t,e,n){return r(this,void 0,void 0,(function(){var r;return i(this,(function(i){return r=a.TileBoundingBoxUtils.getWebMercatorBoundingBoxFromXYZ(t,e,n),[2,this.getTileWithBounds(r,c.ProjectionConstants.EPSG_3857)]}))}))},t.prototype.getWebMercatorTile=function(t,e,n){return r(this,void 0,void 0,(function(){var r;return i(this,(function(i){return r=a.TileBoundingBoxUtils.getWebMercatorBoundingBoxFromXYZ(t,e,n),[2,this.getTileWithBounds(r,c.ProjectionConstants.EPSG_3857)]}))}))},t.prototype.drawTileIn=function(t,e,n,o){return r(this,void 0,void 0,(function(){var r;return i(this,(function(i){return r=a.TileBoundingBoxUtils.getWebMercatorBoundingBoxFromXYZ(t,e,n),[2,this.getTileWithBounds(r,c.ProjectionConstants.EPSG_3857,o)]}))}))},t.prototype.getTileWithWgs84Bounds=function(t,e){return r(this,void 0,void 0,(function(){var n;return i(this,(function(r){return n=t.projectBoundingBox(c.ProjectionConstants.EPSG_4326,c.ProjectionConstants.EPSG_3857),[2,this.getTileWithBounds(n,c.ProjectionConstants.EPSG_3857,e)]}))}))},t.prototype.getTileWithWgs84BoundsInProjection=function(t,e,n,o){return r(this,void 0,void 0,(function(){var e;return i(this,(function(r){return e=t.projectBoundingBox(c.ProjectionConstants.EPSG_4326,n),[2,this.getTileWithBounds(e,n,o)]}))}))},t.prototype.getTileWithBounds=function(t,e,n){return r(this,void 0,void 0,(function(){var r,u,c,h,f,p,d,y,m,g,_,b,v,T,E,w,x,C,M,S,N;return i(this,(function(i){switch(i.label){case 0:if(null==(r=l.Projection.hasProjection(e)))throw new Error("Projection "+e+" is not loaded.");u=t.projectBoundingBox(e,this.tileDao.projection),c=this.getTileMatrices(u),h=!1,f=null,p=0,i.label=1;case 1:return!h&&p=p;h--)f.push(h)}if(0==l.length)s=f;else if(0==f.length)s=l;else{var d=this.scaling.scaling_type;switch(d){case u.TileScalingType.IN:case u.TileScalingType.IN_OUT:s=l.concat(f);break;case u.TileScalingType.OUT:case u.TileScalingType.OUT_IN:s=f.concat(l);break;case u.TileScalingType.CLOSEST_IN_OUT:case u.TileScalingType.CLOSEST_OUT_IN:var y=void 0,m=void 0;d==u.TileScalingType.CLOSEST_IN_OUT?(y=l,m=f):(y=f,m=l),s=[];for(var g=Math.max(y.length,m.length),_=0;_{"use strict";Object.defineProperty(e,"__esModule",{value:!0}),e.TileBoundingBoxUtils=void 0;var r=n(1375),i=n(7218),o=n(2527),a=function(){function t(){}return t.webMercatorTileBox=function(e,n){var i=t.tilesPerSideWithZoom(n),a=t.tileSizeWithTilesPerSide(i),s=Math.max(-r.ProjectionConstants.WEB_MERCATOR_HALF_WORLD_WIDTH,e.minLongitude),u=Math.min(r.ProjectionConstants.WEB_MERCATOR_HALF_WORLD_WIDTH,e.maxLongitude),l=Math.max(-r.ProjectionConstants.WEB_MERCATOR_HALF_WORLD_WIDTH,e.minLatitude),c=Math.min(r.ProjectionConstants.WEB_MERCATOR_HALF_WORLD_WIDTH,e.maxLatitude),h=Math.floor((s+r.ProjectionConstants.WEB_MERCATOR_HALF_WORLD_WIDTH)/a),f=Math.max(0,Math.ceil((u+r.ProjectionConstants.WEB_MERCATOR_HALF_WORLD_WIDTH)/a)-1),p=Math.floor((r.ProjectionConstants.WEB_MERCATOR_HALF_WORLD_WIDTH-c)/a),d=Math.max(0,Math.ceil((r.ProjectionConstants.WEB_MERCATOR_HALF_WORLD_WIDTH-l)/a)-1);return new o.BoundingBox(h,f,p,d)},t.wgs84TileBox=function(e,n){var i=t.tilesPerWGS84LatSide(n),a=t.tilesPerWGS84LonSide(n),s=t.tileSizeLatPerWGS84Side(i),u=t.tileSizeLonPerWGS84Side(a),l=Math.max(-r.ProjectionConstants.WGS84_HALF_WORLD_LON_WIDTH,e.minLongitude),c=Math.min(r.ProjectionConstants.WGS84_HALF_WORLD_LON_WIDTH,e.maxLongitude),h=Math.max(-r.ProjectionConstants.WGS84_HALF_WORLD_LAT_HEIGHT,e.minLatitude),f=Math.min(r.ProjectionConstants.WGS84_HALF_WORLD_LAT_HEIGHT,e.maxLatitude),p=Math.floor((l+r.ProjectionConstants.WGS84_HALF_WORLD_LON_WIDTH)/u),d=Math.max(0,Math.ceil((c+r.ProjectionConstants.WGS84_HALF_WORLD_LON_WIDTH)/u)-1),y=Math.floor((r.ProjectionConstants.WGS84_HALF_WORLD_LAT_HEIGHT-f)/s),m=Math.max(0,Math.ceil((r.ProjectionConstants.WGS84_HALF_WORLD_LAT_HEIGHT-h)/s)-1);return new o.BoundingBox(p,d,y,m)},t.determinePositionAndScale=function(t,e,n,r,i,o){var a={},s=r.maxLongitude-r.minLongitude,u=(t.minLongitude-r.minLongitude)/s,l=r.maxLatitude-r.minLatitude,c=(r.maxLatitude-t.maxLatitude)/l,h=o/s,f=(t.maxLongitude-t.minLongitude)*h,p=i/l,d=(t.maxLatitude-t.minLatitude)*p;return a.yPositionInFinalTileStart=c*i,a.xPositionInFinalTileStart=u*o,a.dx=a.xPositionInFinalTileStart,a.dy=a.yPositionInFinalTileStart,a.sx=0,a.sy=0,a.dWidth=f,a.dHeight=d,a.sWidth=n,a.sHeight=e,a},t.getWebMercatorBoundingBoxFromXYZ=function(e,n,i,a){for(var s=t.tilesPerSideWithZoom(i),u=t.tileSizeWithTilesPerSide(s);e<0;)e+=s;for(;e>=s;)e-=s;var l=0;if(a&&a.buffer&&a.tileSize){var c=a.buffer;l=u/a.tileSize*c}var h=-1*r.ProjectionConstants.WEB_MERCATOR_HALF_WORLD_WIDTH+e*u-l,f=-1*r.ProjectionConstants.WEB_MERCATOR_HALF_WORLD_WIDTH+(e+1)*u+l,p=r.ProjectionConstants.WEB_MERCATOR_HALF_WORLD_WIDTH-(n+1)*u-l,d=r.ProjectionConstants.WEB_MERCATOR_HALF_WORLD_WIDTH-n*u+l;return h=Math.max(-1*r.ProjectionConstants.WEB_MERCATOR_HALF_WORLD_WIDTH,h),f=Math.min(r.ProjectionConstants.WEB_MERCATOR_HALF_WORLD_WIDTH,f),p=Math.max(-1*r.ProjectionConstants.WEB_MERCATOR_HALF_WORLD_WIDTH,p),d=Math.min(r.ProjectionConstants.WEB_MERCATOR_HALF_WORLD_WIDTH,d),new o.BoundingBox(h,f,p,d)},t.getWGS84BoundingBoxFromXYZ=function(e,n,i){var a=t.tilesPerWGS84LatSide(i),s=t.tilesPerWGS84LonSide(i),u=t.tileSizeLatPerWGS84Side(a),l=t.tileSizeLonPerWGS84Side(s),c=-1*r.ProjectionConstants.WGS84_HALF_WORLD_LON_WIDTH+e*l,h=-1*r.ProjectionConstants.WGS84_HALF_WORLD_LON_WIDTH+(e+1)*l,f=r.ProjectionConstants.WGS84_HALF_WORLD_LAT_HEIGHT-(n+1)*u,p=r.ProjectionConstants.WGS84_HALF_WORLD_LAT_HEIGHT-n*u;return new o.BoundingBox(c,h,f,p)},t.tileSizeWithTilesPerSide=function(t){return 2*r.ProjectionConstants.WEB_MERCATOR_HALF_WORLD_WIDTH/t},t.intersects=function(e,n){return null!=t.intersection(e,n)},t.intersection=function(t,e){var n=Math.max(t.minLongitude,e.minLongitude),r=Math.max(t.minLatitude,e.minLatitude),i=Math.min(t.maxLongitude,e.maxLongitude),a=Math.min(t.maxLatitude,e.maxLatitude);return n>i||r>a?null:new o.BoundingBox(n,i,r,a)},t.tilesPerSideWithZoom=function(t){return 1<=0&&(a<0&&(a=0),s>=n&&(s=n-1));var u=t.getRowWithTotalBoundingBox(e,r,o.minLatitude),l=t.getRowWithTotalBoundingBox(e,r,o.maxLatitude);return l=0&&(l<0&&(l=0),u>=r&&(u=r-1)),new i.TileGrid(a,s,l,u)},t.getTileColumnWithTotalBoundingBox=function(t,e,n){var r=t.minLongitude,i=t.maxLongitude;return n=i?e:~~((n-r)/((i-r)/e))},t.getRowWithTotalBoundingBox=function(t,e,n){var r=t.minLatitude,i=t.maxLatitude;return n=i?-1:~~((i-n)/((i-r)/e))},t.getTileBoundingBox=function(t,e,n,r){var a=e.matrix_width,s=e.matrix_height,u=new i.TileGrid(n,n,r,r),l=t.minLongitude,c=(t.maxLongitude-l)/a,h=l+c*u.min_x,f=h+c*(u.max_x+1-u.min_x),p=t.minLatitude,d=t.maxLatitude,y=(d-p)/s,m=d-y*u.min_y,g=m-y*(u.max_y+1-u.min_y);return new o.BoundingBox(h,f,g,m)},t.getTileGridBoundingBox=function(t,e,n,r){var i=t.minLongitude,a=t.width/e,s=i+a*r.min_x,u=s+a*(r.max_x+1-r.min_x),l=t.maxLatitude,c=t.height/n,h=l-c*r.min_y,f=h-c*(r.max_y+1-r.min_y);return new o.BoundingBox(s,u,f,h)},t.getXPixel=function(t,e,n){return(n-e.minLongitude)/e.width*t},t.getLongitudeFromPixel=function(t,e,n,r){return r/t*n.width+e.minLongitude},t.getYPixel=function(t,e,n){return(e.maxLatitude-n)/e.height*t},t.getLatitudeFromPixel=function(t,e,n,r){return e.maxLatitude-r/t*n.height},t.tileSize=function(t){return 2*r.ProjectionConstants.WEB_MERCATOR_HALF_WORLD_WIDTH/t},t.zoomLevelOfTileSize=function(t){var e=2*r.ProjectionConstants.WEB_MERCATOR_HALF_WORLD_WIDTH/t;return Math.log(e)/Math.log(2)},t.tileWidthDegrees=function(t){return 360/t},t.prototype.statictileHeightDegrees=function(t){return 180/t},t.tilesPerSide=function(t){return Math.pow(2,t)},t.tileSizeWithZoom=function(t){var e=this.tilesPerSide(t);return this.tileSize(e)},t.toleranceDistance=function(t,e){return this.tileSizeWithZoom(t)/e},t.toleranceDistanceWidthAndHeight=function(t,e,n){return this.toleranceDistance(t,Math.max(e,n))},t.getFloatRoundedRectangle=function(e,n,r,i){var o=Math.round(t.getXPixel(e,r,i.minLongitude)),a=Math.round(t.getXPixel(e,r,i.maxLongitude)),s=Math.round(t.getYPixel(n,r,i.maxLatitude)),u=Math.round(t.getYPixel(n,r,i.minLatitude));return{left:o,right:a,bottom:u,top:s,isValid:o{"use strict";Object.defineProperty(e,"__esModule",{value:!0}),e.TileGrid=void 0;var n=function(){function t(t,e,n,r){this.min_x=t,this.max_x=e,this.min_y=n,this.max_y=r}return t.prototype.count=function(){return(this.max_x+1-this.min_x)*(this.max_y+1-this.min_y)},t.prototype.equals=function(t){return!!t&&this.min_x===t.min_x&&this.max_x===t.max_x&&this.min_y===t.min_y&&this.max_y===t.max_y},t}();e.TileGrid=n},8334:function(t,e,n){"use strict";var r,i=this&&this.__extends||(r=function(t,e){return r=Object.setPrototypeOf||{__proto__:[]}instanceof Array&&function(t,e){t.__proto__=e}||function(t,e){for(var n in e)Object.prototype.hasOwnProperty.call(e,n)&&(t[n]=e[n])},r(t,e)},function(t,e){if("function"!=typeof e&&null!==e)throw new TypeError("Class extends value "+String(e)+" is not a constructor or null");function n(){this.constructor=t}r(t,e),t.prototype=null===e?Object.create(e):(n.prototype=e.prototype,new n)});Object.defineProperty(e,"__esModule",{value:!0}),e.TileColumn=void 0;var o=n(5865),a=n(7319),s=n(5071),u=function(t){function e(e,n,r,i,o,a,s,u){return t.call(this,e,n,r,i,o,a,s,u)||this}return i(e,t),e.createIdColumn=function(t,n){return void 0===n&&(n=s.UserTableDefaults.DEFAULT_AUTOINCREMENT),new e(t,e.COLUMN_ID,a.GeoPackageDataType.INTEGER,null,!1,null,!0,n)},e.createZoomLevelColumn=function(t){return new e(t,e.COLUMN_ZOOM_LEVEL,a.GeoPackageDataType.INTEGER,null,!0,null,!1,!1)},e.createTileColumnColumn=function(t){return new e(t,e.COLUMN_TILE_COLUMN,a.GeoPackageDataType.INTEGER,null,!0,null,!1,!1)},e.createTileRowColumn=function(t){return new e(t,e.COLUMN_TILE_ROW,a.GeoPackageDataType.INTEGER,null,!0,null,!1,!1)},e.createTileDataColumn=function(t){return new e(t,e.COLUMN_TILE_DATA,a.GeoPackageDataType.BLOB,null,!0,null,!1,!1)},e.createColumn=function(t,n,r,i,o,a,s){return void 0===i&&(i=!1),new e(t,n,r,a,i,o,!1,s)},e.COLUMN_ID="id",e.COLUMN_ZOOM_LEVEL="zoom_level",e.COLUMN_TILE_COLUMN="tile_column",e.COLUMN_TILE_ROW="tile_row",e.COLUMN_TILE_DATA="tile_data",e}(o.UserColumn);e.TileColumn=u},6295:function(t,e,n){"use strict";var r,i=this&&this.__extends||(r=function(t,e){return r=Object.setPrototypeOf||{__proto__:[]}instanceof Array&&function(t,e){t.__proto__=e}||function(t,e){for(var n in e)Object.prototype.hasOwnProperty.call(e,n)&&(t[n]=e[n])},r(t,e)},function(t,e){if("function"!=typeof e&&null!==e)throw new TypeError("Class extends value "+String(e)+" is not a constructor or null");function n(){this.constructor=t}r(t,e),t.prototype=null===e?Object.create(e):(n.prototype=e.prototype,new n)});Object.defineProperty(e,"__esModule",{value:!0}),e.TileColumns=void 0;var o=n(7319),a=function(t){function e(e,n,r){var i=t.call(this,e,n,r)||this;return i.zoomLevelIndex=-1,i.tileColumnIndex=-1,i.tileRowIndex=-1,i.tileDataIndex=-1,i.updateColumns(),i}return i(e,t),e.prototype.copy=function(){var t=new e(this._tableName,this._columns,this._custom);return t.zoomLevelIndex=this.zoomLevelIndex,t.tileColumnIndex=this.tileColumnIndex,t.tileRowIndex=this.tileRowIndex,t.tileDataIndex=this.tileDataIndex,t},e.prototype.updateColumns=function(){t.prototype.updateColumns.call(this);var n=this.getColumnIndex(e.ZOOM_LEVEL,!1);this.isCustom()||this.missingCheck(n,e.ZOOM_LEVEL),null!==n&&(this.typeCheck(o.GeoPackageDataType.INTEGER,this.getColumnForIndex(n)),this.zoomLevelIndex=n);var r=this.getColumnIndex(e.TILE_COLUMN,!1);this.isCustom()||this.missingCheck(r,e.TILE_COLUMN),null!=r&&(this.typeCheck(o.GeoPackageDataType.INTEGER,this.getColumnForIndex(r)),this.tileColumnIndex=r);var i=this.getColumnIndex(e.TILE_ROW,!1);this.isCustom()||this.missingCheck(i,e.TILE_ROW),null!=i&&(this.typeCheck(o.GeoPackageDataType.INTEGER,this.getColumnForIndex(i)),this.tileRowIndex=i);var a=this.getColumnIndex(e.TILE_DATA,!1);this.isCustom()||this.missingCheck(a,e.TILE_DATA),null!=a&&(this.typeCheck(o.GeoPackageDataType.BLOB,this.getColumnForIndex(a)),this.tileDataIndex=a)},e.prototype.getZoomLevelIndex=function(){return this.zoomLevelIndex},e.prototype.setZoomLevelIndex=function(t){this.zoomLevelIndex=t},e.prototype.hasZoomLevelColumn=function(){return this.zoomLevelIndex>=0},e.prototype.getZoomLevelColumn=function(){var t=null;return this.hasZoomLevelColumn()&&(t=this.getColumnForIndex(this.zoomLevelIndex)),t},e.prototype.getTileColumnIndex=function(){return this.tileColumnIndex},e.prototype.setTileColumnIndex=function(t){this.tileColumnIndex=t},e.prototype.hasTileColumnColumn=function(){return this.tileColumnIndex>=0},e.prototype.getTileColumnColumn=function(){var t=null;return this.hasTileColumnColumn()&&(t=this.getColumnForIndex(this.tileColumnIndex)),t},e.prototype.getTileRowIndex=function(){return this.tileRowIndex},e.prototype.setTileRowIndex=function(t){this.tileRowIndex=t},e.prototype.hasTileRowColumn=function(){return this.tileRowIndex>=0},e.prototype.getTileRowColumn=function(){var t=null;return this.hasTileRowColumn()&&(t=this.getColumnForIndex(this.tileRowIndex)),t},e.prototype.getTileDataIndex=function(){return this.tileDataIndex},e.prototype.setTileDataIndex=function(t){this.tileDataIndex=t},e.prototype.hasTileDataColumn=function(){return this.tileDataIndex>=0},e.prototype.getTileDataColumn=function(){var t=null;return this.hasTileDataColumn()&&(t=this.getColumnForIndex(this.tileDataIndex)),t},e.ID="id",e.ZOOM_LEVEL="zoom_level",e.TILE_COLUMN="tile_column",e.TILE_ROW="tile_row",e.TILE_DATA="tile_data",e}(n(2114).UserColumns);e.TileColumns=a},1394:function(t,e,n){"use strict";var r,i=this&&this.__extends||(r=function(t,e){return r=Object.setPrototypeOf||{__proto__:[]}instanceof Array&&function(t,e){t.__proto__=e}||function(t,e){for(var n in e)Object.prototype.hasOwnProperty.call(e,n)&&(t[n]=e[n])},r(t,e)},function(t,e){if("function"!=typeof e&&null!==e)throw new TypeError("Class extends value "+String(e)+" is not a constructor or null");function n(){this.constructor=t}r(t,e),t.prototype=null===e?Object.create(e):(n.prototype=e.prototype,new n)}),o=this&&this.__values||function(t){var e="function"==typeof Symbol&&Symbol.iterator,n=e&&t[e],r=0;if(n)return n.call(t);if(t&&"number"==typeof t.length)return{next:function(){return t&&r>=t.length&&(t=void 0),{value:t&&t[r++],done:!t}}};throw new TypeError(e?"Object is not iterable.":"Symbol.iterator is not defined.")};Object.defineProperty(e,"__esModule",{value:!0}),e.TileDao=void 0;var a=n(4668),s=n(3506),u=n(5925),l=n(1332),c=n(8334),h=n(7218),f=n(8572),p=n(3684),d=n(2527),y=n(1584),m=n(5604),g=n(1375),_=function(t){function e(e,n,r,i){var o=t.call(this,e,n)||this;o.tileMatrixSet=r,o.tileMatrices=i,o.zoomLevelToTileMatrix=[],o.widths=[],o.heights=[],0===i.length?(o.minZoom=0,o.maxZoom=0):(o.minZoom=o.tileMatrices[0].zoom_level,o.maxZoom=o.tileMatrices[o.tileMatrices.length-1].zoom_level);for(var a=o.tileMatrices.length-1;a>=0;a--){var s=o.tileMatrices[a];o.zoomLevelToTileMatrix[s.zoom_level]=s}return o.initialize(),o}return i(e,t),e.prototype.initialize=function(){var t=this.geoPackage.tileMatrixSetDao;this.srs=t.getSrs(this.tileMatrixSet),this.projection=[this.srs.organization.toUpperCase(),this.srs.organization_coordsys_id].join(":"),m.Projection.loadProjection(this.projection,this.srs.definition);for(var e=this.tileMatrices.length-1;e>=0;e--){var n=this.tileMatrices[e],r=n.pixel_x_size*n.tile_width,i=n.pixel_y_size*n.tile_height,o=m.Projection.getConverter(this.projection);o.to_meter&&(r=o.to_meter*n.pixel_x_size*n.tile_width,i=o.to_meter*n.pixel_y_size*n.tile_height),this.widths.push(r),this.heights.push(i)}this.setWebMapZoomLevels()},e.prototype.webZoomToGeoPackageZoom=function(t){var e=p.TileBoundingBoxUtils.getWebMercatorBoundingBoxFromXYZ(0,0,t);return this.determineGeoPackageZoomLevel(e,t)},e.prototype.setWebMapZoomLevels=function(){this.minWebMapZoom=20,this.maxWebMapZoom=0,this.webZoomToGeoPackageZooms={};for(var t=this.tileMatrixSet.max_x-this.tileMatrixSet.min_x,e=this.tileMatrixSet.max_y-this.tileMatrixSet.min_y,n=0;nh&&(this.minWebMapZoom=h),this.maxWebMapZoom~~r.matrix_width&&(r.matrix_width=~~i),o>~~r.matrix_height&&(r.matrix_height=~~o)}},e.prototype.getTileMatrixWithZoomLevel=function(t){return this.zoomLevelToTileMatrix[t]},e.prototype.getZoomLevelForLength=function(t){return y.TileDaoUtils.getZoomLevelForLength(this.widths,this.heights,this.tileMatrices,t)},e.prototype.getZoomLevelForWidthAndHeight=function(t,e){return y.TileDaoUtils.getZoomLevelForWidthAndHeight(this.widths,this.heights,this.tileMatrices,t,e)},e.prototype.getClosestZoomLevelForLength=function(t){return y.TileDaoUtils.getClosestZoomLevelForLength(this.widths,this.heights,this.tileMatrices,t)},e.prototype.getClosestZoomLevelForWidthAndHeight=function(t,e){return y.TileDaoUtils.getClosestZoomLevelForWidthAndHeight(this.widths,this.heights,this.tileMatrices,t,e)},e.prototype.getApproximateZoomLevelForLength=function(t){return y.TileDaoUtils.getApproximateZoomLevelForLength(this.widths,this.heights,this.tileMatrices,t)},e.prototype.getApproximateZoomLevelForWidthAndHeight=function(t,e){return y.TileDaoUtils.getApproximateZoomLevelForWidthAndHeight(this.widths,this.heights,this.tileMatrices,t,e)},e.prototype.getMaxLength=function(){return y.TileDaoUtils.getMaxLengthForTileWidthsAndHeights(this.widths,this.heights)},e.prototype.getMinLength=function(){return y.TileDaoUtils.getMinLengthForTileWidthsAndHeights(this.widths,this.heights)},e.prototype.queryForTile=function(t,e,n){var r,i,a,s=new f.ColumnValues;s.addColumn(c.TileColumn.COLUMN_TILE_COLUMN,t),s.addColumn(c.TileColumn.COLUMN_TILE_ROW,e),s.addColumn(c.TileColumn.COLUMN_ZOOM_LEVEL,n);try{for(var u=o(this.queryForFieldValues(s)),l=u.next();!l.done;l=u.next()){var h=l.value;a=this.getRow(h)}}catch(t){r={error:t}}finally{try{l&&!l.done&&(i=u.return)&&i.call(u)}finally{if(r)throw r.error}}return a},e.prototype.queryForTilesWithZoomLevel=function(t){var e,n=this,r=this.queryForEach(c.TileColumn.COLUMN_ZOOM_LEVEL,t);return(e={})[Symbol.iterator]=function(){return this},e.next=function(){var t=r.next();return t.done?{value:void 0,done:!0}:{value:n.getRow(t.value),done:!1}},e},e.prototype.queryForTilesDescending=function(t){var e,n=this,r=this.queryForEach(c.TileColumn.COLUMN_ZOOM_LEVEL,t,void 0,void 0,c.TileColumn.COLUMN_TILE_COLUMN+" DESC, "+c.TileColumn.COLUMN_TILE_ROW+" DESC");return(e={})[Symbol.iterator]=function(){return this},e.next=function(){var t=r.next();return t.done?{value:void 0,done:!0}:{value:n.getRow(t.value),done:!1}},e},e.prototype.queryForTilesInColumn=function(t,e){var n,r=this,i=new f.ColumnValues;i.addColumn(c.TileColumn.COLUMN_TILE_COLUMN,t),i.addColumn(c.TileColumn.COLUMN_ZOOM_LEVEL,e);var o=this.queryForFieldValues(i);return(n={})[Symbol.iterator]=function(){return this},n.next=function(){var t=o.next();return t.done?{value:void 0,done:!0}:{value:r.getRow(t.value),done:!1}},n},e.prototype.queryForTilesInRow=function(t,e){var n,r=this,i=new f.ColumnValues;i.addColumn(c.TileColumn.COLUMN_TILE_ROW,t),i.addColumn(c.TileColumn.COLUMN_ZOOM_LEVEL,e);var o=this.queryForFieldValues(i);return(n={})[Symbol.iterator]=function(){return this},n.next=function(){var t=o.next();return t.done?{value:void 0,done:!0}:{value:r.getRow(t.value),done:!1}},n},e.prototype.queryByTileGrid=function(t,e){var n,r=this;if(t){var i="";i+=this.buildWhereWithFieldAndValue(c.TileColumn.COLUMN_ZOOM_LEVEL,e),i+=" and ",i+=this.buildWhereWithFieldAndValue(c.TileColumn.COLUMN_TILE_COLUMN,t.min_x,">="),i+=" and ",i+=this.buildWhereWithFieldAndValue(c.TileColumn.COLUMN_TILE_COLUMN,t.max_x,"<="),i+=" and ",i+=this.buildWhereWithFieldAndValue(c.TileColumn.COLUMN_TILE_ROW,t.min_y,">="),i+=" and ",i+=this.buildWhereWithFieldAndValue(c.TileColumn.COLUMN_TILE_ROW,t.max_y,"<=");var o=this.buildWhereArgs([e,t.min_x,t.max_x,t.min_y,t.max_y]),a=this.queryWhereWithArgsDistinct(i,o);return(n={})[Symbol.iterator]=function(){return this},n.next=function(){var t=a.next();return t.done?{value:void 0,done:!0}:{value:r.getRow(t.value),done:!1}},n}},e.prototype.countByTileGrid=function(t,e){if(t){var n="";n+=this.buildWhereWithFieldAndValue(c.TileColumn.COLUMN_ZOOM_LEVEL,e),n+=" and ",n+=this.buildWhereWithFieldAndValue(c.TileColumn.COLUMN_TILE_COLUMN,t.min_x,">="),n+=" and ",n+=this.buildWhereWithFieldAndValue(c.TileColumn.COLUMN_TILE_COLUMN,t.max_x,"<="),n+=" and ",n+=this.buildWhereWithFieldAndValue(c.TileColumn.COLUMN_TILE_ROW,t.min_y,">="),n+=" and ",n+=this.buildWhereWithFieldAndValue(c.TileColumn.COLUMN_TILE_ROW,t.max_y,"<=");var r=this.buildWhereArgs([e,t.min_x,t.max_x,t.min_y,t.max_y]);return this.countWhere(n,r)}},e.prototype.deleteTile=function(t,e,n){var r="";r+=this.buildWhereWithFieldAndValue(c.TileColumn.COLUMN_ZOOM_LEVEL,n),r+=" and ",r+=this.buildWhereWithFieldAndValue(c.TileColumn.COLUMN_TILE_COLUMN,t),r+=" and ",r+=this.buildWhereWithFieldAndValue(c.TileColumn.COLUMN_TILE_ROW,e);var i=this.buildWhereArgs([n,t,e]);return this.deleteWhere(r,i)},e.prototype.dropTable=function(){var t=this.geoPackage.tileMatrixDao,e=a.UserDao.prototype.dropTable.call(this);this.geoPackage.tileMatrixSetDao.delete(this.tileMatrixSet);for(var n=this.tileMatrices.length-1;n>=0;n--){var r=this.tileMatrices[n];t.delete(r)}return this.geoPackage.contentsDao.deleteById(this.gpkgTableName),e},e.prototype.rename=function(e){t.prototype.rename.call(this,e);var n=this.tileMatrixSet.table_name,r={};r[u.TileMatrixSetDao.COLUMN_TABLE_NAME]=e;var i=this.buildWhereWithFieldAndValue(u.TileMatrixSetDao.COLUMN_TABLE_NAME,n),o=this.buildWhereArgs([n]),a=this.geoPackage.contentsDao,l=a.queryForId(n);l.table_name=e,l.identifier=e,a.create(l),this.geoPackage.tileMatrixSetDao.updateWithValues(r,i,o);var c=this.geoPackage.tileMatrixDao,h={};h[s.TileMatrixDao.COLUMN_TABLE_NAME]=e;var f=this.buildWhereWithFieldAndValue(s.TileMatrixDao.COLUMN_TABLE_NAME,n);c.updateWithValues(h,f,o),a.deleteById(n)},e.readTable=function(t,e){return t.getTileDao(e)},e}(a.UserDao);e.TileDao=_},1584:function(t,e,n){"use strict";var r=this&&this.__importDefault||function(t){return t&&t.__esModule?t:{default:t}};Object.defineProperty(e,"__esModule",{value:!0}),e.TileDaoUtils=void 0;var i=r(n(5871)),o=r(n(1159)),a=function(){function t(){}return t.adjustTileMatrixLengths=function(t,e){var n=t.max_x-t.min_x,r=t.max_y-t.min_y;e.forEach((function(t){var e=Math.floor(n/(t.pixel_x_size*t.tile_width)),i=Math.floor(r/(t.pixel_y_size*t.tile_height));e>t.matrix_width&&(t.matrix_width=e),i>t.matrix_height&&(t.matrix_height=i)}))},t.getZoomLevelForLength=function(e,n,r,i){return t._getZoomLevelForLength(e,n,r,i,!0)},t.getZoomLevelForWidthAndHeight=function(e,n,r,i,o){return t._getZoomLevelForWidthAndHeight(e,n,r,i,o,!0)},t.getClosestZoomLevelForLength=function(e,n,r,i){return t._getZoomLevelForLength(e,n,r,i,!1)},t.getClosestZoomLevelForWidthAndHeight=function(e,n,r,i,o){return t._getZoomLevelForWidthAndHeight(e,n,r,i,o,!1)},t._getZoomLevelForLength=function(e,n,r,i,o){return t._getZoomLevelForWidthAndHeight(e,n,r,i,i,o)},t._getZoomLevelForWidthAndHeight=function(e,n,r,a,s,u){var l=null,c=(0,i.default)(e,a);-1===c&&(c=(0,o.default)(e,a)),c<0&&(c=-1*(c+1));var h=(0,i.default)(n,s);if(-1===h&&(h=(0,o.default)(n,s)),h<0&&(h=-1*(h+1)),0==c?u&&a=t.getMaxLength(e)?c=-1:--c:t.closerToZoomIn(e,a,c)&&--c,0==h?u&&s=t.getMaxLength(n)?h=-1:--h:t.closerToZoomIn(n,s,h)&&--h,c>=0||h>=0){var f;f=c<0?h:h<0?c:Math.min(c,h),l=t.getTileMatrixAtLengthIndex(r,f).zoom_level}return l},t.closerToZoomIn=function(t,e,n){return Math.log(e/t[n-1])/Math.log(2)s){var p=Math.log(r/s)/Math.log(2);l=Math.ceil(p),c=Math.floor(p),h=s*Math.pow(2,l),f=s*Math.pow(2,c),o=n[0].zoom_level,o-=r-f<=h-r?c:l}else{var d=(0,i.default)(e,r);d<0&&(d=-1*(d+1));var y=Math.log(r/e[d])/Math.log(.5),m=t.getTileMatrixAtLengthIndex(n,d).zoom_level;o=m+=Math.round(y)}return o},t.getMaxLengthForTileWidthsAndHeights=function(e,n){var r=t.getMaxLength(e),i=t.getMaxLength(n);return Math.min(r,i)},t.getMinLengthForTileWidthsAndHeights=function(e,n){var r=t.getMinLength(e),i=t.getMinLength(n);return Math.max(r,i)},t.getMaxLength=function(t){return t[t.length-1]/.51},t.getMinLength=function(t){return.51*t[0]},t}();e.TileDaoUtils=a},1332:function(t,e,n){"use strict";var r,i=this&&this.__extends||(r=function(t,e){return r=Object.setPrototypeOf||{__proto__:[]}instanceof Array&&function(t,e){t.__proto__=e}||function(t,e){for(var n in e)Object.prototype.hasOwnProperty.call(e,n)&&(t[n]=e[n])},r(t,e)},function(t,e){if("function"!=typeof e&&null!==e)throw new TypeError("Class extends value "+String(e)+" is not a constructor or null");function n(){this.constructor=t}r(t,e),t.prototype=null===e?Object.create(e):(n.prototype=e.prototype,new n)});Object.defineProperty(e,"__esModule",{value:!0}),e.TileRow=void 0;var o=function(t){function e(e,n,r){var i=t.call(this,e,n,r)||this;return i.tileTable=e,i}return i(e,t),Object.defineProperty(e.prototype,"zoomLevelColumnIndex",{get:function(){return this.tileTable.getZoomLevelColumnIndex()},enumerable:!1,configurable:!0}),Object.defineProperty(e.prototype,"zoomLevelColumn",{get:function(){return this.tileTable.getZoomLevelColumn()},enumerable:!1,configurable:!0}),Object.defineProperty(e.prototype,"zoomLevel",{get:function(){return this.getValueWithColumnName(this.zoomLevelColumn.name)},set:function(t){this.setValueWithIndex(this.zoomLevelColumnIndex,t)},enumerable:!1,configurable:!0}),Object.defineProperty(e.prototype,"tileColumnColumnIndex",{get:function(){return this.tileTable.getTileColumnColumnIndex()},enumerable:!1,configurable:!0}),Object.defineProperty(e.prototype,"tileColumnColumn",{get:function(){return this.tileTable.getTileColumnColumn()},enumerable:!1,configurable:!0}),Object.defineProperty(e.prototype,"tileColumn",{get:function(){return this.getValueWithColumnName(this.tileColumnColumn.name)},set:function(t){this.setValueWithColumnName(this.tileColumnColumn.name,t)},enumerable:!1,configurable:!0}),Object.defineProperty(e.prototype,"rowColumnIndex",{get:function(){return this.tileTable.getTileRowColumnIndex()},enumerable:!1,configurable:!0}),Object.defineProperty(e.prototype,"rowColumn",{get:function(){return this.tileTable.getTileRowColumn()},enumerable:!1,configurable:!0}),Object.defineProperty(e.prototype,"row",{get:function(){return this.getValueWithColumnName(this.rowColumn.name)},enumerable:!1,configurable:!0}),Object.defineProperty(e.prototype,"tileRow",{set:function(t){this.setValueWithColumnName(this.rowColumn.name,t)},enumerable:!1,configurable:!0}),Object.defineProperty(e.prototype,"tileDataColumnIndex",{get:function(){return this.tileTable.getTileDataColumnIndex()},enumerable:!1,configurable:!0}),Object.defineProperty(e.prototype,"tileDataColumn",{get:function(){return this.tileTable.getTileDataColumn()},enumerable:!1,configurable:!0}),Object.defineProperty(e.prototype,"tileData",{get:function(){return this.getValueWithColumnName(this.tileDataColumn.name)},set:function(t){this.setValueWithColumnName(this.tileDataColumn.name,t)},enumerable:!1,configurable:!0}),Object.defineProperty(e.prototype,"tileDataImage",{get:function(){return null},enumerable:!1,configurable:!0}),e}(n(2224).UserRow);e.TileRow=o},8704:function(t,e,n){"use strict";var r,i=this&&this.__extends||(r=function(t,e){return r=Object.setPrototypeOf||{__proto__:[]}instanceof Array&&function(t,e){t.__proto__=e}||function(t,e){for(var n in e)Object.prototype.hasOwnProperty.call(e,n)&&(t[n]=e[n])},r(t,e)},function(t,e){if("function"!=typeof e&&null!==e)throw new TypeError("Class extends value "+String(e)+" is not a constructor or null");function n(){this.constructor=t}r(t,e),t.prototype=null===e?Object.create(e):(n.prototype=e.prototype,new n)});Object.defineProperty(e,"__esModule",{value:!0}),e.TileTable=void 0;var o=n(8018),a=n(8334),s=n(6295),u=n(1648),l=n(9971),c=function(t){function e(e,n){var r=t.call(this,new s.TileColumns(e,n,!1))||this,i=new u.UniqueConstraint;return i.add(r.getUserColumns().getZoomLevelColumn()),i.add(r.getUserColumns().getTileColumnColumn()),i.add(r.getUserColumns().getTileRowColumn()),r.addConstraint(i),r}return i(e,t),e.prototype.copy=function(){return new e(this.getTableName(),this.columns._columns)},e.prototype.getDataType=function(){return l.ContentsDataType.TILES},e.prototype.getUserColumns=function(){return t.prototype.getUserColumns.call(this)},e.prototype.createUserColumns=function(t){return new s.TileColumns(this.getTableName(),t,!0)},e.prototype.getZoomLevelColumnIndex=function(){return this.getUserColumns().getZoomLevelIndex()},e.prototype.getZoomLevelColumn=function(){return this.getUserColumns().getZoomLevelColumn()},e.prototype.getTileColumnColumnIndex=function(){return this.getUserColumns().getTileColumnIndex()},e.prototype.getTileColumnColumn=function(){return this.getUserColumns().getTileColumnColumn()},e.prototype.getTileRowColumnIndex=function(){return this.getUserColumns().getTileRowIndex()},e.prototype.getTileRowColumn=function(){return this.getUserColumns().getTileRowColumn()},e.prototype.getTileDataColumnIndex=function(){return this.getUserColumns().getTileDataIndex()},e.prototype.getTileDataColumn=function(){return this.getUserColumns().getTileDataColumn()},e.createRequiredColumns=function(t){void 0===t&&(t=0);var e=[];return e.push(a.TileColumn.createIdColumn(t++)),e.push(a.TileColumn.createZoomLevelColumn(t++)),e.push(a.TileColumn.createTileColumnColumn(t++)),e.push(a.TileColumn.createTileRowColumn(t++)),e.push(a.TileColumn.createTileDataColumn(t)),e},e.prototype.validateContents=function(t){var e=t.data_type;if(null==e||e!==l.ContentsDataType.TILES)throw new Error("The Contents of a TileTable must have a data type of tiles")},e.COLUMN_ID=s.TileColumns.ID,e.COLUMN_ZOOM_LEVEL=s.TileColumns.ZOOM_LEVEL,e.COLUMN_TILE_COLUMN=s.TileColumns.TILE_COLUMN,e.COLUMN_TILE_ROW=s.TileColumns.TILE_ROW,e.COLUMN_TILE_DATA=s.TileColumns.TILE_DATA,e}(o.UserTable);e.TileTable=c},9631:function(t,e,n){"use strict";var r,i=this&&this.__extends||(r=function(t,e){return r=Object.setPrototypeOf||{__proto__:[]}instanceof Array&&function(t,e){t.__proto__=e}||function(t,e){for(var n in e)Object.prototype.hasOwnProperty.call(e,n)&&(t[n]=e[n])},r(t,e)},function(t,e){if("function"!=typeof e&&null!==e)throw new TypeError("Class extends value "+String(e)+" is not a constructor or null");function n(){this.constructor=t}r(t,e),t.prototype=null===e?Object.create(e):(n.prototype=e.prototype,new n)});Object.defineProperty(e,"__esModule",{value:!0}),e.TileTableReader=void 0;var o=n(4880),a=n(8704),s=n(8334),u=function(t){function e(e){var n=t.call(this,e.table_name)||this;return n.tileMatrixSet=e,n}return i(e,t),e.prototype.readTileTable=function(t){return this.readTable(t.database)},e.prototype.createTable=function(t,e){return new a.TileTable(t,e)},e.prototype.createColumn=function(t){return new s.TileColumn(t.index,t.name,t.dataType,t.max,t.notNull,t.defaultValue,t.primaryKey,t.autoincrement)},e}(o.UserTableReader);e.TileTableReader=u},5762:function(t,e,n){"use strict";var r,i=this&&this.__extends||(r=function(t,e){return r=Object.setPrototypeOf||{__proto__:[]}instanceof Array&&function(t,e){t.__proto__=e}||function(t,e){for(var n in e)Object.prototype.hasOwnProperty.call(e,n)&&(t[n]=e[n])},r(t,e)},function(t,e){if("function"!=typeof e&&null!==e)throw new TypeError("Class extends value "+String(e)+" is not a constructor or null");function n(){this.constructor=t}r(t,e),t.prototype=null===e?Object.create(e):(n.prototype=e.prototype,new n)});Object.defineProperty(e,"__esModule",{value:!0}),e.UserCustomColumn=void 0;var o=n(5865),a=n(7319),s=n(5071),u=function(t){function e(e,n,r,i,o,a,s,u){var l=t.call(this,e,n,r,i,o,a,s,u)||this;if(null==r)throw new Error("Data type is required to create column: "+n);return l}return i(e,t),e.createColumn=function(t,n,r,i,o,a,s){return void 0===i&&(i=!1),new e(t,n,r,a,i,o,!1,s)},e.createPrimaryKeyColumn=function(t,n,r){return void 0===r&&(r=s.UserTableDefaults.DEFAULT_AUTOINCREMENT),new e(t,n,a.GeoPackageDataType.INTEGER,void 0,void 0,void 0,!0,r)},e}(o.UserColumn);e.UserCustomColumn=u},496:function(t,e,n){"use strict";var r,i=this&&this.__extends||(r=function(t,e){return r=Object.setPrototypeOf||{__proto__:[]}instanceof Array&&function(t,e){t.__proto__=e}||function(t,e){for(var n in e)Object.prototype.hasOwnProperty.call(e,n)&&(t[n]=e[n])},r(t,e)},function(t,e){if("function"!=typeof e&&null!==e)throw new TypeError("Class extends value "+String(e)+" is not a constructor or null");function n(){this.constructor=t}r(t,e),t.prototype=null===e?Object.create(e):(n.prototype=e.prototype,new n)});Object.defineProperty(e,"__esModule",{value:!0}),e.UserCustomColumns=void 0;var o=function(t){function e(e,n,r,i){var o=t.call(this,e,n,i)||this;return o.requiredColumns=null==r?[]:r.slice(),o.updateColumns(),o}return i(e,t),e.prototype.copy=function(){return new e(this.getTableName(),this.getColumns(),this.getRequiredColumns(),this.isCustom())},e.prototype.getRequiredColumns=function(){return this.requiredColumns},e.prototype.setRequiredColumns=function(t){void 0===t&&(t=[]),this.requiredColumns=t.slice()},e.prototype.updateColumns=function(){var e=this;if(t.prototype.updateColumns.call(this),!this.isCustom()&&null!==this.requiredColumns&&0!==this.requiredColumns.length){var n=new Set(this.requiredColumns),r={};this.getColumns().forEach((function(t){var i=t.getName(),o=t.getIndex();if(n.has(i)){var a=r[i];e.duplicateCheck(o,a,i),r[i]=o}})),n.forEach((function(t){e.missingCheck(r[t],t)}))}},e}(n(2114).UserColumns);e.UserCustomColumns=o},1447:function(t,e,n){"use strict";var r,i=this&&this.__extends||(r=function(t,e){return r=Object.setPrototypeOf||{__proto__:[]}instanceof Array&&function(t,e){t.__proto__=e}||function(t,e){for(var n in e)Object.prototype.hasOwnProperty.call(e,n)&&(t[n]=e[n])},r(t,e)},function(t,e){if("function"!=typeof e&&null!==e)throw new TypeError("Class extends value "+String(e)+" is not a constructor or null");function n(){this.constructor=t}r(t,e),t.prototype=null===e?Object.create(e):(n.prototype=e.prototype,new n)});Object.defineProperty(e,"__esModule",{value:!0}),e.UserCustomDao=void 0;var o=n(4668),a=n(362),s=function(t){function e(e,n){return t.call(this,e,n)||this}return i(e,t),e.prototype.createObject=function(t){return this.getRow(t)},e.readTable=function(t,n){return new e(t,new a.UserCustomTableReader(n).readTable(t.database))},e}(o.UserDao);e.UserCustomDao=s},2378:function(t,e,n){"use strict";var r,i=this&&this.__extends||(r=function(t,e){return r=Object.setPrototypeOf||{__proto__:[]}instanceof Array&&function(t,e){t.__proto__=e}||function(t,e){for(var n in e)Object.prototype.hasOwnProperty.call(e,n)&&(t[n]=e[n])},r(t,e)},function(t,e){if("function"!=typeof e&&null!==e)throw new TypeError("Class extends value "+String(e)+" is not a constructor or null");function n(){this.constructor=t}r(t,e),t.prototype=null===e?Object.create(e):(n.prototype=e.prototype,new n)});Object.defineProperty(e,"__esModule",{value:!0}),e.UserCustomTable=void 0;var o=n(8018),a=n(496),s=function(t){function e(e,n,r){return void 0===r&&(r=[]),t.call(this,new a.UserCustomColumns(e,n,r,!0))||this}return i(e,t),e.prototype.copy=function(){return new e(this.getTableName(),this.getUserColumns().getColumns(),this.getUserColumns().getRequiredColumns())},e.prototype.getDataType=function(){return null},e.prototype.getUserColumns=function(){return t.prototype.getUserColumns.call(this)},e.prototype.getRequiredColumns=function(){return this.getUserColumns().getRequiredColumns()},e}(o.UserTable);e.UserCustomTable=s},362:function(t,e,n){"use strict";var r,i=this&&this.__extends||(r=function(t,e){return r=Object.setPrototypeOf||{__proto__:[]}instanceof Array&&function(t,e){t.__proto__=e}||function(t,e){for(var n in e)Object.prototype.hasOwnProperty.call(e,n)&&(t[n]=e[n])},r(t,e)},function(t,e){if("function"!=typeof e&&null!==e)throw new TypeError("Class extends value "+String(e)+" is not a constructor or null");function n(){this.constructor=t}r(t,e),t.prototype=null===e?Object.create(e):(n.prototype=e.prototype,new n)});Object.defineProperty(e,"__esModule",{value:!0}),e.UserCustomTableReader=void 0;var o=n(2378),a=n(4880),s=n(5762),u=function(t){function e(e){return t.call(this,e)||this}return i(e,t),e.prototype.readUserCustomTable=function(t){return this.readTable(t.database)},e.prototype.createTable=function(t,e){return new o.UserCustomTable(t,e,null)},e.prototype.createColumn=function(t){return new s.UserCustomColumn(t.index,t.name,t.dataType,t.max,t.notNull,t.defaultValue,t.primaryKey,t.autoincrement)},e}(a.UserTableReader);e.UserCustomTableReader=u},5865:function(t,e,n){"use strict";var r=this&&this.__importDefault||function(t){return t&&t.__esModule?t:{default:t}};Object.defineProperty(e,"__esModule",{value:!0}),e.UserColumn=void 0;var i=r(n(8446)),o=n(7319),a=n(2841),s=n(1133),u=n(91),l=n(5071),c=n(7686),h=function(){function t(t,e,n,r,i,o,a,s,u){this.index=t,this.name=e,this.dataType=n,this.max=r,this.notNull=i,this.defaultValue=o,this.primaryKey=a,this.autoincrement=s,this.unique=u,this.constraints=new c.Constraints,this.validateMax(),this.type=this.getTypeName(e,n),this.addDefaultConstraints()}return t.validateDataType=function(t,e){if(null==e)throw new Error("Data Type is required to create column: "+t)},t.prototype.copy=function(){var e=new t(this.index,this.name,this.dataType,this.max,this.notNull,this.defaultValue,this.primaryKey,this.unique);return e.min=this.min,e.constraints=this.constraints.copy(),e},t.prototype.clearConstraints=function(){return this.constraints.clear()},t.prototype.getConstraints=function(){return this.constraints},t.prototype.setIndex=function(t){if(this.hasIndex()){if(!(0,i.default)(t,this.index))throw new Error("User Column with a valid index may not be changed. Column Name: "+this.name+", Index: "+this.index+", Attempted Index: "+this.index)}else this.index=t},t.prototype.hasIndex=function(){return this.index>t.NO_INDEX},t.prototype.resetIndex=function(){this.index=t.NO_INDEX},t.prototype.getIndex=function(){return this.index},t.prototype.setName=function(t){this.name=t},t.prototype.getName=function(){return this.name},t.prototype.isNamed=function(t){return this.name===t},t.prototype.hasMax=function(){return null!=this.max},t.prototype.setMax=function(t){this.max=t},t.prototype.getMax=function(){return this.max},t.prototype.setNotNull=function(t){this.notNull!==t&&(t?this.addNotNullConstraint():this.removeConstraintByType(u.ConstraintType.NOT_NULL)),this.notNull=t},t.prototype.isNotNull=function(){return this.notNull},t.prototype.hasDefaultValue=function(){return null!==this.defaultValue&&void 0!==this.defaultValue},t.prototype.setDefaultValue=function(t){this.removeConstraintByType(u.ConstraintType.DEFAULT),null!=t&&this.addDefaultValueConstraint(t),this.defaultValue=t},t.prototype.getDefaultValue=function(){return this.defaultValue},t.prototype.setPrimaryKey=function(t){this.primaryKey!==t&&(t?this.addPrimaryKeyConstraint():(this.autoincrement=!1,this.removeConstraintByType(u.ConstraintType.AUTOINCREMENT),this.removeConstraintByType(u.ConstraintType.PRIMARY_KEY))),this.primaryKey=t},t.prototype.isPrimaryKey=function(){return this.primaryKey},t.prototype.setAutoincrement=function(t){this.autoincrement!==t&&(t?this.addAutoincrementConstraint():this.removeConstraintByType(u.ConstraintType.AUTOINCREMENT)),this.autoincrement=t},t.prototype.isAutoincrement=function(){return this.autoincrement},t.prototype.setUnique=function(t){this.unique!==t&&(t?this.addUniqueConstraint():this.removeConstraintByType(u.ConstraintType.UNIQUE)),this.unique=t},t.prototype.isUnique=function(){return this.unique},t.prototype.setDataType=function(t){this.dataType=t},t.prototype.getDataType=function(){return this.dataType},t.prototype.getTypeName=function(e,n){return t.validateDataType(e,n),o.GeoPackageDataType.nameFromType(n)},t.prototype.validateMax=function(){if(this.max&&this.dataType!==o.GeoPackageDataType.TEXT&&this.dataType!==o.GeoPackageDataType.BLOB)throw new Error("Column max is only supported for TEXT and BLOB columns. column: "+this.name+", max: "+this.max+", type: "+this.dataType);return!0},t.createPrimaryKeyColumn=function(e,n,r){return void 0===r&&(r=l.UserTableDefaults.DEFAULT_AUTOINCREMENT),new t(e,n,o.GeoPackageDataType.INTEGER,void 0,!0,void 0,!0,r)},t.createColumn=function(e,n,r,i,o,a){return void 0===i&&(i=!1),new t(e,n,r,a,i,o,!1)},t.prototype.addDefaultConstraints=function(){this.isNotNull()&&this.addNotNullConstraint(),this.hasDefaultValue()&&this.addDefaultValueConstraint(this.getDefaultValue()),this.isPrimaryKey()&&(this.addPrimaryKeyConstraint(),this.isAutoincrement()&&this.addAutoincrementConstraint()),this.isUnique()&&this.addUniqueConstraint()},t.prototype.addConstraint=function(t){null!==t.order&&void 0!==t.order||this.setConstraintOrder(t),this.constraints.add(t)},t.prototype.setConstraintOrder=function(e){var n=null;switch(e.getType()){case u.ConstraintType.PRIMARY_KEY:n=t.PRIMARY_KEY_CONSTRAINT_ORDER;break;case u.ConstraintType.UNIQUE:n=t.UNIQUE_CONSTRAINT_ORDER;break;case u.ConstraintType.NOT_NULL:n=t.NOT_NULL_CONSTRAINT_ORDER;break;case u.ConstraintType.DEFAULT:n=t.DEFAULT_VALUE_CONSTRAINT_ORDER;break;case u.ConstraintType.AUTOINCREMENT:n=t.AUTOINCREMENT_CONSTRAINT_ORDER}e.order=n},t.prototype.addConstraintSql=function(t){var e=s.ConstraintParser.getType(t),n=s.ConstraintParser.getName(t);this.constraints.add(new a.RawConstraint(e,n,t))},t.prototype.addConstraints=function(t){this.constraints.addConstraints(t)},t.prototype.addColumnConstraints=function(t){this.addConstraints(t.getConstraints())},t.prototype.addNotNullConstraint=function(){this.addConstraint(new a.RawConstraint(u.ConstraintType.NOT_NULL,null,"NOT NULL",t.NOT_NULL_CONSTRAINT_ORDER))},t.prototype.addDefaultValueConstraint=function(e){this.addConstraint(new a.RawConstraint(u.ConstraintType.DEFAULT,null,"DEFAULT "+o.GeoPackageDataType.columnDefaultValue(e,this.getDataType()),t.DEFAULT_VALUE_CONSTRAINT_ORDER))},t.prototype.addPrimaryKeyConstraint=function(){this.addConstraint(new a.RawConstraint(u.ConstraintType.PRIMARY_KEY,null,"PRIMARY KEY",t.PRIMARY_KEY_CONSTRAINT_ORDER))},t.prototype.addAutoincrementConstraint=function(){if(!this.isPrimaryKey())throw new Error("Autoincrement may only be set on a primary key column");this.addConstraint(new a.RawConstraint(u.ConstraintType.AUTOINCREMENT,null,"AUTOINCREMENT",t.AUTOINCREMENT_CONSTRAINT_ORDER))},t.prototype.addUniqueConstraint=function(){this.addConstraint(new a.RawConstraint(u.ConstraintType.UNIQUE,null,"UNIQUE",t.UNIQUE_CONSTRAINT_ORDER))},t.prototype.removeConstraintByType=function(t){this.constraints.clearConstraintsByType(t)},t.prototype.getType=function(){return this.type},t.prototype.hasConstraints=function(){return this.constraints.has()},t.prototype.buildConstraintSql=function(t){var e=null;return!l.UserTableDefaults.DEFAULT_PK_NOT_NULL&&this.isPrimaryKey()&&t.getType()===u.ConstraintType.NOT_NULL||(e=t.buildSql()),e},t.NO_INDEX=-1,t.NOT_NULL_CONSTRAINT_ORDER=1,t.DEFAULT_VALUE_CONSTRAINT_ORDER=2,t.PRIMARY_KEY_CONSTRAINT_ORDER=3,t.AUTOINCREMENT_CONSTRAINT_ORDER=4,t.UNIQUE_CONSTRAINT_ORDER=5,t}();e.UserColumn=h},2114:(t,e,n)=>{"use strict";Object.defineProperty(e,"__esModule",{value:!0}),e.UserColumns=void 0;var r=n(7319),i=function(){function t(t,e,n){void 0===n&&(n=!1),this._pkIndex=-1,this._tableName=t,this._columns=e,this._custom=n,this._nameToIndex=new Map,this._columnNames=[]}return t.prototype.copy=function(){var e=[];this._columns.forEach((function(t){e.push(t.copy())}));var n=new t(this._tableName,e,this._custom);return n._columnNames=Array.from(this._columnNames),n._nameToIndex=new Map(this._nameToIndex),n._pkIndex=this._pkIndex,n},t.prototype.updateColumns=function(){var t=this;if(this._nameToIndex.clear(),!this._custom){var e=new Set,n=[];this._columns.forEach((function(r){if(r.hasIndex()){var i=r.getIndex();if(e.has(i))throw new Error("Duplicate index: "+i+", Table Name: "+t._tableName);e.add(i)}else n.push(r)}));var r=-1;n.forEach((function(t){for(;e.has(++r););t.setIndex(r)})),this._columns.sort((function(t,e){return t.index-e.index}))}this._pkIndex=-1,this._columnNames=[];for(var i=0;i=0},t.prototype.getPkColumnIndex=function(){return this._pkIndex},t.prototype.getPkColumn=function(){var t=null;return this.hasPkColumn()&&(t=this._columns[this._pkIndex]),t},t.prototype.getPkColumnName=function(){return this.getPkColumn().getName()},t.prototype.columnsOfType=function(t){return this._columns.filter((function(e){return e.getDataType()===t}))},t.prototype.addColumn=function(t){this._columns.push(t),this.updateColumns()},t.prototype.renameColumn=function(t,e){this.renameColumnWithName(t.getName(),e),t.setName(e)},t.prototype.renameColumnWithName=function(t,e){this.renameColumnWithIndex(this.getColumnIndexForColumnName(t),e)},t.prototype.renameColumnWithIndex=function(t,e){this._columns[t].setName(e),this.updateColumns()},t.prototype.dropColumn=function(t){this.dropColumnWithIndex(t.getIndex())},t.prototype.dropColumnWithName=function(t){this.dropColumnWithIndex(this.getColumnIndexForColumnName(t))},t.prototype.dropColumnWithIndex=function(t){this._columns.splice(t,1),this._columns.forEach((function(t){return t.resetIndex()})),this.updateColumns()},t.prototype.alterColumn=function(t){var e=this.getColumn(t.getName()).getIndex();t.setIndex(e),this._columns[e]=t},t}();e.UserColumns=i},4668:function(t,e,n){"use strict";var r,i=this&&this.__extends||(r=function(t,e){return r=Object.setPrototypeOf||{__proto__:[]}instanceof Array&&function(t,e){t.__proto__=e}||function(t,e){for(var n in e)Object.prototype.hasOwnProperty.call(e,n)&&(t[n]=e[n])},r(t,e)},function(t,e){if("function"!=typeof e&&null!==e)throw new TypeError("Class extends value "+String(e)+" is not a constructor or null");function n(){this.constructor=t}r(t,e),t.prototype=null===e?Object.create(e):(n.prototype=e.prototype,new n)});Object.defineProperty(e,"__esModule",{value:!0}),e.UserDao=void 0;var o=n(4115),a=n(6366),s=n(4599),u=n(2224),l=n(8483),c=n(8314),h=n(5042),f=function(t){function e(e,n){var r=t.call(this,e)||this;return r._table=n,r.table_name=n.getTableName(),r.gpkgTableName=n.getTableName(),n.getPkColumn()?r.idColumns=[n.getPkColumn().getName()]:r.idColumns=[],r.columns=n.getUserColumns().getColumnNames(),r}return i(e,t),e.prototype.createObject=function(t){return t?this.getRow(t):this.newRow()},e.prototype.setValueInObject=function(t,e,n){t.setValueNoValidationWithIndex(e,n)},e.prototype.getRow=function(t){if(t instanceof u.UserRow)return t;if(this.table){for(var e=this.table.getColumnCount(),n={},r=0;r{"use strict";var r=n(3085).Buffer;Object.defineProperty(e,"__esModule",{value:!0}),e.UserRow=void 0;var i=n(7319),o=function(){function t(t,e,n){if(this.table=t,this.columnTypes=e,this.values=n,!this.columnTypes){var r=this.table.getColumnCount();this.columnTypes={},this.values={};for(var i=0;i{"use strict";Object.defineProperty(e,"__esModule",{value:!0}),e.UserTable=void 0;var r=n(7686),i=function(){function t(t){this.constraints=new r.Constraints,this.columns=t,this.constraints=new r.Constraints}return t.prototype.copy=function(){var e=new t(this.columns.copy());return e.constraints.addConstraints(this.constraints),null!==this.contents&&void 0!==this.contents&&(e.contents=this.contents.copy()),e},t.prototype.getTableName=function(){return this.columns.getTableName()},Object.defineProperty(t.prototype,"tableType",{get:function(){return"userTable"},enumerable:!1,configurable:!0}),t.prototype.getUserColumns=function(){return this.columns},t.prototype.getColumnIndex=function(t){return this.columns.getColumnIndexForColumnName(t)},t.prototype.hasColumn=function(t){try{return this.getColumnIndex(t),!0}catch(t){return!1}},t.prototype.getColumnNameWithIndex=function(t){return this.columns.getColumnName(t)},t.prototype.getColumnWithIndex=function(t){return this.columns.getColumnForIndex(t)},t.prototype.getColumnWithColumnName=function(t){return this.getColumnWithIndex(this.getColumnIndex(t))},t.prototype.getColumnCount=function(){return this.columns.columnCount()},t.prototype.getPkColumn=function(){return this.columns.getPkColumn()},t.prototype.getPkColumnName=function(){return this.columns.getPkColumnName()},t.prototype.getIdColumnIndex=function(){return this.columns.getPkColumnIndex()},t.prototype.getIdColumn=function(){return this.getPkColumn()},t.prototype.addConstraint=function(t){this.constraints.add(t)},t.prototype.addConstraints=function(t){this.constraints.addConstraints(t)},t.prototype.hasConstraints=function(){return this.constraints.has()},t.prototype.getConstraints=function(){return this.constraints},t.prototype.getConstraintsByType=function(t){return this.constraints.getConstraintsForType(t)},t.prototype.clearConstraints=function(){return this.constraints.clear()},t.prototype.columnsOfType=function(t){return this.columns.columnsOfType(t)},t.prototype.getContents=function(){return this.contents},t.prototype.setContents=function(t){this.contents=t,null!=t&&this.validateContents(t)},t.prototype.validateContents=function(t){},t.prototype.addColumn=function(t){this.columns.addColumn(t)},t.prototype.renameColumn=function(t,e){this.columns.renameColumn(t,e)},t.prototype.renameColumnWithName=function(t,e){this.columns.renameColumnWithName(t,e)},t.prototype.renameColumnAtIndex=function(t,e){this.columns.renameColumnWithIndex(t,e)},t.prototype.dropColumn=function(t){this.columns.dropColumn(t)},t.prototype.dropColumnWithName=function(t){this.columns.dropColumnWithName(t)},t.prototype.dropColumnWithIndex=function(t){this.columns.dropColumnWithIndex(t)},t.prototype.alterColumn=function(t){this.columns.alterColumn(t)},t}();e.UserTable=i},5071:(t,e)=>{"use strict";Object.defineProperty(e,"__esModule",{value:!0}),e.UserTableDefaults=void 0;var n=function(){function t(){}return t.DEFAULT_AUTOINCREMENT=!0,t.DEFAULT_PK_NOT_NULL=!0,t}();e.UserTableDefaults=n},4880:(t,e,n)=>{"use strict";Object.defineProperty(e,"__esModule",{value:!0}),e.UserTableReader=void 0;var r=n(5865),i=n(5045),o=n(7043),a=function(){function t(t){this.table_name=t}return t.prototype.readTable=function(t){var e=this,n=[],r=i.TableInfo.info(t,this.table_name);if(null==r)throw new Error("Table does not exist: "+this.table_name);var a=o.SQLiteMaster.queryForConstraints(t,this.table_name);r.getColumns().forEach((function(t){if(null===t.getDataType()||void 0===t.getDataType())throw new Error("Unsupported column data type "+t.getType());var r=e.createColumn(t),i=a.getColumnConstraints(r.getName());null!=i&&i.hasConstraints()&&(r.clearConstraints(),r.addConstraints(i.constraints)),n.push(r)}));var s=this.createTable(this.table_name,n);return s.addConstraints(a.getTableConstraints()),s},t.prototype.createColumn=function(t){return new r.UserColumn(t.index,t.name,t.dataType,t.max,t.notNull,t.defaultValue,t.primaryKey,t.autoincrement)},t}();e.UserTableReader=a},4275:function(t,e,n){"use strict";var r=this&&this.__importDefault||function(t){return t&&t.__esModule?t:{default:t}};Object.defineProperty(e,"__esModule",{value:!0}),e.GeoPackageValidate=e.GeoPackageValidationError=void 0;var i=r(n(3935)),o=n(1506),a=function(t,e){this.error=t,this.fatal=e};e.GeoPackageValidationError=a;var s=function(){function t(){}return t.hasGeoPackageExtension=function(t){var e=i.default.extname(t);return e&&""!==e&&(e.toLowerCase()==="."+o.GeoPackageConstants.GEOPACKAGE_EXTENSION.toLowerCase()||e.toLowerCase()==="."+o.GeoPackageConstants.GEOPACKAGE_EXTENDED_EXTENSION.toLowerCase())},t.validateGeoPackageExtension=function(e){if(!t.hasGeoPackageExtension(e))return new a("GeoPackage database file '"+e+"' does not have a valid extension of '"+o.GeoPackageConstants.GEOPACKAGE_EXTENSION+"' or '"+o.GeoPackageConstants.GEOPACKAGE_EXTENDED_EXTENSION+"'",!0)},t.validateMinimumTables=function(t){var e=[],n=t.spatialReferenceSystemDao.isTableExists(),r=t.contentsDao.isTableExists();return n||e.push(new a("gpkg_spatial_ref_sys table does not exist",!0)),r||e.push(new a("gpkg_contents table does not exist",!0)),e},t.hasMinimumTables=function(t){return 0==this.validateMinimumTables(t).length},t}();e.GeoPackageValidate=s},2038:(t,e)=>{"use strict";var n;Object.defineProperty(e,"__esModule",{value:!0}),e.WKB=void 0;var r=function(){function t(){}return t.fromName=function(e){return"GEOMETRY"===(e=e.toUpperCase())?t.typeMap.wkb.GeometryCollection:t.wktToEnum[e]},t.typeMap={wkt:{Point:"POINT",LineString:"LINESTRING",Polygon:"POLYGON",MultiPoint:"MULTIPOINT",MultiLineString:"MULTILINESTRING",MultiPolygon:"MULTIPOLYGON",GeometryCollection:"GEOMETRYCOLLECTION"},wkb:{Point:1,LineString:2,Polygon:3,MultiPoint:4,MultiLineString:5,MultiPolygon:6,GeometryCollection:7}},t.wktToEnum=((n={})[t.typeMap.wkt.Point]=t.typeMap.wkb.Point,n[t.typeMap.wkt.LineString]=t.typeMap.wkb.LineString,n[t.typeMap.wkt.Polygon]=t.typeMap.wkb.Polygon,n[t.typeMap.wkt.MultiPoint]=t.typeMap.wkb.MultiPoint,n[t.typeMap.wkt.MultiLineString]=t.typeMap.wkb.MultiLineString,n[t.typeMap.wkt.MultiPolygon]=t.typeMap.wkb.MultiPolygon,n[t.typeMap.wkt.GeometryCollection]=t.typeMap.wkb.GeometryCollection,n),t}();e.WKB=r},2511:function(t,e,n){var r;t=n.nmd(t),function(i){e&&e.nodeType,t&&t.nodeType;var o="object"==typeof n.g&&n.g;o.global!==o&&o.window!==o&&o.self;var a,s=2147483647,u=36,l=/^xn--/,c=/[^\x20-\x7E]/,h=/[\x2E\u3002\uFF0E\uFF61]/g,f={overflow:"Overflow: input needs wider integers to process","not-basic":"Illegal input >= 0x80 (not a basic code point)","invalid-input":"Invalid input"},p=Math.floor,d=String.fromCharCode;function y(t){throw RangeError(f[t])}function m(t,e){for(var n=t.length,r=[];n--;)r[n]=e(t[n]);return r}function g(t,e){var n=t.split("@"),r="";return n.length>1&&(r=n[0]+"@",t=n[1]),r+m((t=t.replace(h,".")).split("."),e).join(".")}function _(t){for(var e,n,r=[],i=0,o=t.length;i=55296&&e<=56319&&i65535&&(e+=d((t-=65536)>>>10&1023|55296),t=56320|1023&t),e+d(t)})).join("")}function v(t,e){return t+22+75*(t<26)-((0!=e)<<5)}function T(t,e,n){var r=0;for(t=n?p(t/700):t>>1,t+=p(t/e);t>455;r+=u)t=p(t/35);return p(r+36*t/(t+38))}function E(t){var e,n,r,i,o,a,l,c,h,f,d,m=[],g=t.length,_=0,v=128,E=72;for((n=t.lastIndexOf("-"))<0&&(n=0),r=0;r=128&&y("not-basic"),m.push(t.charCodeAt(r));for(i=n>0?n+1:0;i=g&&y("invalid-input"),((c=(d=t.charCodeAt(i++))-48<10?d-22:d-65<26?d-65:d-97<26?d-97:u)>=u||c>p((s-_)/a))&&y("overflow"),_+=c*a,!(c<(h=l<=E?1:l>=E+26?26:l-E));l+=u)a>p(s/(f=u-h))&&y("overflow"),a*=f;E=T(_-o,e=m.length+1,0==o),p(_/e)>s-v&&y("overflow"),v+=p(_/e),_%=e,m.splice(_++,0,v)}return b(m)}function w(t){var e,n,r,i,o,a,l,c,h,f,m,g,b,E,w,x=[];for(g=(t=_(t)).length,e=128,n=0,o=72,a=0;a=e&&mp((s-n)/(b=r+1))&&y("overflow"),n+=(l-e)*b,e=l,a=0;as&&y("overflow"),m==e){for(c=n,h=u;!(c<(f=h<=o?1:h>=o+26?26:h-o));h+=u)w=c-f,E=u-f,x.push(d(v(f+w%E,0))),c=p(w/E);x.push(d(v(c,0))),o=T(n,b,r==i),n=0,++r}++n,++e}return x.join("")}a={version:"1.3.2",ucs2:{decode:_,encode:b},decode:E,encode:w,toASCII:function(t){return g(t,(function(t){return c.test(t)?"xn--"+w(t):t}))},toUnicode:function(t){return g(t,(function(t){return l.test(t)?E(t.slice(4).toLowerCase()):t}))}},void 0===(r=function(){return a}.call(e,n,e,t))||(t.exports=r)}()},8575:(t,e,n)=>{"use strict";var r=n(2511),i=n(2502);function o(){this.protocol=null,this.slashes=null,this.auth=null,this.host=null,this.port=null,this.hostname=null,this.hash=null,this.search=null,this.query=null,this.pathname=null,this.path=null,this.href=null}e.parse=b,e.resolve=function(t,e){return b(t,!1,!0).resolve(e)},e.resolveObject=function(t,e){return t?b(t,!1,!0).resolveObject(e):e},e.format=function(t){return i.isString(t)&&(t=b(t)),t instanceof o?t.format():o.prototype.format.call(t)},e.Url=o;var a=/^([a-z0-9.+-]+:)/i,s=/:[0-9]*$/,u=/^(\/\/?(?!\/)[^\?\s]*)(\?[^\s]*)?$/,l=["{","}","|","\\","^","`"].concat(["<",">",'"',"`"," ","\r","\n","\t"]),c=["'"].concat(l),h=["%","/","?",";","#"].concat(c),f=["/","?","#"],p=/^[+a-z0-9A-Z_-]{0,63}$/,d=/^([+a-z0-9A-Z_-]{0,63})(.*)$/,y={javascript:!0,"javascript:":!0},m={javascript:!0,"javascript:":!0},g={http:!0,https:!0,ftp:!0,gopher:!0,file:!0,"http:":!0,"https:":!0,"ftp:":!0,"gopher:":!0,"file:":!0},_=n(7673);function b(t,e,n){if(t&&i.isObject(t)&&t instanceof o)return t;var r=new o;return r.parse(t,e,n),r}o.prototype.parse=function(t,e,n){if(!i.isString(t))throw new TypeError("Parameter 'url' must be a string, not "+typeof t);var o=t.indexOf("?"),s=-1!==o&&o127?R+="x":R+=P[L];if(!R.match(p)){var k=A.slice(0,S),F=A.slice(S+1),U=P.match(d);U&&(k.push(U[1]),F.unshift(U[2])),F.length&&(b="/"+F.join(".")+b),this.hostname=k.join(".");break}}}this.hostname.length>255?this.hostname="":this.hostname=this.hostname.toLowerCase(),O||(this.hostname=r.toASCII(this.hostname));var B=this.port?":"+this.port:"",j=this.hostname||"";this.host=j+B,this.href+=this.host,O&&(this.hostname=this.hostname.substr(1,this.hostname.length-2),"/"!==b[0]&&(b="/"+b))}if(!y[E])for(S=0,I=c.length;S0)&&n.host.split("@"))&&(n.auth=O.shift(),n.host=n.hostname=O.shift())),n.search=t.search,n.query=t.query,i.isNull(n.pathname)&&i.isNull(n.search)||(n.path=(n.pathname?n.pathname:"")+(n.search?n.search:"")),n.href=n.format(),n;if(!w.length)return n.pathname=null,n.search?n.path="/"+n.search:n.path=null,n.href=n.format(),n;for(var C=w.slice(-1)[0],M=(n.host||t.host||w.length>1)&&("."===C||".."===C)||""===C,S=0,N=w.length;N>=0;N--)"."===(C=w[N])?w.splice(N,1):".."===C?(w.splice(N,1),S++):S&&(w.splice(N,1),S--);if(!T&&!E)for(;S--;S)w.unshift("..");!T||""===w[0]||w[0]&&"/"===w[0].charAt(0)||w.unshift(""),M&&"/"!==w.join("/").substr(-1)&&w.push("");var O,A=""===w[0]||w[0]&&"/"===w[0].charAt(0);return x&&(n.hostname=n.host=A?"":w.length?w.shift():"",(O=!!(n.host&&n.host.indexOf("@")>0)&&n.host.split("@"))&&(n.auth=O.shift(),n.host=n.hostname=O.shift())),(T=T||n.host&&w.length)&&!A&&w.unshift(""),w.length?n.pathname=w.join("/"):(n.pathname=null,n.path=null),i.isNull(n.pathname)&&i.isNull(n.search)||(n.path=(n.pathname?n.pathname:"")+(n.search?n.search:"")),n.auth=t.auth||n.auth,n.slashes=n.slashes||t.slashes,n.href=n.format(),n},o.prototype.parseHost=function(){var t=this.host,e=s.exec(t);e&&(":"!==(e=e[0])&&(this.port=e.substr(1)),t=t.substr(0,t.length-e.length)),t&&(this.hostname=t)}},2502:t=>{"use strict";t.exports={isString:function(t){return"string"==typeof t},isObject:function(t){return"object"==typeof t&&null!==t},isNull:function(t){return null===t},isNullOrUndefined:function(t){return null==t}}},4927:(t,e,n)=>{var r=n(5108);function i(t){try{if(!n.g.localStorage)return!1}catch(t){return!1}var e=n.g.localStorage[t];return null!=e&&"true"===String(e).toLowerCase()}t.exports=function(t,e){if(i("noDeprecation"))return t;var n=!1;return function(){if(!n){if(i("throwDeprecation"))throw new Error(e);i("traceDeprecation")?r.trace(e):r.warn(e),n=!0}return t.apply(this,arguments)}}},1496:t=>{"function"==typeof Object.create?t.exports=function(t,e){t.super_=e,t.prototype=Object.create(e.prototype,{constructor:{value:t,enumerable:!1,writable:!0,configurable:!0}})}:t.exports=function(t,e){t.super_=e;var n=function(){};n.prototype=e.prototype,t.prototype=new n,t.prototype.constructor=t}},384:t=>{t.exports=function(t){return t&&"object"==typeof t&&"function"==typeof t.copy&&"function"==typeof t.fill&&"function"==typeof t.readUInt8}},9539:(t,e,n)=>{var r=n(4155),i=n(5108),o=/%[sdj%]/g;e.format=function(t){if(!_(t)){for(var e=[],n=0;n=i)return t;switch(t){case"%s":return String(r[n++]);case"%d":return Number(r[n++]);case"%j":try{return JSON.stringify(r[n++])}catch(t){return"[Circular]"}default:return t}})),s=r[n];n=3&&(r.depth=arguments[2]),arguments.length>=4&&(r.colors=arguments[3]),y(n)?r.showHidden=n:n&&e._extend(r,n),b(r.showHidden)&&(r.showHidden=!1),b(r.depth)&&(r.depth=2),b(r.colors)&&(r.colors=!1),b(r.customInspect)&&(r.customInspect=!0),r.colors&&(r.stylize=l),h(r,t,r.depth)}function l(t,e){var n=u.styles[e];return n?"["+u.colors[n][0]+"m"+t+"["+u.colors[n][1]+"m":t}function c(t,e){return t}function h(t,n,r){if(t.customInspect&&n&&x(n.inspect)&&n.inspect!==e.inspect&&(!n.constructor||n.constructor.prototype!==n)){var i=n.inspect(r,t);return _(i)||(i=h(t,i,r)),i}var o=function(t,e){if(b(e))return t.stylize("undefined","undefined");if(_(e)){var n="'"+JSON.stringify(e).replace(/^"|"$/g,"").replace(/'/g,"\\'").replace(/\\"/g,'"')+"'";return t.stylize(n,"string")}return g(e)?t.stylize(""+e,"number"):y(e)?t.stylize(""+e,"boolean"):m(e)?t.stylize("null","null"):void 0}(t,n);if(o)return o;var a=Object.keys(n),s=function(t){var e={};return t.forEach((function(t,n){e[t]=!0})),e}(a);if(t.showHidden&&(a=Object.getOwnPropertyNames(n)),w(n)&&(a.indexOf("message")>=0||a.indexOf("description")>=0))return f(n);if(0===a.length){if(x(n)){var u=n.name?": "+n.name:"";return t.stylize("[Function"+u+"]","special")}if(v(n))return t.stylize(RegExp.prototype.toString.call(n),"regexp");if(E(n))return t.stylize(Date.prototype.toString.call(n),"date");if(w(n))return f(n)}var l,c="",T=!1,C=["{","}"];return d(n)&&(T=!0,C=["[","]"]),x(n)&&(c=" [Function"+(n.name?": "+n.name:"")+"]"),v(n)&&(c=" "+RegExp.prototype.toString.call(n)),E(n)&&(c=" "+Date.prototype.toUTCString.call(n)),w(n)&&(c=" "+f(n)),0!==a.length||T&&0!=n.length?r<0?v(n)?t.stylize(RegExp.prototype.toString.call(n),"regexp"):t.stylize("[Object]","special"):(t.seen.push(n),l=T?function(t,e,n,r,i){for(var o=[],a=0,s=e.length;a60?n[0]+(""===e?"":e+"\n ")+" "+t.join(",\n ")+" "+n[1]:n[0]+e+" "+t.join(", ")+" "+n[1]}(l,c,C)):C[0]+c+C[1]}function f(t){return"["+Error.prototype.toString.call(t)+"]"}function p(t,e,n,r,i,o){var a,s,u;if((u=Object.getOwnPropertyDescriptor(e,i)||{value:e[i]}).get?s=u.set?t.stylize("[Getter/Setter]","special"):t.stylize("[Getter]","special"):u.set&&(s=t.stylize("[Setter]","special")),O(r,i)||(a="["+i+"]"),s||(t.seen.indexOf(u.value)<0?(s=m(n)?h(t,u.value,null):h(t,u.value,n-1)).indexOf("\n")>-1&&(s=o?s.split("\n").map((function(t){return" "+t})).join("\n").substr(2):"\n"+s.split("\n").map((function(t){return" "+t})).join("\n")):s=t.stylize("[Circular]","special")),b(a)){if(o&&i.match(/^\d+$/))return s;(a=JSON.stringify(""+i)).match(/^"([a-zA-Z_][a-zA-Z_0-9]*)"$/)?(a=a.substr(1,a.length-2),a=t.stylize(a,"name")):(a=a.replace(/'/g,"\\'").replace(/\\"/g,'"').replace(/(^"|"$)/g,"'"),a=t.stylize(a,"string"))}return a+": "+s}function d(t){return Array.isArray(t)}function y(t){return"boolean"==typeof t}function m(t){return null===t}function g(t){return"number"==typeof t}function _(t){return"string"==typeof t}function b(t){return void 0===t}function v(t){return T(t)&&"[object RegExp]"===C(t)}function T(t){return"object"==typeof t&&null!==t}function E(t){return T(t)&&"[object Date]"===C(t)}function w(t){return T(t)&&("[object Error]"===C(t)||t instanceof Error)}function x(t){return"function"==typeof t}function C(t){return Object.prototype.toString.call(t)}function M(t){return t<10?"0"+t.toString(10):t.toString(10)}e.debuglog=function(t){if(b(a)&&(a=r.env.NODE_DEBUG||""),t=t.toUpperCase(),!s[t])if(new RegExp("\\b"+t+"\\b","i").test(a)){var n=r.pid;s[t]=function(){var r=e.format.apply(e,arguments);i.error("%s %d: %s",t,n,r)}}else s[t]=function(){};return s[t]},e.inspect=u,u.colors={bold:[1,22],italic:[3,23],underline:[4,24],inverse:[7,27],white:[37,39],grey:[90,39],black:[30,39],blue:[34,39],cyan:[36,39],green:[32,39],magenta:[35,39],red:[31,39],yellow:[33,39]},u.styles={special:"cyan",number:"yellow",boolean:"yellow",undefined:"grey",null:"bold",string:"green",date:"magenta",regexp:"red"},e.isArray=d,e.isBoolean=y,e.isNull=m,e.isNullOrUndefined=function(t){return null==t},e.isNumber=g,e.isString=_,e.isSymbol=function(t){return"symbol"==typeof t},e.isUndefined=b,e.isRegExp=v,e.isObject=T,e.isDate=E,e.isError=w,e.isFunction=x,e.isPrimitive=function(t){return null===t||"boolean"==typeof t||"number"==typeof t||"string"==typeof t||"symbol"==typeof t||void 0===t},e.isBuffer=n(384);var S=["Jan","Feb","Mar","Apr","May","Jun","Jul","Aug","Sep","Oct","Nov","Dec"];function N(){var t=new Date,e=[M(t.getHours()),M(t.getMinutes()),M(t.getSeconds())].join(":");return[t.getDate(),S[t.getMonth()],e].join(" ")}function O(t,e){return Object.prototype.hasOwnProperty.call(t,e)}e.log=function(){i.log("%s - %s",N(),e.format.apply(e,arguments))},e.inherits=n(1496),e._extend=function(t,e){if(!e||!T(e))return t;for(var n=Object.keys(e),r=n.length;r--;)t[n[r]]=e[n[r]];return t}},8034:t=>{var e=arguments[3],n=arguments[4],r=arguments[5],i=JSON.stringify;t.exports=function(t,o){for(var a,s=Object.keys(r),u=0,l=s.length;u{var r=n(3085).Buffer;function i(t,e){this.buffer=t,this.position=0,this.isBigEndian=e||!1}function o(t,e,n){return function(){var r;return r=this.isBigEndian?e.call(this.buffer,this.position):t.call(this.buffer,this.position),this.position+=n,r}}t.exports=i,i.prototype.readUInt8=o(r.prototype.readUInt8,r.prototype.readUInt8,1),i.prototype.readUInt16=o(r.prototype.readUInt16LE,r.prototype.readUInt16BE,2),i.prototype.readUInt32=o(r.prototype.readUInt32LE,r.prototype.readUInt32BE,4),i.prototype.readInt8=o(r.prototype.readInt8,r.prototype.readInt8,1),i.prototype.readInt16=o(r.prototype.readInt16LE,r.prototype.readInt16BE,2),i.prototype.readInt32=o(r.prototype.readInt32LE,r.prototype.readInt32BE,4),i.prototype.readFloat=o(r.prototype.readFloatLE,r.prototype.readFloatBE,4),i.prototype.readDouble=o(r.prototype.readDoubleLE,r.prototype.readDoubleBE,8),i.prototype.readVarInt=function(){var t,e=0,n=0;do{e+=(127&(t=this.buffer[this.position+n]))<<7*n,n++}while(t>=128);return this.position+=n,e}},2659:(t,e,n)=>{var r=n(3085).Buffer;function i(t,e){this.buffer=new r(t),this.position=0,this.allowResize=e}function o(t,e){return function(n,r){this.ensureSize(e),t.call(this.buffer,n,this.position,r),this.position+=e}}t.exports=i,i.prototype.writeUInt8=o(r.prototype.writeUInt8,1),i.prototype.writeUInt16LE=o(r.prototype.writeUInt16LE,2),i.prototype.writeUInt16BE=o(r.prototype.writeUInt16BE,2),i.prototype.writeUInt32LE=o(r.prototype.writeUInt32LE,4),i.prototype.writeUInt32BE=o(r.prototype.writeUInt32BE,4),i.prototype.writeInt8=o(r.prototype.writeInt8,1),i.prototype.writeInt16LE=o(r.prototype.writeInt16LE,2),i.prototype.writeInt16BE=o(r.prototype.writeInt16BE,2),i.prototype.writeInt32LE=o(r.prototype.writeInt32LE,4),i.prototype.writeInt32BE=o(r.prototype.writeInt32BE,4),i.prototype.writeFloatLE=o(r.prototype.writeFloatLE,4),i.prototype.writeFloatBE=o(r.prototype.writeFloatBE,4),i.prototype.writeDoubleLE=o(r.prototype.writeDoubleLE,8),i.prototype.writeDoubleBE=o(r.prototype.writeDoubleBE,8),i.prototype.writeBuffer=function(t){this.ensureSize(t.length),t.copy(this.buffer,this.position,0,t.length),this.position+=t.length},i.prototype.writeVarInt=function(t){for(var e=1;0!=(4294967168&t);)this.writeUInt8(127&t|128),t>>>=7,e++;return this.writeUInt8(127&t),e},i.prototype.ensureSize=function(t){if(this.buffer.length{var r=n(3085).Buffer;t.exports=m;var i=n(4905),o=n(9213),a=n(9645),s=n(978),u=n(1665),l=n(9606),c=n(9763),h=n(2292),f=n(6382),p=n(2659),d=n(2620),y=n(3172);function m(){this.srid=void 0,this.hasZ=!1,this.hasM=!1}m.parse=function(t,e){if("string"==typeof t||t instanceof d)return m._parseWkt(t);if(r.isBuffer(t)||t instanceof f)return m._parseWkb(t,e);throw new Error("first argument must be a string or Buffer")},m._parseWkt=function(t){var e,n,r=(e=t instanceof d?t:new d(t)).matchRegex([/^SRID=(\d+);/]);r&&(n=parseInt(r[1],10));var f=e.matchType(),p=e.matchDimension(),y={srid:n,hasZ:p.hasZ,hasM:p.hasM};switch(f){case i.wkt.Point:return o._parseWkt(e,y);case i.wkt.LineString:return a._parseWkt(e,y);case i.wkt.Polygon:return s._parseWkt(e,y);case i.wkt.MultiPoint:return u._parseWkt(e,y);case i.wkt.MultiLineString:return l._parseWkt(e,y);case i.wkt.MultiPolygon:return c._parseWkt(e,y);case i.wkt.GeometryCollection:return h._parseWkt(e,y)}},m._parseWkb=function(t,e){var n,r,p,d={};switch((n=t instanceof f?t:new f(t)).isBigEndian=!n.readInt8(),r=n.readUInt32(),d.hasSrid=536870912==(536870912&r),d.isEwkb=536870912&r||1073741824&r||2147483648&r,d.hasSrid&&(d.srid=n.readUInt32()),d.hasZ=!1,d.hasM=!1,d.isEwkb||e&&e.isEwkb?(2147483648&r&&(d.hasZ=!0),1073741824&r&&(d.hasM=!0),p=15&r):r>=1e3&&r<2e3?(d.hasZ=!0,p=r-1e3):r>=2e3&&r<3e3?(d.hasM=!0,p=r-2e3):r>=3e3&&r<4e3?(d.hasZ=!0,d.hasM=!0,p=r-3e3):p=r,p){case i.wkb.Point:return o._parseWkb(n,d);case i.wkb.LineString:return a._parseWkb(n,d);case i.wkb.Polygon:return s._parseWkb(n,d);case i.wkb.MultiPoint:return u._parseWkb(n,d);case i.wkb.MultiLineString:return l._parseWkb(n,d);case i.wkb.MultiPolygon:return c._parseWkb(n,d);case i.wkb.GeometryCollection:return h._parseWkb(n,d);default:throw new Error("GeometryType "+p+" not supported")}},m.parseTwkb=function(t){var e,n={},r=(e=t instanceof f?t:new f(t)).readUInt8(),p=e.readUInt8(),d=15&r;if(n.precision=y.decode(r>>4),n.precisionFactor=Math.pow(10,n.precision),n.hasBoundingBox=p>>0&1,n.hasSizeAttribute=p>>1&1,n.hasIdList=p>>2&1,n.hasExtendedPrecision=p>>3&1,n.isEmpty=p>>4&1,n.hasExtendedPrecision){var m=e.readUInt8();n.hasZ=1==(1&m),n.hasM=2==(2&m),n.zPrecision=y.decode((28&m)>>2),n.zPrecisionFactor=Math.pow(10,n.zPrecision),n.mPrecision=y.decode((224&m)>>5),n.mPrecisionFactor=Math.pow(10,n.mPrecision)}else n.hasZ=!1,n.hasM=!1;if(n.hasSizeAttribute&&e.readVarInt(),n.hasBoundingBox){var g=2;n.hasZ&&g++,n.hasM&&g++;for(var _=0;_>>0,!0),t.writeUInt32LE(this.srid),t.writeBuffer(e.slice(5)),t.buffer},m.prototype._getWktType=function(t,e){var n=t;return this.hasZ&&this.hasM?n+=" ZM ":this.hasZ?n+=" Z ":this.hasM&&(n+=" M "),!e||this.hasZ||this.hasM||(n+=" "),e&&(n+="EMPTY"),n},m.prototype._getWktCoordinate=function(t){var e=t.x+" "+t.y;return this.hasZ&&(e+=" "+t.z),this.hasM&&(e+=" "+t.m),e},m.prototype._writeWkbType=function(t,e,n){var r=0;void 0!==this.srid||n&&void 0!==n.srid?(this.hasZ&&(r|=2147483648),this.hasM&&(r|=1073741824)):this.hasZ&&this.hasM?r+=3e3:this.hasZ?r+=1e3:this.hasM&&(r+=2e3),t.writeUInt32LE(r+e>>>0,!0)},m.getTwkbPrecision=function(t,e,n){return{xy:t,z:e,m:n,xyFactor:Math.pow(10,t),zFactor:Math.pow(10,e),mFactor:Math.pow(10,n)}},m.prototype._writeTwkbHeader=function(t,e,n,r){var i=(y.encode(n.xy)<<4)+e,o=(this.hasZ||this.hasM)<<3;if(o+=r<<4,t.writeUInt8(i),t.writeUInt8(o),this.hasZ||this.hasM){var a=0;this.hasZ&&(a|=1),this.hasM&&(a|=2),t.writeUInt8(a)}},m.prototype.toGeoJSON=function(t){var e={};return this.srid&&t&&(t.shortCrs?e.crs={type:"name",properties:{name:"EPSG:"+this.srid}}:t.longCrs&&(e.crs={type:"name",properties:{name:"urn:ogc:def:crs:EPSG::"+this.srid}})),e}},2292:(t,e,n)=>{t.exports=s;var r=n(9539),i=n(4905),o=n(7056),a=n(2659);function s(t,e){o.call(this),this.geometries=t||[],this.srid=e,this.geometries.length>0&&(this.hasZ=this.geometries[0].hasZ,this.hasM=this.geometries[0].hasM)}r.inherits(s,o),s.Z=function(t,e){var n=new s(t,e);return n.hasZ=!0,n},s.M=function(t,e){var n=new s(t,e);return n.hasM=!0,n},s.ZM=function(t,e){var n=new s(t,e);return n.hasZ=!0,n.hasM=!0,n},s._parseWkt=function(t,e){var n=new s;if(n.srid=e.srid,n.hasZ=e.hasZ,n.hasM=e.hasM,t.isMatch(["EMPTY"]))return n;t.expectGroupStart();do{n.geometries.push(o.parse(t))}while(t.isMatch([","]));return t.expectGroupEnd(),n},s._parseWkb=function(t,e){var n=new s;n.srid=e.srid,n.hasZ=e.hasZ,n.hasM=e.hasM;for(var r=t.readUInt32(),i=0;i0&&(e.hasZ=e.geometries[0].hasZ),e},s.prototype.toWkt=function(){if(0===this.geometries.length)return this._getWktType(i.wkt.GeometryCollection,!0);for(var t=this._getWktType(i.wkt.GeometryCollection,!1)+"(",e=0;e0){t.writeVarInt(this.geometries.length);for(var r=0;r{t.exports=u;var r=n(9539),i=n(7056),o=n(4905),a=n(9213),s=n(2659);function u(t,e){i.call(this),this.points=t||[],this.srid=e,this.points.length>0&&(this.hasZ=this.points[0].hasZ,this.hasM=this.points[0].hasM)}r.inherits(u,i),u.Z=function(t,e){var n=new u(t,e);return n.hasZ=!0,n},u.M=function(t,e){var n=new u(t,e);return n.hasM=!0,n},u.ZM=function(t,e){var n=new u(t,e);return n.hasZ=!0,n.hasM=!0,n},u._parseWkt=function(t,e){var n=new u;return n.srid=e.srid,n.hasZ=e.hasZ,n.hasM=e.hasM,t.isMatch(["EMPTY"])||(t.expectGroupStart(),n.points.push.apply(n.points,t.matchCoordinates(e)),t.expectGroupEnd()),n},u._parseWkb=function(t,e){var n=new u;n.srid=e.srid,n.hasZ=e.hasZ,n.hasM=e.hasM;for(var r=t.readUInt32(),i=0;i0&&(e.hasZ=t.coordinates[0].length>2);for(var n=0;n0){t.writeVarInt(this.points.length);for(var r=new a(0,0,0,0),u=0;u{t.exports=l;var r=n(9539),i=n(4905),o=n(7056),a=n(9213),s=n(9645),u=n(2659);function l(t,e){o.call(this),this.lineStrings=t||[],this.srid=e,this.lineStrings.length>0&&(this.hasZ=this.lineStrings[0].hasZ,this.hasM=this.lineStrings[0].hasM)}r.inherits(l,o),l.Z=function(t,e){var n=new l(t,e);return n.hasZ=!0,n},l.M=function(t,e){var n=new l(t,e);return n.hasM=!0,n},l.ZM=function(t,e){var n=new l(t,e);return n.hasZ=!0,n.hasM=!0,n},l._parseWkt=function(t,e){var n=new l;if(n.srid=e.srid,n.hasZ=e.hasZ,n.hasM=e.hasM,t.isMatch(["EMPTY"]))return n;t.expectGroupStart();do{t.expectGroupStart(),n.lineStrings.push(new s(t.matchCoordinates(e))),t.expectGroupEnd()}while(t.isMatch([","]));return t.expectGroupEnd(),n},l._parseWkb=function(t,e){var n=new l;n.srid=e.srid,n.hasZ=e.hasZ,n.hasM=e.hasM;for(var r=t.readUInt32(),i=0;i0&&t.coordinates[0].length>0&&(e.hasZ=t.coordinates[0][0].length>2);for(var n=0;n0){t.writeVarInt(this.lineStrings.length);for(var r=new a(0,0,0,0),s=0;s{t.exports=u;var r=n(9539),i=n(4905),o=n(7056),a=n(9213),s=n(2659);function u(t,e){o.call(this),this.points=t||[],this.srid=e,this.points.length>0&&(this.hasZ=this.points[0].hasZ,this.hasM=this.points[0].hasM)}r.inherits(u,o),u.Z=function(t,e){var n=new u(t,e);return n.hasZ=!0,n},u.M=function(t,e){var n=new u(t,e);return n.hasM=!0,n},u.ZM=function(t,e){var n=new u(t,e);return n.hasZ=!0,n.hasM=!0,n},u._parseWkt=function(t,e){var n=new u;return n.srid=e.srid,n.hasZ=e.hasZ,n.hasM=e.hasM,t.isMatch(["EMPTY"])||(t.expectGroupStart(),n.points.push.apply(n.points,t.matchCoordinates(e)),t.expectGroupEnd()),n},u._parseWkb=function(t,e){var n=new u;n.srid=e.srid,n.hasZ=e.hasZ,n.hasM=e.hasM;for(var r=t.readUInt32(),i=0;i0&&(e.hasZ=t.coordinates[0].length>2);for(var n=0;n0){t.writeVarInt(this.points.length);for(var r=new a(0,0,0,0),u=0;u{t.exports=l;var r=n(9539),i=n(4905),o=n(7056),a=n(9213),s=n(978),u=n(2659);function l(t,e){o.call(this),this.polygons=t||[],this.srid=e,this.polygons.length>0&&(this.hasZ=this.polygons[0].hasZ,this.hasM=this.polygons[0].hasM)}r.inherits(l,o),l.Z=function(t,e){var n=new l(t,e);return n.hasZ=!0,n},l.M=function(t,e){var n=new l(t,e);return n.hasM=!0,n},l.ZM=function(t,e){var n=new l(t,e);return n.hasZ=!0,n.hasM=!0,n},l._parseWkt=function(t,e){var n=new l;if(n.srid=e.srid,n.hasZ=e.hasZ,n.hasM=e.hasM,t.isMatch(["EMPTY"]))return n;t.expectGroupStart();do{t.expectGroupStart();var r=[],i=[];for(t.expectGroupStart(),r.push.apply(r,t.matchCoordinates(e)),t.expectGroupEnd();t.isMatch([","]);)t.expectGroupStart(),i.push(t.matchCoordinates(e)),t.expectGroupEnd();n.polygons.push(new s(r,i)),t.expectGroupEnd()}while(t.isMatch([","]));return t.expectGroupEnd(),n},l._parseWkb=function(t,e){var n=new l;n.srid=e.srid,n.hasZ=e.hasZ,n.hasM=e.hasM;for(var r=t.readUInt32(),i=0;i0&&t.coordinates[0].length>0&&t.coordinates[0][0].length>0&&(e.hasZ=t.coordinates[0][0][0].length>2);for(var n=0;n0){t.writeVarInt(this.polygons.length);for(var r=new a(0,0,0,0),s=0;s{t.exports=u;var r=n(9539),i=n(7056),o=n(4905),a=n(2659),s=n(3172);function u(t,e,n,r,o){i.call(this),this.x=t,this.y=e,this.z=n,this.m=r,this.srid=o,this.hasZ=void 0!==this.z,this.hasM=void 0!==this.m}r.inherits(u,i),u.Z=function(t,e,n,r){var i=new u(t,e,n,void 0,r);return i.hasZ=!0,i},u.M=function(t,e,n,r){var i=new u(t,e,void 0,n,r);return i.hasM=!0,i},u.ZM=function(t,e,n,r,i){var o=new u(t,e,n,r,i);return o.hasZ=!0,o.hasM=!0,o},u._parseWkt=function(t,e){var n=new u;if(n.srid=e.srid,n.hasZ=e.hasZ,n.hasM=e.hasM,t.isMatch(["EMPTY"]))return n;t.expectGroupStart();var r=t.matchCoordinate(e);return n.x=r.x,n.y=r.y,n.z=r.z,n.m=r.m,t.expectGroupEnd(),n},u._parseWkb=function(t,e){var n=u._readWkbPoint(t,e);return n.srid=e.srid,n},u._readWkbPoint=function(t,e){return new u(t.readDouble(),t.readDouble(),e.hasZ?t.readDouble():void 0,e.hasM?t.readDouble():void 0)},u._parseTwkb=function(t,e){var n=new u;return n.hasZ=e.hasZ,n.hasM=e.hasM,e.isEmpty||(n.x=s.decode(t.readVarInt())/e.precisionFactor,n.y=s.decode(t.readVarInt())/e.precisionFactor,n.z=e.hasZ?s.decode(t.readVarInt())/e.zPrecisionFactor:void 0,n.m=e.hasM?s.decode(t.readVarInt())/e.mPrecisionFactor:void 0),n},u._readTwkbPoint=function(t,e,n){return n.x+=s.decode(t.readVarInt())/e.precisionFactor,n.y+=s.decode(t.readVarInt())/e.precisionFactor,e.hasZ&&(n.z+=s.decode(t.readVarInt())/e.zPrecisionFactor),e.hasM&&(n.m+=s.decode(t.readVarInt())/e.mPrecisionFactor),new u(n.x,n.y,n.z,n.m)},u._parseGeoJSON=function(t){return u._readGeoJSONPoint(t.coordinates)},u._readGeoJSONPoint=function(t){return 0===t.length?new u:t.length>2?new u(t[0],t[1],t[2]):new u(t[0],t[1])},u.prototype.toWkt=function(){return void 0===this.x&&void 0===this.y&&void 0===this.z&&void 0===this.m?this._getWktType(o.wkt.Point,!0):this._getWktType(o.wkt.Point,!1)+"("+this._getWktCoordinate(this)+")"},u.prototype.toWkb=function(t){var e=new a(this._getWkbSize());return e.writeInt8(1),this._writeWkbType(e,o.wkb.Point,t),void 0===this.x&&void 0===this.y?(e.writeDoubleLE(NaN),e.writeDoubleLE(NaN),this.hasZ&&e.writeDoubleLE(NaN),this.hasM&&e.writeDoubleLE(NaN)):this._writeWkbPoint(e),e.buffer},u.prototype._writeWkbPoint=function(t){t.writeDoubleLE(this.x),t.writeDoubleLE(this.y),this.hasZ&&t.writeDoubleLE(this.z),this.hasM&&t.writeDoubleLE(this.m)},u.prototype.toTwkb=function(){var t=new a(0,!0),e=i.getTwkbPrecision(5,0,0),n=void 0===this.x&&void 0===this.y;return this._writeTwkbHeader(t,o.wkb.Point,e,n),n||this._writeTwkbPoint(t,e,new u(0,0,0,0)),t.buffer},u.prototype._writeTwkbPoint=function(t,e,n){var r=this.x*e.xyFactor,i=this.y*e.xyFactor,o=this.z*e.zFactor,a=this.m*e.mFactor;t.writeVarInt(s.encode(r-n.x)),t.writeVarInt(s.encode(i-n.y)),this.hasZ&&t.writeVarInt(s.encode(o-n.z)),this.hasM&&t.writeVarInt(s.encode(a-n.m)),n.x=r,n.y=i,n.z=o,n.m=a},u.prototype._getWkbSize=function(){var t=21;return this.hasZ&&(t+=8),this.hasM&&(t+=8),t},u.prototype.toGeoJSON=function(t){var e=i.prototype.toGeoJSON.call(this,t);return e.type=o.geoJSON.Point,void 0===this.x&&void 0===this.y?e.coordinates=[]:void 0!==this.z?e.coordinates=[this.x,this.y,this.z]:e.coordinates=[this.x,this.y],e}},978:(t,e,n)=>{t.exports=u;var r=n(9539),i=n(7056),o=n(4905),a=n(9213),s=n(2659);function u(t,e,n){i.call(this),this.exteriorRing=t||[],this.interiorRings=e||[],this.srid=n,this.exteriorRing.length>0&&(this.hasZ=this.exteriorRing[0].hasZ,this.hasM=this.exteriorRing[0].hasM)}r.inherits(u,i),u.Z=function(t,e,n){var r=new u(t,e,n);return r.hasZ=!0,r},u.M=function(t,e,n){var r=new u(t,e,n);return r.hasM=!0,r},u.ZM=function(t,e,n){var r=new u(t,e,n);return r.hasZ=!0,r.hasM=!0,r},u._parseWkt=function(t,e){var n=new u;if(n.srid=e.srid,n.hasZ=e.hasZ,n.hasM=e.hasM,t.isMatch(["EMPTY"]))return n;for(t.expectGroupStart(),t.expectGroupStart(),n.exteriorRing.push.apply(n.exteriorRing,t.matchCoordinates(e)),t.expectGroupEnd();t.isMatch([","]);)t.expectGroupStart(),n.interiorRings.push(t.matchCoordinates(e)),t.expectGroupEnd();return t.expectGroupEnd(),n},u._parseWkb=function(t,e){var n=new u;n.srid=e.srid,n.hasZ=e.hasZ,n.hasM=e.hasM;var r=t.readUInt32();if(r>0){for(var i=t.readUInt32(),o=0;o0&&t.coordinates[0].length>0&&(e.hasZ=t.coordinates[0][0].length>2);for(var n=0;n0&&e.interiorRings.push([]);for(var r=0;r0?(e.writeUInt32LE(1+this.interiorRings.length),e.writeUInt32LE(this.exteriorRing.length)):e.writeUInt32LE(0);for(var n=0;n0){t.writeVarInt(1+this.interiorRings.length),t.writeVarInt(this.exteriorRing.length);for(var r=new a(0,0,0,0),u=0;u0&&(e+=4+this.exteriorRing.length*t);for(var n=0;n0){for(var n=[],r=0;r{t.exports={wkt:{Point:"POINT",LineString:"LINESTRING",Polygon:"POLYGON",MultiPoint:"MULTIPOINT",MultiLineString:"MULTILINESTRING",MultiPolygon:"MULTIPOLYGON",GeometryCollection:"GEOMETRYCOLLECTION"},wkb:{Point:1,LineString:2,Polygon:3,MultiPoint:4,MultiLineString:5,MultiPolygon:6,GeometryCollection:7},geoJSON:{Point:"Point",LineString:"LineString",Polygon:"Polygon",MultiPoint:"MultiPoint",MultiLineString:"MultiLineString",MultiPolygon:"MultiPolygon",GeometryCollection:"GeometryCollection"}}},2620:(t,e,n)=>{t.exports=o;var r=n(4905),i=n(9213);function o(t){this.value=t,this.position=0}o.prototype.match=function(t){this.skipWhitespaces();for(var e=0;e{e.Types=n(4905),e.Geometry=n(7056),e.Point=n(9213),e.LineString=n(9645),e.Polygon=n(978),e.MultiPoint=n(1665),e.MultiLineString=n(9606),e.MultiPolygon=n(9763),e.GeometryCollection=n(2292)},3172:t=>{t.exports={encode:function(t){return t<<1^t>>31},decode:function(t){return t>>1^-(1&t)}}},7529:t=>{t.exports=function(){for(var t={},n=0;n{"use strict";if(void 0===__WEBPACK_EXTERNAL_MODULE__3730__){var e=new Error("Cannot find module 'better-sqlite3'");throw e.code="MODULE_NOT_FOUND",e}t.exports=__WEBPACK_EXTERNAL_MODULE__3730__},5699:()=>{},4919:()=>{},1929:()=>{},2203:()=>{},7990:()=>{},8497:()=>{},1408:()=>{},3646:()=>{}},__webpack_module_cache__={};function __webpack_require__(t){var e=__webpack_module_cache__[t];if(void 0!==e)return e.exports;var n=__webpack_module_cache__[t]={id:t,loaded:!1,exports:{}};return __webpack_modules__[t].call(n.exports,n,n.exports,__webpack_require__),n.loaded=!0,n.exports}__webpack_require__.n=t=>{var e=t&&t.__esModule?()=>t.default:()=>t;return __webpack_require__.d(e,{a:e}),e},__webpack_require__.d=(t,e)=>{for(var n in e)__webpack_require__.o(e,n)&&!__webpack_require__.o(t,n)&&Object.defineProperty(t,n,{enumerable:!0,get:e[n]})},__webpack_require__.g=function(){if("object"==typeof globalThis)return globalThis;try{return this||new Function("return this")()}catch(t){if("object"==typeof window)return window}}(),__webpack_require__.o=(t,e)=>Object.prototype.hasOwnProperty.call(t,e),__webpack_require__.r=t=>{"undefined"!=typeof Symbol&&Symbol.toStringTag&&Object.defineProperty(t,Symbol.toStringTag,{value:"Module"}),Object.defineProperty(t,"__esModule",{value:!0})},__webpack_require__.nmd=t=>(t.paths=[],t.children||(t.children=[]),t);var __webpack_exports__={};return(()=>{"use strict";var t=__webpack_exports__;Object.defineProperty(t,"__esModule",{value:!0}),t.OffscreenCanvasAdapter=t.NumberFeaturesTile=t.MetadataReference=t.MetadataExtension=t.MetadataDao=t.Metadata=t.MediaTable=t.ImageUtils=t.IconTable=t.Icons=t.IconCache=t.HtmlCanvasAdapter=t.GeoPackageValidate=t.GeoPackageTileRetriever=t.GeoPackageDataType=t.GeoPackageConnection=t.GeoPackageAPI=t.GeoPackage=t.GeometryData=t.GeometryColumnsDao=t.GeometryColumns=t.GeometryType=t.FeatureTiles=t.FeatureTableStyles=t.FeatureTableReader=t.FeatureTableIndex=t.FeatureTable=t.FeatureStyles=t.FeatureStyleExtension=t.FeatureStyle=t.FeaturePaint=t.FeatureDrawType=t.FeatureColumn=t.Extension=t.DublinCoreType=t.DublinCoreMetadata=t.DataColumnsDao=t.DataColumns=t.DataColumnConstraintsDao=t.DataColumnConstraints=t.CrsWktExtension=t.Context=t.ConstraintType=t.Constraints=t.Constraint=t.ContentsIdDao=t.ContentsDao=t.CanvasKitCanvasAdapter=t.Canvas=t.BoundingBox=void 0,t.WKB=t.WebPExtension=t.UserTableReader=t.UserTable=t.UserRow=t.UserMappingTable=t.UserDao=t.UserColumn=t.TileUtilities=t.TileTable=t.TileScalingType=t.TileScaling=t.TileMatrixSet=t.TileMatrix=t.TileColumn=t.TileBoundingBoxUtils=t.TileCreator=t.TableCreator=t.StyleTable=t.Styles=t.SqljsAdapter=t.StyleMappingTable=t.SqliteQueryBuilder=t.SqliteAdapter=t.SpatialReferenceSystem=t.SimpleAttributesTable=t.ShadedFeaturesTile=t.SchemaExtension=t.setSqljsWasmLocateFile=t.setCanvasKitWasmLocateFile=t.RTreeIndexDao=t.RTreeIndex=t.RelatedTablesExtension=t.ProjectionConstants=t.Projection=t.Paint=t.OptionBuilder=void 0;var e=__webpack_require__(2527);Object.defineProperty(t,"BoundingBox",{enumerable:!0,get:function(){return e.BoundingBox}});var n=__webpack_require__(4325);Object.defineProperty(t,"GeoPackage",{enumerable:!0,get:function(){return n.GeoPackage}});var r=__webpack_require__(6638);Object.defineProperty(t,"ContentsDao",{enumerable:!0,get:function(){return r.ContentsDao}});var i=__webpack_require__(7092);Object.defineProperty(t,"ContentsIdDao",{enumerable:!0,get:function(){return i.ContentsIdDao}});var o=__webpack_require__(8007);Object.defineProperty(t,"Constraint",{enumerable:!0,get:function(){return o.Constraint}});var a=__webpack_require__(7686);Object.defineProperty(t,"Constraints",{enumerable:!0,get:function(){return a.Constraints}});var s=__webpack_require__(91);Object.defineProperty(t,"ConstraintType",{enumerable:!0,get:function(){return s.ConstraintType}});var u=__webpack_require__(5306);Object.defineProperty(t,"CrsWktExtension",{enumerable:!0,get:function(){return u.CrsWktExtension}});var l=__webpack_require__(8590);Object.defineProperty(t,"DataColumnConstraints",{enumerable:!0,get:function(){return l.DataColumnConstraints}});var c=__webpack_require__(7175);Object.defineProperty(t,"DataColumnConstraintsDao",{enumerable:!0,get:function(){return c.DataColumnConstraintsDao}});var h=__webpack_require__(8133);Object.defineProperty(t,"DataColumns",{enumerable:!0,get:function(){return h.DataColumns}});var f=__webpack_require__(7319);Object.defineProperty(t,"GeoPackageDataType",{enumerable:!0,get:function(){return f.GeoPackageDataType}});var p=__webpack_require__(4941);Object.defineProperty(t,"DataColumnsDao",{enumerable:!0,get:function(){return p.DataColumnsDao}});var d=__webpack_require__(3096);Object.defineProperty(t,"DublinCoreMetadata",{enumerable:!0,get:function(){return d.DublinCoreMetadata}});var y=__webpack_require__(1485);Object.defineProperty(t,"DublinCoreType",{enumerable:!0,get:function(){return y.DublinCoreType}});var m=__webpack_require__(624);Object.defineProperty(t,"Extension",{enumerable:!0,get:function(){return m.Extension}});var g=__webpack_require__(961);Object.defineProperty(t,"FeatureColumn",{enumerable:!0,get:function(){return g.FeatureColumn}});var _=__webpack_require__(4538);Object.defineProperty(t,"FeatureDrawType",{enumerable:!0,get:function(){return _.FeatureDrawType}});var b=__webpack_require__(6063);Object.defineProperty(t,"FeaturePaint",{enumerable:!0,get:function(){return b.FeaturePaint}});var v=__webpack_require__(612);Object.defineProperty(t,"FeatureStyle",{enumerable:!0,get:function(){return v.FeatureStyle}});var T=__webpack_require__(8479);Object.defineProperty(t,"FeatureStyleExtension",{enumerable:!0,get:function(){return T.FeatureStyleExtension}});var E=__webpack_require__(2752);Object.defineProperty(t,"FeatureStyles",{enumerable:!0,get:function(){return E.FeatureStyles}});var w=__webpack_require__(8412);Object.defineProperty(t,"FeatureTable",{enumerable:!0,get:function(){return w.FeatureTable}});var x=__webpack_require__(5626);Object.defineProperty(t,"FeatureTableIndex",{enumerable:!0,get:function(){return x.FeatureTableIndex}});var C=__webpack_require__(4896);Object.defineProperty(t,"FeatureTableReader",{enumerable:!0,get:function(){return C.FeatureTableReader}});var M=__webpack_require__(6536);Object.defineProperty(t,"FeatureTableStyles",{enumerable:!0,get:function(){return M.FeatureTableStyles}});var S=__webpack_require__(297);Object.defineProperty(t,"FeatureTiles",{enumerable:!0,get:function(){return S.FeatureTiles}});var N=__webpack_require__(812);Object.defineProperty(t,"GeometryColumns",{enumerable:!0,get:function(){return N.GeometryColumns}});var O=__webpack_require__(1968);Object.defineProperty(t,"GeometryColumnsDao",{enumerable:!0,get:function(){return O.GeometryColumnsDao}});var A=__webpack_require__(857);Object.defineProperty(t,"GeometryData",{enumerable:!0,get:function(){return A.GeometryData}});var I=__webpack_require__(9211);Object.defineProperty(t,"GeometryType",{enumerable:!0,get:function(){return I.GeometryType}});var P=__webpack_require__(1191);Object.defineProperty(t,"GeoPackageAPI",{enumerable:!0,get:function(){return P.GeoPackageAPI}});var R=__webpack_require__(5116);Object.defineProperty(t,"GeoPackageConnection",{enumerable:!0,get:function(){return R.GeoPackageConnection}});var L=__webpack_require__(731);Object.defineProperty(t,"GeoPackageTileRetriever",{enumerable:!0,get:function(){return L.GeoPackageTileRetriever}});var D=__webpack_require__(4275);Object.defineProperty(t,"GeoPackageValidate",{enumerable:!0,get:function(){return D.GeoPackageValidate}});var k=__webpack_require__(8600);Object.defineProperty(t,"IconCache",{enumerable:!0,get:function(){return k.IconCache}});var F=__webpack_require__(4725);Object.defineProperty(t,"Icons",{enumerable:!0,get:function(){return F.Icons}});var U=__webpack_require__(2015);Object.defineProperty(t,"IconTable",{enumerable:!0,get:function(){return U.IconTable}});var B=__webpack_require__(9325);Object.defineProperty(t,"ImageUtils",{enumerable:!0,get:function(){return B.ImageUtils}});var j=__webpack_require__(6366);Object.defineProperty(t,"MediaTable",{enumerable:!0,get:function(){return j.MediaTable}});var G=__webpack_require__(3026);Object.defineProperty(t,"Metadata",{enumerable:!0,get:function(){return G.Metadata}});var W=__webpack_require__(663);Object.defineProperty(t,"MetadataDao",{enumerable:!0,get:function(){return W.MetadataDao}});var q=__webpack_require__(3501);Object.defineProperty(t,"MetadataExtension",{enumerable:!0,get:function(){return q.MetadataExtension}});var H=__webpack_require__(9173);Object.defineProperty(t,"MetadataReference",{enumerable:!0,get:function(){return H.MetadataReference}});var z=__webpack_require__(3060);Object.defineProperty(t,"NumberFeaturesTile",{enumerable:!0,get:function(){return z.NumberFeaturesTile}});var V=__webpack_require__(7403);Object.defineProperty(t,"OptionBuilder",{enumerable:!0,get:function(){return V.OptionBuilder}});var X=__webpack_require__(5211);Object.defineProperty(t,"Paint",{enumerable:!0,get:function(){return X.Paint}});var Y=__webpack_require__(5604);Object.defineProperty(t,"Projection",{enumerable:!0,get:function(){return Y.Projection}});var Z=__webpack_require__(1375);Object.defineProperty(t,"ProjectionConstants",{enumerable:!0,get:function(){return Z.ProjectionConstants}});var Q=__webpack_require__(1832);Object.defineProperty(t,"RelatedTablesExtension",{enumerable:!0,get:function(){return Q.RelatedTablesExtension}});var K=__webpack_require__(5859);Object.defineProperty(t,"RTreeIndex",{enumerable:!0,get:function(){return K.RTreeIndex}});var J=__webpack_require__(735);Object.defineProperty(t,"RTreeIndexDao",{enumerable:!0,get:function(){return J.RTreeIndexDao}});var $=__webpack_require__(8116);Object.defineProperty(t,"SchemaExtension",{enumerable:!0,get:function(){return $.SchemaExtension}});var tt=__webpack_require__(6667);Object.defineProperty(t,"ShadedFeaturesTile",{enumerable:!0,get:function(){return tt.ShadedFeaturesTile}});var et=__webpack_require__(4599);Object.defineProperty(t,"SimpleAttributesTable",{enumerable:!0,get:function(){return et.SimpleAttributesTable}});var nt=__webpack_require__(341);Object.defineProperty(t,"SpatialReferenceSystem",{enumerable:!0,get:function(){return nt.SpatialReferenceSystem}});var rt=__webpack_require__(8877);Object.defineProperty(t,"SqliteQueryBuilder",{enumerable:!0,get:function(){return rt.SqliteQueryBuilder}});var it=__webpack_require__(8138);Object.defineProperty(t,"StyleMappingTable",{enumerable:!0,get:function(){return it.StyleMappingTable}});var ot=__webpack_require__(7924);Object.defineProperty(t,"Styles",{enumerable:!0,get:function(){return ot.Styles}});var at=__webpack_require__(3934);Object.defineProperty(t,"StyleTable",{enumerable:!0,get:function(){return at.StyleTable}});var st=__webpack_require__(1459);Object.defineProperty(t,"TableCreator",{enumerable:!0,get:function(){return st.TableCreator}});var ut=__webpack_require__(3684);Object.defineProperty(t,"TileBoundingBoxUtils",{enumerable:!0,get:function(){return ut.TileBoundingBoxUtils}});var lt=__webpack_require__(8334);Object.defineProperty(t,"TileColumn",{enumerable:!0,get:function(){return lt.TileColumn}});var ct=__webpack_require__(1938);Object.defineProperty(t,"TileMatrix",{enumerable:!0,get:function(){return ct.TileMatrix}});var ht=__webpack_require__(5899);Object.defineProperty(t,"TileMatrixSet",{enumerable:!0,get:function(){return ht.TileMatrixSet}});var ft=__webpack_require__(4301);Object.defineProperty(t,"TileScaling",{enumerable:!0,get:function(){return ft.TileScaling}});var pt=__webpack_require__(2777);Object.defineProperty(t,"TileScalingType",{enumerable:!0,get:function(){return pt.TileScalingType}});var dt=__webpack_require__(8704);Object.defineProperty(t,"TileTable",{enumerable:!0,get:function(){return dt.TileTable}});var yt=__webpack_require__(824);Object.defineProperty(t,"TileUtilities",{enumerable:!0,get:function(){return yt.TileUtilities}});var mt=__webpack_require__(5865);Object.defineProperty(t,"UserColumn",{enumerable:!0,get:function(){return mt.UserColumn}});var gt=__webpack_require__(4668);Object.defineProperty(t,"UserDao",{enumerable:!0,get:function(){return gt.UserDao}});var _t=__webpack_require__(233);Object.defineProperty(t,"UserMappingTable",{enumerable:!0,get:function(){return _t.UserMappingTable}});var bt=__webpack_require__(2224);Object.defineProperty(t,"UserRow",{enumerable:!0,get:function(){return bt.UserRow}});var vt=__webpack_require__(8018);Object.defineProperty(t,"UserTable",{enumerable:!0,get:function(){return vt.UserTable}});var Tt=__webpack_require__(4880);Object.defineProperty(t,"UserTableReader",{enumerable:!0,get:function(){return Tt.UserTableReader}});var Et=__webpack_require__(7719);Object.defineProperty(t,"WebPExtension",{enumerable:!0,get:function(){return Et.WebPExtension}});var wt=__webpack_require__(2038);Object.defineProperty(t,"WKB",{enumerable:!0,get:function(){return wt.WKB}});var xt=__webpack_require__(922);Object.defineProperty(t,"SqliteAdapter",{enumerable:!0,get:function(){return xt.SqliteAdapter}});var Ct=__webpack_require__(5849);Object.defineProperty(t,"SqljsAdapter",{enumerable:!0,get:function(){return Ct.SqljsAdapter}});var Mt=__webpack_require__(7977);Object.defineProperty(t,"TileCreator",{enumerable:!0,get:function(){return Mt.TileCreator}});var St=__webpack_require__(3437);Object.defineProperty(t,"Canvas",{enumerable:!0,get:function(){return St.Canvas}});var Nt=__webpack_require__(8038);Object.defineProperty(t,"CanvasKitCanvasAdapter",{enumerable:!0,get:function(){return Nt.CanvasKitCanvasAdapter}});var Ot=__webpack_require__(342);Object.defineProperty(t,"OffscreenCanvasAdapter",{enumerable:!0,get:function(){return Ot.OffscreenCanvasAdapter}});var At=__webpack_require__(2807);Object.defineProperty(t,"HtmlCanvasAdapter",{enumerable:!0,get:function(){return At.HtmlCanvasAdapter}});var It=__webpack_require__(1150);Object.defineProperty(t,"Context",{enumerable:!0,get:function(){return It.Context}}),It.Context.setupDefaultContext();var Pt=Ct.SqljsAdapter.setSqljsWasmLocateFile;t.setSqljsWasmLocateFile=Pt;var Rt=Nt.CanvasKitCanvasAdapter.setCanvasKitWasmLocateFile;t.setCanvasKitWasmLocateFile=Rt})(),__webpack_exports__})()})); +//# sourceMappingURL=geopackage.min.js.map \ No newline at end of file diff --git a/templates/map/client/libs/geopackage/4.2.3/geopackage.min.js.LICENSE.txt b/templates/map/client/libs/geopackage/4.2.3/geopackage.min.js.LICENSE.txt new file mode 100644 index 0000000..ba6dac5 --- /dev/null +++ b/templates/map/client/libs/geopackage/4.2.3/geopackage.min.js.LICENSE.txt @@ -0,0 +1,34 @@ +/* +object-assign +(c) Sindre Sorhus +@license MIT +*/ + +/*! + * The buffer module from node.js, for the browser. + * + * @author Feross Aboukhadijeh + * @license MIT + */ + +/*! + * The buffer module from node.js, for the browser. + * + * @author Feross Aboukhadijeh + * @license MIT + */ + +/*! https://mths.be/punycode v1.3.2 by @mathias */ + +/*! ieee754. BSD-3-Clause License. Feross Aboukhadijeh */ + +/*! safe-buffer. MIT License. Feross Aboukhadijeh */ + +/** + * splaytree v3.1.0 + * Fast Splay tree for Node and browser + * + * @author Alexander Milevski + * @license MIT + * @preserve + */ diff --git a/templates/map/client/libs/geopackage/4.2.3/sql-wasm.wasm b/templates/map/client/libs/geopackage/4.2.3/sql-wasm.wasm new file mode 100644 index 0000000000000000000000000000000000000000..82c089c7ef1063d23fa54d16cd544584b82e1a84 GIT binary patch literal 631155 zcma&P37}n7eeb{49?o$0+2`z=Tp*Bu`y8TPBp0HFfRNg|A|a@#wAE@`|L>93_St)> zkAyh2F}aLJMFodCD-IPEP@KU!M8%301t&xWMMaA_&`+R?EpL=gC@A*e_&mPwB zTfh1DTf=tS&ip6uobzAKPB|^vv&Zi_&FfFPXU`tTrL!v@@Xno<@lU4m2hnHr?|VzEnM zCf&75Ws+SQ1Xxi?jlLP$Zbp*sp-4m-odX!J4NSd^n2PAoa}~FrgwA#`c>30Vs<3<4 zA9SyW*1gvoU0OGW1w)mf*bNSL8#ZDqyVTi)H9BtDfUsJ0uBIZMcY#M*-fiQGpaTuB z!5FxRP#G27Y2{LbT)E_Pe&o0LZLY)LzjYaZ|IT^-KE*wNzkhFk|G}R8FMIn`SaF;G zNBcYHa<1oHo4=>qlYeq8uAk--{{C+(e})@yz1^Pguy)S0>z(%Z>Gt;-u1}d~x-Ng8 zW$irM{{FN54fc1lwe|>W;Y6#o#h#yJf4AD-lU*zQ{@~U@D{W_al6jx&A60xm_es{u z=^^iA`Bauvh0ncvV3s!mvR+8jJ<~lCRD&NV|vUQ*b z5SO^Tq=C%2EGhg-mnUgLQ*I*9Qu=i6FqcfEtt4wtC#_amWh*E0#JP#qK?k`!cWFY? z&QEzd9#u)wp`OpHyy#4UI-e!kYT(We^M26DUG6$`m1p$eQtvxH10LV@`sdmcK$CWS zaZFnI{J;Yb^esVESqHEuXf1n&qvOT50MIUnQ)xS{;`p-g)52CU`wXHJ(qV z8$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wct-$$16&%>mE$|B9)+jF8!~@_oQjOX87R7lmCeg2r zEQll#bivZMAcz5neRu)$!c-30gi{SCK`J{-4dUczX05xc#UgQ*2HwDGmch?L+wjAP zEo?|y2KU2}(ahSxSWoq1X>C!tfU6iz09?axvbe<=2iGy22)KdaeX^&t(xJR$JK$D; z%fMKVNafl{1zgE+65wiPCg9BS5g0Ue2^<_;$Gc#J){=5iEqwjN)})J+ybTcxU_1^L z#3J}0iftPJO-m(}>ry~Kt)Nr?{SHkR$YgD$;Z)wh%4 zFUd43vHng{dWogG&^;|{4_&rO280(p7@`sAZVo91I2M3zgXLMQr9dwTG_pXhoETdQ z^oBtBZU~IW&kPPN1@4DH4GVO~PpsPs^npMF3t0YxKwk)y?ZJpQ4#rpoV-jb*N=|wJ zST!?u13Rf>VNQAwSUoeH`e1bGSZFVj`T;9tW+eZ50RykYC`l@Zp*T5}^@6efrEgrV z84fetpH(xQ8h0fpa)ltRlHZt6*C0zP0;DLb4!E`H?(|R(dhSYw2O)Pg!;i}=B@M2G zxscj(Fb;=+ehA6{B{#eDgH-4}{0x2+$WYK@QmR{=6-AY0QzpqX 0 ) { + //console.info( "INPUT:", this.output.value ); var json = JSON.parse( this.output.value ); this.invoke( netgis.Events.EDIT_FEATURES_LOADED, json ); } @@ -288,6 +289,7 @@ netgis.Client.prototype.onHtmlResponse = function( data ) netgis.Client.prototype.onEditFeaturesChange = function( e ) { var geojson = JSON.stringify( e ); + //console.info( "OUTPUT:", geojson ); this.output.value = geojson; }; diff --git a/templates/map/client/libs/netgis/Events.js b/templates/map/client/libs/netgis/Events.js index 8cd2028..f0ba901 100644 --- a/templates/map/client/libs/netgis/Events.js +++ b/templates/map/client/libs/netgis/Events.js @@ -40,18 +40,27 @@ netgis.Events = Object.freeze BUFFER_CHANGE: "BUFFER_CHANGE", BUFFER_ACCEPT: "BUFFER_ACCEPT", BUFFER_CANCEL: "BUFFER_CANCEL", - + DRAW_BUFFER_ON: "DRAW_BUFFER_ON", + DRAW_BUFFER_OFF: "DRAW_BUFFER_OFF", + DRAW_BUFFER_RADIUS_CHANGE: "DRAW_BUFFER_RADIUS_CHANGE", + DRAW_BUFFER_SEGMENTS_CHANGE: "DRAW_BUFFER_SEGMENTS_CHANGE", SNAP_ON: "SNAP_ON", SNAP_OFF: "SNAP_OFF", + TRACING_ON: "TRACING_ON", + TRACING_OFF: "TRACING_OFF", IMPORT_SHAPEFILE_SHOW: "IMPORT_SHAPEFILE_SHOW", IMPORT_GEOJSON_SHOW: "IMPORT_GEOJSON_SHOW", IMPORT_GML_SHOW: "IMPORT_GML_SHOW", + IMPORT_SPATIALITE_SHOW: "IMPORT_SPATIALITE_SHOW", + IMPORT_GEOPACKAGE_SHOW: "IMPORT_GEOPACKAGE_SHOW", IMPORT_SHAPEFILE: "IMPORT_SHAPEFILE", IMPORT_GEOJSON: "IMPORT_GEOJSON", IMPORT_GML: "IMPORT_GML", IMPORT_WKT: "IMPORT_WKT", + IMPORT_SPATIALITE: "IMPORT_SPATIALITE", + IMPORT_GEOPACKAGE: "IMPORT_GEOPACKAGE", EXPORT_PDF_SHOW: "EXPORT_PDF_SHOW", EXPORT_JPEG_SHOW: "EXPORT_JPEG_SHOW", @@ -63,6 +72,10 @@ netgis.Events = Object.freeze EXPORT_PNG: "EXPORT_PNG", EXPORT_GIF: "EXPORT_GIF", EXPORT_BEGIN: "EXPORT_BEGIN", - EXPORT_END: "EXPORT_END" + EXPORT_END: "EXPORT_END", + + ADD_SERVICE_SHOW: "ADD_SERVICE_SHOW", + ADD_SERVICE_WMS: "ADD_SERVICE_WMS", + ADD_SERVICE_WFS: "ADD_SERVICE_WFS" } ); diff --git a/templates/map/client/libs/netgis/LayerTree.css b/templates/map/client/libs/netgis/LayerTree.css index a032d58..29d0017 100644 --- a/templates/map/client/libs/netgis/LayerTree.css +++ b/templates/map/client/libs/netgis/LayerTree.css @@ -157,3 +157,27 @@ { opacity: 0.5; } + +.netgis-layer-tools +{ + padding: 4mm; + padding-top: 0mm; + text-align: center; +} + +.netgis-layer-tools hr +{ + margin: 4mm 0mm; + color: #eee; + border-color: #eee; +} + +.netgis-layer-tools button +{ + padding: 2mm 4mm; +} + +.netgis-layer-tools button i +{ + margin-right: 1mm; +} diff --git a/templates/map/client/libs/netgis/LayerTree.js b/templates/map/client/libs/netgis/LayerTree.js index 57c9a2a..948db2b 100644 --- a/templates/map/client/libs/netgis/LayerTree.js +++ b/templates/map/client/libs/netgis/LayerTree.js @@ -24,20 +24,56 @@ netgis.LayerTree.prototype.load = function() this.list.className = "root"; this.root.appendChild( this.list ); + this.initDefaultFolders(); + + this.tools = document.createElement( "div" ); + this.tools.className = "netgis-layer-tools"; + this.tools.innerHTML = "


"; + this.root.appendChild( this.tools ); + + this.buttonAddService = document.createElement( "button" ); + this.buttonAddService.setAttribute( "type", "button" ); + //this.buttonAddService.className = "netgis-primary netgis-hover-primary netgis-shadow"; + this.buttonAddService.className = "netgis-text-primary netgis-hover-primary"; + //this.buttonAddService.innerHTML = " Dienst hinzufügen"; + this.buttonAddService.innerHTML = " Dienst hinzufügen"; + //this.buttonAddService.innerHTML = " Dienst hinzufügen"; + this.buttonAddService.addEventListener( "click", this.onAddServiceClick.bind( this ) ); + this.tools.appendChild( this.buttonAddService ); + this.client.root.appendChild( this.root ); this.client.on( netgis.Events.CONTEXT_UPDATE, this.onContextUpdate.bind( this ) ); this.client.on( netgis.Events.LAYER_LIST_TOGGLE, this.onLayerListToggle.bind( this ) ); this.client.on( netgis.Events.LAYER_CREATED, this.onLayerCreated.bind( this ) ); this.client.on( netgis.Events.EDIT_FEATURES_CHANGE, this.onEditFeaturesChange.bind( this ) ); + this.client.on( netgis.Events.ADD_SERVICE_WMS, this.onAddServiceWMS.bind( this ) ); + this.client.on( netgis.Events.ADD_SERVICE_WFS, this.onAddServiceWFS.bind( this ) ); //TODO: kind of hack to hide if parcel search open this.client.on( netgis.Events.SET_MODE, this.onSetMode.bind( this ) ); }; +netgis.LayerTree.prototype.initDefaultFolders = function() +{ + this.folderDraw = this.createFolder( "Zeichnung" ); + this.folderDraw.classList.add( "netgis-hide" ); + this.list.appendChild( this.folderDraw ); + + this.folderImport = this.createFolder( "Importierte Ebenen" ); + this.folderImport.classList.add( "netgis-hide" ); + this.list.appendChild( this.folderImport ); + + this.folderServices = this.createFolder( "Eigene Dienste" ); + this.folderServices.classList.add( "netgis-hide" ); + this.list.appendChild( this.folderServices ); +}; + netgis.LayerTree.prototype.clearAll = function() { this.list.innerHTML = ""; + + this.initDefaultFolders(); }; netgis.LayerTree.prototype.createFolder = function( title ) @@ -102,6 +138,9 @@ netgis.LayerTree.prototype.createLayer = function( id, title, checked ) var text = document.createTextNode( title ); label.appendChild( text ); + var appendix = document.createElement( "span" ); + label.appendChild( appendix ); + return item; }; @@ -342,21 +381,26 @@ netgis.LayerTree.prototype.onLayerCreated = function( e ) //TODO: this is a hack to get special folders working if ( e.folder === "import" ) { - if ( ! this.folderImport ) + /*if ( ! this.folderImport ) { this.folderImport = this.createFolder( "Importierte Ebenen" ); this.list.insertBefore( this.folderImport, this.folderDraw ? this.folderDraw.nextSibling : this.list.firstChild ); } - + */ + + this.folderImport.classList.remove( "netgis-hide" ); + folder = this.folderImport; } else if ( e.folder === "draw" ) { - if ( ! this.folderDraw ) + /*if ( ! this.folderDraw ) { this.folderDraw = this.createFolder( "Zeichnung" ); this.list.insertBefore( this.folderDraw, this.list.firstChild ); - } + }*/ + + this.folderDraw.classList.remove( "netgis-hide" ); folder = this.folderDraw; } @@ -382,13 +426,54 @@ netgis.LayerTree.prototype.onEditFeaturesChange = function( e ) this.updateFolderChecks( this.folderDraw ); this.client.invoke( netgis.Events.LAYER_SHOW, { id: id } ); } + + // Update Area + var label = list.getElementsByTagName( "label" )[ 0 ]; + var spans = label.getElementsByTagName( "span" ); + var appendix = spans[ spans.length - 1 ]; + + if ( e.area && e.area > 0.0 ) + { + appendix.innerText = " (Fläche: " + netgis.util.formatArea( e.area, true ) + ")"; + } + else + { + appendix.innerText = ""; + } }; }; +netgis.LayerTree.prototype.onAddServiceWMS = function( e ) +{ + var item = this.createLayer( e.id, e.title, true ); + + this.folderServices.classList.remove( "netgis-hide" ); + this.addToFolder( this.folderServices, item, true ); + this.updateFolderChecks( this.folderServices ); + + this.client.invoke( netgis.Events.LAYER_SHOW, { id: e.id } ); +}; + +netgis.LayerTree.prototype.onAddServiceWFS = function( e ) +{ + var item = this.createLayer( e.id, e.title, true ); + + this.folderServices.classList.remove( "netgis-hide" ); + this.addToFolder( this.folderServices, item, true ); + this.updateFolderChecks( this.folderServices ); + + this.client.invoke( netgis.Events.LAYER_SHOW, { id: e.id } ); +}; + netgis.LayerTree.prototype.onSetMode = function( e ) { if ( e === netgis.Modes.SEARCH_PARCEL ) { this.root.classList.add( "netgis-hide" ); } +}; + +netgis.LayerTree.prototype.onAddServiceClick = function( e ) +{ + this.client.invoke( netgis.Events.ADD_SERVICE_SHOW, null ); }; \ No newline at end of file diff --git a/templates/map/client/libs/netgis/MapOpenLayers.js b/templates/map/client/libs/netgis/MapOpenLayers.js index 5321cce..7a8c6bb 100644 --- a/templates/map/client/libs/netgis/MapOpenLayers.js +++ b/templates/map/client/libs/netgis/MapOpenLayers.js @@ -28,8 +28,11 @@ netgis.MapOpenLayers = function() this.editEventsSilent = false; - this.importLayerID = 1000; - this.editLayerID = 2000; + this.importLayerID = 20000; + this.editLayerID = 30000; + this.labelFont = "4mm Verdana, sans-serif"; + this.drawBufferRadius = 100.0; + this.drawBufferSegments = 3; }; netgis.MapOpenLayers.prototype = Object.create( netgis.Map.prototype ); @@ -54,9 +57,9 @@ netgis.MapOpenLayers.prototype.load = function() this.root.addEventListener( "drop", this.onDragDrop.bind( this ) ); // Map Renderer - this.createMap(); - this.createDefaultLayers(); - this.createInteractions(); + this.initMap(); + this.initDefaultLayers(); + this.initInteractions(); // Events this.client.on( netgis.Events.CONTEXT_UPDATE, this.onContextUpdate.bind( this ) ); @@ -65,6 +68,8 @@ netgis.MapOpenLayers.prototype.load = function() this.client.on( netgis.Events.SET_MODE, this.onSetMode.bind( this ) ); this.client.on( netgis.Events.SNAP_ON, this.onSnapOn.bind( this ) ); this.client.on( netgis.Events.SNAP_OFF, this.onSnapOff.bind( this ) ); + this.client.on( netgis.Events.TRACING_ON, this.onTracingOn.bind( this ) ); + this.client.on( netgis.Events.TRACING_OFF, this.onTracingOff.bind( this ) ); this.client.on( netgis.Events.LAYER_SHOW, this.onLayerShow.bind( this ) ); this.client.on( netgis.Events.LAYER_HIDE, this.onLayerHide.bind( this ) ); this.client.on( netgis.Events.MAP_ZOOM_WKT, this.onZoomWKT.bind( this ) ); @@ -77,15 +82,23 @@ netgis.MapOpenLayers.prototype.load = function() this.client.on( netgis.Events.IMPORT_GML, this.onImportGML.bind( this ) ); this.client.on( netgis.Events.IMPORT_SHAPEFILE, this.onImportShapefile.bind( this ) ); this.client.on( netgis.Events.IMPORT_WKT, this.onImportWKT.bind( this ) ); + this.client.on( netgis.Events.IMPORT_SPATIALITE, this.onImportSpatialite.bind( this ) ); + this.client.on( netgis.Events.IMPORT_GEOPACKAGE, this.onImportGeopackage.bind( this ) ); this.client.on( netgis.Events.EXPORT_PDF, this.onExportPDF.bind( this ) ); this.client.on( netgis.Events.EXPORT_JPEG, this.onExportJPEG.bind( this ) ); this.client.on( netgis.Events.EXPORT_PNG, this.onExportPNG.bind( this ) ); this.client.on( netgis.Events.EXPORT_GIF, this.onExportGIF.bind( this ) ); this.client.on( netgis.Events.PARCEL_SHOW_PREVIEW, this.onParcelShowPreview.bind( this ) ); this.client.on( netgis.Events.PARCEL_HIDE_PREVIEW, this.onParcelHidePreview.bind( this ) ); + this.client.on( netgis.Events.ADD_SERVICE_WMS, this.onAddServiceWMS.bind( this ) ); + this.client.on( netgis.Events.ADD_SERVICE_WFS, this.onAddServiceWFS.bind( this ) ); + this.client.on( netgis.Events.DRAW_BUFFER_ON, this.onDrawBufferOn.bind( this ) ); + this.client.on( netgis.Events.DRAW_BUFFER_OFF, this.onDrawBufferOff.bind( this ) ); + this.client.on( netgis.Events.DRAW_BUFFER_RADIUS_CHANGE, this.onDrawBufferRadiusChange.bind( this ) ); + this.client.on( netgis.Events.DRAW_BUFFER_SEGMENTS_CHANGE, this.onDrawBufferSegmentsChange.bind( this ) ); }; -netgis.MapOpenLayers.prototype.createMap = function() +netgis.MapOpenLayers.prototype.initMap = function() { var config = this.client.config; @@ -133,14 +146,17 @@ netgis.MapOpenLayers.prototype.createMap = function() this.view.on( "change:resolution", this.onChangeResolution.bind( this ) ); }; -netgis.MapOpenLayers.prototype.createDefaultLayers = function() +netgis.MapOpenLayers.prototype.initDefaultLayers = function() { //TODO: why id as z index ? this.editLayer = new ol.layer.Vector( { source: new ol.source.Vector( { features: [] } ), style: this.styleEdit.bind( this ), zIndex: this.editLayerID } ); this.map.addLayer( this.editLayer ); - this.parcelLayer = new ol.layer.Vector( { source: new ol.source.Vector( { features: [] } ), style: this.styleParcel.bind( this ), zIndex: this.editLayerID + 10 } ); + this.previewLayer = new ol.layer.Vector( { source: new ol.source.Vector( { features: [] } ), style: this.styleSketch.bind( this ), zIndex: this.editLayerID + 10 } ); + this.map.addLayer( this.previewLayer ); + + this.parcelLayer = new ol.layer.Vector( { source: new ol.source.Vector( { features: [] } ), style: this.styleParcel.bind( this ), zIndex: this.editLayerID + 20 } ); this.map.addLayer( this.parcelLayer ); this.editEventsOn(); @@ -163,7 +179,7 @@ netgis.MapOpenLayers.prototype.editEventsOff = function() //this.editLayer.getSource().un( "removefeature"/*, this.onEditLayerRemove*/ ); }; -netgis.MapOpenLayers.prototype.createInteractions = function() +netgis.MapOpenLayers.prototype.initInteractions = function() { // View this.interactions[ netgis.Modes.VIEW ] = @@ -184,6 +200,8 @@ netgis.MapOpenLayers.prototype.createInteractions = function() new ol.interaction.MouseWheelZoom() ]; + this.interactions[ netgis.Modes.DRAW_POINTS ][ 0 ].on( "drawend", this.onDrawPointsEnd.bind( this ) ); + this.interactions[ netgis.Modes.DRAW_LINES ] = [ new ol.interaction.Draw( { type: "LineString", source: this.editLayer.getSource(), style: this.styleSketch.bind( this ) } ), @@ -191,6 +209,8 @@ netgis.MapOpenLayers.prototype.createInteractions = function() new ol.interaction.MouseWheelZoom() ]; + this.interactions[ netgis.Modes.DRAW_LINES ][ 0 ].on( "drawend", this.onDrawLinesEnd.bind( this ) ); + this.interactions[ netgis.Modes.DRAW_POLYGONS ] = [ new ol.interaction.Draw( { type: "Polygon", source: this.editLayer.getSource(), style: this.styleSketch.bind( this ) } ), @@ -257,137 +277,175 @@ netgis.MapOpenLayers.prototype.createInteractions = function() netgis.MapOpenLayers.prototype.createLayer = function( data ) { - //TODO: refactor into createLayerWMS, createLayerWFS etc. + var layer = null; + // Create Specific Layer By Type switch ( data.type ) { case netgis.LayerTypes.XYZ: { - var layer = new ol.layer.Tile - ( - { - source: new ol.source.XYZ - ( - { - url: data.url, - crossOrigin: "anonymous" - } - ) - } - ); - - return layer; + layer = this.createLayerXYZ( data.url ); + break; } case netgis.LayerTypes.OSM: { - var layer = new ol.layer.Tile - ( - { - source: new ol.source.XYZ - ( - { - url: "https://{a-c}.tile.openstreetmap.de/{z}/{x}/{y}.png", - crossOrigin: "anonymous" - } - ) - } - ); - - return layer; + layer = this.createLayerOSM(); + break; } case netgis.LayerTypes.WMS: { - var params = - { - url: data.url, - params: - { - "LAYERS": data.name, - "FORMAT": "image/png", - "TRANSPARENT": "true", - "VERSION": "1.1.1" - }, - serverType: "mapserver", - crossOrigin: "anonymous", - hidpi: false - //ratio: 3.0 - }; - - // Authorization - if ( data.username && data.password ) - { - params.imageLoadFunction = function( image, src ) - { - var request = new XMLHttpRequest(); - request.open( "GET", src ); - request.setRequestHeader( "Authorization", "Basic " + window.btoa( data.username + ":" + data.password ) ); - - request.onload = function() - { - image.getImage().src = src; - }; - - request.send(); - }; - } - - var source = new ol.source.ImageWMS( params ); - - var layer = new ol.layer.Image - ( - { - source: source, - //zIndex: index, - opacity: 1.0 - } - ); - - return layer; + layer = this.createLayerWMS( data.url, data.name, data.format, data.username, data.password ); + break; } case netgis.LayerTypes.WFS: { - var config = this.client.config; - - var url = data.url - + "service=WFS" - + "&version=1.1.0" - + "&request=GetFeature" - + "&outputformat=application/json"; - - var source = new ol.source.Vector + layer = this.createLayerWFS( data.url, data.name, this.client.config.map.projection, data.outputFormat ); + break; + } + } + + // Common Settings + if ( layer ) + { + if ( data.minZoom ) layer.setMinZoom( Number.parseFloat( data.minZoom ) - 1.0 ); + if ( data.maxZoom ) layer.setMaxZoom( Number.parseFloat( data.maxZoom ) ); + } + + return layer; +}; + +netgis.MapOpenLayers.prototype.createLayerXYZ = function( url ) +{ + var layer = new ol.layer.Tile + ( + { + source: new ol.source.XYZ ( { - format: new ol.format.GeoJSON(), - strategy: ol.loadingstrategy.bbox, - url: function( extent ) - { - return url - + "&typename=" + data.name - + "&srsname=" + config.map.projection - + "&bbox=" + extent.join( "," ) + "," + config.map.projection; - } + url: url, + crossOrigin: "anonymous" } - ); + ) + } + ); - var layer = new ol.layer.Vector + return layer; +}; + +netgis.MapOpenLayers.prototype.createLayerOSM = function() +{ + var layer = new ol.layer.Tile + ( + { + source: new ol.source.XYZ ( { - source: source + url: "https://{a-c}.tile.openstreetmap.de/{z}/{x}/{y}.png", + crossOrigin: "anonymous" } - ); + ) + } + ); - var self = this; - source.on( "featuresloadstart", function( e ) { self.removeSnapLayer( layer ); } ); - source.on( "featuresloadend", function( e ) { window.setTimeout( function() { self.addSnapLayer( layer ); }, 10 ); } ); + return layer; +}; + +netgis.MapOpenLayers.prototype.createLayerWMS = function( url, layerName, format, user, password ) +{ + var params = + { + url: url, + params: + { + "LAYERS": layerName, + "FORMAT": format ? format : "image/png", + "TRANSPARENT": "true", + "VERSION": "1.1.1" + }, + serverType: "mapserver", + crossOrigin: "anonymous", + hidpi: false + //ratio: 3.0 + }; + + // Authorization + if ( user && password ) + { + params.imageLoadFunction = function( image, src ) + { + var request = new XMLHttpRequest(); + request.open( "GET", src ); + request.setRequestHeader( "Authorization", "Basic " + window.btoa( user + ":" + password ) ); + + request.onload = function() + { + image.getImage().src = src; + }; + + request.send(); + }; + } + + var source = new ol.source.ImageWMS( params ); + + var layer = new ol.layer.Image + ( + { + source: source, + //zIndex: index, + opacity: 1.0 + } + ); - return layer; + return layer; +}; + +netgis.MapOpenLayers.prototype.createLayerWFS = function( url, typeName, projection, outputFormat ) +{ + url = url + + "service=WFS" + + "&version=1.1.0" + + "&request=GetFeature"; + + if ( ! outputFormat ) + outputFormat = "application/json"; + else + outputFormat = netgis.util.replace( outputFormat, " ", "+" ); //TODO: encode uri component ? + + var source = new ol.source.Vector + ( + { + format: new ol.format.GeoJSON(), + strategy: ol.loadingstrategy.bbox, + url: function( extent ) + { + return url + + "&typename=" + typeName + + "&srsname=" + projection + + "&bbox=" + extent.join( "," ) + "," + projection + + "&outputFormat=" + outputFormat; + } + + //TODO: custom loader function to catch xhr response parse errors } - } + ); - return null; + var layer = new ol.layer.Vector + ( + { + source: source + } + ); + + var self = this; + source.on( "featuresloadstart", function( e ) { self.removeSnapLayer( layer ); } ); + source.on( "featuresloadend", function( e ) { window.setTimeout( function() { self.addSnapLayer( layer ); }, 10 ); } ); + //source.on( "featuresloaderror", function( e ) { console.info( "Layer Error:", e ); } ); + + return layer; }; netgis.MapOpenLayers.prototype.clearAll = function() @@ -416,9 +474,10 @@ netgis.MapOpenLayers.prototype.onUpdateStyle = function( e ) this.editLayer.setStyle( style ); }; -netgis.MapOpenLayers.prototype.styleEdit = function() +netgis.MapOpenLayers.prototype.styleEdit = function( feature ) { var radius = this.client.config.styles.editLayer.pointRadius; + var geom = feature.getGeometry(); var style = new ol.style.Style ( @@ -429,11 +488,32 @@ netgis.MapOpenLayers.prototype.styleEdit = function() } ); + if ( geom instanceof ol.geom.Polygon ) + { + var area = geom.getArea(); + + style.setText + ( + new ol.style.Text + ( + { + text: [ netgis.util.formatArea( area, true ), "4mm sans-serif" ], + font: this.labelFont, + fill: new ol.style.Fill( { color: this.client.config.styles.editLayer.stroke } ), + backgroundFill: new ol.style.Fill( { color: "rgba( 255, 255, 255, 0.5 )" } ), + padding: [ 2, 4, 2, 4 ] + } + ) + ); + } + return style; }; netgis.MapOpenLayers.prototype.styleSelect = function( feature ) { + var geom = feature.getGeometry(); + var style = new ol.style.Style ( { @@ -443,6 +523,25 @@ netgis.MapOpenLayers.prototype.styleSelect = function( feature ) } ); + if ( geom instanceof ol.geom.Polygon ) + { + var area = geom.getArea(); + + style.setText + ( + new ol.style.Text + ( + { + text: [ netgis.util.formatArea( area, true ), "4mm sans-serif" ], + font: this.labelFont, + fill: new ol.style.Fill( { color: this.client.config.styles.select.stroke } ), + backgroundFill: new ol.style.Fill( { color: "rgba( 255, 255, 255, 0.5 )" } ), + padding: [ 2, 4, 2, 4 ] + } + ) + ); + } + return style; }; @@ -469,7 +568,9 @@ netgis.MapOpenLayers.prototype.styleModify = function( feature ) }; netgis.MapOpenLayers.prototype.styleSketch = function( feature ) -{ +{ + var geom = feature.getGeometry(); + var style = new ol.style.Style ( { @@ -479,6 +580,25 @@ netgis.MapOpenLayers.prototype.styleSketch = function( feature ) } ); + if ( geom instanceof ol.geom.Polygon ) + { + var area = geom.getArea(); + + style.setText + ( + new ol.style.Text + ( + { + text: [ netgis.util.formatArea( area, true ), "4mm sans-serif" ], + font: this.labelFont, + fill: new ol.style.Fill( { color: this.client.config.styles.sketch.stroke } ), + backgroundFill: new ol.style.Fill( { color: "rgba( 255, 255, 255, 0.5 )" } ), + padding: [ 2, 4, 2, 4 ] + } + ) + ); + } + var vertex = new ol.style.Style ( { @@ -599,7 +719,7 @@ netgis.MapOpenLayers.prototype.getActiveVectorLayers = function() netgis.MapOpenLayers.prototype.setMode = function( mode ) { - // Old Mode + // Leave switch ( this.mode ) { case netgis.Modes.BUFFER_FEATURE_EDIT: @@ -607,6 +727,18 @@ netgis.MapOpenLayers.prototype.setMode = function( mode ) this.onBufferCancel( null ); break; } + + case netgis.Modes.DRAW_POINTS: + case netgis.Modes.DRAW_LINES: + { + this.onDrawBufferOff( null ); + break; + } + } + + // Enter + switch ( mode ) + { } // Interactions @@ -674,6 +806,8 @@ netgis.MapOpenLayers.prototype.setSnapOn = function() this.snapFeatures.changed(); //this.updateSnapLayers(); + + //TODO: https://openlayers.org/en/latest/examples/tracing.html }; netgis.MapOpenLayers.prototype.setSnapOff = function() @@ -685,6 +819,29 @@ netgis.MapOpenLayers.prototype.setSnapOff = function() //this.snapFeatures = null; } }; + +netgis.MapOpenLayers.prototype.setTracingOn = function() +{ + var source = new ol.source.Vector( { features: this.snapFeatures } ); + + this.tracing = new ol.interaction.Draw( { type: "Polygon", source: this.editLayer.getSource(), style: this.styleSketch.bind( this ), trace: true, traceSource: source } ); + + var actions = this.interactions[ netgis.Modes.DRAW_POLYGONS ]; + actions[ 0 ].setActive( false ); + actions.push( this.tracing ); + + this.setMode( this.mode ); +}; + +netgis.MapOpenLayers.prototype.setTracingOff = function() +{ + var actions = this.interactions[ netgis.Modes.DRAW_POLYGONS ]; + actions[ 0 ].setActive( true ); + actions.splice( actions.indexOf( this.tracing ), 1 ); + + this.setMode( this.mode ); +}; + /* netgis.MapOpenLayers.prototype.updateSnapLayers = function() { @@ -739,6 +896,16 @@ netgis.MapOpenLayers.prototype.onSnapOff = function( e ) this.setSnapOff(); }; +netgis.MapOpenLayers.prototype.onTracingOn = function( e ) +{ + this.setTracingOn(); +}; + +netgis.MapOpenLayers.prototype.onTracingOff = function( e ) +{ + this.setTracingOff(); +}; + netgis.MapOpenLayers.prototype.onLayerShow = function( e ) { var layer = this.layers[ e.id ]; @@ -825,6 +992,20 @@ netgis.MapOpenLayers.prototype.onContextUpdate = function( e ) }*/ }; +netgis.MapOpenLayers.prototype.onAddServiceWMS = function( e ) +{ + var layer = this.createLayerWMS( e.url, e.name, e.format ); + layer.setZIndex( e.id ); + this.layers[ e.id ] = layer; +}; + +netgis.MapOpenLayers.prototype.onAddServiceWFS = function( e ) +{ + var layer = this.createLayerWFS( e.url, e.name, this.client.config.map.projection, e.format ); + layer.setZIndex( e.id ); + this.layers[ e.id ] = layer; +}; + netgis.MapOpenLayers.prototype.onSetMode = function( e ) { this.setMode( e ); @@ -857,7 +1038,8 @@ netgis.MapOpenLayers.prototype.onZoomWKT = function( e ) netgis.MapOpenLayers.prototype.onPointerMove = function( e ) { - //var pixel = e.pixel; + var pixel = e.pixel; + var coords = e.coordinate; var hover = this.hover; var styleSelect = this.styleSelect.bind( this ); @@ -876,7 +1058,7 @@ netgis.MapOpenLayers.prototype.onPointerMove = function( e ) { this.map.forEachFeatureAtPixel ( - e.pixel, + pixel, function( feature, layer ) //TODO: bind to this? { if ( layer === self.editLayer ) @@ -896,7 +1078,7 @@ netgis.MapOpenLayers.prototype.onPointerMove = function( e ) { this.map.forEachFeatureAtPixel ( - e.pixel, + pixel, function( feature, layer ) //TODO: bind to this? { if ( layer === self.editLayer ) @@ -916,7 +1098,7 @@ netgis.MapOpenLayers.prototype.onPointerMove = function( e ) { this.map.forEachFeatureAtPixel ( - e.pixel, + pixel, function( feature, layer ) //TODO: bind to this? { if ( layer === self.editLayer ) @@ -931,6 +1113,13 @@ netgis.MapOpenLayers.prototype.onPointerMove = function( e ) break; } + + case netgis.Modes.DRAW_POINTS: + case netgis.Modes.DRAW_LINES: + { + this.updateDrawBufferPreview(); + break; + } } //TODO: refactor to default hover handler? @@ -1030,13 +1219,31 @@ netgis.MapOpenLayers.prototype.onCutFeatureDrawEnd = function( e ) netgis.MapOpenLayers.prototype.onModifyFeaturesEnd = function( e ) { this.updateEditOutput(); + this.updateEditArea(); }; -netgis.MapOpenLayers.prototype.onBufferChange = function( e ) +netgis.MapOpenLayers.prototype.createBufferFeature = function( srcgeom, radius, segments ) { - var radius = e.radius; - var segments = e.segments; + var geom = this.createBufferGeometry( srcgeom, radius, segments ); + var feature = new ol.Feature( { geometry: geom } ); + return feature; +}; + +netgis.MapOpenLayers.prototype.createBufferGeometry = function( srcgeom, radius, segments ) +{ + var parser = new jsts.io.OL3Parser(); + + var a = parser.read( srcgeom ); + var b = a.buffer( radius, segments ); + + var geom = parser.write( b ); + + return geom; +}; + +netgis.MapOpenLayers.prototype.onBufferChange = function( e ) +{ var source = this.editLayer.getSource(); var target = this.selected; @@ -1047,15 +1254,7 @@ netgis.MapOpenLayers.prototype.onBufferChange = function( e ) if ( target ) { - // Cut Process - var parser = new jsts.io.OL3Parser(); - - var a = parser.read( target.getGeometry() ); - var b = a.buffer( radius, segments ); - - // Output - var geom = parser.write( b ); - var feature = new ol.Feature( { geometry: geom } ); + var feature = this.createBufferFeature( target.getGeometry(), e.radius, e.segments ); //source.removeFeature( target ); source.addFeature( feature ); @@ -1090,10 +1289,87 @@ netgis.MapOpenLayers.prototype.onBufferCancel = function( e ) this.selected = null; }; +netgis.MapOpenLayers.prototype.onDrawPointsEnd = function( e ) +{ + var preview = this.previewLayer.getSource().getFeatures()[ 0 ]; + + if ( preview ) + { + var src = this.editLayer.getSource(); + src.addFeature( preview.clone() ); + + //TODO: remove sketch point ? + //this.editLayer.getSource().removeFeature( e.feature ); + + /*window.setTimeout( function() { + var features = src.getFeatures(); + src.removeFeature( features[ features.length - 1 ] ); + src.addFeature( preview.clone() ); + }, 10 );*/ + + /*e.preventDefault(); + e.stopPropagation(); + return false;*/ + } +}; + +netgis.MapOpenLayers.prototype.onDrawLinesEnd = function( e ) +{ + var preview = this.previewLayer.getSource().getFeatures()[ 0 ]; + if ( ! preview ) return; + + var src = this.editLayer.getSource(); + src.addFeature( preview.clone() ); +}; + +netgis.MapOpenLayers.prototype.onDrawBufferOn = function( e ) +{ + var feature = this.createBufferFeature( new ol.geom.Point( this.client.config.map.center ), this.drawBufferRadius, this.drawBufferSegments ); + this.previewLayer.getSource().addFeature( feature ); + + //TODO: send all draw buffer params with events ? +}; + +netgis.MapOpenLayers.prototype.onDrawBufferOff = function( e ) +{ + this.previewLayer.getSource().clear(); +}; + +netgis.MapOpenLayers.prototype.onDrawBufferRadiusChange = function( e ) +{ + var radius = e; + this.drawBufferRadius = radius; + + this.updateDrawBufferPreview(); +}; + +netgis.MapOpenLayers.prototype.onDrawBufferSegmentsChange = function( e ) +{ + var segs = e; + this.drawBufferSegments = segs; + + this.updateDrawBufferPreview(); +}; + +netgis.MapOpenLayers.prototype.updateDrawBufferPreview = function() +{ + var draw = this.interactions[ this.mode ][ 0 ]; + var overlays = draw.getOverlay().getSource().getFeatures(); + if ( overlays.length < 1 ) return; + + var preview = this.previewLayer.getSource().getFeatures()[ 0 ]; + if ( ! preview ) return; + + var geom = overlays[ 0 ].getGeometry(); + var buffer = this.createBufferGeometry( geom, this.drawBufferRadius, this.drawBufferSegments ); + preview.setGeometry( buffer ); +}; + netgis.MapOpenLayers.prototype.onEditLayerAdd = function( e ) { - this.updateEditOutput(); + ////this.updateEditOutput(); this.updateEditLayerItem(); + this.updateEditOutput(); this.snapFeatures.push( e.feature ); }; @@ -1116,14 +1392,28 @@ netgis.MapOpenLayers.prototype.updateEditOutput = function() var format = new ol.format.GeoJSON(); var output = format.writeFeaturesObject( features, { dataProjection: proj, featureProjection: proj } ); + // Projection output[ "crs" ] = { "type": "name", "properties": { "name": "urn:ogc:def:crs:" + proj.replace( ":", "::" ) } }; + // Total Area + var area = 0.0; + + for ( var i = 0; i < features.length; i++ ) + { + var geom = features[ i ].getGeometry(); + if ( geom instanceof ol.geom.Polygon ) area += geom.getArea(); + } + + output[ "area" ] = area; + if ( ! this.editEventsSilent ) + { this.client.invoke( netgis.Events.EDIT_FEATURES_CHANGE, output ); + } }; netgis.MapOpenLayers.prototype.updateEditLayerItem = function() @@ -1138,6 +1428,11 @@ netgis.MapOpenLayers.prototype.updateEditLayerItem = function() } }; +netgis.MapOpenLayers.prototype.updateEditArea = function() +{ + +}; + netgis.MapOpenLayers.prototype.onEditFeaturesLoaded = function( e ) { var json = e; @@ -1247,6 +1542,28 @@ netgis.MapOpenLayers.prototype.onImportShapefile = function( e ) reader.readAsArrayBuffer( file ); }; +netgis.MapOpenLayers.prototype.onImportSpatialite = function( e ) +{ + var file = e; + var title = file.name; + var self = this; + + var reader = new FileReader(); + reader.onload = function( e ) { self.createLayerSpatialite( title, e.target.result ); }; + reader.readAsArrayBuffer( file ); +}; + +netgis.MapOpenLayers.prototype.onImportGeopackage = function( e ) +{ + var file = e; + var title = file.name; + var self = this; + + var reader = new FileReader(); + reader.onload = function( e ) { self.createLayerGeopackage( title, e.target.result ); }; + reader.readAsArrayBuffer( file ); +}; + netgis.MapOpenLayers.prototype.createLayerGeoJSON = function( title, data ) { var format = new ol.format.GeoJSON(); @@ -1265,7 +1582,6 @@ netgis.MapOpenLayers.prototype.createLayerGeoJSON = function( title, data ) case this.client.config.map.projection: { // Projection OK - //console.info( "Import Projection:", projcode ); break; } @@ -1441,6 +1757,124 @@ netgis.MapOpenLayers.prototype.createLayerShapefile = function( title, shapeData ); }; +netgis.MapOpenLayers.prototype.createLayerSpatialite = function( title, data ) +{ + var self = this; + + window.initSqlJs().then + ( + function( SQL ) + { + var features = []; + + var arr = new Uint8Array( data ); + var db = new SQL.Database( arr ); + + // Tables + var results = db.exec + ( + "SELECT name FROM sqlite_schema WHERE type = 'table' \n\ + AND name NOT LIKE 'sqlite_%' \n\ + AND name NOT LIKE 'sql_%' \n\ + AND name NOT LIKE 'idx_%' \n\ + AND name NOT LIKE 'spatial_ref_sys%' \n\ + AND name NOT LIKE 'spatialite_%' \n\ + AND name NOT LIKE 'geometry_columns%' \n\ + AND name NOT LIKE 'views_%' \n\ + AND name NOT LIKE 'virts_%' \n\ + AND name NOT LIKE 'SpatialIndex' \n\ + AND name NOT LIKE 'ElementaryGeometries' \n\ + ;" ); + + var tables = results[ 0 ].values; + + for ( var t = 0; t < tables.length; t++ ) + { + var table = tables[ t ][ 0 ]; + + results = db.exec( "SELECT * FROM " + table ); + var result = results[ 0 ]; + + // Columns + var geomcol = null; + + for ( var c = 0; c < result.columns.length; c++ ) + { + if ( result.columns[ c ].toLowerCase() === "geometry" ) { geomcol = c; break; } + if ( result.columns[ c ].toLowerCase() === "geom" ) { geomcol = c; break; } + } + + // Rows + var rows = result.values; + + for ( var r = 0; r < rows.length; r++ ) + { + var row = rows[ r ]; + + // Convert WKB + var input = row[ geomcol ]; + var output = new Uint8Array( input.length - 43 - 1 + 5 ); + + // Byte Order + output[ 0 ] = input[ 1 ]; + + // Type + output[ 1 ] = input[ 39 ]; + output[ 2 ] = input[ 40 ]; + output[ 3 ] = input[ 41 ]; + output[ 4 ] = input[ 42 ]; + + // Geometry + var geomlen = input.length - 43 - 1; + + for ( var i = 0; i < geomlen; i++ ) + { + output[ 5 + i ] = input[ 43 + i ]; + } + + var wkb = new ol.format.WKB(); + var geom = wkb.readGeometry( output, { featureProjection: self.client.config.map.projection } ); + + features.push( new ol.Feature( { geometry: geom } ) ); + } + } + + self.addImportedFeatures( features ); + } + ); +}; + +netgis.MapOpenLayers.prototype.createLayerGeopackage = function( title, data ) +{ + var self = this; + var arr = new Uint8Array( data ); + + window.GeoPackage.setSqljsWasmLocateFile( function( file ) { return self.client.config.import.geopackageLibURL + file; } ); + + window.GeoPackage.GeoPackageAPI.open( arr ).then( function( geoPackage ) + { + var features = []; + var format = new ol.format.GeoJSON(); + var tables = geoPackage.getFeatureTables(); + + for ( var t = 0; t < tables.length; t++ ) + { + var table = tables[ t ]; + var rows = geoPackage.queryForGeoJSONFeaturesInTable( table ); + + for ( var r = 0; r < rows.length; r++ ) + { + var row = rows[ r ]; + var geom = format.readGeometry( row.geometry, { featureProjection: self.client.config.map.projection } ); + var feature = new ol.Feature( { geometry: geom } ); + features.push( feature ); + } + } + + self.addImportedFeatures( features ); + } ); +}; + netgis.MapOpenLayers.prototype.addImportedFeatures = function( features ) { // Add To Edit Layer @@ -1537,6 +1971,7 @@ netgis.MapOpenLayers.prototype.exportImage = function( format, resx, resy, mode, // Request Logo Image var logo = new Image(); + logo.onload = function() { //TODO: refactor map render image and image export @@ -1596,6 +2031,13 @@ netgis.MapOpenLayers.prototype.exportImage = function( format, resx, resy, mode, // Watermark Logo mapContext.drawImage( logo, 0, 0 ); + + // Timestamp + mapContext.fillStyle = "#fff"; + mapContext.fillRect( 0, mapCanvas.height - 30, 140, 30 ); + mapContext.fillStyle = "#000"; + mapContext.font = "4mm sans-serif"; + mapContext.fillText( netgis.util.getTimeStamp(), 10, mapCanvas.height - 10 ); // Export Map Image var link = document.createElement( "a" ); @@ -1658,7 +2100,11 @@ netgis.MapOpenLayers.prototype.exportImage = function( format, resx, resy, mode, pdf.addImage( mapCanvas.toDataURL( "image/png,1.0", 1.0 ), "PNG", x, y, width, height ); // Text + pdf.setFillColor( 255, 255, 255 ); + pdf.rect( x, y + height - 11, 80, 11, "F" ); + pdf.setFontSize( 8 ); + pdf.text( "Datum: " + netgis.util.getTimeStamp(), x + 2, y + height - 2 - 4 ); pdf.text( "Quelle: " + window.location.href, x + 2, y + height - 2 ); // Same Tab diff --git a/templates/map/client/libs/netgis/Menu.js b/templates/map/client/libs/netgis/Menu.js index c61ee8c..eacacad 100644 --- a/templates/map/client/libs/netgis/Menu.js +++ b/templates/map/client/libs/netgis/Menu.js @@ -72,6 +72,8 @@ netgis.Menu.prototype.load = function() //fileItems.appendChild( this.createMenuItem( 'KML', this.onImportKMLClick.bind( this ) ) ); importItem.appendChild( this.createMenuItem( 'GML', this.onImportGMLClick.bind( this ) ) ); importItem.appendChild( this.createMenuItem( 'Shapefile', this.onImportShapefileClick.bind( this ) ) ); + importItem.appendChild( this.createMenuItem( 'Spatialite', this.onImportSpatialiteClick.bind( this ) ) ); + importItem.appendChild( this.createMenuItem( 'GeoPackage', this.onImportGeopackageClick.bind( this ) ) ); // Export var exportMenu = this.createMenu( 'Export' ); @@ -228,6 +230,16 @@ netgis.Menu.prototype.onImportGMLClick = function( e ) this.client.invoke( netgis.Events.IMPORT_GML_SHOW, null ); }; +netgis.Menu.prototype.onImportSpatialiteClick = function( e ) +{ + this.client.invoke( netgis.Events.IMPORT_SPATIALITE_SHOW, null ); +}; + +netgis.Menu.prototype.onImportGeopackageClick = function( e ) +{ + this.client.invoke( netgis.Events.IMPORT_GEOPACKAGE_SHOW, null ); +}; + netgis.Menu.prototype.onExportPDFClick = function( e ) { this.client.invoke( netgis.Events.EXPORT_PDF_SHOW, null ); diff --git a/templates/map/client/libs/netgis/Modal.css b/templates/map/client/libs/netgis/Modal.css index ec4d3ca..39b7d02 100644 --- a/templates/map/client/libs/netgis/Modal.css +++ b/templates/map/client/libs/netgis/Modal.css @@ -131,7 +131,8 @@ cursor: not-allowed; } -.netgis-modal-content input +.netgis-modal-content input, +.netgis-modal-content select { width: 100%; } diff --git a/templates/map/client/libs/netgis/Modal.js b/templates/map/client/libs/netgis/Modal.js index 5d8be16..d38f4ef 100644 --- a/templates/map/client/libs/netgis/Modal.js +++ b/templates/map/client/libs/netgis/Modal.js @@ -21,6 +21,9 @@ netgis.Modal = function() this.exportJPEG = null; this.exportPNG = null; this.exportGIF = null; + this.addService = null; + + this.addServiceID = 10000; }; netgis.Modal.prototype.load = function() @@ -39,6 +42,12 @@ netgis.Modal.prototype.load = function() this.importShapefile = this.createImportShapefile(); this.root.appendChild( this.importShapefile ); + this.importSpatialite = this.createImportSpatialite(); + this.root.appendChild( this.importSpatialite ); + + this.importGeopackage = this.createImportGeopackage(); + this.root.appendChild( this.importGeopackage ); + // Export this.exportPDF = this.createExportPDF(); this.root.appendChild( this.exportPDF ); @@ -52,6 +61,10 @@ netgis.Modal.prototype.load = function() this.exportGIF = this.createExportGIF(); this.root.appendChild( this.exportGIF ); + // Layers + this.addService = this.createAddService(); + this.root.appendChild( this.addService ); + // Done this.client.root.appendChild( this.root ); @@ -59,11 +72,15 @@ netgis.Modal.prototype.load = function() this.client.on( netgis.Events.IMPORT_GEOJSON_SHOW, this.onImportGeoJSONShow.bind( this ) ); this.client.on( netgis.Events.IMPORT_GML_SHOW, this.onImportGMLShow.bind( this ) ); this.client.on( netgis.Events.IMPORT_SHAPEFILE_SHOW, this.onImportShapefileShow.bind( this ) ); + this.client.on( netgis.Events.IMPORT_SPATIALITE_SHOW, this.onImportSpatialiteShow.bind( this ) ); + this.client.on( netgis.Events.IMPORT_GEOPACKAGE_SHOW, this.onImportGeopackageShow.bind( this ) ); this.client.on( netgis.Events.EXPORT_PDF_SHOW, this.onExportPDFShow.bind( this ) ); this.client.on( netgis.Events.EXPORT_JPEG_SHOW, this.onExportJPEGShow.bind( this ) ); this.client.on( netgis.Events.EXPORT_PNG_SHOW, this.onExportPNGShow.bind( this ) ); this.client.on( netgis.Events.EXPORT_GIF_SHOW, this.onExportGIFShow.bind( this ) ); + + this.client.on( netgis.Events.ADD_SERVICE_SHOW, this.onAddServiceShow.bind( this ) ); }; netgis.Modal.prototype.createImportGeoJSON = function() @@ -102,6 +119,30 @@ netgis.Modal.prototype.createImportShapefile = function() return container; }; +netgis.Modal.prototype.createImportSpatialite = function() +{ + var container = this.createContainer( "Import Spatialite" ); + + this.createText( container, "Unterstützte Koordinatensysteme:", "
  • World Geodetic System 1984 (EPSG:4326)
  • ETRS89 / UTM zone 32N (EPSG:25832)
" ); + this.createInputFile( container, "Datei auswählen / ablegen:", ".sqlite", this.onImportSpatialiteChange.bind( this ) ); + this.createSpace( container ); + this.createButton( container, "Importieren", this.onImportSpatialiteAccept.bind( this ) ); + + return container; +}; + +netgis.Modal.prototype.createImportGeopackage = function() +{ + var container = this.createContainer( "Import GeoPackage" ); + + this.createText( container, "Unterstützte Koordinatensysteme:", "
  • World Geodetic System 1984 (EPSG:4326)
  • ETRS89 / UTM zone 32N (EPSG:25832)
" ); + this.createInputFile( container, "Datei auswählen / ablegen:", ".gpkg", this.onImportGeopackageChange.bind( this ) ); + this.createSpace( container ); + this.createButton( container, "Importieren", this.onImportGeopackageAccept.bind( this ) ); + + return container; +}; + netgis.Modal.prototype.createExportPDF = function() { var container = this.createContainer( "Export PDF" ); @@ -152,6 +193,29 @@ netgis.Modal.prototype.createExportGIF = function() return container; }; +netgis.Modal.prototype.createAddService = function() +{ + var container = this.createContainer( "Dienst hinzufügen" ); + + this.createInputText( container, "WMS/WFS URL:" ); + this.createSpace( container ); + this.createButton( container, "Dienst laden", this.onAddServiceLoad.bind( this ) ); + + /*var details = document.createElement( "div" ); + details.className = "netgis-hide"; + container.appendChild( details );*/ + + this.createSpace( container ); + this.createInputHidden( container ); + this.createText( container, "Bezeichnung:", "" ); + this.createInputSelect( container, "Kartenebene:", [] ); + this.createInputSelect( container, "Format:", [] ); + this.createSpace( container ); + this.createButton( container, "Dienst hinzufügen", this.onAddServiceAccept.bind( this ) ); + + return container; +}; + netgis.Modal.prototype.show = function( container ) { this.root.classList.add( "netgis-show" ); @@ -243,6 +307,25 @@ netgis.Modal.prototype.createButton = function( container, title, callback ) return button; }; +netgis.Modal.prototype.createInputHidden = function( container ) +{ + var row = document.createElement( "tr" ); + row.className = "netgis-hidden"; + + var cell = document.createElement( "td" ); + row.appendChild( cell ); + + var input = document.createElement( "input" ); + input.setAttribute( "type", "hidden" ); + cell.appendChild( input ); + + var content = container.getElementsByClassName( "netgis-modal-content" )[ 0 ]; + var table = content.getElementsByTagName( "table" )[ 0 ]; + table.appendChild( row ); + + return input; +}; + netgis.Modal.prototype.createInputText = function( container, title ) { var row = document.createElement( "tr" ); @@ -258,12 +341,41 @@ netgis.Modal.prototype.createInputText = function( container, title ) var cell = document.createElement( "td" ); cell.className = "netgis-padding"; + row.appendChild( cell ); var input = document.createElement( "input" ); input.setAttribute( "type", "text" ); cell.appendChild( input ); + + label.htmlFor = input; + + var content = container.getElementsByClassName( "netgis-modal-content" )[ 0 ]; + var table = content.getElementsByTagName( "table" )[ 0 ]; + table.appendChild( row ); + + return input; +}; + +netgis.Modal.prototype.createInputSelect = function( container, title, keyValues ) +{ + var row = document.createElement( "tr" ); + //row.className = "netgis-hover-light"; + + var head = document.createElement( "th" ); + head.className = "netgis-padding"; + + var label = document.createElement( "label" ); + label.innerHTML = title; + head.appendChild( label ); + row.appendChild( head ); + + var cell = document.createElement( "td" ); + cell.className = "netgis-padding"; row.appendChild( cell ); + var input = document.createElement( "select" ); + cell.appendChild( input ); + label.htmlFor = input; var content = container.getElementsByClassName( "netgis-modal-content" )[ 0 ]; @@ -503,6 +615,74 @@ netgis.Modal.prototype.onImportShapefileAccept = function( e ) this.hide(); }; +netgis.Modal.prototype.onImportSpatialiteShow = function( e ) +{ + var input = this.importShapefile.getElementsByTagName( "input" )[ 0 ]; + var button = this.importShapefile.getElementsByTagName( "button" )[ 1 ]; + input.value = ""; + button.disabled = true; + + this.show( this.importSpatialite ); +}; + +netgis.Modal.prototype.onImportSpatialiteChange = function( e ) +{ + var input = this.importSpatialite.getElementsByTagName( "input" )[ 0 ]; + var button = this.importSpatialite.getElementsByTagName( "button" )[ 1 ]; + + if ( input.value && input.value.length > 0 ) + { + button.disabled = false; + } + else + { + button.disabled = true; + } +}; + +netgis.Modal.prototype.onImportSpatialiteAccept = function( e ) +{ + var input = this.importSpatialite.getElementsByTagName( "input" )[ 0 ]; + var file = input.files[ 0 ]; + this.client.invoke( netgis.Events.IMPORT_SPATIALITE, file ); + + this.hide(); +}; + +netgis.Modal.prototype.onImportGeopackageShow = function( e ) +{ + var input = this.importGeopackage.getElementsByTagName( "input" )[ 0 ]; + var button = this.importGeopackage.getElementsByTagName( "button" )[ 1 ]; + input.value = ""; + button.disabled = true; + + this.show( this.importGeopackage ); +}; + +netgis.Modal.prototype.onImportGeopackageChange = function( e ) +{ + var input = this.importGeopackage.getElementsByTagName( "input" )[ 0 ]; + var button = this.importGeopackage.getElementsByTagName( "button" )[ 1 ]; + + if ( input.value && input.value.length > 0 ) + { + button.disabled = false; + } + else + { + button.disabled = true; + } +}; + +netgis.Modal.prototype.onImportGeopackageAccept = function( e ) +{ + var input = this.importGeopackage.getElementsByTagName( "input" )[ 0 ]; + var file = input.files[ 0 ]; + this.client.invoke( netgis.Events.IMPORT_GEOPACKAGE, file ); + + this.hide(); +}; + netgis.Modal.prototype.onExportPDFShow = function( e ) { var inputs = this.exportPDF.getElementsByTagName( "input" ); @@ -588,5 +768,237 @@ netgis.Modal.prototype.onExportGIFAccept = function( e ) var resy = Number.parseInt( inputs[ 1 ].value ); this.client.invoke( netgis.Events.EXPORT_GIF, { resx: resx, resy: resy } ); + this.hide(); +}; + +netgis.Modal.prototype.onAddServiceShow = function( e ) +{ + //this.addService.getElementsByTagName( "input" )[ 0 ].value = ""; + + this.show( this.addService ); + + // Hide Details + var rows = this.addService.getElementsByTagName( "tr" ); + + for ( var r = 3; r < rows.length; r++ ) + { + rows[ r ].classList.add( "netgis-hide" ); + } +}; + +netgis.Modal.prototype.onAddServiceLoad = function( e ) +{ + var inputs = this.addService.getElementsByTagName( "input" ); + var url = inputs[ 0 ].value; + + // Get Base URL + var qmark = url.indexOf( "?" ); + if ( qmark > -1 ) url = url.substr( 0, qmark ); + + var getCaps = url + "?request=GetCapabilities"; + + netgis.util.request( getCaps, this.onAddServiceCapsResponse.bind( this ) ); + + console.info( "Add Service Load:", url ); +}; + +netgis.Modal.prototype.onAddServiceCapsResponse = function( e ) +{ + var parser = new DOMParser(); + var xml = parser.parseFromString( e, "text/xml" ); + var caps = xml.documentElement; + + var rows = this.addService.getElementsByTagName( "tr" ); + var rowTitle = rows[ 5 ]; + + var inputs = this.addService.getElementsByTagName( "input" ); + var inputType = inputs[ 1 ]; + + var selects = this.addService.getElementsByTagName( "select" ); + var selectLayer = selects[ 0 ]; + var selectFormat = selects[ 1 ]; + + for ( var i = selectLayer.options.length - 1; i >= 0; i-- ) selectLayer.options.remove( i ); + for ( var i = selectFormat.options.length - 1; i >= 0; i-- ) selectFormat.options.remove( i ); + + switch ( caps.nodeName ) + { + // WMS + case "WMS_Capabilities": + { + inputType.value = "wms"; + + var version = caps.getAttribute( "version" ); + var service = caps.getElementsByTagName( "Service" )[ 0 ]; + var title = service.getElementsByTagName( "Title" )[ 0 ].textContent; + rowTitle.children[ 1 ].innerHTML = title; + + var layerItems = caps.getElementsByTagName( "Layer" ); + var layers = []; + + for ( var l = 0; l < layerItems.length; l++ ) + { + var item = layerItems[ l ]; + var layerName = item.getElementsByTagName( "Name" )[ 0 ].textContent; + var layerTitle = item.getElementsByTagName( "Title" )[ 0 ].textContent; + + layers.push( { name: layerName, title: layerTitle } ); + + var option = document.createElement( "option" ); + option.text = layerTitle; + option.value = layerName; + selectLayer.options.add( option ); + } + + var getMap = caps.getElementsByTagName( "GetMap" )[ 0 ]; + var formatItems = getMap.getElementsByTagName( "Format" ); + var formats = []; + + for ( var f = 0; f < formatItems.length; f++ ) + { + var item = formatItems[ f ]; + var format = item.textContent; + + formats.push( format ); + + var option = document.createElement( "option" ); + option.text = format; + option.value = format; + selectFormat.options.add( option ); + } + + break; + } + + // WFS + case "WFS_Capabilities": + case "wfs:WFS_Capabilities": + { + inputType.value = "wfs"; + + var version = caps.getAttribute( "version" ); + var service = caps.getElementsByTagName( "ows:ServiceIdentification" )[ 0 ]; + var title = service.getElementsByTagName( "ows:Title" )[ 0 ].textContent; + rowTitle.children[ 1 ].innerHTML = title; + + var featureTypeItems = caps.getElementsByTagName( "FeatureType" ); + var types = []; + + for ( var l = 0; l < featureTypeItems.length; l++ ) + { + var item = featureTypeItems[ l ]; + var typeName = item.getElementsByTagName( "Name" )[ 0 ].textContent; + var typeTitle = item.getElementsByTagName( "Title" )[ 0 ].textContent; + + types.push( { name: typeName, title: typeTitle } ); + + var option = document.createElement( "option" ); + option.text = typeTitle; + option.value = typeName; + selectLayer.options.add( option ); + } + + var operations = caps.getElementsByTagName( "ows:Operation" ); + var getFeature = null; + + for ( var o = 0; o < operations.length; o++ ) + { + if ( operations[ o ].getAttribute( "name" ) === "GetFeature" ) + { + getFeature = operations[ o ]; + break; + } + } + + if ( getFeature ) + { + var parameters = getFeature.getElementsByTagName( "ows:Parameter" ); + + for ( var p = 0; p < parameters.length; p++ ) + { + var parameter = parameters[ p ]; + + if ( parameter.getAttribute( "name" ) === "outputFormat" ) + { + var formatItems = parameter.getElementsByTagName( "ows:Value" ); + + for ( var f = 0; f < formatItems.length; f++ ) + { + var item = formatItems[ f ]; + var format = item.textContent; + + var option = document.createElement( "option" ); + option.text = format; + option.value = format; + selectFormat.options.add( option ); + } + + break; + } + } + } + + selectFormat.value = "application/json"; + + break; + } + } + + // Show Details + var rows = this.addService.getElementsByTagName( "tr" ); + + for ( var r = 3; r < rows.length; r++ ) + { + rows[ r ].classList.remove( "netgis-hide" ); + } +}; + +netgis.Modal.prototype.onAddServiceAccept = function( e ) +{ + /*var inputs = this.exportPDF.getElementsByTagName( "input" ); + var resx = Number.parseInt( inputs[ 0 ].value ); + var resy = Number.parseInt( inputs[ 1 ].value ); + var margin = Number.parseInt( inputs[ 2 ].value ); + var mode = inputs[ 3 ].checked; + this.client.invoke( netgis.Events.EXPORT_PDF, { resx: resx, resy: resy, mode: mode, margin: margin } );*/ + + var inputs = this.addService.getElementsByTagName( "input" ); + var selects = this.addService.getElementsByTagName( "select" ); + + var url = inputs[ 0 ].value; + var type = inputs[ 1 ].value; + + var selectLayer = selects[ 0 ]; + var selectFormat = selects[ 1 ]; + + var layerOption = selectLayer.options.item( selectLayer.options.selectedIndex ); + var formatOption = selectFormat.options.item( selectFormat.options.selectedIndex ); + + var id = this.addServiceID++; + + var params = + { + id: id, + url: url, + title: layerOption.text, + name: layerOption.value, + format: formatOption.value + }; + + switch ( type ) + { + case "wms": + { + this.client.invoke( netgis.Events.ADD_SERVICE_WMS, params ); + break; + } + + case "wfs": + { + this.client.invoke( netgis.Events.ADD_SERVICE_WFS, params ); + break; + } + } + this.hide(); }; \ No newline at end of file diff --git a/templates/map/client/libs/netgis/Toolbar.js b/templates/map/client/libs/netgis/Toolbar.js index 875fc54..023845a 100644 --- a/templates/map/client/libs/netgis/Toolbar.js +++ b/templates/map/client/libs/netgis/Toolbar.js @@ -18,20 +18,38 @@ netgis.Toolbar.prototype.load = function() if ( this.client.editable ) { + var bufferDefaultRadius = 1000; + var bufferDefaultSegments = 3; + + if ( netgis.util.isDefined( config.tools ) ) + { + if ( netgis.util.isDefined( config.tools.buffer.defaultRadius ) ) bufferDefaultRadius = config.tools.buffer.defaultRadius; + if ( netgis.util.isDefined( config.tools.buffer.defaultSegments ) ) bufferDefaultSegments = config.tools.buffer.defaultSegments; + } + // Draw this.toolbars[ netgis.Modes.DRAW_POINTS ] = this.createToolbar(); this.append( this.toolbars[ netgis.Modes.DRAW_POINTS ], this.createToolbarButton( 'Punkte zeichnen:', this.onToolbarClose.bind( this ) ) ); this.append( this.toolbars[ netgis.Modes.DRAW_POINTS ], this.createToolbarCheckbox( "Einrasten", this.onSnapChange.bind( this ) ) ); + this.append( this.toolbars[ netgis.Modes.DRAW_POINTS ], this.createToolbarCheckbox( "Puffern", this.onDrawBufferChange.bind( this ) ) ); + this.append( this.toolbars[ netgis.Modes.DRAW_POINTS ], this.createToolbarInput( "Radius (Meter):", bufferDefaultRadius, this.onDrawBufferRadiusChange.bind( this ) ) ); + this.append( this.toolbars[ netgis.Modes.DRAW_POINTS ], this.createToolbarInput( "Segmente:", bufferDefaultSegments, this.onDrawBufferSegmentsChange.bind( this ) ) ); this.root.appendChild( this.toolbars[ netgis.Modes.DRAW_POINTS ] ); this.toolbars[ netgis.Modes.DRAW_LINES ] = this.createToolbar(); this.append( this.toolbars[ netgis.Modes.DRAW_LINES ], this.createToolbarButton( 'Linien zeichnen:', this.onToolbarClose.bind( this ) ) ); this.append( this.toolbars[ netgis.Modes.DRAW_LINES ], this.createToolbarCheckbox( "Einrasten", this.onSnapChange.bind( this ) ) ); + this.append( this.toolbars[ netgis.Modes.DRAW_LINES ], this.createToolbarCheckbox( "Puffern", this.onDrawBufferChange.bind( this ) ) ); + this.append( this.toolbars[ netgis.Modes.DRAW_LINES ], this.createToolbarInput( "Radius (Meter):", bufferDefaultRadius, this.onDrawBufferRadiusChange.bind( this ) ) ); + this.append( this.toolbars[ netgis.Modes.DRAW_LINES ], this.createToolbarInput( "Segmente:", bufferDefaultSegments, this.onDrawBufferSegmentsChange.bind( this ) ) ); this.root.appendChild( this.toolbars[ netgis.Modes.DRAW_LINES ] ); + + this.showDrawBufferOptions( false ); this.toolbars[ netgis.Modes.DRAW_POLYGONS ] = this.createToolbar(); this.append( this.toolbars[ netgis.Modes.DRAW_POLYGONS ], this.createToolbarButton( 'Polygone zeichnen:', this.onToolbarClose.bind( this ) ) ); this.append( this.toolbars[ netgis.Modes.DRAW_POLYGONS ], this.createToolbarCheckbox( "Einrasten", this.onSnapChange.bind( this ) ) ); + this.append( this.toolbars[ netgis.Modes.DRAW_POLYGONS ], this.createToolbarCheckbox( "Tracing", this.onTracingChange.bind( this ) ) ); this.root.appendChild( this.toolbars[ netgis.Modes.DRAW_POLYGONS ] ); // Edit @@ -60,17 +78,8 @@ netgis.Toolbar.prototype.load = function() //var wrapper = document.createElement( "div" ); //this.toolbars[ netgis.Modes.BUFFER_FEATURE_EDIT ].appendChild( wrapper ); - var bufferDefaultRadius = 1000; - var bufferDefaultSegments = 3; - - if ( netgis.util.isDefined( config.tools ) ) - { - if ( netgis.util.isDefined( config.tools.buffer.defaultRadius ) ) bufferDefaultRadius = config.tools.buffer.defaultRadius; - if ( netgis.util.isDefined( config.tools.buffer.defaultSegments ) ) bufferDefaultSegments = config.tools.buffer.defaultSegments; - } - this.append( this.toolbars[ netgis.Modes.BUFFER_FEATURE_EDIT ], this.createToolbarButton( 'Feature puffern:', this.onBufferCancel.bind( this ) ) ); - this.append( this.toolbars[ netgis.Modes.BUFFER_FEATURE_EDIT ], this.createToolbarInput( "Radius in Meter:", bufferDefaultRadius, this.onBufferChange.bind( this ) ) ); + this.append( this.toolbars[ netgis.Modes.BUFFER_FEATURE_EDIT ], this.createToolbarInput( "Radius (Meter):", bufferDefaultRadius, this.onBufferChange.bind( this ) ) ); this.append( this.toolbars[ netgis.Modes.BUFFER_FEATURE_EDIT ], this.createToolbarInput( "Segmente:", bufferDefaultSegments, this.onBufferChange.bind( this ) ) ); this.append( this.toolbars[ netgis.Modes.BUFFER_FEATURE_EDIT ], this.createToolbarButton( 'OK', this.onBufferAccept.bind( this ) ) ); @@ -252,6 +261,19 @@ netgis.Toolbar.prototype.onSetMode = function( e ) this.updateBuffer(); break; } + + case netgis.Modes.DRAW_POINTS: + case netgis.Modes.DRAW_LINES: + { + var checkbox = this.toolbars[ netgis.Modes.DRAW_POINTS ].getElementsByTagName( "input" )[ 1 ]; + + if ( checkbox.checked ) + { + this.client.invoke( netgis.Events.DRAW_BUFFER_ON, null ); + } + + break; + } } }; @@ -444,4 +466,83 @@ netgis.Toolbar.prototype.onSnapChange = function( e ) this.toolbars[ netgis.Modes.DRAW_POLYGONS ].getElementsByTagName( "input" )[ 0 ].checked = on; this.client.invoke( on ? netgis.Events.SNAP_ON : netgis.Events.SNAP_OFF, null ); +}; + +netgis.Toolbar.prototype.onTracingChange = function( e ) +{ + var input = e.target; + var on = input.checked; + + var snapInput = this.toolbars[ netgis.Modes.DRAW_POLYGONS ].getElementsByTagName( "input" )[ 0 ]; + var snap = snapInput.checked; + + if ( on && !snap ) + { + snapInput.checked = on; + this.client.invoke( netgis.Events.SNAP_ON, null ); + } + + this.client.invoke( on ? netgis.Events.TRACING_ON : netgis.Events.TRACING_OFF, null ); +}; + +netgis.Toolbar.prototype.onDrawBufferChange = function( e ) +{ + var input = e.target; + var on = input.checked; + + this.toolbars[ netgis.Modes.DRAW_POINTS ].getElementsByTagName( "input" )[ 1 ].checked = on; + this.toolbars[ netgis.Modes.DRAW_LINES ].getElementsByTagName( "input" )[ 1 ].checked = on; + + this.client.invoke( on ? netgis.Events.DRAW_BUFFER_ON : netgis.Events.DRAW_BUFFER_OFF, null ); + + this.showDrawBufferOptions( on ); +}; + +netgis.Toolbar.prototype.onDrawBufferRadiusChange = function( e ) +{ + var input = e.target; + var radius = Number.parseFloat( input.value ); + + this.client.invoke( netgis.Events.DRAW_BUFFER_RADIUS_CHANGE, radius ); + + var pointsInput = this.toolbars[ netgis.Modes.DRAW_POINTS ].getElementsByTagName( "input" )[ 2 ]; + if ( input !== pointsInput ) pointsInput.value = radius; + + var linesInput = this.toolbars[ netgis.Modes.DRAW_LINES ].getElementsByTagName( "input" )[ 2 ]; + if ( input !== linesInput ) linesInput.value = radius; +}; + +netgis.Toolbar.prototype.onDrawBufferSegmentsChange = function( e ) +{ + var input = e.target; + var segs = Number.parseInt( input.value ); + + this.client.invoke( netgis.Events.DRAW_BUFFER_SEGMENTS_CHANGE, segs ); + + var pointsInput = this.toolbars[ netgis.Modes.DRAW_POINTS ].getElementsByTagName( "input" )[ 3 ]; + if ( input !== pointsInput ) pointsInput.value = segs; + + var linesInput = this.toolbars[ netgis.Modes.DRAW_LINES ].getElementsByTagName( "input" )[ 3 ]; + if ( input !== linesInput ) linesInput.value = segs; +}; + +netgis.Toolbar.prototype.showDrawBufferOptions = function( on ) +{ + var pointsItems = this.toolbars[ netgis.Modes.DRAW_POINTS ].children[ 0 ].children; + var linesItems = this.toolbars[ netgis.Modes.DRAW_LINES ].children[ 0 ].children; + + if ( on ) + { + pointsItems[ 3 ].classList.remove( "netgis-hide" ); + pointsItems[ 4 ].classList.remove( "netgis-hide" ); + linesItems[ 3 ].classList.remove( "netgis-hide" ); + linesItems[ 4 ].classList.remove( "netgis-hide" ); + } + else + { + pointsItems[ 3 ].classList.add( "netgis-hide" ); + pointsItems[ 4 ].classList.add( "netgis-hide" ); + linesItems[ 3 ].classList.add( "netgis-hide" ); + linesItems[ 4 ].classList.add( "netgis-hide" ); + } }; \ No newline at end of file diff --git a/templates/map/client/libs/netgis/Util.js b/templates/map/client/libs/netgis/Util.js index ad7f8c9..b16eb2d 100644 --- a/templates/map/client/libs/netgis/Util.js +++ b/templates/map/client/libs/netgis/Util.js @@ -139,6 +139,59 @@ netgis.util = { return Object.assign( target, other ); }; + + /** + * @returns {String} Formatted Date Time String (German Locale) + */ + var getTimeStamp = function() + { + var date = new Date(); + + var timestamp = date.getDate() + "." + ( date.getMonth() + 1 ) + "." + date.getFullYear(); + timestamp += " " + date.getHours() + ":" + date.getMinutes(); + + return timestamp; + }; + + /* + * @param {Number} area Raw Area in Square Meters + * @param {Boolean} decimals Output Rounded Decimals + * @returns {String} Formatted Area String (Square Meters/Square Kilometers) + */ + var formatArea = function( area, decimals ) + { + var output; + + // Normal / Large Value + var large = ( area > 10000 ); + + // Round Value + var i = 0; + + if ( large ) + { + if ( decimals ) + i = Math.round( area / 1000000 * 1000 ) / 1000; + else + i = Math.round( area / 1000000 ); + } + else + { + if ( decimals ) + i = Math.round( area * 100 ) / 100; + else + i = Math.round( area ); + } + + if ( i === 0 ) large = false; + + // Build String + output = i + ( large ? " qkm" : " qm" ); + + //NOTE: HTML Superscript / Unicode (² etc.) not supported in OL Labels + + return output; + }; // Public Interface var iface = @@ -153,7 +206,9 @@ netgis.util = size: size, request: request, padstr: padstr, - merge: merge + merge: merge, + getTimeStamp: getTimeStamp, + formatArea: formatArea }; return iface; diff --git a/templates/map/client/libs/openlayers/6.14.1/ol.css b/templates/map/client/libs/openlayers/6.14.1/ol.css deleted file mode 100644 index 3eb4090..0000000 --- a/templates/map/client/libs/openlayers/6.14.1/ol.css +++ /dev/null @@ -1,2 +0,0 @@ -.ol-box{box-sizing:border-box;border-radius:2px;border:1.5px solid #b3c5db;background-color:rgba(255,255,255,.4)}.ol-mouse-position{top:8px;right:8px;position:absolute}.ol-scale-line{background:rgba(0,60,136,.3);border-radius:4px;bottom:8px;left:8px;padding:2px;position:absolute}.ol-scale-line-inner{border:1px solid #eee;border-top:none;color:#eee;font-size:10px;text-align:center;margin:1px;will-change:contents,width;transition:all .25s}.ol-scale-bar{position:absolute;bottom:8px;left:8px}.ol-scale-step-marker{width:1px;height:15px;background-color:#000;float:right;z-index:10}.ol-scale-step-text{position:absolute;bottom:-5px;font-size:12px;z-index:11;color:#000;text-shadow:-2px 0 #fff,0 2px #fff,2px 0 #fff,0 -2px #fff}.ol-scale-text{position:absolute;font-size:14px;text-align:center;bottom:25px;color:#000;text-shadow:-2px 0 #fff,0 2px #fff,2px 0 #fff,0 -2px #fff}.ol-scale-singlebar{position:relative;height:10px;z-index:9;box-sizing:border-box;border:1px solid #000}.ol-unsupported{display:none}.ol-unselectable,.ol-viewport{-webkit-touch-callout:none;-webkit-user-select:none;-moz-user-select:none;-ms-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;-ms-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:rgba(255,255,255,.4);border-radius:4px;padding:2px}.ol-control:hover{background-color:rgba(255,255,255,.6)}.ol-zoom{top:.5em;left:.5em}.ol-rotate{top:.5em;right:.5em;transition:opacity .25s linear,visibility 0s linear}.ol-rotate.ol-hidden{opacity:0;visibility:hidden;transition:opacity .25s linear,visibility 0s linear .25s}.ol-zoom-extent{top:4.643em;left:.5em}.ol-full-screen{right:.5em;top:.5em}.ol-control button{display:block;margin:1px;padding:0;color:#fff;font-weight:700;text-decoration:none;font-size:inherit;text-align:center;height:1.375em;width:1.375em;line-height:.4em;background-color:rgba(0,60,136,.5);border:none;border-radius:2px}.ol-control button::-moz-focus-inner{border:none;padding:0}.ol-zoom-extent button{line-height:1.4em}.ol-compass{display:block;font-weight:400;font-size:1.2em;will-change:transform}.ol-touch .ol-control button{font-size:1.5em}.ol-touch .ol-zoom-extent{top:5.5em}.ol-control button:focus,.ol-control button:hover{text-decoration:none;background-color:rgba(0,60,136,.7)}.ol-zoom .ol-zoom-in{border-radius:2px 2px 0 0}.ol-zoom .ol-zoom-out{border-radius:0 0 2px 2px}.ol-attribution{text-align:right;bottom:.5em;right:.5em;max-width:calc(100% - 1.3em);display:flex;flex-flow:row-reverse;align-items:center}.ol-attribution a{color:rgba(0,60,136,.7);text-decoration:none}.ol-attribution ul{margin:0;padding:1px .5em;color:#000;text-shadow:0 0 2px #fff;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:rgba(255,255,255,.8)}.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 #7b98bc;height:150px;margin:2px;width:150px}.ol-overviewmap:not(.ol-collapsed) button{bottom:2px;left:2px;position:absolute}.ol-overviewmap.ol-collapsed .ol-overviewmap-map,.ol-overviewmap.ol-uncollapsible button{display:none}.ol-overviewmap:not(.ol-collapsed){background:rgba(255,255,255,.8)}.ol-overviewmap-box{border:2px dotted rgba(0,60,136,.7)}.ol-overviewmap .ol-overviewmap-box:hover{cursor:move} -/*# sourceMappingURL=ol.css.map */ \ No newline at end of file diff --git a/templates/map/client/libs/openlayers/6.14.1/ol.css.map b/templates/map/client/libs/openlayers/6.14.1/ol.css.map deleted file mode 100644 index e8623ca..0000000 --- a/templates/map/client/libs/openlayers/6.14.1/ol.css.map +++ /dev/null @@ -1 +0,0 @@ -{"version":3,"sources":["src/ol/ol.css"],"names":[],"mappings":"AAAA,QACE,WAAY,WACZ,cAAe,IACf,OAAQ,MAAM,MAAM,QACpB,iBAAkB,qBAGpB,mBACE,IAAK,IACL,MAAO,IACP,SAAU,SAGZ,eACE,WAAY,kBACZ,cAAe,IACf,OAAQ,IACR,KAAM,IACN,QAAS,IACT,SAAU,SAEZ,qBACE,OAAQ,IAAI,MAAM,KAClB,WAAY,KACZ,MAAO,KACP,UAAW,KACX,WAAY,OACZ,OAAQ,IACR,YAAa,QAAQ,CAAE,MACvB,WAAY,IAA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,OAAQ,QACR,MAAO,QACP,YAAa,KACb,iBAAkB,kBAClB,OAAQ,KACR,cAAe,IAEjB,qCACE,OAAQ,KACR,QAAS,EAEX,uBACE,YAAa,MAEf,YACE,QAAS,MACT,YAAa,IACb,UAAW,MACX,YAAa,UAEf,6BACE,UAAW,MAEb,0BACE,IAAK,MAGP,yBADA,yBAEE,gBAAiB,KACjB,iBAAkB,kBAEpB,qBACE,cAAe,IAAI,IAAI,EAAE,EAE3B,sBACE,cAAe,EAAE,EAAE,IAAI,IAIzB,gBACE,WAAY,MACZ,OAAQ,KACR,MAAO,KACP,UAAW,mBACX,QAAS,KACT,UAAW,YACX,YAAa,OAEf,kBACE,MAAO,kBACP,gBAAiB,KAEnB,mBACE,OAAQ,EACR,QAAS,IAAI,KACb,MAAO,KACP,YAAa,EAAE,EAAE,IAAI,KACrB,UAAW,KAEb,mBACE,QAAS,OACT,WAAY,KAEd,0CACE,QAAS,IAEX,oBACE,WAAY,IACZ,UAAW,QACX,eAAgB,OAElB,uBACE,YAAa,EAEf,gCACE,QAAS,KAEX,mCACE,WAAY,qBAEd,iCACE,OAAQ,EACR,MAAO,EACP,cAAe,IAAI,EAAE,EAEvB,qCACE,WAAY,MACZ,WAAY,MAEd,wCACE,QAAS,KAGX,eACE,IAAK,MACL,KAAM,KACN,OAAQ,MAEV,sBACE,SAAU,SACV,OAAQ,KAGV,yBACE,IAAK,MAGP,gBACE,KAAM,KACN,OAAQ,KAEV,iCACE,OAAQ,EACR,KAAM,EACN,cAAe,EAAE,IAAI,EAAE,EAEzB,oCACA,uBACE,QAAS,MAEX,oCACE,OAAQ,IAAI,MAAM,QAClB,OAAQ,MACR,OAAQ,IACR,MAAO,MAET,0CACE,OAAQ,IACR,KAAM,IACN,SAAU,SAEZ,iDACA,wCACE,QAAS,KAEX,mCACE,WAAY,qBAEd,oBACE,OAAQ,IAAI,OAAO,kBAGrB,0CACE,OAAQ"} \ No newline at end of file diff --git a/templates/map/client/libs/openlayers/6.14.1/ol.js b/templates/map/client/libs/openlayers/6.14.1/ol.js deleted file mode 100644 index d214559..0000000 --- a/templates/map/client/libs/openlayers/6.14.1/ol.js +++ /dev/null @@ -1,3 +0,0 @@ -/*! For license information please see ol.js.LICENSE.txt */ -!function(t,n){"object"==typeof exports&&"object"==typeof module?module.exports=n():"function"==typeof define&&define.amd?define([],n):"object"==typeof exports?exports.ol=n():t.ol=n()}(self,(function(){return function(){var t,n={226:function(t,n){n.read=function(t,n,i,r,e){var o,s,a=8*e-r-1,u=(1<>1,h=-7,f=i?e-1:0,l=i?-1:1,v=t[n+f];for(f+=l,o=v&(1<<-h)-1,v>>=-h,h+=a;h>0;o=256*o+t[n+f],f+=l,h-=8);for(s=o&(1<<-h)-1,o>>=-h,h+=r;h>0;s=256*s+t[n+f],f+=l,h-=8);if(0===o)o=1-c;else{if(o===u)return s?NaN:1/0*(v?-1:1);s+=Math.pow(2,r),o-=c}return(v?-1:1)*s*Math.pow(2,o-r)},n.write=function(t,n,i,r,e,o){var s,a,u,c=8*o-e-1,h=(1<>1,l=23===e?Math.pow(2,-24)-Math.pow(2,-77):0,v=r?0:o-1,d=r?1:-1,p=n<0||0===n&&1/n<0?1:0;for(n=Math.abs(n),isNaN(n)||n===1/0?(a=isNaN(n)?1:0,s=h):(s=Math.floor(Math.log(n)/Math.LN2),n*(u=Math.pow(2,-s))<1&&(s--,u*=2),(n+=s+f>=1?l/u:l*Math.pow(2,1-f))*u>=2&&(s++,u/=2),s+f>=h?(a=0,s=h):s+f>=1?(a=(n*u-1)*Math.pow(2,e),s+=f):(a=n*Math.pow(2,f-1)*Math.pow(2,e),s=0));e>=8;t[i+v]=255&a,v+=d,a/=256,e-=8);for(s=s<0;t[i+v]=255&s,v+=d,s/=256,c-=8);t[i+v-d]|=128*p}},875:function(t,n,i){"use strict";function r(t,n){if(!(t instanceof n))throw new TypeError("Cannot call a class as a function")}function e(t,n){for(var i=0;ithis[a])return j(this,this[p].get(t)),!1;var o=this[p].get(t).value;return this[l]&&(this[v]||this[l](t,o.value)),o.now=r,o.maxAge=i,o.value=n,this[u]+=e-o.length,o.length=e,this.get(t),x(this),!0}var s=new S(t,n,e,r,i);return s.length>this[a]?(this[l]&&this[l](t,n),!1):(this[u]+=s.length,this[d].unshift(s),this[p].set(t,this[d].head),x(this),!0)}},{key:"has",value:function(t){if(!this[p].has(t))return!1;var n=this[p].get(t).value;return!g(this,n)}},{key:"get",value:function(t){return b(this,t,!0)}},{key:"peek",value:function(t){return b(this,t,!1)}},{key:"pop",value:function(){var t=this[d].tail;return t?(j(this,t),t.value):null}},{key:"del",value:function(t){j(this,this[p].get(t))}},{key:"load",value:function(t){this.reset();for(var n=Date.now(),i=t.length-1;i>=0;i--){var r=t[i],e=r.e||0;if(0===e)this.set(r.k,r.v);else{var o=e-n;o>0&&this.set(r.k,r.v,o)}}}},{key:"prune",value:function(){var t=this;this[p].forEach((function(n,i){return b(t,i,!1)}))}}]),t}(),b=function(t,n,i){var r=t[p].get(n);if(r){var e=r.value;if(g(t,e)){if(j(t,r),!t[h])return}else i&&(t[y]&&(r.value.now=Date.now()),t[d].unshiftNode(r));return e.value}},g=function(t,n){if(!n||!n.maxAge&&!t[f])return!1;var i=Date.now()-n.now;return n.maxAge?i>n.maxAge:t[f]&&i>t[f]},x=function(t){if(t[u]>t[a])for(var n=t[d].tail;t[u]>t[a]&&null!==n;){var i=n.prev;j(t,n),n=i}},j=function(t,n){if(n){var i=n.value;t[l]&&t[l](i.key,i.value),t[u]-=i.length,t[p].delete(i.key),t[d].removeNode(n)}},S=o((function t(n,i,e,o,s){r(this,t),this.key=n,this.value=i,this.length=e,this.now=o,this.maxAge=s||0})),k=function(t,n,i,r){var e=i.value;g(t,e)&&(j(t,i),t[h]||(e=void 0)),e&&n.call(r,e.value,e.key,t)};t.exports=w},63:function(t){var n={thin:100,hairline:100,"ultra-light":100,"extra-light":100,light:200,book:300,regular:400,normal:400,plain:400,roman:400,standard:400,medium:500,"semi-bold":600,"demi-bold":600,bold:700,heavy:800,black:800,"extra-bold":800,"ultra-black":900,"extra-black":900,"ultra-bold":900,"heavy-black":900,fat:900,poster:900},i=" ",r=/(italic|oblique)$/i,e={};t.exports=function(t,o,s){var a=e[t];if(!a){Array.isArray(t)||(t=[t]);for(var u=400,c="normal",h=[],f=0,l=t.length;f1?v[v.length-2].toLowerCase():"";if(d==p||d==p.replace("-","")||y+"-"+d==p){u=n[p],v.pop(),y&&p.startsWith(y)&&v.pop();break}}"number"==typeof d&&(u=d);var m=v.join(i).replace("Klokantech Noto Sans","Noto Sans");-1!==m.indexOf(i)&&(m='"'+m+'"'),h.push(m)}a=e[t]=[c,u,h]}return a[0]+i+a[1]+i+o+"px"+(s?"/"+s:"")+i+a[2]}},98:function(t,n,i){"use strict";t.exports=e;var r=i(226);function e(t){this.buf=ArrayBuffer.isView&&ArrayBuffer.isView(t)?t:new Uint8Array(t||0),this.pos=0,this.type=0,this.length=this.buf.length}e.Varint=0,e.Fixed64=1,e.Bytes=2,e.Fixed32=5;var o=4294967296,s=1/o,a="undefined"==typeof TextDecoder?null:new TextDecoder("utf8");function u(t){return t.type===e.Bytes?t.readVarint()+t.pos:t.pos+1}function c(t,n,i){return i?4294967296*n+(t>>>0):4294967296*(n>>>0)+(t>>>0)}function h(t,n,i){var r=n<=16383?1:n<=2097151?2:n<=268435455?3:Math.floor(Math.log(n)/(7*Math.LN2));i.realloc(r);for(var e=i.pos-1;e>=t;e--)i.buf[e+r]=i.buf[e]}function f(t,n){for(var i=0;i>>8,t[i+2]=n>>>16,t[i+3]=n>>>24}function j(t,n){return(t[n]|t[n+1]<<8|t[n+2]<<16)+(t[n+3]<<24)}e.prototype={destroy:function(){this.buf=null},readFields:function(t,n,i){for(i=i||this.length;this.pos>3,o=this.pos;this.type=7&r,t(e,n,this),this.pos===o&&this.skip(r)}return n},readMessage:function(t,n){return this.readFields(t,n,this.readVarint()+this.pos)},readFixed32:function(){var t=g(this.buf,this.pos);return this.pos+=4,t},readSFixed32:function(){var t=j(this.buf,this.pos);return this.pos+=4,t},readFixed64:function(){var t=g(this.buf,this.pos)+g(this.buf,this.pos+4)*o;return this.pos+=8,t},readSFixed64:function(){var t=g(this.buf,this.pos)+j(this.buf,this.pos+4)*o;return this.pos+=8,t},readFloat:function(){var t=r.read(this.buf,this.pos,!0,23,4);return this.pos+=4,t},readDouble:function(){var t=r.read(this.buf,this.pos,!0,52,8);return this.pos+=8,t},readVarint:function(t){var n,i,r=this.buf;return n=127&(i=r[this.pos++]),i<128?n:(n|=(127&(i=r[this.pos++]))<<7,i<128?n:(n|=(127&(i=r[this.pos++]))<<14,i<128?n:(n|=(127&(i=r[this.pos++]))<<21,i<128?n:function(t,n,i){var r,e,o=i.buf;if(e=o[i.pos++],r=(112&e)>>4,e<128)return c(t,r,n);if(e=o[i.pos++],r|=(127&e)<<3,e<128)return c(t,r,n);if(e=o[i.pos++],r|=(127&e)<<10,e<128)return c(t,r,n);if(e=o[i.pos++],r|=(127&e)<<17,e<128)return c(t,r,n);if(e=o[i.pos++],r|=(127&e)<<24,e<128)return c(t,r,n);if(e=o[i.pos++],r|=(1&e)<<31,e<128)return c(t,r,n);throw new Error("Expected varint not more than 10 bytes")}(n|=(15&(i=r[this.pos]))<<28,t,this))))},readVarint64:function(){return this.readVarint(!0)},readSVarint:function(){var t=this.readVarint();return t%2==1?(t+1)/-2:t/2},readBoolean:function(){return Boolean(this.readVarint())},readString:function(){var t=this.readVarint()+this.pos,n=this.pos;return this.pos=t,t-n>=12&&a?function(t,n,i){return a.decode(t.subarray(n,i))}(this.buf,n,t):function(t,n,i){var r="",e=n;for(;e239?4:u>223?3:u>191?2:1;if(e+h>i)break;1===h?u<128&&(c=u):2===h?128==(192&(o=t[e+1]))&&(c=(31&u)<<6|63&o)<=127&&(c=null):3===h?(o=t[e+1],s=t[e+2],128==(192&o)&&128==(192&s)&&((c=(15&u)<<12|(63&o)<<6|63&s)<=2047||c>=55296&&c<=57343)&&(c=null)):4===h&&(o=t[e+1],s=t[e+2],a=t[e+3],128==(192&o)&&128==(192&s)&&128==(192&a)&&((c=(15&u)<<18|(63&o)<<12|(63&s)<<6|63&a)<=65535||c>=1114112)&&(c=null)),null===c?(c=65533,h=1):c>65535&&(c-=65536,r+=String.fromCharCode(c>>>10&1023|55296),c=56320|1023&c),r+=String.fromCharCode(c),e+=h}return r}(this.buf,n,t)},readBytes:function(){var t=this.readVarint()+this.pos,n=this.buf.subarray(this.pos,t);return this.pos=t,n},readPackedVarint:function(t,n){if(this.type!==e.Bytes)return t.push(this.readVarint(n));var i=u(this);for(t=t||[];this.pos127;);else if(n===e.Bytes)this.pos=this.readVarint()+this.pos;else if(n===e.Fixed32)this.pos+=4;else{if(n!==e.Fixed64)throw new Error("Unimplemented type: "+n);this.pos+=8}},writeTag:function(t,n){this.writeVarint(t<<3|n)},realloc:function(t){for(var n=this.length||16;n268435455||t<0?function(t,n){var i,r;t>=0?(i=t%4294967296|0,r=t/4294967296|0):(r=~(-t/4294967296),4294967295^(i=~(-t%4294967296))?i=i+1|0:(i=0,r=r+1|0));if(t>=0x10000000000000000||t<-0x10000000000000000)throw new Error("Given varint doesn't fit into 10 bytes");n.realloc(10),function(t,n,i){i.buf[i.pos++]=127&t|128,t>>>=7,i.buf[i.pos++]=127&t|128,t>>>=7,i.buf[i.pos++]=127&t|128,t>>>=7,i.buf[i.pos++]=127&t|128,t>>>=7,i.buf[i.pos]=127&t}(i,0,n),function(t,n){var i=(7&t)<<4;if(n.buf[n.pos++]|=i|((t>>>=3)?128:0),!t)return;if(n.buf[n.pos++]=127&t|((t>>>=7)?128:0),!t)return;if(n.buf[n.pos++]=127&t|((t>>>=7)?128:0),!t)return;if(n.buf[n.pos++]=127&t|((t>>>=7)?128:0),!t)return;if(n.buf[n.pos++]=127&t|((t>>>=7)?128:0),!t)return;n.buf[n.pos++]=127&t}(r,n)}(t,this):(this.realloc(4),this.buf[this.pos++]=127&t|(t>127?128:0),t<=127||(this.buf[this.pos++]=127&(t>>>=7)|(t>127?128:0),t<=127||(this.buf[this.pos++]=127&(t>>>=7)|(t>127?128:0),t<=127||(this.buf[this.pos++]=t>>>7&127))))},writeSVarint:function(t){this.writeVarint(t<0?2*-t-1:2*t)},writeBoolean:function(t){this.writeVarint(Boolean(t))},writeString:function(t){t=String(t),this.realloc(4*t.length),this.pos++;var n=this.pos;this.pos=function(t,n,i){for(var r,e,o=0;o55295&&r<57344){if(!e){r>56319||o+1===n.length?(t[i++]=239,t[i++]=191,t[i++]=189):e=r;continue}if(r<56320){t[i++]=239,t[i++]=191,t[i++]=189,e=r;continue}r=e-55296<<10|r-56320|65536,e=null}else e&&(t[i++]=239,t[i++]=191,t[i++]=189,e=null);r<128?t[i++]=r:(r<2048?t[i++]=r>>6|192:(r<65536?t[i++]=r>>12|224:(t[i++]=r>>18|240,t[i++]=r>>12&63|128),t[i++]=r>>6&63|128),t[i++]=63&r|128)}return i}(this.buf,t,this.pos);var i=this.pos-n;i>=128&&h(n,i,this),this.pos=n-1,this.writeVarint(i),this.pos+=i},writeFloat:function(t){this.realloc(4),r.write(this.buf,t,this.pos,!0,23,4),this.pos+=4},writeDouble:function(t){this.realloc(8),r.write(this.buf,t,this.pos,!0,52,8),this.pos+=8},writeBytes:function(t){var n=t.length;this.writeVarint(n),this.realloc(n);for(var i=0;i=128&&h(i,r,this),this.pos=i-1,this.writeVarint(r),this.pos+=r},writeMessage:function(t,n,i){this.writeTag(t,e.Bytes),this.writeRawMessage(n,i)},writePackedVarint:function(t,n){n.length&&this.writeMessage(t,f,n)},writePackedSVarint:function(t,n){n.length&&this.writeMessage(t,l,n)},writePackedBoolean:function(t,n){n.length&&this.writeMessage(t,p,n)},writePackedFloat:function(t,n){n.length&&this.writeMessage(t,v,n)},writePackedDouble:function(t,n){n.length&&this.writeMessage(t,d,n)},writePackedFixed32:function(t,n){n.length&&this.writeMessage(t,y,n)},writePackedSFixed32:function(t,n){n.length&&this.writeMessage(t,m,n)},writePackedFixed64:function(t,n){n.length&&this.writeMessage(t,w,n)},writePackedSFixed64:function(t,n){n.length&&this.writeMessage(t,b,n)},writeBytesField:function(t,n){this.writeTag(t,e.Bytes),this.writeBytes(n)},writeFixed32Field:function(t,n){this.writeTag(t,e.Fixed32),this.writeFixed32(n)},writeSFixed32Field:function(t,n){this.writeTag(t,e.Fixed32),this.writeSFixed32(n)},writeFixed64Field:function(t,n){this.writeTag(t,e.Fixed64),this.writeFixed64(n)},writeSFixed64Field:function(t,n){this.writeTag(t,e.Fixed64),this.writeSFixed64(n)},writeVarintField:function(t,n){this.writeTag(t,e.Varint),this.writeVarint(n)},writeSVarintField:function(t,n){this.writeTag(t,e.Varint),this.writeSVarint(n)},writeStringField:function(t,n){this.writeTag(t,e.Bytes),this.writeString(n)},writeFloatField:function(t,n){this.writeTag(t,e.Fixed32),this.writeFloat(n)},writeDoubleField:function(t,n){this.writeTag(t,e.Fixed64),this.writeDouble(n)},writeBooleanField:function(t,n){this.writeVarintField(t,Boolean(n))}}},72:function(t,n,i){var r,e,o;function s(t){return(s="function"==typeof Symbol&&"symbol"==typeof Symbol.iterator?function(t){return typeof t}:function(t){return t&&"function"==typeof Symbol&&t.constructor===Symbol&&t!==Symbol.prototype?"symbol":typeof t})(t)}o=function(){"use strict";function t(t,r,e,o,s){!function t(i,r,e,o,s){for(;o>e;){if(o-e>600){var a=o-e+1,u=r-e+1,c=Math.log(a),h=.5*Math.exp(2*c/3),f=.5*Math.sqrt(c*h*(a-h)/a)*(u-a/2<0?-1:1);t(i,r,Math.max(e,Math.floor(r-u*h/a+f)),Math.min(o,Math.floor(r+(a-u)*h/a+f)),s)}var l=i[r],v=e,d=o;for(n(i,e,r),s(i[o],l)>0&&n(i,e,o);v0;)d--}0===s(i[e],l)?n(i,e,d):n(i,++d,o),d<=r&&(e=d+1),r<=d&&(o=d-1)}}(t,r,e||0,o||t.length-1,s||i)}function n(t,n,i){var r=t[n];t[n]=t[i],t[i]=r}function i(t,n){return tn?1:0}var r=function(t){void 0===t&&(t=9),this._maxEntries=Math.max(4,t),this._minEntries=Math.max(2,Math.ceil(.4*this._maxEntries)),this.clear()};function e(t,n,i){if(!i)return n.indexOf(t);for(var r=0;r=t.minX&&n.maxY>=t.minY}function d(t){return{children:t,height:1,leaf:!0,minX:1/0,minY:1/0,maxX:-1/0,maxY:-1/0}}function p(n,i,r,e,o){for(var s=[i,r];s.length;)if(!((r=s.pop())-(i=s.pop())<=e)){var a=i+Math.ceil((r-i)/e/2)*e;t(n,a,i,r,o),s.push(i,a,a,r)}}return r.prototype.all=function(){return this._all(this.data,[])},r.prototype.search=function(t){var n=this.data,i=[];if(!v(t,n))return i;for(var r=this.toBBox,e=[];n;){for(var o=0;o=0&&e[n].children.length>this._maxEntries;)this._split(e,n),n--;this._adjustParentBBoxes(r,e,n)},r.prototype._split=function(t,n){var i=t[n],r=i.children.length,e=this._minEntries;this._chooseSplitAxis(i,e,r);var s=this._chooseSplitIndex(i,e,r),a=d(i.children.splice(s,i.children.length-s));a.height=i.height,a.leaf=i.leaf,o(i,this.toBBox),o(a,this.toBBox),n?t[n-1].children.push(a):this._splitRoot(i,a)},r.prototype._splitRoot=function(t,n){this.data=d([t,n]),this.data.height=t.height+1,this.data.leaf=!1,o(this.data,this.toBBox)},r.prototype._chooseSplitIndex=function(t,n,i){for(var r,e,o,a,u,c,f,l=1/0,v=1/0,d=n;d<=i-n;d++){var p=s(t,0,d,this.toBBox),y=s(t,d,i,this.toBBox),m=(e=p,o=y,a=Math.max(e.minX,o.minX),u=Math.max(e.minY,o.minY),c=Math.min(e.maxX,o.maxX),f=Math.min(e.maxY,o.maxY),Math.max(0,c-a)*Math.max(0,f-u)),w=h(p)+h(y);m=n;v--){var d=t.children[v];a(u,t.leaf?e(d):d),c+=f(u)}return c},r.prototype._adjustParentBBoxes=function(t,n,i){for(var r=i;r>=0;r--)a(n[r],t)},r.prototype._condense=function(t){for(var n=t.length-1,i=void 0;n>=0;n--)0===t[n].children.length?n>0?(i=t[n-1].children).splice(i.indexOf(t[n]),1):this.clear():o(t[n],this.toBBox)},r},"object"==s(n)?t.exports=o():void 0===(e="function"==typeof(r=o)?r.call(n,i,n,t):r)||(t.exports=e)},760:function(t,n,i){function r(t){return(r="function"==typeof Symbol&&"symbol"==typeof Symbol.iterator?function(t){return typeof t}:function(t){return t&&"function"==typeof Symbol&&t.constructor===Symbol&&t!==Symbol.prototype?"symbol":typeof t})(t)}var e=function(t){"use strict";var n,i=Object.prototype,e=i.hasOwnProperty,o="function"==typeof Symbol?Symbol:{},s=o.iterator||"@@iterator",a=o.asyncIterator||"@@asyncIterator",u=o.toStringTag||"@@toStringTag";function c(t,n,i){return Object.defineProperty(t,n,{value:i,enumerable:!0,configurable:!0,writable:!0}),t[n]}try{c({},"")}catch(t){c=function(t,n,i){return t[n]=i}}function h(t,n,i,r){var e=n&&n.prototype instanceof m?n:m,o=Object.create(e.prototype),s=new E(r||[]);return o._invoke=function(t,n,i){var r=l;return function(e,o){if(r===d)throw new Error("Generator is already running");if(r===p){if("throw"===e)throw o;return C()}for(i.method=e,i.arg=o;;){var s=i.delegate;if(s){var a=_(s,i);if(a){if(a===y)continue;return a}}if("next"===i.method)i.sent=i._sent=i.arg;else if("throw"===i.method){if(r===l)throw r=p,i.arg;i.dispatchException(i.arg)}else"return"===i.method&&i.abrupt("return",i.arg);r=d;var u=f(t,n,i);if("normal"===u.type){if(r=i.done?p:v,u.arg===y)continue;return{value:u.arg,done:i.done}}"throw"===u.type&&(r=p,i.method="throw",i.arg=u.arg)}}}(t,i,s),o}function f(t,n,i){try{return{type:"normal",arg:t.call(n,i)}}catch(t){return{type:"throw",arg:t}}}t.wrap=h;var l="suspendedStart",v="suspendedYield",d="executing",p="completed",y={};function m(){}function w(){}function b(){}var g={};c(g,s,(function(){return this}));var x=Object.getPrototypeOf,j=x&&x(x(A([])));j&&j!==i&&e.call(j,s)&&(g=j);var S=b.prototype=m.prototype=Object.create(g);function k(t){["next","throw","return"].forEach((function(n){c(t,n,(function(t){return this._invoke(n,t)}))}))}function M(t,n){function i(o,s,a,u){var c=f(t[o],t,s);if("throw"!==c.type){var h=c.arg,l=h.value;return l&&"object"===r(l)&&e.call(l,"__await")?n.resolve(l.__await).then((function(t){i("next",t,a,u)}),(function(t){i("throw",t,a,u)})):n.resolve(l).then((function(t){h.value=t,a(h)}),(function(t){return i("throw",t,a,u)}))}u(c.arg)}var o;this._invoke=function(t,r){function e(){return new n((function(n,e){i(t,r,n,e)}))}return o=o?o.then(e,e):e()}}function _(t,i){var r=t.iterator[i.method];if(r===n){if(i.delegate=null,"throw"===i.method){if(t.iterator.return&&(i.method="return",i.arg=n,_(t,i),"throw"===i.method))return y;i.method="throw",i.arg=new TypeError("The iterator does not provide a 'throw' method")}return y}var e=f(r,t.iterator,i.arg);if("throw"===e.type)return i.method="throw",i.arg=e.arg,i.delegate=null,y;var o=e.arg;return o?o.done?(i[t.resultName]=o.value,i.next=t.nextLoc,"return"!==i.method&&(i.method="next",i.arg=n),i.delegate=null,y):o:(i.method="throw",i.arg=new TypeError("iterator result is not an object"),i.delegate=null,y)}function O(t){var n={tryLoc:t[0]};1 in t&&(n.catchLoc=t[1]),2 in t&&(n.finallyLoc=t[2],n.afterLoc=t[3]),this.tryEntries.push(n)}function T(t){var n=t.completion||{};n.type="normal",delete n.arg,t.completion=n}function E(t){this.tryEntries=[{tryLoc:"root"}],t.forEach(O,this),this.reset(!0)}function A(t){if(t){var i=t[s];if(i)return i.call(t);if("function"==typeof t.next)return t;if(!isNaN(t.length)){var r=-1,o=function i(){for(;++r=0;--o){var s=this.tryEntries[o],a=s.completion;if("root"===s.tryLoc)return r("end");if(s.tryLoc<=this.prev){var u=e.call(s,"catchLoc"),c=e.call(s,"finallyLoc");if(u&&c){if(this.prev=0;--i){var r=this.tryEntries[i];if(r.tryLoc<=this.prev&&e.call(r,"finallyLoc")&&this.prev=0;--n){var i=this.tryEntries[n];if(i.finallyLoc===t)return this.complete(i.completion,i.afterLoc),T(i),y}},catch:function(t){for(var n=this.tryEntries.length-1;n>=0;--n){var i=this.tryEntries[n];if(i.tryLoc===t){var r=i.completion;if("throw"===r.type){var e=r.arg;T(i)}return e}}throw new Error("illegal catch attempt")},delegateYield:function(t,i,r){return this.delegate={iterator:A(t),resultName:i,nextLoc:r},"next"===this.method&&(this.arg=n),y}},t}("object"===r(t=i.nmd(t))?t.exports:{});try{regeneratorRuntime=e}catch(t){"object"===("undefined"==typeof globalThis?"undefined":r(globalThis))?globalThis.regeneratorRuntime=e:Function("r","regeneratorRuntime = r")(e)}},338:function(t){(function(){var n;t.exports={icon:"icons/google.svg",name:"google",title:"Google Fonts",link:"google.com/fonts",getNames:function(){return n},getLink:function(t){return"https://fonts.google.com/specimen/"+t.replace(/( )/g,"+")},normalizeName:function(t){return t}},n=["ABeeZee","Abel","Abril Fatface","Aclonica","Acme","Actor","Adamina","Advent Pro","Aguafina Script","Akronim","Aladin","Aldrich","Alef","Alegreya","Alegreya SC","Alegreya Sans","Alegreya Sans SC","Alex Brush","Alfa Slab One","Alice","Alike","Alike Angular","Allan","Allerta","Allerta Stencil","Allura","Almendra","Almendra Display","Almendra SC","Amarante","Amaranth","Amatic SC","Amethysta","Amiri","Amita","Anaheim","Andada","Andika","Angkor","Annie Use Your Telescope","Anonymous Pro","Antic","Antic Didone","Antic Slab","Anton","Arapey","Arbutus","Arbutus Slab","Architects Daughter","Archivo Black","Archivo Narrow","Arimo","Arizonia","Armata","Artifika","Arvo","Arya","Asap","Asar","Asset","Astloch","Asul","Atomic Age","Aubrey","Audiowide","Autour One","Average","Average Sans","Averia Gruesa Libre","Averia Libre","Averia Sans Libre","Averia Serif Libre","Bad Script","Balthazar","Bangers","Basic","Battambang","Baumans","Bayon","Belgrano","Belleza","BenchNine","Bentham","Berkshire Swash","Bevan","Bigelow Rules","Bigshot One","Bilbo","Bilbo Swash Caps","Biryani","Bitter","Black Ops One","Bokor","Bonbon","Boogaloo","Bowlby One","Bowlby One SC","Brawler","Bree Serif","Bubblegum Sans","Bubbler One","Buda","Buenard","Butcherman","Butterfly Kids","Cabin","Cabin Condensed","Cabin Sketch","Caesar Dressing","Cagliostro","Calligraffitti","Cambay","Cambo","Candal","Cantarell","Cantata One","Cantora One","Capriola","Cardo","Carme","Carrois Gothic","Carrois Gothic SC","Carter One","Catamaran","Caudex","Caveat","Caveat Brush","Cedarville Cursive","Ceviche One","Changa One","Chango","Chau Philomene One","Chela One","Chelsea Market","Chenla","Cherry Cream Soda","Cherry Swash","Chewy","Chicle","Chivo","Chonburi","Cinzel","Cinzel Decorative","Clicker Script","Coda","Coda Caption","Codystar","Combo","Comfortaa","Coming Soon","Concert One","Condiment","Content","Contrail One","Convergence","Cookie","Copse","Corben","Courgette","Cousine","Coustard","Covered By Your Grace","Crafty Girls","Creepster","Crete Round","Crimson Text","Croissant One","Crushed","Cuprum","Cutive","Cutive Mono","Damion","Dancing Script","Dangrek","Dawning of a New Day","Days One","Dekko","Delius","Delius Swash Caps","Delius Unicase","Della Respira","Denk One","Devonshire","Dhurjati","Didact Gothic","Diplomata","Diplomata SC","Domine","Donegal One","Doppio One","Dorsa","Dosis","Dr Sugiyama","Droid Sans","Droid Sans Mono","Droid Serif","Duru Sans","Dynalight","EB Garamond","Eagle Lake","Eater","Economica","Eczar","Ek Mukta","Electrolize","Elsie","Elsie Swash Caps","Emblema One","Emilys Candy","Engagement","Englebert","Enriqueta","Erica One","Esteban","Euphoria Script","Ewert","Exo","Exo 2","Expletus Sans","Fanwood Text","Fascinate","Fascinate Inline","Faster One","Fasthand","Fauna One","Federant","Federo","Felipa","Fenix","Finger Paint","Fira Mono","Fira Sans","Fjalla One","Fjord One","Flamenco","Flavors","Fondamento","Fontdiner Swanky","Forum","Francois One","Freckle Face","Fredericka the Great","Fredoka One","Freehand","Fresca","Frijole","Fruktur","Fugaz One","GFS Didot","GFS Neohellenic","Gabriela","Gafata","Galdeano","Galindo","Gentium Basic","Gentium Book Basic","Geo","Geostar","Geostar Fill","Germania One","Gidugu","Gilda Display","Give You Glory","Glass Antiqua","Glegoo","Gloria Hallelujah","Goblin One","Gochi Hand","Gorditas","Goudy Bookletter 1911","Graduate","Grand Hotel","Gravitas One","Great Vibes","Griffy","Gruppo","Gudea","Gurajada","Habibi","Halant","Hammersmith One","Hanalei","Hanalei Fill","Handlee","Hanuman","Happy Monkey","Headland One","Henny Penny","Herr Von Muellerhoff","Hind","Hind Siliguri","Hind Vadodara","Holtwood One SC","Homemade Apple","Homenaje","IM Fell DW Pica","IM Fell DW Pica SC","IM Fell Double Pica","IM Fell Double Pica SC","IM Fell English","IM Fell English SC","IM Fell French Canon","IM Fell French Canon SC","IM Fell Great Primer","IM Fell Great Primer SC","Iceberg","Iceland","Imprima","Inconsolata","Inder","Indie Flower","Inika","Inknut Antiqua","Irish Grover","Istok Web","Italiana","Italianno","Itim","Jacques Francois","Jacques Francois Shadow","Jaldi","Jim Nightshade","Jockey One","Jolly Lodger","Josefin Sans","Josefin Slab","Joti One","Judson","Julee","Julius Sans One","Junge","Jura","Just Another Hand","Just Me Again Down Here","Kadwa","Kalam","Kameron","Kantumruy","Karla","Karma","Kaushan Script","Kavoon","Kdam Thmor","Keania One","Kelly Slab","Kenia","Khand","Khmer","Khula","Kite One","Knewave","Kotta One","Koulen","Kranky","Kreon","Kristi","Krona One","Kurale","La Belle Aurore","Laila","Lakki Reddy","Lancelot","Lateef","Lato","League Script","Leckerli One","Ledger","Lekton","Lemon","Libre Baskerville","Life Savers","Lilita One","Lily Script One","Limelight","Linden Hill","Lobster","Lobster Two","Londrina Outline","Londrina Shadow","Londrina Sketch","Londrina Solid","Lora","Love Ya Like A Sister","Loved by the King","Lovers Quarrel","Luckiest Guy","Lusitana","Lustria","Macondo","Macondo Swash Caps","Magra","Maiden Orange","Mako","Mallanna","Mandali","Marcellus","Marcellus SC","Marck Script","Margarine","Marko One","Marmelad","Martel","Martel Sans","Marvel","Mate","Mate SC","Maven Pro","McLaren","Meddon","MedievalSharp","Medula One","Megrim","Meie Script","Merienda","Merienda One","Merriweather","Merriweather Sans","Metal","Metal Mania","Metamorphous","Metrophobic","Michroma","Milonga","Miltonian","Miltonian Tattoo","Miniver","Miss Fajardose","Modak","Modern Antiqua","Molengo","Molle","Monda","Monofett","Monoton","Monsieur La Doulaise","Montaga","Montez","Montserrat","Montserrat Alternates","Montserrat Subrayada","Moul","Moulpali","Mountains of Christmas","Mouse Memoirs","Mr Bedfort","Mr Dafoe","Mr De Haviland","Mrs Saint Delafield","Mrs Sheppards","Muli","Mystery Quest","NTR","Neucha","Neuton","New Rocker","News Cycle","Niconne","Nixie One","Nobile","Nokora","Norican","Nosifer","Nothing You Could Do","Noticia Text","Noto Sans","Noto Serif","Nova Cut","Nova Flat","Nova Mono","Nova Oval","Nova Round","Nova Script","Nova Slim","Nova Square","Numans","Nunito","Odor Mean Chey","Offside","Old Standard TT","Oldenburg","Oleo Script","Oleo Script Swash Caps","Open Sans","Open Sans Condensed","Oranienbaum","Orbitron","Oregano","Orienta","Original Surfer","Oswald","Over the Rainbow","Overlock","Overlock SC","Ovo","Oxygen","Oxygen Mono","PT Mono","PT Sans","PT Sans Caption","PT Sans Narrow","PT Serif","PT Serif Caption","Pacifico","Palanquin","Palanquin Dark","Paprika","Parisienne","Passero One","Passion One","Pathway Gothic One","Patrick Hand","Patrick Hand SC","Patua One","Paytone One","Peddana","Peralta","Permanent Marker","Petit Formal Script","Petrona","Philosopher","Piedra","Pinyon Script","Pirata One","Plaster","Play","Playball","Playfair Display","Playfair Display SC","Podkova","Poiret One","Poller One","Poly","Pompiere","Pontano Sans","Poppins","Port Lligat Sans","Port Lligat Slab","Pragati Narrow","Prata","Preahvihear","Press Start 2P","Princess Sofia","Prociono","Prosto One","Puritan","Purple Purse","Quando","Quantico","Quattrocento","Quattrocento Sans","Questrial","Quicksand","Quintessential","Qwigley","Racing Sans One","Radley","Rajdhani","Raleway","Raleway Dots","Ramabhadra","Ramaraja","Rambla","Rammetto One","Ranchers","Rancho","Ranga","Rationale","Ravi Prakash","Redressed","Reenie Beanie","Revalia","Rhodium Libre","Ribeye","Ribeye Marrow","Righteous","Risque","Roboto","Roboto Condensed","Roboto Mono","Roboto Slab","Rochester","Rock Salt","Rokkitt","Romanesco","Ropa Sans","Rosario","Rosarivo","Rouge Script","Rozha One","Rubik","Rubik Mono One","Rubik One","Ruda","Rufina","Ruge Boogie","Ruluko","Rum Raisin","Ruslan Display","Russo One","Ruthie","Rye","Sacramento","Sahitya","Sail","Salsa","Sanchez","Sancreek","Sansita One","Sarala","Sarina","Sarpanch","Satisfy","Scada","Scheherazade","Schoolbell","Seaweed Script","Sevillana","Seymour One","Shadows Into Light","Shadows Into Light Two","Shanti","Share","Share Tech","Share Tech Mono","Shojumaru","Short Stack","Siemreap","Sigmar One","Signika","Signika Negative","Simonetta","Sintony","Sirin Stencil","Six Caps","Skranji","Slabo 13px","Slabo 27px","Slackey","Smokum","Smythe","Sniglet","Snippet","Snowburst One","Sofadi One","Sofia","Sonsie One","Sorts Mill Goudy","Source Code Pro","Source Sans Pro","Source Serif Pro","Special Elite","Spicy Rice","Spinnaker","Spirax","Squada One","Sree Krushnadevaraya","Stalemate","Stalinist One","Stardos Stencil","Stint Ultra Condensed","Stint Ultra Expanded","Stoke","Strait","Sue Ellen Francisco","Sumana","Sunshiney","Supermercado One","Sura","Suranna","Suravaram","Suwannaphum","Swanky and Moo Moo","Syncopate","Tangerine","Taprom","Tauri","Teko","Telex","Tenali Ramakrishna","Tenor Sans","Text Me One","The Girl Next Door","Tienne","Tillana","Timmana","Tinos","Titan One","Titillium Web","Trade Winds","Trocchi","Trochut","Trykker","Tulpen One","Ubuntu","Ubuntu Condensed","Ubuntu Mono","Ultra","Uncial Antiqua","Underdog","Unica One","UnifrakturCook","UnifrakturMaguntia","Unkempt","Unlock","Unna","VT323","Vampiro One","Varela","Varela Round","Vast Shadow","Vesper Libre","Vibur","Vidaloka","Viga","Voces","Volkhov","Vollkorn","Voltaire","Waiting for the Sunrise","Wallpoet","Walter Turncoat","Warnes","Wellfleet","Wendy One","Wire One","Work Sans","Yanone Kaffeesatz","Yantramanav","Yellowtail","Yeseva One","Yesteryear","Zeyada"]}).call(this)},617:function(t,n,i){var r=i(279);t.exports=function(t,n,i){var e=i&&i.debug||!1,o=i&&i.startIndex||0;e&&console.log("starting findTagByName with",n," and ",i);var s=r(t,"<".concat(n,"[ >]"),o);if(e&&console.log("start:",s),-1!==s){var a=t.slice(s+n.length),u=r(a,"[ /]"+n+">",0),c=-1===u;c&&(u=r(a,"[ /]>",0));var h=s+n.length+u+1+(c?0:n.length)+1;if(e&&console.log("end:",h),-1!==h){var f=t.slice(s,h);return{inner:c?null:f.slice(f.indexOf(">")+1,f.lastIndexOf("<")),outer:f,start:s,end:h}}}}},51:function(t,n,i){var r=i(617);t.exports=function(t,n,i){for(var e,o=[],s=i&&i.debug||!1,a=i&&i.startIndex||0;e=r(t,n,{debug:s,startIndex:a});)a=e.end,o.push(e);return s&&console.log("findTagsByName found",o.length,"tags"),o}},802:function(t){function n(t){return(n="function"==typeof Symbol&&"symbol"==typeof Symbol.iterator?function(t){return typeof t}:function(t){return t&&"function"==typeof Symbol&&t.constructor===Symbol&&t!==Symbol.prototype?"symbol":typeof t})(t)}t.exports=function(t,i,r){var e=r&&r.debug||!1;e&&console.log("getting "+i+" in "+t);var o="object"===n(t)?t.outer:t,s="".concat(i,'\\="([^"]*)"');e&&console.log("pattern:",s);var a=new RegExp(s).exec(o);if(e&&console.log("match:",a),a)return a[1]}},279:function(t){t.exports=function(t,n,i){var r=new RegExp(n).exec(t.slice(i));return r?i+r.index:-1}},518:function(t){"use strict";t.exports=function(t){t.prototype[Symbol.iterator]=regeneratorRuntime.mark((function t(){var n;return regeneratorRuntime.wrap((function(t){for(;;)switch(t.prev=t.next){case 0:n=this.head;case 1:if(!n){t.next=7;break}return t.next=4,n.value;case 4:n=n.next,t.next=1;break;case 7:case"end":return t.stop()}}),t,this)}))}},692:function(t,n,i){"use strict";function r(t){var n=this;if(n instanceof r||(n=new r),n.tail=null,n.head=null,n.length=0,t&&"function"==typeof t.forEach)t.forEach((function(t){n.push(t)}));else if(arguments.length>0)for(var i=0,e=arguments.length;i1)i=n;else{if(!this.head)throw new TypeError("Reduce of empty list with no initial value");r=this.head.next,i=this.head.value}for(var e=0;null!==r;e++)i=t(i,r.value,e),r=r.next;return i},r.prototype.reduceReverse=function(t,n){var i,r=this.tail;if(arguments.length>1)i=n;else{if(!this.tail)throw new TypeError("Reduce of empty list with no initial value");r=this.tail.prev,i=this.tail.value}for(var e=this.length-1;null!==r;e--)i=t(i,r.value,e),r=r.prev;return i},r.prototype.toArray=function(){for(var t=new Array(this.length),n=0,i=this.head;null!==i;n++)t[n]=i.value,i=i.next;return t},r.prototype.toArrayReverse=function(){for(var t=new Array(this.length),n=0,i=this.tail;null!==i;n++)t[n]=i.value,i=i.prev;return t},r.prototype.slice=function(t,n){(n=n||this.length)<0&&(n+=this.length),(t=t||0)<0&&(t+=this.length);var i=new r;if(nthis.length&&(n=this.length);for(var e=0,o=this.head;null!==o&&ethis.length&&(n=this.length);for(var e=this.length,o=this.tail;null!==o&&e>n;e--)o=o.prev;for(;null!==o&&e>t;e--,o=o.prev)i.push(o.value);return i},r.prototype.splice=function(t,n){t>this.length&&(t=this.length-1),t<0&&(t=this.length+t);for(var i=0,r=this.head;null!==r&&i>1)],n))<0?s=r+1:(a=r,u=!e);return u?s:~s}function p(t,n){return t>n?1:t=0}function m(t,n,i){var r=t.length;if(t[0]<=n)return 0;if(n<=t[r-1])return r-1;var e=void 0;if(i>0){for(e=1;e0?e-1:e:t[e-1]-n>>0,e=0;e0||i&&0===o)}))}function k(){return!0}function M(){return!1}function _(){}function O(t){var n,i,r,e=!1;return function(){var o=Array.prototype.slice.call(arguments);return e&&this===r&&x(o,i)||(e=!0,r=this,i=o,n=t.apply(this,arguments)),n}}function T(t){return function(){var n;try{n=t()}catch(t){return Promise.reject(t)}return n instanceof Promise?n:Promise.resolve(n)}()}var E="function"==typeof Object.assign?Object.assign:function(t,n){if(null==t)throw new TypeError("Cannot convert undefined or null to object");for(var i=Object(t),r=1,e=arguments.length;r0)},n.prototype.removeEventListener=function(t,n){var i=this.O&&this.O[t];if(i){var r=i.indexOf(n);-1!==r&&(this.S&&t in this.S?(i[r]=_,++this.S[t]):(i.splice(r,1),0===i.length&&delete this.O[t]))}},n}(v),N="change",z="error",F="clear",L="contextmenu",G="click",D="dblclick",U="dragenter",q="dragover",B="drop",W="keydown",V="keypress",X="load",H="resize",J="touchmove",K="wheel";function Y(t,n,i,r,e){if(r&&r!==t&&(i=i.bind(r)),e){var o=i;i=function(){t.removeEventListener(n,i),o.apply(this,arguments)}}var s={target:t,type:n,listener:i};return t.addEventListener(n,i),s}function Z(t,n,i,r){return Y(t,n,i,r,!0)}function $(t){t&&t.target&&(t.target.removeEventListener(t.type,t.listener),A(t))}var Q=function(){var t=function(n,i){return(t=Object.setPrototypeOf||{__proto__:[]}instanceof Array&&function(t,n){t.__proto__=n}||function(t,n){for(var i in n)Object.prototype.hasOwnProperty.call(n,i)&&(t[i]=n[i])})(n,i)};return function(n,i){if("function"!=typeof i&&null!==i)throw new TypeError("Class extends value "+String(i)+" is not a constructor or null");function r(){this.constructor=n}t(n,i),n.prototype=null===i?Object.create(i):(r.prototype=i.prototype,new r)}}(),tt=function(t){function n(){var n=t.call(this)||this;return n.on=n.onInternal,n.once=n.onceInternal,n.un=n.unInternal,n.T=0,n}return Q(n,t),n.prototype.changed=function(){++this.T,this.dispatchEvent(N)},n.prototype.getRevision=function(){return this.T},n.prototype.onInternal=function(t,n){if(Array.isArray(t)){for(var i=t.length,r=new Array(i),e=0;e0;)this.pop()},n.prototype.extend=function(t){for(var n=0,i=t.length;nt)throw new Error("Tile load sequence violation");this.state=t,this.changed()},n.prototype.load=function(){r()},n.prototype.getAlpha=function(t,n){if(!this.D)return 1;var i=this.U[t];if(i){if(-1===i)return 1}else i=n,this.U[t]=i;var r=n-i+1e3/60;return r>=this.D?1:mt(r/this.D)},n.prototype.inTransition=function(t){return!!this.D&&-1!==this.U[t]},n.prototype.endTransition=function(t){this.D&&(this.U[t]=-1)},n}(I),St=function(){var t=function(n,i){return(t=Object.setPrototypeOf||{__proto__:[]}instanceof Array&&function(t,n){t.__proto__=n}||function(t,n){for(var i in n)Object.prototype.hasOwnProperty.call(n,i)&&(t[i]=n[i])})(n,i)};return function(n,i){if("function"!=typeof i&&null!==i)throw new TypeError("Class extends value "+String(i)+" is not a constructor or null");function r(){this.constructor=n}t(n,i),n.prototype=null===i?Object.create(i):(r.prototype=i.prototype,new r)}}(),kt=function(t){function n(n){var i=this,r=lt;return(i=t.call(this,n.tileCoord,r,{transition:n.transition,interpolate:n.interpolate})||this).q=n.loader,i.B=null,i.W=null,i}return St(n,t),n.prototype.getData=function(){return this.B},n.prototype.getError=function(){return this.W},n.prototype.load=function(){this.state=vt,this.changed();var t=this;this.q().then((function(n){t.B=n,t.state=dt,t.changed()})).catch((function(n){t.W=n,t.state=pt,t.changed()}))},n}(jt);function Mt(t,n){if(!t)throw new c(n)}var _t=function(){var t=function(n,i){return(t=Object.setPrototypeOf||{__proto__:[]}instanceof Array&&function(t,n){t.__proto__=n}||function(t,n){for(var i in n)Object.prototype.hasOwnProperty.call(n,i)&&(t[i]=n[i])})(n,i)};return function(n,i){if("function"!=typeof i&&null!==i)throw new TypeError("Class extends value "+String(i)+" is not a constructor or null");function r(){this.constructor=n}t(n,i),n.prototype=null===i?Object.create(i):(r.prototype=i.prototype,new r)}}();function Ot(t){return"function"==typeof t?t:(Array.isArray(t)?n=t:(Mt("function"==typeof t.getZIndex,41),n=[t]),function(){return n});var n}var Tt=function(t){function n(n){var i=t.call(this)||this;if(i.on,i.once,i.un,i.V=void 0,i.H="geometry",i.K=null,i.tt=void 0,i.nt=null,i.addChangeListener(i.H,i.it),n)if("function"==typeof n.getSimplifiedGeometry){var r=n;i.setGeometry(r)}else{var e=n;i.setProperties(e)}return i}return _t(n,t),n.prototype.clone=function(){var t=new n(this.hasProperties()?this.getProperties():null);t.setGeometryName(this.getGeometryName());var i=this.getGeometry();i&&t.setGeometry(i.clone());var r=this.getStyle();return r&&t.setStyle(r),t},n.prototype.getGeometry=function(){return this.get(this.H)},n.prototype.getId=function(){return this.V},n.prototype.getGeometryName=function(){return this.H},n.prototype.getStyle=function(){return this.K},n.prototype.getStyleFunction=function(){return this.tt},n.prototype.rt=function(){this.changed()},n.prototype.it=function(){this.nt&&($(this.nt),this.nt=null);var t=this.getGeometry();t&&(this.nt=Y(t,N,this.rt,this)),this.changed()},n.prototype.setGeometry=function(t){this.set(this.H,t)},n.prototype.setStyle=function(t){this.K=t,this.tt=t?Ot(t):void 0,this.changed()},n.prototype.setId=function(t){this.V=t,this.changed()},n.prototype.setGeometryName=function(t){this.removeChangeListener(this.H,this.it),this.H=t,this.addChangeListener(this.H,this.it),this.it()},n}(ot),Et="XY",At="XYZ",Ct="XYM",Rt="XYZM",Pt={POINT:"Point",LINE_STRING:"LineString",LINEAR_RING:"LinearRing",POLYGON:"Polygon",MULTI_POINT:"MultiPoint",MULTI_LINE_STRING:"MultiLineString",MULTI_POLYGON:"MultiPolygon",GEOMETRY_COLLECTION:"GeometryCollection",CIRCLE:"Circle"},It={RADIANS:"radians",DEGREES:"degrees",FEET:"ft",METERS:"m",PIXELS:"pixels",TILE_PIXELS:"tile-pixels",USFEET:"us-ft"},Nt={9001:It.METERS,9002:It.FEET,9003:It.USFEET,9101:It.RADIANS,9102:It.DEGREES};function zt(t){return Nt[t]}var Ft={};Ft[It.RADIANS]=6370997/(2*Math.PI),Ft[It.DEGREES]=2*Math.PI*6370997/360,Ft[It.FEET]=.3048,Ft[It.METERS]=1,Ft[It.USFEET]=1200/3937;var Lt,Gt=It,Dt="undefined"!=typeof navigator&&void 0!==navigator.userAgent?navigator.userAgent.toLowerCase():"",Ut=-1!==Dt.indexOf("firefox"),qt=-1!==Dt.indexOf("safari")&&-1==Dt.indexOf("chrom"),Bt=-1!==Dt.indexOf("webkit")&&-1==Dt.indexOf("edge"),Wt=-1!==Dt.indexOf("macintosh"),Vt="undefined"!=typeof devicePixelRatio?devicePixelRatio:1,Xt="undefined"!=typeof WorkerGlobalScope&&"undefined"!=typeof OffscreenCanvas&&self instanceof WorkerGlobalScope,Ht="undefined"!=typeof Image&&Image.prototype.decode,Jt=function(){var t=!1;try{var n=Object.defineProperty({},"passive",{get:function(){t=!0}});window.addEventListener("_",null,n),window.removeEventListener("_",null,n)}catch(t){}return t}(),Kt=new Array(6);function Yt(){return[1,0,0,1,0,0]}function Zt(t){return Qt(t,1,0,0,1,0,0)}function $t(t,n){var i=t[0],r=t[1],e=t[2],o=t[3],s=t[4],a=t[5],u=n[0],c=n[1],h=n[2],f=n[3],l=n[4],v=n[5];return t[0]=i*u+e*c,t[1]=r*u+o*c,t[2]=i*h+e*f,t[3]=r*h+o*f,t[4]=i*l+e*v+s,t[5]=r*l+o*v+a,t}function Qt(t,n,i,r,e,o,s){return t[0]=n,t[1]=i,t[2]=r,t[3]=e,t[4]=o,t[5]=s,t}function tn(t,n){return t[0]=n[0],t[1]=n[1],t[2]=n[2],t[3]=n[3],t[4]=n[4],t[5]=n[5],t}function nn(t,n){var i=n[0],r=n[1];return n[0]=t[0]*i+t[2]*r+t[4],n[1]=t[1]*i+t[3]*r+t[5],n}function rn(t,n){var i=Math.cos(n),r=Math.sin(n);return $t(t,Qt(Kt,i,r,-r,i,0,0))}function en(t,n,i){return $t(t,Qt(Kt,n,0,0,i,0,0))}function on(t,n,i){return Qt(t,n,0,0,i,0,0)}function sn(t,n,i){return $t(t,Qt(Kt,1,0,0,1,n,i))}function an(t,n,i,r,e,o,s,a){var u=Math.sin(o),c=Math.cos(o);return t[0]=r*c,t[1]=e*u,t[2]=-r*u,t[3]=e*c,t[4]=s*r*c-a*r*u+n,t[5]=s*e*u+a*e*c+i,t}function un(t,n){var i=cn(n);Mt(0!==i,32);var r=n[0],e=n[1],o=n[2],s=n[3],a=n[4],u=n[5];return t[0]=s/i,t[1]=-e/i,t[2]=-o/i,t[3]=r/i,t[4]=(o*u-s*a)/i,t[5]=-(r*u-e*a)/i,t}function cn(t){return t[0]*t[3]-t[1]*t[2]}function hn(t){var n="matrix("+t.join(", ")+")";if(Xt)return n;var i=Lt||(Lt=document.createElement("div"));return i.style.transform=n,i.style.transform}var fn="bottom-left",ln="bottom-right",vn="top-left",dn="top-right",pn=0,yn=1,mn=2,wn=4,bn=8,gn=16;function xn(t){for(var n=En(),i=0,r=t.length;ie&&(u|=wn),ao&&(u|=mn),u===pn&&(u=yn),u}function En(){return[1/0,1/0,-1/0,-1/0]}function An(t,n,i,r,e){return e?(e[0]=t,e[1]=n,e[2]=i,e[3]=r,e):[t,n,i,r]}function Cn(t){return An(1/0,1/0,-1/0,-1/0,t)}function Rn(t,n){var i=t[0],r=t[1];return An(i,r,i,r,n)}function Pn(t,n,i,r,e){return Gn(Cn(e),t,n,i,r)}function In(t,n){return t[0]==n[0]&&t[2]==n[2]&&t[1]==n[1]&&t[3]==n[3]}function Nn(t,n,i){return Math.abs(t[0]-n[0])t[2]&&(t[2]=n[2]),n[1]t[3]&&(t[3]=n[3]),t}function Fn(t,n){n[0]t[2]&&(t[2]=n[0]),n[1]t[3]&&(t[3]=n[1])}function Ln(t,n){for(var i=0,r=n.length;in[0]?r[0]=t[0]:r[0]=n[0],t[1]>n[1]?r[1]=t[1]:r[1]=n[1],t[2]=n[0]&&t[1]<=n[3]&&t[3]>=n[1]}function ni(t){return t[2]=s&&p<=u),r||!(o&wn)||e&wn||(r=(y=v-(l-u)*d)>=a&&y<=c),r||!(o&bn)||e&bn||(r=(p=l-(v-a)/d)>=s&&p<=u),r||!(o&gn)||e&gn||(r=(y=v-(l-s)*d)>=a&&y<=c)}return r}function oi(t,n,i,r){var e=[];if(r>1)for(var o=t[2]-t[0],s=t[3]-t[1],a=0;a=i[2])){var e=Qn(i),o=Math.floor((r[0]-i[0])/e)*e;t[0]-=o,t[2]-=o}return t}var ai=function(){function t(t){this.et=t.code,this.ot=t.units,this.st=void 0!==t.extent?t.extent:null,this.ut=void 0!==t.worldExtent?t.worldExtent:null,this.ct=void 0!==t.axisOrientation?t.axisOrientation:"enu",this.ht=void 0!==t.global&&t.global,this.ft=!(!this.ht||!this.st),this.lt=t.getPointResolution,this.vt=null,this.dt=t.metersPerUnit}return t.prototype.canWrapX=function(){return this.ft},t.prototype.getCode=function(){return this.et},t.prototype.getExtent=function(){return this.st},t.prototype.getUnits=function(){return this.ot},t.prototype.getMetersPerUnit=function(){return this.dt||Ft[this.ot]},t.prototype.getWorldExtent=function(){return this.ut},t.prototype.getAxisOrientation=function(){return this.ct},t.prototype.isGlobal=function(){return this.ht},t.prototype.setGlobal=function(t){this.ht=t,this.ft=!(!t||!this.st)},t.prototype.getDefaultTileGrid=function(){return this.vt},t.prototype.setDefaultTileGrid=function(t){this.vt=t},t.prototype.setExtent=function(t){this.st=t,this.ft=!(!this.ht||!t)},t.prototype.setWorldExtent=function(t){this.ut=t},t.prototype.setGetPointResolution=function(t){this.lt=t},t.prototype.getPointResolutionFunc=function(){return this.lt},t}();function ui(t,n,i){return Math.min(Math.max(t,n),i)}var ci="cosh"in Math?Math.cosh:function(t){var n=Math.exp(t);return(n+1/n)/2},hi="log2"in Math?Math.log2:function(t){return Math.log(t)*Math.LOG2E};function fi(t,n,i,r,e,o){var s=e-i,a=o-r;if(0!==s||0!==a){var u=((t-i)*s+(n-r)*a)/(s*s+a*a);u>1?(i=e,r=o):u>0&&(i+=s*u,r+=a*u)}return li(t,n,i,r)}function li(t,n,i,r){var e=i-t,o=r-n;return e*e+o*o}function vi(t){for(var n=t.length,i=0;ie&&(e=s,r=o)}if(0===e)return null;var a=t[r];t[r]=t[i],t[i]=a;for(var u=i+1;u=0;l--){f[l]=t[l][n]/t[l][l];for(var v=l-1;v>=0;v--)t[v][n]-=t[v][l]*f[l]}return f}function di(t){return 180*t/Math.PI}function pi(t){return t*Math.PI/180}function yi(t,n){var i=t%n;return i*n<0?i+n:i}function mi(t,n,i){return t+i*(n-t)}function wi(t,n){var i=Math.pow(10,n);return Math.round(t*i)/i}function bi(t,n){return Math.round(wi(t,n))}function gi(t,n){return Math.floor(wi(t,n))}function xi(t,n){return Math.ceil(wi(t,n))}var ji=function(){var t=function(n,i){return(t=Object.setPrototypeOf||{__proto__:[]}instanceof Array&&function(t,n){t.__proto__=n}||function(t,n){for(var i in n)Object.prototype.hasOwnProperty.call(n,i)&&(t[i]=n[i])})(n,i)};return function(n,i){if("function"!=typeof i&&null!==i)throw new TypeError("Class extends value "+String(i)+" is not a constructor or null");function r(){this.constructor=n}t(n,i),n.prototype=null===i?Object.create(i):(r.prototype=i.prototype,new r)}}(),Si=6378137,ki=Math.PI*Si,Mi=[-ki,-ki,ki,ki],_i=[-180,-85,180,85],Oi=Si*Math.log(Math.tan(Math.PI/2)),Ti=function(t){function n(n){return t.call(this,{code:n,units:Gt.METERS,extent:Mi,global:!0,worldExtent:_i,getPointResolution:function(t,n){return t/ci(n[1]/Si)}})||this}return ji(n,t),n}(ai),Ei=[new Ti("EPSG:3857"),new Ti("EPSG:102100"),new Ti("EPSG:102113"),new Ti("EPSG:900913"),new Ti("http://www.opengis.net/def/crs/EPSG/0/3857"),new Ti("http://www.opengis.net/gml/srs/epsg.xml#3857")];function Ai(t,n,i){var r=t.length,e=i>1?i:2,o=n;void 0===o&&(o=e>2?t.slice():new Array(r));for(var s=0;sOi?a=Oi:a<-Oi&&(a=-Oi),o[s+1]=a}return o}function Ci(t,n,i){var r=t.length,e=i>1?i:2,o=n;void 0===o&&(o=e>2?t.slice():new Array(r));for(var s=0;sn?r:new Array(1+n-e).join("0")+r}function Hi(t,n){for(var i=(""+t).split("."),r=(""+n).split("."),e=0;es)return 1;if(s>o)return-1}return 0}function Ji(t,n){return t[0]+=+n[0],t[1]+=+n[1],t}function Ki(t,n){var i=n.getRadius(),r=n.getCenter(),e=r[0],o=r[1],s=t[0]-e,a=t[1]-o;0===s&&0===a&&(s=1);var u=Math.sqrt(s*s+a*a);return[e+i*s/u,o+i*a/u]}function Yi(t,n){var i,r,e=t[0],o=t[1],s=n[0],a=n[1],u=s[0],c=s[1],h=a[0],f=a[1],l=h-u,v=f-c,d=0===l&&0===v?0:(l*(e-u)+v*(o-c))/(l*l+v*v||0);return d<=0?(i=u,r=c):d>=1?(i=h,r=f):(i=u+d*l,r=c+d*v),[i,r]}function Zi(t,n,i){var r=yi(n+180,360)-180,e=Math.abs(3600*r),o=i||0,s=Math.pow(10,o),a=Math.floor(e/3600),u=Math.floor((e-3600*a)/60),c=e-3600*a-60*u;return(c=Math.ceil(c*s)/s)>=60&&(c=0,u+=1),u>=60&&(u=0,a+=1),a+"° "+Xi(u,2)+"′ "+Xi(c,2,o)+"″"+(0==r?"":" "+t.charAt(r<0?1:0))}function $i(t,n,i){return t?n.replace("{x}",t[0].toFixed(i)).replace("{y}",t[1].toFixed(i)):""}function Qi(t,n){for(var i=!0,r=t.length-1;r>=0;--r)if(t[r]!=n[r]){i=!1;break}return i}function tr(t,n){var i=Math.cos(n),r=Math.sin(n),e=t[0]*i-t[1]*r,o=t[1]*i+t[0]*r;return t[0]=e,t[1]=o,t}function nr(t,n){return t[0]*=n,t[1]*=n,t}function ir(t,n){var i=t[0]-n[0],r=t[1]-n[1];return i*i+r*r}function rr(t,n){return Math.sqrt(ir(t,n))}function er(t,n){return ir(t,Yi(t,n))}function or(t,n){return $i(t,"{x}, {y}",n)}function sr(t,n){if(n.canWrapX()){var i=Qn(n.getExtent()),r=ar(t,n,i);r&&(t[0]-=r*i)}return t}function ar(t,n,i){var r=n.getExtent(),e=0;if(n.canWrapX()&&(t[0]r[2])){var o=i||Qn(r);e=Math.floor((t[0]-r[0])/o)}return e}var ur=6371008.8;function cr(t,n,i){var r=i||ur,e=pi(t[1]),o=pi(n[1]),s=(o-e)/2,a=pi(n[0]-t[0])/2,u=Math.sin(s)*Math.sin(s)+Math.sin(a)*Math.sin(a)*Math.cos(e)*Math.cos(o);return 2*r*Math.atan2(Math.sqrt(u),Math.sqrt(1-u))}function hr(t,n){for(var i=0,r=0,e=t.length;r=2;--c)s[a+c]=n[a+c]}return s}}function Mr(t,n,i,r){var e=br(t),o=br(n);Wi(e,o,kr(i)),Wi(o,e,kr(r))}function _r(t,n){return dr(),Ar(t,"EPSG:4326",void 0!==n?n:"EPSG:3857")}function Or(t,n){if(t===n)return!0;var i=t.getUnits()===n.getUnits();return(t.getCode()===n.getCode()||Tr(t,n)===pr)&&i}function Tr(t,n){var i=Vi(t.getCode(),n.getCode());return i||(i=yr),i}function Er(t,n){return Tr(br(t),br(n))}function Ar(t,n,i){return Er(n,i)(t,void 0,t.length)}function Cr(t,n,i,r){return oi(t,Er(n,i),void 0,r)}var Rr=null;function Pr(t){Rr=br(t)}function Ir(){return Rr}function Nr(t,n){return Rr?Ar(t,n,Rr):t}function zr(t,n){return Rr?Ar(t,Rr,n):(vr&&!Qi(t,[0,0])&&t[0]>=-180&&t[0]<=180&&t[1]>=-90&&t[1]<=90&&(vr=!1,console.warn("Call useGeographic() from ol/proj once to work with [longitude, latitude] coordinates.")),t)}function Fr(t,n){return Rr?Cr(t,n,Rr):t}function Lr(t,n){return Rr?Cr(t,Rr,n):t}function Gr(t,n){if(!Rr)return t;var i=br(n).getUnits(),r=Rr.getUnits();return i&&r?t*Ft[i]/Ft[r]:t}function Dr(t,n){if(!Rr)return t;var i=br(n).getUnits(),r=Rr.getUnits();return i&&r?t*Ft[r]/Ft[i]:t}function Ur(t,n,i){return function(r){var e,o,s=r[0],a=r[1];if(t.canWrapX()){var u=t.getExtent(),c=Qn(u);(o=ar(r,t,c))&&(s-=o*c),s=ui(s,u[0],u[2]),a=ui(a,u[1],u[3]),e=i([s,a])}else e=i(r);return o&&n.canWrapX()&&(e[0]+=o*Qn(n.getExtent())),e}}function qr(){xr(Ei),xr(Fi),jr(Fi,Ei,Ai,Ci)}function Br(t,n,i,r,e,o){for(var s=o||[],a=0,u=n;u1)a=i;else{if(l>0){for(var v=0;ve&&(e=c),o=a,s=u}return e}function ie(t,n,i,r,e){for(var o=0,s=i.length;o0;){for(var f=c.pop(),l=c.pop(),v=0,d=t[l],p=t[l+1],y=t[f],m=t[f+1],w=l+r;wv&&(h=w,v=b)}v>e&&(u[(h-n)/r]=1,l+re&&(o[s++]=c,o[s++]=h,a=c,u=h);return c==a&&h==u||(o[s++]=c,o[s++]=h),s}function de(t,n){return n*Math.round(t/n)}function pe(t,n,i,r,e,o,s){if(n==i)return s;var a,u,c=de(t[n],e),h=de(t[n+1],e);n+=r,o[s++]=c,o[s++]=h;do{if(a=de(t[n],e),u=de(t[n+1],e),(n+=r)==i)return o[s++]=a,o[s++]=u,s}while(a==c&&u==h);for(;n0&&p>v)&&(d<0&&y0&&y>d)?(a=f,u=l):(o[s++]=a,o[s++]=u,c=a,h=u,a=f,u=l)}}return o[s++]=a,o[s++]=u,s}function ye(t,n,i,r,e,o,s,a){for(var u=0,c=i.length;uo&&(c-a)*(o-u)-(e-a)*(h-u)>0&&s++:h<=o&&(c-a)*(o-u)-(e-a)*(h-u)<0&&s--,a=c,u=h}return 0!==s}function Ae(t,n,i,r,e,o){if(0===i.length)return!1;if(!Ee(t,n,i[0],r,e,o))return!1;for(var s=1,a=i.length;sx&&Ae(t,n,i,r,c=(h+f)/2,d)&&(g=c,x=j),h=f}return isNaN(g)&&(g=e[o]),s?(s.push(g,d,x),s):[g,d,x]}function Pe(t,n,i,r,e){for(var o=[],s=0,a=i.length;s=e[0]&&o[2]<=e[2]||(o[1]>=e[1]&&o[3]<=e[3]||Ie(t,n,i,r,(function(t,n){return ei(e,t,n)})))))}function ze(t,n,i,r,e){for(var o=0,s=i.length;o0}function qe(t,n,i,r,e){for(var o=void 0!==e&&e,s=0,a=i.length;s0&&this.Jt[i+2]>t;)i-=3;var r=this.Jt[n+2]-this.Jt[i+2];if(r<1e3/60)return!1;var e=this.Jt[n]-this.Jt[i],o=this.Jt[n+1]-this.Jt[i+1];return this.Kt=Math.atan2(o,e),this.Yt=Math.sqrt(e*e+o*o)/r,this.Yt>this.Xt},t.prototype.getDistance=function(){return(this.Xt-this.Yt)/this.Vt},t.prototype.getAngle=function(){return this.Kt},t}(),zo=/^#([a-f0-9]{3}|[a-f0-9]{4}(?:[a-f0-9]{2}){0,2})$/i,Fo=/^([a-z]*)$|^hsla?\(.*\)$/i;function Lo(t){return"string"==typeof t?t:Bo(t)}function Go(t){var n=document.createElement("div");if(n.style.color=t,""!==n.style.color){document.body.appendChild(n);var i=getComputedStyle(n).color;return document.body.removeChild(n),i}return""}var Do=function(){var t={},n=0;return function(i){var r;if(t.hasOwnProperty(i))r=t[i];else{if(n>=1024){var e=0;for(var o in t)0==(3&e++)&&(delete t[o],--n)}r=function(t){var n,i,r,e,o;Fo.exec(t)&&(t=Go(t));if(zo.exec(t)){var s=t.length-1,a=void 0;a=s<=4?1:2;var u=4===s||8===s;n=parseInt(t.substr(1+0*a,a),16),i=parseInt(t.substr(1+1*a,a),16),r=parseInt(t.substr(1+2*a,a),16),e=u?parseInt(t.substr(1+3*a,a),16):255,1==a&&(n=(n<<4)+n,i=(i<<4)+i,r=(r<<4)+r,u&&(e=(e<<4)+e)),o=[n,i,r,e/255]}else 0==t.indexOf("rgba(")?qo(o=t.slice(5,-1).split(",").map(Number)):0==t.indexOf("rgb(")?((o=t.slice(4,-1).split(",").map(Number)).push(1),qo(o)):Mt(!1,14);return o}(i),t[i]=r,++n}return r}}();function Uo(t){return Array.isArray(t)?t:Do(t)}function qo(t){return t[0]=ui(t[0]+.5|0,0,255),t[1]=ui(t[1]+.5|0,0,255),t[2]=ui(t[2]+.5|0,0,255),t[3]=ui(t[3],0,1),t}function Bo(t){var n=t[0];n!=(0|n)&&(n=n+.5|0);var i=t[1];i!=(0|i)&&(i=i+.5|0);var r=t[2];return r!=(0|r)&&(r=r+.5|0),"rgba("+n+","+i+","+r+","+(void 0===t[3]?1:Math.round(100*t[3])/100)+")"}function Wo(t){return Fo.test(t)&&(t=Go(t)),zo.test(t)||0===t.indexOf("rgba(")||0===t.indexOf("rgb(")}var Vo=function(){function t(){this.Zt={},this.$t=0,this.Qt=32}return t.prototype.clear=function(){this.Zt={},this.$t=0},t.prototype.canExpireCache=function(){return this.$t>this.Qt},t.prototype.expire=function(){if(this.canExpireCache()){var t=0;for(var n in this.Zt){var i=this.Zt[n];0!=(3&t++)||i.hasListener()||(delete this.Zt[n],--this.$t)}}},t.prototype.get=function(t,n,i){var r=Xo(t,n,i);return r in this.Zt?this.Zt[r]:null},t.prototype.set=function(t,n,i,r){var e=Xo(t,n,i);this.Zt[e]=r,++this.$t},t.prototype.setSize=function(t){this.Qt=t,this.expire()},t}();function Xo(t,n,i){return n+":"+t+":"+(i?Lo(i):"null")}var Ho=Vo,Jo=new Vo,Ko="opacity",Yo="visible",Zo="extent",$o="zIndex",Qo="maxResolution",ts="minResolution",ns="maxZoom",is="minZoom",rs="source",es="map";function os(t){return(os="function"==typeof Symbol&&"symbol"==typeof Symbol.iterator?function(t){return typeof t}:function(t){return t&&"function"==typeof Symbol&&t.constructor===Symbol&&t!==Symbol.prototype?"symbol":typeof t})(t)}var ss=function(){var t=function(n,i){return(t=Object.setPrototypeOf||{__proto__:[]}instanceof Array&&function(t,n){t.__proto__=n}||function(t,n){for(var i in n)Object.prototype.hasOwnProperty.call(n,i)&&(t[i]=n[i])})(n,i)};return function(n,i){if("function"!=typeof i&&null!==i)throw new TypeError("Class extends value "+String(i)+" is not a constructor or null");function r(){this.constructor=n}t(n,i),n.prototype=null===i?Object.create(i):(r.prototype=i.prototype,new r)}}(),as=function(t){function n(n){var i=t.call(this)||this;i.on,i.once,i.un,i.tn=n.background;var r=E({},n);return"object"===os(n.properties)&&(delete r.properties,E(r,n.properties)),r[Ko]=void 0!==n.opacity?n.opacity:1,Mt("number"==typeof r[Ko],64),r[Yo]=void 0===n.visible||n.visible,r[$o]=n.zIndex,r[Qo]=void 0!==n.maxResolution?n.maxResolution:1/0,r[ts]=void 0!==n.minResolution?n.minResolution:0,r[is]=void 0!==n.minZoom?n.minZoom:-1/0,r[ns]=void 0!==n.maxZoom?n.maxZoom:1/0,i.nn=void 0!==r.className?r.className:"ol-layer",delete r.className,i.setProperties(r),i.rn=null,i}return ss(n,t),n.prototype.getBackground=function(){return this.tn},n.prototype.getClassName=function(){return this.nn},n.prototype.getLayerState=function(t){var n=this.rn||{layer:this,managed:void 0===t||t},i=this.getZIndex();return n.opacity=ui(Math.round(100*this.getOpacity())/100,0,1),n.visible=this.getVisible(),n.extent=this.getExtent(),n.zIndex=void 0!==i||n.managed?i:1/0,n.maxResolution=this.getMaxResolution(),n.minResolution=Math.max(this.getMinResolution(),0),n.minZoom=this.getMinZoom(),n.maxZoom=this.getMaxZoom(),this.rn=n,n},n.prototype.getLayersArray=function(t){return r()},n.prototype.getLayerStatesArray=function(t){return r()},n.prototype.getExtent=function(){return this.get(Zo)},n.prototype.getMaxResolution=function(){return this.get(Qo)},n.prototype.getMinResolution=function(){return this.get(ts)},n.prototype.getMinZoom=function(){return this.get(is)},n.prototype.getMaxZoom=function(){return this.get(ns)},n.prototype.getOpacity=function(){return this.get(Ko)},n.prototype.getSourceState=function(){return r()},n.prototype.getVisible=function(){return this.get(Yo)},n.prototype.getZIndex=function(){return this.get($o)},n.prototype.setBackground=function(t){this.tn=t,this.changed()},n.prototype.setExtent=function(t){this.set(Zo,t)},n.prototype.setMaxResolution=function(t){this.set(Qo,t)},n.prototype.setMinResolution=function(t){this.set(ts,t)},n.prototype.setMaxZoom=function(t){this.set(ns,t)},n.prototype.setMinZoom=function(t){this.set(is,t)},n.prototype.setOpacity=function(t){Mt("number"==typeof t,64),this.set(Ko,t)},n.prototype.setVisible=function(t){this.set(Yo,t)},n.prototype.setZIndex=function(t){this.set($o,t)},n.prototype.disposeInternal=function(){this.rn&&(this.rn.layer=null,this.rn=null),t.prototype.disposeInternal.call(this)},n}(ot),us="prerender",cs="postrender",hs="precompose",fs="postcompose",ls="rendercomplete",vs="undefined",ds="loading",ps="ready",ys="error",ms=function(){var t=function(n,i){return(t=Object.setPrototypeOf||{__proto__:[]}instanceof Array&&function(t,n){t.__proto__=n}||function(t,n){for(var i in n)Object.prototype.hasOwnProperty.call(n,i)&&(t[i]=n[i])})(n,i)};return function(n,i){if("function"!=typeof i&&null!==i)throw new TypeError("Class extends value "+String(i)+" is not a constructor or null");function r(){this.constructor=n}t(n,i),n.prototype=null===i?Object.create(i):(r.prototype=i.prototype,new r)}}();function ws(t,n){if(!t.visible)return!1;var i=n.resolution;if(i=t.maxResolution)return!1;var r=n.zoom;return r>t.minZoom&&r<=t.maxZoom}var bs=function(t){function n(n){var i=this,r=E({},n);delete r.source,(i=t.call(this,r)||this).on,i.once,i.un,i.en=null,i.sn=null,i.an=null,i.cn=null,i.rendered=!1,n.render&&(i.render=n.render),n.map&&i.setMap(n.map),i.addChangeListener(rs,i.hn);var e=n.source?n.source:null;return i.setSource(e),i}return ms(n,t),n.prototype.getLayersArray=function(t){var n=t||[];return n.push(this),n},n.prototype.getLayerStatesArray=function(t){var n=t||[];return n.push(this.getLayerState()),n},n.prototype.getSource=function(){return this.get(rs)||null},n.prototype.getRenderSource=function(){return this.getSource()},n.prototype.getSourceState=function(){var t=this.getSource();return t?t.getState():vs},n.prototype.fn=function(){this.changed()},n.prototype.hn=function(){this.an&&($(this.an),this.an=null);var t=this.getSource();t&&(this.an=Y(t,N,this.fn,this)),this.changed()},n.prototype.getFeatures=function(t){return this.cn?this.cn.getFeatures(t):new Promise((function(t){return t([])}))},n.prototype.getData=function(t){return this.cn&&this.rendered?this.cn.getData(t):null},n.prototype.render=function(t,n){var i=this.getRenderer();if(i.prepareFrame(t))return this.rendered=!0,i.renderFrame(t,n)},n.prototype.unrender=function(){this.rendered=!1},n.prototype.setMapInternal=function(t){t||this.unrender(),this.set(es,t)},n.prototype.getMapInternal=function(){return this.get(es)},n.prototype.setMap=function(t){this.en&&($(this.en),this.en=null),t||this.changed(),this.sn&&($(this.sn),this.sn=null),t&&(this.en=Y(t,hs,(function(t){var n=t.frameState.layerStatesArray,i=this.getLayerState(!1);Mt(!n.some((function(t){return t.layer===i.layer})),67),n.push(i)}),this),this.sn=Y(this,N,t.render,t),this.changed())},n.prototype.setSource=function(t){this.set(rs,t)},n.prototype.getRenderer=function(){return this.cn||(this.cn=this.createRenderer()),this.cn},n.prototype.hasRenderer=function(){return!!this.cn},n.prototype.createRenderer=function(){return null},n.prototype.disposeInternal=function(){this.cn&&(this.cn.dispose(),delete this.cn),this.setSource(null),t.prototype.disposeInternal.call(this)},n}(as),gs=function(){var t=function(n,i){return(t=Object.setPrototypeOf||{__proto__:[]}instanceof Array&&function(t,n){t.__proto__=n}||function(t,n){for(var i in n)Object.prototype.hasOwnProperty.call(n,i)&&(t[i]=n[i])})(n,i)};return function(n,i){if("function"!=typeof i&&null!==i)throw new TypeError("Class extends value "+String(i)+" is not a constructor or null");function r(){this.constructor=n}t(n,i),n.prototype=null===i?Object.create(i):(r.prototype=i.prototype,new r)}}();function xs(t,n){Jo.expire()}var js=function(t){function n(n){var i=t.call(this)||this;return i.vn=n,i}return gs(n,t),n.prototype.dispatchRenderEvent=function(t,n){r()},n.prototype.calculateMatrices2D=function(t){var n=t.viewState,i=t.coordinateToPixelTransform,r=t.pixelToCoordinateTransform;an(i,t.size[0]/2,t.size[1]/2,1/n.resolution,-1/n.resolution,-n.rotation,-n.center[0],-n.center[1]),un(r,i)},n.prototype.forEachFeatureAtCoordinate=function(t,n,i,r,e,o,s,a){var u,c=n.viewState;function h(t,n,i,r){return e.call(o,n,t?i:null,r)}var f=c.projection,l=sr(t.slice(),f),v=[[0,0]];if(f.canWrapX()&&r){var d=Qn(f.getExtent());v.push([-d,0],[d,0])}for(var p=n.layerStatesArray,y=p.length,m=[],w=[],b=0;b=0;--g){var x=p[g],j=x.layer;if(j.hasRenderer()&&ws(x,c)&&s.call(a,j)){var S=j.getRenderer(),k=j.getSource();if(S&&k){var M=k.getWrapX()?l:t,_=h.bind(null,x.managed);w[0]=M[0]+v[b][0],w[1]=M[1]+v[b][1],u=S.forEachFeatureAtCoordinate(w,n,i,_,m)}if(u)return u}}if(0!==m.length){var O=1/m.length;return m.forEach((function(t,n){return t.distanceSq+=n*O})),m.sort((function(t,n){return t.distanceSq-n.distanceSq})),m.some((function(t){return u=t.callback(t.feature,t.layer,t.geometry)})),u}},n.prototype.forEachLayerAtPixel=function(t,n,i,e,o){return r()},n.prototype.hasFeatureAtCoordinate=function(t,n,i,r,e,o){return void 0!==this.forEachFeatureAtCoordinate(t,n,i,r,k,this,e,o)},n.prototype.getMap=function(){return this.vn},n.prototype.renderFrame=function(t){r()},n.prototype.scheduleExpireIconCache=function(t){Jo.canExpireCache()&&t.postRenderFunctions.push(xs)},n}(v),Ss=function(){var t=function(n,i){return(t=Object.setPrototypeOf||{__proto__:[]}instanceof Array&&function(t,n){t.__proto__=n}||function(t,n){for(var i in n)Object.prototype.hasOwnProperty.call(n,i)&&(t[i]=n[i])})(n,i)};return function(n,i){if("function"!=typeof i&&null!==i)throw new TypeError("Class extends value "+String(i)+" is not a constructor or null");function r(){this.constructor=n}t(n,i),n.prototype=null===i?Object.create(i):(r.prototype=i.prototype,new r)}}(),ks=function(t){function n(n,i,r,e){var o=t.call(this,n)||this;return o.inversePixelTransform=i,o.frameState=r,o.context=e,o}return Ss(n,t),n}(f),Ms="ol-hidden",_s="ol-selectable",Os="ol-unselectable",Ts="ol-unsupported",Es="ol-control",As="ol-collapsed",Cs=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"),Rs=["style","variant","weight","size","lineHeight","family"],Ps=function(t){var n=t.match(Cs);if(!n)return null;for(var i={lineHeight:"normal",size:"1.2em",style:"normal",weight:"normal",variant:"normal"},r=0,e=Rs.length;r=0;--o)r[o].renderDeclutter(t);Ro(this.pn,this.yn),this.dispatchRenderEvent(fs,t),this.mn||(this.pn.style.display="",this.mn=!0),this.scheduleExpireIconCache(t)}else this.mn&&(this.pn.style.display="none",this.mn=!1)},n.prototype.forEachLayerAtPixel=function(t,n,i,r,e){for(var o=n.viewState,s=n.layerStatesArray,a=s.length-1;a>=0;--a){var u=s[a],c=u.layer;if(c.hasRenderer()&&ws(u,o)&&e(c)){var h=c.getRenderer().getDataAtPixel(t,n,i);if(h){var f=r(c,h);if(f)return f}}}},n}(js),sa=function(){var t=function(n,i){return(t=Object.setPrototypeOf||{__proto__:[]}instanceof Array&&function(t,n){t.__proto__=n}||function(t,n){for(var i in n)Object.prototype.hasOwnProperty.call(n,i)&&(t[i]=n[i])})(n,i)};return function(n,i){if("function"!=typeof i&&null!==i)throw new TypeError("Class extends value "+String(i)+" is not a constructor or null");function r(){this.constructor=n}t(n,i),n.prototype=null===i?Object.create(i):(r.prototype=i.prototype,new r)}}(),aa=function(t){function n(n,i){var r=t.call(this,n)||this;return r.layer=i,r}return sa(n,t),n}(f),ua="layers",ca=function(t){function n(n){var i=this,r=n||{},e=E({},r);delete e.layers;var o=r.layers;return(i=t.call(this,e)||this).on,i.once,i.un,i.wn=[],i.bn={},i.addChangeListener(ua,i.gn),o?Array.isArray(o)?o=new ft(o.slice(),{unique:!0}):Mt("function"==typeof o.getArray,43):o=new ft(void 0,{unique:!0}),i.setLayers(o),i}return sa(n,t),n.prototype.xn=function(){this.changed()},n.prototype.gn=function(){this.wn.forEach($),this.wn.length=0;var t=this.getLayers();for(var n in this.wn.push(Y(t,st,this.jn,this),Y(t,at,this.Sn,this)),this.bn)this.bn[n].forEach($);A(this.bn);for(var i=t.getArray(),r=0,e=i.length;rthis.Pn||Math.abs(t.clientY-this.In.clientY)>this.Pn},n.prototype.disposeInternal=function(){this.Dn&&($(this.Dn),this.Dn=null),this.pn.removeEventListener(J,this.qn),this.Fn&&($(this.Fn),this.Fn=null),this.Rn.forEach($),this.Rn.length=0,this.pn=null,t.prototype.disposeInternal.call(this)},n}(I),xa="postrender",ja="movestart",Sa="moveend",ka="layergroup",Ma="size",_a="target",Oa="view",Ta=1/0,Ea=function(){function t(t,n){this.Yn=t,this.Zn=n,this.$n=[],this.Qn=[],this.ti={}}return t.prototype.clear=function(){this.$n.length=0,this.Qn.length=0,A(this.ti)},t.prototype.dequeue=function(){var t=this.$n,n=this.Qn,i=t[0];1==t.length?(t.length=0,n.length=0):(t[0]=t.pop(),n[0]=n.pop(),this.ni(0));var r=this.Zn(i);return delete this.ti[r],i},t.prototype.enqueue=function(t){Mt(!(this.Zn(t)in this.ti),31);var n=this.Yn(t);return n!=Ta&&(this.$n.push(t),this.Qn.push(n),this.ti[this.Zn(t)]=!0,this.ii(0,this.$n.length-1),!0)},t.prototype.getCount=function(){return this.$n.length},t.prototype.ri=function(t){return 2*t+1},t.prototype.ei=function(t){return 2*t+2},t.prototype.oi=function(t){return t-1>>1},t.prototype.si=function(){var t;for(t=(this.$n.length>>1)-1;t>=0;t--)this.ni(t)},t.prototype.isEmpty=function(){return 0===this.$n.length},t.prototype.isKeyQueued=function(t){return t in this.ti},t.prototype.isQueued=function(t){return this.isKeyQueued(this.Zn(t))},t.prototype.ni=function(t){for(var n=this.$n,i=this.Qn,r=n.length,e=n[t],o=i[t],s=t;t>1;){var a=this.ri(t),u=this.ei(t),c=ut;){var s=this.oi(n);if(!(r[s]>o))break;i[n]=i[s],r[n]=r[s],n=s}i[n]=e,r[n]=o},t.prototype.reprioritize=function(){var t,n,i,r=this.Yn,e=this.$n,o=this.Qn,s=0,a=e.length;for(n=0;n0;)r=(i=this.dequeue()[0]).getKey(),i.getState()!==lt||r in this.hi||(this.hi[r]=!0,++this.ci,++e,i.load())},n}(Ea);function Ra(t,n,i,r,e){if(!t||!(i in t.wantedTiles))return Ta;if(!t.wantedTiles[i][n.getKey()])return Ta;var o=t.viewState.center,s=r[0]-o[0],a=r[1]-o[1];return 65536*Math.log(e)+Math.sqrt(s*s+a*a)/e}var Pa=0,Ia=1,Na={CENTER:"center",RESOLUTION:"resolution",ROTATION:"rotation"},za=256;function Fa(t,n,i){return function(r,e,o,s,a){if(r){if(!e&&!n)return r;var u=n?0:o[0]*e,c=n?0:o[1]*e,h=a?a[0]:0,f=a?a[1]:0,l=t[0]+u/2+h,v=t[2]-u/2+h,d=t[1]+c/2+f,p=t[3]-c/2+f;l>v&&(v=l=(v+l)/2),d>p&&(p=d=(p+d)/2);var y=ui(r[0],l,v),m=ui(r[1],d,p);if(s&&i&&e){var w=30*e;y+=-w*Math.log(1+Math.max(0,l-r[0])/w)+w*Math.log(1+Math.max(0,r[0]-v)/w),m+=-w*Math.log(1+Math.max(0,d-r[1])/w)+w*Math.log(1+Math.max(0,r[1]-p)/w)}return[y,m]}}}function La(t){return t}function Ga(t,n,i,r){var e=Qn(n)/i[0],o=Kn(n)/i[1];return r?Math.min(t,Math.max(e,o)):Math.min(t,Math.min(e,o))}function Da(t,n,i){var r=Math.min(t,n);return r*=Math.log(1+50*Math.max(0,t/n-1))/50+1,i&&(r=Math.max(r,i),r/=Math.log(1+50*Math.max(0,i/t-1))/50+1),ui(r,i/2,2*n)}function Ua(t,n,i,r){return function(e,o,s,a){if(void 0!==e){var u=t[0],c=t[t.length-1],h=i?Ga(u,i,s,r):u;if(a)return void 0===n||n?Da(e,h,c):ui(e,c,h);var f=Math.min(h,e),l=Math.floor(m(t,f,o));return t[l]>h&&l1&&"function"==typeof arguments[i-1]&&(n=arguments[i-1],--i);for(var r=0;r0},n.prototype.getInteracting=function(){return this.fi[Ia]>0},n.prototype.cancelAnimations=function(){var t;this.setHint(Pa,-this.fi[Pa]);for(var n=0,i=this.li.length;n=0;--i){for(var r=this.li[i],e=!0,o=0,s=r.length;o0?u/a.duration:1;c>=1?(a.complete=!0,c=1):e=!1;var h=a.easing(c);if(a.sourceCenter){var f=a.sourceCenter[0],l=a.sourceCenter[1],v=a.targetCenter[0],d=a.targetCenter[1];this.gi=a.targetCenter;var p=f+h*(v-f),y=l+h*(d-l);this.mi=[p,y]}if(a.sourceResolution&&a.targetResolution){var m=1===h?a.targetResolution:a.sourceResolution+h*(a.targetResolution-a.sourceResolution);if(a.anchor){var w=this.Ii(this.getRotation()),b=this.Ci.resolution(m,0,w,!0);this.mi=this.calculateCenterZoom(b,a.anchor)}this.xi=a.targetResolution,this.wi=m,this.Ni(!0)}if(void 0!==a.sourceRotation&&void 0!==a.targetRotation){var g=1===h?yi(a.targetRotation+Math.PI,2*Math.PI)-Math.PI:a.sourceRotation+h*(a.targetRotation-a.sourceRotation);if(a.anchor){var x=this.Ci.rotation(g,!0);this.mi=this.calculateCenterRotate(x,a.anchor)}this.ji=a.targetRotation,this.bi=g}if(this.Ni(!0),n=!0,!a.complete)break}}if(e){this.li[i]=null,this.setHint(Pa,-1),this.gi=null,this.xi=NaN,this.ji=NaN;var j=r[0].callback;j&&Ka(j,!0)}}this.li=this.li.filter(Boolean),n&&void 0===this.vi&&(this.vi=requestAnimationFrame(this.Pi.bind(this)))}},n.prototype.calculateCenterRotate=function(t,n){var i,r=this.getCenterInternal();return void 0!==r&&(tr(i=[r[0]-n[0],r[1]-n[1]],t-this.getRotation()),Ji(i,n)),i},n.prototype.calculateCenterZoom=function(t,n){var i,r=this.getCenterInternal(),e=this.getResolution();void 0!==r&&void 0!==e&&(i=[n[0]-t*(n[0]-r[0])/e,n[1]-t*(n[1]-r[1])/e]);return i},n.prototype.Ii=function(t){var n=this.yi;if(t){var i=n[0],r=n[1];return[Math.abs(i*Math.cos(t))+Math.abs(r*Math.sin(t)),Math.abs(i*Math.sin(t))+Math.abs(r*Math.cos(t))]}return n},n.prototype.setViewportSize=function(t){this.yi=Array.isArray(t)?t.slice():[100,100],this.getAnimating()||this.resolveConstraints(0)},n.prototype.getCenter=function(){var t=this.getCenterInternal();return t?Nr(t,this.getProjection()):t},n.prototype.getCenterInternal=function(){return this.get(Na.CENTER)},n.prototype.getConstraints=function(){return this.Ci},n.prototype.getConstrainResolution=function(){return this.get("constrainResolution")},n.prototype.getHints=function(t){return void 0!==t?(t[0]=this.fi[0],t[1]=this.fi[1],t):this.fi.slice()},n.prototype.calculateExtent=function(t){return Fr(this.calculateExtentInternal(t),this.getProjection())},n.prototype.calculateExtentInternal=function(t){var n=t||this.zi(),i=this.getCenterInternal();Mt(i,1);var r=this.getResolution();Mt(void 0!==r,2);var e=this.getRotation();return Mt(void 0!==e,3),Jn(i,r,e,n)},n.prototype.getMaxResolution=function(){return this.Mi},n.prototype.getMinResolution=function(){return this._i},n.prototype.getMaxZoom=function(){return this.getZoomForResolution(this._i)},n.prototype.setMaxZoom=function(t){this.ki(this.Ri({maxZoom:t}))},n.prototype.getMinZoom=function(){return this.getZoomForResolution(this.Mi)},n.prototype.setMinZoom=function(t){this.ki(this.Ri({minZoom:t}))},n.prototype.setConstrainResolution=function(t){this.ki(this.Ri({constrainResolution:t}))},n.prototype.getProjection=function(){return this.di},n.prototype.getResolution=function(){return this.get(Na.RESOLUTION)},n.prototype.getResolutions=function(){return this.Ti},n.prototype.getResolutionForExtent=function(t,n){return this.getResolutionForExtentInternal(Lr(t,this.getProjection()),n)},n.prototype.getResolutionForExtentInternal=function(t,n){var i=n||this.zi(),r=Qn(t)/i[0],e=Kn(t)/i[1];return Math.max(r,e)},n.prototype.getResolutionForValueFunction=function(t){var n=t||2,i=this.getConstrainedResolution(this.Mi),r=this._i,e=Math.log(i/r)/Math.log(n);return function(t){return i/Math.pow(n,t*e)}},n.prototype.getRotation=function(){return this.get(Na.ROTATION)},n.prototype.getValueForResolutionFunction=function(t){var n=Math.log(t||2),i=this.getConstrainedResolution(this.Mi),r=this._i,e=Math.log(i/r)/n;return function(t){return Math.log(i/t)/n/e}},n.prototype.zi=function(t){var n=this.Ii(t),i=this.Ei;return i&&(n=[n[0]-i[1]-i[3],n[1]-i[0]-i[2]]),n},n.prototype.getState=function(){var t=this.getProjection(),n=this.getResolution(),i=this.getRotation(),r=this.getCenterInternal(),e=this.Ei;if(e){var o=this.zi();r=tu(r,this.Ii(),[o[0]/2+e[3],o[1]/2+e[0]],n,i)}return{center:r.slice(0),projection:void 0!==t?t:null,resolution:n,nextCenter:this.gi,nextResolution:this.xi,nextRotation:this.ji,rotation:i,zoom:this.getZoom()}},n.prototype.getZoom=function(){var t,n=this.getResolution();return void 0!==n&&(t=this.getZoomForResolution(n)),t},n.prototype.getZoomForResolution=function(t){var n,i,r=this.Ai||0;if(this.Ti){var e=m(this.Ti,t,1);r=e,n=this.Ti[e],i=e==this.Ti.length-1?2:n/this.Ti[e+1]}else n=this.Mi,i=this.Oi;return r+Math.log(n/t)/Math.log(i)},n.prototype.getResolutionForZoom=function(t){if(this.Ti){if(this.Ti.length<=1)return 0;var n=ui(Math.floor(t),0,this.Ti.length-2),i=this.Ti[n]/this.Ti[n+1];return this.Ti[n]/Math.pow(i,ui(t-n,0,1))}return this.Mi/Math.pow(this.Oi,t-this.Ai)},n.prototype.fit=function(t,n){var i;if(Mt(Array.isArray(t)||"function"==typeof t.getSimplifiedGeometry,24),Array.isArray(t))Mt(!ni(t),25),i=Ze(r=Lr(t,this.getProjection()));else if(t.getType()===Pt.CIRCLE){var r;(i=Ze(r=Lr(t.getExtent(),this.getProjection()))).rotate(this.getRotation(),Xn(r))}else{var e=Ir();i=e?t.clone().transform(e,this.getProjection()):t}this.fitInternal(i,n)},n.prototype.rotatedExtentForGeometry=function(t){for(var n=this.getRotation(),i=Math.cos(n),r=Math.sin(-n),e=t.getFlatCoordinates(),o=t.getStride(),s=1/0,a=1/0,u=-1/0,c=-1/0,h=0,f=e.length;h0&&t[1]>0}function eu(t,n,i){return void 0===i&&(i=[0,0]),i[0]=t[0]*n+.5|0,i[1]=t[1]*n+.5|0,i}function ou(t,n){return Array.isArray(t)?t:(void 0===n?n=[t,t]:(n[0]=t,n[1]=t),n)}var su=function(){var t=function(n,i){return(t=Object.setPrototypeOf||{__proto__:[]}instanceof Array&&function(t,n){t.__proto__=n}||function(t,n){for(var i in n)Object.prototype.hasOwnProperty.call(n,i)&&(t[i]=n[i])})(n,i)};return function(n,i){if("function"!=typeof i&&null!==i)throw new TypeError("Class extends value "+String(i)+" is not a constructor or null");function r(){this.constructor=n}t(n,i),n.prototype=null===i?Object.create(i):(r.prototype=i.prototype,new r)}}();function au(t){t instanceof bs?t.setMapInternal(null):t instanceof ca&&t.getLayers().forEach(au)}function uu(t,n){if(t instanceof bs)t.setMapInternal(n);else if(t instanceof ca)for(var i=t.getLayers().getArray(),r=0,e=i.length;r=0;a--){var u=s[a];if(u.getMap()===this&&u.getActive()&&this.getTargetElement())if(!u.handleEvent(t)||t.propagationStopped)break}}},n.prototype.handlePostRender=function(){var t=this.Hi,n=this.ur;if(!n.isEmpty()){var i=this.Gi,r=i;if(t){var e=t.viewHints;if(e[Pa]||e[Ia]){var o=Date.now()-t.time>8;i=o?0:8,r=o?0:2}}n.getTilesLoading()0;if(this.mn!=i&&(this.element.style.display=i?"":"none",this.mn=i),!x(n,this.Rr)){Co(this.jr);for(var r=0,e=n.length;r0&&n%(2*Math.PI)!=0?t.animate({rotation:0,duration:this.Fr,easing:wt}):t.setRotation(0))}},n.prototype.render=function(t){var n=t.frameState;if(n){var i=n.viewState.rotation;if(i!=this.Gr){var r="rotate("+i+"rad)";if(this.Lr){var e=this.element.classList.contains(Ms);e||0!==i?e&&0!==i&&this.element.classList.remove(Ms):this.element.classList.add(Ms)}this.Er.style.transform=r}this.Gr=i}},n}(fu),yu=function(){var t=function(n,i){return(t=Object.setPrototypeOf||{__proto__:[]}instanceof Array&&function(t,n){t.__proto__=n}||function(t,n){for(var i in n)Object.prototype.hasOwnProperty.call(n,i)&&(t[i]=n[i])})(n,i)};return function(n,i){if("function"!=typeof i&&null!==i)throw new TypeError("Class extends value "+String(i)+" is not a constructor or null");function r(){this.constructor=n}t(n,i),n.prototype=null===i?Object.create(i):(r.prototype=i.prototype,new r)}}(),mu=function(t){function n(n){var i=this,r=n||{};i=t.call(this,{element:document.createElement("div"),target:r.target})||this;var e=void 0!==r.className?r.className:"ol-zoom",o=void 0!==r.delta?r.delta:1,s=void 0!==r.zoomInClassName?r.zoomInClassName:e+"-in",a=void 0!==r.zoomOutClassName?r.zoomOutClassName:e+"-out",u=void 0!==r.zoomInLabel?r.zoomInLabel:"+",c=void 0!==r.zoomOutLabel?r.zoomOutLabel:"–",h=void 0!==r.zoomInTipLabel?r.zoomInTipLabel:"Zoom in",f=void 0!==r.zoomOutTipLabel?r.zoomOutTipLabel:"Zoom out",l=document.createElement("button");l.className=s,l.setAttribute("type","button"),l.title=h,l.appendChild("string"==typeof u?document.createTextNode(u):u),l.addEventListener(G,i.Cr.bind(i,o),!1);var v=document.createElement("button");v.className=a,v.setAttribute("type","button"),v.title=f,v.appendChild("string"==typeof c?document.createTextNode(c):c),v.addEventListener(G,i.Cr.bind(i,-o),!1);var d=e+" "+"ol-unselectable "+Es,p=i.element;return p.className=d,p.appendChild(l),p.appendChild(v),i.Fr=void 0!==r.duration?r.duration:250,i}return yu(n,t),n.prototype.Cr=function(t,n){n.preventDefault(),this.Ur(t)},n.prototype.Ur=function(t){var n=this.getMap().getView();if(n){var i=n.getZoom();if(void 0!==i){var r=n.getConstrainedZoom(i+t);this.Fr>0?(n.getAnimating()&&n.cancelAnimations(),n.animate({zoom:r,duration:this.Fr,easing:wt})):n.setZoom(r)}}},n}(fu);function wu(t){var n=t||{},i=new ft;return(void 0===n.zoom||n.zoom)&&i.push(new mu(n.zoomOptions)),(void 0===n.rotate||n.rotate)&&i.push(new pu(n.rotateOptions)),(void 0===n.attribution||n.attribution)&&i.push(new vu(n.attributionOptions)),i}var bu="active",gu=function(){var t=function(n,i){return(t=Object.setPrototypeOf||{__proto__:[]}instanceof Array&&function(t,n){t.__proto__=n}||function(t,n){for(var i in n)Object.prototype.hasOwnProperty.call(n,i)&&(t[i]=n[i])})(n,i)};return function(n,i){if("function"!=typeof i&&null!==i)throw new TypeError("Class extends value "+String(i)+" is not a constructor or null");function r(){this.constructor=n}t(n,i),n.prototype=null===i?Object.create(i):(r.prototype=i.prototype,new r)}}();function xu(t,n,i){var r=t.getCenterInternal();if(r){var e=[r[0]+n[0],r[1]+n[1]];t.animateInternal({duration:void 0!==i?i:250,easing:gt,center:t.getConstrainedCenter(e)})}}function ju(t,n,i,r){var e=t.getZoom();if(void 0!==e){var o=t.getConstrainedZoom(e+n),s=t.getResolutionForZoom(o);t.getAnimating()&&t.cancelAnimations(),t.animate({resolution:s,anchor:i,duration:void 0!==r?r:250,easing:wt})}}var Su=function(t){function n(n){var i=t.call(this)||this;return i.on,i.once,i.un,n&&n.handleEvent&&(i.handleEvent=n.handleEvent),i.vn=null,i.setActive(!0),i}return gu(n,t),n.prototype.getActive=function(){return this.get(bu)},n.prototype.getMap=function(){return this.vn},n.prototype.handleEvent=function(t){return!0},n.prototype.setActive=function(t){this.set(bu,t)},n.prototype.setMap=function(t){this.vn=t},n}(ot),ku=function(){var t=function(n,i){return(t=Object.setPrototypeOf||{__proto__:[]}instanceof Array&&function(t,n){t.__proto__=n}||function(t,n){for(var i in n)Object.prototype.hasOwnProperty.call(n,i)&&(t[i]=n[i])})(n,i)};return function(n,i){if("function"!=typeof i&&null!==i)throw new TypeError("Class extends value "+String(i)+" is not a constructor or null");function r(){this.constructor=n}t(n,i),n.prototype=null===i?Object.create(i):(r.prototype=i.prototype,new r)}}(),Mu=function(t){function n(n){var i=t.call(this)||this,r=n||{};return i.qr=r.delta?r.delta:1,i.Fr=void 0!==r.duration?r.duration:250,i}return ku(n,t),n.prototype.handleEvent=function(t){var n=!1;if(t.type==da.DBLCLICK){var i=t.originalEvent,r=t.map,e=t.coordinate,o=i.shiftKey?-this.qr:this.qr;ju(r.getView(),o,e,this.Fr),i.preventDefault(),n=!0}return!n},n}(Su),_u=function(){var t=function(n,i){return(t=Object.setPrototypeOf||{__proto__:[]}instanceof Array&&function(t,n){t.__proto__=n}||function(t,n){for(var i in n)Object.prototype.hasOwnProperty.call(n,i)&&(t[i]=n[i])})(n,i)};return function(n,i){if("function"!=typeof i&&null!==i)throw new TypeError("Class extends value "+String(i)+" is not a constructor or null");function r(){this.constructor=n}t(n,i),n.prototype=null===i?Object.create(i):(r.prototype=i.prototype,new r)}}();function Ou(t){for(var n=t.length,i=0,r=0,e=0;e0}}else if(t.type==da.POINTERDOWN){var r=this.handleDownEvent(t);this.handlingDownUpSequence=r,n=this.stopDown(r)}else t.type==da.POINTERMOVE&&this.handleMoveEvent(t);return!n},n.prototype.handleMoveEvent=function(t){},n.prototype.handleUpEvent=function(t){return!1},n.prototype.stopDown=function(t){return t},n.prototype.Wr=function(t){if(function(t){var n=t.type;return n===da.POINTERDOWN||n===da.POINTERDRAG||n===da.POINTERUP}(t)){var n=t.originalEvent,i=n.pointerId.toString();t.type==da.POINTERUP?delete this.Br[i]:(t.type==da.POINTERDOWN||i in this.Br)&&(this.Br[i]=n),this.targetPointers=C(this.Br)}},n}(Su);function Eu(t){var n=arguments;return function(t){for(var i=!0,r=0,e=n.length;r0&&this.Jr(t)){var n=t.map.getView();return this.lastCentroid=null,n.getAnimating()&&n.cancelAnimations(),this.Vr&&this.Vr.begin(),this.Kr=this.targetPointers.length>1,!0}return!1},n}(Tu),Vu=function(){var t=function(n,i){return(t=Object.setPrototypeOf||{__proto__:[]}instanceof Array&&function(t,n){t.__proto__=n}||function(t,n){for(var i in n)Object.prototype.hasOwnProperty.call(n,i)&&(t[i]=n[i])})(n,i)};return function(n,i){if("function"!=typeof i&&null!==i)throw new TypeError("Class extends value "+String(i)+" is not a constructor or null");function r(){this.constructor=n}t(n,i),n.prototype=null===i?Object.create(i):(r.prototype=i.prototype,new r)}}(),Xu=function(t){function n(n){var i=this,r=n||{};return(i=t.call(this,{stopDown:M})||this).Jr=r.condition?r.condition:Cu,i.Yr=void 0,i.Fr=void 0!==r.duration?r.duration:250,i}return Vu(n,t),n.prototype.handleDragEvent=function(t){if(Uu(t)){var n=t.map,i=n.getView();if(i.getConstraints().rotation!==Wa){var r=n.getSize(),e=t.pixel,o=Math.atan2(r[1]/2-e[1],e[0]-r[0]/2);if(void 0!==this.Yr){var s=o-this.Yr;i.adjustRotationInternal(-s)}this.Yr=o}}},n.prototype.handleUpEvent=function(t){return!Uu(t)||(t.map.getView().endInteraction(this.Fr),!1)},n.prototype.handleDownEvent=function(t){return!!Uu(t)&&(!(!Nu(t)||!this.Jr(t))&&(t.map.getView().beginInteraction(),this.Yr=void 0,!0))},n}(Tu),Hu=function(){var t=function(n,i){return(t=Object.setPrototypeOf||{__proto__:[]}instanceof Array&&function(t,n){t.__proto__=n}||function(t,n){for(var i in n)Object.prototype.hasOwnProperty.call(n,i)&&(t[i]=n[i])})(n,i)};return function(n,i){if("function"!=typeof i&&null!==i)throw new TypeError("Class extends value "+String(i)+" is not a constructor or null");function r(){this.constructor=n}t(n,i),n.prototype=null===i?Object.create(i):(r.prototype=i.prototype,new r)}}(),Ju=function(t){function n(n){var i=t.call(this)||this;return i.Zr=null,i.pn=document.createElement("div"),i.pn.style.position="absolute",i.pn.style.pointerEvents="auto",i.pn.className="ol-box "+n,i.vn=null,i.$r=null,i.Qr=null,i}return Hu(n,t),n.prototype.disposeInternal=function(){this.setMap(null)},n.prototype.te=function(){var t=this.$r,n=this.Qr,i="px",r=this.pn.style;r.left=Math.min(t[0],n[0])+i,r.top=Math.min(t[1],n[1])+i,r.width=Math.abs(n[0]-t[0])+i,r.height=Math.abs(n[1]-t[1])+i},n.prototype.setMap=function(t){if(this.vn){this.vn.getOverlayContainer().removeChild(this.pn);var n=this.pn.style;n.left="inherit",n.top="inherit",n.width="inherit",n.height="inherit"}this.vn=t,this.vn&&this.vn.getOverlayContainer().appendChild(this.pn)},n.prototype.setPixels=function(t,n){this.$r=t,this.Qr=n,this.createOrUpdateGeometry(),this.te()},n.prototype.createOrUpdateGeometry=function(){var t=this.$r,n=this.Qr,i=[t,[t[0],n[1]],n,[n[0],t[1]]].map(this.vn.getCoordinateFromPixelInternal,this.vn);i[4]=i[0].slice(),this.Zr?this.Zr.setCoordinates([i]):this.Zr=new Ke([i])},n.prototype.getGeometry=function(){return this.Zr},n}(v),Ku=function(){var t=function(n,i){return(t=Object.setPrototypeOf||{__proto__:[]}instanceof Array&&function(t,n){t.__proto__=n}||function(t,n){for(var i in n)Object.prototype.hasOwnProperty.call(n,i)&&(t[i]=n[i])})(n,i)};return function(n,i){if("function"!=typeof i&&null!==i)throw new TypeError("Class extends value "+String(i)+" is not a constructor or null");function r(){this.constructor=n}t(n,i),n.prototype=null===i?Object.create(i):(r.prototype=i.prototype,new r)}}(),Yu="boxstart",Zu="boxdrag",$u="boxend",Qu="boxcancel",tc=function(t){function n(n,i,r){var e=t.call(this,n)||this;return e.coordinate=i,e.mapBrowserEvent=r,e}return Ku(n,t),n}(f),nc=function(t){function n(n){var i=t.call(this)||this;i.on,i.once,i.un;var r=n||{};return i.ne=new Ju(r.className||"ol-dragbox"),i.ie=void 0!==r.minArea?r.minArea:64,r.onBoxEnd&&(i.onBoxEnd=r.onBoxEnd),i.$r=null,i.Jr=r.condition?r.condition:Nu,i.re=r.boxEndCondition?r.boxEndCondition:i.defaultBoxEndCondition,i}return Ku(n,t),n.prototype.defaultBoxEndCondition=function(t,n,i){var r=i[0]-n[0],e=i[1]-n[1];return r*r+e*e>=this.ie},n.prototype.getGeometry=function(){return this.ne.getGeometry()},n.prototype.handleDragEvent=function(t){this.ne.setPixels(this.$r,t.pixel),this.dispatchEvent(new tc(Zu,t.coordinate,t))},n.prototype.handleUpEvent=function(t){this.ne.setMap(null);var n=this.re(t,this.$r,t.pixel);return n&&this.onBoxEnd(t),this.dispatchEvent(new tc(n?$u:Qu,t.coordinate,t)),!1},n.prototype.handleDownEvent=function(t){return!!this.Jr(t)&&(this.$r=t.pixel,this.ne.setMap(t.map),this.ne.setPixels(this.$r,this.$r),this.dispatchEvent(new tc(Yu,t.coordinate,t)),!0)},n.prototype.onBoxEnd=function(t){},n}(Tu),ic=function(){var t=function(n,i){return(t=Object.setPrototypeOf||{__proto__:[]}instanceof Array&&function(t,n){t.__proto__=n}||function(t,n){for(var i in n)Object.prototype.hasOwnProperty.call(n,i)&&(t[i]=n[i])})(n,i)};return function(n,i){if("function"!=typeof i&&null!==i)throw new TypeError("Class extends value "+String(i)+" is not a constructor or null");function r(){this.constructor=n}t(n,i),n.prototype=null===i?Object.create(i):(r.prototype=i.prototype,new r)}}(),rc=function(t){function n(n){var i=this,r=n||{},e=r.condition?r.condition:Gu;return(i=t.call(this,{condition:e,className:r.className||"ol-dragzoom",minArea:r.minArea})||this).Fr=void 0!==r.duration?r.duration:200,i.ee=void 0!==r.out&&r.out,i}return ic(n,t),n.prototype.onBoxEnd=function(t){var n=this.getMap().getView(),i=this.getGeometry();if(this.ee){var r=n.rotatedExtentForGeometry(i),e=n.getResolutionForExtentInternal(r),o=n.getResolution()/e;(i=i.clone()).scale(o*o)}n.fitInternal(i,{duration:this.Fr,easing:wt})},n}(nc),ec=37,oc=38,sc=39,ac=40,uc=function(){var t=function(n,i){return(t=Object.setPrototypeOf||{__proto__:[]}instanceof Array&&function(t,n){t.__proto__=n}||function(t,n){for(var i in n)Object.prototype.hasOwnProperty.call(n,i)&&(t[i]=n[i])})(n,i)};return function(n,i){if("function"!=typeof i&&null!==i)throw new TypeError("Class extends value "+String(i)+" is not a constructor or null");function r(){this.constructor=n}t(n,i),n.prototype=null===i?Object.create(i):(r.prototype=i.prototype,new r)}}(),cc=function(t){function n(n){var i=t.call(this)||this,r=n||{};return i.oe=function(t){return Lu(t)&&Du(t)},i.Jr=void 0!==r.condition?r.condition:i.oe,i.Fr=void 0!==r.duration?r.duration:100,i.se=void 0!==r.pixelDelta?r.pixelDelta:128,i}return uc(n,t),n.prototype.handleEvent=function(t){var n=!1;if(t.type==W){var i=t.originalEvent,r=i.keyCode;if(this.Jr(t)&&(r==ac||r==ec||r==sc||r==oc)){var e=t.map.getView(),o=e.getResolution()*this.se,s=0,a=0;r==ac?a=-o:r==ec?s=-o:r==sc?s=o:a=o;var u=[s,a];tr(u,e.getRotation()),xu(e,u,this.Fr),i.preventDefault(),n=!0}}return!n},n}(Su),hc=function(){var t=function(n,i){return(t=Object.setPrototypeOf||{__proto__:[]}instanceof Array&&function(t,n){t.__proto__=n}||function(t,n){for(var i in n)Object.prototype.hasOwnProperty.call(n,i)&&(t[i]=n[i])})(n,i)};return function(n,i){if("function"!=typeof i&&null!==i)throw new TypeError("Class extends value "+String(i)+" is not a constructor or null");function r(){this.constructor=n}t(n,i),n.prototype=null===i?Object.create(i):(r.prototype=i.prototype,new r)}}(),fc=function(t){function n(n){var i=t.call(this)||this,r=n||{};return i.Jr=r.condition?r.condition:Du,i.qr=r.delta?r.delta:1,i.Fr=void 0!==r.duration?r.duration:100,i}return hc(n,t),n.prototype.handleEvent=function(t){var n=!1;if(t.type==W||t.type==V){var i=t.originalEvent,r=i.charCode;if(this.Jr(t)&&(r=="+".charCodeAt(0)||r=="-".charCodeAt(0))){var e=t.map,o=r=="+".charCodeAt(0)?this.qr:-this.qr;ju(e.getView(),o,void 0,this.Fr),i.preventDefault(),n=!0}}return!n},n}(Su),lc=function(){var t=function(n,i){return(t=Object.setPrototypeOf||{__proto__:[]}instanceof Array&&function(t,n){t.__proto__=n}||function(t,n){for(var i in n)Object.prototype.hasOwnProperty.call(n,i)&&(t[i]=n[i])})(n,i)};return function(n,i){if("function"!=typeof i&&null!==i)throw new TypeError("Class extends value "+String(i)+" is not a constructor or null");function r(){this.constructor=n}t(n,i),n.prototype=null===i?Object.create(i):(r.prototype=i.prototype,new r)}}(),vc="trackpad",dc="wheel",pc=function(t){function n(n){var i=this,r=n||{};(i=t.call(this,r)||this).ae=0,i.ue=0,i.wt=void 0!==r.maxDelta?r.maxDelta:1,i.Fr=void 0!==r.duration?r.duration:250,i.ce=void 0!==r.timeout?r.timeout:80,i.he=void 0===r.useAnchor||r.useAnchor,i.fe=void 0!==r.constrainResolution&&r.constrainResolution;var e=r.condition?r.condition:Iu;return i.Jr=r.onFocusOnly?Eu(Pu,e):e,i.le=null,i.ve=void 0,i.de,i.pe=void 0,i.ye=400,i.me,i.we=300,i}return lc(n,t),n.prototype.be=function(){this.me=void 0,this.getMap().getView().endInteraction(void 0,this.ue?this.ue>0?1:-1:0,this.le)},n.prototype.handleEvent=function(t){if(!this.Jr(t))return!0;if(t.type!==K)return!0;var n,i=t.map,r=t.originalEvent;if(r.preventDefault(),this.he&&(this.le=t.coordinate),t.type==K&&(n=r.deltaY,Ut&&r.deltaMode===WheelEvent.DOM_DELTA_PIXEL&&(n/=Vt),r.deltaMode===WheelEvent.DOM_DELTA_LINE&&(n*=40)),0===n)return!1;this.ue=n;var e=Date.now();void 0===this.ve&&(this.ve=e),(!this.pe||e-this.ve>this.ye)&&(this.pe=Math.abs(n)<4?vc:dc);var o=i.getView();if(this.pe===vc&&!o.getConstrainResolution()&&!this.fe)return this.me?clearTimeout(this.me):(o.getAnimating()&&o.cancelAnimations(),o.beginInteraction()),this.me=setTimeout(this.be.bind(this),this.ce),o.adjustZoom(-n/this.we,this.le),this.ve=e,!1;this.ae+=n;var s=Math.max(this.ce-(e-this.ve),0);return clearTimeout(this.de),this.de=setTimeout(this.ge.bind(this,i),s),!1},n.prototype.ge=function(t){var n=t.getView();n.getAnimating()&&n.cancelAnimations();var i=-ui(this.ae,-this.wt*this.we,this.wt*this.we)/this.we;(n.getConstrainResolution()||this.fe)&&(i=i?i>0?1:-1:0),ju(n,i,this.le,this.Fr),this.pe=void 0,this.ae=0,this.le=null,this.ve=void 0,this.de=void 0},n.prototype.setMouseAnchor=function(t){this.he=t,t||(this.le=null)},n}(Su),yc=function(){var t=function(n,i){return(t=Object.setPrototypeOf||{__proto__:[]}instanceof Array&&function(t,n){t.__proto__=n}||function(t,n){for(var i in n)Object.prototype.hasOwnProperty.call(n,i)&&(t[i]=n[i])})(n,i)};return function(n,i){if("function"!=typeof i&&null!==i)throw new TypeError("Class extends value "+String(i)+" is not a constructor or null");function r(){this.constructor=n}t(n,i),n.prototype=null===i?Object.create(i):(r.prototype=i.prototype,new r)}}(),mc=function(t){function n(n){var i=this,r=n||{},e=r;return e.stopDown||(e.stopDown=M),(i=t.call(this,e)||this).xe=null,i.Yr=void 0,i.je=!1,i.Se=0,i.ke=void 0!==r.threshold?r.threshold:.3,i.Fr=void 0!==r.duration?r.duration:250,i}return yc(n,t),n.prototype.handleDragEvent=function(t){var n=0,i=this.targetPointers[0],r=this.targetPointers[1],e=Math.atan2(r.clientY-i.clientY,r.clientX-i.clientX);if(void 0!==this.Yr){var o=e-this.Yr;this.Se+=o,!this.je&&Math.abs(this.Se)>this.ke&&(this.je=!0),n=o}this.Yr=e;var s=t.map,a=s.getView();if(a.getConstraints().rotation!==Wa){var u=s.getViewport().getBoundingClientRect(),c=Ou(this.targetPointers);c[0]-=u.left,c[1]-=u.top,this.xe=s.getCoordinateFromPixelInternal(c),this.je&&(s.render(),a.adjustRotationInternal(n,this.xe))}},n.prototype.handleUpEvent=function(t){return!(this.targetPointers.length<2)||(t.map.getView().endInteraction(this.Fr),!1)},n.prototype.handleDownEvent=function(t){if(this.targetPointers.length>=2){var n=t.map;return this.xe=null,this.Yr=void 0,this.je=!1,this.Se=0,this.handlingDownUpSequence||n.getView().beginInteraction(),!0}return!1},n}(Tu),wc=function(){var t=function(n,i){return(t=Object.setPrototypeOf||{__proto__:[]}instanceof Array&&function(t,n){t.__proto__=n}||function(t,n){for(var i in n)Object.prototype.hasOwnProperty.call(n,i)&&(t[i]=n[i])})(n,i)};return function(n,i){if("function"!=typeof i&&null!==i)throw new TypeError("Class extends value "+String(i)+" is not a constructor or null");function r(){this.constructor=n}t(n,i),n.prototype=null===i?Object.create(i):(r.prototype=i.prototype,new r)}}(),bc=function(t){function n(n){var i=this,r=n||{},e=r;return e.stopDown||(e.stopDown=M),(i=t.call(this,e)||this).xe=null,i.Fr=void 0!==r.duration?r.duration:400,i.Me=void 0,i._e=1,i}return wc(n,t),n.prototype.handleDragEvent=function(t){var n=1,i=this.targetPointers[0],r=this.targetPointers[1],e=i.clientX-r.clientX,o=i.clientY-r.clientY,s=Math.sqrt(e*e+o*o);void 0!==this.Me&&(n=this.Me/s),this.Me=s;var a=t.map,u=a.getView();1!=n&&(this._e=n);var c=a.getViewport().getBoundingClientRect(),h=Ou(this.targetPointers);h[0]-=c.left,h[1]-=c.top,this.xe=a.getCoordinateFromPixelInternal(h),a.render(),u.adjustResolutionInternal(n,this.xe)},n.prototype.handleUpEvent=function(t){if(this.targetPointers.length<2){var n=t.map.getView(),i=this._e>1?1:-1;return n.endInteraction(this.Fr,i),!1}return!0},n.prototype.handleDownEvent=function(t){if(this.targetPointers.length>=2){var n=t.map;return this.xe=null,this.Me=void 0,this._e=1,this.handlingDownUpSequence||n.getView().beginInteraction(),!0}return!1},n}(Tu);function gc(t){var n=t||{},i=new ft,r=new No(-.005,.05,100);return(void 0===n.altShiftDragRotate||n.altShiftDragRotate)&&i.push(new Xu),(void 0===n.doubleClickZoom||n.doubleClickZoom)&&i.push(new Mu({delta:n.zoomDelta,duration:n.zoomDuration})),(void 0===n.dragPan||n.dragPan)&&i.push(new Wu({onFocusOnly:n.onFocusOnly,kinetic:r})),(void 0===n.pinchRotate||n.pinchRotate)&&i.push(new mc),(void 0===n.pinchZoom||n.pinchZoom)&&i.push(new bc({duration:n.zoomDuration})),(void 0===n.keyboard||n.keyboard)&&(i.push(new cc),i.push(new fc({delta:n.zoomDelta,duration:n.zoomDuration}))),(void 0===n.mouseWheelZoom||n.mouseWheelZoom)&&i.push(new pc({onFocusOnly:n.onFocusOnly,duration:n.zoomDuration})),(void 0===n.shiftDragZoom||n.shiftDragZoom)&&i.push(new rc({duration:n.zoomDuration})),i}var xc=function(){var t=function(n,i){return(t=Object.setPrototypeOf||{__proto__:[]}instanceof Array&&function(t,n){t.__proto__=n}||function(t,n){for(var i in n)Object.prototype.hasOwnProperty.call(n,i)&&(t[i]=n[i])})(n,i)};return function(n,i){if("function"!=typeof i&&null!==i)throw new TypeError("Class extends value "+String(i)+" is not a constructor or null");function r(){this.constructor=n}t(n,i),n.prototype=null===i?Object.create(i):(r.prototype=i.prototype,new r)}}(),jc=function(t){function n(n){return(n=E({},n)).controls||(n.controls=wu()),n.interactions||(n.interactions=gc({onFocusOnly:!0})),t.call(this,n)||this}return xc(n,t),n.prototype.createRenderer=function(){return new oa(this)},n}(cu),Sc="bottom-left",kc="bottom-center",Mc="bottom-right",_c="center-left",Oc="center-center",Tc="center-right",Ec="top-left",Ac="top-center",Cc="top-right";function Rc(t){return(Rc="function"==typeof Symbol&&"symbol"==typeof Symbol.iterator?function(t){return typeof t}:function(t){return t&&"function"==typeof Symbol&&t.constructor===Symbol&&t!==Symbol.prototype?"symbol":typeof t})(t)}var Pc=function(){var t=function(n,i){return(t=Object.setPrototypeOf||{__proto__:[]}instanceof Array&&function(t,n){t.__proto__=n}||function(t,n){for(var i in n)Object.prototype.hasOwnProperty.call(n,i)&&(t[i]=n[i])})(n,i)};return function(n,i){if("function"!=typeof i&&null!==i)throw new TypeError("Class extends value "+String(i)+" is not a constructor or null");function r(){this.constructor=n}t(n,i),n.prototype=null===i?Object.create(i):(r.prototype=i.prototype,new r)}}(),Ic="element",Nc="map",zc="offset",Fc="position",Lc="positioning",Gc=function(t){function n(n){var i=t.call(this)||this;i.on,i.once,i.un,i.options=n,i.id=n.id,i.insertFirst=void 0===n.insertFirst||n.insertFirst,i.stopEvent=void 0===n.stopEvent||n.stopEvent,i.element=document.createElement("div"),i.element.className=void 0!==n.className?n.className:"ol-overlay-container ol-selectable",i.element.style.position="absolute",i.element.style.pointerEvents="auto";var r=n.autoPan;return r&&"object"!==Rc(r)&&(r={animation:n.autoPanAnimation,margin:n.autoPanMargin}),i.autoPan=r||!1,i.rendered={_t:"",visible:!0},i.mapPostrenderListenerKey=null,i.addChangeListener(Ic,i.handleElementChanged),i.addChangeListener(Nc,i.handleMapChanged),i.addChangeListener(zc,i.handleOffsetChanged),i.addChangeListener(Fc,i.handlePositionChanged),i.addChangeListener(Lc,i.handlePositioningChanged),void 0!==n.element&&i.setElement(n.element),i.setOffset(void 0!==n.offset?n.offset:[0,0]),i.setPositioning(void 0!==n.positioning?n.positioning:Ec),void 0!==n.position&&i.setPosition(n.position),i}return Pc(n,t),n.prototype.getElement=function(){return this.get(Ic)},n.prototype.getId=function(){return this.id},n.prototype.getMap=function(){return this.get(Nc)||null},n.prototype.getOffset=function(){return this.get(zc)},n.prototype.getPosition=function(){return this.get(Fc)},n.prototype.getPositioning=function(){return this.get(Lc)},n.prototype.handleElementChanged=function(){Co(this.element);var t=this.getElement();t&&this.element.appendChild(t)},n.prototype.handleMapChanged=function(){this.mapPostrenderListenerKey&&(Ao(this.element),$(this.mapPostrenderListenerKey),this.mapPostrenderListenerKey=null);var t=this.getMap();if(t){this.mapPostrenderListenerKey=Y(t,xa,this.render,this),this.updatePixelPosition();var n=this.stopEvent?t.getOverlayContainerStopEvent():t.getOverlayContainer();this.insertFirst?n.insertBefore(this.element,n.childNodes[0]||null):n.appendChild(this.element),this.performAutoPan()}},n.prototype.render=function(){this.updatePixelPosition()},n.prototype.handleOffsetChanged=function(){this.updatePixelPosition()},n.prototype.handlePositionChanged=function(){this.updatePixelPosition(),this.performAutoPan()},n.prototype.handlePositioningChanged=function(){this.updatePixelPosition()},n.prototype.setElement=function(t){this.set(Ic,t)},n.prototype.setMap=function(t){this.set(Nc,t)},n.prototype.setOffset=function(t){this.set(zc,t)},n.prototype.setPosition=function(t){this.set(Fc,t)},n.prototype.performAutoPan=function(){this.autoPan&&this.panIntoView(this.autoPan)},n.prototype.panIntoView=function(t){var n=this.getMap();if(n&&n.getTargetElement()&&this.get(Fc)){var i=this.getRect(n.getTargetElement(),n.getSize()),r=this.getElement(),e=this.getRect(r,[Oo(r),To(r)]),o=t||{},s=void 0===o.margin?20:o.margin;if(!_n(i,e)){var a=e[0]-i[0],u=i[2]-e[2],c=e[1]-i[1],h=i[3]-e[3],f=[0,0];if(a<0?f[0]=a-s:u<0&&(f[0]=Math.abs(u)+s),c<0?f[1]=c-s:h<0&&(f[1]=Math.abs(h)+s),0!==f[0]||0!==f[1]){var l=n.getView().getCenterInternal(),v=n.getPixelFromCoordinateInternal(l);if(!v)return;var d=[v[0]+f[0],v[1]+f[1]],p=o.animation||{};n.getView().animateInternal({center:n.getCoordinateFromPixelInternal(d),duration:p.duration,easing:p.easing})}}}},n.prototype.getRect=function(t,n){var i=t.getBoundingClientRect(),r=i.left+window.pageXOffset,e=i.top+window.pageYOffset;return[r,e,r+n[0],e+n[1]]},n.prototype.setPositioning=function(t){this.set(Lc,t)},n.prototype.setVisible=function(t){this.rendered.visible!==t&&(this.element.style.display=t?"":"none",this.rendered.visible=t)},n.prototype.updatePixelPosition=function(){var t=this.getMap(),n=this.getPosition();if(t&&t.isRendered()&&n){var i=t.getPixelFromCoordinate(n),r=t.getSize();this.updateRenderedPosition(i,r)}else this.setVisible(!1)},n.prototype.updateRenderedPosition=function(t,n){var i=this.element.style,r=this.getOffset(),e=this.getPositioning();this.setVisible(!0);var o=Math.round(t[0]+r[0])+"px",s=Math.round(t[1]+r[1])+"px",a="0%",u="0%";e==Mc||e==Tc||e==Cc?a="-100%":e!=kc&&e!=Oc&&e!=Ac||(a="-50%"),e==Sc||e==kc||e==Mc?u="-100%":e!=_c&&e!=Oc&&e!=Tc||(u="-50%");var c="translate(".concat(a,", ").concat(u,") translate(").concat(o,", ").concat(s,")");this.rendered._t!=c&&(this.rendered._t=c,i.transform=c,i.msTransform=c)},n.prototype.getOptions=function(){return this.options},n}(ot),Dc=function(){function t(t){this.highWaterMark=void 0!==t?t:2048,this.Oe=0,this.Te={},this.Ee=null,this.Ae=null}return t.prototype.canExpireCache=function(){return this.highWaterMark>0&&this.getCount()>this.highWaterMark},t.prototype.expireCache=function(t){for(;this.canExpireCache();)this.pop()},t.prototype.clear=function(){this.Oe=0,this.Te={},this.Ee=null,this.Ae=null},t.prototype.containsKey=function(t){return this.Te.hasOwnProperty(t)},t.prototype.forEach=function(t){for(var n=this.Ee;n;)t(n.Ce,n.Re,this),n=n.newer},t.prototype.get=function(t,n){var i=this.Te[t];return Mt(void 0!==i,15),i===this.Ae||(i===this.Ee?(this.Ee=this.Ee.newer,this.Ee.older=null):(i.newer.older=i.older,i.older.newer=i.newer),i.newer=null,i.older=this.Ae,this.Ae.newer=i,this.Ae=i),i.Ce},t.prototype.remove=function(t){var n=this.Te[t];return Mt(void 0!==n,15),n===this.Ae?(this.Ae=n.older,this.Ae&&(this.Ae.newer=null)):n===this.Ee?(this.Ee=n.newer,this.Ee&&(this.Ee.older=null)):(n.newer.older=n.older,n.older.newer=n.newer),delete this.Te[t],--this.Oe,n.Ce},t.prototype.getCount=function(){return this.Oe},t.prototype.getKeys=function(){var t,n=new Array(this.Oe),i=0;for(t=this.Ae;t;t=t.older)n[i++]=t.Re;return n},t.prototype.getValues=function(){var t,n=new Array(this.Oe),i=0;for(t=this.Ae;t;t=t.older)n[i++]=t.Ce;return n},t.prototype.peekLast=function(){return this.Ee.Ce},t.prototype.peekLastKey=function(){return this.Ee.Re},t.prototype.peekFirstKey=function(){return this.Ae.Re},t.prototype.pop=function(){var t=this.Ee;return delete this.Te[t.Re],t.newer&&(t.newer.older=null),this.Ee=t.newer,this.Ee||(this.Ae=null),--this.Oe,t.Ce},t.prototype.replace=function(t,n){this.get(t),this.Te[t].Ce=n},t.prototype.set=function(t,n){Mt(!(t in this.Te),16);var i={Re:t,newer:null,older:this.Ae,Ce:n};this.Ae?this.Ae.newer=i:this.Ee=i,this.Ae=i,this.Te[t]=i,++this.Oe},t.prototype.setSize=function(t){this.highWaterMark=t},t}();function Uc(t,n,i,r){return void 0!==r?(r[0]=t,r[1]=n,r[2]=i,r):[t,n,i]}function qc(t,n,i){return t+"/"+n+"/"+i}function Bc(t){return qc(t[0],t[1],t[2])}function Wc(t){var n=t.substring(t.lastIndexOf("/")+1,t.length).split(",").map(Number);return qc(n[0],n[1],n[2])}function Vc(t){return t.split("/").map(Number)}function Xc(t){return(t[1]<i||i>n.getMaxZoom())return!1;var o=n.getFullTileRange(i);return!o||o.containsXY(r,e)}var Jc=function(){var t=function(n,i){return(t=Object.setPrototypeOf||{__proto__:[]}instanceof Array&&function(t,n){t.__proto__=n}||function(t,n){for(var i in n)Object.prototype.hasOwnProperty.call(n,i)&&(t[i]=n[i])})(n,i)};return function(n,i){if("function"!=typeof i&&null!==i)throw new TypeError("Class extends value "+String(i)+" is not a constructor or null");function r(){this.constructor=n}t(n,i),n.prototype=null===i?Object.create(i):(r.prototype=i.prototype,new r)}}(),Kc=function(t){function n(){return null!==t&&t.apply(this,arguments)||this}return Jc(n,t),n.prototype.expireCache=function(t){for(;this.canExpireCache();){if(this.peekLast().getKey()in t)break;this.pop().release()}},n.prototype.pruneExceptNewestZ=function(){if(0!==this.getCount()){var t=Vc(this.peekFirstKey())[0];this.forEach(function(n){n.tileCoord[0]!==t&&(this.remove(Bc(n.tileCoord)),n.release())}.bind(this))}},n}(Dc),Yc=function(){function t(t,n,i,r){this.minX=t,this.maxX=n,this.minY=i,this.maxY=r}return t.prototype.contains=function(t){return this.containsXY(t[1],t[2])},t.prototype.containsTileRange=function(t){return this.minX<=t.minX&&t.maxX<=this.maxX&&this.minY<=t.minY&&t.maxY<=this.maxY},t.prototype.containsXY=function(t,n){return this.minX<=t&&t<=this.maxX&&this.minY<=n&&n<=this.maxY},t.prototype.equals=function(t){return this.minX==t.minX&&this.minY==t.minY&&this.maxX==t.maxX&&this.maxY==t.maxY},t.prototype.extend=function(t){t.minXthis.maxX&&(this.maxX=t.maxX),t.minYthis.maxY&&(this.maxY=t.maxY)},t.prototype.getHeight=function(){return this.maxY-this.minY+1},t.prototype.getSize=function(){return[this.getWidth(),this.getHeight()]},t.prototype.getWidth=function(){return this.maxX-this.minX+1},t.prototype.intersects=function(t){return this.minX<=t.maxX&&this.maxX>=t.minX&&this.minY<=t.maxY&&this.maxY>=t.minY},t}();function Zc(t,n,i,r,e){return void 0!==e?(e.minX=t,e.maxX=n,e.minY=i,e.maxY=r,e):new Yc(t,n,i,r)}var $c=Yc,Qc=function(){var t=function(n,i){return(t=Object.setPrototypeOf||{__proto__:[]}instanceof Array&&function(t,n){t.__proto__=n}||function(t,n){for(var i in n)Object.prototype.hasOwnProperty.call(n,i)&&(t[i]=n[i])})(n,i)};return function(n,i){if("function"!=typeof i&&null!==i)throw new TypeError("Class extends value "+String(i)+" is not a constructor or null");function r(){this.constructor=n}t(n,i),n.prototype=null===i?Object.create(i):(r.prototype=i.prototype,new r)}}(),th=[],nh=function(t){function n(n,i,r,e){var o=t.call(this,n,i,{transition:0})||this;return o.Pe={},o.executorGroups={},o.declutterExecutorGroups={},o.loadingSourceTiles=0,o.hitDetectionImageData={},o.Ne={},o.sourceTiles=[],o.errorTileKeys={},o.wantedResolution,o.getSourceTiles=e.bind(void 0,o),o.wrappedTileCoord=r,o}return Qc(n,t),n.prototype.getContext=function(t){var n=o(t);return n in this.Pe||(this.Pe[n]=_o(1,1,th)),this.Pe[n]},n.prototype.hasContext=function(t){return o(t)in this.Pe},n.prototype.getImage=function(t){return this.hasContext(t)?this.getContext(t).canvas:null},n.prototype.getReplayState=function(t){var n=o(t);return n in this.Ne||(this.Ne[n]={dirty:!1,renderedRenderOrder:null,renderedResolution:NaN,renderedRevision:-1,renderedTileResolution:NaN,renderedTileRevision:-1,renderedTileZ:-1}),this.Ne[n]},n.prototype.load=function(){this.getSourceTiles()},n.prototype.release=function(){for(var n in this.Pe)th.push(this.Pe[n].canvas),delete this.Pe[n];t.prototype.release.call(this)},n}(jt),ih=function(){var t=function(n,i){return(t=Object.setPrototypeOf||{__proto__:[]}instanceof Array&&function(t,n){t.__proto__=n}||function(t,n){for(var i in n)Object.prototype.hasOwnProperty.call(n,i)&&(t[i]=n[i])})(n,i)};return function(n,i){if("function"!=typeof i&&null!==i)throw new TypeError("Class extends value "+String(i)+" is not a constructor or null");function r(){this.constructor=n}t(n,i),n.prototype=null===i?Object.create(i):(r.prototype=i.prototype,new r)}}(),rh=function(t){function n(n,i,r,e,o,s){var a=t.call(this,n,i,s)||this;return a.extent=null,a.ze=e,a.Fe=null,a.q,a.projection=null,a.resolution,a.Wt=o,a.Le=r,a.key=r,a}return ih(n,t),n.prototype.getFormat=function(){return this.ze},n.prototype.getFeatures=function(){return this.Fe},n.prototype.load=function(){this.state==lt&&(this.setState(vt),this.Wt(this,this.Le),this.q&&this.q(this.extent,this.resolution,this.projection))},n.prototype.onLoad=function(t,n){this.setFeatures(t)},n.prototype.onError=function(){this.setState(pt)},n.prototype.setFeatures=function(t){this.Fe=t,this.setState(dt)},n.prototype.setLoader=function(t){this.q=t},n}(jt);function eh(t){return Array.isArray(t)?Bo(t):t}var oh="arraybuffer",sh="json",ah="text",uh="xml",ch=!1;function hh(t,n,i,r,e,o,s){var a=new XMLHttpRequest;a.open("GET","function"==typeof t?t(i,r,e):t,!0),n.getType()==oh&&(a.responseType="arraybuffer"),a.withCredentials=ch,a.onload=function(t){if(!a.status||a.status>=200&&a.status<300){var r=n.getType(),u=void 0;r==sh||r==ah?u=a.responseText:r==uh?(u=a.responseXML)||(u=(new DOMParser).parseFromString(a.responseText,"application/xml")):r==oh&&(u=a.response),u?o(n.readFeatures(u,{extent:i,featureProjection:e}),n.readProjection(u)):s()}else s()},a.onerror=s,a.send()}function fh(t,n){return function(i,r,e,o,s){var a=this;hh(t,n,i,r,e,(function(t,n){a.addFeatures(t),void 0!==o&&o(t)}),s||_)}}function lh(t,n){return[[-1/0,-1/0,1/0,1/0]]}var vh=function(){var t=function(n,i){return(t=Object.setPrototypeOf||{__proto__:[]}instanceof Array&&function(t,n){t.__proto__=n}||function(t,n){for(var i in n)Object.prototype.hasOwnProperty.call(n,i)&&(t[i]=n[i])})(n,i)};return function(n,i){if("function"!=typeof i&&null!==i)throw new TypeError("Class extends value "+String(i)+" is not a constructor or null");function r(){this.constructor=n}t(n,i),n.prototype=null===i?Object.create(i):(r.prototype=i.prototype,new r)}}();function dh(t,n,i,r){var e=document.createElement("script"),s="olc_"+o(n);function a(){delete window[s],e.parentNode.removeChild(e)}e.async=!0,e.src=t+(-1==t.indexOf("?")?"?":"&")+(r||"callback")+"="+s;var u=setTimeout((function(){a(),i&&i()}),1e4);window[s]=function(t){clearTimeout(u),a(),n(t)},document.getElementsByTagName("head")[0].appendChild(e)}var ph,yh=function(t){function n(n){var i=this,r="Unexpected response status: "+n.status;return(i=t.call(this,r)||this).name="ResponseError",i.response=n,i}return vh(n,t),n}(Error),mh=function(t){function n(n){var i=t.call(this,"Failed to issue request")||this;return i.name="ClientError",i.client=n,i}return vh(n,t),n}(Error);function wh(t){return new Promise((function(n,i){var r=new XMLHttpRequest;r.addEventListener("load",(function(t){var r=t.target;if(!r.status||r.status>=200&&r.status<300){var e=void 0;try{e=JSON.parse(r.responseText)}catch(t){var o="Error parsing response text as JSON: "+t.message;return void i(new Error(o))}n(e)}else i(new yh(r))})),r.addEventListener("error",(function(t){i(new mh(t.target))})),r.open("GET",t),r.setRequestHeader("Accept","application/json"),r.send()}))}function bh(t,n){return n.indexOf("://")>=0?n:new URL(n,t).href}var gh=function(){function t(){}return t.prototype.drawCustom=function(t,n,i,r){},t.prototype.drawGeometry=function(t){},t.prototype.setStyle=function(t){},t.prototype.drawCircle=function(t,n){},t.prototype.drawFeature=function(t,n){},t.prototype.drawGeometryCollection=function(t,n){},t.prototype.drawLineString=function(t,n){},t.prototype.drawMultiLineString=function(t,n){},t.prototype.drawMultiPoint=function(t,n){},t.prototype.drawMultiPolygon=function(t,n){},t.prototype.drawPoint=function(t,n){},t.prototype.drawPolygon=function(t,n){},t.prototype.drawText=function(t,n){},t.prototype.setFillStrokeStyle=function(t,n){},t.prototype.setImageStyle=function(t,n){},t.prototype.setTextStyle=function(t,n){},t}(),xh=function(){var t=function(n,i){return(t=Object.setPrototypeOf||{__proto__:[]}instanceof Array&&function(t,n){t.__proto__=n}||function(t,n){for(var i in n)Object.prototype.hasOwnProperty.call(n,i)&&(t[i]=n[i])})(n,i)};return function(n,i){if("function"!=typeof i&&null!==i)throw new TypeError("Class extends value "+String(i)+" is not a constructor or null");function r(){this.constructor=n}t(n,i),n.prototype=null===i?Object.create(i):(r.prototype=i.prototype,new r)}}(),jh=function(t){function n(n,i,r,e,o,s,a){var u=t.call(this)||this;return u.Pe=n,u.Rt=i,u.st=r,u._t=e,u.Ge=o,u.De=s,u.Ue=a,u.qe=null,u.Be=null,u.We=null,u.Ve=null,u.Xe=null,u.Nt=null,u.He=0,u.Je=0,u.Ke=0,u.Ye=0,u.Ze=0,u.$e=0,u.Qe=!1,u.no=0,u.io=[0,0],u.ro=0,u.eo="",u.oo=0,u.so=0,u.ao=!1,u.uo=0,u.co=[0,0],u.ho=null,u.fo=null,u.lo=null,u.vo=[],u.do=[1,0,0,1,0,0],u}return xh(n,t),n.prototype.po=function(t,n,i,r){if(this.Nt){var e=Br(t,n,i,r,this._t,this.vo),o=this.Pe,s=this.do,a=o.globalAlpha;1!=this.Ye&&(o.globalAlpha=a*this.Ye);var u=this.no;this.Qe&&(u+=this.Ge);for(var c=0,h=e.length;c2||Math.abs(t[4*n+3]-191.25)>2}function Uh(t,n,i,r){var e=Ar(i,n,t),o=gr(n,r,i),s=n.getMetersPerUnit();void 0!==s&&(o*=s);var a=t.getMetersPerUnit();void 0!==a&&(o/=a);var u=t.getExtent();if(!u||Mn(u,e)){var c=gr(t,o,e)/o;isFinite(c)&&c>0&&(o/=c)}return o}function qh(t,n,i,r){var e=Xn(i),o=Uh(t,n,e,r);return(!isFinite(o)||o<=0)&&qn(i,(function(i){return o=Uh(t,n,i,r),isFinite(o)&&o>0})),o}function Bh(t,n,i,r,e,o,s,a,u,c,h,f){var l=_o(Math.round(i*t),Math.round(i*n));if(f||E(l,Fh),0===u.length)return l.canvas;function v(t){return Math.round(t*i)/i}l.scale(i,i),l.globalCompositeOperation="lighter";var d=[1/0,1/0,-1/0,-1/0];u.forEach((function(t,n,i){zn(d,t.extent)}));var p=Qn(d),y=Kn(d),m=_o(Math.round(i*p/r),Math.round(i*y/r));f||E(m,Fh);var w=i/r;u.forEach((function(t,n,i){var r=t.extent[0]-d[0],e=-(t.extent[3]-d[3]),o=Qn(t.extent),s=Kn(t.extent);t.image.width>0&&t.image.height>0&&m.drawImage(t.image,c,c,t.image.width-2*c,t.image.height-2*c,r*w,e*w,o*w,s*w)}));var b=Zn(s);return a.getTriangles().forEach((function(t,n,e){var s=t.source,a=t.target,u=s[0][0],c=s[0][1],h=s[1][0],p=s[1][1],y=s[2][0],w=s[2][1],g=v((a[0][0]-b[0])/o),x=v(-(a[0][1]-b[1])/o),j=v((a[1][0]-b[0])/o),S=v(-(a[1][1]-b[1])/o),k=v((a[2][0]-b[0])/o),M=v(-(a[2][1]-b[1])/o),_=u,O=c;u=0,c=0;var T=vi([[h-=_,p-=O,0,0,j-g],[y-=_,w-=O,0,0,k-g],[0,0,h,p,S-x],[0,0,y,w,M-x]]);if(T){if(l.save(),l.beginPath(),function(){if(void 0===zh){var t=document.createElement("canvas").getContext("2d");t.globalCompositeOperation="lighter",t.fillStyle="rgba(210, 0, 0, 0.75)",Gh(t,4,5,4,0),Gh(t,4,5,0,5);var n=t.getImageData(0,0,3,3).data;zh=Dh(n,0)||Dh(n,4)||Dh(n,8)}return zh}()||!f){l.moveTo(j,S);for(var E=g-j,A=x-S,C=0;C<4;C++)l.lineTo(j+v((C+1)*E/4),S+v(C*A/3)),3!=C&&l.lineTo(j+v((C+1)*E/4),S+v((C+1)*A/3));l.lineTo(k,M)}else l.moveTo(j,S),l.lineTo(g,x),l.lineTo(k,M);l.clip(),l.transform(T[0],T[2],T[1],T[3],g,x),l.translate(d[0]-_,d[3]-O),l.scale(r/i,-r/i),l.drawImage(m.canvas,0,0),l.restore()}})),h&&(l.save(),l.globalCompositeOperation="source-over",l.strokeStyle="black",l.lineWidth=1,a.getTriangles().forEach((function(t,n,i){var r=t.target,e=(r[0][0]-b[0])/o,s=-(r[0][1]-b[1])/o,a=(r[1][0]-b[0])/o,u=-(r[1][1]-b[1])/o,c=(r[2][0]-b[0])/o,h=-(r[2][1]-b[1])/o;l.beginPath(),l.moveTo(a,u),l.lineTo(e,s),l.lineTo(c,h),l.closePath(),l.stroke()})),l.restore()),l.canvas}var Wh=[0,0,0],Vh=function(){function t(t){var n;if(this.minZoom=void 0!==t.minZoom?t.minZoom:0,this.Ti=t.resolutions,Mt(S(this.Ti,(function(t,n){return n-t}),!0),17),!t.origins)for(var i=0,r=this.Ti.length-1;i=this.minZoom;){if(n(a,2===this.Oi?Zc(e=Math.floor(e/2),e,o=Math.floor(o/2),o,i):this.getTileRangeForExtentAndZ(s,a,i)))return!0;--a}return!1},t.prototype.getExtent=function(){return this.st},t.prototype.getMaxZoom=function(){return this.maxZoom},t.prototype.getMinZoom=function(){return this.minZoom},t.prototype.getOrigin=function(t){return this.So?this.So:this.ko[t]},t.prototype.getResolution=function(t){return this.Ti[t]},t.prototype.getResolutions=function(){return this.Ti},t.prototype.getTileCoordChildTileRange=function(t,n,i){if(t[0]this.maxZoom||n0?r:Math.max(s/a[0],o/a[1]),c=e+1,h=new Array(c),f=0;f0))){var i=vf(n.canvas).getExtension("WEBGL_lose_context");i&&i.loseContext(),delete il[t]}}(this.Ho),delete this.Po,delete this.Ut},n.prototype.prepareDraw=function(t,n){var i=this.getGL(),r=this.getCanvas(),e=t.size,o=t.pixelRatio;r.width=e[0]*o,r.height=e[1]*o,r.style.width=e[0]+"px",r.style.height=e[1]+"px",i.useProgram(this.Yo);for(var s=this.rs.length-1;s>=0;s--)this.rs[s].init(t);i.bindTexture(i.TEXTURE_2D,null),i.clearColor(0,0,0,0),i.clear(i.COLOR_BUFFER_BIT),i.enable(i.BLEND),i.blendFunc(i.ONE,n?i.ZERO:i.ONE_MINUS_SRC_ALPHA),i.useProgram(this.Yo),this.applyFrameState(t),this.applyUniforms(t)},n.prototype.prepareDrawToRenderTarget=function(t,n,i){var r=this.getGL(),e=n.getSize();r.bindFramebuffer(r.FRAMEBUFFER,n.getFramebuffer()),r.viewport(0,0,e[0],e[1]),r.bindTexture(r.TEXTURE_2D,n.getTexture()),r.clearColor(0,0,0,0),r.clear(r.COLOR_BUFFER_BIT),r.enable(r.BLEND),r.blendFunc(r.ONE,i?r.ZERO:r.ONE_MINUS_SRC_ALPHA),r.useProgram(this.Yo),this.applyFrameState(t),this.applyUniforms(t)},n.prototype.drawElements=function(t,n){var i=this.getGL();this.getExtension("OES_element_index_uint");var r=i.UNSIGNED_INT,e=n-t,o=4*t;i.drawElements(i.TRIANGLES,e,r,o)},n.prototype.finalizeDraw=function(t,n,i){for(var r=0,e=this.rs.length;rthis.hs[0]||n>=this.hs[1])return cl[0]=0,cl[1]=0,cl[2]=0,cl[3]=0,cl;this.readAll();var i=Math.floor(t)+(this.hs[1]-Math.floor(n)-1)*this.hs[0];return cl[0]=this.B[4*i],cl[1]=this.B[4*i+1],cl[2]=this.B[4*i+2],cl[3]=this.B[4*i+3],cl},t.prototype.getTexture=function(){return this.ss},t.prototype.getFramebuffer=function(){return this.cs},t.prototype.ls=function(){var t=this.hs,n=this.us.getGL();this.ss=this.us.createTexture(t,null,this.ss),n.bindFramebuffer(n.FRAMEBUFFER,this.cs),n.viewport(0,0,t[0],t[1]),n.framebufferTexture2D(n.FRAMEBUFFER,n.COLOR_ATTACHMENT0,n.TEXTURE_2D,this.ss,0),this.B=new Uint8Array(t[0]*t[1]*4)},t}(),fl=!0,ll=function(){function t(t,n,i,r,e,o){this.vs=t,this.ds=n;var s={},a=Er(this.ds,this.vs);this.ps=function(t){var n=t[0]+"/"+t[1];return s[n]||(s[n]=a(t)),s[n]},this.ys=r,this.ws=e*e,this.bs=[],this.gs=!1,this.xs=this.vs.canWrapX()&&!!r&&!!this.vs.getExtent()&&Qn(r)==Qn(this.vs.getExtent()),this.Ss=this.vs.getExtent()?Qn(this.vs.getExtent()):null,this.ks=this.ds.getExtent()?Qn(this.ds.getExtent()):null;var u=Zn(i),c=$n(i),h=Vn(i),f=Wn(i),l=this.ps(u),v=this.ps(c),d=this.ps(h),p=this.ps(f),y=10+(o?Math.max(0,Math.ceil(hi(Bn(i)/(o*o*256*256)))):0);if(this.Ms(u,c,h,f,l,v,d,p,y),this.gs){var m=1/0;this.bs.forEach((function(t,n,i){m=Math.min(m,t.source[0][0],t.source[1][0],t.source[2][0])})),this.bs.forEach(function(t){if(Math.max(t.source[0][0],t.source[1][0],t.source[2][0])-m>this.Ss/2){var n=[[t.source[0][0],t.source[0][1]],[t.source[1][0],t.source[1][1]],[t.source[2][0],t.source[2][1]]];n[0][0]-m>this.Ss/2&&(n[0][0]-=this.Ss),n[1][0]-m>this.Ss/2&&(n[1][0]-=this.Ss),n[2][0]-m>this.Ss/2&&(n[2][0]-=this.Ss);var i=Math.min(n[0][0],n[1][0],n[2][0]);Math.max(n[0][0],n[1][0],n[2][0])-i.5&&h<1,v=!1;if(u>0){if(this.ds.isGlobal()&&this.ks)v=Qn(xn([t,n,i,r]))/this.ks>.25||v;!l&&this.vs.isGlobal()&&h&&(v=h>.25||v)}if(!(!v&&this.ys&&isFinite(c[0])&&isFinite(c[1])&&isFinite(c[2])&&isFinite(c[3]))||ti(c,this.ys)){var d=0;if(!(v||isFinite(e[0])&&isFinite(e[1])&&isFinite(o[0])&&isFinite(o[1])&&isFinite(s[0])&&isFinite(s[1])&&isFinite(a[0])&&isFinite(a[1])))if(u>0)v=!0;else if(1!=(d=(isFinite(e[0])&&isFinite(e[1])?0:8)+(isFinite(o[0])&&isFinite(o[1])?0:4)+(isFinite(s[0])&&isFinite(s[1])?0:2)+(isFinite(a[0])&&isFinite(a[1])?0:1))&&2!=d&&4!=d&&8!=d)return;if(u>0){if(!v){var p=[(t[0]+i[0])/2,(t[1]+i[1])/2],y=this.ps(p),m=void 0;if(l)m=(yi(e[0],f)+yi(s[0],f))/2-yi(y[0],f);else m=(e[0]+s[0])/2-y[0];var w=(e[1]+s[1])/2-y[1];v=m*m+w*w>this.ws}if(v){if(Math.abs(t[0]-i[0])<=Math.abs(t[1]-i[1])){var b=[(n[0]+i[0])/2,(n[1]+i[1])/2],g=this.ps(b),x=[(r[0]+t[0])/2,(r[1]+t[1])/2],j=this.ps(x);this.Ms(t,n,b,x,e,o,g,j,u-1),this.Ms(x,b,i,r,j,g,s,a,u-1)}else{var S=[(t[0]+n[0])/2,(t[1]+n[1])/2],k=this.ps(S),M=[(i[0]+r[0])/2,(i[1]+r[1])/2],_=this.ps(M);this.Ms(t,S,M,r,e,k,_,a,u-1),this.Ms(S,n,i,M,k,o,s,_,u-1)}return}}if(l){if(!this.xs)return;this.gs=!0}0==(11&d)&&this._s(t,i,r,e,s,a),0==(14&d)&&this._s(t,i,n,e,s,o),d&&(0==(13&d)&&this._s(n,r,t,o,a,e),0==(7&d)&&this._s(n,r,i,o,a,s))}},t.prototype.calculateSourceExtent=function(){var t=[1/0,1/0,-1/0,-1/0];return this.bs.forEach((function(n,i,r){var e=n.source;Fn(t,e[0]),Fn(t,e[1]),Fn(t,e[2])})),t},t.prototype.getTriangles=function(){return this.bs},t}(),vl=function(){var t=function(n,i){return(t=Object.setPrototypeOf||{__proto__:[]}instanceof Array&&function(t,n){t.__proto__=n}||function(t,n){for(var i in n)Object.prototype.hasOwnProperty.call(n,i)&&(t[i]=n[i])})(n,i)};return function(n,i){if("function"!=typeof i&&null!==i)throw new TypeError("Class extends value "+String(i)+" is not a constructor or null");function r(){this.constructor=n}t(n,i),n.prototype=null===i?Object.create(i):(r.prototype=i.prototype,new r)}}(),dl=function(t){function n(n,i,r,e,o,s,a,u,c,h,f,l){var v=t.call(this,o,lt,{interpolate:!!l})||this;v.Os=void 0!==f&&f,v.Rt=a,v.Ts=u,v.Ut=null,v.Es=i,v.As=e,v.Cs=s||o,v.Rs=[],v.Ps=null,v.Is=0;var d=e.getTileCoordExtent(v.Cs),p=v.As.getExtent(),y=v.Es.getExtent(),m=p?Yn(d,p):d;if(0===Bn(m))return v.state=yt,v;var w=n.getExtent();w&&(y=y?Yn(y,w):w);var b=e.getResolution(v.Cs[0]),g=qh(n,r,m,b);if(!isFinite(g)||g<=0)return v.state=yt,v;var x=void 0!==h?h:.5;if(v.Ns=new ll(n,r,m,y,g*x,b),0===v.Ns.getTriangles().length)return v.state=yt,v;v.Is=i.getZForResolution(g);var j=v.Ns.calculateSourceExtent();if(y&&(n.canWrapX()?(j[1]=ui(j[1],y[1],y[3]),j[3]=ui(j[3],y[1],y[3])):j=Yn(j,y)),Bn(j)){for(var S=i.getTileRangeForExtentAndZ(j,v.Is),k=S.minX;k<=S.maxX;k++)for(var M=S.minY;M<=S.maxY;M++){var _=c(v.Is,k,M,a);_&&v.Rs.push(_)}0===v.Rs.length&&(v.state=yt)}else v.state=yt;return v}return vl(n,t),n.prototype.getImage=function(){return this.Ut},n.prototype.zs=function(){var t=[];if(this.Rs.forEach(function(n,i,r){n&&n.getState()==dt&&t.push({extent:this.Es.getTileCoordExtent(n.tileCoord),image:n.getImage()})}.bind(this)),this.Rs.length=0,0===t.length)this.state=pt;else{var n=this.Cs[0],i=this.As.getTileSize(n),r="number"==typeof i?i:i[0],e="number"==typeof i?i:i[1],o=this.As.getResolution(n),s=this.Es.getResolution(this.Is),a=this.As.getTileCoordExtent(this.Cs);this.Ut=Bh(r,e,this.Rt,s,this.Es.getExtent(),o,a,this.Ns,t,this.Ts,this.Os,this.interpolate),this.state=dt}this.changed()},n.prototype.load=function(){if(this.state==lt){this.state=vt,this.changed();var t=0;this.Ps=[],this.Rs.forEach(function(n,i,r){var e=n.getState();if(e==lt||e==vt){t++;var o=Y(n,N,(function(i){var r=n.getState();r!=dt&&r!=pt&&r!=yt||($(o),0===--t&&(this.Fs(),this.zs()))}),this);this.Ps.push(o)}}.bind(this)),0===t?setTimeout(this.zs.bind(this),0):this.Rs.forEach((function(t,n,i){t.getState()==lt&&t.load()}))}},n.prototype.Fs=function(){this.Ps.forEach($),this.Ps=null},n}(jt),pl=function(){var t=function(n,i){return(t=Object.setPrototypeOf||{__proto__:[]}instanceof Array&&function(t,n){t.__proto__=n}||function(t,n){for(var i in n)Object.prototype.hasOwnProperty.call(n,i)&&(t[i]=n[i])})(n,i)};return function(n,i){if("function"!=typeof i&&null!==i)throw new TypeError("Class extends value "+String(i)+" is not a constructor or null");function r(){this.constructor=n}t(n,i),n.prototype=null===i?Object.create(i):(r.prototype=i.prototype,new r)}}();function yl(t,n,i){var r=i?t.LINEAR:t.NEAREST;t.bindTexture(t.TEXTURE_2D,n),t.texParameteri(t.TEXTURE_2D,t.TEXTURE_WRAP_S,t.CLAMP_TO_EDGE),t.texParameteri(t.TEXTURE_2D,t.TEXTURE_WRAP_T,t.CLAMP_TO_EDGE),t.texParameteri(t.TEXTURE_2D,t.TEXTURE_MIN_FILTER,r),t.texParameteri(t.TEXTURE_2D,t.TEXTURE_MAG_FILTER,r)}function ml(t,n,i,r,e,o){var s=t.getGL();yl(s,n,o);var a,u,c=i.byteLength/r[1],h=1;switch(c%8==0?h=8:c%4==0?h=4:c%2==0&&(h=2),e){case 1:a=s.LUMINANCE;break;case 2:a=s.LUMINANCE_ALPHA;break;case 3:a=s.RGB;break;case 4:a=s.RGBA;break;default:throw new Error("Unsupported number of bands: ".concat(e))}i instanceof Float32Array?(u=s.FLOAT,t.getExtension("OES_texture_float"),t.getExtension("OES_texture_float_linear")):u=s.UNSIGNED_BYTE;var f=s.getParameter(s.UNPACK_ALIGNMENT);s.pixelStorei(s.UNPACK_ALIGNMENT,h),s.texImage2D(s.TEXTURE_2D,0,a,r[0],r[1],0,a,u,i),s.pixelStorei(s.UNPACK_ALIGNMENT,f)}var wl=null;var bl=function(t){function n(n){var i=t.call(this)||this;i.tile,i.textures=[],i.cr=i.cr.bind(i),i.size=ou(n.grid.getTileSize(n.tile.tileCoord[0])),i.Ls=n.tilePixelRatio||1,i.Ts=n.gutter||0,i.bandCount=NaN,i.us=n.helper;var r=new qf(af,cf);return r.fromArray([0,1,1,1,1,0,0,0]),i.us.flushBufferData(r),i.coords=r,i.setTile(n.tile),i}return pl(n,t),n.prototype.setTile=function(t){if(t!==this.tile)if(this.tile&&this.tile.removeEventListener(N,this.cr),this.tile=t,this.textures.length=0,this.loaded=t.getState()===dt,this.loaded)this.Gs();else{if(t instanceof Io){var n=t.getImage();n instanceof Image&&!n.crossOrigin&&(n.crossOrigin="anonymous")}t.addEventListener(N,this.cr)}},n.prototype.Gs=function(){var t=this.us,n=t.getGL(),i=this.tile;if(i instanceof Io||i instanceof dl){var r=i.getImage();if(0!==this.Ts){var e=this.Ls*this.Ts,o=Math.round(r.width-2*e),s=Math.round(r.height-2*e),a=_o(o,s);i.interpolate||E(a,Fh),a.drawImage(r,e,e,o,s,0,0,o,s),r=a.canvas}var u=n.createTexture();return this.textures.push(u),this.bandCount=4,void function(t,n,i,r){yl(t,n,r),t.texImage2D(t.TEXTURE_2D,0,t.RGBA,t.RGBA,t.UNSIGNED_BYTE,i)}(n,u,r,i.interpolate)}var c=[this.size[0]*this.Ls,this.size[1]*this.Ls],h=i.getData(),f=h instanceof Float32Array,l=c[0]*c[1],v=f?Float32Array:Uint8Array,d=v.BYTES_PER_ELEMENT,p=h.byteLength/c[1];this.bandCount=Math.floor(p/d/c[0]);var y=Math.ceil(this.bandCount/4);if(1===y){u=n.createTexture();return this.textures.push(u),void ml(t,u,h,c,this.bandCount,i.interpolate)}for(var m=new Array(y),w=0;w=d;--p)for(var y=u.getTileRangeForExtentAndZ(n,p,this.Ks),m=u.getResolution(p),w=y.minX;w<=y.maxX;++w)for(var b=y.minY;b<=y.maxY;++b){var g=Uc(p,w,b,this.Ys),x=Gl(a,g),j=void 0,S=void 0;if(v.containsKey(x)&&(S=(j=v.get(x)).tile),!j||j.tile.key!==a.getKey())if(S=a.getTile(p,w,b,t.pixelRatio,e.projection),j)if(this.ea(S))j.setTile(S);else{var k=S.getInterimTile();j.setTile(k)}else j=new bl({tile:S,grid:u,helper:this.helper,tilePixelRatio:c,gutter:h}),v.set(x,j);Fl(r,j,p);var M=S.getKey();l[M]=!0,S.getState()===lt&&(t.tileQueue.isKeyQueued(M)||t.tileQueue.enqueue([S,f,u.getTileCoordCenter(g),m]))}},n.prototype.renderFrame=function(t){this.Hi=t,this.renderComplete=!0;var n=this.helper.getGL();this.preRender(n,t);var i=t.viewState,r=this.getLayer().getRenderSource(),e=r.getTileGridForProjection(i.projection),s=Ll(t,t.extent),a=e.getZForResolution(i.resolution,r.zDirection),u={};if(t.nextExtent){var c=e.getZForResolution(i.nextResolution,r.zDirection),h=Ll(t,t.nextExtent);this.enqueueTiles(t,h,c,u)}this.enqueueTiles(t,s,a,u);for(var f={},l=o(this),v=t.time,d=!1,y=u[a],m=0,w=y.length;m=g;--x){if(this.oa(e,b,x,u))break}}this.helper.useProgram(this.$s),this.helper.prepareDraw(t,!d);for(var j=Object.keys(u).map(Number).sort(p),S=i.center[0],k=i.center[1],M=0,_=j.length;M<_;++M){var O=j[M],T=e.getResolution(O),E=ou(e.getTileSize(O),this.Zs),A=e.getOrigin(O),C=(S-A[0])/(E[0]*T),R=(A[1]-k)/(E[1]*T),P=i.resolution/T,I=zl(O),N=u[O];for(m=0,w=N.length;m=a.getMinZoom();--h){var f=a.getTileCoordForCoordAndZ(r,h),l=Gl(s,f);if(c.containsKey(l)){var v=c.get(l);if(v.loaded){var d=a.getOrigin(h),p=ou(a.getTileSize(h)),y=a.getResolution(h),m=(r[0]-d[0])/y-f[1]*p[0],w=(d[1]-r[1])/y-f[2]*p[1];return v.getPixelData(m,w)}}}return null},n.prototype.oa=function(t,n,i,r){var e=t.getTileRangeForTileCoordAndZ(n,i,this.Ks);if(!e)return!1;for(var o=!0,s=this.ia,a=this.getLayer().getRenderSource(),u=e.minX;u<=e.maxX;++u)for(var c=e.minY;c<=e.maxY;++c){var h=Gl(a,[i,u,c]),f=!1;if(s.containsKey(h)){var l=s.get(h);l.loaded&&(Fl(r,l,i),f=!0)}f||(o=!1)}return o},n.prototype.removeHelper=function(){if(this.helper){var n=this.ia;n.forEach((function(t){return t.dispose()})),n.clear()}t.prototype.removeHelper.call(this)},n.prototype.disposeInternal=function(){var n=this.helper;n&&(n.getGL().deleteProgram(this.$s),delete this.$s,n.deleteBuffer(this.na));t.prototype.disposeInternal.call(this),delete this.na,delete this.ia,delete this.Hi},n}(Al),Ul=1,ql=2,Bl=4,Wl=8,Vl=16,Xl=31,Hl=0,Jl={};function Kl(t){if("number"==typeof t)return Ul;if("boolean"==typeof t)return Wl;if("string"==typeof t)return Wo(t)?Bl|ql:ql;if(!Array.isArray(t))throw new Error("Unhandled value type: ".concat(JSON.stringify(t)));var n=t;if(n.every((function(t){return"number"==typeof t})))return 3===n.length||4===n.length?Bl|Vl:Vl;if("string"!=typeof n[0])throw new Error("Expected an expression operator but received: ".concat(JSON.stringify(n)));var i=Jl[n[0]];if(void 0===i)throw new Error("Unrecognized expression operator: ".concat(JSON.stringify(n)));return i.getReturnType(n.slice(1))}function Yl(t){return hi(t)%1==0}function Zl(t){var n=t.toString();return-1===n.indexOf(".")?n+".0":n}function $l(t){if(t.length<2||t.length>4)throw new Error("`formatArray` can only output `vec2`, `vec3` or `vec4` arrays.");return"vec".concat(t.length,"(").concat(t.map(Zl).join(", "),")")}function Ql(t){var n=Uo(t).slice();return n.length<4&&n.push(1),$l(n.map((function(t,n){return n<3?t/255:t})))}function tv(t,n){return void 0===t.stringLiteralsMap[n]&&(t.stringLiteralsMap[n]=Object.keys(t.stringLiteralsMap).length),t.stringLiteralsMap[n]}function nv(t,n){return Zl(tv(t,n))}function iv(t,n,i){if(Array.isArray(n)&&"string"==typeof n[0]){var r=Jl[n[0]];if(void 0===r)throw new Error("Unrecognized expression operator: ".concat(JSON.stringify(n)));return r.toGlsl(t,n.slice(1),i)}var e=Kl(n);if((e&Ul)>0)return Zl(n);if((e&Wl)>0)return n.toString();if((e&ql)>0&&(void 0===i||i==ql))return nv(t,n.toString());if((e&Bl)>0&&(void 0===i||i==Bl))return Ql(n);if((e&Vl)>0)return $l(n);throw new Error("Unexpected expression ".concat(n," (expected type ").concat(i,")"))}function rv(t){if(!(Kl(t)&Ul))throw new Error("A numeric value was expected, got ".concat(JSON.stringify(t)," instead"))}function ev(t){for(var n=0;nn)throw new Error("At most ".concat(n," arguments were expected, got ").concat(t.length," instead"))}function hv(t){if(t.length%2!=0)throw new Error("An even amount of arguments was expected, got ".concat(t," instead"))}function fv(t,n){if(!Yl(n))throw new Error("Could not infer only one type from the following expression: ".concat(JSON.stringify(t)))}function lv(t){return"u_var_"+t}Jl.get={getReturnType:function(t){return Xl},toGlsl:function(t,n){av(n,1),ov(n[0]);var i=n[0].toString();return-1===t.attributes.indexOf(i)&&t.attributes.push(i),(t.inFragmentShader?"v_":"a_")+i}},Jl.var={getReturnType:function(t){return Xl},toGlsl:function(t,n){av(n,1),ov(n[0]);var i=n[0].toString();return-1===t.variables.indexOf(i)&&t.variables.push(i),lv(i)}};var vv="u_paletteTextures";Jl.palette={getReturnType:function(t){return Bl},toGlsl:function(t,n){av(n,2),rv(n[0]);var i=iv(t,n[0]),r=n[1];if(!Array.isArray(r))throw new Error("The second argument of palette must be an array");for(var e=r.length,o=new Uint8Array(4*e),s=0;s"]={getReturnType:function(t){return Wl},toGlsl:function(t,n){return av(n,2),ev(n),"(".concat(iv(t,n[0])," > ").concat(iv(t,n[1]),")")}},Jl[">="]={getReturnType:function(t){return Wl},toGlsl:function(t,n){return av(n,2),ev(n),"(".concat(iv(t,n[0])," >= ").concat(iv(t,n[1]),")")}},Jl["<"]={getReturnType:function(t){return Wl},toGlsl:function(t,n){return av(n,2),ev(n),"(".concat(iv(t,n[0])," < ").concat(iv(t,n[1]),")")}},Jl["<="]={getReturnType:function(t){return Wl},toGlsl:function(t,n){return av(n,2),ev(n),"(".concat(iv(t,n[0])," <= ").concat(iv(t,n[1]),")")}},Jl["=="]=pv("=="),Jl["!="]=pv("!="),Jl["!"]={getReturnType:function(t){return Wl},toGlsl:function(t,n){return av(n,1),sv(n[0]),"(!".concat(iv(t,n[0]),")")}},Jl.all=yv("&&"),Jl.any=yv("||"),Jl.between={getReturnType:function(t){return Wl},toGlsl:function(t,n){av(n,3),ev(n);var i=iv(t,n[1]),r=iv(t,n[2]),e=iv(t,n[0]);return"(".concat(e," >= ").concat(i," && ").concat(e," <= ").concat(r,")")}},Jl.array={getReturnType:function(t){return Vl},toGlsl:function(t,n){uv(n,2),cv(n,4),ev(n);var i=n.map((function(n){return iv(t,n,Ul)}));return"vec".concat(n.length,"(").concat(i.join(", "),")")}},Jl.color={getReturnType:function(t){return Bl},toGlsl:function(t,n){uv(n,3),cv(n,4),ev(n);var i=n;3===n.length&&i.push(1);var r=n.map((function(n,i){return iv(t,n,Ul)+(i<3?" / 255.0":"")}));return"vec".concat(n.length,"(").concat(r.join(", "),")")}},Jl.interpolate={getReturnType:function(t){for(var n=Bl|Ul,i=3;i=1;u-=2){var c=iv(t,n[u]),h=iv(t,n[u+1],e);a="(".concat(o," == ").concat(c," ? ").concat(h," : ").concat(a||s,")")}return a}},Jl.case={getReturnType:function(t){for(var n=Xl,i=1;i=0;o-=2){var u=iv(t,n[o]),c=iv(t,n[o+1],e);a="(".concat(u," ? ").concat(c," : ").concat(a||s,")")}return a}};var mv=function(){function t(){this.uniforms=[],this.attributes=[],this.varyings=[],this.sizeExpression="vec2(1.0)",this.rotationExpression="0.0",this.offsetExpression="vec2(0.0)",this.colorExpression="vec4(1.0)",this.texCoordExpression="vec4(0.0, 0.0, 1.0, 1.0)",this.discardExpression="false",this.rotateWithView=!1}return t.prototype.addUniform=function(t){return this.uniforms.push(t),this},t.prototype.addAttribute=function(t){return this.attributes.push(t),this},t.prototype.addVarying=function(t,n,i){return this.varyings.push({name:t,type:n,expression:i}),this},t.prototype.setSizeExpression=function(t){return this.sizeExpression=t,this},t.prototype.setRotationExpression=function(t){return this.rotationExpression=t,this},t.prototype.setSymbolOffsetExpression=function(t){return this.offsetExpression=t,this},t.prototype.setColorExpression=function(t){return this.colorExpression=t,this},t.prototype.setTextureCoordinateExpression=function(t){return this.texCoordExpression=t,this},t.prototype.setFragmentDiscardExpression=function(t){return this.discardExpression=t,this},t.prototype.setSymbolRotateWithView=function(t){return this.rotateWithView=t,this},t.prototype.getSizeExpression=function(){return this.sizeExpression},t.prototype.getOffsetExpression=function(){return this.offsetExpression},t.prototype.getColorExpression=function(){return this.colorExpression},t.prototype.getTextureCoordinateExpression=function(){return this.texCoordExpression},t.prototype.getFragmentDiscardExpression=function(){return this.discardExpression},t.prototype.getSymbolVertexShader=function(t){var n=this.rotateWithView?"u_offsetScaleMatrix * u_offsetRotateMatrix":"u_offsetScaleMatrix",i=this.attributes,r=this.varyings;return t&&(i=i.concat("vec4 a_hitColor"),r=r.concat({name:"v_hitColor",type:"vec4",expression:"a_hitColor"})),"precision mediump float;\nuniform mat4 u_projectionMatrix;\nuniform mat4 u_offsetScaleMatrix;\nuniform mat4 u_offsetRotateMatrix;\nuniform float u_time;\nuniform float u_zoom;\nuniform float u_resolution;\n".concat(this.uniforms.map((function(t){return"uniform "+t+";"})).join("\n"),"\nattribute vec2 a_position;\nattribute float a_index;\n").concat(i.map((function(t){return"attribute "+t+";"})).join("\n"),"\nvarying vec2 v_texCoord;\nvarying vec2 v_quadCoord;\n").concat(r.map((function(t){return"varying "+t.type+" "+t.name+";"})).join("\n"),"\nvoid main(void) {\n mat4 offsetMatrix = ").concat(n,";\n vec2 halfSize = ").concat(this.sizeExpression," * 0.5;\n vec2 offset = ").concat(this.offsetExpression,";\n float angle = ").concat(this.rotationExpression,";\n float offsetX;\n float offsetY;\n if (a_index == 0.0) {\n offsetX = (offset.x - halfSize.x) * cos(angle) + (offset.y - halfSize.y) * sin(angle);\n offsetY = (offset.y - halfSize.y) * cos(angle) - (offset.x - halfSize.x) * sin(angle);\n } else if (a_index == 1.0) {\n offsetX = (offset.x + halfSize.x) * cos(angle) + (offset.y - halfSize.y) * sin(angle);\n offsetY = (offset.y - halfSize.y) * cos(angle) - (offset.x + halfSize.x) * sin(angle);\n } else if (a_index == 2.0) {\n offsetX = (offset.x + halfSize.x) * cos(angle) + (offset.y + halfSize.y) * sin(angle);\n offsetY = (offset.y + halfSize.y) * cos(angle) - (offset.x + halfSize.x) * sin(angle);\n } else {\n offsetX = (offset.x - halfSize.x) * cos(angle) + (offset.y + halfSize.y) * sin(angle);\n offsetY = (offset.y + halfSize.y) * cos(angle) - (offset.x - halfSize.x) * sin(angle);\n }\n vec4 offsets = offsetMatrix * vec4(offsetX, offsetY, 0.0, 0.0);\n gl_Position = u_projectionMatrix * vec4(a_position, 0.0, 1.0) + offsets;\n vec4 texCoord = ").concat(this.texCoordExpression,";\n float u = a_index == 0.0 || a_index == 3.0 ? texCoord.s : texCoord.p;\n float v = a_index == 2.0 || a_index == 3.0 ? texCoord.t : texCoord.q;\n v_texCoord = vec2(u, v);\n u = a_index == 0.0 || a_index == 3.0 ? 0.0 : 1.0;\n v = a_index == 2.0 || a_index == 3.0 ? 0.0 : 1.0;\n v_quadCoord = vec2(u, v);\n").concat(r.map((function(t){return" "+t.name+" = "+t.expression+";"})).join("\n"),"\n}")},t.prototype.getSymbolFragmentShader=function(t){var n=t?" if (gl_FragColor.a < 0.1) { discard; } gl_FragColor = v_hitColor;":"",i=this.varyings;return t&&(i=i.concat({name:"v_hitColor",type:"vec4",expression:"a_hitColor"})),"precision mediump float;\nuniform float u_time;\nuniform float u_zoom;\nuniform float u_resolution;\n".concat(this.uniforms.map((function(t){return"uniform "+t+";"})).join("\n"),"\nvarying vec2 v_texCoord;\nvarying vec2 v_quadCoord;\n").concat(i.map((function(t){return"varying "+t.type+" "+t.name+";"})).join("\n"),"\nvoid main(void) {\n if (").concat(this.discardExpression,") { discard; }\n gl_FragColor = ").concat(this.colorExpression,";\n gl_FragColor.rgb *= gl_FragColor.a;\n").concat(n,"\n}")},t}();function wv(t){var n=t.symbol,i=void 0!==n.size?n.size:1,r=n.color||"white",e=n.textureCoord||[0,0,1,1],o=n.offset||[0,0],s=void 0!==n.opacity?n.opacity:1,a=void 0!==n.rotation?n.rotation:0,u={inFragmentShader:!1,variables:[],attributes:[],stringLiteralsMap:{},functions:{}},c=iv(u,i,Vl|Ul),h=iv(u,o,Vl),f=iv(u,e,Vl),l=iv(u,a,Ul),v={inFragmentShader:!0,variables:u.variables,attributes:[],stringLiteralsMap:u.stringLiteralsMap,functions:{}},d=iv(v,r,Bl),p=iv(v,s,Ul),y="1.0",m="vec2(".concat(iv(v,i,Vl|Ul),").x");switch(n.symbolType){case"square":case"image":break;case"circle":y="(1.0-smoothstep(1.-4./".concat(m,",1.,dot(v_quadCoord-.5,v_quadCoord-.5)*4.))");break;case"triangle":var w="(v_quadCoord*2.-1.)",b="(atan(".concat(w,".x,").concat(w,".y))");y="(1.0-smoothstep(.5-3./".concat(m,",.5,cos(floor(.5+").concat(b,"/2.094395102)*2.094395102-").concat(b,")*length(").concat(w,")))");break;default:throw new Error("Unexpected symbol type: "+n.symbolType)}var g=(new mv).setSizeExpression("vec2(".concat(c,")")).setRotationExpression(l).setSymbolOffsetExpression(h).setTextureCoordinateExpression(f).setSymbolRotateWithView(!!n.rotateWithView).setColorExpression("vec4(".concat(d,".rgb, ").concat(d,".a * ").concat(p," * ").concat(y,")"));if(t.filter){var x=iv(v,t.filter,Wl);g.setFragmentDiscardExpression("!".concat(x))}var j={};if(v.variables.forEach((function(n){var i=lv(n);g.addUniform("float ".concat(i)),j[i]=function(){if(!t.variables||void 0===t.variables[n])throw new Error("The following variable is missing from the style: ".concat(n));var i=t.variables[n];return"string"==typeof i&&(i=tv(u,i)),void 0!==i?i:-9999999}})),"image"===n.symbolType&&n.src){var S=new Image;S.crossOrigin=void 0===n.crossOrigin?"anonymous":n.crossOrigin,S.src=n.src,g.addUniform("sampler2D u_texture").setColorExpression(g.getColorExpression()+" * texture2D(u_texture, v_texCoord)"),j.u_texture=S}return v.attributes.forEach((function(t){-1===u.attributes.indexOf(t)&&u.attributes.push(t),g.addVarying("v_".concat(t),"float","a_".concat(t))})),u.attributes.forEach((function(t){g.addAttribute("float a_".concat(t))})),{builder:g,attributes:u.attributes.map((function(t){return{name:t,callback:function(n,i){var r=i[t];return"string"==typeof r&&(r=tv(u,r)),void 0!==r?r:-9999999}}})),uniforms:j}}var bv=function(){var t=function(n,i){return(t=Object.setPrototypeOf||{__proto__:[]}instanceof Array&&function(t,n){t.__proto__=n}||function(t,n){for(var i in n)Object.prototype.hasOwnProperty.call(n,i)&&(t[i]=n[i])})(n,i)};return function(n,i){if("function"!=typeof i&&null!==i)throw new TypeError("Class extends value "+String(i)+" is not a constructor or null");function r(){this.constructor=n}t(n,i),n.prototype=null===i?Object.create(i):(r.prototype=i.prototype,new r)}}(),gv=function(t){function n(n){var i=t.call(this,{extent:n.extent,origin:n.origin,origins:n.origins,resolutions:n.resolutions,tileSize:n.tileSize,tileSizes:n.tileSizes,sizes:n.sizes})||this;return i.sa=n.matrixIds,i}return bv(n,t),n.prototype.getMatrixId=function(t){return this.sa[t]},n.prototype.getMatrixIds=function(){return this.sa},n}(Vh),xv=gv;function jv(t,n,i){var r=[],e=[],o=[],s=[],a=[],u=void 0!==i?i:[],c=br(t.SupportedCRS),h=c.getMetersPerUnit(),f="ne"==c.getAxisOrientation().substr(0,2);return t.TileMatrix.sort((function(t,n){return n.ScaleDenominator-t.ScaleDenominator})),t.TileMatrix.forEach((function(n){if(!(u.length>0)||g(u,(function(i){return n.Identifier==i.TileMatrix||-1===n.Identifier.indexOf(":")&&t.Identifier+":"+n.Identifier===i.TileMatrix}))){e.push(n.Identifier);var i=28e-5*n.ScaleDenominator/h,c=n.TileWidth,l=n.TileHeight;f?o.push([n.TopLeftCorner[1],n.TopLeftCorner[0]]):o.push(n.TopLeftCorner),r.push(i),s.push(c==l?c:[c,l]),a.push([n.MatrixWidth,n.MatrixHeight])}})),new gv({extent:n,origins:o,resolutions:r,matrixIds:e,tileSizes:s,sizes:a})}var Sv=function(){function t(t){this.aa=t.opacity,this.ua=t.rotateWithView,this.Gr=t.rotation,this.ca=t.scale,this.ha=ou(t.scale),this.fa=t.displacement}return t.prototype.clone=function(){var n=this.getScale();return new t({opacity:this.getOpacity(),scale:Array.isArray(n)?n.slice():n,rotation:this.getRotation(),rotateWithView:this.getRotateWithView(),displacement:this.getDisplacement().slice()})},t.prototype.getOpacity=function(){return this.aa},t.prototype.getRotateWithView=function(){return this.ua},t.prototype.getRotation=function(){return this.Gr},t.prototype.getScale=function(){return this.ca},t.prototype.getScaleArray=function(){return this.ha},t.prototype.getDisplacement=function(){return this.fa},t.prototype.getAnchor=function(){return r()},t.prototype.getImage=function(t){return r()},t.prototype.getHitDetectionImage=function(){return r()},t.prototype.getPixelRatio=function(t){return 1},t.prototype.getImageState=function(){return r()},t.prototype.getImageSize=function(){return r()},t.prototype.getOrigin=function(){return r()},t.prototype.getSize=function(){return r()},t.prototype.setDisplacement=function(t){this.fa=t},t.prototype.setOpacity=function(t){this.aa=t},t.prototype.setRotateWithView=function(t){this.ua=t},t.prototype.setRotation=function(t){this.Gr=t},t.prototype.setScale=function(t){this.ca=t,this.ha=ou(t)},t.prototype.listenImageChange=function(t){r()},t.prototype.load=function(){r()},t.prototype.unlistenImageChange=function(t){r()},t}(),kv=function(){var t=function(n,i){return(t=Object.setPrototypeOf||{__proto__:[]}instanceof Array&&function(t,n){t.__proto__=n}||function(t,n){for(var i in n)Object.prototype.hasOwnProperty.call(n,i)&&(t[i]=n[i])})(n,i)};return function(n,i){if("function"!=typeof i&&null!==i)throw new TypeError("Class extends value "+String(i)+" is not a constructor or null");function r(){this.constructor=n}t(n,i),n.prototype=null===i?Object.create(i):(r.prototype=i.prototype,new r)}}(),Mv=function(t){function n(n){var i=this,r=void 0!==n.rotateWithView&&n.rotateWithView;return(i=t.call(this,{opacity:1,rotateWithView:r,rotation:void 0!==n.rotation?n.rotation:0,scale:void 0!==n.scale?n.scale:1,displacement:void 0!==n.displacement?n.displacement:[0,0]})||this).Ut=void 0,i.la=null,i.va=void 0!==n.fill?n.fill:null,i.So=[0,0],i.Jt=n.points,i.da=void 0!==n.radius?n.radius:n.radius1,i.pa=n.radius2,i.Kt=void 0!==n.angle?n.angle:0,i.ya=void 0!==n.stroke?n.stroke:null,i.hs=null,i.ma=null,i.render(),i}return kv(n,t),n.prototype.clone=function(){var t=this.getScale(),i=new n({fill:this.getFill()?this.getFill().clone():void 0,points:this.getPoints(),radius:this.getRadius(),radius2:this.getRadius2(),angle:this.getAngle(),stroke:this.getStroke()?this.getStroke().clone():void 0,rotation:this.getRotation(),rotateWithView:this.getRotateWithView(),scale:Array.isArray(t)?t.slice():t,displacement:this.getDisplacement().slice()});return i.setOpacity(this.getOpacity()),i},n.prototype.getAnchor=function(){var t=this.hs;if(!t)return null;var n=this.getDisplacement();return[t[0]/2-n[0],t[1]/2+n[1]]},n.prototype.getAngle=function(){return this.Kt},n.prototype.getFill=function(){return this.va},n.prototype.getHitDetectionImage=function(){return this.la||this.wa(this.ma),this.la},n.prototype.getImage=function(t){var n=this.Ut[t];if(!n){var i=this.ma,r=_o(i.size*t,i.size*t);this.ba(i,r,t),n=r.canvas,this.Ut[t]=n}return n},n.prototype.getPixelRatio=function(t){return t},n.prototype.getImageSize=function(){return this.hs},n.prototype.getImageState=function(){return wo},n.prototype.getOrigin=function(){return this.So},n.prototype.getPoints=function(){return this.Jt},n.prototype.getRadius=function(){return this.da},n.prototype.getRadius2=function(){return this.pa},n.prototype.getSize=function(){return this.hs},n.prototype.getStroke=function(){return this.ya},n.prototype.listenImageChange=function(t){},n.prototype.load=function(){},n.prototype.unlistenImageChange=function(t){},n.prototype.ga=function(t,n,i){if(0===n||this.Jt===1/0||"bevel"!==t&&"miter"!==t)return n;var r=this.da,e=void 0===this.pa?r:this.pa;if(r0,6);var f=void 0!==r.src?yo:wo;return i.Sa=void 0!==r.color?Uo(r.color):null,i.Na=Lv(c,h,void 0!==i.Ia?i.Ia:null,i.Bt,f,i.Sa),i.za=void 0!==r.offset?r.offset:[0,0],i.Fa=void 0!==r.offsetOrigin?r.offsetOrigin:Pv,i.So=null,i.hs=void 0!==r.size?r.size:null,i}return Dv(n,t),n.prototype.clone=function(){var t=this.getScale();return new n({anchor:this.xe.slice(),anchorOrigin:this.Ca,anchorXUnits:this.Ra,anchorYUnits:this.Pa,color:this.Sa&&this.Sa.slice?this.Sa.slice():this.Sa||void 0,crossOrigin:this.Bt,imgSize:this.Ia,offset:this.za.slice(),offsetOrigin:this.Fa,opacity:this.getOpacity(),rotateWithView:this.getRotateWithView(),rotation:this.getRotation(),scale:Array.isArray(t)?t.slice():t,size:null!==this.hs?this.hs.slice():void 0,src:this.getSrc()})},n.prototype.getAnchor=function(){var t=this.Aa;if(!t){t=this.xe;var n=this.getSize();if(this.Ra==Ev||this.Pa==Ev){if(!n)return null;t=this.xe.slice(),this.Ra==Ev&&(t[0]*=n[0]),this.Pa==Ev&&(t[1]*=n[1])}if(this.Ca!=Pv){if(!n)return null;t===this.xe&&(t=this.xe.slice()),this.Ca!=Iv&&this.Ca!=Rv||(t[0]=-t[0]+n[0]),this.Ca!=Cv&&this.Ca!=Rv||(t[1]=-t[1]+n[1])}this.Aa=t}var i=this.getDisplacement();return[t[0]-i[0],t[1]+i[1]]},n.prototype.setAnchor=function(t){this.xe=t,this.Aa=null},n.prototype.getColor=function(){return this.Sa},n.prototype.getImage=function(t){return this.Na.getImage(t)},n.prototype.getPixelRatio=function(t){return this.Na.getPixelRatio(t)},n.prototype.getImageSize=function(){return this.Na.getSize()},n.prototype.getImageState=function(){return this.Na.getImageState()},n.prototype.getHitDetectionImage=function(){return this.Na.getHitDetectionImage()},n.prototype.getOrigin=function(){if(this.So)return this.So;var t=this.za;if(this.Fa!=Pv){var n=this.getSize(),i=this.Na.getSize();if(!n||!i)return null;t=t.slice(),this.Fa!=Iv&&this.Fa!=Rv||(t[0]=i[0]-n[0]-t[0]),this.Fa!=Cv&&this.Fa!=Rv||(t[1]=i[1]-n[1]-t[1])}return this.So=t,this.So},n.prototype.getSrc=function(){return this.Na.getSrc()},n.prototype.getSize=function(){return this.hs?this.hs:this.Na.getSize()},n.prototype.listenImageChange=function(t){this.Na.addEventListener(N,t)},n.prototype.load=function(){this.Na.load()},n.prototype.unlistenImageChange=function(t){this.Na.removeEventListener(N,t)},n}(Sv),qv=function(){function t(t){var n=t||{};this.Sa=void 0!==n.color?n.color:null,this.La=n.lineCap,this.Ga=void 0!==n.lineDash?n.lineDash:null,this.Da=n.lineDashOffset,this.Ua=n.lineJoin,this.qa=n.miterLimit,this.Ba=n.width}return t.prototype.clone=function(){var n=this.getColor();return new t({color:Array.isArray(n)?n.slice():n||void 0,lineCap:this.getLineCap(),lineDash:this.getLineDash()?this.getLineDash().slice():void 0,lineDashOffset:this.getLineDashOffset(),lineJoin:this.getLineJoin(),miterLimit:this.getMiterLimit(),width:this.getWidth()})},t.prototype.getColor=function(){return this.Sa},t.prototype.getLineCap=function(){return this.La},t.prototype.getLineDash=function(){return this.Ga},t.prototype.getLineDashOffset=function(){return this.Da},t.prototype.getLineJoin=function(){return this.Ua},t.prototype.getMiterLimit=function(){return this.qa},t.prototype.getWidth=function(){return this.Ba},t.prototype.setColor=function(t){this.Sa=t},t.prototype.setLineCap=function(t){this.La=t},t.prototype.setLineDash=function(t){this.Ga=t},t.prototype.setLineDashOffset=function(t){this.Da=t},t.prototype.setLineJoin=function(t){this.Ua=t},t.prototype.setMiterLimit=function(t){this.qa=t},t.prototype.setWidth=function(t){this.Ba=t},t}();function Bv(t){return(Bv="function"==typeof Symbol&&"symbol"==typeof Symbol.iterator?function(t){return typeof t}:function(t){return t&&"function"==typeof Symbol&&t.constructor===Symbol&&t!==Symbol.prototype?"symbol":typeof t})(t)}var Wv=function(){function t(t){var n=t||{};this.Zr=null,this.Wa=Kv,void 0!==n.geometry&&this.setGeometry(n.geometry),this.va=void 0!==n.fill?n.fill:null,this.Nt=void 0!==n.image?n.image:null,this.cn=void 0!==n.renderer?n.renderer:null,this.Va=void 0!==n.hitDetectionRenderer?n.hitDetectionRenderer:null,this.ya=void 0!==n.stroke?n.stroke:null,this.eo=void 0!==n.text?n.text:null,this.Xa=n.zIndex}return t.prototype.clone=function(){var n=this.getGeometry();return n&&"object"===Bv(n)&&(n=n.clone()),new t({geometry:n,fill:this.getFill()?this.getFill().clone():void 0,image:this.getImage()?this.getImage().clone():void 0,renderer:this.getRenderer(),stroke:this.getStroke()?this.getStroke().clone():void 0,text:this.getText()?this.getText().clone():void 0,zIndex:this.getZIndex()})},t.prototype.getRenderer=function(){return this.cn},t.prototype.setRenderer=function(t){this.cn=t},t.prototype.setHitDetectionRenderer=function(t){this.Va=t},t.prototype.getHitDetectionRenderer=function(){return this.Va},t.prototype.getGeometry=function(){return this.Zr},t.prototype.getGeometryFunction=function(){return this.Wa},t.prototype.getFill=function(){return this.va},t.prototype.setFill=function(t){this.va=t},t.prototype.getImage=function(){return this.Nt},t.prototype.setImage=function(t){this.Nt=t},t.prototype.getStroke=function(){return this.ya},t.prototype.setStroke=function(t){this.ya=t},t.prototype.getText=function(){return this.eo},t.prototype.setText=function(t){this.eo=t},t.prototype.getZIndex=function(){return this.Xa},t.prototype.setGeometry=function(t){"function"==typeof t?this.Wa=t:"string"==typeof t?this.Wa=function(n){return n.get(t)}:t?void 0!==t&&(this.Wa=function(){return t}):this.Wa=Kv,this.Zr=t},t.prototype.setZIndex=function(t){this.Xa=t},t}();function Vv(t){var n;if("function"==typeof t)n=t;else{var i;if(Array.isArray(t))i=t;else Mt("function"==typeof t.getZIndex,41),i=[t];n=function(){return i}}return n}var Xv=null;function Hv(t,n){if(!Xv){var i=new Tv({color:"rgba(255,255,255,0.4)"}),r=new qv({color:"#3399CC",width:1.25});Xv=[new Wv({image:new Ov({fill:i,stroke:r,radius:5}),fill:i,stroke:r})]}return Xv}function Jv(){var t={},n=[255,255,255,1],i=[0,153,255,1];return t[Pt.POLYGON]=[new Wv({fill:new Tv({color:[255,255,255,.5]})})],t[Pt.MULTI_POLYGON]=t[Pt.POLYGON],t[Pt.LINE_STRING]=[new Wv({stroke:new qv({color:n,width:5})}),new Wv({stroke:new qv({color:i,width:3})})],t[Pt.MULTI_LINE_STRING]=t[Pt.LINE_STRING],t[Pt.CIRCLE]=t[Pt.POLYGON].concat(t[Pt.LINE_STRING]),t[Pt.POINT]=[new Wv({image:new Ov({radius:6,fill:new Tv({color:i}),stroke:new qv({color:n,width:1.5})}),zIndex:1/0})],t[Pt.MULTI_POINT]=t[Pt.POINT],t[Pt.GEOMETRY_COLLECTION]=t[Pt.POLYGON].concat(t[Pt.LINE_STRING],t[Pt.POINT]),t}function Kv(t){return t.getGeometry()}var Yv=Wv,Zv="point",$v="line",Qv=function(){function t(t){var n=t||{};this.Ha=n.font,this.Gr=n.rotation,this.ua=n.rotateWithView,this.ca=n.scale,this.ha=ou(void 0!==n.scale?n.scale:1),this.eo=n.text,this.Ja=n.textAlign,this.Ka=n.textBaseline,this.va=void 0!==n.fill?n.fill:new Tv({color:"#333"}),this.Ya=void 0!==n.maxAngle?n.maxAngle:Math.PI/4,this.Za=void 0!==n.placement?n.placement:Zv,this.$a=!!n.overflow,this.ya=void 0!==n.stroke?n.stroke:null,this.Qa=void 0!==n.offsetX?n.offsetX:0,this.tu=void 0!==n.offsetY?n.offsetY:0,this.nu=n.backgroundFill?n.backgroundFill:null,this.iu=n.backgroundStroke?n.backgroundStroke:null,this.Ei=void 0===n.padding?null:n.padding}return t.prototype.clone=function(){var n=this.getScale();return new t({font:this.getFont(),placement:this.getPlacement(),maxAngle:this.getMaxAngle(),overflow:this.getOverflow(),rotation:this.getRotation(),rotateWithView:this.getRotateWithView(),scale:Array.isArray(n)?n.slice():n,text:this.getText(),textAlign:this.getTextAlign(),textBaseline:this.getTextBaseline(),fill:this.getFill()?this.getFill().clone():void 0,stroke:this.getStroke()?this.getStroke().clone():void 0,offsetX:this.getOffsetX(),offsetY:this.getOffsetY(),backgroundFill:this.getBackgroundFill()?this.getBackgroundFill().clone():void 0,backgroundStroke:this.getBackgroundStroke()?this.getBackgroundStroke().clone():void 0,padding:this.getPadding()||void 0})},t.prototype.getOverflow=function(){return this.$a},t.prototype.getFont=function(){return this.Ha},t.prototype.getMaxAngle=function(){return this.Ya},t.prototype.getPlacement=function(){return this.Za},t.prototype.getOffsetX=function(){return this.Qa},t.prototype.getOffsetY=function(){return this.tu},t.prototype.getFill=function(){return this.va},t.prototype.getRotateWithView=function(){return this.ua},t.prototype.getRotation=function(){return this.Gr},t.prototype.getScale=function(){return this.ca},t.prototype.getScaleArray=function(){return this.ha},t.prototype.getStroke=function(){return this.ya},t.prototype.getText=function(){return this.eo},t.prototype.getTextAlign=function(){return this.Ja},t.prototype.getTextBaseline=function(){return this.Ka},t.prototype.getBackgroundFill=function(){return this.nu},t.prototype.getBackgroundStroke=function(){return this.iu},t.prototype.getPadding=function(){return this.Ei},t.prototype.setOverflow=function(t){this.$a=t},t.prototype.setFont=function(t){this.Ha=t},t.prototype.setMaxAngle=function(t){this.Ya=t},t.prototype.setOffsetX=function(t){this.Qa=t},t.prototype.setOffsetY=function(t){this.tu=t},t.prototype.setPlacement=function(t){this.Za=t},t.prototype.setRotateWithView=function(t){this.ua=t},t.prototype.setFill=function(t){this.va=t},t.prototype.setRotation=function(t){this.Gr=t},t.prototype.setScale=function(t){this.ca=t,this.ha=ou(void 0!==t?t:1)},t.prototype.setStroke=function(t){this.ya=t},t.prototype.setText=function(t){this.eo=t},t.prototype.setTextAlign=function(t){this.Ja=t},t.prototype.setTextBaseline=function(t){this.Ka=t},t.prototype.setBackgroundFill=function(t){this.nu=t},t.prototype.setBackgroundStroke=function(t){this.iu=t},t.prototype.setPadding=function(t){this.Ei=t},t}(),td=function(){function t(t){this.ru,this.eu,this.ou,this.su=void 0===t||t,this.au=0}return t.prototype.insertItem=function(t){var n={prev:void 0,next:void 0,data:t},i=this.ou;if(i){var r=i.next;n.prev=i,n.next=r,i.next=n,r&&(r.prev=n),i===this.eu&&(this.eu=n)}else this.ru=n,this.eu=n,this.su&&(n.next=n,n.prev=n);this.ou=n,this.au++},t.prototype.removeItem=function(){var t=this.ou;if(t){var n=t.next,i=t.prev;n&&(n.prev=i),i&&(i.next=n),this.ou=n||i,this.ru===this.eu?(this.ou=void 0,this.ru=void 0,this.eu=void 0):this.ru===t?this.ru=this.ou:this.eu===t&&(this.eu=i?this.ou.prev:this.ou),this.au--}},t.prototype.firstItem=function(){if(this.ou=this.ru,this.ou)return this.ou.data},t.prototype.lastItem=function(){if(this.ou=this.eu,this.ou)return this.ou.data},t.prototype.nextItem=function(){if(this.ou&&this.ou.next)return this.ou=this.ou.next,this.ou.data},t.prototype.getNextItem=function(){if(this.ou&&this.ou.next)return this.ou.next.data},t.prototype.prevItem=function(){if(this.ou&&this.ou.prev)return this.ou=this.ou.prev,this.ou.data},t.prototype.getPrevItem=function(){if(this.ou&&this.ou.prev)return this.ou.prev.data},t.prototype.getCurrItem=function(){if(this.ou)return this.ou.data},t.prototype.setFirstItem=function(){this.su&&this.ou&&(this.ru=this.ou,this.eu=this.ou.prev)},t.prototype.concat=function(t){if(t.ou){if(this.ou){var n=this.ou.next;this.ou.next=t.ru,t.ru.prev=this.ou,n.prev=t.eu,t.eu.next=n,this.au+=t.au}else this.ou=t.ou,this.ru=t.ru,this.eu=t.eu,this.au=t.au;t.ou=void 0,t.ru=void 0,t.eu=void 0,t.au=0}},t.prototype.getLength=function(){return this.au},t}(),nd=i(72),id=function(){function t(t){this.uu=new nd(t),this.cu={}}return t.prototype.insert=function(t,n){var i={minX:t[0],minY:t[1],maxX:t[2],maxY:t[3],value:n};this.uu.insert(i),this.cu[o(n)]=i},t.prototype.load=function(t,n){for(var i=new Array(n.length),r=0,e=n.length;ri.highWaterMark&&(i.highWaterMark=t)},n.prototype.useTile=function(t,n,i,r){},n}(ud),fd=function(t){function n(n,i){var r=t.call(this,n)||this;return r.tile=i,r}return cd(n,t),n}(f),ld=hd,vd=function(){var t=function(n,i){return(t=Object.setPrototypeOf||{__proto__:[]}instanceof Array&&function(t,n){t.__proto__=n}||function(t,n){for(var i in n)Object.prototype.hasOwnProperty.call(n,i)&&(t[i]=n[i])})(n,i)};return function(n,i){if("function"!=typeof i&&null!==i)throw new TypeError("Class extends value "+String(i)+" is not a constructor or null");function r(){this.constructor=n}t(n,i),n.prototype=null===i?Object.create(i):(r.prototype=i.prototype,new r)}}(),dd=function(t){function n(i){var r=t.call(this,{attributions:i.attributions,cacheSize:i.cacheSize,opaque:i.opaque,projection:i.projection,state:i.state,tileGrid:i.tileGrid,tilePixelRatio:i.tilePixelRatio,wrapX:i.wrapX,transition:i.transition,interpolate:i.interpolate,key:i.key,attributionsCollapsible:i.attributionsCollapsible,zDirection:i.zDirection})||this;return r.mu=r.tileUrlFunction===n.prototype.tileUrlFunction,r.tileLoadFunction=i.tileLoadFunction,i.tileUrlFunction&&(r.tileUrlFunction=i.tileUrlFunction),r.urls=null,i.urls?r.setUrls(i.urls):i.url&&r.setUrl(i.url),r.wu={},r}return vd(n,t),n.prototype.getTileLoadFunction=function(){return this.tileLoadFunction},n.prototype.getTileUrlFunction=function(){return Object.getPrototypeOf(this).tileUrlFunction===this.tileUrlFunction?this.tileUrlFunction.bind(this):this.tileUrlFunction},n.prototype.getUrls=function(){return this.urls},n.prototype.handleTileChange=function(t){var n,i=t.target,r=o(i),e=i.getState();e==vt?(this.wu[r]=!0,n=rd):r in this.wu&&(delete this.wu[r],n=e==pt?od:e==dt?ed:void 0),null!=n&&this.dispatchEvent(new fd(n,i))},n.prototype.setTileLoadFunction=function(t){this.tileCache.clear(),this.tileLoadFunction=t,this.changed()},n.prototype.setTileUrlFunction=function(t,n){this.tileUrlFunction=t,this.tileCache.pruneExceptNewestZ(),void 0!==n?this.setKey(n):this.changed()},n.prototype.setUrl=function(t){var n=ef(t);this.urls=n,this.setUrls(n)},n.prototype.setUrls=function(t){this.urls=t;var n=t.join("\n");this.mu?this.setTileUrlFunction(tf(t,this.tileGrid),n):this.setKey(n)},n.prototype.tileUrlFunction=function(t,n,i){},n.prototype.useTile=function(t,n,i){var r=qc(t,n,i);this.tileCache.containsKey(r)&&this.tileCache.get(r)},n}(ld),pd=function(){var t=function(n,i){return(t=Object.setPrototypeOf||{__proto__:[]}instanceof Array&&function(t,n){t.__proto__=n}||function(t,n){for(var i in n)Object.prototype.hasOwnProperty.call(n,i)&&(t[i]=n[i])})(n,i)};return function(n,i){if("function"!=typeof i&&null!==i)throw new TypeError("Class extends value "+String(i)+" is not a constructor or null");function r(){this.constructor=n}t(n,i),n.prototype=null===i?Object.create(i):(r.prototype=i.prototype,new r)}}();function yd(t,n){t.getImage().src=n}var md=function(t){function n(n){var i=this,r=void 0===n.imageSmoothing||n.imageSmoothing;return void 0!==n.interpolate&&(r=n.interpolate),(i=t.call(this,{attributions:n.attributions,cacheSize:n.cacheSize,opaque:n.opaque,projection:n.projection,state:n.state,tileGrid:n.tileGrid,tileLoadFunction:n.tileLoadFunction?n.tileLoadFunction:yd,tilePixelRatio:n.tilePixelRatio,tileUrlFunction:n.tileUrlFunction,url:n.url,urls:n.urls,wrapX:n.wrapX,transition:n.transition,interpolate:r,key:n.key,attributionsCollapsible:n.attributionsCollapsible,zDirection:n.zDirection})||this).crossOrigin=void 0!==n.crossOrigin?n.crossOrigin:null,i.tileClass=void 0!==n.tileClass?n.tileClass:Io,i.tileCacheForProjection={},i.tileGridForProjection={},i.bu=n.reprojectionErrorThreshold,i.gu=!1,i}return pd(n,t),n.prototype.canExpireCache=function(){if(this.tileCache.canExpireCache())return!0;for(var t in this.tileCacheForProjection)if(this.tileCacheForProjection[t].canExpireCache())return!0;return!1},n.prototype.expireCache=function(t,n){var i=this.getTileCacheForProjection(t);for(var r in this.tileCache.expireCache(this.tileCache==i?n:{}),this.tileCacheForProjection){var e=this.tileCacheForProjection[r];e.expireCache(e==i?n:{})}},n.prototype.getGutterForProjection=function(t){return this.getProjection()&&t&&!Or(this.getProjection(),t)?0:this.getGutter()},n.prototype.getGutter=function(){return 0},n.prototype.getKey=function(){var n=t.prototype.getKey.call(this);return this.getInterpolate()||(n+=":disable-interpolation"),n},n.prototype.getOpaque=function(n){return!(this.getProjection()&&n&&!Or(this.getProjection(),n))&&t.prototype.getOpaque.call(this,n)},n.prototype.getTileGridForProjection=function(t){var n=this.getProjection();if(!this.tileGrid||n&&!Or(n,t)){var i=o(t);return i in this.tileGridForProjection||(this.tileGridForProjection[i]=Xh(t)),this.tileGridForProjection[i]}return this.tileGrid},n.prototype.getTileCacheForProjection=function(t){var n=this.getProjection();if(!n||Or(n,t))return this.tileCache;var i=o(t);return i in this.tileCacheForProjection||(this.tileCacheForProjection[i]=new Kc(this.tileCache.highWaterMark)),this.tileCacheForProjection[i]},n.prototype.xu=function(t,n,i,r,e,o){var s=[t,n,i],a=this.getTileCoordForTileUrlFunction(s,e),u=a?this.tileUrlFunction(a,r,e):void 0,c=new this.tileClass(s,void 0!==u?lt:yt,void 0!==u?u:"",this.crossOrigin,this.tileLoadFunction,this.tileOptions);return c.key=o,c.addEventListener(N,this.handleTileChange.bind(this)),c},n.prototype.getTile=function(t,n,i,r,e){var o=this.getProjection();if(o&&e&&!Or(o,e)){var s=this.getTileCacheForProjection(e),a=[t,n,i],u=void 0,c=Bc(a);s.containsKey(c)&&(u=s.get(c));var h=this.getKey();if(u&&u.key==h)return u;var f=this.getTileGridForProjection(o),l=this.getTileGridForProjection(e),v=this.getTileCoordForTileUrlFunction(a,e),d=new dl(o,f,e,l,a,v,this.getTilePixelRatio(r),this.getGutter(),function(t,n,i,r){return this.getTileInternal(t,n,i,r,o)}.bind(this),this.bu,this.gu,this.getInterpolate());return d.key=h,u?(d.interimTile=u,d.refreshInterimChain(),s.replace(c,d)):s.set(c,d),d}return this.getTileInternal(t,n,i,r,o||e)},n.prototype.getTileInternal=function(t,n,i,r,e){var o=null,s=qc(t,n,i),a=this.getKey();if(this.tileCache.containsKey(s)){if((o=this.tileCache.get(s)).key!=a){var u=o;o=this.xu(t,n,i,r,e,a),u.getState()==lt?o.interimTile=u.interimTile:o.interimTile=u,o.refreshInterimChain(),this.tileCache.replace(s,o)}}else o=this.xu(t,n,i,r,e,a),this.tileCache.set(s,o);return o},n.prototype.setRenderReprojectionEdges=function(t){if(this.gu!=t){for(var n in this.gu=t,this.tileCacheForProjection)this.tileCacheForProjection[n].clear();this.changed()}},n.prototype.setTileGridForProjection=function(t,n){var i=br(t);if(i){var r=o(i);r in this.tileGridForProjection||(this.tileGridForProjection[r]=n)}},n}(dd),wd=function(){var t=function(n,i){return(t=Object.setPrototypeOf||{__proto__:[]}instanceof Array&&function(t,n){t.__proto__=n}||function(t,n){for(var i in n)Object.prototype.hasOwnProperty.call(n,i)&&(t[i]=n[i])})(n,i)};return function(n,i){if("function"!=typeof i&&null!==i)throw new TypeError("Class extends value "+String(i)+" is not a constructor or null");function r(){this.constructor=n}t(n,i),n.prototype=null===i?Object.create(i):(r.prototype=i.prototype,new r)}}();function bd(t){var n,i,r=t[0],e=new Array(r),o=1<>=1;return e.join("")}for(var gd=function(t){function n(n){var i=this,r=void 0!==n.hidpi&&n.hidpi,e=void 0===n.imageSmoothing||n.imageSmoothing;return void 0!==n.interpolate&&(e=n.interpolate),(i=t.call(this,{cacheSize:n.cacheSize,crossOrigin:"anonymous",interpolate:e,opaque:!0,projection:br("EPSG:3857"),reprojectionErrorThreshold:n.reprojectionErrorThreshold,state:ds,tileLoadFunction:n.tileLoadFunction,tilePixelRatio:r?2:1,wrapX:void 0===n.wrapX||n.wrapX,transition:n.transition,zDirection:n.zDirection})||this).ju=r,i.Su=void 0!==n.culture?n.culture:"en-us",i.ku=void 0!==n.maxZoom?n.maxZoom:-1,i.Mu=n.key,i._u=n.imagerySet,dh("https://dev.virtualearth.net/REST/v1/Imagery/Metadata/"+i._u+"?uriScheme=https&include=ImageryProviders&key="+i.Mu+"&c="+i.Su,i.handleImageryMetadataResponse.bind(i),void 0,"jsonp"),i}return wd(n,t),n.prototype.getApiKey=function(){return this.Mu},n.prototype.getImagerySet=function(){return this._u},n.prototype.handleImageryMetadataResponse=function(t){if(200==t.statusCode&&"OK"==t.statusDescription&&"ValidCredentials"==t.authenticationResultCode&&1==t.resourceSets.length&&1==t.resourceSets[0].resources.length){var n=t.resourceSets[0].resources[0],i=-1==this.ku?n.zoomMax:this.ku,r=$h(this.getProjection()),e=this.ju?2:1,o=n.imageWidth==n.imageHeight?n.imageWidth/e:[n.imageWidth/e,n.imageHeight/e],s=Kh({extent:r,minZoom:n.zoomMin,maxZoom:i,tileSize:o});this.tileGrid=s;var a=this.Su,u=this.ju;if(this.tileUrlFunction=nf(n.imageUrlSubdomains.map((function(t){var i=[0,0,0],r=n.imageUrl.replace("{subdomain}",t).replace("{culture}",a);return function(t,n,e){if(t){Uc(t[0],t[1],t[2],i);var o=r;return u&&(o+="&dpi=d1&device=mobile"),o.replace("{quadkey}",bd(i))}}}))),n.imageryProviders){var c=Tr(br("EPSG:4326"),this.getProjection());this.setAttributions(function(t){var i=[],r=t.viewState,e=this.getTileGrid(),o=e.getZForResolution(r.resolution,this.zDirection),s=e.getTileCoordForCoordAndZ(r.center,o)[0];return n.imageryProviders.map((function(n){for(var r=!1,e=n.coverageAreas,o=0,a=e.length;o=u.zoomMin&&s<=u.zoomMax){var h=u.bbox;if(ti(oi([h[1],h[0],h[3],h[2]],c),t.extent)){r=!0;break}}}r&&i.push(n.attribution)})),i.push('
Terms of Use'),i}.bind(this))}this.setState(ps)}else this.setState(ys)},n}(md),xd=function(){var t=function(n,i){return(t=Object.setPrototypeOf||{__proto__:[]}instanceof Array&&function(t,n){t.__proto__=n}||function(t,n){for(var i in n)Object.prototype.hasOwnProperty.call(n,i)&&(t[i]=n[i])})(n,i)};return function(n,i){if("function"!=typeof i&&null!==i)throw new TypeError("Class extends value "+String(i)+" is not a constructor or null");function r(){this.constructor=n}t(n,i),n.prototype=null===i?Object.create(i):(r.prototype=i.prototype,new r)}}(),jd=function(t){function n(n){var i=n||{},r=void 0===i.imageSmoothing||i.imageSmoothing;void 0!==i.interpolate&&(r=i.interpolate);var e=void 0!==i.projection?i.projection:"EPSG:3857",o=void 0!==i.tileGrid?i.tileGrid:Kh({extent:$h(e),maxResolution:i.maxResolution,maxZoom:i.maxZoom,minZoom:i.minZoom,tileSize:i.tileSize});return t.call(this,{attributions:i.attributions,cacheSize:i.cacheSize,crossOrigin:i.crossOrigin,interpolate:r,opaque:i.opaque,projection:e,reprojectionErrorThreshold:i.reprojectionErrorThreshold,tileGrid:o,tileLoadFunction:i.tileLoadFunction,tilePixelRatio:i.tilePixelRatio,tileUrlFunction:i.tileUrlFunction,url:i.url,urls:i.urls,wrapX:void 0===i.wrapX||i.wrapX,transition:i.transition,attributionsCollapsible:i.attributionsCollapsible,zDirection:i.zDirection})||this}return xd(n,t),n}(md),Sd=function(){var t=function(n,i){return(t=Object.setPrototypeOf||{__proto__:[]}instanceof Array&&function(t,n){t.__proto__=n}||function(t,n){for(var i in n)Object.prototype.hasOwnProperty.call(n,i)&&(t[i]=n[i])})(n,i)};return function(n,i){if("function"!=typeof i&&null!==i)throw new TypeError("Class extends value "+String(i)+" is not a constructor or null");function r(){this.constructor=n}t(n,i),n.prototype=null===i?Object.create(i):(r.prototype=i.prototype,new r)}}(),kd=function(t){function n(n){var i=t.call(this,{attributions:n.attributions,cacheSize:n.cacheSize,crossOrigin:n.crossOrigin,maxZoom:void 0!==n.maxZoom?n.maxZoom:18,minZoom:n.minZoom,projection:n.projection,transition:n.transition,wrapX:n.wrapX,zDirection:n.zDirection})||this;return i.Ou=n.account,i.Tu=n.map||"",i.Eu=n.config||{},i.Au={},i.Cu(),i}return Sd(n,t),n.prototype.getConfig=function(){return this.Eu},n.prototype.updateConfig=function(t){E(this.Eu,t),this.Cu()},n.prototype.setConfig=function(t){this.Eu=t||{},this.Cu()},n.prototype.Cu=function(){var t=JSON.stringify(this.Eu);if(this.Au[t])this.Ru(this.Au[t]);else{var n="https://"+this.Ou+".carto.com/api/v1/map";this.Tu&&(n+="/named/"+this.Tu);var i=new XMLHttpRequest;i.addEventListener("load",this.Pu.bind(this,t)),i.addEventListener("error",this.Iu.bind(this)),i.open("POST",n),i.setRequestHeader("Content-type","application/json"),i.send(JSON.stringify(this.Eu))}},n.prototype.Pu=function(t,n){var i=n.target;if(!i.status||i.status>=200&&i.status<300){var r=void 0;try{r=JSON.parse(i.responseText)}catch(t){return void this.setState(ys)}this.Ru(r),this.Au[t]=r,this.setState(ps)}else this.setState(ys)},n.prototype.Iu=function(t){this.setState(ys)},n.prototype.Ru=function(t){var n="https://"+t.cdn_url.https+"/"+this.Ou+"/api/v1/map/"+t.layergroupid+"/{z}/{x}/{y}.png";this.setUrl(n)},n}(jd),Md="addfeature",_d="changefeature",Od="clear",Td="removefeature",Ed="featuresloadstart",Ad="featuresloadend",Cd="featuresloaderror",Rd=function(){var t=function(n,i){return(t=Object.setPrototypeOf||{__proto__:[]}instanceof Array&&function(t,n){t.__proto__=n}||function(t,n){for(var i in n)Object.prototype.hasOwnProperty.call(n,i)&&(t[i]=n[i])})(n,i)};return function(n,i){if("function"!=typeof i&&null!==i)throw new TypeError("Class extends value "+String(i)+" is not a constructor or null");function r(){this.constructor=n}t(n,i),n.prototype=null===i?Object.create(i):(r.prototype=i.prototype,new r)}}(),Pd=function(t){function n(n,i,r){var e=t.call(this,n)||this;return e.feature=i,e.features=r,e}return Rd(n,t),n}(f),Id=function(t){function n(n){var i=this,r=n||{};(i=t.call(this,{attributions:r.attributions,interpolate:!0,projection:void 0,state:ps,wrapX:void 0===r.wrapX||r.wrapX})||this).on,i.once,i.un,i.q=_,i.ze=r.format,i.Nu=void 0===r.overlaps||r.overlaps,i.Le=r.url,void 0!==r.loader?i.q=r.loader:void 0!==i.Le&&(Mt(i.ze,7),i.q=fh(i.Le,i.ze)),i.zu=void 0!==r.strategy?r.strategy:lh;var e,o,s=void 0===r.useSpatialIndex||r.useSpatialIndex;return i.Fu=s?new id:null,i.Lu=new id,i.Gu=0,i.Du={},i.Uu={},i.qu={},i.Bu={},i.Wu=null,Array.isArray(r.features)?o=r.features:r.features&&(o=(e=r.features).getArray()),s||void 0!==e||(e=new ft(o)),void 0!==o&&i.addFeaturesInternal(o),void 0!==e&&i.Vu(e),i}return Rd(n,t),n.prototype.addFeature=function(t){this.addFeatureInternal(t),this.changed()},n.prototype.addFeatureInternal=function(t){var n=o(t);if(this.Xu(n,t)){this.Hu(n,t);var i=t.getGeometry();if(i){var r=i.getExtent();this.Fu&&this.Fu.insert(r,t)}else this.Du[n]=t;this.dispatchEvent(new Pd(Md,t))}else this.Wu&&this.Wu.remove(t)},n.prototype.Hu=function(t,n){this.Bu[t]=[Y(n,N,this.Ju,this),Y(n,l,this.Ju,this)]},n.prototype.Xu=function(t,n){var i=!0,r=n.getId();return void 0!==r&&(r.toString()in this.Uu?i=!1:this.Uu[r.toString()]=n),i&&(Mt(!(t in this.qu),30),this.qu[t]=n),i},n.prototype.addFeatures=function(t){this.addFeaturesInternal(t),this.changed()},n.prototype.addFeaturesInternal=function(t){for(var n=[],i=[],r=[],e=0,s=t.length;e0},n.prototype.refresh=function(){this.clear(!0),this.Lu.clear(),t.prototype.refresh.call(this)},n.prototype.removeLoadedExtent=function(t){var n,i=this.Lu;i.forEachInExtent(t,(function(i){if(In(i.extent,t))return n=i,!0})),n&&i.remove(n)},n.prototype.removeFeature=function(t){if(t){var n=o(t);n in this.Du?delete this.Du[n]:this.Fu&&this.Fu.remove(t),this.removeFeatureInternal(t)&&this.changed()}},n.prototype.removeFeatureInternal=function(t){var n=o(t),i=this.Bu[n];if(i){i.forEach($),delete this.Bu[n];var r=t.getId();return void 0!==r&&delete this.Uu[r.toString()],delete this.qu[n],this.dispatchEvent(new Pd(Td,t)),t}},n.prototype.Ku=function(t){var n=!1;for(var i in this.Uu)if(this.Uu[i]===t){delete this.Uu[i],n=!0;break}return n},n.prototype.setLoader=function(t){this.q=t},n.prototype.setUrl=function(t){Mt(this.ze,7),this.Le=t,this.setLoader(fh(t,this.ze))},n}(ud),Nd=function(){var t=function(n,i){return(t=Object.setPrototypeOf||{__proto__:[]}instanceof Array&&function(t,n){t.__proto__=n}||function(t,n){for(var i in n)Object.prototype.hasOwnProperty.call(n,i)&&(t[i]=n[i])})(n,i)};return function(n,i){if("function"!=typeof i&&null!==i)throw new TypeError("Class extends value "+String(i)+" is not a constructor or null");function r(){this.constructor=n}t(n,i),n.prototype=null===i?Object.create(i):(r.prototype=i.prototype,new r)}}(),zd=function(t){function n(n){var i=t.call(this,{attributions:n.attributions,wrapX:n.wrapX})||this;return i.resolution=void 0,i.distance=void 0!==n.distance?n.distance:20,i.minDistance=n.minDistance||0,i.interpolationRatio=0,i.features=[],i.geometryFunction=n.geometryFunction||function(t){var n=t.getGeometry();return Mt(n.getType()==Pt.POINT,10),n},i.Yu=n.createCluster,i.source=null,i.Zu=i.refresh.bind(i),i.updateDistance(i.distance,i.minDistance),i.setSource(n.source||null),i}return Nd(n,t),n.prototype.clear=function(n){this.features.length=0,t.prototype.clear.call(this,n)},n.prototype.getDistance=function(){return this.distance},n.prototype.getSource=function(){return this.source},n.prototype.loadFeatures=function(t,n,i){this.source.loadFeatures(t,n,i),n!==this.resolution&&(this.resolution=n,this.refresh())},n.prototype.setDistance=function(t){this.updateDistance(t,this.minDistance)},n.prototype.setMinDistance=function(t){this.updateDistance(this.distance,t)},n.prototype.getMinDistance=function(){return this.minDistance},n.prototype.setSource=function(t){this.source&&this.source.removeEventListener(N,this.Zu),this.source=t,t&&t.addEventListener(N,this.Zu),this.refresh()},n.prototype.refresh=function(){this.clear(),this.cluster(),this.addFeatures(this.features)},n.prototype.updateDistance=function(t,n){var i=0===t?0:Math.min(n,t)/t,r=t!==this.distance||this.interpolationRatio!==i;this.distance=t,this.minDistance=n,this.interpolationRatio=i,r&&this.refresh()},n.prototype.cluster=function(){if(void 0!==this.resolution&&this.source)for(var t=[1/0,1/0,-1/0,-1/0],n=this.distance*this.resolution,i=this.source.getFeatures(),r={},e=0,s=i.length;e=0;--r){var e=this.geometryFunction(t[r]);e?Ji(i,e.getCoordinates()):t.splice(r,1)}nr(i,1/t.length);var o=Xn(n),s=this.interpolationRatio,a=new Oe([i[0]*(1-s)+o[0]*s,i[1]*(1-s)+o[1]*s]);return this.Yu?this.Yu(a,t):new Tt({geometry:a,features:t})},n}(Id),Fd=function(){var t=function(n,i){return(t=Object.setPrototypeOf||{__proto__:[]}instanceof Array&&function(t,n){t.__proto__=n}||function(t,n){for(var i in n)Object.prototype.hasOwnProperty.call(n,i)&&(t[i]=n[i])})(n,i)};return function(n,i){if("function"!=typeof i&&null!==i)throw new TypeError("Class extends value "+String(i)+" is not a constructor or null");function r(){this.constructor=n}t(n,i),n.prototype=null===i?Object.create(i):(r.prototype=i.prototype,new r)}}(),Ld=function(t){function n(n){var i=this,r=void 0===n.projection?"EPSG:3857":n.projection,e=n.tileGrid;return void 0===e&&r&&(e=Kh({extent:$h(r),maxResolution:n.maxResolution,maxZoom:n.maxZoom,minZoom:n.minZoom,tileSize:n.tileSize})),(i=t.call(this,{cacheSize:.1,attributions:n.attributions,attributionsCollapsible:n.attributionsCollapsible,projection:r,tileGrid:e,opaque:n.opaque,state:n.state,tilePixelRatio:n.tilePixelRatio,wrapX:n.wrapX,transition:n.transition,interpolate:n.interpolate})||this).wu={},i.q=n.loader,i.cr=i.cr.bind(i),i.bandCount=void 0===n.bandCount?4:n.bandCount,i}return Fd(n,t),n.prototype.setLoader=function(t){this.q=t},n.prototype.getTile=function(t,n,i,r,e){var o=qc(t,n,i);if(this.tileCache.containsKey(o))return this.tileCache.get(o);var s=this.q;var a=new kt(E({tileCoord:[t,n,i],loader:function(){return T((function(){return s(t,n,i)}))}},this.tileOptions));return a.key=this.getKey(),a.addEventListener(N,this.cr),this.tileCache.set(o,a),a},n.prototype.cr=function(t){var n,i=t.target,r=o(i),e=i.getState();e==vt?(this.wu[r]=!0,n=rd):r in this.wu&&(delete this.wu[r],n=e==pt?od:e==dt?ed:void 0),n&&this.dispatchEvent(new fd(n,i))},n}(ld),Gd=new ArrayBuffer(4),Dd=new Float32Array(Gd),Ud=new Uint32Array(Gd),qd=new Uint32Array(512),Bd=new Uint32Array(512),Wd=0;Wd<256;++Wd){var Vd=Wd-127;Vd<-27?(qd[Wd]=0,qd[256|Wd]=32768,Bd[Wd]=24,Bd[256|Wd]=24):Vd<-14?(qd[Wd]=1024>>-Vd-14,qd[256|Wd]=1024>>-Vd-14|32768,Bd[Wd]=-Vd-1,Bd[256|Wd]=-Vd-1):Vd<=15?(qd[Wd]=Vd+15<<10,qd[256|Wd]=Vd+15<<10|32768,Bd[Wd]=13,Bd[256|Wd]=13):Vd<128?(qd[Wd]=31744,qd[256|Wd]=64512,Bd[Wd]=24,Bd[256|Wd]=24):(qd[Wd]=31744,qd[256|Wd]=64512,Bd[Wd]=13,Bd[256|Wd]=13)}var Xd=new Uint32Array(2048),Hd=new Uint32Array(64),Jd=new Uint32Array(64);Xd[0]=0;for(var Kd=1;Kd<1024;++Kd){for(var Yd=Kd<<13,Zd=0;0==(8388608&Yd);)Zd-=8388608,Yd<<=1;Yd&=-8388609,Zd+=947912704,Xd[Kd]=Yd|Zd}for(var $d=1024;$d<2048;++$d)Xd[$d]=939524096+($d-1024<<13);Hd[0]=0;for(var Qd=1;Qd<31;++Qd)Hd[Qd]=Qd<<23;Hd[31]=1199570944,Hd[32]=2147483648;for(var tp=33;tp<63;++tp)Hd[tp]=2147483648+(tp-32<<23);Hd[63]=3347054592,Jd[0]=0;for(var np=1;np<64;++np)Jd[np]=32===np?0:1024;function ip(t){var n=t>>10;return Ud[0]=Xd[Jd[n]+(1023&t)]+Hd[n],Dd[0]}var rp=Reflect.getPrototypeOf(Uint8Array).prototype,ep=Reflect.getOwnPropertyDescriptor(rp,Symbol.toStringTag).get;function op(t){return void 0!==ep.call(t)}var sp=Object.prototype.toString;function ap(t){return!!ArrayBuffer.isView(t)&&(!op(t)&&"[object DataView]"===sp.call(t))}function up(t,n){if(!ap(t))throw new TypeError("First argument to getFloat16 function must be a DataView");for(var i=arguments.length,r=new Array(i>2?i-2:0),e=2;e>24)/500+s,u=s-(t[e+2]<<24>>24)/200,c=void 0,h=void 0,f=void 0;h=-.9689*(a=.95047*(a*a*a>.008856?a*a*a:(a-16/116)/7.787))+1.8758*(s=1*(s*s*s>.008856?s*s*s:(s-16/116)/7.787))+.0415*(u=1.08883*(u*u*u>.008856?u*u*u:(u-16/116)/7.787)),f=.0557*a+-.204*s+1.057*u,c=(c=3.2406*a+-1.5372*s+-.4986*u)>.0031308?1.055*Math.pow(c,1/2.4)-.055:12.92*c,h=h>.0031308?1.055*Math.pow(h,1/2.4)-.055:12.92*h,f=f>.0031308?1.055*Math.pow(f,1/2.4)-.055:12.92*f,r[o]=255*Math.max(0,Math.min(1,c)),r[o+1]=255*Math.max(0,Math.min(1,h)),r[o+2]=255*Math.max(0,Math.min(1,f))}return r}function wp(t,n,i,r,e,o,s){try{var a=t[o](s),u=a.value}catch(t){return void i(t)}a.done?n(u):Promise.resolve(u).then(r,e)}function bp(t){return function(){var n=this,i=arguments;return new Promise((function(r,e){var o=t.apply(n,i);function s(t){wp(o,r,e,s,a,"next",t)}function a(t){wp(o,r,e,s,a,"throw",t)}s(void 0)}))}}var gp=new Map;function xp(t,n){Array.isArray(t)||(t=[t]),t.forEach((function(t){return gp.set(t,n)}))}function jp(t){return Sp.apply(this,arguments)}function Sp(){return(Sp=bp(regeneratorRuntime.mark((function t(n){var i,r;return regeneratorRuntime.wrap((function(t){for(;;)switch(t.prev=t.next){case 0:if(i=gp.get(n.Compression)){t.next=3;break}throw new Error("Unknown compression method identifier: ".concat(n.Compression));case 3:return t.next=5,i();case 5:return r=t.sent,t.abrupt("return",new r(n));case 7:case"end":return t.stop()}}),t)})))).apply(this,arguments)}function kp(t,n,i){var r=arguments.length>3&&void 0!==arguments[3]?arguments[3]:1;return new(Object.getPrototypeOf(t).constructor)(n*i*r)}function Mp(t,n,i,r,e){var o=n/r,s=i/e;return t.map((function(t){for(var a=kp(t,r,e),u=0;u5&&void 0!==arguments[5]?arguments[5]:"nearest";switch(o.toLowerCase()){case"nearest":return Mp(t,n,i,r,e);case"bilinear":case"linear":return Op(t,n,i,r,e);default:throw new Error("Unsupported resampling method: '".concat(o,"'"))}}function Ep(t,n,i,r,e,o){for(var s=n/r,a=i/e,u=kp(t,r,e,o),c=0;c6&&void 0!==arguments[6]?arguments[6]:"nearest";switch(s.toLowerCase()){case"nearest":return Ep(t,n,i,r,e,o);case"bilinear":case"linear":return Ap(t,n,i,r,e,o);default:throw new Error("Unsupported resampling method: '".concat(s,"'"))}}function Rp(t,n){return function(t){if(Array.isArray(t))return t}(t)||function(t,n){var i=null==t?null:"undefined"!=typeof Symbol&&t[Symbol.iterator]||t["@@iterator"];if(null==i)return;var r,e,o=[],s=!0,a=!1;try{for(i=i.call(t);!(s=(r=i.next()).done)&&(o.push(r.value),!n||o.length!==n);s=!0);}catch(t){a=!0,e=t}finally{try{s||null==i.return||i.return()}finally{if(a)throw e}}return o}(t,n)||function(t,n){if(!t)return;if("string"==typeof t)return Pp(t,n);var i=Object.prototype.toString.call(t).slice(8,-1);"Object"===i&&t.constructor&&(i=t.constructor.name);if("Map"===i||"Set"===i)return Array.from(t);if("Arguments"===i||/^(?:Ui|I)nt(?:8|16|32)(?:Clamped)?Array$/.test(i))return Pp(t,n)}(t,n)||function(){throw new TypeError("Invalid attempt to destructure non-iterable instance.\nIn order to be iterable, non-array objects must have a [Symbol.iterator]() method.")}()}function Pp(t,n){(null==n||n>t.length)&&(n=t.length);for(var i=0,r=new Array(n);i>8-e-g&h;else if(g+e<=16)c[w]=a.getUint16(b)>>16-e-g&h;else if(g+e<=24){var x=a.getUint16(b)<<8|a.getUint8(b+2);c[w]=x>>24-e-g&h}else c[w]=a.getUint32(b)>>32-e-g&h}}return c.buffer}xp([void 0,1],(function(){return i.e(226).then(i.bind(i,966)).then((function(t){return t.default}))})),xp(5,(function(){return i.e(611).then(i.bind(i,611)).then((function(t){return t.default}))})),xp(6,(function(){throw new Error("old style JPEG compression is not supported.")})),xp(7,(function(){return i.e(382).then(i.bind(i,382)).then((function(t){return t.default}))})),xp([8,32946],(function(){return Promise.all([i.e(247),i.e(356)]).then(i.bind(i,356)).then((function(t){return t.default}))})),xp(32773,(function(){return i.e(395).then(i.bind(i,395)).then((function(t){return t.default}))})),xp(34887,(function(){return Promise.all([i.e(247),i.e(54)]).then(i.bind(i,54)).then((function(t){return t.default}))})),xp(50001,(function(){return i.e(629).then(i.bind(i,629)).then((function(t){return t.default}))}));var Up=function(){function t(n,i,r,e,o,s){!function(t,n){if(!(t instanceof n))throw new TypeError("Cannot call a class as a function")}(this,t),this.fileDirectory=n,this.geoKeys=i,this.dataView=r,this.littleEndian=e,this.tiles=o?{}:null,this.isTiled=!n.StripOffsets;var a=n.PlanarConfiguration;if(this.planarConfiguration=void 0===a?1:a,1!==this.planarConfiguration&&2!==this.planarConfiguration)throw new Error("Invalid planar configuration.");this.source=s}var n,i,r,e,o,s,a;return n=t,(i=[{key:"getFileDirectory",value:function(){return this.fileDirectory}},{key:"getGeoKeys",value:function(){return this.geoKeys}},{key:"getWidth",value:function(){return this.fileDirectory.ImageWidth}},{key:"getHeight",value:function(){return this.fileDirectory.ImageLength}},{key:"getSamplesPerPixel",value:function(){return void 0!==this.fileDirectory.SamplesPerPixel?this.fileDirectory.SamplesPerPixel:1}},{key:"getTileWidth",value:function(){return this.isTiled?this.fileDirectory.TileWidth:this.getWidth()}},{key:"getTileHeight",value:function(){return this.isTiled?this.fileDirectory.TileLength:void 0!==this.fileDirectory.RowsPerStrip?Math.min(this.fileDirectory.RowsPerStrip,this.getHeight()):this.getHeight()}},{key:"getBlockWidth",value:function(){return this.getTileWidth()}},{key:"getBlockHeight",value:function(t){return this.isTiled||(t+1)*this.getTileHeight()<=this.getHeight()?this.getTileHeight():this.getHeight()-t*this.getTileHeight()}},{key:"getBytesPerPixel",value:function(){for(var t=0,n=0;n=this.fileDirectory.BitsPerSample.length)throw new RangeError("Sample index ".concat(t," is out of range."));return Math.ceil(this.fileDirectory.BitsPerSample[t]/8)}},{key:"getReaderForSample",value:function(t){var n=this.fileDirectory.SampleFormat?this.fileDirectory.SampleFormat[t]:1,i=this.fileDirectory.BitsPerSample[t];switch(n){case 1:if(i<=8)return DataView.prototype.getUint8;if(i<=16)return DataView.prototype.getUint16;if(i<=32)return DataView.prototype.getUint32;break;case 2:if(i<=8)return DataView.prototype.getInt8;if(i<=16)return DataView.prototype.getInt16;if(i<=32)return DataView.prototype.getInt32;break;case 3:switch(i){case 16:return function(t,n){return up(this,t,n)};case 32:return DataView.prototype.getFloat32;case 64:return DataView.prototype.getFloat64}}throw Error("Unsupported data format/bitsPerSample")}},{key:"getSampleFormat",value:function(){var t=arguments.length>0&&void 0!==arguments[0]?arguments[0]:0;return this.fileDirectory.SampleFormat?this.fileDirectory.SampleFormat[t]:1}},{key:"getBitsPerSample",value:function(){var t=arguments.length>0&&void 0!==arguments[0]?arguments[0]:0;return this.fileDirectory.BitsPerSample[t]}},{key:"getArrayForSample",value:function(t,n){return Lp(this.getSampleFormat(t),this.getBitsPerSample(t),n)}},{key:"getTileOrStrip",value:(a=Np(regeneratorRuntime.mark((function t(n,i,r,e,o){var s,a,u,c,h,f,l,v,d=this;return regeneratorRuntime.wrap((function(t){for(;;)switch(t.prev=t.next){case 0:return s=Math.ceil(this.getWidth()/this.getTileWidth()),a=Math.ceil(this.getHeight()/this.getTileHeight()),c=this.tiles,1===this.planarConfiguration?u=i*s+n:2===this.planarConfiguration&&(u=r*s*a+i*s+n),this.isTiled?(h=this.fileDirectory.TileOffsets[u],f=this.fileDirectory.TileByteCounts[u]):(h=this.fileDirectory.StripOffsets[u],f=this.fileDirectory.StripByteCounts[u]),t.next=7,this.source.fetch([{offset:h,length:f}],o);case 7:return l=t.sent[0],null!==c&&c[u]?v=c[u]:(v=Np(regeneratorRuntime.mark((function t(){var n,r,o;return regeneratorRuntime.wrap((function(t){for(;;)switch(t.prev=t.next){case 0:return t.next=2,e.decode(d.fileDirectory,l);case 2:return n=t.sent,r=d.getSampleFormat(),o=d.getBitsPerSample(),Gp(r,o)&&(n=Dp(n,r,d.planarConfiguration,d.getSamplesPerPixel(),o,d.getTileWidth(),d.getBlockHeight(i))),t.abrupt("return",n);case 7:case"end":return t.stop()}}),t)})))(),null!==c&&(c[u]=v)),t.t0=n,t.t1=i,t.t2=r,t.next=14,v;case 14:return t.t3=t.sent,t.abrupt("return",{x:t.t0,y:t.t1,sample:t.t2,data:t.t3});case 16:case"end":return t.stop()}}),t,this)}))),function(t,n,i,r,e){return a.apply(this,arguments)})},{key:"_readRaster",value:(s=Np(regeneratorRuntime.mark((function t(n,i,r,e,o,s,a,u,c){var h,f,l,v,d,p,y,m,w,b,g,x,j,S,k,M,_,O,T,E,A=this;return regeneratorRuntime.wrap((function(t){for(;;)switch(t.prev=t.next){case 0:for(h=this.getTileWidth(),f=this.getTileHeight(),l=this.getWidth(),v=this.getHeight(),d=Math.max(Math.floor(n[0]/h),0),p=Math.min(Math.ceil(n[2]/h),Math.ceil(l/h)),y=Math.max(Math.floor(n[1]/f),0),m=Math.min(Math.ceil(n[3]/f),Math.ceil(v/f)),w=n[2]-n[0],b=this.getBytesPerPixel(),g=[],x=[],j=0;j0&&void 0!==O[0]?O[0]:{},i=n.window,r=n.samples,e=void 0===r?[]:r,o=n.interleave,s=n.pool,a=void 0===s?null:s,u=n.width,c=n.height,h=n.resampleMethod,f=n.fillValue,l=n.signal,!((v=i||[0,0,this.getWidth(),this.getHeight()])[0]>v[2]||v[1]>v[3])){t.next=4;break}throw new Error("Invalid subsets");case 4:if(d=v[2]-v[0],p=v[3]-v[1],y=d*p,m=this.getSamplesPerPixel(),e&&e.length){t.next=12;break}for(w=0;w=m)){t.next=16;break}return t.abrupt("return",Promise.reject(new RangeError("Invalid sample index '".concat(e[b],"'."))));case 16:++b,t.next=13;break;case 19:if(o)x=this.fileDirectory.SampleFormat?Math.max.apply(null,this.fileDirectory.SampleFormat):1,j=Math.max.apply(null,this.fileDirectory.BitsPerSample),g=Lp(x,j,y*e.length),f&&g.fill(f);else for(g=[],S=0;S0&&void 0!==T[0]?T[0]:{},i=n.window,r=n.interleave,e=void 0===r||r,o=n.pool,s=void 0===o?null:o,a=n.width,u=n.height,c=n.resampleMethod,h=n.enableAlpha,f=void 0!==h&&h,l=n.signal,!((v=i||[0,0,this.getWidth(),this.getHeight()])[0]>v[2]||v[1]>v[3])){t.next=4;break}throw new Error("Invalid subsets");case 4:if((d=this.fileDirectory.PhotometricInterpretation)!==fp.Ie.RGB){t.next=9;break}if(p=[0,1,2],this.fileDirectory.ExtraSamples!==fp.pd.Unspecified&&f)for(p=[],y=0;y0&&void 0!==arguments[0]?arguments[0]:null,n={};if(!this.fileDirectory.GDAL_METADATA)return null;var i=this.fileDirectory.GDAL_METADATA,r=hp(i,"Item");r=null===t?r.filter((function(t){return void 0===cp(t,"sample")})):r.filter((function(n){return Number(cp(n,"sample"))===t}));for(var e=0;e0&&void 0!==arguments[0]?arguments[0]:null,n=this.fileDirectory.ModelPixelScale,i=this.fileDirectory.ModelTransformation;if(n)return[n[0],-n[1],n[2]];if(i)return[i[0],i[5],i[10]];if(t){var r=t.getResolution(),e=Rp(r,3),o=e[0],s=e[1],a=e[2];return[o*t.getWidth()/this.getWidth(),s*t.getHeight()/this.getHeight(),a*t.getWidth()/this.getWidth()]}throw new Error("The image does not have an affine transformation.")}},{key:"pixelIsArea",value:function(){return 1===this.geoKeys.GTRasterTypeGeoKey}},{key:"getBoundingBox",value:function(){var t=this.getOrigin(),n=this.getResolution(),i=t[0],r=t[1],e=i+n[0]*this.getWidth(),o=r+n[1]*this.getHeight();return[Math.min(i,e),Math.min(r,o),Math.max(i,e),Math.max(r,o)]}}])&&zp(n.prototype,i),r&&zp(n,r),Object.defineProperty(n,"prototype",{writable:!1}),t}();function qp(t,n){for(var i=0;i0,e=!0,o=0;o<8;o++){var s=this._dataView.getUint8(t+(n?o:7-o));r&&(e?0!==s&&(s=255&~(s-1),e=!1):s=255&~s),i+=s*Math.pow(256,o)}return r&&(i=-i),i}},{key:"getUint8",value:function(t,n){return this._dataView.getUint8(t,n)}},{key:"getInt8",value:function(t,n){return this._dataView.getInt8(t,n)}},{key:"getUint16",value:function(t,n){return this._dataView.getUint16(t,n)}},{key:"getInt16",value:function(t,n){return this._dataView.getInt16(t,n)}},{key:"getUint32",value:function(t,n){return this._dataView.getUint32(t,n)}},{key:"getInt32",value:function(t,n){return this._dataView.getInt32(t,n)}},{key:"getFloat16",value:function(t,n){return up(this._dataView,t,n)}},{key:"getFloat32",value:function(t,n){return this._dataView.getFloat32(t,n)}},{key:"getFloat64",value:function(t,n){return this._dataView.getFloat64(t,n)}}])&&qp(n.prototype,i),r&&qp(n,r),Object.defineProperty(n,"prototype",{writable:!1}),t}();function Wp(t,n){for(var i=0;i=t+n}},{key:"readUint8",value:function(t){return this._dataView.getUint8(t-this._sliceOffset,this._littleEndian)}},{key:"readInt8",value:function(t){return this._dataView.getInt8(t-this._sliceOffset,this._littleEndian)}},{key:"readUint16",value:function(t){return this._dataView.getUint16(t-this._sliceOffset,this._littleEndian)}},{key:"readInt16",value:function(t){return this._dataView.getInt16(t-this._sliceOffset,this._littleEndian)}},{key:"readUint32",value:function(t){return this._dataView.getUint32(t-this._sliceOffset,this._littleEndian)}},{key:"readInt32",value:function(t){return this._dataView.getInt32(t-this._sliceOffset,this._littleEndian)}},{key:"readFloat32",value:function(t){return this._dataView.getFloat32(t-this._sliceOffset,this._littleEndian)}},{key:"readFloat64",value:function(t){return this._dataView.getFloat64(t-this._sliceOffset,this._littleEndian)}},{key:"readUint64",value:function(t){var n,i=this.readUint32(t),r=this.readUint32(t+4);if(this._littleEndian){if(n=i+Math.pow(2,32)*r,!Number.isSafeInteger(n))throw new Error("".concat(n," exceeds MAX_SAFE_INTEGER. ")+"Precision may be lost. Please report if you get this message to https://github.com/geotiffjs/geotiff.js/issues");return n}if(n=Math.pow(2,32)*i+r,!Number.isSafeInteger(n))throw new Error("".concat(n," exceeds MAX_SAFE_INTEGER. ")+"Precision may be lost. Please report if you get this message to https://github.com/geotiffjs/geotiff.js/issues");return n}},{key:"readInt64",value:function(t){for(var n=0,i=(128&this._dataView.getUint8(t+(this._littleEndian?7:0)))>0,r=!0,e=0;e<8;e++){var o=this._dataView.getUint8(t+(this._littleEndian?e:7-e));i&&(r?0!==o&&(o=255&~(o-1),r=!1):o=255&~o),n+=o*Math.pow(256,e)}return i&&(n=-n),n}},{key:"readOffset",value:function(t){return this._bigTiff?this.readUint64(t):this.readUint32(t)}}])&&Wp(n.prototype,i),r&&Wp(n,r),Object.defineProperty(n,"prototype",{writable:!1}),t}();function Xp(t){return Kp(t)||function(t){if("undefined"!=typeof Symbol&&null!=t[Symbol.iterator]||null!=t["@@iterator"])return Array.from(t)}(t)||Yp(t)||Jp()}function Hp(t,n){return Kp(t)||function(t,n){var i=null==t?null:"undefined"!=typeof Symbol&&t[Symbol.iterator]||t["@@iterator"];if(null==i)return;var r,e,o=[],s=!0,a=!1;try{for(i=i.call(t);!(s=(r=i.next()).done)&&(o.push(r.value),!n||o.length!==n);s=!0);}catch(t){a=!0,e=t}finally{try{s||null==i.return||i.return()}finally{if(a)throw e}}return o}(t,n)||Yp(t,n)||Jp()}function Jp(){throw new TypeError("Invalid attempt to destructure non-iterable instance.\nIn order to be iterable, non-array objects must have a [Symbol.iterator]() method.")}function Kp(t){if(Array.isArray(t))return t}function Yp(t,n){if(t){if("string"==typeof t)return Zp(t,n);var i=Object.prototype.toString.call(t).slice(8,-1);return"Object"===i&&t.constructor&&(i=t.constructor.name),"Map"===i||"Set"===i?Array.from(t):"Arguments"===i||/^(?:Ui|I)nt(?:8|16|32)(?:Clamped)?Array$/.test(i)?Zp(t,n):void 0}}function Zp(t,n){(null==n||n>t.length)&&(n=t.length);for(var i=0,r=new Array(n);i=t.length?{done:!0}:{done:!1,value:t[r++]}},e:function(t){throw t},f:e}}throw new TypeError("Invalid attempt to iterate non-iterable instance.\nIn order to be iterable, non-array objects must have a [Symbol.iterator]() method.")}var o,s=!0,a=!1;return{s:function(){i=i.call(t)},n:function(){var t=i.next();return s=t.done,t},e:function(t){a=!0,o=t},f:function(){try{s||null==i.return||i.return()}finally{if(a)throw o}}}}(t);try{for(r.s();!(n=r.n()).done;){var e=Hp(n.value,2),o=e[0],s=e[1];i[o.toLowerCase()]=s}}catch(t){r.e(t)}finally{r.f()}return i}function ty(t){return Qp(t.split("\r\n").map((function(t){var n=t.split(":").map((function(t){return t.trim()}));return n[0]=n[0].toLowerCase(),n})))}function ny(t){var n,i,r;if(t){var e=Hp(t.match(/bytes (\d+)-(\d+)\/(\d+)/),4);n=e[1],i=e[2],r=e[3],n=parseInt(n,10),i=parseInt(i,10),r=parseInt(r,10)}return{start:n,end:i,total:r}}function iy(t,n){for(var i=null,r=new TextDecoder("ascii"),e=[],o="--".concat(n),s="".concat(o,"--"),a=0;a<10;++a){r.decode(new Uint8Array(t,a,o.length))===o&&(i=a)}if(null===i)throw new Error("Could not find initial boundary");for(;i1&&void 0!==e[1]?e[1]:void 0,t.abrupt("return",Promise.all(n.map((function(t){return r.fetchSlice(t,i)}))));case 2:case"end":return t.stop()}}),t)}))),function(t){return s.apply(this,arguments)})},{key:"fetchSlice",value:(o=ey(regeneratorRuntime.mark((function t(n){return regeneratorRuntime.wrap((function(t){for(;;)switch(t.prev=t.next){case 0:throw new Error("fetching of slice ".concat(n," not possible, not implemented"));case 1:case"end":return t.stop()}}),t)}))),function(t){return o.apply(this,arguments)})},{key:"fileSize",get:function(){return null}},{key:"close",value:(e=ey(regeneratorRuntime.mark((function t(){return regeneratorRuntime.wrap((function(t){for(;;)switch(t.prev=t.next){case 0:case"end":return t.stop()}}),t)}))),function(){return e.apply(this,arguments)})}])&&oy(n.prototype,i),r&&oy(n,r),Object.defineProperty(n,"prototype",{writable:!1}),t}(),ay=i(875);function uy(t){return(uy="function"==typeof Symbol&&"symbol"==typeof Symbol.iterator?function(t){return typeof t}:function(t){return t&&"function"==typeof Symbol&&t.constructor===Symbol&&t!==Symbol.prototype?"symbol":typeof t})(t)}function cy(t,n){for(var i=0;i=t.length?{done:!0}:{done:!1,value:t[r++]}},e:function(t){throw t},f:e}}throw new TypeError("Invalid attempt to iterate non-iterable instance.\nIn order to be iterable, non-array objects must have a [Symbol.iterator]() method.")}var o,s=!0,a=!1;return{s:function(){i=i.call(t)},n:function(){var t=i.next();return s=t.done,t},e:function(t){a=!0,o=t},f:function(){try{s||null==i.return||i.return()}finally{if(a)throw o}}}}function Cy(t,n){if(t){if("string"==typeof t)return Ry(t,n);var i=Object.prototype.toString.call(t).slice(8,-1);return"Object"===i&&t.constructor&&(i=t.constructor.name),"Map"===i||"Set"===i?Array.from(t):"Arguments"===i||/^(?:Ui|I)nt(?:8|16|32)(?:Clamped)?Array$/.test(i)?Ry(t,n):void 0}}function Ry(t,n){(null==n||n>t.length)&&(n=t.length);for(var i=0,r=new Array(n);i2&&void 0!==arguments[2]?arguments[2]:null;Gy(this,t),this.offset=n,this.length=i,this.data=r}return Uy(t,[{key:"top",get:function(){return this.offset+this.length}}]),t}(),By=Uy((function t(n,i,r){Gy(this,t),this.offset=n,this.length=i,this.blockIds=r})),Wy=function(t){!function(t,n){if("function"!=typeof n&&null!==n)throw new TypeError("Super expression must either be null or a function");t.prototype=Object.create(n&&n.prototype,{constructor:{value:t,writable:!0,configurable:!0}}),Object.defineProperty(t,"prototype",{writable:!1}),n&&Ny(t,n)}(r,t);var n,i=zy(r);function r(t){var n,e=arguments.length>1&&void 0!==arguments[1]?arguments[1]:{},o=e.blockSize,s=void 0===o?65536:o,a=e.cacheSize,u=void 0===a?100:a;return Gy(this,r),(n=i.call(this)).source=t,n.blockSize=s,n.blockCache=new ay({max:u}),n.blockRequests=new Map,n.blockIdsToFetch=new Set,n}return Uy(r,[{key:"fileSize",get:function(){return this.source.fileSize}},{key:"fetch",value:(n=Iy(regeneratorRuntime.mark((function t(n,i){var r,e,o,s,a,u,c,h,f,l,v,d,p,y,m,w,b,g,x,j,S,k,M,_,O,T,E,A,C,R,P,I,N,z,F,L,G,D;return regeneratorRuntime.wrap((function(t){for(;;)switch(t.prev=t.next){case 0:r=new Map,e=new Map,o=new Set,s=Ay(n);try{for(s.s();!(a=s.n()).done;)for(u=a.value,c=u.offset,h=u.length,f=c+h,null!==(l=this.fileSize)&&(f=Math.min(f,l)),v=Math.floor(c/this.blockSize)*this.blockSize,d=v;d0)){t.next=65;break}this.fetchBlocks(i),A=Ay(j),t.prev=44,A.s();case 46:if((C=A.n()).done){t.next=54;break}if(R=C.value,P=this.blockRequests.get(R)){t.next=51;break}throw new Error("Block ".concat(R," is not in the block requests"));case 51:e.set(R,P);case 52:t.next=46;break;case 54:t.next=59;break;case 56:t.prev=56,t.t1=t.catch(44),A.e(t.t1);case 59:return t.prev=59,A.f(),t.finish(59);case 62:return t.next=64,Promise.allSettled(Array.from(e.values()));case 64:x=t.sent;case 65:if(!x.some((function(t){return"rejected"===t.status}))){t.next=69;break}if(!i||!i.aborted){t.next=68;break}throw new _y("Request was aborted");case 68:throw new Oy(x.filter((function(t){return"rejected"===t.status})).map((function(t){return t.reason})),"Request failed");case 69:I=x.map((function(t){return t.value})),N=new Map(My(Array.from(e.keys()),I)),z=Ay(r);try{for(z.s();!(F=z.n()).done;)L=Ey(F.value,2),G=L[0],D=L[1],N.set(G,D)}catch(t){z.e(t)}finally{z.f()}return t.abrupt("return",this.readSliceData(n,N));case 74:case"end":return t.stop()}}),t,this,[[9,28,31,34],[44,56,59,62]])}))),function(t,i){return n.apply(this,arguments)})},{key:"fetchBlocks",value:function(t){var n=this;this.blockIdsToFetch.size>0&&function(){for(var i=n.groupBlocks(n.blockIdsToFetch),r=n.source.fetch(i,t),e=function(e){var o,s=Ay(i[e].blockIds);try{var a=function(){var i=o.value,s=Iy(regeneratorRuntime.mark((function o(){var s,a,u,c,h,f;return regeneratorRuntime.wrap((function(o){for(;;)switch(o.prev=o.next){case 0:return o.prev=0,o.next=3,r;case 3:return o.t0=e,s=o.sent[o.t0],a=i*n.blockSize,u=a-s.offset,c=Math.min(u+n.blockSize,s.data.byteLength),h=s.data.slice(u,c),f=new qy(a,h.byteLength,h),n.blockCache.set(i,f),o.abrupt("return",f);case 14:throw o.prev=14,o.t1=o.catch(0),"AbortError"===o.t1.name&&(o.t1.signal=t),o.t1;case 18:return o.prev=18,n.blockRequests.delete(i),o.finish(18);case 21:case"end":return o.stop()}}),o,null,[[0,14,18,21]])})))();n.blockRequests.set(i,s)};for(s.s();!(o=s.n()).done;)a()}catch(t){s.e(t)}finally{s.f()}},o=0;o0&&(l=h),v=c.top-r<0?c.length-f:r-c.offset-f;var d=new Uint8Array(c.data,f,v);a.set(d,l)}return s}))}}]),r}(sy);function Vy(t,n,i,r,e,o,s){try{var a=t[o](s),u=a.value}catch(t){return void i(t)}a.done?n(u):Promise.resolve(u).then(r,e)}function Xy(t){return function(){var n=this,i=arguments;return new Promise((function(r,e){var o=t.apply(n,i);function s(t){Vy(o,r,e,s,a,"next",t)}function a(t){Vy(o,r,e,s,a,"throw",t)}s(void 0)}))}}function Hy(t,n){if(!(t instanceof n))throw new TypeError("Cannot call a class as a function")}function Jy(t,n){for(var i=0;i=200&&this.status<=299}},{key:"status",get:function(){throw new Error("not implemented")}},{key:"getHeader",value:function(t){throw new Error("not implemented")}},{key:"getData",value:(n=Xy(regeneratorRuntime.mark((function t(){return regeneratorRuntime.wrap((function(t){for(;;)switch(t.prev=t.next){case 0:throw new Error("not implemented");case 1:case"end":return t.stop()}}),t)}))),function(){return n.apply(this,arguments)})}]),t}(),Zy=function(){function t(n){Hy(this,t),this.url=n}var n;return Ky(t,[{key:"request",value:(n=Xy(regeneratorRuntime.mark((function t(){var n,i=arguments;return regeneratorRuntime.wrap((function(t){for(;;)switch(t.prev=t.next){case 0:throw(n=i.length>0&&void 0!==i[0]?i[0]:{}).headers,n.credentials,n.signal,new Error("request is not implemented");case 2:case"end":return t.stop()}}),t)}))),function(){return n.apply(this,arguments)})}]),t}();function $y(t){return($y="function"==typeof Symbol&&"symbol"==typeof Symbol.iterator?function(t){return typeof t}:function(t){return t&&"function"==typeof Symbol&&t.constructor===Symbol&&t!==Symbol.prototype?"symbol":typeof t})(t)}function Qy(t,n,i,r,e,o,s){try{var a=t[o](s),u=a.value}catch(t){return void i(t)}a.done?n(u):Promise.resolve(u).then(r,e)}function tm(t){return function(){var n=this,i=arguments;return new Promise((function(r,e){var o=t.apply(n,i);function s(t){Qy(o,r,e,s,a,"next",t)}function a(t){Qy(o,r,e,s,a,"throw",t)}s(void 0)}))}}function nm(t,n){if(!(t instanceof n))throw new TypeError("Cannot call a class as a function")}function im(t,n){for(var i=0;i0&&void 0!==s[0]?s[0]:{},i=n.headers,r=n.credentials,e=n.signal,t.next=3,fetch(this.url,{headers:i,credentials:r,signal:e});case 3:return o=t.sent,t.abrupt("return",new cm(o));case 5:case"end":return t.stop()}}),t,this)}))),function(){return n.apply(this,arguments)})}]),r}(Zy);function fm(t){return(fm="function"==typeof Symbol&&"symbol"==typeof Symbol.iterator?function(t){return typeof t}:function(t){return t&&"function"==typeof Symbol&&t.constructor===Symbol&&t!==Symbol.prototype?"symbol":typeof t})(t)}function lm(t,n){return function(t){if(Array.isArray(t))return t}(t)||function(t,n){var i=null==t?null:"undefined"!=typeof Symbol&&t[Symbol.iterator]||t["@@iterator"];if(null==i)return;var r,e,o=[],s=!0,a=!1;try{for(i=i.call(t);!(s=(r=i.next()).done)&&(o.push(r.value),!n||o.length!==n);s=!0);}catch(t){a=!0,e=t}finally{try{s||null==i.return||i.return()}finally{if(a)throw e}}return o}(t,n)||function(t,n){if(!t)return;if("string"==typeof t)return vm(t,n);var i=Object.prototype.toString.call(t).slice(8,-1);"Object"===i&&t.constructor&&(i=t.constructor.name);if("Map"===i||"Set"===i)return Array.from(t);if("Arguments"===i||/^(?:Ui|I)nt(?:8|16|32)(?:Clamped)?Array$/.test(i))return vm(t,n)}(t,n)||function(){throw new TypeError("Invalid attempt to destructure non-iterable instance.\nIn order to be iterable, non-array objects must have a [Symbol.iterator]() method.")}()}function vm(t,n){(null==n||n>t.length)&&(n=t.length);for(var i=0,r=new Array(n);i0&&void 0!==o[0]?o[0]:{},i=n.headers,r=n.signal,t.next=3,this.constructRequest(i,r);case 3:return e=t.sent,t.abrupt("return",e);case 5:case"end":return t.stop()}}),t,this)}))),function(){return n.apply(this,arguments)})}]),r}(Zy),_m=i(752),Om=i(640),Tm=i(630);function Em(t){return(Em="function"==typeof Symbol&&"symbol"==typeof Symbol.iterator?function(t){return typeof t}:function(t){return t&&"function"==typeof Symbol&&t.constructor===Symbol&&t!==Symbol.prototype?"symbol":typeof t})(t)}function Am(t,n){var i=Object.keys(t);if(Object.getOwnPropertySymbols){var r=Object.getOwnPropertySymbols(t);n&&(r=r.filter((function(n){return Object.getOwnPropertyDescriptor(t,n).enumerable}))),i.push.apply(i,r)}return i}function Cm(t){for(var n=1;n0&&void 0!==o[0]?o[0]:{},i=n.headers,r=n.signal,t.next=3,this.constructRequest(i,r);case 3:return e=t.sent,t.abrupt("return",e);case 5:case"end":return t.stop()}}),t,this)}))),function(){return n.apply(this,arguments)})}]),r}(Zy);function Vm(t){return(Vm="function"==typeof Symbol&&"symbol"==typeof Symbol.iterator?function(t){return typeof t}:function(t){return t&&"function"==typeof Symbol&&t.constructor===Symbol&&t!==Symbol.prototype?"symbol":typeof t})(t)}var Xm=["headers","credentials","maxRanges","allowFullFile"],Hm=["headers","maxRanges","allowFullFile"],Jm=["headers","maxRanges","allowFullFile"],Km=["forceXHR"];function Ym(t,n){if(null==t)return{};var i,r,e=function(t,n){if(null==t)return{};var i,r,e={},o=Object.keys(t);for(r=0;r=0||(e[i]=t[i]);return e}(t,n);if(Object.getOwnPropertySymbols){var o=Object.getOwnPropertySymbols(t);for(r=0;r=0||Object.prototype.propertyIsEnumerable.call(t,i)&&(e[i]=t[i])}return e}function Zm(t,n){var i=Object.keys(t);if(Object.getOwnPropertySymbols){var r=Object.getOwnPropertySymbols(t);n&&(r=r.filter((function(n){return Object.getOwnPropertyDescriptor(t,n).enumerable}))),i.push.apply(i,r)}return i}function $m(t){for(var n=1;n=n.length)){t.next=4;break}return t.abrupt("return",this.fetchSlices(n,i));case 4:this.maxRanges>0&&n.length;case 5:return t.abrupt("return",Promise.all(n.map((function(t){return r.fetchSlice(t,i)}))));case 6:case"end":return t.stop()}}),t,this)}))),function(t,n){return s.apply(this,arguments)})},{key:"fetchSlices",value:(o=nw(regeneratorRuntime.mark((function t(n,i){var r,e,o,s,a,u,c,h,f,l,v,d,p=this;return regeneratorRuntime.wrap((function(t){for(;;)switch(t.prev=t.next){case 0:return t.next=2,this.client.request({headers:$m($m({},this.headers),{},{Range:"bytes=".concat(n.map((function(t){var n=t.offset,i=t.length;return"".concat(n,"-").concat(n+i)})).join(","))}),signal:i});case 2:if((r=t.sent).ok){t.next=7;break}throw new Error("Error fetching data.");case 7:if(206!==r.status){t.next=32;break}if(y=r.getHeader("content-type"),m=void 0,m=Xp(y.split(";").map((function(t){return t.trim()}))),e={type:m[0],params:Qp(m.slice(1).map((function(t){return t.split("=")})))},o=e.params,"multipart/byteranges"!==e.type){t.next=18;break}return t.t0=iy,t.next=13,r.getData();case 13:return t.t1=t.sent,t.t2=o.boundary,s=(0,t.t0)(t.t1,t.t2),this._fileSize=s[0].fileSize||null,t.abrupt("return",s);case 18:return t.next=20,r.getData();case 20:if(a=t.sent,u=ny(r.getHeader("content-range")),c=u.start,h=u.end,f=u.total,this._fileSize=f||null,l=[{data:a,offset:c,length:h-c}],!(n.length>1)){t.next=29;break}return t.next=27,Promise.all(n.slice(1).map((function(t){return p.fetchSlice(t,i)})));case 27:return v=t.sent,t.abrupt("return",l.concat(v));case 29:return t.abrupt("return",l);case 32:if(this.allowFullFile){t.next=34;break}throw new Error("Server responded with full file");case 34:return t.next=36,r.getData();case 36:return d=t.sent,this._fileSize=d.byteLength,t.abrupt("return",[{data:d,offset:0,length:d.byteLength}]);case 39:case"end":return t.stop()}var y,m}),t,this)}))),function(t,n){return o.apply(this,arguments)})},{key:"fetchSlice",value:(e=nw(regeneratorRuntime.mark((function t(n,i){var r,e,o,s,a,u,c;return regeneratorRuntime.wrap((function(t){for(;;)switch(t.prev=t.next){case 0:return r=n.offset,e=n.length,t.next=3,this.client.request({headers:$m($m({},this.headers),{},{Range:"bytes=".concat(r,"-").concat(r+e)}),signal:i});case 3:if((o=t.sent).ok){t.next=8;break}throw new Error("Error fetching data.");case 8:if(206!==o.status){t.next=17;break}return t.next=11,o.getData();case 11:return s=t.sent,a=ny(o.getHeader("content-range")),u=a.total,this._fileSize=u||null,t.abrupt("return",{data:s,offset:r,length:e});case 17:if(this.allowFullFile){t.next=19;break}throw new Error("Server responded with full file");case 19:return t.next=21,o.getData();case 21:return c=t.sent,this._fileSize=c.byteLength,t.abrupt("return",{data:c,offset:0,length:c.byteLength});case 24:case"end":return t.stop()}}),t,this)}))),function(t,n){return e.apply(this,arguments)})},{key:"fileSize",get:function(){return this._fileSize}}])&&iw(n.prototype,i),r&&iw(n,r),Object.defineProperty(n,"prototype",{writable:!1}),u}(sy);function uw(t,n){var i=n.blockSize,r=n.cacheSize;return null===i?t:new Wy(t,i,r)}function cw(t){var n=arguments.length>1&&void 0!==arguments[1]?arguments[1]:{},i=n.headers,r=void 0===i?{}:i,e=n.credentials,o=n.maxRanges,s=void 0===o?0:o,a=n.allowFullFile,u=void 0!==a&&a,c=Ym(n,Xm),h=new hm(t,e),f=new aw(h,r,s,u);return uw(f,c)}function hw(t){var n=arguments.length>1&&void 0!==arguments[1]?arguments[1]:{},i=n.headers,r=void 0===i?{}:i,e=n.maxRanges,o=void 0===e?0:e,s=n.allowFullFile,a=void 0!==s&&s,u=Ym(n,Hm),c=new Mm(t),h=new aw(c,r,o,a);return uw(h,u)}function fw(t){var n=arguments.length>1&&void 0!==arguments[1]?arguments[1]:{},i=n.headers,r=void 0===i?{}:i,e=n.maxRanges,o=void 0===e?0:e,s=n.allowFullFile,a=void 0!==s&&s,u=Ym(n,Jm),c=new Wm(t),h=new aw(c,r,o,a);return uw(h,u)}function lw(t){var n=arguments.length>1&&void 0!==arguments[1]?arguments[1]:{},i=n.forceXHR,r=void 0!==i&&i,e=Ym(n,Km);return"function"!=typeof fetch||r?"undefined"!=typeof XMLHttpRequest?hw(t,e):fw(t,e):cw(t,e)}function vw(t){return(vw="function"==typeof Symbol&&"symbol"==typeof Symbol.iterator?function(t){return typeof t}:function(t){return t&&"function"==typeof Symbol&&t.constructor===Symbol&&t!==Symbol.prototype?"symbol":typeof t})(t)}function dw(t,n){var i=Object.keys(t);if(Object.getOwnPropertySymbols){var r=Object.getOwnPropertySymbols(t);n&&(r=r.filter((function(n){return Object.getOwnPropertyDescriptor(t,n).enumerable}))),i.push.apply(i,r)}return i}function pw(t){for(var n=1;nt.length)&&(n=t.length);for(var i=0,r=new Array(n);i0&&void 0!==D[0]?D[0]:{},i=n.window,r=n.width,e=n.height,o=n.resX,s=n.resY,a=n.bbox,t.next=5,this.getImage();case 5:return u=t.sent,c=u,t.next=9,this.getImageCount();case 9:if(h=t.sent,f=u.getBoundingBox(),!i||!a){t.next=13;break}throw new Error('Both "bbox" and "window" passed.');case 13:if(!r&&!e){t.next=24;break}if(i&&(l=u.getOrigin(),v=mw(l,2),d=v[0],p=v[1],y=u.getResolution(),m=mw(y,2),w=m[0],b=m[1],a=[d+i[0]*w,p+i[1]*b,d+i[2]*w,p+i[3]*b]),g=a||f,!r){t.next=20;break}if(!o){t.next=19;break}throw new Error("Both width and resX passed");case 19:o=(g[2]-g[0])/r;case 20:if(!e){t.next=24;break}if(!s){t.next=23;break}throw new Error("Both width and resY passed");case 23:s=(g[3]-g[1])/e;case 24:if(!o&&!s){t.next=48;break}x=[],j=0;case 27:if(!(jE||s&&s>A)){t.next=45;break}return t.abrupt("break",48);case 45:++O,t.next=38;break;case 48:return C=i,a&&(R=u.getOrigin(),P=mw(R,2),I=P[0],N=P[1],z=c.getResolution(u),F=mw(z,2),L=F[0],G=F[1],C=[Math.round((a[0]-I)/L),Math.round((a[1]-N)/G),Math.round((a[2]-I)/L),Math.round((a[3]-N)/G)],C=[Math.min(C[0],C[2]),Math.min(C[1],C[3]),Math.max(C[0],C[2]),Math.max(C[1],C[3])]),t.abrupt("return",c.readRasters(pw(pw({},n),{},{window:C})));case 51:case"end":return t.stop()}}),t,this)}))),function(){return n.apply(this,arguments)})}]),t}(),Lw=function(t){xw(c,t);var n,i,r,e,o,s,a,u=jw(c);function c(t,n,i,r){var e,o=arguments.length>4&&void 0!==arguments[4]?arguments[4]:{};return Cw(this,c),(e=u.call(this)).source=t,e.littleEndian=n,e.bigTiff=i,e.firstIFDOffset=r,e.cache=o.cache||!1,e.ifdRequests=[],e.ghostValues=null,e}return Aw(c,[{key:"getSlice",value:(a=gw(regeneratorRuntime.mark((function t(n,i){var r;return regeneratorRuntime.wrap((function(t){for(;;)switch(t.prev=t.next){case 0:return r=this.bigTiff?4048:1024,t.t0=Vp,t.next=4,this.source.fetch([{offset:n,length:void 0!==i?i:r}]);case 4:return t.t1=t.sent[0],t.t2=n,t.t3=this.littleEndian,t.t4=this.bigTiff,t.abrupt("return",new t.t0(t.t1,t.t2,t.t3,t.t4));case 9:case"end":return t.stop()}}),t,this)}))),function(t,n){return a.apply(this,arguments)})},{key:"parseFileDirectoryAt",value:(s=gw(regeneratorRuntime.mark((function t(n){var i,r,e,o,s,a,u,c,h,f,l,v,d,p,y,m,w,b,g,x;return regeneratorRuntime.wrap((function(t){for(;;)switch(t.prev=t.next){case 0:return i=this.bigTiff?20:12,r=this.bigTiff?8:2,t.next=4,this.getSlice(n);case 4:if(e=t.sent,o=this.bigTiff?e.readUint64(n):e.readUint16(n),s=o*i+(this.bigTiff?16:6),e.covers(n,s)){t.next=11;break}return t.next=10,this.getSlice(n,s);case 10:e=t.sent;case 11:a={},u=n+(this.bigTiff?8:2),c=0;case 14:if(!(c0&&void 0!==r[0]?r[0]:0,t.next=3,this.requestIFD(n);case 3:return i=t.sent,t.abrupt("return",new Up(i.fileDirectory,i.geoKeyDirectory,this.dataView,this.littleEndian,this.cache,this.source));case 5:case"end":return t.stop()}}),t,this)}))),function(){return e.apply(this,arguments)})},{key:"getImageCount",value:(r=gw(regeneratorRuntime.mark((function t(){var n,i;return regeneratorRuntime.wrap((function(t){for(;;)switch(t.prev=t.next){case 0:n=0,i=!0;case 2:if(!i){t.next=18;break}return t.prev=3,t.next=6,this.requestIFD(n);case 6:++n,t.next=16;break;case 9:if(t.prev=9,t.t0=t.catch(3),!(t.t0 instanceof zw)){t.next=15;break}i=!1,t.next=16;break;case 15:throw t.t0;case 16:t.next=2;break;case 18:return t.abrupt("return",n);case 19:case"end":return t.stop()}}),t,this,[[3,9]])}))),function(){return r.apply(this,arguments)})},{key:"getGhostValues",value:(i=gw(regeneratorRuntime.mark((function t(){var n,i,r,e,o,s,a,u,c=this;return regeneratorRuntime.wrap((function(t){for(;;)switch(t.prev=t.next){case 0:if(n=this.bigTiff?16:8,!this.ghostValues){t.next=3;break}return t.abrupt("return",this.ghostValues);case 3:return r=(i="GDAL_STRUCTURAL_METADATA_SIZE=").length+100,t.next=7,this.getSlice(n,r);case 7:if(e=t.sent,i!==Iw(e,fp.sf.ASCII,i.length,n)){t.next=19;break}if(o=Iw(e,fp.sf.ASCII,r,n),s=o.split("\n")[0],!((a=Number(s.split("=")[1].split(" ")[0])+s.length)>r)){t.next=16;break}return t.next=15,this.getSlice(n,a);case 15:e=t.sent;case 16:u=Iw(e,fp.sf.ASCII,a,n),this.ghostValues={},u.split("\n").filter((function(t){return t.length>0})).map((function(t){return t.split("=")})).forEach((function(t){var n=mw(t,2),i=n[0],r=n[1];c.ghostValues[i]=r}));case 19:return t.abrupt("return",this.ghostValues);case 20:case"end":return t.stop()}}),t,this)}))),function(){return i.apply(this,arguments)})},{key:"close",value:function(){return"function"==typeof this.source.close&&this.source.close()}}],[{key:"fromSource",value:(n=gw(regeneratorRuntime.mark((function t(n,i,r){var e,o,s,a,u,h,f;return regeneratorRuntime.wrap((function(t){for(;;)switch(t.prev=t.next){case 0:return t.next=2,n.fetch([{offset:0,length:1024}],r);case 2:if(e=t.sent[0],o=new Bp(e),18761!==(s=o.getUint16(0,0))){t.next=9;break}a=!0,t.next=14;break;case 9:if(19789!==s){t.next=13;break}a=!1,t.next=14;break;case 13:throw new TypeError("Invalid byte order value.");case 14:if(42!==(u=o.getUint16(2,a))){t.next=19;break}h=!1,t.next=27;break;case 19:if(43!==u){t.next=26;break}if(h=!0,8===o.getUint16(4,a)){t.next=24;break}throw new Error("Unsupported offset byte-size.");case 24:t.next=27;break;case 26:throw new TypeError("Invalid magic number.");case 27:return f=h?o.getUint64(8,a):o.getUint32(4,a),t.abrupt("return",new c(n,a,h,f,i));case 29:case"end":return t.stop()}}),t)}))),function(t,i,r){return n.apply(this,arguments)})}]),c}(Fw),Gw=function(t){xw(o,t);var n,i,r,e=jw(o);function o(t,n){var i;return Cw(this,o),(i=e.call(this)).mainFile=t,i.overviewFiles=n,i.imageFiles=[t].concat(n),i.fileDirectoriesPerFile=null,i.fileDirectoriesPerFileParsing=null,i.imageCount=null,i}return Aw(o,[{key:"parseFileDirectoriesPerFile",value:(r=gw(regeneratorRuntime.mark((function t(){var n;return regeneratorRuntime.wrap((function(t){for(;;)switch(t.prev=t.next){case 0:return n=[this.mainFile.parseFileDirectoryAt(this.mainFile.firstIFDOffset)].concat(this.overviewFiles.map((function(t){return t.parseFileDirectoryAt(t.firstIFDOffset)}))),t.next=3,Promise.all(n);case 3:return this.fileDirectoriesPerFile=t.sent,t.abrupt("return",this.fileDirectoriesPerFile);case 5:case"end":return t.stop()}}),t,this)}))),function(){return r.apply(this,arguments)})},{key:"getImage",value:(i=gw(regeneratorRuntime.mark((function t(){var n,i,r,e,o,s,a,u=arguments;return regeneratorRuntime.wrap((function(t){for(;;)switch(t.prev=t.next){case 0:return n=u.length>0&&void 0!==u[0]?u[0]:0,t.next=3,this.getImageCount();case 3:return t.next=5,this.parseFileDirectoriesPerFile();case 5:i=0,r=0,e=0;case 8:if(!(e1&&void 0!==e[1]?e[1]:{},r=e.length>2?e[2]:void 0,t.abrupt("return",Lw.fromSource(lw(n,i),r));case 3:case"end":return t.stop()}}),t)})))).apply(this,arguments)}function Uw(){return(Uw=gw(regeneratorRuntime.mark((function t(n){var i,r,e,o,s,a=arguments;return regeneratorRuntime.wrap((function(t){for(;;)switch(t.prev=t.next){case 0:return i=a.length>1&&void 0!==a[1]?a[1]:[],r=a.length>2&&void 0!==a[2]?a[2]:{},e=a.length>3?a[3]:void 0,t.next=5,Lw.fromSource(lw(n,r),e);case 5:return o=t.sent,t.next=8,Promise.all(i.map((function(t){return Lw.fromSource(lw(t,r))})));case 8:return s=t.sent,t.abrupt("return",new Gw(o,s));case 10:case"end":return t.stop()}}),t)})))).apply(this,arguments)}function qw(t,n,i,r,e,o,s){try{var a=t[o](s),u=a.value}catch(t){return void i(t)}a.done?n(u):Promise.resolve(u).then(r,e)}function Bw(t,n){if(!(t instanceof n))throw new TypeError("Cannot call a class as a function")}function Ww(t,n){for(var i=0;i0&&void 0!==arguments[0]?arguments[0]:Xw,e=arguments.length>1?arguments[1]:void 0;Bw(this,t),this.workers=null,this._awaitingDecoder=null,this.size=r,this.messageId=0,r&&(this._awaitingDecoder=e?Promise.resolve(e):new Promise((function(t){i.e(231).then(i.bind(i,231)).then((function(n){t(n.create)}))})),this._awaitingDecoder.then((function(t){n._awaitingDecoder=null,n.workers=[];for(var i=0;ii*t)throw new Error(r)}function eb(t){return t instanceof Int8Array?-128:t instanceof Int16Array?-32768:t instanceof Int32Array?-2147483648:t instanceof Float32Array?12e-39:0}function ob(t){return t instanceof Int8Array?127:t instanceof Uint8Array||t instanceof Uint8ClampedArray?255:t instanceof Int16Array?32767:t instanceof Uint16Array?65535:t instanceof Int32Array?2147483647:t instanceof Uint32Array?4294967295:t instanceof Float32Array?34e37:255}var sb=function(t){function n(n){var i=t.call(this,{state:ds,tileGrid:null,projection:null,opaque:n.opaque,transition:n.transition,interpolate:!1!==n.interpolate,wrapX:n.wrapX})||this;i.$u=n.sources;var r=i.$u.length;i.Qu=n.sourceOptions,i.tc=new Array(r),i.ic=new Array(r),i.rc,i.ec,i.oc,i.sc=!1!==n.normalize,i.ac=!1,i.W=null,i.uc=n.convertToRGB?"readRGB":"readRasters",i.setKey(i.$u.map((function(t){return t.url})).join(","));for(var e=i,o=new Array(r),s=0;sy.length&&(u=e.length-y.length);var S=e[e.length-1]/y[y.length-1];f.ic[c]=S;var k=y.map((function(t){return t*S}));j="Resolution mismatch for source ".concat(c,", got [").concat(k,"] but expected [").concat(e,"]");rb(e.slice(u,e.length),k,.02,j,f.viewRejector)}else e=y,f.ic[c]=1;r?rb(r.slice(u,r.length),p,0,"Tile size mismatch for source ".concat(c),f.viewRejector):r=p,f.tc[c]=h.reverse()},f=this,l=0;l=0;--v){var m=tb(y[v]);if(m){this.projection=m;break}}}this.rc=o,this.ec=s,this.oc=a;t:for(l=0;ll||c>l;)h.push([Math.ceil(u/l),Math.ceil(c/l)]),l+=l;break;case hb:for(var v=u,d=c;v>l||d>l;)h.push([Math.ceil(v/l),Math.ceil(d/l)]),v>>=1,d>>=1;break;default:Mt(!1,53)}h.push([1,1]),h.reverse();for(var p=[a],y=[0],m=1,w=h.length;m1,r=i&&t.imageInfo.profile[1].supports?t.imageInfo.profile[1].supports:[],e=i&&t.imageInfo.profile[1].formats?t.imageInfo.profile[1].formats:[],o=i&&t.imageInfo.profile[1].qualities?t.imageInfo.profile[1].qualities:[];return{url:t.imageInfo["@id"].replace(/\/?(?:info\.json)?$/g,""),sizes:void 0===t.imageInfo.sizes?void 0:t.imageInfo.sizes.map((function(t){return[t.width,t.height]})),tileSize:void 0===t.imageInfo.tiles?void 0:[t.imageInfo.tiles.map((function(t){return t.width}))[0],t.imageInfo.tiles.map((function(t){return void 0===t.height?t.width:t.height}))[0]],resolutions:void 0===t.imageInfo.tiles?void 0:t.imageInfo.tiles.map((function(t){return t.scaleFactors}))[0],supports:vb(vb([],n.supports,!0),r,!0),formats:vb(vb([],n.formats,!0),e,!0),qualities:vb(vb([],n.qualities,!0),o,!0)}},xb[yb]=function(t){var n=t.getComplianceLevelSupportedFeatures(),i=void 0===t.imageInfo.extraFormats?n.formats:vb(vb([],n.formats,!0),t.imageInfo.extraFormats,!0),r=void 0!==t.imageInfo.preferredFormats&&Array.isArray(t.imageInfo.preferredFormats)&&t.imageInfo.preferredFormats.length>0?t.imageInfo.preferredFormats.filter((function(t){return y(["jpg","png","gif"],t)})).reduce((function(t,n){return void 0===t&&y(i,n)?n:t}),void 0):void 0;return{url:t.imageInfo.id,sizes:void 0===t.imageInfo.sizes?void 0:t.imageInfo.sizes.map((function(t){return[t.width,t.height]})),tileSize:void 0===t.imageInfo.tiles?void 0:[t.imageInfo.tiles.map((function(t){return t.width}))[0],t.imageInfo.tiles.map((function(t){return t.height}))[0]],resolutions:void 0===t.imageInfo.tiles?void 0:t.imageInfo.tiles.map((function(t){return t.scaleFactors}))[0],supports:void 0===t.imageInfo.extraFeatures?n.supports:vb(vb([],n.supports,!0),t.imageInfo.extraFeatures,!0),formats:i,qualities:void 0===t.imageInfo.extraQualities?n.qualities:vb(vb([],n.qualities,!0),t.imageInfo.extraQualities,!0),preferredFormat:r}};var jb=function(){function t(t){this.setImageInfo(t)}return t.prototype.setImageInfo=function(t){this.imageInfo="string"==typeof t?JSON.parse(t):t},t.prototype.getImageApiVersion=function(){if(void 0!==this.imageInfo){var t=this.imageInfo["@context"]||"ol-no-context";"string"==typeof t&&(t=[t]);for(var n=0;n0&&"string"==typeof this.imageInfo.profile[0]&&bb.test(this.imageInfo.profile[0]))return this.imageInfo.profile[0]}},t.prototype.getComplianceLevelFromProfile=function(t){var n=this.getComplianceLevelEntryFromProfile(t);if(void 0!==n){var i=n.match(/level[0-2](?:\.json)?$/g);return Array.isArray(i)?i[0].replace(".json",""):void 0}},t.prototype.getComplianceLevelSupportedFeatures=function(){if(void 0!==this.imageInfo){var t=this.getImageApiVersion(),n=this.getComplianceLevelFromProfile(t);return void 0===n?mb.none.none:mb[t][n]}},t.prototype.getTileSourceOptions=function(t){var n=t||{},i=this.getImageApiVersion();if(void 0!==i){var r=void 0===i?void 0:xb[i](this);if(void 0!==r)return{url:r.url,version:i,size:[this.imageInfo.width,this.imageInfo.height],sizes:r.sizes,format:void 0!==n.format&&y(r.formats,n.format)?n.format:void 0!==r.preferredFormat?r.preferredFormat:"jpg",supports:r.supports,quality:n.quality&&y(r.qualities,n.quality)?n.quality:y(r.qualities,"native")?"native":"default",resolutions:Array.isArray(r.resolutions)?r.resolutions.sort((function(t,n){return n-t})):void 0,tileSize:r.tileSize}}},t}(),Sb=function(){var t=function(n,i){return(t=Object.setPrototypeOf||{__proto__:[]}instanceof Array&&function(t,n){t.__proto__=n}||function(t,n){for(var i in n)Object.prototype.hasOwnProperty.call(n,i)&&(t[i]=n[i])})(n,i)};return function(n,i){if("function"!=typeof i&&null!==i)throw new TypeError("Class extends value "+String(i)+" is not a constructor or null");function r(){this.constructor=n}t(n,i),n.prototype=null===i?Object.create(i):(r.prototype=i.prototype,new r)}}();function kb(t){return t.toLocaleString("en",{maximumFractionDigits:10})}var Mb=function(t){function n(n){var i=this,r=n||{},e=void 0===r.imageSmoothing||r.imageSmoothing;void 0!==r.interpolate&&(e=r.interpolate);var o=r.url||"";o+=o.lastIndexOf("/")===o.length-1||""===o?"":"/";var s=r.version||pb,a=r.sizes||[],u=r.size;Mt(null!=u&&Array.isArray(u)&&2==u.length&&!isNaN(u[0])&&u[0]>0&&!isNaN(u[1])&&u[1]>0,60);var c,h,f,l=u[0],v=u[1],d=r.tileSize,p=r.tilePixelRatio||1,m=r.format||"jpg",w=r.quality||(r.version==db?"native":"default"),b=r.resolutions||[],g=r.supports||[],x=r.extent||[0,-v,l,0],j=null!=a&&Array.isArray(a)&&a.length>0,S=void 0!==d&&("number"==typeof d&&Number.isInteger(d)&&d>0||Array.isArray(d)&&d.length>0),k=null!=g&&Array.isArray(g)&&(y(g,"regionByPx")||y(g,"regionByPct"))&&(y(g,"sizeByWh")||y(g,"sizeByH")||y(g,"sizeByW")||y(g,"sizeByPct"));if(b.sort((function(t,n){return n-t})),S||k)if(null!=d&&("number"==typeof d&&Number.isInteger(d)&&d>0?(c=d,h=d):Array.isArray(d)&&d.length>0&&((1==d.length||null==d[1]&&Number.isInteger(d[0]))&&(c=d[0],h=d[0]),2==d.length&&(Number.isInteger(d[0])&&Number.isInteger(d[1])?(c=d[0],h=d[1]):null==d[0]&&Number.isInteger(d[1])&&(c=d[1],h=d[1])))),void 0!==c&&void 0!==h||(c=za,h=za),0==b.length)for(var M=f=Math.max(Math.ceil(Math.log(l/c)/Math.LN2),Math.ceil(Math.log(v/h)/Math.LN2));M>=0;M--)b.push(Math.pow(2,M));else{var _=Math.max.apply(Math,b);f=Math.round(Math.log(_)/Math.LN2)}else if(c=l,h=v,b=[],j){a.sort((function(t,n){return t[0]-n[0]})),f=-1;var O=[];for(M=0;M0&&b[b.length-1]==T?O.push(M):(b.push(T),f++)}if(O.length>0)for(M=0;Mf)){var d=t[1],p=t[2],x=b[u];if(!(void 0===d||void 0===p||void 0===x||d<0||Math.ceil(l/x/c)<=d||p<0||Math.ceil(v/x/h)<=p)){if(k||S){var M=d*c*x,_=p*h*x,O=c*x,T=h*x,E=c,A=h;if(M+O>l&&(O=l-M),_+T>v&&(T=v-_),M+c*x>l&&(E=Math.floor((l-M+x-1)/x)),_+h*x>v&&(A=Math.floor((v-_+x-1)/x)),0==M&&O==l&&0==_&&T==v)r="full";else if(!k||y(g,"regionByPx"))r=M+","+_+","+O+","+T;else if(y(g,"regionByPct")){r="pct:"+kb(M/l*100)+","+kb(_/v*100)+","+kb(O/l*100)+","+kb(T/v*100)}s!=yb||k&&!y(g,"sizeByWh")?!k||y(g,"sizeByW")?e=E+",":y(g,"sizeByH")?e=","+A:y(g,"sizeByWh")?e=E+","+A:y(g,"sizeByPct")&&(e="pct:"+kb(100/x)):e=E+","+A}else if(r="full",j){var C=a[u][0],R=a[u][1];e=s==yb?C==l&&R==v?"max":C+","+R:C==l?"full":C+","}else e=s==yb?"max":"full";return o+r+"/"+e+"/0/"+w+"."+m}}},transition:r.transition})||this).zDirection=r.zDirection,i}return Sb(n,t),n}(md),_b=function(){var t=function(n,i){return(t=Object.setPrototypeOf||{__proto__:[]}instanceof Array&&function(t,n){t.__proto__=n}||function(t,n){for(var i in n)Object.prototype.hasOwnProperty.call(n,i)&&(t[i]=n[i])})(n,i)};return function(n,i){if("function"!=typeof i&&null!==i)throw new TypeError("Class extends value "+String(i)+" is not a constructor or null");function r(){this.constructor=n}t(n,i),n.prototype=null===i?Object.create(i):(r.prototype=i.prototype,new r)}}(),Ob=function(t){function n(n,i,r,e,o,s,a){var u=this,c=n.getExtent(),h=i.getExtent(),f=h?Yn(r,h):r,l=Uh(n,i,Xn(f),e),v=new ll(n,i,f,c,.5*l,e),d=s(v.calculateSourceExtent(),l,o),p=d?yo:go,y=d?d.getPixelRatio():1;return(u=t.call(this,r,e,y,p)||this).ds=i,u.ys=c,u.Ns=v,u.wi=e,u.lc=r,u.vc=d,u.dc=y,u.du=a,u.Ut=null,u.yc=null,u}return _b(n,t),n.prototype.disposeInternal=function(){this.state==mo&&this.mc(),t.prototype.disposeInternal.call(this)},n.prototype.getImage=function(){return this.Ut},n.prototype.getProjection=function(){return this.ds},n.prototype.zs=function(){var t=this.vc.getState();if(t==wo){var n=Qn(this.lc)/this.wi,i=Kn(this.lc)/this.wi;this.Ut=Bh(n,i,this.dc,this.vc.getResolution(),this.ys,this.wi,this.lc,this.Ns,[{extent:this.vc.getExtent(),image:this.vc.getImage()}],0,void 0,this.du)}this.state=t,this.changed()},n.prototype.load=function(){if(this.state==yo){this.state=mo,this.changed();var t=this.vc.getState();t==wo||t==bo?this.zs():(this.yc=Y(this.vc,N,(function(t){var n=this.vc.getState();n!=wo&&n!=bo||(this.mc(),this.zs())}),this),this.vc.load())}},n.prototype.mc=function(){$(this.yc),this.yc=null},n}(po),Tb=function(){var t=function(n,i){return(t=Object.setPrototypeOf||{__proto__:[]}instanceof Array&&function(t,n){t.__proto__=n}||function(t,n){for(var i in n)Object.prototype.hasOwnProperty.call(n,i)&&(t[i]=n[i])})(n,i)};return function(n,i){if("function"!=typeof i&&null!==i)throw new TypeError("Class extends value "+String(i)+" is not a constructor or null");function r(){this.constructor=n}t(n,i),n.prototype=null===i?Object.create(i):(r.prototype=i.prototype,new r)}}(),Eb="imageloadstart",Ab="imageloadend",Cb="imageloaderror",Rb=function(t){function n(n,i){var r=t.call(this,n)||this;return r.image=i,r}return Tb(n,t),n}(f);function Pb(t,n){t.getImage().src=n}var Ib=function(t){function n(n){var i=this,r=void 0===n.imageSmoothing||n.imageSmoothing;return void 0!==n.interpolate&&(r=n.interpolate),(i=t.call(this,{attributions:n.attributions,projection:n.projection,state:n.state,interpolate:r})||this).on,i.once,i.un,i.Ti=void 0!==n.resolutions?n.resolutions:null,i.wc=null,i.bc=0,i}return Tb(n,t),n.prototype.getResolutions=function(){return this.Ti},n.prototype.findNearestResolution=function(t){if(this.Ti){var n=m(this.Ti,t,0);t=this.Ti[n]}return t},n.prototype.getImage=function(t,n,i,r){var e=this.getProjection();if(e&&r&&!Or(e,r)){if(this.wc){if(this.bc==this.getRevision()&&Or(this.wc.getProjection(),r)&&this.wc.getResolution()==n&&In(this.wc.getExtent(),t))return this.wc;this.wc.dispose(),this.wc=null}return this.wc=new Ob(e,r,t,n,i,function(t,n,i){return this.getImageInternal(t,n,i,e)}.bind(this),this.getInterpolate()),this.bc=this.getRevision(),this.wc}return e&&(r=e),this.getImageInternal(t,n,i,r)},n.prototype.getImageInternal=function(t,n,i,e){return r()},n.prototype.handleImageChange=function(t){var n,i=t.target;switch(i.getState()){case mo:this.loading=!0,n=Eb;break;case wo:this.loading=!1,n=Ab;break;case bo:this.loading=!1,n=Cb;break;default:return}this.hasListener(n)&&this.dispatchEvent(new Rb(n,i))},n}(ud),Nb=function(){var t=function(n,i){return(t=Object.setPrototypeOf||{__proto__:[]}instanceof Array&&function(t,n){t.__proto__=n}||function(t,n){for(var i in n)Object.prototype.hasOwnProperty.call(n,i)&&(t[i]=n[i])})(n,i)};return function(n,i){if("function"!=typeof i&&null!==i)throw new TypeError("Class extends value "+String(i)+" is not a constructor or null");function r(){this.constructor=n}t(n,i),n.prototype=null===i?Object.create(i):(r.prototype=i.prototype,new r)}}(),zb=function(t){function n(n){var i=this,r=n||{},e=void 0===r.imageSmoothing||r.imageSmoothing;return void 0!==r.interpolate&&(e=r.interpolate),(i=t.call(this,{attributions:r.attributions,interpolate:e,projection:r.projection,resolutions:r.resolutions})||this).Bt=void 0!==r.crossOrigin?r.crossOrigin:null,i.ju=void 0===r.hidpi||r.hidpi,i.Le=r.url,i.Ft=void 0!==r.imageLoadFunction?r.imageLoadFunction:Pb,i.gc=r.params||{},i.Nt=null,i.xc=[0,0],i.jc=0,i.Sc=void 0!==r.ratio?r.ratio:1.5,i}return Nb(n,t),n.prototype.getParams=function(){return this.gc},n.prototype.getImageInternal=function(t,n,i,r){if(void 0===this.Le)return null;n=this.findNearestResolution(n),i=this.ju?i:1;var e=this.Nt;if(e&&this.jc==this.getRevision()&&e.getResolution()==n&&e.getPixelRatio()==i&&_n(e.getExtent(),t))return e;var o={F:"image",FORMAT:"PNG32",TRANSPARENT:!0};E(o,this.gc);var s=((t=t.slice())[0]+t[2])/2,a=(t[1]+t[3])/2;if(1!=this.Sc){var u=this.Sc*Qn(t)/2,c=this.Sc*Kn(t)/2;t[0]=s-u,t[1]=a-c,t[2]=s+u,t[3]=a+c}var h=n/i,f=Math.ceil(Qn(t)/h),l=Math.ceil(Kn(t)/h);t[0]=s-h*f/2,t[2]=s+h*f/2,t[1]=a-h*l/2,t[3]=a+h*l/2,this.xc[0]=f,this.xc[1]=l;var v=this.kc(t,this.xc,i,r,o);return this.Nt=new So(t,n,i,v,this.Bt,this.Ft),this.jc=this.getRevision(),this.Nt.addEventListener(N,this.handleImageChange.bind(this)),this.Nt},n.prototype.getImageLoadFunction=function(){return this.Ft},n.prototype.kc=function(t,n,i,r,e){var o=r.getCode().split(/:(?=\d+$)/).pop();e.SIZE=n[0]+","+n[1],e.BBOX=t.join(","),e.BBOXSR=o,e.IMAGESR=o,e.DPI=Math.round(90*i);var s=this.Le,a=s.replace(/MapServer\/?$/,"MapServer/export").replace(/ImageServer\/?$/,"ImageServer/exportImage");return a==s&&Mt(!1,50),of(a,e)},n.prototype.getUrl=function(){return this.Le},n.prototype.setImageLoadFunction=function(t){this.Nt=null,this.Ft=t,this.changed()},n.prototype.setUrl=function(t){t!=this.Le&&(this.Le=t,this.Nt=null,this.changed())},n.prototype.updateParams=function(t){E(this.gc,t),this.Nt=null,this.changed()},n}(Ib),Fb=function(){var t=function(n,i){return(t=Object.setPrototypeOf||{__proto__:[]}instanceof Array&&function(t,n){t.__proto__=n}||function(t,n){for(var i in n)Object.prototype.hasOwnProperty.call(n,i)&&(t[i]=n[i])})(n,i)};return function(n,i){if("function"!=typeof i&&null!==i)throw new TypeError("Class extends value "+String(i)+" is not a constructor or null");function r(){this.constructor=n}t(n,i),n.prototype=null===i?Object.create(i):(r.prototype=i.prototype,new r)}}(),Lb=function(t){function n(n){var i=this,r=n||{},e=void 0===r.imageSmoothing||r.imageSmoothing;return void 0!==r.interpolate&&(e=r.interpolate),(i=t.call(this,{attributions:r.attributions,interpolate:e,projection:r.projection,resolutions:r.resolutions,state:r.state})||this).Mc=r.canvasFunction,i.Ut=null,i.jc=0,i.Sc=void 0!==r.ratio?r.ratio:1.5,i}return Fb(n,t),n.prototype.getImageInternal=function(t,n,i,r){n=this.findNearestResolution(n);var e=this.Ut;if(e&&this.jc==this.getRevision()&&e.getResolution()==n&&e.getPixelRatio()==i&&_n(e.getExtent(),t))return e;ri(t=t.slice(),this.Sc);var o=[Qn(t)/n*i,Kn(t)/n*i],s=this.Mc.call(this,t,n,i,o,r);return s&&(e=new Mo(t,n,i,s)),this.Ut=e,this.jc=this.getRevision(),e},n}(Ib),Gb=function(){var t=function(n,i){return(t=Object.setPrototypeOf||{__proto__:[]}instanceof Array&&function(t,n){t.__proto__=n}||function(t,n){for(var i in n)Object.prototype.hasOwnProperty.call(n,i)&&(t[i]=n[i])})(n,i)};return function(n,i){if("function"!=typeof i&&null!==i)throw new TypeError("Class extends value "+String(i)+" is not a constructor or null");function r(){this.constructor=n}t(n,i),n.prototype=null===i?Object.create(i):(r.prototype=i.prototype,new r)}}();var Db=function(t){function n(n){var i=this,r=void 0===n.imageSmoothing||n.imageSmoothing;return void 0!==n.interpolate&&(r=n.interpolate),(i=t.call(this,{interpolate:r,projection:n.projection,resolutions:n.resolutions})||this).Bt=void 0!==n.crossOrigin?n.crossOrigin:null,i._c=void 0!==n.displayDpi?n.displayDpi:96,i.gc=n.params||{},i.Le=n.url,i.Ft=void 0!==n.imageLoadFunction?n.imageLoadFunction:Pb,i.ju=void 0===n.hidpi||n.hidpi,i.dt=void 0!==n.metersPerUnit?n.metersPerUnit:1,i.Sc=void 0!==n.ratio?n.ratio:1,i.Oc=void 0!==n.useOverlay&&n.useOverlay,i.Nt=null,i.jc=0,i}return Gb(n,t),n.prototype.getParams=function(){return this.gc},n.prototype.getImageInternal=function(t,n,i,r){n=this.findNearestResolution(n),i=this.ju?i:1;var e=this.Nt;if(e&&this.jc==this.getRevision()&&e.getResolution()==n&&e.getPixelRatio()==i&&_n(e.getExtent(),t))return e;1!=this.Sc&&ri(t=t.slice(),this.Sc);var o=[Qn(t)/n*i,Kn(t)/n*i];if(void 0!==this.Le){var s=this.getUrl(this.Le,this.gc,t,o,r);(e=new So(t,n,i,s,this.Bt,this.Ft)).addEventListener(N,this.handleImageChange.bind(this))}else e=null;return this.Nt=e,this.jc=this.getRevision(),e},n.prototype.getImageLoadFunction=function(){return this.Ft},n.prototype.updateParams=function(t){E(this.gc,t),this.changed()},n.prototype.getUrl=function(t,n,i,r,e){var o=function(t,n,i,r){var e=Qn(t),o=Kn(t),s=n[0],a=n[1],u=.0254/r;return a*e>s*o?e*i/(s*u):o*i/(a*u)}(i,r,this.dt,this._c),s=Xn(i),a={OPERATION:this.Oc?"GETDYNAMICMAPOVERLAYIMAGE":"GETMAPIMAGE",VERSION:"2.0.0",LOCALE:"en",CLIENTAGENT:"ol/source/ImageMapGuide source",CLIP:"1",SETDISPLAYDPI:this._c,SETDISPLAYWIDTH:Math.round(r[0]),SETDISPLAYHEIGHT:Math.round(r[1]),SETVIEWSCALE:o,SETVIEWCENTERX:s[0],SETVIEWCENTERY:s[1]};return E(a,n),of(t,a)},n.prototype.setImageLoadFunction=function(t){this.Nt=null,this.Ft=t,this.changed()},n}(Ib),Ub=function(){var t=function(n,i){return(t=Object.setPrototypeOf||{__proto__:[]}instanceof Array&&function(t,n){t.__proto__=n}||function(t,n){for(var i in n)Object.prototype.hasOwnProperty.call(n,i)&&(t[i]=n[i])})(n,i)};return function(n,i){if("function"!=typeof i&&null!==i)throw new TypeError("Class extends value "+String(i)+" is not a constructor or null");function r(){this.constructor=n}t(n,i),n.prototype=null===i?Object.create(i):(r.prototype=i.prototype,new r)}}(),qb=function(t){function n(n){var i=this,r=void 0!==n.crossOrigin?n.crossOrigin:null,e=void 0!==n.imageLoadFunction?n.imageLoadFunction:Pb,o=void 0===n.imageSmoothing||n.imageSmoothing;return void 0!==n.interpolate&&(o=n.interpolate),(i=t.call(this,{attributions:n.attributions,interpolate:o,projection:br(n.projection)})||this).Le=n.url,i.Tc=n.imageExtent,i.Nt=new So(i.Tc,void 0,1,i.Le,r,e),i.xc=n.imageSize?n.imageSize:null,i.Nt.addEventListener(N,i.handleImageChange.bind(i)),i}return Ub(n,t),n.prototype.getImageExtent=function(){return this.Tc},n.prototype.getImageInternal=function(t,n,i,r){return ti(t,this.Nt.getExtent())?this.Nt:null},n.prototype.getUrl=function(){return this.Le},n.prototype.handleImageChange=function(n){if(this.Nt.getState()==wo){var i=this.Nt.getExtent(),r=this.Nt.getImage(),e=void 0,o=void 0;this.xc?(e=this.xc[0],o=this.xc[1]):(e=r.width,o=r.height);var s=Qn(i),a=Kn(i),u=s/e,c=a/o,h=e,f=o;if(u>c?h=Math.round(s/c):f=Math.round(a/u),h!==e||f!==o){var l=_o(h,f);this.getInterpolate()||E(l,Fh);var v=l.canvas;l.drawImage(r,0,0,e,o,0,0,v.width,v.height),this.Nt.setImage(v)}}t.prototype.handleImageChange.call(this,n)},n}(Ib),Bb="1.3.0",Wb="carmentaserver",Vb="geoserver",Xb="mapserver",Hb="qgis",Jb=function(){var t=function(n,i){return(t=Object.setPrototypeOf||{__proto__:[]}instanceof Array&&function(t,n){t.__proto__=n}||function(t,n){for(var i in n)Object.prototype.hasOwnProperty.call(n,i)&&(t[i]=n[i])})(n,i)};return function(n,i){if("function"!=typeof i&&null!==i)throw new TypeError("Class extends value "+String(i)+" is not a constructor or null");function r(){this.constructor=n}t(n,i),n.prototype=null===i?Object.create(i):(r.prototype=i.prototype,new r)}}(),Kb=[101,101],Yb=function(t){function n(n){var i=this,r=n||{},e=void 0===r.imageSmoothing||r.imageSmoothing;return void 0!==r.interpolate&&(e=r.interpolate),(i=t.call(this,{attributions:r.attributions,interpolate:e,projection:r.projection,resolutions:r.resolutions})||this).Bt=void 0!==r.crossOrigin?r.crossOrigin:null,i.Le=r.url,i.Ft=void 0!==r.imageLoadFunction?r.imageLoadFunction:Pb,i.gc=r.params||{},i.Ec=!0,i.Ac(),i.Cc=r.serverType,i.ju=void 0===r.hidpi||r.hidpi,i.Nt=null,i.xc=[0,0],i.jc=0,i.Sc=void 0!==r.ratio?r.ratio:1.5,i}return Jb(n,t),n.prototype.getFeatureInfoUrl=function(t,n,i,r){if(void 0!==this.Le){var e=br(i),o=this.getProjection();o&&o!==e&&(n=Uh(o,e,t,n),t=Ar(t,e,o));var s=Jn(t,n,0,Kb),a={SERVICE:"WMS",VERSION:Bb,REQUEST:"GetFeatureInfo",FORMAT:"image/png",TRANSPARENT:!0,QUERY_LAYERS:this.gc.LAYERS};E(a,this.gc,r);var u=gi((t[0]-s[0])/n,4),c=gi((s[3]-t[1])/n,4);return a[this.Ec?"I":"X"]=u,a[this.Ec?"J":"Y"]=c,this.kc(s,Kb,1,o||e,a)}},n.prototype.getLegendUrl=function(t,n){if(void 0!==this.Le){var i={SERVICE:"WMS",VERSION:Bb,REQUEST:"GetLegendGraphic",FORMAT:"image/png"};if(void 0===n||void 0===n.LAYER){var r=this.gc.LAYERS;if(!(!Array.isArray(r)||1===r.length))return;i.LAYER=r}if(void 0!==t){var e=this.getProjection()?this.getProjection().getMetersPerUnit():1;i.SCALE=t*e/28e-5}return E(i,n),of(this.Le,i)}},n.prototype.getParams=function(){return this.gc},n.prototype.getImageInternal=function(t,n,i,r){if(void 0===this.Le)return null;n=this.findNearestResolution(n),1==i||this.ju&&void 0!==this.Cc||(i=1);var e=n/i,o=Xn(t),s=Jn(o,e,0,[xi(Qn(t)/e,4),xi(Kn(t)/e,4)]),a=Jn(o,e,0,[xi(this.Sc*Qn(t)/e,4),xi(this.Sc*Kn(t)/e,4)]),u=this.Nt;if(u&&this.jc==this.getRevision()&&u.getResolution()==n&&u.getPixelRatio()==i&&_n(u.getExtent(),s))return u;var c={SERVICE:"WMS",VERSION:Bb,REQUEST:"GetMap",FORMAT:"image/png",TRANSPARENT:!0};E(c,this.gc),this.xc[0]=bi(Qn(a)/e,4),this.xc[1]=bi(Kn(a)/e,4);var h=this.kc(a,this.xc,i,r,c);return this.Nt=new So(a,n,i,h,this.Bt,this.Ft),this.jc=this.getRevision(),this.Nt.addEventListener(N,this.handleImageChange.bind(this)),this.Nt},n.prototype.getImageLoadFunction=function(){return this.Ft},n.prototype.kc=function(t,n,i,r,e){if(Mt(void 0!==this.Le,9),e[this.Ec?"CRS":"SRS"]=r.getCode(),"STYLES"in this.gc||(e.STYLES=""),1!=i)switch(this.Cc){case Vb:var o=90*i+.5|0;"FORMAT_OPTIONS"in e?e.FORMAT_OPTIONS+=";dpi:"+o:e.FORMAT_OPTIONS="dpi:"+o;break;case Xb:e.MAP_RESOLUTION=90*i;break;case Wb:case Hb:e.DPI=90*i;break;default:Mt(!1,8)}e.WIDTH=n[0],e.HEIGHT=n[1];var s,a=r.getAxisOrientation();return s=this.Ec&&"ne"==a.substr(0,2)?[t[1],t[0],t[3],t[2]]:t,e.BBOX=s.join(","),of(this.Le,e)},n.prototype.getUrl=function(){return this.Le},n.prototype.setImageLoadFunction=function(t){this.Nt=null,this.Ft=t,this.changed()},n.prototype.setUrl=function(t){t!=this.Le&&(this.Le=t,this.Nt=null,this.changed())},n.prototype.updateParams=function(t){E(this.gc,t),this.Ac(),this.Nt=null,this.changed()},n.prototype.Ac=function(){var t=this.gc.VERSION||Bb;this.Ec=Hi(t,"1.3")>=0},n}(Ib),Zb={"image/png":!0,"image/jpeg":!0,"image/gif":!0,"image/webp":!0},$b={"application/vnd.mapbox-vector-tile":!0,"application/geo+json":!0};function Qb(t,n){for(var i,r,e=0;el.maxTileCol||c.tileRowl.maxTileRow)return}E(c,T);var v=i.replace(/\{(\w+?)\}/g,(function(t,n){return c[n]}));return bh(A,v)}}}}function ig(t){return wh(t.url).then((function(n){return function(t,n){var i,r=n.tileMatrixSetLimits;if("map"===n.dataType)i=Qb(n.links,t.mediaType);else{if("vector"!==n.dataType)throw new Error('Expected tileset data type to be "map" or "vector"');i=tg(n.links,t.mediaType,t.supportedMediaTypes)}if(n.tileMatrixSet)return ng(t,n.tileMatrixSet,i,r);var e=n.links.find((function(t){return"http://www.opengis.net/def/rel/ogc/1.0/tiling-scheme"===t.rel}));if(!e)throw new Error("Expected http://www.opengis.net/def/rel/ogc/1.0/tiling-scheme link or tileMatrixSet");var o=e.href;return wh(bh(t.url,o)).then((function(n){return ng(t,n,i,r)}))}(t,n)}))}var rg=function(){var t=function(n,i){return(t=Object.setPrototypeOf||{__proto__:[]}instanceof Array&&function(t,n){t.__proto__=n}||function(t,n){for(var i in n)Object.prototype.hasOwnProperty.call(n,i)&&(t[i]=n[i])})(n,i)};return function(n,i){if("function"!=typeof i&&null!==i)throw new TypeError("Class extends value "+String(i)+" is not a constructor or null");function r(){this.constructor=n}t(n,i),n.prototype=null===i?Object.create(i):(r.prototype=i.prototype,new r)}}(),eg=function(t){function n(n){var i=this,r=void 0===n.imageSmoothing||n.imageSmoothing;return void 0!==n.interpolate&&(r=n.interpolate),i=t.call(this,{attributions:n.attributions,cacheSize:n.cacheSize,crossOrigin:n.crossOrigin,interpolate:r,projection:n.projection,reprojectionErrorThreshold:n.reprojectionErrorThreshold,state:ds,tileLoadFunction:n.tileLoadFunction,wrapX:void 0===n.wrapX||n.wrapX,transition:n.transition})||this,ig({url:n.url,projection:i.getProjection(),mediaType:n.mediaType,context:n.context||null}).then(i.Rc.bind(i)).catch(i.Pc.bind(i)),i}return rg(n,t),n.prototype.Rc=function(t){this.tileGrid=t.grid,this.setTileUrlFunction(t.urlFunction,t.urlTemplate),this.setState(ps)},n.prototype.Pc=function(t){console.error(t),this.setState(ys)},n}(md),og=function(){var t=function(n,i){return(t=Object.setPrototypeOf||{__proto__:[]}instanceof Array&&function(t,n){t.__proto__=n}||function(t,n){for(var i in n)Object.prototype.hasOwnProperty.call(n,i)&&(t[i]=n[i])})(n,i)};return function(n,i){if("function"!=typeof i&&null!==i)throw new TypeError("Class extends value "+String(i)+" is not a constructor or null");function r(){this.constructor=n}t(n,i),n.prototype=null===i?Object.create(i):(r.prototype=i.prototype,new r)}}(),sg=function(t){function n(n){var i=this,r=n.projection||"EPSG:3857",e=n.extent||$h(r),o=n.tileGrid||Kh({extent:e,maxResolution:n.maxResolution,maxZoom:void 0!==n.maxZoom?n.maxZoom:22,minZoom:n.minZoom,tileSize:n.tileSize||512});return(i=t.call(this,{attributions:n.attributions,attributionsCollapsible:n.attributionsCollapsible,cacheSize:n.cacheSize,interpolate:!0,opaque:!1,projection:r,state:n.state,tileGrid:o,tileLoadFunction:n.tileLoadFunction?n.tileLoadFunction:ag,tileUrlFunction:n.tileUrlFunction,url:n.url,urls:n.urls,wrapX:void 0===n.wrapX||n.wrapX,transition:n.transition,zDirection:void 0===n.zDirection?1:n.zDirection})||this).ze=n.format?n.format:null,i.sourceTileCache=new Kc(i.tileCache.highWaterMark),i.Nu=null==n.overlaps||n.overlaps,i.tileClass=n.tileClass?n.tileClass:rh,i.Ic={},i}return og(n,t),n.prototype.getFeaturesInExtent=function(t){var n=[],i=this.tileCache;if(0===i.getCount())return n;var r=Vc(i.peekFirstKey())[0],e=this.tileGrid;return i.forEach((function(i){if(i.tileCoord[0]===r&&i.getState()===dt)for(var o=i.getSourceTiles(),s=0,a=o.length;s=s.width)return null;var c=Kn(o),h=Math.floor(s.height*((o[3]-r[1])/c));return h<0||h>=s.height?null:this.getImageData(s,u,h)},n.prototype.renderFrame=function(t,n){var i=this.Nt,r=i.getExtent(),e=i.getResolution(),o=i.getPixelRatio(),s=t.layerStatesArray[t.layerIndex],a=t.pixelRatio,u=t.viewState,c=u.center,h=u.resolution,f=t.size,l=a*e/(h*o),v=Math.round(f[0]*a),d=Math.round(f[1]*a),p=u.rotation;if(p){var y=Math.round(Math.sqrt(v*v+d*d));v=y,d=y}an(this.pixelTransform,t.size[0]/2,t.size[1]/2,1/a,1/a,p,-v/2,-d/2),un(this.inversePixelTransform,this.pixelTransform);var m=hn(this.pixelTransform);this.useContainer(n,m,s.opacity,this.getBackground(t));var w=this.context,b=w.canvas;b.width!=v||b.height!=d?(b.width=v,b.height=d):this.containerReused||w.clearRect(0,0,v,d);var g=!1,x=!0;if(s.extent){var j=Lr(s.extent,u.projection);(g=(x=ti(j,t.extent))&&!_n(j,t.extent))&&this.clipUnrotated(w,t,j)}var S=i.getImage(),k=an(this.tempTransform,v/2,d/2,l,l,0,o*(r[0]-c[0])/e,o*(c[1]-r[3])/e);this.renderedResolution=e*a/o;var M=S.width*k[0],_=S.height*k[3];if(this.getLayer().getSource().getInterpolate()||E(w,Fh),this.preRender(w,t),x&&M>=.5&&_>=.5){var O=k[4],T=k[5],A=s.opacity,C=void 0;1!==A&&(C=w.globalAlpha,w.globalAlpha=A),w.drawImage(S,0,0,+S.width,+S.height,Math.round(O),Math.round(T),Math.round(M),Math.round(_)),1!==A&&(w.globalAlpha=C)}return this.postRender(w,t),g&&w.restore(),E(w,Lh),m!==b.style.transform&&(b.style.transform=m),this.container},n}(wg),xg=function(){var t=function(n,i){return(t=Object.setPrototypeOf||{__proto__:[]}instanceof Array&&function(t,n){t.__proto__=n}||function(t,n){for(var i in n)Object.prototype.hasOwnProperty.call(n,i)&&(t[i]=n[i])})(n,i)};return function(n,i){if("function"!=typeof i&&null!==i)throw new TypeError("Class extends value "+String(i)+" is not a constructor or null");function r(){this.constructor=n}t(n,i),n.prototype=null===i?Object.create(i):(r.prototype=i.prototype,new r)}}(),jg=function(t){function n(n){return t.call(this,n)||this}return xg(n,t),n.prototype.createRenderer=function(){return new gg(this)},n.prototype.getData=function(n){return t.prototype.getData.call(this,n)},n}(dg),Sg="preload",kg="useInterimTilesOnError",Mg=function(){var t=function(n,i){return(t=Object.setPrototypeOf||{__proto__:[]}instanceof Array&&function(t,n){t.__proto__=n}||function(t,n){for(var i in n)Object.prototype.hasOwnProperty.call(n,i)&&(t[i]=n[i])})(n,i)};return function(n,i){if("function"!=typeof i&&null!==i)throw new TypeError("Class extends value "+String(i)+" is not a constructor or null");function r(){this.constructor=n}t(n,i),n.prototype=null===i?Object.create(i):(r.prototype=i.prototype,new r)}}(),_g=function(t){function n(n){var i=this,r=n||{},e=E({},r);return delete e.preload,delete e.useInterimTilesOnError,(i=t.call(this,e)||this).on,i.once,i.un,i.setPreload(void 0!==r.preload?r.preload:0),i.setUseInterimTilesOnError(void 0===r.useInterimTilesOnError||r.useInterimTilesOnError),i}return Mg(n,t),n.prototype.getPreload=function(){return this.get(Sg)},n.prototype.setPreload=function(t){this.set(Sg,t)},n.prototype.getUseInterimTilesOnError=function(){return this.get(kg)},n.prototype.setUseInterimTilesOnError=function(t){this.set(kg,t)},n.prototype.getData=function(n){return t.prototype.getData.call(this,n)},n}(bs),Og=function(){var t=function(n,i){return(t=Object.setPrototypeOf||{__proto__:[]}instanceof Array&&function(t,n){t.__proto__=n}||function(t,n){for(var i in n)Object.prototype.hasOwnProperty.call(n,i)&&(t[i]=n[i])})(n,i)};return function(n,i){if("function"!=typeof i&&null!==i)throw new TypeError("Class extends value "+String(i)+" is not a constructor or null");function r(){this.constructor=n}t(n,i),n.prototype=null===i?Object.create(i):(r.prototype=i.prototype,new r)}}(),Tg=function(t){function n(n){var i=t.call(this,n)||this;return i.extentChanged=!0,i.Nc=null,i.renderedPixelRatio,i.renderedProjection=null,i.renderedRevision,i.renderedTiles=[],i.zc=!1,i.tmpExtent=[1/0,1/0,-1/0,-1/0],i.Fc=new $c(0,0,0,0),i}return Og(n,t),n.prototype.isDrawableTile=function(t){var n=this.getLayer(),i=t.getState(),r=n.getUseInterimTilesOnError();return i==dt||i==yt||i==pt&&!r},n.prototype.getTile=function(t,n,i,r){var e=r.pixelRatio,o=r.viewState.projection,s=this.getLayer(),a=s.getSource().getTile(t,n,i,e,o);return a.getState()==pt&&(s.getUseInterimTilesOnError()?s.getPreload()>0&&(this.zc=!0):a.setState(dt)),this.isDrawableTile(a)||(a=a.getInterimTile()),a},n.prototype.getData=function(t){var n=this.frameState;if(!n)return null;var i=this.getLayer(),r=nn(n.pixelToCoordinateTransform,t.slice()),e=i.getExtent();if(e&&!Mn(e,r))return null;for(var o=n.pixelRatio,s=n.viewState.projection,a=n.viewState,u=i.getRenderSource(),c=u.getTileGridForProjection(a.projection),h=u.getTilePixelRatio(n.pixelRatio),f=c.getZForResolution(a.resolution);f>=c.getMinZoom();--f){var l=c.getTileCoordForCoordAndZ(r,f),v=u.getTile(f,l[1],l[2],o,s);if(!(v instanceof Io||v instanceof dl))return null;if(v.getState()===dt){var d=c.getOrigin(f),p=ou(c.getTileSize(f)),y=c.getResolution(f),m=Math.floor(h*((r[0]-d[0])/y-l[1]*p[0])),w=Math.floor(h*((d[1]-r[1])/y-l[2]*p[1]));return this.getImageData(v.getImage(),m,w)}}return null},n.prototype.loadedTileCallback=function(n,i,r){return!!this.isDrawableTile(r)&&t.prototype.loadedTileCallback.call(this,n,i,r)},n.prototype.prepareFrame=function(t){return!!this.getLayer().getSource()},n.prototype.renderFrame=function(t,n){var i=t.layerStatesArray[t.layerIndex],r=t.viewState,e=r.projection,s=r.resolution,a=r.center,u=r.rotation,c=t.pixelRatio,h=this.getLayer(),f=h.getSource(),l=f.getRevision(),v=f.getTileGridForProjection(e),d=v.getZForResolution(s,f.zDirection),y=v.getResolution(d),m=t.extent,w=i.extent&&Lr(i.extent,e);w&&(m=Yn(m,Lr(i.extent,e)));var b=f.getTilePixelRatio(c),g=Math.round(t.size[0]*b),x=Math.round(t.size[1]*b);if(u){var j=Math.round(Math.sqrt(g*g+x*x));g=j,x=j}var S=y*g/2/b,k=y*x/2/b,M=[a[0]-S,a[1]-k,a[0]+S,a[1]+k],_=v.getTileRangeForExtentAndZ(m,d),O={};O[d]={};var T=this.createLoadedTileFinder(f,e,O),A=this.tmpExtent,C=this.Fc;this.zc=!1;for(var R=_.minX;R<=_.maxX;++R)for(var P=_.minY;P<=_.maxY;++P){var I=this.getTile(d,R,P,t);if(this.isDrawableTile(I)){var N=o(this);if(I.getState()==dt){O[d][I.tileCoord.toString()]=I;var z=I.inTransition(N);this.zc||!z&&-1!==this.renderedTiles.indexOf(I)||(this.zc=!0)}if(1===I.getAlpha(N,t.time))continue}var F=v.getTileCoordChildTileRange(I.tileCoord,C,A),L=!1;F&&(L=T(d+1,F)),L||v.forEachTileCoordParentTileRange(I.tileCoord,T,C,A)}var G=y/s;an(this.pixelTransform,t.size[0]/2,t.size[1]/2,1/b,1/b,u,-g/2,-x/2);var D=hn(this.pixelTransform);this.useContainer(n,D,i.opacity,this.getBackground(t));var U=this.context,q=U.canvas;un(this.inversePixelTransform,this.pixelTransform),an(this.tempTransform,g/2,x/2,G,G,0,-g/2,-x/2),q.width!=g||q.height!=x?(q.width=g,q.height=x):this.containerReused||U.clearRect(0,0,g,x),w&&this.clipUnrotated(U,t,w),f.getInterpolate()||E(U,Fh),this.preRender(U,t),this.renderedTiles.length=0;var B,W,V,X=Object.keys(O).map(Number);X.sort(p),1!==i.opacity||this.containerReused&&!f.getOpaque(t.viewState.projection)?(B=[],W=[]):X=X.reverse();for(var H=X.length-1;H>=0;--H){var J=X[H],K=f.getTilePixelSize(J,c,e),Y=v.getResolution(J)/y,Z=K[0]*Y*G,$=K[1]*Y*G,Q=v.getTileCoordForCoordAndZ(Zn(M),J),tt=v.getTileCoordExtent(Q),nt=nn(this.tempTransform,[b*(tt[0]-M[0])/y,b*(M[3]-tt[3])/y]),it=b*f.getGutterForProjection(e),rt=O[J];for(var et in rt){var ot=(I=rt[et]).tileCoord,st=Q[1]-ot[1],at=Math.round(nt[0]-(st-1)*Z),ut=Q[2]-ot[2],ct=Math.round(nt[1]-(ut-1)*$),ht=at-(R=Math.round(nt[0]-st*Z)),ft=ct-(P=Math.round(nt[1]-ut*$)),lt=d===J,vt=!1;if(!(z=lt&&1!==I.getAlpha(o(this),t.time)))if(B){V=[R,P,R+ht,P,R+ht,P+ft,R,P+ft];for(var pt=0,yt=B.length;ptthis._maxQueueLength;)this._queue.shift().callback(null,null)},n.prototype._dispatch=function(){if(!this._running&&0!==this._queue.length){var t=this._queue.shift();this._job=t;var n=t.inputs[0].width,i=t.inputs[0].height,r=t.inputs.map((function(t){return t.data.buffer})),e=this._workers.length;if(this._running=e,1!==e)for(var o=t.inputs[0].data.length,s=4*Math.ceil(o/4/e),a=0;aStamen Design, under CC BY 3.0.',fg],Kg={terrain:{extension:"jpg",opaque:!0},"terrain-background":{extension:"jpg",opaque:!0},"terrain-labels":{extension:"png",opaque:!1},"terrain-lines":{extension:"png",opaque:!1},"toner-background":{extension:"png",opaque:!0},toner:{extension:"png",opaque:!0},"toner-hybrid":{extension:"png",opaque:!1},"toner-labels":{extension:"png",opaque:!1},"toner-lines":{extension:"png",opaque:!1},"toner-lite":{extension:"png",opaque:!0},watercolor:{extension:"jpg",opaque:!0}},Yg={terrain:{minZoom:0,maxZoom:18},toner:{minZoom:0,maxZoom:20},watercolor:{minZoom:0,maxZoom:18}},Zg=function(t){function n(n){var i=void 0===n.imageSmoothing||n.imageSmoothing;void 0!==n.interpolate&&(i=n.interpolate);var r=n.layer.indexOf("-"),e=-1==r?n.layer:n.layer.slice(0,r),o=Yg[e],s=Kg[n.layer],a=void 0!==n.url?n.url:"https://stamen-tiles-{a-d}.a.ssl.fastly.net/"+n.layer+"/{z}/{x}/{y}."+s.extension;return t.call(this,{attributions:Jg,cacheSize:n.cacheSize,crossOrigin:"anonymous",interpolate:i,maxZoom:null!=n.maxZoom?n.maxZoom:o.maxZoom,minZoom:null!=n.minZoom?n.minZoom:o.minZoom,opaque:s.opaque,reprojectionErrorThreshold:n.reprojectionErrorThreshold,tileLoadFunction:n.tileLoadFunction,transition:n.transition,url:a,wrapX:n.wrapX,zDirection:n.zDirection})||this}return Hg(n,t),n}(jd),$g=function(){var t=function(n,i){return(t=Object.setPrototypeOf||{__proto__:[]}instanceof Array&&function(t,n){t.__proto__=n}||function(t,n){for(var i in n)Object.prototype.hasOwnProperty.call(n,i)&&(t[i]=n[i])})(n,i)};return function(n,i){if("function"!=typeof i&&null!==i)throw new TypeError("Class extends value "+String(i)+" is not a constructor or null");function r(){this.constructor=n}t(n,i),n.prototype=null===i?Object.create(i):(r.prototype=i.prototype,new r)}}(),Qg=function(t){function n(n){var i=this,r=n||{},e=void 0===r.imageSmoothing||r.imageSmoothing;return void 0!==r.interpolate&&(e=r.interpolate),(i=t.call(this,{attributions:r.attributions,cacheSize:r.cacheSize,crossOrigin:r.crossOrigin,interpolate:e,projection:r.projection,reprojectionErrorThreshold:r.reprojectionErrorThreshold,tileGrid:r.tileGrid,tileLoadFunction:r.tileLoadFunction,url:r.url,urls:r.urls,wrapX:void 0===r.wrapX||r.wrapX,transition:r.transition,zDirection:r.zDirection})||this).gc=r.params||{},i.ju=void 0===r.hidpi||r.hidpi,i.Eo=[1/0,1/0,-1/0,-1/0],i.setKey(i.Jc()),i}return $g(n,t),n.prototype.Jc=function(){var t=0,n=[];for(var i in this.gc)n[t++]=i+"-"+this.gc[i];return n.join("/")},n.prototype.getParams=function(){return this.gc},n.prototype.kc=function(t,n,i,r,e,o){var s=this.urls;if(s){var a,u=e.getCode().split(/:(?=\d+$)/).pop();if(o.SIZE=n[0]+","+n[1],o.BBOX=i.join(","),o.BBOXSR=u,o.IMAGESR=u,o.DPI=Math.round(o.DPI?o.DPI*r:90*r),1==s.length)a=s[0];else a=s[yi(Xc(t),s.length)];return of(a.replace(/MapServer\/?$/,"MapServer/export").replace(/ImageServer\/?$/,"ImageServer/exportImage"),o)}},n.prototype.getTilePixelRatio=function(t){return this.ju?t:1},n.prototype.updateParams=function(t){E(this.gc,t),this.setKey(this.Jc())},n.prototype.tileUrlFunction=function(t,n,i){var r=this.getTileGrid();if(r||(r=this.getTileGridForProjection(i)),!(r.getResolutions().length<=t[0])){1==n||this.ju||(n=1);var e=r.getTileCoordExtent(t,this.Eo),o=ou(r.getTileSize(t[0]),this.tmpSize);1!=n&&(o=eu(o,n,this.tmpSize));var s={F:"image",FORMAT:"PNG32",TRANSPARENT:!0};return E(s,this.gc),this.kc(t,o,e,n,i,s)}},n}(md),tx=function(){var t=function(n,i){return(t=Object.setPrototypeOf||{__proto__:[]}instanceof Array&&function(t,n){t.__proto__=n}||function(t,n){for(var i in n)Object.prototype.hasOwnProperty.call(n,i)&&(t[i]=n[i])})(n,i)};return function(n,i){if("function"!=typeof i&&null!==i)throw new TypeError("Class extends value "+String(i)+" is not a constructor or null");function r(){this.constructor=n}t(n,i),n.prototype=null===i?Object.create(i):(r.prototype=i.prototype,new r)}}(),nx=function(t){function n(n){var i=this,r=n||{};return i=t.call(this,{opaque:!1,projection:r.projection,tileGrid:r.tileGrid,wrapX:void 0===r.wrapX||r.wrapX,zDirection:r.zDirection,url:r.template||"z:{z} x:{x} y:{y}",tileLoadFunction:function(t,n){var r=t.getTileCoord()[0],e=ou(i.tileGrid.getTileSize(r)),o=_o(e[0],e[1]);o.strokeStyle="grey",o.strokeRect(.5,.5,e[0]+.5,e[1]+.5),o.fillStyle="grey",o.strokeStyle="white",o.textAlign="center",o.textBaseline="middle",o.font="24px sans-serif",o.lineWidth=4,o.strokeText(n,e[0]/2,e[1]/2,e[0]),o.fillText(n,e[0]/2,e[1]/2,e[0]),t.setImage(o.canvas)}})||this}return tx(n,t),n}(jd),ix=function(){var t=function(n,i){return(t=Object.setPrototypeOf||{__proto__:[]}instanceof Array&&function(t,n){t.__proto__=n}||function(t,n){for(var i in n)Object.prototype.hasOwnProperty.call(n,i)&&(t[i]=n[i])})(n,i)};return function(n,i){if("function"!=typeof i&&null!==i)throw new TypeError("Class extends value "+String(i)+" is not a constructor or null");function r(){this.constructor=n}t(n,i),n.prototype=null===i?Object.create(i):(r.prototype=i.prototype,new r)}}(),rx=function(t){function n(n){var i=this,r=void 0===n.imageSmoothing||n.imageSmoothing;if(void 0!==n.interpolate&&(r=n.interpolate),(i=t.call(this,{attributions:n.attributions,cacheSize:n.cacheSize,crossOrigin:n.crossOrigin,interpolate:r,projection:br("EPSG:3857"),reprojectionErrorThreshold:n.reprojectionErrorThreshold,state:ds,tileLoadFunction:n.tileLoadFunction,wrapX:void 0===n.wrapX||n.wrapX,transition:n.transition,zDirection:n.zDirection})||this).Kc=null,i._o=n.tileSize,n.url)if(n.jsonp)dh(n.url,i.handleTileJSONResponse.bind(i),i.handleTileJSONError.bind(i));else{var e=new XMLHttpRequest;e.addEventListener("load",i.Yc.bind(i)),e.addEventListener("error",i.Zc.bind(i)),e.open("GET",n.url),e.send()}else n.tileJSON?i.handleTileJSONResponse(n.tileJSON):Mt(!1,51);return i}return ix(n,t),n.prototype.Yc=function(t){var n=t.target;if(!n.status||n.status>=200&&n.status<300){var i=void 0;try{i=JSON.parse(n.responseText)}catch(t){return void this.handleTileJSONError()}this.handleTileJSONResponse(i)}else this.handleTileJSONError()},n.prototype.Zc=function(t){this.handleTileJSONError()},n.prototype.getTileJSON=function(){return this.Kc},n.prototype.handleTileJSONResponse=function(t){var n,i=br("EPSG:4326"),r=this.getProjection();if(void 0!==t.bounds){var e=Tr(i,r);n=oi(t.bounds,e)}var o=$h(r),s=t.minzoom||0,a=Kh({extent:o,maxZoom:t.maxzoom||22,minZoom:s,tileSize:this._o});if(this.tileGrid=a,this.tileUrlFunction=tf(t.tiles,a),void 0!==t.attribution&&!this.getAttributions()){var u=void 0!==n?n:o;this.setAttributions((function(n){return ti(u,n.extent)?[t.attribution]:null}))}this.Kc=t,this.setState(ps)},n.prototype.handleTileJSONError=function(){this.setState(ys)},n}(md),ex=function(){var t=function(n,i){return(t=Object.setPrototypeOf||{__proto__:[]}instanceof Array&&function(t,n){t.__proto__=n}||function(t,n){for(var i in n)Object.prototype.hasOwnProperty.call(n,i)&&(t[i]=n[i])})(n,i)};return function(n,i){if("function"!=typeof i&&null!==i)throw new TypeError("Class extends value "+String(i)+" is not a constructor or null");function r(){this.constructor=n}t(n,i),n.prototype=null===i?Object.create(i):(r.prototype=i.prototype,new r)}}(),ox=function(t){function n(n){var i=this,r=n||{},e=void 0===r.imageSmoothing||r.imageSmoothing;void 0!==r.interpolate&&(e=r.interpolate);var o=r.params||{},s=!("TRANSPARENT"in o)||o.TRANSPARENT;return(i=t.call(this,{attributions:r.attributions,attributionsCollapsible:r.attributionsCollapsible,cacheSize:r.cacheSize,crossOrigin:r.crossOrigin,interpolate:e,opaque:!s,projection:r.projection,reprojectionErrorThreshold:r.reprojectionErrorThreshold,tileClass:r.tileClass,tileGrid:r.tileGrid,tileLoadFunction:r.tileLoadFunction,url:r.url,urls:r.urls,wrapX:void 0===r.wrapX||r.wrapX,transition:r.transition,zDirection:r.zDirection})||this).Ts=void 0!==r.gutter?r.gutter:0,i.gc=o,i.Ec=!0,i.Cc=r.serverType,i.ju=void 0===r.hidpi||r.hidpi,i.Eo=[1/0,1/0,-1/0,-1/0],i.Ac(),i.setKey(i.Jc()),i}return ex(n,t),n.prototype.getFeatureInfoUrl=function(t,n,i,r){var e=br(i),o=this.getProjection(),s=this.getTileGrid();s||(s=this.getTileGridForProjection(e));var a=s.getZForResolution(n,this.zDirection),u=s.getTileCoordForCoordAndZ(t,a);if(!(s.getResolutions().length<=u[0])){var c=s.getResolution(u[0]),h=s.getTileCoordExtent(u,this.Eo),f=ou(s.getTileSize(u[0]),this.tmpSize),l=this.Ts;0!==l&&(f=iu(f,l,this.tmpSize),h=jn(h,c*l,h)),o&&o!==e&&(c=Uh(o,e,t,c),h=Cr(h,e,o),t=Ar(t,e,o));var v={SERVICE:"WMS",VERSION:Bb,REQUEST:"GetFeatureInfo",FORMAT:"image/png",TRANSPARENT:!0,QUERY_LAYERS:this.gc.LAYERS};E(v,this.gc,r);var d=Math.floor((t[0]-h[0])/c),p=Math.floor((h[3]-t[1])/c);return v[this.Ec?"I":"X"]=d,v[this.Ec?"J":"Y"]=p,this.kc(u,f,h,1,o||e,v)}},n.prototype.getLegendUrl=function(t,n){if(void 0!==this.urls[0]){var i={SERVICE:"WMS",VERSION:Bb,REQUEST:"GetLegendGraphic",FORMAT:"image/png"};if(void 0===n||void 0===n.LAYER){var r=this.gc.LAYERS;if(!(!Array.isArray(r)||1===r.length))return;i.LAYER=r}if(void 0!==t){var e=this.getProjection()?this.getProjection().getMetersPerUnit():1;i.SCALE=t*e/28e-5}return E(i,n),of(this.urls[0],i)}},n.prototype.getGutter=function(){return this.Ts},n.prototype.getParams=function(){return this.gc},n.prototype.kc=function(t,n,i,r,e,o){var s=this.urls;if(s){if(o.WIDTH=n[0],o.HEIGHT=n[1],o[this.Ec?"CRS":"SRS"]=e.getCode(),"STYLES"in this.gc||(o.STYLES=""),1!=r)switch(this.Cc){case Vb:var a=90*r+.5|0;"FORMAT_OPTIONS"in o?o.FORMAT_OPTIONS+=";dpi:"+a:o.FORMAT_OPTIONS="dpi:"+a;break;case Xb:o.MAP_RESOLUTION=90*r;break;case Wb:case Hb:o.DPI=90*r;break;default:Mt(!1,52)}var u,c=e.getAxisOrientation(),h=i;if(this.Ec&&"ne"==c.substr(0,2)){var f=void 0;f=i[0],h[0]=i[1],h[1]=f,f=i[2],h[2]=i[3],h[3]=f}if(o.BBOX=h.join(","),1==s.length)u=s[0];else u=s[yi(Xc(t),s.length)];return of(u,o)}},n.prototype.getTilePixelRatio=function(t){return this.ju&&void 0!==this.Cc?t:1},n.prototype.Jc=function(){var t=0,n=[];for(var i in this.gc)n[t++]=i+"-"+this.gc[i];return n.join("/")},n.prototype.updateParams=function(t){E(this.gc,t),this.Ac(),this.setKey(this.Jc())},n.prototype.Ac=function(){var t=this.gc.VERSION||Bb;this.Ec=Hi(t,"1.3")>=0},n.prototype.tileUrlFunction=function(t,n,i){var r=this.getTileGrid();if(r||(r=this.getTileGridForProjection(i)),!(r.getResolutions().length<=t[0])){1==n||this.ju&&void 0!==this.Cc||(n=1);var e=r.getResolution(t[0]),o=r.getTileCoordExtent(t,this.Eo),s=ou(r.getTileSize(t[0]),this.tmpSize),a=this.Ts;0!==a&&(s=iu(s,a,this.tmpSize),o=jn(o,e*a,o)),1!=n&&(s=eu(s,n,this.tmpSize));var u={SERVICE:"WMS",VERSION:Bb,REQUEST:"GetMap",FORMAT:"image/png",TRANSPARENT:!0};return E(u,this.gc),this.kc(t,s,o,n,i,u)}},n}(md),sx=function(){var t=function(n,i){return(t=Object.setPrototypeOf||{__proto__:[]}instanceof Array&&function(t,n){t.__proto__=n}||function(t,n){for(var i in n)Object.prototype.hasOwnProperty.call(n,i)&&(t[i]=n[i])})(n,i)};return function(n,i){if("function"!=typeof i&&null!==i)throw new TypeError("Class extends value "+String(i)+" is not a constructor or null");function r(){this.constructor=n}t(n,i),n.prototype=null===i?Object.create(i):(r.prototype=i.prototype,new r)}}(),ax=function(t){function n(n,i,r,e,o,s){var a=t.call(this,n,i)||this;return a.Pt=r,a.st=e,a.$c=o,a.Qc=null,a.th=null,a.B=null,a.nh=s,a}return sx(n,t),n.prototype.getImage=function(){return null},n.prototype.getData=function(t){if(!this.Qc||!this.th)return null;var n=(t[0]-this.st[0])/(this.st[2]-this.st[0]),i=(t[1]-this.st[1])/(this.st[3]-this.st[1]),r=this.Qc[Math.floor((1-i)*this.Qc.length)];if("string"!=typeof r)return null;var e=r.charCodeAt(Math.floor(n*r.length));e>=93&&e--,e>=35&&e--;var o=null;if((e-=32)in this.th){var s=this.th[e];o=this.B&&s in this.B?this.B[s]:s}return o},n.prototype.forDataAtCoordinate=function(t,n,i){this.state==yt&&!0===i?(this.state=lt,Z(this,N,(function(i){n(this.getData(t))}),this),this.ih()):!0===i?setTimeout(function(){n(this.getData(t))}.bind(this),0):n(this.getData(t))},n.prototype.getKey=function(){return this.Pt},n.prototype.Pc=function(){this.state=pt,this.changed()},n.prototype.qt=function(t){this.Qc=t.grid,this.th=t.keys,this.B=t.data,this.state=dt,this.changed()},n.prototype.ih=function(){if(this.state==lt)if(this.state=vt,this.nh)dh(this.Pt,this.qt.bind(this),this.Pc.bind(this));else{var t=new XMLHttpRequest;t.addEventListener("load",this.Yc.bind(this)),t.addEventListener("error",this.Zc.bind(this)),t.open("GET",this.Pt),t.send()}},n.prototype.Yc=function(t){var n=t.target;if(!n.status||n.status>=200&&n.status<300){var i=void 0;try{i=JSON.parse(n.responseText)}catch(t){return void this.Pc()}this.qt(i)}else this.Pc()},n.prototype.Zc=function(t){this.Pc()},n.prototype.load=function(){this.$c?this.ih():this.setState(yt)},n}(jt),ux=function(t){function n(n){var i=t.call(this,{projection:br("EPSG:3857"),state:ds,zDirection:n.zDirection})||this;if(i.$c=void 0===n.preemptive||n.preemptive,i.rh=rf,i.eh=void 0,i.nh=n.jsonp||!1,n.url)if(i.nh)dh(n.url,i.handleTileJSONResponse.bind(i),i.handleTileJSONError.bind(i));else{var r=new XMLHttpRequest;r.addEventListener("load",i.Yc.bind(i)),r.addEventListener("error",i.Zc.bind(i)),r.open("GET",n.url),r.send()}else n.tileJSON?i.handleTileJSONResponse(n.tileJSON):Mt(!1,51);return i}return sx(n,t),n.prototype.Yc=function(t){var n=t.target;if(!n.status||n.status>=200&&n.status<300){var i=void 0;try{i=JSON.parse(n.responseText)}catch(t){return void this.handleTileJSONError()}this.handleTileJSONResponse(i)}else this.handleTileJSONError()},n.prototype.Zc=function(t){this.handleTileJSONError()},n.prototype.getTemplate=function(){return this.eh},n.prototype.forDataAtCoordinateAndResolution=function(t,n,i,r){if(this.tileGrid){var e=this.tileGrid.getZForResolution(n,this.zDirection),o=this.tileGrid.getTileCoordForCoordAndZ(t,e);this.getTile(o[0],o[1],o[2],1,this.getProjection()).forDataAtCoordinate(t,i,r)}else!0===r?setTimeout((function(){i(null)}),0):i(null)},n.prototype.handleTileJSONError=function(){this.setState(ys)},n.prototype.handleTileJSONResponse=function(t){var n,i=br("EPSG:4326"),r=this.getProjection();if(void 0!==t.bounds){var e=Tr(i,r);n=oi(t.bounds,e)}var o=$h(r),s=t.minzoom||0,a=Kh({extent:o,maxZoom:t.maxzoom||22,minZoom:s});this.tileGrid=a,this.eh=t.template;var u=t.grids;if(u){if(this.rh=tf(u,a),void 0!==t.attribution){var c=void 0!==n?n:o;this.setAttributions((function(n){return ti(c,n.extent)?[t.attribution]:null}))}this.setState(ps)}else this.setState(ys)},n.prototype.getTile=function(t,n,i,r,e){var o=qc(t,n,i);if(this.tileCache.containsKey(o))return this.tileCache.get(o);var s=[t,n,i],a=this.getTileCoordForTileUrlFunction(s,e),u=this.rh(a,r,e),c=new ax(s,void 0!==u?lt:yt,void 0!==u?u:"",this.tileGrid.getTileCoordExtent(s),this.$c,this.nh);return this.tileCache.set(o,c),c},n.prototype.useTile=function(t,n,i){var r=qc(t,n,i);this.tileCache.containsKey(r)&&this.tileCache.get(r)},n}(ld),cx="KVP",hx="REST",fx=function(){var t=function(n,i){return(t=Object.setPrototypeOf||{__proto__:[]}instanceof Array&&function(t,n){t.__proto__=n}||function(t,n){for(var i in n)Object.prototype.hasOwnProperty.call(n,i)&&(t[i]=n[i])})(n,i)};return function(n,i){if("function"!=typeof i&&null!==i)throw new TypeError("Class extends value "+String(i)+" is not a constructor or null");function r(){this.constructor=n}t(n,i),n.prototype=null===i?Object.create(i):(r.prototype=i.prototype,new r)}}(),lx=function(t){function n(n){var i=this,r=void 0===n.imageSmoothing||n.imageSmoothing;void 0!==n.interpolate&&(r=n.interpolate);var e=void 0!==n.requestEncoding?n.requestEncoding:cx,o=n.tileGrid,s=n.urls;return void 0===s&&void 0!==n.url&&(s=ef(n.url)),(i=t.call(this,{attributions:n.attributions,attributionsCollapsible:n.attributionsCollapsible,cacheSize:n.cacheSize,crossOrigin:n.crossOrigin,interpolate:r,projection:n.projection,reprojectionErrorThreshold:n.reprojectionErrorThreshold,tileClass:n.tileClass,tileGrid:o,tileLoadFunction:n.tileLoadFunction,tilePixelRatio:n.tilePixelRatio,urls:s,wrapX:void 0!==n.wrapX&&n.wrapX,transition:n.transition,zDirection:n.zDirection})||this).oh=void 0!==n.version?n.version:"1.0.0",i.ze=void 0!==n.format?n.format:"image/jpeg",i.sh=void 0!==n.dimensions?n.dimensions:{},i.qs=n.layer,i.ah=n.matrixSet,i.K=n.style,i.uh=e,i.setKey(i.hh()),s&&s.length>0&&(i.tileUrlFunction=nf(s.map(i.createFromWMTSTemplate.bind(i)))),i}return fx(n,t),n.prototype.setUrls=function(t){this.urls=t;var n=t.join("\n");this.setTileUrlFunction(nf(t.map(this.createFromWMTSTemplate.bind(this))),n)},n.prototype.getDimensions=function(){return this.sh},n.prototype.getFormat=function(){return this.ze},n.prototype.getLayer=function(){return this.qs},n.prototype.getMatrixSet=function(){return this.ah},n.prototype.getRequestEncoding=function(){return this.uh},n.prototype.getStyle=function(){return this.K},n.prototype.getVersion=function(){return this.oh},n.prototype.hh=function(){var t=0,n=[];for(var i in this.sh)n[t++]=i+"-"+this.sh[i];return n.join("/")},n.prototype.updateDimensions=function(t){E(this.sh,t),this.setKey(this.hh())},n.prototype.createFromWMTSTemplate=function(t){var n=this.uh,i={layer:this.qs,style:this.K,tilematrixset:this.ah};n==cx&&E(i,{Service:"WMTS",Request:"GetTile",Version:this.oh,Format:this.ze}),t=n==cx?of(t,i):t.replace(/\{(\w+?)\}/g,(function(t,n){return n.toLowerCase()in i?i[n.toLowerCase()]:t}));var r=this.tileGrid,e=this.sh;return function(i,o,s){if(i){var a={TileMatrix:r.getMatrixId(i[0]),TileCol:i[1],TileRow:i[2]};E(a,e);var u=t;return u=n==cx?of(u,a):u.replace(/\{(\w+?)\}/g,(function(t,n){return a[n]}))}}},n}(md);var vx=function(){var t=function(n,i){return(t=Object.setPrototypeOf||{__proto__:[]}instanceof Array&&function(t,n){t.__proto__=n}||function(t,n){for(var i in n)Object.prototype.hasOwnProperty.call(n,i)&&(t[i]=n[i])})(n,i)};return function(n,i){if("function"!=typeof i&&null!==i)throw new TypeError("Class extends value "+String(i)+" is not a constructor or null");function r(){this.constructor=n}t(n,i),n.prototype=null===i?Object.create(i):(r.prototype=i.prototype,new r)}}(),dx="renderOrder",px=function(t){function n(n){var i=this,r=n||{},e=E({},r);return delete e.style,delete e.renderBuffer,delete e.updateWhileAnimating,delete e.updateWhileInteracting,(i=t.call(this,e)||this).fh=void 0!==r.declutter&&r.declutter,i.lh=void 0!==r.renderBuffer?r.renderBuffer:100,i.K=null,i.tt=void 0,i.setStyle(r.style),i.dh=void 0!==r.updateWhileAnimating&&r.updateWhileAnimating,i.ph=void 0!==r.updateWhileInteracting&&r.updateWhileInteracting,i}return vx(n,t),n.prototype.getDeclutter=function(){return this.fh},n.prototype.getFeatures=function(n){return t.prototype.getFeatures.call(this,n)},n.prototype.getRenderBuffer=function(){return this.lh},n.prototype.getRenderOrder=function(){return this.get(dx)},n.prototype.getStyle=function(){return this.K},n.prototype.getStyleFunction=function(){return this.tt},n.prototype.getUpdateWhileAnimating=function(){return this.dh},n.prototype.getUpdateWhileInteracting=function(){return this.ph},n.prototype.renderDeclutter=function(t){t.declutterTree||(t.declutterTree=new nd(9)),this.getRenderer().renderDeclutter(t)},n.prototype.setRenderOrder=function(t){this.set(dx,t)},n.prototype.setStyle=function(t){this.K=void 0!==t?t:Hv,this.tt=null===t?void 0:Vv(this.K),this.changed()},n}(bs);var yx=function(){var t=function(n,i){return(t=Object.setPrototypeOf||{__proto__:[]}instanceof Array&&function(t,n){t.__proto__=n}||function(t,n){for(var i in n)Object.prototype.hasOwnProperty.call(n,i)&&(t[i]=n[i])})(n,i)};return function(n,i){if("function"!=typeof i&&null!==i)throw new TypeError("Class extends value "+String(i)+" is not a constructor or null");function r(){this.constructor=n}t(n,i),n.prototype=null===i?Object.create(i):(r.prototype=i.prototype,new r)}}(),mx=function(t){function n(n,i){var r=this,e=i.uniforms||{},s=[1,0,0,1,0,0];e[Kf]=s,(r=t.call(this,n,{uniforms:e,postProcesses:i.postProcesses})||this).ready=!1,r.yh=-1,r.mh=new qf(af,hf),r.wh=new qf(af,hf),r.bh=new qf(uf,hf),r.Qs=i.vertexShader,r.ta=i.fragmentShader,r.$s,r.gh=!(!i.hitFragmentShader||!i.hitVertexShader),r.xh=i.hitVertexShader,r.jh=i.hitFragmentShader,r.Sh;var a=i.attributes?i.attributes.map((function(t){return{name:"a_"+t.name,size:1,type:nl.FLOAT}})):[];r.attributes=[{name:"a_position",size:2,type:nl.FLOAT},{name:"a_index",size:1,type:nl.FLOAT}].concat(a),r.hitDetectionAttributes=[{name:"a_position",size:2,type:nl.FLOAT},{name:"a_index",size:1,type:nl.FLOAT},{name:"a_hitColor",size:4,type:nl.FLOAT},{name:"a_featureUid",size:1,type:nl.FLOAT}].concat(a),r.customAttributes=i.attributes?i.attributes:[],r.Ji=[1/0,1/0,-1/0,-1/0],r.kh=s,r.Mh=[1,0,0,1,0,0],r._h=[1,0,0,1,0,0],r.Oh=new Float32Array(0),r.Th=new Float32Array(0),r.Eh,r.Ah=0,r.Ch=function(){var t='var e="function"==typeof Object.assign?Object.assign:function(e,n){if(null==e)throw new TypeError("Cannot convert undefined or null to object");for(var t=Object(e),r=1,o=arguments.length;rf&&(this.instructions.push([Sx.CUSTOM,f,o,t,i,we]),this.hitDetectionInstructions.push([Sx.CUSTOM,f,o,t,r||i,we]));break;case Pt.POINT:e=t.getFlatCoordinates(),this.coordinates.push(e[0],e[1]),o=this.coordinates.length,this.instructions.push([Sx.CUSTOM,f,o,t,i]),this.hitDetectionInstructions.push([Sx.CUSTOM,f,o,t,r||i])}this.endGeometry(n)},n.prototype.beginGeometry=function(t,n){this.Dh=[Sx.BEGIN_GEOMETRY,n,0,t],this.instructions.push(this.Dh),this.Uh=[Sx.BEGIN_GEOMETRY,n,0,t],this.hitDetectionInstructions.push(this.Uh)},n.prototype.finish=function(){return{instructions:this.instructions,hitDetectionInstructions:this.hitDetectionInstructions,coordinates:this.coordinates}},n.prototype.reverseHitDetectionInstructions=function(){var t,n=this.hitDetectionInstructions;n.reverse();var i,r,e=n.length,o=-1;for(t=0;tthis.maxLineWidth&&(this.maxLineWidth=i.lineWidth,this.qh=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},n.prototype.createFill=function(t){var n=t.fillStyle,i=[Sx.SET_FILL_STYLE,n];return"string"!=typeof n&&i.push(!0),i},n.prototype.applyStroke=function(t){this.instructions.push(this.createStroke(t))},n.prototype.createStroke=function(t){return[Sx.SET_STROKE_STYLE,t.strokeStyle,t.lineWidth*this.pixelRatio,t.lineCap,t.lineJoin,t.miterLimit,this.applyPixelRatio(t.lineDash),t.lineDashOffset*this.pixelRatio]},n.prototype.updateFillStyle=function(t,n){var i=t.fillStyle;"string"==typeof i&&t.currentFillStyle==i||(void 0!==i&&this.instructions.push(n.call(this,t)),t.currentFillStyle=i)},n.prototype.updateStrokeStyle=function(t,n){var i=t.strokeStyle,r=t.lineCap,e=t.lineDash,o=t.lineDashOffset,s=t.lineJoin,a=t.lineWidth,u=t.miterLimit;(t.currentStrokeStyle!=i||t.currentLineCap!=r||e!=t.currentLineDash&&!x(t.currentLineDash,e)||t.currentLineDashOffset!=o||t.currentLineJoin!=s||t.currentLineWidth!=a||t.currentMiterLimit!=u)&&(void 0!==i&&n.call(this,t),t.currentStrokeStyle=i,t.currentLineCap=r,t.currentLineDash=e,t.currentLineDashOffset=o,t.currentLineJoin=s,t.currentLineWidth=a,t.currentMiterLimit=u)},n.prototype.endGeometry=function(t){this.Dh[2]=this.instructions.length,this.Dh=null,this.Uh[2]=this.hitDetectionInstructions.length,this.Uh=null;var n=[Sx.END_GEOMETRY,t];this.instructions.push(n),this.hitDetectionInstructions.push(n)},n.prototype.getBufferedMaxExtent=function(){if(!this.qh&&(this.qh=Sn(this.maxExtent),this.maxLineWidth>0)){var t=this.resolution*(this.maxLineWidth+1)/2;jn(this.qh,t,this.qh)}return this.qh},n}(gh),_x=function(){var t=function(n,i){return(t=Object.setPrototypeOf||{__proto__:[]}instanceof Array&&function(t,n){t.__proto__=n}||function(t,n){for(var i in n)Object.prototype.hasOwnProperty.call(n,i)&&(t[i]=n[i])})(n,i)};return function(n,i){if("function"!=typeof i&&null!==i)throw new TypeError("Class extends value "+String(i)+" is not a constructor or null");function r(){this.constructor=n}t(n,i),n.prototype=null===i?Object.create(i):(r.prototype=i.prototype,new r)}}(),Ox=function(t){function n(n,i,r,e){var o=t.call(this,n,i,r,e)||this;return o.ka=null,o.Nt=null,o.Vh=void 0,o.Xh=void 0,o.Hh=void 0,o.Jh=void 0,o.aa=void 0,o.Kh=void 0,o.Yh=void 0,o.ua=void 0,o.Gr=void 0,o.ca=void 0,o.Ba=void 0,o.Zh=void 0,o}return _x(n,t),n.prototype.drawPoint=function(t,n){if(this.Nt){this.beginGeometry(t,n);var i=t.getFlatCoordinates(),r=t.getStride(),e=this.coordinates.length,o=this.appendFlatPointCoordinates(i,r);this.instructions.push([Sx.DRAW_IMAGE,e,o,this.Nt,this.Xh*this.Vh,this.Hh*this.Vh,Math.ceil(this.Jh*this.Vh),this.aa,this.Kh,this.Yh,this.ua,this.Gr,[this.ca[0]*this.pixelRatio/this.Vh,this.ca[1]*this.pixelRatio/this.Vh],Math.ceil(this.Ba*this.Vh),this.Zh]),this.hitDetectionInstructions.push([Sx.DRAW_IMAGE,e,o,this.ka,this.Xh,this.Hh,this.Jh,this.aa,this.Kh,this.Yh,this.ua,this.Gr,this.ca,this.Ba,this.Zh]),this.endGeometry(n)}},n.prototype.drawMultiPoint=function(t,n){if(this.Nt){this.beginGeometry(t,n);var i=t.getFlatCoordinates(),r=t.getStride(),e=this.coordinates.length,o=this.appendFlatPointCoordinates(i,r);this.instructions.push([Sx.DRAW_IMAGE,e,o,this.Nt,this.Xh*this.Vh,this.Hh*this.Vh,Math.ceil(this.Jh*this.Vh),this.aa,this.Kh,this.Yh,this.ua,this.Gr,[this.ca[0]*this.pixelRatio/this.Vh,this.ca[1]*this.pixelRatio/this.Vh],Math.ceil(this.Ba*this.Vh),this.Zh]),this.hitDetectionInstructions.push([Sx.DRAW_IMAGE,e,o,this.ka,this.Xh,this.Hh,this.Jh,this.aa,this.Kh,this.Yh,this.ua,this.Gr,this.ca,this.Ba,this.Zh]),this.endGeometry(n)}},n.prototype.finish=function(){return this.reverseHitDetectionInstructions(),this.Xh=void 0,this.Hh=void 0,this.ka=null,this.Nt=null,this.Vh=void 0,this.Jh=void 0,this.ca=void 0,this.aa=void 0,this.Kh=void 0,this.Yh=void 0,this.ua=void 0,this.Gr=void 0,this.Ba=void 0,t.prototype.finish.call(this)},n.prototype.setImageStyle=function(t,n){var i=t.getAnchor(),r=t.getSize(),e=t.getHitDetectionImage(),o=t.getImage(this.pixelRatio),s=t.getOrigin();this.Vh=t.getPixelRatio(this.pixelRatio),this.Xh=i[0],this.Hh=i[1],this.ka=e,this.Nt=o,this.Jh=r[1],this.aa=t.getOpacity(),this.Kh=s[0]*this.Vh,this.Yh=s[1]*this.Vh,this.ua=t.getRotateWithView(),this.Gr=t.getRotation(),this.ca=t.getScaleArray(),this.Ba=r[0],this.Zh=n},n}(Mx),Tx=function(){var t=function(n,i){return(t=Object.setPrototypeOf||{__proto__:[]}instanceof Array&&function(t,n){t.__proto__=n}||function(t,n){for(var i in n)Object.prototype.hasOwnProperty.call(n,i)&&(t[i]=n[i])})(n,i)};return function(n,i){if("function"!=typeof i&&null!==i)throw new TypeError("Class extends value "+String(i)+" is not a constructor or null");function r(){this.constructor=n}t(n,i),n.prototype=null===i?Object.create(i):(r.prototype=i.prototype,new r)}}(),Ex=function(t){function n(n,i,r,e){return t.call(this,n,i,r,e)||this}return Tx(n,t),n.prototype.$h=function(t,n,i,r){var e=this.coordinates.length,o=this.appendFlatLineCoordinates(t,n,i,r,!1,!1),s=[Sx.MOVE_TO_LINE_TO,e,o];return this.instructions.push(s),this.hitDetectionInstructions.push(s),i},n.prototype.drawLineString=function(t,n){var i=this.state,r=i.strokeStyle,e=i.lineWidth;if(void 0!==r&&void 0!==e){this.updateStrokeStyle(i,this.applyStroke),this.beginGeometry(t,n),this.hitDetectionInstructions.push([Sx.SET_STROKE_STYLE,i.strokeStyle,i.lineWidth,i.lineCap,i.lineJoin,i.miterLimit,Ls,0],xx);var o=t.getFlatCoordinates(),s=t.getStride();this.$h(o,0,o.length,s),this.hitDetectionInstructions.push(gx),this.endGeometry(n)}},n.prototype.drawMultiLineString=function(t,n){var i=this.state,r=i.strokeStyle,e=i.lineWidth;if(void 0!==r&&void 0!==e){this.updateStrokeStyle(i,this.applyStroke),this.beginGeometry(t,n),this.hitDetectionInstructions.push([Sx.SET_STROKE_STYLE,i.strokeStyle,i.lineWidth,i.lineCap,i.lineJoin,i.miterLimit,i.lineDash,i.lineDashOffset],xx);for(var o=t.getEnds(),s=t.getFlatCoordinates(),a=t.getStride(),u=0,c=0,h=o.length;ct&&(m>y&&(y=m,d=w,p=o),m=0,w=o-e)),s=a,h=l,f=v),u=b,c=g}return(m+=a)>y?[w,o]:[d,p]}var Px=function(){var t=function(n,i){return(t=Object.setPrototypeOf||{__proto__:[]}instanceof Array&&function(t,n){t.__proto__=n}||function(t,n){for(var i in n)Object.prototype.hasOwnProperty.call(n,i)&&(t[i]=n[i])})(n,i)};return function(n,i){if("function"!=typeof i&&null!==i)throw new TypeError("Class extends value "+String(i)+" is not a constructor or null");function r(){this.constructor=n}t(n,i),n.prototype=null===i?Object.create(i):(r.prototype=i.prototype,new r)}}(),Ix={left:0,end:0,center:.5,right:1,start:1,top:0,middle:.5,hanging:.2,alphabetic:.8,ideographic:.8,bottom:1},Nx=function(t){function n(n,i,r,e){var o=t.call(this,n,i,r,e)||this;return o.nf=null,o.eo="",o.oo=0,o.so=0,o.ao=void 0,o.uo=0,o.ho=null,o.fillStates={},o.fo=null,o.strokeStates={},o.lo={},o.textStates={},o.if="",o.rf="",o.ef="",o.Zh=void 0,o}return Px(n,t),n.prototype.finish=function(){var n=t.prototype.finish.call(this);return n.textStates=this.textStates,n.fillStates=this.fillStates,n.strokeStates=this.strokeStates,n},n.prototype.drawText=function(t,n){var i=this.ho,r=this.fo,e=this.lo;if(""!==this.eo&&e&&(i||r)){var o=this.coordinates,s=o.length,a=t.getType(),u=null,c=t.getStride();if(e.placement!==$v||a!=Pt.LINE_STRING&&a!=Pt.MULTI_LINE_STRING&&a!=Pt.POLYGON&&a!=Pt.MULTI_POLYGON){var h=e.overflow?null:[];switch(a){case Pt.POINT:case Pt.MULTI_POINT:u=t.getFlatCoordinates();break;case Pt.LINE_STRING:u=t.getFlatMidpoint();break;case Pt.CIRCLE:u=t.getCenter();break;case Pt.MULTI_LINE_STRING:u=t.getFlatMidpoints(),c=2;break;case Pt.POLYGON:u=t.getFlatInteriorPoint(),e.overflow||h.push(u[2]/this.resolution),c=3;break;case Pt.MULTI_POLYGON:var f=t.getFlatInteriorPoints();u=[];for(j=0,S=f.length;jT[2]}else M=g>_;var E,A=Math.PI,C=[],R=j+r===n;if(y=0,m=S,l=t[n=j],v=t[n+1],R){w(),E=Math.atan2(v-p,l-d),M&&(E+=E>0?-A:A);var P=(_+g)/2,I=(O+x)/2;return C[0]=[P,I,(k-o)/2,E,e],C}for(var N=0,z=e.length;N0?-A:A),void 0!==E){var L=F-E;if(L+=L>A?-2*A:L<-A?2*A:0,Math.abs(L)>s)return null}E=F;for(var G=N,D=0;N0&&t.push("\n",""),t.push(n,""),t}var Kx=function(){function t(t,n,i,r){this.overlaps=i,this.pixelRatio=n,this.resolution=t,this.vf,this.instructions=r.instructions,this.coordinates=r.coordinates,this.df={},this.pf=[1,0,0,1,0,0],this.hitDetectionInstructions=r.hitDetectionInstructions,this.vo=null,this.Ge=0,this.fillStates=r.fillStates||{},this.strokeStates=r.strokeStates||{},this.textStates=r.textStates||{},this.yf={},this.nf={}}return t.prototype.createLabel=function(t,n,i,r){var e=t+n+i+r;if(this.nf[e])return this.nf[e];var o=r?this.strokeStates[r]:null,s=i?this.fillStates[i]:null,a=this.textStates[n],u=this.pixelRatio,c=[a.scale[0]*u,a.scale[1]*u],h=Array.isArray(t),f=Hx(h?t[0]:t,a.textAlign||qs),l=r&&o.lineWidth?o.lineWidth:0,v=h?t:t.split("\n").reduce(Jx,[]),d=ia(a,v),p=d.width,y=d.height,m=d.widths,w=d.heights,b=d.lineWidths,g=p+l,x=[],j=(g+2)*c[0],S=(y+l)*c[1],k={width:j<0?Math.floor(j):Math.ceil(j),height:S<0?Math.floor(S):Math.ceil(S),contextInstructions:x};(1==c[0]&&1==c[1]||x.push("scale",c),r)&&(x.push("strokeStyle",o.strokeStyle),x.push("lineWidth",l),x.push("lineCap",o.lineCap),x.push("lineJoin",o.lineJoin),x.push("miterLimit",o.miterLimit),(Xt?OffscreenCanvasRenderingContext2D:CanvasRenderingContext2D).prototype.setLineDash&&(x.push("setLineDash",[o.lineDash]),x.push("lineDashOffset",o.lineDashOffset)));i&&x.push("fillStyle",s.fillStyle),x.push("textBaseline","middle"),x.push("textAlign","center");for(var M,_=.5-f,O=f*g+_*l,T=[],E=[],A=0,C=0,R=0,P=0,I=0,N=v.length;It?t-u:e,g=o+c>n?n-c:o,x=v[3]+b*f[0]+v[1],j=v[0]+g*f[1]+v[2],S=m-v[3],k=w-v[0];return(d||0!==h)&&(Ux[0]=S,Wx[0]=S,Ux[1]=k,qx[1]=k,qx[0]=S+x,Bx[0]=qx[0],Bx[1]=k+j,Wx[1]=Bx[1]),0!==h?(nn(y=an([1,0,0,1,0,0],i,r,1,1,h,-i,-r),Ux),nn(y,qx),nn(y,Bx),nn(y,Wx),An(Math.min(Ux[0],qx[0],Bx[0],Wx[0]),Math.min(Ux[1],qx[1],Bx[1],Wx[1]),Math.max(Ux[0],qx[0],Bx[0],Wx[0]),Math.max(Ux[1],qx[1],Bx[1],Wx[1]),Dx)):An(Math.min(S,S+x),Math.min(k,k+j),Math.max(S,S+x),Math.max(k,k+j),Dx),l&&(m=Math.round(m),w=Math.round(w)),{drawImageX:m,drawImageY:w,drawImageW:b,drawImageH:g,originX:u,originY:c,declutterBox:{minX:Dx[0],minY:Dx[1],maxX:Dx[2],maxY:Dx[3],value:p},canvasTransform:y,scale:f}},t.prototype.gf=function(t,n,i,r,e,o,s){var a=!(!o&&!s),u=r.declutterBox,c=t.canvas,h=s?s[2]*r.scale[0]/2:0;return u.minX-h<=c.width/n&&u.maxX+h>=0&&u.minY-h<=c.height/n&&u.maxY+h>=0&&(a&&this.mf(t,Ux,qx,Bx,Wx,o,s),ra(t,r.canvasTransform,e,i,r.originX,r.originY,r.drawImageW,r.drawImageH,r.drawImageX,r.drawImageY,r.scale)),!0},t.prototype.va=function(t){if(this.vf){var n=nn(this.pf,[0,0]),i=512*this.pixelRatio;t.save(),t.translate(n[0]%i,n[1]%i),t.rotate(this.Ge)}t.fill(),this.vf&&t.restore()},t.prototype.wf=function(t,n){t.strokeStyle=n[1],t.lineWidth=n[2],t.lineCap=n[3],t.lineJoin=n[4],t.miterLimit=n[5],t.setLineDash&&(t.lineDashOffset=n[7],t.setLineDash(n[6]))},t.prototype.xf=function(t,n,i,r){var e=this.textStates[n],o=this.createLabel(t,n,r,i),s=this.strokeStates[i],a=this.pixelRatio,u=Hx(Array.isArray(t)?t[0]:t,e.textAlign||qs),c=Ix[e.textBaseline||Bs],h=s&&s.lineWidth?s.lineWidth:0;return{label:o,anchorX:u*(o.width/a-2*e.scale[0])+2*(.5-u)*h,anchorY:c*o.height/a+2*(.5-c)*h}},t.prototype.jf=function(t,n,i,r,e,o,s,a){var u;this.vo&&x(i,this.pf)?u=this.vo:(this.vo||(this.vo=[]),u=Br(this.coordinates,0,this.coordinates.length,2,i,this.vo),tn(this.pf,i));for(var c,h,f,l,v,d,p,y,m,w,b,g,j,S,k,M,_=0,O=r.length,T=0,E=0,A=0,C=null,R=null,P=this.df,I=this.Ge,N=Math.round(1e12*Math.atan2(-i[1],i[0]))/1e12,z={context:t,pixelRatio:this.pixelRatio,resolution:this.resolution,rotation:I},F=this.instructions!=r||this.overlaps?0:200;_F&&(this.va(t),E=0),A>F&&(t.stroke(),A=0),E||A||(t.beginPath(),l=NaN,v=NaN),++_;break;case Sx.CIRCLE:var G=u[T=L[1]],D=u[T+1],U=u[T+2]-G,q=u[T+3]-D,B=Math.sqrt(U*U+q*q);t.moveTo(G+B,D),t.arc(G,D,B,0,2*Math.PI,!0),++_;break;case Sx.CLOSE_PATH:t.closePath(),++_;break;case Sx.CUSTOM:T=L[1],c=L[2];var W=L[3],V=L[4],X=6==L.length?L[5]:void 0;z.geometry=W,z.feature=j,_ in P||(P[_]=[]);var H=P[_];X?X(u,T,c,2,H):(H[0]=u[T],H[1]=u[T+1],H.length=2),V(H,z),++_;break;case Sx.DRAW_IMAGE:T=L[1],c=L[2],y=L[3],h=L[4],f=L[5];var J=L[6],K=L[7],Y=L[8],Z=L[9],$=L[10],Q=L[11],tt=L[12],nt=L[13],it=L[14];if(!y&&L.length>=19){m=L[18],w=L[19],b=L[20],g=L[21];var rt=this.xf(m,w,b,g);y=rt.label,L[3]=y;var et=L[22];h=(rt.anchorX-et)*this.pixelRatio,L[4]=h;var ot=L[23];f=(rt.anchorY-ot)*this.pixelRatio,L[5]=f,J=y.height,L[6]=J,nt=y.width,L[13]=nt}var st=void 0;L.length>24&&(st=L[24]);var at=void 0,ut=void 0,ct=void 0;L.length>16?(at=L[15],ut=L[16],ct=L[17]):(at=Ws,ut=!1,ct=!1),$&&N?Q+=I:$||N||(Q-=I);for(var ht=0;T0){if(!o||f!==Mh&&f!==Th||-1!==o.indexOf(t)){var c=(l[a]-3)/4,v=r-c%s,d=r-(c/s|0),p=e(t,n,v*v+d*d);if(p)return p}h.clearRect(0,0,s,s);break}}var d,y,m,w,b,g=Object.keys(this.Sf).map(Number);for(g.sort(p),d=g.length-1;d>=0;--d){var x=g[d].toString();for(m=this.Sf[x],y=Yx.length-1;y>=0;--y)if(void 0!==(w=m[f=Yx[y]])&&(b=w.executeHitDetection(h,a,i,v,c)))return b}},t.prototype.getClipCoords=function(t){var n=this.hf;if(!n)return null;var i=n[0],r=n[1],e=n[2],o=n[3],s=[i,r,i,o,e,o,e,r];return Br(s,0,8,2,t,s),s},t.prototype.isEmpty=function(){return R(this.Sf)},t.prototype.execute=function(t,n,i,r,e,o,s){var a=Object.keys(this.Sf).map(Number);a.sort(p),this.hf&&(t.save(),this.clip(t,i));var u,c,h,f,l,v,d=o||Yx;for(s&&a.reverse(),u=0,c=a.length;ui)break;var a=r[s];a||(a=[],r[s]=a),a.push(4*((t+e)*n+(t+o))+3),e>0&&a.push(4*((t-e)*n+(t+o))+3),o>0&&(a.push(4*((t+e)*n+(t-o))+3),e>0&&a.push(4*((t-e)*n+(t-o))+3))}for(var u=[],c=(e=0,r.length);ev[2];)m=p*++y,c.push(this.getRenderTransform(r,e,o,nj,h,f,m).slice()),d-=p}this.Cf=ij(i,c,this.Rf,u.getStyleFunction(),a,e,o)}n(rj(t,this.Rf,this.Cf))}.bind(this))},n.prototype.forEachFeatureAtCoordinate=function(t,n,i,r,e){var s=this;if(this.Gf){var a,u=n.viewState.resolution,c=n.viewState.rotation,h=this.getLayer(),f={},l=function(t,n,i){var s=o(t),a=f[s];if(a){if(!0!==a&&ib[0]&&S[2]>b[2]&&w.push([S[0]-g,S[1],S[2]-g,S[3]])}if(!this.Af&&this.Pf==h&&this.jc==l&&this.Lf==d&&_n(this.If,y))return x(this.Nc,m)||(this.Cf=null,this.Nc=m),this.zf=p,this.replayGroupChanged=!1,!0;this.Gf=null,this.Af=!1;var k,M=new Fx(Rh(h,f),y,h,f);this.getLayer().getDeclutter()&&(k=new Fx(Rh(h,f),y,h,f));var _,O=Ir();if(O){for(var T=0,E=w.length;T0)n([]);else{var m=Zn(f.getTileCoordExtent(r.wrappedTileCoord)),w=[(l[0]-m[0])/h,(m[1]-l[1])/h],b=r.getSourceTiles().reduce((function(t,n){return t.concat(n.getFeatures())}),[]),g=r.hitDetectionImageData[s];if(!g&&!this.Ef){var x=ou(f.getTileSize(f.getZForResolution(h))),j=this.Nf;g=ij(x,[this.getRenderTransform(f.getTileCoordCenter(r.wrappedTileCoord),h,0,nj,x[0]*nj,x[1]*nj,0)],b,e.getStyleFunction(),f.getTileCoordExtent(r.wrappedTileCoord),r.getReplayState(e).renderedResolution,j),r.hitDetectionImageData[s]=g}n(rj(w,b,g))}}.bind(this))},n.prototype.handleFontsChanged=function(){var t=this.getLayer();t.getVisible()&&void 0!==this.Wf&&t.changed()},n.prototype.Tf=function(t){this.renderIfReadyAndVisible()},n.prototype.renderDeclutter=function(t){var n=this.context,i=n.globalAlpha;n.globalAlpha=this.getLayer().getOpacity();for(var r=t.viewHints,e=!(r[Pa]||r[Ia]),s=this.renderedTiles,a=0,u=s.length;a=0;--f)h[f].execute(this.context,1,this.getTileRenderTransform(c,t),t.viewState.rotation,e,void 0,t.declutterTree)}n.globalAlpha=i},n.prototype.getTileRenderTransform=function(t,n){var i=n.pixelRatio,r=n.viewState,e=r.center,o=r.resolution,s=r.rotation,a=n.size,u=Math.round(a[0]*i),c=Math.round(a[1]*i),h=this.getLayer().getSource().getTileGridForProjection(n.viewState.projection),f=t.tileCoord,l=h.getTileCoordExtent(t.wrappedTileCoord),v=h.getTileCoordExtent(f,this.tmpExtent)[0]-l[0];return $t(en(this.inversePixelTransform.slice(),1/i,1/i),this.getRenderTransform(e,o,s,i,u,c,v))},n.prototype.renderFrame=function(n,i){var r=n.viewHints,e=!(r[Pa]||r[Ia]);t.prototype.renderFrame.call(this,n,i),this.Bf=n.pixelToCoordinateTransform.slice(),this.Nf=n.viewState.rotation;var s=this.getLayer(),a=s.getRenderMode(),u=this.context,c=u.globalAlpha;u.globalAlpha=s.getOpacity();for(var h=vj[a],f=n.viewState,l=f.rotation,v=s.getSource(),d=v.getTileGridForProjection(f.projection).getZForResolution(f.resolution,v.zDirection),p=this.renderedTiles,y=[],m=[],w=p.length-1;w>=0;--w){var b=p[w],g=b.executorGroups[o(s)].filter((function(t){return t.hasExecutors(h)}));if(0!==g.length){for(var x=this.getTileRenderTransform(b,n),j=b.tileCoord[0],S=!1,k=g[0].getClipCoords(x),M=0,_=y.length;M<_;++M)if(d!==j&&j1?s:2,x=o||new Array(g);for(p=0;p>1;e1?new _j(i,Et,e):new Ke(i,Et,r);default:throw new Error("Invalid geometry type:"+n)}}Tj.prototype.getEndss=Tj.prototype.getEnds,Tj.prototype.getFlatCoordinates=Tj.prototype.getOrientedFlatCoordinates;var Aj=Tj;var Cj=function(){var t=function(n,i){return(t=Object.setPrototypeOf||{__proto__:[]}instanceof Array&&function(t,n){t.__proto__=n}||function(t,n){for(var i in n)Object.prototype.hasOwnProperty.call(n,i)&&(t[i]=n[i])})(n,i)};return function(n,i){if("function"!=typeof i&&null!==i)throw new TypeError("Class extends value "+String(i)+" is not a constructor or null");function r(){this.constructor=n}t(n,i),n.prototype=null===i?Object.create(i):(r.prototype=i.prototype,new r)}}(),Rj=function(t){function n(n){return t.call(this,n)||this}return Cj(n,t),n.prototype.createRenderer=function(){return new oj(this)},n}(px);function Pj(t,n,i){for(var r,e,o,s,a,u,c=[],h=t(0),f=t(1),l=n(h),v=n(f),d=[f,h],p=[v,l],y=[1,0],m={},w=1e5;--w>0&&y.length>0;)o=y.pop(),h=d.pop(),l=p.pop(),(u=o.toString())in m||(c.push(l[0],l[1]),m[u]=!0),s=y.pop(),f=d.pop(),v=p.pop(),fi((e=n(r=t(a=(o+s)/2)))[0],e[1],l[0],l[1],v[0],v[1])this.Fl.length;)a=new Tt,this.Fl.push(a);var c=r.getFeaturesCollection();c.clear();var h,f,l=0;for(h=0,f=this.pl.length;hMath.PI/2);for(var d=Nh(t),p=c;p<=h;++p){var y=this.pl.length+this.yl.length,m=void 0,w=void 0,b=void 0,g=void 0;if(this.Ml)for(w=0,b=this.Ml.length;w=a?(t[0]=s[0],t[2]=s[2]):o=!0);var u=[ui(n[0],this.fl,this.cl),ui(n[1],this.ll,this.hl)],c=this.bl(u);isNaN(c[1])&&(c[1]=Math.abs(this.el)>=Math.abs(this.al)?this.el:this.al);var h,f,l,v,d=ui(c[0],this.ul,this.sl),p=ui(c[1],this.al,this.el),y=this.dl,m=t;o||(m=[ui(t[0],this.fl,this.cl),ui(t[1],this.ll,this.hl),ui(t[2],this.fl,this.cl),ui(t[3],this.ll,this.hl)]);var w=oi(m,this.bl,void 0,8),b=w[3],g=w[2],x=w[1],j=w[0];if(o||(Mn(m,this.xl)&&(j=this.ul,x=this.al),Mn(m,this.jl)&&(g=this.sl,x=this.al),Mn(m,this.Sl)&&(j=this.ul,b=this.el),Mn(m,this.kl)&&(g=this.sl,b=this.el),b=ui(b,p,this.el),g=ui(g,d,this.sl),x=ui(x,this.al,p),j=ui(j,this.ul,d)),v=ui(d=Math.floor(d/e)*e,this.ul,this.sl),f=this.ql(v,x,b,r,t,0),h=0,o)for(;(v-=e)>=j&&h++r[o]&&(e=o,o=1);var s=Math.max(n[1],r[e]),a=Math.min(n[3],r[o]),u=ui(n[1]+Math.abs(n[1]-n[3])*this.El,s,a),c=[r[e-1]+(r[o-1]-r[e-1])*(u-r[e])/(r[o]-r[e]),u],h=this.Ml[i].geom;return h.setCoordinates(c),h},n.prototype.getMeridians=function(){return this.pl},n.prototype.Vl=function(t,n,i,r,e){var o=Nj(t,n,i,this.di,r),s=this.yl[e];return s?(s.setFlatCoordinates(Et,o),s.changed()):s=new xj(o,Et),s},n.prototype.Hl=function(t,n,i){var r=t.getFlatCoordinates(),e=0,o=r.length-2;r[e]>r[o]&&(e=o,o=0);var s=Math.max(n[0],r[e]),a=Math.min(n[2],r[o]),u=ui(n[0]+Math.abs(n[0]-n[2])*this.Al,s,a),c=[u,r[e+1]+(r[o+1]-r[e+1])*(u-r[e])/(r[o]-r[e])],h=this._l[i].geom;return h.setCoordinates(c),h},n.prototype.getParallels=function(){return this.yl},n.prototype.Dl=function(t){var n=br("EPSG:4326"),i=t.getWorldExtent();this.el=i[3],this.sl=i[2],this.al=i[1],this.ul=i[0];var r=Er(t,n);if(this.ul=Math.abs(this.al)?this.el:this.al),this.di=t},n}(Rj),Dj=function(){var t=function(n,i){return(t=Object.setPrototypeOf||{__proto__:[]}instanceof Array&&function(t,n){t.__proto__=n}||function(t,n){for(var i in n)Object.prototype.hasOwnProperty.call(n,i)&&(t[i]=n[i])})(n,i)};return function(n,i){if("function"!=typeof i&&null!==i)throw new TypeError("Class extends value "+String(i)+" is not a constructor or null");function r(){this.constructor=n}t(n,i),n.prototype=null===i?Object.create(i):(r.prototype=i.prototype,new r)}}(),Uj="blur",qj="gradient",Bj="radius",Wj=["#00f","#0ff","#0f0","#ff0","#f00"];var Vj=function(t){function n(n){var i=this,r=n||{},e=E({},r);delete e.gradient,delete e.radius,delete e.blur,delete e.weight,(i=t.call(this,e)||this).Kl=null,i.addChangeListener(qj,i.Yl),i.setGradient(r.gradient?r.gradient:Wj),i.setBlur(void 0!==r.blur?r.blur:15),i.setRadius(void 0!==r.radius?r.radius:8);var o=r.weight?r.weight:"weight";return i.Zl="string"==typeof o?function(t){return t.get(o)}:o,i.setRenderOrder(null),i}return Dj(n,t),n.prototype.getBlur=function(){return this.get(Uj)},n.prototype.getGradient=function(){return this.get(qj)},n.prototype.getRadius=function(){return this.get(Bj)},n.prototype.Yl=function(){this.Kl=function(t){for(var n=1,i=256,r=_o(n,i),e=r.createLinearGradient(0,0,n,i),o=1/(t.length-1),s=0,a=t.length;s>3)?i.readString():2===t?i.readFloat():3===t?i.readDouble():4===t?i.readVarint64():5===t?i.readVarint():6===t?i.readSVarint():7===t?i.readBoolean():null;n.values.push(r)}}function Qj(t,n,i){if(1==t)n.id=i.readVarint();else if(2==t)for(var r=i.readVarint()+i.pos;i.pos>3}s--,1===o||2===o?(a+=t.readSVarint(),u+=t.readSVarint(),1===o&&c>h&&(r.push(c),h=c),i.push(a,u),c+=2):7===o?c>h&&(i.push(i[h],i[h+1]),c+=2):Mt(!1,59)}c>h&&(r.push(c),h=c)},n.prototype.iv=function(t,n,i){var r,e=n.type;if(0===e)return null;var o,s=n.properties;this.tv?(o=s[this.tv],delete s[this.tv]):o=n.id,s[this.Ql]=n.layer.name;var a=[],u=[];this.nv(t,n,a,u);var c=function(t,n){var i;1===t?i=1===n?Pt.POINT:Pt.MULTI_POINT:2===t?i=1===n?Pt.LINE_STRING:Pt.MULTI_LINE_STRING:3===t&&(i=Pt.POLYGON);return i}(e,u.length);if(this.$l===Aj)(r=new this.$l(c,a,u,s,o)).transform(i.dataProjection);else{var h=void 0;if(c==Pt.POLYGON){var f=Xe(a,u);h=f.length>1?new _j(a,Et,f):new Ke(a,Et,u)}else h=c===Pt.POINT?new Oe(a,Et):c===Pt.LINE_STRING?new xj(a,Et):c===Pt.POLYGON?new Ke(a,Et,u):c===Pt.MULTI_POINT?new yj(a,Et):c===Pt.MULTI_LINE_STRING?new Sj(a,Et,u):null;r=new(0,this.$l),this.H&&r.setGeometryName(this.H);var l=Hj(h,!1,i);r.setGeometry(l),void 0!==o&&r.setId(o),r.setProperties(s,!0)}return r},n.prototype.getType=function(){return oh},n.prototype.readFeatures=function(t,n){var i=this.Uc,r=this.adaptOptions(n),e=br(r.dataProjection);e.setWorldExtent(r.extent),r.dataProjection=e;var o=new Kj(t),s=o.readFields(Zj,{}),a=[];for(var u in s)if(!i||-1!=i.indexOf(u)){var c=s[u],h=c?[0,0,c.extent,c.extent]:null;e.setExtent(h);for(var f=0,l=c.length;f=t.length?{done:!0}:{done:!1,value:t[r++]}},e:function(t){throw t},f:e}}throw new TypeError("Invalid attempt to iterate non-iterable instance.\nIn order to be iterable, non-array objects must have a [Symbol.iterator]() method.")}var o,s=!0,a=!1;return{s:function(){i=i.call(t)},n:function(){var t=i.next();return s=t.done,t},e:function(t){a=!0,o=t},f:function(){try{s||null==i.return||i.return()}finally{if(a)throw o}}}}function AS(t,n){if(t){if("string"==typeof t)return CS(t,n);var i=Object.prototype.toString.call(t).slice(8,-1);return"Object"===i&&t.constructor&&(i=t.constructor.name),"Map"===i||"Set"===i?Array.from(t):"Arguments"===i||/^(?:Ui|I)nt(?:8|16|32)(?:Clamped)?Array$/.test(i)?CS(t,n):void 0}}function CS(t,n){(null==n||n>t.length)&&(n=t.length);for(var i=0,r=new Array(n);i`."},tiles:{type:"array",value:"string",doc:"An array of one or more tile source URLs, as in the TileJSON spec."},bounds:{type:"array",value:"number",length:4,default:[-180,-85.051129,180,85.051129],doc:"An array containing the longitude and latitude of the southwest and northeast corners of the source's bounding box in the following order: `[sw.lng, sw.lat, ne.lng, ne.lat]`. When this property is included in a source, no tiles outside of the given bounds are requested by Mapbox GL."},scheme:{type:"enum",values:{xyz:{doc:"Slippy map tilenames scheme."},tms:{doc:"OSGeo spec scheme."}},default:"xyz",doc:"Influences the y direction of the tile coordinates. The global-mercator (aka Spherical Mercator) profile is assumed."},minzoom:{type:"number",default:0,doc:"Minimum zoom level for which tiles are available, as in the TileJSON spec."},maxzoom:{type:"number",default:22,doc:"Maximum zoom level for which tiles are available, as in the TileJSON spec. Data from tiles at the maxzoom are used when displaying the map at higher zoom levels."},attribution:{type:"string",doc:"Contains an attribution to be displayed when the map is shown to a user."},promoteId:{type:"promoteId",doc:"A property to use as a feature id (for feature state). Either a property name, or an object of the form `{: }`. If specified as a string for a vector tile source, the same property is used across all its source layers."},volatile:{type:"boolean",default:!1,doc:"A setting to determine whether a source's tiles are cached locally.","sdk-support":{"basic functionality":{android:"9.3.0",ios:"5.10.0"}}},"*":{type:"*",doc:"Other keys to configure the data source."}},source_raster:{type:{required:!0,type:"enum",values:{raster:{doc:"A raster tile source."}},doc:"The type of the source."},url:{type:"string",doc:"A URL to a TileJSON resource. Supported protocols are `http:`, `https:`, and `mapbox://`."},tiles:{type:"array",value:"string",doc:"An array of one or more tile source URLs, as in the TileJSON spec."},bounds:{type:"array",value:"number",length:4,default:[-180,-85.051129,180,85.051129],doc:"An array containing the longitude and latitude of the southwest and northeast corners of the source's bounding box in the following order: `[sw.lng, sw.lat, ne.lng, ne.lat]`. When this property is included in a source, no tiles outside of the given bounds are requested by Mapbox GL."},minzoom:{type:"number",default:0,doc:"Minimum zoom level for which tiles are available, as in the TileJSON spec."},maxzoom:{type:"number",default:22,doc:"Maximum zoom level for which tiles are available, as in the TileJSON spec. Data from tiles at the maxzoom are used when displaying the map at higher zoom levels."},tileSize:{type:"number",default:512,units:"pixels",doc:"The minimum visual size to display tiles for this layer. Only configurable for raster layers."},scheme:{type:"enum",values:{xyz:{doc:"Slippy map tilenames scheme."},tms:{doc:"OSGeo spec scheme."}},default:"xyz",doc:"Influences the y direction of the tile coordinates. The global-mercator (aka Spherical Mercator) profile is assumed."},attribution:{type:"string",doc:"Contains an attribution to be displayed when the map is shown to a user."},volatile:{type:"boolean",default:!1,doc:"A setting to determine whether a source's tiles are cached locally.","sdk-support":{"basic functionality":{android:"9.3.0",ios:"5.10.0"}}},"*":{type:"*",doc:"Other keys to configure the data source."}},source_raster_dem:{type:{required:!0,type:"enum",values:{"raster-dem":{doc:"A RGB-encoded raster DEM source"}},doc:"The type of the source."},url:{type:"string",doc:"A URL to a TileJSON resource. Supported protocols are `http:`, `https:`, and `mapbox://`."},tiles:{type:"array",value:"string",doc:"An array of one or more tile source URLs, as in the TileJSON spec."},bounds:{type:"array",value:"number",length:4,default:[-180,-85.051129,180,85.051129],doc:"An array containing the longitude and latitude of the southwest and northeast corners of the source's bounding box in the following order: `[sw.lng, sw.lat, ne.lng, ne.lat]`. When this property is included in a source, no tiles outside of the given bounds are requested by Mapbox GL."},minzoom:{type:"number",default:0,doc:"Minimum zoom level for which tiles are available, as in the TileJSON spec."},maxzoom:{type:"number",default:22,doc:"Maximum zoom level for which tiles are available, as in the TileJSON spec. Data from tiles at the maxzoom are used when displaying the map at higher zoom levels."},tileSize:{type:"number",default:512,units:"pixels",doc:"The minimum visual size to display tiles for this layer. Only configurable for raster layers."},attribution:{type:"string",doc:"Contains an attribution to be displayed when the map is shown to a user."},encoding:{type:"enum",values:{terrarium:{doc:"Terrarium format PNG tiles. See https://aws.amazon.com/es/public-datasets/terrain/ for more info."},mapbox:{doc:"Mapbox Terrain RGB tiles. See https://www.mapbox.com/help/access-elevation-data/#mapbox-terrain-rgb for more info."}},default:"mapbox",doc:"The encoding used by this source. Mapbox Terrain RGB is used by default"},volatile:{type:"boolean",default:!1,doc:"A setting to determine whether a source's tiles are cached locally.","sdk-support":{"basic functionality":{android:"9.3.0",ios:"5.10.0"}}},"*":{type:"*",doc:"Other keys to configure the data source."}},source_geojson:{type:{required:!0,type:"enum",values:{geojson:{doc:"A GeoJSON data source."}},doc:"The data type of the GeoJSON source."},data:{type:"*",doc:"A URL to a GeoJSON file, or inline GeoJSON."},maxzoom:{type:"number",default:18,doc:"Maximum zoom level at which to create vector tiles (higher means greater detail at high zoom levels)."},attribution:{type:"string",doc:"Contains an attribution to be displayed when the map is shown to a user."},buffer:{type:"number",default:128,maximum:512,minimum:0,doc:"Size of the tile buffer on each side. A value of 0 produces no buffer. A value of 512 produces a buffer as wide as the tile itself. Larger values produce fewer rendering artifacts near tile edges and slower performance."},filter:{type:"*",doc:"An expression for filtering features prior to processing them for rendering."},tolerance:{type:"number",default:.375,doc:"Douglas-Peucker simplification tolerance (higher means simpler geometries and faster performance)."},cluster:{type:"boolean",default:!1,doc:"If the data is a collection of point features, setting this to true clusters the points by radius into groups. Cluster groups become new `Point` features in the source with additional properties:\n * `cluster` Is `true` if the point is a cluster \n * `cluster_id` A unqiue id for the cluster to be used in conjunction with the [cluster inspection methods](https://www.mapbox.com/mapbox-gl-js/api/#geojsonsource#getclusterexpansionzoom)\n * `point_count` Number of original points grouped into this cluster\n * `point_count_abbreviated` An abbreviated point count"},clusterRadius:{type:"number",default:50,minimum:0,doc:"Radius of each cluster if clustering is enabled. A value of 512 indicates a radius equal to the width of a tile."},clusterMaxZoom:{type:"number",doc:"Max zoom on which to cluster points if clustering is enabled. Defaults to one zoom less than maxzoom (so that last zoom features are not clustered). Clusters are re-evaluated at integer zoom levels so setting clusterMaxZoom to 14 means the clusters will be displayed until z15."},clusterMinPoints:{type:"number",doc:"Minimum number of points necessary to form a cluster if clustering is enabled. Defaults to `2`."},clusterProperties:{type:"*",doc:'An object defining custom properties on the generated clusters if clustering is enabled, aggregating values from clustered points. Has the form `{"property_name": [operator, map_expression]}`. `operator` is any expression function that accepts at least 2 operands (e.g. `"+"` or `"max"`) — it accumulates the property value from clusters/points the cluster contains; `map_expression` produces the value of a single point.\n\nExample: `{"sum": ["+", ["get", "scalerank"]]}`.\n\nFor more advanced use cases, in place of `operator`, you can use a custom reduce expression that references a special `["accumulated"]` value, e.g.:\n`{"sum": [["+", ["accumulated"], ["get", "sum"]], ["get", "scalerank"]]}`'},lineMetrics:{type:"boolean",default:!1,doc:"Whether to calculate line distance metrics. This is required for line layers that specify `line-gradient` values."},generateId:{type:"boolean",default:!1,doc:"Whether to generate ids for the geojson features. When enabled, the `feature.id` property will be auto assigned based on its index in the `features` array, over-writing any previous values."},promoteId:{type:"promoteId",doc:"A property to use as a feature id (for feature state). Either a property name, or an object of the form `{: }`."}},source_video:{type:{required:!0,type:"enum",values:{video:{doc:"A video data source."}},doc:"The data type of the video source."},urls:{required:!0,type:"array",value:"string",doc:"URLs to video content in order of preferred format."},coordinates:{required:!0,doc:"Corners of video specified in longitude, latitude pairs.",type:"array",length:4,value:{type:"array",length:2,value:"number",doc:"A single longitude, latitude pair."}}},source_image:{type:{required:!0,type:"enum",values:{image:{doc:"An image data source."}},doc:"The data type of the image source."},url:{required:!0,type:"string",doc:"URL that points to an image."},coordinates:{required:!0,doc:"Corners of image specified in longitude, latitude pairs.",type:"array",length:4,value:{type:"array",length:2,value:"number",doc:"A single longitude, latitude pair."}}},layer:{id:{type:"string",doc:"Unique layer name.",required:!0},type:{type:"enum",values:{fill:{doc:"A filled polygon with an optional stroked border.","sdk-support":{"basic functionality":{js:"0.10.0",android:"2.0.1",ios:"2.0.0",macos:"0.1.0"}}},line:{doc:"A stroked line.","sdk-support":{"basic functionality":{js:"0.10.0",android:"2.0.1",ios:"2.0.0",macos:"0.1.0"}}},symbol:{doc:"An icon or a text label.","sdk-support":{"basic functionality":{js:"0.10.0",android:"2.0.1",ios:"2.0.0",macos:"0.1.0"}}},circle:{doc:"A filled circle.","sdk-support":{"basic functionality":{js:"0.10.0",android:"2.0.1",ios:"2.0.0",macos:"0.1.0"}}},heatmap:{doc:"A heatmap.","sdk-support":{"basic functionality":{js:"0.41.0",android:"6.0.0",ios:"4.0.0",macos:"0.7.0"}}},"fill-extrusion":{doc:"An extruded (3D) polygon.","sdk-support":{"basic functionality":{js:"0.27.0",android:"5.1.0",ios:"3.6.0",macos:"0.5.0"}}},raster:{doc:"Raster map textures such as satellite imagery.","sdk-support":{"basic functionality":{js:"0.10.0",android:"2.0.1",ios:"2.0.0",macos:"0.1.0"}}},hillshade:{doc:"Client-side hillshading visualization based on DEM data. Currently, the implementation only supports Mapbox Terrain RGB and Mapzen Terrarium tiles.","sdk-support":{"basic functionality":{js:"0.43.0",android:"6.0.0",ios:"4.0.0",macos:"0.7.0"}}},background:{doc:"The background color or pattern of the map.","sdk-support":{"basic functionality":{js:"0.10.0",android:"2.0.1",ios:"2.0.0",macos:"0.1.0"}}},sky:{doc:"A spherical dome around the map that is always rendered behind all other layers.","sdk-support":{"basic functionality":{js:"2.0.0"}}}},doc:"Rendering type of this layer.",required:!0},metadata:{type:"*",doc:"Arbitrary properties useful to track with the layer, but do not influence rendering. Properties should be prefixed to avoid collisions, like 'mapbox:'."},source:{type:"string",doc:"Name of a source description to be used for this layer. Required for all layer types except `background`."},"source-layer":{type:"string",doc:"Layer to use from a vector tile source. Required for vector tile sources; prohibited for all other source types, including GeoJSON sources."},minzoom:{type:"number",minimum:0,maximum:24,doc:"The minimum zoom level for the layer. At zoom levels less than the minzoom, the layer will be hidden."},maxzoom:{type:"number",minimum:0,maximum:24,doc:"The maximum zoom level for the layer. At zoom levels equal to or greater than the maxzoom, the layer will be hidden."},filter:{type:"filter",doc:"A expression specifying conditions on source features. Only features that match the filter are displayed. Zoom expressions in filters are only evaluated at integer zoom levels. The `feature-state` expression is not supported in filter expressions."},layout:{type:"layout",doc:"Layout properties for the layer."},paint:{type:"paint",doc:"Default paint properties for this layer."}},layout:["layout_fill","layout_line","layout_circle","layout_heatmap","layout_fill-extrusion","layout_symbol","layout_raster","layout_hillshade","layout_background","layout_sky"],layout_background:{visibility:{type:"enum",values:{visible:{doc:"The layer is shown."},none:{doc:"The layer is not shown."}},default:"visible",doc:"Whether this layer is displayed.","sdk-support":{"basic functionality":{js:"0.10.0",android:"2.0.1",ios:"2.0.0",macos:"0.1.0"}},"property-type":"constant"}},layout_sky:{visibility:{type:"enum",values:{visible:{doc:"The layer is shown."},none:{doc:"The layer is not shown."}},default:"visible",doc:"Whether this layer is displayed.","sdk-support":{"basic functionality":{js:"2.0.0"}},"property-type":"constant"}},layout_fill:{"fill-sort-key":{type:"number",doc:"Sorts features in ascending order based on this value. Features with a higher sort key will appear above features with a lower sort key.","sdk-support":{"basic functionality":{js:"1.2.0",android:"9.1.0",ios:"5.8.0",macos:"0.15.0"},"data-driven styling":{js:"1.2.0",android:"9.1.0",ios:"5.8.0",macos:"0.15.0"}},expression:{interpolated:!1,parameters:["zoom","feature"]},"property-type":"data-driven"},visibility:{type:"enum",values:{visible:{doc:"The layer is shown."},none:{doc:"The layer is not shown."}},default:"visible",doc:"Whether this layer is displayed.","sdk-support":{"basic functionality":{js:"0.10.0",android:"2.0.1",ios:"2.0.0",macos:"0.1.0"}},"property-type":"constant"}},layout_circle:{"circle-sort-key":{type:"number",doc:"Sorts features in ascending order based on this value. Features with a higher sort key will appear above features with a lower sort key.","sdk-support":{"basic functionality":{js:"1.2.0",android:"9.2.0",ios:"5.9.0",macos:"0.16.0"},"data-driven styling":{js:"1.2.0",android:"9.2.0",ios:"5.9.0",macos:"0.16.0"}},expression:{interpolated:!1,parameters:["zoom","feature"]},"property-type":"data-driven"},visibility:{type:"enum",values:{visible:{doc:"The layer is shown."},none:{doc:"The layer is not shown."}},default:"visible",doc:"Whether this layer is displayed.","sdk-support":{"basic functionality":{js:"0.10.0",android:"2.0.1",ios:"2.0.0",macos:"0.1.0"}},"property-type":"constant"}},layout_heatmap:{visibility:{type:"enum",values:{visible:{doc:"The layer is shown."},none:{doc:"The layer is not shown."}},default:"visible",doc:"Whether this layer is displayed.","sdk-support":{"basic functionality":{js:"0.41.0",android:"6.0.0",ios:"4.0.0",macos:"0.7.0"}},"property-type":"constant"}},"layout_fill-extrusion":{visibility:{type:"enum",values:{visible:{doc:"The layer is shown."},none:{doc:"The layer is not shown."}},default:"visible",doc:"Whether this layer is displayed.","sdk-support":{"basic functionality":{js:"0.27.0",android:"5.1.0",ios:"3.6.0",macos:"0.5.0"}},"property-type":"constant"}},layout_line:{"line-cap":{type:"enum",values:{butt:{doc:"A cap with a squared-off end which is drawn to the exact endpoint of the line."},round:{doc:"A cap with a rounded end which is drawn beyond the endpoint of the line at a radius of one-half of the line's width and centered on the endpoint of the line."},square:{doc:"A cap with a squared-off end which is drawn beyond the endpoint of the line at a distance of one-half of the line's width."}},default:"butt",doc:"The display of line endings.","sdk-support":{"basic functionality":{js:"0.10.0",android:"2.0.1",ios:"2.0.0",macos:"0.1.0"},"data-driven styling":{js:"2.3.0"}},expression:{interpolated:!1,parameters:["zoom","feature"]},"property-type":"data-driven"},"line-join":{type:"enum",values:{bevel:{doc:"A join with a squared-off end which is drawn beyond the endpoint of the line at a distance of one-half of the line's width."},round:{doc:"A join with a rounded end which is drawn beyond the endpoint of the line at a radius of one-half of the line's width and centered on the endpoint of the line."},miter:{doc:"A join with a sharp, angled corner which is drawn with the outer sides beyond the endpoint of the path until they meet."}},default:"miter",doc:"The display of lines when joining.","sdk-support":{"basic functionality":{js:"0.10.0",android:"2.0.1",ios:"2.0.0",macos:"0.1.0"},"data-driven styling":{js:"0.40.0",android:"5.2.0",ios:"3.7.0",macos:"0.6.0"}},expression:{interpolated:!1,parameters:["zoom","feature"]},"property-type":"data-driven"},"line-miter-limit":{type:"number",default:2,doc:"Used to automatically convert miter joins to bevel joins for sharp angles.",requires:[{"line-join":"miter"}],"sdk-support":{"basic functionality":{js:"0.10.0",android:"2.0.1",ios:"2.0.0",macos:"0.1.0"}},expression:{interpolated:!0,parameters:["zoom"]},"property-type":"data-constant"},"line-round-limit":{type:"number",default:1.05,doc:"Used to automatically convert round joins to miter joins for shallow angles.",requires:[{"line-join":"round"}],"sdk-support":{"basic functionality":{js:"0.10.0",android:"2.0.1",ios:"2.0.0",macos:"0.1.0"}},expression:{interpolated:!0,parameters:["zoom"]},"property-type":"data-constant"},"line-sort-key":{type:"number",doc:"Sorts features in ascending order based on this value. Features with a higher sort key will appear above features with a lower sort key.","sdk-support":{"basic functionality":{js:"1.2.0",android:"9.1.0",ios:"5.8.0",macos:"0.15.0"},"data-driven styling":{js:"1.2.0",android:"9.1.0",ios:"5.8.0",macos:"0.15.0"}},expression:{interpolated:!1,parameters:["zoom","feature"]},"property-type":"data-driven"},visibility:{type:"enum",values:{visible:{doc:"The layer is shown."},none:{doc:"The layer is not shown."}},default:"visible",doc:"Whether this layer is displayed.","sdk-support":{"basic functionality":{js:"0.10.0",android:"2.0.1",ios:"2.0.0",macos:"0.1.0"}},"property-type":"constant"}},layout_symbol:{"symbol-placement":{type:"enum",values:{point:{doc:"The label is placed at the point where the geometry is located."},line:{doc:"The label is placed along the line of the geometry. Can only be used on `LineString` and `Polygon` geometries."},"line-center":{doc:"The label is placed at the center of the line of the geometry. Can only be used on `LineString` and `Polygon` geometries. Note that a single feature in a vector tile may contain multiple line geometries."}},default:"point",doc:"Label placement relative to its geometry.","sdk-support":{"basic functionality":{js:"0.10.0",android:"2.0.1",ios:"2.0.0",macos:"0.1.0"},"`line-center` value":{js:"0.47.0",android:"6.4.0",ios:"4.3.0",macos:"0.10.0"}},expression:{interpolated:!1,parameters:["zoom"]},"property-type":"data-constant"},"symbol-spacing":{type:"number",default:250,minimum:1,units:"pixels",doc:"Distance between two symbol anchors.",requires:[{"symbol-placement":"line"}],"sdk-support":{"basic functionality":{js:"0.10.0",android:"2.0.1",ios:"2.0.0",macos:"0.1.0"}},expression:{interpolated:!0,parameters:["zoom"]},"property-type":"data-constant"},"symbol-avoid-edges":{type:"boolean",default:!1,doc:"If true, the symbols will not cross tile edges to avoid mutual collisions. Recommended in layers that don't have enough padding in the vector tile to prevent collisions, or if it is a point symbol layer placed after a line symbol layer. When using a client that supports global collision detection, like Mapbox GL JS version 0.42.0 or greater, enabling this property is not needed to prevent clipped labels at tile boundaries.","sdk-support":{"basic functionality":{js:"0.10.0",android:"2.0.1",ios:"2.0.0",macos:"0.1.0"}},expression:{interpolated:!1,parameters:["zoom"]},"property-type":"data-constant"},"symbol-sort-key":{type:"number",doc:"Sorts features in ascending order based on this value. Features with lower sort keys are drawn and placed first. When `icon-allow-overlap` or `text-allow-overlap` is `false`, features with a lower sort key will have priority during placement. When `icon-allow-overlap` or `text-allow-overlap` is set to `true`, features with a higher sort key will overlap over features with a lower sort key.","sdk-support":{"basic functionality":{js:"0.53.0",android:"7.4.0",ios:"4.11.0",macos:"0.14.0"},"data-driven styling":{js:"0.53.0",android:"7.4.0",ios:"4.11.0",macos:"0.14.0"}},expression:{interpolated:!1,parameters:["zoom","feature"]},"property-type":"data-driven"},"symbol-z-order":{type:"enum",values:{auto:{doc:"Sorts symbols by `symbol-sort-key` if set. Otherwise, sorts symbols by their y-position relative to the viewport if `icon-allow-overlap` or `text-allow-overlap` is set to `true` or `icon-ignore-placement` or `text-ignore-placement` is `false`."},"viewport-y":{doc:"Sorts symbols by their y-position relative to the viewport if `icon-allow-overlap` or `text-allow-overlap` is set to `true` or `icon-ignore-placement` or `text-ignore-placement` is `false`."},source:{doc:"Sorts symbols by `symbol-sort-key` if set. Otherwise, no sorting is applied; symbols are rendered in the same order as the source data."}},default:"auto",doc:"Determines whether overlapping symbols in the same layer are rendered in the order that they appear in the data source or by their y-position relative to the viewport. To control the order and prioritization of symbols otherwise, use `symbol-sort-key`.","sdk-support":{"basic functionality":{js:"0.49.0",android:"6.6.0",ios:"4.5.0",macos:"0.12.0"}},expression:{interpolated:!1,parameters:["zoom"]},"property-type":"data-constant"},"icon-allow-overlap":{type:"boolean",default:!1,doc:"If true, the icon will be visible even if it collides with other previously drawn symbols.",requires:["icon-image"],"sdk-support":{"basic functionality":{js:"0.10.0",android:"2.0.1",ios:"2.0.0",macos:"0.1.0"}},expression:{interpolated:!1,parameters:["zoom"]},"property-type":"data-constant"},"icon-ignore-placement":{type:"boolean",default:!1,doc:"If true, other symbols can be visible even if they collide with the icon.",requires:["icon-image"],"sdk-support":{"basic functionality":{js:"0.10.0",android:"2.0.1",ios:"2.0.0",macos:"0.1.0"}},expression:{interpolated:!1,parameters:["zoom"]},"property-type":"data-constant"},"icon-optional":{type:"boolean",default:!1,doc:"If true, text will display without their corresponding icons when the icon collides with other symbols and the text does not.",requires:["icon-image","text-field"],"sdk-support":{"basic functionality":{js:"0.10.0",android:"2.0.1",ios:"2.0.0",macos:"0.1.0"}},expression:{interpolated:!1,parameters:["zoom"]},"property-type":"data-constant"},"icon-rotation-alignment":{type:"enum",values:{map:{doc:"When `symbol-placement` is set to `point`, aligns icons east-west. When `symbol-placement` is set to `line` or `line-center`, aligns icon x-axes with the line."},viewport:{doc:"Produces icons whose x-axes are aligned with the x-axis of the viewport, regardless of the value of `symbol-placement`."},auto:{doc:"When `symbol-placement` is set to `point`, this is equivalent to `viewport`. When `symbol-placement` is set to `line` or `line-center`, this is equivalent to `map`."}},default:"auto",doc:"In combination with `symbol-placement`, determines the rotation behavior of icons.",requires:["icon-image"],"sdk-support":{"basic functionality":{js:"0.10.0",android:"2.0.1",ios:"2.0.0",macos:"0.1.0"},"`auto` value":{js:"0.25.0",android:"4.2.0",ios:"3.4.0",macos:"0.3.0"}},expression:{interpolated:!1,parameters:["zoom"]},"property-type":"data-constant"},"icon-size":{type:"number",default:1,minimum:0,units:"factor of the original icon size",doc:"Scales the original size of the icon by the provided factor. The new pixel size of the image will be the original pixel size multiplied by `icon-size`. 1 is the original size; 3 triples the size of the image.",requires:["icon-image"],"sdk-support":{"basic functionality":{js:"0.10.0",android:"2.0.1",ios:"2.0.0",macos:"0.1.0"},"data-driven styling":{js:"0.35.0",android:"5.1.0",ios:"3.6.0",macos:"0.5.0"}},expression:{interpolated:!0,parameters:["zoom","feature"]},"property-type":"data-driven"},"icon-text-fit":{type:"enum",values:{none:{doc:"The icon is displayed at its intrinsic aspect ratio."},width:{doc:"The icon is scaled in the x-dimension to fit the width of the text."},height:{doc:"The icon is scaled in the y-dimension to fit the height of the text."},both:{doc:"The icon is scaled in both x- and y-dimensions."}},default:"none",doc:"Scales the icon to fit around the associated text.",requires:["icon-image","text-field"],"sdk-support":{"basic functionality":{js:"0.21.0",android:"4.2.0",ios:"3.4.0",macos:"0.2.1"},"stretchable icons":{js:"1.6.0",android:"9.2.0",ios:"5.8.0",macos:"0.15.0"}},expression:{interpolated:!1,parameters:["zoom"]},"property-type":"data-constant"},"icon-text-fit-padding":{type:"array",value:"number",length:4,default:[0,0,0,0],units:"pixels",doc:"Size of the additional area added to dimensions determined by `icon-text-fit`, in clockwise order: top, right, bottom, left.",requires:["icon-image","text-field",{"icon-text-fit":["both","width","height"]}],"sdk-support":{"basic functionality":{js:"0.21.0",android:"4.2.0",ios:"3.4.0",macos:"0.2.1"}},expression:{interpolated:!0,parameters:["zoom"]},"property-type":"data-constant"},"icon-image":{type:"resolvedImage",doc:"Name of image in sprite to use for drawing an image background.",tokens:!0,"sdk-support":{"basic functionality":{js:"0.10.0",android:"2.0.1",ios:"2.0.0",macos:"0.1.0"},"data-driven styling":{js:"0.35.0",android:"5.1.0",ios:"3.6.0",macos:"0.5.0"}},expression:{interpolated:!1,parameters:["zoom","feature"]},"property-type":"data-driven"},"icon-rotate":{type:"number",default:0,period:360,units:"degrees",doc:"Rotates the icon clockwise.",requires:["icon-image"],"sdk-support":{"basic functionality":{js:"0.10.0",android:"2.0.1",ios:"2.0.0",macos:"0.1.0"},"data-driven styling":{js:"0.21.0",android:"5.0.0",ios:"3.5.0",macos:"0.4.0"}},expression:{interpolated:!0,parameters:["zoom","feature"]},"property-type":"data-driven"},"icon-padding":{type:"number",default:2,minimum:0,units:"pixels",doc:"Size of the additional area around the icon bounding box used for detecting symbol collisions.",requires:["icon-image"],"sdk-support":{"basic functionality":{js:"0.10.0",android:"2.0.1",ios:"2.0.0",macos:"0.1.0"}},expression:{interpolated:!0,parameters:["zoom"]},"property-type":"data-constant"},"icon-keep-upright":{type:"boolean",default:!1,doc:"If true, the icon may be flipped to prevent it from being rendered upside-down.",requires:["icon-image",{"icon-rotation-alignment":"map"},{"symbol-placement":["line","line-center"]}],"sdk-support":{"basic functionality":{js:"0.10.0",android:"2.0.1",ios:"2.0.0",macos:"0.1.0"}},expression:{interpolated:!1,parameters:["zoom"]},"property-type":"data-constant"},"icon-offset":{type:"array",value:"number",length:2,default:[0,0],doc:"Offset distance of icon from its anchor. Positive values indicate right and down, while negative values indicate left and up. Each component is multiplied by the value of `icon-size` to obtain the final offset in pixels. When combined with `icon-rotate` the offset will be as if the rotated direction was up.",requires:["icon-image"],"sdk-support":{"basic functionality":{js:"0.10.0",android:"2.0.1",ios:"2.0.0",macos:"0.1.0"},"data-driven styling":{js:"0.29.0",android:"5.0.0",ios:"3.5.0",macos:"0.4.0"}},expression:{interpolated:!0,parameters:["zoom","feature"]},"property-type":"data-driven"},"icon-anchor":{type:"enum",values:{center:{doc:"The center of the icon is placed closest to the anchor."},left:{doc:"The left side of the icon is placed closest to the anchor."},right:{doc:"The right side of the icon is placed closest to the anchor."},top:{doc:"The top of the icon is placed closest to the anchor."},bottom:{doc:"The bottom of the icon is placed closest to the anchor."},"top-left":{doc:"The top left corner of the icon is placed closest to the anchor."},"top-right":{doc:"The top right corner of the icon is placed closest to the anchor."},"bottom-left":{doc:"The bottom left corner of the icon is placed closest to the anchor."},"bottom-right":{doc:"The bottom right corner of the icon is placed closest to the anchor."}},default:"center",doc:"Part of the icon placed closest to the anchor.",requires:["icon-image"],"sdk-support":{"basic functionality":{js:"0.40.0",android:"5.2.0",ios:"3.7.0",macos:"0.6.0"},"data-driven styling":{js:"0.40.0",android:"5.2.0",ios:"3.7.0",macos:"0.6.0"}},expression:{interpolated:!1,parameters:["zoom","feature"]},"property-type":"data-driven"},"icon-pitch-alignment":{type:"enum",values:{map:{doc:"The icon is aligned to the plane of the map."},viewport:{doc:"The icon is aligned to the plane of the viewport."},auto:{doc:"Automatically matches the value of `icon-rotation-alignment`."}},default:"auto",doc:"Orientation of icon when map is pitched.",requires:["icon-image"],"sdk-support":{"basic functionality":{js:"0.39.0",android:"5.2.0",ios:"3.7.0",macos:"0.6.0"}},expression:{interpolated:!1,parameters:["zoom"]},"property-type":"data-constant"},"text-pitch-alignment":{type:"enum",values:{map:{doc:"The text is aligned to the plane of the map."},viewport:{doc:"The text is aligned to the plane of the viewport."},auto:{doc:"Automatically matches the value of `text-rotation-alignment`."}},default:"auto",doc:"Orientation of text when map is pitched.",requires:["text-field"],"sdk-support":{"basic functionality":{js:"0.21.0",android:"4.2.0",ios:"3.4.0",macos:"0.2.1"},"`auto` value":{js:"0.25.0",android:"4.2.0",ios:"3.4.0",macos:"0.3.0"}},expression:{interpolated:!1,parameters:["zoom"]},"property-type":"data-constant"},"text-rotation-alignment":{type:"enum",values:{map:{doc:"When `symbol-placement` is set to `point`, aligns text east-west. When `symbol-placement` is set to `line` or `line-center`, aligns text x-axes with the line."},viewport:{doc:"Produces glyphs whose x-axes are aligned with the x-axis of the viewport, regardless of the value of `symbol-placement`."},auto:{doc:"When `symbol-placement` is set to `point`, this is equivalent to `viewport`. When `symbol-placement` is set to `line` or `line-center`, this is equivalent to `map`."}},default:"auto",doc:"In combination with `symbol-placement`, determines the rotation behavior of the individual glyphs forming the text.",requires:["text-field"],"sdk-support":{"basic functionality":{js:"0.10.0",android:"2.0.1",ios:"2.0.0",macos:"0.1.0"},"`auto` value":{js:"0.25.0",android:"4.2.0",ios:"3.4.0",macos:"0.3.0"}},expression:{interpolated:!1,parameters:["zoom"]},"property-type":"data-constant"},"text-field":{type:"formatted",default:"",tokens:!0,doc:"Value to use for a text label. If a plain `string` is provided, it will be treated as a `formatted` with default/inherited formatting options.","sdk-support":{"basic functionality":{js:"0.10.0",android:"2.0.1",ios:"2.0.0",macos:"0.1.0"},"data-driven styling":{js:"0.33.0",android:"5.0.0",ios:"3.5.0",macos:"0.4.0"}},expression:{interpolated:!1,parameters:["zoom","feature"]},"property-type":"data-driven"},"text-font":{type:"array",value:"string",default:["Open Sans Regular","Arial Unicode MS Regular"],doc:"Font stack to use for displaying text.",requires:["text-field"],"sdk-support":{"basic functionality":{js:"0.10.0",android:"2.0.1",ios:"2.0.0",macos:"0.1.0"},"data-driven styling":{js:"0.43.0",android:"6.0.0",ios:"4.0.0",macos:"0.7.0"}},expression:{interpolated:!1,parameters:["zoom","feature"]},"property-type":"data-driven"},"text-size":{type:"number",default:16,minimum:0,units:"pixels",doc:"Font size.",requires:["text-field"],"sdk-support":{"basic functionality":{js:"0.10.0",android:"2.0.1",ios:"2.0.0",macos:"0.1.0"},"data-driven styling":{js:"0.35.0",android:"5.1.0",ios:"3.6.0",macos:"0.5.0"}},expression:{interpolated:!0,parameters:["zoom","feature"]},"property-type":"data-driven"},"text-max-width":{type:"number",default:10,minimum:0,units:"ems",doc:"The maximum line width for text wrapping.",requires:["text-field"],"sdk-support":{"basic functionality":{js:"0.10.0",android:"2.0.1",ios:"2.0.0",macos:"0.1.0"},"data-driven styling":{js:"0.40.0",android:"5.2.0",ios:"3.7.0",macos:"0.6.0"}},expression:{interpolated:!0,parameters:["zoom","feature"]},"property-type":"data-driven"},"text-line-height":{type:"number",default:1.2,units:"ems",doc:"Text leading value for multi-line text.",requires:["text-field"],"sdk-support":{"basic functionality":{js:"0.10.0",android:"2.0.1",ios:"2.0.0",macos:"0.1.0"},"data-driven styling":{js:"2.3.0"}},expression:{interpolated:!0,parameters:["zoom","feature"]},"property-type":"data-driven"},"text-letter-spacing":{type:"number",default:0,units:"ems",doc:"Text tracking amount.",requires:["text-field"],"sdk-support":{"basic functionality":{js:"0.10.0",android:"2.0.1",ios:"2.0.0",macos:"0.1.0"},"data-driven styling":{js:"0.40.0",android:"5.2.0",ios:"3.7.0",macos:"0.6.0"}},expression:{interpolated:!0,parameters:["zoom","feature"]},"property-type":"data-driven"},"text-justify":{type:"enum",values:{auto:{doc:"The text is aligned towards the anchor position."},left:{doc:"The text is aligned to the left."},center:{doc:"The text is centered."},right:{doc:"The text is aligned to the right."}},default:"center",doc:"Text justification options.",requires:["text-field"],"sdk-support":{"basic functionality":{js:"0.10.0",android:"2.0.1",ios:"2.0.0",macos:"0.1.0"},"data-driven styling":{js:"0.39.0",android:"5.2.0",ios:"3.7.0",macos:"0.6.0"},auto:{js:"0.54.0",android:"7.4.0",ios:"4.10.0",macos:"0.14.0"}},expression:{interpolated:!1,parameters:["zoom","feature"]},"property-type":"data-driven"},"text-radial-offset":{type:"number",units:"ems",default:0,doc:"Radial offset of text, in the direction of the symbol's anchor. Useful in combination with `text-variable-anchor`, which defaults to using the two-dimensional `text-offset` if present.","sdk-support":{"basic functionality":{js:"0.54.0",android:"7.4.0",ios:"4.10.0",macos:"0.14.0"},"data-driven styling":{js:"0.54.0",android:"7.4.0",ios:"4.10.0",macos:"0.14.0"}},requires:["text-field"],"property-type":"data-driven",expression:{interpolated:!0,parameters:["zoom","feature"]}},"text-variable-anchor":{type:"array",value:"enum",values:{center:{doc:"The center of the text is placed closest to the anchor."},left:{doc:"The left side of the text is placed closest to the anchor."},right:{doc:"The right side of the text is placed closest to the anchor."},top:{doc:"The top of the text is placed closest to the anchor."},bottom:{doc:"The bottom of the text is placed closest to the anchor."},"top-left":{doc:"The top left corner of the text is placed closest to the anchor."},"top-right":{doc:"The top right corner of the text is placed closest to the anchor."},"bottom-left":{doc:"The bottom left corner of the text is placed closest to the anchor."},"bottom-right":{doc:"The bottom right corner of the text is placed closest to the anchor."}},requires:["text-field",{"symbol-placement":["point"]}],doc:"To increase the chance of placing high-priority labels on the map, you can provide an array of `text-anchor` locations: the renderer will attempt to place the label at each location, in order, before moving onto the next label. Use `text-justify: auto` to choose justification based on anchor position. To apply an offset, use the `text-radial-offset` or the two-dimensional `text-offset`.","sdk-support":{"basic functionality":{js:"0.54.0",android:"7.4.0",ios:"4.10.0",macos:"0.14.0"}},expression:{interpolated:!1,parameters:["zoom"]},"property-type":"data-constant"},"text-anchor":{type:"enum",values:{center:{doc:"The center of the text is placed closest to the anchor."},left:{doc:"The left side of the text is placed closest to the anchor."},right:{doc:"The right side of the text is placed closest to the anchor."},top:{doc:"The top of the text is placed closest to the anchor."},bottom:{doc:"The bottom of the text is placed closest to the anchor."},"top-left":{doc:"The top left corner of the text is placed closest to the anchor."},"top-right":{doc:"The top right corner of the text is placed closest to the anchor."},"bottom-left":{doc:"The bottom left corner of the text is placed closest to the anchor."},"bottom-right":{doc:"The bottom right corner of the text is placed closest to the anchor."}},default:"center",doc:"Part of the text placed closest to the anchor.",requires:["text-field",{"!":"text-variable-anchor"}],"sdk-support":{"basic functionality":{js:"0.10.0",android:"2.0.1",ios:"2.0.0",macos:"0.1.0"},"data-driven styling":{js:"0.39.0",android:"5.2.0",ios:"3.7.0",macos:"0.6.0"}},expression:{interpolated:!1,parameters:["zoom","feature"]},"property-type":"data-driven"},"text-max-angle":{type:"number",default:45,units:"degrees",doc:"Maximum angle change between adjacent characters.",requires:["text-field",{"symbol-placement":["line","line-center"]}],"sdk-support":{"basic functionality":{js:"0.10.0",android:"2.0.1",ios:"2.0.0",macos:"0.1.0"}},expression:{interpolated:!0,parameters:["zoom"]},"property-type":"data-constant"},"text-writing-mode":{type:"array",value:"enum",values:{horizontal:{doc:"If a text's language supports horizontal writing mode, symbols with point placement would be laid out horizontally."},vertical:{doc:"If a text's language supports vertical writing mode, symbols with point placement would be laid out vertically."}},doc:"The property allows control over a symbol's orientation. Note that the property values act as a hint, so that a symbol whose language doesn’t support the provided orientation will be laid out in its natural orientation. Example: English point symbol will be rendered horizontally even if array value contains single 'vertical' enum value. The order of elements in an array define priority order for the placement of an orientation variant.",requires:["text-field",{"symbol-placement":["point"]}],"sdk-support":{"basic functionality":{js:"1.3.0",android:"8.3.0",ios:"5.3.0",macos:"0.15.0"}},expression:{interpolated:!1,parameters:["zoom"]},"property-type":"data-constant"},"text-rotate":{type:"number",default:0,period:360,units:"degrees",doc:"Rotates the text clockwise.",requires:["text-field"],"sdk-support":{"basic functionality":{js:"0.10.0",android:"2.0.1",ios:"2.0.0",macos:"0.1.0"},"data-driven styling":{js:"0.35.0",android:"5.1.0",ios:"3.6.0",macos:"0.5.0"}},expression:{interpolated:!0,parameters:["zoom","feature"]},"property-type":"data-driven"},"text-padding":{type:"number",default:2,minimum:0,units:"pixels",doc:"Size of the additional area around the text bounding box used for detecting symbol collisions.",requires:["text-field"],"sdk-support":{"basic functionality":{js:"0.10.0",android:"2.0.1",ios:"2.0.0",macos:"0.1.0"}},expression:{interpolated:!0,parameters:["zoom"]},"property-type":"data-constant"},"text-keep-upright":{type:"boolean",default:!0,doc:"If true, the text may be flipped vertically to prevent it from being rendered upside-down.",requires:["text-field",{"text-rotation-alignment":"map"},{"symbol-placement":["line","line-center"]}],"sdk-support":{"basic functionality":{js:"0.10.0",android:"2.0.1",ios:"2.0.0",macos:"0.1.0"}},expression:{interpolated:!1,parameters:["zoom"]},"property-type":"data-constant"},"text-transform":{type:"enum",values:{none:{doc:"The text is not altered."},uppercase:{doc:"Forces all letters to be displayed in uppercase."},lowercase:{doc:"Forces all letters to be displayed in lowercase."}},default:"none",doc:"Specifies how to capitalize text, similar to the CSS `text-transform` property.",requires:["text-field"],"sdk-support":{"basic functionality":{js:"0.10.0",android:"2.0.1",ios:"2.0.0",macos:"0.1.0"},"data-driven styling":{js:"0.33.0",android:"5.0.0",ios:"3.5.0",macos:"0.4.0"}},expression:{interpolated:!1,parameters:["zoom","feature"]},"property-type":"data-driven"},"text-offset":{type:"array",doc:"Offset distance of text from its anchor. Positive values indicate right and down, while negative values indicate left and up. If used with text-variable-anchor, input values will be taken as absolute values. Offsets along the x- and y-axis will be applied automatically based on the anchor position.",value:"number",units:"ems",length:2,default:[0,0],requires:["text-field",{"!":"text-radial-offset"}],"sdk-support":{"basic functionality":{js:"0.10.0",android:"2.0.1",ios:"2.0.0",macos:"0.1.0"},"data-driven styling":{js:"0.35.0",android:"5.1.0",ios:"3.6.0",macos:"0.5.0"}},expression:{interpolated:!0,parameters:["zoom","feature"]},"property-type":"data-driven"},"text-allow-overlap":{type:"boolean",default:!1,doc:"If true, the text will be visible even if it collides with other previously drawn symbols.",requires:["text-field"],"sdk-support":{"basic functionality":{js:"0.10.0",android:"2.0.1",ios:"2.0.0",macos:"0.1.0"}},expression:{interpolated:!1,parameters:["zoom"]},"property-type":"data-constant"},"text-ignore-placement":{type:"boolean",default:!1,doc:"If true, other symbols can be visible even if they collide with the text.",requires:["text-field"],"sdk-support":{"basic functionality":{js:"0.10.0",android:"2.0.1",ios:"2.0.0",macos:"0.1.0"}},expression:{interpolated:!1,parameters:["zoom"]},"property-type":"data-constant"},"text-optional":{type:"boolean",default:!1,doc:"If true, icons will display without their corresponding text when the text collides with other symbols and the icon does not.",requires:["text-field","icon-image"],"sdk-support":{"basic functionality":{js:"0.10.0",android:"2.0.1",ios:"2.0.0",macos:"0.1.0"}},expression:{interpolated:!1,parameters:["zoom"]},"property-type":"data-constant"},visibility:{type:"enum",values:{visible:{doc:"The layer is shown."},none:{doc:"The layer is not shown."}},default:"visible",doc:"Whether this layer is displayed.","sdk-support":{"basic functionality":{js:"0.10.0",android:"2.0.1",ios:"2.0.0",macos:"0.1.0"}},"property-type":"constant"}},layout_raster:{visibility:{type:"enum",values:{visible:{doc:"The layer is shown."},none:{doc:"The layer is not shown."}},default:"visible",doc:"Whether this layer is displayed.","sdk-support":{"basic functionality":{js:"0.10.0",android:"2.0.1",ios:"2.0.0",macos:"0.1.0"}},"property-type":"constant"}},layout_hillshade:{visibility:{type:"enum",values:{visible:{doc:"The layer is shown."},none:{doc:"The layer is not shown."}},default:"visible",doc:"Whether this layer is displayed.","sdk-support":{"basic functionality":{js:"0.43.0",android:"6.0.0",ios:"4.0.0",macos:"0.7.0"}},"property-type":"constant"}},filter:{type:"array",value:"*",doc:"A filter selects specific features from a layer."},filter_operator:{type:"enum",values:{"==":{doc:'`["==", key, value]` equality: `feature[key] = value`'},"!=":{doc:'`["!=", key, value]` inequality: `feature[key] ≠ value`'},">":{doc:'`[">", key, value]` greater than: `feature[key] > value`'},">=":{doc:'`[">=", key, value]` greater than or equal: `feature[key] ≥ value`'},"<":{doc:'`["<", key, value]` less than: `feature[key] < value`'},"<=":{doc:'`["<=", key, value]` less than or equal: `feature[key] ≤ value`'},in:{doc:'`["in", key, v0, ..., vn]` set inclusion: `feature[key] ∈ {v0, ..., vn}`'},"!in":{doc:'`["!in", key, v0, ..., vn]` set exclusion: `feature[key] ∉ {v0, ..., vn}`'},all:{doc:'`["all", f0, ..., fn]` logical `AND`: `f0 ∧ ... ∧ fn`'},any:{doc:'`["any", f0, ..., fn]` logical `OR`: `f0 ∨ ... ∨ fn`'},none:{doc:'`["none", f0, ..., fn]` logical `NOR`: `¬f0 ∧ ... ∧ ¬fn`'},has:{doc:'`["has", key]` `feature[key]` exists'},"!has":{doc:'`["!has", key]` `feature[key]` does not exist'},within:{doc:'`["within", object]` feature geometry is within object geometry'}},doc:"The filter operator."},geometry_type:{type:"enum",values:{Point:{doc:"Filter to point geometries."},LineString:{doc:"Filter to line geometries."},Polygon:{doc:"Filter to polygon geometries."}},doc:"The geometry type for the filter to select."},function:{expression:{type:"expression",doc:"An expression."},stops:{type:"array",doc:"An array of stops.",value:"function_stop"},base:{type:"number",default:1,minimum:0,doc:"The exponential base of the interpolation curve. It controls the rate at which the result increases. Higher values make the result increase more towards the high end of the range. With `1` the stops are interpolated linearly."},property:{type:"string",doc:"The name of a feature property to use as the function input.",default:"$zoom"},type:{type:"enum",values:{identity:{doc:"Return the input value as the output value."},exponential:{doc:"Generate an output by interpolating between stops just less than and just greater than the function input."},interval:{doc:"Return the output value of the stop just less than the function input."},categorical:{doc:"Return the output value of the stop equal to the function input."}},doc:"The interpolation strategy to use in function evaluation.",default:"exponential"},colorSpace:{type:"enum",values:{rgb:{doc:"Use the RGB color space to interpolate color values"},lab:{doc:"Use the LAB color space to interpolate color values."},hcl:{doc:"Use the HCL color space to interpolate color values, interpolating the Hue, Chroma, and Luminance channels individually."}},doc:"The color space in which colors interpolated. Interpolating colors in perceptual color spaces like LAB and HCL tend to produce color ramps that look more consistent and produce colors that can be differentiated more easily than those interpolated in RGB space.",default:"rgb"},default:{type:"*",required:!1,doc:"A value to serve as a fallback function result when a value isn't otherwise available. It is used in the following circumstances:\n* In categorical functions, when the feature value does not match any of the stop domain values.\n* In property and zoom-and-property functions, when a feature does not contain a value for the specified property.\n* In identity functions, when the feature value is not valid for the style property (for example, if the function is being used for a `circle-color` property but the feature property value is not a string or not a valid color).\n* In interval or exponential property and zoom-and-property functions, when the feature value is not numeric.\nIf no default is provided, the style property's default is used in these circumstances."}},function_stop:{type:"array",minimum:0,maximum:24,value:["number","color"],length:2,doc:"Zoom level and value pair."},expression:{type:"array",value:"*",minimum:1,doc:"An expression defines a function that can be used for data-driven style properties or feature filters."},expression_name:{doc:"",type:"enum",values:{let:{doc:'Binds expressions to named variables, which can then be referenced in the result expression using ["var", "variable_name"].',group:"Variable binding","sdk-support":{"basic functionality":{js:"0.41.0",android:"6.0.0",ios:"4.0.0",macos:"0.7.0"}}},var:{doc:'References variable bound using "let".',group:"Variable binding","sdk-support":{"basic functionality":{js:"0.41.0",android:"6.0.0",ios:"4.0.0",macos:"0.7.0"}}},literal:{doc:"Provides a literal array or object value.",group:"Types","sdk-support":{"basic functionality":{js:"0.41.0",android:"6.0.0",ios:"4.0.0",macos:"0.7.0"}}},array:{doc:"Asserts that the input is an array (optionally with a specific item type and length). If, when the input expression is evaluated, it is not of the asserted type, then this assertion will cause the whole expression to be aborted.",group:"Types","sdk-support":{"basic functionality":{js:"0.41.0",android:"6.0.0",ios:"4.0.0",macos:"0.7.0"}}},at:{doc:"Retrieves an item from an array.",group:"Lookup","sdk-support":{"basic functionality":{js:"0.41.0",android:"6.0.0",ios:"4.0.0",macos:"0.7.0"}}},in:{doc:"Determines whether an item exists in an array or a substring exists in a string.",group:"Lookup","sdk-support":{"basic functionality":{js:"1.6.0",android:"9.1.0",ios:"5.8.0",macos:"0.15.0"}}},"index-of":{doc:"Returns the first position at which an item can be found in an array or a substring can be found in a string, or `-1` if the input cannot be found. Accepts an optional index from where to begin the search.",group:"Lookup","sdk-support":{"basic functionality":{js:"1.10.0"}}},slice:{doc:"Returns an item from an array or a substring from a string from a specified start index, or between a start index and an end index if set. The return value is inclusive of the start index but not of the end index.",group:"Lookup","sdk-support":{"basic functionality":{js:"1.10.0"}}},case:{doc:"Selects the first output whose corresponding test condition evaluates to true, or the fallback value otherwise.",group:"Decision","sdk-support":{"basic functionality":{js:"0.41.0",android:"6.0.0",ios:"4.0.0",macos:"0.7.0"}}},match:{doc:'Selects the output for which the label value matches the input value, or the fallback value if no match is found. The input can be any expression (for example, `["get", "building_type"]`). Each label must be unique, and must be either:\n - a single literal value; or\n - an array of literal values, the values of which must be all strings or all numbers (for example `[100, 101]` or `["c", "b"]`).\n\nThe input matches if any of the values in the array matches using strict equality, similar to the `"in"` operator.\nIf the input type does not match the type of the labels, the result will be the fallback value.',group:"Decision","sdk-support":{"basic functionality":{js:"0.41.0",android:"6.0.0",ios:"4.0.0",macos:"0.7.0"}}},coalesce:{doc:"Evaluates each expression in turn until the first non-null value is obtained, and returns that value.",group:"Decision","sdk-support":{"basic functionality":{js:"0.41.0",android:"6.0.0",ios:"4.0.0",macos:"0.7.0"}}},step:{doc:'Produces discrete, stepped results by evaluating a piecewise-constant function defined by pairs of input and output values ("stops"). The `input` may be any numeric expression (e.g., `["get", "population"]`). Stop inputs must be numeric literals in strictly ascending order. Returns the output value of the stop just less than the input, or the first output if the input is less than the first stop.',group:"Ramps, scales, curves","sdk-support":{"basic functionality":{js:"0.42.0",android:"6.0.0",ios:"4.0.0",macos:"0.7.0"}}},interpolate:{doc:'Produces continuous, smooth results by interpolating between pairs of input and output values ("stops"). The `input` may be any numeric expression (e.g., `["get", "population"]`). Stop inputs must be numeric literals in strictly ascending order. The output type must be `number`, `array`, or `color`.\n\nInterpolation types:\n- `["linear"]`: Interpolates linearly between the pair of stops just less than and just greater than the input.\n- `["exponential", base]`: Interpolates exponentially between the stops just less than and just greater than the input. `base` controls the rate at which the output increases: higher values make the output increase more towards the high end of the range. With values close to 1 the output increases linearly.\n- `["cubic-bezier", x1, y1, x2, y2]`: Interpolates using the cubic bezier curve defined by the given control points.',group:"Ramps, scales, curves","sdk-support":{"basic functionality":{js:"0.42.0",android:"6.0.0",ios:"4.0.0",macos:"0.7.0"}}},"interpolate-hcl":{doc:'Produces continuous, smooth results by interpolating between pairs of input and output values ("stops"). Works like `interpolate`, but the output type must be `color`, and the interpolation is performed in the Hue-Chroma-Luminance color space.',group:"Ramps, scales, curves","sdk-support":{"basic functionality":{js:"0.49.0"}}},"interpolate-lab":{doc:'Produces continuous, smooth results by interpolating between pairs of input and output values ("stops"). Works like `interpolate`, but the output type must be `color`, and the interpolation is performed in the CIELAB color space.',group:"Ramps, scales, curves","sdk-support":{"basic functionality":{js:"0.49.0"}}},ln2:{doc:"Returns mathematical constant ln(2).",group:"Math","sdk-support":{"basic functionality":{js:"0.41.0",android:"6.0.0",ios:"4.0.0",macos:"0.7.0"}}},pi:{doc:"Returns the mathematical constant pi.",group:"Math","sdk-support":{"basic functionality":{js:"0.41.0",android:"6.0.0",ios:"4.0.0",macos:"0.7.0"}}},e:{doc:"Returns the mathematical constant e.",group:"Math","sdk-support":{"basic functionality":{js:"0.41.0",android:"6.0.0",ios:"4.0.0",macos:"0.7.0"}}},typeof:{doc:"Returns a string describing the type of the given value.",group:"Types","sdk-support":{"basic functionality":{js:"0.41.0",android:"6.0.0",ios:"4.0.0",macos:"0.7.0"}}},string:{doc:"Asserts that the input value is a string. If multiple values are provided, each one is evaluated in order until a string is obtained. If none of the inputs are strings, the expression is an error.",group:"Types","sdk-support":{"basic functionality":{js:"0.41.0",android:"6.0.0",ios:"4.0.0",macos:"0.7.0"}}},number:{doc:"Asserts that the input value is a number. If multiple values are provided, each one is evaluated in order until a number is obtained. If none of the inputs are numbers, the expression is an error.",group:"Types","sdk-support":{"basic functionality":{js:"0.41.0",android:"6.0.0",ios:"4.0.0",macos:"0.7.0"}}},boolean:{doc:"Asserts that the input value is a boolean. If multiple values are provided, each one is evaluated in order until a boolean is obtained. If none of the inputs are booleans, the expression is an error.",group:"Types","sdk-support":{"basic functionality":{js:"0.41.0",android:"6.0.0",ios:"4.0.0",macos:"0.7.0"}}},object:{doc:"Asserts that the input value is an object. If multiple values are provided, each one is evaluated in order until an object is obtained. If none of the inputs are objects, the expression is an error.",group:"Types","sdk-support":{"basic functionality":{js:"0.41.0",android:"6.0.0",ios:"4.0.0",macos:"0.7.0"}}},collator:{doc:"Returns a `collator` for use in locale-dependent comparison operations. The `case-sensitive` and `diacritic-sensitive` options default to `false`. The `locale` argument specifies the IETF language tag of the locale to use. If none is provided, the default locale is used. If the requested locale is not available, the `collator` will use a system-defined fallback locale. Use `resolved-locale` to test the results of locale fallback behavior.",group:"Types","sdk-support":{"basic functionality":{js:"0.45.0",android:"6.5.0",ios:"4.2.0",macos:"0.9.0"}}},format:{doc:'Returns a `formatted` string for displaying mixed-format text in the `text-field` property. The input may contain a string literal or expression, including an [`\'image\'`](#types-image) expression. Strings may be followed by a style override object that supports the following properties:\n- `"text-font"`: Overrides the font stack specified by the root layout property.\n- `"text-color"`: Overrides the color specified by the root paint property.\n- `"font-scale"`: Applies a scaling factor on `text-size` as specified by the root layout property.',group:"Types","sdk-support":{"basic functionality":{js:"0.48.0",android:"6.7.0",ios:"4.6.0",macos:"0.12.0"},"text-font":{js:"0.48.0",android:"6.7.0",ios:"4.6.0",macos:"0.12.0"},"font-scale":{js:"0.48.0",android:"6.7.0",ios:"4.6.0",macos:"0.12.0"},"text-color":{js:"1.3.0",android:"7.3.0",ios:"4.10.0",macos:"0.14.0"},image:{js:"1.6.0",android:"8.6.0",ios:"5.7.0",macos:"0.15.0"}}},image:{doc:"Returns an `image` type for use in `icon-image`, `*-pattern` entries and as a section in the `format` expression. If set, the `image` argument will check that the requested image exists in the style and will return either the resolved image name or `null`, depending on whether or not the image is currently in the style. This validation process is synchronous and requires the image to have been added to the style before requesting it in the `image` argument.",group:"Types","sdk-support":{"basic functionality":{js:"1.4.0",android:"8.6.0",ios:"5.7.0",macos:"0.15.0"}}},"number-format":{doc:"Converts the input number into a string representation using the providing formatting rules. If set, the `locale` argument specifies the locale to use, as a BCP 47 language tag. If set, the `currency` argument specifies an ISO 4217 code to use for currency-style formatting. If set, the `min-fraction-digits` and `max-fraction-digits` arguments specify the minimum and maximum number of fractional digits to include.",group:"Types","sdk-support":{"basic functionality":{js:"0.54.0"}}},"to-string":{doc:'Converts the input value to a string. If the input is `null`, the result is `""`. If the input is a boolean, the result is `"true"` or `"false"`. If the input is a number, it is converted to a string as specified by the ["NumberToString" algorithm](https://tc39.github.io/ecma262/#sec-tostring-applied-to-the-number-type) of the ECMAScript Language Specification. If the input is a color, it is converted to a string of the form `"rgba(r,g,b,a)"`, where `r`, `g`, and `b` are numerals ranging from 0 to 255, and `a` ranges from 0 to 1. Otherwise, the input is converted to a string in the format specified by the [`JSON.stringify`](https://tc39.github.io/ecma262/#sec-json.stringify) function of the ECMAScript Language Specification.',group:"Types","sdk-support":{"basic functionality":{js:"0.41.0",android:"6.0.0",ios:"4.0.0",macos:"0.7.0"}}},"to-number":{doc:'Converts the input value to a number, if possible. If the input is `null` or `false`, the result is 0. If the input is `true`, the result is 1. If the input is a string, it is converted to a number as specified by the ["ToNumber Applied to the String Type" algorithm](https://tc39.github.io/ecma262/#sec-tonumber-applied-to-the-string-type) of the ECMAScript Language Specification. If multiple values are provided, each one is evaluated in order until the first successful conversion is obtained. If none of the inputs can be converted, the expression is an error.',group:"Types","sdk-support":{"basic functionality":{js:"0.41.0",android:"6.0.0",ios:"4.0.0",macos:"0.7.0"}}},"to-boolean":{doc:"Converts the input value to a boolean. The result is `false` when then input is an empty string, 0, `false`, `null`, or `NaN`; otherwise it is `true`.",group:"Types","sdk-support":{"basic functionality":{js:"0.41.0",android:"6.0.0",ios:"4.0.0",macos:"0.7.0"}}},"to-rgba":{doc:"Returns a four-element array containing the input color's red, green, blue, and alpha components, in that order.",group:"Color","sdk-support":{"basic functionality":{js:"0.41.0",android:"6.0.0",ios:"4.0.0",macos:"0.7.0"}}},"to-color":{doc:"Converts the input value to a color. If multiple values are provided, each one is evaluated in order until the first successful conversion is obtained. If none of the inputs can be converted, the expression is an error.",group:"Types","sdk-support":{"basic functionality":{js:"0.41.0",android:"6.0.0",ios:"4.0.0",macos:"0.7.0"}}},rgb:{doc:"Creates a color value from red, green, and blue components, which must range between 0 and 255, and an alpha component of 1. If any component is out of range, the expression is an error.",group:"Color","sdk-support":{"basic functionality":{js:"0.41.0",android:"6.0.0",ios:"4.0.0",macos:"0.7.0"}}},rgba:{doc:"Creates a color value from red, green, blue components, which must range between 0 and 255, and an alpha component which must range between 0 and 1. If any component is out of range, the expression is an error.",group:"Color","sdk-support":{"basic functionality":{js:"0.41.0",android:"6.0.0",ios:"4.0.0",macos:"0.7.0"}}},get:{doc:"Retrieves a property value from the current feature's properties, or from another object if a second argument is provided. Returns null if the requested property is missing.",group:"Lookup","sdk-support":{"basic functionality":{js:"0.41.0",android:"6.0.0",ios:"4.0.0",macos:"0.7.0"}}},has:{doc:"Tests for the presence of an property value in the current feature's properties, or from another object if a second argument is provided.",group:"Lookup","sdk-support":{"basic functionality":{js:"0.41.0",android:"6.0.0",ios:"4.0.0",macos:"0.7.0"}}},length:{doc:"Gets the length of an array or string.",group:"Lookup","sdk-support":{"basic functionality":{js:"0.41.0",android:"6.0.0",ios:"4.0.0",macos:"0.7.0"}}},properties:{doc:'Gets the feature properties object. Note that in some cases, it may be more efficient to use ["get", "property_name"] directly.',group:"Feature data","sdk-support":{"basic functionality":{js:"0.41.0",android:"6.0.0",ios:"4.0.0",macos:"0.7.0"}}},"feature-state":{doc:"Retrieves a property value from the current feature's state. Returns null if the requested property is not present on the feature's state. A feature's state is not part of the GeoJSON or vector tile data, and must be set programmatically on each feature. Features are identified by their `id` attribute, which must be an integer or a string that can be cast to an integer. Note that [\"feature-state\"] can only be used with paint properties that support data-driven styling.",group:"Feature data","sdk-support":{"basic functionality":{js:"0.46.0"}}},"geometry-type":{doc:"Gets the feature's geometry type: `Point`, `MultiPoint`, `LineString`, `MultiLineString`, `Polygon`, `MultiPolygon`.",group:"Feature data","sdk-support":{"basic functionality":{js:"0.41.0",android:"6.0.0",ios:"4.0.0",macos:"0.7.0"}}},id:{doc:"Gets the feature's id, if it has one.",group:"Feature data","sdk-support":{"basic functionality":{js:"0.41.0",android:"6.0.0",ios:"4.0.0",macos:"0.7.0"}}},zoom:{doc:'Gets the current zoom level. Note that in style layout and paint properties, ["zoom"] may only appear as the input to a top-level "step" or "interpolate" expression.',group:"Zoom","sdk-support":{"basic functionality":{js:"0.41.0",android:"6.0.0",ios:"4.0.0",macos:"0.7.0"}}},"heatmap-density":{doc:"Gets the kernel density estimation of a pixel in a heatmap layer, which is a relative measure of how many data points are crowded around a particular pixel. Can only be used in the `heatmap-color` property.",group:"Heatmap","sdk-support":{"basic functionality":{js:"0.41.0",android:"6.0.0",ios:"4.0.0",macos:"0.7.0"}}},"line-progress":{doc:"Gets the progress along a gradient line. Can only be used in the `line-gradient` property.",group:"Feature data","sdk-support":{"basic functionality":{js:"0.45.0",android:"6.5.0",ios:"4.6.0",macos:"0.12.0"}}},"sky-radial-progress":{doc:"Gets the distance of a point on the sky from the sun position. Returns 0 at sun position and 1 when the distance reaches `sky-gradient-radius`. Can only be used in the `sky-gradient` property.",group:"sky","sdk-support":{"basic functionality":{js:"2.0.0"}}},accumulated:{doc:"Gets the value of a cluster property accumulated so far. Can only be used in the `clusterProperties` option of a clustered GeoJSON source.",group:"Feature data","sdk-support":{"basic functionality":{js:"0.53.0"}}},"+":{doc:"Returns the sum of the inputs.",group:"Math","sdk-support":{"basic functionality":{js:"0.41.0",android:"6.0.0",ios:"4.0.0",macos:"0.7.0"}}},"*":{doc:"Returns the product of the inputs.",group:"Math","sdk-support":{"basic functionality":{js:"0.41.0",android:"6.0.0",ios:"4.0.0",macos:"0.7.0"}}},"-":{doc:"For two inputs, returns the result of subtracting the second input from the first. For a single input, returns the result of subtracting it from 0.",group:"Math","sdk-support":{"basic functionality":{js:"0.41.0",android:"6.0.0",ios:"4.0.0",macos:"0.7.0"}}},"/":{doc:"Returns the result of floating point division of the first input by the second.",group:"Math","sdk-support":{"basic functionality":{js:"0.41.0",android:"6.0.0",ios:"4.0.0",macos:"0.7.0"}}},"%":{doc:"Returns the remainder after integer division of the first input by the second.",group:"Math","sdk-support":{"basic functionality":{js:"0.41.0",android:"6.0.0",ios:"4.0.0",macos:"0.7.0"}}},"^":{doc:"Returns the result of raising the first input to the power specified by the second.",group:"Math","sdk-support":{"basic functionality":{js:"0.41.0",android:"6.0.0",ios:"4.0.0",macos:"0.7.0"}}},sqrt:{doc:"Returns the square root of the input.",group:"Math","sdk-support":{"basic functionality":{js:"0.42.0",android:"6.0.0",ios:"4.0.0",macos:"0.7.0"}}},log10:{doc:"Returns the base-ten logarithm of the input.",group:"Math","sdk-support":{"basic functionality":{js:"0.41.0",android:"6.0.0",ios:"4.0.0",macos:"0.7.0"}}},ln:{doc:"Returns the natural logarithm of the input.",group:"Math","sdk-support":{"basic functionality":{js:"0.41.0",android:"6.0.0",ios:"4.0.0",macos:"0.7.0"}}},log2:{doc:"Returns the base-two logarithm of the input.",group:"Math","sdk-support":{"basic functionality":{js:"0.41.0",android:"6.0.0",ios:"4.0.0",macos:"0.7.0"}}},sin:{doc:"Returns the sine of the input.",group:"Math","sdk-support":{"basic functionality":{js:"0.41.0",android:"6.0.0",ios:"4.0.0",macos:"0.7.0"}}},cos:{doc:"Returns the cosine of the input.",group:"Math","sdk-support":{"basic functionality":{js:"0.41.0",android:"6.0.0",ios:"4.0.0",macos:"0.7.0"}}},tan:{doc:"Returns the tangent of the input.",group:"Math","sdk-support":{"basic functionality":{js:"0.41.0",android:"6.0.0",ios:"4.0.0",macos:"0.7.0"}}},asin:{doc:"Returns the arcsine of the input.",group:"Math","sdk-support":{"basic functionality":{js:"0.41.0",android:"6.0.0",ios:"4.0.0",macos:"0.7.0"}}},acos:{doc:"Returns the arccosine of the input.",group:"Math","sdk-support":{"basic functionality":{js:"0.41.0",android:"6.0.0",ios:"4.0.0",macos:"0.7.0"}}},atan:{doc:"Returns the arctangent of the input.",group:"Math","sdk-support":{"basic functionality":{js:"0.41.0",android:"6.0.0",ios:"4.0.0",macos:"0.7.0"}}},min:{doc:"Returns the minimum value of the inputs.",group:"Math","sdk-support":{"basic functionality":{js:"0.41.0",android:"6.0.0",ios:"4.0.0",macos:"0.7.0"}}},max:{doc:"Returns the maximum value of the inputs.",group:"Math","sdk-support":{"basic functionality":{js:"0.41.0",android:"6.0.0",ios:"4.0.0",macos:"0.7.0"}}},round:{doc:'Rounds the input to the nearest integer. Halfway values are rounded away from zero. For example, `["round", -1.5]` evaluates to -2.',group:"Math","sdk-support":{"basic functionality":{js:"0.45.0",android:"6.0.0",ios:"4.0.0",macos:"0.7.0"}}},abs:{doc:"Returns the absolute value of the input.",group:"Math","sdk-support":{"basic functionality":{js:"0.45.0",android:"6.0.0",ios:"4.0.0",macos:"0.7.0"}}},ceil:{doc:"Returns the smallest integer that is greater than or equal to the input.",group:"Math","sdk-support":{"basic functionality":{js:"0.45.0",android:"6.0.0",ios:"4.0.0",macos:"0.7.0"}}},floor:{doc:"Returns the largest integer that is less than or equal to the input.",group:"Math","sdk-support":{"basic functionality":{js:"0.45.0",android:"6.0.0",ios:"4.0.0",macos:"0.7.0"}}},distance:{doc:"Returns the shortest distance in meters between the evaluated feature and the input geometry. The input value can be a valid GeoJSON of type `Point`, `MultiPoint`, `LineString`, `MultiLineString`, `Polygon`, `MultiPolygon`, `Feature`, or `FeatureCollection`. Distance values returned may vary in precision due to loss in precision from encoding geometries, particularly below zoom level 13.",group:"Math","sdk-support":{"basic functionality":{android:"9.2.0",ios:"5.9.0",macos:"0.16.0"}}},"==":{doc:"Returns `true` if the input values are equal, `false` otherwise. The comparison is strictly typed: values of different runtime types are always considered unequal. Cases where the types are known to be different at parse time are considered invalid and will produce a parse error. Accepts an optional `collator` argument to control locale-dependent string comparisons.",group:"Decision","sdk-support":{"basic functionality":{js:"0.41.0",android:"6.0.0",ios:"4.0.0",macos:"0.7.0"},collator:{js:"0.45.0",android:"6.5.0",ios:"4.2.0",macos:"0.9.0"}}},"!=":{doc:"Returns `true` if the input values are not equal, `false` otherwise. The comparison is strictly typed: values of different runtime types are always considered unequal. Cases where the types are known to be different at parse time are considered invalid and will produce a parse error. Accepts an optional `collator` argument to control locale-dependent string comparisons.",group:"Decision","sdk-support":{"basic functionality":{js:"0.41.0",android:"6.0.0",ios:"4.0.0",macos:"0.7.0"},collator:{js:"0.45.0",android:"6.5.0",ios:"4.2.0",macos:"0.9.0"}}},">":{doc:"Returns `true` if the first input is strictly greater than the second, `false` otherwise. The arguments are required to be either both strings or both numbers; if during evaluation they are not, expression evaluation produces an error. Cases where this constraint is known not to hold at parse time are considered in valid and will produce a parse error. Accepts an optional `collator` argument to control locale-dependent string comparisons.",group:"Decision","sdk-support":{"basic functionality":{js:"0.41.0",android:"6.0.0",ios:"4.0.0",macos:"0.7.0"},collator:{js:"0.45.0",android:"6.5.0",ios:"4.2.0",macos:"0.9.0"}}},"<":{doc:"Returns `true` if the first input is strictly less than the second, `false` otherwise. The arguments are required to be either both strings or both numbers; if during evaluation they are not, expression evaluation produces an error. Cases where this constraint is known not to hold at parse time are considered in valid and will produce a parse error. Accepts an optional `collator` argument to control locale-dependent string comparisons.",group:"Decision","sdk-support":{"basic functionality":{js:"0.41.0",android:"6.0.0",ios:"4.0.0",macos:"0.7.0"},collator:{js:"0.45.0",android:"6.5.0",ios:"4.2.0",macos:"0.9.0"}}},">=":{doc:"Returns `true` if the first input is greater than or equal to the second, `false` otherwise. The arguments are required to be either both strings or both numbers; if during evaluation they are not, expression evaluation produces an error. Cases where this constraint is known not to hold at parse time are considered in valid and will produce a parse error. Accepts an optional `collator` argument to control locale-dependent string comparisons.",group:"Decision","sdk-support":{"basic functionality":{js:"0.41.0",android:"6.0.0",ios:"4.0.0",macos:"0.7.0"},collator:{js:"0.45.0",android:"6.5.0",ios:"4.2.0",macos:"0.9.0"}}},"<=":{doc:"Returns `true` if the first input is less than or equal to the second, `false` otherwise. The arguments are required to be either both strings or both numbers; if during evaluation they are not, expression evaluation produces an error. Cases where this constraint is known not to hold at parse time are considered in valid and will produce a parse error. Accepts an optional `collator` argument to control locale-dependent string comparisons.",group:"Decision","sdk-support":{"basic functionality":{js:"0.41.0",android:"6.0.0",ios:"4.0.0",macos:"0.7.0"},collator:{js:"0.45.0",android:"6.5.0",ios:"4.2.0",macos:"0.9.0"}}},all:{doc:"Returns `true` if all the inputs are `true`, `false` otherwise. The inputs are evaluated in order, and evaluation is short-circuiting: once an input expression evaluates to `false`, the result is `false` and no further input expressions are evaluated.",group:"Decision","sdk-support":{"basic functionality":{js:"0.41.0",android:"6.0.0",ios:"4.0.0",macos:"0.7.0"}}},any:{doc:"Returns `true` if any of the inputs are `true`, `false` otherwise. The inputs are evaluated in order, and evaluation is short-circuiting: once an input expression evaluates to `true`, the result is `true` and no further input expressions are evaluated.",group:"Decision","sdk-support":{"basic functionality":{js:"0.41.0",android:"6.0.0",ios:"4.0.0",macos:"0.7.0"}}},"!":{doc:"Logical negation. Returns `true` if the input is `false`, and `false` if the input is `true`.",group:"Decision","sdk-support":{"basic functionality":{js:"0.41.0",android:"6.0.0",ios:"4.0.0",macos:"0.7.0"}}},within:{doc:"Returns `true` if the evaluated feature is fully contained inside a boundary of the input geometry, `false` otherwise. The input value can be a valid GeoJSON of type `Polygon`, `MultiPolygon`, `Feature`, or `FeatureCollection`. Supported features for evaluation:\n- `Point`: Returns `false` if a point is on the boundary or falls outside the boundary.\n- `LineString`: Returns `false` if any part of a line falls outside the boundary, the line intersects the boundary, or a line's endpoint is on the boundary.",group:"Decision","sdk-support":{"basic functionality":{js:"1.9.0",android:"9.1.0",ios:"5.8.0",macos:"0.15.0"}}},"is-supported-script":{doc:"Returns `true` if the input string is expected to render legibly. Returns `false` if the input string contains sections that cannot be rendered without potential loss of meaning (e.g. Indic scripts that require complex text shaping, or right-to-left scripts if the the `mapbox-gl-rtl-text` plugin is not in use in Mapbox GL JS).",group:"String","sdk-support":{"basic functionality":{js:"0.45.0",android:"6.6.0"}}},upcase:{doc:"Returns the input string converted to uppercase. Follows the Unicode Default Case Conversion algorithm and the locale-insensitive case mappings in the Unicode Character Database.",group:"String","sdk-support":{"basic functionality":{js:"0.41.0",android:"6.0.0",ios:"4.0.0",macos:"0.7.0"}}},downcase:{doc:"Returns the input string converted to lowercase. Follows the Unicode Default Case Conversion algorithm and the locale-insensitive case mappings in the Unicode Character Database.",group:"String","sdk-support":{"basic functionality":{js:"0.41.0",android:"6.0.0",ios:"4.0.0",macos:"0.7.0"}}},concat:{doc:"Returns a `string` consisting of the concatenation of the inputs. Each input is converted to a string as if by `to-string`.",group:"String","sdk-support":{"basic functionality":{js:"0.41.0",android:"6.0.0",ios:"4.0.0",macos:"0.7.0"}}},"resolved-locale":{doc:"Returns the IETF language tag of the locale being used by the provided `collator`. This can be used to determine the default system locale, or to determine if a requested locale was successfully loaded.",group:"String","sdk-support":{"basic functionality":{js:"0.45.0",android:"6.5.0",ios:"4.2.0",macos:"0.9.0"}}}}},fog:{range:{type:"array",default:[.5,10],minimum:-20,maximum:20,length:2,value:"number","property-type":"data-constant",transition:!0,expression:{interpolated:!0,parameters:["zoom"]},doc:"The start and end distance range in which fog fades from fully transparent to fully opaque. The distance to the point at the center of the map is defined as zero, so that negative range values are closer to the camera, and positive values are farther away.",example:[.5,10],"sdk-support":{"basic functionality":{js:"2.3.0"}}},color:{type:"color","property-type":"data-constant",default:"#ffffff",expression:{interpolated:!0,parameters:["zoom"]},transition:!0,doc:"The color of the fog. Using opacity is recommended only for smoothly transitioning fog on/off as anything less than 100% opacity results in more tiles loaded and drawn.","sdk-support":{"basic functionality":{js:"2.3.0"}}},"horizon-blend":{type:"number","property-type":"data-constant",default:.1,minimum:0,maximum:1,expression:{interpolated:!0,parameters:["zoom"]},transition:!0,doc:"Horizon blend applies a smooth fade from the color of the fog to the color of the sky. A value of zero leaves a sharp transition from fog to sky. Increasing the value blends the color of fog into increasingly high angles of the sky.","sdk-support":{"basic functionality":{js:"2.3.0"}}}},light:{anchor:{type:"enum",default:"viewport",values:{map:{doc:"The position of the light source is aligned to the rotation of the map."},viewport:{doc:"The position of the light source is aligned to the rotation of the viewport."}},"property-type":"data-constant",transition:!1,expression:{interpolated:!1,parameters:["zoom"]},doc:"Whether extruded geometries are lit relative to the map or viewport.",example:"map","sdk-support":{"basic functionality":{js:"0.27.0",android:"5.1.0",ios:"3.6.0",macos:"0.5.0"}}},position:{type:"array",default:[1.15,210,30],length:3,value:"number","property-type":"data-constant",transition:!0,expression:{interpolated:!0,parameters:["zoom"]},doc:"Position of the light source relative to lit (extruded) geometries, in [r radial coordinate, a azimuthal angle, p polar angle] where r indicates the distance from the center of the base of an object to its light, a indicates the position of the light relative to 0° (0° when `light.anchor` is set to `viewport` corresponds to the top of the viewport, or 0° when `light.anchor` is set to `map` corresponds to due north, and degrees proceed clockwise), and p indicates the height of the light (from 0°, directly above, to 180°, directly below).",example:[1.5,90,80],"sdk-support":{"basic functionality":{js:"0.27.0",android:"5.1.0",ios:"3.6.0",macos:"0.5.0"}}},color:{type:"color","property-type":"data-constant",default:"#ffffff",expression:{interpolated:!0,parameters:["zoom"]},transition:!0,doc:"Color tint for lighting extruded geometries.","sdk-support":{"basic functionality":{js:"0.27.0",android:"5.1.0",ios:"3.6.0",macos:"0.5.0"}}},intensity:{type:"number","property-type":"data-constant",default:.5,minimum:0,maximum:1,expression:{interpolated:!0,parameters:["zoom"]},transition:!0,doc:"Intensity of lighting (on a scale from 0 to 1). Higher numbers will present as more extreme contrast.","sdk-support":{"basic functionality":{js:"0.27.0",android:"5.1.0",ios:"3.6.0",macos:"0.5.0"}}}},terrain:{source:{type:"string",doc:"Name of a source of `raster_dem` type to be used for terrain elevation.",required:!0,"sdk-support":{"basic functionality":{js:"2.0.0"}}},exaggeration:{type:"number","property-type":"data-constant",default:1,minimum:0,maximum:1e3,expression:{interpolated:!0,parameters:["zoom"]},transition:!0,doc:"Exaggerates the elevation of the terrain by multiplying the data from the DEM with this value.","sdk-support":{"basic functionality":{js:"2.0.0"}}}},paint:["paint_fill","paint_line","paint_circle","paint_heatmap","paint_fill-extrusion","paint_symbol","paint_raster","paint_hillshade","paint_background","paint_sky"],paint_fill:{"fill-antialias":{type:"boolean",default:!0,doc:"Whether or not the fill should be antialiased.","sdk-support":{"basic functionality":{js:"0.10.0",android:"2.0.1",ios:"2.0.0",macos:"0.1.0"}},expression:{interpolated:!1,parameters:["zoom"]},"property-type":"data-constant"},"fill-opacity":{type:"number",default:1,minimum:0,maximum:1,doc:"The opacity of the entire fill layer. In contrast to the `fill-color`, this value will also affect the 1px stroke around the fill, if the stroke is used.",transition:!0,"sdk-support":{"basic functionality":{js:"0.10.0",android:"2.0.1",ios:"2.0.0",macos:"0.1.0"},"data-driven styling":{js:"0.21.0",android:"5.0.0",ios:"3.5.0",macos:"0.4.0"}},expression:{interpolated:!0,parameters:["zoom","feature","feature-state"]},"property-type":"data-driven"},"fill-color":{type:"color",default:"#000000",doc:"The color of the filled part of this layer. This color can be specified as `rgba` with an alpha component and the color's opacity will not affect the opacity of the 1px stroke, if it is used.",transition:!0,requires:[{"!":"fill-pattern"}],"sdk-support":{"basic functionality":{js:"0.10.0",android:"2.0.1",ios:"2.0.0",macos:"0.1.0"},"data-driven styling":{js:"0.19.0",android:"5.0.0",ios:"3.5.0",macos:"0.4.0"}},expression:{interpolated:!0,parameters:["zoom","feature","feature-state"]},"property-type":"data-driven"},"fill-outline-color":{type:"color",doc:"The outline color of the fill. Matches the value of `fill-color` if unspecified.",transition:!0,requires:[{"!":"fill-pattern"},{"fill-antialias":!0}],"sdk-support":{"basic functionality":{js:"0.10.0",android:"2.0.1",ios:"2.0.0",macos:"0.1.0"},"data-driven styling":{js:"0.19.0",android:"5.0.0",ios:"3.5.0",macos:"0.4.0"}},expression:{interpolated:!0,parameters:["zoom","feature","feature-state"]},"property-type":"data-driven"},"fill-translate":{type:"array",value:"number",length:2,default:[0,0],transition:!0,units:"pixels",doc:"The geometry's offset. Values are [x, y] where negatives indicate left and up, respectively.","sdk-support":{"basic functionality":{js:"0.10.0",android:"2.0.1",ios:"2.0.0",macos:"0.1.0"}},expression:{interpolated:!0,parameters:["zoom"]},"property-type":"data-constant"},"fill-translate-anchor":{type:"enum",values:{map:{doc:"The fill is translated relative to the map."},viewport:{doc:"The fill is translated relative to the viewport."}},doc:"Controls the frame of reference for `fill-translate`.",default:"map",requires:["fill-translate"],"sdk-support":{"basic functionality":{js:"0.10.0",android:"2.0.1",ios:"2.0.0",macos:"0.1.0"}},expression:{interpolated:!1,parameters:["zoom"]},"property-type":"data-constant"},"fill-pattern":{type:"resolvedImage",transition:!0,doc:"Name of image in sprite to use for drawing image fills. For seamless patterns, image width and height must be a factor of two (2, 4, 8, ..., 512). Note that zoom-dependent expressions will be evaluated only at integer zoom levels.","sdk-support":{"basic functionality":{js:"0.10.0",android:"2.0.1",ios:"2.0.0",macos:"0.1.0"},"data-driven styling":{js:"0.49.0",android:"6.5.0",macos:"0.11.0",ios:"4.4.0"}},expression:{interpolated:!1,parameters:["zoom","feature"]},"property-type":"cross-faded-data-driven"}},"paint_fill-extrusion":{"fill-extrusion-opacity":{type:"number",default:1,minimum:0,maximum:1,doc:"The opacity of the entire fill extrusion layer. This is rendered on a per-layer, not per-feature, basis, and data-driven styling is not available.",transition:!0,"sdk-support":{"basic functionality":{js:"0.27.0",android:"5.1.0",ios:"3.6.0",macos:"0.5.0"}},expression:{interpolated:!0,parameters:["zoom"]},"property-type":"data-constant"},"fill-extrusion-color":{type:"color",default:"#000000",doc:"The base color of the extruded fill. The extrusion's surfaces will be shaded differently based on this color in combination with the root `light` settings. If this color is specified as `rgba` with an alpha component, the alpha component will be ignored; use `fill-extrusion-opacity` to set layer opacity.",transition:!0,requires:[{"!":"fill-extrusion-pattern"}],"sdk-support":{"basic functionality":{js:"0.27.0",android:"5.1.0",ios:"3.6.0",macos:"0.5.0"},"data-driven styling":{js:"0.27.0",android:"5.1.0",ios:"3.6.0",macos:"0.5.0"}},expression:{interpolated:!0,parameters:["zoom","feature","feature-state"]},"property-type":"data-driven"},"fill-extrusion-translate":{type:"array",value:"number",length:2,default:[0,0],transition:!0,units:"pixels",doc:"The geometry's offset. Values are [x, y] where negatives indicate left and up (on the flat plane), respectively.","sdk-support":{"basic functionality":{js:"0.27.0",android:"5.1.0",ios:"3.6.0",macos:"0.5.0"}},expression:{interpolated:!0,parameters:["zoom"]},"property-type":"data-constant"},"fill-extrusion-translate-anchor":{type:"enum",values:{map:{doc:"The fill extrusion is translated relative to the map."},viewport:{doc:"The fill extrusion is translated relative to the viewport."}},doc:"Controls the frame of reference for `fill-extrusion-translate`.",default:"map",requires:["fill-extrusion-translate"],"sdk-support":{"basic functionality":{js:"0.27.0",android:"5.1.0",ios:"3.6.0",macos:"0.5.0"}},expression:{interpolated:!1,parameters:["zoom"]},"property-type":"data-constant"},"fill-extrusion-pattern":{type:"resolvedImage",transition:!0,doc:"Name of image in sprite to use for drawing images on extruded fills. For seamless patterns, image width and height must be a factor of two (2, 4, 8, ..., 512). Note that zoom-dependent expressions will be evaluated only at integer zoom levels.","sdk-support":{"basic functionality":{js:"0.27.0",android:"5.1.0",ios:"3.6.0",macos:"0.5.0"},"data-driven styling":{js:"0.49.0",android:"6.5.0",macos:"0.11.0",ios:"4.4.0"}},expression:{interpolated:!1,parameters:["zoom","feature"]},"property-type":"cross-faded-data-driven"},"fill-extrusion-height":{type:"number",default:0,minimum:0,units:"meters",doc:"The height with which to extrude this layer.",transition:!0,"sdk-support":{"basic functionality":{js:"0.27.0",android:"5.1.0",ios:"3.6.0",macos:"0.5.0"},"data-driven styling":{js:"0.27.0",android:"5.1.0",ios:"3.6.0",macos:"0.5.0"}},expression:{interpolated:!0,parameters:["zoom","feature","feature-state"]},"property-type":"data-driven"},"fill-extrusion-base":{type:"number",default:0,minimum:0,units:"meters",doc:"The height with which to extrude the base of this layer. Must be less than or equal to `fill-extrusion-height`.",transition:!0,requires:["fill-extrusion-height"],"sdk-support":{"basic functionality":{js:"0.27.0",android:"5.1.0",ios:"3.6.0",macos:"0.5.0"},"data-driven styling":{js:"0.27.0",android:"5.1.0",ios:"3.6.0",macos:"0.5.0"}},expression:{interpolated:!0,parameters:["zoom","feature","feature-state"]},"property-type":"data-driven"},"fill-extrusion-vertical-gradient":{type:"boolean",default:!0,doc:"Whether to apply a vertical gradient to the sides of a fill-extrusion layer. If true, sides will be shaded slightly darker farther down.",transition:!1,"sdk-support":{"basic functionality":{js:"0.50.0",ios:"4.7.0",macos:"0.13.0"}},expression:{interpolated:!1,parameters:["zoom"]},"property-type":"data-constant"}},paint_line:{"line-opacity":{type:"number",doc:"The opacity at which the line will be drawn.",default:1,minimum:0,maximum:1,transition:!0,"sdk-support":{"basic functionality":{js:"0.10.0",android:"2.0.1",ios:"2.0.0",macos:"0.1.0"},"data-driven styling":{js:"0.29.0",android:"5.0.0",ios:"3.5.0",macos:"0.4.0"}},expression:{interpolated:!0,parameters:["zoom","feature","feature-state"]},"property-type":"data-driven"},"line-color":{type:"color",doc:"The color with which the line will be drawn.",default:"#000000",transition:!0,requires:[{"!":"line-pattern"}],"sdk-support":{"basic functionality":{js:"0.10.0",android:"2.0.1",ios:"2.0.0",macos:"0.1.0"},"data-driven styling":{js:"0.23.0",android:"5.0.0",ios:"3.5.0",macos:"0.4.0"}},expression:{interpolated:!0,parameters:["zoom","feature","feature-state"]},"property-type":"data-driven"},"line-translate":{type:"array",value:"number",length:2,default:[0,0],transition:!0,units:"pixels",doc:"The geometry's offset. Values are [x, y] where negatives indicate left and up, respectively.","sdk-support":{"basic functionality":{js:"0.10.0",android:"2.0.1",ios:"2.0.0",macos:"0.1.0"}},expression:{interpolated:!0,parameters:["zoom"]},"property-type":"data-constant"},"line-translate-anchor":{type:"enum",values:{map:{doc:"The line is translated relative to the map."},viewport:{doc:"The line is translated relative to the viewport."}},doc:"Controls the frame of reference for `line-translate`.",default:"map",requires:["line-translate"],"sdk-support":{"basic functionality":{js:"0.10.0",android:"2.0.1",ios:"2.0.0",macos:"0.1.0"}},expression:{interpolated:!1,parameters:["zoom"]},"property-type":"data-constant"},"line-width":{type:"number",default:1,minimum:0,transition:!0,units:"pixels",doc:"Stroke thickness.","sdk-support":{"basic functionality":{js:"0.10.0",android:"2.0.1",ios:"2.0.0",macos:"0.1.0"},"data-driven styling":{js:"0.39.0",android:"5.2.0",ios:"3.7.0",macos:"0.6.0"}},expression:{interpolated:!0,parameters:["zoom","feature","feature-state"]},"property-type":"data-driven"},"line-gap-width":{type:"number",default:0,minimum:0,doc:"Draws a line casing outside of a line's actual path. Value indicates the width of the inner gap.",transition:!0,units:"pixels","sdk-support":{"basic functionality":{js:"0.10.0",android:"2.0.1",ios:"2.0.0",macos:"0.1.0"},"data-driven styling":{js:"0.29.0",android:"5.0.0",ios:"3.5.0",macos:"0.4.0"}},expression:{interpolated:!0,parameters:["zoom","feature","feature-state"]},"property-type":"data-driven"},"line-offset":{type:"number",default:0,doc:"The line's offset. For linear features, a positive value offsets the line to the right, relative to the direction of the line, and a negative value to the left. For polygon features, a positive value results in an inset, and a negative value results in an outset.",transition:!0,units:"pixels","sdk-support":{"basic functionality":{js:"0.12.1",android:"3.0.0",ios:"3.1.0",macos:"0.1.0"},"data-driven styling":{js:"0.29.0",android:"5.0.0",ios:"3.5.0",macos:"0.4.0"}},expression:{interpolated:!0,parameters:["zoom","feature","feature-state"]},"property-type":"data-driven"},"line-blur":{type:"number",default:0,minimum:0,transition:!0,units:"pixels",doc:"Blur applied to the line, in pixels.","sdk-support":{"basic functionality":{js:"0.10.0",android:"2.0.1",ios:"2.0.0",macos:"0.1.0"},"data-driven styling":{js:"0.29.0",android:"5.0.0",ios:"3.5.0",macos:"0.4.0"}},expression:{interpolated:!0,parameters:["zoom","feature","feature-state"]},"property-type":"data-driven"},"line-dasharray":{type:"array",value:"number",doc:"Specifies the lengths of the alternating dashes and gaps that form the dash pattern. The lengths are later scaled by the line width. To convert a dash length to pixels, multiply the length by the current line width. Note that GeoJSON sources with `lineMetrics: true` specified won't render dashed lines to the expected scale. Also note that zoom-dependent expressions will be evaluated only at integer zoom levels.",minimum:0,transition:!0,units:"line widths",requires:[{"!":"line-pattern"}],"sdk-support":{"basic functionality":{js:"0.10.0",android:"2.0.1",ios:"2.0.0",macos:"0.1.0"},"data-driven styling":{js:"2.3.0"}},expression:{interpolated:!1,parameters:["zoom","feature"]},"property-type":"cross-faded-data-driven"},"line-pattern":{type:"resolvedImage",transition:!0,doc:"Name of image in sprite to use for drawing image lines. For seamless patterns, image width must be a factor of two (2, 4, 8, ..., 512). Note that zoom-dependent expressions will be evaluated only at integer zoom levels.","sdk-support":{"basic functionality":{js:"0.10.0",android:"2.0.1",ios:"2.0.0",macos:"0.1.0"},"data-driven styling":{js:"0.49.0",android:"6.5.0",macos:"0.11.0",ios:"4.4.0"}},expression:{interpolated:!1,parameters:["zoom","feature"]},"property-type":"cross-faded-data-driven"},"line-gradient":{type:"color",doc:'Defines a gradient with which to color a line feature. Can only be used with GeoJSON sources that specify `"lineMetrics": true`.',transition:!1,requires:[{"!":"line-dasharray"},{"!":"line-pattern"},{source:"geojson",has:{lineMetrics:!0}}],"sdk-support":{"basic functionality":{js:"0.45.0",android:"6.5.0",ios:"4.4.0",macos:"0.11.0"},"data-driven styling":{}},expression:{interpolated:!0,parameters:["line-progress"]},"property-type":"color-ramp"}},paint_circle:{"circle-radius":{type:"number",default:5,minimum:0,transition:!0,units:"pixels",doc:"Circle radius.","sdk-support":{"basic functionality":{js:"0.10.0",android:"2.0.1",ios:"2.0.0",macos:"0.1.0"},"data-driven styling":{js:"0.18.0",android:"5.0.0",ios:"3.5.0",macos:"0.4.0"}},expression:{interpolated:!0,parameters:["zoom","feature","feature-state"]},"property-type":"data-driven"},"circle-color":{type:"color",default:"#000000",doc:"The fill color of the circle.",transition:!0,"sdk-support":{"basic functionality":{js:"0.10.0",android:"2.0.1",ios:"2.0.0",macos:"0.1.0"},"data-driven styling":{js:"0.18.0",android:"5.0.0",ios:"3.5.0",macos:"0.4.0"}},expression:{interpolated:!0,parameters:["zoom","feature","feature-state"]},"property-type":"data-driven"},"circle-blur":{type:"number",default:0,doc:"Amount to blur the circle. 1 blurs the circle such that only the centerpoint is full opacity.",transition:!0,"sdk-support":{"basic functionality":{js:"0.10.0",android:"2.0.1",ios:"2.0.0",macos:"0.1.0"},"data-driven styling":{js:"0.20.0",android:"5.0.0",ios:"3.5.0",macos:"0.4.0"}},expression:{interpolated:!0,parameters:["zoom","feature","feature-state"]},"property-type":"data-driven"},"circle-opacity":{type:"number",doc:"The opacity at which the circle will be drawn.",default:1,minimum:0,maximum:1,transition:!0,"sdk-support":{"basic functionality":{js:"0.10.0",android:"2.0.1",ios:"2.0.0",macos:"0.1.0"},"data-driven styling":{js:"0.20.0",android:"5.0.0",ios:"3.5.0",macos:"0.4.0"}},expression:{interpolated:!0,parameters:["zoom","feature","feature-state"]},"property-type":"data-driven"},"circle-translate":{type:"array",value:"number",length:2,default:[0,0],transition:!0,units:"pixels",doc:"The geometry's offset. Values are [x, y] where negatives indicate left and up, respectively.","sdk-support":{"basic functionality":{js:"0.10.0",android:"2.0.1",ios:"2.0.0",macos:"0.1.0"}},expression:{interpolated:!0,parameters:["zoom"]},"property-type":"data-constant"},"circle-translate-anchor":{type:"enum",values:{map:{doc:"The circle is translated relative to the map."},viewport:{doc:"The circle is translated relative to the viewport."}},doc:"Controls the frame of reference for `circle-translate`.",default:"map",requires:["circle-translate"],"sdk-support":{"basic functionality":{js:"0.10.0",android:"2.0.1",ios:"2.0.0",macos:"0.1.0"}},expression:{interpolated:!1,parameters:["zoom"]},"property-type":"data-constant"},"circle-pitch-scale":{type:"enum",values:{map:{doc:"Circles are scaled according to their apparent distance to the camera."},viewport:{doc:"Circles are not scaled."}},default:"map",doc:"Controls the scaling behavior of the circle when the map is pitched.","sdk-support":{"basic functionality":{js:"0.21.0",android:"4.2.0",ios:"3.4.0",macos:"0.2.1"}},expression:{interpolated:!1,parameters:["zoom"]},"property-type":"data-constant"},"circle-pitch-alignment":{type:"enum",values:{map:{doc:"The circle is aligned to the plane of the map."},viewport:{doc:"The circle is aligned to the plane of the viewport."}},default:"viewport",doc:"Orientation of circle when map is pitched.","sdk-support":{"basic functionality":{js:"0.39.0",android:"5.2.0",ios:"3.7.0",macos:"0.6.0"}},expression:{interpolated:!1,parameters:["zoom"]},"property-type":"data-constant"},"circle-stroke-width":{type:"number",default:0,minimum:0,transition:!0,units:"pixels",doc:"The width of the circle's stroke. Strokes are placed outside of the `circle-radius`.","sdk-support":{"basic functionality":{js:"0.29.0",android:"5.0.0",ios:"3.5.0",macos:"0.4.0"},"data-driven styling":{js:"0.29.0",android:"5.0.0",ios:"3.5.0",macos:"0.4.0"}},expression:{interpolated:!0,parameters:["zoom","feature","feature-state"]},"property-type":"data-driven"},"circle-stroke-color":{type:"color",default:"#000000",doc:"The stroke color of the circle.",transition:!0,"sdk-support":{"basic functionality":{js:"0.29.0",android:"5.0.0",ios:"3.5.0",macos:"0.4.0"},"data-driven styling":{js:"0.29.0",android:"5.0.0",ios:"3.5.0",macos:"0.4.0"}},expression:{interpolated:!0,parameters:["zoom","feature","feature-state"]},"property-type":"data-driven"},"circle-stroke-opacity":{type:"number",doc:"The opacity of the circle's stroke.",default:1,minimum:0,maximum:1,transition:!0,"sdk-support":{"basic functionality":{js:"0.29.0",android:"5.0.0",ios:"3.5.0",macos:"0.4.0"},"data-driven styling":{js:"0.29.0",android:"5.0.0",ios:"3.5.0",macos:"0.4.0"}},expression:{interpolated:!0,parameters:["zoom","feature","feature-state"]},"property-type":"data-driven"}},paint_heatmap:{"heatmap-radius":{type:"number",default:30,minimum:1,transition:!0,units:"pixels",doc:"Radius of influence of one heatmap point in pixels. Increasing the value makes the heatmap smoother, but less detailed.","sdk-support":{"basic functionality":{js:"0.41.0",android:"6.0.0",ios:"4.0.0",macos:"0.7.0"},"data-driven styling":{js:"0.43.0",android:"6.0.0",ios:"4.0.0",macos:"0.7.0"}},expression:{interpolated:!0,parameters:["zoom","feature","feature-state"]},"property-type":"data-driven"},"heatmap-weight":{type:"number",default:1,minimum:0,transition:!1,doc:"A measure of how much an individual point contributes to the heatmap. A value of 10 would be equivalent to having 10 points of weight 1 in the same spot. Especially useful when combined with clustering.","sdk-support":{"basic functionality":{js:"0.41.0",android:"6.0.0",ios:"4.0.0",macos:"0.7.0"},"data-driven styling":{js:"0.41.0",android:"6.0.0",ios:"4.0.0",macos:"0.7.0"}},expression:{interpolated:!0,parameters:["zoom","feature","feature-state"]},"property-type":"data-driven"},"heatmap-intensity":{type:"number",default:1,minimum:0,transition:!0,doc:"Similar to `heatmap-weight` but controls the intensity of the heatmap globally. Primarily used for adjusting the heatmap based on zoom level.","sdk-support":{"basic functionality":{js:"0.41.0",android:"6.0.0",ios:"4.0.0",macos:"0.7.0"}},expression:{interpolated:!0,parameters:["zoom"]},"property-type":"data-constant"},"heatmap-color":{type:"color",default:["interpolate",["linear"],["heatmap-density"],0,"rgba(0, 0, 255, 0)",.1,"royalblue",.3,"cyan",.5,"lime",.7,"yellow",1,"red"],doc:'Defines the color of each pixel based on its density value in a heatmap. Should be an expression that uses `["heatmap-density"]` as input.',transition:!1,"sdk-support":{"basic functionality":{js:"0.41.0",android:"6.0.0",ios:"4.0.0",macos:"0.7.0"},"data-driven styling":{}},expression:{interpolated:!0,parameters:["heatmap-density"]},"property-type":"color-ramp"},"heatmap-opacity":{type:"number",doc:"The global opacity at which the heatmap layer will be drawn.",default:1,minimum:0,maximum:1,transition:!0,"sdk-support":{"basic functionality":{js:"0.41.0",android:"6.0.0",ios:"4.0.0",macos:"0.7.0"}},expression:{interpolated:!0,parameters:["zoom"]},"property-type":"data-constant"}},paint_symbol:{"icon-opacity":{doc:"The opacity at which the icon will be drawn.",type:"number",default:1,minimum:0,maximum:1,transition:!0,requires:["icon-image"],"sdk-support":{"basic functionality":{js:"0.10.0",android:"2.0.1",ios:"2.0.0",macos:"0.1.0"},"data-driven styling":{js:"0.33.0",android:"5.0.0",ios:"3.5.0",macos:"0.4.0"}},expression:{interpolated:!0,parameters:["zoom","feature","feature-state"]},"property-type":"data-driven"},"icon-color":{type:"color",default:"#000000",transition:!0,doc:"The color of the icon. This can only be used with sdf icons.",requires:["icon-image"],"sdk-support":{"basic functionality":{js:"0.10.0",android:"2.0.1",ios:"2.0.0",macos:"0.1.0"},"data-driven styling":{js:"0.33.0",android:"5.0.0",ios:"3.5.0",macos:"0.4.0"}},expression:{interpolated:!0,parameters:["zoom","feature","feature-state"]},"property-type":"data-driven"},"icon-halo-color":{type:"color",default:"rgba(0, 0, 0, 0)",transition:!0,doc:"The color of the icon's halo. Icon halos can only be used with SDF icons.",requires:["icon-image"],"sdk-support":{"basic functionality":{js:"0.10.0",android:"2.0.1",ios:"2.0.0",macos:"0.1.0"},"data-driven styling":{js:"0.33.0",android:"5.0.0",ios:"3.5.0",macos:"0.4.0"}},expression:{interpolated:!0,parameters:["zoom","feature","feature-state"]},"property-type":"data-driven"},"icon-halo-width":{type:"number",default:0,minimum:0,transition:!0,units:"pixels",doc:"Distance of halo to the icon outline.",requires:["icon-image"],"sdk-support":{"basic functionality":{js:"0.10.0",android:"2.0.1",ios:"2.0.0",macos:"0.1.0"},"data-driven styling":{js:"0.33.0",android:"5.0.0",ios:"3.5.0",macos:"0.4.0"}},expression:{interpolated:!0,parameters:["zoom","feature","feature-state"]},"property-type":"data-driven"},"icon-halo-blur":{type:"number",default:0,minimum:0,transition:!0,units:"pixels",doc:"Fade out the halo towards the outside.",requires:["icon-image"],"sdk-support":{"basic functionality":{js:"0.10.0",android:"2.0.1",ios:"2.0.0",macos:"0.1.0"},"data-driven styling":{js:"0.33.0",android:"5.0.0",ios:"3.5.0",macos:"0.4.0"}},expression:{interpolated:!0,parameters:["zoom","feature","feature-state"]},"property-type":"data-driven"},"icon-translate":{type:"array",value:"number",length:2,default:[0,0],transition:!0,units:"pixels",doc:"Distance that the icon's anchor is moved from its original placement. Positive values indicate right and down, while negative values indicate left and up.",requires:["icon-image"],"sdk-support":{"basic functionality":{js:"0.10.0",android:"2.0.1",ios:"2.0.0",macos:"0.1.0"}},expression:{interpolated:!0,parameters:["zoom"]},"property-type":"data-constant"},"icon-translate-anchor":{type:"enum",values:{map:{doc:"Icons are translated relative to the map."},viewport:{doc:"Icons are translated relative to the viewport."}},doc:"Controls the frame of reference for `icon-translate`.",default:"map",requires:["icon-image","icon-translate"],"sdk-support":{"basic functionality":{js:"0.10.0",android:"2.0.1",ios:"2.0.0",macos:"0.1.0"}},expression:{interpolated:!1,parameters:["zoom"]},"property-type":"data-constant"},"text-opacity":{type:"number",doc:"The opacity at which the text will be drawn.",default:1,minimum:0,maximum:1,transition:!0,requires:["text-field"],"sdk-support":{"basic functionality":{js:"0.10.0",android:"2.0.1",ios:"2.0.0",macos:"0.1.0"},"data-driven styling":{js:"0.33.0",android:"5.0.0",ios:"3.5.0",macos:"0.4.0"}},expression:{interpolated:!0,parameters:["zoom","feature","feature-state"]},"property-type":"data-driven"},"text-color":{type:"color",doc:"The color with which the text will be drawn.",default:"#000000",transition:!0,overridable:!0,requires:["text-field"],"sdk-support":{"basic functionality":{js:"0.10.0",android:"2.0.1",ios:"2.0.0",macos:"0.1.0"},"data-driven styling":{js:"0.33.0",android:"5.0.0",ios:"3.5.0",macos:"0.4.0"}},expression:{interpolated:!0,parameters:["zoom","feature","feature-state"]},"property-type":"data-driven"},"text-halo-color":{type:"color",default:"rgba(0, 0, 0, 0)",transition:!0,doc:"The color of the text's halo, which helps it stand out from backgrounds.",requires:["text-field"],"sdk-support":{"basic functionality":{js:"0.10.0",android:"2.0.1",ios:"2.0.0",macos:"0.1.0"},"data-driven styling":{js:"0.33.0",android:"5.0.0",ios:"3.5.0",macos:"0.4.0"}},expression:{interpolated:!0,parameters:["zoom","feature","feature-state"]},"property-type":"data-driven"},"text-halo-width":{type:"number",default:0,minimum:0,transition:!0,units:"pixels",doc:"Distance of halo to the font outline. Max text halo width is 1/4 of the font-size.",requires:["text-field"],"sdk-support":{"basic functionality":{js:"0.10.0",android:"2.0.1",ios:"2.0.0",macos:"0.1.0"},"data-driven styling":{js:"0.33.0",android:"5.0.0",ios:"3.5.0",macos:"0.4.0"}},expression:{interpolated:!0,parameters:["zoom","feature","feature-state"]},"property-type":"data-driven"},"text-halo-blur":{type:"number",default:0,minimum:0,transition:!0,units:"pixels",doc:"The halo's fadeout distance towards the outside.",requires:["text-field"],"sdk-support":{"basic functionality":{js:"0.10.0",android:"2.0.1",ios:"2.0.0",macos:"0.1.0"},"data-driven styling":{js:"0.33.0",android:"5.0.0",ios:"3.5.0",macos:"0.4.0"}},expression:{interpolated:!0,parameters:["zoom","feature","feature-state"]},"property-type":"data-driven"},"text-translate":{type:"array",value:"number",length:2,default:[0,0],transition:!0,units:"pixels",doc:"Distance that the text's anchor is moved from its original placement. Positive values indicate right and down, while negative values indicate left and up.",requires:["text-field"],"sdk-support":{"basic functionality":{js:"0.10.0",android:"2.0.1",ios:"2.0.0",macos:"0.1.0"}},expression:{interpolated:!0,parameters:["zoom"]},"property-type":"data-constant"},"text-translate-anchor":{type:"enum",values:{map:{doc:"The text is translated relative to the map."},viewport:{doc:"The text is translated relative to the viewport."}},doc:"Controls the frame of reference for `text-translate`.",default:"map",requires:["text-field","text-translate"],"sdk-support":{"basic functionality":{js:"0.10.0",android:"2.0.1",ios:"2.0.0",macos:"0.1.0"}},expression:{interpolated:!1,parameters:["zoom"]},"property-type":"data-constant"}},paint_raster:{"raster-opacity":{type:"number",doc:"The opacity at which the image will be drawn.",default:1,minimum:0,maximum:1,transition:!0,"sdk-support":{"basic functionality":{js:"0.10.0",android:"2.0.1",ios:"2.0.0",macos:"0.1.0"}},expression:{interpolated:!0,parameters:["zoom"]},"property-type":"data-constant"},"raster-hue-rotate":{type:"number",default:0,period:360,transition:!0,units:"degrees",doc:"Rotates hues around the color wheel.","sdk-support":{"basic functionality":{js:"0.10.0",android:"2.0.1",ios:"2.0.0",macos:"0.1.0"}},expression:{interpolated:!0,parameters:["zoom"]},"property-type":"data-constant"},"raster-brightness-min":{type:"number",doc:"Increase or reduce the brightness of the image. The value is the minimum brightness.",default:0,minimum:0,maximum:1,transition:!0,"sdk-support":{"basic functionality":{js:"0.10.0",android:"2.0.1",ios:"2.0.0",macos:"0.1.0"}},expression:{interpolated:!0,parameters:["zoom"]},"property-type":"data-constant"},"raster-brightness-max":{type:"number",doc:"Increase or reduce the brightness of the image. The value is the maximum brightness.",default:1,minimum:0,maximum:1,transition:!0,"sdk-support":{"basic functionality":{js:"0.10.0",android:"2.0.1",ios:"2.0.0",macos:"0.1.0"}},expression:{interpolated:!0,parameters:["zoom"]},"property-type":"data-constant"},"raster-saturation":{type:"number",doc:"Increase or reduce the saturation of the image.",default:0,minimum:-1,maximum:1,transition:!0,"sdk-support":{"basic functionality":{js:"0.10.0",android:"2.0.1",ios:"2.0.0",macos:"0.1.0"}},expression:{interpolated:!0,parameters:["zoom"]},"property-type":"data-constant"},"raster-contrast":{type:"number",doc:"Increase or reduce the contrast of the image.",default:0,minimum:-1,maximum:1,transition:!0,"sdk-support":{"basic functionality":{js:"0.10.0",android:"2.0.1",ios:"2.0.0",macos:"0.1.0"}},expression:{interpolated:!0,parameters:["zoom"]},"property-type":"data-constant"},"raster-resampling":{type:"enum",doc:"The resampling/interpolation method to use for overscaling, also known as texture magnification filter",values:{linear:{doc:"(Bi)linear filtering interpolates pixel values using the weighted average of the four closest original source pixels creating a smooth but blurry look when overscaled"},nearest:{doc:"Nearest neighbor filtering interpolates pixel values using the nearest original source pixel creating a sharp but pixelated look when overscaled"}},default:"linear","sdk-support":{"basic functionality":{js:"0.47.0",android:"6.3.0",ios:"4.2.0",macos:"0.9.0"}},expression:{interpolated:!1,parameters:["zoom"]},"property-type":"data-constant"},"raster-fade-duration":{type:"number",default:300,minimum:0,transition:!1,units:"milliseconds",doc:"Fade duration when a new tile is added.","sdk-support":{"basic functionality":{js:"0.10.0",android:"2.0.1",ios:"2.0.0",macos:"0.1.0"}},expression:{interpolated:!0,parameters:["zoom"]},"property-type":"data-constant"}},paint_hillshade:{"hillshade-illumination-direction":{type:"number",default:335,minimum:0,maximum:359,doc:"The direction of the light source used to generate the hillshading with 0 as the top of the viewport if `hillshade-illumination-anchor` is set to `viewport` and due north if `hillshade-illumination-anchor` is set to `map`.",transition:!1,"sdk-support":{"basic functionality":{js:"0.43.0",android:"6.0.0",ios:"4.0.0",macos:"0.7.0"}},expression:{interpolated:!0,parameters:["zoom"]},"property-type":"data-constant"},"hillshade-illumination-anchor":{type:"enum",values:{map:{doc:"The hillshade illumination is relative to the north direction."},viewport:{doc:"The hillshade illumination is relative to the top of the viewport."}},default:"viewport",doc:"Direction of light source when map is rotated.","sdk-support":{"basic functionality":{js:"0.43.0",android:"6.0.0",ios:"4.0.0",macos:"0.7.0"}},expression:{interpolated:!1,parameters:["zoom"]},"property-type":"data-constant"},"hillshade-exaggeration":{type:"number",doc:"Intensity of the hillshade",default:.5,minimum:0,maximum:1,transition:!0,"sdk-support":{"basic functionality":{js:"0.43.0",android:"6.0.0",ios:"4.0.0",macos:"0.7.0"}},expression:{interpolated:!0,parameters:["zoom"]},"property-type":"data-constant"},"hillshade-shadow-color":{type:"color",default:"#000000",doc:"The shading color of areas that face away from the light source.",transition:!0,"sdk-support":{"basic functionality":{js:"0.43.0",android:"6.0.0",ios:"4.0.0",macos:"0.7.0"}},expression:{interpolated:!0,parameters:["zoom"]},"property-type":"data-constant"},"hillshade-highlight-color":{type:"color",default:"#FFFFFF",doc:"The shading color of areas that faces towards the light source.",transition:!0,"sdk-support":{"basic functionality":{js:"0.43.0",android:"6.0.0",ios:"4.0.0",macos:"0.7.0"}},expression:{interpolated:!0,parameters:["zoom"]},"property-type":"data-constant"},"hillshade-accent-color":{type:"color",default:"#000000",doc:"The shading color used to accentuate rugged terrain like sharp cliffs and gorges.",transition:!0,"sdk-support":{"basic functionality":{js:"0.43.0",android:"6.0.0",ios:"4.0.0",macos:"0.7.0"}},expression:{interpolated:!0,parameters:["zoom"]},"property-type":"data-constant"}},paint_background:{"background-color":{type:"color",default:"#000000",doc:"The color with which the background will be drawn.",transition:!0,requires:[{"!":"background-pattern"}],"sdk-support":{"basic functionality":{js:"0.10.0",android:"2.0.1",ios:"2.0.0",macos:"0.1.0"}},expression:{interpolated:!0,parameters:["zoom"]},"property-type":"data-constant"},"background-pattern":{type:"resolvedImage",transition:!0,doc:"Name of image in sprite to use for drawing an image background. For seamless patterns, image width and height must be a factor of two (2, 4, 8, ..., 512). Note that zoom-dependent expressions will be evaluated only at integer zoom levels.","sdk-support":{"basic functionality":{js:"0.10.0",android:"2.0.1",ios:"2.0.0",macos:"0.1.0"},"data-driven styling":{}},expression:{interpolated:!1,parameters:["zoom"]},"property-type":"cross-faded"},"background-opacity":{type:"number",default:1,minimum:0,maximum:1,doc:"The opacity at which the background will be drawn.",transition:!0,"sdk-support":{"basic functionality":{js:"0.10.0",android:"2.0.1",ios:"2.0.0",macos:"0.1.0"}},expression:{interpolated:!0,parameters:["zoom"]},"property-type":"data-constant"}},paint_sky:{"sky-type":{type:"enum",values:{gradient:{doc:"Renders the sky with a gradient that can be configured with `sky-gradient-radius` and `sky-gradient`."},atmosphere:{doc:"Renders the sky with a simulated atmospheric scattering algorithm, the sun direction can be attached to the light position or explicitly set through `sky-atmosphere-sun`."}},default:"atmosphere",doc:"The type of the sky","sdk-support":{"basic functionality":{js:"2.0.0"}},expression:{interpolated:!1,parameters:["zoom"]},"property-type":"data-constant"},"sky-atmosphere-sun":{type:"array",value:"number",length:2,units:"degrees",minimum:[0,0],maximum:[360,180],transition:!1,doc:"Position of the sun center [a azimuthal angle, p polar angle]. The azimuthal angle indicates the position of the sun relative to 0° north, where degrees proceed clockwise. The polar angle indicates the height of the sun, where 0° is directly above, at zenith, and 90° at the horizon. When this property is ommitted, the sun center is directly inherited from the light position.","sdk-support":{"basic functionality":{js:"2.0.0"}},requires:[{"sky-type":"atmosphere"}],expression:{interpolated:!1,parameters:["zoom"]},"property-type":"data-constant"},"sky-atmosphere-sun-intensity":{type:"number",requires:[{"sky-type":"atmosphere"}],default:10,minimum:0,maximum:100,transition:!1,doc:"Intensity of the sun as a light source in the atmosphere (on a scale from 0 to a 100). Setting higher values will brighten up the sky.","sdk-support":{"basic functionality":{js:"2.0.0"}},"property-type":"data-constant"},"sky-gradient-center":{type:"array",requires:[{"sky-type":"gradient"}],value:"number",default:[0,0],length:2,units:"degrees",minimum:[0,0],maximum:[360,180],transition:!1,doc:"Position of the gradient center [a azimuthal angle, p polar angle]. The azimuthal angle indicates the position of the gradient center relative to 0° north, where degrees proceed clockwise. The polar angle indicates the height of the gradient center, where 0° is directly above, at zenith, and 90° at the horizon.","sdk-support":{"basic functionality":{js:"2.0.0"}},expression:{interpolated:!1,parameters:["zoom"]},"property-type":"data-constant"},"sky-gradient-radius":{type:"number",requires:[{"sky-type":"gradient"}],default:90,minimum:0,maximum:180,transition:!1,doc:"The angular distance (measured in degrees) from `sky-gradient-center` up to which the gradient extends. A value of 180 causes the gradient to wrap around to the opposite direction from `sky-gradient-center`.","sdk-support":{"basic functionality":{js:"2.0.0"}},expression:{interpolated:!1,parameters:["zoom"]},"property-type":"data-constant"},"sky-gradient":{type:"color",default:["interpolate",["linear"],["sky-radial-progress"],.8,"#87ceeb",1,"white"],doc:"Defines a radial color gradient with which to color the sky. The color values can be interpolated with an expression using `sky-radial-progress`. The range [0, 1] for the interpolant covers a radial distance (in degrees) of [0, `sky-gradient-radius`] centered at the position specified by `sky-gradient-center`.",transition:!1,requires:[{"sky-type":"gradient"}],"sdk-support":{"basic functionality":{js:"2.0.0"},"data-driven styling":{}},expression:{interpolated:!0,parameters:["sky-radial-progress"]},"property-type":"color-ramp"},"sky-atmosphere-halo-color":{type:"color",default:"white",doc:"A color applied to the atmosphere sun halo. The alpha channel describes how strongly the sun halo is represented in an atmosphere sky layer.",transition:!1,requires:[{"sky-type":"atmosphere"}],"sdk-support":{"basic functionality":{js:"2.0.0"}},"property-type":"data-constant"},"sky-atmosphere-color":{type:"color",default:"white",doc:"A color used to tweak the main atmospheric scattering coefficients. Using white applies the default coefficients giving the natural blue color to the atmosphere. This color affects how heavily the corresponding wavelength is represented during scattering. The alpha channel describes the density of the atmosphere, with 1 maximum density and 0 no density.",transition:!1,requires:[{"sky-type":"atmosphere"}],"sdk-support":{"basic functionality":{js:"2.0.0"}},"property-type":"data-constant"},"sky-opacity":{type:"number",default:1,minimum:0,maximum:1,doc:"The opacity of the entire sky layer.",transition:!0,"sdk-support":{"basic functionality":{js:"2.0.0"}},expression:{interpolated:!0,parameters:["zoom"]},"property-type":"data-constant"}},transition:{duration:{type:"number",default:300,minimum:0,units:"milliseconds",doc:"Time allotted for transitions to complete."},delay:{type:"number",default:0,minimum:0,units:"milliseconds",doc:"Length of time before a transition begins."}},"property-type":{"data-driven":{type:"property-type",doc:"Property is interpolable and can be represented using a property expression."},"cross-faded":{type:"property-type",doc:"Property is non-interpolable; rather, its values will be cross-faded to smoothly transition between integer zooms."},"cross-faded-data-driven":{type:"property-type",doc:"Property is non-interpolable; rather, its values will be cross-faded to smoothly transition between integer zooms. It can be represented using a property expression."},"color-ramp":{type:"property-type",doc:"Property should be specified using a color ramp from which the output color can be sampled based on a property calculation."},"data-constant":{type:"property-type",doc:"Property is interpolable but cannot be represented using a property expression."},constant:{type:"property-type",doc:"Property is constant across all zoom levels and property values."}},promoteId:{"*":{type:"string",doc:"A name of a feature property to use as ID for feature state."}}};var IS="undefined"!=typeof globalThis?globalThis:"undefined"!=typeof window?window:"undefined"!=typeof global?global:"undefined"!=typeof self?self:{};function NS(t){var n={exports:{}};return t(n,n.exports),n.exports}var zS=NS((function(t,n){!function(i){var r=n&&!n.nodeType&&n,e=t&&!t.nodeType&&t,o="object"==RS(IS)&&IS;o.global!==o&&o.window!==o&&o.self!==o||(i=o);var s,a,u=2147483647,c=36,h=/^xn--/,f=/[^\x20-\x7E]/,l=/[\x2E\u3002\uFF0E\uFF61]/g,v={overflow:"Overflow: input needs wider integers to process","not-basic":"Illegal input >= 0x80 (not a basic code point)","invalid-input":"Invalid input"},d=Math.floor,p=String.fromCharCode;function y(t){throw RangeError(v[t])}function m(t,n){for(var i=t.length,r=[];i--;)r[i]=n(t[i]);return r}function w(t,n){var i=t.split("@"),r="";return i.length>1&&(r=i[0]+"@",t=i[1]),r+m((t=t.replace(l,".")).split("."),n).join(".")}function b(t){for(var n,i,r=[],e=0,o=t.length;e=55296&&n<=56319&&e65535&&(n+=p((t-=65536)>>>10&1023|55296),t=56320|1023&t),n+=p(t)})).join("")}function x(t,n){return t+22+75*(t<26)-((0!=n)<<5)}function j(t,n,i){var r=0;for(t=i?d(t/700):t>>1,t+=d(t/n);t>455;r+=c)t=d(t/35);return d(r+36*t/(t+38))}function S(t){var n,i,r,e,o,s,a,h,f,l,v,p=[],m=t.length,w=0,b=128,x=72;for((i=t.lastIndexOf("-"))<0&&(i=0),r=0;r=128&&y("not-basic"),p.push(t.charCodeAt(r));for(e=i>0?i+1:0;e=m&&y("invalid-input"),((h=(v=t.charCodeAt(e++))-48<10?v-22:v-65<26?v-65:v-97<26?v-97:c)>=c||h>d((u-w)/s))&&y("overflow"),w+=h*s,!(h<(f=a<=x?1:a>=x+26?26:a-x));a+=c)s>d(u/(l=c-f))&&y("overflow"),s*=l;x=j(w-o,n=p.length+1,0==o),d(w/n)>u-b&&y("overflow"),b+=d(w/n),w%=n,p.splice(w++,0,b)}return g(p)}function k(t){var n,i,r,e,o,s,a,h,f,l,v,m,w,g,S,k=[];for(m=(t=b(t)).length,n=128,i=0,o=72,s=0;s=n&&vd((u-i)/(w=r+1))&&y("overflow"),i+=(a-n)*w,n=a,s=0;su&&y("overflow"),v==n){for(h=i,f=c;!(h<(l=f<=o?1:f>=o+26?26:f-o));f+=c)S=h-l,g=c-l,k.push(p(x(l+S%g,0))),h=d(S/g);k.push(p(x(h,0))),o=j(i,w,r==e),i=0,++r}++i,++n}return k.join("")}if(s={version:"1.3.2",ucs2:{decode:b,encode:g},decode:S,encode:k,toASCII:function(t){return w(t,(function(t){return f.test(t)?"xn--"+k(t):t}))},toUnicode:function(t){return w(t,(function(t){return h.test(t)?S(t.slice(4).toLowerCase()):t}))}},r&&e)if(t.exports==r)e.exports=s;else for(a in s)s.hasOwnProperty(a)&&(r[a]=s[a]);else i.punycode=s}(IS)})),FS=function(t){return"string"==typeof t},LS=function(t){return"object"===RS(t)&&null!==t},GS=function(t){return null===t},DS=function(t){return null==t};function US(t,n){return Object.prototype.hasOwnProperty.call(t,n)}var qS=function(t,n,i,r){n=n||"&",i=i||"=";var e={};if("string"!=typeof t||0===t.length)return e;var o=/\+/g;t=t.split(n);var s=1e3;r&&"number"==typeof r.maxKeys&&(s=r.maxKeys);var a=t.length;s>0&&a>s&&(a=s);for(var u=0;u=0?(c=v.substr(0,d),h=v.substr(d+1)):(c=v,h=""),f=decodeURIComponent(c),l=decodeURIComponent(h),US(e,f)?Array.isArray(e[f])?e[f].push(l):e[f]=[e[f],l]:e[f]=l}return e},BS=function(t){switch(RS(t)){case"string":return t;case"boolean":return t?"true":"false";case"number":return isFinite(t)?t:"";default:return""}},WS=function(t,n,i,r){return n=n||"&",i=i||"=",null===t&&(t=void 0),"object"===RS(t)?Object.keys(t).map((function(r){var e=encodeURIComponent(BS(r))+i;return Array.isArray(t[r])?t[r].map((function(t){return e+encodeURIComponent(BS(t))})).join(n):e+encodeURIComponent(BS(t[r]))})).join(n):r?encodeURIComponent(BS(r))+i+encodeURIComponent(BS(t)):""},VS=NS((function(t,n){n.decode=n.parse=qS,n.encode=n.stringify=WS}));function XS(){this.protocol=null,this.slashes=null,this.auth=null,this.host=null,this.port=null,this.hostname=null,this.hash=null,this.search=null,this.query=null,this.pathname=null,this.path=null,this.href=null}var HS=/^([a-z0-9.+-]+:)/i,JS=/:[0-9]*$/,KS=/^(\/\/?(?!\/)[^\?\s]*)(\?[^\s]*)?$/,YS=["{","}","|","\\","^","`"].concat(["<",">",'"',"`"," ","\r","\n","\t"]),ZS=["'"].concat(YS),$S=["%","/","?",";","#"].concat(ZS),QS=["/","?","#"],tk=/^[+a-z0-9A-Z_-]{0,63}$/,nk=/^([+a-z0-9A-Z_-]{0,63})(.*)$/,ik={javascript:!0,"javascript:":!0},rk={javascript:!0,"javascript:":!0},ek={http:!0,https:!0,ftp:!0,gopher:!0,file:!0,"http:":!0,"https:":!0,"ftp:":!0,"gopher:":!0,"file:":!0};function ok(t,n,i){if(t&&LS(t)&&t instanceof XS)return t;var r=new XS;return r.parse(t,n,i),r}XS.prototype.parse=function(t,n,i){if(!FS(t))throw new TypeError("Parameter 'url' must be a string, not "+RS(t));var r=t.indexOf("?"),e=-1!==r&&r127?g+="x":g+=b[x];if(!g.match(tk)){var S=m.slice(0,d),k=m.slice(d+1),M=b.match(nk);M&&(S.push(M[1]),k.unshift(M[2])),k.length&&(s="/"+k.join(".")+s),this.hostname=S.join(".");break}}}this.hostname.length>255?this.hostname="":this.hostname=this.hostname.toLowerCase(),y||(this.hostname=zS.toASCII(this.hostname));var _=this.port?":"+this.port:"",O=this.hostname||"";this.host=O+_,this.href+=this.host,y&&(this.hostname=this.hostname.substr(1,this.hostname.length-2),"/"!==s[0]&&(s="/"+s))}if(!ik[c])for(d=0,w=ZS.length;d0)&&i.host.split("@"))&&(i.auth=M.shift(),i.host=i.hostname=M.shift());return i.search=t.search,i.query=t.query,GS(i.pathname)&&GS(i.search)||(i.path=(i.pathname?i.pathname:"")+(i.search?i.search:"")),i.href=i.format(),i}if(!b.length)return i.pathname=null,i.search?i.path="/"+i.search:i.path=null,i.href=i.format(),i;for(var x=b.slice(-1)[0],j=(i.host||t.host||b.length>1)&&("."===x||".."===x)||""===x,S=0,k=b.length;k>=0;k--)"."===(x=b[k])?b.splice(k,1):".."===x?(b.splice(k,1),S++):S&&(b.splice(k,1),S--);if(!m&&!w)for(;S--;S)b.unshift("..");!m||""===b[0]||b[0]&&"/"===b[0].charAt(0)||b.unshift(""),j&&"/"!==b.join("/").substr(-1)&&b.push("");var M,_=""===b[0]||b[0]&&"/"===b[0].charAt(0);g&&(i.hostname=i.host=_?"":b.length?b.shift():"",(M=!!(i.host&&i.host.indexOf("@")>0)&&i.host.split("@"))&&(i.auth=M.shift(),i.host=i.hostname=M.shift()));return(m=m||i.host&&b.length)&&!_&&b.unshift(""),b.length?i.pathname=b.join("/"):(i.pathname=null,i.path=null),GS(i.pathname)&&GS(i.search)||(i.path=(i.pathname?i.pathname:"")+(i.search?i.search:"")),i.auth=t.auth||i.auth,i.slashes=i.slashes||t.slashes,i.href=i.format(),i},XS.prototype.parseHost=function(){var t=this.host,n=JS.exec(t);n&&(":"!==(n=n[0])&&(this.port=n.substr(1)),t=t.substr(0,t.length-n.length)),t&&(this.hostname=t)};function sk(t){for(var n=arguments.length,i=new Array(n>1?n-1:0),r=1;r1&&void 0!==arguments[1]?arguments[1]:[];jS(this,t),this.parent=n,this.bindings={};var r,e=ES(i);try{for(e.s();!(r=e.n()).done;){var o=mS(r.value,2),s=o[0],a=o[1];this.bindings[s]=a}}catch(t){e.e(t)}finally{e.f()}}return xS(t,[{key:"concat",value:function(n){return new t(this,n)}},{key:"get",value:function(t){if(this.bindings[t])return this.bindings[t];if(this.parent)return this.parent.get(t);throw new Error("".concat(t," not found in scope."))}},{key:"has",value:function(t){return!!this.bindings[t]||!!this.parent&&this.parent.has(t)}}]),t}(),ck={kind:"null"},hk={kind:"number"},fk={kind:"string"},lk={kind:"boolean"},vk={kind:"color"},dk={kind:"object"},pk={kind:"value"},yk={kind:"collator"},mk={kind:"formatted"},wk={kind:"resolvedImage"};function bk(t,n){return{kind:"array",itemType:t,N:n}}function gk(t){if("array"===t.kind){var n=gk(t.itemType);return"number"==typeof t.N?"array<".concat(n,", ").concat(t.N,">"):"value"===t.itemType.kind?"array":"array<".concat(n,">")}return t.kind}var xk=[ck,hk,fk,lk,vk,mk,dk,bk(pk),wk];function jk(t,n){if("error"===n.kind)return null;if("array"===t.kind){if("array"===n.kind&&(0===n.N&&"value"===n.itemType.kind||!jk(t.itemType,n.itemType))&&("number"!=typeof t.N||t.N===n.N))return null}else{if(t.kind===n.kind)return null;if("value"===t.kind){var i,r=ES(xk);try{for(r.s();!(i=r.n()).done;){if(!jk(i.value,n))return null}}catch(t){r.e(t)}finally{r.f()}}}return"Expected ".concat(gk(t)," but found ").concat(gk(n)," instead.")}function Sk(t,n){return n.some((function(n){return n.kind===t.kind}))}function kk(t,n){return n.some((function(n){return"null"===n?null===t:"array"===n?Array.isArray(t):"object"===n?t&&!Array.isArray(t)&&"object"===RS(t):n===RS(t)}))}var Mk=NS((function(t,n){var i={transparent:[0,0,0,0],aliceblue:[240,248,255,1],antiquewhite:[250,235,215,1],aqua:[0,255,255,1],aquamarine:[127,255,212,1],azure:[240,255,255,1],beige:[245,245,220,1],bisque:[255,228,196,1],black:[0,0,0,1],blanchedalmond:[255,235,205,1],blue:[0,0,255,1],blueviolet:[138,43,226,1],brown:[165,42,42,1],burlywood:[222,184,135,1],cadetblue:[95,158,160,1],chartreuse:[127,255,0,1],chocolate:[210,105,30,1],coral:[255,127,80,1],cornflowerblue:[100,149,237,1],cornsilk:[255,248,220,1],crimson:[220,20,60,1],cyan:[0,255,255,1],darkblue:[0,0,139,1],darkcyan:[0,139,139,1],darkgoldenrod:[184,134,11,1],darkgray:[169,169,169,1],darkgreen:[0,100,0,1],darkgrey:[169,169,169,1],darkkhaki:[189,183,107,1],darkmagenta:[139,0,139,1],darkolivegreen:[85,107,47,1],darkorange:[255,140,0,1],darkorchid:[153,50,204,1],darkred:[139,0,0,1],darksalmon:[233,150,122,1],darkseagreen:[143,188,143,1],darkslateblue:[72,61,139,1],darkslategray:[47,79,79,1],darkslategrey:[47,79,79,1],darkturquoise:[0,206,209,1],darkviolet:[148,0,211,1],deeppink:[255,20,147,1],deepskyblue:[0,191,255,1],dimgray:[105,105,105,1],dimgrey:[105,105,105,1],dodgerblue:[30,144,255,1],firebrick:[178,34,34,1],floralwhite:[255,250,240,1],forestgreen:[34,139,34,1],fuchsia:[255,0,255,1],gainsboro:[220,220,220,1],ghostwhite:[248,248,255,1],gold:[255,215,0,1],goldenrod:[218,165,32,1],gray:[128,128,128,1],green:[0,128,0,1],greenyellow:[173,255,47,1],grey:[128,128,128,1],honeydew:[240,255,240,1],hotpink:[255,105,180,1],indianred:[205,92,92,1],indigo:[75,0,130,1],ivory:[255,255,240,1],khaki:[240,230,140,1],lavender:[230,230,250,1],lavenderblush:[255,240,245,1],lawngreen:[124,252,0,1],lemonchiffon:[255,250,205,1],lightblue:[173,216,230,1],lightcoral:[240,128,128,1],lightcyan:[224,255,255,1],lightgoldenrodyellow:[250,250,210,1],lightgray:[211,211,211,1],lightgreen:[144,238,144,1],lightgrey:[211,211,211,1],lightpink:[255,182,193,1],lightsalmon:[255,160,122,1],lightseagreen:[32,178,170,1],lightskyblue:[135,206,250,1],lightslategray:[119,136,153,1],lightslategrey:[119,136,153,1],lightsteelblue:[176,196,222,1],lightyellow:[255,255,224,1],lime:[0,255,0,1],limegreen:[50,205,50,1],linen:[250,240,230,1],magenta:[255,0,255,1],maroon:[128,0,0,1],mediumaquamarine:[102,205,170,1],mediumblue:[0,0,205,1],mediumorchid:[186,85,211,1],mediumpurple:[147,112,219,1],mediumseagreen:[60,179,113,1],mediumslateblue:[123,104,238,1],mediumspringgreen:[0,250,154,1],mediumturquoise:[72,209,204,1],mediumvioletred:[199,21,133,1],midnightblue:[25,25,112,1],mintcream:[245,255,250,1],mistyrose:[255,228,225,1],moccasin:[255,228,181,1],navajowhite:[255,222,173,1],navy:[0,0,128,1],oldlace:[253,245,230,1],olive:[128,128,0,1],olivedrab:[107,142,35,1],orange:[255,165,0,1],orangered:[255,69,0,1],orchid:[218,112,214,1],palegoldenrod:[238,232,170,1],palegreen:[152,251,152,1],paleturquoise:[175,238,238,1],palevioletred:[219,112,147,1],papayawhip:[255,239,213,1],peachpuff:[255,218,185,1],peru:[205,133,63,1],pink:[255,192,203,1],plum:[221,160,221,1],powderblue:[176,224,230,1],purple:[128,0,128,1],rebeccapurple:[102,51,153,1],red:[255,0,0,1],rosybrown:[188,143,143,1],royalblue:[65,105,225,1],saddlebrown:[139,69,19,1],salmon:[250,128,114,1],sandybrown:[244,164,96,1],seagreen:[46,139,87,1],seashell:[255,245,238,1],sienna:[160,82,45,1],silver:[192,192,192,1],skyblue:[135,206,235,1],slateblue:[106,90,205,1],slategray:[112,128,144,1],slategrey:[112,128,144,1],snow:[255,250,250,1],springgreen:[0,255,127,1],steelblue:[70,130,180,1],tan:[210,180,140,1],teal:[0,128,128,1],thistle:[216,191,216,1],tomato:[255,99,71,1],turquoise:[64,224,208,1],violet:[238,130,238,1],wheat:[245,222,179,1],white:[255,255,255,1],whitesmoke:[245,245,245,1],yellow:[255,255,0,1],yellowgreen:[154,205,50,1]};function r(t){return(t=Math.round(t))<0?0:t>255?255:t}function e(t){return t<0?0:t>1?1:t}function o(t){return"%"===t[t.length-1]?r(parseFloat(t)/100*255):r(parseInt(t))}function s(t){return"%"===t[t.length-1]?e(parseFloat(t)/100):e(parseFloat(t))}function a(t,n,i){return i<0?i+=1:i>1&&(i-=1),6*i<1?t+(n-t)*i*6:2*i<1?n:3*i<2?t+(n-t)*(2/3-i)*6:t}try{n.parseCSSColor=function(t){var n,e=t.replace(/ /g,"").toLowerCase();if(e in i)return i[e].slice();if("#"===e[0])return 4===e.length?(n=parseInt(e.substr(1),16))>=0&&n<=4095?[(3840&n)>>4|(3840&n)>>8,240&n|(240&n)>>4,15&n|(15&n)<<4,1]:null:7===e.length&&(n=parseInt(e.substr(1),16))>=0&&n<=16777215?[(16711680&n)>>16,(65280&n)>>8,255&n,1]:null;var u=e.indexOf("("),c=e.indexOf(")");if(-1!==u&&c+1===e.length){var h=e.substr(0,u),f=e.substr(u+1,c-(u+1)).split(","),l=1;switch(h){case"rgba":if(4!==f.length)return null;l=s(f.pop());case"rgb":return 3!==f.length?null:[o(f[0]),o(f[1]),o(f[2]),l];case"hsla":if(4!==f.length)return null;l=s(f.pop());case"hsl":if(3!==f.length)return null;var v=(parseFloat(f[0])%360+360)%360/360,d=s(f[1]),p=s(f[2]),y=p<=.5?p*(d+1):p+d-p*d,m=2*p-y;return[r(255*a(m,y,v+1/3)),r(255*a(m,y,v)),r(255*a(m,y,v-1/3)),l];default:return null}}return null}}catch(t){}})),_k=function(){function t(n,i,r){var e=arguments.length>3&&void 0!==arguments[3]?arguments[3]:1;jS(this,t),this.r=n,this.g=i,this.b=r,this.a=e}return xS(t,[{key:"toString",value:function(){var t=mS(this.toArray(),4),n=t[0],i=t[1],r=t[2],e=t[3];return"rgba(".concat(Math.round(n),",").concat(Math.round(i),",").concat(Math.round(r),",").concat(e,")")}},{key:"toArray",value:function(){var t=this.r,n=this.g,i=this.b,r=this.a;return 0===r?[0,0,0,0]:[255*t/r,255*n/r,255*i/r,r]}}],[{key:"parse",value:function(n){if(n){if(n instanceof t)return n;if("string"==typeof n){var i=Mk.parseCSSColor(n);if(i)return new t(i[0]/255*i[3],i[1]/255*i[3],i[2]/255*i[3],i[3])}}}}]),t}();_k.black=new _k(0,0,0,1),_k.white=new _k(1,1,1,1),_k.transparent=new _k(0,0,0,0),_k.red=new _k(1,0,0,1),_k.blue=new _k(0,0,1,1);var Ok=function(){function t(n,i,r){jS(this,t),this.sensitivity=n?i?"variant":"case":i?"accent":"base",this.locale=r,this.collator=new Intl.Collator(this.locale?this.locale:[],{sensitivity:this.sensitivity,usage:"search"})}return xS(t,[{key:"compare",value:function(t,n){return this.collator.compare(t,n)}},{key:"resolvedLocale",value:function(){return new Intl.Collator(this.locale?this.locale:[]).resolvedOptions().locale}}]),t}(),Tk=xS((function t(n,i,r,e,o){jS(this,t),this.text=n,this.image=i,this.scale=r,this.fontStack=e,this.textColor=o})),Ek=function(){function t(n){jS(this,t),this.sections=n}return xS(t,[{key:"isEmpty",value:function(){return 0===this.sections.length||!this.sections.some((function(t){return 0!==t.text.length||t.image&&0!==t.image.name.length}))}},{key:"toString",value:function(){return 0===this.sections.length?"":this.sections.map((function(t){return t.text})).join("")}},{key:"serialize",value:function(){var t,n=["format"],i=ES(this.sections);try{for(i.s();!(t=i.n()).done;){var r=t.value;if(r.image)n.push(["image",r.image.name]);else{n.push(r.text);var e={};r.fontStack&&(e["text-font"]=["literal",r.fontStack.split(",")]),r.scale&&(e["font-scale"]=r.scale),r.textColor&&(e["text-color"]=["rgba"].concat(r.textColor.toArray())),n.push(e)}}}catch(t){i.e(t)}finally{i.f()}return n}}],[{key:"fromString",value:function(n){return new t([new Tk(n,null,null,null,null)])}},{key:"factory",value:function(n){return n instanceof t?n:t.fromString(n)}}]),t}(),Ak=function(){function t(n){jS(this,t),this.name=n.name,this.available=n.available}return xS(t,[{key:"toString",value:function(){return this.name}},{key:"serialize",value:function(){return["image",this.name]}}],[{key:"fromString",value:function(n){return n?new t({name:n,available:!1}):null}}]),t}();function Ck(t,n,i,r){return"number"==typeof t&&t>=0&&t<=255&&"number"==typeof n&&n>=0&&n<=255&&"number"==typeof i&&i>=0&&i<=255?void 0===r||"number"==typeof r&&r>=0&&r<=1?null:"Invalid rgba value [".concat([t,n,i,r].join(", "),"]: 'a' must be between 0 and 1."):"Invalid rgba value [".concat(("number"==typeof r?[t,n,i,r]:[t,n,i]).join(", "),"]: 'r', 'g', and 'b' must be between 0 and 255.")}function Rk(t){if(null===t)return!0;if("string"==typeof t)return!0;if("boolean"==typeof t)return!0;if("number"==typeof t)return!0;if(t instanceof _k)return!0;if(t instanceof Ok)return!0;if(t instanceof Ek)return!0;if(t instanceof Ak)return!0;if(Array.isArray(t)){var n,i=ES(t);try{for(i.s();!(n=i.n()).done;){if(!Rk(n.value))return!1}}catch(t){i.e(t)}finally{i.f()}return!0}if("object"===RS(t)){for(var r in t)if(!Rk(t[r]))return!1;return!0}return!1}function Pk(t){if(null===t)return ck;if("string"==typeof t)return fk;if("boolean"==typeof t)return lk;if("number"==typeof t)return hk;if(t instanceof _k)return vk;if(t instanceof Ok)return yk;if(t instanceof Ek)return mk;if(t instanceof Ak)return wk;if(Array.isArray(t)){var n,i,r=t.length,e=ES(t);try{for(e.s();!(i=e.n()).done;){var o=Pk(i.value);if(n){if(n===o)continue;n=pk;break}n=o}}catch(t){e.e(t)}finally{e.f()}return bk(n||pk,r)}return dk}function Ik(t){var n=RS(t);return null===t?"":"string"===n||"number"===n||"boolean"===n?String(t):t instanceof _k||t instanceof Ek||t instanceof Ak?t.toString():JSON.stringify(t)}var Nk=function(){function t(n,i){jS(this,t),this.type=n,this.value=i}return xS(t,[{key:"evaluate",value:function(){return this.value}},{key:"eachChild",value:function(){}},{key:"outputDefined",value:function(){return!0}},{key:"serialize",value:function(){return"array"===this.type.kind||"object"===this.type.kind?["literal",this.value]:this.value instanceof _k?["rgba"].concat(this.value.toArray()):this.value instanceof Ek?this.value.serialize():this.value}}],[{key:"parse",value:function(n,i){if(2!==n.length)return i.error("'literal' expression requires exactly one argument, but found ".concat(n.length-1," instead."));if(!Rk(n[1]))return i.error("invalid value");var r=n[1],e=Pk(r),o=i.expectedType;return"array"!==e.kind||0!==e.N||!o||"array"!==o.kind||"number"==typeof o.N&&0!==o.N||(e=o),new t(e,r)}}]),t}(),zk=function(){function t(n){jS(this,t),this.name="ExpressionEvaluationError",this.message=n}return xS(t,[{key:"toJSON",value:function(){return this.message}}]),t}(),Fk={string:fk,number:hk,boolean:lk,object:dk},Lk=function(){function t(n,i){jS(this,t),this.type=n,this.args=i}return xS(t,[{key:"evaluate",value:function(t){for(var n=0;n1)&&n.push(r)}}return n.concat(this.args.map((function(t){return t.serialize()})))}}],[{key:"parse",value:function(n,i){if(n.length<2)return i.error("Expected at least one argument.");var r,e=1,o=n[0];if("array"===o){var s,a;if(n.length>2){var u=n[1];if("string"!=typeof u||!(u in Fk)||"object"===u)return i.error('The item type argument of "array" must be one of string, number, boolean',1);s=Fk[u],e++}else s=pk;if(n.length>3){if(null!==n[2]&&("number"!=typeof n[2]||n[2]<0||n[2]!==Math.floor(n[2])))return i.error('The length argument to "array" must be a positive integer literal',2);a=n[2],e++}r=bk(s,a)}else r=Fk[o];for(var c=[];e-1),i}},{key:"eachChild",value:function(t){t(this.input)}},{key:"outputDefined",value:function(){return!1}},{key:"serialize",value:function(){return["image",this.input.serialize()]}}],[{key:"parse",value:function(n,i){if(2!==n.length)return i.error("Expected two arguments.");var r=i.parse(n[1],1,fk);return r?new t(r):i.error("No image name provided.")}}]),t}(),Uk={"to-boolean":lk,"to-color":vk,"to-number":hk,"to-string":fk},qk=function(){function t(n,i){jS(this,t),this.type=n,this.args=i}return xS(t,[{key:"evaluate",value:function(t){if("boolean"===this.type.kind)return Boolean(this.args[0].evaluate(t));if("color"===this.type.kind){var n,i,r,e=ES(this.args);try{for(e.s();!(r=e.n()).done;){if(n=r.value.evaluate(t),i=null,n instanceof _k)return n;if("string"==typeof n){var o=t.parseColor(n);if(o)return o}else if(Array.isArray(n)&&!(i=n.length<3||n.length>4?"Invalid rbga value ".concat(JSON.stringify(n),": expected an array containing either three or four numeric values."):Ck(n[0],n[1],n[2],n[3])))return new _k(n[0]/255,n[1]/255,n[2]/255,n[3])}}catch(t){e.e(t)}finally{e.f()}throw new zk(i||"Could not parse color from value '".concat("string"==typeof n?n:String(JSON.stringify(n)),"'"))}if("number"===this.type.kind){var s,a=null,u=ES(this.args);try{for(u.s();!(s=u.n()).done;){if(null===(a=s.value.evaluate(t)))return 0;var c=Number(a);if(!isNaN(c))return c}}catch(t){u.e(t)}finally{u.f()}throw new zk("Could not convert ".concat(JSON.stringify(a)," to number."))}return"formatted"===this.type.kind?Ek.fromString(Ik(this.args[0].evaluate(t))):"resolvedImage"===this.type.kind?Ak.fromString(Ik(this.args[0].evaluate(t))):Ik(this.args[0].evaluate(t))}},{key:"eachChild",value:function(t){this.args.forEach(t)}},{key:"outputDefined",value:function(){return this.args.every((function(t){return t.outputDefined()}))}},{key:"serialize",value:function(){if("formatted"===this.type.kind)return new Gk([{content:this.args[0],scale:null,font:null,textColor:null}]).serialize();if("resolvedImage"===this.type.kind)return new Dk(this.args[0]).serialize();var t=["to-".concat(this.type.kind)];return this.eachChild((function(n){t.push(n.serialize())})),t}}],[{key:"parse",value:function(n,i){if(n.length<2)return i.error("Expected at least one argument.");var r=n[0];if(("to-boolean"===r||"to-string"===r)&&2!==n.length)return i.error("Expected one argument.");for(var e=Uk[r],o=[],s=1;s=n[2])&&(!(t[1]<=n[1])&&!(t[3]>=n[3])))}function Yk(t,n){var i,r=(180+t[0])/360,e=(i=t[1],(180-180/Math.PI*Math.log(Math.tan(Math.PI/4+i*Math.PI/360)))/360),o=Math.pow(2,n.z);return[Math.round(r*o*Hk),Math.round(e*o*Hk)]}function Zk(t,n,i){var r=t[0]-n[0],e=t[1]-n[1],o=t[0]-i[0],s=t[1]-i[1];return r*s-o*e==0&&r*o<=0&&e*s<=0}function $k(t,n,i){return n[1]>t[1]!=i[1]>t[1]&&t[0]<(i[0]-n[0])*(t[1]-n[1])/(i[1]-n[1])+n[0]}function Qk(t,n){for(var i=!1,r=0,e=n.length;r0&&f<0||h<0&&f>0}function iM(t,n,i){var r,e,o,s,a,u,c,h,f,l=ES(i);try{for(l.s();!(r=l.n()).done;)for(var v=r.value,d=0;di[2]){var e=.5*r,o=t[0]-i[0]>e?-r:i[0]-t[0]>e?r:0;0===o&&(o=t[0]-i[2]>e?-r:i[2]-t[0]>e?r:0),t[0]+=o}Jk(n,t)}function uM(t,n,i,r){var e,o=Math.pow(2,r.z)*Hk,s=[r.x*Hk,r.y*Hk],a=[],u=ES(t);try{for(u.s();!(e=u.n()).done;){var c,h=ES(e.value);try{for(h.s();!(c=h.n()).done;){var f=c.value,l=[f.x+s[0],f.y+s[1]];aM(l,n,i,o),a.push(l)}}catch(t){h.e(t)}finally{h.f()}}}catch(t){u.e(t)}finally{u.f()}return a}function cM(t,n,i,r){var e,o=Math.pow(2,r.z)*Hk,s=[r.x*Hk,r.y*Hk],a=[],u=ES(t);try{for(u.s();!(e=u.n()).done;){var c,h=e.value,f=[],l=ES(h);try{for(l.s();!(c=l.n()).done;){var v=c.value,d=[v.x+s[0],v.y+s[1]];Jk(n,d),f.push(d)}}catch(t){l.e(t)}finally{l.f()}a.push(f)}}catch(t){u.e(t)}finally{u.f()}if(n[2]-n[0]<=o/2){!function(t){t[0]=t[1]=1/0,t[2]=t[3]=-1/0}(n);var p,y=ES(a);try{for(y.s();!(p=y.n()).done;){var m,w=ES(p.value);try{for(w.s();!(m=w.n()).done;){aM(m.value,n,i,o)}}catch(t){w.e(t)}finally{w.f()}}}catch(t){y.e(t)}finally{y.f()}}return a}var hM=function(){function t(n,i){jS(this,t),this.type=lk,this.geojson=n,this.geometries=i}return xS(t,[{key:"evaluate",value:function(t){if(null!=t.geometry()&&null!=t.canonicalID()){if("Point"===t.geometryType())return function(t,n){var i=[1/0,1/0,-1/0,-1/0],r=[1/0,1/0,-1/0,-1/0],e=t.canonicalID();if("Polygon"===n.type){var o=oM(n.coordinates,r,e),s=uM(t.geometry(),i,r,e);if(!Kk(i,r))return!1;var a,u=ES(s);try{for(u.s();!(a=u.n()).done;)if(!Qk(a.value,o))return!1}catch(t){u.e(t)}finally{u.f()}}if("MultiPolygon"===n.type){var c=sM(n.coordinates,r,e),h=uM(t.geometry(),i,r,e);if(!Kk(i,r))return!1;var f,l=ES(h);try{for(l.s();!(f=l.n()).done;)if(!tM(f.value,c))return!1}catch(t){l.e(t)}finally{l.f()}}return!0}(t,this.geometries);if("LineString"===t.geometryType())return function(t,n){var i=[1/0,1/0,-1/0,-1/0],r=[1/0,1/0,-1/0,-1/0],e=t.canonicalID();if("Polygon"===n.type){var o=oM(n.coordinates,r,e),s=cM(t.geometry(),i,r,e);if(!Kk(i,r))return!1;var a,u=ES(s);try{for(u.s();!(a=u.n()).done;)if(!rM(a.value,o))return!1}catch(t){u.e(t)}finally{u.f()}}if("MultiPolygon"===n.type){var c=sM(n.coordinates,r,e),h=cM(t.geometry(),i,r,e);if(!Kk(i,r))return!1;var f,l=ES(h);try{for(l.s();!(f=l.n()).done;)if(!eM(f.value,c))return!1}catch(t){l.e(t)}finally{l.f()}}return!0}(t,this.geometries)}return!1}},{key:"eachChild",value:function(){}},{key:"outputDefined",value:function(){return!0}},{key:"serialize",value:function(){return["within",this.geojson]}}],[{key:"parse",value:function(n,i){if(2!==n.length)return i.error("'within' expression requires exactly one argument, but found ".concat(n.length-1," instead."));if(Rk(n[1])){var r=n[1];if("FeatureCollection"===r.type)for(var e=0;e=0)return!1;var i=!0;return t.eachChild((function(t){i&&!vM(t,n)&&(i=!1)})),i}var dM=function(){function t(n,i){jS(this,t),this.type=i.type,this.name=n,this.boundExpression=i}return xS(t,[{key:"evaluate",value:function(t){return this.boundExpression.evaluate(t)}},{key:"eachChild",value:function(){}},{key:"outputDefined",value:function(){return!1}},{key:"serialize",value:function(){return["var",this.name]}}],[{key:"parse",value:function(n,i){if(2!==n.length||"string"!=typeof n[1])return i.error("'var' expression requires exactly one string literal argument.");var r=n[1];return i.scope.has(r)?new t(r,i.scope.get(r)):i.error('Unknown variable "'.concat(r,'". Make sure "').concat(r,'" has been bound in an enclosing "let" expression before using it.'),1)}}]),t}(),pM=function(){function t(n){var i=arguments.length>1&&void 0!==arguments[1]?arguments[1]:[],r=arguments.length>2?arguments[2]:void 0,e=arguments.length>3&&void 0!==arguments[3]?arguments[3]:new uk,o=arguments.length>4&&void 0!==arguments[4]?arguments[4]:[];jS(this,t),this.registry=n,this.path=i,this.key=i.map((function(t){return"[".concat(t,"]")})).join(""),this.scope=e,this.errors=o,this.expectedType=r}return xS(t,[{key:"parse",value:function(t,n,i,r){var e=arguments.length>4&&void 0!==arguments[4]?arguments[4]:{};return n?this.concat(n,i,r)._parse(t,e):this._parse(t,e)}},{key:"_parse",value:function(t,n){function i(t,n,i){return"assert"===i?new Lk(n,[t]):"coerce"===i?new qk(n,[t]):t}if(null!==t&&"string"!=typeof t&&"boolean"!=typeof t&&"number"!=typeof t||(t=["literal",t]),Array.isArray(t)){if(0===t.length)return this.error('Expected an array with at least one element. If you wanted a literal array, use ["literal", []].');var r=t[0];if("string"!=typeof r)return this.error("Expression name must be a string, but found ".concat(RS(r),' instead. If you wanted a literal array, use ["literal", [...]].'),0),null;var e=this.registry[r];if(e){var o=e.parse(t,this);if(!o)return null;if(this.expectedType){var s=this.expectedType,a=o.type;if("string"!==s.kind&&"number"!==s.kind&&"boolean"!==s.kind&&"object"!==s.kind&&"array"!==s.kind||"value"!==a.kind)if("color"!==s.kind&&"formatted"!==s.kind&&"resolvedImage"!==s.kind||"value"!==a.kind&&"string"!==a.kind){if(this.checkSubtype(s,a))return null}else o=i(o,s,n.typeAnnotation||"coerce");else o=i(o,s,n.typeAnnotation||"assert")}if(!(o instanceof Nk)&&"resolvedImage"!==o.type.kind&&yM(o)){var u=new Wk;try{o=new Nk(o.type,o.evaluate(u))}catch(t){return this.error(t.message),null}}return o}return this.error('Unknown expression "'.concat(r,'". If you wanted a literal array, use ["literal", [...]].'),0)}return void 0===t?this.error("'undefined' value invalid. Use null instead."):"object"===RS(t)?this.error('Bare objects invalid. Use ["literal", {...}] instead.'):this.error("Expected an array, but found ".concat(RS(t)," instead."))}},{key:"concat",value:function(n,i,r){var e="number"==typeof n?this.path.concat(n):this.path,o=r?this.scope.concat(r):this.scope;return new t(this.registry,e,i||null,o,this.errors)}},{key:"error",value:function(t){for(var n=arguments.length,i=new Array(n>1?n-1:0),r=1;rn))throw new zk("Input is not a number.");s=a-1}return 0}var wM=function(){function t(n,i,r){jS(this,t),this.type=n,this.input=i,this.labels=[],this.outputs=[];var e,o=ES(r);try{for(o.s();!(e=o.n()).done;){var s=mS(e.value,2),a=s[0],u=s[1];this.labels.push(a),this.outputs.push(u)}}catch(t){o.e(t)}finally{o.f()}}return xS(t,[{key:"evaluate",value:function(t){var n=this.labels,i=this.outputs;if(1===n.length)return i[0].evaluate(t);var r=this.input.evaluate(t);if(r<=n[0])return i[0].evaluate(t);var e=n.length;return r>=n[e-1]?i[e-1].evaluate(t):i[mM(n,r)].evaluate(t)}},{key:"eachChild",value:function(t){t(this.input);var n,i=ES(this.outputs);try{for(i.s();!(n=i.n()).done;){t(n.value)}}catch(t){i.e(t)}finally{i.f()}}},{key:"outputDefined",value:function(){return this.outputs.every((function(t){return t.outputDefined()}))}},{key:"serialize",value:function(){for(var t=["step",this.input.serialize()],n=0;n0&&t.push(this.labels[n]),t.push(this.outputs[n].serialize());return t}}],[{key:"parse",value:function(n,i){if(n.length-1<4)return i.error("Expected at least 4 arguments, but found only ".concat(n.length-1,"."));if((n.length-1)%2!=0)return i.error("Expected an even number of arguments.");var r=i.parse(n[1],1,hk);if(!r)return null;var e=[],o=null;i.expectedType&&"value"!==i.expectedType.kind&&(o=i.expectedType);for(var s=1;s=a)return i.error('Input/output pairs for "step" expressions must be arranged with input values in strictly ascending order.',c);var f=i.parse(u,h,o);if(!f)return null;o=o||f.type,e.push([a,f])}return new t(o,r,e)}}]),t}(),bM=gM;function gM(t,n,i,r){this.cx=3*t,this.bx=3*(i-t)-this.cx,this.ax=1-this.cx-this.bx,this.cy=3*n,this.by=3*(r-n)-this.cy,this.ay=1-this.cy-this.by,this.p1x=t,this.p1y=r,this.p2x=i,this.p2y=r}function xM(t,n,i){return t*(1-i)+n*i}gM.prototype.sampleCurveX=function(t){return((this.ax*t+this.bx)*t+this.cx)*t},gM.prototype.sampleCurveY=function(t){return((this.ay*t+this.by)*t+this.cy)*t},gM.prototype.sampleCurveDerivativeX=function(t){return(3*this.ax*t+2*this.bx)*t+this.cx},gM.prototype.solveCurveX=function(t,n){var i,r,e,o,s;for(void 0===n&&(n=1e-6),e=t,s=0;s<8;s++){if(o=this.sampleCurveX(e)-t,Math.abs(o)(r=1))return r;for(;io?i=e:r=e,e=.5*(r-i)+i}return e},gM.prototype.solve=function(t,n){return this.sampleCurveY(this.solveCurveX(t,n))};var jM=Object.freeze({__proto__:null,number:xM,color:function(t,n,i){return new _k(xM(t.r,n.r,i),xM(t.g,n.g,i),xM(t.b,n.b,i),xM(t.a,n.a,i))},array:function(t,n,i){return t.map((function(t,r){return xM(t,n[r],i)}))}}),SM=.95047,kM=1.08883,MM=4/29,_M=6/29,OM=3*_M*_M,TM=Math.PI/180,EM=180/Math.PI;function AM(t){return t>.008856451679035631?Math.pow(t,1/3):t/OM+MM}function CM(t){return t>_M?t*t*t:OM*(t-MM)}function RM(t){return 255*(t<=.0031308?12.92*t:1.055*Math.pow(t,1/2.4)-.055)}function PM(t){return(t/=255)<=.04045?t/12.92:Math.pow((t+.055)/1.055,2.4)}function IM(t){var n=PM(t.r),i=PM(t.g),r=PM(t.b),e=AM((.4124564*n+.3575761*i+.1804375*r)/SM),o=AM((.2126729*n+.7151522*i+.072175*r)/1);return{l:116*o-16,a:500*(e-o),b:200*(o-AM((.0193339*n+.119192*i+.9503041*r)/kM)),alpha:t.a}}function NM(t){var n=(t.l+16)/116,i=isNaN(t.a)?n:n+t.a/500,r=isNaN(t.b)?n:n-t.b/200;return n=1*CM(n),i=SM*CM(i),r=kM*CM(r),new _k(RM(3.2404542*i-1.5371385*n-.4985314*r),RM(-.969266*i+1.8760108*n+.041556*r),RM(.0556434*i-.2040259*n+1.0572252*r),t.alpha)}function zM(t,n,i){var r=n-t;return t+i*(r>180||r<-180?r-360*Math.round(r/360):r)}var FM={forward:IM,reverse:NM,interpolate:function(t,n,i){return{l:xM(t.l,n.l,i),a:xM(t.a,n.a,i),b:xM(t.b,n.b,i),alpha:xM(t.alpha,n.alpha,i)}}},LM={forward:function(t){var n=IM(t),i=n.l,r=n.a,e=n.b,o=Math.atan2(e,r)*EM;return{h:o<0?o+360:o,c:Math.sqrt(r*r+e*e),l:i,alpha:t.a}},reverse:function(t){var n=t.h*TM,i=t.c;return NM({l:t.l,a:Math.cos(n)*i,b:Math.sin(n)*i,alpha:t.alpha})},interpolate:function(t,n,i){return{h:zM(t.h,n.h,i),c:xM(t.c,n.c,i),l:xM(t.l,n.l,i),alpha:xM(t.alpha,n.alpha,i)}}},GM=function(){function t(n,i,r,e,o){jS(this,t),this.type=n,this.operator=i,this.interpolation=r,this.input=e,this.labels=[],this.outputs=[];var s,a=ES(o);try{for(a.s();!(s=a.n()).done;){var u=mS(s.value,2),c=u[0],h=u[1];this.labels.push(c),this.outputs.push(h)}}catch(t){a.e(t)}finally{a.f()}}return xS(t,[{key:"evaluate",value:function(n){var i=this.labels,r=this.outputs;if(1===i.length)return r[0].evaluate(n);var e=this.input.evaluate(n);if(e<=i[0])return r[0].evaluate(n);var o=i.length;if(e>=i[o-1])return r[o-1].evaluate(n);var s=mM(i,e),a=i[s],u=i[s+1],c=t.interpolationFactor(this.interpolation,e,a,u),h=r[s].evaluate(n),f=r[s+1].evaluate(n);return"interpolate"===this.operator?jM[this.type.kind.toLowerCase()](h,f,c):"interpolate-hcl"===this.operator?LM.reverse(LM.interpolate(LM.forward(h),LM.forward(f),c)):FM.reverse(FM.interpolate(FM.forward(h),FM.forward(f),c))}},{key:"eachChild",value:function(t){t(this.input);var n,i=ES(this.outputs);try{for(i.s();!(n=i.n()).done;){t(n.value)}}catch(t){i.e(t)}finally{i.f()}}},{key:"outputDefined",value:function(){return this.outputs.every((function(t){return t.outputDefined()}))}},{key:"serialize",value:function(){var t;t="linear"===this.interpolation.name?["linear"]:"exponential"===this.interpolation.name?1===this.interpolation.base?["linear"]:["exponential",this.interpolation.base]:["cubic-bezier"].concat(this.interpolation.controlPoints);for(var n=[this.operator,t,this.input.serialize()],i=0;i1})))return i.error("Cubic bezier interpolation requires four numeric arguments with values between 0 and 1.",1);s={name:"cubic-bezier",controlPoints:h}}if(n.length-1<4)return i.error("Expected at least 4 arguments, but found only ".concat(n.length-1,"."));if((n.length-1)%2!=0)return i.error("Expected an even number of arguments.");if(!(a=i.parse(a,2,hk)))return null;var f=[],l=null;"interpolate-hcl"===o||"interpolate-lab"===o?l=vk:i.expectedType&&"value"!==i.expectedType.kind&&(l=i.expectedType);for(var v=0;v=d)return i.error('Input/output pairs for "interpolate" expressions must be arranged with input values in strictly ascending order.',y);var w=i.parse(p,m,l);if(!w)return null;l=l||w.type,f.push([d,w])}return"number"===l.kind||"color"===l.kind||"array"===l.kind&&"number"===l.itemType.kind&&"number"==typeof l.N?new t(l,o,s,a,f):i.error("Type ".concat(gk(l)," is not interpolatable."))}}]),t}();function DM(t,n,i,r){var e=r-i,o=t-i;return 0===e?0:1===n?o/e:(Math.pow(n,o)-1)/(Math.pow(n,e)-1)}var UM=function(){function t(n,i){jS(this,t),this.type=n,this.args=i}return xS(t,[{key:"evaluate",value:function(t){var n,i,r=null,e=0,o=ES(this.args);try{for(o.s();!(i=o.n()).done;){var s=i.value;if(e++,(r=s.evaluate(t))&&r instanceof Ak&&!r.available&&(n||(n=r.name),r=null,e===this.args.length&&(r=n)),null!==r)break}}catch(t){o.e(t)}finally{o.f()}return r}},{key:"eachChild",value:function(t){this.args.forEach(t)}},{key:"outputDefined",value:function(){return this.args.every((function(t){return t.outputDefined()}))}},{key:"serialize",value:function(){var t=["coalesce"];return this.eachChild((function(n){t.push(n.serialize())})),t}}],[{key:"parse",value:function(n,i){if(n.length<2)return i.error("Expectected at least one argument.");var r=null,e=i.expectedType;e&&"value"!==e.kind&&(r=e);var o,s=[],a=ES(n.slice(1));try{for(a.s();!(o=a.n()).done;){var u=o.value,c=i.parse(u,1+s.length,r,void 0,{typeAnnotation:"omit"});if(!c)return null;r=r||c.type,s.push(c)}}catch(t){a.e(t)}finally{a.f()}return new t(e&&s.some((function(t){return jk(e,t.type)}))?pk:r,s)}}]),t}(),qM=function(){function t(n,i){jS(this,t),this.type=i.type,this.bindings=[].concat(n),this.result=i}return xS(t,[{key:"evaluate",value:function(t){return this.result.evaluate(t)}},{key:"eachChild",value:function(t){var n,i=ES(this.bindings);try{for(i.s();!(n=i.n()).done;){t(n.value[1])}}catch(t){i.e(t)}finally{i.f()}t(this.result)}},{key:"outputDefined",value:function(){return this.result.outputDefined()}},{key:"serialize",value:function(){var t,n=["let"],i=ES(this.bindings);try{for(i.s();!(t=i.n()).done;){var r=mS(t.value,2),e=r[0],o=r[1];n.push(e,o.serialize())}}catch(t){i.e(t)}finally{i.f()}return n.push(this.result.serialize()),n}}],[{key:"parse",value:function(n,i){if(n.length<4)return i.error("Expected at least 3 arguments, but found ".concat(n.length-1," instead."));for(var r=[],e=1;e=i.length)throw new zk("Array index out of bounds: ".concat(n," > ").concat(i.length-1,"."));if(n!==Math.floor(n))throw new zk("Array index must be an integer, but found ".concat(n," instead."));return i[n]}},{key:"eachChild",value:function(t){t(this.index),t(this.input)}},{key:"outputDefined",value:function(){return!1}},{key:"serialize",value:function(){return["at",this.index.serialize(),this.input.serialize()]}}],[{key:"parse",value:function(n,i){if(3!==n.length)return i.error("Expected 2 arguments, but found ".concat(n.length-1," instead."));var r=i.parse(n[1],1,hk),e=i.parse(n[2],2,bk(i.expectedType||pk));return r&&e?new t(e.type.itemType,r,e):null}}]),t}(),WM=function(){function t(n,i){jS(this,t),this.type=lk,this.needle=n,this.haystack=i}return xS(t,[{key:"evaluate",value:function(t){var n=this.needle.evaluate(t),i=this.haystack.evaluate(t);if(!i)return!1;if(!kk(n,["boolean","string","number","null"]))throw new zk("Expected first argument to be of type boolean, string, number or null, but found ".concat(gk(Pk(n))," instead."));if(!kk(i,["string","array"]))throw new zk("Expected second argument to be of type array or string, but found ".concat(gk(Pk(i))," instead."));return i.indexOf(n)>=0}},{key:"eachChild",value:function(t){t(this.needle),t(this.haystack)}},{key:"outputDefined",value:function(){return!0}},{key:"serialize",value:function(){return["in",this.needle.serialize(),this.haystack.serialize()]}}],[{key:"parse",value:function(n,i){if(3!==n.length)return i.error("Expected 2 arguments, but found ".concat(n.length-1," instead."));var r=i.parse(n[1],1,pk),e=i.parse(n[2],2,pk);return r&&e?Sk(r.type,[lk,fk,hk,ck,pk])?new t(r,e):i.error("Expected first argument to be of type boolean, string, number or null, but found ".concat(gk(r.type)," instead")):null}}]),t}(),VM=function(){function t(n,i,r){jS(this,t),this.type=hk,this.needle=n,this.haystack=i,this.fromIndex=r}return xS(t,[{key:"evaluate",value:function(t){var n=this.needle.evaluate(t),i=this.haystack.evaluate(t);if(!kk(n,["boolean","string","number","null"]))throw new zk("Expected first argument to be of type boolean, string, number or null, but found ".concat(gk(Pk(n))," instead."));if(!kk(i,["string","array"]))throw new zk("Expected second argument to be of type array or string, but found ".concat(gk(Pk(i))," instead."));if(this.fromIndex){var r=this.fromIndex.evaluate(t);return i.indexOf(n,r)}return i.indexOf(n)}},{key:"eachChild",value:function(t){t(this.needle),t(this.haystack),this.fromIndex&&t(this.fromIndex)}},{key:"outputDefined",value:function(){return!1}},{key:"serialize",value:function(){if(null!=this.fromIndex&&void 0!==this.fromIndex){var t=this.fromIndex.serialize();return["index-of",this.needle.serialize(),this.haystack.serialize(),t]}return["index-of",this.needle.serialize(),this.haystack.serialize()]}}],[{key:"parse",value:function(n,i){if(n.length<=2||n.length>=5)return i.error("Expected 3 or 4 arguments, but found ".concat(n.length-1," instead."));var r=i.parse(n[1],1,pk),e=i.parse(n[2],2,pk);if(!r||!e)return null;if(!Sk(r.type,[lk,fk,hk,ck,pk]))return i.error("Expected first argument to be of type boolean, string, number or null, but found ".concat(gk(r.type)," instead"));if(4===n.length){var o=i.parse(n[3],3,hk);return o?new t(r,e,o):null}return new t(r,e)}}]),t}(),XM=function(){function t(n,i,r,e,o,s){jS(this,t),this.inputType=n,this.type=i,this.input=r,this.cases=e,this.outputs=o,this.otherwise=s}return xS(t,[{key:"evaluate",value:function(t){var n=this.input.evaluate(t);return(Pk(n)===this.inputType&&this.outputs[this.cases[n]]||this.otherwise).evaluate(t)}},{key:"eachChild",value:function(t){t(this.input),this.outputs.forEach(t),t(this.otherwise)}},{key:"outputDefined",value:function(){return this.outputs.every((function(t){return t.outputDefined()}))&&this.otherwise.outputDefined()}},{key:"serialize",value:function(){var t,n=this,i=["match",this.input.serialize()],r=[],e={},o=ES(Object.keys(this.cases).sort());try{for(o.s();!(t=o.n()).done;){var s=t.value,a=e[this.cases[s]];void 0===a?(e[this.cases[s]]=r.length,r.push([this.cases[s],[s]])):r[a][1].push(s)}}catch(t){o.e(t)}finally{o.f()}for(var u=function(t){return"number"===n.inputType.kind?Number(t):t},c=0,h=r;cNumber.MAX_SAFE_INTEGER)return h.error("Branch labels must be integers no larger than ".concat(Number.MAX_SAFE_INTEGER,"."));if("number"==typeof v&&Math.floor(v)!==v)return h.error("Numeric branch labels must be integer values.");if(r){if(h.checkSubtype(r,Pk(v)))return null}else r=Pk(v);if(void 0!==o[String(v)])return h.error("Branch labels must be unique.");o[String(v)]=s.length}}catch(t){l.e(t)}finally{l.f()}var d=i.parse(c,a,e);if(!d)return null;e=e||d.type,s.push(d)}var p=i.parse(n[1],1,pk);if(!p)return null;var y=i.parse(n[n.length-1],n.length-1,e);return y?"value"!==p.type.kind&&i.concat(1).checkSubtype(r,p.type)?null:new t(r,e,p,o,s,y):null}}]),t}(),HM=function(){function t(n,i,r){jS(this,t),this.type=n,this.branches=i,this.otherwise=r}return xS(t,[{key:"evaluate",value:function(t){var n,i=ES(this.branches);try{for(i.s();!(n=i.n()).done;){var r=mS(n.value,2),e=r[0],o=r[1];if(e.evaluate(t))return o.evaluate(t)}}catch(t){i.e(t)}finally{i.f()}return this.otherwise.evaluate(t)}},{key:"eachChild",value:function(t){var n,i=ES(this.branches);try{for(i.s();!(n=i.n()).done;){var r=mS(n.value,2),e=r[0],o=r[1];t(e),t(o)}}catch(t){i.e(t)}finally{i.f()}t(this.otherwise)}},{key:"outputDefined",value:function(){return this.branches.every((function(t){var n=mS(t,2);n[0];return n[1].outputDefined()}))&&this.otherwise.outputDefined()}},{key:"serialize",value:function(){var t=["case"];return this.eachChild((function(n){t.push(n.serialize())})),t}}],[{key:"parse",value:function(n,i){if(n.length<4)return i.error("Expected at least 3 arguments, but found only ".concat(n.length-1,"."));if(n.length%2!=0)return i.error("Expected an odd number of arguments.");var r;i.expectedType&&"value"!==i.expectedType.kind&&(r=i.expectedType);for(var e=[],o=1;o=5)return i.error("Expected 3 or 4 arguments, but found ".concat(n.length-1," instead."));var r=i.parse(n[1],1,pk),e=i.parse(n[2],2,hk);if(!r||!e)return null;if(!Sk(r.type,[bk(pk),fk,pk]))return i.error("Expected first argument to be of type array or string, but found ".concat(gk(r.type)," instead"));if(4===n.length){var o=i.parse(n[3],3,hk);return o?new t(r.type,r,e,o):null}return new t(r.type,r,e)}}]),t}();function KM(t,n){return"=="===t||"!="===t?"boolean"===n.kind||"string"===n.kind||"number"===n.kind||"null"===n.kind||"value"===n.kind:"string"===n.kind||"number"===n.kind||"value"===n.kind}function YM(t,n,i,r){return 0===r.compare(n,i)}function ZM(t,n,i){var r="=="!==t&&"!="!==t;return function(){function e(t,n,i){jS(this,e),this.type=lk,this.lhs=t,this.rhs=n,this.collator=i,this.hasUntypedArgument="value"===t.type.kind||"value"===n.type.kind}return xS(e,[{key:"evaluate",value:function(e){var o=this.lhs.evaluate(e),s=this.rhs.evaluate(e);if(r&&this.hasUntypedArgument){var a=Pk(o),u=Pk(s);if(a.kind!==u.kind||"string"!==a.kind&&"number"!==a.kind)throw new zk('Expected arguments for "'.concat(t,'" to be (string, string) or (number, number), but found (').concat(a.kind,", ").concat(u.kind,") instead."))}if(this.collator&&!r&&this.hasUntypedArgument){var c=Pk(o),h=Pk(s);if("string"!==c.kind||"string"!==h.kind)return n(e,o,s)}return this.collator?i(e,o,s,this.collator.evaluate(e)):n(e,o,s)}},{key:"eachChild",value:function(t){t(this.lhs),t(this.rhs),this.collator&&t(this.collator)}},{key:"outputDefined",value:function(){return!0}},{key:"serialize",value:function(){var n=[t];return this.eachChild((function(t){n.push(t.serialize())})),n}}],[{key:"parse",value:function(t,n){if(3!==t.length&&4!==t.length)return n.error("Expected two or three arguments.");var i=t[0],o=n.parse(t[1],1,pk);if(!o)return null;if(!KM(i,o.type))return n.concat(1).error('"'.concat(i,"\" comparisons are not supported for type '").concat(gk(o.type),"'."));var s=n.parse(t[2],2,pk);if(!s)return null;if(!KM(i,s.type))return n.concat(2).error('"'.concat(i,"\" comparisons are not supported for type '").concat(gk(s.type),"'."));if(o.type.kind!==s.type.kind&&"value"!==o.type.kind&&"value"!==s.type.kind)return n.error("Cannot compare types '".concat(gk(o.type),"' and '").concat(gk(s.type),"'."));r&&("value"===o.type.kind&&"value"!==s.type.kind?o=new Lk(s.type,[o]):"value"!==o.type.kind&&"value"===s.type.kind&&(s=new Lk(o.type,[s])));var a=null;if(4===t.length){if("string"!==o.type.kind&&"string"!==s.type.kind&&"value"!==o.type.kind&&"value"!==s.type.kind)return n.error("Cannot use collator to compare non-string types.");if(!(a=n.parse(t[3],3,yk)))return null}return new e(o,s,a)}}]),e}()}var $M=ZM("==",(function(t,n,i){return n===i}),YM),QM=ZM("!=",(function(t,n,i){return n!==i}),(function(t,n,i,r){return!YM(0,n,i,r)})),t_=ZM("<",(function(t,n,i){return n",(function(t,n,i){return n>i}),(function(t,n,i,r){return r.compare(n,i)>0})),i_=ZM("<=",(function(t,n,i){return n<=i}),(function(t,n,i,r){return r.compare(n,i)<=0})),r_=ZM(">=",(function(t,n,i){return n>=i}),(function(t,n,i,r){return r.compare(n,i)>=0})),e_=function(){function t(n,i,r,e,o){jS(this,t),this.type=fk,this.number=n,this.locale=i,this.currency=r,this.minFractionDigits=e,this.maxFractionDigits=o}return xS(t,[{key:"evaluate",value:function(t){return new Intl.NumberFormat(this.locale?this.locale.evaluate(t):[],{style:this.currency?"currency":"decimal",currency:this.currency?this.currency.evaluate(t):void 0,minimumFractionDigits:this.minFractionDigits?this.minFractionDigits.evaluate(t):void 0,maximumFractionDigits:this.maxFractionDigits?this.maxFractionDigits.evaluate(t):void 0}).format(this.number.evaluate(t))}},{key:"eachChild",value:function(t){t(this.number),this.locale&&t(this.locale),this.currency&&t(this.currency),this.minFractionDigits&&t(this.minFractionDigits),this.maxFractionDigits&&t(this.maxFractionDigits)}},{key:"outputDefined",value:function(){return!1}},{key:"serialize",value:function(){var t={};return this.locale&&(t.locale=this.locale.serialize()),this.currency&&(t.currency=this.currency.serialize()),this.minFractionDigits&&(t["min-fraction-digits"]=this.minFractionDigits.serialize()),this.maxFractionDigits&&(t["max-fraction-digits"]=this.maxFractionDigits.serialize()),["number-format",this.number.serialize(),t]}}],[{key:"parse",value:function(n,i){if(3!==n.length)return i.error("Expected two arguments.");var r=i.parse(n[1],1,hk);if(!r)return null;var e=n[2];if("object"!==RS(e)||Array.isArray(e))return i.error("NumberFormat options argument must be an object.");var o=null;if(e.locale&&!(o=i.parse(e.locale,1,fk)))return null;var s=null;if(e.currency&&!(s=i.parse(e.currency,1,fk)))return null;var a=null;if(e["min-fraction-digits"]&&!(a=i.parse(e["min-fraction-digits"],1,hk)))return null;var u=null;return e["max-fraction-digits"]&&!(u=i.parse(e["max-fraction-digits"],1,hk))?null:new t(r,o,s,a,u)}}]),t}(),o_={"==":$M,"!=":QM,">":n_,"<":t_,">=":r_,"<=":i_,array:Lk,at:BM,boolean:Lk,case:HM,coalesce:UM,collator:Xk,format:Gk,image:Dk,in:WM,"index-of":VM,interpolate:GM,"interpolate-hcl":GM,"interpolate-lab":GM,length:function(){function t(n){jS(this,t),this.type=hk,this.input=n}return xS(t,[{key:"evaluate",value:function(t){var n=this.input.evaluate(t);if("string"==typeof n)return n.length;if(Array.isArray(n))return n.length;throw new zk("Expected value to be of type string or array, but found ".concat(gk(Pk(n))," instead."))}},{key:"eachChild",value:function(t){t(this.input)}},{key:"outputDefined",value:function(){return!1}},{key:"serialize",value:function(){var t=["length"];return this.eachChild((function(n){t.push(n.serialize())})),t}}],[{key:"parse",value:function(n,i){if(2!==n.length)return i.error("Expected 1 argument, but found ".concat(n.length-1," instead."));var r=i.parse(n[1],1);return r?"array"!==r.type.kind&&"string"!==r.type.kind&&"value"!==r.type.kind?i.error("Expected argument of type string or array, but found ".concat(gk(r.type)," instead.")):new t(r):null}}]),t}(),let:qM,literal:Nk,match:XM,number:Lk,"number-format":e_,object:Lk,slice:JM,step:wM,string:Lk,"to-boolean":qk,"to-color":qk,"to-number":qk,"to-string":qk,var:dM,within:hM};function s_(t,n){var i=mS(n,4),r=i[0],e=i[1],o=i[2],s=i[3];r=r.evaluate(t),e=e.evaluate(t),o=o.evaluate(t);var a=s?s.evaluate(t):1,u=Ck(r,e,o,a);if(u)throw new zk(u);return new _k(r/255*a,e/255*a,o/255*a,a)}function a_(t,n){return t in n}function u_(t,n){var i=n[t];return void 0===i?null:i}function c_(t){return{type:t}}function h_(t){return{result:"success",value:t}}function f_(t){return{result:"error",value:t}}function l_(t){return"data-driven"===t["property-type"]||"cross-faded-data-driven"===t["property-type"]}function v_(t){return!!t.expression&&t.expression.parameters.indexOf("zoom")>-1}function d_(t){return!!t.expression&&t.expression.interpolated}function p_(t){return t instanceof Number?"number":t instanceof String?"string":t instanceof Boolean?"boolean":Array.isArray(t)?"array":null===t?"null":RS(t)}function y_(t){return"object"===RS(t)&&null!==t&&!Array.isArray(t)}Vk.register(o_,{error:[{kind:"error"},[fk],function(t,n){var i=mS(n,1)[0];throw new zk(i.evaluate(t))}],typeof:[fk,[pk],function(t,n){return gk(Pk(mS(n,1)[0].evaluate(t)))}],"to-rgba":[bk(hk,4),[vk],function(t,n){return mS(n,1)[0].evaluate(t).toArray()}],rgb:[vk,[hk,hk,hk],s_],rgba:[vk,[hk,hk,hk,hk],s_],has:{type:lk,overloads:[[[fk],function(t,n){return a_(mS(n,1)[0].evaluate(t),t.properties())}],[[fk,dk],function(t,n){var i=mS(n,2),r=i[0],e=i[1];return a_(r.evaluate(t),e.evaluate(t))}]]},get:{type:pk,overloads:[[[fk],function(t,n){return u_(mS(n,1)[0].evaluate(t),t.properties())}],[[fk,dk],function(t,n){var i=mS(n,2),r=i[0],e=i[1];return u_(r.evaluate(t),e.evaluate(t))}]]},"feature-state":[pk,[fk],function(t,n){return u_(mS(n,1)[0].evaluate(t),t.featureState||{})}],properties:[dk,[],function(t){return t.properties()}],"geometry-type":[fk,[],function(t){return t.geometryType()}],id:[pk,[],function(t){return t.id()}],zoom:[hk,[],function(t){return t.globals.zoom}],"heatmap-density":[hk,[],function(t){return t.globals.heatmapDensity||0}],"line-progress":[hk,[],function(t){return t.globals.lineProgress||0}],"sky-radial-progress":[hk,[],function(t){return t.globals.skyRadialProgress||0}],accumulated:[pk,[],function(t){return void 0===t.globals.accumulated?null:t.globals.accumulated}],"+":[hk,c_(hk),function(t,n){var i,r=0,e=ES(n);try{for(e.s();!(i=e.n()).done;){r+=i.value.evaluate(t)}}catch(t){e.e(t)}finally{e.f()}return r}],"*":[hk,c_(hk),function(t,n){var i,r=1,e=ES(n);try{for(e.s();!(i=e.n()).done;){r*=i.value.evaluate(t)}}catch(t){e.e(t)}finally{e.f()}return r}],"-":{type:hk,overloads:[[[hk,hk],function(t,n){var i=mS(n,2),r=i[0],e=i[1];return r.evaluate(t)-e.evaluate(t)}],[[hk],function(t,n){return-mS(n,1)[0].evaluate(t)}]]},"/":[hk,[hk,hk],function(t,n){var i=mS(n,2),r=i[0],e=i[1];return r.evaluate(t)/e.evaluate(t)}],"%":[hk,[hk,hk],function(t,n){var i=mS(n,2),r=i[0],e=i[1];return r.evaluate(t)%e.evaluate(t)}],ln2:[hk,[],function(){return Math.LN2}],pi:[hk,[],function(){return Math.PI}],e:[hk,[],function(){return Math.E}],"^":[hk,[hk,hk],function(t,n){var i=mS(n,2),r=i[0],e=i[1];return Math.pow(r.evaluate(t),e.evaluate(t))}],sqrt:[hk,[hk],function(t,n){var i=mS(n,1)[0];return Math.sqrt(i.evaluate(t))}],log10:[hk,[hk],function(t,n){var i=mS(n,1)[0];return Math.log(i.evaluate(t))/Math.LN10}],ln:[hk,[hk],function(t,n){var i=mS(n,1)[0];return Math.log(i.evaluate(t))}],log2:[hk,[hk],function(t,n){var i=mS(n,1)[0];return Math.log(i.evaluate(t))/Math.LN2}],sin:[hk,[hk],function(t,n){var i=mS(n,1)[0];return Math.sin(i.evaluate(t))}],cos:[hk,[hk],function(t,n){var i=mS(n,1)[0];return Math.cos(i.evaluate(t))}],tan:[hk,[hk],function(t,n){var i=mS(n,1)[0];return Math.tan(i.evaluate(t))}],asin:[hk,[hk],function(t,n){var i=mS(n,1)[0];return Math.asin(i.evaluate(t))}],acos:[hk,[hk],function(t,n){var i=mS(n,1)[0];return Math.acos(i.evaluate(t))}],atan:[hk,[hk],function(t,n){var i=mS(n,1)[0];return Math.atan(i.evaluate(t))}],min:[hk,c_(hk),function(t,n){return Math.min.apply(Math,pS(n.map((function(n){return n.evaluate(t)}))))}],max:[hk,c_(hk),function(t,n){return Math.max.apply(Math,pS(n.map((function(n){return n.evaluate(t)}))))}],abs:[hk,[hk],function(t,n){var i=mS(n,1)[0];return Math.abs(i.evaluate(t))}],round:[hk,[hk],function(t,n){var i=mS(n,1)[0].evaluate(t);return i<0?-Math.round(-i):Math.round(i)}],floor:[hk,[hk],function(t,n){var i=mS(n,1)[0];return Math.floor(i.evaluate(t))}],ceil:[hk,[hk],function(t,n){var i=mS(n,1)[0];return Math.ceil(i.evaluate(t))}],"filter-==":[lk,[fk,pk],function(t,n){var i=mS(n,2),r=i[0],e=i[1];return t.properties()[r.value]===e.value}],"filter-id-==":[lk,[pk],function(t,n){var i=mS(n,1)[0];return t.id()===i.value}],"filter-type-==":[lk,[fk],function(t,n){var i=mS(n,1)[0];return t.geometryType()===i.value}],"filter-<":[lk,[fk,pk],function(t,n){var i=mS(n,2),r=i[0],e=i[1],o=t.properties()[r.value],s=e.value;return RS(o)===RS(s)&&o":[lk,[fk,pk],function(t,n){var i=mS(n,2),r=i[0],e=i[1],o=t.properties()[r.value],s=e.value;return RS(o)===RS(s)&&o>s}],"filter-id->":[lk,[pk],function(t,n){var i=mS(n,1)[0],r=t.id(),e=i.value;return RS(r)===RS(e)&&r>e}],"filter-<=":[lk,[fk,pk],function(t,n){var i=mS(n,2),r=i[0],e=i[1],o=t.properties()[r.value],s=e.value;return RS(o)===RS(s)&&o<=s}],"filter-id-<=":[lk,[pk],function(t,n){var i=mS(n,1)[0],r=t.id(),e=i.value;return RS(r)===RS(e)&&r<=e}],"filter->=":[lk,[fk,pk],function(t,n){var i=mS(n,2),r=i[0],e=i[1],o=t.properties()[r.value],s=e.value;return RS(o)===RS(s)&&o>=s}],"filter-id->=":[lk,[pk],function(t,n){var i=mS(n,1)[0],r=t.id(),e=i.value;return RS(r)===RS(e)&&r>=e}],"filter-has":[lk,[pk],function(t,n){return mS(n,1)[0].value in t.properties()}],"filter-has-id":[lk,[],function(t){return null!==t.id()&&void 0!==t.id()}],"filter-type-in":[lk,[bk(fk)],function(t,n){return mS(n,1)[0].value.indexOf(t.geometryType())>=0}],"filter-id-in":[lk,[bk(pk)],function(t,n){return mS(n,1)[0].value.indexOf(t.id())>=0}],"filter-in-small":[lk,[fk,bk(pk)],function(t,n){var i=mS(n,2),r=i[0];return i[1].value.indexOf(t.properties()[r.value])>=0}],"filter-in-large":[lk,[fk,bk(pk)],function(t,n){var i=mS(n,2),r=i[0],e=i[1];return function(t,n,i,r){for(;i<=r;){var e=i+r>>1;if(n[e]===t)return!0;n[e]>t?r=e-1:i=e+1}return!1}(t.properties()[r.value],e.value,0,e.value.length-1)}],all:{type:lk,overloads:[[[lk,lk],function(t,n){var i=mS(n,2),r=i[0],e=i[1];return r.evaluate(t)&&e.evaluate(t)}],[c_(lk),function(t,n){var i,r=ES(n);try{for(r.s();!(i=r.n()).done;){if(!i.value.evaluate(t))return!1}}catch(t){r.e(t)}finally{r.f()}return!0}]]},any:{type:lk,overloads:[[[lk,lk],function(t,n){var i=mS(n,2),r=i[0],e=i[1];return r.evaluate(t)||e.evaluate(t)}],[c_(lk),function(t,n){var i,r=ES(n);try{for(r.s();!(i=r.n()).done;){if(i.value.evaluate(t))return!0}}catch(t){r.e(t)}finally{r.f()}return!1}]]},"!":[lk,[lk],function(t,n){return!mS(n,1)[0].evaluate(t)}],"is-supported-script":[lk,[fk],function(t,n){var i=mS(n,1)[0],r=t.globals&&t.globals.isSupportedScript;return!r||r(i.evaluate(t))}],upcase:[fk,[fk],function(t,n){return mS(n,1)[0].evaluate(t).toUpperCase()}],downcase:[fk,[fk],function(t,n){return mS(n,1)[0].evaluate(t).toLowerCase()}],concat:[fk,c_(pk),function(t,n){return n.map((function(n){return Ik(n.evaluate(t))})).join("")}],"resolved-locale":[fk,[yk],function(t,n){return mS(n,1)[0].evaluate(t).resolvedLocale()}]});var m_=function(){function t(n,i){var r;jS(this,t),this.expression=n,this._warningHistory={},this._evaluator=new Wk,this._defaultValue=i?"color"===(r=i).type&&y_(r.default)?new _k(0,0,0,0):"color"===r.type?_k.parse(r.default)||null:void 0===r.default?null:r.default:null,this._enumValues=i&&"enum"===i.type?i.values:null}return xS(t,[{key:"evaluateWithoutErrorHandling",value:function(t,n,i,r,e,o){return this._evaluator.globals=t,this._evaluator.feature=n,this._evaluator.featureState=i,this._evaluator.canonical=r,this._evaluator.availableImages=e||null,this._evaluator.formattedSection=o,this.expression.evaluate(this._evaluator)}},{key:"evaluate",value:function(t,n,i,r,e,o){this._evaluator.globals=t,this._evaluator.feature=n||null,this._evaluator.featureState=i||null,this._evaluator.canonical=r,this._evaluator.availableImages=e||null,this._evaluator.formattedSection=o||null;try{var s=this.expression.evaluate(this._evaluator);if(null==s||"number"==typeof s&&s!=s)return this._defaultValue;if(this._enumValues&&!(s in this._enumValues))throw new zk("Expected value to be one of ".concat(Object.keys(this._enumValues).map((function(t){return JSON.stringify(t)})).join(", "),", but found ").concat(JSON.stringify(s)," instead."));return s}catch(t){return this._warningHistory[t.message]||(this._warningHistory[t.message]=!0,"undefined"!=typeof console&&console.warn(t.message)),this._defaultValue}}}]),t}();function w_(t){return Array.isArray(t)&&t.length>0&&"string"==typeof t[0]&&t[0]in o_}function b_(t,n){var i=new pM(o_,[],n?function(t){var n={color:vk,string:fk,number:hk,enum:fk,boolean:lk,formatted:mk,resolvedImage:wk};if("array"===t.type)return bk(n[t.value]||pk,t.length);return n[t.type]}(n):void 0),r=i.parse(t,void 0,void 0,void 0,n&&"string"===n.type?{typeAnnotation:"coerce"}:void 0);return r?h_(new m_(r,n)):f_(i.errors)}var g_=function(){function t(n,i){jS(this,t),this.kind=n,this._styleExpression=i,this.isStateDependent="constant"!==n&&!lM(i.expression)}return xS(t,[{key:"evaluateWithoutErrorHandling",value:function(t,n,i,r,e,o){return this._styleExpression.evaluateWithoutErrorHandling(t,n,i,r,e,o)}},{key:"evaluate",value:function(t,n,i,r,e,o){return this._styleExpression.evaluate(t,n,i,r,e,o)}}]),t}(),x_=function(){function t(n,i,r,e){jS(this,t),this.kind=n,this.zoomStops=r,this._styleExpression=i,this.isStateDependent="camera"!==n&&!lM(i.expression),this.interpolationType=e}return xS(t,[{key:"evaluateWithoutErrorHandling",value:function(t,n,i,r,e,o){return this._styleExpression.evaluateWithoutErrorHandling(t,n,i,r,e,o)}},{key:"evaluate",value:function(t,n,i,r,e,o){return this._styleExpression.evaluate(t,n,i,r,e,o)}},{key:"interpolationFactor",value:function(t,n,i){return this.interpolationType?GM.interpolationFactor(this.interpolationType,t,n,i):0}}]),t}();function j_(t,n){if("error"===(t=b_(t,n)).result)return t;var i=t.value.expression,r=fM(i);if(!r&&!l_(n))return f_([new ak("","data expressions not supported")]);var e=vM(i,["zoom"]);if(!e&&!v_(n))return f_([new ak("","zoom expressions not supported")]);var o=S_(i);if(!o&&!e)return f_([new ak("",'"zoom" expression may only be used as input to a top-level "step" or "interpolate" expression.')]);if(o instanceof ak)return f_([o]);if(o instanceof GM&&!d_(n))return f_([new ak("",'"interpolate" expressions cannot be used with this property')]);if(!o)return h_(new g_(r?"constant":"source",t.value));var s=o instanceof GM?o.interpolation:void 0;return h_(new x_(r?"camera":"composite",t.value,o.labels,s))}function S_(t){var n=null;if(t instanceof qM)n=S_(t.result);else if(t instanceof UM){var i,r=ES(t.args);try{for(r.s();!(i=r.n()).done;){var e=i.value;if(n=S_(e))break}}catch(t){r.e(t)}finally{r.f()}}else(t instanceof wM||t instanceof GM)&&t.input instanceof Vk&&"zoom"===t.input.name&&(n=t);return n instanceof ak||t.eachChild((function(t){var i=S_(t);i instanceof ak?n=i:!n&&i?n=new ak("",'"zoom" expression may only be used as input to a top-level "step" or "interpolate" expression.'):n&&i&&n!==i&&(n=new ak("",'Only one zoom-based "step" or "interpolate" subexpression may be used in an expression.'))})),n}function k_(t){return"object"===RS(t)?["literal",t]:t}function M_(t,n){var i=t.stops;if(!i)return function(t,n){var i=["get",t.property];if(void 0===t.default)return"string"===n.type?["string",i]:i;if("enum"===n.type)return["match",i,Object.keys(n.values),i,t.default];var r=["color"===n.type?"to-color":n.type,i,k_(t.default)];return"array"===n.type&&r.splice(1,0,n.value,n.length||null),r}(t,n);var r=i&&"object"===RS(i[0][0]),e=r||void 0!==t.property,o=r||!e;return i=i.map((function(t){return!e&&n.tokens&&"string"==typeof t[1]?[t[0],R_(t[1])]:[t[0],k_(t[1])]})),r?function(t,n,i){for(var r={},e={},o=[],s=0;s3&&void 0!==arguments[3]?arguments[3]:["zoom"],o=C_(t,n),s=!1;if("interval"===o)r=["step",e],s=!0;else{if("exponential"!==o)throw new Error('Unknown zoom function type "'.concat(o,'"'));var a=void 0!==t.base?t.base:1;r=[__(t),1===a?["linear"]:["exponential",a],e]}var u,c=ES(i);try{for(c.s();!(u=c.n()).done;){var h=u.value;A_(r,h[0],h[1],s)}}catch(t){c.e(t)}finally{c.f()}return E_(r),r}(t,n,i):T_(t,n,i)}function __(t){switch(t.colorSpace){case"hcl":return"interpolate-hcl";case"lab":return"interpolate-lab";default:return"interpolate"}}function O_(t,n){var i,r,e=k_((i=t.default,r=n.default,void 0!==i?i:void 0!==r?r:void 0));return void 0===e&&"resolvedImage"===n.type?"":e}function T_(t,n,i){var r=C_(t,n),e=["get",t.property];if("categorical"===r&&"boolean"==typeof i[0][0]){var o,s=["case"],a=ES(i);try{for(a.s();!(o=a.n()).done;){var u=o.value;s.push(["==",e,u[0]],u[1])}}catch(t){a.e(t)}finally{a.f()}return s.push(O_(t,n)),s}if("categorical"===r){var c,h=["match",e],f=ES(i);try{for(f.s();!(c=f.n()).done;){var l=c.value;A_(h,l[0],l[1],!1)}}catch(t){f.e(t)}finally{f.f()}return h.push(O_(t,n)),h}if("interval"===r){var v,d=["step",["number",e]],p=ES(i);try{for(p.s();!(v=p.n()).done;){var y=v.value;A_(d,y[0],y[1],!0)}}catch(t){p.e(t)}finally{p.f()}return E_(d),void 0===t.default?d:["case",["==",["typeof",e],"number"],d,k_(t.default)]}if("exponential"===r){var m,w=void 0!==t.base?t.base:1,b=[__(t),1===w?["linear"]:["exponential",w],["number",e]],g=ES(i);try{for(g.s();!(m=g.n()).done;){var x=m.value;A_(b,x[0],x[1],!1)}}catch(t){g.e(t)}finally{g.f()}return void 0===t.default?b:["case",["==",["typeof",e],"number"],b,k_(t.default)]}throw new Error("Unknown property function type ".concat(r))}function E_(t){"step"===t[0]&&3===t.length&&(t.push(0),t.push(t[3]))}function A_(t,n,i,r){t.length>3&&n===t[t.length-2]||(r&&2===t.length||t.push(n),t.push(i))}function C_(t,n){return t.type?t.type:n.expression.interpolated?"exponential":"interval"}function R_(t){for(var n=["concat"],i=/{([^{}]+)}/g,r=0,e=i.exec(t);null!==e;e=i.exec(t)){var o=t.slice(r,i.lastIndex-e[0].length);r=i.lastIndex,o.length>0&&n.push(o),n.push(["get",e[1]])}if(1===n.length)return t;if(r=2&&"$id"!==t[1]&&"$type"!==t[1];case"in":return t.length>=3&&("string"!=typeof t[1]||Array.isArray(t[2]));case"!in":case"!has":case"none":return!1;case"==":case"!=":case">":case">=":case"<":case"<=":return 3!==t.length||Array.isArray(t[1])||Array.isArray(t[2]);case"any":case"all":var n,i=ES(t.slice(1));try{for(i.s();!(n=i.n()).done;){var r=n.value;if(!P_(r)&&"boolean"!=typeof r)return!1}}catch(t){i.e(t)}finally{i.f()}return!0;default:return!0}}var I_={type:"boolean",default:!1,transition:!1,"property-type":"data-driven",expression:{interpolated:!1,parameters:["zoom","feature"]}};function N_(t){if(null==t)return{filter:function(){return!0},needGeometry:!1};P_(t)||(t=L_(t));var n=b_(t,I_);if("error"===n.result)throw new Error(n.value.map((function(t){return"".concat(t.key,": ").concat(t.message)})).join(", "));return{filter:function(t,i,r){return n.value.evaluate(t,i,{},r)},needGeometry:F_(t)}}function z_(t,n){return tn?1:0}function F_(t){if(!Array.isArray(t))return!1;if("within"===t[0])return!0;for(var n=1;n"===i||"<="===i||">="===i?G_(t[1],t[2],i):"any"===i?(n=t.slice(1),["any"].concat(n.map(L_))):"all"===i?["all"].concat(t.slice(1).map(L_)):"none"===i?["all"].concat(t.slice(1).map(L_).map(q_)):"in"===i?D_(t[1],t.slice(2)):"!in"===i?q_(D_(t[1],t.slice(2))):"has"===i?U_(t[1]):"!has"===i?q_(U_(t[1])):"within"!==i||t}function G_(t,n,i){switch(t){case"$type":return["filter-type-".concat(i),n];case"$id":return["filter-id-".concat(i),n];default:return["filter-".concat(i),t,n]}}function D_(t,n){if(0===n.length)return!1;switch(t){case"$type":return["filter-type-in",["literal",n]];case"$id":return["filter-id-in",["literal",n]];default:return n.length>200&&!n.some((function(t){return RS(t)!==RS(n[0])}))?["filter-in-large",t,["literal",n.sort(z_)]]:["filter-in-small",t,["literal",n]]}}function U_(t){switch(t){case"$type":return!0;case"$id":return["filter-has-id"];default:return["filter-has",t]}}function q_(t){return["!",t]}var B_=["type","source","source-layer","minzoom","maxzoom","filter","layout"];function W_(t,n){var i={};for(var r in t)"ref"!==r&&(i[r]=t[r]);return B_.forEach((function(t){t in n&&(i[t]=n[t])})),i}var V_=xS((function t(n,i,r,e){jS(this,t),this.message=(n?"".concat(n,": "):"")+r,e&&(this.identifier=e),null!=i&&i.cv&&(this.line=i.cv)})),X_=xS((function t(n){jS(this,t),this.error=n,this.message=n.message;var i=n.message.match(/line (\d+)/);this.line=i?parseInt(i[1],10):0}));function H_(t){var n=t.key,i=t.value;return i?[new V_(n,i,"constants have been deprecated as of v8")]:[]}function J_(t){return t instanceof Number||t instanceof String||t instanceof Boolean?t.valueOf():t}function K_(t){if(Array.isArray(t))return t.map(K_);if(t instanceof Object&&!(t instanceof Number||t instanceof String||t instanceof Boolean)){var n={};for(var i in t)n[i]=K_(t[i]);return n}return J_(t)}function Y_(t){var n=t.key,i=t.value,r=t.valueSpec||{},e=t.objectElementValidators||{},o=t.style,s=t.styleSpec,a=[],u=p_(i);if("object"!==u)return[new V_(n,i,"object expected, ".concat(u," found"))];for(var c in i){var h=c.split(".")[0],f=r[h]||r["*"],l=void 0;if(e[h])l=e[h];else if(r[h])l=pO;else if(e["*"])l=e["*"];else{if(!r["*"]){a.push(new V_(n,i[c],'unknown property "'.concat(c,'"')));continue}l=pO}a=a.concat(l({key:(n?"".concat(n,"."):n)+c,value:i[c],valueSpec:f,style:o,styleSpec:s,object:i,objectKey:c},i))}for(var v in r)e[v]||r[v].required&&void 0===r[v].default&&void 0===i[v]&&a.push(new V_(n,i,'missing required property "'.concat(v,'"')));return a}function Z_(t){var n=t.value,i=t.valueSpec,r=t.style,e=t.styleSpec,o=t.key,s=t.arrayElementValidator||pO;if("array"!==p_(n))return[new V_(o,n,"array expected, ".concat(p_(n)," found"))];if(i.length&&n.length!==i.length)return[new V_(o,n,"array length ".concat(i.length," expected, length ").concat(n.length," found"))];if(i["min-length"]&&n.lengtha)return[new V_(n,i,"".concat(i," is greater than the maximum value ").concat(a))]}return[]}function Q_(t){var n,i,r,e=t.valueSpec,o=J_(t.value.type),s={},a="categorical"!==o&&void 0===t.value.property,u=!a,c="array"===p_(t.value.stops)&&"array"===p_(t.value.stops[0])&&"object"===p_(t.value.stops[0][0]),h=Y_({key:t.key,value:t.value,valueSpec:t.styleSpec.function,style:t.style,styleSpec:t.styleSpec,objectElementValidators:{stops:function(t){if("identity"===o)return[new V_(t.key,t.value,'identity function may not have a "stops" property')];var n=[],i=t.value;n=n.concat(Z_({key:t.key,value:i,valueSpec:t.valueSpec,style:t.style,styleSpec:t.styleSpec,arrayElementValidator:f})),"array"===p_(i)&&0===i.length&&n.push(new V_(t.key,i,"array must have at least one stop"));return n},default:function(t){return pO({key:t.key,value:t.value,valueSpec:e,style:t.style,styleSpec:t.styleSpec})}}});return"identity"===o&&a&&h.push(new V_(t.key,t.value,'missing required property "property"')),"identity"===o||t.value.stops||h.push(new V_(t.key,t.value,'missing required property "stops"')),"exponential"===o&&t.valueSpec.expression&&!d_(t.valueSpec)&&h.push(new V_(t.key,t.value,"exponential functions not supported")),t.styleSpec.$version>=8&&(u&&!l_(t.valueSpec)?h.push(new V_(t.key,t.value,"property functions not supported")):a&&!v_(t.valueSpec)&&h.push(new V_(t.key,t.value,"zoom functions not supported"))),"categorical"!==o&&!c||void 0!==t.value.property||h.push(new V_(t.key,t.value,'"property" property is required')),h;function f(t){var n=[],o=t.value,a=t.key;if("array"!==p_(o))return[new V_(a,o,"array expected, ".concat(p_(o)," found"))];if(2!==o.length)return[new V_(a,o,"array length 2 expected, length ".concat(o.length," found"))];if(c){if("object"!==p_(o[0]))return[new V_(a,o,"object expected, ".concat(p_(o[0])," found"))];if(void 0===o[0].zoom)return[new V_(a,o,"object stop key must have zoom")];if(void 0===o[0].value)return[new V_(a,o,"object stop key must have value")];if(r&&r>J_(o[0].zoom))return[new V_(a,o[0].zoom,"stop zoom values must appear in ascending order")];J_(o[0].zoom)!==r&&(r=J_(o[0].zoom),i=void 0,s={}),n=n.concat(Y_({key:"".concat(a,"[0]"),value:o[0],valueSpec:{zoom:{}},style:t.style,styleSpec:t.styleSpec,objectElementValidators:{zoom:$_,value:l}}))}else n=n.concat(l({key:"".concat(a,"[0]"),value:o[0],valueSpec:{},style:t.style,styleSpec:t.styleSpec},o));return w_(K_(o[1]))?n.concat([new V_("".concat(a,"[1]"),o[1],"expressions are not allowed in function stops.")]):n.concat(pO({key:"".concat(a,"[1]"),value:o[1],valueSpec:e,style:t.style,styleSpec:t.styleSpec}))}function l(t,r){var a=p_(t.value),u=J_(t.value),c=null!==t.value?t.value:r;if(n){if(a!==n)return[new V_(t.key,c,"".concat(a," stop domain type must match previous stop domain type ").concat(n))]}else n=a;if("number"!==a&&"string"!==a&&"boolean"!==a)return[new V_(t.key,c,"stop domain value must be a number, string, or boolean")];if("number"!==a&&"categorical"!==o){var h="number expected, ".concat(a," found");return l_(e)&&void 0===o&&(h+='\nIf you intended to use a categorical function, specify `"type": "categorical"`.'),[new V_(t.key,c,h)]}return"categorical"!==o||"number"!==a||isFinite(u)&&Math.floor(u)===u?"categorical"!==o&&"number"===a&&void 0!==i&&u":case">=":n.length>=2&&"$type"===J_(n[1])&&o.push(new V_(i,n,'"$type" cannot be use with operator "'.concat(n[0],'"')));case"==":case"!=":3!==n.length&&o.push(new V_(i,n,'filter array for operator "'.concat(n[0],'" must have 3 elements')));case"in":case"!in":n.length>=2&&"string"!==(r=p_(n[1]))&&o.push(new V_("".concat(i,"[1]"),n[1],"string expected, ".concat(r," found")));for(var s=2;s1&&void 0!==arguments[1]?arguments[1]:PS,i=[];return i=i.concat(pO({key:"",value:t,valueSpec:n.$root,styleSpec:n,style:t,objectElementValidators:{glyphs:yO,"*":function(){return[]}}})),t.constants&&(i=i.concat(H_({key:"constants",value:t.constants,style:t,styleSpec:n}))),wO(i)}function wO(t){return[].concat(t).sort((function(t,n){return t.line-n.line}))}function bO(t){return function(){for(var n=arguments.length,i=new Array(n),r=0;rc&&M.push("'"+this.fv[j]+"'");O=l.showPosition?"Parse error on line "+(a+1)+":\n"+l.showPosition()+"\nExpecting "+M.join(", ")+", got '"+(this.fv[w]||w)+"'":"Parse error on line "+(a+1)+": Unexpected "+(w==h?"end of input":"'"+(this.fv[w]||w)+"'"),this.parseError(O,{text:l.match,token:this.fv[w]||w,line:l.yylineno,loc:p,expected:M})}if(g[0]instanceof Array&&g.length>1)throw new Error("Parse Error: multiple actions possible at state: "+b+", token: "+w);switch(g[0]){case 1:i.push(w),r.push(l.yytext),e.push(l.yylloc),i.push(g[1]),w=null,u=l.yyleng,s=l.yytext,a=l.yylineno,p=l.yylloc;break;case 2:if(S=this.lv[g[1]][1],_.$=r[r.length-S],_._$={first_line:e[e.length-(S||1)].first_line,last_line:e[e.length-1].last_line,first_column:e[e.length-(S||1)].first_column,last_column:e[e.length-1].last_column},y&&(_._$.range=[e[e.length-(S||1)].range[0],e[e.length-1].range[1]]),void 0!==(x=this.performAction.apply(_,[s,u,a,v.yy,g[1],r,e].concat(f))))return x;S&&(i=i.slice(0,-1*S*2),r=r.slice(0,-1*S),e=e.slice(0,-1*S)),i.push(this.lv[g[1]][0]),r.push(_.$),e.push(_._$),k=o[i[i.length-2]][i[i.length-1]],i.push(k);break;case 3:return!0}}return!0}},l={EOF:1,parseError:function(t,n){if(!this.yy.parser)throw new Error(t);this.yy.parser.parseError(t,n)},setInput:function(t,n){return this.yy=n||this.yy||{},this._input=t,this._more=this._backtrack=this.done=!1,this.yylineno=this.yyleng=0,this.yytext=this.matched=this.match="",this.conditionStack=["INITIAL"],this.yylloc={first_line:1,first_column:0,last_line:1,last_column:0},this.options.ranges&&(this.yylloc.range=[0,0]),this.offset=0,this},input:function(){var t=this._input[0];return this.yytext+=t,this.yyleng++,this.offset++,this.match+=t,this.matched+=t,t.match(/(?:\r\n?|\n).*/g)?(this.yylineno++,this.yylloc.last_line++):this.yylloc.last_column++,this.options.ranges&&this.yylloc.range[1]++,this._input=this._input.slice(1),t},unput:function(t){var n=t.length,i=t.split(/(?:\r\n?|\n)/g);this._input=t+this._input,this.yytext=this.yytext.substr(0,this.yytext.length-n),this.offset-=n;var r=this.match.split(/(?:\r\n?|\n)/g);this.match=this.match.substr(0,this.match.length-1),this.matched=this.matched.substr(0,this.matched.length-1),i.length-1&&(this.yylineno-=i.length-1);var e=this.yylloc.range;return this.yylloc={first_line:this.yylloc.first_line,last_line:this.yylineno+1,first_column:this.yylloc.first_column,last_column:i?(i.length===r.length?this.yylloc.first_column:0)+r[r.length-i.length].length-i[0].length:this.yylloc.first_column-n},this.options.ranges&&(this.yylloc.range=[e[0],e[0]+this.yyleng-n]),this.yyleng=this.yytext.length,this},more:function(){return this._more=!0,this},reject:function(){return this.options.backtrack_lexer?(this._backtrack=!0,this):this.parseError("Lexical error on line "+(this.yylineno+1)+". You can only invoke reject() in the lexer when the lexer is of the backtracking persuasion (options.backtrack_lexer = true).\n"+this.showPosition(),{text:"",token:null,line:this.yylineno})},less:function(t){this.unput(this.match.slice(t))},pastInput:function(){var t=this.matched.substr(0,this.matched.length-this.match.length);return(t.length>20?"...":"")+t.substr(-20).replace(/\n/g,"")},upcomingInput:function(){var t=this.match;return t.length<20&&(t+=this._input.substr(0,20-t.length)),(t.substr(0,20)+(t.length>20?"...":"")).replace(/\n/g,"")},showPosition:function(){var t=this.pastInput(),n=new Array(t.length+1).join("-");return t+this.upcomingInput()+"\n"+n+"^"},test_match:function(t,n){var i,r,e;if(this.options.backtrack_lexer&&(e={yylineno:this.yylineno,yylloc:{first_line:this.yylloc.first_line,last_line:this.last_line,first_column:this.yylloc.first_column,last_column:this.yylloc.last_column},yytext:this.yytext,match:this.match,matches:this.matches,matched:this.matched,yyleng:this.yyleng,offset:this.offset,_more:this._more,_input:this._input,yy:this.yy,conditionStack:this.conditionStack.slice(0),done:this.done},this.options.ranges&&(e.yylloc.range=this.yylloc.range.slice(0))),(r=t[0].match(/(?:\r\n?|\n).*/g))&&(this.yylineno+=r.length),this.yylloc={first_line:this.yylloc.last_line,last_line:this.yylineno+1,first_column:this.yylloc.last_column,last_column:r?r[r.length-1].length-r[r.length-1].match(/\r?\n?/)[0].length:this.yylloc.last_column+t[0].length},this.yytext+=t[0],this.match+=t[0],this.matches=t,this.yyleng=this.yytext.length,this.options.ranges&&(this.yylloc.range=[this.offset,this.offset+=this.yyleng]),this._more=!1,this._backtrack=!1,this._input=this._input.slice(t[0].length),this.matched+=t[0],i=this.performAction.call(this,this.yy,this,n,this.conditionStack[this.conditionStack.length-1]),this.done&&this._input&&(this.done=!1),i)return i;if(this._backtrack){for(var o in e)this[o]=e[o];return!1}return!1},next:function(){if(this.done)return this.EOF;var t,n,i,r;this._input||(this.done=!0),this._more||(this.yytext="",this.match="");for(var e=this._currentRules(),o=0;on[0].length)){if(n=i,r=o,this.options.backtrack_lexer){if(!1!==(t=this.test_match(i,e[o])))return t;if(this._backtrack){n=!1;continue}return!1}if(!this.options.flex)break}return n?!1!==(t=this.test_match(n,e[r]))&&t:""===this._input?this.EOF:this.parseError("Lexical error on line "+(this.yylineno+1)+". Unrecognized text.\n"+this.showPosition(),{text:"",token:null,line:this.yylineno})},lex:function(){var t=this.next();return t||this.lex()},begin:function(t){this.conditionStack.push(t)},popState:function(){return this.conditionStack.length-1>0?this.conditionStack.pop():this.conditionStack[0]},_currentRules:function(){return this.conditionStack.length&&this.conditionStack[this.conditionStack.length-1]?this.conditions[this.conditionStack[this.conditionStack.length-1]].rules:this.conditions.INITIAL.rules},topState:function(t){return(t=this.conditionStack.length-1-Math.abs(t||0))>=0?this.conditionStack[t]:"INITIAL"},pushState:function(t){this.begin(t)},stateStackSize:function(){return this.conditionStack.length},options:{},performAction:function(t,n,i,r){switch(i){case 0:break;case 1:return 6;case 2:return n.yytext=n.yytext.substr(1,n.yyleng-2),4;case 3:return 17;case 4:return 18;case 5:return 23;case 6:return 24;case 7:return 22;case 8:return 21;case 9:return 10;case 10:return 11;case 11:return 8;case 12:return 14;case 13:return"INVALID"}},rules:[/^(?:\s+)/,/^(?:(-?([0-9]|[1-9][0-9]+))(\.[0-9]+)?([eE][-+]?[0-9]+)?\b)/,/^(?:"(?:\\[\\"bfnrt/]|\\u[a-fA-F0-9]{4}|[^\\\0-\x09\x0a-\x1f"])*")/,/^(?:\{)/,/^(?:\})/,/^(?:\[)/,/^(?:\])/,/^(?:,)/,/^(?::)/,/^(?:true\b)/,/^(?:false\b)/,/^(?:null\b)/,/^(?:$)/,/^(?:.)/],conditions:{INITIAL:{rules:[0,1,2,3,4,5,6,7,8,9,10,11,12,13],inclusive:!0}}};function v(){this.yy={}}return f.lexer=l,v.prototype=f,f.Parser=v,new v}();n.parser=i,n.Parser=i.Parser,n.parse=function(){return i.parse.apply(i,arguments)}}));function xO(t){if(t instanceof String||"string"==typeof t||t instanceof Buffer)try{return gO.parse(t.toString())}catch(t){throw new X_(t)}return t}function jO(t){var n=arguments.length>1&&void 0!==arguments[1]?arguments[1]:PS,i=t;try{i=xO(i)}catch(t){return[t]}return mO(i,n)}new Set(["vector","raster","raster-dem"]);var SO=w_,kO=j_,MO=M_,_O=y_;jO.parsed=jO,jO.latest=jO;var OO="function"==typeof Object.assign?Object.assign:function(t,n){if(null==t)throw new TypeError("Cannot convert undefined or null to object");for(var i=Object(t),r=1,e=arguments.length;r=.05){for(var i="",r=t.split("\n"),e=RO.slice(0,Math.round(n/.1)),o=0,s=r.length;o0&&(i+="\n"),i+=r[o].split("").join(e);return i}return t}function IO(){return CO||(CO=AO(1,1).getContext("2d")),CO}function NO(t,n){return IO().measureText(t).width+(t.length-1)*n}var zO={};function FO(t,n,i,r){if(-1!==t.indexOf("\n")){for(var e=t.split("\n"),o=[],s=0,a=e.length;s1){var f=IO();f.font=n;var l=f.measureText("M").width*i,v="";for(o=[],s=0,a=h.length;s1;++s){var y=o[s];if(NO(y,r)<.35*l){var m=s>0?NO(o[s-1],r):1/0,w=s.7*l&&NO(g,r)<.6*l){var x=b.split(" "),j=x.pop();NO(j,r)<.2*l&&(o[s]=x.join(" "),o[s+1]=j+" "+g),a-=1}}c=o.join("\n")}else c=t;c=PO(c,r),zO[u]=c}return c}function LO(t){return(LO="function"==typeof Symbol&&"symbol"==typeof Symbol.iterator?function(t){return typeof t}:function(t){return t&&"function"==typeof Symbol&&t.constructor===Symbol&&t!==Symbol.prototype?"symbol":typeof t})(t)}Xs&&Y(Xs,F,(function(){zO={}}));var GO,DO,UO=_O,qO=MO,BO=SO,WO=kO,VO={Point:1,MultiPoint:1,LineString:2,MultiLineString:2,Polygon:3,MultiPolygon:3},XO={center:[.5,.5],left:[0,.5],right:[1,.5],top:[.5,0],bottom:[.5,1],"top-left":[0,0],"top-right":[1,0],"bottom-left":[0,1],"bottom-right":[1,1]},HO={},JO={zoom:0};function KO(t,n,i,r,e,o){var s=t.id;o||(o={},console.warn("No functionCache provided to getValue()")),o[s]||(o[s]={});var a=o[s];if(!a[i]){var u=(t[n]||HO)[i],c=PS["".concat(n,"_").concat(t.type)][i];void 0===u&&(u=c.default);var h=BO(u);if(!h&&UO(u)&&(u=qO(u,c),h=!0),h){var f=function(t,n){var i=WO(t,n);if("error"===i.result)throw new Error(i.value.map((function(t){return"".concat(t.key,": ").concat(t.message)})).join(", "));return i.value}(u,c);a[i]=f.evaluate.bind(f)}else"color"==c.type&&(u=_k.parse(u)),a[i]=function(){return u}}return JO.zoom=r,a[i](JO,e)}var YO=!1;function ZO(t,n){if(t){if(!YO&&(0===t.a||0===n))return;var i=t.a;return n=void 0===n?1:n,0===i?"transparent":"rgba("+Math.round(255*t.r/i)+","+Math.round(255*t.g/i)+","+Math.round(255*t.b/i)+","+i*n+")"}return t}var $O=/^([^]*)\{(.*)\}([^]*)$/;function QO(t,n){var i;do{if(i=t.match($O)){var r=n[i[2]]||"";t=i[1]+r+i[3]}}while(i);return t}var tT=!1;function nT(t,n,i,r,e,o,s){if(void 0===r&&(r=EO),"string"==typeof n&&(n=JSON.parse(n)),8!=n.version)throw new Error("glStyle version 8 required.");var a,u;if(o)if("undefined"!=typeof Image){var c=new Image;c.crossOrigin="anonymous",c.onload=function(){a=c,u=[c.width,c.height],t.changed(),c.onload=null},c.src=o}else if("undefined"!=typeof WorkerGlobalScope&&self instanceof WorkerGlobalScope){var h=self;h.postMessage({action:"loadImage",src:o}),h.addEventListener("message",(function(t){"imageLoaded"===t.data.action&&t.data.src===o&&(a=t.data.image,u=[a.width,a.height])}))}for(var f,l=function(t){t=t.slice();for(var n=Object.create(null),i=0;i=g.maxzoom)return"continue";var k=g.filter;if(!k||function(t,n,i,r,e){return e||console.warn("No filterCache provided to evaluateFilter()"),t in e||(e[t]=N_(n).filter),JO.zoom=r,e[t](JO,i)}(x,k,l,c,w)){h=g;var M=void 0,_=void 0,A=void 0,C=void 0,R=void 0,P=void 0,I=b.index;if(3==f&&("fill"==g.type||"fill-extrusion"==g.type))if(_=KO(g,"paint",g.type+"-opacity",c,l,m),g.type+"-pattern"in S){var N=KO(g,"paint",g.type+"-pattern",c,l,m);if(N){var z="string"==typeof N?QO(N,i):N.toString();if(a&&e&&e[z]){++d,(P=E[d])&&P.getFill()&&!P.getStroke()&&!P.getText()||(P=new Yv({fill:new Tv}),E[d]=P),A=P.getFill(),P.setZIndex(I);var F=y[dt=z+"."+_];if(!F){var L=e[z],G=AO(L.width,L.height),D=G.getContext("2d");D.globalAlpha=_,D.drawImage(a,L.x,L.y,L.width,L.height,0,0,L.width,L.height),F=D.createPattern(G,"repeat"),y[dt]=F}A.setColor(F)}}}else M=ZO(KO(g,"paint",g.type+"-color",c,l,m),_),g.type+"-outline-color"in S&&(R=ZO(KO(g,"paint",g.type+"-outline-color",c,l,m),_)),R||(R=M),(M||R)&&(++d,(!(P=E[d])||M&&!P.getFill()||!M&&P.getFill()||R&&!P.getStroke()||!R&&P.getStroke()||P.getText())&&(P=new Yv({fill:M?new Tv:void 0,stroke:R?new qv:void 0}),E[d]=P),M&&(A=P.getFill()).setColor(M),R&&((C=P.getStroke()).setColor(R),C.setWidth(.5)),P.setZIndex(I));if(1!=f&&"line"==g.type){M=!("line-pattern"in S)&&"line-color"in S?ZO(KO(g,"paint","line-color",c,l,m),KO(g,"paint","line-opacity",c,l,m)):void 0;var U=KO(g,"paint","line-width",c,l,m);M&&U>0&&(++d,(P=E[d])&&P.getStroke()&&!P.getFill()&&!P.getText()||(P=new Yv({stroke:new qv}),E[d]=P),(C=P.getStroke()).setLineCap(KO(g,"layout","line-cap",c,l,m)),C.setLineJoin(KO(g,"layout","line-join",c,l,m)),C.setMiterLimit(KO(g,"layout","line-miter-limit",c,l,m)),C.setColor(M),C.setWidth(U),C.setLineDash(S["line-dasharray"]?KO(g,"paint","line-dasharray",c,l,m).map((function(t){return t*U})):null),P.setZIndex(I))}var q=!1,B=null,W=0,V=void 0,X=void 0,H=void 0;if((1==f||2==f)&&"icon-image"in j){var J=KO(g,"layout","icon-image",c,l,m);if(J){V="string"==typeof J?QO(J,i):J.toString();var K=void 0;if(a&&e&&e[V]){var Y=KO(g,"layout","icon-rotation-alignment",c,l,m);if(2==f){var Z=t.getGeometry();if(Z.getFlatMidpoint||Z.getFlatMidpoints){var $=Z.getExtent();if(Math.sqrt(Math.max(Math.pow(($[2]-$[0])/n,2),Math.pow(($[3]-$[1])/n,2)))>150){var Q="MultiLineString"===Z.getType()?Z.getFlatMidpoints():Z.getFlatMidpoint();if(DO||(DO=new Aj("Point",GO=[NaN,NaN],[],{},null)),K=DO,GO[0]=Q[0],GO[1]=Q[1],"line"===(Rt=KO(g,"layout","symbol-placement",c,l,m))&&"map"===Y)for(var tt=Z.getStride(),nt=Z.getFlatCoordinates(),it=0,rt=nt.length-tt;it=ut&&Q[0]<=ht&&Q[1]>=ct&&Q[1]<=ft){W=Math.atan2(ot-at,st-et);break}}}}}if(2!==f||K){var lt=KO(g,"layout","icon-size",c,l,m),vt=void 0!==S["icon-color"]?KO(g,"paint","icon-color",c,l,m):null;if(!vt||0!==vt.a){var dt=V+"."+lt;if(null!==vt&&(dt+="."+vt),!(X=p[dt])){var pt=e[V];X=new Uv({color:vt?[255*vt.r,255*vt.g,255*vt.b,vt.a]:void 0,img:a,imgSize:u,size:[pt.width,pt.height],offset:[pt.x,pt.y],rotateWithView:"map"===Y,scale:lt/pt.pixelRatio,displacement:"icon-offset"in j?KO(g,"layout","icon-offset",c,l,m).map((function(t){return-t*pt.pixelRatio})):void 0}),p[dt]=X}}X&&(++d,(P=E[d])&&P.getImage()&&!P.getFill()&&!P.getStroke()||(P=new Yv,E[d]=P),P.setGeometry(K),X.setRotation(W+TO(KO(g,"layout","icon-rotate",c,l,m))),X.setOpacity(KO(g,"paint","icon-opacity",c,l,m)),X.setAnchor(XO[KO(g,"layout","icon-anchor",c,l,m)]),P.setImage(X),B=P.getText(),P.setText(void 0),P.setZIndex(I),q=!0,H=!1)}else H=!0}}}if(1==f&&"circle"===g.type){++d,(P=E[d])&&P.getImage()&&!P.getFill()&&!P.getStroke()||(P=new Yv,E[d]=P);var yt="circle-radius"in S?KO(g,"paint","circle-radius",c,l,m):5,mt=ZO(KO(g,"paint","circle-stroke-color",c,l,m),KO(g,"paint","circle-stroke-opacity",c,l,m)),wt=ZO(KO(g,"paint","circle-color",c,l,m),KO(g,"paint","circle-opacity",c,l,m)),bt=KO(g,"paint","circle-stroke-width",c,l,m),gt=yt+"."+mt+"."+wt+"."+bt;(X=p[gt])||(X=new Ov({radius:yt,stroke:mt&&bt>0?new qv({width:bt,color:mt}):void 0,fill:wt?new Tv({color:wt}):void 0}),p[gt]=X),P.setImage(X),B=P.getText(),P.setText(void 0),P.setGeometry(void 0),P.setZIndex(I),q=!0}var xt,jt,St,kt,Mt=void 0,_t=void 0;if("text-field"in j){jt=Math.round(KO(g,"layout","text-size",c,l,m));var Ot=KO(g,"layout","text-font",c,l,m);xt=KO(g,"layout","text-line-height",c,l,m),_t=dS(s?s(Ot):Ot,jt,xt),St=KO(g,"layout","text-letter-spacing",c,l,m),kt=KO(g,"layout","text-max-width",c,l,m);var Tt=KO(g,"layout","text-field",c,l,m);Mt="object"===LO(Tt)&&Tt.sections?1===Tt.sections.length?Tt.toString():Tt.sections.reduce((function(t,n,i){var r=n.fontStack?n.fontStack.split(","):Ot,e=dS(s?s(r):r,jt*(n.scale||1),xt),o=n.text;if("\n"===o)return t.push("\n",""),t;if(2!=f){for(var a=0,u=(o=FO(o,e,kt,St).split("\n")).length;a0&&t.push("\n",""),t.push(o[a],e);return t}t.push(PO(o,St),e)}),[]):QO(Tt,i).trim(),_=KO(g,"paint","text-opacity",c,l,m)}if(Mt&&_&&!H){q||(++d,(P=E[d])&&P.getText()&&!P.getFill()&&!P.getStroke()||(P=new Yv,E[d]=P),P.setImage(void 0),P.setGeometry(void 0)),P.getText()||P.setText(B||new Qv({padding:[2,2,2,2]})),B=P.getText();var Et=j["text-transform"];"uppercase"==Et?Mt=Array.isArray(Mt)?Mt.map((function(t,n){return n%2?t:t.toUpperCase()})):Mt.toUpperCase():"lowercase"==Et&&(Mt=Array.isArray(Mt)?Mt.map((function(t,n){return n%2?t:t.toLowerCase()})):Mt.toLowerCase());var At=Array.isArray(Mt)?Mt:2==f?PO(Mt,St):FO(Mt,_t,kt,St);B.setText(At),B.setFont(_t),B.setRotation(TO(KO(g,"layout","text-rotate",c,l,m)));var Ct=KO(g,"layout","text-anchor",c,l,m),Rt=q||1==f?"point":KO(g,"layout","symbol-placement",c,l,m);B.setPlacement(Rt);var Pt=KO(g,"paint","text-halo-width",c,l,m),It=KO(g,"layout","text-offset",c,l,m),Nt=KO(g,"paint","text-translate",c,l,m),zt=0,Ft=0;if("point"==Rt){var Lt="center";-1!==Ct.indexOf("left")?(Lt="left",Ft=Pt):-1!==Ct.indexOf("right")&&(Lt="right",Ft=-Pt),B.setTextAlign(Lt);var Gt=KO(g,"layout","text-rotation-alignment",c,l,m);B.setRotateWithView("map"==Gt)}else B.setMaxAngle(TO(KO(g,"layout","text-max-angle",c,l,m))*Mt.length/At.length),B.setTextAlign(),B.setRotateWithView(!1);var Dt="middle";0==Ct.indexOf("bottom")?(Dt="bottom",zt=-Pt-.5*(xt-1)*jt):0==Ct.indexOf("top")&&(Dt="top",zt=Pt+.5*(xt-1)*jt),B.setTextBaseline(Dt),B.setOffsetX(It[0]*jt+Ft+Nt[0]),B.setOffsetY(It[1]*jt+zt+Nt[1]),T.setColor(ZO(KO(g,"paint","text-color",c,l,m),_)),B.setFill(T);var Ut=ZO(KO(g,"paint","text-halo-color",c,l,m),_);if(Ut){O.setColor(Ut),Pt*=2;var qt=.5*jt;O.setWidth(Pt<=qt?Pt:qt),B.setStroke(O)}else B.setStroke(void 0);var Bt=KO(g,"layout","text-padding",c,l,m),Wt=B.getPadding();Bt!==Wt[0]&&(Wt[0]=Bt,Wt[1]=Bt,Wt[2]=Bt,Wt[3]=Bt),P.setZIndex(I)}}},g=0,x=o.length;g-1?(E.length=d+1,tT&&("function"==typeof t.set?t.set("mapbox-layer",h):t.getProperties()["mapbox-layer"]=h),E):void 0}};return t.setStyle(A),t.set("mapbox-source",f),t.set("mapbox-layers",d),A}var iT=i(338);function rT(t){return(rT="function"==typeof Symbol&&"symbol"==typeof Symbol.iterator?function(t){return typeof t}:function(t){return t&&"function"==typeof Symbol&&t.constructor===Symbol&&t!==Symbol.prototype?"symbol":typeof t})(t)}var eT,oT={},sT=/font-family: ?([^;]*);/,aT=/("|')/g;function uT(t){if(!eT){eT={};for(var n=document.styleSheets,i=0,r=n.length;i2?r[2]:""):t+i}function pT(t,n,i,r,e){return new Promise((function(o,s){if("object"!=rT(n)&&(n=JSON.parse(n)),8!=n.version)return s(new Error("glStyle version 8 required."));if(!(t instanceof Rj||t instanceof rS))return s(new Error("Can only apply to VectorLayer or VectorTileLayer"));var a,u,c;function h(){c||n.sprite&&!a?c?(t.setStyle(c),o()):s(new Error("Something went wrong trying to apply style.")):(c=nT(t,n,i,e,a,u,fT),t.getStyle()?o():s(new Error("Nothing to show for source [".concat(i,"]"))))}if(n.sprite){var f=.5==(window.devicePixelRatio>=1.5?.5:1)?"@2x":"",l=dT(n.sprite,r,f+".json");fetch(l,{credentials:"same-origin"}).then((function(t){return t.ok||""===f?t:(l=dT(n.sprite,r,".json"),fetch(l,{credentials:"same-origin"}))})).then((function(t){if(t.ok)return t.json();s(new Error("Problem fetching sprite from ".concat(l,": ").concat(t.statusText)))})).then((function(t){if(void 0===t)return s(new Error("No sprites found."));a=t,u=dT(n.sprite,r,f+".png"),h()})).catch((function(t){s(new Error("Sprites cannot be loaded: ".concat(l,": ").concat(t.message)))}))}else h()}))}var yT={};function mT(t,n){var i={id:n.id,type:n.type},r={};function e(e){var o=n.layout||{},s=n.paint||{};i.paint=s;var a,u,c="function"==typeof t.getSource?t.getSource().getTileGrid().getZForResolution(e):t.getView().getZoom(),h="function"==typeof t.getTargetElement?t.getTargetElement():void 0;if(void 0!==s["background-color"]&&(a=KO(i,"paint","background-color",c,yT,r),h&&(h.style.background=_k.parse(a).toString())),void 0!==s["background-opacity"]&&(u=KO(i,"paint","background-opacity",c,yT,r),h&&(h.style.opacity=u)),"none"!=o.visibility)return ZO(a,u);h&&(h.style.backgroundColor="",h.style.opacity="")}if("function"==typeof t.getTargetElement)t.getTargetElement()&&e(),t.on(["change:resolution","change:target"],e);else{if("function"!=typeof t.setBackground)throw new Error("Unable to apply background.");t.setBackground(e)}}function wT(t){var n=t.bounds;if(n){var i=_r([n[0],n[1]]),r=_r([n[2],n[3]]);return[i[0],i[1],r[0],r[1]]}}function bT(t,n){t=OO({},t);var i=[n,JSON.stringify(t)].toString(),r=oT[i];return r||(r=new rx({url:t.tiles?void 0:n,tileJSON:t.tiles?t:void 0}),oT[i]=r),new Promise((function(t){var i=r.on("change",(function(){var e=r.getState();if("ready"===e){var o=r.getTileJSON(),s=Array.isArray(o.tiles)?o.tiles:[o.tiles];if(n)for(var a=0,u=s.length;a1&&!t.variables)throw new Error("Missing variables in style (expected ".concat(r.variables,")"));for(var v=function(n){var i=r.variables[n];if(!(i in t.variables))throw new Error("Missing '".concat(i,"' in style variables"));var e=lv(i);f[e]=function(){var n=t.variables[i];return"string"==typeof n&&(n=tv(r,n)),void 0!==n?n:-9999999}},d=0;d ").concat(Rl.RENDER_EXTENT,"[2] ||\n v_mapCoord[1] > ").concat(Rl.RENDER_EXTENT,"[3]\n ) {\n discard;\n }\n\n vec4 color = texture2D(").concat(Rl.TILE_TEXTURE_ARRAY,"[0], v_textureCoord);\n\n ").concat(e.join("\n"),"\n\n if (color.a == 0.0) {\n discard;\n }\n\n gl_FragColor = color;\n gl_FragColor.rgb *= gl_FragColor.a;\n gl_FragColor *= ").concat(Rl.TRANSITION_ALPHA,";\n }"),uniforms:f,paletteTextures:r.paletteTextures}}var zT=function(t){function n(n){var i=this,r=n?E({},n):{},e=r.style||{};delete r.style;var o=r.cacheSize;return delete r.cacheSize,(i=t.call(this,r)||this).bv=r.sources,i.Pf=NaN,i.K=e,i.$t=o,i.mv=i.K.variables||{},i.addChangeListener(rs,i.gv),i}return IT(n,t),n.prototype.getSources=function(t,n){var i=this.getSource();return this.bv?"function"==typeof this.bv?this.bv(t,n):this.bv:i?[i]:[]},n.prototype.getRenderSource=function(){return this.getLayerState().source||this.getSource()},n.prototype.getSourceState=function(){var t=this.getRenderSource();return t?t.getState():vs},n.prototype.gv=function(){this.getSource()&&this.setStyle(this.K)},n.prototype.xv=function(){var t=this.getSource();return t&&"bandCount"in t?t.bandCount:4},n.prototype.createRenderer=function(){var t=NT(this.K,this.xv());return new Dl(this,{vertexShader:t.vertexShader,fragmentShader:t.fragmentShader,uniforms:t.uniforms,cacheSize:this.$t,paletteTextures:t.paletteTextures})},n.prototype.renderSources=function(t,n){for(var i,r=this.getRenderer(),e=0,o=n.length;e.5*r.resolution){var h=this.getSources(t.extent,this.Pf).filter((function(t){return!e.includes(t)}));if(h.length>0)return this.renderSources(t,h)}return c},n.prototype.setStyle=function(t){this.mv=t.variables||{},this.K=t;var n=NT(this.K,this.xv());this.getRenderer().reset({vertexShader:n.vertexShader,fragmentShader:n.fragmentShader,uniforms:n.uniforms,paletteTextures:n.paletteTextures}),this.changed()},n.prototype.updateStyleVariables=function(t){E(this.mv,t),this.changed()},n}(_g);zT.prototype.dispose;var FT=zT,LT=function(){var t=function(n,i){return(t=Object.setPrototypeOf||{__proto__:[]}instanceof Array&&function(t,n){t.__proto__=n}||function(t,n){for(var i in n)Object.prototype.hasOwnProperty.call(n,i)&&(t[i]=n[i])})(n,i)};return function(n,i){if("function"!=typeof i&&null!==i)throw new TypeError("Class extends value "+String(i)+" is not a constructor or null");function r(){this.constructor=n}t(n,i),n.prototype=null===i?Object.create(i):(r.prototype=i.prototype,new r)}}(),GT="addfeatures",DT=function(t){function n(n,i,r,e){var o=t.call(this,n)||this;return o.features=r,o.file=i,o.projection=e,o}return LT(n,t),n}(f),UT=function(t){function n(n){var i=this,r=n||{};(i=t.call(this,{handleEvent:k})||this).on,i.once,i.un,i.jv=!1,i.Sv=[];for(var e=r.formatConstructors?r.formatConstructors:[],o=0,s=e.length;o0){this.Mv&&(this.Mv.clear(),this.Mv.addFeatures(f)),this.dispatchEvent(new DT(GT,t,f,o));break}}},n.prototype.Tv=function(){var t=this.getMap();if(t){var n=this.target?this.target:t.getViewport();this.kv=[Y(n,B,this.handleDrop,this),Y(n,U,this.handleStop,this),Y(n,q,this.handleStop,this),Y(n,B,this.handleStop,this)]}},n.prototype.setActive=function(n){!this.getActive()&&n&&this.Tv(),this.getActive()&&!n&&this.Ev(),t.prototype.setActive.call(this,n)},n.prototype.setMap=function(n){this.Ev(),t.prototype.setMap.call(this,n),this.getActive()&&this.Tv()},n.prototype.Ov=function(t,n,i){try{return t.readFeatures(n,i)}catch(t){return null}},n.prototype.Ev=function(){this.kv&&(this.kv.forEach($),this.kv=null)},n.prototype.handleDrop=function(t){for(var n=t.dataTransfer.files,i=0,r=n.length;i1?1:-1;return n.endInteraction(this.Fr,i),this._e=0,!1},n.prototype.handleDownEvent=function(t){return!!Uu(t)&&(!!this.Jr(t)&&(t.map.getView().beginInteraction(),this.Yr=void 0,this.Av=void 0,!0))},n}(Tu),WT=function(){var t=function(n,i){return(t=Object.setPrototypeOf||{__proto__:[]}instanceof Array&&function(t,n){t.__proto__=n}||function(t,n){for(var i in n)Object.prototype.hasOwnProperty.call(n,i)&&(t[i]=n[i])})(n,i)};return function(n,i){if("function"!=typeof i&&null!==i)throw new TypeError("Class extends value "+String(i)+" is not a constructor or null");function r(){this.constructor=n}t(n,i),n.prototype=null===i?Object.create(i):(r.prototype=i.prototype,new r)}}(),VT=function(t){function n(n,i,r){var e=t.call(this)||this;if(void 0!==r&&void 0===i)e.setFlatCoordinates(r,n);else{var o=i||0;e.setCenterAndRadius(n,o,r)}return e}return WT(n,t),n.prototype.clone=function(){var t=new n(this.flatCoordinates.slice(),void 0,this.layout);return t.applyProperties(this),t},n.prototype.closestPointXY=function(t,n,i,r){var e=this.flatCoordinates,o=t-e[0],s=n-e[1],a=o*o+s*s;if(a=n[0]||(t[1]<=n[1]&&t[3]>=n[1]||qn(t,this.intersectsCoordinate.bind(this)))}return!1},n.prototype.setCenter=function(t){var n=this.stride,i=this.flatCoordinates[n]-this.flatCoordinates[0],r=t.slice();r[n]=r[0]+i;for(var e=1;e=this.Bv?(this.Pv=n.pixel,this.Rv=!this.Fv,i=!0):this.Nv=void 0,this.Rv&&void 0!==this.Iv&&(clearTimeout(this.Iv),this.Iv=void 0));return this.Fv&&n.type===da.POINTERDRAG&&null!==this.Vv?(this.td(n.coordinate),r=!1):this.Fv&&n.type===da.POINTERDOWN?r=!1:i&&this.getPointerCount()<2?(r=n.type===da.POINTERMOVE)&&this.Fv?(this.Jn(n),this.Rv&&n.originalEvent.preventDefault()):("mouse"===n.originalEvent.pointerType||n.type===da.POINTERDRAG&&void 0===this.Iv)&&this.Jn(n):n.type===da.DBLCLICK&&(r=!1),t.prototype.handleEvent.call(this,n)&&r},n.prototype.handleDownEvent=function(t){return this.Rv=!this.Fv,this.Fv?(this.Pv=t.pixel,this.Wv||this.rd(t.coordinate),!0):this.Jr(t)?(this.Nv=Date.now(),this.Iv=setTimeout(function(){this.Jn(new va(da.POINTERMOVE,t.map,t.originalEvent,!1,t.frameState))}.bind(this),this.Bv),this.Pv=t.pixel,!0):(this.Nv=void 0,!1)},n.prototype.handleUpEvent=function(t){var n=!0;if(0===this.getPointerCount())if(this.Iv&&(clearTimeout(this.Iv),this.Iv=void 0),this.Jn(t),this.Rv){var i=!this.Wv;i&&this.rd(t.coordinate),!i&&this.Fv?this.finishDrawing():this.Fv||i&&this.pe!==JT||(this.ed(t.pixel)?this.qv(t)&&this.finishDrawing():this.td(t.coordinate)),n=!1}else this.Fv&&this.abortDrawing();return!n&&this.Gv&&t.preventDefault(),n},n.prototype.Jn=function(t){if(this.zv=t.originalEvent.pointerType,this.Pv&&(!this.Fv&&this.Rv||this.Fv&&!this.Rv)){var n=this.Pv,i=t.pixel,r=n[0]-i[0],e=n[1]-i[1],o=r*r+e*e;if(this.Rv=this.Fv?o>this.Yv:o<=this.Yv,!this.Rv)return}this.Wv?this.od(t.coordinate):this.sd(t.coordinate.slice())},n.prototype.ed=function(t){var n=!1;if(this.Vv){var i=!1,r=[this.Wv],e=this.pe;if(e===JT)n=!0;else if(e===ZT)n=2===this.Hv.length;else if(e===KT)i=this.Hv.length>this.Dv;else if(e===YT){var o=this.Hv;i=o[0].length>this.Dv,r=[o[0][0],o[0][o[0].length-2]]}if(i)for(var s=this.getMap(),a=0,u=r.length;a=this.Uv&&(this.Fv?i.pop():n=!0),i.push(t.slice()),this.Wa(i,r,e)):o===YT&&((i=this.Hv[0]).length>=this.Uv&&(this.Fv?i.pop():n=!0),i.push(t.slice()),n&&(this.Wv=i[0]),this.Wa(this.Hv,r,e)),this.sd(t.slice()),this.ad(),n&&this.finishDrawing()},n.prototype.removeLastPoint=function(){if(this.Vv){var t,n=this.Vv.getGeometry(),i=this.getMap().getView().getProjection(),r=this.pe;if(r===KT||r===ZT){if((t=this.Hv).splice(-2,1),t.length>=2){this.Wv=t[t.length-2].slice();var e=this.Wv.slice();t[t.length-1]=e,this.sd(e)}this.Wa(t,n,i),n.getType()===Pt.POLYGON&&this.Jv&&this.ud(n)}else if(r===YT){(t=this.Hv[0]).splice(-2,1);var o=this.Jv.getGeometry();if(t.length>=2){e=t[t.length-2].slice();t[t.length-1]=e,this.sd(e)}o.setCoordinates(t),this.Wa(this.Hv,n,i)}1===t.length&&this.abortDrawing(),this.ad()}},n.prototype.finishDrawing=function(){var t=this.hd();if(t){var n=this.Hv,i=t.getGeometry(),r=this.getMap().getView().getProjection();this.pe===KT?(n.pop(),this.Wa(n,i,r)):this.pe===YT&&(n[0].pop(),this.Wa(n,i,r),n=i.getCoordinates()),this.tl===Pt.MULTI_POINT?t.setGeometry(new yj([n])):this.tl===Pt.MULTI_LINE_STRING?t.setGeometry(new Sj([n])):this.tl===Pt.MULTI_POLYGON&&t.setGeometry(new _j([n])),this.dispatchEvent(new nE(QT,t)),this.Fe&&this.Fe.push(t),this.Mv&&this.Mv.addFeature(t)}},n.prototype.hd=function(){this.Wv=null;var t=this.Vv;return this.Vv=null,this.Xv=null,this.Jv=null,this.Zv.getSource().clear(!0),t},n.prototype.abortDrawing=function(){var t=this.hd();t&&this.dispatchEvent(new nE(tE,t))},n.prototype.appendCoordinates=function(t){var n,i=this.pe,r=!this.Vv;if(r&&this.rd(t[0]),i===KT||i===ZT)n=this.Hv;else{if(i!==YT)return;n=this.Hv&&this.Hv.length?this.Hv[0]:[]}r&&n.shift(),n.pop();for(var e=0;ef?o[1]:o[0]),s}}return null},n.prototype.Jn=function(t){var n=t.pixel,i=t.map,r=this.bd(n,i);r||(r=i.getCoordinateFromPixelInternal(n)),this.gd(r)},n.prototype.xd=function(t){var n=this.dd;return n?t?n.setGeometry(Ze(t)):n.setGeometry(void 0):(n=new Tt(t?Ze(t):{}),this.dd=n,this.md.getSource().addFeature(n)),n},n.prototype.gd=function(t){var n=this.yd;n?n.getGeometry().setCoordinates(t):(n=new Tt(new Oe(t)),this.yd=n,this.wd.getSource().addFeature(n));return n},n.prototype.handleEvent=function(n){return!n.originalEvent||!this.Jr(n)||(n.type!=da.POINTERMOVE||this.handlingDownUpSequence||this.Jn(n),t.prototype.handleEvent.call(this,n),!1)},n.prototype.handleDownEvent=function(t){var n=t.pixel,i=t.map,r=this.getExtentInternal(),e=this.bd(n,i),o=function(t){var n=null,i=null;return t[0]==r[0]?n=r[2]:t[0]==r[2]&&(n=r[0]),t[1]==r[1]?i=r[3]:t[1]==r[3]&&(i=r[1]),null!==n&&null!==i?[n,i]:null};if(e&&r){var s=e[0]==r[0]||e[0]==r[2]?e[0]:null,a=e[1]==r[1]||e[1]==r[3]?e[1]:null;null!==s&&null!==a?this.fd=aE(o(e)):null!==s?this.fd=uE(o([s,r[1]]),o([s,r[3]])):null!==a&&(this.fd=uE(o([r[0],a]),o([r[2],a])))}else e=i.getCoordinateFromPixelInternal(n),this.setExtent([e[0],e[1],e[0],e[1]]),this.fd=aE(e);return!0},n.prototype.handleDragEvent=function(t){if(this.fd){var n=t.coordinate;this.setExtent(this.fd(n)),this.gd(n)}},n.prototype.handleUpEvent=function(t){this.fd=null;var n=this.getExtentInternal();return n&&0!==Bn(n)||this.setExtent(null),!1},n.prototype.setMap=function(n){this.md.setMap(n),this.wd.setMap(n),t.prototype.setMap.call(this,n)},n.prototype.getExtent=function(){return Fr(this.getExtentInternal(),this.getMap().getView().getProjection())},n.prototype.getExtentInternal=function(){return this.st},n.prototype.setExtent=function(t){this.st=t||null,this.xd(t),this.dispatchEvent(new oE(this.st))},n}(Tu);function hE(t){return(hE="function"==typeof Symbol&&"symbol"==typeof Symbol.iterator?function(t){return typeof t}:function(t){return t&&"function"==typeof Symbol&&t.constructor===Symbol&&t!==Symbol.prototype?"symbol":typeof t})(t)}var fE=function(){var t=function(n,i){return(t=Object.setPrototypeOf||{__proto__:[]}instanceof Array&&function(t,n){t.__proto__=n}||function(t,n){for(var i in n)Object.prototype.hasOwnProperty.call(n,i)&&(t[i]=n[i])})(n,i)};return function(n,i){if("function"!=typeof i&&null!==i)throw new TypeError("Class extends value "+String(i)+" is not a constructor or null");function r(){this.constructor=n}t(n,i),n.prototype=null===i?Object.create(i):(r.prototype=i.prototype,new r)}}(),lE=[0,0,0,0],vE=[],dE="modifystart",pE="modifyend",yE=function(t){function n(n,i,r){var e=t.call(this,n)||this;return e.features=i,e.mapBrowserEvent=r,e}return fE(n,t),n}(f);function mE(t,n){return t.index-n.index}function wE(t,n,i){var r=n.geometry;if(r.getType()===Pt.CIRCLE){var e=r;if(1===n.index){var o=Ir();o&&(e=e.clone().transform(o,i));var s=ir(e.getCenter(),zr(t,i)),a=Math.sqrt(s)-e.getRadius();return a*a}}var u=zr(t,i);return vE[0]=zr(n.segment[0],i),vE[1]=zr(n.segment[1],i),er(u,vE)}function bE(t,n,i){var r=n.geometry;if(r.getType()===Pt.CIRCLE&&1===n.index){var e=r,o=Ir();return o&&(e=e.clone().transform(o,i)),Nr(e.getClosestPoint(zr(t,i)),i)}var s=zr(t,i);return vE[0]=zr(n.segment[0],i),vE[1]=zr(n.segment[1],i),Nr(Yi(s,vE),i)}var gE=function(t){function n(n){var i,r,e=t.call(this,n)||this;if(e.on,e.once,e.un,e.jd=e.Ju.bind(e),e.Jr=n.condition?n.condition:qu,e.Sd=function(t){return Au(t)&&Fu(t)},e.kd=n.deleteCondition?n.deleteCondition:e.Sd,e.Md=n.insertVertexCondition?n.insertVertexCondition:Iu,e.yd=null,e._d=null,e.Od=[0,0],e.Td=!1,e.Ed=null,e.Ad=new id,e.ld=void 0!==n.pixelTolerance?n.pixelTolerance:10,e.vd=!1,e.Cd=!1,e.Rd=[],e.Zv=new Rj({source:new Id({useSpatialIndex:!1,wrapX:!!n.wrapX}),style:n.style?n.style:(i=Jv(),function(t,n){return i[Pt.POINT]}),updateWhileAnimating:!0,updateWhileInteracting:!0}),e.Pd={Point:e.Id.bind(e),LineString:e.Nd.bind(e),LinearRing:e.Nd.bind(e),Polygon:e.zd.bind(e),MultiPoint:e.Fd.bind(e),MultiLineString:e.Ld.bind(e),MultiPolygon:e.Gd.bind(e),Circle:e.Dd.bind(e),GeometryCollection:e.Ud.bind(e)},e.Mv=null,e.qd=null,n.features?r=n.features:n.source&&(e.Mv=n.source,r=new ft(e.Mv.getFeatures()),e.Mv.addEventListener(Md,e.Bd.bind(e)),e.Mv.addEventListener(Td,e.Wd.bind(e))),!r)throw new Error("The modify interaction requires features, a source or a layer");return n.hitDetection&&(e.qd=n.hitDetection),e.Fe=r,e.Fe.forEach(e.Vd.bind(e)),e.Fe.addEventListener(st,e.Xd.bind(e)),e.Fe.addEventListener(at,e.Hd.bind(e)),e.Jd=null,e.qr=[0,0],e.Kd=void 0===n.snapToPointer?!e.qd:n.snapToPointer,e}return fE(n,t),n.prototype.Vd=function(t){var n=t.getGeometry();if(n){var i=this.Pd[n.getType()];i&&i(t,n)}var r=this.getMap();r&&r.isRendered()&&this.getActive()&&this.Yd(this.Od,r),t.addEventListener(N,this.jd)},n.prototype.Zd=function(t,n){if(!this.Ed){this.Ed=new ft;for(var i=this.Ed.getArray(),r=0,e=n.length;r=0;--r){for(var e=i[r],o=this.Rd.length-1;o>=0;--o)this.Rd[o][0]===e&&this.Rd.splice(o,1);n.remove(e)}},n.prototype.setActive=function(n){this.yd&&!n&&(this.Zv.getSource().removeFeature(this.yd),this.yd=null),t.prototype.setActive.call(this,n)},n.prototype.setMap=function(n){this.Zv.setMap(n),t.prototype.setMap.call(this,n)},n.prototype.getOverlay=function(){return this.Zv},n.prototype.Bd=function(t){t.feature&&this.Fe.push(t.feature)},n.prototype.Wd=function(t){t.feature&&this.Fe.remove(t.feature)},n.prototype.Xd=function(t){this.Vd(t.element)},n.prototype.Ju=function(t){if(!this.Cd){var n=t.target;this.$d(n),this.Vd(n)}},n.prototype.Hd=function(t){var n=t.element;this.$d(n)},n.prototype.Id=function(t,n){var i=n.getCoordinates(),r={feature:t,geometry:n,segment:[i,i]};this.Ad.insert(n.getExtent(),r)},n.prototype.Fd=function(t,n){for(var i=n.getCoordinates(),r=0,e=i.length;r=0;--y)this.ip(e[y],s)}return!!this.yd},n.prototype.handleUpEvent=function(t){for(var n=this.Rd.length-1;n>=0;--n){var i=this.Rd[n][0],r=i.geometry;if(r.getType()===Pt.CIRCLE){var e=r.getCenter(),o=i.featureSegments[0],s=i.featureSegments[1];o.segment[0]=e,o.segment[1]=e,s.segment[0]=e,s.segment[1]=e,this.Ad.update(Rn(e),o);var a=r,u=Ir();if(u){var c=t.map.getView().getProjection();a=$e(a=a.clone().transform(u,c)).transform(c,u)}this.Ad.update(a.getExtent(),s)}else this.Ad.update(xn(i.segment),i)}return this.Ed&&(this.dispatchEvent(new yE(pE,this.Ed,t)),this.Ed=null),!1},n.prototype.Jn=function(t){this.Od=t.pixel,this.Yd(t.pixel,t.map,t.coordinate)},n.prototype.Yd=function(t,n,i){var r,e,s=this,a=i||n.getCoordinateFromPixel(t),u=n.getView().getProjection();if(this.qd){var c="object"===hE(this.qd)?function(t){return t===s.qd}:void 0;n.forEachFeatureAtPixel(t,(function(t,n,i){if((i=i||t.getGeometry()).getType()===Pt.POINT&&y(s.Fe.getArray(),t)){e=i;var o=i.getFlatCoordinates().slice(0,2);r=[{feature:t,geometry:i,segment:[o,o]}]}return!0}),{layerFilter:c})}if(!r){var h=Fr(jn(Lr(Rn(a,lE),u),n.getView().getResolution()*this.ld,lE),u);r=this.Ad.getInExtent(h)}if(r&&r.length>0){var f=r.sort((function(t,n){return wE(a,t,u)-wE(a,n,u)}))[0],l=f.segment,v=bE(a,f,u),d=n.getPixelFromCoordinate(v),p=rr(t,d);if(e||p<=this.ld){var m={};if(m[o(l)]=!0,this.Kd||(this.qr[0]=v[0]-a[0],this.qr[1]=v[1]-a[1]),f.geometry.getType()===Pt.CIRCLE&&1===f.index)this.vd=!0,this.tp(v,[f.feature],[f.geometry]);else{var w=n.getPixelFromCoordinate(l[0]),b=n.getPixelFromCoordinate(l[1]),g=ir(d,w),x=ir(d,b);p=Math.sqrt(Math.min(g,x)),this.vd=p<=this.ld,this.vd&&(v=g>x?l[1]:l[0]),this.tp(v,[f.feature],[f.geometry]);var j={};j[o(f.geometry)]=!0;for(var S=1,k=r.length;S=0;--e)f=o((h=(i=l[e])[0]).feature),h.depth&&(f+="-"+h.depth.join("-")),f in v||(v[f]={}),0===i[1]?(v[f].right=h,v[f].index=h.index):1==i[1]&&(v[f].left=h,v[f].index=h.index+1);for(f in v){switch(c=v[f].right,a=v[f].left,(u=(s=v[f].index)-1)<0&&(u=0),t=n=(r=(h=void 0!==a?a:c).geometry).getCoordinates(),d=!1,r.getType()){case Pt.MULTI_LINE_STRING:n[h.depth[0]].length>2&&(n[h.depth[0]].splice(s,1),d=!0);break;case Pt.LINE_STRING:n.length>2&&(n.splice(s,1),d=!0);break;case Pt.MULTI_POLYGON:t=t[h.depth[1]];case Pt.POLYGON:(t=t[h.depth[0]]).length>4&&(s==t.length-1&&(s=0),t.splice(s,1),d=!0,0===s&&(t.pop(),t.push(t[0]),u=t.length-1))}if(d){this.np(r,n);var p=[];if(void 0!==a&&(this.Ad.remove(a),p.push(a.segment[0])),void 0!==c&&(this.Ad.remove(c),p.push(c.segment[1])),void 0!==a&&void 0!==c){var y={depth:h.depth,feature:h.feature,geometry:h.geometry,index:u,segment:p};this.Ad.insert(xn(y.segment),y)}this.rp(r,s,h.depth,-1),this.yd&&(this.Zv.getSource().removeFeature(this.yd),this.yd=null),l.length=0}}return d},n.prototype.np=function(t,n){this.Cd=!0,t.setCoordinates(n),this.Cd=!1},n.prototype.rp=function(t,n,i,r){this.Ad.forEachInExtent(t.getExtent(),(function(e){e.geometry===t&&(void 0===i||void 0===e.depth||x(e.depth,i))&&e.index>n&&(e.index+=r)}))},n}(Tu),xE=function(){var t=function(n,i){return(t=Object.setPrototypeOf||{__proto__:[]}instanceof Array&&function(t,n){t.__proto__=n}||function(t,n){for(var i in n)Object.prototype.hasOwnProperty.call(n,i)&&(t[i]=n[i])})(n,i)};return function(n,i){if("function"!=typeof i&&null!==i)throw new TypeError("Class extends value "+String(i)+" is not a constructor or null");function r(){this.constructor=n}t(n,i),n.prototype=null===i?Object.create(i):(r.prototype=i.prototype,new r)}}(),jE="select",SE=function(t){function n(n,i,r,e){var o=t.call(this,n)||this;return o.selected=i,o.deselected=r,o.mapBrowserEvent=e,o}return xE(n,t),n}(f),kE={};var ME=function(t){function n(n){var i=t.call(this)||this;i.on,i.once,i.un;var r,e,o=n||{};if(i.op=i.Vd.bind(i),i.sp=i.$d.bind(i),i.Jr=o.condition?o.condition:Fu,i.ap=o.addCondition?o.addCondition:zu,i.up=o.removeCondition?o.removeCondition:zu,i.cp=o.toggleCondition?o.toggleCondition:Gu,i.hp=!!o.multi&&o.multi,i.fp=o.filter?o.filter:k,i.lp=o.hitTolerance?o.hitTolerance:0,i.K=void 0!==o.style?o.style:(b((r=Jv())[Pt.POLYGON],r[Pt.LINE_STRING]),b(r[Pt.GEOMETRY_COLLECTION],r[Pt.LINE_STRING]),function(t){return t.getGeometry()?r[t.getGeometry().getType()]:null}),i.Fe=o.features||new ft,o.layers)if("function"==typeof o.layers)e=o.layers;else{var s=o.layers;e=function(t){return y(s,t)}}else e=k;return i.vp=e,i.dp={},i}return xE(n,t),n.prototype.pp=function(t,n){this.dp[o(t)]=n},n.prototype.getFeatures=function(){return this.Fe},n.prototype.getHitTolerance=function(){return this.lp},n.prototype.getLayer=function(t){return this.dp[o(t)]},n.prototype.setHitTolerance=function(t){this.lp=t},n.prototype.setMap=function(n){this.getMap()&&this.K&&this.Fe.forEach(this.yp.bind(this)),t.prototype.setMap.call(this,n),n?(this.Fe.addEventListener(st,this.op),this.Fe.addEventListener(at,this.sp),this.K&&this.Fe.forEach(this.mp.bind(this))):(this.Fe.removeEventListener(st,this.op),this.Fe.removeEventListener(at,this.sp))},n.prototype.Vd=function(t){var n=t.element;if(this.K&&this.mp(n),!this.getLayer(n)){var i=this.getMap().getAllLayers().find((function(t){if(t instanceof Rj&&t.getSource()&&t.getSource().hasFeature(n))return t}));i&&this.pp(n,i)}},n.prototype.$d=function(t){var n=t.element;this.K&&this.yp(n)},n.prototype.getStyle=function(){return this.K},n.prototype.mp=function(t){var n=o(t);n in kE||(kE[n]=t.getStyle()),t.setStyle(this.K)},n.prototype.yp=function(t){for(var i=this.getMap().getInteractions().getArray(),r=i.length-1;r>=0;--r){var e=i[r];if(e!==this&&e instanceof n&&e.getStyle()&&-1!==e.getFeatures().getArray().lastIndexOf(t))return void t.setStyle(e.getStyle())}var s=o(t);t.setStyle(kE[s]),delete kE[s]},n.prototype.wp=function(t){delete this.dp[o(t)]},n.prototype.handleEvent=function(t){if(!this.Jr(t))return!0;var n=this.ap(t),i=this.up(t),r=this.cp(t),e=!n&&!i&&!r,o=t.map,s=this.getFeatures(),a=[],u=[];if(e){A(this.dp),o.forEachFeatureAtPixel(t.pixel,function(t,n){if(this.fp(t,n))return this.pp(t,n),u.push(t),!this.hp}.bind(this),{layerFilter:this.vp,hitTolerance:this.lp});for(var c=s.getLength()-1;c>=0;--c){var h=s.item(c),f=u.indexOf(h);f>-1?u.splice(f,1):(s.remove(h),a.push(h))}0!==u.length&&s.extend(u)}else{o.forEachFeatureAtPixel(t.pixel,function(t,e){if(this.fp(t,e))return!n&&!r||y(s.getArray(),t)?(i||r)&&y(s.getArray(),t)&&(a.push(t),this.wp(t)):(this.pp(t,e),u.push(t)),!this.hp}.bind(this),{layerFilter:this.vp,hitTolerance:this.lp});for(var l=a.length-1;l>=0;--l)s.remove(a[l]);s.extend(u)}return(u.length>0||a.length>0)&&this.dispatchEvent(new SE(jE,u,a,t)),!0},n}(Su),_E=function(){var t=function(n,i){return(t=Object.setPrototypeOf||{__proto__:[]}instanceof Array&&function(t,n){t.__proto__=n}||function(t,n){for(var i in n)Object.prototype.hasOwnProperty.call(n,i)&&(t[i]=n[i])})(n,i)};return function(n,i){if("function"!=typeof i&&null!==i)throw new TypeError("Class extends value "+String(i)+" is not a constructor or null");function r(){this.constructor=n}t(n,i),n.prototype=null===i?Object.create(i):(r.prototype=i.prototype,new r)}}();function OE(t){return t.feature?t.feature:t.element?t.element:void 0}var TE=[],EE=function(t){function n(n){var i=this,r=n||{},e=r;return e.handleDownEvent||(e.handleDownEvent=k),e.stopDown||(e.stopDown=M),(i=t.call(this,e)||this).Mv=r.source?r.source:null,i.bp=void 0===r.vertex||r.vertex,i.gp=void 0===r.edge||r.edge,i.Fe=r.features?r.features:null,i.xp=[],i.jp={},i.Sp={},i.kp={},i.ld=void 0!==r.pixelTolerance?r.pixelTolerance:10,i.Ad=new id,i.Mp={Point:i._p.bind(i),LineString:i.Op.bind(i),LinearRing:i.Op.bind(i),Polygon:i.Tp.bind(i),MultiPoint:i.Ep.bind(i),MultiLineString:i.Ap.bind(i),MultiPolygon:i.Cp.bind(i),GeometryCollection:i.Rp.bind(i),Circle:i.Pp.bind(i)},i}return _E(n,t),n.prototype.addFeature=function(t,n){var i=void 0===n||n,r=o(t),e=t.getGeometry();if(e){var s=this.Mp[e.getType()];if(s){this.Sp[r]=e.getExtent([1/0,1/0,-1/0,-1/0]);var a=[];if(s(a,e),1===a.length)this.Ad.insert(xn(a[0]),{feature:t,segment:a[0]});else if(a.length>1){var u=a.map((function(t){return xn(t)})),c=a.map((function(n){return{feature:t,segment:n}}));this.Ad.load(u,c)}}}i&&(this.jp[r]=Y(t,N,this.Ju,this))},n.prototype.Ip=function(t){this.addFeature(t)},n.prototype.Np=function(t){this.removeFeature(t)},n.prototype.zp=function(){var t;return this.Fe?t=this.Fe:this.Mv&&(t=this.Mv.getFeatures()),t},n.prototype.handleEvent=function(n){var i=this.snapTo(n.pixel,n.coordinate,n.map);return i&&(n.coordinate=i.vertex.slice(0,2),n.pixel=i.vertexPixel),t.prototype.handleEvent.call(this,n)},n.prototype.Xd=function(t){var n=OE(t);this.addFeature(n)},n.prototype.Hd=function(t){var n=OE(t);this.removeFeature(n)},n.prototype.Ju=function(t){var n=t.target;if(this.handlingDownUpSequence){var i=o(n);i in this.kp||(this.kp[i]=n)}else this.Fp(n)},n.prototype.handleUpEvent=function(t){var n=C(this.kp);return n.length&&(n.forEach(this.Fp.bind(this)),this.kp={}),!1},n.prototype.removeFeature=function(t,n){var i=void 0===n||n,r=o(t),e=this.Sp[r];if(e){var s=this.Ad,a=[];s.forEachInExtent(e,(function(n){t===n.feature&&a.push(n)}));for(var u=a.length-1;u>=0;--u)s.remove(a[u])}i&&($(this.jp[r]),delete this.jp[r])},n.prototype.setMap=function(n){var i=this.getMap(),r=this.xp,e=this.zp();i&&(r.forEach($),r.length=0,e.forEach(this.Np.bind(this))),t.prototype.setMap.call(this,n),n&&(this.Fe?r.push(Y(this.Fe,st,this.Xd,this),Y(this.Fe,at,this.Hd,this)):this.Mv&&r.push(Y(this.Mv,Md,this.Xd,this),Y(this.Mv,Td,this.Hd,this)),e.forEach(this.Ip.bind(this)))},n.prototype.snapTo=function(t,n,i){var r=xn([i.getCoordinateFromPixel([t[0]-this.ld,t[1]+this.ld]),i.getCoordinateFromPixel([t[0]+this.ld,t[1]-this.ld])]),e=this.Ad.getInExtent(r),o=e.length;if(0===o)return null;var s,a=i.getView().getProjection(),u=zr(n,a),c=1/0,h=this.ld*this.ld,f=function(){if(s){var n=i.getPixelFromCoordinate(s);if(ir(t,n)<=h)return{vertex:s,vertexPixel:[Math.round(n[0]),Math.round(n[1])]}}return null};if(this.bp){for(var l=0;l=0;i--){var c=o[i][0];if(_n(new Me(c).getExtent(),new Me(a).getExtent())){o[i].push(a),u=!0;break}}u||o.push([a.reverse()])}return o}(o.rings,s);1===a.length?(e=Pt.POLYGON,t=E({},t,((i={}).rings=a[0],i))):(e=Pt.MULTI_POLYGON,t=E({},t,((r={}).rings=a,r)))}return Hj((0,LE[e])(t),!1,n)}function UE(t){var n=Et;return!0===t.hasZ&&!0===t.hasM?n=Rt:!0===t.hasZ?n=At:!0===t.hasM&&(n=Ct),n}function qE(t){var n=t.getLayout();return{hasZ:n===At||n===Rt,hasM:n===Ct||n===Rt}}function BE(t,n){return(0,GE[t.getType()])(Hj(t,!0,n),n)}GE[Pt.POINT]=function(t,n){var i,r=t.getCoordinates(),e=t.getLayout();e===At?i={x:r[0],y:r[1],z:r[2]}:e===Ct?i={x:r[0],y:r[1],m:r[2]}:e===Rt?i={x:r[0],y:r[1],z:r[2],m:r[3]}:e===Et?i={x:r[0],y:r[1]}:Mt(!1,34);return i},GE[Pt.LINE_STRING]=function(t,n){var i=qE(t);return{hasZ:i.hasZ,hasM:i.hasM,paths:[t.getCoordinates()]}},GE[Pt.POLYGON]=function(t,n){var i=qE(t);return{hasZ:i.hasZ,hasM:i.hasM,rings:t.getCoordinates(!1)}},GE[Pt.MULTI_POINT]=function(t,n){var i=qE(t);return{hasZ:i.hasZ,hasM:i.hasM,points:t.getCoordinates()}},GE[Pt.MULTI_LINE_STRING]=function(t,n){var i=qE(t);return{hasZ:i.hasZ,hasM:i.hasM,paths:t.getCoordinates()}},GE[Pt.MULTI_POLYGON]=function(t,n){for(var i=qE(t),r=t.getCoordinates(!1),e=[],o=0;o=0;s--)e.push(r[o][s]);return{hasZ:i.hasZ,hasM:i.hasM,rings:e}};var WE=function(t){function n(n){var i=this,r=n||{};return(i=t.call(this)||this).H=r.geometryName,i}return FE(n,t),n.prototype.readFeatureFromObject=function(t,n,i){var r=t,e=DE(r.geometry,n),o=new Tt;if(this.H&&o.setGeometryName(this.H),o.setGeometry(e),r.attributes){o.setProperties(r.attributes,!0);var s=r.attributes[i];void 0!==s&&o.setId(s)}return o},n.prototype.readFeaturesFromObject=function(t,n){var i=n||{};if(t.features){for(var r=[],e=t.features,o=0,s=e.length;o0?i[0]:null},n.prototype.readFeatureFromNode=function(t,n){return null},n.prototype.readFeatures=function(t,n){if(t){if("string"==typeof t){var i=gf(t);return this.readFeaturesFromDocument(i,n)}return wf(t)?this.readFeaturesFromDocument(t,n):this.readFeaturesFromNode(t,n)}return[]},n.prototype.readFeaturesFromDocument=function(t,n){for(var i=[],r=t.firstChild;r;r=r.nextSibling)r.nodeType==Node.ELEMENT_NODE&&b(i,this.readFeaturesFromNode(r,n));return i},n.prototype.readFeaturesFromNode=function(t,n){return r()},n.prototype.readGeometry=function(t,n){if(t){if("string"==typeof t){var i=gf(t);return this.readGeometryFromDocument(i,n)}return wf(t)?this.readGeometryFromDocument(t,n):this.readGeometryFromNode(t,n)}return null},n.prototype.readGeometryFromDocument=function(t,n){return null},n.prototype.readGeometryFromNode=function(t,n){return null},n.prototype.readProjection=function(t){if(t){if("string"==typeof t){var n=gf(t);return this.readProjectionFromDocument(n)}return wf(t)?this.readProjectionFromDocument(t):this.readProjectionFromNode(t)}return null},n.prototype.readProjectionFromDocument=function(t){return this.dataProjection},n.prototype.readProjectionFromNode=function(t){return this.dataProjection},n.prototype.writeFeature=function(t,n){var i=this.writeFeatureNode(t,n);return this.Bp.serializeToString(i)},n.prototype.writeFeatureNode=function(t,n){return null},n.prototype.writeFeatures=function(t,n){var i=this.writeFeaturesNode(t,n);return this.Bp.serializeToString(i)},n.prototype.writeFeaturesNode=function(t,n){return null},n.prototype.writeGeometry=function(t,n){var i=this.writeGeometryNode(t,n);return this.Bp.serializeToString(i)},n.prototype.writeGeometryNode=function(t,n){return null},n}(Xj),HE=function(){var t=function(n,i){return(t=Object.setPrototypeOf||{__proto__:[]}instanceof Array&&function(t,n){t.__proto__=n}||function(t,n){for(var i in n)Object.prototype.hasOwnProperty.call(n,i)&&(t[i]=n[i])})(n,i)};return function(n,i){if("function"!=typeof i&&null!==i)throw new TypeError("Class extends value "+String(i)+" is not a constructor or null");function r(){this.constructor=n}t(n,i),n.prototype=null===i?Object.create(i):(r.prototype=i.prototype,new r)}}(),JE="http://www.opengis.net/gml",KE=/^[\s\xa0]*$/,YE=function(t){function n(n){var i=t.call(this)||this,r=n||{};return i.featureType=r.featureType,i.featureNS=r.featureNS,i.srsName=r.srsName,i.schemaLocation="",i.FEATURE_COLLECTION_PARSERS={},i.FEATURE_COLLECTION_PARSERS[i.namespace]={featureMember:jf(i.readFeaturesInternal),featureMembers:Sf(i.readFeaturesInternal)},i.supportedMediaTypes=["application/gml+xml"],i}return HE(n,t),n.prototype.readFeaturesInternal=function(t,n){var i=t.localName,r=null;if("FeatureCollection"==i)r=Pf([],this.FEATURE_COLLECTION_PARSERS,t,n,this);else if("featureMembers"==i||"featureMember"==i||"member"==i){var e=n[0],o=e.featureType,s=e.featureNS;if(!o&&t.childNodes){o=[],s={};for(var a=0,u=t.childNodes.length;a0){e[a]={Wp:e[a]};for(var c=0;c0;else{var f=h.getType();a=f===Pt.POINT||f===Pt.MULTI_POINT}}a&&(u=o.get("name"),(a=a&&!!u)&&u.search(/&[^&]+;/)>-1&&(BC||(BC=document.createElement("textarea")),BC.innerHTML=u,u=BC.value));var l=i;if(t?l=t:n&&(l=JC(n,i,r)),a){var v=function(t,n){var i=[0,0],r="start",e=t.getImage();if(e){var o=e.getSize();if(o&&2==o.length){var s=e.getScaleArray(),a=e.getAnchor();i[0]=s[0]*(o[0]-a[0]),i[1]=s[1]*(o[1]/2-a[1]),r="left"}}var u=t.getText();u?((u=u.clone()).setFont(u.getFont()||UC.getFont()),u.setScale(u.getScale()||UC.getScale()),u.setFill(u.getFill()||UC.getFill()),u.setStroke(u.getStroke()||GC)):u=UC.clone();return u.setText(n),u.setOffsetX(i[0]),u.setOffsetY(i[1]),u.setTextAlign(r),new Yv({image:e,text:u})}(l[0],u);return c.length>0?(v.setGeometry(new sS(c)),[v,new Yv({geometry:l[0].getGeometry(),image:null,fill:l[0].getFill(),stroke:l[0].getStroke(),text:null})].concat(l.slice(1))):v}return l}}(i.Style,i.styleUrl,this.my,this.xy,this.jy);r.setStyle(a)}return delete i.Style,r.setProperties(i,!0),r}},n.prototype._y=function(t,n){var i=t.getAttribute("id");if(null!==i){var r=SR.call(this,t,n);if(r){var e=void 0,o=t.baseURI;if(o&&"about:blank"!=o||(o=window.location.href),o)e=new URL("#"+i,o).href;else e="#"+i;this.xy[e]=r}}},n.prototype.Oy=function(t,n){var i=t.getAttribute("id");if(null!==i){var r=nR.call(this,t,n);if(r){var e,o=t.baseURI;if(o&&"about:blank"!=o||(o=window.location.href),o)e=new URL("#"+i,o).href;else e="#"+i;this.xy[e]=r}}},n.prototype.readFeatureFromNode=function(t,n){if(!y(TC,t.namespaceURI))return null;var i=this.My(t,[this.getReadOptions(t,n)]);return i||null},n.prototype.readFeaturesFromNode=function(t,n){if(!y(TC,t.namespaceURI))return[];var i,r=t.localName;if("Document"==r||"Folder"==r)return(i=this.ky(t,[this.getReadOptions(t,n)]))||[];if("Placemark"==r){var e=this.My(t,[this.getReadOptions(t,n)]);return e?[e]:[]}if("kml"==r){i=[];for(var o=t.firstElementChild;o;o=o.nextElementSibling){var s=this.readFeaturesFromNode(o,n);s&&b(i,s)}return i}return[]},n.prototype.readName=function(t){if(t){if("string"==typeof t){var n=gf(t);return this.readNameFromDocument(n)}return wf(t)?this.readNameFromDocument(t):this.readNameFromNode(t)}},n.prototype.readNameFromDocument=function(t){for(var n=t.firstChild;n;n=n.nextSibling)if(n.nodeType==Node.ELEMENT_NODE){var i=this.readNameFromNode(n);if(i)return i}},n.prototype.readNameFromNode=function(t){for(var n=t.firstElementChild;n;n=n.nextElementSibling)if(y(TC,n.namespaceURI)&&"name"==n.localName)return oA(n);for(n=t.firstElementChild;n;n=n.nextElementSibling){var i=n.localName;if(y(TC,n.namespaceURI)&&("Document"==i||"Folder"==i||"Placemark"==i||"kml"==i)){var r=this.readNameFromNode(n);if(r)return r}}},n.prototype.readNetworkLinks=function(t){var n=[];if("string"==typeof t){var i=gf(t);b(n,this.readNetworkLinksFromDocument(i))}else wf(t)?b(n,this.readNetworkLinksFromDocument(t)):b(n,this.readNetworkLinksFromNode(t));return n},n.prototype.readNetworkLinksFromDocument=function(t){for(var n=[],i=t.firstChild;i;i=i.nextSibling)i.nodeType==Node.ELEMENT_NODE&&b(n,this.readNetworkLinksFromNode(i));return n},n.prototype.readNetworkLinksFromNode=function(t){for(var n=[],i=t.firstElementChild;i;i=i.nextElementSibling)if(y(TC,i.namespaceURI)&&"NetworkLink"==i.localName){var r=Pf({},CC,i,[]);n.push(r)}for(i=t.firstElementChild;i;i=i.nextElementSibling){var e=i.localName;!y(TC,i.namespaceURI)||"Document"!=e&&"Folder"!=e&&"kml"!=e||b(n,this.readNetworkLinksFromNode(i))}return n},n.prototype.readRegion=function(t){var n=[];if("string"==typeof t){var i=gf(t);b(n,this.readRegionFromDocument(i))}else wf(t)?b(n,this.readRegionFromDocument(t)):b(n,this.readRegionFromNode(t));return n},n.prototype.readRegionFromDocument=function(t){for(var n=[],i=t.firstChild;i;i=i.nextSibling)i.nodeType==Node.ELEMENT_NODE&&b(n,this.readRegionFromNode(i));return n},n.prototype.readRegionFromNode=function(t){for(var n=[],i=t.firstElementChild;i;i=i.nextElementSibling)if(y(TC,i.namespaceURI)&&"Region"==i.localName){var r=Pf({},PC,i,[]);n.push(r)}for(i=t.firstElementChild;i;i=i.nextElementSibling){var e=i.localName;!y(TC,i.namespaceURI)||"Document"!=e&&"Folder"!=e&&"kml"!=e||b(n,this.readRegionFromNode(i))}return n},n.prototype.writeFeaturesNode=function(t,n){n=this.adaptOptions(n);var i=pf(TC[4],"kml"),r="http://www.w3.org/2000/xmlns/";i.setAttributeNS(r,"xmlns:gx",OC[0]),i.setAttributeNS(r,"xmlns:xsi",df),i.setAttributeNS(df,"xsi:schemaLocation","http://www.opengis.net/kml/2.2 https://developers.google.com/kml/schema/kml22gx.xsd");var e={node:i},o={};t.length>1?o.Document=t:1==t.length&&(o.Placemark=t[0]);var s=IC[i.namespaceURI],a=Af(o,s);return Nf(e,NC,Ef,a,[n],s,this),i},n}(XE);function JC(t,n,i){return Array.isArray(t)?t:"string"==typeof t?JC(i[t],n,i):n}function KC(t){var n=yf(t,!1),i=/^\s*#?\s*([0-9A-Fa-f]{8})\s*$/.exec(n);if(i){var r=i[1];return[parseInt(r.substr(6,2),16),parseInt(r.substr(4,2),16),parseInt(r.substr(2,2),16),parseInt(r.substr(0,2),16)/255]}}function YC(t){var n=yf(t,!1),i=[];n=n.replace(/\s*,\s*/g,",");for(var r,e=/^\s*([+\-]?\d*\.?\d+(?:e[+\-]?\d+)?),([+\-]?\d*\.?\d+(?:e[+\-]?\d+)?)(?:\s+|,|$)(?:([+\-]?\d*\.?\d+(?:e[+\-]?\d+)?)(?:\s+|$))?\s*/i;r=e.exec(n);){var o=parseFloat(r[1]),s=parseFloat(r[2]),a=r[3]?parseFloat(r[3]):0;i.push(o,s,a),n=n.substr(r[0].length)}if(""===n)return i}function ZC(t){var n=yf(t,!1).trim(),i=t.baseURI;return i&&"about:blank"!=i||(i=window.location.href),i?new URL(n,i).href:n}function $C(t){var n=yf(t,!1).trim().replace(/^(?!.*#)/,"#"),i=t.baseURI;return i&&"about:blank"!=i||(i=window.location.href),i?new URL(n,i).href:n}function QC(t){return nA(t)}var tR=Cf(TC,{Pair:function(t,n){var i=Pf({},ER,t,n,this);if(!i)return;var r=i.key;if(r&&"normal"==r){var e=i.styleUrl;e&&(n[n.length-1]=e);var o=i.Style;o&&(n[n.length-1]=o)}}});function nR(t,n){return Pf(void 0,tR,t,n,this)}var iR=Cf(TC,{Icon:Mf((function(t,n){var i=Pf({},fR,t,n);return i||null})),color:Mf(KC),heading:Mf(nA),hotSpot:Mf((function(t){var n,i=t.getAttribute("xunits"),r=t.getAttribute("yunits");return n="insetPixels"!==i?"insetPixels"!==r?Cv:Pv:"insetPixels"!==r?Rv:Iv,{x:parseFloat(t.getAttribute("x")),xunits:EC[i],y:parseFloat(t.getAttribute("y")),yunits:EC[r],origin:n}})),scale:Mf(QC)});var rR=Cf(TC,{color:Mf(KC),scale:Mf(QC)});var eR=Cf(TC,{color:Mf(KC),width:Mf(nA)});var oR=Cf(TC,{color:Mf(KC),fill:Mf($E),outline:Mf($E)});var sR=Cf(TC,{coordinates:Sf(YC)});function aR(t,n){return Pf(null,sR,t,n)}var uR=Cf(OC,{Track:jf(hR)});var cR=Cf(TC,{when:function(t,n){var i=n[n.length-1].whens,r=yf(t,!1),e=Date.parse(r);i.push(isNaN(e)?0:e)}},Cf(OC,{coord:function(t,n){var i=n[n.length-1].coordinates,r=yf(t,!1),e=/^\s*([+\-]?\d+(?:\.\d*)?(?:e[+\-]?\d*)?)\s+([+\-]?\d+(?:\.\d*)?(?:e[+\-]?\d*)?)\s+([+\-]?\d+(?:\.\d*)?(?:e[+\-]?\d*)?)\s*$/i.exec(r);if(e){var o=parseFloat(e[1]),s=parseFloat(e[2]),a=parseFloat(e[3]);i.push([o,s,a])}else i.push([])}}));function hR(t,n){var i=Pf({coordinates:[],whens:[]},cR,t,n);if(i){for(var r=[],e=i.coordinates,o=i.whens,s=0,a=Math.min(e.length,o.length);s0){var r=n[n.length-1];r.push.apply(r,i)}},outerBoundaryIs:function(t,n){var i=Pf(void 0,IR,t,n);if(i){n[n.length-1][0]=i}}});function xR(t,n){var i=Pf({},dR,t,n),r=Pf([null],gR,t,n);if(r&&r[0]){for(var e=r[0],o=[e.length],s=1,a=r.length;s0,h=u.href;h?r=h:c&&(r=MC);var f,l=Cv,v=i.hotSpot;v?(e=[v.x,v.y],o=v.xunits,s=v.yunits,l=v.origin):/^http:\/\/maps\.(?:google|gstatic)\.com\//.test(r)&&(/pushpin/.test(r)?(e=xC,o=jC,s=SC):/arrow-reverse/.test(r)?(e=[54,42],o=jC,s=SC):/paddle/.test(r)&&(e=[32,1],o=jC,s=SC));var d,p=u.x,y=u.y;void 0!==p&&void 0!==y&&(f=[p,y]);var m,w=u.w,b=u.h;void 0!==w&&void 0!==b&&(d=[w,b]);var g=i.heading;void 0!==g&&(m=pi(g));var x=i.scale,j=i.color;if(c){r==MC&&(d=kC);var S=new Uv({anchor:e,anchorOrigin:l,anchorXUnits:o,anchorYUnits:s,crossOrigin:this.Bt,offset:f,offsetOrigin:Cv,rotation:m,scale:x,size:d,src:this.Sy(r),color:j}),k=S.getScaleArray()[0],M=S.getSize();if(null===M){var _=S.getImageState();if(_===yo||_===mo){S.listenImageChange((function t(){var n=S.getImageState();if(n!==yo&&n!==mo){var i=S.getSize();if(i&&2==i.length){var r=VC(i);S.setScale(k*r)}S.unlistenImageChange(t)}})),_===yo&&S.load()}}else if(2==M.length){var O=VC(M);S.setScale(k*O)}a.imageStyle=S}else a.imageStyle=FC}},LabelStyle:function(t,n){var i=Pf({},rR,t,n);if(i){var r=n[n.length-1],e=new Qv({fill:new Tv({color:"color"in i?i.color:gC}),scale:i.scale});r.textStyle=e}},LineStyle:function(t,n){var i=Pf({},eR,t,n);if(i){var r=n[n.length-1],e=new qv({color:"color"in i?i.color:gC,width:"width"in i?i.width:1});r.strokeStyle=e}},PolyStyle:function(t,n){var i=Pf({},oR,t,n);if(i){var r=n[n.length-1],e=new Tv({color:"color"in i?i.color:gC});r.fillStyle=e;var o=i.fill;void 0!==o&&(r.fill=o);var s=i.outline;void 0!==s&&(r.outline=s)}}});function SR(t,n){var i=Pf({},jR,t,n,this);if(!i)return null;var r,e="fillStyle"in i?i.fillStyle:zC,o=i.fill;void 0===o||o||(e=null),"imageStyle"in i?i.imageStyle!=FC&&(r=i.imageStyle):r=LC;var s="textStyle"in i?i.textStyle:UC,a="strokeStyle"in i?i.strokeStyle:DC,u=i.outline;return void 0===u||u?[new Yv({fill:e,image:r,stroke:a,text:s,zIndex:void 0})]:[new Yv({geometry:function(t){var n=t.getGeometry(),i=n.getType();return i===Pt.GEOMETRY_COLLECTION?new sS(n.getGeometriesArrayRecursive().filter((function(t){var n=t.getType();return n!==Pt.POLYGON&&n!==Pt.MULTI_POLYGON}))):i!==Pt.POLYGON&&i!==Pt.MULTI_POLYGON?n:void 0},fill:e,image:r,stroke:a,text:s,zIndex:void 0}),new Yv({geometry:function(t){var n=t.getGeometry(),i=n.getType();return i===Pt.GEOMETRY_COLLECTION?new sS(n.getGeometriesArrayRecursive().filter((function(t){var n=t.getType();return n===Pt.POLYGON||n===Pt.MULTI_POLYGON}))):i===Pt.POLYGON||i===Pt.MULTI_POLYGON?n:void 0},fill:e,stroke:null,zIndex:void 0})]}function kR(t,n){var i,r,e,o=n.length,s=new Array(n.length),a=new Array(n.length),u=new Array(n.length);i=!1,r=!1,e=!1;for(var c=0;c0){var m=Af(e,s);Nf(r,oP,aP,[{names:s,values:m}],i)}var w=i[0],b=n.getGeometry();b&&(b=Hj(b,!0,w)),Nf(r,oP,YR,[b],i)}var cP=Cf(TC,["extrude","tessellate","altitudeMode","coordinates"]),hP=Cf(TC,{extrude:_f(sA),tessellate:_f(sA),altitudeMode:_f(fA),coordinates:_f((function(t,n,i){var r,e=i[i.length-1],o=e.layout,s=e.stride;o==Et||o==Ct?r=2:o==At||o==Rt?r=3:Mt(!1,34);var a=n.length,u="";if(a>0){u+=n[0];for(var c=1;c>1):e>>1}return n}function rI(t){for(var n="",i=0,r=t.length;i=32;)n=63+(32|31&t),i+=String.fromCharCode(n),t>>=5;return n=t+63,i+=String.fromCharCode(n)}var sI=function(t){function n(n){var i=t.call(this)||this,r=n||{};return i.dataProjection=br("EPSG:4326"),i.Ty=r.factor?r.factor:1e5,i.Ey=r.geometryLayout?r.geometryLayout:Et,i}return YP(n,t),n.prototype.readFeatureFromText=function(t,n){var i=this.readGeometryFromText(t,n);return new Tt(i)},n.prototype.readFeaturesFromText=function(t,n){return[this.readFeatureFromText(t,n)]},n.prototype.readGeometryFromText=function(t,n){var i=Zr(this.Ey),r=$P(t,i,this.Ty);zE(r,0,r.length,i,r);var e=we(r,0,r.length,i);return Hj(new xj(e,this.Ey),!1,this.adaptOptions(n))},n.prototype.writeFeatureText=function(t,n){var i=t.getGeometry();return i?this.writeGeometryText(i,n):(Mt(!1,40),"")},n.prototype.writeFeaturesText=function(t,n){return this.writeFeatureText(t[0],n)},n.prototype.writeGeometryText=function(t,n){var i=(t=Hj(t,!0,this.adaptOptions(n))).getFlatCoordinates(),r=t.getStride();return zE(i,0,i.length,r,i),ZP(i,r,this.Ty)},n}(cC),aI=function(){var t=function(n,i){return(t=Object.setPrototypeOf||{__proto__:[]}instanceof Array&&function(t,n){t.__proto__=n}||function(t,n){for(var i in n)Object.prototype.hasOwnProperty.call(n,i)&&(t[i]=n[i])})(n,i)};return function(n,i){if("function"!=typeof i&&null!==i)throw new TypeError("Class extends value "+String(i)+" is not a constructor or null");function r(){this.constructor=n}t(n,i),n.prototype=null===i?Object.create(i):(r.prototype=i.prototype,new r)}}(),uI=function(t){function n(n){var i=t.call(this)||this,r=n||{};return i.Ql=r.layerName,i.Uc=r.layers?r.layers:null,i.dataProjection=br(r.dataProjection?r.dataProjection:"EPSG:4326"),i}return aI(n,t),n.prototype.readFeaturesFromObject=function(t,n){if("Topology"==t.type){var i=t,r=void 0,e=null,o=null;i.transform&&(e=(r=i.transform).scale,o=r.translate);var s=i.arcs;r&&function(t,n,i){for(var r=0,e=t.length;r0&&r.pop(),i>=0)for(var s=0,a=(u=n[i]).length;s=0;--s)r.push(u[s].slice(0))}return r}function fI(t,n,i,r,e,o,s){for(var a=t.geometries,u=[],c=0,h=a.length;c=2,57),r}return mI(n,t),n}(yI),bI=function(){var t=function(n,i){return(t=Object.setPrototypeOf||{__proto__:[]}instanceof Array&&function(t,n){t.__proto__=n}||function(t,n){for(var i in n)Object.prototype.hasOwnProperty.call(n,i)&&(t[i]=n[i])})(n,i)};return function(n,i){if("function"!=typeof i&&null!==i)throw new TypeError("Class extends value "+String(i)+" is not a constructor or null");function r(){this.constructor=n}t(n,i),n.prototype=null===i?Object.create(i):(r.prototype=i.prototype,new r)}}(),gI=function(t){function n(n){return t.call(this,"And",Array.prototype.slice.call(arguments))||this}return bI(n,t),n}(wI),xI=function(){var t=function(n,i){return(t=Object.setPrototypeOf||{__proto__:[]}instanceof Array&&function(t,n){t.__proto__=n}||function(t,n){for(var i in n)Object.prototype.hasOwnProperty.call(n,i)&&(t[i]=n[i])})(n,i)};return function(n,i){if("function"!=typeof i&&null!==i)throw new TypeError("Class extends value "+String(i)+" is not a constructor or null");function r(){this.constructor=n}t(n,i),n.prototype=null===i?Object.create(i):(r.prototype=i.prototype,new r)}}(),jI=function(t){function n(n,i,r){var e=t.call(this,"BBOX")||this;if(e.geometryName=n,e.extent=i,4!==i.length)throw new Error("Expected an extent with four values ([minX, minY, maxX, maxY])");return e.srsName=r,e}return xI(n,t),n}(yI),SI=function(){var t=function(n,i){return(t=Object.setPrototypeOf||{__proto__:[]}instanceof Array&&function(t,n){t.__proto__=n}||function(t,n){for(var i in n)Object.prototype.hasOwnProperty.call(n,i)&&(t[i]=n[i])})(n,i)};return function(n,i){if("function"!=typeof i&&null!==i)throw new TypeError("Class extends value "+String(i)+" is not a constructor or null");function r(){this.constructor=n}t(n,i),n.prototype=null===i?Object.create(i):(r.prototype=i.prototype,new r)}}(),kI=function(t){function n(n,i,r,e){var o=t.call(this,n)||this;return o.geometryName=i||"the_geom",o.geometry=r,o.srsName=e,o}return SI(n,t),n}(yI),MI=function(){var t=function(n,i){return(t=Object.setPrototypeOf||{__proto__:[]}instanceof Array&&function(t,n){t.__proto__=n}||function(t,n){for(var i in n)Object.prototype.hasOwnProperty.call(n,i)&&(t[i]=n[i])})(n,i)};return function(n,i){if("function"!=typeof i&&null!==i)throw new TypeError("Class extends value "+String(i)+" is not a constructor or null");function r(){this.constructor=n}t(n,i),n.prototype=null===i?Object.create(i):(r.prototype=i.prototype,new r)}}(),_I=function(t){function n(n,i,r){return t.call(this,"Contains",n,i,r)||this}return MI(n,t),n}(kI),OI=function(){var t=function(n,i){return(t=Object.setPrototypeOf||{__proto__:[]}instanceof Array&&function(t,n){t.__proto__=n}||function(t,n){for(var i in n)Object.prototype.hasOwnProperty.call(n,i)&&(t[i]=n[i])})(n,i)};return function(n,i){if("function"!=typeof i&&null!==i)throw new TypeError("Class extends value "+String(i)+" is not a constructor or null");function r(){this.constructor=n}t(n,i),n.prototype=null===i?Object.create(i):(r.prototype=i.prototype,new r)}}(),TI=function(t){function n(n,i,r,e,o){var s=t.call(this,"DWithin",n,i,o)||this;return s.distance=r,s.unit=e,s}return OI(n,t),n}(kI),EI=function(){var t=function(n,i){return(t=Object.setPrototypeOf||{__proto__:[]}instanceof Array&&function(t,n){t.__proto__=n}||function(t,n){for(var i in n)Object.prototype.hasOwnProperty.call(n,i)&&(t[i]=n[i])})(n,i)};return function(n,i){if("function"!=typeof i&&null!==i)throw new TypeError("Class extends value "+String(i)+" is not a constructor or null");function r(){this.constructor=n}t(n,i),n.prototype=null===i?Object.create(i):(r.prototype=i.prototype,new r)}}(),AI=function(t){function n(n,i,r){return t.call(this,"Disjoint",n,i,r)||this}return EI(n,t),n}(kI),CI=function(){var t=function(n,i){return(t=Object.setPrototypeOf||{__proto__:[]}instanceof Array&&function(t,n){t.__proto__=n}||function(t,n){for(var i in n)Object.prototype.hasOwnProperty.call(n,i)&&(t[i]=n[i])})(n,i)};return function(n,i){if("function"!=typeof i&&null!==i)throw new TypeError("Class extends value "+String(i)+" is not a constructor or null");function r(){this.constructor=n}t(n,i),n.prototype=null===i?Object.create(i):(r.prototype=i.prototype,new r)}}(),RI=function(t){function n(n,i){var r=t.call(this,n)||this;return r.propertyName=i,r}return CI(n,t),n}(yI),PI=function(){var t=function(n,i){return(t=Object.setPrototypeOf||{__proto__:[]}instanceof Array&&function(t,n){t.__proto__=n}||function(t,n){for(var i in n)Object.prototype.hasOwnProperty.call(n,i)&&(t[i]=n[i])})(n,i)};return function(n,i){if("function"!=typeof i&&null!==i)throw new TypeError("Class extends value "+String(i)+" is not a constructor or null");function r(){this.constructor=n}t(n,i),n.prototype=null===i?Object.create(i):(r.prototype=i.prototype,new r)}}(),II=function(t){function n(n,i,r){var e=t.call(this,"During",n)||this;return e.begin=i,e.end=r,e}return PI(n,t),n}(RI),NI=function(){var t=function(n,i){return(t=Object.setPrototypeOf||{__proto__:[]}instanceof Array&&function(t,n){t.__proto__=n}||function(t,n){for(var i in n)Object.prototype.hasOwnProperty.call(n,i)&&(t[i]=n[i])})(n,i)};return function(n,i){if("function"!=typeof i&&null!==i)throw new TypeError("Class extends value "+String(i)+" is not a constructor or null");function r(){this.constructor=n}t(n,i),n.prototype=null===i?Object.create(i):(r.prototype=i.prototype,new r)}}(),zI=function(t){function n(n,i,r,e){var o=t.call(this,n,i)||this;return o.expression=r,o.matchCase=e,o}return NI(n,t),n}(RI),FI=function(){var t=function(n,i){return(t=Object.setPrototypeOf||{__proto__:[]}instanceof Array&&function(t,n){t.__proto__=n}||function(t,n){for(var i in n)Object.prototype.hasOwnProperty.call(n,i)&&(t[i]=n[i])})(n,i)};return function(n,i){if("function"!=typeof i&&null!==i)throw new TypeError("Class extends value "+String(i)+" is not a constructor or null");function r(){this.constructor=n}t(n,i),n.prototype=null===i?Object.create(i):(r.prototype=i.prototype,new r)}}(),LI=function(t){function n(n,i,r){return t.call(this,"PropertyIsEqualTo",n,i,r)||this}return FI(n,t),n}(zI),GI=function(){var t=function(n,i){return(t=Object.setPrototypeOf||{__proto__:[]}instanceof Array&&function(t,n){t.__proto__=n}||function(t,n){for(var i in n)Object.prototype.hasOwnProperty.call(n,i)&&(t[i]=n[i])})(n,i)};return function(n,i){if("function"!=typeof i&&null!==i)throw new TypeError("Class extends value "+String(i)+" is not a constructor or null");function r(){this.constructor=n}t(n,i),n.prototype=null===i?Object.create(i):(r.prototype=i.prototype,new r)}}(),DI=function(t){function n(n,i){return t.call(this,"PropertyIsGreaterThan",n,i)||this}return GI(n,t),n}(zI),UI=function(){var t=function(n,i){return(t=Object.setPrototypeOf||{__proto__:[]}instanceof Array&&function(t,n){t.__proto__=n}||function(t,n){for(var i in n)Object.prototype.hasOwnProperty.call(n,i)&&(t[i]=n[i])})(n,i)};return function(n,i){if("function"!=typeof i&&null!==i)throw new TypeError("Class extends value "+String(i)+" is not a constructor or null");function r(){this.constructor=n}t(n,i),n.prototype=null===i?Object.create(i):(r.prototype=i.prototype,new r)}}(),qI=function(t){function n(n,i){return t.call(this,"PropertyIsGreaterThanOrEqualTo",n,i)||this}return UI(n,t),n}(zI),BI=function(){var t=function(n,i){return(t=Object.setPrototypeOf||{__proto__:[]}instanceof Array&&function(t,n){t.__proto__=n}||function(t,n){for(var i in n)Object.prototype.hasOwnProperty.call(n,i)&&(t[i]=n[i])})(n,i)};return function(n,i){if("function"!=typeof i&&null!==i)throw new TypeError("Class extends value "+String(i)+" is not a constructor or null");function r(){this.constructor=n}t(n,i),n.prototype=null===i?Object.create(i):(r.prototype=i.prototype,new r)}}(),WI=function(t){function n(n,i,r){return t.call(this,"Intersects",n,i,r)||this}return BI(n,t),n}(kI),VI=function(){var t=function(n,i){return(t=Object.setPrototypeOf||{__proto__:[]}instanceof Array&&function(t,n){t.__proto__=n}||function(t,n){for(var i in n)Object.prototype.hasOwnProperty.call(n,i)&&(t[i]=n[i])})(n,i)};return function(n,i){if("function"!=typeof i&&null!==i)throw new TypeError("Class extends value "+String(i)+" is not a constructor or null");function r(){this.constructor=n}t(n,i),n.prototype=null===i?Object.create(i):(r.prototype=i.prototype,new r)}}(),XI=function(t){function n(n,i,r){var e=t.call(this,"PropertyIsBetween",n)||this;return e.lowerBoundary=i,e.upperBoundary=r,e}return VI(n,t),n}(RI),HI=function(){var t=function(n,i){return(t=Object.setPrototypeOf||{__proto__:[]}instanceof Array&&function(t,n){t.__proto__=n}||function(t,n){for(var i in n)Object.prototype.hasOwnProperty.call(n,i)&&(t[i]=n[i])})(n,i)};return function(n,i){if("function"!=typeof i&&null!==i)throw new TypeError("Class extends value "+String(i)+" is not a constructor or null");function r(){this.constructor=n}t(n,i),n.prototype=null===i?Object.create(i):(r.prototype=i.prototype,new r)}}(),JI=function(t){function n(n,i,r,e,o,s){var a=t.call(this,"PropertyIsLike",n)||this;return a.pattern=i,a.wildCard=void 0!==r?r:"*",a.singleChar=void 0!==e?e:".",a.escapeChar=void 0!==o?o:"!",a.matchCase=s,a}return HI(n,t),n}(RI),KI=function(){var t=function(n,i){return(t=Object.setPrototypeOf||{__proto__:[]}instanceof Array&&function(t,n){t.__proto__=n}||function(t,n){for(var i in n)Object.prototype.hasOwnProperty.call(n,i)&&(t[i]=n[i])})(n,i)};return function(n,i){if("function"!=typeof i&&null!==i)throw new TypeError("Class extends value "+String(i)+" is not a constructor or null");function r(){this.constructor=n}t(n,i),n.prototype=null===i?Object.create(i):(r.prototype=i.prototype,new r)}}(),YI=function(t){function n(n){return t.call(this,"PropertyIsNull",n)||this}return KI(n,t),n}(RI),ZI=function(){var t=function(n,i){return(t=Object.setPrototypeOf||{__proto__:[]}instanceof Array&&function(t,n){t.__proto__=n}||function(t,n){for(var i in n)Object.prototype.hasOwnProperty.call(n,i)&&(t[i]=n[i])})(n,i)};return function(n,i){if("function"!=typeof i&&null!==i)throw new TypeError("Class extends value "+String(i)+" is not a constructor or null");function r(){this.constructor=n}t(n,i),n.prototype=null===i?Object.create(i):(r.prototype=i.prototype,new r)}}(),$I=function(t){function n(n,i){return t.call(this,"PropertyIsLessThan",n,i)||this}return ZI(n,t),n}(zI),QI=function(){var t=function(n,i){return(t=Object.setPrototypeOf||{__proto__:[]}instanceof Array&&function(t,n){t.__proto__=n}||function(t,n){for(var i in n)Object.prototype.hasOwnProperty.call(n,i)&&(t[i]=n[i])})(n,i)};return function(n,i){if("function"!=typeof i&&null!==i)throw new TypeError("Class extends value "+String(i)+" is not a constructor or null");function r(){this.constructor=n}t(n,i),n.prototype=null===i?Object.create(i):(r.prototype=i.prototype,new r)}}(),tN=function(t){function n(n,i){return t.call(this,"PropertyIsLessThanOrEqualTo",n,i)||this}return QI(n,t),n}(zI),nN=function(){var t=function(n,i){return(t=Object.setPrototypeOf||{__proto__:[]}instanceof Array&&function(t,n){t.__proto__=n}||function(t,n){for(var i in n)Object.prototype.hasOwnProperty.call(n,i)&&(t[i]=n[i])})(n,i)};return function(n,i){if("function"!=typeof i&&null!==i)throw new TypeError("Class extends value "+String(i)+" is not a constructor or null");function r(){this.constructor=n}t(n,i),n.prototype=null===i?Object.create(i):(r.prototype=i.prototype,new r)}}(),iN=function(t){function n(n){var i=t.call(this,"Not")||this;return i.condition=n,i}return nN(n,t),n}(yI),rN=function(){var t=function(n,i){return(t=Object.setPrototypeOf||{__proto__:[]}instanceof Array&&function(t,n){t.__proto__=n}||function(t,n){for(var i in n)Object.prototype.hasOwnProperty.call(n,i)&&(t[i]=n[i])})(n,i)};return function(n,i){if("function"!=typeof i&&null!==i)throw new TypeError("Class extends value "+String(i)+" is not a constructor or null");function r(){this.constructor=n}t(n,i),n.prototype=null===i?Object.create(i):(r.prototype=i.prototype,new r)}}(),eN=function(t){function n(n,i,r){return t.call(this,"PropertyIsNotEqualTo",n,i,r)||this}return rN(n,t),n}(zI),oN=function(){var t=function(n,i){return(t=Object.setPrototypeOf||{__proto__:[]}instanceof Array&&function(t,n){t.__proto__=n}||function(t,n){for(var i in n)Object.prototype.hasOwnProperty.call(n,i)&&(t[i]=n[i])})(n,i)};return function(n,i){if("function"!=typeof i&&null!==i)throw new TypeError("Class extends value "+String(i)+" is not a constructor or null");function r(){this.constructor=n}t(n,i),n.prototype=null===i?Object.create(i):(r.prototype=i.prototype,new r)}}(),sN=function(t){function n(n){return t.call(this,"Or",Array.prototype.slice.call(arguments))||this}return oN(n,t),n}(wI),aN=function(){var t=function(n,i){return(t=Object.setPrototypeOf||{__proto__:[]}instanceof Array&&function(t,n){t.__proto__=n}||function(t,n){for(var i in n)Object.prototype.hasOwnProperty.call(n,i)&&(t[i]=n[i])})(n,i)};return function(n,i){if("function"!=typeof i&&null!==i)throw new TypeError("Class extends value "+String(i)+" is not a constructor or null");function r(){this.constructor=n}t(n,i),n.prototype=null===i?Object.create(i):(r.prototype=i.prototype,new r)}}(),uN=function(t){function n(n){var i=t.call(this,"ResourceId")||this;return i.rid=n,i}return aN(n,t),n}(yI),cN=function(){var t=function(n,i){return(t=Object.setPrototypeOf||{__proto__:[]}instanceof Array&&function(t,n){t.__proto__=n}||function(t,n){for(var i in n)Object.prototype.hasOwnProperty.call(n,i)&&(t[i]=n[i])})(n,i)};return function(n,i){if("function"!=typeof i&&null!==i)throw new TypeError("Class extends value "+String(i)+" is not a constructor or null");function r(){this.constructor=n}t(n,i),n.prototype=null===i?Object.create(i):(r.prototype=i.prototype,new r)}}(),hN=function(t){function n(n,i,r){return t.call(this,"Within",n,i,r)||this}return cN(n,t),n}(kI);function fN(t){var n=[null].concat(Array.prototype.slice.call(arguments));return new(Function.prototype.bind.apply(gI,n))}function lN(t,n,i){return new jI(t,n,i)}var vN=function(){var t=function(n,i){return(t=Object.setPrototypeOf||{__proto__:[]}instanceof Array&&function(t,n){t.__proto__=n}||function(t,n){for(var i in n)Object.prototype.hasOwnProperty.call(n,i)&&(t[i]=n[i])})(n,i)};return function(n,i){if("function"!=typeof i&&null!==i)throw new TypeError("Class extends value "+String(i)+" is not a constructor or null");function r(){this.constructor=n}t(n,i),n.prototype=null===i?Object.create(i):(r.prototype=i.prototype,new r)}}(),dN={"http://www.opengis.net/gml":{boundedBy:Mf(ZE.prototype.readGeometryElement,"bounds")},"http://www.opengis.net/wfs/2.0":{member:jf(ZE.prototype.readFeaturesInternal)}},pN={"http://www.opengis.net/wfs":{totalInserted:Mf(rA),totalUpdated:Mf(rA),totalDeleted:Mf(rA)},"http://www.opengis.net/wfs/2.0":{totalInserted:Mf(rA),totalUpdated:Mf(rA),totalDeleted:Mf(rA)}},yN={"http://www.opengis.net/wfs":{TransactionSummary:Mf(TN,"transactionSummary"),InsertResults:Mf(RN,"insertIds")},"http://www.opengis.net/wfs/2.0":{TransactionSummary:Mf(TN,"transactionSummary"),InsertResults:Mf(RN,"insertIds")}},mN={"http://www.opengis.net/wfs":{PropertyName:_f(fA)},"http://www.opengis.net/wfs/2.0":{PropertyName:_f(fA)}},wN={"http://www.opengis.net/wfs":{Insert:_f(PN),Update:_f(FN),Delete:_f(zN),Property:_f(LN),Native:_f(GN)},"http://www.opengis.net/wfs/2.0":{Insert:_f(PN),Update:_f(FN),Delete:_f(zN),Property:_f(LN),Native:_f(GN)}},bN="feature",gN="http://www.w3.org/2000/xmlns/",xN={"2.0.0":"http://www.opengis.net/ogc/1.1","1.1.0":"http://www.opengis.net/ogc","1.0.0":"http://www.opengis.net/ogc"},jN={"2.0.0":"http://www.opengis.net/wfs/2.0","1.1.0":"http://www.opengis.net/wfs","1.0.0":"http://www.opengis.net/wfs"},SN={"2.0.0":"http://www.opengis.net/fes/2.0","1.1.0":"http://www.opengis.net/fes","1.0.0":"http://www.opengis.net/fes"},kN={"2.0.0":"http://www.opengis.net/wfs/2.0 http://schemas.opengis.net/wfs/2.0/wfs.xsd","1.1.0":"http://www.opengis.net/wfs http://schemas.opengis.net/wfs/1.1.0/wfs.xsd","1.0.0":"http://www.opengis.net/wfs http://schemas.opengis.net/wfs/1.0.0/wfs.xsd"},MN={"2.0.0":kA,"1.1.0":bA,"1.0.0":pA},_N=function(t){function n(n){var i=t.call(this)||this,r=n||{};return i.oh=r.version?r.version:"1.1.0",i.Cy=r.featureType,i.Ry=r.featureNS,i.Py=r.gmlFormat?r.gmlFormat:new MN[i.oh],i.Iy=r.schemaLocation?r.schemaLocation:kN[i.oh],i}return vN(n,t),n.prototype.getFeatureType=function(){return this.Cy},n.prototype.setFeatureType=function(t){this.Cy=t},n.prototype.readFeaturesFromNode=function(t,n){var i={node:t};E(i,{featureType:this.Cy,featureNS:this.Ry}),E(i,this.getReadOptions(t,n||{}));var r=[i],e=Pf([],"2.0.0"===this.oh?dN:this.Py.FEATURE_COLLECTION_PARSERS,t,r,this.Py);return e||(e=[]),e},n.prototype.readTransactionResponse=function(t){if(t){if("string"==typeof t){var n=gf(t);return this.readTransactionResponseFromDocument(n)}return wf(t)?this.readTransactionResponseFromDocument(t):this.readTransactionResponseFromNode(t)}},n.prototype.readFeatureCollectionMetadata=function(t){if(t){if("string"==typeof t){var n=gf(t);return this.readFeatureCollectionMetadataFromDocument(n)}return wf(t)?this.readFeatureCollectionMetadataFromDocument(t):this.readFeatureCollectionMetadataFromNode(t)}},n.prototype.readFeatureCollectionMetadataFromDocument=function(t){for(var n=t.firstChild;n;n=n.nextSibling)if(n.nodeType==Node.ELEMENT_NODE)return this.readFeatureCollectionMetadataFromNode(n)},n.prototype.readFeatureCollectionMetadataFromNode=function(t){var n={},i=eA(t.getAttribute("numberOfFeatures"));return n.numberOfFeatures=i,Pf(n,dN,t,[],this.Py)},n.prototype.readTransactionResponseFromDocument=function(t){for(var n=t.firstChild;n;n=n.nextSibling)if(n.nodeType==Node.ELEMENT_NODE)return this.readTransactionResponseFromNode(n)},n.prototype.readTransactionResponseFromNode=function(t){return Pf({},yN,t,[])},n.prototype.writeGetFeature=function(t){var n=this,i=pf(jN[this.oh],"GetFeature");i.setAttribute("service","WFS"),i.setAttribute("version",this.oh),t.handle&&i.setAttribute("handle",t.handle),t.outputFormat&&i.setAttribute("outputFormat",t.outputFormat),void 0!==t.maxFeatures&&i.setAttribute("maxFeatures",String(t.maxFeatures)),t.resultType&&i.setAttribute("resultType",t.resultType),void 0!==t.startIndex&&i.setAttribute("startIndex",String(t.startIndex)),void 0!==t.count&&i.setAttribute("count",String(t.count)),void 0!==t.viewParams&&i.setAttribute("viewParams",t.viewParams),i.setAttributeNS(df,"xsi:schemaLocation",this.Iy);var r={node:i};if(E(r,{version:this.oh,srsName:t.srsName,featureNS:t.featureNS?t.featureNS:this.Ry,featurePrefix:t.featurePrefix,propertyNames:t.propertyNames?t.propertyNames:[]}),Mt(Array.isArray(t.featureTypes),11),"string"==typeof t.featureTypes[0]){var e=t.filter;t.bbox&&(Mt(t.geometryName,12),e=this.combineBboxAndFilter(t.geometryName,t.bbox,t.srsName,e)),E(r,{geometryName:t.geometryName,filter:e}),rz(i,t.featureTypes,[r])}else t.featureTypes.forEach((function(e){var o=n.combineBboxAndFilter(e.geometryName,e.bbox,t.srsName,t.filter);E(r,{geometryName:e.geometryName,filter:o}),rz(i,[e.name],[r])}));return i},n.prototype.combineBboxAndFilter=function(t,n,i,r){var e=lN(t,n,i);return r?fN(r,e):e},n.prototype.writeTransaction=function(t,n,i,r){var e,o=[],s=r.version?r.version:this.oh,a=pf(jN[s],"Transaction");a.setAttribute("service","WFS"),a.setAttribute("version",s),r&&(e=r.gmlOptions?r.gmlOptions:{},r.handle&&a.setAttribute("handle",r.handle)),a.setAttributeNS(df,"xsi:schemaLocation",kN[s]);var u=function(t,n,i,r){var e,o=r.featurePrefix?r.featurePrefix:bN;"1.0.0"===i?e=2:"1.1.0"===i?e=3:"2.0.0"===i&&(e=3.2);return E({node:t},{version:i,featureNS:r.featureNS,featureType:r.featureType,featurePrefix:o,gmlVersion:e,hasZ:r.hasZ,srsName:r.srsName},n)}(a,e,s,r);return t&&ON("Insert",t,o,u),n&&ON("Update",n,o,u),i&&ON("Delete",i,o,u),r.nativeElements&&ON("Native",r.nativeElements,o,u),a},n.prototype.readProjectionFromDocument=function(t){for(var n=t.firstChild;n;n=n.nextSibling)if(n.nodeType==Node.ELEMENT_NODE)return this.readProjectionFromNode(n);return null},n.prototype.readProjectionFromNode=function(t){if(t.firstElementChild&&t.firstElementChild.firstElementChild)for(var n=(t=t.firstElementChild.firstElementChild).firstElementChild;n;n=n.nextElementSibling)if(0!==n.childNodes.length&&(1!==n.childNodes.length||3!==n.firstChild.nodeType)){var i=[{}];return this.Py.readGeometryElement(n,i),br(i.pop().srsName)}return null},n}(XE);function ON(t,n,i,r){Nf(r,wN,Tf(t),n,i)}function TN(t,n){return Pf({},pN,t,n)}var EN={"http://www.opengis.net/ogc":{FeatureId:jf((function(t,n){return t.getAttribute("fid")}))},"http://www.opengis.net/ogc/1.1":{FeatureId:jf((function(t,n){return t.getAttribute("fid")}))}};function AN(t,n){Rf(EN,t,n)}var CN={"http://www.opengis.net/wfs":{Feature:AN},"http://www.opengis.net/wfs/2.0":{Feature:AN}};function RN(t,n){return Pf([],CN,t,n)}function PN(t,n,i){var r=i[i.length-1],e=r.featureType,o=r.featureNS,s=r.gmlVersion,a=pf(o,e);t.appendChild(a),2===s?pA.prototype.writeFeatureElement(a,n,i):3===s?bA.prototype.writeFeatureElement(a,n,i):kA.prototype.writeFeatureElement(a,n,i)}function IN(t,n,i){var r=i[i.length-1].version,e=xN[r],o=pf(e,"Filter"),s=pf(e,"FeatureId");o.appendChild(s),s.setAttribute("fid",n),t.appendChild(o)}function NN(t,n){var i=(t=t||bN)+":";return 0===n.indexOf(i)?n:i+n}function zN(t,n,i){var r=i[i.length-1];Mt(void 0!==n.getId(),26);var e=r.featureType,o=r.featurePrefix,s=r.featureNS,a=NN(o,e);t.setAttribute("typeName",a),t.setAttributeNS(gN,"xmlns:"+o,s);var u=n.getId();void 0!==u&&IN(t,u,i)}function FN(t,n,i){var r=i[i.length-1];Mt(void 0!==n.getId(),27);var e=r.version,o=r.featureType,s=r.featurePrefix,a=r.featureNS,u=NN(s,o),c=n.getGeometryName();t.setAttribute("typeName",u),t.setAttributeNS(gN,"xmlns:"+s,a);var h=n.getId();if(void 0!==h){for(var f=n.getKeys(),l=[],v=0,d=f.length;v0,i=this.readUint32(n),r=Math.floor((268435455&i)/1e3),e=Boolean(2147483648&i)||1===r||3===r,o=Boolean(1073741824&i)||2===r||3===r,s=Boolean(536870912&i),a=(268435455&i)%1e3,u=["XY",e?"Z":"",o?"M":""].join(""),c=s?this.readUint32(n):null;if(void 0!==t&&t!==a)throw new Error("Unexpected WKB geometry type "+a);if(this.Fy){if(this.Ly!==n)throw new Error("Inconsistent endian");if(this.qy!==u)throw new Error("Inconsistent geometry layout");if(c&&this.Uy!==c)throw new Error("Inconsistent coordinate system (SRID)")}else this.Ly=n,this.Gy=e,this.Dy=o,this.qy=u,this.Uy=c,this.Fy=!0;return a},t.prototype.readWkbPayload=function(t){switch(t){case az:return this.readPoint();case uz:return this.readLineString();case cz:case yz:return this.readPolygon();case hz:return this.readMultiPoint();case fz:return this.readMultiLineString();case lz:case dz:case pz:return this.readMultiPolygon();case vz:return this.readGeometryCollection();default:throw new Error("Unsupported WKB geometry type "+t+" is found")}},t.prototype.readWkbBlock=function(t){return this.readWkbPayload(this.readWkbHeader(t))},t.prototype.readWkbCollection=function(t,n){for(var i=this.readUint32(),r=[],e=0;e=0&&(t+=this.By?2147483648:1e3),this.qy.indexOf("M")>=0&&(t+=this.By?1073741824:2e3),this.By&&Number.isInteger(n)&&(t|=536870912),this.writeUint8(this.Ly?1:0),this.writeUint32(t),this.By&&Number.isInteger(n)&&this.writeUint32(n)},t.prototype.writeMultiPoint=function(t,n){this.writeUint32(t.length);for(var i=0;i="a"&&t<="z"||t>="A"&&t<="Z"},t.prototype.tm=function(t,n){return t>="0"&&t<="9"||"."==t&&!(void 0!==n&&n)},t.prototype.nm=function(t){return" "==t||"\t"==t||"\r"==t||"\n"==t},t.prototype.im=function(){return this.wkt.charAt(++this.$y)},t.prototype.nextToken=function(){var t,n=this.im(),i=this.$y,r=n;if("("==n)t=_z;else if(","==n)t=Ez;else if(")"==n)t=Oz;else if(this.tm(n)||"-"==n)t=Tz,r=this.rm();else if(this.Qy(n))t=Mz,r=this.om();else{if(this.nm(n))return this.nextToken();if(""!==n)throw new Error("Unexpected character: "+n);t=Az}return{position:i,value:r,type:t}},t.prototype.rm=function(){var t,n=this.$y,i=!1,r=!1;do{"."==t?i=!0:"e"!=t&&"E"!=t||(r=!0),t=this.im()}while(this.tm(t,i)||!r&&("e"==t||"E"==t)||r&&("-"==t||"+"==t));return parseFloat(this.wkt.substring(n,this.$y--))},t.prototype.om=function(){var t,n=this.$y;do{t=this.im()}while(this.Qy(t));return this.wkt.substring(n,this.$y--).toUpperCase()},t}(),Iz=function(){function t(t){this.sm=t,this.am={position:0,type:kz},this.qy=Et}return t.prototype.um=function(){this.am=this.sm.nextToken()},t.prototype.isTokenType=function(t){return this.am.type==t},t.prototype.match=function(t){var n=this.isTokenType(t);return n&&this.um(),n},t.prototype.parse=function(){return this.um(),this.hm()},t.prototype.fm=function(){var t=Et,n=this.am;if(this.isTokenType(Mz)){var i=n.value;"Z"===i?t=At:"M"===i?t=Ct:"ZM"===i&&(t=Rt),t!==Et&&this.um()}return t},t.prototype.lm=function(){if(this.match(_z)){var t=[];do{t.push(this.hm())}while(this.match(Ez));if(this.match(Oz))return t}throw new Error(this.vm())},t.prototype.dm=function(){if(this.match(_z)){var t=this.pm();if(this.match(Oz))return t}throw new Error(this.vm())},t.prototype.ym=function(){if(this.match(_z)){var t=this.wm();if(this.match(Oz))return t}throw new Error(this.vm())},t.prototype.bm=function(){if(this.match(_z)){var t=this.gm();if(this.match(Oz))return t}throw new Error(this.vm())},t.prototype.xm=function(){if(this.match(_z)){var t=void 0;if(t=this.am.type==_z?this.jm():this.wm(),this.match(Oz))return t}throw new Error(this.vm())},t.prototype.Sm=function(){if(this.match(_z)){var t=this.gm();if(this.match(Oz))return t}throw new Error(this.vm())},t.prototype.km=function(){if(this.match(_z)){var t=this.Mm();if(this.match(Oz))return t}throw new Error(this.vm())},t.prototype.pm=function(){for(var t=[],n=this.qy.length,i=0;i0&&(n+=" "+r)}return 0===i.length?n+" "+Sz:n+"("+i+")"}var Uz=Nz,qz=function(){var t=function(n,i){return(t=Object.setPrototypeOf||{__proto__:[]}instanceof Array&&function(t,n){t.__proto__=n}||function(t,n){for(var i in n)Object.prototype.hasOwnProperty.call(n,i)&&(t[i]=n[i])})(n,i)};return function(n,i){if("function"!=typeof i&&null!==i)throw new TypeError("Class extends value "+String(i)+" is not a constructor or null");function r(){this.constructor=n}t(n,i),n.prototype=null===i?Object.create(i):(r.prototype=i.prototype,new r)}}(),Bz=[null,"http://www.opengis.net/wms"],Wz=Cf(Bz,{Service:Mf((function(t,n){return Pf({},Hz,t,n)})),Capability:Mf((function(t,n){return Pf({},Vz,t,n)}))}),Vz=Cf(Bz,{Request:Mf((function(t,n){return Pf({},nF,t,n)})),Exception:Mf((function(t,n){return Pf([],Zz,t,n)})),Layer:Mf((function(t,n){var i=Pf({},$z,t,n);if(void 0===i.Layer)return Object.assign(i,uF(t,n));return i}))}),Xz=function(t){function n(){var n=t.call(this)||this;return n.version=void 0,n}return qz(n,t),n.prototype.readFromNode=function(t){this.version=t.getAttribute("version").trim();var n=Pf({version:this.version},Wz,t,[]);return n||null},n}(AP),Hz=Cf(Bz,{Name:Mf(oA),Title:Mf(oA),Abstract:Mf(oA),KeywordList:Mf(lF),OnlineResource:Mf(CP),ContactInformation:Mf((function(t,n){return Pf({},Jz,t,n)})),Fees:Mf(oA),AccessConstraints:Mf(oA),LayerLimit:Mf(rA),MaxWidth:Mf(rA),MaxHeight:Mf(rA)}),Jz=Cf(Bz,{ContactPersonPrimary:Mf((function(t,n){return Pf({},Kz,t,n)})),ContactPosition:Mf(oA),ContactAddress:Mf((function(t,n){return Pf({},Yz,t,n)})),ContactVoiceTelephone:Mf(oA),ContactFacsimileTelephone:Mf(oA),ContactElectronicMailAddress:Mf(oA)}),Kz=Cf(Bz,{ContactPerson:Mf(oA),ContactOrganization:Mf(oA)}),Yz=Cf(Bz,{AddressType:Mf(oA),Address:Mf(oA),City:Mf(oA),StateOrProvince:Mf(oA),PostCode:Mf(oA),Country:Mf(oA)}),Zz=Cf(Bz,{Format:jf(oA)}),$z=Cf(Bz,{Name:Mf(oA),Title:Mf(oA),Abstract:Mf(oA),KeywordList:Mf(lF),CRS:kf(oA),EX_GeographicBoundingBox:Mf((function(t,n){var i=Pf({},tF,t,n);if(!i)return;var r=i.westBoundLongitude,e=i.southBoundLatitude,o=i.eastBoundLongitude,s=i.northBoundLatitude;if(void 0===r||void 0===e||void 0===o||void 0===s)return;return[r,e,o,s]})),BoundingBox:kf((function(t,n){var i=[iA(t.getAttribute("minx")),iA(t.getAttribute("miny")),iA(t.getAttribute("maxx")),iA(t.getAttribute("maxy"))],r=[iA(t.getAttribute("resx")),iA(t.getAttribute("resy"))];return{crs:t.getAttribute("CRS"),extent:i,res:r}})),Dimension:kf((function(t,n){return{name:t.getAttribute("name"),units:t.getAttribute("units"),unitSymbol:t.getAttribute("unitSymbol"),default:t.getAttribute("default"),multipleValues:QE(t.getAttribute("multipleValues")),nearestValue:QE(t.getAttribute("nearestValue")),current:QE(t.getAttribute("current")),values:oA(t)}})),Attribution:Mf((function(t,n){return Pf({},Qz,t,n)})),AuthorityURL:kf((function(t,n){var i=cF(t,n);if(i)return i.name=t.getAttribute("name"),i;return})),Identifier:kf(oA),MetadataURL:kf((function(t,n){var i=cF(t,n);if(i)return i.type=t.getAttribute("type"),i;return})),DataURL:kf(cF),FeatureListURL:kf(cF),Style:kf((function(t,n){return Pf({},oF,t,n)})),MinScaleDenominator:Mf(nA),MaxScaleDenominator:Mf(nA),Layer:kf(uF)}),Qz=Cf(Bz,{Title:Mf(oA),OnlineResource:Mf(CP),LogoURL:Mf(fF)}),tF=Cf(Bz,{westBoundLongitude:Mf(nA),eastBoundLongitude:Mf(nA),southBoundLatitude:Mf(nA),northBoundLatitude:Mf(nA)}),nF=Cf(Bz,{GetCapabilities:Mf(hF),GetMap:Mf(hF),GetFeatureInfo:Mf(hF)}),iF=Cf(Bz,{Format:kf(oA),DCPType:kf((function(t,n){return Pf({},rF,t,n)}))}),rF=Cf(Bz,{HTTP:Mf((function(t,n){return Pf({},eF,t,n)}))}),eF=Cf(Bz,{Get:Mf(cF),Post:Mf(cF)}),oF=Cf(Bz,{Name:Mf(oA),Title:Mf(oA),Abstract:Mf(oA),LegendURL:kf(fF),StyleSheetURL:Mf(cF),StyleURL:Mf(cF)}),sF=Cf(Bz,{Format:Mf(oA),OnlineResource:Mf(CP)}),aF=Cf(Bz,{Keyword:jf(oA)});function uF(t,n){var i=n[n.length-1],r=Pf({},$z,t,n);if(r){var e=QE(t.getAttribute("queryable"));void 0===e&&(e=i.queryable),r.queryable=void 0!==e&&e;var o=eA(t.getAttribute("cascaded"));void 0===o&&(o=i.cascaded),r.cascaded=o;var s=QE(t.getAttribute("opaque"));void 0===s&&(s=i.opaque),r.opaque=void 0!==s&&s;var a=QE(t.getAttribute("noSubsets"));void 0===a&&(a=i.noSubsets),r.noSubsets=void 0!==a&&a;var u=iA(t.getAttribute("fixedWidth"));u||(u=i.fixedWidth),r.fixedWidth=u;var c=iA(t.getAttribute("fixedHeight"));c||(c=i.fixedHeight),r.fixedHeight=c;["Style","CRS","AuthorityURL"].forEach((function(t){if(t in i){var n=r[t]||[];r[t]=n.concat(i[t])}}));return["EX_GeographicBoundingBox","BoundingBox","Dimension","Attribution","MinScaleDenominator","MaxScaleDenominator"].forEach((function(t){if(!(t in r)){var n=i[t];r[t]=n}})),r}}function cF(t,n){return Pf({},sF,t,n)}function hF(t,n){return Pf({},iF,t,n)}function fF(t,n){var i=cF(t,n);if(i){var r=[eA(t.getAttribute("width")),eA(t.getAttribute("height"))];return i.size=r,i}}function lF(t,n){return Pf([],aF,t,n)}var vF=Xz,dF=function(){var t=function(n,i){return(t=Object.setPrototypeOf||{__proto__:[]}instanceof Array&&function(t,n){t.__proto__=n}||function(t,n){for(var i in n)Object.prototype.hasOwnProperty.call(n,i)&&(t[i]=n[i])})(n,i)};return function(n,i){if("function"!=typeof i&&null!==i)throw new TypeError("Class extends value "+String(i)+" is not a constructor or null");function r(){this.constructor=n}t(n,i),n.prototype=null===i?Object.create(i):(r.prototype=i.prototype,new r)}}(),pF=function(t){function n(n){var i=t.call(this)||this,r=n||{};return i.Ry="http://mapserver.gis.umn.edu/mapserver",i.Py=new pA,i.Uc=r.layers?r.layers:null,i}return dF(n,t),n.prototype.getLayers=function(){return this.Uc},n.prototype.setLayers=function(t){this.Uc=t},n.prototype.Em=function(t,n){t.setAttribute("namespaceURI",this.Ry);var i=t.localName,r=[];if(0===t.childNodes.length)return r;if("msGMLOutput"==i)for(var e=0,o=t.childNodes.length;eh*HF||c>f*HF?this.ew():_n(o,r)||this.aw()}}},n.prototype.ew=function(){var t=this.getMap(),n=this.Qm,i=t.getSize(),r=t.getView().calculateExtentInternal(i),e=n.getView(),o=Math.log(7.5)/Math.LN2;ri(r,1/(Math.pow(2,o/2)*JF)),e.fitInternal(Ze(r))},n.prototype.aw=function(){var t=this.getMap(),n=this.Qm,i=t.getView();n.getView().setCenterInternal(i.getCenterInternal())},n.prototype.uw=function(){var t=this.getMap(),n=this.Qm;if(t.isRendered()&&n.isRendered()){var i=t.getSize(),r=t.getView(),e=n.getView(),o=this.ua?0:-r.getRotation(),s=this.tw,a=this.tw.getElement(),u=r.getCenterInternal(),c=r.getResolution(),h=e.getResolution(),f=i[0]*c/h,l=i[1]*c/h;if(s.setPosition(u),a){a.style.width=f+"px",a.style.height=l+"px";var v="rotate("+o+"rad)";a.style.transform=v}}},n.prototype.ow=function(){this.cw||(this.cw=Z(this.Qm,xa,(function(t){delete this.cw,this.uw()}),this))},n.prototype.Cr=function(t){t.preventDefault(),this.Nr()},n.prototype.Nr=function(){this.element.classList.toggle(As),this.Sr?Eo(this.Tr,this.Er):Eo(this.Er,this.Tr),this.Sr=!this.Sr;var t=this.Qm;if(!this.Sr){if(t.isRendered())return this.Zm=void 0,void t.render();t.updateSize(),this.ew(),this.ow()}},n.prototype.getCollapsible=function(){return this._r},n.prototype.setCollapsible=function(t){this._r!==t&&(this._r=t,this.element.classList.toggle("ol-uncollapsible"),!t&&this.Sr&&this.Nr())},n.prototype.setCollapsed=function(t){this._r&&this.Sr!==t&&this.Nr()},n.prototype.getCollapsed=function(){return this.Sr},n.prototype.getRotateWithView=function(){return this.ua},n.prototype.setRotateWithView=function(t){this.ua!==t&&(this.ua=t,0!==this.getMap().getView().getRotation()&&(this.ua?this.Ym():this.Qm.getView().setRotation(0),this.Zm=void 0,this.sw(),this.uw()))},n.prototype.getOverviewMap=function(){return this.Qm},n.prototype.render=function(t){this.sw(),this.uw()},n}(fu),ZF=function(){var t=function(n,i){return(t=Object.setPrototypeOf||{__proto__:[]}instanceof Array&&function(t,n){t.__proto__=n}||function(t,n){for(var i in n)Object.prototype.hasOwnProperty.call(n,i)&&(t[i]=n[i])})(n,i)};return function(n,i){if("function"!=typeof i&&null!==i)throw new TypeError("Class extends value "+String(i)+" is not a constructor or null");function r(){this.constructor=n}t(n,i),n.prototype=null===i?Object.create(i):(r.prototype=i.prototype,new r)}}(),$F="units",QF="degrees",tL="imperial",nL="nautical",iL="metric",rL="us",eL=[1,2,5],oL=25.4/.28,sL=function(t){function n(n){var i=this,r=n||{},e=void 0!==r.className?r.className:r.bar?"ol-scale-bar":"ol-scale-line";return(i=t.call(this,{element:document.createElement("div"),render:r.render,target:r.target})||this).on,i.once,i.un,i.hw=document.createElement("div"),i.hw.className=e+"-inner",i.element.className=e+" "+Os,i.element.appendChild(i.hw),i.fw=null,i.lw=void 0!==r.minWidth?r.minWidth:64,i.mn=!1,i.dw=void 0,i.Xm="",i.addChangeListener($F,i.pw),i.setUnits(r.units||iL),i.yw=r.bar||!1,i.mw=r.steps||4,i.ww=r.text||!1,i.bw=r.dpi||void 0,i}return ZF(n,t),n.prototype.getUnits=function(){return this.get($F)},n.prototype.pw=function(){this.Ir()},n.prototype.setUnits=function(t){this.set($F,t)},n.prototype.setDpi=function(t){this.bw=t},n.prototype.Ir=function(){var t=this.fw;if(t){var n=t.center,i=t.projection,r=this.getUnits(),e=r==QF?Gt.DEGREES:Gt.METERS,o=gr(i,t.resolution,n,e),s=this.lw*(this.bw||oL)/oL,a=s*o,u="";if(r==QF){var c=Ft[Gt.DEGREES];(a*=c)=s)break;++d}v=this.yw?this.createScaleBar(f,h,u):h.toFixed(l<0?-l:0)+" "+u,this.Xm!=v&&(this.hw.innerHTML=v,this.Xm=v),this.dw!=f&&(this.hw.style.width=f+"px",this.dw=f),this.mn||(this.element.style.display="",this.mn=!0)}else this.mn&&(this.element.style.display="none",this.mn=!1)},n.prototype.createScaleBar=function(t,n,i){for(var r="1 : "+Math.round(this.getScaleForResolution()).toLocaleString(),e=[],o=t/this.mw,s="#ffffff",a=0;a
'+this.createMarker("relative",a)+(a%2==0||2===this.mw?this.createStepText(a,t,!1,n,i):"")+""),a===this.mw-1&&e.push(this.createStepText(a+1,t,!0,n,i)),s="#ffffff"===s?"#000000":"#ffffff";return'
'+(this.ww?'
'+r+"
":"")+e.join("")+"
"},n.prototype.createMarker=function(t,n){return'
'},n.prototype.createStepText=function(t,n,i,r,e){var o=(0===t?0:Math.round(r/this.mw*t*100)/100)+(0===t?"":" "+e);return'
'+o+"
"},n.prototype.getScaleForResolution=function(){var t=gr(this.fw.projection,this.fw.resolution,this.fw.center,Gt.METERS),n=this.bw||oL;return parseFloat(t.toString())*(1e3/25.4)*n},n.prototype.render=function(t){var n=t.frameState;this.fw=n?n.viewState:null,this.Ir()},n}(fu),aL=function(){var t=function(n,i){return(t=Object.setPrototypeOf||{__proto__:[]}instanceof Array&&function(t,n){t.__proto__=n}||function(t,n){for(var i in n)Object.prototype.hasOwnProperty.call(n,i)&&(t[i]=n[i])})(n,i)};return function(n,i){if("function"!=typeof i&&null!==i)throw new TypeError("Class extends value "+String(i)+" is not a constructor or null");function r(){this.constructor=n}t(n,i),n.prototype=null===i?Object.create(i):(r.prototype=i.prototype,new r)}}(),uL=0,cL=1,hL=function(t){function n(n){var i=this,r=n||{};(i=t.call(this,{element:document.createElement("div"),render:r.render})||this).Rn=[],i.gw=void 0,i.xw=uL,i.Cn,i.jw=0,i.Sw=0,i.kw,i.Mw,i._w=null,i.Ow=!1,i.Fr=void 0!==r.duration?r.duration:200;var e=void 0!==r.className?r.className:"ol-zoomslider",o=document.createElement("button");o.setAttribute("type","button"),o.className=e+"-thumb "+Os;var s=i.element;return s.className=e+" "+"ol-unselectable "+Es,s.appendChild(o),s.addEventListener(ya,i.Tw.bind(i),!1),s.addEventListener(pa,i.Ew.bind(i),!1),s.addEventListener(ma,i.Aw.bind(i),!1),s.addEventListener(G,i.Cw.bind(i),!1),o.addEventListener(G,h,!1),i}return aL(n,t),n.prototype.setMap=function(n){t.prototype.setMap.call(this,n),n&&n.render()},n.prototype.Rw=function(){var t=this.element,n=t.offsetWidth,i=t.offsetHeight;if(0===n&&0===i)return this.Ow=!1;var r=getComputedStyle(t);n-=parseFloat(r.paddingRight)+parseFloat(r.paddingLeft),i-=parseFloat(r.paddingTop)+parseFloat(r.paddingBottom);var e=t.firstElementChild,o=getComputedStyle(e),s=e.offsetWidth+parseFloat(o.marginRight)+parseFloat(o.marginLeft),a=e.offsetHeight+parseFloat(o.marginTop)+parseFloat(o.marginBottom);return this._w=[s,a],n>i?(this.xw=cL,this.Sw=n-s):(this.xw=uL,this.jw=i-a),this.Ow=!0},n.prototype.Cw=function(t){var n=this.getMap().getView(),i=this.Pw(t.offsetX-this._w[0]/2,t.offsetY-this._w[1]/2),r=this.Iw(i),e=n.getConstrainedZoom(n.getZoomForResolution(r));n.animateInternal({zoom:e,duration:this.Fr,easing:wt})},n.prototype.Tw=function(t){if(!this.Cn&&t.target===this.element.firstElementChild){var n=this.element.firstElementChild;if(this.getMap().getView().beginInteraction(),this.kw=t.clientX-parseFloat(n.style.left),this.Mw=t.clientY-parseFloat(n.style.top),this.Cn=!0,0===this.Rn.length){var i=this.Ew,r=this.Aw,e=this.getMap().getOwnerDocument();this.Rn.push(Y(e,pa,i,this),Y(e,ma,r,this))}}},n.prototype.Ew=function(t){if(this.Cn){var n=t.clientX-this.kw,i=t.clientY-this.Mw,r=this.Pw(n,i);this.gw=this.Iw(r),this.getMap().getView().setResolution(this.gw)}},n.prototype.Aw=function(t){this.Cn&&(this.getMap().getView().endInteraction(),this.Cn=!1,this.kw=void 0,this.Mw=void 0,this.Rn.forEach($),this.Rn.length=0)},n.prototype.Nw=function(t){var n=this.zw(t),i=this.element.firstElementChild;this.xw==cL?i.style.left=this.Sw*n+"px":i.style.top=this.jw*n+"px"},n.prototype.Pw=function(t,n){return ui(this.xw===cL?t/this.Sw:n/this.jw,0,1)},n.prototype.Iw=function(t){return this.getMap().getView().getResolutionForValueFunction()(1-t)},n.prototype.zw=function(t){return ui(1-this.getMap().getView().getValueForResolutionFunction()(t),0,1)},n.prototype.render=function(t){if(t.frameState&&(this.Ow||this.Rw())){var n=t.frameState.viewState.resolution;this.gw=n,this.Nw(n)}},n}(fu),fL=function(){var t=function(n,i){return(t=Object.setPrototypeOf||{__proto__:[]}instanceof Array&&function(t,n){t.__proto__=n}||function(t,n){for(var i in n)Object.prototype.hasOwnProperty.call(n,i)&&(t[i]=n[i])})(n,i)};return function(n,i){if("function"!=typeof i&&null!==i)throw new TypeError("Class extends value "+String(i)+" is not a constructor or null");function r(){this.constructor=n}t(n,i),n.prototype=null===i?Object.create(i):(r.prototype=i.prototype,new r)}}(),lL=function(t){function n(n){var i=this,r=n||{};(i=t.call(this,{element:document.createElement("div"),target:r.target})||this).extent=r.extent?r.extent:null;var e=void 0!==r.className?r.className:"ol-zoom-extent",o=void 0!==r.label?r.label:"E",s=void 0!==r.tipLabel?r.tipLabel:"Fit to extent",a=document.createElement("button");a.setAttribute("type","button"),a.title=s,a.appendChild("string"==typeof o?document.createTextNode(o):o),a.addEventListener(G,i.Cr.bind(i),!1);var u=e+" "+"ol-unselectable "+Es,c=i.element;return c.className=u,c.appendChild(a),i}return fL(n,t),n.prototype.Cr=function(t){t.preventDefault(),this.handleZoomToExtent()},n.prototype.handleZoomToExtent=function(){var t=this.getMap().getView(),n=this.extent?this.extent:t.getProjection().getExtent();t.fitInternal(Ze(n))},n}(fu),vL={};vL.AssertionError=c,vL.Collection=ft,vL.Collection.CollectionEvent=ht,vL.DataTile=kt,vL.Disposable=v,vL.Feature=Tt,vL.Feature.createStyleFunction=Ot,vL.Geolocation=lo,vL.Image=So,vL.Image.listenImage=jo,vL.ImageBase=po,vL.ImageCanvas=Mo,vL.ImageTile=Io,vL.Kinetic=No,vL.Map=jc,vL.MapBrowserEvent=va,vL.MapBrowserEventHandler=ga,vL.MapEvent=fa,vL.Object=ot,vL.Object.ObjectEvent=et,vL.Observable=it,vL.Observable.unByKey=nt,vL.Overlay=Gc,vL.PluggableMap=cu,vL.Tile=jt,vL.TileCache=Kc,vL.TileQueue=Ca,vL.TileQueue.getTilePriority=Ra,vL.TileRange=$c,vL.TileRange.createOrUpdate=Zc,vL.VectorRenderTile=nh,vL.VectorTile=rh,vL.View=nu,vL.View.createCenterConstraint=Ya,vL.View.createResolutionConstraint=Za,vL.View.createRotationConstraint=$a,vL.View.isNoopAnimation=Qa,vL.array={},vL.array.binarySearch=d,vL.array.equals=x,vL.array.extend=b,vL.array.find=g,vL.array.findIndex=j,vL.array.includes=y,vL.array.isSorted=S,vL.array.linearFindNearest=m,vL.array.numberSafeCompareFunction=p,vL.array.remove=function(t,n){var i=t.indexOf(n),r=i>-1;return r&&t.splice(i,1),r},vL.array.reverseSubArray=w,vL.array.stableSort=function(t,n){var i,r=t.length,e=Array(t.length);for(i=0;i3&&!!xe(t,n,i,r)},vL.geom.flat.transform={},vL.geom.flat.transform.rotate=Wr,vL.geom.flat.transform.scale=Vr,vL.geom.flat.transform.transform2D=Br,vL.geom.flat.transform.translate=Xr,vL.has={},vL.has.DEVICE_PIXEL_RATIO=Vt,vL.has.FIREFOX=Ut,vL.has.IMAGE_DECODE=Ht,vL.has.MAC=Wt,vL.has.PASSIVE_EVENT_LISTENERS=Jt,vL.has.SAFARI=qt,vL.has.WEBKIT=Bt,vL.has.WORKER_OFFSCREEN_CANVAS=Xt,vL.interaction={},vL.interaction.DoubleClickZoom=Mu,vL.interaction.DragAndDrop=UT,vL.interaction.DragAndDrop.DragAndDropEvent=DT,vL.interaction.DragBox=nc,vL.interaction.DragBox.DragBoxEvent=tc,vL.interaction.DragPan=Wu,vL.interaction.DragRotate=Xu,vL.interaction.DragRotateAndZoom=BT,vL.interaction.DragZoom=rc,vL.interaction.Draw=iE,vL.interaction.Draw.DrawEvent=nE,vL.interaction.Draw.createBox=function(){return function(t,n,i){var r=xn([t[0],t[t.length-1]].map((function(t){return zr(t,i)}))),e=[[Wn(r),Vn(r),$n(r),Zn(r),Wn(r)]],o=n;o?o.setCoordinates(e):o=new Ke(e);var s=Ir();return s&&o.transform(i,s),o}},vL.interaction.Draw.createRegularPolygon=function(t,n){return function(i,r,e){var o=zr(i[0],e),s=zr(i[i.length-1],e),a=Math.sqrt(ir(o,s)),u=r||$e(new XT(o),t),c=n;if(!n&&0!==n){var h=s[0]-o[0],f=s[1]-o[1];c=Math.atan2(f,h)}Qe(u,o,a,c);var l=Ir();return l&&u.transform(e,l),u}},vL.interaction.Extent=cE,vL.interaction.Extent.ExtentEvent=oE,vL.interaction.Interaction=Su,vL.interaction.Interaction.pan=xu,vL.interaction.Interaction.zoomByDelta=ju,vL.interaction.KeyboardPan=cc,vL.interaction.KeyboardZoom=fc,vL.interaction.Modify=gE,vL.interaction.Modify.ModifyEvent=yE,vL.interaction.MouseWheelZoom=pc,vL.interaction.PinchRotate=mc,vL.interaction.PinchZoom=bc,vL.interaction.Pointer=Tu,vL.interaction.Pointer.centroid=Ou,vL.interaction.Select=ME,vL.interaction.Select.SelectEvent=SE,vL.interaction.Snap=EE,vL.interaction.Translate=NE,vL.interaction.Translate.TranslateEvent=IE,vL.interaction.defaults=gc,vL.layer={},vL.layer.Base=as,vL.layer.BaseImage=dg,vL.layer.BaseTile=_g,vL.layer.BaseVector=px,vL.layer.Graticule=Gj,vL.layer.Group=ca,vL.layer.Group.GroupEvent=aa,vL.layer.Heatmap=Vj,vL.layer.Image=jg,vL.layer.Layer=bs,vL.layer.Layer.inView=ws,vL.layer.MapboxVector=ET,vL.layer.MapboxVector.getMapboxPath=jT,vL.layer.MapboxVector.normalizeGlyphsUrl=kT,vL.layer.MapboxVector.normalizeSourceUrl=_T,vL.layer.MapboxVector.normalizeSpriteUrl=ST,vL.layer.MapboxVector.normalizeStyleUrl=MT,vL.layer.Tile=Ag,vL.layer.Vector=Rj,vL.layer.VectorImage=CT,vL.layer.VectorTile=rS,vL.layer.WebGLPoints=PT,vL.layer.WebGLTile=FT,vL.loadingstrategy={},vL.loadingstrategy.all=lh,vL.loadingstrategy.bbox=function(t,n){return[t]},vL.loadingstrategy.tile=function(t){return function(n,i,r){var e=t.getZForResolution(Dr(i,r)),o=t.getTileRangeForExtentAndZ(Lr(n,r),e),s=[],a=[e,0,0];for(a[1]=o.minX;a[1]<=o.maxX;++a[1])for(a[2]=o.minY;a[2]<=o.maxY;++a[2])s.push(Fr(t.getTileCoordExtent(a),r));return s}},vL.math={},vL.math.ceil=xi,vL.math.clamp=ui,vL.math.cosh=ci,vL.math.floor=gi,vL.math.lerp=mi,vL.math.log2=hi,vL.math.modulo=yi,vL.math.round=bi,vL.math.solveLinearSystem=vi,vL.math.squaredDistance=li,vL.math.squaredSegmentDistance=fi,vL.math.toDegrees=di,vL.math.toFixed=wi,vL.math.toRadians=pi,vL.net={},vL.net.ClientError=mh,vL.net.ResponseError=yh,vL.net.getJSON=wh,vL.net.jsonp=dh,vL.net.overrideXHR=function(t){"undefined"!=typeof XMLHttpRequest&&(ph=XMLHttpRequest),global.XMLHttpRequest=t},vL.net.resolveUrl=bh,vL.net.restoreXHR=function(){global.XMLHttpRequest=ph},vL.obj={},vL.obj.assign=E,vL.obj.clear=A,vL.obj.getValues=C,vL.obj.isEmpty=R,vL.proj={},vL.proj.Projection=ai,vL.proj.Units={},vL.proj.Units.METERS_PER_UNIT=Ft,vL.proj.Units.fromCode=zt,vL.proj.addCommon=qr,vL.proj.addCoordinateTransforms=Mr,vL.proj.addEquivalentProjections=xr,vL.proj.addEquivalentTransforms=jr,vL.proj.addProjection=mr,vL.proj.addProjections=wr,vL.proj.clearAllProjections=function(){Gi(),Bi()},vL.proj.clearUserProjection=function(){Rr=null},vL.proj.cloneTransform=pr,vL.proj.createProjection=Sr,vL.proj.createSafeCoordinateTransform=Ur,vL.proj.createTransformFromCoordinateTransform=kr,vL.proj.disableCoordinateWarning=dr,vL.proj.epsg3857={},vL.proj.epsg3857.EXTENT=Mi,vL.proj.epsg3857.HALF_SIZE=ki,vL.proj.epsg3857.MAX_SAFE_Y=Oi,vL.proj.epsg3857.PROJECTIONS=Ei,vL.proj.epsg3857.RADIUS=Si,vL.proj.epsg3857.WORLD_EXTENT=_i,vL.proj.epsg3857.fromEPSG4326=Ai,vL.proj.epsg3857.toEPSG4326=Ci,vL.proj.epsg4326={},vL.proj.epsg4326.EXTENT=Ii,vL.proj.epsg4326.METERS_PER_UNIT=Ni,vL.proj.epsg4326.PROJECTIONS=Fi,vL.proj.epsg4326.RADIUS=Pi,vL.proj.equivalent=Or,vL.proj.fromLonLat=_r,vL.proj.fromUserCoordinate=zr,vL.proj.fromUserExtent=Lr,vL.proj.fromUserResolution=Dr,vL.proj.get=br,vL.proj.getPointResolution=gr,vL.proj.getTransform=Er,vL.proj.getTransformFromProjections=Tr,vL.proj.getUserProjection=Ir,vL.proj.identityTransform=yr,vL.proj.proj4={},vL.proj.proj4.register=function(t){var n,i,r=Object.keys(t.defs),e=r.length;for(n=0;n180)&&(i[0]=yi(r+180,360)-180),i},vL.proj.toUserCoordinate=Nr,vL.proj.toUserExtent=Fr,vL.proj.toUserResolution=Gr,vL.proj.transform=Ar,vL.proj.transformExtent=Cr,vL.proj.transformWithProjections=function(t,n,i){return Tr(n,i)(t)},vL.proj.transforms={},vL.proj.transforms.add=Wi,vL.proj.transforms.clear=Bi,vL.proj.transforms.get=Vi,vL.proj.transforms.remove=function(t,n){var i=t.getCode(),r=n.getCode(),e=qi[i][r];return delete qi[i][r],R(qi[i])&&delete qi[i],e},vL.proj.useGeographic=function(){Pr("EPSG:4326")},vL.render={},vL.render.Box=Ju,vL.render.Event=ks,vL.render.Feature=Aj,vL.render.Feature.toFeature=function(t,n){var i=t.getId(),r=Ej(t),e=t.getProperties(),o=new Tt;return void 0!==n&&o.setGeometryName(n),o.setGeometry(r),void 0!==i&&o.setId(i),o.setProperties(e,!0),o},vL.render.Feature.toGeometry=Ej,vL.render.VectorContext=gh,vL.render.canvas={},vL.render.canvas.Builder=Mx,vL.render.canvas.BuilderGroup=Fx,vL.render.canvas.Executor=Kx,vL.render.canvas.ExecutorGroup=tj,vL.render.canvas.ExecutorGroup.getPixelIndexArray=Qx,vL.render.canvas.ImageBuilder=Ox,vL.render.canvas.Immediate=jh,vL.render.canvas.Instruction={},vL.render.canvas.Instruction.beginPathInstruction=xx,vL.render.canvas.Instruction.closePathInstruction=jx,vL.render.canvas.Instruction.fillInstruction=bx,vL.render.canvas.Instruction.strokeInstruction=gx,vL.render.canvas.LineStringBuilder=Ex,vL.render.canvas.PolygonBuilder=Cx,vL.render.canvas.TextBuilder=Nx,vL.render.canvas.checkedFonts=Vs,vL.render.canvas.defaultFillStyle=zs,vL.render.canvas.defaultFont=Ns,vL.render.canvas.defaultLineCap=Fs,vL.render.canvas.defaultLineDash=Ls,vL.render.canvas.defaultLineDashOffset=0,vL.render.canvas.defaultLineJoin=Gs,vL.render.canvas.defaultLineWidth=1,vL.render.canvas.defaultMiterLimit=Ds,vL.render.canvas.defaultPadding=Ws,vL.render.canvas.defaultStrokeStyle=Us,vL.render.canvas.defaultTextAlign=qs,vL.render.canvas.defaultTextBaseline=Bs,vL.render.canvas.drawImageOrLabel=ra,vL.render.canvas.getTextDimensions=ia,vL.render.canvas.hitdetect={},vL.render.canvas.hitdetect.HIT_DETECT_RESOLUTION=nj,vL.render.canvas.hitdetect.createHitDetectionImageData=ij,vL.render.canvas.hitdetect.hitDetect=rj,vL.render.canvas.labelCache=Xs,vL.render.canvas.measureAndCacheTextWidth=na,vL.render.canvas.measureTextHeight=$s,vL.render.canvas.measureTextWidth=ta,vL.render.canvas.registerFont=Zs,vL.render.canvas.rotateAtOffset=function(t,n,i,r){0!==n&&(t.translate(i,r),t.rotate(n),t.translate(-i,-r))},vL.render.canvas.textHeights=Ys,vL.render.getRenderPixel=function(t,n){return nn(t.inversePixelTransform,n.slice(0))},vL.render.getVectorContext=Nh,vL.render.toContext=function(t,n){var i=t.canvas,r=n||{},e=r.pixelRatio||Vt,o=r.size;o&&(i.width=o[0]*e,i.height=o[1]*e,i.style.width=o[0]+"px",i.style.height=o[1]+"px");var s=[0,0,i.width,i.height],a=en([1,0,0,1,0,0],e,e);return new jh(t,e,s,a,0)},vL.renderer={},vL.renderer.Composite=oa,vL.renderer.Layer=xl,vL.renderer.Map=js,vL.renderer.canvas={},vL.renderer.canvas.ImageLayer=gg,vL.renderer.canvas.Layer=wg,vL.renderer.canvas.TileLayer=Tg,vL.renderer.canvas.VectorImageLayer=aj,vL.renderer.canvas.VectorLayer=oj,vL.renderer.canvas.VectorTileLayer=dj,vL.renderer.canvas.common={},vL.renderer.canvas.common.IMAGE_SMOOTHING_DISABLED=Fh,vL.renderer.canvas.common.IMAGE_SMOOTHING_ENABLED=Lh,vL.renderer.vector={},vL.renderer.vector.defaultOrder=Ah,vL.renderer.vector.getSquaredTolerance=Ch,vL.renderer.vector.getTolerance=Rh,vL.renderer.vector.renderFeature=Ph,vL.renderer.webgl={},vL.renderer.webgl.Layer=Al,vL.renderer.webgl.Layer.colorDecodeId=El,vL.renderer.webgl.Layer.colorEncodeId=Tl,vL.renderer.webgl.Layer.getBlankImageData=function(){var t=document.createElement("canvas").getContext("2d").createImageData(1,1);return t.data[0]=255,t.data[1]=255,t.data[2]=255,t.data[3]=255,t},vL.renderer.webgl.Layer.writePointFeatureToBuffers=function(t,n,i,r,e,o){var s=3+e,a=t[n+0],u=t[n+1],c=Ml;c.length=e;for(var h=0;h1?j(i.TileMatrixSetLink,"projection"in n?function(t,i,r){var o=g(e,(function(n){return n.Identifier==t.TileMatrixSet})).SupportedCRS,s=br(o),a=br(n.projection);return s&&a?Or(s,a):o==n.projection}:function(t,i,r){return t.TileMatrixSet==n.matrixSet}):0)<0&&(r=0);var o=i.TileMatrixSetLink[r].TileMatrixSet,s=i.TileMatrixSetLink[r].TileMatrixSetLimits,a=i.Format[0];"format"in n&&(a=n.format),(r=j(i.Style,(function(t,i,r){return"style"in n?t.Title==n.style:t.isDefault})))<0&&(r=0);var u=i.Style[r].Identifier,c={};"Dimension"in i&&i.Dimension.forEach((function(t,n,i){var r=t.Identifier,e=t.Default;void 0===e&&(e=t.Value[0]),c[r]=e}));var h,f=g(t.Contents.TileMatrixSet,(function(t,n,i){return t.Identifier==o})),l=f.SupportedCRS;if(l&&(h=br(l)),"projection"in n){var v=br(n.projection);v&&(h&&!Or(v,h)||(h=v))}var d=!1,p="ne"==h.getAxisOrientation().substr(0,2),m=f.TileMatrix[0],w={MinTileCol:0,MinTileRow:0,MaxTileCol:m.MatrixWidth-1,MaxTileRow:m.MatrixHeight-1};if(s){w=s[s.length-1];var b=g(f.TileMatrix,(function(t){return t.Identifier===w.TileMatrix||f.Identifier+":"+t.Identifier===w.TileMatrix}));b&&(m=b)}var x=28e-5*m.ScaleDenominator/h.getMetersPerUnit(),S=p?[m.TopLeftCorner[1],m.TopLeftCorner[0]]:m.TopLeftCorner,k=m.TileWidth*x,M=m.TileHeight*x,_=f.BoundingBox,O=[S[0]+k*w.MinTileCol,S[1]-M*(1+w.MaxTileRow),S[0]+k*(1+w.MaxTileCol),S[1]-M*w.MinTileRow];if(void 0!==_&&!_n(_,O)){var T=i.WGS84BoundingBox,E=br("EPSG:4326").getExtent();if(O=_,T)d=T[0]===E[0]&&T[2]===E[2];else{var A=Cr(_,f.SupportedCRS,"EPSG:4326");d=A[0]-1e-10<=E[0]&&A[2]+1e-10>=E[2]}}var C=jv(f,O,s),R=[],P=n.requestEncoding;if(P=void 0!==P?P:"","OperationsMetadata"in t&&"GetTile"in t.OperationsMetadata)for(var I=t.OperationsMetadata.GetTile.DCP.HTTP.Get,N=0,z=I.length;N */ diff --git a/templates/map/client/libs/openlayers/6.14.1/ol.js.map b/templates/map/client/libs/openlayers/6.14.1/ol.js.map deleted file mode 100644 index 222cbe2..0000000 ---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GAAW,GAKzBgB,EAAqBlqQ,KAAqB,eAAIA,KAAqB,gBAAK,GAC5EkqQ,EAAmBpmQ,QAAQgmQ,EAAqB9lP,KAAK,KAAM,IAC3DkmP,EAAmBlhQ,KAAO8gQ,EAAqB9lP,KAAK,KAAMkmP,EAAmBlhQ,KAAKgb,KAAKkmP,OCpFvFpB,EAAoB,KACpB,IAAIqB,EAAsBrB,EAAoB","sources":["webpack://ol/webpack/universalModuleDefinition","webpack://ol/webpack/runtime/load script","webpack://ol/./node_modules/ieee754/index.js","webpack://ol/./node_modules/lru-cache/index.js","webpack://ol/./node_modules/mapbox-to-css-font/index.js","webpack://ol/./node_modules/pbf/index.js","webpack://ol/./node_modules/rbush/rbush.min.js","webpack://ol/./node_modules/regenerator-runtime/runtime.js","webpack://ol/./node_modules/webfont-matcher/lib/fonts/google.js","webpack://ol/./node_modules/xml-utils/find-tag-by-name.js","webpack://ol/./node_modules/xml-utils/find-tags-by-name.js","webpack://ol/./node_modules/xml-utils/get-attribute.js","webpack://ol/./node_modules/xml-utils/index-of-match.js","webpack://ol/./node_modules/yallist/iterator.js","webpack://ol/./node_modules/yallist/yallist.js","webpack://ol/src/util.js","webpack://ol/src/AssertionError.js","webpack://ol/../src/events/Event.js","webpack://ol/src/ObjectEventType.js","webpack://ol/src/Disposable.js","webpack://ol/src/array.js","webpack://ol/src/functions.js","webpack://ol/src/obj.js","webpack://ol/../src/events/Target.js","webpack://ol/../src/events/EventType.js","webpack://ol/src/events.js","webpack://ol/src/Observable.js","webpack://ol/src/Object.js","webpack://ol/src/CollectionEventType.js","webpack://ol/src/Collection.js","webpack://ol/src/TileState.js","webpack://ol/src/easing.js","webpack://ol/src/Tile.js","webpack://ol/src/DataTile.js","webpack://ol/src/asserts.js","webpack://ol/src/Feature.js","webpack://ol/../src/geom/GeometryLayout.js","webpack://ol/../src/geom/GeometryType.js","webpack://ol/../src/proj/Units.js","webpack://ol/src/transform.js","webpack://ol/src/has.js","webpack://ol/../src/extent/Corner.js","webpack://ol/../src/extent/Relationship.js","webpack://ol/src/extent.js","webpack://ol/../src/proj/Projection.js","webpack://ol/src/math.js","webpack://ol/../src/proj/epsg3857.js","webpack://ol/../src/proj/epsg4326.js","webpack://ol/../src/proj/projections.js","webpack://ol/../src/proj/transforms.js","webpack://ol/src/string.js","webpack://ol/src/coordinate.js","webpack://ol/src/sphere.js","webpack://ol/src/proj.js","webpack://ol/../../src/geom/flat/transform.js","webpack://ol/../src/geom/Geometry.js","webpack://ol/../src/geom/SimpleGeometry.js","webpack://ol/../../src/geom/flat/closest.js","webpack://ol/../../src/geom/flat/deflate.js","webpack://ol/../../src/geom/flat/simplify.js","webpack://ol/../../src/geom/flat/inflate.js","webpack://ol/../../src/geom/flat/area.js","webpack://ol/../src/geom/LinearRing.js","webpack://ol/../src/geom/Point.js","webpack://ol/../../src/geom/flat/contains.js","webpack://ol/../../src/geom/flat/interiorpoint.js","webpack://ol/../../src/geom/flat/segments.js","webpack://ol/../../src/geom/flat/intersectsextent.js","webpack://ol/../../src/geom/flat/reverse.js","webpack://ol/../../src/geom/flat/orient.js","webpack://ol/../src/geom/Polygon.js","webpack://ol/src/Geolocation.js","webpack://ol/src/ImageBase.js","webpack://ol/src/ImageState.js","webpack://ol/src/Image.js","webpack://ol/src/ImageCanvas.js","webpack://ol/src/dom.js","webpack://ol/src/ImageTile.js","webpack://ol/src/Kinetic.js","webpack://ol/src/color.js","webpack://ol/../src/style/IconImageCache.js","webpack://ol/../src/layer/Property.js","webpack://ol/../src/layer/Base.js","webpack://ol/../src/render/EventType.js","webpack://ol/../src/source/State.js","webpack://ol/../src/layer/Layer.js","webpack://ol/../src/renderer/Map.js","webpack://ol/../src/render/Event.js","webpack://ol/src/css.js","webpack://ol/../src/render/canvas.js","webpack://ol/../src/renderer/Composite.js","webpack://ol/../src/layer/Group.js","webpack://ol/src/MapEvent.js","webpack://ol/src/MapBrowserEvent.js","webpack://ol/src/MapBrowserEventType.js","webpack://ol/../src/pointer/EventType.js","webpack://ol/src/MapBrowserEventHandler.js","webpack://ol/src/MapEventType.js","webpack://ol/src/MapProperty.js","webpack://ol/../src/structs/PriorityQueue.js","webpack://ol/src/TileQueue.js","webpack://ol/src/ViewHint.js","webpack://ol/src/ViewProperty.js","webpack://ol/../src/tilegrid/common.js","webpack://ol/src/centerconstraint.js","webpack://ol/src/resolutionconstraint.js","webpack://ol/src/rotationconstraint.js","webpack://ol/src/View.js","webpack://ol/src/size.js","webpack://ol/src/PluggableMap.js","webpack://ol/../src/control/Control.js","webpack://ol/../src/control/Attribution.js","webpack://ol/../src/control/Rotate.js","webpack://ol/../src/control/Zoom.js","webpack://ol/src/control.js","webpack://ol/../src/interaction/Property.js","webpack://ol/../src/interaction/Interaction.js","webpack://ol/../src/interaction/DoubleClickZoom.js","webpack://ol/../src/interaction/Pointer.js","webpack://ol/../src/events/condition.js","webpack://ol/../src/interaction/DragPan.js","webpack://ol/../src/interaction/DragRotate.js","webpack://ol/../src/render/Box.js","webpack://ol/../src/interaction/DragBox.js","webpack://ol/../src/interaction/DragZoom.js","webpack://ol/../src/events/KeyCode.js","webpack://ol/../src/interaction/KeyboardPan.js","webpack://ol/../src/interaction/KeyboardZoom.js","webpack://ol/../src/interaction/MouseWheelZoom.js","webpack://ol/../src/interaction/PinchRotate.js","webpack://ol/../src/interaction/PinchZoom.js","webpack://ol/src/interaction.js","webpack://ol/src/Map.js","webpack://ol/src/OverlayPositioning.js","webpack://ol/src/Overlay.js","webpack://ol/../src/structs/LRUCache.js","webpack://ol/src/tilecoord.js","webpack://ol/src/TileCache.js","webpack://ol/src/TileRange.js","webpack://ol/src/VectorRenderTile.js","webpack://ol/src/VectorTile.js","webpack://ol/src/colorlike.js","webpack://ol/../src/format/FormatType.js","webpack://ol/src/featureloader.js","webpack://ol/src/loadingstrategy.js","webpack://ol/src/net.js","webpack://ol/../src/render/VectorContext.js","webpack://ol/../../src/render/canvas/Immediate.js","webpack://ol/../../src/render/canvas/BuilderType.js","webpack://ol/../src/renderer/vector.js","webpack://ol/src/render.js","webpack://ol/../../src/renderer/canvas/common.js","webpack://ol/src/reproj.js","webpack://ol/../src/tilegrid/TileGrid.js","webpack://ol/src/tilegrid.js","webpack://ol/src/tileurlfunction.js","webpack://ol/src/uri.js","webpack://ol/src/webgl.js","webpack://ol/src/xml.js","webpack://ol/../src/webgl/Buffer.js","webpack://ol/../src/webgl/ContextEventType.js","webpack://ol/../src/webgl/PostProcessingPass.js","webpack://ol/../src/vec/mat4.js","webpack://ol/../src/webgl/Helper.js","webpack://ol/../src/webgl/PaletteTexture.js","webpack://ol/../src/webgl/RenderTarget.js","webpack://ol/../src/reproj/common.js","webpack://ol/../src/reproj/Triangulation.js","webpack://ol/../src/reproj/Tile.js","webpack://ol/../src/webgl/TileTexture.js","webpack://ol/../src/renderer/Layer.js","webpack://ol/../../src/renderer/webgl/Layer.js","webpack://ol/../../src/renderer/webgl/TileLayer.js","webpack://ol/../src/style/expressions.js","webpack://ol/../src/webgl/ShaderBuilder.js","webpack://ol/../src/tilegrid/WMTS.js","webpack://ol/../src/style/Image.js","webpack://ol/../src/style/RegularShape.js","webpack://ol/../src/style/Circle.js","webpack://ol/../src/style/Fill.js","webpack://ol/../src/style/IconAnchorUnits.js","webpack://ol/../src/style/IconOrigin.js","webpack://ol/../src/style/IconImage.js","webpack://ol/../src/style/Icon.js","webpack://ol/../src/style/Stroke.js","webpack://ol/../src/style/Style.js","webpack://ol/../src/style/TextPlacement.js","webpack://ol/../src/style/Text.js","webpack://ol/../src/structs/LinkedList.js","webpack://ol/../src/structs/RBush.js","webpack://ol/../src/source/TileEventType.js","webpack://ol/../src/source/Source.js","webpack://ol/../src/source/Tile.js","webpack://ol/../src/source/UrlTile.js","webpack://ol/../src/source/TileImage.js","webpack://ol/../src/source/BingMaps.js","webpack://ol/./node_modules/@petamoriken/float16/src/helper/converter.mjs","webpack://ol/../src/source/XYZ.js","webpack://ol/../src/source/CartoDB.js","webpack://ol/../src/source/VectorEventType.js","webpack://ol/../src/source/Vector.js","webpack://ol/../src/source/Cluster.js","webpack://ol/../src/source/DataTile.js","webpack://ol/./node_modules/@petamoriken/float16/src/helper/is.mjs","webpack://ol/./node_modules/@petamoriken/float16/src/DataView.mjs","webpack://ol/./node_modules/geotiff/dist-module/rgb.js","webpack://ol/./node_modules/geotiff/dist-module/compression/index.js","webpack://ol/./node_modules/geotiff/dist-module/resample.js","webpack://ol/./node_modules/geotiff/dist-module/geotiffimage.js","webpack://ol/./node_modules/geotiff/dist-module/dataview64.js","webpack://ol/./node_modules/geotiff/dist-module/dataslice.js","webpack://ol/./node_modules/geotiff/dist-module/source/httputils.js","webpack://ol/./node_modules/geotiff/dist-module/source/basesource.js","webpack://ol/./node_modules/geotiff/dist-module/utils.js","webpack://ol/./node_modules/geotiff/dist-module/source/blockedsource.js","webpack://ol/./node_modules/geotiff/dist-module/source/client/base.js","webpack://ol/./node_modules/geotiff/dist-module/source/client/fetch.js","webpack://ol/./node_modules/geotiff/dist-module/source/client/xhr.js","webpack://ol/./node_modules/geotiff/dist-module/source/client/http.js","webpack://ol/./node_modules/geotiff/dist-module/source/remote.js","webpack://ol/./node_modules/geotiff/dist-module/geotiff.js","webpack://ol/./node_modules/geotiff/dist-module/pool.js","webpack://ol/../src/source/GeoTIFF.js","webpack://ol/../src/source/Zoomify.js","webpack://ol/../src/format/IIIFInfo.js","webpack://ol/../src/source/IIIF.js","webpack://ol/../src/reproj/Image.js","webpack://ol/../src/source/Image.js","webpack://ol/../src/source/ImageArcGISRest.js","webpack://ol/../src/source/ImageCanvas.js","webpack://ol/../src/source/ImageMapGuide.js","webpack://ol/../src/source/ImageStatic.js","webpack://ol/../src/source/common.js","webpack://ol/../src/source/WMSServerType.js","webpack://ol/../src/source/ImageWMS.js","webpack://ol/../src/source/ogcTileUtil.js","webpack://ol/../src/source/OGCMapTile.js","webpack://ol/../src/source/VectorTile.js","webpack://ol/../src/source/OGCVectorTile.js","webpack://ol/../src/source/OSM.js","webpack://ol/../src/layer/BaseImage.js","webpack://ol/../../src/renderer/canvas/Layer.js","webpack://ol/../src/source/Raster.js","webpack://ol/../../src/renderer/canvas/ImageLayer.js","webpack://ol/../src/layer/Image.js","webpack://ol/../src/layer/TileProperty.js","webpack://ol/../src/layer/BaseTile.js","webpack://ol/../../src/renderer/canvas/TileLayer.js","webpack://ol/../src/layer/Tile.js","webpack://ol/../src/source/Stamen.js","webpack://ol/../src/source/TileArcGISRest.js","webpack://ol/../src/source/TileDebug.js","webpack://ol/../src/source/TileJSON.js","webpack://ol/../src/source/TileWMS.js","webpack://ol/../src/source/UTFGrid.js","webpack://ol/../src/source/WMTSRequestEncoding.js","webpack://ol/../src/source/WMTS.js","webpack://ol/../src/layer/BaseVector.js","webpack://ol/../../src/renderer/webgl/PointsLayer.js","webpack://ol/../src/worker/webgl.js","webpack://ol/../../src/render/canvas/Instruction.js","webpack://ol/../../src/render/canvas/Builder.js","webpack://ol/../../src/render/canvas/ImageBuilder.js","webpack://ol/../../src/render/canvas/LineStringBuilder.js","webpack://ol/../../src/render/canvas/PolygonBuilder.js","webpack://ol/../../src/geom/flat/straightchunk.js","webpack://ol/../../src/render/canvas/TextBuilder.js","webpack://ol/../../src/render/canvas/BuilderGroup.js","webpack://ol/../../src/geom/flat/textpath.js","webpack://ol/../../src/geom/flat/length.js","webpack://ol/../../src/render/canvas/Executor.js","webpack://ol/../../src/render/canvas/ExecutorGroup.js","webpack://ol/../../src/render/canvas/hitdetect.js","webpack://ol/../../src/renderer/canvas/VectorLayer.js","webpack://ol/../../src/renderer/canvas/VectorImageLayer.js","webpack://ol/../src/layer/VectorTileRenderType.js","webpack://ol/../../src/renderer/canvas/VectorTileLayer.js","webpack://ol/../src/geom/MultiPoint.js","webpack://ol/../../src/geom/flat/interpolate.js","webpack://ol/../src/geom/LineString.js","webpack://ol/../src/geom/MultiLineString.js","webpack://ol/../../src/geom/flat/center.js","webpack://ol/../src/geom/MultiPolygon.js","webpack://ol/../src/render/Feature.js","webpack://ol/../src/layer/Vector.js","webpack://ol/../../src/geom/flat/geodesic.js","webpack://ol/../src/layer/Graticule.js","webpack://ol/../src/layer/Heatmap.js","webpack://ol/../src/format/Feature.js","webpack://ol/../src/format/MVT.js","webpack://ol/../src/layer/VectorTile.js","webpack://ol/../src/geom/GeometryCollection.js","webpack://ol/../src/format/JSONFeature.js","webpack://ol/../src/format/GeoJSON.js","webpack://ol/../../../node_modules/url/node_modules/punycode/punycode.js","webpack://ol/../../../node_modules/url/util.js","webpack://ol/../../../node_modules/querystring/decode.js","webpack://ol/../../../node_modules/querystring/encode.js","webpack://ol/../../../node_modules/querystring/index.js","webpack://ol/../../../node_modules/url/url.js","webpack://ol/../util/extend.js","webpack://ol/../expression/parsing_error.js","webpack://ol/../expression/scope.js","webpack://ol/../expression/types.js","webpack://ol/../../../node_modules/csscolorparser/csscolorparser.js","webpack://ol/../util/color.js","webpack://ol/../expression/types/collator.js","webpack://ol/../expression/types/formatted.js","webpack://ol/../expression/types/resolved_image.js","webpack://ol/../expression/values.js","webpack://ol/../expression/definitions/literal.js","webpack://ol/../expression/runtime_error.js","webpack://ol/../expression/definitions/assertion.js","webpack://ol/../expression/definitions/format.js","webpack://ol/../expression/definitions/image.js","webpack://ol/../expression/definitions/coercion.js","webpack://ol/../expression/evaluation_context.js","webpack://ol/../expression/compound_expression.js","webpack://ol/../expression/definitions/collator.js","webpack://ol/../expression/definitions/within.js","webpack://ol/../expression/is_constant.js","webpack://ol/../expression/definitions/var.js","webpack://ol/../expression/parsing_context.js","webpack://ol/../expression/stops.js","webpack://ol/../expression/definitions/step.js","webpack://ol/../../../node_modules/@mapbox/unitbezier/index.js","webpack://ol/../util/interpolate.js","webpack://ol/../util/color_spaces.js","webpack://ol/../expression/definitions/interpolate.js","webpack://ol/../expression/definitions/coalesce.js","webpack://ol/../expression/definitions/let.js","webpack://ol/../expression/definitions/at.js","webpack://ol/../expression/definitions/in.js","webpack://ol/../expression/definitions/index_of.js","webpack://ol/../expression/definitions/match.js","webpack://ol/../expression/definitions/case.js","webpack://ol/../expression/definitions/slice.js","webpack://ol/../expression/definitions/comparison.js","webpack://ol/../expression/definitions/number_format.js","webpack://ol/../expression/definitions/index.js","webpack://ol/../expression/definitions/length.js","webpack://ol/../util/result.js","webpack://ol/../util/properties.js","webpack://ol/../util/get_type.js","webpack://ol/../function/index.js","webpack://ol/../expression/index.js","webpack://ol/../function/convert.js","webpack://ol/../feature_filter/index.js","webpack://ol/../util/ref_properties.js","webpack://ol/../deref.js","webpack://ol/../error/validation_error.js","webpack://ol/../error/parsing_error.js","webpack://ol/../validate/validate_constants.js","webpack://ol/../util/unbundle_jsonlint.js","webpack://ol/../validate/validate_object.js","webpack://ol/../validate/validate_array.js","webpack://ol/../validate/validate_number.js","webpack://ol/../validate/validate_function.js","webpack://ol/../validate/validate_expression.js","webpack://ol/../validate/validate_enum.js","webpack://ol/../validate/validate_filter.js","webpack://ol/../validate/validate_property.js","webpack://ol/../validate/validate_paint_property.js","webpack://ol/../validate/validate_layout_property.js","webpack://ol/../validate/validate_layer.js","webpack://ol/../validate/validate_string.js","webpack://ol/../validate/validate_source.js","webpack://ol/../validate/validate_light.js","webpack://ol/../validate/validate_terrain.js","webpack://ol/../validate/validate_fog.js","webpack://ol/../validate/validate.js","webpack://ol/../validate/validate_boolean.js","webpack://ol/../validate/validate_color.js","webpack://ol/../validate/validate_formatted.js","webpack://ol/../validate/validate_image.js","webpack://ol/../validate/validate_glyphs_url.js","webpack://ol/../validate_style.min.js","webpack://ol/../../../node_modules/@mapbox/jsonlint-lines-primitives/lib/jsonlint.js","webpack://ol/../read_style.js","webpack://ol/../validate_style.js","webpack://ol/../validate_mapbox_api_supported.js","webpack://ol/../style-spec.js","webpack://ol/../src/util.js","webpack://ol/../src/stylefunction.js","webpack://ol/../src/index.js","webpack://ol/../src/layer/MapboxVector.js","webpack://ol/../src/layer/VectorImage.js","webpack://ol/../src/layer/WebGLPoints.js","webpack://ol/../src/layer/WebGLTile.js","webpack://ol/../src/interaction/DragAndDrop.js","webpack://ol/../src/interaction/DragRotateAndZoom.js","webpack://ol/../src/geom/Circle.js","webpack://ol/../src/interaction/Draw.js","webpack://ol/../src/interaction/Extent.js","webpack://ol/../src/interaction/Modify.js","webpack://ol/../src/interaction/Select.js","webpack://ol/../src/interaction/Snap.js","webpack://ol/../src/interaction/Translate.js","webpack://ol/../../src/geom/flat/flip.js","webpack://ol/../src/format/EsriJSON.js","webpack://ol/../src/format/XMLFeature.js","webpack://ol/../src/format/GMLBase.js","webpack://ol/../src/format/xsd.js","webpack://ol/../src/format/GML2.js","webpack://ol/../src/format/GML3.js","webpack://ol/../src/format/GML.js","webpack://ol/../src/format/GML32.js","webpack://ol/../src/format/GPX.js","webpack://ol/../src/format/TextFeature.js","webpack://ol/../src/format/IGC.js","webpack://ol/../src/format/KML.js","webpack://ol/../src/format/OSMXML.js","webpack://ol/../src/format/XML.js","webpack://ol/../src/format/xlink.js","webpack://ol/../src/format/OWS.js","webpack://ol/../src/format/Polyline.js","webpack://ol/../src/format/TopoJSON.js","webpack://ol/../../src/format/filter/Filter.js","webpack://ol/../../src/format/filter/LogicalNary.js","webpack://ol/../../src/format/filter/And.js","webpack://ol/../../src/format/filter/Bbox.js","webpack://ol/../../src/format/filter/Spatial.js","webpack://ol/../../src/format/filter/Contains.js","webpack://ol/../../src/format/filter/DWithin.js","webpack://ol/../../src/format/filter/Disjoint.js","webpack://ol/../../src/format/filter/Comparison.js","webpack://ol/../../src/format/filter/During.js","webpack://ol/../../src/format/filter/ComparisonBinary.js","webpack://ol/../../src/format/filter/EqualTo.js","webpack://ol/../../src/format/filter/GreaterThan.js","webpack://ol/../../src/format/filter/GreaterThanOrEqualTo.js","webpack://ol/../../src/format/filter/Intersects.js","webpack://ol/../../src/format/filter/IsBetween.js","webpack://ol/../../src/format/filter/IsLike.js","webpack://ol/../../src/format/filter/IsNull.js","webpack://ol/../../src/format/filter/LessThan.js","webpack://ol/../../src/format/filter/LessThanOrEqualTo.js","webpack://ol/../../src/format/filter/Not.js","webpack://ol/../../src/format/filter/NotEqualTo.js","webpack://ol/../../src/format/filter/Or.js","webpack://ol/../../src/format/filter/ResourceId.js","webpack://ol/../../src/format/filter/Within.js","webpack://ol/../src/format/filter.js","webpack://ol/../src/format/WFS.js","webpack://ol/../src/format/WKB.js","webpack://ol/../src/format/WKT.js","webpack://ol/../src/format/WMSCapabilities.js","webpack://ol/../src/format/WMSGetFeatureInfo.js","webpack://ol/../src/format/WMTSCapabilities.js","webpack://ol/../src/control/FullScreen.js","webpack://ol/../src/control/MousePosition.js","webpack://ol/../src/control/OverviewMap.js","webpack://ol/../src/control/ScaleLine.js","webpack://ol/../src/control/ZoomSlider.js","webpack://ol/../src/control/ZoomToExtent.js","webpack://ol/./build/index.js","webpack://ol/../../src/geom/flat/topology.js","webpack://ol/../src/proj/proj4.js","webpack://ol/src/source.js","webpack://ol/./node_modules/geotiff/dist-module/globals.js","webpack://ol/webpack/bootstrap","webpack://ol/webpack/runtime/define property getters","webpack://ol/webpack/runtime/ensure chunk","webpack://ol/webpack/runtime/get javascript chunk filename","webpack://ol/webpack/runtime/hasOwnProperty shorthand","webpack://ol/webpack/runtime/make namespace object","webpack://ol/webpack/runtime/node module decorator","webpack://ol/webpack/runtime/publicPath","webpack://ol/webpack/runtime/jsonp chunk loading","webpack://ol/webpack/startup"],"sourcesContent":["(function webpackUniversalModuleDefinition(root, factory) {\n\tif(typeof exports === 'object' && typeof module === 'object')\n\t\tmodule.exports = factory();\n\telse if(typeof define === 'function' && define.amd)\n\t\tdefine([], factory);\n\telse if(typeof exports === 'object')\n\t\texports[\"ol\"] = factory();\n\telse\n\t\troot[\"ol\"] = factory();\n})(self, function() {\nreturn ","var inProgress = {};\nvar dataWebpackPrefix = \"ol:\";\n// loadScript function to load a script via script tag\n__webpack_require__.l = function(url, done, key, chunkId) {\n\tif(inProgress[url]) { inProgress[url].push(done); return; }\n\tvar script, needAttach;\n\tif(key !== undefined) {\n\t\tvar scripts = document.getElementsByTagName(\"script\");\n\t\tfor(var i = 0; i < scripts.length; i++) {\n\t\t\tvar s = scripts[i];\n\t\t\tif(s.getAttribute(\"src\") == url || s.getAttribute(\"data-webpack\") == dataWebpackPrefix + key) { script = s; break; }\n\t\t}\n\t}\n\tif(!script) {\n\t\tneedAttach = true;\n\t\tscript = document.createElement('script');\n\n\t\tscript.charset = 'utf-8';\n\t\tscript.timeout = 120;\n\t\tif (__webpack_require__.nc) {\n\t\t\tscript.setAttribute(\"nonce\", __webpack_require__.nc);\n\t\t}\n\t\tscript.setAttribute(\"data-webpack\", dataWebpackPrefix + key);\n\t\tscript.src = url;\n\t}\n\tinProgress[url] = [done];\n\tvar onScriptComplete = function(prev, event) {\n\t\t// avoid mem leaks in IE.\n\t\tscript.onerror = script.onload = null;\n\t\tclearTimeout(timeout);\n\t\tvar doneFns = inProgress[url];\n\t\tdelete inProgress[url];\n\t\tscript.parentNode && script.parentNode.removeChild(script);\n\t\tdoneFns && doneFns.forEach(function(fn) { return fn(event); });\n\t\tif(prev) return prev(event);\n\t}\n\t;\n\tvar timeout = setTimeout(onScriptComplete.bind(null, undefined, { type: 'timeout', target: script }), 120000);\n\tscript.onerror = onScriptComplete.bind(null, script.onerror);\n\tscript.onload = onScriptComplete.bind(null, script.onload);\n\tneedAttach && document.head.appendChild(script);\n};","/*! ieee754. BSD-3-Clause License. Feross Aboukhadijeh */\nexports.read = function (buffer, offset, isLE, mLen, nBytes) {\n var e, m\n var eLen = (nBytes * 8) - mLen - 1\n var eMax = (1 << eLen) - 1\n var eBias = eMax >> 1\n var nBits = -7\n var i = isLE ? (nBytes - 1) : 0\n var d = isLE ? -1 : 1\n var s = buffer[offset + i]\n\n i += d\n\n e = s & ((1 << (-nBits)) - 1)\n s >>= (-nBits)\n nBits += eLen\n for (; nBits > 0; e = (e * 256) + buffer[offset + i], i += d, nBits -= 8) {}\n\n m = e & ((1 << (-nBits)) - 1)\n e >>= (-nBits)\n nBits += mLen\n for (; nBits > 0; m = (m * 256) + buffer[offset + i], i += d, nBits -= 8) {}\n\n if (e === 0) {\n e = 1 - eBias\n } else if (e === eMax) {\n return m ? NaN : ((s ? -1 : 1) * Infinity)\n } else {\n m = m + Math.pow(2, mLen)\n e = e - eBias\n }\n return (s ? -1 : 1) * m * Math.pow(2, e - mLen)\n}\n\nexports.write = function (buffer, value, offset, isLE, mLen, nBytes) {\n var e, m, c\n var eLen = (nBytes * 8) - mLen - 1\n var eMax = (1 << eLen) - 1\n var eBias = eMax >> 1\n var rt = (mLen === 23 ? Math.pow(2, -24) - Math.pow(2, -77) : 0)\n var i = isLE ? 0 : (nBytes - 1)\n var d = isLE ? 1 : -1\n var s = value < 0 || (value === 0 && 1 / value < 0) ? 1 : 0\n\n value = Math.abs(value)\n\n if (isNaN(value) || value === Infinity) {\n m = isNaN(value) ? 1 : 0\n e = eMax\n } else {\n e = Math.floor(Math.log(value) / Math.LN2)\n if (value * (c = Math.pow(2, -e)) < 1) {\n e--\n c *= 2\n }\n if (e + eBias >= 1) {\n value += rt / c\n } else {\n value += rt * Math.pow(2, 1 - eBias)\n }\n if (value * c >= 2) {\n e++\n c /= 2\n }\n\n if (e + eBias >= eMax) {\n m = 0\n e = eMax\n } else if (e + eBias >= 1) {\n m = ((value * c) - 1) * Math.pow(2, mLen)\n e = e + eBias\n } else {\n m = value * Math.pow(2, eBias - 1) * Math.pow(2, mLen)\n e = 0\n }\n }\n\n for (; mLen >= 8; buffer[offset + i] = m & 0xff, i += d, m /= 256, mLen -= 8) {}\n\n e = (e << mLen) | m\n eLen += mLen\n for (; eLen > 0; buffer[offset + i] = e & 0xff, i += d, e /= 256, eLen -= 8) {}\n\n buffer[offset + i - d] |= s * 128\n}\n","'use strict'\n\n// A linked list to keep track of recently-used-ness\nconst Yallist = require('yallist')\n\nconst MAX = Symbol('max')\nconst LENGTH = Symbol('length')\nconst LENGTH_CALCULATOR = Symbol('lengthCalculator')\nconst ALLOW_STALE = Symbol('allowStale')\nconst MAX_AGE = Symbol('maxAge')\nconst DISPOSE = Symbol('dispose')\nconst NO_DISPOSE_ON_SET = Symbol('noDisposeOnSet')\nconst LRU_LIST = Symbol('lruList')\nconst CACHE = Symbol('cache')\nconst UPDATE_AGE_ON_GET = Symbol('updateAgeOnGet')\n\nconst naiveLength = () => 1\n\n// lruList is a yallist where the head is the youngest\n// item, and the tail is the oldest. the list contains the Hit\n// objects as the entries.\n// Each Hit object has a reference to its Yallist.Node. This\n// never changes.\n//\n// cache is a Map (or PseudoMap) that matches the keys to\n// the Yallist.Node object.\nclass LRUCache {\n constructor (options) {\n if (typeof options === 'number')\n options = { max: options }\n\n if (!options)\n options = {}\n\n if (options.max && (typeof options.max !== 'number' || options.max < 0))\n throw new TypeError('max must be a non-negative number')\n // Kind of weird to have a default max of Infinity, but oh well.\n const max = this[MAX] = options.max || Infinity\n\n const lc = options.length || naiveLength\n this[LENGTH_CALCULATOR] = (typeof lc !== 'function') ? naiveLength : lc\n this[ALLOW_STALE] = options.stale || false\n if (options.maxAge && typeof options.maxAge !== 'number')\n throw new TypeError('maxAge must be a number')\n this[MAX_AGE] = options.maxAge || 0\n this[DISPOSE] = options.dispose\n this[NO_DISPOSE_ON_SET] = options.noDisposeOnSet || false\n this[UPDATE_AGE_ON_GET] = options.updateAgeOnGet || false\n this.reset()\n }\n\n // resize the cache when the max changes.\n set max (mL) {\n if (typeof mL !== 'number' || mL < 0)\n throw new TypeError('max must be a non-negative number')\n\n this[MAX] = mL || Infinity\n trim(this)\n }\n get max () {\n return this[MAX]\n }\n\n set allowStale (allowStale) {\n this[ALLOW_STALE] = !!allowStale\n }\n get allowStale () {\n return this[ALLOW_STALE]\n }\n\n set maxAge (mA) {\n if (typeof mA !== 'number')\n throw new TypeError('maxAge must be a non-negative number')\n\n this[MAX_AGE] = mA\n trim(this)\n }\n get maxAge () {\n return this[MAX_AGE]\n }\n\n // resize the cache when the lengthCalculator changes.\n set lengthCalculator (lC) {\n if (typeof lC !== 'function')\n lC = naiveLength\n\n if (lC !== this[LENGTH_CALCULATOR]) {\n this[LENGTH_CALCULATOR] = lC\n this[LENGTH] = 0\n this[LRU_LIST].forEach(hit => {\n hit.length = this[LENGTH_CALCULATOR](hit.value, hit.key)\n this[LENGTH] += hit.length\n })\n }\n trim(this)\n }\n get lengthCalculator () { return this[LENGTH_CALCULATOR] }\n\n get length () { return this[LENGTH] }\n get itemCount () { return this[LRU_LIST].length }\n\n rforEach (fn, thisp) {\n thisp = thisp || this\n for (let walker = this[LRU_LIST].tail; walker !== null;) {\n const prev = walker.prev\n forEachStep(this, fn, walker, thisp)\n walker = prev\n }\n }\n\n forEach (fn, thisp) {\n thisp = thisp || this\n for (let walker = this[LRU_LIST].head; walker !== null;) {\n const next = walker.next\n forEachStep(this, fn, walker, thisp)\n walker = next\n }\n }\n\n keys () {\n return this[LRU_LIST].toArray().map(k => k.key)\n }\n\n values () {\n return this[LRU_LIST].toArray().map(k => k.value)\n }\n\n reset () {\n if (this[DISPOSE] &&\n this[LRU_LIST] &&\n this[LRU_LIST].length) {\n this[LRU_LIST].forEach(hit => this[DISPOSE](hit.key, hit.value))\n }\n\n this[CACHE] = new Map() // hash of items by key\n this[LRU_LIST] = new Yallist() // list of items in order of use recency\n this[LENGTH] = 0 // length of items in the list\n }\n\n dump () {\n return this[LRU_LIST].map(hit =>\n isStale(this, hit) ? false : {\n k: hit.key,\n v: hit.value,\n e: hit.now + (hit.maxAge || 0)\n }).toArray().filter(h => h)\n }\n\n dumpLru () {\n return this[LRU_LIST]\n }\n\n set (key, value, maxAge) {\n maxAge = maxAge || this[MAX_AGE]\n\n if (maxAge && typeof maxAge !== 'number')\n throw new TypeError('maxAge must be a number')\n\n const now = maxAge ? Date.now() : 0\n const len = this[LENGTH_CALCULATOR](value, key)\n\n if (this[CACHE].has(key)) {\n if (len > this[MAX]) {\n del(this, this[CACHE].get(key))\n return false\n }\n\n const node = this[CACHE].get(key)\n const item = node.value\n\n // dispose of the old one before overwriting\n // split out into 2 ifs for better coverage tracking\n if (this[DISPOSE]) {\n if (!this[NO_DISPOSE_ON_SET])\n this[DISPOSE](key, item.value)\n }\n\n item.now = now\n item.maxAge = maxAge\n item.value = value\n this[LENGTH] += len - item.length\n item.length = len\n this.get(key)\n trim(this)\n return true\n }\n\n const hit = new Entry(key, value, len, now, maxAge)\n\n // oversized objects fall out of cache automatically.\n if (hit.length > this[MAX]) {\n if (this[DISPOSE])\n this[DISPOSE](key, value)\n\n return false\n }\n\n this[LENGTH] += hit.length\n this[LRU_LIST].unshift(hit)\n this[CACHE].set(key, this[LRU_LIST].head)\n trim(this)\n return true\n }\n\n has (key) {\n if (!this[CACHE].has(key)) return false\n const hit = this[CACHE].get(key).value\n return !isStale(this, hit)\n }\n\n get (key) {\n return get(this, key, true)\n }\n\n peek (key) {\n return get(this, key, false)\n }\n\n pop () {\n const node = this[LRU_LIST].tail\n if (!node)\n return null\n\n del(this, node)\n return node.value\n }\n\n del (key) {\n del(this, this[CACHE].get(key))\n }\n\n load (arr) {\n // reset the cache\n this.reset()\n\n const now = Date.now()\n // A previous serialized cache has the most recent items first\n for (let l = arr.length - 1; l >= 0; l--) {\n const hit = arr[l]\n const expiresAt = hit.e || 0\n if (expiresAt === 0)\n // the item was created without expiration in a non aged cache\n this.set(hit.k, hit.v)\n else {\n const maxAge = expiresAt - now\n // dont add already expired items\n if (maxAge > 0) {\n this.set(hit.k, hit.v, maxAge)\n }\n }\n }\n }\n\n prune () {\n this[CACHE].forEach((value, key) => get(this, key, false))\n }\n}\n\nconst get = (self, key, doUse) => {\n const node = self[CACHE].get(key)\n if (node) {\n const hit = node.value\n if (isStale(self, hit)) {\n del(self, node)\n if (!self[ALLOW_STALE])\n return undefined\n } else {\n if (doUse) {\n if (self[UPDATE_AGE_ON_GET])\n node.value.now = Date.now()\n self[LRU_LIST].unshiftNode(node)\n }\n }\n return hit.value\n }\n}\n\nconst isStale = (self, hit) => {\n if (!hit || (!hit.maxAge && !self[MAX_AGE]))\n return false\n\n const diff = Date.now() - hit.now\n return hit.maxAge ? diff > hit.maxAge\n : self[MAX_AGE] && (diff > self[MAX_AGE])\n}\n\nconst trim = self => {\n if (self[LENGTH] > self[MAX]) {\n for (let walker = self[LRU_LIST].tail;\n self[LENGTH] > self[MAX] && walker !== null;) {\n // We know that we're about to delete this one, and also\n // what the next least recently used key will be, so just\n // go ahead and set it now.\n const prev = walker.prev\n del(self, walker)\n walker = prev\n }\n }\n}\n\nconst del = (self, node) => {\n if (node) {\n const hit = node.value\n if (self[DISPOSE])\n self[DISPOSE](hit.key, hit.value)\n\n self[LENGTH] -= hit.length\n self[CACHE].delete(hit.key)\n self[LRU_LIST].removeNode(node)\n }\n}\n\nclass Entry {\n constructor (key, value, length, now, maxAge) {\n this.key = key\n this.value = value\n this.length = length\n this.now = now\n this.maxAge = maxAge || 0\n }\n}\n\nconst forEachStep = (self, fn, node, thisp) => {\n let hit = node.value\n if (isStale(self, hit)) {\n del(self, node)\n if (!self[ALLOW_STALE])\n hit = undefined\n }\n if (hit)\n fn.call(thisp, hit.value, hit.key, self)\n}\n\nmodule.exports = LRUCache\n","var fontWeights = {\n thin: 100,\n hairline: 100,\n 'ultra-light': 100,\n 'extra-light': 100,\n light: 200,\n book: 300,\n regular: 400,\n normal: 400,\n plain: 400,\n roman: 400,\n standard: 400,\n medium: 500,\n 'semi-bold': 600,\n 'demi-bold': 600,\n bold: 700,\n heavy: 800,\n black: 800,\n 'extra-bold': 800,\n 'ultra-black': 900,\n 'extra-black': 900,\n 'ultra-bold': 900,\n 'heavy-black': 900,\n fat: 900,\n poster: 900\n};\nvar sp = ' ';\nvar italicRE = /(italic|oblique)$/i;\n\nvar fontCache = {};\n\nmodule.exports = function(fonts, size, lineHeight) {\n var cssData = fontCache[fonts];\n if (!cssData) {\n if (!Array.isArray(fonts)) {\n fonts = [fonts];\n }\n var weight = 400;\n var style = 'normal';\n var fontFamilies = [];\n var haveWeight, haveStyle;\n for (var i = 0, ii = fonts.length; i < ii; ++i) {\n var font = fonts[i];\n var parts = font.split(' ');\n var maybeWeight = parts[parts.length - 1].toLowerCase();\n if (maybeWeight == 'normal' || maybeWeight == 'italic' || maybeWeight == 'oblique') {\n style = haveStyle ? style : maybeWeight;\n parts.pop();\n maybeWeight = parts[parts.length - 1].toLowerCase();\n } else if (italicRE.test(maybeWeight)) {\n maybeWeight = maybeWeight.replace(italicRE, '');\n style = haveStyle ? style : parts[parts.length - 1].replace(maybeWeight, '');\n }\n for (var w in fontWeights) {\n var previousPart = parts.length > 1 ? parts[parts.length - 2].toLowerCase() : '';\n if (maybeWeight == w || maybeWeight == w.replace('-', '') || previousPart + '-' + maybeWeight == w) {\n weight = haveWeight ? weight : fontWeights[w];\n parts.pop();\n if (previousPart && w.startsWith(previousPart)) {\n parts.pop();\n }\n break;\n }\n }\n if (!haveWeight && typeof maybeWeight == 'number') {\n weight = maybeWeight;\n }\n var fontFamily = parts.join(sp)\n .replace('Klokantech Noto Sans', 'Noto Sans');\n if (fontFamily.indexOf(sp) !== -1) {\n fontFamily = '\"' + fontFamily + '\"';\n }\n fontFamilies.push(fontFamily);\n }\n // CSS font property: font-style font-weight font-size/line-height font-family\n cssData = fontCache[fonts] = [style, weight, fontFamilies];\n }\n return cssData[0] + sp + cssData[1] + sp + size + 'px' + (lineHeight ? '/' + lineHeight : '') + sp + cssData[2];\n};\n","'use strict';\n\nmodule.exports = Pbf;\n\nvar ieee754 = require('ieee754');\n\nfunction Pbf(buf) {\n this.buf = ArrayBuffer.isView && ArrayBuffer.isView(buf) ? buf : new Uint8Array(buf || 0);\n this.pos = 0;\n this.type = 0;\n this.length = this.buf.length;\n}\n\nPbf.Varint = 0; // varint: int32, int64, uint32, uint64, sint32, sint64, bool, enum\nPbf.Fixed64 = 1; // 64-bit: double, fixed64, sfixed64\nPbf.Bytes = 2; // length-delimited: string, bytes, embedded messages, packed repeated fields\nPbf.Fixed32 = 5; // 32-bit: float, fixed32, sfixed32\n\nvar SHIFT_LEFT_32 = (1 << 16) * (1 << 16),\n SHIFT_RIGHT_32 = 1 / SHIFT_LEFT_32;\n\n// Threshold chosen based on both benchmarking and knowledge about browser string\n// data structures (which currently switch structure types at 12 bytes or more)\nvar TEXT_DECODER_MIN_LENGTH = 12;\nvar utf8TextDecoder = typeof TextDecoder === 'undefined' ? null : new TextDecoder('utf8');\n\nPbf.prototype = {\n\n destroy: function() {\n this.buf = null;\n },\n\n // === READING =================================================================\n\n readFields: function(readField, result, end) {\n end = end || this.length;\n\n while (this.pos < end) {\n var val = this.readVarint(),\n tag = val >> 3,\n startPos = this.pos;\n\n this.type = val & 0x7;\n readField(tag, result, this);\n\n if (this.pos === startPos) this.skip(val);\n }\n return result;\n },\n\n readMessage: function(readField, result) {\n return this.readFields(readField, result, this.readVarint() + this.pos);\n },\n\n readFixed32: function() {\n var val = readUInt32(this.buf, this.pos);\n this.pos += 4;\n return val;\n },\n\n readSFixed32: function() {\n var val = readInt32(this.buf, this.pos);\n this.pos += 4;\n return val;\n },\n\n // 64-bit int handling is based on github.com/dpw/node-buffer-more-ints (MIT-licensed)\n\n readFixed64: function() {\n var val = readUInt32(this.buf, this.pos) + readUInt32(this.buf, this.pos + 4) * SHIFT_LEFT_32;\n this.pos += 8;\n return val;\n },\n\n readSFixed64: function() {\n var val = readUInt32(this.buf, this.pos) + readInt32(this.buf, this.pos + 4) * SHIFT_LEFT_32;\n this.pos += 8;\n return val;\n },\n\n readFloat: function() {\n var val = ieee754.read(this.buf, this.pos, true, 23, 4);\n this.pos += 4;\n return val;\n },\n\n readDouble: function() {\n var val = ieee754.read(this.buf, this.pos, true, 52, 8);\n this.pos += 8;\n return val;\n },\n\n readVarint: function(isSigned) {\n var buf = this.buf,\n val, b;\n\n b = buf[this.pos++]; val = b & 0x7f; if (b < 0x80) return val;\n b = buf[this.pos++]; val |= (b & 0x7f) << 7; if (b < 0x80) return val;\n b = buf[this.pos++]; val |= (b & 0x7f) << 14; if (b < 0x80) return val;\n b = buf[this.pos++]; val |= (b & 0x7f) << 21; if (b < 0x80) return val;\n b = buf[this.pos]; val |= (b & 0x0f) << 28;\n\n return readVarintRemainder(val, isSigned, this);\n },\n\n readVarint64: function() { // for compatibility with v2.0.1\n return this.readVarint(true);\n },\n\n readSVarint: function() {\n var num = this.readVarint();\n return num % 2 === 1 ? (num + 1) / -2 : num / 2; // zigzag encoding\n },\n\n readBoolean: function() {\n return Boolean(this.readVarint());\n },\n\n readString: function() {\n var end = this.readVarint() + this.pos;\n var pos = this.pos;\n this.pos = end;\n\n if (end - pos >= TEXT_DECODER_MIN_LENGTH && utf8TextDecoder) {\n // longer strings are fast with the built-in browser TextDecoder API\n return readUtf8TextDecoder(this.buf, pos, end);\n }\n // short strings are fast with our custom implementation\n return readUtf8(this.buf, pos, end);\n },\n\n readBytes: function() {\n var end = this.readVarint() + this.pos,\n buffer = this.buf.subarray(this.pos, end);\n this.pos = end;\n return buffer;\n },\n\n // verbose for performance reasons; doesn't affect gzipped size\n\n readPackedVarint: function(arr, isSigned) {\n if (this.type !== Pbf.Bytes) return arr.push(this.readVarint(isSigned));\n var end = readPackedEnd(this);\n arr = arr || [];\n while (this.pos < end) arr.push(this.readVarint(isSigned));\n return arr;\n },\n readPackedSVarint: function(arr) {\n if (this.type !== Pbf.Bytes) return arr.push(this.readSVarint());\n var end = readPackedEnd(this);\n arr = arr || [];\n while (this.pos < end) arr.push(this.readSVarint());\n return arr;\n },\n readPackedBoolean: function(arr) {\n if (this.type !== Pbf.Bytes) return arr.push(this.readBoolean());\n var end = readPackedEnd(this);\n arr = arr || [];\n while (this.pos < end) arr.push(this.readBoolean());\n return arr;\n },\n readPackedFloat: function(arr) {\n if (this.type !== Pbf.Bytes) return arr.push(this.readFloat());\n var end = readPackedEnd(this);\n arr = arr || [];\n while (this.pos < end) arr.push(this.readFloat());\n return arr;\n },\n readPackedDouble: function(arr) {\n if (this.type !== Pbf.Bytes) return arr.push(this.readDouble());\n var end = readPackedEnd(this);\n arr = arr || [];\n while (this.pos < end) arr.push(this.readDouble());\n return arr;\n },\n readPackedFixed32: function(arr) {\n if (this.type !== Pbf.Bytes) return arr.push(this.readFixed32());\n var end = readPackedEnd(this);\n arr = arr || [];\n while (this.pos < end) arr.push(this.readFixed32());\n return arr;\n },\n readPackedSFixed32: function(arr) {\n if (this.type !== Pbf.Bytes) return arr.push(this.readSFixed32());\n var end = readPackedEnd(this);\n arr = arr || [];\n while (this.pos < end) arr.push(this.readSFixed32());\n return arr;\n },\n readPackedFixed64: function(arr) {\n if (this.type !== Pbf.Bytes) return arr.push(this.readFixed64());\n var end = readPackedEnd(this);\n arr = arr || [];\n while (this.pos < end) arr.push(this.readFixed64());\n return arr;\n },\n readPackedSFixed64: function(arr) {\n if (this.type !== Pbf.Bytes) return arr.push(this.readSFixed64());\n var end = readPackedEnd(this);\n arr = arr || [];\n while (this.pos < end) arr.push(this.readSFixed64());\n return arr;\n },\n\n skip: function(val) {\n var type = val & 0x7;\n if (type === Pbf.Varint) while (this.buf[this.pos++] > 0x7f) {}\n else if (type === Pbf.Bytes) this.pos = this.readVarint() + this.pos;\n else if (type === Pbf.Fixed32) this.pos += 4;\n else if (type === Pbf.Fixed64) this.pos += 8;\n else throw new Error('Unimplemented type: ' + type);\n },\n\n // === WRITING =================================================================\n\n writeTag: function(tag, type) {\n this.writeVarint((tag << 3) | type);\n },\n\n realloc: function(min) {\n var length = this.length || 16;\n\n while (length < this.pos + min) length *= 2;\n\n if (length !== this.length) {\n var buf = new Uint8Array(length);\n buf.set(this.buf);\n this.buf = buf;\n this.length = length;\n }\n },\n\n finish: function() {\n this.length = this.pos;\n this.pos = 0;\n return this.buf.subarray(0, this.length);\n },\n\n writeFixed32: function(val) {\n this.realloc(4);\n writeInt32(this.buf, val, this.pos);\n this.pos += 4;\n },\n\n writeSFixed32: function(val) {\n this.realloc(4);\n writeInt32(this.buf, val, this.pos);\n this.pos += 4;\n },\n\n writeFixed64: function(val) {\n this.realloc(8);\n writeInt32(this.buf, val & -1, this.pos);\n writeInt32(this.buf, Math.floor(val * SHIFT_RIGHT_32), this.pos + 4);\n this.pos += 8;\n },\n\n writeSFixed64: function(val) {\n this.realloc(8);\n writeInt32(this.buf, val & -1, this.pos);\n writeInt32(this.buf, Math.floor(val * SHIFT_RIGHT_32), this.pos + 4);\n this.pos += 8;\n },\n\n writeVarint: function(val) {\n val = +val || 0;\n\n if (val > 0xfffffff || val < 0) {\n writeBigVarint(val, this);\n return;\n }\n\n this.realloc(4);\n\n this.buf[this.pos++] = val & 0x7f | (val > 0x7f ? 0x80 : 0); if (val <= 0x7f) return;\n this.buf[this.pos++] = ((val >>>= 7) & 0x7f) | (val > 0x7f ? 0x80 : 0); if (val <= 0x7f) return;\n this.buf[this.pos++] = ((val >>>= 7) & 0x7f) | (val > 0x7f ? 0x80 : 0); if (val <= 0x7f) return;\n this.buf[this.pos++] = (val >>> 7) & 0x7f;\n },\n\n writeSVarint: function(val) {\n this.writeVarint(val < 0 ? -val * 2 - 1 : val * 2);\n },\n\n writeBoolean: function(val) {\n this.writeVarint(Boolean(val));\n },\n\n writeString: function(str) {\n str = String(str);\n this.realloc(str.length * 4);\n\n this.pos++; // reserve 1 byte for short string length\n\n var startPos = this.pos;\n // write the string directly to the buffer and see how much was written\n this.pos = writeUtf8(this.buf, str, this.pos);\n var len = this.pos - startPos;\n\n if (len >= 0x80) makeRoomForExtraLength(startPos, len, this);\n\n // finally, write the message length in the reserved place and restore the position\n this.pos = startPos - 1;\n this.writeVarint(len);\n this.pos += len;\n },\n\n writeFloat: function(val) {\n this.realloc(4);\n ieee754.write(this.buf, val, this.pos, true, 23, 4);\n this.pos += 4;\n },\n\n writeDouble: function(val) {\n this.realloc(8);\n ieee754.write(this.buf, val, this.pos, true, 52, 8);\n this.pos += 8;\n },\n\n writeBytes: function(buffer) {\n var len = buffer.length;\n this.writeVarint(len);\n this.realloc(len);\n for (var i = 0; i < len; i++) this.buf[this.pos++] = buffer[i];\n },\n\n writeRawMessage: function(fn, obj) {\n this.pos++; // reserve 1 byte for short message length\n\n // write the message directly to the buffer and see how much was written\n var startPos = this.pos;\n fn(obj, this);\n var len = this.pos - startPos;\n\n if (len >= 0x80) makeRoomForExtraLength(startPos, len, this);\n\n // finally, write the message length in the reserved place and restore the position\n this.pos = startPos - 1;\n this.writeVarint(len);\n this.pos += len;\n },\n\n writeMessage: function(tag, fn, obj) {\n this.writeTag(tag, Pbf.Bytes);\n this.writeRawMessage(fn, obj);\n },\n\n writePackedVarint: function(tag, arr) { if (arr.length) this.writeMessage(tag, writePackedVarint, arr); },\n writePackedSVarint: function(tag, arr) { if (arr.length) this.writeMessage(tag, writePackedSVarint, arr); },\n writePackedBoolean: function(tag, arr) { if (arr.length) this.writeMessage(tag, writePackedBoolean, arr); },\n writePackedFloat: function(tag, arr) { if (arr.length) this.writeMessage(tag, writePackedFloat, arr); },\n writePackedDouble: function(tag, arr) { if (arr.length) this.writeMessage(tag, writePackedDouble, arr); },\n writePackedFixed32: function(tag, arr) { if (arr.length) this.writeMessage(tag, writePackedFixed32, arr); },\n writePackedSFixed32: function(tag, arr) { if (arr.length) this.writeMessage(tag, writePackedSFixed32, arr); },\n writePackedFixed64: function(tag, arr) { if (arr.length) this.writeMessage(tag, writePackedFixed64, arr); },\n writePackedSFixed64: function(tag, arr) { if (arr.length) this.writeMessage(tag, writePackedSFixed64, arr); },\n\n writeBytesField: function(tag, buffer) {\n this.writeTag(tag, Pbf.Bytes);\n this.writeBytes(buffer);\n },\n writeFixed32Field: function(tag, val) {\n this.writeTag(tag, Pbf.Fixed32);\n this.writeFixed32(val);\n },\n writeSFixed32Field: function(tag, val) {\n this.writeTag(tag, Pbf.Fixed32);\n this.writeSFixed32(val);\n },\n writeFixed64Field: function(tag, val) {\n this.writeTag(tag, Pbf.Fixed64);\n this.writeFixed64(val);\n },\n writeSFixed64Field: function(tag, val) {\n this.writeTag(tag, Pbf.Fixed64);\n this.writeSFixed64(val);\n },\n writeVarintField: function(tag, val) {\n this.writeTag(tag, Pbf.Varint);\n this.writeVarint(val);\n },\n writeSVarintField: function(tag, val) {\n this.writeTag(tag, Pbf.Varint);\n this.writeSVarint(val);\n },\n writeStringField: function(tag, str) {\n this.writeTag(tag, Pbf.Bytes);\n this.writeString(str);\n },\n writeFloatField: function(tag, val) {\n this.writeTag(tag, Pbf.Fixed32);\n this.writeFloat(val);\n },\n writeDoubleField: function(tag, val) {\n this.writeTag(tag, Pbf.Fixed64);\n this.writeDouble(val);\n },\n writeBooleanField: function(tag, val) {\n this.writeVarintField(tag, Boolean(val));\n }\n};\n\nfunction readVarintRemainder(l, s, p) {\n var buf = p.buf,\n h, b;\n\n b = buf[p.pos++]; h = (b & 0x70) >> 4; if (b < 0x80) return toNum(l, h, s);\n b = buf[p.pos++]; h |= (b & 0x7f) << 3; if (b < 0x80) return toNum(l, h, s);\n b = buf[p.pos++]; h |= (b & 0x7f) << 10; if (b < 0x80) return toNum(l, h, s);\n b = buf[p.pos++]; h |= (b & 0x7f) << 17; if (b < 0x80) return toNum(l, h, s);\n b = buf[p.pos++]; h |= (b & 0x7f) << 24; if (b < 0x80) return toNum(l, h, s);\n b = buf[p.pos++]; h |= (b & 0x01) << 31; if (b < 0x80) return toNum(l, h, s);\n\n throw new Error('Expected varint not more than 10 bytes');\n}\n\nfunction readPackedEnd(pbf) {\n return pbf.type === Pbf.Bytes ?\n pbf.readVarint() + pbf.pos : pbf.pos + 1;\n}\n\nfunction toNum(low, high, isSigned) {\n if (isSigned) {\n return high * 0x100000000 + (low >>> 0);\n }\n\n return ((high >>> 0) * 0x100000000) + (low >>> 0);\n}\n\nfunction writeBigVarint(val, pbf) {\n var low, high;\n\n if (val >= 0) {\n low = (val % 0x100000000) | 0;\n high = (val / 0x100000000) | 0;\n } else {\n low = ~(-val % 0x100000000);\n high = ~(-val / 0x100000000);\n\n if (low ^ 0xffffffff) {\n low = (low + 1) | 0;\n } else {\n low = 0;\n high = (high + 1) | 0;\n }\n }\n\n if (val >= 0x10000000000000000 || val < -0x10000000000000000) {\n throw new Error('Given varint doesn\\'t fit into 10 bytes');\n }\n\n pbf.realloc(10);\n\n writeBigVarintLow(low, high, pbf);\n writeBigVarintHigh(high, pbf);\n}\n\nfunction writeBigVarintLow(low, high, pbf) {\n pbf.buf[pbf.pos++] = low & 0x7f | 0x80; low >>>= 7;\n pbf.buf[pbf.pos++] = low & 0x7f | 0x80; low >>>= 7;\n pbf.buf[pbf.pos++] = low & 0x7f | 0x80; low >>>= 7;\n pbf.buf[pbf.pos++] = low & 0x7f | 0x80; low >>>= 7;\n pbf.buf[pbf.pos] = low & 0x7f;\n}\n\nfunction writeBigVarintHigh(high, pbf) {\n var lsb = (high & 0x07) << 4;\n\n pbf.buf[pbf.pos++] |= lsb | ((high >>>= 3) ? 0x80 : 0); if (!high) return;\n pbf.buf[pbf.pos++] = high & 0x7f | ((high >>>= 7) ? 0x80 : 0); if (!high) return;\n pbf.buf[pbf.pos++] = high & 0x7f | ((high >>>= 7) ? 0x80 : 0); if (!high) return;\n pbf.buf[pbf.pos++] = high & 0x7f | ((high >>>= 7) ? 0x80 : 0); if (!high) return;\n pbf.buf[pbf.pos++] = high & 0x7f | ((high >>>= 7) ? 0x80 : 0); if (!high) return;\n pbf.buf[pbf.pos++] = high & 0x7f;\n}\n\nfunction makeRoomForExtraLength(startPos, len, pbf) {\n var extraLen =\n len <= 0x3fff ? 1 :\n len <= 0x1fffff ? 2 :\n len <= 0xfffffff ? 3 : Math.floor(Math.log(len) / (Math.LN2 * 7));\n\n // if 1 byte isn't enough for encoding message length, shift the data to the right\n pbf.realloc(extraLen);\n for (var i = pbf.pos - 1; i >= startPos; i--) pbf.buf[i + extraLen] = pbf.buf[i];\n}\n\nfunction writePackedVarint(arr, pbf) { for (var i = 0; i < arr.length; i++) pbf.writeVarint(arr[i]); }\nfunction writePackedSVarint(arr, pbf) { for (var i = 0; i < arr.length; i++) pbf.writeSVarint(arr[i]); }\nfunction writePackedFloat(arr, pbf) { for (var i = 0; i < arr.length; i++) pbf.writeFloat(arr[i]); }\nfunction writePackedDouble(arr, pbf) { for (var i = 0; i < arr.length; i++) pbf.writeDouble(arr[i]); }\nfunction writePackedBoolean(arr, pbf) { for (var i = 0; i < arr.length; i++) pbf.writeBoolean(arr[i]); }\nfunction writePackedFixed32(arr, pbf) { for (var i = 0; i < arr.length; i++) pbf.writeFixed32(arr[i]); }\nfunction writePackedSFixed32(arr, pbf) { for (var i = 0; i < arr.length; i++) pbf.writeSFixed32(arr[i]); }\nfunction writePackedFixed64(arr, pbf) { for (var i = 0; i < arr.length; i++) pbf.writeFixed64(arr[i]); }\nfunction writePackedSFixed64(arr, pbf) { for (var i = 0; i < arr.length; i++) pbf.writeSFixed64(arr[i]); }\n\n// Buffer code below from https://github.com/feross/buffer, MIT-licensed\n\nfunction readUInt32(buf, pos) {\n return ((buf[pos]) |\n (buf[pos + 1] << 8) |\n (buf[pos + 2] << 16)) +\n (buf[pos + 3] * 0x1000000);\n}\n\nfunction writeInt32(buf, val, pos) {\n buf[pos] = val;\n buf[pos + 1] = (val >>> 8);\n buf[pos + 2] = (val >>> 16);\n buf[pos + 3] = (val >>> 24);\n}\n\nfunction readInt32(buf, pos) {\n return ((buf[pos]) |\n (buf[pos + 1] << 8) |\n (buf[pos + 2] << 16)) +\n (buf[pos + 3] << 24);\n}\n\nfunction readUtf8(buf, pos, end) {\n var str = '';\n var i = pos;\n\n while (i < end) {\n var b0 = buf[i];\n var c = null; // codepoint\n var bytesPerSequence =\n b0 > 0xEF ? 4 :\n b0 > 0xDF ? 3 :\n b0 > 0xBF ? 2 : 1;\n\n if (i + bytesPerSequence > end) break;\n\n var b1, b2, b3;\n\n if (bytesPerSequence === 1) {\n if (b0 < 0x80) {\n c = b0;\n }\n } else if (bytesPerSequence === 2) {\n b1 = buf[i + 1];\n if ((b1 & 0xC0) === 0x80) {\n c = (b0 & 0x1F) << 0x6 | (b1 & 0x3F);\n if (c <= 0x7F) {\n c = null;\n }\n }\n } else if (bytesPerSequence === 3) {\n b1 = buf[i + 1];\n b2 = buf[i + 2];\n if ((b1 & 0xC0) === 0x80 && (b2 & 0xC0) === 0x80) {\n c = (b0 & 0xF) << 0xC | (b1 & 0x3F) << 0x6 | (b2 & 0x3F);\n if (c <= 0x7FF || (c >= 0xD800 && c <= 0xDFFF)) {\n c = null;\n }\n }\n } else if (bytesPerSequence === 4) {\n b1 = buf[i + 1];\n b2 = buf[i + 2];\n b3 = buf[i + 3];\n if ((b1 & 0xC0) === 0x80 && (b2 & 0xC0) === 0x80 && (b3 & 0xC0) === 0x80) {\n c = (b0 & 0xF) << 0x12 | (b1 & 0x3F) << 0xC | (b2 & 0x3F) << 0x6 | (b3 & 0x3F);\n if (c <= 0xFFFF || c >= 0x110000) {\n c = null;\n }\n }\n }\n\n if (c === null) {\n c = 0xFFFD;\n bytesPerSequence = 1;\n\n } else if (c > 0xFFFF) {\n c -= 0x10000;\n str += String.fromCharCode(c >>> 10 & 0x3FF | 0xD800);\n c = 0xDC00 | c & 0x3FF;\n }\n\n str += String.fromCharCode(c);\n i += bytesPerSequence;\n }\n\n return str;\n}\n\nfunction readUtf8TextDecoder(buf, pos, end) {\n return utf8TextDecoder.decode(buf.subarray(pos, end));\n}\n\nfunction writeUtf8(buf, str, pos) {\n for (var i = 0, c, lead; i < str.length; i++) {\n c = str.charCodeAt(i); // code point\n\n if (c > 0xD7FF && c < 0xE000) {\n if (lead) {\n if (c < 0xDC00) {\n buf[pos++] = 0xEF;\n buf[pos++] = 0xBF;\n buf[pos++] = 0xBD;\n lead = c;\n continue;\n } else {\n c = lead - 0xD800 << 10 | c - 0xDC00 | 0x10000;\n lead = null;\n }\n } else {\n if (c > 0xDBFF || (i + 1 === str.length)) {\n buf[pos++] = 0xEF;\n buf[pos++] = 0xBF;\n buf[pos++] = 0xBD;\n } else {\n lead = c;\n }\n continue;\n }\n } else if (lead) {\n buf[pos++] = 0xEF;\n buf[pos++] = 0xBF;\n buf[pos++] = 0xBD;\n lead = null;\n }\n\n if (c < 0x80) {\n buf[pos++] = c;\n } else {\n if (c < 0x800) {\n buf[pos++] = c >> 0x6 | 0xC0;\n } else {\n if (c < 0x10000) {\n buf[pos++] = c >> 0xC | 0xE0;\n } else {\n buf[pos++] = c >> 0x12 | 0xF0;\n buf[pos++] = c >> 0xC & 0x3F | 0x80;\n }\n buf[pos++] = c >> 0x6 & 0x3F | 0x80;\n }\n buf[pos++] = c & 0x3F | 0x80;\n }\n }\n return pos;\n}\n","!function(t,i){\"object\"==typeof exports&&\"undefined\"!=typeof module?module.exports=i():\"function\"==typeof define&&define.amd?define(i):(t=t||self).RBush=i()}(this,function(){\"use strict\";function t(t,r,e,a,h){!function t(n,r,e,a,h){for(;a>e;){if(a-e>600){var o=a-e+1,s=r-e+1,l=Math.log(o),f=.5*Math.exp(2*l/3),u=.5*Math.sqrt(l*f*(o-f)/o)*(s-o/2<0?-1:1),m=Math.max(e,Math.floor(r-s*f/o+u)),c=Math.min(a,Math.floor(r+(o-s)*f/o+u));t(n,r,m,c,h)}var p=n[r],d=e,x=a;for(i(n,e,r),h(n[a],p)>0&&i(n,e,a);d0;)x--}0===h(n[e],p)?i(n,e,x):i(n,++x,a),x<=r&&(e=x+1),r<=x&&(a=x-1)}}(t,r,e||0,a||t.length-1,h||n)}function i(t,i,n){var r=t[i];t[i]=t[n],t[n]=r}function n(t,i){return ti?1:0}var r=function(t){void 0===t&&(t=9),this._maxEntries=Math.max(4,t),this._minEntries=Math.max(2,Math.ceil(.4*this._maxEntries)),this.clear()};function e(t,i,n){if(!n)return i.indexOf(t);for(var r=0;r=t.minX&&i.maxY>=t.minY}function p(t){return{children:t,height:1,leaf:!0,minX:1/0,minY:1/0,maxX:-1/0,maxY:-1/0}}function d(i,n,r,e,a){for(var h=[n,r];h.length;)if(!((r=h.pop())-(n=h.pop())<=e)){var o=n+Math.ceil((r-n)/e/2)*e;t(i,o,n,r,a),h.push(n,o,o,r)}}return r.prototype.all=function(){return this._all(this.data,[])},r.prototype.search=function(t){var i=this.data,n=[];if(!c(t,i))return n;for(var r=this.toBBox,e=[];i;){for(var a=0;a=0&&e[i].children.length>this._maxEntries;)this._split(e,i),i--;this._adjustParentBBoxes(r,e,i)},r.prototype._split=function(t,i){var n=t[i],r=n.children.length,e=this._minEntries;this._chooseSplitAxis(n,e,r);var h=this._chooseSplitIndex(n,e,r),o=p(n.children.splice(h,n.children.length-h));o.height=n.height,o.leaf=n.leaf,a(n,this.toBBox),a(o,this.toBBox),i?t[i-1].children.push(o):this._splitRoot(n,o)},r.prototype._splitRoot=function(t,i){this.data=p([t,i]),this.data.height=t.height+1,this.data.leaf=!1,a(this.data,this.toBBox)},r.prototype._chooseSplitIndex=function(t,i,n){for(var r,e,a,o,s,l,u,m=1/0,c=1/0,p=i;p<=n-i;p++){var d=h(t,0,p,this.toBBox),x=h(t,p,n,this.toBBox),v=(e=d,a=x,o=void 0,s=void 0,l=void 0,u=void 0,o=Math.max(e.minX,a.minX),s=Math.max(e.minY,a.minY),l=Math.min(e.maxX,a.maxX),u=Math.min(e.maxY,a.maxY),Math.max(0,l-o)*Math.max(0,u-s)),M=f(d)+f(x);v=i;c--){var p=t.children[c];o(s,t.leaf?e(p):p),l+=u(s)}return l},r.prototype._adjustParentBBoxes=function(t,i,n){for(var r=n;r>=0;r--)o(i[r],t)},r.prototype._condense=function(t){for(var i=t.length-1,n=void 0;i>=0;i--)0===t[i].children.length?i>0?(n=t[i-1].children).splice(n.indexOf(t[i]),1):this.clear():a(t[i],this.toBBox)},r});\n","/**\n * Copyright (c) 2014-present, Facebook, Inc.\n *\n * This source code is licensed under the MIT license found in the\n * LICENSE file in the root directory of this source tree.\n */\n\nvar runtime = (function (exports) {\n \"use strict\";\n\n var Op = Object.prototype;\n var hasOwn = Op.hasOwnProperty;\n var undefined; // More compressible than void 0.\n var $Symbol = typeof Symbol === \"function\" ? Symbol : {};\n var iteratorSymbol = $Symbol.iterator || \"@@iterator\";\n var asyncIteratorSymbol = $Symbol.asyncIterator || \"@@asyncIterator\";\n var toStringTagSymbol = $Symbol.toStringTag || \"@@toStringTag\";\n\n function define(obj, key, value) {\n Object.defineProperty(obj, key, {\n value: value,\n enumerable: true,\n configurable: true,\n writable: true\n });\n return obj[key];\n }\n try {\n // IE 8 has a broken Object.defineProperty that only works on DOM objects.\n define({}, \"\");\n } catch (err) {\n define = function(obj, key, value) {\n return obj[key] = value;\n };\n }\n\n function wrap(innerFn, outerFn, self, tryLocsList) {\n // If outerFn provided and outerFn.prototype is a Generator, then outerFn.prototype instanceof Generator.\n var protoGenerator = outerFn && outerFn.prototype instanceof Generator ? outerFn : Generator;\n var generator = Object.create(protoGenerator.prototype);\n var context = new Context(tryLocsList || []);\n\n // The ._invoke method unifies the implementations of the .next,\n // .throw, and .return methods.\n generator._invoke = makeInvokeMethod(innerFn, self, context);\n\n return generator;\n }\n exports.wrap = wrap;\n\n // Try/catch helper to minimize deoptimizations. Returns a completion\n // record like context.tryEntries[i].completion. This interface could\n // have been (and was previously) designed to take a closure to be\n // invoked without arguments, but in all the cases we care about we\n // already have an existing method we want to call, so there's no need\n // to create a new function object. We can even get away with assuming\n // the method takes exactly one argument, since that happens to be true\n // in every case, so we don't have to touch the arguments object. The\n // only additional allocation required is the completion record, which\n // has a stable shape and so hopefully should be cheap to allocate.\n function tryCatch(fn, obj, arg) {\n try {\n return { type: \"normal\", arg: fn.call(obj, arg) };\n } catch (err) {\n return { type: \"throw\", arg: err };\n }\n }\n\n var GenStateSuspendedStart = \"suspendedStart\";\n var GenStateSuspendedYield = \"suspendedYield\";\n var GenStateExecuting = \"executing\";\n var GenStateCompleted = \"completed\";\n\n // Returning this object from the innerFn has the same effect as\n // breaking out of the dispatch switch statement.\n var ContinueSentinel = {};\n\n // Dummy constructor functions that we use as the .constructor and\n // .constructor.prototype properties for functions that return Generator\n // objects. For full spec compliance, you may wish to configure your\n // minifier not to mangle the names of these two functions.\n function Generator() {}\n function GeneratorFunction() {}\n function GeneratorFunctionPrototype() {}\n\n // This is a polyfill for %IteratorPrototype% for environments that\n // don't natively support it.\n var IteratorPrototype = {};\n define(IteratorPrototype, iteratorSymbol, function () {\n return this;\n });\n\n var getProto = Object.getPrototypeOf;\n var NativeIteratorPrototype = getProto && getProto(getProto(values([])));\n if (NativeIteratorPrototype &&\n NativeIteratorPrototype !== Op &&\n hasOwn.call(NativeIteratorPrototype, iteratorSymbol)) {\n // This environment has a native %IteratorPrototype%; use it instead\n // of the polyfill.\n IteratorPrototype = NativeIteratorPrototype;\n }\n\n var Gp = GeneratorFunctionPrototype.prototype =\n Generator.prototype = Object.create(IteratorPrototype);\n GeneratorFunction.prototype = GeneratorFunctionPrototype;\n define(Gp, \"constructor\", GeneratorFunctionPrototype);\n define(GeneratorFunctionPrototype, \"constructor\", GeneratorFunction);\n GeneratorFunction.displayName = define(\n GeneratorFunctionPrototype,\n toStringTagSymbol,\n \"GeneratorFunction\"\n );\n\n // Helper for defining the .next, .throw, and .return methods of the\n // Iterator interface in terms of a single ._invoke method.\n function defineIteratorMethods(prototype) {\n [\"next\", \"throw\", \"return\"].forEach(function(method) {\n define(prototype, method, function(arg) {\n return this._invoke(method, arg);\n });\n });\n }\n\n exports.isGeneratorFunction = function(genFun) {\n var ctor = typeof genFun === \"function\" && genFun.constructor;\n return ctor\n ? ctor === GeneratorFunction ||\n // For the native GeneratorFunction constructor, the best we can\n // do is to check its .name property.\n (ctor.displayName || ctor.name) === \"GeneratorFunction\"\n : false;\n };\n\n exports.mark = function(genFun) {\n if (Object.setPrototypeOf) {\n Object.setPrototypeOf(genFun, GeneratorFunctionPrototype);\n } else {\n genFun.__proto__ = GeneratorFunctionPrototype;\n define(genFun, toStringTagSymbol, \"GeneratorFunction\");\n }\n genFun.prototype = Object.create(Gp);\n return genFun;\n };\n\n // Within the body of any async function, `await x` is transformed to\n // `yield regeneratorRuntime.awrap(x)`, so that the runtime can test\n // `hasOwn.call(value, \"__await\")` to determine if the yielded value is\n // meant to be awaited.\n exports.awrap = function(arg) {\n return { __await: arg };\n };\n\n function AsyncIterator(generator, PromiseImpl) {\n function invoke(method, arg, resolve, reject) {\n var record = tryCatch(generator[method], generator, arg);\n if (record.type === \"throw\") {\n reject(record.arg);\n } else {\n var result = record.arg;\n var value = result.value;\n if (value &&\n typeof value === \"object\" &&\n hasOwn.call(value, \"__await\")) {\n return PromiseImpl.resolve(value.__await).then(function(value) {\n invoke(\"next\", value, resolve, reject);\n }, function(err) {\n invoke(\"throw\", err, resolve, reject);\n });\n }\n\n return PromiseImpl.resolve(value).then(function(unwrapped) {\n // When a yielded Promise is resolved, its final value becomes\n // the .value of the Promise<{value,done}> result for the\n // current iteration.\n result.value = unwrapped;\n resolve(result);\n }, function(error) {\n // If a rejected Promise was yielded, throw the rejection back\n // into the async generator function so it can be handled there.\n return invoke(\"throw\", error, resolve, reject);\n });\n }\n }\n\n var previousPromise;\n\n function enqueue(method, arg) {\n function callInvokeWithMethodAndArg() {\n return new PromiseImpl(function(resolve, reject) {\n invoke(method, arg, resolve, reject);\n });\n }\n\n return previousPromise =\n // If enqueue has been called before, then we want to wait until\n // all previous Promises have been resolved before calling invoke,\n // so that results are always delivered in the correct order. If\n // enqueue has not been called before, then it is important to\n // call invoke immediately, without waiting on a callback to fire,\n // so that the async generator function has the opportunity to do\n // any necessary setup in a predictable way. This predictability\n // is why the Promise constructor synchronously invokes its\n // executor callback, and why async functions synchronously\n // execute code before the first await. Since we implement simple\n // async functions in terms of async generators, it is especially\n // important to get this right, even though it requires care.\n previousPromise ? previousPromise.then(\n callInvokeWithMethodAndArg,\n // Avoid propagating failures to Promises returned by later\n // invocations of the iterator.\n callInvokeWithMethodAndArg\n ) : callInvokeWithMethodAndArg();\n }\n\n // Define the unified helper method that is used to implement .next,\n // .throw, and .return (see defineIteratorMethods).\n this._invoke = enqueue;\n }\n\n defineIteratorMethods(AsyncIterator.prototype);\n define(AsyncIterator.prototype, asyncIteratorSymbol, function () {\n return this;\n });\n exports.AsyncIterator = AsyncIterator;\n\n // Note that simple async functions are implemented on top of\n // AsyncIterator objects; they just return a Promise for the value of\n // the final result produced by the iterator.\n exports.async = function(innerFn, outerFn, self, tryLocsList, PromiseImpl) {\n if (PromiseImpl === void 0) PromiseImpl = Promise;\n\n var iter = new AsyncIterator(\n wrap(innerFn, outerFn, self, tryLocsList),\n PromiseImpl\n );\n\n return exports.isGeneratorFunction(outerFn)\n ? iter // If outerFn is a generator, return the full iterator.\n : iter.next().then(function(result) {\n return result.done ? result.value : iter.next();\n });\n };\n\n function makeInvokeMethod(innerFn, self, context) {\n var state = GenStateSuspendedStart;\n\n return function invoke(method, arg) {\n if (state === GenStateExecuting) {\n throw new Error(\"Generator is already running\");\n }\n\n if (state === GenStateCompleted) {\n if (method === \"throw\") {\n throw arg;\n }\n\n // Be forgiving, per 25.3.3.3.3 of the spec:\n // https://people.mozilla.org/~jorendorff/es6-draft.html#sec-generatorresume\n return doneResult();\n }\n\n context.method = method;\n context.arg = arg;\n\n while (true) {\n var delegate = context.delegate;\n if (delegate) {\n var delegateResult = maybeInvokeDelegate(delegate, context);\n if (delegateResult) {\n if (delegateResult === ContinueSentinel) continue;\n return delegateResult;\n }\n }\n\n if (context.method === \"next\") {\n // Setting context._sent for legacy support of Babel's\n // function.sent implementation.\n context.sent = context._sent = context.arg;\n\n } else if (context.method === \"throw\") {\n if (state === GenStateSuspendedStart) {\n state = GenStateCompleted;\n throw context.arg;\n }\n\n context.dispatchException(context.arg);\n\n } else if (context.method === \"return\") {\n context.abrupt(\"return\", context.arg);\n }\n\n state = GenStateExecuting;\n\n var record = tryCatch(innerFn, self, context);\n if (record.type === \"normal\") {\n // If an exception is thrown from innerFn, we leave state ===\n // GenStateExecuting and loop back for another invocation.\n state = context.done\n ? GenStateCompleted\n : GenStateSuspendedYield;\n\n if (record.arg === ContinueSentinel) {\n continue;\n }\n\n return {\n value: record.arg,\n done: context.done\n };\n\n } else if (record.type === \"throw\") {\n state = GenStateCompleted;\n // Dispatch the exception by looping back around to the\n // context.dispatchException(context.arg) call above.\n context.method = \"throw\";\n context.arg = record.arg;\n }\n }\n };\n }\n\n // Call delegate.iterator[context.method](context.arg) and handle the\n // result, either by returning a { value, done } result from the\n // delegate iterator, or by modifying context.method and context.arg,\n // setting context.delegate to null, and returning the ContinueSentinel.\n function maybeInvokeDelegate(delegate, context) {\n var method = delegate.iterator[context.method];\n if (method === undefined) {\n // A .throw or .return when the delegate iterator has no .throw\n // method always terminates the yield* loop.\n context.delegate = null;\n\n if (context.method === \"throw\") {\n // Note: [\"return\"] must be used for ES3 parsing compatibility.\n if (delegate.iterator[\"return\"]) {\n // If the delegate iterator has a return method, give it a\n // chance to clean up.\n context.method = \"return\";\n context.arg = undefined;\n maybeInvokeDelegate(delegate, context);\n\n if (context.method === \"throw\") {\n // If maybeInvokeDelegate(context) changed context.method from\n // \"return\" to \"throw\", let that override the TypeError below.\n return ContinueSentinel;\n }\n }\n\n context.method = \"throw\";\n context.arg = new TypeError(\n \"The iterator does not provide a 'throw' method\");\n }\n\n return ContinueSentinel;\n }\n\n var record = tryCatch(method, delegate.iterator, context.arg);\n\n if (record.type === \"throw\") {\n context.method = \"throw\";\n context.arg = record.arg;\n context.delegate = null;\n return ContinueSentinel;\n }\n\n var info = record.arg;\n\n if (! info) {\n context.method = \"throw\";\n context.arg = new TypeError(\"iterator result is not an object\");\n context.delegate = null;\n return ContinueSentinel;\n }\n\n if (info.done) {\n // Assign the result of the finished delegate to the temporary\n // variable specified by delegate.resultName (see delegateYield).\n context[delegate.resultName] = info.value;\n\n // Resume execution at the desired location (see delegateYield).\n context.next = delegate.nextLoc;\n\n // If context.method was \"throw\" but the delegate handled the\n // exception, let the outer generator proceed normally. If\n // context.method was \"next\", forget context.arg since it has been\n // \"consumed\" by the delegate iterator. If context.method was\n // \"return\", allow the original .return call to continue in the\n // outer generator.\n if (context.method !== \"return\") {\n context.method = \"next\";\n context.arg = undefined;\n }\n\n } else {\n // Re-yield the result returned by the delegate method.\n return info;\n }\n\n // The delegate iterator is finished, so forget it and continue with\n // the outer generator.\n context.delegate = null;\n return ContinueSentinel;\n }\n\n // Define Generator.prototype.{next,throw,return} in terms of the\n // unified ._invoke helper method.\n defineIteratorMethods(Gp);\n\n define(Gp, toStringTagSymbol, \"Generator\");\n\n // A Generator should always return itself as the iterator object when the\n // @@iterator function is called on it. Some browsers' implementations of the\n // iterator prototype chain incorrectly implement this, causing the Generator\n // object to not be returned from this call. This ensures that doesn't happen.\n // See https://github.com/facebook/regenerator/issues/274 for more details.\n define(Gp, iteratorSymbol, function() {\n return this;\n });\n\n define(Gp, \"toString\", function() {\n return \"[object Generator]\";\n });\n\n function pushTryEntry(locs) {\n var entry = { tryLoc: locs[0] };\n\n if (1 in locs) {\n entry.catchLoc = locs[1];\n }\n\n if (2 in locs) {\n entry.finallyLoc = locs[2];\n entry.afterLoc = locs[3];\n }\n\n this.tryEntries.push(entry);\n }\n\n function resetTryEntry(entry) {\n var record = entry.completion || {};\n record.type = \"normal\";\n delete record.arg;\n entry.completion = record;\n }\n\n function Context(tryLocsList) {\n // The root entry object (effectively a try statement without a catch\n // or a finally block) gives us a place to store values thrown from\n // locations where there is no enclosing try statement.\n this.tryEntries = [{ tryLoc: \"root\" }];\n tryLocsList.forEach(pushTryEntry, this);\n this.reset(true);\n }\n\n exports.keys = function(object) {\n var keys = [];\n for (var key in object) {\n keys.push(key);\n }\n keys.reverse();\n\n // Rather than returning an object with a next method, we keep\n // things simple and return the next function itself.\n return function next() {\n while (keys.length) {\n var key = keys.pop();\n if (key in object) {\n next.value = key;\n next.done = false;\n return next;\n }\n }\n\n // To avoid creating an additional object, we just hang the .value\n // and .done properties off the next function object itself. This\n // also ensures that the minifier will not anonymize the function.\n next.done = true;\n return next;\n };\n };\n\n function values(iterable) {\n if (iterable) {\n var iteratorMethod = iterable[iteratorSymbol];\n if (iteratorMethod) {\n return iteratorMethod.call(iterable);\n }\n\n if (typeof iterable.next === \"function\") {\n return iterable;\n }\n\n if (!isNaN(iterable.length)) {\n var i = -1, next = function next() {\n while (++i < iterable.length) {\n if (hasOwn.call(iterable, i)) {\n next.value = iterable[i];\n next.done = false;\n return next;\n }\n }\n\n next.value = undefined;\n next.done = true;\n\n return next;\n };\n\n return next.next = next;\n }\n }\n\n // Return an iterator with no values.\n return { next: doneResult };\n }\n exports.values = values;\n\n function doneResult() {\n return { value: undefined, done: true };\n }\n\n Context.prototype = {\n constructor: Context,\n\n reset: function(skipTempReset) {\n this.prev = 0;\n this.next = 0;\n // Resetting context._sent for legacy support of Babel's\n // function.sent implementation.\n this.sent = this._sent = undefined;\n this.done = false;\n this.delegate = null;\n\n this.method = \"next\";\n this.arg = undefined;\n\n this.tryEntries.forEach(resetTryEntry);\n\n if (!skipTempReset) {\n for (var name in this) {\n // Not sure about the optimal order of these conditions:\n if (name.charAt(0) === \"t\" &&\n hasOwn.call(this, name) &&\n !isNaN(+name.slice(1))) {\n this[name] = undefined;\n }\n }\n }\n },\n\n stop: function() {\n this.done = true;\n\n var rootEntry = this.tryEntries[0];\n var rootRecord = rootEntry.completion;\n if (rootRecord.type === \"throw\") {\n throw rootRecord.arg;\n }\n\n return this.rval;\n },\n\n dispatchException: function(exception) {\n if (this.done) {\n throw exception;\n }\n\n var context = this;\n function handle(loc, caught) {\n record.type = \"throw\";\n record.arg = exception;\n context.next = loc;\n\n if (caught) {\n // If the dispatched exception was caught by a catch block,\n // then let that catch block handle the exception normally.\n context.method = \"next\";\n context.arg = undefined;\n }\n\n return !! caught;\n }\n\n for (var i = this.tryEntries.length - 1; i >= 0; --i) {\n var entry = this.tryEntries[i];\n var record = entry.completion;\n\n if (entry.tryLoc === \"root\") {\n // Exception thrown outside of any try block that could handle\n // it, so set the completion value of the entire function to\n // throw the exception.\n return handle(\"end\");\n }\n\n if (entry.tryLoc <= this.prev) {\n var hasCatch = hasOwn.call(entry, \"catchLoc\");\n var hasFinally = hasOwn.call(entry, \"finallyLoc\");\n\n if (hasCatch && hasFinally) {\n if (this.prev < entry.catchLoc) {\n return handle(entry.catchLoc, true);\n } else if (this.prev < entry.finallyLoc) {\n return handle(entry.finallyLoc);\n }\n\n } else if (hasCatch) {\n if (this.prev < entry.catchLoc) {\n return handle(entry.catchLoc, true);\n }\n\n } else if (hasFinally) {\n if (this.prev < entry.finallyLoc) {\n return handle(entry.finallyLoc);\n }\n\n } else {\n throw new Error(\"try statement without catch or finally\");\n }\n }\n }\n },\n\n abrupt: function(type, arg) {\n for (var i = this.tryEntries.length - 1; i >= 0; --i) {\n var entry = this.tryEntries[i];\n if (entry.tryLoc <= this.prev &&\n hasOwn.call(entry, \"finallyLoc\") &&\n this.prev < entry.finallyLoc) {\n var finallyEntry = entry;\n break;\n }\n }\n\n if (finallyEntry &&\n (type === \"break\" ||\n type === \"continue\") &&\n finallyEntry.tryLoc <= arg &&\n arg <= finallyEntry.finallyLoc) {\n // Ignore the finally entry if control is not jumping to a\n // location outside the try/catch block.\n finallyEntry = null;\n }\n\n var record = finallyEntry ? finallyEntry.completion : {};\n record.type = type;\n record.arg = arg;\n\n if (finallyEntry) {\n this.method = \"next\";\n this.next = finallyEntry.finallyLoc;\n return ContinueSentinel;\n }\n\n return this.complete(record);\n },\n\n complete: function(record, afterLoc) {\n if (record.type === \"throw\") {\n throw record.arg;\n }\n\n if (record.type === \"break\" ||\n record.type === \"continue\") {\n this.next = record.arg;\n } else if (record.type === \"return\") {\n this.rval = this.arg = record.arg;\n this.method = \"return\";\n this.next = \"end\";\n } else if (record.type === \"normal\" && afterLoc) {\n this.next = afterLoc;\n }\n\n return ContinueSentinel;\n },\n\n finish: function(finallyLoc) {\n for (var i = this.tryEntries.length - 1; i >= 0; --i) {\n var entry = this.tryEntries[i];\n if (entry.finallyLoc === finallyLoc) {\n this.complete(entry.completion, entry.afterLoc);\n resetTryEntry(entry);\n return ContinueSentinel;\n }\n }\n },\n\n \"catch\": function(tryLoc) {\n for (var i = this.tryEntries.length - 1; i >= 0; --i) {\n var entry = this.tryEntries[i];\n if (entry.tryLoc === tryLoc) {\n var record = entry.completion;\n if (record.type === \"throw\") {\n var thrown = record.arg;\n resetTryEntry(entry);\n }\n return thrown;\n }\n }\n\n // The context.catch method must only be called with a location\n // argument that corresponds to a known catch block.\n throw new Error(\"illegal catch attempt\");\n },\n\n delegateYield: function(iterable, resultName, nextLoc) {\n this.delegate = {\n iterator: values(iterable),\n resultName: resultName,\n nextLoc: nextLoc\n };\n\n if (this.method === \"next\") {\n // Deliberately forget the last sent value so that we don't\n // accidentally pass it on to the delegate.\n this.arg = undefined;\n }\n\n return ContinueSentinel;\n }\n };\n\n // Regardless of whether this script is executing as a CommonJS module\n // or not, return the runtime object so that we can declare the variable\n // regeneratorRuntime in the outer scope, which allows this module to be\n // injected easily by `bin/regenerator --include-runtime script.js`.\n return exports;\n\n}(\n // If this script is executing as a CommonJS module, use module.exports\n // as the regeneratorRuntime namespace. Otherwise create a new empty\n // object. Either way, the resulting object will be used to initialize\n // the regeneratorRuntime variable at the top of this file.\n typeof module === \"object\" ? module.exports : {}\n));\n\ntry {\n regeneratorRuntime = runtime;\n} catch (accidentalStrictMode) {\n // This module should not be running in strict mode, so the above\n // assignment should always work unless something is misconfigured. Just\n // in case runtime.js accidentally runs in strict mode, in modern engines\n // we can explicitly access globalThis. In older engines we can escape\n // strict mode using a global Function call. This could conceivably fail\n // if a Content Security Policy forbids using Function, but in that case\n // the proper solution is to fix the accidental strict mode problem. If\n // you've misconfigured your bundler to force strict mode and applied a\n // CSP to forbid Function, and you're not willing to fix either of those\n // problems, please detail your unique predicament in a GitHub issue.\n if (typeof globalThis === \"object\") {\n globalThis.regeneratorRuntime = runtime;\n } else {\n Function(\"r\", \"regeneratorRuntime = r\")(runtime);\n }\n}\n","// Generated by CoffeeScript 1.10.0\n(function() {\n var families;\n\n module.exports = {\n icon: 'icons/google.svg',\n name: 'google',\n title: 'Google Fonts',\n link: 'google.com/fonts',\n getNames: function() {\n return families;\n },\n getLink: function(name) {\n return \"https://fonts.google.com/specimen/\" + (name.replace(/( )/g, '+'));\n },\n normalizeName: function(name) {\n return name;\n }\n };\n\n families = [\"ABeeZee\", \"Abel\", \"Abril Fatface\", \"Aclonica\", \"Acme\", \"Actor\", \"Adamina\", \"Advent Pro\", \"Aguafina Script\", \"Akronim\", \"Aladin\", \"Aldrich\", \"Alef\", \"Alegreya\", \"Alegreya SC\", \"Alegreya Sans\", \"Alegreya Sans SC\", \"Alex Brush\", \"Alfa Slab One\", \"Alice\", \"Alike\", \"Alike Angular\", \"Allan\", \"Allerta\", \"Allerta Stencil\", \"Allura\", \"Almendra\", \"Almendra Display\", \"Almendra SC\", \"Amarante\", \"Amaranth\", \"Amatic SC\", \"Amethysta\", \"Amiri\", \"Amita\", \"Anaheim\", \"Andada\", \"Andika\", \"Angkor\", \"Annie Use Your Telescope\", \"Anonymous Pro\", \"Antic\", \"Antic Didone\", \"Antic Slab\", \"Anton\", \"Arapey\", \"Arbutus\", \"Arbutus Slab\", \"Architects Daughter\", \"Archivo Black\", \"Archivo Narrow\", \"Arimo\", \"Arizonia\", \"Armata\", \"Artifika\", \"Arvo\", \"Arya\", \"Asap\", \"Asar\", \"Asset\", \"Astloch\", \"Asul\", \"Atomic Age\", \"Aubrey\", \"Audiowide\", \"Autour One\", \"Average\", \"Average Sans\", \"Averia Gruesa Libre\", \"Averia Libre\", \"Averia Sans Libre\", \"Averia Serif Libre\", \"Bad Script\", \"Balthazar\", \"Bangers\", \"Basic\", \"Battambang\", \"Baumans\", \"Bayon\", \"Belgrano\", \"Belleza\", \"BenchNine\", \"Bentham\", \"Berkshire Swash\", \"Bevan\", \"Bigelow Rules\", \"Bigshot One\", \"Bilbo\", \"Bilbo Swash Caps\", \"Biryani\", \"Bitter\", \"Black Ops One\", \"Bokor\", \"Bonbon\", \"Boogaloo\", \"Bowlby One\", \"Bowlby One SC\", \"Brawler\", \"Bree Serif\", \"Bubblegum Sans\", \"Bubbler One\", \"Buda\", \"Buenard\", \"Butcherman\", \"Butterfly Kids\", \"Cabin\", \"Cabin Condensed\", \"Cabin Sketch\", \"Caesar Dressing\", \"Cagliostro\", \"Calligraffitti\", \"Cambay\", \"Cambo\", \"Candal\", \"Cantarell\", \"Cantata One\", \"Cantora One\", \"Capriola\", \"Cardo\", \"Carme\", \"Carrois Gothic\", \"Carrois Gothic SC\", \"Carter One\", \"Catamaran\", \"Caudex\", \"Caveat\", \"Caveat Brush\", \"Cedarville Cursive\", \"Ceviche One\", \"Changa One\", \"Chango\", \"Chau Philomene One\", \"Chela One\", \"Chelsea Market\", \"Chenla\", \"Cherry Cream Soda\", \"Cherry Swash\", \"Chewy\", \"Chicle\", \"Chivo\", \"Chonburi\", \"Cinzel\", \"Cinzel Decorative\", \"Clicker Script\", \"Coda\", \"Coda Caption\", \"Codystar\", \"Combo\", \"Comfortaa\", \"Coming Soon\", \"Concert One\", \"Condiment\", \"Content\", \"Contrail One\", \"Convergence\", \"Cookie\", \"Copse\", \"Corben\", \"Courgette\", \"Cousine\", \"Coustard\", \"Covered By Your Grace\", \"Crafty Girls\", \"Creepster\", \"Crete Round\", \"Crimson Text\", \"Croissant One\", \"Crushed\", \"Cuprum\", \"Cutive\", \"Cutive Mono\", \"Damion\", \"Dancing Script\", \"Dangrek\", \"Dawning of a New Day\", \"Days One\", \"Dekko\", \"Delius\", \"Delius Swash Caps\", \"Delius Unicase\", \"Della Respira\", \"Denk One\", \"Devonshire\", \"Dhurjati\", \"Didact Gothic\", \"Diplomata\", \"Diplomata SC\", \"Domine\", \"Donegal One\", \"Doppio One\", \"Dorsa\", \"Dosis\", \"Dr Sugiyama\", \"Droid Sans\", \"Droid Sans Mono\", \"Droid Serif\", \"Duru Sans\", \"Dynalight\", \"EB Garamond\", \"Eagle Lake\", \"Eater\", \"Economica\", \"Eczar\", \"Ek Mukta\", \"Electrolize\", \"Elsie\", \"Elsie Swash Caps\", \"Emblema One\", \"Emilys Candy\", \"Engagement\", \"Englebert\", \"Enriqueta\", \"Erica One\", \"Esteban\", \"Euphoria Script\", \"Ewert\", \"Exo\", \"Exo 2\", \"Expletus Sans\", \"Fanwood Text\", \"Fascinate\", \"Fascinate Inline\", \"Faster One\", \"Fasthand\", \"Fauna One\", \"Federant\", \"Federo\", \"Felipa\", \"Fenix\", \"Finger Paint\", \"Fira Mono\", \"Fira Sans\", \"Fjalla One\", \"Fjord One\", \"Flamenco\", \"Flavors\", \"Fondamento\", \"Fontdiner Swanky\", \"Forum\", \"Francois One\", \"Freckle Face\", \"Fredericka the Great\", \"Fredoka One\", \"Freehand\", \"Fresca\", \"Frijole\", \"Fruktur\", \"Fugaz One\", \"GFS Didot\", \"GFS Neohellenic\", \"Gabriela\", \"Gafata\", \"Galdeano\", \"Galindo\", \"Gentium Basic\", \"Gentium Book Basic\", \"Geo\", \"Geostar\", \"Geostar Fill\", \"Germania One\", \"Gidugu\", \"Gilda Display\", \"Give You Glory\", \"Glass Antiqua\", \"Glegoo\", \"Gloria Hallelujah\", \"Goblin One\", \"Gochi Hand\", \"Gorditas\", \"Goudy Bookletter 1911\", \"Graduate\", \"Grand Hotel\", \"Gravitas One\", \"Great Vibes\", \"Griffy\", \"Gruppo\", \"Gudea\", \"Gurajada\", \"Habibi\", \"Halant\", \"Hammersmith One\", \"Hanalei\", \"Hanalei Fill\", \"Handlee\", \"Hanuman\", \"Happy Monkey\", \"Headland One\", \"Henny Penny\", \"Herr Von Muellerhoff\", \"Hind\", \"Hind Siliguri\", \"Hind Vadodara\", \"Holtwood One SC\", \"Homemade Apple\", \"Homenaje\", \"IM Fell DW Pica\", \"IM Fell DW Pica SC\", \"IM Fell Double Pica\", \"IM Fell Double Pica SC\", \"IM Fell English\", \"IM Fell English SC\", \"IM Fell French Canon\", \"IM Fell French Canon SC\", \"IM Fell Great Primer\", \"IM Fell Great Primer SC\", \"Iceberg\", \"Iceland\", \"Imprima\", \"Inconsolata\", \"Inder\", \"Indie Flower\", \"Inika\", \"Inknut Antiqua\", \"Irish Grover\", \"Istok Web\", \"Italiana\", \"Italianno\", \"Itim\", \"Jacques Francois\", \"Jacques Francois Shadow\", \"Jaldi\", \"Jim Nightshade\", \"Jockey One\", \"Jolly Lodger\", \"Josefin Sans\", \"Josefin Slab\", \"Joti One\", \"Judson\", \"Julee\", \"Julius Sans One\", \"Junge\", \"Jura\", \"Just Another Hand\", \"Just Me Again Down Here\", \"Kadwa\", \"Kalam\", \"Kameron\", \"Kantumruy\", \"Karla\", \"Karma\", \"Kaushan Script\", \"Kavoon\", \"Kdam Thmor\", \"Keania One\", \"Kelly Slab\", \"Kenia\", \"Khand\", \"Khmer\", \"Khula\", \"Kite One\", \"Knewave\", \"Kotta One\", \"Koulen\", \"Kranky\", \"Kreon\", \"Kristi\", \"Krona One\", \"Kurale\", \"La Belle Aurore\", \"Laila\", \"Lakki Reddy\", \"Lancelot\", \"Lateef\", \"Lato\", \"League Script\", \"Leckerli One\", \"Ledger\", \"Lekton\", \"Lemon\", \"Libre Baskerville\", \"Life Savers\", \"Lilita One\", \"Lily Script One\", \"Limelight\", \"Linden Hill\", \"Lobster\", \"Lobster Two\", \"Londrina Outline\", \"Londrina Shadow\", \"Londrina Sketch\", \"Londrina Solid\", \"Lora\", \"Love Ya Like A Sister\", \"Loved by the King\", \"Lovers Quarrel\", \"Luckiest Guy\", \"Lusitana\", \"Lustria\", \"Macondo\", \"Macondo Swash Caps\", \"Magra\", \"Maiden Orange\", \"Mako\", \"Mallanna\", \"Mandali\", \"Marcellus\", \"Marcellus SC\", \"Marck Script\", \"Margarine\", \"Marko One\", \"Marmelad\", \"Martel\", \"Martel Sans\", \"Marvel\", \"Mate\", \"Mate SC\", \"Maven Pro\", \"McLaren\", \"Meddon\", \"MedievalSharp\", \"Medula One\", \"Megrim\", \"Meie Script\", \"Merienda\", \"Merienda One\", \"Merriweather\", \"Merriweather Sans\", \"Metal\", \"Metal Mania\", \"Metamorphous\", \"Metrophobic\", \"Michroma\", \"Milonga\", \"Miltonian\", \"Miltonian Tattoo\", \"Miniver\", \"Miss Fajardose\", \"Modak\", \"Modern Antiqua\", \"Molengo\", \"Molle\", \"Monda\", \"Monofett\", \"Monoton\", \"Monsieur La Doulaise\", \"Montaga\", \"Montez\", \"Montserrat\", \"Montserrat Alternates\", \"Montserrat Subrayada\", \"Moul\", \"Moulpali\", \"Mountains of Christmas\", \"Mouse Memoirs\", \"Mr Bedfort\", \"Mr Dafoe\", \"Mr De Haviland\", \"Mrs Saint Delafield\", \"Mrs Sheppards\", \"Muli\", \"Mystery Quest\", \"NTR\", \"Neucha\", \"Neuton\", \"New Rocker\", \"News Cycle\", \"Niconne\", \"Nixie One\", \"Nobile\", \"Nokora\", \"Norican\", \"Nosifer\", \"Nothing You Could Do\", \"Noticia Text\", \"Noto Sans\", \"Noto Serif\", \"Nova Cut\", \"Nova Flat\", \"Nova Mono\", \"Nova Oval\", \"Nova Round\", \"Nova Script\", \"Nova Slim\", \"Nova Square\", \"Numans\", \"Nunito\", \"Odor Mean Chey\", \"Offside\", \"Old Standard TT\", \"Oldenburg\", \"Oleo Script\", \"Oleo Script Swash Caps\", \"Open Sans\", \"Open Sans Condensed\", \"Oranienbaum\", \"Orbitron\", \"Oregano\", \"Orienta\", \"Original Surfer\", \"Oswald\", \"Over the Rainbow\", \"Overlock\", \"Overlock SC\", \"Ovo\", \"Oxygen\", \"Oxygen Mono\", \"PT Mono\", \"PT Sans\", \"PT Sans Caption\", \"PT Sans Narrow\", \"PT Serif\", \"PT Serif Caption\", \"Pacifico\", \"Palanquin\", \"Palanquin Dark\", \"Paprika\", \"Parisienne\", \"Passero One\", \"Passion One\", \"Pathway Gothic One\", \"Patrick Hand\", \"Patrick Hand SC\", \"Patua One\", \"Paytone One\", \"Peddana\", \"Peralta\", \"Permanent Marker\", \"Petit Formal Script\", \"Petrona\", \"Philosopher\", \"Piedra\", \"Pinyon Script\", \"Pirata One\", \"Plaster\", \"Play\", \"Playball\", \"Playfair Display\", \"Playfair Display SC\", \"Podkova\", \"Poiret One\", \"Poller One\", \"Poly\", \"Pompiere\", \"Pontano Sans\", \"Poppins\", \"Port Lligat Sans\", \"Port Lligat Slab\", \"Pragati Narrow\", \"Prata\", \"Preahvihear\", \"Press Start 2P\", \"Princess Sofia\", \"Prociono\", \"Prosto One\", \"Puritan\", \"Purple Purse\", \"Quando\", \"Quantico\", \"Quattrocento\", \"Quattrocento Sans\", \"Questrial\", \"Quicksand\", \"Quintessential\", \"Qwigley\", \"Racing Sans One\", \"Radley\", \"Rajdhani\", \"Raleway\", \"Raleway Dots\", \"Ramabhadra\", \"Ramaraja\", \"Rambla\", \"Rammetto One\", \"Ranchers\", \"Rancho\", \"Ranga\", \"Rationale\", \"Ravi Prakash\", \"Redressed\", \"Reenie Beanie\", \"Revalia\", \"Rhodium Libre\", \"Ribeye\", \"Ribeye Marrow\", \"Righteous\", \"Risque\", \"Roboto\", \"Roboto Condensed\", \"Roboto Mono\", \"Roboto Slab\", \"Rochester\", \"Rock Salt\", \"Rokkitt\", \"Romanesco\", \"Ropa Sans\", \"Rosario\", \"Rosarivo\", \"Rouge Script\", \"Rozha One\", \"Rubik\", \"Rubik Mono One\", \"Rubik One\", \"Ruda\", \"Rufina\", \"Ruge Boogie\", \"Ruluko\", \"Rum Raisin\", \"Ruslan Display\", \"Russo One\", \"Ruthie\", \"Rye\", \"Sacramento\", \"Sahitya\", \"Sail\", \"Salsa\", \"Sanchez\", \"Sancreek\", \"Sansita One\", \"Sarala\", \"Sarina\", \"Sarpanch\", \"Satisfy\", \"Scada\", \"Scheherazade\", \"Schoolbell\", \"Seaweed Script\", \"Sevillana\", \"Seymour One\", \"Shadows Into Light\", \"Shadows Into Light Two\", \"Shanti\", \"Share\", \"Share Tech\", \"Share Tech Mono\", \"Shojumaru\", \"Short Stack\", \"Siemreap\", \"Sigmar One\", \"Signika\", \"Signika Negative\", \"Simonetta\", \"Sintony\", \"Sirin Stencil\", \"Six Caps\", \"Skranji\", \"Slabo 13px\", \"Slabo 27px\", \"Slackey\", \"Smokum\", \"Smythe\", \"Sniglet\", \"Snippet\", \"Snowburst One\", \"Sofadi One\", \"Sofia\", \"Sonsie One\", \"Sorts Mill Goudy\", \"Source Code Pro\", \"Source Sans Pro\", \"Source Serif Pro\", \"Special Elite\", \"Spicy Rice\", \"Spinnaker\", \"Spirax\", \"Squada One\", \"Sree Krushnadevaraya\", \"Stalemate\", \"Stalinist One\", \"Stardos Stencil\", \"Stint Ultra Condensed\", \"Stint Ultra Expanded\", \"Stoke\", \"Strait\", \"Sue Ellen Francisco\", \"Sumana\", \"Sunshiney\", \"Supermercado One\", \"Sura\", \"Suranna\", \"Suravaram\", \"Suwannaphum\", \"Swanky and Moo Moo\", \"Syncopate\", \"Tangerine\", \"Taprom\", \"Tauri\", \"Teko\", \"Telex\", \"Tenali Ramakrishna\", \"Tenor Sans\", \"Text Me One\", \"The Girl Next Door\", \"Tienne\", \"Tillana\", \"Timmana\", \"Tinos\", \"Titan One\", \"Titillium Web\", \"Trade Winds\", \"Trocchi\", \"Trochut\", \"Trykker\", \"Tulpen One\", \"Ubuntu\", \"Ubuntu Condensed\", \"Ubuntu Mono\", \"Ultra\", \"Uncial Antiqua\", \"Underdog\", \"Unica One\", \"UnifrakturCook\", \"UnifrakturMaguntia\", \"Unkempt\", \"Unlock\", \"Unna\", \"VT323\", \"Vampiro One\", \"Varela\", \"Varela Round\", \"Vast Shadow\", \"Vesper Libre\", \"Vibur\", \"Vidaloka\", \"Viga\", \"Voces\", \"Volkhov\", \"Vollkorn\", \"Voltaire\", \"Waiting for the Sunrise\", \"Wallpoet\", \"Walter Turncoat\", \"Warnes\", \"Wellfleet\", \"Wendy One\", \"Wire One\", \"Work Sans\", \"Yanone Kaffeesatz\", \"Yantramanav\", \"Yellowtail\", \"Yeseva One\", \"Yesteryear\", \"Zeyada\"];\n\n}).call(this);\n","const indexOfMatch = require(\"./index-of-match.js\");\n\nfunction findTagByName(xml, tagName, options) {\n const debug = (options && options.debug) || false;\n\n const startIndex = (options && options.startIndex) || 0;\n\n if (debug) console.log(\"starting findTagByName with\", tagName, \" and \", options);\n\n const start = indexOfMatch(xml, `\\<${tagName}[ \\>]`, startIndex);\n if (debug) console.log(\"start:\", start);\n if (start === -1) return undefined;\n\n const afterStart = xml.slice(start + tagName.length);\n let relativeEnd = indexOfMatch(afterStart, \"[ /]\" + tagName + \">\", 0);\n const selfClosing = relativeEnd === -1;\n\n if (selfClosing) {\n relativeEnd = indexOfMatch(afterStart, \"[ /]>\", 0);\n }\n\n const end = start + tagName.length + relativeEnd + 1 + (selfClosing ? 0 : tagName.length) + 1;\n if (debug) console.log(\"end:\", end);\n if (end === -1) return undefined;\n\n const outer = xml.slice(start, end);\n // tag is like urn:ogc:def:crs:EPSG::32617\n\n let inner;\n if (selfClosing) {\n inner = null;\n } else {\n inner = outer.slice(outer.indexOf(\">\") + 1, outer.lastIndexOf(\"<\"));\n }\n\n return { inner, outer, start, end };\n}\n\nmodule.exports = findTagByName;\n","const findTagByName = require(\"./find-tag-by-name.js\");\n\nfunction findTagsByName(xml, tagName, options) {\n const tags = [];\n const debug = (options && options.debug) || false;\n let startIndex = (options && options.startIndex) || 0;\n let tag;\n while ((tag = findTagByName(xml, tagName, { debug, startIndex }))) {\n startIndex = tag.end;\n tags.push(tag);\n }\n if (debug) console.log(\"findTagsByName found\", tags.length, \"tags\");\n return tags;\n}\n\nmodule.exports = findTagsByName;\n","function getAttribute(tag, attributeName, options) {\n const debug = (options && options.debug) || false;\n if (debug) console.log(\"getting \" + attributeName + \" in \" + tag);\n\n const xml = typeof tag === \"object\" ? tag.outer : tag;\n\n const pattern = `${attributeName}\\\\=\"\\([^\"]*\\)\"`;\n if (debug) console.log(\"pattern:\", pattern);\n\n const re = new RegExp(pattern);\n const match = re.exec(xml);\n if (debug) console.log(\"match:\", match);\n if (match) return match[1];\n}\n\nmodule.exports = getAttribute;\n","function indexOfMatch(xml, pattern, startIndex) {\n const re = new RegExp(pattern);\n const match = re.exec(xml.slice(startIndex));\n if (match) return startIndex + match.index;\n else return -1;\n}\n\nmodule.exports = indexOfMatch;\n","'use strict'\nmodule.exports = function (Yallist) {\n Yallist.prototype[Symbol.iterator] = function* () {\n for (let walker = this.head; walker; walker = walker.next) {\n yield walker.value\n }\n }\n}\n","'use strict'\nmodule.exports = Yallist\n\nYallist.Node = Node\nYallist.create = Yallist\n\nfunction Yallist (list) {\n var self = this\n if (!(self instanceof Yallist)) {\n self = new Yallist()\n }\n\n self.tail = null\n self.head = null\n self.length = 0\n\n if (list && typeof list.forEach === 'function') {\n list.forEach(function (item) {\n self.push(item)\n })\n } else if (arguments.length > 0) {\n for (var i = 0, l = arguments.length; i < l; i++) {\n self.push(arguments[i])\n }\n }\n\n return self\n}\n\nYallist.prototype.removeNode = function (node) {\n if (node.list !== this) {\n throw new Error('removing node which does not belong to this list')\n }\n\n var next = node.next\n var prev = node.prev\n\n if (next) {\n next.prev = prev\n }\n\n if (prev) {\n prev.next = next\n }\n\n if (node === this.head) {\n this.head = next\n }\n if (node === this.tail) {\n this.tail = prev\n }\n\n node.list.length--\n node.next = null\n node.prev = null\n node.list = null\n\n return next\n}\n\nYallist.prototype.unshiftNode = function (node) {\n if (node === this.head) {\n return\n }\n\n if (node.list) {\n node.list.removeNode(node)\n }\n\n var head = this.head\n node.list = this\n node.next = head\n if (head) {\n head.prev = node\n }\n\n this.head = node\n if (!this.tail) {\n this.tail = node\n }\n this.length++\n}\n\nYallist.prototype.pushNode = function (node) {\n if (node === this.tail) {\n return\n }\n\n if (node.list) {\n node.list.removeNode(node)\n }\n\n var tail = this.tail\n node.list = this\n node.prev = tail\n if (tail) {\n tail.next = node\n }\n\n this.tail = node\n if (!this.head) {\n this.head = node\n }\n this.length++\n}\n\nYallist.prototype.push = function () {\n for (var i = 0, l = arguments.length; i < l; i++) {\n push(this, arguments[i])\n }\n return this.length\n}\n\nYallist.prototype.unshift = function () {\n for (var i = 0, l = arguments.length; i < l; i++) {\n unshift(this, arguments[i])\n }\n return this.length\n}\n\nYallist.prototype.pop = function () {\n if (!this.tail) {\n return undefined\n }\n\n var res = this.tail.value\n this.tail = this.tail.prev\n if (this.tail) {\n this.tail.next = null\n } else {\n this.head = null\n }\n this.length--\n return res\n}\n\nYallist.prototype.shift = function () {\n if (!this.head) {\n return undefined\n }\n\n var res = this.head.value\n this.head = this.head.next\n if (this.head) {\n this.head.prev = null\n } else {\n this.tail = null\n }\n this.length--\n return res\n}\n\nYallist.prototype.forEach = function (fn, thisp) {\n thisp = thisp || this\n for (var walker = this.head, i = 0; walker !== null; i++) {\n fn.call(thisp, walker.value, i, this)\n walker = walker.next\n }\n}\n\nYallist.prototype.forEachReverse = function (fn, thisp) {\n thisp = thisp || this\n for (var walker = this.tail, i = this.length - 1; walker !== null; i--) {\n fn.call(thisp, walker.value, i, this)\n walker = walker.prev\n }\n}\n\nYallist.prototype.get = function (n) {\n for (var i = 0, walker = this.head; walker !== null && i < n; i++) {\n // abort out of the list early if we hit a cycle\n walker = walker.next\n }\n if (i === n && walker !== null) {\n return walker.value\n }\n}\n\nYallist.prototype.getReverse = function (n) {\n for (var i = 0, walker = this.tail; walker !== null && i < n; i++) {\n // abort out of the list early if we hit a cycle\n walker = walker.prev\n }\n if (i === n && walker !== null) {\n return walker.value\n }\n}\n\nYallist.prototype.map = function (fn, thisp) {\n thisp = thisp || this\n var res = new Yallist()\n for (var walker = this.head; walker !== null;) {\n res.push(fn.call(thisp, walker.value, this))\n walker = walker.next\n }\n return res\n}\n\nYallist.prototype.mapReverse = function (fn, thisp) {\n thisp = thisp || this\n var res = new Yallist()\n for (var walker = this.tail; walker !== null;) {\n res.push(fn.call(thisp, walker.value, this))\n walker = walker.prev\n }\n return res\n}\n\nYallist.prototype.reduce = function (fn, initial) {\n var acc\n var walker = this.head\n if (arguments.length > 1) {\n acc = initial\n } else if (this.head) {\n walker = this.head.next\n acc = this.head.value\n } else {\n throw new TypeError('Reduce of empty list with no initial value')\n }\n\n for (var i = 0; walker !== null; i++) {\n acc = fn(acc, walker.value, i)\n walker = walker.next\n }\n\n return acc\n}\n\nYallist.prototype.reduceReverse = function (fn, initial) {\n var acc\n var walker = this.tail\n if (arguments.length > 1) {\n acc = initial\n } else if (this.tail) {\n walker = this.tail.prev\n acc = this.tail.value\n } else {\n throw new TypeError('Reduce of empty list with no initial value')\n }\n\n for (var i = this.length - 1; walker !== null; i--) {\n acc = fn(acc, walker.value, i)\n walker = walker.prev\n }\n\n return acc\n}\n\nYallist.prototype.toArray = function () {\n var arr = new Array(this.length)\n for (var i = 0, walker = this.head; walker !== null; i++) {\n arr[i] = walker.value\n walker = walker.next\n }\n return arr\n}\n\nYallist.prototype.toArrayReverse = function () {\n var arr = new Array(this.length)\n for (var i = 0, walker = this.tail; walker !== null; i++) {\n arr[i] = walker.value\n walker = walker.prev\n }\n return arr\n}\n\nYallist.prototype.slice = function (from, to) {\n to = to || this.length\n if (to < 0) {\n to += this.length\n }\n from = from || 0\n if (from < 0) {\n from += this.length\n }\n var ret = new Yallist()\n if (to < from || to < 0) {\n return ret\n }\n if (from < 0) {\n from = 0\n }\n if (to > this.length) {\n to = this.length\n }\n for (var i = 0, walker = this.head; walker !== null && i < from; i++) {\n walker = walker.next\n }\n for (; walker !== null && i < to; i++, walker = walker.next) {\n ret.push(walker.value)\n }\n return ret\n}\n\nYallist.prototype.sliceReverse = function (from, to) {\n to = to || this.length\n if (to < 0) {\n to += this.length\n }\n from = from || 0\n if (from < 0) {\n from += this.length\n }\n var ret = new Yallist()\n if (to < from || to < 0) {\n return ret\n }\n if (from < 0) {\n from = 0\n }\n if (to > this.length) {\n to = this.length\n }\n for (var i = this.length, walker = this.tail; walker !== null && i > to; i--) {\n walker = walker.prev\n }\n for (; walker !== null && i > from; i--, walker = walker.prev) {\n ret.push(walker.value)\n }\n return ret\n}\n\nYallist.prototype.splice = function (start, deleteCount, ...nodes) {\n if (start > this.length) {\n start = this.length - 1\n }\n if (start < 0) {\n start = this.length + start;\n }\n\n for (var i = 0, walker = this.head; walker !== null && i < start; i++) {\n walker = walker.next\n }\n\n var ret = []\n for (var i = 0; walker && i < deleteCount; i++) {\n ret.push(walker.value)\n walker = this.removeNode(walker)\n }\n if (walker === null) {\n walker = this.tail\n }\n\n if (walker !== this.head && walker !== this.tail) {\n walker = walker.prev\n }\n\n for (var i = 0; i < nodes.length; i++) {\n walker = insert(this, walker, nodes[i])\n }\n return ret;\n}\n\nYallist.prototype.reverse = function () {\n var head = this.head\n var tail = this.tail\n for (var walker = head; walker !== null; walker = walker.prev) {\n var p = walker.prev\n walker.prev = walker.next\n walker.next = p\n }\n this.head = tail\n this.tail = head\n return this\n}\n\nfunction insert (self, node, value) {\n var inserted = node === self.head ?\n new Node(value, null, node, self) :\n new Node(value, node, node.next, self)\n\n if (inserted.next === null) {\n self.tail = inserted\n }\n if (inserted.prev === null) {\n self.head = inserted\n }\n\n self.length++\n\n return inserted\n}\n\nfunction push (self, item) {\n self.tail = new Node(item, self.tail, null, self)\n if (!self.head) {\n self.head = self.tail\n }\n self.length++\n}\n\nfunction unshift (self, item) {\n self.head = new Node(item, null, self.head, self)\n if (!self.tail) {\n self.tail = self.head\n }\n self.length++\n}\n\nfunction Node (value, prev, next, list) {\n if (!(this instanceof Node)) {\n return new Node(value, prev, next, list)\n }\n\n this.list = list\n this.value = value\n\n if (prev) {\n prev.next = this\n this.prev = prev\n } else {\n this.prev = null\n }\n\n if (next) {\n next.prev = this\n this.next = next\n } else {\n this.next = null\n }\n}\n\ntry {\n // add if support for Symbol.iterator is present\n require('./iterator.js')(Yallist)\n} catch (er) {}\n",null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,"// algorithm: http://fox-toolkit.org/ftp/fasthalffloatconversion.pdf\n\nconst buffer = new ArrayBuffer(4);\nconst floatView = new Float32Array(buffer);\nconst uint32View = new Uint32Array(buffer);\n\nconst baseTable = new Uint32Array(512);\nconst shiftTable = new Uint32Array(512);\n\nfor (let i = 0; i < 256; ++i) {\n const e = i - 127;\n\n // very small number (0, -0)\n if (e < -27) {\n baseTable[i] = 0x0000;\n baseTable[i | 0x100] = 0x8000;\n shiftTable[i] = 24;\n shiftTable[i | 0x100] = 24;\n\n // small number (denorm)\n } else if (e < -14) {\n baseTable[i] = 0x0400 >> (-e - 14);\n baseTable[i | 0x100] = (0x0400 >> (-e - 14)) | 0x8000;\n shiftTable[i] = -e - 1;\n shiftTable[i | 0x100] = -e - 1;\n\n // normal number\n } else if (e <= 15) {\n baseTable[i] = (e + 15) << 10;\n baseTable[i | 0x100] = ((e + 15) << 10) | 0x8000;\n shiftTable[i] = 13;\n shiftTable[i | 0x100] = 13;\n\n // large number (Infinity, -Infinity)\n } else if (e < 128) {\n baseTable[i] = 0x7c00;\n baseTable[i | 0x100] = 0xfc00;\n shiftTable[i] = 24;\n shiftTable[i | 0x100] = 24;\n\n // stay (NaN, Infinity, -Infinity)\n } else {\n baseTable[i] = 0x7c00;\n baseTable[i | 0x100] = 0xfc00;\n shiftTable[i] = 13;\n shiftTable[i | 0x100] = 13;\n }\n}\n\n/**\n * round a number to a half float number bits.\n * @param {number} num - double float\n * @returns {number} half float number bits\n */\nexport function roundToFloat16Bits(num) {\n floatView[0] = num;\n const f = uint32View[0];\n const e = (f >> 23) & 0x1ff;\n return baseTable[e] + ((f & 0x007fffff) >> shiftTable[e]);\n}\n\nconst mantissaTable = new Uint32Array(2048);\nconst exponentTable = new Uint32Array(64);\nconst offsetTable = new Uint32Array(64);\n\nmantissaTable[0] = 0;\nfor (let i = 1; i < 1024; ++i) {\n let m = i << 13; // zero pad mantissa bits\n let e = 0; // zero exponent\n\n // normalized\n while((m & 0x00800000) === 0) {\n e -= 0x00800000; // decrement exponent\n m <<= 1;\n }\n\n m &= ~0x00800000; // clear leading 1 bit\n e += 0x38800000; // adjust bias\n\n mantissaTable[i] = m | e;\n}\nfor (let i = 1024; i < 2048; ++i) {\n mantissaTable[i] = 0x38000000 + ((i - 1024) << 13);\n}\n\nexponentTable[0] = 0;\nfor (let i = 1; i < 31; ++i) {\n exponentTable[i] = i << 23;\n}\nexponentTable[31] = 0x47800000;\nexponentTable[32] = 0x80000000;\nfor (let i = 33; i < 63; ++i) {\n exponentTable[i] = 0x80000000 + ((i - 32) << 23);\n}\nexponentTable[63] = 0xc7800000;\n\noffsetTable[0] = 0;\nfor (let i = 1; i < 64; ++i) {\n if (i === 32) {\n offsetTable[i] = 0;\n } else {\n offsetTable[i] = 1024;\n }\n}\n\n/**\n * convert a half float number bits to a number.\n * @param {number} float16bits - half float number bits\n * @returns {number} double float\n */\nexport function convertToNumber(float16bits) {\n const m = float16bits >> 10;\n uint32View[0] = mantissaTable[offsetTable[m] + (float16bits & 0x3ff)] + exponentTable[m];\n return floatView[0];\n}\n",null,null,null,null,null,null,"/**\n * @param {unknown} value\n * @returns {value is object}\n */\nexport function isObject(value) {\n return (value !== null && typeof value === \"object\") || typeof value === \"function\";\n}\n\n/**\n * @param {unknown} value\n * @returns {value is object}\n */\nexport function isObjectLike(value) {\n return value !== null && typeof value === \"object\";\n}\n\n// Inspired by util.types implementation of Node.js\nconst TypedArrayPrototype = Reflect.getPrototypeOf(Uint8Array).prototype;\nconst getTypedArrayPrototypeSybolToStringTag = Reflect.getOwnPropertyDescriptor(TypedArrayPrototype, Symbol.toStringTag).get;\n\n/**\n * @param {unknown} value\n * @returns {value is Uint8Array|Uint8ClampedArray|Uint16Array|Uint32Array|Int8Array|Int16Array|Int32Array|Float32Array|Float64Array|BigUint64Array|BigInt64Array}\n */\nexport function isTypedArray(value) {\n return getTypedArrayPrototypeSybolToStringTag.call(value) !== undefined;\n}\n\n/**\n * @param {unknown} value\n * @returns {value is Uint16Array}\n */\nexport function isUint16Array(value) {\n return getTypedArrayPrototypeSybolToStringTag.call(value) === \"Uint16Array\";\n}\n\nconst toString = Object.prototype.toString;\n\n/**\n * @param {unknown} value\n * @returns {value is DataView}\n */\nexport function isDataView(value) {\n if (!ArrayBuffer.isView(value)) {\n return false;\n }\n\n if (isTypedArray(value)) {\n return false;\n }\n\n if (toString.call(value) !== \"[object DataView]\") {\n return false;\n }\n\n return true;\n}\n\n/**\n * @param {unknown} value\n * @returns {value is ArrayBuffer}\n */\nexport function isArrayBuffer(value) {\n return isObjectLike(value) && toString.call(value) === \"[object ArrayBuffer]\";\n}\n\n/**\n * @param {unknown} value\n * @returns {value is SharedArrayBuffer}\n */\nexport function isSharedArrayBuffer(value) {\n return isObjectLike(value) && toString.call(value) === \"[object SharedArrayBuffer]\";\n}\n\n/**\n * @param {unknown} value\n * @returns {value is Iterable}\n */\nexport function isIterable(value) {\n return isObject(value) && typeof value[Symbol.iterator] === \"function\";\n}\n\n/**\n * @param {unknown} value\n * @returns {value is any[]}\n */\nexport function isOrdinaryArray(value) {\n if (!Array.isArray(value)) {\n return false;\n }\n\n const iterator = value[Symbol.iterator]();\n if (toString.call(iterator) !== \"[object Array Iterator]\") {\n return false;\n }\n\n return true;\n}\n\n/**\n * @param {unknown} value\n * @returns {value is any[]}\n */\nexport function isOrdinaryTypedArray(value) {\n if (!isTypedArray(value)) {\n return false;\n }\n\n const iterator = value[Symbol.iterator]();\n if (toString.call(iterator) !== \"[object Array Iterator]\") {\n return false;\n }\n\n return true;\n}\n\n/**\n * @param {unknown} value\n * @returns {value is string}\n */\nexport function isCanonicalIntegerIndexString(value) {\n if (typeof value !== \"string\") {\n return false;\n }\n\n const number = Number(value);\n if (value !== number + \"\") {\n return false;\n }\n\n if (!Number.isFinite(number)) {\n return false;\n }\n\n if (number !== Math.trunc(number)) {\n return false;\n }\n\n return true;\n}\n","import { convertToNumber, roundToFloat16Bits } from \"./helper/converter.mjs\";\nimport { isDataView } from \"./helper/is.mjs\";\n\n/**\n * returns an unsigned 16-bit float at the specified byte offset from the start of the DataView.\n * @param {DataView} dataView\n * @param {number} byteOffset\n * @param {[boolean]} opts\n * @returns {number}\n */\nexport function getFloat16(dataView, byteOffset, ...opts) {\n if (!isDataView(dataView)) {\n throw new TypeError(\"First argument to getFloat16 function must be a DataView\");\n }\n\n return convertToNumber( dataView.getUint16(byteOffset, ...opts) );\n}\n\n/**\n * stores an unsigned 16-bit float value at the specified byte offset from the start of the DataView.\n * @param {DataView} dataView\n * @param {number} byteOffset\n * @param {number} value\n * @param {[boolean]} opts\n */\nexport function setFloat16(dataView, byteOffset, value, ...opts) {\n if (!isDataView(dataView)) {\n throw new TypeError(\"First argument to setFloat16 function must be a DataView\");\n }\n\n dataView.setUint16(byteOffset, roundToFloat16Bits(value), ...opts);\n}\n","export function fromWhiteIsZero(raster, max) {\n const { width, height } = raster;\n const rgbRaster = new Uint8Array(width * height * 3);\n let value;\n for (let i = 0, j = 0; i < raster.length; ++i, j += 3) {\n value = 256 - (raster[i] / max * 256);\n rgbRaster[j] = value;\n rgbRaster[j + 1] = value;\n rgbRaster[j + 2] = value;\n }\n return rgbRaster;\n}\n\nexport function fromBlackIsZero(raster, max) {\n const { width, height } = raster;\n const rgbRaster = new Uint8Array(width * height * 3);\n let value;\n for (let i = 0, j = 0; i < raster.length; ++i, j += 3) {\n value = raster[i] / max * 256;\n rgbRaster[j] = value;\n rgbRaster[j + 1] = value;\n rgbRaster[j + 2] = value;\n }\n return rgbRaster;\n}\n\nexport function fromPalette(raster, colorMap) {\n const { width, height } = raster;\n const rgbRaster = new Uint8Array(width * height * 3);\n const greenOffset = colorMap.length / 3;\n const blueOffset = colorMap.length / 3 * 2;\n for (let i = 0, j = 0; i < raster.length; ++i, j += 3) {\n const mapIndex = raster[i];\n rgbRaster[j] = colorMap[mapIndex] / 65536 * 256;\n rgbRaster[j + 1] = colorMap[mapIndex + greenOffset] / 65536 * 256;\n rgbRaster[j + 2] = colorMap[mapIndex + blueOffset] / 65536 * 256;\n }\n return rgbRaster;\n}\n\nexport function fromCMYK(cmykRaster) {\n const { width, height } = cmykRaster;\n const rgbRaster = new Uint8Array(width * height * 3);\n for (let i = 0, j = 0; i < cmykRaster.length; i += 4, j += 3) {\n const c = cmykRaster[i];\n const m = cmykRaster[i + 1];\n const y = cmykRaster[i + 2];\n const k = cmykRaster[i + 3];\n\n rgbRaster[j] = 255 * ((255 - c) / 256) * ((255 - k) / 256);\n rgbRaster[j + 1] = 255 * ((255 - m) / 256) * ((255 - k) / 256);\n rgbRaster[j + 2] = 255 * ((255 - y) / 256) * ((255 - k) / 256);\n }\n return rgbRaster;\n}\n\nexport function fromYCbCr(yCbCrRaster) {\n const { width, height } = yCbCrRaster;\n const rgbRaster = new Uint8ClampedArray(width * height * 3);\n for (let i = 0, j = 0; i < yCbCrRaster.length; i += 3, j += 3) {\n const y = yCbCrRaster[i];\n const cb = yCbCrRaster[i + 1];\n const cr = yCbCrRaster[i + 2];\n\n rgbRaster[j] = (y + (1.40200 * (cr - 0x80)));\n rgbRaster[j + 1] = (y - (0.34414 * (cb - 0x80)) - (0.71414 * (cr - 0x80)));\n rgbRaster[j + 2] = (y + (1.77200 * (cb - 0x80)));\n }\n return rgbRaster;\n}\n\nconst Xn = 0.95047;\nconst Yn = 1.00000;\nconst Zn = 1.08883;\n\n// from https://github.com/antimatter15/rgb-lab/blob/master/color.js\n\nexport function fromCIELab(cieLabRaster) {\n const { width, height } = cieLabRaster;\n const rgbRaster = new Uint8Array(width * height * 3);\n\n for (let i = 0, j = 0; i < cieLabRaster.length; i += 3, j += 3) {\n const L = cieLabRaster[i + 0];\n const a_ = cieLabRaster[i + 1] << 24 >> 24; // conversion from uint8 to int8\n const b_ = cieLabRaster[i + 2] << 24 >> 24; // same\n\n let y = (L + 16) / 116;\n let x = (a_ / 500) + y;\n let z = y - (b_ / 200);\n let r;\n let g;\n let b;\n\n x = Xn * ((x * x * x > 0.008856) ? x * x * x : (x - (16 / 116)) / 7.787);\n y = Yn * ((y * y * y > 0.008856) ? y * y * y : (y - (16 / 116)) / 7.787);\n z = Zn * ((z * z * z > 0.008856) ? z * z * z : (z - (16 / 116)) / 7.787);\n\n r = (x * 3.2406) + (y * -1.5372) + (z * -0.4986);\n g = (x * -0.9689) + (y * 1.8758) + (z * 0.0415);\n b = (x * 0.0557) + (y * -0.2040) + (z * 1.0570);\n\n r = (r > 0.0031308) ? ((1.055 * (r ** (1 / 2.4))) - 0.055) : 12.92 * r;\n g = (g > 0.0031308) ? ((1.055 * (g ** (1 / 2.4))) - 0.055) : 12.92 * g;\n b = (b > 0.0031308) ? ((1.055 * (b ** (1 / 2.4))) - 0.055) : 12.92 * b;\n\n rgbRaster[j] = Math.max(0, Math.min(1, r)) * 255;\n rgbRaster[j + 1] = Math.max(0, Math.min(1, g)) * 255;\n rgbRaster[j + 2] = Math.max(0, Math.min(1, b)) * 255;\n }\n return rgbRaster;\n}\n","const registry = new Map();\n\nexport function addDecoder(cases, importFn) {\n if (!Array.isArray(cases)) {\n cases = [cases]; // eslint-disable-line no-param-reassign\n }\n cases.forEach((c) => registry.set(c, importFn));\n}\n\nexport async function getDecoder(fileDirectory) {\n const importFn = registry.get(fileDirectory.Compression);\n if (!importFn) {\n throw new Error(`Unknown compression method identifier: ${fileDirectory.Compression}`);\n }\n const Decoder = await importFn();\n return new Decoder(fileDirectory);\n}\n\n// Add default decoders to registry (end-user may override with other implementations)\naddDecoder([undefined, 1], () => import('./raw.js').then((m) => m.default));\naddDecoder(5, () => import('./lzw.js').then((m) => m.default));\naddDecoder(6, () => {\n throw new Error('old style JPEG compression is not supported.');\n});\naddDecoder(7, () => import('./jpeg.js').then((m) => m.default));\naddDecoder([8, 32946], () => import('./deflate.js').then((m) => m.default));\naddDecoder(32773, () => import('./packbits.js').then((m) => m.default));\naddDecoder(34887, () => import('./lerc.js').then((m) => m.default));\naddDecoder(50001, () => import('./webimage.js').then((m) => m.default));\n","/**\n * @module resample\n */\n\nfunction copyNewSize(array, width, height, samplesPerPixel = 1) {\n return new (Object.getPrototypeOf(array).constructor)(width * height * samplesPerPixel);\n}\n\n/**\n * Resample the input arrays using nearest neighbor value selection.\n * @param {TypedArray[]} valueArrays The input arrays to resample\n * @param {number} inWidth The width of the input rasters\n * @param {number} inHeight The height of the input rasters\n * @param {number} outWidth The desired width of the output rasters\n * @param {number} outHeight The desired height of the output rasters\n * @returns {TypedArray[]} The resampled rasters\n */\nexport function resampleNearest(valueArrays, inWidth, inHeight, outWidth, outHeight) {\n const relX = inWidth / outWidth;\n const relY = inHeight / outHeight;\n return valueArrays.map((array) => {\n const newArray = copyNewSize(array, outWidth, outHeight);\n for (let y = 0; y < outHeight; ++y) {\n const cy = Math.min(Math.round(relY * y), inHeight - 1);\n for (let x = 0; x < outWidth; ++x) {\n const cx = Math.min(Math.round(relX * x), inWidth - 1);\n const value = array[(cy * inWidth) + cx];\n newArray[(y * outWidth) + x] = value;\n }\n }\n return newArray;\n });\n}\n\n// simple linear interpolation, code from:\n// https://en.wikipedia.org/wiki/Linear_interpolation#Programming_language_support\nfunction lerp(v0, v1, t) {\n return ((1 - t) * v0) + (t * v1);\n}\n\n/**\n * Resample the input arrays using bilinear interpolation.\n * @param {TypedArray[]} valueArrays The input arrays to resample\n * @param {number} inWidth The width of the input rasters\n * @param {number} inHeight The height of the input rasters\n * @param {number} outWidth The desired width of the output rasters\n * @param {number} outHeight The desired height of the output rasters\n * @returns {TypedArray[]} The resampled rasters\n */\nexport function resampleBilinear(valueArrays, inWidth, inHeight, outWidth, outHeight) {\n const relX = inWidth / outWidth;\n const relY = inHeight / outHeight;\n\n return valueArrays.map((array) => {\n const newArray = copyNewSize(array, outWidth, outHeight);\n for (let y = 0; y < outHeight; ++y) {\n const rawY = relY * y;\n\n const yl = Math.floor(rawY);\n const yh = Math.min(Math.ceil(rawY), (inHeight - 1));\n\n for (let x = 0; x < outWidth; ++x) {\n const rawX = relX * x;\n const tx = rawX % 1;\n\n const xl = Math.floor(rawX);\n const xh = Math.min(Math.ceil(rawX), (inWidth - 1));\n\n const ll = array[(yl * inWidth) + xl];\n const hl = array[(yl * inWidth) + xh];\n const lh = array[(yh * inWidth) + xl];\n const hh = array[(yh * inWidth) + xh];\n\n const value = lerp(\n lerp(ll, hl, tx),\n lerp(lh, hh, tx),\n rawY % 1,\n );\n newArray[(y * outWidth) + x] = value;\n }\n }\n return newArray;\n });\n}\n\n/**\n * Resample the input arrays using the selected resampling method.\n * @param {TypedArray[]} valueArrays The input arrays to resample\n * @param {number} inWidth The width of the input rasters\n * @param {number} inHeight The height of the input rasters\n * @param {number} outWidth The desired width of the output rasters\n * @param {number} outHeight The desired height of the output rasters\n * @param {string} [method = 'nearest'] The desired resampling method\n * @returns {TypedArray[]} The resampled rasters\n */\nexport function resample(valueArrays, inWidth, inHeight, outWidth, outHeight, method = 'nearest') {\n switch (method.toLowerCase()) {\n case 'nearest':\n return resampleNearest(valueArrays, inWidth, inHeight, outWidth, outHeight);\n case 'bilinear':\n case 'linear':\n return resampleBilinear(valueArrays, inWidth, inHeight, outWidth, outHeight);\n default:\n throw new Error(`Unsupported resampling method: '${method}'`);\n }\n}\n\n/**\n * Resample the pixel interleaved input array using nearest neighbor value selection.\n * @param {TypedArray} valueArrays The input arrays to resample\n * @param {number} inWidth The width of the input rasters\n * @param {number} inHeight The height of the input rasters\n * @param {number} outWidth The desired width of the output rasters\n * @param {number} outHeight The desired height of the output rasters\n * @param {number} samples The number of samples per pixel for pixel\n * interleaved data\n * @returns {TypedArray} The resampled raster\n */\nexport function resampleNearestInterleaved(\n valueArray, inWidth, inHeight, outWidth, outHeight, samples) {\n const relX = inWidth / outWidth;\n const relY = inHeight / outHeight;\n\n const newArray = copyNewSize(valueArray, outWidth, outHeight, samples);\n for (let y = 0; y < outHeight; ++y) {\n const cy = Math.min(Math.round(relY * y), inHeight - 1);\n for (let x = 0; x < outWidth; ++x) {\n const cx = Math.min(Math.round(relX * x), inWidth - 1);\n for (let i = 0; i < samples; ++i) {\n const value = valueArray[(cy * inWidth * samples) + (cx * samples) + i];\n newArray[(y * outWidth * samples) + (x * samples) + i] = value;\n }\n }\n }\n return newArray;\n}\n\n/**\n * Resample the pixel interleaved input array using bilinear interpolation.\n * @param {TypedArray} valueArrays The input arrays to resample\n * @param {number} inWidth The width of the input rasters\n * @param {number} inHeight The height of the input rasters\n * @param {number} outWidth The desired width of the output rasters\n * @param {number} outHeight The desired height of the output rasters\n * @param {number} samples The number of samples per pixel for pixel\n * interleaved data\n * @returns {TypedArray} The resampled raster\n */\nexport function resampleBilinearInterleaved(\n valueArray, inWidth, inHeight, outWidth, outHeight, samples) {\n const relX = inWidth / outWidth;\n const relY = inHeight / outHeight;\n const newArray = copyNewSize(valueArray, outWidth, outHeight, samples);\n for (let y = 0; y < outHeight; ++y) {\n const rawY = relY * y;\n\n const yl = Math.floor(rawY);\n const yh = Math.min(Math.ceil(rawY), (inHeight - 1));\n\n for (let x = 0; x < outWidth; ++x) {\n const rawX = relX * x;\n const tx = rawX % 1;\n\n const xl = Math.floor(rawX);\n const xh = Math.min(Math.ceil(rawX), (inWidth - 1));\n\n for (let i = 0; i < samples; ++i) {\n const ll = valueArray[(yl * inWidth * samples) + (xl * samples) + i];\n const hl = valueArray[(yl * inWidth * samples) + (xh * samples) + i];\n const lh = valueArray[(yh * inWidth * samples) + (xl * samples) + i];\n const hh = valueArray[(yh * inWidth * samples) + (xh * samples) + i];\n\n const value = lerp(\n lerp(ll, hl, tx),\n lerp(lh, hh, tx),\n rawY % 1,\n );\n newArray[(y * outWidth * samples) + (x * samples) + i] = value;\n }\n }\n }\n return newArray;\n}\n\n/**\n * Resample the pixel interleaved input array using the selected resampling method.\n * @param {TypedArray} valueArray The input array to resample\n * @param {number} inWidth The width of the input rasters\n * @param {number} inHeight The height of the input rasters\n * @param {number} outWidth The desired width of the output rasters\n * @param {number} outHeight The desired height of the output rasters\n * @param {number} samples The number of samples per pixel for pixel\n * interleaved data\n * @param {string} [method = 'nearest'] The desired resampling method\n * @returns {TypedArray} The resampled rasters\n */\nexport function resampleInterleaved(valueArray, inWidth, inHeight, outWidth, outHeight, samples, method = 'nearest') {\n switch (method.toLowerCase()) {\n case 'nearest':\n return resampleNearestInterleaved(\n valueArray, inWidth, inHeight, outWidth, outHeight, samples,\n );\n case 'bilinear':\n case 'linear':\n return resampleBilinearInterleaved(\n valueArray, inWidth, inHeight, outWidth, outHeight, samples,\n );\n default:\n throw new Error(`Unsupported resampling method: '${method}'`);\n }\n}\n","/** @module geotiffimage */\nimport { getFloat16 } from '@petamoriken/float16';\nimport getAttribute from 'xml-utils/get-attribute.js';\nimport findTagsByName from 'xml-utils/find-tags-by-name.js';\n\nimport { photometricInterpretations, ExtraSamplesValues } from './globals.js';\nimport { fromWhiteIsZero, fromBlackIsZero, fromPalette, fromCMYK, fromYCbCr, fromCIELab } from './rgb.js';\nimport { getDecoder } from './compression/index.js';\nimport { resample, resampleInterleaved } from './resample.js';\n\n/**\n * @typedef {Object} ReadRasterOptions\n * @property {Array} [window=whole window] the subset to read data from in pixels.\n * @property {Array} [bbox=whole image] the subset to read data from in\n * geographical coordinates.\n * @property {Array} [samples=all samples] the selection of samples to read from. Default is all samples.\n * @property {boolean} [interleave=false] whether the data shall be read\n * in one single array or separate\n * arrays.\n * @property {Pool} [pool=null] The optional decoder pool to use.\n * @property {number} [width] The desired width of the output. When the width is not the\n * same as the images, resampling will be performed.\n * @property {number} [height] The desired height of the output. When the width is not the\n * same as the images, resampling will be performed.\n * @property {string} [resampleMethod='nearest'] The desired resampling method.\n * @property {AbortSignal} [signal] An AbortSignal that may be signalled if the request is\n * to be aborted\n * @property {number|number[]} [fillValue] The value to use for parts of the image\n * outside of the images extent. When multiple\n * samples are requested, an array of fill values\n * can be passed.\n */\n\n/** @typedef {import(\"./geotiff.js\").TypedArray} TypedArray */\n\nfunction sum(array, start, end) {\n let s = 0;\n for (let i = start; i < end; ++i) {\n s += array[i];\n }\n return s;\n}\n\nfunction arrayForType(format, bitsPerSample, size) {\n switch (format) {\n case 1: // unsigned integer data\n if (bitsPerSample <= 8) {\n return new Uint8Array(size);\n } else if (bitsPerSample <= 16) {\n return new Uint16Array(size);\n } else if (bitsPerSample <= 32) {\n return new Uint32Array(size);\n }\n break;\n case 2: // twos complement signed integer data\n if (bitsPerSample === 8) {\n return new Int8Array(size);\n } else if (bitsPerSample === 16) {\n return new Int16Array(size);\n } else if (bitsPerSample === 32) {\n return new Int32Array(size);\n }\n break;\n case 3: // floating point data\n switch (bitsPerSample) {\n case 16:\n case 32:\n return new Float32Array(size);\n case 64:\n return new Float64Array(size);\n default:\n break;\n }\n break;\n default:\n break;\n }\n throw Error('Unsupported data format/bitsPerSample');\n}\n\nfunction needsNormalization(format, bitsPerSample) {\n if ((format === 1 || format === 2) && bitsPerSample <= 32 && bitsPerSample % 8 === 0) {\n return false;\n } else if (format === 3 && (bitsPerSample === 16 || bitsPerSample === 32 || bitsPerSample === 64)) {\n return false;\n }\n return true;\n}\n\nfunction normalizeArray(inBuffer, format, planarConfiguration, samplesPerPixel, bitsPerSample, tileWidth, tileHeight) {\n // const inByteArray = new Uint8Array(inBuffer);\n const view = new DataView(inBuffer);\n const outSize = planarConfiguration === 2\n ? tileHeight * tileWidth\n : tileHeight * tileWidth * samplesPerPixel;\n const samplesToTransfer = planarConfiguration === 2\n ? 1 : samplesPerPixel;\n const outArray = arrayForType(format, bitsPerSample, outSize);\n // let pixel = 0;\n\n const bitMask = parseInt('1'.repeat(bitsPerSample), 2);\n\n if (format === 1) { // unsigned integer\n // translation of https://github.com/OSGeo/gdal/blob/master/gdal/frmts/gtiff/geotiff.cpp#L7337\n let pixelBitSkip;\n // let sampleBitOffset = 0;\n if (planarConfiguration === 1) {\n pixelBitSkip = samplesPerPixel * bitsPerSample;\n // sampleBitOffset = (samplesPerPixel - 1) * bitsPerSample;\n } else {\n pixelBitSkip = bitsPerSample;\n }\n\n // Bits per line rounds up to next byte boundary.\n let bitsPerLine = tileWidth * pixelBitSkip;\n if ((bitsPerLine & 7) !== 0) {\n bitsPerLine = (bitsPerLine + 7) & (~7);\n }\n\n for (let y = 0; y < tileHeight; ++y) {\n const lineBitOffset = y * bitsPerLine;\n for (let x = 0; x < tileWidth; ++x) {\n const pixelBitOffset = lineBitOffset + (x * samplesToTransfer * bitsPerSample);\n for (let i = 0; i < samplesToTransfer; ++i) {\n const bitOffset = pixelBitOffset + (i * bitsPerSample);\n const outIndex = (((y * tileWidth) + x) * samplesToTransfer) + i;\n\n const byteOffset = Math.floor(bitOffset / 8);\n const innerBitOffset = bitOffset % 8;\n if (innerBitOffset + bitsPerSample <= 8) {\n outArray[outIndex] = (view.getUint8(byteOffset) >> (8 - bitsPerSample) - innerBitOffset) & bitMask;\n } else if (innerBitOffset + bitsPerSample <= 16) {\n outArray[outIndex] = (view.getUint16(byteOffset) >> (16 - bitsPerSample) - innerBitOffset) & bitMask;\n } else if (innerBitOffset + bitsPerSample <= 24) {\n const raw = (view.getUint16(byteOffset) << 8) | (view.getUint8(byteOffset + 2));\n outArray[outIndex] = (raw >> (24 - bitsPerSample) - innerBitOffset) & bitMask;\n } else {\n outArray[outIndex] = (view.getUint32(byteOffset) >> (32 - bitsPerSample) - innerBitOffset) & bitMask;\n }\n\n // let outWord = 0;\n // for (let bit = 0; bit < bitsPerSample; ++bit) {\n // if (inByteArray[bitOffset >> 3]\n // & (0x80 >> (bitOffset & 7))) {\n // outWord |= (1 << (bitsPerSample - 1 - bit));\n // }\n // ++bitOffset;\n // }\n\n // outArray[outIndex] = outWord;\n // outArray[pixel] = outWord;\n // pixel += 1;\n }\n // bitOffset = bitOffset + pixelBitSkip - bitsPerSample;\n }\n }\n } else if (format === 3) { // floating point\n // Float16 is handled elsewhere\n // normalize 16/24 bit floats to 32 bit floats in the array\n // console.time();\n // if (bitsPerSample === 16) {\n // for (let byte = 0, outIndex = 0; byte < inBuffer.byteLength; byte += 2, ++outIndex) {\n // outArray[outIndex] = getFloat16(view, byte);\n // }\n // }\n // console.timeEnd()\n }\n\n return outArray.buffer;\n}\n\n/**\n * GeoTIFF sub-file image.\n */\nclass GeoTIFFImage {\n /**\n * @constructor\n * @param {Object} fileDirectory The parsed file directory\n * @param {Object} geoKeys The parsed geo-keys\n * @param {DataView} dataView The DataView for the underlying file.\n * @param {Boolean} littleEndian Whether the file is encoded in little or big endian\n * @param {Boolean} cache Whether or not decoded tiles shall be cached\n * @param {Source} source The datasource to read from\n */\n constructor(fileDirectory, geoKeys, dataView, littleEndian, cache, source) {\n this.fileDirectory = fileDirectory;\n this.geoKeys = geoKeys;\n this.dataView = dataView;\n this.littleEndian = littleEndian;\n this.tiles = cache ? {} : null;\n this.isTiled = !fileDirectory.StripOffsets;\n const planarConfiguration = fileDirectory.PlanarConfiguration;\n this.planarConfiguration = (typeof planarConfiguration === 'undefined') ? 1 : planarConfiguration;\n if (this.planarConfiguration !== 1 && this.planarConfiguration !== 2) {\n throw new Error('Invalid planar configuration.');\n }\n\n this.source = source;\n }\n\n /**\n * Returns the associated parsed file directory.\n * @returns {Object} the parsed file directory\n */\n getFileDirectory() {\n return this.fileDirectory;\n }\n\n /**\n * Returns the associated parsed geo keys.\n * @returns {Object} the parsed geo keys\n */\n getGeoKeys() {\n return this.geoKeys;\n }\n\n /**\n * Returns the width of the image.\n * @returns {Number} the width of the image\n */\n getWidth() {\n return this.fileDirectory.ImageWidth;\n }\n\n /**\n * Returns the height of the image.\n * @returns {Number} the height of the image\n */\n getHeight() {\n return this.fileDirectory.ImageLength;\n }\n\n /**\n * Returns the number of samples per pixel.\n * @returns {Number} the number of samples per pixel\n */\n getSamplesPerPixel() {\n return typeof this.fileDirectory.SamplesPerPixel !== 'undefined'\n ? this.fileDirectory.SamplesPerPixel : 1;\n }\n\n /**\n * Returns the width of each tile.\n * @returns {Number} the width of each tile\n */\n getTileWidth() {\n return this.isTiled ? this.fileDirectory.TileWidth : this.getWidth();\n }\n\n /**\n * Returns the height of each tile.\n * @returns {Number} the height of each tile\n */\n getTileHeight() {\n if (this.isTiled) {\n return this.fileDirectory.TileLength;\n }\n if (typeof this.fileDirectory.RowsPerStrip !== 'undefined') {\n return Math.min(this.fileDirectory.RowsPerStrip, this.getHeight());\n }\n return this.getHeight();\n }\n\n getBlockWidth() {\n return this.getTileWidth();\n }\n\n getBlockHeight(y) {\n if (this.isTiled || (y + 1) * this.getTileHeight() <= this.getHeight()) {\n return this.getTileHeight();\n } else {\n return this.getHeight() - (y * this.getTileHeight());\n }\n }\n\n /**\n * Calculates the number of bytes for each pixel across all samples. Only full\n * bytes are supported, an exception is thrown when this is not the case.\n * @returns {Number} the bytes per pixel\n */\n getBytesPerPixel() {\n let bytes = 0;\n for (let i = 0; i < this.fileDirectory.BitsPerSample.length; ++i) {\n bytes += this.getSampleByteSize(i);\n }\n return bytes;\n }\n\n getSampleByteSize(i) {\n if (i >= this.fileDirectory.BitsPerSample.length) {\n throw new RangeError(`Sample index ${i} is out of range.`);\n }\n return Math.ceil(this.fileDirectory.BitsPerSample[i] / 8);\n }\n\n getReaderForSample(sampleIndex) {\n const format = this.fileDirectory.SampleFormat\n ? this.fileDirectory.SampleFormat[sampleIndex] : 1;\n const bitsPerSample = this.fileDirectory.BitsPerSample[sampleIndex];\n switch (format) {\n case 1: // unsigned integer data\n if (bitsPerSample <= 8) {\n return DataView.prototype.getUint8;\n } else if (bitsPerSample <= 16) {\n return DataView.prototype.getUint16;\n } else if (bitsPerSample <= 32) {\n return DataView.prototype.getUint32;\n }\n break;\n case 2: // twos complement signed integer data\n if (bitsPerSample <= 8) {\n return DataView.prototype.getInt8;\n } else if (bitsPerSample <= 16) {\n return DataView.prototype.getInt16;\n } else if (bitsPerSample <= 32) {\n return DataView.prototype.getInt32;\n }\n break;\n case 3:\n switch (bitsPerSample) {\n case 16:\n return function (offset, littleEndian) {\n return getFloat16(this, offset, littleEndian);\n };\n case 32:\n return DataView.prototype.getFloat32;\n case 64:\n return DataView.prototype.getFloat64;\n default:\n break;\n }\n break;\n default:\n break;\n }\n throw Error('Unsupported data format/bitsPerSample');\n }\n\n getSampleFormat(sampleIndex = 0) {\n return this.fileDirectory.SampleFormat\n ? this.fileDirectory.SampleFormat[sampleIndex] : 1;\n }\n\n getBitsPerSample(sampleIndex = 0) {\n return this.fileDirectory.BitsPerSample[sampleIndex];\n }\n\n getArrayForSample(sampleIndex, size) {\n const format = this.getSampleFormat(sampleIndex);\n const bitsPerSample = this.getBitsPerSample(sampleIndex);\n return arrayForType(format, bitsPerSample, size);\n }\n\n /**\n * Returns the decoded strip or tile.\n * @param {Number} x the strip or tile x-offset\n * @param {Number} y the tile y-offset (0 for stripped images)\n * @param {Number} sample the sample to get for separated samples\n * @param {import(\"./geotiff\").Pool|AbstractDecoder} poolOrDecoder the decoder or decoder pool\n * @param {AbortSignal} [signal] An AbortSignal that may be signalled if the request is\n * to be aborted\n * @returns {Promise.}\n */\n async getTileOrStrip(x, y, sample, poolOrDecoder, signal) {\n const numTilesPerRow = Math.ceil(this.getWidth() / this.getTileWidth());\n const numTilesPerCol = Math.ceil(this.getHeight() / this.getTileHeight());\n let index;\n const { tiles } = this;\n if (this.planarConfiguration === 1) {\n index = (y * numTilesPerRow) + x;\n } else if (this.planarConfiguration === 2) {\n index = (sample * numTilesPerRow * numTilesPerCol) + (y * numTilesPerRow) + x;\n }\n\n let offset;\n let byteCount;\n if (this.isTiled) {\n offset = this.fileDirectory.TileOffsets[index];\n byteCount = this.fileDirectory.TileByteCounts[index];\n } else {\n offset = this.fileDirectory.StripOffsets[index];\n byteCount = this.fileDirectory.StripByteCounts[index];\n }\n const slice = (await this.source.fetch([{ offset, length: byteCount }], signal))[0];\n\n let request;\n if (tiles === null || !tiles[index]) {\n // resolve each request by potentially applying array normalization\n request = (async () => {\n let data = await poolOrDecoder.decode(this.fileDirectory, slice);\n const sampleFormat = this.getSampleFormat();\n const bitsPerSample = this.getBitsPerSample();\n if (needsNormalization(sampleFormat, bitsPerSample)) {\n data = normalizeArray(\n data,\n sampleFormat,\n this.planarConfiguration,\n this.getSamplesPerPixel(),\n bitsPerSample,\n this.getTileWidth(),\n this.getBlockHeight(y),\n );\n }\n return data;\n })();\n\n // set the cache\n if (tiles !== null) {\n tiles[index] = request;\n }\n } else {\n // get from the cache\n request = tiles[index];\n }\n\n // cache the tile request\n return { x, y, sample, data: await request };\n }\n\n /**\n * Internal read function.\n * @private\n * @param {Array} imageWindow The image window in pixel coordinates\n * @param {Array} samples The selected samples (0-based indices)\n * @param {TypedArray[]|TypedArray} valueArrays The array(s) to write into\n * @param {Boolean} interleave Whether or not to write in an interleaved manner\n * @param {import(\"./geotiff\").Pool|AbstractDecoder} poolOrDecoder the decoder or decoder pool\n * @param {number} width the width of window to be read into\n * @param {number} height the height of window to be read into\n * @param {number} resampleMethod the resampling method to be used when interpolating\n * @param {AbortSignal} [signal] An AbortSignal that may be signalled if the request is\n * to be aborted\n * @returns {Promise|Promise}\n */\n async _readRaster(imageWindow, samples, valueArrays, interleave, poolOrDecoder, width,\n height, resampleMethod, signal) {\n const tileWidth = this.getTileWidth();\n const tileHeight = this.getTileHeight();\n const imageWidth = this.getWidth();\n const imageHeight = this.getHeight();\n\n const minXTile = Math.max(Math.floor(imageWindow[0] / tileWidth), 0);\n const maxXTile = Math.min(\n Math.ceil(imageWindow[2] / tileWidth),\n Math.ceil(imageWidth / tileWidth),\n );\n const minYTile = Math.max(Math.floor(imageWindow[1] / tileHeight), 0);\n const maxYTile = Math.min(\n Math.ceil(imageWindow[3] / tileHeight),\n Math.ceil(imageHeight / tileHeight),\n );\n const windowWidth = imageWindow[2] - imageWindow[0];\n\n let bytesPerPixel = this.getBytesPerPixel();\n\n const srcSampleOffsets = [];\n const sampleReaders = [];\n for (let i = 0; i < samples.length; ++i) {\n if (this.planarConfiguration === 1) {\n srcSampleOffsets.push(sum(this.fileDirectory.BitsPerSample, 0, samples[i]) / 8);\n } else {\n srcSampleOffsets.push(0);\n }\n sampleReaders.push(this.getReaderForSample(samples[i]));\n }\n\n const promises = [];\n const { littleEndian } = this;\n\n for (let yTile = minYTile; yTile < maxYTile; ++yTile) {\n for (let xTile = minXTile; xTile < maxXTile; ++xTile) {\n for (let sampleIndex = 0; sampleIndex < samples.length; ++sampleIndex) {\n const si = sampleIndex;\n const sample = samples[sampleIndex];\n if (this.planarConfiguration === 2) {\n bytesPerPixel = this.getSampleByteSize(sampleIndex);\n }\n const promise = this.getTileOrStrip(xTile, yTile, sample, poolOrDecoder, signal);\n promises.push(promise);\n promise.then((tile) => {\n const buffer = tile.data;\n const dataView = new DataView(buffer);\n const blockHeight = this.getBlockHeight(tile.y);\n const firstLine = tile.y * tileHeight;\n const firstCol = tile.x * tileWidth;\n const lastLine = firstLine + blockHeight;\n const lastCol = (tile.x + 1) * tileWidth;\n const reader = sampleReaders[si];\n\n const ymax = Math.min(blockHeight, blockHeight - (lastLine - imageWindow[3]), imageHeight - firstLine);\n const xmax = Math.min(tileWidth, tileWidth - (lastCol - imageWindow[2]), imageWidth - firstCol);\n\n for (let y = Math.max(0, imageWindow[1] - firstLine); y < ymax; ++y) {\n for (let x = Math.max(0, imageWindow[0] - firstCol); x < xmax; ++x) {\n const pixelOffset = ((y * tileWidth) + x) * bytesPerPixel;\n const value = reader.call(\n dataView, pixelOffset + srcSampleOffsets[si], littleEndian,\n );\n let windowCoordinate;\n if (interleave) {\n windowCoordinate = ((y + firstLine - imageWindow[1]) * windowWidth * samples.length)\n + ((x + firstCol - imageWindow[0]) * samples.length)\n + si;\n valueArrays[windowCoordinate] = value;\n } else {\n windowCoordinate = (\n (y + firstLine - imageWindow[1]) * windowWidth\n ) + x + firstCol - imageWindow[0];\n valueArrays[si][windowCoordinate] = value;\n }\n }\n }\n });\n }\n }\n }\n await Promise.all(promises);\n\n if ((width && (imageWindow[2] - imageWindow[0]) !== width)\n || (height && (imageWindow[3] - imageWindow[1]) !== height)) {\n let resampled;\n if (interleave) {\n resampled = resampleInterleaved(\n valueArrays,\n imageWindow[2] - imageWindow[0],\n imageWindow[3] - imageWindow[1],\n width, height,\n samples.length,\n resampleMethod,\n );\n } else {\n resampled = resample(\n valueArrays,\n imageWindow[2] - imageWindow[0],\n imageWindow[3] - imageWindow[1],\n width, height,\n resampleMethod,\n );\n }\n resampled.width = width;\n resampled.height = height;\n return resampled;\n }\n\n valueArrays.width = width || imageWindow[2] - imageWindow[0];\n valueArrays.height = height || imageWindow[3] - imageWindow[1];\n\n return valueArrays;\n }\n\n /**\n * Reads raster data from the image. This function reads all selected samples\n * into separate arrays of the correct type for that sample or into a single\n * combined array when `interleave` is set. When provided, only a subset\n * of the raster is read for each sample.\n *\n * @param {ReadRasterOptions} [options={}] optional parameters\n * @returns {Promise.<(TypedArray|TypedArray[])>} the decoded arrays as a promise\n */\n async readRasters({\n window: wnd, samples = [], interleave, pool = null,\n width, height, resampleMethod, fillValue, signal,\n } = {}) {\n const imageWindow = wnd || [0, 0, this.getWidth(), this.getHeight()];\n\n // check parameters\n if (imageWindow[0] > imageWindow[2] || imageWindow[1] > imageWindow[3]) {\n throw new Error('Invalid subsets');\n }\n\n const imageWindowWidth = imageWindow[2] - imageWindow[0];\n const imageWindowHeight = imageWindow[3] - imageWindow[1];\n const numPixels = imageWindowWidth * imageWindowHeight;\n const samplesPerPixel = this.getSamplesPerPixel();\n\n if (!samples || !samples.length) {\n for (let i = 0; i < samplesPerPixel; ++i) {\n samples.push(i);\n }\n } else {\n for (let i = 0; i < samples.length; ++i) {\n if (samples[i] >= samplesPerPixel) {\n return Promise.reject(new RangeError(`Invalid sample index '${samples[i]}'.`));\n }\n }\n }\n let valueArrays;\n if (interleave) {\n const format = this.fileDirectory.SampleFormat\n ? Math.max.apply(null, this.fileDirectory.SampleFormat) : 1;\n const bitsPerSample = Math.max.apply(null, this.fileDirectory.BitsPerSample);\n valueArrays = arrayForType(format, bitsPerSample, numPixels * samples.length);\n if (fillValue) {\n valueArrays.fill(fillValue);\n }\n } else {\n valueArrays = [];\n for (let i = 0; i < samples.length; ++i) {\n const valueArray = this.getArrayForSample(samples[i], numPixels);\n if (Array.isArray(fillValue) && i < fillValue.length) {\n valueArray.fill(fillValue[i]);\n } else if (fillValue && !Array.isArray(fillValue)) {\n valueArray.fill(fillValue);\n }\n valueArrays.push(valueArray);\n }\n }\n\n const poolOrDecoder = pool || await getDecoder(this.fileDirectory);\n\n const result = await this._readRaster(\n imageWindow, samples, valueArrays, interleave, poolOrDecoder, width, height, resampleMethod, signal,\n );\n return result;\n }\n\n /**\n * Reads raster data from the image as RGB. The result is always an\n * interleaved typed array.\n * Colorspaces other than RGB will be transformed to RGB, color maps expanded.\n * When no other method is applicable, the first sample is used to produce a\n * greayscale image.\n * When provided, only a subset of the raster is read for each sample.\n *\n * @param {Object} [options] optional parameters\n * @param {Array} [options.window] the subset to read data from in pixels.\n * @param {boolean} [options.interleave=true] whether the data shall be read\n * in one single array or separate\n * arrays.\n * @param {import(\"./geotiff\").Pool} [options.pool=null] The optional decoder pool to use.\n * @param {number} [options.width] The desired width of the output. When the width is no the\n * same as the images, resampling will be performed.\n * @param {number} [options.height] The desired height of the output. When the width is no the\n * same as the images, resampling will be performed.\n * @param {string} [options.resampleMethod='nearest'] The desired resampling method.\n * @param {boolean} [options.enableAlpha=false] Enable reading alpha channel if present.\n * @param {AbortSignal} [options.signal] An AbortSignal that may be signalled if the request is\n * to be aborted\n * @returns {Promise} the RGB array as a Promise\n */\n async readRGB({ window, interleave = true, pool = null, width, height,\n resampleMethod, enableAlpha = false, signal } = {}) {\n const imageWindow = window || [0, 0, this.getWidth(), this.getHeight()];\n\n // check parameters\n if (imageWindow[0] > imageWindow[2] || imageWindow[1] > imageWindow[3]) {\n throw new Error('Invalid subsets');\n }\n\n const pi = this.fileDirectory.PhotometricInterpretation;\n\n if (pi === photometricInterpretations.RGB) {\n let s = [0, 1, 2];\n if ((!(this.fileDirectory.ExtraSamples === ExtraSamplesValues.Unspecified)) && enableAlpha) {\n s = [];\n for (let i = 0; i < this.fileDirectory.BitsPerSample.length; i += 1) {\n s.push(i);\n }\n }\n return this.readRasters({\n window,\n interleave,\n samples: s,\n pool,\n width,\n height,\n resampleMethod,\n signal,\n });\n }\n\n let samples;\n switch (pi) {\n case photometricInterpretations.WhiteIsZero:\n case photometricInterpretations.BlackIsZero:\n case photometricInterpretations.Palette:\n samples = [0];\n break;\n case photometricInterpretations.CMYK:\n samples = [0, 1, 2, 3];\n break;\n case photometricInterpretations.YCbCr:\n case photometricInterpretations.CIELab:\n samples = [0, 1, 2];\n break;\n default:\n throw new Error('Invalid or unsupported photometric interpretation.');\n }\n\n const subOptions = {\n window: imageWindow,\n interleave: true,\n samples,\n pool,\n width,\n height,\n resampleMethod,\n signal,\n };\n const { fileDirectory } = this;\n const raster = await this.readRasters(subOptions);\n\n const max = 2 ** this.fileDirectory.BitsPerSample[0];\n let data;\n switch (pi) {\n case photometricInterpretations.WhiteIsZero:\n data = fromWhiteIsZero(raster, max);\n break;\n case photometricInterpretations.BlackIsZero:\n data = fromBlackIsZero(raster, max);\n break;\n case photometricInterpretations.Palette:\n data = fromPalette(raster, fileDirectory.ColorMap);\n break;\n case photometricInterpretations.CMYK:\n data = fromCMYK(raster);\n break;\n case photometricInterpretations.YCbCr:\n data = fromYCbCr(raster);\n break;\n case photometricInterpretations.CIELab:\n data = fromCIELab(raster);\n break;\n default:\n throw new Error('Unsupported photometric interpretation.');\n }\n\n // if non-interleaved data is requested, we must split the channels\n // into their respective arrays\n if (!interleave) {\n const red = new Uint8Array(data.length / 3);\n const green = new Uint8Array(data.length / 3);\n const blue = new Uint8Array(data.length / 3);\n for (let i = 0, j = 0; i < data.length; i += 3, ++j) {\n red[j] = data[i];\n green[j] = data[i + 1];\n blue[j] = data[i + 2];\n }\n data = [red, green, blue];\n }\n\n data.width = raster.width;\n data.height = raster.height;\n return data;\n }\n\n /**\n * Returns an array of tiepoints.\n * @returns {Object[]}\n */\n getTiePoints() {\n if (!this.fileDirectory.ModelTiepoint) {\n return [];\n }\n\n const tiePoints = [];\n for (let i = 0; i < this.fileDirectory.ModelTiepoint.length; i += 6) {\n tiePoints.push({\n i: this.fileDirectory.ModelTiepoint[i],\n j: this.fileDirectory.ModelTiepoint[i + 1],\n k: this.fileDirectory.ModelTiepoint[i + 2],\n x: this.fileDirectory.ModelTiepoint[i + 3],\n y: this.fileDirectory.ModelTiepoint[i + 4],\n z: this.fileDirectory.ModelTiepoint[i + 5],\n });\n }\n return tiePoints;\n }\n\n /**\n * Returns the parsed GDAL metadata items.\n *\n * If sample is passed to null, dataset-level metadata will be returned.\n * Otherwise only metadata specific to the provided sample will be returned.\n *\n * @param {number} [sample=null] The sample index.\n * @returns {Object}\n */\n getGDALMetadata(sample = null) {\n const metadata = {};\n if (!this.fileDirectory.GDAL_METADATA) {\n return null;\n }\n const string = this.fileDirectory.GDAL_METADATA;\n\n let items = findTagsByName(string, 'Item');\n\n if (sample === null) {\n items = items.filter((item) => getAttribute(item, 'sample') === undefined);\n } else {\n items = items.filter((item) => Number(getAttribute(item, 'sample')) === sample);\n }\n\n for (let i = 0; i < items.length; ++i) {\n const item = items[i];\n metadata[getAttribute(item, 'name')] = item.inner;\n }\n return metadata;\n }\n\n /**\n * Returns the GDAL nodata value\n * @returns {number|null}\n */\n getGDALNoData() {\n if (!this.fileDirectory.GDAL_NODATA) {\n return null;\n }\n const string = this.fileDirectory.GDAL_NODATA;\n return Number(string.substring(0, string.length - 1));\n }\n\n /**\n * Returns the image origin as a XYZ-vector. When the image has no affine\n * transformation, then an exception is thrown.\n * @returns {Array} The origin as a vector\n */\n getOrigin() {\n const tiePoints = this.fileDirectory.ModelTiepoint;\n const modelTransformation = this.fileDirectory.ModelTransformation;\n if (tiePoints && tiePoints.length === 6) {\n return [\n tiePoints[3],\n tiePoints[4],\n tiePoints[5],\n ];\n }\n if (modelTransformation) {\n return [\n modelTransformation[3],\n modelTransformation[7],\n modelTransformation[11],\n ];\n }\n throw new Error('The image does not have an affine transformation.');\n }\n\n /**\n * Returns the image resolution as a XYZ-vector. When the image has no affine\n * transformation, then an exception is thrown.\n * @param {GeoTIFFImage} [referenceImage=null] A reference image to calculate the resolution from\n * in cases when the current image does not have the\n * required tags on its own.\n * @returns {Array} The resolution as a vector\n */\n getResolution(referenceImage = null) {\n const modelPixelScale = this.fileDirectory.ModelPixelScale;\n const modelTransformation = this.fileDirectory.ModelTransformation;\n\n if (modelPixelScale) {\n return [\n modelPixelScale[0],\n -modelPixelScale[1],\n modelPixelScale[2],\n ];\n }\n if (modelTransformation) {\n return [\n modelTransformation[0],\n modelTransformation[5],\n modelTransformation[10],\n ];\n }\n\n if (referenceImage) {\n const [refResX, refResY, refResZ] = referenceImage.getResolution();\n return [\n refResX * referenceImage.getWidth() / this.getWidth(),\n refResY * referenceImage.getHeight() / this.getHeight(),\n refResZ * referenceImage.getWidth() / this.getWidth(),\n ];\n }\n\n throw new Error('The image does not have an affine transformation.');\n }\n\n /**\n * Returns whether or not the pixels of the image depict an area (or point).\n * @returns {Boolean} Whether the pixels are a point\n */\n pixelIsArea() {\n return this.geoKeys.GTRasterTypeGeoKey === 1;\n }\n\n /**\n * Returns the image bounding box as an array of 4 values: min-x, min-y,\n * max-x and max-y. When the image has no affine transformation, then an\n * exception is thrown.\n * @returns {Array} The bounding box\n */\n getBoundingBox() {\n const origin = this.getOrigin();\n const resolution = this.getResolution();\n\n const x1 = origin[0];\n const y1 = origin[1];\n\n const x2 = x1 + (resolution[0] * this.getWidth());\n const y2 = y1 + (resolution[1] * this.getHeight());\n\n return [\n Math.min(x1, x2),\n Math.min(y1, y2),\n Math.max(x1, x2),\n Math.max(y1, y2),\n ];\n }\n}\n\nexport default GeoTIFFImage;\n","import { getFloat16 } from '@petamoriken/float16';\n\nexport default class DataView64 {\n constructor(arrayBuffer) {\n this._dataView = new DataView(arrayBuffer);\n }\n\n get buffer() {\n return this._dataView.buffer;\n }\n\n getUint64(offset, littleEndian) {\n const left = this.getUint32(offset, littleEndian);\n const right = this.getUint32(offset + 4, littleEndian);\n let combined;\n if (littleEndian) {\n combined = left + ((2 ** 32) * right);\n if (!Number.isSafeInteger(combined)) {\n throw new Error(\n `${combined} exceeds MAX_SAFE_INTEGER. `\n + 'Precision may be lost. Please report if you get this message to https://github.com/geotiffjs/geotiff.js/issues',\n );\n }\n return combined;\n }\n combined = ((2 ** 32) * left) + right;\n if (!Number.isSafeInteger(combined)) {\n throw new Error(\n `${combined} exceeds MAX_SAFE_INTEGER. `\n + 'Precision may be lost. Please report if you get this message to https://github.com/geotiffjs/geotiff.js/issues',\n );\n }\n\n return combined;\n }\n\n // adapted from https://stackoverflow.com/a/55338384/8060591\n getInt64(offset, littleEndian) {\n let value = 0;\n const isNegative = (this._dataView.getUint8(offset + (littleEndian ? 7 : 0)) & 0x80) > 0;\n let carrying = true;\n for (let i = 0; i < 8; i++) {\n let byte = this._dataView.getUint8(offset + (littleEndian ? i : 7 - i));\n if (isNegative) {\n if (carrying) {\n if (byte !== 0x00) {\n byte = ~(byte - 1) & 0xff;\n carrying = false;\n }\n } else {\n byte = ~byte & 0xff;\n }\n }\n value += byte * (256 ** i);\n }\n if (isNegative) {\n value = -value;\n }\n return value;\n }\n\n getUint8(offset, littleEndian) {\n return this._dataView.getUint8(offset, littleEndian);\n }\n\n getInt8(offset, littleEndian) {\n return this._dataView.getInt8(offset, littleEndian);\n }\n\n getUint16(offset, littleEndian) {\n return this._dataView.getUint16(offset, littleEndian);\n }\n\n getInt16(offset, littleEndian) {\n return this._dataView.getInt16(offset, littleEndian);\n }\n\n getUint32(offset, littleEndian) {\n return this._dataView.getUint32(offset, littleEndian);\n }\n\n getInt32(offset, littleEndian) {\n return this._dataView.getInt32(offset, littleEndian);\n }\n\n getFloat16(offset, littleEndian) {\n return getFloat16(this._dataView, offset, littleEndian);\n }\n\n getFloat32(offset, littleEndian) {\n return this._dataView.getFloat32(offset, littleEndian);\n }\n\n getFloat64(offset, littleEndian) {\n return this._dataView.getFloat64(offset, littleEndian);\n }\n}\n","export default class DataSlice {\n constructor(arrayBuffer, sliceOffset, littleEndian, bigTiff) {\n this._dataView = new DataView(arrayBuffer);\n this._sliceOffset = sliceOffset;\n this._littleEndian = littleEndian;\n this._bigTiff = bigTiff;\n }\n\n get sliceOffset() {\n return this._sliceOffset;\n }\n\n get sliceTop() {\n return this._sliceOffset + this.buffer.byteLength;\n }\n\n get littleEndian() {\n return this._littleEndian;\n }\n\n get bigTiff() {\n return this._bigTiff;\n }\n\n get buffer() {\n return this._dataView.buffer;\n }\n\n covers(offset, length) {\n return this.sliceOffset <= offset && this.sliceTop >= offset + length;\n }\n\n readUint8(offset) {\n return this._dataView.getUint8(\n offset - this._sliceOffset, this._littleEndian,\n );\n }\n\n readInt8(offset) {\n return this._dataView.getInt8(\n offset - this._sliceOffset, this._littleEndian,\n );\n }\n\n readUint16(offset) {\n return this._dataView.getUint16(\n offset - this._sliceOffset, this._littleEndian,\n );\n }\n\n readInt16(offset) {\n return this._dataView.getInt16(\n offset - this._sliceOffset, this._littleEndian,\n );\n }\n\n readUint32(offset) {\n return this._dataView.getUint32(\n offset - this._sliceOffset, this._littleEndian,\n );\n }\n\n readInt32(offset) {\n return this._dataView.getInt32(\n offset - this._sliceOffset, this._littleEndian,\n );\n }\n\n readFloat32(offset) {\n return this._dataView.getFloat32(\n offset - this._sliceOffset, this._littleEndian,\n );\n }\n\n readFloat64(offset) {\n return this._dataView.getFloat64(\n offset - this._sliceOffset, this._littleEndian,\n );\n }\n\n readUint64(offset) {\n const left = this.readUint32(offset);\n const right = this.readUint32(offset + 4);\n let combined;\n if (this._littleEndian) {\n combined = left + ((2 ** 32) * right);\n if (!Number.isSafeInteger(combined)) {\n throw new Error(\n `${combined} exceeds MAX_SAFE_INTEGER. `\n + 'Precision may be lost. Please report if you get this message to https://github.com/geotiffjs/geotiff.js/issues',\n );\n }\n return combined;\n }\n combined = ((2 ** 32) * left) + right;\n if (!Number.isSafeInteger(combined)) {\n throw new Error(\n `${combined} exceeds MAX_SAFE_INTEGER. `\n + 'Precision may be lost. Please report if you get this message to https://github.com/geotiffjs/geotiff.js/issues',\n );\n }\n\n return combined;\n }\n\n // adapted from https://stackoverflow.com/a/55338384/8060591\n readInt64(offset) {\n let value = 0;\n const isNegative = (this._dataView.getUint8(offset + (this._littleEndian ? 7 : 0)) & 0x80)\n > 0;\n let carrying = true;\n for (let i = 0; i < 8; i++) {\n let byte = this._dataView.getUint8(\n offset + (this._littleEndian ? i : 7 - i),\n );\n if (isNegative) {\n if (carrying) {\n if (byte !== 0x00) {\n byte = ~(byte - 1) & 0xff;\n carrying = false;\n }\n } else {\n byte = ~byte & 0xff;\n }\n }\n value += byte * (256 ** i);\n }\n if (isNegative) {\n value = -value;\n }\n return value;\n }\n\n readOffset(offset) {\n if (this._bigTiff) {\n return this.readUint64(offset);\n }\n return this.readUint32(offset);\n }\n}\n","const CRLFCRLF = '\\r\\n\\r\\n';\n\n/*\n * Shim for 'Object.fromEntries'\n */\nfunction itemsToObject(items) {\n if (typeof Object.fromEntries !== 'undefined') {\n return Object.fromEntries(items);\n }\n const obj = {};\n for (const [key, value] of items) {\n obj[key.toLowerCase()] = value;\n }\n return obj;\n}\n\n/**\n * Parse HTTP headers from a given string.\n * @param {String} text the text to parse the headers from\n * @returns {Object} the parsed headers with lowercase keys\n */\nfunction parseHeaders(text) {\n const items = text\n .split('\\r\\n')\n .map((line) => {\n const kv = line.split(':').map((str) => str.trim());\n kv[0] = kv[0].toLowerCase();\n return kv;\n });\n\n return itemsToObject(items);\n}\n\n/**\n * Parse a 'Content-Type' header value to the content-type and parameters\n * @param {String} rawContentType the raw string to parse from\n * @returns {Object} the parsed content type with the fields: type and params\n */\nexport function parseContentType(rawContentType) {\n const [type, ...rawParams] = rawContentType.split(';').map((s) => s.trim());\n const paramsItems = rawParams.map((param) => param.split('='));\n return { type, params: itemsToObject(paramsItems) };\n}\n\n/**\n * Parse a 'Content-Range' header value to its start, end, and total parts\n * @param {String} rawContentRange the raw string to parse from\n * @returns {Object} the parsed parts\n */\nexport function parseContentRange(rawContentRange) {\n let start;\n let end;\n let total;\n\n if (rawContentRange) {\n [, start, end, total] = rawContentRange.match(/bytes (\\d+)-(\\d+)\\/(\\d+)/);\n start = parseInt(start, 10);\n end = parseInt(end, 10);\n total = parseInt(total, 10);\n }\n\n return { start, end, total };\n}\n\n/**\n * Parses a list of byteranges from the given 'multipart/byteranges' HTTP response.\n * Each item in the list has the following properties:\n * - headers: the HTTP headers\n * - data: the sliced ArrayBuffer for that specific part\n * - offset: the offset of the byterange within its originating file\n * - length: the length of the byterange\n * @param {ArrayBuffer} responseArrayBuffer the response to be parsed and split\n * @param {String} boundary the boundary string used to split the sections\n * @returns {Object[]} the parsed byteranges\n */\nexport function parseByteRanges(responseArrayBuffer, boundary) {\n let offset = null;\n const decoder = new TextDecoder('ascii');\n const out = [];\n\n const startBoundary = `--${boundary}`;\n const endBoundary = `${startBoundary}--`;\n\n // search for the initial boundary, may be offset by some bytes\n // TODO: more efficient to check for `--` in bytes directly\n for (let i = 0; i < 10; ++i) {\n const text = decoder.decode(\n new Uint8Array(responseArrayBuffer, i, startBoundary.length),\n );\n if (text === startBoundary) {\n offset = i;\n }\n }\n\n if (offset === null) {\n throw new Error('Could not find initial boundary');\n }\n\n while (offset < responseArrayBuffer.byteLength) {\n const text = decoder.decode(\n new Uint8Array(responseArrayBuffer, offset,\n Math.min(startBoundary.length + 1024, responseArrayBuffer.byteLength - offset),\n ),\n );\n\n // break if we arrived at the end\n if (text.length === 0 || text.startsWith(endBoundary)) {\n break;\n }\n\n // assert that we are actually dealing with a byterange and are at the correct offset\n if (!text.startsWith(startBoundary)) {\n throw new Error('Part does not start with boundary');\n }\n\n // get a substring from where we read the headers\n const innerText = text.substr(startBoundary.length + 2);\n\n if (innerText.length === 0) {\n break;\n }\n\n // find the double linebreak that denotes the end of the headers\n const endOfHeaders = innerText.indexOf(CRLFCRLF);\n\n // parse the headers to get the content range size\n const headers = parseHeaders(innerText.substr(0, endOfHeaders));\n const { start, end, total } = parseContentRange(headers['content-range']);\n\n // calculate the length of the slice and the next offset\n const startOfData = offset + startBoundary.length + endOfHeaders + CRLFCRLF.length;\n const length = parseInt(end, 10) + 1 - parseInt(start, 10);\n out.push({\n headers,\n data: responseArrayBuffer.slice(startOfData, startOfData + length),\n offset: start,\n length,\n fileSize: total,\n });\n\n offset = startOfData + length + 4;\n }\n\n return out;\n}\n","/**\n * @typedef Slice\n * @property {number} offset\n * @property {number} length\n */\n\nexport class BaseSource {\n /**\n *\n * @param {Slice[]} slices\n * @returns {ArrayBuffer[]}\n */\n async fetch(slices, signal = undefined) {\n return Promise.all(\n slices.map((slice) => this.fetchSlice(slice, signal)),\n );\n }\n\n /**\n *\n * @param {Slice} slice\n * @returns {ArrayBuffer}\n */\n async fetchSlice(slice) {\n throw new Error(`fetching of slice ${slice} not possible, not implemented`);\n }\n\n /**\n * Returns the filesize if already determined and null otherwise\n */\n get fileSize() {\n return null;\n }\n\n async close() {\n // no-op by default\n }\n}\n","export function assign(target, source) {\n for (const key in source) {\n if (source.hasOwnProperty(key)) {\n target[key] = source[key];\n }\n }\n}\n\nexport function chunk(iterable, length) {\n const results = [];\n const lengthOfIterable = iterable.length;\n for (let i = 0; i < lengthOfIterable; i += length) {\n const chunked = [];\n for (let ci = i; ci < i + length; ci++) {\n chunked.push(iterable[ci]);\n }\n results.push(chunked);\n }\n return results;\n}\n\nexport function endsWith(string, expectedEnding) {\n if (string.length < expectedEnding.length) {\n return false;\n }\n const actualEnding = string.substr(string.length - expectedEnding.length);\n return actualEnding === expectedEnding;\n}\n\nexport function forEach(iterable, func) {\n const { length } = iterable;\n for (let i = 0; i < length; i++) {\n func(iterable[i], i);\n }\n}\n\nexport function invert(oldObj) {\n const newObj = {};\n for (const key in oldObj) {\n if (oldObj.hasOwnProperty(key)) {\n const value = oldObj[key];\n newObj[value] = key;\n }\n }\n return newObj;\n}\n\nexport function range(n) {\n const results = [];\n for (let i = 0; i < n; i++) {\n results.push(i);\n }\n return results;\n}\n\nexport function times(numTimes, func) {\n const results = [];\n for (let i = 0; i < numTimes; i++) {\n results.push(func(i));\n }\n return results;\n}\n\nexport function toArray(iterable) {\n const results = [];\n const { length } = iterable;\n for (let i = 0; i < length; i++) {\n results.push(iterable[i]);\n }\n return results;\n}\n\nexport function toArrayRecursively(input) {\n if (input.length) {\n return toArray(input).map(toArrayRecursively);\n }\n return input;\n}\n\n// copied from https://github.com/academia-de-codigo/parse-content-range-header/blob/master/index.js\nexport function parseContentRange(headerValue) {\n if (!headerValue) {\n return null;\n }\n\n if (typeof headerValue !== 'string') {\n throw new Error('invalid argument');\n }\n\n const parseInt = (number) => Number.parseInt(number, 10);\n\n // Check for presence of unit\n let matches = headerValue.match(/^(\\w*) /);\n const unit = matches && matches[1];\n\n // check for start-end/size header format\n matches = headerValue.match(/(\\d+)-(\\d+)\\/(\\d+|\\*)/);\n if (matches) {\n return {\n unit,\n first: parseInt(matches[1]),\n last: parseInt(matches[2]),\n length: matches[3] === '*' ? null : parseInt(matches[3]),\n };\n }\n\n // check for size header format\n matches = headerValue.match(/(\\d+|\\*)/);\n if (matches) {\n return {\n unit,\n first: null,\n last: null,\n length: matches[1] === '*' ? null : parseInt(matches[1]),\n };\n }\n\n return null;\n}\n\n/*\n * Promisified wrapper around 'setTimeout' to allow 'await'\n */\nexport async function wait(milliseconds) {\n return new Promise((resolve) => setTimeout(resolve, milliseconds));\n}\n\nexport function zip(a, b) {\n const A = Array.isArray(a) ? a : Array.from(a);\n const B = Array.isArray(b) ? b : Array.from(b);\n return A.map((k, i) => [k, B[i]]);\n}\n\n// Based on https://developer.mozilla.org/en-US/docs/Web/JavaScript/Reference/Global_Objects/Error\nexport class AbortError extends Error {\n constructor(params) {\n // Pass remaining arguments (including vendor specific ones) to parent constructor\n super(params);\n\n // Maintains proper stack trace for where our error was thrown (only available on V8)\n if (Error.captureStackTrace) {\n Error.captureStackTrace(this, AbortError);\n }\n\n this.name = 'AbortError';\n }\n}\n\nexport class CustomAggregateError extends Error {\n constructor(errors, message) {\n super(message);\n this.errors = errors;\n this.message = message;\n this.name = 'AggregateError';\n }\n}\n\nexport const AggregateError = CustomAggregateError;\n","import LRUCache from 'lru-cache';\nimport { BaseSource } from './basesource.js';\nimport { AbortError, AggregateError, wait, zip } from '../utils.js';\n\nclass Block {\n /**\n *\n * @param {number} offset\n * @param {number} length\n * @param {ArrayBuffer} [data]\n */\n constructor(offset, length, data = null) {\n this.offset = offset;\n this.length = length;\n this.data = data;\n }\n\n /**\n * @returns {number} the top byte border\n */\n get top() {\n return this.offset + this.length;\n }\n}\n\nclass BlockGroup {\n /**\n *\n * @param {number} offset\n * @param {number} length\n * @param {number[]} blockIds\n */\n constructor(offset, length, blockIds) {\n this.offset = offset;\n this.length = length;\n this.blockIds = blockIds;\n }\n}\n\nexport class BlockedSource extends BaseSource {\n /**\n *\n * @param {Source} source The underlying source that shall be blocked and cached\n * @param {object} options\n */\n constructor(source, { blockSize = 65536, cacheSize = 100 } = {}) {\n super();\n this.source = source;\n this.blockSize = blockSize;\n\n this.blockCache = new LRUCache({ max: cacheSize });\n\n // mapping blockId -> Block instance\n this.blockRequests = new Map();\n\n // set of blockIds missing for the current requests\n this.blockIdsToFetch = new Set();\n }\n\n get fileSize() {\n return this.source.fileSize;\n }\n\n /**\n *\n * @param {basesource/Slice[]} slices\n */\n async fetch(slices, signal) {\n const cachedBlocks = new Map();\n const blockRequests = new Map();\n const missingBlockIds = new Set();\n\n for (const { offset, length } of slices) {\n let top = offset + length;\n\n const { fileSize } = this;\n if (fileSize !== null) {\n top = Math.min(top, fileSize);\n }\n\n const firstBlockOffset = Math.floor(offset / this.blockSize) * this.blockSize;\n\n // chunk the current slice into blocks\n for (let current = firstBlockOffset; current < top; current += this.blockSize) {\n // check if the block is cached, being requested or still missing\n const blockId = Math.floor(current / this.blockSize);\n\n if (this.blockCache.has(blockId)) {\n cachedBlocks.set(blockId, this.blockCache.get(blockId));\n } else if (this.blockRequests.has(blockId)) {\n blockRequests.set(blockId, this.blockRequests.get(blockId));\n } else if (this.blockIdsToFetch.has(blockId)) {\n missingBlockIds.add(blockId);\n } else {\n this.blockIdsToFetch.add(blockId);\n missingBlockIds.add(blockId);\n }\n }\n }\n\n // allow additional block requests to accumulate\n await wait();\n this.fetchBlocks(signal);\n\n for (const blockId of missingBlockIds) {\n const block = this.blockRequests.get(blockId);\n const cachedBlock = this.blockCache.get(blockId);\n\n if (block) {\n blockRequests.set(blockId, block);\n } else if (cachedBlock) {\n cachedBlocks.set(blockId, cachedBlock);\n } else {\n throw new Error(`Block ${blockId} is not in the block requests`);\n }\n }\n\n // actually await all pending requests\n let results = await Promise.allSettled(Array.from(blockRequests.values()));\n\n // perform retries if a block was interrupted by a previous signal\n if (results.some((result) => result.status === 'rejected')) {\n const retriedBlockRequests = new Set();\n for (const [blockId, result] of zip(blockRequests.keys(), results)) {\n const { rejected, reason } = result;\n if (rejected) {\n // push some blocks back to the to-fetch list if they were\n // aborted, but only when a different signal was used\n if (reason.name === 'AbortError' && reason.signal !== signal) {\n this.blockIdsToFetch.add(blockId);\n retriedBlockRequests.add(blockId);\n }\n }\n }\n\n // start the retry of some blocks if required\n if (this.blockIdsToFetch.length > 0) {\n this.fetchBlocks(signal);\n for (const blockId of retriedBlockRequests) {\n const block = this.blockRequests.get(blockId);\n if (!block) {\n throw new Error(`Block ${blockId} is not in the block requests`);\n }\n blockRequests.set(blockId, block);\n }\n results = await Promise.allSettled(Array.from(blockRequests.values()));\n }\n }\n\n // throw an error (either abort error or AggregateError if no abort was done)\n if (results.some((result) => result.status === 'rejected')) {\n if (signal && signal.aborted) {\n throw new AbortError('Request was aborted');\n }\n throw new AggregateError(\n results.filter((result) => result.status === 'rejected').map((result) => result.reason),\n 'Request failed',\n );\n }\n\n // extract the actual block responses\n const values = results.map((result) => result.value);\n\n // create a final Map, with all required blocks for this request to satisfy\n const requiredBlocks = new Map(zip(Array.from(blockRequests.keys()), values));\n for (const [blockId, block] of cachedBlocks) {\n requiredBlocks.set(blockId, block);\n }\n\n // TODO: satisfy each slice\n return this.readSliceData(slices, requiredBlocks);\n }\n\n /**\n *\n * @param {AbortSignal} signal\n */\n fetchBlocks(signal) {\n // check if we still need to\n if (this.blockIdsToFetch.size > 0) {\n const groups = this.groupBlocks(this.blockIdsToFetch);\n\n // start requesting slices of data\n const groupRequests = this.source.fetch(groups, signal);\n\n for (let groupIndex = 0; groupIndex < groups.length; ++groupIndex) {\n const group = groups[groupIndex];\n\n for (const blockId of group.blockIds) {\n // make an async IIFE for each block\n const blockRequest = (async () => {\n try {\n const response = (await groupRequests)[groupIndex];\n const blockOffset = blockId * this.blockSize;\n const o = blockOffset - response.offset;\n const t = Math.min(o + this.blockSize, response.data.byteLength);\n const data = response.data.slice(o, t);\n const block = new Block(\n blockOffset,\n data.byteLength,\n data,\n );\n this.blockCache.set(blockId, block);\n return block;\n } catch (err) {\n if (err.name === 'AbortError') {\n // store the signal here, we need it to determine later if an\n // error was caused by this signal\n err.signal = signal;\n }\n throw err;\n } finally {\n this.blockRequests.delete(blockId);\n }\n })();\n this.blockRequests.set(blockId, blockRequest);\n }\n }\n this.blockIdsToFetch.clear();\n }\n }\n\n /**\n *\n * @param {Set} blockIds\n * @returns {BlockGroup[]}\n */\n groupBlocks(blockIds) {\n const sortedBlockIds = Array.from(blockIds).sort((a, b) => a - b);\n if (sortedBlockIds.length === 0) {\n return [];\n }\n let current = [];\n let lastBlockId = null;\n const groups = [];\n\n for (const blockId of sortedBlockIds) {\n if (lastBlockId === null || lastBlockId + 1 === blockId) {\n current.push(blockId);\n lastBlockId = blockId;\n } else {\n groups.push(new BlockGroup(\n current[0] * this.blockSize,\n current.length * this.blockSize,\n current,\n ));\n current = [blockId];\n lastBlockId = blockId;\n }\n }\n\n groups.push(new BlockGroup(\n current[0] * this.blockSize,\n current.length * this.blockSize,\n current,\n ));\n\n return groups;\n }\n\n /**\n *\n * @param {Slice[]} slices\n * @param {Map} blocks\n */\n readSliceData(slices, blocks) {\n return slices.map((slice) => {\n const top = slice.offset + slice.length;\n const blockIdLow = Math.floor(slice.offset / this.blockSize);\n const blockIdHigh = Math.floor((slice.offset + slice.length) / this.blockSize);\n const sliceData = new ArrayBuffer(slice.length);\n const sliceView = new Uint8Array(sliceData);\n\n for (let blockId = blockIdLow; blockId <= blockIdHigh; ++blockId) {\n const block = blocks.get(blockId);\n const delta = block.offset - slice.offset;\n const topDelta = block.top - top;\n let blockInnerOffset = 0;\n let rangeInnerOffset = 0;\n let usedBlockLength;\n\n if (delta < 0) {\n blockInnerOffset = -delta;\n } else if (delta > 0) {\n rangeInnerOffset = delta;\n }\n\n if (topDelta < 0) {\n usedBlockLength = block.length - blockInnerOffset;\n } else {\n usedBlockLength = top - block.offset - blockInnerOffset;\n }\n\n const blockView = new Uint8Array(block.data, blockInnerOffset, usedBlockLength);\n sliceView.set(blockView, rangeInnerOffset);\n }\n\n return sliceData;\n });\n }\n}\n","export class BaseResponse {\n /**\n * Returns whether the response has an ok'ish status code\n */\n get ok() {\n return this.status >= 200 && this.status <= 299;\n }\n\n /**\n * Returns the status code of the response\n */\n get status() {\n throw new Error('not implemented');\n }\n\n /**\n * Returns the value of the specified header\n * @param {string} headerName the header name\n * @returns {string} the header value\n */\n getHeader(headerName) { // eslint-disable-line no-unused-vars\n throw new Error('not implemented');\n }\n\n /**\n * @returns {ArrayBuffer} the response data of the request\n */\n async getData() {\n throw new Error('not implemented');\n }\n}\n\nexport class BaseClient {\n constructor(url) {\n this.url = url;\n }\n\n /**\n * Send a request with the options\n * @param {object} [options]\n */\n async request({ headers, credentials, signal } = {}) { // eslint-disable-line no-unused-vars\n throw new Error('request is not implemented');\n }\n}\n","import { BaseClient, BaseResponse } from './base.js';\n\nclass FetchResponse extends BaseResponse {\n /**\n * BaseResponse facade for fetch API Response\n * @param {Response} response\n */\n constructor(response) {\n super();\n this.response = response;\n }\n\n get status() {\n return this.response.status;\n }\n\n getHeader(name) {\n return this.response.headers.get(name);\n }\n\n async getData() {\n const data = this.response.arrayBuffer\n ? await this.response.arrayBuffer()\n : (await this.response.buffer()).buffer;\n return data;\n }\n}\n\nexport class FetchClient extends BaseClient {\n constructor(url, credentials) {\n super(url);\n this.credentials = credentials;\n }\n\n async request({ headers, credentials, signal } = {}) {\n const response = await fetch(this.url, {\n headers, credentials, signal,\n });\n return new FetchResponse(response);\n }\n}\n","import { BaseClient, BaseResponse } from './base.js';\nimport { AbortError } from '../../utils.js';\n\nclass XHRResponse extends BaseResponse {\n /**\n * BaseResponse facade for XMLHttpRequest\n * @param {XMLHttpRequest} xhr\n * @param {ArrayBuffer} data\n */\n constructor(xhr, data) {\n super();\n this.xhr = xhr;\n this.data = data;\n }\n\n get status() {\n return this.xhr.status;\n }\n\n getHeader(name) {\n return this.xhr.getResponseHeader(name);\n }\n\n async getData() {\n return this.data;\n }\n}\n\nexport class XHRClient extends BaseClient {\n constructRequest(headers, signal) {\n return new Promise((resolve, reject) => {\n const xhr = new XMLHttpRequest();\n xhr.open('GET', this.url);\n xhr.responseType = 'arraybuffer';\n for (const [key, value] of Object.entries(headers)) {\n xhr.setRequestHeader(key, value);\n }\n\n // hook signals\n xhr.onload = () => {\n const data = xhr.response;\n resolve(new XHRResponse(xhr, data));\n };\n xhr.onerror = reject;\n xhr.onabort = () => reject(new AbortError('Request aborted'));\n xhr.send();\n\n if (signal) {\n if (signal.aborted) {\n xhr.abort();\n }\n signal.addEventListener('abort', () => xhr.abort());\n }\n });\n }\n\n async request({ headers, signal } = {}) {\n const response = await this.constructRequest(headers, signal);\n return response;\n }\n}\n","import http from 'http';\nimport https from 'https';\nimport urlMod from 'url';\n\nimport { BaseClient, BaseResponse } from './base.js';\nimport { AbortError } from '../../utils.js';\n\nclass HttpResponse extends BaseResponse {\n /**\n * BaseResponse facade for node HTTP/HTTPS API Response\n * @param {http.ServerResponse} response\n */\n constructor(response, dataPromise) {\n super();\n this.response = response;\n this.dataPromise = dataPromise;\n }\n\n get status() {\n return this.response.statusCode;\n }\n\n getHeader(name) {\n return this.response.headers[name];\n }\n\n async getData() {\n const data = await this.dataPromise;\n return data;\n }\n}\n\nexport class HttpClient extends BaseClient {\n constructor(url) {\n super(url);\n this.parsedUrl = urlMod.parse(this.url);\n this.httpApi = (this.parsedUrl.protocol === 'http:' ? http : https);\n }\n\n constructRequest(headers, signal) {\n return new Promise((resolve, reject) => {\n const request = this.httpApi.get(\n {\n ...this.parsedUrl,\n headers,\n },\n (response) => {\n const dataPromise = new Promise((resolveData) => {\n const chunks = [];\n\n // collect chunks\n response.on('data', (chunk) => {\n chunks.push(chunk);\n });\n\n // concatenate all chunks and resolve the promise with the resulting buffer\n response.on('end', () => {\n const data = Buffer.concat(chunks).buffer;\n resolveData(data);\n });\n response.on('error', reject);\n });\n resolve(new HttpResponse(response, dataPromise));\n },\n );\n request.on('error', reject);\n\n if (signal) {\n if (signal.aborted) {\n request.destroy(new AbortError('Request aborted'));\n }\n signal.addEventListener('abort', () => request.destroy(new AbortError('Request aborted')));\n }\n });\n }\n\n async request({ headers, signal } = {}) {\n const response = await this.constructRequest(headers, signal);\n return response;\n }\n}\n","import { parseByteRanges, parseContentRange, parseContentType } from './httputils.js';\nimport { BaseSource } from './basesource.js';\nimport { BlockedSource } from './blockedsource.js';\n\nimport { FetchClient } from './client/fetch.js';\nimport { XHRClient } from './client/xhr.js';\nimport { HttpClient } from './client/http.js';\n\nclass RemoteSource extends BaseSource {\n /**\n *\n * @param {BaseClient} client\n * @param {object} headers\n * @param {numbers} maxRanges\n * @param {boolean} allowFullFile\n */\n constructor(client, headers, maxRanges, allowFullFile) {\n super();\n this.client = client;\n this.headers = headers;\n this.maxRanges = maxRanges;\n this.allowFullFile = allowFullFile;\n this._fileSize = null;\n }\n\n /**\n *\n * @param {Slice[]} slices\n */\n async fetch(slices, signal) {\n // if we allow multi-ranges, split the incoming request into that many sub-requests\n // and join them afterwards\n if (this.maxRanges >= slices.length) {\n return this.fetchSlices(slices, signal);\n } else if (this.maxRanges > 0 && slices.length > 1) {\n // TODO: split into multiple multi-range requests\n\n // const subSlicesRequests = [];\n // for (let i = 0; i < slices.length; i += this.maxRanges) {\n // subSlicesRequests.push(\n // this.fetchSlices(slices.slice(i, i + this.maxRanges), signal),\n // );\n // }\n // return (await Promise.all(subSlicesRequests)).flat();\n }\n\n // otherwise make a single request for each slice\n return Promise.all(\n slices.map((slice) => this.fetchSlice(slice, signal)),\n );\n }\n\n async fetchSlices(slices, signal) {\n const response = await this.client.request({\n headers: {\n ...this.headers,\n Range: `bytes=${slices\n .map(({ offset, length }) => `${offset}-${offset + length}`)\n .join(',')\n }`,\n },\n signal,\n });\n\n if (!response.ok) {\n throw new Error('Error fetching data.');\n } else if (response.status === 206) {\n const { type, params } = parseContentType(response.getHeader('content-type'));\n if (type === 'multipart/byteranges') {\n const byteRanges = parseByteRanges(await response.getData(), params.boundary);\n this._fileSize = byteRanges[0].fileSize || null;\n return byteRanges;\n }\n\n const data = await response.getData();\n\n const { start, end, total } = parseContentRange(response.getHeader('content-range'));\n this._fileSize = total || null;\n const first = [{\n data,\n offset: start,\n length: end - start,\n }];\n\n if (slices.length > 1) {\n // we requested more than one slice, but got only the first\n // unfortunately, some HTTP Servers don't support multi-ranges\n // and return onyl the first\n\n // get the rest of the slices and fetch them iteratetively\n const others = await Promise.all(slices.slice(1).map((slice) => this.fetchSlice(slice, signal)));\n return first.concat(others);\n }\n return first;\n } else {\n if (!this.allowFullFile) {\n throw new Error('Server responded with full file');\n }\n const data = await response.getData();\n this._fileSize = data.byteLength;\n return [{\n data,\n offset: 0,\n length: data.byteLength,\n }];\n }\n }\n\n async fetchSlice(slice, signal) {\n const { offset, length } = slice;\n const response = await this.client.request({\n headers: {\n ...this.headers,\n Range: `bytes=${offset}-${offset + length}`,\n },\n signal,\n });\n\n // check the response was okay and if the server actually understands range requests\n if (!response.ok) {\n throw new Error('Error fetching data.');\n } else if (response.status === 206) {\n const data = await response.getData();\n\n const { total } = parseContentRange(response.getHeader('content-range'));\n this._fileSize = total || null;\n return {\n data,\n offset,\n length,\n };\n } else {\n if (!this.allowFullFile) {\n throw new Error('Server responded with full file');\n }\n\n const data = await response.getData();\n\n this._fileSize = data.byteLength;\n return {\n data,\n offset: 0,\n length: data.byteLength,\n };\n }\n }\n\n get fileSize() {\n return this._fileSize;\n }\n}\n\nfunction maybeWrapInBlockedSource(source, { blockSize, cacheSize }) {\n if (blockSize === null) {\n return source;\n }\n return new BlockedSource(source, blockSize, cacheSize);\n}\n\nexport function makeFetchSource(url, { headers = {}, credentials, maxRanges = 0, allowFullFile = false, ...blockOptions } = {}) {\n const client = new FetchClient(url, credentials);\n const source = new RemoteSource(client, headers, maxRanges, allowFullFile);\n return maybeWrapInBlockedSource(source, blockOptions);\n}\n\nexport function makeXHRSource(url, { headers = {}, maxRanges = 0, allowFullFile = false, ...blockOptions } = {}) {\n const client = new XHRClient(url);\n const source = new RemoteSource(client, headers, maxRanges, allowFullFile);\n return maybeWrapInBlockedSource(source, blockOptions);\n}\n\nexport function makeHttpSource(url, { headers = {}, maxRanges = 0, allowFullFile = false, ...blockOptions } = {}) {\n const client = new HttpClient(url);\n const source = new RemoteSource(client, headers, maxRanges, allowFullFile);\n return maybeWrapInBlockedSource(source, blockOptions);\n}\n\n/**\n *\n * @param {string} url\n * @param {object} options\n */\nexport function makeRemoteSource(url, { forceXHR = false, ...clientOptions } = {}) {\n if (typeof fetch === 'function' && !forceXHR) {\n return makeFetchSource(url, clientOptions);\n }\n if (typeof XMLHttpRequest !== 'undefined') {\n return makeXHRSource(url, clientOptions);\n }\n return makeHttpSource(url, clientOptions);\n}\n","/** @module geotiff */\nimport GeoTIFFImage from './geotiffimage.js';\nimport DataView64 from './dataview64.js';\nimport DataSlice from './dataslice.js';\nimport Pool from './pool.js';\n\nimport { makeRemoteSource } from './source/remote.js';\nimport { makeBufferSource } from './source/arraybuffer.js';\nimport { makeFileReaderSource } from './source/filereader.js';\nimport { makeFileSource } from './source/file.js';\n\nimport { fieldTypes, fieldTagNames, arrayFields, geoKeyNames } from './globals.js';\nimport { writeGeotiff } from './geotiffwriter.js';\nimport * as globals from './globals.js';\nimport * as rgb from './rgb.js';\nimport { getDecoder, addDecoder } from './compression/index.js';\nimport { setLogger } from './logging.js';\n\nexport { globals };\nexport { rgb };\nexport { getDecoder, addDecoder };\nexport { setLogger };\n\n/**\n * @typedef {Uint8Array | Int8Array | Uint16Array | Int16Array | Uint32Array | Int32Array | Float32Array | Float64Array}\n * TypedArray\n */\n\nfunction getFieldTypeLength(fieldType) {\n switch (fieldType) {\n case fieldTypes.BYTE: case fieldTypes.ASCII: case fieldTypes.SBYTE: case fieldTypes.UNDEFINED:\n return 1;\n case fieldTypes.SHORT: case fieldTypes.SSHORT:\n return 2;\n case fieldTypes.LONG: case fieldTypes.SLONG: case fieldTypes.FLOAT: case fieldTypes.IFD:\n return 4;\n case fieldTypes.RATIONAL: case fieldTypes.SRATIONAL: case fieldTypes.DOUBLE:\n case fieldTypes.LONG8: case fieldTypes.SLONG8: case fieldTypes.IFD8:\n return 8;\n default:\n throw new RangeError(`Invalid field type: ${fieldType}`);\n }\n}\n\nfunction parseGeoKeyDirectory(fileDirectory) {\n const rawGeoKeyDirectory = fileDirectory.GeoKeyDirectory;\n if (!rawGeoKeyDirectory) {\n return null;\n }\n\n const geoKeyDirectory = {};\n for (let i = 4; i <= rawGeoKeyDirectory[3] * 4; i += 4) {\n const key = geoKeyNames[rawGeoKeyDirectory[i]];\n const location = (rawGeoKeyDirectory[i + 1])\n ? (fieldTagNames[rawGeoKeyDirectory[i + 1]]) : null;\n const count = rawGeoKeyDirectory[i + 2];\n const offset = rawGeoKeyDirectory[i + 3];\n\n let value = null;\n if (!location) {\n value = offset;\n } else {\n value = fileDirectory[location];\n if (typeof value === 'undefined' || value === null) {\n throw new Error(`Could not get value of geoKey '${key}'.`);\n } else if (typeof value === 'string') {\n value = value.substring(offset, offset + count - 1);\n } else if (value.subarray) {\n value = value.subarray(offset, offset + count);\n if (count === 1) {\n value = value[0];\n }\n }\n }\n geoKeyDirectory[key] = value;\n }\n return geoKeyDirectory;\n}\n\nfunction getValues(dataSlice, fieldType, count, offset) {\n let values = null;\n let readMethod = null;\n const fieldTypeLength = getFieldTypeLength(fieldType);\n\n switch (fieldType) {\n case fieldTypes.BYTE: case fieldTypes.ASCII: case fieldTypes.UNDEFINED:\n values = new Uint8Array(count); readMethod = dataSlice.readUint8;\n break;\n case fieldTypes.SBYTE:\n values = new Int8Array(count); readMethod = dataSlice.readInt8;\n break;\n case fieldTypes.SHORT:\n values = new Uint16Array(count); readMethod = dataSlice.readUint16;\n break;\n case fieldTypes.SSHORT:\n values = new Int16Array(count); readMethod = dataSlice.readInt16;\n break;\n case fieldTypes.LONG: case fieldTypes.IFD:\n values = new Uint32Array(count); readMethod = dataSlice.readUint32;\n break;\n case fieldTypes.SLONG:\n values = new Int32Array(count); readMethod = dataSlice.readInt32;\n break;\n case fieldTypes.LONG8: case fieldTypes.IFD8:\n values = new Array(count); readMethod = dataSlice.readUint64;\n break;\n case fieldTypes.SLONG8:\n values = new Array(count); readMethod = dataSlice.readInt64;\n break;\n case fieldTypes.RATIONAL:\n values = new Uint32Array(count * 2); readMethod = dataSlice.readUint32;\n break;\n case fieldTypes.SRATIONAL:\n values = new Int32Array(count * 2); readMethod = dataSlice.readInt32;\n break;\n case fieldTypes.FLOAT:\n values = new Float32Array(count); readMethod = dataSlice.readFloat32;\n break;\n case fieldTypes.DOUBLE:\n values = new Float64Array(count); readMethod = dataSlice.readFloat64;\n break;\n default:\n throw new RangeError(`Invalid field type: ${fieldType}`);\n }\n\n // normal fields\n if (!(fieldType === fieldTypes.RATIONAL || fieldType === fieldTypes.SRATIONAL)) {\n for (let i = 0; i < count; ++i) {\n values[i] = readMethod.call(\n dataSlice, offset + (i * fieldTypeLength),\n );\n }\n } else { // RATIONAL or SRATIONAL\n for (let i = 0; i < count; i += 2) {\n values[i] = readMethod.call(\n dataSlice, offset + (i * fieldTypeLength),\n );\n values[i + 1] = readMethod.call(\n dataSlice, offset + ((i * fieldTypeLength) + 4),\n );\n }\n }\n\n if (fieldType === fieldTypes.ASCII) {\n return new TextDecoder('utf-8').decode(values);\n }\n return values;\n}\n\n/**\n * Data class to store the parsed file directory, geo key directory and\n * offset to the next IFD\n */\nclass ImageFileDirectory {\n constructor(fileDirectory, geoKeyDirectory, nextIFDByteOffset) {\n this.fileDirectory = fileDirectory;\n this.geoKeyDirectory = geoKeyDirectory;\n this.nextIFDByteOffset = nextIFDByteOffset;\n }\n}\n\n/**\n * Error class for cases when an IFD index was requested, that does not exist\n * in the file.\n */\nclass GeoTIFFImageIndexError extends Error {\n constructor(index) {\n super(`No image at index ${index}`);\n this.index = index;\n }\n}\n\nclass GeoTIFFBase {\n /**\n * (experimental) Reads raster data from the best fitting image. This function uses\n * the image with the lowest resolution that is still a higher resolution than the\n * requested resolution.\n * When specified, the `bbox` option is translated to the `window` option and the\n * `resX` and `resY` to `width` and `height` respectively.\n * Then, the [readRasters]{@link GeoTIFFImage#readRasters} method of the selected\n * image is called and the result returned.\n * @see GeoTIFFImage.readRasters\n * @param {import('./geotiffimage').ReadRasterOptions} [options={}] optional parameters\n * @returns {Promise<(TypedArray|TypedArray[])>} the decoded arrays as a promise\n */\n async readRasters(options = {}) {\n const { window: imageWindow, width, height } = options;\n let { resX, resY, bbox } = options;\n\n const firstImage = await this.getImage();\n let usedImage = firstImage;\n const imageCount = await this.getImageCount();\n const imgBBox = firstImage.getBoundingBox();\n\n if (imageWindow && bbox) {\n throw new Error('Both \"bbox\" and \"window\" passed.');\n }\n\n // if width/height is passed, transform it to resolution\n if (width || height) {\n // if we have an image window (pixel coordinates), transform it to a BBox\n // using the origin/resolution of the first image.\n if (imageWindow) {\n const [oX, oY] = firstImage.getOrigin();\n const [rX, rY] = firstImage.getResolution();\n\n bbox = [\n oX + (imageWindow[0] * rX),\n oY + (imageWindow[1] * rY),\n oX + (imageWindow[2] * rX),\n oY + (imageWindow[3] * rY),\n ];\n }\n\n // if we have a bbox (or calculated one)\n\n const usedBBox = bbox || imgBBox;\n\n if (width) {\n if (resX) {\n throw new Error('Both width and resX passed');\n }\n resX = (usedBBox[2] - usedBBox[0]) / width;\n }\n if (height) {\n if (resY) {\n throw new Error('Both width and resY passed');\n }\n resY = (usedBBox[3] - usedBBox[1]) / height;\n }\n }\n\n // if resolution is set or calculated, try to get the image with the worst acceptable resolution\n if (resX || resY) {\n const allImages = [];\n for (let i = 0; i < imageCount; ++i) {\n const image = await this.getImage(i);\n const { SubfileType: subfileType, NewSubfileType: newSubfileType } = image.fileDirectory;\n if (i === 0 || subfileType === 2 || newSubfileType & 1) {\n allImages.push(image);\n }\n }\n\n allImages.sort((a, b) => a.getWidth() - b.getWidth());\n for (let i = 0; i < allImages.length; ++i) {\n const image = allImages[i];\n const imgResX = (imgBBox[2] - imgBBox[0]) / image.getWidth();\n const imgResY = (imgBBox[3] - imgBBox[1]) / image.getHeight();\n\n usedImage = image;\n if ((resX && resX > imgResX) || (resY && resY > imgResY)) {\n break;\n }\n }\n }\n\n let wnd = imageWindow;\n if (bbox) {\n const [oX, oY] = firstImage.getOrigin();\n const [imageResX, imageResY] = usedImage.getResolution(firstImage);\n\n wnd = [\n Math.round((bbox[0] - oX) / imageResX),\n Math.round((bbox[1] - oY) / imageResY),\n Math.round((bbox[2] - oX) / imageResX),\n Math.round((bbox[3] - oY) / imageResY),\n ];\n wnd = [\n Math.min(wnd[0], wnd[2]),\n Math.min(wnd[1], wnd[3]),\n Math.max(wnd[0], wnd[2]),\n Math.max(wnd[1], wnd[3]),\n ];\n }\n\n return usedImage.readRasters({ ...options, window: wnd });\n }\n}\n\n/**\n * @typedef {Object} GeoTIFFOptions\n * @property {boolean} [cache=false] whether or not decoded tiles shall be cached.\n */\n\n/**\n * The abstraction for a whole GeoTIFF file.\n * @augments GeoTIFFBase\n */\nclass GeoTIFF extends GeoTIFFBase {\n /**\n * @constructor\n * @param {*} source The datasource to read from.\n * @param {boolean} littleEndian Whether the image uses little endian.\n * @param {boolean} bigTiff Whether the image uses bigTIFF conventions.\n * @param {number} firstIFDOffset The numeric byte-offset from the start of the image\n * to the first IFD.\n * @param {GeoTIFFOptions} [options] further options.\n */\n constructor(source, littleEndian, bigTiff, firstIFDOffset, options = {}) {\n super();\n this.source = source;\n this.littleEndian = littleEndian;\n this.bigTiff = bigTiff;\n this.firstIFDOffset = firstIFDOffset;\n this.cache = options.cache || false;\n this.ifdRequests = [];\n this.ghostValues = null;\n }\n\n async getSlice(offset, size) {\n const fallbackSize = this.bigTiff ? 4048 : 1024;\n return new DataSlice(\n (await this.source.fetch([{\n offset,\n length: typeof size !== 'undefined' ? size : fallbackSize,\n }]))[0],\n offset,\n this.littleEndian,\n this.bigTiff,\n );\n }\n\n /**\n * Instructs to parse an image file directory at the given file offset.\n * As there is no way to ensure that a location is indeed the start of an IFD,\n * this function must be called with caution (e.g only using the IFD offsets from\n * the headers or other IFDs).\n * @param {number} offset the offset to parse the IFD at\n * @returns {Promise} the parsed IFD\n */\n async parseFileDirectoryAt(offset) {\n const entrySize = this.bigTiff ? 20 : 12;\n const offsetSize = this.bigTiff ? 8 : 2;\n\n let dataSlice = await this.getSlice(offset);\n const numDirEntries = this.bigTiff\n ? dataSlice.readUint64(offset)\n : dataSlice.readUint16(offset);\n\n // if the slice does not cover the whole IFD, request a bigger slice, where the\n // whole IFD fits: num of entries + n x tag length + offset to next IFD\n const byteSize = (numDirEntries * entrySize) + (this.bigTiff ? 16 : 6);\n if (!dataSlice.covers(offset, byteSize)) {\n dataSlice = await this.getSlice(offset, byteSize);\n }\n\n const fileDirectory = {};\n\n // loop over the IFD and create a file directory object\n let i = offset + (this.bigTiff ? 8 : 2);\n for (let entryCount = 0; entryCount < numDirEntries; i += entrySize, ++entryCount) {\n const fieldTag = dataSlice.readUint16(i);\n const fieldType = dataSlice.readUint16(i + 2);\n const typeCount = this.bigTiff\n ? dataSlice.readUint64(i + 4)\n : dataSlice.readUint32(i + 4);\n\n let fieldValues;\n let value;\n const fieldTypeLength = getFieldTypeLength(fieldType);\n const valueOffset = i + (this.bigTiff ? 12 : 8);\n\n // check whether the value is directly encoded in the tag or refers to a\n // different external byte range\n if (fieldTypeLength * typeCount <= (this.bigTiff ? 8 : 4)) {\n fieldValues = getValues(dataSlice, fieldType, typeCount, valueOffset);\n } else {\n // resolve the reference to the actual byte range\n const actualOffset = dataSlice.readOffset(valueOffset);\n const length = getFieldTypeLength(fieldType) * typeCount;\n\n // check, whether we actually cover the referenced byte range; if not,\n // request a new slice of bytes to read from it\n if (dataSlice.covers(actualOffset, length)) {\n fieldValues = getValues(dataSlice, fieldType, typeCount, actualOffset);\n } else {\n const fieldDataSlice = await this.getSlice(actualOffset, length);\n fieldValues = getValues(fieldDataSlice, fieldType, typeCount, actualOffset);\n }\n }\n\n // unpack single values from the array\n if (typeCount === 1 && arrayFields.indexOf(fieldTag) === -1\n && !(fieldType === fieldTypes.RATIONAL || fieldType === fieldTypes.SRATIONAL)) {\n value = fieldValues[0];\n } else {\n value = fieldValues;\n }\n\n // write the tags value to the file directly\n fileDirectory[fieldTagNames[fieldTag]] = value;\n }\n const geoKeyDirectory = parseGeoKeyDirectory(fileDirectory);\n const nextIFDByteOffset = dataSlice.readOffset(\n offset + offsetSize + (entrySize * numDirEntries),\n );\n\n return new ImageFileDirectory(\n fileDirectory,\n geoKeyDirectory,\n nextIFDByteOffset,\n );\n }\n\n async requestIFD(index) {\n // see if we already have that IFD index requested.\n if (this.ifdRequests[index]) {\n // attach to an already requested IFD\n return this.ifdRequests[index];\n } else if (index === 0) {\n // special case for index 0\n this.ifdRequests[index] = this.parseFileDirectoryAt(this.firstIFDOffset);\n return this.ifdRequests[index];\n } else if (!this.ifdRequests[index - 1]) {\n // if the previous IFD was not yet loaded, load that one first\n // this is the recursive call.\n try {\n this.ifdRequests[index - 1] = this.requestIFD(index - 1);\n } catch (e) {\n // if the previous one already was an index error, rethrow\n // with the current index\n if (e instanceof GeoTIFFImageIndexError) {\n throw new GeoTIFFImageIndexError(index);\n }\n // rethrow anything else\n throw e;\n }\n }\n // if the previous IFD was loaded, we can finally fetch the one we are interested in.\n // we need to wrap this in an IIFE, otherwise this.ifdRequests[index] would be delayed\n this.ifdRequests[index] = (async () => {\n const previousIfd = await this.ifdRequests[index - 1];\n if (previousIfd.nextIFDByteOffset === 0) {\n throw new GeoTIFFImageIndexError(index);\n }\n return this.parseFileDirectoryAt(previousIfd.nextIFDByteOffset);\n })();\n return this.ifdRequests[index];\n }\n\n /**\n * Get the n-th internal subfile of an image. By default, the first is returned.\n *\n * @param {number} [index=0] the index of the image to return.\n * @returns {Promise} the image at the given index\n */\n async getImage(index = 0) {\n const ifd = await this.requestIFD(index);\n return new GeoTIFFImage(\n ifd.fileDirectory, ifd.geoKeyDirectory,\n this.dataView, this.littleEndian, this.cache, this.source,\n );\n }\n\n /**\n * Returns the count of the internal subfiles.\n *\n * @returns {Promise} the number of internal subfile images\n */\n async getImageCount() {\n let index = 0;\n // loop until we run out of IFDs\n let hasNext = true;\n while (hasNext) {\n try {\n await this.requestIFD(index);\n ++index;\n } catch (e) {\n if (e instanceof GeoTIFFImageIndexError) {\n hasNext = false;\n } else {\n throw e;\n }\n }\n }\n return index;\n }\n\n /**\n * Get the values of the COG ghost area as a parsed map.\n * See https://gdal.org/drivers/raster/cog.html#header-ghost-area for reference\n * @returns {Promise} the parsed ghost area or null, if no such area was found\n */\n async getGhostValues() {\n const offset = this.bigTiff ? 16 : 8;\n if (this.ghostValues) {\n return this.ghostValues;\n }\n const detectionString = 'GDAL_STRUCTURAL_METADATA_SIZE=';\n const heuristicAreaSize = detectionString.length + 100;\n let slice = await this.getSlice(offset, heuristicAreaSize);\n if (detectionString === getValues(slice, fieldTypes.ASCII, detectionString.length, offset)) {\n const valuesString = getValues(slice, fieldTypes.ASCII, heuristicAreaSize, offset);\n const firstLine = valuesString.split('\\n')[0];\n const metadataSize = Number(firstLine.split('=')[1].split(' ')[0]) + firstLine.length;\n if (metadataSize > heuristicAreaSize) {\n slice = await this.getSlice(offset, metadataSize);\n }\n const fullString = getValues(slice, fieldTypes.ASCII, metadataSize, offset);\n this.ghostValues = {};\n fullString\n .split('\\n')\n .filter((line) => line.length > 0)\n .map((line) => line.split('='))\n .forEach(([key, value]) => {\n this.ghostValues[key] = value;\n });\n }\n return this.ghostValues;\n }\n\n /**\n * Parse a (Geo)TIFF file from the given source.\n *\n * @param {*} source The source of data to parse from.\n * @param {GeoTIFFOptions} [options] Additional options.\n * @param {AbortSignal} [signal] An AbortSignal that may be signalled if the request is\n * to be aborted\n */\n static async fromSource(source, options, signal) {\n const headerData = (await source.fetch([{ offset: 0, length: 1024 }], signal))[0];\n const dataView = new DataView64(headerData);\n\n const BOM = dataView.getUint16(0, 0);\n let littleEndian;\n if (BOM === 0x4949) {\n littleEndian = true;\n } else if (BOM === 0x4D4D) {\n littleEndian = false;\n } else {\n throw new TypeError('Invalid byte order value.');\n }\n\n const magicNumber = dataView.getUint16(2, littleEndian);\n let bigTiff;\n if (magicNumber === 42) {\n bigTiff = false;\n } else if (magicNumber === 43) {\n bigTiff = true;\n const offsetByteSize = dataView.getUint16(4, littleEndian);\n if (offsetByteSize !== 8) {\n throw new Error('Unsupported offset byte-size.');\n }\n } else {\n throw new TypeError('Invalid magic number.');\n }\n\n const firstIFDOffset = bigTiff\n ? dataView.getUint64(8, littleEndian)\n : dataView.getUint32(4, littleEndian);\n return new GeoTIFF(source, littleEndian, bigTiff, firstIFDOffset, options);\n }\n\n /**\n * Closes the underlying file buffer\n * N.B. After the GeoTIFF has been completely processed it needs\n * to be closed but only if it has been constructed from a file.\n */\n close() {\n if (typeof this.source.close === 'function') {\n return this.source.close();\n }\n return false;\n }\n}\n\nexport { GeoTIFF };\nexport default GeoTIFF;\n\n/**\n * Wrapper for GeoTIFF files that have external overviews.\n * @augments GeoTIFFBase\n */\nclass MultiGeoTIFF extends GeoTIFFBase {\n /**\n * Construct a new MultiGeoTIFF from a main and several overview files.\n * @param {GeoTIFF} mainFile The main GeoTIFF file.\n * @param {GeoTIFF[]} overviewFiles An array of overview files.\n */\n constructor(mainFile, overviewFiles) {\n super();\n this.mainFile = mainFile;\n this.overviewFiles = overviewFiles;\n this.imageFiles = [mainFile].concat(overviewFiles);\n\n this.fileDirectoriesPerFile = null;\n this.fileDirectoriesPerFileParsing = null;\n this.imageCount = null;\n }\n\n async parseFileDirectoriesPerFile() {\n const requests = [this.mainFile.parseFileDirectoryAt(this.mainFile.firstIFDOffset)]\n .concat(this.overviewFiles.map((file) => file.parseFileDirectoryAt(file.firstIFDOffset)));\n\n this.fileDirectoriesPerFile = await Promise.all(requests);\n return this.fileDirectoriesPerFile;\n }\n\n /**\n * Get the n-th internal subfile of an image. By default, the first is returned.\n *\n * @param {number} [index=0] the index of the image to return.\n * @returns {Promise} the image at the given index\n */\n async getImage(index = 0) {\n await this.getImageCount();\n await this.parseFileDirectoriesPerFile();\n let visited = 0;\n let relativeIndex = 0;\n for (let i = 0; i < this.imageFiles.length; i++) {\n const imageFile = this.imageFiles[i];\n for (let ii = 0; ii < this.imageCounts[i]; ii++) {\n if (index === visited) {\n const ifd = await imageFile.requestIFD(relativeIndex);\n return new GeoTIFFImage(\n ifd.fileDirectory, ifd.geoKeyDirectory,\n imageFile.dataView, imageFile.littleEndian, imageFile.cache, imageFile.source,\n );\n }\n visited++;\n relativeIndex++;\n }\n relativeIndex = 0;\n }\n\n throw new RangeError('Invalid image index');\n }\n\n /**\n * Returns the count of the internal subfiles.\n *\n * @returns {Promise} the number of internal subfile images\n */\n async getImageCount() {\n if (this.imageCount !== null) {\n return this.imageCount;\n }\n const requests = [this.mainFile.getImageCount()]\n .concat(this.overviewFiles.map((file) => file.getImageCount()));\n this.imageCounts = await Promise.all(requests);\n this.imageCount = this.imageCounts.reduce((count, ifds) => count + ifds, 0);\n return this.imageCount;\n }\n}\n\nexport { MultiGeoTIFF };\n\n/**\n * Creates a new GeoTIFF from a remote URL.\n * @param {string} url The URL to access the image from\n * @param {object} [options] Additional options to pass to the source.\n * See {@link makeRemoteSource} for details.\n * @param {AbortSignal} [signal] An AbortSignal that may be signalled if the request is\n * to be aborted\n * @returns {Promise} The resulting GeoTIFF file.\n */\nexport async function fromUrl(url, options = {}, signal) {\n return GeoTIFF.fromSource(makeRemoteSource(url, options), signal);\n}\n\n/**\n * Construct a new GeoTIFF from an\n * [ArrayBuffer]{@link https://developer.mozilla.org/en-US/docs/Web/JavaScript/Reference/Global_Objects/ArrayBuffer}.\n * @param {ArrayBuffer} arrayBuffer The data to read the file from.\n * @param {AbortSignal} [signal] An AbortSignal that may be signalled if the request is\n * to be aborted\n * @returns {Promise} The resulting GeoTIFF file.\n */\nexport async function fromArrayBuffer(arrayBuffer, signal) {\n return GeoTIFF.fromSource(makeBufferSource(arrayBuffer), signal);\n}\n\n/**\n * Construct a GeoTIFF from a local file path. This uses the node\n * [filesystem API]{@link https://nodejs.org/api/fs.html} and is\n * not available on browsers.\n *\n * N.B. After the GeoTIFF has been completely processed it needs\n * to be closed but only if it has been constructed from a file.\n * @param {string} path The file path to read from.\n * @param {AbortSignal} [signal] An AbortSignal that may be signalled if the request is\n * to be aborted\n * @returns {Promise} The resulting GeoTIFF file.\n */\nexport async function fromFile(path, signal) {\n return GeoTIFF.fromSource(makeFileSource(path), signal);\n}\n\n/**\n * Construct a GeoTIFF from an HTML\n * [Blob]{@link https://developer.mozilla.org/en-US/docs/Web/API/Blob} or\n * [File]{@link https://developer.mozilla.org/en-US/docs/Web/API/File}\n * object.\n * @param {Blob|File} blob The Blob or File object to read from.\n * @param {AbortSignal} [signal] An AbortSignal that may be signalled if the request is\n * to be aborted\n * @returns {Promise} The resulting GeoTIFF file.\n */\nexport async function fromBlob(blob, signal) {\n return GeoTIFF.fromSource(makeFileReaderSource(blob), signal);\n}\n\n/**\n * Construct a MultiGeoTIFF from the given URLs.\n * @param {string} mainUrl The URL for the main file.\n * @param {string[]} overviewUrls An array of URLs for the overview images.\n * @param {Object} [options] Additional options to pass to the source.\n * See [makeRemoteSource]{@link module:source.makeRemoteSource}\n * for details.\n * @param {AbortSignal} [signal] An AbortSignal that may be signalled if the request is\n * to be aborted\n * @returns {Promise} The resulting MultiGeoTIFF file.\n */\nexport async function fromUrls(mainUrl, overviewUrls = [], options = {}, signal) {\n const mainFile = await GeoTIFF.fromSource(makeRemoteSource(mainUrl, options), signal);\n const overviewFiles = await Promise.all(\n overviewUrls.map((url) => GeoTIFF.fromSource(makeRemoteSource(url, options))),\n );\n\n return new MultiGeoTIFF(mainFile, overviewFiles);\n}\n\n/**\n * Main creating function for GeoTIFF files.\n * @param {(Array)} array of pixel values\n * @returns {metadata} metadata\n */\nexport function writeArrayBuffer(values, metadata) {\n return writeGeotiff(values, metadata);\n}\n\nexport { Pool };\nexport { GeoTIFFImage };\n","import { getDecoder } from './compression/index.js';\n\nconst defaultPoolSize = typeof navigator !== 'undefined' ? (navigator.hardwareConcurrency || 2) : 2;\n\n/**\n * @module pool\n */\n\n/**\n * Pool for workers to decode chunks of the images.\n */\nclass Pool {\n /**\n * @constructor\n * @param {Number} [size] The size of the pool. Defaults to the number of CPUs\n * available. When this parameter is `null` or 0, then the\n * decoding will be done in the main thread.\n * @param {function(): Worker} [createWorker] A function that creates the decoder worker.\n * Defaults to a worker with all decoders that ship with geotiff.js. The `createWorker()`\n * function is expected to return a `Worker` compatible with Web Workers. For code that\n * runs in Node, [web-worker](https://www.npmjs.com/package/web-worker) is a good choice.\n *\n * A worker that uses a custom lzw decoder would look like this `my-custom-worker.js` file:\n * ```js\n * import { addDecoder, getDecoder } from 'geotiff';\n * addDecoder(5, () => import ('./my-custom-lzw').then((m) => m.default));\n * self.addEventListener('message', async (e) => {\n * const { id, fileDirectory, buffer } = e.data;\n * const decoder = await getDecoder(fileDirectory);\n * const decoded = await decoder.decode(fileDirectory, buffer);\n * self.postMessage({ decoded, id }, [decoded]);\n * });\n * ```\n * The way the above code is built into a worker by the `createWorker()` function\n * depends on the used bundler. For most bundlers, something like this will work:\n * ```js\n * function createWorker() {\n * return new Worker(new URL('./my-custom-worker.js', import.meta.url));\n * }\n * ```\n */\n constructor(size = defaultPoolSize, createWorker) {\n this.workers = null;\n this._awaitingDecoder = null;\n this.size = size;\n this.messageId = 0;\n if (size) {\n this._awaitingDecoder = createWorker ? Promise.resolve(createWorker) : new Promise((resolve) => {\n import('./worker/decoder.js').then((module) => {\n resolve(module.create);\n });\n });\n this._awaitingDecoder.then((create) => {\n this._awaitingDecoder = null;\n this.workers = [];\n for (let i = 0; i < size; i++) {\n this.workers.push({ worker: create(), idle: true });\n }\n });\n }\n }\n\n /**\n * Decode the given block of bytes with the set compression method.\n * @param {ArrayBuffer} buffer the array buffer of bytes to decode.\n * @returns {Promise} the decoded result as a `Promise`\n */\n async decode(fileDirectory, buffer) {\n if (this._awaitingDecoder) {\n await this._awaitingDecoder;\n }\n return this.size === 0\n ? getDecoder(fileDirectory).then((decoder) => decoder.decode(fileDirectory, buffer))\n : new Promise((resolve) => {\n const worker = this.workers.find((candidate) => candidate.idle)\n || this.workers[Math.floor(Math.random() * this.size)];\n worker.idle = false;\n const id = this.messageId++;\n const onMessage = (e) => {\n if (e.data.id === id) {\n worker.idle = true;\n resolve(e.data.decoded);\n worker.worker.removeEventListener('message', onMessage);\n }\n };\n worker.worker.addEventListener('message', onMessage);\n worker.worker.postMessage({ fileDirectory, buffer, id }, [buffer]);\n });\n }\n\n destroy() {\n if (this.workers) {\n this.workers.forEach((worker) => {\n worker.worker.terminate();\n });\n this.workers = null;\n }\n }\n}\n\nexport default Pool;\n",null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,"/*! https://mths.be/punycode v1.3.2 by @mathias */\n;(function(root) {\n\n\t/** Detect free variables */\n\tvar freeExports = typeof exports == 'object' && exports &&\n\t\t!exports.nodeType && exports;\n\tvar freeModule = typeof module == 'object' && module &&\n\t\t!module.nodeType && module;\n\tvar freeGlobal = typeof global == 'object' && global;\n\tif (\n\t\tfreeGlobal.global === freeGlobal ||\n\t\tfreeGlobal.window === freeGlobal ||\n\t\tfreeGlobal.self === freeGlobal\n\t) {\n\t\troot = freeGlobal;\n\t}\n\n\t/**\n\t * The `punycode` object.\n\t * @name punycode\n\t * @type Object\n\t */\n\tvar punycode,\n\n\t/** Highest positive signed 32-bit float value */\n\tmaxInt = 2147483647, // aka. 0x7FFFFFFF or 2^31-1\n\n\t/** Bootstring parameters */\n\tbase = 36,\n\ttMin = 1,\n\ttMax = 26,\n\tskew = 38,\n\tdamp = 700,\n\tinitialBias = 72,\n\tinitialN = 128, // 0x80\n\tdelimiter = '-', // '\\x2D'\n\n\t/** Regular expressions */\n\tregexPunycode = /^xn--/,\n\tregexNonASCII = /[^\\x20-\\x7E]/, // unprintable ASCII chars + non-ASCII chars\n\tregexSeparators = /[\\x2E\\u3002\\uFF0E\\uFF61]/g, // RFC 3490 separators\n\n\t/** Error messages */\n\terrors = {\n\t\t'overflow': 'Overflow: input needs wider integers to process',\n\t\t'not-basic': 'Illegal input >= 0x80 (not a basic code point)',\n\t\t'invalid-input': 'Invalid input'\n\t},\n\n\t/** Convenience shortcuts */\n\tbaseMinusTMin = base - tMin,\n\tfloor = Math.floor,\n\tstringFromCharCode = String.fromCharCode,\n\n\t/** Temporary variable */\n\tkey;\n\n\t/*--------------------------------------------------------------------------*/\n\n\t/**\n\t * A generic error utility function.\n\t * @private\n\t * @param {String} type The error type.\n\t * @returns {Error} Throws a `RangeError` with the applicable error message.\n\t */\n\tfunction error(type) {\n\t\tthrow RangeError(errors[type]);\n\t}\n\n\t/**\n\t * A generic `Array#map` utility function.\n\t * @private\n\t * @param {Array} array The array to iterate over.\n\t * @param {Function} callback The function that gets called for every array\n\t * item.\n\t * @returns {Array} A new array of values returned by the callback function.\n\t */\n\tfunction map(array, fn) {\n\t\tvar length = array.length;\n\t\tvar result = [];\n\t\twhile (length--) {\n\t\t\tresult[length] = fn(array[length]);\n\t\t}\n\t\treturn result;\n\t}\n\n\t/**\n\t * A simple `Array#map`-like wrapper to work with domain name strings or email\n\t * addresses.\n\t * @private\n\t * @param {String} domain The domain name or email address.\n\t * @param {Function} callback The function that gets called for every\n\t * character.\n\t * @returns {Array} A new string of characters returned by the callback\n\t * function.\n\t */\n\tfunction mapDomain(string, fn) {\n\t\tvar parts = string.split('@');\n\t\tvar result = '';\n\t\tif (parts.length > 1) {\n\t\t\t// In email addresses, only the domain name should be punycoded. Leave\n\t\t\t// the local part (i.e. everything up to `@`) intact.\n\t\t\tresult = parts[0] + '@';\n\t\t\tstring = parts[1];\n\t\t}\n\t\t// Avoid `split(regex)` for IE8 compatibility. See #17.\n\t\tstring = string.replace(regexSeparators, '\\x2E');\n\t\tvar labels = string.split('.');\n\t\tvar encoded = map(labels, fn).join('.');\n\t\treturn result + encoded;\n\t}\n\n\t/**\n\t * Creates an array containing the numeric code points of each Unicode\n\t * character in the string. While JavaScript uses UCS-2 internally,\n\t * this function will convert a pair of surrogate halves (each of which\n\t * UCS-2 exposes as separate characters) into a single code point,\n\t * matching UTF-16.\n\t * @see `punycode.ucs2.encode`\n\t * @see \n\t * @memberOf punycode.ucs2\n\t * @name decode\n\t * @param {String} string The Unicode input string (UCS-2).\n\t * @returns {Array} The new array of code points.\n\t */\n\tfunction ucs2decode(string) {\n\t\tvar output = [],\n\t\t counter = 0,\n\t\t length = string.length,\n\t\t value,\n\t\t extra;\n\t\twhile (counter < length) {\n\t\t\tvalue = string.charCodeAt(counter++);\n\t\t\tif (value >= 0xD800 && value <= 0xDBFF && counter < length) {\n\t\t\t\t// high surrogate, and there is a next character\n\t\t\t\textra = string.charCodeAt(counter++);\n\t\t\t\tif ((extra & 0xFC00) == 0xDC00) { // low surrogate\n\t\t\t\t\toutput.push(((value & 0x3FF) << 10) + (extra & 0x3FF) + 0x10000);\n\t\t\t\t} else {\n\t\t\t\t\t// unmatched surrogate; only append this code unit, in case the next\n\t\t\t\t\t// code unit is the high surrogate of a surrogate pair\n\t\t\t\t\toutput.push(value);\n\t\t\t\t\tcounter--;\n\t\t\t\t}\n\t\t\t} else {\n\t\t\t\toutput.push(value);\n\t\t\t}\n\t\t}\n\t\treturn output;\n\t}\n\n\t/**\n\t * Creates a string based on an array of numeric code points.\n\t * @see `punycode.ucs2.decode`\n\t * @memberOf punycode.ucs2\n\t * @name encode\n\t * @param {Array} codePoints The array of numeric code points.\n\t * @returns {String} The new Unicode string (UCS-2).\n\t */\n\tfunction ucs2encode(array) {\n\t\treturn map(array, function(value) {\n\t\t\tvar output = '';\n\t\t\tif (value > 0xFFFF) {\n\t\t\t\tvalue -= 0x10000;\n\t\t\t\toutput += stringFromCharCode(value >>> 10 & 0x3FF | 0xD800);\n\t\t\t\tvalue = 0xDC00 | value & 0x3FF;\n\t\t\t}\n\t\t\toutput += stringFromCharCode(value);\n\t\t\treturn output;\n\t\t}).join('');\n\t}\n\n\t/**\n\t * Converts a basic code point into a digit/integer.\n\t * @see `digitToBasic()`\n\t * @private\n\t * @param {Number} codePoint The basic numeric code point value.\n\t * @returns {Number} The numeric value of a basic code point (for use in\n\t * representing integers) in the range `0` to `base - 1`, or `base` if\n\t * the code point does not represent a value.\n\t */\n\tfunction basicToDigit(codePoint) {\n\t\tif (codePoint - 48 < 10) {\n\t\t\treturn codePoint - 22;\n\t\t}\n\t\tif (codePoint - 65 < 26) {\n\t\t\treturn codePoint - 65;\n\t\t}\n\t\tif (codePoint - 97 < 26) {\n\t\t\treturn codePoint - 97;\n\t\t}\n\t\treturn base;\n\t}\n\n\t/**\n\t * Converts a digit/integer into a basic code point.\n\t * @see `basicToDigit()`\n\t * @private\n\t * @param {Number} digit The numeric value of a basic code point.\n\t * @returns {Number} The basic code point whose value (when used for\n\t * representing integers) is `digit`, which needs to be in the range\n\t * `0` to `base - 1`. If `flag` is non-zero, the uppercase form is\n\t * used; else, the lowercase form is used. The behavior is undefined\n\t * if `flag` is non-zero and `digit` has no uppercase form.\n\t */\n\tfunction digitToBasic(digit, flag) {\n\t\t// 0..25 map to ASCII a..z or A..Z\n\t\t// 26..35 map to ASCII 0..9\n\t\treturn digit + 22 + 75 * (digit < 26) - ((flag != 0) << 5);\n\t}\n\n\t/**\n\t * Bias adaptation function as per section 3.4 of RFC 3492.\n\t * http://tools.ietf.org/html/rfc3492#section-3.4\n\t * @private\n\t */\n\tfunction adapt(delta, numPoints, firstTime) {\n\t\tvar k = 0;\n\t\tdelta = firstTime ? floor(delta / damp) : delta >> 1;\n\t\tdelta += floor(delta / numPoints);\n\t\tfor (/* no initialization */; delta > baseMinusTMin * tMax >> 1; k += base) {\n\t\t\tdelta = floor(delta / baseMinusTMin);\n\t\t}\n\t\treturn floor(k + (baseMinusTMin + 1) * delta / (delta + skew));\n\t}\n\n\t/**\n\t * Converts a Punycode string of ASCII-only symbols to a string of Unicode\n\t * symbols.\n\t * @memberOf punycode\n\t * @param {String} input The Punycode string of ASCII-only symbols.\n\t * @returns {String} The resulting string of Unicode symbols.\n\t */\n\tfunction decode(input) {\n\t\t// Don't use UCS-2\n\t\tvar output = [],\n\t\t inputLength = input.length,\n\t\t out,\n\t\t i = 0,\n\t\t n = initialN,\n\t\t bias = initialBias,\n\t\t basic,\n\t\t j,\n\t\t index,\n\t\t oldi,\n\t\t w,\n\t\t k,\n\t\t digit,\n\t\t t,\n\t\t /** Cached calculation results */\n\t\t baseMinusT;\n\n\t\t// Handle the basic code points: let `basic` be the number of input code\n\t\t// points before the last delimiter, or `0` if there is none, then copy\n\t\t// the first basic code points to the output.\n\n\t\tbasic = input.lastIndexOf(delimiter);\n\t\tif (basic < 0) {\n\t\t\tbasic = 0;\n\t\t}\n\n\t\tfor (j = 0; j < basic; ++j) {\n\t\t\t// if it's not a basic code point\n\t\t\tif (input.charCodeAt(j) >= 0x80) {\n\t\t\t\terror('not-basic');\n\t\t\t}\n\t\t\toutput.push(input.charCodeAt(j));\n\t\t}\n\n\t\t// Main decoding loop: start just after the last delimiter if any basic code\n\t\t// points were copied; start at the beginning otherwise.\n\n\t\tfor (index = basic > 0 ? basic + 1 : 0; index < inputLength; /* no final expression */) {\n\n\t\t\t// `index` is the index of the next character to be consumed.\n\t\t\t// Decode a generalized variable-length integer into `delta`,\n\t\t\t// which gets added to `i`. The overflow checking is easier\n\t\t\t// if we increase `i` as we go, then subtract off its starting\n\t\t\t// value at the end to obtain `delta`.\n\t\t\tfor (oldi = i, w = 1, k = base; /* no condition */; k += base) {\n\n\t\t\t\tif (index >= inputLength) {\n\t\t\t\t\terror('invalid-input');\n\t\t\t\t}\n\n\t\t\t\tdigit = basicToDigit(input.charCodeAt(index++));\n\n\t\t\t\tif (digit >= base || digit > floor((maxInt - i) / w)) {\n\t\t\t\t\terror('overflow');\n\t\t\t\t}\n\n\t\t\t\ti += digit * w;\n\t\t\t\tt = k <= bias ? tMin : (k >= bias + tMax ? tMax : k - bias);\n\n\t\t\t\tif (digit < t) {\n\t\t\t\t\tbreak;\n\t\t\t\t}\n\n\t\t\t\tbaseMinusT = base - t;\n\t\t\t\tif (w > floor(maxInt / baseMinusT)) {\n\t\t\t\t\terror('overflow');\n\t\t\t\t}\n\n\t\t\t\tw *= baseMinusT;\n\n\t\t\t}\n\n\t\t\tout = output.length + 1;\n\t\t\tbias = adapt(i - oldi, out, oldi == 0);\n\n\t\t\t// `i` was supposed to wrap around from `out` to `0`,\n\t\t\t// incrementing `n` each time, so we'll fix that now:\n\t\t\tif (floor(i / out) > maxInt - n) {\n\t\t\t\terror('overflow');\n\t\t\t}\n\n\t\t\tn += floor(i / out);\n\t\t\ti %= out;\n\n\t\t\t// Insert `n` at position `i` of the output\n\t\t\toutput.splice(i++, 0, n);\n\n\t\t}\n\n\t\treturn ucs2encode(output);\n\t}\n\n\t/**\n\t * Converts a string of Unicode symbols (e.g. a domain name label) to a\n\t * Punycode string of ASCII-only symbols.\n\t * @memberOf punycode\n\t * @param {String} input The string of Unicode symbols.\n\t * @returns {String} The resulting Punycode string of ASCII-only symbols.\n\t */\n\tfunction encode(input) {\n\t\tvar n,\n\t\t delta,\n\t\t handledCPCount,\n\t\t basicLength,\n\t\t bias,\n\t\t j,\n\t\t m,\n\t\t q,\n\t\t k,\n\t\t t,\n\t\t currentValue,\n\t\t output = [],\n\t\t /** `inputLength` will hold the number of code points in `input`. */\n\t\t inputLength,\n\t\t /** Cached calculation results */\n\t\t handledCPCountPlusOne,\n\t\t baseMinusT,\n\t\t qMinusT;\n\n\t\t// Convert the input in UCS-2 to Unicode\n\t\tinput = ucs2decode(input);\n\n\t\t// Cache the length\n\t\tinputLength = input.length;\n\n\t\t// Initialize the state\n\t\tn = initialN;\n\t\tdelta = 0;\n\t\tbias = initialBias;\n\n\t\t// Handle the basic code points\n\t\tfor (j = 0; j < inputLength; ++j) {\n\t\t\tcurrentValue = input[j];\n\t\t\tif (currentValue < 0x80) {\n\t\t\t\toutput.push(stringFromCharCode(currentValue));\n\t\t\t}\n\t\t}\n\n\t\thandledCPCount = basicLength = output.length;\n\n\t\t// `handledCPCount` is the number of code points that have been handled;\n\t\t// `basicLength` is the number of basic code points.\n\n\t\t// Finish the basic string - if it is not empty - with a delimiter\n\t\tif (basicLength) {\n\t\t\toutput.push(delimiter);\n\t\t}\n\n\t\t// Main encoding loop:\n\t\twhile (handledCPCount < inputLength) {\n\n\t\t\t// All non-basic code points < n have been handled already. Find the next\n\t\t\t// larger one:\n\t\t\tfor (m = maxInt, j = 0; j < inputLength; ++j) {\n\t\t\t\tcurrentValue = input[j];\n\t\t\t\tif (currentValue >= n && currentValue < m) {\n\t\t\t\t\tm = currentValue;\n\t\t\t\t}\n\t\t\t}\n\n\t\t\t// Increase `delta` enough to advance the decoder's state to ,\n\t\t\t// but guard against overflow\n\t\t\thandledCPCountPlusOne = handledCPCount + 1;\n\t\t\tif (m - n > floor((maxInt - delta) / handledCPCountPlusOne)) {\n\t\t\t\terror('overflow');\n\t\t\t}\n\n\t\t\tdelta += (m - n) * handledCPCountPlusOne;\n\t\t\tn = m;\n\n\t\t\tfor (j = 0; j < inputLength; ++j) {\n\t\t\t\tcurrentValue = input[j];\n\n\t\t\t\tif (currentValue < n && ++delta > maxInt) {\n\t\t\t\t\terror('overflow');\n\t\t\t\t}\n\n\t\t\t\tif (currentValue == n) {\n\t\t\t\t\t// Represent delta as a generalized variable-length integer\n\t\t\t\t\tfor (q = delta, k = base; /* no condition */; k += base) {\n\t\t\t\t\t\tt = k <= bias ? tMin : (k >= bias + tMax ? tMax : k - bias);\n\t\t\t\t\t\tif (q < t) {\n\t\t\t\t\t\t\tbreak;\n\t\t\t\t\t\t}\n\t\t\t\t\t\tqMinusT = q - t;\n\t\t\t\t\t\tbaseMinusT = base - t;\n\t\t\t\t\t\toutput.push(\n\t\t\t\t\t\t\tstringFromCharCode(digitToBasic(t + qMinusT % baseMinusT, 0))\n\t\t\t\t\t\t);\n\t\t\t\t\t\tq = floor(qMinusT / baseMinusT);\n\t\t\t\t\t}\n\n\t\t\t\t\toutput.push(stringFromCharCode(digitToBasic(q, 0)));\n\t\t\t\t\tbias = adapt(delta, handledCPCountPlusOne, handledCPCount == basicLength);\n\t\t\t\t\tdelta = 0;\n\t\t\t\t\t++handledCPCount;\n\t\t\t\t}\n\t\t\t}\n\n\t\t\t++delta;\n\t\t\t++n;\n\n\t\t}\n\t\treturn output.join('');\n\t}\n\n\t/**\n\t * Converts a Punycode string representing a domain name or an email address\n\t * to Unicode. Only the Punycoded parts of the input will be converted, i.e.\n\t * it doesn't matter if you call it on a string that has already been\n\t * converted to Unicode.\n\t * @memberOf punycode\n\t * @param {String} input The Punycoded domain name or email address to\n\t * convert to Unicode.\n\t * @returns {String} The Unicode representation of the given Punycode\n\t * string.\n\t */\n\tfunction toUnicode(input) {\n\t\treturn mapDomain(input, function(string) {\n\t\t\treturn regexPunycode.test(string)\n\t\t\t\t? decode(string.slice(4).toLowerCase())\n\t\t\t\t: string;\n\t\t});\n\t}\n\n\t/**\n\t * Converts a Unicode string representing a domain name or an email address to\n\t * Punycode. Only the non-ASCII parts of the domain name will be converted,\n\t * i.e. it doesn't matter if you call it with a domain that's already in\n\t * ASCII.\n\t * @memberOf punycode\n\t * @param {String} input The domain name or email address to convert, as a\n\t * Unicode string.\n\t * @returns {String} The Punycode representation of the given domain name or\n\t * email address.\n\t */\n\tfunction toASCII(input) {\n\t\treturn mapDomain(input, function(string) {\n\t\t\treturn regexNonASCII.test(string)\n\t\t\t\t? 'xn--' + encode(string)\n\t\t\t\t: string;\n\t\t});\n\t}\n\n\t/*--------------------------------------------------------------------------*/\n\n\t/** Define the public API */\n\tpunycode = {\n\t\t/**\n\t\t * A string representing the current Punycode.js version number.\n\t\t * @memberOf punycode\n\t\t * @type String\n\t\t */\n\t\t'version': '1.3.2',\n\t\t/**\n\t\t * An object of methods to convert from JavaScript's internal character\n\t\t * representation (UCS-2) to Unicode code points, and back.\n\t\t * @see \n\t\t * @memberOf punycode\n\t\t * @type Object\n\t\t */\n\t\t'ucs2': {\n\t\t\t'decode': ucs2decode,\n\t\t\t'encode': ucs2encode\n\t\t},\n\t\t'decode': decode,\n\t\t'encode': encode,\n\t\t'toASCII': toASCII,\n\t\t'toUnicode': toUnicode\n\t};\n\n\t/** Expose `punycode` */\n\t// Some AMD build optimizers, like r.js, check for specific condition patterns\n\t// like the following:\n\tif (\n\t\ttypeof define == 'function' &&\n\t\ttypeof define.amd == 'object' &&\n\t\tdefine.amd\n\t) {\n\t\tdefine('punycode', function() {\n\t\t\treturn punycode;\n\t\t});\n\t} else if (freeExports && freeModule) {\n\t\tif (module.exports == freeExports) { // in Node.js or RingoJS v0.8.0+\n\t\t\tfreeModule.exports = punycode;\n\t\t} else { // in Narwhal or RingoJS v0.7.0-\n\t\t\tfor (key in punycode) {\n\t\t\t\tpunycode.hasOwnProperty(key) && (freeExports[key] = punycode[key]);\n\t\t\t}\n\t\t}\n\t} else { // in Rhino or a web browser\n\t\troot.punycode = punycode;\n\t}\n\n}(this));\n","'use strict';\n\nmodule.exports = {\n isString: function(arg) {\n return typeof(arg) === 'string';\n },\n isObject: function(arg) {\n return typeof(arg) === 'object' && arg !== null;\n },\n isNull: function(arg) {\n return arg === null;\n },\n isNullOrUndefined: function(arg) {\n return arg == null;\n }\n};\n","// Copyright Joyent, Inc. and other Node contributors.\n//\n// Permission is hereby granted, free of charge, to any person obtaining a\n// copy of this software and associated documentation files (the\n// \"Software\"), to deal in the Software without restriction, including\n// without limitation the rights to use, copy, modify, merge, publish,\n// distribute, sublicense, and/or sell copies of the Software, and to permit\n// persons to whom the Software is furnished to do so, subject to the\n// following conditions:\n//\n// The above copyright notice and this permission notice shall be included\n// in all copies or substantial portions of the Software.\n//\n// THE SOFTWARE IS PROVIDED \"AS IS\", WITHOUT WARRANTY OF ANY KIND, EXPRESS\n// OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF\n// MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN\n// NO EVENT SHALL THE AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM,\n// DAMAGES OR OTHER LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR\n// OTHERWISE, ARISING FROM, OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE\n// USE OR OTHER DEALINGS IN THE SOFTWARE.\n\n'use strict';\n\n// If obj.hasOwnProperty has been overridden, then calling\n// obj.hasOwnProperty(prop) will break.\n// See: https://github.com/joyent/node/issues/1707\nfunction hasOwnProperty(obj, prop) {\n return Object.prototype.hasOwnProperty.call(obj, prop);\n}\n\nmodule.exports = function(qs, sep, eq, options) {\n sep = sep || '&';\n eq = eq || '=';\n var obj = {};\n\n if (typeof qs !== 'string' || qs.length === 0) {\n return obj;\n }\n\n var regexp = /\\+/g;\n qs = qs.split(sep);\n\n var maxKeys = 1000;\n if (options && typeof options.maxKeys === 'number') {\n maxKeys = options.maxKeys;\n }\n\n var len = qs.length;\n // maxKeys <= 0 means that we should not limit keys count\n if (maxKeys > 0 && len > maxKeys) {\n len = maxKeys;\n }\n\n for (var i = 0; i < len; ++i) {\n var x = qs[i].replace(regexp, '%20'),\n idx = x.indexOf(eq),\n kstr, vstr, k, v;\n\n if (idx >= 0) {\n kstr = x.substr(0, idx);\n vstr = x.substr(idx + 1);\n } else {\n kstr = x;\n vstr = '';\n }\n\n k = decodeURIComponent(kstr);\n v = decodeURIComponent(vstr);\n\n if (!hasOwnProperty(obj, k)) {\n obj[k] = v;\n } else if (Array.isArray(obj[k])) {\n obj[k].push(v);\n } else {\n obj[k] = [obj[k], v];\n }\n }\n\n return obj;\n};\n","// Copyright Joyent, Inc. and other Node contributors.\n//\n// Permission is hereby granted, free of charge, to any person obtaining a\n// copy of this software and associated documentation files (the\n// \"Software\"), to deal in the Software without restriction, including\n// without limitation the rights to use, copy, modify, merge, publish,\n// distribute, sublicense, and/or sell copies of the Software, and to permit\n// persons to whom the Software is furnished to do so, subject to the\n// following conditions:\n//\n// The above copyright notice and this permission notice shall be included\n// in all copies or substantial portions of the Software.\n//\n// THE SOFTWARE IS PROVIDED \"AS IS\", WITHOUT WARRANTY OF ANY KIND, EXPRESS\n// OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF\n// MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN\n// NO EVENT SHALL THE AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM,\n// DAMAGES OR OTHER LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR\n// OTHERWISE, ARISING FROM, OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE\n// USE OR OTHER DEALINGS IN THE SOFTWARE.\n\n'use strict';\n\nvar stringifyPrimitive = function(v) {\n switch (typeof v) {\n case 'string':\n return v;\n\n case 'boolean':\n return v ? 'true' : 'false';\n\n case 'number':\n return isFinite(v) ? v : '';\n\n default:\n return '';\n }\n};\n\nmodule.exports = function(obj, sep, eq, name) {\n sep = sep || '&';\n eq = eq || '=';\n if (obj === null) {\n obj = undefined;\n }\n\n if (typeof obj === 'object') {\n return Object.keys(obj).map(function(k) {\n var ks = encodeURIComponent(stringifyPrimitive(k)) + eq;\n if (Array.isArray(obj[k])) {\n return obj[k].map(function(v) {\n return ks + encodeURIComponent(stringifyPrimitive(v));\n }).join(sep);\n } else {\n return ks + encodeURIComponent(stringifyPrimitive(obj[k]));\n }\n }).join(sep);\n\n }\n\n if (!name) return '';\n return encodeURIComponent(stringifyPrimitive(name)) + eq +\n encodeURIComponent(stringifyPrimitive(obj));\n};\n","'use strict';\n\nexports.decode = exports.parse = require('./decode');\nexports.encode = exports.stringify = require('./encode');\n","// Copyright Joyent, Inc. and other Node contributors.\n//\n// Permission is hereby granted, free of charge, to any person obtaining a\n// copy of this software and associated documentation files (the\n// \"Software\"), to deal in the Software without restriction, including\n// without limitation the rights to use, copy, modify, merge, publish,\n// distribute, sublicense, and/or sell copies of the Software, and to permit\n// persons to whom the Software is furnished to do so, subject to the\n// following conditions:\n//\n// The above copyright notice and this permission notice shall be included\n// in all copies or substantial portions of the Software.\n//\n// THE SOFTWARE IS PROVIDED \"AS IS\", WITHOUT WARRANTY OF ANY KIND, EXPRESS\n// OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF\n// MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN\n// NO EVENT SHALL THE AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM,\n// DAMAGES OR OTHER LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR\n// OTHERWISE, ARISING FROM, OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE\n// USE OR OTHER DEALINGS IN THE SOFTWARE.\n\n'use strict';\n\nvar punycode = require('punycode');\nvar util = require('./util');\n\nexports.parse = urlParse;\nexports.resolve = urlResolve;\nexports.resolveObject = urlResolveObject;\nexports.format = urlFormat;\n\nexports.Url = Url;\n\nfunction Url() {\n this.protocol = null;\n this.slashes = null;\n this.auth = null;\n this.host = null;\n this.port = null;\n this.hostname = null;\n this.hash = null;\n this.search = null;\n this.query = null;\n this.pathname = null;\n this.path = null;\n this.href = null;\n}\n\n// Reference: RFC 3986, RFC 1808, RFC 2396\n\n// define these here so at least they only have to be\n// compiled once on the first module load.\nvar protocolPattern = /^([a-z0-9.+-]+:)/i,\n portPattern = /:[0-9]*$/,\n\n // Special case for a simple path URL\n simplePathPattern = /^(\\/\\/?(?!\\/)[^\\?\\s]*)(\\?[^\\s]*)?$/,\n\n // RFC 2396: characters reserved for delimiting URLs.\n // We actually just auto-escape these.\n delims = ['<', '>', '\"', '`', ' ', '\\r', '\\n', '\\t'],\n\n // RFC 2396: characters not allowed for various reasons.\n unwise = ['{', '}', '|', '\\\\', '^', '`'].concat(delims),\n\n // Allowed by RFCs, but cause of XSS attacks. Always escape these.\n autoEscape = ['\\''].concat(unwise),\n // Characters that are never ever allowed in a hostname.\n // Note that any invalid chars are also handled, but these\n // are the ones that are *expected* to be seen, so we fast-path\n // them.\n nonHostChars = ['%', '/', '?', ';', '#'].concat(autoEscape),\n hostEndingChars = ['/', '?', '#'],\n hostnameMaxLen = 255,\n hostnamePartPattern = /^[+a-z0-9A-Z_-]{0,63}$/,\n hostnamePartStart = /^([+a-z0-9A-Z_-]{0,63})(.*)$/,\n // protocols that can allow \"unsafe\" and \"unwise\" chars.\n unsafeProtocol = {\n 'javascript': true,\n 'javascript:': true\n },\n // protocols that never have a hostname.\n hostlessProtocol = {\n 'javascript': true,\n 'javascript:': true\n },\n // protocols that always contain a // bit.\n slashedProtocol = {\n 'http': true,\n 'https': true,\n 'ftp': true,\n 'gopher': true,\n 'file': true,\n 'http:': true,\n 'https:': true,\n 'ftp:': true,\n 'gopher:': true,\n 'file:': true\n },\n querystring = require('querystring');\n\nfunction urlParse(url, parseQueryString, slashesDenoteHost) {\n if (url && util.isObject(url) && url instanceof Url) return url;\n\n var u = new Url;\n u.parse(url, parseQueryString, slashesDenoteHost);\n return u;\n}\n\nUrl.prototype.parse = function(url, parseQueryString, slashesDenoteHost) {\n if (!util.isString(url)) {\n throw new TypeError(\"Parameter 'url' must be a string, not \" + typeof url);\n }\n\n // Copy chrome, IE, opera backslash-handling behavior.\n // Back slashes before the query string get converted to forward slashes\n // See: https://code.google.com/p/chromium/issues/detail?id=25916\n var queryIndex = url.indexOf('?'),\n splitter =\n (queryIndex !== -1 && queryIndex < url.indexOf('#')) ? '?' : '#',\n uSplit = url.split(splitter),\n slashRegex = /\\\\/g;\n uSplit[0] = uSplit[0].replace(slashRegex, '/');\n url = uSplit.join(splitter);\n\n var rest = url;\n\n // trim before proceeding.\n // This is to support parse stuff like \" http://foo.com \\n\"\n rest = rest.trim();\n\n if (!slashesDenoteHost && url.split('#').length === 1) {\n // Try fast path regexp\n var simplePath = simplePathPattern.exec(rest);\n if (simplePath) {\n this.path = rest;\n this.href = rest;\n this.pathname = simplePath[1];\n if (simplePath[2]) {\n this.search = simplePath[2];\n if (parseQueryString) {\n this.query = querystring.parse(this.search.substr(1));\n } else {\n this.query = this.search.substr(1);\n }\n } else if (parseQueryString) {\n this.search = '';\n this.query = {};\n }\n return this;\n }\n }\n\n var proto = protocolPattern.exec(rest);\n if (proto) {\n proto = proto[0];\n var lowerProto = proto.toLowerCase();\n this.protocol = lowerProto;\n rest = rest.substr(proto.length);\n }\n\n // figure out if it's got a host\n // user@server is *always* interpreted as a hostname, and url\n // resolution will treat //foo/bar as host=foo,path=bar because that's\n // how the browser resolves relative URLs.\n if (slashesDenoteHost || proto || rest.match(/^\\/\\/[^@\\/]+@[^@\\/]+/)) {\n var slashes = rest.substr(0, 2) === '//';\n if (slashes && !(proto && hostlessProtocol[proto])) {\n rest = rest.substr(2);\n this.slashes = true;\n }\n }\n\n if (!hostlessProtocol[proto] &&\n (slashes || (proto && !slashedProtocol[proto]))) {\n\n // there's a hostname.\n // the first instance of /, ?, ;, or # ends the host.\n //\n // If there is an @ in the hostname, then non-host chars *are* allowed\n // to the left of the last @ sign, unless some host-ending character\n // comes *before* the @-sign.\n // URLs are obnoxious.\n //\n // ex:\n // http://a@b@c/ => user:a@b host:c\n // http://a@b?@c => user:a host:c path:/?@c\n\n // v0.12 TODO(isaacs): This is not quite how Chrome does things.\n // Review our test case against browsers more comprehensively.\n\n // find the first instance of any hostEndingChars\n var hostEnd = -1;\n for (var i = 0; i < hostEndingChars.length; i++) {\n var hec = rest.indexOf(hostEndingChars[i]);\n if (hec !== -1 && (hostEnd === -1 || hec < hostEnd))\n hostEnd = hec;\n }\n\n // at this point, either we have an explicit point where the\n // auth portion cannot go past, or the last @ char is the decider.\n var auth, atSign;\n if (hostEnd === -1) {\n // atSign can be anywhere.\n atSign = rest.lastIndexOf('@');\n } else {\n // atSign must be in auth portion.\n // http://a@b/c@d => host:b auth:a path:/c@d\n atSign = rest.lastIndexOf('@', hostEnd);\n }\n\n // Now we have a portion which is definitely the auth.\n // Pull that off.\n if (atSign !== -1) {\n auth = rest.slice(0, atSign);\n rest = rest.slice(atSign + 1);\n this.auth = decodeURIComponent(auth);\n }\n\n // the host is the remaining to the left of the first non-host char\n hostEnd = -1;\n for (var i = 0; i < nonHostChars.length; i++) {\n var hec = rest.indexOf(nonHostChars[i]);\n if (hec !== -1 && (hostEnd === -1 || hec < hostEnd))\n hostEnd = hec;\n }\n // if we still have not hit it, then the entire thing is a host.\n if (hostEnd === -1)\n hostEnd = rest.length;\n\n this.host = rest.slice(0, hostEnd);\n rest = rest.slice(hostEnd);\n\n // pull out port.\n this.parseHost();\n\n // we've indicated that there is a hostname,\n // so even if it's empty, it has to be present.\n this.hostname = this.hostname || '';\n\n // if hostname begins with [ and ends with ]\n // assume that it's an IPv6 address.\n var ipv6Hostname = this.hostname[0] === '[' &&\n this.hostname[this.hostname.length - 1] === ']';\n\n // validate a little.\n if (!ipv6Hostname) {\n var hostparts = this.hostname.split(/\\./);\n for (var i = 0, l = hostparts.length; i < l; i++) {\n var part = hostparts[i];\n if (!part) continue;\n if (!part.match(hostnamePartPattern)) {\n var newpart = '';\n for (var j = 0, k = part.length; j < k; j++) {\n if (part.charCodeAt(j) > 127) {\n // we replace non-ASCII char with a temporary placeholder\n // we need this to make sure size of hostname is not\n // broken by replacing non-ASCII by nothing\n newpart += 'x';\n } else {\n newpart += part[j];\n }\n }\n // we test again with ASCII char only\n if (!newpart.match(hostnamePartPattern)) {\n var validParts = hostparts.slice(0, i);\n var notHost = hostparts.slice(i + 1);\n var bit = part.match(hostnamePartStart);\n if (bit) {\n validParts.push(bit[1]);\n notHost.unshift(bit[2]);\n }\n if (notHost.length) {\n rest = '/' + notHost.join('.') + rest;\n }\n this.hostname = validParts.join('.');\n break;\n }\n }\n }\n }\n\n if (this.hostname.length > hostnameMaxLen) {\n this.hostname = '';\n } else {\n // hostnames are always lower case.\n this.hostname = this.hostname.toLowerCase();\n }\n\n if (!ipv6Hostname) {\n // IDNA Support: Returns a punycoded representation of \"domain\".\n // It only converts parts of the domain name that\n // have non-ASCII characters, i.e. it doesn't matter if\n // you call it with a domain that already is ASCII-only.\n this.hostname = punycode.toASCII(this.hostname);\n }\n\n var p = this.port ? ':' + this.port : '';\n var h = this.hostname || '';\n this.host = h + p;\n this.href += this.host;\n\n // strip [ and ] from the hostname\n // the host field still retains them, though\n if (ipv6Hostname) {\n this.hostname = this.hostname.substr(1, this.hostname.length - 2);\n if (rest[0] !== '/') {\n rest = '/' + rest;\n }\n }\n }\n\n // now rest is set to the post-host stuff.\n // chop off any delim chars.\n if (!unsafeProtocol[lowerProto]) {\n\n // First, make 100% sure that any \"autoEscape\" chars get\n // escaped, even if encodeURIComponent doesn't think they\n // need to be.\n for (var i = 0, l = autoEscape.length; i < l; i++) {\n var ae = autoEscape[i];\n if (rest.indexOf(ae) === -1)\n continue;\n var esc = encodeURIComponent(ae);\n if (esc === ae) {\n esc = escape(ae);\n }\n rest = rest.split(ae).join(esc);\n }\n }\n\n\n // chop off from the tail first.\n var hash = rest.indexOf('#');\n if (hash !== -1) {\n // got a fragment string.\n this.hash = rest.substr(hash);\n rest = rest.slice(0, hash);\n }\n var qm = rest.indexOf('?');\n if (qm !== -1) {\n this.search = rest.substr(qm);\n this.query = rest.substr(qm + 1);\n if (parseQueryString) {\n this.query = querystring.parse(this.query);\n }\n rest = rest.slice(0, qm);\n } else if (parseQueryString) {\n // no query string, but parseQueryString still requested\n this.search = '';\n this.query = {};\n }\n if (rest) this.pathname = rest;\n if (slashedProtocol[lowerProto] &&\n this.hostname && !this.pathname) {\n this.pathname = '/';\n }\n\n //to support http.request\n if (this.pathname || this.search) {\n var p = this.pathname || '';\n var s = this.search || '';\n this.path = p + s;\n }\n\n // finally, reconstruct the href based on what has been validated.\n this.href = this.format();\n return this;\n};\n\n// format a parsed object into a url string\nfunction urlFormat(obj) {\n // ensure it's an object, and not a string url.\n // If it's an obj, this is a no-op.\n // this way, you can call url_format() on strings\n // to clean up potentially wonky urls.\n if (util.isString(obj)) obj = urlParse(obj);\n if (!(obj instanceof Url)) return Url.prototype.format.call(obj);\n return obj.format();\n}\n\nUrl.prototype.format = function() {\n var auth = this.auth || '';\n if (auth) {\n auth = encodeURIComponent(auth);\n auth = auth.replace(/%3A/i, ':');\n auth += '@';\n }\n\n var protocol = this.protocol || '',\n pathname = this.pathname || '',\n hash = this.hash || '',\n host = false,\n query = '';\n\n if (this.host) {\n host = auth + this.host;\n } else if (this.hostname) {\n host = auth + (this.hostname.indexOf(':') === -1 ?\n this.hostname :\n '[' + this.hostname + ']');\n if (this.port) {\n host += ':' + this.port;\n }\n }\n\n if (this.query &&\n util.isObject(this.query) &&\n Object.keys(this.query).length) {\n query = querystring.stringify(this.query);\n }\n\n var search = this.search || (query && ('?' + query)) || '';\n\n if (protocol && protocol.substr(-1) !== ':') protocol += ':';\n\n // only the slashedProtocols get the //. Not mailto:, xmpp:, etc.\n // unless they had them to begin with.\n if (this.slashes ||\n (!protocol || slashedProtocol[protocol]) && host !== false) {\n host = '//' + (host || '');\n if (pathname && pathname.charAt(0) !== '/') pathname = '/' + pathname;\n } else if (!host) {\n host = '';\n }\n\n if (hash && hash.charAt(0) !== '#') hash = '#' + hash;\n if (search && search.charAt(0) !== '?') search = '?' + search;\n\n pathname = pathname.replace(/[?#]/g, function(match) {\n return encodeURIComponent(match);\n });\n search = search.replace('#', '%23');\n\n return protocol + host + pathname + search + hash;\n};\n\nfunction urlResolve(source, relative) {\n return urlParse(source, false, true).resolve(relative);\n}\n\nUrl.prototype.resolve = function(relative) {\n return this.resolveObject(urlParse(relative, false, true)).format();\n};\n\nfunction urlResolveObject(source, relative) {\n if (!source) return relative;\n return urlParse(source, false, true).resolveObject(relative);\n}\n\nUrl.prototype.resolveObject = function(relative) {\n if (util.isString(relative)) {\n var rel = new Url();\n rel.parse(relative, false, true);\n relative = rel;\n }\n\n var result = new Url();\n var tkeys = Object.keys(this);\n for (var tk = 0; tk < tkeys.length; tk++) {\n var tkey = tkeys[tk];\n result[tkey] = this[tkey];\n }\n\n // hash is always overridden, no matter what.\n // even href=\"\" will remove it.\n result.hash = relative.hash;\n\n // if the relative url is empty, then there's nothing left to do here.\n if (relative.href === '') {\n result.href = result.format();\n return result;\n }\n\n // hrefs like //foo/bar always cut to the protocol.\n if (relative.slashes && !relative.protocol) {\n // take everything except the protocol from relative\n var rkeys = Object.keys(relative);\n for (var rk = 0; rk < rkeys.length; rk++) {\n var rkey = rkeys[rk];\n if (rkey !== 'protocol')\n result[rkey] = relative[rkey];\n }\n\n //urlParse appends trailing / to urls like http://www.example.com\n if (slashedProtocol[result.protocol] &&\n result.hostname && !result.pathname) {\n result.path = result.pathname = '/';\n }\n\n result.href = result.format();\n return result;\n }\n\n if (relative.protocol && relative.protocol !== result.protocol) {\n // if it's a known url protocol, then changing\n // the protocol does weird things\n // first, if it's not file:, then we MUST have a host,\n // and if there was a path\n // to begin with, then we MUST have a path.\n // if it is file:, then the host is dropped,\n // because that's known to be hostless.\n // anything else is assumed to be absolute.\n if (!slashedProtocol[relative.protocol]) {\n var keys = Object.keys(relative);\n for (var v = 0; v < keys.length; v++) {\n var k = keys[v];\n result[k] = relative[k];\n }\n result.href = result.format();\n return result;\n }\n\n result.protocol = relative.protocol;\n if (!relative.host && !hostlessProtocol[relative.protocol]) {\n var relPath = (relative.pathname || '').split('/');\n while (relPath.length && !(relative.host = relPath.shift()));\n if (!relative.host) relative.host = '';\n if (!relative.hostname) relative.hostname = '';\n if (relPath[0] !== '') relPath.unshift('');\n if (relPath.length < 2) relPath.unshift('');\n result.pathname = relPath.join('/');\n } else {\n result.pathname = relative.pathname;\n }\n result.search = relative.search;\n result.query = relative.query;\n result.host = relative.host || '';\n result.auth = relative.auth;\n result.hostname = relative.hostname || relative.host;\n result.port = relative.port;\n // to support http.request\n if (result.pathname || result.search) {\n var p = result.pathname || '';\n var s = result.search || '';\n result.path = p + s;\n }\n result.slashes = result.slashes || relative.slashes;\n result.href = result.format();\n return result;\n }\n\n var isSourceAbs = (result.pathname && result.pathname.charAt(0) === '/'),\n isRelAbs = (\n relative.host ||\n relative.pathname && relative.pathname.charAt(0) === '/'\n ),\n mustEndAbs = (isRelAbs || isSourceAbs ||\n (result.host && relative.pathname)),\n removeAllDots = mustEndAbs,\n srcPath = result.pathname && result.pathname.split('/') || [],\n relPath = relative.pathname && relative.pathname.split('/') || [],\n psychotic = result.protocol && !slashedProtocol[result.protocol];\n\n // if the url is a non-slashed url, then relative\n // links like ../.. should be able\n // to crawl up to the hostname, as well. This is strange.\n // result.protocol has already been set by now.\n // Later on, put the first path part into the host field.\n if (psychotic) {\n result.hostname = '';\n result.port = null;\n if (result.host) {\n if (srcPath[0] === '') srcPath[0] = result.host;\n else srcPath.unshift(result.host);\n }\n result.host = '';\n if (relative.protocol) {\n relative.hostname = null;\n relative.port = null;\n if (relative.host) {\n if (relPath[0] === '') relPath[0] = relative.host;\n else relPath.unshift(relative.host);\n }\n relative.host = null;\n }\n mustEndAbs = mustEndAbs && (relPath[0] === '' || srcPath[0] === '');\n }\n\n if (isRelAbs) {\n // it's absolute.\n result.host = (relative.host || relative.host === '') ?\n relative.host : result.host;\n result.hostname = (relative.hostname || relative.hostname === '') ?\n relative.hostname : result.hostname;\n result.search = relative.search;\n result.query = relative.query;\n srcPath = relPath;\n // fall through to the dot-handling below.\n } else if (relPath.length) {\n // it's relative\n // throw away the existing file, and take the new path instead.\n if (!srcPath) srcPath = [];\n srcPath.pop();\n srcPath = srcPath.concat(relPath);\n result.search = relative.search;\n result.query = relative.query;\n } else if (!util.isNullOrUndefined(relative.search)) {\n // just pull out the search.\n // like href='?foo'.\n // Put this after the other two cases because it simplifies the booleans\n if (psychotic) {\n result.hostname = result.host = srcPath.shift();\n //occationaly the auth can get stuck only in host\n //this especially happens in cases like\n //url.resolveObject('mailto:local1@domain1', 'local2@domain2')\n var authInHost = result.host && result.host.indexOf('@') > 0 ?\n result.host.split('@') : false;\n if (authInHost) {\n result.auth = authInHost.shift();\n result.host = result.hostname = authInHost.shift();\n }\n }\n result.search = relative.search;\n result.query = relative.query;\n //to support http.request\n if (!util.isNull(result.pathname) || !util.isNull(result.search)) {\n result.path = (result.pathname ? result.pathname : '') +\n (result.search ? result.search : '');\n }\n result.href = result.format();\n return result;\n }\n\n if (!srcPath.length) {\n // no path at all. easy.\n // we've already handled the other stuff above.\n result.pathname = null;\n //to support http.request\n if (result.search) {\n result.path = '/' + result.search;\n } else {\n result.path = null;\n }\n result.href = result.format();\n return result;\n }\n\n // if a url ENDs in . or .., then it must get a trailing slash.\n // however, if it ends in anything else non-slashy,\n // then it must NOT get a trailing slash.\n var last = srcPath.slice(-1)[0];\n var hasTrailingSlash = (\n (result.host || relative.host || srcPath.length > 1) &&\n (last === '.' || last === '..') || last === '');\n\n // strip single dots, resolve double dots to parent dir\n // if the path tries to go above the root, `up` ends up > 0\n var up = 0;\n for (var i = srcPath.length; i >= 0; i--) {\n last = srcPath[i];\n if (last === '.') {\n srcPath.splice(i, 1);\n } else if (last === '..') {\n srcPath.splice(i, 1);\n up++;\n } else if (up) {\n srcPath.splice(i, 1);\n up--;\n }\n }\n\n // if the path is allowed to go above the root, restore leading ..s\n if (!mustEndAbs && !removeAllDots) {\n for (; up--; up) {\n srcPath.unshift('..');\n }\n }\n\n if (mustEndAbs && srcPath[0] !== '' &&\n (!srcPath[0] || srcPath[0].charAt(0) !== '/')) {\n srcPath.unshift('');\n }\n\n if (hasTrailingSlash && (srcPath.join('/').substr(-1) !== '/')) {\n srcPath.push('');\n }\n\n var isAbsolute = srcPath[0] === '' ||\n (srcPath[0] && srcPath[0].charAt(0) === '/');\n\n // put the host back\n if (psychotic) {\n result.hostname = result.host = isAbsolute ? '' :\n srcPath.length ? srcPath.shift() : '';\n //occationaly the auth can get stuck only in host\n //this especially happens in cases like\n //url.resolveObject('mailto:local1@domain1', 'local2@domain2')\n var authInHost = result.host && result.host.indexOf('@') > 0 ?\n result.host.split('@') : false;\n if (authInHost) {\n result.auth = authInHost.shift();\n result.host = result.hostname = authInHost.shift();\n }\n }\n\n mustEndAbs = mustEndAbs || (result.host && srcPath.length);\n\n if (mustEndAbs && !isAbsolute) {\n srcPath.unshift('');\n }\n\n if (!srcPath.length) {\n result.pathname = null;\n result.path = null;\n } else {\n result.pathname = srcPath.join('/');\n }\n\n //to support request.http\n if (!util.isNull(result.pathname) || !util.isNull(result.search)) {\n result.path = (result.pathname ? result.pathname : '') +\n (result.search ? result.search : '');\n }\n result.auth = relative.auth || result.auth;\n result.slashes = result.slashes || relative.slashes;\n result.href = result.format();\n return result;\n};\n\nUrl.prototype.parseHost = function() {\n var host = this.host;\n var port = portPattern.exec(host);\n if (port) {\n port = port[0];\n if (port !== ':') {\n this.port = port.substr(1);\n }\n host = host.substr(0, host.length - port.length);\n }\n if (host) this.hostname = host;\n};\n","// @flow\n\nexport default function (output: any, ...inputs: Array) {\n for (const input of inputs) {\n for (const k in input) {\n output[k] = input[k];\n }\n }\n return output;\n}\n","// @flow\n\nclass ParsingError extends Error {\n key: string;\n message: string;\n constructor(key: string, message: string) {\n super(message);\n this.message = message;\n this.key = key;\n }\n}\n\nexport default ParsingError;\n","// @flow\n\nimport type {Expression} from './expression.js';\n\n/**\n * Tracks `let` bindings during expression parsing.\n * @private\n */\nclass Scope {\n parent: ?Scope;\n bindings: {[_: string]: Expression};\n constructor(parent?: Scope, bindings: Array<[string, Expression]> = []) {\n this.parent = parent;\n this.bindings = {};\n for (const [name, expression] of bindings) {\n this.bindings[name] = expression;\n }\n }\n\n concat(bindings: Array<[string, Expression]>) {\n return new Scope(this, bindings);\n }\n\n get(name: string): Expression {\n if (this.bindings[name]) { return this.bindings[name]; }\n if (this.parent) { return this.parent.get(name); }\n throw new Error(`${name} not found in scope.`);\n }\n\n has(name: string): boolean {\n if (this.bindings[name]) return true;\n return this.parent ? this.parent.has(name) : false;\n }\n}\n\nexport default Scope;\n","// @flow\n\nexport type NullTypeT = { kind: 'null' };\nexport type NumberTypeT = { kind: 'number' };\nexport type StringTypeT = { kind: 'string' };\nexport type BooleanTypeT = { kind: 'boolean' };\nexport type ColorTypeT = { kind: 'color' };\nexport type ObjectTypeT = { kind: 'object' };\nexport type ValueTypeT = { kind: 'value' };\nexport type ErrorTypeT = { kind: 'error' };\nexport type CollatorTypeT = { kind: 'collator' };\nexport type FormattedTypeT = { kind: 'formatted' };\nexport type ResolvedImageTypeT = { kind: 'resolvedImage' };\n\nexport type EvaluationKind = 'constant' | 'source' | 'camera' | 'composite';\n\nexport type Type =\n NullTypeT |\n NumberTypeT |\n StringTypeT |\n BooleanTypeT |\n ColorTypeT |\n ObjectTypeT |\n ValueTypeT |\n ArrayType | // eslint-disable-line no-use-before-define\n ErrorTypeT |\n CollatorTypeT |\n FormattedTypeT |\n ResolvedImageTypeT\n\nexport type ArrayType = {\n kind: 'array',\n itemType: Type,\n N: ?number\n}\n\nexport type NativeType = 'number' | 'string' | 'boolean' | 'null' | 'array' | 'object'\n\nexport const NullType = {kind: 'null'};\nexport const NumberType = {kind: 'number'};\nexport const StringType = {kind: 'string'};\nexport const BooleanType = {kind: 'boolean'};\nexport const ColorType = {kind: 'color'};\nexport const ObjectType = {kind: 'object'};\nexport const ValueType = {kind: 'value'};\nexport const ErrorType = {kind: 'error'};\nexport const CollatorType = {kind: 'collator'};\nexport const FormattedType = {kind: 'formatted'};\nexport const ResolvedImageType = {kind: 'resolvedImage'};\n\nexport function array(itemType: Type, N: ?number): ArrayType {\n return {\n kind: 'array',\n itemType,\n N\n };\n}\n\nexport function toString(type: Type): string {\n if (type.kind === 'array') {\n const itemType = toString(type.itemType);\n return typeof type.N === 'number' ?\n `array<${itemType}, ${type.N}>` :\n type.itemType.kind === 'value' ? 'array' : `array<${itemType}>`;\n } else {\n return type.kind;\n }\n}\n\nconst valueMemberTypes = [\n NullType,\n NumberType,\n StringType,\n BooleanType,\n ColorType,\n FormattedType,\n ObjectType,\n array(ValueType),\n ResolvedImageType\n];\n\n/**\n * Returns null if `t` is a subtype of `expected`; otherwise returns an\n * error message.\n * @private\n */\nexport function checkSubtype(expected: Type, t: Type): ?string {\n if (t.kind === 'error') {\n // Error is a subtype of every type\n return null;\n } else if (expected.kind === 'array') {\n if (t.kind === 'array' &&\n ((t.N === 0 && t.itemType.kind === 'value') || !checkSubtype(expected.itemType, t.itemType)) &&\n (typeof expected.N !== 'number' || expected.N === t.N)) {\n return null;\n }\n } else if (expected.kind === t.kind) {\n return null;\n } else if (expected.kind === 'value') {\n for (const memberType of valueMemberTypes) {\n if (!checkSubtype(memberType, t)) {\n return null;\n }\n }\n }\n\n return `Expected ${toString(expected)} but found ${toString(t)} instead.`;\n}\n\nexport function isValidType(provided: Type, allowedTypes: Array): boolean {\n return allowedTypes.some(t => t.kind === provided.kind);\n}\n\nexport function isValidNativeType(provided: any, allowedTypes: Array): boolean {\n return allowedTypes.some(t => {\n if (t === 'null') {\n return provided === null;\n } else if (t === 'array') {\n return Array.isArray(provided);\n } else if (t === 'object') {\n return provided && !Array.isArray(provided) && typeof provided === 'object';\n } else {\n return t === typeof provided;\n }\n });\n}\n","// (c) Dean McNamee , 2012.\n//\n// https://github.com/deanm/css-color-parser-js\n//\n// Permission is hereby granted, free of charge, to any person obtaining a copy\n// of this software and associated documentation files (the \"Software\"), to\n// deal in the Software without restriction, including without limitation the\n// rights to use, copy, modify, merge, publish, distribute, sublicense, and/or\n// sell copies of the Software, and to permit persons to whom the Software is\n// furnished to do so, subject to the following conditions:\n//\n// The above copyright notice and this permission notice shall be included in\n// all copies or substantial portions of the Software.\n//\n// THE SOFTWARE IS PROVIDED \"AS IS\", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR\n// IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,\n// FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE\n// AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER\n// LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING\n// FROM, OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS\n// IN THE SOFTWARE.\n\n// http://www.w3.org/TR/css3-color/\nvar kCSSColorTable = {\n \"transparent\": [0,0,0,0], \"aliceblue\": [240,248,255,1],\n \"antiquewhite\": [250,235,215,1], \"aqua\": [0,255,255,1],\n \"aquamarine\": [127,255,212,1], \"azure\": [240,255,255,1],\n \"beige\": [245,245,220,1], \"bisque\": [255,228,196,1],\n \"black\": [0,0,0,1], \"blanchedalmond\": [255,235,205,1],\n \"blue\": [0,0,255,1], \"blueviolet\": [138,43,226,1],\n \"brown\": [165,42,42,1], \"burlywood\": [222,184,135,1],\n \"cadetblue\": [95,158,160,1], \"chartreuse\": [127,255,0,1],\n \"chocolate\": [210,105,30,1], \"coral\": [255,127,80,1],\n \"cornflowerblue\": [100,149,237,1], \"cornsilk\": [255,248,220,1],\n \"crimson\": [220,20,60,1], \"cyan\": [0,255,255,1],\n \"darkblue\": [0,0,139,1], \"darkcyan\": [0,139,139,1],\n \"darkgoldenrod\": [184,134,11,1], \"darkgray\": [169,169,169,1],\n \"darkgreen\": [0,100,0,1], \"darkgrey\": [169,169,169,1],\n \"darkkhaki\": [189,183,107,1], \"darkmagenta\": [139,0,139,1],\n \"darkolivegreen\": [85,107,47,1], \"darkorange\": [255,140,0,1],\n \"darkorchid\": [153,50,204,1], \"darkred\": [139,0,0,1],\n \"darksalmon\": [233,150,122,1], \"darkseagreen\": [143,188,143,1],\n \"darkslateblue\": [72,61,139,1], \"darkslategray\": [47,79,79,1],\n \"darkslategrey\": [47,79,79,1], \"darkturquoise\": [0,206,209,1],\n \"darkviolet\": [148,0,211,1], \"deeppink\": [255,20,147,1],\n \"deepskyblue\": [0,191,255,1], \"dimgray\": [105,105,105,1],\n \"dimgrey\": [105,105,105,1], \"dodgerblue\": [30,144,255,1],\n \"firebrick\": [178,34,34,1], \"floralwhite\": [255,250,240,1],\n \"forestgreen\": [34,139,34,1], \"fuchsia\": [255,0,255,1],\n \"gainsboro\": [220,220,220,1], \"ghostwhite\": [248,248,255,1],\n \"gold\": [255,215,0,1], \"goldenrod\": [218,165,32,1],\n \"gray\": [128,128,128,1], \"green\": [0,128,0,1],\n \"greenyellow\": [173,255,47,1], \"grey\": [128,128,128,1],\n \"honeydew\": [240,255,240,1], \"hotpink\": [255,105,180,1],\n \"indianred\": [205,92,92,1], \"indigo\": [75,0,130,1],\n \"ivory\": [255,255,240,1], \"khaki\": [240,230,140,1],\n \"lavender\": [230,230,250,1], \"lavenderblush\": [255,240,245,1],\n \"lawngreen\": [124,252,0,1], \"lemonchiffon\": [255,250,205,1],\n \"lightblue\": [173,216,230,1], \"lightcoral\": [240,128,128,1],\n \"lightcyan\": [224,255,255,1], \"lightgoldenrodyellow\": [250,250,210,1],\n \"lightgray\": [211,211,211,1], \"lightgreen\": [144,238,144,1],\n \"lightgrey\": [211,211,211,1], \"lightpink\": [255,182,193,1],\n \"lightsalmon\": [255,160,122,1], \"lightseagreen\": [32,178,170,1],\n \"lightskyblue\": [135,206,250,1], \"lightslategray\": [119,136,153,1],\n \"lightslategrey\": [119,136,153,1], \"lightsteelblue\": [176,196,222,1],\n \"lightyellow\": [255,255,224,1], \"lime\": [0,255,0,1],\n \"limegreen\": [50,205,50,1], \"linen\": [250,240,230,1],\n \"magenta\": [255,0,255,1], \"maroon\": [128,0,0,1],\n \"mediumaquamarine\": [102,205,170,1], \"mediumblue\": [0,0,205,1],\n \"mediumorchid\": [186,85,211,1], \"mediumpurple\": [147,112,219,1],\n \"mediumseagreen\": [60,179,113,1], \"mediumslateblue\": [123,104,238,1],\n \"mediumspringgreen\": [0,250,154,1], \"mediumturquoise\": [72,209,204,1],\n \"mediumvioletred\": [199,21,133,1], \"midnightblue\": [25,25,112,1],\n \"mintcream\": [245,255,250,1], \"mistyrose\": [255,228,225,1],\n \"moccasin\": [255,228,181,1], \"navajowhite\": [255,222,173,1],\n \"navy\": [0,0,128,1], \"oldlace\": [253,245,230,1],\n \"olive\": [128,128,0,1], \"olivedrab\": [107,142,35,1],\n \"orange\": [255,165,0,1], \"orangered\": [255,69,0,1],\n \"orchid\": [218,112,214,1], \"palegoldenrod\": [238,232,170,1],\n \"palegreen\": [152,251,152,1], \"paleturquoise\": [175,238,238,1],\n \"palevioletred\": [219,112,147,1], \"papayawhip\": [255,239,213,1],\n \"peachpuff\": [255,218,185,1], \"peru\": [205,133,63,1],\n \"pink\": [255,192,203,1], \"plum\": [221,160,221,1],\n \"powderblue\": [176,224,230,1], \"purple\": [128,0,128,1],\n \"rebeccapurple\": [102,51,153,1],\n \"red\": [255,0,0,1], \"rosybrown\": [188,143,143,1],\n \"royalblue\": [65,105,225,1], \"saddlebrown\": [139,69,19,1],\n \"salmon\": [250,128,114,1], \"sandybrown\": [244,164,96,1],\n \"seagreen\": [46,139,87,1], \"seashell\": [255,245,238,1],\n \"sienna\": [160,82,45,1], \"silver\": [192,192,192,1],\n \"skyblue\": [135,206,235,1], \"slateblue\": [106,90,205,1],\n \"slategray\": [112,128,144,1], \"slategrey\": [112,128,144,1],\n \"snow\": [255,250,250,1], \"springgreen\": [0,255,127,1],\n \"steelblue\": [70,130,180,1], \"tan\": [210,180,140,1],\n \"teal\": [0,128,128,1], \"thistle\": [216,191,216,1],\n \"tomato\": [255,99,71,1], \"turquoise\": [64,224,208,1],\n \"violet\": [238,130,238,1], \"wheat\": [245,222,179,1],\n \"white\": [255,255,255,1], \"whitesmoke\": [245,245,245,1],\n \"yellow\": [255,255,0,1], \"yellowgreen\": [154,205,50,1]}\n\nfunction clamp_css_byte(i) { // Clamp to integer 0 .. 255.\n i = Math.round(i); // Seems to be what Chrome does (vs truncation).\n return i < 0 ? 0 : i > 255 ? 255 : i;\n}\n\nfunction clamp_css_float(f) { // Clamp to float 0.0 .. 1.0.\n return f < 0 ? 0 : f > 1 ? 1 : f;\n}\n\nfunction parse_css_int(str) { // int or percentage.\n if (str[str.length - 1] === '%')\n return clamp_css_byte(parseFloat(str) / 100 * 255);\n return clamp_css_byte(parseInt(str));\n}\n\nfunction parse_css_float(str) { // float or percentage.\n if (str[str.length - 1] === '%')\n return clamp_css_float(parseFloat(str) / 100);\n return clamp_css_float(parseFloat(str));\n}\n\nfunction css_hue_to_rgb(m1, m2, h) {\n if (h < 0) h += 1;\n else if (h > 1) h -= 1;\n\n if (h * 6 < 1) return m1 + (m2 - m1) * h * 6;\n if (h * 2 < 1) return m2;\n if (h * 3 < 2) return m1 + (m2 - m1) * (2/3 - h) * 6;\n return m1;\n}\n\nfunction parseCSSColor(css_str) {\n // Remove all whitespace, not compliant, but should just be more accepting.\n var str = css_str.replace(/ /g, '').toLowerCase();\n\n // Color keywords (and transparent) lookup.\n if (str in kCSSColorTable) return kCSSColorTable[str].slice(); // dup.\n\n // #abc and #abc123 syntax.\n if (str[0] === '#') {\n if (str.length === 4) {\n var iv = parseInt(str.substr(1), 16); // TODO(deanm): Stricter parsing.\n if (!(iv >= 0 && iv <= 0xfff)) return null; // Covers NaN.\n return [((iv & 0xf00) >> 4) | ((iv & 0xf00) >> 8),\n (iv & 0xf0) | ((iv & 0xf0) >> 4),\n (iv & 0xf) | ((iv & 0xf) << 4),\n 1];\n } else if (str.length === 7) {\n var iv = parseInt(str.substr(1), 16); // TODO(deanm): Stricter parsing.\n if (!(iv >= 0 && iv <= 0xffffff)) return null; // Covers NaN.\n return [(iv & 0xff0000) >> 16,\n (iv & 0xff00) >> 8,\n iv & 0xff,\n 1];\n }\n\n return null;\n }\n\n var op = str.indexOf('('), ep = str.indexOf(')');\n if (op !== -1 && ep + 1 === str.length) {\n var fname = str.substr(0, op);\n var params = str.substr(op+1, ep-(op+1)).split(',');\n var alpha = 1; // To allow case fallthrough.\n switch (fname) {\n case 'rgba':\n if (params.length !== 4) return null;\n alpha = parse_css_float(params.pop());\n // Fall through.\n case 'rgb':\n if (params.length !== 3) return null;\n return [parse_css_int(params[0]),\n parse_css_int(params[1]),\n parse_css_int(params[2]),\n alpha];\n case 'hsla':\n if (params.length !== 4) return null;\n alpha = parse_css_float(params.pop());\n // Fall through.\n case 'hsl':\n if (params.length !== 3) return null;\n var h = (((parseFloat(params[0]) % 360) + 360) % 360) / 360; // 0 .. 1\n // NOTE(deanm): According to the CSS spec s/l should only be\n // percentages, but we don't bother and let float or percentage.\n var s = parse_css_float(params[1]);\n var l = parse_css_float(params[2]);\n var m2 = l <= 0.5 ? l * (s + 1) : l + s - l * s;\n var m1 = l * 2 - m2;\n return [clamp_css_byte(css_hue_to_rgb(m1, m2, h+1/3) * 255),\n clamp_css_byte(css_hue_to_rgb(m1, m2, h) * 255),\n clamp_css_byte(css_hue_to_rgb(m1, m2, h-1/3) * 255),\n alpha];\n default:\n return null;\n }\n }\n\n return null;\n}\n\ntry { exports.parseCSSColor = parseCSSColor } catch(e) { }\n","// @flow\n\nimport {parseCSSColor} from 'csscolorparser';\n\n/**\n * An RGBA color value. Create instances from color strings using the static\n * method `Color.parse`. The constructor accepts RGB channel values in the range\n * `[0, 1]`, premultiplied by A.\n *\n * @param {number} r The red channel.\n * @param {number} g The green channel.\n * @param {number} b The blue channel.\n * @param {number} a The alpha channel.\n * @private\n */\nclass Color {\n r: number;\n g: number;\n b: number;\n a: number;\n\n constructor(r: number, g: number, b: number, a: number = 1) {\n this.r = r;\n this.g = g;\n this.b = b;\n this.a = a;\n }\n\n static black: Color;\n static white: Color;\n static transparent: Color;\n static red: Color;\n static blue: Color;\n\n /**\n * Parses valid CSS color strings and returns a `Color` instance.\n * @returns A `Color` instance, or `undefined` if the input is not a valid color string.\n */\n static parse(input?: string | Color | null): Color | void {\n if (!input) {\n return undefined;\n }\n\n if (input instanceof Color) {\n return input;\n }\n\n if (typeof input !== 'string') {\n return undefined;\n }\n\n const rgba = parseCSSColor(input);\n if (!rgba) {\n return undefined;\n }\n\n return new Color(\n rgba[0] / 255 * rgba[3],\n rgba[1] / 255 * rgba[3],\n rgba[2] / 255 * rgba[3],\n rgba[3]\n );\n }\n\n /**\n * Returns an RGBA string representing the color value.\n *\n * @returns An RGBA string.\n * @example\n * var purple = new Color.parse('purple');\n * purple.toString; // = \"rgba(128,0,128,1)\"\n * var translucentGreen = new Color.parse('rgba(26, 207, 26, .73)');\n * translucentGreen.toString(); // = \"rgba(26,207,26,0.73)\"\n */\n toString(): string {\n const [r, g, b, a] = this.toArray();\n return `rgba(${Math.round(r)},${Math.round(g)},${Math.round(b)},${a})`;\n }\n\n toArray(): [number, number, number, number] {\n const {r, g, b, a} = this;\n return a === 0 ? [0, 0, 0, 0] : [\n r * 255 / a,\n g * 255 / a,\n b * 255 / a,\n a\n ];\n }\n}\n\nColor.black = new Color(0, 0, 0, 1);\nColor.white = new Color(1, 1, 1, 1);\nColor.transparent = new Color(0, 0, 0, 0);\nColor.red = new Color(1, 0, 0, 1);\nColor.blue = new Color(0, 0, 1, 1);\n\nexport default Color;\n","// @flow\n\n// Flow type declarations for Intl cribbed from\n// https://github.com/facebook/flow/issues/1270\n\ndeclare var Intl: {\n Collator: Class\n};\n\ndeclare class Intl$Collator {\n constructor (\n locales?: string | string[],\n options?: CollatorOptions\n ): Intl$Collator;\n\n static (\n locales?: string | string[],\n options?: CollatorOptions\n ): Intl$Collator;\n\n compare (a: string, b: string): number;\n\n resolvedOptions(): any;\n}\n\ntype CollatorOptions = {\n localeMatcher?: 'lookup' | 'best fit',\n usage?: 'sort' | 'search',\n sensitivity?: 'base' | 'accent' | 'case' | 'variant',\n ignorePunctuation?: boolean,\n numeric?: boolean,\n caseFirst?: 'upper' | 'lower' | 'false'\n}\n\nexport default class Collator {\n locale: string | null;\n sensitivity: 'base' | 'accent' | 'case' | 'variant';\n collator: Intl$Collator;\n\n constructor(caseSensitive: boolean, diacriticSensitive: boolean, locale: string | null) {\n if (caseSensitive)\n this.sensitivity = diacriticSensitive ? 'variant' : 'case';\n else\n this.sensitivity = diacriticSensitive ? 'accent' : 'base';\n\n this.locale = locale;\n this.collator = new Intl.Collator(this.locale ? this.locale : [],\n {sensitivity: this.sensitivity, usage: 'search'});\n }\n\n compare(lhs: string, rhs: string): number {\n return this.collator.compare(lhs, rhs);\n }\n\n resolvedLocale(): string {\n // We create a Collator without \"usage: search\" because we don't want\n // the search options encoded in our result (e.g. \"en-u-co-search\")\n return new Intl.Collator(this.locale ? this.locale : [])\n .resolvedOptions().locale;\n }\n}\n","// @flow\nimport type Color from '../../util/color.js';\nimport type ResolvedImage from '../types/resolved_image.js';\n\nexport class FormattedSection {\n text: string;\n image: ResolvedImage | null;\n scale: number | null;\n fontStack: string | null;\n textColor: Color | null;\n\n constructor(text: string, image: ResolvedImage | null, scale: number | null, fontStack: string | null, textColor: Color | null) {\n this.text = text;\n this.image = image;\n this.scale = scale;\n this.fontStack = fontStack;\n this.textColor = textColor;\n }\n}\n\nexport default class Formatted {\n sections: Array;\n\n constructor(sections: Array) {\n this.sections = sections;\n }\n\n static fromString(unformatted: string): Formatted {\n return new Formatted([new FormattedSection(unformatted, null, null, null, null)]);\n }\n\n isEmpty(): boolean {\n if (this.sections.length === 0) return true;\n return !this.sections.some(section => section.text.length !== 0 ||\n (section.image && section.image.name.length !== 0));\n }\n\n static factory(text: Formatted | string): Formatted {\n if (text instanceof Formatted) {\n return text;\n } else {\n return Formatted.fromString(text);\n }\n }\n\n toString(): string {\n if (this.sections.length === 0) return '';\n return this.sections.map(section => section.text).join('');\n }\n\n serialize(): Array {\n const serialized: Array = [\"format\"];\n for (const section of this.sections) {\n if (section.image) {\n serialized.push([\"image\", section.image.name]);\n continue;\n }\n serialized.push(section.text);\n const options: { [key: string]: mixed } = {};\n if (section.fontStack) {\n options[\"text-font\"] = [\"literal\", section.fontStack.split(',')];\n }\n if (section.scale) {\n options[\"font-scale\"] = section.scale;\n }\n if (section.textColor) {\n options[\"text-color\"] = ([\"rgba\"]: Array).concat(section.textColor.toArray());\n }\n serialized.push(options);\n }\n return serialized;\n }\n}\n","// @flow\n\nexport type ResolvedImageOptions = {\n name: string,\n available: boolean\n};\n\nexport default class ResolvedImage {\n name: string;\n available: boolean;\n\n constructor(options: ResolvedImageOptions) {\n this.name = options.name;\n this.available = options.available;\n }\n\n toString(): string {\n return this.name;\n }\n\n static fromString(name: string): ResolvedImage | null {\n if (!name) return null; // treat empty values as no image\n return new ResolvedImage({name, available: false});\n }\n\n serialize(): Array {\n return [\"image\", this.name];\n }\n}\n","// @flow\n\nimport assert from 'assert';\n\nimport Color from '../util/color.js';\nimport Collator from './types/collator.js';\nimport Formatted from './types/formatted.js';\nimport ResolvedImage from './types/resolved_image.js';\nimport {NullType, NumberType, StringType, BooleanType, ColorType, ObjectType, ValueType, CollatorType, FormattedType, ResolvedImageType, array} from './types.js';\n\nimport type {Type} from './types.js';\n\nexport function validateRGBA(r: mixed, g: mixed, b: mixed, a?: mixed): string | null {\n if (!(\n typeof r === 'number' && r >= 0 && r <= 255 &&\n typeof g === 'number' && g >= 0 && g <= 255 &&\n typeof b === 'number' && b >= 0 && b <= 255\n )) {\n const value = typeof a === 'number' ? [r, g, b, a] : [r, g, b];\n return `Invalid rgba value [${value.join(', ')}]: 'r', 'g', and 'b' must be between 0 and 255.`;\n }\n\n if (!(\n typeof a === 'undefined' || (typeof a === 'number' && a >= 0 && a <= 1)\n )) {\n return `Invalid rgba value [${[r, g, b, a].join(', ')}]: 'a' must be between 0 and 1.`;\n }\n\n return null;\n}\n\nexport type Value = null | string | boolean | number | Color | Collator | Formatted | ResolvedImage | $ReadOnlyArray | { +[string]: Value }\n\nexport function isValue(mixed: mixed): boolean {\n if (mixed === null) {\n return true;\n } else if (typeof mixed === 'string') {\n return true;\n } else if (typeof mixed === 'boolean') {\n return true;\n } else if (typeof mixed === 'number') {\n return true;\n } else if (mixed instanceof Color) {\n return true;\n } else if (mixed instanceof Collator) {\n return true;\n } else if (mixed instanceof Formatted) {\n return true;\n } else if (mixed instanceof ResolvedImage) {\n return true;\n } else if (Array.isArray(mixed)) {\n for (const item of mixed) {\n if (!isValue(item)) {\n return false;\n }\n }\n return true;\n } else if (typeof mixed === 'object') {\n for (const key in mixed) {\n if (!isValue(mixed[key])) {\n return false;\n }\n }\n return true;\n } else {\n return false;\n }\n}\n\nexport function typeOf(value: Value): Type {\n if (value === null) {\n return NullType;\n } else if (typeof value === 'string') {\n return StringType;\n } else if (typeof value === 'boolean') {\n return BooleanType;\n } else if (typeof value === 'number') {\n return NumberType;\n } else if (value instanceof Color) {\n return ColorType;\n } else if (value instanceof Collator) {\n return CollatorType;\n } else if (value instanceof Formatted) {\n return FormattedType;\n } else if (value instanceof ResolvedImage) {\n return ResolvedImageType;\n } else if (Array.isArray(value)) {\n const length = value.length;\n let itemType: Type | typeof undefined;\n\n for (const item of value) {\n const t = typeOf(item);\n if (!itemType) {\n itemType = t;\n } else if (itemType === t) {\n continue;\n } else {\n itemType = ValueType;\n break;\n }\n }\n\n return array(itemType || ValueType, length);\n } else {\n assert(typeof value === 'object');\n return ObjectType;\n }\n}\n\nexport function toString(value: Value) {\n const type = typeof value;\n if (value === null) {\n return '';\n } else if (type === 'string' || type === 'number' || type === 'boolean') {\n return String(value);\n } else if (value instanceof Color || value instanceof Formatted || value instanceof ResolvedImage) {\n return value.toString();\n } else {\n return JSON.stringify(value);\n }\n}\n\nexport {Color, Collator};\n","// @flow\n\nimport assert from 'assert';\nimport {isValue, typeOf, Color} from '../values.js';\nimport Formatted from '../types/formatted.js';\n\nimport type {Type} from '../types.js';\nimport type {Value} from '../values.js';\nimport type {Expression} from '../expression.js';\nimport type ParsingContext from '../parsing_context.js';\n\nclass Literal implements Expression {\n type: Type;\n value: Value;\n\n constructor(type: Type, value: Value) {\n this.type = type;\n this.value = value;\n }\n\n static parse(args: $ReadOnlyArray, context: ParsingContext) {\n if (args.length !== 2)\n return context.error(`'literal' expression requires exactly one argument, but found ${args.length - 1} instead.`);\n\n if (!isValue(args[1]))\n return context.error(`invalid value`);\n\n const value = (args[1]: any);\n let type = typeOf(value);\n\n // special case: infer the item type if possible for zero-length arrays\n const expected = context.expectedType;\n if (\n type.kind === 'array' &&\n type.N === 0 &&\n expected &&\n expected.kind === 'array' &&\n (typeof expected.N !== 'number' || expected.N === 0)\n ) {\n type = expected;\n }\n\n return new Literal(type, value);\n }\n\n evaluate() {\n return this.value;\n }\n\n eachChild() {}\n\n outputDefined() {\n return true;\n }\n\n serialize(): Array {\n if (this.type.kind === 'array' || this.type.kind === 'object') {\n return [\"literal\", this.value];\n } else if (this.value instanceof Color) {\n // Constant-folding can generate Literal expressions that you\n // couldn't actually generate with a \"literal\" expression,\n // so we have to implement an equivalent serialization here\n return [\"rgba\"].concat(this.value.toArray());\n } else if (this.value instanceof Formatted) {\n // Same as Color\n return this.value.serialize();\n } else {\n assert(this.value === null ||\n typeof this.value === 'string' ||\n typeof this.value === 'number' ||\n typeof this.value === 'boolean');\n return (this.value: any);\n }\n }\n}\n\nexport default Literal;\n","// @flow\n\nclass RuntimeError {\n name: string;\n message: string;\n\n constructor(message: string) {\n this.name = 'ExpressionEvaluationError';\n this.message = message;\n }\n\n toJSON() {\n return this.message;\n }\n}\n\nexport default RuntimeError;\n","// @flow\n\nimport assert from 'assert';\n\nimport {\n ObjectType,\n ValueType,\n StringType,\n NumberType,\n BooleanType,\n checkSubtype,\n toString,\n array\n} from '../types.js';\nimport RuntimeError from '../runtime_error.js';\nimport {typeOf} from '../values.js';\n\nimport type {Expression} from '../expression.js';\nimport type ParsingContext from '../parsing_context.js';\nimport type EvaluationContext from '../evaluation_context.js';\nimport type {Type} from '../types.js';\n\nconst types = {\n string: StringType,\n number: NumberType,\n boolean: BooleanType,\n object: ObjectType\n};\n\nclass Assertion implements Expression {\n type: Type;\n args: Array;\n\n constructor(type: Type, args: Array) {\n this.type = type;\n this.args = args;\n }\n\n static parse(args: $ReadOnlyArray, context: ParsingContext): ?Expression {\n if (args.length < 2)\n return context.error(`Expected at least one argument.`);\n\n let i = 1;\n let type;\n\n const name: string = (args[0]: any);\n if (name === 'array') {\n let itemType;\n if (args.length > 2) {\n const type = args[1];\n if (typeof type !== 'string' || !(type in types) || type === 'object')\n return context.error('The item type argument of \"array\" must be one of string, number, boolean', 1);\n itemType = types[type];\n i++;\n } else {\n itemType = ValueType;\n }\n\n let N;\n if (args.length > 3) {\n if (args[2] !== null &&\n (typeof args[2] !== 'number' ||\n args[2] < 0 ||\n args[2] !== Math.floor(args[2]))\n ) {\n return context.error('The length argument to \"array\" must be a positive integer literal', 2);\n }\n N = args[2];\n i++;\n }\n\n type = array(itemType, N);\n } else {\n assert(types[name], name);\n type = types[name];\n }\n\n const parsed = [];\n for (; i < args.length; i++) {\n const input = context.parse(args[i], i, ValueType);\n if (!input) return null;\n parsed.push(input);\n }\n\n return new Assertion(type, parsed);\n }\n\n evaluate(ctx: EvaluationContext) {\n for (let i = 0; i < this.args.length; i++) {\n const value = this.args[i].evaluate(ctx);\n const error = checkSubtype(this.type, typeOf(value));\n if (!error) {\n return value;\n } else if (i === this.args.length - 1) {\n throw new RuntimeError(`Expected value to be of type ${toString(this.type)}, but found ${toString(typeOf(value))} instead.`);\n }\n }\n\n assert(false);\n return null;\n }\n\n eachChild(fn: (_: Expression) => void) {\n this.args.forEach(fn);\n }\n\n outputDefined(): boolean {\n return this.args.every(arg => arg.outputDefined());\n }\n\n serialize(): Array {\n const type = this.type;\n const serialized = [type.kind];\n if (type.kind === 'array') {\n const itemType = type.itemType;\n if (itemType.kind === 'string' ||\n itemType.kind === 'number' ||\n itemType.kind === 'boolean') {\n serialized.push(itemType.kind);\n const N = type.N;\n if (typeof N === 'number' || this.args.length > 1) {\n serialized.push(N);\n }\n }\n }\n return serialized.concat(this.args.map(arg => arg.serialize()));\n }\n}\n\nexport default Assertion;\n","// @flow\n\nimport {NumberType, ValueType, FormattedType, array, StringType, ColorType, ResolvedImageType} from '../types.js';\nimport Formatted, {FormattedSection} from '../types/formatted.js';\nimport {toString, typeOf} from '../values.js';\n\nimport type {Expression} from '../expression.js';\nimport type EvaluationContext from '../evaluation_context.js';\nimport type ParsingContext from '../parsing_context.js';\nimport type {Type} from '../types.js';\n\ntype FormattedSectionExpression = {\n // Content of a section may be Image expression or other\n // type of expression that is coercable to 'string'.\n content: Expression,\n scale: Expression | null;\n font: Expression | null;\n textColor: Expression | null;\n}\n\nexport default class FormatExpression implements Expression {\n type: Type;\n sections: Array;\n\n constructor(sections: Array) {\n this.type = FormattedType;\n this.sections = sections;\n }\n\n static parse(args: $ReadOnlyArray, context: ParsingContext): ?Expression {\n if (args.length < 2) {\n return context.error(`Expected at least one argument.`);\n }\n\n const firstArg = args[1];\n if (!Array.isArray(firstArg) && typeof firstArg === 'object') {\n return context.error(`First argument must be an image or text section.`);\n }\n\n const sections: Array = [];\n let nextTokenMayBeObject = false;\n for (let i = 1; i <= args.length - 1; ++i) {\n const arg = (args[i]: any);\n\n if (nextTokenMayBeObject && typeof arg === \"object\" && !Array.isArray(arg)) {\n nextTokenMayBeObject = false;\n\n let scale = null;\n if (arg['font-scale']) {\n scale = context.parse(arg['font-scale'], 1, NumberType);\n if (!scale) return null;\n }\n\n let font = null;\n if (arg['text-font']) {\n font = context.parse(arg['text-font'], 1, array(StringType));\n if (!font) return null;\n }\n\n let textColor = null;\n if (arg['text-color']) {\n textColor = context.parse(arg['text-color'], 1, ColorType);\n if (!textColor) return null;\n }\n\n const lastExpression = sections[sections.length - 1];\n lastExpression.scale = scale;\n lastExpression.font = font;\n lastExpression.textColor = textColor;\n } else {\n const content = context.parse(args[i], 1, ValueType);\n if (!content) return null;\n\n const kind = content.type.kind;\n if (kind !== 'string' && kind !== 'value' && kind !== 'null' && kind !== 'resolvedImage')\n return context.error(`Formatted text type must be 'string', 'value', 'image' or 'null'.`);\n\n nextTokenMayBeObject = true;\n sections.push({content, scale: null, font: null, textColor: null});\n }\n }\n\n return new FormatExpression(sections);\n }\n\n evaluate(ctx: EvaluationContext) {\n const evaluateSection = section => {\n const evaluatedContent = section.content.evaluate(ctx);\n if (typeOf(evaluatedContent) === ResolvedImageType) {\n return new FormattedSection('', evaluatedContent, null, null, null);\n }\n\n return new FormattedSection(\n toString(evaluatedContent),\n null,\n section.scale ? section.scale.evaluate(ctx) : null,\n section.font ? section.font.evaluate(ctx).join(',') : null,\n section.textColor ? section.textColor.evaluate(ctx) : null\n );\n };\n\n return new Formatted(this.sections.map(evaluateSection));\n }\n\n eachChild(fn: (_: Expression) => void) {\n for (const section of this.sections) {\n fn(section.content);\n if (section.scale) {\n fn(section.scale);\n }\n if (section.font) {\n fn(section.font);\n }\n if (section.textColor) {\n fn(section.textColor);\n }\n }\n }\n\n outputDefined() {\n // Technically the combinatoric set of all children\n // Usually, this.text will be undefined anyway\n return false;\n }\n\n serialize() {\n const serialized = [\"format\"];\n for (const section of this.sections) {\n serialized.push(section.content.serialize());\n const options = {};\n if (section.scale) {\n options['font-scale'] = section.scale.serialize();\n }\n if (section.font) {\n options['text-font'] = section.font.serialize();\n }\n if (section.textColor) {\n options['text-color'] = section.textColor.serialize();\n }\n serialized.push(options);\n }\n return serialized;\n }\n}\n","// @flow\n\nimport {ResolvedImageType, StringType} from '../types.js';\nimport ResolvedImage from '../types/resolved_image.js';\n\nimport type {Expression} from '../expression.js';\nimport type EvaluationContext from '../evaluation_context.js';\nimport type ParsingContext from '../parsing_context.js';\nimport type {Type} from '../types.js';\n\nexport default class ImageExpression implements Expression {\n type: Type;\n input: Expression;\n\n constructor(input: Expression) {\n this.type = ResolvedImageType;\n this.input = input;\n }\n\n static parse(args: $ReadOnlyArray, context: ParsingContext): ?Expression {\n if (args.length !== 2) {\n return context.error(`Expected two arguments.`);\n }\n\n const name = context.parse(args[1], 1, StringType);\n if (!name) return context.error(`No image name provided.`);\n\n return new ImageExpression(name);\n }\n\n evaluate(ctx: EvaluationContext) {\n const evaluatedImageName = this.input.evaluate(ctx);\n\n const value = ResolvedImage.fromString(evaluatedImageName);\n if (value && ctx.availableImages) value.available = ctx.availableImages.indexOf(evaluatedImageName) > -1;\n\n return value;\n }\n\n eachChild(fn: (_: Expression) => void) {\n fn(this.input);\n }\n\n outputDefined() {\n // The output of image is determined by the list of available images in the evaluation context\n return false;\n }\n\n serialize() {\n return [\"image\", this.input.serialize()];\n }\n}\n","// @flow\n\nimport assert from 'assert';\n\nimport {BooleanType, ColorType, NumberType, StringType, ValueType} from '../types.js';\nimport {Color, toString as valueToString, validateRGBA} from '../values.js';\nimport RuntimeError from '../runtime_error.js';\nimport Formatted from '../types/formatted.js';\nimport FormatExpression from '../definitions/format.js';\nimport ImageExpression from '../definitions/image.js';\nimport ResolvedImage from '../types/resolved_image.js';\n\nimport type {Expression} from '../expression.js';\nimport type ParsingContext from '../parsing_context.js';\nimport type EvaluationContext from '../evaluation_context.js';\nimport type {Type} from '../types.js';\n\nconst types = {\n 'to-boolean': BooleanType,\n 'to-color': ColorType,\n 'to-number': NumberType,\n 'to-string': StringType\n};\n\n/**\n * Special form for error-coalescing coercion expressions \"to-number\",\n * \"to-color\". Since these coercions can fail at runtime, they accept multiple\n * arguments, only evaluating one at a time until one succeeds.\n *\n * @private\n */\nclass Coercion implements Expression {\n type: Type;\n args: Array;\n\n constructor(type: Type, args: Array) {\n this.type = type;\n this.args = args;\n }\n\n static parse(args: $ReadOnlyArray, context: ParsingContext): ?Expression {\n if (args.length < 2)\n return context.error(`Expected at least one argument.`);\n\n const name: string = (args[0]: any);\n assert(types[name], name);\n\n if ((name === 'to-boolean' || name === 'to-string') && args.length !== 2)\n return context.error(`Expected one argument.`);\n\n const type = types[name];\n\n const parsed = [];\n for (let i = 1; i < args.length; i++) {\n const input = context.parse(args[i], i, ValueType);\n if (!input) return null;\n parsed.push(input);\n }\n\n return new Coercion(type, parsed);\n }\n\n evaluate(ctx: EvaluationContext) {\n if (this.type.kind === 'boolean') {\n return Boolean(this.args[0].evaluate(ctx));\n } else if (this.type.kind === 'color') {\n let input;\n let error;\n for (const arg of this.args) {\n input = arg.evaluate(ctx);\n error = null;\n if (input instanceof Color) {\n return input;\n } else if (typeof input === 'string') {\n const c = ctx.parseColor(input);\n if (c) return c;\n } else if (Array.isArray(input)) {\n if (input.length < 3 || input.length > 4) {\n error = `Invalid rbga value ${JSON.stringify(input)}: expected an array containing either three or four numeric values.`;\n } else {\n error = validateRGBA(input[0], input[1], input[2], input[3]);\n }\n if (!error) {\n return new Color((input[0]: any) / 255, (input[1]: any) / 255, (input[2]: any) / 255, (input[3]: any));\n }\n }\n }\n throw new RuntimeError(error || `Could not parse color from value '${typeof input === 'string' ? input : String(JSON.stringify(input))}'`);\n } else if (this.type.kind === 'number') {\n let value = null;\n for (const arg of this.args) {\n value = arg.evaluate(ctx);\n if (value === null) return 0;\n const num = Number(value);\n if (isNaN(num)) continue;\n return num;\n }\n throw new RuntimeError(`Could not convert ${JSON.stringify(value)} to number.`);\n } else if (this.type.kind === 'formatted') {\n // There is no explicit 'to-formatted' but this coercion can be implicitly\n // created by properties that expect the 'formatted' type.\n return Formatted.fromString(valueToString(this.args[0].evaluate(ctx)));\n } else if (this.type.kind === 'resolvedImage') {\n return ResolvedImage.fromString(valueToString(this.args[0].evaluate(ctx)));\n } else {\n return valueToString(this.args[0].evaluate(ctx));\n }\n }\n\n eachChild(fn: (_: Expression) => void) {\n this.args.forEach(fn);\n }\n\n outputDefined(): boolean {\n return this.args.every(arg => arg.outputDefined());\n }\n\n serialize() {\n if (this.type.kind === 'formatted') {\n return new FormatExpression([{content: this.args[0], scale: null, font: null, textColor: null}]).serialize();\n }\n\n if (this.type.kind === 'resolvedImage') {\n return new ImageExpression(this.args[0]).serialize();\n }\n\n const serialized = [`to-${this.type.kind}`];\n this.eachChild(child => { serialized.push(child.serialize()); });\n return serialized;\n }\n}\n\nexport default Coercion;\n","// @flow\n\nimport {Color} from './values.js';\nimport type {FormattedSection} from './types/formatted.js';\nimport type {GlobalProperties, Feature, FeatureState} from './index.js';\nimport type {CanonicalTileID} from '../../source/tile_id.js';\n\nconst geometryTypes = ['Unknown', 'Point', 'LineString', 'Polygon'];\n\nclass EvaluationContext {\n globals: GlobalProperties;\n feature: ?Feature;\n featureState: ?FeatureState;\n formattedSection: ?FormattedSection;\n availableImages: ?Array;\n canonical: ?CanonicalTileID;\n\n _parseColorCache: {[_: string]: ?Color};\n\n constructor() {\n this.globals = (null: any);\n this.feature = null;\n this.featureState = null;\n this.formattedSection = null;\n this._parseColorCache = {};\n this.availableImages = null;\n this.canonical = null;\n }\n\n id() {\n return this.feature && 'id' in this.feature ? this.feature.id : null;\n }\n\n geometryType() {\n return this.feature ? typeof this.feature.type === 'number' ? geometryTypes[this.feature.type] : this.feature.type : null;\n }\n\n geometry() {\n return this.feature && 'geometry' in this.feature ? this.feature.geometry : null;\n }\n\n canonicalID() {\n return this.canonical;\n }\n\n properties() {\n return this.feature && this.feature.properties || {};\n }\n\n parseColor(input: string): ?Color {\n let cached = this._parseColorCache[input];\n if (!cached) {\n cached = this._parseColorCache[input] = Color.parse(input);\n }\n return cached;\n }\n}\n\nexport default EvaluationContext;\n","// @flow\n\nimport {toString} from './types.js';\n\nimport ParsingContext from './parsing_context.js';\nimport EvaluationContext from './evaluation_context.js';\nimport assert from 'assert';\n\nimport type {Expression, ExpressionRegistry} from './expression.js';\nimport type {Type} from './types.js';\nimport type {Value} from './values.js';\n\nexport type Varargs = {| type: Type |};\ntype Signature = Array | Varargs;\ntype Evaluate = (EvaluationContext, Array) => Value;\ntype Definition = [Type, Signature, Evaluate] |\n {|type: Type, overloads: Array<[Signature, Evaluate]>|};\n\nclass CompoundExpression implements Expression {\n name: string;\n type: Type;\n _evaluate: Evaluate;\n args: Array;\n\n static definitions: {[_: string]: Definition };\n\n constructor(name: string, type: Type, evaluate: Evaluate, args: Array) {\n this.name = name;\n this.type = type;\n this._evaluate = evaluate;\n this.args = args;\n }\n\n evaluate(ctx: EvaluationContext) {\n return this._evaluate(ctx, this.args);\n }\n\n eachChild(fn: (_: Expression) => void) {\n this.args.forEach(fn);\n }\n\n outputDefined() {\n return false;\n }\n\n serialize(): Array {\n return [this.name].concat(this.args.map(arg => arg.serialize()));\n }\n\n static parse(args: $ReadOnlyArray, context: ParsingContext): ?Expression {\n const op: string = (args[0]: any);\n const definition = CompoundExpression.definitions[op];\n if (!definition) {\n return context.error(`Unknown expression \"${op}\". If you wanted a literal array, use [\"literal\", [...]].`, 0);\n }\n\n // Now check argument types against each signature\n const type = Array.isArray(definition) ?\n definition[0] : definition.type;\n\n const availableOverloads = Array.isArray(definition) ?\n [[definition[1], definition[2]]] :\n definition.overloads;\n\n const overloads = availableOverloads.filter(([signature]) => (\n !Array.isArray(signature) || // varags\n signature.length === args.length - 1 // correct param count\n ));\n\n let signatureContext: ParsingContext = (null: any);\n\n for (const [params, evaluate] of overloads) {\n // Use a fresh context for each attempted signature so that, if\n // we eventually succeed, we haven't polluted `context.errors`.\n signatureContext = new ParsingContext(context.registry, context.path, null, context.scope);\n\n // First parse all the args, potentially coercing to the\n // types expected by this overload.\n const parsedArgs: Array = [];\n let argParseFailed = false;\n for (let i = 1; i < args.length; i++) {\n const arg = args[i];\n const expectedType = Array.isArray(params) ?\n params[i - 1] :\n params.type;\n\n const parsed = signatureContext.parse(arg, 1 + parsedArgs.length, expectedType);\n if (!parsed) {\n argParseFailed = true;\n break;\n }\n parsedArgs.push(parsed);\n }\n if (argParseFailed) {\n // Couldn't coerce args of this overload to expected type, move\n // on to next one.\n continue;\n }\n\n if (Array.isArray(params)) {\n if (params.length !== parsedArgs.length) {\n signatureContext.error(`Expected ${params.length} arguments, but found ${parsedArgs.length} instead.`);\n continue;\n }\n }\n\n for (let i = 0; i < parsedArgs.length; i++) {\n const expected = Array.isArray(params) ? params[i] : params.type;\n const arg = parsedArgs[i];\n signatureContext.concat(i + 1).checkSubtype(expected, arg.type);\n }\n\n if (signatureContext.errors.length === 0) {\n return new CompoundExpression(op, type, evaluate, parsedArgs);\n }\n }\n\n assert(!signatureContext || signatureContext.errors.length > 0);\n\n if (overloads.length === 1) {\n context.errors.push(...signatureContext.errors);\n } else {\n const expected = overloads.length ? overloads : availableOverloads;\n const signatures = expected\n .map(([params]) => stringifySignature(params))\n .join(' | ');\n\n const actualTypes = [];\n // For error message, re-parse arguments without trying to\n // apply any coercions\n for (let i = 1; i < args.length; i++) {\n const parsed = context.parse(args[i], 1 + actualTypes.length);\n if (!parsed) return null;\n actualTypes.push(toString(parsed.type));\n }\n context.error(`Expected arguments of type ${signatures}, but found (${actualTypes.join(', ')}) instead.`);\n }\n\n return null;\n }\n\n static register(\n registry: ExpressionRegistry,\n definitions: {[_: string]: Definition }\n ) {\n assert(!CompoundExpression.definitions);\n CompoundExpression.definitions = definitions;\n for (const name in definitions) {\n registry[name] = CompoundExpression;\n }\n }\n}\n\nfunction stringifySignature(signature: Signature): string {\n if (Array.isArray(signature)) {\n return `(${signature.map(toString).join(', ')})`;\n } else {\n return `(${toString(signature.type)}...)`;\n }\n}\n\nexport default CompoundExpression;\n","// @flow\n\nimport {StringType, BooleanType, CollatorType} from '../types.js';\nimport Collator from '../types/collator.js';\n\nimport type {Expression} from '../expression.js';\nimport type EvaluationContext from '../evaluation_context.js';\nimport type ParsingContext from '../parsing_context.js';\nimport type {Type} from '../types.js';\n\nexport default class CollatorExpression implements Expression {\n type: Type;\n caseSensitive: Expression;\n diacriticSensitive: Expression;\n locale: Expression | null;\n\n constructor(caseSensitive: Expression, diacriticSensitive: Expression, locale: Expression | null) {\n this.type = CollatorType;\n this.locale = locale;\n this.caseSensitive = caseSensitive;\n this.diacriticSensitive = diacriticSensitive;\n }\n\n static parse(args: $ReadOnlyArray, context: ParsingContext): ?Expression {\n if (args.length !== 2)\n return context.error(`Expected one argument.`);\n\n const options = (args[1]: any);\n if (typeof options !== \"object\" || Array.isArray(options))\n return context.error(`Collator options argument must be an object.`);\n\n const caseSensitive = context.parse(\n options['case-sensitive'] === undefined ? false : options['case-sensitive'], 1, BooleanType);\n if (!caseSensitive) return null;\n\n const diacriticSensitive = context.parse(\n options['diacritic-sensitive'] === undefined ? false : options['diacritic-sensitive'], 1, BooleanType);\n if (!diacriticSensitive) return null;\n\n let locale = null;\n if (options['locale']) {\n locale = context.parse(options['locale'], 1, StringType);\n if (!locale) return null;\n }\n\n return new CollatorExpression(caseSensitive, diacriticSensitive, locale);\n }\n\n evaluate(ctx: EvaluationContext) {\n return new Collator(this.caseSensitive.evaluate(ctx), this.diacriticSensitive.evaluate(ctx), this.locale ? this.locale.evaluate(ctx) : null);\n }\n\n eachChild(fn: (_: Expression) => void) {\n fn(this.caseSensitive);\n fn(this.diacriticSensitive);\n if (this.locale) {\n fn(this.locale);\n }\n }\n\n outputDefined() {\n // Technically the set of possible outputs is the combinatoric set of Collators produced\n // by all possible outputs of locale/caseSensitive/diacriticSensitive\n // But for the primary use of Collators in comparison operators, we ignore the Collator's\n // possible outputs anyway, so we can get away with leaving this false for now.\n return false;\n }\n\n serialize() {\n const options = {};\n options['case-sensitive'] = this.caseSensitive.serialize();\n options['diacritic-sensitive'] = this.diacriticSensitive.serialize();\n if (this.locale) {\n options['locale'] = this.locale.serialize();\n }\n return [\"collator\", options];\n }\n}\n","// @flow\n\nimport {isValue} from '../values.js';\nimport type {Type} from '../types.js';\nimport {BooleanType} from '../types.js';\nimport type {Expression} from '../expression.js';\nimport type ParsingContext from '../parsing_context.js';\nimport type EvaluationContext from '../evaluation_context.js';\nimport type {GeoJSON, GeoJSONPolygon, GeoJSONMultiPolygon} from '@mapbox/geojson-types';\nimport Point from '@mapbox/point-geometry';\nimport type {CanonicalTileID} from '../../../source/tile_id.js';\n\ntype GeoJSONPolygons =| GeoJSONPolygon | GeoJSONMultiPolygon;\n\n// minX, minY, maxX, maxY\ntype BBox = [number, number, number, number];\nconst EXTENT = 8192;\n\nfunction updateBBox(bbox: BBox, coord: Point) {\n bbox[0] = Math.min(bbox[0], coord[0]);\n bbox[1] = Math.min(bbox[1], coord[1]);\n bbox[2] = Math.max(bbox[2], coord[0]);\n bbox[3] = Math.max(bbox[3], coord[1]);\n}\n\nfunction mercatorXfromLng(lng: number) {\n return (180 + lng) / 360;\n}\n\nfunction mercatorYfromLat(lat: number) {\n return (180 - (180 / Math.PI * Math.log(Math.tan(Math.PI / 4 + lat * Math.PI / 360)))) / 360;\n}\n\nfunction boxWithinBox(bbox1: BBox, bbox2: BBox) {\n if (bbox1[0] <= bbox2[0]) return false;\n if (bbox1[2] >= bbox2[2]) return false;\n if (bbox1[1] <= bbox2[1]) return false;\n if (bbox1[3] >= bbox2[3]) return false;\n return true;\n}\n\nfunction getTileCoordinates(p, canonical: CanonicalTileID) {\n const x = mercatorXfromLng(p[0]);\n const y = mercatorYfromLat(p[1]);\n const tilesAtZoom = Math.pow(2, canonical.z);\n return [Math.round(x * tilesAtZoom * EXTENT), Math.round(y * tilesAtZoom * EXTENT)];\n}\n\nfunction onBoundary(p, p1, p2) {\n const x1 = p[0] - p1[0];\n const y1 = p[1] - p1[1];\n const x2 = p[0] - p2[0];\n const y2 = p[1] - p2[1];\n return (x1 * y2 - x2 * y1 === 0) && (x1 * x2 <= 0) && (y1 * y2 <= 0);\n}\n\nfunction rayIntersect(p, p1, p2) {\n return ((p1[1] > p[1]) !== (p2[1] > p[1])) && (p[0] < (p2[0] - p1[0]) * (p[1] - p1[1]) / (p2[1] - p1[1]) + p1[0]);\n}\n\n// ray casting algorithm for detecting if point is in polygon\nfunction pointWithinPolygon(point, rings) {\n let inside = false;\n for (let i = 0, len = rings.length; i < len; i++) {\n const ring = rings[i];\n for (let j = 0, len2 = ring.length; j < len2 - 1; j++) {\n if (onBoundary(point, ring[j], ring[j + 1])) return false;\n if (rayIntersect(point, ring[j], ring[j + 1])) inside = !inside;\n }\n }\n return inside;\n}\n\nfunction pointWithinPolygons(point, polygons) {\n for (let i = 0; i < polygons.length; i++) {\n if (pointWithinPolygon(point, polygons[i])) return true;\n }\n return false;\n}\n\nfunction perp(v1, v2) {\n return (v1[0] * v2[1] - v1[1] * v2[0]);\n}\n\n// check if p1 and p2 are in different sides of line segment q1->q2\nfunction twoSided(p1, p2, q1, q2) {\n // q1->p1 (x1, y1), q1->p2 (x2, y2), q1->q2 (x3, y3)\n const x1 = p1[0] - q1[0];\n const y1 = p1[1] - q1[1];\n const x2 = p2[0] - q1[0];\n const y2 = p2[1] - q1[1];\n const x3 = q2[0] - q1[0];\n const y3 = q2[1] - q1[1];\n const det1 = (x1 * y3 - x3 * y1);\n const det2 = (x2 * y3 - x3 * y2);\n if ((det1 > 0 && det2 < 0) || (det1 < 0 && det2 > 0)) return true;\n return false;\n}\n// a, b are end points for line segment1, c and d are end points for line segment2\nfunction lineIntersectLine(a, b, c, d) {\n // check if two segments are parallel or not\n // precondition is end point a, b is inside polygon, if line a->b is\n // parallel to polygon edge c->d, then a->b won't intersect with c->d\n const vectorP = [b[0] - a[0], b[1] - a[1]];\n const vectorQ = [d[0] - c[0], d[1] - c[1]];\n if (perp(vectorQ, vectorP) === 0) return false;\n\n // If lines are intersecting with each other, the relative location should be:\n // a and b lie in different sides of segment c->d\n // c and d lie in different sides of segment a->b\n if (twoSided(a, b, c, d) && twoSided(c, d, a, b)) return true;\n return false;\n}\n\nfunction lineIntersectPolygon(p1, p2, polygon) {\n for (const ring of polygon) {\n // loop through every edge of the ring\n for (let j = 0; j < ring.length - 1; ++j) {\n if (lineIntersectLine(p1, p2, ring[j], ring[j + 1])) {\n return true;\n }\n }\n }\n return false;\n}\n\nfunction lineStringWithinPolygon(line, polygon) {\n // First, check if geometry points of line segments are all inside polygon\n for (let i = 0; i < line.length; ++i) {\n if (!pointWithinPolygon(line[i], polygon)) {\n return false;\n }\n }\n\n // Second, check if there is line segment intersecting polygon edge\n for (let i = 0; i < line.length - 1; ++i) {\n if (lineIntersectPolygon(line[i], line[i + 1], polygon)) {\n return false;\n }\n }\n return true;\n}\n\nfunction lineStringWithinPolygons(line, polygons) {\n for (let i = 0; i < polygons.length; i++) {\n if (lineStringWithinPolygon(line, polygons[i])) return true;\n }\n return false;\n}\n\nfunction getTilePolygon(coordinates, bbox, canonical) {\n const polygon = [];\n for (let i = 0; i < coordinates.length; i++) {\n const ring = [];\n for (let j = 0; j < coordinates[i].length; j++) {\n const coord = getTileCoordinates(coordinates[i][j], canonical);\n updateBBox(bbox, coord);\n ring.push(coord);\n }\n polygon.push(ring);\n }\n return polygon;\n}\n\nfunction getTilePolygons(coordinates, bbox, canonical) {\n const polygons = [];\n for (let i = 0; i < coordinates.length; i++) {\n const polygon = getTilePolygon(coordinates[i], bbox, canonical);\n polygons.push(polygon);\n }\n return polygons;\n}\n\nfunction updatePoint(p, bbox, polyBBox, worldSize) {\n if (p[0] < polyBBox[0] || p[0] > polyBBox[2]) {\n const halfWorldSize = worldSize * 0.5;\n let shift = (p[0] - polyBBox[0] > halfWorldSize) ? -worldSize : (polyBBox[0] - p[0] > halfWorldSize) ? worldSize : 0;\n if (shift === 0) {\n shift = (p[0] - polyBBox[2] > halfWorldSize) ? -worldSize : (polyBBox[2] - p[0] > halfWorldSize) ? worldSize : 0;\n }\n p[0] += shift;\n }\n updateBBox(bbox, p);\n}\n\nfunction resetBBox(bbox) {\n bbox[0] = bbox[1] = Infinity;\n bbox[2] = bbox[3] = -Infinity;\n}\n\nfunction getTilePoints(geometry, pointBBox, polyBBox, canonical) {\n const worldSize = Math.pow(2, canonical.z) * EXTENT;\n const shifts = [canonical.x * EXTENT, canonical.y * EXTENT];\n const tilePoints = [];\n for (const points of geometry) {\n for (const point of points) {\n const p = [point.x + shifts[0], point.y + shifts[1]];\n updatePoint(p, pointBBox, polyBBox, worldSize);\n tilePoints.push(p);\n }\n }\n return tilePoints;\n}\n\nfunction getTileLines(geometry, lineBBox, polyBBox, canonical) {\n const worldSize = Math.pow(2, canonical.z) * EXTENT;\n const shifts = [canonical.x * EXTENT, canonical.y * EXTENT];\n const tileLines = [];\n for (const line of geometry) {\n const tileLine = [];\n for (const point of line) {\n const p = [point.x + shifts[0], point.y + shifts[1]];\n updateBBox(lineBBox, p);\n tileLine.push(p);\n }\n tileLines.push(tileLine);\n }\n if (lineBBox[2] - lineBBox[0] <= worldSize / 2) {\n resetBBox(lineBBox);\n for (const line of tileLines) {\n for (const p of line) {\n updatePoint(p, lineBBox, polyBBox, worldSize);\n }\n }\n }\n return tileLines;\n}\n\nfunction pointsWithinPolygons(ctx: EvaluationContext, polygonGeometry: GeoJSONPolygons) {\n const pointBBox = [Infinity, Infinity, -Infinity, -Infinity];\n const polyBBox = [Infinity, Infinity, -Infinity, -Infinity];\n\n const canonical = ctx.canonicalID();\n\n if (polygonGeometry.type === 'Polygon') {\n const tilePolygon = getTilePolygon(polygonGeometry.coordinates, polyBBox, canonical);\n const tilePoints = getTilePoints(ctx.geometry(), pointBBox, polyBBox, canonical);\n if (!boxWithinBox(pointBBox, polyBBox)) return false;\n\n for (const point of tilePoints) {\n if (!pointWithinPolygon(point, tilePolygon)) return false;\n }\n }\n if (polygonGeometry.type === 'MultiPolygon') {\n const tilePolygons = getTilePolygons(polygonGeometry.coordinates, polyBBox, canonical);\n const tilePoints = getTilePoints(ctx.geometry(), pointBBox, polyBBox, canonical);\n if (!boxWithinBox(pointBBox, polyBBox)) return false;\n\n for (const point of tilePoints) {\n if (!pointWithinPolygons(point, tilePolygons)) return false;\n }\n }\n\n return true;\n}\n\nfunction linesWithinPolygons(ctx: EvaluationContext, polygonGeometry: GeoJSONPolygons) {\n const lineBBox = [Infinity, Infinity, -Infinity, -Infinity];\n const polyBBox = [Infinity, Infinity, -Infinity, -Infinity];\n\n const canonical = ctx.canonicalID();\n\n if (polygonGeometry.type === 'Polygon') {\n const tilePolygon = getTilePolygon(polygonGeometry.coordinates, polyBBox, canonical);\n const tileLines = getTileLines(ctx.geometry(), lineBBox, polyBBox, canonical);\n if (!boxWithinBox(lineBBox, polyBBox)) return false;\n\n for (const line of tileLines) {\n if (!lineStringWithinPolygon(line, tilePolygon)) return false;\n }\n }\n if (polygonGeometry.type === 'MultiPolygon') {\n const tilePolygons = getTilePolygons(polygonGeometry.coordinates, polyBBox, canonical);\n const tileLines = getTileLines(ctx.geometry(), lineBBox, polyBBox, canonical);\n if (!boxWithinBox(lineBBox, polyBBox)) return false;\n\n for (const line of tileLines) {\n if (!lineStringWithinPolygons(line, tilePolygons)) return false;\n }\n }\n return true;\n}\n\nclass Within implements Expression {\n type: Type;\n geojson: GeoJSON\n geometries: GeoJSONPolygons;\n\n constructor(geojson: GeoJSON, geometries: GeoJSONPolygons) {\n this.type = BooleanType;\n this.geojson = geojson;\n this.geometries = geometries;\n }\n\n static parse(args: $ReadOnlyArray, context: ParsingContext) {\n if (args.length !== 2)\n return context.error(`'within' expression requires exactly one argument, but found ${args.length - 1} instead.`);\n if (isValue(args[1])) {\n const geojson = (args[1]: Object);\n if (geojson.type === 'FeatureCollection') {\n for (let i = 0; i < geojson.features.length; ++i) {\n const type = geojson.features[i].geometry.type;\n if (type === 'Polygon' || type === 'MultiPolygon') {\n return new Within(geojson, geojson.features[i].geometry);\n }\n }\n } else if (geojson.type === 'Feature') {\n const type = geojson.geometry.type;\n if (type === 'Polygon' || type === 'MultiPolygon') {\n return new Within(geojson, geojson.geometry);\n }\n } else if (geojson.type === 'Polygon' || geojson.type === 'MultiPolygon') {\n return new Within(geojson, geojson);\n }\n }\n return context.error(`'within' expression requires valid geojson object that contains polygon geometry type.`);\n }\n\n evaluate(ctx: EvaluationContext) {\n if (ctx.geometry() != null && ctx.canonicalID() != null) {\n if (ctx.geometryType() === 'Point') {\n return pointsWithinPolygons(ctx, this.geometries);\n } else if (ctx.geometryType() === 'LineString') {\n return linesWithinPolygons(ctx, this.geometries);\n }\n }\n return false;\n }\n\n eachChild() {}\n\n outputDefined(): boolean {\n return true;\n }\n\n serialize(): Array {\n return [\"within\", this.geojson];\n }\n\n}\n\nexport default Within;\n","// @flow\n\nimport CompoundExpression from './compound_expression.js';\nimport Within from './definitions/within.js';\nimport type {Expression} from './expression.js';\n\nfunction isFeatureConstant(e: Expression) {\n if (e instanceof CompoundExpression) {\n if (e.name === 'get' && e.args.length === 1) {\n return false;\n } else if (e.name === 'feature-state') {\n return false;\n } else if (e.name === 'has' && e.args.length === 1) {\n return false;\n } else if (\n e.name === 'properties' ||\n e.name === 'geometry-type' ||\n e.name === 'id'\n ) {\n return false;\n } else if (/^filter-/.test(e.name)) {\n return false;\n }\n }\n\n if (e instanceof Within) {\n return false;\n }\n\n let result = true;\n e.eachChild(arg => {\n if (result && !isFeatureConstant(arg)) { result = false; }\n });\n return result;\n}\n\nfunction isStateConstant(e: Expression) {\n if (e instanceof CompoundExpression) {\n if (e.name === 'feature-state') {\n return false;\n }\n }\n let result = true;\n e.eachChild(arg => {\n if (result && !isStateConstant(arg)) { result = false; }\n });\n return result;\n}\n\nfunction isGlobalPropertyConstant(e: Expression, properties: Array) {\n if (e instanceof CompoundExpression && properties.indexOf(e.name) >= 0) { return false; }\n let result = true;\n e.eachChild((arg) => {\n if (result && !isGlobalPropertyConstant(arg, properties)) { result = false; }\n });\n return result;\n}\n\nexport {isFeatureConstant, isGlobalPropertyConstant, isStateConstant};\n","// @flow\n\nimport type {Type} from '../types.js';\nimport type {Expression} from '../expression.js';\nimport type ParsingContext from '../parsing_context.js';\nimport type EvaluationContext from '../evaluation_context.js';\n\nclass Var implements Expression {\n type: Type;\n name: string;\n boundExpression: Expression;\n\n constructor(name: string, boundExpression: Expression) {\n this.type = boundExpression.type;\n this.name = name;\n this.boundExpression = boundExpression;\n }\n\n static parse(args: $ReadOnlyArray, context: ParsingContext) {\n if (args.length !== 2 || typeof args[1] !== 'string')\n return context.error(`'var' expression requires exactly one string literal argument.`);\n\n const name = args[1];\n if (!context.scope.has(name)) {\n return context.error(`Unknown variable \"${name}\". Make sure \"${name}\" has been bound in an enclosing \"let\" expression before using it.`, 1);\n }\n\n return new Var(name, context.scope.get(name));\n }\n\n evaluate(ctx: EvaluationContext) {\n return this.boundExpression.evaluate(ctx);\n }\n\n eachChild() {}\n\n outputDefined() {\n return false;\n }\n\n serialize() {\n return [\"var\", this.name];\n }\n}\n\nexport default Var;\n","// @flow\n\nimport Scope from './scope.js';\nimport {checkSubtype} from './types.js';\nimport ParsingError from './parsing_error.js';\nimport Literal from './definitions/literal.js';\nimport Assertion from './definitions/assertion.js';\nimport Coercion from './definitions/coercion.js';\nimport EvaluationContext from './evaluation_context.js';\nimport CompoundExpression from './compound_expression.js';\nimport CollatorExpression from './definitions/collator.js';\nimport Within from './definitions/within.js';\nimport {isGlobalPropertyConstant, isFeatureConstant} from './is_constant.js';\nimport Var from './definitions/var.js';\n\nimport type {Expression, ExpressionRegistry} from './expression.js';\nimport type {Type} from './types.js';\n\n/**\n * State associated parsing at a given point in an expression tree.\n * @private\n */\nclass ParsingContext {\n registry: ExpressionRegistry;\n path: Array;\n key: string;\n scope: Scope;\n errors: Array;\n\n // The expected type of this expression. Provided only to allow Expression\n // implementations to infer argument types: Expression#parse() need not\n // check that the output type of the parsed expression matches\n // `expectedType`.\n expectedType: ?Type;\n\n constructor(\n registry: ExpressionRegistry,\n path: Array = [],\n expectedType: ?Type,\n scope: Scope = new Scope(),\n errors: Array = []\n ) {\n this.registry = registry;\n this.path = path;\n this.key = path.map(part => `[${part}]`).join('');\n this.scope = scope;\n this.errors = errors;\n this.expectedType = expectedType;\n }\n\n /**\n * @param expr the JSON expression to parse\n * @param index the optional argument index if this expression is an argument of a parent expression that's being parsed\n * @param options\n * @param options.omitTypeAnnotations set true to omit inferred type annotations. Caller beware: with this option set, the parsed expression's type will NOT satisfy `expectedType` if it would normally be wrapped in an inferred annotation.\n * @private\n */\n parse(\n expr: mixed,\n index?: number,\n expectedType?: ?Type,\n bindings?: Array<[string, Expression]>,\n options: {typeAnnotation?: 'assert' | 'coerce' | 'omit'} = {}\n ): ?Expression {\n if (index) {\n return this.concat(index, expectedType, bindings)._parse(expr, options);\n }\n return this._parse(expr, options);\n }\n\n _parse(expr: mixed, options: {typeAnnotation?: 'assert' | 'coerce' | 'omit'}): ?Expression {\n if (expr === null || typeof expr === 'string' || typeof expr === 'boolean' || typeof expr === 'number') {\n expr = ['literal', expr];\n }\n\n function annotate(parsed, type, typeAnnotation: 'assert' | 'coerce' | 'omit') {\n if (typeAnnotation === 'assert') {\n return new Assertion(type, [parsed]);\n } else if (typeAnnotation === 'coerce') {\n return new Coercion(type, [parsed]);\n } else {\n return parsed;\n }\n }\n\n if (Array.isArray(expr)) {\n if (expr.length === 0) {\n return this.error(`Expected an array with at least one element. If you wanted a literal array, use [\"literal\", []].`);\n }\n\n const op = expr[0];\n if (typeof op !== 'string') {\n this.error(`Expression name must be a string, but found ${typeof op} instead. If you wanted a literal array, use [\"literal\", [...]].`, 0);\n return null;\n }\n\n const Expr = this.registry[op];\n if (Expr) {\n let parsed = Expr.parse(expr, this);\n if (!parsed) return null;\n\n if (this.expectedType) {\n const expected = this.expectedType;\n const actual = parsed.type;\n\n // When we expect a number, string, boolean, or array but have a value, wrap it in an assertion.\n // When we expect a color or formatted string, but have a string or value, wrap it in a coercion.\n // Otherwise, we do static type-checking.\n //\n // These behaviors are overridable for:\n // * The \"coalesce\" operator, which needs to omit type annotations.\n // * String-valued properties (e.g. `text-field`), where coercion is more convenient than assertion.\n //\n if ((expected.kind === 'string' || expected.kind === 'number' || expected.kind === 'boolean' || expected.kind === 'object' || expected.kind === 'array') && actual.kind === 'value') {\n parsed = annotate(parsed, expected, options.typeAnnotation || 'assert');\n } else if ((expected.kind === 'color' || expected.kind === 'formatted' || expected.kind === 'resolvedImage') && (actual.kind === 'value' || actual.kind === 'string')) {\n parsed = annotate(parsed, expected, options.typeAnnotation || 'coerce');\n } else if (this.checkSubtype(expected, actual)) {\n return null;\n }\n }\n\n // If an expression's arguments are all literals, we can evaluate\n // it immediately and replace it with a literal value in the\n // parsed/compiled result. Expressions that expect an image should\n // not be resolved here so we can later get the available images.\n if (!(parsed instanceof Literal) && (parsed.type.kind !== 'resolvedImage') && isConstant(parsed)) {\n const ec = new EvaluationContext();\n try {\n parsed = new Literal(parsed.type, parsed.evaluate(ec));\n } catch (e) {\n this.error(e.message);\n return null;\n }\n }\n\n return parsed;\n }\n\n return this.error(`Unknown expression \"${op}\". If you wanted a literal array, use [\"literal\", [...]].`, 0);\n } else if (typeof expr === 'undefined') {\n return this.error(`'undefined' value invalid. Use null instead.`);\n } else if (typeof expr === 'object') {\n return this.error(`Bare objects invalid. Use [\"literal\", {...}] instead.`);\n } else {\n return this.error(`Expected an array, but found ${typeof expr} instead.`);\n }\n }\n\n /**\n * Returns a copy of this context suitable for parsing the subexpression at\n * index `index`, optionally appending to 'let' binding map.\n *\n * Note that `errors` property, intended for collecting errors while\n * parsing, is copied by reference rather than cloned.\n * @private\n */\n concat(index: number, expectedType?: ?Type, bindings?: Array<[string, Expression]>) {\n const path = typeof index === 'number' ? this.path.concat(index) : this.path;\n const scope = bindings ? this.scope.concat(bindings) : this.scope;\n return new ParsingContext(\n this.registry,\n path,\n expectedType || null,\n scope,\n this.errors\n );\n }\n\n /**\n * Push a parsing (or type checking) error into the `this.errors`\n * @param error The message\n * @param keys Optionally specify the source of the error at a child\n * of the current expression at `this.key`.\n * @private\n */\n error(error: string, ...keys: Array) {\n const key = `${this.key}${keys.map(k => `[${k}]`).join('')}`;\n this.errors.push(new ParsingError(key, error));\n }\n\n /**\n * Returns null if `t` is a subtype of `expected`; otherwise returns an\n * error message and also pushes it to `this.errors`.\n */\n checkSubtype(expected: Type, t: Type): ?string {\n const error = checkSubtype(expected, t);\n if (error) this.error(error);\n return error;\n }\n}\n\nexport default ParsingContext;\n\nfunction isConstant(expression: Expression) {\n if (expression instanceof Var) {\n return isConstant(expression.boundExpression);\n } else if (expression instanceof CompoundExpression && expression.name === 'error') {\n return false;\n } else if (expression instanceof CollatorExpression) {\n // Although the results of a Collator expression with fixed arguments\n // generally shouldn't change between executions, we can't serialize them\n // as constant expressions because results change based on environment.\n return false;\n } else if (expression instanceof Within) {\n return false;\n }\n\n const isTypeAnnotation = expression instanceof Coercion ||\n expression instanceof Assertion;\n\n let childrenConstant = true;\n expression.eachChild(child => {\n // We can _almost_ assume that if `expressions` children are constant,\n // they would already have been evaluated to Literal values when they\n // were parsed. Type annotations are the exception, because they might\n // have been inferred and added after a child was parsed.\n\n // So we recurse into isConstant() for the children of type annotations,\n // but otherwise simply check whether they are Literals.\n if (isTypeAnnotation) {\n childrenConstant = childrenConstant && isConstant(child);\n } else {\n childrenConstant = childrenConstant && child instanceof Literal;\n }\n });\n if (!childrenConstant) {\n return false;\n }\n\n return isFeatureConstant(expression) &&\n isGlobalPropertyConstant(expression, ['zoom', 'heatmap-density', 'line-progress', 'sky-radial-progress', 'accumulated', 'is-supported-script']);\n}\n","// @flow\n\nimport RuntimeError from './runtime_error.js';\n\nimport type {Expression} from './expression.js';\n\nexport type Stops = Array<[number, Expression]>;\n\n/**\n * Returns the index of the last stop <= input, or 0 if it doesn't exist.\n * @private\n */\nexport function findStopLessThanOrEqualTo(stops: Array, input: number) {\n const lastIndex = stops.length - 1;\n let lowerIndex = 0;\n let upperIndex = lastIndex;\n let currentIndex = 0;\n let currentValue, nextValue;\n\n while (lowerIndex <= upperIndex) {\n currentIndex = Math.floor((lowerIndex + upperIndex) / 2);\n currentValue = stops[currentIndex];\n nextValue = stops[currentIndex + 1];\n\n if (currentValue <= input) {\n if (currentIndex === lastIndex || input < nextValue) { // Search complete\n return currentIndex;\n }\n\n lowerIndex = currentIndex + 1;\n } else if (currentValue > input) {\n upperIndex = currentIndex - 1;\n } else {\n throw new RuntimeError('Input is not a number.');\n }\n }\n\n return 0;\n}\n","// @flow\n\nimport {NumberType} from '../types.js';\n\nimport {findStopLessThanOrEqualTo} from '../stops.js';\n\nimport type {Stops} from '../stops.js';\nimport type {Expression} from '../expression.js';\nimport type ParsingContext from '../parsing_context.js';\nimport type EvaluationContext from '../evaluation_context.js';\nimport type {Type} from '../types.js';\n\nclass Step implements Expression {\n type: Type;\n\n input: Expression;\n labels: Array;\n outputs: Array;\n\n constructor(type: Type, input: Expression, stops: Stops) {\n this.type = type;\n this.input = input;\n\n this.labels = [];\n this.outputs = [];\n for (const [label, expression] of stops) {\n this.labels.push(label);\n this.outputs.push(expression);\n }\n }\n\n static parse(args: $ReadOnlyArray, context: ParsingContext) {\n if (args.length - 1 < 4) {\n return context.error(`Expected at least 4 arguments, but found only ${args.length - 1}.`);\n }\n\n if ((args.length - 1) % 2 !== 0) {\n return context.error(`Expected an even number of arguments.`);\n }\n\n const input = context.parse(args[1], 1, NumberType);\n if (!input) return null;\n\n const stops: Stops = [];\n\n let outputType: Type = (null: any);\n if (context.expectedType && context.expectedType.kind !== 'value') {\n outputType = context.expectedType;\n }\n\n for (let i = 1; i < args.length; i += 2) {\n const label = i === 1 ? -Infinity : args[i];\n const value = args[i + 1];\n\n const labelKey = i;\n const valueKey = i + 1;\n\n if (typeof label !== 'number') {\n return context.error('Input/output pairs for \"step\" expressions must be defined using literal numeric values (not computed expressions) for the input values.', labelKey);\n }\n\n if (stops.length && stops[stops.length - 1][0] >= label) {\n return context.error('Input/output pairs for \"step\" expressions must be arranged with input values in strictly ascending order.', labelKey);\n }\n\n const parsed = context.parse(value, valueKey, outputType);\n if (!parsed) return null;\n outputType = outputType || parsed.type;\n stops.push([label, parsed]);\n }\n\n return new Step(outputType, input, stops);\n }\n\n evaluate(ctx: EvaluationContext) {\n const labels = this.labels;\n const outputs = this.outputs;\n\n if (labels.length === 1) {\n return outputs[0].evaluate(ctx);\n }\n\n const value = ((this.input.evaluate(ctx): any): number);\n if (value <= labels[0]) {\n return outputs[0].evaluate(ctx);\n }\n\n const stopCount = labels.length;\n if (value >= labels[stopCount - 1]) {\n return outputs[stopCount - 1].evaluate(ctx);\n }\n\n const index = findStopLessThanOrEqualTo(labels, value);\n return outputs[index].evaluate(ctx);\n }\n\n eachChild(fn: (_: Expression) => void) {\n fn(this.input);\n for (const expression of this.outputs) {\n fn(expression);\n }\n }\n\n outputDefined(): boolean {\n return this.outputs.every(out => out.outputDefined());\n }\n\n serialize() {\n const serialized = [\"step\", this.input.serialize()];\n for (let i = 0; i < this.labels.length; i++) {\n if (i > 0) {\n serialized.push(this.labels[i]);\n }\n serialized.push(this.outputs[i].serialize());\n }\n return serialized;\n }\n}\n\nexport default Step;\n","/*\n * Copyright (C) 2008 Apple Inc. All Rights Reserved.\n *\n * Redistribution and use in source and binary forms, with or without\n * modification, are permitted provided that the following conditions\n * are met:\n * 1. Redistributions of source code must retain the above copyright\n * notice, this list of conditions and the following disclaimer.\n * 2. Redistributions in binary form must reproduce the above copyright\n * notice, this list of conditions and the following disclaimer in the\n * documentation and/or other materials provided with the distribution.\n *\n * THIS SOFTWARE IS PROVIDED BY APPLE INC. ``AS IS'' AND ANY\n * EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE\n * IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR\n * PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL APPLE INC. OR\n * CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL,\n * EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT LIMITED TO,\n * PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, DATA, OR\n * PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY\n * OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT\n * (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE\n * OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.\n *\n * Ported from Webkit\n * http://svn.webkit.org/repository/webkit/trunk/Source/WebCore/platform/graphics/UnitBezier.h\n */\n\nmodule.exports = UnitBezier;\n\nfunction UnitBezier(p1x, p1y, p2x, p2y) {\n // Calculate the polynomial coefficients, implicit first and last control points are (0,0) and (1,1).\n this.cx = 3.0 * p1x;\n this.bx = 3.0 * (p2x - p1x) - this.cx;\n this.ax = 1.0 - this.cx - this.bx;\n\n this.cy = 3.0 * p1y;\n this.by = 3.0 * (p2y - p1y) - this.cy;\n this.ay = 1.0 - this.cy - this.by;\n\n this.p1x = p1x;\n this.p1y = p2y;\n this.p2x = p2x;\n this.p2y = p2y;\n}\n\nUnitBezier.prototype.sampleCurveX = function(t) {\n // `ax t^3 + bx t^2 + cx t' expanded using Horner's rule.\n return ((this.ax * t + this.bx) * t + this.cx) * t;\n};\n\nUnitBezier.prototype.sampleCurveY = function(t) {\n return ((this.ay * t + this.by) * t + this.cy) * t;\n};\n\nUnitBezier.prototype.sampleCurveDerivativeX = function(t) {\n return (3.0 * this.ax * t + 2.0 * this.bx) * t + this.cx;\n};\n\nUnitBezier.prototype.solveCurveX = function(x, epsilon) {\n if (typeof epsilon === 'undefined') epsilon = 1e-6;\n\n var t0, t1, t2, x2, i;\n\n // First try a few iterations of Newton's method -- normally very fast.\n for (t2 = x, i = 0; i < 8; i++) {\n\n x2 = this.sampleCurveX(t2) - x;\n if (Math.abs(x2) < epsilon) return t2;\n\n var d2 = this.sampleCurveDerivativeX(t2);\n if (Math.abs(d2) < 1e-6) break;\n\n t2 = t2 - x2 / d2;\n }\n\n // Fall back to the bisection method for reliability.\n t0 = 0.0;\n t1 = 1.0;\n t2 = x;\n\n if (t2 < t0) return t0;\n if (t2 > t1) return t1;\n\n while (t0 < t1) {\n\n x2 = this.sampleCurveX(t2);\n if (Math.abs(x2 - x) < epsilon) return t2;\n\n if (x > x2) {\n t0 = t2;\n } else {\n t1 = t2;\n }\n\n t2 = (t1 - t0) * 0.5 + t0;\n }\n\n // Failure.\n return t2;\n};\n\nUnitBezier.prototype.solve = function(x, epsilon) {\n return this.sampleCurveY(this.solveCurveX(x, epsilon));\n};\n","// @flow\n\nimport Color from './color.js';\n\nexport function number(a: number, b: number, t: number) {\n return (a * (1 - t)) + (b * t);\n}\n\nexport function color(from: Color, to: Color, t: number) {\n return new Color(\n number(from.r, to.r, t),\n number(from.g, to.g, t),\n number(from.b, to.b, t),\n number(from.a, to.a, t)\n );\n}\n\nexport function array(from: Array, to: Array, t: number): Array {\n return from.map((d, i) => {\n return number(d, to[i], t);\n });\n}\n","// @flow\n\nimport Color from './color.js';\n\nimport {number as interpolateNumber} from './interpolate.js';\n\ntype LABColor = {\n l: number,\n a: number,\n b: number,\n alpha: number\n};\n\ntype HCLColor = {\n h: number,\n c: number,\n l: number,\n alpha: number\n};\n\n// Constants\nconst Xn = 0.950470, // D65 standard referent\n Yn = 1,\n Zn = 1.088830,\n t0 = 4 / 29,\n t1 = 6 / 29,\n t2 = 3 * t1 * t1,\n t3 = t1 * t1 * t1,\n deg2rad = Math.PI / 180,\n rad2deg = 180 / Math.PI;\n\n// Utilities\nfunction xyz2lab(t: number) {\n return t > t3 ? Math.pow(t, 1 / 3) : t / t2 + t0;\n}\n\nfunction lab2xyz(t: number) {\n return t > t1 ? t * t * t : t2 * (t - t0);\n}\n\nfunction xyz2rgb(x: number) {\n return 255 * (x <= 0.0031308 ? 12.92 * x : 1.055 * Math.pow(x, 1 / 2.4) - 0.055);\n}\n\nfunction rgb2xyz(x: number) {\n x /= 255;\n return x <= 0.04045 ? x / 12.92 : Math.pow((x + 0.055) / 1.055, 2.4);\n}\n\n// LAB\nfunction rgbToLab(rgbColor: Color): LABColor {\n const b = rgb2xyz(rgbColor.r),\n a = rgb2xyz(rgbColor.g),\n l = rgb2xyz(rgbColor.b),\n x = xyz2lab((0.4124564 * b + 0.3575761 * a + 0.1804375 * l) / Xn),\n y = xyz2lab((0.2126729 * b + 0.7151522 * a + 0.0721750 * l) / Yn),\n z = xyz2lab((0.0193339 * b + 0.1191920 * a + 0.9503041 * l) / Zn);\n\n return {\n l: 116 * y - 16,\n a: 500 * (x - y),\n b: 200 * (y - z),\n alpha: rgbColor.a\n };\n}\n\nfunction labToRgb(labColor: LABColor): Color {\n let y = (labColor.l + 16) / 116,\n x = isNaN(labColor.a) ? y : y + labColor.a / 500,\n z = isNaN(labColor.b) ? y : y - labColor.b / 200;\n y = Yn * lab2xyz(y);\n x = Xn * lab2xyz(x);\n z = Zn * lab2xyz(z);\n return new Color(\n xyz2rgb(3.2404542 * x - 1.5371385 * y - 0.4985314 * z), // D65 -> sRGB\n xyz2rgb(-0.9692660 * x + 1.8760108 * y + 0.0415560 * z),\n xyz2rgb(0.0556434 * x - 0.2040259 * y + 1.0572252 * z),\n labColor.alpha\n );\n}\n\nfunction interpolateLab(from: LABColor, to: LABColor, t: number) {\n return {\n l: interpolateNumber(from.l, to.l, t),\n a: interpolateNumber(from.a, to.a, t),\n b: interpolateNumber(from.b, to.b, t),\n alpha: interpolateNumber(from.alpha, to.alpha, t)\n };\n}\n\n// HCL\nfunction rgbToHcl(rgbColor: Color): HCLColor {\n const {l, a, b} = rgbToLab(rgbColor);\n const h = Math.atan2(b, a) * rad2deg;\n return {\n h: h < 0 ? h + 360 : h,\n c: Math.sqrt(a * a + b * b),\n l,\n alpha: rgbColor.a\n };\n}\n\nfunction hclToRgb(hclColor: HCLColor): Color {\n const h = hclColor.h * deg2rad,\n c = hclColor.c,\n l = hclColor.l;\n return labToRgb({\n l,\n a: Math.cos(h) * c,\n b: Math.sin(h) * c,\n alpha: hclColor.alpha\n });\n}\n\nfunction interpolateHue(a: number, b: number, t: number) {\n const d = b - a;\n return a + t * (d > 180 || d < -180 ? d - 360 * Math.round(d / 360) : d);\n}\n\nfunction interpolateHcl(from: HCLColor, to: HCLColor, t: number) {\n return {\n h: interpolateHue(from.h, to.h, t),\n c: interpolateNumber(from.c, to.c, t),\n l: interpolateNumber(from.l, to.l, t),\n alpha: interpolateNumber(from.alpha, to.alpha, t)\n };\n}\n\nexport const lab = {\n forward: rgbToLab,\n reverse: labToRgb,\n interpolate: interpolateLab\n};\n\nexport const hcl = {\n forward: rgbToHcl,\n reverse: hclToRgb,\n interpolate: interpolateHcl\n};\n","// @flow\n\nimport UnitBezier from '@mapbox/unitbezier';\n\nimport * as interpolate from '../../util/interpolate.js';\nimport {toString, NumberType, ColorType} from '../types.js';\nimport {findStopLessThanOrEqualTo} from '../stops.js';\nimport {hcl, lab} from '../../util/color_spaces.js';\n\nimport type {Stops} from '../stops.js';\nimport type {Expression} from '../expression.js';\nimport type ParsingContext from '../parsing_context.js';\nimport type EvaluationContext from '../evaluation_context.js';\nimport type {Type} from '../types.js';\n\nexport type InterpolationType =\n { name: 'linear' } |\n { name: 'exponential', base: number } |\n { name: 'cubic-bezier', controlPoints: [number, number, number, number] };\n\nclass Interpolate implements Expression {\n type: Type;\n\n operator: 'interpolate' | 'interpolate-hcl' | 'interpolate-lab';\n interpolation: InterpolationType;\n input: Expression;\n labels: Array;\n outputs: Array;\n\n constructor(type: Type, operator: 'interpolate' | 'interpolate-hcl' | 'interpolate-lab', interpolation: InterpolationType, input: Expression, stops: Stops) {\n this.type = type;\n this.operator = operator;\n this.interpolation = interpolation;\n this.input = input;\n\n this.labels = [];\n this.outputs = [];\n for (const [label, expression] of stops) {\n this.labels.push(label);\n this.outputs.push(expression);\n }\n }\n\n static interpolationFactor(interpolation: InterpolationType, input: number, lower: number, upper: number) {\n let t = 0;\n if (interpolation.name === 'exponential') {\n t = exponentialInterpolation(input, interpolation.base, lower, upper);\n } else if (interpolation.name === 'linear') {\n t = exponentialInterpolation(input, 1, lower, upper);\n } else if (interpolation.name === 'cubic-bezier') {\n const c = interpolation.controlPoints;\n const ub = new UnitBezier(c[0], c[1], c[2], c[3]);\n t = ub.solve(exponentialInterpolation(input, 1, lower, upper));\n }\n return t;\n }\n\n static parse(args: $ReadOnlyArray, context: ParsingContext) {\n let [operator, interpolation, input, ...rest] = args;\n\n if (!Array.isArray(interpolation) || interpolation.length === 0) {\n return context.error(`Expected an interpolation type expression.`, 1);\n }\n\n if (interpolation[0] === 'linear') {\n interpolation = {name: 'linear'};\n } else if (interpolation[0] === 'exponential') {\n const base = interpolation[1];\n if (typeof base !== 'number')\n return context.error(`Exponential interpolation requires a numeric base.`, 1, 1);\n interpolation = {\n name: 'exponential',\n base\n };\n } else if (interpolation[0] === 'cubic-bezier') {\n const controlPoints = interpolation.slice(1);\n if (\n controlPoints.length !== 4 ||\n controlPoints.some(t => typeof t !== 'number' || t < 0 || t > 1)\n ) {\n return context.error('Cubic bezier interpolation requires four numeric arguments with values between 0 and 1.', 1);\n }\n\n interpolation = {\n name: 'cubic-bezier',\n controlPoints: (controlPoints: any)\n };\n } else {\n return context.error(`Unknown interpolation type ${String(interpolation[0])}`, 1, 0);\n }\n\n if (args.length - 1 < 4) {\n return context.error(`Expected at least 4 arguments, but found only ${args.length - 1}.`);\n }\n\n if ((args.length - 1) % 2 !== 0) {\n return context.error(`Expected an even number of arguments.`);\n }\n\n input = context.parse(input, 2, NumberType);\n if (!input) return null;\n\n const stops: Stops = [];\n\n let outputType: Type = (null: any);\n if (operator === 'interpolate-hcl' || operator === 'interpolate-lab') {\n outputType = ColorType;\n } else if (context.expectedType && context.expectedType.kind !== 'value') {\n outputType = context.expectedType;\n }\n\n for (let i = 0; i < rest.length; i += 2) {\n const label = rest[i];\n const value = rest[i + 1];\n\n const labelKey = i + 3;\n const valueKey = i + 4;\n\n if (typeof label !== 'number') {\n return context.error('Input/output pairs for \"interpolate\" expressions must be defined using literal numeric values (not computed expressions) for the input values.', labelKey);\n }\n\n if (stops.length && stops[stops.length - 1][0] >= label) {\n return context.error('Input/output pairs for \"interpolate\" expressions must be arranged with input values in strictly ascending order.', labelKey);\n }\n\n const parsed = context.parse(value, valueKey, outputType);\n if (!parsed) return null;\n outputType = outputType || parsed.type;\n stops.push([label, parsed]);\n }\n\n if (outputType.kind !== 'number' &&\n outputType.kind !== 'color' &&\n !(\n outputType.kind === 'array' &&\n outputType.itemType.kind === 'number' &&\n typeof outputType.N === 'number'\n )\n ) {\n return context.error(`Type ${toString(outputType)} is not interpolatable.`);\n }\n\n return new Interpolate(outputType, (operator: any), interpolation, input, stops);\n }\n\n evaluate(ctx: EvaluationContext) {\n const labels = this.labels;\n const outputs = this.outputs;\n\n if (labels.length === 1) {\n return outputs[0].evaluate(ctx);\n }\n\n const value = ((this.input.evaluate(ctx): any): number);\n if (value <= labels[0]) {\n return outputs[0].evaluate(ctx);\n }\n\n const stopCount = labels.length;\n if (value >= labels[stopCount - 1]) {\n return outputs[stopCount - 1].evaluate(ctx);\n }\n\n const index = findStopLessThanOrEqualTo(labels, value);\n const lower = labels[index];\n const upper = labels[index + 1];\n const t = Interpolate.interpolationFactor(this.interpolation, value, lower, upper);\n\n const outputLower = outputs[index].evaluate(ctx);\n const outputUpper = outputs[index + 1].evaluate(ctx);\n\n if (this.operator === 'interpolate') {\n return (interpolate[this.type.kind.toLowerCase()]: any)(outputLower, outputUpper, t); // eslint-disable-line import/namespace\n } else if (this.operator === 'interpolate-hcl') {\n return hcl.reverse(hcl.interpolate(hcl.forward(outputLower), hcl.forward(outputUpper), t));\n } else {\n return lab.reverse(lab.interpolate(lab.forward(outputLower), lab.forward(outputUpper), t));\n }\n }\n\n eachChild(fn: (_: Expression) => void) {\n fn(this.input);\n for (const expression of this.outputs) {\n fn(expression);\n }\n }\n\n outputDefined(): boolean {\n return this.outputs.every(out => out.outputDefined());\n }\n\n serialize(): Array {\n let interpolation;\n if (this.interpolation.name === 'linear') {\n interpolation = [\"linear\"];\n } else if (this.interpolation.name === 'exponential') {\n if (this.interpolation.base === 1) {\n interpolation = [\"linear\"];\n } else {\n interpolation = [\"exponential\", this.interpolation.base];\n }\n } else {\n interpolation = [\"cubic-bezier\" ].concat(this.interpolation.controlPoints);\n }\n\n const serialized = [this.operator, interpolation, this.input.serialize()];\n\n for (let i = 0; i < this.labels.length; i++) {\n serialized.push(\n this.labels[i],\n this.outputs[i].serialize()\n );\n }\n return serialized;\n }\n}\n\n/**\n * Returns a ratio that can be used to interpolate between exponential function\n * stops.\n * How it works: Two consecutive stop values define a (scaled and shifted) exponential function `f(x) = a * base^x + b`, where `base` is the user-specified base,\n * and `a` and `b` are constants affording sufficient degrees of freedom to fit\n * the function to the given stops.\n *\n * Here's a bit of algebra that lets us compute `f(x)` directly from the stop\n * values without explicitly solving for `a` and `b`:\n *\n * First stop value: `f(x0) = y0 = a * base^x0 + b`\n * Second stop value: `f(x1) = y1 = a * base^x1 + b`\n * => `y1 - y0 = a(base^x1 - base^x0)`\n * => `a = (y1 - y0)/(base^x1 - base^x0)`\n *\n * Desired value: `f(x) = y = a * base^x + b`\n * => `f(x) = y0 + a * (base^x - base^x0)`\n *\n * From the above, we can replace the `a` in `a * (base^x - base^x0)` and do a\n * little algebra:\n * ```\n * a * (base^x - base^x0) = (y1 - y0)/(base^x1 - base^x0) * (base^x - base^x0)\n * = (y1 - y0) * (base^x - base^x0) / (base^x1 - base^x0)\n * ```\n *\n * If we let `(base^x - base^x0) / (base^x1 base^x0)`, then we have\n * `f(x) = y0 + (y1 - y0) * ratio`. In other words, `ratio` may be treated as\n * an interpolation factor between the two stops' output values.\n *\n * (Note: a slightly different form for `ratio`,\n * `(base^(x-x0) - 1) / (base^(x1-x0) - 1) `, is equivalent, but requires fewer\n * expensive `Math.pow()` operations.)\n *\n * @private\n*/\nfunction exponentialInterpolation(input, base, lowerValue, upperValue) {\n const difference = upperValue - lowerValue;\n const progress = input - lowerValue;\n\n if (difference === 0) {\n return 0;\n } else if (base === 1) {\n return progress / difference;\n } else {\n return (Math.pow(base, progress) - 1) / (Math.pow(base, difference) - 1);\n }\n}\n\nexport default Interpolate;\n","// @flow\n\nimport assert from 'assert';\n\nimport {checkSubtype, ValueType} from '../types.js';\nimport ResolvedImage from '../types/resolved_image.js';\n\nimport type {Expression} from '../expression.js';\nimport type ParsingContext from '../parsing_context.js';\nimport type EvaluationContext from '../evaluation_context.js';\nimport type {Type} from '../types.js';\n\nclass Coalesce implements Expression {\n type: Type;\n args: Array;\n\n constructor(type: Type, args: Array) {\n this.type = type;\n this.args = args;\n }\n\n static parse(args: $ReadOnlyArray, context: ParsingContext) {\n if (args.length < 2) {\n return context.error(\"Expectected at least one argument.\");\n }\n let outputType: Type = (null: any);\n const expectedType = context.expectedType;\n if (expectedType && expectedType.kind !== 'value') {\n outputType = expectedType;\n }\n const parsedArgs = [];\n\n for (const arg of args.slice(1)) {\n const parsed = context.parse(arg, 1 + parsedArgs.length, outputType, undefined, {typeAnnotation: 'omit'});\n if (!parsed) return null;\n outputType = outputType || parsed.type;\n parsedArgs.push(parsed);\n }\n assert(outputType);\n\n // Above, we parse arguments without inferred type annotation so that\n // they don't produce a runtime error for `null` input, which would\n // preempt the desired null-coalescing behavior.\n // Thus, if any of our arguments would have needed an annotation, we\n // need to wrap the enclosing coalesce expression with it instead.\n const needsAnnotation = expectedType &&\n parsedArgs.some(arg => checkSubtype(expectedType, arg.type));\n\n return needsAnnotation ?\n new Coalesce(ValueType, parsedArgs) :\n new Coalesce((outputType: any), parsedArgs);\n }\n\n evaluate(ctx: EvaluationContext) {\n let result = null;\n let argCount = 0;\n let requestedImageName;\n for (const arg of this.args) {\n argCount++;\n result = arg.evaluate(ctx);\n // we need to keep track of the first requested image in a coalesce statement\n // if coalesce can't find a valid image, we return the first image name so styleimagemissing can fire\n if (result && result instanceof ResolvedImage && !result.available) {\n if (!requestedImageName) {\n requestedImageName = result.name;\n }\n result = null;\n if (argCount === this.args.length) {\n result = requestedImageName;\n }\n }\n\n if (result !== null) break;\n }\n return result;\n }\n\n eachChild(fn: (_: Expression) => void) {\n this.args.forEach(fn);\n }\n\n outputDefined(): boolean {\n return this.args.every(arg => arg.outputDefined());\n }\n\n serialize() {\n const serialized = [\"coalesce\"];\n this.eachChild(child => { serialized.push(child.serialize()); });\n return serialized;\n }\n}\n\nexport default Coalesce;\n","// @flow\n\nimport type {Type} from '../types.js';\nimport type {Expression} from '../expression.js';\nimport type ParsingContext from '../parsing_context.js';\nimport type EvaluationContext from '../evaluation_context.js';\n\nclass Let implements Expression {\n type: Type;\n bindings: Array<[string, Expression]>;\n result: Expression;\n\n constructor(bindings: Array<[string, Expression]>, result: Expression) {\n this.type = result.type;\n this.bindings = [].concat(bindings);\n this.result = result;\n }\n\n evaluate(ctx: EvaluationContext) {\n return this.result.evaluate(ctx);\n }\n\n eachChild(fn: (_: Expression) => void) {\n for (const binding of this.bindings) {\n fn(binding[1]);\n }\n fn(this.result);\n }\n\n static parse(args: $ReadOnlyArray, context: ParsingContext) {\n if (args.length < 4)\n return context.error(`Expected at least 3 arguments, but found ${args.length - 1} instead.`);\n\n const bindings: Array<[string, Expression]> = [];\n for (let i = 1; i < args.length - 1; i += 2) {\n const name = args[i];\n\n if (typeof name !== 'string') {\n return context.error(`Expected string, but found ${typeof name} instead.`, i);\n }\n\n if (/[^a-zA-Z0-9_]/.test(name)) {\n return context.error(`Variable names must contain only alphanumeric characters or '_'.`, i);\n }\n\n const value = context.parse(args[i + 1], i + 1);\n if (!value) return null;\n\n bindings.push([name, value]);\n }\n\n const result = context.parse(args[args.length - 1], args.length - 1, context.expectedType, bindings);\n if (!result) return null;\n\n return new Let(bindings, result);\n }\n\n outputDefined() {\n return this.result.outputDefined();\n }\n\n serialize() {\n const serialized = [\"let\"];\n for (const [name, expr] of this.bindings) {\n serialized.push(name, expr.serialize());\n }\n serialized.push(this.result.serialize());\n return serialized;\n }\n}\n\nexport default Let;\n","// @flow\n\nimport {array, ValueType, NumberType} from '../types.js';\n\nimport RuntimeError from '../runtime_error.js';\n\nimport type {Expression} from '../expression.js';\nimport type ParsingContext from '../parsing_context.js';\nimport type EvaluationContext from '../evaluation_context.js';\nimport type {Type, ArrayType} from '../types.js';\nimport type {Value} from '../values.js';\n\nclass At implements Expression {\n type: Type;\n index: Expression;\n input: Expression;\n\n constructor(type: Type, index: Expression, input: Expression) {\n this.type = type;\n this.index = index;\n this.input = input;\n }\n\n static parse(args: $ReadOnlyArray, context: ParsingContext) {\n if (args.length !== 3)\n return context.error(`Expected 2 arguments, but found ${args.length - 1} instead.`);\n\n const index = context.parse(args[1], 1, NumberType);\n const input = context.parse(args[2], 2, array(context.expectedType || ValueType));\n\n if (!index || !input) return null;\n\n const t: ArrayType = (input.type: any);\n return new At(t.itemType, index, input);\n }\n\n evaluate(ctx: EvaluationContext) {\n const index = ((this.index.evaluate(ctx): any): number);\n const array = ((this.input.evaluate(ctx): any): Array);\n\n if (index < 0) {\n throw new RuntimeError(`Array index out of bounds: ${index} < 0.`);\n }\n\n if (index >= array.length) {\n throw new RuntimeError(`Array index out of bounds: ${index} > ${array.length - 1}.`);\n }\n\n if (index !== Math.floor(index)) {\n throw new RuntimeError(`Array index must be an integer, but found ${index} instead.`);\n }\n\n return array[index];\n }\n\n eachChild(fn: (_: Expression) => void) {\n fn(this.index);\n fn(this.input);\n }\n\n outputDefined() {\n return false;\n }\n\n serialize() {\n return [\"at\", this.index.serialize(), this.input.serialize()];\n }\n}\n\nexport default At;\n","// @flow\n\nimport {BooleanType, StringType, ValueType, NullType, toString, NumberType, isValidType, isValidNativeType} from '../types.js';\nimport RuntimeError from '../runtime_error.js';\nimport {typeOf} from '../values.js';\n\nimport type {Expression} from '../expression.js';\nimport type ParsingContext from '../parsing_context.js';\nimport type EvaluationContext from '../evaluation_context.js';\nimport type {Type} from '../types.js';\n\nclass In implements Expression {\n type: Type;\n needle: Expression;\n haystack: Expression;\n\n constructor(needle: Expression, haystack: Expression) {\n this.type = BooleanType;\n this.needle = needle;\n this.haystack = haystack;\n }\n\n static parse(args: $ReadOnlyArray, context: ParsingContext) {\n if (args.length !== 3) {\n return context.error(`Expected 2 arguments, but found ${args.length - 1} instead.`);\n }\n\n const needle = context.parse(args[1], 1, ValueType);\n\n const haystack = context.parse(args[2], 2, ValueType);\n\n if (!needle || !haystack) return null;\n\n if (!isValidType(needle.type, [BooleanType, StringType, NumberType, NullType, ValueType])) {\n return context.error(`Expected first argument to be of type boolean, string, number or null, but found ${toString(needle.type)} instead`);\n }\n\n return new In(needle, haystack);\n }\n\n evaluate(ctx: EvaluationContext) {\n const needle = (this.needle.evaluate(ctx): any);\n const haystack = (this.haystack.evaluate(ctx): any);\n\n if (!haystack) return false;\n\n if (!isValidNativeType(needle, ['boolean', 'string', 'number', 'null'])) {\n throw new RuntimeError(`Expected first argument to be of type boolean, string, number or null, but found ${toString(typeOf(needle))} instead.`);\n }\n\n if (!isValidNativeType(haystack, ['string', 'array'])) {\n throw new RuntimeError(`Expected second argument to be of type array or string, but found ${toString(typeOf(haystack))} instead.`);\n }\n\n return haystack.indexOf(needle) >= 0;\n }\n\n eachChild(fn: (_: Expression) => void) {\n fn(this.needle);\n fn(this.haystack);\n }\n\n outputDefined() {\n return true;\n }\n\n serialize() {\n return [\"in\", this.needle.serialize(), this.haystack.serialize()];\n }\n}\n\nexport default In;\n","// @flow\n\nimport {BooleanType, StringType, ValueType, NullType, toString, NumberType, isValidType, isValidNativeType} from '../types.js';\nimport RuntimeError from '../runtime_error.js';\nimport {typeOf} from '../values.js';\n\nimport type {Expression} from '../expression.js';\nimport type ParsingContext from '../parsing_context.js';\nimport type EvaluationContext from '../evaluation_context.js';\nimport type {Type} from '../types.js';\n\nclass IndexOf implements Expression {\n type: Type;\n needle: Expression;\n haystack: Expression;\n fromIndex: ?Expression;\n\n constructor(needle: Expression, haystack: Expression, fromIndex?: Expression) {\n this.type = NumberType;\n this.needle = needle;\n this.haystack = haystack;\n this.fromIndex = fromIndex;\n }\n\n static parse(args: $ReadOnlyArray, context: ParsingContext) {\n if (args.length <= 2 || args.length >= 5) {\n return context.error(`Expected 3 or 4 arguments, but found ${args.length - 1} instead.`);\n }\n\n const needle = context.parse(args[1], 1, ValueType);\n\n const haystack = context.parse(args[2], 2, ValueType);\n\n if (!needle || !haystack) return null;\n if (!isValidType(needle.type, [BooleanType, StringType, NumberType, NullType, ValueType])) {\n return context.error(`Expected first argument to be of type boolean, string, number or null, but found ${toString(needle.type)} instead`);\n }\n\n if (args.length === 4) {\n const fromIndex = context.parse(args[3], 3, NumberType);\n if (!fromIndex) return null;\n return new IndexOf(needle, haystack, fromIndex);\n } else {\n return new IndexOf(needle, haystack);\n }\n }\n\n evaluate(ctx: EvaluationContext) {\n const needle = (this.needle.evaluate(ctx): any);\n const haystack = (this.haystack.evaluate(ctx): any);\n\n if (!isValidNativeType(needle, ['boolean', 'string', 'number', 'null'])) {\n throw new RuntimeError(`Expected first argument to be of type boolean, string, number or null, but found ${toString(typeOf(needle))} instead.`);\n }\n\n if (!isValidNativeType(haystack, ['string', 'array'])) {\n throw new RuntimeError(`Expected second argument to be of type array or string, but found ${toString(typeOf(haystack))} instead.`);\n }\n\n if (this.fromIndex) {\n const fromIndex = (this.fromIndex.evaluate(ctx): number);\n return haystack.indexOf(needle, fromIndex);\n }\n\n return haystack.indexOf(needle);\n }\n\n eachChild(fn: (_: Expression) => void) {\n fn(this.needle);\n fn(this.haystack);\n if (this.fromIndex) {\n fn(this.fromIndex);\n }\n }\n\n outputDefined() {\n return false;\n }\n\n serialize() {\n if (this.fromIndex != null && this.fromIndex !== undefined) {\n const fromIndex = this.fromIndex.serialize();\n return [\"index-of\", this.needle.serialize(), this.haystack.serialize(), fromIndex];\n }\n return [\"index-of\", this.needle.serialize(), this.haystack.serialize()];\n }\n}\n\nexport default IndexOf;\n","// @flow\n\nimport assert from 'assert';\n\nimport {typeOf} from '../values.js';\nimport {ValueType, type Type} from '../types.js';\n\nimport type {Expression} from '../expression.js';\nimport type ParsingContext from '../parsing_context.js';\nimport type EvaluationContext from '../evaluation_context.js';\n\n// Map input label values to output expression index\ntype Cases = {[number | string]: number};\n\nclass Match implements Expression {\n type: Type;\n inputType: Type;\n\n input: Expression;\n cases: Cases;\n outputs: Array;\n otherwise: Expression;\n\n constructor(inputType: Type, outputType: Type, input: Expression, cases: Cases, outputs: Array, otherwise: Expression) {\n this.inputType = inputType;\n this.type = outputType;\n this.input = input;\n this.cases = cases;\n this.outputs = outputs;\n this.otherwise = otherwise;\n }\n\n static parse(args: $ReadOnlyArray, context: ParsingContext) {\n if (args.length < 5)\n return context.error(`Expected at least 4 arguments, but found only ${args.length - 1}.`);\n if (args.length % 2 !== 1)\n return context.error(`Expected an even number of arguments.`);\n\n let inputType;\n let outputType;\n if (context.expectedType && context.expectedType.kind !== 'value') {\n outputType = context.expectedType;\n }\n const cases = {};\n const outputs = [];\n for (let i = 2; i < args.length - 1; i += 2) {\n let labels = args[i];\n const value = args[i + 1];\n\n if (!Array.isArray(labels)) {\n labels = [labels];\n }\n\n const labelContext = context.concat(i);\n if (labels.length === 0) {\n return labelContext.error('Expected at least one branch label.');\n }\n\n for (const label of labels) {\n if (typeof label !== 'number' && typeof label !== 'string') {\n return labelContext.error(`Branch labels must be numbers or strings.`);\n } else if (typeof label === 'number' && Math.abs(label) > Number.MAX_SAFE_INTEGER) {\n return labelContext.error(`Branch labels must be integers no larger than ${Number.MAX_SAFE_INTEGER}.`);\n\n } else if (typeof label === 'number' && Math.floor(label) !== label) {\n return labelContext.error(`Numeric branch labels must be integer values.`);\n\n } else if (!inputType) {\n inputType = typeOf(label);\n } else if (labelContext.checkSubtype(inputType, typeOf(label))) {\n return null;\n }\n\n if (typeof cases[String(label)] !== 'undefined') {\n return labelContext.error('Branch labels must be unique.');\n }\n\n cases[String(label)] = outputs.length;\n }\n\n const result = context.parse(value, i, outputType);\n if (!result) return null;\n outputType = outputType || result.type;\n outputs.push(result);\n }\n\n const input = context.parse(args[1], 1, ValueType);\n if (!input) return null;\n\n const otherwise = context.parse(args[args.length - 1], args.length - 1, outputType);\n if (!otherwise) return null;\n\n assert(inputType && outputType);\n\n if (input.type.kind !== 'value' && context.concat(1).checkSubtype((inputType: any), input.type)) {\n return null;\n }\n\n return new Match((inputType: any), (outputType: any), input, cases, outputs, otherwise);\n }\n\n evaluate(ctx: EvaluationContext) {\n const input = (this.input.evaluate(ctx): any);\n const output = (typeOf(input) === this.inputType && this.outputs[this.cases[input]]) || this.otherwise;\n return output.evaluate(ctx);\n }\n\n eachChild(fn: (_: Expression) => void) {\n fn(this.input);\n this.outputs.forEach(fn);\n fn(this.otherwise);\n }\n\n outputDefined(): boolean {\n return this.outputs.every(out => out.outputDefined()) && this.otherwise.outputDefined();\n }\n\n serialize(): Array {\n const serialized = [\"match\", this.input.serialize()];\n\n // Sort so serialization has an arbitrary defined order, even though\n // branch order doesn't affect evaluation\n const sortedLabels = Object.keys(this.cases).sort();\n\n // Group branches by unique match expression to support condensed\n // serializations of the form [case1, case2, ...] -> matchExpression\n const groupedByOutput: Array<[number, Array]> = [];\n const outputLookup: {[index: number]: number} = {}; // lookup index into groupedByOutput for a given output expression\n for (const label of sortedLabels) {\n const outputIndex = outputLookup[this.cases[label]];\n if (outputIndex === undefined) {\n // First time seeing this output, add it to the end of the grouped list\n outputLookup[this.cases[label]] = groupedByOutput.length;\n groupedByOutput.push([this.cases[label], [label]]);\n } else {\n // We've seen this expression before, add the label to that output's group\n groupedByOutput[outputIndex][1].push(label);\n }\n }\n\n const coerceLabel = (label) => this.inputType.kind === 'number' ? Number(label) : label;\n\n for (const [outputIndex, labels] of groupedByOutput) {\n if (labels.length === 1) {\n // Only a single label matches this output expression\n serialized.push(coerceLabel(labels[0]));\n } else {\n // Array of literal labels pointing to this output expression\n serialized.push(labels.map(coerceLabel));\n }\n serialized.push(this.outputs[outputIndex].serialize());\n }\n serialized.push(this.otherwise.serialize());\n return serialized;\n }\n}\n\nexport default Match;\n","// @flow\n\nimport assert from 'assert';\n\nimport {BooleanType} from '../types.js';\n\nimport type {Expression} from '../expression.js';\nimport type ParsingContext from '../parsing_context.js';\nimport type EvaluationContext from '../evaluation_context.js';\nimport type {Type} from '../types.js';\n\ntype Branches = Array<[Expression, Expression]>;\n\nclass Case implements Expression {\n type: Type;\n\n branches: Branches;\n otherwise: Expression;\n\n constructor(type: Type, branches: Branches, otherwise: Expression) {\n this.type = type;\n this.branches = branches;\n this.otherwise = otherwise;\n }\n\n static parse(args: $ReadOnlyArray, context: ParsingContext) {\n if (args.length < 4)\n return context.error(`Expected at least 3 arguments, but found only ${args.length - 1}.`);\n if (args.length % 2 !== 0)\n return context.error(`Expected an odd number of arguments.`);\n\n let outputType: ?Type;\n if (context.expectedType && context.expectedType.kind !== 'value') {\n outputType = context.expectedType;\n }\n\n const branches = [];\n for (let i = 1; i < args.length - 1; i += 2) {\n const test = context.parse(args[i], i, BooleanType);\n if (!test) return null;\n\n const result = context.parse(args[i + 1], i + 1, outputType);\n if (!result) return null;\n\n branches.push([test, result]);\n\n outputType = outputType || result.type;\n }\n\n const otherwise = context.parse(args[args.length - 1], args.length - 1, outputType);\n if (!otherwise) return null;\n\n assert(outputType);\n return new Case((outputType: any), branches, otherwise);\n }\n\n evaluate(ctx: EvaluationContext) {\n for (const [test, expression] of this.branches) {\n if (test.evaluate(ctx)) {\n return expression.evaluate(ctx);\n }\n }\n return this.otherwise.evaluate(ctx);\n }\n\n eachChild(fn: (_: Expression) => void) {\n for (const [test, expression] of this.branches) {\n fn(test);\n fn(expression);\n }\n fn(this.otherwise);\n }\n\n outputDefined(): boolean {\n return this.branches.every(([_, out]) => out.outputDefined()) && this.otherwise.outputDefined();\n }\n\n serialize() {\n const serialized = [\"case\"];\n this.eachChild(child => { serialized.push(child.serialize()); });\n return serialized;\n }\n}\n\nexport default Case;\n","// @flow\n\nimport {ValueType, NumberType, StringType, array, toString, isValidType, isValidNativeType} from '../types.js';\nimport RuntimeError from '../runtime_error.js';\nimport {typeOf} from '../values.js';\n\nimport type {Expression} from '../expression.js';\nimport type ParsingContext from '../parsing_context.js';\nimport type EvaluationContext from '../evaluation_context.js';\nimport type {Type} from '../types.js';\n\nclass Slice implements Expression {\n type: Type;\n input: Expression;\n beginIndex: Expression;\n endIndex: ?Expression;\n\n constructor(type: Type, input: Expression, beginIndex: Expression, endIndex?: Expression) {\n this.type = type;\n this.input = input;\n this.beginIndex = beginIndex;\n this.endIndex = endIndex;\n\n }\n\n static parse(args: $ReadOnlyArray, context: ParsingContext) {\n if (args.length <= 2 || args.length >= 5) {\n return context.error(`Expected 3 or 4 arguments, but found ${args.length - 1} instead.`);\n }\n\n const input = context.parse(args[1], 1, ValueType);\n const beginIndex = context.parse(args[2], 2, NumberType);\n\n if (!input || !beginIndex) return null;\n\n if (!isValidType(input.type, [array(ValueType), StringType, ValueType])) {\n return context.error(`Expected first argument to be of type array or string, but found ${toString(input.type)} instead`);\n }\n\n if (args.length === 4) {\n const endIndex = context.parse(args[3], 3, NumberType);\n if (!endIndex) return null;\n return new Slice(input.type, input, beginIndex, endIndex);\n } else {\n return new Slice(input.type, input, beginIndex);\n }\n }\n\n evaluate(ctx: EvaluationContext) {\n const input = (this.input.evaluate(ctx): any);\n const beginIndex = (this.beginIndex.evaluate(ctx): number);\n\n if (!isValidNativeType(input, ['string', 'array'])) {\n throw new RuntimeError(`Expected first argument to be of type array or string, but found ${toString(typeOf(input))} instead.`);\n }\n\n if (this.endIndex) {\n const endIndex = (this.endIndex.evaluate(ctx): number);\n return input.slice(beginIndex, endIndex);\n }\n\n return input.slice(beginIndex);\n }\n\n eachChild(fn: (_: Expression) => void) {\n fn(this.input);\n fn(this.beginIndex);\n if (this.endIndex) {\n fn(this.endIndex);\n }\n }\n\n outputDefined() {\n return false;\n }\n\n serialize() {\n if (this.endIndex != null && this.endIndex !== undefined) {\n const endIndex = this.endIndex.serialize();\n return [\"slice\", this.input.serialize(), this.beginIndex.serialize(), endIndex];\n }\n return [\"slice\", this.input.serialize(), this.beginIndex.serialize()];\n }\n}\n\nexport default Slice;\n","// @flow\n\nimport {toString, ValueType, BooleanType, CollatorType} from '../types.js';\nimport Assertion from './assertion.js';\nimport {typeOf} from '../values.js';\nimport RuntimeError from '../runtime_error.js';\n\nimport type {Expression} from '../expression.js';\nimport type EvaluationContext from '../evaluation_context.js';\nimport type ParsingContext from '../parsing_context.js';\nimport type {Type} from '../types.js';\n\ntype ComparisonOperator = '==' | '!=' | '<' | '>' | '<=' | '>=' ;\n\nfunction isComparableType(op: ComparisonOperator, type: Type) {\n if (op === '==' || op === '!=') {\n // equality operator\n return type.kind === 'boolean' ||\n type.kind === 'string' ||\n type.kind === 'number' ||\n type.kind === 'null' ||\n type.kind === 'value';\n } else {\n // ordering operator\n return type.kind === 'string' ||\n type.kind === 'number' ||\n type.kind === 'value';\n }\n}\n\nfunction eq(ctx, a, b) { return a === b; }\nfunction neq(ctx, a, b) { return a !== b; }\nfunction lt(ctx, a, b) { return a < b; }\nfunction gt(ctx, a, b) { return a > b; }\nfunction lteq(ctx, a, b) { return a <= b; }\nfunction gteq(ctx, a, b) { return a >= b; }\n\nfunction eqCollate(ctx, a, b, c) { return c.compare(a, b) === 0; }\nfunction neqCollate(ctx, a, b, c) { return !eqCollate(ctx, a, b, c); }\nfunction ltCollate(ctx, a, b, c) { return c.compare(a, b) < 0; }\nfunction gtCollate(ctx, a, b, c) { return c.compare(a, b) > 0; }\nfunction lteqCollate(ctx, a, b, c) { return c.compare(a, b) <= 0; }\nfunction gteqCollate(ctx, a, b, c) { return c.compare(a, b) >= 0; }\n\n/**\n * Special form for comparison operators, implementing the signatures:\n * - (T, T, ?Collator) => boolean\n * - (T, value, ?Collator) => boolean\n * - (value, T, ?Collator) => boolean\n *\n * For inequalities, T must be either value, string, or number. For ==/!=, it\n * can also be boolean or null.\n *\n * Equality semantics are equivalent to Javascript's strict equality (===/!==)\n * -- i.e., when the arguments' types don't match, == evaluates to false, != to\n * true.\n *\n * When types don't match in an ordering comparison, a runtime error is thrown.\n *\n * @private\n */\nfunction makeComparison(op: ComparisonOperator, compareBasic, compareWithCollator) {\n const isOrderComparison = op !== '==' && op !== '!=';\n\n return class Comparison implements Expression {\n type: Type;\n lhs: Expression;\n rhs: Expression;\n collator: ?Expression;\n hasUntypedArgument: boolean;\n\n constructor(lhs: Expression, rhs: Expression, collator: ?Expression) {\n this.type = BooleanType;\n this.lhs = lhs;\n this.rhs = rhs;\n this.collator = collator;\n this.hasUntypedArgument = lhs.type.kind === 'value' || rhs.type.kind === 'value';\n }\n\n static parse(args: $ReadOnlyArray, context: ParsingContext): ?Expression {\n if (args.length !== 3 && args.length !== 4)\n return context.error(`Expected two or three arguments.`);\n\n const op: ComparisonOperator = (args[0]: any);\n\n let lhs = context.parse(args[1], 1, ValueType);\n if (!lhs) return null;\n if (!isComparableType(op, lhs.type)) {\n return context.concat(1).error(`\"${op}\" comparisons are not supported for type '${toString(lhs.type)}'.`);\n }\n let rhs = context.parse(args[2], 2, ValueType);\n if (!rhs) return null;\n if (!isComparableType(op, rhs.type)) {\n return context.concat(2).error(`\"${op}\" comparisons are not supported for type '${toString(rhs.type)}'.`);\n }\n\n if (\n lhs.type.kind !== rhs.type.kind &&\n lhs.type.kind !== 'value' &&\n rhs.type.kind !== 'value'\n ) {\n return context.error(`Cannot compare types '${toString(lhs.type)}' and '${toString(rhs.type)}'.`);\n }\n\n if (isOrderComparison) {\n // typing rules specific to less/greater than operators\n if (lhs.type.kind === 'value' && rhs.type.kind !== 'value') {\n // (value, T)\n lhs = new Assertion(rhs.type, [lhs]);\n } else if (lhs.type.kind !== 'value' && rhs.type.kind === 'value') {\n // (T, value)\n rhs = new Assertion(lhs.type, [rhs]);\n }\n }\n\n let collator = null;\n if (args.length === 4) {\n if (\n lhs.type.kind !== 'string' &&\n rhs.type.kind !== 'string' &&\n lhs.type.kind !== 'value' &&\n rhs.type.kind !== 'value'\n ) {\n return context.error(`Cannot use collator to compare non-string types.`);\n }\n collator = context.parse(args[3], 3, CollatorType);\n if (!collator) return null;\n }\n\n return new Comparison(lhs, rhs, collator);\n }\n\n evaluate(ctx: EvaluationContext) {\n const lhs = this.lhs.evaluate(ctx);\n const rhs = this.rhs.evaluate(ctx);\n\n if (isOrderComparison && this.hasUntypedArgument) {\n const lt = typeOf(lhs);\n const rt = typeOf(rhs);\n // check that type is string or number, and equal\n if (lt.kind !== rt.kind || !(lt.kind === 'string' || lt.kind === 'number')) {\n throw new RuntimeError(`Expected arguments for \"${op}\" to be (string, string) or (number, number), but found (${lt.kind}, ${rt.kind}) instead.`);\n }\n }\n\n if (this.collator && !isOrderComparison && this.hasUntypedArgument) {\n const lt = typeOf(lhs);\n const rt = typeOf(rhs);\n if (lt.kind !== 'string' || rt.kind !== 'string') {\n return compareBasic(ctx, lhs, rhs);\n }\n }\n\n return this.collator ?\n compareWithCollator(ctx, lhs, rhs, this.collator.evaluate(ctx)) :\n compareBasic(ctx, lhs, rhs);\n }\n\n eachChild(fn: (_: Expression) => void) {\n fn(this.lhs);\n fn(this.rhs);\n if (this.collator) {\n fn(this.collator);\n }\n }\n\n outputDefined(): boolean {\n return true;\n }\n\n serialize() {\n const serialized = [op];\n this.eachChild(child => { serialized.push(child.serialize()); });\n return serialized;\n }\n };\n}\n\nexport const Equals = makeComparison('==', eq, eqCollate);\nexport const NotEquals = makeComparison('!=', neq, neqCollate);\nexport const LessThan = makeComparison('<', lt, ltCollate);\nexport const GreaterThan = makeComparison('>', gt, gtCollate);\nexport const LessThanOrEqual = makeComparison('<=', lteq, lteqCollate);\nexport const GreaterThanOrEqual = makeComparison('>=', gteq, gteqCollate);\n","// @flow\n\nimport {StringType, NumberType} from '../types.js';\n\nimport type {Expression} from '../expression.js';\nimport type EvaluationContext from '../evaluation_context.js';\nimport type ParsingContext from '../parsing_context.js';\nimport type {Type} from '../types.js';\n\ndeclare var Intl: {\n NumberFormat: Class\n};\n\ndeclare class Intl$NumberFormat {\n constructor (\n locales?: string | string[],\n options?: NumberFormatOptions\n ): Intl$NumberFormat;\n\n static (\n locales?: string | string[],\n options?: NumberFormatOptions\n ): Intl$NumberFormat;\n\n format(a: number): string;\n\n resolvedOptions(): any;\n}\n\ntype NumberFormatOptions = {\n style?: 'decimal' | 'currency' | 'percent';\n currency?: null | string;\n minimumFractionDigits?: null | string;\n maximumFractionDigits?: null | string;\n};\n\nexport default class NumberFormat implements Expression {\n type: Type;\n number: Expression;\n locale: Expression | null; // BCP 47 language tag\n currency: Expression | null; // ISO 4217 currency code, required if style=currency\n minFractionDigits: Expression | null; // Default 0\n maxFractionDigits: Expression | null; // Default 3\n\n constructor(number: Expression,\n locale: Expression | null,\n currency: Expression | null,\n minFractionDigits: Expression | null,\n maxFractionDigits: Expression | null) {\n this.type = StringType;\n this.number = number;\n this.locale = locale;\n this.currency = currency;\n this.minFractionDigits = minFractionDigits;\n this.maxFractionDigits = maxFractionDigits;\n }\n\n static parse(args: $ReadOnlyArray, context: ParsingContext): ?Expression {\n if (args.length !== 3)\n return context.error(`Expected two arguments.`);\n\n const number = context.parse(args[1], 1, NumberType);\n if (!number) return null;\n\n const options = (args[2]: any);\n if (typeof options !== \"object\" || Array.isArray(options))\n return context.error(`NumberFormat options argument must be an object.`);\n\n let locale = null;\n if (options['locale']) {\n locale = context.parse(options['locale'], 1, StringType);\n if (!locale) return null;\n }\n\n let currency = null;\n if (options['currency']) {\n currency = context.parse(options['currency'], 1, StringType);\n if (!currency) return null;\n }\n\n let minFractionDigits = null;\n if (options['min-fraction-digits']) {\n minFractionDigits = context.parse(options['min-fraction-digits'], 1, NumberType);\n if (!minFractionDigits) return null;\n }\n\n let maxFractionDigits = null;\n if (options['max-fraction-digits']) {\n maxFractionDigits = context.parse(options['max-fraction-digits'], 1, NumberType);\n if (!maxFractionDigits) return null;\n }\n\n return new NumberFormat(number, locale, currency, minFractionDigits, maxFractionDigits);\n }\n\n evaluate(ctx: EvaluationContext) {\n return new Intl.NumberFormat(this.locale ? this.locale.evaluate(ctx) : [],\n {\n style: this.currency ? \"currency\" : \"decimal\",\n currency: this.currency ? this.currency.evaluate(ctx) : undefined,\n minimumFractionDigits: this.minFractionDigits ? this.minFractionDigits.evaluate(ctx) : undefined,\n maximumFractionDigits: this.maxFractionDigits ? this.maxFractionDigits.evaluate(ctx) : undefined,\n }).format(this.number.evaluate(ctx));\n }\n\n eachChild(fn: (_: Expression) => void) {\n fn(this.number);\n if (this.locale) {\n fn(this.locale);\n }\n if (this.currency) {\n fn(this.currency);\n }\n if (this.minFractionDigits) {\n fn(this.minFractionDigits);\n }\n if (this.maxFractionDigits) {\n fn(this.maxFractionDigits);\n }\n }\n\n outputDefined() {\n return false;\n }\n\n serialize() {\n const options = {};\n if (this.locale) {\n options['locale'] = this.locale.serialize();\n }\n if (this.currency) {\n options['currency'] = this.currency.serialize();\n }\n if (this.minFractionDigits) {\n options['min-fraction-digits'] = this.minFractionDigits.serialize();\n }\n if (this.maxFractionDigits) {\n options['max-fraction-digits'] = this.maxFractionDigits.serialize();\n }\n return [\"number-format\", this.number.serialize(), options];\n }\n}\n","// @flow\n\nimport {\n type Type,\n NumberType,\n StringType,\n BooleanType,\n ColorType,\n ObjectType,\n ValueType,\n ErrorType,\n CollatorType,\n array,\n toString as typeToString\n} from '../types.js';\n\nimport {typeOf, Color, validateRGBA, toString as valueToString} from '../values.js';\nimport CompoundExpression from '../compound_expression.js';\nimport RuntimeError from '../runtime_error.js';\nimport Let from './let.js';\nimport Var from './var.js';\nimport Literal from './literal.js';\nimport Assertion from './assertion.js';\nimport Coercion from './coercion.js';\nimport At from './at.js';\nimport In from './in.js';\nimport IndexOf from './index_of.js';\nimport Match from './match.js';\nimport Case from './case.js';\nimport Slice from './slice.js';\nimport Step from './step.js';\nimport Interpolate from './interpolate.js';\nimport Coalesce from './coalesce.js';\nimport {\n Equals,\n NotEquals,\n LessThan,\n GreaterThan,\n LessThanOrEqual,\n GreaterThanOrEqual\n} from './comparison.js';\nimport CollatorExpression from './collator.js';\nimport NumberFormat from './number_format.js';\nimport FormatExpression from './format.js';\nimport ImageExpression from './image.js';\nimport Length from './length.js';\nimport Within from './within.js';\n\nimport type {Varargs} from '../compound_expression.js';\nimport type {ExpressionRegistry} from '../expression.js';\n\nconst expressions: ExpressionRegistry = {\n // special forms\n '==': Equals,\n '!=': NotEquals,\n '>': GreaterThan,\n '<': LessThan,\n '>=': GreaterThanOrEqual,\n '<=': LessThanOrEqual,\n 'array': Assertion,\n 'at': At,\n 'boolean': Assertion,\n 'case': Case,\n 'coalesce': Coalesce,\n 'collator': CollatorExpression,\n 'format': FormatExpression,\n 'image': ImageExpression,\n 'in': In,\n 'index-of': IndexOf,\n 'interpolate': Interpolate,\n 'interpolate-hcl': Interpolate,\n 'interpolate-lab': Interpolate,\n 'length': Length,\n 'let': Let,\n 'literal': Literal,\n 'match': Match,\n 'number': Assertion,\n 'number-format': NumberFormat,\n 'object': Assertion,\n 'slice': Slice,\n 'step': Step,\n 'string': Assertion,\n 'to-boolean': Coercion,\n 'to-color': Coercion,\n 'to-number': Coercion,\n 'to-string': Coercion,\n 'var': Var,\n 'within': Within\n};\n\nfunction rgba(ctx, [r, g, b, a]) {\n r = r.evaluate(ctx);\n g = g.evaluate(ctx);\n b = b.evaluate(ctx);\n const alpha = a ? a.evaluate(ctx) : 1;\n const error = validateRGBA(r, g, b, alpha);\n if (error) throw new RuntimeError(error);\n return new Color(r / 255 * alpha, g / 255 * alpha, b / 255 * alpha, alpha);\n}\n\nfunction has(key, obj) {\n return key in obj;\n}\n\nfunction get(key, obj) {\n const v = obj[key];\n return typeof v === 'undefined' ? null : v;\n}\n\nfunction binarySearch(v, a, i, j) {\n while (i <= j) {\n const m = (i + j) >> 1;\n if (a[m] === v)\n return true;\n if (a[m] > v)\n j = m - 1;\n else\n i = m + 1;\n }\n return false;\n}\n\nfunction varargs(type: Type): Varargs {\n return {type};\n}\n\nCompoundExpression.register(expressions, {\n 'error': [\n ErrorType,\n [StringType],\n (ctx, [v]) => { throw new RuntimeError(v.evaluate(ctx)); }\n ],\n 'typeof': [\n StringType,\n [ValueType],\n (ctx, [v]) => typeToString(typeOf(v.evaluate(ctx)))\n ],\n 'to-rgba': [\n array(NumberType, 4),\n [ColorType],\n (ctx, [v]) => {\n return v.evaluate(ctx).toArray();\n }\n ],\n 'rgb': [\n ColorType,\n [NumberType, NumberType, NumberType],\n rgba\n ],\n 'rgba': [\n ColorType,\n [NumberType, NumberType, NumberType, NumberType],\n rgba\n ],\n 'has': {\n type: BooleanType,\n overloads: [\n [\n [StringType],\n (ctx, [key]) => has(key.evaluate(ctx), ctx.properties())\n ], [\n [StringType, ObjectType],\n (ctx, [key, obj]) => has(key.evaluate(ctx), obj.evaluate(ctx))\n ]\n ]\n },\n 'get': {\n type: ValueType,\n overloads: [\n [\n [StringType],\n (ctx, [key]) => get(key.evaluate(ctx), ctx.properties())\n ], [\n [StringType, ObjectType],\n (ctx, [key, obj]) => get(key.evaluate(ctx), obj.evaluate(ctx))\n ]\n ]\n },\n 'feature-state': [\n ValueType,\n [StringType],\n (ctx, [key]) => get(key.evaluate(ctx), ctx.featureState || {})\n ],\n 'properties': [\n ObjectType,\n [],\n (ctx) => ctx.properties()\n ],\n 'geometry-type': [\n StringType,\n [],\n (ctx) => ctx.geometryType()\n ],\n 'id': [\n ValueType,\n [],\n (ctx) => ctx.id()\n ],\n 'zoom': [\n NumberType,\n [],\n (ctx) => ctx.globals.zoom\n ],\n 'heatmap-density': [\n NumberType,\n [],\n (ctx) => ctx.globals.heatmapDensity || 0\n ],\n 'line-progress': [\n NumberType,\n [],\n (ctx) => ctx.globals.lineProgress || 0\n ],\n 'sky-radial-progress': [\n NumberType,\n [],\n (ctx) => ctx.globals.skyRadialProgress || 0\n ],\n 'accumulated': [\n ValueType,\n [],\n (ctx) => ctx.globals.accumulated === undefined ? null : ctx.globals.accumulated\n ],\n '+': [\n NumberType,\n varargs(NumberType),\n (ctx, args) => {\n let result = 0;\n for (const arg of args) {\n result += arg.evaluate(ctx);\n }\n return result;\n }\n ],\n '*': [\n NumberType,\n varargs(NumberType),\n (ctx, args) => {\n let result = 1;\n for (const arg of args) {\n result *= arg.evaluate(ctx);\n }\n return result;\n }\n ],\n '-': {\n type: NumberType,\n overloads: [\n [\n [NumberType, NumberType],\n (ctx, [a, b]) => a.evaluate(ctx) - b.evaluate(ctx)\n ], [\n [NumberType],\n (ctx, [a]) => -a.evaluate(ctx)\n ]\n ]\n },\n '/': [\n NumberType,\n [NumberType, NumberType],\n (ctx, [a, b]) => a.evaluate(ctx) / b.evaluate(ctx)\n ],\n '%': [\n NumberType,\n [NumberType, NumberType],\n (ctx, [a, b]) => a.evaluate(ctx) % b.evaluate(ctx)\n ],\n 'ln2': [\n NumberType,\n [],\n () => Math.LN2\n ],\n 'pi': [\n NumberType,\n [],\n () => Math.PI\n ],\n 'e': [\n NumberType,\n [],\n () => Math.E\n ],\n '^': [\n NumberType,\n [NumberType, NumberType],\n (ctx, [b, e]) => Math.pow(b.evaluate(ctx), e.evaluate(ctx))\n ],\n 'sqrt': [\n NumberType,\n [NumberType],\n (ctx, [x]) => Math.sqrt(x.evaluate(ctx))\n ],\n 'log10': [\n NumberType,\n [NumberType],\n (ctx, [n]) => Math.log(n.evaluate(ctx)) / Math.LN10\n ],\n 'ln': [\n NumberType,\n [NumberType],\n (ctx, [n]) => Math.log(n.evaluate(ctx))\n ],\n 'log2': [\n NumberType,\n [NumberType],\n (ctx, [n]) => Math.log(n.evaluate(ctx)) / Math.LN2\n ],\n 'sin': [\n NumberType,\n [NumberType],\n (ctx, [n]) => Math.sin(n.evaluate(ctx))\n ],\n 'cos': [\n NumberType,\n [NumberType],\n (ctx, [n]) => Math.cos(n.evaluate(ctx))\n ],\n 'tan': [\n NumberType,\n [NumberType],\n (ctx, [n]) => Math.tan(n.evaluate(ctx))\n ],\n 'asin': [\n NumberType,\n [NumberType],\n (ctx, [n]) => Math.asin(n.evaluate(ctx))\n ],\n 'acos': [\n NumberType,\n [NumberType],\n (ctx, [n]) => Math.acos(n.evaluate(ctx))\n ],\n 'atan': [\n NumberType,\n [NumberType],\n (ctx, [n]) => Math.atan(n.evaluate(ctx))\n ],\n 'min': [\n NumberType,\n varargs(NumberType),\n (ctx, args) => Math.min(...args.map(arg => arg.evaluate(ctx)))\n ],\n 'max': [\n NumberType,\n varargs(NumberType),\n (ctx, args) => Math.max(...args.map(arg => arg.evaluate(ctx)))\n ],\n 'abs': [\n NumberType,\n [NumberType],\n (ctx, [n]) => Math.abs(n.evaluate(ctx))\n ],\n 'round': [\n NumberType,\n [NumberType],\n (ctx, [n]) => {\n const v = n.evaluate(ctx);\n // Javascript's Math.round() rounds towards +Infinity for halfway\n // values, even when they're negative. It's more common to round\n // away from 0 (e.g., this is what python and C++ do)\n return v < 0 ? -Math.round(-v) : Math.round(v);\n }\n ],\n 'floor': [\n NumberType,\n [NumberType],\n (ctx, [n]) => Math.floor(n.evaluate(ctx))\n ],\n 'ceil': [\n NumberType,\n [NumberType],\n (ctx, [n]) => Math.ceil(n.evaluate(ctx))\n ],\n 'filter-==': [\n BooleanType,\n [StringType, ValueType],\n (ctx, [k, v]) => ctx.properties()[(k: any).value] === (v: any).value\n ],\n 'filter-id-==': [\n BooleanType,\n [ValueType],\n (ctx, [v]) => ctx.id() === (v: any).value\n ],\n 'filter-type-==': [\n BooleanType,\n [StringType],\n (ctx, [v]) => ctx.geometryType() === (v: any).value\n ],\n 'filter-<': [\n BooleanType,\n [StringType, ValueType],\n (ctx, [k, v]) => {\n const a = ctx.properties()[(k: any).value];\n const b = (v: any).value;\n return typeof a === typeof b && a < b;\n }\n ],\n 'filter-id-<': [\n BooleanType,\n [ValueType],\n (ctx, [v]) => {\n const a = ctx.id();\n const b = (v: any).value;\n return typeof a === typeof b && a < b;\n }\n ],\n 'filter->': [\n BooleanType,\n [StringType, ValueType],\n (ctx, [k, v]) => {\n const a = ctx.properties()[(k: any).value];\n const b = (v: any).value;\n return typeof a === typeof b && a > b;\n }\n ],\n 'filter-id->': [\n BooleanType,\n [ValueType],\n (ctx, [v]) => {\n const a = ctx.id();\n const b = (v: any).value;\n return typeof a === typeof b && a > b;\n }\n ],\n 'filter-<=': [\n BooleanType,\n [StringType, ValueType],\n (ctx, [k, v]) => {\n const a = ctx.properties()[(k: any).value];\n const b = (v: any).value;\n return typeof a === typeof b && a <= b;\n }\n ],\n 'filter-id-<=': [\n BooleanType,\n [ValueType],\n (ctx, [v]) => {\n const a = ctx.id();\n const b = (v: any).value;\n return typeof a === typeof b && a <= b;\n }\n ],\n 'filter->=': [\n BooleanType,\n [StringType, ValueType],\n (ctx, [k, v]) => {\n const a = ctx.properties()[(k: any).value];\n const b = (v: any).value;\n return typeof a === typeof b && a >= b;\n }\n ],\n 'filter-id->=': [\n BooleanType,\n [ValueType],\n (ctx, [v]) => {\n const a = ctx.id();\n const b = (v: any).value;\n return typeof a === typeof b && a >= b;\n }\n ],\n 'filter-has': [\n BooleanType,\n [ValueType],\n (ctx, [k]) => (k: any).value in ctx.properties()\n ],\n 'filter-has-id': [\n BooleanType,\n [],\n (ctx) => (ctx.id() !== null && ctx.id() !== undefined)\n ],\n 'filter-type-in': [\n BooleanType,\n [array(StringType)],\n (ctx, [v]) => (v: any).value.indexOf(ctx.geometryType()) >= 0\n ],\n 'filter-id-in': [\n BooleanType,\n [array(ValueType)],\n (ctx, [v]) => (v: any).value.indexOf(ctx.id()) >= 0\n ],\n 'filter-in-small': [\n BooleanType,\n [StringType, array(ValueType)],\n // assumes v is an array literal\n (ctx, [k, v]) => (v: any).value.indexOf(ctx.properties()[(k: any).value]) >= 0\n ],\n 'filter-in-large': [\n BooleanType,\n [StringType, array(ValueType)],\n // assumes v is a array literal with values sorted in ascending order and of a single type\n (ctx, [k, v]) => binarySearch(ctx.properties()[(k: any).value], (v: any).value, 0, (v: any).value.length - 1)\n ],\n 'all': {\n type: BooleanType,\n overloads: [\n [\n [BooleanType, BooleanType],\n (ctx, [a, b]) => a.evaluate(ctx) && b.evaluate(ctx)\n ],\n [\n varargs(BooleanType),\n (ctx, args) => {\n for (const arg of args) {\n if (!arg.evaluate(ctx))\n return false;\n }\n return true;\n }\n ]\n ]\n },\n 'any': {\n type: BooleanType,\n overloads: [\n [\n [BooleanType, BooleanType],\n (ctx, [a, b]) => a.evaluate(ctx) || b.evaluate(ctx)\n ],\n [\n varargs(BooleanType),\n (ctx, args) => {\n for (const arg of args) {\n if (arg.evaluate(ctx))\n return true;\n }\n return false;\n }\n ]\n ]\n },\n '!': [\n BooleanType,\n [BooleanType],\n (ctx, [b]) => !b.evaluate(ctx)\n ],\n 'is-supported-script': [\n BooleanType,\n [StringType],\n // At parse time this will always return true, so we need to exclude this expression with isGlobalPropertyConstant\n (ctx, [s]) => {\n const isSupportedScript = ctx.globals && ctx.globals.isSupportedScript;\n if (isSupportedScript) {\n return isSupportedScript(s.evaluate(ctx));\n }\n return true;\n }\n ],\n 'upcase': [\n StringType,\n [StringType],\n (ctx, [s]) => s.evaluate(ctx).toUpperCase()\n ],\n 'downcase': [\n StringType,\n [StringType],\n (ctx, [s]) => s.evaluate(ctx).toLowerCase()\n ],\n 'concat': [\n StringType,\n varargs(ValueType),\n (ctx, args) => args.map(arg => valueToString(arg.evaluate(ctx))).join('')\n ],\n 'resolved-locale': [\n StringType,\n [CollatorType],\n (ctx, [collator]) => collator.evaluate(ctx).resolvedLocale()\n ]\n});\n\nexport default expressions;\n","// @flow\n\nimport {NumberType, toString} from '../types.js';\n\nimport {typeOf} from '../values.js';\nimport RuntimeError from '../runtime_error.js';\n\nimport type {Expression} from '../expression.js';\nimport type ParsingContext from '../parsing_context.js';\nimport type EvaluationContext from '../evaluation_context.js';\nimport type {Type} from '../types.js';\n\nclass Length implements Expression {\n type: Type;\n input: Expression;\n\n constructor(input: Expression) {\n this.type = NumberType;\n this.input = input;\n }\n\n static parse(args: $ReadOnlyArray, context: ParsingContext) {\n if (args.length !== 2)\n return context.error(`Expected 1 argument, but found ${args.length - 1} instead.`);\n\n const input = context.parse(args[1], 1);\n if (!input) return null;\n\n if (input.type.kind !== 'array' && input.type.kind !== 'string' && input.type.kind !== 'value')\n return context.error(`Expected argument of type string or array, but found ${toString(input.type)} instead.`);\n\n return new Length(input);\n }\n\n evaluate(ctx: EvaluationContext) {\n const input = this.input.evaluate(ctx);\n if (typeof input === 'string') {\n return input.length;\n } else if (Array.isArray(input)) {\n return input.length;\n } else {\n throw new RuntimeError(`Expected value to be of type string or array, but found ${toString(typeOf(input))} instead.`);\n }\n }\n\n eachChild(fn: (_: Expression) => void) {\n fn(this.input);\n }\n\n outputDefined() {\n return false;\n }\n\n serialize() {\n const serialized = [\"length\"];\n this.eachChild(child => { serialized.push(child.serialize()); });\n return serialized;\n }\n}\n\nexport default Length;\n","// @flow\n\n/**\n * A type used for returning and propagating errors. The first element of the union\n * represents success and contains a value, and the second represents an error and\n * contains an error value.\n * @private\n */\nexport type Result =\n | {| result: 'success', value: T |}\n | {| result: 'error', value: E |};\n\nexport function success(value: T): Result {\n return {result: 'success', value};\n}\n\nexport function error(value: E): Result {\n return {result: 'error', value};\n}\n","// @flow\n\nimport type {StylePropertySpecification} from '../style-spec.js';\n\nexport function supportsPropertyExpression(spec: StylePropertySpecification): boolean {\n return spec['property-type'] === 'data-driven' || spec['property-type'] === 'cross-faded-data-driven';\n}\n\nexport function supportsZoomExpression(spec: StylePropertySpecification): boolean {\n return !!spec.expression && spec.expression.parameters.indexOf('zoom') > -1;\n}\n\nexport function supportsInterpolation(spec: StylePropertySpecification): boolean {\n return !!spec.expression && spec.expression.interpolated;\n}\n","// @flow\n\nexport default function getType(val: mixed): string {\n if (val instanceof Number) {\n return 'number';\n } else if (val instanceof String) {\n return 'string';\n } else if (val instanceof Boolean) {\n return 'boolean';\n } else if (Array.isArray(val)) {\n return 'array';\n } else if (val === null) {\n return 'null';\n } else {\n return typeof val;\n }\n}\n","\nimport * as colorSpaces from '../util/color_spaces.js';\nimport Color from '../util/color.js';\nimport extend from '../util/extend.js';\nimport getType from '../util/get_type.js';\nimport * as interpolate from '../util/interpolate.js';\nimport Interpolate from '../expression/definitions/interpolate.js';\nimport Formatted from '../expression/types/formatted.js';\nimport ResolvedImage from '../expression/types/resolved_image.js';\nimport {supportsInterpolation} from '../util/properties.js';\nimport {findStopLessThanOrEqualTo} from '../expression/stops.js';\n\nexport function isFunction(value) {\n return typeof value === 'object' && value !== null && !Array.isArray(value);\n}\n\nfunction identityFunction(x) {\n return x;\n}\n\nexport function createFunction(parameters, propertySpec) {\n const isColor = propertySpec.type === 'color';\n const zoomAndFeatureDependent = parameters.stops && typeof parameters.stops[0][0] === 'object';\n const featureDependent = zoomAndFeatureDependent || parameters.property !== undefined;\n const zoomDependent = zoomAndFeatureDependent || !featureDependent;\n const type = parameters.type || (supportsInterpolation(propertySpec) ? 'exponential' : 'interval');\n\n if (isColor) {\n parameters = extend({}, parameters);\n\n if (parameters.stops) {\n parameters.stops = parameters.stops.map((stop) => {\n return [stop[0], Color.parse(stop[1])];\n });\n }\n\n if (parameters.default) {\n parameters.default = Color.parse(parameters.default);\n } else {\n parameters.default = Color.parse(propertySpec.default);\n }\n }\n\n if (parameters.colorSpace && parameters.colorSpace !== 'rgb' && !colorSpaces[parameters.colorSpace]) { // eslint-disable-line import/namespace\n throw new Error(`Unknown color space: ${parameters.colorSpace}`);\n }\n\n let innerFun;\n let hashedStops;\n let categoricalKeyType;\n if (type === 'exponential') {\n innerFun = evaluateExponentialFunction;\n } else if (type === 'interval') {\n innerFun = evaluateIntervalFunction;\n } else if (type === 'categorical') {\n innerFun = evaluateCategoricalFunction;\n\n // For categorical functions, generate an Object as a hashmap of the stops for fast searching\n hashedStops = Object.create(null);\n for (const stop of parameters.stops) {\n hashedStops[stop[0]] = stop[1];\n }\n\n // Infer key type based on first stop key-- used to encforce strict type checking later\n categoricalKeyType = typeof parameters.stops[0][0];\n\n } else if (type === 'identity') {\n innerFun = evaluateIdentityFunction;\n } else {\n throw new Error(`Unknown function type \"${type}\"`);\n }\n\n if (zoomAndFeatureDependent) {\n const featureFunctions = {};\n const zoomStops = [];\n for (let s = 0; s < parameters.stops.length; s++) {\n const stop = parameters.stops[s];\n const zoom = stop[0].zoom;\n if (featureFunctions[zoom] === undefined) {\n featureFunctions[zoom] = {\n zoom,\n type: parameters.type,\n property: parameters.property,\n default: parameters.default,\n stops: []\n };\n zoomStops.push(zoom);\n }\n featureFunctions[zoom].stops.push([stop[0].value, stop[1]]);\n }\n\n const featureFunctionStops = [];\n for (const z of zoomStops) {\n featureFunctionStops.push([featureFunctions[z].zoom, createFunction(featureFunctions[z], propertySpec)]);\n }\n\n const interpolationType = {name: 'linear'};\n return {\n kind: 'composite',\n interpolationType,\n interpolationFactor: Interpolate.interpolationFactor.bind(undefined, interpolationType),\n zoomStops: featureFunctionStops.map(s => s[0]),\n evaluate({zoom}, properties) {\n return evaluateExponentialFunction({\n stops: featureFunctionStops,\n base: parameters.base\n }, propertySpec, zoom).evaluate(zoom, properties);\n }\n };\n } else if (zoomDependent) {\n const interpolationType = type === 'exponential' ?\n {name: 'exponential', base: parameters.base !== undefined ? parameters.base : 1} : null;\n return {\n kind: 'camera',\n interpolationType,\n interpolationFactor: Interpolate.interpolationFactor.bind(undefined, interpolationType),\n zoomStops: parameters.stops.map(s => s[0]),\n evaluate: ({zoom}) => innerFun(parameters, propertySpec, zoom, hashedStops, categoricalKeyType)\n };\n } else {\n return {\n kind: 'source',\n evaluate(_, feature) {\n const value = feature && feature.properties ? feature.properties[parameters.property] : undefined;\n if (value === undefined) {\n return coalesce(parameters.default, propertySpec.default);\n }\n return innerFun(parameters, propertySpec, value, hashedStops, categoricalKeyType);\n }\n };\n }\n}\n\nfunction coalesce(a, b, c) {\n if (a !== undefined) return a;\n if (b !== undefined) return b;\n if (c !== undefined) return c;\n}\n\nfunction evaluateCategoricalFunction(parameters, propertySpec, input, hashedStops, keyType) {\n const evaluated = typeof input === keyType ? hashedStops[input] : undefined; // Enforce strict typing on input\n return coalesce(evaluated, parameters.default, propertySpec.default);\n}\n\nfunction evaluateIntervalFunction(parameters, propertySpec, input) {\n // Edge cases\n if (getType(input) !== 'number') return coalesce(parameters.default, propertySpec.default);\n const n = parameters.stops.length;\n if (n === 1) return parameters.stops[0][1];\n if (input <= parameters.stops[0][0]) return parameters.stops[0][1];\n if (input >= parameters.stops[n - 1][0]) return parameters.stops[n - 1][1];\n\n const index = findStopLessThanOrEqualTo(parameters.stops.map((stop) => stop[0]), input);\n\n return parameters.stops[index][1];\n}\n\nfunction evaluateExponentialFunction(parameters, propertySpec, input) {\n const base = parameters.base !== undefined ? parameters.base : 1;\n\n // Edge cases\n if (getType(input) !== 'number') return coalesce(parameters.default, propertySpec.default);\n const n = parameters.stops.length;\n if (n === 1) return parameters.stops[0][1];\n if (input <= parameters.stops[0][0]) return parameters.stops[0][1];\n if (input >= parameters.stops[n - 1][0]) return parameters.stops[n - 1][1];\n\n const index = findStopLessThanOrEqualTo(parameters.stops.map((stop) => stop[0]), input);\n const t = interpolationFactor(\n input, base,\n parameters.stops[index][0],\n parameters.stops[index + 1][0]);\n\n const outputLower = parameters.stops[index][1];\n const outputUpper = parameters.stops[index + 1][1];\n let interp = interpolate[propertySpec.type] || identityFunction; // eslint-disable-line import/namespace\n\n if (parameters.colorSpace && parameters.colorSpace !== 'rgb') {\n const colorspace = colorSpaces[parameters.colorSpace]; // eslint-disable-line import/namespace\n interp = (a, b) => colorspace.reverse(colorspace.interpolate(colorspace.forward(a), colorspace.forward(b), t));\n }\n\n if (typeof outputLower.evaluate === 'function') {\n return {\n evaluate(...args) {\n const evaluatedLower = outputLower.evaluate.apply(undefined, args);\n const evaluatedUpper = outputUpper.evaluate.apply(undefined, args);\n // Special case for fill-outline-color, which has no spec default.\n if (evaluatedLower === undefined || evaluatedUpper === undefined) {\n return undefined;\n }\n return interp(evaluatedLower, evaluatedUpper, t);\n }\n };\n }\n\n return interp(outputLower, outputUpper, t);\n}\n\nfunction evaluateIdentityFunction(parameters, propertySpec, input) {\n if (propertySpec.type === 'color') {\n input = Color.parse(input);\n } else if (propertySpec.type === 'formatted') {\n input = Formatted.fromString(input.toString());\n } else if (propertySpec.type === 'resolvedImage') {\n input = ResolvedImage.fromString(input.toString());\n } else if (getType(input) !== propertySpec.type && (propertySpec.type !== 'enum' || !propertySpec.values[input])) {\n input = undefined;\n }\n return coalesce(input, parameters.default, propertySpec.default);\n}\n\n/**\n * Returns a ratio that can be used to interpolate between exponential function\n * stops.\n *\n * How it works:\n * Two consecutive stop values define a (scaled and shifted) exponential\n * function `f(x) = a * base^x + b`, where `base` is the user-specified base,\n * and `a` and `b` are constants affording sufficient degrees of freedom to fit\n * the function to the given stops.\n *\n * Here's a bit of algebra that lets us compute `f(x)` directly from the stop\n * values without explicitly solving for `a` and `b`:\n *\n * First stop value: `f(x0) = y0 = a * base^x0 + b`\n * Second stop value: `f(x1) = y1 = a * base^x1 + b`\n * => `y1 - y0 = a(base^x1 - base^x0)`\n * => `a = (y1 - y0)/(base^x1 - base^x0)`\n *\n * Desired value: `f(x) = y = a * base^x + b`\n * => `f(x) = y0 + a * (base^x - base^x0)`\n *\n * From the above, we can replace the `a` in `a * (base^x - base^x0)` and do a\n * little algebra:\n * ```\n * a * (base^x - base^x0) = (y1 - y0)/(base^x1 - base^x0) * (base^x - base^x0)\n * = (y1 - y0) * (base^x - base^x0) / (base^x1 - base^x0)\n * ```\n *\n * If we let `(base^x - base^x0) / (base^x1 base^x0)`, then we have\n * `f(x) = y0 + (y1 - y0) * ratio`. In other words, `ratio` may be treated as\n * an interpolation factor between the two stops' output values.\n *\n * (Note: a slightly different form for `ratio`,\n * `(base^(x-x0) - 1) / (base^(x1-x0) - 1) `, is equivalent, but requires fewer\n * expensive `Math.pow()` operations.)\n *\n * @private\n */\nfunction interpolationFactor(input, base, lowerValue, upperValue) {\n const difference = upperValue - lowerValue;\n const progress = input - lowerValue;\n\n if (difference === 0) {\n return 0;\n } else if (base === 1) {\n return progress / difference;\n } else {\n return (Math.pow(base, progress) - 1) / (Math.pow(base, difference) - 1);\n }\n}\n","// @flow\n\nimport assert from 'assert';\n\nimport extend from '../util/extend.js';\nimport ParsingError from './parsing_error.js';\nimport ParsingContext from './parsing_context.js';\nimport EvaluationContext from './evaluation_context.js';\nimport CompoundExpression from './compound_expression.js';\nimport Step from './definitions/step.js';\nimport Interpolate from './definitions/interpolate.js';\nimport Coalesce from './definitions/coalesce.js';\nimport Let from './definitions/let.js';\nimport definitions from './definitions/index.js';\nimport * as isConstant from './is_constant.js';\nimport RuntimeError from './runtime_error.js';\nimport {success, error} from '../util/result.js';\nimport {supportsPropertyExpression, supportsZoomExpression, supportsInterpolation} from '../util/properties.js';\n\nimport type {Type, EvaluationKind} from './types.js';\nimport type {Value} from './values.js';\nimport type {Expression} from './expression.js';\nimport type {StylePropertySpecification} from '../style-spec.js';\nimport type {Result} from '../util/result.js';\nimport type {InterpolationType} from './definitions/interpolate.js';\nimport type {PropertyValueSpecification} from '../types.js';\nimport type {FormattedSection} from './types/formatted.js';\nimport type Point from '@mapbox/point-geometry';\nimport type {CanonicalTileID} from '../../source/tile_id.js';\n\nexport type Feature = {\n +type: 1 | 2 | 3 | 'Unknown' | 'Point' | 'MultiPoint' | 'LineString' | 'MultiLineString' | 'Polygon' | 'MultiPolygon',\n +id?: any,\n +properties: {[_: string]: any},\n +patterns?: {[_: string]: {\"min\": string, \"mid\": string, \"max\": string}},\n +geometry?: Array>\n};\n\nexport type FeatureState = {[_: string]: any};\n\nexport type GlobalProperties = $ReadOnly<{\n zoom: number,\n heatmapDensity?: number,\n lineProgress?: number,\n skyRadialProgress?: number,\n isSupportedScript?: (_: string) => boolean,\n accumulated?: Value\n}>;\n\nexport class StyleExpression {\n expression: Expression;\n\n _evaluator: EvaluationContext;\n _defaultValue: Value;\n _warningHistory: {[key: string]: boolean};\n _enumValues: ?{[_: string]: any};\n\n constructor(expression: Expression, propertySpec: ?StylePropertySpecification) {\n this.expression = expression;\n this._warningHistory = {};\n this._evaluator = new EvaluationContext();\n this._defaultValue = propertySpec ? getDefaultValue(propertySpec) : null;\n this._enumValues = propertySpec && propertySpec.type === 'enum' ? propertySpec.values : null;\n }\n\n evaluateWithoutErrorHandling(globals: GlobalProperties, feature?: Feature, featureState?: FeatureState, canonical?: CanonicalTileID, availableImages?: Array, formattedSection?: FormattedSection): any {\n this._evaluator.globals = globals;\n this._evaluator.feature = feature;\n this._evaluator.featureState = featureState;\n this._evaluator.canonical = canonical;\n this._evaluator.availableImages = availableImages || null;\n this._evaluator.formattedSection = formattedSection;\n\n return this.expression.evaluate(this._evaluator);\n }\n\n evaluate(globals: GlobalProperties, feature?: Feature, featureState?: FeatureState, canonical?: CanonicalTileID, availableImages?: Array, formattedSection?: FormattedSection): any {\n this._evaluator.globals = globals;\n this._evaluator.feature = feature || null;\n this._evaluator.featureState = featureState || null;\n this._evaluator.canonical = canonical;\n this._evaluator.availableImages = availableImages || null;\n this._evaluator.formattedSection = formattedSection || null;\n\n try {\n const val = this.expression.evaluate(this._evaluator);\n // eslint-disable-next-line no-self-compare\n if (val === null || val === undefined || (typeof val === 'number' && val !== val)) {\n return this._defaultValue;\n }\n if (this._enumValues && !(val in this._enumValues)) {\n throw new RuntimeError(`Expected value to be one of ${Object.keys(this._enumValues).map(v => JSON.stringify(v)).join(', ')}, but found ${JSON.stringify(val)} instead.`);\n }\n return val;\n } catch (e) {\n if (!this._warningHistory[e.message]) {\n this._warningHistory[e.message] = true;\n if (typeof console !== 'undefined') {\n console.warn(e.message);\n }\n }\n return this._defaultValue;\n }\n }\n}\n\nexport function isExpression(expression: mixed) {\n return Array.isArray(expression) && expression.length > 0 &&\n typeof expression[0] === 'string' && expression[0] in definitions;\n}\n\n/**\n * Parse and typecheck the given style spec JSON expression. If\n * options.defaultValue is provided, then the resulting StyleExpression's\n * `evaluate()` method will handle errors by logging a warning (once per\n * message) and returning the default value. Otherwise, it will throw\n * evaluation errors.\n *\n * @private\n */\nexport function createExpression(expression: mixed, propertySpec: ?StylePropertySpecification): Result> {\n const parser = new ParsingContext(definitions, [], propertySpec ? getExpectedType(propertySpec) : undefined);\n\n // For string-valued properties, coerce to string at the top level rather than asserting.\n const parsed = parser.parse(expression, undefined, undefined, undefined,\n propertySpec && propertySpec.type === 'string' ? {typeAnnotation: 'coerce'} : undefined);\n\n if (!parsed) {\n assert(parser.errors.length > 0);\n return error(parser.errors);\n }\n\n return success(new StyleExpression(parsed, propertySpec));\n}\n\nexport class ZoomConstantExpression {\n kind: Kind;\n isStateDependent: boolean;\n _styleExpression: StyleExpression;\n\n constructor(kind: Kind, expression: StyleExpression) {\n this.kind = kind;\n this._styleExpression = expression;\n this.isStateDependent = kind !== ('constant': EvaluationKind) && !isConstant.isStateConstant(expression.expression);\n }\n\n evaluateWithoutErrorHandling(globals: GlobalProperties, feature?: Feature, featureState?: FeatureState, canonical?: CanonicalTileID, availableImages?: Array, formattedSection?: FormattedSection): any {\n return this._styleExpression.evaluateWithoutErrorHandling(globals, feature, featureState, canonical, availableImages, formattedSection);\n }\n\n evaluate(globals: GlobalProperties, feature?: Feature, featureState?: FeatureState, canonical?: CanonicalTileID, availableImages?: Array, formattedSection?: FormattedSection): any {\n return this._styleExpression.evaluate(globals, feature, featureState, canonical, availableImages, formattedSection);\n }\n}\n\nexport class ZoomDependentExpression {\n kind: Kind;\n zoomStops: Array;\n isStateDependent: boolean;\n\n _styleExpression: StyleExpression;\n interpolationType: ?InterpolationType;\n\n constructor(kind: Kind, expression: StyleExpression, zoomStops: Array, interpolationType?: InterpolationType) {\n this.kind = kind;\n this.zoomStops = zoomStops;\n this._styleExpression = expression;\n this.isStateDependent = kind !== ('camera': EvaluationKind) && !isConstant.isStateConstant(expression.expression);\n this.interpolationType = interpolationType;\n }\n\n evaluateWithoutErrorHandling(globals: GlobalProperties, feature?: Feature, featureState?: FeatureState, canonical?: CanonicalTileID, availableImages?: Array, formattedSection?: FormattedSection): any {\n return this._styleExpression.evaluateWithoutErrorHandling(globals, feature, featureState, canonical, availableImages, formattedSection);\n }\n\n evaluate(globals: GlobalProperties, feature?: Feature, featureState?: FeatureState, canonical?: CanonicalTileID, availableImages?: Array, formattedSection?: FormattedSection): any {\n return this._styleExpression.evaluate(globals, feature, featureState, canonical, availableImages, formattedSection);\n }\n\n interpolationFactor(input: number, lower: number, upper: number): number {\n if (this.interpolationType) {\n return Interpolate.interpolationFactor(this.interpolationType, input, lower, upper);\n } else {\n return 0;\n }\n }\n}\n\nexport type ConstantExpression = {\n kind: 'constant',\n +evaluate: (globals: GlobalProperties, feature?: Feature, featureState?: FeatureState, canonical?: CanonicalTileID, availableImages?: Array) => any,\n}\n\nexport type SourceExpression = {\n kind: 'source',\n isStateDependent: boolean,\n +evaluate: (globals: GlobalProperties, feature?: Feature, featureState?: FeatureState, canonical?: CanonicalTileID, availableImages?: Array, formattedSection?: FormattedSection) => any,\n};\n\nexport type CameraExpression = {\n kind: 'camera',\n +evaluate: (globals: GlobalProperties, feature?: Feature, featureState?: FeatureState, canonical?: CanonicalTileID, availableImages?: Array) => any,\n +interpolationFactor: (input: number, lower: number, upper: number) => number,\n zoomStops: Array,\n interpolationType: ?InterpolationType\n};\n\nexport type CompositeExpression = {\n kind: 'composite',\n isStateDependent: boolean,\n +evaluate: (globals: GlobalProperties, feature?: Feature, featureState?: FeatureState, canonical?: CanonicalTileID, availableImages?: Array, formattedSection?: FormattedSection) => any,\n +interpolationFactor: (input: number, lower: number, upper: number) => number,\n zoomStops: Array,\n interpolationType: ?InterpolationType\n};\n\nexport type StylePropertyExpression =\n | ConstantExpression\n | SourceExpression\n | CameraExpression\n | CompositeExpression;\n\nexport function createPropertyExpression(expression: mixed, propertySpec: StylePropertySpecification): Result> {\n expression = createExpression(expression, propertySpec);\n if (expression.result === 'error') {\n return expression;\n }\n\n const parsed = expression.value.expression;\n\n const isFeatureConstant = isConstant.isFeatureConstant(parsed);\n if (!isFeatureConstant && !supportsPropertyExpression(propertySpec)) {\n return error([new ParsingError('', 'data expressions not supported')]);\n }\n\n const isZoomConstant = isConstant.isGlobalPropertyConstant(parsed, ['zoom']);\n if (!isZoomConstant && !supportsZoomExpression(propertySpec)) {\n return error([new ParsingError('', 'zoom expressions not supported')]);\n }\n\n const zoomCurve = findZoomCurve(parsed);\n if (!zoomCurve && !isZoomConstant) {\n return error([new ParsingError('', '\"zoom\" expression may only be used as input to a top-level \"step\" or \"interpolate\" expression.')]);\n } else if (zoomCurve instanceof ParsingError) {\n return error([zoomCurve]);\n } else if (zoomCurve instanceof Interpolate && !supportsInterpolation(propertySpec)) {\n return error([new ParsingError('', '\"interpolate\" expressions cannot be used with this property')]);\n }\n\n if (!zoomCurve) {\n return success(isFeatureConstant ?\n (new ZoomConstantExpression('constant', expression.value): ConstantExpression) :\n (new ZoomConstantExpression('source', expression.value): SourceExpression));\n }\n\n const interpolationType = zoomCurve instanceof Interpolate ? zoomCurve.interpolation : undefined;\n\n return success(isFeatureConstant ?\n (new ZoomDependentExpression('camera', expression.value, zoomCurve.labels, interpolationType): CameraExpression) :\n (new ZoomDependentExpression('composite', expression.value, zoomCurve.labels, interpolationType): CompositeExpression));\n}\n\nimport {isFunction, createFunction} from '../function/index.js';\nimport {Color} from './values.js';\n\n// serialization wrapper for old-style stop functions normalized to the\n// expression interface\nexport class StylePropertyFunction {\n _parameters: PropertyValueSpecification;\n _specification: StylePropertySpecification;\n\n kind: EvaluationKind;\n evaluate: (globals: GlobalProperties, feature?: Feature) => any;\n interpolationFactor: ?(input: number, lower: number, upper: number) => number;\n zoomStops: ?Array;\n\n constructor(parameters: PropertyValueSpecification, specification: StylePropertySpecification) {\n this._parameters = parameters;\n this._specification = specification;\n extend(this, createFunction(this._parameters, this._specification));\n }\n\n static deserialize(serialized: {_parameters: PropertyValueSpecification, _specification: StylePropertySpecification}) {\n return ((new StylePropertyFunction(serialized._parameters, serialized._specification)): StylePropertyFunction);\n }\n\n static serialize(input: StylePropertyFunction) {\n return {\n _parameters: input._parameters,\n _specification: input._specification\n };\n }\n}\n\nexport function normalizePropertyExpression(value: PropertyValueSpecification, specification: StylePropertySpecification): StylePropertyExpression {\n if (isFunction(value)) {\n return (new StylePropertyFunction(value, specification): any);\n\n } else if (isExpression(value)) {\n const expression = createPropertyExpression(value, specification);\n if (expression.result === 'error') {\n // this should have been caught in validation\n throw new Error(expression.value.map(err => `${err.key}: ${err.message}`).join(', '));\n }\n return expression.value;\n\n } else {\n let constant: any = value;\n if (typeof value === 'string' && specification.type === 'color') {\n constant = Color.parse(value);\n }\n return {\n kind: 'constant',\n evaluate: () => constant\n };\n }\n}\n\n// Zoom-dependent expressions may only use [\"zoom\"] as the input to a top-level \"step\" or \"interpolate\"\n// expression (collectively referred to as a \"curve\"). The curve may be wrapped in one or more \"let\" or\n// \"coalesce\" expressions.\nfunction findZoomCurve(expression: Expression): Step | Interpolate | ParsingError | null {\n let result = null;\n if (expression instanceof Let) {\n result = findZoomCurve(expression.result);\n\n } else if (expression instanceof Coalesce) {\n for (const arg of expression.args) {\n result = findZoomCurve(arg);\n if (result) {\n break;\n }\n }\n\n } else if ((expression instanceof Step || expression instanceof Interpolate) &&\n expression.input instanceof CompoundExpression &&\n expression.input.name === 'zoom') {\n\n result = expression;\n }\n\n if (result instanceof ParsingError) {\n return result;\n }\n\n expression.eachChild((child) => {\n const childResult = findZoomCurve(child);\n if (childResult instanceof ParsingError) {\n result = childResult;\n } else if (!result && childResult) {\n result = new ParsingError('', '\"zoom\" expression may only be used as input to a top-level \"step\" or \"interpolate\" expression.');\n } else if (result && childResult && result !== childResult) {\n result = new ParsingError('', 'Only one zoom-based \"step\" or \"interpolate\" subexpression may be used in an expression.');\n }\n });\n\n return result;\n}\n\nimport {ColorType, StringType, NumberType, BooleanType, ValueType, FormattedType, ResolvedImageType, array} from './types.js';\n\nfunction getExpectedType(spec: StylePropertySpecification): Type {\n const types = {\n color: ColorType,\n string: StringType,\n number: NumberType,\n enum: StringType,\n boolean: BooleanType,\n formatted: FormattedType,\n resolvedImage: ResolvedImageType\n };\n\n if (spec.type === 'array') {\n return array(types[spec.value] || ValueType, spec.length);\n }\n\n return types[spec.type];\n}\n\nfunction getDefaultValue(spec: StylePropertySpecification): Value {\n if (spec.type === 'color' && isFunction(spec.default)) {\n // Special case for heatmap-color: it uses the 'default:' to define a\n // default color ramp, but createExpression expects a simple value to fall\n // back to in case of runtime errors\n return new Color(0, 0, 0, 0);\n } else if (spec.type === 'color') {\n return Color.parse(spec.default) || null;\n } else if (spec.default === undefined) {\n return null;\n } else {\n return spec.default;\n }\n}\n","// @flow\n\nimport assert from 'assert';\nimport type {StylePropertySpecification} from '../style-spec.js';\n\nexport default convertFunction;\n\nfunction convertLiteral(value) {\n return typeof value === 'object' ? ['literal', value] : value;\n}\n\nfunction convertFunction(parameters: any, propertySpec: StylePropertySpecification) {\n let stops = parameters.stops;\n if (!stops) {\n // identity function\n return convertIdentityFunction(parameters, propertySpec);\n }\n\n const zoomAndFeatureDependent = stops && typeof stops[0][0] === 'object';\n const featureDependent = zoomAndFeatureDependent || parameters.property !== undefined;\n const zoomDependent = zoomAndFeatureDependent || !featureDependent;\n\n stops = stops.map((stop) => {\n if (!featureDependent && propertySpec.tokens && typeof stop[1] === 'string') {\n return [stop[0], convertTokenString(stop[1])];\n }\n return [stop[0], convertLiteral(stop[1])];\n });\n\n if (zoomAndFeatureDependent) {\n return convertZoomAndPropertyFunction(parameters, propertySpec, stops);\n } else if (zoomDependent) {\n return convertZoomFunction(parameters, propertySpec, stops);\n } else {\n return convertPropertyFunction(parameters, propertySpec, stops);\n }\n}\n\nfunction convertIdentityFunction(parameters, propertySpec): Array {\n const get = ['get', parameters.property];\n\n if (parameters.default === undefined) {\n // By default, expressions for string-valued properties get coerced. To preserve\n // legacy function semantics, insert an explicit assertion instead.\n return propertySpec.type === 'string' ? ['string', get] : get;\n } else if (propertySpec.type === 'enum') {\n return [\n 'match',\n get,\n Object.keys(propertySpec.values),\n get,\n parameters.default\n ];\n } else {\n const expression = [propertySpec.type === 'color' ? 'to-color' : propertySpec.type, get, convertLiteral(parameters.default)];\n if (propertySpec.type === 'array') {\n expression.splice(1, 0, propertySpec.value, propertySpec.length || null);\n }\n return expression;\n }\n}\n\nfunction getInterpolateOperator(parameters) {\n switch (parameters.colorSpace) {\n case 'hcl': return 'interpolate-hcl';\n case 'lab': return 'interpolate-lab';\n default: return 'interpolate';\n }\n}\n\nfunction convertZoomAndPropertyFunction(parameters, propertySpec, stops) {\n const featureFunctionParameters = {};\n const featureFunctionStops = {};\n const zoomStops = [];\n for (let s = 0; s < stops.length; s++) {\n const stop = stops[s];\n const zoom = stop[0].zoom;\n if (featureFunctionParameters[zoom] === undefined) {\n featureFunctionParameters[zoom] = {\n zoom,\n type: parameters.type,\n property: parameters.property,\n default: parameters.default,\n };\n featureFunctionStops[zoom] = [];\n zoomStops.push(zoom);\n }\n featureFunctionStops[zoom].push([stop[0].value, stop[1]]);\n }\n\n // the interpolation type for the zoom dimension of a zoom-and-property\n // function is determined directly from the style property specification\n // for which it's being used: linear for interpolatable properties, step\n // otherwise.\n const functionType = getFunctionType({}, propertySpec);\n if (functionType === 'exponential') {\n const expression = [getInterpolateOperator(parameters), ['linear'], ['zoom']];\n\n for (const z of zoomStops) {\n const output = convertPropertyFunction(featureFunctionParameters[z], propertySpec, featureFunctionStops[z]);\n appendStopPair(expression, z, output, false);\n }\n\n return expression;\n } else {\n const expression = ['step', ['zoom']];\n\n for (const z of zoomStops) {\n const output = convertPropertyFunction(featureFunctionParameters[z], propertySpec, featureFunctionStops[z]);\n appendStopPair(expression, z, output, true);\n }\n\n fixupDegenerateStepCurve(expression);\n\n return expression;\n }\n}\n\nfunction coalesce(a, b) {\n if (a !== undefined) return a;\n if (b !== undefined) return b;\n}\n\nfunction getFallback(parameters, propertySpec) {\n const defaultValue = convertLiteral(coalesce(parameters.default, propertySpec.default));\n\n /*\n * Some fields with type: resolvedImage have an undefined default.\n * Because undefined is an invalid value for resolvedImage, set fallback to\n * an empty string instead of undefined to ensure output\n * passes validation.\n */\n if (defaultValue === undefined && propertySpec.type === 'resolvedImage') {\n return '';\n }\n return defaultValue;\n}\n\nfunction convertPropertyFunction(parameters, propertySpec, stops) {\n const type = getFunctionType(parameters, propertySpec);\n const get = ['get', parameters.property];\n if (type === 'categorical' && typeof stops[0][0] === 'boolean') {\n assert(parameters.stops.length > 0 && parameters.stops.length <= 2);\n const expression = ['case'];\n for (const stop of stops) {\n expression.push(['==', get, stop[0]], stop[1]);\n }\n\n expression.push(getFallback(parameters, propertySpec));\n return expression;\n } else if (type === 'categorical') {\n const expression = ['match', get];\n for (const stop of stops) {\n appendStopPair(expression, stop[0], stop[1], false);\n }\n expression.push(getFallback(parameters, propertySpec));\n return expression;\n } else if (type === 'interval') {\n const expression = ['step', ['number', get]];\n for (const stop of stops) {\n appendStopPair(expression, stop[0], stop[1], true);\n }\n fixupDegenerateStepCurve(expression);\n return parameters.default === undefined ? expression : [\n 'case',\n ['==', ['typeof', get], 'number'],\n expression,\n convertLiteral(parameters.default)\n ];\n } else if (type === 'exponential') {\n const base = parameters.base !== undefined ? parameters.base : 1;\n const expression = [\n getInterpolateOperator(parameters),\n base === 1 ? [\"linear\"] : [\"exponential\", base],\n [\"number\", get]\n ];\n\n for (const stop of stops) {\n appendStopPair(expression, stop[0], stop[1], false);\n }\n return parameters.default === undefined ? expression : [\n 'case',\n ['==', ['typeof', get], 'number'],\n expression,\n convertLiteral(parameters.default)\n ];\n } else {\n throw new Error(`Unknown property function type ${type}`);\n }\n}\n\nfunction convertZoomFunction(parameters, propertySpec, stops, input = ['zoom']) {\n const type = getFunctionType(parameters, propertySpec);\n let expression;\n let isStep = false;\n if (type === 'interval') {\n expression = ['step', input];\n isStep = true;\n } else if (type === 'exponential') {\n const base = parameters.base !== undefined ? parameters.base : 1;\n expression = [getInterpolateOperator(parameters), base === 1 ? [\"linear\"] : [\"exponential\", base], input];\n\n } else {\n throw new Error(`Unknown zoom function type \"${type}\"`);\n }\n\n for (const stop of stops) {\n appendStopPair(expression, stop[0], stop[1], isStep);\n }\n\n fixupDegenerateStepCurve(expression);\n\n return expression;\n}\n\nfunction fixupDegenerateStepCurve(expression) {\n // degenerate step curve (i.e. a constant function): add a noop stop\n if (expression[0] === 'step' && expression.length === 3) {\n expression.push(0);\n expression.push(expression[3]);\n }\n}\n\nfunction appendStopPair(curve, input, output, isStep) {\n // Skip duplicate stop values. They were not validated for functions, but they are for expressions.\n // https://github.com/mapbox/mapbox-gl-js/issues/4107\n if (curve.length > 3 && input === curve[curve.length - 2]) {\n return;\n }\n // step curves don't get the first input value, as it is redundant.\n if (!(isStep && curve.length === 2)) {\n curve.push(input);\n }\n curve.push(output);\n}\n\nfunction getFunctionType(parameters, propertySpec) {\n if (parameters.type) {\n return parameters.type;\n } else {\n assert(propertySpec.expression);\n return (propertySpec.expression: any).interpolated ? 'exponential' : 'interval';\n }\n}\n\n// \"String with {name} token\" => [\"concat\", \"String with \", [\"get\", \"name\"], \" token\"]\nexport function convertTokenString(s: string) {\n const result = ['concat'];\n const re = /{([^{}]+)}/g;\n let pos = 0;\n for (let match = re.exec(s); match !== null; match = re.exec(s)) {\n const literal = s.slice(pos, re.lastIndex - match[0].length);\n pos = re.lastIndex;\n if (literal.length > 0) result.push(literal);\n result.push(['get', match[1]]);\n }\n\n if (result.length === 1) {\n return s;\n }\n\n if (pos < s.length) {\n result.push(s.slice(pos));\n } else if (result.length === 2) {\n return ['to-string', result[1]];\n }\n\n return result;\n}\n\n","// @flow\n\nimport {createExpression} from '../expression/index.js';\nimport type {GlobalProperties, Feature} from '../expression/index.js';\nimport type {CanonicalTileID} from '../../source/tile_id.js';\n\ntype FilterExpression = (globalProperties: GlobalProperties, feature: Feature, canonical?: CanonicalTileID) => boolean;\nexport type FeatureFilter ={filter: FilterExpression, needGeometry: boolean};\n\nexport default createFilter;\nexport {isExpressionFilter};\n\nfunction isExpressionFilter(filter: any) {\n if (filter === true || filter === false) {\n return true;\n }\n\n if (!Array.isArray(filter) || filter.length === 0) {\n return false;\n }\n switch (filter[0]) {\n case 'has':\n return filter.length >= 2 && filter[1] !== '$id' && filter[1] !== '$type';\n\n case 'in':\n return filter.length >= 3 && (typeof filter[1] !== 'string' || Array.isArray(filter[2]));\n\n case '!in':\n case '!has':\n case 'none':\n return false;\n\n case '==':\n case '!=':\n case '>':\n case '>=':\n case '<':\n case '<=':\n return filter.length !== 3 || (Array.isArray(filter[1]) || Array.isArray(filter[2]));\n\n case 'any':\n case 'all':\n for (const f of filter.slice(1)) {\n if (!isExpressionFilter(f) && typeof f !== 'boolean') {\n return false;\n }\n }\n return true;\n\n default:\n return true;\n }\n}\n\nconst filterSpec = {\n 'type': 'boolean',\n 'default': false,\n 'transition': false,\n 'property-type': 'data-driven',\n 'expression': {\n 'interpolated': false,\n 'parameters': ['zoom', 'feature']\n }\n};\n\n/**\n * Given a filter expressed as nested arrays, return a new function\n * that evaluates whether a given feature (with a .properties or .tags property)\n * passes its test.\n *\n * @private\n * @param {Array} filter mapbox gl filter\n * @returns {Function} filter-evaluating function\n */\nfunction createFilter(filter: any): FeatureFilter {\n if (filter === null || filter === undefined) {\n return {filter: () => true, needGeometry: false};\n }\n\n if (!isExpressionFilter(filter)) {\n filter = convertFilter(filter);\n }\n\n const compiled = createExpression(filter, filterSpec);\n if (compiled.result === 'error') {\n throw new Error(compiled.value.map(err => `${err.key}: ${err.message}`).join(', '));\n } else {\n const needGeometry = geometryNeeded(filter);\n return {filter: (globalProperties: GlobalProperties, feature: Feature, canonical?: CanonicalTileID) => compiled.value.evaluate(globalProperties, feature, {}, canonical),\n needGeometry};\n }\n}\n\n// Comparison function to sort numbers and strings\nfunction compare(a, b) {\n return a < b ? -1 : a > b ? 1 : 0;\n}\n\nfunction geometryNeeded(filter) {\n if (!Array.isArray(filter)) return false;\n if (filter[0] === 'within') return true;\n for (let index = 1; index < filter.length; index++) {\n if (geometryNeeded(filter[index])) return true;\n }\n return false;\n}\n\nfunction convertFilter(filter: ?Array): mixed {\n if (!filter) return true;\n const op = filter[0];\n if (filter.length <= 1) return (op !== 'any');\n const converted =\n op === '==' ? convertComparisonOp(filter[1], filter[2], '==') :\n op === '!=' ? convertNegation(convertComparisonOp(filter[1], filter[2], '==')) :\n op === '<' ||\n op === '>' ||\n op === '<=' ||\n op === '>=' ? convertComparisonOp(filter[1], filter[2], op) :\n op === 'any' ? convertDisjunctionOp(filter.slice(1)) :\n op === 'all' ? ['all'].concat(filter.slice(1).map(convertFilter)) :\n op === 'none' ? ['all'].concat(filter.slice(1).map(convertFilter).map(convertNegation)) :\n op === 'in' ? convertInOp(filter[1], filter.slice(2)) :\n op === '!in' ? convertNegation(convertInOp(filter[1], filter.slice(2))) :\n op === 'has' ? convertHasOp(filter[1]) :\n op === '!has' ? convertNegation(convertHasOp(filter[1])) :\n op === 'within' ? filter :\n true;\n return converted;\n}\n\nfunction convertComparisonOp(property: string, value: any, op: string) {\n switch (property) {\n case '$type':\n return [`filter-type-${op}`, value];\n case '$id':\n return [`filter-id-${op}`, value];\n default:\n return [`filter-${op}`, property, value];\n }\n}\n\nfunction convertDisjunctionOp(filters: Array>) {\n return ['any'].concat(filters.map(convertFilter));\n}\n\nfunction convertInOp(property: string, values: Array) {\n if (values.length === 0) { return false; }\n switch (property) {\n case '$type':\n return [`filter-type-in`, ['literal', values]];\n case '$id':\n return [`filter-id-in`, ['literal', values]];\n default:\n if (values.length > 200 && !values.some(v => typeof v !== typeof values[0])) {\n return ['filter-in-large', property, ['literal', values.sort(compare)]];\n } else {\n return ['filter-in-small', property, ['literal', values]];\n }\n }\n}\n\nfunction convertHasOp(property: string) {\n switch (property) {\n case '$type':\n return true;\n case '$id':\n return [`filter-has-id`];\n default:\n return [`filter-has`, property];\n }\n}\n\nfunction convertNegation(filter: mixed) {\n return ['!', filter];\n}\n","\nexport default ['type', 'source', 'source-layer', 'minzoom', 'maxzoom', 'filter', 'layout'];\n","\nimport refProperties from './util/ref_properties.js';\n\nfunction deref(layer, parent) {\n const result = {};\n\n for (const k in layer) {\n if (k !== 'ref') {\n result[k] = layer[k];\n }\n }\n\n refProperties.forEach((k) => {\n if (k in parent) {\n result[k] = parent[k];\n }\n });\n\n return result;\n}\n\nexport default derefLayers;\n\n/**\n * Given an array of layers, some of which may contain `ref` properties\n * whose value is the `id` of another property, return a new array where\n * such layers have been augmented with the 'type', 'source', etc. properties\n * from the parent layer, and the `ref` property has been removed.\n *\n * The input is not modified. The output may contain references to portions\n * of the input.\n *\n * @private\n * @param {Array} layers\n * @returns {Array}\n */\nfunction derefLayers(layers) {\n layers = layers.slice();\n\n const map = Object.create(null);\n for (let i = 0; i < layers.length; i++) {\n map[layers[i].id] = layers[i];\n }\n\n for (let i = 0; i < layers.length; i++) {\n if ('ref' in layers[i]) {\n layers[i] = deref(layers[i], map[layers[i].ref]);\n }\n }\n\n return layers;\n}\n","// @flow\n\n// Note: Do not inherit from Error. It breaks when transpiling to ES5.\n\nexport default class ValidationError {\n message: string;\n identifier: ?string;\n line: ?number;\n\n constructor(key: ?string, value: ?{ __line__: number }, message: string, identifier: ?string) {\n this.message = (key ? `${key}: ` : '') + message;\n if (identifier) this.identifier = identifier;\n\n if (value !== null && value !== undefined && value.__line__) {\n this.line = value.__line__;\n }\n }\n}\n","// @flow\n\n// Note: Do not inherit from Error. It breaks when transpiling to ES5.\n\nexport default class ParsingError {\n message: string;\n error: Error;\n line: number;\n\n constructor(error: Error) {\n this.error = error;\n this.message = error.message;\n const match = error.message.match(/line (\\d+)/);\n this.line = match ? parseInt(match[1], 10) : 0;\n }\n}\n","\nimport ValidationError from '../error/validation_error.js';\n\nexport default function validateConstants(options) {\n const key = options.key;\n const constants = options.value;\n\n if (constants) {\n return [new ValidationError(key, constants, 'constants have been deprecated as of v8')];\n } else {\n return [];\n }\n}\n","// @flow\n\n// Turn jsonlint-lines-primitives objects into primitive objects\nexport function unbundle(value: mixed) {\n if (value instanceof Number || value instanceof String || value instanceof Boolean) {\n return value.valueOf();\n } else {\n return value;\n }\n}\n\nexport function deepUnbundle(value: mixed): mixed {\n if (Array.isArray(value)) {\n return value.map(deepUnbundle);\n } else if (value instanceof Object && !(value instanceof Number || value instanceof String || value instanceof Boolean)) {\n const unbundledValue: { [key: string]: mixed } = {};\n for (const key in value) {\n unbundledValue[key] = deepUnbundle(value[key]);\n }\n return unbundledValue;\n }\n\n return unbundle(value);\n}\n","\nimport ValidationError from '../error/validation_error.js';\nimport getType from '../util/get_type.js';\nimport validateSpec from './validate.js';\n\nexport default function validateObject(options) {\n const key = options.key;\n const object = options.value;\n const elementSpecs = options.valueSpec || {};\n const elementValidators = options.objectElementValidators || {};\n const style = options.style;\n const styleSpec = options.styleSpec;\n let errors = [];\n\n const type = getType(object);\n if (type !== 'object') {\n return [new ValidationError(key, object, `object expected, ${type} found`)];\n }\n\n for (const objectKey in object) {\n const elementSpecKey = objectKey.split('.')[0]; // treat 'paint.*' as 'paint'\n const elementSpec = elementSpecs[elementSpecKey] || elementSpecs['*'];\n\n let validateElement;\n if (elementValidators[elementSpecKey]) {\n validateElement = elementValidators[elementSpecKey];\n } else if (elementSpecs[elementSpecKey]) {\n validateElement = validateSpec;\n } else if (elementValidators['*']) {\n validateElement = elementValidators['*'];\n } else if (elementSpecs['*']) {\n validateElement = validateSpec;\n } else {\n errors.push(new ValidationError(key, object[objectKey], `unknown property \"${objectKey}\"`));\n continue;\n }\n\n errors = errors.concat(validateElement({\n key: (key ? `${key}.` : key) + objectKey,\n value: object[objectKey],\n valueSpec: elementSpec,\n style,\n styleSpec,\n object,\n objectKey\n }, object));\n }\n\n for (const elementSpecKey in elementSpecs) {\n // Don't check `required` when there's a custom validator for that property.\n if (elementValidators[elementSpecKey]) {\n continue;\n }\n\n if (elementSpecs[elementSpecKey].required && elementSpecs[elementSpecKey]['default'] === undefined && object[elementSpecKey] === undefined) {\n errors.push(new ValidationError(key, object, `missing required property \"${elementSpecKey}\"`));\n }\n }\n\n return errors;\n}\n","\nimport getType from '../util/get_type.js';\nimport validate from './validate.js';\nimport ValidationError from '../error/validation_error.js';\n\nexport default function validateArray(options) {\n const array = options.value;\n const arraySpec = options.valueSpec;\n const style = options.style;\n const styleSpec = options.styleSpec;\n const key = options.key;\n const validateArrayElement = options.arrayElementValidator || validate;\n\n if (getType(array) !== 'array') {\n return [new ValidationError(key, array, `array expected, ${getType(array)} found`)];\n }\n\n if (arraySpec.length && array.length !== arraySpec.length) {\n return [new ValidationError(key, array, `array length ${arraySpec.length} expected, length ${array.length} found`)];\n }\n\n if (arraySpec['min-length'] && array.length < arraySpec['min-length']) {\n return [new ValidationError(key, array, `array length at least ${arraySpec['min-length']} expected, length ${array.length} found`)];\n }\n\n let arrayElementSpec = {\n \"type\": arraySpec.value,\n \"values\": arraySpec.values,\n \"minimum\": arraySpec.minimum,\n \"maximum\": arraySpec.maximum\n };\n\n if (styleSpec.$version < 7) {\n arrayElementSpec.function = arraySpec.function;\n }\n\n if (getType(arraySpec.value) === 'object') {\n arrayElementSpec = arraySpec.value;\n }\n\n let errors = [];\n for (let i = 0; i < array.length; i++) {\n errors = errors.concat(validateArrayElement({\n array,\n arrayIndex: i,\n value: array[i],\n valueSpec: arrayElementSpec,\n style,\n styleSpec,\n key: `${key}[${i}]`\n }));\n }\n return errors;\n}\n","\nimport getType from '../util/get_type.js';\nimport ValidationError from '../error/validation_error.js';\n\nexport default function validateNumber(options) {\n const key = options.key;\n const value = options.value;\n const valueSpec = options.valueSpec;\n let type = getType(value);\n\n // eslint-disable-next-line no-self-compare\n if (type === 'number' && value !== value) {\n type = 'NaN';\n }\n\n if (type !== 'number') {\n return [new ValidationError(key, value, `number expected, ${type} found`)];\n }\n\n if ('minimum' in valueSpec) {\n let specMin = valueSpec.minimum;\n if (getType(valueSpec.minimum) === 'array') {\n const i = options.arrayIndex;\n specMin = valueSpec.minimum[i];\n }\n if (value < specMin) {\n return [new ValidationError(key, value, `${value} is less than the minimum value ${specMin}`)];\n }\n }\n\n if ('maximum' in valueSpec) {\n let specMax = valueSpec.maximum;\n if (getType(valueSpec.maximum) === 'array') {\n const i = options.arrayIndex;\n specMax = valueSpec.maximum[i];\n }\n if (value > specMax) {\n return [new ValidationError(key, value, `${value} is greater than the maximum value ${specMax}`)];\n }\n }\n\n return [];\n}\n","\nimport ValidationError from '../error/validation_error.js';\nimport getType from '../util/get_type.js';\nimport validate from './validate.js';\nimport validateObject from './validate_object.js';\nimport validateArray from './validate_array.js';\nimport validateNumber from './validate_number.js';\nimport {isExpression} from '../expression/index.js';\nimport {unbundle, deepUnbundle} from '../util/unbundle_jsonlint.js';\nimport {\n supportsPropertyExpression,\n supportsZoomExpression,\n supportsInterpolation\n} from '../util/properties.js';\n\nexport default function validateFunction(options) {\n const functionValueSpec = options.valueSpec;\n const functionType = unbundle(options.value.type);\n let stopKeyType;\n let stopDomainValues = {};\n let previousStopDomainValue;\n let previousStopDomainZoom;\n\n const isZoomFunction = functionType !== 'categorical' && options.value.property === undefined;\n const isPropertyFunction = !isZoomFunction;\n const isZoomAndPropertyFunction =\n getType(options.value.stops) === 'array' &&\n getType(options.value.stops[0]) === 'array' &&\n getType(options.value.stops[0][0]) === 'object';\n\n const errors = validateObject({\n key: options.key,\n value: options.value,\n valueSpec: options.styleSpec.function,\n style: options.style,\n styleSpec: options.styleSpec,\n objectElementValidators: {\n stops: validateFunctionStops,\n default: validateFunctionDefault\n }\n });\n\n if (functionType === 'identity' && isZoomFunction) {\n errors.push(new ValidationError(options.key, options.value, 'missing required property \"property\"'));\n }\n\n if (functionType !== 'identity' && !options.value.stops) {\n errors.push(new ValidationError(options.key, options.value, 'missing required property \"stops\"'));\n }\n\n if (functionType === 'exponential' && options.valueSpec.expression && !supportsInterpolation(options.valueSpec)) {\n errors.push(new ValidationError(options.key, options.value, 'exponential functions not supported'));\n }\n\n if (options.styleSpec.$version >= 8) {\n if (isPropertyFunction && !supportsPropertyExpression(options.valueSpec)) {\n errors.push(new ValidationError(options.key, options.value, 'property functions not supported'));\n } else if (isZoomFunction && !supportsZoomExpression(options.valueSpec)) {\n errors.push(new ValidationError(options.key, options.value, 'zoom functions not supported'));\n }\n }\n\n if ((functionType === 'categorical' || isZoomAndPropertyFunction) && options.value.property === undefined) {\n errors.push(new ValidationError(options.key, options.value, '\"property\" property is required'));\n }\n\n return errors;\n\n function validateFunctionStops(options) {\n if (functionType === 'identity') {\n return [new ValidationError(options.key, options.value, 'identity function may not have a \"stops\" property')];\n }\n\n let errors = [];\n const value = options.value;\n\n errors = errors.concat(validateArray({\n key: options.key,\n value,\n valueSpec: options.valueSpec,\n style: options.style,\n styleSpec: options.styleSpec,\n arrayElementValidator: validateFunctionStop\n }));\n\n if (getType(value) === 'array' && value.length === 0) {\n errors.push(new ValidationError(options.key, value, 'array must have at least one stop'));\n }\n\n return errors;\n }\n\n function validateFunctionStop(options) {\n let errors = [];\n const value = options.value;\n const key = options.key;\n\n if (getType(value) !== 'array') {\n return [new ValidationError(key, value, `array expected, ${getType(value)} found`)];\n }\n\n if (value.length !== 2) {\n return [new ValidationError(key, value, `array length 2 expected, length ${value.length} found`)];\n }\n\n if (isZoomAndPropertyFunction) {\n if (getType(value[0]) !== 'object') {\n return [new ValidationError(key, value, `object expected, ${getType(value[0])} found`)];\n }\n if (value[0].zoom === undefined) {\n return [new ValidationError(key, value, 'object stop key must have zoom')];\n }\n if (value[0].value === undefined) {\n return [new ValidationError(key, value, 'object stop key must have value')];\n }\n if (previousStopDomainZoom && previousStopDomainZoom > unbundle(value[0].zoom)) {\n return [new ValidationError(key, value[0].zoom, 'stop zoom values must appear in ascending order')];\n }\n if (unbundle(value[0].zoom) !== previousStopDomainZoom) {\n previousStopDomainZoom = unbundle(value[0].zoom);\n previousStopDomainValue = undefined;\n stopDomainValues = {};\n }\n errors = errors.concat(validateObject({\n key: `${key}[0]`,\n value: value[0],\n valueSpec: {zoom: {}},\n style: options.style,\n styleSpec: options.styleSpec,\n objectElementValidators: {zoom: validateNumber, value: validateStopDomainValue}\n }));\n } else {\n errors = errors.concat(validateStopDomainValue({\n key: `${key}[0]`,\n value: value[0],\n valueSpec: {},\n style: options.style,\n styleSpec: options.styleSpec\n }, value));\n }\n\n if (isExpression(deepUnbundle(value[1]))) {\n return errors.concat([new ValidationError(`${key}[1]`, value[1], 'expressions are not allowed in function stops.')]);\n }\n\n return errors.concat(validate({\n key: `${key}[1]`,\n value: value[1],\n valueSpec: functionValueSpec,\n style: options.style,\n styleSpec: options.styleSpec\n }));\n }\n\n function validateStopDomainValue(options, stop) {\n const type = getType(options.value);\n const value = unbundle(options.value);\n\n const reportValue = options.value !== null ? options.value : stop;\n\n if (!stopKeyType) {\n stopKeyType = type;\n } else if (type !== stopKeyType) {\n return [new ValidationError(options.key, reportValue, `${type} stop domain type must match previous stop domain type ${stopKeyType}`)];\n }\n\n if (type !== 'number' && type !== 'string' && type !== 'boolean') {\n return [new ValidationError(options.key, reportValue, 'stop domain value must be a number, string, or boolean')];\n }\n\n if (type !== 'number' && functionType !== 'categorical') {\n let message = `number expected, ${type} found`;\n if (supportsPropertyExpression(functionValueSpec) && functionType === undefined) {\n message += '\\nIf you intended to use a categorical function, specify `\"type\": \"categorical\"`.';\n }\n return [new ValidationError(options.key, reportValue, message)];\n }\n\n if (functionType === 'categorical' && type === 'number' && (!isFinite(value) || Math.floor(value) !== value)) {\n return [new ValidationError(options.key, reportValue, `integer expected, found ${value}`)];\n }\n\n if (functionType !== 'categorical' && type === 'number' && previousStopDomainValue !== undefined && value < previousStopDomainValue) {\n return [new ValidationError(options.key, reportValue, 'stop domain values must appear in ascending order')];\n } else {\n previousStopDomainValue = value;\n }\n\n if (functionType === 'categorical' && value in stopDomainValues) {\n return [new ValidationError(options.key, reportValue, 'stop domain values must be unique')];\n } else {\n stopDomainValues[value] = true;\n }\n\n return [];\n }\n\n function validateFunctionDefault(options) {\n return validate({\n key: options.key,\n value: options.value,\n valueSpec: functionValueSpec,\n style: options.style,\n styleSpec: options.styleSpec\n });\n }\n}\n","// @flow\n\nimport ValidationError from '../error/validation_error.js';\n\nimport {createExpression, createPropertyExpression} from '../expression/index.js';\nimport {deepUnbundle} from '../util/unbundle_jsonlint.js';\nimport {isStateConstant, isGlobalPropertyConstant, isFeatureConstant} from '../expression/is_constant.js';\n\nexport default function validateExpression(options: any): Array {\n const expression = (options.expressionContext === 'property' ? createPropertyExpression : createExpression)(deepUnbundle(options.value), options.valueSpec);\n if (expression.result === 'error') {\n return expression.value.map((error) => {\n return new ValidationError(`${options.key}${error.key}`, options.value, error.message);\n });\n }\n\n const expressionObj = (expression.value: any).expression || (expression.value: any)._styleExpression.expression;\n\n if (options.expressionContext === 'property' && (options.propertyKey === 'text-font') &&\n !expressionObj.outputDefined()) {\n return [new ValidationError(options.key, options.value, `Invalid data expression for \"${options.propertyKey}\". Output values must be contained as literals within the expression.`)];\n }\n\n if (options.expressionContext === 'property' && options.propertyType === 'layout' &&\n (!isStateConstant(expressionObj))) {\n return [new ValidationError(options.key, options.value, '\"feature-state\" data expressions are not supported with layout properties.')];\n }\n\n if (options.expressionContext === 'filter' && !isStateConstant(expressionObj)) {\n return [new ValidationError(options.key, options.value, '\"feature-state\" data expressions are not supported with filters.')];\n }\n\n if (options.expressionContext && options.expressionContext.indexOf('cluster') === 0) {\n if (!isGlobalPropertyConstant(expressionObj, ['zoom', 'feature-state'])) {\n return [new ValidationError(options.key, options.value, '\"zoom\" and \"feature-state\" expressions are not supported with cluster properties.')];\n }\n if (options.expressionContext === 'cluster-initial' && !isFeatureConstant(expressionObj)) {\n return [new ValidationError(options.key, options.value, 'Feature data expressions are not supported with initial expression part of cluster properties.')];\n }\n }\n\n return [];\n}\n","\nimport ValidationError from '../error/validation_error.js';\nimport {unbundle} from '../util/unbundle_jsonlint.js';\n\nexport default function validateEnum(options) {\n const key = options.key;\n const value = options.value;\n const valueSpec = options.valueSpec;\n const errors = [];\n\n if (Array.isArray(valueSpec.values)) { // <=v7\n if (valueSpec.values.indexOf(unbundle(value)) === -1) {\n errors.push(new ValidationError(key, value, `expected one of [${valueSpec.values.join(', ')}], ${JSON.stringify(value)} found`));\n }\n } else { // >=v8\n if (Object.keys(valueSpec.values).indexOf(unbundle(value)) === -1) {\n errors.push(new ValidationError(key, value, `expected one of [${Object.keys(valueSpec.values).join(', ')}], ${JSON.stringify(value)} found`));\n }\n }\n return errors;\n}\n","\nimport ValidationError from '../error/validation_error.js';\nimport validateExpression from './validate_expression.js';\nimport validateEnum from './validate_enum.js';\nimport getType from '../util/get_type.js';\nimport {unbundle, deepUnbundle} from '../util/unbundle_jsonlint.js';\nimport extend from '../util/extend.js';\nimport {isExpressionFilter} from '../feature_filter/index.js';\n\nexport default function validateFilter(options) {\n if (isExpressionFilter(deepUnbundle(options.value))) {\n return validateExpression(extend({}, options, {\n expressionContext: 'filter',\n valueSpec: {value: 'boolean'}\n }));\n } else {\n return validateNonExpressionFilter(options);\n }\n}\n\nfunction validateNonExpressionFilter(options) {\n const value = options.value;\n const key = options.key;\n\n if (getType(value) !== 'array') {\n return [new ValidationError(key, value, `array expected, ${getType(value)} found`)];\n }\n\n const styleSpec = options.styleSpec;\n let type;\n\n let errors = [];\n\n if (value.length < 1) {\n return [new ValidationError(key, value, 'filter array must have at least 1 element')];\n }\n\n errors = errors.concat(validateEnum({\n key: `${key}[0]`,\n value: value[0],\n valueSpec: styleSpec.filter_operator,\n style: options.style,\n styleSpec: options.styleSpec\n }));\n\n switch (unbundle(value[0])) {\n case '<':\n case '<=':\n case '>':\n case '>=':\n if (value.length >= 2 && unbundle(value[1]) === '$type') {\n errors.push(new ValidationError(key, value, `\"$type\" cannot be use with operator \"${value[0]}\"`));\n }\n /* falls through */\n case '==':\n case '!=':\n if (value.length !== 3) {\n errors.push(new ValidationError(key, value, `filter array for operator \"${value[0]}\" must have 3 elements`));\n }\n /* falls through */\n case 'in':\n case '!in':\n if (value.length >= 2) {\n type = getType(value[1]);\n if (type !== 'string') {\n errors.push(new ValidationError(`${key}[1]`, value[1], `string expected, ${type} found`));\n }\n }\n for (let i = 2; i < value.length; i++) {\n type = getType(value[i]);\n if (unbundle(value[1]) === '$type') {\n errors = errors.concat(validateEnum({\n key: `${key}[${i}]`,\n value: value[i],\n valueSpec: styleSpec.geometry_type,\n style: options.style,\n styleSpec: options.styleSpec\n }));\n } else if (type !== 'string' && type !== 'number' && type !== 'boolean') {\n errors.push(new ValidationError(`${key}[${i}]`, value[i], `string, number, or boolean expected, ${type} found`));\n }\n }\n break;\n\n case 'any':\n case 'all':\n case 'none':\n for (let i = 1; i < value.length; i++) {\n errors = errors.concat(validateNonExpressionFilter({\n key: `${key}[${i}]`,\n value: value[i],\n style: options.style,\n styleSpec: options.styleSpec\n }));\n }\n break;\n\n case 'has':\n case '!has':\n type = getType(value[1]);\n if (value.length !== 2) {\n errors.push(new ValidationError(key, value, `filter array for \"${value[0]}\" operator must have 2 elements`));\n } else if (type !== 'string') {\n errors.push(new ValidationError(`${key}[1]`, value[1], `string expected, ${type} found`));\n }\n break;\n case 'within':\n type = getType(value[1]);\n if (value.length !== 2) {\n errors.push(new ValidationError(key, value, `filter array for \"${value[0]}\" operator must have 2 elements`));\n } else if (type !== 'object') {\n errors.push(new ValidationError(`${key}[1]`, value[1], `object expected, ${type} found`));\n }\n break;\n }\n return errors;\n}\n","\nimport validate from './validate.js';\nimport ValidationError from '../error/validation_error.js';\nimport getType from '../util/get_type.js';\nimport {isFunction} from '../function/index.js';\nimport {unbundle, deepUnbundle} from '../util/unbundle_jsonlint.js';\nimport {supportsPropertyExpression} from '../util/properties.js';\n\nexport default function validateProperty(options, propertyType) {\n const key = options.key;\n const style = options.style;\n const styleSpec = options.styleSpec;\n const value = options.value;\n const propertyKey = options.objectKey;\n const layerSpec = styleSpec[`${propertyType}_${options.layerType}`];\n\n if (!layerSpec) return [];\n\n const transitionMatch = propertyKey.match(/^(.*)-transition$/);\n if (propertyType === 'paint' && transitionMatch && layerSpec[transitionMatch[1]] && layerSpec[transitionMatch[1]].transition) {\n return validate({\n key,\n value,\n valueSpec: styleSpec.transition,\n style,\n styleSpec\n });\n }\n\n const valueSpec = options.valueSpec || layerSpec[propertyKey];\n if (!valueSpec) {\n return [new ValidationError(key, value, `unknown property \"${propertyKey}\"`)];\n }\n\n let tokenMatch;\n if (getType(value) === 'string' && supportsPropertyExpression(valueSpec) && !valueSpec.tokens && (tokenMatch = /^{([^}]+)}$/.exec(value))) {\n return [new ValidationError(\n key, value,\n `\"${propertyKey}\" does not support interpolation syntax\\n` +\n `Use an identity property function instead: \\`{ \"type\": \"identity\", \"property\": ${JSON.stringify(tokenMatch[1])} }\\`.`)];\n }\n\n const errors = [];\n\n if (options.layerType === 'symbol') {\n if (propertyKey === 'text-field' && style && !style.glyphs) {\n errors.push(new ValidationError(key, value, 'use of \"text-field\" requires a style \"glyphs\" property'));\n }\n if (propertyKey === 'text-font' && isFunction(deepUnbundle(value)) && unbundle(value.type) === 'identity') {\n errors.push(new ValidationError(key, value, '\"text-font\" does not support identity functions'));\n }\n }\n\n return errors.concat(validate({\n key: options.key,\n value,\n valueSpec,\n style,\n styleSpec,\n expressionContext: 'property',\n propertyType,\n propertyKey\n }));\n}\n","\nimport validateProperty from './validate_property.js';\n\nexport default function validatePaintProperty(options) {\n return validateProperty(options, 'paint');\n}\n","\nimport validateProperty from './validate_property.js';\n\nexport default function validateLayoutProperty(options) {\n return validateProperty(options, 'layout');\n}\n","\nimport ValidationError from '../error/validation_error.js';\nimport {unbundle} from '../util/unbundle_jsonlint.js';\nimport validateObject from './validate_object.js';\nimport validateFilter from './validate_filter.js';\nimport validatePaintProperty from './validate_paint_property.js';\nimport validateLayoutProperty from './validate_layout_property.js';\nimport validateSpec from './validate.js';\nimport extend from '../util/extend.js';\n\nexport default function validateLayer(options) {\n let errors = [];\n\n const layer = options.value;\n const key = options.key;\n const style = options.style;\n const styleSpec = options.styleSpec;\n\n if (!layer.type && !layer.ref) {\n errors.push(new ValidationError(key, layer, 'either \"type\" or \"ref\" is required'));\n }\n let type = unbundle(layer.type);\n const ref = unbundle(layer.ref);\n\n if (layer.id) {\n const layerId = unbundle(layer.id);\n for (let i = 0; i < options.arrayIndex; i++) {\n const otherLayer = style.layers[i];\n if (unbundle(otherLayer.id) === layerId) {\n errors.push(new ValidationError(key, layer.id, `duplicate layer id \"${layer.id}\", previously used at line ${otherLayer.id.__line__}`));\n }\n }\n }\n\n if ('ref' in layer) {\n ['type', 'source', 'source-layer', 'filter', 'layout'].forEach((p) => {\n if (p in layer) {\n errors.push(new ValidationError(key, layer[p], `\"${p}\" is prohibited for ref layers`));\n }\n });\n\n let parent;\n\n style.layers.forEach((layer) => {\n if (unbundle(layer.id) === ref) parent = layer;\n });\n\n if (!parent) {\n errors.push(new ValidationError(key, layer.ref, `ref layer \"${ref}\" not found`));\n } else if (parent.ref) {\n errors.push(new ValidationError(key, layer.ref, 'ref cannot reference another ref layer'));\n } else {\n type = unbundle(parent.type);\n }\n } else if (!(type === 'background' || type === 'sky')) {\n if (!layer.source) {\n errors.push(new ValidationError(key, layer, 'missing required property \"source\"'));\n } else {\n const source = style.sources && style.sources[layer.source];\n const sourceType = source && unbundle(source.type);\n if (!source) {\n errors.push(new ValidationError(key, layer.source, `source \"${layer.source}\" not found`));\n } else if (sourceType === 'vector' && type === 'raster') {\n errors.push(new ValidationError(key, layer.source, `layer \"${layer.id}\" requires a raster source`));\n } else if (sourceType === 'raster' && type !== 'raster') {\n errors.push(new ValidationError(key, layer.source, `layer \"${layer.id}\" requires a vector source`));\n } else if (sourceType === 'vector' && !layer['source-layer']) {\n errors.push(new ValidationError(key, layer, `layer \"${layer.id}\" must specify a \"source-layer\"`));\n } else if (sourceType === 'raster-dem' && type !== 'hillshade') {\n errors.push(new ValidationError(key, layer.source, 'raster-dem source can only be used with layer type \\'hillshade\\'.'));\n } else if (type === 'line' && layer.paint && layer.paint['line-gradient'] &&\n (sourceType !== 'geojson' || !source.lineMetrics)) {\n errors.push(new ValidationError(key, layer, `layer \"${layer.id}\" specifies a line-gradient, which requires a GeoJSON source with \\`lineMetrics\\` enabled.`));\n }\n }\n }\n\n errors = errors.concat(validateObject({\n key,\n value: layer,\n valueSpec: styleSpec.layer,\n style: options.style,\n styleSpec: options.styleSpec,\n objectElementValidators: {\n '*'() {\n return [];\n },\n // We don't want to enforce the spec's `\"requires\": true` for backward compatibility with refs;\n // the actual requirement is validated above. See https://github.com/mapbox/mapbox-gl-js/issues/5772.\n type() {\n return validateSpec({\n key: `${key}.type`,\n value: layer.type,\n valueSpec: styleSpec.layer.type,\n style: options.style,\n styleSpec: options.styleSpec,\n object: layer,\n objectKey: 'type'\n });\n },\n filter: validateFilter,\n layout(options) {\n return validateObject({\n layer,\n key: options.key,\n value: options.value,\n style: options.style,\n styleSpec: options.styleSpec,\n objectElementValidators: {\n '*'(options) {\n return validateLayoutProperty(extend({layerType: type}, options));\n }\n }\n });\n },\n paint(options) {\n return validateObject({\n layer,\n key: options.key,\n value: options.value,\n style: options.style,\n styleSpec: options.styleSpec,\n objectElementValidators: {\n '*'(options) {\n return validatePaintProperty(extend({layerType: type}, options));\n }\n }\n });\n }\n }\n }));\n\n return errors;\n}\n","\nimport getType from '../util/get_type.js';\nimport ValidationError from '../error/validation_error.js';\n\nexport default function validateString(options) {\n const value = options.value;\n const key = options.key;\n const type = getType(value);\n\n if (type !== 'string') {\n return [new ValidationError(key, value, `string expected, ${type} found`)];\n }\n\n return [];\n}\n","\nimport ValidationError from '../error/validation_error.js';\nimport {unbundle} from '../util/unbundle_jsonlint.js';\nimport validateObject from './validate_object.js';\nimport validateEnum from './validate_enum.js';\nimport validateExpression from './validate_expression.js';\nimport validateString from './validate_string.js';\nimport getType from '../util/get_type.js';\n\nconst objectElementValidators = {\n promoteId: validatePromoteId\n};\n\nexport default function validateSource(options) {\n const value = options.value;\n const key = options.key;\n const styleSpec = options.styleSpec;\n const style = options.style;\n\n if (!value.type) {\n return [new ValidationError(key, value, '\"type\" is required')];\n }\n\n const type = unbundle(value.type);\n let errors;\n\n switch (type) {\n case 'vector':\n case 'raster':\n case 'raster-dem':\n errors = validateObject({\n key,\n value,\n valueSpec: styleSpec[`source_${type.replace('-', '_')}`],\n style: options.style,\n styleSpec,\n objectElementValidators\n });\n return errors;\n\n case 'geojson':\n errors = validateObject({\n key,\n value,\n valueSpec: styleSpec.source_geojson,\n style,\n styleSpec,\n objectElementValidators\n });\n if (value.cluster) {\n for (const prop in value.clusterProperties) {\n const [operator, mapExpr] = value.clusterProperties[prop];\n const reduceExpr = typeof operator === 'string' ? [operator, ['accumulated'], ['get', prop]] : operator;\n\n errors.push(...validateExpression({\n key: `${key}.${prop}.map`,\n value: mapExpr,\n expressionContext: 'cluster-map'\n }));\n errors.push(...validateExpression({\n key: `${key}.${prop}.reduce`,\n value: reduceExpr,\n expressionContext: 'cluster-reduce'\n }));\n }\n }\n return errors;\n\n case 'video':\n return validateObject({\n key,\n value,\n valueSpec: styleSpec.source_video,\n style,\n styleSpec\n });\n\n case 'image':\n return validateObject({\n key,\n value,\n valueSpec: styleSpec.source_image,\n style,\n styleSpec\n });\n\n case 'canvas':\n return [new ValidationError(key, null, `Please use runtime APIs to add canvas sources, rather than including them in stylesheets.`, 'source.canvas')];\n\n default:\n return validateEnum({\n key: `${key}.type`,\n value: value.type,\n valueSpec: {values: ['vector', 'raster', 'raster-dem', 'geojson', 'video', 'image']},\n style,\n styleSpec\n });\n }\n}\n\nfunction validatePromoteId({key, value}) {\n if (getType(value) === 'string') {\n return validateString({key, value});\n } else {\n const errors = [];\n for (const prop in value) {\n errors.push(...validateString({key: `${key}.${prop}`, value: value[prop]}));\n }\n return errors;\n }\n}\n","\nimport ValidationError from '../error/validation_error.js';\nimport getType from '../util/get_type.js';\nimport validate from './validate.js';\n\nexport default function validateLight(options) {\n const light = options.value;\n const styleSpec = options.styleSpec;\n const lightSpec = styleSpec.light;\n const style = options.style;\n\n let errors = [];\n\n const rootType = getType(light);\n if (light === undefined) {\n return errors;\n } else if (rootType !== 'object') {\n errors = errors.concat([new ValidationError('light', light, `object expected, ${rootType} found`)]);\n return errors;\n }\n\n for (const key in light) {\n const transitionMatch = key.match(/^(.*)-transition$/);\n\n if (transitionMatch && lightSpec[transitionMatch[1]] && lightSpec[transitionMatch[1]].transition) {\n errors = errors.concat(validate({\n key,\n value: light[key],\n valueSpec: styleSpec.transition,\n style,\n styleSpec\n }));\n } else if (lightSpec[key]) {\n errors = errors.concat(validate({\n key,\n value: light[key],\n valueSpec: lightSpec[key],\n style,\n styleSpec\n }));\n } else {\n errors = errors.concat([new ValidationError(key, light[key], `unknown property \"${key}\"`)]);\n }\n }\n\n return errors;\n}\n","\nimport ValidationError from '../error/validation_error.js';\nimport validate from './validate.js';\nimport getType from '../util/get_type.js';\nimport {unbundle} from '../util/unbundle_jsonlint.js';\n\nexport default function validateTerrain(options) {\n const terrain = options.value;\n const key = options.key;\n const style = options.style;\n const styleSpec = options.styleSpec;\n const terrainSpec = styleSpec.terrain;\n let errors = [];\n\n const rootType = getType(terrain);\n if (terrain === undefined) {\n return errors;\n } else if (rootType !== 'object') {\n errors = errors.concat([new ValidationError('terrain', terrain, `object expected, ${rootType} found`)]);\n return errors;\n }\n\n for (const key in terrain) {\n const transitionMatch = key.match(/^(.*)-transition$/);\n\n if (transitionMatch && terrainSpec[transitionMatch[1]] && terrainSpec[transitionMatch[1]].transition) {\n errors = errors.concat(validate({\n key,\n value: terrain[key],\n valueSpec: styleSpec.transition,\n style,\n styleSpec\n }));\n } else if (terrainSpec[key]) {\n errors = errors.concat(validate({\n key,\n value: terrain[key],\n valueSpec: terrainSpec[key],\n style,\n styleSpec\n }));\n } else {\n errors = errors.concat([new ValidationError(key, terrain[key], `unknown property \"${key}\"`)]);\n }\n }\n\n if (!terrain.source) {\n errors.push(new ValidationError(key, terrain, `terrain is missing required property \"source\"`));\n } else {\n const source = style.sources && style.sources[terrain.source];\n const sourceType = source && unbundle(source.type);\n if (!source) {\n errors.push(new ValidationError(key, terrain.source, `source \"${terrain.source}\" not found`));\n } else if (sourceType !== 'raster-dem') {\n errors.push(new ValidationError(key, terrain.source, `terrain cannot be used with a source of type ${sourceType}, it only be used with a \"raster-dem\" source type`));\n }\n }\n\n return errors;\n}\n","\nimport ValidationError from '../error/validation_error.js';\nimport validate from './validate.js';\nimport getType from '../util/get_type.js';\n\nexport default function validateFog(options) {\n const fog = options.value;\n const style = options.style;\n const styleSpec = options.styleSpec;\n const fogSpec = styleSpec.fog;\n let errors = [];\n\n const rootType = getType(fog);\n if (fog === undefined) {\n return errors;\n } else if (rootType !== 'object') {\n errors = errors.concat([new ValidationError('fog', fog, `object expected, ${rootType} found`)]);\n return errors;\n }\n\n for (const key in fog) {\n const transitionMatch = key.match(/^(.*)-transition$/);\n\n if (transitionMatch && fogSpec[transitionMatch[1]] && fogSpec[transitionMatch[1]].transition) {\n errors = errors.concat(validate({\n key,\n value: fog[key],\n valueSpec: styleSpec.transition,\n style,\n styleSpec\n }));\n } else if (fogSpec[key]) {\n errors = errors.concat(validate({\n key,\n value: fog[key],\n valueSpec: fogSpec[key],\n style,\n styleSpec\n }));\n } else {\n errors = errors.concat([new ValidationError(key, fog[key], `unknown property \"${key}\"`)]);\n }\n }\n\n return errors;\n}\n","\nimport extend from '../util/extend.js';\nimport {unbundle, deepUnbundle} from '../util/unbundle_jsonlint.js';\nimport {isExpression} from '../expression/index.js';\nimport {isFunction} from '../function/index.js';\n\nimport validateFunction from './validate_function.js';\nimport validateExpression from './validate_expression.js';\nimport validateObject from './validate_object.js';\nimport validateArray from './validate_array.js';\nimport validateBoolean from './validate_boolean.js';\nimport validateNumber from './validate_number.js';\nimport validateColor from './validate_color.js';\nimport validateConstants from './validate_constants.js';\nimport validateEnum from './validate_enum.js';\nimport validateFilter from './validate_filter.js';\nimport validateLayer from './validate_layer.js';\nimport validateSource from './validate_source.js';\nimport validateLight from './validate_light.js';\nimport validateTerrain from './validate_terrain.js';\nimport validateFog from './validate_fog.js';\nimport validateString from './validate_string.js';\nimport validateFormatted from './validate_formatted.js';\nimport validateImage from './validate_image.js';\n\nconst VALIDATORS = {\n '*'() {\n return [];\n },\n 'array': validateArray,\n 'boolean': validateBoolean,\n 'number': validateNumber,\n 'color': validateColor,\n 'constants': validateConstants,\n 'enum': validateEnum,\n 'filter': validateFilter,\n 'function': validateFunction,\n 'layer': validateLayer,\n 'object': validateObject,\n 'source': validateSource,\n 'light': validateLight,\n 'terrain': validateTerrain,\n 'fog': validateFog,\n 'string': validateString,\n 'formatted': validateFormatted,\n 'resolvedImage': validateImage\n};\n\n// Main recursive validation function. Tracks:\n//\n// - key: string representing location of validation in style tree. Used only\n// for more informative error reporting.\n// - value: current value from style being evaluated. May be anything from a\n// high level object that needs to be descended into deeper or a simple\n// scalar value.\n// - valueSpec: current spec being evaluated. Tracks value.\n// - styleSpec: current full spec being evaluated.\n\nexport default function validate(options) {\n const value = options.value;\n const valueSpec = options.valueSpec;\n const styleSpec = options.styleSpec;\n\n if (valueSpec.expression && isFunction(unbundle(value))) {\n return validateFunction(options);\n\n } else if (valueSpec.expression && isExpression(deepUnbundle(value))) {\n return validateExpression(options);\n\n } else if (valueSpec.type && VALIDATORS[valueSpec.type]) {\n return VALIDATORS[valueSpec.type](options);\n\n } else {\n const valid = validateObject(extend({}, options, {\n valueSpec: valueSpec.type ? styleSpec[valueSpec.type] : valueSpec\n }));\n return valid;\n }\n}\n","\nimport getType from '../util/get_type.js';\nimport ValidationError from '../error/validation_error.js';\n\nexport default function validateBoolean(options) {\n const value = options.value;\n const key = options.key;\n const type = getType(value);\n\n if (type !== 'boolean') {\n return [new ValidationError(key, value, `boolean expected, ${type} found`)];\n }\n\n return [];\n}\n","\nimport ValidationError from '../error/validation_error.js';\nimport getType from '../util/get_type.js';\nimport {parseCSSColor} from 'csscolorparser';\n\nexport default function validateColor(options) {\n const key = options.key;\n const value = options.value;\n const type = getType(value);\n\n if (type !== 'string') {\n return [new ValidationError(key, value, `color expected, ${type} found`)];\n }\n\n if (parseCSSColor(value) === null) {\n return [new ValidationError(key, value, `color expected, \"${value}\" found`)];\n }\n\n return [];\n}\n","// @flow\nimport validateExpression from './validate_expression.js';\nimport validateString from './validate_string.js';\n\nexport default function validateFormatted(options: any) {\n if (validateString(options).length === 0) {\n return [];\n }\n\n return validateExpression(options);\n}\n","// @flow\nimport validateExpression from './validate_expression.js';\nimport validateString from './validate_string.js';\n\nexport default function validateImage(options: any) {\n if (validateString(options).length === 0) {\n return [];\n }\n\n return validateExpression(options);\n}\n","\nimport ValidationError from '../error/validation_error.js';\nimport validateString from './validate_string.js';\n\nexport default function(options) {\n const value = options.value;\n const key = options.key;\n\n const errors = validateString(options);\n if (errors.length) return errors;\n\n if (value.indexOf('{fontstack}') === -1) {\n errors.push(new ValidationError(key, value, '\"glyphs\" url must include a \"{fontstack}\" token'));\n }\n\n if (value.indexOf('{range}') === -1) {\n errors.push(new ValidationError(key, value, '\"glyphs\" url must include a \"{range}\" token'));\n }\n\n return errors;\n}\n","\nimport validateConstants from './validate/validate_constants.js';\nimport validate from './validate/validate.js';\nimport latestStyleSpec from './reference/latest.js';\nimport validateGlyphsURL from './validate/validate_glyphs_url.js';\n\nimport validateSource from './validate/validate_source.js';\nimport validateLight from './validate/validate_light.js';\nimport validateTerrain from './validate/validate_terrain.js';\nimport validateFog from './validate/validate_fog.js';\nimport validateLayer from './validate/validate_layer.js';\nimport validateFilter from './validate/validate_filter.js';\nimport validatePaintProperty from './validate/validate_paint_property.js';\nimport validateLayoutProperty from './validate/validate_layout_property.js';\n\n/**\n * Validate a Mapbox GL style against the style specification. This entrypoint,\n * `mapbox-gl-style-spec/lib/validate_style.min`, is designed to produce as\n * small a browserify bundle as possible by omitting unnecessary functionality\n * and legacy style specifications.\n *\n * @private\n * @param {Object} style The style to be validated.\n * @param {Object} [styleSpec] The style specification to validate against.\n * If omitted, the latest style spec is used.\n * @returns {Array}\n * @example\n * var validate = require('mapbox-gl-style-spec/lib/validate_style.min');\n * var errors = validate(style);\n */\nfunction validateStyleMin(style, styleSpec = latestStyleSpec) {\n\n let errors = [];\n\n errors = errors.concat(validate({\n key: '',\n value: style,\n valueSpec: styleSpec.$root,\n styleSpec,\n style,\n objectElementValidators: {\n glyphs: validateGlyphsURL,\n '*'() {\n return [];\n }\n }\n }));\n\n if (style.constants) {\n errors = errors.concat(validateConstants({\n key: 'constants',\n value: style.constants,\n style,\n styleSpec\n }));\n }\n\n return sortErrors(errors);\n}\n\nvalidateStyleMin.source = wrapCleanErrors(validateSource);\nvalidateStyleMin.light = wrapCleanErrors(validateLight);\nvalidateStyleMin.terrain = wrapCleanErrors(validateTerrain);\nvalidateStyleMin.fog = wrapCleanErrors(validateFog);\nvalidateStyleMin.layer = wrapCleanErrors(validateLayer);\nvalidateStyleMin.filter = wrapCleanErrors(validateFilter);\nvalidateStyleMin.paintProperty = wrapCleanErrors(validatePaintProperty);\nvalidateStyleMin.layoutProperty = wrapCleanErrors(validateLayoutProperty);\n\nfunction sortErrors(errors) {\n return [].concat(errors).sort((a, b) => {\n return a.line - b.line;\n });\n}\n\nfunction wrapCleanErrors(inner) {\n return function(...args) {\n return sortErrors(inner.apply(this, args));\n };\n}\n\nexport default validateStyleMin;\n","/* parser generated by jison 0.4.15 */\n/*\n Returns a Parser object of the following structure:\n\n Parser: {\n yy: {}\n }\n\n Parser.prototype: {\n yy: {},\n trace: function(),\n symbols_: {associative list: name ==> number},\n terminals_: {associative list: number ==> name},\n productions_: [...],\n performAction: function anonymous(yytext, yyleng, yylineno, yy, yystate, $$, _$),\n table: [...],\n defaultActions: {...},\n parseError: function(str, hash),\n parse: function(input),\n\n lexer: {\n EOF: 1,\n parseError: function(str, hash),\n setInput: function(input),\n input: function(),\n unput: function(str),\n more: function(),\n less: function(n),\n pastInput: function(),\n upcomingInput: function(),\n showPosition: function(),\n test_match: function(regex_match_array, rule_index),\n next: function(),\n lex: function(),\n begin: function(condition),\n popState: function(),\n _currentRules: function(),\n topState: function(),\n pushState: function(condition),\n\n options: {\n ranges: boolean (optional: true ==> token location info will include a .range[] member)\n flex: boolean (optional: true ==> flex-like lexing behaviour where the rules are tested exhaustively to find the longest match)\n backtrack_lexer: boolean (optional: true ==> lexer regexes are tested in order and for each matching regex the action code is invoked; the lexer terminates the scan when a token is returned by the action code)\n },\n\n performAction: function(yy, yy_, $avoiding_name_collisions, YY_START),\n rules: [...],\n conditions: {associative list: name ==> set},\n }\n }\n\n\n token location info (@$, _$, etc.): {\n first_line: n,\n last_line: n,\n first_column: n,\n last_column: n,\n range: [start_number, end_number] (where the numbers are indexes into the input string, regular zero-based)\n }\n\n\n the parseError function receives a 'hash' object with these members for lexer and parser errors: {\n text: (matched text)\n token: (the produced terminal token, if any)\n line: (yylineno)\n }\n while parser (grammar) errors will also provide these members, i.e. parser errors deliver a superset of attributes: {\n loc: (yylloc)\n expected: (string describing the set of expected tokens)\n recoverable: (boolean: TRUE when the parser has a error recovery rule available for this particular error)\n }\n*/\nvar parser = (function(){\nvar o=function(k,v,o,l){for(o=o||{},l=k.length;l--;o[k[l]]=v);return o},$V0=[1,12],$V1=[1,13],$V2=[1,9],$V3=[1,10],$V4=[1,11],$V5=[1,14],$V6=[1,15],$V7=[14,18,22,24],$V8=[18,22],$V9=[22,24];\nvar parser = {trace: function trace() { },\nyy: {},\nsymbols_: {\"error\":2,\"JSONString\":3,\"STRING\":4,\"JSONNumber\":5,\"NUMBER\":6,\"JSONNullLiteral\":7,\"NULL\":8,\"JSONBooleanLiteral\":9,\"TRUE\":10,\"FALSE\":11,\"JSONText\":12,\"JSONValue\":13,\"EOF\":14,\"JSONObject\":15,\"JSONArray\":16,\"{\":17,\"}\":18,\"JSONMemberList\":19,\"JSONMember\":20,\":\":21,\",\":22,\"[\":23,\"]\":24,\"JSONElementList\":25,\"$accept\":0,\"$end\":1},\nterminals_: {2:\"error\",4:\"STRING\",6:\"NUMBER\",8:\"NULL\",10:\"TRUE\",11:\"FALSE\",14:\"EOF\",17:\"{\",18:\"}\",21:\":\",22:\",\",23:\"[\",24:\"]\"},\nproductions_: [0,[3,1],[5,1],[7,1],[9,1],[9,1],[12,2],[13,1],[13,1],[13,1],[13,1],[13,1],[13,1],[15,2],[15,3],[20,3],[19,1],[19,3],[16,2],[16,3],[25,1],[25,3]],\nperformAction: function anonymous(yytext, yyleng, yylineno, yy, yystate /* action[1] */, $$ /* vstack */, _$ /* lstack */) {\n/* this == yyval */\n\nvar $0 = $$.length - 1;\nswitch (yystate) {\ncase 1:\n // replace escaped characters with actual character\n this.$ = new String(yytext.replace(/\\\\(\\\\|\")/g, \"$\"+\"1\")\n .replace(/\\\\n/g,'\\n')\n .replace(/\\\\r/g,'\\r')\n .replace(/\\\\t/g,'\\t')\n .replace(/\\\\v/g,'\\v')\n .replace(/\\\\f/g,'\\f')\n .replace(/\\\\b/g,'\\b'));\n this.$.__line__ = this._$.first_line;\n \nbreak;\ncase 2:\n\n this.$ = new Number(yytext);\n this.$.__line__ = this._$.first_line;\n \nbreak;\ncase 3:\n\n this.$ = null;\n \nbreak;\ncase 4:\n\n this.$ = new Boolean(true);\n this.$.__line__ = this._$.first_line;\n \nbreak;\ncase 5:\n\n this.$ = new Boolean(false);\n this.$.__line__ = this._$.first_line;\n \nbreak;\ncase 6:\nreturn this.$ = $$[$0-1];\nbreak;\ncase 13:\nthis.$ = {}; Object.defineProperty(this.$, '__line__', {\n value: this._$.first_line,\n enumerable: false\n })\nbreak;\ncase 14: case 19:\nthis.$ = $$[$0-1]; Object.defineProperty(this.$, '__line__', {\n value: this._$.first_line,\n enumerable: false\n })\nbreak;\ncase 15:\nthis.$ = [$$[$0-2], $$[$0]];\nbreak;\ncase 16:\nthis.$ = {}; this.$[$$[$0][0]] = $$[$0][1];\nbreak;\ncase 17:\nthis.$ = $$[$0-2]; $$[$0-2][$$[$0][0]] = $$[$0][1];\nbreak;\ncase 18:\nthis.$ = []; Object.defineProperty(this.$, '__line__', {\n value: this._$.first_line,\n enumerable: false\n })\nbreak;\ncase 20:\nthis.$ = [$$[$0]];\nbreak;\ncase 21:\nthis.$ = $$[$0-2]; $$[$0-2].push($$[$0]);\nbreak;\n}\n},\ntable: [{3:5,4:$V0,5:6,6:$V1,7:3,8:$V2,9:4,10:$V3,11:$V4,12:1,13:2,15:7,16:8,17:$V5,23:$V6},{1:[3]},{14:[1,16]},o($V7,[2,7]),o($V7,[2,8]),o($V7,[2,9]),o($V7,[2,10]),o($V7,[2,11]),o($V7,[2,12]),o($V7,[2,3]),o($V7,[2,4]),o($V7,[2,5]),o([14,18,21,22,24],[2,1]),o($V7,[2,2]),{3:20,4:$V0,18:[1,17],19:18,20:19},{3:5,4:$V0,5:6,6:$V1,7:3,8:$V2,9:4,10:$V3,11:$V4,13:23,15:7,16:8,17:$V5,23:$V6,24:[1,21],25:22},{1:[2,6]},o($V7,[2,13]),{18:[1,24],22:[1,25]},o($V8,[2,16]),{21:[1,26]},o($V7,[2,18]),{22:[1,28],24:[1,27]},o($V9,[2,20]),o($V7,[2,14]),{3:20,4:$V0,20:29},{3:5,4:$V0,5:6,6:$V1,7:3,8:$V2,9:4,10:$V3,11:$V4,13:30,15:7,16:8,17:$V5,23:$V6},o($V7,[2,19]),{3:5,4:$V0,5:6,6:$V1,7:3,8:$V2,9:4,10:$V3,11:$V4,13:31,15:7,16:8,17:$V5,23:$V6},o($V8,[2,17]),o($V8,[2,15]),o($V9,[2,21])],\ndefaultActions: {16:[2,6]},\nparseError: function parseError(str, hash) {\n if (hash.recoverable) {\n this.trace(str);\n } else {\n throw new Error(str);\n }\n},\nparse: function parse(input) {\n var self = this, stack = [0], tstack = [], vstack = [null], lstack = [], table = this.table, yytext = '', yylineno = 0, yyleng = 0, recovering = 0, TERROR = 2, EOF = 1;\n var args = lstack.slice.call(arguments, 1);\n var lexer = Object.create(this.lexer);\n var sharedState = { yy: {} };\n for (var k in this.yy) {\n if (Object.prototype.hasOwnProperty.call(this.yy, k)) {\n sharedState.yy[k] = this.yy[k];\n }\n }\n lexer.setInput(input, sharedState.yy);\n sharedState.yy.lexer = lexer;\n sharedState.yy.parser = this;\n if (typeof lexer.yylloc == 'undefined') {\n lexer.yylloc = {};\n }\n var yyloc = lexer.yylloc;\n lstack.push(yyloc);\n var ranges = lexer.options && lexer.options.ranges;\n if (typeof sharedState.yy.parseError === 'function') {\n this.parseError = sharedState.yy.parseError;\n } else {\n this.parseError = Object.getPrototypeOf(this).parseError;\n }\n function popStack(n) {\n stack.length = stack.length - 2 * n;\n vstack.length = vstack.length - n;\n lstack.length = lstack.length - n;\n }\n _token_stack:\n function lex() {\n var token;\n token = lexer.lex() || EOF;\n if (typeof token !== 'number') {\n token = self.symbols_[token] || token;\n }\n return token;\n }\n var symbol, preErrorSymbol, state, action, a, r, yyval = {}, p, len, newState, expected;\n while (true) {\n state = stack[stack.length - 1];\n if (this.defaultActions[state]) {\n action = this.defaultActions[state];\n } else {\n if (symbol === null || typeof symbol == 'undefined') {\n symbol = lex();\n }\n action = table[state] && table[state][symbol];\n }\n if (typeof action === 'undefined' || !action.length || !action[0]) {\n var errStr = '';\n expected = [];\n for (p in table[state]) {\n if (this.terminals_[p] && p > TERROR) {\n expected.push('\\'' + this.terminals_[p] + '\\'');\n }\n }\n if (lexer.showPosition) {\n errStr = 'Parse error on line ' + (yylineno + 1) + ':\\n' + lexer.showPosition() + '\\nExpecting ' + expected.join(', ') + ', got \\'' + (this.terminals_[symbol] || symbol) + '\\'';\n } else {\n errStr = 'Parse error on line ' + (yylineno + 1) + ': Unexpected ' + (symbol == EOF ? 'end of input' : '\\'' + (this.terminals_[symbol] || symbol) + '\\'');\n }\n this.parseError(errStr, {\n text: lexer.match,\n token: this.terminals_[symbol] || symbol,\n line: lexer.yylineno,\n loc: yyloc,\n expected: expected\n });\n }\n if (action[0] instanceof Array && action.length > 1) {\n throw new Error('Parse Error: multiple actions possible at state: ' + state + ', token: ' + symbol);\n }\n switch (action[0]) {\n case 1:\n stack.push(symbol);\n vstack.push(lexer.yytext);\n lstack.push(lexer.yylloc);\n stack.push(action[1]);\n symbol = null;\n if (!preErrorSymbol) {\n yyleng = lexer.yyleng;\n yytext = lexer.yytext;\n yylineno = lexer.yylineno;\n yyloc = lexer.yylloc;\n if (recovering > 0) {\n recovering--;\n }\n } else {\n symbol = preErrorSymbol;\n preErrorSymbol = null;\n }\n break;\n case 2:\n len = this.productions_[action[1]][1];\n yyval.$ = vstack[vstack.length - len];\n yyval._$ = {\n first_line: lstack[lstack.length - (len || 1)].first_line,\n last_line: lstack[lstack.length - 1].last_line,\n first_column: lstack[lstack.length - (len || 1)].first_column,\n last_column: lstack[lstack.length - 1].last_column\n };\n if (ranges) {\n yyval._$.range = [\n lstack[lstack.length - (len || 1)].range[0],\n lstack[lstack.length - 1].range[1]\n ];\n }\n r = this.performAction.apply(yyval, [\n yytext,\n yyleng,\n yylineno,\n sharedState.yy,\n action[1],\n vstack,\n lstack\n ].concat(args));\n if (typeof r !== 'undefined') {\n return r;\n }\n if (len) {\n stack = stack.slice(0, -1 * len * 2);\n vstack = vstack.slice(0, -1 * len);\n lstack = lstack.slice(0, -1 * len);\n }\n stack.push(this.productions_[action[1]][0]);\n vstack.push(yyval.$);\n lstack.push(yyval._$);\n newState = table[stack[stack.length - 2]][stack[stack.length - 1]];\n stack.push(newState);\n break;\n case 3:\n return true;\n }\n }\n return true;\n}};\n/* generated by jison-lex 0.3.4 */\nvar lexer = (function(){\nvar lexer = ({\n\nEOF:1,\n\nparseError:function parseError(str, hash) {\n if (this.yy.parser) {\n this.yy.parser.parseError(str, hash);\n } else {\n throw new Error(str);\n }\n },\n\n// resets the lexer, sets new input\nsetInput:function (input, yy) {\n this.yy = yy || this.yy || {};\n this._input = input;\n this._more = this._backtrack = this.done = false;\n this.yylineno = this.yyleng = 0;\n this.yytext = this.matched = this.match = '';\n this.conditionStack = ['INITIAL'];\n this.yylloc = {\n first_line: 1,\n first_column: 0,\n last_line: 1,\n last_column: 0\n };\n if (this.options.ranges) {\n this.yylloc.range = [0,0];\n }\n this.offset = 0;\n return this;\n },\n\n// consumes and returns one char from the input\ninput:function () {\n var ch = this._input[0];\n this.yytext += ch;\n this.yyleng++;\n this.offset++;\n this.match += ch;\n this.matched += ch;\n var lines = ch.match(/(?:\\r\\n?|\\n).*/g);\n if (lines) {\n this.yylineno++;\n this.yylloc.last_line++;\n } else {\n this.yylloc.last_column++;\n }\n if (this.options.ranges) {\n this.yylloc.range[1]++;\n }\n\n this._input = this._input.slice(1);\n return ch;\n },\n\n// unshifts one char (or a string) into the input\nunput:function (ch) {\n var len = ch.length;\n var lines = ch.split(/(?:\\r\\n?|\\n)/g);\n\n this._input = ch + this._input;\n this.yytext = this.yytext.substr(0, this.yytext.length - len);\n //this.yyleng -= len;\n this.offset -= len;\n var oldLines = this.match.split(/(?:\\r\\n?|\\n)/g);\n this.match = this.match.substr(0, this.match.length - 1);\n this.matched = this.matched.substr(0, this.matched.length - 1);\n\n if (lines.length - 1) {\n this.yylineno -= lines.length - 1;\n }\n var r = this.yylloc.range;\n\n this.yylloc = {\n first_line: this.yylloc.first_line,\n last_line: this.yylineno + 1,\n first_column: this.yylloc.first_column,\n last_column: lines ?\n (lines.length === oldLines.length ? this.yylloc.first_column : 0)\n + oldLines[oldLines.length - lines.length].length - lines[0].length :\n this.yylloc.first_column - len\n };\n\n if (this.options.ranges) {\n this.yylloc.range = [r[0], r[0] + this.yyleng - len];\n }\n this.yyleng = this.yytext.length;\n return this;\n },\n\n// When called from action, caches matched text and appends it on next action\nmore:function () {\n this._more = true;\n return this;\n },\n\n// When called from action, signals the lexer that this rule fails to match the input, so the next matching rule (regex) should be tested instead.\nreject:function () {\n if (this.options.backtrack_lexer) {\n this._backtrack = true;\n } else {\n return this.parseError('Lexical error on line ' + (this.yylineno + 1) + '. You can only invoke reject() in the lexer when the lexer is of the backtracking persuasion (options.backtrack_lexer = true).\\n' + this.showPosition(), {\n text: \"\",\n token: null,\n line: this.yylineno\n });\n\n }\n return this;\n },\n\n// retain first n characters of the match\nless:function (n) {\n this.unput(this.match.slice(n));\n },\n\n// displays already matched input, i.e. for error messages\npastInput:function () {\n var past = this.matched.substr(0, this.matched.length - this.match.length);\n return (past.length > 20 ? '...':'') + past.substr(-20).replace(/\\n/g, \"\");\n },\n\n// displays upcoming input, i.e. for error messages\nupcomingInput:function () {\n var next = this.match;\n if (next.length < 20) {\n next += this._input.substr(0, 20-next.length);\n }\n return (next.substr(0,20) + (next.length > 20 ? '...' : '')).replace(/\\n/g, \"\");\n },\n\n// displays the character position where the lexing error occurred, i.e. for error messages\nshowPosition:function () {\n var pre = this.pastInput();\n var c = new Array(pre.length + 1).join(\"-\");\n return pre + this.upcomingInput() + \"\\n\" + c + \"^\";\n },\n\n// test the lexed token: return FALSE when not a match, otherwise return token\ntest_match:function (match, indexed_rule) {\n var token,\n lines,\n backup;\n\n if (this.options.backtrack_lexer) {\n // save context\n backup = {\n yylineno: this.yylineno,\n yylloc: {\n first_line: this.yylloc.first_line,\n last_line: this.last_line,\n first_column: this.yylloc.first_column,\n last_column: this.yylloc.last_column\n },\n yytext: this.yytext,\n match: this.match,\n matches: this.matches,\n matched: this.matched,\n yyleng: this.yyleng,\n offset: this.offset,\n _more: this._more,\n _input: this._input,\n yy: this.yy,\n conditionStack: this.conditionStack.slice(0),\n done: this.done\n };\n if (this.options.ranges) {\n backup.yylloc.range = this.yylloc.range.slice(0);\n }\n }\n\n lines = match[0].match(/(?:\\r\\n?|\\n).*/g);\n if (lines) {\n this.yylineno += lines.length;\n }\n this.yylloc = {\n first_line: this.yylloc.last_line,\n last_line: this.yylineno + 1,\n first_column: this.yylloc.last_column,\n last_column: lines ?\n lines[lines.length - 1].length - lines[lines.length - 1].match(/\\r?\\n?/)[0].length :\n this.yylloc.last_column + match[0].length\n };\n this.yytext += match[0];\n this.match += match[0];\n this.matches = match;\n this.yyleng = this.yytext.length;\n if (this.options.ranges) {\n this.yylloc.range = [this.offset, this.offset += this.yyleng];\n }\n this._more = false;\n this._backtrack = false;\n this._input = this._input.slice(match[0].length);\n this.matched += match[0];\n token = this.performAction.call(this, this.yy, this, indexed_rule, this.conditionStack[this.conditionStack.length - 1]);\n if (this.done && this._input) {\n this.done = false;\n }\n if (token) {\n return token;\n } else if (this._backtrack) {\n // recover context\n for (var k in backup) {\n this[k] = backup[k];\n }\n return false; // rule action called reject() implying the next rule should be tested instead.\n }\n return false;\n },\n\n// return next match in input\nnext:function () {\n if (this.done) {\n return this.EOF;\n }\n if (!this._input) {\n this.done = true;\n }\n\n var token,\n match,\n tempMatch,\n index;\n if (!this._more) {\n this.yytext = '';\n this.match = '';\n }\n var rules = this._currentRules();\n for (var i = 0; i < rules.length; i++) {\n tempMatch = this._input.match(this.rules[rules[i]]);\n if (tempMatch && (!match || tempMatch[0].length > match[0].length)) {\n match = tempMatch;\n index = i;\n if (this.options.backtrack_lexer) {\n token = this.test_match(tempMatch, rules[i]);\n if (token !== false) {\n return token;\n } else if (this._backtrack) {\n match = false;\n continue; // rule action called reject() implying a rule MISmatch.\n } else {\n // else: this is a lexer rule which consumes input without producing a token (e.g. whitespace)\n return false;\n }\n } else if (!this.options.flex) {\n break;\n }\n }\n }\n if (match) {\n token = this.test_match(match, rules[index]);\n if (token !== false) {\n return token;\n }\n // else: this is a lexer rule which consumes input without producing a token (e.g. whitespace)\n return false;\n }\n if (this._input === \"\") {\n return this.EOF;\n } else {\n return this.parseError('Lexical error on line ' + (this.yylineno + 1) + '. Unrecognized text.\\n' + this.showPosition(), {\n text: \"\",\n token: null,\n line: this.yylineno\n });\n }\n },\n\n// return next match that has a token\nlex:function lex() {\n var r = this.next();\n if (r) {\n return r;\n } else {\n return this.lex();\n }\n },\n\n// activates a new lexer condition state (pushes the new lexer condition state onto the condition stack)\nbegin:function begin(condition) {\n this.conditionStack.push(condition);\n },\n\n// pop the previously active lexer condition state off the condition stack\npopState:function popState() {\n var n = this.conditionStack.length - 1;\n if (n > 0) {\n return this.conditionStack.pop();\n } else {\n return this.conditionStack[0];\n }\n },\n\n// produce the lexer rule set which is active for the currently active lexer condition state\n_currentRules:function _currentRules() {\n if (this.conditionStack.length && this.conditionStack[this.conditionStack.length - 1]) {\n return this.conditions[this.conditionStack[this.conditionStack.length - 1]].rules;\n } else {\n return this.conditions[\"INITIAL\"].rules;\n }\n },\n\n// return the currently active lexer condition state; when an index argument is provided it produces the N-th previous condition state, if available\ntopState:function topState(n) {\n n = this.conditionStack.length - 1 - Math.abs(n || 0);\n if (n >= 0) {\n return this.conditionStack[n];\n } else {\n return \"INITIAL\";\n }\n },\n\n// alias for begin(condition)\npushState:function pushState(condition) {\n this.begin(condition);\n },\n\n// return the number of states currently on the stack\nstateStackSize:function stateStackSize() {\n return this.conditionStack.length;\n },\noptions: {},\nperformAction: function anonymous(yy,yy_,$avoiding_name_collisions,YY_START) {\nvar YYSTATE=YY_START;\nswitch($avoiding_name_collisions) {\ncase 0:/* skip whitespace */\nbreak;\ncase 1:return 6\nbreak;\ncase 2:yy_.yytext = yy_.yytext.substr(1,yy_.yyleng-2); return 4\nbreak;\ncase 3:return 17\nbreak;\ncase 4:return 18\nbreak;\ncase 5:return 23\nbreak;\ncase 6:return 24\nbreak;\ncase 7:return 22\nbreak;\ncase 8:return 21\nbreak;\ncase 9:return 10\nbreak;\ncase 10:return 11\nbreak;\ncase 11:return 8\nbreak;\ncase 12:return 14\nbreak;\ncase 13:return 'INVALID'\nbreak;\n}\n},\nrules: [/^(?:\\s+)/,/^(?:(-?([0-9]|[1-9][0-9]+))(\\.[0-9]+)?([eE][-+]?[0-9]+)?\\b)/,/^(?:\"(?:\\\\[\\\\\"bfnrt/]|\\\\u[a-fA-F0-9]{4}|[^\\\\\\0-\\x09\\x0a-\\x1f\"])*\")/,/^(?:\\{)/,/^(?:\\})/,/^(?:\\[)/,/^(?:\\])/,/^(?:,)/,/^(?::)/,/^(?:true\\b)/,/^(?:false\\b)/,/^(?:null\\b)/,/^(?:$)/,/^(?:.)/],\nconditions: {\"INITIAL\":{\"rules\":[0,1,2,3,4,5,6,7,8,9,10,11,12,13],\"inclusive\":true}}\n});\nreturn lexer;\n})();\nparser.lexer = lexer;\nfunction Parser () {\n this.yy = {};\n}\nParser.prototype = parser;parser.Parser = Parser;\nreturn new Parser;\n})();\n\n\nif (typeof require !== 'undefined' && typeof exports !== 'undefined') {\nexports.parser = parser;\nexports.Parser = parser.Parser;\nexports.parse = function () { return parser.parse.apply(parser, arguments); };\n}\n","import ParsingError from './error/parsing_error.js';\nimport jsonlint from '@mapbox/jsonlint-lines-primitives';\n\nexport default function readStyle(style) {\n if (style instanceof String || typeof style === 'string' || style instanceof Buffer) {\n try {\n return jsonlint.parse(style.toString());\n } catch (e) {\n throw new ParsingError(e);\n }\n }\n\n return style;\n}\n","\nimport validateStyleMin from './validate_style.min.js';\nimport {v8} from './style-spec.js';\nimport readStyle from './read_style.js';\n\n/**\n * Validate a Mapbox GL style against the style specification.\n *\n * @private\n * @alias validate\n * @param {Object|String|Buffer} style The style to be validated. If a `String`\n * or `Buffer` is provided, the returned errors will contain line numbers.\n * @param {Object} [styleSpec] The style specification to validate against.\n * If omitted, the spec version is inferred from the stylesheet.\n * @returns {Array}\n * @example\n * var validate = require('mapbox-gl-style-spec').validate;\n * var style = fs.readFileSync('./style.json', 'utf8');\n * var errors = validate(style);\n */\n\nexport default function validateStyle(style, styleSpec = v8) {\n let s = style;\n\n try {\n s = readStyle(s);\n } catch (e) {\n return [e];\n }\n\n return validateStyleMin(s, styleSpec);\n}\n\nexport const source = validateStyleMin.source;\nexport const light = validateStyleMin.light;\nexport const layer = validateStyleMin.layer;\nexport const filter = validateStyleMin.filter;\nexport const paintProperty = validateStyleMin.paintProperty;\nexport const layoutProperty = validateStyleMin.layoutProperty;\n","// @flow\n\nimport validateStyle from './validate_style.min.js';\nimport {v8} from './style-spec.js';\nimport readStyle from './read_style.js';\nimport ValidationError from './error/validation_error.js';\nimport getType from './util/get_type.js';\n\nconst SUPPORTED_SPEC_VERSION = 8;\nconst MAX_SOURCES_IN_STYLE = 15;\n\nfunction isValid(value: ?string, regex: RegExp): boolean {\n if (!value || getType(value) !== 'string') return true;\n return !!value.match(regex);\n}\n\nfunction getSourceCount(source: Object): number {\n if (source.url) {\n return source.url.split(',').length;\n } else {\n return 0;\n }\n}\n\nfunction getAllowedKeyErrors(obj: Object, keys: Array<*>, path: ?string): Array {\n const allowed = new Set(keys);\n const errors = [];\n Object.keys(obj).forEach(k => {\n if (!allowed.has(k)) {\n const prop = path ? `${path}.${k}` : null;\n errors.push(new ValidationError(prop, obj[k], `Unsupported property \"${k}\"`));\n }\n });\n return errors;\n}\n\nconst acceptedSourceTypes = new Set([\"vector\", \"raster\", \"raster-dem\"]);\nfunction getSourceErrors(source: Object, i: number): Array {\n const errors = [];\n\n /*\n * Inlined sources are not supported by the Mapbox Styles API, so only\n * \"type\", \"url\", and \"tileSize\" properties are valid\n */\n const sourceKeys = ['type', 'url', 'tileSize'];\n errors.push(...getAllowedKeyErrors(source, sourceKeys, 'source'));\n\n /*\n * \"type\" is required and must be one of \"vector\", \"raster\", \"raster-dem\"\n */\n if (!acceptedSourceTypes.has(String(source.type))) {\n errors.push(new ValidationError(`sources[${i}].type`, source.type, `Expected one of [${Array.from(acceptedSourceTypes).join(\", \")}]`));\n }\n\n /*\n * \"source\" is required. Valid examples:\n * mapbox://mapbox.abcd1234\n * mapbox://penny.abcd1234\n * mapbox://mapbox.abcd1234,penny.abcd1234\n */\n const sourceUrlPattern = /^mapbox:\\/\\/([^/]*)$/;\n if (!source.url || !isValid(source.url, sourceUrlPattern)) {\n errors.push(new ValidationError(`sources[${i}].url`, source.url, 'Expected a valid Mapbox tileset url'));\n }\n\n return errors;\n}\n\nfunction getSourcesErrors(sources: Object): Array {\n const errors = [];\n let count = 0;\n\n Object.keys(sources).forEach((s: string, i: number) => {\n const sourceErrors = getSourceErrors(sources[s], i);\n\n // If source has errors, skip counting\n if (!sourceErrors.length) {\n count = count + getSourceCount(sources[s]);\n }\n\n errors.push(...sourceErrors);\n });\n\n if (count > MAX_SOURCES_IN_STYLE) {\n errors.push(new ValidationError('sources', null, `Styles must contain ${MAX_SOURCES_IN_STYLE} or fewer sources`));\n }\n\n return errors;\n}\n\nfunction getRootErrors(style: Object, specKeys: Array): Array {\n const errors = [];\n\n /*\n * The following keys are optional but fully managed by the Mapbox Styles\n * API. Values on stylesheet on POST or PATCH will be ignored: \"owner\",\n * \"id\", \"cacheControl\", \"draft\", \"created\", \"modified\"\n *\n * The following keys are optional. The Mapbox Styles API respects value on\n * stylesheet on PATCH, but ignores the value on POST: \"visibility\"\n */\n const optionalRootProperties = [\n 'owner',\n 'id',\n 'cacheControl',\n 'draft',\n 'created',\n 'modified',\n 'visibility'\n ];\n\n const allowedKeyErrors = getAllowedKeyErrors(style, [...specKeys, ...optionalRootProperties]);\n errors.push(...allowedKeyErrors);\n\n if (style.version > SUPPORTED_SPEC_VERSION || style.version < SUPPORTED_SPEC_VERSION) {\n errors.push(new ValidationError('version', style.version, `Style version must be ${SUPPORTED_SPEC_VERSION}`));\n }\n\n /*\n * \"glyphs\" is optional. If present, valid examples:\n * mapbox://fonts/penny/{fontstack}/{range}.pbf\n * mapbox://fonts/mapbox/{fontstack}/{range}.pbf\n */\n const glyphUrlPattern = /^mapbox:\\/\\/fonts\\/([^/]*)\\/{fontstack}\\/{range}.pbf$/;\n if (!isValid(style.glyphs, glyphUrlPattern)) {\n errors.push(new ValidationError('glyphs', style.glyphs, 'Styles must reference glyphs hosted by Mapbox'));\n }\n\n /*\n * \"sprite\" is optional. If present, valid examples:\n * mapbox://sprites/penny/abcd1234\n * mapbox://sprites/mapbox/abcd1234/draft\n * mapbox://sprites/cyrus/abcd1234/abcd1234\n */\n const spriteUrlPattern = /^mapbox:\\/\\/sprites\\/([^/]*)\\/([^/]*)\\/?([^/]*)?$/;\n if (!isValid(style.sprite, spriteUrlPattern)) {\n errors.push(new ValidationError('sprite', style.sprite, 'Styles must reference sprites hosted by Mapbox'));\n }\n\n /*\n * \"visibility\" is optional. If present, valid examples:\n * \"private\"\n * \"public\"\n */\n const visibilityPattern = /^(public|private)$/;\n if (!isValid(style.visibility, visibilityPattern)) {\n errors.push(new ValidationError('visibility', style.visibility, 'Style visibility must be public or private'));\n }\n\n return errors;\n}\n\n/**\n * Validate a Mapbox GL style against the style specification and check for\n * compatibility with the Mapbox Styles API.\n *\n * @param {Object} style The style to be validated.\n * @returns {Array}\n * @example\n * var validateMapboxApiSupported = require('mapbox-gl-style-spec/lib/validate_style_mapbox_api_supported.js');\n * var errors = validateMapboxApiSupported(style);\n */\nexport default function validateMapboxApiSupported(style: Object): Array {\n let s = style;\n try {\n s = readStyle(s);\n } catch (e) {\n return [e];\n }\n\n let errors = validateStyle(s, v8)\n .concat(getRootErrors(s, Object.keys(v8.$root)));\n\n if (s.sources) {\n errors = errors.concat(getSourcesErrors(s.sources));\n }\n\n return errors;\n}\n","// @flow\n\ntype ExpressionType = 'data-driven' | 'cross-faded' | 'cross-faded-data-driven' | 'color-ramp' | 'data-constant' | 'constant';\ntype ExpressionParameters = Array<'zoom' | 'feature' | 'feature-state' | 'heatmap-density' | 'line-progress' | 'sky-radial-progress'>;\n\ntype ExpressionSpecification = {\n interpolated: boolean,\n parameters: ExpressionParameters\n}\n\nexport type StylePropertySpecification = {\n type: 'number',\n 'property-type': ExpressionType,\n expression?: ExpressionSpecification,\n transition: boolean,\n default?: number\n} | {\n type: 'string',\n 'property-type': ExpressionType,\n expression?: ExpressionSpecification,\n transition: boolean,\n default?: string,\n tokens?: boolean\n} | {\n type: 'boolean',\n 'property-type': ExpressionType,\n expression?: ExpressionSpecification,\n transition: boolean,\n default?: boolean\n} | {\n type: 'enum',\n 'property-type': ExpressionType,\n expression?: ExpressionSpecification,\n values: {[_: string]: {}},\n transition: boolean,\n default?: string\n} | {\n type: 'color',\n 'property-type': ExpressionType,\n expression?: ExpressionSpecification,\n transition: boolean,\n default?: string,\n overridable: boolean\n} | {\n type: 'array',\n value: 'number',\n 'property-type': ExpressionType,\n expression?: ExpressionSpecification,\n length?: number,\n transition: boolean,\n default?: Array\n} | {\n type: 'array',\n value: 'string',\n 'property-type': ExpressionType,\n expression?: ExpressionSpecification,\n length?: number,\n transition: boolean,\n default?: Array\n};\n\nimport v8 from './reference/v8.json';\nimport latest from './reference/latest.js';\nimport format from './format.js';\nimport migrate from './migrate.js';\nimport composite from './composite.js';\nimport derefLayers from './deref.js';\nimport diff from './diff.js';\nimport ValidationError from './error/validation_error.js';\nimport ParsingError from './error/parsing_error.js';\nimport {StyleExpression, isExpression, createExpression, createPropertyExpression, normalizePropertyExpression, ZoomConstantExpression, ZoomDependentExpression, StylePropertyFunction} from './expression/index.js';\nimport featureFilter, {isExpressionFilter} from './feature_filter/index.js';\n\nimport convertFilter from './feature_filter/convert.js';\nimport Color from './util/color.js';\nimport {createFunction, isFunction} from './function/index.js';\nimport convertFunction from './function/convert.js';\nimport {eachSource, eachLayer, eachProperty} from './visit.js';\n\nimport validate from './validate_style.js';\nimport validateMapboxApiSupported from './validate_mapbox_api_supported.js';\n\nconst expression = {\n StyleExpression,\n isExpression,\n isExpressionFilter,\n createExpression,\n createPropertyExpression,\n normalizePropertyExpression,\n ZoomConstantExpression,\n ZoomDependentExpression,\n StylePropertyFunction\n};\n\nconst styleFunction = {\n convertFunction,\n createFunction,\n isFunction\n};\n\nconst visit = {eachSource, eachLayer, eachProperty};\n\nexport {\n v8,\n latest,\n format,\n migrate,\n composite,\n derefLayers,\n diff,\n ValidationError,\n ParsingError,\n expression,\n featureFilter,\n convertFilter,\n Color,\n styleFunction as function,\n validate,\n validateMapboxApiSupported,\n visit\n};\n\nvalidate.parsed = validate;\nvalidate.latest = validate;\n",null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,"import $ol$AssertionError from './ol/AssertionError.js';\nimport {CollectionEvent as _ol_Collection$CollectionEvent} from './ol/Collection.js';\nimport $ol$Collection from './ol/Collection.js';\nimport $ol$DataTile from './ol/DataTile.js';\nimport $ol$Disposable from './ol/Disposable.js';\nimport $ol$Feature from './ol/Feature.js';\nimport {createStyleFunction as _ol_Feature$createStyleFunction} from './ol/Feature.js';\nimport $ol$Geolocation from './ol/Geolocation.js';\nimport $ol$Image from './ol/Image.js';\nimport {listenImage as _ol_Image$listenImage} from './ol/Image.js';\nimport $ol$ImageBase from './ol/ImageBase.js';\nimport $ol$ImageCanvas from './ol/ImageCanvas.js';\nimport $ol$ImageTile from './ol/ImageTile.js';\nimport $ol$Kinetic from './ol/Kinetic.js';\nimport $ol$Map from './ol/Map.js';\nimport $ol$MapBrowserEvent from './ol/MapBrowserEvent.js';\nimport $ol$MapBrowserEventHandler from './ol/MapBrowserEventHandler.js';\nimport $ol$MapEvent from './ol/MapEvent.js';\nimport {ObjectEvent as _ol_Object$ObjectEvent} from './ol/Object.js';\nimport $ol$Object from './ol/Object.js';\nimport $ol$Observable from './ol/Observable.js';\nimport {unByKey as _ol_Observable$unByKey} from './ol/Observable.js';\nimport $ol$Overlay from './ol/Overlay.js';\nimport $ol$PluggableMap from './ol/PluggableMap.js';\nimport $ol$Tile from './ol/Tile.js';\nimport $ol$TileCache from './ol/TileCache.js';\nimport $ol$TileQueue from './ol/TileQueue.js';\nimport {getTilePriority as _ol_TileQueue$getTilePriority} from './ol/TileQueue.js';\nimport $ol$TileRange from './ol/TileRange.js';\nimport {createOrUpdate as _ol_TileRange$createOrUpdate} from './ol/TileRange.js';\nimport $ol$VectorRenderTile from './ol/VectorRenderTile.js';\nimport $ol$VectorTile from './ol/VectorTile.js';\nimport $ol$View from './ol/View.js';\nimport {createCenterConstraint as _ol_View$createCenterConstraint} from './ol/View.js';\nimport {createResolutionConstraint as _ol_View$createResolutionConstraint} from './ol/View.js';\nimport {createRotationConstraint as _ol_View$createRotationConstraint} from './ol/View.js';\nimport {isNoopAnimation as _ol_View$isNoopAnimation} from './ol/View.js';\nimport {binarySearch as _ol_array$binarySearch} from './ol/array.js';\nimport {numberSafeCompareFunction as _ol_array$numberSafeCompareFunction} from './ol/array.js';\nimport {includes as _ol_array$includes} from './ol/array.js';\nimport {linearFindNearest as _ol_array$linearFindNearest} from './ol/array.js';\nimport {reverseSubArray as _ol_array$reverseSubArray} from './ol/array.js';\nimport {extend as _ol_array$extend} from './ol/array.js';\nimport {remove as _ol_array$remove} from './ol/array.js';\nimport {find as _ol_array$find} from './ol/array.js';\nimport {equals as _ol_array$equals} from './ol/array.js';\nimport {stableSort as _ol_array$stableSort} from './ol/array.js';\nimport {findIndex as _ol_array$findIndex} from './ol/array.js';\nimport {isSorted as _ol_array$isSorted} from './ol/array.js';\nimport {assert as _ol_asserts$assert} from './ol/asserts.js';\nimport {createExtent as _ol_centerconstraint$createExtent} from './ol/centerconstraint.js';\nimport {none as _ol_centerconstraint$none} from './ol/centerconstraint.js';\nimport {asString as _ol_color$asString} from './ol/color.js';\nimport {fromString as _ol_color$fromString} from './ol/color.js';\nimport {asArray as _ol_color$asArray} from './ol/color.js';\nimport {normalize as _ol_color$normalize} from './ol/color.js';\nimport {toString as _ol_color$toString} from './ol/color.js';\nimport {isStringColor as _ol_color$isStringColor} from './ol/color.js';\nimport {asColorLike as _ol_colorlike$asColorLike} from './ol/colorlike.js';\nimport {defaults as _ol_control$defaults} from './ol/control.js';\nimport {add as _ol_coordinate$add} from './ol/coordinate.js';\nimport {closestOnCircle as _ol_coordinate$closestOnCircle} from './ol/coordinate.js';\nimport {closestOnSegment as _ol_coordinate$closestOnSegment} from './ol/coordinate.js';\nimport {createStringXY as _ol_coordinate$createStringXY} from './ol/coordinate.js';\nimport {degreesToStringHDMS as _ol_coordinate$degreesToStringHDMS} from './ol/coordinate.js';\nimport {format as _ol_coordinate$format} from './ol/coordinate.js';\nimport {equals as _ol_coordinate$equals} from './ol/coordinate.js';\nimport {rotate as _ol_coordinate$rotate} from './ol/coordinate.js';\nimport {scale as _ol_coordinate$scale} from './ol/coordinate.js';\nimport {squaredDistance as _ol_coordinate$squaredDistance} from './ol/coordinate.js';\nimport {distance as _ol_coordinate$distance} from './ol/coordinate.js';\nimport {squaredDistanceToSegment as _ol_coordinate$squaredDistanceToSegment} from './ol/coordinate.js';\nimport {toStringHDMS as _ol_coordinate$toStringHDMS} from './ol/coordinate.js';\nimport {toStringXY as _ol_coordinate$toStringXY} from './ol/coordinate.js';\nimport {wrapX as _ol_coordinate$wrapX} from './ol/coordinate.js';\nimport {getWorldsAway as _ol_coordinate$getWorldsAway} from './ol/coordinate.js';\nimport {CLASS_HIDDEN as _ol_css$CLASS_HIDDEN} from './ol/css.js';\nimport {CLASS_SELECTABLE as _ol_css$CLASS_SELECTABLE} from './ol/css.js';\nimport {CLASS_UNSELECTABLE as _ol_css$CLASS_UNSELECTABLE} from './ol/css.js';\nimport {CLASS_UNSUPPORTED as _ol_css$CLASS_UNSUPPORTED} from './ol/css.js';\nimport {CLASS_CONTROL as _ol_css$CLASS_CONTROL} from './ol/css.js';\nimport {CLASS_COLLAPSED as _ol_css$CLASS_COLLAPSED} from './ol/css.js';\nimport {getFontParameters as _ol_css$getFontParameters} from './ol/css.js';\nimport {cssOpacity as _ol_css$cssOpacity} from './ol/css.js';\nimport {createCanvasContext2D as _ol_dom$createCanvasContext2D} from './ol/dom.js';\nimport {outerWidth as _ol_dom$outerWidth} from './ol/dom.js';\nimport {outerHeight as _ol_dom$outerHeight} from './ol/dom.js';\nimport {replaceNode as _ol_dom$replaceNode} from './ol/dom.js';\nimport {removeNode as _ol_dom$removeNode} from './ol/dom.js';\nimport {removeChildren as _ol_dom$removeChildren} from './ol/dom.js';\nimport {replaceChildren as _ol_dom$replaceChildren} from './ol/dom.js';\nimport {easeIn as _ol_easing$easeIn} from './ol/easing.js';\nimport {easeOut as _ol_easing$easeOut} from './ol/easing.js';\nimport {inAndOut as _ol_easing$inAndOut} from './ol/easing.js';\nimport {linear as _ol_easing$linear} from './ol/easing.js';\nimport {upAndDown as _ol_easing$upAndDown} from './ol/easing.js';\nimport {listen as _ol_events$listen} from './ol/events.js';\nimport {listenOnce as _ol_events$listenOnce} from './ol/events.js';\nimport {unlistenByKey as _ol_events$unlistenByKey} from './ol/events.js';\nimport {boundingExtent as _ol_extent$boundingExtent} from './ol/extent.js';\nimport {buffer as _ol_extent$buffer} from './ol/extent.js';\nimport {clone as _ol_extent$clone} from './ol/extent.js';\nimport {closestSquaredDistanceXY as _ol_extent$closestSquaredDistanceXY} from './ol/extent.js';\nimport {containsCoordinate as _ol_extent$containsCoordinate} from './ol/extent.js';\nimport {containsExtent as _ol_extent$containsExtent} from './ol/extent.js';\nimport {containsXY as _ol_extent$containsXY} from './ol/extent.js';\nimport {coordinateRelationship as _ol_extent$coordinateRelationship} from './ol/extent.js';\nimport {createEmpty as _ol_extent$createEmpty} from './ol/extent.js';\nimport {createOrUpdate as _ol_extent$createOrUpdate} from './ol/extent.js';\nimport {createOrUpdateEmpty as _ol_extent$createOrUpdateEmpty} from './ol/extent.js';\nimport {createOrUpdateFromCoordinate as _ol_extent$createOrUpdateFromCoordinate} from './ol/extent.js';\nimport {createOrUpdateFromCoordinates as _ol_extent$createOrUpdateFromCoordinates} from './ol/extent.js';\nimport {createOrUpdateFromFlatCoordinates as _ol_extent$createOrUpdateFromFlatCoordinates} from './ol/extent.js';\nimport {createOrUpdateFromRings as _ol_extent$createOrUpdateFromRings} from './ol/extent.js';\nimport {equals as _ol_extent$equals} from './ol/extent.js';\nimport {approximatelyEquals as _ol_extent$approximatelyEquals} from './ol/extent.js';\nimport {extend as _ol_extent$extend} from './ol/extent.js';\nimport {extendCoordinate as _ol_extent$extendCoordinate} from './ol/extent.js';\nimport {extendCoordinates as _ol_extent$extendCoordinates} from './ol/extent.js';\nimport {extendFlatCoordinates as _ol_extent$extendFlatCoordinates} from './ol/extent.js';\nimport {extendRings as _ol_extent$extendRings} from './ol/extent.js';\nimport {extendXY as _ol_extent$extendXY} from './ol/extent.js';\nimport {forEachCorner as _ol_extent$forEachCorner} from './ol/extent.js';\nimport {getArea as _ol_extent$getArea} from './ol/extent.js';\nimport {getBottomLeft as _ol_extent$getBottomLeft} from './ol/extent.js';\nimport {getBottomRight as _ol_extent$getBottomRight} from './ol/extent.js';\nimport {getCenter as _ol_extent$getCenter} from './ol/extent.js';\nimport {getCorner as _ol_extent$getCorner} from './ol/extent.js';\nimport {getEnlargedArea as _ol_extent$getEnlargedArea} from './ol/extent.js';\nimport {getForViewAndSize as _ol_extent$getForViewAndSize} from './ol/extent.js';\nimport {getHeight as _ol_extent$getHeight} from './ol/extent.js';\nimport {getIntersectionArea as _ol_extent$getIntersectionArea} from './ol/extent.js';\nimport {getIntersection as _ol_extent$getIntersection} from './ol/extent.js';\nimport {getMargin as _ol_extent$getMargin} from './ol/extent.js';\nimport {getSize as _ol_extent$getSize} from './ol/extent.js';\nimport {getTopLeft as _ol_extent$getTopLeft} from './ol/extent.js';\nimport {getTopRight as _ol_extent$getTopRight} from './ol/extent.js';\nimport {getWidth as _ol_extent$getWidth} from './ol/extent.js';\nimport {intersects as _ol_extent$intersects} from './ol/extent.js';\nimport {isEmpty as _ol_extent$isEmpty} from './ol/extent.js';\nimport {returnOrUpdate as _ol_extent$returnOrUpdate} from './ol/extent.js';\nimport {scaleFromCenter as _ol_extent$scaleFromCenter} from './ol/extent.js';\nimport {intersectsSegment as _ol_extent$intersectsSegment} from './ol/extent.js';\nimport {applyTransform as _ol_extent$applyTransform} from './ol/extent.js';\nimport {wrapX as _ol_extent$wrapX} from './ol/extent.js';\nimport {loadFeaturesXhr as _ol_featureloader$loadFeaturesXhr} from './ol/featureloader.js';\nimport {xhr as _ol_featureloader$xhr} from './ol/featureloader.js';\nimport {setWithCredentials as _ol_featureloader$setWithCredentials} from './ol/featureloader.js';\nimport {TRUE as _ol_functions$TRUE} from './ol/functions.js';\nimport {FALSE as _ol_functions$FALSE} from './ol/functions.js';\nimport {VOID as _ol_functions$VOID} from './ol/functions.js';\nimport {memoizeOne as _ol_functions$memoizeOne} from './ol/functions.js';\nimport {toPromise as _ol_functions$toPromise} from './ol/functions.js';\nimport {FIREFOX as _ol_has$FIREFOX} from './ol/has.js';\nimport {SAFARI as _ol_has$SAFARI} from './ol/has.js';\nimport {WEBKIT as _ol_has$WEBKIT} from './ol/has.js';\nimport {MAC as _ol_has$MAC} from './ol/has.js';\nimport {DEVICE_PIXEL_RATIO as _ol_has$DEVICE_PIXEL_RATIO} from './ol/has.js';\nimport {WORKER_OFFSCREEN_CANVAS as _ol_has$WORKER_OFFSCREEN_CANVAS} from './ol/has.js';\nimport {IMAGE_DECODE as _ol_has$IMAGE_DECODE} from './ol/has.js';\nimport {PASSIVE_EVENT_LISTENERS as _ol_has$PASSIVE_EVENT_LISTENERS} from './ol/has.js';\nimport {defaults as _ol_interaction$defaults} from './ol/interaction.js';\nimport {all as _ol_loadingstrategy$all} from './ol/loadingstrategy.js';\nimport {bbox as _ol_loadingstrategy$bbox} from './ol/loadingstrategy.js';\nimport {tile as _ol_loadingstrategy$tile} from './ol/loadingstrategy.js';\nimport {clamp as _ol_math$clamp} from './ol/math.js';\nimport {cosh as _ol_math$cosh} from './ol/math.js';\nimport {log2 as _ol_math$log2} from './ol/math.js';\nimport {squaredSegmentDistance as _ol_math$squaredSegmentDistance} from './ol/math.js';\nimport {squaredDistance as _ol_math$squaredDistance} from './ol/math.js';\nimport {solveLinearSystem as _ol_math$solveLinearSystem} from './ol/math.js';\nimport {toDegrees as _ol_math$toDegrees} from './ol/math.js';\nimport {toRadians as _ol_math$toRadians} from './ol/math.js';\nimport {modulo as _ol_math$modulo} from './ol/math.js';\nimport {lerp as _ol_math$lerp} from './ol/math.js';\nimport {toFixed as _ol_math$toFixed} from './ol/math.js';\nimport {round as _ol_math$round} from './ol/math.js';\nimport {floor as _ol_math$floor} from './ol/math.js';\nimport {ceil as _ol_math$ceil} from './ol/math.js';\nimport {jsonp as _ol_net$jsonp} from './ol/net.js';\nimport {ResponseError as _ol_net$ResponseError} from './ol/net.js';\nimport {ClientError as _ol_net$ClientError} from './ol/net.js';\nimport {getJSON as _ol_net$getJSON} from './ol/net.js';\nimport {resolveUrl as _ol_net$resolveUrl} from './ol/net.js';\nimport {overrideXHR as _ol_net$overrideXHR} from './ol/net.js';\nimport {restoreXHR as _ol_net$restoreXHR} from './ol/net.js';\nimport {assign as _ol_obj$assign} from './ol/obj.js';\nimport {clear as _ol_obj$clear} from './ol/obj.js';\nimport {getValues as _ol_obj$getValues} from './ol/obj.js';\nimport {isEmpty as _ol_obj$isEmpty} from './ol/obj.js';\nimport {disableCoordinateWarning as _ol_proj$disableCoordinateWarning} from './ol/proj.js';\nimport {cloneTransform as _ol_proj$cloneTransform} from './ol/proj.js';\nimport {identityTransform as _ol_proj$identityTransform} from './ol/proj.js';\nimport {addProjection as _ol_proj$addProjection} from './ol/proj.js';\nimport {addProjections as _ol_proj$addProjections} from './ol/proj.js';\nimport {get as _ol_proj$get} from './ol/proj.js';\nimport {getPointResolution as _ol_proj$getPointResolution} from './ol/proj.js';\nimport {addEquivalentProjections as _ol_proj$addEquivalentProjections} from './ol/proj.js';\nimport {addEquivalentTransforms as _ol_proj$addEquivalentTransforms} from './ol/proj.js';\nimport {clearAllProjections as _ol_proj$clearAllProjections} from './ol/proj.js';\nimport {createProjection as _ol_proj$createProjection} from './ol/proj.js';\nimport {createTransformFromCoordinateTransform as _ol_proj$createTransformFromCoordinateTransform} from './ol/proj.js';\nimport {addCoordinateTransforms as _ol_proj$addCoordinateTransforms} from './ol/proj.js';\nimport {fromLonLat as _ol_proj$fromLonLat} from './ol/proj.js';\nimport {toLonLat as _ol_proj$toLonLat} from './ol/proj.js';\nimport {equivalent as _ol_proj$equivalent} from './ol/proj.js';\nimport {getTransformFromProjections as _ol_proj$getTransformFromProjections} from './ol/proj.js';\nimport {getTransform as _ol_proj$getTransform} from './ol/proj.js';\nimport {transform as _ol_proj$transform} from './ol/proj.js';\nimport {transformExtent as _ol_proj$transformExtent} from './ol/proj.js';\nimport {transformWithProjections as _ol_proj$transformWithProjections} from './ol/proj.js';\nimport {setUserProjection as _ol_proj$setUserProjection} from './ol/proj.js';\nimport {clearUserProjection as _ol_proj$clearUserProjection} from './ol/proj.js';\nimport {getUserProjection as _ol_proj$getUserProjection} from './ol/proj.js';\nimport {useGeographic as _ol_proj$useGeographic} from './ol/proj.js';\nimport {toUserCoordinate as _ol_proj$toUserCoordinate} from './ol/proj.js';\nimport {fromUserCoordinate as _ol_proj$fromUserCoordinate} from './ol/proj.js';\nimport {toUserExtent as _ol_proj$toUserExtent} from './ol/proj.js';\nimport {fromUserExtent as _ol_proj$fromUserExtent} from './ol/proj.js';\nimport {toUserResolution as _ol_proj$toUserResolution} from './ol/proj.js';\nimport {fromUserResolution as _ol_proj$fromUserResolution} from './ol/proj.js';\nimport {createSafeCoordinateTransform as _ol_proj$createSafeCoordinateTransform} from './ol/proj.js';\nimport {addCommon as _ol_proj$addCommon} from './ol/proj.js';\nimport {toContext as _ol_render$toContext} from './ol/render.js';\nimport {getVectorContext as _ol_render$getVectorContext} from './ol/render.js';\nimport {getRenderPixel as _ol_render$getRenderPixel} from './ol/render.js';\nimport {calculateSourceResolution as _ol_reproj$calculateSourceResolution} from './ol/reproj.js';\nimport {calculateSourceExtentResolution as _ol_reproj$calculateSourceExtentResolution} from './ol/reproj.js';\nimport {render as _ol_reproj$render} from './ol/reproj.js';\nimport {createSnapToResolutions as _ol_resolutionconstraint$createSnapToResolutions} from './ol/resolutionconstraint.js';\nimport {createSnapToPower as _ol_resolutionconstraint$createSnapToPower} from './ol/resolutionconstraint.js';\nimport {createMinMaxResolution as _ol_resolutionconstraint$createMinMaxResolution} from './ol/resolutionconstraint.js';\nimport {disable as _ol_rotationconstraint$disable} from './ol/rotationconstraint.js';\nimport {none as _ol_rotationconstraint$none} from './ol/rotationconstraint.js';\nimport {createSnapToN as _ol_rotationconstraint$createSnapToN} from './ol/rotationconstraint.js';\nimport {createSnapToZero as _ol_rotationconstraint$createSnapToZero} from './ol/rotationconstraint.js';\nimport {buffer as _ol_size$buffer} from './ol/size.js';\nimport {hasArea as _ol_size$hasArea} from './ol/size.js';\nimport {scale as _ol_size$scale} from './ol/size.js';\nimport {toSize as _ol_size$toSize} from './ol/size.js';\nimport {sourcesFromTileGrid as _ol_source$sourcesFromTileGrid} from './ol/source.js';\nimport {DEFAULT_RADIUS as _ol_sphere$DEFAULT_RADIUS} from './ol/sphere.js';\nimport {getDistance as _ol_sphere$getDistance} from './ol/sphere.js';\nimport {getLength as _ol_sphere$getLength} from './ol/sphere.js';\nimport {getArea as _ol_sphere$getArea} from './ol/sphere.js';\nimport {offset as _ol_sphere$offset} from './ol/sphere.js';\nimport {padNumber as _ol_string$padNumber} from './ol/string.js';\nimport {compareVersions as _ol_string$compareVersions} from './ol/string.js';\nimport {createOrUpdate as _ol_tilecoord$createOrUpdate} from './ol/tilecoord.js';\nimport {getKeyZXY as _ol_tilecoord$getKeyZXY} from './ol/tilecoord.js';\nimport {getKey as _ol_tilecoord$getKey} from './ol/tilecoord.js';\nimport {getCacheKeyForTileKey as _ol_tilecoord$getCacheKeyForTileKey} from './ol/tilecoord.js';\nimport {fromKey as _ol_tilecoord$fromKey} from './ol/tilecoord.js';\nimport {hash as _ol_tilecoord$hash} from './ol/tilecoord.js';\nimport {withinExtentAndZ as _ol_tilecoord$withinExtentAndZ} from './ol/tilecoord.js';\nimport {getForProjection as _ol_tilegrid$getForProjection} from './ol/tilegrid.js';\nimport {wrapX as _ol_tilegrid$wrapX} from './ol/tilegrid.js';\nimport {createForExtent as _ol_tilegrid$createForExtent} from './ol/tilegrid.js';\nimport {createXYZ as _ol_tilegrid$createXYZ} from './ol/tilegrid.js';\nimport {createForProjection as _ol_tilegrid$createForProjection} from './ol/tilegrid.js';\nimport {extentFromProjection as _ol_tilegrid$extentFromProjection} from './ol/tilegrid.js';\nimport {createFromTemplate as _ol_tileurlfunction$createFromTemplate} from './ol/tileurlfunction.js';\nimport {createFromTemplates as _ol_tileurlfunction$createFromTemplates} from './ol/tileurlfunction.js';\nimport {createFromTileUrlFunctions as _ol_tileurlfunction$createFromTileUrlFunctions} from './ol/tileurlfunction.js';\nimport {nullTileUrlFunction as _ol_tileurlfunction$nullTileUrlFunction} from './ol/tileurlfunction.js';\nimport {expandUrl as _ol_tileurlfunction$expandUrl} from './ol/tileurlfunction.js';\nimport {create as _ol_transform$create} from './ol/transform.js';\nimport {reset as _ol_transform$reset} from './ol/transform.js';\nimport {multiply as _ol_transform$multiply} from './ol/transform.js';\nimport {set as _ol_transform$set} from './ol/transform.js';\nimport {setFromArray as _ol_transform$setFromArray} from './ol/transform.js';\nimport {apply as _ol_transform$apply} from './ol/transform.js';\nimport {rotate as _ol_transform$rotate} from './ol/transform.js';\nimport {scale as _ol_transform$scale} from './ol/transform.js';\nimport {makeScale as _ol_transform$makeScale} from './ol/transform.js';\nimport {translate as _ol_transform$translate} from './ol/transform.js';\nimport {compose as _ol_transform$compose} from './ol/transform.js';\nimport {composeCssTransform as _ol_transform$composeCssTransform} from './ol/transform.js';\nimport {invert as _ol_transform$invert} from './ol/transform.js';\nimport {makeInverse as _ol_transform$makeInverse} from './ol/transform.js';\nimport {determinant as _ol_transform$determinant} from './ol/transform.js';\nimport {toString as _ol_transform$toString} from './ol/transform.js';\nimport {appendParams as _ol_uri$appendParams} from './ol/uri.js';\nimport {abstract as _ol_util$abstract} from './ol/util.js';\nimport {getUid as _ol_util$getUid} from './ol/util.js';\nimport {VERSION as _ol_util$VERSION} from './ol/util.js';\nimport {ARRAY_BUFFER as _ol_webgl$ARRAY_BUFFER} from './ol/webgl.js';\nimport {ELEMENT_ARRAY_BUFFER as _ol_webgl$ELEMENT_ARRAY_BUFFER} from './ol/webgl.js';\nimport {STREAM_DRAW as _ol_webgl$STREAM_DRAW} from './ol/webgl.js';\nimport {STATIC_DRAW as _ol_webgl$STATIC_DRAW} from './ol/webgl.js';\nimport {DYNAMIC_DRAW as _ol_webgl$DYNAMIC_DRAW} from './ol/webgl.js';\nimport {UNSIGNED_BYTE as _ol_webgl$UNSIGNED_BYTE} from './ol/webgl.js';\nimport {UNSIGNED_SHORT as _ol_webgl$UNSIGNED_SHORT} from './ol/webgl.js';\nimport {UNSIGNED_INT as _ol_webgl$UNSIGNED_INT} from './ol/webgl.js';\nimport {FLOAT as _ol_webgl$FLOAT} from './ol/webgl.js';\nimport {getContext as _ol_webgl$getContext} from './ol/webgl.js';\nimport {getSupportedExtensions as _ol_webgl$getSupportedExtensions} from './ol/webgl.js';\nimport {XML_SCHEMA_INSTANCE_URI as _ol_xml$XML_SCHEMA_INSTANCE_URI} from './ol/xml.js';\nimport {createElementNS as _ol_xml$createElementNS} from './ol/xml.js';\nimport {getAllTextContent as _ol_xml$getAllTextContent} from './ol/xml.js';\nimport {getAllTextContent_ as _ol_xml$getAllTextContent_} from './ol/xml.js';\nimport {isDocument as _ol_xml$isDocument} from './ol/xml.js';\nimport {getAttributeNS as _ol_xml$getAttributeNS} from './ol/xml.js';\nimport {parse as _ol_xml$parse} from './ol/xml.js';\nimport {makeArrayExtender as _ol_xml$makeArrayExtender} from './ol/xml.js';\nimport {makeArrayPusher as _ol_xml$makeArrayPusher} from './ol/xml.js';\nimport {makeReplacer as _ol_xml$makeReplacer} from './ol/xml.js';\nimport {makeObjectPropertyPusher as _ol_xml$makeObjectPropertyPusher} from './ol/xml.js';\nimport {makeObjectPropertySetter as _ol_xml$makeObjectPropertySetter} from './ol/xml.js';\nimport {makeChildAppender as _ol_xml$makeChildAppender} from './ol/xml.js';\nimport {makeArraySerializer as _ol_xml$makeArraySerializer} from './ol/xml.js';\nimport {makeSimpleNodeFactory as _ol_xml$makeSimpleNodeFactory} from './ol/xml.js';\nimport {OBJECT_PROPERTY_NODE_FACTORY as _ol_xml$OBJECT_PROPERTY_NODE_FACTORY} from './ol/xml.js';\nimport {makeSequence as _ol_xml$makeSequence} from './ol/xml.js';\nimport {makeStructureNS as _ol_xml$makeStructureNS} from './ol/xml.js';\nimport {parseNode as _ol_xml$parseNode} from './ol/xml.js';\nimport {pushParseAndPop as _ol_xml$pushParseAndPop} from './ol/xml.js';\nimport {serialize as _ol_xml$serialize} from './ol/xml.js';\nimport {pushSerializeAndPop as _ol_xml$pushSerializeAndPop} from './ol/xml.js';\nimport {registerXMLSerializer as _ol_xml$registerXMLSerializer} from './ol/xml.js';\nimport {getXMLSerializer as _ol_xml$getXMLSerializer} from './ol/xml.js';\nimport {registerDocument as _ol_xml$registerDocument} from './ol/xml.js';\nimport {getDocument as _ol_xml$getDocument} from './ol/xml.js';\nimport $ol$webgl$Buffer from './ol/webgl/Buffer.js';\nimport {getArrayClassForType as _ol_webgl_Buffer$getArrayClassForType} from './ol/webgl/Buffer.js';\nimport $ol$webgl$Helper from './ol/webgl/Helper.js';\nimport {computeAttributesStride as _ol_webgl_Helper$computeAttributesStride} from './ol/webgl/Helper.js';\nimport $ol$webgl$PaletteTexture from './ol/webgl/PaletteTexture.js';\nimport $ol$webgl$PostProcessingPass from './ol/webgl/PostProcessingPass.js';\nimport $ol$webgl$RenderTarget from './ol/webgl/RenderTarget.js';\nimport {ShaderBuilder as _ol_webgl_ShaderBuilder$ShaderBuilder} from './ol/webgl/ShaderBuilder.js';\nimport {parseLiteralStyle as _ol_webgl_ShaderBuilder$parseLiteralStyle} from './ol/webgl/ShaderBuilder.js';\nimport $ol$webgl$TileTexture from './ol/webgl/TileTexture.js';\nimport {create as _ol_vec_mat4$create} from './ol/vec/mat4.js';\nimport {fromTransform as _ol_vec_mat4$fromTransform} from './ol/vec/mat4.js';\nimport $ol$tilegrid$TileGrid from './ol/tilegrid/TileGrid.js';\nimport $ol$tilegrid$WMTS from './ol/tilegrid/WMTS.js';\nimport {createFromCapabilitiesMatrixSet as _ol_tilegrid_WMTS$createFromCapabilitiesMatrixSet} from './ol/tilegrid/WMTS.js';\nimport {DEFAULT_MAX_ZOOM as _ol_tilegrid_common$DEFAULT_MAX_ZOOM} from './ol/tilegrid/common.js';\nimport {DEFAULT_TILE_SIZE as _ol_tilegrid_common$DEFAULT_TILE_SIZE} from './ol/tilegrid/common.js';\nimport $ol$style$Circle from './ol/style/Circle.js';\nimport $ol$style$Fill from './ol/style/Fill.js';\nimport $ol$style$Icon from './ol/style/Icon.js';\nimport $ol$style$IconImage from './ol/style/IconImage.js';\nimport {get as _ol_style_IconImage$get} from './ol/style/IconImage.js';\nimport $ol$style$IconImageCache from './ol/style/IconImageCache.js';\nimport {shared as _ol_style_IconImageCache$shared} from './ol/style/IconImageCache.js';\nimport $ol$style$Image from './ol/style/Image.js';\nimport $ol$style$RegularShape from './ol/style/RegularShape.js';\nimport $ol$style$Stroke from './ol/style/Stroke.js';\nimport $ol$style$Style from './ol/style/Style.js';\nimport {toFunction as _ol_style_Style$toFunction} from './ol/style/Style.js';\nimport {createDefaultStyle as _ol_style_Style$createDefaultStyle} from './ol/style/Style.js';\nimport {createEditingStyle as _ol_style_Style$createEditingStyle} from './ol/style/Style.js';\nimport $ol$style$Text from './ol/style/Text.js';\nimport {Operators as _ol_style_expressions$Operators} from './ol/style/expressions.js';\nimport {getValueType as _ol_style_expressions$getValueType} from './ol/style/expressions.js';\nimport {isTypeUnique as _ol_style_expressions$isTypeUnique} from './ol/style/expressions.js';\nimport {numberToGlsl as _ol_style_expressions$numberToGlsl} from './ol/style/expressions.js';\nimport {arrayToGlsl as _ol_style_expressions$arrayToGlsl} from './ol/style/expressions.js';\nimport {colorToGlsl as _ol_style_expressions$colorToGlsl} from './ol/style/expressions.js';\nimport {getStringNumberEquivalent as _ol_style_expressions$getStringNumberEquivalent} from './ol/style/expressions.js';\nimport {stringToGlsl as _ol_style_expressions$stringToGlsl} from './ol/style/expressions.js';\nimport {expressionToGlsl as _ol_style_expressions$expressionToGlsl} from './ol/style/expressions.js';\nimport {uniformNameForVariable as _ol_style_expressions$uniformNameForVariable} from './ol/style/expressions.js';\nimport {PALETTE_TEXTURE_ARRAY as _ol_style_expressions$PALETTE_TEXTURE_ARRAY} from './ol/style/expressions.js';\nimport $ol$structs$LRUCache from './ol/structs/LRUCache.js';\nimport $ol$structs$LinkedList from './ol/structs/LinkedList.js';\nimport {DROP as _ol_structs_PriorityQueue$DROP} from './ol/structs/PriorityQueue.js';\nimport $ol$structs$PriorityQueue from './ol/structs/PriorityQueue.js';\nimport $ol$structs$RBush from './ol/structs/RBush.js';\nimport {quadKey as _ol_source_BingMaps$quadKey} from './ol/source/BingMaps.js';\nimport $ol$source$BingMaps from './ol/source/BingMaps.js';\nimport $ol$source$CartoDB from './ol/source/CartoDB.js';\nimport $ol$source$Cluster from './ol/source/Cluster.js';\nimport $ol$source$DataTile from './ol/source/DataTile.js';\nimport $ol$source$GeoTIFF from './ol/source/GeoTIFF.js';\nimport $ol$source$IIIF from './ol/source/IIIF.js';\nimport {ImageSourceEvent as _ol_source_Image$ImageSourceEvent} from './ol/source/Image.js';\nimport $ol$source$Image from './ol/source/Image.js';\nimport {defaultImageLoadFunction as _ol_source_Image$defaultImageLoadFunction} from './ol/source/Image.js';\nimport $ol$source$ImageArcGISRest from './ol/source/ImageArcGISRest.js';\nimport $ol$source$ImageCanvas from './ol/source/ImageCanvas.js';\nimport $ol$source$ImageMapGuide from './ol/source/ImageMapGuide.js';\nimport $ol$source$ImageStatic from './ol/source/ImageStatic.js';\nimport $ol$source$ImageWMS from './ol/source/ImageWMS.js';\nimport $ol$source$OGCMapTile from './ol/source/OGCMapTile.js';\nimport $ol$source$OGCVectorTile from './ol/source/OGCVectorTile.js';\nimport {ATTRIBUTION as _ol_source_OSM$ATTRIBUTION} from './ol/source/OSM.js';\nimport $ol$source$OSM from './ol/source/OSM.js';\nimport {newImageData as _ol_source_Raster$newImageData} from './ol/source/Raster.js';\nimport {Processor as _ol_source_Raster$Processor} from './ol/source/Raster.js';\nimport {RasterSourceEvent as _ol_source_Raster$RasterSourceEvent} from './ol/source/Raster.js';\nimport $ol$source$Raster from './ol/source/Raster.js';\nimport $ol$source$Source from './ol/source/Source.js';\nimport $ol$source$Stamen from './ol/source/Stamen.js';\nimport $ol$source$Tile from './ol/source/Tile.js';\nimport {TileSourceEvent as _ol_source_Tile$TileSourceEvent} from './ol/source/Tile.js';\nimport $ol$source$TileArcGISRest from './ol/source/TileArcGISRest.js';\nimport $ol$source$TileDebug from './ol/source/TileDebug.js';\nimport $ol$source$TileImage from './ol/source/TileImage.js';\nimport $ol$source$TileJSON from './ol/source/TileJSON.js';\nimport $ol$source$TileWMS from './ol/source/TileWMS.js';\nimport {CustomTile as _ol_source_UTFGrid$CustomTile} from './ol/source/UTFGrid.js';\nimport $ol$source$UTFGrid from './ol/source/UTFGrid.js';\nimport $ol$source$UrlTile from './ol/source/UrlTile.js';\nimport {VectorSourceEvent as _ol_source_Vector$VectorSourceEvent} from './ol/source/Vector.js';\nimport $ol$source$Vector from './ol/source/Vector.js';\nimport $ol$source$VectorTile from './ol/source/VectorTile.js';\nimport {defaultLoadFunction as _ol_source_VectorTile$defaultLoadFunction} from './ol/source/VectorTile.js';\nimport $ol$source$WMTS from './ol/source/WMTS.js';\nimport {optionsFromCapabilities as _ol_source_WMTS$optionsFromCapabilities} from './ol/source/WMTS.js';\nimport $ol$source$XYZ from './ol/source/XYZ.js';\nimport {CustomTile as _ol_source_Zoomify$CustomTile} from './ol/source/Zoomify.js';\nimport $ol$source$Zoomify from './ol/source/Zoomify.js';\nimport {DEFAULT_WMS_VERSION as _ol_source_common$DEFAULT_WMS_VERSION} from './ol/source/common.js';\nimport {getMapTileUrlTemplate as _ol_source_ogcTileUtil$getMapTileUrlTemplate} from './ol/source/ogcTileUtil.js';\nimport {getVectorTileUrlTemplate as _ol_source_ogcTileUtil$getVectorTileUrlTemplate} from './ol/source/ogcTileUtil.js';\nimport {getTileSetInfo as _ol_source_ogcTileUtil$getTileSetInfo} from './ol/source/ogcTileUtil.js';\nimport $ol$reproj$Image from './ol/reproj/Image.js';\nimport $ol$reproj$Tile from './ol/reproj/Tile.js';\nimport $ol$reproj$Triangulation from './ol/reproj/Triangulation.js';\nimport {ERROR_THRESHOLD as _ol_reproj_common$ERROR_THRESHOLD} from './ol/reproj/common.js';\nimport {ENABLE_RASTER_REPROJECTION as _ol_reproj_common$ENABLE_RASTER_REPROJECTION} from './ol/reproj/common.js';\nimport $ol$renderer$Composite from './ol/renderer/Composite.js';\nimport $ol$renderer$Layer from './ol/renderer/Layer.js';\nimport $ol$renderer$Map from './ol/renderer/Map.js';\nimport {defaultOrder as _ol_renderer_vector$defaultOrder} from './ol/renderer/vector.js';\nimport {getSquaredTolerance as _ol_renderer_vector$getSquaredTolerance} from './ol/renderer/vector.js';\nimport {getTolerance as _ol_renderer_vector$getTolerance} from './ol/renderer/vector.js';\nimport {renderFeature as _ol_renderer_vector$renderFeature} from './ol/renderer/vector.js';\nimport $ol$renderer$webgl$Layer from './ol/renderer/webgl/Layer.js';\nimport {writePointFeatureToBuffers as _ol_renderer_webgl_Layer$writePointFeatureToBuffers} from './ol/renderer/webgl/Layer.js';\nimport {getBlankImageData as _ol_renderer_webgl_Layer$getBlankImageData} from './ol/renderer/webgl/Layer.js';\nimport {colorEncodeId as _ol_renderer_webgl_Layer$colorEncodeId} from './ol/renderer/webgl/Layer.js';\nimport {colorDecodeId as _ol_renderer_webgl_Layer$colorDecodeId} from './ol/renderer/webgl/Layer.js';\nimport $ol$renderer$webgl$PointsLayer from './ol/renderer/webgl/PointsLayer.js';\nimport {Uniforms as _ol_renderer_webgl_TileLayer$Uniforms} from './ol/renderer/webgl/TileLayer.js';\nimport {Attributes as _ol_renderer_webgl_TileLayer$Attributes} from './ol/renderer/webgl/TileLayer.js';\nimport $ol$renderer$webgl$TileLayer from './ol/renderer/webgl/TileLayer.js';\nimport $ol$renderer$canvas$ImageLayer from './ol/renderer/canvas/ImageLayer.js';\nimport $ol$renderer$canvas$Layer from './ol/renderer/canvas/Layer.js';\nimport $ol$renderer$canvas$TileLayer from './ol/renderer/canvas/TileLayer.js';\nimport $ol$renderer$canvas$VectorImageLayer from './ol/renderer/canvas/VectorImageLayer.js';\nimport $ol$renderer$canvas$VectorLayer from './ol/renderer/canvas/VectorLayer.js';\nimport $ol$renderer$canvas$VectorTileLayer from './ol/renderer/canvas/VectorTileLayer.js';\nimport {IMAGE_SMOOTHING_DISABLED as _ol_renderer_canvas_common$IMAGE_SMOOTHING_DISABLED} from './ol/renderer/canvas/common.js';\nimport {IMAGE_SMOOTHING_ENABLED as _ol_renderer_canvas_common$IMAGE_SMOOTHING_ENABLED} from './ol/renderer/canvas/common.js';\nimport $ol$render$Box from './ol/render/Box.js';\nimport $ol$render$Event from './ol/render/Event.js';\nimport $ol$render$Feature from './ol/render/Feature.js';\nimport {toGeometry as _ol_render_Feature$toGeometry} from './ol/render/Feature.js';\nimport {toFeature as _ol_render_Feature$toFeature} from './ol/render/Feature.js';\nimport $ol$render$VectorContext from './ol/render/VectorContext.js';\nimport {defaultFont as _ol_render_canvas$defaultFont} from './ol/render/canvas.js';\nimport {defaultFillStyle as _ol_render_canvas$defaultFillStyle} from './ol/render/canvas.js';\nimport {defaultLineCap as _ol_render_canvas$defaultLineCap} from './ol/render/canvas.js';\nimport {defaultLineDash as _ol_render_canvas$defaultLineDash} from './ol/render/canvas.js';\nimport {defaultLineDashOffset as _ol_render_canvas$defaultLineDashOffset} from './ol/render/canvas.js';\nimport {defaultLineJoin as _ol_render_canvas$defaultLineJoin} from './ol/render/canvas.js';\nimport {defaultMiterLimit as _ol_render_canvas$defaultMiterLimit} from './ol/render/canvas.js';\nimport {defaultStrokeStyle as _ol_render_canvas$defaultStrokeStyle} from './ol/render/canvas.js';\nimport {defaultTextAlign as _ol_render_canvas$defaultTextAlign} from './ol/render/canvas.js';\nimport {defaultTextBaseline as _ol_render_canvas$defaultTextBaseline} from './ol/render/canvas.js';\nimport {defaultPadding as _ol_render_canvas$defaultPadding} from './ol/render/canvas.js';\nimport {defaultLineWidth as _ol_render_canvas$defaultLineWidth} from './ol/render/canvas.js';\nimport {checkedFonts as _ol_render_canvas$checkedFonts} from './ol/render/canvas.js';\nimport {labelCache as _ol_render_canvas$labelCache} from './ol/render/canvas.js';\nimport {textHeights as _ol_render_canvas$textHeights} from './ol/render/canvas.js';\nimport {registerFont as _ol_render_canvas$registerFont} from './ol/render/canvas.js';\nimport {measureTextHeight as _ol_render_canvas$measureTextHeight} from './ol/render/canvas.js';\nimport {measureTextWidth as _ol_render_canvas$measureTextWidth} from './ol/render/canvas.js';\nimport {measureAndCacheTextWidth as _ol_render_canvas$measureAndCacheTextWidth} from './ol/render/canvas.js';\nimport {getTextDimensions as _ol_render_canvas$getTextDimensions} from './ol/render/canvas.js';\nimport {rotateAtOffset as _ol_render_canvas$rotateAtOffset} from './ol/render/canvas.js';\nimport {drawImageOrLabel as _ol_render_canvas$drawImageOrLabel} from './ol/render/canvas.js';\nimport $ol$render$canvas$Builder from './ol/render/canvas/Builder.js';\nimport $ol$render$canvas$BuilderGroup from './ol/render/canvas/BuilderGroup.js';\nimport $ol$render$canvas$Executor from './ol/render/canvas/Executor.js';\nimport $ol$render$canvas$ExecutorGroup from './ol/render/canvas/ExecutorGroup.js';\nimport {getPixelIndexArray as _ol_render_canvas_ExecutorGroup$getPixelIndexArray} from './ol/render/canvas/ExecutorGroup.js';\nimport $ol$render$canvas$ImageBuilder from './ol/render/canvas/ImageBuilder.js';\nimport $ol$render$canvas$Immediate from './ol/render/canvas/Immediate.js';\nimport {fillInstruction as _ol_render_canvas_Instruction$fillInstruction} from './ol/render/canvas/Instruction.js';\nimport {strokeInstruction as _ol_render_canvas_Instruction$strokeInstruction} from './ol/render/canvas/Instruction.js';\nimport {beginPathInstruction as _ol_render_canvas_Instruction$beginPathInstruction} from './ol/render/canvas/Instruction.js';\nimport {closePathInstruction as _ol_render_canvas_Instruction$closePathInstruction} from './ol/render/canvas/Instruction.js';\nimport $ol$render$canvas$LineStringBuilder from './ol/render/canvas/LineStringBuilder.js';\nimport $ol$render$canvas$PolygonBuilder from './ol/render/canvas/PolygonBuilder.js';\nimport $ol$render$canvas$TextBuilder from './ol/render/canvas/TextBuilder.js';\nimport {HIT_DETECT_RESOLUTION as _ol_render_canvas_hitdetect$HIT_DETECT_RESOLUTION} from './ol/render/canvas/hitdetect.js';\nimport {createHitDetectionImageData as _ol_render_canvas_hitdetect$createHitDetectionImageData} from './ol/render/canvas/hitdetect.js';\nimport {hitDetect as _ol_render_canvas_hitdetect$hitDetect} from './ol/render/canvas/hitdetect.js';\nimport $ol$proj$Projection from './ol/proj/Projection.js';\nimport {fromCode as _ol_proj_Units$fromCode} from './ol/proj/Units.js';\nimport {METERS_PER_UNIT as _ol_proj_Units$METERS_PER_UNIT} from './ol/proj/Units.js';\nimport {RADIUS as _ol_proj_epsg3857$RADIUS} from './ol/proj/epsg3857.js';\nimport {HALF_SIZE as _ol_proj_epsg3857$HALF_SIZE} from './ol/proj/epsg3857.js';\nimport {EXTENT as _ol_proj_epsg3857$EXTENT} from './ol/proj/epsg3857.js';\nimport {WORLD_EXTENT as _ol_proj_epsg3857$WORLD_EXTENT} from './ol/proj/epsg3857.js';\nimport {MAX_SAFE_Y as _ol_proj_epsg3857$MAX_SAFE_Y} from './ol/proj/epsg3857.js';\nimport {PROJECTIONS as _ol_proj_epsg3857$PROJECTIONS} from './ol/proj/epsg3857.js';\nimport {fromEPSG4326 as _ol_proj_epsg3857$fromEPSG4326} from './ol/proj/epsg3857.js';\nimport {toEPSG4326 as _ol_proj_epsg3857$toEPSG4326} from './ol/proj/epsg3857.js';\nimport {RADIUS as _ol_proj_epsg4326$RADIUS} from './ol/proj/epsg4326.js';\nimport {EXTENT as _ol_proj_epsg4326$EXTENT} from './ol/proj/epsg4326.js';\nimport {METERS_PER_UNIT as _ol_proj_epsg4326$METERS_PER_UNIT} from './ol/proj/epsg4326.js';\nimport {PROJECTIONS as _ol_proj_epsg4326$PROJECTIONS} from './ol/proj/epsg4326.js';\nimport {register as _ol_proj_proj4$register} from './ol/proj/proj4.js';\nimport {clear as _ol_proj_projections$clear} from './ol/proj/projections.js';\nimport {get as _ol_proj_projections$get} from './ol/proj/projections.js';\nimport {add as _ol_proj_projections$add} from './ol/proj/projections.js';\nimport {clear as _ol_proj_transforms$clear} from './ol/proj/transforms.js';\nimport {add as _ol_proj_transforms$add} from './ol/proj/transforms.js';\nimport {remove as _ol_proj_transforms$remove} from './ol/proj/transforms.js';\nimport {get as _ol_proj_transforms$get} from './ol/proj/transforms.js';\nimport $ol$layer$Base from './ol/layer/Base.js';\nimport $ol$layer$BaseImage from './ol/layer/BaseImage.js';\nimport $ol$layer$BaseTile from './ol/layer/BaseTile.js';\nimport $ol$layer$BaseVector from './ol/layer/BaseVector.js';\nimport $ol$layer$Graticule from './ol/layer/Graticule.js';\nimport {GroupEvent as _ol_layer_Group$GroupEvent} from './ol/layer/Group.js';\nimport $ol$layer$Group from './ol/layer/Group.js';\nimport $ol$layer$Heatmap from './ol/layer/Heatmap.js';\nimport $ol$layer$Image from './ol/layer/Image.js';\nimport $ol$layer$Layer from './ol/layer/Layer.js';\nimport {inView as _ol_layer_Layer$inView} from './ol/layer/Layer.js';\nimport {getMapboxPath as _ol_layer_MapboxVector$getMapboxPath} from './ol/layer/MapboxVector.js';\nimport {normalizeSpriteUrl as _ol_layer_MapboxVector$normalizeSpriteUrl} from './ol/layer/MapboxVector.js';\nimport {normalizeGlyphsUrl as _ol_layer_MapboxVector$normalizeGlyphsUrl} from './ol/layer/MapboxVector.js';\nimport {normalizeStyleUrl as _ol_layer_MapboxVector$normalizeStyleUrl} from './ol/layer/MapboxVector.js';\nimport {normalizeSourceUrl as _ol_layer_MapboxVector$normalizeSourceUrl} from './ol/layer/MapboxVector.js';\nimport $ol$layer$MapboxVector from './ol/layer/MapboxVector.js';\nimport $ol$layer$Tile from './ol/layer/Tile.js';\nimport $ol$layer$Vector from './ol/layer/Vector.js';\nimport $ol$layer$VectorImage from './ol/layer/VectorImage.js';\nimport $ol$layer$VectorTile from './ol/layer/VectorTile.js';\nimport $ol$layer$WebGLPoints from './ol/layer/WebGLPoints.js';\nimport $ol$layer$WebGLTile from './ol/layer/WebGLTile.js';\nimport $ol$interaction$DoubleClickZoom from './ol/interaction/DoubleClickZoom.js';\nimport {DragAndDropEvent as _ol_interaction_DragAndDrop$DragAndDropEvent} from './ol/interaction/DragAndDrop.js';\nimport $ol$interaction$DragAndDrop from './ol/interaction/DragAndDrop.js';\nimport {DragBoxEvent as _ol_interaction_DragBox$DragBoxEvent} from './ol/interaction/DragBox.js';\nimport $ol$interaction$DragBox from './ol/interaction/DragBox.js';\nimport $ol$interaction$DragPan from './ol/interaction/DragPan.js';\nimport $ol$interaction$DragRotate from './ol/interaction/DragRotate.js';\nimport $ol$interaction$DragRotateAndZoom from './ol/interaction/DragRotateAndZoom.js';\nimport $ol$interaction$DragZoom from './ol/interaction/DragZoom.js';\nimport {DrawEvent as _ol_interaction_Draw$DrawEvent} from './ol/interaction/Draw.js';\nimport $ol$interaction$Draw from './ol/interaction/Draw.js';\nimport {createRegularPolygon as _ol_interaction_Draw$createRegularPolygon} from './ol/interaction/Draw.js';\nimport {createBox as _ol_interaction_Draw$createBox} from './ol/interaction/Draw.js';\nimport {ExtentEvent as _ol_interaction_Extent$ExtentEvent} from './ol/interaction/Extent.js';\nimport $ol$interaction$Extent from './ol/interaction/Extent.js';\nimport $ol$interaction$Interaction from './ol/interaction/Interaction.js';\nimport {pan as _ol_interaction_Interaction$pan} from './ol/interaction/Interaction.js';\nimport {zoomByDelta as _ol_interaction_Interaction$zoomByDelta} from './ol/interaction/Interaction.js';\nimport $ol$interaction$KeyboardPan from './ol/interaction/KeyboardPan.js';\nimport $ol$interaction$KeyboardZoom from './ol/interaction/KeyboardZoom.js';\nimport {ModifyEvent as _ol_interaction_Modify$ModifyEvent} from './ol/interaction/Modify.js';\nimport $ol$interaction$Modify from './ol/interaction/Modify.js';\nimport $ol$interaction$MouseWheelZoom from './ol/interaction/MouseWheelZoom.js';\nimport $ol$interaction$PinchRotate from './ol/interaction/PinchRotate.js';\nimport $ol$interaction$PinchZoom from './ol/interaction/PinchZoom.js';\nimport $ol$interaction$Pointer from './ol/interaction/Pointer.js';\nimport {centroid as _ol_interaction_Pointer$centroid} from './ol/interaction/Pointer.js';\nimport {SelectEvent as _ol_interaction_Select$SelectEvent} from './ol/interaction/Select.js';\nimport $ol$interaction$Select from './ol/interaction/Select.js';\nimport $ol$interaction$Snap from './ol/interaction/Snap.js';\nimport {TranslateEvent as _ol_interaction_Translate$TranslateEvent} from './ol/interaction/Translate.js';\nimport $ol$interaction$Translate from './ol/interaction/Translate.js';\nimport $ol$geom$Circle from './ol/geom/Circle.js';\nimport $ol$geom$Geometry from './ol/geom/Geometry.js';\nimport $ol$geom$GeometryCollection from './ol/geom/GeometryCollection.js';\nimport $ol$geom$LineString from './ol/geom/LineString.js';\nimport $ol$geom$LinearRing from './ol/geom/LinearRing.js';\nimport $ol$geom$MultiLineString from './ol/geom/MultiLineString.js';\nimport $ol$geom$MultiPoint from './ol/geom/MultiPoint.js';\nimport $ol$geom$MultiPolygon from './ol/geom/MultiPolygon.js';\nimport $ol$geom$Point from './ol/geom/Point.js';\nimport $ol$geom$Polygon from './ol/geom/Polygon.js';\nimport {circular as _ol_geom_Polygon$circular} from './ol/geom/Polygon.js';\nimport {fromExtent as _ol_geom_Polygon$fromExtent} from './ol/geom/Polygon.js';\nimport {fromCircle as _ol_geom_Polygon$fromCircle} from './ol/geom/Polygon.js';\nimport {makeRegular as _ol_geom_Polygon$makeRegular} from './ol/geom/Polygon.js';\nimport $ol$geom$SimpleGeometry from './ol/geom/SimpleGeometry.js';\nimport {getStrideForLayout as _ol_geom_SimpleGeometry$getStrideForLayout} from './ol/geom/SimpleGeometry.js';\nimport {transformGeom2D as _ol_geom_SimpleGeometry$transformGeom2D} from './ol/geom/SimpleGeometry.js';\nimport {linearRing as _ol_geom_flat_area$linearRing} from './ol/geom/flat/area.js';\nimport {linearRings as _ol_geom_flat_area$linearRings} from './ol/geom/flat/area.js';\nimport {linearRingss as _ol_geom_flat_area$linearRingss} from './ol/geom/flat/area.js';\nimport {linearRingss as _ol_geom_flat_center$linearRingss} from './ol/geom/flat/center.js';\nimport {maxSquaredDelta as _ol_geom_flat_closest$maxSquaredDelta} from './ol/geom/flat/closest.js';\nimport {arrayMaxSquaredDelta as _ol_geom_flat_closest$arrayMaxSquaredDelta} from './ol/geom/flat/closest.js';\nimport {multiArrayMaxSquaredDelta as _ol_geom_flat_closest$multiArrayMaxSquaredDelta} from './ol/geom/flat/closest.js';\nimport {assignClosestPoint as _ol_geom_flat_closest$assignClosestPoint} from './ol/geom/flat/closest.js';\nimport {assignClosestArrayPoint as _ol_geom_flat_closest$assignClosestArrayPoint} from './ol/geom/flat/closest.js';\nimport {assignClosestMultiArrayPoint as _ol_geom_flat_closest$assignClosestMultiArrayPoint} from './ol/geom/flat/closest.js';\nimport {linearRingContainsExtent as _ol_geom_flat_contains$linearRingContainsExtent} from './ol/geom/flat/contains.js';\nimport {linearRingContainsXY as _ol_geom_flat_contains$linearRingContainsXY} from './ol/geom/flat/contains.js';\nimport {linearRingsContainsXY as _ol_geom_flat_contains$linearRingsContainsXY} from './ol/geom/flat/contains.js';\nimport {linearRingssContainsXY as _ol_geom_flat_contains$linearRingssContainsXY} from './ol/geom/flat/contains.js';\nimport {deflateCoordinate as _ol_geom_flat_deflate$deflateCoordinate} from './ol/geom/flat/deflate.js';\nimport {deflateCoordinates as _ol_geom_flat_deflate$deflateCoordinates} from './ol/geom/flat/deflate.js';\nimport {deflateCoordinatesArray as _ol_geom_flat_deflate$deflateCoordinatesArray} from './ol/geom/flat/deflate.js';\nimport {deflateMultiCoordinatesArray as _ol_geom_flat_deflate$deflateMultiCoordinatesArray} from './ol/geom/flat/deflate.js';\nimport {flipXY as _ol_geom_flat_flip$flipXY} from './ol/geom/flat/flip.js';\nimport {greatCircleArc as _ol_geom_flat_geodesic$greatCircleArc} from './ol/geom/flat/geodesic.js';\nimport {meridian as _ol_geom_flat_geodesic$meridian} from './ol/geom/flat/geodesic.js';\nimport {parallel as _ol_geom_flat_geodesic$parallel} from './ol/geom/flat/geodesic.js';\nimport {inflateCoordinates as _ol_geom_flat_inflate$inflateCoordinates} from './ol/geom/flat/inflate.js';\nimport {inflateCoordinatesArray as _ol_geom_flat_inflate$inflateCoordinatesArray} from './ol/geom/flat/inflate.js';\nimport {inflateMultiCoordinatesArray as _ol_geom_flat_inflate$inflateMultiCoordinatesArray} from './ol/geom/flat/inflate.js';\nimport {getInteriorPointOfArray as _ol_geom_flat_interiorpoint$getInteriorPointOfArray} from './ol/geom/flat/interiorpoint.js';\nimport {getInteriorPointsOfMultiArray as _ol_geom_flat_interiorpoint$getInteriorPointsOfMultiArray} from './ol/geom/flat/interiorpoint.js';\nimport {interpolatePoint as _ol_geom_flat_interpolate$interpolatePoint} from './ol/geom/flat/interpolate.js';\nimport {lineStringCoordinateAtM as _ol_geom_flat_interpolate$lineStringCoordinateAtM} from './ol/geom/flat/interpolate.js';\nimport {lineStringsCoordinateAtM as _ol_geom_flat_interpolate$lineStringsCoordinateAtM} from './ol/geom/flat/interpolate.js';\nimport {intersectsLineString as _ol_geom_flat_intersectsextent$intersectsLineString} from './ol/geom/flat/intersectsextent.js';\nimport {intersectsLineStringArray as _ol_geom_flat_intersectsextent$intersectsLineStringArray} from './ol/geom/flat/intersectsextent.js';\nimport {intersectsLinearRing as _ol_geom_flat_intersectsextent$intersectsLinearRing} from './ol/geom/flat/intersectsextent.js';\nimport {intersectsLinearRingArray as _ol_geom_flat_intersectsextent$intersectsLinearRingArray} from './ol/geom/flat/intersectsextent.js';\nimport {intersectsLinearRingMultiArray as _ol_geom_flat_intersectsextent$intersectsLinearRingMultiArray} from './ol/geom/flat/intersectsextent.js';\nimport {lineStringLength as _ol_geom_flat_length$lineStringLength} from './ol/geom/flat/length.js';\nimport {linearRingLength as _ol_geom_flat_length$linearRingLength} from './ol/geom/flat/length.js';\nimport {linearRingIsClockwise as _ol_geom_flat_orient$linearRingIsClockwise} from './ol/geom/flat/orient.js';\nimport {linearRingsAreOriented as _ol_geom_flat_orient$linearRingsAreOriented} from './ol/geom/flat/orient.js';\nimport {linearRingssAreOriented as _ol_geom_flat_orient$linearRingssAreOriented} from './ol/geom/flat/orient.js';\nimport {orientLinearRings as _ol_geom_flat_orient$orientLinearRings} from './ol/geom/flat/orient.js';\nimport {orientLinearRingsArray as _ol_geom_flat_orient$orientLinearRingsArray} from './ol/geom/flat/orient.js';\nimport {inflateEnds as _ol_geom_flat_orient$inflateEnds} from './ol/geom/flat/orient.js';\nimport {coordinates as _ol_geom_flat_reverse$coordinates} from './ol/geom/flat/reverse.js';\nimport {forEach as _ol_geom_flat_segments$forEach} from './ol/geom/flat/segments.js';\nimport {simplifyLineString as _ol_geom_flat_simplify$simplifyLineString} from './ol/geom/flat/simplify.js';\nimport {douglasPeucker as _ol_geom_flat_simplify$douglasPeucker} from './ol/geom/flat/simplify.js';\nimport {douglasPeuckerArray as _ol_geom_flat_simplify$douglasPeuckerArray} from './ol/geom/flat/simplify.js';\nimport {douglasPeuckerMultiArray as _ol_geom_flat_simplify$douglasPeuckerMultiArray} from './ol/geom/flat/simplify.js';\nimport {radialDistance as _ol_geom_flat_simplify$radialDistance} from './ol/geom/flat/simplify.js';\nimport {snap as _ol_geom_flat_simplify$snap} from './ol/geom/flat/simplify.js';\nimport {quantize as _ol_geom_flat_simplify$quantize} from './ol/geom/flat/simplify.js';\nimport {quantizeArray as _ol_geom_flat_simplify$quantizeArray} from './ol/geom/flat/simplify.js';\nimport {quantizeMultiArray as _ol_geom_flat_simplify$quantizeMultiArray} from './ol/geom/flat/simplify.js';\nimport {matchingChunk as _ol_geom_flat_straightchunk$matchingChunk} from './ol/geom/flat/straightchunk.js';\nimport {drawTextOnPath as _ol_geom_flat_textpath$drawTextOnPath} from './ol/geom/flat/textpath.js';\nimport {lineStringIsClosed as _ol_geom_flat_topology$lineStringIsClosed} from './ol/geom/flat/topology.js';\nimport {transform2D as _ol_geom_flat_transform$transform2D} from './ol/geom/flat/transform.js';\nimport {rotate as _ol_geom_flat_transform$rotate} from './ol/geom/flat/transform.js';\nimport {scale as _ol_geom_flat_transform$scale} from './ol/geom/flat/transform.js';\nimport {translate as _ol_geom_flat_transform$translate} from './ol/geom/flat/transform.js';\nimport $ol$format$EsriJSON from './ol/format/EsriJSON.js';\nimport $ol$format$Feature from './ol/format/Feature.js';\nimport {transformGeometryWithOptions as _ol_format_Feature$transformGeometryWithOptions} from './ol/format/Feature.js';\nimport {transformExtentWithOptions as _ol_format_Feature$transformExtentWithOptions} from './ol/format/Feature.js';\nimport $ol$format$GML from './ol/format/GML.js';\nimport $ol$format$GML2 from './ol/format/GML2.js';\nimport $ol$format$GML3 from './ol/format/GML3.js';\nimport $ol$format$GML32 from './ol/format/GML32.js';\nimport {GMLNS as _ol_format_GMLBase$GMLNS} from './ol/format/GMLBase.js';\nimport $ol$format$GMLBase from './ol/format/GMLBase.js';\nimport $ol$format$GPX from './ol/format/GPX.js';\nimport $ol$format$GeoJSON from './ol/format/GeoJSON.js';\nimport $ol$format$IGC from './ol/format/IGC.js';\nimport $ol$format$IIIFInfo from './ol/format/IIIFInfo.js';\nimport $ol$format$JSONFeature from './ol/format/JSONFeature.js';\nimport {getDefaultFillStyle as _ol_format_KML$getDefaultFillStyle} from './ol/format/KML.js';\nimport {getDefaultImageStyle as _ol_format_KML$getDefaultImageStyle} from './ol/format/KML.js';\nimport {getDefaultStrokeStyle as _ol_format_KML$getDefaultStrokeStyle} from './ol/format/KML.js';\nimport {getDefaultTextStyle as _ol_format_KML$getDefaultTextStyle} from './ol/format/KML.js';\nimport {getDefaultStyle as _ol_format_KML$getDefaultStyle} from './ol/format/KML.js';\nimport {getDefaultStyleArray as _ol_format_KML$getDefaultStyleArray} from './ol/format/KML.js';\nimport $ol$format$KML from './ol/format/KML.js';\nimport {readFlatCoordinates as _ol_format_KML$readFlatCoordinates} from './ol/format/KML.js';\nimport $ol$format$MVT from './ol/format/MVT.js';\nimport $ol$format$OSMXML from './ol/format/OSMXML.js';\nimport $ol$format$OWS from './ol/format/OWS.js';\nimport $ol$format$Polyline from './ol/format/Polyline.js';\nimport {encodeDeltas as _ol_format_Polyline$encodeDeltas} from './ol/format/Polyline.js';\nimport {decodeDeltas as _ol_format_Polyline$decodeDeltas} from './ol/format/Polyline.js';\nimport {encodeFloats as _ol_format_Polyline$encodeFloats} from './ol/format/Polyline.js';\nimport {decodeFloats as _ol_format_Polyline$decodeFloats} from './ol/format/Polyline.js';\nimport {encodeSignedIntegers as _ol_format_Polyline$encodeSignedIntegers} from './ol/format/Polyline.js';\nimport {decodeSignedIntegers as _ol_format_Polyline$decodeSignedIntegers} from './ol/format/Polyline.js';\nimport {encodeUnsignedIntegers as _ol_format_Polyline$encodeUnsignedIntegers} from './ol/format/Polyline.js';\nimport {decodeUnsignedIntegers as _ol_format_Polyline$decodeUnsignedIntegers} from './ol/format/Polyline.js';\nimport {encodeUnsignedInteger as _ol_format_Polyline$encodeUnsignedInteger} from './ol/format/Polyline.js';\nimport $ol$format$TextFeature from './ol/format/TextFeature.js';\nimport $ol$format$TopoJSON from './ol/format/TopoJSON.js';\nimport $ol$format$WFS from './ol/format/WFS.js';\nimport {writeFilter as _ol_format_WFS$writeFilter} from './ol/format/WFS.js';\nimport $ol$format$WKB from './ol/format/WKB.js';\nimport $ol$format$WKT from './ol/format/WKT.js';\nimport $ol$format$WMSCapabilities from './ol/format/WMSCapabilities.js';\nimport $ol$format$WMSGetFeatureInfo from './ol/format/WMSGetFeatureInfo.js';\nimport $ol$format$WMTSCapabilities from './ol/format/WMTSCapabilities.js';\nimport $ol$format$XML from './ol/format/XML.js';\nimport $ol$format$XMLFeature from './ol/format/XMLFeature.js';\nimport {and as _ol_format_filter$and} from './ol/format/filter.js';\nimport {or as _ol_format_filter$or} from './ol/format/filter.js';\nimport {not as _ol_format_filter$not} from './ol/format/filter.js';\nimport {bbox as _ol_format_filter$bbox} from './ol/format/filter.js';\nimport {contains as _ol_format_filter$contains} from './ol/format/filter.js';\nimport {intersects as _ol_format_filter$intersects} from './ol/format/filter.js';\nimport {disjoint as _ol_format_filter$disjoint} from './ol/format/filter.js';\nimport {within as _ol_format_filter$within} from './ol/format/filter.js';\nimport {dwithin as _ol_format_filter$dwithin} from './ol/format/filter.js';\nimport {equalTo as _ol_format_filter$equalTo} from './ol/format/filter.js';\nimport {notEqualTo as _ol_format_filter$notEqualTo} from './ol/format/filter.js';\nimport {lessThan as _ol_format_filter$lessThan} from './ol/format/filter.js';\nimport {lessThanOrEqualTo as _ol_format_filter$lessThanOrEqualTo} from './ol/format/filter.js';\nimport {greaterThan as _ol_format_filter$greaterThan} from './ol/format/filter.js';\nimport {greaterThanOrEqualTo as _ol_format_filter$greaterThanOrEqualTo} from './ol/format/filter.js';\nimport {isNull as _ol_format_filter$isNull} from './ol/format/filter.js';\nimport {between as _ol_format_filter$between} from './ol/format/filter.js';\nimport {like as _ol_format_filter$like} from './ol/format/filter.js';\nimport {during as _ol_format_filter$during} from './ol/format/filter.js';\nimport {resourceId as _ol_format_filter$resourceId} from './ol/format/filter.js';\nimport {readHref as _ol_format_xlink$readHref} from './ol/format/xlink.js';\nimport {readBoolean as _ol_format_xsd$readBoolean} from './ol/format/xsd.js';\nimport {readBooleanString as _ol_format_xsd$readBooleanString} from './ol/format/xsd.js';\nimport {readDateTime as _ol_format_xsd$readDateTime} from './ol/format/xsd.js';\nimport {readDecimal as _ol_format_xsd$readDecimal} from './ol/format/xsd.js';\nimport {readDecimalString as _ol_format_xsd$readDecimalString} from './ol/format/xsd.js';\nimport {readPositiveInteger as _ol_format_xsd$readPositiveInteger} from './ol/format/xsd.js';\nimport {readNonNegativeIntegerString as _ol_format_xsd$readNonNegativeIntegerString} from './ol/format/xsd.js';\nimport {readString as _ol_format_xsd$readString} from './ol/format/xsd.js';\nimport {writeBooleanTextNode as _ol_format_xsd$writeBooleanTextNode} from './ol/format/xsd.js';\nimport {writeCDATASection as _ol_format_xsd$writeCDATASection} from './ol/format/xsd.js';\nimport {writeDateTimeTextNode as _ol_format_xsd$writeDateTimeTextNode} from './ol/format/xsd.js';\nimport {writeDecimalTextNode as _ol_format_xsd$writeDecimalTextNode} from './ol/format/xsd.js';\nimport {writeNonNegativeIntegerTextNode as _ol_format_xsd$writeNonNegativeIntegerTextNode} from './ol/format/xsd.js';\nimport {writeStringTextNode as _ol_format_xsd$writeStringTextNode} from './ol/format/xsd.js';\nimport $ol$format$filter$And from './ol/format/filter/And.js';\nimport $ol$format$filter$Bbox from './ol/format/filter/Bbox.js';\nimport $ol$format$filter$Comparison from './ol/format/filter/Comparison.js';\nimport $ol$format$filter$ComparisonBinary from './ol/format/filter/ComparisonBinary.js';\nimport $ol$format$filter$Contains from './ol/format/filter/Contains.js';\nimport $ol$format$filter$DWithin from './ol/format/filter/DWithin.js';\nimport $ol$format$filter$Disjoint from './ol/format/filter/Disjoint.js';\nimport $ol$format$filter$During from './ol/format/filter/During.js';\nimport $ol$format$filter$EqualTo from './ol/format/filter/EqualTo.js';\nimport $ol$format$filter$Filter from './ol/format/filter/Filter.js';\nimport $ol$format$filter$GreaterThan from './ol/format/filter/GreaterThan.js';\nimport $ol$format$filter$GreaterThanOrEqualTo from './ol/format/filter/GreaterThanOrEqualTo.js';\nimport $ol$format$filter$Intersects from './ol/format/filter/Intersects.js';\nimport $ol$format$filter$IsBetween from './ol/format/filter/IsBetween.js';\nimport $ol$format$filter$IsLike from './ol/format/filter/IsLike.js';\nimport $ol$format$filter$IsNull from './ol/format/filter/IsNull.js';\nimport $ol$format$filter$LessThan from './ol/format/filter/LessThan.js';\nimport $ol$format$filter$LessThanOrEqualTo from './ol/format/filter/LessThanOrEqualTo.js';\nimport $ol$format$filter$LogicalNary from './ol/format/filter/LogicalNary.js';\nimport $ol$format$filter$Not from './ol/format/filter/Not.js';\nimport $ol$format$filter$NotEqualTo from './ol/format/filter/NotEqualTo.js';\nimport $ol$format$filter$Or from './ol/format/filter/Or.js';\nimport $ol$format$filter$ResourceId from './ol/format/filter/ResourceId.js';\nimport $ol$format$filter$Spatial from './ol/format/filter/Spatial.js';\nimport $ol$format$filter$Within from './ol/format/filter/Within.js';\nimport $ol$events$Event from './ol/events/Event.js';\nimport {stopPropagation as _ol_events_Event$stopPropagation} from './ol/events/Event.js';\nimport {preventDefault as _ol_events_Event$preventDefault} from './ol/events/Event.js';\nimport $ol$events$Target from './ol/events/Target.js';\nimport {all as _ol_events_condition$all} from './ol/events/condition.js';\nimport {altKeyOnly as _ol_events_condition$altKeyOnly} from './ol/events/condition.js';\nimport {altShiftKeysOnly as _ol_events_condition$altShiftKeysOnly} from './ol/events/condition.js';\nimport {focus as _ol_events_condition$focus} from './ol/events/condition.js';\nimport {focusWithTabindex as _ol_events_condition$focusWithTabindex} from './ol/events/condition.js';\nimport {always as _ol_events_condition$always} from './ol/events/condition.js';\nimport {click as _ol_events_condition$click} from './ol/events/condition.js';\nimport {mouseActionButton as _ol_events_condition$mouseActionButton} from './ol/events/condition.js';\nimport {never as _ol_events_condition$never} from './ol/events/condition.js';\nimport {pointerMove as _ol_events_condition$pointerMove} from './ol/events/condition.js';\nimport {singleClick as _ol_events_condition$singleClick} from './ol/events/condition.js';\nimport {doubleClick as _ol_events_condition$doubleClick} from './ol/events/condition.js';\nimport {noModifierKeys as _ol_events_condition$noModifierKeys} from './ol/events/condition.js';\nimport {platformModifierKeyOnly as _ol_events_condition$platformModifierKeyOnly} from './ol/events/condition.js';\nimport {shiftKeyOnly as _ol_events_condition$shiftKeyOnly} from './ol/events/condition.js';\nimport {targetNotEditable as _ol_events_condition$targetNotEditable} from './ol/events/condition.js';\nimport {mouseOnly as _ol_events_condition$mouseOnly} from './ol/events/condition.js';\nimport {touchOnly as _ol_events_condition$touchOnly} from './ol/events/condition.js';\nimport {penOnly as _ol_events_condition$penOnly} from './ol/events/condition.js';\nimport {primaryAction as _ol_events_condition$primaryAction} from './ol/events/condition.js';\nimport $ol$control$Attribution from './ol/control/Attribution.js';\nimport $ol$control$Control from './ol/control/Control.js';\nimport $ol$control$FullScreen from './ol/control/FullScreen.js';\nimport $ol$control$MousePosition from './ol/control/MousePosition.js';\nimport $ol$control$OverviewMap from './ol/control/OverviewMap.js';\nimport $ol$control$Rotate from './ol/control/Rotate.js';\nimport $ol$control$ScaleLine from './ol/control/ScaleLine.js';\nimport $ol$control$Zoom from './ol/control/Zoom.js';\nimport $ol$control$ZoomSlider from './ol/control/ZoomSlider.js';\nimport $ol$control$ZoomToExtent from './ol/control/ZoomToExtent.js';\n\nvar ol = {};\nol.AssertionError = $ol$AssertionError;\nol.Collection = $ol$Collection;\nol.Collection.CollectionEvent = _ol_Collection$CollectionEvent;\nol.DataTile = $ol$DataTile;\nol.Disposable = $ol$Disposable;\nol.Feature = $ol$Feature;\nol.Feature.createStyleFunction = _ol_Feature$createStyleFunction;\nol.Geolocation = $ol$Geolocation;\nol.Image = $ol$Image;\nol.Image.listenImage = _ol_Image$listenImage;\nol.ImageBase = $ol$ImageBase;\nol.ImageCanvas = $ol$ImageCanvas;\nol.ImageTile = $ol$ImageTile;\nol.Kinetic = $ol$Kinetic;\nol.Map = $ol$Map;\nol.MapBrowserEvent = $ol$MapBrowserEvent;\nol.MapBrowserEventHandler = $ol$MapBrowserEventHandler;\nol.MapEvent = $ol$MapEvent;\nol.Object = $ol$Object;\nol.Object.ObjectEvent = _ol_Object$ObjectEvent;\nol.Observable = $ol$Observable;\nol.Observable.unByKey = _ol_Observable$unByKey;\nol.Overlay = $ol$Overlay;\nol.PluggableMap = $ol$PluggableMap;\nol.Tile = $ol$Tile;\nol.TileCache = $ol$TileCache;\nol.TileQueue = $ol$TileQueue;\nol.TileQueue.getTilePriority = _ol_TileQueue$getTilePriority;\nol.TileRange = $ol$TileRange;\nol.TileRange.createOrUpdate = _ol_TileRange$createOrUpdate;\nol.VectorRenderTile = $ol$VectorRenderTile;\nol.VectorTile = $ol$VectorTile;\nol.View = $ol$View;\nol.View.createCenterConstraint = _ol_View$createCenterConstraint;\nol.View.createResolutionConstraint = _ol_View$createResolutionConstraint;\nol.View.createRotationConstraint = _ol_View$createRotationConstraint;\nol.View.isNoopAnimation = _ol_View$isNoopAnimation;\nol.array = {};\nol.array.binarySearch = _ol_array$binarySearch;\nol.array.equals = _ol_array$equals;\nol.array.extend = _ol_array$extend;\nol.array.find = _ol_array$find;\nol.array.findIndex = _ol_array$findIndex;\nol.array.includes = _ol_array$includes;\nol.array.isSorted = _ol_array$isSorted;\nol.array.linearFindNearest = _ol_array$linearFindNearest;\nol.array.numberSafeCompareFunction = _ol_array$numberSafeCompareFunction;\nol.array.remove = _ol_array$remove;\nol.array.reverseSubArray = _ol_array$reverseSubArray;\nol.array.stableSort = _ol_array$stableSort;\nol.asserts = {};\nol.asserts.assert = _ol_asserts$assert;\nol.centerconstraint = {};\nol.centerconstraint.createExtent = _ol_centerconstraint$createExtent;\nol.centerconstraint.none = _ol_centerconstraint$none;\nol.color = {};\nol.color.asArray = _ol_color$asArray;\nol.color.asString = _ol_color$asString;\nol.color.fromString = _ol_color$fromString;\nol.color.isStringColor = _ol_color$isStringColor;\nol.color.normalize = _ol_color$normalize;\nol.color.toString = _ol_color$toString;\nol.colorlike = {};\nol.colorlike.asColorLike = _ol_colorlike$asColorLike;\nol.control = {};\nol.control.Attribution = $ol$control$Attribution;\nol.control.Control = $ol$control$Control;\nol.control.FullScreen = $ol$control$FullScreen;\nol.control.MousePosition = $ol$control$MousePosition;\nol.control.OverviewMap = $ol$control$OverviewMap;\nol.control.Rotate = $ol$control$Rotate;\nol.control.ScaleLine = $ol$control$ScaleLine;\nol.control.Zoom = $ol$control$Zoom;\nol.control.ZoomSlider = $ol$control$ZoomSlider;\nol.control.ZoomToExtent = $ol$control$ZoomToExtent;\nol.control.defaults = _ol_control$defaults;\nol.coordinate = {};\nol.coordinate.add = _ol_coordinate$add;\nol.coordinate.closestOnCircle = _ol_coordinate$closestOnCircle;\nol.coordinate.closestOnSegment = _ol_coordinate$closestOnSegment;\nol.coordinate.createStringXY = _ol_coordinate$createStringXY;\nol.coordinate.degreesToStringHDMS = _ol_coordinate$degreesToStringHDMS;\nol.coordinate.distance = _ol_coordinate$distance;\nol.coordinate.equals = _ol_coordinate$equals;\nol.coordinate.format = _ol_coordinate$format;\nol.coordinate.getWorldsAway = _ol_coordinate$getWorldsAway;\nol.coordinate.rotate = _ol_coordinate$rotate;\nol.coordinate.scale = _ol_coordinate$scale;\nol.coordinate.squaredDistance = _ol_coordinate$squaredDistance;\nol.coordinate.squaredDistanceToSegment = _ol_coordinate$squaredDistanceToSegment;\nol.coordinate.toStringHDMS = _ol_coordinate$toStringHDMS;\nol.coordinate.toStringXY = _ol_coordinate$toStringXY;\nol.coordinate.wrapX = _ol_coordinate$wrapX;\nol.css = {};\nol.css.CLASS_COLLAPSED = _ol_css$CLASS_COLLAPSED;\nol.css.CLASS_CONTROL = _ol_css$CLASS_CONTROL;\nol.css.CLASS_HIDDEN = _ol_css$CLASS_HIDDEN;\nol.css.CLASS_SELECTABLE = _ol_css$CLASS_SELECTABLE;\nol.css.CLASS_UNSELECTABLE = _ol_css$CLASS_UNSELECTABLE;\nol.css.CLASS_UNSUPPORTED = _ol_css$CLASS_UNSUPPORTED;\nol.css.cssOpacity = _ol_css$cssOpacity;\nol.css.getFontParameters = _ol_css$getFontParameters;\nol.dom = {};\nol.dom.createCanvasContext2D = _ol_dom$createCanvasContext2D;\nol.dom.outerHeight = _ol_dom$outerHeight;\nol.dom.outerWidth = _ol_dom$outerWidth;\nol.dom.removeChildren = _ol_dom$removeChildren;\nol.dom.removeNode = _ol_dom$removeNode;\nol.dom.replaceChildren = _ol_dom$replaceChildren;\nol.dom.replaceNode = _ol_dom$replaceNode;\nol.easing = {};\nol.easing.easeIn = _ol_easing$easeIn;\nol.easing.easeOut = _ol_easing$easeOut;\nol.easing.inAndOut = _ol_easing$inAndOut;\nol.easing.linear = _ol_easing$linear;\nol.easing.upAndDown = _ol_easing$upAndDown;\nol.events = {};\nol.events.Event = $ol$events$Event;\nol.events.Event.preventDefault = _ol_events_Event$preventDefault;\nol.events.Event.stopPropagation = _ol_events_Event$stopPropagation;\nol.events.Target = $ol$events$Target;\nol.events.condition = {};\nol.events.condition.all = _ol_events_condition$all;\nol.events.condition.altKeyOnly = _ol_events_condition$altKeyOnly;\nol.events.condition.altShiftKeysOnly = _ol_events_condition$altShiftKeysOnly;\nol.events.condition.always = _ol_events_condition$always;\nol.events.condition.click = _ol_events_condition$click;\nol.events.condition.doubleClick = _ol_events_condition$doubleClick;\nol.events.condition.focus = _ol_events_condition$focus;\nol.events.condition.focusWithTabindex = _ol_events_condition$focusWithTabindex;\nol.events.condition.mouseActionButton = _ol_events_condition$mouseActionButton;\nol.events.condition.mouseOnly = _ol_events_condition$mouseOnly;\nol.events.condition.never = _ol_events_condition$never;\nol.events.condition.noModifierKeys = _ol_events_condition$noModifierKeys;\nol.events.condition.penOnly = _ol_events_condition$penOnly;\nol.events.condition.platformModifierKeyOnly = _ol_events_condition$platformModifierKeyOnly;\nol.events.condition.pointerMove = _ol_events_condition$pointerMove;\nol.events.condition.primaryAction = _ol_events_condition$primaryAction;\nol.events.condition.shiftKeyOnly = _ol_events_condition$shiftKeyOnly;\nol.events.condition.singleClick = _ol_events_condition$singleClick;\nol.events.condition.targetNotEditable = _ol_events_condition$targetNotEditable;\nol.events.condition.touchOnly = _ol_events_condition$touchOnly;\nol.events.listen = _ol_events$listen;\nol.events.listenOnce = _ol_events$listenOnce;\nol.events.unlistenByKey = _ol_events$unlistenByKey;\nol.extent = {};\nol.extent.applyTransform = _ol_extent$applyTransform;\nol.extent.approximatelyEquals = _ol_extent$approximatelyEquals;\nol.extent.boundingExtent = _ol_extent$boundingExtent;\nol.extent.buffer = _ol_extent$buffer;\nol.extent.clone = _ol_extent$clone;\nol.extent.closestSquaredDistanceXY = _ol_extent$closestSquaredDistanceXY;\nol.extent.containsCoordinate = _ol_extent$containsCoordinate;\nol.extent.containsExtent = _ol_extent$containsExtent;\nol.extent.containsXY = _ol_extent$containsXY;\nol.extent.coordinateRelationship = _ol_extent$coordinateRelationship;\nol.extent.createEmpty = _ol_extent$createEmpty;\nol.extent.createOrUpdate = _ol_extent$createOrUpdate;\nol.extent.createOrUpdateEmpty = _ol_extent$createOrUpdateEmpty;\nol.extent.createOrUpdateFromCoordinate = _ol_extent$createOrUpdateFromCoordinate;\nol.extent.createOrUpdateFromCoordinates = _ol_extent$createOrUpdateFromCoordinates;\nol.extent.createOrUpdateFromFlatCoordinates = _ol_extent$createOrUpdateFromFlatCoordinates;\nol.extent.createOrUpdateFromRings = _ol_extent$createOrUpdateFromRings;\nol.extent.equals = _ol_extent$equals;\nol.extent.extend = _ol_extent$extend;\nol.extent.extendCoordinate = _ol_extent$extendCoordinate;\nol.extent.extendCoordinates = _ol_extent$extendCoordinates;\nol.extent.extendFlatCoordinates = _ol_extent$extendFlatCoordinates;\nol.extent.extendRings = _ol_extent$extendRings;\nol.extent.extendXY = _ol_extent$extendXY;\nol.extent.forEachCorner = _ol_extent$forEachCorner;\nol.extent.getArea = _ol_extent$getArea;\nol.extent.getBottomLeft = _ol_extent$getBottomLeft;\nol.extent.getBottomRight = _ol_extent$getBottomRight;\nol.extent.getCenter = _ol_extent$getCenter;\nol.extent.getCorner = _ol_extent$getCorner;\nol.extent.getEnlargedArea = _ol_extent$getEnlargedArea;\nol.extent.getForViewAndSize = _ol_extent$getForViewAndSize;\nol.extent.getHeight = _ol_extent$getHeight;\nol.extent.getIntersection = _ol_extent$getIntersection;\nol.extent.getIntersectionArea = _ol_extent$getIntersectionArea;\nol.extent.getMargin = _ol_extent$getMargin;\nol.extent.getSize = _ol_extent$getSize;\nol.extent.getTopLeft = _ol_extent$getTopLeft;\nol.extent.getTopRight = _ol_extent$getTopRight;\nol.extent.getWidth = _ol_extent$getWidth;\nol.extent.intersects = _ol_extent$intersects;\nol.extent.intersectsSegment = _ol_extent$intersectsSegment;\nol.extent.isEmpty = _ol_extent$isEmpty;\nol.extent.returnOrUpdate = _ol_extent$returnOrUpdate;\nol.extent.scaleFromCenter = _ol_extent$scaleFromCenter;\nol.extent.wrapX = _ol_extent$wrapX;\nol.featureloader = {};\nol.featureloader.loadFeaturesXhr = _ol_featureloader$loadFeaturesXhr;\nol.featureloader.setWithCredentials = _ol_featureloader$setWithCredentials;\nol.featureloader.xhr = _ol_featureloader$xhr;\nol.format = {};\nol.format.EsriJSON = $ol$format$EsriJSON;\nol.format.Feature = $ol$format$Feature;\nol.format.Feature.transformExtentWithOptions = _ol_format_Feature$transformExtentWithOptions;\nol.format.Feature.transformGeometryWithOptions = _ol_format_Feature$transformGeometryWithOptions;\nol.format.GML = $ol$format$GML;\nol.format.GML2 = $ol$format$GML2;\nol.format.GML3 = $ol$format$GML3;\nol.format.GML32 = $ol$format$GML32;\nol.format.GMLBase = $ol$format$GMLBase;\nol.format.GMLBase.GMLNS = _ol_format_GMLBase$GMLNS;\nol.format.GPX = $ol$format$GPX;\nol.format.GeoJSON = $ol$format$GeoJSON;\nol.format.IGC = $ol$format$IGC;\nol.format.IIIFInfo = $ol$format$IIIFInfo;\nol.format.JSONFeature = $ol$format$JSONFeature;\nol.format.KML = $ol$format$KML;\nol.format.KML.getDefaultFillStyle = _ol_format_KML$getDefaultFillStyle;\nol.format.KML.getDefaultImageStyle = _ol_format_KML$getDefaultImageStyle;\nol.format.KML.getDefaultStrokeStyle = _ol_format_KML$getDefaultStrokeStyle;\nol.format.KML.getDefaultStyle = _ol_format_KML$getDefaultStyle;\nol.format.KML.getDefaultStyleArray = _ol_format_KML$getDefaultStyleArray;\nol.format.KML.getDefaultTextStyle = _ol_format_KML$getDefaultTextStyle;\nol.format.KML.readFlatCoordinates = _ol_format_KML$readFlatCoordinates;\nol.format.MVT = $ol$format$MVT;\nol.format.OSMXML = $ol$format$OSMXML;\nol.format.OWS = $ol$format$OWS;\nol.format.Polyline = $ol$format$Polyline;\nol.format.Polyline.decodeDeltas = _ol_format_Polyline$decodeDeltas;\nol.format.Polyline.decodeFloats = _ol_format_Polyline$decodeFloats;\nol.format.Polyline.decodeSignedIntegers = _ol_format_Polyline$decodeSignedIntegers;\nol.format.Polyline.decodeUnsignedIntegers = _ol_format_Polyline$decodeUnsignedIntegers;\nol.format.Polyline.encodeDeltas = _ol_format_Polyline$encodeDeltas;\nol.format.Polyline.encodeFloats = _ol_format_Polyline$encodeFloats;\nol.format.Polyline.encodeSignedIntegers = _ol_format_Polyline$encodeSignedIntegers;\nol.format.Polyline.encodeUnsignedInteger = _ol_format_Polyline$encodeUnsignedInteger;\nol.format.Polyline.encodeUnsignedIntegers = _ol_format_Polyline$encodeUnsignedIntegers;\nol.format.TextFeature = $ol$format$TextFeature;\nol.format.TopoJSON = $ol$format$TopoJSON;\nol.format.WFS = $ol$format$WFS;\nol.format.WFS.writeFilter = _ol_format_WFS$writeFilter;\nol.format.WKB = $ol$format$WKB;\nol.format.WKT = $ol$format$WKT;\nol.format.WMSCapabilities = $ol$format$WMSCapabilities;\nol.format.WMSGetFeatureInfo = $ol$format$WMSGetFeatureInfo;\nol.format.WMTSCapabilities = $ol$format$WMTSCapabilities;\nol.format.XML = $ol$format$XML;\nol.format.XMLFeature = $ol$format$XMLFeature;\nol.format.filter = {};\nol.format.filter.And = $ol$format$filter$And;\nol.format.filter.Bbox = $ol$format$filter$Bbox;\nol.format.filter.Comparison = $ol$format$filter$Comparison;\nol.format.filter.ComparisonBinary = $ol$format$filter$ComparisonBinary;\nol.format.filter.Contains = $ol$format$filter$Contains;\nol.format.filter.DWithin = $ol$format$filter$DWithin;\nol.format.filter.Disjoint = $ol$format$filter$Disjoint;\nol.format.filter.During = $ol$format$filter$During;\nol.format.filter.EqualTo = $ol$format$filter$EqualTo;\nol.format.filter.Filter = $ol$format$filter$Filter;\nol.format.filter.GreaterThan = $ol$format$filter$GreaterThan;\nol.format.filter.GreaterThanOrEqualTo = $ol$format$filter$GreaterThanOrEqualTo;\nol.format.filter.Intersects = $ol$format$filter$Intersects;\nol.format.filter.IsBetween = $ol$format$filter$IsBetween;\nol.format.filter.IsLike = $ol$format$filter$IsLike;\nol.format.filter.IsNull = $ol$format$filter$IsNull;\nol.format.filter.LessThan = $ol$format$filter$LessThan;\nol.format.filter.LessThanOrEqualTo = $ol$format$filter$LessThanOrEqualTo;\nol.format.filter.LogicalNary = $ol$format$filter$LogicalNary;\nol.format.filter.Not = $ol$format$filter$Not;\nol.format.filter.NotEqualTo = $ol$format$filter$NotEqualTo;\nol.format.filter.Or = $ol$format$filter$Or;\nol.format.filter.ResourceId = $ol$format$filter$ResourceId;\nol.format.filter.Spatial = $ol$format$filter$Spatial;\nol.format.filter.Within = $ol$format$filter$Within;\nol.format.filter.and = _ol_format_filter$and;\nol.format.filter.bbox = _ol_format_filter$bbox;\nol.format.filter.between = _ol_format_filter$between;\nol.format.filter.contains = _ol_format_filter$contains;\nol.format.filter.disjoint = _ol_format_filter$disjoint;\nol.format.filter.during = _ol_format_filter$during;\nol.format.filter.dwithin = _ol_format_filter$dwithin;\nol.format.filter.equalTo = _ol_format_filter$equalTo;\nol.format.filter.greaterThan = _ol_format_filter$greaterThan;\nol.format.filter.greaterThanOrEqualTo = _ol_format_filter$greaterThanOrEqualTo;\nol.format.filter.intersects = _ol_format_filter$intersects;\nol.format.filter.isNull = _ol_format_filter$isNull;\nol.format.filter.lessThan = _ol_format_filter$lessThan;\nol.format.filter.lessThanOrEqualTo = _ol_format_filter$lessThanOrEqualTo;\nol.format.filter.like = _ol_format_filter$like;\nol.format.filter.not = _ol_format_filter$not;\nol.format.filter.notEqualTo = _ol_format_filter$notEqualTo;\nol.format.filter.or = _ol_format_filter$or;\nol.format.filter.resourceId = _ol_format_filter$resourceId;\nol.format.filter.within = _ol_format_filter$within;\nol.format.xlink = {};\nol.format.xlink.readHref = _ol_format_xlink$readHref;\nol.format.xsd = {};\nol.format.xsd.readBoolean = _ol_format_xsd$readBoolean;\nol.format.xsd.readBooleanString = _ol_format_xsd$readBooleanString;\nol.format.xsd.readDateTime = _ol_format_xsd$readDateTime;\nol.format.xsd.readDecimal = _ol_format_xsd$readDecimal;\nol.format.xsd.readDecimalString = _ol_format_xsd$readDecimalString;\nol.format.xsd.readNonNegativeIntegerString = _ol_format_xsd$readNonNegativeIntegerString;\nol.format.xsd.readPositiveInteger = _ol_format_xsd$readPositiveInteger;\nol.format.xsd.readString = _ol_format_xsd$readString;\nol.format.xsd.writeBooleanTextNode = _ol_format_xsd$writeBooleanTextNode;\nol.format.xsd.writeCDATASection = _ol_format_xsd$writeCDATASection;\nol.format.xsd.writeDateTimeTextNode = _ol_format_xsd$writeDateTimeTextNode;\nol.format.xsd.writeDecimalTextNode = _ol_format_xsd$writeDecimalTextNode;\nol.format.xsd.writeNonNegativeIntegerTextNode = _ol_format_xsd$writeNonNegativeIntegerTextNode;\nol.format.xsd.writeStringTextNode = _ol_format_xsd$writeStringTextNode;\nol.functions = {};\nol.functions.FALSE = _ol_functions$FALSE;\nol.functions.TRUE = _ol_functions$TRUE;\nol.functions.VOID = _ol_functions$VOID;\nol.functions.memoizeOne = _ol_functions$memoizeOne;\nol.functions.toPromise = _ol_functions$toPromise;\nol.geom = {};\nol.geom.Circle = $ol$geom$Circle;\nol.geom.Geometry = $ol$geom$Geometry;\nol.geom.GeometryCollection = $ol$geom$GeometryCollection;\nol.geom.LineString = $ol$geom$LineString;\nol.geom.LinearRing = $ol$geom$LinearRing;\nol.geom.MultiLineString = $ol$geom$MultiLineString;\nol.geom.MultiPoint = $ol$geom$MultiPoint;\nol.geom.MultiPolygon = $ol$geom$MultiPolygon;\nol.geom.Point = $ol$geom$Point;\nol.geom.Polygon = $ol$geom$Polygon;\nol.geom.Polygon.circular = _ol_geom_Polygon$circular;\nol.geom.Polygon.fromCircle = _ol_geom_Polygon$fromCircle;\nol.geom.Polygon.fromExtent = _ol_geom_Polygon$fromExtent;\nol.geom.Polygon.makeRegular = _ol_geom_Polygon$makeRegular;\nol.geom.SimpleGeometry = $ol$geom$SimpleGeometry;\nol.geom.SimpleGeometry.getStrideForLayout = _ol_geom_SimpleGeometry$getStrideForLayout;\nol.geom.SimpleGeometry.transformGeom2D = _ol_geom_SimpleGeometry$transformGeom2D;\nol.geom.flat = {};\nol.geom.flat.area = {};\nol.geom.flat.area.linearRing = _ol_geom_flat_area$linearRing;\nol.geom.flat.area.linearRings = _ol_geom_flat_area$linearRings;\nol.geom.flat.area.linearRingss = _ol_geom_flat_area$linearRingss;\nol.geom.flat.center = {};\nol.geom.flat.center.linearRingss = _ol_geom_flat_center$linearRingss;\nol.geom.flat.closest = {};\nol.geom.flat.closest.arrayMaxSquaredDelta = _ol_geom_flat_closest$arrayMaxSquaredDelta;\nol.geom.flat.closest.assignClosestArrayPoint = _ol_geom_flat_closest$assignClosestArrayPoint;\nol.geom.flat.closest.assignClosestMultiArrayPoint = _ol_geom_flat_closest$assignClosestMultiArrayPoint;\nol.geom.flat.closest.assignClosestPoint = _ol_geom_flat_closest$assignClosestPoint;\nol.geom.flat.closest.maxSquaredDelta = _ol_geom_flat_closest$maxSquaredDelta;\nol.geom.flat.closest.multiArrayMaxSquaredDelta = _ol_geom_flat_closest$multiArrayMaxSquaredDelta;\nol.geom.flat.contains = {};\nol.geom.flat.contains.linearRingContainsExtent = _ol_geom_flat_contains$linearRingContainsExtent;\nol.geom.flat.contains.linearRingContainsXY = _ol_geom_flat_contains$linearRingContainsXY;\nol.geom.flat.contains.linearRingsContainsXY = _ol_geom_flat_contains$linearRingsContainsXY;\nol.geom.flat.contains.linearRingssContainsXY = _ol_geom_flat_contains$linearRingssContainsXY;\nol.geom.flat.deflate = {};\nol.geom.flat.deflate.deflateCoordinate = _ol_geom_flat_deflate$deflateCoordinate;\nol.geom.flat.deflate.deflateCoordinates = _ol_geom_flat_deflate$deflateCoordinates;\nol.geom.flat.deflate.deflateCoordinatesArray = _ol_geom_flat_deflate$deflateCoordinatesArray;\nol.geom.flat.deflate.deflateMultiCoordinatesArray = _ol_geom_flat_deflate$deflateMultiCoordinatesArray;\nol.geom.flat.flip = {};\nol.geom.flat.flip.flipXY = _ol_geom_flat_flip$flipXY;\nol.geom.flat.geodesic = {};\nol.geom.flat.geodesic.greatCircleArc = _ol_geom_flat_geodesic$greatCircleArc;\nol.geom.flat.geodesic.meridian = _ol_geom_flat_geodesic$meridian;\nol.geom.flat.geodesic.parallel = _ol_geom_flat_geodesic$parallel;\nol.geom.flat.inflate = {};\nol.geom.flat.inflate.inflateCoordinates = _ol_geom_flat_inflate$inflateCoordinates;\nol.geom.flat.inflate.inflateCoordinatesArray = _ol_geom_flat_inflate$inflateCoordinatesArray;\nol.geom.flat.inflate.inflateMultiCoordinatesArray = _ol_geom_flat_inflate$inflateMultiCoordinatesArray;\nol.geom.flat.interiorpoint = {};\nol.geom.flat.interiorpoint.getInteriorPointOfArray = _ol_geom_flat_interiorpoint$getInteriorPointOfArray;\nol.geom.flat.interiorpoint.getInteriorPointsOfMultiArray = _ol_geom_flat_interiorpoint$getInteriorPointsOfMultiArray;\nol.geom.flat.interpolate = {};\nol.geom.flat.interpolate.interpolatePoint = _ol_geom_flat_interpolate$interpolatePoint;\nol.geom.flat.interpolate.lineStringCoordinateAtM = _ol_geom_flat_interpolate$lineStringCoordinateAtM;\nol.geom.flat.interpolate.lineStringsCoordinateAtM = _ol_geom_flat_interpolate$lineStringsCoordinateAtM;\nol.geom.flat.intersectsextent = {};\nol.geom.flat.intersectsextent.intersectsLineString = _ol_geom_flat_intersectsextent$intersectsLineString;\nol.geom.flat.intersectsextent.intersectsLineStringArray = _ol_geom_flat_intersectsextent$intersectsLineStringArray;\nol.geom.flat.intersectsextent.intersectsLinearRing = _ol_geom_flat_intersectsextent$intersectsLinearRing;\nol.geom.flat.intersectsextent.intersectsLinearRingArray = _ol_geom_flat_intersectsextent$intersectsLinearRingArray;\nol.geom.flat.intersectsextent.intersectsLinearRingMultiArray = _ol_geom_flat_intersectsextent$intersectsLinearRingMultiArray;\nol.geom.flat.length = {};\nol.geom.flat.length.lineStringLength = _ol_geom_flat_length$lineStringLength;\nol.geom.flat.length.linearRingLength = _ol_geom_flat_length$linearRingLength;\nol.geom.flat.orient = {};\nol.geom.flat.orient.inflateEnds = _ol_geom_flat_orient$inflateEnds;\nol.geom.flat.orient.linearRingIsClockwise = _ol_geom_flat_orient$linearRingIsClockwise;\nol.geom.flat.orient.linearRingsAreOriented = _ol_geom_flat_orient$linearRingsAreOriented;\nol.geom.flat.orient.linearRingssAreOriented = _ol_geom_flat_orient$linearRingssAreOriented;\nol.geom.flat.orient.orientLinearRings = _ol_geom_flat_orient$orientLinearRings;\nol.geom.flat.orient.orientLinearRingsArray = _ol_geom_flat_orient$orientLinearRingsArray;\nol.geom.flat.reverse = {};\nol.geom.flat.reverse.coordinates = _ol_geom_flat_reverse$coordinates;\nol.geom.flat.segments = {};\nol.geom.flat.segments.forEach = _ol_geom_flat_segments$forEach;\nol.geom.flat.simplify = {};\nol.geom.flat.simplify.douglasPeucker = _ol_geom_flat_simplify$douglasPeucker;\nol.geom.flat.simplify.douglasPeuckerArray = _ol_geom_flat_simplify$douglasPeuckerArray;\nol.geom.flat.simplify.douglasPeuckerMultiArray = _ol_geom_flat_simplify$douglasPeuckerMultiArray;\nol.geom.flat.simplify.quantize = _ol_geom_flat_simplify$quantize;\nol.geom.flat.simplify.quantizeArray = _ol_geom_flat_simplify$quantizeArray;\nol.geom.flat.simplify.quantizeMultiArray = _ol_geom_flat_simplify$quantizeMultiArray;\nol.geom.flat.simplify.radialDistance = _ol_geom_flat_simplify$radialDistance;\nol.geom.flat.simplify.simplifyLineString = _ol_geom_flat_simplify$simplifyLineString;\nol.geom.flat.simplify.snap = _ol_geom_flat_simplify$snap;\nol.geom.flat.straightchunk = {};\nol.geom.flat.straightchunk.matchingChunk = _ol_geom_flat_straightchunk$matchingChunk;\nol.geom.flat.textpath = {};\nol.geom.flat.textpath.drawTextOnPath = _ol_geom_flat_textpath$drawTextOnPath;\nol.geom.flat.topology = {};\nol.geom.flat.topology.lineStringIsClosed = _ol_geom_flat_topology$lineStringIsClosed;\nol.geom.flat.transform = {};\nol.geom.flat.transform.rotate = _ol_geom_flat_transform$rotate;\nol.geom.flat.transform.scale = _ol_geom_flat_transform$scale;\nol.geom.flat.transform.transform2D = _ol_geom_flat_transform$transform2D;\nol.geom.flat.transform.translate = _ol_geom_flat_transform$translate;\nol.has = {};\nol.has.DEVICE_PIXEL_RATIO = _ol_has$DEVICE_PIXEL_RATIO;\nol.has.FIREFOX = _ol_has$FIREFOX;\nol.has.IMAGE_DECODE = _ol_has$IMAGE_DECODE;\nol.has.MAC = _ol_has$MAC;\nol.has.PASSIVE_EVENT_LISTENERS = _ol_has$PASSIVE_EVENT_LISTENERS;\nol.has.SAFARI = _ol_has$SAFARI;\nol.has.WEBKIT = _ol_has$WEBKIT;\nol.has.WORKER_OFFSCREEN_CANVAS = _ol_has$WORKER_OFFSCREEN_CANVAS;\nol.interaction = {};\nol.interaction.DoubleClickZoom = $ol$interaction$DoubleClickZoom;\nol.interaction.DragAndDrop = $ol$interaction$DragAndDrop;\nol.interaction.DragAndDrop.DragAndDropEvent = _ol_interaction_DragAndDrop$DragAndDropEvent;\nol.interaction.DragBox = $ol$interaction$DragBox;\nol.interaction.DragBox.DragBoxEvent = _ol_interaction_DragBox$DragBoxEvent;\nol.interaction.DragPan = $ol$interaction$DragPan;\nol.interaction.DragRotate = $ol$interaction$DragRotate;\nol.interaction.DragRotateAndZoom = $ol$interaction$DragRotateAndZoom;\nol.interaction.DragZoom = $ol$interaction$DragZoom;\nol.interaction.Draw = $ol$interaction$Draw;\nol.interaction.Draw.DrawEvent = _ol_interaction_Draw$DrawEvent;\nol.interaction.Draw.createBox = _ol_interaction_Draw$createBox;\nol.interaction.Draw.createRegularPolygon = _ol_interaction_Draw$createRegularPolygon;\nol.interaction.Extent = $ol$interaction$Extent;\nol.interaction.Extent.ExtentEvent = _ol_interaction_Extent$ExtentEvent;\nol.interaction.Interaction = $ol$interaction$Interaction;\nol.interaction.Interaction.pan = _ol_interaction_Interaction$pan;\nol.interaction.Interaction.zoomByDelta = _ol_interaction_Interaction$zoomByDelta;\nol.interaction.KeyboardPan = $ol$interaction$KeyboardPan;\nol.interaction.KeyboardZoom = $ol$interaction$KeyboardZoom;\nol.interaction.Modify = $ol$interaction$Modify;\nol.interaction.Modify.ModifyEvent = _ol_interaction_Modify$ModifyEvent;\nol.interaction.MouseWheelZoom = $ol$interaction$MouseWheelZoom;\nol.interaction.PinchRotate = $ol$interaction$PinchRotate;\nol.interaction.PinchZoom = $ol$interaction$PinchZoom;\nol.interaction.Pointer = $ol$interaction$Pointer;\nol.interaction.Pointer.centroid = _ol_interaction_Pointer$centroid;\nol.interaction.Select = $ol$interaction$Select;\nol.interaction.Select.SelectEvent = _ol_interaction_Select$SelectEvent;\nol.interaction.Snap = $ol$interaction$Snap;\nol.interaction.Translate = $ol$interaction$Translate;\nol.interaction.Translate.TranslateEvent = _ol_interaction_Translate$TranslateEvent;\nol.interaction.defaults = _ol_interaction$defaults;\nol.layer = {};\nol.layer.Base = $ol$layer$Base;\nol.layer.BaseImage = $ol$layer$BaseImage;\nol.layer.BaseTile = $ol$layer$BaseTile;\nol.layer.BaseVector = $ol$layer$BaseVector;\nol.layer.Graticule = $ol$layer$Graticule;\nol.layer.Group = $ol$layer$Group;\nol.layer.Group.GroupEvent = _ol_layer_Group$GroupEvent;\nol.layer.Heatmap = $ol$layer$Heatmap;\nol.layer.Image = $ol$layer$Image;\nol.layer.Layer = $ol$layer$Layer;\nol.layer.Layer.inView = _ol_layer_Layer$inView;\nol.layer.MapboxVector = $ol$layer$MapboxVector;\nol.layer.MapboxVector.getMapboxPath = _ol_layer_MapboxVector$getMapboxPath;\nol.layer.MapboxVector.normalizeGlyphsUrl = _ol_layer_MapboxVector$normalizeGlyphsUrl;\nol.layer.MapboxVector.normalizeSourceUrl = _ol_layer_MapboxVector$normalizeSourceUrl;\nol.layer.MapboxVector.normalizeSpriteUrl = _ol_layer_MapboxVector$normalizeSpriteUrl;\nol.layer.MapboxVector.normalizeStyleUrl = _ol_layer_MapboxVector$normalizeStyleUrl;\nol.layer.Tile = $ol$layer$Tile;\nol.layer.Vector = $ol$layer$Vector;\nol.layer.VectorImage = $ol$layer$VectorImage;\nol.layer.VectorTile = $ol$layer$VectorTile;\nol.layer.WebGLPoints = $ol$layer$WebGLPoints;\nol.layer.WebGLTile = $ol$layer$WebGLTile;\nol.loadingstrategy = {};\nol.loadingstrategy.all = _ol_loadingstrategy$all;\nol.loadingstrategy.bbox = _ol_loadingstrategy$bbox;\nol.loadingstrategy.tile = _ol_loadingstrategy$tile;\nol.math = {};\nol.math.ceil = _ol_math$ceil;\nol.math.clamp = _ol_math$clamp;\nol.math.cosh = _ol_math$cosh;\nol.math.floor = _ol_math$floor;\nol.math.lerp = _ol_math$lerp;\nol.math.log2 = _ol_math$log2;\nol.math.modulo = _ol_math$modulo;\nol.math.round = _ol_math$round;\nol.math.solveLinearSystem = _ol_math$solveLinearSystem;\nol.math.squaredDistance = _ol_math$squaredDistance;\nol.math.squaredSegmentDistance = _ol_math$squaredSegmentDistance;\nol.math.toDegrees = _ol_math$toDegrees;\nol.math.toFixed = _ol_math$toFixed;\nol.math.toRadians = _ol_math$toRadians;\nol.net = {};\nol.net.ClientError = _ol_net$ClientError;\nol.net.ResponseError = _ol_net$ResponseError;\nol.net.getJSON = _ol_net$getJSON;\nol.net.jsonp = _ol_net$jsonp;\nol.net.overrideXHR = _ol_net$overrideXHR;\nol.net.resolveUrl = _ol_net$resolveUrl;\nol.net.restoreXHR = _ol_net$restoreXHR;\nol.obj = {};\nol.obj.assign = _ol_obj$assign;\nol.obj.clear = _ol_obj$clear;\nol.obj.getValues = _ol_obj$getValues;\nol.obj.isEmpty = _ol_obj$isEmpty;\nol.proj = {};\nol.proj.Projection = $ol$proj$Projection;\nol.proj.Units = {};\nol.proj.Units.METERS_PER_UNIT = _ol_proj_Units$METERS_PER_UNIT;\nol.proj.Units.fromCode = _ol_proj_Units$fromCode;\nol.proj.addCommon = _ol_proj$addCommon;\nol.proj.addCoordinateTransforms = _ol_proj$addCoordinateTransforms;\nol.proj.addEquivalentProjections = _ol_proj$addEquivalentProjections;\nol.proj.addEquivalentTransforms = _ol_proj$addEquivalentTransforms;\nol.proj.addProjection = _ol_proj$addProjection;\nol.proj.addProjections = _ol_proj$addProjections;\nol.proj.clearAllProjections = _ol_proj$clearAllProjections;\nol.proj.clearUserProjection = _ol_proj$clearUserProjection;\nol.proj.cloneTransform = _ol_proj$cloneTransform;\nol.proj.createProjection = _ol_proj$createProjection;\nol.proj.createSafeCoordinateTransform = _ol_proj$createSafeCoordinateTransform;\nol.proj.createTransformFromCoordinateTransform = _ol_proj$createTransformFromCoordinateTransform;\nol.proj.disableCoordinateWarning = _ol_proj$disableCoordinateWarning;\nol.proj.epsg3857 = {};\nol.proj.epsg3857.EXTENT = _ol_proj_epsg3857$EXTENT;\nol.proj.epsg3857.HALF_SIZE = _ol_proj_epsg3857$HALF_SIZE;\nol.proj.epsg3857.MAX_SAFE_Y = _ol_proj_epsg3857$MAX_SAFE_Y;\nol.proj.epsg3857.PROJECTIONS = _ol_proj_epsg3857$PROJECTIONS;\nol.proj.epsg3857.RADIUS = _ol_proj_epsg3857$RADIUS;\nol.proj.epsg3857.WORLD_EXTENT = _ol_proj_epsg3857$WORLD_EXTENT;\nol.proj.epsg3857.fromEPSG4326 = _ol_proj_epsg3857$fromEPSG4326;\nol.proj.epsg3857.toEPSG4326 = _ol_proj_epsg3857$toEPSG4326;\nol.proj.epsg4326 = {};\nol.proj.epsg4326.EXTENT = _ol_proj_epsg4326$EXTENT;\nol.proj.epsg4326.METERS_PER_UNIT = _ol_proj_epsg4326$METERS_PER_UNIT;\nol.proj.epsg4326.PROJECTIONS = _ol_proj_epsg4326$PROJECTIONS;\nol.proj.epsg4326.RADIUS = _ol_proj_epsg4326$RADIUS;\nol.proj.equivalent = _ol_proj$equivalent;\nol.proj.fromLonLat = _ol_proj$fromLonLat;\nol.proj.fromUserCoordinate = _ol_proj$fromUserCoordinate;\nol.proj.fromUserExtent = _ol_proj$fromUserExtent;\nol.proj.fromUserResolution = _ol_proj$fromUserResolution;\nol.proj.get = _ol_proj$get;\nol.proj.getPointResolution = _ol_proj$getPointResolution;\nol.proj.getTransform = _ol_proj$getTransform;\nol.proj.getTransformFromProjections = _ol_proj$getTransformFromProjections;\nol.proj.getUserProjection = _ol_proj$getUserProjection;\nol.proj.identityTransform = _ol_proj$identityTransform;\nol.proj.proj4 = {};\nol.proj.proj4.register = _ol_proj_proj4$register;\nol.proj.projections = {};\nol.proj.projections.add = _ol_proj_projections$add;\nol.proj.projections.clear = _ol_proj_projections$clear;\nol.proj.projections.get = _ol_proj_projections$get;\nol.proj.setUserProjection = _ol_proj$setUserProjection;\nol.proj.toLonLat = _ol_proj$toLonLat;\nol.proj.toUserCoordinate = _ol_proj$toUserCoordinate;\nol.proj.toUserExtent = _ol_proj$toUserExtent;\nol.proj.toUserResolution = _ol_proj$toUserResolution;\nol.proj.transform = _ol_proj$transform;\nol.proj.transformExtent = _ol_proj$transformExtent;\nol.proj.transformWithProjections = _ol_proj$transformWithProjections;\nol.proj.transforms = {};\nol.proj.transforms.add = _ol_proj_transforms$add;\nol.proj.transforms.clear = _ol_proj_transforms$clear;\nol.proj.transforms.get = _ol_proj_transforms$get;\nol.proj.transforms.remove = _ol_proj_transforms$remove;\nol.proj.useGeographic = _ol_proj$useGeographic;\nol.render = {};\nol.render.Box = $ol$render$Box;\nol.render.Event = $ol$render$Event;\nol.render.Feature = $ol$render$Feature;\nol.render.Feature.toFeature = _ol_render_Feature$toFeature;\nol.render.Feature.toGeometry = _ol_render_Feature$toGeometry;\nol.render.VectorContext = $ol$render$VectorContext;\nol.render.canvas = {};\nol.render.canvas.Builder = $ol$render$canvas$Builder;\nol.render.canvas.BuilderGroup = $ol$render$canvas$BuilderGroup;\nol.render.canvas.Executor = $ol$render$canvas$Executor;\nol.render.canvas.ExecutorGroup = $ol$render$canvas$ExecutorGroup;\nol.render.canvas.ExecutorGroup.getPixelIndexArray = _ol_render_canvas_ExecutorGroup$getPixelIndexArray;\nol.render.canvas.ImageBuilder = $ol$render$canvas$ImageBuilder;\nol.render.canvas.Immediate = $ol$render$canvas$Immediate;\nol.render.canvas.Instruction = {};\nol.render.canvas.Instruction.beginPathInstruction = _ol_render_canvas_Instruction$beginPathInstruction;\nol.render.canvas.Instruction.closePathInstruction = _ol_render_canvas_Instruction$closePathInstruction;\nol.render.canvas.Instruction.fillInstruction = _ol_render_canvas_Instruction$fillInstruction;\nol.render.canvas.Instruction.strokeInstruction = _ol_render_canvas_Instruction$strokeInstruction;\nol.render.canvas.LineStringBuilder = $ol$render$canvas$LineStringBuilder;\nol.render.canvas.PolygonBuilder = $ol$render$canvas$PolygonBuilder;\nol.render.canvas.TextBuilder = $ol$render$canvas$TextBuilder;\nol.render.canvas.checkedFonts = _ol_render_canvas$checkedFonts;\nol.render.canvas.defaultFillStyle = _ol_render_canvas$defaultFillStyle;\nol.render.canvas.defaultFont = _ol_render_canvas$defaultFont;\nol.render.canvas.defaultLineCap = _ol_render_canvas$defaultLineCap;\nol.render.canvas.defaultLineDash = _ol_render_canvas$defaultLineDash;\nol.render.canvas.defaultLineDashOffset = _ol_render_canvas$defaultLineDashOffset;\nol.render.canvas.defaultLineJoin = _ol_render_canvas$defaultLineJoin;\nol.render.canvas.defaultLineWidth = _ol_render_canvas$defaultLineWidth;\nol.render.canvas.defaultMiterLimit = _ol_render_canvas$defaultMiterLimit;\nol.render.canvas.defaultPadding = _ol_render_canvas$defaultPadding;\nol.render.canvas.defaultStrokeStyle = _ol_render_canvas$defaultStrokeStyle;\nol.render.canvas.defaultTextAlign = _ol_render_canvas$defaultTextAlign;\nol.render.canvas.defaultTextBaseline = _ol_render_canvas$defaultTextBaseline;\nol.render.canvas.drawImageOrLabel = _ol_render_canvas$drawImageOrLabel;\nol.render.canvas.getTextDimensions = _ol_render_canvas$getTextDimensions;\nol.render.canvas.hitdetect = {};\nol.render.canvas.hitdetect.HIT_DETECT_RESOLUTION = _ol_render_canvas_hitdetect$HIT_DETECT_RESOLUTION;\nol.render.canvas.hitdetect.createHitDetectionImageData = _ol_render_canvas_hitdetect$createHitDetectionImageData;\nol.render.canvas.hitdetect.hitDetect = _ol_render_canvas_hitdetect$hitDetect;\nol.render.canvas.labelCache = _ol_render_canvas$labelCache;\nol.render.canvas.measureAndCacheTextWidth = _ol_render_canvas$measureAndCacheTextWidth;\nol.render.canvas.measureTextHeight = _ol_render_canvas$measureTextHeight;\nol.render.canvas.measureTextWidth = _ol_render_canvas$measureTextWidth;\nol.render.canvas.registerFont = _ol_render_canvas$registerFont;\nol.render.canvas.rotateAtOffset = _ol_render_canvas$rotateAtOffset;\nol.render.canvas.textHeights = _ol_render_canvas$textHeights;\nol.render.getRenderPixel = _ol_render$getRenderPixel;\nol.render.getVectorContext = _ol_render$getVectorContext;\nol.render.toContext = _ol_render$toContext;\nol.renderer = {};\nol.renderer.Composite = $ol$renderer$Composite;\nol.renderer.Layer = $ol$renderer$Layer;\nol.renderer.Map = $ol$renderer$Map;\nol.renderer.canvas = {};\nol.renderer.canvas.ImageLayer = $ol$renderer$canvas$ImageLayer;\nol.renderer.canvas.Layer = $ol$renderer$canvas$Layer;\nol.renderer.canvas.TileLayer = $ol$renderer$canvas$TileLayer;\nol.renderer.canvas.VectorImageLayer = $ol$renderer$canvas$VectorImageLayer;\nol.renderer.canvas.VectorLayer = $ol$renderer$canvas$VectorLayer;\nol.renderer.canvas.VectorTileLayer = $ol$renderer$canvas$VectorTileLayer;\nol.renderer.canvas.common = {};\nol.renderer.canvas.common.IMAGE_SMOOTHING_DISABLED = _ol_renderer_canvas_common$IMAGE_SMOOTHING_DISABLED;\nol.renderer.canvas.common.IMAGE_SMOOTHING_ENABLED = _ol_renderer_canvas_common$IMAGE_SMOOTHING_ENABLED;\nol.renderer.vector = {};\nol.renderer.vector.defaultOrder = _ol_renderer_vector$defaultOrder;\nol.renderer.vector.getSquaredTolerance = _ol_renderer_vector$getSquaredTolerance;\nol.renderer.vector.getTolerance = _ol_renderer_vector$getTolerance;\nol.renderer.vector.renderFeature = _ol_renderer_vector$renderFeature;\nol.renderer.webgl = {};\nol.renderer.webgl.Layer = $ol$renderer$webgl$Layer;\nol.renderer.webgl.Layer.colorDecodeId = _ol_renderer_webgl_Layer$colorDecodeId;\nol.renderer.webgl.Layer.colorEncodeId = _ol_renderer_webgl_Layer$colorEncodeId;\nol.renderer.webgl.Layer.getBlankImageData = _ol_renderer_webgl_Layer$getBlankImageData;\nol.renderer.webgl.Layer.writePointFeatureToBuffers = _ol_renderer_webgl_Layer$writePointFeatureToBuffers;\nol.renderer.webgl.PointsLayer = $ol$renderer$webgl$PointsLayer;\nol.renderer.webgl.TileLayer = $ol$renderer$webgl$TileLayer;\nol.renderer.webgl.TileLayer.Attributes = _ol_renderer_webgl_TileLayer$Attributes;\nol.renderer.webgl.TileLayer.Uniforms = _ol_renderer_webgl_TileLayer$Uniforms;\nol.reproj = {};\nol.reproj.Image = $ol$reproj$Image;\nol.reproj.Tile = $ol$reproj$Tile;\nol.reproj.Triangulation = $ol$reproj$Triangulation;\nol.reproj.calculateSourceExtentResolution = _ol_reproj$calculateSourceExtentResolution;\nol.reproj.calculateSourceResolution = _ol_reproj$calculateSourceResolution;\nol.reproj.common = {};\nol.reproj.common.ENABLE_RASTER_REPROJECTION = _ol_reproj_common$ENABLE_RASTER_REPROJECTION;\nol.reproj.common.ERROR_THRESHOLD = _ol_reproj_common$ERROR_THRESHOLD;\nol.reproj.render = _ol_reproj$render;\nol.resolutionconstraint = {};\nol.resolutionconstraint.createMinMaxResolution = _ol_resolutionconstraint$createMinMaxResolution;\nol.resolutionconstraint.createSnapToPower = _ol_resolutionconstraint$createSnapToPower;\nol.resolutionconstraint.createSnapToResolutions = _ol_resolutionconstraint$createSnapToResolutions;\nol.rotationconstraint = {};\nol.rotationconstraint.createSnapToN = _ol_rotationconstraint$createSnapToN;\nol.rotationconstraint.createSnapToZero = _ol_rotationconstraint$createSnapToZero;\nol.rotationconstraint.disable = _ol_rotationconstraint$disable;\nol.rotationconstraint.none = _ol_rotationconstraint$none;\nol.size = {};\nol.size.buffer = _ol_size$buffer;\nol.size.hasArea = _ol_size$hasArea;\nol.size.scale = _ol_size$scale;\nol.size.toSize = _ol_size$toSize;\nol.source = {};\nol.source.BingMaps = $ol$source$BingMaps;\nol.source.BingMaps.quadKey = _ol_source_BingMaps$quadKey;\nol.source.CartoDB = $ol$source$CartoDB;\nol.source.Cluster = $ol$source$Cluster;\nol.source.DataTile = $ol$source$DataTile;\nol.source.GeoTIFF = $ol$source$GeoTIFF;\nol.source.IIIF = $ol$source$IIIF;\nol.source.Image = $ol$source$Image;\nol.source.Image.ImageSourceEvent = _ol_source_Image$ImageSourceEvent;\nol.source.Image.defaultImageLoadFunction = _ol_source_Image$defaultImageLoadFunction;\nol.source.ImageArcGISRest = $ol$source$ImageArcGISRest;\nol.source.ImageCanvas = $ol$source$ImageCanvas;\nol.source.ImageMapGuide = $ol$source$ImageMapGuide;\nol.source.ImageStatic = $ol$source$ImageStatic;\nol.source.ImageWMS = $ol$source$ImageWMS;\nol.source.OGCMapTile = $ol$source$OGCMapTile;\nol.source.OGCVectorTile = $ol$source$OGCVectorTile;\nol.source.OSM = $ol$source$OSM;\nol.source.OSM.ATTRIBUTION = _ol_source_OSM$ATTRIBUTION;\nol.source.Raster = $ol$source$Raster;\nol.source.Raster.Processor = _ol_source_Raster$Processor;\nol.source.Raster.RasterSourceEvent = _ol_source_Raster$RasterSourceEvent;\nol.source.Raster.newImageData = _ol_source_Raster$newImageData;\nol.source.Source = $ol$source$Source;\nol.source.Stamen = $ol$source$Stamen;\nol.source.Tile = $ol$source$Tile;\nol.source.Tile.TileSourceEvent = _ol_source_Tile$TileSourceEvent;\nol.source.TileArcGISRest = $ol$source$TileArcGISRest;\nol.source.TileDebug = $ol$source$TileDebug;\nol.source.TileImage = $ol$source$TileImage;\nol.source.TileJSON = $ol$source$TileJSON;\nol.source.TileWMS = $ol$source$TileWMS;\nol.source.UTFGrid = $ol$source$UTFGrid;\nol.source.UTFGrid.CustomTile = _ol_source_UTFGrid$CustomTile;\nol.source.UrlTile = $ol$source$UrlTile;\nol.source.Vector = $ol$source$Vector;\nol.source.Vector.VectorSourceEvent = _ol_source_Vector$VectorSourceEvent;\nol.source.VectorTile = $ol$source$VectorTile;\nol.source.VectorTile.defaultLoadFunction = _ol_source_VectorTile$defaultLoadFunction;\nol.source.WMTS = $ol$source$WMTS;\nol.source.WMTS.optionsFromCapabilities = _ol_source_WMTS$optionsFromCapabilities;\nol.source.XYZ = $ol$source$XYZ;\nol.source.Zoomify = $ol$source$Zoomify;\nol.source.Zoomify.CustomTile = _ol_source_Zoomify$CustomTile;\nol.source.common = {};\nol.source.common.DEFAULT_WMS_VERSION = _ol_source_common$DEFAULT_WMS_VERSION;\nol.source.ogcTileUtil = {};\nol.source.ogcTileUtil.getMapTileUrlTemplate = _ol_source_ogcTileUtil$getMapTileUrlTemplate;\nol.source.ogcTileUtil.getTileSetInfo = _ol_source_ogcTileUtil$getTileSetInfo;\nol.source.ogcTileUtil.getVectorTileUrlTemplate = _ol_source_ogcTileUtil$getVectorTileUrlTemplate;\nol.source.sourcesFromTileGrid = _ol_source$sourcesFromTileGrid;\nol.sphere = {};\nol.sphere.DEFAULT_RADIUS = _ol_sphere$DEFAULT_RADIUS;\nol.sphere.getArea = _ol_sphere$getArea;\nol.sphere.getDistance = _ol_sphere$getDistance;\nol.sphere.getLength = _ol_sphere$getLength;\nol.sphere.offset = _ol_sphere$offset;\nol.string = {};\nol.string.compareVersions = _ol_string$compareVersions;\nol.string.padNumber = _ol_string$padNumber;\nol.structs = {};\nol.structs.LRUCache = $ol$structs$LRUCache;\nol.structs.LinkedList = $ol$structs$LinkedList;\nol.structs.PriorityQueue = $ol$structs$PriorityQueue;\nol.structs.PriorityQueue.DROP = _ol_structs_PriorityQueue$DROP;\nol.structs.RBush = $ol$structs$RBush;\nol.style = {};\nol.style.Circle = $ol$style$Circle;\nol.style.Fill = $ol$style$Fill;\nol.style.Icon = $ol$style$Icon;\nol.style.IconImage = $ol$style$IconImage;\nol.style.IconImage.get = _ol_style_IconImage$get;\nol.style.IconImageCache = $ol$style$IconImageCache;\nol.style.IconImageCache.shared = _ol_style_IconImageCache$shared;\nol.style.Image = $ol$style$Image;\nol.style.RegularShape = $ol$style$RegularShape;\nol.style.Stroke = $ol$style$Stroke;\nol.style.Style = $ol$style$Style;\nol.style.Style.createDefaultStyle = _ol_style_Style$createDefaultStyle;\nol.style.Style.createEditingStyle = _ol_style_Style$createEditingStyle;\nol.style.Style.toFunction = _ol_style_Style$toFunction;\nol.style.Text = $ol$style$Text;\nol.style.expressions = {};\nol.style.expressions.Operators = _ol_style_expressions$Operators;\nol.style.expressions.PALETTE_TEXTURE_ARRAY = _ol_style_expressions$PALETTE_TEXTURE_ARRAY;\nol.style.expressions.arrayToGlsl = _ol_style_expressions$arrayToGlsl;\nol.style.expressions.colorToGlsl = _ol_style_expressions$colorToGlsl;\nol.style.expressions.expressionToGlsl = _ol_style_expressions$expressionToGlsl;\nol.style.expressions.getStringNumberEquivalent = _ol_style_expressions$getStringNumberEquivalent;\nol.style.expressions.getValueType = _ol_style_expressions$getValueType;\nol.style.expressions.isTypeUnique = _ol_style_expressions$isTypeUnique;\nol.style.expressions.numberToGlsl = _ol_style_expressions$numberToGlsl;\nol.style.expressions.stringToGlsl = _ol_style_expressions$stringToGlsl;\nol.style.expressions.uniformNameForVariable = _ol_style_expressions$uniformNameForVariable;\nol.tilecoord = {};\nol.tilecoord.createOrUpdate = _ol_tilecoord$createOrUpdate;\nol.tilecoord.fromKey = _ol_tilecoord$fromKey;\nol.tilecoord.getCacheKeyForTileKey = _ol_tilecoord$getCacheKeyForTileKey;\nol.tilecoord.getKey = _ol_tilecoord$getKey;\nol.tilecoord.getKeyZXY = _ol_tilecoord$getKeyZXY;\nol.tilecoord.hash = _ol_tilecoord$hash;\nol.tilecoord.withinExtentAndZ = _ol_tilecoord$withinExtentAndZ;\nol.tilegrid = {};\nol.tilegrid.TileGrid = $ol$tilegrid$TileGrid;\nol.tilegrid.WMTS = $ol$tilegrid$WMTS;\nol.tilegrid.WMTS.createFromCapabilitiesMatrixSet = _ol_tilegrid_WMTS$createFromCapabilitiesMatrixSet;\nol.tilegrid.common = {};\nol.tilegrid.common.DEFAULT_MAX_ZOOM = _ol_tilegrid_common$DEFAULT_MAX_ZOOM;\nol.tilegrid.common.DEFAULT_TILE_SIZE = _ol_tilegrid_common$DEFAULT_TILE_SIZE;\nol.tilegrid.createForExtent = _ol_tilegrid$createForExtent;\nol.tilegrid.createForProjection = _ol_tilegrid$createForProjection;\nol.tilegrid.createXYZ = _ol_tilegrid$createXYZ;\nol.tilegrid.extentFromProjection = _ol_tilegrid$extentFromProjection;\nol.tilegrid.getForProjection = _ol_tilegrid$getForProjection;\nol.tilegrid.wrapX = _ol_tilegrid$wrapX;\nol.tileurlfunction = {};\nol.tileurlfunction.createFromTemplate = _ol_tileurlfunction$createFromTemplate;\nol.tileurlfunction.createFromTemplates = _ol_tileurlfunction$createFromTemplates;\nol.tileurlfunction.createFromTileUrlFunctions = _ol_tileurlfunction$createFromTileUrlFunctions;\nol.tileurlfunction.expandUrl = _ol_tileurlfunction$expandUrl;\nol.tileurlfunction.nullTileUrlFunction = _ol_tileurlfunction$nullTileUrlFunction;\nol.transform = {};\nol.transform.apply = _ol_transform$apply;\nol.transform.compose = _ol_transform$compose;\nol.transform.composeCssTransform = _ol_transform$composeCssTransform;\nol.transform.create = _ol_transform$create;\nol.transform.determinant = _ol_transform$determinant;\nol.transform.invert = _ol_transform$invert;\nol.transform.makeInverse = _ol_transform$makeInverse;\nol.transform.makeScale = _ol_transform$makeScale;\nol.transform.multiply = _ol_transform$multiply;\nol.transform.reset = _ol_transform$reset;\nol.transform.rotate = _ol_transform$rotate;\nol.transform.scale = _ol_transform$scale;\nol.transform.set = _ol_transform$set;\nol.transform.setFromArray = _ol_transform$setFromArray;\nol.transform.toString = _ol_transform$toString;\nol.transform.translate = _ol_transform$translate;\nol.uri = {};\nol.uri.appendParams = _ol_uri$appendParams;\nol.util = {};\nol.util.VERSION = _ol_util$VERSION;\nol.util.abstract = _ol_util$abstract;\nol.util.getUid = _ol_util$getUid;\nol.vec = {};\nol.vec.mat4 = {};\nol.vec.mat4.create = _ol_vec_mat4$create;\nol.vec.mat4.fromTransform = _ol_vec_mat4$fromTransform;\nol.webgl = {};\nol.webgl.ARRAY_BUFFER = _ol_webgl$ARRAY_BUFFER;\nol.webgl.Buffer = $ol$webgl$Buffer;\nol.webgl.Buffer.getArrayClassForType = _ol_webgl_Buffer$getArrayClassForType;\nol.webgl.DYNAMIC_DRAW = _ol_webgl$DYNAMIC_DRAW;\nol.webgl.ELEMENT_ARRAY_BUFFER = _ol_webgl$ELEMENT_ARRAY_BUFFER;\nol.webgl.FLOAT = _ol_webgl$FLOAT;\nol.webgl.Helper = $ol$webgl$Helper;\nol.webgl.Helper.computeAttributesStride = _ol_webgl_Helper$computeAttributesStride;\nol.webgl.PaletteTexture = $ol$webgl$PaletteTexture;\nol.webgl.PostProcessingPass = $ol$webgl$PostProcessingPass;\nol.webgl.RenderTarget = $ol$webgl$RenderTarget;\nol.webgl.STATIC_DRAW = _ol_webgl$STATIC_DRAW;\nol.webgl.STREAM_DRAW = _ol_webgl$STREAM_DRAW;\nol.webgl.ShaderBuilder = {};\nol.webgl.ShaderBuilder.ShaderBuilder = _ol_webgl_ShaderBuilder$ShaderBuilder;\nol.webgl.ShaderBuilder.parseLiteralStyle = _ol_webgl_ShaderBuilder$parseLiteralStyle;\nol.webgl.TileTexture = $ol$webgl$TileTexture;\nol.webgl.UNSIGNED_BYTE = _ol_webgl$UNSIGNED_BYTE;\nol.webgl.UNSIGNED_INT = _ol_webgl$UNSIGNED_INT;\nol.webgl.UNSIGNED_SHORT = _ol_webgl$UNSIGNED_SHORT;\nol.webgl.getContext = _ol_webgl$getContext;\nol.webgl.getSupportedExtensions = _ol_webgl$getSupportedExtensions;\nol.xml = {};\nol.xml.OBJECT_PROPERTY_NODE_FACTORY = _ol_xml$OBJECT_PROPERTY_NODE_FACTORY;\nol.xml.XML_SCHEMA_INSTANCE_URI = _ol_xml$XML_SCHEMA_INSTANCE_URI;\nol.xml.createElementNS = _ol_xml$createElementNS;\nol.xml.getAllTextContent = _ol_xml$getAllTextContent;\nol.xml.getAllTextContent_ = _ol_xml$getAllTextContent_;\nol.xml.getAttributeNS = _ol_xml$getAttributeNS;\nol.xml.getDocument = _ol_xml$getDocument;\nol.xml.getXMLSerializer = _ol_xml$getXMLSerializer;\nol.xml.isDocument = _ol_xml$isDocument;\nol.xml.makeArrayExtender = _ol_xml$makeArrayExtender;\nol.xml.makeArrayPusher = _ol_xml$makeArrayPusher;\nol.xml.makeArraySerializer = _ol_xml$makeArraySerializer;\nol.xml.makeChildAppender = _ol_xml$makeChildAppender;\nol.xml.makeObjectPropertyPusher = _ol_xml$makeObjectPropertyPusher;\nol.xml.makeObjectPropertySetter = _ol_xml$makeObjectPropertySetter;\nol.xml.makeReplacer = _ol_xml$makeReplacer;\nol.xml.makeSequence = _ol_xml$makeSequence;\nol.xml.makeSimpleNodeFactory = _ol_xml$makeSimpleNodeFactory;\nol.xml.makeStructureNS = _ol_xml$makeStructureNS;\nol.xml.parse = _ol_xml$parse;\nol.xml.parseNode = _ol_xml$parseNode;\nol.xml.pushParseAndPop = _ol_xml$pushParseAndPop;\nol.xml.pushSerializeAndPop = _ol_xml$pushSerializeAndPop;\nol.xml.registerDocument = _ol_xml$registerDocument;\nol.xml.registerXMLSerializer = _ol_xml$registerXMLSerializer;\nol.xml.serialize = _ol_xml$serialize;\n\nexport default ol;",null,null,null,"export const fieldTagNames = {\n // TIFF Baseline\n 0x013B: 'Artist',\n 0x0102: 'BitsPerSample',\n 0x0109: 'CellLength',\n 0x0108: 'CellWidth',\n 0x0140: 'ColorMap',\n 0x0103: 'Compression',\n 0x8298: 'Copyright',\n 0x0132: 'DateTime',\n 0x0152: 'ExtraSamples',\n 0x010A: 'FillOrder',\n 0x0121: 'FreeByteCounts',\n 0x0120: 'FreeOffsets',\n 0x0123: 'GrayResponseCurve',\n 0x0122: 'GrayResponseUnit',\n 0x013C: 'HostComputer',\n 0x010E: 'ImageDescription',\n 0x0101: 'ImageLength',\n 0x0100: 'ImageWidth',\n 0x010F: 'Make',\n 0x0119: 'MaxSampleValue',\n 0x0118: 'MinSampleValue',\n 0x0110: 'Model',\n 0x00FE: 'NewSubfileType',\n 0x0112: 'Orientation',\n 0x0106: 'PhotometricInterpretation',\n 0x011C: 'PlanarConfiguration',\n 0x0128: 'ResolutionUnit',\n 0x0116: 'RowsPerStrip',\n 0x0115: 'SamplesPerPixel',\n 0x0131: 'Software',\n 0x0117: 'StripByteCounts',\n 0x0111: 'StripOffsets',\n 0x00FF: 'SubfileType',\n 0x0107: 'Threshholding',\n 0x011A: 'XResolution',\n 0x011B: 'YResolution',\n\n // TIFF Extended\n 0x0146: 'BadFaxLines',\n 0x0147: 'CleanFaxData',\n 0x0157: 'ClipPath',\n 0x0148: 'ConsecutiveBadFaxLines',\n 0x01B1: 'Decode',\n 0x01B2: 'DefaultImageColor',\n 0x010D: 'DocumentName',\n 0x0150: 'DotRange',\n 0x0141: 'HalftoneHints',\n 0x015A: 'Indexed',\n 0x015B: 'JPEGTables',\n 0x011D: 'PageName',\n 0x0129: 'PageNumber',\n 0x013D: 'Predictor',\n 0x013F: 'PrimaryChromaticities',\n 0x0214: 'ReferenceBlackWhite',\n 0x0153: 'SampleFormat',\n 0x0154: 'SMinSampleValue',\n 0x0155: 'SMaxSampleValue',\n 0x022F: 'StripRowCounts',\n 0x014A: 'SubIFDs',\n 0x0124: 'T4Options',\n 0x0125: 'T6Options',\n 0x0145: 'TileByteCounts',\n 0x0143: 'TileLength',\n 0x0144: 'TileOffsets',\n 0x0142: 'TileWidth',\n 0x012D: 'TransferFunction',\n 0x013E: 'WhitePoint',\n 0x0158: 'XClipPathUnits',\n 0x011E: 'XPosition',\n 0x0211: 'YCbCrCoefficients',\n 0x0213: 'YCbCrPositioning',\n 0x0212: 'YCbCrSubSampling',\n 0x0159: 'YClipPathUnits',\n 0x011F: 'YPosition',\n\n // EXIF\n 0x9202: 'ApertureValue',\n 0xA001: 'ColorSpace',\n 0x9004: 'DateTimeDigitized',\n 0x9003: 'DateTimeOriginal',\n 0x8769: 'Exif IFD',\n 0x9000: 'ExifVersion',\n 0x829A: 'ExposureTime',\n 0xA300: 'FileSource',\n 0x9209: 'Flash',\n 0xA000: 'FlashpixVersion',\n 0x829D: 'FNumber',\n 0xA420: 'ImageUniqueID',\n 0x9208: 'LightSource',\n 0x927C: 'MakerNote',\n 0x9201: 'ShutterSpeedValue',\n 0x9286: 'UserComment',\n\n // IPTC\n 0x83BB: 'IPTC',\n\n // ICC\n 0x8773: 'ICC Profile',\n\n // XMP\n 0x02BC: 'XMP',\n\n // GDAL\n 0xA480: 'GDAL_METADATA',\n 0xA481: 'GDAL_NODATA',\n\n // Photoshop\n 0x8649: 'Photoshop',\n\n // GeoTiff\n 0x830E: 'ModelPixelScale',\n 0x8482: 'ModelTiepoint',\n 0x85D8: 'ModelTransformation',\n 0x87AF: 'GeoKeyDirectory',\n 0x87B0: 'GeoDoubleParams',\n 0x87B1: 'GeoAsciiParams',\n\n // LERC\n 0xC5F2: 'LercParameters',\n};\n\nexport const fieldTags = {};\nfor (const key in fieldTagNames) {\n if (fieldTagNames.hasOwnProperty(key)) {\n fieldTags[fieldTagNames[key]] = parseInt(key, 10);\n }\n}\n\nexport const fieldTagTypes = {\n 256: 'SHORT',\n 257: 'SHORT',\n 258: 'SHORT',\n 259: 'SHORT',\n 262: 'SHORT',\n 273: 'LONG',\n 274: 'SHORT',\n 277: 'SHORT',\n 278: 'LONG',\n 279: 'LONG',\n 282: 'RATIONAL',\n 283: 'RATIONAL',\n 284: 'SHORT',\n 286: 'SHORT',\n 287: 'RATIONAL',\n 296: 'SHORT',\n 297: 'SHORT',\n 305: 'ASCII',\n 306: 'ASCII',\n 338: 'SHORT',\n 339: 'SHORT',\n 513: 'LONG',\n 514: 'LONG',\n 1024: 'SHORT',\n 1025: 'SHORT',\n 2048: 'SHORT',\n 2049: 'ASCII',\n 3072: 'SHORT',\n 3073: 'ASCII',\n 33550: 'DOUBLE',\n 33922: 'DOUBLE',\n 34665: 'LONG',\n 34735: 'SHORT',\n 34737: 'ASCII',\n 42113: 'ASCII',\n};\n\nexport const arrayFields = [\n fieldTags.BitsPerSample,\n fieldTags.ExtraSamples,\n fieldTags.SampleFormat,\n fieldTags.StripByteCounts,\n fieldTags.StripOffsets,\n fieldTags.StripRowCounts,\n fieldTags.TileByteCounts,\n fieldTags.TileOffsets,\n fieldTags.SubIFDs,\n];\n\nexport const fieldTypeNames = {\n 0x0001: 'BYTE',\n 0x0002: 'ASCII',\n 0x0003: 'SHORT',\n 0x0004: 'LONG',\n 0x0005: 'RATIONAL',\n 0x0006: 'SBYTE',\n 0x0007: 'UNDEFINED',\n 0x0008: 'SSHORT',\n 0x0009: 'SLONG',\n 0x000A: 'SRATIONAL',\n 0x000B: 'FLOAT',\n 0x000C: 'DOUBLE',\n // IFD offset, suggested by https://owl.phy.queensu.ca/~phil/exiftool/standards.html\n 0x000D: 'IFD',\n // introduced by BigTIFF\n 0x0010: 'LONG8',\n 0x0011: 'SLONG8',\n 0x0012: 'IFD8',\n};\n\nexport const fieldTypes = {};\nfor (const key in fieldTypeNames) {\n if (fieldTypeNames.hasOwnProperty(key)) {\n fieldTypes[fieldTypeNames[key]] = parseInt(key, 10);\n }\n}\n\nexport const photometricInterpretations = {\n WhiteIsZero: 0,\n BlackIsZero: 1,\n RGB: 2,\n Palette: 3,\n TransparencyMask: 4,\n CMYK: 5,\n YCbCr: 6,\n\n CIELab: 8,\n ICCLab: 9,\n};\n\nexport const ExtraSamplesValues = {\n Unspecified: 0,\n Assocalpha: 1,\n Unassalpha: 2,\n};\n\nexport const LercParameters = {\n Version: 0,\n AddCompression: 1,\n};\n\nexport const LercAddCompression = {\n None: 0,\n Deflate: 1,\n};\n\nexport const geoKeyNames = {\n 1024: 'GTModelTypeGeoKey',\n 1025: 'GTRasterTypeGeoKey',\n 1026: 'GTCitationGeoKey',\n 2048: 'GeographicTypeGeoKey',\n 2049: 'GeogCitationGeoKey',\n 2050: 'GeogGeodeticDatumGeoKey',\n 2051: 'GeogPrimeMeridianGeoKey',\n 2052: 'GeogLinearUnitsGeoKey',\n 2053: 'GeogLinearUnitSizeGeoKey',\n 2054: 'GeogAngularUnitsGeoKey',\n 2055: 'GeogAngularUnitSizeGeoKey',\n 2056: 'GeogEllipsoidGeoKey',\n 2057: 'GeogSemiMajorAxisGeoKey',\n 2058: 'GeogSemiMinorAxisGeoKey',\n 2059: 'GeogInvFlatteningGeoKey',\n 2060: 'GeogAzimuthUnitsGeoKey',\n 2061: 'GeogPrimeMeridianLongGeoKey',\n 2062: 'GeogTOWGS84GeoKey',\n 3072: 'ProjectedCSTypeGeoKey',\n 3073: 'PCSCitationGeoKey',\n 3074: 'ProjectionGeoKey',\n 3075: 'ProjCoordTransGeoKey',\n 3076: 'ProjLinearUnitsGeoKey',\n 3077: 'ProjLinearUnitSizeGeoKey',\n 3078: 'ProjStdParallel1GeoKey',\n 3079: 'ProjStdParallel2GeoKey',\n 3080: 'ProjNatOriginLongGeoKey',\n 3081: 'ProjNatOriginLatGeoKey',\n 3082: 'ProjFalseEastingGeoKey',\n 3083: 'ProjFalseNorthingGeoKey',\n 3084: 'ProjFalseOriginLongGeoKey',\n 3085: 'ProjFalseOriginLatGeoKey',\n 3086: 'ProjFalseOriginEastingGeoKey',\n 3087: 'ProjFalseOriginNorthingGeoKey',\n 3088: 'ProjCenterLongGeoKey',\n 3089: 'ProjCenterLatGeoKey',\n 3090: 'ProjCenterEastingGeoKey',\n 3091: 'ProjCenterNorthingGeoKey',\n 3092: 'ProjScaleAtNatOriginGeoKey',\n 3093: 'ProjScaleAtCenterGeoKey',\n 3094: 'ProjAzimuthAngleGeoKey',\n 3095: 'ProjStraightVertPoleLongGeoKey',\n 3096: 'ProjRectifiedGridAngleGeoKey',\n 4096: 'VerticalCSTypeGeoKey',\n 4097: 'VerticalCitationGeoKey',\n 4098: 'VerticalDatumGeoKey',\n 4099: 'VerticalUnitsGeoKey',\n};\n\nexport const geoKeys = {};\nfor (const key in geoKeyNames) {\n if (geoKeyNames.hasOwnProperty(key)) {\n geoKeys[geoKeyNames[key]] = parseInt(key, 10);\n }\n}\n","// The module cache\nvar __webpack_module_cache__ = {};\n\n// The require function\nfunction __webpack_require__(moduleId) {\n\t// Check if module is in cache\n\tvar cachedModule = __webpack_module_cache__[moduleId];\n\tif (cachedModule !== undefined) {\n\t\treturn cachedModule.exports;\n\t}\n\t// Create a new module (and put it into the cache)\n\tvar module = __webpack_module_cache__[moduleId] = {\n\t\tid: moduleId,\n\t\tloaded: false,\n\t\texports: {}\n\t};\n\n\t// Execute the module function\n\t__webpack_modules__[moduleId].call(module.exports, module, module.exports, __webpack_require__);\n\n\t// Flag the module as loaded\n\tmodule.loaded = true;\n\n\t// Return the exports of the module\n\treturn module.exports;\n}\n\n// expose the modules object (__webpack_modules__)\n__webpack_require__.m = __webpack_modules__;\n\n","// define getter functions for harmony exports\n__webpack_require__.d = function(exports, definition) {\n\tfor(var key in definition) {\n\t\tif(__webpack_require__.o(definition, key) && !__webpack_require__.o(exports, key)) {\n\t\t\tObject.defineProperty(exports, key, { enumerable: true, get: definition[key] });\n\t\t}\n\t}\n};","__webpack_require__.f = {};\n// This file contains only the entry chunk.\n// The chunk loading function for additional chunks\n__webpack_require__.e = function(chunkId) {\n\treturn Promise.all(Object.keys(__webpack_require__.f).reduce(function(promises, key) {\n\t\t__webpack_require__.f[key](chunkId, promises);\n\t\treturn promises;\n\t}, []));\n};","// This function allow to reference async chunks\n__webpack_require__.u = function(chunkId) {\n\t// return url for filenames based on template\n\treturn \"\" + chunkId + \".ol.js\";\n};","__webpack_require__.o = function(obj, prop) { return Object.prototype.hasOwnProperty.call(obj, prop); }","// define __esModule on exports\n__webpack_require__.r = function(exports) {\n\tif(typeof Symbol !== 'undefined' && Symbol.toStringTag) {\n\t\tObject.defineProperty(exports, Symbol.toStringTag, { value: 'Module' });\n\t}\n\tObject.defineProperty(exports, '__esModule', { value: true });\n};","__webpack_require__.nmd = function(module) {\n\tmodule.paths = [];\n\tif (!module.children) module.children = [];\n\treturn module;\n};","__webpack_require__.p = \"\";","// no baseURI\n\n// object to store loaded and loading chunks\n// undefined = chunk not loaded, null = chunk preloaded/prefetched\n// [resolve, reject, Promise] = chunk loading, 0 = chunk loaded\nvar installedChunks = {\n\t179: 0\n};\n\n__webpack_require__.f.j = function(chunkId, promises) {\n\t\t// JSONP chunk loading for javascript\n\t\tvar installedChunkData = __webpack_require__.o(installedChunks, chunkId) ? installedChunks[chunkId] : undefined;\n\t\tif(installedChunkData !== 0) { // 0 means \"already installed\".\n\n\t\t\t// a Promise means \"currently loading\".\n\t\t\tif(installedChunkData) {\n\t\t\t\tpromises.push(installedChunkData[2]);\n\t\t\t} else {\n\t\t\t\tif(true) { // all chunks have JS\n\t\t\t\t\t// setup Promise in chunk cache\n\t\t\t\t\tvar promise = new Promise(function(resolve, reject) { installedChunkData = installedChunks[chunkId] = [resolve, reject]; });\n\t\t\t\t\tpromises.push(installedChunkData[2] = promise);\n\n\t\t\t\t\t// start chunk loading\n\t\t\t\t\tvar url = __webpack_require__.p + __webpack_require__.u(chunkId);\n\t\t\t\t\t// create error before stack unwound to get useful stacktrace later\n\t\t\t\t\tvar error = new Error();\n\t\t\t\t\tvar loadingEnded = function(event) {\n\t\t\t\t\t\tif(__webpack_require__.o(installedChunks, chunkId)) {\n\t\t\t\t\t\t\tinstalledChunkData = installedChunks[chunkId];\n\t\t\t\t\t\t\tif(installedChunkData !== 0) installedChunks[chunkId] = undefined;\n\t\t\t\t\t\t\tif(installedChunkData) {\n\t\t\t\t\t\t\t\tvar errorType = event && (event.type === 'load' ? 'missing' : event.type);\n\t\t\t\t\t\t\t\tvar realSrc = event && event.target && event.target.src;\n\t\t\t\t\t\t\t\terror.message = 'Loading chunk ' + chunkId + ' failed.\\n(' + errorType + ': ' + realSrc + ')';\n\t\t\t\t\t\t\t\terror.name = 'ChunkLoadError';\n\t\t\t\t\t\t\t\terror.type = errorType;\n\t\t\t\t\t\t\t\terror.request = realSrc;\n\t\t\t\t\t\t\t\tinstalledChunkData[1](error);\n\t\t\t\t\t\t\t}\n\t\t\t\t\t\t}\n\t\t\t\t\t};\n\t\t\t\t\t__webpack_require__.l(url, loadingEnded, \"chunk-\" + chunkId, chunkId);\n\t\t\t\t} else installedChunks[chunkId] = 0;\n\t\t\t}\n\t\t}\n};\n\n// no prefetching\n\n// no preloaded\n\n// no HMR\n\n// no HMR manifest\n\n// no on chunks loaded\n\n// install a JSONP callback for chunk loading\nvar webpackJsonpCallback = function(parentChunkLoadingFunction, data) {\n\tvar chunkIds = data[0];\n\tvar moreModules = data[1];\n\tvar runtime = data[2];\n\t// add \"moreModules\" to the modules object,\n\t// then flag all \"chunkIds\" as loaded and fire callback\n\tvar moduleId, chunkId, i = 0;\n\tif(chunkIds.some(function(id) { return installedChunks[id] !== 0; })) {\n\t\tfor(moduleId in moreModules) {\n\t\t\tif(__webpack_require__.o(moreModules, moduleId)) {\n\t\t\t\t__webpack_require__.m[moduleId] = moreModules[moduleId];\n\t\t\t}\n\t\t}\n\t\tif(runtime) var result = runtime(__webpack_require__);\n\t}\n\tif(parentChunkLoadingFunction) parentChunkLoadingFunction(data);\n\tfor(;i < chunkIds.length; i++) {\n\t\tchunkId = chunkIds[i];\n\t\tif(__webpack_require__.o(installedChunks, chunkId) && installedChunks[chunkId]) {\n\t\t\tinstalledChunks[chunkId][0]();\n\t\t}\n\t\tinstalledChunks[chunkId] = 0;\n\t}\n\n}\n\nvar chunkLoadingGlobal = self[\"webpackChunkol\"] = self[\"webpackChunkol\"] || [];\nchunkLoadingGlobal.forEach(webpackJsonpCallback.bind(null, 0));\nchunkLoadingGlobal.push = webpackJsonpCallback.bind(null, chunkLoadingGlobal.push.bind(chunkLoadingGlobal));","// startup\n// Load entry module and return exports\n// This entry module is referenced by other modules so it can't be inlined\n__webpack_require__(760);\nvar __webpack_exports__ = __webpack_require__(920);\n"],"names":["root","factory","exports","module","define","amd","self","inProgress","read","buffer","offset","isLE","mLen","nBytes","e","m","eLen","eMax","eBias","nBits","i","d","s","NaN","Infinity","Math","pow","write","value","c","rt","abs","isNaN","floor","log","LN2","Yallist","require","MAX","Symbol","LENGTH","LENGTH_CALCULATOR","ALLOW_STALE","MAX_AGE","DISPOSE","NO_DISPOSE_ON_SET","LRU_LIST","CACHE","UPDATE_AGE_ON_GET","naiveLength","LRUCache","options","max","TypeError","this","lc","length","stale","maxAge","dispose","noDisposeOnSet","updateAgeOnGet","reset","mL","trim","allowStale","mA","lC","forEach","hit","key","fn","thisp","walker","tail","prev","forEachStep","head","next","toArray","map","k","Map","isStale","v","now","filter","h","Date","len","has","del","get","item","Entry","unshift","set","node","arr","l","expiresAt","doUse","unshiftNode","diff","delete","removeNode","undefined","call","fontWeights","thin","hairline","light","book","regular","normal","plain","roman","standard","medium","bold","heavy","black","fat","poster","sp","italicRE","fontCache","fonts","size","lineHeight","cssData","Array","isArray","weight","style","fontFamilies","ii","parts","split","maybeWeight","toLowerCase","w","pop","test","replace","previousPart","startsWith","fontFamily","join","indexOf","push","Pbf","ieee754","buf","ArrayBuffer","isView","Uint8Array","pos","type","Varint","Fixed64","Bytes","Fixed32","SHIFT_LEFT_32","SHIFT_RIGHT_32","utf8TextDecoder","TextDecoder","readPackedEnd","pbf","readVarint","toNum","low","high","isSigned","makeRoomForExtraLength","startPos","extraLen","realloc","writePackedVarint","writeVarint","writePackedSVarint","writeSVarint","writePackedFloat","writeFloat","writePackedDouble","writeDouble","writePackedBoolean","writeBoolean","writePackedFixed32","writeFixed32","writePackedSFixed32","writeSFixed32","writePackedFixed64","writeFixed64","writePackedSFixed64","writeSFixed64","readUInt32","writeInt32","val","readInt32","prototype","destroy","readFields","readField","result","end","tag","skip","readMessage","readFixed32","readSFixed32","readFixed64","readSFixed64","readFloat","readDouble","b","p","Error","readVarintRemainder","readVarint64","readSVarint","num","readBoolean","Boolean","readString","decode","subarray","readUtf8TextDecoder","str","b1","b2","b3","b0","bytesPerSequence","String","fromCharCode","readUtf8","readBytes","readPackedVarint","readPackedSVarint","readPackedBoolean","readPackedFloat","readPackedDouble","readPackedFixed32","readPackedSFixed32","readPackedFixed64","readPackedSFixed64","writeTag","min","finish","writeBigVarintLow","lsb","writeBigVarintHigh","writeBigVarint","writeString","lead","charCodeAt","writeUtf8","writeBytes","writeRawMessage","obj","writeMessage","writeBytesField","writeFixed32Field","writeSFixed32Field","writeFixed64Field","writeSFixed64Field","writeVarintField","writeSVarintField","writeStringField","writeFloatField","writeDoubleField","writeBooleanField","t","r","a","n","o","f","exp","u","sqrt","x","_maxEntries","_minEntries","ceil","clear","children","minX","minY","maxX","maxY","leaf","height","all","_all","data","search","toBBox","collides","load","insert","_build","slice","_splitRoot","_insert","remove","splice","_condense","compareMinX","compareMinY","toJSON","fromJSON","apply","_chooseSubtree","_split","_adjustParentBBoxes","_chooseSplitAxis","_chooseSplitIndex","M","_allDistMargin","sort","runtime","Op","Object","hasOwn","hasOwnProperty","$Symbol","iteratorSymbol","iterator","asyncIteratorSymbol","asyncIterator","toStringTagSymbol","toStringTag","defineProperty","enumerable","configurable","writable","err","wrap","innerFn","outerFn","tryLocsList","protoGenerator","Generator","generator","create","context","Context","_invoke","state","GenStateSuspendedStart","method","arg","GenStateExecuting","GenStateCompleted","doneResult","delegate","delegateResult","maybeInvokeDelegate","ContinueSentinel","sent","_sent","dispatchException","abrupt","record","tryCatch","done","GenStateSuspendedYield","makeInvokeMethod","GeneratorFunction","GeneratorFunctionPrototype","IteratorPrototype","getProto","getPrototypeOf","NativeIteratorPrototype","values","Gp","defineIteratorMethods","AsyncIterator","PromiseImpl","invoke","resolve","reject","__await","then","unwrapped","error","previousPromise","callInvokeWithMethodAndArg","info","resultName","nextLoc","pushTryEntry","locs","entry","tryLoc","catchLoc","finallyLoc","afterLoc","tryEntries","resetTryEntry","completion","iterable","iteratorMethod","displayName","isGeneratorFunction","genFun","ctor","constructor","name","mark","setPrototypeOf","__proto__","awrap","async","Promise","iter","keys","object","reverse","skipTempReset","charAt","stop","rootRecord","rval","exception","handle","loc","caught","hasCatch","hasFinally","finallyEntry","complete","thrown","delegateYield","regeneratorRuntime","accidentalStrictMode","globalThis","Function","families","icon","title","link","getNames","getLink","normalizeName","indexOfMatch","xml","tagName","debug","startIndex","console","start","afterStart","relativeEnd","selfClosing","outer","inner","lastIndexOf","findTagByName","tags","attributeName","pattern","match","RegExp","exec","index","list","arguments","inserted","Node","pushNode","res","shift","forEachReverse","getReverse","mapReverse","reduce","initial","acc","reduceReverse","toArrayReverse","from","to","ret","sliceReverse","deleteCount","er","abstract","uidCounter_","getUid","ol_uid","VERSION","code","message","_super","_this","__extends","stopPropagation","evt","propagationStopped","defaultPrevented","target","BaseEvent","disposed","Disposable","disposeInternal","binarySearch","haystack","needle","opt_comparator","mid","cmp","comparator","numberSafeCompareFunction","found","includes","linearFindNearest","direction","reverseSubArray","begin","tmp","extend","extension","find","func","equals","arr1","arr2","len1","findIndex","every","el","idx","isSorted","opt_func","opt_strict","compare","currentVal","TRUE","FALSE","VOID","memoizeOne","lastResult","lastArgs","lastThis","called","nextArgs","arrayEquals","toPromise","getter","promiseGetter","assign","var_sources","output","source","property","getValues","isEmpty","opt_target","eventTarget_","pendingRemovals_","dispatching_","listeners_","Target","listener","listeners","listenersForType","event","isString","Event","propagate","dispatching","pendingRemovals","handleEvent","pr","removeEventListener","opt_type","listen","opt_this","opt_once","bind","originalListener_1","eventsKey","addEventListener","listenOnce","unlistenByKey","on","onInternal","once","onceInternal","un","unInternal","revision_","Observable","dispatchEvent","EventType","ol_key","unByKey","EventTarget","oldValue","opt_values","values_","setProperties","BaseObject","eventType","hasListener","ObjectEvent","ObjectEventType","opt_silent","notify","Property","opt_element","opt_index","element","opt_array","opt_options","unique_","unique","array_","assertUnique_","updateLength_","Collection","getLength","array","elem","CollectionEvent","CollectionEventType","removeAt","insertAt","j","opt_except","AssertionError","easeIn","easeOut","inAndOut","linear","tileCoord","interimTile","transition_","transition","transitionStarts_","interpolate","Tile","tile","getState","TileState","changed","id","time","delta","loader_","loader","data_","error_","DataTile","catch","assert","assertion","errorCode","createStyleFunction","styles_1","getZIndex","opt_geometryOrProperties","id_","geometryName_","style_","styleFunction_","geometryChangeKey_","addChangeListener","handleGeometryChanged_","getSimplifiedGeometry","geometry","setGeometry","properties","Feature","clone","hasProperties","getProperties","setGeometryName","getGeometryName","getGeometry","getStyle","setStyle","handleGeometryChange_","opt_style","removeChangeListener","POINT","LINE_STRING","LINEAR_RING","POLYGON","MULTI_POINT","MULTI_LINE_STRING","MULTI_POLYGON","GEOMETRY_COLLECTION","CIRCLE","Units","RADIANS","DEGREES","FEET","METERS","PIXELS","TILE_PIXELS","USFEET","unitByCode","fromCode","METERS_PER_UNIT","PI","transformStringDiv","ua","navigator","userAgent","FIREFOX","SAFARI","WEBKIT","MAC","DEVICE_PIXEL_RATIO","devicePixelRatio","WORKER_OFFSCREEN_CANVAS","WorkerGlobalScope","OffscreenCanvas","IMAGE_DECODE","Image","PASSIVE_EVENT_LISTENERS","passive","window","tmp_","transform","multiply","transform1","transform2","a1","c1","d1","e1","f1","a2","c2","d2","e2","f2","setFromArray","coordinate","y","rotate","angle","cos","sin","scale","makeScale","translate","dx","dy","compose","dx1","dy1","sx","sy","dx2","dy2","makeInverse","det","determinant","mat","toString","transformString","document","createElement","boundingExtent","coordinates","extent","createEmpty","extendCoordinate","opt_extent","closestSquaredDistanceXY","containsCoordinate","containsXY","containsExtent","extent1","extent2","coordinateRelationship","relationship","Relationship","createOrUpdate","createOrUpdateEmpty","createOrUpdateFromCoordinate","createOrUpdateFromFlatCoordinates","flatCoordinates","stride","extendFlatCoordinates","approximatelyEquals","tolerance","extendCoordinates","extendXY","extendRings","rings","forEachCorner","callback","getBottomLeft","getBottomRight","getTopRight","getTopLeft","getArea","area","getWidth","getHeight","getCenter","getCorner","corner","Corner","getForViewAndSize","center","resolution","rotation","cosRotation","sinRotation","xCos","xSin","yCos","ySin","x0","x1","x2","x3","y0","y1","y2","y3","getIntersection","intersection","intersects","returnOrUpdate","scaleFromCenter","deltaX","deltaY","intersectsSegment","startRel","endRel","startX","startY","endX","endY","slope","applyTransform","transformFn","opt_stops","width","xs","ys","_boundingExtentXYs","wrapX","projection","projectionExtent","getExtent","canWrapX","worldWidth","code_","units_","units","extent_","worldExtent_","worldExtent","axisOrientation_","axisOrientation","global_","global","canWrapX_","getPointResolutionFunc_","getPointResolution","defaultTileGrid_","metersPerUnit_","metersPerUnit","Projection","tileGrid","clamp","cosh","log2","LOG2E","squaredSegmentDistance","squaredDistance","solveLinearSystem","maxRow","maxEl","absValue","coef","toDegrees","angleInRadians","toRadians","angleInDegrees","modulo","lerp","toFixed","decimals","factor","round","RADIUS","HALF_SIZE","EXTENT","WORLD_EXTENT","MAX_SAFE_Y","tan","point","PROJECTIONS","EPSG3857Projection","fromEPSG4326","input","opt_output","opt_dimension","dimension","toEPSG4326","atan","opt_axisOrientation","EPSG4326Projection","cache","add","transforms","destination","sourceCode","getCode","destinationCode","padNumber","number","opt_precision","numberString","decimal","compareVersions","v1","v2","s1","s2","n1","parseInt","n2","closestOnCircle","circle","getRadius","closestOnSegment","segment","along","degreesToStringHDMS","hemispheres","degrees","opt_fractionDigits","normalizedDegrees","dflPrecision","precision","deg","sec","format","template","coordinate1","coordinate2","cosAngle","sinAngle","coord1","coord2","distance","squaredDistanceToSegment","toStringXY","worldsAway","getWorldsAway","opt_sourceExtentWidth","sourceExtentWidth","DEFAULT_RADIUS","getDistance","opt_radius","radius","lat1","lat2","deltaLatBy2","deltaLonBy2","atan2","getLengthInternal","getAreaInternal","bearing","lon1","dByR","lat","asin","showCoordinateWarning","disableCoordinateWarning","opt_disable","cloneTransform","identityTransform","addProjection","addProj","addTransformFunc","addProjections","projections","projectionLike","getProj","opt_units","pointResolution","getPointResolutionFunc","getUnits","getMetersPerUnit","toEPSG4326_1","getTransformFromProjections","vertices","addEquivalentProjections","addEquivalentTransforms","projections1","projections2","forwardTransform","inverseTransform","projection1","projection2","createProjection","defaultCode","createTransformFromCoordinateTransform","coordTransform","addCoordinateTransforms","forward","inverse","sourceProj","destProj","fromLonLat","opt_projection","equivalent","equalUnits","sourceProjection","destinationProjection","transformFunc","getTransformFunc","getTransform","transformExtent","userProjection","setUserProjection","getUserProjection","toUserCoordinate","fromUserCoordinate","destProjection","warn","toUserExtent","fromUserExtent","toUserResolution","sourceUnits","userUnits","fromUserResolution","createSafeCoordinateTransform","coord","transformed","sourceX","sourceY","sourceExtent","addCommon","EPSG3857_PROJECTIONS","EPSG4326_PROJECTIONS","transform2D","opt_dest","dest","anchor","anchorX","anchorY","tmpTransform","extentRevision_","simplifiedGeometryMaxMinSquaredTolerance","simplifiedGeometryRevision","simplifyTransformedInternal","revision","squaredTolerance","opt_transform","Geometry","getRevision","closestPoint","minSquaredDistance","getClosestPoint","opt_closestPoint","closestPointXY","computeExtent","opt_sy","opt_anchor","getProjection","inCoordinates","outCoordinates","pixelExtent","projectedExtent","getWorldExtent","composeTransform","getStrideForLayout","layout","GeometryLayout","transformGeom2D","simpleGeometry","getFlatCoordinates","getStride","SimpleGeometry","simplifiedGeometry","getSimplifiedGeometryInternal","opt_layout","nesting","getLayoutForStride","assignClosest","offset1","offset2","maxSquaredDelta","squaredDelta","squaredDx","arrayMaxSquaredDelta","ends","multiArrayMaxSquaredDelta","endss","assignClosestPoint","maxDelta","isRing","opt_tmpPoint","tmpPoint","assignClosestArrayPoint","assignClosestMultiArrayPoint","deflateCoordinate","deflateCoordinates","deflateCoordinatesArray","coordinatess","opt_ends","jj","deflateMultiCoordinatesArray","coordinatesss","opt_endss","douglasPeucker","simplifiedFlatCoordinates","simplifiedOffset","markers","stack","last","first","maxSquaredDistance","squaredDistance_1","douglasPeuckerArray","simplifiedEnds","radialDistance","snap","quantize","quantizeArray","quantizeMultiArray","simplifiedEndss","inflateCoordinates","opt_coordinates","inflateCoordinatesArray","opt_coordinatess","inflateMultiCoordinatesArray","opt_coordinatesss","linearRing","twiceArea","linearRings","linearRingss","maxDelta_","maxDeltaRevision_","setCoordinates","setFlatCoordinates","LinearRing","linearRingArea","GeometryType","setLayout","Point","applyProperties","linearRingContainsExtent","linearRingContainsXY","wn","linearRingsContainsXY","linearRingssContainsXY","getInteriorPointOfArray","flatCenters","flatCentersOffset","intersections","rr","pointX","maxSegmentLength","segmentLength","getInteriorPointsOfMultiArray","interiorPoints","intersectsLineString","coordinatesExtent","forEachSegment","point1","point2","intersectsLineStringArray","intersectsLinearRing","intersectsLinearRingArray","intersectsLinearRingMultiArray","linearRingIsClockwise","edge","linearRingsAreOriented","opt_right","right","isClockwise","linearRingssAreOriented","orientLinearRings","reverseCoordinates","orientLinearRingsArray","inflateEnds","prevEndIndex","ends_","flatInteriorPointRevision_","flatInteriorPoint_","orientedRevision_","orientedFlatCoordinates_","Polygon","polygon","getOrientedFlatCoordinates","linearRingsArea","flatCenter","getFlatInteriorPoint","circular","opt_n","opt_sphereRadius","sphereOffset","fromExtent","fromCircle","opt_sides","opt_angle","sides","getLayout","arrayLength","makeRegular","startAngle","position_","transform_","watchId_","handleProjectionChanged_","handleTrackingChanged_","setProjection","trackingOptions","setTrackingOptions","setTracking","tracking","Geolocation","getTracking","geolocation","watchPosition","positionChange_","positionError_","getTrackingOptions","clearWatch","position","coords","accuracy","altitude","altitudeAccuracy","heading","longitude","latitude","projectedPosition","speed","circularPolygon","GeolocationError","pixelRatio","pixelRatio_","ImageBase","listenImage","image","loadHandler","errorHandler","img","listening","decoding","loaded","listenerKeys","src","crossOrigin","imageLoadFunction","ImageState","src_","image_","unlisten_","imageLoadFunction_","ImageWrapper","unlistenImage_","handleImageLoad_","handleImageError_","canvas","opt_loader","canvas_","ImageCanvas","handleLoad_","createCanvasContext2D","opt_width","opt_height","opt_canvasPool","opt_Context2DSettings","getContext","outerWidth","offsetWidth","getComputedStyle","marginLeft","marginRight","outerHeight","offsetHeight","marginTop","marginBottom","replaceNode","newNode","oldNode","parent","parentNode","replaceChild","removeChild","removeChildren","lastChild","replaceChildren","oldChildren","childNodes","oldChild","newChild","insertBefore","appendChild","tileLoadFunction","crossOrigin_","tileLoadFunction_","ImageTile","ctx","fillStyle","fillRect","naturalWidth","naturalHeight","decay","minVelocity","delay","decay_","minVelocity_","delay_","points_","angle_","initialVelocity_","Kinetic","lastIndex","firstIndex","duration","HEX_COLOR_RE_","NAMED_COLOR_RE_","asString","color","fromNamed","body","rgb","fromString","cacheSize","g","hasAlpha","substr","normalize","Number","fromStringInternal_","asArray","isStringColor","cache_","cacheSize_","maxCacheSize_","IconImageCache","canExpireCache","iconImage","getKey","maxCacheSize","expire","shared","background_","background","LayerProperty","opacity","visible","zIndex","maxResolution","minResolution","minZoom","maxZoom","className_","className","state_","BaseLayer","opt_managed","layer","managed","getOpacity","getVisible","getMaxResolution","getMinResolution","getMinZoom","getMaxZoom","opt_states","opt_background","zindex","inView","layerState","viewState","zoom","baseOptions","mapPrecomposeKey_","mapRenderKey_","sourceChangeKey_","renderer_","rendered","render","setMap","handleSourcePropertyChange_","setSource","Layer","states","getLayerState","getSource","SourceState","handleSourceChange_","pixel","getFeatures","getData","frameState","layerRenderer","getRenderer","prepareFrame","renderFrame","unrender","RenderEventType","layerStatesArray","some","arrayLayerState","createRenderer","expireIconCache","iconImageCache","map_","MapRenderer","coordinateToPixelTransform","pixelToCoordinateTransform","hitTolerance","checkWrapped","thisArg","layerFilter","thisArg2","forEachFeatureAtCoordinate","feature","translatedCoordinate","offsets","layerStates","numLayers","matches","tmpCoord","hasRenderer","getWrapX","callback_1","order","distanceSq","postRenderFunctions","opt_inversePixelTransform","opt_frameState","opt_context","inversePixelTransform","CLASS_HIDDEN","CLASS_SELECTABLE","CLASS_UNSELECTABLE","CLASS_UNSUPPORTED","CLASS_CONTROL","CLASS_COLLAPSED","fontRegEx","fontRegExMatchIndex","getFontParameters","fontSpec","variant","family","cssOpacity","defaultFont","defaultFillStyle","defaultLineCap","defaultLineDash","defaultLineJoin","defaultMiterLimit","defaultStrokeStyle","defaultTextAlign","defaultTextBaseline","defaultPadding","checkedFonts","labelCache","setSize","measureFont","measureElement","measureContext","textHeights","registerFont","interval","referenceWidth","referenceFonts","text","isAvailable","fontStyle","fontWeight","available","referenceFont","measureTextWidth","check","getKeys","font","clearInterval","setInterval","measureTextHeight","metrics","measureText","actualBoundingBoxAscent","actualBoundingBoxDescent","innerHTML","minHeight","maxHeight","padding","border","display","left","measureAndCacheTextWidth","getTextDimensions","baseStyle","chunks","widths","heights","lineWidths","lineWidth","currentWidth","currentHeight","drawImageOrLabel","labelOrImage","originX","originY","save","globalAlpha","setTransform","contextInstructions","label","executeLabelInstructions","drawImage","restore","fontChangeListenerKey_","redrawText","element_","container","getViewport","firstChild","children_","renderedVisible_","CompositeMapRenderer","getMap","event_1","RenderEvent","calculateMatrices2D","dispatchRenderEvent","declutterLayers","previousElement","layerIndex","sourceState","getSourceState","renderDeclutter","scheduleExpireIconCache","getDataAtPixel","layers","layersListenerKeys_","listenerKeys_","handleLayersChanged_","getArray","setLayers","LayerGroup","getLayers","handleLayersAdd_","handleLayersRemove_","layersArray","registerLayerListeners_","GroupEvent","handleLayerChange_","handleLayerGroupAdd_","handleLayerGroupRemove_","collectionEvent","collection","currentLayers","getLayersArray","getLayerStatesArray","ownLayerState","defaultZIndex","originalEvent","opt_dragging","pixel_","coordinate_","dragging","MapBrowserEvent","getEventPixel","getCoordinateFromPixel","preventDefault","MapEvent","SINGLECLICK","CLICK","DBLCLICK","POINTERDRAG","POINTERMOVE","POINTERDOWN","POINTERUP","POINTEROVER","POINTEROUT","POINTERENTER","POINTERLEAVE","POINTERCANCEL","moveTolerance","clickTimeoutId_","emulateClicks_","dragging_","dragListenerKeys_","moveTolerance_","down_","activePointers_","trackedTouches_","pointerdownListenerKey_","PointerEventType","handlePointerDown_","originalPointerMoveEvent_","relayedListenerKey_","relayEvent_","boundHandleTouchMove_","handleTouchMove_","MapBrowserEventHandler","pointerEvent","newEvent","MapBrowserEventType","clearTimeout","setTimeout","pointerId","updateActivePointers_","isMouseActionButton_","emulateClick_","button","doc","getOwnerDocument","handlePointerMove_","handlePointerUp_","getRootNode","isMoving_","cancelable","clientX","clientY","DROP","priorityFunction","keyFunction","priorityFunction_","keyFunction_","elements_","priorities_","queuedElements_","PriorityQueue","elements","priorities","siftUp_","elementKey","priority","siftDown_","isKeyQueued","count","lIndex","getLeftChildIndex_","rIndex","getRightChildIndex_","smallerChildIndex","parentIndex","getParentIndex_","heapify_","tilePriorityFunction","tileChangeCallback","boundHandleTileChange_","handleTileChange","tileChangeCallback_","tilesLoading_","tilesLoadingKeys_","TileQueue","added","enqueue","tileKey","maxTotalLoading","maxNewLoads","newLoads","getCount","dequeue","getTilePriority","tileSourceKey","tileCenter","tileResolution","wantedTiles","CENTER","RESOLUTION","ROTATION","DEFAULT_TILE_SIZE","createExtent","onlyCenter","smooth","opt_isMoving","opt_centerShift","viewWidth","viewHeight","shiftX","shiftY","ratio","none","getViewportClampedResolution","maxExtent","viewportSize","showFullExtent","xResolution","yResolution","getSmoothClampedResolution","createSnapToResolutions","resolutions","opt_smooth","opt_maxExtent","opt_showFullExtent","cappedMaxRes","capped","z","createSnapToPower","power","opt_minResolution","minZoomLevel","cappedZoomLevel","zoomLevel","createMinMaxResolution","disable","createSnapToN","theta","createSnapToZero","opt_tolerance","animationCallback","returnValue","createCenterConstraint","smoothExtentConstraint","constrainOnlyCenter","multiWorld","isGlobal","centerNone","createResolutionConstraint","resolutionConstraint","zoomFactor","smoothResolutionConstraint","projExtent","constrainResolution","defaultMaxResolution","defaultMinResolution","defaultMaxZoom","constraint","createRotationConstraint","enableRotation","constrainRotation","rotationNone","isNoopAnimation","animation","sourceCenter","targetCenter","coordinatesEqual","sourceResolution","targetResolution","sourceRotation","targetRotation","calculateCenterOn","rotX","rotY","hints_","animations_","updateAnimationKey_","projection_","viewportSize_","targetCenter_","targetResolution_","targetRotation_","nextCenter_","nextResolution_","nextRotation_","cancelAnchor_","applyOptions_","View","ViewProperty","resolutionConstraintInfo","maxResolution_","minResolution_","zoomFactor_","resolutions_","padding_","minZoom_","centerConstraint","rotationConstraint","constraints_","setRotation","setCenterInternal","setResolution","setZoom","oldPadding","newPadding","getResolution","offsetX","offsetY","newOptions","getZoom","getCenterInternal","getRotation","var_args","isDef","getAnimating","resolveConstraints","args","animateInternal","animationCount","series","easing","getResolutionForZoom","setHint","ViewHint","updateAnimations_","cancelAnimationFrame","more","seriesComplete","elapsed","fraction","progress","getViewportSize_","constrainedResolution","calculateCenterZoom","applyTargetState_","constrainedRotation","calculateCenterRotate","requestAnimationFrame","currentCenter","rotateCoordinate","addCoordinate","currentResolution","opt_rotation","opt_size","opt_hints","calculateExtentInternal","getViewportSizeMinusPadding_","getZoomForResolution","getUpdatedOptions_","enabled","getResolutionForExtentInternal","opt_power","getConstrainedResolution","logPower","reducedSize","nextCenter","nextResolution","nextRotation","nearest","baseLevel","geometryOrExtent","polygonFromExtent","getType","fitInternal","minRotX","minRotY","maxRotX","maxRotY","rotatedExtent","rotatedExtentForGeometry","centerRot","centerX","centerY","getConstrainedCenter","centerOnInternal","centerShift","shiftedCenter","deltaCoordinates","setCenter","adjustResolutionInternal","isMoving","getInteracting","newResolution","adjustResolution","adjustRotationInternal","newRotation","hint","opt_doNotCancelAnims","opt_forceMoving","newCenter","calculateCenterShift","cancelAnimations","opt_duration","opt_resolutionDirection","endInteractionInternal","opt_targetResolution","targetZoom","opt_direction","targetRes","hasArea","toSize","removeLayerMapProperty","setMapInternal","setLayerMapProperty","optionsInternal","keyboardEventTarget","getElementById","controls","interactions","overlays","layerGroup","MapProperty","view","createOptionsInternal","renderComplete_","boundHandleBrowserEvent_","handleBrowserEvent","maxTilesLoading_","maxTilesLoading","postRenderTimeoutHandle_","animationDelayKey_","animationDelay_","renderFrame_","coordinateToPixelTransform_","pixelToCoordinateTransform_","frameIndex_","frameState_","previousExtent_","viewPropertyListenerKey_","viewChangeListenerKey_","layerGroupPropertyListenerKeys_","viewport_","overflow","overlayContainer_","pointerEvents","overlayContainerStopEvent_","mapBrowserEventHandler_","keyboardEventTarget_","targetChangeHandlerKeys_","overlays_","overlayIdIndex_","postRenderFunctions_","tileQueue_","handleTileChange_","handleLayerGroupChanged_","handleViewChanged_","handleSizeChanged_","handleTargetChanged_","viewOptions","setView","addOverlayInternal_","getId","control","interaction","PluggableMap","getControls","getInteractions","getLayerGroup","overlay","getOverlays","setTarget","getCoordinateFromPixelInternal","features","forEachFeatureAtPixel","addLayersFrom","forEachLayerAtPixel","hasFeatureAtCoordinate","viewportPosition","getBoundingClientRect","eventPosition","changedTouches","top","getTarget","getView","group","renderer","ready","loading","viewCoordinate","getPixelFromCoordinateInternal","targetElement","getTargetElement","ownerDocument","browserEvent","mapBrowserEvent","handleMapBrowserEvent","rootNode","contains","documentElement","interactionsArray","getActive","tileQueue","hints","viewHints","lowOnFrameBudget","getTilesLoading","reprioritize","loadMoreTiles","animate","defaultView","updateSize","updateViewportSize_","handleViewPropertyChanged_","handleLayerAdd_","handleLayerRemove_","handleFontsChanged","getSize","previousFrameState","getHints","declutterTree","usedTiles","mapId","renderTargets","nextExtent","MapEventType","getLoadingOrNotReady","handlePostRender","oldLayerGroup","computedStyle","parseFloat","getClientRects","setViewportSize","target_","Control","getOverlayContainerStopEvent","mapEvent","ulElement_","collapsed_","collapsed","userCollapsed_","overrideCollapsible_","collapsible","collapsible_","tipLabel","expandClassName","collapseLabel","collapseClassName","collapseLabel_","textContent","label_","activeLabel","toggleButton_","setAttribute","handleClick_","cssClasses","renderedAttributions_","Attribution","lookup","visibleAttributions","attributionGetter","getAttributions","attributions","getAttributionsCollapsible","setCollapsible","collectSourceAttributions_","handleToggle_","classList","toggle","updateElement_","compassClassName","callResetNorth_","resetNorth","duration_","autoHide_","autoHide","rotation_","Rotate","resetNorth_","zoomInClassName","zoomOutClassName","zoomInLabel","zoomOutLabel","zoomInTipLabel","zoomOutTipLabel","inElement","createTextNode","outElement","Zoom","zoomByDelta_","currentZoom","newZoom","getConstrainedZoom","defaults","zoomOptions","rotateOptions","attribution","attributionOptions","pan","zoomByDelta","setActive","Interaction","InteractionProperty","active","delta_","DoubleClickZoom","stopEvent","shiftKey","centroid","handleDownEvent","handleDragEvent","handleMoveEvent","handleUpEvent","stopDown","handlingDownUpSequence","trackedPointers_","targetPointers","PointerInteraction","updateTrackedPointers_","handledUp","handled","isPointerDraggingEvent","conditions","pass","altKeyOnly","altKey","metaKey","ctrlKey","altShiftKeysOnly","focus","activeElement","focusWithTabindex","hasAttribute","always","mouseActionButton","never","singleClick","noModifierKeys","shiftKeyOnly","targetNotEditable","mouseOnly","pointerType","primaryAction","isPrimary","kinetic_","kinetic","lastCentroid","lastPointersCount_","panning_","condition","condition_","onFocusOnly","noKinetic_","DragPan","beginInteraction","centroidFromPointers","update","scaleCoordinate","adjustCenterInternal","getAngle","centerpx","endInteraction","lastAngle_","DragRotate","getConstraints","geometry_","startPixel_","endPixel_","RenderBox","startPixel","endPixel","px","getOverlayContainer","createOrUpdateGeometry","render_","DragBoxEventType","box_","minArea_","minArea","onBoxEnd","boxEndCondition_","boxEndCondition","defaultBoxEndCondition","DragBox","setPixels","DragBoxEvent","completeBox","out_","out","DragZoom","defaultCondition_","pixelDelta_","pixelDelta","KeyboardPan","keyEvent","keyCode","KeyCode","mapUnitsDelta","KeyboardZoom","charCode","Mode","totalDelta_","lastDelta_","timeout_","timeout","useAnchor_","useAnchor","constrainResolution_","lastAnchor_","startTime_","timeoutId_","mode_","trackpadEventGap_","trackpadTimeoutId_","deltaPerZoom_","MouseWheelZoom","wheelEvent","deltaMode","WheelEvent","DOM_DELTA_PIXEL","DOM_DELTA_LINE","getConstrainResolution","endInteraction_","adjustZoom","timeLeft","handleWheelZoom_","pointerOptions","anchor_","rotating_","rotationDelta_","threshold_","threshold","PinchRotate","rotationDelta","touch0","touch1","lastDistance_","lastScaleDelta_","PinchZoom","scaleDelta","altShiftDragRotate","doubleClickZoom","zoomDelta","zoomDuration","dragPan","pinchRotate","pinchZoom","keyboard","mouseWheelZoom","shiftDragZoom","defaultControls","defaultInteractions","insertFirst","autoPan","autoPanAnimation","margin","autoPanMargin","mapPostrenderListenerKey","handleElementChanged","handleMapChanged","handleOffsetChanged","handlePositionChanged","handlePositioningChanged","setElement","setOffset","setPositioning","positioning","OverlayPositioning","setPosition","Overlay","getElement","updatePixelPosition","performAutoPan","panIntoView","opt_panIntoViewOptions","mapRect","getRect","overlayRect","panIntoViewOptions","myMargin","offsetLeft","offsetRight","offsetTop","offsetBottom","centerPx","newCenterPx","panOptions","box","pageXOffset","pageYOffset","getPosition","isRendered","getPixelFromCoordinate","mapSize","updateRenderedPosition","setVisible","getOffset","getPositioning","posX","posY","concat","msTransform","opt_highWaterMark","highWaterMark","count_","entries_","oldest_","newest_","keep","value_","key_","newer","older","opt_tileCoord","getKeyZXY","getCacheKeyForTileKey","substring","fromKey","hash","withinExtentAndZ","tileRange","getFullTileRange","TileCache","peekLast","release","peekFirstKey","TileRange","canvasPool","urlTileCoord","getSourceTiles","context_","executorGroups","declutterExecutorGroups","loadingSourceTiles","hitDetectionImageData","replayState_","sourceTiles","errorTileKeys","wantedResolution","wrappedTileCoord","VectorRenderTile","hasContext","dirty","renderedRenderOrder","renderedResolution","renderedRevision","renderedTileResolution","renderedTileRevision","renderedTileZ","format_","features_","url_","VectorTile","setState","dataProjection","setFeatures","asColorLike","withCredentials","loadFeaturesXhr","url","success","failure","xhr","XMLHttpRequest","open","FormatType","responseType","onload","status","responseText","responseXML","DOMParser","parseFromString","response","readFeatures","featureProjection","readProjection","onerror","send","addFeatures","jsonp","opt_errback","opt_callbackParam","script","cleanup","timer","getElementsByTagName","originalXHR","client","getJSON","JSON","parse","ResponseError","ClientError","setRequestHeader","resolveUrl","base","URL","href","VectorContext","hitDetectionRenderer","circleGeometry","geometryCollectionGeometry","lineStringGeometry","multiLineStringGeometry","multiPointGeometry","multiPolygonGeometry","pointGeometry","polygonGeometry","strokeStyle","imageStyle","opt_declutterImageWithText","textStyle","viewRotation","opt_squaredTolerance","opt_userTransform","viewRotation_","squaredTolerance_","userTransform_","contextFillState_","contextStrokeState_","contextTextState_","fillState_","strokeState_","imageAnchorX_","imageAnchorY_","imageHeight_","imageOpacity_","imageOriginX_","imageOriginY_","imageRotateWithView_","imageRotation_","imageScale_","imageWidth_","text_","textOffsetX_","textOffsetY_","textRotateWithView_","textRotation_","textScale_","textFillState_","textStrokeState_","textState_","pixelCoordinates_","tmpLocalTransform_","CanvasImmediateRenderer","pixelCoordinates","localTransform","alpha","setContextFillState_","setContextStrokeState_","setContextTextState_","strokeText","fillText","close","moveTo","lineTo","closePath","moveToLineTo_","beginPath","arc","fill","stroke","drawText_","setFillStrokeStyle","getFill","getStroke","setImageStyle","getImage","setTextStyle","getText","drawPoint","drawLineString","drawPolygon","drawMultiPoint","drawMultiLineString","drawMultiPolygon","drawGeometryCollection","drawCircle","getGeometryFunction","drawGeometry","geometries","getGeometriesArray","simplifyTransformed","drawImages_","flatMidpoint","getFlatMidpoint","geometryExtent","getEnds","flatMidpoints","getFlatMidpoints","drawRings_","flatInteriorPoint","getEndss","flatInteriorPoints","getFlatInteriorPoints","fillState","contextFillState","strokeState","contextStrokeState","lineCap","setLineDash","lineDash","lineDashOffset","lineJoin","miterLimit","textState","contextTextState","textAlign","textBaseline","fillStyleColor","getColor","strokeStyleColor","strokeStyleLineCap","getLineCap","strokeStyleLineDash","getLineDash","strokeStyleLineDashOffset","getLineDashOffset","strokeStyleLineJoin","getLineJoin","strokeStyleWidth","strokeStyleMiterLimit","getMiterLimit","imageSize","imageAnchor","getAnchor","imageOrigin","getOrigin","getRotateWithView","getScaleArray","textFillStyle","textFillStyleColor","textStrokeStyle","textStrokeStyleColor","textStrokeStyleLineCap","textStrokeStyleLineDash","textStrokeStyleLineDashOffset","textStrokeStyleLineJoin","textStrokeStyleWidth","textStrokeStyleMiterLimit","textFont","getFont","textOffsetX","getOffsetX","textOffsetY","getOffsetY","textRotateWithView","textRotation","textScale","textText","textTextAlign","getTextAlign","textTextBaseline","getTextBaseline","GEOMETRY_RENDERERS","builderGroup","opt_declutterBuilderGroup","declutterImageWithText","getImageState","imageReplay","getBuilder","BuilderType","textReplay","drawText","lineStringReplay","polygonReplay","replayGroup","geometryRenderer","circleReplay","defaultOrder","feature1","feature2","getSquaredTolerance","getTolerance","renderFeature","imageState","unlistenImageChange","listenImageChange","renderGeometry","renderFeatureInternal","drawCustom","getHitDetectionRenderer","getGeometries","getVectorContext","CanvasRenderingContext2D","userTransform","canvasPixelRatio","multiplyTransform","brokenDiagonalRendering_","IMAGE_SMOOTHING_DISABLED","imageSmoothingEnabled","msImageSmoothingEnabled","IMAGE_SMOOTHING_ENABLED","drawTestTriangle","u1","u2","clip","verifyBrokenDiagonalRendering","calculateSourceResolution","targetProj","targetMetersPerUnit","sourceMetersPerUnit","compensationFactor","isFinite","calculateSourceExtentResolution","targetExtent","triangulation","sources","gutter","opt_renderEdges","opt_interpolate","pixelRound","globalCompositeOperation","sourceDataExtent","canvasWidthInUnits","canvasHeightInUnits","stitchContext","stitchScale","xPos","yPos","srcWidth","srcHeight","targetTopLeft","getTriangles","triangle","u0","v0","sourceNumericalShiftX","sourceNumericalShiftY","affineCoefs","getImageData","isBrokenDiagonalRendering","ud","vd","step","steps","tmpTileCoord","origins","origin_","origin","origins_","tileSizes_","tileSizes","tileSize_","tileSize","fullTileRanges_","tmpSize_","tmpExtent_","sizes","restrictedTileRange","getTileRangeForExtentAndZ","calculateTileRanges_","TileGrid","opt_tileRange","tileCoordExtent","getTileCoordExtent","createOrUpdateTileRange","tileCoordZ","tileCoordX","tileCoordY","getTileSize","getTileCoordForXYAndZ_","getTileCoordForXYAndResolution_","reverseIntersectionPolicy","getZForResolution","createOrUpdateTileCoord","fullTileRanges","getForProjection","getDefaultTileGrid","createForProjection","setDefaultTileGrid","getTileCoordCenter","extentFromProjection","getTileCoordForCoordAndZ","createForExtent","opt_maxZoom","opt_tileSize","opt_corner","resolutionsFromExtent","createXYZ","xyzOptions","gridOptions","opt_maxResolution","half","createFromTemplate","zRegEx","xRegEx","yRegEx","dashYRegEx","range","createFromTemplates","templates","tileUrlFunctions","createFromTileUrlFunctions","tileCoordHash","nullTileUrlFunction","expandUrl","urls","startCharCode","stopCharCode","stop_1","appendParams","uri","params","keyParams","encodeURIComponent","qs","supportedExtensions","ARRAY_BUFFER","ELEMENT_ARRAY_BUFFER","STATIC_DRAW","DYNAMIC_DRAW","FLOAT","CONTEXT_IDS","opt_attributes","attributes","preserveDrawingBuffer","XML_SCHEMA_INSTANCE_URI","createElementNS","namespaceURI","qualifiedName","getDocument","getAllTextContent","normalizeWhitespace","getAllTextContent_","accumulator","nodeType","CDATA_SECTION_NODE","TEXT_NODE","nodeValue","nextSibling","isDocument","getAttributeNS","makeArrayExtender","valueReader","objectStack","makeArrayPusher","makeReplacer","makeObjectPropertyPusher","opt_property","localName","makeObjectPropertySetter","makeChildAppender","nodeWriter","makeArraySerializer","serializersNS","nodeFactory","serializers","makeSimpleNodeFactory","serialize","opt_nodeName","opt_namespaceURI","fixedNodeName","nodeName","OBJECT_PROPERTY_NODE_FACTORY","makeSequence","orderedKeys","sequence","makeStructureNS","namespaceURIs","structure","opt_structureNS","structureNS","parseNode","parsersNS","firstElementChild","nextElementSibling","parsers","parser","pushParseAndPop","opt_keys","pushSerializeAndPop","xmlSerializer_","getXMLSerializer","XMLSerializer","document_","implementation","createDocument","BufferUsage","getArrayClassForType","Float32Array","Uint32Array","opt_usage","usage","WebGLArrayBuffer","arrayClass","gl_","webGlContext","gl","scaleRatio_","scaleRatio","renderTargetTexture_","createTexture","renderTargetTextureSize_","frameBuffer_","createFramebuffer","vertexShader","createShader","VERTEX_SHADER","shaderSource","compileShader","fragmentShader","FRAGMENT_SHADER","renderTargetProgram_","createProgram","attachShader","linkProgram","renderTargetVerticesBuffer_","createBuffer","bindBuffer","bufferData","renderTargetAttribLocation_","getAttribLocation","renderTargetUniformLocation_","getUniformLocation","renderTargetOpacityLocation_","renderTargetTextureLocation_","uniforms_","uniforms","location","WebGLPostProcessingPass","getGL","textureSize","drawingBufferWidth","drawingBufferHeight","bindFramebuffer","FRAMEBUFFER","getFrameBuffer","viewport","internalFormat","RGBA","UNSIGNED_BYTE","bindTexture","TEXTURE_2D","texImage2D","texParameteri","TEXTURE_MIN_FILTER","LINEAR","TEXTURE_WRAP_S","CLAMP_TO_EDGE","TEXTURE_WRAP_T","framebufferTexture2D","COLOR_ATTACHMENT0","nextPass","preCompose","postCompose","activeTexture","TEXTURE0","canvasId","getContextAttributes","clearColor","COLOR_BUFFER_BIT","enable","BLEND","blendFunc","ONE","ONE_MINUS_SRC_ALPHA","useProgram","enableVertexAttribArray","vertexAttribPointer","uniform2f","uniform1i","uniform1f","applyUniforms","drawArrays","TRIANGLES","textureSlot","uniform","HTMLCanvasElement","ImageData","texture","uniform3f","uniform4f","fromTransform","mat4","DefaultUniform","AttributeType","UNSIGNED_SHORT","UNSIGNED_INT","canvasCache","getSharedCanvasCacheKey","uniqueCanvasCacheKeyCount","computeAttributesStride","attr","getByteSizeFromType","BYTES_PER_ELEMENT","Uint16Array","boundHandleWebGLContextLost_","handleWebGLContextLost","boundHandleWebGLContextRestored_","handleWebGLContextRestored","canvasCacheKey_","canvasCacheKey","cacheItem","users","getCanvas","bufferCache_","extensionCache_","currentProgram_","ContextEventType","offsetRotateMatrix_","offsetScaleMatrix_","tmpMat4_","uniformLocations_","attribLocations_","setUniforms","postProcessPasses_","postProcesses","shaderCompileErrors_","WebGLHelper","name_1","getExtension","bufferKey","bufferCache","webGlBuffer","getUsage","bufferCacheEntry","isContextLost","deleteBuffer","loseContext","releaseCanvas","opt_disableAlphaBlend","init","ZERO","applyFrameState","renderTarget","getFramebuffer","getTexture","elementType","numItems","offsetInBytes","drawElements","offsetScaleMatrix","resetTransform","scaleTransform","offsetRotateMatrix","rotateTransform","setUniformMatrixValue","setUniformFloatValue","HTMLImageElement","prevValue","program","shader","fragmentShaderSource","vertexShaderSource","getShaderParameter","COMPILE_STATUS","getShaderInfoLog","deleteShader","getProgramParameter","LINK_STATUS","uniform4fv","uniformMatrix4fv","attribName","getAttributeLocation","enableAttributeArray_","opt_data","opt_texture","texture_","PaletteTexture","NEAREST","TEXTURE_MAG_FILTER","tmpArray4","helper","helper_","framebuffer_","size_","dataCacheDirty_","updateSize_","WebGLRenderTarget","readPixels","readAll","ENABLE_RASTER_REPROJECTION","maxSourceExtent","errorThreshold","opt_destinationResolution","sourceProj_","targetProj_","transformInvCache","transformInv","transformInv_","maxSourceExtent_","errorThresholdSquared_","triangles_","wrapsXInSource_","canWrapXInSource_","sourceWorldWidth_","targetWorldWidth_","destinationTopLeft","destinationTopRight","destinationBottomRight","destinationBottomLeft","sourceTopLeft","sourceTopRight","sourceBottomRight","sourceBottomLeft","maxSubdivision","addQuad_","leftBound_1","newTriangle","Triangulation","aSrc","bSrc","cSrc","dSrc","sourceQuadExtent","sourceCoverageX","sourceWorldWidth","wrapsX","needsSubdivision","isNotFinite","centerSrc","bc","bcSrc","da","daSrc","ab","abSrc","cd","cdSrc","addTriangle_","sourceTileGrid","targetTileGrid","getTileFunction","opt_errorThreshold","renderEdges_","gutter_","sourceTileGrid_","targetTileGrid_","wrappedTileCoord_","sourceTiles_","sourcesListenerKeys_","sourceZ_","maxTargetExtent","limitedTargetExtent","sourceProjExtent","errorThresholdInPixels","triangulation_","calculateSourceExtent","sourceRange","srcX","srcY","ReprojTile","renderReprojected","leftToLoad_1","sourceListenKey_1","unlistenSources_","reproject_","bindAndConfigure","resampleFilter","uploadDataTexture","bandCount","textureType","bytesPerRow","byteLength","unpackAlignment","LUMINANCE","LUMINANCE_ALPHA","RGB","oldUnpackAlignment","getParameter","UNPACK_ALIGNMENT","pixelStorei","pixelContext","textures","grid","tilePixelRatio_","tilePixelRatio","fromArray","flushBufferData","setTile","TileTexture","uploadTile_","uploadImageTexture","pixelSize","isFloat","pixelCount","DataType","bytesPerElement","textureCount","textureDataArrays","textureIndex","dataIndex","rowOffset","colCount","rowIndex","colIndex","dataValue","pixelIndex","bandIndex","textureData","deleteTexture","col","row","data_1","pixelsPerRow","DataView","bytesPerPixel","offset_1","clearRect","boundHandleImageChange_","handleImageChange_","layer_","declutterExecutorGroup","LayerRenderer","tiles","loadedTileCallback","forEachLoadedTile","renderIfReadyAndVisible","getLayer","WebGLWorkerMessageType","inversePixelTransform_","pixelContext_","postProcesses_","removeHelper","dispatchPreComposeEvent","dispatchPostComposeEvent","WebGLLayerRenderer","event_2","getRenderSource","incrementGroup","groupNumber","layerClassName","getClassName","canvasCacheKeyMatches","afterHelperCreated","prepareFrameInternal","event_3","dispatchRenderEvent_","renderPixel","layerExtent","pixelCanvas","tmpArray_","bufferPositions_","vertexPosition","indexPosition","writePointVertex","colorEncodeId","radix","divide","colorDecodeId","mult","Uniforms","TILE_TEXTURE_ARRAY","TILE_TRANSFORM","TRANSITION_ALPHA","DEPTH","TEXTURE_PIXEL_WIDTH","TEXTURE_PIXEL_HEIGHT","TEXTURE_RESOLUTION","TEXTURE_ORIGIN_X","TEXTURE_ORIGIN_Y","RENDER_EXTENT","ZOOM","Attributes","TEXTURE_COORD","attributeDescriptions","empty","depthForZ","addTileTextureToLookup","tileTexturesByZ","tileTexture","getRenderExtent","gridExtent","getTileGridForProjection","getCacheKey","getTileCoordKey","tileLayer","renderComplete","tileTransform_","tempMat4_","tempTileRange_","tempTileCoord_","createTileCoord","tempSize_","program_","vertexShader_","fragmentShader_","indices_","tileTextureCache_","paletteTextures_","paletteTextures","WebGLTileLayerRenderer","getProgram","tileState","useInterimTilesOnError","getUseInterimTilesOnError","State","initialZ","tileSource","getTilePixelRatio","getGutterForProjection","tileTextureCache","minZ","getPreload","cacheKey","containsKey","getTile","isDrawableTile_","getInterimTile","tileQueueKey","preRender","zDirection","targetZ","enqueueTiles","alphaLookup","uid","blend","tileTextures","getAlpha","endTransition","tileCoordKey","findAltTiles_","parentZ","prepareDraw","zs","tileZ","tileOrigin","centerI","centerJ","tileScale","depth","tileTextures_1","tileCenterI","tileCenterJ","mat4FromTransform","enableAttributes","textureProperty","uniformName","paletteIndex","paletteTexture","setUniformFloatVec4","finalizeDraw","expireCache","postRender","getPixelData","altZ","getTileRangeForTileCoordAndZ","covered","deleteProgram","ValueTypes","Operators","getValueType","stringify","valueArr","operator","getReturnType","isTypeUnique","valueType","numberToGlsl","arrayToGlsl","colorToGlsl","getStringNumberEquivalent","string","stringLiteralsMap","stringToGlsl","expressionToGlsl","typeHint","toGlsl","assertNumber","assertNumbers","assertString","assertBoolean","assertArgsCount","assertArgsMinCount","assertArgsMaxCount","assertArgsEven","assertUniqueInferredType","types","uniformNameForVariable","variableName","inFragmentShader","variables","PALETTE_TEXTURE_ARRAY","colors","numColors","palette","candidate","length_1","paletteName","GET_BAND_VALUE_FUNC","getEqualOperator","getDecisionOperator","band","functions","ifBlocks","colorIndex","textureName","bandExpression","xOffsetExpression","yOffsetExpression","parsedArgs","opt_typeHint","interpolation","outputType","exponent","stop1","output1","stop2","output2","fallback","assertArgsOdd","varyings","sizeExpression","rotationExpression","offsetExpression","colorExpression","texCoordExpression","discardExpression","rotateWithView","ShaderBuilder","expression","forHitDetection","offsetMatrix","attribute","varying","hitDetectionBypass","parseLiteralStyle","symbStyle","symbol","texCoord","textureCoord","vertContext","parsedSize","parsedOffset","parsedTexCoord","parsedRotation","fragContext","parsedColor","parsedOpacity","opacityFilter","visibleSize","symbolType","st","builder","setSizeExpression","setRotationExpression","setSymbolOffsetExpression","setTextureCoordinateExpression","setSymbolRotateWithView","setColorExpression","parsedFilter","setFragmentDiscardExpression","varName","addUniform","getColorExpression","attrName","addVarying","addAttribute","props","matrixIds_","matrixIds","WMTSTileGrid","createFromCapabilitiesMatrixSet","matrixSet","opt_matrixLimits","matrixLimits","switchOriginXY","getAxisOrientation","elt","elt_ml","tileWidth","tileHeight","opacity_","rotateWithView_","scale_","scaleArray_","displacement_","displacement","ImageStyle","getScale","getDisplacement","hitDetectionCanvas_","fill_","points","radius_","radius1","radius2_","radius2","stroke_","renderOptions_","RegularShape","getPoints","getRadius2","setOpacity","createHitDetectionCanvas_","renderOptions","draw_","strokeWidth","r1","r2","miterRatio","bevelAdd","aa","dd","innerMiterRatio","innerLength","calculateLineJoinSize_","maxRadius","createRenderOptions","createPath_","drawHitDetectionCanvas_","angle0","radiusC","CircleStyle","color_","Fill","taintedTestContext","hitDetectionImage_","imageState_","tainted_","IconImage","dispatchChangeEvent_","replaceColor_","isTainted_","imgData","putImageData","normalizedAnchor_","anchorOrigin_","anchorOrigin","IconOrigin","anchorXUnits_","anchorXUnits","IconAnchorUnits","anchorYUnits_","anchorYUnits","imgSize_","imgSize","iconImage_","getIconImage","offset_","offsetOrigin_","offsetOrigin","Icon","getSrc","getPixelRatio","getHitDetectionImage","iconImageSize","lineCap_","lineDash_","lineDashOffset_","lineJoin_","miterLimit_","width_","Stroke","geometryFunction_","defaultGeometryFunction","hitDetectionRenderer_","zIndex_","Style","toFunction","styleFunction","defaultStyles","createDefaultStyle","createEditingStyle","styles","white","blue","font_","textAlign_","textBaseline_","maxAngle_","maxAngle","placement_","placement","TextPlacement","overflow_","offsetX_","offsetY_","backgroundFill_","backgroundFill","backgroundStroke_","backgroundStroke","Text","getPlacement","getMaxAngle","getOverflow","getBackgroundFill","getBackgroundStroke","getPadding","opt_circular","first_","last_","head_","circular_","length_","LinkedList","opt_maxEntries","rbush_","RBush_","items_","RBush","extents","items","bbox","forEach_","getAll","getInExtent","rbush","adaptAttributions","attributionLike","attributions_","attributionsCollapsible_","attributionsCollapsible","wrapX_","interpolate_","viewResolver","viewRejector","viewPromise_","Source","opaque_","opaque","tileCache","tmpSize","tileOptions","TileSource","getTileCacheForProjection","getResolutions","scaleSize","refresh","tileCount","generateTileUrlFunction_","tileUrlFunction","UrlTile","setUrls","setUrl","tileLoadingKeys_","TileEventType","TileSourceEvent","pruneExceptNewestZ","setKey","setTileUrlFunction","defaultTileLoadFunction","imageTile","imageSmoothing","tileClass","tileCacheForProjection","tileGridForProjection","reprojectionErrorThreshold_","reprojectionErrorThreshold","renderReprojectionEdges_","TileImage","usedTileCache","getGutter","getInterpolate","getOpaque","thisProj","projKey","getTileCoordForTileUrlFunction","tileUrl","newTile","getTileInternal","refreshInterimChain","createTile_","tilegrid","proj","quadKey","digits","mask","hidpi","hidpi_","culture_","culture","maxZoom_","apiKey_","imagerySet_","imagerySet","requestJSONP","handleImageryMetadataResponse","BingMaps","statusCode","statusDescription","authenticationResultCode","resourceSets","resources","resource","zoomMax","imageWidth","imageHeight","zoomMin","imageUrlSubdomains","subdomain","quadKeyTileCoord","imageUrl","imageryProviders","transform_1","setAttributions","getTileGrid","imageryProvider","intersecting","coverageAreas","coverageArea","account_","account","mapId_","config_","config","templateCache_","initializeMap_","CartoDB","paramHash","applyTemplate_","mapUrl","handleInitResponse_","handleInitError_","tilesUrl","cdn_url","https","layergroupid","XYZ","opt_feature","opt_features","overlaps_","overlaps","strategy_","strategy","allStrategy","useSpatialIndex","featuresRtree_","loadedExtentsRtree_","loadingExtentsCount_","nullGeometryFeatures_","idIndex_","uidIndex_","featureChangeKeys_","featuresCollection_","addFeaturesInternal","bindFeaturesCollection_","VectorSource","addFeatureInternal","featureKey","addToIndex_","setupChangeEvents_","VectorSourceEvent","VectorEventType","handleFeatureChange_","valid","newFeatures","geometryFeatures","length_2","length_3","modifyingCollection","addFeature","removeFeature","opt_fast","featureId","removeAndIgnoreReturn","removeFeatureInternal","clearEvent","forEachFeatureInExtent","intersectsCoordinate","forEachInExtent","intersectsExtent","forEachFeatureAtCoordinateDirect","opt_filter","closestFeature","previousMinSquaredDistance","minDistance","sid","removeFromIdIndex_","loadedExtentsRtree","extentsToLoad","extentToLoad","this_1","featureChangeKeys","removed","setLoader","interpolationRatio","geometryFunction","createCustomCluster_","createCluster","boundRefresh_","updateDistance","Cluster","loadFeatures","cluster","mapDistance","clustered","getCoordinates","neighbors","getFeaturesInExtent","neighbor","geometry_1","searchCenter","DataTileSource","sourceLoader","floatView","uint32View","baseTable","shiftTable","mantissaTable","exponentTable","offsetTable","convertToNumber","float16bits","TypedArrayPrototype","Reflect","getTypedArrayPrototypeSybolToStringTag","getOwnPropertyDescriptor","isTypedArray","isDataView","getFloat16","dataView","byteOffset","opts","getUint16","fromWhiteIsZero","raster","rgbRaster","fromBlackIsZero","fromPalette","colorMap","greenOffset","blueOffset","mapIndex","fromCMYK","cmykRaster","fromYCbCr","yCbCrRaster","Uint8ClampedArray","cb","cr","fromCIELab","cieLabRaster","registry","addDecoder","cases","importFn","getDecoder","fileDirectory","Compression","Decoder","copyNewSize","samplesPerPixel","resampleNearest","valueArrays","inWidth","inHeight","outWidth","outHeight","relX","relY","newArray","cy","cx","resampleBilinear","rawY","yl","yh","rawX","tx","xl","xh","ll","hl","lh","hh","resample","resampleNearestInterleaved","valueArray","samples","resampleBilinearInterleaved","resampleInterleaved","sum","arrayForType","bitsPerSample","Int8Array","Int16Array","Int32Array","Float64Array","needsNormalization","normalizeArray","inBuffer","planarConfiguration","samplesToTransfer","outArray","bitMask","repeat","bitsPerLine","lineBitOffset","pixelBitOffset","bitOffset","outIndex","innerBitOffset","getUint8","raw","getUint32","default","GeoTIFFImage","geoKeys","littleEndian","isTiled","StripOffsets","PlanarConfiguration","ImageWidth","ImageLength","SamplesPerPixel","TileWidth","TileLength","RowsPerStrip","getTileWidth","getTileHeight","bytes","BitsPerSample","getSampleByteSize","RangeError","sampleIndex","SampleFormat","getInt8","getInt16","getInt32","getFloat32","getFloat64","getSampleFormat","getBitsPerSample","sample","poolOrDecoder","signal","numTilesPerRow","numTilesPerCol","TileOffsets","byteCount","TileByteCounts","StripByteCounts","fetch","request","sampleFormat","getSamplesPerPixel","getBlockHeight","imageWindow","interleave","resampleMethod","minXTile","maxXTile","minYTile","maxYTile","windowWidth","getBytesPerPixel","srcSampleOffsets","sampleReaders","getReaderForSample","promises","yTile","xTile","si","promise","getTileOrStrip","blockHeight","firstLine","firstCol","lastLine","lastCol","reader","ymax","xmax","pixelOffset","windowCoordinate","resampled","wnd","pool","fillValue","imageWindowWidth","imageWindowHeight","numPixels","getArrayForSample","_readRaster","enableAlpha","pi","PhotometricInterpretation","photometricInterpretations","ExtraSamples","ExtraSamplesValues","readRasters","subOptions","ColorMap","red","green","ModelTiepoint","tiePoints","metadata","GDAL_METADATA","findTagsByName","getAttribute","GDAL_NODATA","modelTransformation","ModelTransformation","referenceImage","modelPixelScale","ModelPixelScale","refResX","refResY","refResZ","GTRasterTypeGeoKey","DataView64","arrayBuffer","_dataView","combined","isSafeInteger","isNegative","carrying","byte","DataSlice","sliceOffset","bigTiff","_sliceOffset","_littleEndian","_bigTiff","sliceTop","readUint32","readUint64","CRLFCRLF","itemsToObject","fromEntries","parseHeaders","line","kv","parseContentRange","rawContentRange","total","parseByteRanges","responseArrayBuffer","boundary","decoder","startBoundary","endBoundary","innerText","endOfHeaders","headers","startOfData","fileSize","BaseSource","slices","fetchSlice","wait","milliseconds","zip","A","B","AbortError","captureStackTrace","AggregateError","errors","Block","BlockGroup","blockIds","BlockedSource","blockSize","blockCache","blockRequests","blockIdsToFetch","Set","cachedBlocks","missingBlockIds","firstBlockOffset","current","blockId","fetchBlocks","block","cachedBlock","allSettled","results","retriedBlockRequests","rejected","reason","aborted","requiredBlocks","readSliceData","groups","groupBlocks","groupRequests","groupIndex","blockRequest","blockOffset","sortedBlockIds","lastBlockId","blocks","blockIdLow","blockIdHigh","sliceData","sliceView","blockInnerOffset","rangeInnerOffset","usedBlockLength","blockView","BaseResponse","headerName","BaseClient","credentials","FetchResponse","FetchClient","XHRResponse","getResponseHeader","XHRClient","entries","onabort","abort","constructRequest","HttpResponse","dataPromise","HttpClient","parsedUrl","urlMod","httpApi","protocol","http","resolveData","chunk","Buffer","RemoteSource","maxRanges","allowFullFile","_fileSize","fetchSlices","Range","ok","rawContentType","getHeader","param","byteRanges","others","maybeWrapInBlockedSource","makeFetchSource","blockOptions","makeXHRSource","makeHttpSource","makeRemoteSource","forceXHR","clientOptions","getFieldTypeLength","fieldType","fieldTypes","parseGeoKeyDirectory","rawGeoKeyDirectory","GeoKeyDirectory","geoKeyDirectory","geoKeyNames","fieldTagNames","dataSlice","readMethod","fieldTypeLength","readUint8","readInt8","readUint16","readInt16","readInt64","readFloat32","readFloat64","ImageFileDirectory","nextIFDByteOffset","GeoTIFFImageIndexError","GeoTIFFBase","resX","resY","firstImage","usedImage","getImageCount","imageCount","imgBBox","getBoundingBox","oX","oY","rX","rY","usedBBox","allImages","subfileType","SubfileType","newSubfileType","NewSubfileType","imgResX","imgResY","imageResX","imageResY","GeoTIFF","firstIFDOffset","ifdRequests","ghostValues","fallbackSize","entrySize","offsetSize","getSlice","numDirEntries","byteSize","covers","entryCount","fieldTag","typeCount","fieldValues","valueOffset","actualOffset","readOffset","fieldDataSlice","arrayFields","parseFileDirectoryAt","requestIFD","previousIfd","ifd","hasNext","heuristicAreaSize","detectionString","valuesString","metadataSize","fullString","headerData","BOM","magicNumber","getUint64","MultiGeoTIFF","mainFile","overviewFiles","imageFiles","fileDirectoriesPerFile","fileDirectoriesPerFileParsing","requests","file","parseFileDirectoriesPerFile","visited","relativeIndex","imageFile","imageCounts","ifds","fromSource","mainUrl","overviewUrls","workerPool","defaultPoolSize","hardwareConcurrency","Pool","createWorker","workers","_awaitingDecoder","messageId","worker","idle","random","onMessage","decoded","postMessage","terminate","STATISTICS_MAXIMUM","STATISTICS_MINIMUM","_","ProjectedCSTypeGeoKey","getCachedProjection","unitsFromCode","ProjLinearUnitsGeoKey","GeographicTypeGeoKey","GeogAngularUnitsGeoKey","getImagesForTIFF","tiff","getImagesForSource","overviews","tiffFromUrls","tiffFromUrl","assertEqual","expected","got","rejector","getMinForDataType","getMaxForDataType","sourceInfo_","numSources","sourceOptions_","sourceOptions","sourceImagery_","resolutionFactors_","samplesPerPixel_","nodataValues_","metadata_","normalize_","addAlpha_","readMethod_","convertToRGB","configure_","GeoTIFFSource","nodataValues","sourceCount","sourceIndex","images","sourceOrigin","sourceTileSizes","sourceResolutions","imageIndex","nodataValue","getGDALNoData","getGDALMetadata","wantedSamples","bands","level","resolutionFactor_1","scaledSourceResolutions","sourceImagery","firstSource","nodata","additionalBands","loadTile_","addAlpha","sourceInfo","resolutionFactor","this_2","pixelBounds","bandNumber","dataLength","sourceSamples","transparent","gain","bias","stats","sourceValue","TierSizeCalculation","zoomifyImage_","CustomTile","tierSizeCalculation","tierSizeInTiles","tileSizeForTierSizeCalculation","tileCountUpToTier","tileIndex","localContext_1","ZoomifyTileClass","testTileUrl","getTileCoordForCoordAndResolution","Versions","IIIF_PROFILE_VALUES","supports","formats","qualities","COMPLIANCE_VERSION1","COMPLIANCE_VERSION2","COMPLIANCE_VERSION3","versionFunctions","iiifInfo","levelProfile","getComplianceLevelSupportedFeatures","imageInfo","scale_factors","tile_width","tile_height","additionalProfile","profile","profileSupports","profileFormats","profileQualities","scaleFactors","extraFormats","__spreadArray","preferredFormat","preferredFormats","extraFeatures","extraQualities","setImageInfo","IIIFInfo","getComplianceLevelEntryFromProfile","identifier","version","getImageApiVersion","complianceLevel","getComplianceLevelFromProfile","opt_preferredOptions","imageOptions","quality","formatPercentage","percentage","toLocaleString","maximumFractionDigits","baseUrl","supportsListedSizes","supportsListedTiles","isInteger","supportsArbitraryTiling","maxScaleFactor","ignoredSizesIndex","IiifTileClass","regionParam","sizeParam","tileX","tileY","regionX","regionY","regionW","regionH","sizeW","sizeH","regionWidth","regionHeight","getImageFunction","sourceImage","sourcePixelRatio","targetExtent_","sourceImage_","sourcePixelRatio_","sourceListenerKey_","ReprojImage","unlistenSource_","ImageSourceEventType","defaultImageLoadFunction","reprojectedImage_","reprojectedRevision_","ImageSource","getImageInternal","ImageSourceEvent","params_","imageSize_","renderedRevision_","ratio_","ImageArcGISRest","findNearestResolution","halfWidth","halfHeight","imageResolution","getRequestUrl_","handleImageChange","srid","modifiedUrl","canvasFunction_","canvasFunction","ImageCanvasSource","canvasElement","displayDpi_","displayDpi","useOverlay_","useOverlay","ImageMapGuide","getUrl","dpi","mcsW","mcsH","devW","devH","mpp","baseParams","imageExtent_","imageExtent","Static","extentWidth","extentHeight","targetWidth","targetHeight","setImage","DEFAULT_WMS_VERSION","GETFEATUREINFO_IMAGE_SIZE","v13_","updateV13_","serverType_","serverType","ImageWMS","projectionObj","sourceProjectionObj","LAYERS","mpu","viewExtent","requestExtent","WMSServerType","knownMapMediaTypes","knownVectorMediaTypes","getMapTileUrlTemplate","links","mediaType","tileUrlTemplate","fallbackUrlTemplate","rel","getVectorTileUrlTemplate","supportedMediaTypes","hrefLookup","supportedMediaType","parseTileMatrixSet","tileMatrixSet","tileMatrixSetLimits","crs","backwards","matrices","tileMatrices","matrixLookup","matrix","limitLookup","limit","tileMatrix","origin_1","pointOfOrigin","cellSize","matrixWidth","matrixHeight","tileMapWidth","minTileCol","maxTileCol","tileMapHeight","cornerOfOrigin","minTileRow","maxTileRow","intersectExtents","urlTemplate","urlFunction","upsideDown","localContext","tileCol","tileRow","getTileSetInfo","tileSet","dataType","tileMatrixSetLink","tileMatrixSetDefinition","parseTileSetMetadata","handleTileSetInfo_","handleError_","OGCMapTile","tileSetInfo","defaultLoadFunction","sourceTileCache","tileGrids_","sourceTile","tileFeatures","usedSourceTiles","bufferExtent","sourceTileGrid_1","sourceZ","forEachTileCoord","sourceTileCoord","sourceTileState","listenChange_1","sourceTileKey","coordKey","tileExtent","updateCacheSize","getFormat","onLoad","onError","OGCVectorTile","ATTRIBUTION","tempTransform","pixelTransform","containerReused","CanvasLayerRenderer","getBackground","opt_backgroundColor","backgroundColor","transformOrigin","topLeft","topRight","bottomRight","bottomLeft","inverted","imageLayer","CanvasImageLayerRenderer","viewResolution","imageSource","renderedExtent","loadImage","imageMapWidth","imageMapHeight","imagePixelRatio","viewCenter","size_1","canvasTransform","toTransformString","useContainer","clipped","clipUnrotated","dw","dh","previousAlpha","ImageLayer","BaseImageLayer","preload","setPreload","setUseInterimTilesOnError","BaseTileLayer","TileProperty","extentChanged","renderedExtent_","renderedPixelRatio","renderedProjection","renderedTiles","newTiles_","tmpExtent","tmpTileRange_","CanvasTileLayerRenderer","isDrawableTile","sourceRevision","canvasExtent","tilesToDrawByZ","findLoadedTiles","createLoadedTileFinder","tmpTileRange","inTransition","childTileRange","getTileCoordChildTileRange","forEachTileCoordParentTileRange","canvasScale","clips","clipZs","currentClip","currentZ","currentTilePixelSize","getTilePixelSize","currentScale","dx_1","dy_1","originTileCoord","originTileExtent","tileGutter","tilesToDraw","xIndex","nextX","yIndex","nextY","contextSaved","i_1","drawTileImage","updateUsedTiles","manageTilePyramid","scheduleExpireCache","getTileImage","alphaChanged","postRenderFunction","opt_tileCallback","useTile","TileLayer","hasImageData","newImageData","imageData","createImageData","createMinion","operation","workerHasImageData","newWorkerImageData","buffers","meta","imageOps","numBuffers","numBytes","arrays","pixels","lines","lib","Worker","Blob","createObjectURL","threads","_imageOps","_onWorkerMessage","minion","terminated","createFauxWorker","_workers","_queue","_maxQueueLength","queue","_running","_dataLookup","_job","Processor","inputs","_enqueue","_dispatch","job","_resolveJob","RasterEventType","RasterOperationType","processor_","operationType_","operationType","threads_","layers_","createLayer","createLayers","requestedFrameState_","renderedImageCanvas_","iMax","sourceOrLayer","sourceAttribution","setOperation","RasterSource","opt_lib","allSourcesReady_","updateFrameState_","processSources_","imageDatas","RasterSourceEvent","process","onWorkerComplete_","sharedContext","layerOrSource","ATTRIBUTIONS","OSM_ATTRIBUTION","LayerConfig","ProviderConfig","provider","providerConfig","layerConfig","getKeyForParams_","TileArcGISRest","getTileCoord","strokeRect","tileJSON_","handleTileJSONResponse","handleTileJSONError","onXHRLoad_","onXHRError_","tileJSON","TileJSON","epsg4326Projection","attributionExtent_1","TileWMS","bufferSize","preemptive","preemptive_","grid_","keys_","jsonp_","xRelative","yRelative","opt_request","loadInternal_","json","tileUrlFunction_","template_","UTFGrid","forDataAtCoordinate","grids","requestEncoding","WMTSRequestEncoding","version_","dimensions_","dimensions","matrixSet_","requestEncoding_","getKeyForDimensions_","createFromWMTSTemplate","WMTS","getMatrixId","renderBuffer","updateWhileAnimating","updateWhileInteracting","declutter_","declutter","renderBuffer_","updateWhileAnimating_","updateWhileInteracting_","BaseVectorLayer","renderOrder","toStyleFunction","projectionMatrixTransform","sourceRevision_","verticesBuffer_","hitVerticesBuffer_","indicesBuffer_","hitDetectionEnabled_","hitFragmentShader","hitVertexShader","hitVertexShader_","hitFragmentShader_","hitProgram_","customAttributes","hitDetectionAttributes","currentTransform_","renderTransform_","invertRenderTransform_","renderInstructions_","hitRenderInstructions_","hitRenderTarget_","generateBuffersRun_","worker_","createWebGLWorker","received","projectionTransform","hitDetection","fromArrayBuffer","vertexBuffer","indexBuffer","makeInverseTransform","renderInstructions","generateBuffersRun","featureCache_","featureCount_","sourceListenKeys_","handleSourceFeatureAdded_","handleSourceFeatureChanged_","handleSourceFeatureDelete_","handleSourceFeatureClear_","forEachFeature","WebGLPointsLayerRenderer","renderCount","renderHitDetection","clearCachedData","vectorSource","viewNotMoving","sourceChanged","BaseVector","getRenderBuffer","rebuildBuffers_","makeProjectionTransform","featureCache","totalInstructionsCount","totalHitInstructionsCount","hitColor","tmpCoords","tmpColor","renderIndex","hitIndex","featureUid","customAttributesCount","hitMessage","readPixel","getFeatureByUid","prepareDrawToRenderTarget","Instruction","BEGIN_GEOMETRY","BEGIN_PATH","CLOSE_PATH","CUSTOM","DRAW_CHARS","DRAW_IMAGE","END_GEOMETRY","FILL","MOVE_TO_LINE_TO","SET_FILL_STYLE","SET_STROKE_STYLE","STROKE","fillInstruction","strokeInstruction","beginPathInstruction","closePathInstruction","maxLineWidth","beginGeometryInstruction1_","beginGeometryInstruction2_","bufferedMaxExtent_","instructions","tmpCoordinate_","hitDetectionInstructions","CanvasBuilder","dashArray","dash","getBufferedMaxExtent","myEnd","closed","skipFirst","lastRel","nextRel","lastXCoord","lastYCoord","nextCoord","skipped","builderEnds","builderEnd","appendFlatLineCoordinates","beginGeometry","builderEndss","builderBegin","myEnds","drawCustomCoordinates_","CanvasInstruction","appendFlatPointCoordinates","endGeometry","instruction","createStroke","applyPixelRatio","createFill","currentFillStyle","applyStroke","currentStrokeStyle","currentLineCap","currentLineDash","currentLineDashOffset","currentLineJoin","currentLineWidth","currentMiterLimit","endGeometryInstruction","imagePixelRatio_","anchorX_","anchorY_","height_","originX_","originY_","declutterImageWithText_","CanvasImageBuilder","myBegin","reverseHitDetectionInstructions","opt_sharedData","hitDetectionImage","CanvasLineStringBuilder","moveToLineToInstruction","updateStrokeStyle","drawFlatCoordinates_","lastStroke","CanvasPolygonBuilder","numEnds","setFillStrokeStyles_","circleInstruction","drawFlatCoordinatess_","updateFillStyle","matchingChunk","m12","m23","x12","y12","x23","y23","chunkStart","chunkEnd","chunkM","acos","TEXT_ALIGN","labels_","fillStates","strokeStates","textStates","textKey_","fillKey_","strokeKey_","CanvasTextBuilder","geometryType","geometryWidths","beg_1","saveTextStates_","p0","p1","p2","p3","pixelRatio_1","flatOffset","flatEnd","oo","drawChars_","strokeKey","textKey","fillKey","baseline","BATCH_CONSTRUCTORS","PolygonBuilder","Builder","ImageBuilder","LineStringBuilder","TextBuilder","tolerance_","maxExtent_","resolution_","buildersByZIndex_","BuilderGroup","builderInstructions","zKey","builders","builderKey","builderInstruction","builderType","zIndexKey","replays","replay","Constructor","drawTextOnPath","startM","segmentM","advance","beginX","beginY","startOffset","startLength","endM","flat","previousAngle","singleSegment","iStart","charLength","chars","lineStringLength","p4","getDeclutterBox","replayImageOrLabelArgs","declutterBox","rtlRegEx","horizontalTextAlign","align","createTextChunks","alignFill_","coordinateCache_","renderedTransform_","widths_","Executor","textIsArray","renderWidth","OffscreenCanvasRenderingContext2D","previousFont","leftRight","strokeInstructions","fillInstructions","lineOffset","widthHeightIndex","lineWidthIndex","text_1","fillStrokeArgs","setStrokeStyle_","sheetWidth","sheetHeight","snapToPixel","fillStroke","boxW","boxH","boxX","boxY","drawImageX","drawImageY","drawImageW","drawImageH","contextScale","imageOrLabel","strokePadding","replayTextBackground_","repeatSize","createLabel","opt_featureCallback","opt_hitExtent","opt_declutterTree","transformSetFromArray","prevX","prevY","roundX","roundY","currentGeometry","pendingFill","pendingStroke","lastFillInstruction","lastStrokeInstruction","coordinateCache","viewRotationFromTransform","batchSize","labelWithAnchor","drawLabelWithPointPlacement_","widthIndex","calculateImageOrLabelDimensions_","imageArgs","imageDeclutterBox","replayImageOrLabel_","measurePixelRatio","pixelRatioScale","cachedWidths","pathLength","textLength","drawChars","cc","part","ii_1","execute_","ORDER","allInstructions","opt_renderBuffer","executorsByZIndex_","hitDetectionContext_","hitDetectionTransform_","createExecutors_","ExecutorGroup","flatClipCoords","getClipCoords","executors","instructionByZindex","candidates","declutteredFeatures","contextSize","newContext","hitExtent","indexes","getPixelIndexArray","featureCallback","result_1","executor","executeHitDetection","opt_builderTypes","builderTypes","execute","circlePixelIndexArrayCache","maxDistanceSq","distances","HIT_DETECT_RESOLUTION","createHitDetectionImageData","featureCount","indexFactor","featuresByZIndex","featureStyleFunction","getStyleFunction","originalStyle","setColor","setText","getImageSize","imgContext","byGeometryType","zIndexKeys","geomAndStyle","kk","hitDetect","resultFeatures","vectorLayer","boundHandleStyleImageChange_","handleStyleImageChange_","animatingOrInteracting_","dirty_","hitDetectionImageData_","renderedFeatures_","renderedResolution_","wrappedRenderedExtent_","renderedRotation_","renderedCenter_","renderedProjection_","renderedRenderOrder_","replayGroup_","replayGroupChanged","clipping","CanvasVectorLayerRenderer","executorGroup","endWorld","world","getRenderTransform","renderWorlds","transformToString","animating","interacting","getUpdateWhileAnimating","getUpdateWhileInteracting","frameStateExtent","vectorLayerRevision","vectorLayerRenderBuffer","vectorLayerRenderOrder","getRenderOrder","defaultRenderOrder","loadExtents","wrapCoordinateX","loadExtent","wrapExtentX","declutterBuilderGroup","CanvasBuilderGroup","getRenderTolerance","getDeclutter","userExtent_1","getSquaredRenderTolerance","userExtent","replayGroupInstructions","getOverlaps","vectorRenderer_","layerImageRatio_","getImageRatio","coordinateToVectorPixelTransform_","renderedPixelToCoordinateTransform_","CanvasVectorImageLayerRenderer","vectorPixel","vectorRenderer","imageFrameState_1","emptyImage_1","image_1","IMAGE_REPLAYS","ReplayType","VECTOR_REPLAYS","renderedLayerRevision_","tmpTransform_","CanvasVectorTileLayerRenderer","updateExecutorGroup_","tileImageNeedsRender_","hifi","prepareTile","getRenderMode","VectorTileRenderType","renderTileImage_","layerRevision","builderState","getReplayState","layerUid","tt","sourceTileExtent","sharedExtent","builderExtent","bufferedExtent","executorGroupInstructions","replayExtent","renderingReplayGroup","CanvasExecutorGroup","extent_1","tilePixel","getTileRenderTransform","worldOffset","renderMode","replayTypes","hasExecutors","replayState","renderPixelRatio","renderScale","pixelScale","translateTransform","MultiPoint","multiPoint","interpolatePoint","cumulativeLengths","lineStringCoordinateAtM","extrapolate","lo","hi","m0","lineStringsCoordinateAtM","flatMidpoint_","flatMidpointRevision_","LineString","lineString","opt_extrapolate","getCoordinateAt","lineStrings","MultiLineString","multiLineString","midpoints","endss_","flatInteriorPointsRevision_","flatInteriorPoints_","polygons","MultiPolygon","newEndss","multiPolygon","linearRingssArea","linearRingssCenter","prevEnds","lastEnds","type_","flatCoordinates_","flatMidpoints_","properties_","RenderFeature","midpoint","toGeometry","VectorLayer","geoM","fracA","fracB","fracM","geoA","geoB","geoStack","fractionStack","fractions","maxIterations","meridian","lon","frac","parallel","lon2","DEFAULT_STROKE_STYLE","INTERVALS","maxLines","targetSize","showLabels","lonLabelFormatter","latLabelFormatter","lonLabelPosition","latLabelPosition","lonLabelStyle","latLabelStyle","intervals","maxLat_","maxLon_","minLat_","minLon_","maxX_","maxY_","minX_","minY_","targetSize_","maxLines_","meridians_","parallels_","strokeStyle_","fromLonLatTransform_","toLonLatTransform_","projectionCenterLonLat_","bottomLeft_","bottomRight_","topLeft_","topRight_","meridiansLabels_","parallelsLabels_","lonLabelFormatter_","latLabelFormatter_","lonLabelPosition_","latLabelPosition_","lonLabelStyleBase_","lonLabelStyle_","latLabelStyleBase_","latLabelStyle_","drawLabels_","intervals_","loaderFunction","strategyFunction","featurePool_","lineStyle_","loadedExtent_","setRenderOrder","Graticule","realWorldExtent","removeLoadedExtent","renderExtent","equivalentProjection","updateProjectionInfo_","createGraticule_","featuresColl","getFeaturesCollection","poolIndex","minLat","maxLat","getMeridian_","geom","minLon","maxLon","getParallel_","rotationCenter","rotationExtent","unrotatedWidth","unrotatedHeight","startWorld","labelsAtStart","vectorContext","textPoint","getMeridianPoint_","drawFeature","getParallelPoint_","getInterval_","validCenterP","centerLonLat","cnt","centerLon","centerLat","validExtentP","validExtent","addMeridian_","addParallel_","clampedLat","bottom","clampedBottom","clampedTop","clampedLeft","clampedRight","toLonLatTransform","split_1","lonLatCoordinates","worldExtentP","DEFAULT_GRADIENT","gradient","blur","gradient_","handleGradientChanged_","setGradient","setBlur","setRadius","weightFunction_","Heatmap","createLinearGradient","addColorStop","createGradient","getGradient","u_size","u_blurSlope","u_gradientTexture","u_opacity","defaultFeatureProjection","FeatureFormat","setWorldExtent","adaptOptions","transformGeometryWithOptions","power_1","transformExtentWithOptions","layersPBFReader","layerPBFReader","featurePBFReader","readRawFeature","featureClass_","featureClass","geometryName","layerName_","layerName","idProperty_","idProperty","MVT","cmd","coordsLen","currentEnd","cmdLen","rawFeature","readRawGeometry_","getGeometryType","setId","PBF","pbfLayers","pbfLayer","setExtent","createFeature_","renderMode_","setBackground","VectorTileLayer","cloneGeometries","clonedGeometries","opt_geometries","geometries_","changeEventsKeys_","listenGeometriesChange_","GeometryCollection","geometryCollection","setGeometries","geometriesArray","getGeometriesArrayRecursive","simplifiedGeometries","simplified","simplifiedGeometryCollection","setGeometriesArray","unlistenGeometriesChange_","getObject","JSONFeature","readFeatureFromObject","getReadOptions","readFeaturesFromObject","readGeometryFromObject","readProjectionFromObject","writeFeatureObject","writeFeaturesObject","writeGeometryObject","readGeometry","readPointGeometry","readLineStringGeometry","readPolygonGeometry","readMultiPointGeometry","readMultiLineStringGeometry","readMultiPolygonGeometry","readGeometryCollectionGeometry","writeGeometry","geoJSON","writePointGeometry","writeLineStringGeometry","rightHanded","writePolygonGeometry","writeMultiPointGeometry","writeMultiLineStringGeometry","writeMultiPolygonGeometry","writeGeometryCollectionGeometry","extractGeometryName_","extractGeometryName","GeoJSON","geoJSONFeature","geoJSONFeatures","objects","freeExports","freeModule","freeGlobal","punycode","maxInt","regexPunycode","regexNonASCII","regexSeparators","stringFromCharCode","mapDomain","ucs2decode","extra","counter","ucs2encode","digitToBasic","digit","flag","adapt","numPoints","firstTime","baseMinusTMin","basic","oldi","baseMinusT","codePoint","inputLength","encode","handledCPCount","basicLength","q","currentValue","handledCPCountPlusOne","qMinusT","prop","sep","eq","regexp","maxKeys","kstr","vstr","decodeURIComponent","stringifyPrimitive","ks","require$$0","require$$1","Url","slashes","auth","host","port","hostname","query","pathname","path","protocolPattern","portPattern","simplePathPattern","unwise","autoEscape","nonHostChars","hostEndingChars","hostnamePartPattern","hostnamePartStart","unsafeProtocol","hostlessProtocol","slashedProtocol","urlParse","parseQueryString","slashesDenoteHost","util","queryIndex","splitter","uSplit","rest","simplePath","querystring","proto","lowerProto","atSign","hostEnd","hec","parseHost","ipv6Hostname","hostparts","newpart","validParts","notHost","bit","toASCII","ae","esc","escape","qm","relative","resolveObject","tkeys","tk","tkey","rkeys","rk","rkey","relPath","isSourceAbs","isRelAbs","mustEndAbs","removeAllDots","srcPath","psychotic","authInHost","hasTrailingSlash","up","isAbsolute","ParsingError","Scope","bindings","NullType","kind","NumberType","StringType","BooleanType","ColorType","ObjectType","ValueType","CollatorType","FormattedType","ResolvedImageType","itemType","N","valueMemberTypes","checkSubtype","isValidType","provided","allowedTypes","isValidNativeType","kCSSColorTable","clamp_css_byte","clamp_css_float","parse_css_int","parse_css_float","css_hue_to_rgb","m1","m2","css_str","iv","op","ep","fname","Color","rgba","parseCSSColor","Collator","caseSensitive","diacriticSensitive","locale","sensitivity","collator","Intl","lhs","rhs","resolvedLocale","resolvedOptions","FormattedSection","fontStack","textColor","Formatted","sections","section","serialized","unformatted","ResolvedImage","validateRGBA","isValue","mixed","typeOf","Literal","evaluate","eachChild","outputDefined","expectedType","RuntimeError","boolean","Assertion","parsed","FormatExpression","evaluatedContent","content","firstArg","nextTokenMayBeObject","lastExpression","ImageExpression","evaluatedImageName","availableImages","Coercion","parseColor","valueToString","child","geometryTypes","EvaluationContext","globals","featureState","formattedSection","_parseColorCache","canonical","canonicalID","cached","CompoundExpression","_evaluate","definition","definitions","availableOverloads","overloads","signature","signatureContext","ParsingContext","scope","argParseFailed","signatures","actualTypes","CollatorExpression","updateBBox","boxWithinBox","bbox1","bbox2","getTileCoordinates","tilesAtZoom","onBoundary","rayIntersect","pointWithinPolygon","inside","ring","len2","pointWithinPolygons","twoSided","q1","q2","det1","det2","lineIntersectPolygon","vectorP","vectorQ","lineStringWithinPolygon","lineStringWithinPolygons","getTilePolygon","getTilePolygons","updatePoint","polyBBox","worldSize","halfWorldSize","getTilePoints","pointBBox","shifts","tilePoints","getTileLines","lineBBox","tileLines","tileLine","resetBBox","Within","geojson","tilePolygon","tilePolygons","pointsWithinPolygons","linesWithinPolygons","isFeatureConstant","isStateConstant","isGlobalPropertyConstant","Var","boundExpression","expr","_parse","annotate","typeAnnotation","Expr","actual","isConstant","ec","isTypeAnnotation","childrenConstant","findStopLessThanOrEqualTo","stops","nextValue","lowerIndex","upperIndex","currentIndex","Step","labels","outputs","stopCount","labelKey","valueKey","UnitBezier","p1x","p1y","p2x","p2y","bx","ax","by","ay","sampleCurveX","sampleCurveY","sampleCurveDerivativeX","solveCurveX","epsilon","t0","t1","t2","solve","Xn","Zn","deg2rad","rad2deg","xyz2lab","lab2xyz","xyz2rgb","rgb2xyz","rgbToLab","rgbColor","labToRgb","labColor","interpolateHue","lab","interpolateNumber","hcl","hclColor","Interpolate","lower","upper","interpolationFactor","outputLower","outputUpper","controlPoints","exponentialInterpolation","lowerValue","upperValue","difference","Coalesce","requestedImageName","argCount","Let","At","In","IndexOf","fromIndex","Match","inputType","otherwise","groupedByOutput","outputLookup","outputIndex","coerceLabel","labelContext","MAX_SAFE_INTEGER","Case","branches","Slice","beginIndex","endIndex","isComparableType","eqCollate","makeComparison","compareBasic","compareWithCollator","isOrderComparison","hasUntypedArgument","lt","Comparison","Equals","NotEquals","LessThan","GreaterThan","LessThanOrEqual","GreaterThanOrEqual","NumberFormat","currency","minFractionDigits","maxFractionDigits","minimumFractionDigits","expressions","Length","varargs","supportsPropertyExpression","spec","supportsZoomExpression","parameters","supportsInterpolation","interpolated","isFunction","register","typeToString","heatmapDensity","lineProgress","skyRadialProgress","accumulated","E","LN10","isSupportedScript","toUpperCase","StyleExpression","propertySpec","_warningHistory","_evaluator","_defaultValue","_enumValues","evaluateWithoutErrorHandling","isExpression","createExpression","enum","formatted","resolvedImage","getExpectedType","ZoomConstantExpression","_styleExpression","isStateDependent","ZoomDependentExpression","zoomStops","interpolationType","createPropertyExpression","isZoomConstant","zoomCurve","findZoomCurve","childResult","convertLiteral","convertFunction","convertIdentityFunction","zoomAndFeatureDependent","featureDependent","zoomDependent","tokens","convertTokenString","featureFunctionParameters","featureFunctionStops","getFunctionType","getInterpolateOperator","appendStopPair","convertPropertyFunction","fixupDegenerateStepCurve","convertZoomAndPropertyFunction","isStep","convertZoomFunction","colorSpace","getFallback","defaultValue","curve","re","literal","isExpressionFilter","filterSpec","createFilter","needGeometry","convertFilter","compiled","globalProperties","geometryNeeded","filters","convertComparisonOp","convertNegation","convertInOp","convertHasOp","deref","refProperties","ValidationError","__line__","validateConstants","constants","unbundle","valueOf","deepUnbundle","unbundledValue","validateObject","elementSpecs","valueSpec","elementValidators","objectElementValidators","styleSpec","objectKey","elementSpecKey","elementSpec","validateElement","validateSpec","required","validateArray","arraySpec","validateArrayElement","arrayElementValidator","validate","arrayElementSpec","minimum","maximum","$version","function","arrayIndex","validateNumber","specMin","specMax","validateFunction","stopKeyType","previousStopDomainValue","previousStopDomainZoom","functionValueSpec","functionType","stopDomainValues","isZoomFunction","isPropertyFunction","isZoomAndPropertyFunction","validateFunctionStop","validateStopDomainValue","reportValue","validateExpression","expressionContext","expressionObj","propertyKey","propertyType","validateEnum","validateFilter","validateNonExpressionFilter","filter_operator","geometry_type","validateProperty","layerSpec","layerType","transitionMatch","tokenMatch","glyphs","validatePaintProperty","validateLayoutProperty","validateLayer","ref","layerId","otherLayer","sourceType","paint","lineMetrics","validateString","promoteId","validateSource","source_geojson","clusterProperties","mapExpr","reduceExpr","source_video","source_image","validateLight","lightSpec","rootType","validateTerrain","terrain","terrainSpec","validateFog","fog","fogSpec","VALIDATORS","validateStyleMin","latestStyleSpec","$root","validateGlyphsURL","sortErrors","wrapCleanErrors","paintProperty","layoutProperty","$V0","$V1","$V2","$V3","$V4","$V5","$V6","$V7","$V8","$V9","trace","yy","symbols_","terminals_","productions_","performAction","yytext","yyleng","yylineno","yystate","$$","_$","$0","$","first_line","table","defaultActions","parseError","recoverable","vstack","lstack","TERROR","EOF","lexer","sharedState","setInput","yylloc","yyloc","ranges","lex","token","action","newState","yyval","errStr","showPosition","last_line","first_column","last_column","_input","_more","_backtrack","matched","conditionStack","ch","unput","oldLines","backtrack_lexer","less","pastInput","past","upcomingInput","pre","test_match","indexed_rule","backup","tempMatch","rules","_currentRules","flex","popState","topState","pushState","stateStackSize","yy_","$avoiding_name_collisions","YY_START","Parser","readStyle","jsonlint","validateStyle","v8","latest","defaultResolutions","createCanvas","hairSpacePool","applyLetterSpacing","letterSpacing","textWithLetterSpacing","joinSpaceString","getMeasureContext","measureCache","wrapText","em","hardLines","wrappedText","words","maxWidth","word","testLine","line_1","prevWidth","nextWidth","line_2","lineWords","lastWord","renderFeatureCoordinates","emptyObj","zoomObj","getValue","layoutOrPaint","functionCache","value_1","isExpr","compiledExpression","rawExpression","expressionData","renderTransparentEnabled","colorWithOpacity","templateRegEx","fromTemplate","recordLayer","olLayer","glStyle","spriteData","spriteImageUrl","getFonts","spriteImage","spriteImgSize","img_1","mapboxSource","allLayers","derefLayers","layersBySourceLayer","mapboxLayers","patternCache","filterCache","sourceLayer","source_1","textHalo","featureBelongsToLayer","stylesLength","layerData","visibility","minzoom","maxzoom","evaluateFilter","strokeColor","fillIcon","icon_1","setZIndex","icon_cache_key","spriteImageData","createPattern","setWidth","width_1","setLineCap","setLineJoin","setMiterLimit","hasImage","placementAngle","iconImg","skipLabel","styleGeom","iconRotationAlignment","iconSize","iconColor","spriteImageData_1","setAnchor","circleRadius","circleStrokeColor","circleColor","circleStrokeWidth","cache_key","Circle","textLineHeight_1","textSize_1","letterSpacing_1","maxTextWidth_1","fontArray_1","mb2css","textField","chunkFont","i_2","ii_2","textTransform","wrappedLabel","setFont","textAnchor","setPlacement","textHaloWidth","textOffset","textTranslate","vOffset","hOffset","setTextAlign","textRotationAlignment","setRotateWithView","setMaxAngle","setTextBaseline","setOffsetX","setOffsetY","setFill","haloColor","halfTextSize","setStroke","textPadding","loadedFontFamilies","tilejsonCache","fontFamilyRegEx","stripQuotesRegEx","hasFontFamily","styleSheets","styleSheet","cssRules","cssRule","cssText","processedFontFamilies","googleFamilies","googleFonts","fontsKey","googleFontDescriptions","googleFontDescription","fontUrl","querySelector","markup","spriteRegEx","withPath","toSpriteUrl","applyStyle","onChange","sprite","applyStyleFunction","sizeFactor_1","spriteUrl_1","statusText","spritesJson","mapOrLayer","updateStyle","bg","_colorWithOpacity","extentFromTileJSON","bounds","tr","setupVectorSource","glSource","tilejson","tileJSONDoc","getTileJSON","decodeURI","VectorTileSource","mapboxBaseUrl","getMapboxPath","normalizeSpriteUrl","styleUrl","mapboxPath","normalizeGlyphsUrl","normalizeStyleUrl","normalizeSourceUrl","tokenParam","urlObject","searchParams","SourceType","setMaxResolutionFromTileGrid_","sourceId","accessToken","accessTokenParam_","fetchStyle","MapboxVectorLayer","onStyleLoad","handleError","sourceIdOrLayersList","styleSource","configureSource","targetSource","getTileUrlFunction","setTileLoadFunction","getTileLoadFunction","setMaxResolution","ErrorEvent","imageRatio","imageRatio_","VectorImageLayer","parseResult_","styleVariables_","hitDetectionDisabled_","disableHitDetection","WebGLPointsLayer","getSymbolVertexShader","getSymbolFragmentShader","parseStyle","pipeline","contrast","exposure","saturation","gamma","brightness","numVariables","uniformDeclarations","functionDefintions","sources_","handleSourceUpdate_","WebGLTileLayer","parsedStyle","getSourceBandCount_","getSources","onChange_1","renderSources","altSources","DragAndDropEventType","readAsBuffer_","formats_","formatConstructors","dropListenKeys_","source_","DragAndDrop","tryReadFeatures_","DragAndDropEvent","dropArea","handleDrop","handleStop","registerListeners_","unregisterListeners_","files","dataTransfer","FileReader","handleResult_","readAsArrayBuffer","readAsText","dropEffect","lastMagnitude_","DragRotateAndZoom","magnitude","angleDelta","setCenterAndRadius","getRadiusSquared_","DrawEventType","shouldHandle_","downPx_","downTimeout_","lastDragTime_","pointerType_","freehand_","snapTolerance_","snapTolerance","getMode","stopClick_","stopClick","minPoints_","minPoints","maxPoints_","maxPoints","finishCondition_","finishCondition","Constructor_1","mode_1","squaredLength","squaredCoordinateDistance","dragVertexDelay_","dragVertexDelay","finishCoordinate_","sketchFeature_","sketchPoint_","sketchCoords_","sketchLine_","sketchLineCoords_","squaredClickTolerance_","clickTolerance","overlay_","freehandCondition_","freehand","freehandCondition","updateState_","Draw","move","addToDrawing_","getPointerCount","startDrawing_","startingToDraw","finishDrawing","atFinish_","abortDrawing","downPx","clickPx","modifyDrawing_","createOrUpdateSketchPoint_","at","potentiallyDone","potentiallyFinishCoordinates","mode","sketchCoords","finishCoordinate","finishPixel","updateSketchFeatures_","getLinearRing","sketchLineGeom","DrawEvent","createOrUpdateCustomSketchLine_","sketchFeature","abortDrawing_","newDrawing","ending","sketchFeatures","overlaySource","ExtentEventType","getDefaultPointerStyleFunction","getPointHandler","fixedPoint","getEdgeHandler","fixedP1","fixedP2","pointerHandler_","pixelTolerance_","pixelTolerance","snappedToVertex_","extentFeature_","vertexFeature_","extentOverlay_","boxStyle","vertexOverlay_","pointerStyle","Extent","pixelCoordinate","getExtentInternal","segments","getSegments","closestSegment","vertex","vertexPixel","coordinateDistance","pixel1","pixel2","squaredDist1","squaredDist2","dist","snapToVertex_","createOrUpdatePointerFeature_","extentFeature","vertexFeature","getOpposingPoint","x_","y_","createOrUpdateExtentFeature_","ExtentEvent","tempExtent","tempSegment","ModifyEventType","compareIndexes","projectedDistanceToSegmentDataSquared","pointCoordinates","segmentData","distanceToCenterSquared","distanceToCircumference","closestOnSegmentData","boundHandleFeatureChange_","defaultDeleteCondition_","deleteCondition_","deleteCondition","insertVertexCondition_","insertVertexCondition","vertexSegments_","lastPixel_","ignoreNextSingleClick_","featuresBeingModified_","rBush_","changingFeature_","dragSegments_","SEGMENT_WRITERS_","writePointGeometry_","writeLineStringGeometry_","writePolygonGeometry_","writeMultiPointGeometry_","writeMultiLineStringGeometry_","writeMultiPolygonGeometry_","writeCircleGeometry_","writeGeometryCollectionGeometry_","hitDetection_","handleSourceAdd_","handleSourceRemove_","addFeature_","handleFeatureAdd_","handleFeatureRemove_","lastPointerEvent_","snapToPointer_","snapToPointer","Modify","writer","handlePointerAtPixel_","ss","ModifyEvent","removeFeatureSegmentData_","rBush","nodesToRemove","nodeToRemove","removeFeature_","centerSegmentData","circumferenceSegmentData","featureSegments","removePoint","willModifyFeatures_","dragSegment","setGeometryCoordinates_","createOrUpdateVertexFeature_","insertVertices","vertexExtent","segmentDataMatches","componentSegments","segmentDataMatch","insertVertex_","opt_coordinate","nodes","hitPointGeometry","vertexSegments","geometryUid","rTree","updateSegmentIndices_","newSegmentData","newSegmentData2","removeVertex_","component","newIndex","dragSegments","segmentsByFeature","deleted","SelectEventType","selected","deselected","originalFeatureStyles","boundAddFeature_","boundRemoveFeature_","addCondition_","addCondition","removeCondition_","removeCondition","toggleCondition_","toggleCondition","multi_","multi","filter_","hitTolerance_","layers_1","layerFilter_","featureLayerAssociation_","Select","restorePreviousStyle_","applySelectedStyle_","getAllLayers","hasFeature","addFeatureLayerAssociation_","removeFeatureLayerAssociation_","SelectEvent","getFeatureFromEvent","vertex_","edge_","featuresListenerKeys_","featureChangeListenerKeys_","indexedFeaturesExtents_","pendingFeatures_","GEOMETRY_SEGMENTERS_","segmentPointGemetry_","segmentLineStringGemetry_","segmentPolygonGemetry_","segmentMultiPointGemetry_","segmentMultiLineStringGemetry_","segmentMultiPolygonGemetry_","segmentGeometryCollectionGemetry_","segmentCircleGemetry_","Snap","opt_listen","feature_uid","segmenter","segmentsData","snapTo","updateFeature_","featuresToUpdate","opt_unlisten","unregister","nodesToRemove_1","currentMap","getFeatures_","forEachFeatureRemove_","forEachFeatureAdd_","segmentsLength","closestVertex","projectedCoordinate","squaredPixelTolerance","getResult","tempVertexCoord","segmentStart","segmentEnd","TranslateEventType","startCoordinate","lastCoordinate_","startCoordinate_","lastFeature_","handleActiveChanged_","Translate","featuresAtPixel_","TranslateEvent","newCoordinate","deltaX_1","deltaY_1","oldMap","flipXY","opt_destOffset","destOffset","GEOMETRY_READERS","getGeometryLayout","paths","GEOMETRY_WRITERS","esriJSONPolygon","flatRing","outerRings","holes","hole","outerRing","convertRings","_a","_b","geometryReader","hasZ","hasM","getHasZM","geometryWriter","esriJSON","hasZM","EsriJSON","opt_idField","esriJSONFeature","esriJSONFeatures","objectIdFieldName","wkid","XMLFeature","readFeatureFromDocument","readFeatureFromNode","readFeaturesFromDocument","readFeaturesFromNode","ELEMENT_NODE","readGeometryFromDocument","readGeometryFromNode","readProjectionFromDocument","readProjectionFromNode","writeFeatureNode","serializeToString","writeFeaturesNode","writeGeometryNode","GMLNS","ONLY_WHITESPACE_RE","featureType","featureNS","srsName","schemaLocation","FEATURE_COLLECTION_PARSERS","namespace","readFeaturesInternal","GMLBase","ft","ns","featureTypes","readFeatureElement","GEOMETRY_PARSERS","asFeature","readGeometryElement","readFeatureElementInternal","_content_","attName","fid","readFlatCoordinatesFromNode","MULTIPOINT_PARSERS","MULTILINESTRING_PARSERS","MULTIPOLYGON_PARSERS","POINTMEMBER_PARSERS","LINESTRINGMEMBER_PARSERS","POLYGONMEMBER_PARSERS","GEOMETRY_FLAT_COORDINATES_PARSERS","flatLinearRings","FLAT_LINEAR_RINGS_PARSERS","pointMemberParser","lineStringMemberParser","polygonMemberParser","readLineString","readPolygon","RING_PARSERS","readFlatLinearRing","readBooleanString","readDateTime","dateTime","readDecimal","readDecimalString","readPositiveInteger","readNonNegativeIntegerString","writeBooleanTextNode","bool","writeStringTextNode","writeCDATASection","createCDATASection","writeDateTimeTextNode","date","getUTCFullYear","getUTCMonth","getUTCDate","getUTCHours","getUTCMinutes","getUTCSeconds","writeDecimalTextNode","toPrecision","writeNonNegativeIntegerTextNode","nonNegativeInteger","MULTIGEOMETRY_TO_MEMBER_NODENAME","GML2","containerSrs","coordsGroups","BOX_PARSERS_","flatLinearRing","multiSurface","surface","multiCurve","writeGeometryElement","createCoordinatesNode_","writeCoordinates_","writeCurveSegments_","GEOMETRY_NODE_FACTORY_","writeCurveOrLineString","getLineStrings","LINESTRINGORCURVEMEMBER_SERIALIZERS","MULTIGEOMETRY_MEMBER_NODE_FACTORY_","GEOMETRY_SERIALIZERS","getCoords_","getLinearRings","RING_SERIALIZERS","RING_NODE_FACTORY_","patches","writeSurfacePatches_","exteriorWritten","writeSurfaceOrPolygon","writeLinearRing","opt_srsName","opt_hasZ","POINTMEMBER_SERIALIZERS","writePoint","getPolygons","SURFACEORPOLYGONMEMBER_SERIALIZERS","ENVELOPE_SERIALIZERS","readFlatCoordinates","innerBoundaryIsParser","outerBoundaryIsParser","readBox","writeMultiCurveOrLineString","writeMultiPoint","writeMultiSurfaceOrPolygon","writeEnvelope","writeLineStringOrCurveMember","writeRing","writePointMember","writeSurfaceOrPolygonMember","surface_","curve_","multiCurve_","multiSurface_","GML3","MULTICURVE_PARSERS","MULTISURFACE_PARSERS","CURVEMEMBER_PARSERS","SURFACEMEMBER_PARSERS","PATCHES_PARSERS","SEGMENTS_PARSERS","SURFACE_PARSERS","CURVE_PARSERS","ENVELOPE_PARSERS","contextDimension","dim","srsDimension","writePos_","posList","writePosList_","writeFeatureElement","setAttributeNS","writeFeatureMembers_","readFlatPos","readFlatPosList","interiorParser","exteriorParser","readSurface","readMultiSurface","readCurve","readMultiCurve","readEnvelope","curveMemberParser","surfaceMemberParser","readPatch","readSegment","readPolygonPatch","readLineStringSegment","writeFeatures","GML","GML32","NAMESPACE_URIS","FEATURE_READER","readRte","readTrk","readWpt","GPX_PARSERS","LINK_PARSERS","GPX_SERIALIZERS","RTE_SEQUENCE","RTE_SERIALIZERS","TRK_SEQUENCE","TRK_SERIALIZERS","writeWptType","readExtensions_","readExtensions","GPX","extensionsNode","featureReader","handleReadExtensions_","gpx","GPX_NODE_FACTORY","RTE_PARSERS","parseLink","parseExtensions","RTEPT_PARSERS","rteValues","layoutOptions","appendCoordinate","TRK_PARSERS","TRKSEG_PARSERS","TRKPT_PARSERS","trkValues","WPT_PARSERS","LINK_SEQUENCE","LINK_SERIALIZERS","writeLink","RTEPT_TYPE_SEQUENCE","TRKSEG_SERIALIZERS","TRKSEG_NODE_FACTORY","WPT_TYPE_SEQUENCE","WPT_TYPE_SERIALIZERS","GEOMETRY_TYPE_TO_NODENAME","applyLayoutOptions","TextFeature","readFeatureFromText","readFeaturesFromText","readGeometryFromText","readProjectionFromText","writeFeatureText","writeFeaturesText","writeGeometryText","IGCZ","B_RECORD_RE","H_RECORD_RE","HFDTE_RECORD_RE","NEWLINE_RE","altitudeMode_","altitudeMode","IGC","year","month","day","lastDateTime","hour","minute","second","UTC","DEFAULT_COLOR","DEFAULT_IMAGE_STYLE_ANCHOR","DEFAULT_IMAGE_STYLE_ANCHOR_X_UNITS","DEFAULT_IMAGE_STYLE_ANCHOR_Y_UNITS","DEFAULT_IMAGE_STYLE_SIZE","DEFAULT_IMAGE_STYLE_SRC","GX_NAMESPACE_URIS","ICON_ANCHOR_UNITS_MAP","PLACEMARK_PARSERS","extendedDataParser","regionParser","readMultiGeometry","readLinearRing","readPoint","styleMapValue","readStyleMapValue","placemarkObject","readStyleURL","GX_MULTITRACK_GEOMETRY_PARSERS","readGxTrack","NETWORK_LINK_PARSERS","readURI","REGION_PARSERS","LAT_LON_ALT_BOX_PARSERS","regionObject","LOD_PARSERS","lodObject","KML_SEQUENCE","KML_SERIALIZERS","DOCUMENT_SERIALIZERS","DOCUMENT_NODE_FACTORY","writePlacemark","DEFAULT_FILL_STYLE","DEFAULT_NO_IMAGE_STYLE","DEFAULT_IMAGE_STYLE","DEFAULT_TEXT_STROKE_STYLE","DEFAULT_TEXT_STYLE","DEFAULT_STYLE","TEXTAREA","DEFAULT_STYLE_ARRAY","scaleForSize","defaultIconUrlFunction","defaultStyle_","defaultStyle","extractStyles_","extractStyles","writeStyles_","writeStyles","sharedStyles_","showPointNames_","showPointNames","iconUrlFunction_","iconUrlFunction","KML","readDocumentOrFolder_","readPlacemark_","readSharedStyle_","readSharedStyleMap_","sharedStyles","drawName","multiGeometryPoints","featureStyle","findStyle","nameStyle","foundStyle","imageScale","setScale","createNameStyleFunction","createFeatureStyleFunction","styleUri","baseURI","fs","readNameFromDocument","readNameFromNode","name_2","networkLinks","readNetworkLinksFromDocument","readNetworkLinksFromNode","regions","readRegionFromDocument","readRegionFromNode","kml","xmlnsUri","styleValue","readColor","hexColor","readScale","STYLE_MAP_PARSERS","pairObject","PAIR_PARSERS","ICON_STYLE_PARSERS","iconObject","ICON_PARSERS","xunits","yunits","LABEL_STYLE_PARSERS","LINE_STYLE_PARSERS","POLY_STYLE_PARSERS","FLAT_LINEAR_RING_PARSERS","GX_TRACK_PARSERS","whens","when","gxTrackObject","EXTRUDE_AND_ALTITUDE_MODE_PARSERS","MULTI_GEOMETRY_PARSERS","multiGeometry","homogeneous","setCommonGeometryProperties","innerBoundaryFlatLinearRings","INNER_BOUNDARY_IS_PARSERS","OUTER_BOUNDARY_IS_PARSERS","STYLE_PARSERS","styleObject","IconObject","drawIcon","hotSpot","imageStyle_1","imageScale_1","listener_1","imageSize_1","resizeScale","outline","hasExtrude","hasTessellate","hasAltitudeMode","extrudes","tessellates","altitudeModes","DATA_PARSERS","EXTENDED_DATA_PARSERS","featureObject","SCHEMA_DATA_PARSERS","writeColorTextNode","abgr","hex","EXTENDEDDATA_NODE_SERIALIZERS","pair","DATA_NODE_FACTORY","ICON_SEQUENCE","ICON_SERIALIZERS","GX_NODE_FACTORY","ICON_STYLE_SEQUENCE","ICON_STYLE_SERIALIZERS","vec2","writeScaleTextNode","LABEL_STYLE_SEQUENCE","LABEL_STYLE_SERIALIZERS","LINE_STYLE_SEQUENCE","LINE_STYLE_SERIALIZERS","GEOMETRY_NODE_FACTORY","POINT_NODE_FACTORY","LINE_STRING_NODE_FACTORY","LINEAR_RING_NODE_FACTORY","POLYGON_NODE_FACTORY","MULTI_GEOMETRY_SERIALIZERS","writePrimitiveGeometry","writePolygon","writeMultiGeometry","BOUNDARY_IS_SERIALIZERS","writeBoundaryIs","PLACEMARK_SERIALIZERS","namesAndValues","names","pointStyles","lineStyles","polyStyles","STYLE_SEQUENCE","STYLE_SERIALIZERS","PLACEMARK_SEQUENCE","EXTENDEDDATA_NODE_FACTORY","styleArray","PRIMITIVE_GEOMETRY_SEQUENCE","PRIMITIVE_GEOMETRY_SERIALIZERS","POLY_STYLE_SEQUENCE","POLYGON_SERIALIZERS","INNER_BOUNDARY_NODE_FACTORY","OUTER_BOUNDARY_NODE_FACTORY","POLY_STYLE_SERIALIZERS","iconProperties","WAY_PARSERS","ndrefs","readTag","PARSERS","NODE_PARSERS","ways","OSMXML","XML","readFromDocument","readFromNode","readHref","SERVICE_IDENTIFICATION_PARSERS","SERVICE_PROVIDER_PARSERS","OPERATIONS_METADATA_PARSERS","OWS","owsObject","ADDRESS_PARSERS","ALLOWED_VALUES_PARSERS","CONSTRAINT_PARSERS","CONTACT_INFO_PARSERS","PHONE_PARSERS","DCP_PARSERS","HTTP_PARSERS","REQUEST_METHOD_PARSERS","OPERATION_PARSERS","SERVICE_CONTACT_PARSERS","encodeDeltas","numbers","opt_factor","lastNumbers","encodeFloats","decodeDeltas","encoded","decodeFloats","encodeSignedIntegers","decodeSignedIntegers","encodeUnsignedIntegers","decodeUnsignedIntegers","encodeUnsignedInteger","factor_","geometryLayout_","geometryLayout","Polyline","TopoJSON","topoJSONTopology","arcs","transformArc","transformArcs","topoJSONFeatures","objectName","readFeaturesFromGeometryCollection","readFeatureFromGeometry","transformVertex","concatenateArcs","polyArray","ringCoords","indices","tagName_","Filter","LogicalNary","Spatial","unit","propertyName","opt_matchCase","matchCase","ComparisonBinary","lowerBoundary","upperBoundary","opt_wildCard","opt_singleChar","opt_escapeChar","wildCard","singleChar","escapeChar","rid","and","And","Bbox","TRANSACTION_SUMMARY_PARSERS","TRANSACTION_RESPONSE_PARSERS","readTransactionSummary","readInsertResults","QUERY_SERIALIZERS","TRANSACTION_SERIALIZERS","writeFeature","writeUpdate","writeDelete","writeProperty","writeNative","FEATURE_PREFIX","XMLNS","OGCNS","WFSNS","FESNS","SCHEMA_LOCATIONS","GML_FORMATS","featureType_","featureNS_","gmlFormat_","gmlFormat","schemaLocation_","WFS","readTransactionResponseFromDocument","readTransactionResponseFromNode","readFeatureCollectionMetadataFromDocument","readFeatureCollectionMetadataFromNode","outputFormat","maxFeatures","resultType","viewParams","featurePrefix","propertyNames","combineBboxAndFilter","writeGetFeature","completeFilter","bboxFilter","bboxFilterFn","andFilterFn","inserts","updates","deletes","baseObj","gmlOptions","gmlVersion","createTransactionRequest","serializeTransactionRequest","nativeElements","OGC_FID_PARSERS","fidParser","INSERT_RESULTS_PARSERS","writeOgcFidFilter","getTypeName","prefix","typeName","nativeElement","vendorId","safeToIgnore","GETFEATURE_SERIALIZERS","writeQuery","writeDuringFilter","writeLogicalFilter","writeNotFilter","writeBboxFilter","writeSpatialFilter","writeDWithinFilter","writeComparisonFilter","writeIsNullFilter","writeIsBetweenFilter","writeIsLikeFilter","typeNameAttr","getFilterNS","writeFilterCondition","getTagName","writePropertyName","writeExpression","timePeriod","writeTimeInstant","writeLiteral","timeInstant","timePosition","WKBGeometryType","view_","pos_","initialized_","isLittleEndian_","hasZ_","hasM_","srid_","layout_","WkbReader","isLittleEndian","numRings","expectedTypeId","wkbType","wkbTypeThousandth","hasSRID","typeId","readMultiPoint","readMultiLineString","readMultiPolygon","readGeometryCollection","readWkbPayload","readWkbHeader","readWkbCollection","readWkbBlock","isEWKB_","ewkb","writeQueue_","nodata_","X","Y","Z","WkbWriter","coordsObj","axis","_i","writeUint32","writeLineString","writeUint8","writeWkbHeader","geoms","findMinimumLayout","wkblut","geomType","writeMultiLineString","writeMultiPolygon","writeGeometryCollection","setUint8","setUint32","setFloat64","getDataView","decodeHexString","splitCollection","viewCache_","hex_","littleEndian_","ewkb_","nodataZ_","nodataZ","nodataM_","nodataM","WKB","getSrid","getBuffer","encodeHexString","GeometryConstructor","EMPTY","TokenType","WKTGeometryType","wkt","index_","Lexer","opt_decimal","nextChar_","isNumeric_","readNumber_","isAlpha_","readText_","isWhiteSpace_","nextToken","scientificNotation","lexer_","token_","isMatch","isTokenType","consume_","parseGeometry_","dimToken","dimInfo","formatErrorMessage_","parsePoint_","parsePointList_","parseLineStringTextList_","parsePointTextList_","parsePolygonTextList_","parsePointText_","parseLineStringText_","parsePolygonText_","parseGeometryLayout_","isEmptyGeometry_","parseGeometryCollectionText_","parseMultiPointText_","parseMultiLineStringText_","parseMultiPolygonText_","splitCollection_","WKT","parse_","encodePointGeometry","encodeLineStringGeometry","encodePolygonGeometry","GeometryEncoder","components","enc","geometryEncoder","encodeGeometryLayout","SERVICE_PARSERS","CAPABILITY_PARSERS","REQUEST_PARSERS","EXCEPTION_PARSERS","layerObject","LAYER_PARSERS","readLayer","WMSCapabilities","wmsCapabilityObject","readKeywordList","CONTACT_INFORMATION_PARSERS","CONTACT_PERSON_PARSERS","CONTACT_ADDRESS_PARSERS","geographicBoundingBox","EX_GEOGRAPHIC_BOUNDING_BOX_PARSERS","westBoundLongitude","southBoundLatitude","eastBoundLongitude","northBoundLatitude","ATTRIBUTION_PARSERS","authorityObject","readFormatOnlineresource","metadataObject","readSizedFormatOnlineresource","readOperationType","OPERATIONTYPE_PARSERS","DCPTYPE_PARSERS","FORMAT_ONLINERESOURCE_PARSERS","KEYWORDLIST_PARSERS","parentLayerObject","queryable","cascaded","noSubsets","fixedWidth","fixedHeight","childValue","parentValue","formatOnlineresource","WMSGetFeatureInfo","layerElement","layerFeatures","gmlFeatures","readFeatures_","OWS_NAMESPACE_URIS","CONTENTS_PARSERS","owsParser_","WMTSCapabilities","WMTSCapabilityObject","TMS_PARSERS","isDefault","TMS_LINKS_PARSERS","DIMENSION_PARSERS","resourceType","readBoundingBox","legend","TMS_LIMITS_LIST_PARSERS","TMS_LIMITS_PARSERS","WGS84_BBOX_READERS","readCoordinates","TM_PARSERS","events","FullScreenEventType","isFullScreenSupported","requestFullscreen","fullscreenEnabled","isFullScreen","fullscreenElement","requestFullScreen","isInFullscreen_","boundHandleMapTargetChange_","handleMapTargetChange_","cssClassName_","documentListeners_","activeClassName_","activeClassName","inactiveClassName_","inactiveClassName","labelNode_","labelActive","labelActiveNode_","button_","setClassName_","FullScreen","handleFullScreen_","exitFullscreen","exitFullScreen","requestFullScreenWithKeys","wasInFullscreen","fullscreen","_c","_d","handleFullScreenChange_","PROJECTION","COORDINATE_FORMAT","coordinateFormat","setCoordinateFormat","renderOnMouseOut","placeholder","undefinedHTML","placeholder_","renderOnMouseOut_","renderedHTML_","mapProjection_","MousePosition","updateHTML_","handleMouseMove","handleMouseOut","html","getCoordinateFormat","MAX_RATIO","MIN_RATIO","ControlledMap","boundHandleRotationChanged_","handleRotationChanged_","viewExtent_","ovmapDiv_","ovmap_","ovmap","addLayer","boxSizing","boxOverlay_","addOverlay","overlayBox","mousePosition","getEventCoordinateInternal","endMoving","OverviewMap","oldView","unbindView_","handleMapPropertyChange_","bindView_","resetExtent_","updateBoxAfterOvmapIsRendered_","newView","equalsExtent","ovmapSize","ovextent","topLeftPixel","bottomRightPixel","boxWidth","boxHeight","ovmapWidth","ovmapHeight","recenter_","ovview","ovresolution","ovmapPostrenderKey_","updateBox_","validateExtent_","UNITS_PROP","LEADING_DIGITS","DEFAULT_DPI","bar","innerElement_","viewState_","minWidth_","minWidth","renderedWidth_","handleUnitsChanged_","setUnits","scaleBar_","scaleBarSteps_","scaleBarText_","dpi_","ScaleLine","pointResolutionUnits","ProjUnits","nominalCount","suffix","metersPerDegree","decimalCount","createScaleBar","mapScale","getScaleForResolution","scaleSteps","stepWidth","createMarker","createStepText","isLast","lengthString","Direction","currentResolution_","direction_","heightLimit_","widthLimit_","startX_","startY_","thumbSize_","sliderInitialized_","thumbElement","containerElement","handleDraggerStart_","handleDraggerDrag_","handleDraggerEnd_","handleContainerClick_","ZoomSlider","containerWidth","containerHeight","containerStyle","thumb","thumbStyle","thumbWidth","thumbHeight","relativePosition","getRelativePosition_","getResolutionForPosition_","drag","getPositionForResolution_","getResolutionForValueFunction","getValueForResolutionFunction","initSlider_","setThumbPosition_","ZoomToExtent","handleZoomToExtent","ol","$ol$AssertionError","$ol$Collection","_ol_Collection$CollectionEvent","$ol$DataTile","$ol$Disposable","$ol$Feature","_ol_Feature$createStyleFunction","$ol$Geolocation","$ol$Image","_ol_Image$listenImage","$ol$ImageBase","$ol$ImageCanvas","$ol$ImageTile","$ol$Kinetic","$ol$Map","$ol$MapBrowserEvent","$ol$MapBrowserEventHandler","$ol$MapEvent","$ol$Object","_ol_Object$ObjectEvent","$ol$Observable","_ol_Observable$unByKey","$ol$Overlay","$ol$PluggableMap","$ol$Tile","$ol$TileCache","$ol$TileQueue","_ol_TileQueue$getTilePriority","$ol$TileRange","_ol_TileRange$createOrUpdate","$ol$VectorRenderTile","$ol$VectorTile","$ol$View","_ol_View$createCenterConstraint","_ol_View$createResolutionConstraint","_ol_View$createRotationConstraint","_ol_View$isNoopAnimation","_ol_array$binarySearch","_ol_array$equals","_ol_array$extend","_ol_array$find","_ol_array$findIndex","_ol_array$includes","_ol_array$isSorted","_ol_array$linearFindNearest","_ol_array$numberSafeCompareFunction","_ol_array$reverseSubArray","stableSort","compareFnc","asserts","_ol_asserts$assert","centerconstraint","_ol_centerconstraint$createExtent","_ol_centerconstraint$none","_ol_color$asArray","_ol_color$asString","_ol_color$fromString","_ol_color$isStringColor","_ol_color$normalize","_ol_color$toString","colorlike","_ol_colorlike$asColorLike","$ol$control$Attribution","$ol$control$Control","$ol$control$FullScreen","$ol$control$MousePosition","$ol$control$OverviewMap","$ol$control$Rotate","$ol$control$ScaleLine","$ol$control$Zoom","$ol$control$ZoomSlider","$ol$control$ZoomToExtent","_ol_control$defaults","_ol_coordinate$add","_ol_coordinate$closestOnCircle","_ol_coordinate$closestOnSegment","createStringXY","_ol_coordinate$degreesToStringHDMS","_ol_coordinate$distance","_ol_coordinate$equals","_ol_coordinate$format","_ol_coordinate$getWorldsAway","_ol_coordinate$rotate","_ol_coordinate$scale","_ol_coordinate$squaredDistance","_ol_coordinate$squaredDistanceToSegment","toStringHDMS","_ol_coordinate$toStringXY","_ol_coordinate$wrapX","css","_ol_css$CLASS_COLLAPSED","_ol_css$CLASS_CONTROL","_ol_css$CLASS_HIDDEN","_ol_css$CLASS_SELECTABLE","_ol_css$CLASS_UNSELECTABLE","_ol_css$CLASS_UNSUPPORTED","_ol_css$cssOpacity","_ol_css$getFontParameters","dom","_ol_dom$createCanvasContext2D","_ol_dom$outerHeight","_ol_dom$outerWidth","_ol_dom$removeChildren","_ol_dom$removeNode","_ol_dom$replaceChildren","_ol_dom$replaceNode","_ol_easing$easeIn","_ol_easing$easeOut","_ol_easing$inAndOut","_ol_easing$linear","upAndDown","$ol$events$Event","_ol_events_Event$stopPropagation","$ol$events$Target","_ol_events_condition$all","_ol_events_condition$altKeyOnly","_ol_events_condition$altShiftKeysOnly","_ol_events_condition$always","click","doubleClick","_ol_events_condition$focus","_ol_events_condition$focusWithTabindex","_ol_events_condition$mouseActionButton","_ol_events_condition$mouseOnly","_ol_events_condition$never","_ol_events_condition$noModifierKeys","penOnly","pointerEvt","platformModifierKeyOnly","pointerMove","_ol_events_condition$primaryAction","_ol_events_condition$shiftKeyOnly","_ol_events_condition$singleClick","_ol_events_condition$targetNotEditable","touchOnly","_ol_events$listen","_ol_events$listenOnce","_ol_events$unlistenByKey","_ol_extent$applyTransform","_ol_extent$approximatelyEquals","_ol_extent$boundingExtent","_ol_extent$buffer","_ol_extent$clone","_ol_extent$closestSquaredDistanceXY","_ol_extent$containsCoordinate","_ol_extent$containsExtent","_ol_extent$containsXY","_ol_extent$coordinateRelationship","_ol_extent$createEmpty","_ol_extent$createOrUpdate","_ol_extent$createOrUpdateEmpty","_ol_extent$createOrUpdateFromCoordinate","createOrUpdateFromCoordinates","_ol_extent$createOrUpdateFromFlatCoordinates","createOrUpdateFromRings","_ol_extent$equals","_ol_extent$extend","_ol_extent$extendCoordinate","_ol_extent$extendCoordinates","_ol_extent$extendFlatCoordinates","_ol_extent$extendRings","_ol_extent$extendXY","_ol_extent$forEachCorner","_ol_extent$getArea","_ol_extent$getBottomLeft","_ol_extent$getBottomRight","_ol_extent$getCenter","_ol_extent$getCorner","getEnlargedArea","_ol_extent$getForViewAndSize","_ol_extent$getHeight","_ol_extent$getIntersection","getIntersectionArea","getMargin","_ol_extent$getTopLeft","_ol_extent$getTopRight","_ol_extent$getWidth","_ol_extent$intersects","_ol_extent$intersectsSegment","_ol_extent$isEmpty","_ol_extent$returnOrUpdate","_ol_extent$scaleFromCenter","_ol_extent$wrapX","featureloader","_ol_featureloader$loadFeaturesXhr","setWithCredentials","xhrWithCredentials","_ol_featureloader$xhr","$ol$format$EsriJSON","$ol$format$Feature","_ol_format_Feature$transformExtentWithOptions","_ol_format_Feature$transformGeometryWithOptions","$ol$format$GML","$ol$format$GML2","$ol$format$GML3","$ol$format$GML32","$ol$format$GMLBase","_ol_format_GMLBase$GMLNS","$ol$format$GPX","$ol$format$GeoJSON","$ol$format$IGC","$ol$format$IIIFInfo","$ol$format$JSONFeature","$ol$format$KML","getDefaultFillStyle","getDefaultImageStyle","getDefaultStrokeStyle","getDefaultStyle","getDefaultStyleArray","getDefaultTextStyle","_ol_format_KML$readFlatCoordinates","$ol$format$MVT","$ol$format$OSMXML","$ol$format$OWS","$ol$format$Polyline","_ol_format_Polyline$decodeDeltas","_ol_format_Polyline$decodeFloats","_ol_format_Polyline$decodeSignedIntegers","_ol_format_Polyline$decodeUnsignedIntegers","_ol_format_Polyline$encodeDeltas","_ol_format_Polyline$encodeFloats","_ol_format_Polyline$encodeSignedIntegers","_ol_format_Polyline$encodeUnsignedInteger","_ol_format_Polyline$encodeUnsignedIntegers","$ol$format$TextFeature","$ol$format$TopoJSON","$ol$format$WFS","writeFilter","opt_version","$ol$format$WKB","$ol$format$WKT","$ol$format$WMSCapabilities","$ol$format$WMSGetFeatureInfo","$ol$format$WMTSCapabilities","$ol$format$XML","$ol$format$XMLFeature","$ol$format$filter$And","$ol$format$filter$Bbox","$ol$format$filter$Comparison","$ol$format$filter$ComparisonBinary","Contains","$ol$format$filter$Contains","DWithin","$ol$format$filter$DWithin","Disjoint","$ol$format$filter$Disjoint","During","$ol$format$filter$During","EqualTo","$ol$format$filter$EqualTo","$ol$format$filter$Filter","$ol$format$filter$GreaterThan","GreaterThanOrEqualTo","$ol$format$filter$GreaterThanOrEqualTo","Intersects","$ol$format$filter$Intersects","IsBetween","$ol$format$filter$IsBetween","IsLike","$ol$format$filter$IsLike","IsNull","$ol$format$filter$IsNull","$ol$format$filter$LessThan","LessThanOrEqualTo","$ol$format$filter$LessThanOrEqualTo","$ol$format$filter$LogicalNary","Not","$ol$format$filter$Not","NotEqualTo","$ol$format$filter$NotEqualTo","Or","$ol$format$filter$Or","ResourceId","$ol$format$filter$ResourceId","$ol$format$filter$Spatial","$ol$format$filter$Within","_ol_format_filter$and","_ol_format_filter$bbox","between","disjoint","during","dwithin","equalTo","greaterThan","greaterThanOrEqualTo","isNull","lessThan","lessThanOrEqualTo","like","not","notEqualTo","or","resourceId","within","xlink","_ol_format_xlink$readHref","xsd","_ol_format_xsd$readBoolean","_ol_format_xsd$readBooleanString","_ol_format_xsd$readDateTime","_ol_format_xsd$readDecimal","_ol_format_xsd$readDecimalString","_ol_format_xsd$readNonNegativeIntegerString","_ol_format_xsd$readPositiveInteger","_ol_format_xsd$readString","_ol_format_xsd$writeBooleanTextNode","_ol_format_xsd$writeCDATASection","_ol_format_xsd$writeDateTimeTextNode","_ol_format_xsd$writeDecimalTextNode","_ol_format_xsd$writeNonNegativeIntegerTextNode","_ol_format_xsd$writeStringTextNode","_ol_functions$FALSE","_ol_functions$TRUE","_ol_functions$VOID","_ol_functions$memoizeOne","_ol_functions$toPromise","$ol$geom$Circle","$ol$geom$Geometry","$ol$geom$GeometryCollection","$ol$geom$LineString","$ol$geom$LinearRing","$ol$geom$MultiLineString","$ol$geom$MultiPoint","$ol$geom$MultiPolygon","$ol$geom$Point","$ol$geom$Polygon","_ol_geom_Polygon$circular","_ol_geom_Polygon$fromCircle","_ol_geom_Polygon$fromExtent","_ol_geom_Polygon$makeRegular","$ol$geom$SimpleGeometry","_ol_geom_SimpleGeometry$getStrideForLayout","_ol_geom_SimpleGeometry$transformGeom2D","_ol_geom_flat_area$linearRing","_ol_geom_flat_area$linearRings","_ol_geom_flat_area$linearRingss","_ol_geom_flat_center$linearRingss","closest","_ol_geom_flat_closest$arrayMaxSquaredDelta","_ol_geom_flat_closest$assignClosestArrayPoint","_ol_geom_flat_closest$assignClosestMultiArrayPoint","_ol_geom_flat_closest$assignClosestPoint","_ol_geom_flat_closest$maxSquaredDelta","_ol_geom_flat_closest$multiArrayMaxSquaredDelta","_ol_geom_flat_contains$linearRingContainsExtent","_ol_geom_flat_contains$linearRingContainsXY","_ol_geom_flat_contains$linearRingsContainsXY","_ol_geom_flat_contains$linearRingssContainsXY","deflate","_ol_geom_flat_deflate$deflateCoordinate","_ol_geom_flat_deflate$deflateCoordinates","_ol_geom_flat_deflate$deflateCoordinatesArray","_ol_geom_flat_deflate$deflateMultiCoordinatesArray","flip","_ol_geom_flat_flip$flipXY","geodesic","greatCircleArc","geoProjection","cosLat1","sinLat1","cosLat2","sinLat2","cosDeltaLon","sinDeltaLon","D","cosD","sinD","_ol_geom_flat_geodesic$meridian","_ol_geom_flat_geodesic$parallel","inflate","_ol_geom_flat_inflate$inflateCoordinates","_ol_geom_flat_inflate$inflateCoordinatesArray","_ol_geom_flat_inflate$inflateMultiCoordinatesArray","interiorpoint","_ol_geom_flat_interiorpoint$getInteriorPointOfArray","_ol_geom_flat_interiorpoint$getInteriorPointsOfMultiArray","_ol_geom_flat_interpolate$interpolatePoint","_ol_geom_flat_interpolate$lineStringCoordinateAtM","_ol_geom_flat_interpolate$lineStringsCoordinateAtM","intersectsextent","_ol_geom_flat_intersectsextent$intersectsLineString","_ol_geom_flat_intersectsextent$intersectsLineStringArray","_ol_geom_flat_intersectsextent$intersectsLinearRing","_ol_geom_flat_intersectsextent$intersectsLinearRingArray","_ol_geom_flat_intersectsextent$intersectsLinearRingMultiArray","_ol_geom_flat_length$lineStringLength","linearRingLength","perimeter","orient","_ol_geom_flat_orient$inflateEnds","_ol_geom_flat_orient$linearRingIsClockwise","_ol_geom_flat_orient$linearRingsAreOriented","_ol_geom_flat_orient$linearRingssAreOriented","_ol_geom_flat_orient$orientLinearRings","_ol_geom_flat_orient$orientLinearRingsArray","_ol_geom_flat_reverse$coordinates","_ol_geom_flat_segments$forEach","simplify","_ol_geom_flat_simplify$douglasPeucker","_ol_geom_flat_simplify$douglasPeuckerArray","douglasPeuckerMultiArray","_ol_geom_flat_simplify$quantize","_ol_geom_flat_simplify$quantizeArray","_ol_geom_flat_simplify$quantizeMultiArray","_ol_geom_flat_simplify$radialDistance","simplifyLineString","highQuality","opt_simplifiedFlatCoordinates","_ol_geom_flat_simplify$snap","straightchunk","_ol_geom_flat_straightchunk$matchingChunk","textpath","_ol_geom_flat_textpath$drawTextOnPath","topology","lineStringIsClosed","lastCoord","_ol_geom_flat_transform$rotate","_ol_geom_flat_transform$scale","_ol_geom_flat_transform$transform2D","_ol_geom_flat_transform$translate","_ol_has$DEVICE_PIXEL_RATIO","_ol_has$FIREFOX","_ol_has$IMAGE_DECODE","_ol_has$MAC","_ol_has$PASSIVE_EVENT_LISTENERS","_ol_has$SAFARI","_ol_has$WEBKIT","_ol_has$WORKER_OFFSCREEN_CANVAS","$ol$interaction$DoubleClickZoom","$ol$interaction$DragAndDrop","_ol_interaction_DragAndDrop$DragAndDropEvent","$ol$interaction$DragBox","_ol_interaction_DragBox$DragBoxEvent","$ol$interaction$DragPan","$ol$interaction$DragRotate","$ol$interaction$DragRotateAndZoom","$ol$interaction$DragZoom","$ol$interaction$Draw","_ol_interaction_Draw$DrawEvent","createBox","opt_geometry","boxCoordinates","createRegularPolygon","$ol$interaction$Extent","_ol_interaction_Extent$ExtentEvent","$ol$interaction$Interaction","_ol_interaction_Interaction$pan","_ol_interaction_Interaction$zoomByDelta","$ol$interaction$KeyboardPan","$ol$interaction$KeyboardZoom","$ol$interaction$Modify","_ol_interaction_Modify$ModifyEvent","$ol$interaction$MouseWheelZoom","$ol$interaction$PinchRotate","$ol$interaction$PinchZoom","Pointer","$ol$interaction$Pointer","_ol_interaction_Pointer$centroid","$ol$interaction$Select","_ol_interaction_Select$SelectEvent","$ol$interaction$Snap","$ol$interaction$Translate","_ol_interaction_Translate$TranslateEvent","_ol_interaction$defaults","Base","$ol$layer$Base","BaseImage","$ol$layer$BaseImage","BaseTile","$ol$layer$BaseTile","$ol$layer$BaseVector","$ol$layer$Graticule","Group","$ol$layer$Group","_ol_layer_Group$GroupEvent","$ol$layer$Heatmap","$ol$layer$Image","$ol$layer$Layer","_ol_layer_Layer$inView","MapboxVector","$ol$layer$MapboxVector","_ol_layer_MapboxVector$getMapboxPath","_ol_layer_MapboxVector$normalizeGlyphsUrl","_ol_layer_MapboxVector$normalizeSourceUrl","_ol_layer_MapboxVector$normalizeSpriteUrl","_ol_layer_MapboxVector$normalizeStyleUrl","$ol$layer$Tile","Vector","$ol$layer$Vector","VectorImage","$ol$layer$VectorImage","$ol$layer$VectorTile","WebGLPoints","$ol$layer$WebGLPoints","WebGLTile","$ol$layer$WebGLTile","loadingstrategy","_ol_loadingstrategy$all","math","_ol_math$ceil","_ol_math$clamp","_ol_math$cosh","_ol_math$floor","_ol_math$lerp","_ol_math$log2","_ol_math$modulo","_ol_math$round","_ol_math$solveLinearSystem","_ol_math$squaredDistance","_ol_math$squaredSegmentDistance","_ol_math$toDegrees","_ol_math$toFixed","_ol_math$toRadians","net","_ol_net$ClientError","_ol_net$ResponseError","_ol_net$getJSON","_ol_net$jsonp","overrideXHR","_ol_net$resolveUrl","restoreXHR","_ol_obj$assign","_ol_obj$clear","_ol_obj$getValues","_ol_obj$isEmpty","$ol$proj$Projection","_ol_proj_Units$METERS_PER_UNIT","_ol_proj_Units$fromCode","_ol_proj$addCommon","_ol_proj$addCoordinateTransforms","_ol_proj$addEquivalentProjections","_ol_proj$addEquivalentTransforms","_ol_proj$addProjection","_ol_proj$addProjections","clearAllProjections","clearProj","clearTransformFuncs","clearUserProjection","_ol_proj$cloneTransform","_ol_proj$createProjection","_ol_proj$createSafeCoordinateTransform","_ol_proj$createTransformFromCoordinateTransform","_ol_proj$disableCoordinateWarning","epsg3857","_ol_proj_epsg3857$EXTENT","_ol_proj_epsg3857$HALF_SIZE","_ol_proj_epsg3857$MAX_SAFE_Y","_ol_proj_epsg3857$PROJECTIONS","_ol_proj_epsg3857$RADIUS","_ol_proj_epsg3857$WORLD_EXTENT","_ol_proj_epsg3857$fromEPSG4326","_ol_proj_epsg3857$toEPSG4326","epsg4326","_ol_proj_epsg4326$EXTENT","_ol_proj_epsg4326$METERS_PER_UNIT","_ol_proj_epsg4326$PROJECTIONS","_ol_proj_epsg4326$RADIUS","_ol_proj$equivalent","_ol_proj$fromLonLat","_ol_proj$fromUserCoordinate","_ol_proj$fromUserExtent","_ol_proj$fromUserResolution","_ol_proj$get","_ol_proj$getPointResolution","_ol_proj$getTransform","_ol_proj$getTransformFromProjections","_ol_proj$getUserProjection","_ol_proj$identityTransform","proj4","projCodes","defs","def","projName","to_meter","code1","proj1","code2","proj2","_ol_proj_projections$add","_ol_proj_projections$clear","_ol_proj_projections$get","_ol_proj$setUserProjection","toLonLat","lonLat","_ol_proj$toUserCoordinate","_ol_proj$toUserExtent","_ol_proj$toUserResolution","_ol_proj$transform","_ol_proj$transformExtent","transformWithProjections","_ol_proj_transforms$add","_ol_proj_transforms$clear","_ol_proj_transforms$get","useGeographic","Box","$ol$render$Box","$ol$render$Event","$ol$render$Feature","toFeature","opt_geometryName","_ol_render_Feature$toGeometry","$ol$render$VectorContext","$ol$render$canvas$Builder","$ol$render$canvas$BuilderGroup","$ol$render$canvas$Executor","$ol$render$canvas$ExecutorGroup","_ol_render_canvas_ExecutorGroup$getPixelIndexArray","$ol$render$canvas$ImageBuilder","Immediate","$ol$render$canvas$Immediate","_ol_render_canvas_Instruction$beginPathInstruction","_ol_render_canvas_Instruction$closePathInstruction","_ol_render_canvas_Instruction$fillInstruction","_ol_render_canvas_Instruction$strokeInstruction","$ol$render$canvas$LineStringBuilder","$ol$render$canvas$PolygonBuilder","$ol$render$canvas$TextBuilder","_ol_render_canvas$checkedFonts","_ol_render_canvas$defaultFillStyle","_ol_render_canvas$defaultFont","_ol_render_canvas$defaultLineCap","_ol_render_canvas$defaultLineDash","defaultLineDashOffset","_ol_render_canvas$defaultLineJoin","defaultLineWidth","_ol_render_canvas$defaultMiterLimit","_ol_render_canvas$defaultPadding","_ol_render_canvas$defaultStrokeStyle","_ol_render_canvas$defaultTextAlign","_ol_render_canvas$defaultTextBaseline","_ol_render_canvas$drawImageOrLabel","_ol_render_canvas$getTextDimensions","hitdetect","_ol_render_canvas_hitdetect$HIT_DETECT_RESOLUTION","_ol_render_canvas_hitdetect$createHitDetectionImageData","_ol_render_canvas_hitdetect$hitDetect","_ol_render_canvas$labelCache","_ol_render_canvas$measureAndCacheTextWidth","_ol_render_canvas$measureTextHeight","_ol_render_canvas$measureTextWidth","_ol_render_canvas$registerFont","rotateAtOffset","_ol_render_canvas$textHeights","getRenderPixel","_ol_render$getVectorContext","toContext","Composite","$ol$renderer$Composite","$ol$renderer$Layer","$ol$renderer$Map","$ol$renderer$canvas$ImageLayer","$ol$renderer$canvas$Layer","$ol$renderer$canvas$TileLayer","$ol$renderer$canvas$VectorImageLayer","$ol$renderer$canvas$VectorLayer","$ol$renderer$canvas$VectorTileLayer","common","_ol_renderer_canvas_common$IMAGE_SMOOTHING_DISABLED","_ol_renderer_canvas_common$IMAGE_SMOOTHING_ENABLED","vector","_ol_renderer_vector$defaultOrder","_ol_renderer_vector$getSquaredTolerance","_ol_renderer_vector$getTolerance","_ol_renderer_vector$renderFeature","webgl","$ol$renderer$webgl$Layer","_ol_renderer_webgl_Layer$colorDecodeId","_ol_renderer_webgl_Layer$colorEncodeId","getBlankImageData","writePointFeatureToBuffers","elementIndex","bufferPositions","customAttrs","vPos","iPos","baseIndex","PointsLayer","$ol$renderer$webgl$PointsLayer","$ol$renderer$webgl$TileLayer","_ol_renderer_webgl_TileLayer$Attributes","_ol_renderer_webgl_TileLayer$Uniforms","reproj","$ol$reproj$Image","$ol$reproj$Tile","$ol$reproj$Triangulation","_ol_reproj$calculateSourceExtentResolution","_ol_reproj$calculateSourceResolution","_ol_reproj_common$ENABLE_RASTER_REPROJECTION","ERROR_THRESHOLD","_ol_reproj$render","resolutionconstraint","_ol_resolutionconstraint$createMinMaxResolution","_ol_resolutionconstraint$createSnapToPower","_ol_resolutionconstraint$createSnapToResolutions","rotationconstraint","_ol_rotationconstraint$createSnapToN","_ol_rotationconstraint$createSnapToZero","_ol_rotationconstraint$disable","_ol_rotationconstraint$none","_ol_size$buffer","_ol_size$hasArea","_ol_size$scale","_ol_size$toSize","$ol$source$BingMaps","_ol_source_BingMaps$quadKey","$ol$source$CartoDB","$ol$source$Cluster","$ol$source$DataTile","$ol$source$GeoTIFF","IIIF","$ol$source$IIIF","$ol$source$Image","_ol_source_Image$ImageSourceEvent","_ol_source_Image$defaultImageLoadFunction","$ol$source$ImageArcGISRest","$ol$source$ImageCanvas","$ol$source$ImageMapGuide","ImageStatic","$ol$source$ImageStatic","$ol$source$ImageWMS","$ol$source$OGCMapTile","$ol$source$OGCVectorTile","OSM","$ol$source$OSM","_ol_source_OSM$ATTRIBUTION","Raster","$ol$source$Raster","_ol_source_Raster$Processor","_ol_source_Raster$RasterSourceEvent","_ol_source_Raster$newImageData","$ol$source$Source","Stamen","$ol$source$Stamen","$ol$source$Tile","_ol_source_Tile$TileSourceEvent","$ol$source$TileArcGISRest","TileDebug","$ol$source$TileDebug","$ol$source$TileImage","$ol$source$TileJSON","$ol$source$TileWMS","$ol$source$UTFGrid","_ol_source_UTFGrid$CustomTile","$ol$source$UrlTile","$ol$source$Vector","_ol_source_Vector$VectorSourceEvent","$ol$source$VectorTile","_ol_source_VectorTile$defaultLoadFunction","$ol$source$WMTS","optionsFromCapabilities","wmtsCap","tileMatrixSets","supportedCRS","matrixSetObj","projConfig","TileMatrix","selectedMatrixLimit","MinTileCol","MinTileRow","MaxTileCol","MatrixWidth","MaxTileRow","MatrixHeight","tileMatrixValue","Identifier","ScaleDenominator","TopLeftCorner","tileSpanX","tileSpanY","TileHeight","matrixSetExtent","wgs84BoundingBox","wgs84ProjectionExtent","wgs84MatrixSetExtent","gets","encodings","$ol$source$XYZ","Zoomify","$ol$source$Zoomify","_ol_source_Zoomify$CustomTile","_ol_source_common$DEFAULT_WMS_VERSION","ogcTileUtil","_ol_source_ogcTileUtil$getMapTileUrlTemplate","_ol_source_ogcTileUtil$getTileSetInfo","_ol_source_ogcTileUtil$getVectorTileUrlTemplate","sourcesFromTileGrid","sourceCache","tileGridExtent","wantedSources","sphere","_ol_sphere$DEFAULT_RADIUS","_ol_sphere$getDistance","_ol_sphere$offset","_ol_string$compareVersions","_ol_string$padNumber","structs","$ol$structs$LRUCache","$ol$structs$LinkedList","$ol$structs$PriorityQueue","_ol_structs_PriorityQueue$DROP","$ol$structs$RBush","$ol$style$Circle","$ol$style$Fill","$ol$style$Icon","$ol$style$IconImage","_ol_style_IconImage$get","$ol$style$IconImageCache","_ol_style_IconImageCache$shared","$ol$style$Image","$ol$style$RegularShape","$ol$style$Stroke","$ol$style$Style","_ol_style_Style$createDefaultStyle","_ol_style_Style$createEditingStyle","_ol_style_Style$toFunction","$ol$style$Text","_ol_style_expressions$Operators","_ol_style_expressions$PALETTE_TEXTURE_ARRAY","_ol_style_expressions$arrayToGlsl","_ol_style_expressions$colorToGlsl","_ol_style_expressions$expressionToGlsl","_ol_style_expressions$getStringNumberEquivalent","_ol_style_expressions$getValueType","_ol_style_expressions$isTypeUnique","_ol_style_expressions$numberToGlsl","_ol_style_expressions$stringToGlsl","_ol_style_expressions$uniformNameForVariable","tilecoord","_ol_tilecoord$createOrUpdate","_ol_tilecoord$fromKey","_ol_tilecoord$getCacheKeyForTileKey","_ol_tilecoord$getKey","_ol_tilecoord$getKeyZXY","_ol_tilecoord$hash","_ol_tilecoord$withinExtentAndZ","$ol$tilegrid$TileGrid","$ol$tilegrid$WMTS","_ol_tilegrid_WMTS$createFromCapabilitiesMatrixSet","DEFAULT_MAX_ZOOM","_ol_tilegrid_common$DEFAULT_TILE_SIZE","_ol_tilegrid$createForExtent","_ol_tilegrid$createForProjection","_ol_tilegrid$createXYZ","_ol_tilegrid$extentFromProjection","_ol_tilegrid$getForProjection","_ol_tilegrid$wrapX","tileurlfunction","_ol_tileurlfunction$createFromTemplate","_ol_tileurlfunction$createFromTemplates","_ol_tileurlfunction$createFromTileUrlFunctions","_ol_tileurlfunction$expandUrl","_ol_tileurlfunction$nullTileUrlFunction","_ol_transform$apply","_ol_transform$compose","composeCssTransform","_ol_transform$create","_ol_transform$determinant","invert","_ol_transform$makeInverse","_ol_transform$makeScale","_ol_transform$multiply","_ol_transform$reset","_ol_transform$rotate","_ol_transform$scale","_ol_transform$set","_ol_transform$setFromArray","_ol_transform$toString","_ol_transform$translate","_ol_uri$appendParams","_ol_util$VERSION","_ol_util$abstract","_ol_util$getUid","vec","_ol_vec_mat4$create","_ol_vec_mat4$fromTransform","_ol_webgl$ARRAY_BUFFER","$ol$webgl$Buffer","_ol_webgl_Buffer$getArrayClassForType","_ol_webgl$DYNAMIC_DRAW","_ol_webgl$ELEMENT_ARRAY_BUFFER","_ol_webgl$FLOAT","Helper","$ol$webgl$Helper","_ol_webgl_Helper$computeAttributesStride","$ol$webgl$PaletteTexture","PostProcessingPass","$ol$webgl$PostProcessingPass","RenderTarget","$ol$webgl$RenderTarget","_ol_webgl$STATIC_DRAW","STREAM_DRAW","_ol_webgl_ShaderBuilder$ShaderBuilder","_ol_webgl_ShaderBuilder$parseLiteralStyle","$ol$webgl$TileTexture","_ol_webgl$getContext","getSupportedExtensions","_ol_xml$OBJECT_PROPERTY_NODE_FACTORY","_ol_xml$XML_SCHEMA_INSTANCE_URI","_ol_xml$createElementNS","_ol_xml$getAllTextContent","_ol_xml$getAllTextContent_","_ol_xml$getAttributeNS","_ol_xml$getDocument","_ol_xml$getXMLSerializer","_ol_xml$isDocument","_ol_xml$makeArrayExtender","_ol_xml$makeArrayPusher","_ol_xml$makeArraySerializer","_ol_xml$makeChildAppender","_ol_xml$makeObjectPropertyPusher","_ol_xml$makeObjectPropertySetter","_ol_xml$makeReplacer","_ol_xml$makeSequence","_ol_xml$makeSimpleNodeFactory","_ol_xml$makeStructureNS","_ol_xml$parse","_ol_xml$parseNode","_ol_xml$pushParseAndPop","_ol_xml$pushSerializeAndPop","registerDocument","registerXMLSerializer","xmlSerializer","_ol_xml$serialize","fieldTags","StripRowCounts","SubIFDs","fieldTypeNames","WhiteIsZero","BlackIsZero","Palette","TransparencyMask","CMYK","YCbCr","CIELab","ICCLab","Unspecified","Assocalpha","Unassalpha","LercParameters","Version","AddCompression","LercAddCompression","None","Deflate","__webpack_module_cache__","__webpack_require__","moduleId","cachedModule","__webpack_modules__","chunkId","needAttach","scripts","charset","nc","onScriptComplete","doneFns","nmd","installedChunks","installedChunkData","errorType","realSrc","webpackJsonpCallback","parentChunkLoadingFunction","chunkIds","moreModules","chunkLoadingGlobal","__webpack_exports__"],"sourceRoot":""} \ No newline at end of file diff --git a/templates/map/client/libs/openlayers/7.2.2/LICENSE.md b/templates/map/client/libs/openlayers/7.2.2/LICENSE.md new file mode 100644 index 0000000..b86fe0f --- /dev/null +++ b/templates/map/client/libs/openlayers/7.2.2/LICENSE.md @@ -0,0 +1,25 @@ +BSD 2-Clause License + +Copyright 2005-present, OpenLayers Contributors +All rights reserved. + +Redistribution and use in source and binary forms, with or without +modification, are permitted provided that the following conditions are met: + +1. Redistributions of source code must retain the above copyright notice, this + list of conditions and the following disclaimer. + +2. Redistributions in binary form must reproduce the above copyright notice, + this list of conditions and the following disclaimer in the documentation + and/or other materials provided with the distribution. + +THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS "AS IS" +AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE +IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE ARE +DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT HOLDER OR CONTRIBUTORS BE LIABLE +FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL +DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR +SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER +CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, +OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE +OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE. diff --git a/templates/map/client/libs/openlayers/7.2.2/ol.css b/templates/map/client/libs/openlayers/7.2.2/ol.css new file mode 100644 index 0000000..48db4d0 --- /dev/null +++ b/templates/map/client/libs/openlayers/7.2.2/ol.css @@ -0,0 +1,345 @@ +:root, +:host { + --ol-background-color: white; + --ol-accent-background-color: #F5F5F5; + --ol-subtle-background-color: rgba(128, 128, 128, 0.25); + --ol-partial-background-color: rgba(255, 255, 255, 0.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 0.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: bold; + 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: normal; + 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: 0.5em; + bottom: 0.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; +} diff --git a/templates/map/client/libs/openlayers/7.2.2/ol.js b/templates/map/client/libs/openlayers/7.2.2/ol.js new file mode 100644 index 0000000..469552e --- /dev/null +++ b/templates/map/client/libs/openlayers/7.2.2/ol.js @@ -0,0 +1,4 @@ +var ol=function(){"use strict";const t={1:"The view center is not defined",2:"The view resolution is not defined",3:"The view rotation is not defined",4:"`image` and `src` cannot be provided at the same time",5:"`imgSize` must be set when `image` is provided",7:"`format` must be set when `url` is set",8:"Unknown `serverType` configured",9:"`url` must be configured or set using `#setUrl()`",10:"The default `geometryFunction` can only handle `Point` geometries",11:"`options.featureTypes` must be an Array",12:"`options.geometryName` must also be provided when `options.bbox` is set",13:"Invalid corner",14:"Invalid color",15:"Tried to get a value for a key that does not exist in the cache",16:"Tried to set a value for a key that is used already",17:"`resolutions` must be sorted in descending order",18:"Either `origin` or `origins` must be configured, never both",19:"Number of `tileSizes` and `resolutions` must be equal",20:"Number of `origins` and `resolutions` must be equal",22:"Either `tileSize` or `tileSizes` must be configured, never both",24:"Invalid extent or geometry provided as `geometry`",25:"Cannot fit empty extent provided as `geometry`",26:"Features must have an id set",27:"Features must have an id set",28:'`renderMode` must be `"hybrid"` or `"vector"`',30:"The passed `feature` was already added to the source",31:"Tried to enqueue an `element` that was already added to the queue",32:"Transformation matrix cannot be inverted",33:"Invalid units",34:"Invalid geometry layout",36:"Unknown SRS type",37:"Unknown geometry type found",38:"`styleMapValue` has an unknown type",39:"Unknown geometry type",40:"Expected `feature` to have a geometry",41:"Expected an `ol/style/Style` or an array of `ol/style/Style.js`",42:"Question unknown, the answer is 42",43:"Expected `layers` to be an array or a `Collection`",47:"Expected `controls` to be an array or an `ol/Collection`",48:"Expected `interactions` to be an array or an `ol/Collection`",49:"Expected `overlays` to be an array or an `ol/Collection`",50:"`options.featureTypes` should be an Array",51:"Either `url` or `tileJSON` options must be provided",52:"Unknown `serverType` configured",53:"Unknown `tierSizeCalculation` configured",55:"The {-y} placeholder requires a tile grid with extent",56:"mapBrowserEvent must originate from a pointer event",57:"At least 2 conditions are required",59:"Invalid command found in the PBF",60:"Missing or invalid `size`",61:"Cannot determine IIIF Image API version from provided image information JSON",62:"A `WebGLArrayBuffer` must either be of type `ELEMENT_ARRAY_BUFFER` or `ARRAY_BUFFER`",64:"Layer opacity must be a number",66:"`forEachFeatureAtCoordinate` cannot be used on a WebGL layer if the hit detection logic has not been enabled. This is done by providing adequate shaders using the `hitVertexShader` and `hitFragmentShader` properties of `WebGLPointsLayerRenderer`",67:"A layer can only be added to the map once. Use either `layer.setMap()` or `map.addLayer()`, not both",68:"A VectorTile source can only be rendered if it has a projection compatible with the view projection",69:"`width` or `height` cannot be provided together with `scale`"};class e extends Error{constructor(e){const i=t[e];super(i),this.code=e,this.name="AssertionError",this.message=i}}var i=e;function n(t){t.stopPropagation()}var r=class{constructor(t){this.propagationStopped,this.defaultPrevented,this.type=t,this.target=null}preventDefault(){this.defaultPrevented=!0}stopPropagation(){this.propagationStopped=!0}},s="propertychange";var o=class{constructor(){this.disposed=!1}dispose(){this.disposed||(this.disposed=!0,this.disposeInternal())}disposeInternal(){}};function a(t,e,i){let n,r;i=i||l;let s=0,o=t.length,a=!1;for(;s>1),r=+i(t[n],e),r<0?s=n+1:(o=n,a=!r);return a?s:~s}function l(t,e){return t>e?1:t0){for(r=1;r0?r-1:r:t[r-1]-e0||i&&0===s)}))}function f(){return!0}function p(){return!1}function m(){}function _(t){let e,i,n,r=!1;return function(){const s=Array.prototype.slice.call(arguments);return r&&this===n&&d(s,i)||(r=!0,n=this,i=s,e=t.apply(this,arguments)),e}}function y(t){return function(){let e;try{e=t()}catch(t){return Promise.reject(t)}return e instanceof Promise?e:Promise.resolve(e)}()}function x(t){for(const e in t)delete t[e]}function v(t){let e;for(e in t)return!1;return!e}var S=class extends o{constructor(t){super(),this.eventTarget_=t,this.pendingRemovals_=null,this.dispatching_=null,this.listeners_=null}addEventListener(t,e){if(!t||!e)return;const i=this.listeners_||(this.listeners_={}),n=i[t]||(i[t]=[]);n.includes(e)||n.push(e)}dispatchEvent(t){const e="string"==typeof t,i=e?t:t.type,n=this.listeners_&&this.listeners_[i];if(!n)return;const s=e?new r(t):t;s.target||(s.target=this.eventTarget_||this);const o=this.dispatching_||(this.dispatching_={}),a=this.pendingRemovals_||(this.pendingRemovals_={});let l;i in o||(o[i]=0,a[i]=0),++o[i];for(let t=0,e=n.length;t0)}removeEventListener(t,e){const i=this.listeners_&&this.listeners_[t];if(i){const n=i.indexOf(e);-1!==n&&(this.pendingRemovals_&&t in this.pendingRemovals_?(i[n]=m,++this.pendingRemovals_[t]):(i.splice(n,1),0===i.length&&delete this.listeners_[t]))}}},w="change",T="error",E="contextmenu",C="click",R="dblclick",b="dragenter",P="dragover",I="drop",L="keydown",F="keypress",M="load",A="touchmove",O="wheel";function N(t,e,i,n,r){if(n&&n!==t&&(i=i.bind(n)),r){const n=i;i=function(){t.removeEventListener(e,i),n.apply(this,arguments)}}const s={target:t,type:e,listener:i};return t.addEventListener(e,i),s}function D(t,e,i,n){return N(t,e,i,n,!0)}function G(t){t&&t.target&&(t.target.removeEventListener(t.type,t.listener),x(t))}class k extends S{constructor(){super(),this.on=this.onInternal,this.once=this.onceInternal,this.un=this.unInternal,this.revision_=0}changed(){++this.revision_,this.dispatchEvent(w)}getRevision(){return this.revision_}onInternal(t,e){if(Array.isArray(t)){const i=t.length,n=new Array(i);for(let r=0;r0;)this.pop()}extend(t){for(let e=0,i=t.length;ethis.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 q(Z,e,t))}pop(){return this.removeAt(this.getLength()-1)}push(t){this.unique_&&this.assertUnique_(t);const e=this.getLength();return this.insertAt(e,t),this.getLength()}remove(t){const e=this.array_;for(let i=0,n=e.length;i=this.getLength())return;const e=this.array_[t];return this.array_.splice(t,1),this.updateLength_(),this.dispatchEvent(new q(Y,e,t)),e}setAt(t,e){if(t>=this.getLength())return void this.insertAt(t,e);if(t<0)throw new Error("Index out of bounds: "+t);this.unique_&&this.assertUnique_(e,t);const i=this.array_[t];this.array_[t]=e,this.dispatchEvent(new q(Y,i,t)),this.dispatchEvent(new q(Z,e,t))}updateLength_(){this.set(K,this.array_.length)}assertUnique_(t,e){for(let n=0,r=this.array_.length;nt)throw new Error("Tile load sequence violation");this.state=t,this.changed()}load(){z()}getAlpha(t,e){if(!this.transition_)return 1;let i=this.transitionStarts_[t];if(i){if(-1===i)return 1}else i=e,this.transitionStarts_[t]=i;const n=e-i+1e3/60;return n>=this.transition_?1:it(n/this.transition_)}inTransition(t){return!!this.transition_&&-1!==this.transitionStarts_[t]}endTransition(t){this.transition_&&(this.transitionStarts_[t]=-1)}};const at="undefined"!=typeof navigator&&void 0!==navigator.userAgent?navigator.userAgent.toLowerCase():"",lt=at.includes("firefox"),ht=at.includes("safari")&&!at.includes("chrom"),ct=ht&&(at.includes("version/15.4")||/cpu (os|iphone os) 15_4 like mac os x/.test(at)),ut=at.includes("webkit")&&!at.includes("edge"),dt=at.includes("macintosh"),gt="undefined"!=typeof devicePixelRatio?devicePixelRatio:1,ft="undefined"!=typeof WorkerGlobalScope&&"undefined"!=typeof OffscreenCanvas&&self instanceof WorkerGlobalScope,pt="undefined"!=typeof Image&&Image.prototype.decode,mt=function(){let t=!1;try{const e=Object.defineProperty({},"passive",{get:function(){t=!0}});window.addEventListener("_",null,e),window.removeEventListener("_",null,e)}catch(t){}return t}();function _t(t,e,i,n){let r;return r=i&&i.length?i.shift():ft?new OffscreenCanvas(t||300,e||300):document.createElement("canvas"),t&&(r.width=t),e&&(r.height=e),r.getContext("2d",n)}function yt(t){const e=t.canvas;e.width=1,e.height=1,t.clearRect(0,0,1,1)}function xt(t){let e=t.offsetWidth;const i=getComputedStyle(t);return e+=parseInt(i.marginLeft,10)+parseInt(i.marginRight,10),e}function vt(t){let e=t.offsetHeight;const i=getComputedStyle(t);return e+=parseInt(i.marginTop,10)+parseInt(i.marginBottom,10),e}function St(t,e){const i=e.parentNode;i&&i.replaceChild(t,e)}function wt(t){return t&&t.parentNode?t.parentNode.removeChild(t):null}function Tt(t){for(;t.lastChild;)t.removeChild(t.lastChild)}function Et(t,e){const i=t.childNodes;for(let n=0;;++n){const r=i[n],s=e[n];if(!r&&!s)break;r!==s&&(r?s?t.insertBefore(s,r):(t.removeChild(r),--n):t.appendChild(s))}}function Ct(t){return t instanceof Image||t instanceof HTMLCanvasElement||t instanceof HTMLVideoElement?t:null}function Rt(t){return t instanceof Uint8Array||t instanceof Uint8ClampedArray||t instanceof Float32Array||t instanceof DataView?t:null}let bt=null;function Pt(t){bt||(bt=_t(t.width,t.height,void 0,{willReadFrequently:!0}));const e=bt.canvas,i=t.width;e.width!==i&&(e.width=i);const n=t.height;return e.height!==n&&(e.height=n),bt.drawImage(t,i,n),bt.getImageData(0,0,i,n).data}const It=[256,256];var Lt=class extends ot{constructor(t){const e=$;super(t.tileCoord,e,{transition:t.transition,interpolate:t.interpolate}),this.loader_=t.loader,this.data_=null,this.error_=null,this.size_=t.size||null}getSize(){if(this.size_)return this.size_;const t=Ct(this.data_);return t?[t.width,t.height]:It}getData(){return this.data_}getError(){return this.error_}load(){if(this.state!==$&&this.state!==tt)return;this.state=J,this.changed();const t=this;this.loader_().then((function(e){t.data_=e,t.state=Q,t.changed()})).catch((function(e){t.error_=e,t.state=tt,t.changed()}))}};function Ft(t,e){if(!t)throw new i(e)}class Mt extends W{constructor(t){if(super(),this.on,this.once,this.un,this.id_=void 0,this.geometryName_="geometry",this.style_=null,this.styleFunction_=void 0,this.geometryChangeKey_=null,this.addChangeListener(this.geometryName_,this.handleGeometryChanged_),t)if("function"==typeof t.getSimplifiedGeometry){const e=t;this.setGeometry(e)}else{const e=t;this.setProperties(e)}}clone(){const t=new Mt(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_&&(G(this.geometryChangeKey_),this.geometryChangeKey_=null);const t=this.getGeometry();t&&(this.geometryChangeKey_=N(t,w,this.handleGeometryChange_,this)),this.changed()}setGeometry(t){this.set(this.geometryName_,t)}setStyle(t){this.style_=t,this.styleFunction_=t?At(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 At(t){if("function"==typeof t)return t;let e;if(Array.isArray(t))e=t;else{Ft("function"==typeof t.getZIndex,41);e=[t]}return function(){return e}}var Ot=Mt;const Nt=new Array(6);function Dt(){return[1,0,0,1,0,0]}function Gt(t){return jt(t,1,0,0,1,0,0)}function kt(t,e){const i=t[0],n=t[1],r=t[2],s=t[3],o=t[4],a=t[5],l=e[0],h=e[1],c=e[2],u=e[3],d=e[4],g=e[5];return t[0]=i*l+r*h,t[1]=n*l+s*h,t[2]=i*c+r*u,t[3]=n*c+s*u,t[4]=i*d+r*g+o,t[5]=n*d+s*g+a,t}function jt(t,e,i,n,r,s,o){return t[0]=e,t[1]=i,t[2]=n,t[3]=r,t[4]=s,t[5]=o,t}function Bt(t,e){return t[0]=e[0],t[1]=e[1],t[2]=e[2],t[3]=e[3],t[4]=e[4],t[5]=e[5],t}function zt(t,e){const i=e[0],n=e[1];return e[0]=t[0]*i+t[2]*n+t[4],e[1]=t[1]*i+t[3]*n+t[5],e}function Ut(t,e){const i=Math.cos(e),n=Math.sin(e);return kt(t,jt(Nt,i,n,-n,i,0,0))}function Xt(t,e,i){return kt(t,jt(Nt,e,0,0,i,0,0))}function Vt(t,e,i){return jt(t,e,0,0,i,0,0)}function Wt(t,e,i){return kt(t,jt(Nt,1,0,0,1,e,i))}function Zt(t,e,i,n,r,s,o,a){const l=Math.sin(s),h=Math.cos(s);return t[0]=n*h,t[1]=r*l,t[2]=-n*l,t[3]=r*h,t[4]=o*n*h-a*n*l+e,t[5]=o*r*l+a*r*h+i,t}function Yt(t,e){const i=Kt(e);Ft(0!==i,32);const n=e[0],r=e[1],s=e[2],o=e[3],a=e[4],l=e[5];return t[0]=o/i,t[1]=-r/i,t[2]=-s/i,t[3]=n/i,t[4]=(s*l-o*a)/i,t[5]=-(n*l-r*a)/i,t}function Kt(t){return t[0]*t[3]-t[1]*t[2]}let qt;function Ht(t){const e="matrix("+t.join(", ")+")";if(ft)return e;const i=qt||(qt=document.createElement("div"));return i.style.transform=e,i.style.transform}var $t=0,Jt=1,Qt=2,te=4,ee=8,ie=16;function ne(t){const e=ue();for(let i=0,n=t.length;ir&&(l|=te),as&&(l|=Qt),l===$t&&(l=Jt),l}function ue(){return[1/0,1/0,-1/0,-1/0]}function de(t,e,i,n,r){return r?(r[0]=t,r[1]=e,r[2]=i,r[3]=n,r):[t,e,i,n]}function ge(t){return de(1/0,1/0,-1/0,-1/0,t)}function fe(t,e){const i=t[0],n=t[1];return de(i,n,i,n,e)}function pe(t,e,i,n,r){return Se(ge(r),t,e,i,n)}function me(t,e){return t[0]==e[0]&&t[2]==e[2]&&t[1]==e[1]&&t[3]==e[3]}function _e(t,e,i){return Math.abs(t[0]-e[0])t[2]&&(t[2]=e[2]),e[1]t[3]&&(t[3]=e[3]),t}function xe(t,e){e[0]t[2]&&(t[2]=e[0]),e[1]t[3]&&(t[3]=e[1])}function ve(t,e){for(let i=0,n=e.length;ie[0]?n[0]=t[0]:n[0]=e[0],t[1]>e[1]?n[1]=t[1]:n[1]=e[1],t[2]=e[0]&&t[1]<=e[3]&&t[3]>=e[1]}function ke(t){return t[2]=o&&p<=l),n||!(s&te)||r&te||(m=g-(d-l)*f,n=m>=a&&m<=h),n||!(s&ee)||r&ee||(p=d-(g-a)/f,n=p>=o&&p<=l),n||!(s&ie)||r&ie||(m=g-(d-o)*f,n=m>=a&&m<=h)}return n}function Ue(t,e,i,n){let r=[];if(n>1){const e=t[2]-t[0],i=t[3]-t[1];for(let s=0;s=i[2])){const e=De(i),r=Math.floor((n[0]-i[0])/e)*e;t[0]-=r,t[2]-=r}return t}function Ve(t,e){if(e.canWrapX()){const i=e.getExtent();if(!isFinite(t[0])||!isFinite(t[2]))return[[i[0],t[1],i[2],t[3]]];Xe(t,e);const n=De(i);if(De(t)>n)return[[i[0],t[1],i[2],t[3]]];if(t[0]i[2])return[[t[0],t[1],i[2],t[3]],[i[0],t[1],t[2]-n,t[3]]]}return[t]}const We={9001:"m",9002:"ft",9003:"us-ft",9101:"radians",9102:"degrees"};function Ze(t){return We[t]}const Ye={radians:6370997/(2*Math.PI),degrees:2*Math.PI*6370997/360,ft:.3048,m:1,"us-ft":1200/3937};var Ke=class{constructor(t){this.code_=t.code,this.units_=t.units,this.extent_=void 0!==t.extent?t.extent:null,this.worldExtent_=void 0!==t.worldExtent?t.worldExtent:null,this.axisOrientation_=void 0!==t.axisOrientation?t.axisOrientation:"enu",this.global_=void 0!==t.global&&t.global,this.canWrapX_=!(!this.global_||!this.extent_),this.getPointResolutionFunc_=t.getPointResolution,this.defaultTileGrid_=null,this.metersPerUnit_=t.metersPerUnit}canWrapX(){return this.canWrapX_}getCode(){return this.code_}getExtent(){return this.extent_}getUnits(){return this.units_}getMetersPerUnit(){return this.metersPerUnit_||Ye[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 qe=6378137,He=Math.PI*qe,$e=[-He,-He,He,He],Je=[-180,-85,180,85],Qe=qe*Math.log(Math.tan(Math.PI/2));class ti extends Ke{constructor(t){super({code:t,units:"m",extent:$e,global:!0,worldExtent:Je,getPointResolution:function(t,e){return t/Math.cosh(e[1]/qe)}})}}const ei=[new ti("EPSG:3857"),new ti("EPSG:102100"),new ti("EPSG:102113"),new ti("EPSG:900913"),new ti("http://www.opengis.net/def/crs/EPSG/0/3857"),new ti("http://www.opengis.net/gml/srs/epsg.xml#3857")];function ii(t,e,i){const n=t.length;i=i>1?i:2,void 0===e&&(e=i>2?t.slice():new Array(n));for(let r=0;rQe?i=Qe:i<-Qe&&(i=-Qe),e[r+1]=i}return e}function ni(t,e,i){const n=t.length;i=i>1?i:2,void 0===e&&(e=i>2?t.slice():new Array(n));for(let r=0;r1?(i=r,n=s):l>0&&(i+=o*l,n+=a*l)}return xi(t,e,i,n)}function xi(t,e,i,n){const r=i-t,s=n-e;return r*r+s*s}function vi(t){const e=t.length;for(let i=0;ir&&(r=e,n=s)}if(0===r)return null;const s=t[n];t[n]=t[i],t[i]=s;for(let n=i+1;n=0;n--){i[n]=t[n][e]/t[n][n];for(let r=n-1;r>=0;r--)t[r][e]-=t[r][n]*i[n]}return i}function Si(t){return 180*t/Math.PI}function wi(t){return t*Math.PI/180}function Ti(t,e){const i=t%e;return i*e<0?i+e:i}function Ei(t,e,i){return t+i*(e-t)}function Ci(t,e){const i=Math.pow(10,e);return Math.round(t*i)/i}function Ri(t,e){return Math.round(Ci(t,e))}function bi(t,e){return Math.floor(Ci(t,e))}function Pi(t,e){return Math.ceil(Ci(t,e))}function Ii(t,e,i){const n=void 0!==i?t.toFixed(i):""+t;let r=n.indexOf(".");return r=-1===r?n.length:r,r>e?n:new Array(1+e-r).join("0")+n}function Li(t,e){const i=(""+t).split("."),n=(""+e).split(".");for(let t=0;tr)return 1;if(r>e)return-1}return 0}function Fi(t,e){return t[0]+=+e[0],t[1]+=+e[1],t}function Mi(t,e){const i=e.getRadius(),n=e.getCenter(),r=n[0],s=n[1];let o=t[0]-r;const a=t[1]-s;0===o&&0===a&&(o=1);const l=Math.sqrt(o*o+a*a);return[r+i*o/l,s+i*a/l]}function Ai(t,e){const i=t[0],n=t[1],r=e[0],s=e[1],o=r[0],a=r[1],l=s[0],h=s[1],c=l-o,u=h-a,d=0===c&&0===u?0:(c*(i-o)+u*(n-a))/(c*c+u*u||0);let g,f;return d<=0?(g=o,f=a):d>=1?(g=l,f=h):(g=o+d*c,f=a+d*u),[g,f]}function Oi(t,e,i){const n=Ti(e+180,360)-180,r=Math.abs(3600*n),s=i||0;let o=Math.floor(r/3600),a=Math.floor((r-3600*o)/60),l=Ci(r-3600*o-60*a,s);l>=60&&(l=0,a+=1),a>=60&&(a=0,o+=1);let h=o+"°";return 0===a&&0===l||(h+=" "+Ii(a,2)+"′"),0!==l&&(h+=" "+Ii(l,2,s)+"″"),0!==n&&(h+=" "+t.charAt(n<0?1:0)),h}function Ni(t,e,i){return t?e.replace("{x}",t[0].toFixed(i)).replace("{y}",t[1].toFixed(i)):""}function Di(t,e){let i=!0;for(let n=t.length-1;n>=0;--n)if(t[n]!=e[n]){i=!1;break}return i}function Gi(t,e){const i=Math.cos(e),n=Math.sin(e),r=t[0]*i-t[1]*n,s=t[1]*i+t[0]*n;return t[0]=r,t[1]=s,t}function ki(t,e){return t[0]*=e,t[1]*=e,t}function ji(t,e){const i=t[0]-e[0],n=t[1]-e[1];return i*i+n*n}function Bi(t,e){return Math.sqrt(ji(t,e))}function zi(t,e){return ji(t,Ai(t,e))}function Ui(t,e){return Ni(t,"{x}, {y}",e)}function Xi(t,e){if(e.canWrapX()){const i=De(e.getExtent()),n=Vi(t,e,i);n&&(t[0]-=n*i)}return t}function Vi(t,e,i){const n=e.getExtent();let r=0;return e.canWrapX()&&(t[0]n[2])&&(i=i||De(n),r=Math.floor((t[0]-n[0])/i)),r}const Wi=6371008.8;function Zi(t,e,i){i=i||Wi;const n=wi(t[1]),r=wi(e[1]),s=(r-n)/2,o=wi(e[0]-t[0])/2,a=Math.sin(s)*Math.sin(s)+Math.sin(o)*Math.sin(o)*Math.cos(n)*Math.cos(r);return 2*i*Math.atan2(Math.sqrt(a),Math.sqrt(1-a))}function Yi(t,e){let i=0;for(let n=0,r=t.length;nHi.warn||console.warn(...t)}function Qi(...t){$i>Hi.error||console.error(...t)}let tn=!0;function en(t){tn=!(void 0===t||t)}function nn(t,e){if(void 0!==e)for(let i=0,n=t.length;i=o?e[s+t]:r[t]}return i}}function gn(t,e,i,n){const r=an(t),s=an(e);pi(r,s,dn(i)),pi(s,r,dn(n))}function fn(t,e){if(t===e)return!0;const i=t.getUnits()===e.getUnits();if(t.getCode()===e.getCode())return i;return pn(t,e)===nn&&i}function pn(t,e){let i=mi(t.getCode(),e.getCode());return i||(i=rn),i}function mn(t,e){return pn(an(t),an(e))}function _n(t,e,i){return mn(e,i)(t,void 0,t.length)}function yn(t,e,i,n){return Ue(t,mn(e,i),void 0,n)}let xn=null;function vn(t){xn=an(t)}function Sn(){return xn}function wn(t,e){return xn?_n(t,e,xn):t}function Tn(t,e){return xn?_n(t,xn,e):(tn&&!Di(t,[0,0])&&t[0]>=-180&&t[0]<=180&&t[1]>=-90&&t[1]<=90&&(tn=!1,Ji("Call useGeographic() from ol/proj once to work with [longitude, latitude] coordinates.")),t)}function En(t,e){return xn?yn(t,e,xn):t}function Cn(t,e){return xn?yn(t,xn,e):t}function Rn(t,e){if(!xn)return t;const i=an(e).getUnits(),n=xn.getUnits();return i&&n?t*Ye[i]/Ye[n]:t}function bn(t,e){if(!xn)return t;const i=an(e).getUnits(),n=xn.getUnits();return i&&n?t*Ye[n]/Ye[i]:t}function Pn(t,e,i){return function(n){let r,s;if(t.canWrapX()){const e=t.getExtent(),o=De(e);s=Vi(n=n.slice(0),t,o),s&&(n[0]=n[0]-s*o),n[0]=_i(n[0],e[0],e[2]),n[1]=_i(n[1],e[1],e[3]),r=i(n)}else r=i(n);return s&&e.canWrapX()&&(r[0]+=s*De(e.getExtent())),r}}function In(){hn(ei),hn(li),cn(li,ei,ii,ni)}function Ln(t,e,i,n,r,s){s=s||[];let o=0;for(let a=e;a1)u=i;else{if(d>0){for(let r=0;rr&&(r=a),s=i,o=n}return r}function zn(t,e,i,n,r){for(let s=0,o=i.length;s0;){const i=h.pop(),s=h.pop();let o=0;const a=t[s],u=t[s+1],d=t[i],g=t[i+1];for(let e=s+n;eo&&(c=e,o=i)}o>r&&(l[(c-e)/n]=1,s+nr&&(s[o++]=h,s[o++]=c,a=h,l=c);return h==a&&c==l||(s[o++]=h,s[o++]=c),o}function Qn(t,e){return e*Math.round(t/e)}function tr(t,e,i,n,r,s,o){if(e==i)return o;let a,l,h=Qn(t[e],r),c=Qn(t[e+1],r);e+=n,s[o++]=h,s[o++]=c;do{if(a=Qn(t[e],r),l=Qn(t[e+1],r),(e+=n)==i)return s[o++]=a,s[o++]=l,o}while(a==h&&l==c);for(;e0&&f>d)&&(g<0&&p0&&p>g)?(a=i,l=u):(s[o++]=a,s[o++]=l,h=a,c=l,a=i,l=u)}return s[o++]=a,s[o++]=l,o}function er(t,e,i,n,r,s,o,a){for(let l=0,h=i.length;ls&&(i-a)*(s-l)-(r-a)*(n-l)>0&&o++:n<=s&&(i-a)*(s-l)-(r-a)*(n-l)<0&&o--,a=i,l=n}return 0!==o}function pr(t,e,i,n,r,s){if(0===i.length)return!1;if(!fr(t,e,i[0],n,r,s))return!1;for(let e=1,o=i.length;ey&&(c=(u+d)/2,pr(t,e,i,n,c,p)&&(_=c,y=r)),u=d}return isNaN(_)&&(_=r[s]),o?(o.push(_,p,y),o):[_,p,y]}function yr(t,e,i,n,r){let s=[];for(let o=0,a=i.length;o=r[0]&&s[2]<=r[2]||(s[1]>=r[1]&&s[3]<=r[3]||xr(t,e,i,n,(function(t,e){return ze(r,t,e)})))))}function Sr(t,e,i,n,r){for(let s=0,o=i.length;s0}function br(t,e,i,n,r){r=void 0!==r&&r;for(let s=0,o=i.length;s0&&this.points_[i+2]>t;)i-=3;const n=this.points_[e+2]-this.points_[i+2];if(n<1e3/60)return!1;const r=this.points_[e]-this.points_[i],s=this.points_[e+1]-this.points_[i+1];return this.angle_=Math.atan2(s,r),this.initialVelocity_=Math.sqrt(r*r+s*s)/n,this.initialVelocity_>this.minVelocity_}getDistance(){return(this.minVelocity_-this.initialVelocity_)/this.decay_}getAngle(){return this.angle_}};const ls=/^#([a-f0-9]{3}|[a-f0-9]{4}(?:[a-f0-9]{2}){0,2})$/i,hs=/^([a-z]*)$|^hsla?\(.*\)$/i;function cs(t){return"string"==typeof t?t:ps(t)}function us(t){const e=document.createElement("div");if(e.style.color=t,""!==e.style.color){document.body.appendChild(e);const t=getComputedStyle(e).color;return document.body.removeChild(e),t}return""}const ds=function(){const t={};let e=0;return function(i){let n;if(t.hasOwnProperty(i))n=t[i];else{if(e>=1024){let i=0;for(const n in t)0==(3&i++)&&(delete t[n],--e)}n=function(t){let e,i,n,r,s;hs.exec(t)&&(t=us(t));if(ls.exec(t)){const o=t.length-1;let a;a=o<=4?1:2;const l=4===o||8===o;e=parseInt(t.substr(1+0*a,a),16),i=parseInt(t.substr(1+1*a,a),16),n=parseInt(t.substr(1+2*a,a),16),r=l?parseInt(t.substr(1+3*a,a),16):255,1==a&&(e=(e<<4)+e,i=(i<<4)+i,n=(n<<4)+n,l&&(r=(r<<4)+r)),s=[e,i,n,r/255]}else t.startsWith("rgba(")?(s=t.slice(5,-1).split(",").map(Number),fs(s)):t.startsWith("rgb(")?(s=t.slice(4,-1).split(",").map(Number),s.push(1),fs(s)):Ft(!1,14);return s}(i),t[i]=n,++e}return n}}();function gs(t){return Array.isArray(t)?t:ds(t)}function fs(t){return t[0]=_i(t[0]+.5|0,0,255),t[1]=_i(t[1]+.5|0,0,255),t[2]=_i(t[2]+.5|0,0,255),t[3]=_i(t[3],0,1),t}function ps(t){let e=t[0];e!=(0|e)&&(e=e+.5|0);let i=t[1];i!=(0|i)&&(i=i+.5|0);let n=t[2];n!=(0|n)&&(n=n+.5|0);return"rgba("+e+","+i+","+n+","+(void 0===t[3]?1:Math.round(100*t[3])/100)+")"}function ms(t){return hs.test(t)&&(t=us(t)),ls.test(t)||t.startsWith("rgba(")||t.startsWith("rgb(")}class _s{constructor(){this.cache_={},this.cacheSize_=0,this.maxCacheSize_=32}clear(){this.cache_={},this.cacheSize_=0}canExpireCache(){return this.cacheSize_>this.maxCacheSize_}expire(){if(this.canExpireCache()){let t=0;for(const e in this.cache_){const i=this.cache_[e];0!=(3&t++)||i.hasListener()||(delete this.cache_[e],--this.cacheSize_)}}}get(t,e,i){const n=ys(t,e,i);return n in this.cache_?this.cache_[n]:null}set(t,e,i,n){const r=ys(t,e,i);this.cache_[r]=n,++this.cacheSize_}setSize(t){this.maxCacheSize_=t,this.expire()}}function ys(t,e,i){return e+":"+t+":"+(i?cs(i):"null")}var xs=_s;const vs=new _s;var Ss="opacity",ws="visible",Ts="extent",Es="zIndex",Cs="maxResolution",Rs="minResolution",bs="maxZoom",Ps="minZoom",Is="source",Ls="map";var Fs=class extends W{constructor(t){super(),this.on,this.once,this.un,this.background_=t.background;const e=Object.assign({},t);"object"==typeof t.properties&&(delete e.properties,Object.assign(e,t.properties)),e[Ss]=void 0!==t.opacity?t.opacity:1,Ft("number"==typeof e[Ss],64),e[ws]=void 0===t.visible||t.visible,e[Es]=t.zIndex,e[Cs]=void 0!==t.maxResolution?t.maxResolution:1/0,e[Rs]=void 0!==t.minResolution?t.minResolution:0,e[Ps]=void 0!==t.minZoom?t.minZoom:-1/0,e[bs]=void 0!==t.maxZoom?t.maxZoom:1/0,this.className_=void 0!==e.className?e.className:"ol-layer",delete e.className,this.setProperties(e),this.state_=null}getBackground(){return this.background_}getClassName(){return this.className_}getLayerState(t){const e=this.state_||{layer:this,managed:void 0===t||t},i=this.getZIndex();return e.opacity=_i(Math.round(100*this.getOpacity())/100,0,1),e.visible=this.getVisible(),e.extent=this.getExtent(),e.zIndex=void 0!==i||e.managed?i:1/0,e.maxResolution=this.getMaxResolution(),e.minResolution=Math.max(this.getMinResolution(),0),e.minZoom=this.getMinZoom(),e.maxZoom=this.getMaxZoom(),this.state_=e,e}getLayersArray(t){return z()}getLayerStatesArray(t){return z()}getExtent(){return this.get(Ts)}getMaxResolution(){return this.get(Cs)}getMinResolution(){return this.get(Rs)}getMinZoom(){return this.get(Ps)}getMaxZoom(){return this.get(bs)}getOpacity(){return this.get(Ss)}getSourceState(){return z()}getVisible(){return this.get(ws)}getZIndex(){return this.get(Es)}setBackground(t){this.background_=t,this.changed()}setExtent(t){this.set(Ts,t)}setMaxResolution(t){this.set(Cs,t)}setMinResolution(t){this.set(Rs,t)}setMaxZoom(t){this.set(bs,t)}setMinZoom(t){this.set(Ps,t)}setOpacity(t){Ft("number"==typeof t,64),this.set(Ss,t)}setVisible(t){this.set(ws,t)}setZIndex(t){this.set(Es,t)}disposeInternal(){this.state_&&(this.state_.layer=null,this.state_=null),super.disposeInternal()}},Ms="prerender",As="postrender",Os="precompose",Ns="postcompose",Ds="rendercomplete";function Gs(t,e){if(!t.visible)return!1;const i=e.resolution;if(i=t.maxResolution)return!1;const n=e.zoom;return n>t.minZoom&&n<=t.maxZoom}var ks=class extends Fs{constructor(t){const e=Object.assign({},t);delete e.source,super(e),this.on,this.once,this.un,this.mapPrecomposeKey_=null,this.mapRenderKey_=null,this.sourceChangeKey_=null,this.renderer_=null,this.sourceReady_=!1,this.rendered=!1,t.render&&(this.render=t.render),t.map&&this.setMap(t.map),this.addChangeListener(Is,this.handleSourcePropertyChange_);const i=t.source?t.source:null;this.setSource(i)}getLayersArray(t){return(t=t||[]).push(this),t}getLayerStatesArray(t){return(t=t||[]).push(this.getLayerState()),t}getSource(){return this.get(Is)||null}getRenderSource(){return this.getSource()}getSourceState(){const t=this.getSource();return t?t.getState():"undefined"}handleSourceChange_(){this.changed(),this.sourceReady_||"ready"!==this.getSource().getState()||(this.sourceReady_=!0,this.dispatchEvent("sourceready"))}handleSourcePropertyChange_(){this.sourceChangeKey_&&(G(this.sourceChangeKey_),this.sourceChangeKey_=null),this.sourceReady_=!1;const t=this.getSource();t&&(this.sourceChangeKey_=N(t,w,this.handleSourceChange_,this),"ready"===t.getState()&&(this.sourceReady_=!0,setTimeout((()=>{this.dispatchEvent("sourceready")}),0))),this.changed()}getFeatures(t){return this.renderer_?this.renderer_.getFeatures(t):Promise.resolve([])}getData(t){return this.renderer_&&this.rendered?this.renderer_.getData(t):null}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(Ls,t)}getMapInternal(){return this.get(Ls)}setMap(t){this.mapPrecomposeKey_&&(G(this.mapPrecomposeKey_),this.mapPrecomposeKey_=null),t||this.changed(),this.mapRenderKey_&&(G(this.mapRenderKey_),this.mapRenderKey_=null),t&&(this.mapPrecomposeKey_=N(t,Os,(function(t){const e=t.frameState.layerStatesArray,i=this.getLayerState(!1);Ft(!e.some((function(t){return t.layer===i.layer})),67),e.push(i)}),this),this.mapRenderKey_=N(this,w,t.render,t),this.changed())}setSource(t){this.set(Is,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 js(t,e){vs.expire()}var Bs=class extends o{constructor(t){super(),this.map_=t}dispatchRenderEvent(t,e){z()}calculateMatrices2D(t){const e=t.viewState,i=t.coordinateToPixelTransform,n=t.pixelToCoordinateTransform;Zt(i,t.size[0]/2,t.size[1]/2,1/e.resolution,-1/e.resolution,-e.rotation,-e.center[0],-e.center[1]),Yt(n,i)}forEachFeatureAtCoordinate(t,e,i,n,r,s,o,a){let l;const h=e.viewState;function c(t,e,i,n){return r.call(s,e,t?i:null,n)}const u=h.projection,d=Xi(t.slice(),u),g=[[0,0]];if(u.canWrapX()&&n){const t=De(u.getExtent());g.push([-t,0],[t,0])}const f=e.layerStatesArray,p=f.length,m=[],_=[];for(let n=0;n=0;--r){const s=f[r],u=s.layer;if(u.hasRenderer()&&Gs(s,h)&&o.call(a,u)){const r=u.getRenderer(),o=u.getSource();if(r&&o){const a=o.getWrapX()?d:t,h=c.bind(null,s.managed);_[0]=a[0]+g[n][0],_[1]=a[1]+g[n][1],l=r.forEachFeatureAtCoordinate(_,e,i,h,m)}if(l)return l}}if(0===m.length)return;const y=1/m.length;return m.forEach(((t,e)=>t.distanceSq+=e*y)),m.sort(((t,e)=>t.distanceSq-e.distanceSq)),m.some((t=>l=t.callback(t.feature,t.layer,t.geometry))),l}hasFeatureAtCoordinate(t,e,i,n,r,s){return void 0!==this.forEachFeatureAtCoordinate(t,e,i,n,f,this,r,s)}getMap(){return this.map_}renderFrame(t){z()}scheduleExpireIconCache(t){vs.canExpireCache()&&t.postRenderFunctions.push(js)}};var zs=class extends r{constructor(t,e,i,n){super(t),this.inversePixelTransform=e,this.frameState=i,this.context=n}};const Us="ol-hidden",Xs="ol-selectable",Vs="ol-unselectable",Ws="ol-unsupported",Zs="ol-control",Ys="ol-collapsed",Ks=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"),qs=["style","variant","weight","size","lineHeight","family"],Hs=function(t){const e=t.match(Ks);if(!e)return null;const i={lineHeight:"normal",size:"1.2em",style:"normal",weight:"normal",variant:"normal"};for(let t=0,n=qs.length;tMath.max(e,po(t,i))),0);return i[e]=n,n}function _o(t,e){const i=[],n=[],r=[];let s=0,o=0,a=0,l=0;for(let h=0,c=e.length;h<=c;h+=2){const u=e[h];if("\n"===u||h===c){s=Math.max(s,o),r.push(o),o=0,a+=l;continue}const d=e[h+1]||t.font,g=po(d,u);i.push(g),o+=g;const f=go(d);n.push(f),l=Math.max(l,f)}return{width:s,height:a,widths:i,heights:n,lineWidths:r}}function yo(t,e,i,n,r,s,o,a,l,h,c){t.save(),1!==i&&(t.globalAlpha*=i),e&&t.setTransform.apply(t,e),n.contextInstructions?(t.translate(l,h),t.scale(c[0],c[1]),function(t,e){const i=t.contextInstructions;for(let t=0,n=i.length;t=0;--e)n[e].renderDeclutter(t);Et(this.element_,this.children_),this.dispatchRenderEvent(Ns,t),this.renderedVisible_||(this.element_.style.display="",this.renderedVisible_=!0),this.scheduleExpireIconCache(t)}};class vo extends r{constructor(t,e){super(t),this.layer=e}}const So="layers";class wo extends Fs{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(So,this.handleLayersChanged_),i?Array.isArray(i)?i=new H(i.slice(),{unique:!0}):Ft("function"==typeof i.getArray,43):i=new H(void 0,{unique:!0}),this.setLayers(i)}handleLayerChange_(){this.changed()}handleLayersChanged_(){this.layersListenerKeys_.forEach(G),this.layersListenerKeys_.length=0;const t=this.getLayers();this.layersListenerKeys_.push(N(t,Z,this.handleLayersAdd_,this),N(t,Y,this.handleLayersRemove_,this));for(const t in this.listenerKeys_)this.listenerKeys_[t].forEach(G);x(this.listenerKeys_);const e=t.getArray();for(let t=0,i=e.length;t{this.clickTimeoutId_=void 0;const e=new Co(Ro.SINGLECLICK,this.map_,t);this.dispatchEvent(e)}),250)}updateActivePointers_(t){const e=t,i=e.pointerId;if(e.type==Ro.POINTERUP||e.type==Ro.POINTERCANCEL){delete this.trackedTouches_[i];for(const t in this.trackedTouches_)if(this.trackedTouches_[t].target!==e.target){delete this.trackedTouches_[t];break}}else e.type!=Ro.POINTERDOWN&&e.type!=Ro.POINTERMOVE||(this.trackedTouches_[i]=e);this.activePointers_=Object.values(this.trackedTouches_)}handlePointerUp_(t){this.updateActivePointers_(t);const e=new Co(Ro.POINTERUP,this.map_,t,void 0,void 0,this.activePointers_);this.dispatchEvent(e),this.emulateClicks_&&!e.defaultPrevented&&!this.dragging_&&this.isMouseActionButton_(t)&&this.emulateClick_(this.down_),0===this.activePointers_.length&&(this.dragListenerKeys_.forEach(G),this.dragListenerKeys_.length=0,this.dragging_=!1,this.down_=null)}isMouseActionButton_(t){return 0===t.button}handlePointerDown_(t){this.emulateClicks_=0===this.activePointers_.length,this.updateActivePointers_(t);const e=new Co(Ro.POINTERDOWN,this.map_,t,void 0,void 0,this.activePointers_);this.dispatchEvent(e),this.down_={};for(const e in t){const i=t[e];this.down_[e]="function"==typeof i?m:i}if(0===this.dragListenerKeys_.length){const t=this.map_.getOwnerDocument();this.dragListenerKeys_.push(N(t,Ro.POINTERMOVE,this.handlePointerMove_,this),N(t,Ro.POINTERUP,this.handlePointerUp_,this),N(this.element_,Ro.POINTERCANCEL,this.handlePointerUp_,this)),this.element_.getRootNode&&this.element_.getRootNode()!==t&&this.dragListenerKeys_.push(N(this.element_.getRootNode(),Ro.POINTERUP,this.handlePointerUp_,this))}}handlePointerMove_(t){if(this.isMoving_(t)){this.updateActivePointers_(t),this.dragging_=!0;const e=new Co(Ro.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 Co(Ro.POINTERMOVE,this.map_,t,e))}handleTouchMove_(t){const e=this.originalPointerMoveEvent_;e&&!e.defaultPrevented||"boolean"==typeof t.cancelable&&!0!==t.cancelable||t.preventDefault()}isMoving_(t){return this.dragging_||Math.abs(t.clientX-this.down_.clientX)>this.moveTolerance_||Math.abs(t.clientY-this.down_.clientY)>this.moveTolerance_}disposeInternal(){this.relayedListenerKey_&&(G(this.relayedListenerKey_),this.relayedListenerKey_=null),this.element_.removeEventListener(A,this.boundHandleTouchMove_),this.pointerdownListenerKey_&&(G(this.pointerdownListenerKey_),this.pointerdownListenerKey_=null),this.dragListenerKeys_.forEach(G),this.dragListenerKeys_.length=0,this.element_=null,super.disposeInternal()}},Mo="postrender",Ao="movestart",Oo="moveend",No="loadstart",Do="loadend",Go="layergroup",ko="size",jo="target",Bo="view";const zo=1/0;var Uo=class{constructor(t,e){this.priorityFunction_=t,this.keyFunction_=e,this.elements_=[],this.priorities_=[],this.queuedElements_={}}clear(){this.elements_.length=0,this.priorities_.length=0,x(this.queuedElements_)}dequeue(){const t=this.elements_,e=this.priorities_,i=t[0];1==t.length?(t.length=0,e.length=0):(t[0]=t.pop(),e[0]=e.pop(),this.siftUp_(0));const n=this.keyFunction_(i);return delete this.queuedElements_[n],i}enqueue(t){Ft(!(this.keyFunction_(t)in this.queuedElements_),31);const e=this.priorityFunction_(t);return e!=zo&&(this.elements_.push(t),this.priorities_.push(e),this.queuedElements_[this.keyFunction_(t)]=!0,this.siftDown_(0,this.elements_.length-1),!0)}getCount(){return this.elements_.length}getLeftChildIndex_(t){return 2*t+1}getRightChildIndex_(t){return 2*t+2}getParentIndex_(t){return t-1>>1}heapify_(){let t;for(t=(this.elements_.length>>1)-1;t>=0;t--)this.siftUp_(t)}isEmpty(){return 0===this.elements_.length}isKeyQueued(t){return t in this.queuedElements_}isQueued(t){return this.isKeyQueued(this.keyFunction_(t))}siftUp_(t){const e=this.elements_,i=this.priorities_,n=e.length,r=e[t],s=i[t],o=t;for(;t>1;){const r=this.getLeftChildIndex_(t),s=this.getRightChildIndex_(t),o=st;){const t=this.getParentIndex_(e);if(!(n[t]>s))break;i[e]=i[t],n[e]=n[t],e=t}i[e]=r,n[e]=s}reprioritize(){const t=this.priorityFunction_,e=this.elements_,i=this.priorities_;let n=0;const r=e.length;let s,o,a;for(o=0;o0;)n=this.dequeue()[0],r=n.getKey(),i=n.getState(),i!==$||r in this.tilesLoadingKeys_||(this.tilesLoadingKeys_[r]=!0,++this.tilesLoading_,++s,n.load())}};function Vo(t,e,i,n,r){if(!t||!(i in t.wantedTiles))return zo;if(!t.wantedTiles[i][e.getKey()])return zo;const s=t.viewState.center,o=n[0]-s[0],a=n[1]-s[1];return 65536*Math.log(r)+Math.sqrt(o*o+a*a)/r}var Wo=0,Zo=1,Yo={CENTER:"center",RESOLUTION:"resolution",ROTATION:"rotation"};const Ko=256;function qo(t,e,i){return function(n,r,s,o,a){if(!n)return;if(!r&&!e)return n;const l=e?0:s[0]*r,h=e?0:s[1]*r,c=a?a[0]:0,u=a?a[1]:0;let d=t[0]+l/2+c,g=t[2]-l/2+c,f=t[1]+h/2+u,p=t[3]-h/2+u;d>g&&(d=(g+d)/2,g=d),f>p&&(f=(p+f)/2,p=f);let m=_i(n[0],d,g),_=_i(n[1],f,p);if(o&&i&&r){const t=30*r;m+=-t*Math.log(1+Math.max(0,d-n[0])/t)+t*Math.log(1+Math.max(0,n[0]-g)/t),_+=-t*Math.log(1+Math.max(0,f-n[1])/t)+t*Math.log(1+Math.max(0,n[1]-p)/t)}return[m,_]}}function Ho(t){return t}function $o(t,e,i,n){const r=De(e)/i[0],s=Me(e)/i[1];return n?Math.min(t,Math.max(r,s)):Math.min(t,Math.min(r,s))}function Jo(t,e,i){let n=Math.min(t,e);return n*=Math.log(1+50*Math.max(0,t/e-1))/50+1,i&&(n=Math.max(n,i),n/=Math.log(1+50*Math.max(0,i/t-1))/50+1),_i(n,i/2,2*e)}function Qo(t,e,i,n){return e=void 0===e||e,function(r,s,o,a){if(void 0!==r){const l=t[0],c=t[t.length-1],u=i?$o(l,i,o,n):l;if(a)return e?Jo(r,u,c):_i(r,c,u);const d=Math.min(u,r),g=Math.floor(h(t,d,s));return t[g]>u&&g1&&"function"==typeof arguments[i-1]&&(e=arguments[i-1],--i);let n=0;for(;n0}getInteracting(){return this.hints_[Zo]>0}cancelAnimations(){let t;this.setHint(Wo,-this.hints_[Wo]);for(let e=0,i=this.animations_.length;e=0;--i){const n=this.animations_[i];let r=!0;for(let i=0,s=n.length;i0?o/s.duration:1;a>=1?(s.complete=!0,a=1):r=!1;const l=s.easing(a);if(s.sourceCenter){const t=s.sourceCenter[0],e=s.sourceCenter[1],i=s.targetCenter[0],n=s.targetCenter[1];this.nextCenter_=s.targetCenter;const r=t+l*(i-t),o=e+l*(n-e);this.targetCenter_=[r,o]}if(s.sourceResolution&&s.targetResolution){const t=1===l?s.targetResolution:s.sourceResolution+l*(s.targetResolution-s.sourceResolution);if(s.anchor){const e=this.getViewportSize_(this.getRotation()),i=this.constraints_.resolution(t,0,e,!0);this.targetCenter_=this.calculateCenterZoom(i,s.anchor)}this.nextResolution_=s.targetResolution,this.targetResolution_=t,this.applyTargetState_(!0)}if(void 0!==s.sourceRotation&&void 0!==s.targetRotation){const t=1===l?Ti(s.targetRotation+Math.PI,2*Math.PI)-Math.PI:s.sourceRotation+l*(s.targetRotation-s.sourceRotation);if(s.anchor){const e=this.constraints_.rotation(t,!0);this.targetCenter_=this.calculateCenterRotate(e,s.anchor)}this.nextRotation_=s.targetRotation,this.targetRotation_=t}if(this.applyTargetState_(!0),e=!0,!s.complete)break}if(r){this.animations_[i]=null,this.setHint(Wo,-1),this.nextCenter_=null,this.nextResolution_=NaN,this.nextRotation_=NaN;const t=n[0].callback;t&&oa(t,!0)}}this.animations_=this.animations_.filter(Boolean),e&&void 0===this.updateAnimationKey_&&(this.updateAnimationKey_=requestAnimationFrame(this.updateAnimations_.bind(this)))}calculateCenterRotate(t,e){let i;const n=this.getCenterInternal();return void 0!==n&&(i=[n[0]-e[0],n[1]-e[1]],Gi(i,t-this.getRotation()),Fi(i,e)),i}calculateCenterZoom(t,e){let i;const n=this.getCenterInternal(),r=this.getResolution();if(void 0!==n&&void 0!==r){i=[e[0]-t*(e[0]-n[0])/r,e[1]-t*(e[1]-n[1])/r]}return i}getViewportSize_(t){const e=this.viewportSize_;if(t){const i=e[0],n=e[1];return[Math.abs(i*Math.cos(t))+Math.abs(n*Math.sin(t)),Math.abs(i*Math.sin(t))+Math.abs(n*Math.cos(t))]}return e}setViewportSize(t){this.viewportSize_=Array.isArray(t)?t.slice():[100,100],this.getAnimating()||this.resolveConstraints(0)}getCenter(){const t=this.getCenterInternal();return t?wn(t,this.getProjection()):t}getCenterInternal(){return this.get(Yo.CENTER)}getConstraints(){return this.constraints_}getConstrainResolution(){return this.get("constrainResolution")}getHints(t){return void 0!==t?(t[0]=this.hints_[0],t[1]=this.hints_[1],t):this.hints_.slice()}calculateExtent(t){return En(this.calculateExtentInternal(t),this.getProjection())}calculateExtentInternal(t){t=t||this.getViewportSizeMinusPadding_();const e=this.getCenterInternal();Ft(e,1);const i=this.getResolution();Ft(void 0!==i,2);const n=this.getRotation();return Ft(void 0!==n,3),Le(e,i,n,t)}getMaxResolution(){return this.maxResolution_}getMinResolution(){return this.minResolution_}getMaxZoom(){return this.getZoomForResolution(this.minResolution_)}setMaxZoom(t){this.applyOptions_(this.getUpdatedOptions_({maxZoom:t}))}getMinZoom(){return this.getZoomForResolution(this.maxResolution_)}setMinZoom(t){this.applyOptions_(this.getUpdatedOptions_({minZoom:t}))}setConstrainResolution(t){this.applyOptions_(this.getUpdatedOptions_({constrainResolution:t}))}getProjection(){return this.projection_}getResolution(){return this.get(Yo.RESOLUTION)}getResolutions(){return this.resolutions_}getResolutionForExtent(t,e){return this.getResolutionForExtentInternal(Cn(t,this.getProjection()),e)}getResolutionForExtentInternal(t,e){e=e||this.getViewportSizeMinusPadding_();const i=De(t)/e[0],n=Me(t)/e[1];return Math.max(i,n)}getResolutionForValueFunction(t){t=t||2;const e=this.getConstrainedResolution(this.maxResolution_),i=this.minResolution_,n=Math.log(e/i)/Math.log(t);return function(i){return e/Math.pow(t,i*n)}}getRotation(){return this.get(Yo.ROTATION)}getValueForResolutionFunction(t){const e=Math.log(t||2),i=this.getConstrainedResolution(this.maxResolution_),n=this.minResolution_,r=Math.log(i/n)/e;return function(t){return Math.log(i/t)/e/r}}getViewportSizeMinusPadding_(t){let e=this.getViewportSize_(t);const i=this.padding_;return i&&(e=[e[0]-i[1]-i[3],e[1]-i[0]-i[2]]),e}getState(){const t=this.getProjection(),e=this.getResolution(),i=this.getRotation();let n=this.getCenterInternal();const r=this.padding_;if(r){const t=this.getViewportSizeMinusPadding_();n=ua(n,this.getViewportSize_(),[t[0]/2+r[3],t[1]/2+r[0]],e,i)}return{center:n.slice(0),projection:void 0!==t?t:null,resolution:e,nextCenter:this.nextCenter_,nextResolution:this.nextResolution_,nextRotation:this.nextRotation_,rotation:i,zoom:this.getZoom()}}getZoom(){let t;const e=this.getResolution();return void 0!==e&&(t=this.getZoomForResolution(e)),t}getZoomForResolution(t){let e,i,n=this.minZoom_||0;if(this.resolutions_){const r=h(this.resolutions_,t,1);n=r,e=this.resolutions_[r],i=r==this.resolutions_.length-1?2:e/this.resolutions_[r+1]}else e=this.maxResolution_,i=this.zoomFactor_;return n+Math.log(e/t)/Math.log(i)}getResolutionForZoom(t){if(this.resolutions_){if(this.resolutions_.length<=1)return 0;const e=_i(Math.floor(t),0,this.resolutions_.length-2),i=this.resolutions_[e]/this.resolutions_[e+1];return this.resolutions_[e]/Math.pow(i,_i(t-e,0,1))}return this.maxResolution_/Math.pow(this.zoomFactor_,t-this.minZoom_)}fit(t,e){let i;if(Ft(Array.isArray(t)||"function"==typeof t.getSimplifiedGeometry,24),Array.isArray(t)){Ft(!ke(t),25);i=Nr(Cn(t,this.getProjection()))}else if("Circle"===t.getType()){const e=Cn(t.getExtent(),this.getProjection());i=Nr(e),i.rotate(this.getRotation(),Pe(e))}else{const e=Sn();i=e?t.clone().transform(e,this.getProjection()):t}this.fitInternal(i,e)}rotatedExtentForGeometry(t){const e=this.getRotation(),i=Math.cos(e),n=Math.sin(-e),r=t.getFlatCoordinates(),s=t.getStride();let o=1/0,a=1/0,l=-1/0,h=-1/0;for(let t=0,e=r.length;t0;if(this.renderedVisible_!=i&&(this.element.style.display=i?"":"none",this.renderedVisible_=i),!d(e,this.renderedAttributions_)){Tt(this.ulElement_);for(let t=0,i=e.length;t0&&e%(2*Math.PI)!=0?t.animate({rotation:0,duration:this.duration_,easing:nt}):t.setRotation(0))}render(t){const e=t.frameState;if(!e)return;const i=e.viewState.rotation;if(i!=this.rotation_){const t="rotate("+i+"rad)";if(this.autoHide_){const t=this.element.classList.contains(Us);t||0!==i?t&&0!==i&&this.element.classList.remove(Us):this.element.classList.add(Us)}this.label_.style.transform=t}this.rotation_=i}};var ma=class extends ga{constructor(t){t=t||{},super({element:document.createElement("div"),target:t.target});const e=void 0!==t.className?t.className:"ol-zoom",i=void 0!==t.delta?t.delta:1,n=void 0!==t.zoomInClassName?t.zoomInClassName:e+"-in",r=void 0!==t.zoomOutClassName?t.zoomOutClassName:e+"-out",s=void 0!==t.zoomInLabel?t.zoomInLabel:"+",o=void 0!==t.zoomOutLabel?t.zoomOutLabel:"–",a=void 0!==t.zoomInTipLabel?t.zoomInTipLabel:"Zoom in",l=void 0!==t.zoomOutTipLabel?t.zoomOutTipLabel:"Zoom out",h=document.createElement("button");h.className=n,h.setAttribute("type","button"),h.title=a,h.appendChild("string"==typeof s?document.createTextNode(s):s),h.addEventListener(C,this.handleClick_.bind(this,i),!1);const c=document.createElement("button");c.className=r,c.setAttribute("type","button"),c.title=l,c.appendChild("string"==typeof o?document.createTextNode(o):o),c.addEventListener(C,this.handleClick_.bind(this,-i),!1);const u=e+" "+"ol-unselectable "+Zs,d=this.element;d.className=u,d.appendChild(h),d.appendChild(c),this.duration_=void 0!==t.duration?t.duration:250}handleClick_(t,e){e.preventDefault(),this.zoomByDelta_(t)}zoomByDelta_(t){const e=this.getMap().getView();if(!e)return;const i=e.getZoom();if(void 0!==i){const n=e.getConstrainedZoom(i+t);this.duration_>0?(e.getAnimating()&&e.cancelAnimations(),e.animate({zoom:n,duration:this.duration_,easing:nt})):e.setZoom(n)}}};function _a(t){t=t||{};const e=new H;(void 0===t.zoom||t.zoom)&&e.push(new ma(t.zoomOptions));(void 0===t.rotate||t.rotate)&&e.push(new pa(t.rotateOptions));return(void 0===t.attribution||t.attribution)&&e.push(new fa(t.attributionOptions)),e}var ya="active";function xa(t,e,i){const n=t.getCenterInternal();if(n){const r=[n[0]+e[0],n[1]+e[1]];t.animateInternal({duration:void 0!==i?i:250,easing:st,center:t.getConstrainedCenter(r)})}}function va(t,e,i,n){const r=t.getZoom();if(void 0===r)return;const s=t.getConstrainedZoom(r+e),o=t.getResolutionForZoom(s);t.getAnimating()&&t.cancelAnimations(),t.animate({resolution:o,anchor:i,duration:void 0!==n?n:250,easing:nt})}var Sa=class extends W{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(ya)}getMap(){return this.map_}handleEvent(t){return!0}setActive(t){this.set(ya,t)}setMap(t){this.map_=t}};var wa=class extends Sa{constructor(t){super(),t=t||{},this.delta_=t.delta?t.delta:1,this.duration_=void 0!==t.duration?t.duration:250}handleEvent(t){let e=!1;if(t.type==Ro.DBLCLICK){const i=t.originalEvent,n=t.map,r=t.coordinate,s=i.shiftKey?-this.delta_:this.delta_;va(n.getView(),s,r,this.duration_),i.preventDefault(),e=!0}return!e}};function Ta(t){const e=t.length;let i=0,n=0;for(let r=0;r0}}else if(t.type==Ro.POINTERDOWN){const i=this.handleDownEvent(t);this.handlingDownUpSequence=i,e=this.stopDown(i)}else t.type==Ro.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 Ca(t){const e=arguments;return function(t){let i=!0;for(let n=0,r=e.length;n0&&this.condition_(t)){const e=t.map.getView();return this.lastCentroid=null,e.getAnimating()&&e.cancelAnimations(),this.kinetic_&&this.kinetic_.begin(),this.noKinetic_=this.targetPointers.length>1,!0}return!1}};var Ba=class extends Ea{constructor(t){t=t||{},super({stopDown:p}),this.condition_=t.condition?t.condition:ba,this.lastAngle_=void 0,this.duration_=void 0!==t.duration?t.duration:250}handleDragEvent(t){if(!Ga(t))return;const e=t.map,i=e.getView();if(i.getConstraints().rotation===ia)return;const n=e.getSize(),r=t.pixel,s=Math.atan2(n[1]/2-r[1],r[0]-n[0]/2);if(void 0!==this.lastAngle_){const t=s-this.lastAngle_;i.adjustRotationInternal(-t)}this.lastAngle_=s}handleUpEvent(t){if(!Ga(t))return!0;return t.map.getView().endInteraction(this.duration_),!1}handleDownEvent(t){if(!Ga(t))return!1;if(Fa(t)&&this.condition_(t)){return t.map.getView().beginInteraction(),this.lastAngle_=void 0,!0}return!1}};var za=class extends o{constructor(t){super(),this.geometry_=null,this.element_=document.createElement("div"),this.element_.style.position="absolute",this.element_.style.pointerEvents="auto",this.element_.className="ol-box "+t,this.map_=null,this.startPixel_=null,this.endPixel_=null}disposeInternal(){this.setMap(null)}render_(){const t=this.startPixel_,e=this.endPixel_,i="px",n=this.element_.style;n.left=Math.min(t[0],e[0])+i,n.top=Math.min(t[1],e[1])+i,n.width=Math.abs(e[0]-t[0])+i,n.height=Math.abs(e[1]-t[1])+i}setMap(t){if(this.map_){this.map_.getOverlayContainer().removeChild(this.element_);const t=this.element_.style;t.left="inherit",t.top="inherit",t.width="inherit",t.height="inherit"}this.map_=t,this.map_&&this.map_.getOverlayContainer().appendChild(this.element_)}setPixels(t,e){this.startPixel_=t,this.endPixel_=e,this.createOrUpdateGeometry(),this.render_()}createOrUpdateGeometry(){const t=this.startPixel_,e=this.endPixel_,i=[t,[t[0],e[1]],e,[e[0],t[1]]].map(this.map_.getCoordinateFromPixelInternal,this.map_);i[4]=i[0].slice(),this.geometry_?this.geometry_.setCoordinates([i]):this.geometry_=new Ar([i])}getGeometry(){return this.geometry_}};const Ua="boxstart",Xa="boxdrag",Va="boxend",Wa="boxcancel";class Za extends r{constructor(t,e,i){super(t),this.coordinate=e,this.mapBrowserEvent=i}}var Ya=class extends Ea{constructor(t){super(),this.on,this.once,this.un,t=t||{},this.box_=new za(t.className||"ol-dragbox"),this.minArea_=void 0!==t.minArea?t.minArea:64,t.onBoxEnd&&(this.onBoxEnd=t.onBoxEnd),this.startPixel_=null,this.condition_=t.condition?t.condition:Fa,this.boxEndCondition_=t.boxEndCondition?t.boxEndCondition:this.defaultBoxEndCondition}defaultBoxEndCondition(t,e,i){const n=i[0]-e[0],r=i[1]-e[1];return n*n+r*r>=this.minArea_}getGeometry(){return this.box_.getGeometry()}handleDragEvent(t){this.box_.setPixels(this.startPixel_,t.pixel),this.dispatchEvent(new Za(Xa,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 Za(e?Va:Wa,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 Za(Ua,t.coordinate,t)),!0)}onBoxEnd(t){}};var Ka=class extends Ya{constructor(t){super({condition:(t=t||{}).condition?t.condition:Na,className:t.className||"ol-dragzoom",minArea:t.minArea}),this.duration_=void 0!==t.duration?t.duration:200,this.out_=void 0!==t.out&&t.out}onBoxEnd(t){const e=this.getMap().getView();let i=this.getGeometry();if(this.out_){const t=e.rotatedExtentForGeometry(i),n=e.getResolutionForExtentInternal(t),r=e.getResolution()/n;i=i.clone(),i.scale(r*r)}e.fitInternal(i,{duration:this.duration_,easing:nt})}},qa=37,Ha=38,$a=39,Ja=40;var Qa=class extends Sa{constructor(t){super(),t=t||{},this.defaultCondition_=function(t){return Oa(t)&&Da(t)},this.condition_=void 0!==t.condition?t.condition:this.defaultCondition_,this.duration_=void 0!==t.duration?t.duration:100,this.pixelDelta_=void 0!==t.pixelDelta?t.pixelDelta:128}handleEvent(t){let e=!1;if(t.type==L){const i=t.originalEvent,n=i.keyCode;if(this.condition_(t)&&(n==Ja||n==qa||n==$a||n==Ha)){const r=t.map.getView(),s=r.getResolution()*this.pixelDelta_;let o=0,a=0;n==Ja?a=-s:n==qa?o=-s:n==$a?o=s:a=s;const l=[o,a];Gi(l,r.getRotation()),xa(r,l,this.duration_),i.preventDefault(),e=!0}}return!e}};var tl=class extends Sa{constructor(t){super(),t=t||{},this.condition_=t.condition?t.condition:Da,this.delta_=t.delta?t.delta:1,this.duration_=void 0!==t.duration?t.duration:100}handleEvent(t){let e=!1;if(t.type==L||t.type==F){const i=t.originalEvent,n=i.charCode;if(this.condition_(t)&&(n=="+".charCodeAt(0)||n=="-".charCodeAt(0))){const r=t.map,s=n=="+".charCodeAt(0)?this.delta_:-this.delta_;va(r.getView(),s,void 0,this.duration_),i.preventDefault(),e=!0}}return!e}};var el=class extends Sa{constructor(t){super(t=t||{}),this.totalDelta_=0,this.lastDelta_=0,this.maxDelta_=void 0!==t.maxDelta?t.maxDelta:1,this.duration_=void 0!==t.duration?t.duration:250,this.timeout_=void 0!==t.timeout?t.timeout:80,this.useAnchor_=void 0===t.useAnchor||t.useAnchor,this.constrainResolution_=void 0!==t.constrainResolution&&t.constrainResolution;const e=t.condition?t.condition:La;this.condition_=t.onFocusOnly?Ca(Ia,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))return!0;if(t.type!==O)return!0;const e=t.map,i=t.originalEvent;let n;if(i.preventDefault(),this.useAnchor_&&(this.lastAnchor_=t.coordinate),t.type==O&&(n=i.deltaY,lt&&i.deltaMode===WheelEvent.DOM_DELTA_PIXEL&&(n/=gt),i.deltaMode===WheelEvent.DOM_DELTA_LINE&&(n*=40)),0===n)return!1;this.lastDelta_=n;const r=Date.now();void 0===this.startTime_&&(this.startTime_=r),(!this.mode_||r-this.startTime_>this.trackpadEventGap_)&&(this.mode_=Math.abs(n)<4?"trackpad":"wheel");const s=e.getView();if("trackpad"===this.mode_&&!s.getConstrainResolution()&&!this.constrainResolution_)return this.trackpadTimeoutId_?clearTimeout(this.trackpadTimeoutId_):(s.getAnimating()&&s.cancelAnimations(),s.beginInteraction()),this.trackpadTimeoutId_=setTimeout(this.endInteraction_.bind(this),this.timeout_),s.adjustZoom(-n/this.deltaPerZoom_,this.lastAnchor_),this.startTime_=r,!1;this.totalDelta_+=n;const o=Math.max(this.timeout_-(r-this.startTime_),0);return clearTimeout(this.timeoutId_),this.timeoutId_=setTimeout(this.handleWheelZoom_.bind(this,e),o),!1}handleWheelZoom_(t){const e=t.getView();e.getAnimating()&&e.cancelAnimations();let i=-_i(this.totalDelta_,-this.maxDelta_*this.deltaPerZoom_,this.maxDelta_*this.deltaPerZoom_)/this.deltaPerZoom_;(e.getConstrainResolution()||this.constrainResolution_)&&(i=i?i>0?1:-1:0),va(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)}};var il=class extends Ea{constructor(t){const e=t=t||{};e.stopDown||(e.stopDown=p),super(e),this.anchor_=null,this.lastAngle_=void 0,this.rotating_=!1,this.rotationDelta_=0,this.threshold_=void 0!==t.threshold?t.threshold:.3,this.duration_=void 0!==t.duration?t.duration:250}handleDragEvent(t){let e=0;const i=this.targetPointers[0],n=this.targetPointers[1],r=Math.atan2(n.clientY-i.clientY,n.clientX-i.clientX);if(void 0!==this.lastAngle_){const t=r-this.lastAngle_;this.rotationDelta_+=t,!this.rotating_&&Math.abs(this.rotationDelta_)>this.threshold_&&(this.rotating_=!0),e=t}this.lastAngle_=r;const s=t.map,o=s.getView();o.getConstraints().rotation!==ia&&(this.anchor_=s.getCoordinateFromPixelInternal(s.getEventPixel(Ta(this.targetPointers))),this.rotating_&&(s.render(),o.adjustRotationInternal(e,this.anchor_)))}handleUpEvent(t){if(this.targetPointers.length<2){return t.map.getView().endInteraction(this.duration_),!1}return!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}return!1}};var nl=class extends Ea{constructor(t){const e=t=t||{};e.stopDown||(e.stopDown=p),super(e),this.anchor_=null,this.duration_=void 0!==t.duration?t.duration:400,this.lastDistance_=void 0,this.lastScaleDelta_=1}handleDragEvent(t){let e=1;const i=this.targetPointers[0],n=this.targetPointers[1],r=i.clientX-n.clientX,s=i.clientY-n.clientY,o=Math.sqrt(r*r+s*s);void 0!==this.lastDistance_&&(e=this.lastDistance_/o),this.lastDistance_=o;const a=t.map,l=a.getView();1!=e&&(this.lastScaleDelta_=e),this.anchor_=a.getCoordinateFromPixelInternal(a.getEventPixel(Ta(this.targetPointers))),a.render(),l.adjustResolutionInternal(e,this.anchor_)}handleUpEvent(t){if(this.targetPointers.length<2){const e=t.map.getView(),i=this.lastScaleDelta_>1?1:-1;return e.endInteraction(this.duration_,i),!1}return!0}handleDownEvent(t){if(this.targetPointers.length>=2){const e=t.map;return this.anchor_=null,this.lastDistance_=void 0,this.lastScaleDelta_=1,this.handlingDownUpSequence||e.getView().beginInteraction(),!0}return!1}};function rl(t){t=t||{};const e=new H,i=new as(-.005,.05,100);(void 0===t.altShiftDragRotate||t.altShiftDragRotate)&&e.push(new Ba);(void 0===t.doubleClickZoom||t.doubleClickZoom)&&e.push(new wa({delta:t.zoomDelta,duration:t.zoomDuration}));(void 0===t.dragPan||t.dragPan)&&e.push(new ja({onFocusOnly:t.onFocusOnly,kinetic:i}));(void 0===t.pinchRotate||t.pinchRotate)&&e.push(new il);(void 0===t.pinchZoom||t.pinchZoom)&&e.push(new nl({duration:t.zoomDuration}));(void 0===t.keyboard||t.keyboard)&&(e.push(new Qa),e.push(new tl({delta:t.zoomDelta,duration:t.zoomDuration})));(void 0===t.mouseWheelZoom||t.mouseWheelZoom)&&e.push(new el({onFocusOnly:t.onFocusOnly,duration:t.zoomDuration}));return(void 0===t.shiftDragZoom||t.shiftDragZoom)&&e.push(new Ka({duration:t.zoomDuration})),e}function sl(t,e,i){return void 0===i&&(i=[0,0]),i[0]=t[0]+2*e,i[1]=t[1]+2*e,i}function ol(t){return t[0]>0&&t[1]>0}function al(t,e,i){return void 0===i&&(i=[0,0]),i[0]=t[0]*e+.5|0,i[1]=t[1]*e+.5|0,i}function ll(t,e){return Array.isArray(t)?t:(void 0===e?e=[t,t]:(e[0]=t,e[1]=t),e)}function hl(t){t instanceof ks?t.setMapInternal(null):t instanceof To&&t.getLayers().forEach(hl)}function cl(t,e){if(t instanceof ks)t.setMapInternal(e);else if(t instanceof To){const i=t.getLayers().getArray();for(let t=0,n=i.length;tthis.updateSize())),this.controls=e.controls||_a(),this.interactions=e.interactions||rl({onFocusOnly:!0}),this.overlays_=e.overlays,this.overlayIdIndex_={},this.renderer_=null,this.postRenderFunctions_=[],this.tileQueue_=new Xo(this.getTilePriority.bind(this),this.handleTileChange_.bind(this)),this.addChangeListener(Go,this.handleLayerGroupChanged_),this.addChangeListener(Bo,this.handleViewChanged_),this.addChangeListener(ko,this.handleSizeChanged_),this.addChangeListener(jo,this.handleTargetChanged_),this.setProperties(e.values);const i=this;!t.view||t.view instanceof da||t.view.then((function(t){i.setView(new da(t))})),this.controls.addEventListener(Z,(t=>{t.element.setMap(this)})),this.controls.addEventListener(Y,(t=>{t.element.setMap(null)})),this.interactions.addEventListener(Z,(t=>{t.element.setMap(this)})),this.interactions.addEventListener(Y,(t=>{t.element.setMap(null)})),this.overlays_.addEventListener(Z,(t=>{this.addOverlayInternal_(t.element)})),this.overlays_.addEventListener(Y,(t=>{const e=t.element.getId();void 0!==e&&delete this.overlayIdIndex_[e.toString()],t.element.setMap(null)})),this.controls.forEach((t=>{t.setMap(this)})),this.interactions.forEach((t=>{t.setMap(this)})),this.overlays_.forEach(this.addOverlayInternal_.bind(this))}addControl(t){this.getControls().push(t)}addInteraction(t){this.getInteractions().push(t)}addLayer(t){this.getLayerGroup().getLayers().push(t)}handleLayerAdd_(t){cl(t.layer,this)}addOverlay(t){this.getOverlays().push(t)}addOverlayInternal_(t){const e=t.getId();void 0!==e&&(this.overlayIdIndex_[e.toString()]=t),t.setMap(this)}disposeInternal(){this.controls.clear(),this.interactions.clear(),this.overlays_.clear(),this.resizeObserver_.disconnect(),this.setTarget(null),super.disposeInternal()}forEachFeatureAtPixel(t,e,i){if(!this.frameState_||!this.renderer_)return;const n=this.getCoordinateFromPixelInternal(t),r=void 0!==(i=void 0!==i?i:{}).hitTolerance?i.hitTolerance:0,s=void 0!==i.layerFilter?i.layerFilter:f,o=!1!==i.checkWrapped;return this.renderer_.forEachFeatureAtCoordinate(n,this.frameState_,r,o,e,null,s,null)}getFeaturesAtPixel(t,e){const i=[];return this.forEachFeatureAtPixel(t,(function(t){i.push(t)}),e),i}getAllLayers(){const t=[];return function e(i){i.forEach((function(i){i instanceof To?e(i.getLayers()):t.push(i)}))}(this.getLayers()),t}hasFeatureAtPixel(t,e){if(!this.frameState_||!this.renderer_)return!1;const i=this.getCoordinateFromPixelInternal(t),n=void 0!==(e=void 0!==e?e:{}).layerFilter?e.layerFilter:f,r=void 0!==e.hitTolerance?e.hitTolerance:0,s=!1!==e.checkWrapped;return this.renderer_.hasFeatureAtCoordinate(i,this.frameState_,r,s,n,null)}getEventCoordinate(t){return this.getCoordinateFromPixel(this.getEventPixel(t))}getEventCoordinateInternal(t){return this.getCoordinateFromPixelInternal(this.getEventPixel(t))}getEventPixel(t){const e=this.viewport_.getBoundingClientRect(),i=this.getSize(),n=e.width/i[0],r=e.height/i[1],s="changedTouches"in t?t.changedTouches[0]:t;return[(s.clientX-e.left)/n,(s.clientY-e.top)/r]}getTarget(){return this.get(jo)}getTargetElement(){return this.targetElement_}getCoordinateFromPixel(t){return wn(this.getCoordinateFromPixelInternal(t),this.getView().getProjection())}getCoordinateFromPixelInternal(t){const e=this.frameState_;return e?zt(e.pixelToCoordinateTransform,t.slice()):null}getControls(){return this.controls}getOverlays(){return this.overlays_}getOverlayById(t){const e=this.overlayIdIndex_[t.toString()];return void 0!==e?e:null}getInteractions(){return this.interactions}getLayerGroup(){return this.get(Go)}setLayers(t){const e=this.getLayerGroup();if(t instanceof H)return void e.setLayers(t);const i=e.getLayers();i.clear(),i.extend(t)}getLayers(){return this.getLayerGroup().getLayers()}getLoadingOrNotReady(){const t=this.getLayerGroup().getLayerStatesArray();for(let e=0,i=t.length;e=0;i--){const n=e[i];if(n.getMap()!==this||!n.getActive()||!this.getTargetElement())continue;if(!n.handleEvent(t)||t.propagationStopped)break}}}handlePostRender(){const t=this.frameState_,e=this.tileQueue_;if(!e.isEmpty()){let i=this.maxTilesLoading_,n=i;if(t){const e=t.viewHints;if(e[Wo]||e[Zo]){const e=Date.now()-t.time>8;i=e?0:8,n=e?0:2}}e.getTilesLoading(){this.postRenderTimeoutHandle_=void 0,this.handlePostRender()}),0))}setLayerGroup(t){const e=this.getLayerGroup();e&&this.handleLayerRemove_(new vo("removelayer",e)),this.set(Go,t)}setSize(t){this.set(ko,t)}setTarget(t){this.set(jo,t)}setView(t){if(!t||t instanceof da)return void this.set(Bo,t);this.set(Bo,new da);const e=this;t.then((function(t){e.setView(new da(t))}))}updateSize(){const t=this.getTargetElement();let e;if(t){const i=getComputedStyle(t),n=t.offsetWidth-parseFloat(i.borderLeftWidth)-parseFloat(i.paddingLeft)-parseFloat(i.paddingRight)-parseFloat(i.borderRightWidth),r=t.offsetHeight-parseFloat(i.borderTopWidth)-parseFloat(i.paddingTop)-parseFloat(i.paddingBottom)-parseFloat(i.borderBottomWidth);isNaN(n)||isNaN(r)||(e=[n,r],!ol(e)&&(t.offsetWidth||t.offsetHeight||t.getClientRects().length)&&Ji("No map visible because the map container's width or height are 0."))}const i=this.getSize();!e||i&&d(e,i)||(this.setSize(e),this.updateViewportSize_())}updateViewportSize_(){const t=this.getView();if(t){let e;const i=getComputedStyle(this.viewport_);i.width&&i.height&&(e=[parseInt(i.width,10),parseInt(i.height,10)]),t.setViewportSize(e)}}};const dl="element",gl="map",fl="offset",pl="position",ml="positioning";var _l=class extends W{constructor(t){super(),this.on,this.once,this.un,this.options=t,this.id=t.id,this.insertFirst=void 0===t.insertFirst||t.insertFirst,this.stopEvent=void 0===t.stopEvent||t.stopEvent,this.element=document.createElement("div"),this.element.className=void 0!==t.className?t.className:"ol-overlay-container ol-selectable",this.element.style.position="absolute",this.element.style.pointerEvents="auto",this.autoPan=!0===t.autoPan?{}:t.autoPan||void 0,this.rendered={transform_:"",visible:!0},this.mapPostrenderListenerKey=null,this.addChangeListener(dl,this.handleElementChanged),this.addChangeListener(gl,this.handleMapChanged),this.addChangeListener(fl,this.handleOffsetChanged),this.addChangeListener(pl,this.handlePositionChanged),this.addChangeListener(ml,this.handlePositioningChanged),void 0!==t.element&&this.setElement(t.element),this.setOffset(void 0!==t.offset?t.offset:[0,0]),this.setPositioning(t.positioning||"top-left"),void 0!==t.position&&this.setPosition(t.position)}getElement(){return this.get(dl)}getId(){return this.id}getMap(){return this.get(gl)||null}getOffset(){return this.get(fl)}getPosition(){return this.get(pl)}getPositioning(){return this.get(ml)}handleElementChanged(){Tt(this.element);const t=this.getElement();t&&this.element.appendChild(t)}handleMapChanged(){this.mapPostrenderListenerKey&&(wt(this.element),G(this.mapPostrenderListenerKey),this.mapPostrenderListenerKey=null);const t=this.getMap();if(t){this.mapPostrenderListenerKey=N(t,Mo,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(dl,t)}setMap(t){this.set(gl,t)}setOffset(t){this.set(fl,t)}setPosition(t){this.set(pl,t)}performAutoPan(){this.autoPan&&this.panIntoView(this.autoPan)}panIntoView(t){const e=this.getMap();if(!e||!e.getTargetElement()||!this.get(pl))return;const i=this.getRect(e.getTargetElement(),e.getSize()),n=this.getElement(),r=this.getRect(n,[xt(n),vt(n)]),s=void 0===(t=t||{}).margin?20:t.margin;if(!le(i,r)){const n=r[0]-i[0],o=i[2]-r[2],a=r[1]-i[1],l=i[3]-r[3],h=[0,0];if(n<0?h[0]=n-s:o<0&&(h[0]=Math.abs(o)+s),a<0?h[1]=a-s:l<0&&(h[1]=Math.abs(l)+s),0!==h[0]||0!==h[1]){const i=e.getView().getCenterInternal(),n=e.getPixelFromCoordinateInternal(i);if(!n)return;const r=[n[0]+h[0],n[1]+h[1]],s=t.animation||{};e.getView().animateInternal({center:e.getCoordinateFromPixelInternal(r),duration:s.duration,easing:s.easing})}}}getRect(t,e){const i=t.getBoundingClientRect(),n=i.left+window.pageXOffset,r=i.top+window.pageYOffset;return[n,r,n+e[0],r+e[1]]}setPositioning(t){this.set(ml,t)}setVisible(t){this.rendered.visible!==t&&(this.element.style.display=t?"":"none",this.rendered.visible=t)}updatePixelPosition(){const t=this.getMap(),e=this.getPosition();if(!t||!t.isRendered()||!e)return void this.setVisible(!1);const i=t.getPixelFromCoordinate(e),n=t.getSize();this.updateRenderedPosition(i,n)}updateRenderedPosition(t,e){const i=this.element.style,n=this.getOffset(),r=this.getPositioning();this.setVisible(!0);let s="0%",o="0%";"bottom-right"==r||"center-right"==r||"top-right"==r?s="-100%":"bottom-center"!=r&&"center-center"!=r&&"top-center"!=r||(s="-50%"),"bottom-left"==r||"bottom-center"==r||"bottom-right"==r?o="-100%":"center-left"!=r&&"center-center"!=r&&"center-right"!=r||(o="-50%");const a=`translate(${s}, ${o}) translate(${Math.round(t[0]+n[0])+"px"}, ${Math.round(t[1]+n[1])+"px"})`;this.rendered.transform_!=a&&(this.rendered.transform_=a,i.transform=a)}getOptions(){return this.options}};var yl=class{constructor(t){this.highWaterMark=void 0!==t?t:2048,this.count_=0,this.entries_={},this.oldest_=null,this.newest_=null}canExpireCache(){return this.highWaterMark>0&&this.getCount()>this.highWaterMark}expireCache(t){for(;this.canExpireCache();)this.pop()}clear(){this.count_=0,this.entries_={},this.oldest_=null,this.newest_=null}containsKey(t){return this.entries_.hasOwnProperty(t)}forEach(t){let e=this.oldest_;for(;e;)t(e.value_,e.key_,this),e=e.newer}get(t,e){const i=this.entries_[t];return Ft(void 0!==i,15),i===this.newest_||(i===this.oldest_?(this.oldest_=this.oldest_.newer,this.oldest_.older=null):(i.newer.older=i.older,i.older.newer=i.newer),i.newer=null,i.older=this.newest_,this.newest_.newer=i,this.newest_=i),i.value_}remove(t){const e=this.entries_[t];return Ft(void 0!==e,15),e===this.newest_?(this.newest_=e.older,this.newest_&&(this.newest_.newer=null)):e===this.oldest_?(this.oldest_=e.newer,this.oldest_&&(this.oldest_.older=null)):(e.newer.older=e.older,e.older.newer=e.newer),delete this.entries_[t],--this.count_,e.value_}getCount(){return this.count_}getKeys(){const t=new Array(this.count_);let e,i=0;for(e=this.newest_;e;e=e.older)t[i++]=e.key_;return t}getValues(){const t=new Array(this.count_);let e,i=0;for(e=this.newest_;e;e=e.older)t[i++]=e.value_;return t}peekLast(){return this.oldest_.value_}peekLastKey(){return this.oldest_.key_}peekFirstKey(){return this.newest_.key_}peek(t){if(this.containsKey(t))return this.entries_[t].value_}pop(){const t=this.oldest_;return delete this.entries_[t.key_],t.newer&&(t.newer.older=null),this.oldest_=t.newer,this.oldest_||(this.newest_=null),--this.count_,t.value_}replace(t,e){this.get(t),this.entries_[t].value_=e}set(t,e){Ft(!(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}};function xl(t,e,i,n){return void 0!==n?(n[0]=t,n[1]=e,n[2]=i,n):[t,e,i]}function vl(t,e,i){return t+"/"+e+"/"+i}function Sl(t){return vl(t[0],t[1],t[2])}function wl(t){const[e,i,n]=t.substring(t.lastIndexOf("/")+1,t.length).split(",").map(Number);return vl(e,i,n)}function Tl(t){return t.split("/").map(Number)}function El(t){return(t[1]<i||i>e.getMaxZoom())return!1;const s=e.getFullTileRange(i);return!s||s.containsXY(n,r)}var Rl=class extends yl{clear(){for(;this.getCount()>0;)this.pop().release();super.clear()}expireCache(t){for(;this.canExpireCache();){if(this.peekLast().getKey()in t)break;this.pop().release()}}pruneExceptNewestZ(){if(0===this.getCount())return;const t=Tl(this.peekFirstKey())[0];this.forEach((e=>{e.tileCoord[0]!==t&&(this.remove(Sl(e.tileCoord)),e.release())}))}};class bl{constructor(t,e,i,n){this.minX=t,this.maxX=e,this.minY=i,this.maxY=n}contains(t){return this.containsXY(t[1],t[2])}containsTileRange(t){return this.minX<=t.minX&&t.maxX<=this.maxX&&this.minY<=t.minY&&t.maxY<=this.maxY}containsXY(t,e){return this.minX<=t&&t<=this.maxX&&this.minY<=e&&e<=this.maxY}equals(t){return this.minX==t.minX&&this.minY==t.minY&&this.maxX==t.maxX&&this.maxY==t.maxY}extend(t){t.minXthis.maxX&&(this.maxX=t.maxX),t.minYthis.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 Pl(t,e,i,n,r){return void 0!==r?(r.minX=t,r.maxX=e,r.minY=i,r.maxY=n,r):new bl(t,e,i,n)}var Il=bl;const Ll=[];var Fl=class extends ot{constructor(t,e,i,n){super(t,e,{transition:0}),this.context_={},this.executorGroups={},this.declutterExecutorGroups={},this.loadingSourceTiles=0,this.hitDetectionImageData={},this.replayState_={},this.sourceTiles=[],this.errorTileKeys={},this.wantedResolution,this.getSourceTiles=n.bind(void 0,this),this.wrappedTileCoord=i}getContext(t){const e=X(t);return e in this.context_||(this.context_[e]=_t(1,1,Ll)),this.context_[e]}hasContext(t){return X(t)in this.context_}getImage(t){return this.hasContext(t)?this.getContext(t).canvas:null}getReplayState(t){const e=X(t);return e in this.replayState_||(this.replayState_[e]={dirty:!1,renderedRenderOrder:null,renderedResolution:NaN,renderedRevision:-1,renderedTileResolution:NaN,renderedTileRevision:-1,renderedTileZ:-1}),this.replayState_[e]}load(){this.getSourceTiles()}release(){for(const t in this.context_){const e=this.context_[t];yt(e),Ll.push(e.canvas),delete this.context_[t]}super.release()}};var Ml=class extends ot{constructor(t,e,i,n,r,s){super(t,e,s),this.extent=null,this.format_=n,this.features_=null,this.loader_,this.projection=null,this.resolution,this.tileLoadFunction_=r,this.url_=i,this.key=i}getFormat(){return this.format_}getFeatures(){return this.features_}load(){this.state==$&&(this.setState(J),this.tileLoadFunction_(this,this.url_),this.loader_&&this.loader_(this.extent,this.resolution,this.projection))}onLoad(t,e){this.setFeatures(t)}onError(){this.setState(tt)}setFeatures(t){this.features_=t,this.setState(Q)}setLoader(t){this.loader_=t}};function Al(t){return Array.isArray(t)?ps(t):t}let Ol,Nl=!1;function Dl(t,e,i,n,r,s,o){const a=new XMLHttpRequest;a.open("GET","function"==typeof t?t(i,n,r):t,!0),"arraybuffer"==e.getType()&&(a.responseType="arraybuffer"),a.withCredentials=Nl,a.onload=function(t){if(!a.status||a.status>=200&&a.status<300){const t=e.getType();let n;"json"==t||"text"==t?n=a.responseText:"xml"==t?(n=a.responseXML,n||(n=(new DOMParser).parseFromString(a.responseText,"application/xml"))):"arraybuffer"==t&&(n=a.response),n?s(e.readFeatures(n,{extent:i,featureProjection:r}),e.readProjection(n)):o()}else o()},a.onerror=o,a.send()}function Gl(t,e){return function(i,n,r,s,o){const a=this;Dl(t,e,i,n,r,(function(t,e){a.addFeatures(t),void 0!==s&&s(t)}),o||m)}}function kl(t,e){return[[-1/0,-1/0,1/0,1/0]]}function jl(t,e,i,n){const r=document.createElement("script"),s="olc_"+X(e);function o(){delete window[s],r.parentNode.removeChild(r)}r.async=!0,r.src=t+(t.includes("?")?"&":"?")+(n||"callback")+"="+s;const a=setTimeout((function(){o(),i&&i()}),1e4);window[s]=function(t){clearTimeout(a),o(),e(t)},document.head.appendChild(r)}class Bl extends Error{constructor(t){super("Unexpected response status: "+t.status),this.name="ResponseError",this.response=t}}class zl extends Error{constructor(t){super("Failed to issue request"),this.name="ClientError",this.client=t}}function Ul(t){return new Promise((function(e,i){const n=new XMLHttpRequest;n.addEventListener("load",(function(t){const n=t.target;if(!n.status||n.status>=200&&n.status<300){let t;try{t=JSON.parse(n.responseText)}catch(t){const e="Error parsing response text as JSON: "+t.message;return void i(new Error(e))}e(t)}else i(new Bl(n))})),n.addEventListener("error",(function(t){i(new zl(t.target))})),n.open("GET",t),n.setRequestHeader("Accept","application/json"),n.send()}))}function Xl(t,e){return e.includes("://")?e:new URL(e,t).href}var Vl=class{drawCustom(t,e,i,n){}drawGeometry(t){}setStyle(t){}drawCircle(t,e){}drawFeature(t,e){}drawGeometryCollection(t,e){}drawLineString(t,e){}drawMultiLineString(t,e){}drawMultiPoint(t,e){}drawMultiPolygon(t,e){}drawPoint(t,e){}drawPolygon(t,e){}drawText(t,e){}setFillStrokeStyle(t,e){}setImageStyle(t,e){}setTextStyle(t,e){}};var Wl=class extends Vl{constructor(t,e,i,n,r,s,o){super(),this.context_=t,this.pixelRatio_=e,this.extent_=i,this.transform_=n,this.transformRotation_=n?Ci(Math.atan2(n[1],n[0]),10):0,this.viewRotation_=r,this.squaredTolerance_=s,this.userTransform_=o,this.contextFillState_=null,this.contextStrokeState_=null,this.contextTextState_=null,this.fillState_=null,this.strokeState_=null,this.image_=null,this.imageAnchorX_=0,this.imageAnchorY_=0,this.imageHeight_=0,this.imageOpacity_=0,this.imageOriginX_=0,this.imageOriginY_=0,this.imageRotateWithView_=!1,this.imageRotation_=0,this.imageScale_=[0,0],this.imageWidth_=0,this.text_="",this.textOffsetX_=0,this.textOffsetY_=0,this.textRotateWithView_=!1,this.textRotation_=0,this.textScale_=[0,0],this.textFillState_=null,this.textStrokeState_=null,this.textState_=null,this.pixelCoordinates_=[],this.tmpLocalTransform_=[1,0,0,1,0,0]}drawImages_(t,e,i,n){if(!this.image_)return;const r=Ln(t,e,i,n,this.transform_,this.pixelCoordinates_),s=this.context_,o=this.tmpLocalTransform_,a=s.globalAlpha;1!=this.imageOpacity_&&(s.globalAlpha=a*this.imageOpacity_);let l=this.imageRotation_;0===this.transformRotation_&&(l-=this.viewRotation_),this.imageRotateWithView_&&(l+=this.viewRotation_);for(let t=0,e=r.length;tt*this.pixelRatio_)),lineDashOffset:(r||0)*this.pixelRatio_,lineJoin:void 0!==s?s:eo,lineWidth:(void 0!==o?o:1)*this.pixelRatio_,miterLimit:void 0!==a?a:io,strokeStyle:Al(t||no)}}else this.strokeState_=null}setImageStyle(t){let e;if(!t||!(e=t.getSize()))return void(this.image_=null);const i=t.getPixelRatio(this.pixelRatio_),n=t.getAnchor(),r=t.getOrigin();this.image_=t.getImage(this.pixelRatio_),this.imageAnchorX_=n[0]*i,this.imageAnchorY_=n[1]*i,this.imageHeight_=e[1]*i,this.imageOpacity_=t.getOpacity(),this.imageOriginX_=r[0],this.imageOriginY_=r[1],this.imageRotateWithView_=t.getRotateWithView(),this.imageRotation_=t.getRotation();const s=t.getScaleArray();this.imageScale_=[s[0]*this.pixelRatio_/i,s[1]*this.pixelRatio_/i],this.imageWidth_=e[0]*i}setTextStyle(t){if(t){const e=t.getFill();if(e){const t=e.getColor();this.textFillState_={fillStyle:Al(t||Js)}}else this.textFillState_=null;const i=t.getStroke();if(i){const t=i.getColor(),e=i.getLineCap(),n=i.getLineDash(),r=i.getLineDashOffset(),s=i.getLineJoin(),o=i.getWidth(),a=i.getMiterLimit();this.textStrokeState_={lineCap:void 0!==e?e:Qs,lineDash:n||to,lineDashOffset:r||0,lineJoin:void 0!==s?s:eo,lineWidth:void 0!==o?o:1,miterLimit:void 0!==a?a:io,strokeStyle:Al(t||no)}}else this.textStrokeState_=null;const n=t.getFont(),r=t.getOffsetX(),s=t.getOffsetY(),o=t.getRotateWithView(),a=t.getRotation(),l=t.getScaleArray(),h=t.getText(),c=t.getTextAlign(),u=t.getTextBaseline();this.textState_={font:void 0!==n?n:$s,textAlign:void 0!==c?c:ro,textBaseline:void 0!==u?u:so},this.text_=void 0!==h?Array.isArray(h)?h.reduce(((t,e,i)=>t+(i%2?" ":e)),""):h:"",this.textOffsetX_=void 0!==r?this.pixelRatio_*r:0,this.textOffsetY_=void 0!==s?this.pixelRatio_*s:0,this.textRotateWithView_=void 0!==o&&o,this.textRotation_=void 0!==a?a:0,this.textScale_=[this.pixelRatio_*l[0],this.pixelRatio_*l[1]]}else this.text_=""}};const Zl={Point:function(t,e,i,n,r){const s=i.getImage(),o=i.getText();let a;if(s){if(s.getImageState()!=ts)return;let l=t;if(r){const h=s.getDeclutterMode();if("none"!==h)if(l=r,"obstacle"===h){const r=t.getBuilder(i.getZIndex(),"Image");r.setImageStyle(s,a),r.drawPoint(e,n)}else o&&o.getText()&&(a={})}const h=l.getBuilder(i.getZIndex(),"Image");h.setImageStyle(s,a),h.drawPoint(e,n)}if(o&&o.getText()){let s=t;r&&(s=r);const l=s.getBuilder(i.getZIndex(),"Text");l.setTextStyle(o,a),l.drawText(e,n)}},LineString:function(t,e,i,n,r){const s=i.getStroke();if(s){const r=t.getBuilder(i.getZIndex(),"LineString");r.setFillStrokeStyle(null,s),r.drawLineString(e,n)}const o=i.getText();if(o&&o.getText()){const s=(r||t).getBuilder(i.getZIndex(),"Text");s.setTextStyle(o),s.drawText(e,n)}},Polygon:function(t,e,i,n,r){const s=i.getFill(),o=i.getStroke();if(s||o){const r=t.getBuilder(i.getZIndex(),"Polygon");r.setFillStrokeStyle(s,o),r.drawPolygon(e,n)}const a=i.getText();if(a&&a.getText()){const s=(r||t).getBuilder(i.getZIndex(),"Text");s.setTextStyle(a),s.drawText(e,n)}},MultiPoint:function(t,e,i,n,r){const s=i.getImage(),o=i.getText();let a;if(s){if(s.getImageState()!=ts)return;let l=t;if(r){const h=s.getDeclutterMode();if("none"!==h)if(l=r,"obstacle"===h){const r=t.getBuilder(i.getZIndex(),"Image");r.setImageStyle(s,a),r.drawMultiPoint(e,n)}else o&&o.getText()&&(a={})}const h=l.getBuilder(i.getZIndex(),"Image");h.setImageStyle(s,a),h.drawMultiPoint(e,n)}if(o&&o.getText()){let s=t;r&&(s=r);const l=s.getBuilder(i.getZIndex(),"Text");l.setTextStyle(o,a),l.drawText(e,n)}},MultiLineString:function(t,e,i,n,r){const s=i.getStroke();if(s){const r=t.getBuilder(i.getZIndex(),"LineString");r.setFillStrokeStyle(null,s),r.drawMultiLineString(e,n)}const o=i.getText();if(o&&o.getText()){const s=(r||t).getBuilder(i.getZIndex(),"Text");s.setTextStyle(o),s.drawText(e,n)}},MultiPolygon:function(t,e,i,n,r){const s=i.getFill(),o=i.getStroke();if(o||s){const r=t.getBuilder(i.getZIndex(),"Polygon");r.setFillStrokeStyle(s,o),r.drawMultiPolygon(e,n)}const a=i.getText();if(a&&a.getText()){const s=(r||t).getBuilder(i.getZIndex(),"Text");s.setTextStyle(a),s.drawText(e,n)}},GeometryCollection:function(t,e,i,n,r){const s=e.getGeometriesArray();let o,a;for(o=0,a=s.length;o2||Math.abs(t[4*e+3]-191.25)>2}function nh(t,e,i,n){const r=_n(i,e,t);let s=ln(e,n,i);const o=e.getMetersPerUnit();void 0!==o&&(s*=o);const a=t.getMetersPerUnit();void 0!==a&&(s/=a);const l=t.getExtent();if(!l||ae(l,r)){const e=ln(t,s,r)/s;isFinite(e)&&e>0&&(s/=e)}return s}function rh(t,e,i,n){const r=Pe(i);let s=nh(t,e,r,n);return(!isFinite(s)||s<=0)&&Ee(i,(function(i){return s=nh(t,e,i,n),isFinite(s)&&s>0})),s}function sh(t,e,i,n,r,s,o,a,l,h,c,u){const d=_t(Math.round(i*t),Math.round(i*e),th);if(u||(d.imageSmoothingEnabled=!1),0===l.length)return d.canvas;function g(t){return Math.round(t*i)/i}d.scale(i,i),d.globalCompositeOperation="lighter";const f=[1/0,1/0,-1/0,-1/0];l.forEach((function(t,e,i){ye(f,t.extent)}));const p=De(f),m=Me(f),_=_t(Math.round(i*p/n),Math.round(i*m/n),th);u||(_.imageSmoothingEnabled=!1);const y=i/n;l.forEach((function(t,e,i){const n=t.extent[0]-f[0],r=-(t.extent[3]-f[3]),s=De(t.extent),o=Me(t.extent);t.image.width>0&&t.image.height>0&&_.drawImage(t.image,h,h,t.image.width-2*h,t.image.height-2*h,n*y,r*y,s*y,o*y)}));const x=Oe(o);return a.getTriangles().forEach((function(t,e,r){const o=t.source,a=t.target;let l=o[0][0],h=o[0][1],c=o[1][0],p=o[1][1],m=o[2][0],y=o[2][1];const v=g((a[0][0]-x[0])/s),S=g(-(a[0][1]-x[1])/s),w=g((a[1][0]-x[0])/s),T=g(-(a[1][1]-x[1])/s),E=g((a[2][0]-x[0])/s),C=g(-(a[2][1]-x[1])/s),R=l,b=h;l=0,h=0,c-=R,p-=b,m-=R,y-=b;const P=vi([[c,p,0,0,w-v],[m,y,0,0,E-v],[0,0,c,p,T-S],[0,0,m,y,C-S]]);if(P){if(d.save(),d.beginPath(),function(){if(void 0===Ql){const t=_t(6,6,th);t.globalCompositeOperation="lighter",t.fillStyle="rgba(210, 0, 0, 0.75)",eh(t,4,5,4,0),eh(t,4,5,0,5);const e=t.getImageData(0,0,3,3).data;Ql=ih(e,0)||ih(e,4)||ih(e,8),yt(t),th.push(t.canvas)}return Ql}()||!u){d.moveTo(w,T);const t=4,e=v-w,i=S-T;for(let n=0;n{if(Math.max(e.source[0][0],e.source[1][0],e.source[2][0])-t>this.sourceWorldWidth_/2){const i=[[e.source[0][0],e.source[0][1]],[e.source[1][0],e.source[1][1]],[e.source[2][0],e.source[2][1]]];i[0][0]-t>this.sourceWorldWidth_/2&&(i[0][0]-=this.sourceWorldWidth_),i[1][0]-t>this.sourceWorldWidth_/2&&(i[1][0]-=this.sourceWorldWidth_),i[2][0]-t>this.sourceWorldWidth_/2&&(i[2][0]-=this.sourceWorldWidth_);const n=Math.min(i[0][0],i[1][0],i[2][0]);Math.max(i[0][0],i[1][0],i[2][0])-n.5&&c<1;let g=!1;if(l>0){if(this.targetProj_.isGlobal()&&this.targetWorldWidth_){g=De(ne([t,e,i,n]))/this.targetWorldWidth_>.25||g}!d&&this.sourceProj_.isGlobal()&&c&&(g=c>.25||g)}if(!g&&this.maxSourceExtent_&&isFinite(h[0])&&isFinite(h[1])&&isFinite(h[2])&&isFinite(h[3])&&!Ge(h,this.maxSourceExtent_))return;let f=0;if(!(g||isFinite(r[0])&&isFinite(r[1])&&isFinite(s[0])&&isFinite(s[1])&&isFinite(o[0])&&isFinite(o[1])&&isFinite(a[0])&&isFinite(a[1])))if(l>0)g=!0;else if(f=(isFinite(r[0])&&isFinite(r[1])?0:8)+(isFinite(s[0])&&isFinite(s[1])?0:4)+(isFinite(o[0])&&isFinite(o[1])?0:2)+(isFinite(a[0])&&isFinite(a[1])?0:1),1!=f&&2!=f&&4!=f&&8!=f)return;if(l>0){if(!g){const e=[(t[0]+i[0])/2,(t[1]+i[1])/2],n=this.transformInv_(e);let s;if(d){s=(Ti(r[0],u)+Ti(o[0],u))/2-Ti(n[0],u)}else s=(r[0]+o[0])/2-n[0];const a=(r[1]+o[1])/2-n[1];g=s*s+a*a>this.errorThresholdSquared_}if(g){if(Math.abs(t[0]-i[0])<=Math.abs(t[1]-i[1])){const h=[(e[0]+i[0])/2,(e[1]+i[1])/2],c=this.transformInv_(h),u=[(n[0]+t[0])/2,(n[1]+t[1])/2],d=this.transformInv_(u);this.addQuad_(t,e,h,u,r,s,c,d,l-1),this.addQuad_(u,h,i,n,d,c,o,a,l-1)}else{const h=[(t[0]+e[0])/2,(t[1]+e[1])/2],c=this.transformInv_(h),u=[(i[0]+n[0])/2,(i[1]+n[1])/2],d=this.transformInv_(u);this.addQuad_(t,h,u,n,r,c,d,a,l-1),this.addQuad_(h,e,i,u,c,s,o,d,l-1)}return}}if(d){if(!this.canWrapXInSource_)return;this.wrapsXInSource_=!0}0==(11&f)&&this.addTriangle_(t,i,n,r,o,a),0==(14&f)&&this.addTriangle_(t,i,e,r,o,s),f&&(0==(13&f)&&this.addTriangle_(e,n,t,s,a,r),0==(7&f)&&this.addTriangle_(e,n,i,s,a,o))}calculateSourceExtent(){const t=[1/0,1/0,-1/0,-1/0];return this.triangles_.forEach((function(e,i,n){const r=e.source;xe(t,r[0]),xe(t,r[1]),xe(t,r[2])})),t}getTriangles(){return this.triangles_}};var lh=class extends ot{constructor(t,e,i,n,r,s,o,a,l,h,c,u){super(r,$,{interpolate:!!u}),this.renderEdges_=void 0!==c&&c,this.pixelRatio_=o,this.gutter_=a,this.canvas_=null,this.sourceTileGrid_=e,this.targetTileGrid_=n,this.wrappedTileCoord_=s||r,this.sourceTiles_=[],this.sourcesListenerKeys_=null,this.sourceZ_=0;const d=n.getTileCoordExtent(this.wrappedTileCoord_),g=this.targetTileGrid_.getExtent();let f=this.sourceTileGrid_.getExtent();const p=g?Ae(d,g):d;if(0===Ce(p))return void(this.state=et);const m=t.getExtent();m&&(f=f?Ae(f,m):m);const _=n.getResolution(this.wrappedTileCoord_[0]),y=rh(t,i,p,_);if(!isFinite(y)||y<=0)return void(this.state=et);const x=void 0!==h?h:oh;if(this.triangulation_=new ah(t,i,p,f,y*x,_),0===this.triangulation_.getTriangles().length)return void(this.state=et);this.sourceZ_=e.getZForResolution(y);let v=this.triangulation_.calculateSourceExtent();if(f&&(t.canWrapX()?(v[1]=_i(v[1],f[1],f[3]),v[3]=_i(v[3],f[1],f[3])):v=Ae(v,f)),Ce(v)){const t=e.getTileRangeForExtentAndZ(v,this.sourceZ_);for(let e=t.minX;e<=t.maxX;e++)for(let i=t.minY;i<=t.maxY;i++){const t=l(this.sourceZ_,e,i,o);t&&this.sourceTiles_.push(t)}0===this.sourceTiles_.length&&(this.state=et)}else this.state=et}getImage(){return this.canvas_}reproject_(){const t=[];if(this.sourceTiles_.forEach((e=>{e&&e.getState()==Q&&t.push({extent:this.sourceTileGrid_.getTileCoordExtent(e.tileCoord),image:e.getImage()})})),this.sourceTiles_.length=0,0===t.length)this.state=tt;else{const e=this.wrappedTileCoord_[0],i=this.targetTileGrid_.getTileSize(e),n="number"==typeof i?i:i[0],r="number"==typeof i?i:i[1],s=this.targetTileGrid_.getResolution(e),o=this.sourceTileGrid_.getResolution(this.sourceZ_),a=this.targetTileGrid_.getTileCoordExtent(this.wrappedTileCoord_);this.canvas_=sh(n,r,this.pixelRatio_,o,this.sourceTileGrid_.getExtent(),s,a,this.triangulation_,t,this.gutter_,this.renderEdges_,this.interpolate),this.state=Q}this.changed()}load(){if(this.state==$){this.state=J,this.changed();let t=0;this.sourcesListenerKeys_=[],this.sourceTiles_.forEach((e=>{const i=e.getState();if(i==$||i==J){t++;const i=N(e,w,(function(n){const r=e.getState();r!=Q&&r!=tt&&r!=et||(G(i),t--,0===t&&(this.unlistenSources_(),this.reproject_()))}),this);this.sourcesListenerKeys_.push(i)}})),0===t?setTimeout(this.reproject_.bind(this),0):this.sourceTiles_.forEach((function(t,e,i){t.getState()==$&&t.load()}))}}unlistenSources_(){this.sourcesListenerKeys_.forEach(G),this.sourcesListenerKeys_=null}release(){this.canvas_&&(yt(this.canvas_.getContext("2d")),th.push(this.canvas_),this.canvas_=null),super.release()}},hh="tileloadstart",ch="tileloadend",uh="tileloaderror";function dh(t){return t?Array.isArray(t)?function(e){return t}:"function"==typeof t?t:function(e){return[t]}:null}var gh=class extends W{constructor(t){super(),this.projection=an(t.projection),this.attributions_=dh(t.attributions),this.attributionsCollapsible_=void 0===t.attributionsCollapsible||t.attributionsCollapsible,this.loading=!1,this.state_=void 0!==t.state?t.state:"ready",this.wrapX_=void 0!==t.wrapX&&t.wrapX,this.interpolate_=!!t.interpolate,this.viewResolver=null,this.viewRejector=null;const e=this;this.viewPromise_=new Promise((function(t,i){e.viewResolver=t,e.viewRejector=i}))}getAttributions(){return this.attributions_}getAttributionsCollapsible(){return this.attributionsCollapsible_}getProjection(){return this.projection}getResolutions(t){return null}getView(){return this.viewPromise_}getState(){return this.state_}getWrapX(){return this.wrapX_}getInterpolate(){return this.interpolate_}refresh(){this.changed()}setAttributions(t){this.attributions_=dh(t),this.changed()}setState(t){this.state_=t,this.changed()}};const fh=[0,0,0];var ph=class{constructor(t){let e;if(this.minZoom=void 0!==t.minZoom?t.minZoom:0,this.resolutions_=t.resolutions,Ft(g(this.resolutions_,(function(t,e){return e-t}),!0),17),!t.origins)for(let t=0,i=this.resolutions_.length-1;t=this.minZoom;){if(2===this.zoomFactor_?(s=Math.floor(s/2),o=Math.floor(o/2),r=Pl(s,s,o,o,i)):r=this.getTileRangeForExtentAndZ(a,l,i),e(l,r))return!0;--l}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||e0?n:Math.max(s/i[0],r/i[1]);const o=e+1,a=new Array(o);for(let t=0;ti.highWaterMark&&(i.highWaterMark=t)}useTile(t,e,i,n){}};function Ch(t,e){const i=/\{z\}/g,n=/\{x\}/g,r=/\{y\}/g,s=/\{-y\}/g;return function(o,a,l){if(o)return t.replace(i,o[0].toString()).replace(n,o[1].toString()).replace(r,o[2].toString()).replace(s,(function(){const t=o[0],i=e.getFullTileRange(t);Ft(i,55);return(i.getHeight()-o[2]-1).toString()}))}}function Rh(t,e){const i=t.length,n=new Array(i);for(let r=0;rthis.getTileInternal(t,e,i,n,s)),this.reprojectionErrorThreshold_,this.renderReprojectionEdges_,this.getInterpolate());return f.key=c,l?(f.interimTile=l,f.refreshInterimChain(),o.replace(h,f)):o.set(h,f),f}getTileInternal(t,e,i,n,r){let s=null;const o=vl(t,e,i),a=this.getKey();if(this.tileCache.containsKey(o)){if(s=this.tileCache.get(o),s.key!=a){const l=s;s=this.createTile_(t,e,i,n,r,a),l.getState()==$?s.interimTile=l.interimTile:s.interimTile=l,s.refreshInterimChain(),this.tileCache.replace(o,s)}}else s=this.createTile_(t,e,i,n,r,a),this.tileCache.set(o,s);return s}setRenderReprojectionEdges(t){if(this.renderReprojectionEdges_!=t){this.renderReprojectionEdges_=t;for(const t in this.tileCacheForProjection)this.tileCacheForProjection[t].clear();this.changed()}}setTileGridForProjection(t,e){const i=an(t);if(i){const t=X(i);t in this.tileGridForProjection||(this.tileGridForProjection[t]=e)}}clear(){super.clear();for(const t in this.tileCacheForProjection)this.tileCacheForProjection[t].clear()}};function Oh(t){const e=t[0],i=new Array(e);let n,r,s=1<>=1;return i.join("")}var Nh=class extends Ah{constructor(t){const e=void 0!==t.hidpi&&t.hidpi;super({cacheSize:t.cacheSize,crossOrigin:"anonymous",interpolate:t.interpolate,opaque:!0,projection:an("EPSG:3857"),reprojectionErrorThreshold:t.reprojectionErrorThreshold,state:"loading",tileLoadFunction:t.tileLoadFunction,tilePixelRatio:e?2:1,wrapX:void 0===t.wrapX||t.wrapX,transition:t.transition,zDirection:t.zDirection}),this.hidpi_=e,this.culture_=void 0!==t.culture?t.culture:"en-us",this.maxZoom_=void 0!==t.maxZoom?t.maxZoom:-1,this.apiKey_=t.key,this.imagerySet_=t.imagerySet;jl("https://dev.virtualearth.net/REST/v1/Imagery/Metadata/"+this.imagerySet_+"?uriScheme=https&include=ImageryProviders&key="+this.apiKey_+"&c="+this.culture_,this.handleImageryMetadataResponse.bind(this),void 0,"jsonp")}getApiKey(){return this.apiKey_}getImagerySet(){return this.imagerySet_}handleImageryMetadataResponse(t){if(200!=t.statusCode||"OK"!=t.statusDescription||"ValidCredentials"!=t.authenticationResultCode||1!=t.resourceSets.length||1!=t.resourceSets[0].resources.length)return void this.setState("error");const e=t.resourceSets[0].resources[0],i=-1==this.maxZoom_?e.zoomMax:this.maxZoom_,n=wh(this.getProjection()),r=this.hidpi_?2:1,s=e.imageWidth==e.imageHeight?e.imageWidth/r:[e.imageWidth/r,e.imageHeight/r],o=xh({extent:n,minZoom:e.zoomMin,maxZoom:i,tileSize:s});this.tileGrid=o;const a=this.culture_,l=this.hidpi_;if(this.tileUrlFunction=bh(e.imageUrlSubdomains.map((function(t){const i=[0,0,0],n=e.imageUrl.replace("{subdomain}",t).replace("{culture}",a);return function(t,e,r){if(!t)return;xl(t[0],t[1],t[2],i);let s=n;return l&&(s+="&dpi=d1&device=mobile"),s.replace("{quadkey}",Oh(i))}}))),e.imageryProviders){const t=pn(an("EPSG:4326"),this.getProjection());this.setAttributions((i=>{const n=[],r=i.viewState,s=this.getTileGrid(),o=s.getZForResolution(r.resolution,this.zDirection),a=s.getTileCoordForCoordAndZ(r.center,o)[0];return e.imageryProviders.map((function(e){let r=!1;const s=e.coverageAreas;for(let e=0,n=s.length;e=n.zoomMin&&a<=n.zoomMax){const e=n.bbox;if(Ge(Ue([e[1],e[0],e[3],e[2]],t),i.extent)){r=!0;break}}}r&&n.push(e.attribution)})),n.push('Terms of Use'),n}))}this.setState("ready")}};var Dh=class extends Ah{constructor(t){const e=void 0!==(t=t||{}).projection?t.projection:"EPSG:3857",i=void 0!==t.tileGrid?t.tileGrid:xh({extent:wh(e),maxResolution:t.maxResolution,maxZoom:t.maxZoom,minZoom:t.minZoom,tileSize:t.tileSize});super({attributions:t.attributions,cacheSize:t.cacheSize,crossOrigin:t.crossOrigin,interpolate:t.interpolate,opaque:t.opaque,projection:e,reprojectionErrorThreshold:t.reprojectionErrorThreshold,tileGrid:i,tileLoadFunction:t.tileLoadFunction,tilePixelRatio:t.tilePixelRatio,tileUrlFunction:t.tileUrlFunction,url:t.url,urls:t.urls,wrapX:void 0===t.wrapX||t.wrapX,transition:t.transition,attributionsCollapsible:t.attributionsCollapsible,zDirection:t.zDirection}),this.gutter_=void 0!==t.gutter?t.gutter:0}getGutter(){return this.gutter_}};var Gh=class extends Dh{constructor(t){super({attributions:t.attributions,cacheSize:t.cacheSize,crossOrigin:t.crossOrigin,maxZoom:void 0!==t.maxZoom?t.maxZoom:18,minZoom:t.minZoom,projection:t.projection,transition:t.transition,wrapX:t.wrapX,zDirection:t.zDirection}),this.account_=t.account,this.mapId_=t.map||"",this.config_=t.config||{},this.templateCache_={},this.initializeMap_()}getConfig(){return this.config_}updateConfig(t){Object.assign(this.config_,t),this.initializeMap_()}setConfig(t){this.config_=t||{},this.initializeMap_()}initializeMap_(){const t=JSON.stringify(this.config_);if(this.templateCache_[t])return void this.applyTemplate_(this.templateCache_[t]);let e="https://"+this.account_+".carto.com/api/v1/map";this.mapId_&&(e+="/named/"+this.mapId_);const i=new XMLHttpRequest;i.addEventListener("load",this.handleInitResponse_.bind(this,t)),i.addEventListener("error",this.handleInitError_.bind(this)),i.open("POST",e),i.setRequestHeader("Content-type","application/json"),i.send(JSON.stringify(this.config_))}handleInitResponse_(t,e){const i=e.target;if(!i.status||i.status>=200&&i.status<300){let e;try{e=JSON.parse(i.responseText)}catch(t){return void this.setState("error")}this.applyTemplate_(e),this.templateCache_[t]=e,this.setState("ready")}else this.setState("error")}handleInitError_(t){this.setState("error")}applyTemplate_(t){const e="https://"+t.cdn_url.https+"/"+this.account_+"/api/v1/map/"+t.layergroupid+"/{z}/{x}/{y}.png";this.setUrl(e)}};function kh(t,e,i,n,r){jh(t,e,i||0,n||t.length-1,r||zh)}function jh(t,e,i,n,r){for(;n>i;){if(n-i>600){var s=n-i+1,o=e-i+1,a=Math.log(s),l=.5*Math.exp(2*a/3),h=.5*Math.sqrt(a*l*(s-l)/s)*(o-s/2<0?-1:1);jh(t,e,Math.max(i,Math.floor(e-o*l/s+h)),Math.min(n,Math.floor(e+(s-o)*l/s+h)),r)}var c=t[e],u=i,d=n;for(Bh(t,i,e),r(t[n],c)>0&&Bh(t,i,n);u0;)d--}0===r(t[i],c)?Bh(t,i,d):Bh(t,++d,n),d<=e&&(i=d+1),e<=d&&(n=d-1)}}function Bh(t,e,i){var n=t[e];t[e]=t[i],t[i]=n}function zh(t,e){return te?1:0}class Uh{constructor(t=9){this._maxEntries=Math.max(4,t),this._minEntries=Math.max(2,Math.ceil(.4*this._maxEntries)),this.clear()}all(){return this._all(this.data,[])}search(t){let e=this.data;const i=[];if(!Qh(t,e))return i;const n=this.toBBox,r=[];for(;e;){for(let s=0;s=0&&r[e].children.length>this._maxEntries;)this._split(r,e),e--;this._adjustParentBBoxes(n,r,e)}_split(t,e){const i=t[e],n=i.children.length,r=this._minEntries;this._chooseSplitAxis(i,r,n);const s=this._chooseSplitIndex(i,r,n),o=tc(i.children.splice(s,i.children.length-s));o.height=i.height,o.leaf=i.leaf,Vh(i,this.toBBox),Vh(o,this.toBBox),e?t[e-1].children.push(o):this._splitRoot(i,o)}_splitRoot(t,e){this.data=tc([t,e]),this.data.height=t.height+1,this.data.leaf=!1,Vh(this.data,this.toBBox)}_chooseSplitIndex(t,e,i){let n,r=1/0,s=1/0;for(let o=e;o<=i-e;o++){const e=Wh(t,0,o,this.toBBox),a=Wh(t,o,i,this.toBBox),l=$h(e,a),h=qh(e)+qh(a);l=e;n--){const e=t.children[n];Zh(o,t.leaf?r(e):e),a+=Hh(o)}return a}_adjustParentBBoxes(t,e,i){for(let n=i;n>=0;n--)Zh(e[n],t)}_condense(t){for(let e,i=t.length-1;i>=0;i--)0===t[i].children.length?i>0?(e=t[i-1].children,e.splice(e.indexOf(t[i]),1)):this.clear():Vh(t[i],this.toBBox)}}function Xh(t,e,i){if(!i)return e.indexOf(t);for(let n=0;n=t.minX&&e.maxY>=t.minY}function tc(t){return{children:t,height:1,leaf:!0,minX:1/0,minY:1/0,maxX:-1/0,maxY:-1/0}}function ec(t,e,i,n,r){const s=[e,i];for(;s.length;){if((i=s.pop())-(e=s.pop())<=n)continue;const o=e+Math.ceil((i-e)/n/2)*n;kh(t,o,e,i,r),s.push(e,o,o,i)}}var ic=class{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_[X(e)]=i}load(t,e){const i=new Array(e.length);for(let n=0,r=e.length;n{e||(e=!0,this.addFeature(t.element),e=!1)})),t.addEventListener(Y,(t=>{e||(e=!0,this.removeFeature(t.element),e=!1)})),this.featuresCollection_=t}clear(t){if(t){for(const t in this.featureChangeKeys_){this.featureChangeKeys_[t].forEach(G)}this.featuresCollection_||(this.featureChangeKeys_={},this.idIndex_={},this.uidIndex_={})}else if(this.featuresRtree_){const t=t=>{this.removeFeatureInternal(t)};this.featuresRtree_.forEach(t);for(const t in this.nullGeometryFeatures_)this.removeFeatureInternal(this.nullGeometryFeatures_[t])}this.featuresCollection_&&this.featuresCollection_.clear(),this.featuresRtree_&&this.featuresRtree_.clear(),this.nullGeometryFeatures_={};const e=new cc(sc);this.dispatchEvent(e),this.changed()}forEachFeature(t){if(this.featuresRtree_)return this.featuresRtree_.forEach(t);this.featuresCollection_&&this.featuresCollection_.forEach(t)}forEachFeatureAtCoordinateDirect(t,e){const i=[t[0],t[1],t[0],t[1]];return this.forEachFeatureInExtent(i,(function(i){if(i.getGeometry().intersectsCoordinate(t))return e(i)}))}forEachFeatureInExtent(t,e){if(this.featuresRtree_)return this.featuresRtree_.forEachInExtent(t,e);this.featuresCollection_&&this.featuresCollection_.forEach(e)}forEachFeatureIntersectingExtent(t,e){return this.forEachFeatureInExtent(t,(function(i){if(i.getGeometry().intersectsExtent(t)){const t=e(i);if(t)return t}}))}getFeaturesCollection(){return this.featuresCollection_}getFeatures(){let t;return this.featuresCollection_?t=this.featuresCollection_.getArray().slice(0):this.featuresRtree_&&(t=this.featuresRtree_.getAll(),v(this.nullGeometryFeatures_)||u(t,Object.values(this.nullGeometryFeatures_))),t}getFeaturesAtCoordinate(t){const e=[];return this.forEachFeatureAtCoordinateDirect(t,(function(t){e.push(t)})),e}getFeaturesInExtent(t,e){if(this.featuresRtree_){if(!(e&&e.canWrapX()&&this.getWrapX()))return this.featuresRtree_.getInExtent(t);const i=Ve(t,e);return[].concat(...i.map((t=>this.featuresRtree_.getInExtent(t))))}return this.featuresCollection_?this.featuresCollection_.getArray().slice(0):[]}getClosestFeatureToCoordinate(t,e){const i=t[0],n=t[1];let r=null;const s=[NaN,NaN];let o=1/0;const a=[-1/0,-1/0,1/0,1/0];return e=e||f,this.featuresRtree_.forEachInExtent(a,(function(t){if(e(t)){const e=t.getGeometry(),l=o;if(o=e.closestPointXY(i,n,s,o),o{--this.loadingExtentsCount_,this.dispatchEvent(new cc(lc,void 0,t))}),(()=>{--this.loadingExtentsCount_,this.dispatchEvent(new cc(hc))})),n.insert(s,{extent:s.slice()}))}this.loading=!(this.loader_.length<4)&&this.loadingExtentsCount_>0}refresh(){this.clear(!0),this.loadedExtentsRtree_.clear(),super.refresh()}removeLoadedExtent(t){const e=this.loadedExtentsRtree_;let i;e.forEachInExtent(t,(function(e){if(me(e.extent,t))return i=e,!0})),i&&e.remove(i)}removeFeature(t){if(!t)return;const e=X(t);e in this.nullGeometryFeatures_?delete this.nullGeometryFeatures_[e]:this.featuresRtree_&&this.featuresRtree_.remove(t);this.removeFeatureInternal(t)&&this.changed()}removeFeatureInternal(t){const e=X(t),i=this.featureChangeKeys_[e];if(!i)return;i.forEach(G),delete this.featureChangeKeys_[e];const n=t.getId();return void 0!==n&&delete this.idIndex_[n.toString()],delete this.uidIndex_[e],this.dispatchEvent(new cc(oc,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){Ft(this.format_,7),this.url_=t,this.setLoader(Gl(t,this.format_))}};var dc=class extends uc{constructor(t){super({attributions:t.attributions,wrapX:t.wrapX}),this.resolution=void 0,this.distance=void 0!==t.distance?t.distance:20,this.minDistance=t.minDistance||0,this.interpolationRatio=0,this.features=[],this.geometryFunction=t.geometryFunction||function(t){const e=t.getGeometry();return Ft("Point"==e.getType(),10),e},this.createCustomCluster_=t.createCluster,this.source=null,this.boundRefresh_=this.refresh.bind(this),this.updateDistance(this.distance,this.minDistance),this.setSource(t.source||null)}clear(t){this.features.length=0,super.clear(t)}getDistance(){return this.distance}getSource(){return this.source}loadFeatures(t,e,i){this.source.loadFeatures(t,e,i),e!==this.resolution&&(this.resolution=e,this.refresh())}setDistance(t){this.updateDistance(t,this.minDistance)}setMinDistance(t){this.updateDistance(this.distance,t)}getMinDistance(){return this.minDistance}setSource(t){this.source&&this.source.removeEventListener(w,this.boundRefresh_),this.source=t,t&&t.addEventListener(w,this.boundRefresh_),this.refresh()}refresh(){this.clear(),this.cluster(),this.addFeatures(this.features)}updateDistance(t,e){const i=0===t?0:Math.min(e,t)/t,n=t!==this.distance||this.interpolationRatio!==i;this.distance=t,this.minDistance=e,this.interpolationRatio=i,n&&this.refresh()}cluster(){if(void 0===this.resolution||!this.source)return;const t=[1/0,1/0,-1/0,-1/0],e=this.distance*this.resolution,i=this.source.getFeatures(),n={};for(let r=0,s=i.length;r=0;--e){const n=this.geometryFunction(t[e]);n?Fi(i,n.getCoordinates()):t.splice(e,1)}ki(i,1/t.length);const n=Pe(e),r=this.interpolationRatio,s=new dr([i[0]*(1-r)+n[0]*r,i[1]*(1-r)+n[1]*r]);return this.createCustomCluster_?this.createCustomCluster_(s,t):new Ot({geometry:s,features:t})}};var gc=class extends Lt{constructor(t){super({tileCoord:t.tileCoord,loader:()=>Promise.resolve(new Uint8Array(4)),interpolate:t.interpolate,transition:t.transition}),this.pixelRatio_=t.pixelRatio,this.gutter_=t.gutter,this.reprojData_=null,this.reprojError_=null,this.reprojSize_=void 0,this.sourceTileGrid_=t.sourceTileGrid,this.targetTileGrid_=t.targetTileGrid,this.wrappedTileCoord_=t.wrappedTileCoord||t.tileCoord,this.sourceTiles_=[],this.sourcesListenerKeys_=null,this.sourceZ_=0;const e=this.targetTileGrid_.getTileCoordExtent(this.wrappedTileCoord_),i=this.targetTileGrid_.getExtent();let n=this.sourceTileGrid_.getExtent();const r=i?Ae(e,i):e;if(0===Ce(r))return void(this.state=et);const s=t.sourceProj,o=s.getExtent();o&&(n=n?Ae(n,o):o);const a=this.targetTileGrid_.getResolution(this.wrappedTileCoord_[0]),l=t.targetProj,h=rh(s,l,r,a);if(!isFinite(h)||h<=0)return void(this.state=et);const c=void 0!==t.errorThreshold?t.errorThreshold:oh;if(this.triangulation_=new ah(s,l,r,n,h*c,a),0===this.triangulation_.getTriangles().length)return void(this.state=et);this.sourceZ_=this.sourceTileGrid_.getZForResolution(h);let u=this.triangulation_.calculateSourceExtent();if(n&&(s.canWrapX()?(u[1]=_i(u[1],n[1],n[3]),u[3]=_i(u[3],n[1],n[3])):u=Ae(u,n)),Ce(u)){const e=this.sourceTileGrid_.getTileRangeForExtentAndZ(u,this.sourceZ_),i=t.getTileFunction;for(let t=e.minX;t<=e.maxX;t++)for(let n=e.minY;n<=e.maxY;n++){const e=i(this.sourceZ_,t,n,this.pixelRatio_);e&&this.sourceTiles_.push(e)}0===this.sourceTiles_.length&&(this.state=et)}else this.state=et}getSize(){return this.reprojSize_}getData(){return this.reprojData_}getError(){return this.reprojError_}reproject_(){const t=[];if(this.sourceTiles_.forEach((e=>{if(!e||e.getState()!==Q)return;const i=e.getSize(),n=this.gutter_;let r;const s=Rt(e.getData());r=s||Pt(Ct(e.getData()));const o=[i[0]+2*n,i[1]+2*n],a=r instanceof Float32Array,l=o[0]*o[1],h=a?Float32Array:Uint8Array,c=new h(r.buffer),u=h.BYTES_PER_ELEMENT,d=u*c.length/l,g=c.byteLength/o[1],f=Math.floor(g/u/o[0]),p=l*f;let m=c;if(c.length!==p){m=new h(p);let t=0,e=0;const i=o[0]*f;for(let n=0;n=0;--e){const i=[];for(let n=0,r=t.length;n{const i=e.getState();if(i!==$&&i!==J)return;t++;const n=N(e,w,(function(){const i=e.getState();i!=Q&&i!=tt&&i!=et||(G(n),t--,0===t&&(this.unlistenSources_(),this.reproject_()))}),this);this.sourcesListenerKeys_.push(n)})),0===t?setTimeout(this.reproject_.bind(this),0):this.sourceTiles_.forEach((function(t){t.getState()==$&&t.load()}))}unlistenSources_(){this.sourcesListenerKeys_.forEach(G),this.sourcesListenerKeys_=null}};var fc=class extends Eh{constructor(t){const e=void 0===t.projection?"EPSG:3857":t.projection;let i=t.tileGrid;void 0===i&&e&&(i=xh({extent:wh(e),maxResolution:t.maxResolution,maxZoom:t.maxZoom,minZoom:t.minZoom,tileSize:t.tileSize})),super({cacheSize:.1,attributions:t.attributions,attributionsCollapsible:t.attributionsCollapsible,projection:e,tileGrid:i,opaque:t.opaque,state:t.state,wrapX:t.wrapX,transition:t.transition,interpolate:t.interpolate}),this.gutter_=void 0!==t.gutter?t.gutter:0,this.tileSize_=t.tileSize?ll(t.tileSize):null,this.tileSizes_=null,this.tileLoadingKeys_={},this.loader_=t.loader,this.handleTileChange_=this.handleTileChange_.bind(this),this.bandCount=void 0===t.bandCount?4:t.bandCount,this.tileGridForProjection_={},this.tileCacheForProjection_={}}setTileSizes(t){this.tileSizes_=t}getTileSize(t){if(this.tileSizes_)return this.tileSizes_[t];if(this.tileSize_)return this.tileSize_;const e=this.getTileGrid();return e?ll(e.getTileSize(t)):[256,256]}getGutterForProjection(t){const e=this.getProjection();return!e||fn(e,t)?this.gutter_:0}setLoader(t){this.loader_=t}getReprojTile_(t,e,i,n,r){const s=this.getTileCacheForProjection(n),o=vl(t,e,i);if(s.containsKey(o)){const t=s.get(o);if(t&&t.key==this.getKey())return t}const a=this.getTileGrid(),l=Math.max.apply(null,a.getResolutions().map(((t,e)=>{const i=ll(a.getTileSize(e)),n=this.getTileSize(e);return Math.max(n[0]/i[0],n[1]/i[1])}))),h=this.getTileGridForProjection(r),c=this.getTileGridForProjection(n),u=[t,e,i],d=this.getTileCoordForTileUrlFunction(u,n),g=Object.assign({sourceProj:r,sourceTileGrid:h,targetProj:n,targetTileGrid:c,tileCoord:u,wrappedTileCoord:d,pixelRatio:l,gutter:this.getGutterForProjection(r),getTileFunction:(t,e,i,n)=>this.getTile(t,e,i,n,r)},this.tileOptions),f=new gc(g);return f.key=this.getKey(),f}getTile(t,e,i,n,r){const s=this.getProjection();if(s&&r&&!fn(s,r))return this.getReprojTile_(t,e,i,r,s);const o=this.getTileSize(t),a=vl(t,e,i);if(this.tileCache.containsKey(a))return this.tileCache.get(a);const l=this.loader_;const h=Object.assign({tileCoord:[t,e,i],loader:function(){return y((function(){return l(t,e,i)}))},size:o},this.tileOptions),c=new Lt(h);return c.key=this.getKey(),c.addEventListener(w,this.handleTileChange_),this.tileCache.set(a,c),c}handleTileChange_(t){const e=t.target,i=X(e),n=e.getState();let r;n==J?(this.tileLoadingKeys_[i]=!0,r=hh):i in this.tileLoadingKeys_&&(delete this.tileLoadingKeys_[i],r=n==tt?uh:n==Q?ch:void 0),r&&this.dispatchEvent(new Th(r,e))}getTileGridForProjection(t){const e=this.getProjection();if(this.tileGrid&&(!e||fn(e,t)))return this.tileGrid;const i=X(t);return i in this.tileGridForProjection_||(this.tileGridForProjection_[i]=mh(t)),this.tileGridForProjection_[i]}setTileGridForProjection(t,e){const i=an(t);if(i){const t=X(i);t in this.tileGridForProjection_||(this.tileGridForProjection_[t]=e)}}getTileCacheForProjection(t){const e=this.getProjection();if(!e||fn(e,t))return this.tileCache;const i=X(t);return i in this.tileCacheForProjection_||(this.tileCacheForProjection_[i]=new Rl(.1)),this.tileCacheForProjection_[i]}expireCache(t,e){const i=this.getTileCacheForProjection(t);this.tileCache.expireCache(this.tileCache==i?e:{});for(const t in this.tileCacheForProjection_){const n=this.tileCacheForProjection_[t];n.expireCache(n==i?e:{})}}clear(){super.clear();for(const t in this.tileCacheForProjection_)this.tileCacheForProjection_[t].clear()}};function pc(t,e){if(!t)return!1;if(!0===t)return!0;if(3!==e.getSamplesPerPixel())return!1;const i=e.fileDirectory.PhotometricInterpretation,n=GeoTIFF.globals.photometricInterpretations;return i===n.CMYK||i===n.YCbCr||i===n.CIELab||i===n.ICCLab}const mc="STATISTICS_MAXIMUM",_c="STATISTICS_MINIMUM";let yc;function xc(t){try{return t.getBoundingBox()}catch(e){const i=t.fileDirectory;return[0,0,i.ImageWidth,i.ImageLength]}}function vc(t){try{return t.getOrigin().slice(0,2)}catch(e){return[0,t.fileDirectory.ImageLength]}}function Sc(t,e){try{return t.getResolution(e)}catch(i){return[e.fileDirectory.ImageWidth/t.fileDirectory.ImageWidth,e.fileDirectory.ImageHeight/t.fileDirectory.ImageHeight]}}function wc(t){const e=t.geoKeys;if(!e)return null;if(e.ProjectedCSTypeGeoKey&&32767!==e.ProjectedCSTypeGeoKey){const t="EPSG:"+e.ProjectedCSTypeGeoKey;let i=an(t);if(!i){const n=Ze(e.ProjLinearUnitsGeoKey);n&&(i=new Ke({code:t,units:n}))}return i}if(e.GeographicTypeGeoKey&&32767!==e.GeographicTypeGeoKey){const t="EPSG:"+e.GeographicTypeGeoKey;let i=an(t);if(!i){const n=Ze(e.GeogAngularUnitsGeoKey);n&&(i=new Ke({code:t,units:n}))}return i}return null}function Tc(t){return t.getImageCount().then((function(e){const i=new Array(e);for(let n=0;ni*t)throw new Error(n)}function Rc(t){return t instanceof Int8Array?127:t instanceof Uint8Array||t instanceof Uint8ClampedArray?255:t instanceof Int16Array?32767:t instanceof Uint16Array?65535:t instanceof Int32Array?2147483647:t instanceof Uint32Array?4294967295:t instanceof Float32Array?34e37:255}class bc extends fc{constructor(t){super({state:"loading",tileGrid:null,projection:null,opaque:t.opaque,transition:t.transition,interpolate:!1!==t.interpolate,wrapX:t.wrapX}),this.sourceInfo_=t.sources;const e=this.sourceInfo_.length;this.sourceOptions_=t.sourceOptions,this.sourceImagery_=new Array(e),this.sourceMasks_=new Array(e),this.resolutionFactors_=new Array(e),this.samplesPerPixel_,this.nodataValues_,this.metadata_,this.normalize_=!1!==t.normalize,this.addAlpha_=!1,this.error_=null,this.convertToRGB_=t.convertToRGB||!1,this.setKey(this.sourceInfo_.map((t=>t.url)).join(","));const i=this,n=new Array(e);for(let t=0;t=0;--t){const i=wc(e[t]);if(i){this.projection=i;break}}}configure_(t){let e,i,n,r,s;const o=new Array(t.length),a=new Array(t.length),l=new Array(t.length);let h=0;const c=t.length;for(let u=0;u{4==(4&(t.fileDirectory.NewSubfileType||0))?d.push(t):c.push(t)}));const g=c.length;if(d.length>0&&d.length!==g)throw new Error(`Expected one mask per image found ${d.length} masks and ${g} images`);let f,p;const m=new Array(g),_=new Array(g),y=new Array(g);a[u]=new Array(g),l[u]=new Array(g);for(let t=0;ty.length&&(h=s.length-y.length);const t=s[s.length-1]/y[y.length-1];this.resolutionFactors_[u]=t;const e=y.map((e=>e*t)),i=`Resolution mismatch for source ${u}, got [${e}] but expected [${s}]`;Cc(s.slice(h,s.length),e,.02,i,this.viewRejector)}else s=y,this.resolutionFactors_[u]=1;n?Cc(n.slice(h,n.length),_,.01,`Tile size mismatch for source ${u}`,this.viewRejector):n=_,r?Cc(r.slice(h,r.length),m,0,`Tile size mismatch for source ${u}`,this.viewRejector):r=m,this.sourceImagery_[u]=c.reverse(),this.sourceMasks_[u]=d.reverse()}for(let t=0,e=this.sourceImagery_.length;tl||s>l;)o.push([Math.ceil(r/l),Math.ceil(s/l)]),l+=l;break;case"truncated":let t=r,e=s;for(;t>l||e>l;)o.push([Math.ceil(t/l),Math.ceil(e/l)]),t>>=1,e>>=1;break;default:Ft(!1,53)}o.push([1,1]),o.reverse();const h=[n],c=[0];for(let t=1,e=o.length;t{f=a,this.changed()})),y.src=_}};const Fc="version1",Mc="version2",Ac="version3",Oc={};Oc[Fc]={level0:{supports:[],formats:[],qualities:["native"]},level1:{supports:["regionByPx","sizeByW","sizeByH","sizeByPct"],formats:["jpg"],qualities:["native"]},level2:{supports:["regionByPx","regionByPct","sizeByW","sizeByH","sizeByPct","sizeByConfinedWh","sizeByWh"],formats:["jpg","png"],qualities:["native","color","grey","bitonal"]}},Oc[Mc]={level0:{supports:[],formats:["jpg"],qualities:["default"]},level1:{supports:["regionByPx","sizeByW","sizeByH","sizeByPct"],formats:["jpg"],qualities:["default"]},level2:{supports:["regionByPx","regionByPct","sizeByW","sizeByH","sizeByPct","sizeByConfinedWh","sizeByDistortedWh","sizeByWh"],formats:["jpg","png"],qualities:["default","bitonal"]}},Oc[Ac]={level0:{supports:[],formats:["jpg"],qualities:["default"]},level1:{supports:["regionByPx","regionSquare","sizeByW","sizeByH","sizeByWh"],formats:["jpg"],qualities:["default"]},level2:{supports:["regionByPx","regionSquare","regionByPct","sizeByW","sizeByH","sizeByPct","sizeByConfinedWh","sizeByWh"],formats:["jpg","png"],qualities:["default"]}},Oc.none={none:{supports:[],formats:[],qualities:[]}};const Nc=/^https?:\/\/library\.stanford\.edu\/iiif\/image-api\/(?:1\.1\/)?compliance\.html#level[0-2]$/,Dc=/^https?:\/\/iiif\.io\/api\/image\/2\/level[0-2](?:\.json)?$/,Gc=/(^https?:\/\/iiif\.io\/api\/image\/3\/level[0-2](?:\.json)?$)|(^level[0-2]$)/;const kc={};kc[Fc]=function(t){let e=t.getComplianceLevelSupportedFeatures();return void 0===e&&(e=Oc[Fc].level0),{url:void 0===t.imageInfo["@id"]?void 0:t.imageInfo["@id"].replace(/\/?(?:info\.json)?$/g,""),supports:e.supports,formats:[...e.formats,void 0===t.imageInfo.formats?[]:t.imageInfo.formats],qualities:[...e.qualities,void 0===t.imageInfo.qualities?[]:t.imageInfo.qualities],resolutions:t.imageInfo.scale_factors,tileSize:void 0!==t.imageInfo.tile_width?void 0!==t.imageInfo.tile_height?[t.imageInfo.tile_width,t.imageInfo.tile_height]:[t.imageInfo.tile_width,t.imageInfo.tile_width]:null!=t.imageInfo.tile_height?[t.imageInfo.tile_height,t.imageInfo.tile_height]:void 0}},kc[Mc]=function(t){const e=t.getComplianceLevelSupportedFeatures(),i=Array.isArray(t.imageInfo.profile)&&t.imageInfo.profile.length>1,n=i&&t.imageInfo.profile[1].supports?t.imageInfo.profile[1].supports:[],r=i&&t.imageInfo.profile[1].formats?t.imageInfo.profile[1].formats:[],s=i&&t.imageInfo.profile[1].qualities?t.imageInfo.profile[1].qualities:[];return{url:t.imageInfo["@id"].replace(/\/?(?:info\.json)?$/g,""),sizes:void 0===t.imageInfo.sizes?void 0:t.imageInfo.sizes.map((function(t){return[t.width,t.height]})),tileSize:void 0===t.imageInfo.tiles?void 0:[t.imageInfo.tiles.map((function(t){return t.width}))[0],t.imageInfo.tiles.map((function(t){return void 0===t.height?t.width:t.height}))[0]],resolutions:void 0===t.imageInfo.tiles?void 0:t.imageInfo.tiles.map((function(t){return t.scaleFactors}))[0],supports:[...e.supports,...n],formats:[...e.formats,...r],qualities:[...e.qualities,...s]}},kc[Ac]=function(t){const e=t.getComplianceLevelSupportedFeatures(),i=void 0===t.imageInfo.extraFormats?e.formats:[...e.formats,...t.imageInfo.extraFormats],n=void 0!==t.imageInfo.preferredFormats&&Array.isArray(t.imageInfo.preferredFormats)&&t.imageInfo.preferredFormats.length>0?t.imageInfo.preferredFormats.filter((function(t){return["jpg","png","gif"].includes(t)})).reduce((function(t,e){return void 0===t&&i.includes(e)?e:t}),void 0):void 0;return{url:t.imageInfo.id,sizes:void 0===t.imageInfo.sizes?void 0:t.imageInfo.sizes.map((function(t){return[t.width,t.height]})),tileSize:void 0===t.imageInfo.tiles?void 0:[t.imageInfo.tiles.map((function(t){return t.width}))[0],t.imageInfo.tiles.map((function(t){return t.height}))[0]],resolutions:void 0===t.imageInfo.tiles?void 0:t.imageInfo.tiles.map((function(t){return t.scaleFactors}))[0],supports:void 0===t.imageInfo.extraFeatures?e.supports:[...e.supports,...t.imageInfo.extraFeatures],formats:i,qualities:void 0===t.imageInfo.extraQualities?e.qualities:[...e.qualities,...t.imageInfo.extraQualities],preferredFormat:n}};var jc=class{constructor(t){this.setImageInfo(t)}setImageInfo(t){this.imageInfo="string"==typeof t?JSON.parse(t):t}getImageApiVersion(){if(void 0===this.imageInfo)return;let t=this.imageInfo["@context"]||"ol-no-context";"string"==typeof t&&(t=[t]);for(let e=0;e0&&"string"==typeof this.imageInfo.profile[0]&&Dc.test(this.imageInfo.profile[0]))return this.imageInfo.profile[0]}}getComplianceLevelFromProfile(t){const e=this.getComplianceLevelEntryFromProfile(t);if(void 0===e)return;const i=e.match(/level[0-2](?:\.json)?$/g);return Array.isArray(i)?i[0].replace(".json",""):void 0}getComplianceLevelSupportedFeatures(){if(void 0===this.imageInfo)return;const t=this.getImageApiVersion(),e=this.getComplianceLevelFromProfile(t);return void 0===e?Oc.none.none:Oc[t][e]}getTileSourceOptions(t){const e=t||{},i=this.getImageApiVersion();if(void 0===i)return;const n=void 0===i?void 0:kc[i](this);return void 0!==n?{url:n.url,version:i,size:[this.imageInfo.width,this.imageInfo.height],sizes:n.sizes,format:void 0!==e.format&&n.formats.includes(e.format)?e.format:void 0!==n.preferredFormat?n.preferredFormat:"jpg",supports:n.supports,quality:e.quality&&n.qualities.includes(e.quality)?e.quality:n.qualities.includes("native")?"native":"default",resolutions:Array.isArray(n.resolutions)?n.resolutions.sort((function(t,e){return e-t})):void 0,tileSize:n.tileSize}:void 0}};function Bc(t){return t.toLocaleString("en",{maximumFractionDigits:10})}var zc=class extends Ah{constructor(t){const e=t||{};let i=e.url||"";i+=i.lastIndexOf("/")===i.length-1||""===i?"":"/";const n=e.version||Mc,r=e.sizes||[],s=e.size;Ft(null!=s&&Array.isArray(s)&&2==s.length&&!isNaN(s[0])&&s[0]>0&&!isNaN(s[1])&&s[1]>0,60);const o=s[0],a=s[1],l=e.tileSize,h=e.tilePixelRatio||1,c=e.format||"jpg",u=e.quality||(e.version==Fc?"native":"default");let d=e.resolutions||[];const g=e.supports||[],f=e.extent||[0,-a,o,0],p=null!=r&&Array.isArray(r)&&r.length>0,m=void 0!==l&&("number"==typeof l&&Number.isInteger(l)&&l>0||Array.isArray(l)&&l.length>0),_=null!=g&&Array.isArray(g)&&(g.includes("regionByPx")||g.includes("regionByPct"))&&(g.includes("sizeByWh")||g.includes("sizeByH")||g.includes("sizeByW")||g.includes("sizeByPct"));let y,x,v;if(d.sort((function(t,e){return e-t})),m||_)if(null!=l&&("number"==typeof l&&Number.isInteger(l)&&l>0?(y=l,x=l):Array.isArray(l)&&l.length>0&&((1==l.length||null==l[1]&&Number.isInteger(l[0]))&&(y=l[0],x=l[0]),2==l.length&&(Number.isInteger(l[0])&&Number.isInteger(l[1])?(y=l[0],x=l[1]):null==l[0]&&Number.isInteger(l[1])&&(y=l[1],x=l[1])))),void 0!==y&&void 0!==x||(y=Ko,x=Ko),0==d.length){v=Math.max(Math.ceil(Math.log(o/y)/Math.LN2),Math.ceil(Math.log(a/x)/Math.LN2));for(let t=v;t>=0;t--)d.push(Math.pow(2,t))}else{const t=Math.max(...d);v=Math.round(Math.log(t)/Math.LN2)}else if(y=o,x=a,d=[],p){r.sort((function(t,e){return t[0]-e[0]})),v=-1;const t=[];for(let e=0;e0&&d[d.length-1]==i?t.push(e):(d.push(i),v++)}if(t.length>0)for(let e=0;ev)return;const S=t[1],w=t[2],T=d[f];if(!(void 0===S||void 0===w||void 0===T||S<0||Math.ceil(o/T/y)<=S||w<0||Math.ceil(a/T/x)<=w)){if(_||m){const t=S*y*T,e=w*x*T;let i=y*T,r=x*T,s=y,c=x;if(t+i>o&&(i=o-t),e+r>a&&(r=a-e),t+y*T>o&&(s=Math.floor((o-t+T-1)/T)),e+x*T>a&&(c=Math.floor((a-e+T-1)/T)),0==t&&i==o&&0==e&&r==a)l="full";else if(!_||g.includes("regionByPx"))l=t+","+e+","+i+","+r;else if(g.includes("regionByPct")){l="pct:"+Bc(t/o*100)+","+Bc(e/a*100)+","+Bc(i/o*100)+","+Bc(r/a*100)}n!=Ac||_&&!g.includes("sizeByWh")?!_||g.includes("sizeByW")?h=s+",":g.includes("sizeByH")?h=","+c:g.includes("sizeByWh")?h=s+","+c:g.includes("sizeByPct")&&(h="pct:"+Bc(100/T)):h=s+","+c}else if(l="full",p){const t=r[f][0],e=r[f][1];h=n==Ac?t==o&&e==a?"max":t+","+e:t==o?"full":t+","}else h=n==Ac?"max":"full";return i+l+"/"+h+"/0/"+u+"."+c}},transition:e.transition}),this.zDirection=e.zDirection}};var Uc=class extends $r{constructor(t,e,i,n,r,s,o){const a=t.getExtent(),l=e.getExtent(),h=l?Ae(i,l):i,c=nh(t,e,Pe(h),n),u=new ah(t,e,h,a,.5*c,n),d=s(u.calculateSourceExtent(),c,r),g=d?Jr:is,f=d?d.getPixelRatio():1;super(i,n,f,g),this.targetProj_=e,this.maxSourceExtent_=a,this.triangulation_=u,this.targetResolution_=n,this.targetExtent_=i,this.sourceImage_=d,this.sourcePixelRatio_=f,this.interpolate_=o,this.canvas_=null,this.sourceListenerKey_=null}disposeInternal(){this.state==Qr&&this.unlistenSource_(),super.disposeInternal()}getImage(){return this.canvas_}getProjection(){return this.targetProj_}reproject_(){const t=this.sourceImage_.getState();if(t==ts){const t=De(this.targetExtent_)/this.targetResolution_,e=Me(this.targetExtent_)/this.targetResolution_;this.canvas_=sh(t,e,this.sourcePixelRatio_,this.sourceImage_.getResolution(),this.maxSourceExtent_,this.targetResolution_,this.targetExtent_,this.triangulation_,[{extent:this.sourceImage_.getExtent(),image:this.sourceImage_.getImage()}],0,void 0,this.interpolate_)}this.state=t,this.changed()}load(){if(this.state==Jr){this.state=Qr,this.changed();const t=this.sourceImage_.getState();t==ts||t==es?this.reproject_():(this.sourceListenerKey_=N(this.sourceImage_,w,(function(t){const e=this.sourceImage_.getState();e!=ts&&e!=es||(this.unlistenSource_(),this.reproject_())}),this),this.sourceImage_.load())}}unlistenSource_(){G(this.sourceListenerKey_),this.sourceListenerKey_=null}};const Xc="imageloadstart",Vc="imageloadend",Wc="imageloaderror";class Zc extends r{constructor(t,e){super(t),this.image=e}}function Yc(t,e){t.getImage().src=e}var Kc=class extends gh{constructor(t){super({attributions:t.attributions,projection:t.projection,state:t.state,interpolate:void 0===t.interpolate||t.interpolate}),this.on,this.once,this.un,this.resolutions_=void 0!==t.resolutions?t.resolutions:null,this.reprojectedImage_=null,this.reprojectedRevision_=0}getResolutions(){return this.resolutions_}setResolutions(t){this.resolutions_=t}findNearestResolution(t){const e=this.getResolutions();if(e){t=e[h(e,t,0)]}return t}getImage(t,e,i,n){const r=this.getProjection();if(!r||!n||fn(r,n))return r&&(n=r),this.getImageInternal(t,e,i,n);if(this.reprojectedImage_){if(this.reprojectedRevision_==this.getRevision()&&fn(this.reprojectedImage_.getProjection(),n)&&this.reprojectedImage_.getResolution()==e&&me(this.reprojectedImage_.getExtent(),t))return this.reprojectedImage_;this.reprojectedImage_.dispose(),this.reprojectedImage_=null}return this.reprojectedImage_=new Uc(r,n,t,e,i,((t,e,i)=>this.getImageInternal(t,e,i,r)),this.getInterpolate()),this.reprojectedRevision_=this.getRevision(),this.reprojectedImage_}getImageInternal(t,e,i,n){return z()}handleImageChange(t){const e=t.target;let i;switch(e.getState()){case Qr:this.loading=!0,i=Xc;break;case ts:this.loading=!1,i=Vc;break;case es:this.loading=!1,i=Wc;break;default:return}this.hasListener(i)&&this.dispatchEvent(new Zc(i,e))}};function qc(t,e){const i=[];Object.keys(e).forEach((function(t){null!==e[t]&&void 0!==e[t]&&i.push(t+"="+encodeURIComponent(e[t]))}));const n=i.join("&");return t=t.replace(/[?&]$/,""),(t+=t.includes("?")?"&":"?")+n}var Hc=class extends Kc{constructor(t){super({attributions:(t=t||{}).attributions,interpolate:t.interpolate,projection:t.projection,resolutions:t.resolutions}),this.crossOrigin_=void 0!==t.crossOrigin?t.crossOrigin:null,this.hidpi_=void 0===t.hidpi||t.hidpi,this.url_=t.url,this.imageLoadFunction_=void 0!==t.imageLoadFunction?t.imageLoadFunction:Yc,this.params_=t.params||{},this.image_=null,this.imageSize_=[0,0],this.renderedRevision_=0,this.ratio_=void 0!==t.ratio?t.ratio:1.5}getParams(){return this.params_}getImageInternal(t,e,i,n){if(void 0===this.url_)return null;e=this.findNearestResolution(e),i=this.hidpi_?i:1;const r=this.image_;if(r&&this.renderedRevision_==this.getRevision()&&r.getResolution()==e&&r.getPixelRatio()==i&&le(r.getExtent(),t))return r;const s={F:"image",FORMAT:"PNG32",TRANSPARENT:!0};Object.assign(s,this.params_);const o=((t=t.slice())[0]+t[2])/2,a=(t[1]+t[3])/2;if(1!=this.ratio_){const e=this.ratio_*De(t)/2,i=this.ratio_*Me(t)/2;t[0]=o-e,t[1]=a-i,t[2]=o+e,t[3]=a+i}const l=e/i,h=Math.ceil(De(t)/l),c=Math.ceil(Me(t)/l);t[0]=o-l*h/2,t[2]=o+l*h/2,t[1]=a-l*c/2,t[3]=a+l*c/2,this.imageSize_[0]=h,this.imageSize_[1]=c;const u=this.getRequestUrl_(t,this.imageSize_,i,n,s);return this.image_=new rs(t,e,i,u,this.crossOrigin_,this.imageLoadFunction_),this.renderedRevision_=this.getRevision(),this.image_.addEventListener(w,this.handleImageChange.bind(this)),this.image_}getImageLoadFunction(){return this.imageLoadFunction_}getRequestUrl_(t,e,i,n,r){const s=n.getCode().split(/:(?=\d+$)/).pop();r.SIZE=e[0]+","+e[1],r.BBOX=t.join(","),r.BBOXSR=s,r.IMAGESR=s,r.DPI=Math.round(90*i);const o=this.url_,a=o.replace(/MapServer\/?$/,"MapServer/export").replace(/ImageServer\/?$/,"ImageServer/exportImage");return a==o&&Ft(!1,50),qc(a,r)}getUrl(){return this.url_}setImageLoadFunction(t){this.image_=null,this.imageLoadFunction_=t,this.changed()}setUrl(t){t!=this.url_&&(this.url_=t,this.image_=null,this.changed())}updateParams(t){Object.assign(this.params_,t),this.image_=null,this.changed()}};var $c=class extends Kc{constructor(t){super({attributions:(t=t||{}).attributions,interpolate:t.interpolate,projection:t.projection,resolutions:t.resolutions,state:t.state}),this.canvasFunction_=t.canvasFunction,this.canvas_=null,this.renderedRevision_=0,this.ratio_=void 0!==t.ratio?t.ratio:1.5}getImageInternal(t,e,i,n){e=this.findNearestResolution(e);let r=this.canvas_;if(r&&this.renderedRevision_==this.getRevision()&&r.getResolution()==e&&r.getPixelRatio()==i&&le(r.getExtent(),t))return r;Be(t=t.slice(),this.ratio_);const s=[De(t)/e*i,Me(t)/e*i],o=this.canvasFunction_.call(this,t,e,i,s,n);return o&&(r=new ss(t,e,i,o)),this.canvas_=r,this.renderedRevision_=this.getRevision(),r}};var Jc=class extends Kc{constructor(t){super({interpolate:t.interpolate,projection:t.projection,resolutions:t.resolutions}),this.crossOrigin_=void 0!==t.crossOrigin?t.crossOrigin:null,this.displayDpi_=void 0!==t.displayDpi?t.displayDpi:96,this.params_=t.params||{},this.url_=t.url,this.imageLoadFunction_=void 0!==t.imageLoadFunction?t.imageLoadFunction:Yc,this.hidpi_=void 0===t.hidpi||t.hidpi,this.metersPerUnit_=void 0!==t.metersPerUnit?t.metersPerUnit:1,this.ratio_=void 0!==t.ratio?t.ratio:1,this.useOverlay_=void 0!==t.useOverlay&&t.useOverlay,this.image_=null,this.renderedRevision_=0}getParams(){return this.params_}getImageInternal(t,e,i,n){e=this.findNearestResolution(e),i=this.hidpi_?i:1;let r=this.image_;if(r&&this.renderedRevision_==this.getRevision()&&r.getResolution()==e&&r.getPixelRatio()==i&&le(r.getExtent(),t))return r;1!=this.ratio_&&Be(t=t.slice(),this.ratio_);const s=[De(t)/e*i,Me(t)/e*i];if(void 0!==this.url_){const o=this.getUrl(this.url_,this.params_,t,s,n);r=new rs(t,e,i,o,this.crossOrigin_,this.imageLoadFunction_),r.addEventListener(w,this.handleImageChange.bind(this))}else r=null;return this.image_=r,this.renderedRevision_=this.getRevision(),r}getImageLoadFunction(){return this.imageLoadFunction_}updateParams(t){Object.assign(this.params_,t),this.changed()}getUrl(t,e,i,n,r){const s=function(t,e,i,n){const r=De(t),s=Me(t),o=e[0],a=e[1],l=.0254/n;if(a*r>o*s)return r*i/(o*l);return s*i/(a*l)}(i,n,this.metersPerUnit_,this.displayDpi_),o=Pe(i),a={OPERATION:this.useOverlay_?"GETDYNAMICMAPOVERLAYIMAGE":"GETMAPIMAGE",VERSION:"2.0.0",LOCALE:"en",CLIENTAGENT:"ol/source/ImageMapGuide source",CLIP:"1",SETDISPLAYDPI:this.displayDpi_,SETDISPLAYWIDTH:Math.round(n[0]),SETDISPLAYHEIGHT:Math.round(n[1]),SETVIEWSCALE:s,SETVIEWCENTERX:o[0],SETVIEWCENTERY:o[1]};return Object.assign(a,e),qc(t,a)}setImageLoadFunction(t){this.image_=null,this.imageLoadFunction_=t,this.changed()}};var Qc=class extends Kc{constructor(t){const e=void 0!==t.crossOrigin?t.crossOrigin:null,i=void 0!==t.imageLoadFunction?t.imageLoadFunction:Yc;super({attributions:t.attributions,interpolate:t.interpolate,projection:an(t.projection)}),this.url_=t.url,this.imageExtent_=t.imageExtent,this.image_=new rs(this.imageExtent_,void 0,1,this.url_,e,i),this.imageSize_=t.imageSize?t.imageSize:null,this.image_.addEventListener(w,this.handleImageChange.bind(this))}getImageExtent(){return this.imageExtent_}getImageInternal(t,e,i,n){return Ge(t,this.image_.getExtent())?this.image_:null}getUrl(){return this.url_}handleImageChange(t){if(this.image_.getState()==ts){const t=this.image_.getExtent(),e=this.image_.getImage();let i,n;this.imageSize_?(i=this.imageSize_[0],n=this.imageSize_[1]):(i=e.width,n=e.height);const r=De(t),s=Me(t),o=r/i,a=s/n;let l=i,h=n;if(o>a?l=Math.round(r/a):h=Math.round(s/o),l!==i||h!==n){const t=_t(l,h);this.getInterpolate()||(t.imageSmoothingEnabled=!1);const r=t.canvas;t.drawImage(e,0,0,i,n,0,0,r.width,r.height),this.image_.setImage(r)}}super.handleImageChange(t)}};const tu="1.3.0",eu=[101,101];var iu=class extends Kc{constructor(t){super({attributions:(t=t||{}).attributions,interpolate:t.interpolate,projection:t.projection,resolutions:t.resolutions}),this.crossOrigin_=void 0!==t.crossOrigin?t.crossOrigin:null,this.url_=t.url,this.imageLoadFunction_=void 0!==t.imageLoadFunction?t.imageLoadFunction:Yc,this.params_=Object.assign({},t.params),this.v13_=!0,this.updateV13_(),this.serverType_=t.serverType,this.hidpi_=void 0===t.hidpi||t.hidpi,this.image_=null,this.imageSize_=[0,0],this.renderedRevision_=0,this.ratio_=void 0!==t.ratio?t.ratio:1.5}getFeatureInfoUrl(t,e,i,n){if(void 0===this.url_)return;const r=an(i),s=this.getProjection();s&&s!==r&&(e=nh(s,r,t,e),t=_n(t,r,s));const o=Le(t,e,0,eu),a={SERVICE:"WMS",VERSION:tu,REQUEST:"GetFeatureInfo",FORMAT:"image/png",TRANSPARENT:!0,QUERY_LAYERS:this.params_.LAYERS};Object.assign(a,this.params_,n);const l=bi((t[0]-o[0])/e,4),h=bi((o[3]-t[1])/e,4);return a[this.v13_?"I":"X"]=l,a[this.v13_?"J":"Y"]=h,this.getRequestUrl_(o,eu,1,s||r,a)}getLegendUrl(t,e){if(void 0===this.url_)return;const i={SERVICE:"WMS",VERSION:tu,REQUEST:"GetLegendGraphic",FORMAT:"image/png"};if(void 0===e||void 0===e.LAYER){const t=this.params_.LAYERS;if(!(!Array.isArray(t)||1===t.length))return;i.LAYER=t}if(void 0!==t){const e=this.getProjection()?this.getProjection().getMetersPerUnit():1,n=28e-5;i.SCALE=t*e/n}return Object.assign(i,e),qc(this.url_,i)}getParams(){return this.params_}getImageInternal(t,e,i,n){if(void 0===this.url_)return null;e=this.findNearestResolution(e),1==i||this.hidpi_&&void 0!==this.serverType_||(i=1);const r=e/i,s=Pe(t),o=Le(s,r,0,[Pi(De(t)/r,4),Pi(Me(t)/r,4)]),a=Le(s,r,0,[Pi(this.ratio_*De(t)/r,4),Pi(this.ratio_*Me(t)/r,4)]),l=this.image_;if(l&&this.renderedRevision_==this.getRevision()&&l.getResolution()==e&&l.getPixelRatio()==i&&le(l.getExtent(),o))return l;const h={SERVICE:"WMS",VERSION:tu,REQUEST:"GetMap",FORMAT:"image/png",TRANSPARENT:!0};Object.assign(h,this.params_),this.imageSize_[0]=Ri(De(a)/r,4),this.imageSize_[1]=Ri(Me(a)/r,4);const c=this.getRequestUrl_(a,this.imageSize_,i,n,h);return this.image_=new rs(a,e,i,c,this.crossOrigin_,this.imageLoadFunction_),this.renderedRevision_=this.getRevision(),this.image_.addEventListener(w,this.handleImageChange.bind(this)),this.image_}getImageLoadFunction(){return this.imageLoadFunction_}getRequestUrl_(t,e,i,n,r){if(Ft(void 0!==this.url_,9),r[this.v13_?"CRS":"SRS"]=n.getCode(),"STYLES"in this.params_||(r.STYLES=""),1!=i)switch(this.serverType_){case"geoserver":const t=90*i+.5|0;"FORMAT_OPTIONS"in r?r.FORMAT_OPTIONS+=";dpi:"+t:r.FORMAT_OPTIONS="dpi:"+t;break;case"mapserver":r.MAP_RESOLUTION=90*i;break;case"carmentaserver":case"qgis":r.DPI=90*i;break;default:Ft(!1,8)}r.WIDTH=e[0],r.HEIGHT=e[1];const s=n.getAxisOrientation();let o;return o=this.v13_&&"ne"==s.substr(0,2)?[t[1],t[0],t[3],t[2]]:t,r.BBOX=o.join(","),qc(this.url_,r)}getUrl(){return this.url_}setImageLoadFunction(t){this.image_=null,this.imageLoadFunction_=t,this.changed()}setUrl(t){t!=this.url_&&(this.url_=t,this.image_=null,this.changed())}updateParams(t){Object.assign(this.params_,t),this.updateV13_(),this.image_=null,this.changed()}updateV13_(){const t=this.params_.VERSION||tu;this.v13_=Li(t,"1.3")>=0}};const nu='© OpenStreetMap contributors.';var ru=class extends Dh{constructor(t){let e;e=void 0!==(t=t||{}).attributions?t.attributions:[nu];const i=void 0!==t.crossOrigin?t.crossOrigin:"anonymous",n=void 0!==t.url?t.url:"https://tile.openstreetmap.org/{z}/{x}/{y}.png";super({attributions:e,attributionsCollapsible:!1,cacheSize:t.cacheSize,crossOrigin:i,interpolate:t.interpolate,maxZoom:void 0!==t.maxZoom?t.maxZoom:19,opaque:void 0===t.opaque||t.opaque,reprojectionErrorThreshold:t.reprojectionErrorThreshold,tileLoadFunction:t.tileLoadFunction,transition:t.transition,url:n,wrapX:t.wrapX,zDirection:t.zDirection})}};var su=class extends ks{constructor(t){super(t=t||{})}};var ou=class extends B{constructor(t){super(),this.ready=!0,this.boundHandleImageChange_=this.handleImageChange_.bind(this),this.layer_=t,this.declutterExecutorGroup=null}getFeatures(t){return z()}getData(t){return null}prepareFrame(t){return z()}renderFrame(t,e){return z()}loadedTileCallback(t,e,i){t[e]||(t[e]={}),t[e][i.tileCoord.toString()]=i}createLoadedTileFinder(t,e,i){return(n,r)=>{const s=this.loadedTileCallback.bind(this,i,n);return t.forEachLoadedTile(e,n,r,s)}}forEachFeatureAtCoordinate(t,e,i,n,r){}getLayer(){return this.layer_}handleFontsChanged(){}handleImageChange_(t){t.target.getState()===ts&&this.renderIfReadyAndVisible()}loadImage(t){let e=t.getState();return e!=ts&&e!=es&&t.addEventListener(w,this.boundHandleImageChange_),e==Jr&&(t.load(),e=t.getState()),e==ts}renderIfReadyAndVisible(){const t=this.getLayer();t&&t.getVisible()&&"ready"===t.getSourceState()&&t.changed()}disposeInternal(){delete this.layer_,super.disposeInternal()}};const au=[];let lu=null;var hu=class extends ou{constructor(t){super(t),this.container=null,this.renderedResolution,this.tempTransform=[1,0,0,1,0,0],this.pixelTransform=[1,0,0,1,0,0],this.inversePixelTransform=[1,0,0,1,0,0],this.context=null,this.containerReused=!1,this.pixelContext_=null,this.frameState=null}getImageData(t,e,i){let n;lu||(lu=_t(1,1,void 0,{willReadFrequently:!0})),lu.clearRect(0,0,1,1);try{lu.drawImage(t,e,i,1,1,0,0,1,1),n=lu.getImageData(0,0,1,1).data}catch(t){return lu=null,null}return n}getBackground(t){let e=this.getLayer().getBackground();return"function"==typeof e&&(e=e(t.viewState.resolution)),e||void 0}useContainer(t,e,i){const n=this.getLayer().getClassName();let r,s;if(t&&t.className===n&&(!i||t&&t.style.backgroundColor&&d(gs(t.style.backgroundColor),gs(i)))){const e=t.firstElementChild;e instanceof HTMLCanvasElement&&(s=e.getContext("2d"))}if(s&&s.canvas.style.transform===e?(this.container=t,this.context=s,this.containerReused=!0):this.containerReused&&(this.container=null,this.context=null,this.containerReused=!1),!this.container){r=document.createElement("div"),r.className=n;let t=r.style;t.position="absolute",t.width="100%",t.height="100%",s=_t();const e=s.canvas;r.appendChild(e),t=e.style,t.position="absolute",t.left="0",t.transformOrigin="top left",this.container=r,this.context=s}this.containerReused||!i||this.container.style.backgroundColor||(this.container.style.backgroundColor=i)}clipUnrotated(t,e,i){const n=Oe(i),r=Ne(i),s=be(i),o=Re(i);zt(e.coordinateToPixelTransform,n),zt(e.coordinateToPixelTransform,r),zt(e.coordinateToPixelTransform,s),zt(e.coordinateToPixelTransform,o);const a=this.inversePixelTransform;zt(a,n),zt(a,r),zt(a,s),zt(a,o),t.save(),t.beginPath(),t.moveTo(Math.round(n[0]),Math.round(n[1])),t.lineTo(Math.round(r[0]),Math.round(r[1])),t.lineTo(Math.round(s[0]),Math.round(s[1])),t.lineTo(Math.round(o[0]),Math.round(o[1])),t.clip()}dispatchRenderEvent_(t,e,i){const n=this.getLayer();if(n.hasListener(t)){const r=new zs(t,this.inversePixelTransform,i,e);n.dispatchEvent(r)}}preRender(t,e){this.frameState=e,this.dispatchRenderEvent_(Ms,t,e)}postRender(t,e){this.dispatchRenderEvent_(As,t,e)}getRenderTransform(t,e,i,n,r,s,o){const a=r/2,l=s/2,h=n/e,c=-h,u=-t[0]+o,d=-t[1];return Zt(this.tempTransform,a,l,h,c,-i,u,d)}disposeInternal(){delete this.frameState,super.disposeInternal()}};var cu=class extends hu{constructor(t){super(t),this.image_=null}getImage(){return this.image_?this.image_.getImage():null}prepareFrame(t){const e=t.layerStatesArray[t.layerIndex],i=t.pixelRatio,n=t.viewState,r=n.resolution,s=this.getLayer().getSource(),o=t.viewHints;let a=t.extent;if(void 0!==e.extent&&(a=Ae(a,Cn(e.extent,n.projection))),!o[Wo]&&!o[Zo]&&!ke(a))if(s){const t=n.projection,e=s.getImage(a,r,i,t);e&&(this.loadImage(e)?this.image_=e:e.getState()===is&&(this.image_=null))}else this.image_=null;return!!this.image_}getData(t){const e=this.frameState;if(!e)return null;const i=this.getLayer(),n=zt(e.pixelToCoordinateTransform,t.slice()),r=i.getExtent();if(r&&!ae(r,n))return null;const s=this.image_.getExtent(),o=this.image_.getImage(),a=De(s),l=Math.floor(o.width*((n[0]-s[0])/a));if(l<0||l>=o.width)return null;const h=Me(s),c=Math.floor(o.height*((s[3]-n[1])/h));return c<0||c>=o.height?null:this.getImageData(o,l,c)}renderFrame(t,e){const i=this.image_,n=i.getExtent(),r=i.getResolution(),s=i.getPixelRatio(),o=t.layerStatesArray[t.layerIndex],a=t.pixelRatio,l=t.viewState,h=l.center,c=a*r/(l.resolution*s),u=t.extent,d=l.resolution,g=l.rotation,f=Math.round(De(u)/d*a),p=Math.round(Me(u)/d*a);Zt(this.pixelTransform,t.size[0]/2,t.size[1]/2,1/a,1/a,g,-f/2,-p/2),Yt(this.inversePixelTransform,this.pixelTransform);const m=Ht(this.pixelTransform);this.useContainer(e,m,this.getBackground(t));const _=this.context,y=_.canvas;y.width!=f||y.height!=p?(y.width=f,y.height=p):this.containerReused||_.clearRect(0,0,f,p);let x=!1,v=!0;if(o.extent){const e=Cn(o.extent,l.projection);v=Ge(e,t.extent),x=v&&!le(e,t.extent),x&&this.clipUnrotated(_,t,e)}const S=i.getImage(),w=Zt(this.tempTransform,f/2,p/2,c,c,0,s*(n[0]-h[0])/r,s*(h[1]-n[3])/r);this.renderedResolution=r*a/s;const T=S.width*w[0],E=S.height*w[3];if(this.getLayer().getSource().getInterpolate()||(_.imageSmoothingEnabled=!1),this.preRender(_,t),v&&T>=.5&&E>=.5){const t=w[4],e=w[5],i=o.opacity;let n;1!==i&&(n=_.globalAlpha,_.globalAlpha=i),_.drawImage(S,0,0,+S.width,+S.height,t,e,T,E),1!==i&&(_.globalAlpha=n)}return this.postRender(_,t),x&&_.restore(),_.imageSmoothingEnabled=!0,m!==y.style.transform&&(y.style.transform=m),this.container}};var uu=class extends su{constructor(t){super(t)}createRenderer(){return new cu(this)}getData(t){return super.getData(t)}},du="preload",gu="useInterimTilesOnError";var fu=class extends ks{constructor(t){t=t||{};const e=Object.assign({},t);delete e.preload,delete e.useInterimTilesOnError,super(e),this.on,this.once,this.un,this.setPreload(void 0!==t.preload?t.preload:0),this.setUseInterimTilesOnError(void 0===t.useInterimTilesOnError||t.useInterimTilesOnError)}getPreload(){return this.get(du)}setPreload(t){this.set(du,t)}getUseInterimTilesOnError(){return this.get(gu)}setUseInterimTilesOnError(t){this.set(gu,t)}getData(t){return super.getData(t)}};var pu=class extends hu{constructor(t){super(t),this.extentChanged=!0,this.renderedExtent_=null,this.renderedPixelRatio,this.renderedProjection=null,this.renderedRevision,this.renderedTiles=[],this.newTiles_=!1,this.tmpExtent=[1/0,1/0,-1/0,-1/0],this.tmpTileRange_=new Il(0,0,0,0)}isDrawableTile(t){const e=this.getLayer(),i=t.getState(),n=e.getUseInterimTilesOnError();return i==Q||i==et||i==tt&&!n}getTile(t,e,i,n){const r=n.pixelRatio,s=n.viewState.projection,o=this.getLayer();let a=o.getSource().getTile(t,e,i,r,s);return a.getState()==tt&&o.getUseInterimTilesOnError()&&o.getPreload()>0&&(this.newTiles_=!0),this.isDrawableTile(a)||(a=a.getInterimTile()),a}getData(t){const e=this.frameState;if(!e)return null;const i=this.getLayer(),n=zt(e.pixelToCoordinateTransform,t.slice()),r=i.getExtent();if(r&&!ae(r,n))return null;const s=e.pixelRatio,o=e.viewState.projection,a=e.viewState,l=i.getRenderSource(),h=l.getTileGridForProjection(a.projection),c=l.getTilePixelRatio(e.pixelRatio);for(let t=h.getZForResolution(a.resolution);t>=h.getMinZoom();--t){const e=h.getTileCoordForCoordAndZ(n,t),i=l.getTile(t,e[1],e[2],s,o);if(!(i instanceof os||i instanceof lh)||i instanceof lh&&i.getState()===et)return null;if(i.getState()!==Q)continue;const r=h.getOrigin(t),u=ll(h.getTileSize(t)),d=h.getResolution(t),g=Math.floor(c*((n[0]-r[0])/d-e[1]*u[0])),f=Math.floor(c*((r[1]-n[1])/d-e[2]*u[1])),p=Math.round(c*l.getGutterForProjection(a.projection));return this.getImageData(i.getImage(),g+p,f+p)}return null}loadedTileCallback(t,e,i){return!!this.isDrawableTile(i)&&super.loadedTileCallback(t,e,i)}prepareFrame(t){return!!this.getLayer().getSource()}renderFrame(t,e){const i=t.layerStatesArray[t.layerIndex],n=t.viewState,r=n.projection,s=n.resolution,o=n.center,a=n.rotation,h=t.pixelRatio,c=this.getLayer(),u=c.getSource(),d=u.getRevision(),g=u.getTileGridForProjection(r),f=g.getZForResolution(s,u.zDirection),p=g.getResolution(f);let m=t.extent;const _=t.viewState.resolution,y=u.getTilePixelRatio(h),x=Math.round(De(m)/_*h),v=Math.round(Me(m)/_*h),S=i.extent&&Cn(i.extent,r);S&&(m=Ae(m,Cn(i.extent,r)));const w=p*x/2/y,T=p*v/2/y,E=[o[0]-w,o[1]-T,o[0]+w,o[1]+T],C=g.getTileRangeForExtentAndZ(m,f),R={};R[f]={};const b=this.createLoadedTileFinder(u,r,R),P=this.tmpExtent,I=this.tmpTileRange_;this.newTiles_=!1;const L=a?Fe(n.center,_,a,t.size):void 0;for(let e=C.minX;e<=C.maxX;++e)for(let n=C.minY;n<=C.maxY;++n){if(a&&!g.tileCoordIntersectsViewport([f,e,n],L))continue;const r=this.getTile(f,e,n,t);if(this.isDrawableTile(r)){const e=X(this);if(r.getState()==Q){R[f][r.tileCoord.toString()]=r;let t=r.inTransition(e);t&&1!==i.opacity&&(r.endTransition(e),t=!1),this.newTiles_||!t&&this.renderedTiles.includes(r)||(this.newTiles_=!0)}if(1===r.getAlpha(e,t.time))continue}const s=g.getTileCoordChildTileRange(r.tileCoord,I,P);let o=!1;s&&(o=b(f+1,s)),o||g.forEachTileCoordParentTileRange(r.tileCoord,b,I,P)}const F=p/s*h/y;Zt(this.pixelTransform,t.size[0]/2,t.size[1]/2,1/h,1/h,a,-x/2,-v/2);const M=Ht(this.pixelTransform);this.useContainer(e,M,this.getBackground(t));const A=this.context,O=A.canvas;Yt(this.inversePixelTransform,this.pixelTransform),Zt(this.tempTransform,x/2,v/2,F,F,0,-x/2,-v/2),O.width!=x||O.height!=v?(O.width=x,O.height=v):this.containerReused||A.clearRect(0,0,x,v),S&&this.clipUnrotated(A,t,S),u.getInterpolate()||(A.imageSmoothingEnabled=!1),this.preRender(A,t),this.renderedTiles.length=0;let N,D,G,k=Object.keys(R).map(Number);k.sort(l),1!==i.opacity||this.containerReused&&!u.getOpaque(t.viewState.projection)?(N=[],D=[]):k=k.reverse();for(let e=k.length-1;e>=0;--e){const i=k[e],n=u.getTilePixelSize(i,h,r),s=g.getResolution(i)/p,o=n[0]*s*F,a=n[1]*s*F,l=g.getTileCoordForCoordAndZ(Oe(E),i),c=g.getTileCoordExtent(l),d=zt(this.tempTransform,[y*(c[0]-E[0])/p,y*(E[3]-c[3])/p]),m=y*u.getGutterForProjection(r),_=R[i];for(const e in _){const n=_[e],r=n.tileCoord,s=l[1]-r[1],h=Math.round(d[0]-(s-1)*o),c=l[2]-r[2],g=Math.round(d[1]-(c-1)*a),p=Math.round(d[0]-s*o),y=Math.round(d[1]-c*a),x=h-p,v=g-y,S=f===i,w=S&&1!==n.getAlpha(X(this),t.time);let T=!1;if(!w)if(N){G=[p,y,p+x,y,p+x,y+v,p,y+v];for(let t=0,e=N.length;tthis._maxQueueLength;)this._queue.shift().callback(null,null)}_dispatch(){if(this._running||0===this._queue.length)return;const t=this._queue.shift();this._job=t;const e=t.inputs[0].width,i=t.inputs[0].height,n=t.inputs.map((function(t){return t.data.buffer})),r=this._workers.length;if(this._running=r,1===r)return void this._workers[0].postMessage({buffers:n,meta:t.meta,imageOps:this._imageOps,width:e,height:i},n);const s=t.inputs[0].data.length,o=4*Math.ceil(s/4/r);for(let s=0;sStamen Design, under CC BY 3.0.',nu],Mu={terrain:{extension:"png",opaque:!0},"terrain-background":{extension:"png",opaque:!0},"terrain-labels":{extension:"png",opaque:!1},"terrain-lines":{extension:"png",opaque:!1},"toner-background":{extension:"png",opaque:!0},toner:{extension:"png",opaque:!0},"toner-hybrid":{extension:"png",opaque:!1},"toner-labels":{extension:"png",opaque:!1},"toner-lines":{extension:"png",opaque:!1},"toner-lite":{extension:"png",opaque:!0},watercolor:{extension:"jpg",opaque:!0}},Au={terrain:{minZoom:0,maxZoom:18},toner:{minZoom:0,maxZoom:20},watercolor:{minZoom:0,maxZoom:18}};var Ou=class extends Dh{constructor(t){const e=t.layer.indexOf("-"),i=-1==e?t.layer:t.layer.slice(0,e),n=Au[i],r=Mu[t.layer],s=void 0!==t.url?t.url:"https://stamen-tiles-{a-d}.a.ssl.fastly.net/"+t.layer+"/{z}/{x}/{y}."+r.extension;super({attributions:Fu,cacheSize:t.cacheSize,crossOrigin:"anonymous",interpolate:t.interpolate,maxZoom:null!=t.maxZoom?t.maxZoom:n.maxZoom,minZoom:null!=t.minZoom?t.minZoom:n.minZoom,opaque:r.opaque,reprojectionErrorThreshold:t.reprojectionErrorThreshold,tileLoadFunction:t.tileLoadFunction,transition:t.transition,url:s,wrapX:t.wrapX,zDirection:t.zDirection})}};var Nu=class extends Ah{constructor(t){super({attributions:(t=t||{}).attributions,cacheSize:t.cacheSize,crossOrigin:t.crossOrigin,interpolate:t.interpolate,projection:t.projection,reprojectionErrorThreshold:t.reprojectionErrorThreshold,tileGrid:t.tileGrid,tileLoadFunction:t.tileLoadFunction,url:t.url,urls:t.urls,wrapX:void 0===t.wrapX||t.wrapX,transition:t.transition,zDirection:t.zDirection}),this.params_=t.params||{},this.hidpi_=void 0===t.hidpi||t.hidpi,this.tmpExtent_=[1/0,1/0,-1/0,-1/0],this.setKey(this.getKeyForParams_())}getKeyForParams_(){let t=0;const e=[];for(const i in this.params_)e[t++]=i+"-"+this.params_[i];return e.join("/")}getParams(){return this.params_}getRequestUrl_(t,e,i,n,r,s){const o=this.urls;if(!o)return;const a=r.getCode().split(/:(?=\d+$)/).pop();let l;if(s.SIZE=e[0]+","+e[1],s.BBOX=i.join(","),s.BBOXSR=a,s.IMAGESR=a,s.DPI=Math.round(s.DPI?s.DPI*n:90*n),1==o.length)l=o[0];else{l=o[Ti(El(t),o.length)]}return qc(l.replace(/MapServer\/?$/,"MapServer/export").replace(/ImageServer\/?$/,"ImageServer/exportImage"),s)}getTilePixelRatio(t){return this.hidpi_?t:1}updateParams(t){Object.assign(this.params_,t),this.setKey(this.getKeyForParams_())}tileUrlFunction(t,e,i){let n=this.getTileGrid();if(n||(n=this.getTileGridForProjection(i)),n.getResolutions().length<=t[0])return;1==e||this.hidpi_||(e=1);const r=n.getTileCoordExtent(t,this.tmpExtent_);let s=ll(n.getTileSize(t[0]),this.tmpSize);1!=e&&(s=al(s,e,this.tmpSize));const o={F:"image",FORMAT:"PNG32",TRANSPARENT:!0};return Object.assign(o,this.params_),this.getRequestUrl_(t,s,r,e,i,o)}};var Du=class extends Dh{constructor(t){super({opaque:!1,projection:(t=t||{}).projection,tileGrid:t.tileGrid,wrapX:void 0===t.wrapX||t.wrapX,zDirection:t.zDirection,url:t.template||"z:{z} x:{x} y:{y}",tileLoadFunction:(t,e)=>{const i=t.getTileCoord()[0],n=ll(this.tileGrid.getTileSize(i)),r=_t(n[0],n[1]);r.strokeStyle="grey",r.strokeRect(.5,.5,n[0]+.5,n[1]+.5),r.fillStyle="grey",r.strokeStyle="white",r.textAlign="center",r.textBaseline="middle",r.font="24px sans-serif",r.lineWidth=4,r.strokeText(e,n[0]/2,n[1]/2,n[0]),r.fillText(e,n[0]/2,n[1]/2,n[0]),t.setImage(r.canvas)}})}};var Gu=class extends Ah{constructor(t){if(super({attributions:t.attributions,cacheSize:t.cacheSize,crossOrigin:t.crossOrigin,interpolate:t.interpolate,projection:an("EPSG:3857"),reprojectionErrorThreshold:t.reprojectionErrorThreshold,state:"loading",tileLoadFunction:t.tileLoadFunction,wrapX:void 0===t.wrapX||t.wrapX,transition:t.transition,zDirection:t.zDirection}),this.tileJSON_=null,this.tileSize_=t.tileSize,t.url)if(t.jsonp)jl(t.url,this.handleTileJSONResponse.bind(this),this.handleTileJSONError.bind(this));else{const e=new XMLHttpRequest;e.addEventListener("load",this.onXHRLoad_.bind(this)),e.addEventListener("error",this.onXHRError_.bind(this)),e.open("GET",t.url),e.send()}else t.tileJSON?this.handleTileJSONResponse(t.tileJSON):Ft(!1,51)}onXHRLoad_(t){const e=t.target;if(!e.status||e.status>=200&&e.status<300){let t;try{t=JSON.parse(e.responseText)}catch(t){return void this.handleTileJSONError()}this.handleTileJSONResponse(t)}else this.handleTileJSONError()}onXHRError_(t){this.handleTileJSONError()}getTileJSON(){return this.tileJSON_}handleTileJSONResponse(t){const e=an("EPSG:4326"),i=this.getProjection();let n;if(void 0!==t.bounds){const r=pn(e,i);n=Ue(t.bounds,r)}const r=wh(i),s=t.minzoom||0,o=xh({extent:r,maxZoom:t.maxzoom||22,minZoom:s,tileSize:this.tileSize_});if(this.tileGrid=o,this.tileUrlFunction=Rh(t.tiles,o),t.attribution&&!this.getAttributions()){const e=void 0!==n?n:r;this.setAttributions((function(i){return Ge(e,i.extent)?[t.attribution]:null}))}this.tileJSON_=t,this.setState("ready")}handleTileJSONError(){this.setState("error")}};var ku=class extends Ah{constructor(t){t=t||{};const e=Object.assign({},t.params),i=!("TRANSPARENT"in e)||e.TRANSPARENT;super({attributions:t.attributions,attributionsCollapsible:t.attributionsCollapsible,cacheSize:t.cacheSize,crossOrigin:t.crossOrigin,interpolate:t.interpolate,opaque:!i,projection:t.projection,reprojectionErrorThreshold:t.reprojectionErrorThreshold,tileClass:t.tileClass,tileGrid:t.tileGrid,tileLoadFunction:t.tileLoadFunction,url:t.url,urls:t.urls,wrapX:void 0===t.wrapX||t.wrapX,transition:t.transition,zDirection:t.zDirection}),this.gutter_=void 0!==t.gutter?t.gutter:0,this.params_=e,this.v13_=!0,this.serverType_=t.serverType,this.hidpi_=void 0===t.hidpi||t.hidpi,this.tmpExtent_=[1/0,1/0,-1/0,-1/0],this.updateV13_(),this.setKey(this.getKeyForParams_())}getFeatureInfoUrl(t,e,i,n){const r=an(i),s=this.getProjection();let o=this.getTileGrid();o||(o=this.getTileGridForProjection(r));const a=o.getZForResolution(e,this.zDirection),l=o.getTileCoordForCoordAndZ(t,a);if(o.getResolutions().length<=l[0])return;let h=o.getResolution(l[0]),c=o.getTileCoordExtent(l,this.tmpExtent_),u=ll(o.getTileSize(l[0]),this.tmpSize);const d=this.gutter_;0!==d&&(u=sl(u,d,this.tmpSize),c=re(c,h*d,c)),s&&s!==r&&(h=nh(s,r,t,h),c=yn(c,r,s),t=_n(t,r,s));const g={SERVICE:"WMS",VERSION:tu,REQUEST:"GetFeatureInfo",FORMAT:"image/png",TRANSPARENT:!0,QUERY_LAYERS:this.params_.LAYERS};Object.assign(g,this.params_,n);const f=Math.floor((t[0]-c[0])/h),p=Math.floor((c[3]-t[1])/h);return g[this.v13_?"I":"X"]=f,g[this.v13_?"J":"Y"]=p,this.getRequestUrl_(l,u,c,1,s||r,g)}getLegendUrl(t,e){if(void 0===this.urls[0])return;const i={SERVICE:"WMS",VERSION:tu,REQUEST:"GetLegendGraphic",FORMAT:"image/png"};if(void 0===e||void 0===e.LAYER){const t=this.params_.LAYERS;if(!(!Array.isArray(t)||1===t.length))return;i.LAYER=t}if(void 0!==t){const e=this.getProjection()?this.getProjection().getMetersPerUnit():1,n=28e-5;i.SCALE=t*e/n}return Object.assign(i,e),qc(this.urls[0],i)}getGutter(){return this.gutter_}getParams(){return this.params_}getRequestUrl_(t,e,i,n,r,s){const o=this.urls;if(!o)return;if(s.WIDTH=e[0],s.HEIGHT=e[1],s[this.v13_?"CRS":"SRS"]=r.getCode(),"STYLES"in this.params_||(s.STYLES=""),1!=n)switch(this.serverType_){case"geoserver":const t=90*n+.5|0;"FORMAT_OPTIONS"in s?s.FORMAT_OPTIONS+=";dpi:"+t:s.FORMAT_OPTIONS="dpi:"+t;break;case"mapserver":s.MAP_RESOLUTION=90*n;break;case"carmentaserver":case"qgis":s.DPI=90*n;break;default:Ft(!1,52)}const a=r.getAxisOrientation(),l=i;if(this.v13_&&"ne"==a.substr(0,2)){let t;t=i[0],l[0]=i[1],l[1]=t,t=i[2],l[2]=i[3],l[3]=t}let h;if(s.BBOX=l.join(","),1==o.length)h=o[0];else{h=o[Ti(El(t),o.length)]}return qc(h,s)}getTilePixelRatio(t){return this.hidpi_&&void 0!==this.serverType_?t:1}getKeyForParams_(){let t=0;const e=[];for(const i in this.params_)e[t++]=i+"-"+this.params_[i];return e.join("/")}updateParams(t){Object.assign(this.params_,t),this.updateV13_(),this.setKey(this.getKeyForParams_())}updateV13_(){const t=this.params_.VERSION||tu;this.v13_=Li(t,"1.3")>=0}tileUrlFunction(t,e,i){let n=this.getTileGrid();if(n||(n=this.getTileGridForProjection(i)),n.getResolutions().length<=t[0])return;1==e||this.hidpi_&&void 0!==this.serverType_||(e=1);const r=n.getResolution(t[0]);let s=n.getTileCoordExtent(t,this.tmpExtent_),o=ll(n.getTileSize(t[0]),this.tmpSize);const a=this.gutter_;0!==a&&(o=sl(o,a,this.tmpSize),s=re(s,r*a,s)),1!=e&&(o=al(o,e,this.tmpSize));const l={SERVICE:"WMS",VERSION:tu,REQUEST:"GetMap",FORMAT:"image/png",TRANSPARENT:!0};return Object.assign(l,this.params_),this.getRequestUrl_(t,o,s,e,i,l)}};class ju extends ot{constructor(t,e,i,n,r,s){super(t,e),this.src_=i,this.extent_=n,this.preemptive_=r,this.grid_=null,this.keys_=null,this.data_=null,this.jsonp_=s}getImage(){return null}getData(t){if(!this.grid_||!this.keys_)return null;const e=(t[0]-this.extent_[0])/(this.extent_[2]-this.extent_[0]),i=(t[1]-this.extent_[1])/(this.extent_[3]-this.extent_[1]),n=this.grid_[Math.floor((1-i)*this.grid_.length)];if("string"!=typeof n)return null;let r=n.charCodeAt(Math.floor(e*n.length));r>=93&&r--,r>=35&&r--,r-=32;let s=null;if(r in this.keys_){const t=this.keys_[r];s=this.data_&&t in this.data_?this.data_[t]:t}return s}forDataAtCoordinate(t,e,i){this.state==et&&!0===i?(this.state=$,D(this,w,(function(i){e(this.getData(t))}),this),this.loadInternal_()):!0===i?setTimeout((()=>{e(this.getData(t))}),0):e(this.getData(t))}getKey(){return this.src_}handleError_(){this.state=tt,this.changed()}handleLoad_(t){this.grid_=t.grid,this.keys_=t.keys,this.data_=t.data,this.state=Q,this.changed()}loadInternal_(){if(this.state==$)if(this.state=J,this.jsonp_)jl(this.src_,this.handleLoad_.bind(this),this.handleError_.bind(this));else{const t=new XMLHttpRequest;t.addEventListener("load",this.onXHRLoad_.bind(this)),t.addEventListener("error",this.onXHRError_.bind(this)),t.open("GET",this.src_),t.send()}}onXHRLoad_(t){const e=t.target;if(!e.status||e.status>=200&&e.status<300){let t;try{t=JSON.parse(e.responseText)}catch(t){return void this.handleError_()}this.handleLoad_(t)}else this.handleError_()}onXHRError_(t){this.handleError_()}load(){this.preemptive_?this.loadInternal_():this.setState(et)}}var Bu=class extends Eh{constructor(t){if(super({projection:an("EPSG:3857"),state:"loading",zDirection:t.zDirection}),this.preemptive_=void 0===t.preemptive||t.preemptive,this.tileUrlFunction_=Ph,this.template_=void 0,this.jsonp_=t.jsonp||!1,t.url)if(this.jsonp_)jl(t.url,this.handleTileJSONResponse.bind(this),this.handleTileJSONError.bind(this));else{const e=new XMLHttpRequest;e.addEventListener("load",this.onXHRLoad_.bind(this)),e.addEventListener("error",this.onXHRError_.bind(this)),e.open("GET",t.url),e.send()}else t.tileJSON?this.handleTileJSONResponse(t.tileJSON):Ft(!1,51)}onXHRLoad_(t){const e=t.target;if(!e.status||e.status>=200&&e.status<300){let t;try{t=JSON.parse(e.responseText)}catch(t){return void this.handleTileJSONError()}this.handleTileJSONResponse(t)}else this.handleTileJSONError()}onXHRError_(t){this.handleTileJSONError()}getTemplate(){return this.template_}forDataAtCoordinateAndResolution(t,e,i,n){if(this.tileGrid){const r=this.tileGrid.getZForResolution(e,this.zDirection),s=this.tileGrid.getTileCoordForCoordAndZ(t,r);this.getTile(s[0],s[1],s[2],1,this.getProjection()).forDataAtCoordinate(t,i,n)}else!0===n?setTimeout((function(){i(null)}),0):i(null)}handleTileJSONError(){this.setState("error")}handleTileJSONResponse(t){const e=an("EPSG:4326"),i=this.getProjection();let n;if(void 0!==t.bounds){const r=pn(e,i);n=Ue(t.bounds,r)}const r=wh(i),s=t.minzoom||0,o=xh({extent:r,maxZoom:t.maxzoom||22,minZoom:s});this.tileGrid=o,this.template_=t.template;const a=t.grids;if(a){if(this.tileUrlFunction_=Rh(a,o),void 0!==t.attribution){const e=void 0!==n?n:r;this.setAttributions((function(i){return Ge(e,i.extent)?[t.attribution]:null}))}this.setState("ready")}else this.setState("error")}getTile(t,e,i,n,r){const s=vl(t,e,i);if(this.tileCache.containsKey(s))return this.tileCache.get(s);const o=[t,e,i],a=this.getTileCoordForTileUrlFunction(o,r),l=this.tileUrlFunction_(a,n,r),h=new ju(o,void 0!==l?$:et,void 0!==l?l:"",this.tileGrid.getTileCoordExtent(o),this.preemptive_,this.jsonp_);return this.tileCache.set(s,h),h}useTile(t,e,i){const n=vl(t,e,i);this.tileCache.containsKey(n)&&this.tileCache.get(n)}};var zu=class extends Fh{constructor(t){const e=t.projection||"EPSG:3857",i=t.extent||wh(e),n=t.tileGrid||xh({extent:i,maxResolution:t.maxResolution,maxZoom:void 0!==t.maxZoom?t.maxZoom:22,minZoom:t.minZoom,tileSize:t.tileSize||512});super({attributions:t.attributions,attributionsCollapsible:t.attributionsCollapsible,cacheSize:t.cacheSize,interpolate:!0,opaque:!1,projection:e,state:t.state,tileGrid:n,tileLoadFunction:t.tileLoadFunction?t.tileLoadFunction:Uu,tileUrlFunction:t.tileUrlFunction,url:t.url,urls:t.urls,wrapX:void 0===t.wrapX||t.wrapX,transition:t.transition,zDirection:void 0===t.zDirection?1:t.zDirection}),this.format_=t.format?t.format:null,this.sourceTileCache=new Rl(this.tileCache.highWaterMark),this.overlaps_=null==t.overlaps||t.overlaps,this.tileClass=t.tileClass?t.tileClass:Ml,this.tileGrids_={}}getFeaturesInExtent(t){const e=[],i=this.tileCache;if(0===i.getCount())return e;const n=Tl(i.peekFirstKey())[0],r=this.tileGrid;return i.forEach((function(i){if(i.tileCoord[0]!==n||i.getState()!==Q)return;const s=i.getSourceTiles();for(let i=0,n=s.length;i{const n=wl(e),r=i.peek(n);if(r){const e=r.sourceTiles;for(let i=0,n=e.length;i{const r=this.tileUrlFunction(n,t,e),s=this.sourceTileCache.containsKey(r)?this.sourceTileCache.get(r):new this.tileClass(n,r?$:et,r,this.format_,this.tileLoadFunction);i.sourceTiles.push(s);const o=s.getState();if(o{this.handleTileChange(e);const n=s.getState();if(n===Q||n===tt){const e=s.getKey();e in i.errorTileKeys?s.getState()===Q&&delete i.errorTileKeys[e]:i.loadingSourceTiles--,n===tt?i.errorTileKeys[e]=!0:s.removeEventListener(w,t),0===i.loadingSourceTiles&&i.setState(v(i.errorTileKeys)?Q:tt)}};s.addEventListener(w,t),i.loadingSourceTiles++}o===$&&(s.extent=l.getTileCoordExtent(n),s.projection=e,s.resolution=l.getResolution(n[0]),this.sourceTileCache.set(r,s),s.load())})),i.loadingSourceTiles||i.setState(i.sourceTiles.some((t=>t.getState()===tt))?tt:Q)}return i.sourceTiles}getTile(t,e,i,n,r){const s=vl(t,e,i),o=this.getKey();let a;if(this.tileCache.containsKey(s)&&(a=this.tileCache.get(s),a.key===o))return a;const l=[t,e,i];let h=this.getTileCoordForTileUrlFunction(l,r);const c=this.getTileGrid().getExtent(),u=this.getTileGridForProjection(r);if(h&&c){const e=u.getTileCoordExtent(h);re(e,-u.getResolution(t),e),Ge(c,e)||(h=null)}let d=!0;if(null!==h){const e=this.tileGrid,i=u.getResolution(t),s=e.getZForResolution(i,1),o=u.getTileCoordExtent(h);re(o,-i,o),e.forEachTileCoord(o,s,(t=>{d=d&&!this.tileUrlFunction(t,n,r)}))}const g=new Fl(l,d?et:$,h,this.getSourceTiles.bind(this,n,r));return g.key=o,a?(g.interimTile=a,g.refreshInterimChain(),this.tileCache.replace(s,g)):this.tileCache.set(s,g),g}getTileGridForProjection(t){const e=t.getCode();let i=this.tileGrids_[e];if(!i){const t=this.tileGrid,n=t.getResolutions().slice(),r=n.map((function(e,i){return t.getOrigin(i)})),s=n.map((function(e,i){return t.getTileSize(i)})),o=43;for(let t=n.length;t0)||i.find((function(i){return e.Identifier==i.TileMatrix||!e.Identifier.includes(":")&&t.Identifier+":"+e.Identifier===i.TileMatrix})),l){r.push(e.Identifier);const t=28e-5*e.ScaleDenominator/h,i=e.TileWidth,l=e.TileHeight;c?s.push([e.TopLeftCorner[1],e.TopLeftCorner[0]]):s.push(e.TopLeftCorner),n.push(t),o.push(i==l?i:[i,l]),a.push([e.MatrixWidth,e.MatrixHeight])}})),new Xu({extent:e,origins:s,resolutions:n,matrixIds:r,tileSizes:o,sizes:a})}var Zu=class extends Ah{constructor(t){const e=void 0!==t.requestEncoding?t.requestEncoding:"KVP",i=t.tileGrid;let n=t.urls;void 0===n&&void 0!==t.url&&(n=Ih(t.url)),super({attributions:t.attributions,attributionsCollapsible:t.attributionsCollapsible,cacheSize:t.cacheSize,crossOrigin:t.crossOrigin,interpolate:t.interpolate,projection:t.projection,reprojectionErrorThreshold:t.reprojectionErrorThreshold,tileClass:t.tileClass,tileGrid:i,tileLoadFunction:t.tileLoadFunction,tilePixelRatio:t.tilePixelRatio,urls:n,wrapX:void 0!==t.wrapX&&t.wrapX,transition:t.transition,zDirection:t.zDirection}),this.version_=void 0!==t.version?t.version:"1.0.0",this.format_=void 0!==t.format?t.format:"image/jpeg",this.dimensions_=void 0!==t.dimensions?t.dimensions:{},this.layer_=t.layer,this.matrixSet_=t.matrixSet,this.style_=t.style,this.requestEncoding_=e,this.setKey(this.getKeyForDimensions_()),n&&n.length>0&&(this.tileUrlFunction=bh(n.map(this.createFromWMTSTemplate.bind(this))))}setUrls(t){this.urls=t;const e=t.join("\n");this.setTileUrlFunction(bh(t.map(this.createFromWMTSTemplate.bind(this))),e)}getDimensions(){return this.dimensions_}getFormat(){return this.format_}getLayer(){return this.layer_}getMatrixSet(){return this.matrixSet_}getRequestEncoding(){return this.requestEncoding_}getStyle(){return this.style_}getVersion(){return this.version_}getKeyForDimensions_(){const t=this.urls?this.urls.slice(0):[];for(const e in this.dimensions_)t.push(e+"-"+this.dimensions_[e]);return t.join("/")}updateDimensions(t){Object.assign(this.dimensions_,t),this.setKey(this.getKeyForDimensions_())}createFromWMTSTemplate(t){const e=this.requestEncoding_,i={layer:this.layer_,style:this.style_,tilematrixset:this.matrixSet_};"KVP"==e&&Object.assign(i,{Service:"WMTS",Request:"GetTile",Version:this.version_,Format:this.format_}),t="KVP"==e?qc(t,i):t.replace(/\{(\w+?)\}/g,(function(t,e){return e.toLowerCase()in i?i[e.toLowerCase()]:t}));const n=this.tileGrid,r=this.dimensions_;return function(i,s,o){if(!i)return;const a={TileMatrix:n.getMatrixId(i[0]),TileCol:i[1],TileRow:i[2]};Object.assign(a,r);let l=t;return l="KVP"==e?qc(l,a):l.replace(/\{(\w+?)\}/g,(function(t,e){return a[e]})),l}}};const Yu=34962,Ku=34963,qu=35044,Hu=35048,$u=5126,Ju=["experimental-webgl","webgl","webkit-3d","moz-webgl"];function Qu(t,e){e=Object.assign({preserveDrawingBuffer:!0,antialias:!ct},e);const i=Ju.length;for(let n=0;n{this.uniforms_.push({value:t.uniforms[i],location:e.getUniformLocation(this.renderTargetProgram_,i)})}))}getGL(){return this.gl_}init(t){const e=this.getGL(),i=[e.drawingBufferWidth*this.scaleRatio_,e.drawingBufferHeight*this.scaleRatio_];if(e.bindFramebuffer(e.FRAMEBUFFER,this.getFrameBuffer()),e.viewport(0,0,i[0],i[1]),!this.renderTargetTextureSize_||this.renderTargetTextureSize_[0]!==i[0]||this.renderTargetTextureSize_[1]!==i[1]){this.renderTargetTextureSize_=i;const t=0,n=e.RGBA,r=0,s=e.RGBA,o=e.UNSIGNED_BYTE,a=null;e.bindTexture(e.TEXTURE_2D,this.renderTargetTexture_),e.texImage2D(e.TEXTURE_2D,t,n,i[0],i[1],r,s,o,a),e.texParameteri(e.TEXTURE_2D,e.TEXTURE_MIN_FILTER,e.LINEAR),e.texParameteri(e.TEXTURE_2D,e.TEXTURE_WRAP_S,e.CLAMP_TO_EDGE),e.texParameteri(e.TEXTURE_2D,e.TEXTURE_WRAP_T,e.CLAMP_TO_EDGE),e.framebufferTexture2D(e.FRAMEBUFFER,e.COLOR_ATTACHMENT0,e.TEXTURE_2D,this.renderTargetTexture_,0)}}apply(t,e,i,n){const r=this.getGL(),s=t.size;if(r.bindFramebuffer(r.FRAMEBUFFER,e?e.getFrameBuffer():null),r.activeTexture(r.TEXTURE0),r.bindTexture(r.TEXTURE_2D,this.renderTargetTexture_),!e){const e=X(r.canvas);if(!t.renderTargets[e]){const i=r.getContextAttributes();i&&i.preserveDrawingBuffer&&(r.clearColor(0,0,0,0),r.clear(r.COLOR_BUFFER_BIT)),t.renderTargets[e]=!0}}r.enable(r.BLEND),r.blendFunc(r.ONE,r.ONE_MINUS_SRC_ALPHA),r.viewport(0,0,r.drawingBufferWidth,r.drawingBufferHeight),r.bindBuffer(r.ARRAY_BUFFER,this.renderTargetVerticesBuffer_),r.useProgram(this.renderTargetProgram_),r.enableVertexAttribArray(this.renderTargetAttribLocation_),r.vertexAttribPointer(this.renderTargetAttribLocation_,2,r.FLOAT,!1,0,0),r.uniform2f(this.renderTargetUniformLocation_,s[0],s[1]),r.uniform1i(this.renderTargetTextureLocation_,0);const o=t.layerStatesArray[t.layerIndex].opacity;r.uniform1f(this.renderTargetOpacityLocation_,o),this.applyUniforms(t),i&&i(r,t),r.drawArrays(r.TRIANGLES,0,6),n&&n(r,t)}getFrameBuffer(){return this.frameBuffer_}applyUniforms(t){const e=this.getGL();let i,n=1;this.uniforms_.forEach((function(r){if(i="function"==typeof r.value?r.value(t):r.value,i instanceof HTMLCanvasElement||i instanceof ImageData)r.texture||(r.texture=e.createTexture()),e.activeTexture(e[`TEXTURE${n}`]),e.bindTexture(e.TEXTURE_2D,r.texture),e.texParameteri(e.TEXTURE_2D,e.TEXTURE_MIN_FILTER,e.LINEAR),e.texParameteri(e.TEXTURE_2D,e.TEXTURE_WRAP_S,e.CLAMP_TO_EDGE),e.texParameteri(e.TEXTURE_2D,e.TEXTURE_WRAP_T,e.CLAMP_TO_EDGE),i instanceof ImageData?e.texImage2D(e.TEXTURE_2D,0,e.RGBA,e.RGBA,i.width,i.height,0,e.UNSIGNED_BYTE,new Uint8Array(i.data)):e.texImage2D(e.TEXTURE_2D,0,e.RGBA,e.RGBA,e.UNSIGNED_BYTE,i),e.uniform1i(r.location,n++);else if(Array.isArray(i))switch(i.length){case 2:return void e.uniform2f(r.location,i[0],i[1]);case 3:return void e.uniform3f(r.location,i[0],i[1],i[2]);case 4:return void e.uniform4f(r.location,i[0],i[1],i[2],i[3]);default:return}else"number"==typeof i&&e.uniform1f(r.location,i)}))}};function Ad(){return[1,0,0,0,0,1,0,0,0,0,1,0,0,0,0,1]}function Od(t,e){return t[0]=e[0],t[1]=e[1],t[4]=e[2],t[5]=e[3],t[12]=e[4],t[13]=e[5],t}const Nd="u_projectionMatrix",Dd="u_offsetScaleMatrix",Gd="u_offsetRotateMatrix",kd="u_time",jd="u_zoom",Bd="u_resolution",zd="u_sizePx",Ud="u_pixelRatio",Xd={UNSIGNED_BYTE:5121,UNSIGNED_SHORT:5123,UNSIGNED_INT:5125,FLOAT:$u},Vd={};function Wd(t){return"shared/"+t}let Zd=0;function Yd(t){let e=0;for(let i=0;i0)return;const i=Qu(e.canvas).getExtension("WEBGL_lose_context");i&&i.loseContext(),delete Vd[t]}(this.canvasCacheKey_),delete this.gl_,delete this.canvas_}prepareDraw(t,e){const i=this.getGL(),n=this.getCanvas(),r=t.size,s=t.pixelRatio;n.width=r[0]*s,n.height=r[1]*s,n.style.width=r[0]+"px",n.style.height=r[1]+"px";for(let e=this.postProcessPasses_.length-1;e>=0;e--)this.postProcessPasses_[e].init(t);i.bindTexture(i.TEXTURE_2D,null),i.clearColor(0,0,0,0),i.clear(i.COLOR_BUFFER_BIT),i.enable(i.BLEND),i.blendFunc(i.ONE,e?i.ZERO:i.ONE_MINUS_SRC_ALPHA)}prepareDrawToRenderTarget(t,e,i){const n=this.getGL(),r=e.getSize();n.bindFramebuffer(n.FRAMEBUFFER,e.getFramebuffer()),n.viewport(0,0,r[0],r[1]),n.bindTexture(n.TEXTURE_2D,e.getTexture()),n.clearColor(0,0,0,0),n.clear(n.COLOR_BUFFER_BIT),n.enable(n.BLEND),n.blendFunc(n.ONE,i?n.ZERO:n.ONE_MINUS_SRC_ALPHA)}drawElements(t,e){const i=this.getGL();this.getExtension("OES_element_index_uint");const n=i.UNSIGNED_INT,r=e-t,s=4*t;i.drawElements(i.TRIANGLES,r,n,s)}finalizeDraw(t,e,i){for(let n=0,r=this.postProcessPasses_.length;n{if(i="function"==typeof r.value?r.value(t):r.value,i instanceof HTMLCanvasElement||i instanceof HTMLImageElement||i instanceof ImageData){r.texture||(r.prevValue=void 0,r.texture=e.createTexture()),e.activeTexture(e[`TEXTURE${n}`]),e.bindTexture(e.TEXTURE_2D,r.texture),e.texParameteri(e.TEXTURE_2D,e.TEXTURE_MIN_FILTER,e.LINEAR),e.texParameteri(e.TEXTURE_2D,e.TEXTURE_WRAP_S,e.CLAMP_TO_EDGE),e.texParameteri(e.TEXTURE_2D,e.TEXTURE_WRAP_T,e.CLAMP_TO_EDGE);(!(i instanceof HTMLImageElement)||i.complete)&&r.prevValue!==i&&(r.prevValue=i,e.texImage2D(e.TEXTURE_2D,0,e.RGBA,e.RGBA,e.UNSIGNED_BYTE,i)),e.uniform1i(this.getUniformLocation(r.name),n++)}else if(Array.isArray(i)&&6===i.length)this.setUniformMatrixValue(r.name,Od(this.tmpMat4_,i));else if(Array.isArray(i)&&i.length<=4)switch(i.length){case 2:return void e.uniform2f(this.getUniformLocation(r.name),i[0],i[1]);case 3:return void e.uniform3f(this.getUniformLocation(r.name),i[0],i[1],i[2]);case 4:return void e.uniform4f(this.getUniformLocation(r.name),i[0],i[1],i[2],i[3]);default:return}else"number"==typeof i&&e.uniform1f(this.getUniformLocation(r.name),i)}))}useProgram(t,e){this.getGL().useProgram(t),this.currentProgram_=t,this.uniformLocations_={},this.attribLocations_={},this.applyFrameState(e),this.applyUniforms(e)}compileShader(t,e){const i=this.getGL(),n=i.createShader(e);return i.shaderSource(n,t),i.compileShader(n),n}getProgram(t,e){const i=this.getGL(),n=this.compileShader(t,i.FRAGMENT_SHADER),r=this.compileShader(e,i.VERTEX_SHADER),s=i.createProgram();if(i.attachShader(s,n),i.attachShader(s,r),i.linkProgram(s),!i.getShaderParameter(n,i.COMPILE_STATUS)){const t=`Fragment shader compilation failed: ${i.getShaderInfoLog(n)}`;throw new Error(t)}if(i.deleteShader(n),!i.getShaderParameter(r,i.COMPILE_STATUS)){const t=`Vertex shader compilation failed: ${i.getShaderInfoLog(r)}`;throw new Error(t)}if(i.deleteShader(r),!i.getProgramParameter(s,i.LINK_STATUS)){const t=`GL program linking failed: ${i.getShaderInfoLog(r)}`;throw new Error(t)}return s}getUniformLocation(t){return void 0===this.uniformLocations_[t]&&(this.uniformLocations_[t]=this.getGL().getUniformLocation(this.currentProgram_,t)),this.uniformLocations_[t]}getAttributeLocation(t){return void 0===this.attribLocations_[t]&&(this.attribLocations_[t]=this.getGL().getAttribLocation(this.currentProgram_,t)),this.attribLocations_[t]}makeProjectionTransform(t,e){const i=t.size,n=t.viewState.rotation,r=t.viewState.resolution,s=t.viewState.center;return Gt(e),Zt(e,0,0,2/(r*i[0]),2/(r*i[1]),-n,-s[0],-s[1]),e}setUniformFloatValue(t,e){this.getGL().uniform1f(this.getUniformLocation(t),e)}setUniformFloatVec2(t,e){this.getGL().uniform2fv(this.getUniformLocation(t),e)}setUniformFloatVec4(t,e){this.getGL().uniform4fv(this.getUniformLocation(t),e)}setUniformMatrixValue(t,e){this.getGL().uniformMatrix4fv(this.getUniformLocation(t),!1,e)}enableAttributeArray_(t,e,i,n,r){const s=this.getAttributeLocation(t);s<0||(this.getGL().enableVertexAttribArray(s),this.getGL().vertexAttribPointer(s,e,i,!1,n,r))}enableAttributes(t){const e=Yd(t);let i=0;for(let n=0;nthis.size_[0]||e>=this.size_[1])return $d[0]=0,$d[1]=0,$d[2]=0,$d[3]=0,$d;this.readAll();const i=Math.floor(t)+(this.size_[1]-Math.floor(e)-1)*this.size_[0];return $d[0]=this.data_[4*i],$d[1]=this.data_[4*i+1],$d[2]=this.data_[4*i+2],$d[3]=this.data_[4*i+3],$d}getTexture(){return this.texture_}getFramebuffer(){return this.framebuffer_}updateSize_(){const t=this.size_,e=this.helper_.getGL();this.texture_=this.helper_.createTexture(t,null,this.texture_),e.bindFramebuffer(e.FRAMEBUFFER,this.framebuffer_),e.viewport(0,0,t[0],t[1]),e.framebufferTexture2D(e.FRAMEBUFFER,e.COLOR_ATTACHMENT0,e.TEXTURE_2D,this.texture_,0),this.data_=new Uint8Array(t[0]*t[1]*4)}};function Qd(t,e,i){const n=i?t.LINEAR:t.NEAREST;t.bindTexture(t.TEXTURE_2D,e),t.texParameteri(t.TEXTURE_2D,t.TEXTURE_WRAP_S,t.CLAMP_TO_EDGE),t.texParameteri(t.TEXTURE_2D,t.TEXTURE_WRAP_T,t.CLAMP_TO_EDGE),t.texParameteri(t.TEXTURE_2D,t.TEXTURE_MIN_FILTER,n),t.texParameteri(t.TEXTURE_2D,t.TEXTURE_MAG_FILTER,n)}function tg(t,e,i,n,r,s){const o=t.getGL();let a,l;if(i instanceof Float32Array){a=o.FLOAT,t.getExtension("OES_texture_float");l=null!==t.getExtension("OES_texture_float_linear")}else a=o.UNSIGNED_BYTE,l=!0;Qd(o,e,s&&l);const h=i.byteLength/n[1];let c,u=1;switch(h%8==0?u=8:h%4==0?u=4:h%2==0&&(u=2),r){case 1:c=o.LUMINANCE;break;case 2:c=o.LUMINANCE_ALPHA;break;case 3:c=o.RGB;break;case 4:c=o.RGBA;break;default:throw new Error(`Unsupported number of bands: ${r}`)}const d=o.getParameter(o.UNPACK_ALIGNMENT);o.pixelStorei(o.UNPACK_ALIGNMENT,u),o.texImage2D(o.TEXTURE_2D,0,c,n[0],n[1],0,c,a,i),o.pixelStorei(o.UNPACK_ALIGNMENT,d)}let eg=null;var ig=class extends S{constructor(t){super(),this.tile,this.textures=[],this.handleTileChange_=this.handleTileChange_.bind(this),this.renderSize_=ll(t.grid.getTileSize(t.tile.tileCoord[0])),this.gutter_=t.gutter||0,this.bandCount=NaN,this.helper_=t.helper;const e=new Id(Yu,qu);e.fromArray([0,1,1,1,1,0,0,0]),this.helper_.flushBufferData(e),this.coords=e,this.setTile(t.tile)}setTile(t){if(t!==this.tile)if(this.tile&&this.tile.removeEventListener(w,this.handleTileChange_),this.tile=t,this.textures.length=0,this.loaded=t.getState()===Q,this.loaded)this.uploadTile_();else{if(t instanceof os){const e=t.getImage();e instanceof Image&&!e.crossOrigin&&(e.crossOrigin="anonymous")}t.addEventListener(w,this.handleTileChange_)}}uploadTile_(){const t=this.helper_,e=t.getGL(),i=this.tile;let n;n=i instanceof os||i instanceof lh?i.getImage():i.getData();const r=Ct(n);if(r){const t=e.createTexture();return this.textures.push(t),this.bandCount=4,void function(t,e,i,n){Qd(t,e,n),t.texImage2D(t.TEXTURE_2D,0,t.RGBA,t.RGBA,t.UNSIGNED_BYTE,i)}(e,t,r,i.interpolate)}n=Rt(n);const s=i.getSize(),o=[s[0]+2*this.gutter_,s[1]+2*this.gutter_],a=n instanceof Float32Array,l=o[0]*o[1],h=a?Float32Array:Uint8Array,c=h.BYTES_PER_ELEMENT,u=n.byteLength/o[1];this.bandCount=Math.floor(u/c/o[0]);const d=Math.ceil(this.bandCount/4);if(1===d){const r=e.createTexture();return this.textures.push(r),void tg(t,r,n,o,this.bandCount,i.interpolate)}const g=new Array(d);for(let t=0;t=f;--r){const i=l.getTileRangeForExtentAndZ(e,r,this.tempTileRange_),o=l.getResolution(r);for(let e=i.minX;e<=i.maxX;++e)for(let g=i.minY;g<=i.maxY;++g){const i=xl(r,e,g,this.tempTileCoord_),f=dg(a,i);let p,m;if(d.containsKey(f)&&(p=d.get(f),m=p.tile),!p||p.tile.key!==a.getKey())if(m=a.getTile(r,e,g,t.pixelRatio,s.projection),p)if(this.isDrawableTile_(m))p.setTile(m);else{const t=m.getInterimTile();p.setTile(t)}else p=new ig({tile:m,grid:l,helper:this.helper,gutter:h}),d.set(f,p);cg(n,p,r);const _=m.getKey();u[_]=!0,m.getState()===$&&(t.tileQueue.isKeyQueued(_)||t.tileQueue.enqueue([m,c,l.getTileCoordCenter(i),o]))}}}renderFrame(t){this.frameState_=t,this.renderComplete=!0;const e=this.helper.getGL();this.preRender(e,t);const i=t.viewState,n=this.getLayer(),r=n.getRenderSource(),s=r.getTileGridForProjection(i.projection),o=r.getGutterForProjection(i.projection),a=ug(t,t.extent),h=s.getZForResolution(i.resolution,r.zDirection),c={},u=n.getPreload();if(t.nextExtent){const e=s.getZForResolution(i.nextResolution,r.zDirection),n=ug(t,t.nextExtent);this.enqueueTiles(t,n,e,c,u)}this.enqueueTiles(t,a,h,c,0),u>0&&setTimeout((()=>{this.enqueueTiles(t,a,h-1,c,u-1)}),0);const d={},g=X(this),f=t.time;let p=!1;const m=c[h];for(let t=0,e=m.length;t=r;--t){if(this.findAltTiles_(s,n,t,c))break}}this.helper.useProgram(this.program_,t),this.helper.prepareDraw(t,!p);const _=Object.keys(c).map(Number).sort(l),y=i.center[0],x=i.center[1];for(let n=0,r=_.length;n0&&(R=s.getTileCoordExtent(c),Ae(R,a,R)),this.helper.setUniformFloatVec4(sg.RENDER_EXTENT,R),this.helper.setUniformFloatValue(sg.RESOLUTION,i.resolution),this.helper.setUniformFloatValue(sg.ZOOM,i.zoom),this.helper.drawElements(0,this.indices_.getSize())}}this.helper.finalizeDraw(t,this.dispatchPreComposeEvent,this.dispatchPostComposeEvent);const v=this.helper.getCanvas(),S=this.tileTextureCache_;for(;S.canExpireCache();){S.pop().dispose()}return t.postRenderFunctions.push((function(t,e){r.updateCacheSize(.1,e.viewState.projection),r.expireCache(e.viewState.projection,lg)})),this.postRender(e,t),v}getData(t){if(!this.helper.getGL())return null;const e=this.frameState_;if(!e)return null;const i=this.getLayer(),n=zt(e.pixelToCoordinateTransform,t.slice()),r=e.viewState,s=i.getExtent();if(s&&!ae(Cn(s,r.projection),n))return null;const o=i.getSources(ne([n]),r.resolution);let a,l,h;for(a=o.length-1;a>=0;--a)if(l=o[a],"ready"===l.getState()){if(h=l.getTileGridForProjection(r.projection),l.getWrapX())break;const t=h.getExtent();if(!t||ae(t,n))break}if(a<0)return null;const c=this.tileTextureCache_;for(let t=h.getZForResolution(r.resolution);t>=h.getMinZoom();--t){const e=h.getTileCoordForCoordAndZ(n,t),i=dg(l,e);if(!c.containsKey(i))continue;const r=c.get(i),s=r.tile;if((s instanceof lh||s instanceof gc)&&s.getState()===et)return null;if(!r.loaded)continue;const o=h.getOrigin(t),a=ll(h.getTileSize(t)),u=h.getResolution(t),d=(n[0]-o[0])/u-e[1]*a[0],g=(o[1]-n[1])/u-e[2]*a[1];return r.getPixelData(d,g)}return null}findAltTiles_(t,e,i,n){const r=t.getTileRangeForTileCoordAndZ(e,i,this.tempTileRange_);if(!r)return!1;let s=!0;const o=this.tileTextureCache_,a=this.getLayer().getRenderSource();for(let t=r.minX;t<=r.maxX;++t)for(let e=r.minY;e<=r.maxY;++e){const r=dg(a,[i,t,e]);let l=!1;if(o.containsKey(r)){const t=o.get(r);t.loaded&&(cg(n,t,i),l=!0)}l||(s=!1)}return s}clearCache(){const t=this.tileTextureCache_;t.forEach((t=>t.dispose())),t.clear()}removeHelper(){this.helper&&this.clearCache(),super.removeHelper()}disposeInternal(){const t=this.helper;if(t){t.getGL().deleteProgram(this.program_),delete this.program_,t.deleteBuffer(this.indices_)}super.disposeInternal(),delete this.indices_,delete this.tileTextureCache_,delete this.frameState_}};const fg=1,pg=2,mg=4,_g=8,yg=16,xg=31,vg=0,Sg={};function wg(t){if("number"==typeof t)return fg;if("boolean"==typeof t)return _g;if("string"==typeof t)return ms(t)?mg|pg:pg;if(!Array.isArray(t))throw new Error(`Unhandled value type: ${JSON.stringify(t)}`);const e=t;if(e.every((function(t){return"number"==typeof t})))return 3===e.length||4===e.length?mg|yg:yg;if("string"!=typeof e[0])throw new Error(`Expected an expression operator but received: ${JSON.stringify(e)}`);const i=Sg[e[0]];if(void 0===i)throw new Error(`Unrecognized expression operator: ${JSON.stringify(e)}`);return i.getReturnType(e.slice(1))}function Tg(t){return Math.log2(t)%1==0}function Eg(t){const e=t.toString();return e.includes(".")?e:e+".0"}function Cg(t){if(t.length<2||t.length>4)throw new Error("`formatArray` can only output `vec2`, `vec3` or `vec4` arrays.");return`vec${t.length}(${t.map(Eg).join(", ")})`}function Rg(t){const e=gs(t).slice();return e.length<4&&e.push(1),Cg(e.map((function(t,e){return e<3?t/255:t})))}function bg(t,e){return void 0===t.stringLiteralsMap[e]&&(t.stringLiteralsMap[e]=Object.keys(t.stringLiteralsMap).length),t.stringLiteralsMap[e]}function Pg(t,e){return Eg(bg(t,e))}function Ig(t,e,i){if(Array.isArray(e)&&"string"==typeof e[0]){const n=Sg[e[0]];if(void 0===n)throw new Error(`Unrecognized expression operator: ${JSON.stringify(e)}`);return n.toGlsl(t,e.slice(1),i)}const n=wg(e);if((n&fg)>0)return Eg(e);if((n&_g)>0)return e.toString();if((n&pg)>0&&(void 0===i||i==pg))return Pg(t,e.toString());if((n&mg)>0&&(void 0===i||i==mg))return Rg(e);if((n&yg)>0)return Cg(e);throw new Error(`Unexpected expression ${e} (expected type ${i})`)}function Lg(t){if(!(wg(t)&fg))throw new Error(`A numeric value was expected, got ${JSON.stringify(t)} instead`)}function Fg(t){for(let e=0;ee)throw new Error(`At most ${e} arguments were expected, got ${t.length} instead`)}function Gg(t){if(t.length%2!=0)throw new Error(`An even amount of arguments was expected, got ${t} instead`)}function kg(t,e){if(!Tg(e))throw new Error(`Could not infer only one type from the following expression: ${JSON.stringify(t)}`)}function jg(t){return"u_var_"+t}Sg.get={getReturnType:function(t){return xg},toGlsl:function(t,e){Og(e,1),Mg(e[0]);const i=e[0].toString();t.attributes.includes(i)||t.attributes.push(i);return(t.inFragmentShader?"v_":"a_")+i}},Sg.var={getReturnType:function(t){return xg},toGlsl:function(t,e){Og(e,1),Mg(e[0]);const i=e[0].toString();return t.variables.includes(i)||t.variables.push(i),jg(i)}};const Bg="u_paletteTextures";Sg.palette={getReturnType:function(t){return mg},toGlsl:function(t,e){Og(e,2),Lg(e[0]);const i=Ig(t,e[0]),n=e[1];if(!Array.isArray(n))throw new Error("The second argument of palette must be an array");const r=n.length,s=new Uint8Array(4*r);for(let t=0;tIg(e,t))).join(` ${t} `),n=`(${n})`,n}}}Sg.band={getReturnType:function(t){return fg},toGlsl:function(t,e){Ng(e,1),Dg(e,3);const i=e[0];if(!(zg in t.functions)){let e="";const i=t.bandCount||1;for(let t=0;tIg(t,e))).join(" * ")})`}},Sg["/"]={getReturnType:function(t){return fg},toGlsl:function(t,e){return Og(e,2),Fg(e),`(${Ig(t,e[0])} / ${Ig(t,e[1])})`}},Sg["+"]={getReturnType:function(t){return fg},toGlsl:function(t,e){return Ng(e,2),Fg(e),`(${e.map((e=>Ig(t,e))).join(" + ")})`}},Sg["-"]={getReturnType:function(t){return fg},toGlsl:function(t,e){return Og(e,2),Fg(e),`(${Ig(t,e[0])} - ${Ig(t,e[1])})`}},Sg.clamp={getReturnType:function(t){return fg},toGlsl:function(t,e){Og(e,3),Fg(e);const i=Ig(t,e[1]),n=Ig(t,e[2]);return`clamp(${Ig(t,e[0])}, ${i}, ${n})`}},Sg["%"]={getReturnType:function(t){return fg},toGlsl:function(t,e){return Og(e,2),Fg(e),`mod(${Ig(t,e[0])}, ${Ig(t,e[1])})`}},Sg["^"]={getReturnType:function(t){return fg},toGlsl:function(t,e){return Og(e,2),Fg(e),`pow(${Ig(t,e[0])}, ${Ig(t,e[1])})`}},Sg.abs={getReturnType:function(t){return fg},toGlsl:function(t,e){return Og(e,1),Fg(e),`abs(${Ig(t,e[0])})`}},Sg.floor={getReturnType:function(t){return fg},toGlsl:function(t,e){return Og(e,1),Fg(e),`floor(${Ig(t,e[0])})`}},Sg.round={getReturnType:function(t){return fg},toGlsl:function(t,e){return Og(e,1),Fg(e),`floor(${Ig(t,e[0])} + 0.5)`}},Sg.ceil={getReturnType:function(t){return fg},toGlsl:function(t,e){return Og(e,1),Fg(e),`ceil(${Ig(t,e[0])})`}},Sg.sin={getReturnType:function(t){return fg},toGlsl:function(t,e){return Og(e,1),Fg(e),`sin(${Ig(t,e[0])})`}},Sg.cos={getReturnType:function(t){return fg},toGlsl:function(t,e){return Og(e,1),Fg(e),`cos(${Ig(t,e[0])})`}},Sg.atan={getReturnType:function(t){return fg},toGlsl:function(t,e){return Ng(e,1),Dg(e,2),Fg(e),2===e.length?`atan(${Ig(t,e[0])}, ${Ig(t,e[1])})`:`atan(${Ig(t,e[0])})`}},Sg[">"]={getReturnType:function(t){return _g},toGlsl:function(t,e){return Og(e,2),Fg(e),`(${Ig(t,e[0])} > ${Ig(t,e[1])})`}},Sg[">="]={getReturnType:function(t){return _g},toGlsl:function(t,e){return Og(e,2),Fg(e),`(${Ig(t,e[0])} >= ${Ig(t,e[1])})`}},Sg["<"]={getReturnType:function(t){return _g},toGlsl:function(t,e){return Og(e,2),Fg(e),`(${Ig(t,e[0])} < ${Ig(t,e[1])})`}},Sg["<="]={getReturnType:function(t){return _g},toGlsl:function(t,e){return Og(e,2),Fg(e),`(${Ig(t,e[0])} <= ${Ig(t,e[1])})`}},Sg["=="]=Ug("=="),Sg["!="]=Ug("!="),Sg["!"]={getReturnType:function(t){return _g},toGlsl:function(t,e){return Og(e,1),Ag(e[0]),`(!${Ig(t,e[0])})`}},Sg.all=Xg("&&"),Sg.any=Xg("||"),Sg.between={getReturnType:function(t){return _g},toGlsl:function(t,e){Og(e,3),Fg(e);const i=Ig(t,e[1]),n=Ig(t,e[2]),r=Ig(t,e[0]);return`(${r} >= ${i} && ${r} <= ${n})`}},Sg.array={getReturnType:function(t){return yg},toGlsl:function(t,e){Ng(e,2),Dg(e,4),Fg(e);const i=e.map((function(e){return Ig(t,e,fg)}));return`vec${e.length}(${i.join(", ")})`}},Sg.color={getReturnType:function(t){return mg},toGlsl:function(t,e){Ng(e,3),Dg(e,4),Fg(e);const i=e;3===e.length&&i.push(1);const n=e.map((function(e,i){return Ig(t,e,fg)+(i<3?" / 255.0":"")}));return`vec${e.length}(${n.join(", ")})`}},Sg.interpolate={getReturnType:function(t){let e=mg|fg;for(let i=3;i=1;i-=2){o=`(${r} == ${Ig(t,e[i])} ? ${Ig(t,e[i+1],n)} : ${o||s})`}return o}},Sg.case={getReturnType:function(t){let e=xg;for(let i=1;i=0;i-=2){s=`(${Ig(t,e[i])} ? ${Ig(t,e[i+1],n)} : ${s||r})`}return s}};class Vg{constructor(){this.uniforms=[],this.attributes=[],this.varyings=[],this.sizeExpression="vec2(1.0)",this.rotationExpression="0.0",this.offsetExpression="vec2(0.0)",this.colorExpression="vec4(1.0)",this.texCoordExpression="vec4(0.0, 0.0, 1.0, 1.0)",this.discardExpression="false",this.rotateWithView=!1}addUniform(t){return this.uniforms.push(t),this}addAttribute(t){return this.attributes.push(t),this}addVarying(t,e,i){return this.varyings.push({name:t,type:e,expression:i}),this}setSizeExpression(t){return this.sizeExpression=t,this}setRotationExpression(t){return this.rotationExpression=t,this}setSymbolOffsetExpression(t){return this.offsetExpression=t,this}setColorExpression(t){return this.colorExpression=t,this}setTextureCoordinateExpression(t){return this.texCoordExpression=t,this}setFragmentDiscardExpression(t){return this.discardExpression=t,this}setSymbolRotateWithView(t){return this.rotateWithView=t,this}getSizeExpression(){return this.sizeExpression}getOffsetExpression(){return this.offsetExpression}getColorExpression(){return this.colorExpression}getTextureCoordinateExpression(){return this.texCoordExpression}getFragmentDiscardExpression(){return this.discardExpression}getSymbolVertexShader(t){const e=this.rotateWithView?"u_offsetScaleMatrix * u_offsetRotateMatrix":"u_offsetScaleMatrix";let i=this.attributes,n=this.varyings;return t&&(i=i.concat("vec4 a_hitColor"),n=n.concat({name:"v_hitColor",type:"vec4",expression:"a_hitColor"})),`precision mediump float;\nuniform mat4 u_projectionMatrix;\nuniform mat4 u_offsetScaleMatrix;\nuniform mat4 u_offsetRotateMatrix;\nuniform float u_time;\nuniform float u_zoom;\nuniform float u_resolution;\n${this.uniforms.map((function(t){return"uniform "+t+";"})).join("\n")}\nattribute vec2 a_position;\nattribute float a_index;\n${i.map((function(t){return"attribute "+t+";"})).join("\n")}\nvarying vec2 v_texCoord;\nvarying vec2 v_quadCoord;\n${n.map((function(t){return"varying "+t.type+" "+t.name+";"})).join("\n")}\nvoid main(void) {\n mat4 offsetMatrix = ${e};\n vec2 halfSize = ${this.sizeExpression} * 0.5;\n vec2 offset = ${this.offsetExpression};\n float angle = ${this.rotationExpression};\n float offsetX;\n float offsetY;\n if (a_index == 0.0) {\n offsetX = (offset.x - halfSize.x) * cos(angle) + (offset.y - halfSize.y) * sin(angle);\n offsetY = (offset.y - halfSize.y) * cos(angle) - (offset.x - halfSize.x) * sin(angle);\n } else if (a_index == 1.0) {\n offsetX = (offset.x + halfSize.x) * cos(angle) + (offset.y - halfSize.y) * sin(angle);\n offsetY = (offset.y - halfSize.y) * cos(angle) - (offset.x + halfSize.x) * sin(angle);\n } else if (a_index == 2.0) {\n offsetX = (offset.x + halfSize.x) * cos(angle) + (offset.y + halfSize.y) * sin(angle);\n offsetY = (offset.y + halfSize.y) * cos(angle) - (offset.x + halfSize.x) * sin(angle);\n } else {\n offsetX = (offset.x - halfSize.x) * cos(angle) + (offset.y + halfSize.y) * sin(angle);\n offsetY = (offset.y + halfSize.y) * cos(angle) - (offset.x - halfSize.x) * sin(angle);\n }\n vec4 offsets = offsetMatrix * vec4(offsetX, offsetY, 0.0, 0.0);\n gl_Position = u_projectionMatrix * vec4(a_position, 0.0, 1.0) + offsets;\n vec4 texCoord = ${this.texCoordExpression};\n float u = a_index == 0.0 || a_index == 3.0 ? texCoord.s : texCoord.p;\n float v = a_index == 2.0 || a_index == 3.0 ? texCoord.t : texCoord.q;\n v_texCoord = vec2(u, v);\n u = a_index == 0.0 || a_index == 3.0 ? 0.0 : 1.0;\n v = a_index == 2.0 || a_index == 3.0 ? 0.0 : 1.0;\n v_quadCoord = vec2(u, v);\n${n.map((function(t){return" "+t.name+" = "+t.expression+";"})).join("\n")}\n}`}getSymbolFragmentShader(t){const e=t?" if (gl_FragColor.a < 0.1) { discard; } gl_FragColor = v_hitColor;":"";let i=this.varyings;return t&&(i=i.concat({name:"v_hitColor",type:"vec4",expression:"a_hitColor"})),`precision mediump float;\nuniform float u_time;\nuniform float u_zoom;\nuniform float u_resolution;\n${this.uniforms.map((function(t){return"uniform "+t+";"})).join("\n")}\nvarying vec2 v_texCoord;\nvarying vec2 v_quadCoord;\n${i.map((function(t){return"varying "+t.type+" "+t.name+";"})).join("\n")}\nvoid main(void) {\n if (${this.discardExpression}) { discard; }\n gl_FragColor = ${this.colorExpression};\n gl_FragColor.rgb *= gl_FragColor.a;\n${e}\n}`}}function Wg(t){const e=t.symbol,i=void 0!==e.size?e.size:1,n=e.color||"white",r=e.textureCoord||[0,0,1,1],s=e.offset||[0,0],o=void 0!==e.opacity?e.opacity:1,a=void 0!==e.rotation?e.rotation:0,l={inFragmentShader:!1,variables:[],attributes:[],stringLiteralsMap:{},functions:{}},h=Ig(l,i,yg|fg),c=Ig(l,s,yg),u=Ig(l,r,yg),d=Ig(l,a,fg),g={inFragmentShader:!0,variables:l.variables,attributes:[],stringLiteralsMap:l.stringLiteralsMap,functions:{}},f=Ig(g,n,mg),p=Ig(g,o,fg);let m="1.0";const _=`vec2(${Ig(g,i,yg|fg)}).x`;switch(e.symbolType){case"square":case"image":break;case"circle":m=`(1.0-smoothstep(1.-4./${_},1.,dot(v_quadCoord-.5,v_quadCoord-.5)*4.))`;break;case"triangle":const t="(v_quadCoord*2.-1.)",i=`(atan(${t}.x,${t}.y))`;m=`(1.0-smoothstep(.5-3./${_},.5,cos(floor(.5+${i}/2.094395102)*2.094395102-${i})*length(${t})))`;break;default:throw new Error("Unexpected symbol type: "+e.symbolType)}const y=(new Vg).setSizeExpression(`vec2(${h})`).setRotationExpression(d).setSymbolOffsetExpression(c).setTextureCoordinateExpression(u).setSymbolRotateWithView(!!e.rotateWithView).setColorExpression(`vec4(${f}.rgb, ${f}.a * ${p} * ${m})`);if(t.filter){const e=Ig(g,t.filter,_g);y.setFragmentDiscardExpression(`!${e}`)}const x={};if(g.variables.forEach((function(e){const i=jg(e);y.addUniform(`float ${i}`),x[i]=function(){if(!t.variables||void 0===t.variables[e])throw new Error(`The following variable is missing from the style: ${e}`);let i=t.variables[e];return"string"==typeof i&&(i=bg(l,i)),void 0!==i?i:-9999999}})),"image"===e.symbolType&&e.src){const t=new Image;t.crossOrigin=void 0===e.crossOrigin?"anonymous":e.crossOrigin,t.src=e.src,y.addUniform("sampler2D u_texture").setColorExpression(y.getColorExpression()+" * texture2D(u_texture, v_texCoord)"),x.u_texture=t}return g.attributes.forEach((function(t){l.attributes.includes(t)||l.attributes.push(t),y.addVarying(`v_${t}`,"float",`a_${t}`)})),l.attributes.forEach((function(t){y.addAttribute(`float a_${t}`)})),{builder:y,attributes:l.attributes.map((function(t){return{name:t,callback:function(e,i){let n=i[t];return"string"==typeof n&&(n=bg(l,n)),void 0!==n?n:-9999999}}})),uniforms:x}}class Zg{constructor(t){this.opacity_=t.opacity,this.rotateWithView_=t.rotateWithView,this.rotation_=t.rotation,this.scale_=t.scale,this.scaleArray_=ll(t.scale),this.displacement_=t.displacement,this.declutterMode_=t.declutterMode}clone(){const t=this.getScale();return new Zg({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 z()}getImage(t){return z()}getHitDetectionImage(){return z()}getPixelRatio(t){return 1}getImageState(){return z()}getImageSize(){return z()}getOrigin(){return z()}getSize(){return z()}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_=ll(t)}listenImageChange(t){z()}load(){z()}unlistenImageChange(t){z()}}var Yg=Zg;class Kg extends Yg{constructor(t){super({opacity:1,rotateWithView:void 0!==t.rotateWithView&&t.rotateWithView,rotation:void 0!==t.rotation?t.rotation:0,scale:void 0!==t.scale?t.scale:1,displacement:void 0!==t.displacement?t.displacement:[0,0],declutterMode:t.declutterMode}),this.canvas_=void 0,this.hitDetectionCanvas_=null,this.fill_=void 0!==t.fill?t.fill:null,this.origin_=[0,0],this.points_=t.points,this.radius_=void 0!==t.radius?t.radius:t.radius1,this.radius2_=t.radius2,this.angle_=void 0!==t.angle?t.angle:0,this.stroke_=void 0!==t.stroke?t.stroke:null,this.size_=null,this.renderOptions_=null,this.render()}clone(){const t=this.getScale(),e=new Kg({fill:this.getFill()?this.getFill().clone():void 0,points:this.getPoints(),radius:this.getRadius(),radius2:this.getRadius2(),angle:this.getAngle(),stroke:this.getStroke()?this.getStroke().clone():void 0,rotation:this.getRotation(),rotateWithView:this.getRotateWithView(),scale:Array.isArray(t)?t.slice():t,displacement:this.getDisplacement().slice(),declutterMode:this.getDeclutterMode()});return e.setOpacity(this.getOpacity()),e}getAnchor(){const t=this.size_;if(!t)return null;const e=this.getDisplacement(),i=this.getScaleArray();return[t[0]/2-e[0]/i[0],t[1]/2+e[1]/i[1]]}getAngle(){return this.angle_}getFill(){return this.fill_}setFill(t){this.fill_=t,this.render()}getHitDetectionImage(){return this.hitDetectionCanvas_||this.createHitDetectionCanvas_(this.renderOptions_),this.hitDetectionCanvas_}getImage(t){let e=this.canvas_[t];if(!e){const i=this.renderOptions_,n=_t(i.size*t,i.size*t);this.draw_(i,n,t),e=n.canvas,this.canvas_[t]=e}return e}getPixelRatio(t){return t}getImageSize(){return this.size_}getImageState(){return ts}getOrigin(){return this.origin_}getPoints(){return this.points_}getRadius(){return this.radius_}getRadius2(){return this.radius2_}getSize(){return this.size_}getStroke(){return this.stroke_}setStroke(t){this.stroke_=t,this.render()}listenImageChange(t){}load(){}unlistenImageChange(t){}calculateLineJoinSize_(t,e,i){if(0===e||this.points_===1/0||"bevel"!==t&&"miter"!==t)return e;let n=this.radius_,r=void 0===this.radius2_?n:this.radius2_;if(n0,6),Ft(!((void 0!==t.width||void 0!==t.height)&&void 0!==t.scale),69);const a=void 0!==t.src?Jr:ts;if(this.color_=void 0!==t.color?gs(t.color):null,this.iconImage_=nf(s,o,void 0!==this.imgSize_?this.imgSize_:null,this.crossOrigin_,a,this.color_),this.offset_=void 0!==t.offset?t.offset:[0,0],this.offsetOrigin_=void 0!==t.offsetOrigin?t.offsetOrigin:"top-left",this.origin_=null,this.size_=void 0!==t.size?t.size:null,this.width_=t.width,this.height_=t.height,void 0!==this.width_||void 0!==this.height_){const t=this.getImage(1),e=()=>{this.updateScaleFromWidthAndHeight(this.width_,this.height_)};t.width>0?this.updateScaleFromWidthAndHeight(this.width_,this.height_):t.addEventListener("load",e)}}clone(){const t=this.getScale();return new sf({anchor:this.anchor_.slice(),anchorOrigin:this.anchorOrigin_,anchorXUnits:this.anchorXUnits_,anchorYUnits:this.anchorYUnits_,color:this.color_&&this.color_.slice?this.color_.slice():this.color_||void 0,crossOrigin:this.crossOrigin_,imgSize:this.imgSize_,offset:this.offset_.slice(),offsetOrigin:this.offsetOrigin_,opacity:this.getOpacity(),rotateWithView:this.getRotateWithView(),rotation:this.getRotation(),scale:Array.isArray(t)?t.slice():t,size:null!==this.size_?this.size_.slice():void 0,src:this.getSrc(),displacement:this.getDisplacement().slice(),declutterMode:this.getDeclutterMode(),width:this.width_,height:this.height_})}updateScaleFromWidthAndHeight(t,e){const i=this.getImage(1);void 0!==t&&void 0!==e?super.setScale([t/i.width,e/i.height]):void 0!==t?super.setScale([t/i.width,t/i.width]):void 0!==e?super.setScale([e/i.height,e/i.height]):super.setScale([1,1])}getAnchor(){let t=this.normalizedAnchor_;if(!t){t=this.anchor_;const e=this.getSize();if("fraction"==this.anchorXUnits_||"fraction"==this.anchorYUnits_){if(!e)return null;t=this.anchor_.slice(),"fraction"==this.anchorXUnits_&&(t[0]*=e[0]),"fraction"==this.anchorYUnits_&&(t[1]*=e[1])}if("top-left"!=this.anchorOrigin_){if(!e)return null;t===this.anchor_&&(t=this.anchor_.slice()),"top-right"!=this.anchorOrigin_&&"bottom-right"!=this.anchorOrigin_||(t[0]=-t[0]+e[0]),"bottom-left"!=this.anchorOrigin_&&"bottom-right"!=this.anchorOrigin_||(t[1]=-t[1]+e[1])}this.normalizedAnchor_=t}const e=this.getDisplacement(),i=this.getScaleArray();return[t[0]-e[0]/i[0],t[1]+e[1]/i[1]]}setAnchor(t){this.anchor_=t,this.normalizedAnchor_=null}getColor(){return this.color_}getImage(t){return this.iconImage_.getImage(t)}getPixelRatio(t){return this.iconImage_.getPixelRatio(t)}getImageSize(){return this.iconImage_.getSize()}getImageState(){return this.iconImage_.getImageState()}getHitDetectionImage(){return this.iconImage_.getHitDetectionImage()}getOrigin(){if(this.origin_)return this.origin_;let t=this.offset_;if("top-left"!=this.offsetOrigin_){const e=this.getSize(),i=this.iconImage_.getSize();if(!e||!i)return null;t=t.slice(),"top-right"!=this.offsetOrigin_&&"bottom-right"!=this.offsetOrigin_||(t[0]=i[0]-e[0]-t[0]),"bottom-left"!=this.offsetOrigin_&&"bottom-right"!=this.offsetOrigin_||(t[1]=i[1]-e[1]-t[1])}return this.origin_=t,this.origin_}getSrc(){return this.iconImage_.getSrc()}getSize(){return this.size_?this.size_:this.iconImage_.getSize()}getWidth(){return this.width_}getHeight(){return this.height_}setWidth(t){this.width_=t,this.updateScaleFromWidthAndHeight(t,this.height_)}setHeight(t){this.height_=t,this.updateScaleFromWidthAndHeight(this.width_,t)}setScale(t){super.setScale(t);const e=this.getImage(1);if(e){const i=Array.isArray(t)?t[0]:t;void 0!==i&&(this.width_=i*e.width);const n=Array.isArray(t)?t[1]:t;void 0!==n&&(this.height_=n*e.height)}}listenImageChange(t){this.iconImage_.addEventListener(w,t)}load(){this.iconImage_.load()}unlistenImageChange(t){this.iconImage_.removeEventListener(w,t)}}var of=sf;class af{constructor(t){t=t||{},this.color_=void 0!==t.color?t.color:null,this.lineCap_=t.lineCap,this.lineDash_=void 0!==t.lineDash?t.lineDash:null,this.lineDashOffset_=t.lineDashOffset,this.lineJoin_=t.lineJoin,this.miterLimit_=t.miterLimit,this.width_=t.width}clone(){const t=this.getColor();return new af({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}}var lf=af;class hf{constructor(t){t=t||{},this.geometry_=null,this.geometryFunction_=ff,void 0!==t.geometry&&this.setGeometry(t.geometry),this.fill_=void 0!==t.fill?t.fill:null,this.image_=void 0!==t.image?t.image:null,this.renderer_=void 0!==t.renderer?t.renderer:null,this.hitDetectionRenderer_=void 0!==t.hitDetectionRenderer?t.hitDetectionRenderer:null,this.stroke_=void 0!==t.stroke?t.stroke:null,this.text_=void 0!==t.text?t.text:null,this.zIndex_=t.zIndex}clone(){let t=this.getGeometry();return t&&"object"==typeof t&&(t=t.clone()),new hf({geometry:t,fill:this.getFill()?this.getFill().clone():void 0,image:this.getImage()?this.getImage().clone():void 0,renderer:this.getRenderer(),stroke:this.getStroke()?this.getStroke().clone():void 0,text:this.getText()?this.getText().clone():void 0,zIndex:this.getZIndex()})}getRenderer(){return this.renderer_}setRenderer(t){this.renderer_=t}setHitDetectionRenderer(t){this.hitDetectionRenderer_=t}getHitDetectionRenderer(){return this.hitDetectionRenderer_}getGeometry(){return this.geometry_}getGeometryFunction(){return this.geometryFunction_}getFill(){return this.fill_}setFill(t){this.fill_=t}getImage(){return this.image_}setImage(t){this.image_=t}getStroke(){return this.stroke_}setStroke(t){this.stroke_=t}getText(){return this.text_}setText(t){this.text_=t}getZIndex(){return this.zIndex_}setGeometry(t){"function"==typeof t?this.geometryFunction_=t:"string"==typeof t?this.geometryFunction_=function(e){return e.get(t)}:t?void 0!==t&&(this.geometryFunction_=function(){return t}):this.geometryFunction_=ff,this.geometry_=t}setZIndex(t){this.zIndex_=t}}function cf(t){let e;if("function"==typeof t)e=t;else{let i;if(Array.isArray(t))i=t;else{Ft("function"==typeof t.getZIndex,41);i=[t]}e=function(){return i}}return e}let uf=null;function df(t,e){if(!uf){const t=new Qg({color:"rgba(255,255,255,0.4)"}),e=new lf({color:"#3399CC",width:1.25});uf=[new hf({image:new $g({fill:t,stroke:e,radius:5}),fill:t,stroke:e})]}return uf}function gf(){const t={},e=[255,255,255,1],i=[0,153,255,1];return t.Polygon=[new hf({fill:new Qg({color:[255,255,255,.5]})})],t.MultiPolygon=t.Polygon,t.LineString=[new hf({stroke:new lf({color:e,width:5})}),new hf({stroke:new lf({color:i,width:3})})],t.MultiLineString=t.LineString,t.Circle=t.Polygon.concat(t.LineString),t.Point=[new hf({image:new $g({radius:6,fill:new Qg({color:i}),stroke:new lf({color:e,width:1.5})}),zIndex:1/0})],t.MultiPoint=t.Point,t.GeometryCollection=t.Polygon.concat(t.LineString,t.Point),t}function ff(t){return t.getGeometry()}var pf=hf;class mf{constructor(t){t=t||{},this.font_=t.font,this.rotation_=t.rotation,this.rotateWithView_=t.rotateWithView,this.scale_=t.scale,this.scaleArray_=ll(void 0!==t.scale?t.scale:1),this.text_=t.text,this.textAlign_=t.textAlign,this.justify_=t.justify,this.textBaseline_=t.textBaseline,this.fill_=void 0!==t.fill?t.fill:new Qg({color:"#333"}),this.maxAngle_=void 0!==t.maxAngle?t.maxAngle:Math.PI/4,this.placement_=void 0!==t.placement?t.placement:"point",this.overflow_=!!t.overflow,this.stroke_=void 0!==t.stroke?t.stroke:null,this.offsetX_=void 0!==t.offsetX?t.offsetX:0,this.offsetY_=void 0!==t.offsetY?t.offsetY:0,this.backgroundFill_=t.backgroundFill?t.backgroundFill:null,this.backgroundStroke_=t.backgroundStroke?t.backgroundStroke:null,this.padding_=void 0===t.padding?null:t.padding}clone(){const t=this.getScale();return new mf({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_=ll(void 0!==t?t:1)}setStroke(t){this.stroke_=t}setText(t){this.text_=t}setTextAlign(t){this.textAlign_=t}setJustify(t){this.justify_=t}setTextBaseline(t){this.textBaseline_=t}setBackgroundFill(t){this.backgroundFill_=t}setBackgroundStroke(t){this.backgroundStroke_=t}setPadding(t){this.padding_=t}}var _f=mf;function yf(t){return new pf({fill:xf(t,""),stroke:vf(t,""),text:Sf(t),image:wf(t)})}function xf(t,e){const i=t[e+"fill-color"];if(i)return new Qg({color:i})}function vf(t,e){const i=t[e+"stroke-width"],n=t[e+"stroke-color"];if(i||n)return new lf({width:i,color:n,lineCap:t[e+"stroke-line-cap"],lineJoin:t[e+"stroke-line-join"],lineDash:t[e+"stroke-line-dash"],lineDashOffset:t[e+"stroke-line-dash-offset"],miterLimit:t[e+"stroke-miter-limit"]})}function Sf(t){const e=t["text-value"];if(!e)return;return new _f({text:e,font:t["text-font"],maxAngle:t["text-max-angle"],offsetX:t["text-offset-x"],offsetY:t["text-offset-y"],overflow:t["text-overflow"],placement:t["text-placement"],scale:t["text-scale"],rotateWithView:t["text-rotate-with-view"],rotation:t["text-rotation"],textAlign:t["text-align"],justify:t["text-justify"],textBaseline:t["text-baseline"],padding:t["text-padding"],fill:xf(t,"text-"),backgroundFill:xf(t,"text-background-"),stroke:vf(t,"text-"),backgroundStroke:vf(t,"text-background-")})}function wf(t){const e=t["icon-src"],i=t["icon-img"];if(e||i){return new of({src:e,img:i,imgSize:t["icon-img-size"],anchor:t["icon-anchor"],anchorOrigin:t["icon-anchor-origin"],anchorXUnits:t["icon-anchor-x-units"],anchorYUnits:t["icon-anchor-y-units"],color:t["icon-color"],crossOrigin:t["icon-cross-origin"],offset:t["icon-offset"],displacement:t["icon-displacement"],opacity:t["icon-opacity"],scale:t["icon-scale"],rotation:t["icon-rotation"],rotateWithView:t["icon-rotate-with-view"],size:t["icon-size"],declutterMode:t["icon-declutter-mode"]})}const n=t["shape-points"];if(n){const e="shape-";return new qg({points:n,fill:xf(t,e),stroke:vf(t,e),radius:t["shape-radius"],radius1:t["shape-radius1"],radius2:t["shape-radius2"],angle:t["shape-angle"],displacement:t["shape-displacement"],rotation:t["shape-rotation"],rotateWithView:t["shape-rotate-with-view"],scale:t["shape-scale"],declutterMode:t["shape-declutter-mode"]})}const r=t["circle-radius"];if(r){const e="circle-";return new $g({radius:r,fill:xf(t,e),stroke:vf(t,e),displacement:t["circle-displacement"],scale:t["circle-scale"],rotation:t["circle-rotation"],rotateWithView:t["circle-rotate-with-view"],declutterMode:t["circle-declutter-mode"]})}}var Tf=class{constructor(t){this.first_,this.last_,this.head_,this.circular_=void 0===t||t,this.length_=0}insertItem(t){const e={prev:void 0,next:void 0,data:t},i=this.head_;if(i){const t=i.next;e.prev=i,e.next=t,i.next=e,t&&(t.prev=e),i===this.last_&&(this.last_=e)}else this.first_=e,this.last_=e,this.circular_&&(e.next=e,e.prev=e);this.head_=e,this.length_++}removeItem(){const t=this.head_;if(t){const e=t.next,i=t.prev;e&&(e.prev=i),i&&(i.next=e),this.head_=e||i,this.first_===this.last_?(this.head_=void 0,this.first_=void 0,this.last_=void 0):this.first_===t?this.first_=this.head_:this.last_===t&&(this.last_=i?this.head_.prev:this.head_),this.length_--}}firstItem(){if(this.head_=this.first_,this.head_)return this.head_.data}lastItem(){if(this.head_=this.last_,this.head_)return this.head_.data}nextItem(){if(this.head_&&this.head_.next)return this.head_=this.head_.next,this.head_.data}getNextItem(){if(this.head_&&this.head_.next)return this.head_.next.data}prevItem(){if(this.head_&&this.head_.prev)return this.head_=this.head_.prev,this.head_.data}getPrevItem(){if(this.head_&&this.head_.prev)return this.head_.prev.data}getCurrItem(){if(this.head_)return this.head_.data}setFirstItem(){this.circular_&&this.head_&&(this.first_=this.head_,this.last_=this.head_.prev)}concat(t){if(t.head_){if(this.head_){const e=this.head_.next;this.head_.next=t.first_,t.first_.prev=this.head_,e.prev=t.last_,t.last_.next=e,this.length_+=t.length_}else this.head_=t.head_,this.first_=t.first_,this.last_=t.last_,this.length_=t.length_;t.head_=void 0,t.first_=void 0,t.last_=void 0,t.length_=0}}getLength(){return this.length_}};const Ef={"image/png":!0,"image/jpeg":!0,"image/gif":!0,"image/webp":!0},Cf={"application/vnd.mapbox-vector-tile":!0,"application/geo+json":!0};function Rf(t,e){let i,n;for(let r=0;rt.maxTileCol||u.tileRowt.maxTileRow)return}Object.assign(u,_);const d=i.replace(/\{(\w+?)\}/g,(function(t,e){return u[e]}));return Xl(y,d)}}}function If(t){return Ul(t.url).then((function(e){return function(t,e){const i=e.tileMatrixSetLimits;let n;if("map"===e.dataType)n=Rf(e.links,t.mediaType);else{if("vector"!==e.dataType)throw new Error('Expected tileset data type to be "map" or "vector"');n=bf(e.links,t.mediaType,t.supportedMediaTypes)}if(e.tileMatrixSet)return Pf(t,e.tileMatrixSet,n,i);const r=e.links.find((t=>"http://www.opengis.net/def/rel/ogc/1.0/tiling-scheme"===t.rel));if(!r)throw new Error("Expected http://www.opengis.net/def/rel/ogc/1.0/tiling-scheme link or tileMatrixSet");const s=r.href;return Ul(Xl(t.url,s)).then((function(e){return Pf(t,e,n,i)}))}(t,e)}))}var Lf=class extends Ah{constructor(t){super({attributions:t.attributions,cacheSize:t.cacheSize,crossOrigin:t.crossOrigin,interpolate:t.interpolate,projection:t.projection,reprojectionErrorThreshold:t.reprojectionErrorThreshold,state:"loading",tileLoadFunction:t.tileLoadFunction,wrapX:void 0===t.wrapX||t.wrapX,transition:t.transition});If({url:t.url,projection:this.getProjection(),mediaType:t.mediaType,context:t.context||null}).then(this.handleTileSetInfo_.bind(this)).catch(this.handleError_.bind(this))}handleTileSetInfo_(t){this.tileGrid=t.grid,this.setTileUrlFunction(t.urlFunction,t.urlTemplate),this.setState("ready")}handleError_(t){Qi(t),this.setState("error")}};var Ff=class extends zu{constructor(t){super({attributions:t.attributions,attributionsCollapsible:t.attributionsCollapsible,cacheSize:t.cacheSize,format:t.format,overlaps:t.overlaps,projection:t.projection,tileClass:t.tileClass,transition:t.transition,wrapX:t.wrapX,zDirection:t.zDirection,state:"loading"});If({url:t.url,projection:this.getProjection(),mediaType:t.mediaType,supportedMediaTypes:t.format.supportedMediaTypes,context:t.context||null}).then(this.handleTileSetInfo_.bind(this)).catch(this.handleError_.bind(this))}handleTileSetInfo_(t){this.tileGrid=t.grid,this.setTileUrlFunction(t.urlFunction,t.urlTemplate),this.setState("ready")}handleError_(t){Qi(t),this.setState("error")}};const Mf="renderOrder";var Af=class extends ks{constructor(t){t=t||{};const e=Object.assign({},t);delete e.style,delete e.renderBuffer,delete e.updateWhileAnimating,delete e.updateWhileInteracting,super(e),this.declutter_=void 0!==t.declutter&&t.declutter,this.renderBuffer_=void 0!==t.renderBuffer?t.renderBuffer:100,this.style_=null,this.styleFunction_=void 0,this.setStyle(t.style),this.updateWhileAnimating_=void 0!==t.updateWhileAnimating&&t.updateWhileAnimating,this.updateWhileInteracting_=void 0!==t.updateWhileInteracting&&t.updateWhileInteracting}getDeclutter(){return this.declutter_}getFeatures(t){return super.getFeatures(t)}getRenderBuffer(){return this.renderBuffer_}getRenderOrder(){return this.get(Mf)}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(Mf,t)}setStyle(t){let e;if(void 0===t)e=df;else if(null===t)e=null;else if("function"==typeof t)e=t;else if(t instanceof pf)e=t;else if(Array.isArray(t)){const i=t.length,n=new Array(i);for(let e=0;e80*i){n=s=t[0],r=o=t[1];for(var f=i;fs&&(s=a),l>o&&(o=l);h=0!==(h=Math.max(s-n,o-r))?32767/h:0}return zf(d,g,i,n,r,h,0),g}function jf(t,e,i,n,r){var s,o;if(r===hp(t,e,i,n)>0)for(s=e;s=e;s-=n)o=op(s,t[s],t[s+1],o);return o&&tp(o,o.next)&&(ap(o),o=o.next),o}function Bf(t,e){if(!t)return t;e||(e=t);var i,n=t;do{if(i=!1,n.steiner||!tp(n,n.next)&&0!==Qf(n.prev,n,n.next))n=n.next;else{if(ap(n),(n=e=n.prev)===n.next)break;i=!0}}while(i||n!==e);return e}function zf(t,e,i,n,r,s,o){if(t){!o&&s&&function(t,e,i,n){var r=t;do{0===r.z&&(r.z=qf(r.x,r.y,e,i,n)),r.prevZ=r.prev,r.nextZ=r.next,r=r.next}while(r!==t);r.prevZ.nextZ=null,r.prevZ=null,function(t){var e,i,n,r,s,o,a,l,h=1;do{for(i=t,t=null,s=null,o=0;i;){for(o++,n=i,a=0,e=0;e0||l>0&&n;)0!==a&&(0===l||!n||i.z<=n.z)?(r=i,i=i.nextZ,a--):(r=n,n=n.nextZ,l--),s?s.nextZ=r:t=r,r.prevZ=s,s=r;i=n}s.nextZ=null,h*=2}while(o>1)}(r)}(t,n,r,s);for(var a,l,h=t;t.prev!==t.next;)if(a=t.prev,l=t.next,s?Xf(t,n,r,s):Uf(t))e.push(a.i/i|0),e.push(t.i/i|0),e.push(l.i/i|0),ap(t),t=l.next,h=l.next;else if((t=l)===h){o?1===o?zf(t=Vf(Bf(t),e,i),e,i,n,r,s,2):2===o&&Wf(t,e,i,n,r,s):zf(Bf(t),e,i,n,r,s,1);break}}}function Uf(t){var e=t.prev,i=t,n=t.next;if(Qf(e,i,n)>=0)return!1;for(var r=e.x,s=i.x,o=n.x,a=e.y,l=i.y,h=n.y,c=rs?r>o?r:o:s>o?s:o,g=a>l?a>h?a:h:l>h?l:h,f=n.next;f!==e;){if(f.x>=c&&f.x<=d&&f.y>=u&&f.y<=g&&$f(r,a,s,l,o,h,f.x,f.y)&&Qf(f.prev,f,f.next)>=0)return!1;f=f.next}return!0}function Xf(t,e,i,n){var r=t.prev,s=t,o=t.next;if(Qf(r,s,o)>=0)return!1;for(var a=r.x,l=s.x,h=o.x,c=r.y,u=s.y,d=o.y,g=al?a>h?a:h:l>h?l:h,m=c>u?c>d?c:d:u>d?u:d,_=qf(g,f,e,i,n),y=qf(p,m,e,i,n),x=t.prevZ,v=t.nextZ;x&&x.z>=_&&v&&v.z<=y;){if(x.x>=g&&x.x<=p&&x.y>=f&&x.y<=m&&x!==r&&x!==o&&$f(a,c,l,u,h,d,x.x,x.y)&&Qf(x.prev,x,x.next)>=0)return!1;if(x=x.prevZ,v.x>=g&&v.x<=p&&v.y>=f&&v.y<=m&&v!==r&&v!==o&&$f(a,c,l,u,h,d,v.x,v.y)&&Qf(v.prev,v,v.next)>=0)return!1;v=v.nextZ}for(;x&&x.z>=_;){if(x.x>=g&&x.x<=p&&x.y>=f&&x.y<=m&&x!==r&&x!==o&&$f(a,c,l,u,h,d,x.x,x.y)&&Qf(x.prev,x,x.next)>=0)return!1;x=x.prevZ}for(;v&&v.z<=y;){if(v.x>=g&&v.x<=p&&v.y>=f&&v.y<=m&&v!==r&&v!==o&&$f(a,c,l,u,h,d,v.x,v.y)&&Qf(v.prev,v,v.next)>=0)return!1;v=v.nextZ}return!0}function Vf(t,e,i){var n=t;do{var r=n.prev,s=n.next.next;!tp(r,s)&&ep(r,n,n.next,s)&&rp(r,s)&&rp(s,r)&&(e.push(r.i/i|0),e.push(n.i/i|0),e.push(s.i/i|0),ap(n),ap(n.next),n=t=s),n=n.next}while(n!==t);return Bf(n)}function Wf(t,e,i,n,r,s){var o=t;do{for(var a=o.next.next;a!==o.prev;){if(o.i!==a.i&&Jf(o,a)){var l=sp(o,a);return o=Bf(o,o.next),l=Bf(l,l.next),zf(o,e,i,n,r,s,0),void zf(l,e,i,n,r,s,0)}a=a.next}o=o.next}while(o!==t)}function Zf(t,e){return t.x-e.x}function Yf(t,e){var i=function(t,e){var i,n=e,r=t.x,s=t.y,o=-1/0;do{if(s<=n.y&&s>=n.next.y&&n.next.y!==n.y){var a=n.x+(s-n.y)*(n.next.x-n.x)/(n.next.y-n.y);if(a<=r&&a>o&&(o=a,i=n.x=n.x&&n.x>=c&&r!==n.x&&$f(si.x||n.x===i.x&&Kf(i,n)))&&(i=n,d=l)),n=n.next}while(n!==h);return i}(t,e);if(!i)return e;var n=sp(i,t);return Bf(n,n.next),Bf(i,i.next)}function Kf(t,e){return Qf(t.prev,t,e.prev)<0&&Qf(e.next,t,t.next)<0}function qf(t,e,i,n,r){return(t=1431655765&((t=858993459&((t=252645135&((t=16711935&((t=(t-i)*r|0)|t<<8))|t<<4))|t<<2))|t<<1))|(e=1431655765&((e=858993459&((e=252645135&((e=16711935&((e=(e-n)*r|0)|e<<8))|e<<4))|e<<2))|e<<1))<<1}function Hf(t){var e=t,i=t;do{(e.x=(t-o)*(s-a)&&(t-o)*(n-a)>=(i-o)*(e-a)&&(i-o)*(s-a)>=(r-o)*(n-a)}function Jf(t,e){return t.next.i!==e.i&&t.prev.i!==e.i&&!function(t,e){var i=t;do{if(i.i!==t.i&&i.next.i!==t.i&&i.i!==e.i&&i.next.i!==e.i&&ep(i,i.next,t,e))return!0;i=i.next}while(i!==t);return!1}(t,e)&&(rp(t,e)&&rp(e,t)&&function(t,e){var i=t,n=!1,r=(t.x+e.x)/2,s=(t.y+e.y)/2;do{i.y>s!=i.next.y>s&&i.next.y!==i.y&&r<(i.next.x-i.x)*(s-i.y)/(i.next.y-i.y)+i.x&&(n=!n),i=i.next}while(i!==t);return n}(t,e)&&(Qf(t.prev,t,e.prev)||Qf(t,e.prev,e))||tp(t,e)&&Qf(t.prev,t,t.next)>0&&Qf(e.prev,e,e.next)>0)}function Qf(t,e,i){return(e.y-t.y)*(i.x-e.x)-(e.x-t.x)*(i.y-e.y)}function tp(t,e){return t.x===e.x&&t.y===e.y}function ep(t,e,i,n){var r=np(Qf(t,e,i)),s=np(Qf(t,e,n)),o=np(Qf(i,n,t)),a=np(Qf(i,n,e));return r!==s&&o!==a||(!(0!==r||!ip(t,i,e))||(!(0!==s||!ip(t,n,e))||(!(0!==o||!ip(i,t,n))||!(0!==a||!ip(i,e,n)))))}function ip(t,e,i){return e.x<=Math.max(t.x,i.x)&&e.x>=Math.min(t.x,i.x)&&e.y<=Math.max(t.y,i.y)&&e.y>=Math.min(t.y,i.y)}function np(t){return t>0?1:t<0?-1:0}function rp(t,e){return Qf(t.prev,t,t.next)<0?Qf(t,e,t.next)>=0&&Qf(t,t.prev,e)>=0:Qf(t,e,t.prev)<0||Qf(t,t.next,e)<0}function sp(t,e){var i=new lp(t.i,t.x,t.y),n=new lp(e.i,e.x,e.y),r=t.next,s=e.prev;return t.next=e,e.prev=t,i.next=r,r.prev=i,n.next=i,i.prev=n,s.next=n,n.prev=s,n}function op(t,e,i,n){var r=new lp(t,e,i);return n?(r.next=n.next,r.prev=n,n.next.prev=r,n.next=r):(r.prev=r,r.next=r),r}function ap(t){t.next.prev=t.prev,t.prev.next=t.next,t.prevZ&&(t.prevZ.nextZ=t.nextZ),t.nextZ&&(t.nextZ.prevZ=t.prevZ)}function lp(t,e,i){this.i=t,this.x=e,this.y=i,this.prev=null,this.next=null,this.z=0,this.prevZ=null,this.nextZ=null,this.steiner=!1}function hp(t,e,i,n){for(var r=0,s=e,o=i-n;s0&&(n+=t[r-1].length,i.holes.push(n))}return i};const cp=[],up={vertexPosition:0,indexPosition:0};function dp(t,e,i,n,r){t[e+0]=i,t[e+1]=n,t[e+2]=r}function gp(t,e){const i=256,n=255;return(e=e||[])[0]=Math.floor(t/i/i/i)/n,e[1]=Math.floor(t/i/i)%i/n,e[2]=Math.floor(t/i)%i/n,e[3]=t%i/n,e}function fp(t){let e=0;const i=256,n=255;return e+=Math.round(t[0]*i*i*i*n),e+=Math.round(t[1]*i*i*n),e+=Math.round(t[2]*i*n),e+=Math.round(t[3]*n),e}function pp(){const t='const e="GENERATE_POLYGON_BUFFERS",t="GENERATE_POINT_BUFFERS",n="GENERATE_LINE_STRING_BUFFERS",r={1:"The view center is not defined",2:"The view resolution is not defined",3:"The view rotation is not defined",4:"`image` and `src` cannot be provided at the same time",5:"`imgSize` must be set when `image` is provided",7:"`format` must be set when `url` is set",8:"Unknown `serverType` configured",9:"`url` must be configured or set using `#setUrl()`",10:"The default `geometryFunction` can only handle `Point` geometries",11:"`options.featureTypes` must be an Array",12:"`options.geometryName` must also be provided when `options.bbox` is set",13:"Invalid corner",14:"Invalid color",15:"Tried to get a value for a key that does not exist in the cache",16:"Tried to set a value for a key that is used already",17:"`resolutions` must be sorted in descending order",18:"Either `origin` or `origins` must be configured, never both",19:"Number of `tileSizes` and `resolutions` must be equal",20:"Number of `origins` and `resolutions` must be equal",22:"Either `tileSize` or `tileSizes` must be configured, never both",24:"Invalid extent or geometry provided as `geometry`",25:"Cannot fit empty extent provided as `geometry`",26:"Features must have an id set",27:"Features must have an id set",28:\'`renderMode` must be `"hybrid"` or `"vector"`\',30:"The passed `feature` was already added to the source",31:"Tried to enqueue an `element` that was already added to the queue",32:"Transformation matrix cannot be inverted",33:"Invalid units",34:"Invalid geometry layout",36:"Unknown SRS type",37:"Unknown geometry type found",38:"`styleMapValue` has an unknown type",39:"Unknown geometry type",40:"Expected `feature` to have a geometry",41:"Expected an `ol/style/Style` or an array of `ol/style/Style.js`",42:"Question unknown, the answer is 42",43:"Expected `layers` to be an array or a `Collection`",47:"Expected `controls` to be an array or an `ol/Collection`",48:"Expected `interactions` to be an array or an `ol/Collection`",49:"Expected `overlays` to be an array or an `ol/Collection`",50:"`options.featureTypes` should be an Array",51:"Either `url` or `tileJSON` options must be provided",52:"Unknown `serverType` configured",53:"Unknown `tierSizeCalculation` configured",55:"The {-y} placeholder requires a tile grid with extent",56:"mapBrowserEvent must originate from a pointer event",57:"At least 2 conditions are required",59:"Invalid command found in the PBF",60:"Missing or invalid `size`",61:"Cannot determine IIIF Image API version from provided image information JSON",62:"A `WebGLArrayBuffer` must either be of type `ELEMENT_ARRAY_BUFFER` or `ARRAY_BUFFER`",64:"Layer opacity must be a number",66:"`forEachFeatureAtCoordinate` cannot be used on a WebGL layer if the hit detection logic has not been enabled. This is done by providing adequate shaders using the `hitVertexShader` and `hitFragmentShader` properties of `WebGLPointsLayerRenderer`",67:"A layer can only be added to the map once. Use either `layer.setMap()` or `map.addLayer()`, not both",68:"A VectorTile source can only be rendered if it has a projection compatible with the view projection",69:"`width` or `height` cannot be provided together with `scale`"};class o extends Error{constructor(e){const t=r[e];super(t),this.code=e,this.name="AssertionError",this.message=t}}var i=o;function a(e,t){const n=t[0],r=t[1];return t[0]=e[0]*n+e[2]*r+e[4],t[1]=e[1]*n+e[3]*r+e[5],t}function s(e,t){const n=(r=t)[0]*r[3]-r[1]*r[2];var r;!function(e,t){if(!e)throw new i(t)}(0!==n,32);const o=t[0],a=t[1],s=t[2],u=t[3],f=t[4],x=t[5];return e[0]=u/n,e[1]=-a/n,e[2]=-s/n,e[3]=o/n,e[4]=(s*x-u*f)/n,e[5]=-(o*x-a*f)/n,e}new Array(6);var u={};function f(e,t,n){n=n||2;var r,o,i,a,s,u,f,l=t&&t.length,c=l?t[0]*n:e.length,v=x(e,0,c,n,!0),d=[];if(!v||v.next===v.prev)return d;if(l&&(v=function(e,t,n,r){var o,i,a,s=[];for(o=0,i=t.length;o80*n){r=i=e[0],o=a=e[1];for(var y=n;yi&&(i=s),u>a&&(a=u);f=0!==(f=Math.max(i-r,a-o))?32767/f:0}return h(v,d,n,r,o,f,0),d}function x(e,t,n,r,o){var i,a;if(o===B(e,t,n,r)>0)for(i=t;i=t;i-=r)a=k(i,e[i],e[i+1],a);return a&&M(a,a.next)&&(z(a),a=a.next),a}function l(e,t){if(!e)return e;t||(t=e);var n,r=e;do{if(n=!1,r.steiner||!M(r,r.next)&&0!==Z(r.prev,r,r.next))r=r.next;else{if(z(r),(r=t=r.prev)===r.next)break;n=!0}}while(n||r!==t);return t}function h(e,t,n,r,o,i,a){if(e){!a&&i&&function(e,t,n,r){var o=e;do{0===o.z&&(o.z=m(o.x,o.y,t,n,r)),o.prevZ=o.prev,o.nextZ=o.next,o=o.next}while(o!==e);o.prevZ.nextZ=null,o.prevZ=null,function(e){var t,n,r,o,i,a,s,u,f=1;do{for(n=e,e=null,i=null,a=0;n;){for(a++,r=n,s=0,t=0;t0||u>0&&r;)0!==s&&(0===u||!r||n.z<=r.z)?(o=n,n=n.nextZ,s--):(o=r,r=r.nextZ,u--),i?i.nextZ=o:e=o,o.prevZ=i,i=o;n=r}i.nextZ=null,f*=2}while(a>1)}(o)}(e,r,o,i);for(var s,u,f=e;e.prev!==e.next;)if(s=e.prev,u=e.next,i?v(e,r,o,i):c(e))t.push(s.i/n|0),t.push(e.i/n|0),t.push(u.i/n|0),z(e),e=u.next,f=u.next;else if((e=u)===f){a?1===a?h(e=d(l(e),t,n),t,n,r,o,i,2):2===a&&y(e,t,n,r,o,i):h(l(e),t,n,r,o,i,1);break}}}function c(e){var t=e.prev,n=e,r=e.next;if(Z(t,n,r)>=0)return!1;for(var o=t.x,i=n.x,a=r.x,s=t.y,u=n.y,f=r.y,x=oi?o>a?o:a:i>a?i:a,c=s>u?s>f?s:f:u>f?u:f,v=r.next;v!==t;){if(v.x>=x&&v.x<=h&&v.y>=l&&v.y<=c&&A(o,s,i,u,a,f,v.x,v.y)&&Z(v.prev,v,v.next)>=0)return!1;v=v.next}return!0}function v(e,t,n,r){var o=e.prev,i=e,a=e.next;if(Z(o,i,a)>=0)return!1;for(var s=o.x,u=i.x,f=a.x,x=o.y,l=i.y,h=a.y,c=su?s>f?s:f:u>f?u:f,y=x>l?x>h?x:h:l>h?l:h,p=m(c,v,t,n,r),b=m(d,y,t,n,r),g=e.prevZ,w=e.nextZ;g&&g.z>=p&&w&&w.z<=b;){if(g.x>=c&&g.x<=d&&g.y>=v&&g.y<=y&&g!==o&&g!==a&&A(s,x,u,l,f,h,g.x,g.y)&&Z(g.prev,g,g.next)>=0)return!1;if(g=g.prevZ,w.x>=c&&w.x<=d&&w.y>=v&&w.y<=y&&w!==o&&w!==a&&A(s,x,u,l,f,h,w.x,w.y)&&Z(w.prev,w,w.next)>=0)return!1;w=w.nextZ}for(;g&&g.z>=p;){if(g.x>=c&&g.x<=d&&g.y>=v&&g.y<=y&&g!==o&&g!==a&&A(s,x,u,l,f,h,g.x,g.y)&&Z(g.prev,g,g.next)>=0)return!1;g=g.prevZ}for(;w&&w.z<=b;){if(w.x>=c&&w.x<=d&&w.y>=v&&w.y<=y&&w!==o&&w!==a&&A(s,x,u,l,f,h,w.x,w.y)&&Z(w.prev,w,w.next)>=0)return!1;w=w.nextZ}return!0}function d(e,t,n){var r=e;do{var o=r.prev,i=r.next.next;!M(o,i)&&F(o,r,r.next,i)&&S(o,i)&&S(i,o)&&(t.push(o.i/n|0),t.push(r.i/n|0),t.push(i.i/n|0),z(r),z(r.next),r=e=i),r=r.next}while(r!==e);return l(r)}function y(e,t,n,r,o,i){var a=e;do{for(var s=a.next.next;s!==a.prev;){if(a.i!==s.i&&E(a,s)){var u=U(a,s);return a=l(a,a.next),u=l(u,u.next),h(a,t,n,r,o,i,0),void h(u,t,n,r,o,i,0)}s=s.next}a=a.next}while(a!==e)}function p(e,t){return e.x-t.x}function b(e,t){var n=function(e,t){var n,r=t,o=e.x,i=e.y,a=-1/0;do{if(i<=r.y&&i>=r.next.y&&r.next.y!==r.y){var s=r.x+(i-r.y)*(r.next.x-r.x)/(r.next.y-r.y);if(s<=o&&s>a&&(a=s,n=r.x=r.x&&r.x>=x&&o!==r.x&&A(in.x||r.x===n.x&&g(n,r)))&&(n=r,h=u)),r=r.next}while(r!==f);return n}(e,t);if(!n)return t;var r=U(n,e);return l(r,r.next),l(n,n.next)}function g(e,t){return Z(e.prev,e,t.prev)<0&&Z(t.next,e,e.next)<0}function m(e,t,n,r,o){return(e=1431655765&((e=858993459&((e=252645135&((e=16711935&((e=(e-n)*o|0)|e<<8))|e<<4))|e<<2))|e<<1))|(t=1431655765&((t=858993459&((t=252645135&((t=16711935&((t=(t-r)*o|0)|t<<8))|t<<4))|t<<2))|t<<1))<<1}function w(e){var t=e,n=e;do{(t.x=(e-a)*(i-s)&&(e-a)*(r-s)>=(n-a)*(t-s)&&(n-a)*(i-s)>=(o-a)*(r-s)}function E(e,t){return e.next.i!==t.i&&e.prev.i!==t.i&&!function(e,t){var n=e;do{if(n.i!==e.i&&n.next.i!==e.i&&n.i!==t.i&&n.next.i!==t.i&&F(n,n.next,e,t))return!0;n=n.next}while(n!==e);return!1}(e,t)&&(S(e,t)&&S(t,e)&&function(e,t){var n=e,r=!1,o=(e.x+t.x)/2,i=(e.y+t.y)/2;do{n.y>i!=n.next.y>i&&n.next.y!==n.y&&o<(n.next.x-n.x)*(i-n.y)/(n.next.y-n.y)+n.x&&(r=!r),n=n.next}while(n!==e);return r}(e,t)&&(Z(e.prev,e,t.prev)||Z(e,t.prev,t))||M(e,t)&&Z(e.prev,e,e.next)>0&&Z(t.prev,t,t.next)>0)}function Z(e,t,n){return(t.y-e.y)*(n.x-t.x)-(t.x-e.x)*(n.y-t.y)}function M(e,t){return e.x===t.x&&e.y===t.y}function F(e,t,n,r){var o=I(Z(e,t,n)),i=I(Z(e,t,r)),a=I(Z(n,r,e)),s=I(Z(n,r,t));return o!==i&&a!==s||(!(0!==o||!T(e,n,t))||(!(0!==i||!T(e,r,t))||(!(0!==a||!T(n,e,r))||!(0!==s||!T(n,t,r)))))}function T(e,t,n){return t.x<=Math.max(e.x,n.x)&&t.x>=Math.min(e.x,n.x)&&t.y<=Math.max(e.y,n.y)&&t.y>=Math.min(e.y,n.y)}function I(e){return e>0?1:e<0?-1:0}function S(e,t){return Z(e.prev,e,e.next)<0?Z(e,t,e.next)>=0&&Z(e,e.prev,t)>=0:Z(e,t,e.prev)<0||Z(e,e.next,t)<0}function U(e,t){var n=new R(e.i,e.x,e.y),r=new R(t.i,t.x,t.y),o=e.next,i=t.prev;return e.next=t,t.prev=e,n.next=o,o.prev=n,r.next=n,n.prev=r,i.next=r,r.prev=i,r}function k(e,t,n,r){var o=new R(e,t,n);return r?(o.next=r.next,o.prev=r,r.next.prev=o,r.next=o):(o.prev=o,o.next=o),o}function z(e){e.next.prev=e.prev,e.prev.next=e.next,e.prevZ&&(e.prevZ.nextZ=e.nextZ),e.nextZ&&(e.nextZ.prevZ=e.prevZ)}function R(e,t,n){this.i=e,this.x=t,this.y=n,this.prev=null,this.next=null,this.z=0,this.prevZ=null,this.nextZ=null,this.steiner=!1}function B(e,t,n,r){for(var o=0,i=t,a=n-r;i0&&(r+=e[o-1].length,n.holes.push(r))}return n};const N=[],P={vertexPosition:0,indexPosition:0};function C(e,t,n,r,o){e[t+0]=n,e[t+1]=r,e[t+2]=o}function _(e,t,n,r,o,i){const a=3+o,s=e[t+0],u=e[t+1],f=N;f.length=o;for(let n=0;n0?u:2*Math.PI-u}const g=null!==o;let m=0,w=0;if(null!==r){m=b(d,y,a(x,[...[e[r],e[r+1]]]))}if(g){w=b(y,d,a(x,[...[e[o],e[o+1]]]))}i.push(c[0],c[1],v[0],v[1],p(0,m,w)),i.push(...u),i.push(c[0],c[1],v[0],v[1],p(1,m,w)),i.push(...u),i.push(c[0],c[1],v[0],v[1],p(2,m,w)),i.push(...u),i.push(c[0],c[1],v[0],v[1],p(3,m,w)),i.push(...u),s.push(h,h+1,h+2,h+1,h+3,h+2)}function L(e,t,n,r,o){const i=2+o;let a=t;const s=e.slice(a,a+o);a+=o;const f=e[a++];let x=0;const l=new Array(f-1);for(let t=0;t{const o=r.data;switch(o.type){case t:{const e=3,t=2,n=o.customAttributesCount,r=t+n,i=new Float32Array(o.renderInstructions),a=i.length/r,s=4*a*(n+e),u=new Uint32Array(6*a),f=new Float32Array(s);let x;for(let e=0;e0?a+(n-1)*r:null,n{const e=t.data;if(e.type===Nf){const i=e.projectionTransform;e.hitDetection?(this.hitVerticesBuffer_.fromArrayBuffer(e.vertexBuffer),this.helper.flushBufferData(this.hitVerticesBuffer_)):(this.verticesBuffer_.fromArrayBuffer(e.vertexBuffer),this.helper.flushBufferData(this.verticesBuffer_)),this.indicesBuffer_.fromArrayBuffer(e.indexBuffer),this.helper.flushBufferData(this.indicesBuffer_),this.renderTransform_=i,Yt(this.invertRenderTransform_,this.renderTransform_),e.hitDetection?this.hitRenderInstructions_=new Float32Array(t.data.renderInstructions):(this.renderInstructions_=new Float32Array(t.data.renderInstructions),e.generateBuffersRun===this.generateBuffersRun_&&(this.ready=!0)),this.getLayer().changed()}})),this.featureCache_={},this.featureCount_=0;const s=this.getLayer().getSource();this.sourceListenKeys_=[N(s,nc,this.handleSourceFeatureAdded_,this),N(s,rc,this.handleSourceFeatureChanged_,this),N(s,oc,this.handleSourceFeatureDelete_,this),N(s,sc,this.handleSourceFeatureClear_,this)],s.forEachFeature((t=>{this.featureCache_[X(t)]={feature:t,properties:t.getProperties(),geometry:t.getGeometry()},this.featureCount_++}))}afterHelperCreated(){this.program_=this.helper.getProgram(this.fragmentShader_,this.vertexShader_),this.hitDetectionEnabled_&&(this.hitProgram_=this.helper.getProgram(this.hitFragmentShader_,this.hitVertexShader_),this.hitRenderTarget_=new Jd(this.helper))}handleSourceFeatureAdded_(t){const e=t.feature;this.featureCache_[X(e)]={feature:e,properties:e.getProperties(),geometry:e.getGeometry()},this.featureCount_++}handleSourceFeatureChanged_(t){const e=t.feature;this.featureCache_[X(e)]={feature:e,properties:e.getProperties(),geometry:e.getGeometry()}}handleSourceFeatureDelete_(t){const e=t.feature;delete this.featureCache_[X(e)],this.featureCount_--}handleSourceFeatureClear_(){this.featureCache_={},this.featureCount_=0}renderFrame(t){const e=this.helper.getGL();this.preRender(e,t);const i=t.viewState.projection,n=this.getLayer().getSource().getWrapX()&&i.canWrapX(),r=i.getExtent(),s=t.extent,o=n?De(r):null,a=n?Math.ceil((s[2]-r[2])/o)+1:1,l=n?Math.floor((s[0]-r[0])/o):0;let h=l;const c=this.indicesBuffer_.getSize();do{this.helper.makeProjectionTransform(t,this.currentTransform_),Wt(this.currentTransform_,h*o,0),kt(this.currentTransform_,this.invertRenderTransform_),this.helper.applyUniforms(t),this.helper.drawElements(0,c)}while(++h{const r=e.data;r.id===n&&(this.worker_.removeEventListener("message",o),t.verticesBufferTransform=r.renderInstructionsTransform,Yt(t.invertVerticesBufferTransform,t.verticesBufferTransform),t.verticesBuffer.fromArrayBuffer(r.vertexBuffer),this.helper_.flushBufferData(t.verticesBuffer),t.indicesBuffer.fromArrayBuffer(r.indexBuffer),this.helper_.flushBufferData(t.indicesBuffer),t.renderInstructions=new Float32Array(r.renderInstructions),i())};this.worker_.addEventListener("message",o)}};const xp={SEGMENT_START:"a_segmentStart",SEGMENT_END:"a_segmentEnd",PARAMETERS:"a_parameters"};var vp=class extends yp{constructor(t,e,i,n,r){super(t,e,i,n,r),this.attributes=[{name:xp.SEGMENT_START,size:2,type:Xd.FLOAT},{name:xp.SEGMENT_END,size:2,type:Xd.FLOAT},{name:xp.PARAMETERS,size:1,type:Xd.FLOAT}].concat(r.map((function(t){return{name:"a_"+t.name,size:1,type:Xd.FLOAT}})))}generateRenderInstructions(t){const e=2*t.verticesCount+(1+this.customAttributes.length)*t.geometriesCount;t.renderInstructions&&t.renderInstructions.length===e||(t.renderInstructions=new Float32Array(e));const i=[];let n=0;for(const e in t.entries){const r=t.entries[e];for(let e=0,s=r.flatCoordss.length;ethis.addGeometry_(t,e)));break;case"MultiPolygon":t.getPolygons().map((t=>this.addGeometry_(t,e)));break;case"MultiLineString":t.getLineStrings().map((t=>this.addGeometry_(t,e)));break;case"MultiPoint":t.getPoints().map((t=>this.addGeometry_(t,e)));break;case"Polygon":const s=t;r=this.addFeatureEntryInPolygonBatch_(e),i=s.getFlatCoordinates(),n=i.length/2;const o=s.getLinearRingCount(),a=s.getEnds().map(((t,e,i)=>e>0?(t-i[e-1])/2:t/2));this.polygonBatch.verticesCount+=n,this.polygonBatch.ringsCount+=o,this.polygonBatch.geometriesCount++,r.flatCoordss.push(i),r.ringsVerticesCounts.push(a),r.verticesCount+=n,r.ringsCount+=o,s.getLinearRings().map((t=>this.addGeometry_(t,e)));break;case"Point":const l=t;r=this.addFeatureEntryInPointBatch_(e),i=l.getFlatCoordinates(),this.pointBatch.geometriesCount++,r.flatCoordss.push(i);break;case"LineString":case"LinearRing":const h=t;r=this.addFeatureEntryInLineStringBatch_(e),i=h.getFlatCoordinates(),n=i.length/2,this.lineStringBatch.verticesCount+=n,this.lineStringBatch.geometriesCount++,r.flatCoordss.push(i),r.verticesCount+=n}}changeFeature(t){this.clearFeatureEntryInPointBatch_(t),this.clearFeatureEntryInPolygonBatch_(t),this.clearFeatureEntryInLineStringBatch_(t);const e=t.getGeometry();e&&this.addGeometry_(e,t)}removeFeature(t){this.clearFeatureEntryInPointBatch_(t),this.clearFeatureEntryInPolygonBatch_(t),this.clearFeatureEntryInLineStringBatch_(t)}clear(){this.polygonBatch.entries={},this.polygonBatch.geometriesCount=0,this.polygonBatch.verticesCount=0,this.polygonBatch.ringsCount=0,this.lineStringBatch.entries={},this.lineStringBatch.geometriesCount=0,this.lineStringBatch.verticesCount=0,this.pointBatch.entries={},this.pointBatch.geometriesCount=0}};const wp={POSITION:"a_position",INDEX:"a_index"};var Tp=class extends yp{constructor(t,e,i,n,r){super(t,e,i,n,r),this.attributes=[{name:wp.POSITION,size:2,type:Xd.FLOAT},{name:wp.INDEX,size:1,type:Xd.FLOAT}].concat(r.map((function(t){return{name:"a_"+t.name,size:1,type:Xd.FLOAT}})))}generateRenderInstructions(t){const e=(2+this.customAttributes.length)*t.geometriesCount;t.renderInstructions&&t.renderInstructions.length===e||(t.renderInstructions=new Float32Array(e));const i=[];let n=0;for(const e in t.entries){const r=t.entries[e];for(let e=0,s=r.flatCoordss.length;e 0.93) return normalPx - tangentPx;\n float halfAngle = joinAngle / 2.0;\n vec2 angleBisectorNormal = vec2(\n sin(halfAngle) * normalPx.x + cos(halfAngle) * normalPx.y,\n -cos(halfAngle) * normalPx.x + sin(halfAngle) * normalPx.y\n );\n float length = 1.0 / sin(halfAngle);\n return angleBisectorNormal * length;\n }\n\n void main(void) {\n float anglePrecision = 1500.0;\n float paramShift = 10000.0;\n v_angleStart = fract(a_parameters / paramShift) * paramShift / anglePrecision;\n v_angleEnd = fract(floor(a_parameters / paramShift + 0.5) / paramShift) * paramShift / anglePrecision;\n float vertexNumber = floor(a_parameters / paramShift / paramShift + 0.0001);\n vec2 tangentPx = worldToPx(a_segmentEnd) - worldToPx(a_segmentStart);\n tangentPx = normalize(tangentPx);\n vec2 normalPx = vec2(-tangentPx.y, tangentPx.x);\n float normalDir = vertexNumber < 0.5 || (vertexNumber > 1.5 && vertexNumber < 2.5) ? 1.0 : -1.0;\n float tangentDir = vertexNumber < 1.5 ? 1.0 : -1.0;\n float angle = vertexNumber < 1.5 ? v_angleStart : v_angleEnd;\n vec2 offsetPx = getOffsetDirection(normalPx * normalDir, tangentDir * tangentPx, angle) * a_width * 0.5;\n vec2 position = vertexNumber < 1.5 ? a_segmentStart : a_segmentEnd;\n gl_Position = u_projectionMatrix * vec4(position, 0.0, 1.0) + pxToScreen(offsetPx);\n v_segmentStart = worldToPx(a_segmentStart);\n v_segmentEnd = worldToPx(a_segmentEnd);\n v_color = ${bp}\n v_opacity = a_opacity;\n v_width = a_width;\n }`,Fp="\n precision mediump float;\n uniform float u_pixelRatio;\n varying vec2 v_segmentStart;\n varying vec2 v_segmentEnd;\n varying float v_angleStart;\n varying float v_angleEnd;\n varying vec3 v_color;\n varying float v_opacity;\n varying float v_width;\n\n float segmentDistanceField(vec2 point, vec2 start, vec2 end, float radius) {\n vec2 startToPoint = point - start;\n vec2 startToEnd = end - start;\n float ratio = clamp(dot(startToPoint, startToEnd) / dot(startToEnd, startToEnd), 0.0, 1.0);\n float dist = length(startToPoint - ratio * startToEnd);\n return 1.0 - smoothstep(radius - 1.0, radius, dist);\n }\n\n void main(void) {\n vec2 v_currentPoint = gl_FragCoord.xy / u_pixelRatio;\n gl_FragColor = vec4(v_color, 1.0) * v_opacity;\n gl_FragColor *= segmentDistanceField(v_currentPoint, v_segmentStart, v_segmentEnd, v_width);\n }",Mp=`\n precision mediump float;\n uniform mat4 u_projectionMatrix;\n uniform mat4 u_offsetScaleMatrix;\n attribute vec2 a_position;\n attribute float a_index;\n attribute float a_color;\n attribute float a_opacity;\n varying vec2 v_texCoord;\n varying vec3 v_color;\n varying float v_opacity;\n\n void main(void) {\n mat4 offsetMatrix = u_offsetScaleMatrix;\n float size = 6.0;\n float offsetX = a_index == 0.0 || a_index == 3.0 ? -size / 2.0 : size / 2.0;\n float offsetY = a_index == 0.0 || a_index == 1.0 ? -size / 2.0 : size / 2.0;\n vec4 offsets = offsetMatrix * vec4(offsetX, offsetY, 0.0, 0.0);\n gl_Position = u_projectionMatrix * vec4(a_position, 0.0, 1.0) + offsets;\n float u = a_index == 0.0 || a_index == 3.0 ? 0.0 : 1.0;\n float v = a_index == 0.0 || a_index == 1.0 ? 0.0 : 1.0;\n v_texCoord = vec2(u, v);\n v_color = ${bp}\n v_opacity = a_opacity;\n }`,Ap="\n precision mediump float;\n varying vec3 v_color;\n varying float v_opacity;\n\n void main(void) {\n gl_FragColor = vec4(v_color, 1.0) * v_opacity;\n }";function Op(t){return Object.keys(t).map((e=>({name:e,callback:t[e]})))}var Np=class extends rg{constructor(t,e){const i=e.uniforms||{},n=[1,0,0,1,0,0];i[Nd]=n,super(t,{uniforms:i,postProcesses:e.postProcesses}),this.sourceRevision_=-1,this.previousExtent_=[1/0,1/0,-1/0,-1/0],this.currentTransform_=n;const r={color:function(){return Rp("#ddd")},opacity:function(){return 1},...e.fill&&e.fill.attributes},s={color:function(){return Rp("#eee")},opacity:function(){return 1},width:function(){return 1.5},...e.stroke&&e.stroke.attributes},o={color:function(){return Rp("#eee")},opacity:function(){return 1},...e.point&&e.point.attributes};this.fillVertexShader_=e.fill&&e.fill.vertexShader||Pp,this.fillFragmentShader_=e.fill&&e.fill.fragmentShader||Ip,this.fillAttributes_=Op(r),this.strokeVertexShader_=e.stroke&&e.stroke.vertexShader||Lp,this.strokeFragmentShader_=e.stroke&&e.stroke.fragmentShader||Fp,this.strokeAttributes_=Op(s),this.pointVertexShader_=e.point&&e.point.vertexShader||Mp,this.pointFragmentShader_=e.point&&e.point.fragmentShader||Ap,this.pointAttributes_=Op(o),this.worker_=pp(),this.batch_=new Sp;const a=this.getLayer().getSource();this.batch_.addFeatures(a.getFeatures()),this.sourceListenKeys_=[N(a,nc,this.handleSourceFeatureAdded_,this),N(a,rc,this.handleSourceFeatureChanged_,this),N(a,oc,this.handleSourceFeatureDelete_,this),N(a,sc,this.handleSourceFeatureClear_,this)]}afterHelperCreated(){this.polygonRenderer_=new Cp(this.helper,this.worker_,this.fillVertexShader_,this.fillFragmentShader_,this.fillAttributes_),this.pointRenderer_=new Tp(this.helper,this.worker_,this.pointVertexShader_,this.pointFragmentShader_,this.pointAttributes_),this.lineStringRenderer_=new vp(this.helper,this.worker_,this.strokeVertexShader_,this.strokeFragmentShader_,this.strokeAttributes_)}handleSourceFeatureAdded_(t){const e=t.feature;this.batch_.addFeature(e)}handleSourceFeatureChanged_(t){const e=t.feature;this.batch_.changeFeature(e)}handleSourceFeatureDelete_(t){const e=t.feature;this.batch_.removeFeature(e)}handleSourceFeatureClear_(){this.batch_.clear()}renderFrame(t){const e=this.helper.getGL();this.preRender(e,t);const i=this.getLayer().getSource(),n=t.viewState.projection,r=i.getWrapX()&&n.canWrapX(),s=n.getExtent(),o=t.extent,a=r?De(s):null,l=r?Math.ceil((o[2]-s[2])/a)+1:1;let h=r?Math.floor((o[0]-s[0])/a):0;do{this.polygonRenderer_.render(this.batch_.polygonBatch,this.currentTransform_,t,h*a),this.lineStringRenderer_.render(this.batch_.lineStringBatch,this.currentTransform_,t,h*a),this.pointRenderer_.render(this.batch_.pointBatch,this.currentTransform_,t,h*a)}while(++h{l--,this.ready=l<=0,this.getLayer().changed()};this.polygonRenderer_.rebuild(this.batch_.polygonBatch,t,"Polygon",h),this.lineStringRenderer_.rebuild(this.batch_.lineStringBatch,t,"LineString",h),this.pointRenderer_.rebuild(this.batch_.pointBatch,t,"Point",h),this.previousExtent_=t.extent.slice()}return this.helper.makeProjectionTransform(t,this.currentTransform_),this.helper.prepareDraw(t),!0}forEachFeatureAtCoordinate(t,e,i,n,r){}disposeInternal(){this.worker_.terminate(),this.layer_=null,this.sourceListenKeys_.forEach((function(t){G(t)})),this.sourceListenKeys_=null,super.disposeInternal()}};const Dp=0,Gp=1,kp=2,jp=3,Bp=4,zp=5,Up=6,Xp=7,Vp=8,Wp=9,Zp=10,Yp=11,Kp=12,qp=[Vp],Hp=[Kp],$p=[Gp],Jp=[jp];var Qp=class extends Vl{constructor(t,e,i,n){super(),this.tolerance=t,this.maxExtent=e,this.pixelRatio=n,this.maxLineWidth=0,this.resolution=i,this.beginGeometryInstruction1_=null,this.beginGeometryInstruction2_=null,this.bufferedMaxExtent_=null,this.instructions=[],this.coordinates=[],this.tmpCoordinate_=[],this.hitDetectionInstructions=[],this.state={}}applyPixelRatio(t){const e=this.pixelRatio;return 1==e?t:t.map((function(t){return t*e}))}appendFlatPointCoordinates(t,e){const i=this.getBufferedMaxExtent(),n=this.tmpCoordinate_,r=this.coordinates;let s=r.length;for(let o=0,a=t.length;oo&&(this.instructions.push([Bp,o,l,t,i,nr]),this.hitDetectionInstructions.push([Bp,o,l,t,n||i,nr]));break;case"Point":a=t.getFlatCoordinates(),this.coordinates.push(a[0],a[1]),l=this.coordinates.length,this.instructions.push([Bp,o,l,t,i]),this.hitDetectionInstructions.push([Bp,o,l,t,n||i])}this.endGeometry(e)}beginGeometry(t,e){this.beginGeometryInstruction1_=[Dp,e,0,t],this.instructions.push(this.beginGeometryInstruction1_),this.beginGeometryInstruction2_=[Dp,e,0,t],this.hitDetectionInstructions.push(this.beginGeometryInstruction2_)}finish(){return{instructions:this.instructions,hitDetectionInstructions:this.hitDetectionInstructions,coordinates:this.coordinates}}reverseHitDetectionInstructions(){const t=this.hitDetectionInstructions;let e;t.reverse();const i=t.length;let n,r,s=-1;for(e=0;ethis.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=[Zp,e];return"string"!=typeof e&&i.push(!0),i}applyStroke(t){this.instructions.push(this.createStroke(t))}createStroke(t){return[Yp,t.strokeStyle,t.lineWidth*this.pixelRatio,t.lineCap,t.lineJoin,t.miterLimit,this.applyPixelRatio(t.lineDash),t.lineDashOffset*this.pixelRatio]}updateFillStyle(t,e){const i=t.fillStyle;"string"==typeof i&&t.currentFillStyle==i||(void 0!==i&&this.instructions.push(e.call(this,t)),t.currentFillStyle=i)}updateStrokeStyle(t,e){const i=t.strokeStyle,n=t.lineCap,r=t.lineDash,s=t.lineDashOffset,o=t.lineJoin,a=t.lineWidth,l=t.miterLimit;(t.currentStrokeStyle!=i||t.currentLineCap!=n||r!=t.currentLineDash&&!d(t.currentLineDash,r)||t.currentLineDashOffset!=s||t.currentLineJoin!=o||t.currentLineWidth!=a||t.currentMiterLimit!=l)&&(void 0!==i&&e.call(this,t),t.currentStrokeStyle=i,t.currentLineCap=n,t.currentLineDash=r,t.currentLineDashOffset=s,t.currentLineJoin=o,t.currentLineWidth=a,t.currentMiterLimit=l)}endGeometry(t){this.beginGeometryInstruction1_[2]=this.instructions.length,this.beginGeometryInstruction1_=null,this.beginGeometryInstruction2_[2]=this.hitDetectionInstructions.length,this.beginGeometryInstruction2_=null;const e=[Xp,t];this.instructions.push(e),this.hitDetectionInstructions.push(e)}getBufferedMaxExtent(){if(!this.bufferedMaxExtent_&&(this.bufferedMaxExtent_=se(this.maxExtent),this.maxLineWidth>0)){const t=this.resolution*(this.maxLineWidth+1)/2;re(this.bufferedMaxExtent_,t,this.bufferedMaxExtent_)}return this.bufferedMaxExtent_}};var tm=class extends Qp{constructor(t,e,i,n){super(t,e,i,n),this.hitDetectionImage_=null,this.image_=null,this.imagePixelRatio_=void 0,this.anchorX_=void 0,this.anchorY_=void 0,this.height_=void 0,this.opacity_=void 0,this.originX_=void 0,this.originY_=void 0,this.rotateWithView_=void 0,this.rotation_=void 0,this.scale_=void 0,this.width_=void 0,this.declutterMode_=void 0,this.declutterImageWithText_=void 0}drawPoint(t,e){if(!this.image_)return;this.beginGeometry(t,e);const i=t.getFlatCoordinates(),n=t.getStride(),r=this.coordinates.length,s=this.appendFlatPointCoordinates(i,n);this.instructions.push([Up,r,s,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([Up,r,s,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(),n=t.getStride(),r=this.coordinates.length,s=this.appendFlatPointCoordinates(i,n);this.instructions.push([Up,r,s,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([Up,r,s,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(),n=t.getSize(),r=t.getOrigin();this.imagePixelRatio_=t.getPixelRatio(this.pixelRatio),this.anchorX_=i[0],this.anchorY_=i[1],this.hitDetectionImage_=t.getHitDetectionImage(),this.image_=t.getImage(this.pixelRatio),this.height_=n[1],this.opacity_=t.getOpacity(),this.originX_=r[0],this.originY_=r[1],this.rotateWithView_=t.getRotateWithView(),this.rotation_=t.getRotation(),this.scale_=t.getScaleArray(),this.width_=n[0],this.declutterMode_=t.getDeclutterMode(),this.declutterImageWithText_=e}};var em=class extends Qp{constructor(t,e,i,n){super(t,e,i,n)}drawFlatCoordinates_(t,e,i,n){const r=this.coordinates.length,s=this.appendFlatLineCoordinates(t,e,i,n,!1,!1),o=[Wp,r,s];return this.instructions.push(o),this.hitDetectionInstructions.push(o),i}drawLineString(t,e){const i=this.state,n=i.strokeStyle,r=i.lineWidth;if(void 0===n||void 0===r)return;this.updateStrokeStyle(i,this.applyStroke),this.beginGeometry(t,e),this.hitDetectionInstructions.push([Yp,i.strokeStyle,i.lineWidth,i.lineCap,i.lineJoin,i.miterLimit,to,0],$p);const s=t.getFlatCoordinates(),o=t.getStride();this.drawFlatCoordinates_(s,0,s.length,o),this.hitDetectionInstructions.push(Hp),this.endGeometry(e)}drawMultiLineString(t,e){const i=this.state,n=i.strokeStyle,r=i.lineWidth;if(void 0===n||void 0===r)return;this.updateStrokeStyle(i,this.applyStroke),this.beginGeometry(t,e),this.hitDetectionInstructions.push([Yp,i.strokeStyle,i.lineWidth,i.lineCap,i.lineJoin,i.miterLimit,i.lineDash,i.lineDashOffset],$p);const s=t.getEnds(),o=t.getFlatCoordinates(),a=t.getStride();let l=0;for(let t=0,e=s.length;tt&&(y>_&&(_=y,p=x,m=o),y=0,x=o-r)),a=l,u=g,d=f),h=i,c=n}return y+=l,y>_?[x,o]:[p,m]}const rm={left:0,end:0,center:.5,right:1,start:1,top:0,middle:.5,hanging:.2,alphabetic:.8,ideographic:.8,bottom:1};var sm=class extends Qp{constructor(t,e,i,n){super(t,e,i,n),this.labels_=null,this.text_="",this.textOffsetX_=0,this.textOffsetY_=0,this.textRotateWithView_=void 0,this.textRotation_=0,this.textFillState_=null,this.fillStates={},this.textStrokeState_=null,this.strokeStates={},this.textState_={},this.textStates={},this.textKey_="",this.fillKey_="",this.strokeKey_="",this.declutterImageWithText_=void 0}finish(){const t=super.finish();return t.textStates=this.textStates,t.fillStates=this.fillStates,t.strokeStates=this.strokeStates,t}drawText(t,e){const i=this.textFillState_,n=this.textStrokeState_,r=this.textState_;if(""===this.text_||!r||!i&&!n)return;const s=this.coordinates;let o=s.length;const a=t.getType();let l=null,h=t.getStride();if("line"!==r.placement||"LineString"!=a&&"MultiLineString"!=a&&"Polygon"!=a&&"MultiPolygon"!=a){let i=r.overflow?null:[];switch(a){case"Point":case"MultiPoint":l=t.getFlatCoordinates();break;case"LineString":l=t.getFlatMidpoint();break;case"Circle":l=t.getCenter();break;case"MultiLineString":l=t.getFlatMidpoints(),h=2;break;case"Polygon":l=t.getFlatInteriorPoint(),r.overflow||i.push(l[2]/this.resolution),h=3;break;case"MultiPolygon":const e=t.getFlatInteriorPoints();l=[];for(let t=0,n=e.length;t{const n=s[2*(t+i)]===l[i*h]&&s[2*(t+i)+1]===l[i*h+1];return n||--t,n}))}this.saveTextStates_(),(r.backgroundFill||r.backgroundStroke)&&(this.setFillStrokeStyle(r.backgroundFill,r.backgroundStroke),r.backgroundFill&&(this.updateFillStyle(this.state,this.createFill),this.hitDetectionInstructions.push(this.createFill(this.state))),r.backgroundStroke&&(this.updateStrokeStyle(this.state,this.applyStroke),this.hitDetectionInstructions.push(this.createStroke(this.state)))),this.beginGeometry(t,e);let c=r.padding;if(c!=oo&&(r.scale[0]<0||r.scale[1]<0)){let t=r.padding[0],e=r.padding[1],i=r.padding[2],n=r.padding[3];r.scale[0]<0&&(e=-e,n=-n),r.scale[1]<0&&(t=-t,i=-i),c=[t,e,i,n]}const u=this.pixelRatio;this.instructions.push([Up,o,n,null,NaN,NaN,NaN,1,0,0,this.textRotateWithView_,this.textRotation_,[1,1],NaN,void 0,this.declutterImageWithText_,c==oo?oo:c.map((function(t){return t*u})),!!r.backgroundFill,!!r.backgroundStroke,this.text_,this.textKey_,this.strokeKey_,this.fillKey_,this.textOffsetX_,this.textOffsetY_,i]);const d=1/u;this.hitDetectionInstructions.push([Up,o,n,null,NaN,NaN,NaN,1,0,0,this.textRotateWithView_,this.textRotation_,[d,d],NaN,void 0,this.declutterImageWithText_,c,!!r.backgroundFill,!!r.backgroundStroke,this.text_,this.textKey_,this.strokeKey_,this.fillKey_,this.textOffsetX_,this.textOffsetY_,i]),this.endGeometry(e)}else{if(!Ge(this.getBufferedMaxExtent(),t.getExtent()))return;let i;if(l=t.getFlatCoordinates(),"LineString"==a)i=[l.length];else if("MultiLineString"==a)i=t.getEnds();else if("Polygon"==a)i=t.getEnds().slice(0,1);else if("MultiPolygon"==a){const e=t.getEndss();i=[];for(let t=0,n=e.length;tt[2]}else b=v>C;const P=Math.PI,I=[],L=w+n===e;let F;if(m=0,_=T,d=t[e=w],g=t[e+1],L){y(),F=Math.atan2(g-p,d-f),b&&(F+=F>0?-P:P);const t=(C+v)/2,e=(R+S)/2;return I[0]=[t,e,(E-s)/2,F,r],I}for(let t=0,u=(r=r.replace(/\n/g," ")).length;t0?-P:P),void 0!==F){let t=v-F;if(t+=t>P?-2*P:t<-P?2*P:0,Math.abs(t)>o)return null}F=v;const S=t;let w=0;for(;t0&&t.push("\n",""),t.push(e,""),t}var xm=class{constructor(t,e,i,n){this.overlaps=i,this.pixelRatio=e,this.resolution=t,this.alignFill_,this.instructions=n.instructions,this.coordinates=n.coordinates,this.coordinateCache_={},this.renderedTransform_=[1,0,0,1,0,0],this.hitDetectionInstructions=n.hitDetectionInstructions,this.pixelCoordinates_=null,this.viewRotation_=0,this.fillStates=n.fillStates||{},this.strokeStates=n.strokeStates||{},this.textStates=n.textStates||{},this.widths_={},this.labels_={}}createLabel(t,e,i,n){const r=t+e+i+n;if(this.labels_[r])return this.labels_[r];const s=n?this.strokeStates[n]:null,o=i?this.fillStates[i]:null,a=this.textStates[e],l=this.pixelRatio,h=[a.scale[0]*l,a.scale[1]*l],c=Array.isArray(t),u=a.justify?rm[a.justify]:_m(Array.isArray(t)?t[0]:t,a.textAlign||ro),d=n&&s.lineWidth?s.lineWidth:0,g=c?t:t.split("\n").reduce(ym,[]),{width:f,height:p,widths:m,heights:_,lineWidths:y}=_o(a,g),x=f+d,v=[],S=(x+2)*h[0],w=(p+d)*h[1],T={width:S<0?Math.floor(S):Math.ceil(S),height:w<0?Math.floor(w):Math.ceil(w),contextInstructions:v};1==h[0]&&1==h[1]||v.push("scale",h),n&&(v.push("strokeStyle",s.strokeStyle),v.push("lineWidth",d),v.push("lineCap",s.lineCap),v.push("lineJoin",s.lineJoin),v.push("miterLimit",s.miterLimit),v.push("setLineDash",[s.lineDash]),v.push("lineDashOffset",s.lineDashOffset)),i&&v.push("fillStyle",o.fillStyle),v.push("textBaseline","middle"),v.push("textAlign","center");const E=.5-u;let C=u*x+E*d;const R=[],b=[];let P,I=0,L=0,F=0,M=0;for(let t=0,e=g.length;tt?t-l:r,x=s+h>e?e-h:s,v=g[3]+y*u[0]+g[1],S=g[0]+x*u[1]+g[2],w=m-g[3],T=_-g[0];let E;return(f||0!==c)&&(um[0]=w,fm[0]=w,um[1]=T,dm[1]=T,dm[0]=w+v,gm[0]=dm[0],gm[1]=T+S,fm[1]=gm[1]),0!==c?(E=Zt([1,0,0,1,0,0],i,n,1,1,c,-i,-n),zt(E,um),zt(E,dm),zt(E,gm),zt(E,fm),de(Math.min(um[0],dm[0],gm[0],fm[0]),Math.min(um[1],dm[1],gm[1],fm[1]),Math.max(um[0],dm[0],gm[0],fm[0]),Math.max(um[1],dm[1],gm[1],fm[1]),cm)):de(Math.min(w,w+v),Math.min(T,T+S),Math.max(w,w+v),Math.max(T,T+S),cm),d&&(m=Math.round(m),_=Math.round(_)),{drawImageX:m,drawImageY:_,drawImageW:y,drawImageH:x,originX:l,originY:h,declutterBox:{minX:cm[0],minY:cm[1],maxX:cm[2],maxY:cm[3],value:p},canvasTransform:E,scale:u}}replayImageOrLabel_(t,e,i,n,r,s,o){const a=!(!s&&!o),l=n.declutterBox,h=t.canvas,c=o?o[2]*n.scale[0]/2:0;return l.minX-c<=h.width/e&&l.maxX+c>=0&&l.minY-c<=h.height/e&&l.maxY+c>=0&&(a&&this.replayTextBackground_(t,um,dm,gm,fm,s,o),yo(t,n.canvasTransform,r,i,n.originX,n.originY,n.drawImageW,n.drawImageH,n.drawImageX,n.drawImageY,n.scale)),!0}fill_(t){if(this.alignFill_){const e=zt(this.renderedTransform_,[0,0]),i=512*this.pixelRatio;t.save(),t.translate(e[0]%i,e[1]%i),t.rotate(this.viewRotation_)}t.fill(),this.alignFill_&&t.restore()}setStrokeStyle_(t,e){t.strokeStyle=e[1],t.lineWidth=e[2],t.lineCap=e[3],t.lineJoin=e[4],t.miterLimit=e[5],t.lineDashOffset=e[7],t.setLineDash(e[6])}drawLabelWithPointPlacement_(t,e,i,n){const r=this.textStates[e],s=this.createLabel(t,e,n,i),o=this.strokeStates[i],a=this.pixelRatio,l=_m(Array.isArray(t)?t[0]:t,r.textAlign||ro),h=rm[r.textBaseline||so],c=o&&o.lineWidth?o.lineWidth:0;return{label:s,anchorX:l*(s.width/a-2*r.scale[0])+2*(.5-l)*c,anchorY:h*s.height/a+2*(.5-h)*c}}execute_(t,e,i,n,r,s,o,a){let l;this.pixelCoordinates_&&d(i,this.renderedTransform_)?l=this.pixelCoordinates_:(this.pixelCoordinates_||(this.pixelCoordinates_=[]),l=Ln(this.coordinates,0,this.coordinates.length,2,i,this.pixelCoordinates_),Bt(this.renderedTransform_,i));let h=0;const c=n.length;let u,g,f,p,m,_,y,x,v,S,w,T,E=0,C=0,R=0,b=null,P=null;const I=this.coordinateCache_,L=this.viewRotation_,F=Math.round(1e12*Math.atan2(-i[1],i[0]))/1e12,M={context:t,pixelRatio:this.pixelRatio,resolution:this.resolution,rotation:L},A=this.instructions!=n||this.overlaps?0:200;let O,N,D,G;for(;hA&&(this.fill_(t),C=0),R>A&&(t.stroke(),R=0),C||R||(t.beginPath(),p=NaN,m=NaN),++h;break;case kp:E=i[1];const n=l[E],c=l[E+1],d=l[E+2]-n,k=l[E+3]-c,j=Math.sqrt(d*d+k*k);t.moveTo(n+j,c),t.arc(n,c,j,0,2*Math.PI,!0),++h;break;case jp:t.closePath(),++h;break;case Bp:E=i[1],u=i[2];const B=i[3],z=i[4],U=6==i.length?i[5]:void 0;M.geometry=B,M.feature=O,h in I||(I[h]=[]);const X=I[h];U?U(l,E,u,2,X):(X[0]=l[E],X[1]=l[E+1],X.length=2),z(X,M),++h;break;case Up:E=i[1],u=i[2],x=i[3],g=i[4],f=i[5];let V=i[6];const W=i[7],Z=i[8],Y=i[9],K=i[10];let q=i[11];const H=i[12];let $=i[13];const J=i[14],Q=i[15];if(!x&&i.length>=20){v=i[19],S=i[20],w=i[21],T=i[22];const t=this.drawLabelWithPointPlacement_(v,S,w,T);x=t.label,i[3]=x;const e=i[23];g=(t.anchorX-e)*this.pixelRatio,i[4]=g;const n=i[24];f=(t.anchorY-n)*this.pixelRatio,i[5]=f,V=x.height,i[6]=V,$=x.width,i[13]=$}let tt,et,it,nt;i.length>25&&(tt=i[25]),i.length>17?(et=i[16],it=i[17],nt=i[18]):(et=oo,it=!1,nt=!1),K&&F?q+=L:K||F||(q-=L);let rt=0;for(;Ei)break;let a=n[o];a||(a=[],n[o]=a),a.push(4*((t+r)*e+(t+s))+3),r>0&&a.push(4*((t-r)*e+(t+s))+3),s>0&&(a.push(4*((t+r)*e+(t-s))+3),r>0&&a.push(4*((t-r)*e+(t-s))+3))}const r=[];for(let t=0,e=n.length;t0){if(!s||"Image"!==g&&"Text"!==g||s.includes(t)){const i=(d[a]-3)/4,s=n-i%o,l=n-(i/o|0),h=r(t,e,s*s+l*l);if(h)return h}c.clearRect(0,0,o,o);break}}const p=Object.keys(this.executorsByZIndex_).map(Number);let m,_,y,x,v;for(p.sort(l),m=p.length-1;m>=0;--m){const t=p[m].toString();for(y=this.executorsByZIndex_[t],_=vm.length-1;_>=0;--_)if(g=vm[_],x=y[g],void 0!==x&&(v=x.executeHitDetection(c,a,i,f,u),v))return v}}getClipCoords(t){const e=this.maxExtent_;if(!e)return null;const i=e[0],n=e[1],r=e[2],s=e[3],o=[i,n,i,s,r,s,r,n];return Ln(o,0,8,2,t,o),o}isEmpty(){return v(this.executorsByZIndex_)}execute(t,e,i,n,r,s,o){const a=Object.keys(this.executorsByZIndex_).map(Number);let h,c,u,d,g,f;for(a.sort(l),this.maxExtent_&&(t.save(),this.clip(t,i)),s=s||vm,o&&a.reverse(),h=0,c=a.length;h{if(!this.hitDetectionImageData_&&!this.animatingOrInteracting_){const t=[this.context.canvas.width,this.context.canvas.height];zt(this.pixelTransform,t);const e=this.renderedCenter_,i=this.renderedResolution_,n=this.renderedRotation_,r=this.renderedProjection_,s=this.wrappedRenderedExtent_,o=this.getLayer(),a=[],l=t[0]*Em,h=t[1]*Em;a.push(this.getRenderTransform(e,i,n,Em,l,h,0).slice());const c=o.getSource(),u=r.getExtent();if(c.getWrapX()&&r.canWrapX()&&!le(u,s)){let t=s[0];const r=De(u);let o,c=0;for(;tu[2];)++c,o=r*c,a.push(this.getRenderTransform(e,i,n,Em,l,h,o).slice()),t-=r}this.hitDetectionImageData_=Cm(t,a,this.renderedFeatures_,o.getStyleFunction(),s,i,n)}e(Rm(t,this.renderedFeatures_,this.hitDetectionImageData_))}))}forEachFeatureAtCoordinate(t,e,i,n,r){if(!this.replayGroup_)return;const s=e.viewState.resolution,o=e.viewState.rotation,a=this.getLayer(),l={},h=function(t,e,i){const s=X(t),o=l[s];if(o){if(!0!==o&&ic=n.forEachFeatureAtCoordinate(t,s,o,i,h,n===this.declutterExecutorGroup&&e.declutterTree?e.declutterTree.all().map((t=>t.value)):null))),c}handleFontsChanged(){const t=this.getLayer();t.getVisible()&&this.replayGroup_&&t.changed()}handleStyleImageChange_(t){this.renderIfReadyAndVisible()}prepareFrame(t){const e=this.getLayer(),i=e.getSource();if(!i)return!1;const n=t.viewHints[Wo],r=t.viewHints[Zo],s=e.getUpdateWhileAnimating(),o=e.getUpdateWhileInteracting();if(this.ready&&!s&&n||!o&&r)return this.animatingOrInteracting_=!0,!0;this.animatingOrInteracting_=!1;const a=t.extent,l=t.viewState,h=l.projection,c=l.resolution,u=t.pixelRatio,g=e.getRevision(),f=e.getRenderBuffer();let p=e.getRenderOrder();void 0===p&&(p=Yl);const m=l.center.slice(),_=re(a,f*c),y=_.slice(),x=[_.slice()],v=h.getExtent();if(i.getWrapX()&&h.canWrapX()&&!le(v,t.extent)){const t=De(v),e=Math.max(De(_)/2,t);_[0]=v[0]-e,_[2]=v[2]+e,Xi(m,h);const i=Xe(x[0],h);i[0]v[0]&&i[2]>v[2]&&x.push([i[0]-t,i[1],i[2]-t,i[3]])}if(this.ready&&this.renderedResolution_==c&&this.renderedRevision_==g&&this.renderedRenderOrder_==p&&le(this.wrappedRenderedExtent_,_))return d(this.renderedExtent_,y)||(this.hitDetectionImageData_=null,this.renderedExtent_=y),this.renderedCenter_=m,this.replayGroupChanged=!1,!0;this.replayGroup_=null;const S=new am(ql(c,u),_,c,u);let w;this.getLayer().getDeclutter()&&(w=new am(ql(c,u),_,c,u));const T=Sn();let E;if(T){for(let t=0,e=x.length;t{let i;const n=t.getStyleFunction()||e.getStyleFunction();if(n&&(i=n(t,c)),i){const e=this.renderFeature(t,C,i,S,E,w);R=R&&!e}},P=En(_,h),I=i.getFeaturesInExtent(P);p&&I.sort(p);for(let t=0,e=I.length;t{if(g.getState()!==ts)return;this.image_=d?null:g;const t=g.getResolution(),n=g.getPixelRatio(),r=t*e/n;this.renderedResolution=r,this.coordinateToVectorPixelTransform_=Zt(this.coordinateToVectorPixelTransform_,a/2,l/2,1/r,-1/r,0,-i.center[0],-i.center[1])})),g.load()}return this.image_&&(this.renderedPixelToCoordinateTransform_=t.pixelToCoordinateTransform.slice()),!!this.image_}preRender(){}postRender(){}renderDeclutter(){}forEachFeatureAtCoordinate(t,e,i,n,r){return this.vectorRenderer_?this.vectorRenderer_.forEachFeatureAtCoordinate(t,e,i,n,r):super.forEachFeatureAtCoordinate(t,e,i,n,r)}};const Im={image:["Polygon","Circle","LineString","Image","Text"],hybrid:["Polygon","LineString"],vector:[]},Lm={hybrid:["Image","Text","Default"],vector:["Polygon","Circle","LineString","Image","Text","Default"]};var Fm=class extends pu{constructor(t){super(t),this.boundHandleStyleImageChange_=this.handleStyleImageChange_.bind(this),this.renderedLayerRevision_,this.renderedPixelToCoordinateTransform_=null,this.renderedRotation_,this.tmpTransform_=[1,0,0,1,0,0]}prepareTile(t,e,i){let n;const r=t.getState();return r!==Q&&r!==tt||(this.updateExecutorGroup_(t,e,i),this.tileImageNeedsRender_(t)&&(n=!0)),n}getTile(t,e,i,n){const r=n.pixelRatio,s=n.viewState,o=s.resolution,a=s.projection,l=this.getLayer(),h=l.getSource().getTile(t,e,i,r,a),c=n.viewHints,u=!(c[Wo]||c[Zo]);!u&&h.wantedResolution||(h.wantedResolution=o);return this.prepareTile(h,r,a)&&(u||Date.now()-n.time<8)&&"vector"!==l.getRenderMode()&&this.renderTileImage_(h,n),super.getTile(t,e,i,n)}isDrawableTile(t){const e=this.getLayer();return super.isDrawableTile(t)&&("vector"===e.getRenderMode()?X(e)in t.executorGroups:t.hasContext(e))}getTileImage(t){return t.getImage(this.getLayer())}prepareFrame(t){const e=this.getLayer().getRevision();return this.renderedLayerRevision_!==e&&(this.renderedLayerRevision_=e,this.renderedTiles.length=0),super.prepareFrame(t)}updateExecutorGroup_(t,e,i){const n=this.getLayer(),r=n.getRevision(),s=n.getRenderOrder()||null,o=t.wantedResolution,a=t.getReplayState(n);if(!a.dirty&&a.renderedResolution===o&&a.renderedRevision==r&&a.renderedRenderOrder==s)return;const l=n.getSource(),h=n.getDeclutter(),c=l.getTileGrid(),u=l.getTileGridForProjection(i).getTileCoordExtent(t.wrappedTileCoord),d=l.getSourceTiles(e,i,t),g=X(n);delete t.hitDetectionImageData[g],t.executorGroups[g]=[],h&&(t.declutterExecutorGroups[g]=[]),a.dirty=!1;for(let i=0,r=d.length;i{const r=n===p?e.declutterTree.all().map((t=>t.value)):null;for(let e=0,a=n.length;e{const n=this.getLayer(),r=X(n),s=n.getSource(),o=this.renderedProjection,a=o.getExtent(),l=this.renderedResolution,h=s.getTileGridForProjection(o),c=zt(this.renderedPixelToCoordinateTransform_,t.slice()),u=h.getTileCoordForCoordAndResolution(c,l);let d;for(let t=0,e=this.renderedTiles.length;t0)return void e([]);const g=Oe(h.getTileCoordExtent(d.wrappedTileCoord)),f=[(c[0]-g[0])/l,(g[1]-c[1])/l],p=d.getSourceTiles().reduce((function(t,e){return t.concat(e.getFeatures())}),[]);let m=d.hitDetectionImageData[r];if(!m){const t=ll(h.getTileSize(h.getZForResolution(l,s.zDirection))),e=this.renderedRotation_;m=Cm(t,[this.getRenderTransform(h.getTileCoordCenter(d.wrappedTileCoord),l,0,Em,t[0]*Em,t[1]*Em,0)],p,n.getStyleFunction(),h.getTileCoordExtent(d.wrappedTileCoord),d.getReplayState(n).renderedResolution,e),d.hitDetectionImageData[r]=m}e(Rm(f,p,m))}))}handleFontsChanged(){const t=this.getLayer();t.getVisible()&&void 0!==this.renderedLayerRevision_&&t.changed()}handleStyleImageChange_(t){this.renderIfReadyAndVisible()}renderDeclutter(t){const e=this.context,i=e.globalAlpha;e.globalAlpha=this.getLayer().getOpacity();const n=t.viewHints,r=!(n[Wo]||n[Zo]),s=this.renderedTiles;for(let e=0,i=s.length;e=0;--e)n[e].execute(this.context,1,this.getTileRenderTransform(i,t),t.viewState.rotation,r,void 0,t.declutterTree)}e.globalAlpha=i}getTileRenderTransform(t,e){const i=e.pixelRatio,n=e.viewState,r=n.center,s=n.resolution,o=n.rotation,a=e.size,l=Math.round(a[0]*i),h=Math.round(a[1]*i),c=this.getLayer().getSource().getTileGridForProjection(e.viewState.projection),u=t.tileCoord,d=c.getTileCoordExtent(t.wrappedTileCoord),g=c.getTileCoordExtent(u,this.tmpExtent)[0]-d[0];return kt(Xt(this.inversePixelTransform.slice(),1/i,1/i),this.getRenderTransform(r,s,o,i,l,h,g))}postRender(t,e){const i=e.viewHints,n=!(i[Wo]||i[Zo]);this.renderedPixelToCoordinateTransform_=e.pixelToCoordinateTransform.slice(),this.renderedRotation_=e.viewState.rotation;const r=this.getLayer(),s=r.getRenderMode(),o=t.globalAlpha;t.globalAlpha=r.getOpacity();const a=Lm[s],l=e.viewState,h=l.rotation,c=r.getSource(),u=c.getTileGridForProjection(l.projection).getZForResolution(l.resolution,c.zDirection),d=this.renderedTiles,g=[],f=[];let p=!0;for(let i=d.length-1;i>=0;--i){const s=d[i];p=p&&!s.getReplayState(r).dirty;const o=s.executorGroups[X(r)].filter((t=>t.hasExecutors(a)));if(0===o.length)continue;const l=this.getTileRenderTransform(s,e),c=s.tileCoord[0];let m=!1;const _=o[0].getClipCoords(l);if(_){for(let e=0,i=g.length;e=e[0]||(t[1]<=e[1]&&t[3]>=e[1]||Ee(t,this.intersectsCoordinate.bind(this)))}return!1}setCenter(t){const e=this.stride,i=this.flatCoordinates[e]-this.flatCoordinates[0],n=t.slice();n[e]=n[0]+i;for(let i=1;i1?o:2,s=s||new Array(o);for(let e=0;e>1;r1?new Km(i,"XY",r):new Ar(i,"XY",n);default:throw new Error("Invalid geometry type:"+e)}}Hm.prototype.getEndss=Hm.prototype.getEnds,Hm.prototype.getFlatCoordinates=Hm.prototype.getOrientedFlatCoordinates;var Jm=Hm;let Qm=null;function t_(t){Qm=t;const e=Object.keys(t.defs),i=e.length;let n,r;for(n=0;n0&&c.length>0;)f=c.pop(),r=l.pop(),o=h.pop(),_=f.toString(),_ in u||(n.push(o[0],o[1]),u[_]=!0),p=c.pop(),s=l.pop(),a=h.pop(),m=(f+p)/2,d=t(m),g=e(d),yi(g[0],g[1],o[0],o[1],a[0],a[1]){const e=t.get("graticule_label");return this.lonLabelStyleBase_.getText().setText(e),this.lonLabelStyleBase_},this.latLabelStyleBase_=new pf({text:void 0!==t.latLabelStyle?t.latLabelStyle.clone():new _f({font:"12px Calibri,sans-serif",textAlign:"right",fill:new Qg({color:"rgba(0,0,0,1)"}),stroke:new lf({color:"rgba(255,255,255,1)",width:3})})}),this.latLabelStyle_=t=>{const e=t.get("graticule_label");return this.latLabelStyleBase_.getText().setText(e),this.latLabelStyleBase_},this.meridiansLabels_=[],this.parallelsLabels_=[],this.addEventListener(As,this.drawLabels_.bind(this))),this.intervals_=void 0!==t.intervals?t.intervals:a_,this.setSource(new uc({loader:this.loaderFunction.bind(this),strategy:this.strategyFunction.bind(this),features:new H,overlaps:!1,useSpatialIndex:!1,wrapX:t.wrapX})),this.featurePool_=[],this.lineStyle_=new pf({stroke:this.strokeStyle_}),this.loadedExtent_=null,this.renderedExtent_=null,this.renderedResolution_=null,this.setRenderOrder(null)}strategyFunction(t,e){let i=t.slice();return this.projection_&&this.getSource().getWrapX()&&Xe(i,this.projection_),this.loadedExtent_&&(_e(this.loadedExtent_,i,e)?i=this.loadedExtent_.slice():this.getSource().removeLoadedExtent(this.loadedExtent_)),[i]}loaderFunction(t,e,i){this.loadedExtent_=t;const n=this.getSource(),r=Ae(this.getExtent()||[-1/0,-1/0,1/0,1/0],t);if(this.renderedExtent_&&me(this.renderedExtent_,r)&&this.renderedResolution_===e)return;if(this.renderedExtent_=r,this.renderedResolution_=e,ke(r))return;const s=Pe(r),o=e*e/4;(!this.projection_||!fn(this.projection_,i))&&this.updateProjectionInfo_(i),this.createGraticule_(r,s,e,o);let a,l=this.meridians_.length+this.parallels_.length;for(this.meridiansLabels_&&(l+=this.meridians_.length),this.parallelsLabels_&&(l+=this.parallels_.length);l>this.featurePool_.length;)a=new Ot,this.featurePool_.push(a);const h=n.getFeaturesCollection();h.clear();let c,u,d=0;for(c=0,u=this.meridians_.length;cMath.PI/2}const d=Jl(t);for(let t=a;t<=l;++t){let i,n,c,g,f=this.meridians_.length+this.parallels_.length;if(this.meridiansLabels_)for(n=0,c=this.meridiansLabels_.length;n=a?(t[0]=o[0],t[2]=o[2]):s=!0);const l=[_i(e[0],this.minX_,this.maxX_),_i(e[1],this.minY_,this.maxY_)],h=this.toLonLatTransform_(l);isNaN(h[1])&&(h[1]=Math.abs(this.maxLat_)>=Math.abs(this.minLat_)?this.maxLat_:this.minLat_);let c=_i(h[0],this.minLon_,this.maxLon_),u=_i(h[1],this.minLat_,this.maxLat_);const d=this.maxLines_;let g,f,p,m,_=t;s||(_=[_i(t[0],this.minX_,this.maxX_),_i(t[1],this.minY_,this.maxY_),_i(t[2],this.minX_,this.maxX_),_i(t[3],this.minY_,this.maxY_)]);const y=Ue(_,this.toLonLatTransform_,void 0,8);let x=y[3],v=y[2],S=y[1],w=y[0];if(s||(ae(_,this.bottomLeft_)&&(w=this.minLon_,S=this.minLat_),ae(_,this.bottomRight_)&&(v=this.maxLon_,S=this.minLat_),ae(_,this.topLeft_)&&(w=this.minLon_,x=this.maxLat_),ae(_,this.topRight_)&&(v=this.maxLon_,x=this.maxLat_),x=_i(x,u,this.maxLat_),v=_i(v,c,this.maxLon_),S=_i(S,this.minLat_,u),w=_i(w,this.minLon_,c)),c=Math.floor(c/r)*r,m=_i(c,this.minLon_,this.maxLon_),f=this.addMeridian_(m,S,x,n,t,0),g=0,s)for(;(m-=r)>=w&&g++n[s]&&(r=s,s=1);const o=Math.max(e[1],n[r]),a=Math.min(e[3],n[s]),l=_i(e[1]+Math.abs(e[1]-e[3])*this.lonLabelPosition_,o,a),h=[n[r-1]+(n[s-1]-n[r-1])*(l-n[r])/(n[s]-n[r]),l],c=this.meridiansLabels_[i].geom;return c.setCoordinates(h),c}getMeridians(){return this.meridians_}getParallel_(t,e,i,n,r){const s=s_(t,e,i,this.projection_,n);let o=this.parallels_[r];return o?(o.setFlatCoordinates("XY",s),o.changed()):o=new zm(s,"XY"),o}getParallelPoint_(t,e,i){const n=t.getFlatCoordinates();let r=0,s=n.length-2;n[r]>n[s]&&(r=s,s=0);const o=Math.max(e[0],n[r]),a=Math.min(e[2],n[s]),l=_i(e[0]+Math.abs(e[0]-e[2])*this.latLabelPosition_,o,a),h=[l,n[r+1]+(n[s+1]-n[r+1])*(l-n[r])/(n[s]-n[r])],c=this.parallelsLabels_[i].geom;return c.setCoordinates(h),c}getParallels(){return this.parallels_}updateProjectionInfo_(t){const e=an("EPSG:4326"),i=t.getWorldExtent();this.maxLat_=i[3],this.maxLon_=i[2],this.minLat_=i[1],this.minLon_=i[0];const n=mn(t,e);if(this.minLon_=Math.abs(this.minLat_)?this.maxLat_:this.minLat_),this.projection_=t}};const h_="blur",c_="gradient",u_="radius",d_=["#00f","#0ff","#0f0","#ff0","#f00"];var g_=class extends Af{constructor(t){t=t||{};const e=Object.assign({},t);delete e.gradient,delete e.radius,delete e.blur,delete e.weight,super(e),this.gradient_=null,this.addChangeListener(c_,this.handleGradientChanged_),this.setGradient(t.gradient?t.gradient:d_),this.setBlur(void 0!==t.blur?t.blur:15),this.setRadius(void 0!==t.radius?t.radius:8);const i=t.weight?t.weight:"weight";this.weightFunction_="string"==typeof i?function(t){return t.get(i)}:i,this.setRenderOrder(null)}getBlur(){return this.get(h_)}getGradient(){return this.get(c_)}getRadius(){return this.get(u_)}handleGradientChanged_(){this.gradient_=function(t){const e=1,i=256,n=_t(e,i),r=n.createLinearGradient(0,0,e,i),s=1/(t.length-1);for(let e=0,i=t.length;e{const e=this.weightFunction_(t);return void 0!==e?_i(e,0,1):1}}],vertexShader:"\n precision mediump float;\n uniform mat4 u_projectionMatrix;\n uniform mat4 u_offsetScaleMatrix;\n uniform float u_size;\n attribute vec2 a_position;\n attribute float a_index;\n attribute float a_weight;\n\n varying vec2 v_texCoord;\n varying float v_weight;\n\n void main(void) {\n mat4 offsetMatrix = u_offsetScaleMatrix;\n float offsetX = a_index == 0.0 || a_index == 3.0 ? -u_size / 2.0 : u_size / 2.0;\n float offsetY = a_index == 0.0 || a_index == 1.0 ? -u_size / 2.0 : u_size / 2.0;\n vec4 offsets = offsetMatrix * vec4(offsetX, offsetY, 0.0, 0.0);\n gl_Position = u_projectionMatrix * vec4(a_position, 0.0, 1.0) + offsets;\n float u = a_index == 0.0 || a_index == 3.0 ? 0.0 : 1.0;\n float v = a_index == 0.0 || a_index == 1.0 ? 0.0 : 1.0;\n v_texCoord = vec2(u, v);\n v_weight = a_weight;\n }",fragmentShader:"\n precision mediump float;\n uniform float u_blurSlope;\n\n varying vec2 v_texCoord;\n varying float v_weight;\n\n void main(void) {\n vec2 texCoord = v_texCoord * 2.0 - vec2(1.0, 1.0);\n float sqRadius = texCoord.x * texCoord.x + texCoord.y * texCoord.y;\n float value = (1.0 - sqrt(sqRadius)) * u_blurSlope;\n float alpha = smoothstep(0.0, 1.0, value) * v_weight;\n gl_FragColor = vec4(alpha, alpha, alpha, alpha);\n }",hitVertexShader:"\n precision mediump float;\n uniform mat4 u_projectionMatrix;\n uniform mat4 u_offsetScaleMatrix;\n uniform float u_size;\n attribute vec2 a_position;\n attribute float a_index;\n attribute float a_weight;\n attribute vec4 a_hitColor;\n\n varying vec2 v_texCoord;\n varying float v_weight;\n varying vec4 v_hitColor;\n\n void main(void) {\n mat4 offsetMatrix = u_offsetScaleMatrix;\n float offsetX = a_index == 0.0 || a_index == 3.0 ? -u_size / 2.0 : u_size / 2.0;\n float offsetY = a_index == 0.0 || a_index == 1.0 ? -u_size / 2.0 : u_size / 2.0;\n vec4 offsets = offsetMatrix * vec4(offsetX, offsetY, 0.0, 0.0);\n gl_Position = u_projectionMatrix * vec4(a_position, 0.0, 1.0) + offsets;\n float u = a_index == 0.0 || a_index == 3.0 ? 0.0 : 1.0;\n float v = a_index == 0.0 || a_index == 1.0 ? 0.0 : 1.0;\n v_texCoord = vec2(u, v);\n v_hitColor = a_hitColor;\n v_weight = a_weight;\n }",hitFragmentShader:"\n precision mediump float;\n uniform float u_blurSlope;\n\n varying vec2 v_texCoord;\n varying float v_weight;\n varying vec4 v_hitColor;\n\n void main(void) {\n vec2 texCoord = v_texCoord * 2.0 - vec2(1.0, 1.0);\n float sqRadius = texCoord.x * texCoord.x + texCoord.y * texCoord.y;\n float value = (1.0 - sqrt(sqRadius)) * u_blurSlope;\n float alpha = smoothstep(0.0, 1.0, value) * v_weight;\n if (alpha < 0.05) {\n discard;\n }\n\n gl_FragColor = v_hitColor;\n }",uniforms:{u_size:()=>2*(this.get(u_)+this.get(h_)),u_blurSlope:()=>this.get(u_)/Math.max(1,this.get(h_))},postProcesses:[{fragmentShader:"\n precision mediump float;\n\n uniform sampler2D u_image;\n uniform sampler2D u_gradientTexture;\n uniform float u_opacity;\n\n varying vec2 v_texCoord;\n\n void main() {\n vec4 color = texture2D(u_image, v_texCoord);\n gl_FragColor.a = color.a * u_opacity;\n gl_FragColor.rgb = texture2D(u_gradientTexture, vec2(0.5, color.a)).rgb;\n gl_FragColor.rgb *= gl_FragColor.a;\n }",uniforms:{u_gradientTexture:()=>this.gradient_,u_opacity:()=>this.getOpacity()}}]})}renderDeclutter(){}};var f_=class{constructor(){this.dataProjection=void 0,this.defaultFeatureProjection=void 0,this.supportedMediaTypes=null}getReadOptions(t,e){if(e){let i=e.dataProjection?an(e.dataProjection):this.readProjection(t);e.extent&&i&&"tile-pixels"===i.getUnits()&&(i=an(i),i.setWorldExtent(e.extent)),e={dataProjection:i,featureProjection:e.featureProjection}}return this.adaptOptions(e)}adaptOptions(t){return Object.assign({dataProjection:this.dataProjection,featureProjection:this.defaultFeatureProjection},t)}getType(){return z()}readFeature(t,e){return z()}readFeatures(t,e){return z()}readGeometry(t,e){return z()}readProjection(t){return z()}writeFeature(t,e){return z()}writeFeatures(t,e){return z()}writeGeometry(t,e){return z()}};function p_(t,e,i){const n=i?an(i.featureProjection):null,r=i?an(i.dataProjection):null;let s;if(s=n&&r&&!fn(n,r)?(e?t.clone():t).transform(e?n:r,e?r:n):t,e&&i&&void 0!==i.decimals){const e=Math.pow(10,i.decimals),n=function(t){for(let i=0,n=t.length;i */ +read:function(t,e,i,n,r){var s,o,a=8*r-n-1,l=(1<>1,c=-7,u=i?r-1:0,d=i?-1:1,g=t[e+u];for(u+=d,s=g&(1<<-c)-1,g>>=-c,c+=a;c>0;s=256*s+t[e+u],u+=d,c-=8);for(o=s&(1<<-c)-1,s>>=-c,c+=n;c>0;o=256*o+t[e+u],u+=d,c-=8);if(0===s)s=1-h;else{if(s===l)return o?NaN:1/0*(g?-1:1);o+=Math.pow(2,n),s-=h}return(g?-1:1)*o*Math.pow(2,s-n)},write:function(t,e,i,n,r,s){var o,a,l,h=8*s-r-1,c=(1<>1,d=23===r?Math.pow(2,-24)-Math.pow(2,-77):0,g=n?0:s-1,f=n?1:-1,p=e<0||0===e&&1/e<0?1:0;for(e=Math.abs(e),isNaN(e)||e===1/0?(a=isNaN(e)?1:0,o=c):(o=Math.floor(Math.log(e)/Math.LN2),e*(l=Math.pow(2,-o))<1&&(o--,l*=2),(e+=o+u>=1?d/l:d*Math.pow(2,1-u))*l>=2&&(o++,l/=2),o+u>=c?(a=0,o=c):o+u>=1?(a=(e*l-1)*Math.pow(2,r),o+=u):(a=e*Math.pow(2,u-1)*Math.pow(2,r),o=0));r>=8;t[i+g]=255&a,g+=f,a/=256,r-=8);for(o=o<0;t[i+g]=255&o,g+=f,o/=256,h-=8);t[i+g-f]|=128*p}},y_=v_,x_=__;function v_(t){this.buf=ArrayBuffer.isView&&ArrayBuffer.isView(t)?t:new Uint8Array(t||0),this.pos=0,this.type=0,this.length=this.buf.length}v_.Varint=0,v_.Fixed64=1,v_.Bytes=2,v_.Fixed32=5;var S_=4294967296,w_=1/S_,T_="undefined"==typeof TextDecoder?null:new TextDecoder("utf8");function E_(t){return t.type===v_.Bytes?t.readVarint()+t.pos:t.pos+1}function C_(t,e,i){return i?4294967296*e+(t>>>0):4294967296*(e>>>0)+(t>>>0)}function R_(t,e,i){var n=e<=16383?1:e<=2097151?2:e<=268435455?3:Math.floor(Math.log(e)/(7*Math.LN2));i.realloc(n);for(var r=i.pos-1;r>=t;r--)i.buf[r+n]=i.buf[r]}function b_(t,e){for(var i=0;i>>8,t[i+2]=e>>>16,t[i+3]=e>>>24}function k_(t,e){return(t[e]|t[e+1]<<8|t[e+2]<<16)+(t[e+3]<<24)}v_.prototype={destroy:function(){this.buf=null},readFields:function(t,e,i){for(i=i||this.length;this.pos>3,s=this.pos;this.type=7&n,t(r,e,this),this.pos===s&&this.skip(n)}return e},readMessage:function(t,e){return this.readFields(t,e,this.readVarint()+this.pos)},readFixed32:function(){var t=D_(this.buf,this.pos);return this.pos+=4,t},readSFixed32:function(){var t=k_(this.buf,this.pos);return this.pos+=4,t},readFixed64:function(){var t=D_(this.buf,this.pos)+D_(this.buf,this.pos+4)*S_;return this.pos+=8,t},readSFixed64:function(){var t=D_(this.buf,this.pos)+k_(this.buf,this.pos+4)*S_;return this.pos+=8,t},readFloat:function(){var t=x_.read(this.buf,this.pos,!0,23,4);return this.pos+=4,t},readDouble:function(){var t=x_.read(this.buf,this.pos,!0,52,8);return this.pos+=8,t},readVarint:function(t){var e,i,n=this.buf;return e=127&(i=n[this.pos++]),i<128?e:(e|=(127&(i=n[this.pos++]))<<7,i<128?e:(e|=(127&(i=n[this.pos++]))<<14,i<128?e:(e|=(127&(i=n[this.pos++]))<<21,i<128?e:function(t,e,i){var n,r,s=i.buf;if(r=s[i.pos++],n=(112&r)>>4,r<128)return C_(t,n,e);if(r=s[i.pos++],n|=(127&r)<<3,r<128)return C_(t,n,e);if(r=s[i.pos++],n|=(127&r)<<10,r<128)return C_(t,n,e);if(r=s[i.pos++],n|=(127&r)<<17,r<128)return C_(t,n,e);if(r=s[i.pos++],n|=(127&r)<<24,r<128)return C_(t,n,e);if(r=s[i.pos++],n|=(1&r)<<31,r<128)return C_(t,n,e);throw new Error("Expected varint not more than 10 bytes")}(e|=(15&(i=n[this.pos]))<<28,t,this))))},readVarint64:function(){return this.readVarint(!0)},readSVarint:function(){var t=this.readVarint();return t%2==1?(t+1)/-2:t/2},readBoolean:function(){return Boolean(this.readVarint())},readString:function(){var t=this.readVarint()+this.pos,e=this.pos;return this.pos=t,t-e>=12&&T_?function(t,e,i){return T_.decode(t.subarray(e,i))}(this.buf,e,t):function(t,e,i){var n="",r=e;for(;r239?4:l>223?3:l>191?2:1;if(r+c>i)break;1===c?l<128&&(h=l):2===c?128==(192&(s=t[r+1]))&&(h=(31&l)<<6|63&s)<=127&&(h=null):3===c?(s=t[r+1],o=t[r+2],128==(192&s)&&128==(192&o)&&((h=(15&l)<<12|(63&s)<<6|63&o)<=2047||h>=55296&&h<=57343)&&(h=null)):4===c&&(s=t[r+1],o=t[r+2],a=t[r+3],128==(192&s)&&128==(192&o)&&128==(192&a)&&((h=(15&l)<<18|(63&s)<<12|(63&o)<<6|63&a)<=65535||h>=1114112)&&(h=null)),null===h?(h=65533,c=1):h>65535&&(h-=65536,n+=String.fromCharCode(h>>>10&1023|55296),h=56320|1023&h),n+=String.fromCharCode(h),r+=c}return n}(this.buf,e,t)},readBytes:function(){var t=this.readVarint()+this.pos,e=this.buf.subarray(this.pos,t);return this.pos=t,e},readPackedVarint:function(t,e){if(this.type!==v_.Bytes)return t.push(this.readVarint(e));var i=E_(this);for(t=t||[];this.pos127;);else if(e===v_.Bytes)this.pos=this.readVarint()+this.pos;else if(e===v_.Fixed32)this.pos+=4;else{if(e!==v_.Fixed64)throw new Error("Unimplemented type: "+e);this.pos+=8}},writeTag:function(t,e){this.writeVarint(t<<3|e)},realloc:function(t){for(var e=this.length||16;e268435455||t<0?function(t,e){var i,n;t>=0?(i=t%4294967296|0,n=t/4294967296|0):(n=~(-t/4294967296),4294967295^(i=~(-t%4294967296))?i=i+1|0:(i=0,n=n+1|0));if(t>=0x10000000000000000||t<-0x10000000000000000)throw new Error("Given varint doesn't fit into 10 bytes");e.realloc(10),function(t,e,i){i.buf[i.pos++]=127&t|128,t>>>=7,i.buf[i.pos++]=127&t|128,t>>>=7,i.buf[i.pos++]=127&t|128,t>>>=7,i.buf[i.pos++]=127&t|128,t>>>=7,i.buf[i.pos]=127&t}(i,0,e),function(t,e){var i=(7&t)<<4;if(e.buf[e.pos++]|=i|((t>>>=3)?128:0),!t)return;if(e.buf[e.pos++]=127&t|((t>>>=7)?128:0),!t)return;if(e.buf[e.pos++]=127&t|((t>>>=7)?128:0),!t)return;if(e.buf[e.pos++]=127&t|((t>>>=7)?128:0),!t)return;if(e.buf[e.pos++]=127&t|((t>>>=7)?128:0),!t)return;e.buf[e.pos++]=127&t}(n,e)}(t,this):(this.realloc(4),this.buf[this.pos++]=127&t|(t>127?128:0),t<=127||(this.buf[this.pos++]=127&(t>>>=7)|(t>127?128:0),t<=127||(this.buf[this.pos++]=127&(t>>>=7)|(t>127?128:0),t<=127||(this.buf[this.pos++]=t>>>7&127))))},writeSVarint:function(t){this.writeVarint(t<0?2*-t-1:2*t)},writeBoolean:function(t){this.writeVarint(Boolean(t))},writeString:function(t){t=String(t),this.realloc(4*t.length),this.pos++;var e=this.pos;this.pos=function(t,e,i){for(var n,r,s=0;s55295&&n<57344){if(!r){n>56319||s+1===e.length?(t[i++]=239,t[i++]=191,t[i++]=189):r=n;continue}if(n<56320){t[i++]=239,t[i++]=191,t[i++]=189,r=n;continue}n=r-55296<<10|n-56320|65536,r=null}else r&&(t[i++]=239,t[i++]=191,t[i++]=189,r=null);n<128?t[i++]=n:(n<2048?t[i++]=n>>6|192:(n<65536?t[i++]=n>>12|224:(t[i++]=n>>18|240,t[i++]=n>>12&63|128),t[i++]=n>>6&63|128),t[i++]=63&n|128)}return i}(this.buf,t,this.pos);var i=this.pos-e;i>=128&&R_(e,i,this),this.pos=e-1,this.writeVarint(i),this.pos+=i},writeFloat:function(t){this.realloc(4),x_.write(this.buf,t,this.pos,!0,23,4),this.pos+=4},writeDouble:function(t){this.realloc(8),x_.write(this.buf,t,this.pos,!0,52,8),this.pos+=8},writeBytes:function(t){var e=t.length;this.writeVarint(e),this.realloc(e);for(var i=0;i=128&&R_(i,n,this),this.pos=i-1,this.writeVarint(n),this.pos+=n},writeMessage:function(t,e,i){this.writeTag(t,v_.Bytes),this.writeRawMessage(e,i)},writePackedVarint:function(t,e){e.length&&this.writeMessage(t,b_,e)},writePackedSVarint:function(t,e){e.length&&this.writeMessage(t,P_,e)},writePackedBoolean:function(t,e){e.length&&this.writeMessage(t,F_,e)},writePackedFloat:function(t,e){e.length&&this.writeMessage(t,I_,e)},writePackedDouble:function(t,e){e.length&&this.writeMessage(t,L_,e)},writePackedFixed32:function(t,e){e.length&&this.writeMessage(t,M_,e)},writePackedSFixed32:function(t,e){e.length&&this.writeMessage(t,A_,e)},writePackedFixed64:function(t,e){e.length&&this.writeMessage(t,O_,e)},writePackedSFixed64:function(t,e){e.length&&this.writeMessage(t,N_,e)},writeBytesField:function(t,e){this.writeTag(t,v_.Bytes),this.writeBytes(e)},writeFixed32Field:function(t,e){this.writeTag(t,v_.Fixed32),this.writeFixed32(e)},writeSFixed32Field:function(t,e){this.writeTag(t,v_.Fixed32),this.writeSFixed32(e)},writeFixed64Field:function(t,e){this.writeTag(t,v_.Fixed64),this.writeFixed64(e)},writeSFixed64Field:function(t,e){this.writeTag(t,v_.Fixed64),this.writeSFixed64(e)},writeVarintField:function(t,e){this.writeTag(t,v_.Varint),this.writeVarint(e)},writeSVarintField:function(t,e){this.writeTag(t,v_.Varint),this.writeSVarint(e)},writeStringField:function(t,e){this.writeTag(t,v_.Bytes),this.writeString(e)},writeFloatField:function(t,e){this.writeTag(t,v_.Fixed32),this.writeFloat(e)},writeDoubleField:function(t,e){this.writeTag(t,v_.Fixed64),this.writeDouble(e)},writeBooleanField:function(t,e){this.writeVarintField(t,Boolean(e))}};function j_(t,e,i){if(3===t){const t={keys:[],values:[],features:[]},n=i.readVarint()+i.pos;i.readFields(B_,t,n),t.length=t.features.length,t.length&&(e[t.name]=t)}}function B_(t,e,i){if(15===t)e.version=i.readVarint();else if(1===t)e.name=i.readString();else if(5===t)e.extent=i.readVarint();else if(2===t)e.features.push(i.pos);else if(3===t)e.keys.push(i.readString());else if(4===t){let n=null;const r=i.readVarint()+i.pos;for(;i.pos>3)?i.readString():2===t?i.readFloat():3===t?i.readDouble():4===t?i.readVarint64():5===t?i.readVarint():6===t?i.readSVarint():7===t?i.readBoolean():null;e.values.push(n)}}function z_(t,e,i){if(1==t)e.id=i.readVarint();else if(2==t){const t=i.readVarint()+i.pos;for(;i.pos>3}o--,1===s||2===s?(a+=t.readSVarint(),l+=t.readSVarint(),1===s&&h>c&&(n.push(h),c=h),i.push(a,l),h+=2):7===s?h>c&&(i.push(i[c],i[c+1]),h+=2):Ft(!1,59)}h>c&&(n.push(h),c=h)}createFeature_(t,e,i){const n=e.type;if(0===n)return null;let r;const s=e.properties;let o;this.idProperty_?(o=s[this.idProperty_],delete s[this.idProperty_]):o=e.id,s[this.layerName_]=e.layer.name;const a=[],l=[];this.readRawGeometry_(t,e,a,l);const h=function(t,e){let i;1===t?i=1===e?"Point":"MultiPoint":2===t?i=1===e?"LineString":"MultiLineString":3===t&&(i="Polygon");return i}(n,l.length);if(this.featureClass_===Jm)r=new this.featureClass_(h,a,l,s,o),r.transform(i.dataProjection);else{let t;if("Polygon"==h){const e=Fr(a,l);t=e.length>1?new Km(a,"XY",e):new Ar(a,"XY",l)}else t="Point"===h?new dr(a,"XY"):"LineString"===h?new zm(a,"XY"):"MultiPoint"===h?new Wm(a,"XY"):"MultiLineString"===h?new Xm(a,"XY",l):null;r=new(0,this.featureClass_),this.geometryName_&&r.setGeometryName(this.geometryName_);const e=p_(t,!1,i);r.setGeometry(e),void 0!==o&&r.setId(o),r.setProperties(s,!0)}return r}getType(){return"arraybuffer"}readFeatures(t,e){const i=this.layers_,n=an((e=this.adaptOptions(e)).dataProjection);n.setWorldExtent(e.extent),e.dataProjection=n;const r=new y_(t),s=r.readFields(j_,{}),o=[];for(const t in s){if(i&&!i.includes(t))continue;const a=s[t],l=a?[0,0,a.extent,a.extent]:null;n.setExtent(l);for(let t=0,i=a.length;t{i.setState("ready")})).catch((t=>{this.dispatchEvent(new W_(t));this.getSource().setState("error")})),void 0===this.getBackground()&&olms.applyBackground(this,t.styleUrl,{accessToken:this.accessToken})}};var Y_=class extends Af{constructor(t){t=t||{};const e=Object.assign({},t);delete e.imageRatio,super(e),this.imageRatio_=void 0!==t.imageRatio?t.imageRatio:1}getImageRatio(){return this.imageRatio_}createRenderer(){return new Pm(this)}};var K_=class extends ks{constructor(t){super(Object.assign({},t)),this.parseResult_=Wg(t.style),this.styleVariables_=t.style.variables||{},this.hitDetectionDisabled_=!!t.disableHitDetection}createRenderer(){return new mp(this,{vertexShader:this.parseResult_.builder.getSymbolVertexShader(),fragmentShader:this.parseResult_.builder.getSymbolFragmentShader(),hitVertexShader:!this.hitDetectionDisabled_&&this.parseResult_.builder.getSymbolVertexShader(!0),hitFragmentShader:!this.hitDetectionDisabled_&&this.parseResult_.builder.getSymbolFragmentShader(!0),uniforms:this.parseResult_.uniforms,attributes:this.parseResult_.attributes})}updateStyleVariables(t){Object.assign(this.styleVariables_,t),this.changed()}};function q_(t,e){const i=`\n attribute vec2 ${og.TEXTURE_COORD};\n uniform mat4 ${sg.TILE_TRANSFORM};\n uniform float ${sg.TEXTURE_PIXEL_WIDTH};\n uniform float ${sg.TEXTURE_PIXEL_HEIGHT};\n uniform float ${sg.TEXTURE_RESOLUTION};\n uniform float ${sg.TEXTURE_ORIGIN_X};\n uniform float ${sg.TEXTURE_ORIGIN_Y};\n uniform float ${sg.DEPTH};\n\n varying vec2 v_textureCoord;\n varying vec2 v_mapCoord;\n\n void main() {\n v_textureCoord = ${og.TEXTURE_COORD};\n v_mapCoord = vec2(\n ${sg.TEXTURE_ORIGIN_X} + ${sg.TEXTURE_RESOLUTION} * ${sg.TEXTURE_PIXEL_WIDTH} * v_textureCoord[0],\n ${sg.TEXTURE_ORIGIN_Y} - ${sg.TEXTURE_RESOLUTION} * ${sg.TEXTURE_PIXEL_HEIGHT} * v_textureCoord[1]\n );\n gl_Position = ${sg.TILE_TRANSFORM} * vec4(${og.TEXTURE_COORD}, ${sg.DEPTH}, 1.0);\n }\n `,n={inFragmentShader:!0,variables:[],attributes:[],stringLiteralsMap:{},functions:{},bandCount:e},r=[];if(void 0!==t.color){const e=Ig(n,t.color,mg);r.push(`color = ${e};`)}if(void 0!==t.contrast){const e=Ig(n,t.contrast,fg);r.push(`color.rgb = clamp((${e} + 1.0) * color.rgb - (${e} / 2.0), vec3(0.0, 0.0, 0.0), vec3(1.0, 1.0, 1.0));`)}if(void 0!==t.exposure){const e=Ig(n,t.exposure,fg);r.push(`color.rgb = clamp((${e} + 1.0) * color.rgb, vec3(0.0, 0.0, 0.0), vec3(1.0, 1.0, 1.0));`)}if(void 0!==t.saturation){const e=Ig(n,t.saturation,fg);r.push(`\n float saturation = ${e} + 1.0;\n float sr = (1.0 - saturation) * 0.2126;\n float sg = (1.0 - saturation) * 0.7152;\n float sb = (1.0 - saturation) * 0.0722;\n mat3 saturationMatrix = mat3(\n sr + saturation, sr, sr,\n sg, sg + saturation, sg,\n sb, sb, sb + saturation\n );\n color.rgb = clamp(saturationMatrix * color.rgb, vec3(0.0, 0.0, 0.0), vec3(1.0, 1.0, 1.0));\n `)}if(void 0!==t.gamma){const e=Ig(n,t.gamma,fg);r.push(`color.rgb = pow(color.rgb, vec3(1.0 / ${e}));`)}if(void 0!==t.brightness){const e=Ig(n,t.brightness,fg);r.push(`color.rgb = clamp(color.rgb + ${e}, vec3(0.0, 0.0, 0.0), vec3(1.0, 1.0, 1.0));`)}const s={},o=n.variables.length;if(o>1&&!t.variables)throw new Error(`Missing variables in style (expected ${n.variables})`);for(let e=0;e ${sg.RENDER_EXTENT}[2] ||\n v_mapCoord[1] > ${sg.RENDER_EXTENT}[3]\n ) {\n discard;\n }\n\n vec4 color = texture2D(${sg.TILE_TEXTURE_ARRAY}[0], v_textureCoord);\n\n ${r.join("\n")}\n\n if (color.a == 0.0) {\n discard;\n }\n\n gl_FragColor = color;\n gl_FragColor.rgb *= gl_FragColor.a;\n gl_FragColor *= ${sg.TRANSITION_ALPHA};\n }`,uniforms:s,paletteTextures:n.paletteTextures}}class H_ extends fu{constructor(t){const e=(t=t?Object.assign({},t):{}).style||{};delete t.style;const i=t.cacheSize;delete t.cacheSize,super(t),this.sources_=t.sources,this.renderedSource_=null,this.renderedResolution_=NaN,this.style_=e,this.cacheSize_=i,this.styleVariables_=this.style_.variables||{},this.addChangeListener(Is,this.handleSourceUpdate_)}getSources(t,e){const i=this.getSource();return this.sources_?"function"==typeof this.sources_?this.sources_(t,e):this.sources_:i?[i]:[]}getRenderSource(){return this.renderedSource_||this.getSource()}getSourceState(){const t=this.getRenderSource();return t?t.getState():"undefined"}handleSourceUpdate_(){this.hasRenderer()&&this.getRenderer().clearCache(),this.getSource()&&this.setStyle(this.style_)}getSourceBandCount_(){const t=Number.MAX_SAFE_INTEGER,e=this.getSources([-t,-t,t,t],t);return e&&e.length&&"bandCount"in e[0]?e[0].bandCount:4}createRenderer(){const t=q_(this.style_,this.getSourceBandCount_());return new gg(this,{vertexShader:t.vertexShader,fragmentShader:t.fragmentShader,uniforms:t.uniforms,cacheSize:this.cacheSize_,paletteTextures:t.paletteTextures})}renderSources(t,e){const i=this.getRenderer();let n;for(let r=0,s=e.length;r{"ready"==e.getState()&&(e.removeEventListener("change",t),this.changed())};e.addEventListener("change",t)}r=r&&"ready"==i}const s=this.renderSources(t,n);if(this.getRenderer().renderComplete&&r)return this.renderedResolution_=i.resolution,s;if(this.renderedResolution_>.5*i.resolution){const e=this.getSources(t.extent,this.renderedResolution_).filter((t=>!n.includes(t)));if(e.length>0)return this.renderSources(t,e)}return s}setStyle(t){this.styleVariables_=t.variables||{},this.style_=t;const e=q_(this.style_,this.getSourceBandCount_());this.getRenderer().reset({vertexShader:e.vertexShader,fragmentShader:e.fragmentShader,uniforms:e.uniforms,paletteTextures:e.paletteTextures}),this.changed()}updateStyleVariables(t){Object.assign(this.styleVariables_,t),this.changed()}}H_.prototype.dispose;var $_=H_;const J_="addfeatures";class Q_ extends r{constructor(t,e,i,n){super(t),this.features=i,this.file=e,this.projection=n}}var ty=class extends Sa{constructor(t){t=t||{},super({handleEvent:f}),this.on,this.once,this.un,this.readAsBuffer_=!1,this.formats_=[];const e=t.formatConstructors?t.formatConstructors:[];for(let t=0,i=e.length;t0){this.source_&&(this.source_.clear(),this.source_.addFeatures(l)),this.dispatchEvent(new Q_(J_,t,l,s));break}}}registerListeners_(){const t=this.getMap();if(t){const e=this.target?this.target:t.getViewport();this.dropListenKeys_=[N(e,I,this.handleDrop,this),N(e,b,this.handleStop,this),N(e,P,this.handleStop,this),N(e,I,this.handleStop,this)]}}setActive(t){!this.getActive()&&t&&this.registerListeners_(),this.getActive()&&!t&&this.unregisterListeners_(),super.setActive(t)}setMap(t){this.unregisterListeners_(),super.setMap(t),this.getActive()&&this.registerListeners_()}tryReadFeatures_(t,e,i){try{return t.readFeatures(e,i)}catch(t){return null}}unregisterListeners_(){this.dropListenKeys_&&(this.dropListenKeys_.forEach(G),this.dropListenKeys_=null)}handleDrop(t){const e=t.dataTransfer.files;for(let t=0,i=e.length;t1?1:-1;return e.endInteraction(this.duration_,i),this.lastScaleDelta_=0,!1}handleDownEvent(t){return!!Ga(t)&&(!!this.condition_(t)&&(t.map.getView().beginInteraction(),this.lastAngle_=void 0,this.lastMagnitude_=void 0,!0))}};const iy="drawstart",ny="drawend",ry="drawabort";class sy extends r{constructor(t,e){super(t),this.feature=e}}function oy(t,e){return xi(t[0],t[1],e[0],e[1])}function ay(t,e){const i=t.length;return e<0?t[e+i]:e>=i?t[e-i]:t[e]}function ly(t,e,i){let n,r;eo){return oy(fy(t,n),fy(t,r))}let a=0;if(n=i?n-=i:n<0&&(n+=i);let s=n+1;s>=i&&(s-=i);const o=t[n],a=o[0],l=o[1],h=t[s];return[a+(h[0]-a)*r,l+(h[1]-l)*r]}function py(){const t=gf();return function(e,i){return t[e.getGeometry().getType()]}}var my=class extends Ea{constructor(t){const e=t;e.stopDown||(e.stopDown=p),super(e),this.on,this.once,this.un,this.shouldHandle_=!1,this.downPx_=null,this.downTimeout_,this.lastDragTime_,this.pointerType_,this.freehand_=!1,this.source_=t.source?t.source:null,this.features_=t.features?t.features:null,this.snapTolerance_=t.snapTolerance?t.snapTolerance:12,this.type_=t.type,this.mode_=function(t){switch(t){case"Point":case"MultiPoint":return"Point";case"LineString":case"MultiLineString":return"LineString";case"Polygon":case"MultiPolygon":return"Polygon";case"Circle":return"Circle";default:throw new Error("Invalid type: "+t)}}(this.type_),this.stopClick_=!!t.stopClick,this.minPoints_=t.minPoints?t.minPoints:"Polygon"===this.mode_?3:2,this.maxPoints_="Circle"===this.mode_?2:t.maxPoints?t.maxPoints:1/0,this.finishCondition_=t.finishCondition?t.finishCondition:f,this.geometryLayout_=t.geometryLayout?t.geometryLayout:"XY";let i=t.geometryFunction;if(!i){const t=this.mode_;if("Circle"===t)i=function(t,e,i){const n=e||new Am([NaN,NaN]),r=Tn(t[0],i),s=ji(r,Tn(t[t.length-1],i));n.setCenterAndRadius(r,Math.sqrt(s),this.geometryLayout_);const o=Sn();return o&&n.transform(i,o),n};else{let e;"Point"===t?e=dr:"LineString"===t?e=zm:"Polygon"===t&&(e=Ar),i=function(i,n,r){return n?"Polygon"===t?i[0].length?n.setCoordinates([i[0].concat([i[0][0]])],this.geometryLayout_):n.setCoordinates([],this.geometryLayout_):n.setCoordinates(i,this.geometryLayout_):n=new e(i,this.geometryLayout_),n}}}this.geometryFunction_=i,this.dragVertexDelay_=void 0!==t.dragVertexDelay?t.dragVertexDelay:500,this.finishCoordinate_=null,this.sketchFeature_=null,this.sketchPoint_=null,this.sketchCoords_=null,this.sketchLine_=null,this.sketchLineCoords_=null,this.squaredClickTolerance_=t.clickTolerance?t.clickTolerance*t.clickTolerance:36,this.overlay_=new i_({source:new uc({useSpatialIndex:!1,wrapX:!!t.wrapX&&t.wrapX}),style:t.style?t.style:py(),updateWhileInteracting:!0}),this.geometryName_=t.geometryName,this.condition_=t.condition?t.condition:Oa,this.freehandCondition_,t.freehand?this.freehandCondition_=La:this.freehandCondition_=t.freehandCondition?t.freehandCondition:Na,this.traceCondition_,this.setTrace(t.trace||!1),this.traceState_={active:!1},this.traceSource_=t.traceSource||t.source||null,this.addChangeListener(ya,this.updateState_)}setTrace(t){let e;e=t?!0===t?La:t:Ma,this.traceCondition_=e}setMap(t){super.setMap(t),this.updateState_()}getOverlay(){return this.overlay_}handleEvent(t){t.originalEvent.type===E&&t.originalEvent.preventDefault(),this.freehand_="Point"!==this.mode_&&this.freehandCondition_(t);let e=t.type===Ro.POINTERMOVE,i=!0;if(!this.freehand_&&this.lastDragTime_&&t.type===Ro.POINTERDRAG){Date.now()-this.lastDragTime_>=this.dragVertexDelay_?(this.downPx_=t.pixel,this.shouldHandle_=!this.freehand_,e=!0):this.lastDragTime_=void 0,this.shouldHandle_&&void 0!==this.downTimeout_&&(clearTimeout(this.downTimeout_),this.downTimeout_=void 0)}return this.freehand_&&t.type===Ro.POINTERDRAG&&null!==this.sketchFeature_?(this.addToDrawing_(t.coordinate),i=!1):this.freehand_&&t.type===Ro.POINTERDOWN?i=!1:e&&this.getPointerCount()<2?(i=t.type===Ro.POINTERMOVE,i&&this.freehand_?(this.handlePointerMove_(t),this.shouldHandle_&&t.originalEvent.preventDefault()):("mouse"===t.originalEvent.pointerType||t.type===Ro.POINTERDRAG&&void 0===this.downTimeout_)&&this.handlePointerMove_(t)):t.type===Ro.DBLCLICK&&(i=!1),super.handleEvent(t)&&i}handleDownEvent(t){return this.shouldHandle_=!this.freehand_,this.freehand_?(this.downPx_=t.pixel,this.finishCoordinate_||this.startDrawing_(t.coordinate),!0):this.condition_(t)?(this.lastDragTime_=Date.now(),this.downTimeout_=setTimeout((()=>{this.handlePointerMove_(new Co(Ro.POINTERMOVE,t.map,t.originalEvent,!1,t.frameState))}),this.dragVertexDelay_),this.downPx_=t.pixel,!0):(this.lastDragTime_=void 0,!1)}deactivateTrace_(){this.traceState_={active:!1}}toggleTraceState_(t){if(!this.traceSource_||!this.traceCondition_(t))return;if(this.traceState_.active)return void this.deactivateTrace_();const e=this.getMap(),i=ne([e.getCoordinateFromPixel([t.pixel[0]-this.snapTolerance_,t.pixel[1]+this.snapTolerance_]),e.getCoordinateFromPixel([t.pixel[0]+this.snapTolerance_,t.pixel[1]-this.snapTolerance_])]),n=this.traceSource_.getFeaturesInExtent(i);if(0===n.length)return;const r=function(t,e){const i=[];for(let n=0;nt.endIndex||!i&&et.endIndex)&&this.removeTracedCoordinates_(e,t.endIndex):(this.removeTracedCoordinates_(t.startIndex,t.endIndex),this.addTracedCoordinates_(t,t.startIndex,e))}removeTracedCoordinates_(t,e){if(t===e)return;let i=0;if(t0&&this.removeLastPoints_(i)}addTracedCoordinates_(t,e,i){if(e===i)return;const n=[];if(e=s;--e)n.push(ay(t.coordinates,e))}n.length&&this.appendCoordinates(n)}updateTrace_(t){const e=this.traceState_;if(!e.active)return;if(-1===e.targetIndex&&Bi(e.startPx,t.pixel)i.startIndex?hi.startIndex&&(h-=n.length)),l=h,a=t)}const h=e.targets[a];let c=h.ring;if(e.targetIndex===a&&c){const t=fy(h.coordinates,l);Bi(i.getPixelFromCoordinate(t),e.startPx)>n&&(c=!1)}if(c){const t=h.coordinates,e=t.length,i=h.startIndex,n=l;if(ithis.squaredClickTolerance_:s<=this.squaredClickTolerance_,!this.shouldHandle_)return}this.finishCoordinate_?(this.updateTrace_(t),this.modifyDrawing_(t.coordinate)):this.createOrUpdateSketchPoint_(t.coordinate.slice())}atFinish_(t,e){let i=!1;if(this.sketchFeature_){let n=!1,r=[this.finishCoordinate_];const s=this.mode_;if("Point"===s)i=!0;else if("Circle"===s)i=2===this.sketchCoords_.length;else if("LineString"===s)n=!e&&this.sketchCoords_.length>this.minPoints_;else if("Polygon"===s){const t=this.sketchCoords_;n=t[0].length>this.minPoints_,r=[t[0][0],t[0][t[0].length-2]],r=e?[t[0][0]]:[t[0][0],t[0][t[0].length-2]]}if(n){const e=this.getMap();for(let n=0,s=r.length;n=this.maxPoints_&&(this.freehand_?r.pop():n=!0),r.push(t.slice()),this.geometryFunction_(r,e,i)):"Polygon"===s&&(r=this.sketchCoords_[0],r.length>=this.maxPoints_&&(this.freehand_?r.pop():n=!0),r.push(t.slice()),n&&(this.finishCoordinate_=r[0]),this.geometryFunction_(this.sketchCoords_,e,i)),this.createOrUpdateSketchPoint_(t.slice()),this.updateSketchFeatures_(),n&&this.finishDrawing()}removeLastPoints_(t){if(!this.sketchFeature_)return;const e=this.sketchFeature_.getGeometry(),i=this.getMap().getView().getProjection(),n=this.mode_;for(let r=0;r=2){this.finishCoordinate_=t[t.length-2].slice();const e=this.finishCoordinate_.slice();t[t.length-1]=e,this.createOrUpdateSketchPoint_(e)}this.geometryFunction_(t,e,i),"Polygon"===e.getType()&&this.sketchLine_&&this.createOrUpdateCustomSketchLine_(e)}else if("Polygon"===n){t=this.sketchCoords_[0],t.splice(-2,1);const n=this.sketchLine_.getGeometry();if(t.length>=2){const e=t[t.length-2].slice();t[t.length-1]=e,this.createOrUpdateSketchPoint_(e)}n.setCoordinates(t),this.geometryFunction_(this.sketchCoords_,e,i)}if(1===t.length){this.abortDrawing();break}}this.updateSketchFeatures_()}removeLastPoint(){this.removeLastPoints_(1)}finishDrawing(){const t=this.abortDrawing_();if(!t)return;let e=this.sketchCoords_;const i=t.getGeometry(),n=this.getMap().getView().getProjection();"LineString"===this.mode_?(e.pop(),this.geometryFunction_(e,i,n)):"Polygon"===this.mode_&&(e[0].pop(),this.geometryFunction_(e,i,n),e=i.getCoordinates()),"MultiPoint"===this.type_?t.setGeometry(new Wm([e])):"MultiLineString"===this.type_?t.setGeometry(new Xm([e])):"MultiPolygon"===this.type_&&t.setGeometry(new Km([e])),this.dispatchEvent(new sy(ny,t)),this.features_&&this.features_.push(t),this.source_&&this.source_.addFeature(t)}abortDrawing_(){this.finishCoordinate_=null;const t=this.sketchFeature_;return this.sketchFeature_=null,this.sketchPoint_=null,this.sketchLine_=null,this.overlay_.getSource().clear(!0),this.deactivateTrace_(),t}abortDrawing(){const t=this.abortDrawing_();t&&this.dispatchEvent(new sy(ry,t))}appendCoordinates(t){const e=this.mode_,i=!this.sketchFeature_;let n;if(i&&this.startDrawing_(t[0]),"LineString"===e||"Circle"===e)n=this.sketchCoords_;else{if("Polygon"!==e)return;n=this.sketchCoords_&&this.sketchCoords_.length?this.sketchCoords_[0]:[]}i&&n.shift(),n.pop();for(let e=0;er?o[1]:o[0]),a}}return null}handlePointerMove_(t){const e=t.pixel,i=t.map;let n=this.snapToVertex_(e,i);n||(n=i.getCoordinateFromPixelInternal(e)),this.createOrUpdatePointerFeature_(n)}createOrUpdateExtentFeature_(t){let e=this.extentFeature_;return e?t?e.setGeometry(Nr(t)):e.setGeometry(void 0):(e=new Ot(t?Nr(t):{}),this.extentFeature_=e,this.extentOverlay_.getSource().addFeature(e)),e}createOrUpdatePointerFeature_(t){let e=this.vertexFeature_;if(e){e.getGeometry().setCoordinates(t)}else e=new Ot(new dr(t)),this.vertexFeature_=e,this.vertexOverlay_.getSource().addFeature(e);return e}handleEvent(t){return!t.originalEvent||!this.condition_(t)||(t.type!=Ro.POINTERMOVE||this.handlingDownUpSequence||this.handlePointerMove_(t),super.handleEvent(t),!1)}handleDownEvent(t){const e=t.pixel,i=t.map,n=this.getExtentInternal();let r=this.snapToVertex_(e,i);const s=function(t){let e=null,i=null;return t[0]==n[0]?e=n[2]:t[0]==n[2]&&(e=n[0]),t[1]==n[1]?i=n[3]:t[1]==n[3]&&(i=n[1]),null!==e&&null!==i?[e,i]:null};if(r&&n){const t=r[0]==n[0]||r[0]==n[2]?r[0]:null,e=r[1]==n[1]||r[1]==n[3]?r[1]:null;null!==t&&null!==e?this.pointerHandler_=Sy(s(r)):null!==t?this.pointerHandler_=wy(s([t,n[1]]),s([t,n[3]])):null!==e&&(this.pointerHandler_=wy(s([n[0],e]),s([n[2],e])))}else r=i.getCoordinateFromPixelInternal(e),this.setExtent([r[0],r[1],r[0],r[1]]),this.pointerHandler_=Sy(r);return!0}handleDragEvent(t){if(this.pointerHandler_){const e=t.coordinate;this.setExtent(this.pointerHandler_(e)),this.createOrUpdatePointerFeature_(e)}}handleUpEvent(t){this.pointerHandler_=null;const e=this.getExtentInternal();return e&&0!==Ce(e)||this.setExtent(null),!1}setMap(t){this.extentOverlay_.setMap(t),this.vertexOverlay_.setMap(t),super.setMap(t)}getExtent(){return En(this.getExtentInternal(),this.getMap().getView().getProjection())}getExtentInternal(){return this.extent_}setExtent(t){this.extent_=t||null,this.createOrUpdateExtentFeature_(t),this.dispatchEvent(new yy(this.extent_))}};function Ey(t){return parseFloat(t)}function Cy(t){return function(t){return Ci(t,5)}(t).toString()}function Ry(t,e){return!isNaN(t)&&t!==Ey(Cy(e))}var by=class extends Sa{constructor(t){let e;super(),e=!0===(t=Object.assign({animate:!0,params:["x","y","z","r","l"],replace:!1,prefix:""},t||{})).animate?{duration:250}:t.animate?t.animate:null,this.animationOptions_=e,this.params_=t.params.reduce(((t,e)=>(t[e]=!0,t)),{}),this.replace_=t.replace,this.prefix_=t.prefix,this.listenerKeys_=[],this.initial_=!0,this.updateState_=this.updateState_.bind(this)}getParamName_(t){return this.prefix_?this.prefix_+t:t}get_(t,e){return t.get(this.getParamName_(e))}set_(t,e,i){e in this.params_&&t.set(this.getParamName_(e),i)}delete_(t,e){e in this.params_&&t.delete(this.getParamName_(e))}setMap(t){const e=this.getMap();super.setMap(t),t!==e&&(e&&this.unregisterListeners_(e),t&&(this.initial_=!0,this.updateState_(),this.registerListeners_(t)))}registerListeners_(t){this.listenerKeys_.push(N(t,Oo,this.updateUrl_,this),N(t.getLayerGroup(),w,this.updateUrl_,this),N(t,"change:layergroup",this.handleChangeLayerGroup_,this)),this.replace_||addEventListener("popstate",this.updateState_)}unregisterListeners_(t){for(let t=0,e=this.listenerKeys_.length;t=0;--t){const n=i[t];for(let t=this.dragSegments_.length-1;t>=0;--t)this.dragSegments_[t][0]===n&&this.dragSegments_.splice(t,1);e.remove(n)}}setActive(t){this.vertexFeature_&&!t&&(this.overlay_.getSource().removeFeature(this.vertexFeature_),this.vertexFeature_=null),super.setActive(t)}setMap(t){this.overlay_.setMap(t),super.setMap(t)}getOverlay(){return this.overlay_}handleSourceAdd_(t){t.feature&&this.features_.push(t.feature)}handleSourceRemove_(t){t.feature&&this.features_.remove(t.feature)}handleFeatureAdd_(t){this.addFeature_(t.element)}handleFeatureChange_(t){if(!this.changingFeature_){const e=t.target;this.removeFeature_(e),this.addFeature_(e)}}handleFeatureRemove_(t){this.removeFeature_(t.element)}writePointGeometry_(t,e){const i=e.getCoordinates(),n={feature:t,geometry:e,segment:[i,i]};this.rBush_.insert(e.getExtent(),n)}writeMultiPointGeometry_(t,e){const i=e.getCoordinates();for(let n=0,r=i.length;n=0;--t)this.insertVertex_(r[t],s)}return!!this.vertexFeature_}handleUpEvent(t){for(let e=this.dragSegments_.length-1;e>=0;--e){const i=this.dragSegments_[e][0],n=i.geometry;if("Circle"===n.getType()){const e=n.getCenter(),r=i.featureSegments[0],s=i.featureSegments[1];r.segment[0]=e,r.segment[1]=e,s.segment[0]=e,s.segment[1]=e,this.rBush_.update(fe(e),r);let o=n;const a=Sn();if(a){const e=t.map.getView().getProjection();o=o.clone().transform(a,e),o=Dr(o).transform(e,a)}this.rBush_.update(o.getExtent(),s)}else this.rBush_.update(ne(i.segment),i)}return this.featuresBeingModified_&&(this.dispatchEvent(new My(Fy,this.featuresBeingModified_,t)),this.featuresBeingModified_=null),!1}handlePointerMove_(t){this.lastPixel_=t.pixel,this.handlePointerAtPixel_(t.pixel,t.map,t.coordinate)}handlePointerAtPixel_(t,e,i){const n=i||e.getCoordinateFromPixel(t),r=e.getView().getProjection(),s=function(t,e){return Oy(n,t,r)-Oy(n,e,r)};let o,a;if(this.hitDetection_){const i="object"==typeof this.hitDetection_?t=>t===this.hitDetection_:void 0;e.forEachFeatureAtPixel(t,((t,e,i)=>{const n=i||t.getGeometry();if("Point"===n.getType()&&t instanceof Ot&&this.features_.getArray().includes(t)){a=n;const e=a.getFlatCoordinates().slice(0,2);o=[{feature:t,geometry:a,segment:[e,e]}]}return!0}),{layerFilter:i})}if(!o){const t=En(re(Cn(fe(n,Py),r),e.getView().getResolution()*this.pixelTolerance_,Py),r);o=this.rBush_.getInExtent(t)}if(o&&o.length>0){const i=o.sort(s)[0],l=i.segment;let h=Ny(n,i,r);const c=e.getPixelFromCoordinate(h);let u=Bi(t,c);if(a||u<=this.pixelTolerance_){const t={};if(t[X(l)]=!0,this.snapToPointer_||(this.delta_[0]=h[0]-n[0],this.delta_[1]=h[1]-n[1]),"Circle"===i.geometry.getType()&&1===i.index)this.snappedToVertex_=!0,this.createOrUpdateVertexFeature_(h,[i.feature],[i.geometry]);else{const n=e.getPixelFromCoordinate(l[0]),r=e.getPixelFromCoordinate(l[1]),s=ji(c,n),a=ji(c,r);u=Math.sqrt(Math.min(s,a)),this.snappedToVertex_=u<=this.pixelTolerance_,this.snappedToVertex_&&(h=s>a?l[1]:l[0]),this.createOrUpdateVertexFeature_(h,[i.feature],[i.geometry]);const d={};d[X(i.geometry)]=!0;for(let e=1,i=o.length;e=0;--o)r=t[o],u=r[0],d=X(u.feature),u.depth&&(d+="-"+u.depth.join("-")),d in e||(e[d]={}),0===r[1]?(e[d].right=u,e[d].index=u.index):1==r[1]&&(e[d].left=u,e[d].index=u.index+1);for(d in e){switch(c=e[d].right,l=e[d].left,a=e[d].index,h=a-1,u=void 0!==l?l:c,h<0&&(h=0),s=u.geometry,n=s.getCoordinates(),i=n,g=!1,s.getType()){case"MultiLineString":n[u.depth[0]].length>2&&(n[u.depth[0]].splice(a,1),g=!0);break;case"LineString":n.length>2&&(n.splice(a,1),g=!0);break;case"MultiPolygon":i=i[u.depth[1]];case"Polygon":i=i[u.depth[0]],i.length>4&&(a==i.length-1&&(a=0),i.splice(a,1),g=!0,0===a&&(i.pop(),i.push(i[0]),h=i.length-1))}if(g){this.setGeometryCoordinates_(s,n);const e=[];if(void 0!==l&&(this.rBush_.remove(l),e.push(l.segment[0])),void 0!==c&&(this.rBush_.remove(c),e.push(c.segment[1])),void 0!==l&&void 0!==c){const t={depth:u.depth,feature:u.feature,geometry:u.geometry,index:h,segment:e};this.rBush_.insert(ne(t.segment),t)}this.updateSegmentIndices_(s,a,u.depth,-1),this.vertexFeature_&&(this.overlay_.getSource().removeFeature(this.vertexFeature_),this.vertexFeature_=null),t.length=0}}return g}setGeometryCoordinates_(t,e){this.changingFeature_=!0,t.setCoordinates(e),this.changingFeature_=!1}updateSegmentIndices_(t,e,i,n){this.rBush_.forEachInExtent(t.getExtent(),(function(r){r.geometry===t&&(void 0===i||void 0===r.depth||d(r.depth,i))&&r.index>e&&(r.index+=n)}))}};const ky="select";class jy extends r{constructor(t,e,i,n){super(t),this.selected=e,this.deselected=i,this.mapBrowserEvent=n}}const By={};class zy extends Sa{constructor(t){let e;if(super(),this.on,this.once,this.un,t=t||{},this.boundAddFeature_=this.addFeature_.bind(this),this.boundRemoveFeature_=this.removeFeature_.bind(this),this.condition_=t.condition?t.condition:Aa,this.addCondition_=t.addCondition?t.addCondition:Ma,this.removeCondition_=t.removeCondition?t.removeCondition:Ma,this.toggleCondition_=t.toggleCondition?t.toggleCondition:Na,this.multi_=!!t.multi&&t.multi,this.filter_=t.filter?t.filter:f,this.hitTolerance_=t.hitTolerance?t.hitTolerance:0,this.style_=void 0!==t.style?t.style:function(){const t=gf();return u(t.Polygon,t.LineString),u(t.GeometryCollection,t.LineString),function(e){return e.getGeometry()?t[e.getGeometry().getType()]:null}}(),this.features_=t.features||new H,t.layers)if("function"==typeof t.layers)e=t.layers;else{const i=t.layers;e=function(t){return i.includes(t)}}else e=f;this.layerFilter_=e,this.featureLayerAssociation_={}}addFeatureLayerAssociation_(t,e){this.featureLayerAssociation_[X(t)]=e}getFeatures(){return this.features_}getHitTolerance(){return this.hitTolerance_}getLayer(t){return this.featureLayerAssociation_[X(t)]}setHitTolerance(t){this.hitTolerance_=t}setMap(t){this.getMap()&&this.style_&&this.features_.forEach(this.restorePreviousStyle_.bind(this)),super.setMap(t),t?(this.features_.addEventListener(Z,this.boundAddFeature_),this.features_.addEventListener(Y,this.boundRemoveFeature_),this.style_&&this.features_.forEach(this.applySelectedStyle_.bind(this))):(this.features_.removeEventListener(Z,this.boundAddFeature_),this.features_.removeEventListener(Y,this.boundRemoveFeature_))}addFeature_(t){const e=t.element;if(this.style_&&this.applySelectedStyle_(e),!this.getLayer(e)){const t=this.getMap().getAllLayers().find((function(t){if(t instanceof i_&&t.getSource()&&t.getSource().hasFeature(e))return t}));t&&this.addFeatureLayerAssociation_(e,t)}}removeFeature_(t){this.style_&&this.restorePreviousStyle_(t.element)}getStyle(){return this.style_}applySelectedStyle_(t){const e=X(t);e in By||(By[e]=t.getStyle()),t.setStyle(this.style_)}restorePreviousStyle_(t){const e=this.getMap().getInteractions().getArray();for(let i=e.length-1;i>=0;--i){const n=e[i];if(n!==this&&n instanceof zy&&n.getStyle()&&-1!==n.getFeatures().getArray().lastIndexOf(t))return void t.setStyle(n.getStyle())}const i=X(t);t.setStyle(By[i]),delete By[i]}removeFeatureLayerAssociation_(t){delete this.featureLayerAssociation_[X(t)]}handleEvent(t){if(!this.condition_(t))return!0;const e=this.addCondition_(t),i=this.removeCondition_(t),n=this.toggleCondition_(t),r=!e&&!i&&!n,s=t.map,o=this.getFeatures(),a=[],l=[];if(r){x(this.featureLayerAssociation_),s.forEachFeatureAtPixel(t.pixel,((t,e)=>{if(t instanceof Ot&&this.filter_(t,e))return this.addFeatureLayerAssociation_(t,e),l.push(t),!this.multi_}),{layerFilter:this.layerFilter_,hitTolerance:this.hitTolerance_});for(let t=o.getLength()-1;t>=0;--t){const e=o.item(t),i=l.indexOf(e);i>-1?l.splice(i,1):(o.remove(e),a.push(e))}0!==l.length&&o.extend(l)}else{s.forEachFeatureAtPixel(t.pixel,((t,r)=>{if(t instanceof Ot&&this.filter_(t,r))return!e&&!n||o.getArray().includes(t)?(i||n)&&o.getArray().includes(t)&&(a.push(t),this.removeFeatureLayerAssociation_(t)):(this.addFeatureLayerAssociation_(t,r),l.push(t)),!this.multi_}),{layerFilter:this.layerFilter_,hitTolerance:this.hitTolerance_});for(let t=a.length-1;t>=0;--t)o.remove(a[t]);o.extend(l)}return(l.length>0||a.length>0)&&this.dispatchEvent(new jy(ky,l,a,t)),!0}}var Uy=zy;function Xy(t){return t.feature?t.feature:t.element?t.element:void 0}const Vy=[];var Wy=class extends Ea{constructor(t){const e=t=t||{};e.handleDownEvent||(e.handleDownEvent=f),e.stopDown||(e.stopDown=p),super(e),this.source_=t.source?t.source:null,this.vertex_=void 0===t.vertex||t.vertex,this.edge_=void 0===t.edge||t.edge,this.features_=t.features?t.features:null,this.featuresListenerKeys_=[],this.featureChangeListenerKeys_={},this.indexedFeaturesExtents_={},this.pendingFeatures_={},this.pixelTolerance_=void 0!==t.pixelTolerance?t.pixelTolerance:10,this.rBush_=new ic,this.GEOMETRY_SEGMENTERS_={Point:this.segmentPointGeometry_.bind(this),LineString:this.segmentLineStringGeometry_.bind(this),LinearRing:this.segmentLineStringGeometry_.bind(this),Polygon:this.segmentPolygonGeometry_.bind(this),MultiPoint:this.segmentMultiPointGeometry_.bind(this),MultiLineString:this.segmentMultiLineStringGeometry_.bind(this),MultiPolygon:this.segmentMultiPolygonGeometry_.bind(this),GeometryCollection:this.segmentGeometryCollectionGeometry_.bind(this),Circle:this.segmentCircleGeometry_.bind(this)}}addFeature(t,e){e=void 0===e||e;const i=X(t),n=t.getGeometry();if(n){const e=this.GEOMETRY_SEGMENTERS_[n.getType()];if(e){this.indexedFeaturesExtents_[i]=n.getExtent([1/0,1/0,-1/0,-1/0]);const r=[];if(e(r,n),1===r.length)this.rBush_.insert(ne(r[0]),{feature:t,segment:r[0]});else if(r.length>1){const e=r.map((t=>ne(t))),i=r.map((e=>({feature:t,segment:e})));this.rBush_.load(e,i)}}}e&&(this.featureChangeListenerKeys_[i]=N(t,w,this.handleFeatureChange_,this))}forEachFeatureAdd_(t){this.addFeature(t)}forEachFeatureRemove_(t){this.removeFeature(t)}getFeatures_(){let t;return this.features_?t=this.features_:this.source_&&(t=this.source_.getFeatures()),t}handleEvent(t){const e=this.snapTo(t.pixel,t.coordinate,t.map);return e&&(t.coordinate=e.vertex.slice(0,2),t.pixel=e.vertexPixel),super.handleEvent(t)}handleFeatureAdd_(t){const e=Xy(t);this.addFeature(e)}handleFeatureRemove_(t){const e=Xy(t);this.removeFeature(e)}handleFeatureChange_(t){const e=t.target;if(this.handlingDownUpSequence){const t=X(e);t in this.pendingFeatures_||(this.pendingFeatures_[t]=e)}else this.updateFeature_(e)}handleUpEvent(t){const e=Object.values(this.pendingFeatures_);return e.length&&(e.forEach(this.updateFeature_.bind(this)),this.pendingFeatures_={}),!1}removeFeature(t,e){const i=void 0===e||e,n=X(t),r=this.indexedFeaturesExtents_[n];if(r){const e=this.rBush_,i=[];e.forEachInExtent(r,(function(e){t===e.feature&&i.push(e)}));for(let t=i.length-1;t>=0;--t)e.remove(i[t])}i&&(G(this.featureChangeListenerKeys_[n]),delete this.featureChangeListenerKeys_[n])}setMap(t){const e=this.getMap(),i=this.featuresListenerKeys_,n=this.getFeatures_();e&&(i.forEach(G),i.length=0,n.forEach(this.forEachFeatureRemove_.bind(this))),super.setMap(t),t&&(this.features_?i.push(N(this.features_,Z,this.handleFeatureAdd_,this),N(this.features_,Y,this.handleFeatureRemove_,this)):this.source_&&i.push(N(this.source_,nc,this.handleFeatureAdd_,this),N(this.source_,oc,this.handleFeatureRemove_,this)),n.forEach(this.forEachFeatureAdd_.bind(this)))}snapTo(t,e,i){const n=i.getView().getProjection(),r=Tn(e,n),s=En(re(ne([r]),i.getView().getResolution()*this.pixelTolerance_),n),o=this.rBush_.getInExtent(s),a=o.length;if(0===a)return null;let l,h=1/0;const c=this.pixelTolerance_*this.pixelTolerance_,u=()=>{if(l){const e=i.getPixelFromCoordinate(l);if(ji(t,e)<=c)return{vertex:l,vertexPixel:[Math.round(e[0]),Math.round(e[1])]}}return null};if(this.vertex_){for(let t=0;t{const e=Tn(t,n),i=ji(r,e);i{t.push([e])}))}segmentMultiPolygonGeometry_(t,e){const i=e.getCoordinates();for(let e=0,n=i.length;e{if(t instanceof Ot&&this.filter_(t,e)&&(!this.features_||this.features_.getArray().includes(t)))return t}),{layerFilter:this.layerFilter_,hitTolerance:this.hitTolerance_})}getHitTolerance(){return this.hitTolerance_}setHitTolerance(t){this.hitTolerance_=t}setMap(t){const e=this.getMap();super.setMap(t),this.updateState_(e)}handleActiveChanged_(){this.updateState_(null)}updateState_(t){let e=this.getMap();const i=this.getActive();if((!e||!i)&&(e=e||t,e)){e.getViewport().classList.remove("ol-grab","ol-grabbing")}}};function $y(t,e,i,n,r,s){void 0!==r?s=void 0!==s?s:0:(r=[],s=0);let o=e;for(;o=0;e--)r.push(n[t][e]);return{hasZ:i.hasZ,hasM:i.hasM,rings:r}}};function ix(t,e){if(!t)return null;let i;if("number"==typeof t.x&&"number"==typeof t.y)i="Point";else if(t.points)i="MultiPoint";else if(t.paths){i=1===t.paths.length?"LineString":"MultiLineString"}else if(t.rings){const e=t,n=nx(e),r=function(t,e){const i=[],n=[],r=[];let s,o;for(s=0,o=t.length;s=0;s--){const i=n[s][0];if(le(new cr(i).getExtent(),new cr(t).getExtent())){n[s].push(t),e=!0;break}}e||n.push([t.reverse()])}return n}(e.rings,n);1===r.length?(i="Polygon",t=Object.assign({},t,{rings:r[0]})):(i="MultiPolygon",t=Object.assign({},t,{rings:r}))}return p_((0,tx[i])(t),!1,e)}function nx(t){let e="XY";return!0===t.hasZ&&!0===t.hasM?e="XYZM":!0===t.hasZ?e="XYZ":!0===t.hasM&&(e="XYM"),e}function rx(t){const e=t.getLayout();return{hasZ:"XYZ"===e||"XYZM"===e,hasM:"XYM"===e||"XYZM"===e}}function sx(t,e){return(0,ex[t.getType()])(p_(t,!0,e),e)}var ox=class extends Qy{constructor(t){t=t||{},super(),this.geometryName_=t.geometryName}readFeatureFromObject(t,e,i){const n=t,r=ix(n.geometry,e),s=new Ot;if(this.geometryName_&&s.setGeometryName(this.geometryName_),s.setGeometry(r),n.attributes){s.setProperties(n.attributes,!0);const t=n.attributes[i];void 0!==t&&s.setId(t)}return s}readFeaturesFromObject(t,e){if(e=e||{},t.features){const i=[],n=t.features;for(let r=0,s=n.length;r0?i[0]:null}readFeatureFromNode(t,e){return null}readFeatures(t,e){if(!t)return[];if("string"==typeof t){const i=ad(t);return this.readFeaturesFromDocument(i,e)}return sd(t)?this.readFeaturesFromDocument(t,e):this.readFeaturesFromNode(t,e)}readFeaturesFromDocument(t,e){const i=[];for(let n=t.firstChild;n;n=n.nextSibling)n.nodeType==Node.ELEMENT_NODE&&u(i,this.readFeaturesFromNode(n,e));return i}readFeaturesFromNode(t,e){return z()}readGeometry(t,e){if(!t)return null;if("string"==typeof t){const i=ad(t);return this.readGeometryFromDocument(i,e)}return sd(t)?this.readGeometryFromDocument(t,e):this.readGeometryFromNode(t,e)}readGeometryFromDocument(t,e){return null}readGeometryFromNode(t,e){return null}readProjection(t){if(!t)return null;if("string"==typeof t){const e=ad(t);return this.readProjectionFromDocument(e)}return sd(t)?this.readProjectionFromDocument(t):this.readProjectionFromNode(t)}readProjectionFromDocument(t){return this.dataProjection}readProjectionFromNode(t){return this.dataProjection}writeFeature(t,e){const i=this.writeFeatureNode(t,e);return this.xmlSerializer_.serializeToString(i)}writeFeatureNode(t,e){return null}writeFeatures(t,e){const i=this.writeFeaturesNode(t,e);return this.xmlSerializer_.serializeToString(i)}writeFeaturesNode(t,e){return null}writeGeometry(t,e){const i=this.writeGeometryNode(t,e);return this.xmlSerializer_.serializeToString(i)}writeGeometryNode(t,e){return null}};const lx="http://www.opengis.net/gml",hx=/^\s*$/;class cx extends ax{constructor(t){super(),t=t||{},this.featureType=t.featureType,this.featureNS=t.featureNS,this.srsName=t.srsName,this.schemaLocation="",this.FEATURE_COLLECTION_PARSERS={},this.FEATURE_COLLECTION_PARSERS[this.namespace]={featureMember:hd(this.readFeaturesInternal),featureMembers:cd(this.readFeaturesInternal)},this.supportedMediaTypes=["application/gml+xml"]}readFeaturesInternal(t,e){const i=t.localName;let n=null;if("FeatureCollection"==i)n=vd([],this.FEATURE_COLLECTION_PARSERS,t,e,this);else if("featureMembers"==i||"featureMember"==i||"member"==i){const r=e[0];let s=r.featureType,o=r.featureNS;const a="p",l="p0";if(!s&&t.childNodes){s=[],o={};for(let e=0,i=t.childNodes.length;e0){t={_content_:t};for(let e=0;e0){e[e.length-1].push(...i)}},outerBoundaryIs:function(t,e){const i=vd(void 0,kS,t,e);if(i){e[e.length-1][0]=i}}});function CS(t,e){const i=vd({},yS,t,e),n=vd([null],ES,t,e);if(n&&n[0]){const t=n[0],e=[t.length];for(let i=1,r=n.length;i0;let o;const a=r.href;let l,h,c;a?o=a:s&&(o=Bv);let u="bottom-left";const d=i.hotSpot;let g;d?(l=[d.x,d.y],h=d.xunits,c=d.yunits,u=d.origin):/^https?:\/\/maps\.(?:google|gstatic)\.com\//.test(o)&&(o.includes("pushpin")?(l=Dv,h=Gv,c=kv):o.includes("arrow-reverse")?(l=[54,42],h=Gv,c=kv):o.includes("paddle")&&(l=[32,1],h=Gv,c=kv));const f=r.x,p=r.y;let m;void 0!==f&&void 0!==p&&(g=[f,p]);const _=r.w,y=r.h;let x;void 0!==_&&void 0!==y&&(m=[_,y]);const v=i.heading;void 0!==v&&(x=wi(v));const S=i.scale,w=i.color;if(s){o==Bv&&(m=jv);const t=new of({anchor:l,anchorOrigin:u,anchorXUnits:h,anchorYUnits:c,crossOrigin:this.crossOrigin_,offset:g,offsetOrigin:"bottom-left",rotation:x,scale:S,size:m,src:this.iconUrlFunction_(o),color:w}),e=t.getScaleArray()[0],i=t.getSize();if(null===i){const i=t.getImageState();if(i===Jr||i===Qr){const n=function(){const i=t.getImageState();if(i!==Jr&&i!==Qr){const i=t.getSize();if(i&&2==i.length){const n=Hv(i);t.setScale(e*n)}t.unlistenImageChange(n)}};t.listenImageChange(n),i===Jr&&t.load()}}else if(2==i.length){const n=Hv(i);t.setScale(e*n)}n.imageStyle=t}else n.imageStyle=Uv},LabelStyle:function(t,e){const i=vd({},aS,t,e);if(!i)return;const n=e[e.length-1],r=new _f({fill:new Qg({color:"color"in i?i.color:Nv}),scale:i.scale});n.textStyle=r},LineStyle:function(t,e){const i=vd({},lS,t,e);if(!i)return;const n=e[e.length-1],r=new lf({color:"color"in i?i.color:Nv,width:"width"in i?i.width:1});n.strokeStyle=r},PolyStyle:function(t,e){const i=vd({},hS,t,e);if(!i)return;const n=e[e.length-1],r=new Qg({color:"color"in i?i.color:Nv});n.fillStyle=r;const s=i.fill;void 0!==s&&(n.fill=s);const o=i.outline;void 0!==o&&(n.outline=o)}});function bS(t,e){const i=vd({},RS,t,e,this);if(!i)return null;let n="fillStyle"in i?i.fillStyle:zv;const r=i.fill;let s;void 0===r||r||(n=null),"imageStyle"in i?i.imageStyle!=Uv&&(s=i.imageStyle):s=Xv;const o="textStyle"in i?i.textStyle:Zv,a="strokeStyle"in i?i.strokeStyle:Wv,l=i.outline;return void 0===l||l?[new pf({fill:n,image:s,stroke:a,text:o,zIndex:void 0})]:[new pf({geometry:function(t){const e=t.getGeometry(),i=e.getType();if("GeometryCollection"===i){return new Dm(e.getGeometriesArrayRecursive().filter((function(t){const e=t.getType();return"Polygon"!==e&&"MultiPolygon"!==e})))}if("Polygon"!==i&&"MultiPolygon"!==i)return e},fill:n,image:s,stroke:a,text:o,zIndex:void 0}),new pf({geometry:function(t){const e=t.getGeometry(),i=e.getType();if("GeometryCollection"===i){return new Dm(e.getGeometriesArrayRecursive().filter((function(t){const e=t.getType();return"Polygon"===e||"MultiPolygon"===e})))}if("Polygon"===i||"MultiPolygon"===i)return e},fill:n,stroke:null,zIndex:void 0})]}function PS(t,e){const i=e.length,n=new Array(e.length),r=new Array(e.length),s=new Array(e.length);let o,a,l;o=!1,a=!1,l=!1;for(let t=0;t0){const t=_d(r,o);wd(n,hw,uw,[{names:o,values:t}],i)}const u=i[0];let d=e.getGeometry();d&&(d=p_(d,!0,u)),wd(n,hw,tw,[d],i)}const gw=yd(bv,["extrude","tessellate","altitudeMode","coordinates"]),fw=yd(bv,{extrude:gd(vx),tessellate:gd(vx),altitudeMode:gd(Cx),coordinates:gd((function(t,e,i){const n=i[i.length-1],r=n.layout,s=n.stride;let o;"XY"==r||"XYM"==r?o=2:"XYZ"==r||"XYZM"==r?o=3:Ft(!1,34);const a=e.length;let l="";if(a>0){l+=e[0];for(let t=1;t0;else{const e=t.getType();a="Point"===e||"MultiPoint"===e}}a&&(l=s.get("name"),a=a&&!!l,a&&/&[^&]+;/.test(l)&&(Kv||(Kv=document.createElement("textarea")),Kv.innerHTML=l,l=Kv.value));let c=i;if(t?c=t:e&&(c=Jv(e,i,n)),a){const t=function(t,e){const i=[0,0];let n="start";const r=t.getImage();if(r){const t=r.getSize();if(t&&2==t.length){const e=r.getScaleArray(),s=r.getAnchor();i[0]=e[0]*(t[0]-s[0]),i[1]=e[1]*(t[1]/2-s[1]),n="left"}}let s=t.getText();s?(s=s.clone(),s.setFont(s.getFont()||Zv.getFont()),s.setScale(s.getScale()||Zv.getScale()),s.setFill(s.getFill()||Zv.getFill()),s.setStroke(s.getStroke()||Vv)):s=Zv.clone();s.setText(e),s.setOffsetX(i[0]),s.setOffsetY(i[1]),s.setTextAlign(n);return new pf({image:r,text:s})}(c[0],l);if(h.length>0){t.setGeometry(new Dm(h));return[t,new pf({geometry:c[0].getGeometry(),image:null,fill:c[0].getFill(),stroke:c[0].getStroke(),text:null})].concat(c.slice(1))}return t}return c}}(i.Style,i.styleUrl,this.defaultStyle_,this.sharedStyles_,this.showPointNames_);n.setStyle(t)}return delete i.Style,n.setProperties(i,!0),n}readSharedStyle_(t,e){const i=t.getAttribute("id");if(null!==i){const n=bS.call(this,t,e);if(n){let e,r=t.baseURI;if(r&&"about:blank"!=r||(r=window.location.href),r){e=new URL("#"+i,r).href}else e="#"+i;this.sharedStyles_[e]=n}}}readSharedStyleMap_(t,e){const i=t.getAttribute("id");if(null===i)return;const n=sS.call(this,t,e);if(!n)return;let r,s=t.baseURI;if(s&&"about:blank"!=s||(s=window.location.href),s){r=new URL("#"+i,s).href}else r="#"+i;this.sharedStyles_[r]=n}readFeatureFromNode(t,e){if(!bv.includes(t.namespaceURI))return null;const i=this.readPlacemark_(t,[this.getReadOptions(t,e)]);return i||null}readFeaturesFromNode(t,e){if(!bv.includes(t.namespaceURI))return[];let i;const n=t.localName;if("Document"==n||"Folder"==n)return i=this.readDocumentOrFolder_(t,[this.getReadOptions(t,e)]),i||[];if("Placemark"==n){const i=this.readPlacemark_(t,[this.getReadOptions(t,e)]);return i?[i]:[]}if("kml"==n){i=[];for(let n=t.firstElementChild;n;n=n.nextElementSibling){const t=this.readFeaturesFromNode(n,e);t&&u(i,t)}return i}return[]}readName(t){if(t){if("string"==typeof t){const e=ad(t);return this.readNameFromDocument(e)}return sd(t)?this.readNameFromDocument(t):this.readNameFromNode(t)}}readNameFromDocument(t){for(let e=t.firstChild;e;e=e.nextSibling)if(e.nodeType==Node.ELEMENT_NODE){const t=this.readNameFromNode(e);if(t)return t}}readNameFromNode(t){for(let e=t.firstElementChild;e;e=e.nextElementSibling)if(bv.includes(e.namespaceURI)&&"name"==e.localName)return xx(e);for(let e=t.firstElementChild;e;e=e.nextElementSibling){const t=e.localName;if(bv.includes(e.namespaceURI)&&("Document"==t||"Folder"==t||"Placemark"==t||"kml"==t)){const t=this.readNameFromNode(e);if(t)return t}}}readNetworkLinks(t){const e=[];if("string"==typeof t){const i=ad(t);u(e,this.readNetworkLinksFromDocument(i))}else sd(t)?u(e,this.readNetworkLinksFromDocument(t)):u(e,this.readNetworkLinksFromNode(t));return e}readNetworkLinksFromDocument(t){const e=[];for(let i=t.firstChild;i;i=i.nextSibling)i.nodeType==Node.ELEMENT_NODE&&u(e,this.readNetworkLinksFromNode(i));return e}readNetworkLinksFromNode(t){const e=[];for(let i=t.firstElementChild;i;i=i.nextElementSibling)if(bv.includes(i.namespaceURI)&&"NetworkLink"==i.localName){const t=vd({},Lv,i,[]);e.push(t)}for(let i=t.firstElementChild;i;i=i.nextElementSibling){const t=i.localName;!bv.includes(i.namespaceURI)||"Document"!=t&&"Folder"!=t&&"kml"!=t||u(e,this.readNetworkLinksFromNode(i))}return e}readRegion(t){const e=[];if("string"==typeof t){const i=ad(t);u(e,this.readRegionFromDocument(i))}else sd(t)?u(e,this.readRegionFromDocument(t)):u(e,this.readRegionFromNode(t));return e}readRegionFromDocument(t){const e=[];for(let i=t.firstChild;i;i=i.nextSibling)i.nodeType==Node.ELEMENT_NODE&&u(e,this.readRegionFromNode(i));return e}readRegionFromNode(t){const e=[];for(let i=t.firstElementChild;i;i=i.nextElementSibling)if(bv.includes(i.namespaceURI)&&"Region"==i.localName){const t=vd({},Mv,i,[]);e.push(t)}for(let i=t.firstElementChild;i;i=i.nextElementSibling){const t=i.localName;!bv.includes(i.namespaceURI)||"Document"!=t&&"Folder"!=t&&"kml"!=t||u(e,this.readRegionFromNode(i))}return e}writeFeaturesNode(t,e){e=this.adaptOptions(e);const i=id(bv[4],"kml"),n="http://www.w3.org/2000/xmlns/";i.setAttributeNS(n,"xmlns:gx",Rv[0]),i.setAttributeNS(n,"xmlns:xsi",ed),i.setAttributeNS(ed,"xsi:schemaLocation","http://www.opengis.net/kml/2.2 https://developers.google.com/kml/schema/kml22gx.xsd");const r={node:i},s={};t.length>1?s.Document=t:1==t.length&&(s.Placemark=t[0]);const o=Av[i.namespaceURI],a=_d(s,o);return wd(r,Ov,md,a,[e],o,this),i}};const Rw=[null],bw=yd(Rw,{nd:function(t,e){e[e.length-1].ndrefs.push(t.getAttribute("ref"))},tag:Lw}),Pw=yd(Rw,{node:function(t,e){const i=e[0],n=e[e.length-1],r=t.getAttribute("id"),s=[parseFloat(t.getAttribute("lon")),parseFloat(t.getAttribute("lat"))];n.nodes[r]=s;const o=vd({tags:{}},Iw,t,e);if(!v(o.tags)){const t=new dr(s);p_(t,!1,i);const e=new Ot(t);void 0!==r&&e.setId(r),e.setProperties(o.tags,!0),n.features.push(e)}},way:function(t,e){const i=vd({id:t.getAttribute("id"),ndrefs:[],tags:{}},bw,t,e);e[e.length-1].ways.push(i)}});const Iw=yd(Rw,{tag:Lw});function Lw(t,e){e[e.length-1].tags[t.getAttribute("k")]=t.getAttribute("v")}var Fw=class extends ax{constructor(){super(),this.dataProjection=an("EPSG:4326")}readFeaturesFromNode(t,e){if(e=this.getReadOptions(t,e),"osm"==t.localName){const i=vd({nodes:{},ways:[],features:[]},Pw,t,[e]);for(let t=0;t>1):i>>1}return e}function iT(t){let e="";for(let i=0,n=t.length;i=32;)e=63+(32|31&t),i+=String.fromCharCode(e),t>>=5;return e=t+63,i+=String.fromCharCode(e),i}var sT=class extends vv{constructor(t){super(),t=t||{},this.dataProjection=an("EPSG:4326"),this.factor_=t.factor?t.factor:1e5,this.geometryLayout_=t.geometryLayout?t.geometryLayout:"XY"}readFeatureFromText(t,e){const i=this.readGeometryFromText(t,e);return new Ot(i)}readFeaturesFromText(t,e){return[this.readFeatureFromText(t,e)]}readGeometryFromText(t,e){const i=Dn(this.geometryLayout_),n=$w(t,i,this.factor_);$y(n,0,n.length,i,n);const r=nr(n,0,n.length,i);return p_(new zm(r,this.geometryLayout_),!1,this.adaptOptions(e))}writeFeatureText(t,e){const i=t.getGeometry();return i?this.writeGeometryText(i,e):(Ft(!1,40),"")}writeFeaturesText(t,e){return this.writeFeatureText(t[0],e)}writeGeometryText(t,e){const i=(t=p_(t,!0,this.adaptOptions(e))).getFlatCoordinates(),n=t.getStride();return $y(i,0,i.length,n,i),Hw(i,n,this.factor_)}};const oT={Point:function(t,e,i){const n=t.coordinates;e&&i&&uT(n,e,i);return new dr(n)},LineString:function(t,e){const i=aT(t.arcs,e);return new zm(i)},Polygon:function(t,e){const i=[];for(let n=0,r=t.arcs.length;n0&&i.pop(),n>=0){const t=e[n];for(let e=0,n=t.length;e=0;--e)i.push(t[e].slice(0))}return i}function lT(t,e,i,n,r,s,o){const a=t.geometries,l=[];for(let t=0,h=a.length;t=2,57)}};var pT=class extends fT{constructor(t){super("And",Array.prototype.slice.call(arguments))}};var mT=class extends gT{constructor(t,e,i){if(super("BBOX"),this.geometryName=t,this.extent=e,4!==e.length)throw new Error("Expected an extent with four values ([minX, minY, maxX, maxY])");this.srsName=i}};var _T=class extends gT{constructor(t,e,i,n){super(t),this.geometryName=e||"the_geom",this.geometry=i,this.srsName=n}};var yT=class extends _T{constructor(t,e,i){super("Contains",t,e,i)}};var xT=class extends _T{constructor(t,e,i,n,r){super("DWithin",t,e,r),this.distance=i,this.unit=n}};var vT=class extends _T{constructor(t,e,i){super("Disjoint",t,e,i)}};var ST=class extends gT{constructor(t,e){super(t),this.propertyName=e}};var wT=class extends ST{constructor(t,e,i){super("During",t),this.begin=e,this.end=i}};var TT=class extends ST{constructor(t,e,i,n){super(t,e),this.expression=i,this.matchCase=n}};var ET=class extends TT{constructor(t,e,i){super("PropertyIsEqualTo",t,e,i)}};var CT=class extends TT{constructor(t,e){super("PropertyIsGreaterThan",t,e)}};var RT=class extends TT{constructor(t,e){super("PropertyIsGreaterThanOrEqualTo",t,e)}};var bT=class extends _T{constructor(t,e,i){super("Intersects",t,e,i)}};var PT=class extends ST{constructor(t,e,i){super("PropertyIsBetween",t),this.lowerBoundary=e,this.upperBoundary=i}};var IT=class extends ST{constructor(t,e,i,n,r,s){super("PropertyIsLike",t),this.pattern=e,this.wildCard=void 0!==i?i:"*",this.singleChar=void 0!==n?n:".",this.escapeChar=void 0!==r?r:"!",this.matchCase=s}};var LT=class extends ST{constructor(t){super("PropertyIsNull",t)}};var FT=class extends TT{constructor(t,e){super("PropertyIsLessThan",t,e)}};var MT=class extends TT{constructor(t,e){super("PropertyIsLessThanOrEqualTo",t,e)}};var AT=class extends gT{constructor(t){super("Not"),this.condition=t}};var OT=class extends TT{constructor(t,e,i){super("PropertyIsNotEqualTo",t,e,i)}};var NT=class extends fT{constructor(t){super("Or",Array.prototype.slice.call(arguments))}};var DT=class extends gT{constructor(t){super("ResourceId"),this.rid=t}};var GT=class extends _T{constructor(t,e,i){super("Within",t,e,i)}};function kT(t){const e=[null].concat(Array.prototype.slice.call(arguments));return new(Function.prototype.bind.apply(pT,e))}function jT(t,e,i){return new mT(t,e,i)}const BT={"http://www.opengis.net/gml":{boundedBy:dd(ux.prototype.readExtentElement,"bounds")},"http://www.opengis.net/wfs/2.0":{member:hd(ux.prototype.readFeaturesInternal)}},zT={"http://www.opengis.net/wfs":{totalInserted:dd(_x),totalUpdated:dd(_x),totalDeleted:dd(_x)},"http://www.opengis.net/wfs/2.0":{totalInserted:dd(_x),totalUpdated:dd(_x),totalDeleted:dd(_x)}},UT={"http://www.opengis.net/wfs":{TransactionSummary:dd(QT,"transactionSummary"),InsertResults:dd(nE,"insertIds")},"http://www.opengis.net/wfs/2.0":{TransactionSummary:dd(QT,"transactionSummary"),InsertResults:dd(nE,"insertIds")}},XT={"http://www.opengis.net/wfs":{PropertyName:gd(Cx)},"http://www.opengis.net/wfs/2.0":{PropertyName:gd(Cx)}},VT={"http://www.opengis.net/wfs":{Insert:gd(rE),Update:gd(lE),Delete:gd(aE),Property:gd(hE),Native:gd(cE)},"http://www.opengis.net/wfs/2.0":{Insert:gd(rE),Update:gd(lE),Delete:gd(aE),Property:gd(hE),Native:gd(cE)}},WT="feature",ZT="http://www.w3.org/2000/xmlns/",YT={"2.0.0":"http://www.opengis.net/ogc/1.1","1.1.0":"http://www.opengis.net/ogc","1.0.0":"http://www.opengis.net/ogc"},KT={"2.0.0":"http://www.opengis.net/wfs/2.0","1.1.0":"http://www.opengis.net/wfs","1.0.0":"http://www.opengis.net/wfs"},qT={"2.0.0":"http://www.opengis.net/fes/2.0","1.1.0":"http://www.opengis.net/fes","1.0.0":"http://www.opengis.net/fes"},HT={"2.0.0":"http://www.opengis.net/wfs/2.0 http://schemas.opengis.net/wfs/2.0/wfs.xsd","1.1.0":"http://www.opengis.net/wfs http://schemas.opengis.net/wfs/1.1.0/wfs.xsd","1.0.0":"http://www.opengis.net/wfs http://schemas.opengis.net/wfs/1.0.0/wfs.xsd"},$T={"2.0.0":Nx,"1.1.0":Fx,"1.0.0":Px};function JT(t,e,i,n){wd(n,VT,pd(t),e,i)}function QT(t,e){return vd({},zT,t,e)}const tE={"http://www.opengis.net/ogc":{FeatureId:hd((function(t,e){return t.getAttribute("fid")}))},"http://www.opengis.net/ogc/1.1":{FeatureId:hd((function(t,e){return t.getAttribute("fid")}))}};function eE(t,e){xd(tE,t,e)}const iE={"http://www.opengis.net/wfs":{Feature:eE},"http://www.opengis.net/wfs/2.0":{Feature:eE}};function nE(t,e){return vd([],iE,t,e)}function rE(t,e,i){const n=i[i.length-1],r=n.featureType,s=n.featureNS,o=n.gmlVersion,a=id(s,r);t.appendChild(a),2===o?Px.prototype.writeFeatureElement(a,e,i):3===o?Fx.prototype.writeFeatureElement(a,e,i):Nx.prototype.writeFeatureElement(a,e,i)}function sE(t,e,i){const n=i[i.length-1].version,r=YT[n],s=id(r,"Filter"),o=id(r,"FeatureId");s.appendChild(o),o.setAttribute("fid",e),t.appendChild(s)}function oE(t,e){const i=(t=t||WT)+":";return e.startsWith(i)?e:i+e}function aE(t,e,i){const n=i[i.length-1];Ft(void 0!==e.getId(),26);const r=n.featureType,s=n.featurePrefix,o=n.featureNS,a=oE(s,r);t.setAttribute("typeName",a),t.setAttributeNS(ZT,"xmlns:"+s,o);const l=e.getId();void 0!==l&&sE(t,l,i)}function lE(t,e,i){const n=i[i.length-1];Ft(void 0!==e.getId(),27);const r=n.version,s=n.featureType,o=n.featurePrefix,a=n.featureNS,l=oE(o,s),h=e.getGeometryName();t.setAttribute("typeName",l),t.setAttributeNS(ZT,"xmlns:"+o,a);const c=e.getId();if(void 0!==c){const s=e.getKeys(),o=[];for(let t=0,i=s.length;t{const r=this.combineBboxAndFilter(n.geometryName,n.bbox,t.srsName,t.filter);Object.assign(i,{geometryName:n.geometryName,filter:r}),PE(e,[n.name],[i])}));return e}combineBboxAndFilter(t,e,i,n){const r=jT(t,e,i);return n?kT(n,r):r}writeTransaction(t,e,i,n){const r=[],s=n.version?n.version:this.version_,o=id(KT[s],"Transaction");let a;o.setAttribute("service","WFS"),o.setAttribute("version",s),n&&(a=n.gmlOptions?n.gmlOptions:{},n.handle&&o.setAttribute("handle",n.handle)),o.setAttributeNS(ed,"xsi:schemaLocation",HT[s]);const l=function(t,e,i,n){const r=n.featurePrefix?n.featurePrefix:WT;let s;"1.0.0"===i?s=2:"1.1.0"===i?s=3:"2.0.0"===i&&(s=3.2);return Object.assign({node:t},{version:i,featureNS:n.featureNS,featureType:n.featureType,featurePrefix:r,gmlVersion:s,hasZ:n.hasZ,srsName:n.srsName},e)}(o,a,s,n);return t&&JT("Insert",t,r,l),e&&JT("Update",e,r,l),i&&JT("Delete",i,r,l),n.nativeElements&&JT("Native",n.nativeElements,r,l),o}readProjectionFromDocument(t){for(let e=t.firstChild;e;e=e.nextSibling)if(e.nodeType==Node.ELEMENT_NODE)return this.readProjectionFromNode(e);return null}readProjectionFromNode(t){if(t.firstElementChild&&t.firstElementChild.firstElementChild)for(let e=(t=t.firstElementChild.firstElementChild).firstElementChild;e;e=e.nextElementSibling)if(0!==e.childNodes.length&&(1!==e.childNodes.length||3!==e.firstChild.nodeType)){const t=[{}];return this.gmlFormat_.readGeometryElement(e,t),an(t.pop().srsName)}return null}};const FE=1,ME=2,AE=3,OE=4,NE=5,DE=6,GE=7,kE=15,jE=16,BE=17;class zE{constructor(t){this.view_=t,this.pos_=0,this.initialized_=!1,this.isLittleEndian_=!1,this.hasZ_=!1,this.hasM_=!1,this.srid_=null,this.layout_="XY"}readUint8(){return this.view_.getUint8(this.pos_++)}readUint32(t){return this.view_.getUint32((this.pos_+=4)-4,void 0!==t?t:this.isLittleEndian_)}readDouble(t){return this.view_.getFloat64((this.pos_+=8)-8,void 0!==t?t:this.isLittleEndian_)}readPoint(){const t=[];return t.push(this.readDouble()),t.push(this.readDouble()),this.hasZ_&&t.push(this.readDouble()),this.hasM_&&t.push(this.readDouble()),t}readLineString(){const t=this.readUint32(),e=[];for(let i=0;i0,i=this.readUint32(e),n=Math.floor((268435455&i)/1e3),r=Boolean(2147483648&i)||1===n||3===n,s=Boolean(1073741824&i)||2===n||3===n,o=Boolean(536870912&i),a=(268435455&i)%1e3,l=["XY",r?"Z":"",s?"M":""].join(""),h=o?this.readUint32(e):null;if(void 0!==t&&t!==a)throw new Error("Unexpected WKB geometry type "+a);if(this.initialized_){if(this.isLittleEndian_!==e)throw new Error("Inconsistent endian");if(this.layout_!==l)throw new Error("Inconsistent geometry layout");if(h&&this.srid_!==h)throw new Error("Inconsistent coordinate system (SRID)")}else this.isLittleEndian_=e,this.hasZ_=r,this.hasM_=s,this.layout_=l,this.srid_=h,this.initialized_=!0;return a}readWkbPayload(t){switch(t){case FE:return this.readPoint();case ME:return this.readLineString();case AE:case BE:return this.readPolygon();case OE:return this.readMultiPoint();case NE:return this.readMultiLineString();case DE:case kE:case jE:return this.readMultiPolygon();case GE:return this.readGeometryCollection();default:throw new Error("Unsupported WKB geometry type "+t+" is found")}}readWkbBlock(t){return this.readWkbPayload(this.readWkbHeader(t))}readWkbCollection(t,e){const i=this.readUint32(),n=[];for(let r=0;r({[e]:t[i]}))));for(const t of this.layout_)this.writeDouble(t in i?i[t]:this.nodata_[t])}writeLineString(t,e){this.writeUint32(t.length);for(let i=0;it+e[0]),0),e=new ArrayBuffer(t),i=new DataView(e);let n=0;return this.writeQueue_.forEach((t=>{switch(t[0]){case 1:i.setUint8(n,t[1]);break;case 4:i.setUint32(n,t[1],this.isLittleEndian_);break;case 8:i.setFloat64(n,t[1],this.isLittleEndian_)}n+=t[0]})),e}}function XE(t){return"string"==typeof t?function(t){const e=new Uint8Array(t.length/2);for(let i=0;inew Ot({geometry:t})))}readGeometry(t,e){const i=XE(t);if(!i)return null;const n=new zE(i).readGeometry();return this.viewCache_=i,e=this.getReadOptions(t,e),this.viewCache_=null,p_(n,!1,e)}readProjection(t){const e=this.viewCache_||XE(t);if(!e)return;const i=new zE(e);return i.readWkbHeader(),i.getSrid()&&an("EPSG:"+i.getSrid())||void 0}writeFeature(t,e){return this.writeGeometry(t.getGeometry(),e)}writeFeatures(t,e){return this.writeGeometry(new Dm(t.map((t=>t.getGeometry()))),e)}writeGeometry(t,e){e=this.adaptOptions(e);const i=new UE({layout:this.layout_,littleEndian:this.littleEndian_,ewkb:this.ewkb_,nodata:{Z:this.nodataZ_,M:this.nodataM_}});let n=Number.isInteger(this.srid_)?Number(this.srid_):null;if(!1!==this.srid_&&!Number.isInteger(this.srid_)){const t=e.dataProjection&&an(e.dataProjection);if(t){const e=t.getCode();e.startsWith("EPSG:")&&(n=Number(e.substring(5)))}}i.writeGeometry(p_(t,!0,e),n);const r=i.getBuffer();return this.hex_?function(t){const e=new Uint8Array(t);return Array.from(e.values()).map((t=>(t<16?"0":"")+Number(t).toString(16).toUpperCase())).join("")}(r):r}};const WE={POINT:dr,LINESTRING:zm,POLYGON:Ar,MULTIPOINT:Wm,MULTILINESTRING:Xm,MULTIPOLYGON:Km},ZE="EMPTY",YE=0,KE=1,qE=2,HE=3,$E=4,JE=5,QE=6,tC={Point:"POINT",LineString:"LINESTRING",Polygon:"POLYGON",MultiPoint:"MULTIPOINT",MultiLineString:"MULTILINESTRING",MultiPolygon:"MULTIPOLYGON",GeometryCollection:"GEOMETRYCOLLECTION",Circle:"CIRCLE"};class eC{constructor(t){this.wkt=t,this.index_=-1}isAlpha_(t){return t>="a"&&t<="z"||t>="A"&&t<="Z"}isNumeric_(t,e){return e=void 0!==e&&e,t>="0"&&t<="9"||"."==t&&!e}isWhiteSpace_(t){return" "==t||"\t"==t||"\r"==t||"\n"==t}nextChar_(){return this.wkt.charAt(++this.index_)}nextToken(){const t=this.nextChar_(),e=this.index_;let i,n=t;if("("==t)i=qE;else if(","==t)i=JE;else if(")"==t)i=HE;else if(this.isNumeric_(t)||"-"==t)i=$E,n=this.readNumber_();else if(this.isAlpha_(t))i=KE,n=this.readText_();else{if(this.isWhiteSpace_(t))return this.nextToken();if(""!==t)throw new Error("Unexpected character: "+t);i=QE}return{position:e,value:n,type:i}}readNumber_(){let t;const e=this.index_;let i=!1,n=!1;do{"."==t?i=!0:"e"!=t&&"E"!=t||(n=!0),t=this.nextChar_()}while(this.isNumeric_(t,i)||!n&&("e"==t||"E"==t)||n&&("-"==t||"+"==t));return parseFloat(this.wkt.substring(e,this.index_--))}readText_(){let t;const e=this.index_;do{t=this.nextChar_()}while(this.isAlpha_(t));return this.wkt.substring(e,this.index_--).toUpperCase()}}class iC{constructor(t){this.lexer_=t,this.token_={position:0,type:YE},this.layout_="XY"}consume_(){this.token_=this.lexer_.nextToken()}isTokenType(t){return this.token_.type==t}match(t){const e=this.isTokenType(t);return e&&this.consume_(),e}parse(){return this.consume_(),this.parseGeometry_()}parseGeometryLayout_(){let t="XY";const e=this.token_;if(this.isTokenType(KE)){const i=e.value;"Z"===i?t="XYZ":"M"===i?t="XYM":"ZM"===i&&(t="XYZM"),"XY"!==t&&this.consume_()}return t}parseGeometryCollectionText_(){if(this.match(qE)){const t=[];do{t.push(this.parseGeometry_())}while(this.match(JE));if(this.match(HE))return t}throw new Error(this.formatErrorMessage_())}parsePointText_(){if(this.match(qE)){const t=this.parsePoint_();if(this.match(HE))return t}throw new Error(this.formatErrorMessage_())}parseLineStringText_(){if(this.match(qE)){const t=this.parsePointList_();if(this.match(HE))return t}throw new Error(this.formatErrorMessage_())}parsePolygonText_(){if(this.match(qE)){const t=this.parseLineStringTextList_();if(this.match(HE))return t}throw new Error(this.formatErrorMessage_())}parseMultiPointText_(){if(this.match(qE)){let t;if(t=this.token_.type==qE?this.parsePointTextList_():this.parsePointList_(),this.match(HE))return t}throw new Error(this.formatErrorMessage_())}parseMultiLineStringText_(){if(this.match(qE)){const t=this.parseLineStringTextList_();if(this.match(HE))return t}throw new Error(this.formatErrorMessage_())}parseMultiPolygonText_(){if(this.match(qE)){const t=this.parsePolygonTextList_();if(this.match(HE))return t}throw new Error(this.formatErrorMessage_())}parsePoint_(){const t=[],e=this.layout_.length;for(let i=0;i0&&(n+=" "+e)}return 0===i.length?n+" "+ZE:n+"("+i+")"}var lC=class extends vv{constructor(t){super(),t=t||{},this.splitCollection_=void 0!==t.splitCollection&&t.splitCollection}parse_(t){const e=new eC(t);return new iC(e).parse()}readFeatureFromText(t,e){const i=this.readGeometryFromText(t,e),n=new Ot;return n.setGeometry(i),n}readFeaturesFromText(t,e){let i=[];const n=this.readGeometryFromText(t,e);i=this.splitCollection_&&"GeometryCollection"==n.getType()?n.getGeometriesArray():[n];const r=[];for(let t=0,e=i.length;tc*oR||h>u*oR?this.resetExtent_():le(s,n)||this.recenter_()}resetExtent_(){const t=this.getMap(),e=this.ovmap_,i=t.getSize(),n=t.getView().calculateExtentInternal(i),r=e.getView(),s=Math.log(7.5)/Math.LN2;Be(n,1/(Math.pow(2,s/2)*aR)),r.fitInternal(Nr(n))}recenter_(){const t=this.getMap(),e=this.ovmap_,i=t.getView();e.getView().setCenterInternal(i.getCenterInternal())}updateBox_(){const t=this.getMap(),e=this.ovmap_;if(!t.isRendered()||!e.isRendered())return;const i=t.getSize(),n=t.getView(),r=e.getView(),s=this.rotateWithView_?0:-n.getRotation(),o=this.boxOverlay_,a=this.boxOverlay_.getElement(),l=n.getCenterInternal(),h=n.getResolution(),c=r.getResolution(),u=i[0]*h/c,d=i[1]*h/c;if(o.setPosition(l),a){a.style.width=u+"px",a.style.height=d+"px";const t="rotate("+s+"rad)";a.style.transform=t}}updateBoxAfterOvmapIsRendered_(){this.ovmapPostrenderKey_||(this.ovmapPostrenderKey_=D(this.ovmap_,Mo,(function(t){delete this.ovmapPostrenderKey_,this.updateBox_()}),this))}handleClick_(t){t.preventDefault(),this.handleToggle_()}handleToggle_(){this.element.classList.toggle(Ys),this.collapsed_?St(this.collapseLabel_,this.label_):St(this.label_,this.collapseLabel_),this.collapsed_=!this.collapsed_;const t=this.ovmap_;if(!this.collapsed_){if(t.isRendered())return this.viewExtent_=void 0,void t.render();t.updateSize(),this.resetExtent_(),this.updateBoxAfterOvmapIsRendered_()}}getCollapsible(){return this.collapsible_}setCollapsible(t){this.collapsible_!==t&&(this.collapsible_=t,this.element.classList.toggle("ol-uncollapsible"),!t&&this.collapsed_&&this.handleToggle_())}setCollapsed(t){this.collapsible_&&this.collapsed_!==t&&this.handleToggle_()}getCollapsed(){return this.collapsed_}getRotateWithView(){return this.rotateWithView_}setRotateWithView(t){this.rotateWithView_!==t&&(this.rotateWithView_=t,0!==this.getMap().getView().getRotation()&&(this.rotateWithView_?this.handleRotationChanged_():this.ovmap_.getView().setRotation(0),this.viewExtent_=void 0,this.validateExtent_(),this.updateBox_()))}getOverviewMap(){return this.ovmap_}render(t){this.validateExtent_(),this.updateBox_()}};const hR="units",cR=[1,2,5],uR=25.4/.28;var dR=class extends ga{constructor(t){t=t||{};const e=document.createElement("div");e.style.pointerEvents="none",super({element:e,render:t.render,target:t.target}),this.on,this.once,this.un;const i=void 0!==t.className?t.className:t.bar?"ol-scale-bar":"ol-scale-line";this.innerElement_=document.createElement("div"),this.innerElement_.className=i+"-inner",this.element.className=i+" "+Vs,this.element.appendChild(this.innerElement_),this.viewState_=null,this.minWidth_=void 0!==t.minWidth?t.minWidth:64,this.maxWidth_=t.maxWidth,this.renderedVisible_=!1,this.renderedWidth_=void 0,this.renderedHTML_="",this.addChangeListener(hR,this.handleUnitsChanged_),this.setUnits(t.units||"metric"),this.scaleBar_=t.bar||!1,this.scaleBarSteps_=t.steps||4,this.scaleBarText_=t.text||!1,this.dpi_=t.dpi||void 0}getUnits(){return this.get(hR)}handleUnitsChanged_(){this.updateElement_()}setUnits(t){this.set(hR,t)}setDpi(t){this.dpi_=t}updateElement_(){const t=this.viewState_;if(!t)return void(this.renderedVisible_&&(this.element.style.display="none",this.renderedVisible_=!1));const e=t.center,i=t.projection,n=this.getUnits(),r="degrees"==n?"degrees":"m";let s=ln(i,t.resolution,e,r);const o=this.minWidth_*(this.dpi_||uR)/uR,a=void 0!==this.maxWidth_?this.maxWidth_*(this.dpi_||uR)/uR:void 0;let l=o*s,h="";if("degrees"==n){const t=Ye.degrees;l*=t,l=a){c=g,u=f,d=p;break}if(u>=o)break;g=c,f=u,p=d,++m}const _=this.scaleBar_?this.createScaleBar(u,c,h):c.toFixed(d<0?-d:0)+" "+h;this.renderedHTML_!=_&&(this.innerElement_.innerHTML=_,this.renderedHTML_=_),this.renderedWidth_!=u&&(this.innerElement_.style.width=u+"px",this.renderedWidth_=u),this.renderedVisible_||(this.element.style.display="",this.renderedVisible_=!0)}createScaleBar(t,e,i){const n=this.getScaleForResolution(),r=n<1?Math.round(1/n).toLocaleString()+" : 1":"1 : "+Math.round(n).toLocaleString(),s=this.scaleBarSteps_,o=t/s,a=[this.createMarker("absolute")];for(let n=0;n
`+this.createMarker("relative")+(n%2==0||2===s?this.createStepText(n,t,!1,e,i):"")+"")}a.push(this.createStepText(s,t,!0,e,i));return(this.scaleBarText_?`
`+r+"
":"")+a.join("")}createMarker(t){return`
`}createStepText(t,e,i,n,r){const s=(0===t?0:Math.round(n/this.scaleBarSteps_*t*100)/100)+(0===t?"":" "+r);return`
`+s+"
"}getScaleForResolution(){return ln(this.viewState_.projection,this.viewState_.resolution,this.viewState_.center,"m")*(1e3/25.4)*(this.dpi_||uR)}render(t){const e=t.frameState;this.viewState_=e?e.viewState:null,this.updateElement_()}};const gR=0,fR=1;var pR=class extends ga{constructor(t){t=t||{},super({element:document.createElement("div"),render:t.render}),this.dragListenerKeys_=[],this.currentResolution_=void 0,this.direction_=gR,this.dragging_,this.heightLimit_=0,this.widthLimit_=0,this.startX_,this.startY_,this.thumbSize_=null,this.sliderInitialized_=!1,this.duration_=void 0!==t.duration?t.duration:200;const e=void 0!==t.className?t.className:"ol-zoomslider",i=document.createElement("button");i.setAttribute("type","button"),i.className=e+"-thumb "+Vs;const r=this.element;r.className=e+" "+"ol-unselectable "+Zs,r.appendChild(i),r.addEventListener(Po,this.handleDraggerStart_.bind(this),!1),r.addEventListener(bo,this.handleDraggerDrag_.bind(this),!1),r.addEventListener(Io,this.handleDraggerEnd_.bind(this),!1),r.addEventListener(C,this.handleContainerClick_.bind(this),!1),i.addEventListener(C,n,!1)}setMap(t){super.setMap(t),t&&t.render()}initSlider_(){const t=this.element;let e=t.offsetWidth,i=t.offsetHeight;if(0===e&&0===i)return this.sliderInitialized_=!1;const n=getComputedStyle(t);e-=parseFloat(n.paddingRight)+parseFloat(n.paddingLeft),i-=parseFloat(n.paddingTop)+parseFloat(n.paddingBottom);const r=t.firstElementChild,s=getComputedStyle(r),o=r.offsetWidth+parseFloat(s.marginRight)+parseFloat(s.marginLeft),a=r.offsetHeight+parseFloat(s.marginTop)+parseFloat(s.marginBottom);return this.thumbSize_=[o,a],e>i?(this.direction_=fR,this.widthLimit_=e-o):(this.direction_=gR,this.heightLimit_=i-a),this.sliderInitialized_=!0}handleContainerClick_(t){const e=this.getMap().getView(),i=this.getRelativePosition_(t.offsetX-this.thumbSize_[0]/2,t.offsetY-this.thumbSize_[1]/2),n=this.getResolutionForPosition_(i),r=e.getConstrainedZoom(e.getZoomForResolution(n));e.animateInternal({zoom:r,duration:this.duration_,easing:nt})}handleDraggerStart_(t){if(!this.dragging_&&t.target===this.element.firstElementChild){const e=this.element.firstElementChild;if(this.getMap().getView().beginInteraction(),this.startX_=t.clientX-parseFloat(e.style.left),this.startY_=t.clientY-parseFloat(e.style.top),this.dragging_=!0,0===this.dragListenerKeys_.length){const t=this.handleDraggerDrag_,e=this.handleDraggerEnd_,i=this.getMap().getOwnerDocument();this.dragListenerKeys_.push(N(i,bo,t,this),N(i,Io,e,this))}}}handleDraggerDrag_(t){if(this.dragging_){const e=t.clientX-this.startX_,i=t.clientY-this.startY_,n=this.getRelativePosition_(e,i);this.currentResolution_=this.getResolutionForPosition_(n),this.getMap().getView().setResolution(this.currentResolution_)}}handleDraggerEnd_(t){if(this.dragging_){this.getMap().getView().endInteraction(),this.dragging_=!1,this.startX_=void 0,this.startY_=void 0,this.dragListenerKeys_.forEach(G),this.dragListenerKeys_.length=0}}setThumbPosition_(t){const e=this.getPositionForResolution_(t),i=this.element.firstElementChild;this.direction_==fR?i.style.left=this.widthLimit_*e+"px":i.style.top=this.heightLimit_*e+"px"}getRelativePosition_(t,e){let i;return i=this.direction_===fR?t/this.widthLimit_:e/this.heightLimit_,_i(i,0,1)}getResolutionForPosition_(t){return this.getMap().getView().getResolutionForValueFunction()(1-t)}getPositionForResolution_(t){return _i(1-this.getMap().getView().getValueForResolutionFunction()(t),0,1)}render(t){if(!t.frameState)return;if(!this.sliderInitialized_&&!this.initSlider_())return;const e=t.frameState.viewState.resolution;this.currentResolution_=e,this.setThumbPosition_(e)}};var mR=class extends ga{constructor(t){t=t||{},super({element:document.createElement("div"),target:t.target}),this.extent=t.extent?t.extent:null;const e=void 0!==t.className?t.className:"ol-zoom-extent",i=void 0!==t.label?t.label:"E",n=void 0!==t.tipLabel?t.tipLabel:"Fit to extent",r=document.createElement("button");r.setAttribute("type","button"),r.title=n,r.appendChild("string"==typeof i?document.createTextNode(i):i),r.addEventListener(C,this.handleClick_.bind(this),!1);const s=e+" "+"ol-unselectable "+Zs,o=this.element;o.className=s,o.appendChild(r)}handleClick_(t){t.preventDefault(),this.handleZoomToExtent()}handleZoomToExtent(){const t=this.getMap().getView(),e=this.extent?this.extent:t.getProjection().getExtent();t.fitInternal(Nr(e))}},_R={};return _R.AssertionError=i,_R.Collection=H,_R.Collection.CollectionEvent=q,_R.DataTile=Lt,_R.DataTile.asArrayLike=Rt,_R.DataTile.asImageLike=Ct,_R.DataTile.toArray=Pt,_R.Disposable=o,_R.Feature=Ot,_R.Feature.createStyleFunction=At,_R.Geolocation=Hr,_R.Geolocation.GeolocationError=qr,_R.Image=rs,_R.Image.listenImage=ns,_R.ImageBase=$r,_R.ImageCanvas=ss,_R.ImageTile=os,_R.Kinetic=as,_R.Map=ul,_R.MapBrowserEvent=Co,_R.MapBrowserEventHandler=Fo,_R.MapEvent=Eo,_R.Object=W,_R.Object.ObjectEvent=V,_R.Observable=B,_R.Observable.unByKey=j,_R.Overlay=_l,_R.Tile=ot,_R.TileCache=Rl,_R.TileQueue=Xo,_R.TileQueue.getTilePriority=Vo,_R.TileRange=Il,_R.TileRange.createOrUpdate=Pl,_R.VectorRenderTile=Fl,_R.VectorTile=Ml,_R.View=da,_R.View.createCenterConstraint=aa,_R.View.createResolutionConstraint=la,_R.View.createRotationConstraint=ha,_R.View.isNoopAnimation=ca,_R.array={},_R.array.ascending=l,_R.array.binarySearch=a,_R.array.equals=d,_R.array.extend=u,_R.array.isSorted=g,_R.array.linearFindNearest=h,_R.array.remove=function(t,e){const i=t.indexOf(e),n=i>-1;return n&&t.splice(i,1),n},_R.array.reverseSubArray=c,_R.array.stableSort=function(t,e){const i=t.length,n=Array(t.length);let r;for(r=0;rHi.info||console.log(...t)},_R.console.setLevel=function(t){$i=Hi[t]},_R.console.warn=Ji,_R.control={},_R.control.Attribution=fa,_R.control.Control=ga,_R.control.FullScreen=iR,_R.control.MousePosition=sR,_R.control.OverviewMap=lR,_R.control.Rotate=pa,_R.control.ScaleLine=dR,_R.control.Zoom=ma,_R.control.ZoomSlider=pR,_R.control.ZoomToExtent=mR,_R.control.defaults={},_R.control.defaults.defaults=_a,_R.coordinate={},_R.coordinate.add=Fi,_R.coordinate.closestOnCircle=Mi,_R.coordinate.closestOnSegment=Ai,_R.coordinate.createStringXY=function(t){return function(e){return Ui(e,t)}},_R.coordinate.degreesToStringHDMS=Oi,_R.coordinate.distance=Bi,_R.coordinate.equals=Di,_R.coordinate.format=Ni,_R.coordinate.getWorldsAway=Vi,_R.coordinate.rotate=Gi,_R.coordinate.scale=ki,_R.coordinate.squaredDistance=ji,_R.coordinate.squaredDistanceToSegment=zi,_R.coordinate.toStringHDMS=function(t,e){return t?Oi("NS",t[1],e)+" "+Oi("EW",t[0],e):""},_R.coordinate.toStringXY=Ui,_R.coordinate.wrapX=Xi,_R.css={},_R.css.CLASS_COLLAPSED=Ys,_R.css.CLASS_CONTROL=Zs,_R.css.CLASS_HIDDEN=Us,_R.css.CLASS_SELECTABLE=Xs,_R.css.CLASS_UNSELECTABLE=Vs,_R.css.CLASS_UNSUPPORTED=Ws,_R.css.getFontParameters=Hs,_R.dom={},_R.dom.createCanvasContext2D=_t,_R.dom.outerHeight=vt,_R.dom.outerWidth=xt,_R.dom.releaseCanvas=yt,_R.dom.removeChildren=Tt,_R.dom.removeNode=wt,_R.dom.replaceChildren=Et,_R.dom.replaceNode=St,_R.easing={},_R.easing.easeIn=it,_R.easing.easeOut=nt,_R.easing.inAndOut=rt,_R.easing.linear=st,_R.easing.upAndDown=function(t){return t<.5?rt(2*t):1-rt(2*(t-.5))},_R.events={},_R.events.Event=r,_R.events.Event.preventDefault=function(t){t.preventDefault()},_R.events.Event.stopPropagation=n,_R.events.Target=S,_R.events.condition={},_R.events.condition.all=Ca,_R.events.condition.altKeyOnly=Ra,_R.events.condition.altShiftKeysOnly=ba,_R.events.condition.always=La,_R.events.condition.click=function(t){return t.type==Ro.CLICK},_R.events.condition.doubleClick=function(t){return t.type==Ro.DBLCLICK},_R.events.condition.focus=Pa,_R.events.condition.focusWithTabindex=Ia,_R.events.condition.mouseActionButton=Fa,_R.events.condition.mouseOnly=Ga,_R.events.condition.never=Ma,_R.events.condition.noModifierKeys=Oa,_R.events.condition.penOnly=function(t){const e=t.originalEvent;return Ft(void 0!==e,56),"pen"===e.pointerType},_R.events.condition.platformModifierKeyOnly=function(t){const e=t.originalEvent;return!e.altKey&&(dt?e.metaKey:e.ctrlKey)&&!e.shiftKey},_R.events.condition.pointerMove=function(t){return"pointermove"==t.type},_R.events.condition.primaryAction=ka,_R.events.condition.shiftKeyOnly=Na,_R.events.condition.singleClick=Aa,_R.events.condition.targetNotEditable=Da,_R.events.condition.touchOnly=function(t){const e=t.originalEvent;return Ft(void 0!==e,56),"touch"===e.pointerType},_R.events.listen=N,_R.events.listenOnce=D,_R.events.unlistenByKey=G,_R.extent={},_R.extent.applyTransform=Ue,_R.extent.approximatelyEquals=_e,_R.extent.boundingExtent=ne,_R.extent.buffer=re,_R.extent.clone=se,_R.extent.closestSquaredDistanceXY=oe,_R.extent.containsCoordinate=ae,_R.extent.containsExtent=le,_R.extent.containsXY=he,_R.extent.coordinateRelationship=ce,_R.extent.createEmpty=ue,_R.extent.createOrUpdate=de,_R.extent.createOrUpdateEmpty=ge,_R.extent.createOrUpdateFromCoordinate=fe,_R.extent.createOrUpdateFromCoordinates=function(t,e){return ve(ge(e),t)},_R.extent.createOrUpdateFromFlatCoordinates=pe,_R.extent.createOrUpdateFromRings=function(t,e){return we(ge(e),t)},_R.extent.equals=me,_R.extent.extend=ye,_R.extent.extendCoordinate=xe,_R.extent.extendCoordinates=ve,_R.extent.extendFlatCoordinates=Se,_R.extent.extendRings=we,_R.extent.extendXY=Te,_R.extent.forEachCorner=Ee,_R.extent.getArea=Ce,_R.extent.getBottomLeft=Re,_R.extent.getBottomRight=be,_R.extent.getCenter=Pe,_R.extent.getCorner=Ie,_R.extent.getEnlargedArea=function(t,e){const i=Math.min(t[0],e[0]),n=Math.min(t[1],e[1]);return(Math.max(t[2],e[2])-i)*(Math.max(t[3],e[3])-n)},_R.extent.getForViewAndSize=Le,_R.extent.getHeight=Me,_R.extent.getIntersection=Ae,_R.extent.getIntersectionArea=function(t,e){return Ce(Ae(t,e))},_R.extent.getMargin=function(t){return De(t)+Me(t)},_R.extent.getRotatedViewport=Fe,_R.extent.getSize=function(t){return[t[2]-t[0],t[3]-t[1]]},_R.extent.getTopLeft=Oe,_R.extent.getTopRight=Ne,_R.extent.getWidth=De,_R.extent.intersects=Ge,_R.extent.intersectsSegment=ze,_R.extent.isEmpty=ke,_R.extent.returnOrUpdate=je,_R.extent.scaleFromCenter=Be,_R.extent.wrapAndSliceX=Ve,_R.extent.wrapX=Xe,_R.featureloader={},_R.featureloader.loadFeaturesXhr=Dl,_R.featureloader.setWithCredentials=function(t){Nl=t},_R.featureloader.xhr=Gl,_R.format={},_R.format.EsriJSON=ox,_R.format.Feature=f_,_R.format.Feature.transformExtentWithOptions=m_,_R.format.Feature.transformGeometryWithOptions=p_,_R.format.GML=Ax,_R.format.GML2=Px,_R.format.GML3=Fx,_R.format.GML32=Nx,_R.format.GMLBase=ux,_R.format.GMLBase.GMLNS=lx,_R.format.GPX=pv,_R.format.GeoJSON=yv,_R.format.IGC=Cv,_R.format.IIIFInfo=jc,_R.format.JSONFeature=Qy,_R.format.KML=Cw,_R.format.KML.getDefaultFillStyle=function(){return zv},_R.format.KML.getDefaultImageStyle=function(){return Xv},_R.format.KML.getDefaultStrokeStyle=function(){return Wv},_R.format.KML.getDefaultStyle=function(){return Yv},_R.format.KML.getDefaultStyleArray=function(){return qv},_R.format.KML.getDefaultTextStyle=function(){return Zv},_R.format.KML.readFlatCoordinates=tS,_R.format.MVT=X_,_R.format.OSMXML=Fw,_R.format.OWS=qw,_R.format.Polyline=sT,_R.format.Polyline.decodeDeltas=$w,_R.format.Polyline.decodeFloats=Qw,_R.format.Polyline.decodeSignedIntegers=eT,_R.format.Polyline.decodeUnsignedIntegers=nT,_R.format.Polyline.encodeDeltas=Hw,_R.format.Polyline.encodeFloats=Jw,_R.format.Polyline.encodeSignedIntegers=tT,_R.format.Polyline.encodeUnsignedInteger=rT,_R.format.Polyline.encodeUnsignedIntegers=iT,_R.format.TextFeature=vv,_R.format.TopoJSON=dT,_R.format.WFS=LE,_R.format.WFS.writeFilter=function(t,e){const i=id(IE(e=e||"1.1.0"),"Filter"),n={node:i};return Object.assign(n,{version:e,filter:t}),gE(i,t,[n]),i},_R.format.WKB=VE,_R.format.WKT=lC,_R.format.WMSCapabilities=MC,_R.format.WMSGetFeatureInfo=AC,_R.format.WMTSCapabilities=qC,_R.format.XML=Mw,_R.format.XMLFeature=ax,_R.format.filter={},_R.format.filter.And=pT,_R.format.filter.Bbox=mT,_R.format.filter.Comparison=ST,_R.format.filter.ComparisonBinary=TT,_R.format.filter.Contains=yT,_R.format.filter.DWithin=xT,_R.format.filter.Disjoint=vT,_R.format.filter.During=wT,_R.format.filter.EqualTo=ET,_R.format.filter.Filter=gT,_R.format.filter.GreaterThan=CT,_R.format.filter.GreaterThanOrEqualTo=RT,_R.format.filter.Intersects=bT,_R.format.filter.IsBetween=PT,_R.format.filter.IsLike=IT,_R.format.filter.IsNull=LT,_R.format.filter.LessThan=FT,_R.format.filter.LessThanOrEqualTo=MT,_R.format.filter.LogicalNary=fT,_R.format.filter.Not=AT,_R.format.filter.NotEqualTo=OT,_R.format.filter.Or=NT,_R.format.filter.ResourceId=DT,_R.format.filter.Spatial=_T,_R.format.filter.Within=GT,_R.format.filter.and=kT,_R.format.filter.bbox=jT,_R.format.filter.between=function(t,e,i){return new PT(t,e,i)},_R.format.filter.contains=function(t,e,i){return new yT(t,e,i)},_R.format.filter.disjoint=function(t,e,i){return new vT(t,e,i)},_R.format.filter.during=function(t,e,i){return new wT(t,e,i)},_R.format.filter.dwithin=function(t,e,i,n,r){return new xT(t,e,i,n,r)},_R.format.filter.equalTo=function(t,e,i){return new ET(t,e,i)},_R.format.filter.greaterThan=function(t,e){return new CT(t,e)},_R.format.filter.greaterThanOrEqualTo=function(t,e){return new RT(t,e)},_R.format.filter.intersects=function(t,e,i){return new bT(t,e,i)},_R.format.filter.isNull=function(t){return new LT(t)},_R.format.filter.lessThan=function(t,e){return new FT(t,e)},_R.format.filter.lessThanOrEqualTo=function(t,e){return new MT(t,e)},_R.format.filter.like=function(t,e,i,n,r,s){return new IT(t,e,i,n,r,s)},_R.format.filter.not=function(t){return new AT(t)},_R.format.filter.notEqualTo=function(t,e,i){return new OT(t,e,i)},_R.format.filter.or=function(t){const e=[null].concat(Array.prototype.slice.call(arguments));return new(Function.prototype.bind.apply(NT,e))},_R.format.filter.resourceId=function(t){return new DT(t)},_R.format.filter.within=function(t,e,i){return new GT(t,e,i)},_R.format.xlink={},_R.format.xlink.readHref=Aw,_R.format.xsd={},_R.format.xsd.readBoolean=dx,_R.format.xsd.readBooleanString=gx,_R.format.xsd.readDateTime=fx,_R.format.xsd.readDecimal=px,_R.format.xsd.readDecimalString=mx,_R.format.xsd.readNonNegativeIntegerString=yx,_R.format.xsd.readPositiveInteger=_x,_R.format.xsd.readString=xx,_R.format.xsd.writeBooleanTextNode=vx,_R.format.xsd.writeCDATASection=Sx,_R.format.xsd.writeDateTimeTextNode=wx,_R.format.xsd.writeDecimalTextNode=Tx,_R.format.xsd.writeNonNegativeIntegerTextNode=Ex,_R.format.xsd.writeStringTextNode=Cx,_R.functions={},_R.functions.FALSE=p,_R.functions.TRUE=f,_R.functions.VOID=m,_R.functions.memoizeOne=_,_R.functions.toPromise=y,_R.geom={},_R.geom.Circle=Am,_R.geom.Geometry=Nn,_R.geom.GeometryCollection=Dm,_R.geom.LineString=zm,_R.geom.LinearRing=cr,_R.geom.MultiLineString=Xm,_R.geom.MultiPoint=Wm,_R.geom.MultiPolygon=Km,_R.geom.Point=dr,_R.geom.Polygon=Ar,_R.geom.Polygon.circular=Or,_R.geom.Polygon.fromCircle=Dr,_R.geom.Polygon.fromExtent=Nr,_R.geom.Polygon.makeRegular=Gr,_R.geom.SimpleGeometry=kn,_R.geom.SimpleGeometry.getStrideForLayout=Dn,_R.geom.SimpleGeometry.transformGeom2D=Gn,_R.geom.flat={},_R.geom.flat.area={},_R.geom.flat.area.linearRing=or,_R.geom.flat.area.linearRings=ar,_R.geom.flat.area.linearRingss=lr,_R.geom.flat.center={},_R.geom.flat.center.linearRingss=Zm,_R.geom.flat.closest={},_R.geom.flat.closest.arrayMaxSquaredDelta=zn,_R.geom.flat.closest.assignClosestArrayPoint=Vn,_R.geom.flat.closest.assignClosestMultiArrayPoint=Wn,_R.geom.flat.closest.assignClosestPoint=Xn,_R.geom.flat.closest.maxSquaredDelta=Bn,_R.geom.flat.closest.multiArrayMaxSquaredDelta=Un,_R.geom.flat.contains={},_R.geom.flat.contains.linearRingContainsExtent=gr,_R.geom.flat.contains.linearRingContainsXY=fr,_R.geom.flat.contains.linearRingsContainsXY=pr,_R.geom.flat.contains.linearRingssContainsXY=mr,_R.geom.flat.deflate={},_R.geom.flat.deflate.deflateCoordinate=Zn,_R.geom.flat.deflate.deflateCoordinates=Yn,_R.geom.flat.deflate.deflateCoordinatesArray=Kn,_R.geom.flat.deflate.deflateMultiCoordinatesArray=qn,_R.geom.flat.flip={},_R.geom.flat.flip.flipXY=$y,_R.geom.flat.geodesic={},_R.geom.flat.geodesic.greatCircleArc=function(t,e,i,n,r,s){const o=an("EPSG:4326"),a=Math.cos(wi(e)),l=Math.sin(wi(e)),h=Math.cos(wi(n)),c=Math.sin(wi(n)),u=Math.cos(wi(i-t)),d=Math.sin(wi(i-t)),g=l*c+a*h*u;return n_((function(e){if(1<=g)return[i,n];const r=e*Math.acos(g),s=Math.cos(r),o=Math.sin(r),f=d*h,p=a*c-l*h*u,m=Math.atan2(f,p),_=Math.asin(l*s+a*o*Math.cos(m));return[Si(wi(t)+Math.atan2(Math.sin(m)*o*a,s-l*Math.sin(_))),Si(_)]}),mn(o,r),s)},_R.geom.flat.geodesic.meridian=r_,_R.geom.flat.geodesic.parallel=s_,_R.geom.flat.inflate={},_R.geom.flat.inflate.inflateCoordinates=nr,_R.geom.flat.inflate.inflateCoordinatesArray=rr,_R.geom.flat.inflate.inflateMultiCoordinatesArray=sr,_R.geom.flat.interiorpoint={},_R.geom.flat.interiorpoint.getInteriorPointOfArray=_r,_R.geom.flat.interiorpoint.getInteriorPointsOfMultiArray=yr,_R.geom.flat.interpolate={},_R.geom.flat.interpolate.interpolatePoint=Gm,_R.geom.flat.interpolate.lineStringCoordinateAtM=km,_R.geom.flat.interpolate.lineStringsCoordinateAtM=jm,_R.geom.flat.intersectsextent={},_R.geom.flat.intersectsextent.intersectsLineString=vr,_R.geom.flat.intersectsextent.intersectsLineStringArray=Sr,_R.geom.flat.intersectsextent.intersectsLinearRing=wr,_R.geom.flat.intersectsextent.intersectsLinearRingArray=Tr,_R.geom.flat.intersectsextent.intersectsLinearRingMultiArray=Er,_R.geom.flat.length={},_R.geom.flat.length.lineStringLength=hm,_R.geom.flat.length.linearRingLength=function(t,e,i,n){let r=hm(t,e,i,n);const s=t[i-n]-t[e],o=t[i-n+1]-t[e+1];return r+=Math.sqrt(s*s+o*o),r},_R.geom.flat.orient={},_R.geom.flat.orient.inflateEnds=Fr,_R.geom.flat.orient.linearRingIsClockwise=Rr,_R.geom.flat.orient.linearRingsAreOriented=br,_R.geom.flat.orient.linearRingssAreOriented=Pr,_R.geom.flat.orient.orientLinearRings=Ir,_R.geom.flat.orient.orientLinearRingsArray=Lr,_R.geom.flat.reverse={},_R.geom.flat.reverse.coordinates=Cr,_R.geom.flat.segments={},_R.geom.flat.segments.forEach=xr,_R.geom.flat.simplify={},_R.geom.flat.simplify.douglasPeucker=Hn,_R.geom.flat.simplify.douglasPeuckerArray=$n,_R.geom.flat.simplify.douglasPeuckerMultiArray=function(t,e,i,n,r,s,o,a){for(let l=0,h=i.length;l3&&!!or(t,e,i,n)},_R.geom.flat.transform={},_R.geom.flat.transform.rotate=Fn,_R.geom.flat.transform.scale=Mn,_R.geom.flat.transform.transform2D=Ln,_R.geom.flat.transform.translate=An,_R.has={},_R.has.DEVICE_PIXEL_RATIO=gt,_R.has.FIREFOX=lt,_R.has.IMAGE_DECODE=pt,_R.has.MAC=dt,_R.has.PASSIVE_EVENT_LISTENERS=mt,_R.has.SAFARI=ht,_R.has.SAFARI_BUG_237906=ct,_R.has.WEBKIT=ut,_R.has.WORKER_OFFSCREEN_CANVAS=ft,_R.interaction={},_R.interaction.DoubleClickZoom=wa,_R.interaction.DragAndDrop=ty,_R.interaction.DragAndDrop.DragAndDropEvent=Q_,_R.interaction.DragBox=Ya,_R.interaction.DragBox.DragBoxEvent=Za,_R.interaction.DragPan=ja,_R.interaction.DragRotate=Ba,_R.interaction.DragRotateAndZoom=ey,_R.interaction.DragZoom=Ka,_R.interaction.Draw=my,_R.interaction.Draw.DrawEvent=sy,_R.interaction.Draw.createBox=function(){return function(t,e,i){const n=ne([t[0],t[t.length-1]].map((function(t){return Tn(t,i)}))),r=[[Re(n),be(n),Ne(n),Oe(n),Re(n)]];e?e.setCoordinates(r):e=new Ar(r);const s=Sn();return s&&e.transform(i,s),e}},_R.interaction.Draw.createRegularPolygon=function(t,e){return function(i,n,r){const s=Tn(i[0],r),o=Tn(i[i.length-1],r),a=Math.sqrt(ji(s,o));n=n||Dr(new Am(s),t);let l=e;if(!e&&0!==e){const t=o[0]-s[0],e=o[1]-s[1];l=Math.atan2(e,t)}Gr(n,s,a,l);const h=Sn();return h&&n.transform(r,h),n}},_R.interaction.Extent=Ty,_R.interaction.Extent.ExtentEvent=yy,_R.interaction.Interaction=Sa,_R.interaction.Interaction.pan=xa,_R.interaction.Interaction.zoomByDelta=va,_R.interaction.KeyboardPan=Qa,_R.interaction.KeyboardZoom=tl,_R.interaction.Link=by,_R.interaction.Modify=Gy,_R.interaction.Modify.ModifyEvent=My,_R.interaction.MouseWheelZoom=el,_R.interaction.PinchRotate=il,_R.interaction.PinchZoom=nl,_R.interaction.Pointer=Ea,_R.interaction.Pointer.centroid=Ta,_R.interaction.Select=Uy,_R.interaction.Select.SelectEvent=jy,_R.interaction.Snap=Wy,_R.interaction.Translate=Hy,_R.interaction.Translate.TranslateEvent=qy,_R.interaction.defaults={},_R.interaction.defaults.defaults=rl,_R.layer={},_R.layer.Base=Fs,_R.layer.BaseImage=su,_R.layer.BaseTile=fu,_R.layer.BaseVector=Af,_R.layer.Graticule=l_,_R.layer.Group=To,_R.layer.Group.GroupEvent=vo,_R.layer.Heatmap=g_,_R.layer.Image=uu,_R.layer.Layer=ks,_R.layer.Layer.inView=Gs,_R.layer.MapboxVector=Z_,_R.layer.Tile=mu,_R.layer.Vector=i_,_R.layer.VectorImage=Y_,_R.layer.VectorTile=V_,_R.layer.WebGLPoints=K_,_R.layer.WebGLTile=$_,_R.loadingstrategy={},_R.loadingstrategy.all=kl,_R.loadingstrategy.bbox=function(t,e){return[t]},_R.loadingstrategy.tile=function(t){return function(e,i,n){const r=t.getZForResolution(bn(i,n)),s=t.getTileRangeForExtentAndZ(Cn(e,n),r),o=[],a=[r,0,0];for(a[1]=s.minX;a[1]<=s.maxX;++a[1])for(a[2]=s.minY;a[2]<=s.maxY;++a[2])o.push(En(t.getTileCoordExtent(a),n));return o}},_R.math={},_R.math.ceil=Pi,_R.math.clamp=_i,_R.math.floor=bi,_R.math.lerp=Ei,_R.math.modulo=Ti,_R.math.round=Ri,_R.math.solveLinearSystem=vi,_R.math.squaredDistance=xi,_R.math.squaredSegmentDistance=yi,_R.math.toDegrees=Si,_R.math.toFixed=Ci,_R.math.toRadians=wi,_R.net={},_R.net.ClientError=zl,_R.net.ResponseError=Bl,_R.net.getJSON=Ul,_R.net.jsonp=jl,_R.net.overrideXHR=function(t){"undefined"!=typeof XMLHttpRequest&&(Ol=XMLHttpRequest),global.XMLHttpRequest=t},_R.net.resolveUrl=Xl,_R.net.restoreXHR=function(){global.XMLHttpRequest=Ol},_R.obj={},_R.obj.clear=x,_R.obj.isEmpty=v,_R.proj={},_R.proj.Projection=Ke,_R.proj.Units={},_R.proj.Units.METERS_PER_UNIT=Ye,_R.proj.Units.fromCode=Ze,_R.proj.addCommon=In,_R.proj.addCoordinateTransforms=gn,_R.proj.addEquivalentProjections=hn,_R.proj.addEquivalentTransforms=cn,_R.proj.addProjection=sn,_R.proj.addProjections=on,_R.proj.clearAllProjections=function(){ci(),fi()},_R.proj.clearUserProjection=function(){xn=null},_R.proj.cloneTransform=nn,_R.proj.createProjection=un,_R.proj.createSafeCoordinateTransform=Pn,_R.proj.createTransformFromCoordinateTransform=dn,_R.proj.disableCoordinateWarning=en,_R.proj.epsg3857={},_R.proj.epsg3857.EXTENT=$e,_R.proj.epsg3857.HALF_SIZE=He,_R.proj.epsg3857.MAX_SAFE_Y=Qe,_R.proj.epsg3857.PROJECTIONS=ei,_R.proj.epsg3857.RADIUS=qe,_R.proj.epsg3857.WORLD_EXTENT=Je,_R.proj.epsg3857.fromEPSG4326=ii,_R.proj.epsg3857.toEPSG4326=ni,_R.proj.epsg4326={},_R.proj.epsg4326.EXTENT=si,_R.proj.epsg4326.METERS_PER_UNIT=oi,_R.proj.epsg4326.PROJECTIONS=li,_R.proj.epsg4326.RADIUS=ri,_R.proj.equivalent=fn,_R.proj.fromLonLat=function(t,e){return en(),_n(t,"EPSG:4326",void 0!==e?e:"EPSG:3857")},_R.proj.fromUserCoordinate=Tn,_R.proj.fromUserExtent=Cn,_R.proj.fromUserResolution=bn,_R.proj.get=an,_R.proj.getPointResolution=ln,_R.proj.getTransform=mn,_R.proj.getTransformFromProjections=pn,_R.proj.getUserProjection=Sn,_R.proj.identityTransform=rn,_R.proj.proj4={},_R.proj.proj4.fromEPSGCode=async function(t){"string"==typeof t&&(t=parseInt(t.split(":").pop(),10));const e=Qm;if(!e)throw new Error("Proj4 must be registered first with register(proj4)");const i="EPSG:"+t;return e.defs(i)||(e.defs(i,await e_(t)),t_(e)),an(i)},_R.proj.proj4.getEPSGLookup=function(){return e_},_R.proj.proj4.isRegistered=function(){return!!Qm},_R.proj.proj4.register=t_,_R.proj.proj4.setEPSGLookup=function(t){e_=t},_R.proj.proj4.unregister=function(){Qm=null},_R.proj.projections={},_R.proj.projections.add=di,_R.proj.projections.clear=ci,_R.proj.projections.get=ui,_R.proj.setUserProjection=vn,_R.proj.toLonLat=function(t,e){const i=_n(t,void 0!==e?e:"EPSG:3857","EPSG:4326"),n=i[0];return(n<-180||n>180)&&(i[0]=Ti(n+180,360)-180),i},_R.proj.toUserCoordinate=wn,_R.proj.toUserExtent=En,_R.proj.toUserResolution=Rn,_R.proj.transform=_n,_R.proj.transformExtent=yn,_R.proj.transformWithProjections=function(t,e,i){return pn(e,i)(t)},_R.proj.transforms={},_R.proj.transforms.add=pi,_R.proj.transforms.clear=fi,_R.proj.transforms.get=mi,_R.proj.transforms.remove=function(t,e){const i=t.getCode(),n=e.getCode(),r=gi[i][n];return delete gi[i][n],v(gi[i])&&delete gi[i],r},_R.proj.useGeographic=function(){vn("EPSG:4326")},_R.render={},_R.render.Box=za,_R.render.Event=zs,_R.render.Feature=Jm,_R.render.Feature.toFeature=function(t,e){const i=t.getId(),n=$m(t),r=t.getProperties(),s=new Ot;return void 0!==e&&s.setGeometryName(e),s.setGeometry(n),void 0!==i&&s.setId(i),s.setProperties(r,!0),s},_R.render.Feature.toGeometry=$m,_R.render.VectorContext=Vl,_R.render.canvas={},_R.render.canvas.Builder=Qp,_R.render.canvas.BuilderGroup=am,_R.render.canvas.Executor=xm,_R.render.canvas.ExecutorGroup=Tm,_R.render.canvas.ExecutorGroup.getPixelIndexArray=wm,_R.render.canvas.ImageBuilder=tm,_R.render.canvas.Immediate=Wl,_R.render.canvas.Instruction={},_R.render.canvas.Instruction.beginPathInstruction=$p,_R.render.canvas.Instruction.closePathInstruction=Jp,_R.render.canvas.Instruction.fillInstruction=qp,_R.render.canvas.Instruction.strokeInstruction=Hp,_R.render.canvas.LineStringBuilder=em,_R.render.canvas.PolygonBuilder=im,_R.render.canvas.TextBuilder=sm,_R.render.canvas.checkedFonts=ao,_R.render.canvas.defaultFillStyle=Js,_R.render.canvas.defaultFont=$s,_R.render.canvas.defaultLineCap=Qs,_R.render.canvas.defaultLineDash=to,_R.render.canvas.defaultLineDashOffset=0,_R.render.canvas.defaultLineJoin=eo,_R.render.canvas.defaultLineWidth=1,_R.render.canvas.defaultMiterLimit=io,_R.render.canvas.defaultPadding=oo,_R.render.canvas.defaultStrokeStyle=no,_R.render.canvas.defaultTextAlign=ro,_R.render.canvas.defaultTextBaseline=so,_R.render.canvas.drawImageOrLabel=yo,_R.render.canvas.getTextDimensions=_o,_R.render.canvas.hitdetect={},_R.render.canvas.hitdetect.HIT_DETECT_RESOLUTION=Em,_R.render.canvas.hitdetect.createHitDetectionImageData=Cm,_R.render.canvas.hitdetect.hitDetect=Rm,_R.render.canvas.measureAndCacheTextWidth=mo,_R.render.canvas.measureTextHeight=go,_R.render.canvas.measureTextWidth=po,_R.render.canvas.registerFont=uo,_R.render.canvas.rotateAtOffset=function(t,e,i,n){0!==e&&(t.translate(i,n),t.rotate(e),t.translate(-i,-n))},_R.render.canvas.textHeights=co,_R.render.getRenderPixel=function(t,e){return zt(t.inversePixelTransform,e.slice(0))},_R.render.getVectorContext=Jl,_R.render.toContext=function(t,e){const i=t.canvas,n=(e=e||{}).pixelRatio||gt,r=e.size;r&&(i.width=r[0]*n,i.height=r[1]*n,i.style.width=r[0]+"px",i.style.height=r[1]+"px");const s=[0,0,i.width,i.height],o=Xt([1,0,0,1,0,0],n,n);return new Wl(t,n,s,o,0)},_R.render.webgl={},_R.render.webgl.BatchRenderer=yp,_R.render.webgl.LineStringBatchRenderer=vp,_R.render.webgl.MixedGeometryBatch=Sp,_R.render.webgl.PointBatchRenderer=Tp,_R.render.webgl.PolygonBatchRenderer=Cp,_R.render.webgl.utils={},_R.render.webgl.utils.colorDecodeId=fp,_R.render.webgl.utils.colorEncodeId=gp,_R.render.webgl.utils.getBlankImageData=function(){const t=document.createElement("canvas").getContext("2d").createImageData(1,1);return t.data[0]=255,t.data[1]=255,t.data[2]=255,t.data[3]=255,t},_R.render.webgl.utils.writeLineSegmentToBuffers=function(t,e,i,n,r,s,o,a,l,h){const c=5+a.length,u=s.length/c,d=[t[e+0],t[e+1]],g=[t[i],t[i+1]],f=zt(h,[...d]),p=zt(h,[...g]);function m(t,e,i){const n=1e4;return Math.round(1500*e)+Math.round(1500*i)*n+t*n*n}function _(t,e,i){const n=Math.sqrt((e[0]-t[0])*(e[0]-t[0])+(e[1]-t[1])*(e[1]-t[1])),r=[(e[0]-t[0])/n,(e[1]-t[1])/n],s=[-r[1],r[0]],o=Math.sqrt((i[0]-t[0])*(i[0]-t[0])+(i[1]-t[1])*(i[1]-t[1])),a=[(i[0]-t[0])/o,(i[1]-t[1])/o],l=0===n||0===o?0:Math.acos(_i(a[0]*r[0]+a[1]*r[1],-1,1));return a[0]*s[0]+a[1]*s[1]>0?l:2*Math.PI-l}const y=null!==r;let x=0,v=0;if(null!==n){x=_(f,p,zt(h,[...[t[n],t[n+1]]]))}if(y){v=_(p,f,zt(h,[...[t[r],t[r+1]]]))}s.push(d[0],d[1],g[0],g[1],m(0,x,v)),s.push(...a),s.push(d[0],d[1],g[0],g[1],m(1,x,v)),s.push(...a),s.push(d[0],d[1],g[0],g[1],m(2,x,v)),s.push(...a),s.push(d[0],d[1],g[0],g[1],m(3,x,v)),s.push(...a),o.push(u,u+1,u+2,u+1,u+3,u+2)},_R.render.webgl.utils.writePointFeatureToBuffers=function(t,e,i,n,r,s){const o=3+r,a=t[e+0],l=t[e+1],h=cp;h.length=r;for(let i=0;i1?"projection"in e?i.TileMatrixSetLink.findIndex((function(t){const i=n.find((function(e){return e.Identifier==t.TileMatrixSet})).SupportedCRS,r=an(i),s=an(e.projection);return r&&s?fn(r,s):i==e.projection})):i.TileMatrixSetLink.findIndex((function(t){return t.TileMatrixSet==e.matrixSet})):0,r<0&&(r=0);const s=i.TileMatrixSetLink[r].TileMatrixSet,o=i.TileMatrixSetLink[r].TileMatrixSetLimits;let a=i.Format[0];"format"in e&&(a=e.format),r=i.Style.findIndex((function(t){return"style"in e?t.Title==e.style:t.isDefault})),r<0&&(r=0);const l=i.Style[r].Identifier,h={};"Dimension"in i&&i.Dimension.forEach((function(t,e,i){const n=t.Identifier;let r=t.Default;void 0===r&&(r=t.Value[0]),h[n]=r}));const c=t.Contents.TileMatrixSet.find((function(t){return t.Identifier==s}));let u;const d=c.SupportedCRS;if(d&&(u=an(d)),"projection"in e){const t=an(e.projection);t&&(u&&!fn(t,u)||(u=t))}let g=!1;const f="ne"==u.getAxisOrientation().substr(0,2);let p=c.TileMatrix[0],m={MinTileCol:0,MinTileRow:0,MaxTileCol:p.MatrixWidth-1,MaxTileRow:p.MatrixHeight-1};if(o){m=o[o.length-1];const t=c.TileMatrix.find((t=>t.Identifier===m.TileMatrix||c.Identifier+":"+t.Identifier===m.TileMatrix));t&&(p=t)}const _=28e-5*p.ScaleDenominator/u.getMetersPerUnit(),y=f?[p.TopLeftCorner[1],p.TopLeftCorner[0]]:p.TopLeftCorner,x=p.TileWidth*_,v=p.TileHeight*_;let S=c.BoundingBox;S&&f&&(S=[S[1],S[0],S[3],S[2]]);let w=[y[0]+x*m.MinTileCol,y[1]-v*(1+m.MaxTileRow),y[0]+x*(1+m.MaxTileCol),y[1]-v*m.MinTileRow];if(void 0!==S&&!le(S,w)){const t=i.WGS84BoundingBox,e=an("EPSG:4326").getExtent();if(w=S,t)g=t[0]===e[0]&&t[2]===e[2];else{const t=yn(S,c.SupportedCRS,"EPSG:4326");g=t[0]-1e-10<=e[0]&&t[2]+1e-10>=e[2]}}const T=Wu(c,w,o),E=[];let C=e.requestEncoding;if(C=void 0!==C?C:"","OperationsMetadata"in t&&"GetTile"in t.OperationsMetadata){const e=t.OperationsMetadata.GetTile.DCP.HTTP.Get;for(let t=0,i=e.length;t{const n=t.toString();if(!i.containsKey(n)){const r=e(t);i.set(n,r)}a.push(i.get(n))})),a}},_R.source.wms={},_R.source.wms.DEFAULT_VERSION=tu,_R.sphere={},_R.sphere.DEFAULT_RADIUS=Wi,_R.sphere.getArea=function t(e,i){const n=(i=i||{}).radius||Wi,r=i.projection||"EPSG:3857",s=e.getType();"GeometryCollection"!==s&&(e=e.clone().transform(r,"EPSG:4326"));let o,a,l,h,c,u,d=0;switch(s){case"Point":case"MultiPoint":case"LineString":case"MultiLineString":case"LinearRing":break;case"Polygon":for(o=e.getCoordinates(),d=Math.abs(Ki(o[0],n)),l=1,h=o.length;l} */\nconst messages = {\n 1: 'The view center is not defined',\n 2: 'The view resolution is not defined',\n 3: 'The view rotation is not defined',\n 4: '`image` and `src` cannot be provided at the same time',\n 5: '`imgSize` must be set when `image` is provided',\n 7: '`format` must be set when `url` is set',\n 8: 'Unknown `serverType` configured',\n 9: '`url` must be configured or set using `#setUrl()`',\n 10: 'The default `geometryFunction` can only handle `Point` geometries',\n 11: '`options.featureTypes` must be an Array',\n 12: '`options.geometryName` must also be provided when `options.bbox` is set',\n 13: 'Invalid corner',\n 14: 'Invalid color',\n 15: 'Tried to get a value for a key that does not exist in the cache',\n 16: 'Tried to set a value for a key that is used already',\n 17: '`resolutions` must be sorted in descending order',\n 18: 'Either `origin` or `origins` must be configured, never both',\n 19: 'Number of `tileSizes` and `resolutions` must be equal',\n 20: 'Number of `origins` and `resolutions` must be equal',\n 22: 'Either `tileSize` or `tileSizes` must be configured, never both',\n 24: 'Invalid extent or geometry provided as `geometry`',\n 25: 'Cannot fit empty extent provided as `geometry`',\n 26: 'Features must have an id set',\n 27: 'Features must have an id set',\n 28: '`renderMode` must be `\"hybrid\"` or `\"vector\"`',\n 30: 'The passed `feature` was already added to the source',\n 31: 'Tried to enqueue an `element` that was already added to the queue',\n 32: 'Transformation matrix cannot be inverted',\n 33: 'Invalid units',\n 34: 'Invalid geometry layout',\n 36: 'Unknown SRS type',\n 37: 'Unknown geometry type found',\n 38: '`styleMapValue` has an unknown type',\n 39: 'Unknown geometry type',\n 40: 'Expected `feature` to have a geometry',\n 41: 'Expected an `ol/style/Style` or an array of `ol/style/Style.js`',\n 42: 'Question unknown, the answer is 42',\n 43: 'Expected `layers` to be an array or a `Collection`',\n 47: 'Expected `controls` to be an array or an `ol/Collection`',\n 48: 'Expected `interactions` to be an array or an `ol/Collection`',\n 49: 'Expected `overlays` to be an array or an `ol/Collection`',\n 50: '`options.featureTypes` should be an Array',\n 51: 'Either `url` or `tileJSON` options must be provided',\n 52: 'Unknown `serverType` configured',\n 53: 'Unknown `tierSizeCalculation` configured',\n 55: 'The {-y} placeholder requires a tile grid with extent',\n 56: 'mapBrowserEvent must originate from a pointer event',\n 57: 'At least 2 conditions are required',\n 59: 'Invalid command found in the PBF',\n 60: 'Missing or invalid `size`',\n 61: 'Cannot determine IIIF Image API version from provided image information JSON',\n 62: 'A `WebGLArrayBuffer` must either be of type `ELEMENT_ARRAY_BUFFER` or `ARRAY_BUFFER`',\n 64: 'Layer opacity must be a number',\n 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`',\n 67: 'A layer can only be added to the map once. Use either `layer.setMap()` or `map.addLayer()`, not both',\n 68: 'A VectorTile source can only be rendered if it has a projection compatible with the view projection',\n 69: '`width` or `height` cannot be provided together with `scale`',\n};\n\n/**\n * Error object thrown when an assertion failed. This is an ECMA-262 Error,\n * extended with a `code` property.\n * See https://developer.mozilla.org/en-US/docs/Web/JavaScript/Reference/Global_Objects/Error.\n */\nclass AssertionError extends Error {\n /**\n * @param {number} code Error code.\n */\n constructor(code) {\n const message = messages[code];\n\n super(message);\n\n /**\n * Error code. The meaning of the code can be found on\n * https://openlayers.org/en/latest/doc/errors/ (replace `latest` with\n * the version found in the OpenLayers script's header comment if a version\n * other than the latest is used).\n * @type {number}\n * @deprecated ol/AssertionError and error codes will be removed in v8.0\n * @api\n */\n this.code = code;\n\n /**\n * @type {string}\n */\n this.name = 'AssertionError';\n\n // Re-assign message, see https://github.com/Rich-Harris/buble/issues/40\n this.message = message;\n }\n}\n\nexport default AssertionError;\n","/**\n * @module ol/events/Event\n */\n\n/**\n * @classdesc\n * Stripped down implementation of the W3C DOM Level 2 Event interface.\n * See https://www.w3.org/TR/DOM-Level-2-Events/events.html#Events-interface.\n *\n * This implementation only provides `type` and `target` properties, and\n * `stopPropagation` and `preventDefault` methods. It is meant as base class\n * for higher level events defined in the library, and works with\n * {@link module:ol/events/Target~Target}.\n */\nclass BaseEvent {\n /**\n * @param {string} type Type.\n */\n constructor(type) {\n /**\n * @type {boolean}\n */\n this.propagationStopped;\n\n /**\n * @type {boolean}\n */\n this.defaultPrevented;\n\n /**\n * The event type.\n * @type {string}\n * @api\n */\n this.type = type;\n\n /**\n * The event target.\n * @type {Object}\n * @api\n */\n this.target = null;\n }\n\n /**\n * Prevent default. This means that no emulated `click`, `singleclick` or `doubleclick` events\n * will be fired.\n * @api\n */\n preventDefault() {\n this.defaultPrevented = true;\n }\n\n /**\n * Stop event propagation.\n * @api\n */\n stopPropagation() {\n this.propagationStopped = true;\n }\n}\n\n/**\n * @param {Event|import(\"./Event.js\").default} evt Event\n */\nexport function stopPropagation(evt) {\n evt.stopPropagation();\n}\n\n/**\n * @param {Event|import(\"./Event.js\").default} evt Event\n */\nexport function preventDefault(evt) {\n evt.preventDefault();\n}\n\nexport default BaseEvent;\n","/**\n * @module ol/ObjectEventType\n */\n\n/**\n * @enum {string}\n */\nexport default {\n /**\n * Triggered when a property is changed.\n * @event module:ol/Object.ObjectEvent#propertychange\n * @api\n */\n PROPERTYCHANGE: 'propertychange',\n};\n\n/**\n * @typedef {'propertychange'} Types\n */\n","/**\n * @module ol/Disposable\n */\n\n/**\n * @classdesc\n * Objects that need to clean up after themselves.\n */\nclass Disposable {\n constructor() {\n /**\n * The object has already been disposed.\n * @type {boolean}\n * @protected\n */\n this.disposed = false;\n }\n\n /**\n * Clean up.\n */\n dispose() {\n if (!this.disposed) {\n this.disposed = true;\n this.disposeInternal();\n }\n }\n\n /**\n * Extension point for disposable objects.\n * @protected\n */\n disposeInternal() {}\n}\n\nexport default Disposable;\n","/**\n * @module ol/array\n */\n\n/**\n * Performs a binary search on the provided sorted list and returns the index of the item if found. If it can't be found it'll return -1.\n * https://github.com/darkskyapp/binary-search\n *\n * @param {Array<*>} haystack Items to search through.\n * @param {*} needle The item to look for.\n * @param {Function} [comparator] Comparator function.\n * @return {number} The index of the item if found, -1 if not.\n */\nexport function binarySearch(haystack, needle, comparator) {\n let mid, cmp;\n comparator = comparator || ascending;\n let low = 0;\n let high = haystack.length;\n let found = false;\n\n while (low < high) {\n /* Note that \"(low + high) >>> 1\" may overflow, and results in a typecast\n * to double (which gives the wrong results). */\n mid = low + ((high - low) >> 1);\n cmp = +comparator(haystack[mid], needle);\n\n if (cmp < 0.0) {\n /* Too low. */\n low = mid + 1;\n } else {\n /* Key found or too high */\n high = mid;\n found = !cmp;\n }\n }\n\n /* Key not found. */\n return found ? low : ~low;\n}\n\n/**\n * Compare function sorting arrays in ascending order. Safe to use for numeric values.\n * @param {*} a The first object to be compared.\n * @param {*} b The second object to be compared.\n * @return {number} A negative number, zero, or a positive number as the first\n * argument is less than, equal to, or greater than the second.\n */\nexport function ascending(a, b) {\n return a > b ? 1 : a < b ? -1 : 0;\n}\n\n/**\n * {@link module:ol/tilegrid/TileGrid~TileGrid#getZForResolution} can use a function\n * of this type to determine which nearest resolution to use.\n *\n * This function takes a `{number}` representing a value between two array entries,\n * a `{number}` representing the value of the nearest higher entry and\n * a `{number}` representing the value of the nearest lower entry\n * as arguments and returns a `{number}`. If a negative number or zero is returned\n * the lower value will be used, if a positive number is returned the higher value\n * will be used.\n * @typedef {function(number, number, number): number} NearestDirectionFunction\n * @api\n */\n\n/**\n * @param {Array} arr Array in descending order.\n * @param {number} target Target.\n * @param {number|NearestDirectionFunction} direction\n * 0 means return the nearest,\n * > 0 means return the largest nearest,\n * < 0 means return the smallest nearest.\n * @return {number} Index.\n */\nexport function linearFindNearest(arr, target, direction) {\n const n = arr.length;\n if (arr[0] <= target) {\n return 0;\n } else if (target <= arr[n - 1]) {\n return n - 1;\n }\n let i;\n if (direction > 0) {\n for (i = 1; i < n; ++i) {\n if (arr[i] < target) {\n return i - 1;\n }\n }\n } else if (direction < 0) {\n for (i = 1; i < n; ++i) {\n if (arr[i] <= target) {\n return i;\n }\n }\n } else {\n for (i = 1; i < n; ++i) {\n if (arr[i] == target) {\n return i;\n } else if (arr[i] < target) {\n if (typeof direction === 'function') {\n if (direction(target, arr[i - 1], arr[i]) > 0) {\n return i - 1;\n }\n return i;\n } else if (arr[i - 1] - target < target - arr[i]) {\n return i - 1;\n }\n return i;\n }\n }\n }\n return n - 1;\n}\n\n/**\n * @param {Array<*>} arr Array.\n * @param {number} begin Begin index.\n * @param {number} end End index.\n */\nexport function reverseSubArray(arr, begin, end) {\n while (begin < end) {\n const tmp = arr[begin];\n arr[begin] = arr[end];\n arr[end] = tmp;\n ++begin;\n --end;\n }\n}\n\n/**\n * @param {Array} arr The array to modify.\n * @param {!Array|VALUE} data The elements or arrays of elements to add to arr.\n * @template VALUE\n */\nexport function extend(arr, data) {\n const extension = Array.isArray(data) ? data : [data];\n const length = extension.length;\n for (let i = 0; i < length; i++) {\n arr[arr.length] = extension[i];\n }\n}\n\n/**\n * @param {Array} arr The array to modify.\n * @param {VALUE} obj The element to remove.\n * @template VALUE\n * @return {boolean} If the element was removed.\n */\nexport function remove(arr, obj) {\n const i = arr.indexOf(obj);\n const found = i > -1;\n if (found) {\n arr.splice(i, 1);\n }\n return found;\n}\n\n/**\n * @param {Array|Uint8ClampedArray} arr1 The first array to compare.\n * @param {Array|Uint8ClampedArray} arr2 The second array to compare.\n * @return {boolean} Whether the two arrays are equal.\n */\nexport function equals(arr1, arr2) {\n const len1 = arr1.length;\n if (len1 !== arr2.length) {\n return false;\n }\n for (let i = 0; i < len1; i++) {\n if (arr1[i] !== arr2[i]) {\n return false;\n }\n }\n return true;\n}\n\n/**\n * Sort the passed array such that the relative order of equal elements is preserved.\n * See https://en.wikipedia.org/wiki/Sorting_algorithm#Stability for details.\n * @param {Array<*>} arr The array to sort (modifies original).\n * @param {!function(*, *): number} compareFnc Comparison function.\n * @api\n */\nexport function stableSort(arr, compareFnc) {\n const length = arr.length;\n const tmp = Array(arr.length);\n let i;\n for (i = 0; i < length; i++) {\n tmp[i] = {index: i, value: arr[i]};\n }\n tmp.sort(function (a, b) {\n return compareFnc(a.value, b.value) || a.index - b.index;\n });\n for (i = 0; i < arr.length; i++) {\n arr[i] = tmp[i].value;\n }\n}\n\n/**\n * @param {Array<*>} arr The array to test.\n * @param {Function} [func] Comparison function.\n * @param {boolean} [strict] Strictly sorted (default false).\n * @return {boolean} Return index.\n */\nexport function isSorted(arr, func, strict) {\n const compare = func || ascending;\n return arr.every(function (currentVal, index) {\n if (index === 0) {\n return true;\n }\n const res = compare(arr[index - 1], currentVal);\n return !(res > 0 || (strict && res === 0));\n });\n}\n","/**\n * @module ol/functions\n */\n\nimport {equals as arrayEquals} from './array.js';\n\n/**\n * Always returns true.\n * @return {boolean} true.\n */\nexport function TRUE() {\n return true;\n}\n\n/**\n * Always returns false.\n * @return {boolean} false.\n */\nexport function FALSE() {\n return false;\n}\n\n/**\n * A reusable function, used e.g. as a default for callbacks.\n *\n * @return {void} Nothing.\n */\nexport function VOID() {}\n\n/**\n * Wrap a function in another function that remembers the last return. If the\n * returned function is called twice in a row with the same arguments and the same\n * this object, it will return the value from the first call in the second call.\n *\n * @param {function(...any): ReturnType} fn The function to memoize.\n * @return {function(...any): ReturnType} The memoized function.\n * @template ReturnType\n */\nexport function memoizeOne(fn) {\n let called = false;\n\n /** @type {ReturnType} */\n let lastResult;\n\n /** @type {Array} */\n let lastArgs;\n\n let lastThis;\n\n return function () {\n const nextArgs = Array.prototype.slice.call(arguments);\n if (!called || this !== lastThis || !arrayEquals(nextArgs, lastArgs)) {\n called = true;\n lastThis = this;\n lastArgs = nextArgs;\n lastResult = fn.apply(this, arguments);\n }\n return lastResult;\n };\n}\n\n/**\n * @template T\n * @param {function(): (T | Promise)} getter A function that returns a value or a promise for a value.\n * @return {Promise} A promise for the value.\n */\nexport function toPromise(getter) {\n function promiseGetter() {\n let value;\n try {\n value = getter();\n } catch (err) {\n return Promise.reject(err);\n }\n if (value instanceof Promise) {\n return value;\n }\n return Promise.resolve(value);\n }\n return promiseGetter();\n}\n","/**\n * @module ol/obj\n */\n\n/**\n * Removes all properties from an object.\n * @param {Object} object The object to clear.\n */\nexport function clear(object) {\n for (const property in object) {\n delete object[property];\n }\n}\n\n/**\n * Determine if an object has any properties.\n * @param {Object} object The object to check.\n * @return {boolean} The object is empty.\n */\nexport function isEmpty(object) {\n let property;\n for (property in object) {\n return false;\n }\n return !property;\n}\n","/**\n * @module ol/events/Target\n */\nimport Disposable from '../Disposable.js';\nimport Event from './Event.js';\nimport {VOID} from '../functions.js';\nimport {clear} from '../obj.js';\n\n/**\n * @typedef {EventTarget|Target} EventTargetLike\n */\n\n/**\n * @classdesc\n * A simplified implementation of the W3C DOM Level 2 EventTarget interface.\n * See https://www.w3.org/TR/2000/REC-DOM-Level-2-Events-20001113/events.html#Events-EventTarget.\n *\n * There are two important simplifications compared to the specification:\n *\n * 1. The handling of `useCapture` in `addEventListener` and\n * `removeEventListener`. There is no real capture model.\n * 2. The handling of `stopPropagation` and `preventDefault` on `dispatchEvent`.\n * There is no event target hierarchy. When a listener calls\n * `stopPropagation` or `preventDefault` on an event object, it means that no\n * more listeners after this one will be called. Same as when the listener\n * returns false.\n */\nclass Target extends Disposable {\n /**\n * @param {*} [target] Default event target for dispatched events.\n */\n constructor(target) {\n super();\n\n /**\n * @private\n * @type {*}\n */\n this.eventTarget_ = target;\n\n /**\n * @private\n * @type {Object}\n */\n this.pendingRemovals_ = null;\n\n /**\n * @private\n * @type {Object}\n */\n this.dispatching_ = null;\n\n /**\n * @private\n * @type {Object>}\n */\n this.listeners_ = null;\n }\n\n /**\n * @param {string} type Type.\n * @param {import(\"../events.js\").Listener} listener Listener.\n */\n addEventListener(type, listener) {\n if (!type || !listener) {\n return;\n }\n const listeners = this.listeners_ || (this.listeners_ = {});\n const listenersForType = listeners[type] || (listeners[type] = []);\n if (!listenersForType.includes(listener)) {\n listenersForType.push(listener);\n }\n }\n\n /**\n * Dispatches an event and calls all listeners listening for events\n * of this type. The event parameter can either be a string or an\n * Object with a `type` property.\n *\n * @param {import(\"./Event.js\").default|string} event Event object.\n * @return {boolean|undefined} `false` if anyone called preventDefault on the\n * event object or if any of the listeners returned false.\n * @api\n */\n dispatchEvent(event) {\n const isString = typeof event === 'string';\n const type = isString ? event : event.type;\n const listeners = this.listeners_ && this.listeners_[type];\n if (!listeners) {\n return;\n }\n\n const evt = isString ? new Event(event) : /** @type {Event} */ (event);\n if (!evt.target) {\n evt.target = this.eventTarget_ || this;\n }\n const dispatching = this.dispatching_ || (this.dispatching_ = {});\n const pendingRemovals =\n this.pendingRemovals_ || (this.pendingRemovals_ = {});\n if (!(type in dispatching)) {\n dispatching[type] = 0;\n pendingRemovals[type] = 0;\n }\n ++dispatching[type];\n let propagate;\n for (let i = 0, ii = listeners.length; i < ii; ++i) {\n if ('handleEvent' in listeners[i]) {\n propagate = /** @type {import(\"../events.js\").ListenerObject} */ (\n listeners[i]\n ).handleEvent(evt);\n } else {\n propagate = /** @type {import(\"../events.js\").ListenerFunction} */ (\n listeners[i]\n ).call(this, evt);\n }\n if (propagate === false || evt.propagationStopped) {\n propagate = false;\n break;\n }\n }\n if (--dispatching[type] === 0) {\n let pr = pendingRemovals[type];\n delete pendingRemovals[type];\n while (pr--) {\n this.removeEventListener(type, VOID);\n }\n delete dispatching[type];\n }\n return propagate;\n }\n\n /**\n * Clean up.\n */\n disposeInternal() {\n this.listeners_ && clear(this.listeners_);\n }\n\n /**\n * Get the listeners for a specified event type. Listeners are returned in the\n * order that they will be called in.\n *\n * @param {string} type Type.\n * @return {Array|undefined} Listeners.\n */\n getListeners(type) {\n return (this.listeners_ && this.listeners_[type]) || undefined;\n }\n\n /**\n * @param {string} [type] Type. If not provided,\n * `true` will be returned if this event target has any listeners.\n * @return {boolean} Has listeners.\n */\n hasListener(type) {\n if (!this.listeners_) {\n return false;\n }\n return type\n ? type in this.listeners_\n : Object.keys(this.listeners_).length > 0;\n }\n\n /**\n * @param {string} type Type.\n * @param {import(\"../events.js\").Listener} listener Listener.\n */\n removeEventListener(type, listener) {\n const listeners = this.listeners_ && this.listeners_[type];\n if (listeners) {\n const index = listeners.indexOf(listener);\n if (index !== -1) {\n if (this.pendingRemovals_ && type in this.pendingRemovals_) {\n // make listener a no-op, and remove later in #dispatchEvent()\n listeners[index] = VOID;\n ++this.pendingRemovals_[type];\n } else {\n listeners.splice(index, 1);\n if (listeners.length === 0) {\n delete this.listeners_[type];\n }\n }\n }\n }\n }\n}\n\nexport default Target;\n","/**\n * @module ol/events/EventType\n */\n\n/**\n * @enum {string}\n * @const\n */\nexport default {\n /**\n * Generic change event. Triggered when the revision counter is increased.\n * @event module:ol/events/Event~BaseEvent#change\n * @api\n */\n CHANGE: 'change',\n\n /**\n * Generic error event. Triggered when an error occurs.\n * @event module:ol/events/Event~BaseEvent#error\n * @api\n */\n ERROR: 'error',\n\n BLUR: 'blur',\n CLEAR: 'clear',\n CONTEXTMENU: 'contextmenu',\n CLICK: 'click',\n DBLCLICK: 'dblclick',\n DRAGENTER: 'dragenter',\n DRAGOVER: 'dragover',\n DROP: 'drop',\n FOCUS: 'focus',\n KEYDOWN: 'keydown',\n KEYPRESS: 'keypress',\n LOAD: 'load',\n RESIZE: 'resize',\n TOUCHMOVE: 'touchmove',\n WHEEL: 'wheel',\n};\n","/**\n * @module ol/events\n */\nimport {clear} from './obj.js';\n\n/**\n * Key to use with {@link module:ol/Observable.unByKey}.\n * @typedef {Object} EventsKey\n * @property {ListenerFunction} listener Listener.\n * @property {import(\"./events/Target.js\").EventTargetLike} target Target.\n * @property {string} type Type.\n * @api\n */\n\n/**\n * Listener function. This function is called with an event object as argument.\n * When the function returns `false`, event propagation will stop.\n *\n * @typedef {function((Event|import(\"./events/Event.js\").default)): (void|boolean)} ListenerFunction\n * @api\n */\n\n/**\n * @typedef {Object} ListenerObject\n * @property {ListenerFunction} handleEvent HandleEvent listener function.\n */\n\n/**\n * @typedef {ListenerFunction|ListenerObject} Listener\n */\n\n/**\n * Registers an event listener on an event target. Inspired by\n * https://google.github.io/closure-library/api/source/closure/goog/events/events.js.src.html\n *\n * This function efficiently binds a `listener` to a `this` object, and returns\n * a key for use with {@link module:ol/events.unlistenByKey}.\n *\n * @param {import(\"./events/Target.js\").EventTargetLike} target Event target.\n * @param {string} type Event type.\n * @param {ListenerFunction} listener Listener.\n * @param {Object} [thisArg] Object referenced by the `this` keyword in the\n * listener. Default is the `target`.\n * @param {boolean} [once] If true, add the listener as one-off listener.\n * @return {EventsKey} Unique key for the listener.\n */\nexport function listen(target, type, listener, thisArg, once) {\n if (thisArg && thisArg !== target) {\n listener = listener.bind(thisArg);\n }\n if (once) {\n const originalListener = listener;\n listener = function () {\n target.removeEventListener(type, listener);\n originalListener.apply(this, arguments);\n };\n }\n const eventsKey = {\n target: target,\n type: type,\n listener: listener,\n };\n target.addEventListener(type, listener);\n return eventsKey;\n}\n\n/**\n * Registers a one-off event listener on an event target. Inspired by\n * https://google.github.io/closure-library/api/source/closure/goog/events/events.js.src.html\n *\n * This function efficiently binds a `listener` as self-unregistering listener\n * to a `this` object, and returns a key for use with\n * {@link module:ol/events.unlistenByKey} in case the listener needs to be\n * unregistered before it is called.\n *\n * When {@link module:ol/events.listen} is called with the same arguments after this\n * function, the self-unregistering listener will be turned into a permanent\n * listener.\n *\n * @param {import(\"./events/Target.js\").EventTargetLike} target Event target.\n * @param {string} type Event type.\n * @param {ListenerFunction} listener Listener.\n * @param {Object} [thisArg] Object referenced by the `this` keyword in the\n * listener. Default is the `target`.\n * @return {EventsKey} Key for unlistenByKey.\n */\nexport function listenOnce(target, type, listener, thisArg) {\n return listen(target, type, listener, thisArg, true);\n}\n\n/**\n * Unregisters event listeners on an event target. Inspired by\n * https://google.github.io/closure-library/api/source/closure/goog/events/events.js.src.html\n *\n * The argument passed to this function is the key returned from\n * {@link module:ol/events.listen} or {@link module:ol/events.listenOnce}.\n *\n * @param {EventsKey} key The key.\n */\nexport function unlistenByKey(key) {\n if (key && key.target) {\n key.target.removeEventListener(key.type, key.listener);\n clear(key);\n }\n}\n","/**\n * @module ol/Observable\n */\nimport EventTarget from './events/Target.js';\nimport EventType from './events/EventType.js';\nimport {listen, listenOnce, unlistenByKey} from './events.js';\n\n/***\n * @template {string} Type\n * @template {Event|import(\"./events/Event.js\").default} EventClass\n * @template Return\n * @typedef {(type: Type, listener: (event: EventClass) => ?) => Return} OnSignature\n */\n\n/***\n * @template {string} Type\n * @template Return\n * @typedef {(type: Type[], listener: (event: Event|import(\"./events/Event\").default) => ?) => Return extends void ? void : Return[]} CombinedOnSignature\n */\n\n/**\n * @typedef {'change'|'error'} EventTypes\n */\n\n/***\n * @template Return\n * @typedef {OnSignature & CombinedOnSignature} ObservableOnSignature\n */\n\n/**\n * @classdesc\n * Abstract base class; normally only used for creating subclasses and not\n * instantiated in apps.\n * An event target providing convenient methods for listener registration\n * and unregistration. A generic `change` event is always available through\n * {@link module:ol/Observable~Observable#changed}.\n *\n * @fires import(\"./events/Event.js\").default\n * @api\n */\nclass Observable extends EventTarget {\n constructor() {\n super();\n\n this.on =\n /** @type {ObservableOnSignature} */ (\n this.onInternal\n );\n\n this.once =\n /** @type {ObservableOnSignature} */ (\n this.onceInternal\n );\n\n this.un = /** @type {ObservableOnSignature} */ (this.unInternal);\n\n /**\n * @private\n * @type {number}\n */\n this.revision_ = 0;\n }\n\n /**\n * Increases the revision counter and dispatches a 'change' event.\n * @api\n */\n changed() {\n ++this.revision_;\n this.dispatchEvent(EventType.CHANGE);\n }\n\n /**\n * Get the version number for this object. Each time the object is modified,\n * its version number will be incremented.\n * @return {number} Revision.\n * @api\n */\n getRevision() {\n return this.revision_;\n }\n\n /**\n * @param {string|Array} type Type.\n * @param {function((Event|import(\"./events/Event\").default)): ?} listener Listener.\n * @return {import(\"./events.js\").EventsKey|Array} Event key.\n * @protected\n */\n onInternal(type, listener) {\n if (Array.isArray(type)) {\n const len = type.length;\n const keys = new Array(len);\n for (let i = 0; i < len; ++i) {\n keys[i] = listen(this, type[i], listener);\n }\n return keys;\n }\n return listen(this, /** @type {string} */ (type), listener);\n }\n\n /**\n * @param {string|Array} type Type.\n * @param {function((Event|import(\"./events/Event\").default)): ?} listener Listener.\n * @return {import(\"./events.js\").EventsKey|Array} Event key.\n * @protected\n */\n onceInternal(type, listener) {\n let key;\n if (Array.isArray(type)) {\n const len = type.length;\n key = new Array(len);\n for (let i = 0; i < len; ++i) {\n key[i] = listenOnce(this, type[i], listener);\n }\n } else {\n key = listenOnce(this, /** @type {string} */ (type), listener);\n }\n /** @type {Object} */ (listener).ol_key = key;\n return key;\n }\n\n /**\n * Unlisten for a certain type of event.\n * @param {string|Array} type Type.\n * @param {function((Event|import(\"./events/Event\").default)): ?} listener Listener.\n * @protected\n */\n unInternal(type, listener) {\n const key = /** @type {Object} */ (listener).ol_key;\n if (key) {\n unByKey(key);\n } else if (Array.isArray(type)) {\n for (let i = 0, ii = type.length; i < ii; ++i) {\n this.removeEventListener(type[i], listener);\n }\n } else {\n this.removeEventListener(type, listener);\n }\n }\n}\n\n/**\n * Listen for a certain type of event.\n * @function\n * @param {string|Array} type The event type or array of event types.\n * @param {function((Event|import(\"./events/Event\").default)): ?} listener The listener function.\n * @return {import(\"./events.js\").EventsKey|Array} Unique key for the listener. If\n * called with an array of event types as the first argument, the return\n * will be an array of keys.\n * @api\n */\nObservable.prototype.on;\n\n/**\n * Listen once for a certain type of event.\n * @function\n * @param {string|Array} type The event type or array of event types.\n * @param {function((Event|import(\"./events/Event\").default)): ?} listener The listener function.\n * @return {import(\"./events.js\").EventsKey|Array} Unique key for the listener. If\n * called with an array of event types as the first argument, the return\n * will be an array of keys.\n * @api\n */\nObservable.prototype.once;\n\n/**\n * Unlisten for a certain type of event.\n * @function\n * @param {string|Array} type The event type or array of event types.\n * @param {function((Event|import(\"./events/Event\").default)): ?} listener The listener function.\n * @api\n */\nObservable.prototype.un;\n\n/**\n * Removes an event listener using the key returned by `on()` or `once()`.\n * @param {import(\"./events.js\").EventsKey|Array} key The key returned by `on()`\n * or `once()` (or an array of keys).\n * @api\n */\nexport function unByKey(key) {\n if (Array.isArray(key)) {\n for (let i = 0, ii = key.length; i < ii; ++i) {\n unlistenByKey(key[i]);\n }\n } else {\n unlistenByKey(/** @type {import(\"./events.js\").EventsKey} */ (key));\n }\n}\n\nexport default Observable;\n","/**\n * @module ol/util\n */\n\n/**\n * @return {never} Any return.\n */\nexport function abstract() {\n throw new Error('Unimplemented abstract method.');\n}\n\n/**\n * Counter for getUid.\n * @type {number}\n * @private\n */\nlet uidCounter_ = 0;\n\n/**\n * Gets a unique ID for an object. This mutates the object so that further calls\n * with the same object as a parameter returns the same value. Unique IDs are generated\n * as a strictly increasing sequence. Adapted from goog.getUid.\n *\n * @param {Object} obj The object to get the unique ID for.\n * @return {string} The unique ID for the object.\n * @api\n */\nexport function getUid(obj) {\n return obj.ol_uid || (obj.ol_uid = String(++uidCounter_));\n}\n\n/**\n * OpenLayers version.\n * @type {string}\n */\nexport const VERSION = '7.2.2';\n","/**\n * @module ol/Object\n */\nimport Event from './events/Event.js';\nimport ObjectEventType from './ObjectEventType.js';\nimport Observable from './Observable.js';\nimport {getUid} from './util.js';\nimport {isEmpty} from './obj.js';\n\n/**\n * @classdesc\n * Events emitted by {@link module:ol/Object~BaseObject} instances are instances of this type.\n */\nexport class ObjectEvent extends Event {\n /**\n * @param {string} type The event type.\n * @param {string} key The property name.\n * @param {*} oldValue The old value for `key`.\n */\n constructor(type, key, oldValue) {\n super(type);\n\n /**\n * The name of the property whose value is changing.\n * @type {string}\n * @api\n */\n this.key = key;\n\n /**\n * The old value. To get the new value use `e.target.get(e.key)` where\n * `e` is the event object.\n * @type {*}\n * @api\n */\n this.oldValue = oldValue;\n }\n}\n\n/***\n * @template Return\n * @typedef {import(\"./Observable\").OnSignature &\n * import(\"./Observable\").OnSignature &\n * import(\"./Observable\").CombinedOnSignature} ObjectOnSignature\n */\n\n/**\n * @classdesc\n * Abstract base class; normally only used for creating subclasses and not\n * instantiated in apps.\n * Most non-trivial classes inherit from this.\n *\n * This extends {@link module:ol/Observable~Observable} with observable\n * properties, where each property is observable as well as the object as a\n * whole.\n *\n * Classes that inherit from this have pre-defined properties, to which you can\n * add your owns. The pre-defined properties are listed in this documentation as\n * 'Observable Properties', and have their own accessors; for example,\n * {@link module:ol/Map~Map} has a `target` property, accessed with\n * `getTarget()` and changed with `setTarget()`. Not all properties are however\n * settable. There are also general-purpose accessors `get()` and `set()`. For\n * example, `get('target')` is equivalent to `getTarget()`.\n *\n * The `set` accessors trigger a change event, and you can monitor this by\n * registering a listener. For example, {@link module:ol/View~View} has a\n * `center` property, so `view.on('change:center', function(evt) {...});` would\n * call the function whenever the value of the center property changes. Within\n * the function, `evt.target` would be the view, so `evt.target.getCenter()`\n * would return the new center.\n *\n * You can add your own observable properties with\n * `object.set('prop', 'value')`, and retrieve that with `object.get('prop')`.\n * You can listen for changes on that property value with\n * `object.on('change:prop', listener)`. You can get a list of all\n * properties with {@link module:ol/Object~BaseObject#getProperties}.\n *\n * Note that the observable properties are separate from standard JS properties.\n * You can, for example, give your map object a title with\n * `map.title='New title'` and with `map.set('title', 'Another title')`. The\n * first will be a `hasOwnProperty`; the second will appear in\n * `getProperties()`. Only the second is observable.\n *\n * Properties can be deleted by using the unset method. E.g.\n * object.unset('foo').\n *\n * @fires ObjectEvent\n * @api\n */\nclass BaseObject extends Observable {\n /**\n * @param {Object} [values] An object with key-value pairs.\n */\n constructor(values) {\n super();\n\n /***\n * @type {ObjectOnSignature}\n */\n this.on;\n\n /***\n * @type {ObjectOnSignature}\n */\n this.once;\n\n /***\n * @type {ObjectOnSignature}\n */\n this.un;\n\n // Call {@link module:ol/util.getUid} to ensure that the order of objects' ids is\n // the same as the order in which they were created. This also helps to\n // ensure that object properties are always added in the same order, which\n // helps many JavaScript engines generate faster code.\n getUid(this);\n\n /**\n * @private\n * @type {Object}\n */\n this.values_ = null;\n\n if (values !== undefined) {\n this.setProperties(values);\n }\n }\n\n /**\n * Gets a value.\n * @param {string} key Key name.\n * @return {*} Value.\n * @api\n */\n get(key) {\n let value;\n if (this.values_ && this.values_.hasOwnProperty(key)) {\n value = this.values_[key];\n }\n return value;\n }\n\n /**\n * Get a list of object property names.\n * @return {Array} List of property names.\n * @api\n */\n getKeys() {\n return (this.values_ && Object.keys(this.values_)) || [];\n }\n\n /**\n * Get an object of all property names and values.\n * @return {Object} Object.\n * @api\n */\n getProperties() {\n return (this.values_ && Object.assign({}, this.values_)) || {};\n }\n\n /**\n * @return {boolean} The object has properties.\n */\n hasProperties() {\n return !!this.values_;\n }\n\n /**\n * @param {string} key Key name.\n * @param {*} oldValue Old value.\n */\n notify(key, oldValue) {\n let eventType;\n eventType = `change:${key}`;\n if (this.hasListener(eventType)) {\n this.dispatchEvent(new ObjectEvent(eventType, key, oldValue));\n }\n eventType = ObjectEventType.PROPERTYCHANGE;\n if (this.hasListener(eventType)) {\n this.dispatchEvent(new ObjectEvent(eventType, key, oldValue));\n }\n }\n\n /**\n * @param {string} key Key name.\n * @param {import(\"./events.js\").Listener} listener Listener.\n */\n addChangeListener(key, listener) {\n this.addEventListener(`change:${key}`, listener);\n }\n\n /**\n * @param {string} key Key name.\n * @param {import(\"./events.js\").Listener} listener Listener.\n */\n removeChangeListener(key, listener) {\n this.removeEventListener(`change:${key}`, listener);\n }\n\n /**\n * Sets a value.\n * @param {string} key Key name.\n * @param {*} value Value.\n * @param {boolean} [silent] Update without triggering an event.\n * @api\n */\n set(key, value, silent) {\n const values = this.values_ || (this.values_ = {});\n if (silent) {\n values[key] = value;\n } else {\n const oldValue = values[key];\n values[key] = value;\n if (oldValue !== value) {\n this.notify(key, oldValue);\n }\n }\n }\n\n /**\n * Sets a collection of key-value pairs. Note that this changes any existing\n * properties and adds new ones (it does not remove any existing properties).\n * @param {Object} values Values.\n * @param {boolean} [silent] Update without triggering an event.\n * @api\n */\n setProperties(values, silent) {\n for (const key in values) {\n this.set(key, values[key], silent);\n }\n }\n\n /**\n * Apply any properties from another object without triggering events.\n * @param {BaseObject} source The source object.\n * @protected\n */\n applyProperties(source) {\n if (!source.values_) {\n return;\n }\n Object.assign(this.values_ || (this.values_ = {}), source.values_);\n }\n\n /**\n * Unsets a property.\n * @param {string} key Key name.\n * @param {boolean} [silent] Unset without triggering an event.\n * @api\n */\n unset(key, silent) {\n if (this.values_ && key in this.values_) {\n const oldValue = this.values_[key];\n delete this.values_[key];\n if (isEmpty(this.values_)) {\n this.values_ = null;\n }\n if (!silent) {\n this.notify(key, oldValue);\n }\n }\n }\n}\n\nexport default BaseObject;\n","/**\n * @module ol/CollectionEventType\n */\n\n/**\n * @enum {string}\n */\nexport default {\n /**\n * Triggered when an item is added to the collection.\n * @event module:ol/Collection.CollectionEvent#add\n * @api\n */\n ADD: 'add',\n /**\n * Triggered when an item is removed from the collection.\n * @event module:ol/Collection.CollectionEvent#remove\n * @api\n */\n REMOVE: 'remove',\n};\n","/**\n * @module ol/Collection\n */\nimport AssertionError from './AssertionError.js';\nimport BaseObject from './Object.js';\nimport CollectionEventType from './CollectionEventType.js';\nimport Event from './events/Event.js';\n\n/**\n * @enum {string}\n * @private\n */\nconst Property = {\n LENGTH: 'length',\n};\n\n/**\n * @classdesc\n * Events emitted by {@link module:ol/Collection~Collection} instances are instances of this\n * type.\n * @template T\n */\nexport class CollectionEvent extends Event {\n /**\n * @param {import(\"./CollectionEventType.js\").default} type Type.\n * @param {T} element Element.\n * @param {number} index The index of the added or removed element.\n */\n constructor(type, element, index) {\n super(type);\n\n /**\n * The element that is added to or removed from the collection.\n * @type {T}\n * @api\n */\n this.element = element;\n\n /**\n * The index of the added or removed element.\n * @type {number}\n * @api\n */\n this.index = index;\n }\n}\n\n/***\n * @template T\n * @template Return\n * @typedef {import(\"./Observable\").OnSignature &\n * import(\"./Observable\").OnSignature &\n * import(\"./Observable\").OnSignature<'add'|'remove', CollectionEvent, Return> &\n * import(\"./Observable\").CombinedOnSignature} CollectionOnSignature\n */\n\n/**\n * @typedef {Object} Options\n * @property {boolean} [unique=false] Disallow the same item from being added to\n * the collection twice.\n */\n\n/**\n * @classdesc\n * An expanded version of standard JS Array, adding convenience methods for\n * manipulation. Add and remove changes to the Collection trigger a Collection\n * event. Note that this does not cover changes to the objects _within_ the\n * Collection; they trigger events on the appropriate object, not on the\n * Collection as a whole.\n *\n * @fires CollectionEvent\n *\n * @template T\n * @api\n */\nclass Collection extends BaseObject {\n /**\n * @param {Array} [array] Array.\n * @param {Options} [options] Collection options.\n */\n constructor(array, options) {\n super();\n\n /***\n * @type {CollectionOnSignature}\n */\n this.on;\n\n /***\n * @type {CollectionOnSignature}\n */\n this.once;\n\n /***\n * @type {CollectionOnSignature}\n */\n this.un;\n\n options = options || {};\n\n /**\n * @private\n * @type {boolean}\n */\n this.unique_ = !!options.unique;\n\n /**\n * @private\n * @type {!Array}\n */\n this.array_ = array ? array : [];\n\n if (this.unique_) {\n for (let i = 0, ii = this.array_.length; i < ii; ++i) {\n this.assertUnique_(this.array_[i], i);\n }\n }\n\n this.updateLength_();\n }\n\n /**\n * Remove all elements from the collection.\n * @api\n */\n clear() {\n while (this.getLength() > 0) {\n this.pop();\n }\n }\n\n /**\n * Add elements to the collection. This pushes each item in the provided array\n * to the end of the collection.\n * @param {!Array} arr Array.\n * @return {Collection} This collection.\n * @api\n */\n extend(arr) {\n for (let i = 0, ii = arr.length; i < ii; ++i) {\n this.push(arr[i]);\n }\n return this;\n }\n\n /**\n * Iterate over each element, calling the provided callback.\n * @param {function(T, number, Array): *} f The function to call\n * for every element. This function takes 3 arguments (the element, the\n * index and the array). The return value is ignored.\n * @api\n */\n forEach(f) {\n const array = this.array_;\n for (let i = 0, ii = array.length; i < ii; ++i) {\n f(array[i], i, array);\n }\n }\n\n /**\n * Get a reference to the underlying Array object. Warning: if the array\n * is mutated, no events will be dispatched by the collection, and the\n * collection's \"length\" property won't be in sync with the actual length\n * of the array.\n * @return {!Array} Array.\n * @api\n */\n getArray() {\n return this.array_;\n }\n\n /**\n * Get the element at the provided index.\n * @param {number} index Index.\n * @return {T} Element.\n * @api\n */\n item(index) {\n return this.array_[index];\n }\n\n /**\n * Get the length of this collection.\n * @return {number} The length of the array.\n * @observable\n * @api\n */\n getLength() {\n return this.get(Property.LENGTH);\n }\n\n /**\n * Insert an element at the provided index.\n * @param {number} index Index.\n * @param {T} elem Element.\n * @api\n */\n insertAt(index, elem) {\n if (index < 0 || index > this.getLength()) {\n throw new Error('Index out of bounds: ' + index);\n }\n if (this.unique_) {\n this.assertUnique_(elem);\n }\n this.array_.splice(index, 0, elem);\n this.updateLength_();\n this.dispatchEvent(\n new CollectionEvent(CollectionEventType.ADD, elem, index)\n );\n }\n\n /**\n * Remove the last element of the collection and return it.\n * Return `undefined` if the collection is empty.\n * @return {T|undefined} Element.\n * @api\n */\n pop() {\n return this.removeAt(this.getLength() - 1);\n }\n\n /**\n * Insert the provided element at the end of the collection.\n * @param {T} elem Element.\n * @return {number} New length of the collection.\n * @api\n */\n push(elem) {\n if (this.unique_) {\n this.assertUnique_(elem);\n }\n const n = this.getLength();\n this.insertAt(n, elem);\n return this.getLength();\n }\n\n /**\n * Remove the first occurrence of an element from the collection.\n * @param {T} elem Element.\n * @return {T|undefined} The removed element or undefined if none found.\n * @api\n */\n remove(elem) {\n const arr = this.array_;\n for (let i = 0, ii = arr.length; i < ii; ++i) {\n if (arr[i] === elem) {\n return this.removeAt(i);\n }\n }\n return undefined;\n }\n\n /**\n * Remove the element at the provided index and return it.\n * Return `undefined` if the collection does not contain this index.\n * @param {number} index Index.\n * @return {T|undefined} Value.\n * @api\n */\n removeAt(index) {\n if (index < 0 || index >= this.getLength()) {\n return undefined;\n }\n const prev = this.array_[index];\n this.array_.splice(index, 1);\n this.updateLength_();\n this.dispatchEvent(\n /** @type {CollectionEvent} */ (\n new CollectionEvent(CollectionEventType.REMOVE, prev, index)\n )\n );\n return prev;\n }\n\n /**\n * Set the element at the provided index.\n * @param {number} index Index.\n * @param {T} elem Element.\n * @api\n */\n setAt(index, elem) {\n const n = this.getLength();\n if (index >= n) {\n this.insertAt(index, elem);\n return;\n }\n if (index < 0) {\n throw new Error('Index out of bounds: ' + index);\n }\n if (this.unique_) {\n this.assertUnique_(elem, index);\n }\n const prev = this.array_[index];\n this.array_[index] = elem;\n this.dispatchEvent(\n /** @type {CollectionEvent} */ (\n new CollectionEvent(CollectionEventType.REMOVE, prev, index)\n )\n );\n this.dispatchEvent(\n /** @type {CollectionEvent} */ (\n new CollectionEvent(CollectionEventType.ADD, elem, index)\n )\n );\n }\n\n /**\n * @private\n */\n updateLength_() {\n this.set(Property.LENGTH, this.array_.length);\n }\n\n /**\n * @private\n * @param {T} elem Element.\n * @param {number} [except] Optional index to ignore.\n */\n assertUnique_(elem, except) {\n for (let i = 0, ii = this.array_.length; i < ii; ++i) {\n if (this.array_[i] === elem && i !== except) {\n throw new AssertionError(58);\n }\n }\n }\n}\n\nexport default Collection;\n","/**\n * @module ol/TileState\n */\n\n/**\n * @enum {number}\n */\nexport default {\n IDLE: 0,\n LOADING: 1,\n LOADED: 2,\n /**\n * Indicates that tile loading failed\n * @type {number}\n */\n ERROR: 3,\n EMPTY: 4,\n};\n","/**\n * @module ol/easing\n */\n\n/**\n * Start slow and speed up.\n * @param {number} t Input between 0 and 1.\n * @return {number} Output between 0 and 1.\n * @api\n */\nexport function easeIn(t) {\n return Math.pow(t, 3);\n}\n\n/**\n * Start fast and slow down.\n * @param {number} t Input between 0 and 1.\n * @return {number} Output between 0 and 1.\n * @api\n */\nexport function easeOut(t) {\n return 1 - easeIn(1 - t);\n}\n\n/**\n * Start slow, speed up, and then slow down again.\n * @param {number} t Input between 0 and 1.\n * @return {number} Output between 0 and 1.\n * @api\n */\nexport function inAndOut(t) {\n return 3 * t * t - 2 * t * t * t;\n}\n\n/**\n * Maintain a constant speed over time.\n * @param {number} t Input between 0 and 1.\n * @return {number} Output between 0 and 1.\n * @api\n */\nexport function linear(t) {\n return t;\n}\n\n/**\n * Start slow, speed up, and at the very end slow down again. This has the\n * same general behavior as {@link module:ol/easing.inAndOut}, but the final\n * slowdown is delayed.\n * @param {number} t Input between 0 and 1.\n * @return {number} Output between 0 and 1.\n * @api\n */\nexport function upAndDown(t) {\n if (t < 0.5) {\n return inAndOut(2 * t);\n }\n return 1 - inAndOut(2 * (t - 0.5));\n}\n","/**\n * @module ol/Tile\n */\nimport EventTarget from './events/Target.js';\nimport EventType from './events/EventType.js';\nimport TileState from './TileState.js';\nimport {abstract} from './util.js';\nimport {easeIn} from './easing.js';\n\n/**\n * A function that takes an {@link module:ol/Tile~Tile} for the tile and a\n * `{string}` for the url as arguments. The default is\n * ```js\n * source.setTileLoadFunction(function(tile, src) {\n * tile.getImage().src = src;\n * });\n * ```\n * For more fine grained control, the load function can use fetch or XMLHttpRequest and involve\n * error handling:\n *\n * ```js\n * import TileState from 'ol/TileState.js';\n *\n * source.setTileLoadFunction(function(tile, src) {\n * const xhr = new XMLHttpRequest();\n * xhr.responseType = 'blob';\n * xhr.addEventListener('loadend', function (evt) {\n * const data = this.response;\n * if (data !== undefined) {\n * tile.getImage().src = URL.createObjectURL(data);\n * } else {\n * tile.setState(TileState.ERROR);\n * }\n * });\n * xhr.addEventListener('error', function () {\n * tile.setState(TileState.ERROR);\n * });\n * xhr.open('GET', src);\n * xhr.send();\n * });\n * ```\n *\n * @typedef {function(Tile, string): void} LoadFunction\n * @api\n */\n\n/**\n * {@link module:ol/source/Tile~TileSource} sources use a function of this type to get\n * the url that provides a tile for a given tile coordinate.\n *\n * This function takes an {@link module:ol/tilecoord~TileCoord} for the tile\n * coordinate, a `{number}` representing the pixel ratio and a\n * {@link module:ol/proj/Projection~Projection} for the projection as arguments\n * and returns a `{string}` representing the tile URL, or undefined if no tile\n * should be requested for the passed tile coordinate.\n *\n * @typedef {function(import(\"./tilecoord.js\").TileCoord, number,\n * import(\"./proj/Projection.js\").default): (string|undefined)} UrlFunction\n * @api\n */\n\n/**\n * @typedef {Object} Options\n * @property {number} [transition=250] A duration for tile opacity\n * transitions in milliseconds. A duration of 0 disables the opacity transition.\n * @property {boolean} [interpolate=false] Use interpolated values when resampling. By default,\n * the nearest neighbor is used when resampling.\n * @api\n */\n\n/**\n * @classdesc\n * Base class for tiles.\n *\n * @abstract\n */\nclass Tile extends EventTarget {\n /**\n * @param {import(\"./tilecoord.js\").TileCoord} tileCoord Tile coordinate.\n * @param {import(\"./TileState.js\").default} state State.\n * @param {Options} [options] Tile options.\n */\n constructor(tileCoord, state, options) {\n super();\n\n options = options ? options : {};\n\n /**\n * @type {import(\"./tilecoord.js\").TileCoord}\n */\n this.tileCoord = tileCoord;\n\n /**\n * @protected\n * @type {import(\"./TileState.js\").default}\n */\n this.state = state;\n\n /**\n * An \"interim\" tile for this tile. The interim tile may be used while this\n * one is loading, for \"smooth\" transitions when changing params/dimensions\n * on the source.\n * @type {Tile}\n */\n this.interimTile = null;\n\n /**\n * A key assigned to the tile. This is used by the tile source to determine\n * if this tile can effectively be used, or if a new tile should be created\n * and this one be used as an interim tile for this new tile.\n * @type {string}\n */\n this.key = '';\n\n /**\n * The duration for the opacity transition.\n * @type {number}\n */\n this.transition_ =\n options.transition === undefined ? 250 : options.transition;\n\n /**\n * Lookup of start times for rendering transitions. If the start time is\n * equal to -1, the transition is complete.\n * @type {Object}\n */\n this.transitionStarts_ = {};\n\n /**\n * @type {boolean}\n */\n this.interpolate = !!options.interpolate;\n }\n\n /**\n * @protected\n */\n changed() {\n this.dispatchEvent(EventType.CHANGE);\n }\n\n /**\n * Called by the tile cache when the tile is removed from the cache due to expiry\n */\n release() {\n if (this.state === TileState.ERROR) {\n // to remove the `change` listener on this tile in `ol/TileQueue#handleTileChange`\n this.setState(TileState.EMPTY);\n }\n }\n\n /**\n * @return {string} Key.\n */\n getKey() {\n return this.key + '/' + this.tileCoord;\n }\n\n /**\n * Get the interim tile most suitable for rendering using the chain of interim\n * tiles. This corresponds to the most recent tile that has been loaded, if no\n * such tile exists, the original tile is returned.\n * @return {!Tile} Best tile for rendering.\n */\n getInterimTile() {\n if (!this.interimTile) {\n //empty chain\n return this;\n }\n let tile = this.interimTile;\n\n // find the first loaded tile and return it. Since the chain is sorted in\n // decreasing order of creation time, there is no need to search the remainder\n // of the list (all those tiles correspond to older requests and will be\n // cleaned up by refreshInterimChain)\n do {\n if (tile.getState() == TileState.LOADED) {\n // Show tile immediately instead of fading it in after loading, because\n // the interim tile is in place already\n this.transition_ = 0;\n return tile;\n }\n tile = tile.interimTile;\n } while (tile);\n\n // we can not find a better tile\n return this;\n }\n\n /**\n * Goes through the chain of interim tiles and discards sections of the chain\n * that are no longer relevant.\n */\n refreshInterimChain() {\n if (!this.interimTile) {\n return;\n }\n\n let tile = this.interimTile;\n\n /**\n * @type {Tile}\n */\n let prev = this;\n\n do {\n if (tile.getState() == TileState.LOADED) {\n //we have a loaded tile, we can discard the rest of the list\n //we would could abort any LOADING tile request\n //older than this tile (i.e. any LOADING tile following this entry in the chain)\n tile.interimTile = null;\n break;\n } else if (tile.getState() == TileState.LOADING) {\n //keep this LOADING tile any loaded tiles later in the chain are\n //older than this tile, so we're still interested in the request\n prev = tile;\n } else if (tile.getState() == TileState.IDLE) {\n //the head of the list is the most current tile, we don't need\n //to start any other requests for this chain\n prev.interimTile = tile.interimTile;\n } else {\n prev = tile;\n }\n tile = prev.interimTile;\n } while (tile);\n }\n\n /**\n * Get the tile coordinate for this tile.\n * @return {import(\"./tilecoord.js\").TileCoord} The tile coordinate.\n * @api\n */\n getTileCoord() {\n return this.tileCoord;\n }\n\n /**\n * @return {import(\"./TileState.js\").default} State.\n */\n getState() {\n return this.state;\n }\n\n /**\n * Sets the state of this tile. If you write your own {@link module:ol/Tile~LoadFunction tileLoadFunction} ,\n * it is important to set the state correctly to {@link module:ol/TileState~ERROR}\n * when the tile cannot be loaded. Otherwise the tile cannot be removed from\n * the tile queue and will block other requests.\n * @param {import(\"./TileState.js\").default} state State.\n * @api\n */\n setState(state) {\n if (this.state !== TileState.ERROR && this.state > state) {\n throw new Error('Tile load sequence violation');\n }\n this.state = state;\n this.changed();\n }\n\n /**\n * Load the image or retry if loading previously failed.\n * Loading is taken care of by the tile queue, and calling this method is\n * only needed for preloading or for reloading in case of an error.\n * @abstract\n * @api\n */\n load() {\n abstract();\n }\n\n /**\n * Get the alpha value for rendering.\n * @param {string} id An id for the renderer.\n * @param {number} time The render frame time.\n * @return {number} A number between 0 and 1.\n */\n getAlpha(id, time) {\n if (!this.transition_) {\n return 1;\n }\n\n let start = this.transitionStarts_[id];\n if (!start) {\n start = time;\n this.transitionStarts_[id] = start;\n } else if (start === -1) {\n return 1;\n }\n\n const delta = time - start + 1000 / 60; // avoid rendering at 0\n if (delta >= this.transition_) {\n return 1;\n }\n return easeIn(delta / this.transition_);\n }\n\n /**\n * Determine if a tile is in an alpha transition. A tile is considered in\n * transition if tile.getAlpha() has not yet been called or has been called\n * and returned 1.\n * @param {string} id An id for the renderer.\n * @return {boolean} The tile is in transition.\n */\n inTransition(id) {\n if (!this.transition_) {\n return false;\n }\n return this.transitionStarts_[id] !== -1;\n }\n\n /**\n * Mark a transition as complete.\n * @param {string} id An id for the renderer.\n */\n endTransition(id) {\n if (this.transition_) {\n this.transitionStarts_[id] = -1;\n }\n }\n}\n\nexport default Tile;\n","/**\n * @module ol/has\n */\n\nconst ua =\n typeof navigator !== 'undefined' && typeof navigator.userAgent !== 'undefined'\n ? navigator.userAgent.toLowerCase()\n : '';\n\n/**\n * User agent string says we are dealing with Firefox as browser.\n * @type {boolean}\n */\nexport const FIREFOX = ua.includes('firefox');\n\n/**\n * User agent string says we are dealing with Safari as browser.\n * @type {boolean}\n */\nexport const SAFARI = ua.includes('safari') && !ua.includes('chrom');\n\n/**\n * https://bugs.webkit.org/show_bug.cgi?id=237906\n * @type {boolean}\n */\nexport const SAFARI_BUG_237906 =\n SAFARI &&\n (ua.includes('version/15.4') ||\n /cpu (os|iphone os) 15_4 like mac os x/.test(ua));\n\n/**\n * User agent string says we are dealing with a WebKit engine.\n * @type {boolean}\n */\nexport const WEBKIT = ua.includes('webkit') && !ua.includes('edge');\n\n/**\n * User agent string says we are dealing with a Mac as platform.\n * @type {boolean}\n */\nexport const MAC = ua.includes('macintosh');\n\n/**\n * The ratio between physical pixels and device-independent pixels\n * (dips) on the device (`window.devicePixelRatio`).\n * @const\n * @type {number}\n * @api\n */\nexport const DEVICE_PIXEL_RATIO =\n typeof devicePixelRatio !== 'undefined' ? devicePixelRatio : 1;\n\n/**\n * The execution context is a worker with OffscreenCanvas available.\n * @const\n * @type {boolean}\n */\nexport const WORKER_OFFSCREEN_CANVAS =\n typeof WorkerGlobalScope !== 'undefined' &&\n typeof OffscreenCanvas !== 'undefined' &&\n self instanceof WorkerGlobalScope; //eslint-disable-line\n\n/**\n * Image.prototype.decode() is supported.\n * @type {boolean}\n */\nexport const IMAGE_DECODE =\n typeof Image !== 'undefined' && Image.prototype.decode;\n\n/**\n * @type {boolean}\n */\nexport const PASSIVE_EVENT_LISTENERS = (function () {\n let passive = false;\n try {\n const options = Object.defineProperty({}, 'passive', {\n get: function () {\n passive = true;\n },\n });\n\n window.addEventListener('_', null, options);\n window.removeEventListener('_', null, options);\n } catch (error) {\n // passive not supported\n }\n return passive;\n})();\n","import {WORKER_OFFSCREEN_CANVAS} from './has.js';\n\n/**\n * @module ol/dom\n */\n\n//FIXME Move this function to the canvas module\n/**\n * Create an html canvas element and returns its 2d context.\n * @param {number} [width] Canvas width.\n * @param {number} [height] Canvas height.\n * @param {Array} [canvasPool] Canvas pool to take existing canvas from.\n * @param {CanvasRenderingContext2DSettings} [settings] CanvasRenderingContext2DSettings\n * @return {CanvasRenderingContext2D} The context.\n */\nexport function createCanvasContext2D(width, height, canvasPool, settings) {\n /** @type {HTMLCanvasElement|OffscreenCanvas} */\n let canvas;\n if (canvasPool && canvasPool.length) {\n canvas = canvasPool.shift();\n } else if (WORKER_OFFSCREEN_CANVAS) {\n canvas = new OffscreenCanvas(width || 300, height || 300);\n } else {\n canvas = document.createElement('canvas');\n }\n if (width) {\n canvas.width = width;\n }\n if (height) {\n canvas.height = height;\n }\n //FIXME Allow OffscreenCanvasRenderingContext2D as return type\n return /** @type {CanvasRenderingContext2D} */ (\n canvas.getContext('2d', settings)\n );\n}\n\n/**\n * Releases canvas memory to avoid exceeding memory limits in Safari.\n * See https://pqina.nl/blog/total-canvas-memory-use-exceeds-the-maximum-limit/\n * @param {CanvasRenderingContext2D} context Context.\n */\nexport function releaseCanvas(context) {\n const canvas = context.canvas;\n canvas.width = 1;\n canvas.height = 1;\n context.clearRect(0, 0, 1, 1);\n}\n\n/**\n * Get the current computed width for the given element including margin,\n * padding and border.\n * Equivalent to jQuery's `$(el).outerWidth(true)`.\n * @param {!HTMLElement} element Element.\n * @return {number} The width.\n */\nexport function outerWidth(element) {\n let width = element.offsetWidth;\n const style = getComputedStyle(element);\n width += parseInt(style.marginLeft, 10) + parseInt(style.marginRight, 10);\n\n return width;\n}\n\n/**\n * Get the current computed height for the given element including margin,\n * padding and border.\n * Equivalent to jQuery's `$(el).outerHeight(true)`.\n * @param {!HTMLElement} element Element.\n * @return {number} The height.\n */\nexport function outerHeight(element) {\n let height = element.offsetHeight;\n const style = getComputedStyle(element);\n height += parseInt(style.marginTop, 10) + parseInt(style.marginBottom, 10);\n\n return height;\n}\n\n/**\n * @param {Node} newNode Node to replace old node\n * @param {Node} oldNode The node to be replaced\n */\nexport function replaceNode(newNode, oldNode) {\n const parent = oldNode.parentNode;\n if (parent) {\n parent.replaceChild(newNode, oldNode);\n }\n}\n\n/**\n * @param {Node} node The node to remove.\n * @return {Node|null} The node that was removed or null.\n */\nexport function removeNode(node) {\n return node && node.parentNode ? node.parentNode.removeChild(node) : null;\n}\n\n/**\n * @param {Node} node The node to remove the children from.\n */\nexport function removeChildren(node) {\n while (node.lastChild) {\n node.removeChild(node.lastChild);\n }\n}\n\n/**\n * Transform the children of a parent node so they match the\n * provided list of children. This function aims to efficiently\n * remove, add, and reorder child nodes while maintaining a simple\n * implementation (it is not guaranteed to minimize DOM operations).\n * @param {Node} node The parent node whose children need reworking.\n * @param {Array} children The desired children.\n */\nexport function replaceChildren(node, children) {\n const oldChildren = node.childNodes;\n\n for (let i = 0; true; ++i) {\n const oldChild = oldChildren[i];\n const newChild = children[i];\n\n // check if our work is done\n if (!oldChild && !newChild) {\n break;\n }\n\n // check if children match\n if (oldChild === newChild) {\n continue;\n }\n\n // check if a new child needs to be added\n if (!oldChild) {\n node.appendChild(newChild);\n continue;\n }\n\n // check if an old child needs to be removed\n if (!newChild) {\n node.removeChild(oldChild);\n --i;\n continue;\n }\n\n // reorder\n node.insertBefore(newChild, oldChild);\n }\n}\n","/**\n * @module ol/DataTile\n */\nimport Tile from './Tile.js';\nimport TileState from './TileState.js';\nimport {createCanvasContext2D} from './dom.js';\n\n/**\n * @typedef {HTMLImageElement|HTMLCanvasElement|HTMLVideoElement} ImageLike\n */\n\n/**\n * @typedef {Uint8Array|Uint8ClampedArray|Float32Array|DataView} ArrayLike\n */\n\n/**\n * Data that can be used with a DataTile.\n * @typedef {ArrayLike|ImageLike} Data\n */\n\n/**\n * @param {Data} data Tile data.\n * @return {ImageLike|null} The image-like data.\n */\nexport function asImageLike(data) {\n return data instanceof Image ||\n data instanceof HTMLCanvasElement ||\n data instanceof HTMLVideoElement\n ? data\n : null;\n}\n\n/**\n * @param {Data} data Tile data.\n * @return {ArrayLike|null} The array-like data.\n */\nexport function asArrayLike(data) {\n return data instanceof Uint8Array ||\n data instanceof Uint8ClampedArray ||\n data instanceof Float32Array ||\n data instanceof DataView\n ? data\n : null;\n}\n\n/**\n * @type {CanvasRenderingContext2D|null}\n */\nlet sharedContext = null;\n\n/**\n * @param {ImageLike} image The image.\n * @return {Uint8ClampedArray} The data.\n */\nexport function toArray(image) {\n if (!sharedContext) {\n sharedContext = createCanvasContext2D(\n image.width,\n image.height,\n undefined,\n {willReadFrequently: true}\n );\n }\n const canvas = sharedContext.canvas;\n const width = image.width;\n if (canvas.width !== width) {\n canvas.width = width;\n }\n const height = image.height;\n if (canvas.height !== height) {\n canvas.height = height;\n }\n sharedContext.drawImage(image, width, height);\n return sharedContext.getImageData(0, 0, width, height).data;\n}\n\n/**\n * @type {import('./size.js').Size}\n */\nconst defaultSize = [256, 256];\n\n/**\n * @typedef {Object} Options\n * @property {import(\"./tilecoord.js\").TileCoord} tileCoord Tile coordinate.\n * @property {function(): Promise} loader Data loader. For loaders that generate images,\n * the promise should not resolve until the image is loaded.\n * @property {number} [transition=250] A duration for tile opacity\n * transitions in milliseconds. A duration of 0 disables the opacity transition.\n * @property {boolean} [interpolate=false] Use interpolated values when resampling. By default,\n * the nearest neighbor is used when resampling.\n * @property {import('./size.js').Size} [size=[256, 256]] Tile size.\n * @api\n */\n\nclass DataTile extends Tile {\n /**\n * @param {Options} options Tile options.\n */\n constructor(options) {\n const state = TileState.IDLE;\n\n super(options.tileCoord, state, {\n transition: options.transition,\n interpolate: options.interpolate,\n });\n\n /**\n * @type {function(): Promise}\n * @private\n */\n this.loader_ = options.loader;\n\n /**\n * @type {Data}\n * @private\n */\n this.data_ = null;\n\n /**\n * @type {Error}\n * @private\n */\n this.error_ = null;\n\n /**\n * @type {import('./size.js').Size|null}\n * @private\n */\n this.size_ = options.size || null;\n }\n\n /**\n * Get the tile size.\n * @return {import('./size.js').Size} Tile size.\n */\n getSize() {\n if (this.size_) {\n return this.size_;\n }\n const imageData = asImageLike(this.data_);\n if (imageData) {\n return [imageData.width, imageData.height];\n }\n return defaultSize;\n }\n\n /**\n * Get the data for the tile.\n * @return {Data} Tile data.\n * @api\n */\n getData() {\n return this.data_;\n }\n\n /**\n * Get any loading error.\n * @return {Error} Loading error.\n * @api\n */\n getError() {\n return this.error_;\n }\n\n /**\n * Load not yet loaded URI.\n * @api\n */\n load() {\n if (this.state !== TileState.IDLE && this.state !== TileState.ERROR) {\n return;\n }\n this.state = TileState.LOADING;\n this.changed();\n\n const self = this;\n this.loader_()\n .then(function (data) {\n self.data_ = data;\n self.state = TileState.LOADED;\n self.changed();\n })\n .catch(function (error) {\n self.error_ = error;\n self.state = TileState.ERROR;\n self.changed();\n });\n }\n}\n\nexport default DataTile;\n","/**\n * @module ol/asserts\n */\nimport AssertionError from './AssertionError.js';\n\n/**\n * @param {*} assertion Assertion we expected to be truthy.\n * @param {number} errorCode Error code.\n */\nexport function assert(assertion, errorCode) {\n if (!assertion) {\n throw new AssertionError(errorCode);\n }\n}\n","/**\n * @module ol/Feature\n */\nimport BaseObject from './Object.js';\nimport EventType from './events/EventType.js';\nimport {assert} from './asserts.js';\nimport {listen, unlistenByKey} from './events.js';\n\n/**\n * @typedef {typeof Feature|typeof import(\"./render/Feature.js\").default} FeatureClass\n */\n\n/**\n * @typedef {Feature|import(\"./render/Feature.js\").default} FeatureLike\n */\n\n/***\n * @template Return\n * @typedef {import(\"./Observable\").OnSignature &\n * import(\"./Observable\").OnSignature &\n * import(\"./Observable\").CombinedOnSignature} FeatureOnSignature\n */\n\n/***\n * @template Geometry\n * @typedef {Object & { geometry?: Geometry }} ObjectWithGeometry\n */\n\n/**\n * @classdesc\n * A vector object for geographic features with a geometry and other\n * attribute properties, similar to the features in vector file formats like\n * GeoJSON.\n *\n * Features can be styled individually with `setStyle`; otherwise they use the\n * style of their vector layer.\n *\n * Note that attribute properties are set as {@link module:ol/Object~BaseObject} properties on\n * the feature object, so they are observable, and have get/set accessors.\n *\n * Typically, a feature has a single geometry property. You can set the\n * geometry using the `setGeometry` method and get it with `getGeometry`.\n * It is possible to store more than one geometry on a feature using attribute\n * properties. By default, the geometry used for rendering is identified by\n * the property name `geometry`. If you want to use another geometry property\n * for rendering, use the `setGeometryName` method to change the attribute\n * property associated with the geometry for the feature. For example:\n *\n * ```js\n *\n * import Feature from 'ol/Feature.js';\n * import Polygon from 'ol/geom/Polygon.js';\n * import Point from 'ol/geom/Point.js';\n *\n * const feature = new Feature({\n * geometry: new Polygon(polyCoords),\n * labelPoint: new Point(labelCoords),\n * name: 'My Polygon',\n * });\n *\n * // get the polygon geometry\n * const poly = feature.getGeometry();\n *\n * // Render the feature as a point using the coordinates from labelPoint\n * feature.setGeometryName('labelPoint');\n *\n * // get the point geometry\n * const point = feature.getGeometry();\n * ```\n *\n * @api\n * @template {import(\"./geom/Geometry.js\").default} [Geometry=import(\"./geom/Geometry.js\").default]\n */\nclass Feature extends BaseObject {\n /**\n * @param {Geometry|ObjectWithGeometry} [geometryOrProperties]\n * You may pass a Geometry object directly, or an object literal containing\n * properties. If you pass an object literal, you may include a Geometry\n * associated with a `geometry` key.\n */\n constructor(geometryOrProperties) {\n super();\n\n /***\n * @type {FeatureOnSignature}\n */\n this.on;\n\n /***\n * @type {FeatureOnSignature}\n */\n this.once;\n\n /***\n * @type {FeatureOnSignature}\n */\n this.un;\n\n /**\n * @private\n * @type {number|string|undefined}\n */\n this.id_ = undefined;\n\n /**\n * @type {string}\n * @private\n */\n this.geometryName_ = 'geometry';\n\n /**\n * User provided style.\n * @private\n * @type {import(\"./style/Style.js\").StyleLike}\n */\n this.style_ = null;\n\n /**\n * @private\n * @type {import(\"./style/Style.js\").StyleFunction|undefined}\n */\n this.styleFunction_ = undefined;\n\n /**\n * @private\n * @type {?import(\"./events.js\").EventsKey}\n */\n this.geometryChangeKey_ = null;\n\n this.addChangeListener(this.geometryName_, this.handleGeometryChanged_);\n\n if (geometryOrProperties) {\n if (\n typeof (\n /** @type {?} */ (geometryOrProperties).getSimplifiedGeometry\n ) === 'function'\n ) {\n const geometry = /** @type {Geometry} */ (geometryOrProperties);\n this.setGeometry(geometry);\n } else {\n /** @type {Object} */\n const properties = geometryOrProperties;\n this.setProperties(properties);\n }\n }\n }\n\n /**\n * Clone this feature. If the original feature has a geometry it\n * is also cloned. The feature id is not set in the clone.\n * @return {Feature} The clone.\n * @api\n */\n clone() {\n const clone = /** @type {Feature} */ (\n new Feature(this.hasProperties() ? this.getProperties() : null)\n );\n clone.setGeometryName(this.getGeometryName());\n const geometry = this.getGeometry();\n if (geometry) {\n clone.setGeometry(/** @type {Geometry} */ (geometry.clone()));\n }\n const style = this.getStyle();\n if (style) {\n clone.setStyle(style);\n }\n return clone;\n }\n\n /**\n * Get the feature's default geometry. A feature may have any number of named\n * geometries. The \"default\" geometry (the one that is rendered by default) is\n * set when calling {@link module:ol/Feature~Feature#setGeometry}.\n * @return {Geometry|undefined} The default geometry for the feature.\n * @api\n * @observable\n */\n getGeometry() {\n return /** @type {Geometry|undefined} */ (this.get(this.geometryName_));\n }\n\n /**\n * Get the feature identifier. This is a stable identifier for the feature and\n * is either set when reading data from a remote source or set explicitly by\n * calling {@link module:ol/Feature~Feature#setId}.\n * @return {number|string|undefined} Id.\n * @api\n */\n getId() {\n return this.id_;\n }\n\n /**\n * Get the name of the feature's default geometry. By default, the default\n * geometry is named `geometry`.\n * @return {string} Get the property name associated with the default geometry\n * for this feature.\n * @api\n */\n getGeometryName() {\n return this.geometryName_;\n }\n\n /**\n * Get the feature's style. Will return what was provided to the\n * {@link module:ol/Feature~Feature#setStyle} method.\n * @return {import(\"./style/Style.js\").StyleLike|undefined} The feature style.\n * @api\n */\n getStyle() {\n return this.style_;\n }\n\n /**\n * Get the feature's style function.\n * @return {import(\"./style/Style.js\").StyleFunction|undefined} Return a function\n * representing the current style of this feature.\n * @api\n */\n getStyleFunction() {\n return this.styleFunction_;\n }\n\n /**\n * @private\n */\n handleGeometryChange_() {\n this.changed();\n }\n\n /**\n * @private\n */\n handleGeometryChanged_() {\n if (this.geometryChangeKey_) {\n unlistenByKey(this.geometryChangeKey_);\n this.geometryChangeKey_ = null;\n }\n const geometry = this.getGeometry();\n if (geometry) {\n this.geometryChangeKey_ = listen(\n geometry,\n EventType.CHANGE,\n this.handleGeometryChange_,\n this\n );\n }\n this.changed();\n }\n\n /**\n * Set the default geometry for the feature. This will update the property\n * with the name returned by {@link module:ol/Feature~Feature#getGeometryName}.\n * @param {Geometry|undefined} geometry The new geometry.\n * @api\n * @observable\n */\n setGeometry(geometry) {\n this.set(this.geometryName_, geometry);\n }\n\n /**\n * Set the style for the feature to override the layer style. This can be a\n * single style object, an array of styles, or a function that takes a\n * resolution and returns an array of styles. To unset the feature style, call\n * `setStyle()` without arguments or a falsey value.\n * @param {import(\"./style/Style.js\").StyleLike} [style] Style for this feature.\n * @api\n * @fires module:ol/events/Event~BaseEvent#event:change\n */\n setStyle(style) {\n this.style_ = style;\n this.styleFunction_ = !style ? undefined : createStyleFunction(style);\n this.changed();\n }\n\n /**\n * Set the feature id. The feature id is considered stable and may be used when\n * requesting features or comparing identifiers returned from a remote source.\n * The feature id can be used with the\n * {@link module:ol/source/Vector~VectorSource#getFeatureById} method.\n * @param {number|string|undefined} id The feature id.\n * @api\n * @fires module:ol/events/Event~BaseEvent#event:change\n */\n setId(id) {\n this.id_ = id;\n this.changed();\n }\n\n /**\n * Set the property name to be used when getting the feature's default geometry.\n * When calling {@link module:ol/Feature~Feature#getGeometry}, the value of the property with\n * this name will be returned.\n * @param {string} name The property name of the default geometry.\n * @api\n */\n setGeometryName(name) {\n this.removeChangeListener(this.geometryName_, this.handleGeometryChanged_);\n this.geometryName_ = name;\n this.addChangeListener(this.geometryName_, this.handleGeometryChanged_);\n this.handleGeometryChanged_();\n }\n}\n\n/**\n * Convert the provided object into a feature style function. Functions passed\n * through unchanged. Arrays of Style or single style objects wrapped\n * in a new feature style function.\n * @param {!import(\"./style/Style.js\").StyleFunction|!Array|!import(\"./style/Style.js\").default} obj\n * A feature style function, a single style, or an array of styles.\n * @return {import(\"./style/Style.js\").StyleFunction} A style function.\n */\nexport function createStyleFunction(obj) {\n if (typeof obj === 'function') {\n return obj;\n }\n /**\n * @type {Array}\n */\n let styles;\n if (Array.isArray(obj)) {\n styles = obj;\n } else {\n assert(typeof (/** @type {?} */ (obj).getZIndex) === 'function', 41); // Expected an `import(\"./style/Style.js\").Style` or an array of `import(\"./style/Style.js\").Style`\n const style = /** @type {import(\"./style/Style.js\").default} */ (obj);\n styles = [style];\n }\n return function () {\n return styles;\n };\n}\nexport default Feature;\n","/**\n * @module ol/transform\n */\nimport {WORKER_OFFSCREEN_CANVAS} from './has.js';\nimport {assert} from './asserts.js';\n\n/**\n * An array representing an affine 2d transformation for use with\n * {@link module:ol/transform} functions. The array has 6 elements.\n * @typedef {!Array} Transform\n * @api\n */\n\n/**\n * Collection of affine 2d transformation functions. The functions work on an\n * array of 6 elements. The element order is compatible with the [SVGMatrix\n * interface](https://developer.mozilla.org/en-US/docs/Web/API/SVGMatrix) and is\n * a subset (elements a to f) of a 3×3 matrix:\n * ```\n * [ a c e ]\n * [ b d f ]\n * [ 0 0 1 ]\n * ```\n */\n\n/**\n * @private\n * @type {Transform}\n */\nconst tmp_ = new Array(6);\n\n/**\n * Create an identity transform.\n * @return {!Transform} Identity transform.\n */\nexport function create() {\n return [1, 0, 0, 1, 0, 0];\n}\n\n/**\n * Resets the given transform to an identity transform.\n * @param {!Transform} transform Transform.\n * @return {!Transform} Transform.\n */\nexport function reset(transform) {\n return set(transform, 1, 0, 0, 1, 0, 0);\n}\n\n/**\n * Multiply the underlying matrices of two transforms and return the result in\n * the first transform.\n * @param {!Transform} transform1 Transform parameters of matrix 1.\n * @param {!Transform} transform2 Transform parameters of matrix 2.\n * @return {!Transform} transform1 multiplied with transform2.\n */\nexport function multiply(transform1, transform2) {\n const a1 = transform1[0];\n const b1 = transform1[1];\n const c1 = transform1[2];\n const d1 = transform1[3];\n const e1 = transform1[4];\n const f1 = transform1[5];\n const a2 = transform2[0];\n const b2 = transform2[1];\n const c2 = transform2[2];\n const d2 = transform2[3];\n const e2 = transform2[4];\n const f2 = transform2[5];\n\n transform1[0] = a1 * a2 + c1 * b2;\n transform1[1] = b1 * a2 + d1 * b2;\n transform1[2] = a1 * c2 + c1 * d2;\n transform1[3] = b1 * c2 + d1 * d2;\n transform1[4] = a1 * e2 + c1 * f2 + e1;\n transform1[5] = b1 * e2 + d1 * f2 + f1;\n\n return transform1;\n}\n\n/**\n * Set the transform components a-f on a given transform.\n * @param {!Transform} transform Transform.\n * @param {number} a The a component of the transform.\n * @param {number} b The b component of the transform.\n * @param {number} c The c component of the transform.\n * @param {number} d The d component of the transform.\n * @param {number} e The e component of the transform.\n * @param {number} f The f component of the transform.\n * @return {!Transform} Matrix with transform applied.\n */\nexport function set(transform, a, b, c, d, e, f) {\n transform[0] = a;\n transform[1] = b;\n transform[2] = c;\n transform[3] = d;\n transform[4] = e;\n transform[5] = f;\n return transform;\n}\n\n/**\n * Set transform on one matrix from another matrix.\n * @param {!Transform} transform1 Matrix to set transform to.\n * @param {!Transform} transform2 Matrix to set transform from.\n * @return {!Transform} transform1 with transform from transform2 applied.\n */\nexport function setFromArray(transform1, transform2) {\n transform1[0] = transform2[0];\n transform1[1] = transform2[1];\n transform1[2] = transform2[2];\n transform1[3] = transform2[3];\n transform1[4] = transform2[4];\n transform1[5] = transform2[5];\n return transform1;\n}\n\n/**\n * Transforms the given coordinate with the given transform returning the\n * resulting, transformed coordinate. The coordinate will be modified in-place.\n *\n * @param {Transform} transform The transformation.\n * @param {import(\"./coordinate.js\").Coordinate|import(\"./pixel.js\").Pixel} coordinate The coordinate to transform.\n * @return {import(\"./coordinate.js\").Coordinate|import(\"./pixel.js\").Pixel} return coordinate so that operations can be\n * chained together.\n */\nexport function apply(transform, coordinate) {\n const x = coordinate[0];\n const y = coordinate[1];\n coordinate[0] = transform[0] * x + transform[2] * y + transform[4];\n coordinate[1] = transform[1] * x + transform[3] * y + transform[5];\n return coordinate;\n}\n\n/**\n * Applies rotation to the given transform.\n * @param {!Transform} transform Transform.\n * @param {number} angle Angle in radians.\n * @return {!Transform} The rotated transform.\n */\nexport function rotate(transform, angle) {\n const cos = Math.cos(angle);\n const sin = Math.sin(angle);\n return multiply(transform, set(tmp_, cos, sin, -sin, cos, 0, 0));\n}\n\n/**\n * Applies scale to a given transform.\n * @param {!Transform} transform Transform.\n * @param {number} x Scale factor x.\n * @param {number} y Scale factor y.\n * @return {!Transform} The scaled transform.\n */\nexport function scale(transform, x, y) {\n return multiply(transform, set(tmp_, x, 0, 0, y, 0, 0));\n}\n\n/**\n * Creates a scale transform.\n * @param {!Transform} target Transform to overwrite.\n * @param {number} x Scale factor x.\n * @param {number} y Scale factor y.\n * @return {!Transform} The scale transform.\n */\nexport function makeScale(target, x, y) {\n return set(target, x, 0, 0, y, 0, 0);\n}\n\n/**\n * Applies translation to the given transform.\n * @param {!Transform} transform Transform.\n * @param {number} dx Translation x.\n * @param {number} dy Translation y.\n * @return {!Transform} The translated transform.\n */\nexport function translate(transform, dx, dy) {\n return multiply(transform, set(tmp_, 1, 0, 0, 1, dx, dy));\n}\n\n/**\n * Creates a composite transform given an initial translation, scale, rotation, and\n * final translation (in that order only, not commutative).\n * @param {!Transform} transform The transform (will be modified in place).\n * @param {number} dx1 Initial translation x.\n * @param {number} dy1 Initial translation y.\n * @param {number} sx Scale factor x.\n * @param {number} sy Scale factor y.\n * @param {number} angle Rotation (in counter-clockwise radians).\n * @param {number} dx2 Final translation x.\n * @param {number} dy2 Final translation y.\n * @return {!Transform} The composite transform.\n */\nexport function compose(transform, dx1, dy1, sx, sy, angle, dx2, dy2) {\n const sin = Math.sin(angle);\n const cos = Math.cos(angle);\n transform[0] = sx * cos;\n transform[1] = sy * sin;\n transform[2] = -sx * sin;\n transform[3] = sy * cos;\n transform[4] = dx2 * sx * cos - dy2 * sx * sin + dx1;\n transform[5] = dx2 * sy * sin + dy2 * sy * cos + dy1;\n return transform;\n}\n\n/**\n * Creates a composite transform given an initial translation, scale, rotation, and\n * final translation (in that order only, not commutative). The resulting transform\n * string can be applied as `transform` property of an HTMLElement's style.\n * @param {number} dx1 Initial translation x.\n * @param {number} dy1 Initial translation y.\n * @param {number} sx Scale factor x.\n * @param {number} sy Scale factor y.\n * @param {number} angle Rotation (in counter-clockwise radians).\n * @param {number} dx2 Final translation x.\n * @param {number} dy2 Final translation y.\n * @return {string} The composite css transform.\n * @api\n */\nexport function composeCssTransform(dx1, dy1, sx, sy, angle, dx2, dy2) {\n return toString(compose(create(), dx1, dy1, sx, sy, angle, dx2, dy2));\n}\n\n/**\n * Invert the given transform.\n * @param {!Transform} source The source transform to invert.\n * @return {!Transform} The inverted (source) transform.\n */\nexport function invert(source) {\n return makeInverse(source, source);\n}\n\n/**\n * Invert the given transform.\n * @param {!Transform} target Transform to be set as the inverse of\n * the source transform.\n * @param {!Transform} source The source transform to invert.\n * @return {!Transform} The inverted (target) transform.\n */\nexport function makeInverse(target, source) {\n const det = determinant(source);\n assert(det !== 0, 32); // Transformation matrix cannot be inverted\n\n const a = source[0];\n const b = source[1];\n const c = source[2];\n const d = source[3];\n const e = source[4];\n const f = source[5];\n\n target[0] = d / det;\n target[1] = -b / det;\n target[2] = -c / det;\n target[3] = a / det;\n target[4] = (c * f - d * e) / det;\n target[5] = -(a * f - b * e) / det;\n\n return target;\n}\n\n/**\n * Returns the determinant of the given matrix.\n * @param {!Transform} mat Matrix.\n * @return {number} Determinant.\n */\nexport function determinant(mat) {\n return mat[0] * mat[3] - mat[1] * mat[2];\n}\n\n/**\n * @type {HTMLElement}\n * @private\n */\nlet transformStringDiv;\n\n/**\n * A rounded string version of the transform. This can be used\n * for CSS transforms.\n * @param {!Transform} mat Matrix.\n * @return {string} The transform as a string.\n */\nexport function toString(mat) {\n const transformString = 'matrix(' + mat.join(', ') + ')';\n if (WORKER_OFFSCREEN_CANVAS) {\n return transformString;\n }\n const node =\n transformStringDiv || (transformStringDiv = document.createElement('div'));\n node.style.transform = transformString;\n return node.style.transform;\n}\n","/**\n * @module ol/extent/Relationship\n */\n\n/**\n * Relationship to an extent.\n * @enum {number}\n */\nexport default {\n UNKNOWN: 0,\n INTERSECTING: 1,\n ABOVE: 2,\n RIGHT: 4,\n BELOW: 8,\n LEFT: 16,\n};\n","/**\n * @module ol/extent\n */\nimport Relationship from './extent/Relationship.js';\nimport {assert} from './asserts.js';\n\n/**\n * An array of numbers representing an extent: `[minx, miny, maxx, maxy]`.\n * @typedef {Array} Extent\n * @api\n */\n\n/**\n * Extent corner.\n * @typedef {'bottom-left' | 'bottom-right' | 'top-left' | 'top-right'} Corner\n */\n\n/**\n * Build an extent that includes all given coordinates.\n *\n * @param {Array} coordinates Coordinates.\n * @return {Extent} Bounding extent.\n * @api\n */\nexport function boundingExtent(coordinates) {\n const extent = createEmpty();\n for (let i = 0, ii = coordinates.length; i < ii; ++i) {\n extendCoordinate(extent, coordinates[i]);\n }\n return extent;\n}\n\n/**\n * @param {Array} xs Xs.\n * @param {Array} ys Ys.\n * @param {Extent} [dest] Destination extent.\n * @private\n * @return {Extent} Extent.\n */\nfunction _boundingExtentXYs(xs, ys, dest) {\n const minX = Math.min.apply(null, xs);\n const minY = Math.min.apply(null, ys);\n const maxX = Math.max.apply(null, xs);\n const maxY = Math.max.apply(null, ys);\n return createOrUpdate(minX, minY, maxX, maxY, dest);\n}\n\n/**\n * Return extent increased by the provided value.\n * @param {Extent} extent Extent.\n * @param {number} value The amount by which the extent should be buffered.\n * @param {Extent} [dest] Extent.\n * @return {Extent} Extent.\n * @api\n */\nexport function buffer(extent, value, dest) {\n if (dest) {\n dest[0] = extent[0] - value;\n dest[1] = extent[1] - value;\n dest[2] = extent[2] + value;\n dest[3] = extent[3] + value;\n return dest;\n }\n return [\n extent[0] - value,\n extent[1] - value,\n extent[2] + value,\n extent[3] + value,\n ];\n}\n\n/**\n * Creates a clone of an extent.\n *\n * @param {Extent} extent Extent to clone.\n * @param {Extent} [dest] Extent.\n * @return {Extent} The clone.\n */\nexport function clone(extent, dest) {\n if (dest) {\n dest[0] = extent[0];\n dest[1] = extent[1];\n dest[2] = extent[2];\n dest[3] = extent[3];\n return dest;\n }\n return extent.slice();\n}\n\n/**\n * @param {Extent} extent Extent.\n * @param {number} x X.\n * @param {number} y Y.\n * @return {number} Closest squared distance.\n */\nexport function closestSquaredDistanceXY(extent, x, y) {\n let dx, dy;\n if (x < extent[0]) {\n dx = extent[0] - x;\n } else if (extent[2] < x) {\n dx = x - extent[2];\n } else {\n dx = 0;\n }\n if (y < extent[1]) {\n dy = extent[1] - y;\n } else if (extent[3] < y) {\n dy = y - extent[3];\n } else {\n dy = 0;\n }\n return dx * dx + dy * dy;\n}\n\n/**\n * Check if the passed coordinate is contained or on the edge of the extent.\n *\n * @param {Extent} extent Extent.\n * @param {import(\"./coordinate.js\").Coordinate} coordinate Coordinate.\n * @return {boolean} The coordinate is contained in the extent.\n * @api\n */\nexport function containsCoordinate(extent, coordinate) {\n return containsXY(extent, coordinate[0], coordinate[1]);\n}\n\n/**\n * Check if one extent contains another.\n *\n * An extent is deemed contained if it lies completely within the other extent,\n * including if they share one or more edges.\n *\n * @param {Extent} extent1 Extent 1.\n * @param {Extent} extent2 Extent 2.\n * @return {boolean} The second extent is contained by or on the edge of the\n * first.\n * @api\n */\nexport function containsExtent(extent1, extent2) {\n return (\n extent1[0] <= extent2[0] &&\n extent2[2] <= extent1[2] &&\n extent1[1] <= extent2[1] &&\n extent2[3] <= extent1[3]\n );\n}\n\n/**\n * Check if the passed coordinate is contained or on the edge of the extent.\n *\n * @param {Extent} extent Extent.\n * @param {number} x X coordinate.\n * @param {number} y Y coordinate.\n * @return {boolean} The x, y values are contained in the extent.\n * @api\n */\nexport function containsXY(extent, x, y) {\n return extent[0] <= x && x <= extent[2] && extent[1] <= y && y <= extent[3];\n}\n\n/**\n * Get the relationship between a coordinate and extent.\n * @param {Extent} extent The extent.\n * @param {import(\"./coordinate.js\").Coordinate} coordinate The coordinate.\n * @return {import(\"./extent/Relationship.js\").default} The relationship (bitwise compare with\n * import(\"./extent/Relationship.js\").Relationship).\n */\nexport function coordinateRelationship(extent, coordinate) {\n const minX = extent[0];\n const minY = extent[1];\n const maxX = extent[2];\n const maxY = extent[3];\n const x = coordinate[0];\n const y = coordinate[1];\n let relationship = Relationship.UNKNOWN;\n if (x < minX) {\n relationship = relationship | Relationship.LEFT;\n } else if (x > maxX) {\n relationship = relationship | Relationship.RIGHT;\n }\n if (y < minY) {\n relationship = relationship | Relationship.BELOW;\n } else if (y > maxY) {\n relationship = relationship | Relationship.ABOVE;\n }\n if (relationship === Relationship.UNKNOWN) {\n relationship = Relationship.INTERSECTING;\n }\n return relationship;\n}\n\n/**\n * Create an empty extent.\n * @return {Extent} Empty extent.\n * @api\n */\nexport function createEmpty() {\n return [Infinity, Infinity, -Infinity, -Infinity];\n}\n\n/**\n * Create a new extent or update the provided extent.\n * @param {number} minX Minimum X.\n * @param {number} minY Minimum Y.\n * @param {number} maxX Maximum X.\n * @param {number} maxY Maximum Y.\n * @param {Extent} [dest] Destination extent.\n * @return {Extent} Extent.\n */\nexport function createOrUpdate(minX, minY, maxX, maxY, dest) {\n if (dest) {\n dest[0] = minX;\n dest[1] = minY;\n dest[2] = maxX;\n dest[3] = maxY;\n return dest;\n }\n return [minX, minY, maxX, maxY];\n}\n\n/**\n * Create a new empty extent or make the provided one empty.\n * @param {Extent} [dest] Extent.\n * @return {Extent} Extent.\n */\nexport function createOrUpdateEmpty(dest) {\n return createOrUpdate(Infinity, Infinity, -Infinity, -Infinity, dest);\n}\n\n/**\n * @param {import(\"./coordinate.js\").Coordinate} coordinate Coordinate.\n * @param {Extent} [dest] Extent.\n * @return {Extent} Extent.\n */\nexport function createOrUpdateFromCoordinate(coordinate, dest) {\n const x = coordinate[0];\n const y = coordinate[1];\n return createOrUpdate(x, y, x, y, dest);\n}\n\n/**\n * @param {Array} coordinates Coordinates.\n * @param {Extent} [dest] Extent.\n * @return {Extent} Extent.\n */\nexport function createOrUpdateFromCoordinates(coordinates, dest) {\n const extent = createOrUpdateEmpty(dest);\n return extendCoordinates(extent, coordinates);\n}\n\n/**\n * @param {Array} flatCoordinates Flat coordinates.\n * @param {number} offset Offset.\n * @param {number} end End.\n * @param {number} stride Stride.\n * @param {Extent} [dest] Extent.\n * @return {Extent} Extent.\n */\nexport function createOrUpdateFromFlatCoordinates(\n flatCoordinates,\n offset,\n end,\n stride,\n dest\n) {\n const extent = createOrUpdateEmpty(dest);\n return extendFlatCoordinates(extent, flatCoordinates, offset, end, stride);\n}\n\n/**\n * @param {Array>} rings Rings.\n * @param {Extent} [dest] Extent.\n * @return {Extent} Extent.\n */\nexport function createOrUpdateFromRings(rings, dest) {\n const extent = createOrUpdateEmpty(dest);\n return extendRings(extent, rings);\n}\n\n/**\n * Determine if two extents are equivalent.\n * @param {Extent} extent1 Extent 1.\n * @param {Extent} extent2 Extent 2.\n * @return {boolean} The two extents are equivalent.\n * @api\n */\nexport function equals(extent1, extent2) {\n return (\n extent1[0] == extent2[0] &&\n extent1[2] == extent2[2] &&\n extent1[1] == extent2[1] &&\n extent1[3] == extent2[3]\n );\n}\n\n/**\n * Determine if two extents are approximately equivalent.\n * @param {Extent} extent1 Extent 1.\n * @param {Extent} extent2 Extent 2.\n * @param {number} tolerance Tolerance in extent coordinate units.\n * @return {boolean} The two extents differ by less than the tolerance.\n */\nexport function approximatelyEquals(extent1, extent2, tolerance) {\n return (\n Math.abs(extent1[0] - extent2[0]) < tolerance &&\n Math.abs(extent1[2] - extent2[2]) < tolerance &&\n Math.abs(extent1[1] - extent2[1]) < tolerance &&\n Math.abs(extent1[3] - extent2[3]) < tolerance\n );\n}\n\n/**\n * Modify an extent to include another extent.\n * @param {Extent} extent1 The extent to be modified.\n * @param {Extent} extent2 The extent that will be included in the first.\n * @return {Extent} A reference to the first (extended) extent.\n * @api\n */\nexport function extend(extent1, extent2) {\n if (extent2[0] < extent1[0]) {\n extent1[0] = extent2[0];\n }\n if (extent2[2] > extent1[2]) {\n extent1[2] = extent2[2];\n }\n if (extent2[1] < extent1[1]) {\n extent1[1] = extent2[1];\n }\n if (extent2[3] > extent1[3]) {\n extent1[3] = extent2[3];\n }\n return extent1;\n}\n\n/**\n * @param {Extent} extent Extent.\n * @param {import(\"./coordinate.js\").Coordinate} coordinate Coordinate.\n */\nexport function extendCoordinate(extent, coordinate) {\n if (coordinate[0] < extent[0]) {\n extent[0] = coordinate[0];\n }\n if (coordinate[0] > extent[2]) {\n extent[2] = coordinate[0];\n }\n if (coordinate[1] < extent[1]) {\n extent[1] = coordinate[1];\n }\n if (coordinate[1] > extent[3]) {\n extent[3] = coordinate[1];\n }\n}\n\n/**\n * @param {Extent} extent Extent.\n * @param {Array} coordinates Coordinates.\n * @return {Extent} Extent.\n */\nexport function extendCoordinates(extent, coordinates) {\n for (let i = 0, ii = coordinates.length; i < ii; ++i) {\n extendCoordinate(extent, coordinates[i]);\n }\n return extent;\n}\n\n/**\n * @param {Extent} extent Extent.\n * @param {Array} flatCoordinates Flat coordinates.\n * @param {number} offset Offset.\n * @param {number} end End.\n * @param {number} stride Stride.\n * @return {Extent} Extent.\n */\nexport function extendFlatCoordinates(\n extent,\n flatCoordinates,\n offset,\n end,\n stride\n) {\n for (; offset < end; offset += stride) {\n extendXY(extent, flatCoordinates[offset], flatCoordinates[offset + 1]);\n }\n return extent;\n}\n\n/**\n * @param {Extent} extent Extent.\n * @param {Array>} rings Rings.\n * @return {Extent} Extent.\n */\nexport function extendRings(extent, rings) {\n for (let i = 0, ii = rings.length; i < ii; ++i) {\n extendCoordinates(extent, rings[i]);\n }\n return extent;\n}\n\n/**\n * @param {Extent} extent Extent.\n * @param {number} x X.\n * @param {number} y Y.\n */\nexport function extendXY(extent, x, y) {\n extent[0] = Math.min(extent[0], x);\n extent[1] = Math.min(extent[1], y);\n extent[2] = Math.max(extent[2], x);\n extent[3] = Math.max(extent[3], y);\n}\n\n/**\n * This function calls `callback` for each corner of the extent. If the\n * callback returns a truthy value the function returns that value\n * immediately. Otherwise the function returns `false`.\n * @param {Extent} extent Extent.\n * @param {function(import(\"./coordinate.js\").Coordinate): S} callback Callback.\n * @return {S|boolean} Value.\n * @template S\n */\nexport function forEachCorner(extent, callback) {\n let val;\n val = callback(getBottomLeft(extent));\n if (val) {\n return val;\n }\n val = callback(getBottomRight(extent));\n if (val) {\n return val;\n }\n val = callback(getTopRight(extent));\n if (val) {\n return val;\n }\n val = callback(getTopLeft(extent));\n if (val) {\n return val;\n }\n return false;\n}\n\n/**\n * Get the size of an extent.\n * @param {Extent} extent Extent.\n * @return {number} Area.\n * @api\n */\nexport function getArea(extent) {\n let area = 0;\n if (!isEmpty(extent)) {\n area = getWidth(extent) * getHeight(extent);\n }\n return area;\n}\n\n/**\n * Get the bottom left coordinate of an extent.\n * @param {Extent} extent Extent.\n * @return {import(\"./coordinate.js\").Coordinate} Bottom left coordinate.\n * @api\n */\nexport function getBottomLeft(extent) {\n return [extent[0], extent[1]];\n}\n\n/**\n * Get the bottom right coordinate of an extent.\n * @param {Extent} extent Extent.\n * @return {import(\"./coordinate.js\").Coordinate} Bottom right coordinate.\n * @api\n */\nexport function getBottomRight(extent) {\n return [extent[2], extent[1]];\n}\n\n/**\n * Get the center coordinate of an extent.\n * @param {Extent} extent Extent.\n * @return {import(\"./coordinate.js\").Coordinate} Center.\n * @api\n */\nexport function getCenter(extent) {\n return [(extent[0] + extent[2]) / 2, (extent[1] + extent[3]) / 2];\n}\n\n/**\n * Get a corner coordinate of an extent.\n * @param {Extent} extent Extent.\n * @param {Corner} corner Corner.\n * @return {import(\"./coordinate.js\").Coordinate} Corner coordinate.\n */\nexport function getCorner(extent, corner) {\n let coordinate;\n if (corner === 'bottom-left') {\n coordinate = getBottomLeft(extent);\n } else if (corner === 'bottom-right') {\n coordinate = getBottomRight(extent);\n } else if (corner === 'top-left') {\n coordinate = getTopLeft(extent);\n } else if (corner === 'top-right') {\n coordinate = getTopRight(extent);\n } else {\n assert(false, 13); // Invalid corner\n }\n return coordinate;\n}\n\n/**\n * @param {Extent} extent1 Extent 1.\n * @param {Extent} extent2 Extent 2.\n * @return {number} Enlarged area.\n */\nexport function getEnlargedArea(extent1, extent2) {\n const minX = Math.min(extent1[0], extent2[0]);\n const minY = Math.min(extent1[1], extent2[1]);\n const maxX = Math.max(extent1[2], extent2[2]);\n const maxY = Math.max(extent1[3], extent2[3]);\n return (maxX - minX) * (maxY - minY);\n}\n\n/**\n * @param {import(\"./coordinate.js\").Coordinate} center Center.\n * @param {number} resolution Resolution.\n * @param {number} rotation Rotation.\n * @param {import(\"./size.js\").Size} size Size.\n * @param {Extent} [dest] Destination extent.\n * @return {Extent} Extent.\n */\nexport function getForViewAndSize(center, resolution, rotation, size, dest) {\n const [x0, y0, x1, y1, x2, y2, x3, y3] = getRotatedViewport(\n center,\n resolution,\n rotation,\n size\n );\n return createOrUpdate(\n Math.min(x0, x1, x2, x3),\n Math.min(y0, y1, y2, y3),\n Math.max(x0, x1, x2, x3),\n Math.max(y0, y1, y2, y3),\n dest\n );\n}\n\n/**\n * @param {import(\"./coordinate.js\").Coordinate} center Center.\n * @param {number} resolution Resolution.\n * @param {number} rotation Rotation.\n * @param {import(\"./size.js\").Size} size Size.\n * @return {Array} Linear ring representing the viewport.\n */\nexport function getRotatedViewport(center, resolution, rotation, size) {\n const dx = (resolution * size[0]) / 2;\n const dy = (resolution * size[1]) / 2;\n const cosRotation = Math.cos(rotation);\n const sinRotation = Math.sin(rotation);\n const xCos = dx * cosRotation;\n const xSin = dx * sinRotation;\n const yCos = dy * cosRotation;\n const ySin = dy * sinRotation;\n const x = center[0];\n const y = center[1];\n return [\n x - xCos + ySin,\n y - xSin - yCos,\n x - xCos - ySin,\n y - xSin + yCos,\n x + xCos - ySin,\n y + xSin + yCos,\n x + xCos + ySin,\n y + xSin - yCos,\n x - xCos + ySin,\n y - xSin - yCos,\n ];\n}\n\n/**\n * Get the height of an extent.\n * @param {Extent} extent Extent.\n * @return {number} Height.\n * @api\n */\nexport function getHeight(extent) {\n return extent[3] - extent[1];\n}\n\n/**\n * @param {Extent} extent1 Extent 1.\n * @param {Extent} extent2 Extent 2.\n * @return {number} Intersection area.\n */\nexport function getIntersectionArea(extent1, extent2) {\n const intersection = getIntersection(extent1, extent2);\n return getArea(intersection);\n}\n\n/**\n * Get the intersection of two extents.\n * @param {Extent} extent1 Extent 1.\n * @param {Extent} extent2 Extent 2.\n * @param {Extent} [dest] Optional extent to populate with intersection.\n * @return {Extent} Intersecting extent.\n * @api\n */\nexport function getIntersection(extent1, extent2, dest) {\n const intersection = dest ? dest : createEmpty();\n if (intersects(extent1, extent2)) {\n if (extent1[0] > extent2[0]) {\n intersection[0] = extent1[0];\n } else {\n intersection[0] = extent2[0];\n }\n if (extent1[1] > extent2[1]) {\n intersection[1] = extent1[1];\n } else {\n intersection[1] = extent2[1];\n }\n if (extent1[2] < extent2[2]) {\n intersection[2] = extent1[2];\n } else {\n intersection[2] = extent2[2];\n }\n if (extent1[3] < extent2[3]) {\n intersection[3] = extent1[3];\n } else {\n intersection[3] = extent2[3];\n }\n } else {\n createOrUpdateEmpty(intersection);\n }\n return intersection;\n}\n\n/**\n * @param {Extent} extent Extent.\n * @return {number} Margin.\n */\nexport function getMargin(extent) {\n return getWidth(extent) + getHeight(extent);\n}\n\n/**\n * Get the size (width, height) of an extent.\n * @param {Extent} extent The extent.\n * @return {import(\"./size.js\").Size} The extent size.\n * @api\n */\nexport function getSize(extent) {\n return [extent[2] - extent[0], extent[3] - extent[1]];\n}\n\n/**\n * Get the top left coordinate of an extent.\n * @param {Extent} extent Extent.\n * @return {import(\"./coordinate.js\").Coordinate} Top left coordinate.\n * @api\n */\nexport function getTopLeft(extent) {\n return [extent[0], extent[3]];\n}\n\n/**\n * Get the top right coordinate of an extent.\n * @param {Extent} extent Extent.\n * @return {import(\"./coordinate.js\").Coordinate} Top right coordinate.\n * @api\n */\nexport function getTopRight(extent) {\n return [extent[2], extent[3]];\n}\n\n/**\n * Get the width of an extent.\n * @param {Extent} extent Extent.\n * @return {number} Width.\n * @api\n */\nexport function getWidth(extent) {\n return extent[2] - extent[0];\n}\n\n/**\n * Determine if one extent intersects another.\n * @param {Extent} extent1 Extent 1.\n * @param {Extent} extent2 Extent.\n * @return {boolean} The two extents intersect.\n * @api\n */\nexport function intersects(extent1, extent2) {\n return (\n extent1[0] <= extent2[2] &&\n extent1[2] >= extent2[0] &&\n extent1[1] <= extent2[3] &&\n extent1[3] >= extent2[1]\n );\n}\n\n/**\n * Determine if an extent is empty.\n * @param {Extent} extent Extent.\n * @return {boolean} Is empty.\n * @api\n */\nexport function isEmpty(extent) {\n return extent[2] < extent[0] || extent[3] < extent[1];\n}\n\n/**\n * @param {Extent} extent Extent.\n * @param {Extent} [dest] Extent.\n * @return {Extent} Extent.\n */\nexport function returnOrUpdate(extent, dest) {\n if (dest) {\n dest[0] = extent[0];\n dest[1] = extent[1];\n dest[2] = extent[2];\n dest[3] = extent[3];\n return dest;\n }\n return extent;\n}\n\n/**\n * @param {Extent} extent Extent.\n * @param {number} value Value.\n */\nexport function scaleFromCenter(extent, value) {\n const deltaX = ((extent[2] - extent[0]) / 2) * (value - 1);\n const deltaY = ((extent[3] - extent[1]) / 2) * (value - 1);\n extent[0] -= deltaX;\n extent[2] += deltaX;\n extent[1] -= deltaY;\n extent[3] += deltaY;\n}\n\n/**\n * Determine if the segment between two coordinates intersects (crosses,\n * touches, or is contained by) the provided extent.\n * @param {Extent} extent The extent.\n * @param {import(\"./coordinate.js\").Coordinate} start Segment start coordinate.\n * @param {import(\"./coordinate.js\").Coordinate} end Segment end coordinate.\n * @return {boolean} The segment intersects the extent.\n */\nexport function intersectsSegment(extent, start, end) {\n let intersects = false;\n const startRel = coordinateRelationship(extent, start);\n const endRel = coordinateRelationship(extent, end);\n if (\n startRel === Relationship.INTERSECTING ||\n endRel === Relationship.INTERSECTING\n ) {\n intersects = true;\n } else {\n const minX = extent[0];\n const minY = extent[1];\n const maxX = extent[2];\n const maxY = extent[3];\n const startX = start[0];\n const startY = start[1];\n const endX = end[0];\n const endY = end[1];\n const slope = (endY - startY) / (endX - startX);\n let x, y;\n if (!!(endRel & Relationship.ABOVE) && !(startRel & Relationship.ABOVE)) {\n // potentially intersects top\n x = endX - (endY - maxY) / slope;\n intersects = x >= minX && x <= maxX;\n }\n if (\n !intersects &&\n !!(endRel & Relationship.RIGHT) &&\n !(startRel & Relationship.RIGHT)\n ) {\n // potentially intersects right\n y = endY - (endX - maxX) * slope;\n intersects = y >= minY && y <= maxY;\n }\n if (\n !intersects &&\n !!(endRel & Relationship.BELOW) &&\n !(startRel & Relationship.BELOW)\n ) {\n // potentially intersects bottom\n x = endX - (endY - minY) / slope;\n intersects = x >= minX && x <= maxX;\n }\n if (\n !intersects &&\n !!(endRel & Relationship.LEFT) &&\n !(startRel & Relationship.LEFT)\n ) {\n // potentially intersects left\n y = endY - (endX - minX) * slope;\n intersects = y >= minY && y <= maxY;\n }\n }\n return intersects;\n}\n\n/**\n * Apply a transform function to the extent.\n * @param {Extent} extent Extent.\n * @param {import(\"./proj.js\").TransformFunction} transformFn Transform function.\n * Called with `[minX, minY, maxX, maxY]` extent coordinates.\n * @param {Extent} [dest] Destination extent.\n * @param {number} [stops] Number of stops per side used for the transform.\n * By default only the corners are used.\n * @return {Extent} Extent.\n * @api\n */\nexport function applyTransform(extent, transformFn, dest, stops) {\n let coordinates = [];\n if (stops > 1) {\n const width = extent[2] - extent[0];\n const height = extent[3] - extent[1];\n for (let i = 0; i < stops; ++i) {\n coordinates.push(\n extent[0] + (width * i) / stops,\n extent[1],\n extent[2],\n extent[1] + (height * i) / stops,\n extent[2] - (width * i) / stops,\n extent[3],\n extent[0],\n extent[3] - (height * i) / stops\n );\n }\n } else {\n coordinates = [\n extent[0],\n extent[1],\n extent[2],\n extent[1],\n extent[2],\n extent[3],\n extent[0],\n extent[3],\n ];\n }\n transformFn(coordinates, coordinates, 2);\n const xs = [];\n const ys = [];\n for (let i = 0, l = coordinates.length; i < l; i += 2) {\n xs.push(coordinates[i]);\n ys.push(coordinates[i + 1]);\n }\n return _boundingExtentXYs(xs, ys, dest);\n}\n\n/**\n * Modifies the provided extent in-place to be within the real world\n * extent.\n *\n * @param {Extent} extent Extent.\n * @param {import(\"./proj/Projection.js\").default} projection Projection\n * @return {Extent} The extent within the real world extent.\n */\nexport function wrapX(extent, projection) {\n const projectionExtent = projection.getExtent();\n const center = getCenter(extent);\n if (\n projection.canWrapX() &&\n (center[0] < projectionExtent[0] || center[0] >= projectionExtent[2])\n ) {\n const worldWidth = getWidth(projectionExtent);\n const worldsAway = Math.floor(\n (center[0] - projectionExtent[0]) / worldWidth\n );\n const offset = worldsAway * worldWidth;\n extent[0] -= offset;\n extent[2] -= offset;\n }\n return extent;\n}\n\n/**\n * Fits the extent to the real world\n *\n * If the extent does not cross the anti meridian, this will return the extent in an array\n * If the extent crosses the anti meridian, the extent will be sliced, so each part fits within the\n * real world\n *\n *\n * @param {Extent} extent Extent.\n * @param {import(\"./proj/Projection.js\").default} projection Projection\n * @return {Array} The extent within the real world extent.\n */\nexport function wrapAndSliceX(extent, projection) {\n if (projection.canWrapX()) {\n const projectionExtent = projection.getExtent();\n\n if (!isFinite(extent[0]) || !isFinite(extent[2])) {\n return [[projectionExtent[0], extent[1], projectionExtent[2], extent[3]]];\n }\n\n wrapX(extent, projection);\n const worldWidth = getWidth(projectionExtent);\n\n if (getWidth(extent) > worldWidth) {\n // the extent wraps around on itself\n return [[projectionExtent[0], extent[1], projectionExtent[2], extent[3]]];\n } else if (extent[0] < projectionExtent[0]) {\n // the extent crosses the anti meridian, so it needs to be sliced\n return [\n [extent[0] + worldWidth, extent[1], projectionExtent[2], extent[3]],\n [projectionExtent[0], extent[1], extent[2], extent[3]],\n ];\n } else if (extent[2] > projectionExtent[2]) {\n // the extent crosses the anti meridian, so it needs to be sliced\n return [\n [extent[0], extent[1], projectionExtent[2], extent[3]],\n [projectionExtent[0], extent[1], extent[2] - worldWidth, extent[3]],\n ];\n }\n }\n\n return [extent];\n}\n","/**\n * @module ol/proj/Units\n */\n\n/**\n * @typedef {'radians' | 'degrees' | 'ft' | 'm' | 'pixels' | 'tile-pixels' | 'us-ft'} Units\n * Projection units.\n */\n\n/**\n * See http://duff.ess.washington.edu/data/raster/drg/docs/geotiff.txt\n * @type {Object}\n */\nconst unitByCode = {\n '9001': 'm',\n '9002': 'ft',\n '9003': 'us-ft',\n '9101': 'radians',\n '9102': 'degrees',\n};\n\n/**\n * @param {number} code Unit code.\n * @return {Units} Units.\n */\nexport function fromCode(code) {\n return unitByCode[code];\n}\n\n/**\n * @typedef {Object} MetersPerUnitLookup\n * @property {number} radians Radians\n * @property {number} degrees Degrees\n * @property {number} ft Feet\n * @property {number} m Meters\n * @property {number} us-ft US feet\n */\n\n/**\n * Meters per unit lookup table.\n * @const\n * @type {MetersPerUnitLookup}\n * @api\n */\nexport const METERS_PER_UNIT = {\n // use the radius of the Normal sphere\n 'radians': 6370997 / (2 * Math.PI),\n 'degrees': (2 * Math.PI * 6370997) / 360,\n 'ft': 0.3048,\n 'm': 1,\n 'us-ft': 1200 / 3937,\n};\n","/**\n * @module ol/proj/Projection\n */\nimport {METERS_PER_UNIT} from './Units.js';\n\n/**\n * @typedef {Object} Options\n * @property {string} code The SRS identifier code, e.g. `EPSG:4326`.\n * @property {import(\"./Units.js\").Units} [units] Units. Required unless a\n * proj4 projection is defined for `code`.\n * @property {import(\"../extent.js\").Extent} [extent] The validity extent for the SRS.\n * @property {string} [axisOrientation='enu'] The axis orientation as specified in Proj4.\n * @property {boolean} [global=false] Whether the projection is valid for the whole globe.\n * @property {number} [metersPerUnit] The meters per unit for the SRS.\n * If not provided, the `units` are used to get the meters per unit from the {@link METERS_PER_UNIT}\n * lookup table.\n * @property {import(\"../extent.js\").Extent} [worldExtent] The world extent for the SRS.\n * @property {function(number, import(\"../coordinate.js\").Coordinate):number} [getPointResolution]\n * Function to determine resolution at a point. The function is called with a\n * `number` view resolution and a {@link module:ol/coordinate~Coordinate} as arguments, and returns\n * the `number` resolution in projection units at the passed coordinate. If this is `undefined`,\n * the default {@link module:ol/proj.getPointResolution} function will be used.\n */\n\n/**\n * @classdesc\n * Projection definition class. One of these is created for each projection\n * supported in the application and stored in the {@link module:ol/proj} namespace.\n * You can use these in applications, but this is not required, as API params\n * and options use {@link module:ol/proj~ProjectionLike} which means the simple string\n * code will suffice.\n *\n * You can use {@link module:ol/proj.get} to retrieve the object for a particular\n * projection.\n *\n * The library includes definitions for `EPSG:4326` and `EPSG:3857`, together\n * with the following aliases:\n * * `EPSG:4326`: CRS:84, urn:ogc:def:crs:EPSG:6.6:4326,\n * urn:ogc:def:crs:OGC:1.3:CRS84, urn:ogc:def:crs:OGC:2:84,\n * http://www.opengis.net/gml/srs/epsg.xml#4326,\n * urn:x-ogc:def:crs:EPSG:4326\n * * `EPSG:3857`: EPSG:102100, EPSG:102113, EPSG:900913,\n * urn:ogc:def:crs:EPSG:6.18:3:3857,\n * http://www.opengis.net/gml/srs/epsg.xml#3857\n *\n * If you use [proj4js](https://github.com/proj4js/proj4js), aliases can\n * be added using `proj4.defs()`. After all required projection definitions are\n * added, call the {@link module:ol/proj/proj4.register} function.\n *\n * @api\n */\nclass Projection {\n /**\n * @param {Options} options Projection options.\n */\n constructor(options) {\n /**\n * @private\n * @type {string}\n */\n this.code_ = options.code;\n\n /**\n * Units of projected coordinates. When set to `TILE_PIXELS`, a\n * `this.extent_` and `this.worldExtent_` must be configured properly for each\n * tile.\n * @private\n * @type {import(\"./Units.js\").Units}\n */\n this.units_ = /** @type {import(\"./Units.js\").Units} */ (options.units);\n\n /**\n * Validity extent of the projection in projected coordinates. For projections\n * with `TILE_PIXELS` units, this is the extent of the tile in\n * tile pixel space.\n * @private\n * @type {import(\"../extent.js\").Extent}\n */\n this.extent_ = options.extent !== undefined ? options.extent : null;\n\n /**\n * Extent of the world in EPSG:4326. For projections with\n * `TILE_PIXELS` units, this is the extent of the tile in\n * projected coordinate space.\n * @private\n * @type {import(\"../extent.js\").Extent}\n */\n this.worldExtent_ =\n options.worldExtent !== undefined ? options.worldExtent : null;\n\n /**\n * @private\n * @type {string}\n */\n this.axisOrientation_ =\n options.axisOrientation !== undefined ? options.axisOrientation : 'enu';\n\n /**\n * @private\n * @type {boolean}\n */\n this.global_ = options.global !== undefined ? options.global : false;\n\n /**\n * @private\n * @type {boolean}\n */\n this.canWrapX_ = !!(this.global_ && this.extent_);\n\n /**\n * @private\n * @type {function(number, import(\"../coordinate.js\").Coordinate):number|undefined}\n */\n this.getPointResolutionFunc_ = options.getPointResolution;\n\n /**\n * @private\n * @type {import(\"../tilegrid/TileGrid.js\").default}\n */\n this.defaultTileGrid_ = null;\n\n /**\n * @private\n * @type {number|undefined}\n */\n this.metersPerUnit_ = options.metersPerUnit;\n }\n\n /**\n * @return {boolean} The projection is suitable for wrapping the x-axis\n */\n canWrapX() {\n return this.canWrapX_;\n }\n\n /**\n * Get the code for this projection, e.g. 'EPSG:4326'.\n * @return {string} Code.\n * @api\n */\n getCode() {\n return this.code_;\n }\n\n /**\n * Get the validity extent for this projection.\n * @return {import(\"../extent.js\").Extent} Extent.\n * @api\n */\n getExtent() {\n return this.extent_;\n }\n\n /**\n * Get the units of this projection.\n * @return {import(\"./Units.js\").Units} Units.\n * @api\n */\n getUnits() {\n return this.units_;\n }\n\n /**\n * Get the amount of meters per unit of this projection. If the projection is\n * not configured with `metersPerUnit` or a units identifier, the return is\n * `undefined`.\n * @return {number|undefined} Meters.\n * @api\n */\n getMetersPerUnit() {\n return this.metersPerUnit_ || METERS_PER_UNIT[this.units_];\n }\n\n /**\n * Get the world extent for this projection.\n * @return {import(\"../extent.js\").Extent} Extent.\n * @api\n */\n getWorldExtent() {\n return this.worldExtent_;\n }\n\n /**\n * Get the axis orientation of this projection.\n * Example values are:\n * enu - the default easting, northing, elevation.\n * neu - northing, easting, up - useful for \"lat/long\" geographic coordinates,\n * or south orientated transverse mercator.\n * wnu - westing, northing, up - some planetary coordinate systems have\n * \"west positive\" coordinate systems\n * @return {string} Axis orientation.\n * @api\n */\n getAxisOrientation() {\n return this.axisOrientation_;\n }\n\n /**\n * Is this projection a global projection which spans the whole world?\n * @return {boolean} Whether the projection is global.\n * @api\n */\n isGlobal() {\n return this.global_;\n }\n\n /**\n * Set if the projection is a global projection which spans the whole world\n * @param {boolean} global Whether the projection is global.\n * @api\n */\n setGlobal(global) {\n this.global_ = global;\n this.canWrapX_ = !!(global && this.extent_);\n }\n\n /**\n * @return {import(\"../tilegrid/TileGrid.js\").default} The default tile grid.\n */\n getDefaultTileGrid() {\n return this.defaultTileGrid_;\n }\n\n /**\n * @param {import(\"../tilegrid/TileGrid.js\").default} tileGrid The default tile grid.\n */\n setDefaultTileGrid(tileGrid) {\n this.defaultTileGrid_ = tileGrid;\n }\n\n /**\n * Set the validity extent for this projection.\n * @param {import(\"../extent.js\").Extent} extent Extent.\n * @api\n */\n setExtent(extent) {\n this.extent_ = extent;\n this.canWrapX_ = !!(this.global_ && extent);\n }\n\n /**\n * Set the world extent for this projection.\n * @param {import(\"../extent.js\").Extent} worldExtent World extent\n * [minlon, minlat, maxlon, maxlat].\n * @api\n */\n setWorldExtent(worldExtent) {\n this.worldExtent_ = worldExtent;\n }\n\n /**\n * Set the getPointResolution function (see {@link module:ol/proj.getPointResolution}\n * for this projection.\n * @param {function(number, import(\"../coordinate.js\").Coordinate):number} func Function\n * @api\n */\n setGetPointResolution(func) {\n this.getPointResolutionFunc_ = func;\n }\n\n /**\n * Get the custom point resolution function for this projection (if set).\n * @return {function(number, import(\"../coordinate.js\").Coordinate):number|undefined} The custom point\n * resolution function (if set).\n */\n getPointResolutionFunc() {\n return this.getPointResolutionFunc_;\n }\n}\n\nexport default Projection;\n","/**\n * @module ol/proj/epsg3857\n */\nimport Projection from './Projection.js';\n\n/**\n * Radius of WGS84 sphere\n *\n * @const\n * @type {number}\n */\nexport const RADIUS = 6378137;\n\n/**\n * @const\n * @type {number}\n */\nexport const HALF_SIZE = Math.PI * RADIUS;\n\n/**\n * @const\n * @type {import(\"../extent.js\").Extent}\n */\nexport const EXTENT = [-HALF_SIZE, -HALF_SIZE, HALF_SIZE, HALF_SIZE];\n\n/**\n * @const\n * @type {import(\"../extent.js\").Extent}\n */\nexport const WORLD_EXTENT = [-180, -85, 180, 85];\n\n/**\n * Maximum safe value in y direction\n * @const\n * @type {number}\n */\nexport const MAX_SAFE_Y = RADIUS * Math.log(Math.tan(Math.PI / 2));\n\n/**\n * @classdesc\n * Projection object for web/spherical Mercator (EPSG:3857).\n */\nclass EPSG3857Projection extends Projection {\n /**\n * @param {string} code Code.\n */\n constructor(code) {\n super({\n code: code,\n units: 'm',\n extent: EXTENT,\n global: true,\n worldExtent: WORLD_EXTENT,\n getPointResolution: function (resolution, point) {\n return resolution / Math.cosh(point[1] / RADIUS);\n },\n });\n }\n}\n\n/**\n * Projections equal to EPSG:3857.\n *\n * @const\n * @type {Array}\n */\nexport const PROJECTIONS = [\n new EPSG3857Projection('EPSG:3857'),\n new EPSG3857Projection('EPSG:102100'),\n new EPSG3857Projection('EPSG:102113'),\n new EPSG3857Projection('EPSG:900913'),\n new EPSG3857Projection('http://www.opengis.net/def/crs/EPSG/0/3857'),\n new EPSG3857Projection('http://www.opengis.net/gml/srs/epsg.xml#3857'),\n];\n\n/**\n * Transformation from EPSG:4326 to EPSG:3857.\n *\n * @param {Array} input Input array of coordinate values.\n * @param {Array} [output] Output array of coordinate values.\n * @param {number} [dimension] Dimension (default is `2`).\n * @return {Array} Output array of coordinate values.\n */\nexport function fromEPSG4326(input, output, dimension) {\n const length = input.length;\n dimension = dimension > 1 ? dimension : 2;\n if (output === undefined) {\n if (dimension > 2) {\n // preserve values beyond second dimension\n output = input.slice();\n } else {\n output = new Array(length);\n }\n }\n for (let i = 0; i < length; i += dimension) {\n output[i] = (HALF_SIZE * input[i]) / 180;\n let y = RADIUS * Math.log(Math.tan((Math.PI * (+input[i + 1] + 90)) / 360));\n if (y > MAX_SAFE_Y) {\n y = MAX_SAFE_Y;\n } else if (y < -MAX_SAFE_Y) {\n y = -MAX_SAFE_Y;\n }\n output[i + 1] = y;\n }\n return output;\n}\n\n/**\n * Transformation from EPSG:3857 to EPSG:4326.\n *\n * @param {Array} input Input array of coordinate values.\n * @param {Array} [output] Output array of coordinate values.\n * @param {number} [dimension] Dimension (default is `2`).\n * @return {Array} Output array of coordinate values.\n */\nexport function toEPSG4326(input, output, dimension) {\n const length = input.length;\n dimension = dimension > 1 ? dimension : 2;\n if (output === undefined) {\n if (dimension > 2) {\n // preserve values beyond second dimension\n output = input.slice();\n } else {\n output = new Array(length);\n }\n }\n for (let i = 0; i < length; i += dimension) {\n output[i] = (180 * input[i]) / HALF_SIZE;\n output[i + 1] =\n (360 * Math.atan(Math.exp(input[i + 1] / RADIUS))) / Math.PI - 90;\n }\n return output;\n}\n","/**\n * @module ol/proj/epsg4326\n */\nimport Projection from './Projection.js';\n\n/**\n * Semi-major radius of the WGS84 ellipsoid.\n *\n * @const\n * @type {number}\n */\nexport const RADIUS = 6378137;\n\n/**\n * Extent of the EPSG:4326 projection which is the whole world.\n *\n * @const\n * @type {import(\"../extent.js\").Extent}\n */\nexport const EXTENT = [-180, -90, 180, 90];\n\n/**\n * @const\n * @type {number}\n */\nexport const METERS_PER_UNIT = (Math.PI * RADIUS) / 180;\n\n/**\n * @classdesc\n * Projection object for WGS84 geographic coordinates (EPSG:4326).\n *\n * Note that OpenLayers does not strictly comply with the EPSG definition.\n * The EPSG registry defines 4326 as a CRS for Latitude,Longitude (y,x).\n * OpenLayers treats EPSG:4326 as a pseudo-projection, with x,y coordinates.\n */\nclass EPSG4326Projection extends Projection {\n /**\n * @param {string} code Code.\n * @param {string} [axisOrientation] Axis orientation.\n */\n constructor(code, axisOrientation) {\n super({\n code: code,\n units: 'degrees',\n extent: EXTENT,\n axisOrientation: axisOrientation,\n global: true,\n metersPerUnit: METERS_PER_UNIT,\n worldExtent: EXTENT,\n });\n }\n}\n\n/**\n * Projections equal to EPSG:4326.\n *\n * @const\n * @type {Array}\n */\nexport const PROJECTIONS = [\n new EPSG4326Projection('CRS:84'),\n new EPSG4326Projection('EPSG:4326', 'neu'),\n new EPSG4326Projection('urn:ogc:def:crs:OGC:1.3:CRS84'),\n new EPSG4326Projection('urn:ogc:def:crs:OGC:2:84'),\n new EPSG4326Projection('http://www.opengis.net/def/crs/OGC/1.3/CRS84'),\n new EPSG4326Projection('http://www.opengis.net/gml/srs/epsg.xml#4326', 'neu'),\n new EPSG4326Projection('http://www.opengis.net/def/crs/EPSG/0/4326', 'neu'),\n];\n","/**\n * @module ol/proj/projections\n */\n\n/**\n * @type {Object}\n */\nlet cache = {};\n\n/**\n * Clear the projections cache.\n */\nexport function clear() {\n cache = {};\n}\n\n/**\n * Get a cached projection by code.\n * @param {string} code The code for the projection.\n * @return {import(\"./Projection.js\").default} The projection (if cached).\n */\nexport function get(code) {\n return (\n cache[code] ||\n cache[code.replace(/urn:(x-)?ogc:def:crs:EPSG:(.*:)?(\\w+)$/, 'EPSG:$3')] ||\n null\n );\n}\n\n/**\n * Add a projection to the cache.\n * @param {string} code The projection code.\n * @param {import(\"./Projection.js\").default} projection The projection to cache.\n */\nexport function add(code, projection) {\n cache[code] = projection;\n}\n","/**\n * @module ol/proj/transforms\n */\nimport {isEmpty} from '../obj.js';\n\n/**\n * @private\n * @type {!Object>}\n */\nlet transforms = {};\n\n/**\n * Clear the transform cache.\n */\nexport function clear() {\n transforms = {};\n}\n\n/**\n * Registers a conversion function to convert coordinates from the source\n * projection to the destination projection.\n *\n * @param {import(\"./Projection.js\").default} source Source.\n * @param {import(\"./Projection.js\").default} destination Destination.\n * @param {import(\"../proj.js\").TransformFunction} transformFn Transform.\n */\nexport function add(source, destination, transformFn) {\n const sourceCode = source.getCode();\n const destinationCode = destination.getCode();\n if (!(sourceCode in transforms)) {\n transforms[sourceCode] = {};\n }\n transforms[sourceCode][destinationCode] = transformFn;\n}\n\n/**\n * Unregisters the conversion function to convert coordinates from the source\n * projection to the destination projection. This method is used to clean up\n * cached transforms during testing.\n *\n * @param {import(\"./Projection.js\").default} source Source projection.\n * @param {import(\"./Projection.js\").default} destination Destination projection.\n * @return {import(\"../proj.js\").TransformFunction} transformFn The unregistered transform.\n */\nexport function remove(source, destination) {\n const sourceCode = source.getCode();\n const destinationCode = destination.getCode();\n const transform = transforms[sourceCode][destinationCode];\n delete transforms[sourceCode][destinationCode];\n if (isEmpty(transforms[sourceCode])) {\n delete transforms[sourceCode];\n }\n return transform;\n}\n\n/**\n * Get a transform given a source code and a destination code.\n * @param {string} sourceCode The code for the source projection.\n * @param {string} destinationCode The code for the destination projection.\n * @return {import(\"../proj.js\").TransformFunction|undefined} The transform function (if found).\n */\nexport function get(sourceCode, destinationCode) {\n let transform;\n if (sourceCode in transforms && destinationCode in transforms[sourceCode]) {\n transform = transforms[sourceCode][destinationCode];\n }\n return transform;\n}\n","/**\n * @module ol/math\n */\n\n/**\n * Takes a number and clamps it to within the provided bounds.\n * @param {number} value The input number.\n * @param {number} min The minimum value to return.\n * @param {number} max The maximum value to return.\n * @return {number} The input number if it is within bounds, or the nearest\n * number within the bounds.\n */\nexport function clamp(value, min, max) {\n return Math.min(Math.max(value, min), max);\n}\n\n/**\n * Returns the square of the closest distance between the point (x, y) and the\n * line segment (x1, y1) to (x2, y2).\n * @param {number} x X.\n * @param {number} y Y.\n * @param {number} x1 X1.\n * @param {number} y1 Y1.\n * @param {number} x2 X2.\n * @param {number} y2 Y2.\n * @return {number} Squared distance.\n */\nexport function squaredSegmentDistance(x, y, x1, y1, x2, y2) {\n const dx = x2 - x1;\n const dy = y2 - y1;\n if (dx !== 0 || dy !== 0) {\n const t = ((x - x1) * dx + (y - y1) * dy) / (dx * dx + dy * dy);\n if (t > 1) {\n x1 = x2;\n y1 = y2;\n } else if (t > 0) {\n x1 += dx * t;\n y1 += dy * t;\n }\n }\n return squaredDistance(x, y, x1, y1);\n}\n\n/**\n * Returns the square of the distance between the points (x1, y1) and (x2, y2).\n * @param {number} x1 X1.\n * @param {number} y1 Y1.\n * @param {number} x2 X2.\n * @param {number} y2 Y2.\n * @return {number} Squared distance.\n */\nexport function squaredDistance(x1, y1, x2, y2) {\n const dx = x2 - x1;\n const dy = y2 - y1;\n return dx * dx + dy * dy;\n}\n\n/**\n * Solves system of linear equations using Gaussian elimination method.\n *\n * @param {Array>} mat Augmented matrix (n x n + 1 column)\n * in row-major order.\n * @return {Array} The resulting vector.\n */\nexport function solveLinearSystem(mat) {\n const n = mat.length;\n\n for (let i = 0; i < n; i++) {\n // Find max in the i-th column (ignoring i - 1 first rows)\n let maxRow = i;\n let maxEl = Math.abs(mat[i][i]);\n for (let r = i + 1; r < n; r++) {\n const absValue = Math.abs(mat[r][i]);\n if (absValue > maxEl) {\n maxEl = absValue;\n maxRow = r;\n }\n }\n\n if (maxEl === 0) {\n return null; // matrix is singular\n }\n\n // Swap max row with i-th (current) row\n const tmp = mat[maxRow];\n mat[maxRow] = mat[i];\n mat[i] = tmp;\n\n // Subtract the i-th row to make all the remaining rows 0 in the i-th column\n for (let j = i + 1; j < n; j++) {\n const coef = -mat[j][i] / mat[i][i];\n for (let k = i; k < n + 1; k++) {\n if (i == k) {\n mat[j][k] = 0;\n } else {\n mat[j][k] += coef * mat[i][k];\n }\n }\n }\n }\n\n // Solve Ax=b for upper triangular matrix A (mat)\n const x = new Array(n);\n for (let l = n - 1; l >= 0; l--) {\n x[l] = mat[l][n] / mat[l][l];\n for (let m = l - 1; m >= 0; m--) {\n mat[m][n] -= mat[m][l] * x[l];\n }\n }\n return x;\n}\n\n/**\n * Converts radians to to degrees.\n *\n * @param {number} angleInRadians Angle in radians.\n * @return {number} Angle in degrees.\n */\nexport function toDegrees(angleInRadians) {\n return (angleInRadians * 180) / Math.PI;\n}\n\n/**\n * Converts degrees to radians.\n *\n * @param {number} angleInDegrees Angle in degrees.\n * @return {number} Angle in radians.\n */\nexport function toRadians(angleInDegrees) {\n return (angleInDegrees * Math.PI) / 180;\n}\n\n/**\n * Returns the modulo of a / b, depending on the sign of b.\n *\n * @param {number} a Dividend.\n * @param {number} b Divisor.\n * @return {number} Modulo.\n */\nexport function modulo(a, b) {\n const r = a % b;\n return r * b < 0 ? r + b : r;\n}\n\n/**\n * Calculates the linearly interpolated value of x between a and b.\n *\n * @param {number} a Number\n * @param {number} b Number\n * @param {number} x Value to be interpolated.\n * @return {number} Interpolated value.\n */\nexport function lerp(a, b, x) {\n return a + x * (b - a);\n}\n\n/**\n * Returns a number with a limited number of decimal digits.\n * @param {number} n The input number.\n * @param {number} decimals The maximum number of decimal digits.\n * @return {number} The input number with a limited number of decimal digits.\n */\nexport function toFixed(n, decimals) {\n const factor = Math.pow(10, decimals);\n return Math.round(n * factor) / factor;\n}\n\n/**\n * Rounds a number to the nearest integer value considering only the given number\n * of decimal digits (with rounding on the final digit).\n * @param {number} n The input number.\n * @param {number} decimals The maximum number of decimal digits.\n * @return {number} The nearest integer.\n */\nexport function round(n, decimals) {\n return Math.round(toFixed(n, decimals));\n}\n\n/**\n * Rounds a number to the next smaller integer considering only the given number\n * of decimal digits (with rounding on the final digit).\n * @param {number} n The input number.\n * @param {number} decimals The maximum number of decimal digits.\n * @return {number} The next smaller integer.\n */\nexport function floor(n, decimals) {\n return Math.floor(toFixed(n, decimals));\n}\n\n/**\n * Rounds a number to the next bigger integer considering only the given number\n * of decimal digits (with rounding on the final digit).\n * @param {number} n The input number.\n * @param {number} decimals The maximum number of decimal digits.\n * @return {number} The next bigger integer.\n */\nexport function ceil(n, decimals) {\n return Math.ceil(toFixed(n, decimals));\n}\n","/**\n * @module ol/string\n */\n\n/**\n * @param {number} number Number to be formatted\n * @param {number} width The desired width\n * @param {number} [precision] Precision of the output string (i.e. number of decimal places)\n * @return {string} Formatted string\n */\nexport function padNumber(number, width, precision) {\n const numberString =\n precision !== undefined ? number.toFixed(precision) : '' + number;\n let decimal = numberString.indexOf('.');\n decimal = decimal === -1 ? numberString.length : decimal;\n return decimal > width\n ? numberString\n : new Array(1 + width - decimal).join('0') + numberString;\n}\n\n/**\n * Adapted from https://github.com/omichelsen/compare-versions/blob/master/index.js\n * @param {string|number} v1 First version\n * @param {string|number} v2 Second version\n * @return {number} Value\n */\nexport function compareVersions(v1, v2) {\n const s1 = ('' + v1).split('.');\n const s2 = ('' + v2).split('.');\n\n for (let i = 0; i < Math.max(s1.length, s2.length); i++) {\n const n1 = parseInt(s1[i] || '0', 10);\n const n2 = parseInt(s2[i] || '0', 10);\n\n if (n1 > n2) {\n return 1;\n }\n if (n2 > n1) {\n return -1;\n }\n }\n\n return 0;\n}\n","/**\n * @module ol/coordinate\n */\nimport {getWidth} from './extent.js';\nimport {modulo, toFixed} from './math.js';\nimport {padNumber} from './string.js';\n\n/**\n * An array of numbers representing an xy coordinate. Example: `[16, 48]`.\n * @typedef {Array} Coordinate\n * @api\n */\n\n/**\n * A function that takes a {@link module:ol/coordinate~Coordinate} and\n * transforms it into a `{string}`.\n *\n * @typedef {function((Coordinate|undefined)): string} CoordinateFormat\n * @api\n */\n\n/**\n * Add `delta` to `coordinate`. `coordinate` is modified in place and returned\n * by the function.\n *\n * Example:\n *\n * import {add} from 'ol/coordinate.js';\n *\n * const coord = [7.85, 47.983333];\n * add(coord, [-2, 4]);\n * // coord is now [5.85, 51.983333]\n *\n * @param {Coordinate} coordinate Coordinate.\n * @param {Coordinate} delta Delta.\n * @return {Coordinate} The input coordinate adjusted by\n * the given delta.\n * @api\n */\nexport function add(coordinate, delta) {\n coordinate[0] += +delta[0];\n coordinate[1] += +delta[1];\n return coordinate;\n}\n\n/**\n * Calculates the point closest to the passed coordinate on the passed circle.\n *\n * @param {Coordinate} coordinate The coordinate.\n * @param {import(\"./geom/Circle.js\").default} circle The circle.\n * @return {Coordinate} Closest point on the circumference.\n */\nexport function closestOnCircle(coordinate, circle) {\n const r = circle.getRadius();\n const center = circle.getCenter();\n const x0 = center[0];\n const y0 = center[1];\n const x1 = coordinate[0];\n const y1 = coordinate[1];\n\n let dx = x1 - x0;\n const dy = y1 - y0;\n if (dx === 0 && dy === 0) {\n dx = 1;\n }\n const d = Math.sqrt(dx * dx + dy * dy);\n\n const x = x0 + (r * dx) / d;\n const y = y0 + (r * dy) / d;\n\n return [x, y];\n}\n\n/**\n * Calculates the point closest to the passed coordinate on the passed segment.\n * This is the foot of the perpendicular of the coordinate to the segment when\n * the foot is on the segment, or the closest segment coordinate when the foot\n * is outside the segment.\n *\n * @param {Coordinate} coordinate The coordinate.\n * @param {Array} segment The two coordinates\n * of the segment.\n * @return {Coordinate} The foot of the perpendicular of\n * the coordinate to the segment.\n */\nexport function closestOnSegment(coordinate, segment) {\n const x0 = coordinate[0];\n const y0 = coordinate[1];\n const start = segment[0];\n const end = segment[1];\n const x1 = start[0];\n const y1 = start[1];\n const x2 = end[0];\n const y2 = end[1];\n const dx = x2 - x1;\n const dy = y2 - y1;\n const along =\n dx === 0 && dy === 0\n ? 0\n : (dx * (x0 - x1) + dy * (y0 - y1)) / (dx * dx + dy * dy || 0);\n let x, y;\n if (along <= 0) {\n x = x1;\n y = y1;\n } else if (along >= 1) {\n x = x2;\n y = y2;\n } else {\n x = x1 + along * dx;\n y = y1 + along * dy;\n }\n return [x, y];\n}\n\n/**\n * Returns a {@link module:ol/coordinate~CoordinateFormat} function that can be\n * used to format\n * a {Coordinate} to a string.\n *\n * Example without specifying the fractional digits:\n *\n * import {createStringXY} from 'ol/coordinate.js';\n *\n * const coord = [7.85, 47.983333];\n * const stringifyFunc = createStringXY();\n * const out = stringifyFunc(coord);\n * // out is now '8, 48'\n *\n * Example with explicitly specifying 2 fractional digits:\n *\n * import {createStringXY} from 'ol/coordinate.js';\n *\n * const coord = [7.85, 47.983333];\n * const stringifyFunc = createStringXY(2);\n * const out = stringifyFunc(coord);\n * // out is now '7.85, 47.98'\n *\n * @param {number} [fractionDigits] The number of digits to include\n * after the decimal point. Default is `0`.\n * @return {CoordinateFormat} Coordinate format.\n * @api\n */\nexport function createStringXY(fractionDigits) {\n return (\n /**\n * @param {Coordinate} coordinate Coordinate.\n * @return {string} String XY.\n */\n function (coordinate) {\n return toStringXY(coordinate, fractionDigits);\n }\n );\n}\n\n/**\n * @param {string} hemispheres Hemispheres.\n * @param {number} degrees Degrees.\n * @param {number} [fractionDigits] The number of digits to include\n * after the decimal point. Default is `0`.\n * @return {string} String.\n */\nexport function degreesToStringHDMS(hemispheres, degrees, fractionDigits) {\n const normalizedDegrees = modulo(degrees + 180, 360) - 180;\n const x = Math.abs(3600 * normalizedDegrees);\n const decimals = fractionDigits || 0;\n\n let deg = Math.floor(x / 3600);\n let min = Math.floor((x - deg * 3600) / 60);\n let sec = toFixed(x - deg * 3600 - min * 60, decimals);\n\n if (sec >= 60) {\n sec = 0;\n min += 1;\n }\n\n if (min >= 60) {\n min = 0;\n deg += 1;\n }\n\n let hdms = deg + '\\u00b0';\n if (min !== 0 || sec !== 0) {\n hdms += ' ' + padNumber(min, 2) + '\\u2032';\n }\n if (sec !== 0) {\n hdms += ' ' + padNumber(sec, 2, decimals) + '\\u2033';\n }\n if (normalizedDegrees !== 0) {\n hdms += ' ' + hemispheres.charAt(normalizedDegrees < 0 ? 1 : 0);\n }\n\n return hdms;\n}\n\n/**\n * Transforms the given {@link module:ol/coordinate~Coordinate} to a string\n * using the given string template. The strings `{x}` and `{y}` in the template\n * will be replaced with the first and second coordinate values respectively.\n *\n * Example without specifying the fractional digits:\n *\n * import {format} from 'ol/coordinate.js';\n *\n * const coord = [7.85, 47.983333];\n * const template = 'Coordinate is ({x}|{y}).';\n * const out = format(coord, template);\n * // out is now 'Coordinate is (8|48).'\n *\n * Example explicitly specifying the fractional digits:\n *\n * import {format} from 'ol/coordinate.js';\n *\n * const coord = [7.85, 47.983333];\n * const template = 'Coordinate is ({x}|{y}).';\n * const out = format(coord, template, 2);\n * // out is now 'Coordinate is (7.85|47.98).'\n *\n * @param {Coordinate} coordinate Coordinate.\n * @param {string} template A template string with `{x}` and `{y}` placeholders\n * that will be replaced by first and second coordinate values.\n * @param {number} [fractionDigits] The number of digits to include\n * after the decimal point. Default is `0`.\n * @return {string} Formatted coordinate.\n * @api\n */\nexport function format(coordinate, template, fractionDigits) {\n if (coordinate) {\n return template\n .replace('{x}', coordinate[0].toFixed(fractionDigits))\n .replace('{y}', coordinate[1].toFixed(fractionDigits));\n }\n return '';\n}\n\n/**\n * @param {Coordinate} coordinate1 First coordinate.\n * @param {Coordinate} coordinate2 Second coordinate.\n * @return {boolean} The two coordinates are equal.\n */\nexport function equals(coordinate1, coordinate2) {\n let equals = true;\n for (let i = coordinate1.length - 1; i >= 0; --i) {\n if (coordinate1[i] != coordinate2[i]) {\n equals = false;\n break;\n }\n }\n return equals;\n}\n\n/**\n * Rotate `coordinate` by `angle`. `coordinate` is modified in place and\n * returned by the function.\n *\n * Example:\n *\n * import {rotate} from 'ol/coordinate.js';\n *\n * const coord = [7.85, 47.983333];\n * const rotateRadians = Math.PI / 2; // 90 degrees\n * rotate(coord, rotateRadians);\n * // coord is now [-47.983333, 7.85]\n *\n * @param {Coordinate} coordinate Coordinate.\n * @param {number} angle Angle in radian.\n * @return {Coordinate} Coordinate.\n * @api\n */\nexport function rotate(coordinate, angle) {\n const cosAngle = Math.cos(angle);\n const sinAngle = Math.sin(angle);\n const x = coordinate[0] * cosAngle - coordinate[1] * sinAngle;\n const y = coordinate[1] * cosAngle + coordinate[0] * sinAngle;\n coordinate[0] = x;\n coordinate[1] = y;\n return coordinate;\n}\n\n/**\n * Scale `coordinate` by `scale`. `coordinate` is modified in place and returned\n * by the function.\n *\n * Example:\n *\n * import {scale as scaleCoordinate} from 'ol/coordinate.js';\n *\n * const coord = [7.85, 47.983333];\n * const scale = 1.2;\n * scaleCoordinate(coord, scale);\n * // coord is now [9.42, 57.5799996]\n *\n * @param {Coordinate} coordinate Coordinate.\n * @param {number} scale Scale factor.\n * @return {Coordinate} Coordinate.\n */\nexport function scale(coordinate, scale) {\n coordinate[0] *= scale;\n coordinate[1] *= scale;\n return coordinate;\n}\n\n/**\n * @param {Coordinate} coord1 First coordinate.\n * @param {Coordinate} coord2 Second coordinate.\n * @return {number} Squared distance between coord1 and coord2.\n */\nexport function squaredDistance(coord1, coord2) {\n const dx = coord1[0] - coord2[0];\n const dy = coord1[1] - coord2[1];\n return dx * dx + dy * dy;\n}\n\n/**\n * @param {Coordinate} coord1 First coordinate.\n * @param {Coordinate} coord2 Second coordinate.\n * @return {number} Distance between coord1 and coord2.\n */\nexport function distance(coord1, coord2) {\n return Math.sqrt(squaredDistance(coord1, coord2));\n}\n\n/**\n * Calculate the squared distance from a coordinate to a line segment.\n *\n * @param {Coordinate} coordinate Coordinate of the point.\n * @param {Array} segment Line segment (2\n * coordinates).\n * @return {number} Squared distance from the point to the line segment.\n */\nexport function squaredDistanceToSegment(coordinate, segment) {\n return squaredDistance(coordinate, closestOnSegment(coordinate, segment));\n}\n\n/**\n * Format a geographic coordinate with the hemisphere, degrees, minutes, and\n * seconds.\n *\n * Example without specifying fractional digits:\n *\n * import {toStringHDMS} from 'ol/coordinate.js';\n *\n * const coord = [7.85, 47.983333];\n * const out = toStringHDMS(coord);\n * // out is now '47° 58′ 60″ N 7° 50′ 60″ E'\n *\n * Example explicitly specifying 1 fractional digit:\n *\n * import {toStringHDMS} from 'ol/coordinate.js';\n *\n * const coord = [7.85, 47.983333];\n * const out = toStringHDMS(coord, 1);\n * // out is now '47° 58′ 60.0″ N 7° 50′ 60.0″ E'\n *\n * @param {Coordinate} coordinate Coordinate.\n * @param {number} [fractionDigits] The number of digits to include\n * after the decimal point. Default is `0`.\n * @return {string} Hemisphere, degrees, minutes and seconds.\n * @api\n */\nexport function toStringHDMS(coordinate, fractionDigits) {\n if (coordinate) {\n return (\n degreesToStringHDMS('NS', coordinate[1], fractionDigits) +\n ' ' +\n degreesToStringHDMS('EW', coordinate[0], fractionDigits)\n );\n }\n return '';\n}\n\n/**\n * Format a coordinate as a comma delimited string.\n *\n * Example without specifying fractional digits:\n *\n * import {toStringXY} from 'ol/coordinate.js';\n *\n * const coord = [7.85, 47.983333];\n * const out = toStringXY(coord);\n * // out is now '8, 48'\n *\n * Example explicitly specifying 1 fractional digit:\n *\n * import {toStringXY} from 'ol/coordinate.js';\n *\n * const coord = [7.85, 47.983333];\n * const out = toStringXY(coord, 1);\n * // out is now '7.8, 48.0'\n *\n * @param {Coordinate} coordinate Coordinate.\n * @param {number} [fractionDigits] The number of digits to include\n * after the decimal point. Default is `0`.\n * @return {string} XY.\n * @api\n */\nexport function toStringXY(coordinate, fractionDigits) {\n return format(coordinate, '{x}, {y}', fractionDigits);\n}\n\n/**\n * Modifies the provided coordinate in-place to be within the real world\n * extent. The lower projection extent boundary is inclusive, the upper one\n * exclusive.\n *\n * @param {Coordinate} coordinate Coordinate.\n * @param {import(\"./proj/Projection.js\").default} projection Projection.\n * @return {Coordinate} The coordinate within the real world extent.\n */\nexport function wrapX(coordinate, projection) {\n if (projection.canWrapX()) {\n const worldWidth = getWidth(projection.getExtent());\n const worldsAway = getWorldsAway(coordinate, projection, worldWidth);\n if (worldsAway) {\n coordinate[0] -= worldsAway * worldWidth;\n }\n }\n return coordinate;\n}\n/**\n * @param {Coordinate} coordinate Coordinate.\n * @param {import(\"./proj/Projection.js\").default} projection Projection.\n * @param {number} [sourceExtentWidth] Width of the source extent.\n * @return {number} Offset in world widths.\n */\nexport function getWorldsAway(coordinate, projection, sourceExtentWidth) {\n const projectionExtent = projection.getExtent();\n let worldsAway = 0;\n if (\n projection.canWrapX() &&\n (coordinate[0] < projectionExtent[0] || coordinate[0] > projectionExtent[2])\n ) {\n sourceExtentWidth = sourceExtentWidth || getWidth(projectionExtent);\n worldsAway = Math.floor(\n (coordinate[0] - projectionExtent[0]) / sourceExtentWidth\n );\n }\n return worldsAway;\n}\n","/**\n * @module ol/sphere\n */\nimport {toDegrees, toRadians} from './math.js';\n\n/**\n * Object literal with options for the {@link getLength} or {@link getArea}\n * functions.\n * @typedef {Object} SphereMetricOptions\n * @property {import(\"./proj.js\").ProjectionLike} [projection='EPSG:3857']\n * Projection of the geometry. By default, the geometry is assumed to be in\n * Web Mercator.\n * @property {number} [radius=6371008.8] Sphere radius. By default, the\n * [mean Earth radius](https://en.wikipedia.org/wiki/Earth_radius#Mean_radius)\n * for the WGS84 ellipsoid is used.\n */\n\n/**\n * The mean Earth radius (1/3 * (2a + b)) for the WGS84 ellipsoid.\n * https://en.wikipedia.org/wiki/Earth_radius#Mean_radius\n * @type {number}\n */\nexport const DEFAULT_RADIUS = 6371008.8;\n\n/**\n * Get the great circle distance (in meters) between two geographic coordinates.\n * @param {Array} c1 Starting coordinate.\n * @param {Array} c2 Ending coordinate.\n * @param {number} [radius] The sphere radius to use. Defaults to the Earth's\n * mean radius using the WGS84 ellipsoid.\n * @return {number} The great circle distance between the points (in meters).\n * @api\n */\nexport function getDistance(c1, c2, radius) {\n radius = radius || DEFAULT_RADIUS;\n const lat1 = toRadians(c1[1]);\n const lat2 = toRadians(c2[1]);\n const deltaLatBy2 = (lat2 - lat1) / 2;\n const deltaLonBy2 = toRadians(c2[0] - c1[0]) / 2;\n const a =\n Math.sin(deltaLatBy2) * Math.sin(deltaLatBy2) +\n Math.sin(deltaLonBy2) *\n Math.sin(deltaLonBy2) *\n Math.cos(lat1) *\n Math.cos(lat2);\n return 2 * radius * Math.atan2(Math.sqrt(a), Math.sqrt(1 - a));\n}\n\n/**\n * Get the cumulative great circle length of linestring coordinates (geographic).\n * @param {Array} coordinates Linestring coordinates.\n * @param {number} radius The sphere radius to use.\n * @return {number} The length (in meters).\n */\nfunction getLengthInternal(coordinates, radius) {\n let length = 0;\n for (let i = 0, ii = coordinates.length; i < ii - 1; ++i) {\n length += getDistance(coordinates[i], coordinates[i + 1], radius);\n }\n return length;\n}\n\n/**\n * Get the spherical length of a geometry. This length is the sum of the\n * great circle distances between coordinates. For polygons, the length is\n * the sum of all rings. For points, the length is zero. For multi-part\n * geometries, the length is the sum of the length of each part.\n * @param {import(\"./geom/Geometry.js\").default} geometry A geometry.\n * @param {SphereMetricOptions} [options] Options for the\n * length calculation. By default, geometries are assumed to be in 'EPSG:3857'.\n * You can change this by providing a `projection` option.\n * @return {number} The spherical length (in meters).\n * @api\n */\nexport function getLength(geometry, options) {\n options = options || {};\n const radius = options.radius || DEFAULT_RADIUS;\n const projection = options.projection || 'EPSG:3857';\n const type = geometry.getType();\n if (type !== 'GeometryCollection') {\n geometry = geometry.clone().transform(projection, 'EPSG:4326');\n }\n let length = 0;\n let coordinates, coords, i, ii, j, jj;\n switch (type) {\n case 'Point':\n case 'MultiPoint': {\n break;\n }\n case 'LineString':\n case 'LinearRing': {\n coordinates = /** @type {import(\"./geom/SimpleGeometry.js\").default} */ (\n geometry\n ).getCoordinates();\n length = getLengthInternal(coordinates, radius);\n break;\n }\n case 'MultiLineString':\n case 'Polygon': {\n coordinates = /** @type {import(\"./geom/SimpleGeometry.js\").default} */ (\n geometry\n ).getCoordinates();\n for (i = 0, ii = coordinates.length; i < ii; ++i) {\n length += getLengthInternal(coordinates[i], radius);\n }\n break;\n }\n case 'MultiPolygon': {\n coordinates = /** @type {import(\"./geom/SimpleGeometry.js\").default} */ (\n geometry\n ).getCoordinates();\n for (i = 0, ii = coordinates.length; i < ii; ++i) {\n coords = coordinates[i];\n for (j = 0, jj = coords.length; j < jj; ++j) {\n length += getLengthInternal(coords[j], radius);\n }\n }\n break;\n }\n case 'GeometryCollection': {\n const geometries =\n /** @type {import(\"./geom/GeometryCollection.js\").default} */ (\n geometry\n ).getGeometries();\n for (i = 0, ii = geometries.length; i < ii; ++i) {\n length += getLength(geometries[i], options);\n }\n break;\n }\n default: {\n throw new Error('Unsupported geometry type: ' + type);\n }\n }\n return length;\n}\n\n/**\n * Returns the spherical area for a list of coordinates.\n *\n * [Reference](https://trs.jpl.nasa.gov/handle/2014/40409)\n * Robert. G. Chamberlain and William H. Duquette, \"Some Algorithms for\n * Polygons on a Sphere\", JPL Publication 07-03, Jet Propulsion\n * Laboratory, Pasadena, CA, June 2007\n *\n * @param {Array} coordinates List of coordinates of a linear\n * ring. If the ring is oriented clockwise, the area will be positive,\n * otherwise it will be negative.\n * @param {number} radius The sphere radius.\n * @return {number} Area (in square meters).\n */\nfunction getAreaInternal(coordinates, radius) {\n let area = 0;\n const len = coordinates.length;\n let x1 = coordinates[len - 1][0];\n let y1 = coordinates[len - 1][1];\n for (let i = 0; i < len; i++) {\n const x2 = coordinates[i][0];\n const y2 = coordinates[i][1];\n area +=\n toRadians(x2 - x1) *\n (2 + Math.sin(toRadians(y1)) + Math.sin(toRadians(y2)));\n x1 = x2;\n y1 = y2;\n }\n return (area * radius * radius) / 2.0;\n}\n\n/**\n * Get the spherical area of a geometry. This is the area (in meters) assuming\n * that polygon edges are segments of great circles on a sphere.\n * @param {import(\"./geom/Geometry.js\").default} geometry A geometry.\n * @param {SphereMetricOptions} [options] Options for the area\n * calculation. By default, geometries are assumed to be in 'EPSG:3857'.\n * You can change this by providing a `projection` option.\n * @return {number} The spherical area (in square meters).\n * @api\n */\nexport function getArea(geometry, options) {\n options = options || {};\n const radius = options.radius || DEFAULT_RADIUS;\n const projection = options.projection || 'EPSG:3857';\n const type = geometry.getType();\n if (type !== 'GeometryCollection') {\n geometry = geometry.clone().transform(projection, 'EPSG:4326');\n }\n let area = 0;\n let coordinates, coords, i, ii, j, jj;\n switch (type) {\n case 'Point':\n case 'MultiPoint':\n case 'LineString':\n case 'MultiLineString':\n case 'LinearRing': {\n break;\n }\n case 'Polygon': {\n coordinates = /** @type {import(\"./geom/Polygon.js\").default} */ (\n geometry\n ).getCoordinates();\n area = Math.abs(getAreaInternal(coordinates[0], radius));\n for (i = 1, ii = coordinates.length; i < ii; ++i) {\n area -= Math.abs(getAreaInternal(coordinates[i], radius));\n }\n break;\n }\n case 'MultiPolygon': {\n coordinates = /** @type {import(\"./geom/SimpleGeometry.js\").default} */ (\n geometry\n ).getCoordinates();\n for (i = 0, ii = coordinates.length; i < ii; ++i) {\n coords = coordinates[i];\n area += Math.abs(getAreaInternal(coords[0], radius));\n for (j = 1, jj = coords.length; j < jj; ++j) {\n area -= Math.abs(getAreaInternal(coords[j], radius));\n }\n }\n break;\n }\n case 'GeometryCollection': {\n const geometries =\n /** @type {import(\"./geom/GeometryCollection.js\").default} */ (\n geometry\n ).getGeometries();\n for (i = 0, ii = geometries.length; i < ii; ++i) {\n area += getArea(geometries[i], options);\n }\n break;\n }\n default: {\n throw new Error('Unsupported geometry type: ' + type);\n }\n }\n return area;\n}\n\n/**\n * Returns the coordinate at the given distance and bearing from `c1`.\n *\n * @param {import(\"./coordinate.js\").Coordinate} c1 The origin point (`[lon, lat]` in degrees).\n * @param {number} distance The great-circle distance between the origin\n * point and the target point.\n * @param {number} bearing The bearing (in radians).\n * @param {number} [radius] The sphere radius to use. Defaults to the Earth's\n * mean radius using the WGS84 ellipsoid.\n * @return {import(\"./coordinate.js\").Coordinate} The target point.\n */\nexport function offset(c1, distance, bearing, radius) {\n radius = radius || DEFAULT_RADIUS;\n const lat1 = toRadians(c1[1]);\n const lon1 = toRadians(c1[0]);\n const dByR = distance / radius;\n const lat = Math.asin(\n Math.sin(lat1) * Math.cos(dByR) +\n Math.cos(lat1) * Math.sin(dByR) * Math.cos(bearing)\n );\n const lon =\n lon1 +\n Math.atan2(\n Math.sin(bearing) * Math.sin(dByR) * Math.cos(lat1),\n Math.cos(dByR) - Math.sin(lat1) * Math.sin(lat)\n );\n return [toDegrees(lon), toDegrees(lat)];\n}\n","/**\n * @module ol/console\n */\n\n/**\n * @typedef {'info'|'warn'|'error'|'none'} Level\n */\n\n/**\n * @type {Object}\n */\nconst levels = {\n info: 1,\n warn: 2,\n error: 3,\n none: 4,\n};\n\n/**\n * @type {number}\n */\nlet level = levels.info;\n\n/**\n * Set the logging level. By default, the level is set to 'info' and all\n * messages will be logged. Set to 'warn' to only display warnings and errors.\n * Set to 'error' to only display errors. Set to 'none' to silence all messages.\n *\n * @param {Level} l The new level.\n */\nexport function setLevel(l) {\n level = levels[l];\n}\n\nexport function log(...args) {\n if (level > levels.info) {\n return;\n }\n console.log(...args); // eslint-disable-line no-console\n}\n\nexport function warn(...args) {\n if (level > levels.warn) {\n return;\n }\n console.warn(...args); // eslint-disable-line no-console\n}\n\nexport function error(...args) {\n if (level > levels.error) {\n return;\n }\n console.error(...args); // eslint-disable-line no-console\n}\n","/**\n * @module ol/proj\n */\n\n/**\n * The ol/proj module stores:\n * * a list of {@link module:ol/proj/Projection~Projection}\n * objects, one for each projection supported by the application\n * * a list of transform functions needed to convert coordinates in one projection\n * into another.\n *\n * The static functions are the methods used to maintain these.\n * Each transform function can handle not only simple coordinate pairs, but also\n * large arrays of coordinates such as vector geometries.\n *\n * When loaded, the library adds projection objects for EPSG:4326 (WGS84\n * geographic coordinates) and EPSG:3857 (Web or Spherical Mercator, as used\n * for example by Bing Maps or OpenStreetMap), together with the relevant\n * transform functions.\n *\n * Additional transforms may be added by using the http://proj4js.org/\n * library (version 2.2 or later). You can use the full build supplied by\n * Proj4js, or create a custom build to support those projections you need; see\n * the Proj4js website for how to do this. You also need the Proj4js definitions\n * for the required projections. These definitions can be obtained from\n * https://epsg.io/, and are a JS function, so can be loaded in a script\n * tag (as in the examples) or pasted into your application.\n *\n * After all required projection definitions are added to proj4's registry (by\n * using `proj4.defs()`), simply call `register(proj4)` from the `ol/proj/proj4`\n * package. Existing transforms are not changed by this function. See\n * examples/wms-image-custom-proj for an example of this.\n *\n * Additional projection definitions can be registered with `proj4.defs()` any\n * time. Just make sure to call `register(proj4)` again; for example, with user-supplied data where you don't\n * know in advance what projections are needed, you can initially load minimal\n * support and then load whichever are requested.\n *\n * Note that Proj4js does not support projection extents. If you want to add\n * one for creating default tile grids, you can add it after the Projection\n * object has been created with `setExtent`, for example,\n * `get('EPSG:1234').setExtent(extent)`.\n *\n * In addition to Proj4js support, any transform functions can be added with\n * {@link module:ol/proj.addCoordinateTransforms}. To use this, you must first create\n * a {@link module:ol/proj/Projection~Projection} object for the new projection and add it with\n * {@link module:ol/proj.addProjection}. You can then add the forward and inverse\n * functions with {@link module:ol/proj.addCoordinateTransforms}. See\n * examples/wms-custom-proj for an example of this.\n *\n * Note that if no transforms are needed and you only need to define the\n * projection, just add a {@link module:ol/proj/Projection~Projection} with\n * {@link module:ol/proj.addProjection}. See examples/wms-no-proj for an example of\n * this.\n */\nimport Projection from './proj/Projection.js';\nimport {\n PROJECTIONS as EPSG3857_PROJECTIONS,\n fromEPSG4326,\n toEPSG4326,\n} from './proj/epsg3857.js';\nimport {PROJECTIONS as EPSG4326_PROJECTIONS} from './proj/epsg4326.js';\nimport {METERS_PER_UNIT} from './proj/Units.js';\nimport {\n add as addProj,\n clear as clearProj,\n get as getProj,\n} from './proj/projections.js';\nimport {\n add as addTransformFunc,\n clear as clearTransformFuncs,\n get as getTransformFunc,\n} from './proj/transforms.js';\nimport {applyTransform, getWidth} from './extent.js';\nimport {clamp, modulo} from './math.js';\nimport {equals, getWorldsAway} from './coordinate.js';\nimport {getDistance} from './sphere.js';\nimport {warn} from './console.js';\n\n/**\n * A projection as {@link module:ol/proj/Projection~Projection}, SRS identifier\n * string or undefined.\n * @typedef {Projection|string|undefined} ProjectionLike\n * @api\n */\n\n/**\n * A transform function accepts an array of input coordinate values, an optional\n * output array, and an optional dimension (default should be 2). The function\n * transforms the input coordinate values, populates the output array, and\n * returns the output array.\n *\n * @typedef {function(Array, Array=, number=): Array} TransformFunction\n * @api\n */\n\nexport {METERS_PER_UNIT};\n\nexport {Projection};\n\nlet showCoordinateWarning = true;\n\n/**\n * @param {boolean} [disable = true] Disable console info about `useGeographic()`\n */\nexport function disableCoordinateWarning(disable) {\n const hide = disable === undefined ? true : disable;\n showCoordinateWarning = !hide;\n}\n\n/**\n * @param {Array} input Input coordinate array.\n * @param {Array} [output] Output array of coordinate values.\n * @return {Array} Output coordinate array (new array, same coordinate\n * values).\n */\nexport function cloneTransform(input, output) {\n if (output !== undefined) {\n for (let i = 0, ii = input.length; i < ii; ++i) {\n output[i] = input[i];\n }\n output = output;\n } else {\n output = input.slice();\n }\n return output;\n}\n\n/**\n * @param {Array} input Input coordinate array.\n * @param {Array} [output] Output array of coordinate values.\n * @return {Array} Input coordinate array (same array as input).\n */\nexport function identityTransform(input, output) {\n if (output !== undefined && input !== output) {\n for (let i = 0, ii = input.length; i < ii; ++i) {\n output[i] = input[i];\n }\n input = output;\n }\n return input;\n}\n\n/**\n * Add a Projection object to the list of supported projections that can be\n * looked up by their code.\n *\n * @param {Projection} projection Projection instance.\n * @api\n */\nexport function addProjection(projection) {\n addProj(projection.getCode(), projection);\n addTransformFunc(projection, projection, cloneTransform);\n}\n\n/**\n * @param {Array} projections Projections.\n */\nexport function addProjections(projections) {\n projections.forEach(addProjection);\n}\n\n/**\n * Fetches a Projection object for the code specified.\n *\n * @param {ProjectionLike} projectionLike Either a code string which is\n * a combination of authority and identifier such as \"EPSG:4326\", or an\n * existing projection object, or undefined.\n * @return {Projection|null} Projection object, or null if not in list.\n * @api\n */\nexport function get(projectionLike) {\n return typeof projectionLike === 'string'\n ? getProj(/** @type {string} */ (projectionLike))\n : /** @type {Projection} */ (projectionLike) || null;\n}\n\n/**\n * Get the resolution of the point in degrees or distance units.\n * For projections with degrees as the unit this will simply return the\n * provided resolution. For other projections the point resolution is\n * by default estimated by transforming the `point` pixel to EPSG:4326,\n * measuring its width and height on the normal sphere,\n * and taking the average of the width and height.\n * A custom function can be provided for a specific projection, either\n * by setting the `getPointResolution` option in the\n * {@link module:ol/proj/Projection~Projection} constructor or by using\n * {@link module:ol/proj/Projection~Projection#setGetPointResolution} to change an existing\n * projection object.\n * @param {ProjectionLike} projection The projection.\n * @param {number} resolution Nominal resolution in projection units.\n * @param {import(\"./coordinate.js\").Coordinate} point Point to find adjusted resolution at.\n * @param {import(\"./proj/Units.js\").Units} [units] Units to get the point resolution in.\n * Default is the projection's units.\n * @return {number} Point resolution.\n * @api\n */\nexport function getPointResolution(projection, resolution, point, units) {\n projection = get(projection);\n let pointResolution;\n const getter = projection.getPointResolutionFunc();\n if (getter) {\n pointResolution = getter(resolution, point);\n if (units && units !== projection.getUnits()) {\n const metersPerUnit = projection.getMetersPerUnit();\n if (metersPerUnit) {\n pointResolution =\n (pointResolution * metersPerUnit) / METERS_PER_UNIT[units];\n }\n }\n } else {\n const projUnits = projection.getUnits();\n if ((projUnits == 'degrees' && !units) || units == 'degrees') {\n pointResolution = resolution;\n } else {\n // Estimate point resolution by transforming the center pixel to EPSG:4326,\n // measuring its width and height on the normal sphere, and taking the\n // average of the width and height.\n const toEPSG4326 = getTransformFromProjections(\n projection,\n get('EPSG:4326')\n );\n if (toEPSG4326 === identityTransform && projUnits !== 'degrees') {\n // no transform is available\n pointResolution = resolution * projection.getMetersPerUnit();\n } else {\n let vertices = [\n point[0] - resolution / 2,\n point[1],\n point[0] + resolution / 2,\n point[1],\n point[0],\n point[1] - resolution / 2,\n point[0],\n point[1] + resolution / 2,\n ];\n vertices = toEPSG4326(vertices, vertices, 2);\n const width = getDistance(vertices.slice(0, 2), vertices.slice(2, 4));\n const height = getDistance(vertices.slice(4, 6), vertices.slice(6, 8));\n pointResolution = (width + height) / 2;\n }\n const metersPerUnit = units\n ? METERS_PER_UNIT[units]\n : projection.getMetersPerUnit();\n if (metersPerUnit !== undefined) {\n pointResolution /= metersPerUnit;\n }\n }\n }\n return pointResolution;\n}\n\n/**\n * Registers transformation functions that don't alter coordinates. Those allow\n * to transform between projections with equal meaning.\n *\n * @param {Array} projections Projections.\n * @api\n */\nexport function addEquivalentProjections(projections) {\n addProjections(projections);\n projections.forEach(function (source) {\n projections.forEach(function (destination) {\n if (source !== destination) {\n addTransformFunc(source, destination, cloneTransform);\n }\n });\n });\n}\n\n/**\n * Registers transformation functions to convert coordinates in any projection\n * in projection1 to any projection in projection2.\n *\n * @param {Array} projections1 Projections with equal\n * meaning.\n * @param {Array} projections2 Projections with equal\n * meaning.\n * @param {TransformFunction} forwardTransform Transformation from any\n * projection in projection1 to any projection in projection2.\n * @param {TransformFunction} inverseTransform Transform from any projection\n * in projection2 to any projection in projection1..\n */\nexport function addEquivalentTransforms(\n projections1,\n projections2,\n forwardTransform,\n inverseTransform\n) {\n projections1.forEach(function (projection1) {\n projections2.forEach(function (projection2) {\n addTransformFunc(projection1, projection2, forwardTransform);\n addTransformFunc(projection2, projection1, inverseTransform);\n });\n });\n}\n\n/**\n * Clear all cached projections and transforms.\n */\nexport function clearAllProjections() {\n clearProj();\n clearTransformFuncs();\n}\n\n/**\n * @param {Projection|string|undefined} projection Projection.\n * @param {string} defaultCode Default code.\n * @return {Projection} Projection.\n */\nexport function createProjection(projection, defaultCode) {\n if (!projection) {\n return get(defaultCode);\n } else if (typeof projection === 'string') {\n return get(projection);\n }\n return /** @type {Projection} */ (projection);\n}\n\n/**\n * Creates a {@link module:ol/proj~TransformFunction} from a simple 2D coordinate transform\n * function.\n * @param {function(import(\"./coordinate.js\").Coordinate): import(\"./coordinate.js\").Coordinate} coordTransform Coordinate\n * transform.\n * @return {TransformFunction} Transform function.\n */\nexport function createTransformFromCoordinateTransform(coordTransform) {\n return (\n /**\n * @param {Array} input Input.\n * @param {Array} [output] Output.\n * @param {number} [dimension] Dimension.\n * @return {Array} Output.\n */\n function (input, output, dimension) {\n const length = input.length;\n dimension = dimension !== undefined ? dimension : 2;\n output = output !== undefined ? output : new Array(length);\n for (let i = 0; i < length; i += dimension) {\n const point = coordTransform(input.slice(i, i + dimension));\n const pointLength = point.length;\n for (let j = 0, jj = dimension; j < jj; ++j) {\n output[i + j] = j >= pointLength ? input[i + j] : point[j];\n }\n }\n return output;\n }\n );\n}\n\n/**\n * Registers coordinate transform functions to convert coordinates between the\n * source projection and the destination projection.\n * The forward and inverse functions convert coordinate pairs; this function\n * converts these into the functions used internally which also handle\n * extents and coordinate arrays.\n *\n * @param {ProjectionLike} source Source projection.\n * @param {ProjectionLike} destination Destination projection.\n * @param {function(import(\"./coordinate.js\").Coordinate): import(\"./coordinate.js\").Coordinate} forward The forward transform\n * function (that is, from the source projection to the destination\n * projection) that takes a {@link module:ol/coordinate~Coordinate} as argument and returns\n * the transformed {@link module:ol/coordinate~Coordinate}.\n * @param {function(import(\"./coordinate.js\").Coordinate): import(\"./coordinate.js\").Coordinate} inverse The inverse transform\n * function (that is, from the destination projection to the source\n * projection) that takes a {@link module:ol/coordinate~Coordinate} as argument and returns\n * the transformed {@link module:ol/coordinate~Coordinate}. If the transform function can only\n * transform less dimensions than the input coordinate, it is supposeed to return a coordinate\n * with only the length it can transform. The other dimensions will be taken unchanged from the\n * source.\n * @api\n */\nexport function addCoordinateTransforms(source, destination, forward, inverse) {\n const sourceProj = get(source);\n const destProj = get(destination);\n addTransformFunc(\n sourceProj,\n destProj,\n createTransformFromCoordinateTransform(forward)\n );\n addTransformFunc(\n destProj,\n sourceProj,\n createTransformFromCoordinateTransform(inverse)\n );\n}\n\n/**\n * Transforms a coordinate from longitude/latitude to a different projection.\n * @param {import(\"./coordinate.js\").Coordinate} coordinate Coordinate as longitude and latitude, i.e.\n * an array with longitude as 1st and latitude as 2nd element.\n * @param {ProjectionLike} [projection] Target projection. The\n * default is Web Mercator, i.e. 'EPSG:3857'.\n * @return {import(\"./coordinate.js\").Coordinate} Coordinate projected to the target projection.\n * @api\n */\nexport function fromLonLat(coordinate, projection) {\n disableCoordinateWarning();\n return transform(\n coordinate,\n 'EPSG:4326',\n projection !== undefined ? projection : 'EPSG:3857'\n );\n}\n\n/**\n * Transforms a coordinate to longitude/latitude.\n * @param {import(\"./coordinate.js\").Coordinate} coordinate Projected coordinate.\n * @param {ProjectionLike} [projection] Projection of the coordinate.\n * The default is Web Mercator, i.e. 'EPSG:3857'.\n * @return {import(\"./coordinate.js\").Coordinate} Coordinate as longitude and latitude, i.e. an array\n * with longitude as 1st and latitude as 2nd element.\n * @api\n */\nexport function toLonLat(coordinate, projection) {\n const lonLat = transform(\n coordinate,\n projection !== undefined ? projection : 'EPSG:3857',\n 'EPSG:4326'\n );\n const lon = lonLat[0];\n if (lon < -180 || lon > 180) {\n lonLat[0] = modulo(lon + 180, 360) - 180;\n }\n return lonLat;\n}\n\n/**\n * Checks if two projections are the same, that is every coordinate in one\n * projection does represent the same geographic point as the same coordinate in\n * the other projection.\n *\n * @param {Projection} projection1 Projection 1.\n * @param {Projection} projection2 Projection 2.\n * @return {boolean} Equivalent.\n * @api\n */\nexport function equivalent(projection1, projection2) {\n if (projection1 === projection2) {\n return true;\n }\n const equalUnits = projection1.getUnits() === projection2.getUnits();\n if (projection1.getCode() === projection2.getCode()) {\n return equalUnits;\n }\n const transformFunc = getTransformFromProjections(projection1, projection2);\n return transformFunc === cloneTransform && equalUnits;\n}\n\n/**\n * Searches in the list of transform functions for the function for converting\n * coordinates from the source projection to the destination projection.\n *\n * @param {Projection} sourceProjection Source Projection object.\n * @param {Projection} destinationProjection Destination Projection\n * object.\n * @return {TransformFunction} Transform function.\n */\nexport function getTransformFromProjections(\n sourceProjection,\n destinationProjection\n) {\n const sourceCode = sourceProjection.getCode();\n const destinationCode = destinationProjection.getCode();\n let transformFunc = getTransformFunc(sourceCode, destinationCode);\n if (!transformFunc) {\n transformFunc = identityTransform;\n }\n return transformFunc;\n}\n\n/**\n * Given the projection-like objects, searches for a transformation\n * function to convert a coordinates array from the source projection to the\n * destination projection.\n *\n * @param {ProjectionLike} source Source.\n * @param {ProjectionLike} destination Destination.\n * @return {TransformFunction} Transform function.\n * @api\n */\nexport function getTransform(source, destination) {\n const sourceProjection = get(source);\n const destinationProjection = get(destination);\n return getTransformFromProjections(sourceProjection, destinationProjection);\n}\n\n/**\n * Transforms a coordinate from source projection to destination projection.\n * This returns a new coordinate (and does not modify the original).\n *\n * See {@link module:ol/proj.transformExtent} for extent transformation.\n * See the transform method of {@link module:ol/geom/Geometry~Geometry} and its\n * subclasses for geometry transforms.\n *\n * @param {import(\"./coordinate.js\").Coordinate} coordinate Coordinate.\n * @param {ProjectionLike} source Source projection-like.\n * @param {ProjectionLike} destination Destination projection-like.\n * @return {import(\"./coordinate.js\").Coordinate} Coordinate.\n * @api\n */\nexport function transform(coordinate, source, destination) {\n const transformFunc = getTransform(source, destination);\n return transformFunc(coordinate, undefined, coordinate.length);\n}\n\n/**\n * Transforms an extent from source projection to destination projection. This\n * returns a new extent (and does not modify the original).\n *\n * @param {import(\"./extent.js\").Extent} extent The extent to transform.\n * @param {ProjectionLike} source Source projection-like.\n * @param {ProjectionLike} destination Destination projection-like.\n * @param {number} [stops] Number of stops per side used for the transform.\n * By default only the corners are used.\n * @return {import(\"./extent.js\").Extent} The transformed extent.\n * @api\n */\nexport function transformExtent(extent, source, destination, stops) {\n const transformFunc = getTransform(source, destination);\n return applyTransform(extent, transformFunc, undefined, stops);\n}\n\n/**\n * Transforms the given point to the destination projection.\n *\n * @param {import(\"./coordinate.js\").Coordinate} point Point.\n * @param {Projection} sourceProjection Source projection.\n * @param {Projection} destinationProjection Destination projection.\n * @return {import(\"./coordinate.js\").Coordinate} Point.\n */\nexport function transformWithProjections(\n point,\n sourceProjection,\n destinationProjection\n) {\n const transformFunc = getTransformFromProjections(\n sourceProjection,\n destinationProjection\n );\n return transformFunc(point);\n}\n\n/**\n * @type {Projection|null}\n */\nlet userProjection = null;\n\n/**\n * Set the projection for coordinates supplied from and returned by API methods.\n * This includes all API methods except for those interacting with tile grids.\n * @param {ProjectionLike} projection The user projection.\n * @api\n */\nexport function setUserProjection(projection) {\n userProjection = get(projection);\n}\n\n/**\n * Clear the user projection if set.\n * @api\n */\nexport function clearUserProjection() {\n userProjection = null;\n}\n\n/**\n * Get the projection for coordinates supplied from and returned by API methods.\n * Note that this method is not yet a part of the stable API. Support for user\n * projections is not yet complete and should be considered experimental.\n * @return {Projection|null} The user projection (or null if not set).\n * @api\n */\nexport function getUserProjection() {\n return userProjection;\n}\n\n/**\n * Use geographic coordinates (WGS-84 datum) in API methods. This includes all API\n * methods except for those interacting with tile grids.\n * @api\n */\nexport function useGeographic() {\n setUserProjection('EPSG:4326');\n}\n\n/**\n * Return a coordinate transformed into the user projection. If no user projection\n * is set, the original coordinate is returned.\n * @param {Array} coordinate Input coordinate.\n * @param {ProjectionLike} sourceProjection The input coordinate projection.\n * @return {Array} The input coordinate in the user projection.\n */\nexport function toUserCoordinate(coordinate, sourceProjection) {\n if (!userProjection) {\n return coordinate;\n }\n return transform(coordinate, sourceProjection, userProjection);\n}\n\n/**\n * Return a coordinate transformed from the user projection. If no user projection\n * is set, the original coordinate is returned.\n * @param {Array} coordinate Input coordinate.\n * @param {ProjectionLike} destProjection The destination projection.\n * @return {Array} The input coordinate transformed.\n */\nexport function fromUserCoordinate(coordinate, destProjection) {\n if (!userProjection) {\n if (\n showCoordinateWarning &&\n !equals(coordinate, [0, 0]) &&\n coordinate[0] >= -180 &&\n coordinate[0] <= 180 &&\n coordinate[1] >= -90 &&\n coordinate[1] <= 90\n ) {\n showCoordinateWarning = false;\n warn(\n 'Call useGeographic() from ol/proj once to work with [longitude, latitude] coordinates.'\n );\n }\n return coordinate;\n }\n return transform(coordinate, userProjection, destProjection);\n}\n\n/**\n * Return an extent transformed into the user projection. If no user projection\n * is set, the original extent is returned.\n * @param {import(\"./extent.js\").Extent} extent Input extent.\n * @param {ProjectionLike} sourceProjection The input extent projection.\n * @return {import(\"./extent.js\").Extent} The input extent in the user projection.\n */\nexport function toUserExtent(extent, sourceProjection) {\n if (!userProjection) {\n return extent;\n }\n return transformExtent(extent, sourceProjection, userProjection);\n}\n\n/**\n * Return an extent transformed from the user projection. If no user projection\n * is set, the original extent is returned.\n * @param {import(\"./extent.js\").Extent} extent Input extent.\n * @param {ProjectionLike} destProjection The destination projection.\n * @return {import(\"./extent.js\").Extent} The input extent transformed.\n */\nexport function fromUserExtent(extent, destProjection) {\n if (!userProjection) {\n return extent;\n }\n return transformExtent(extent, userProjection, destProjection);\n}\n\n/**\n * Return the resolution in user projection units per pixel. If no user projection\n * is set, or source or user projection are missing units, the original resolution\n * is returned.\n * @param {number} resolution Resolution in input projection units per pixel.\n * @param {ProjectionLike} sourceProjection The input projection.\n * @return {number} Resolution in user projection units per pixel.\n */\nexport function toUserResolution(resolution, sourceProjection) {\n if (!userProjection) {\n return resolution;\n }\n const sourceUnits = get(sourceProjection).getUnits();\n const userUnits = userProjection.getUnits();\n return sourceUnits && userUnits\n ? (resolution * METERS_PER_UNIT[sourceUnits]) / METERS_PER_UNIT[userUnits]\n : resolution;\n}\n\n/**\n * Return the resolution in user projection units per pixel. If no user projection\n * is set, or source or user projection are missing units, the original resolution\n * is returned.\n * @param {number} resolution Resolution in user projection units per pixel.\n * @param {ProjectionLike} destProjection The destination projection.\n * @return {number} Resolution in destination projection units per pixel.\n */\nexport function fromUserResolution(resolution, destProjection) {\n if (!userProjection) {\n return resolution;\n }\n const sourceUnits = get(destProjection).getUnits();\n const userUnits = userProjection.getUnits();\n return sourceUnits && userUnits\n ? (resolution * METERS_PER_UNIT[userUnits]) / METERS_PER_UNIT[sourceUnits]\n : resolution;\n}\n\n/**\n * Creates a safe coordinate transform function from a coordinate transform function.\n * \"Safe\" means that it can handle wrapping of x-coordinates for global projections,\n * and that coordinates exceeding the source projection validity extent's range will be\n * clamped to the validity range.\n * @param {Projection} sourceProj Source projection.\n * @param {Projection} destProj Destination projection.\n * @param {function(import(\"./coordinate.js\").Coordinate): import(\"./coordinate.js\").Coordinate} transform Transform function (source to destiation).\n * @return {function(import(\"./coordinate.js\").Coordinate): import(\"./coordinate.js\").Coordinate} Safe transform function (source to destiation).\n */\nexport function createSafeCoordinateTransform(sourceProj, destProj, transform) {\n return function (coord) {\n let transformed, worldsAway;\n if (sourceProj.canWrapX()) {\n const sourceExtent = sourceProj.getExtent();\n const sourceExtentWidth = getWidth(sourceExtent);\n coord = coord.slice(0);\n worldsAway = getWorldsAway(coord, sourceProj, sourceExtentWidth);\n if (worldsAway) {\n // Move x to the real world\n coord[0] = coord[0] - worldsAway * sourceExtentWidth;\n }\n coord[0] = clamp(coord[0], sourceExtent[0], sourceExtent[2]);\n coord[1] = clamp(coord[1], sourceExtent[1], sourceExtent[3]);\n transformed = transform(coord);\n } else {\n transformed = transform(coord);\n }\n if (worldsAway && destProj.canWrapX()) {\n // Move transformed coordinate back to the offset world\n transformed[0] += worldsAway * getWidth(destProj.getExtent());\n }\n return transformed;\n };\n}\n\n/**\n * Add transforms to and from EPSG:4326 and EPSG:3857. This function is called\n * by when this module is executed and should only need to be called again after\n * `clearAllProjections()` is called (e.g. in tests).\n */\nexport function addCommon() {\n // Add transformations that don't alter coordinates to convert within set of\n // projections with equal meaning.\n addEquivalentProjections(EPSG3857_PROJECTIONS);\n addEquivalentProjections(EPSG4326_PROJECTIONS);\n // Add transformations to convert EPSG:4326 like coordinates to EPSG:3857 like\n // coordinates and back.\n addEquivalentTransforms(\n EPSG4326_PROJECTIONS,\n EPSG3857_PROJECTIONS,\n fromEPSG4326,\n toEPSG4326\n );\n}\n\naddCommon();\n","/**\n * @module ol/geom/flat/transform\n */\n\n/**\n * @param {Array} flatCoordinates Flat coordinates.\n * @param {number} offset Offset.\n * @param {number} end End.\n * @param {number} stride Stride.\n * @param {import(\"../../transform.js\").Transform} transform Transform.\n * @param {Array} [dest] Destination.\n * @return {Array} Transformed coordinates.\n */\nexport function transform2D(\n flatCoordinates,\n offset,\n end,\n stride,\n transform,\n dest\n) {\n dest = dest ? dest : [];\n let i = 0;\n for (let j = offset; j < end; j += stride) {\n const x = flatCoordinates[j];\n const y = flatCoordinates[j + 1];\n dest[i++] = transform[0] * x + transform[2] * y + transform[4];\n dest[i++] = transform[1] * x + transform[3] * y + transform[5];\n }\n if (dest && dest.length != i) {\n dest.length = i;\n }\n return dest;\n}\n\n/**\n * @param {Array} flatCoordinates Flat coordinates.\n * @param {number} offset Offset.\n * @param {number} end End.\n * @param {number} stride Stride.\n * @param {number} angle Angle.\n * @param {Array} anchor Rotation anchor point.\n * @param {Array} [dest] Destination.\n * @return {Array} Transformed coordinates.\n */\nexport function rotate(\n flatCoordinates,\n offset,\n end,\n stride,\n angle,\n anchor,\n dest\n) {\n dest = dest ? dest : [];\n const cos = Math.cos(angle);\n const sin = Math.sin(angle);\n const anchorX = anchor[0];\n const anchorY = anchor[1];\n let i = 0;\n for (let j = offset; j < end; j += stride) {\n const deltaX = flatCoordinates[j] - anchorX;\n const deltaY = flatCoordinates[j + 1] - anchorY;\n dest[i++] = anchorX + deltaX * cos - deltaY * sin;\n dest[i++] = anchorY + deltaX * sin + deltaY * cos;\n for (let k = j + 2; k < j + stride; ++k) {\n dest[i++] = flatCoordinates[k];\n }\n }\n if (dest && dest.length != i) {\n dest.length = i;\n }\n return dest;\n}\n\n/**\n * Scale the coordinates.\n * @param {Array} flatCoordinates Flat coordinates.\n * @param {number} offset Offset.\n * @param {number} end End.\n * @param {number} stride Stride.\n * @param {number} sx Scale factor in the x-direction.\n * @param {number} sy Scale factor in the y-direction.\n * @param {Array} anchor Scale anchor point.\n * @param {Array} [dest] Destination.\n * @return {Array} Transformed coordinates.\n */\nexport function scale(\n flatCoordinates,\n offset,\n end,\n stride,\n sx,\n sy,\n anchor,\n dest\n) {\n dest = dest ? dest : [];\n const anchorX = anchor[0];\n const anchorY = anchor[1];\n let i = 0;\n for (let j = offset; j < end; j += stride) {\n const deltaX = flatCoordinates[j] - anchorX;\n const deltaY = flatCoordinates[j + 1] - anchorY;\n dest[i++] = anchorX + sx * deltaX;\n dest[i++] = anchorY + sy * deltaY;\n for (let k = j + 2; k < j + stride; ++k) {\n dest[i++] = flatCoordinates[k];\n }\n }\n if (dest && dest.length != i) {\n dest.length = i;\n }\n return dest;\n}\n\n/**\n * @param {Array} flatCoordinates Flat coordinates.\n * @param {number} offset Offset.\n * @param {number} end End.\n * @param {number} stride Stride.\n * @param {number} deltaX Delta X.\n * @param {number} deltaY Delta Y.\n * @param {Array} [dest] Destination.\n * @return {Array} Transformed coordinates.\n */\nexport function translate(\n flatCoordinates,\n offset,\n end,\n stride,\n deltaX,\n deltaY,\n dest\n) {\n dest = dest ? dest : [];\n let i = 0;\n for (let j = offset; j < end; j += stride) {\n dest[i++] = flatCoordinates[j] + deltaX;\n dest[i++] = flatCoordinates[j + 1] + deltaY;\n for (let k = j + 2; k < j + stride; ++k) {\n dest[i++] = flatCoordinates[k];\n }\n }\n if (dest && dest.length != i) {\n dest.length = i;\n }\n return dest;\n}\n","/**\n * @module ol/geom/Geometry\n */\nimport BaseObject from '../Object.js';\nimport {abstract} from '../util.js';\nimport {\n compose as composeTransform,\n create as createTransform,\n} from '../transform.js';\nimport {\n createEmpty,\n createOrUpdateEmpty,\n getHeight,\n returnOrUpdate,\n} from '../extent.js';\nimport {get as getProjection, getTransform} from '../proj.js';\nimport {memoizeOne} from '../functions.js';\nimport {transform2D} from './flat/transform.js';\n\n/**\n * @typedef {'XY' | 'XYZ' | 'XYM' | 'XYZM'} GeometryLayout\n * The coordinate layout for geometries, indicating whether a 3rd or 4th z ('Z')\n * or measure ('M') coordinate is available.\n */\n\n/**\n * @typedef {'Point' | 'LineString' | 'LinearRing' | 'Polygon' | 'MultiPoint' | 'MultiLineString' | 'MultiPolygon' | 'GeometryCollection' | 'Circle'} Type\n * The geometry type. One of `'Point'`, `'LineString'`, `'LinearRing'`,\n * `'Polygon'`, `'MultiPoint'`, `'MultiLineString'`, `'MultiPolygon'`,\n * `'GeometryCollection'`, or `'Circle'`.\n */\n\n/**\n * @type {import(\"../transform.js\").Transform}\n */\nconst tmpTransform = createTransform();\n\n/**\n * @classdesc\n * Abstract base class; normally only used for creating subclasses and not\n * instantiated in apps.\n * Base class for vector geometries.\n *\n * To get notified of changes to the geometry, register a listener for the\n * generic `change` event on your geometry instance.\n *\n * @abstract\n * @api\n */\nclass Geometry extends BaseObject {\n constructor() {\n super();\n\n /**\n * @private\n * @type {import(\"../extent.js\").Extent}\n */\n this.extent_ = createEmpty();\n\n /**\n * @private\n * @type {number}\n */\n this.extentRevision_ = -1;\n\n /**\n * @protected\n * @type {number}\n */\n this.simplifiedGeometryMaxMinSquaredTolerance = 0;\n\n /**\n * @protected\n * @type {number}\n */\n this.simplifiedGeometryRevision = 0;\n\n /**\n * Get a transformed and simplified version of the geometry.\n * @abstract\n * @param {number} revision The geometry revision.\n * @param {number} squaredTolerance Squared tolerance.\n * @param {import(\"../proj.js\").TransformFunction} [transform] Optional transform function.\n * @return {Geometry} Simplified geometry.\n */\n this.simplifyTransformedInternal = memoizeOne(function (\n revision,\n squaredTolerance,\n transform\n ) {\n if (!transform) {\n return this.getSimplifiedGeometry(squaredTolerance);\n }\n const clone = this.clone();\n clone.applyTransform(transform);\n return clone.getSimplifiedGeometry(squaredTolerance);\n });\n }\n\n /**\n * Get a transformed and simplified version of the geometry.\n * @abstract\n * @param {number} squaredTolerance Squared tolerance.\n * @param {import(\"../proj.js\").TransformFunction} [transform] Optional transform function.\n * @return {Geometry} Simplified geometry.\n */\n simplifyTransformed(squaredTolerance, transform) {\n return this.simplifyTransformedInternal(\n this.getRevision(),\n squaredTolerance,\n transform\n );\n }\n\n /**\n * Make a complete copy of the geometry.\n * @abstract\n * @return {!Geometry} Clone.\n */\n clone() {\n return abstract();\n }\n\n /**\n * @abstract\n * @param {number} x X.\n * @param {number} y Y.\n * @param {import(\"../coordinate.js\").Coordinate} closestPoint Closest point.\n * @param {number} minSquaredDistance Minimum squared distance.\n * @return {number} Minimum squared distance.\n */\n closestPointXY(x, y, closestPoint, minSquaredDistance) {\n return abstract();\n }\n\n /**\n * @param {number} x X.\n * @param {number} y Y.\n * @return {boolean} Contains (x, y).\n */\n containsXY(x, y) {\n const coord = this.getClosestPoint([x, y]);\n return coord[0] === x && coord[1] === y;\n }\n\n /**\n * Return the closest point of the geometry to the passed point as\n * {@link module:ol/coordinate~Coordinate coordinate}.\n * @param {import(\"../coordinate.js\").Coordinate} point Point.\n * @param {import(\"../coordinate.js\").Coordinate} [closestPoint] Closest point.\n * @return {import(\"../coordinate.js\").Coordinate} Closest point.\n * @api\n */\n getClosestPoint(point, closestPoint) {\n closestPoint = closestPoint ? closestPoint : [NaN, NaN];\n this.closestPointXY(point[0], point[1], closestPoint, Infinity);\n return closestPoint;\n }\n\n /**\n * Returns true if this geometry includes the specified coordinate. If the\n * coordinate is on the boundary of the geometry, returns false.\n * @param {import(\"../coordinate.js\").Coordinate} coordinate Coordinate.\n * @return {boolean} Contains coordinate.\n * @api\n */\n intersectsCoordinate(coordinate) {\n return this.containsXY(coordinate[0], coordinate[1]);\n }\n\n /**\n * @abstract\n * @param {import(\"../extent.js\").Extent} extent Extent.\n * @protected\n * @return {import(\"../extent.js\").Extent} extent Extent.\n */\n computeExtent(extent) {\n return abstract();\n }\n\n /**\n * Get the extent of the geometry.\n * @param {import(\"../extent.js\").Extent} [extent] Extent.\n * @return {import(\"../extent.js\").Extent} extent Extent.\n * @api\n */\n getExtent(extent) {\n if (this.extentRevision_ != this.getRevision()) {\n const extent = this.computeExtent(this.extent_);\n if (isNaN(extent[0]) || isNaN(extent[1])) {\n createOrUpdateEmpty(extent);\n }\n this.extentRevision_ = this.getRevision();\n }\n return returnOrUpdate(this.extent_, extent);\n }\n\n /**\n * Rotate the geometry around a given coordinate. This modifies the geometry\n * coordinates in place.\n * @abstract\n * @param {number} angle Rotation angle in radians.\n * @param {import(\"../coordinate.js\").Coordinate} anchor The rotation center.\n * @api\n */\n rotate(angle, anchor) {\n abstract();\n }\n\n /**\n * Scale the geometry (with an optional origin). This modifies the geometry\n * coordinates in place.\n * @abstract\n * @param {number} sx The scaling factor in the x-direction.\n * @param {number} [sy] The scaling factor in the y-direction (defaults to sx).\n * @param {import(\"../coordinate.js\").Coordinate} [anchor] The scale origin (defaults to the center\n * of the geometry extent).\n * @api\n */\n scale(sx, sy, anchor) {\n abstract();\n }\n\n /**\n * Create a simplified version of this geometry. For linestrings, this uses\n * the [Douglas Peucker](https://en.wikipedia.org/wiki/Ramer-Douglas-Peucker_algorithm)\n * algorithm. For polygons, a quantization-based\n * simplification is used to preserve topology.\n * @param {number} tolerance The tolerance distance for simplification.\n * @return {Geometry} A new, simplified version of the original geometry.\n * @api\n */\n simplify(tolerance) {\n return this.getSimplifiedGeometry(tolerance * tolerance);\n }\n\n /**\n * Create a simplified version of this geometry using the Douglas Peucker\n * algorithm.\n * See https://en.wikipedia.org/wiki/Ramer-Douglas-Peucker_algorithm.\n * @abstract\n * @param {number} squaredTolerance Squared tolerance.\n * @return {Geometry} Simplified geometry.\n */\n getSimplifiedGeometry(squaredTolerance) {\n return abstract();\n }\n\n /**\n * Get the type of this geometry.\n * @abstract\n * @return {Type} Geometry type.\n */\n getType() {\n return abstract();\n }\n\n /**\n * Apply a transform function to the coordinates of the geometry.\n * The geometry is modified in place.\n * If you do not want the geometry modified in place, first `clone()` it and\n * then use this function on the clone.\n * @abstract\n * @param {import(\"../proj.js\").TransformFunction} transformFn Transform function.\n * Called with a flat array of geometry coordinates.\n */\n applyTransform(transformFn) {\n abstract();\n }\n\n /**\n * Test if the geometry and the passed extent intersect.\n * @abstract\n * @param {import(\"../extent.js\").Extent} extent Extent.\n * @return {boolean} `true` if the geometry and the extent intersect.\n */\n intersectsExtent(extent) {\n return abstract();\n }\n\n /**\n * Translate the geometry. This modifies the geometry coordinates in place. If\n * instead you want a new geometry, first `clone()` this geometry.\n * @abstract\n * @param {number} deltaX Delta X.\n * @param {number} deltaY Delta Y.\n * @api\n */\n translate(deltaX, deltaY) {\n abstract();\n }\n\n /**\n * Transform each coordinate of the geometry from one coordinate reference\n * system to another. The geometry is modified in place.\n * For example, a line will be transformed to a line and a circle to a circle.\n * If you do not want the geometry modified in place, first `clone()` it and\n * then use this function on the clone.\n *\n * @param {import(\"../proj.js\").ProjectionLike} source The current projection. Can be a\n * string identifier or a {@link module:ol/proj/Projection~Projection} object.\n * @param {import(\"../proj.js\").ProjectionLike} destination The desired projection. Can be a\n * string identifier or a {@link module:ol/proj/Projection~Projection} object.\n * @return {Geometry} This geometry. Note that original geometry is\n * modified in place.\n * @api\n */\n transform(source, destination) {\n /** @type {import(\"../proj/Projection.js\").default} */\n const sourceProj = getProjection(source);\n const transformFn =\n sourceProj.getUnits() == 'tile-pixels'\n ? function (inCoordinates, outCoordinates, stride) {\n const pixelExtent = sourceProj.getExtent();\n const projectedExtent = sourceProj.getWorldExtent();\n const scale = getHeight(projectedExtent) / getHeight(pixelExtent);\n composeTransform(\n tmpTransform,\n projectedExtent[0],\n projectedExtent[3],\n scale,\n -scale,\n 0,\n 0,\n 0\n );\n transform2D(\n inCoordinates,\n 0,\n inCoordinates.length,\n stride,\n tmpTransform,\n outCoordinates\n );\n return getTransform(sourceProj, destination)(\n inCoordinates,\n outCoordinates,\n stride\n );\n }\n : getTransform(sourceProj, destination);\n this.applyTransform(transformFn);\n return this;\n }\n}\n\nexport default Geometry;\n","/**\n * @module ol/geom/SimpleGeometry\n */\nimport Geometry from './Geometry.js';\nimport {abstract} from '../util.js';\nimport {createOrUpdateFromFlatCoordinates, getCenter} from '../extent.js';\nimport {rotate, scale, transform2D, translate} from './flat/transform.js';\n\n/**\n * @classdesc\n * Abstract base class; only used for creating subclasses; do not instantiate\n * in apps, as cannot be rendered.\n *\n * @abstract\n * @api\n */\nclass SimpleGeometry extends Geometry {\n constructor() {\n super();\n\n /**\n * @protected\n * @type {import(\"./Geometry.js\").GeometryLayout}\n */\n this.layout = 'XY';\n\n /**\n * @protected\n * @type {number}\n */\n this.stride = 2;\n\n /**\n * @protected\n * @type {Array}\n */\n this.flatCoordinates = null;\n }\n\n /**\n * @param {import(\"../extent.js\").Extent} extent Extent.\n * @protected\n * @return {import(\"../extent.js\").Extent} extent Extent.\n */\n computeExtent(extent) {\n return createOrUpdateFromFlatCoordinates(\n this.flatCoordinates,\n 0,\n this.flatCoordinates.length,\n this.stride,\n extent\n );\n }\n\n /**\n * @abstract\n * @return {Array<*> | null} Coordinates.\n */\n getCoordinates() {\n return abstract();\n }\n\n /**\n * Return the first coordinate of the geometry.\n * @return {import(\"../coordinate.js\").Coordinate} First coordinate.\n * @api\n */\n getFirstCoordinate() {\n return this.flatCoordinates.slice(0, this.stride);\n }\n\n /**\n * @return {Array} Flat coordinates.\n */\n getFlatCoordinates() {\n return this.flatCoordinates;\n }\n\n /**\n * Return the last coordinate of the geometry.\n * @return {import(\"../coordinate.js\").Coordinate} Last point.\n * @api\n */\n getLastCoordinate() {\n return this.flatCoordinates.slice(\n this.flatCoordinates.length - this.stride\n );\n }\n\n /**\n * Return the {@link import(\"./Geometry.js\").GeometryLayout layout} of the geometry.\n * @return {import(\"./Geometry.js\").GeometryLayout} Layout.\n * @api\n */\n getLayout() {\n return this.layout;\n }\n\n /**\n * Create a simplified version of this geometry using the Douglas Peucker algorithm.\n * @param {number} squaredTolerance Squared tolerance.\n * @return {SimpleGeometry} Simplified geometry.\n */\n getSimplifiedGeometry(squaredTolerance) {\n if (this.simplifiedGeometryRevision !== this.getRevision()) {\n this.simplifiedGeometryMaxMinSquaredTolerance = 0;\n this.simplifiedGeometryRevision = this.getRevision();\n }\n // If squaredTolerance is negative or if we know that simplification will not\n // have any effect then just return this.\n if (\n squaredTolerance < 0 ||\n (this.simplifiedGeometryMaxMinSquaredTolerance !== 0 &&\n squaredTolerance <= this.simplifiedGeometryMaxMinSquaredTolerance)\n ) {\n return this;\n }\n\n const simplifiedGeometry =\n this.getSimplifiedGeometryInternal(squaredTolerance);\n const simplifiedFlatCoordinates = simplifiedGeometry.getFlatCoordinates();\n if (simplifiedFlatCoordinates.length < this.flatCoordinates.length) {\n return simplifiedGeometry;\n }\n // Simplification did not actually remove any coordinates. We now know\n // that any calls to getSimplifiedGeometry with a squaredTolerance less\n // than or equal to the current squaredTolerance will also not have any\n // effect. This allows us to short circuit simplification (saving CPU\n // cycles) and prevents the cache of simplified geometries from filling\n // up with useless identical copies of this geometry (saving memory).\n this.simplifiedGeometryMaxMinSquaredTolerance = squaredTolerance;\n return this;\n }\n\n /**\n * @param {number} squaredTolerance Squared tolerance.\n * @return {SimpleGeometry} Simplified geometry.\n * @protected\n */\n getSimplifiedGeometryInternal(squaredTolerance) {\n return this;\n }\n\n /**\n * @return {number} Stride.\n */\n getStride() {\n return this.stride;\n }\n\n /**\n * @param {import(\"./Geometry.js\").GeometryLayout} layout Layout.\n * @param {Array} flatCoordinates Flat coordinates.\n */\n setFlatCoordinates(layout, flatCoordinates) {\n this.stride = getStrideForLayout(layout);\n this.layout = layout;\n this.flatCoordinates = flatCoordinates;\n }\n\n /**\n * @abstract\n * @param {!Array<*>} coordinates Coordinates.\n * @param {import(\"./Geometry.js\").GeometryLayout} [layout] Layout.\n */\n setCoordinates(coordinates, layout) {\n abstract();\n }\n\n /**\n * @param {import(\"./Geometry.js\").GeometryLayout|undefined} layout Layout.\n * @param {Array<*>} coordinates Coordinates.\n * @param {number} nesting Nesting.\n * @protected\n */\n setLayout(layout, coordinates, nesting) {\n /** @type {number} */\n let stride;\n if (layout) {\n stride = getStrideForLayout(layout);\n } else {\n for (let i = 0; i < nesting; ++i) {\n if (coordinates.length === 0) {\n this.layout = 'XY';\n this.stride = 2;\n return;\n }\n coordinates = /** @type {Array} */ (coordinates[0]);\n }\n stride = coordinates.length;\n layout = getLayoutForStride(stride);\n }\n this.layout = layout;\n this.stride = stride;\n }\n\n /**\n * Apply a transform function to the coordinates of the geometry.\n * The geometry is modified in place.\n * If you do not want the geometry modified in place, first `clone()` it and\n * then use this function on the clone.\n * @param {import(\"../proj.js\").TransformFunction} transformFn Transform function.\n * Called with a flat array of geometry coordinates.\n * @api\n */\n applyTransform(transformFn) {\n if (this.flatCoordinates) {\n transformFn(this.flatCoordinates, this.flatCoordinates, this.stride);\n this.changed();\n }\n }\n\n /**\n * Rotate the geometry around a given coordinate. This modifies the geometry\n * coordinates in place.\n * @param {number} angle Rotation angle in counter-clockwise radians.\n * @param {import(\"../coordinate.js\").Coordinate} anchor The rotation center.\n * @api\n */\n rotate(angle, anchor) {\n const flatCoordinates = this.getFlatCoordinates();\n if (flatCoordinates) {\n const stride = this.getStride();\n rotate(\n flatCoordinates,\n 0,\n flatCoordinates.length,\n stride,\n angle,\n anchor,\n flatCoordinates\n );\n this.changed();\n }\n }\n\n /**\n * Scale the geometry (with an optional origin). This modifies the geometry\n * coordinates in place.\n * @param {number} sx The scaling factor in the x-direction.\n * @param {number} [sy] The scaling factor in the y-direction (defaults to sx).\n * @param {import(\"../coordinate.js\").Coordinate} [anchor] The scale origin (defaults to the center\n * of the geometry extent).\n * @api\n */\n scale(sx, sy, anchor) {\n if (sy === undefined) {\n sy = sx;\n }\n if (!anchor) {\n anchor = getCenter(this.getExtent());\n }\n const flatCoordinates = this.getFlatCoordinates();\n if (flatCoordinates) {\n const stride = this.getStride();\n scale(\n flatCoordinates,\n 0,\n flatCoordinates.length,\n stride,\n sx,\n sy,\n anchor,\n flatCoordinates\n );\n this.changed();\n }\n }\n\n /**\n * Translate the geometry. This modifies the geometry coordinates in place. If\n * instead you want a new geometry, first `clone()` this geometry.\n * @param {number} deltaX Delta X.\n * @param {number} deltaY Delta Y.\n * @api\n */\n translate(deltaX, deltaY) {\n const flatCoordinates = this.getFlatCoordinates();\n if (flatCoordinates) {\n const stride = this.getStride();\n translate(\n flatCoordinates,\n 0,\n flatCoordinates.length,\n stride,\n deltaX,\n deltaY,\n flatCoordinates\n );\n this.changed();\n }\n }\n}\n\n/**\n * @param {number} stride Stride.\n * @return {import(\"./Geometry.js\").GeometryLayout} layout Layout.\n */\nfunction getLayoutForStride(stride) {\n let layout;\n if (stride == 2) {\n layout = 'XY';\n } else if (stride == 3) {\n layout = 'XYZ';\n } else if (stride == 4) {\n layout = 'XYZM';\n }\n return /** @type {import(\"./Geometry.js\").GeometryLayout} */ (layout);\n}\n\n/**\n * @param {import(\"./Geometry.js\").GeometryLayout} layout Layout.\n * @return {number} Stride.\n */\nexport function getStrideForLayout(layout) {\n let stride;\n if (layout == 'XY') {\n stride = 2;\n } else if (layout == 'XYZ' || layout == 'XYM') {\n stride = 3;\n } else if (layout == 'XYZM') {\n stride = 4;\n }\n return /** @type {number} */ (stride);\n}\n\n/**\n * @param {SimpleGeometry} simpleGeometry Simple geometry.\n * @param {import(\"../transform.js\").Transform} transform Transform.\n * @param {Array} [dest] Destination.\n * @return {Array} Transformed flat coordinates.\n */\nexport function transformGeom2D(simpleGeometry, transform, dest) {\n const flatCoordinates = simpleGeometry.getFlatCoordinates();\n if (!flatCoordinates) {\n return null;\n }\n const stride = simpleGeometry.getStride();\n return transform2D(\n flatCoordinates,\n 0,\n flatCoordinates.length,\n stride,\n transform,\n dest\n );\n}\n\nexport default SimpleGeometry;\n","/**\n * @module ol/geom/flat/closest\n */\nimport {lerp, squaredDistance as squaredDx} from '../../math.js';\n\n/**\n * Returns the point on the 2D line segment flatCoordinates[offset1] to\n * flatCoordinates[offset2] that is closest to the point (x, y). Extra\n * dimensions are linearly interpolated.\n * @param {Array} flatCoordinates Flat coordinates.\n * @param {number} offset1 Offset 1.\n * @param {number} offset2 Offset 2.\n * @param {number} stride Stride.\n * @param {number} x X.\n * @param {number} y Y.\n * @param {Array} closestPoint Closest point.\n */\nfunction assignClosest(\n flatCoordinates,\n offset1,\n offset2,\n stride,\n x,\n y,\n closestPoint\n) {\n const x1 = flatCoordinates[offset1];\n const y1 = flatCoordinates[offset1 + 1];\n const dx = flatCoordinates[offset2] - x1;\n const dy = flatCoordinates[offset2 + 1] - y1;\n let offset;\n if (dx === 0 && dy === 0) {\n offset = offset1;\n } else {\n const t = ((x - x1) * dx + (y - y1) * dy) / (dx * dx + dy * dy);\n if (t > 1) {\n offset = offset2;\n } else if (t > 0) {\n for (let i = 0; i < stride; ++i) {\n closestPoint[i] = lerp(\n flatCoordinates[offset1 + i],\n flatCoordinates[offset2 + i],\n t\n );\n }\n closestPoint.length = stride;\n return;\n } else {\n offset = offset1;\n }\n }\n for (let i = 0; i < stride; ++i) {\n closestPoint[i] = flatCoordinates[offset + i];\n }\n closestPoint.length = stride;\n}\n\n/**\n * Return the squared of the largest distance between any pair of consecutive\n * coordinates.\n * @param {Array} flatCoordinates Flat coordinates.\n * @param {number} offset Offset.\n * @param {number} end End.\n * @param {number} stride Stride.\n * @param {number} max Max squared delta.\n * @return {number} Max squared delta.\n */\nexport function maxSquaredDelta(flatCoordinates, offset, end, stride, max) {\n let x1 = flatCoordinates[offset];\n let y1 = flatCoordinates[offset + 1];\n for (offset += stride; offset < end; offset += stride) {\n const x2 = flatCoordinates[offset];\n const y2 = flatCoordinates[offset + 1];\n const squaredDelta = squaredDx(x1, y1, x2, y2);\n if (squaredDelta > max) {\n max = squaredDelta;\n }\n x1 = x2;\n y1 = y2;\n }\n return max;\n}\n\n/**\n * @param {Array} flatCoordinates Flat coordinates.\n * @param {number} offset Offset.\n * @param {Array} ends Ends.\n * @param {number} stride Stride.\n * @param {number} max Max squared delta.\n * @return {number} Max squared delta.\n */\nexport function arrayMaxSquaredDelta(\n flatCoordinates,\n offset,\n ends,\n stride,\n max\n) {\n for (let i = 0, ii = ends.length; i < ii; ++i) {\n const end = ends[i];\n max = maxSquaredDelta(flatCoordinates, offset, end, stride, max);\n offset = end;\n }\n return max;\n}\n\n/**\n * @param {Array} flatCoordinates Flat coordinates.\n * @param {number} offset Offset.\n * @param {Array>} endss Endss.\n * @param {number} stride Stride.\n * @param {number} max Max squared delta.\n * @return {number} Max squared delta.\n */\nexport function multiArrayMaxSquaredDelta(\n flatCoordinates,\n offset,\n endss,\n stride,\n max\n) {\n for (let i = 0, ii = endss.length; i < ii; ++i) {\n const ends = endss[i];\n max = arrayMaxSquaredDelta(flatCoordinates, offset, ends, stride, max);\n offset = ends[ends.length - 1];\n }\n return max;\n}\n\n/**\n * @param {Array} flatCoordinates Flat coordinates.\n * @param {number} offset Offset.\n * @param {number} end End.\n * @param {number} stride Stride.\n * @param {number} maxDelta Max delta.\n * @param {boolean} isRing Is ring.\n * @param {number} x X.\n * @param {number} y Y.\n * @param {Array} closestPoint Closest point.\n * @param {number} minSquaredDistance Minimum squared distance.\n * @param {Array} [tmpPoint] Temporary point object.\n * @return {number} Minimum squared distance.\n */\nexport function assignClosestPoint(\n flatCoordinates,\n offset,\n end,\n stride,\n maxDelta,\n isRing,\n x,\n y,\n closestPoint,\n minSquaredDistance,\n tmpPoint\n) {\n if (offset == end) {\n return minSquaredDistance;\n }\n let i, squaredDistance;\n if (maxDelta === 0) {\n // All points are identical, so just test the first point.\n squaredDistance = squaredDx(\n x,\n y,\n flatCoordinates[offset],\n flatCoordinates[offset + 1]\n );\n if (squaredDistance < minSquaredDistance) {\n for (i = 0; i < stride; ++i) {\n closestPoint[i] = flatCoordinates[offset + i];\n }\n closestPoint.length = stride;\n return squaredDistance;\n }\n return minSquaredDistance;\n }\n tmpPoint = tmpPoint ? tmpPoint : [NaN, NaN];\n let index = offset + stride;\n while (index < end) {\n assignClosest(\n flatCoordinates,\n index - stride,\n index,\n stride,\n x,\n y,\n tmpPoint\n );\n squaredDistance = squaredDx(x, y, tmpPoint[0], tmpPoint[1]);\n if (squaredDistance < minSquaredDistance) {\n minSquaredDistance = squaredDistance;\n for (i = 0; i < stride; ++i) {\n closestPoint[i] = tmpPoint[i];\n }\n closestPoint.length = stride;\n index += stride;\n } else {\n // Skip ahead multiple points, because we know that all the skipped\n // points cannot be any closer than the closest point we have found so\n // far. We know this because we know how close the current point is, how\n // close the closest point we have found so far is, and the maximum\n // distance between consecutive points. For example, if we're currently\n // at distance 10, the best we've found so far is 3, and that the maximum\n // distance between consecutive points is 2, then we'll need to skip at\n // least (10 - 3) / 2 == 3 (rounded down) points to have any chance of\n // finding a closer point. We use Math.max(..., 1) to ensure that we\n // always advance at least one point, to avoid an infinite loop.\n index +=\n stride *\n Math.max(\n ((Math.sqrt(squaredDistance) - Math.sqrt(minSquaredDistance)) /\n maxDelta) |\n 0,\n 1\n );\n }\n }\n if (isRing) {\n // Check the closing segment.\n assignClosest(\n flatCoordinates,\n end - stride,\n offset,\n stride,\n x,\n y,\n tmpPoint\n );\n squaredDistance = squaredDx(x, y, tmpPoint[0], tmpPoint[1]);\n if (squaredDistance < minSquaredDistance) {\n minSquaredDistance = squaredDistance;\n for (i = 0; i < stride; ++i) {\n closestPoint[i] = tmpPoint[i];\n }\n closestPoint.length = stride;\n }\n }\n return minSquaredDistance;\n}\n\n/**\n * @param {Array} flatCoordinates Flat coordinates.\n * @param {number} offset Offset.\n * @param {Array} ends Ends.\n * @param {number} stride Stride.\n * @param {number} maxDelta Max delta.\n * @param {boolean} isRing Is ring.\n * @param {number} x X.\n * @param {number} y Y.\n * @param {Array} closestPoint Closest point.\n * @param {number} minSquaredDistance Minimum squared distance.\n * @param {Array} [tmpPoint] Temporary point object.\n * @return {number} Minimum squared distance.\n */\nexport function assignClosestArrayPoint(\n flatCoordinates,\n offset,\n ends,\n stride,\n maxDelta,\n isRing,\n x,\n y,\n closestPoint,\n minSquaredDistance,\n tmpPoint\n) {\n tmpPoint = tmpPoint ? tmpPoint : [NaN, NaN];\n for (let i = 0, ii = ends.length; i < ii; ++i) {\n const end = ends[i];\n minSquaredDistance = assignClosestPoint(\n flatCoordinates,\n offset,\n end,\n stride,\n maxDelta,\n isRing,\n x,\n y,\n closestPoint,\n minSquaredDistance,\n tmpPoint\n );\n offset = end;\n }\n return minSquaredDistance;\n}\n\n/**\n * @param {Array} flatCoordinates Flat coordinates.\n * @param {number} offset Offset.\n * @param {Array>} endss Endss.\n * @param {number} stride Stride.\n * @param {number} maxDelta Max delta.\n * @param {boolean} isRing Is ring.\n * @param {number} x X.\n * @param {number} y Y.\n * @param {Array} closestPoint Closest point.\n * @param {number} minSquaredDistance Minimum squared distance.\n * @param {Array} [tmpPoint] Temporary point object.\n * @return {number} Minimum squared distance.\n */\nexport function assignClosestMultiArrayPoint(\n flatCoordinates,\n offset,\n endss,\n stride,\n maxDelta,\n isRing,\n x,\n y,\n closestPoint,\n minSquaredDistance,\n tmpPoint\n) {\n tmpPoint = tmpPoint ? tmpPoint : [NaN, NaN];\n for (let i = 0, ii = endss.length; i < ii; ++i) {\n const ends = endss[i];\n minSquaredDistance = assignClosestArrayPoint(\n flatCoordinates,\n offset,\n ends,\n stride,\n maxDelta,\n isRing,\n x,\n y,\n closestPoint,\n minSquaredDistance,\n tmpPoint\n );\n offset = ends[ends.length - 1];\n }\n return minSquaredDistance;\n}\n","/**\n * @module ol/geom/flat/deflate\n */\n\n/**\n * @param {Array} flatCoordinates Flat coordinates.\n * @param {number} offset Offset.\n * @param {import(\"../../coordinate.js\").Coordinate} coordinate Coordinate.\n * @param {number} stride Stride.\n * @return {number} offset Offset.\n */\nexport function deflateCoordinate(flatCoordinates, offset, coordinate, stride) {\n for (let i = 0, ii = coordinate.length; i < ii; ++i) {\n flatCoordinates[offset++] = coordinate[i];\n }\n return offset;\n}\n\n/**\n * @param {Array} flatCoordinates Flat coordinates.\n * @param {number} offset Offset.\n * @param {Array} coordinates Coordinates.\n * @param {number} stride Stride.\n * @return {number} offset Offset.\n */\nexport function deflateCoordinates(\n flatCoordinates,\n offset,\n coordinates,\n stride\n) {\n for (let i = 0, ii = coordinates.length; i < ii; ++i) {\n const coordinate = coordinates[i];\n for (let j = 0; j < stride; ++j) {\n flatCoordinates[offset++] = coordinate[j];\n }\n }\n return offset;\n}\n\n/**\n * @param {Array} flatCoordinates Flat coordinates.\n * @param {number} offset Offset.\n * @param {Array>} coordinatess Coordinatess.\n * @param {number} stride Stride.\n * @param {Array} [ends] Ends.\n * @return {Array} Ends.\n */\nexport function deflateCoordinatesArray(\n flatCoordinates,\n offset,\n coordinatess,\n stride,\n ends\n) {\n ends = ends ? ends : [];\n let i = 0;\n for (let j = 0, jj = coordinatess.length; j < jj; ++j) {\n const end = deflateCoordinates(\n flatCoordinates,\n offset,\n coordinatess[j],\n stride\n );\n ends[i++] = end;\n offset = end;\n }\n ends.length = i;\n return ends;\n}\n\n/**\n * @param {Array} flatCoordinates Flat coordinates.\n * @param {number} offset Offset.\n * @param {Array>>} coordinatesss Coordinatesss.\n * @param {number} stride Stride.\n * @param {Array>} [endss] Endss.\n * @return {Array>} Endss.\n */\nexport function deflateMultiCoordinatesArray(\n flatCoordinates,\n offset,\n coordinatesss,\n stride,\n endss\n) {\n endss = endss ? endss : [];\n let i = 0;\n for (let j = 0, jj = coordinatesss.length; j < jj; ++j) {\n const ends = deflateCoordinatesArray(\n flatCoordinates,\n offset,\n coordinatesss[j],\n stride,\n endss[i]\n );\n if (ends.length === 0) {\n ends[0] = offset;\n }\n endss[i++] = ends;\n offset = ends[ends.length - 1];\n }\n endss.length = i;\n return endss;\n}\n","/**\n * @module ol/geom/flat/simplify\n */\n// Based on simplify-js https://github.com/mourner/simplify-js\n// Copyright (c) 2012, Vladimir Agafonkin\n// All rights reserved.\n//\n// Redistribution and use in source and binary forms, with or without\n// modification, are permitted provided that the following conditions are met:\n//\n// 1. Redistributions of source code must retain the above copyright notice,\n// this list of conditions and the following disclaimer.\n//\n// 2. Redistributions in binary form must reproduce the above copyright\n// notice, this list of conditions and the following disclaimer in the\n// documentation and/or other materials provided with the distribution.\n//\n// THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS \"AS IS\"\n// AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE\n// IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE\n// ARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT HOLDER OR CONTRIBUTORS BE\n// LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR\n// CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF\n// SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS\n// INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN\n// CONTRACT, STRICT LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE)\n// ARISING IN ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE\n// POSSIBILITY OF SUCH DAMAGE.\n\nimport {squaredDistance, squaredSegmentDistance} from '../../math.js';\n\n/**\n * @param {Array} flatCoordinates Flat coordinates.\n * @param {number} offset Offset.\n * @param {number} end End.\n * @param {number} stride Stride.\n * @param {number} squaredTolerance Squared tolerance.\n * @param {boolean} highQuality Highest quality.\n * @param {Array} [simplifiedFlatCoordinates] Simplified flat\n * coordinates.\n * @return {Array} Simplified line string.\n */\nexport function simplifyLineString(\n flatCoordinates,\n offset,\n end,\n stride,\n squaredTolerance,\n highQuality,\n simplifiedFlatCoordinates\n) {\n simplifiedFlatCoordinates =\n simplifiedFlatCoordinates !== undefined ? simplifiedFlatCoordinates : [];\n if (!highQuality) {\n end = radialDistance(\n flatCoordinates,\n offset,\n end,\n stride,\n squaredTolerance,\n simplifiedFlatCoordinates,\n 0\n );\n flatCoordinates = simplifiedFlatCoordinates;\n offset = 0;\n stride = 2;\n }\n simplifiedFlatCoordinates.length = douglasPeucker(\n flatCoordinates,\n offset,\n end,\n stride,\n squaredTolerance,\n simplifiedFlatCoordinates,\n 0\n );\n return simplifiedFlatCoordinates;\n}\n\n/**\n * @param {Array} flatCoordinates Flat coordinates.\n * @param {number} offset Offset.\n * @param {number} end End.\n * @param {number} stride Stride.\n * @param {number} squaredTolerance Squared tolerance.\n * @param {Array} simplifiedFlatCoordinates Simplified flat\n * coordinates.\n * @param {number} simplifiedOffset Simplified offset.\n * @return {number} Simplified offset.\n */\nexport function douglasPeucker(\n flatCoordinates,\n offset,\n end,\n stride,\n squaredTolerance,\n simplifiedFlatCoordinates,\n simplifiedOffset\n) {\n const n = (end - offset) / stride;\n if (n < 3) {\n for (; offset < end; offset += stride) {\n simplifiedFlatCoordinates[simplifiedOffset++] = flatCoordinates[offset];\n simplifiedFlatCoordinates[simplifiedOffset++] =\n flatCoordinates[offset + 1];\n }\n return simplifiedOffset;\n }\n /** @type {Array} */\n const markers = new Array(n);\n markers[0] = 1;\n markers[n - 1] = 1;\n /** @type {Array} */\n const stack = [offset, end - stride];\n let index = 0;\n while (stack.length > 0) {\n const last = stack.pop();\n const first = stack.pop();\n let maxSquaredDistance = 0;\n const x1 = flatCoordinates[first];\n const y1 = flatCoordinates[first + 1];\n const x2 = flatCoordinates[last];\n const y2 = flatCoordinates[last + 1];\n for (let i = first + stride; i < last; i += stride) {\n const x = flatCoordinates[i];\n const y = flatCoordinates[i + 1];\n const squaredDistance = squaredSegmentDistance(x, y, x1, y1, x2, y2);\n if (squaredDistance > maxSquaredDistance) {\n index = i;\n maxSquaredDistance = squaredDistance;\n }\n }\n if (maxSquaredDistance > squaredTolerance) {\n markers[(index - offset) / stride] = 1;\n if (first + stride < index) {\n stack.push(first, index);\n }\n if (index + stride < last) {\n stack.push(index, last);\n }\n }\n }\n for (let i = 0; i < n; ++i) {\n if (markers[i]) {\n simplifiedFlatCoordinates[simplifiedOffset++] =\n flatCoordinates[offset + i * stride];\n simplifiedFlatCoordinates[simplifiedOffset++] =\n flatCoordinates[offset + i * stride + 1];\n }\n }\n return simplifiedOffset;\n}\n\n/**\n * @param {Array} flatCoordinates Flat coordinates.\n * @param {number} offset Offset.\n * @param {Array} ends Ends.\n * @param {number} stride Stride.\n * @param {number} squaredTolerance Squared tolerance.\n * @param {Array} simplifiedFlatCoordinates Simplified flat\n * coordinates.\n * @param {number} simplifiedOffset Simplified offset.\n * @param {Array} simplifiedEnds Simplified ends.\n * @return {number} Simplified offset.\n */\nexport function douglasPeuckerArray(\n flatCoordinates,\n offset,\n ends,\n stride,\n squaredTolerance,\n simplifiedFlatCoordinates,\n simplifiedOffset,\n simplifiedEnds\n) {\n for (let i = 0, ii = ends.length; i < ii; ++i) {\n const end = ends[i];\n simplifiedOffset = douglasPeucker(\n flatCoordinates,\n offset,\n end,\n stride,\n squaredTolerance,\n simplifiedFlatCoordinates,\n simplifiedOffset\n );\n simplifiedEnds.push(simplifiedOffset);\n offset = end;\n }\n return simplifiedOffset;\n}\n\n/**\n * @param {Array} flatCoordinates Flat coordinates.\n * @param {number} offset Offset.\n * @param {Array>} endss Endss.\n * @param {number} stride Stride.\n * @param {number} squaredTolerance Squared tolerance.\n * @param {Array} simplifiedFlatCoordinates Simplified flat\n * coordinates.\n * @param {number} simplifiedOffset Simplified offset.\n * @param {Array>} simplifiedEndss Simplified endss.\n * @return {number} Simplified offset.\n */\nexport function douglasPeuckerMultiArray(\n flatCoordinates,\n offset,\n endss,\n stride,\n squaredTolerance,\n simplifiedFlatCoordinates,\n simplifiedOffset,\n simplifiedEndss\n) {\n for (let i = 0, ii = endss.length; i < ii; ++i) {\n const ends = endss[i];\n const simplifiedEnds = [];\n simplifiedOffset = douglasPeuckerArray(\n flatCoordinates,\n offset,\n ends,\n stride,\n squaredTolerance,\n simplifiedFlatCoordinates,\n simplifiedOffset,\n simplifiedEnds\n );\n simplifiedEndss.push(simplifiedEnds);\n offset = ends[ends.length - 1];\n }\n return simplifiedOffset;\n}\n\n/**\n * @param {Array} flatCoordinates Flat coordinates.\n * @param {number} offset Offset.\n * @param {number} end End.\n * @param {number} stride Stride.\n * @param {number} squaredTolerance Squared tolerance.\n * @param {Array} simplifiedFlatCoordinates Simplified flat\n * coordinates.\n * @param {number} simplifiedOffset Simplified offset.\n * @return {number} Simplified offset.\n */\nexport function radialDistance(\n flatCoordinates,\n offset,\n end,\n stride,\n squaredTolerance,\n simplifiedFlatCoordinates,\n simplifiedOffset\n) {\n if (end <= offset + stride) {\n // zero or one point, no simplification possible, so copy and return\n for (; offset < end; offset += stride) {\n simplifiedFlatCoordinates[simplifiedOffset++] = flatCoordinates[offset];\n simplifiedFlatCoordinates[simplifiedOffset++] =\n flatCoordinates[offset + 1];\n }\n return simplifiedOffset;\n }\n let x1 = flatCoordinates[offset];\n let y1 = flatCoordinates[offset + 1];\n // copy first point\n simplifiedFlatCoordinates[simplifiedOffset++] = x1;\n simplifiedFlatCoordinates[simplifiedOffset++] = y1;\n let x2 = x1;\n let y2 = y1;\n for (offset += stride; offset < end; offset += stride) {\n x2 = flatCoordinates[offset];\n y2 = flatCoordinates[offset + 1];\n if (squaredDistance(x1, y1, x2, y2) > squaredTolerance) {\n // copy point at offset\n simplifiedFlatCoordinates[simplifiedOffset++] = x2;\n simplifiedFlatCoordinates[simplifiedOffset++] = y2;\n x1 = x2;\n y1 = y2;\n }\n }\n if (x2 != x1 || y2 != y1) {\n // copy last point\n simplifiedFlatCoordinates[simplifiedOffset++] = x2;\n simplifiedFlatCoordinates[simplifiedOffset++] = y2;\n }\n return simplifiedOffset;\n}\n\n/**\n * @param {number} value Value.\n * @param {number} tolerance Tolerance.\n * @return {number} Rounded value.\n */\nexport function snap(value, tolerance) {\n return tolerance * Math.round(value / tolerance);\n}\n\n/**\n * Simplifies a line string using an algorithm designed by Tim Schaub.\n * Coordinates are snapped to the nearest value in a virtual grid and\n * consecutive duplicate coordinates are discarded. This effectively preserves\n * topology as the simplification of any subsection of a line string is\n * independent of the rest of the line string. This means that, for examples,\n * the common edge between two polygons will be simplified to the same line\n * string independently in both polygons. This implementation uses a single\n * pass over the coordinates and eliminates intermediate collinear points.\n * @param {Array} flatCoordinates Flat coordinates.\n * @param {number} offset Offset.\n * @param {number} end End.\n * @param {number} stride Stride.\n * @param {number} tolerance Tolerance.\n * @param {Array} simplifiedFlatCoordinates Simplified flat\n * coordinates.\n * @param {number} simplifiedOffset Simplified offset.\n * @return {number} Simplified offset.\n */\nexport function quantize(\n flatCoordinates,\n offset,\n end,\n stride,\n tolerance,\n simplifiedFlatCoordinates,\n simplifiedOffset\n) {\n // do nothing if the line is empty\n if (offset == end) {\n return simplifiedOffset;\n }\n // snap the first coordinate (P1)\n let x1 = snap(flatCoordinates[offset], tolerance);\n let y1 = snap(flatCoordinates[offset + 1], tolerance);\n offset += stride;\n // add the first coordinate to the output\n simplifiedFlatCoordinates[simplifiedOffset++] = x1;\n simplifiedFlatCoordinates[simplifiedOffset++] = y1;\n // find the next coordinate that does not snap to the same value as the first\n // coordinate (P2)\n let x2, y2;\n do {\n x2 = snap(flatCoordinates[offset], tolerance);\n y2 = snap(flatCoordinates[offset + 1], tolerance);\n offset += stride;\n if (offset == end) {\n // all coordinates snap to the same value, the line collapses to a point\n // push the last snapped value anyway to ensure that the output contains\n // at least two points\n // FIXME should we really return at least two points anyway?\n simplifiedFlatCoordinates[simplifiedOffset++] = x2;\n simplifiedFlatCoordinates[simplifiedOffset++] = y2;\n return simplifiedOffset;\n }\n } while (x2 == x1 && y2 == y1);\n while (offset < end) {\n // snap the next coordinate (P3)\n const x3 = snap(flatCoordinates[offset], tolerance);\n const y3 = snap(flatCoordinates[offset + 1], tolerance);\n offset += stride;\n // skip P3 if it is equal to P2\n if (x3 == x2 && y3 == y2) {\n continue;\n }\n // calculate the delta between P1 and P2\n const dx1 = x2 - x1;\n const dy1 = y2 - y1;\n // calculate the delta between P3 and P1\n const dx2 = x3 - x1;\n const dy2 = y3 - y1;\n // if P1, P2, and P3 are colinear and P3 is further from P1 than P2 is from\n // P1 in the same direction then P2 is on the straight line between P1 and\n // P3\n if (\n dx1 * dy2 == dy1 * dx2 &&\n ((dx1 < 0 && dx2 < dx1) || dx1 == dx2 || (dx1 > 0 && dx2 > dx1)) &&\n ((dy1 < 0 && dy2 < dy1) || dy1 == dy2 || (dy1 > 0 && dy2 > dy1))\n ) {\n // discard P2 and set P2 = P3\n x2 = x3;\n y2 = y3;\n continue;\n }\n // either P1, P2, and P3 are not colinear, or they are colinear but P3 is\n // between P3 and P1 or on the opposite half of the line to P2. add P2,\n // and continue with P1 = P2 and P2 = P3\n simplifiedFlatCoordinates[simplifiedOffset++] = x2;\n simplifiedFlatCoordinates[simplifiedOffset++] = y2;\n x1 = x2;\n y1 = y2;\n x2 = x3;\n y2 = y3;\n }\n // add the last point (P2)\n simplifiedFlatCoordinates[simplifiedOffset++] = x2;\n simplifiedFlatCoordinates[simplifiedOffset++] = y2;\n return simplifiedOffset;\n}\n\n/**\n * @param {Array} flatCoordinates Flat coordinates.\n * @param {number} offset Offset.\n * @param {Array} ends Ends.\n * @param {number} stride Stride.\n * @param {number} tolerance Tolerance.\n * @param {Array} simplifiedFlatCoordinates Simplified flat\n * coordinates.\n * @param {number} simplifiedOffset Simplified offset.\n * @param {Array} simplifiedEnds Simplified ends.\n * @return {number} Simplified offset.\n */\nexport function quantizeArray(\n flatCoordinates,\n offset,\n ends,\n stride,\n tolerance,\n simplifiedFlatCoordinates,\n simplifiedOffset,\n simplifiedEnds\n) {\n for (let i = 0, ii = ends.length; i < ii; ++i) {\n const end = ends[i];\n simplifiedOffset = quantize(\n flatCoordinates,\n offset,\n end,\n stride,\n tolerance,\n simplifiedFlatCoordinates,\n simplifiedOffset\n );\n simplifiedEnds.push(simplifiedOffset);\n offset = end;\n }\n return simplifiedOffset;\n}\n\n/**\n * @param {Array} flatCoordinates Flat coordinates.\n * @param {number} offset Offset.\n * @param {Array>} endss Endss.\n * @param {number} stride Stride.\n * @param {number} tolerance Tolerance.\n * @param {Array} simplifiedFlatCoordinates Simplified flat\n * coordinates.\n * @param {number} simplifiedOffset Simplified offset.\n * @param {Array>} simplifiedEndss Simplified endss.\n * @return {number} Simplified offset.\n */\nexport function quantizeMultiArray(\n flatCoordinates,\n offset,\n endss,\n stride,\n tolerance,\n simplifiedFlatCoordinates,\n simplifiedOffset,\n simplifiedEndss\n) {\n for (let i = 0, ii = endss.length; i < ii; ++i) {\n const ends = endss[i];\n const simplifiedEnds = [];\n simplifiedOffset = quantizeArray(\n flatCoordinates,\n offset,\n ends,\n stride,\n tolerance,\n simplifiedFlatCoordinates,\n simplifiedOffset,\n simplifiedEnds\n );\n simplifiedEndss.push(simplifiedEnds);\n offset = ends[ends.length - 1];\n }\n return simplifiedOffset;\n}\n","/**\n * @module ol/geom/flat/inflate\n */\n\n/**\n * @param {Array} flatCoordinates Flat coordinates.\n * @param {number} offset Offset.\n * @param {number} end End.\n * @param {number} stride Stride.\n * @param {Array} [coordinates] Coordinates.\n * @return {Array} Coordinates.\n */\nexport function inflateCoordinates(\n flatCoordinates,\n offset,\n end,\n stride,\n coordinates\n) {\n coordinates = coordinates !== undefined ? coordinates : [];\n let i = 0;\n for (let j = offset; j < end; j += stride) {\n coordinates[i++] = flatCoordinates.slice(j, j + stride);\n }\n coordinates.length = i;\n return coordinates;\n}\n\n/**\n * @param {Array} flatCoordinates Flat coordinates.\n * @param {number} offset Offset.\n * @param {Array} ends Ends.\n * @param {number} stride Stride.\n * @param {Array>} [coordinatess] Coordinatess.\n * @return {Array>} Coordinatess.\n */\nexport function inflateCoordinatesArray(\n flatCoordinates,\n offset,\n ends,\n stride,\n coordinatess\n) {\n coordinatess = coordinatess !== undefined ? coordinatess : [];\n let i = 0;\n for (let j = 0, jj = ends.length; j < jj; ++j) {\n const end = ends[j];\n coordinatess[i++] = inflateCoordinates(\n flatCoordinates,\n offset,\n end,\n stride,\n coordinatess[i]\n );\n offset = end;\n }\n coordinatess.length = i;\n return coordinatess;\n}\n\n/**\n * @param {Array} flatCoordinates Flat coordinates.\n * @param {number} offset Offset.\n * @param {Array>} endss Endss.\n * @param {number} stride Stride.\n * @param {Array>>} [coordinatesss]\n * Coordinatesss.\n * @return {Array>>} Coordinatesss.\n */\nexport function inflateMultiCoordinatesArray(\n flatCoordinates,\n offset,\n endss,\n stride,\n coordinatesss\n) {\n coordinatesss = coordinatesss !== undefined ? coordinatesss : [];\n let i = 0;\n for (let j = 0, jj = endss.length; j < jj; ++j) {\n const ends = endss[j];\n coordinatesss[i++] =\n ends.length === 1 && ends[0] === offset\n ? []\n : inflateCoordinatesArray(\n flatCoordinates,\n offset,\n ends,\n stride,\n coordinatesss[i]\n );\n offset = ends[ends.length - 1];\n }\n coordinatesss.length = i;\n return coordinatesss;\n}\n","/**\n * @module ol/geom/flat/area\n */\n\n/**\n * @param {Array} flatCoordinates Flat coordinates.\n * @param {number} offset Offset.\n * @param {number} end End.\n * @param {number} stride Stride.\n * @return {number} Area.\n */\nexport function linearRing(flatCoordinates, offset, end, stride) {\n let twiceArea = 0;\n let x1 = flatCoordinates[end - stride];\n let y1 = flatCoordinates[end - stride + 1];\n for (; offset < end; offset += stride) {\n const x2 = flatCoordinates[offset];\n const y2 = flatCoordinates[offset + 1];\n twiceArea += y1 * x2 - x1 * y2;\n x1 = x2;\n y1 = y2;\n }\n return twiceArea / 2;\n}\n\n/**\n * @param {Array} flatCoordinates Flat coordinates.\n * @param {number} offset Offset.\n * @param {Array} ends Ends.\n * @param {number} stride Stride.\n * @return {number} Area.\n */\nexport function linearRings(flatCoordinates, offset, ends, stride) {\n let area = 0;\n for (let i = 0, ii = ends.length; i < ii; ++i) {\n const end = ends[i];\n area += linearRing(flatCoordinates, offset, end, stride);\n offset = end;\n }\n return area;\n}\n\n/**\n * @param {Array} flatCoordinates Flat coordinates.\n * @param {number} offset Offset.\n * @param {Array>} endss Endss.\n * @param {number} stride Stride.\n * @return {number} Area.\n */\nexport function linearRingss(flatCoordinates, offset, endss, stride) {\n let area = 0;\n for (let i = 0, ii = endss.length; i < ii; ++i) {\n const ends = endss[i];\n area += linearRings(flatCoordinates, offset, ends, stride);\n offset = ends[ends.length - 1];\n }\n return area;\n}\n","/**\n * @module ol/geom/LinearRing\n */\nimport SimpleGeometry from './SimpleGeometry.js';\nimport {assignClosestPoint, maxSquaredDelta} from './flat/closest.js';\nimport {closestSquaredDistanceXY} from '../extent.js';\nimport {deflateCoordinates} from './flat/deflate.js';\nimport {douglasPeucker} from './flat/simplify.js';\nimport {inflateCoordinates} from './flat/inflate.js';\nimport {linearRing as linearRingArea} from './flat/area.js';\n\n/**\n * @classdesc\n * Linear ring geometry. Only used as part of polygon; cannot be rendered\n * on its own.\n *\n * @api\n */\nclass LinearRing extends SimpleGeometry {\n /**\n * @param {Array|Array} coordinates Coordinates.\n * For internal use, flat coordinates in combination with `layout` are also accepted.\n * @param {import(\"./Geometry.js\").GeometryLayout} [layout] Layout.\n */\n constructor(coordinates, layout) {\n super();\n\n /**\n * @private\n * @type {number}\n */\n this.maxDelta_ = -1;\n\n /**\n * @private\n * @type {number}\n */\n this.maxDeltaRevision_ = -1;\n\n if (layout !== undefined && !Array.isArray(coordinates[0])) {\n this.setFlatCoordinates(\n layout,\n /** @type {Array} */ (coordinates)\n );\n } else {\n this.setCoordinates(\n /** @type {Array} */ (\n coordinates\n ),\n layout\n );\n }\n }\n\n /**\n * Make a complete copy of the geometry.\n * @return {!LinearRing} Clone.\n * @api\n */\n clone() {\n return new LinearRing(this.flatCoordinates.slice(), this.layout);\n }\n\n /**\n * @param {number} x X.\n * @param {number} y Y.\n * @param {import(\"../coordinate.js\").Coordinate} closestPoint Closest point.\n * @param {number} minSquaredDistance Minimum squared distance.\n * @return {number} Minimum squared distance.\n */\n closestPointXY(x, y, closestPoint, minSquaredDistance) {\n if (minSquaredDistance < closestSquaredDistanceXY(this.getExtent(), x, y)) {\n return minSquaredDistance;\n }\n if (this.maxDeltaRevision_ != this.getRevision()) {\n this.maxDelta_ = Math.sqrt(\n maxSquaredDelta(\n this.flatCoordinates,\n 0,\n this.flatCoordinates.length,\n this.stride,\n 0\n )\n );\n this.maxDeltaRevision_ = this.getRevision();\n }\n return assignClosestPoint(\n this.flatCoordinates,\n 0,\n this.flatCoordinates.length,\n this.stride,\n this.maxDelta_,\n true,\n x,\n y,\n closestPoint,\n minSquaredDistance\n );\n }\n\n /**\n * Return the area of the linear ring on projected plane.\n * @return {number} Area (on projected plane).\n * @api\n */\n getArea() {\n return linearRingArea(\n this.flatCoordinates,\n 0,\n this.flatCoordinates.length,\n this.stride\n );\n }\n\n /**\n * Return the coordinates of the linear ring.\n * @return {Array} Coordinates.\n * @api\n */\n getCoordinates() {\n return inflateCoordinates(\n this.flatCoordinates,\n 0,\n this.flatCoordinates.length,\n this.stride\n );\n }\n\n /**\n * @param {number} squaredTolerance Squared tolerance.\n * @return {LinearRing} Simplified LinearRing.\n * @protected\n */\n getSimplifiedGeometryInternal(squaredTolerance) {\n const simplifiedFlatCoordinates = [];\n simplifiedFlatCoordinates.length = douglasPeucker(\n this.flatCoordinates,\n 0,\n this.flatCoordinates.length,\n this.stride,\n squaredTolerance,\n simplifiedFlatCoordinates,\n 0\n );\n return new LinearRing(simplifiedFlatCoordinates, 'XY');\n }\n\n /**\n * Get the type of this geometry.\n * @return {import(\"./Geometry.js\").Type} Geometry type.\n * @api\n */\n getType() {\n return 'LinearRing';\n }\n\n /**\n * Test if the geometry and the passed extent intersect.\n * @param {import(\"../extent.js\").Extent} extent Extent.\n * @return {boolean} `true` if the geometry and the extent intersect.\n * @api\n */\n intersectsExtent(extent) {\n return false;\n }\n\n /**\n * Set the coordinates of the linear ring.\n * @param {!Array} coordinates Coordinates.\n * @param {import(\"./Geometry.js\").GeometryLayout} [layout] Layout.\n * @api\n */\n setCoordinates(coordinates, layout) {\n this.setLayout(layout, coordinates, 1);\n if (!this.flatCoordinates) {\n this.flatCoordinates = [];\n }\n this.flatCoordinates.length = deflateCoordinates(\n this.flatCoordinates,\n 0,\n coordinates,\n this.stride\n );\n this.changed();\n }\n}\n\nexport default LinearRing;\n","/**\n * @module ol/geom/Point\n */\nimport SimpleGeometry from './SimpleGeometry.js';\nimport {containsXY, createOrUpdateFromCoordinate} from '../extent.js';\nimport {deflateCoordinate} from './flat/deflate.js';\nimport {squaredDistance as squaredDx} from '../math.js';\n\n/**\n * @classdesc\n * Point geometry.\n *\n * @api\n */\nclass Point extends SimpleGeometry {\n /**\n * @param {import(\"../coordinate.js\").Coordinate} coordinates Coordinates.\n * @param {import(\"./Geometry.js\").GeometryLayout} [layout] Layout.\n */\n constructor(coordinates, layout) {\n super();\n this.setCoordinates(coordinates, layout);\n }\n\n /**\n * Make a complete copy of the geometry.\n * @return {!Point} Clone.\n * @api\n */\n clone() {\n const point = new Point(this.flatCoordinates.slice(), this.layout);\n point.applyProperties(this);\n return point;\n }\n\n /**\n * @param {number} x X.\n * @param {number} y Y.\n * @param {import(\"../coordinate.js\").Coordinate} closestPoint Closest point.\n * @param {number} minSquaredDistance Minimum squared distance.\n * @return {number} Minimum squared distance.\n */\n closestPointXY(x, y, closestPoint, minSquaredDistance) {\n const flatCoordinates = this.flatCoordinates;\n const squaredDistance = squaredDx(\n x,\n y,\n flatCoordinates[0],\n flatCoordinates[1]\n );\n if (squaredDistance < minSquaredDistance) {\n const stride = this.stride;\n for (let i = 0; i < stride; ++i) {\n closestPoint[i] = flatCoordinates[i];\n }\n closestPoint.length = stride;\n return squaredDistance;\n }\n return minSquaredDistance;\n }\n\n /**\n * Return the coordinate of the point.\n * @return {import(\"../coordinate.js\").Coordinate} Coordinates.\n * @api\n */\n getCoordinates() {\n return !this.flatCoordinates ? [] : this.flatCoordinates.slice();\n }\n\n /**\n * @param {import(\"../extent.js\").Extent} extent Extent.\n * @protected\n * @return {import(\"../extent.js\").Extent} extent Extent.\n */\n computeExtent(extent) {\n return createOrUpdateFromCoordinate(this.flatCoordinates, extent);\n }\n\n /**\n * Get the type of this geometry.\n * @return {import(\"./Geometry.js\").Type} Geometry type.\n * @api\n */\n getType() {\n return 'Point';\n }\n\n /**\n * Test if the geometry and the passed extent intersect.\n * @param {import(\"../extent.js\").Extent} extent Extent.\n * @return {boolean} `true` if the geometry and the extent intersect.\n * @api\n */\n intersectsExtent(extent) {\n return containsXY(extent, this.flatCoordinates[0], this.flatCoordinates[1]);\n }\n\n /**\n * @param {!Array<*>} coordinates Coordinates.\n * @param {import(\"./Geometry.js\").GeometryLayout} [layout] Layout.\n * @api\n */\n setCoordinates(coordinates, layout) {\n this.setLayout(layout, coordinates, 0);\n if (!this.flatCoordinates) {\n this.flatCoordinates = [];\n }\n this.flatCoordinates.length = deflateCoordinate(\n this.flatCoordinates,\n 0,\n coordinates,\n this.stride\n );\n this.changed();\n }\n}\n\nexport default Point;\n","/**\n * @module ol/geom/flat/contains\n */\nimport {forEachCorner} from '../../extent.js';\n\n/**\n * @param {Array} flatCoordinates Flat coordinates.\n * @param {number} offset Offset.\n * @param {number} end End.\n * @param {number} stride Stride.\n * @param {import(\"../../extent.js\").Extent} extent Extent.\n * @return {boolean} Contains extent.\n */\nexport function linearRingContainsExtent(\n flatCoordinates,\n offset,\n end,\n stride,\n extent\n) {\n const outside = forEachCorner(\n extent,\n /**\n * @param {import(\"../../coordinate.js\").Coordinate} coordinate Coordinate.\n * @return {boolean} Contains (x, y).\n */\n function (coordinate) {\n return !linearRingContainsXY(\n flatCoordinates,\n offset,\n end,\n stride,\n coordinate[0],\n coordinate[1]\n );\n }\n );\n return !outside;\n}\n\n/**\n * @param {Array} flatCoordinates Flat coordinates.\n * @param {number} offset Offset.\n * @param {number} end End.\n * @param {number} stride Stride.\n * @param {number} x X.\n * @param {number} y Y.\n * @return {boolean} Contains (x, y).\n */\nexport function linearRingContainsXY(\n flatCoordinates,\n offset,\n end,\n stride,\n x,\n y\n) {\n // https://geomalgorithms.com/a03-_inclusion.html\n // Copyright 2000 softSurfer, 2012 Dan Sunday\n // This code may be freely used and modified for any purpose\n // providing that this copyright notice is included with it.\n // SoftSurfer makes no warranty for this code, and cannot be held\n // liable for any real or imagined damage resulting from its use.\n // Users of this code must verify correctness for their application.\n let wn = 0;\n let x1 = flatCoordinates[end - stride];\n let y1 = flatCoordinates[end - stride + 1];\n for (; offset < end; offset += stride) {\n const x2 = flatCoordinates[offset];\n const y2 = flatCoordinates[offset + 1];\n if (y1 <= y) {\n if (y2 > y && (x2 - x1) * (y - y1) - (x - x1) * (y2 - y1) > 0) {\n wn++;\n }\n } else if (y2 <= y && (x2 - x1) * (y - y1) - (x - x1) * (y2 - y1) < 0) {\n wn--;\n }\n x1 = x2;\n y1 = y2;\n }\n return wn !== 0;\n}\n\n/**\n * @param {Array} flatCoordinates Flat coordinates.\n * @param {number} offset Offset.\n * @param {Array} ends Ends.\n * @param {number} stride Stride.\n * @param {number} x X.\n * @param {number} y Y.\n * @return {boolean} Contains (x, y).\n */\nexport function linearRingsContainsXY(\n flatCoordinates,\n offset,\n ends,\n stride,\n x,\n y\n) {\n if (ends.length === 0) {\n return false;\n }\n if (!linearRingContainsXY(flatCoordinates, offset, ends[0], stride, x, y)) {\n return false;\n }\n for (let i = 1, ii = ends.length; i < ii; ++i) {\n if (\n linearRingContainsXY(flatCoordinates, ends[i - 1], ends[i], stride, x, y)\n ) {\n return false;\n }\n }\n return true;\n}\n\n/**\n * @param {Array} flatCoordinates Flat coordinates.\n * @param {number} offset Offset.\n * @param {Array>} endss Endss.\n * @param {number} stride Stride.\n * @param {number} x X.\n * @param {number} y Y.\n * @return {boolean} Contains (x, y).\n */\nexport function linearRingssContainsXY(\n flatCoordinates,\n offset,\n endss,\n stride,\n x,\n y\n) {\n if (endss.length === 0) {\n return false;\n }\n for (let i = 0, ii = endss.length; i < ii; ++i) {\n const ends = endss[i];\n if (linearRingsContainsXY(flatCoordinates, offset, ends, stride, x, y)) {\n return true;\n }\n offset = ends[ends.length - 1];\n }\n return false;\n}\n","/**\n * @module ol/geom/flat/interiorpoint\n */\nimport {ascending} from '../../array.js';\nimport {linearRingsContainsXY} from './contains.js';\n\n/**\n * Calculates a point that is likely to lie in the interior of the linear rings.\n * Inspired by JTS's com.vividsolutions.jts.geom.Geometry#getInteriorPoint.\n * @param {Array} flatCoordinates Flat coordinates.\n * @param {number} offset Offset.\n * @param {Array} ends Ends.\n * @param {number} stride Stride.\n * @param {Array} flatCenters Flat centers.\n * @param {number} flatCentersOffset Flat center offset.\n * @param {Array} [dest] Destination.\n * @return {Array} Destination point as XYM coordinate, where M is the\n * length of the horizontal intersection that the point belongs to.\n */\nexport function getInteriorPointOfArray(\n flatCoordinates,\n offset,\n ends,\n stride,\n flatCenters,\n flatCentersOffset,\n dest\n) {\n let i, ii, x, x1, x2, y1, y2;\n const y = flatCenters[flatCentersOffset + 1];\n /** @type {Array} */\n const intersections = [];\n // Calculate intersections with the horizontal line\n for (let r = 0, rr = ends.length; r < rr; ++r) {\n const end = ends[r];\n x1 = flatCoordinates[end - stride];\n y1 = flatCoordinates[end - stride + 1];\n for (i = offset; i < end; i += stride) {\n x2 = flatCoordinates[i];\n y2 = flatCoordinates[i + 1];\n if ((y <= y1 && y2 <= y) || (y1 <= y && y <= y2)) {\n x = ((y - y1) / (y2 - y1)) * (x2 - x1) + x1;\n intersections.push(x);\n }\n x1 = x2;\n y1 = y2;\n }\n }\n // Find the longest segment of the horizontal line that has its center point\n // inside the linear ring.\n let pointX = NaN;\n let maxSegmentLength = -Infinity;\n intersections.sort(ascending);\n x1 = intersections[0];\n for (i = 1, ii = intersections.length; i < ii; ++i) {\n x2 = intersections[i];\n const segmentLength = Math.abs(x2 - x1);\n if (segmentLength > maxSegmentLength) {\n x = (x1 + x2) / 2;\n if (linearRingsContainsXY(flatCoordinates, offset, ends, stride, x, y)) {\n pointX = x;\n maxSegmentLength = segmentLength;\n }\n }\n x1 = x2;\n }\n if (isNaN(pointX)) {\n // There is no horizontal line that has its center point inside the linear\n // ring. Use the center of the the linear ring's extent.\n pointX = flatCenters[flatCentersOffset];\n }\n if (dest) {\n dest.push(pointX, y, maxSegmentLength);\n return dest;\n }\n return [pointX, y, maxSegmentLength];\n}\n\n/**\n * @param {Array} flatCoordinates Flat coordinates.\n * @param {number} offset Offset.\n * @param {Array>} endss Endss.\n * @param {number} stride Stride.\n * @param {Array} flatCenters Flat centers.\n * @return {Array} Interior points as XYM coordinates, where M is the\n * length of the horizontal intersection that the point belongs to.\n */\nexport function getInteriorPointsOfMultiArray(\n flatCoordinates,\n offset,\n endss,\n stride,\n flatCenters\n) {\n let interiorPoints = [];\n for (let i = 0, ii = endss.length; i < ii; ++i) {\n const ends = endss[i];\n interiorPoints = getInteriorPointOfArray(\n flatCoordinates,\n offset,\n ends,\n stride,\n flatCenters,\n 2 * i,\n interiorPoints\n );\n offset = ends[ends.length - 1];\n }\n return interiorPoints;\n}\n","/**\n * @module ol/geom/flat/segments\n */\n\n/**\n * This function calls `callback` for each segment of the flat coordinates\n * array. If the callback returns a truthy value the function returns that\n * value immediately. Otherwise the function returns `false`.\n * @param {Array} flatCoordinates Flat coordinates.\n * @param {number} offset Offset.\n * @param {number} end End.\n * @param {number} stride Stride.\n * @param {function(import(\"../../coordinate.js\").Coordinate, import(\"../../coordinate.js\").Coordinate): T} callback Function\n * called for each segment.\n * @return {T|boolean} Value.\n * @template T\n */\nexport function forEach(flatCoordinates, offset, end, stride, callback) {\n let ret;\n offset += stride;\n for (; offset < end; offset += stride) {\n ret = callback(\n flatCoordinates.slice(offset - stride, offset),\n flatCoordinates.slice(offset, offset + stride)\n );\n if (ret) {\n return ret;\n }\n }\n return false;\n}\n","/**\n * @module ol/geom/flat/intersectsextent\n */\nimport {\n containsExtent,\n createEmpty,\n extendFlatCoordinates,\n intersects,\n intersectsSegment,\n} from '../../extent.js';\nimport {forEach as forEachSegment} from './segments.js';\nimport {linearRingContainsExtent, linearRingContainsXY} from './contains.js';\n\n/**\n * @param {Array} flatCoordinates Flat coordinates.\n * @param {number} offset Offset.\n * @param {number} end End.\n * @param {number} stride Stride.\n * @param {import(\"../../extent.js\").Extent} extent Extent.\n * @return {boolean} True if the geometry and the extent intersect.\n */\nexport function intersectsLineString(\n flatCoordinates,\n offset,\n end,\n stride,\n extent\n) {\n const coordinatesExtent = extendFlatCoordinates(\n createEmpty(),\n flatCoordinates,\n offset,\n end,\n stride\n );\n if (!intersects(extent, coordinatesExtent)) {\n return false;\n }\n if (containsExtent(extent, coordinatesExtent)) {\n return true;\n }\n if (coordinatesExtent[0] >= extent[0] && coordinatesExtent[2] <= extent[2]) {\n return true;\n }\n if (coordinatesExtent[1] >= extent[1] && coordinatesExtent[3] <= extent[3]) {\n return true;\n }\n return forEachSegment(\n flatCoordinates,\n offset,\n end,\n stride,\n /**\n * @param {import(\"../../coordinate.js\").Coordinate} point1 Start point.\n * @param {import(\"../../coordinate.js\").Coordinate} point2 End point.\n * @return {boolean} `true` if the segment and the extent intersect,\n * `false` otherwise.\n */\n function (point1, point2) {\n return intersectsSegment(extent, point1, point2);\n }\n );\n}\n\n/**\n * @param {Array} flatCoordinates Flat coordinates.\n * @param {number} offset Offset.\n * @param {Array} ends Ends.\n * @param {number} stride Stride.\n * @param {import(\"../../extent.js\").Extent} extent Extent.\n * @return {boolean} True if the geometry and the extent intersect.\n */\nexport function intersectsLineStringArray(\n flatCoordinates,\n offset,\n ends,\n stride,\n extent\n) {\n for (let i = 0, ii = ends.length; i < ii; ++i) {\n if (\n intersectsLineString(flatCoordinates, offset, ends[i], stride, extent)\n ) {\n return true;\n }\n offset = ends[i];\n }\n return false;\n}\n\n/**\n * @param {Array} flatCoordinates Flat coordinates.\n * @param {number} offset Offset.\n * @param {number} end End.\n * @param {number} stride Stride.\n * @param {import(\"../../extent.js\").Extent} extent Extent.\n * @return {boolean} True if the geometry and the extent intersect.\n */\nexport function intersectsLinearRing(\n flatCoordinates,\n offset,\n end,\n stride,\n extent\n) {\n if (intersectsLineString(flatCoordinates, offset, end, stride, extent)) {\n return true;\n }\n if (\n linearRingContainsXY(\n flatCoordinates,\n offset,\n end,\n stride,\n extent[0],\n extent[1]\n )\n ) {\n return true;\n }\n if (\n linearRingContainsXY(\n flatCoordinates,\n offset,\n end,\n stride,\n extent[0],\n extent[3]\n )\n ) {\n return true;\n }\n if (\n linearRingContainsXY(\n flatCoordinates,\n offset,\n end,\n stride,\n extent[2],\n extent[1]\n )\n ) {\n return true;\n }\n if (\n linearRingContainsXY(\n flatCoordinates,\n offset,\n end,\n stride,\n extent[2],\n extent[3]\n )\n ) {\n return true;\n }\n return false;\n}\n\n/**\n * @param {Array} flatCoordinates Flat coordinates.\n * @param {number} offset Offset.\n * @param {Array} ends Ends.\n * @param {number} stride Stride.\n * @param {import(\"../../extent.js\").Extent} extent Extent.\n * @return {boolean} True if the geometry and the extent intersect.\n */\nexport function intersectsLinearRingArray(\n flatCoordinates,\n offset,\n ends,\n stride,\n extent\n) {\n if (!intersectsLinearRing(flatCoordinates, offset, ends[0], stride, extent)) {\n return false;\n }\n if (ends.length === 1) {\n return true;\n }\n for (let i = 1, ii = ends.length; i < ii; ++i) {\n if (\n linearRingContainsExtent(\n flatCoordinates,\n ends[i - 1],\n ends[i],\n stride,\n extent\n )\n ) {\n if (\n !intersectsLineString(\n flatCoordinates,\n ends[i - 1],\n ends[i],\n stride,\n extent\n )\n ) {\n return false;\n }\n }\n }\n return true;\n}\n\n/**\n * @param {Array} flatCoordinates Flat coordinates.\n * @param {number} offset Offset.\n * @param {Array>} endss Endss.\n * @param {number} stride Stride.\n * @param {import(\"../../extent.js\").Extent} extent Extent.\n * @return {boolean} True if the geometry and the extent intersect.\n */\nexport function intersectsLinearRingMultiArray(\n flatCoordinates,\n offset,\n endss,\n stride,\n extent\n) {\n for (let i = 0, ii = endss.length; i < ii; ++i) {\n const ends = endss[i];\n if (\n intersectsLinearRingArray(flatCoordinates, offset, ends, stride, extent)\n ) {\n return true;\n }\n offset = ends[ends.length - 1];\n }\n return false;\n}\n","/**\n * @module ol/geom/flat/reverse\n */\n\n/**\n * @param {Array} flatCoordinates Flat coordinates.\n * @param {number} offset Offset.\n * @param {number} end End.\n * @param {number} stride Stride.\n */\nexport function coordinates(flatCoordinates, offset, end, stride) {\n while (offset < end - stride) {\n for (let i = 0; i < stride; ++i) {\n const tmp = flatCoordinates[offset + i];\n flatCoordinates[offset + i] = flatCoordinates[end - stride + i];\n flatCoordinates[end - stride + i] = tmp;\n }\n offset += stride;\n end -= stride;\n }\n}\n","/**\n * @module ol/geom/flat/orient\n */\nimport {coordinates as reverseCoordinates} from './reverse.js';\n\n/**\n * Is the linear ring oriented clockwise in a coordinate system with a bottom-left\n * coordinate origin? For a coordinate system with a top-left coordinate origin,\n * the ring's orientation is clockwise when this function returns false.\n * @param {Array} flatCoordinates Flat coordinates.\n * @param {number} offset Offset.\n * @param {number} end End.\n * @param {number} stride Stride.\n * @return {boolean} Is clockwise.\n */\nexport function linearRingIsClockwise(flatCoordinates, offset, end, stride) {\n // https://stackoverflow.com/q/1165647/clockwise-method#1165943\n // https://github.com/OSGeo/gdal/blob/master/gdal/ogr/ogrlinearring.cpp\n let edge = 0;\n let x1 = flatCoordinates[end - stride];\n let y1 = flatCoordinates[end - stride + 1];\n for (; offset < end; offset += stride) {\n const x2 = flatCoordinates[offset];\n const y2 = flatCoordinates[offset + 1];\n edge += (x2 - x1) * (y2 + y1);\n x1 = x2;\n y1 = y2;\n }\n return edge === 0 ? undefined : edge > 0;\n}\n\n/**\n * Determines if linear rings are oriented. By default, left-hand orientation\n * is tested (first ring must be clockwise, remaining rings counter-clockwise).\n * To test for right-hand orientation, use the `right` argument.\n *\n * @param {Array} flatCoordinates Flat coordinates.\n * @param {number} offset Offset.\n * @param {Array} ends Array of end indexes.\n * @param {number} stride Stride.\n * @param {boolean} [right] Test for right-hand orientation\n * (counter-clockwise exterior ring and clockwise interior rings).\n * @return {boolean} Rings are correctly oriented.\n */\nexport function linearRingsAreOriented(\n flatCoordinates,\n offset,\n ends,\n stride,\n right\n) {\n right = right !== undefined ? right : false;\n for (let i = 0, ii = ends.length; i < ii; ++i) {\n const end = ends[i];\n const isClockwise = linearRingIsClockwise(\n flatCoordinates,\n offset,\n end,\n stride\n );\n if (i === 0) {\n if ((right && isClockwise) || (!right && !isClockwise)) {\n return false;\n }\n } else {\n if ((right && !isClockwise) || (!right && isClockwise)) {\n return false;\n }\n }\n offset = end;\n }\n return true;\n}\n\n/**\n * Determines if linear rings are oriented. By default, left-hand orientation\n * is tested (first ring must be clockwise, remaining rings counter-clockwise).\n * To test for right-hand orientation, use the `right` argument.\n *\n * @param {Array} flatCoordinates Flat coordinates.\n * @param {number} offset Offset.\n * @param {Array>} endss Array of array of end indexes.\n * @param {number} stride Stride.\n * @param {boolean} [right] Test for right-hand orientation\n * (counter-clockwise exterior ring and clockwise interior rings).\n * @return {boolean} Rings are correctly oriented.\n */\nexport function linearRingssAreOriented(\n flatCoordinates,\n offset,\n endss,\n stride,\n right\n) {\n for (let i = 0, ii = endss.length; i < ii; ++i) {\n const ends = endss[i];\n if (!linearRingsAreOriented(flatCoordinates, offset, ends, stride, right)) {\n return false;\n }\n if (ends.length) {\n offset = ends[ends.length - 1];\n }\n }\n return true;\n}\n\n/**\n * Orient coordinates in a flat array of linear rings. By default, rings\n * are oriented following the left-hand rule (clockwise for exterior and\n * counter-clockwise for interior rings). To orient according to the\n * right-hand rule, use the `right` argument.\n *\n * @param {Array} flatCoordinates Flat coordinates.\n * @param {number} offset Offset.\n * @param {Array} ends Ends.\n * @param {number} stride Stride.\n * @param {boolean} [right] Follow the right-hand rule for orientation.\n * @return {number} End.\n */\nexport function orientLinearRings(\n flatCoordinates,\n offset,\n ends,\n stride,\n right\n) {\n right = right !== undefined ? right : false;\n for (let i = 0, ii = ends.length; i < ii; ++i) {\n const end = ends[i];\n const isClockwise = linearRingIsClockwise(\n flatCoordinates,\n offset,\n end,\n stride\n );\n const reverse =\n i === 0\n ? (right && isClockwise) || (!right && !isClockwise)\n : (right && !isClockwise) || (!right && isClockwise);\n if (reverse) {\n reverseCoordinates(flatCoordinates, offset, end, stride);\n }\n offset = end;\n }\n return offset;\n}\n\n/**\n * Orient coordinates in a flat array of linear rings. By default, rings\n * are oriented following the left-hand rule (clockwise for exterior and\n * counter-clockwise for interior rings). To orient according to the\n * right-hand rule, use the `right` argument.\n *\n * @param {Array} flatCoordinates Flat coordinates.\n * @param {number} offset Offset.\n * @param {Array>} endss Array of array of end indexes.\n * @param {number} stride Stride.\n * @param {boolean} [right] Follow the right-hand rule for orientation.\n * @return {number} End.\n */\nexport function orientLinearRingsArray(\n flatCoordinates,\n offset,\n endss,\n stride,\n right\n) {\n for (let i = 0, ii = endss.length; i < ii; ++i) {\n offset = orientLinearRings(\n flatCoordinates,\n offset,\n endss[i],\n stride,\n right\n );\n }\n return offset;\n}\n\n/**\n * Return a two-dimensional endss\n * @param {Array} flatCoordinates Flat coordinates\n * @param {Array} ends Linear ring end indexes\n * @return {Array>} Two dimensional endss array that can\n * be used to contruct a MultiPolygon\n */\nexport function inflateEnds(flatCoordinates, ends) {\n const endss = [];\n let offset = 0;\n let prevEndIndex = 0;\n for (let i = 0, ii = ends.length; i < ii; ++i) {\n const end = ends[i];\n // classifies an array of rings into polygons with outer rings and holes\n if (!linearRingIsClockwise(flatCoordinates, offset, end, 2)) {\n endss.push(ends.slice(prevEndIndex, i + 1));\n } else {\n if (endss.length === 0) {\n continue;\n }\n endss[endss.length - 1].push(ends[prevEndIndex]);\n }\n prevEndIndex = i + 1;\n offset = end;\n }\n return endss;\n}\n","/**\n * @module ol/geom/Polygon\n */\nimport LinearRing from './LinearRing.js';\nimport Point from './Point.js';\nimport SimpleGeometry from './SimpleGeometry.js';\nimport {arrayMaxSquaredDelta, assignClosestArrayPoint} from './flat/closest.js';\nimport {closestSquaredDistanceXY, getCenter} from '../extent.js';\nimport {deflateCoordinatesArray} from './flat/deflate.js';\nimport {extend} from '../array.js';\nimport {getInteriorPointOfArray} from './flat/interiorpoint.js';\nimport {inflateCoordinatesArray} from './flat/inflate.js';\nimport {intersectsLinearRingArray} from './flat/intersectsextent.js';\nimport {linearRingsAreOriented, orientLinearRings} from './flat/orient.js';\nimport {linearRings as linearRingsArea} from './flat/area.js';\nimport {linearRingsContainsXY} from './flat/contains.js';\nimport {modulo} from '../math.js';\nimport {quantizeArray} from './flat/simplify.js';\nimport {offset as sphereOffset} from '../sphere.js';\n\n/**\n * @classdesc\n * Polygon geometry.\n *\n * @api\n */\nclass Polygon extends SimpleGeometry {\n /**\n * @param {!Array>|!Array} coordinates\n * Array of linear rings that define the polygon. The first linear ring of the\n * array defines the outer-boundary or surface of the polygon. Each subsequent\n * linear ring defines a hole in the surface of the polygon. A linear ring is\n * an array of vertices' coordinates where the first coordinate and the last are\n * equivalent. (For internal use, flat coordinates in combination with\n * `layout` and `ends` are also accepted.)\n * @param {import(\"./Geometry.js\").GeometryLayout} [layout] Layout.\n * @param {Array} [ends] Ends (for internal use with flat coordinates).\n */\n constructor(coordinates, layout, ends) {\n super();\n\n /**\n * @type {Array}\n * @private\n */\n this.ends_ = [];\n\n /**\n * @private\n * @type {number}\n */\n this.flatInteriorPointRevision_ = -1;\n\n /**\n * @private\n * @type {import(\"../coordinate.js\").Coordinate}\n */\n this.flatInteriorPoint_ = null;\n\n /**\n * @private\n * @type {number}\n */\n this.maxDelta_ = -1;\n\n /**\n * @private\n * @type {number}\n */\n this.maxDeltaRevision_ = -1;\n\n /**\n * @private\n * @type {number}\n */\n this.orientedRevision_ = -1;\n\n /**\n * @private\n * @type {Array}\n */\n this.orientedFlatCoordinates_ = null;\n\n if (layout !== undefined && ends) {\n this.setFlatCoordinates(\n layout,\n /** @type {Array} */ (coordinates)\n );\n this.ends_ = ends;\n } else {\n this.setCoordinates(\n /** @type {Array>} */ (\n coordinates\n ),\n layout\n );\n }\n }\n\n /**\n * Append the passed linear ring to this polygon.\n * @param {LinearRing} linearRing Linear ring.\n * @api\n */\n appendLinearRing(linearRing) {\n if (!this.flatCoordinates) {\n this.flatCoordinates = linearRing.getFlatCoordinates().slice();\n } else {\n extend(this.flatCoordinates, linearRing.getFlatCoordinates());\n }\n this.ends_.push(this.flatCoordinates.length);\n this.changed();\n }\n\n /**\n * Make a complete copy of the geometry.\n * @return {!Polygon} Clone.\n * @api\n */\n clone() {\n const polygon = new Polygon(\n this.flatCoordinates.slice(),\n this.layout,\n this.ends_.slice()\n );\n polygon.applyProperties(this);\n return polygon;\n }\n\n /**\n * @param {number} x X.\n * @param {number} y Y.\n * @param {import(\"../coordinate.js\").Coordinate} closestPoint Closest point.\n * @param {number} minSquaredDistance Minimum squared distance.\n * @return {number} Minimum squared distance.\n */\n closestPointXY(x, y, closestPoint, minSquaredDistance) {\n if (minSquaredDistance < closestSquaredDistanceXY(this.getExtent(), x, y)) {\n return minSquaredDistance;\n }\n if (this.maxDeltaRevision_ != this.getRevision()) {\n this.maxDelta_ = Math.sqrt(\n arrayMaxSquaredDelta(\n this.flatCoordinates,\n 0,\n this.ends_,\n this.stride,\n 0\n )\n );\n this.maxDeltaRevision_ = this.getRevision();\n }\n return assignClosestArrayPoint(\n this.flatCoordinates,\n 0,\n this.ends_,\n this.stride,\n this.maxDelta_,\n true,\n x,\n y,\n closestPoint,\n minSquaredDistance\n );\n }\n\n /**\n * @param {number} x X.\n * @param {number} y Y.\n * @return {boolean} Contains (x, y).\n */\n containsXY(x, y) {\n return linearRingsContainsXY(\n this.getOrientedFlatCoordinates(),\n 0,\n this.ends_,\n this.stride,\n x,\n y\n );\n }\n\n /**\n * Return the area of the polygon on projected plane.\n * @return {number} Area (on projected plane).\n * @api\n */\n getArea() {\n return linearRingsArea(\n this.getOrientedFlatCoordinates(),\n 0,\n this.ends_,\n this.stride\n );\n }\n\n /**\n * Get the coordinate array for this geometry. This array has the structure\n * of a GeoJSON coordinate array for polygons.\n *\n * @param {boolean} [right] Orient coordinates according to the right-hand\n * rule (counter-clockwise for exterior and clockwise for interior rings).\n * If `false`, coordinates will be oriented according to the left-hand rule\n * (clockwise for exterior and counter-clockwise for interior rings).\n * By default, coordinate orientation will depend on how the geometry was\n * constructed.\n * @return {Array>} Coordinates.\n * @api\n */\n getCoordinates(right) {\n let flatCoordinates;\n if (right !== undefined) {\n flatCoordinates = this.getOrientedFlatCoordinates().slice();\n orientLinearRings(flatCoordinates, 0, this.ends_, this.stride, right);\n } else {\n flatCoordinates = this.flatCoordinates;\n }\n\n return inflateCoordinatesArray(flatCoordinates, 0, this.ends_, this.stride);\n }\n\n /**\n * @return {Array} Ends.\n */\n getEnds() {\n return this.ends_;\n }\n\n /**\n * @return {Array} Interior point.\n */\n getFlatInteriorPoint() {\n if (this.flatInteriorPointRevision_ != this.getRevision()) {\n const flatCenter = getCenter(this.getExtent());\n this.flatInteriorPoint_ = getInteriorPointOfArray(\n this.getOrientedFlatCoordinates(),\n 0,\n this.ends_,\n this.stride,\n flatCenter,\n 0\n );\n this.flatInteriorPointRevision_ = this.getRevision();\n }\n return this.flatInteriorPoint_;\n }\n\n /**\n * Return an interior point of the polygon.\n * @return {Point} Interior point as XYM coordinate, where M is the\n * length of the horizontal intersection that the point belongs to.\n * @api\n */\n getInteriorPoint() {\n return new Point(this.getFlatInteriorPoint(), 'XYM');\n }\n\n /**\n * Return the number of rings of the polygon, this includes the exterior\n * ring and any interior rings.\n *\n * @return {number} Number of rings.\n * @api\n */\n getLinearRingCount() {\n return this.ends_.length;\n }\n\n /**\n * Return the Nth linear ring of the polygon geometry. Return `null` if the\n * given index is out of range.\n * The exterior linear ring is available at index `0` and the interior rings\n * at index `1` and beyond.\n *\n * @param {number} index Index.\n * @return {LinearRing|null} Linear ring.\n * @api\n */\n getLinearRing(index) {\n if (index < 0 || this.ends_.length <= index) {\n return null;\n }\n return new LinearRing(\n this.flatCoordinates.slice(\n index === 0 ? 0 : this.ends_[index - 1],\n this.ends_[index]\n ),\n this.layout\n );\n }\n\n /**\n * Return the linear rings of the polygon.\n * @return {Array} Linear rings.\n * @api\n */\n getLinearRings() {\n const layout = this.layout;\n const flatCoordinates = this.flatCoordinates;\n const ends = this.ends_;\n const linearRings = [];\n let offset = 0;\n for (let i = 0, ii = ends.length; i < ii; ++i) {\n const end = ends[i];\n const linearRing = new LinearRing(\n flatCoordinates.slice(offset, end),\n layout\n );\n linearRings.push(linearRing);\n offset = end;\n }\n return linearRings;\n }\n\n /**\n * @return {Array} Oriented flat coordinates.\n */\n getOrientedFlatCoordinates() {\n if (this.orientedRevision_ != this.getRevision()) {\n const flatCoordinates = this.flatCoordinates;\n if (linearRingsAreOriented(flatCoordinates, 0, this.ends_, this.stride)) {\n this.orientedFlatCoordinates_ = flatCoordinates;\n } else {\n this.orientedFlatCoordinates_ = flatCoordinates.slice();\n this.orientedFlatCoordinates_.length = orientLinearRings(\n this.orientedFlatCoordinates_,\n 0,\n this.ends_,\n this.stride\n );\n }\n this.orientedRevision_ = this.getRevision();\n }\n return this.orientedFlatCoordinates_;\n }\n\n /**\n * @param {number} squaredTolerance Squared tolerance.\n * @return {Polygon} Simplified Polygon.\n * @protected\n */\n getSimplifiedGeometryInternal(squaredTolerance) {\n const simplifiedFlatCoordinates = [];\n const simplifiedEnds = [];\n simplifiedFlatCoordinates.length = quantizeArray(\n this.flatCoordinates,\n 0,\n this.ends_,\n this.stride,\n Math.sqrt(squaredTolerance),\n simplifiedFlatCoordinates,\n 0,\n simplifiedEnds\n );\n return new Polygon(simplifiedFlatCoordinates, 'XY', simplifiedEnds);\n }\n\n /**\n * Get the type of this geometry.\n * @return {import(\"./Geometry.js\").Type} Geometry type.\n * @api\n */\n getType() {\n return 'Polygon';\n }\n\n /**\n * Test if the geometry and the passed extent intersect.\n * @param {import(\"../extent.js\").Extent} extent Extent.\n * @return {boolean} `true` if the geometry and the extent intersect.\n * @api\n */\n intersectsExtent(extent) {\n return intersectsLinearRingArray(\n this.getOrientedFlatCoordinates(),\n 0,\n this.ends_,\n this.stride,\n extent\n );\n }\n\n /**\n * Set the coordinates of the polygon.\n * @param {!Array>} coordinates Coordinates.\n * @param {import(\"./Geometry.js\").GeometryLayout} [layout] Layout.\n * @api\n */\n setCoordinates(coordinates, layout) {\n this.setLayout(layout, coordinates, 2);\n if (!this.flatCoordinates) {\n this.flatCoordinates = [];\n }\n const ends = deflateCoordinatesArray(\n this.flatCoordinates,\n 0,\n coordinates,\n this.stride,\n this.ends_\n );\n this.flatCoordinates.length = ends.length === 0 ? 0 : ends[ends.length - 1];\n this.changed();\n }\n}\n\nexport default Polygon;\n\n/**\n * Create an approximation of a circle on the surface of a sphere.\n * @param {import(\"../coordinate.js\").Coordinate} center Center (`[lon, lat]` in degrees).\n * @param {number} radius The great-circle distance from the center to\n * the polygon vertices in meters.\n * @param {number} [n] Optional number of vertices for the resulting\n * polygon. Default is `32`.\n * @param {number} [sphereRadius] Optional radius for the sphere (defaults to\n * the Earth's mean radius using the WGS84 ellipsoid).\n * @return {Polygon} The \"circular\" polygon.\n * @api\n */\nexport function circular(center, radius, n, sphereRadius) {\n n = n ? n : 32;\n /** @type {Array} */\n const flatCoordinates = [];\n for (let i = 0; i < n; ++i) {\n extend(\n flatCoordinates,\n sphereOffset(center, radius, (2 * Math.PI * i) / n, sphereRadius)\n );\n }\n flatCoordinates.push(flatCoordinates[0], flatCoordinates[1]);\n return new Polygon(flatCoordinates, 'XY', [flatCoordinates.length]);\n}\n\n/**\n * Create a polygon from an extent. The layout used is `XY`.\n * @param {import(\"../extent.js\").Extent} extent The extent.\n * @return {Polygon} The polygon.\n * @api\n */\nexport function fromExtent(extent) {\n const minX = extent[0];\n const minY = extent[1];\n const maxX = extent[2];\n const maxY = extent[3];\n const flatCoordinates = [\n minX,\n minY,\n minX,\n maxY,\n maxX,\n maxY,\n maxX,\n minY,\n minX,\n minY,\n ];\n return new Polygon(flatCoordinates, 'XY', [flatCoordinates.length]);\n}\n\n/**\n * Create a regular polygon from a circle.\n * @param {import(\"./Circle.js\").default} circle Circle geometry.\n * @param {number} [sides] Number of sides of the polygon. Default is 32.\n * @param {number} [angle] Start angle for the first vertex of the polygon in\n * counter-clockwise radians. 0 means East. Default is 0.\n * @return {Polygon} Polygon geometry.\n * @api\n */\nexport function fromCircle(circle, sides, angle) {\n sides = sides ? sides : 32;\n const stride = circle.getStride();\n const layout = circle.getLayout();\n const center = circle.getCenter();\n const arrayLength = stride * (sides + 1);\n const flatCoordinates = new Array(arrayLength);\n for (let i = 0; i < arrayLength; i += stride) {\n flatCoordinates[i] = 0;\n flatCoordinates[i + 1] = 0;\n for (let j = 2; j < stride; j++) {\n flatCoordinates[i + j] = center[j];\n }\n }\n const ends = [flatCoordinates.length];\n const polygon = new Polygon(flatCoordinates, layout, ends);\n makeRegular(polygon, center, circle.getRadius(), angle);\n return polygon;\n}\n\n/**\n * Modify the coordinates of a polygon to make it a regular polygon.\n * @param {Polygon} polygon Polygon geometry.\n * @param {import(\"../coordinate.js\").Coordinate} center Center of the regular polygon.\n * @param {number} radius Radius of the regular polygon.\n * @param {number} [angle] Start angle for the first vertex of the polygon in\n * counter-clockwise radians. 0 means East. Default is 0.\n */\nexport function makeRegular(polygon, center, radius, angle) {\n const flatCoordinates = polygon.getFlatCoordinates();\n const stride = polygon.getStride();\n const sides = flatCoordinates.length / stride - 1;\n const startAngle = angle ? angle : 0;\n for (let i = 0; i <= sides; ++i) {\n const offset = i * stride;\n const angle = startAngle + (modulo(i, sides) * 2 * Math.PI) / sides;\n flatCoordinates[offset] = center[0] + radius * Math.cos(angle);\n flatCoordinates[offset + 1] = center[1] + radius * Math.sin(angle);\n }\n polygon.changed();\n}\n","/**\n * @module ol/Geolocation\n */\nimport BaseEvent from './events/Event.js';\nimport BaseObject from './Object.js';\nimport {circular as circularPolygon} from './geom/Polygon.js';\nimport {\n get as getProjection,\n getTransformFromProjections,\n identityTransform,\n} from './proj.js';\nimport {toRadians} from './math.js';\n\n/**\n * @enum {string}\n */\nconst Property = {\n ACCURACY: 'accuracy',\n ACCURACY_GEOMETRY: 'accuracyGeometry',\n ALTITUDE: 'altitude',\n ALTITUDE_ACCURACY: 'altitudeAccuracy',\n HEADING: 'heading',\n POSITION: 'position',\n PROJECTION: 'projection',\n SPEED: 'speed',\n TRACKING: 'tracking',\n TRACKING_OPTIONS: 'trackingOptions',\n};\n\n/**\n * @enum string\n */\nconst GeolocationErrorType = {\n /**\n * Triggered when a `GeolocationPositionError` occurs.\n * @event module:ol/Geolocation.GeolocationError#error\n * @api\n */\n ERROR: 'error',\n};\n\n/**\n * @classdesc\n * Events emitted on [GeolocationPositionError](https://developer.mozilla.org/en-US/docs/Web/API/GeolocationPositionError).\n */\nexport class GeolocationError extends BaseEvent {\n /**\n * @param {GeolocationPositionError} error error object.\n */\n constructor(error) {\n super(GeolocationErrorType.ERROR);\n\n /**\n * Code of the underlying `GeolocationPositionError`.\n * @type {number}\n * @api\n */\n this.code = error.code;\n\n /**\n * Message of the underlying `GeolocationPositionError`.\n * @type {string}\n * @api\n */\n this.message = error.message;\n }\n}\n\n/**\n * @typedef {Object} Options\n * @property {boolean} [tracking=false] Start Tracking right after\n * instantiation.\n * @property {PositionOptions} [trackingOptions] Tracking options.\n * See https://www.w3.org/TR/geolocation-API/#position_options_interface.\n * @property {import(\"./proj.js\").ProjectionLike} [projection] The projection the position\n * is reported in.\n */\n\n/**\n * @typedef {import(\"./ObjectEventType\").Types|'change:accuracy'|'change:accuracyGeometry'|'change:altitude'|\n * 'change:altitudeAccuracy'|'change:heading'|'change:position'|'change:projection'|'change:speed'|'change:tracking'|\n * 'change:trackingOptions'} GeolocationObjectEventTypes\n */\n\n/***\n * @template Return\n * @typedef {import(\"./Observable\").OnSignature<'change', import(\"./events/Event.js\").default, Return> &\n * import(\"./Observable\").OnSignature &\n * import(\"./Observable\").OnSignature<'error', GeolocationError, Return> &\n * import(\"./Observable\").CombinedOnSignature} GeolocationOnSignature\n */\n\n/**\n * @classdesc\n * Helper class for providing HTML5 Geolocation capabilities.\n * The [Geolocation API](https://www.w3.org/TR/geolocation-API/)\n * is used to locate a user's position.\n *\n * To get notified of position changes and errors, register listeners for the generic\n * `change` event and the `error` event on your instance of {@link module:ol/Geolocation~Geolocation}.\n *\n * Example:\n *\n * const geolocation = new Geolocation({\n * // take the projection to use from the map's view\n * projection: view.getProjection()\n * });\n * // listen to changes in position\n * geolocation.on('change', function(evt) {\n * console.log(geolocation.getPosition());\n * });\n * // listen to error\n * geolocation.on('error', function(evt) {\n * window.console.log(evt.message);\n * });\n *\n * @fires GeolocationError\n * @api\n */\nclass Geolocation extends BaseObject {\n /**\n * @param {Options} [options] Options.\n */\n constructor(options) {\n super();\n\n /***\n * @type {GeolocationOnSignature}\n */\n this.on;\n\n /***\n * @type {GeolocationOnSignature}\n */\n this.once;\n\n /***\n * @type {GeolocationOnSignature}\n */\n this.un;\n\n options = options || {};\n\n /**\n * The unprojected (EPSG:4326) device position.\n * @private\n * @type {?import(\"./coordinate.js\").Coordinate}\n */\n this.position_ = null;\n\n /**\n * @private\n * @type {import(\"./proj.js\").TransformFunction}\n */\n this.transform_ = identityTransform;\n\n /**\n * @private\n * @type {number|undefined}\n */\n this.watchId_ = undefined;\n\n this.addChangeListener(Property.PROJECTION, this.handleProjectionChanged_);\n this.addChangeListener(Property.TRACKING, this.handleTrackingChanged_);\n\n if (options.projection !== undefined) {\n this.setProjection(options.projection);\n }\n if (options.trackingOptions !== undefined) {\n this.setTrackingOptions(options.trackingOptions);\n }\n\n this.setTracking(options.tracking !== undefined ? options.tracking : false);\n }\n\n /**\n * Clean up.\n */\n disposeInternal() {\n this.setTracking(false);\n super.disposeInternal();\n }\n\n /**\n * @private\n */\n handleProjectionChanged_() {\n const projection = this.getProjection();\n if (projection) {\n this.transform_ = getTransformFromProjections(\n getProjection('EPSG:4326'),\n projection\n );\n if (this.position_) {\n this.set(Property.POSITION, this.transform_(this.position_));\n }\n }\n }\n\n /**\n * @private\n */\n handleTrackingChanged_() {\n if ('geolocation' in navigator) {\n const tracking = this.getTracking();\n if (tracking && this.watchId_ === undefined) {\n this.watchId_ = navigator.geolocation.watchPosition(\n this.positionChange_.bind(this),\n this.positionError_.bind(this),\n this.getTrackingOptions()\n );\n } else if (!tracking && this.watchId_ !== undefined) {\n navigator.geolocation.clearWatch(this.watchId_);\n this.watchId_ = undefined;\n }\n }\n }\n\n /**\n * @private\n * @param {GeolocationPosition} position position event.\n */\n positionChange_(position) {\n const coords = position.coords;\n this.set(Property.ACCURACY, coords.accuracy);\n this.set(\n Property.ALTITUDE,\n coords.altitude === null ? undefined : coords.altitude\n );\n this.set(\n Property.ALTITUDE_ACCURACY,\n coords.altitudeAccuracy === null ? undefined : coords.altitudeAccuracy\n );\n this.set(\n Property.HEADING,\n coords.heading === null ? undefined : toRadians(coords.heading)\n );\n if (!this.position_) {\n this.position_ = [coords.longitude, coords.latitude];\n } else {\n this.position_[0] = coords.longitude;\n this.position_[1] = coords.latitude;\n }\n const projectedPosition = this.transform_(this.position_);\n this.set(Property.POSITION, projectedPosition.slice());\n this.set(Property.SPEED, coords.speed === null ? undefined : coords.speed);\n const geometry = circularPolygon(this.position_, coords.accuracy);\n geometry.applyTransform(this.transform_);\n this.set(Property.ACCURACY_GEOMETRY, geometry);\n this.changed();\n }\n\n /**\n * @private\n * @param {GeolocationPositionError} error error object.\n */\n positionError_(error) {\n this.dispatchEvent(new GeolocationError(error));\n }\n\n /**\n * Get the accuracy of the position in meters.\n * @return {number|undefined} The accuracy of the position measurement in\n * meters.\n * @observable\n * @api\n */\n getAccuracy() {\n return /** @type {number|undefined} */ (this.get(Property.ACCURACY));\n }\n\n /**\n * Get a geometry of the position accuracy.\n * @return {?import(\"./geom/Polygon.js\").default} A geometry of the position accuracy.\n * @observable\n * @api\n */\n getAccuracyGeometry() {\n return /** @type {?import(\"./geom/Polygon.js\").default} */ (\n this.get(Property.ACCURACY_GEOMETRY) || null\n );\n }\n\n /**\n * Get the altitude associated with the position.\n * @return {number|undefined} The altitude of the position in meters above mean\n * sea level.\n * @observable\n * @api\n */\n getAltitude() {\n return /** @type {number|undefined} */ (this.get(Property.ALTITUDE));\n }\n\n /**\n * Get the altitude accuracy of the position.\n * @return {number|undefined} The accuracy of the altitude measurement in\n * meters.\n * @observable\n * @api\n */\n getAltitudeAccuracy() {\n return /** @type {number|undefined} */ (\n this.get(Property.ALTITUDE_ACCURACY)\n );\n }\n\n /**\n * Get the heading as radians clockwise from North.\n * Note: depending on the browser, the heading is only defined if the `enableHighAccuracy`\n * is set to `true` in the tracking options.\n * @return {number|undefined} The heading of the device in radians from north.\n * @observable\n * @api\n */\n getHeading() {\n return /** @type {number|undefined} */ (this.get(Property.HEADING));\n }\n\n /**\n * Get the position of the device.\n * @return {import(\"./coordinate.js\").Coordinate|undefined} The current position of the device reported\n * in the current projection.\n * @observable\n * @api\n */\n getPosition() {\n return /** @type {import(\"./coordinate.js\").Coordinate|undefined} */ (\n this.get(Property.POSITION)\n );\n }\n\n /**\n * Get the projection associated with the position.\n * @return {import(\"./proj/Projection.js\").default|undefined} The projection the position is\n * reported in.\n * @observable\n * @api\n */\n getProjection() {\n return /** @type {import(\"./proj/Projection.js\").default|undefined} */ (\n this.get(Property.PROJECTION)\n );\n }\n\n /**\n * Get the speed in meters per second.\n * @return {number|undefined} The instantaneous speed of the device in meters\n * per second.\n * @observable\n * @api\n */\n getSpeed() {\n return /** @type {number|undefined} */ (this.get(Property.SPEED));\n }\n\n /**\n * Determine if the device location is being tracked.\n * @return {boolean} The device location is being tracked.\n * @observable\n * @api\n */\n getTracking() {\n return /** @type {boolean} */ (this.get(Property.TRACKING));\n }\n\n /**\n * Get the tracking options.\n * See https://www.w3.org/TR/geolocation-API/#position-options.\n * @return {PositionOptions|undefined} PositionOptions as defined by\n * the [HTML5 Geolocation spec\n * ](https://www.w3.org/TR/geolocation-API/#position_options_interface).\n * @observable\n * @api\n */\n getTrackingOptions() {\n return /** @type {PositionOptions|undefined} */ (\n this.get(Property.TRACKING_OPTIONS)\n );\n }\n\n /**\n * Set the projection to use for transforming the coordinates.\n * @param {import(\"./proj.js\").ProjectionLike} projection The projection the position is\n * reported in.\n * @observable\n * @api\n */\n setProjection(projection) {\n this.set(Property.PROJECTION, getProjection(projection));\n }\n\n /**\n * Enable or disable tracking.\n * @param {boolean} tracking Enable tracking.\n * @observable\n * @api\n */\n setTracking(tracking) {\n this.set(Property.TRACKING, tracking);\n }\n\n /**\n * Set the tracking options.\n * See http://www.w3.org/TR/geolocation-API/#position-options.\n * @param {PositionOptions} options PositionOptions as defined by the\n * [HTML5 Geolocation spec\n * ](http://www.w3.org/TR/geolocation-API/#position_options_interface).\n * @observable\n * @api\n */\n setTrackingOptions(options) {\n this.set(Property.TRACKING_OPTIONS, options);\n }\n}\n\nexport default Geolocation;\n","/**\n * @module ol/ImageBase\n */\nimport EventTarget from './events/Target.js';\nimport EventType from './events/EventType.js';\nimport {abstract} from './util.js';\n\n/**\n * @abstract\n */\nclass ImageBase extends EventTarget {\n /**\n * @param {import(\"./extent.js\").Extent} extent Extent.\n * @param {number|undefined} resolution Resolution.\n * @param {number} pixelRatio Pixel ratio.\n * @param {import(\"./ImageState.js\").default} state State.\n */\n constructor(extent, resolution, pixelRatio, state) {\n super();\n\n /**\n * @protected\n * @type {import(\"./extent.js\").Extent}\n */\n this.extent = extent;\n\n /**\n * @private\n * @type {number}\n */\n this.pixelRatio_ = pixelRatio;\n\n /**\n * @protected\n * @type {number|undefined}\n */\n this.resolution = resolution;\n\n /**\n * @protected\n * @type {import(\"./ImageState.js\").default}\n */\n this.state = state;\n }\n\n /**\n * @protected\n */\n changed() {\n this.dispatchEvent(EventType.CHANGE);\n }\n\n /**\n * @return {import(\"./extent.js\").Extent} Extent.\n */\n getExtent() {\n return this.extent;\n }\n\n /**\n * @abstract\n * @return {HTMLCanvasElement|HTMLImageElement|HTMLVideoElement} Image.\n */\n getImage() {\n return abstract();\n }\n\n /**\n * @return {number} PixelRatio.\n */\n getPixelRatio() {\n return this.pixelRatio_;\n }\n\n /**\n * @return {number} Resolution.\n */\n getResolution() {\n return /** @type {number} */ (this.resolution);\n }\n\n /**\n * @return {import(\"./ImageState.js\").default} State.\n */\n getState() {\n return this.state;\n }\n\n /**\n * Load not yet loaded URI.\n * @abstract\n */\n load() {\n abstract();\n }\n}\n\nexport default ImageBase;\n","/**\n * @module ol/ImageState\n */\n\n/**\n * @enum {number}\n */\nexport default {\n IDLE: 0,\n LOADING: 1,\n LOADED: 2,\n ERROR: 3,\n EMPTY: 4,\n};\n","/**\n * @module ol/Image\n */\nimport EventType from './events/EventType.js';\nimport ImageBase from './ImageBase.js';\nimport ImageState from './ImageState.js';\nimport {IMAGE_DECODE} from './has.js';\nimport {getHeight} from './extent.js';\nimport {listenOnce, unlistenByKey} from './events.js';\n\n/**\n * A function that takes an {@link module:ol/Image~ImageWrapper} for the image and a\n * `{string}` for the src as arguments. It is supposed to make it so the\n * underlying image {@link module:ol/Image~ImageWrapper#getImage} is assigned the\n * content specified by the src. If not specified, the default is\n *\n * function(image, src) {\n * image.getImage().src = src;\n * }\n *\n * Providing a custom `imageLoadFunction` can be useful to load images with\n * post requests or - in general - through XHR requests, where the src of the\n * image element would be set to a data URI when the content is loaded.\n *\n * @typedef {function(ImageWrapper, string): void} LoadFunction\n * @api\n */\n\nclass ImageWrapper extends ImageBase {\n /**\n * @param {import(\"./extent.js\").Extent} extent Extent.\n * @param {number|undefined} resolution Resolution.\n * @param {number} pixelRatio Pixel ratio.\n * @param {string} src Image source URI.\n * @param {?string} crossOrigin Cross origin.\n * @param {LoadFunction} imageLoadFunction Image load function.\n */\n constructor(\n extent,\n resolution,\n pixelRatio,\n src,\n crossOrigin,\n imageLoadFunction\n ) {\n super(extent, resolution, pixelRatio, ImageState.IDLE);\n\n /**\n * @private\n * @type {string}\n */\n this.src_ = src;\n\n /**\n * @private\n * @type {HTMLCanvasElement|HTMLImageElement|HTMLVideoElement}\n */\n this.image_ = new Image();\n if (crossOrigin !== null) {\n this.image_.crossOrigin = crossOrigin;\n }\n\n /**\n * @private\n * @type {?function():void}\n */\n this.unlisten_ = null;\n\n /**\n * @protected\n * @type {import(\"./ImageState.js\").default}\n */\n this.state = ImageState.IDLE;\n\n /**\n * @private\n * @type {LoadFunction}\n */\n this.imageLoadFunction_ = imageLoadFunction;\n }\n\n /**\n * @return {HTMLCanvasElement|HTMLImageElement|HTMLVideoElement} Image.\n * @api\n */\n getImage() {\n return this.image_;\n }\n\n /**\n * Tracks loading or read errors.\n *\n * @private\n */\n handleImageError_() {\n this.state = ImageState.ERROR;\n this.unlistenImage_();\n this.changed();\n }\n\n /**\n * Tracks successful image load.\n *\n * @private\n */\n handleImageLoad_() {\n if (this.resolution === undefined) {\n this.resolution = getHeight(this.extent) / this.image_.height;\n }\n this.state = ImageState.LOADED;\n this.unlistenImage_();\n this.changed();\n }\n\n /**\n * Load the image or retry if loading previously failed.\n * Loading is taken care of by the tile queue, and calling this method is\n * only needed for preloading or for reloading in case of an error.\n * @api\n */\n load() {\n if (this.state == ImageState.IDLE || this.state == ImageState.ERROR) {\n this.state = ImageState.LOADING;\n this.changed();\n this.imageLoadFunction_(this, this.src_);\n this.unlisten_ = listenImage(\n this.image_,\n this.handleImageLoad_.bind(this),\n this.handleImageError_.bind(this)\n );\n }\n }\n\n /**\n * @param {HTMLCanvasElement|HTMLImageElement|HTMLVideoElement} image Image.\n */\n setImage(image) {\n this.image_ = image;\n this.resolution = getHeight(this.extent) / this.image_.height;\n }\n\n /**\n * Discards event handlers which listen for load completion or errors.\n *\n * @private\n */\n unlistenImage_() {\n if (this.unlisten_) {\n this.unlisten_();\n this.unlisten_ = null;\n }\n }\n}\n\n/**\n * @param {HTMLCanvasElement|HTMLImageElement|HTMLVideoElement} image Image element.\n * @param {function():any} loadHandler Load callback function.\n * @param {function():any} errorHandler Error callback function.\n * @return {function():void} Callback to stop listening.\n */\nexport function listenImage(image, loadHandler, errorHandler) {\n const img = /** @type {HTMLImageElement} */ (image);\n let listening = true;\n let decoding = false;\n let loaded = false;\n\n const listenerKeys = [\n listenOnce(img, EventType.LOAD, function () {\n loaded = true;\n if (!decoding) {\n loadHandler();\n }\n }),\n ];\n\n if (img.src && IMAGE_DECODE) {\n decoding = true;\n img\n .decode()\n .then(function () {\n if (listening) {\n loadHandler();\n }\n })\n .catch(function (error) {\n if (listening) {\n if (loaded) {\n loadHandler();\n } else {\n errorHandler();\n }\n }\n });\n } else {\n listenerKeys.push(listenOnce(img, EventType.ERROR, errorHandler));\n }\n\n return function unlisten() {\n listening = false;\n listenerKeys.forEach(unlistenByKey);\n };\n}\n\nexport default ImageWrapper;\n","/**\n * @module ol/ImageCanvas\n */\nimport ImageBase from './ImageBase.js';\nimport ImageState from './ImageState.js';\n\n/**\n * A function that is called to trigger asynchronous canvas drawing. It is\n * called with a \"done\" callback that should be called when drawing is done.\n * If any error occurs during drawing, the \"done\" callback should be called with\n * that error.\n *\n * @typedef {function(function(Error=): void): void} Loader\n */\n\nclass ImageCanvas extends ImageBase {\n /**\n * @param {import(\"./extent.js\").Extent} extent Extent.\n * @param {number} resolution Resolution.\n * @param {number} pixelRatio Pixel ratio.\n * @param {HTMLCanvasElement} canvas Canvas.\n * @param {Loader} [loader] Optional loader function to\n * support asynchronous canvas drawing.\n */\n constructor(extent, resolution, pixelRatio, canvas, loader) {\n const state = loader !== undefined ? ImageState.IDLE : ImageState.LOADED;\n\n super(extent, resolution, pixelRatio, state);\n\n /**\n * Optional canvas loader function.\n * @type {?Loader}\n * @private\n */\n this.loader_ = loader !== undefined ? loader : null;\n\n /**\n * @private\n * @type {HTMLCanvasElement}\n */\n this.canvas_ = canvas;\n\n /**\n * @private\n * @type {?Error}\n */\n this.error_ = null;\n }\n\n /**\n * Get any error associated with asynchronous rendering.\n * @return {?Error} Any error that occurred during rendering.\n */\n getError() {\n return this.error_;\n }\n\n /**\n * Handle async drawing complete.\n * @param {Error} [err] Any error during drawing.\n * @private\n */\n handleLoad_(err) {\n if (err) {\n this.error_ = err;\n this.state = ImageState.ERROR;\n } else {\n this.state = ImageState.LOADED;\n }\n this.changed();\n }\n\n /**\n * Load not yet loaded URI.\n */\n load() {\n if (this.state == ImageState.IDLE) {\n this.state = ImageState.LOADING;\n this.changed();\n this.loader_(this.handleLoad_.bind(this));\n }\n }\n\n /**\n * @return {HTMLCanvasElement} Canvas element.\n */\n getImage() {\n return this.canvas_;\n }\n}\n\nexport default ImageCanvas;\n","/**\n * @module ol/ImageTile\n */\nimport Tile from './Tile.js';\nimport TileState from './TileState.js';\nimport {createCanvasContext2D} from './dom.js';\nimport {listenImage} from './Image.js';\n\nclass ImageTile extends Tile {\n /**\n * @param {import(\"./tilecoord.js\").TileCoord} tileCoord Tile coordinate.\n * @param {import(\"./TileState.js\").default} state State.\n * @param {string} src Image source URI.\n * @param {?string} crossOrigin Cross origin.\n * @param {import(\"./Tile.js\").LoadFunction} tileLoadFunction Tile load function.\n * @param {import(\"./Tile.js\").Options} [options] Tile options.\n */\n constructor(tileCoord, state, src, crossOrigin, tileLoadFunction, options) {\n super(tileCoord, state, options);\n\n /**\n * @private\n * @type {?string}\n */\n this.crossOrigin_ = crossOrigin;\n\n /**\n * Image URI\n *\n * @private\n * @type {string}\n */\n this.src_ = src;\n\n this.key = src;\n\n /**\n * @private\n * @type {HTMLImageElement|HTMLCanvasElement}\n */\n this.image_ = new Image();\n if (crossOrigin !== null) {\n this.image_.crossOrigin = crossOrigin;\n }\n\n /**\n * @private\n * @type {?function():void}\n */\n this.unlisten_ = null;\n\n /**\n * @private\n * @type {import(\"./Tile.js\").LoadFunction}\n */\n this.tileLoadFunction_ = tileLoadFunction;\n }\n\n /**\n * Get the HTML image element for this tile (may be a Canvas, Image, or Video).\n * @return {HTMLCanvasElement|HTMLImageElement|HTMLVideoElement} Image.\n * @api\n */\n getImage() {\n return this.image_;\n }\n\n /**\n * Sets an HTML image element for this tile (may be a Canvas or preloaded Image).\n * @param {HTMLCanvasElement|HTMLImageElement} element Element.\n */\n setImage(element) {\n this.image_ = element;\n this.state = TileState.LOADED;\n this.unlistenImage_();\n this.changed();\n }\n\n /**\n * Tracks loading or read errors.\n *\n * @private\n */\n handleImageError_() {\n this.state = TileState.ERROR;\n this.unlistenImage_();\n this.image_ = getBlankImage();\n this.changed();\n }\n\n /**\n * Tracks successful image load.\n *\n * @private\n */\n handleImageLoad_() {\n const image = /** @type {HTMLImageElement} */ (this.image_);\n if (image.naturalWidth && image.naturalHeight) {\n this.state = TileState.LOADED;\n } else {\n this.state = TileState.EMPTY;\n }\n this.unlistenImage_();\n this.changed();\n }\n\n /**\n * Load the image or retry if loading previously failed.\n * Loading is taken care of by the tile queue, and calling this method is\n * only needed for preloading or for reloading in case of an error.\n *\n * To retry loading tiles on failed requests, use a custom `tileLoadFunction`\n * that checks for error status codes and reloads only when the status code is\n * 408, 429, 500, 502, 503 and 504, and only when not too many retries have been\n * made already:\n *\n * ```js\n * const retryCodes = [408, 429, 500, 502, 503, 504];\n * const retries = {};\n * source.setTileLoadFunction((tile, src) => {\n * const image = tile.getImage();\n * fetch(src)\n * .then((response) => {\n * if (retryCodes.includes(response.status)) {\n * retries[src] = (retries[src] || 0) + 1;\n * if (retries[src] <= 3) {\n * setTimeout(() => tile.load(), retries[src] * 1000);\n * }\n * return Promise.reject();\n * }\n * return response.blob();\n * })\n * .then((blob) => {\n * const imageUrl = URL.createObjectURL(blob);\n * image.src = imageUrl;\n * setTimeout(() => URL.revokeObjectURL(imageUrl), 5000);\n * })\n * .catch(() => tile.setState(3)); // error\n * });\n * ```\n *\n * @api\n */\n load() {\n if (this.state == TileState.ERROR) {\n this.state = TileState.IDLE;\n this.image_ = new Image();\n if (this.crossOrigin_ !== null) {\n this.image_.crossOrigin = this.crossOrigin_;\n }\n }\n if (this.state == TileState.IDLE) {\n this.state = TileState.LOADING;\n this.changed();\n this.tileLoadFunction_(this, this.src_);\n this.unlisten_ = listenImage(\n this.image_,\n this.handleImageLoad_.bind(this),\n this.handleImageError_.bind(this)\n );\n }\n }\n\n /**\n * Discards event handlers which listen for load completion or errors.\n *\n * @private\n */\n unlistenImage_() {\n if (this.unlisten_) {\n this.unlisten_();\n this.unlisten_ = null;\n }\n }\n}\n\n/**\n * Get a 1-pixel blank image.\n * @return {HTMLCanvasElement} Blank image.\n */\nfunction getBlankImage() {\n const ctx = createCanvasContext2D(1, 1);\n ctx.fillStyle = 'rgba(0,0,0,0)';\n ctx.fillRect(0, 0, 1, 1);\n return ctx.canvas;\n}\n\nexport default ImageTile;\n","/**\n * @module ol/Kinetic\n */\n\n/**\n * @classdesc\n * Implementation of inertial deceleration for map movement.\n *\n * @api\n */\nclass Kinetic {\n /**\n * @param {number} decay Rate of decay (must be negative).\n * @param {number} minVelocity Minimum velocity (pixels/millisecond).\n * @param {number} delay Delay to consider to calculate the kinetic\n * initial values (milliseconds).\n */\n constructor(decay, minVelocity, delay) {\n /**\n * @private\n * @type {number}\n */\n this.decay_ = decay;\n\n /**\n * @private\n * @type {number}\n */\n this.minVelocity_ = minVelocity;\n\n /**\n * @private\n * @type {number}\n */\n this.delay_ = delay;\n\n /**\n * @private\n * @type {Array}\n */\n this.points_ = [];\n\n /**\n * @private\n * @type {number}\n */\n this.angle_ = 0;\n\n /**\n * @private\n * @type {number}\n */\n this.initialVelocity_ = 0;\n }\n\n /**\n * FIXME empty description for jsdoc\n */\n begin() {\n this.points_.length = 0;\n this.angle_ = 0;\n this.initialVelocity_ = 0;\n }\n\n /**\n * @param {number} x X.\n * @param {number} y Y.\n */\n update(x, y) {\n this.points_.push(x, y, Date.now());\n }\n\n /**\n * @return {boolean} Whether we should do kinetic animation.\n */\n end() {\n if (this.points_.length < 6) {\n // at least 2 points are required (i.e. there must be at least 6 elements\n // in the array)\n return false;\n }\n const delay = Date.now() - this.delay_;\n const lastIndex = this.points_.length - 3;\n if (this.points_[lastIndex + 2] < delay) {\n // the last tracked point is too old, which means that the user stopped\n // panning before releasing the map\n return false;\n }\n\n // get the first point which still falls into the delay time\n let firstIndex = lastIndex - 3;\n while (firstIndex > 0 && this.points_[firstIndex + 2] > delay) {\n firstIndex -= 3;\n }\n\n const duration = this.points_[lastIndex + 2] - this.points_[firstIndex + 2];\n // we don't want a duration of 0 (divide by zero)\n // we also make sure the user panned for a duration of at least one frame\n // (1/60s) to compute sane displacement values\n if (duration < 1000 / 60) {\n return false;\n }\n\n const dx = this.points_[lastIndex] - this.points_[firstIndex];\n const dy = this.points_[lastIndex + 1] - this.points_[firstIndex + 1];\n this.angle_ = Math.atan2(dy, dx);\n this.initialVelocity_ = Math.sqrt(dx * dx + dy * dy) / duration;\n return this.initialVelocity_ > this.minVelocity_;\n }\n\n /**\n * @return {number} Total distance travelled (pixels).\n */\n getDistance() {\n return (this.minVelocity_ - this.initialVelocity_) / this.decay_;\n }\n\n /**\n * @return {number} Angle of the kinetic panning animation (radians).\n */\n getAngle() {\n return this.angle_;\n }\n}\n\nexport default Kinetic;\n","/**\n * @module ol/color\n */\nimport {assert} from './asserts.js';\nimport {clamp} from './math.js';\n\n/**\n * A color represented as a short array [red, green, blue, alpha].\n * red, green, and blue should be integers in the range 0..255 inclusive.\n * alpha should be a float in the range 0..1 inclusive. If no alpha value is\n * given then `1` will be used.\n * @typedef {Array} Color\n * @api\n */\n\n/**\n * This RegExp matches # followed by 3, 4, 6, or 8 hex digits.\n * @const\n * @type {RegExp}\n * @private\n */\nconst HEX_COLOR_RE_ = /^#([a-f0-9]{3}|[a-f0-9]{4}(?:[a-f0-9]{2}){0,2})$/i;\n\n/**\n * Regular expression for matching potential named color style strings.\n * @const\n * @type {RegExp}\n * @private\n */\nconst NAMED_COLOR_RE_ = /^([a-z]*)$|^hsla?\\(.*\\)$/i;\n\n/**\n * Return the color as an rgba string.\n * @param {Color|string} color Color.\n * @return {string} Rgba string.\n * @api\n */\nexport function asString(color) {\n if (typeof color === 'string') {\n return color;\n }\n return toString(color);\n}\n\n/**\n * Return named color as an rgba string.\n * @param {string} color Named color.\n * @return {string} Rgb string.\n */\nfunction fromNamed(color) {\n const el = document.createElement('div');\n el.style.color = color;\n if (el.style.color !== '') {\n document.body.appendChild(el);\n const rgb = getComputedStyle(el).color;\n document.body.removeChild(el);\n return rgb;\n }\n return '';\n}\n\n/**\n * @param {string} s String.\n * @return {Color} Color.\n */\nexport const fromString = (function () {\n // We maintain a small cache of parsed strings. To provide cheap LRU-like\n // semantics, whenever the cache grows too large we simply delete an\n // arbitrary 25% of the entries.\n\n /**\n * @const\n * @type {number}\n */\n const MAX_CACHE_SIZE = 1024;\n\n /**\n * @type {Object}\n */\n const cache = {};\n\n /**\n * @type {number}\n */\n let cacheSize = 0;\n\n return (\n /**\n * @param {string} s String.\n * @return {Color} Color.\n */\n function (s) {\n let color;\n if (cache.hasOwnProperty(s)) {\n color = cache[s];\n } else {\n if (cacheSize >= MAX_CACHE_SIZE) {\n let i = 0;\n for (const key in cache) {\n if ((i++ & 3) === 0) {\n delete cache[key];\n --cacheSize;\n }\n }\n }\n color = fromStringInternal_(s);\n cache[s] = color;\n ++cacheSize;\n }\n return color;\n }\n );\n})();\n\n/**\n * Return the color as an array. This function maintains a cache of calculated\n * arrays which means the result should not be modified.\n * @param {Color|string} color Color.\n * @return {Color} Color.\n * @api\n */\nexport function asArray(color) {\n if (Array.isArray(color)) {\n return color;\n }\n return fromString(color);\n}\n\n/**\n * @param {string} s String.\n * @private\n * @return {Color} Color.\n */\nfunction fromStringInternal_(s) {\n let r, g, b, a, color;\n\n if (NAMED_COLOR_RE_.exec(s)) {\n s = fromNamed(s);\n }\n\n if (HEX_COLOR_RE_.exec(s)) {\n // hex\n const n = s.length - 1; // number of hex digits\n let d; // number of digits per channel\n if (n <= 4) {\n d = 1;\n } else {\n d = 2;\n }\n const hasAlpha = n === 4 || n === 8;\n r = parseInt(s.substr(1 + 0 * d, d), 16);\n g = parseInt(s.substr(1 + 1 * d, d), 16);\n b = parseInt(s.substr(1 + 2 * d, d), 16);\n if (hasAlpha) {\n a = parseInt(s.substr(1 + 3 * d, d), 16);\n } else {\n a = 255;\n }\n if (d == 1) {\n r = (r << 4) + r;\n g = (g << 4) + g;\n b = (b << 4) + b;\n if (hasAlpha) {\n a = (a << 4) + a;\n }\n }\n color = [r, g, b, a / 255];\n } else if (s.startsWith('rgba(')) {\n // rgba()\n color = s.slice(5, -1).split(',').map(Number);\n normalize(color);\n } else if (s.startsWith('rgb(')) {\n // rgb()\n color = s.slice(4, -1).split(',').map(Number);\n color.push(1);\n normalize(color);\n } else {\n assert(false, 14); // Invalid color\n }\n return color;\n}\n\n/**\n * TODO this function is only used in the test, we probably shouldn't export it\n * @param {Color} color Color.\n * @return {Color} Clamped color.\n */\nexport function normalize(color) {\n color[0] = clamp((color[0] + 0.5) | 0, 0, 255);\n color[1] = clamp((color[1] + 0.5) | 0, 0, 255);\n color[2] = clamp((color[2] + 0.5) | 0, 0, 255);\n color[3] = clamp(color[3], 0, 1);\n return color;\n}\n\n/**\n * @param {Color} color Color.\n * @return {string} String.\n */\nexport function toString(color) {\n let r = color[0];\n if (r != (r | 0)) {\n r = (r + 0.5) | 0;\n }\n let g = color[1];\n if (g != (g | 0)) {\n g = (g + 0.5) | 0;\n }\n let b = color[2];\n if (b != (b | 0)) {\n b = (b + 0.5) | 0;\n }\n const a = color[3] === undefined ? 1 : Math.round(color[3] * 100) / 100;\n return 'rgba(' + r + ',' + g + ',' + b + ',' + a + ')';\n}\n\n/**\n * @param {string} s String.\n * @return {boolean} Whether the string is actually a valid color\n */\nexport function isStringColor(s) {\n if (NAMED_COLOR_RE_.test(s)) {\n s = fromNamed(s);\n }\n return HEX_COLOR_RE_.test(s) || s.startsWith('rgba(') || s.startsWith('rgb(');\n}\n","/**\n * @module ol/style/IconImageCache\n */\nimport {asString} from '../color.js';\n\n/**\n * @classdesc\n * Singleton class. Available through {@link module:ol/style/IconImageCache.shared}.\n */\nclass IconImageCache {\n constructor() {\n /**\n * @type {!Object}\n * @private\n */\n this.cache_ = {};\n\n /**\n * @type {number}\n * @private\n */\n this.cacheSize_ = 0;\n\n /**\n * @type {number}\n * @private\n */\n this.maxCacheSize_ = 32;\n }\n\n /**\n * FIXME empty description for jsdoc\n */\n clear() {\n this.cache_ = {};\n this.cacheSize_ = 0;\n }\n\n /**\n * @return {boolean} Can expire cache.\n */\n canExpireCache() {\n return this.cacheSize_ > this.maxCacheSize_;\n }\n\n /**\n * FIXME empty description for jsdoc\n */\n expire() {\n if (this.canExpireCache()) {\n let i = 0;\n for (const key in this.cache_) {\n const iconImage = this.cache_[key];\n if ((i++ & 3) === 0 && !iconImage.hasListener()) {\n delete this.cache_[key];\n --this.cacheSize_;\n }\n }\n }\n }\n\n /**\n * @param {string} src Src.\n * @param {?string} crossOrigin Cross origin.\n * @param {import(\"../color.js\").Color} color Color.\n * @return {import(\"./IconImage.js\").default} Icon image.\n */\n get(src, crossOrigin, color) {\n const key = getKey(src, crossOrigin, color);\n return key in this.cache_ ? this.cache_[key] : null;\n }\n\n /**\n * @param {string} src Src.\n * @param {?string} crossOrigin Cross origin.\n * @param {import(\"../color.js\").Color} color Color.\n * @param {import(\"./IconImage.js\").default} iconImage Icon image.\n */\n set(src, crossOrigin, color, iconImage) {\n const key = getKey(src, crossOrigin, color);\n this.cache_[key] = iconImage;\n ++this.cacheSize_;\n }\n\n /**\n * Set the cache size of the icon cache. Default is `32`. Change this value when\n * your map uses more than 32 different icon images and you are not caching icon\n * styles on the application level.\n * @param {number} maxCacheSize Cache max size.\n * @api\n */\n setSize(maxCacheSize) {\n this.maxCacheSize_ = maxCacheSize;\n this.expire();\n }\n}\n\n/**\n * @param {string} src Src.\n * @param {?string} crossOrigin Cross origin.\n * @param {import(\"../color.js\").Color} color Color.\n * @return {string} Cache key.\n */\nfunction getKey(src, crossOrigin, color) {\n const colorString = color ? asString(color) : 'null';\n return crossOrigin + ':' + src + ':' + colorString;\n}\n\nexport default IconImageCache;\n\n/**\n * The {@link module:ol/style/IconImageCache~IconImageCache} for\n * {@link module:ol/style/Icon~Icon} images.\n * @api\n */\nexport const shared = new IconImageCache();\n","/**\n * @module ol/layer/Property\n */\n\n/**\n * @enum {string}\n */\nexport default {\n OPACITY: 'opacity',\n VISIBLE: 'visible',\n EXTENT: 'extent',\n Z_INDEX: 'zIndex',\n MAX_RESOLUTION: 'maxResolution',\n MIN_RESOLUTION: 'minResolution',\n MAX_ZOOM: 'maxZoom',\n MIN_ZOOM: 'minZoom',\n SOURCE: 'source',\n MAP: 'map',\n};\n","/**\n * @module ol/layer/Base\n */\nimport BaseObject from '../Object.js';\nimport LayerProperty from './Property.js';\nimport {abstract} from '../util.js';\nimport {assert} from '../asserts.js';\nimport {clamp} from '../math.js';\n\n/**\n * A css color, or a function called with a view resolution returning a css color.\n *\n * @typedef {string|function(number):string} BackgroundColor\n * @api\n */\n\n/**\n * @typedef {import(\"../ObjectEventType\").Types|'change:extent'|'change:maxResolution'|'change:maxZoom'|\n * 'change:minResolution'|'change:minZoom'|'change:opacity'|'change:visible'|'change:zIndex'} BaseLayerObjectEventTypes\n */\n\n/***\n * @template Return\n * @typedef {import(\"../Observable\").OnSignature &\n * import(\"../Observable\").OnSignature &\n * import(\"../Observable\").CombinedOnSignature} BaseLayerOnSignature\n */\n\n/**\n * @typedef {Object} Options\n * @property {string} [className='ol-layer'] A CSS class name to set to the layer element.\n * @property {number} [opacity=1] Opacity (0, 1).\n * @property {boolean} [visible=true] Visibility.\n * @property {import(\"../extent.js\").Extent} [extent] The bounding extent for layer rendering. The layer will not be\n * rendered outside of this extent.\n * @property {number} [zIndex] The z-index for layer rendering. At rendering time, the layers\n * will be ordered, first by Z-index and then by position. When `undefined`, a `zIndex` of 0 is assumed\n * for layers that are added to the map's `layers` collection, or `Infinity` when the layer's `setMap()`\n * method was used.\n * @property {number} [minResolution] The minimum resolution (inclusive) at which this layer will be\n * visible.\n * @property {number} [maxResolution] The maximum resolution (exclusive) below which this layer will\n * be visible.\n * @property {number} [minZoom] The minimum view zoom level (exclusive) above which this layer will be\n * visible.\n * @property {number} [maxZoom] The maximum view zoom level (inclusive) at which this layer will\n * be visible.\n * @property {BackgroundColor} [background] Background color for the layer. If not specified, no background\n * will be rendered.\n * @property {Object} [properties] Arbitrary observable properties. Can be accessed with `#get()` and `#set()`.\n */\n\n/**\n * @classdesc\n * Abstract base class; normally only used for creating subclasses and not\n * instantiated in apps.\n * Note that with {@link module:ol/layer/Base~BaseLayer} and all its subclasses, any property set in\n * the options is set as a {@link module:ol/Object~BaseObject} property on the layer object, so\n * is observable, and has get/set accessors.\n *\n * @api\n */\nclass BaseLayer extends BaseObject {\n /**\n * @param {Options} options Layer options.\n */\n constructor(options) {\n super();\n\n /***\n * @type {BaseLayerOnSignature}\n */\n this.on;\n\n /***\n * @type {BaseLayerOnSignature}\n */\n this.once;\n\n /***\n * @type {BaseLayerOnSignature}\n */\n this.un;\n\n /**\n * @type {BackgroundColor|false}\n * @private\n */\n this.background_ = options.background;\n\n /**\n * @type {Object}\n */\n const properties = Object.assign({}, options);\n if (typeof options.properties === 'object') {\n delete properties.properties;\n Object.assign(properties, options.properties);\n }\n\n properties[LayerProperty.OPACITY] =\n options.opacity !== undefined ? options.opacity : 1;\n assert(typeof properties[LayerProperty.OPACITY] === 'number', 64); // Layer opacity must be a number\n\n properties[LayerProperty.VISIBLE] =\n options.visible !== undefined ? options.visible : true;\n properties[LayerProperty.Z_INDEX] = options.zIndex;\n properties[LayerProperty.MAX_RESOLUTION] =\n options.maxResolution !== undefined ? options.maxResolution : Infinity;\n properties[LayerProperty.MIN_RESOLUTION] =\n options.minResolution !== undefined ? options.minResolution : 0;\n properties[LayerProperty.MIN_ZOOM] =\n options.minZoom !== undefined ? options.minZoom : -Infinity;\n properties[LayerProperty.MAX_ZOOM] =\n options.maxZoom !== undefined ? options.maxZoom : Infinity;\n\n /**\n * @type {string}\n * @private\n */\n this.className_ =\n properties.className !== undefined ? properties.className : 'ol-layer';\n delete properties.className;\n\n this.setProperties(properties);\n\n /**\n * @type {import(\"./Layer.js\").State}\n * @private\n */\n this.state_ = null;\n }\n\n /**\n * Get the background for this layer.\n * @return {BackgroundColor|false} Layer background.\n */\n getBackground() {\n return this.background_;\n }\n\n /**\n * @return {string} CSS class name.\n */\n getClassName() {\n return this.className_;\n }\n\n /**\n * This method is not meant to be called by layers or layer renderers because the state\n * is incorrect if the layer is included in a layer group.\n *\n * @param {boolean} [managed] Layer is managed.\n * @return {import(\"./Layer.js\").State} Layer state.\n */\n getLayerState(managed) {\n /** @type {import(\"./Layer.js\").State} */\n const state =\n this.state_ ||\n /** @type {?} */ ({\n layer: this,\n managed: managed === undefined ? true : managed,\n });\n const zIndex = this.getZIndex();\n state.opacity = clamp(Math.round(this.getOpacity() * 100) / 100, 0, 1);\n state.visible = this.getVisible();\n state.extent = this.getExtent();\n state.zIndex = zIndex === undefined && !state.managed ? Infinity : zIndex;\n state.maxResolution = this.getMaxResolution();\n state.minResolution = Math.max(this.getMinResolution(), 0);\n state.minZoom = this.getMinZoom();\n state.maxZoom = this.getMaxZoom();\n this.state_ = state;\n\n return state;\n }\n\n /**\n * @abstract\n * @param {Array} [array] Array of layers (to be\n * modified in place).\n * @return {Array} Array of layers.\n */\n getLayersArray(array) {\n return abstract();\n }\n\n /**\n * @abstract\n * @param {Array} [states] Optional list of layer\n * states (to be modified in place).\n * @return {Array} List of layer states.\n */\n getLayerStatesArray(states) {\n return abstract();\n }\n\n /**\n * Return the {@link module:ol/extent~Extent extent} of the layer or `undefined` if it\n * will be visible regardless of extent.\n * @return {import(\"../extent.js\").Extent|undefined} The layer extent.\n * @observable\n * @api\n */\n getExtent() {\n return /** @type {import(\"../extent.js\").Extent|undefined} */ (\n this.get(LayerProperty.EXTENT)\n );\n }\n\n /**\n * Return the maximum resolution of the layer.\n * @return {number} The maximum resolution of the layer.\n * @observable\n * @api\n */\n getMaxResolution() {\n return /** @type {number} */ (this.get(LayerProperty.MAX_RESOLUTION));\n }\n\n /**\n * Return the minimum resolution of the layer.\n * @return {number} The minimum resolution of the layer.\n * @observable\n * @api\n */\n getMinResolution() {\n return /** @type {number} */ (this.get(LayerProperty.MIN_RESOLUTION));\n }\n\n /**\n * Return the minimum zoom level of the layer.\n * @return {number} The minimum zoom level of the layer.\n * @observable\n * @api\n */\n getMinZoom() {\n return /** @type {number} */ (this.get(LayerProperty.MIN_ZOOM));\n }\n\n /**\n * Return the maximum zoom level of the layer.\n * @return {number} The maximum zoom level of the layer.\n * @observable\n * @api\n */\n getMaxZoom() {\n return /** @type {number} */ (this.get(LayerProperty.MAX_ZOOM));\n }\n\n /**\n * Return the opacity of the layer (between 0 and 1).\n * @return {number} The opacity of the layer.\n * @observable\n * @api\n */\n getOpacity() {\n return /** @type {number} */ (this.get(LayerProperty.OPACITY));\n }\n\n /**\n * @abstract\n * @return {import(\"../source/Source.js\").State} Source state.\n */\n getSourceState() {\n return abstract();\n }\n\n /**\n * Return the visibility of the layer (`true` or `false`).\n * @return {boolean} The visibility of the layer.\n * @observable\n * @api\n */\n getVisible() {\n return /** @type {boolean} */ (this.get(LayerProperty.VISIBLE));\n }\n\n /**\n * Return the Z-index of the layer, which is used to order layers before\n * rendering. The default Z-index is 0.\n * @return {number} The Z-index of the layer.\n * @observable\n * @api\n */\n getZIndex() {\n return /** @type {number} */ (this.get(LayerProperty.Z_INDEX));\n }\n\n /**\n * Sets the background color.\n * @param {BackgroundColor} [background] Background color.\n */\n setBackground(background) {\n this.background_ = background;\n this.changed();\n }\n\n /**\n * Set the extent at which the layer is visible. If `undefined`, the layer\n * will be visible at all extents.\n * @param {import(\"../extent.js\").Extent|undefined} extent The extent of the layer.\n * @observable\n * @api\n */\n setExtent(extent) {\n this.set(LayerProperty.EXTENT, extent);\n }\n\n /**\n * Set the maximum resolution at which the layer is visible.\n * @param {number} maxResolution The maximum resolution of the layer.\n * @observable\n * @api\n */\n setMaxResolution(maxResolution) {\n this.set(LayerProperty.MAX_RESOLUTION, maxResolution);\n }\n\n /**\n * Set the minimum resolution at which the layer is visible.\n * @param {number} minResolution The minimum resolution of the layer.\n * @observable\n * @api\n */\n setMinResolution(minResolution) {\n this.set(LayerProperty.MIN_RESOLUTION, minResolution);\n }\n\n /**\n * Set the maximum zoom (exclusive) at which the layer is visible.\n * Note that the zoom levels for layer visibility are based on the\n * view zoom level, which may be different from a tile source zoom level.\n * @param {number} maxZoom The maximum zoom of the layer.\n * @observable\n * @api\n */\n setMaxZoom(maxZoom) {\n this.set(LayerProperty.MAX_ZOOM, maxZoom);\n }\n\n /**\n * Set the minimum zoom (inclusive) at which the layer is visible.\n * Note that the zoom levels for layer visibility are based on the\n * view zoom level, which may be different from a tile source zoom level.\n * @param {number} minZoom The minimum zoom of the layer.\n * @observable\n * @api\n */\n setMinZoom(minZoom) {\n this.set(LayerProperty.MIN_ZOOM, minZoom);\n }\n\n /**\n * Set the opacity of the layer, allowed values range from 0 to 1.\n * @param {number} opacity The opacity of the layer.\n * @observable\n * @api\n */\n setOpacity(opacity) {\n assert(typeof opacity === 'number', 64); // Layer opacity must be a number\n this.set(LayerProperty.OPACITY, opacity);\n }\n\n /**\n * Set the visibility of the layer (`true` or `false`).\n * @param {boolean} visible The visibility of the layer.\n * @observable\n * @api\n */\n setVisible(visible) {\n this.set(LayerProperty.VISIBLE, visible);\n }\n\n /**\n * Set Z-index of the layer, which is used to order layers before rendering.\n * The default Z-index is 0.\n * @param {number} zindex The z-index of the layer.\n * @observable\n * @api\n */\n setZIndex(zindex) {\n this.set(LayerProperty.Z_INDEX, zindex);\n }\n\n /**\n * Clean up.\n */\n disposeInternal() {\n if (this.state_) {\n this.state_.layer = null;\n this.state_ = null;\n }\n super.disposeInternal();\n }\n}\n\nexport default BaseLayer;\n","/**\n * @module ol/render/EventType\n */\n\n/**\n * @enum {string}\n */\nexport default {\n /**\n * Triggered before a layer is rendered.\n * @event module:ol/render/Event~RenderEvent#prerender\n * @api\n */\n PRERENDER: 'prerender',\n\n /**\n * Triggered after a layer is rendered.\n * @event module:ol/render/Event~RenderEvent#postrender\n * @api\n */\n POSTRENDER: 'postrender',\n\n /**\n * Triggered before layers are composed. When dispatched by the map, the event object will not have\n * a `context` set. When dispatched by a layer, the event object will have a `context` set. Only\n * WebGL layers currently dispatch this event.\n * @event module:ol/render/Event~RenderEvent#precompose\n * @api\n */\n PRECOMPOSE: 'precompose',\n\n /**\n * Triggered after layers are composed. When dispatched by the map, the event object will not have\n * a `context` set. When dispatched by a layer, the event object will have a `context` set. Only\n * WebGL layers currently dispatch this event.\n * @event module:ol/render/Event~RenderEvent#postcompose\n * @api\n */\n POSTCOMPOSE: 'postcompose',\n\n /**\n * Triggered when rendering is complete, i.e. all sources and tiles have\n * finished loading for the current viewport, and all tiles are faded in.\n * The event object will not have a `context` set.\n * @event module:ol/render/Event~RenderEvent#rendercomplete\n * @api\n */\n RENDERCOMPLETE: 'rendercomplete',\n};\n\n/**\n * @typedef {'postrender'|'precompose'|'postcompose'|'rendercomplete'} MapRenderEventTypes\n */\n\n/**\n * @typedef {'postrender'|'prerender'} LayerRenderEventTypes\n */\n","/**\n * @module ol/layer/Layer\n */\nimport BaseLayer from './Base.js';\nimport EventType from '../events/EventType.js';\nimport LayerProperty from './Property.js';\nimport RenderEventType from '../render/EventType.js';\nimport {assert} from '../asserts.js';\nimport {listen, unlistenByKey} from '../events.js';\n\n/**\n * @typedef {function(import(\"../Map.js\").FrameState):HTMLElement} RenderFunction\n */\n\n/**\n * @typedef {'sourceready'|'change:source'} LayerEventType\n */\n\n/***\n * @template Return\n * @typedef {import(\"../Observable\").OnSignature &\n * import(\"../Observable\").OnSignature &\n * import(\"../Observable\").OnSignature &\n * import(\"../Observable\").CombinedOnSignature} LayerOnSignature\n */\n\n/**\n * @template {import(\"../source/Source.js\").default} [SourceType=import(\"../source/Source.js\").default]\n * @typedef {Object} Options\n * @property {string} [className='ol-layer'] A CSS class name to set to the layer element.\n * @property {number} [opacity=1] Opacity (0, 1).\n * @property {boolean} [visible=true] Visibility.\n * @property {import(\"../extent.js\").Extent} [extent] The bounding extent for layer rendering. The layer will not be\n * rendered outside of this extent.\n * @property {number} [zIndex] The z-index for layer rendering. At rendering time, the layers\n * will be ordered, first by Z-index and then by position. When `undefined`, a `zIndex` of 0 is assumed\n * for layers that are added to the map's `layers` collection, or `Infinity` when the layer's `setMap()`\n * method was used.\n * @property {number} [minResolution] The minimum resolution (inclusive) at which this layer will be\n * visible.\n * @property {number} [maxResolution] The maximum resolution (exclusive) below which this layer will\n * be visible.\n * @property {number} [minZoom] The minimum view zoom level (exclusive) above which this layer will be\n * visible.\n * @property {number} [maxZoom] The maximum view zoom level (inclusive) at which this layer will\n * be visible.\n * @property {SourceType} [source] Source for this layer. If not provided to the constructor,\n * the source can be set by calling {@link module:ol/layer/Layer~Layer#setSource layer.setSource(source)} after\n * construction.\n * @property {import(\"../Map.js\").default|null} [map] Map.\n * @property {RenderFunction} [render] Render function. Takes the frame state as input and is expected to return an\n * HTML element. Will overwrite the default rendering for the layer.\n * @property {Object} [properties] Arbitrary observable properties. Can be accessed with `#get()` and `#set()`.\n */\n\n/**\n * @typedef {Object} State\n * @property {import(\"./Layer.js\").default} layer Layer.\n * @property {number} opacity Opacity, the value is rounded to two digits to appear after the decimal point.\n * @property {boolean} visible Visible.\n * @property {boolean} managed Managed.\n * @property {import(\"../extent.js\").Extent} [extent] Extent.\n * @property {number} zIndex ZIndex.\n * @property {number} maxResolution Maximum resolution.\n * @property {number} minResolution Minimum resolution.\n * @property {number} minZoom Minimum zoom.\n * @property {number} maxZoom Maximum zoom.\n */\n\n/**\n * @classdesc\n * Base class from which all layer types are derived. This should only be instantiated\n * in the case where a custom layer is added to the map with a custom `render` function.\n * Such a function can be specified in the `options` object, and is expected to return an HTML element.\n *\n * A visual representation of raster or vector map data.\n * Layers group together those properties that pertain to how the data is to be\n * displayed, irrespective of the source of that data.\n *\n * Layers are usually added to a map with [map.addLayer()]{@link import(\"../Map.js\").default#addLayer}.\n * Components like {@link module:ol/interaction/Draw~Draw} use unmanaged layers\n * internally. These unmanaged layers are associated with the map using\n * [layer.setMap()]{@link module:ol/layer/Layer~Layer#setMap} instead.\n *\n * A generic `change` event is fired when the state of the source changes.\n * A `sourceready` event is fired when the layer's source is ready.\n *\n * @fires import(\"../render/Event.js\").RenderEvent#prerender\n * @fires import(\"../render/Event.js\").RenderEvent#postrender\n * @fires import(\"../events/Event.js\").BaseEvent#sourceready\n *\n * @template {import(\"../source/Source.js\").default} [SourceType=import(\"../source/Source.js\").default]\n * @template {import(\"../renderer/Layer.js\").default} [RendererType=import(\"../renderer/Layer.js\").default]\n * @api\n */\nclass Layer extends BaseLayer {\n /**\n * @param {Options} options Layer options.\n */\n constructor(options) {\n const baseOptions = Object.assign({}, options);\n delete baseOptions.source;\n\n super(baseOptions);\n\n /***\n * @type {LayerOnSignature}\n */\n this.on;\n\n /***\n * @type {LayerOnSignature}\n */\n this.once;\n\n /***\n * @type {LayerOnSignature}\n */\n this.un;\n\n /**\n * @private\n * @type {?import(\"../events.js\").EventsKey}\n */\n this.mapPrecomposeKey_ = null;\n\n /**\n * @private\n * @type {?import(\"../events.js\").EventsKey}\n */\n this.mapRenderKey_ = null;\n\n /**\n * @private\n * @type {?import(\"../events.js\").EventsKey}\n */\n this.sourceChangeKey_ = null;\n\n /**\n * @private\n * @type {RendererType}\n */\n this.renderer_ = null;\n\n /**\n * @private\n * @type {boolean}\n */\n this.sourceReady_ = false;\n\n /**\n * @protected\n * @type {boolean}\n */\n this.rendered = false;\n\n // Overwrite default render method with a custom one\n if (options.render) {\n this.render = options.render;\n }\n\n if (options.map) {\n this.setMap(options.map);\n }\n\n this.addChangeListener(\n LayerProperty.SOURCE,\n this.handleSourcePropertyChange_\n );\n\n const source = options.source\n ? /** @type {SourceType} */ (options.source)\n : null;\n this.setSource(source);\n }\n\n /**\n * @param {Array} [array] Array of layers (to be modified in place).\n * @return {Array} Array of layers.\n */\n getLayersArray(array) {\n array = array ? array : [];\n array.push(this);\n return array;\n }\n\n /**\n * @param {Array} [states] Optional list of layer states (to be modified in place).\n * @return {Array} List of layer states.\n */\n getLayerStatesArray(states) {\n states = states ? states : [];\n states.push(this.getLayerState());\n return states;\n }\n\n /**\n * Get the layer source.\n * @return {SourceType|null} The layer source (or `null` if not yet set).\n * @observable\n * @api\n */\n getSource() {\n return /** @type {SourceType} */ (this.get(LayerProperty.SOURCE)) || null;\n }\n\n /**\n * @return {SourceType|null} The source being rendered.\n */\n getRenderSource() {\n return this.getSource();\n }\n\n /**\n * @return {import(\"../source/Source.js\").State} Source state.\n */\n getSourceState() {\n const source = this.getSource();\n return !source ? 'undefined' : source.getState();\n }\n\n /**\n * @private\n */\n handleSourceChange_() {\n this.changed();\n if (this.sourceReady_ || this.getSource().getState() !== 'ready') {\n return;\n }\n this.sourceReady_ = true;\n this.dispatchEvent('sourceready');\n }\n\n /**\n * @private\n */\n handleSourcePropertyChange_() {\n if (this.sourceChangeKey_) {\n unlistenByKey(this.sourceChangeKey_);\n this.sourceChangeKey_ = null;\n }\n this.sourceReady_ = false;\n const source = this.getSource();\n if (source) {\n this.sourceChangeKey_ = listen(\n source,\n EventType.CHANGE,\n this.handleSourceChange_,\n this\n );\n if (source.getState() === 'ready') {\n this.sourceReady_ = true;\n setTimeout(() => {\n this.dispatchEvent('sourceready');\n }, 0);\n }\n }\n this.changed();\n }\n\n /**\n * @param {import(\"../pixel\").Pixel} pixel Pixel.\n * @return {Promise>} Promise that resolves with\n * an array of features.\n */\n getFeatures(pixel) {\n if (!this.renderer_) {\n return Promise.resolve([]);\n }\n return this.renderer_.getFeatures(pixel);\n }\n\n /**\n * @param {import(\"../pixel\").Pixel} pixel Pixel.\n * @return {Uint8ClampedArray|Uint8Array|Float32Array|DataView|null} Pixel data.\n */\n getData(pixel) {\n if (!this.renderer_ || !this.rendered) {\n return null;\n }\n return this.renderer_.getData(pixel);\n }\n\n /**\n * In charge to manage the rendering of the layer. One layer type is\n * bounded with one layer renderer.\n * @param {?import(\"../Map.js\").FrameState} frameState Frame state.\n * @param {HTMLElement} target Target which the renderer may (but need not) use\n * for rendering its content.\n * @return {HTMLElement} The rendered element.\n */\n render(frameState, target) {\n const layerRenderer = this.getRenderer();\n\n if (layerRenderer.prepareFrame(frameState)) {\n this.rendered = true;\n return layerRenderer.renderFrame(frameState, target);\n }\n }\n\n /**\n * Called when a layer is not visible during a map render.\n */\n unrender() {\n this.rendered = false;\n }\n\n /**\n * For use inside the library only.\n * @param {import(\"../Map.js\").default|null} map Map.\n */\n setMapInternal(map) {\n if (!map) {\n this.unrender();\n }\n this.set(LayerProperty.MAP, map);\n }\n\n /**\n * For use inside the library only.\n * @return {import(\"../Map.js\").default|null} Map.\n */\n getMapInternal() {\n return this.get(LayerProperty.MAP);\n }\n\n /**\n * Sets the layer to be rendered on top of other layers on a map. The map will\n * not manage this layer in its layers collection. This\n * is useful for temporary layers. To remove an unmanaged layer from the map,\n * use `#setMap(null)`.\n *\n * To add the layer to a map and have it managed by the map, use\n * {@link module:ol/Map~Map#addLayer} instead.\n * @param {import(\"../Map.js\").default|null} map Map.\n * @api\n */\n setMap(map) {\n if (this.mapPrecomposeKey_) {\n unlistenByKey(this.mapPrecomposeKey_);\n this.mapPrecomposeKey_ = null;\n }\n if (!map) {\n this.changed();\n }\n if (this.mapRenderKey_) {\n unlistenByKey(this.mapRenderKey_);\n this.mapRenderKey_ = null;\n }\n if (map) {\n this.mapPrecomposeKey_ = listen(\n map,\n RenderEventType.PRECOMPOSE,\n function (evt) {\n const renderEvent =\n /** @type {import(\"../render/Event.js\").default} */ (evt);\n const layerStatesArray = renderEvent.frameState.layerStatesArray;\n const layerState = this.getLayerState(false);\n // A layer can only be added to the map once. Use either `layer.setMap()` or `map.addLayer()`, not both.\n assert(\n !layerStatesArray.some(function (arrayLayerState) {\n return arrayLayerState.layer === layerState.layer;\n }),\n 67\n );\n layerStatesArray.push(layerState);\n },\n this\n );\n this.mapRenderKey_ = listen(this, EventType.CHANGE, map.render, map);\n this.changed();\n }\n }\n\n /**\n * Set the layer source.\n * @param {SourceType|null} source The layer source.\n * @observable\n * @api\n */\n setSource(source) {\n this.set(LayerProperty.SOURCE, source);\n }\n\n /**\n * Get the renderer for this layer.\n * @return {RendererType|null} The layer renderer.\n */\n getRenderer() {\n if (!this.renderer_) {\n this.renderer_ = this.createRenderer();\n }\n return this.renderer_;\n }\n\n /**\n * @return {boolean} The layer has a renderer.\n */\n hasRenderer() {\n return !!this.renderer_;\n }\n\n /**\n * Create a renderer for this layer.\n * @return {RendererType} A layer renderer.\n * @protected\n */\n createRenderer() {\n return null;\n }\n\n /**\n * Clean up.\n */\n disposeInternal() {\n if (this.renderer_) {\n this.renderer_.dispose();\n delete this.renderer_;\n }\n\n this.setSource(null);\n super.disposeInternal();\n }\n}\n\n/**\n * Return `true` if the layer is visible and if the provided view state\n * has resolution and zoom levels that are in range of the layer's min/max.\n * @param {State} layerState Layer state.\n * @param {import(\"../View.js\").State} viewState View state.\n * @return {boolean} The layer is visible at the given view state.\n */\nexport function inView(layerState, viewState) {\n if (!layerState.visible) {\n return false;\n }\n const resolution = viewState.resolution;\n if (\n resolution < layerState.minResolution ||\n resolution >= layerState.maxResolution\n ) {\n return false;\n }\n const zoom = viewState.zoom;\n return zoom > layerState.minZoom && zoom <= layerState.maxZoom;\n}\n\nexport default Layer;\n","/**\n * @module ol/renderer/Map\n */\nimport Disposable from '../Disposable.js';\nimport {TRUE} from '../functions.js';\nimport {abstract} from '../util.js';\nimport {compose as composeTransform, makeInverse} from '../transform.js';\nimport {getWidth} from '../extent.js';\nimport {shared as iconImageCache} from '../style/IconImageCache.js';\nimport {inView} from '../layer/Layer.js';\nimport {wrapX} from '../coordinate.js';\n\n/**\n * @typedef HitMatch\n * @property {import(\"../Feature.js\").FeatureLike} feature Feature.\n * @property {import(\"../layer/Layer.js\").default} layer Layer.\n * @property {import(\"../geom/SimpleGeometry.js\").default} geometry Geometry.\n * @property {number} distanceSq Squared distance.\n * @property {import(\"./vector.js\").FeatureCallback} callback Callback.\n * @template T\n */\n\n/**\n * @abstract\n */\nclass MapRenderer extends Disposable {\n /**\n * @param {import(\"../Map.js\").default} map Map.\n */\n constructor(map) {\n super();\n\n /**\n * @private\n * @type {import(\"../Map.js\").default}\n */\n this.map_ = map;\n }\n\n /**\n * @abstract\n * @param {import(\"../render/EventType.js\").default} type Event type.\n * @param {import(\"../Map.js\").FrameState} frameState Frame state.\n */\n dispatchRenderEvent(type, frameState) {\n abstract();\n }\n\n /**\n * @param {import(\"../Map.js\").FrameState} frameState FrameState.\n * @protected\n */\n calculateMatrices2D(frameState) {\n const viewState = frameState.viewState;\n const coordinateToPixelTransform = frameState.coordinateToPixelTransform;\n const pixelToCoordinateTransform = frameState.pixelToCoordinateTransform;\n\n composeTransform(\n coordinateToPixelTransform,\n frameState.size[0] / 2,\n frameState.size[1] / 2,\n 1 / viewState.resolution,\n -1 / viewState.resolution,\n -viewState.rotation,\n -viewState.center[0],\n -viewState.center[1]\n );\n\n makeInverse(pixelToCoordinateTransform, coordinateToPixelTransform);\n }\n\n /**\n * @param {import(\"../coordinate.js\").Coordinate} coordinate Coordinate.\n * @param {import(\"../Map.js\").FrameState} frameState FrameState.\n * @param {number} hitTolerance Hit tolerance in pixels.\n * @param {boolean} checkWrapped Check for wrapped geometries.\n * @param {import(\"./vector.js\").FeatureCallback} callback Feature callback.\n * @param {S} thisArg Value to use as `this` when executing `callback`.\n * @param {function(this: U, import(\"../layer/Layer.js\").default): boolean} layerFilter Layer filter\n * function, only layers which are visible and for which this function\n * returns `true` will be tested for features. By default, all visible\n * layers will be tested.\n * @param {U} thisArg2 Value to use as `this` when executing `layerFilter`.\n * @return {T|undefined} Callback result.\n * @template S,T,U\n */\n forEachFeatureAtCoordinate(\n coordinate,\n frameState,\n hitTolerance,\n checkWrapped,\n callback,\n thisArg,\n layerFilter,\n thisArg2\n ) {\n let result;\n const viewState = frameState.viewState;\n\n /**\n * @param {boolean} managed Managed layer.\n * @param {import(\"../Feature.js\").FeatureLike} feature Feature.\n * @param {import(\"../layer/Layer.js\").default} layer Layer.\n * @param {import(\"../geom/Geometry.js\").default} geometry Geometry.\n * @return {T|undefined} Callback result.\n */\n function forEachFeatureAtCoordinate(managed, feature, layer, geometry) {\n return callback.call(thisArg, feature, managed ? layer : null, geometry);\n }\n\n const projection = viewState.projection;\n\n const translatedCoordinate = wrapX(coordinate.slice(), projection);\n const offsets = [[0, 0]];\n if (projection.canWrapX() && checkWrapped) {\n const projectionExtent = projection.getExtent();\n const worldWidth = getWidth(projectionExtent);\n offsets.push([-worldWidth, 0], [worldWidth, 0]);\n }\n\n const layerStates = frameState.layerStatesArray;\n const numLayers = layerStates.length;\n\n const matches = /** @type {Array>} */ ([]);\n const tmpCoord = [];\n for (let i = 0; i < offsets.length; i++) {\n for (let j = numLayers - 1; j >= 0; --j) {\n const layerState = layerStates[j];\n const layer = layerState.layer;\n if (\n layer.hasRenderer() &&\n inView(layerState, viewState) &&\n layerFilter.call(thisArg2, layer)\n ) {\n const layerRenderer = layer.getRenderer();\n const source = layer.getSource();\n if (layerRenderer && source) {\n const coordinates = source.getWrapX()\n ? translatedCoordinate\n : coordinate;\n const callback = forEachFeatureAtCoordinate.bind(\n null,\n layerState.managed\n );\n tmpCoord[0] = coordinates[0] + offsets[i][0];\n tmpCoord[1] = coordinates[1] + offsets[i][1];\n result = layerRenderer.forEachFeatureAtCoordinate(\n tmpCoord,\n frameState,\n hitTolerance,\n callback,\n matches\n );\n }\n if (result) {\n return result;\n }\n }\n }\n }\n if (matches.length === 0) {\n return undefined;\n }\n const order = 1 / matches.length;\n matches.forEach((m, i) => (m.distanceSq += i * order));\n matches.sort((a, b) => a.distanceSq - b.distanceSq);\n matches.some((m) => {\n return (result = m.callback(m.feature, m.layer, m.geometry));\n });\n return result;\n }\n\n /**\n * @param {import(\"../coordinate.js\").Coordinate} coordinate Coordinate.\n * @param {import(\"../Map.js\").FrameState} frameState FrameState.\n * @param {number} hitTolerance Hit tolerance in pixels.\n * @param {boolean} checkWrapped Check for wrapped geometries.\n * @param {function(this: U, import(\"../layer/Layer.js\").default): boolean} layerFilter Layer filter\n * function, only layers which are visible and for which this function\n * returns `true` will be tested for features. By default, all visible\n * layers will be tested.\n * @param {U} thisArg Value to use as `this` when executing `layerFilter`.\n * @return {boolean} Is there a feature at the given coordinate?\n * @template U\n */\n hasFeatureAtCoordinate(\n coordinate,\n frameState,\n hitTolerance,\n checkWrapped,\n layerFilter,\n thisArg\n ) {\n const hasFeature = this.forEachFeatureAtCoordinate(\n coordinate,\n frameState,\n hitTolerance,\n checkWrapped,\n TRUE,\n this,\n layerFilter,\n thisArg\n );\n\n return hasFeature !== undefined;\n }\n\n /**\n * @return {import(\"../Map.js\").default} Map.\n */\n getMap() {\n return this.map_;\n }\n\n /**\n * Render.\n * @abstract\n * @param {?import(\"../Map.js\").FrameState} frameState Frame state.\n */\n renderFrame(frameState) {\n abstract();\n }\n\n /**\n * @param {import(\"../Map.js\").FrameState} frameState Frame state.\n * @protected\n */\n scheduleExpireIconCache(frameState) {\n if (iconImageCache.canExpireCache()) {\n frameState.postRenderFunctions.push(expireIconCache);\n }\n }\n}\n\n/**\n * @param {import(\"../Map.js\").default} map Map.\n * @param {import(\"../Map.js\").FrameState} frameState Frame state.\n */\nfunction expireIconCache(map, frameState) {\n iconImageCache.expire();\n}\n\nexport default MapRenderer;\n","/**\n * @module ol/render/Event\n */\n\nimport Event from '../events/Event.js';\n\nclass RenderEvent extends Event {\n /**\n * @param {import(\"./EventType.js\").default} type Type.\n * @param {import(\"../transform.js\").Transform} [inversePixelTransform] Transform for\n * CSS pixels to rendered pixels.\n * @param {import(\"../Map.js\").FrameState} [frameState] Frame state.\n * @param {?(CanvasRenderingContext2D|WebGLRenderingContext)} [context] Context.\n */\n constructor(type, inversePixelTransform, frameState, context) {\n super(type);\n\n /**\n * Transform from CSS pixels (relative to the top-left corner of the map viewport)\n * to rendered pixels on this event's `context`. Only available when a Canvas renderer is used, null otherwise.\n * @type {import(\"../transform.js\").Transform|undefined}\n * @api\n */\n this.inversePixelTransform = inversePixelTransform;\n\n /**\n * An object representing the current render frame state.\n * @type {import(\"../Map.js\").FrameState|undefined}\n * @api\n */\n this.frameState = frameState;\n\n /**\n * Canvas context. Not available when the event is dispatched by the map. For Canvas 2D layers,\n * the context will be the 2D rendering context. For WebGL layers, the context will be the WebGL\n * context.\n * @type {CanvasRenderingContext2D|WebGLRenderingContext|undefined}\n * @api\n */\n this.context = context;\n }\n}\n\nexport default RenderEvent;\n","/**\n * @module ol/css\n */\n\n/**\n * @typedef {Object} FontParameters\n * @property {string} style Style.\n * @property {string} variant Variant.\n * @property {string} weight Weight.\n * @property {string} size Size.\n * @property {string} lineHeight LineHeight.\n * @property {string} family Family.\n * @property {Array} families Families.\n */\n\n/**\n * The CSS class for hidden feature.\n *\n * @const\n * @type {string}\n */\nexport const CLASS_HIDDEN = 'ol-hidden';\n\n/**\n * The CSS class that we'll give the DOM elements to have them selectable.\n *\n * @const\n * @type {string}\n */\nexport const CLASS_SELECTABLE = 'ol-selectable';\n\n/**\n * The CSS class that we'll give the DOM elements to have them unselectable.\n *\n * @const\n * @type {string}\n */\nexport const CLASS_UNSELECTABLE = 'ol-unselectable';\n\n/**\n * The CSS class for unsupported feature.\n *\n * @const\n * @type {string}\n */\nexport const CLASS_UNSUPPORTED = 'ol-unsupported';\n\n/**\n * The CSS class for controls.\n *\n * @const\n * @type {string}\n */\nexport const CLASS_CONTROL = 'ol-control';\n\n/**\n * The CSS class that we'll give the DOM elements that are collapsed, i.e.\n * to those elements which usually can be expanded.\n *\n * @const\n * @type {string}\n */\nexport const CLASS_COLLAPSED = 'ol-collapsed';\n\n/**\n * From https://stackoverflow.com/questions/10135697/regex-to-parse-any-css-font\n * @type {RegExp}\n */\nconst fontRegEx = new RegExp(\n [\n '^\\\\s*(?=(?:(?:[-a-z]+\\\\s*){0,2}(italic|oblique))?)',\n '(?=(?:(?:[-a-z]+\\\\s*){0,2}(small-caps))?)',\n '(?=(?:(?:[-a-z]+\\\\s*){0,2}(bold(?:er)?|lighter|[1-9]00 ))?)',\n '(?:(?:normal|\\\\1|\\\\2|\\\\3)\\\\s*){0,3}((?:xx?-)?',\n '(?:small|large)|medium|smaller|larger|[\\\\.\\\\d]+(?:\\\\%|in|[cem]m|ex|p[ctx]))',\n '(?:\\\\s*\\\\/\\\\s*(normal|[\\\\.\\\\d]+(?:\\\\%|in|[cem]m|ex|p[ctx])?))',\n '?\\\\s*([-,\\\\\"\\\\\\'\\\\sa-z]+?)\\\\s*$',\n ].join(''),\n 'i'\n);\nconst fontRegExMatchIndex = [\n 'style',\n 'variant',\n 'weight',\n 'size',\n 'lineHeight',\n 'family',\n];\n\n/**\n * Get the list of font families from a font spec. Note that this doesn't work\n * for font families that have commas in them.\n * @param {string} fontSpec The CSS font property.\n * @return {FontParameters|null} The font parameters (or null if the input spec is invalid).\n */\nexport const getFontParameters = function (fontSpec) {\n const match = fontSpec.match(fontRegEx);\n if (!match) {\n return null;\n }\n const style = /** @type {FontParameters} */ ({\n lineHeight: 'normal',\n size: '1.2em',\n style: 'normal',\n weight: 'normal',\n variant: 'normal',\n });\n for (let i = 0, ii = fontRegExMatchIndex.length; i < ii; ++i) {\n const value = match[i + 1];\n if (value !== undefined) {\n style[fontRegExMatchIndex[i]] = value;\n }\n }\n style.families = style.family.split(/,\\s?/);\n return style;\n};\n","/**\n * @module ol/render/canvas\n */\nimport BaseObject from '../Object.js';\nimport {WORKER_OFFSCREEN_CANVAS} from '../has.js';\nimport {clear} from '../obj.js';\nimport {createCanvasContext2D} from '../dom.js';\nimport {getFontParameters} from '../css.js';\n\n/**\n * @typedef {'Circle' | 'Image' | 'LineString' | 'Polygon' | 'Text' | 'Default'} BuilderType\n */\n\n/**\n * @typedef {Object} FillState\n * @property {import(\"../colorlike.js\").ColorLike} fillStyle FillStyle.\n */\n\n/**\n * @typedef Label\n * @property {number} width Width.\n * @property {number} height Height.\n * @property {Array} contextInstructions ContextInstructions.\n */\n\n/**\n * @typedef {Object} FillStrokeState\n * @property {import(\"../colorlike.js\").ColorLike} [currentFillStyle] Current FillStyle.\n * @property {import(\"../colorlike.js\").ColorLike} [currentStrokeStyle] Current StrokeStyle.\n * @property {CanvasLineCap} [currentLineCap] Current LineCap.\n * @property {Array} currentLineDash Current LineDash.\n * @property {number} [currentLineDashOffset] Current LineDashOffset.\n * @property {CanvasLineJoin} [currentLineJoin] Current LineJoin.\n * @property {number} [currentLineWidth] Current LineWidth.\n * @property {number} [currentMiterLimit] Current MiterLimit.\n * @property {number} [lastStroke] Last stroke.\n * @property {import(\"../colorlike.js\").ColorLike} [fillStyle] FillStyle.\n * @property {import(\"../colorlike.js\").ColorLike} [strokeStyle] StrokeStyle.\n * @property {CanvasLineCap} [lineCap] LineCap.\n * @property {Array} lineDash LineDash.\n * @property {number} [lineDashOffset] LineDashOffset.\n * @property {CanvasLineJoin} [lineJoin] LineJoin.\n * @property {number} [lineWidth] LineWidth.\n * @property {number} [miterLimit] MiterLimit.\n */\n\n/**\n * @typedef {Object} StrokeState\n * @property {CanvasLineCap} lineCap LineCap.\n * @property {Array} lineDash LineDash.\n * @property {number} lineDashOffset LineDashOffset.\n * @property {CanvasLineJoin} lineJoin LineJoin.\n * @property {number} lineWidth LineWidth.\n * @property {number} miterLimit MiterLimit.\n * @property {import(\"../colorlike.js\").ColorLike} strokeStyle StrokeStyle.\n */\n\n/**\n * @typedef {Object} TextState\n * @property {string} font Font.\n * @property {CanvasTextAlign} [textAlign] TextAlign.\n * @property {import(\"../style/Text.js\").TextJustify} [justify] Justify.\n * @property {CanvasTextBaseline} textBaseline TextBaseline.\n * @property {import(\"../style/Text.js\").TextPlacement} [placement] Placement.\n * @property {number} [maxAngle] MaxAngle.\n * @property {boolean} [overflow] Overflow.\n * @property {import(\"../style/Fill.js\").default} [backgroundFill] BackgroundFill.\n * @property {import(\"../style/Stroke.js\").default} [backgroundStroke] BackgroundStroke.\n * @property {import(\"../size.js\").Size} [scale] Scale.\n * @property {Array} [padding] Padding.\n */\n\n/**\n * @typedef {Object} SerializableInstructions\n * @property {Array<*>} instructions The rendering instructions.\n * @property {Array<*>} hitDetectionInstructions The rendering hit detection instructions.\n * @property {Array} coordinates The array of all coordinates.\n * @property {!Object} [textStates] The text states (decluttering).\n * @property {!Object} [fillStates] The fill states (decluttering).\n * @property {!Object} [strokeStates] The stroke states (decluttering).\n */\n\n/**\n * @typedef {Object} DeclutterImageWithText\n */\n\n/**\n * @const\n * @type {string}\n */\nexport const defaultFont = '10px sans-serif';\n\n/**\n * @const\n * @type {import(\"../colorlike.js\").ColorLike}\n */\nexport const defaultFillStyle = '#000';\n\n/**\n * @const\n * @type {CanvasLineCap}\n */\nexport const defaultLineCap = 'round';\n\n/**\n * @const\n * @type {Array}\n */\nexport const defaultLineDash = [];\n\n/**\n * @const\n * @type {number}\n */\nexport const defaultLineDashOffset = 0;\n\n/**\n * @const\n * @type {CanvasLineJoin}\n */\nexport const defaultLineJoin = 'round';\n\n/**\n * @const\n * @type {number}\n */\nexport const defaultMiterLimit = 10;\n\n/**\n * @const\n * @type {import(\"../colorlike.js\").ColorLike}\n */\nexport const defaultStrokeStyle = '#000';\n\n/**\n * @const\n * @type {CanvasTextAlign}\n */\nexport const defaultTextAlign = 'center';\n\n/**\n * @const\n * @type {CanvasTextBaseline}\n */\nexport const defaultTextBaseline = 'middle';\n\n/**\n * @const\n * @type {Array}\n */\nexport const defaultPadding = [0, 0, 0, 0];\n\n/**\n * @const\n * @type {number}\n */\nexport const defaultLineWidth = 1;\n\n/**\n * @type {BaseObject}\n */\nexport const checkedFonts = new BaseObject();\n\n/**\n * @type {CanvasRenderingContext2D}\n */\nlet measureContext = null;\n\n/**\n * @type {string}\n */\nlet measureFont;\n\n/**\n * @type {!Object}\n */\nexport const textHeights = {};\n\n/**\n * Clears the label cache when a font becomes available.\n * @param {string} fontSpec CSS font spec.\n */\nexport const registerFont = (function () {\n const retries = 100;\n const size = '32px ';\n const referenceFonts = ['monospace', 'serif'];\n const len = referenceFonts.length;\n const text = 'wmytzilWMYTZIL@#/&?$%10\\uF013';\n let interval, referenceWidth;\n\n /**\n * @param {string} fontStyle Css font-style\n * @param {string} fontWeight Css font-weight\n * @param {*} fontFamily Css font-family\n * @return {boolean} Font with style and weight is available\n */\n function isAvailable(fontStyle, fontWeight, fontFamily) {\n let available = true;\n for (let i = 0; i < len; ++i) {\n const referenceFont = referenceFonts[i];\n referenceWidth = measureTextWidth(\n fontStyle + ' ' + fontWeight + ' ' + size + referenceFont,\n text\n );\n if (fontFamily != referenceFont) {\n const width = measureTextWidth(\n fontStyle +\n ' ' +\n fontWeight +\n ' ' +\n size +\n fontFamily +\n ',' +\n referenceFont,\n text\n );\n // If width and referenceWidth are the same, then the fallback was used\n // instead of the font we wanted, so the font is not available.\n available = available && width != referenceWidth;\n }\n }\n if (available) {\n return true;\n }\n return false;\n }\n\n function check() {\n let done = true;\n const fonts = checkedFonts.getKeys();\n for (let i = 0, ii = fonts.length; i < ii; ++i) {\n const font = fonts[i];\n if (checkedFonts.get(font) < retries) {\n if (isAvailable.apply(this, font.split('\\n'))) {\n clear(textHeights);\n // Make sure that loaded fonts are picked up by Safari\n measureContext = null;\n measureFont = undefined;\n checkedFonts.set(font, retries);\n } else {\n checkedFonts.set(font, checkedFonts.get(font) + 1, true);\n done = false;\n }\n }\n }\n if (done) {\n clearInterval(interval);\n interval = undefined;\n }\n }\n\n return function (fontSpec) {\n const font = getFontParameters(fontSpec);\n if (!font) {\n return;\n }\n const families = font.families;\n for (let i = 0, ii = families.length; i < ii; ++i) {\n const family = families[i];\n const key = font.style + '\\n' + font.weight + '\\n' + family;\n if (checkedFonts.get(key) === undefined) {\n checkedFonts.set(key, retries, true);\n if (!isAvailable(font.style, font.weight, family)) {\n checkedFonts.set(key, 0, true);\n if (interval === undefined) {\n interval = setInterval(check, 32);\n }\n }\n }\n }\n };\n})();\n\n/**\n * @param {string} font Font to use for measuring.\n * @return {import(\"../size.js\").Size} Measurement.\n */\nexport const measureTextHeight = (function () {\n /**\n * @type {HTMLDivElement}\n */\n let measureElement;\n return function (fontSpec) {\n let height = textHeights[fontSpec];\n if (height == undefined) {\n if (WORKER_OFFSCREEN_CANVAS) {\n const font = getFontParameters(fontSpec);\n const metrics = measureText(fontSpec, 'Žg');\n const lineHeight = isNaN(Number(font.lineHeight))\n ? 1.2\n : Number(font.lineHeight);\n height =\n lineHeight *\n (metrics.actualBoundingBoxAscent + metrics.actualBoundingBoxDescent);\n } else {\n if (!measureElement) {\n measureElement = document.createElement('div');\n measureElement.innerHTML = 'M';\n measureElement.style.minHeight = '0';\n measureElement.style.maxHeight = 'none';\n measureElement.style.height = 'auto';\n measureElement.style.padding = '0';\n measureElement.style.border = 'none';\n measureElement.style.position = 'absolute';\n measureElement.style.display = 'block';\n measureElement.style.left = '-99999px';\n }\n measureElement.style.font = fontSpec;\n document.body.appendChild(measureElement);\n height = measureElement.offsetHeight;\n document.body.removeChild(measureElement);\n }\n textHeights[fontSpec] = height;\n }\n return height;\n };\n})();\n\n/**\n * @param {string} font Font.\n * @param {string} text Text.\n * @return {TextMetrics} Text metrics.\n */\nfunction measureText(font, text) {\n if (!measureContext) {\n measureContext = createCanvasContext2D(1, 1);\n }\n if (font != measureFont) {\n measureContext.font = font;\n measureFont = measureContext.font;\n }\n return measureContext.measureText(text);\n}\n\n/**\n * @param {string} font Font.\n * @param {string} text Text.\n * @return {number} Width.\n */\nexport function measureTextWidth(font, text) {\n return measureText(font, text).width;\n}\n\n/**\n * Measure text width using a cache.\n * @param {string} font The font.\n * @param {string} text The text to measure.\n * @param {Object} cache A lookup of cached widths by text.\n * @return {number} The text width.\n */\nexport function measureAndCacheTextWidth(font, text, cache) {\n if (text in cache) {\n return cache[text];\n }\n const width = text\n .split('\\n')\n .reduce((prev, curr) => Math.max(prev, measureTextWidth(font, curr)), 0);\n cache[text] = width;\n return width;\n}\n\n/**\n * @param {TextState} baseStyle Base style.\n * @param {Array} chunks Text chunks to measure.\n * @return {{width: number, height: number, widths: Array, heights: Array, lineWidths: Array}}} Text metrics.\n */\nexport function getTextDimensions(baseStyle, chunks) {\n const widths = [];\n const heights = [];\n const lineWidths = [];\n let width = 0;\n let lineWidth = 0;\n let height = 0;\n let lineHeight = 0;\n for (let i = 0, ii = chunks.length; i <= ii; i += 2) {\n const text = chunks[i];\n if (text === '\\n' || i === ii) {\n width = Math.max(width, lineWidth);\n lineWidths.push(lineWidth);\n lineWidth = 0;\n height += lineHeight;\n continue;\n }\n const font = chunks[i + 1] || baseStyle.font;\n const currentWidth = measureTextWidth(font, text);\n widths.push(currentWidth);\n lineWidth += currentWidth;\n const currentHeight = measureTextHeight(font);\n heights.push(currentHeight);\n lineHeight = Math.max(lineHeight, currentHeight);\n }\n return {width, height, widths, heights, lineWidths};\n}\n\n/**\n * @param {CanvasRenderingContext2D} context Context.\n * @param {number} rotation Rotation.\n * @param {number} offsetX X offset.\n * @param {number} offsetY Y offset.\n */\nexport function rotateAtOffset(context, rotation, offsetX, offsetY) {\n if (rotation !== 0) {\n context.translate(offsetX, offsetY);\n context.rotate(rotation);\n context.translate(-offsetX, -offsetY);\n }\n}\n\n/**\n * @param {CanvasRenderingContext2D} context Context.\n * @param {import(\"../transform.js\").Transform|null} transform Transform.\n * @param {number} opacity Opacity.\n * @param {Label|HTMLCanvasElement|HTMLImageElement|HTMLVideoElement} labelOrImage Label.\n * @param {number} originX Origin X.\n * @param {number} originY Origin Y.\n * @param {number} w Width.\n * @param {number} h Height.\n * @param {number} x X.\n * @param {number} y Y.\n * @param {import(\"../size.js\").Size} scale Scale.\n */\nexport function drawImageOrLabel(\n context,\n transform,\n opacity,\n labelOrImage,\n originX,\n originY,\n w,\n h,\n x,\n y,\n scale\n) {\n context.save();\n\n if (opacity !== 1) {\n context.globalAlpha *= opacity;\n }\n if (transform) {\n context.setTransform.apply(context, transform);\n }\n\n if (/** @type {*} */ (labelOrImage).contextInstructions) {\n // label\n context.translate(x, y);\n context.scale(scale[0], scale[1]);\n executeLabelInstructions(/** @type {Label} */ (labelOrImage), context);\n } else if (scale[0] < 0 || scale[1] < 0) {\n // flipped image\n context.translate(x, y);\n context.scale(scale[0], scale[1]);\n context.drawImage(\n /** @type {HTMLCanvasElement|HTMLImageElement|HTMLVideoElement} */ (\n labelOrImage\n ),\n originX,\n originY,\n w,\n h,\n 0,\n 0,\n w,\n h\n );\n } else {\n // if image not flipped translate and scale can be avoided\n context.drawImage(\n /** @type {HTMLCanvasElement|HTMLImageElement|HTMLVideoElement} */ (\n labelOrImage\n ),\n originX,\n originY,\n w,\n h,\n x,\n y,\n w * scale[0],\n h * scale[1]\n );\n }\n\n context.restore();\n}\n\n/**\n * @param {Label} label Label.\n * @param {CanvasRenderingContext2D} context Context.\n */\nfunction executeLabelInstructions(label, context) {\n const contextInstructions = label.contextInstructions;\n for (let i = 0, ii = contextInstructions.length; i < ii; i += 2) {\n if (Array.isArray(contextInstructions[i + 1])) {\n context[contextInstructions[i]].apply(\n context,\n contextInstructions[i + 1]\n );\n } else {\n context[contextInstructions[i]] = contextInstructions[i + 1];\n }\n }\n}\n","/**\n * @module ol/renderer/Composite\n */\nimport MapRenderer from './Map.js';\nimport ObjectEventType from '../ObjectEventType.js';\nimport RenderEvent from '../render/Event.js';\nimport RenderEventType from '../render/EventType.js';\nimport {CLASS_UNSELECTABLE} from '../css.js';\nimport {checkedFonts} from '../render/canvas.js';\nimport {inView} from '../layer/Layer.js';\nimport {listen, unlistenByKey} from '../events.js';\nimport {replaceChildren} from '../dom.js';\n\n/**\n * @classdesc\n * Canvas map renderer.\n * @api\n */\nclass CompositeMapRenderer extends MapRenderer {\n /**\n * @param {import(\"../Map.js\").default} map Map.\n */\n constructor(map) {\n super(map);\n\n /**\n * @type {import(\"../events.js\").EventsKey}\n */\n this.fontChangeListenerKey_ = listen(\n checkedFonts,\n ObjectEventType.PROPERTYCHANGE,\n map.redrawText.bind(map)\n );\n\n /**\n * @private\n * @type {HTMLDivElement}\n */\n this.element_ = document.createElement('div');\n const style = this.element_.style;\n style.position = 'absolute';\n style.width = '100%';\n style.height = '100%';\n style.zIndex = '0';\n\n this.element_.className = CLASS_UNSELECTABLE + ' ol-layers';\n\n const container = map.getViewport();\n container.insertBefore(this.element_, container.firstChild || null);\n\n /**\n * @private\n * @type {Array}\n */\n this.children_ = [];\n\n /**\n * @private\n * @type {boolean}\n */\n this.renderedVisible_ = true;\n }\n\n /**\n * @param {import(\"../render/EventType.js\").default} type Event type.\n * @param {import(\"../Map.js\").FrameState} frameState Frame state.\n */\n dispatchRenderEvent(type, frameState) {\n const map = this.getMap();\n if (map.hasListener(type)) {\n const event = new RenderEvent(type, undefined, frameState);\n map.dispatchEvent(event);\n }\n }\n\n disposeInternal() {\n unlistenByKey(this.fontChangeListenerKey_);\n this.element_.parentNode.removeChild(this.element_);\n super.disposeInternal();\n }\n\n /**\n * Render.\n * @param {?import(\"../Map.js\").FrameState} frameState Frame state.\n */\n renderFrame(frameState) {\n if (!frameState) {\n if (this.renderedVisible_) {\n this.element_.style.display = 'none';\n this.renderedVisible_ = false;\n }\n return;\n }\n\n this.calculateMatrices2D(frameState);\n this.dispatchRenderEvent(RenderEventType.PRECOMPOSE, frameState);\n\n const layerStatesArray = frameState.layerStatesArray.sort(function (a, b) {\n return a.zIndex - b.zIndex;\n });\n const viewState = frameState.viewState;\n\n this.children_.length = 0;\n /**\n * @type {Array}\n */\n const declutterLayers = [];\n let previousElement = null;\n for (let i = 0, ii = layerStatesArray.length; i < ii; ++i) {\n const layerState = layerStatesArray[i];\n frameState.layerIndex = i;\n\n const layer = layerState.layer;\n const sourceState = layer.getSourceState();\n if (\n !inView(layerState, viewState) ||\n (sourceState != 'ready' && sourceState != 'undefined')\n ) {\n layer.unrender();\n continue;\n }\n\n const element = layer.render(frameState, previousElement);\n if (!element) {\n continue;\n }\n if (element !== previousElement) {\n this.children_.push(element);\n previousElement = element;\n }\n if ('getDeclutter' in layer) {\n declutterLayers.push(\n /** @type {import(\"../layer/BaseVector.js\").default} */ (layer)\n );\n }\n }\n for (let i = declutterLayers.length - 1; i >= 0; --i) {\n declutterLayers[i].renderDeclutter(frameState);\n }\n\n replaceChildren(this.element_, this.children_);\n\n this.dispatchRenderEvent(RenderEventType.POSTCOMPOSE, frameState);\n\n if (!this.renderedVisible_) {\n this.element_.style.display = '';\n this.renderedVisible_ = true;\n }\n\n this.scheduleExpireIconCache(frameState);\n }\n}\n\nexport default CompositeMapRenderer;\n","/**\n * @module ol/layer/Group\n */\nimport BaseLayer from './Base.js';\nimport Collection from '../Collection.js';\nimport CollectionEventType from '../CollectionEventType.js';\nimport Event from '../events/Event.js';\nimport EventType from '../events/EventType.js';\nimport ObjectEventType from '../ObjectEventType.js';\nimport {assert} from '../asserts.js';\nimport {clear} from '../obj.js';\nimport {getIntersection} from '../extent.js';\nimport {getUid} from '../util.js';\nimport {listen, unlistenByKey} from '../events.js';\n\n/**\n * @typedef {'addlayer'|'removelayer'} EventType\n */\n\n/**\n * @classdesc\n * A layer group triggers 'addlayer' and 'removelayer' events when layers are added to or removed from\n * the group or one of its child groups. When a layer group is added to or removed from another layer group,\n * a single event will be triggered (instead of one per layer in the group added or removed).\n */\nexport class GroupEvent extends Event {\n /**\n * @param {EventType} type The event type.\n * @param {BaseLayer} layer The layer.\n */\n constructor(type, layer) {\n super(type);\n\n /**\n * The added or removed layer.\n * @type {BaseLayer}\n * @api\n */\n this.layer = layer;\n }\n}\n\n/***\n * @template Return\n * @typedef {import(\"../Observable\").OnSignature &\n * import(\"../Observable\").OnSignature &\n * import(\"../Observable\").CombinedOnSignature} GroupOnSignature\n */\n\n/**\n * @typedef {Object} Options\n * @property {number} [opacity=1] Opacity (0, 1).\n * @property {boolean} [visible=true] Visibility.\n * @property {import(\"../extent.js\").Extent} [extent] The bounding extent for layer rendering. The layer will not be\n * rendered outside of this extent.\n * @property {number} [zIndex] The z-index for layer rendering. At rendering time, the layers\n * will be ordered, first by Z-index and then by position. When `undefined`, a `zIndex` of 0 is assumed\n * for layers that are added to the map's `layers` collection, or `Infinity` when the layer's `setMap()`\n * method was used.\n * @property {number} [minResolution] The minimum resolution (inclusive) at which this layer will be\n * visible.\n * @property {number} [maxResolution] The maximum resolution (exclusive) below which this layer will\n * be visible.\n * @property {number} [minZoom] The minimum view zoom level (exclusive) above which this layer will be\n * visible.\n * @property {number} [maxZoom] The maximum view zoom level (inclusive) at which this layer will\n * be visible.\n * @property {Array|Collection} [layers] Child layers.\n * @property {Object} [properties] Arbitrary observable properties. Can be accessed with `#get()` and `#set()`.\n */\n\n/**\n * @enum {string}\n * @private\n */\nconst Property = {\n LAYERS: 'layers',\n};\n\n/**\n * @classdesc\n * A {@link module:ol/Collection~Collection} of layers that are handled together.\n *\n * A generic `change` event is triggered when the group/Collection changes.\n *\n * @api\n */\nclass LayerGroup extends BaseLayer {\n /**\n * @param {Options} [options] Layer options.\n */\n constructor(options) {\n options = options || {};\n const baseOptions = /** @type {Options} */ (Object.assign({}, options));\n delete baseOptions.layers;\n\n let layers = options.layers;\n\n super(baseOptions);\n\n /***\n * @type {GroupOnSignature}\n */\n this.on;\n\n /***\n * @type {GroupOnSignature}\n */\n this.once;\n\n /***\n * @type {GroupOnSignature}\n */\n this.un;\n\n /**\n * @private\n * @type {Array}\n */\n this.layersListenerKeys_ = [];\n\n /**\n * @private\n * @type {Object>}\n */\n this.listenerKeys_ = {};\n\n this.addChangeListener(Property.LAYERS, this.handleLayersChanged_);\n\n if (layers) {\n if (Array.isArray(layers)) {\n layers = new Collection(layers.slice(), {unique: true});\n } else {\n assert(typeof (/** @type {?} */ (layers).getArray) === 'function', 43); // Expected `layers` to be an array or a `Collection`\n }\n } else {\n layers = new Collection(undefined, {unique: true});\n }\n\n this.setLayers(layers);\n }\n\n /**\n * @private\n */\n handleLayerChange_() {\n this.changed();\n }\n\n /**\n * @private\n */\n handleLayersChanged_() {\n this.layersListenerKeys_.forEach(unlistenByKey);\n this.layersListenerKeys_.length = 0;\n\n const layers = this.getLayers();\n this.layersListenerKeys_.push(\n listen(layers, CollectionEventType.ADD, this.handleLayersAdd_, this),\n listen(layers, CollectionEventType.REMOVE, this.handleLayersRemove_, this)\n );\n\n for (const id in this.listenerKeys_) {\n this.listenerKeys_[id].forEach(unlistenByKey);\n }\n clear(this.listenerKeys_);\n\n const layersArray = layers.getArray();\n for (let i = 0, ii = layersArray.length; i < ii; i++) {\n const layer = layersArray[i];\n this.registerLayerListeners_(layer);\n this.dispatchEvent(new GroupEvent('addlayer', layer));\n }\n this.changed();\n }\n\n /**\n * @param {BaseLayer} layer The layer.\n */\n registerLayerListeners_(layer) {\n const listenerKeys = [\n listen(\n layer,\n ObjectEventType.PROPERTYCHANGE,\n this.handleLayerChange_,\n this\n ),\n listen(layer, EventType.CHANGE, this.handleLayerChange_, this),\n ];\n\n if (layer instanceof LayerGroup) {\n listenerKeys.push(\n listen(layer, 'addlayer', this.handleLayerGroupAdd_, this),\n listen(layer, 'removelayer', this.handleLayerGroupRemove_, this)\n );\n }\n\n this.listenerKeys_[getUid(layer)] = listenerKeys;\n }\n\n /**\n * @param {GroupEvent} event The layer group event.\n */\n handleLayerGroupAdd_(event) {\n this.dispatchEvent(new GroupEvent('addlayer', event.layer));\n }\n\n /**\n * @param {GroupEvent} event The layer group event.\n */\n handleLayerGroupRemove_(event) {\n this.dispatchEvent(new GroupEvent('removelayer', event.layer));\n }\n\n /**\n * @param {import(\"../Collection.js\").CollectionEvent} collectionEvent CollectionEvent.\n * @private\n */\n handleLayersAdd_(collectionEvent) {\n const layer = collectionEvent.element;\n this.registerLayerListeners_(layer);\n this.dispatchEvent(new GroupEvent('addlayer', layer));\n this.changed();\n }\n\n /**\n * @param {import(\"../Collection.js\").CollectionEvent} collectionEvent CollectionEvent.\n * @private\n */\n handleLayersRemove_(collectionEvent) {\n const layer = collectionEvent.element;\n const key = getUid(layer);\n this.listenerKeys_[key].forEach(unlistenByKey);\n delete this.listenerKeys_[key];\n this.dispatchEvent(new GroupEvent('removelayer', layer));\n this.changed();\n }\n\n /**\n * Returns the {@link module:ol/Collection~Collection collection} of {@link module:ol/layer/Layer~Layer layers}\n * in this group.\n * @return {!Collection} Collection of\n * {@link module:ol/layer/Base~BaseLayer layers} that are part of this group.\n * @observable\n * @api\n */\n getLayers() {\n return /** @type {!Collection} */ (\n this.get(Property.LAYERS)\n );\n }\n\n /**\n * Set the {@link module:ol/Collection~Collection collection} of {@link module:ol/layer/Layer~Layer layers}\n * in this group.\n * @param {!Collection} layers Collection of\n * {@link module:ol/layer/Base~BaseLayer layers} that are part of this group.\n * @observable\n * @api\n */\n setLayers(layers) {\n const collection = this.getLayers();\n if (collection) {\n const currentLayers = collection.getArray();\n for (let i = 0, ii = currentLayers.length; i < ii; ++i) {\n this.dispatchEvent(new GroupEvent('removelayer', currentLayers[i]));\n }\n }\n\n this.set(Property.LAYERS, layers);\n }\n\n /**\n * @param {Array} [array] Array of layers (to be modified in place).\n * @return {Array} Array of layers.\n */\n getLayersArray(array) {\n array = array !== undefined ? array : [];\n this.getLayers().forEach(function (layer) {\n layer.getLayersArray(array);\n });\n return array;\n }\n\n /**\n * Get the layer states list and use this groups z-index as the default\n * for all layers in this and nested groups, if it is unset at this point.\n * If dest is not provided and this group's z-index is undefined\n * 0 is used a the default z-index.\n * @param {Array} [dest] Optional list\n * of layer states (to be modified in place).\n * @return {Array} List of layer states.\n */\n getLayerStatesArray(dest) {\n const states = dest !== undefined ? dest : [];\n const pos = states.length;\n\n this.getLayers().forEach(function (layer) {\n layer.getLayerStatesArray(states);\n });\n\n const ownLayerState = this.getLayerState();\n let defaultZIndex = ownLayerState.zIndex;\n if (!dest && ownLayerState.zIndex === undefined) {\n defaultZIndex = 0;\n }\n for (let i = pos, ii = states.length; i < ii; i++) {\n const layerState = states[i];\n layerState.opacity *= ownLayerState.opacity;\n layerState.visible = layerState.visible && ownLayerState.visible;\n layerState.maxResolution = Math.min(\n layerState.maxResolution,\n ownLayerState.maxResolution\n );\n layerState.minResolution = Math.max(\n layerState.minResolution,\n ownLayerState.minResolution\n );\n layerState.minZoom = Math.max(layerState.minZoom, ownLayerState.minZoom);\n layerState.maxZoom = Math.min(layerState.maxZoom, ownLayerState.maxZoom);\n if (ownLayerState.extent !== undefined) {\n if (layerState.extent !== undefined) {\n layerState.extent = getIntersection(\n layerState.extent,\n ownLayerState.extent\n );\n } else {\n layerState.extent = ownLayerState.extent;\n }\n }\n if (layerState.zIndex === undefined) {\n layerState.zIndex = defaultZIndex;\n }\n }\n\n return states;\n }\n\n /**\n * @return {import(\"../source/Source.js\").State} Source state.\n */\n getSourceState() {\n return 'ready';\n }\n}\n\nexport default LayerGroup;\n","/**\n * @module ol/MapEvent\n */\nimport Event from './events/Event.js';\n\n/**\n * @classdesc\n * Events emitted as map events are instances of this type.\n * See {@link module:ol/Map~Map} for which events trigger a map event.\n */\nclass MapEvent extends Event {\n /**\n * @param {string} type Event type.\n * @param {import(\"./Map.js\").default} map Map.\n * @param {?import(\"./Map.js\").FrameState} [frameState] Frame state.\n */\n constructor(type, map, frameState) {\n super(type);\n\n /**\n * The map where the event occurred.\n * @type {import(\"./Map.js\").default}\n * @api\n */\n this.map = map;\n\n /**\n * The frame state at the time of the event.\n * @type {?import(\"./Map.js\").FrameState}\n * @api\n */\n this.frameState = frameState !== undefined ? frameState : null;\n }\n}\n\nexport default MapEvent;\n","/**\n * @module ol/MapBrowserEvent\n */\nimport MapEvent from './MapEvent.js';\n\n/**\n * @classdesc\n * Events emitted as map browser events are instances of this type.\n * See {@link module:ol/Map~Map} for which events trigger a map browser event.\n * @template {UIEvent} EVENT\n */\nclass MapBrowserEvent extends MapEvent {\n /**\n * @param {string} type Event type.\n * @param {import(\"./Map.js\").default} map Map.\n * @param {EVENT} originalEvent Original event.\n * @param {boolean} [dragging] Is the map currently being dragged?\n * @param {import(\"./Map.js\").FrameState} [frameState] Frame state.\n * @param {Array} [activePointers] Active pointers.\n */\n constructor(type, map, originalEvent, dragging, frameState, activePointers) {\n super(type, map, frameState);\n\n /**\n * The original browser event.\n * @const\n * @type {EVENT}\n * @api\n */\n this.originalEvent = originalEvent;\n\n /**\n * The map pixel relative to the viewport corresponding to the original browser event.\n * @type {?import(\"./pixel.js\").Pixel}\n */\n this.pixel_ = null;\n\n /**\n * The coordinate in the user projection corresponding to the original browser event.\n * @type {?import(\"./coordinate.js\").Coordinate}\n */\n this.coordinate_ = null;\n\n /**\n * Indicates if the map is currently being dragged. Only set for\n * `POINTERDRAG` and `POINTERMOVE` events. Default is `false`.\n *\n * @type {boolean}\n * @api\n */\n this.dragging = dragging !== undefined ? dragging : false;\n\n /**\n * @type {Array|undefined}\n */\n this.activePointers = activePointers;\n }\n\n /**\n * The map pixel relative to the viewport corresponding to the original event.\n * @type {import(\"./pixel.js\").Pixel}\n * @api\n */\n get pixel() {\n if (!this.pixel_) {\n this.pixel_ = this.map.getEventPixel(this.originalEvent);\n }\n return this.pixel_;\n }\n set pixel(pixel) {\n this.pixel_ = pixel;\n }\n\n /**\n * The coordinate corresponding to the original browser event. This will be in the user\n * projection if one is set. Otherwise it will be in the view projection.\n * @type {import(\"./coordinate.js\").Coordinate}\n * @api\n */\n get coordinate() {\n if (!this.coordinate_) {\n this.coordinate_ = this.map.getCoordinateFromPixel(this.pixel);\n }\n return this.coordinate_;\n }\n set coordinate(coordinate) {\n this.coordinate_ = coordinate;\n }\n\n /**\n * Prevents the default browser action.\n * See https://developer.mozilla.org/en-US/docs/Web/API/event.preventDefault.\n * @api\n */\n preventDefault() {\n super.preventDefault();\n if ('preventDefault' in this.originalEvent) {\n /** @type {UIEvent} */ (this.originalEvent).preventDefault();\n }\n }\n\n /**\n * Prevents further propagation of the current event.\n * See https://developer.mozilla.org/en-US/docs/Web/API/event.stopPropagation.\n * @api\n */\n stopPropagation() {\n super.stopPropagation();\n if ('stopPropagation' in this.originalEvent) {\n /** @type {UIEvent} */ (this.originalEvent).stopPropagation();\n }\n }\n}\n\nexport default MapBrowserEvent;\n","/**\n * @module ol/MapBrowserEventType\n */\nimport EventType from './events/EventType.js';\n\n/**\n * Constants for event names.\n * @enum {string}\n */\nexport default {\n /**\n * A true single click with no dragging and no double click. Note that this\n * event is delayed by 250 ms to ensure that it is not a double click.\n * @event module:ol/MapBrowserEvent~MapBrowserEvent#singleclick\n * @api\n */\n SINGLECLICK: 'singleclick',\n\n /**\n * A click with no dragging. A double click will fire two of this.\n * @event module:ol/MapBrowserEvent~MapBrowserEvent#click\n * @api\n */\n CLICK: EventType.CLICK,\n\n /**\n * A true double click, with no dragging.\n * @event module:ol/MapBrowserEvent~MapBrowserEvent#dblclick\n * @api\n */\n DBLCLICK: EventType.DBLCLICK,\n\n /**\n * Triggered when a pointer is dragged.\n * @event module:ol/MapBrowserEvent~MapBrowserEvent#pointerdrag\n * @api\n */\n POINTERDRAG: 'pointerdrag',\n\n /**\n * Triggered when a pointer is moved. Note that on touch devices this is\n * triggered when the map is panned, so is not the same as mousemove.\n * @event module:ol/MapBrowserEvent~MapBrowserEvent#pointermove\n * @api\n */\n POINTERMOVE: 'pointermove',\n\n POINTERDOWN: 'pointerdown',\n POINTERUP: 'pointerup',\n POINTEROVER: 'pointerover',\n POINTEROUT: 'pointerout',\n POINTERENTER: 'pointerenter',\n POINTERLEAVE: 'pointerleave',\n POINTERCANCEL: 'pointercancel',\n};\n\n/***\n * @typedef {'singleclick'|'click'|'dblclick'|'pointerdrag'|'pointermove'} Types\n */\n","/**\n * @module ol/pointer/EventType\n */\n\n/**\n * Constants for event names.\n * @enum {string}\n */\nexport default {\n POINTERMOVE: 'pointermove',\n POINTERDOWN: 'pointerdown',\n POINTERUP: 'pointerup',\n POINTEROVER: 'pointerover',\n POINTEROUT: 'pointerout',\n POINTERENTER: 'pointerenter',\n POINTERLEAVE: 'pointerleave',\n POINTERCANCEL: 'pointercancel',\n};\n","/**\n * @module ol/MapBrowserEventHandler\n */\n\nimport EventType from './events/EventType.js';\nimport MapBrowserEvent from './MapBrowserEvent.js';\nimport MapBrowserEventType from './MapBrowserEventType.js';\nimport PointerEventType from './pointer/EventType.js';\nimport Target from './events/Target.js';\nimport {PASSIVE_EVENT_LISTENERS} from './has.js';\nimport {VOID} from './functions.js';\nimport {listen, unlistenByKey} from './events.js';\n\nclass MapBrowserEventHandler extends Target {\n /**\n * @param {import(\"./Map.js\").default} map The map with the viewport to listen to events on.\n * @param {number} [moveTolerance] The minimal distance the pointer must travel to trigger a move.\n */\n constructor(map, moveTolerance) {\n super(map);\n\n /**\n * This is the element that we will listen to the real events on.\n * @type {import(\"./Map.js\").default}\n * @private\n */\n this.map_ = map;\n\n /**\n * @type {any}\n * @private\n */\n this.clickTimeoutId_;\n\n /**\n * Emulate dblclick and singleclick. Will be true when only one pointer is active.\n * @type {boolean}\n */\n this.emulateClicks_ = false;\n\n /**\n * @type {boolean}\n * @private\n */\n this.dragging_ = false;\n\n /**\n * @type {!Array}\n * @private\n */\n this.dragListenerKeys_ = [];\n\n /**\n * @type {number}\n * @private\n */\n this.moveTolerance_ = moveTolerance === undefined ? 1 : moveTolerance;\n\n /**\n * The most recent \"down\" type event (or null if none have occurred).\n * Set on pointerdown.\n * @type {PointerEvent|null}\n * @private\n */\n this.down_ = null;\n\n const element = this.map_.getViewport();\n\n /**\n * @type {Array}\n * @private\n */\n this.activePointers_ = [];\n\n /**\n * @type {!Object}\n * @private\n */\n this.trackedTouches_ = {};\n\n this.element_ = element;\n\n /**\n * @type {?import(\"./events.js\").EventsKey}\n * @private\n */\n this.pointerdownListenerKey_ = listen(\n element,\n PointerEventType.POINTERDOWN,\n this.handlePointerDown_,\n this\n );\n\n /**\n * @type {PointerEvent}\n * @private\n */\n this.originalPointerMoveEvent_;\n\n /**\n * @type {?import(\"./events.js\").EventsKey}\n * @private\n */\n this.relayedListenerKey_ = listen(\n element,\n PointerEventType.POINTERMOVE,\n this.relayMoveEvent_,\n this\n );\n\n /**\n * @private\n */\n this.boundHandleTouchMove_ = this.handleTouchMove_.bind(this);\n\n this.element_.addEventListener(\n EventType.TOUCHMOVE,\n this.boundHandleTouchMove_,\n PASSIVE_EVENT_LISTENERS ? {passive: false} : false\n );\n }\n\n /**\n * @param {PointerEvent} pointerEvent Pointer\n * event.\n * @private\n */\n emulateClick_(pointerEvent) {\n let newEvent = new MapBrowserEvent(\n MapBrowserEventType.CLICK,\n this.map_,\n pointerEvent\n );\n this.dispatchEvent(newEvent);\n if (this.clickTimeoutId_ !== undefined) {\n // double-click\n clearTimeout(this.clickTimeoutId_);\n this.clickTimeoutId_ = undefined;\n newEvent = new MapBrowserEvent(\n MapBrowserEventType.DBLCLICK,\n this.map_,\n pointerEvent\n );\n this.dispatchEvent(newEvent);\n } else {\n // click\n this.clickTimeoutId_ = setTimeout(() => {\n this.clickTimeoutId_ = undefined;\n const newEvent = new MapBrowserEvent(\n MapBrowserEventType.SINGLECLICK,\n this.map_,\n pointerEvent\n );\n this.dispatchEvent(newEvent);\n }, 250);\n }\n }\n\n /**\n * Keeps track on how many pointers are currently active.\n *\n * @param {PointerEvent} pointerEvent Pointer\n * event.\n * @private\n */\n updateActivePointers_(pointerEvent) {\n const event = pointerEvent;\n const id = event.pointerId;\n\n if (\n event.type == MapBrowserEventType.POINTERUP ||\n event.type == MapBrowserEventType.POINTERCANCEL\n ) {\n delete this.trackedTouches_[id];\n for (const pointerId in this.trackedTouches_) {\n if (this.trackedTouches_[pointerId].target !== event.target) {\n // Some platforms assign a new pointerId when the target changes.\n // If this happens, delete one tracked pointer. If there is more\n // than one tracked pointer for the old target, it will be cleared\n // by subsequent POINTERUP events from other pointers.\n delete this.trackedTouches_[pointerId];\n break;\n }\n }\n } else if (\n event.type == MapBrowserEventType.POINTERDOWN ||\n event.type == MapBrowserEventType.POINTERMOVE\n ) {\n this.trackedTouches_[id] = event;\n }\n this.activePointers_ = Object.values(this.trackedTouches_);\n }\n\n /**\n * @param {PointerEvent} pointerEvent Pointer\n * event.\n * @private\n */\n handlePointerUp_(pointerEvent) {\n this.updateActivePointers_(pointerEvent);\n const newEvent = new MapBrowserEvent(\n MapBrowserEventType.POINTERUP,\n this.map_,\n pointerEvent,\n undefined,\n undefined,\n this.activePointers_\n );\n this.dispatchEvent(newEvent);\n\n // We emulate click events on left mouse button click, touch contact, and pen\n // contact. isMouseActionButton returns true in these cases (evt.button is set\n // to 0).\n // See http://www.w3.org/TR/pointerevents/#button-states\n // We only fire click, singleclick, and doubleclick if nobody has called\n // event.preventDefault().\n if (\n this.emulateClicks_ &&\n !newEvent.defaultPrevented &&\n !this.dragging_ &&\n this.isMouseActionButton_(pointerEvent)\n ) {\n this.emulateClick_(this.down_);\n }\n\n if (this.activePointers_.length === 0) {\n this.dragListenerKeys_.forEach(unlistenByKey);\n this.dragListenerKeys_.length = 0;\n this.dragging_ = false;\n this.down_ = null;\n }\n }\n\n /**\n * @param {PointerEvent} pointerEvent Pointer\n * event.\n * @return {boolean} If the left mouse button was pressed.\n * @private\n */\n isMouseActionButton_(pointerEvent) {\n return pointerEvent.button === 0;\n }\n\n /**\n * @param {PointerEvent} pointerEvent Pointer\n * event.\n * @private\n */\n handlePointerDown_(pointerEvent) {\n this.emulateClicks_ = this.activePointers_.length === 0;\n this.updateActivePointers_(pointerEvent);\n const newEvent = new MapBrowserEvent(\n MapBrowserEventType.POINTERDOWN,\n this.map_,\n pointerEvent,\n undefined,\n undefined,\n this.activePointers_\n );\n this.dispatchEvent(newEvent);\n\n // Store a copy of the down event\n this.down_ = /** @type {PointerEvent} */ ({});\n for (const property in pointerEvent) {\n const value = pointerEvent[property];\n this.down_[property] = typeof value === 'function' ? VOID : value;\n }\n\n if (this.dragListenerKeys_.length === 0) {\n const doc = this.map_.getOwnerDocument();\n this.dragListenerKeys_.push(\n listen(\n doc,\n MapBrowserEventType.POINTERMOVE,\n this.handlePointerMove_,\n this\n ),\n listen(doc, MapBrowserEventType.POINTERUP, this.handlePointerUp_, this),\n /* Note that the listener for `pointercancel is set up on\n * `pointerEventHandler_` and not `documentPointerEventHandler_` like\n * the `pointerup` and `pointermove` listeners.\n *\n * The reason for this is the following: `TouchSource.vacuumTouches_()`\n * issues `pointercancel` events, when there was no `touchend` for a\n * `touchstart`. Now, let's say a first `touchstart` is registered on\n * `pointerEventHandler_`. The `documentPointerEventHandler_` is set up.\n * But `documentPointerEventHandler_` doesn't know about the first\n * `touchstart`. If there is no `touchend` for the `touchstart`, we can\n * only receive a `touchcancel` from `pointerEventHandler_`, because it is\n * only registered there.\n */\n listen(\n this.element_,\n MapBrowserEventType.POINTERCANCEL,\n this.handlePointerUp_,\n this\n )\n );\n if (this.element_.getRootNode && this.element_.getRootNode() !== doc) {\n this.dragListenerKeys_.push(\n listen(\n this.element_.getRootNode(),\n MapBrowserEventType.POINTERUP,\n this.handlePointerUp_,\n this\n )\n );\n }\n }\n }\n\n /**\n * @param {PointerEvent} pointerEvent Pointer\n * event.\n * @private\n */\n handlePointerMove_(pointerEvent) {\n // Between pointerdown and pointerup, pointermove events are triggered.\n // To avoid a 'false' touchmove event to be dispatched, we test if the pointer\n // moved a significant distance.\n if (this.isMoving_(pointerEvent)) {\n this.updateActivePointers_(pointerEvent);\n this.dragging_ = true;\n const newEvent = new MapBrowserEvent(\n MapBrowserEventType.POINTERDRAG,\n this.map_,\n pointerEvent,\n this.dragging_,\n undefined,\n this.activePointers_\n );\n this.dispatchEvent(newEvent);\n }\n }\n\n /**\n * Wrap and relay a pointermove event.\n * @param {PointerEvent} pointerEvent Pointer\n * event.\n * @private\n */\n relayMoveEvent_(pointerEvent) {\n this.originalPointerMoveEvent_ = pointerEvent;\n const dragging = !!(this.down_ && this.isMoving_(pointerEvent));\n this.dispatchEvent(\n new MapBrowserEvent(\n MapBrowserEventType.POINTERMOVE,\n this.map_,\n pointerEvent,\n dragging\n )\n );\n }\n\n /**\n * Flexible handling of a `touch-action: none` css equivalent: because calling\n * `preventDefault()` on a `pointermove` event does not stop native page scrolling\n * and zooming, we also listen for `touchmove` and call `preventDefault()` on it\n * when an interaction (currently `DragPan` handles the event.\n * @param {TouchEvent} event Event.\n * @private\n */\n handleTouchMove_(event) {\n // Due to https://github.com/mpizenberg/elm-pep/issues/2, `this.originalPointerMoveEvent_`\n // may not be initialized yet when we get here on a platform without native pointer events.\n const originalEvent = this.originalPointerMoveEvent_;\n if (\n (!originalEvent || originalEvent.defaultPrevented) &&\n (typeof event.cancelable !== 'boolean' || event.cancelable === true)\n ) {\n event.preventDefault();\n }\n }\n\n /**\n * @param {PointerEvent} pointerEvent Pointer\n * event.\n * @return {boolean} Is moving.\n * @private\n */\n isMoving_(pointerEvent) {\n return (\n this.dragging_ ||\n Math.abs(pointerEvent.clientX - this.down_.clientX) >\n this.moveTolerance_ ||\n Math.abs(pointerEvent.clientY - this.down_.clientY) > this.moveTolerance_\n );\n }\n\n /**\n * Clean up.\n */\n disposeInternal() {\n if (this.relayedListenerKey_) {\n unlistenByKey(this.relayedListenerKey_);\n this.relayedListenerKey_ = null;\n }\n this.element_.removeEventListener(\n EventType.TOUCHMOVE,\n this.boundHandleTouchMove_\n );\n\n if (this.pointerdownListenerKey_) {\n unlistenByKey(this.pointerdownListenerKey_);\n this.pointerdownListenerKey_ = null;\n }\n\n this.dragListenerKeys_.forEach(unlistenByKey);\n this.dragListenerKeys_.length = 0;\n\n this.element_ = null;\n super.disposeInternal();\n }\n}\n\nexport default MapBrowserEventHandler;\n","/**\n * @module ol/MapEventType\n */\n\n/**\n * @enum {string}\n */\nexport default {\n /**\n * Triggered after a map frame is rendered.\n * @event module:ol/MapEvent~MapEvent#postrender\n * @api\n */\n POSTRENDER: 'postrender',\n\n /**\n * Triggered when the map starts moving.\n * @event module:ol/MapEvent~MapEvent#movestart\n * @api\n */\n MOVESTART: 'movestart',\n\n /**\n * Triggered after the map is moved.\n * @event module:ol/MapEvent~MapEvent#moveend\n * @api\n */\n MOVEEND: 'moveend',\n\n /**\n * Triggered when loading of additional map data (tiles, images, features) starts.\n * @event module:ol/MapEvent~MapEvent#loadstart\n * @api\n */\n LOADSTART: 'loadstart',\n\n /**\n * Triggered when loading of additional map data has completed.\n * @event module:ol/MapEvent~MapEvent#loadend\n * @api\n */\n LOADEND: 'loadend',\n};\n\n/***\n * @typedef {'postrender'|'movestart'|'moveend'|'loadstart'|'loadend'} Types\n */\n","/**\n * @module ol/MapProperty\n */\n\n/**\n * @enum {string}\n */\nexport default {\n LAYERGROUP: 'layergroup',\n SIZE: 'size',\n TARGET: 'target',\n VIEW: 'view',\n};\n","/**\n * @module ol/structs/PriorityQueue\n */\nimport {assert} from '../asserts.js';\nimport {clear} from '../obj.js';\n\n/**\n * @type {number}\n */\nexport const DROP = Infinity;\n\n/**\n * @classdesc\n * Priority queue.\n *\n * The implementation is inspired from the Closure Library's Heap class and\n * Python's heapq module.\n *\n * See https://github.com/google/closure-library/blob/master/closure/goog/structs/heap.js\n * and https://hg.python.org/cpython/file/2.7/Lib/heapq.py.\n *\n * @template T\n */\nclass PriorityQueue {\n /**\n * @param {function(T): number} priorityFunction Priority function.\n * @param {function(T): string} keyFunction Key function.\n */\n constructor(priorityFunction, keyFunction) {\n /**\n * @type {function(T): number}\n * @private\n */\n this.priorityFunction_ = priorityFunction;\n\n /**\n * @type {function(T): string}\n * @private\n */\n this.keyFunction_ = keyFunction;\n\n /**\n * @type {Array}\n * @private\n */\n this.elements_ = [];\n\n /**\n * @type {Array}\n * @private\n */\n this.priorities_ = [];\n\n /**\n * @type {!Object}\n * @private\n */\n this.queuedElements_ = {};\n }\n\n /**\n * FIXME empty description for jsdoc\n */\n clear() {\n this.elements_.length = 0;\n this.priorities_.length = 0;\n clear(this.queuedElements_);\n }\n\n /**\n * Remove and return the highest-priority element. O(log N).\n * @return {T} Element.\n */\n dequeue() {\n const elements = this.elements_;\n const priorities = this.priorities_;\n const element = elements[0];\n if (elements.length == 1) {\n elements.length = 0;\n priorities.length = 0;\n } else {\n elements[0] = elements.pop();\n priorities[0] = priorities.pop();\n this.siftUp_(0);\n }\n const elementKey = this.keyFunction_(element);\n delete this.queuedElements_[elementKey];\n return element;\n }\n\n /**\n * Enqueue an element. O(log N).\n * @param {T} element Element.\n * @return {boolean} The element was added to the queue.\n */\n enqueue(element) {\n assert(!(this.keyFunction_(element) in this.queuedElements_), 31); // Tried to enqueue an `element` that was already added to the queue\n const priority = this.priorityFunction_(element);\n if (priority != DROP) {\n this.elements_.push(element);\n this.priorities_.push(priority);\n this.queuedElements_[this.keyFunction_(element)] = true;\n this.siftDown_(0, this.elements_.length - 1);\n return true;\n }\n return false;\n }\n\n /**\n * @return {number} Count.\n */\n getCount() {\n return this.elements_.length;\n }\n\n /**\n * Gets the index of the left child of the node at the given index.\n * @param {number} index The index of the node to get the left child for.\n * @return {number} The index of the left child.\n * @private\n */\n getLeftChildIndex_(index) {\n return index * 2 + 1;\n }\n\n /**\n * Gets the index of the right child of the node at the given index.\n * @param {number} index The index of the node to get the right child for.\n * @return {number} The index of the right child.\n * @private\n */\n getRightChildIndex_(index) {\n return index * 2 + 2;\n }\n\n /**\n * Gets the index of the parent of the node at the given index.\n * @param {number} index The index of the node to get the parent for.\n * @return {number} The index of the parent.\n * @private\n */\n getParentIndex_(index) {\n return (index - 1) >> 1;\n }\n\n /**\n * Make this a heap. O(N).\n * @private\n */\n heapify_() {\n let i;\n for (i = (this.elements_.length >> 1) - 1; i >= 0; i--) {\n this.siftUp_(i);\n }\n }\n\n /**\n * @return {boolean} Is empty.\n */\n isEmpty() {\n return this.elements_.length === 0;\n }\n\n /**\n * @param {string} key Key.\n * @return {boolean} Is key queued.\n */\n isKeyQueued(key) {\n return key in this.queuedElements_;\n }\n\n /**\n * @param {T} element Element.\n * @return {boolean} Is queued.\n */\n isQueued(element) {\n return this.isKeyQueued(this.keyFunction_(element));\n }\n\n /**\n * @param {number} index The index of the node to move down.\n * @private\n */\n siftUp_(index) {\n const elements = this.elements_;\n const priorities = this.priorities_;\n const count = elements.length;\n const element = elements[index];\n const priority = priorities[index];\n const startIndex = index;\n\n while (index < count >> 1) {\n const lIndex = this.getLeftChildIndex_(index);\n const rIndex = this.getRightChildIndex_(index);\n\n const smallerChildIndex =\n rIndex < count && priorities[rIndex] < priorities[lIndex]\n ? rIndex\n : lIndex;\n\n elements[index] = elements[smallerChildIndex];\n priorities[index] = priorities[smallerChildIndex];\n index = smallerChildIndex;\n }\n\n elements[index] = element;\n priorities[index] = priority;\n this.siftDown_(startIndex, index);\n }\n\n /**\n * @param {number} startIndex The index of the root.\n * @param {number} index The index of the node to move up.\n * @private\n */\n siftDown_(startIndex, index) {\n const elements = this.elements_;\n const priorities = this.priorities_;\n const element = elements[index];\n const priority = priorities[index];\n\n while (index > startIndex) {\n const parentIndex = this.getParentIndex_(index);\n if (priorities[parentIndex] > priority) {\n elements[index] = elements[parentIndex];\n priorities[index] = priorities[parentIndex];\n index = parentIndex;\n } else {\n break;\n }\n }\n elements[index] = element;\n priorities[index] = priority;\n }\n\n /**\n * FIXME empty description for jsdoc\n */\n reprioritize() {\n const priorityFunction = this.priorityFunction_;\n const elements = this.elements_;\n const priorities = this.priorities_;\n let index = 0;\n const n = elements.length;\n let element, i, priority;\n for (i = 0; i < n; ++i) {\n element = elements[i];\n priority = priorityFunction(element);\n if (priority == DROP) {\n delete this.queuedElements_[this.keyFunction_(element)];\n } else {\n priorities[index] = priority;\n elements[index++] = element;\n }\n }\n elements.length = index;\n priorities.length = index;\n this.heapify_();\n }\n}\n\nexport default PriorityQueue;\n","/**\n * @module ol/TileQueue\n */\nimport EventType from './events/EventType.js';\nimport PriorityQueue, {DROP} from './structs/PriorityQueue.js';\nimport TileState from './TileState.js';\n\n/**\n * @typedef {function(import(\"./Tile.js\").default, string, import(\"./coordinate.js\").Coordinate, number): number} PriorityFunction\n */\n\nclass TileQueue extends PriorityQueue {\n /**\n * @param {PriorityFunction} tilePriorityFunction Tile priority function.\n * @param {function(): ?} tileChangeCallback Function called on each tile change event.\n */\n constructor(tilePriorityFunction, tileChangeCallback) {\n super(\n /**\n * @param {Array} element Element.\n * @return {number} Priority.\n */\n function (element) {\n return tilePriorityFunction.apply(null, element);\n },\n /**\n * @param {Array} element Element.\n * @return {string} Key.\n */\n function (element) {\n return /** @type {import(\"./Tile.js\").default} */ (element[0]).getKey();\n }\n );\n\n /** @private */\n this.boundHandleTileChange_ = this.handleTileChange.bind(this);\n\n /**\n * @private\n * @type {function(): ?}\n */\n this.tileChangeCallback_ = tileChangeCallback;\n\n /**\n * @private\n * @type {number}\n */\n this.tilesLoading_ = 0;\n\n /**\n * @private\n * @type {!Object}\n */\n this.tilesLoadingKeys_ = {};\n }\n\n /**\n * @param {Array} element Element.\n * @return {boolean} The element was added to the queue.\n */\n enqueue(element) {\n const added = super.enqueue(element);\n if (added) {\n const tile = element[0];\n tile.addEventListener(EventType.CHANGE, this.boundHandleTileChange_);\n }\n return added;\n }\n\n /**\n * @return {number} Number of tiles loading.\n */\n getTilesLoading() {\n return this.tilesLoading_;\n }\n\n /**\n * @param {import(\"./events/Event.js\").default} event Event.\n * @protected\n */\n handleTileChange(event) {\n const tile = /** @type {import(\"./Tile.js\").default} */ (event.target);\n const state = tile.getState();\n if (\n state === TileState.LOADED ||\n state === TileState.ERROR ||\n state === TileState.EMPTY\n ) {\n if (state !== TileState.ERROR) {\n tile.removeEventListener(EventType.CHANGE, this.boundHandleTileChange_);\n }\n const tileKey = tile.getKey();\n if (tileKey in this.tilesLoadingKeys_) {\n delete this.tilesLoadingKeys_[tileKey];\n --this.tilesLoading_;\n }\n this.tileChangeCallback_();\n }\n }\n\n /**\n * @param {number} maxTotalLoading Maximum number tiles to load simultaneously.\n * @param {number} maxNewLoads Maximum number of new tiles to load.\n */\n loadMoreTiles(maxTotalLoading, maxNewLoads) {\n let newLoads = 0;\n let state, tile, tileKey;\n while (\n this.tilesLoading_ < maxTotalLoading &&\n newLoads < maxNewLoads &&\n this.getCount() > 0\n ) {\n tile = /** @type {import(\"./Tile.js\").default} */ (this.dequeue()[0]);\n tileKey = tile.getKey();\n state = tile.getState();\n if (state === TileState.IDLE && !(tileKey in this.tilesLoadingKeys_)) {\n this.tilesLoadingKeys_[tileKey] = true;\n ++this.tilesLoading_;\n ++newLoads;\n tile.load();\n }\n }\n }\n}\n\nexport default TileQueue;\n\n/**\n * @param {import('./Map.js').FrameState} frameState Frame state.\n * @param {import(\"./Tile.js\").default} tile Tile.\n * @param {string} tileSourceKey Tile source key.\n * @param {import(\"./coordinate.js\").Coordinate} tileCenter Tile center.\n * @param {number} tileResolution Tile resolution.\n * @return {number} Tile priority.\n */\nexport function getTilePriority(\n frameState,\n tile,\n tileSourceKey,\n tileCenter,\n tileResolution\n) {\n // Filter out tiles at higher zoom levels than the current zoom level, or that\n // are outside the visible extent.\n if (!frameState || !(tileSourceKey in frameState.wantedTiles)) {\n return DROP;\n }\n if (!frameState.wantedTiles[tileSourceKey][tile.getKey()]) {\n return DROP;\n }\n // Prioritize the highest zoom level tiles closest to the focus.\n // Tiles at higher zoom levels are prioritized using Math.log(tileResolution).\n // Within a zoom level, tiles are prioritized by the distance in pixels between\n // the center of the tile and the center of the viewport. The factor of 65536\n // means that the prioritization should behave as desired for tiles up to\n // 65536 * Math.log(2) = 45426 pixels from the focus.\n const center = frameState.viewState.center;\n const deltaX = tileCenter[0] - center[0];\n const deltaY = tileCenter[1] - center[1];\n return (\n 65536 * Math.log(tileResolution) +\n Math.sqrt(deltaX * deltaX + deltaY * deltaY) / tileResolution\n );\n}\n","/**\n * @module ol/ViewHint\n */\n\n/**\n * @enum {number}\n */\nexport default {\n ANIMATING: 0,\n INTERACTING: 1,\n};\n","/**\n * @module ol/ViewProperty\n */\n\n/**\n * @enum {string}\n */\nexport default {\n CENTER: 'center',\n RESOLUTION: 'resolution',\n ROTATION: 'rotation',\n};\n","/**\n * @module ol/tilegrid/common\n */\n\n/**\n * Default maximum zoom for default tile grids.\n * @type {number}\n */\nexport const DEFAULT_MAX_ZOOM = 42;\n\n/**\n * Default tile size.\n * @type {number}\n */\nexport const DEFAULT_TILE_SIZE = 256;\n","/**\n * @module ol/centerconstraint\n */\nimport {clamp} from './math.js';\n\n/**\n * @typedef {function((import(\"./coordinate.js\").Coordinate|undefined), number, import(\"./size.js\").Size, boolean=, Array=): (import(\"./coordinate.js\").Coordinate|undefined)} Type\n */\n\n/**\n * @param {import(\"./extent.js\").Extent} extent Extent.\n * @param {boolean} onlyCenter If true, the constraint will only apply to the view center.\n * @param {boolean} smooth If true, the view will be able to go slightly out of the given extent\n * (only during interaction and animation).\n * @return {Type} The constraint.\n */\nexport function createExtent(extent, onlyCenter, smooth) {\n return (\n /**\n * @param {import(\"./coordinate.js\").Coordinate|undefined} center Center.\n * @param {number|undefined} resolution Resolution.\n * @param {import(\"./size.js\").Size} size Viewport size; unused if `onlyCenter` was specified.\n * @param {boolean} [isMoving] True if an interaction or animation is in progress.\n * @param {Array} [centerShift] Shift between map center and viewport center.\n * @return {import(\"./coordinate.js\").Coordinate|undefined} Center.\n */\n function (center, resolution, size, isMoving, centerShift) {\n if (!center) {\n return undefined;\n }\n if (!resolution && !onlyCenter) {\n return center;\n }\n const viewWidth = onlyCenter ? 0 : size[0] * resolution;\n const viewHeight = onlyCenter ? 0 : size[1] * resolution;\n const shiftX = centerShift ? centerShift[0] : 0;\n const shiftY = centerShift ? centerShift[1] : 0;\n let minX = extent[0] + viewWidth / 2 + shiftX;\n let maxX = extent[2] - viewWidth / 2 + shiftX;\n let minY = extent[1] + viewHeight / 2 + shiftY;\n let maxY = extent[3] - viewHeight / 2 + shiftY;\n\n // note: when zooming out of bounds, min and max values for x and y may\n // end up inverted (min > max); this has to be accounted for\n if (minX > maxX) {\n minX = (maxX + minX) / 2;\n maxX = minX;\n }\n if (minY > maxY) {\n minY = (maxY + minY) / 2;\n maxY = minY;\n }\n\n let x = clamp(center[0], minX, maxX);\n let y = clamp(center[1], minY, maxY);\n\n // during an interaction, allow some overscroll\n if (isMoving && smooth && resolution) {\n const ratio = 30 * resolution;\n x +=\n -ratio * Math.log(1 + Math.max(0, minX - center[0]) / ratio) +\n ratio * Math.log(1 + Math.max(0, center[0] - maxX) / ratio);\n y +=\n -ratio * Math.log(1 + Math.max(0, minY - center[1]) / ratio) +\n ratio * Math.log(1 + Math.max(0, center[1] - maxY) / ratio);\n }\n\n return [x, y];\n }\n );\n}\n\n/**\n * @param {import(\"./coordinate.js\").Coordinate} [center] Center.\n * @return {import(\"./coordinate.js\").Coordinate|undefined} Center.\n */\nexport function none(center) {\n return center;\n}\n","/**\n * @module ol/resolutionconstraint\n */\nimport {clamp} from './math.js';\nimport {getHeight, getWidth} from './extent.js';\nimport {linearFindNearest} from './array.js';\n\n/**\n * @typedef {function((number|undefined), number, import(\"./size.js\").Size, boolean=): (number|undefined)} Type\n */\n\n/**\n * Returns a modified resolution taking into account the viewport size and maximum\n * allowed extent.\n * @param {number} resolution Resolution\n * @param {import(\"./extent.js\").Extent} maxExtent Maximum allowed extent.\n * @param {import(\"./size.js\").Size} viewportSize Viewport size.\n * @param {boolean} showFullExtent Whether to show the full extent.\n * @return {number} Capped resolution.\n */\nfunction getViewportClampedResolution(\n resolution,\n maxExtent,\n viewportSize,\n showFullExtent\n) {\n const xResolution = getWidth(maxExtent) / viewportSize[0];\n const yResolution = getHeight(maxExtent) / viewportSize[1];\n\n if (showFullExtent) {\n return Math.min(resolution, Math.max(xResolution, yResolution));\n }\n return Math.min(resolution, Math.min(xResolution, yResolution));\n}\n\n/**\n * Returns a modified resolution to be between maxResolution and minResolution while\n * still allowing the value to be slightly out of bounds.\n * Note: the computation is based on the logarithm function (ln):\n * - at 1, ln(x) is 0\n * - above 1, ln(x) keeps increasing but at a much slower pace than x\n * The final result is clamped to prevent getting too far away from bounds.\n * @param {number} resolution Resolution.\n * @param {number} maxResolution Max resolution.\n * @param {number} minResolution Min resolution.\n * @return {number} Smoothed resolution.\n */\nfunction getSmoothClampedResolution(resolution, maxResolution, minResolution) {\n let result = Math.min(resolution, maxResolution);\n const ratio = 50;\n\n result *=\n Math.log(1 + ratio * Math.max(0, resolution / maxResolution - 1)) / ratio +\n 1;\n if (minResolution) {\n result = Math.max(result, minResolution);\n result /=\n Math.log(1 + ratio * Math.max(0, minResolution / resolution - 1)) /\n ratio +\n 1;\n }\n return clamp(result, minResolution / 2, maxResolution * 2);\n}\n\n/**\n * @param {Array} resolutions Resolutions.\n * @param {boolean} [smooth] If true, the view will be able to slightly exceed resolution limits. Default: true.\n * @param {import(\"./extent.js\").Extent} [maxExtent] Maximum allowed extent.\n * @param {boolean} [showFullExtent] If true, allows us to show the full extent. Default: false.\n * @return {Type} Zoom function.\n */\nexport function createSnapToResolutions(\n resolutions,\n smooth,\n maxExtent,\n showFullExtent\n) {\n smooth = smooth !== undefined ? smooth : true;\n return (\n /**\n * @param {number|undefined} resolution Resolution.\n * @param {number} direction Direction.\n * @param {import(\"./size.js\").Size} size Viewport size.\n * @param {boolean} [isMoving] True if an interaction or animation is in progress.\n * @return {number|undefined} Resolution.\n */\n function (resolution, direction, size, isMoving) {\n if (resolution !== undefined) {\n const maxResolution = resolutions[0];\n const minResolution = resolutions[resolutions.length - 1];\n const cappedMaxRes = maxExtent\n ? getViewportClampedResolution(\n maxResolution,\n maxExtent,\n size,\n showFullExtent\n )\n : maxResolution;\n\n // during interacting or animating, allow intermediary values\n if (isMoving) {\n if (!smooth) {\n return clamp(resolution, minResolution, cappedMaxRes);\n }\n return getSmoothClampedResolution(\n resolution,\n cappedMaxRes,\n minResolution\n );\n }\n\n const capped = Math.min(cappedMaxRes, resolution);\n const z = Math.floor(linearFindNearest(resolutions, capped, direction));\n if (resolutions[z] > cappedMaxRes && z < resolutions.length - 1) {\n return resolutions[z + 1];\n }\n return resolutions[z];\n }\n return undefined;\n }\n );\n}\n\n/**\n * @param {number} power Power.\n * @param {number} maxResolution Maximum resolution.\n * @param {number} [minResolution] Minimum resolution.\n * @param {boolean} [smooth] If true, the view will be able to slightly exceed resolution limits. Default: true.\n * @param {import(\"./extent.js\").Extent} [maxExtent] Maximum allowed extent.\n * @param {boolean} [showFullExtent] If true, allows us to show the full extent. Default: false.\n * @return {Type} Zoom function.\n */\nexport function createSnapToPower(\n power,\n maxResolution,\n minResolution,\n smooth,\n maxExtent,\n showFullExtent\n) {\n smooth = smooth !== undefined ? smooth : true;\n minResolution = minResolution !== undefined ? minResolution : 0;\n\n return (\n /**\n * @param {number|undefined} resolution Resolution.\n * @param {number} direction Direction.\n * @param {import(\"./size.js\").Size} size Viewport size.\n * @param {boolean} [isMoving] True if an interaction or animation is in progress.\n * @return {number|undefined} Resolution.\n */\n function (resolution, direction, size, isMoving) {\n if (resolution !== undefined) {\n const cappedMaxRes = maxExtent\n ? getViewportClampedResolution(\n maxResolution,\n maxExtent,\n size,\n showFullExtent\n )\n : maxResolution;\n\n // during interacting or animating, allow intermediary values\n if (isMoving) {\n if (!smooth) {\n return clamp(resolution, minResolution, cappedMaxRes);\n }\n return getSmoothClampedResolution(\n resolution,\n cappedMaxRes,\n minResolution\n );\n }\n\n const tolerance = 1e-9;\n const minZoomLevel = Math.ceil(\n Math.log(maxResolution / cappedMaxRes) / Math.log(power) - tolerance\n );\n const offset = -direction * (0.5 - tolerance) + 0.5;\n const capped = Math.min(cappedMaxRes, resolution);\n const cappedZoomLevel = Math.floor(\n Math.log(maxResolution / capped) / Math.log(power) + offset\n );\n const zoomLevel = Math.max(minZoomLevel, cappedZoomLevel);\n const newResolution = maxResolution / Math.pow(power, zoomLevel);\n return clamp(newResolution, minResolution, cappedMaxRes);\n }\n return undefined;\n }\n );\n}\n\n/**\n * @param {number} maxResolution Max resolution.\n * @param {number} minResolution Min resolution.\n * @param {boolean} [smooth] If true, the view will be able to slightly exceed resolution limits. Default: true.\n * @param {import(\"./extent.js\").Extent} [maxExtent] Maximum allowed extent.\n * @param {boolean} [showFullExtent] If true, allows us to show the full extent. Default: false.\n * @return {Type} Zoom function.\n */\nexport function createMinMaxResolution(\n maxResolution,\n minResolution,\n smooth,\n maxExtent,\n showFullExtent\n) {\n smooth = smooth !== undefined ? smooth : true;\n\n return (\n /**\n * @param {number|undefined} resolution Resolution.\n * @param {number} direction Direction.\n * @param {import(\"./size.js\").Size} size Viewport size.\n * @param {boolean} [isMoving] True if an interaction or animation is in progress.\n * @return {number|undefined} Resolution.\n */\n function (resolution, direction, size, isMoving) {\n if (resolution !== undefined) {\n const cappedMaxRes = maxExtent\n ? getViewportClampedResolution(\n maxResolution,\n maxExtent,\n size,\n showFullExtent\n )\n : maxResolution;\n\n if (!smooth || !isMoving) {\n return clamp(resolution, minResolution, cappedMaxRes);\n }\n return getSmoothClampedResolution(\n resolution,\n cappedMaxRes,\n minResolution\n );\n }\n return undefined;\n }\n );\n}\n","/**\n * @module ol/rotationconstraint\n */\nimport {toRadians} from './math.js';\n\n/**\n * @typedef {function((number|undefined), boolean=): (number|undefined)} Type\n */\n\n/**\n * @param {number|undefined} rotation Rotation.\n * @return {number|undefined} Rotation.\n */\nexport function disable(rotation) {\n if (rotation !== undefined) {\n return 0;\n }\n return undefined;\n}\n\n/**\n * @param {number|undefined} rotation Rotation.\n * @return {number|undefined} Rotation.\n */\nexport function none(rotation) {\n if (rotation !== undefined) {\n return rotation;\n }\n return undefined;\n}\n\n/**\n * @param {number} n N.\n * @return {Type} Rotation constraint.\n */\nexport function createSnapToN(n) {\n const theta = (2 * Math.PI) / n;\n return (\n /**\n * @param {number|undefined} rotation Rotation.\n * @param {boolean} [isMoving] True if an interaction or animation is in progress.\n * @return {number|undefined} Rotation.\n */\n function (rotation, isMoving) {\n if (isMoving) {\n return rotation;\n }\n\n if (rotation !== undefined) {\n rotation = Math.floor(rotation / theta + 0.5) * theta;\n return rotation;\n }\n return undefined;\n }\n );\n}\n\n/**\n * @param {number} [tolerance] Tolerance.\n * @return {Type} Rotation constraint.\n */\nexport function createSnapToZero(tolerance) {\n tolerance = tolerance || toRadians(5);\n return (\n /**\n * @param {number|undefined} rotation Rotation.\n * @param {boolean} [isMoving] True if an interaction or animation is in progress.\n * @return {number|undefined} Rotation.\n */\n function (rotation, isMoving) {\n if (isMoving) {\n return rotation;\n }\n\n if (rotation !== undefined) {\n if (Math.abs(rotation) <= tolerance) {\n return 0;\n }\n return rotation;\n }\n return undefined;\n }\n );\n}\n","/**\n * @module ol/View\n */\nimport BaseObject from './Object.js';\nimport ViewHint from './ViewHint.js';\nimport ViewProperty from './ViewProperty.js';\nimport {DEFAULT_TILE_SIZE} from './tilegrid/common.js';\nimport {\n METERS_PER_UNIT,\n createProjection,\n disableCoordinateWarning,\n fromUserCoordinate,\n fromUserExtent,\n getUserProjection,\n toUserCoordinate,\n toUserExtent,\n} from './proj.js';\nimport {VOID} from './functions.js';\nimport {\n add as addCoordinate,\n equals as coordinatesEqual,\n equals,\n rotate as rotateCoordinate,\n} from './coordinate.js';\nimport {assert} from './asserts.js';\nimport {none as centerNone, createExtent} from './centerconstraint.js';\nimport {clamp, modulo} from './math.js';\nimport {\n createMinMaxResolution,\n createSnapToPower,\n createSnapToResolutions,\n} from './resolutionconstraint.js';\nimport {\n createSnapToN,\n createSnapToZero,\n disable,\n none as rotationNone,\n} from './rotationconstraint.js';\nimport {easeOut, inAndOut} from './easing.js';\nimport {\n getCenter,\n getForViewAndSize,\n getHeight,\n getWidth,\n isEmpty,\n} from './extent.js';\nimport {linearFindNearest} from './array.js';\nimport {fromExtent as polygonFromExtent} from './geom/Polygon.js';\n\n/**\n * An animation configuration\n *\n * @typedef {Object} Animation\n * @property {import(\"./coordinate.js\").Coordinate} [sourceCenter] Source center.\n * @property {import(\"./coordinate.js\").Coordinate} [targetCenter] Target center.\n * @property {number} [sourceResolution] Source resolution.\n * @property {number} [targetResolution] Target resolution.\n * @property {number} [sourceRotation] Source rotation.\n * @property {number} [targetRotation] Target rotation.\n * @property {import(\"./coordinate.js\").Coordinate} [anchor] Anchor.\n * @property {number} start Start.\n * @property {number} duration Duration.\n * @property {boolean} complete Complete.\n * @property {function(number):number} easing Easing.\n * @property {function(boolean):void} callback Callback.\n */\n\n/**\n * @typedef {Object} Constraints\n * @property {import(\"./centerconstraint.js\").Type} center Center.\n * @property {import(\"./resolutionconstraint.js\").Type} resolution Resolution.\n * @property {import(\"./rotationconstraint.js\").Type} rotation Rotation.\n */\n\n/**\n * @typedef {Object} FitOptions\n * @property {import(\"./size.js\").Size} [size] The size in pixels of the box to fit\n * the extent into. Default is the current size of the first map in the DOM that\n * uses this view, or `[100, 100]` if no such map is found.\n * @property {!Array} [padding=[0, 0, 0, 0]] Padding (in pixels) to be\n * cleared inside the view. Values in the array are top, right, bottom and left\n * padding.\n * @property {boolean} [nearest=false] If the view `constrainResolution` option is `true`,\n * get the nearest extent instead of the closest that actually fits the view.\n * @property {number} [minResolution=0] Minimum resolution that we zoom to.\n * @property {number} [maxZoom] Maximum zoom level that we zoom to. If\n * `minResolution` is given, this property is ignored.\n * @property {number} [duration] The duration of the animation in milliseconds.\n * By default, there is no animation to the target extent.\n * @property {function(number):number} [easing] The easing function used during\n * the animation (defaults to {@link module:ol/easing.inAndOut}).\n * The function will be called for each frame with a number representing a\n * fraction of the animation's duration. The function should return a number\n * between 0 and 1 representing the progress toward the destination state.\n * @property {function(boolean):void} [callback] Function called when the view is in\n * its final position. The callback will be called with `true` if the animation\n * series completed on its own or `false` if it was cancelled.\n */\n\n/**\n * @typedef {Object} ViewOptions\n * @property {import(\"./coordinate.js\").Coordinate} [center] The initial center for\n * the view. If a user projection is not set, the coordinate system for the center is\n * specified with the `projection` option. Layer sources will not be fetched if this\n * is not set, but the center can be set later with {@link #setCenter}.\n * @property {boolean|number} [constrainRotation=true] Rotation constraint.\n * `false` means no constraint. `true` means no constraint, but snap to zero\n * near zero. A number constrains the rotation to that number of values. For\n * example, `4` will constrain the rotation to 0, 90, 180, and 270 degrees.\n * @property {boolean} [enableRotation=true] Enable rotation.\n * If `false`, a rotation constraint that always sets the rotation to zero is\n * used. The `constrainRotation` option has no effect if `enableRotation` is\n * `false`.\n * @property {import(\"./extent.js\").Extent} [extent] The extent that constrains the\n * view, in other words, nothing outside of this extent can be visible on the map.\n * @property {boolean} [constrainOnlyCenter=false] If true, the extent\n * constraint will only apply to the view center and not the whole extent.\n * @property {boolean} [smoothExtentConstraint=true] If true, the extent\n * constraint will be applied smoothly, i.e. allow the view to go slightly outside\n * of the given `extent`.\n * @property {number} [maxResolution] The maximum resolution used to determine\n * the resolution constraint. It is used together with `minResolution` (or\n * `maxZoom`) and `zoomFactor`. If unspecified it is calculated in such a way\n * that the projection's validity extent fits in a 256x256 px tile. If the\n * projection is Spherical Mercator (the default) then `maxResolution` defaults\n * to `40075016.68557849 / 256 = 156543.03392804097`.\n * @property {number} [minResolution] The minimum resolution used to determine\n * the resolution constraint. It is used together with `maxResolution` (or\n * `minZoom`) and `zoomFactor`. If unspecified it is calculated assuming 29\n * zoom levels (with a factor of 2). If the projection is Spherical Mercator\n * (the default) then `minResolution` defaults to\n * `40075016.68557849 / 256 / Math.pow(2, 28) = 0.0005831682455839253`.\n * @property {number} [maxZoom=28] The maximum zoom level used to determine the\n * resolution constraint. It is used together with `minZoom` (or\n * `maxResolution`) and `zoomFactor`. Note that if `minResolution` is also\n * provided, it is given precedence over `maxZoom`.\n * @property {number} [minZoom=0] The minimum zoom level used to determine the\n * resolution constraint. It is used together with `maxZoom` (or\n * `minResolution`) and `zoomFactor`. Note that if `maxResolution` is also\n * provided, it is given precedence over `minZoom`.\n * @property {boolean} [multiWorld=false] If `false` the view is constrained so\n * only one world is visible, and you cannot pan off the edge. If `true` the map\n * may show multiple worlds at low zoom levels. Only used if the `projection` is\n * global. Note that if `extent` is also provided it is given precedence.\n * @property {boolean} [constrainResolution=false] If true, the view will always\n * animate to the closest zoom level after an interaction; false means\n * intermediary zoom levels are allowed.\n * @property {boolean} [smoothResolutionConstraint=true] If true, the resolution\n * min/max values will be applied smoothly, i. e. allow the view to exceed slightly\n * the given resolution or zoom bounds.\n * @property {boolean} [showFullExtent=false] Allow the view to be zoomed out to\n * show the full configured extent. By default, when a view is configured with an\n * extent, users will not be able to zoom out so the viewport exceeds the extent in\n * either dimension. This means the full extent may not be visible if the viewport\n * is taller or wider than the aspect ratio of the configured extent. If\n * showFullExtent is true, the user will be able to zoom out so that the viewport\n * exceeds the height or width of the configured extent, but not both, allowing the\n * full extent to be shown.\n * @property {import(\"./proj.js\").ProjectionLike} [projection='EPSG:3857'] The\n * projection. The default is Spherical Mercator.\n * @property {number} [resolution] The initial resolution for the view. The\n * units are `projection` units per pixel (e.g. meters per pixel). An\n * alternative to setting this is to set `zoom`. Layer sources will not be\n * fetched if neither this nor `zoom` are defined, but they can be set later\n * with {@link #setZoom} or {@link #setResolution}.\n * @property {Array} [resolutions] Resolutions that determine the\n * zoom levels if specified. The index in the array corresponds to the zoom level,\n * therefore the resolution values have to be in descending order. It also constrains\n * the resolution by the minimum and maximum value. If set the `maxResolution`,\n * `minResolution`, `minZoom`, `maxZoom`, and `zoomFactor` options are ignored.\n * @property {number} [rotation=0] The initial rotation for the view in radians\n * (positive rotation clockwise, 0 means North).\n * @property {number} [zoom] Only used if `resolution` is not defined. Zoom\n * level used to calculate the initial resolution for the view.\n * @property {number} [zoomFactor=2] The zoom factor used to compute the\n * corresponding resolution.\n * @property {!Array} [padding=[0, 0, 0, 0]] Padding (in css pixels).\n * If the map viewport is partially covered with other content (overlays) along\n * its edges, this setting allows to shift the center of the viewport away from\n * that content. The order of the values is top, right, bottom, left.\n */\n\n/**\n * @typedef {Object} AnimationOptions\n * @property {import(\"./coordinate.js\").Coordinate} [center] The center of the view at the end of\n * the animation.\n * @property {number} [zoom] The zoom level of the view at the end of the\n * animation. This takes precedence over `resolution`.\n * @property {number} [resolution] The resolution of the view at the end\n * of the animation. If `zoom` is also provided, this option will be ignored.\n * @property {number} [rotation] The rotation of the view at the end of\n * the animation.\n * @property {import(\"./coordinate.js\").Coordinate} [anchor] Optional anchor to remain fixed\n * during a rotation or resolution animation.\n * @property {number} [duration=1000] The duration of the animation in milliseconds.\n * @property {function(number):number} [easing] The easing function used\n * during the animation (defaults to {@link module:ol/easing.inAndOut}).\n * The function will be called for each frame with a number representing a\n * fraction of the animation's duration. The function should return a number\n * between 0 and 1 representing the progress toward the destination state.\n */\n\n/**\n * @typedef {Object} State\n * @property {import(\"./coordinate.js\").Coordinate} center Center.\n * @property {import(\"./proj/Projection.js\").default} projection Projection.\n * @property {number} resolution Resolution.\n * @property {import(\"./coordinate.js\").Coordinate} [nextCenter] The next center during an animation series.\n * @property {number} [nextResolution] The next resolution during an animation series.\n * @property {number} [nextRotation] The next rotation during an animation series.\n * @property {number} rotation Rotation.\n * @property {number} zoom Zoom.\n */\n\n/**\n * Default min zoom level for the map view.\n * @type {number}\n */\nconst DEFAULT_MIN_ZOOM = 0;\n\n/**\n * @typedef {import(\"./ObjectEventType\").Types|'change:center'|'change:resolution'|'change:rotation'} ViewObjectEventTypes\n */\n\n/***\n * @template Return\n * @typedef {import(\"./Observable\").OnSignature &\n * import(\"./Observable\").OnSignature &\n * import(\"./Observable\").CombinedOnSignature} ViewOnSignature\n */\n\n/**\n * @classdesc\n * A View object represents a simple 2D view of the map.\n *\n * This is the object to act upon to change the center, resolution,\n * and rotation of the map.\n *\n * A View has a `projection`. The projection determines the\n * coordinate system of the center, and its units determine the units of the\n * resolution (projection units per pixel). The default projection is\n * Web Mercator (EPSG:3857).\n *\n * ### The view states\n *\n * A View is determined by three states: `center`, `resolution`,\n * and `rotation`. Each state has a corresponding getter and setter, e.g.\n * `getCenter` and `setCenter` for the `center` state.\n *\n * The `zoom` state is actually not saved on the view: all computations\n * internally use the `resolution` state. Still, the `setZoom` and `getZoom`\n * methods are available, as well as `getResolutionForZoom` and\n * `getZoomForResolution` to switch from one system to the other.\n *\n * ### The constraints\n *\n * `setCenter`, `setResolution` and `setRotation` can be used to change the\n * states of the view, but any constraint defined in the constructor will\n * be applied along the way.\n *\n * A View object can have a *resolution constraint*, a *rotation constraint*\n * and a *center constraint*.\n *\n * The *resolution constraint* typically restricts min/max values and\n * snaps to specific resolutions. It is determined by the following\n * options: `resolutions`, `maxResolution`, `maxZoom` and `zoomFactor`.\n * If `resolutions` is set, the other three options are ignored. See\n * documentation for each option for more information. By default, the view\n * only has a min/max restriction and allow intermediary zoom levels when\n * pinch-zooming for example.\n *\n * The *rotation constraint* snaps to specific angles. It is determined\n * by the following options: `enableRotation` and `constrainRotation`.\n * By default rotation is allowed and its value is snapped to zero when approaching the\n * horizontal.\n *\n * The *center constraint* is determined by the `extent` option. By\n * default the view center is not constrained at all.\n *\n * ### Changing the view state\n *\n * It is important to note that `setZoom`, `setResolution`, `setCenter` and\n * `setRotation` are subject to the above mentioned constraints. As such, it\n * may sometimes not be possible to know in advance the resulting state of the\n * View. For example, calling `setResolution(10)` does not guarantee that\n * `getResolution()` will return `10`.\n *\n * A consequence of this is that, when applying a delta on the view state, one\n * should use `adjustCenter`, `adjustRotation`, `adjustZoom` and `adjustResolution`\n * rather than the corresponding setters. This will let view do its internal\n * computations. Besides, the `adjust*` methods also take an `anchor`\n * argument which allows specifying an origin for the transformation.\n *\n * ### Interacting with the view\n *\n * View constraints are usually only applied when the view is *at rest*, meaning that\n * no interaction or animation is ongoing. As such, if the user puts the view in a\n * state that is not equivalent to a constrained one (e.g. rotating the view when\n * the snap angle is 0), an animation will be triggered at the interaction end to\n * put back the view to a stable state;\n *\n * @api\n */\nclass View extends BaseObject {\n /**\n * @param {ViewOptions} [options] View options.\n */\n constructor(options) {\n super();\n\n /***\n * @type {ViewOnSignature}\n */\n this.on;\n\n /***\n * @type {ViewOnSignature}\n */\n this.once;\n\n /***\n * @type {ViewOnSignature}\n */\n this.un;\n\n options = Object.assign({}, options);\n\n /**\n * @private\n * @type {Array}\n */\n this.hints_ = [0, 0];\n\n /**\n * @private\n * @type {Array>}\n */\n this.animations_ = [];\n\n /**\n * @private\n * @type {number|undefined}\n */\n this.updateAnimationKey_;\n\n /**\n * @private\n * @const\n * @type {import(\"./proj/Projection.js\").default}\n */\n this.projection_ = createProjection(options.projection, 'EPSG:3857');\n\n /**\n * @private\n * @type {import(\"./size.js\").Size}\n */\n this.viewportSize_ = [100, 100];\n\n /**\n * @private\n * @type {import(\"./coordinate.js\").Coordinate|undefined}\n */\n this.targetCenter_ = null;\n\n /**\n * @private\n * @type {number|undefined}\n */\n this.targetResolution_;\n\n /**\n * @private\n * @type {number|undefined}\n */\n this.targetRotation_;\n\n /**\n * @private\n * @type {import(\"./coordinate.js\").Coordinate}\n */\n this.nextCenter_ = null;\n\n /**\n * @private\n * @type {number}\n */\n this.nextResolution_;\n\n /**\n * @private\n * @type {number}\n */\n this.nextRotation_;\n\n /**\n * @private\n * @type {import(\"./coordinate.js\").Coordinate|undefined}\n */\n this.cancelAnchor_ = undefined;\n\n if (options.projection) {\n disableCoordinateWarning();\n }\n if (options.center) {\n options.center = fromUserCoordinate(options.center, this.projection_);\n }\n if (options.extent) {\n options.extent = fromUserExtent(options.extent, this.projection_);\n }\n\n this.applyOptions_(options);\n }\n\n /**\n * Set up the view with the given options.\n * @param {ViewOptions} options View options.\n */\n applyOptions_(options) {\n const properties = Object.assign({}, options);\n for (const key in ViewProperty) {\n delete properties[key];\n }\n this.setProperties(properties, true);\n\n const resolutionConstraintInfo = createResolutionConstraint(options);\n\n /**\n * @private\n * @type {number}\n */\n this.maxResolution_ = resolutionConstraintInfo.maxResolution;\n\n /**\n * @private\n * @type {number}\n */\n this.minResolution_ = resolutionConstraintInfo.minResolution;\n\n /**\n * @private\n * @type {number}\n */\n this.zoomFactor_ = resolutionConstraintInfo.zoomFactor;\n\n /**\n * @private\n * @type {Array|undefined}\n */\n this.resolutions_ = options.resolutions;\n\n /**\n * @type {Array|undefined}\n * @private\n */\n this.padding_ = options.padding;\n\n /**\n * @private\n * @type {number}\n */\n this.minZoom_ = resolutionConstraintInfo.minZoom;\n\n const centerConstraint = createCenterConstraint(options);\n const resolutionConstraint = resolutionConstraintInfo.constraint;\n const rotationConstraint = createRotationConstraint(options);\n\n /**\n * @private\n * @type {Constraints}\n */\n this.constraints_ = {\n center: centerConstraint,\n resolution: resolutionConstraint,\n rotation: rotationConstraint,\n };\n\n this.setRotation(options.rotation !== undefined ? options.rotation : 0);\n this.setCenterInternal(\n options.center !== undefined ? options.center : null\n );\n if (options.resolution !== undefined) {\n this.setResolution(options.resolution);\n } else if (options.zoom !== undefined) {\n this.setZoom(options.zoom);\n }\n }\n\n /**\n * Padding (in css pixels).\n * If the map viewport is partially covered with other content (overlays) along\n * its edges, this setting allows to shift the center of the viewport away from that\n * content. The order of the values in the array is top, right, bottom, left.\n * The default is no padding, which is equivalent to `[0, 0, 0, 0]`.\n * @type {Array|undefined}\n * @api\n */\n get padding() {\n return this.padding_;\n }\n set padding(padding) {\n let oldPadding = this.padding_;\n this.padding_ = padding;\n const center = this.getCenter();\n if (center) {\n const newPadding = padding || [0, 0, 0, 0];\n oldPadding = oldPadding || [0, 0, 0, 0];\n const resolution = this.getResolution();\n const offsetX =\n (resolution / 2) *\n (newPadding[3] - oldPadding[3] + oldPadding[1] - newPadding[1]);\n const offsetY =\n (resolution / 2) *\n (newPadding[0] - oldPadding[0] + oldPadding[2] - newPadding[2]);\n this.setCenterInternal([center[0] + offsetX, center[1] - offsetY]);\n }\n }\n\n /**\n * Get an updated version of the view options used to construct the view. The\n * current resolution (or zoom), center, and rotation are applied to any stored\n * options. The provided options can be used to apply new min/max zoom or\n * resolution limits.\n * @param {ViewOptions} newOptions New options to be applied.\n * @return {ViewOptions} New options updated with the current view state.\n */\n getUpdatedOptions_(newOptions) {\n const options = this.getProperties();\n\n // preserve resolution (or zoom)\n if (options.resolution !== undefined) {\n options.resolution = this.getResolution();\n } else {\n options.zoom = this.getZoom();\n }\n\n // preserve center\n options.center = this.getCenterInternal();\n\n // preserve rotation\n options.rotation = this.getRotation();\n\n return Object.assign({}, options, newOptions);\n }\n\n /**\n * Animate the view. The view's center, zoom (or resolution), and rotation\n * can be animated for smooth transitions between view states. For example,\n * to animate the view to a new zoom level:\n *\n * view.animate({zoom: view.getZoom() + 1});\n *\n * By default, the animation lasts one second and uses in-and-out easing. You\n * can customize this behavior by including `duration` (in milliseconds) and\n * `easing` options (see {@link module:ol/easing}).\n *\n * To chain together multiple animations, call the method with multiple\n * animation objects. For example, to first zoom and then pan:\n *\n * view.animate({zoom: 10}, {center: [0, 0]});\n *\n * If you provide a function as the last argument to the animate method, it\n * will get called at the end of an animation series. The callback will be\n * called with `true` if the animation series completed on its own or `false`\n * if it was cancelled.\n *\n * Animations are cancelled by user interactions (e.g. dragging the map) or by\n * calling `view.setCenter()`, `view.setResolution()`, or `view.setRotation()`\n * (or another method that calls one of these).\n *\n * @param {...(AnimationOptions|function(boolean): void)} var_args Animation\n * options. Multiple animations can be run in series by passing multiple\n * options objects. To run multiple animations in parallel, call the method\n * multiple times. An optional callback can be provided as a final\n * argument. The callback will be called with a boolean indicating whether\n * the animation completed without being cancelled.\n * @api\n */\n animate(var_args) {\n if (this.isDef() && !this.getAnimating()) {\n this.resolveConstraints(0);\n }\n const args = new Array(arguments.length);\n for (let i = 0; i < args.length; ++i) {\n let options = arguments[i];\n if (options.center) {\n options = Object.assign({}, options);\n options.center = fromUserCoordinate(\n options.center,\n this.getProjection()\n );\n }\n if (options.anchor) {\n options = Object.assign({}, options);\n options.anchor = fromUserCoordinate(\n options.anchor,\n this.getProjection()\n );\n }\n args[i] = options;\n }\n this.animateInternal.apply(this, args);\n }\n\n /**\n * @param {...(AnimationOptions|function(boolean): void)} var_args Animation options.\n */\n animateInternal(var_args) {\n let animationCount = arguments.length;\n let callback;\n if (\n animationCount > 1 &&\n typeof arguments[animationCount - 1] === 'function'\n ) {\n callback = arguments[animationCount - 1];\n --animationCount;\n }\n\n let i = 0;\n for (; i < animationCount && !this.isDef(); ++i) {\n // if view properties are not yet set, shortcut to the final state\n const state = arguments[i];\n if (state.center) {\n this.setCenterInternal(state.center);\n }\n if (state.zoom !== undefined) {\n this.setZoom(state.zoom);\n } else if (state.resolution) {\n this.setResolution(state.resolution);\n }\n if (state.rotation !== undefined) {\n this.setRotation(state.rotation);\n }\n }\n if (i === animationCount) {\n if (callback) {\n animationCallback(callback, true);\n }\n return;\n }\n\n let start = Date.now();\n let center = this.targetCenter_.slice();\n let resolution = this.targetResolution_;\n let rotation = this.targetRotation_;\n const series = [];\n for (; i < animationCount; ++i) {\n const options = /** @type {AnimationOptions} */ (arguments[i]);\n\n const animation = {\n start: start,\n complete: false,\n anchor: options.anchor,\n duration: options.duration !== undefined ? options.duration : 1000,\n easing: options.easing || inAndOut,\n callback: callback,\n };\n\n if (options.center) {\n animation.sourceCenter = center;\n animation.targetCenter = options.center.slice();\n center = animation.targetCenter;\n }\n\n if (options.zoom !== undefined) {\n animation.sourceResolution = resolution;\n animation.targetResolution = this.getResolutionForZoom(options.zoom);\n resolution = animation.targetResolution;\n } else if (options.resolution) {\n animation.sourceResolution = resolution;\n animation.targetResolution = options.resolution;\n resolution = animation.targetResolution;\n }\n\n if (options.rotation !== undefined) {\n animation.sourceRotation = rotation;\n const delta =\n modulo(options.rotation - rotation + Math.PI, 2 * Math.PI) - Math.PI;\n animation.targetRotation = rotation + delta;\n rotation = animation.targetRotation;\n }\n\n // check if animation is a no-op\n if (isNoopAnimation(animation)) {\n animation.complete = true;\n // we still push it onto the series for callback handling\n } else {\n start += animation.duration;\n }\n series.push(animation);\n }\n this.animations_.push(series);\n this.setHint(ViewHint.ANIMATING, 1);\n this.updateAnimations_();\n }\n\n /**\n * Determine if the view is being animated.\n * @return {boolean} The view is being animated.\n * @api\n */\n getAnimating() {\n return this.hints_[ViewHint.ANIMATING] > 0;\n }\n\n /**\n * Determine if the user is interacting with the view, such as panning or zooming.\n * @return {boolean} The view is being interacted with.\n * @api\n */\n getInteracting() {\n return this.hints_[ViewHint.INTERACTING] > 0;\n }\n\n /**\n * Cancel any ongoing animations.\n * @api\n */\n cancelAnimations() {\n this.setHint(ViewHint.ANIMATING, -this.hints_[ViewHint.ANIMATING]);\n let anchor;\n for (let i = 0, ii = this.animations_.length; i < ii; ++i) {\n const series = this.animations_[i];\n if (series[0].callback) {\n animationCallback(series[0].callback, false);\n }\n if (!anchor) {\n for (let j = 0, jj = series.length; j < jj; ++j) {\n const animation = series[j];\n if (!animation.complete) {\n anchor = animation.anchor;\n break;\n }\n }\n }\n }\n this.animations_.length = 0;\n this.cancelAnchor_ = anchor;\n this.nextCenter_ = null;\n this.nextResolution_ = NaN;\n this.nextRotation_ = NaN;\n }\n\n /**\n * Update all animations.\n */\n updateAnimations_() {\n if (this.updateAnimationKey_ !== undefined) {\n cancelAnimationFrame(this.updateAnimationKey_);\n this.updateAnimationKey_ = undefined;\n }\n if (!this.getAnimating()) {\n return;\n }\n const now = Date.now();\n let more = false;\n for (let i = this.animations_.length - 1; i >= 0; --i) {\n const series = this.animations_[i];\n let seriesComplete = true;\n for (let j = 0, jj = series.length; j < jj; ++j) {\n const animation = series[j];\n if (animation.complete) {\n continue;\n }\n const elapsed = now - animation.start;\n let fraction =\n animation.duration > 0 ? elapsed / animation.duration : 1;\n if (fraction >= 1) {\n animation.complete = true;\n fraction = 1;\n } else {\n seriesComplete = false;\n }\n const progress = animation.easing(fraction);\n if (animation.sourceCenter) {\n const x0 = animation.sourceCenter[0];\n const y0 = animation.sourceCenter[1];\n const x1 = animation.targetCenter[0];\n const y1 = animation.targetCenter[1];\n this.nextCenter_ = animation.targetCenter;\n const x = x0 + progress * (x1 - x0);\n const y = y0 + progress * (y1 - y0);\n this.targetCenter_ = [x, y];\n }\n if (animation.sourceResolution && animation.targetResolution) {\n const resolution =\n progress === 1\n ? animation.targetResolution\n : animation.sourceResolution +\n progress *\n (animation.targetResolution - animation.sourceResolution);\n if (animation.anchor) {\n const size = this.getViewportSize_(this.getRotation());\n const constrainedResolution = this.constraints_.resolution(\n resolution,\n 0,\n size,\n true\n );\n this.targetCenter_ = this.calculateCenterZoom(\n constrainedResolution,\n animation.anchor\n );\n }\n this.nextResolution_ = animation.targetResolution;\n this.targetResolution_ = resolution;\n this.applyTargetState_(true);\n }\n if (\n animation.sourceRotation !== undefined &&\n animation.targetRotation !== undefined\n ) {\n const rotation =\n progress === 1\n ? modulo(animation.targetRotation + Math.PI, 2 * Math.PI) -\n Math.PI\n : animation.sourceRotation +\n progress *\n (animation.targetRotation - animation.sourceRotation);\n if (animation.anchor) {\n const constrainedRotation = this.constraints_.rotation(\n rotation,\n true\n );\n this.targetCenter_ = this.calculateCenterRotate(\n constrainedRotation,\n animation.anchor\n );\n }\n this.nextRotation_ = animation.targetRotation;\n this.targetRotation_ = rotation;\n }\n this.applyTargetState_(true);\n more = true;\n if (!animation.complete) {\n break;\n }\n }\n if (seriesComplete) {\n this.animations_[i] = null;\n this.setHint(ViewHint.ANIMATING, -1);\n this.nextCenter_ = null;\n this.nextResolution_ = NaN;\n this.nextRotation_ = NaN;\n const callback = series[0].callback;\n if (callback) {\n animationCallback(callback, true);\n }\n }\n }\n // prune completed series\n this.animations_ = this.animations_.filter(Boolean);\n if (more && this.updateAnimationKey_ === undefined) {\n this.updateAnimationKey_ = requestAnimationFrame(\n this.updateAnimations_.bind(this)\n );\n }\n }\n\n /**\n * @param {number} rotation Target rotation.\n * @param {import(\"./coordinate.js\").Coordinate} anchor Rotation anchor.\n * @return {import(\"./coordinate.js\").Coordinate|undefined} Center for rotation and anchor.\n */\n calculateCenterRotate(rotation, anchor) {\n let center;\n const currentCenter = this.getCenterInternal();\n if (currentCenter !== undefined) {\n center = [currentCenter[0] - anchor[0], currentCenter[1] - anchor[1]];\n rotateCoordinate(center, rotation - this.getRotation());\n addCoordinate(center, anchor);\n }\n return center;\n }\n\n /**\n * @param {number} resolution Target resolution.\n * @param {import(\"./coordinate.js\").Coordinate} anchor Zoom anchor.\n * @return {import(\"./coordinate.js\").Coordinate|undefined} Center for resolution and anchor.\n */\n calculateCenterZoom(resolution, anchor) {\n let center;\n const currentCenter = this.getCenterInternal();\n const currentResolution = this.getResolution();\n if (currentCenter !== undefined && currentResolution !== undefined) {\n const x =\n anchor[0] -\n (resolution * (anchor[0] - currentCenter[0])) / currentResolution;\n const y =\n anchor[1] -\n (resolution * (anchor[1] - currentCenter[1])) / currentResolution;\n center = [x, y];\n }\n return center;\n }\n\n /**\n * Returns the current viewport size.\n * @private\n * @param {number} [rotation] Take into account the rotation of the viewport when giving the size\n * @return {import(\"./size.js\").Size} Viewport size or `[100, 100]` when no viewport is found.\n */\n getViewportSize_(rotation) {\n const size = this.viewportSize_;\n if (rotation) {\n const w = size[0];\n const h = size[1];\n return [\n Math.abs(w * Math.cos(rotation)) + Math.abs(h * Math.sin(rotation)),\n Math.abs(w * Math.sin(rotation)) + Math.abs(h * Math.cos(rotation)),\n ];\n }\n return size;\n }\n\n /**\n * Stores the viewport size on the view. The viewport size is not read every time from the DOM\n * to avoid performance hit and layout reflow.\n * This should be done on map size change.\n * Note: the constraints are not resolved during an animation to avoid stopping it\n * @param {import(\"./size.js\").Size} [size] Viewport size; if undefined, [100, 100] is assumed\n */\n setViewportSize(size) {\n this.viewportSize_ = Array.isArray(size) ? size.slice() : [100, 100];\n if (!this.getAnimating()) {\n this.resolveConstraints(0);\n }\n }\n\n /**\n * Get the view center.\n * @return {import(\"./coordinate.js\").Coordinate|undefined} The center of the view.\n * @observable\n * @api\n */\n getCenter() {\n const center = this.getCenterInternal();\n if (!center) {\n return center;\n }\n return toUserCoordinate(center, this.getProjection());\n }\n\n /**\n * Get the view center without transforming to user projection.\n * @return {import(\"./coordinate.js\").Coordinate|undefined} The center of the view.\n */\n getCenterInternal() {\n return /** @type {import(\"./coordinate.js\").Coordinate|undefined} */ (\n this.get(ViewProperty.CENTER)\n );\n }\n\n /**\n * @return {Constraints} Constraints.\n */\n getConstraints() {\n return this.constraints_;\n }\n\n /**\n * @return {boolean} Resolution constraint is set\n */\n getConstrainResolution() {\n return this.get('constrainResolution');\n }\n\n /**\n * @param {Array} [hints] Destination array.\n * @return {Array} Hint.\n */\n getHints(hints) {\n if (hints !== undefined) {\n hints[0] = this.hints_[0];\n hints[1] = this.hints_[1];\n return hints;\n }\n return this.hints_.slice();\n }\n\n /**\n * Calculate the extent for the current view state and the passed size.\n * The size is the pixel dimensions of the box into which the calculated extent\n * should fit. In most cases you want to get the extent of the entire map,\n * that is `map.getSize()`.\n * @param {import(\"./size.js\").Size} [size] Box pixel size. If not provided, the size\n * of the map that uses this view will be used.\n * @return {import(\"./extent.js\").Extent} Extent.\n * @api\n */\n calculateExtent(size) {\n const extent = this.calculateExtentInternal(size);\n return toUserExtent(extent, this.getProjection());\n }\n\n /**\n * @param {import(\"./size.js\").Size} [size] Box pixel size. If not provided,\n * the map's last known viewport size will be used.\n * @return {import(\"./extent.js\").Extent} Extent.\n */\n calculateExtentInternal(size) {\n size = size || this.getViewportSizeMinusPadding_();\n const center = /** @type {!import(\"./coordinate.js\").Coordinate} */ (\n this.getCenterInternal()\n );\n assert(center, 1); // The view center is not defined\n const resolution = /** @type {!number} */ (this.getResolution());\n assert(resolution !== undefined, 2); // The view resolution is not defined\n const rotation = /** @type {!number} */ (this.getRotation());\n assert(rotation !== undefined, 3); // The view rotation is not defined\n\n return getForViewAndSize(center, resolution, rotation, size);\n }\n\n /**\n * Get the maximum resolution of the view.\n * @return {number} The maximum resolution of the view.\n * @api\n */\n getMaxResolution() {\n return this.maxResolution_;\n }\n\n /**\n * Get the minimum resolution of the view.\n * @return {number} The minimum resolution of the view.\n * @api\n */\n getMinResolution() {\n return this.minResolution_;\n }\n\n /**\n * Get the maximum zoom level for the view.\n * @return {number} The maximum zoom level.\n * @api\n */\n getMaxZoom() {\n return /** @type {number} */ (\n this.getZoomForResolution(this.minResolution_)\n );\n }\n\n /**\n * Set a new maximum zoom level for the view.\n * @param {number} zoom The maximum zoom level.\n * @api\n */\n setMaxZoom(zoom) {\n this.applyOptions_(this.getUpdatedOptions_({maxZoom: zoom}));\n }\n\n /**\n * Get the minimum zoom level for the view.\n * @return {number} The minimum zoom level.\n * @api\n */\n getMinZoom() {\n return /** @type {number} */ (\n this.getZoomForResolution(this.maxResolution_)\n );\n }\n\n /**\n * Set a new minimum zoom level for the view.\n * @param {number} zoom The minimum zoom level.\n * @api\n */\n setMinZoom(zoom) {\n this.applyOptions_(this.getUpdatedOptions_({minZoom: zoom}));\n }\n\n /**\n * Set whether the view should allow intermediary zoom levels.\n * @param {boolean} enabled Whether the resolution is constrained.\n * @api\n */\n setConstrainResolution(enabled) {\n this.applyOptions_(this.getUpdatedOptions_({constrainResolution: enabled}));\n }\n\n /**\n * Get the view projection.\n * @return {import(\"./proj/Projection.js\").default} The projection of the view.\n * @api\n */\n getProjection() {\n return this.projection_;\n }\n\n /**\n * Get the view resolution.\n * @return {number|undefined} The resolution of the view.\n * @observable\n * @api\n */\n getResolution() {\n return /** @type {number|undefined} */ (this.get(ViewProperty.RESOLUTION));\n }\n\n /**\n * Get the resolutions for the view. This returns the array of resolutions\n * passed to the constructor of the View, or undefined if none were given.\n * @return {Array|undefined} The resolutions of the view.\n * @api\n */\n getResolutions() {\n return this.resolutions_;\n }\n\n /**\n * Get the resolution for a provided extent (in map units) and size (in pixels).\n * @param {import(\"./extent.js\").Extent} extent Extent.\n * @param {import(\"./size.js\").Size} [size] Box pixel size.\n * @return {number} The resolution at which the provided extent will render at\n * the given size.\n * @api\n */\n getResolutionForExtent(extent, size) {\n return this.getResolutionForExtentInternal(\n fromUserExtent(extent, this.getProjection()),\n size\n );\n }\n\n /**\n * Get the resolution for a provided extent (in map units) and size (in pixels).\n * @param {import(\"./extent.js\").Extent} extent Extent.\n * @param {import(\"./size.js\").Size} [size] Box pixel size.\n * @return {number} The resolution at which the provided extent will render at\n * the given size.\n */\n getResolutionForExtentInternal(extent, size) {\n size = size || this.getViewportSizeMinusPadding_();\n const xResolution = getWidth(extent) / size[0];\n const yResolution = getHeight(extent) / size[1];\n return Math.max(xResolution, yResolution);\n }\n\n /**\n * Return a function that returns a value between 0 and 1 for a\n * resolution. Exponential scaling is assumed.\n * @param {number} [power] Power.\n * @return {function(number): number} Resolution for value function.\n */\n getResolutionForValueFunction(power) {\n power = power || 2;\n const maxResolution = this.getConstrainedResolution(this.maxResolution_);\n const minResolution = this.minResolution_;\n const max = Math.log(maxResolution / minResolution) / Math.log(power);\n return (\n /**\n * @param {number} value Value.\n * @return {number} Resolution.\n */\n function (value) {\n const resolution = maxResolution / Math.pow(power, value * max);\n return resolution;\n }\n );\n }\n\n /**\n * Get the view rotation.\n * @return {number} The rotation of the view in radians.\n * @observable\n * @api\n */\n getRotation() {\n return /** @type {number} */ (this.get(ViewProperty.ROTATION));\n }\n\n /**\n * Return a function that returns a resolution for a value between\n * 0 and 1. Exponential scaling is assumed.\n * @param {number} [power] Power.\n * @return {function(number): number} Value for resolution function.\n */\n getValueForResolutionFunction(power) {\n const logPower = Math.log(power || 2);\n const maxResolution = this.getConstrainedResolution(this.maxResolution_);\n const minResolution = this.minResolution_;\n const max = Math.log(maxResolution / minResolution) / logPower;\n return (\n /**\n * @param {number} resolution Resolution.\n * @return {number} Value.\n */\n function (resolution) {\n const value = Math.log(maxResolution / resolution) / logPower / max;\n return value;\n }\n );\n }\n\n /**\n * Returns the size of the viewport minus padding.\n * @private\n * @param {number} [rotation] Take into account the rotation of the viewport when giving the size\n * @return {import(\"./size.js\").Size} Viewport size reduced by the padding.\n */\n getViewportSizeMinusPadding_(rotation) {\n let size = this.getViewportSize_(rotation);\n const padding = this.padding_;\n if (padding) {\n size = [\n size[0] - padding[1] - padding[3],\n size[1] - padding[0] - padding[2],\n ];\n }\n return size;\n }\n\n /**\n * @return {State} View state.\n */\n getState() {\n const projection = this.getProjection();\n const resolution = this.getResolution();\n const rotation = this.getRotation();\n let center = /** @type {import(\"./coordinate.js\").Coordinate} */ (\n this.getCenterInternal()\n );\n const padding = this.padding_;\n if (padding) {\n const reducedSize = this.getViewportSizeMinusPadding_();\n center = calculateCenterOn(\n center,\n this.getViewportSize_(),\n [reducedSize[0] / 2 + padding[3], reducedSize[1] / 2 + padding[0]],\n resolution,\n rotation\n );\n }\n return {\n center: center.slice(0),\n projection: projection !== undefined ? projection : null,\n resolution: resolution,\n nextCenter: this.nextCenter_,\n nextResolution: this.nextResolution_,\n nextRotation: this.nextRotation_,\n rotation: rotation,\n zoom: this.getZoom(),\n };\n }\n\n /**\n * Get the current zoom level. This method may return non-integer zoom levels\n * if the view does not constrain the resolution, or if an interaction or\n * animation is underway.\n * @return {number|undefined} Zoom.\n * @api\n */\n getZoom() {\n let zoom;\n const resolution = this.getResolution();\n if (resolution !== undefined) {\n zoom = this.getZoomForResolution(resolution);\n }\n return zoom;\n }\n\n /**\n * Get the zoom level for a resolution.\n * @param {number} resolution The resolution.\n * @return {number|undefined} The zoom level for the provided resolution.\n * @api\n */\n getZoomForResolution(resolution) {\n let offset = this.minZoom_ || 0;\n let max, zoomFactor;\n if (this.resolutions_) {\n const nearest = linearFindNearest(this.resolutions_, resolution, 1);\n offset = nearest;\n max = this.resolutions_[nearest];\n if (nearest == this.resolutions_.length - 1) {\n zoomFactor = 2;\n } else {\n zoomFactor = max / this.resolutions_[nearest + 1];\n }\n } else {\n max = this.maxResolution_;\n zoomFactor = this.zoomFactor_;\n }\n return offset + Math.log(max / resolution) / Math.log(zoomFactor);\n }\n\n /**\n * Get the resolution for a zoom level.\n * @param {number} zoom Zoom level.\n * @return {number} The view resolution for the provided zoom level.\n * @api\n */\n getResolutionForZoom(zoom) {\n if (this.resolutions_) {\n if (this.resolutions_.length <= 1) {\n return 0;\n }\n const baseLevel = clamp(\n Math.floor(zoom),\n 0,\n this.resolutions_.length - 2\n );\n const zoomFactor =\n this.resolutions_[baseLevel] / this.resolutions_[baseLevel + 1];\n return (\n this.resolutions_[baseLevel] /\n Math.pow(zoomFactor, clamp(zoom - baseLevel, 0, 1))\n );\n }\n return (\n this.maxResolution_ / Math.pow(this.zoomFactor_, zoom - this.minZoom_)\n );\n }\n\n /**\n * Fit the given geometry or extent based on the given map size and border.\n * The size is pixel dimensions of the box to fit the extent into.\n * In most cases you will want to use the map size, that is `map.getSize()`.\n * Takes care of the map angle.\n * @param {import(\"./geom/SimpleGeometry.js\").default|import(\"./extent.js\").Extent} geometryOrExtent The geometry or\n * extent to fit the view to.\n * @param {FitOptions} [options] Options.\n * @api\n */\n fit(geometryOrExtent, options) {\n /** @type {import(\"./geom/SimpleGeometry.js\").default} */\n let geometry;\n assert(\n Array.isArray(geometryOrExtent) ||\n typeof (/** @type {?} */ (geometryOrExtent).getSimplifiedGeometry) ===\n 'function',\n 24\n ); // Invalid extent or geometry provided as `geometry`\n if (Array.isArray(geometryOrExtent)) {\n assert(!isEmpty(geometryOrExtent), 25); // Cannot fit empty extent provided as `geometry`\n const extent = fromUserExtent(geometryOrExtent, this.getProjection());\n geometry = polygonFromExtent(extent);\n } else if (geometryOrExtent.getType() === 'Circle') {\n const extent = fromUserExtent(\n geometryOrExtent.getExtent(),\n this.getProjection()\n );\n geometry = polygonFromExtent(extent);\n geometry.rotate(this.getRotation(), getCenter(extent));\n } else {\n const userProjection = getUserProjection();\n if (userProjection) {\n geometry = /** @type {import(\"./geom/SimpleGeometry.js\").default} */ (\n geometryOrExtent\n .clone()\n .transform(userProjection, this.getProjection())\n );\n } else {\n geometry = geometryOrExtent;\n }\n }\n\n this.fitInternal(geometry, options);\n }\n\n /**\n * Calculate rotated extent\n * @param {import(\"./geom/SimpleGeometry.js\").default} geometry The geometry.\n * @return {import(\"./extent\").Extent} The rotated extent for the geometry.\n */\n rotatedExtentForGeometry(geometry) {\n const rotation = this.getRotation();\n const cosAngle = Math.cos(rotation);\n const sinAngle = Math.sin(-rotation);\n const coords = geometry.getFlatCoordinates();\n const stride = geometry.getStride();\n let minRotX = +Infinity;\n let minRotY = +Infinity;\n let maxRotX = -Infinity;\n let maxRotY = -Infinity;\n for (let i = 0, ii = coords.length; i < ii; i += stride) {\n const rotX = coords[i] * cosAngle - coords[i + 1] * sinAngle;\n const rotY = coords[i] * sinAngle + coords[i + 1] * cosAngle;\n minRotX = Math.min(minRotX, rotX);\n minRotY = Math.min(minRotY, rotY);\n maxRotX = Math.max(maxRotX, rotX);\n maxRotY = Math.max(maxRotY, rotY);\n }\n return [minRotX, minRotY, maxRotX, maxRotY];\n }\n\n /**\n * @param {import(\"./geom/SimpleGeometry.js\").default} geometry The geometry.\n * @param {FitOptions} [options] Options.\n */\n fitInternal(geometry, options) {\n options = options || {};\n let size = options.size;\n if (!size) {\n size = this.getViewportSizeMinusPadding_();\n }\n const padding =\n options.padding !== undefined ? options.padding : [0, 0, 0, 0];\n const nearest = options.nearest !== undefined ? options.nearest : false;\n let minResolution;\n if (options.minResolution !== undefined) {\n minResolution = options.minResolution;\n } else if (options.maxZoom !== undefined) {\n minResolution = this.getResolutionForZoom(options.maxZoom);\n } else {\n minResolution = 0;\n }\n\n const rotatedExtent = this.rotatedExtentForGeometry(geometry);\n\n // calculate resolution\n let resolution = this.getResolutionForExtentInternal(rotatedExtent, [\n size[0] - padding[1] - padding[3],\n size[1] - padding[0] - padding[2],\n ]);\n resolution = isNaN(resolution)\n ? minResolution\n : Math.max(resolution, minResolution);\n resolution = this.getConstrainedResolution(resolution, nearest ? 0 : 1);\n\n // calculate center\n const rotation = this.getRotation();\n const sinAngle = Math.sin(rotation);\n const cosAngle = Math.cos(rotation);\n const centerRot = getCenter(rotatedExtent);\n centerRot[0] += ((padding[1] - padding[3]) / 2) * resolution;\n centerRot[1] += ((padding[0] - padding[2]) / 2) * resolution;\n const centerX = centerRot[0] * cosAngle - centerRot[1] * sinAngle;\n const centerY = centerRot[1] * cosAngle + centerRot[0] * sinAngle;\n const center = this.getConstrainedCenter([centerX, centerY], resolution);\n const callback = options.callback ? options.callback : VOID;\n\n if (options.duration !== undefined) {\n this.animateInternal(\n {\n resolution: resolution,\n center: center,\n duration: options.duration,\n easing: options.easing,\n },\n callback\n );\n } else {\n this.targetResolution_ = resolution;\n this.targetCenter_ = center;\n this.applyTargetState_(false, true);\n animationCallback(callback, true);\n }\n }\n\n /**\n * Center on coordinate and view position.\n * @param {import(\"./coordinate.js\").Coordinate} coordinate Coordinate.\n * @param {import(\"./size.js\").Size} size Box pixel size.\n * @param {import(\"./pixel.js\").Pixel} position Position on the view to center on.\n * @api\n */\n centerOn(coordinate, size, position) {\n this.centerOnInternal(\n fromUserCoordinate(coordinate, this.getProjection()),\n size,\n position\n );\n }\n\n /**\n * @param {import(\"./coordinate.js\").Coordinate} coordinate Coordinate.\n * @param {import(\"./size.js\").Size} size Box pixel size.\n * @param {import(\"./pixel.js\").Pixel} position Position on the view to center on.\n */\n centerOnInternal(coordinate, size, position) {\n this.setCenterInternal(\n calculateCenterOn(\n coordinate,\n size,\n position,\n this.getResolution(),\n this.getRotation()\n )\n );\n }\n\n /**\n * Calculates the shift between map and viewport center.\n * @param {import(\"./coordinate.js\").Coordinate} center Center.\n * @param {number} resolution Resolution.\n * @param {number} rotation Rotation.\n * @param {import(\"./size.js\").Size} size Size.\n * @return {Array|undefined} Center shift.\n */\n calculateCenterShift(center, resolution, rotation, size) {\n let centerShift;\n const padding = this.padding_;\n if (padding && center) {\n const reducedSize = this.getViewportSizeMinusPadding_(-rotation);\n const shiftedCenter = calculateCenterOn(\n center,\n size,\n [reducedSize[0] / 2 + padding[3], reducedSize[1] / 2 + padding[0]],\n resolution,\n rotation\n );\n centerShift = [\n center[0] - shiftedCenter[0],\n center[1] - shiftedCenter[1],\n ];\n }\n return centerShift;\n }\n\n /**\n * @return {boolean} Is defined.\n */\n isDef() {\n return !!this.getCenterInternal() && this.getResolution() !== undefined;\n }\n\n /**\n * Adds relative coordinates to the center of the view. Any extent constraint will apply.\n * @param {import(\"./coordinate.js\").Coordinate} deltaCoordinates Relative value to add.\n * @api\n */\n adjustCenter(deltaCoordinates) {\n const center = toUserCoordinate(this.targetCenter_, this.getProjection());\n this.setCenter([\n center[0] + deltaCoordinates[0],\n center[1] + deltaCoordinates[1],\n ]);\n }\n\n /**\n * Adds relative coordinates to the center of the view. Any extent constraint will apply.\n * @param {import(\"./coordinate.js\").Coordinate} deltaCoordinates Relative value to add.\n */\n adjustCenterInternal(deltaCoordinates) {\n const center = this.targetCenter_;\n this.setCenterInternal([\n center[0] + deltaCoordinates[0],\n center[1] + deltaCoordinates[1],\n ]);\n }\n\n /**\n * Multiply the view resolution by a ratio, optionally using an anchor. Any resolution\n * constraint will apply.\n * @param {number} ratio The ratio to apply on the view resolution.\n * @param {import(\"./coordinate.js\").Coordinate} [anchor] The origin of the transformation.\n * @api\n */\n adjustResolution(ratio, anchor) {\n anchor = anchor && fromUserCoordinate(anchor, this.getProjection());\n this.adjustResolutionInternal(ratio, anchor);\n }\n\n /**\n * Multiply the view resolution by a ratio, optionally using an anchor. Any resolution\n * constraint will apply.\n * @param {number} ratio The ratio to apply on the view resolution.\n * @param {import(\"./coordinate.js\").Coordinate} [anchor] The origin of the transformation.\n */\n adjustResolutionInternal(ratio, anchor) {\n const isMoving = this.getAnimating() || this.getInteracting();\n const size = this.getViewportSize_(this.getRotation());\n const newResolution = this.constraints_.resolution(\n this.targetResolution_ * ratio,\n 0,\n size,\n isMoving\n );\n\n if (anchor) {\n this.targetCenter_ = this.calculateCenterZoom(newResolution, anchor);\n }\n\n this.targetResolution_ *= ratio;\n this.applyTargetState_();\n }\n\n /**\n * Adds a value to the view zoom level, optionally using an anchor. Any resolution\n * constraint will apply.\n * @param {number} delta Relative value to add to the zoom level.\n * @param {import(\"./coordinate.js\").Coordinate} [anchor] The origin of the transformation.\n * @api\n */\n adjustZoom(delta, anchor) {\n this.adjustResolution(Math.pow(this.zoomFactor_, -delta), anchor);\n }\n\n /**\n * Adds a value to the view rotation, optionally using an anchor. Any rotation\n * constraint will apply.\n * @param {number} delta Relative value to add to the zoom rotation, in radians.\n * @param {import(\"./coordinate.js\").Coordinate} [anchor] The rotation center.\n * @api\n */\n adjustRotation(delta, anchor) {\n if (anchor) {\n anchor = fromUserCoordinate(anchor, this.getProjection());\n }\n this.adjustRotationInternal(delta, anchor);\n }\n\n /**\n * @param {number} delta Relative value to add to the zoom rotation, in radians.\n * @param {import(\"./coordinate.js\").Coordinate} [anchor] The rotation center.\n */\n adjustRotationInternal(delta, anchor) {\n const isMoving = this.getAnimating() || this.getInteracting();\n const newRotation = this.constraints_.rotation(\n this.targetRotation_ + delta,\n isMoving\n );\n if (anchor) {\n this.targetCenter_ = this.calculateCenterRotate(newRotation, anchor);\n }\n this.targetRotation_ += delta;\n this.applyTargetState_();\n }\n\n /**\n * Set the center of the current view. Any extent constraint will apply.\n * @param {import(\"./coordinate.js\").Coordinate|undefined} center The center of the view.\n * @observable\n * @api\n */\n setCenter(center) {\n this.setCenterInternal(\n center ? fromUserCoordinate(center, this.getProjection()) : center\n );\n }\n\n /**\n * Set the center using the view projection (not the user projection).\n * @param {import(\"./coordinate.js\").Coordinate|undefined} center The center of the view.\n */\n setCenterInternal(center) {\n this.targetCenter_ = center;\n this.applyTargetState_();\n }\n\n /**\n * @param {import(\"./ViewHint.js\").default} hint Hint.\n * @param {number} delta Delta.\n * @return {number} New value.\n */\n setHint(hint, delta) {\n this.hints_[hint] += delta;\n this.changed();\n return this.hints_[hint];\n }\n\n /**\n * Set the resolution for this view. Any resolution constraint will apply.\n * @param {number|undefined} resolution The resolution of the view.\n * @observable\n * @api\n */\n setResolution(resolution) {\n this.targetResolution_ = resolution;\n this.applyTargetState_();\n }\n\n /**\n * Set the rotation for this view. Any rotation constraint will apply.\n * @param {number} rotation The rotation of the view in radians.\n * @observable\n * @api\n */\n setRotation(rotation) {\n this.targetRotation_ = rotation;\n this.applyTargetState_();\n }\n\n /**\n * Zoom to a specific zoom level. Any resolution constrain will apply.\n * @param {number} zoom Zoom level.\n * @api\n */\n setZoom(zoom) {\n this.setResolution(this.getResolutionForZoom(zoom));\n }\n\n /**\n * Recompute rotation/resolution/center based on target values.\n * Note: we have to compute rotation first, then resolution and center considering that\n * parameters can influence one another in case a view extent constraint is present.\n * @param {boolean} [doNotCancelAnims] Do not cancel animations.\n * @param {boolean} [forceMoving] Apply constraints as if the view is moving.\n * @private\n */\n applyTargetState_(doNotCancelAnims, forceMoving) {\n const isMoving =\n this.getAnimating() || this.getInteracting() || forceMoving;\n\n // compute rotation\n const newRotation = this.constraints_.rotation(\n this.targetRotation_,\n isMoving\n );\n const size = this.getViewportSize_(newRotation);\n const newResolution = this.constraints_.resolution(\n this.targetResolution_,\n 0,\n size,\n isMoving\n );\n const newCenter = this.constraints_.center(\n this.targetCenter_,\n newResolution,\n size,\n isMoving,\n this.calculateCenterShift(\n this.targetCenter_,\n newResolution,\n newRotation,\n size\n )\n );\n\n if (this.get(ViewProperty.ROTATION) !== newRotation) {\n this.set(ViewProperty.ROTATION, newRotation);\n }\n if (this.get(ViewProperty.RESOLUTION) !== newResolution) {\n this.set(ViewProperty.RESOLUTION, newResolution);\n this.set('zoom', this.getZoom(), true);\n }\n if (\n !newCenter ||\n !this.get(ViewProperty.CENTER) ||\n !equals(this.get(ViewProperty.CENTER), newCenter)\n ) {\n this.set(ViewProperty.CENTER, newCenter);\n }\n\n if (this.getAnimating() && !doNotCancelAnims) {\n this.cancelAnimations();\n }\n this.cancelAnchor_ = undefined;\n }\n\n /**\n * If any constraints need to be applied, an animation will be triggered.\n * This is typically done on interaction end.\n * Note: calling this with a duration of 0 will apply the constrained values straight away,\n * without animation.\n * @param {number} [duration] The animation duration in ms.\n * @param {number} [resolutionDirection] Which direction to zoom.\n * @param {import(\"./coordinate.js\").Coordinate} [anchor] The origin of the transformation.\n */\n resolveConstraints(duration, resolutionDirection, anchor) {\n duration = duration !== undefined ? duration : 200;\n const direction = resolutionDirection || 0;\n\n const newRotation = this.constraints_.rotation(this.targetRotation_);\n const size = this.getViewportSize_(newRotation);\n const newResolution = this.constraints_.resolution(\n this.targetResolution_,\n direction,\n size\n );\n const newCenter = this.constraints_.center(\n this.targetCenter_,\n newResolution,\n size,\n false,\n this.calculateCenterShift(\n this.targetCenter_,\n newResolution,\n newRotation,\n size\n )\n );\n\n if (duration === 0 && !this.cancelAnchor_) {\n this.targetResolution_ = newResolution;\n this.targetRotation_ = newRotation;\n this.targetCenter_ = newCenter;\n this.applyTargetState_();\n return;\n }\n\n anchor = anchor || (duration === 0 ? this.cancelAnchor_ : undefined);\n this.cancelAnchor_ = undefined;\n\n if (\n this.getResolution() !== newResolution ||\n this.getRotation() !== newRotation ||\n !this.getCenterInternal() ||\n !equals(this.getCenterInternal(), newCenter)\n ) {\n if (this.getAnimating()) {\n this.cancelAnimations();\n }\n\n this.animateInternal({\n rotation: newRotation,\n center: newCenter,\n resolution: newResolution,\n duration: duration,\n easing: easeOut,\n anchor: anchor,\n });\n }\n }\n\n /**\n * Notify the View that an interaction has started.\n * The view state will be resolved to a stable one if needed\n * (depending on its constraints).\n * @api\n */\n beginInteraction() {\n this.resolveConstraints(0);\n\n this.setHint(ViewHint.INTERACTING, 1);\n }\n\n /**\n * Notify the View that an interaction has ended. The view state will be resolved\n * to a stable one if needed (depending on its constraints).\n * @param {number} [duration] Animation duration in ms.\n * @param {number} [resolutionDirection] Which direction to zoom.\n * @param {import(\"./coordinate.js\").Coordinate} [anchor] The origin of the transformation.\n * @api\n */\n endInteraction(duration, resolutionDirection, anchor) {\n anchor = anchor && fromUserCoordinate(anchor, this.getProjection());\n this.endInteractionInternal(duration, resolutionDirection, anchor);\n }\n\n /**\n * Notify the View that an interaction has ended. The view state will be resolved\n * to a stable one if needed (depending on its constraints).\n * @param {number} [duration] Animation duration in ms.\n * @param {number} [resolutionDirection] Which direction to zoom.\n * @param {import(\"./coordinate.js\").Coordinate} [anchor] The origin of the transformation.\n */\n endInteractionInternal(duration, resolutionDirection, anchor) {\n this.setHint(ViewHint.INTERACTING, -1);\n\n this.resolveConstraints(duration, resolutionDirection, anchor);\n }\n\n /**\n * Get a valid position for the view center according to the current constraints.\n * @param {import(\"./coordinate.js\").Coordinate|undefined} targetCenter Target center position.\n * @param {number} [targetResolution] Target resolution. If not supplied, the current one will be used.\n * This is useful to guess a valid center position at a different zoom level.\n * @return {import(\"./coordinate.js\").Coordinate|undefined} Valid center position.\n */\n getConstrainedCenter(targetCenter, targetResolution) {\n const size = this.getViewportSize_(this.getRotation());\n return this.constraints_.center(\n targetCenter,\n targetResolution || this.getResolution(),\n size\n );\n }\n\n /**\n * Get a valid zoom level according to the current view constraints.\n * @param {number|undefined} targetZoom Target zoom.\n * @param {number} [direction=0] Indicate which resolution should be used\n * by a renderer if the view resolution does not match any resolution of the tile source.\n * If 0, the nearest resolution will be used. If 1, the nearest lower resolution\n * will be used. If -1, the nearest higher resolution will be used.\n * @return {number|undefined} Valid zoom level.\n */\n getConstrainedZoom(targetZoom, direction) {\n const targetRes = this.getResolutionForZoom(targetZoom);\n return this.getZoomForResolution(\n this.getConstrainedResolution(targetRes, direction)\n );\n }\n\n /**\n * Get a valid resolution according to the current view constraints.\n * @param {number|undefined} targetResolution Target resolution.\n * @param {number} [direction=0] Indicate which resolution should be used\n * by a renderer if the view resolution does not match any resolution of the tile source.\n * If 0, the nearest resolution will be used. If 1, the nearest lower resolution\n * will be used. If -1, the nearest higher resolution will be used.\n * @return {number|undefined} Valid resolution.\n */\n getConstrainedResolution(targetResolution, direction) {\n direction = direction || 0;\n const size = this.getViewportSize_(this.getRotation());\n\n return this.constraints_.resolution(targetResolution, direction, size);\n }\n}\n\n/**\n * @param {Function} callback Callback.\n * @param {*} returnValue Return value.\n */\nfunction animationCallback(callback, returnValue) {\n setTimeout(function () {\n callback(returnValue);\n }, 0);\n}\n\n/**\n * @param {ViewOptions} options View options.\n * @return {import(\"./centerconstraint.js\").Type} The constraint.\n */\nexport function createCenterConstraint(options) {\n if (options.extent !== undefined) {\n const smooth =\n options.smoothExtentConstraint !== undefined\n ? options.smoothExtentConstraint\n : true;\n return createExtent(options.extent, options.constrainOnlyCenter, smooth);\n }\n\n const projection = createProjection(options.projection, 'EPSG:3857');\n if (options.multiWorld !== true && projection.isGlobal()) {\n const extent = projection.getExtent().slice();\n extent[0] = -Infinity;\n extent[2] = Infinity;\n return createExtent(extent, false, false);\n }\n\n return centerNone;\n}\n\n/**\n * @param {ViewOptions} options View options.\n * @return {{constraint: import(\"./resolutionconstraint.js\").Type, maxResolution: number,\n * minResolution: number, minZoom: number, zoomFactor: number}} The constraint.\n */\nexport function createResolutionConstraint(options) {\n let resolutionConstraint;\n let maxResolution;\n let minResolution;\n\n // TODO: move these to be ol constants\n // see https://github.com/openlayers/openlayers/issues/2076\n const defaultMaxZoom = 28;\n const defaultZoomFactor = 2;\n\n let minZoom =\n options.minZoom !== undefined ? options.minZoom : DEFAULT_MIN_ZOOM;\n\n let maxZoom =\n options.maxZoom !== undefined ? options.maxZoom : defaultMaxZoom;\n\n const zoomFactor =\n options.zoomFactor !== undefined ? options.zoomFactor : defaultZoomFactor;\n\n const multiWorld =\n options.multiWorld !== undefined ? options.multiWorld : false;\n\n const smooth =\n options.smoothResolutionConstraint !== undefined\n ? options.smoothResolutionConstraint\n : true;\n\n const showFullExtent =\n options.showFullExtent !== undefined ? options.showFullExtent : false;\n\n const projection = createProjection(options.projection, 'EPSG:3857');\n const projExtent = projection.getExtent();\n let constrainOnlyCenter = options.constrainOnlyCenter;\n let extent = options.extent;\n if (!multiWorld && !extent && projection.isGlobal()) {\n constrainOnlyCenter = false;\n extent = projExtent;\n }\n\n if (options.resolutions !== undefined) {\n const resolutions = options.resolutions;\n maxResolution = resolutions[minZoom];\n minResolution =\n resolutions[maxZoom] !== undefined\n ? resolutions[maxZoom]\n : resolutions[resolutions.length - 1];\n\n if (options.constrainResolution) {\n resolutionConstraint = createSnapToResolutions(\n resolutions,\n smooth,\n !constrainOnlyCenter && extent,\n showFullExtent\n );\n } else {\n resolutionConstraint = createMinMaxResolution(\n maxResolution,\n minResolution,\n smooth,\n !constrainOnlyCenter && extent,\n showFullExtent\n );\n }\n } else {\n // calculate the default min and max resolution\n const size = !projExtent\n ? // use an extent that can fit the whole world if need be\n (360 * METERS_PER_UNIT.degrees) / projection.getMetersPerUnit()\n : Math.max(getWidth(projExtent), getHeight(projExtent));\n\n const defaultMaxResolution =\n size / DEFAULT_TILE_SIZE / Math.pow(defaultZoomFactor, DEFAULT_MIN_ZOOM);\n\n const defaultMinResolution =\n defaultMaxResolution /\n Math.pow(defaultZoomFactor, defaultMaxZoom - DEFAULT_MIN_ZOOM);\n\n // user provided maxResolution takes precedence\n maxResolution = options.maxResolution;\n if (maxResolution !== undefined) {\n minZoom = 0;\n } else {\n maxResolution = defaultMaxResolution / Math.pow(zoomFactor, minZoom);\n }\n\n // user provided minResolution takes precedence\n minResolution = options.minResolution;\n if (minResolution === undefined) {\n if (options.maxZoom !== undefined) {\n if (options.maxResolution !== undefined) {\n minResolution = maxResolution / Math.pow(zoomFactor, maxZoom);\n } else {\n minResolution = defaultMaxResolution / Math.pow(zoomFactor, maxZoom);\n }\n } else {\n minResolution = defaultMinResolution;\n }\n }\n\n // given discrete zoom levels, minResolution may be different than provided\n maxZoom =\n minZoom +\n Math.floor(\n Math.log(maxResolution / minResolution) / Math.log(zoomFactor)\n );\n minResolution = maxResolution / Math.pow(zoomFactor, maxZoom - minZoom);\n\n if (options.constrainResolution) {\n resolutionConstraint = createSnapToPower(\n zoomFactor,\n maxResolution,\n minResolution,\n smooth,\n !constrainOnlyCenter && extent,\n showFullExtent\n );\n } else {\n resolutionConstraint = createMinMaxResolution(\n maxResolution,\n minResolution,\n smooth,\n !constrainOnlyCenter && extent,\n showFullExtent\n );\n }\n }\n return {\n constraint: resolutionConstraint,\n maxResolution: maxResolution,\n minResolution: minResolution,\n minZoom: minZoom,\n zoomFactor: zoomFactor,\n };\n}\n\n/**\n * @param {ViewOptions} options View options.\n * @return {import(\"./rotationconstraint.js\").Type} Rotation constraint.\n */\nexport function createRotationConstraint(options) {\n const enableRotation =\n options.enableRotation !== undefined ? options.enableRotation : true;\n if (enableRotation) {\n const constrainRotation = options.constrainRotation;\n if (constrainRotation === undefined || constrainRotation === true) {\n return createSnapToZero();\n } else if (constrainRotation === false) {\n return rotationNone;\n } else if (typeof constrainRotation === 'number') {\n return createSnapToN(constrainRotation);\n }\n return rotationNone;\n }\n return disable;\n}\n\n/**\n * Determine if an animation involves no view change.\n * @param {Animation} animation The animation.\n * @return {boolean} The animation involves no view change.\n */\nexport function isNoopAnimation(animation) {\n if (animation.sourceCenter && animation.targetCenter) {\n if (!coordinatesEqual(animation.sourceCenter, animation.targetCenter)) {\n return false;\n }\n }\n if (animation.sourceResolution !== animation.targetResolution) {\n return false;\n }\n if (animation.sourceRotation !== animation.targetRotation) {\n return false;\n }\n return true;\n}\n\n/**\n * @param {import(\"./coordinate.js\").Coordinate} coordinate Coordinate.\n * @param {import(\"./size.js\").Size} size Box pixel size.\n * @param {import(\"./pixel.js\").Pixel} position Position on the view to center on.\n * @param {number} resolution Resolution.\n * @param {number} rotation Rotation.\n * @return {import(\"./coordinate.js\").Coordinate} Shifted center.\n */\nfunction calculateCenterOn(coordinate, size, position, resolution, rotation) {\n // calculate rotated position\n const cosAngle = Math.cos(-rotation);\n let sinAngle = Math.sin(-rotation);\n let rotX = coordinate[0] * cosAngle - coordinate[1] * sinAngle;\n let rotY = coordinate[1] * cosAngle + coordinate[0] * sinAngle;\n rotX += (size[0] / 2 - position[0]) * resolution;\n rotY += (position[1] - size[1] / 2) * resolution;\n\n // go back to original angle\n sinAngle = -sinAngle; // go back to original rotation\n const centerX = rotX * cosAngle - rotY * sinAngle;\n const centerY = rotY * cosAngle + rotX * sinAngle;\n\n return [centerX, centerY];\n}\n\nexport default View;\n","/**\n * @module ol/control/Control\n */\nimport BaseObject from '../Object.js';\nimport MapEventType from '../MapEventType.js';\nimport {VOID} from '../functions.js';\nimport {listen, unlistenByKey} from '../events.js';\nimport {removeNode} from '../dom.js';\n\n/**\n * @typedef {Object} Options\n * @property {HTMLElement} [element] The element is the control's\n * container element. This only needs to be specified if you're developing\n * a custom control.\n * @property {function(import(\"../MapEvent.js\").default):void} [render] Function called when\n * the control should be re-rendered. This is called in a `requestAnimationFrame`\n * callback.\n * @property {HTMLElement|string} [target] Specify a target if you want\n * the control to be rendered outside of the map's viewport.\n */\n\n/**\n * @classdesc\n * A control is a visible widget with a DOM element in a fixed position on the\n * screen. They can involve user input (buttons), or be informational only;\n * the position is determined using CSS. By default these are placed in the\n * container with CSS class name `ol-overlaycontainer-stopevent`, but can use\n * any outside DOM element.\n *\n * This is the base class for controls. You can use it for simple custom\n * controls by creating the element with listeners, creating an instance:\n * ```js\n * const myControl = new Control({element: myElement});\n * ```\n * and then adding this to the map.\n *\n * The main advantage of having this as a control rather than a simple separate\n * DOM element is that preventing propagation is handled for you. Controls\n * will also be objects in a {@link module:ol/Collection~Collection}, so you can use their methods.\n *\n * You can also extend this base for your own control class. See\n * examples/custom-controls for an example of how to do this.\n *\n * @api\n */\nclass Control extends BaseObject {\n /**\n * @param {Options} options Control options.\n */\n constructor(options) {\n super();\n\n const element = options.element;\n if (element && !options.target && !element.style.pointerEvents) {\n element.style.pointerEvents = 'auto';\n }\n\n /**\n * @protected\n * @type {HTMLElement}\n */\n this.element = element ? element : null;\n\n /**\n * @private\n * @type {HTMLElement}\n */\n this.target_ = null;\n\n /**\n * @private\n * @type {import(\"../Map.js\").default|null}\n */\n this.map_ = null;\n\n /**\n * @protected\n * @type {!Array}\n */\n this.listenerKeys = [];\n\n if (options.render) {\n this.render = options.render;\n }\n\n if (options.target) {\n this.setTarget(options.target);\n }\n }\n\n /**\n * Clean up.\n */\n disposeInternal() {\n removeNode(this.element);\n super.disposeInternal();\n }\n\n /**\n * Get the map associated with this control.\n * @return {import(\"../Map.js\").default|null} Map.\n * @api\n */\n getMap() {\n return this.map_;\n }\n\n /**\n * Remove the control from its current map and attach it to the new map.\n * Pass `null` to just remove the control from the current map.\n * Subclasses may set up event handlers to get notified about changes to\n * the map here.\n * @param {import(\"../Map.js\").default|null} map Map.\n * @api\n */\n setMap(map) {\n if (this.map_) {\n removeNode(this.element);\n }\n for (let i = 0, ii = this.listenerKeys.length; i < ii; ++i) {\n unlistenByKey(this.listenerKeys[i]);\n }\n this.listenerKeys.length = 0;\n this.map_ = map;\n if (map) {\n const target = this.target_\n ? this.target_\n : map.getOverlayContainerStopEvent();\n target.appendChild(this.element);\n if (this.render !== VOID) {\n this.listenerKeys.push(\n listen(map, MapEventType.POSTRENDER, this.render, this)\n );\n }\n map.render();\n }\n }\n\n /**\n * Renders the control.\n * @param {import(\"../MapEvent.js\").default} mapEvent Map event.\n * @api\n */\n render(mapEvent) {}\n\n /**\n * This function is used to set a target element for the control. It has no\n * effect if it is called after the control has been added to the map (i.e.\n * after `setMap` is called on the control). If no `target` is set in the\n * options passed to the control constructor and if `setTarget` is not called\n * then the control is added to the map's overlay container.\n * @param {HTMLElement|string} target Target.\n * @api\n */\n setTarget(target) {\n this.target_ =\n typeof target === 'string' ? document.getElementById(target) : target;\n }\n}\n\nexport default Control;\n","/**\n * @module ol/control/Attribution\n */\nimport Control from './Control.js';\nimport EventType from '../events/EventType.js';\nimport {CLASS_COLLAPSED, CLASS_CONTROL, CLASS_UNSELECTABLE} from '../css.js';\nimport {equals} from '../array.js';\nimport {inView} from '../layer/Layer.js';\nimport {removeChildren, replaceNode} from '../dom.js';\n\n/**\n * @typedef {Object} Options\n * @property {string} [className='ol-attribution'] CSS class name.\n * @property {HTMLElement|string} [target] Specify a target if you\n * want the control to be rendered outside of the map's\n * viewport.\n * @property {boolean} [collapsible] Specify if attributions can\n * be collapsed. If not specified, sources control this behavior with their\n * `attributionsCollapsible` setting.\n * @property {boolean} [collapsed=true] Specify if attributions should\n * be collapsed at startup.\n * @property {string} [tipLabel='Attributions'] Text label to use for the button tip.\n * @property {string|HTMLElement} [label='i'] Text label to use for the\n * collapsed attributions button.\n * Instead of text, also an element (e.g. a `span` element) can be used.\n * @property {string} [expandClassName=className + '-expand'] CSS class name for the\n * collapsed attributions button.\n * @property {string|HTMLElement} [collapseLabel='›'] Text label to use\n * for the expanded attributions button.\n * Instead of text, also an element (e.g. a `span` element) can be used.\n * @property {string} [collapseClassName=className + '-collapse'] CSS class name for the\n * expanded attributions button.\n * @property {function(import(\"../MapEvent.js\").default):void} [render] Function called when\n * the control should be re-rendered. This is called in a `requestAnimationFrame`\n * callback.\n */\n\n/**\n * @classdesc\n * Control to show all the attributions associated with the layer sources\n * in the map. This control is one of the default controls included in maps.\n * By default it will show in the bottom right portion of the map, but this can\n * be changed by using a css selector for `.ol-attribution`.\n *\n * @api\n */\nclass Attribution extends Control {\n /**\n * @param {Options} [options] Attribution options.\n */\n constructor(options) {\n options = options ? options : {};\n\n super({\n element: document.createElement('div'),\n render: options.render,\n target: options.target,\n });\n\n /**\n * @private\n * @type {HTMLElement}\n */\n this.ulElement_ = document.createElement('ul');\n\n /**\n * @private\n * @type {boolean}\n */\n this.collapsed_ =\n options.collapsed !== undefined ? options.collapsed : true;\n\n /**\n * @private\n * @type {boolean}\n */\n this.userCollapsed_ = this.collapsed_;\n\n /**\n * @private\n * @type {boolean}\n */\n this.overrideCollapsible_ = options.collapsible !== undefined;\n\n /**\n * @private\n * @type {boolean}\n */\n this.collapsible_ =\n options.collapsible !== undefined ? options.collapsible : true;\n\n if (!this.collapsible_) {\n this.collapsed_ = false;\n }\n\n const className =\n options.className !== undefined ? options.className : 'ol-attribution';\n\n const tipLabel =\n options.tipLabel !== undefined ? options.tipLabel : 'Attributions';\n\n const expandClassName =\n options.expandClassName !== undefined\n ? options.expandClassName\n : className + '-expand';\n\n const collapseLabel =\n options.collapseLabel !== undefined ? options.collapseLabel : '\\u203A';\n\n const collapseClassName =\n options.collapseClassName !== undefined\n ? options.collapseClassName\n : className + '-collapse';\n\n if (typeof collapseLabel === 'string') {\n /**\n * @private\n * @type {HTMLElement}\n */\n this.collapseLabel_ = document.createElement('span');\n this.collapseLabel_.textContent = collapseLabel;\n this.collapseLabel_.className = collapseClassName;\n } else {\n this.collapseLabel_ = collapseLabel;\n }\n\n const label = options.label !== undefined ? options.label : 'i';\n\n if (typeof label === 'string') {\n /**\n * @private\n * @type {HTMLElement}\n */\n this.label_ = document.createElement('span');\n this.label_.textContent = label;\n this.label_.className = expandClassName;\n } else {\n this.label_ = label;\n }\n\n const activeLabel =\n this.collapsible_ && !this.collapsed_ ? this.collapseLabel_ : this.label_;\n\n /**\n * @private\n * @type {HTMLElement}\n */\n this.toggleButton_ = document.createElement('button');\n this.toggleButton_.setAttribute('type', 'button');\n this.toggleButton_.setAttribute('aria-expanded', String(!this.collapsed_));\n this.toggleButton_.title = tipLabel;\n this.toggleButton_.appendChild(activeLabel);\n\n this.toggleButton_.addEventListener(\n EventType.CLICK,\n this.handleClick_.bind(this),\n false\n );\n\n const cssClasses =\n className +\n ' ' +\n CLASS_UNSELECTABLE +\n ' ' +\n CLASS_CONTROL +\n (this.collapsed_ && this.collapsible_ ? ' ' + CLASS_COLLAPSED : '') +\n (this.collapsible_ ? '' : ' ol-uncollapsible');\n const element = this.element;\n element.className = cssClasses;\n element.appendChild(this.toggleButton_);\n element.appendChild(this.ulElement_);\n\n /**\n * A list of currently rendered resolutions.\n * @type {Array}\n * @private\n */\n this.renderedAttributions_ = [];\n\n /**\n * @private\n * @type {boolean}\n */\n this.renderedVisible_ = true;\n }\n\n /**\n * Collect a list of visible attributions and set the collapsible state.\n * @param {import(\"../Map.js\").FrameState} frameState Frame state.\n * @return {Array} Attributions.\n * @private\n */\n collectSourceAttributions_(frameState) {\n /**\n * Used to determine if an attribution already exists.\n * @type {!Object}\n */\n const lookup = {};\n\n /**\n * A list of visible attributions.\n * @type {Array}\n */\n const visibleAttributions = [];\n\n let collapsible = true;\n const layerStatesArray = frameState.layerStatesArray;\n for (let i = 0, ii = layerStatesArray.length; i < ii; ++i) {\n const layerState = layerStatesArray[i];\n if (!inView(layerState, frameState.viewState)) {\n continue;\n }\n\n const source = /** @type {import(\"../layer/Layer.js\").default} */ (\n layerState.layer\n ).getSource();\n if (!source) {\n continue;\n }\n\n const attributionGetter = source.getAttributions();\n if (!attributionGetter) {\n continue;\n }\n\n const attributions = attributionGetter(frameState);\n if (!attributions) {\n continue;\n }\n\n collapsible =\n collapsible && source.getAttributionsCollapsible() !== false;\n\n if (Array.isArray(attributions)) {\n for (let j = 0, jj = attributions.length; j < jj; ++j) {\n if (!(attributions[j] in lookup)) {\n visibleAttributions.push(attributions[j]);\n lookup[attributions[j]] = true;\n }\n }\n } else {\n if (!(attributions in lookup)) {\n visibleAttributions.push(attributions);\n lookup[attributions] = true;\n }\n }\n }\n if (!this.overrideCollapsible_) {\n this.setCollapsible(collapsible);\n }\n return visibleAttributions;\n }\n\n /**\n * @private\n * @param {?import(\"../Map.js\").FrameState} frameState Frame state.\n */\n updateElement_(frameState) {\n if (!frameState) {\n if (this.renderedVisible_) {\n this.element.style.display = 'none';\n this.renderedVisible_ = false;\n }\n return;\n }\n\n const attributions = this.collectSourceAttributions_(frameState);\n\n const visible = attributions.length > 0;\n if (this.renderedVisible_ != visible) {\n this.element.style.display = visible ? '' : 'none';\n this.renderedVisible_ = visible;\n }\n\n if (equals(attributions, this.renderedAttributions_)) {\n return;\n }\n\n removeChildren(this.ulElement_);\n\n // append the attributions\n for (let i = 0, ii = attributions.length; i < ii; ++i) {\n const element = document.createElement('li');\n element.innerHTML = attributions[i];\n this.ulElement_.appendChild(element);\n }\n\n this.renderedAttributions_ = attributions;\n }\n\n /**\n * @param {MouseEvent} event The event to handle\n * @private\n */\n handleClick_(event) {\n event.preventDefault();\n this.handleToggle_();\n this.userCollapsed_ = this.collapsed_;\n }\n\n /**\n * @private\n */\n handleToggle_() {\n this.element.classList.toggle(CLASS_COLLAPSED);\n if (this.collapsed_) {\n replaceNode(this.collapseLabel_, this.label_);\n } else {\n replaceNode(this.label_, this.collapseLabel_);\n }\n this.collapsed_ = !this.collapsed_;\n this.toggleButton_.setAttribute('aria-expanded', String(!this.collapsed_));\n }\n\n /**\n * Return `true` if the attribution is collapsible, `false` otherwise.\n * @return {boolean} True if the widget is collapsible.\n * @api\n */\n getCollapsible() {\n return this.collapsible_;\n }\n\n /**\n * Set whether the attribution should be collapsible.\n * @param {boolean} collapsible True if the widget is collapsible.\n * @api\n */\n setCollapsible(collapsible) {\n if (this.collapsible_ === collapsible) {\n return;\n }\n this.collapsible_ = collapsible;\n this.element.classList.toggle('ol-uncollapsible');\n if (this.userCollapsed_) {\n this.handleToggle_();\n }\n }\n\n /**\n * Collapse or expand the attribution according to the passed parameter. Will\n * not do anything if the attribution isn't collapsible or if the current\n * collapsed state is already the one requested.\n * @param {boolean} collapsed True if the widget is collapsed.\n * @api\n */\n setCollapsed(collapsed) {\n this.userCollapsed_ = collapsed;\n if (!this.collapsible_ || this.collapsed_ === collapsed) {\n return;\n }\n this.handleToggle_();\n }\n\n /**\n * Return `true` when the attribution is currently collapsed or `false`\n * otherwise.\n * @return {boolean} True if the widget is collapsed.\n * @api\n */\n getCollapsed() {\n return this.collapsed_;\n }\n\n /**\n * Update the attribution element.\n * @param {import(\"../MapEvent.js\").default} mapEvent Map event.\n * @override\n */\n render(mapEvent) {\n this.updateElement_(mapEvent.frameState);\n }\n}\n\nexport default Attribution;\n","/**\n * @module ol/control/Rotate\n */\nimport Control from './Control.js';\nimport EventType from '../events/EventType.js';\nimport {CLASS_CONTROL, CLASS_HIDDEN, CLASS_UNSELECTABLE} from '../css.js';\nimport {easeOut} from '../easing.js';\n\n/**\n * @typedef {Object} Options\n * @property {string} [className='ol-rotate'] CSS class name.\n * @property {string|HTMLElement} [label='⇧'] Text label to use for the rotate button.\n * Instead of text, also an element (e.g. a `span` element) can be used.\n * @property {string} [tipLabel='Reset rotation'] Text label to use for the rotate tip.\n * @property {string} [compassClassName='ol-compass'] CSS class name for the compass.\n * @property {number} [duration=250] Animation duration in milliseconds.\n * @property {boolean} [autoHide=true] Hide the control when rotation is 0.\n * @property {function(import(\"../MapEvent.js\").default):void} [render] Function called when the control should\n * be re-rendered. This is called in a `requestAnimationFrame` callback.\n * @property {function():void} [resetNorth] Function called when the control is clicked.\n * This will override the default `resetNorth`.\n * @property {HTMLElement|string} [target] Specify a target if you want the control to be\n * rendered outside of the map's viewport.\n */\n\n/**\n * @classdesc\n * A button control to reset rotation to 0.\n * To style this control use css selector `.ol-rotate`. A `.ol-hidden` css\n * selector is added to the button when the rotation is 0.\n *\n * @api\n */\nclass Rotate extends Control {\n /**\n * @param {Options} [options] Rotate options.\n */\n constructor(options) {\n options = options ? options : {};\n\n super({\n element: document.createElement('div'),\n render: options.render,\n target: options.target,\n });\n\n const className =\n options.className !== undefined ? options.className : 'ol-rotate';\n\n const label = options.label !== undefined ? options.label : '\\u21E7';\n\n const compassClassName =\n options.compassClassName !== undefined\n ? options.compassClassName\n : 'ol-compass';\n\n /**\n * @type {HTMLElement}\n * @private\n */\n this.label_ = null;\n\n if (typeof label === 'string') {\n this.label_ = document.createElement('span');\n this.label_.className = compassClassName;\n this.label_.textContent = label;\n } else {\n this.label_ = label;\n this.label_.classList.add(compassClassName);\n }\n\n const tipLabel = options.tipLabel ? options.tipLabel : 'Reset rotation';\n\n const button = document.createElement('button');\n button.className = className + '-reset';\n button.setAttribute('type', 'button');\n button.title = tipLabel;\n button.appendChild(this.label_);\n\n button.addEventListener(\n EventType.CLICK,\n this.handleClick_.bind(this),\n false\n );\n\n const cssClasses =\n className + ' ' + CLASS_UNSELECTABLE + ' ' + CLASS_CONTROL;\n const element = this.element;\n element.className = cssClasses;\n element.appendChild(button);\n\n this.callResetNorth_ = options.resetNorth ? options.resetNorth : undefined;\n\n /**\n * @type {number}\n * @private\n */\n this.duration_ = options.duration !== undefined ? options.duration : 250;\n\n /**\n * @type {boolean}\n * @private\n */\n this.autoHide_ = options.autoHide !== undefined ? options.autoHide : true;\n\n /**\n * @private\n * @type {number|undefined}\n */\n this.rotation_ = undefined;\n\n if (this.autoHide_) {\n this.element.classList.add(CLASS_HIDDEN);\n }\n }\n\n /**\n * @param {MouseEvent} event The event to handle\n * @private\n */\n handleClick_(event) {\n event.preventDefault();\n if (this.callResetNorth_ !== undefined) {\n this.callResetNorth_();\n } else {\n this.resetNorth_();\n }\n }\n\n /**\n * @private\n */\n resetNorth_() {\n const map = this.getMap();\n const view = map.getView();\n if (!view) {\n // the map does not have a view, so we can't act\n // upon it\n return;\n }\n const rotation = view.getRotation();\n if (rotation !== undefined) {\n if (this.duration_ > 0 && rotation % (2 * Math.PI) !== 0) {\n view.animate({\n rotation: 0,\n duration: this.duration_,\n easing: easeOut,\n });\n } else {\n view.setRotation(0);\n }\n }\n }\n\n /**\n * Update the rotate control element.\n * @param {import(\"../MapEvent.js\").default} mapEvent Map event.\n * @override\n */\n render(mapEvent) {\n const frameState = mapEvent.frameState;\n if (!frameState) {\n return;\n }\n const rotation = frameState.viewState.rotation;\n if (rotation != this.rotation_) {\n const transform = 'rotate(' + rotation + 'rad)';\n if (this.autoHide_) {\n const contains = this.element.classList.contains(CLASS_HIDDEN);\n if (!contains && rotation === 0) {\n this.element.classList.add(CLASS_HIDDEN);\n } else if (contains && rotation !== 0) {\n this.element.classList.remove(CLASS_HIDDEN);\n }\n }\n this.label_.style.transform = transform;\n }\n this.rotation_ = rotation;\n }\n}\n\nexport default Rotate;\n","/**\n * @module ol/control/Zoom\n */\nimport Control from './Control.js';\nimport EventType from '../events/EventType.js';\nimport {CLASS_CONTROL, CLASS_UNSELECTABLE} from '../css.js';\nimport {easeOut} from '../easing.js';\n\n/**\n * @typedef {Object} Options\n * @property {number} [duration=250] Animation duration in milliseconds.\n * @property {string} [className='ol-zoom'] CSS class name.\n * @property {string} [zoomInClassName=className + '-in'] CSS class name for the zoom-in button.\n * @property {string} [zoomOutClassName=className + '-out'] CSS class name for the zoom-out button.\n * @property {string|HTMLElement} [zoomInLabel='+'] Text label to use for the zoom-in\n * button. Instead of text, also an element (e.g. a `span` element) can be used.\n * @property {string|HTMLElement} [zoomOutLabel='–'] Text label to use for the zoom-out button.\n * Instead of text, also an element (e.g. a `span` element) can be used.\n * @property {string} [zoomInTipLabel='Zoom in'] Text label to use for the button tip.\n * @property {string} [zoomOutTipLabel='Zoom out'] Text label to use for the button tip.\n * @property {number} [delta=1] The zoom delta applied on each click.\n * @property {HTMLElement|string} [target] Specify a target if you want the control to be\n * rendered outside of the map's viewport.\n */\n\n/**\n * @classdesc\n * A control with 2 buttons, one for zoom in and one for zoom out.\n * This control is one of the default controls of a map. To style this control\n * use css selectors `.ol-zoom-in` and `.ol-zoom-out`.\n *\n * @api\n */\nclass Zoom extends Control {\n /**\n * @param {Options} [options] Zoom options.\n */\n constructor(options) {\n options = options ? options : {};\n\n super({\n element: document.createElement('div'),\n target: options.target,\n });\n\n const className =\n options.className !== undefined ? options.className : 'ol-zoom';\n\n const delta = options.delta !== undefined ? options.delta : 1;\n\n const zoomInClassName =\n options.zoomInClassName !== undefined\n ? options.zoomInClassName\n : className + '-in';\n\n const zoomOutClassName =\n options.zoomOutClassName !== undefined\n ? options.zoomOutClassName\n : className + '-out';\n\n const zoomInLabel =\n options.zoomInLabel !== undefined ? options.zoomInLabel : '+';\n const zoomOutLabel =\n options.zoomOutLabel !== undefined ? options.zoomOutLabel : '\\u2013';\n\n const zoomInTipLabel =\n options.zoomInTipLabel !== undefined ? options.zoomInTipLabel : 'Zoom in';\n const zoomOutTipLabel =\n options.zoomOutTipLabel !== undefined\n ? options.zoomOutTipLabel\n : 'Zoom out';\n\n const inElement = document.createElement('button');\n inElement.className = zoomInClassName;\n inElement.setAttribute('type', 'button');\n inElement.title = zoomInTipLabel;\n inElement.appendChild(\n typeof zoomInLabel === 'string'\n ? document.createTextNode(zoomInLabel)\n : zoomInLabel\n );\n\n inElement.addEventListener(\n EventType.CLICK,\n this.handleClick_.bind(this, delta),\n false\n );\n\n const outElement = document.createElement('button');\n outElement.className = zoomOutClassName;\n outElement.setAttribute('type', 'button');\n outElement.title = zoomOutTipLabel;\n outElement.appendChild(\n typeof zoomOutLabel === 'string'\n ? document.createTextNode(zoomOutLabel)\n : zoomOutLabel\n );\n\n outElement.addEventListener(\n EventType.CLICK,\n this.handleClick_.bind(this, -delta),\n false\n );\n\n const cssClasses =\n className + ' ' + CLASS_UNSELECTABLE + ' ' + CLASS_CONTROL;\n const element = this.element;\n element.className = cssClasses;\n element.appendChild(inElement);\n element.appendChild(outElement);\n\n /**\n * @type {number}\n * @private\n */\n this.duration_ = options.duration !== undefined ? options.duration : 250;\n }\n\n /**\n * @param {number} delta Zoom delta.\n * @param {MouseEvent} event The event to handle\n * @private\n */\n handleClick_(delta, event) {\n event.preventDefault();\n this.zoomByDelta_(delta);\n }\n\n /**\n * @param {number} delta Zoom delta.\n * @private\n */\n zoomByDelta_(delta) {\n const map = this.getMap();\n const view = map.getView();\n if (!view) {\n // the map does not have a view, so we can't act\n // upon it\n return;\n }\n const currentZoom = view.getZoom();\n if (currentZoom !== undefined) {\n const newZoom = view.getConstrainedZoom(currentZoom + delta);\n if (this.duration_ > 0) {\n if (view.getAnimating()) {\n view.cancelAnimations();\n }\n view.animate({\n zoom: newZoom,\n duration: this.duration_,\n easing: easeOut,\n });\n } else {\n view.setZoom(newZoom);\n }\n }\n }\n}\n\nexport default Zoom;\n","/**\n * @module ol/control/defaults\n */\nimport Attribution from './Attribution.js';\nimport Collection from '../Collection.js';\nimport Rotate from './Rotate.js';\nimport Zoom from './Zoom.js';\n\n/**\n * @typedef {Object} DefaultsOptions\n * @property {boolean} [attribution=true] Include\n * {@link module:ol/control/Attribution~Attribution}.\n * @property {import(\"./Attribution.js\").Options} [attributionOptions]\n * Options for {@link module:ol/control/Attribution~Attribution}.\n * @property {boolean} [rotate=true] Include\n * {@link module:ol/control/Rotate~Rotate}.\n * @property {import(\"./Rotate.js\").Options} [rotateOptions] Options\n * for {@link module:ol/control/Rotate~Rotate}.\n * @property {boolean} [zoom] Include {@link module:ol/control/Zoom~Zoom}.\n * @property {import(\"./Zoom.js\").Options} [zoomOptions] Options for\n * {@link module:ol/control/Zoom~Zoom}.\n */\n\n/**\n * Set of controls included in maps by default. Unless configured otherwise,\n * this returns a collection containing an instance of each of the following\n * controls:\n * * {@link module:ol/control/Zoom~Zoom}\n * * {@link module:ol/control/Rotate~Rotate}\n * * {@link module:ol/control/Attribution~Attribution}\n *\n * @param {DefaultsOptions} [options] Options for the default controls.\n * @return {Collection} A collection of controls\n * to be used with the {@link module:ol/Map~Map} constructor's `controls` option.\n * @api\n */\nexport function defaults(options) {\n options = options ? options : {};\n\n /** @type {Collection} */\n const controls = new Collection();\n\n const zoomControl = options.zoom !== undefined ? options.zoom : true;\n if (zoomControl) {\n controls.push(new Zoom(options.zoomOptions));\n }\n\n const rotateControl = options.rotate !== undefined ? options.rotate : true;\n if (rotateControl) {\n controls.push(new Rotate(options.rotateOptions));\n }\n\n const attributionControl =\n options.attribution !== undefined ? options.attribution : true;\n if (attributionControl) {\n controls.push(new Attribution(options.attributionOptions));\n }\n\n return controls;\n}\n","/**\n * @module ol/interaction/Property\n */\n\n/**\n * @enum {string}\n */\nexport default {\n ACTIVE: 'active',\n};\n","/**\n * @module ol/interaction/Interaction\n */\nimport BaseObject from '../Object.js';\nimport InteractionProperty from './Property.js';\nimport {easeOut, linear} from '../easing.js';\n\n/***\n * @template Return\n * @typedef {import(\"../Observable\").OnSignature &\n * import(\"../Observable\").OnSignature &\n * import(\"../Observable\").CombinedOnSignature} InteractionOnSignature\n */\n\n/**\n * Object literal with config options for interactions.\n * @typedef {Object} InteractionOptions\n * @property {function(import(\"../MapBrowserEvent.js\").default):boolean} handleEvent\n * Method called by the map to notify the interaction that a browser event was\n * dispatched to the map. If the function returns a falsy value, propagation of\n * the event to other interactions in the map's interactions chain will be\n * prevented (this includes functions with no explicit return). The interactions\n * are traversed in reverse order of the interactions collection of the map.\n */\n\n/**\n * @classdesc\n * Abstract base class; normally only used for creating subclasses and not\n * instantiated in apps.\n * User actions that change the state of the map. Some are similar to controls,\n * but are not associated with a DOM element.\n * For example, {@link module:ol/interaction/KeyboardZoom~KeyboardZoom} is\n * functionally the same as {@link module:ol/control/Zoom~Zoom}, but triggered\n * by a keyboard event not a button element event.\n * Although interactions do not have a DOM element, some of them do render\n * vectors and so are visible on the screen.\n * @api\n */\nclass Interaction extends BaseObject {\n /**\n * @param {InteractionOptions} [options] Options.\n */\n constructor(options) {\n super();\n\n /***\n * @type {InteractionOnSignature}\n */\n this.on;\n\n /***\n * @type {InteractionOnSignature}\n */\n this.once;\n\n /***\n * @type {InteractionOnSignature}\n */\n this.un;\n\n if (options && options.handleEvent) {\n this.handleEvent = options.handleEvent;\n }\n\n /**\n * @private\n * @type {import(\"../Map.js\").default|null}\n */\n this.map_ = null;\n\n this.setActive(true);\n }\n\n /**\n * Return whether the interaction is currently active.\n * @return {boolean} `true` if the interaction is active, `false` otherwise.\n * @observable\n * @api\n */\n getActive() {\n return /** @type {boolean} */ (this.get(InteractionProperty.ACTIVE));\n }\n\n /**\n * Get the map associated with this interaction.\n * @return {import(\"../Map.js\").default|null} Map.\n * @api\n */\n getMap() {\n return this.map_;\n }\n\n /**\n * Handles the {@link module:ol/MapBrowserEvent~MapBrowserEvent map browser event}.\n * @param {import(\"../MapBrowserEvent.js\").default} mapBrowserEvent Map browser event.\n * @return {boolean} `false` to stop event propagation.\n * @api\n */\n handleEvent(mapBrowserEvent) {\n return true;\n }\n\n /**\n * Activate or deactivate the interaction.\n * @param {boolean} active Active.\n * @observable\n * @api\n */\n setActive(active) {\n this.set(InteractionProperty.ACTIVE, active);\n }\n\n /**\n * Remove the interaction from its current map and attach it to the new map.\n * Subclasses may set up event handlers to get notified about changes to\n * the map here.\n * @param {import(\"../Map.js\").default|null} map Map.\n */\n setMap(map) {\n this.map_ = map;\n }\n}\n\n/**\n * @param {import(\"../View.js\").default} view View.\n * @param {import(\"../coordinate.js\").Coordinate} delta Delta.\n * @param {number} [duration] Duration.\n */\nexport function pan(view, delta, duration) {\n const currentCenter = view.getCenterInternal();\n if (currentCenter) {\n const center = [currentCenter[0] + delta[0], currentCenter[1] + delta[1]];\n view.animateInternal({\n duration: duration !== undefined ? duration : 250,\n easing: linear,\n center: view.getConstrainedCenter(center),\n });\n }\n}\n\n/**\n * @param {import(\"../View.js\").default} view View.\n * @param {number} delta Delta from previous zoom level.\n * @param {import(\"../coordinate.js\").Coordinate} [anchor] Anchor coordinate in the user projection.\n * @param {number} [duration] Duration.\n */\nexport function zoomByDelta(view, delta, anchor, duration) {\n const currentZoom = view.getZoom();\n\n if (currentZoom === undefined) {\n return;\n }\n\n const newZoom = view.getConstrainedZoom(currentZoom + delta);\n const newResolution = view.getResolutionForZoom(newZoom);\n\n if (view.getAnimating()) {\n view.cancelAnimations();\n }\n view.animate({\n resolution: newResolution,\n anchor: anchor,\n duration: duration !== undefined ? duration : 250,\n easing: easeOut,\n });\n}\n\nexport default Interaction;\n","/**\n * @module ol/interaction/DoubleClickZoom\n */\nimport Interaction, {zoomByDelta} from './Interaction.js';\nimport MapBrowserEventType from '../MapBrowserEventType.js';\n\n/**\n * @typedef {Object} Options\n * @property {number} [duration=250] Animation duration in milliseconds.\n * @property {number} [delta=1] The zoom delta applied on each double click.\n */\n\n/**\n * @classdesc\n * Allows the user to zoom by double-clicking on the map.\n * @api\n */\nclass DoubleClickZoom extends Interaction {\n /**\n * @param {Options} [options] Options.\n */\n constructor(options) {\n super();\n\n options = options ? options : {};\n\n /**\n * @private\n * @type {number}\n */\n this.delta_ = options.delta ? options.delta : 1;\n\n /**\n * @private\n * @type {number}\n */\n this.duration_ = options.duration !== undefined ? options.duration : 250;\n }\n\n /**\n * Handles the {@link module:ol/MapBrowserEvent~MapBrowserEvent map browser event} (if it was a\n * doubleclick) and eventually zooms the map.\n * @param {import(\"../MapBrowserEvent.js\").default} mapBrowserEvent Map browser event.\n * @return {boolean} `false` to stop event propagation.\n */\n handleEvent(mapBrowserEvent) {\n let stopEvent = false;\n if (mapBrowserEvent.type == MapBrowserEventType.DBLCLICK) {\n const browserEvent = /** @type {MouseEvent} */ (\n mapBrowserEvent.originalEvent\n );\n const map = mapBrowserEvent.map;\n const anchor = mapBrowserEvent.coordinate;\n const delta = browserEvent.shiftKey ? -this.delta_ : this.delta_;\n const view = map.getView();\n zoomByDelta(view, delta, anchor, this.duration_);\n browserEvent.preventDefault();\n stopEvent = true;\n }\n return !stopEvent;\n }\n}\n\nexport default DoubleClickZoom;\n","/**\n * @module ol/interaction/Pointer\n */\nimport Interaction from './Interaction.js';\nimport MapBrowserEventType from '../MapBrowserEventType.js';\n\n/**\n * @typedef {Object} Options\n * @property {function(import(\"../MapBrowserEvent.js\").default):boolean} [handleDownEvent]\n * Function handling \"down\" events. If the function returns `true` then a drag\n * sequence is started.\n * @property {function(import(\"../MapBrowserEvent.js\").default):void} [handleDragEvent]\n * Function handling \"drag\" events. This function is called on \"move\" events\n * during a drag sequence.\n * @property {function(import(\"../MapBrowserEvent.js\").default):boolean} [handleEvent]\n * Method called by the map to notify the interaction that a browser event was\n * dispatched to the map. The function may return `false` to prevent the\n * propagation of the event to other interactions in the map's interactions\n * chain.\n * @property {function(import(\"../MapBrowserEvent.js\").default):void} [handleMoveEvent]\n * Function handling \"move\" events. This function is called on \"move\" events.\n * This functions is also called during a drag sequence, so during a drag\n * sequence both the `handleDragEvent` function and this function are called.\n * If `handleDownEvent` is defined and it returns true this function will not\n * be called during a drag sequence.\n * @property {function(import(\"../MapBrowserEvent.js\").default):boolean} [handleUpEvent]\n * Function handling \"up\" events. If the function returns `false` then the\n * current drag sequence is stopped.\n * @property {function(boolean):boolean} [stopDown]\n * Should the down event be propagated to other interactions, or should be\n * stopped?\n */\n\n/**\n * @classdesc\n * Base class that calls user-defined functions on `down`, `move` and `up`\n * events. This class also manages \"drag sequences\".\n *\n * When the `handleDownEvent` user function returns `true` a drag sequence is\n * started. During a drag sequence the `handleDragEvent` user function is\n * called on `move` events. The drag sequence ends when the `handleUpEvent`\n * user function is called and returns `false`.\n * @api\n */\nclass PointerInteraction extends Interaction {\n /**\n * @param {Options} [options] Options.\n */\n constructor(options) {\n options = options ? options : {};\n\n super(\n /** @type {import(\"./Interaction.js\").InteractionOptions} */ (options)\n );\n\n if (options.handleDownEvent) {\n this.handleDownEvent = options.handleDownEvent;\n }\n\n if (options.handleDragEvent) {\n this.handleDragEvent = options.handleDragEvent;\n }\n\n if (options.handleMoveEvent) {\n this.handleMoveEvent = options.handleMoveEvent;\n }\n\n if (options.handleUpEvent) {\n this.handleUpEvent = options.handleUpEvent;\n }\n\n if (options.stopDown) {\n this.stopDown = options.stopDown;\n }\n\n /**\n * @type {boolean}\n * @protected\n */\n this.handlingDownUpSequence = false;\n\n /**\n * @type {Array}\n * @protected\n */\n this.targetPointers = [];\n }\n\n /**\n * Returns the current number of pointers involved in the interaction,\n * e.g. `2` when two fingers are used.\n * @return {number} The number of pointers.\n * @api\n */\n getPointerCount() {\n return this.targetPointers.length;\n }\n\n /**\n * Handle pointer down events.\n * @param {import(\"../MapBrowserEvent.js\").default} mapBrowserEvent Event.\n * @return {boolean} If the event was consumed.\n * @protected\n */\n handleDownEvent(mapBrowserEvent) {\n return false;\n }\n\n /**\n * Handle pointer drag events.\n * @param {import(\"../MapBrowserEvent.js\").default} mapBrowserEvent Event.\n * @protected\n */\n handleDragEvent(mapBrowserEvent) {}\n\n /**\n * Handles the {@link module:ol/MapBrowserEvent~MapBrowserEvent map browser event} and may call into\n * other functions, if event sequences like e.g. 'drag' or 'down-up' etc. are\n * detected.\n * @param {import(\"../MapBrowserEvent.js\").default} mapBrowserEvent Map browser event.\n * @return {boolean} `false` to stop event propagation.\n * @api\n */\n handleEvent(mapBrowserEvent) {\n if (!mapBrowserEvent.originalEvent) {\n return true;\n }\n\n let stopEvent = false;\n this.updateTrackedPointers_(mapBrowserEvent);\n if (this.handlingDownUpSequence) {\n if (mapBrowserEvent.type == MapBrowserEventType.POINTERDRAG) {\n this.handleDragEvent(mapBrowserEvent);\n // prevent page scrolling during dragging\n mapBrowserEvent.originalEvent.preventDefault();\n } else if (mapBrowserEvent.type == MapBrowserEventType.POINTERUP) {\n const handledUp = this.handleUpEvent(mapBrowserEvent);\n this.handlingDownUpSequence =\n handledUp && this.targetPointers.length > 0;\n }\n } else {\n if (mapBrowserEvent.type == MapBrowserEventType.POINTERDOWN) {\n const handled = this.handleDownEvent(mapBrowserEvent);\n this.handlingDownUpSequence = handled;\n stopEvent = this.stopDown(handled);\n } else if (mapBrowserEvent.type == MapBrowserEventType.POINTERMOVE) {\n this.handleMoveEvent(mapBrowserEvent);\n }\n }\n return !stopEvent;\n }\n\n /**\n * Handle pointer move events.\n * @param {import(\"../MapBrowserEvent.js\").default} mapBrowserEvent Event.\n * @protected\n */\n handleMoveEvent(mapBrowserEvent) {}\n\n /**\n * Handle pointer up events.\n * @param {import(\"../MapBrowserEvent.js\").default} mapBrowserEvent Event.\n * @return {boolean} If the event was consumed.\n * @protected\n */\n handleUpEvent(mapBrowserEvent) {\n return false;\n }\n\n /**\n * This function is used to determine if \"down\" events should be propagated\n * to other interactions or should be stopped.\n * @param {boolean} handled Was the event handled by the interaction?\n * @return {boolean} Should the `down` event be stopped?\n */\n stopDown(handled) {\n return handled;\n }\n\n /**\n * @param {import(\"../MapBrowserEvent.js\").default} mapBrowserEvent Event.\n * @private\n */\n updateTrackedPointers_(mapBrowserEvent) {\n if (mapBrowserEvent.activePointers) {\n this.targetPointers = mapBrowserEvent.activePointers;\n }\n }\n}\n\n/**\n * @param {Array} pointerEvents List of events.\n * @return {{clientX: number, clientY: number}} Centroid pixel.\n */\nexport function centroid(pointerEvents) {\n const length = pointerEvents.length;\n let clientX = 0;\n let clientY = 0;\n for (let i = 0; i < length; i++) {\n clientX += pointerEvents[i].clientX;\n clientY += pointerEvents[i].clientY;\n }\n return {clientX: clientX / length, clientY: clientY / length};\n}\n\nexport default PointerInteraction;\n","/**\n * @module ol/events/condition\n */\nimport MapBrowserEventType from '../MapBrowserEventType.js';\nimport {FALSE, TRUE} from '../functions.js';\nimport {MAC, WEBKIT} from '../has.js';\nimport {assert} from '../asserts.js';\n\n/**\n * A function that takes an {@link module:ol/MapBrowserEvent~MapBrowserEvent} and returns a\n * `{boolean}`. If the condition is met, true should be returned.\n *\n * @typedef {function(this: ?, import(\"../MapBrowserEvent.js\").default): boolean} Condition\n */\n\n/**\n * Creates a condition function that passes when all provided conditions pass.\n * @param {...Condition} var_args Conditions to check.\n * @return {Condition} Condition function.\n */\nexport function all(var_args) {\n const conditions = arguments;\n /**\n * @param {import(\"../MapBrowserEvent.js\").default} event Event.\n * @return {boolean} All conditions passed.\n */\n return function (event) {\n let pass = true;\n for (let i = 0, ii = conditions.length; i < ii; ++i) {\n pass = pass && conditions[i](event);\n if (!pass) {\n break;\n }\n }\n return pass;\n };\n}\n\n/**\n * Return `true` if only the alt-key is pressed, `false` otherwise (e.g. when\n * additionally the shift-key is pressed).\n *\n * @param {import(\"../MapBrowserEvent.js\").default} mapBrowserEvent Map browser event.\n * @return {boolean} True if only the alt key is pressed.\n * @api\n */\nexport const altKeyOnly = function (mapBrowserEvent) {\n const originalEvent = /** @type {KeyboardEvent|MouseEvent|TouchEvent} */ (\n mapBrowserEvent.originalEvent\n );\n return (\n originalEvent.altKey &&\n !(originalEvent.metaKey || originalEvent.ctrlKey) &&\n !originalEvent.shiftKey\n );\n};\n\n/**\n * Return `true` if only the alt-key and shift-key is pressed, `false` otherwise\n * (e.g. when additionally the platform-modifier-key is pressed).\n *\n * @param {import(\"../MapBrowserEvent.js\").default} mapBrowserEvent Map browser event.\n * @return {boolean} True if only the alt and shift keys are pressed.\n * @api\n */\nexport const altShiftKeysOnly = function (mapBrowserEvent) {\n const originalEvent = /** @type {KeyboardEvent|MouseEvent|TouchEvent} */ (\n mapBrowserEvent.originalEvent\n );\n return (\n originalEvent.altKey &&\n !(originalEvent.metaKey || originalEvent.ctrlKey) &&\n originalEvent.shiftKey\n );\n};\n\n/**\n * Return `true` if the map has the focus. This condition requires a map target\n * element with a `tabindex` attribute, e.g. `
`.\n *\n * @param {import(\"../MapBrowserEvent.js\").default} event Map browser event.\n * @return {boolean} The map has the focus.\n * @api\n */\nexport const focus = function (event) {\n const targetElement = event.map.getTargetElement();\n const activeElement = event.map.getOwnerDocument().activeElement;\n return targetElement.contains(activeElement);\n};\n\n/**\n * Return `true` if the map has the focus or no 'tabindex' attribute set.\n *\n * @param {import(\"../MapBrowserEvent.js\").default} event Map browser event.\n * @return {boolean} The map container has the focus or no 'tabindex' attribute.\n */\nexport const focusWithTabindex = function (event) {\n return event.map.getTargetElement().hasAttribute('tabindex')\n ? focus(event)\n : true;\n};\n\n/**\n * Return always true.\n *\n * @param {import(\"../MapBrowserEvent.js\").default} mapBrowserEvent Map browser event.\n * @return {boolean} True.\n * @api\n */\nexport const always = TRUE;\n\n/**\n * Return `true` if the event is a `click` event, `false` otherwise.\n *\n * @param {import(\"../MapBrowserEvent.js\").default} mapBrowserEvent Map browser event.\n * @return {boolean} True if the event is a map `click` event.\n * @api\n */\nexport const click = function (mapBrowserEvent) {\n return mapBrowserEvent.type == MapBrowserEventType.CLICK;\n};\n\n/**\n * Return `true` if the event has an \"action\"-producing mouse button.\n *\n * By definition, this includes left-click on windows/linux, and left-click\n * without the ctrl key on Macs.\n *\n * @param {import(\"../MapBrowserEvent.js\").default} mapBrowserEvent Map browser event.\n * @return {boolean} The result.\n */\nexport const mouseActionButton = function (mapBrowserEvent) {\n const originalEvent = /** @type {MouseEvent} */ (\n mapBrowserEvent.originalEvent\n );\n return originalEvent.button == 0 && !(WEBKIT && MAC && originalEvent.ctrlKey);\n};\n\n/**\n * Return always false.\n *\n * @param {import(\"../MapBrowserEvent.js\").default} mapBrowserEvent Map browser event.\n * @return {boolean} False.\n * @api\n */\nexport const never = FALSE;\n\n/**\n * Return `true` if the browser event is a `pointermove` event, `false`\n * otherwise.\n *\n * @param {import(\"../MapBrowserEvent.js\").default} mapBrowserEvent Map browser event.\n * @return {boolean} True if the browser event is a `pointermove` event.\n * @api\n */\nexport const pointerMove = function (mapBrowserEvent) {\n return mapBrowserEvent.type == 'pointermove';\n};\n\n/**\n * Return `true` if the event is a map `singleclick` event, `false` otherwise.\n *\n * @param {import(\"../MapBrowserEvent.js\").default} mapBrowserEvent Map browser event.\n * @return {boolean} True if the event is a map `singleclick` event.\n * @api\n */\nexport const singleClick = function (mapBrowserEvent) {\n return mapBrowserEvent.type == MapBrowserEventType.SINGLECLICK;\n};\n\n/**\n * Return `true` if the event is a map `dblclick` event, `false` otherwise.\n *\n * @param {import(\"../MapBrowserEvent.js\").default} mapBrowserEvent Map browser event.\n * @return {boolean} True if the event is a map `dblclick` event.\n * @api\n */\nexport const doubleClick = function (mapBrowserEvent) {\n return mapBrowserEvent.type == MapBrowserEventType.DBLCLICK;\n};\n\n/**\n * Return `true` if no modifier key (alt-, shift- or platform-modifier-key) is\n * pressed.\n *\n * @param {import(\"../MapBrowserEvent.js\").default} mapBrowserEvent Map browser event.\n * @return {boolean} True only if there no modifier keys are pressed.\n * @api\n */\nexport const noModifierKeys = function (mapBrowserEvent) {\n const originalEvent = /** @type {KeyboardEvent|MouseEvent|TouchEvent} */ (\n mapBrowserEvent.originalEvent\n );\n return (\n !originalEvent.altKey &&\n !(originalEvent.metaKey || originalEvent.ctrlKey) &&\n !originalEvent.shiftKey\n );\n};\n\n/**\n * Return `true` if only the platform-modifier-key (the meta-key on Mac,\n * ctrl-key otherwise) is pressed, `false` otherwise (e.g. when additionally\n * the shift-key is pressed).\n *\n * @param {import(\"../MapBrowserEvent.js\").default} mapBrowserEvent Map browser event.\n * @return {boolean} True if only the platform modifier key is pressed.\n * @api\n */\nexport const platformModifierKeyOnly = function (mapBrowserEvent) {\n const originalEvent = /** @type {KeyboardEvent|MouseEvent|TouchEvent} */ (\n mapBrowserEvent.originalEvent\n );\n return (\n !originalEvent.altKey &&\n (MAC ? originalEvent.metaKey : originalEvent.ctrlKey) &&\n !originalEvent.shiftKey\n );\n};\n\n/**\n * Return `true` if only the shift-key is pressed, `false` otherwise (e.g. when\n * additionally the alt-key is pressed).\n *\n * @param {import(\"../MapBrowserEvent.js\").default} mapBrowserEvent Map browser event.\n * @return {boolean} True if only the shift key is pressed.\n * @api\n */\nexport const shiftKeyOnly = function (mapBrowserEvent) {\n const originalEvent = /** @type {KeyboardEvent|MouseEvent|TouchEvent} */ (\n mapBrowserEvent.originalEvent\n );\n return (\n !originalEvent.altKey &&\n !(originalEvent.metaKey || originalEvent.ctrlKey) &&\n originalEvent.shiftKey\n );\n};\n\n/**\n * Return `true` if the target element is not editable, i.e. not an `input`,\n * `select`, or `textarea` element and no `contenteditable` attribute is\n * set or inherited, `false` otherwise.\n *\n * @param {import(\"../MapBrowserEvent.js\").default} mapBrowserEvent Map browser event.\n * @return {boolean} True only if the target element is not editable.\n * @api\n */\nexport const targetNotEditable = function (mapBrowserEvent) {\n const originalEvent = /** @type {KeyboardEvent|MouseEvent|TouchEvent} */ (\n mapBrowserEvent.originalEvent\n );\n const tagName = /** @type {Element} */ (originalEvent.target).tagName;\n return (\n tagName !== 'INPUT' &&\n tagName !== 'SELECT' &&\n tagName !== 'TEXTAREA' &&\n // `isContentEditable` is only available on `HTMLElement`, but it may also be a\n // different type like `SVGElement`.\n // @ts-ignore\n !originalEvent.target.isContentEditable\n );\n};\n\n/**\n * Return `true` if the event originates from a mouse device.\n *\n * @param {import(\"../MapBrowserEvent.js\").default} mapBrowserEvent Map browser event.\n * @return {boolean} True if the event originates from a mouse device.\n * @api\n */\nexport const mouseOnly = function (mapBrowserEvent) {\n const pointerEvent = /** @type {import(\"../MapBrowserEvent\").default} */ (\n mapBrowserEvent\n ).originalEvent;\n assert(pointerEvent !== undefined, 56); // mapBrowserEvent must originate from a pointer event\n // see https://www.w3.org/TR/pointerevents/#widl-PointerEvent-pointerType\n return pointerEvent.pointerType == 'mouse';\n};\n\n/**\n * Return `true` if the event originates from a touchable device.\n *\n * @param {import(\"../MapBrowserEvent.js\").default} mapBrowserEvent Map browser event.\n * @return {boolean} True if the event originates from a touchable device.\n * @api\n */\nexport const touchOnly = function (mapBrowserEvent) {\n const pointerEvt = /** @type {import(\"../MapBrowserEvent\").default} */ (\n mapBrowserEvent\n ).originalEvent;\n assert(pointerEvt !== undefined, 56); // mapBrowserEvent must originate from a pointer event\n // see https://www.w3.org/TR/pointerevents/#widl-PointerEvent-pointerType\n return pointerEvt.pointerType === 'touch';\n};\n\n/**\n * Return `true` if the event originates from a digital pen.\n *\n * @param {import(\"../MapBrowserEvent.js\").default} mapBrowserEvent Map browser event.\n * @return {boolean} True if the event originates from a digital pen.\n * @api\n */\nexport const penOnly = function (mapBrowserEvent) {\n const pointerEvt = /** @type {import(\"../MapBrowserEvent\").default} */ (\n mapBrowserEvent\n ).originalEvent;\n assert(pointerEvt !== undefined, 56); // mapBrowserEvent must originate from a pointer event\n // see https://www.w3.org/TR/pointerevents/#widl-PointerEvent-pointerType\n return pointerEvt.pointerType === 'pen';\n};\n\n/**\n * Return `true` if the event originates from a primary pointer in\n * contact with the surface or if the left mouse button is pressed.\n * See https://www.w3.org/TR/pointerevents/#button-states.\n *\n * @param {import(\"../MapBrowserEvent.js\").default} mapBrowserEvent Map browser event.\n * @return {boolean} True if the event originates from a primary pointer.\n * @api\n */\nexport const primaryAction = function (mapBrowserEvent) {\n const pointerEvent = /** @type {import(\"../MapBrowserEvent\").default} */ (\n mapBrowserEvent\n ).originalEvent;\n assert(pointerEvent !== undefined, 56); // mapBrowserEvent must originate from a pointer event\n return pointerEvent.isPrimary && pointerEvent.button === 0;\n};\n","/**\n * @module ol/interaction/DragPan\n */\nimport PointerInteraction, {\n centroid as centroidFromPointers,\n} from './Pointer.js';\nimport {FALSE} from '../functions.js';\nimport {\n all,\n focusWithTabindex,\n noModifierKeys,\n primaryAction,\n} from '../events/condition.js';\nimport {easeOut} from '../easing.js';\nimport {\n rotate as rotateCoordinate,\n scale as scaleCoordinate,\n} from '../coordinate.js';\n\n/**\n * @typedef {Object} Options\n * @property {import(\"../events/condition.js\").Condition} [condition] A function that takes an {@link module:ol/MapBrowserEvent~MapBrowserEvent} and returns a boolean\n * to indicate whether that event should be handled.\n * Default is {@link module:ol/events/condition.noModifierKeys} and {@link module:ol/events/condition.primaryAction}.\n * @property {boolean} [onFocusOnly=false] When the map's target has a `tabindex` attribute set,\n * the interaction will only handle events when the map has the focus.\n * @property {import(\"../Kinetic.js\").default} [kinetic] Kinetic inertia to apply to the pan.\n */\n\n/**\n * @classdesc\n * Allows the user to pan the map by dragging the map.\n * @api\n */\nclass DragPan extends PointerInteraction {\n /**\n * @param {Options} [options] Options.\n */\n constructor(options) {\n super({\n stopDown: FALSE,\n });\n\n options = options ? options : {};\n\n /**\n * @private\n * @type {import(\"../Kinetic.js\").default|undefined}\n */\n this.kinetic_ = options.kinetic;\n\n /**\n * @type {import(\"../pixel.js\").Pixel}\n */\n this.lastCentroid = null;\n\n /**\n * @type {number}\n */\n this.lastPointersCount_;\n\n /**\n * @type {boolean}\n */\n this.panning_ = false;\n\n const condition = options.condition\n ? options.condition\n : all(noModifierKeys, primaryAction);\n\n /**\n * @private\n * @type {import(\"../events/condition.js\").Condition}\n */\n this.condition_ = options.onFocusOnly\n ? all(focusWithTabindex, condition)\n : condition;\n\n /**\n * @private\n * @type {boolean}\n */\n this.noKinetic_ = false;\n }\n\n /**\n * Handle pointer drag events.\n * @param {import(\"../MapBrowserEvent.js\").default} mapBrowserEvent Event.\n */\n handleDragEvent(mapBrowserEvent) {\n const map = mapBrowserEvent.map;\n if (!this.panning_) {\n this.panning_ = true;\n map.getView().beginInteraction();\n }\n const targetPointers = this.targetPointers;\n const centroid = map.getEventPixel(centroidFromPointers(targetPointers));\n if (targetPointers.length == this.lastPointersCount_) {\n if (this.kinetic_) {\n this.kinetic_.update(centroid[0], centroid[1]);\n }\n if (this.lastCentroid) {\n const delta = [\n this.lastCentroid[0] - centroid[0],\n centroid[1] - this.lastCentroid[1],\n ];\n const map = mapBrowserEvent.map;\n const view = map.getView();\n scaleCoordinate(delta, view.getResolution());\n rotateCoordinate(delta, view.getRotation());\n view.adjustCenterInternal(delta);\n }\n } else if (this.kinetic_) {\n // reset so we don't overestimate the kinetic energy after\n // after one finger down, tiny drag, second finger down\n this.kinetic_.begin();\n }\n this.lastCentroid = centroid;\n this.lastPointersCount_ = targetPointers.length;\n mapBrowserEvent.originalEvent.preventDefault();\n }\n\n /**\n * Handle pointer up events.\n * @param {import(\"../MapBrowserEvent.js\").default} mapBrowserEvent Event.\n * @return {boolean} If the event was consumed.\n */\n handleUpEvent(mapBrowserEvent) {\n const map = mapBrowserEvent.map;\n const view = map.getView();\n if (this.targetPointers.length === 0) {\n if (!this.noKinetic_ && this.kinetic_ && this.kinetic_.end()) {\n const distance = this.kinetic_.getDistance();\n const angle = this.kinetic_.getAngle();\n const center = view.getCenterInternal();\n const centerpx = map.getPixelFromCoordinateInternal(center);\n const dest = map.getCoordinateFromPixelInternal([\n centerpx[0] - distance * Math.cos(angle),\n centerpx[1] - distance * Math.sin(angle),\n ]);\n view.animateInternal({\n center: view.getConstrainedCenter(dest),\n duration: 500,\n easing: easeOut,\n });\n }\n if (this.panning_) {\n this.panning_ = false;\n view.endInteraction();\n }\n return false;\n }\n if (this.kinetic_) {\n // reset so we don't overestimate the kinetic energy after\n // after one finger up, tiny drag, second finger up\n this.kinetic_.begin();\n }\n this.lastCentroid = null;\n return true;\n }\n\n /**\n * Handle pointer down events.\n * @param {import(\"../MapBrowserEvent.js\").default} mapBrowserEvent Event.\n * @return {boolean} If the event was consumed.\n */\n handleDownEvent(mapBrowserEvent) {\n if (this.targetPointers.length > 0 && this.condition_(mapBrowserEvent)) {\n const map = mapBrowserEvent.map;\n const view = map.getView();\n this.lastCentroid = null;\n // stop any current animation\n if (view.getAnimating()) {\n view.cancelAnimations();\n }\n if (this.kinetic_) {\n this.kinetic_.begin();\n }\n // No kinetic as soon as more than one pointer on the screen is\n // detected. This is to prevent nasty pans after pinch.\n this.noKinetic_ = this.targetPointers.length > 1;\n return true;\n }\n return false;\n }\n}\n\nexport default DragPan;\n","/**\n * @module ol/interaction/DragRotate\n */\nimport PointerInteraction from './Pointer.js';\nimport {FALSE} from '../functions.js';\nimport {\n altShiftKeysOnly,\n mouseActionButton,\n mouseOnly,\n} from '../events/condition.js';\nimport {disable} from '../rotationconstraint.js';\n\n/**\n * @typedef {Object} Options\n * @property {import(\"../events/condition.js\").Condition} [condition] A function that takes an\n * {@link module:ol/MapBrowserEvent~MapBrowserEvent} and returns a boolean\n * to indicate whether that event should be handled.\n * Default is {@link module:ol/events/condition.altShiftKeysOnly}.\n * @property {number} [duration=250] Animation duration in milliseconds.\n */\n\n/**\n * @classdesc\n * Allows the user to rotate the map by clicking and dragging on the map,\n * normally combined with an {@link module:ol/events/condition} that limits\n * it to when the alt and shift keys are held down.\n *\n * This interaction is only supported for mouse devices.\n * @api\n */\nclass DragRotate extends PointerInteraction {\n /**\n * @param {Options} [options] Options.\n */\n constructor(options) {\n options = options ? options : {};\n\n super({\n stopDown: FALSE,\n });\n\n /**\n * @private\n * @type {import(\"../events/condition.js\").Condition}\n */\n this.condition_ = options.condition ? options.condition : altShiftKeysOnly;\n\n /**\n * @private\n * @type {number|undefined}\n */\n this.lastAngle_ = undefined;\n\n /**\n * @private\n * @type {number}\n */\n this.duration_ = options.duration !== undefined ? options.duration : 250;\n }\n\n /**\n * Handle pointer drag events.\n * @param {import(\"../MapBrowserEvent.js\").default} mapBrowserEvent Event.\n */\n handleDragEvent(mapBrowserEvent) {\n if (!mouseOnly(mapBrowserEvent)) {\n return;\n }\n\n const map = mapBrowserEvent.map;\n const view = map.getView();\n if (view.getConstraints().rotation === disable) {\n return;\n }\n const size = map.getSize();\n const offset = mapBrowserEvent.pixel;\n const theta = Math.atan2(size[1] / 2 - offset[1], offset[0] - size[0] / 2);\n if (this.lastAngle_ !== undefined) {\n const delta = theta - this.lastAngle_;\n view.adjustRotationInternal(-delta);\n }\n this.lastAngle_ = theta;\n }\n\n /**\n * Handle pointer up events.\n * @param {import(\"../MapBrowserEvent.js\").default} mapBrowserEvent Event.\n * @return {boolean} If the event was consumed.\n */\n handleUpEvent(mapBrowserEvent) {\n if (!mouseOnly(mapBrowserEvent)) {\n return true;\n }\n\n const map = mapBrowserEvent.map;\n const view = map.getView();\n view.endInteraction(this.duration_);\n return false;\n }\n\n /**\n * Handle pointer down events.\n * @param {import(\"../MapBrowserEvent.js\").default} mapBrowserEvent Event.\n * @return {boolean} If the event was consumed.\n */\n handleDownEvent(mapBrowserEvent) {\n if (!mouseOnly(mapBrowserEvent)) {\n return false;\n }\n\n if (\n mouseActionButton(mapBrowserEvent) &&\n this.condition_(mapBrowserEvent)\n ) {\n const map = mapBrowserEvent.map;\n map.getView().beginInteraction();\n this.lastAngle_ = undefined;\n return true;\n }\n return false;\n }\n}\n\nexport default DragRotate;\n","/**\n * @module ol/render/Box\n */\n\nimport Disposable from '../Disposable.js';\nimport Polygon from '../geom/Polygon.js';\n\nclass RenderBox extends Disposable {\n /**\n * @param {string} className CSS class name.\n */\n constructor(className) {\n super();\n\n /**\n * @type {import(\"../geom/Polygon.js\").default}\n * @private\n */\n this.geometry_ = null;\n\n /**\n * @type {HTMLDivElement}\n * @private\n */\n this.element_ = document.createElement('div');\n this.element_.style.position = 'absolute';\n this.element_.style.pointerEvents = 'auto';\n this.element_.className = 'ol-box ' + className;\n\n /**\n * @private\n * @type {import(\"../Map.js\").default|null}\n */\n this.map_ = null;\n\n /**\n * @private\n * @type {import(\"../pixel.js\").Pixel}\n */\n this.startPixel_ = null;\n\n /**\n * @private\n * @type {import(\"../pixel.js\").Pixel}\n */\n this.endPixel_ = null;\n }\n\n /**\n * Clean up.\n */\n disposeInternal() {\n this.setMap(null);\n }\n\n /**\n * @private\n */\n render_() {\n const startPixel = this.startPixel_;\n const endPixel = this.endPixel_;\n const px = 'px';\n const style = this.element_.style;\n style.left = Math.min(startPixel[0], endPixel[0]) + px;\n style.top = Math.min(startPixel[1], endPixel[1]) + px;\n style.width = Math.abs(endPixel[0] - startPixel[0]) + px;\n style.height = Math.abs(endPixel[1] - startPixel[1]) + px;\n }\n\n /**\n * @param {import(\"../Map.js\").default|null} map Map.\n */\n setMap(map) {\n if (this.map_) {\n this.map_.getOverlayContainer().removeChild(this.element_);\n const style = this.element_.style;\n style.left = 'inherit';\n style.top = 'inherit';\n style.width = 'inherit';\n style.height = 'inherit';\n }\n this.map_ = map;\n if (this.map_) {\n this.map_.getOverlayContainer().appendChild(this.element_);\n }\n }\n\n /**\n * @param {import(\"../pixel.js\").Pixel} startPixel Start pixel.\n * @param {import(\"../pixel.js\").Pixel} endPixel End pixel.\n */\n setPixels(startPixel, endPixel) {\n this.startPixel_ = startPixel;\n this.endPixel_ = endPixel;\n this.createOrUpdateGeometry();\n this.render_();\n }\n\n /**\n * Creates or updates the cached geometry.\n */\n createOrUpdateGeometry() {\n const startPixel = this.startPixel_;\n const endPixel = this.endPixel_;\n const pixels = [\n startPixel,\n [startPixel[0], endPixel[1]],\n endPixel,\n [endPixel[0], startPixel[1]],\n ];\n const coordinates = pixels.map(\n this.map_.getCoordinateFromPixelInternal,\n this.map_\n );\n // close the polygon\n coordinates[4] = coordinates[0].slice();\n if (!this.geometry_) {\n this.geometry_ = new Polygon([coordinates]);\n } else {\n this.geometry_.setCoordinates([coordinates]);\n }\n }\n\n /**\n * @return {import(\"../geom/Polygon.js\").default} Geometry.\n */\n getGeometry() {\n return this.geometry_;\n }\n}\n\nexport default RenderBox;\n","/**\n * @module ol/interaction/DragBox\n */\n// FIXME draw drag box\nimport Event from '../events/Event.js';\nimport PointerInteraction from './Pointer.js';\nimport RenderBox from '../render/Box.js';\nimport {mouseActionButton} from '../events/condition.js';\n\n/**\n * A function that takes a {@link module:ol/MapBrowserEvent~MapBrowserEvent} and two\n * {@link module:ol/pixel~Pixel}s and returns a `{boolean}`. If the condition is met,\n * true should be returned.\n * @typedef {function(this: ?, import(\"../MapBrowserEvent.js\").default, import(\"../pixel.js\").Pixel, import(\"../pixel.js\").Pixel):boolean} EndCondition\n */\n\n/**\n * @typedef {Object} Options\n * @property {string} [className='ol-dragbox'] CSS class name for styling the box.\n * @property {import(\"../events/condition.js\").Condition} [condition] A function that takes an {@link module:ol/MapBrowserEvent~MapBrowserEvent} and returns a boolean\n * to indicate whether that event should be handled.\n * Default is {@link ol/events/condition~mouseActionButton}.\n * @property {number} [minArea=64] The minimum area of the box in pixel, this value is used by the default\n * `boxEndCondition` function.\n * @property {EndCondition} [boxEndCondition] A function that takes a {@link module:ol/MapBrowserEvent~MapBrowserEvent} and two\n * {@link module:ol/pixel~Pixel}s to indicate whether a `boxend` event should be fired.\n * Default is `true` if the area of the box is bigger than the `minArea` option.\n * @property {function(this:DragBox, import(\"../MapBrowserEvent.js\").default):void} [onBoxEnd] Code to execute just\n * before `boxend` is fired.\n */\n\n/**\n * @enum {string}\n */\nconst DragBoxEventType = {\n /**\n * Triggered upon drag box start.\n * @event DragBoxEvent#boxstart\n * @api\n */\n BOXSTART: 'boxstart',\n\n /**\n * Triggered on drag when box is active.\n * @event DragBoxEvent#boxdrag\n * @api\n */\n BOXDRAG: 'boxdrag',\n\n /**\n * Triggered upon drag box end.\n * @event DragBoxEvent#boxend\n * @api\n */\n BOXEND: 'boxend',\n\n /**\n * Triggered upon drag box canceled.\n * @event DragBoxEvent#boxcancel\n * @api\n */\n BOXCANCEL: 'boxcancel',\n};\n\n/**\n * @classdesc\n * Events emitted by {@link module:ol/interaction/DragBox~DragBox} instances are instances of\n * this type.\n */\nexport class DragBoxEvent extends Event {\n /**\n * @param {string} type The event type.\n * @param {import(\"../coordinate.js\").Coordinate} coordinate The event coordinate.\n * @param {import(\"../MapBrowserEvent.js\").default} mapBrowserEvent Originating event.\n */\n constructor(type, coordinate, mapBrowserEvent) {\n super(type);\n\n /**\n * The coordinate of the drag event.\n * @const\n * @type {import(\"../coordinate.js\").Coordinate}\n * @api\n */\n this.coordinate = coordinate;\n\n /**\n * @const\n * @type {import(\"../MapBrowserEvent.js\").default}\n * @api\n */\n this.mapBrowserEvent = mapBrowserEvent;\n }\n}\n\n/***\n * @template Return\n * @typedef {import(\"../Observable\").OnSignature &\n * import(\"../Observable\").OnSignature &\n * import(\"../Observable\").OnSignature<'boxcancel'|'boxdrag'|'boxend'|'boxstart', DragBoxEvent, Return> &\n * import(\"../Observable\").CombinedOnSignature} DragBoxOnSignature\n */\n\n/**\n * @classdesc\n * Allows the user to draw a vector box by clicking and dragging on the map,\n * normally combined with an {@link module:ol/events/condition} that limits\n * it to when the shift or other key is held down. This is used, for example,\n * for zooming to a specific area of the map\n * (see {@link module:ol/interaction/DragZoom~DragZoom} and\n * {@link module:ol/interaction/DragRotateAndZoom~DragRotateAndZoom}).\n *\n * @fires DragBoxEvent\n * @api\n */\nclass DragBox extends PointerInteraction {\n /**\n * @param {Options} [options] Options.\n */\n constructor(options) {\n super();\n\n /***\n * @type {DragBoxOnSignature}\n */\n this.on;\n\n /***\n * @type {DragBoxOnSignature}\n */\n this.once;\n\n /***\n * @type {DragBoxOnSignature}\n */\n this.un;\n\n options = options ? options : {};\n\n /**\n * @type {import(\"../render/Box.js\").default}\n * @private\n */\n this.box_ = new RenderBox(options.className || 'ol-dragbox');\n\n /**\n * @type {number}\n * @private\n */\n this.minArea_ = options.minArea !== undefined ? options.minArea : 64;\n\n if (options.onBoxEnd) {\n this.onBoxEnd = options.onBoxEnd;\n }\n\n /**\n * @type {import(\"../pixel.js\").Pixel}\n * @private\n */\n this.startPixel_ = null;\n\n /**\n * @private\n * @type {import(\"../events/condition.js\").Condition}\n */\n this.condition_ = options.condition ? options.condition : mouseActionButton;\n\n /**\n * @private\n * @type {EndCondition}\n */\n this.boxEndCondition_ = options.boxEndCondition\n ? options.boxEndCondition\n : this.defaultBoxEndCondition;\n }\n\n /**\n * The default condition for determining whether the boxend event\n * should fire.\n * @param {import(\"../MapBrowserEvent.js\").default} mapBrowserEvent The originating MapBrowserEvent\n * leading to the box end.\n * @param {import(\"../pixel.js\").Pixel} startPixel The starting pixel of the box.\n * @param {import(\"../pixel.js\").Pixel} endPixel The end pixel of the box.\n * @return {boolean} Whether or not the boxend condition should be fired.\n */\n defaultBoxEndCondition(mapBrowserEvent, startPixel, endPixel) {\n const width = endPixel[0] - startPixel[0];\n const height = endPixel[1] - startPixel[1];\n return width * width + height * height >= this.minArea_;\n }\n\n /**\n * Returns geometry of last drawn box.\n * @return {import(\"../geom/Polygon.js\").default} Geometry.\n * @api\n */\n getGeometry() {\n return this.box_.getGeometry();\n }\n\n /**\n * Handle pointer drag events.\n * @param {import(\"../MapBrowserEvent.js\").default} mapBrowserEvent Event.\n */\n handleDragEvent(mapBrowserEvent) {\n this.box_.setPixels(this.startPixel_, mapBrowserEvent.pixel);\n\n this.dispatchEvent(\n new DragBoxEvent(\n DragBoxEventType.BOXDRAG,\n mapBrowserEvent.coordinate,\n mapBrowserEvent\n )\n );\n }\n\n /**\n * Handle pointer up events.\n * @param {import(\"../MapBrowserEvent.js\").default} mapBrowserEvent Event.\n * @return {boolean} If the event was consumed.\n */\n handleUpEvent(mapBrowserEvent) {\n this.box_.setMap(null);\n\n const completeBox = this.boxEndCondition_(\n mapBrowserEvent,\n this.startPixel_,\n mapBrowserEvent.pixel\n );\n if (completeBox) {\n this.onBoxEnd(mapBrowserEvent);\n }\n this.dispatchEvent(\n new DragBoxEvent(\n completeBox ? DragBoxEventType.BOXEND : DragBoxEventType.BOXCANCEL,\n mapBrowserEvent.coordinate,\n mapBrowserEvent\n )\n );\n return false;\n }\n\n /**\n * Handle pointer down events.\n * @param {import(\"../MapBrowserEvent.js\").default} mapBrowserEvent Event.\n * @return {boolean} If the event was consumed.\n */\n handleDownEvent(mapBrowserEvent) {\n if (this.condition_(mapBrowserEvent)) {\n this.startPixel_ = mapBrowserEvent.pixel;\n this.box_.setMap(mapBrowserEvent.map);\n this.box_.setPixels(this.startPixel_, this.startPixel_);\n this.dispatchEvent(\n new DragBoxEvent(\n DragBoxEventType.BOXSTART,\n mapBrowserEvent.coordinate,\n mapBrowserEvent\n )\n );\n return true;\n }\n return false;\n }\n\n /**\n * Function to execute just before `onboxend` is fired\n * @param {import(\"../MapBrowserEvent.js\").default} event Event.\n */\n onBoxEnd(event) {}\n}\n\nexport default DragBox;\n","/**\n * @module ol/interaction/DragZoom\n */\nimport DragBox from './DragBox.js';\nimport {easeOut} from '../easing.js';\nimport {shiftKeyOnly} from '../events/condition.js';\n\n/**\n * @typedef {Object} Options\n * @property {string} [className='ol-dragzoom'] CSS class name for styling the\n * box.\n * @property {import(\"../events/condition.js\").Condition} [condition] A function that\n * takes an {@link module:ol/MapBrowserEvent~MapBrowserEvent} and returns a\n * boolean to indicate whether that event should be handled.\n * Default is {@link module:ol/events/condition.shiftKeyOnly}.\n * @property {number} [duration=200] Animation duration in milliseconds.\n * @property {boolean} [out=false] Use interaction for zooming out.\n * @property {number} [minArea=64] The minimum area of the box in pixel, this value is used by the parent default\n * `boxEndCondition` function.\n */\n\n/**\n * @classdesc\n * Allows the user to zoom the map by clicking and dragging on the map,\n * normally combined with an {@link module:ol/events/condition} that limits\n * it to when a key, shift by default, is held down.\n *\n * To change the style of the box, use CSS and the `.ol-dragzoom` selector, or\n * your custom one configured with `className`.\n * @api\n */\nclass DragZoom extends DragBox {\n /**\n * @param {Options} [options] Options.\n */\n constructor(options) {\n options = options ? options : {};\n\n const condition = options.condition ? options.condition : shiftKeyOnly;\n\n super({\n condition: condition,\n className: options.className || 'ol-dragzoom',\n minArea: options.minArea,\n });\n\n /**\n * @private\n * @type {number}\n */\n this.duration_ = options.duration !== undefined ? options.duration : 200;\n\n /**\n * @private\n * @type {boolean}\n */\n this.out_ = options.out !== undefined ? options.out : false;\n }\n\n /**\n * Function to execute just before `onboxend` is fired\n * @param {import(\"../MapBrowserEvent.js\").default} event Event.\n */\n onBoxEnd(event) {\n const map = this.getMap();\n const view = /** @type {!import(\"../View.js\").default} */ (map.getView());\n let geometry = this.getGeometry();\n\n if (this.out_) {\n const rotatedExtent = view.rotatedExtentForGeometry(geometry);\n const resolution = view.getResolutionForExtentInternal(rotatedExtent);\n const factor = view.getResolution() / resolution;\n geometry = geometry.clone();\n geometry.scale(factor * factor);\n }\n\n view.fitInternal(geometry, {\n duration: this.duration_,\n easing: easeOut,\n });\n }\n}\n\nexport default DragZoom;\n","/**\n * @module ol/events/KeyCode\n */\n\n/**\n * @enum {number}\n * @const\n */\nexport default {\n LEFT: 37,\n UP: 38,\n RIGHT: 39,\n DOWN: 40,\n};\n","/**\n * @module ol/interaction/KeyboardPan\n */\nimport EventType from '../events/EventType.js';\nimport Interaction, {pan} from './Interaction.js';\nimport KeyCode from '../events/KeyCode.js';\nimport {noModifierKeys, targetNotEditable} from '../events/condition.js';\nimport {rotate as rotateCoordinate} from '../coordinate.js';\n\n/**\n * @typedef {Object} Options\n * @property {import(\"../events/condition.js\").Condition} [condition] A function that\n * takes an {@link module:ol/MapBrowserEvent~MapBrowserEvent} and returns a\n * boolean to indicate whether that event should be handled. Default is\n * {@link module:ol/events/condition.noModifierKeys} and\n * {@link module:ol/events/condition.targetNotEditable}.\n * @property {number} [duration=100] Animation duration in milliseconds.\n * @property {number} [pixelDelta=128] The amount of pixels to pan on each key\n * press.\n */\n\n/**\n * @classdesc\n * Allows the user to pan the map using keyboard arrows.\n * Note that, although this interaction is by default included in maps,\n * the keys can only be used when browser focus is on the element to which\n * the keyboard events are attached. By default, this is the map div,\n * though you can change this with the `keyboardEventTarget` in\n * {@link module:ol/Map~Map}. `document` never loses focus but, for any other\n * element, focus will have to be on, and returned to, this element if the keys\n * are to function.\n * See also {@link module:ol/interaction/KeyboardZoom~KeyboardZoom}.\n * @api\n */\nclass KeyboardPan extends Interaction {\n /**\n * @param {Options} [options] Options.\n */\n constructor(options) {\n super();\n\n options = options || {};\n\n /**\n * @private\n * @param {import(\"../MapBrowserEvent.js\").default} mapBrowserEvent Browser event.\n * @return {boolean} Combined condition result.\n */\n this.defaultCondition_ = function (mapBrowserEvent) {\n return (\n noModifierKeys(mapBrowserEvent) && targetNotEditable(mapBrowserEvent)\n );\n };\n\n /**\n * @private\n * @type {import(\"../events/condition.js\").Condition}\n */\n this.condition_ =\n options.condition !== undefined\n ? options.condition\n : this.defaultCondition_;\n\n /**\n * @private\n * @type {number}\n */\n this.duration_ = options.duration !== undefined ? options.duration : 100;\n\n /**\n * @private\n * @type {number}\n */\n this.pixelDelta_ =\n options.pixelDelta !== undefined ? options.pixelDelta : 128;\n }\n\n /**\n * Handles the {@link module:ol/MapBrowserEvent~MapBrowserEvent map browser event} if it was a\n * `KeyEvent`, and decides the direction to pan to (if an arrow key was\n * pressed).\n * @param {import(\"../MapBrowserEvent.js\").default} mapBrowserEvent Map browser event.\n * @return {boolean} `false` to stop event propagation.\n */\n handleEvent(mapBrowserEvent) {\n let stopEvent = false;\n if (mapBrowserEvent.type == EventType.KEYDOWN) {\n const keyEvent = /** @type {KeyboardEvent} */ (\n mapBrowserEvent.originalEvent\n );\n const keyCode = keyEvent.keyCode;\n if (\n this.condition_(mapBrowserEvent) &&\n (keyCode == KeyCode.DOWN ||\n keyCode == KeyCode.LEFT ||\n keyCode == KeyCode.RIGHT ||\n keyCode == KeyCode.UP)\n ) {\n const map = mapBrowserEvent.map;\n const view = map.getView();\n const mapUnitsDelta = view.getResolution() * this.pixelDelta_;\n let deltaX = 0,\n deltaY = 0;\n if (keyCode == KeyCode.DOWN) {\n deltaY = -mapUnitsDelta;\n } else if (keyCode == KeyCode.LEFT) {\n deltaX = -mapUnitsDelta;\n } else if (keyCode == KeyCode.RIGHT) {\n deltaX = mapUnitsDelta;\n } else {\n deltaY = mapUnitsDelta;\n }\n const delta = [deltaX, deltaY];\n rotateCoordinate(delta, view.getRotation());\n pan(view, delta, this.duration_);\n keyEvent.preventDefault();\n stopEvent = true;\n }\n }\n return !stopEvent;\n }\n}\n\nexport default KeyboardPan;\n","/**\n * @module ol/interaction/KeyboardZoom\n */\nimport EventType from '../events/EventType.js';\nimport Interaction, {zoomByDelta} from './Interaction.js';\nimport {targetNotEditable} from '../events/condition.js';\n\n/**\n * @typedef {Object} Options\n * @property {number} [duration=100] Animation duration in milliseconds.\n * @property {import(\"../events/condition.js\").Condition} [condition] A function that\n * takes an {@link module:ol/MapBrowserEvent~MapBrowserEvent} and returns a\n * boolean to indicate whether that event should be handled. Default is\n * {@link module:ol/events/condition.targetNotEditable}.\n * @property {number} [delta=1] The zoom level delta on each key press.\n */\n\n/**\n * @classdesc\n * Allows the user to zoom the map using keyboard + and -.\n * Note that, although this interaction is by default included in maps,\n * the keys can only be used when browser focus is on the element to which\n * the keyboard events are attached. By default, this is the map div,\n * though you can change this with the `keyboardEventTarget` in\n * {@link module:ol/Map~Map}. `document` never loses focus but, for any other\n * element, focus will have to be on, and returned to, this element if the keys\n * are to function.\n * See also {@link module:ol/interaction/KeyboardPan~KeyboardPan}.\n * @api\n */\nclass KeyboardZoom extends Interaction {\n /**\n * @param {Options} [options] Options.\n */\n constructor(options) {\n super();\n\n options = options ? options : {};\n\n /**\n * @private\n * @type {import(\"../events/condition.js\").Condition}\n */\n this.condition_ = options.condition ? options.condition : targetNotEditable;\n\n /**\n * @private\n * @type {number}\n */\n this.delta_ = options.delta ? options.delta : 1;\n\n /**\n * @private\n * @type {number}\n */\n this.duration_ = options.duration !== undefined ? options.duration : 100;\n }\n\n /**\n * Handles the {@link module:ol/MapBrowserEvent~MapBrowserEvent map browser event} if it was a\n * `KeyEvent`, and decides whether to zoom in or out (depending on whether the\n * key pressed was '+' or '-').\n * @param {import(\"../MapBrowserEvent.js\").default} mapBrowserEvent Map browser event.\n * @return {boolean} `false` to stop event propagation.\n */\n handleEvent(mapBrowserEvent) {\n let stopEvent = false;\n if (\n mapBrowserEvent.type == EventType.KEYDOWN ||\n mapBrowserEvent.type == EventType.KEYPRESS\n ) {\n const keyEvent = /** @type {KeyboardEvent} */ (\n mapBrowserEvent.originalEvent\n );\n const charCode = keyEvent.charCode;\n if (\n this.condition_(mapBrowserEvent) &&\n (charCode == '+'.charCodeAt(0) || charCode == '-'.charCodeAt(0))\n ) {\n const map = mapBrowserEvent.map;\n const delta =\n charCode == '+'.charCodeAt(0) ? this.delta_ : -this.delta_;\n const view = map.getView();\n zoomByDelta(view, delta, undefined, this.duration_);\n keyEvent.preventDefault();\n stopEvent = true;\n }\n }\n return !stopEvent;\n }\n}\n\nexport default KeyboardZoom;\n","/**\n * @module ol/interaction/MouseWheelZoom\n */\nimport EventType from '../events/EventType.js';\nimport Interaction, {zoomByDelta} from './Interaction.js';\nimport {DEVICE_PIXEL_RATIO, FIREFOX} from '../has.js';\nimport {all, always, focusWithTabindex} from '../events/condition.js';\nimport {clamp} from '../math.js';\n\n/**\n * @typedef {'trackpad' | 'wheel'} Mode\n */\n\n/**\n * @typedef {Object} Options\n * @property {import(\"../events/condition.js\").Condition} [condition] A function that\n * takes an {@link module:ol/MapBrowserEvent~MapBrowserEvent} and returns a\n * boolean to indicate whether that event should be handled. Default is\n * {@link module:ol/events/condition.always}.\n * @property {boolean} [onFocusOnly=false] When the map's target has a `tabindex` attribute set,\n * the interaction will only handle events when the map has the focus.\n * @property {number} [maxDelta=1] Maximum mouse wheel delta.\n * @property {number} [duration=250] Animation duration in milliseconds.\n * @property {number} [timeout=80] Mouse wheel timeout duration in milliseconds.\n * @property {boolean} [useAnchor=true] Enable zooming using the mouse's\n * location as the anchor. When set to `false`, zooming in and out will zoom to\n * the center of the screen instead of zooming on the mouse's location.\n * @property {boolean} [constrainResolution=false] If true, the mouse wheel zoom\n * event will always animate to the closest zoom level after an interaction;\n * false means intermediary zoom levels are allowed.\n */\n\n/**\n * @classdesc\n * Allows the user to zoom the map by scrolling the mouse wheel.\n * @api\n */\nclass MouseWheelZoom extends Interaction {\n /**\n * @param {Options} [options] Options.\n */\n constructor(options) {\n options = options ? options : {};\n\n super(\n /** @type {import(\"./Interaction.js\").InteractionOptions} */ (options)\n );\n\n /**\n * @private\n * @type {number}\n */\n this.totalDelta_ = 0;\n\n /**\n * @private\n * @type {number}\n */\n this.lastDelta_ = 0;\n\n /**\n * @private\n * @type {number}\n */\n this.maxDelta_ = options.maxDelta !== undefined ? options.maxDelta : 1;\n\n /**\n * @private\n * @type {number}\n */\n this.duration_ = options.duration !== undefined ? options.duration : 250;\n\n /**\n * @private\n * @type {number}\n */\n this.timeout_ = options.timeout !== undefined ? options.timeout : 80;\n\n /**\n * @private\n * @type {boolean}\n */\n this.useAnchor_ =\n options.useAnchor !== undefined ? options.useAnchor : true;\n\n /**\n * @private\n * @type {boolean}\n */\n this.constrainResolution_ =\n options.constrainResolution !== undefined\n ? options.constrainResolution\n : false;\n\n const condition = options.condition ? options.condition : always;\n\n /**\n * @private\n * @type {import(\"../events/condition.js\").Condition}\n */\n this.condition_ = options.onFocusOnly\n ? all(focusWithTabindex, condition)\n : condition;\n\n /**\n * @private\n * @type {?import(\"../coordinate.js\").Coordinate}\n */\n this.lastAnchor_ = null;\n\n /**\n * @private\n * @type {number|undefined}\n */\n this.startTime_ = undefined;\n\n /**\n * @private\n * @type {?}\n */\n this.timeoutId_;\n\n /**\n * @private\n * @type {Mode|undefined}\n */\n this.mode_ = undefined;\n\n /**\n * Trackpad events separated by this delay will be considered separate\n * interactions.\n * @type {number}\n */\n this.trackpadEventGap_ = 400;\n\n /**\n * @type {?}\n */\n this.trackpadTimeoutId_;\n\n /**\n * The number of delta values per zoom level\n * @private\n * @type {number}\n */\n this.deltaPerZoom_ = 300;\n }\n\n /**\n * @private\n */\n endInteraction_() {\n this.trackpadTimeoutId_ = undefined;\n const map = this.getMap();\n if (!map) {\n return;\n }\n const view = map.getView();\n view.endInteraction(\n undefined,\n this.lastDelta_ ? (this.lastDelta_ > 0 ? 1 : -1) : 0,\n this.lastAnchor_\n );\n }\n\n /**\n * Handles the {@link module:ol/MapBrowserEvent~MapBrowserEvent map browser event} (if it was a mousewheel-event) and eventually\n * zooms the map.\n * @param {import(\"../MapBrowserEvent.js\").default} mapBrowserEvent Map browser event.\n * @return {boolean} `false` to stop event propagation.\n */\n handleEvent(mapBrowserEvent) {\n if (!this.condition_(mapBrowserEvent)) {\n return true;\n }\n const type = mapBrowserEvent.type;\n if (type !== EventType.WHEEL) {\n return true;\n }\n\n const map = mapBrowserEvent.map;\n const wheelEvent = /** @type {WheelEvent} */ (\n mapBrowserEvent.originalEvent\n );\n wheelEvent.preventDefault();\n\n if (this.useAnchor_) {\n this.lastAnchor_ = mapBrowserEvent.coordinate;\n }\n\n // Delta normalisation inspired by\n // https://github.com/mapbox/mapbox-gl-js/blob/001c7b9/js/ui/handler/scroll_zoom.js\n let delta;\n if (mapBrowserEvent.type == EventType.WHEEL) {\n delta = wheelEvent.deltaY;\n if (FIREFOX && wheelEvent.deltaMode === WheelEvent.DOM_DELTA_PIXEL) {\n delta /= DEVICE_PIXEL_RATIO;\n }\n if (wheelEvent.deltaMode === WheelEvent.DOM_DELTA_LINE) {\n delta *= 40;\n }\n }\n\n if (delta === 0) {\n return false;\n }\n this.lastDelta_ = delta;\n\n const now = Date.now();\n\n if (this.startTime_ === undefined) {\n this.startTime_ = now;\n }\n\n if (!this.mode_ || now - this.startTime_ > this.trackpadEventGap_) {\n this.mode_ = Math.abs(delta) < 4 ? 'trackpad' : 'wheel';\n }\n\n const view = map.getView();\n if (\n this.mode_ === 'trackpad' &&\n !(view.getConstrainResolution() || this.constrainResolution_)\n ) {\n if (this.trackpadTimeoutId_) {\n clearTimeout(this.trackpadTimeoutId_);\n } else {\n if (view.getAnimating()) {\n view.cancelAnimations();\n }\n view.beginInteraction();\n }\n this.trackpadTimeoutId_ = setTimeout(\n this.endInteraction_.bind(this),\n this.timeout_\n );\n view.adjustZoom(-delta / this.deltaPerZoom_, this.lastAnchor_);\n this.startTime_ = now;\n return false;\n }\n\n this.totalDelta_ += delta;\n\n const timeLeft = Math.max(this.timeout_ - (now - this.startTime_), 0);\n\n clearTimeout(this.timeoutId_);\n this.timeoutId_ = setTimeout(\n this.handleWheelZoom_.bind(this, map),\n timeLeft\n );\n\n return false;\n }\n\n /**\n * @private\n * @param {import(\"../Map.js\").default} map Map.\n */\n handleWheelZoom_(map) {\n const view = map.getView();\n if (view.getAnimating()) {\n view.cancelAnimations();\n }\n let delta =\n -clamp(\n this.totalDelta_,\n -this.maxDelta_ * this.deltaPerZoom_,\n this.maxDelta_ * this.deltaPerZoom_\n ) / this.deltaPerZoom_;\n if (view.getConstrainResolution() || this.constrainResolution_) {\n // view has a zoom constraint, zoom by 1\n delta = delta ? (delta > 0 ? 1 : -1) : 0;\n }\n zoomByDelta(view, delta, this.lastAnchor_, this.duration_);\n\n this.mode_ = undefined;\n this.totalDelta_ = 0;\n this.lastAnchor_ = null;\n this.startTime_ = undefined;\n this.timeoutId_ = undefined;\n }\n\n /**\n * Enable or disable using the mouse's location as an anchor when zooming\n * @param {boolean} useAnchor true to zoom to the mouse's location, false\n * to zoom to the center of the map\n * @api\n */\n setMouseAnchor(useAnchor) {\n this.useAnchor_ = useAnchor;\n if (!useAnchor) {\n this.lastAnchor_ = null;\n }\n }\n}\n\nexport default MouseWheelZoom;\n","/**\n * @module ol/interaction/PinchRotate\n */\nimport PointerInteraction, {\n centroid as centroidFromPointers,\n} from './Pointer.js';\nimport {FALSE} from '../functions.js';\nimport {disable} from '../rotationconstraint.js';\n\n/**\n * @typedef {Object} Options\n * @property {number} [duration=250] The duration of the animation in\n * milliseconds.\n * @property {number} [threshold=0.3] Minimal angle in radians to start a rotation.\n */\n\n/**\n * @classdesc\n * Allows the user to rotate the map by twisting with two fingers\n * on a touch screen.\n * @api\n */\nclass PinchRotate extends PointerInteraction {\n /**\n * @param {Options} [options] Options.\n */\n constructor(options) {\n options = options ? options : {};\n\n const pointerOptions = /** @type {import(\"./Pointer.js\").Options} */ (\n options\n );\n\n if (!pointerOptions.stopDown) {\n pointerOptions.stopDown = FALSE;\n }\n\n super(pointerOptions);\n\n /**\n * @private\n * @type {import(\"../coordinate.js\").Coordinate}\n */\n this.anchor_ = null;\n\n /**\n * @private\n * @type {number|undefined}\n */\n this.lastAngle_ = undefined;\n\n /**\n * @private\n * @type {boolean}\n */\n this.rotating_ = false;\n\n /**\n * @private\n * @type {number}\n */\n this.rotationDelta_ = 0.0;\n\n /**\n * @private\n * @type {number}\n */\n this.threshold_ = options.threshold !== undefined ? options.threshold : 0.3;\n\n /**\n * @private\n * @type {number}\n */\n this.duration_ = options.duration !== undefined ? options.duration : 250;\n }\n\n /**\n * Handle pointer drag events.\n * @param {import(\"../MapBrowserEvent.js\").default} mapBrowserEvent Event.\n */\n handleDragEvent(mapBrowserEvent) {\n let rotationDelta = 0.0;\n\n const touch0 = this.targetPointers[0];\n const touch1 = this.targetPointers[1];\n\n // angle between touches\n const angle = Math.atan2(\n touch1.clientY - touch0.clientY,\n touch1.clientX - touch0.clientX\n );\n\n if (this.lastAngle_ !== undefined) {\n const delta = angle - this.lastAngle_;\n this.rotationDelta_ += delta;\n if (!this.rotating_ && Math.abs(this.rotationDelta_) > this.threshold_) {\n this.rotating_ = true;\n }\n rotationDelta = delta;\n }\n this.lastAngle_ = angle;\n\n const map = mapBrowserEvent.map;\n const view = map.getView();\n if (view.getConstraints().rotation === disable) {\n return;\n }\n\n // rotate anchor point.\n // FIXME: should be the intersection point between the lines:\n // touch0,touch1 and previousTouch0,previousTouch1\n this.anchor_ = map.getCoordinateFromPixelInternal(\n map.getEventPixel(centroidFromPointers(this.targetPointers))\n );\n\n // rotate\n if (this.rotating_) {\n map.render();\n view.adjustRotationInternal(rotationDelta, this.anchor_);\n }\n }\n\n /**\n * Handle pointer up events.\n * @param {import(\"../MapBrowserEvent.js\").default} mapBrowserEvent Event.\n * @return {boolean} If the event was consumed.\n */\n handleUpEvent(mapBrowserEvent) {\n if (this.targetPointers.length < 2) {\n const map = mapBrowserEvent.map;\n const view = map.getView();\n view.endInteraction(this.duration_);\n return false;\n }\n return true;\n }\n\n /**\n * Handle pointer down events.\n * @param {import(\"../MapBrowserEvent.js\").default} mapBrowserEvent Event.\n * @return {boolean} If the event was consumed.\n */\n handleDownEvent(mapBrowserEvent) {\n if (this.targetPointers.length >= 2) {\n const map = mapBrowserEvent.map;\n this.anchor_ = null;\n this.lastAngle_ = undefined;\n this.rotating_ = false;\n this.rotationDelta_ = 0.0;\n if (!this.handlingDownUpSequence) {\n map.getView().beginInteraction();\n }\n return true;\n }\n return false;\n }\n}\n\nexport default PinchRotate;\n","/**\n * @module ol/interaction/PinchZoom\n */\nimport PointerInteraction, {\n centroid as centroidFromPointers,\n} from './Pointer.js';\nimport {FALSE} from '../functions.js';\n\n/**\n * @typedef {Object} Options\n * @property {number} [duration=400] Animation duration in milliseconds.\n */\n\n/**\n * @classdesc\n * Allows the user to zoom the map by pinching with two fingers\n * on a touch screen.\n * @api\n */\nclass PinchZoom extends PointerInteraction {\n /**\n * @param {Options} [options] Options.\n */\n constructor(options) {\n options = options ? options : {};\n\n const pointerOptions = /** @type {import(\"./Pointer.js\").Options} */ (\n options\n );\n\n if (!pointerOptions.stopDown) {\n pointerOptions.stopDown = FALSE;\n }\n\n super(pointerOptions);\n\n /**\n * @private\n * @type {import(\"../coordinate.js\").Coordinate}\n */\n this.anchor_ = null;\n\n /**\n * @private\n * @type {number}\n */\n this.duration_ = options.duration !== undefined ? options.duration : 400;\n\n /**\n * @private\n * @type {number|undefined}\n */\n this.lastDistance_ = undefined;\n\n /**\n * @private\n * @type {number}\n */\n this.lastScaleDelta_ = 1;\n }\n\n /**\n * Handle pointer drag events.\n * @param {import(\"../MapBrowserEvent.js\").default} mapBrowserEvent Event.\n */\n handleDragEvent(mapBrowserEvent) {\n let scaleDelta = 1.0;\n\n const touch0 = this.targetPointers[0];\n const touch1 = this.targetPointers[1];\n const dx = touch0.clientX - touch1.clientX;\n const dy = touch0.clientY - touch1.clientY;\n\n // distance between touches\n const distance = Math.sqrt(dx * dx + dy * dy);\n\n if (this.lastDistance_ !== undefined) {\n scaleDelta = this.lastDistance_ / distance;\n }\n this.lastDistance_ = distance;\n\n const map = mapBrowserEvent.map;\n const view = map.getView();\n\n if (scaleDelta != 1.0) {\n this.lastScaleDelta_ = scaleDelta;\n }\n\n // scale anchor point.\n this.anchor_ = map.getCoordinateFromPixelInternal(\n map.getEventPixel(centroidFromPointers(this.targetPointers))\n );\n\n // scale, bypass the resolution constraint\n map.render();\n view.adjustResolutionInternal(scaleDelta, this.anchor_);\n }\n\n /**\n * Handle pointer up events.\n * @param {import(\"../MapBrowserEvent.js\").default} mapBrowserEvent Event.\n * @return {boolean} If the event was consumed.\n */\n handleUpEvent(mapBrowserEvent) {\n if (this.targetPointers.length < 2) {\n const map = mapBrowserEvent.map;\n const view = map.getView();\n const direction = this.lastScaleDelta_ > 1 ? 1 : -1;\n view.endInteraction(this.duration_, direction);\n return false;\n }\n return true;\n }\n\n /**\n * Handle pointer down events.\n * @param {import(\"../MapBrowserEvent.js\").default} mapBrowserEvent Event.\n * @return {boolean} If the event was consumed.\n */\n handleDownEvent(mapBrowserEvent) {\n if (this.targetPointers.length >= 2) {\n const map = mapBrowserEvent.map;\n this.anchor_ = null;\n this.lastDistance_ = undefined;\n this.lastScaleDelta_ = 1;\n if (!this.handlingDownUpSequence) {\n map.getView().beginInteraction();\n }\n return true;\n }\n return false;\n }\n}\n\nexport default PinchZoom;\n","/**\n * @module ol/interaction/defaults\n */\nimport Collection from '../Collection.js';\nimport DoubleClickZoom from './DoubleClickZoom.js';\nimport DragPan from './DragPan.js';\nimport DragRotate from './DragRotate.js';\nimport DragZoom from './DragZoom.js';\nimport KeyboardPan from './KeyboardPan.js';\nimport KeyboardZoom from './KeyboardZoom.js';\nimport Kinetic from '../Kinetic.js';\nimport MouseWheelZoom from './MouseWheelZoom.js';\nimport PinchRotate from './PinchRotate.js';\nimport PinchZoom from './PinchZoom.js';\n\n/**\n * @typedef {Object} DefaultsOptions\n * @property {boolean} [altShiftDragRotate=true] Whether Alt-Shift-drag rotate is\n * desired.\n * @property {boolean} [onFocusOnly=false] Interact only when the map has the\n * focus. This affects the `MouseWheelZoom` and `DragPan` interactions and is\n * useful when page scroll is desired for maps that do not have the browser's\n * focus.\n * @property {boolean} [doubleClickZoom=true] Whether double click zoom is\n * desired.\n * @property {boolean} [keyboard=true] Whether keyboard interaction is desired.\n * @property {boolean} [mouseWheelZoom=true] Whether mousewheel zoom is desired.\n * @property {boolean} [shiftDragZoom=true] Whether Shift-drag zoom is desired.\n * @property {boolean} [dragPan=true] Whether drag pan is desired.\n * @property {boolean} [pinchRotate=true] Whether pinch rotate is desired.\n * @property {boolean} [pinchZoom=true] Whether pinch zoom is desired.\n * @property {number} [zoomDelta] Zoom level delta when using keyboard or double click zoom.\n * @property {number} [zoomDuration] Duration of the zoom animation in\n * milliseconds.\n */\n\n/**\n * Set of interactions included in maps by default. Specific interactions can be\n * excluded by setting the appropriate option to false in the constructor\n * options, but the order of the interactions is fixed. If you want to specify\n * a different order for interactions, you will need to create your own\n * {@link module:ol/interaction/Interaction~Interaction} instances and insert\n * them into a {@link module:ol/Collection~Collection} in the order you want\n * before creating your {@link module:ol/Map~Map} instance. Changing the order can\n * be of interest if the event propagation needs to be stopped at a point.\n * The default set of interactions, in sequence, is:\n * * {@link module:ol/interaction/DragRotate~DragRotate}\n * * {@link module:ol/interaction/DoubleClickZoom~DoubleClickZoom}\n * * {@link module:ol/interaction/DragPan~DragPan}\n * * {@link module:ol/interaction/PinchRotate~PinchRotate}\n * * {@link module:ol/interaction/PinchZoom~PinchZoom}\n * * {@link module:ol/interaction/KeyboardPan~KeyboardPan}\n * * {@link module:ol/interaction/KeyboardZoom~KeyboardZoom}\n * * {@link module:ol/interaction/MouseWheelZoom~MouseWheelZoom}\n * * {@link module:ol/interaction/DragZoom~DragZoom}\n *\n * @param {DefaultsOptions} [options] Defaults options.\n * @return {Collection}\n * A collection of interactions to be used with the {@link module:ol/Map~Map}\n * constructor's `interactions` option.\n * @api\n */\nexport function defaults(options) {\n options = options ? options : {};\n\n /** @type {Collection} */\n const interactions = new Collection();\n\n const kinetic = new Kinetic(-0.005, 0.05, 100);\n\n const altShiftDragRotate =\n options.altShiftDragRotate !== undefined\n ? options.altShiftDragRotate\n : true;\n if (altShiftDragRotate) {\n interactions.push(new DragRotate());\n }\n\n const doubleClickZoom =\n options.doubleClickZoom !== undefined ? options.doubleClickZoom : true;\n if (doubleClickZoom) {\n interactions.push(\n new DoubleClickZoom({\n delta: options.zoomDelta,\n duration: options.zoomDuration,\n })\n );\n }\n\n const dragPan = options.dragPan !== undefined ? options.dragPan : true;\n if (dragPan) {\n interactions.push(\n new DragPan({\n onFocusOnly: options.onFocusOnly,\n kinetic: kinetic,\n })\n );\n }\n\n const pinchRotate =\n options.pinchRotate !== undefined ? options.pinchRotate : true;\n if (pinchRotate) {\n interactions.push(new PinchRotate());\n }\n\n const pinchZoom = options.pinchZoom !== undefined ? options.pinchZoom : true;\n if (pinchZoom) {\n interactions.push(\n new PinchZoom({\n duration: options.zoomDuration,\n })\n );\n }\n\n const keyboard = options.keyboard !== undefined ? options.keyboard : true;\n if (keyboard) {\n interactions.push(new KeyboardPan());\n interactions.push(\n new KeyboardZoom({\n delta: options.zoomDelta,\n duration: options.zoomDuration,\n })\n );\n }\n\n const mouseWheelZoom =\n options.mouseWheelZoom !== undefined ? options.mouseWheelZoom : true;\n if (mouseWheelZoom) {\n interactions.push(\n new MouseWheelZoom({\n onFocusOnly: options.onFocusOnly,\n duration: options.zoomDuration,\n })\n );\n }\n\n const shiftDragZoom =\n options.shiftDragZoom !== undefined ? options.shiftDragZoom : true;\n if (shiftDragZoom) {\n interactions.push(\n new DragZoom({\n duration: options.zoomDuration,\n })\n );\n }\n\n return interactions;\n}\n","/**\n * @module ol/size\n */\n\n/**\n * An array of numbers representing a size: `[width, height]`.\n * @typedef {Array} Size\n * @api\n */\n\n/**\n * Returns a buffered size.\n * @param {Size} size Size.\n * @param {number} num The amount by which to buffer.\n * @param {Size} [dest] Optional reusable size array.\n * @return {Size} The buffered size.\n */\nexport function buffer(size, num, dest) {\n if (dest === undefined) {\n dest = [0, 0];\n }\n dest[0] = size[0] + 2 * num;\n dest[1] = size[1] + 2 * num;\n return dest;\n}\n\n/**\n * Determines if a size has a positive area.\n * @param {Size} size The size to test.\n * @return {boolean} The size has a positive area.\n */\nexport function hasArea(size) {\n return size[0] > 0 && size[1] > 0;\n}\n\n/**\n * Returns a size scaled by a ratio. The result will be an array of integers.\n * @param {Size} size Size.\n * @param {number} ratio Ratio.\n * @param {Size} [dest] Optional reusable size array.\n * @return {Size} The scaled size.\n */\nexport function scale(size, ratio, dest) {\n if (dest === undefined) {\n dest = [0, 0];\n }\n dest[0] = (size[0] * ratio + 0.5) | 0;\n dest[1] = (size[1] * ratio + 0.5) | 0;\n return dest;\n}\n\n/**\n * Returns an `Size` array for the passed in number (meaning: square) or\n * `Size` array.\n * (meaning: non-square),\n * @param {number|Size} size Width and height.\n * @param {Size} [dest] Optional reusable size array.\n * @return {Size} Size.\n * @api\n */\nexport function toSize(size, dest) {\n if (Array.isArray(size)) {\n return size;\n }\n if (dest === undefined) {\n dest = [size, size];\n } else {\n dest[0] = size;\n dest[1] = size;\n }\n return dest;\n}\n","/**\n * @module ol/Map\n */\nimport BaseObject from './Object.js';\nimport Collection from './Collection.js';\nimport CollectionEventType from './CollectionEventType.js';\nimport CompositeMapRenderer from './renderer/Composite.js';\nimport EventType from './events/EventType.js';\nimport Layer from './layer/Layer.js';\nimport LayerGroup, {GroupEvent} from './layer/Group.js';\nimport MapBrowserEvent from './MapBrowserEvent.js';\nimport MapBrowserEventHandler from './MapBrowserEventHandler.js';\nimport MapBrowserEventType from './MapBrowserEventType.js';\nimport MapEvent from './MapEvent.js';\nimport MapEventType from './MapEventType.js';\nimport MapProperty from './MapProperty.js';\nimport ObjectEventType from './ObjectEventType.js';\nimport PointerEventType from './pointer/EventType.js';\nimport RenderEventType from './render/EventType.js';\nimport TileQueue, {getTilePriority} from './TileQueue.js';\nimport View from './View.js';\nimport ViewHint from './ViewHint.js';\nimport {DEVICE_PIXEL_RATIO, PASSIVE_EVENT_LISTENERS} from './has.js';\nimport {TRUE} from './functions.js';\nimport {\n apply as applyTransform,\n create as createTransform,\n} from './transform.js';\nimport {assert} from './asserts.js';\nimport {\n clone,\n createOrUpdateEmpty,\n equals as equalsExtent,\n getForViewAndSize,\n isEmpty,\n} from './extent.js';\nimport {defaults as defaultControls} from './control/defaults.js';\nimport {defaults as defaultInteractions} from './interaction/defaults.js';\nimport {equals} from './array.js';\nimport {fromUserCoordinate, toUserCoordinate} from './proj.js';\nimport {getUid} from './util.js';\nimport {hasArea} from './size.js';\nimport {listen, unlistenByKey} from './events.js';\nimport {removeNode} from './dom.js';\nimport {warn} from './console.js';\n\n/**\n * State of the current frame. Only `pixelRatio`, `time` and `viewState` should\n * be used in applications.\n * @typedef {Object} FrameState\n * @property {number} pixelRatio The pixel ratio of the frame.\n * @property {number} time The time when rendering of the frame was requested.\n * @property {import(\"./View.js\").State} viewState The state of the current view.\n * @property {boolean} animate Animate.\n * @property {import(\"./transform.js\").Transform} coordinateToPixelTransform CoordinateToPixelTransform.\n * @property {import(\"rbush\").default} declutterTree DeclutterTree.\n * @property {null|import(\"./extent.js\").Extent} extent Extent.\n * @property {import(\"./extent.js\").Extent} [nextExtent] Next extent during an animation series.\n * @property {number} index Index.\n * @property {Array} layerStatesArray LayerStatesArray.\n * @property {number} layerIndex LayerIndex.\n * @property {import(\"./transform.js\").Transform} pixelToCoordinateTransform PixelToCoordinateTransform.\n * @property {Array} postRenderFunctions PostRenderFunctions.\n * @property {import(\"./size.js\").Size} size Size.\n * @property {TileQueue} tileQueue TileQueue.\n * @property {!Object>} usedTiles UsedTiles.\n * @property {Array} viewHints ViewHints.\n * @property {!Object>} wantedTiles WantedTiles.\n * @property {string} mapId The id of the map.\n * @property {Object} renderTargets Identifiers of previously rendered elements.\n */\n\n/**\n * @typedef {function(Map, ?FrameState): any} PostRenderFunction\n */\n\n/**\n * @typedef {Object} AtPixelOptions\n * @property {undefined|function(import(\"./layer/Layer.js\").default): boolean} [layerFilter] Layer filter\n * function. The filter function will receive one argument, the\n * {@link module:ol/layer/Layer~Layer layer-candidate} and it should return a boolean value.\n * Only layers which are visible and for which this function returns `true`\n * will be tested for features. By default, all visible layers will be tested.\n * @property {number} [hitTolerance=0] Hit-detection tolerance in css pixels. Pixels\n * inside the radius around the given position will be checked for features.\n * @property {boolean} [checkWrapped=true] Check-Wrapped Will check for wrapped geometries inside the range of\n * +/- 1 world width. Works only if a projection is used that can be wrapped.\n */\n\n/**\n * @typedef {Object} MapOptionsInternal\n * @property {Collection} [controls] Controls.\n * @property {Collection} [interactions] Interactions.\n * @property {HTMLElement|Document} keyboardEventTarget KeyboardEventTarget.\n * @property {Collection} overlays Overlays.\n * @property {Object} values Values.\n */\n\n/**\n * @typedef {import(\"./ObjectEventType\").Types|'change:layergroup'|'change:size'|'change:target'|'change:view'} MapObjectEventTypes\n */\n\n/***\n * @template Return\n * @typedef {import(\"./Observable\").OnSignature &\n * import(\"./Observable\").OnSignature &\n * import(\"./Observable\").OnSignature &\n * import(\"./Observable\").OnSignature &\n * import(\"./Observable\").OnSignature &\n * import(\"./Observable\").CombinedOnSignature} MapEventHandler\n */\n\n/**\n * Object literal with config options for the map.\n * @typedef {Object} MapOptions\n * @property {Collection|Array} [controls]\n * Controls initially added to the map. If not specified,\n * {@link module:ol/control/defaults.defaults} is used.\n * @property {number} [pixelRatio=window.devicePixelRatio] The ratio between\n * physical pixels and device-independent pixels (dips) on the device.\n * @property {Collection|Array} [interactions]\n * Interactions that are initially added to the map. If not specified,\n * {@link module:ol/interaction/defaults.defaults} is used.\n * @property {HTMLElement|Document|string} [keyboardEventTarget] The element to\n * listen to keyboard events on. This determines when the `KeyboardPan` and\n * `KeyboardZoom` interactions trigger. For example, if this option is set to\n * `document` the keyboard interactions will always trigger. If this option is\n * not specified, the element the library listens to keyboard events on is the\n * map target (i.e. the user-provided div for the map). If this is not\n * `document`, the target element needs to be focused for key events to be\n * emitted, requiring that the target element has a `tabindex` attribute.\n * @property {Array|Collection|LayerGroup} [layers]\n * Layers. If this is not defined, a map with no layers will be rendered. Note\n * that layers are rendered in the order supplied, so if you want, for example,\n * a vector layer to appear on top of a tile layer, it must come after the tile\n * layer.\n * @property {number} [maxTilesLoading=16] Maximum number tiles to load\n * simultaneously.\n * @property {number} [moveTolerance=1] The minimum distance in pixels the\n * cursor must move to be detected as a map move event instead of a click.\n * Increasing this value can make it easier to click on the map.\n * @property {Collection|Array} [overlays]\n * Overlays initially added to the map. By default, no overlays are added.\n * @property {HTMLElement|string} [target] The container for the map, either the\n * element itself or the `id` of the element. If not specified at construction\n * time, {@link module:ol/Map~Map#setTarget} must be called for the map to be\n * rendered. If passed by element, the container can be in a secondary document.\n * **Note:** CSS `transform` support for the target element is limited to `scale`.\n * @property {View|Promise} [view] The map's view. No layer sources will be\n * fetched unless this is specified at construction time or through\n * {@link module:ol/Map~Map#setView}.\n */\n\n/**\n * @param {import(\"./layer/Base.js\").default} layer Layer.\n */\nfunction removeLayerMapProperty(layer) {\n if (layer instanceof Layer) {\n layer.setMapInternal(null);\n return;\n }\n if (layer instanceof LayerGroup) {\n layer.getLayers().forEach(removeLayerMapProperty);\n }\n}\n\n/**\n * @param {import(\"./layer/Base.js\").default} layer Layer.\n * @param {Map} map Map.\n */\nfunction setLayerMapProperty(layer, map) {\n if (layer instanceof Layer) {\n layer.setMapInternal(map);\n return;\n }\n if (layer instanceof LayerGroup) {\n const layers = layer.getLayers().getArray();\n for (let i = 0, ii = layers.length; i < ii; ++i) {\n setLayerMapProperty(layers[i], map);\n }\n }\n}\n\n/**\n * @classdesc\n * The map is the core component of OpenLayers. For a map to render, a view,\n * one or more layers, and a target container are needed:\n *\n * import Map from 'ol/Map.js';\n * import View from 'ol/View.js';\n * import TileLayer from 'ol/layer/Tile.js';\n * import OSM from 'ol/source/OSM.js';\n *\n * const map = new Map({\n * view: new View({\n * center: [0, 0],\n * zoom: 1,\n * }),\n * layers: [\n * new TileLayer({\n * source: new OSM(),\n * }),\n * ],\n * target: 'map',\n * });\n *\n * The above snippet creates a map using a {@link module:ol/layer/Tile~TileLayer} to\n * display {@link module:ol/source/OSM~OSM} OSM data and render it to a DOM\n * element with the id `map`.\n *\n * The constructor places a viewport container (with CSS class name\n * `ol-viewport`) in the target element (see `getViewport()`), and then two\n * further elements within the viewport: one with CSS class name\n * `ol-overlaycontainer-stopevent` for controls and some overlays, and one with\n * CSS class name `ol-overlaycontainer` for other overlays (see the `stopEvent`\n * option of {@link module:ol/Overlay~Overlay} for the difference). The map\n * itself is placed in a further element within the viewport.\n *\n * Layers are stored as a {@link module:ol/Collection~Collection} in\n * layerGroups. A top-level group is provided by the library. This is what is\n * accessed by `getLayerGroup` and `setLayerGroup`. Layers entered in the\n * options are added to this group, and `addLayer` and `removeLayer` change the\n * layer collection in the group. `getLayers` is a convenience function for\n * `getLayerGroup().getLayers()`. Note that {@link module:ol/layer/Group~LayerGroup}\n * is a subclass of {@link module:ol/layer/Base~BaseLayer}, so layers entered in the\n * options or added with `addLayer` can be groups, which can contain further\n * groups, and so on.\n *\n * @fires import(\"./MapBrowserEvent.js\").MapBrowserEvent\n * @fires import(\"./MapEvent.js\").MapEvent\n * @fires import(\"./render/Event.js\").default#precompose\n * @fires import(\"./render/Event.js\").default#postcompose\n * @fires import(\"./render/Event.js\").default#rendercomplete\n * @api\n */\nclass Map extends BaseObject {\n /**\n * @param {MapOptions} [options] Map options.\n */\n constructor(options) {\n super();\n\n options = options || {};\n\n /***\n * @type {MapEventHandler}\n */\n this.on;\n\n /***\n * @type {MapEventHandler}\n */\n this.once;\n\n /***\n * @type {MapEventHandler}\n */\n this.un;\n\n const optionsInternal = createOptionsInternal(options);\n\n /**\n * @private\n * @type {boolean|undefined}\n */\n this.renderComplete_;\n\n /**\n * @private\n * @type {boolean}\n */\n this.loaded_ = true;\n\n /** @private */\n this.boundHandleBrowserEvent_ = this.handleBrowserEvent.bind(this);\n\n /**\n * @type {number}\n * @private\n */\n this.maxTilesLoading_ =\n options.maxTilesLoading !== undefined ? options.maxTilesLoading : 16;\n\n /**\n * @private\n * @type {number}\n */\n this.pixelRatio_ =\n options.pixelRatio !== undefined\n ? options.pixelRatio\n : DEVICE_PIXEL_RATIO;\n\n /**\n * @private\n * @type {*}\n */\n this.postRenderTimeoutHandle_;\n\n /**\n * @private\n * @type {number|undefined}\n */\n this.animationDelayKey_;\n\n /**\n * @private\n */\n this.animationDelay_ = this.animationDelay_.bind(this);\n\n /**\n * @private\n * @type {import(\"./transform.js\").Transform}\n */\n this.coordinateToPixelTransform_ = createTransform();\n\n /**\n * @private\n * @type {import(\"./transform.js\").Transform}\n */\n this.pixelToCoordinateTransform_ = createTransform();\n\n /**\n * @private\n * @type {number}\n */\n this.frameIndex_ = 0;\n\n /**\n * @private\n * @type {?FrameState}\n */\n this.frameState_ = null;\n\n /**\n * The extent at the previous 'moveend' event.\n * @private\n * @type {import(\"./extent.js\").Extent}\n */\n this.previousExtent_ = null;\n\n /**\n * @private\n * @type {?import(\"./events.js\").EventsKey}\n */\n this.viewPropertyListenerKey_ = null;\n\n /**\n * @private\n * @type {?import(\"./events.js\").EventsKey}\n */\n this.viewChangeListenerKey_ = null;\n\n /**\n * @private\n * @type {?Array}\n */\n this.layerGroupPropertyListenerKeys_ = null;\n\n /**\n * @private\n * @type {!HTMLElement}\n */\n this.viewport_ = document.createElement('div');\n this.viewport_.className =\n 'ol-viewport' + ('ontouchstart' in window ? ' ol-touch' : '');\n this.viewport_.style.position = 'relative';\n this.viewport_.style.overflow = 'hidden';\n this.viewport_.style.width = '100%';\n this.viewport_.style.height = '100%';\n\n /**\n * @private\n * @type {!HTMLElement}\n */\n this.overlayContainer_ = document.createElement('div');\n this.overlayContainer_.style.position = 'absolute';\n this.overlayContainer_.style.zIndex = '0';\n this.overlayContainer_.style.width = '100%';\n this.overlayContainer_.style.height = '100%';\n this.overlayContainer_.style.pointerEvents = 'none';\n this.overlayContainer_.className = 'ol-overlaycontainer';\n this.viewport_.appendChild(this.overlayContainer_);\n\n /**\n * @private\n * @type {!HTMLElement}\n */\n this.overlayContainerStopEvent_ = document.createElement('div');\n this.overlayContainerStopEvent_.style.position = 'absolute';\n this.overlayContainerStopEvent_.style.zIndex = '0';\n this.overlayContainerStopEvent_.style.width = '100%';\n this.overlayContainerStopEvent_.style.height = '100%';\n this.overlayContainerStopEvent_.style.pointerEvents = 'none';\n this.overlayContainerStopEvent_.className = 'ol-overlaycontainer-stopevent';\n this.viewport_.appendChild(this.overlayContainerStopEvent_);\n\n /**\n * @private\n * @type {MapBrowserEventHandler}\n */\n this.mapBrowserEventHandler_ = null;\n\n /**\n * @private\n * @type {number}\n */\n this.moveTolerance_ = options.moveTolerance;\n\n /**\n * @private\n * @type {HTMLElement|Document}\n */\n this.keyboardEventTarget_ = optionsInternal.keyboardEventTarget;\n\n /**\n * @private\n * @type {?Array}\n */\n this.targetChangeHandlerKeys_ = null;\n\n /**\n * @private\n * @type {HTMLElement|null}\n */\n this.targetElement_ = null;\n\n /**\n * @type {ResizeObserver}\n */\n this.resizeObserver_ = new ResizeObserver(() => this.updateSize());\n\n /**\n * @type {Collection}\n * @protected\n */\n this.controls = optionsInternal.controls || defaultControls();\n\n /**\n * @type {Collection}\n * @protected\n */\n this.interactions =\n optionsInternal.interactions ||\n defaultInteractions({\n onFocusOnly: true,\n });\n\n /**\n * @type {Collection}\n * @private\n */\n this.overlays_ = optionsInternal.overlays;\n\n /**\n * A lookup of overlays by id.\n * @private\n * @type {Object}\n */\n this.overlayIdIndex_ = {};\n\n /**\n * @type {import(\"./renderer/Map.js\").default|null}\n * @private\n */\n this.renderer_ = null;\n\n /**\n * @private\n * @type {!Array}\n */\n this.postRenderFunctions_ = [];\n\n /**\n * @private\n * @type {TileQueue}\n */\n this.tileQueue_ = new TileQueue(\n this.getTilePriority.bind(this),\n this.handleTileChange_.bind(this)\n );\n\n this.addChangeListener(\n MapProperty.LAYERGROUP,\n this.handleLayerGroupChanged_\n );\n this.addChangeListener(MapProperty.VIEW, this.handleViewChanged_);\n this.addChangeListener(MapProperty.SIZE, this.handleSizeChanged_);\n this.addChangeListener(MapProperty.TARGET, this.handleTargetChanged_);\n\n // setProperties will trigger the rendering of the map if the map\n // is \"defined\" already.\n this.setProperties(optionsInternal.values);\n\n const map = this;\n if (options.view && !(options.view instanceof View)) {\n options.view.then(function (viewOptions) {\n map.setView(new View(viewOptions));\n });\n }\n\n this.controls.addEventListener(\n CollectionEventType.ADD,\n /**\n * @param {import(\"./Collection.js\").CollectionEvent} event CollectionEvent\n */\n (event) => {\n event.element.setMap(this);\n }\n );\n\n this.controls.addEventListener(\n CollectionEventType.REMOVE,\n /**\n * @param {import(\"./Collection.js\").CollectionEvent} event CollectionEvent.\n */\n (event) => {\n event.element.setMap(null);\n }\n );\n\n this.interactions.addEventListener(\n CollectionEventType.ADD,\n /**\n * @param {import(\"./Collection.js\").CollectionEvent} event CollectionEvent.\n */\n (event) => {\n event.element.setMap(this);\n }\n );\n\n this.interactions.addEventListener(\n CollectionEventType.REMOVE,\n /**\n * @param {import(\"./Collection.js\").CollectionEvent} event CollectionEvent.\n */\n (event) => {\n event.element.setMap(null);\n }\n );\n\n this.overlays_.addEventListener(\n CollectionEventType.ADD,\n /**\n * @param {import(\"./Collection.js\").CollectionEvent} event CollectionEvent.\n */\n (event) => {\n this.addOverlayInternal_(event.element);\n }\n );\n\n this.overlays_.addEventListener(\n CollectionEventType.REMOVE,\n /**\n * @param {import(\"./Collection.js\").CollectionEvent} event CollectionEvent.\n */\n (event) => {\n const id = event.element.getId();\n if (id !== undefined) {\n delete this.overlayIdIndex_[id.toString()];\n }\n event.element.setMap(null);\n }\n );\n\n this.controls.forEach(\n /**\n * @param {import(\"./control/Control.js\").default} control Control.\n */\n (control) => {\n control.setMap(this);\n }\n );\n\n this.interactions.forEach(\n /**\n * @param {import(\"./interaction/Interaction.js\").default} interaction Interaction.\n */\n (interaction) => {\n interaction.setMap(this);\n }\n );\n\n this.overlays_.forEach(this.addOverlayInternal_.bind(this));\n }\n\n /**\n * Add the given control to the map.\n * @param {import(\"./control/Control.js\").default} control Control.\n * @api\n */\n addControl(control) {\n this.getControls().push(control);\n }\n\n /**\n * Add the given interaction to the map. If you want to add an interaction\n * at another point of the collection use `getInteractions()` and the methods\n * available on {@link module:ol/Collection~Collection}. This can be used to\n * stop the event propagation from the handleEvent function. The interactions\n * get to handle the events in the reverse order of this collection.\n * @param {import(\"./interaction/Interaction.js\").default} interaction Interaction to add.\n * @api\n */\n addInteraction(interaction) {\n this.getInteractions().push(interaction);\n }\n\n /**\n * Adds the given layer to the top of this map. If you want to add a layer\n * elsewhere in the stack, use `getLayers()` and the methods available on\n * {@link module:ol/Collection~Collection}.\n * @param {import(\"./layer/Base.js\").default} layer Layer.\n * @api\n */\n addLayer(layer) {\n const layers = this.getLayerGroup().getLayers();\n layers.push(layer);\n }\n\n /**\n * @param {import(\"./layer/Group.js\").GroupEvent} event The layer add event.\n * @private\n */\n handleLayerAdd_(event) {\n setLayerMapProperty(event.layer, this);\n }\n\n /**\n * Add the given overlay to the map.\n * @param {import(\"./Overlay.js\").default} overlay Overlay.\n * @api\n */\n addOverlay(overlay) {\n this.getOverlays().push(overlay);\n }\n\n /**\n * This deals with map's overlay collection changes.\n * @param {import(\"./Overlay.js\").default} overlay Overlay.\n * @private\n */\n addOverlayInternal_(overlay) {\n const id = overlay.getId();\n if (id !== undefined) {\n this.overlayIdIndex_[id.toString()] = overlay;\n }\n overlay.setMap(this);\n }\n\n /**\n *\n * Clean up.\n */\n disposeInternal() {\n this.controls.clear();\n this.interactions.clear();\n this.overlays_.clear();\n this.resizeObserver_.disconnect();\n this.setTarget(null);\n super.disposeInternal();\n }\n\n /**\n * Detect features that intersect a pixel on the viewport, and execute a\n * callback with each intersecting feature. Layers included in the detection can\n * be configured through the `layerFilter` option in `options`.\n * @param {import(\"./pixel.js\").Pixel} pixel Pixel.\n * @param {function(import(\"./Feature.js\").FeatureLike, import(\"./layer/Layer.js\").default, import(\"./geom/SimpleGeometry.js\").default): T} callback Feature callback. The callback will be\n * called with two arguments. The first argument is one\n * {@link module:ol/Feature~Feature feature} or\n * {@link module:ol/render/Feature~RenderFeature render feature} at the pixel, the second is\n * the {@link module:ol/layer/Layer~Layer layer} of the feature and will be null for\n * unmanaged layers. To stop detection, callback functions can return a\n * truthy value.\n * @param {AtPixelOptions} [options] Optional options.\n * @return {T|undefined} Callback result, i.e. the return value of last\n * callback execution, or the first truthy callback return value.\n * @template T\n * @api\n */\n forEachFeatureAtPixel(pixel, callback, options) {\n if (!this.frameState_ || !this.renderer_) {\n return;\n }\n const coordinate = this.getCoordinateFromPixelInternal(pixel);\n options = options !== undefined ? options : {};\n const hitTolerance =\n options.hitTolerance !== undefined ? options.hitTolerance : 0;\n const layerFilter =\n options.layerFilter !== undefined ? options.layerFilter : TRUE;\n const checkWrapped = options.checkWrapped !== false;\n return this.renderer_.forEachFeatureAtCoordinate(\n coordinate,\n this.frameState_,\n hitTolerance,\n checkWrapped,\n callback,\n null,\n layerFilter,\n null\n );\n }\n\n /**\n * Get all features that intersect a pixel on the viewport.\n * @param {import(\"./pixel.js\").Pixel} pixel Pixel.\n * @param {AtPixelOptions} [options] Optional options.\n * @return {Array} The detected features or\n * an empty array if none were found.\n * @api\n */\n getFeaturesAtPixel(pixel, options) {\n const features = [];\n this.forEachFeatureAtPixel(\n pixel,\n function (feature) {\n features.push(feature);\n },\n options\n );\n return features;\n }\n\n /**\n * Get all layers from all layer groups.\n * @return {Array} Layers.\n * @api\n */\n getAllLayers() {\n const layers = [];\n function addLayersFrom(layerGroup) {\n layerGroup.forEach(function (layer) {\n if (layer instanceof LayerGroup) {\n addLayersFrom(layer.getLayers());\n } else {\n layers.push(layer);\n }\n });\n }\n addLayersFrom(this.getLayers());\n return layers;\n }\n\n /**\n * Detect if features intersect a pixel on the viewport. Layers included in the\n * detection can be configured through the `layerFilter` option.\n * @param {import(\"./pixel.js\").Pixel} pixel Pixel.\n * @param {AtPixelOptions} [options] Optional options.\n * @return {boolean} Is there a feature at the given pixel?\n * @api\n */\n hasFeatureAtPixel(pixel, options) {\n if (!this.frameState_ || !this.renderer_) {\n return false;\n }\n const coordinate = this.getCoordinateFromPixelInternal(pixel);\n options = options !== undefined ? options : {};\n const layerFilter =\n options.layerFilter !== undefined ? options.layerFilter : TRUE;\n const hitTolerance =\n options.hitTolerance !== undefined ? options.hitTolerance : 0;\n const checkWrapped = options.checkWrapped !== false;\n return this.renderer_.hasFeatureAtCoordinate(\n coordinate,\n this.frameState_,\n hitTolerance,\n checkWrapped,\n layerFilter,\n null\n );\n }\n\n /**\n * Returns the coordinate in user projection for a browser event.\n * @param {MouseEvent} event Event.\n * @return {import(\"./coordinate.js\").Coordinate} Coordinate.\n * @api\n */\n getEventCoordinate(event) {\n return this.getCoordinateFromPixel(this.getEventPixel(event));\n }\n\n /**\n * Returns the coordinate in view projection for a browser event.\n * @param {MouseEvent} event Event.\n * @return {import(\"./coordinate.js\").Coordinate} Coordinate.\n */\n getEventCoordinateInternal(event) {\n return this.getCoordinateFromPixelInternal(this.getEventPixel(event));\n }\n\n /**\n * Returns the map pixel position for a browser event relative to the viewport.\n * @param {UIEvent|{clientX: number, clientY: number}} event Event.\n * @return {import(\"./pixel.js\").Pixel} Pixel.\n * @api\n */\n getEventPixel(event) {\n const viewport = this.viewport_;\n const viewportPosition = viewport.getBoundingClientRect();\n const viewportSize = this.getSize();\n const scaleX = viewportPosition.width / viewportSize[0];\n const scaleY = viewportPosition.height / viewportSize[1];\n const eventPosition =\n //FIXME Are we really calling this with a TouchEvent anywhere?\n 'changedTouches' in event\n ? /** @type {TouchEvent} */ (event).changedTouches[0]\n : /** @type {MouseEvent} */ (event);\n\n return [\n (eventPosition.clientX - viewportPosition.left) / scaleX,\n (eventPosition.clientY - viewportPosition.top) / scaleY,\n ];\n }\n\n /**\n * Get the target in which this map is rendered.\n * Note that this returns what is entered as an option or in setTarget:\n * if that was an element, it returns an element; if a string, it returns that.\n * @return {HTMLElement|string|undefined} The Element or id of the Element that the\n * map is rendered in.\n * @observable\n * @api\n */\n getTarget() {\n return /** @type {HTMLElement|string|undefined} */ (\n this.get(MapProperty.TARGET)\n );\n }\n\n /**\n * Get the DOM element into which this map is rendered. In contrast to\n * `getTarget` this method always return an `Element`, or `null` if the\n * map has no target.\n * @return {HTMLElement} The element that the map is rendered in.\n * @api\n */\n getTargetElement() {\n return this.targetElement_;\n }\n\n /**\n * Get the coordinate for a given pixel. This returns a coordinate in the\n * user projection.\n * @param {import(\"./pixel.js\").Pixel} pixel Pixel position in the map viewport.\n * @return {import(\"./coordinate.js\").Coordinate} The coordinate for the pixel position.\n * @api\n */\n getCoordinateFromPixel(pixel) {\n return toUserCoordinate(\n this.getCoordinateFromPixelInternal(pixel),\n this.getView().getProjection()\n );\n }\n\n /**\n * Get the coordinate for a given pixel. This returns a coordinate in the\n * map view projection.\n * @param {import(\"./pixel.js\").Pixel} pixel Pixel position in the map viewport.\n * @return {import(\"./coordinate.js\").Coordinate} The coordinate for the pixel position.\n */\n getCoordinateFromPixelInternal(pixel) {\n const frameState = this.frameState_;\n if (!frameState) {\n return null;\n }\n return applyTransform(frameState.pixelToCoordinateTransform, pixel.slice());\n }\n\n /**\n * Get the map controls. Modifying this collection changes the controls\n * associated with the map.\n * @return {Collection} Controls.\n * @api\n */\n getControls() {\n return this.controls;\n }\n\n /**\n * Get the map overlays. Modifying this collection changes the overlays\n * associated with the map.\n * @return {Collection} Overlays.\n * @api\n */\n getOverlays() {\n return this.overlays_;\n }\n\n /**\n * Get an overlay by its identifier (the value returned by overlay.getId()).\n * Note that the index treats string and numeric identifiers as the same. So\n * `map.getOverlayById(2)` will return an overlay with id `'2'` or `2`.\n * @param {string|number} id Overlay identifier.\n * @return {import(\"./Overlay.js\").default} Overlay.\n * @api\n */\n getOverlayById(id) {\n const overlay = this.overlayIdIndex_[id.toString()];\n return overlay !== undefined ? overlay : null;\n }\n\n /**\n * Get the map interactions. Modifying this collection changes the interactions\n * associated with the map.\n *\n * Interactions are used for e.g. pan, zoom and rotate.\n * @return {Collection} Interactions.\n * @api\n */\n getInteractions() {\n return this.interactions;\n }\n\n /**\n * Get the layergroup associated with this map.\n * @return {LayerGroup} A layer group containing the layers in this map.\n * @observable\n * @api\n */\n getLayerGroup() {\n return /** @type {LayerGroup} */ (this.get(MapProperty.LAYERGROUP));\n }\n\n /**\n * Clear any existing layers and add layers to the map.\n * @param {Array|Collection} layers The layers to be added to the map.\n * @api\n */\n setLayers(layers) {\n const group = this.getLayerGroup();\n if (layers instanceof Collection) {\n group.setLayers(layers);\n return;\n }\n\n const collection = group.getLayers();\n collection.clear();\n collection.extend(layers);\n }\n\n /**\n * Get the collection of layers associated with this map.\n * @return {!Collection} Layers.\n * @api\n */\n getLayers() {\n const layers = this.getLayerGroup().getLayers();\n return layers;\n }\n\n /**\n * @return {boolean} Layers have sources that are still loading.\n */\n getLoadingOrNotReady() {\n const layerStatesArray = this.getLayerGroup().getLayerStatesArray();\n for (let i = 0, ii = layerStatesArray.length; i < ii; ++i) {\n const state = layerStatesArray[i];\n if (!state.visible) {\n continue;\n }\n const renderer = state.layer.getRenderer();\n if (renderer && !renderer.ready) {\n return true;\n }\n const source = state.layer.getSource();\n if (source && source.loading) {\n return true;\n }\n }\n return false;\n }\n\n /**\n * Get the pixel for a coordinate. This takes a coordinate in the user\n * projection and returns the corresponding pixel.\n * @param {import(\"./coordinate.js\").Coordinate} coordinate A map coordinate.\n * @return {import(\"./pixel.js\").Pixel} A pixel position in the map viewport.\n * @api\n */\n getPixelFromCoordinate(coordinate) {\n const viewCoordinate = fromUserCoordinate(\n coordinate,\n this.getView().getProjection()\n );\n return this.getPixelFromCoordinateInternal(viewCoordinate);\n }\n\n /**\n * Get the pixel for a coordinate. This takes a coordinate in the map view\n * projection and returns the corresponding pixel.\n * @param {import(\"./coordinate.js\").Coordinate} coordinate A map coordinate.\n * @return {import(\"./pixel.js\").Pixel} A pixel position in the map viewport.\n */\n getPixelFromCoordinateInternal(coordinate) {\n const frameState = this.frameState_;\n if (!frameState) {\n return null;\n }\n return applyTransform(\n frameState.coordinateToPixelTransform,\n coordinate.slice(0, 2)\n );\n }\n\n /**\n * Get the map renderer.\n * @return {import(\"./renderer/Map.js\").default|null} Renderer\n */\n getRenderer() {\n return this.renderer_;\n }\n\n /**\n * Get the size of this map.\n * @return {import(\"./size.js\").Size|undefined} The size in pixels of the map in the DOM.\n * @observable\n * @api\n */\n getSize() {\n return /** @type {import(\"./size.js\").Size|undefined} */ (\n this.get(MapProperty.SIZE)\n );\n }\n\n /**\n * Get the view associated with this map. A view manages properties such as\n * center and resolution.\n * @return {View} The view that controls this map.\n * @observable\n * @api\n */\n getView() {\n return /** @type {View} */ (this.get(MapProperty.VIEW));\n }\n\n /**\n * Get the element that serves as the map viewport.\n * @return {HTMLElement} Viewport.\n * @api\n */\n getViewport() {\n return this.viewport_;\n }\n\n /**\n * Get the element that serves as the container for overlays. Elements added to\n * this container will let mousedown and touchstart events through to the map,\n * so clicks and gestures on an overlay will trigger {@link module:ol/MapBrowserEvent~MapBrowserEvent}\n * events.\n * @return {!HTMLElement} The map's overlay container.\n */\n getOverlayContainer() {\n return this.overlayContainer_;\n }\n\n /**\n * Get the element that serves as a container for overlays that don't allow\n * event propagation. Elements added to this container won't let mousedown and\n * touchstart events through to the map, so clicks and gestures on an overlay\n * don't trigger any {@link module:ol/MapBrowserEvent~MapBrowserEvent}.\n * @return {!HTMLElement} The map's overlay container that stops events.\n */\n getOverlayContainerStopEvent() {\n return this.overlayContainerStopEvent_;\n }\n\n /**\n * @return {!Document} The document where the map is displayed.\n */\n getOwnerDocument() {\n const targetElement = this.getTargetElement();\n return targetElement ? targetElement.ownerDocument : document;\n }\n\n /**\n * @param {import(\"./Tile.js\").default} tile Tile.\n * @param {string} tileSourceKey Tile source key.\n * @param {import(\"./coordinate.js\").Coordinate} tileCenter Tile center.\n * @param {number} tileResolution Tile resolution.\n * @return {number} Tile priority.\n */\n getTilePriority(tile, tileSourceKey, tileCenter, tileResolution) {\n return getTilePriority(\n this.frameState_,\n tile,\n tileSourceKey,\n tileCenter,\n tileResolution\n );\n }\n\n /**\n * @param {UIEvent} browserEvent Browser event.\n * @param {string} [type] Type.\n */\n handleBrowserEvent(browserEvent, type) {\n type = type || browserEvent.type;\n const mapBrowserEvent = new MapBrowserEvent(type, this, browserEvent);\n this.handleMapBrowserEvent(mapBrowserEvent);\n }\n\n /**\n * @param {MapBrowserEvent} mapBrowserEvent The event to handle.\n */\n handleMapBrowserEvent(mapBrowserEvent) {\n if (!this.frameState_) {\n // With no view defined, we cannot translate pixels into geographical\n // coordinates so interactions cannot be used.\n return;\n }\n const originalEvent = /** @type {PointerEvent} */ (\n mapBrowserEvent.originalEvent\n );\n const eventType = originalEvent.type;\n if (\n eventType === PointerEventType.POINTERDOWN ||\n eventType === EventType.WHEEL ||\n eventType === EventType.KEYDOWN\n ) {\n const doc = this.getOwnerDocument();\n const rootNode = this.viewport_.getRootNode\n ? this.viewport_.getRootNode()\n : doc;\n const target = /** @type {Node} */ (originalEvent.target);\n if (\n // Abort if the target is a child of the container for elements whose events are not meant\n // to be handled by map interactions.\n this.overlayContainerStopEvent_.contains(target) ||\n // Abort if the event target is a child of the container that is no longer in the page.\n // It's possible for the target to no longer be in the page if it has been removed in an\n // event listener, this might happen in a Control that recreates it's content based on\n // user interaction either manually or via a render in something like https://reactjs.org/\n !(rootNode === doc ? doc.documentElement : rootNode).contains(target)\n ) {\n return;\n }\n }\n mapBrowserEvent.frameState = this.frameState_;\n if (this.dispatchEvent(mapBrowserEvent) !== false) {\n const interactionsArray = this.getInteractions().getArray().slice();\n for (let i = interactionsArray.length - 1; i >= 0; i--) {\n const interaction = interactionsArray[i];\n if (\n interaction.getMap() !== this ||\n !interaction.getActive() ||\n !this.getTargetElement()\n ) {\n continue;\n }\n const cont = interaction.handleEvent(mapBrowserEvent);\n if (!cont || mapBrowserEvent.propagationStopped) {\n break;\n }\n }\n }\n }\n\n /**\n * @protected\n */\n handlePostRender() {\n const frameState = this.frameState_;\n\n // Manage the tile queue\n // Image loads are expensive and a limited resource, so try to use them\n // efficiently:\n // * When the view is static we allow a large number of parallel tile loads\n // to complete the frame as quickly as possible.\n // * When animating or interacting, image loads can cause janks, so we reduce\n // the maximum number of loads per frame and limit the number of parallel\n // tile loads to remain reactive to view changes and to reduce the chance of\n // loading tiles that will quickly disappear from view.\n const tileQueue = this.tileQueue_;\n if (!tileQueue.isEmpty()) {\n let maxTotalLoading = this.maxTilesLoading_;\n let maxNewLoads = maxTotalLoading;\n if (frameState) {\n const hints = frameState.viewHints;\n if (hints[ViewHint.ANIMATING] || hints[ViewHint.INTERACTING]) {\n const lowOnFrameBudget = Date.now() - frameState.time > 8;\n maxTotalLoading = lowOnFrameBudget ? 0 : 8;\n maxNewLoads = lowOnFrameBudget ? 0 : 2;\n }\n }\n if (tileQueue.getTilesLoading() < maxTotalLoading) {\n tileQueue.reprioritize(); // FIXME only call if view has changed\n tileQueue.loadMoreTiles(maxTotalLoading, maxNewLoads);\n }\n }\n\n if (frameState && this.renderer_ && !frameState.animate) {\n if (this.renderComplete_ === true) {\n if (this.hasListener(RenderEventType.RENDERCOMPLETE)) {\n this.renderer_.dispatchRenderEvent(\n RenderEventType.RENDERCOMPLETE,\n frameState\n );\n }\n if (this.loaded_ === false) {\n this.loaded_ = true;\n this.dispatchEvent(\n new MapEvent(MapEventType.LOADEND, this, frameState)\n );\n }\n } else if (this.loaded_ === true) {\n this.loaded_ = false;\n this.dispatchEvent(\n new MapEvent(MapEventType.LOADSTART, this, frameState)\n );\n }\n }\n\n const postRenderFunctions = this.postRenderFunctions_;\n for (let i = 0, ii = postRenderFunctions.length; i < ii; ++i) {\n postRenderFunctions[i](this, frameState);\n }\n postRenderFunctions.length = 0;\n }\n\n /**\n * @private\n */\n handleSizeChanged_() {\n if (this.getView() && !this.getView().getAnimating()) {\n this.getView().resolveConstraints(0);\n }\n\n this.render();\n }\n\n /**\n * @private\n */\n handleTargetChanged_() {\n if (this.mapBrowserEventHandler_) {\n for (let i = 0, ii = this.targetChangeHandlerKeys_.length; i < ii; ++i) {\n unlistenByKey(this.targetChangeHandlerKeys_[i]);\n }\n this.targetChangeHandlerKeys_ = null;\n this.viewport_.removeEventListener(\n EventType.CONTEXTMENU,\n this.boundHandleBrowserEvent_\n );\n this.viewport_.removeEventListener(\n EventType.WHEEL,\n this.boundHandleBrowserEvent_\n );\n this.mapBrowserEventHandler_.dispose();\n this.mapBrowserEventHandler_ = null;\n removeNode(this.viewport_);\n }\n\n if (this.targetElement_) {\n this.resizeObserver_.unobserve(this.targetElement_);\n const rootNode = this.targetElement_.getRootNode();\n if (rootNode instanceof ShadowRoot) {\n this.resizeObserver_.unobserve(rootNode.host);\n }\n }\n\n // target may be undefined, null, a string or an Element.\n // If it's a string we convert it to an Element before proceeding.\n // If it's not now an Element we remove the viewport from the DOM.\n // If it's an Element we append the viewport element to it.\n\n const target = this.getTarget();\n const targetElement =\n typeof target === 'string' ? document.getElementById(target) : target;\n this.targetElement_ = targetElement;\n if (!targetElement) {\n if (this.renderer_) {\n clearTimeout(this.postRenderTimeoutHandle_);\n this.postRenderTimeoutHandle_ = undefined;\n this.postRenderFunctions_.length = 0;\n this.renderer_.dispose();\n this.renderer_ = null;\n }\n if (this.animationDelayKey_) {\n cancelAnimationFrame(this.animationDelayKey_);\n this.animationDelayKey_ = undefined;\n }\n } else {\n targetElement.appendChild(this.viewport_);\n if (!this.renderer_) {\n this.renderer_ = new CompositeMapRenderer(this);\n }\n\n this.mapBrowserEventHandler_ = new MapBrowserEventHandler(\n this,\n this.moveTolerance_\n );\n for (const key in MapBrowserEventType) {\n this.mapBrowserEventHandler_.addEventListener(\n MapBrowserEventType[key],\n this.handleMapBrowserEvent.bind(this)\n );\n }\n this.viewport_.addEventListener(\n EventType.CONTEXTMENU,\n this.boundHandleBrowserEvent_,\n false\n );\n this.viewport_.addEventListener(\n EventType.WHEEL,\n this.boundHandleBrowserEvent_,\n PASSIVE_EVENT_LISTENERS ? {passive: false} : false\n );\n\n const keyboardEventTarget = !this.keyboardEventTarget_\n ? targetElement\n : this.keyboardEventTarget_;\n this.targetChangeHandlerKeys_ = [\n listen(\n keyboardEventTarget,\n EventType.KEYDOWN,\n this.handleBrowserEvent,\n this\n ),\n listen(\n keyboardEventTarget,\n EventType.KEYPRESS,\n this.handleBrowserEvent,\n this\n ),\n ];\n const rootNode = targetElement.getRootNode();\n if (rootNode instanceof ShadowRoot) {\n this.resizeObserver_.observe(rootNode.host);\n }\n this.resizeObserver_.observe(targetElement);\n }\n\n this.updateSize();\n // updateSize calls setSize, so no need to call this.render\n // ourselves here.\n }\n\n /**\n * @private\n */\n handleTileChange_() {\n this.render();\n }\n\n /**\n * @private\n */\n handleViewPropertyChanged_() {\n this.render();\n }\n\n /**\n * @private\n */\n handleViewChanged_() {\n if (this.viewPropertyListenerKey_) {\n unlistenByKey(this.viewPropertyListenerKey_);\n this.viewPropertyListenerKey_ = null;\n }\n if (this.viewChangeListenerKey_) {\n unlistenByKey(this.viewChangeListenerKey_);\n this.viewChangeListenerKey_ = null;\n }\n const view = this.getView();\n if (view) {\n this.updateViewportSize_();\n\n this.viewPropertyListenerKey_ = listen(\n view,\n ObjectEventType.PROPERTYCHANGE,\n this.handleViewPropertyChanged_,\n this\n );\n this.viewChangeListenerKey_ = listen(\n view,\n EventType.CHANGE,\n this.handleViewPropertyChanged_,\n this\n );\n\n view.resolveConstraints(0);\n }\n this.render();\n }\n\n /**\n * @private\n */\n handleLayerGroupChanged_() {\n if (this.layerGroupPropertyListenerKeys_) {\n this.layerGroupPropertyListenerKeys_.forEach(unlistenByKey);\n this.layerGroupPropertyListenerKeys_ = null;\n }\n const layerGroup = this.getLayerGroup();\n if (layerGroup) {\n this.handleLayerAdd_(new GroupEvent('addlayer', layerGroup));\n this.layerGroupPropertyListenerKeys_ = [\n listen(layerGroup, ObjectEventType.PROPERTYCHANGE, this.render, this),\n listen(layerGroup, EventType.CHANGE, this.render, this),\n listen(layerGroup, 'addlayer', this.handleLayerAdd_, this),\n listen(layerGroup, 'removelayer', this.handleLayerRemove_, this),\n ];\n }\n this.render();\n }\n\n /**\n * @return {boolean} Is rendered.\n */\n isRendered() {\n return !!this.frameState_;\n }\n\n /**\n * @private\n */\n animationDelay_() {\n this.animationDelayKey_ = undefined;\n this.renderFrame_(Date.now());\n }\n\n /**\n * Requests an immediate render in a synchronous manner.\n * @api\n */\n renderSync() {\n if (this.animationDelayKey_) {\n cancelAnimationFrame(this.animationDelayKey_);\n }\n this.animationDelay_();\n }\n\n /**\n * Redraws all text after new fonts have loaded\n */\n redrawText() {\n const layerStates = this.getLayerGroup().getLayerStatesArray();\n for (let i = 0, ii = layerStates.length; i < ii; ++i) {\n const layer = layerStates[i].layer;\n if (layer.hasRenderer()) {\n layer.getRenderer().handleFontsChanged();\n }\n }\n }\n\n /**\n * Request a map rendering (at the next animation frame).\n * @api\n */\n render() {\n if (this.renderer_ && this.animationDelayKey_ === undefined) {\n this.animationDelayKey_ = requestAnimationFrame(this.animationDelay_);\n }\n }\n\n /**\n * Remove the given control from the map.\n * @param {import(\"./control/Control.js\").default} control Control.\n * @return {import(\"./control/Control.js\").default|undefined} The removed control (or undefined\n * if the control was not found).\n * @api\n */\n removeControl(control) {\n return this.getControls().remove(control);\n }\n\n /**\n * Remove the given interaction from the map.\n * @param {import(\"./interaction/Interaction.js\").default} interaction Interaction to remove.\n * @return {import(\"./interaction/Interaction.js\").default|undefined} The removed interaction (or\n * undefined if the interaction was not found).\n * @api\n */\n removeInteraction(interaction) {\n return this.getInteractions().remove(interaction);\n }\n\n /**\n * Removes the given layer from the map.\n * @param {import(\"./layer/Base.js\").default} layer Layer.\n * @return {import(\"./layer/Base.js\").default|undefined} The removed layer (or undefined if the\n * layer was not found).\n * @api\n */\n removeLayer(layer) {\n const layers = this.getLayerGroup().getLayers();\n return layers.remove(layer);\n }\n\n /**\n * @param {import(\"./layer/Group.js\").GroupEvent} event The layer remove event.\n * @private\n */\n handleLayerRemove_(event) {\n removeLayerMapProperty(event.layer);\n }\n\n /**\n * Remove the given overlay from the map.\n * @param {import(\"./Overlay.js\").default} overlay Overlay.\n * @return {import(\"./Overlay.js\").default|undefined} The removed overlay (or undefined\n * if the overlay was not found).\n * @api\n */\n removeOverlay(overlay) {\n return this.getOverlays().remove(overlay);\n }\n\n /**\n * @param {number} time Time.\n * @private\n */\n renderFrame_(time) {\n const size = this.getSize();\n const view = this.getView();\n const previousFrameState = this.frameState_;\n /** @type {?FrameState} */\n let frameState = null;\n if (size !== undefined && hasArea(size) && view && view.isDef()) {\n const viewHints = view.getHints(\n this.frameState_ ? this.frameState_.viewHints : undefined\n );\n const viewState = view.getState();\n frameState = {\n animate: false,\n coordinateToPixelTransform: this.coordinateToPixelTransform_,\n declutterTree: null,\n extent: getForViewAndSize(\n viewState.center,\n viewState.resolution,\n viewState.rotation,\n size\n ),\n index: this.frameIndex_++,\n layerIndex: 0,\n layerStatesArray: this.getLayerGroup().getLayerStatesArray(),\n pixelRatio: this.pixelRatio_,\n pixelToCoordinateTransform: this.pixelToCoordinateTransform_,\n postRenderFunctions: [],\n size: size,\n tileQueue: this.tileQueue_,\n time: time,\n usedTiles: {},\n viewState: viewState,\n viewHints: viewHints,\n wantedTiles: {},\n mapId: getUid(this),\n renderTargets: {},\n };\n if (viewState.nextCenter && viewState.nextResolution) {\n const rotation = isNaN(viewState.nextRotation)\n ? viewState.rotation\n : viewState.nextRotation;\n\n frameState.nextExtent = getForViewAndSize(\n viewState.nextCenter,\n viewState.nextResolution,\n rotation,\n size\n );\n }\n }\n\n this.frameState_ = frameState;\n this.renderer_.renderFrame(frameState);\n\n if (frameState) {\n if (frameState.animate) {\n this.render();\n }\n Array.prototype.push.apply(\n this.postRenderFunctions_,\n frameState.postRenderFunctions\n );\n\n if (previousFrameState) {\n const moveStart =\n !this.previousExtent_ ||\n (!isEmpty(this.previousExtent_) &&\n !equalsExtent(frameState.extent, this.previousExtent_));\n if (moveStart) {\n this.dispatchEvent(\n new MapEvent(MapEventType.MOVESTART, this, previousFrameState)\n );\n this.previousExtent_ = createOrUpdateEmpty(this.previousExtent_);\n }\n }\n\n const idle =\n this.previousExtent_ &&\n !frameState.viewHints[ViewHint.ANIMATING] &&\n !frameState.viewHints[ViewHint.INTERACTING] &&\n !equalsExtent(frameState.extent, this.previousExtent_);\n\n if (idle) {\n this.dispatchEvent(\n new MapEvent(MapEventType.MOVEEND, this, frameState)\n );\n clone(frameState.extent, this.previousExtent_);\n }\n }\n\n this.dispatchEvent(new MapEvent(MapEventType.POSTRENDER, this, frameState));\n\n this.renderComplete_ =\n this.hasListener(MapEventType.LOADSTART) ||\n this.hasListener(MapEventType.LOADEND) ||\n this.hasListener(RenderEventType.RENDERCOMPLETE)\n ? !this.tileQueue_.getTilesLoading() &&\n !this.tileQueue_.getCount() &&\n !this.getLoadingOrNotReady()\n : undefined;\n\n if (!this.postRenderTimeoutHandle_) {\n this.postRenderTimeoutHandle_ = setTimeout(() => {\n this.postRenderTimeoutHandle_ = undefined;\n this.handlePostRender();\n }, 0);\n }\n }\n\n /**\n * Sets the layergroup of this map.\n * @param {LayerGroup} layerGroup A layer group containing the layers in this map.\n * @observable\n * @api\n */\n setLayerGroup(layerGroup) {\n const oldLayerGroup = this.getLayerGroup();\n if (oldLayerGroup) {\n this.handleLayerRemove_(new GroupEvent('removelayer', oldLayerGroup));\n }\n this.set(MapProperty.LAYERGROUP, layerGroup);\n }\n\n /**\n * Set the size of this map.\n * @param {import(\"./size.js\").Size|undefined} size The size in pixels of the map in the DOM.\n * @observable\n * @api\n */\n setSize(size) {\n this.set(MapProperty.SIZE, size);\n }\n\n /**\n * Set the target element to render this map into.\n * @param {HTMLElement|string} [target] The Element or id of the Element\n * that the map is rendered in.\n * @observable\n * @api\n */\n setTarget(target) {\n this.set(MapProperty.TARGET, target);\n }\n\n /**\n * Set the view for this map.\n * @param {View|Promise} view The view that controls this map.\n * It is also possible to pass a promise that resolves to options for constructing a view. This\n * alternative allows view properties to be resolved by sources or other components that load\n * view-related metadata.\n * @observable\n * @api\n */\n setView(view) {\n if (!view || view instanceof View) {\n this.set(MapProperty.VIEW, view);\n return;\n }\n this.set(MapProperty.VIEW, new View());\n\n const map = this;\n view.then(function (viewOptions) {\n map.setView(new View(viewOptions));\n });\n }\n\n /**\n * Force a recalculation of the map viewport size. This should be called when\n * third-party code changes the size of the map viewport.\n * @api\n */\n updateSize() {\n const targetElement = this.getTargetElement();\n\n let size = undefined;\n if (targetElement) {\n const computedStyle = getComputedStyle(targetElement);\n const width =\n targetElement.offsetWidth -\n parseFloat(computedStyle['borderLeftWidth']) -\n parseFloat(computedStyle['paddingLeft']) -\n parseFloat(computedStyle['paddingRight']) -\n parseFloat(computedStyle['borderRightWidth']);\n const height =\n targetElement.offsetHeight -\n parseFloat(computedStyle['borderTopWidth']) -\n parseFloat(computedStyle['paddingTop']) -\n parseFloat(computedStyle['paddingBottom']) -\n parseFloat(computedStyle['borderBottomWidth']);\n if (!isNaN(width) && !isNaN(height)) {\n size = [width, height];\n if (\n !hasArea(size) &&\n !!(\n targetElement.offsetWidth ||\n targetElement.offsetHeight ||\n targetElement.getClientRects().length\n )\n ) {\n warn(\n \"No map visible because the map container's width or height are 0.\"\n );\n }\n }\n }\n\n const oldSize = this.getSize();\n if (size && (!oldSize || !equals(size, oldSize))) {\n this.setSize(size);\n this.updateViewportSize_();\n }\n }\n\n /**\n * Recomputes the viewport size and save it on the view object (if any)\n * @private\n */\n updateViewportSize_() {\n const view = this.getView();\n if (view) {\n let size = undefined;\n const computedStyle = getComputedStyle(this.viewport_);\n if (computedStyle.width && computedStyle.height) {\n size = [\n parseInt(computedStyle.width, 10),\n parseInt(computedStyle.height, 10),\n ];\n }\n view.setViewportSize(size);\n }\n }\n}\n\n/**\n * @param {MapOptions} options Map options.\n * @return {MapOptionsInternal} Internal map options.\n */\nfunction createOptionsInternal(options) {\n /**\n * @type {HTMLElement|Document}\n */\n let keyboardEventTarget = null;\n if (options.keyboardEventTarget !== undefined) {\n keyboardEventTarget =\n typeof options.keyboardEventTarget === 'string'\n ? document.getElementById(options.keyboardEventTarget)\n : options.keyboardEventTarget;\n }\n\n /**\n * @type {Object}\n */\n const values = {};\n\n const layerGroup =\n options.layers &&\n typeof (/** @type {?} */ (options.layers).getLayers) === 'function'\n ? /** @type {LayerGroup} */ (options.layers)\n : new LayerGroup({\n layers:\n /** @type {Collection|Array} */ (\n options.layers\n ),\n });\n values[MapProperty.LAYERGROUP] = layerGroup;\n\n values[MapProperty.TARGET] = options.target;\n\n values[MapProperty.VIEW] =\n options.view instanceof View ? options.view : new View();\n\n /** @type {Collection} */\n let controls;\n if (options.controls !== undefined) {\n if (Array.isArray(options.controls)) {\n controls = new Collection(options.controls.slice());\n } else {\n assert(\n typeof (/** @type {?} */ (options.controls).getArray) === 'function',\n 47\n ); // Expected `controls` to be an array or an `import(\"./Collection.js\").Collection`\n controls = options.controls;\n }\n }\n\n /** @type {Collection} */\n let interactions;\n if (options.interactions !== undefined) {\n if (Array.isArray(options.interactions)) {\n interactions = new Collection(options.interactions.slice());\n } else {\n assert(\n typeof (/** @type {?} */ (options.interactions).getArray) ===\n 'function',\n 48\n ); // Expected `interactions` to be an array or an `import(\"./Collection.js\").Collection`\n interactions = options.interactions;\n }\n }\n\n /** @type {Collection} */\n let overlays;\n if (options.overlays !== undefined) {\n if (Array.isArray(options.overlays)) {\n overlays = new Collection(options.overlays.slice());\n } else {\n assert(\n typeof (/** @type {?} */ (options.overlays).getArray) === 'function',\n 49\n ); // Expected `overlays` to be an array or an `import(\"./Collection.js\").Collection`\n overlays = options.overlays;\n }\n } else {\n overlays = new Collection();\n }\n\n return {\n controls: controls,\n interactions: interactions,\n keyboardEventTarget: keyboardEventTarget,\n overlays: overlays,\n values: values,\n };\n}\nexport default Map;\n","/**\n * @module ol/Overlay\n */\nimport BaseObject from './Object.js';\nimport MapEventType from './MapEventType.js';\nimport {CLASS_SELECTABLE} from './css.js';\nimport {containsExtent} from './extent.js';\nimport {listen, unlistenByKey} from './events.js';\nimport {outerHeight, outerWidth, removeChildren, removeNode} from './dom.js';\n\n/**\n * @typedef {'bottom-left' | 'bottom-center' | 'bottom-right' | 'center-left' | 'center-center' | 'center-right' | 'top-left' | 'top-center' | 'top-right'} Positioning\n * The overlay position: `'bottom-left'`, `'bottom-center'`, `'bottom-right'`,\n * `'center-left'`, `'center-center'`, `'center-right'`, `'top-left'`,\n * `'top-center'`, or `'top-right'`.\n */\n\n/**\n * @typedef {Object} Options\n * @property {number|string} [id] Set the overlay id. The overlay id can be used\n * with the {@link module:ol/Map~Map#getOverlayById} method.\n * @property {HTMLElement} [element] The overlay element.\n * @property {Array} [offset=[0, 0]] Offsets in pixels used when positioning\n * the overlay. The first element in the\n * array is the horizontal offset. A positive value shifts the overlay right.\n * The second element in the array is the vertical offset. A positive value\n * shifts the overlay down.\n * @property {import(\"./coordinate.js\").Coordinate} [position] The overlay position\n * in map projection.\n * @property {Positioning} [positioning='top-left'] Defines how\n * the overlay is actually positioned with respect to its `position` property.\n * Possible values are `'bottom-left'`, `'bottom-center'`, `'bottom-right'`,\n * `'center-left'`, `'center-center'`, `'center-right'`, `'top-left'`,\n * `'top-center'`, and `'top-right'`.\n * @property {boolean} [stopEvent=true] Whether event propagation to the map\n * viewport should be stopped. If `true` the overlay is placed in the same\n * container as that of the controls (CSS class name\n * `ol-overlaycontainer-stopevent`); if `false` it is placed in the container\n * with CSS class name specified by the `className` property.\n * @property {boolean} [insertFirst=true] Whether the overlay is inserted first\n * in the overlay container, or appended. If the overlay is placed in the same\n * container as that of the controls (see the `stopEvent` option) you will\n * probably set `insertFirst` to `true` so the overlay is displayed below the\n * controls.\n * @property {PanIntoViewOptions|boolean} [autoPan=false] Pan the map when calling\n * `setPosition`, so that the overlay is entirely visible in the current viewport.\n * @property {string} [className='ol-overlay-container ol-selectable'] CSS class\n * name.\n */\n\n/**\n * @typedef {Object} PanOptions\n * @property {number} [duration=1000] The duration of the animation in\n * milliseconds.\n * @property {function(number):number} [easing] The easing function to use. Can\n * be one from {@link module:ol/easing} or a custom function.\n * Default is {@link module:ol/easing.inAndOut}.\n */\n\n/**\n * @typedef {Object} PanIntoViewOptions\n * @property {PanOptions} [animation={}] The animation parameters for the pan\n * @property {number} [margin=20] The margin (in pixels) between the\n * overlay and the borders of the map when panning into view.\n */\n\n/**\n * @enum {string}\n * @protected\n */\nconst Property = {\n ELEMENT: 'element',\n MAP: 'map',\n OFFSET: 'offset',\n POSITION: 'position',\n POSITIONING: 'positioning',\n};\n\n/**\n * @typedef {import(\"./ObjectEventType\").Types|'change:element'|'change:map'|'change:offset'|'change:position'|\n * 'change:positioning'} OverlayObjectEventTypes\n */\n\n/***\n * @template Return\n * @typedef {import(\"./Observable\").OnSignature &\n * import(\"./Observable\").OnSignature &\n * import(\"./Observable\").CombinedOnSignature} OverlayOnSignature\n */\n\n/**\n * @classdesc\n * An element to be displayed over the map and attached to a single map\n * location. Like {@link module:ol/control/Control~Control}, Overlays are\n * visible widgets. Unlike Controls, they are not in a fixed position on the\n * screen, but are tied to a geographical coordinate, so panning the map will\n * move an Overlay but not a Control.\n *\n * Example:\n *\n * import Overlay from 'ol/Overlay.js';\n *\n * // ...\n * const popup = new Overlay({\n * element: document.getElementById('popup'),\n * });\n * popup.setPosition(coordinate);\n * map.addOverlay(popup);\n *\n * @api\n */\nclass Overlay extends BaseObject {\n /**\n * @param {Options} options Overlay options.\n */\n constructor(options) {\n super();\n\n /***\n * @type {OverlayOnSignature}\n */\n this.on;\n\n /***\n * @type {OverlayOnSignature}\n */\n this.once;\n\n /***\n * @type {OverlayOnSignature}\n */\n this.un;\n\n /**\n * @protected\n * @type {Options}\n */\n this.options = options;\n\n /**\n * @protected\n * @type {number|string|undefined}\n */\n this.id = options.id;\n\n /**\n * @protected\n * @type {boolean}\n */\n this.insertFirst =\n options.insertFirst !== undefined ? options.insertFirst : true;\n\n /**\n * @protected\n * @type {boolean}\n */\n this.stopEvent = options.stopEvent !== undefined ? options.stopEvent : true;\n\n /**\n * @protected\n * @type {HTMLElement}\n */\n this.element = document.createElement('div');\n this.element.className =\n options.className !== undefined\n ? options.className\n : 'ol-overlay-container ' + CLASS_SELECTABLE;\n this.element.style.position = 'absolute';\n this.element.style.pointerEvents = 'auto';\n\n /**\n * @protected\n * @type {PanIntoViewOptions|undefined}\n */\n this.autoPan = options.autoPan === true ? {} : options.autoPan || undefined;\n\n /**\n * @protected\n * @type {{transform_: string,\n * visible: boolean}}\n */\n this.rendered = {\n transform_: '',\n visible: true,\n };\n\n /**\n * @protected\n * @type {?import(\"./events.js\").EventsKey}\n */\n this.mapPostrenderListenerKey = null;\n\n this.addChangeListener(Property.ELEMENT, this.handleElementChanged);\n this.addChangeListener(Property.MAP, this.handleMapChanged);\n this.addChangeListener(Property.OFFSET, this.handleOffsetChanged);\n this.addChangeListener(Property.POSITION, this.handlePositionChanged);\n this.addChangeListener(Property.POSITIONING, this.handlePositioningChanged);\n\n if (options.element !== undefined) {\n this.setElement(options.element);\n }\n\n this.setOffset(options.offset !== undefined ? options.offset : [0, 0]);\n\n this.setPositioning(options.positioning || 'top-left');\n\n if (options.position !== undefined) {\n this.setPosition(options.position);\n }\n }\n\n /**\n * Get the DOM element of this overlay.\n * @return {HTMLElement|undefined} The Element containing the overlay.\n * @observable\n * @api\n */\n getElement() {\n return /** @type {HTMLElement|undefined} */ (this.get(Property.ELEMENT));\n }\n\n /**\n * Get the overlay identifier which is set on constructor.\n * @return {number|string|undefined} Id.\n * @api\n */\n getId() {\n return this.id;\n }\n\n /**\n * Get the map associated with this overlay.\n * @return {import(\"./Map.js\").default|null} The map that the\n * overlay is part of.\n * @observable\n * @api\n */\n getMap() {\n return /** @type {import(\"./Map.js\").default|null} */ (\n this.get(Property.MAP) || null\n );\n }\n\n /**\n * Get the offset of this overlay.\n * @return {Array} The offset.\n * @observable\n * @api\n */\n getOffset() {\n return /** @type {Array} */ (this.get(Property.OFFSET));\n }\n\n /**\n * Get the current position of this overlay.\n * @return {import(\"./coordinate.js\").Coordinate|undefined} The spatial point that the overlay is\n * anchored at.\n * @observable\n * @api\n */\n getPosition() {\n return /** @type {import(\"./coordinate.js\").Coordinate|undefined} */ (\n this.get(Property.POSITION)\n );\n }\n\n /**\n * Get the current positioning of this overlay.\n * @return {Positioning} How the overlay is positioned\n * relative to its point on the map.\n * @observable\n * @api\n */\n getPositioning() {\n return /** @type {Positioning} */ (this.get(Property.POSITIONING));\n }\n\n /**\n * @protected\n */\n handleElementChanged() {\n removeChildren(this.element);\n const element = this.getElement();\n if (element) {\n this.element.appendChild(element);\n }\n }\n\n /**\n * @protected\n */\n handleMapChanged() {\n if (this.mapPostrenderListenerKey) {\n removeNode(this.element);\n unlistenByKey(this.mapPostrenderListenerKey);\n this.mapPostrenderListenerKey = null;\n }\n const map = this.getMap();\n if (map) {\n this.mapPostrenderListenerKey = listen(\n map,\n MapEventType.POSTRENDER,\n this.render,\n this\n );\n this.updatePixelPosition();\n const container = this.stopEvent\n ? map.getOverlayContainerStopEvent()\n : map.getOverlayContainer();\n if (this.insertFirst) {\n container.insertBefore(this.element, container.childNodes[0] || null);\n } else {\n container.appendChild(this.element);\n }\n this.performAutoPan();\n }\n }\n\n /**\n * @protected\n */\n render() {\n this.updatePixelPosition();\n }\n\n /**\n * @protected\n */\n handleOffsetChanged() {\n this.updatePixelPosition();\n }\n\n /**\n * @protected\n */\n handlePositionChanged() {\n this.updatePixelPosition();\n this.performAutoPan();\n }\n\n /**\n * @protected\n */\n handlePositioningChanged() {\n this.updatePixelPosition();\n }\n\n /**\n * Set the DOM element to be associated with this overlay.\n * @param {HTMLElement|undefined} element The Element containing the overlay.\n * @observable\n * @api\n */\n setElement(element) {\n this.set(Property.ELEMENT, element);\n }\n\n /**\n * Set the map to be associated with this overlay.\n * @param {import(\"./Map.js\").default|null} map The map that the\n * overlay is part of. Pass `null` to just remove the overlay from the current map.\n * @observable\n * @api\n */\n setMap(map) {\n this.set(Property.MAP, map);\n }\n\n /**\n * Set the offset for this overlay.\n * @param {Array} offset Offset.\n * @observable\n * @api\n */\n setOffset(offset) {\n this.set(Property.OFFSET, offset);\n }\n\n /**\n * Set the position for this overlay. If the position is `undefined` the\n * overlay is hidden.\n * @param {import(\"./coordinate.js\").Coordinate|undefined} position The spatial point that the overlay\n * is anchored at.\n * @observable\n * @api\n */\n setPosition(position) {\n this.set(Property.POSITION, position);\n }\n\n /**\n * Pan the map so that the overlay is entirely visible in the current viewport\n * (if necessary) using the configured autoPan parameters\n * @protected\n */\n performAutoPan() {\n if (this.autoPan) {\n this.panIntoView(this.autoPan);\n }\n }\n\n /**\n * Pan the map so that the overlay is entirely visible in the current viewport\n * (if necessary).\n * @param {PanIntoViewOptions} [panIntoViewOptions] Options for the pan action\n * @api\n */\n panIntoView(panIntoViewOptions) {\n const map = this.getMap();\n\n if (!map || !map.getTargetElement() || !this.get(Property.POSITION)) {\n return;\n }\n\n const mapRect = this.getRect(map.getTargetElement(), map.getSize());\n const element = this.getElement();\n const overlayRect = this.getRect(element, [\n outerWidth(element),\n outerHeight(element),\n ]);\n\n panIntoViewOptions = panIntoViewOptions || {};\n\n const myMargin =\n panIntoViewOptions.margin === undefined ? 20 : panIntoViewOptions.margin;\n if (!containsExtent(mapRect, overlayRect)) {\n // the overlay is not completely inside the viewport, so pan the map\n const offsetLeft = overlayRect[0] - mapRect[0];\n const offsetRight = mapRect[2] - overlayRect[2];\n const offsetTop = overlayRect[1] - mapRect[1];\n const offsetBottom = mapRect[3] - overlayRect[3];\n\n const delta = [0, 0];\n if (offsetLeft < 0) {\n // move map to the left\n delta[0] = offsetLeft - myMargin;\n } else if (offsetRight < 0) {\n // move map to the right\n delta[0] = Math.abs(offsetRight) + myMargin;\n }\n if (offsetTop < 0) {\n // move map up\n delta[1] = offsetTop - myMargin;\n } else if (offsetBottom < 0) {\n // move map down\n delta[1] = Math.abs(offsetBottom) + myMargin;\n }\n\n if (delta[0] !== 0 || delta[1] !== 0) {\n const center = /** @type {import(\"./coordinate.js\").Coordinate} */ (\n map.getView().getCenterInternal()\n );\n const centerPx = map.getPixelFromCoordinateInternal(center);\n if (!centerPx) {\n return;\n }\n const newCenterPx = [centerPx[0] + delta[0], centerPx[1] + delta[1]];\n\n const panOptions = panIntoViewOptions.animation || {};\n map.getView().animateInternal({\n center: map.getCoordinateFromPixelInternal(newCenterPx),\n duration: panOptions.duration,\n easing: panOptions.easing,\n });\n }\n }\n }\n\n /**\n * Get the extent of an element relative to the document\n * @param {HTMLElement} element The element.\n * @param {import(\"./size.js\").Size} size The size of the element.\n * @return {import(\"./extent.js\").Extent} The extent.\n * @protected\n */\n getRect(element, size) {\n const box = element.getBoundingClientRect();\n const offsetX = box.left + window.pageXOffset;\n const offsetY = box.top + window.pageYOffset;\n return [offsetX, offsetY, offsetX + size[0], offsetY + size[1]];\n }\n\n /**\n * Set the positioning for this overlay.\n * @param {Positioning} positioning how the overlay is\n * positioned relative to its point on the map.\n * @observable\n * @api\n */\n setPositioning(positioning) {\n this.set(Property.POSITIONING, positioning);\n }\n\n /**\n * Modify the visibility of the element.\n * @param {boolean} visible Element visibility.\n * @protected\n */\n setVisible(visible) {\n if (this.rendered.visible !== visible) {\n this.element.style.display = visible ? '' : 'none';\n this.rendered.visible = visible;\n }\n }\n\n /**\n * Update pixel position.\n * @protected\n */\n updatePixelPosition() {\n const map = this.getMap();\n const position = this.getPosition();\n if (!map || !map.isRendered() || !position) {\n this.setVisible(false);\n return;\n }\n\n const pixel = map.getPixelFromCoordinate(position);\n const mapSize = map.getSize();\n this.updateRenderedPosition(pixel, mapSize);\n }\n\n /**\n * @param {import(\"./pixel.js\").Pixel} pixel The pixel location.\n * @param {import(\"./size.js\").Size|undefined} mapSize The map size.\n * @protected\n */\n updateRenderedPosition(pixel, mapSize) {\n const style = this.element.style;\n const offset = this.getOffset();\n\n const positioning = this.getPositioning();\n\n this.setVisible(true);\n\n const x = Math.round(pixel[0] + offset[0]) + 'px';\n const y = Math.round(pixel[1] + offset[1]) + 'px';\n let posX = '0%';\n let posY = '0%';\n if (\n positioning == 'bottom-right' ||\n positioning == 'center-right' ||\n positioning == 'top-right'\n ) {\n posX = '-100%';\n } else if (\n positioning == 'bottom-center' ||\n positioning == 'center-center' ||\n positioning == 'top-center'\n ) {\n posX = '-50%';\n }\n if (\n positioning == 'bottom-left' ||\n positioning == 'bottom-center' ||\n positioning == 'bottom-right'\n ) {\n posY = '-100%';\n } else if (\n positioning == 'center-left' ||\n positioning == 'center-center' ||\n positioning == 'center-right'\n ) {\n posY = '-50%';\n }\n const transform = `translate(${posX}, ${posY}) translate(${x}, ${y})`;\n if (this.rendered.transform_ != transform) {\n this.rendered.transform_ = transform;\n style.transform = transform;\n }\n }\n\n /**\n * returns the options this Overlay has been created with\n * @return {Options} overlay options\n */\n getOptions() {\n return this.options;\n }\n}\n\nexport default Overlay;\n","/**\n * @module ol/structs/LRUCache\n */\n\nimport {assert} from '../asserts.js';\n\n/**\n * @typedef {Object} Entry\n * @property {string} key_ Key.\n * @property {Object} newer Newer.\n * @property {Object} older Older.\n * @property {*} value_ Value.\n */\n\n/**\n * @classdesc\n * Implements a Least-Recently-Used cache where the keys do not conflict with\n * Object's properties (e.g. 'hasOwnProperty' is not allowed as a key). Expiring\n * items from the cache is the responsibility of the user.\n *\n * @fires import(\"../events/Event.js\").default\n * @template T\n */\nclass LRUCache {\n /**\n * @param {number} [highWaterMark] High water mark.\n */\n constructor(highWaterMark) {\n /**\n * Desired max cache size after expireCache(). If set to 0, no cache entries\n * will be pruned at all.\n * @type {number}\n */\n this.highWaterMark = highWaterMark !== undefined ? highWaterMark : 2048;\n\n /**\n * @private\n * @type {number}\n */\n this.count_ = 0;\n\n /**\n * @private\n * @type {!Object}\n */\n this.entries_ = {};\n\n /**\n * @private\n * @type {?Entry}\n */\n this.oldest_ = null;\n\n /**\n * @private\n * @type {?Entry}\n */\n this.newest_ = null;\n }\n\n /**\n * @return {boolean} Can expire cache.\n */\n canExpireCache() {\n return this.highWaterMark > 0 && this.getCount() > this.highWaterMark;\n }\n\n /**\n * Expire the cache.\n * @param {!Object} [keep] Keys to keep. To be implemented by subclasses.\n */\n expireCache(keep) {\n while (this.canExpireCache()) {\n this.pop();\n }\n }\n\n /**\n * FIXME empty description for jsdoc\n */\n clear() {\n this.count_ = 0;\n this.entries_ = {};\n this.oldest_ = null;\n this.newest_ = null;\n }\n\n /**\n * @param {string} key Key.\n * @return {boolean} Contains key.\n */\n containsKey(key) {\n return this.entries_.hasOwnProperty(key);\n }\n\n /**\n * @param {function(T, string, LRUCache): ?} f The function\n * to call for every entry from the oldest to the newer. This function takes\n * 3 arguments (the entry value, the entry key and the LRUCache object).\n * The return value is ignored.\n */\n forEach(f) {\n let entry = this.oldest_;\n while (entry) {\n f(entry.value_, entry.key_, this);\n entry = entry.newer;\n }\n }\n\n /**\n * @param {string} key Key.\n * @param {*} [options] Options (reserved for subclasses).\n * @return {T} Value.\n */\n get(key, options) {\n const entry = this.entries_[key];\n assert(entry !== undefined, 15); // Tried to get a value for a key that does not exist in the cache\n if (entry === this.newest_) {\n return entry.value_;\n } else if (entry === this.oldest_) {\n this.oldest_ = /** @type {Entry} */ (this.oldest_.newer);\n this.oldest_.older = null;\n } else {\n entry.newer.older = entry.older;\n entry.older.newer = entry.newer;\n }\n entry.newer = null;\n entry.older = this.newest_;\n this.newest_.newer = entry;\n this.newest_ = entry;\n return entry.value_;\n }\n\n /**\n * Remove an entry from the cache.\n * @param {string} key The entry key.\n * @return {T} The removed entry.\n */\n remove(key) {\n const entry = this.entries_[key];\n assert(entry !== undefined, 15); // Tried to get a value for a key that does not exist in the cache\n if (entry === this.newest_) {\n this.newest_ = /** @type {Entry} */ (entry.older);\n if (this.newest_) {\n this.newest_.newer = null;\n }\n } else if (entry === this.oldest_) {\n this.oldest_ = /** @type {Entry} */ (entry.newer);\n if (this.oldest_) {\n this.oldest_.older = null;\n }\n } else {\n entry.newer.older = entry.older;\n entry.older.newer = entry.newer;\n }\n delete this.entries_[key];\n --this.count_;\n return entry.value_;\n }\n\n /**\n * @return {number} Count.\n */\n getCount() {\n return this.count_;\n }\n\n /**\n * @return {Array} Keys.\n */\n getKeys() {\n const keys = new Array(this.count_);\n let i = 0;\n let entry;\n for (entry = this.newest_; entry; entry = entry.older) {\n keys[i++] = entry.key_;\n }\n return keys;\n }\n\n /**\n * @return {Array} Values.\n */\n getValues() {\n const values = new Array(this.count_);\n let i = 0;\n let entry;\n for (entry = this.newest_; entry; entry = entry.older) {\n values[i++] = entry.value_;\n }\n return values;\n }\n\n /**\n * @return {T} Last value.\n */\n peekLast() {\n return this.oldest_.value_;\n }\n\n /**\n * @return {string} Last key.\n */\n peekLastKey() {\n return this.oldest_.key_;\n }\n\n /**\n * Get the key of the newest item in the cache. Throws if the cache is empty.\n * @return {string} The newest key.\n */\n peekFirstKey() {\n return this.newest_.key_;\n }\n\n /**\n * Return an entry without updating least recently used time.\n * @param {string} key Key.\n * @return {T} Value.\n */\n peek(key) {\n if (!this.containsKey(key)) {\n return undefined;\n }\n return this.entries_[key].value_;\n }\n\n /**\n * @return {T} value Value.\n */\n pop() {\n const entry = this.oldest_;\n delete this.entries_[entry.key_];\n if (entry.newer) {\n entry.newer.older = null;\n }\n this.oldest_ = /** @type {Entry} */ (entry.newer);\n if (!this.oldest_) {\n this.newest_ = null;\n }\n --this.count_;\n return entry.value_;\n }\n\n /**\n * @param {string} key Key.\n * @param {T} value Value.\n */\n replace(key, value) {\n this.get(key); // update `newest_`\n this.entries_[key].value_ = value;\n }\n\n /**\n * @param {string} key Key.\n * @param {T} value Value.\n */\n set(key, value) {\n assert(!(key in this.entries_), 16); // Tried to set a value for a key that is used already\n const entry = {\n key_: key,\n newer: null,\n older: this.newest_,\n value_: value,\n };\n if (!this.newest_) {\n this.oldest_ = entry;\n } else {\n this.newest_.newer = entry;\n }\n this.newest_ = entry;\n this.entries_[key] = entry;\n ++this.count_;\n }\n\n /**\n * Set a maximum number of entries for the cache.\n * @param {number} size Cache size.\n * @api\n */\n setSize(size) {\n this.highWaterMark = size;\n }\n}\n\nexport default LRUCache;\n","/**\n * @module ol/tilecoord\n */\n\n/**\n * An array of three numbers representing the location of a tile in a tile\n * grid. The order is `z` (zoom level), `x` (column), and `y` (row).\n * @typedef {Array} TileCoord\n * @api\n */\n\n/**\n * @param {number} z Z.\n * @param {number} x X.\n * @param {number} y Y.\n * @param {TileCoord} [tileCoord] Tile coordinate.\n * @return {TileCoord} Tile coordinate.\n */\nexport function createOrUpdate(z, x, y, tileCoord) {\n if (tileCoord !== undefined) {\n tileCoord[0] = z;\n tileCoord[1] = x;\n tileCoord[2] = y;\n return tileCoord;\n }\n return [z, x, y];\n}\n\n/**\n * @param {number} z Z.\n * @param {number} x X.\n * @param {number} y Y.\n * @return {string} Key.\n */\nexport function getKeyZXY(z, x, y) {\n return z + '/' + x + '/' + y;\n}\n\n/**\n * Get the key for a tile coord.\n * @param {TileCoord} tileCoord The tile coord.\n * @return {string} Key.\n */\nexport function getKey(tileCoord) {\n return getKeyZXY(tileCoord[0], tileCoord[1], tileCoord[2]);\n}\n\n/**\n * Get the tile cache key for a tile key obtained through `tile.getKey()`.\n * @param {string} tileKey The tile key.\n * @return {string} The cache key.\n */\nexport function getCacheKeyForTileKey(tileKey) {\n const [z, x, y] = tileKey\n .substring(tileKey.lastIndexOf('/') + 1, tileKey.length)\n .split(',')\n .map(Number);\n return getKeyZXY(z, x, y);\n}\n\n/**\n * Get a tile coord given a key.\n * @param {string} key The tile coord key.\n * @return {TileCoord} The tile coord.\n */\nexport function fromKey(key) {\n return key.split('/').map(Number);\n}\n\n/**\n * @param {TileCoord} tileCoord Tile coord.\n * @return {number} Hash.\n */\nexport function hash(tileCoord) {\n return (tileCoord[1] << tileCoord[0]) + tileCoord[2];\n}\n\n/**\n * @param {TileCoord} tileCoord Tile coordinate.\n * @param {!import(\"./tilegrid/TileGrid.js\").default} tileGrid Tile grid.\n * @return {boolean} Tile coordinate is within extent and zoom level range.\n */\nexport function withinExtentAndZ(tileCoord, tileGrid) {\n const z = tileCoord[0];\n const x = tileCoord[1];\n const y = tileCoord[2];\n\n if (tileGrid.getMinZoom() > z || z > tileGrid.getMaxZoom()) {\n return false;\n }\n const tileRange = tileGrid.getFullTileRange(z);\n if (!tileRange) {\n return true;\n }\n return tileRange.containsXY(x, y);\n}\n","/**\n * @module ol/TileCache\n */\nimport LRUCache from './structs/LRUCache.js';\nimport {fromKey, getKey} from './tilecoord.js';\n\nclass TileCache extends LRUCache {\n clear() {\n while (this.getCount() > 0) {\n this.pop().release();\n }\n super.clear();\n }\n\n /**\n * @param {!Object} usedTiles Used tiles.\n */\n expireCache(usedTiles) {\n while (this.canExpireCache()) {\n const tile = this.peekLast();\n if (tile.getKey() in usedTiles) {\n break;\n } else {\n this.pop().release();\n }\n }\n }\n\n /**\n * Prune all tiles from the cache that don't have the same z as the newest tile.\n */\n pruneExceptNewestZ() {\n if (this.getCount() === 0) {\n return;\n }\n const key = this.peekFirstKey();\n const tileCoord = fromKey(key);\n const z = tileCoord[0];\n this.forEach((tile) => {\n if (tile.tileCoord[0] !== z) {\n this.remove(getKey(tile.tileCoord));\n tile.release();\n }\n });\n }\n}\n\nexport default TileCache;\n","/**\n * @module ol/TileRange\n */\n\n/**\n * A representation of a contiguous block of tiles. A tile range is specified\n * by its min/max tile coordinates and is inclusive of coordinates.\n */\nclass TileRange {\n /**\n * @param {number} minX Minimum X.\n * @param {number} maxX Maximum X.\n * @param {number} minY Minimum Y.\n * @param {number} maxY Maximum Y.\n */\n constructor(minX, maxX, minY, maxY) {\n /**\n * @type {number}\n */\n this.minX = minX;\n\n /**\n * @type {number}\n */\n this.maxX = maxX;\n\n /**\n * @type {number}\n */\n this.minY = minY;\n\n /**\n * @type {number}\n */\n this.maxY = maxY;\n }\n\n /**\n * @param {import(\"./tilecoord.js\").TileCoord} tileCoord Tile coordinate.\n * @return {boolean} Contains tile coordinate.\n */\n contains(tileCoord) {\n return this.containsXY(tileCoord[1], tileCoord[2]);\n }\n\n /**\n * @param {TileRange} tileRange Tile range.\n * @return {boolean} Contains.\n */\n containsTileRange(tileRange) {\n return (\n this.minX <= tileRange.minX &&\n tileRange.maxX <= this.maxX &&\n this.minY <= tileRange.minY &&\n tileRange.maxY <= this.maxY\n );\n }\n\n /**\n * @param {number} x Tile coordinate x.\n * @param {number} y Tile coordinate y.\n * @return {boolean} Contains coordinate.\n */\n containsXY(x, y) {\n return this.minX <= x && x <= this.maxX && this.minY <= y && y <= this.maxY;\n }\n\n /**\n * @param {TileRange} tileRange Tile range.\n * @return {boolean} Equals.\n */\n equals(tileRange) {\n return (\n this.minX == tileRange.minX &&\n this.minY == tileRange.minY &&\n this.maxX == tileRange.maxX &&\n this.maxY == tileRange.maxY\n );\n }\n\n /**\n * @param {TileRange} tileRange Tile range.\n */\n extend(tileRange) {\n if (tileRange.minX < this.minX) {\n this.minX = tileRange.minX;\n }\n if (tileRange.maxX > this.maxX) {\n this.maxX = tileRange.maxX;\n }\n if (tileRange.minY < this.minY) {\n this.minY = tileRange.minY;\n }\n if (tileRange.maxY > this.maxY) {\n this.maxY = tileRange.maxY;\n }\n }\n\n /**\n * @return {number} Height.\n */\n getHeight() {\n return this.maxY - this.minY + 1;\n }\n\n /**\n * @return {import(\"./size.js\").Size} Size.\n */\n getSize() {\n return [this.getWidth(), this.getHeight()];\n }\n\n /**\n * @return {number} Width.\n */\n getWidth() {\n return this.maxX - this.minX + 1;\n }\n\n /**\n * @param {TileRange} tileRange Tile range.\n * @return {boolean} Intersects.\n */\n intersects(tileRange) {\n return (\n this.minX <= tileRange.maxX &&\n this.maxX >= tileRange.minX &&\n this.minY <= tileRange.maxY &&\n this.maxY >= tileRange.minY\n );\n }\n}\n\n/**\n * @param {number} minX Minimum X.\n * @param {number} maxX Maximum X.\n * @param {number} minY Minimum Y.\n * @param {number} maxY Maximum Y.\n * @param {TileRange} [tileRange] TileRange.\n * @return {TileRange} Tile range.\n */\nexport function createOrUpdate(minX, maxX, minY, maxY, tileRange) {\n if (tileRange !== undefined) {\n tileRange.minX = minX;\n tileRange.maxX = maxX;\n tileRange.minY = minY;\n tileRange.maxY = maxY;\n return tileRange;\n }\n return new TileRange(minX, maxX, minY, maxY);\n}\n\nexport default TileRange;\n","/**\n * @module ol/VectorRenderTile\n */\nimport Tile from './Tile.js';\nimport {createCanvasContext2D, releaseCanvas} from './dom.js';\nimport {getUid} from './util.js';\n\n/**\n * @typedef {Object} ReplayState\n * @property {boolean} dirty Dirty.\n * @property {null|import(\"./render.js\").OrderFunction} renderedRenderOrder RenderedRenderOrder.\n * @property {number} renderedTileRevision RenderedTileRevision.\n * @property {number} renderedResolution RenderedResolution.\n * @property {number} renderedRevision RenderedRevision.\n * @property {number} renderedTileResolution RenderedTileResolution.\n * @property {number} renderedTileZ RenderedTileZ.\n */\n\n/**\n * @type {Array}\n */\nconst canvasPool = [];\n\nclass VectorRenderTile extends Tile {\n /**\n * @param {import(\"./tilecoord.js\").TileCoord} tileCoord Tile coordinate.\n * @param {import(\"./TileState.js\").default} state State.\n * @param {import(\"./tilecoord.js\").TileCoord} urlTileCoord Wrapped tile coordinate for source urls.\n * @param {function(VectorRenderTile):Array} getSourceTiles Function\n * to get source tiles for this tile.\n */\n constructor(tileCoord, state, urlTileCoord, getSourceTiles) {\n super(tileCoord, state, {transition: 0});\n\n /**\n * @private\n * @type {!Object}\n */\n this.context_ = {};\n\n /**\n * Executor groups by layer uid. Entries are read/written by the renderer.\n * @type {Object>}\n */\n this.executorGroups = {};\n\n /**\n * Executor groups for decluttering, by layer uid. Entries are read/written by the renderer.\n * @type {Object>}\n */\n this.declutterExecutorGroups = {};\n\n /**\n * Number of loading source tiles. Read/written by the source.\n * @type {number}\n */\n this.loadingSourceTiles = 0;\n\n /**\n * @type {Object}\n */\n this.hitDetectionImageData = {};\n\n /**\n * @private\n * @type {!Object}\n */\n this.replayState_ = {};\n\n /**\n * @type {Array}\n */\n this.sourceTiles = [];\n\n /**\n * @type {Object}\n */\n this.errorTileKeys = {};\n\n /**\n * @type {number}\n */\n this.wantedResolution;\n\n /**\n * @type {!function():Array}\n */\n this.getSourceTiles = getSourceTiles.bind(undefined, this);\n\n /**\n * @type {import(\"./tilecoord.js\").TileCoord}\n */\n this.wrappedTileCoord = urlTileCoord;\n }\n\n /**\n * @param {import(\"./layer/Layer.js\").default} layer Layer.\n * @return {CanvasRenderingContext2D} The rendering context.\n */\n getContext(layer) {\n const key = getUid(layer);\n if (!(key in this.context_)) {\n this.context_[key] = createCanvasContext2D(1, 1, canvasPool);\n }\n return this.context_[key];\n }\n\n /**\n * @param {import(\"./layer/Layer.js\").default} layer Layer.\n * @return {boolean} Tile has a rendering context for the given layer.\n */\n hasContext(layer) {\n return getUid(layer) in this.context_;\n }\n\n /**\n * Get the Canvas for this tile.\n * @param {import(\"./layer/Layer.js\").default} layer Layer.\n * @return {HTMLCanvasElement} Canvas.\n */\n getImage(layer) {\n return this.hasContext(layer) ? this.getContext(layer).canvas : null;\n }\n\n /**\n * @param {import(\"./layer/Layer.js\").default} layer Layer.\n * @return {ReplayState} The replay state.\n */\n getReplayState(layer) {\n const key = getUid(layer);\n if (!(key in this.replayState_)) {\n this.replayState_[key] = {\n dirty: false,\n renderedRenderOrder: null,\n renderedResolution: NaN,\n renderedRevision: -1,\n renderedTileResolution: NaN,\n renderedTileRevision: -1,\n renderedTileZ: -1,\n };\n }\n return this.replayState_[key];\n }\n\n /**\n * Load the tile.\n */\n load() {\n this.getSourceTiles();\n }\n\n /**\n * Remove from the cache due to expiry\n */\n release() {\n for (const key in this.context_) {\n const context = this.context_[key];\n releaseCanvas(context);\n canvasPool.push(context.canvas);\n delete this.context_[key];\n }\n super.release();\n }\n}\n\nexport default VectorRenderTile;\n","/**\n * @module ol/VectorTile\n */\nimport Tile from './Tile.js';\nimport TileState from './TileState.js';\n\nclass VectorTile extends Tile {\n /**\n * @param {import(\"./tilecoord.js\").TileCoord} tileCoord Tile coordinate.\n * @param {import(\"./TileState.js\").default} state State.\n * @param {string} src Data source url.\n * @param {import(\"./format/Feature.js\").default} format Feature format.\n * @param {import(\"./Tile.js\").LoadFunction} tileLoadFunction Tile load function.\n * @param {import(\"./Tile.js\").Options} [options] Tile options.\n */\n constructor(tileCoord, state, src, format, tileLoadFunction, options) {\n super(tileCoord, state, options);\n\n /**\n * Extent of this tile; set by the source.\n * @type {import(\"./extent.js\").Extent}\n */\n this.extent = null;\n\n /**\n * @private\n * @type {import(\"./format/Feature.js\").default}\n */\n this.format_ = format;\n\n /**\n * @private\n * @type {Array}\n */\n this.features_ = null;\n\n /**\n * @private\n * @type {import(\"./featureloader.js\").FeatureLoader}\n */\n this.loader_;\n\n /**\n * Feature projection of this tile; set by the source.\n * @type {import(\"./proj/Projection.js\").default}\n */\n this.projection = null;\n\n /**\n * Resolution of this tile; set by the source.\n * @type {number}\n */\n this.resolution;\n\n /**\n * @private\n * @type {import(\"./Tile.js\").LoadFunction}\n */\n this.tileLoadFunction_ = tileLoadFunction;\n\n /**\n * @private\n * @type {string}\n */\n this.url_ = src;\n\n this.key = src;\n }\n\n /**\n * Get the feature format assigned for reading this tile's features.\n * @return {import(\"./format/Feature.js\").default} Feature format.\n * @api\n */\n getFormat() {\n return this.format_;\n }\n\n /**\n * Get the features for this tile. Geometries will be in the view projection.\n * @return {Array} Features.\n * @api\n */\n getFeatures() {\n return this.features_;\n }\n\n /**\n * Load not yet loaded URI.\n */\n load() {\n if (this.state == TileState.IDLE) {\n this.setState(TileState.LOADING);\n this.tileLoadFunction_(this, this.url_);\n if (this.loader_) {\n this.loader_(this.extent, this.resolution, this.projection);\n }\n }\n }\n\n /**\n * Handler for successful tile load.\n * @param {Array} features The loaded features.\n * @param {import(\"./proj/Projection.js\").default} dataProjection Data projection.\n */\n onLoad(features, dataProjection) {\n this.setFeatures(features);\n }\n\n /**\n * Handler for tile load errors.\n */\n onError() {\n this.setState(TileState.ERROR);\n }\n\n /**\n * Function for use in an {@link module:ol/source/VectorTile~VectorTile}'s `tileLoadFunction`.\n * Sets the features for the tile.\n * @param {Array} features Features.\n * @api\n */\n setFeatures(features) {\n this.features_ = features;\n this.setState(TileState.LOADED);\n }\n\n /**\n * Set the feature loader for reading this tile's features.\n * @param {import(\"./featureloader.js\").FeatureLoader} loader Feature loader.\n * @api\n */\n setLoader(loader) {\n this.loader_ = loader;\n }\n}\n\nexport default VectorTile;\n","/**\n * @module ol/colorlike\n */\nimport {toString} from './color.js';\n\n/**\n * A type accepted by CanvasRenderingContext2D.fillStyle\n * or CanvasRenderingContext2D.strokeStyle.\n * Represents a color, pattern, or gradient. The origin for patterns and\n * gradients as fill style is an increment of 512 css pixels from map coordinate\n * `[0, 0]`. For seamless repeat patterns, width and height of the pattern image\n * must be a factor of two (2, 4, 8, ..., 512).\n *\n * @typedef {string|CanvasPattern|CanvasGradient} ColorLike\n * @api\n */\n\n/**\n * @param {import(\"./color.js\").Color|ColorLike} color Color.\n * @return {ColorLike} The color as an {@link ol/colorlike~ColorLike}.\n * @api\n */\nexport function asColorLike(color) {\n if (Array.isArray(color)) {\n return toString(color);\n }\n return color;\n}\n","/**\n * @module ol/featureloader\n */\nimport {VOID} from './functions.js';\n\n/**\n *\n * @type {boolean}\n * @private\n */\nlet withCredentials = false;\n\n/**\n * {@link module:ol/source/Vector~VectorSource} sources use a function of this type to\n * load features.\n *\n * This function takes up to 5 arguments. These are an {@link module:ol/extent~Extent} representing\n * the area to be loaded, a `{number}` representing the resolution (map units per pixel), an\n * {@link module:ol/proj/Projection~Projection} for the projection, an optional success callback that should get\n * the loaded features passed as an argument and an optional failure callback with no arguments. If\n * the callbacks are not used, the corresponding vector source will not fire `'featuresloadend'` and\n * `'featuresloaderror'` events. `this` within the function is bound to the\n * {@link module:ol/source/Vector~VectorSource} it's called from.\n *\n * The function is responsible for loading the features and adding them to the\n * source.\n * @typedef {function(this:(import(\"./source/Vector\").default|import(\"./VectorTile.js\").default),\n * import(\"./extent.js\").Extent,\n * number,\n * import(\"./proj/Projection.js\").default,\n * function(Array): void=,\n * function(): void=): void} FeatureLoader\n * @api\n */\n\n/**\n * {@link module:ol/source/Vector~VectorSource} sources use a function of this type to\n * get the url to load features from.\n *\n * This function takes an {@link module:ol/extent~Extent} representing the area\n * to be loaded, a `{number}` representing the resolution (map units per pixel)\n * and an {@link module:ol/proj/Projection~Projection} for the projection as\n * arguments and returns a `{string}` representing the URL.\n * @typedef {function(import(\"./extent.js\").Extent, number, import(\"./proj/Projection.js\").default): string} FeatureUrlFunction\n * @api\n */\n\n/**\n * @param {string|FeatureUrlFunction} url Feature URL service.\n * @param {import(\"./format/Feature.js\").default} format Feature format.\n * @param {import(\"./extent.js\").Extent} extent Extent.\n * @param {number} resolution Resolution.\n * @param {import(\"./proj/Projection.js\").default} projection Projection.\n * @param {function(Array, import(\"./proj/Projection.js\").default): void} success Success\n * Function called with the loaded features and optionally with the data projection.\n * @param {function(): void} failure Failure\n * Function called when loading failed.\n */\nexport function loadFeaturesXhr(\n url,\n format,\n extent,\n resolution,\n projection,\n success,\n failure\n) {\n const xhr = new XMLHttpRequest();\n xhr.open(\n 'GET',\n typeof url === 'function' ? url(extent, resolution, projection) : url,\n true\n );\n if (format.getType() == 'arraybuffer') {\n xhr.responseType = 'arraybuffer';\n }\n xhr.withCredentials = withCredentials;\n /**\n * @param {Event} event Event.\n * @private\n */\n xhr.onload = function (event) {\n // status will be 0 for file:// urls\n if (!xhr.status || (xhr.status >= 200 && xhr.status < 300)) {\n const type = format.getType();\n /** @type {Document|Node|Object|string|undefined} */\n let source;\n if (type == 'json' || type == 'text') {\n source = xhr.responseText;\n } else if (type == 'xml') {\n source = xhr.responseXML;\n if (!source) {\n source = new DOMParser().parseFromString(\n xhr.responseText,\n 'application/xml'\n );\n }\n } else if (type == 'arraybuffer') {\n source = /** @type {ArrayBuffer} */ (xhr.response);\n }\n if (source) {\n success(\n /** @type {Array} */\n (\n format.readFeatures(source, {\n extent: extent,\n featureProjection: projection,\n })\n ),\n format.readProjection(source)\n );\n } else {\n failure();\n }\n } else {\n failure();\n }\n };\n /**\n * @private\n */\n xhr.onerror = failure;\n xhr.send();\n}\n\n/**\n * Create an XHR feature loader for a `url` and `format`. The feature loader\n * loads features (with XHR), parses the features, and adds them to the\n * vector source.\n * @param {string|FeatureUrlFunction} url Feature URL service.\n * @param {import(\"./format/Feature.js\").default} format Feature format.\n * @return {FeatureLoader} The feature loader.\n * @api\n */\nexport function xhr(url, format) {\n /**\n * @param {import(\"./extent.js\").Extent} extent Extent.\n * @param {number} resolution Resolution.\n * @param {import(\"./proj/Projection.js\").default} projection Projection.\n * @param {function(Array): void} [success] Success\n * Function called when loading succeeded.\n * @param {function(): void} [failure] Failure\n * Function called when loading failed.\n */\n return function (extent, resolution, projection, success, failure) {\n const source = /** @type {import(\"./source/Vector\").default} */ (this);\n loadFeaturesXhr(\n url,\n format,\n extent,\n resolution,\n projection,\n /**\n * @param {Array} features The loaded features.\n * @param {import(\"./proj/Projection.js\").default} dataProjection Data\n * projection.\n */\n function (features, dataProjection) {\n source.addFeatures(features);\n if (success !== undefined) {\n success(features);\n }\n },\n /* FIXME handle error */ failure ? failure : VOID\n );\n };\n}\n\n/**\n * Setter for the withCredentials configuration for the XHR.\n *\n * @param {boolean} xhrWithCredentials The value of withCredentials to set.\n * Compare https://developer.mozilla.org/en-US/docs/Web/API/XMLHttpRequest/\n * @api\n */\nexport function setWithCredentials(xhrWithCredentials) {\n withCredentials = xhrWithCredentials;\n}\n","/**\n * @module ol/net\n */\nimport {getUid} from './util.js';\n\n/**\n * Simple JSONP helper. Supports error callbacks and a custom callback param.\n * The error callback will be called when no JSONP is executed after 10 seconds.\n *\n * @param {string} url Request url. A 'callback' query parameter will be\n * appended.\n * @param {Function} callback Callback on success.\n * @param {Function} [errback] Callback on error.\n * @param {string} [callbackParam] Custom query parameter for the JSONP\n * callback. Default is 'callback'.\n */\nexport function jsonp(url, callback, errback, callbackParam) {\n const script = document.createElement('script');\n const key = 'olc_' + getUid(callback);\n function cleanup() {\n delete window[key];\n script.parentNode.removeChild(script);\n }\n script.async = true;\n script.src =\n url +\n (url.includes('?') ? '&' : '?') +\n (callbackParam || 'callback') +\n '=' +\n key;\n const timer = setTimeout(function () {\n cleanup();\n if (errback) {\n errback();\n }\n }, 10000);\n window[key] = function (data) {\n clearTimeout(timer);\n cleanup();\n callback(data);\n };\n document.head.appendChild(script);\n}\n\nexport class ResponseError extends Error {\n /**\n * @param {XMLHttpRequest} response The XHR object.\n */\n constructor(response) {\n const message = 'Unexpected response status: ' + response.status;\n super(message);\n\n /**\n * @type {string}\n */\n this.name = 'ResponseError';\n\n /**\n * @type {XMLHttpRequest}\n */\n this.response = response;\n }\n}\n\nexport class ClientError extends Error {\n /**\n * @param {XMLHttpRequest} client The XHR object.\n */\n constructor(client) {\n super('Failed to issue request');\n\n /**\n * @type {string}\n */\n this.name = 'ClientError';\n\n /**\n * @type {XMLHttpRequest}\n */\n this.client = client;\n }\n}\n\n/**\n * @param {string} url The URL.\n * @return {Promise} A promise that resolves to the JSON response.\n */\nexport function getJSON(url) {\n return new Promise(function (resolve, reject) {\n /**\n * @param {ProgressEvent} event The load event.\n */\n function onLoad(event) {\n const client = event.target;\n // status will be 0 for file:// urls\n if (!client.status || (client.status >= 200 && client.status < 300)) {\n let data;\n try {\n data = JSON.parse(client.responseText);\n } catch (err) {\n const message = 'Error parsing response text as JSON: ' + err.message;\n reject(new Error(message));\n return;\n }\n resolve(data);\n return;\n }\n\n reject(new ResponseError(client));\n }\n\n /**\n * @param {ProgressEvent} event The error event.\n */\n function onError(event) {\n reject(new ClientError(event.target));\n }\n\n const client = new XMLHttpRequest();\n client.addEventListener('load', onLoad);\n client.addEventListener('error', onError);\n client.open('GET', url);\n client.setRequestHeader('Accept', 'application/json');\n client.send();\n });\n}\n\n/**\n * @param {string} base The base URL.\n * @param {string} url The potentially relative URL.\n * @return {string} The full URL.\n */\nexport function resolveUrl(base, url) {\n if (url.includes('://')) {\n return url;\n }\n return new URL(url, base).href;\n}\n\nlet originalXHR;\nexport function overrideXHR(xhr) {\n if (typeof XMLHttpRequest !== 'undefined') {\n originalXHR = XMLHttpRequest;\n }\n global.XMLHttpRequest = xhr;\n}\n\nexport function restoreXHR() {\n global.XMLHttpRequest = originalXHR;\n}\n","/**\n * @module ol/loadingstrategy\n */\n\nimport {fromUserExtent, fromUserResolution, toUserExtent} from './proj.js';\n\n/**\n * Strategy function for loading all features with a single request.\n * @param {import(\"./extent.js\").Extent} extent Extent.\n * @param {number} resolution Resolution.\n * @return {Array} Extents.\n * @api\n */\nexport function all(extent, resolution) {\n return [[-Infinity, -Infinity, Infinity, Infinity]];\n}\n\n/**\n * Strategy function for loading features based on the view's extent and\n * resolution.\n * @param {import(\"./extent.js\").Extent} extent Extent.\n * @param {number} resolution Resolution.\n * @return {Array} Extents.\n * @api\n */\nexport function bbox(extent, resolution) {\n return [extent];\n}\n\n/**\n * Creates a strategy function for loading features based on a tile grid.\n * @param {import(\"./tilegrid/TileGrid.js\").default} tileGrid Tile grid.\n * @return {function(import(\"./extent.js\").Extent, number, import(\"./proj.js\").Projection): Array} Loading strategy.\n * @api\n */\nexport function tile(tileGrid) {\n return (\n /**\n * @param {import(\"./extent.js\").Extent} extent Extent.\n * @param {number} resolution Resolution.\n * @param {import(\"./proj.js\").Projection} projection Projection.\n * @return {Array} Extents.\n */\n function (extent, resolution, projection) {\n const z = tileGrid.getZForResolution(\n fromUserResolution(resolution, projection)\n );\n const tileRange = tileGrid.getTileRangeForExtentAndZ(\n fromUserExtent(extent, projection),\n z\n );\n /** @type {Array} */\n const extents = [];\n /** @type {import(\"./tilecoord.js\").TileCoord} */\n const tileCoord = [z, 0, 0];\n for (\n tileCoord[1] = tileRange.minX;\n tileCoord[1] <= tileRange.maxX;\n ++tileCoord[1]\n ) {\n for (\n tileCoord[2] = tileRange.minY;\n tileCoord[2] <= tileRange.maxY;\n ++tileCoord[2]\n ) {\n extents.push(\n toUserExtent(tileGrid.getTileCoordExtent(tileCoord), projection)\n );\n }\n }\n return extents;\n }\n );\n}\n","/**\n * @module ol/render/VectorContext\n */\n\n/**\n * @classdesc\n * Context for drawing geometries. A vector context is available on render\n * events and does not need to be constructed directly.\n * @api\n */\nclass VectorContext {\n /**\n * Render a geometry with a custom renderer.\n *\n * @param {import(\"../geom/SimpleGeometry.js\").default} geometry Geometry.\n * @param {import(\"../Feature.js\").FeatureLike} feature Feature.\n * @param {Function} renderer Renderer.\n * @param {Function} hitDetectionRenderer Renderer.\n */\n drawCustom(geometry, feature, renderer, hitDetectionRenderer) {}\n\n /**\n * Render a geometry.\n *\n * @param {import(\"../geom/Geometry.js\").default} geometry The geometry to render.\n */\n drawGeometry(geometry) {}\n\n /**\n * Set the rendering style.\n *\n * @param {import(\"../style/Style.js\").default} style The rendering style.\n */\n setStyle(style) {}\n\n /**\n * @param {import(\"../geom/Circle.js\").default} circleGeometry Circle geometry.\n * @param {import(\"../Feature.js\").default} feature Feature.\n */\n drawCircle(circleGeometry, feature) {}\n\n /**\n * @param {import(\"../Feature.js\").default} feature Feature.\n * @param {import(\"../style/Style.js\").default} style Style.\n */\n drawFeature(feature, style) {}\n\n /**\n * @param {import(\"../geom/GeometryCollection.js\").default} geometryCollectionGeometry Geometry collection.\n * @param {import(\"../Feature.js\").default} feature Feature.\n */\n drawGeometryCollection(geometryCollectionGeometry, feature) {}\n\n /**\n * @param {import(\"../geom/LineString.js\").default|import(\"./Feature.js\").default} lineStringGeometry Line string geometry.\n * @param {import(\"../Feature.js\").FeatureLike} feature Feature.\n */\n drawLineString(lineStringGeometry, feature) {}\n\n /**\n * @param {import(\"../geom/MultiLineString.js\").default|import(\"./Feature.js\").default} multiLineStringGeometry MultiLineString geometry.\n * @param {import(\"../Feature.js\").FeatureLike} feature Feature.\n */\n drawMultiLineString(multiLineStringGeometry, feature) {}\n\n /**\n * @param {import(\"../geom/MultiPoint.js\").default|import(\"./Feature.js\").default} multiPointGeometry MultiPoint geometry.\n * @param {import(\"../Feature.js\").FeatureLike} feature Feature.\n */\n drawMultiPoint(multiPointGeometry, feature) {}\n\n /**\n * @param {import(\"../geom/MultiPolygon.js\").default} multiPolygonGeometry MultiPolygon geometry.\n * @param {import(\"../Feature.js\").FeatureLike} feature Feature.\n */\n drawMultiPolygon(multiPolygonGeometry, feature) {}\n\n /**\n * @param {import(\"../geom/Point.js\").default|import(\"./Feature.js\").default} pointGeometry Point geometry.\n * @param {import(\"../Feature.js\").FeatureLike} feature Feature.\n */\n drawPoint(pointGeometry, feature) {}\n\n /**\n * @param {import(\"../geom/Polygon.js\").default|import(\"./Feature.js\").default} polygonGeometry Polygon geometry.\n * @param {import(\"../Feature.js\").FeatureLike} feature Feature.\n */\n drawPolygon(polygonGeometry, feature) {}\n\n /**\n * @param {import(\"../geom/SimpleGeometry.js\").default|import(\"./Feature.js\").default} geometry Geometry.\n * @param {import(\"../Feature.js\").FeatureLike} feature Feature.\n */\n drawText(geometry, feature) {}\n\n /**\n * @param {import(\"../style/Fill.js\").default} fillStyle Fill style.\n * @param {import(\"../style/Stroke.js\").default} strokeStyle Stroke style.\n */\n setFillStrokeStyle(fillStyle, strokeStyle) {}\n\n /**\n * @param {import(\"../style/Image.js\").default} imageStyle Image style.\n * @param {import(\"../render/canvas.js\").DeclutterImageWithText} [declutterImageWithText] Shared data for combined decluttering with a text style.\n */\n setImageStyle(imageStyle, declutterImageWithText) {}\n\n /**\n * @param {import(\"../style/Text.js\").default} textStyle Text style.\n * @param {import(\"../render/canvas.js\").DeclutterImageWithText} [declutterImageWithText] Shared data for combined decluttering with an image style.\n */\n setTextStyle(textStyle, declutterImageWithText) {}\n}\n\nexport default VectorContext;\n","/**\n * @module ol/render/canvas/Immediate\n */\n// FIXME test, especially polygons with holes and multipolygons\n// FIXME need to handle large thick features (where pixel size matters)\n// FIXME add offset and end to ol/geom/flat/transform~transform2D?\n\nimport VectorContext from '../VectorContext.js';\nimport {asColorLike} from '../../colorlike.js';\nimport {\n compose as composeTransform,\n create as createTransform,\n} from '../../transform.js';\nimport {\n defaultFillStyle,\n defaultFont,\n defaultLineCap,\n defaultLineDash,\n defaultLineDashOffset,\n defaultLineJoin,\n defaultLineWidth,\n defaultMiterLimit,\n defaultStrokeStyle,\n defaultTextAlign,\n defaultTextBaseline,\n} from '../canvas.js';\nimport {equals} from '../../array.js';\nimport {intersects} from '../../extent.js';\nimport {toFixed} from '../../math.js';\nimport {transform2D} from '../../geom/flat/transform.js';\nimport {transformGeom2D} from '../../geom/SimpleGeometry.js';\n\n/**\n * @classdesc\n * A concrete subclass of {@link module:ol/render/VectorContext~VectorContext} that implements\n * direct rendering of features and geometries to an HTML5 Canvas context.\n * Instances of this class are created internally by the library and\n * provided to application code as vectorContext member of the\n * {@link module:ol/render/Event~RenderEvent} object associated with postcompose, precompose and\n * render events emitted by layers and maps.\n */\nclass CanvasImmediateRenderer extends VectorContext {\n /**\n * @param {CanvasRenderingContext2D} context Context.\n * @param {number} pixelRatio Pixel ratio.\n * @param {import(\"../../extent.js\").Extent} extent Extent.\n * @param {import(\"../../transform.js\").Transform} transform Transform.\n * @param {number} viewRotation View rotation.\n * @param {number} [squaredTolerance] Optional squared tolerance for simplification.\n * @param {import(\"../../proj.js\").TransformFunction} [userTransform] Transform from user to view projection.\n */\n constructor(\n context,\n pixelRatio,\n extent,\n transform,\n viewRotation,\n squaredTolerance,\n userTransform\n ) {\n super();\n\n /**\n * @private\n * @type {CanvasRenderingContext2D}\n */\n this.context_ = context;\n\n /**\n * @private\n * @type {number}\n */\n this.pixelRatio_ = pixelRatio;\n\n /**\n * @private\n * @type {import(\"../../extent.js\").Extent}\n */\n this.extent_ = extent;\n\n /**\n * @private\n * @type {import(\"../../transform.js\").Transform}\n */\n this.transform_ = transform;\n\n /**\n * @private\n * @type {number}\n */\n this.transformRotation_ = transform\n ? toFixed(Math.atan2(transform[1], transform[0]), 10)\n : 0;\n\n /**\n * @private\n * @type {number}\n */\n this.viewRotation_ = viewRotation;\n\n /**\n * @private\n * @type {number}\n */\n this.squaredTolerance_ = squaredTolerance;\n\n /**\n * @private\n * @type {import(\"../../proj.js\").TransformFunction}\n */\n this.userTransform_ = userTransform;\n\n /**\n * @private\n * @type {?import(\"../canvas.js\").FillState}\n */\n this.contextFillState_ = null;\n\n /**\n * @private\n * @type {?import(\"../canvas.js\").StrokeState}\n */\n this.contextStrokeState_ = null;\n\n /**\n * @private\n * @type {?import(\"../canvas.js\").TextState}\n */\n this.contextTextState_ = null;\n\n /**\n * @private\n * @type {?import(\"../canvas.js\").FillState}\n */\n this.fillState_ = null;\n\n /**\n * @private\n * @type {?import(\"../canvas.js\").StrokeState}\n */\n this.strokeState_ = null;\n\n /**\n * @private\n * @type {HTMLCanvasElement|HTMLVideoElement|HTMLImageElement}\n */\n this.image_ = null;\n\n /**\n * @private\n * @type {number}\n */\n this.imageAnchorX_ = 0;\n\n /**\n * @private\n * @type {number}\n */\n this.imageAnchorY_ = 0;\n\n /**\n * @private\n * @type {number}\n */\n this.imageHeight_ = 0;\n\n /**\n * @private\n * @type {number}\n */\n this.imageOpacity_ = 0;\n\n /**\n * @private\n * @type {number}\n */\n this.imageOriginX_ = 0;\n\n /**\n * @private\n * @type {number}\n */\n this.imageOriginY_ = 0;\n\n /**\n * @private\n * @type {boolean}\n */\n this.imageRotateWithView_ = false;\n\n /**\n * @private\n * @type {number}\n */\n this.imageRotation_ = 0;\n\n /**\n * @private\n * @type {import(\"../../size.js\").Size}\n */\n this.imageScale_ = [0, 0];\n\n /**\n * @private\n * @type {number}\n */\n this.imageWidth_ = 0;\n\n /**\n * @private\n * @type {string}\n */\n this.text_ = '';\n\n /**\n * @private\n * @type {number}\n */\n this.textOffsetX_ = 0;\n\n /**\n * @private\n * @type {number}\n */\n this.textOffsetY_ = 0;\n\n /**\n * @private\n * @type {boolean}\n */\n this.textRotateWithView_ = false;\n\n /**\n * @private\n * @type {number}\n */\n this.textRotation_ = 0;\n\n /**\n * @private\n * @type {import(\"../../size.js\").Size}\n */\n this.textScale_ = [0, 0];\n\n /**\n * @private\n * @type {?import(\"../canvas.js\").FillState}\n */\n this.textFillState_ = null;\n\n /**\n * @private\n * @type {?import(\"../canvas.js\").StrokeState}\n */\n this.textStrokeState_ = null;\n\n /**\n * @private\n * @type {?import(\"../canvas.js\").TextState}\n */\n this.textState_ = null;\n\n /**\n * @private\n * @type {Array}\n */\n this.pixelCoordinates_ = [];\n\n /**\n * @private\n * @type {import(\"../../transform.js\").Transform}\n */\n this.tmpLocalTransform_ = createTransform();\n }\n\n /**\n * @param {Array} flatCoordinates Flat coordinates.\n * @param {number} offset Offset.\n * @param {number} end End.\n * @param {number} stride Stride.\n * @private\n */\n drawImages_(flatCoordinates, offset, end, stride) {\n if (!this.image_) {\n return;\n }\n const pixelCoordinates = transform2D(\n flatCoordinates,\n offset,\n end,\n stride,\n this.transform_,\n this.pixelCoordinates_\n );\n const context = this.context_;\n const localTransform = this.tmpLocalTransform_;\n const alpha = context.globalAlpha;\n if (this.imageOpacity_ != 1) {\n context.globalAlpha = alpha * this.imageOpacity_;\n }\n let rotation = this.imageRotation_;\n if (this.transformRotation_ === 0) {\n rotation -= this.viewRotation_;\n }\n if (this.imageRotateWithView_) {\n rotation += this.viewRotation_;\n }\n for (let i = 0, ii = pixelCoordinates.length; i < ii; i += 2) {\n const x = pixelCoordinates[i] - this.imageAnchorX_;\n const y = pixelCoordinates[i + 1] - this.imageAnchorY_;\n if (\n rotation !== 0 ||\n this.imageScale_[0] != 1 ||\n this.imageScale_[1] != 1\n ) {\n const centerX = x + this.imageAnchorX_;\n const centerY = y + this.imageAnchorY_;\n composeTransform(\n localTransform,\n centerX,\n centerY,\n 1,\n 1,\n rotation,\n -centerX,\n -centerY\n );\n context.setTransform.apply(context, localTransform);\n context.translate(centerX, centerY);\n context.scale(this.imageScale_[0], this.imageScale_[1]);\n context.drawImage(\n this.image_,\n this.imageOriginX_,\n this.imageOriginY_,\n this.imageWidth_,\n this.imageHeight_,\n -this.imageAnchorX_,\n -this.imageAnchorY_,\n this.imageWidth_,\n this.imageHeight_\n );\n context.setTransform(1, 0, 0, 1, 0, 0);\n } else {\n context.drawImage(\n this.image_,\n this.imageOriginX_,\n this.imageOriginY_,\n this.imageWidth_,\n this.imageHeight_,\n x,\n y,\n this.imageWidth_,\n this.imageHeight_\n );\n }\n }\n if (this.imageOpacity_ != 1) {\n context.globalAlpha = alpha;\n }\n }\n\n /**\n * @param {Array} flatCoordinates Flat coordinates.\n * @param {number} offset Offset.\n * @param {number} end End.\n * @param {number} stride Stride.\n * @private\n */\n drawText_(flatCoordinates, offset, end, stride) {\n if (!this.textState_ || this.text_ === '') {\n return;\n }\n if (this.textFillState_) {\n this.setContextFillState_(this.textFillState_);\n }\n if (this.textStrokeState_) {\n this.setContextStrokeState_(this.textStrokeState_);\n }\n this.setContextTextState_(this.textState_);\n const pixelCoordinates = transform2D(\n flatCoordinates,\n offset,\n end,\n stride,\n this.transform_,\n this.pixelCoordinates_\n );\n const context = this.context_;\n let rotation = this.textRotation_;\n if (this.transformRotation_ === 0) {\n rotation -= this.viewRotation_;\n }\n if (this.textRotateWithView_) {\n rotation += this.viewRotation_;\n }\n for (; offset < end; offset += stride) {\n const x = pixelCoordinates[offset] + this.textOffsetX_;\n const y = pixelCoordinates[offset + 1] + this.textOffsetY_;\n if (\n rotation !== 0 ||\n this.textScale_[0] != 1 ||\n this.textScale_[1] != 1\n ) {\n context.translate(x - this.textOffsetX_, y - this.textOffsetY_);\n context.rotate(rotation);\n context.translate(this.textOffsetX_, this.textOffsetY_);\n context.scale(this.textScale_[0], this.textScale_[1]);\n if (this.textStrokeState_) {\n context.strokeText(this.text_, 0, 0);\n }\n if (this.textFillState_) {\n context.fillText(this.text_, 0, 0);\n }\n context.setTransform(1, 0, 0, 1, 0, 0);\n } else {\n if (this.textStrokeState_) {\n context.strokeText(this.text_, x, y);\n }\n if (this.textFillState_) {\n context.fillText(this.text_, x, y);\n }\n }\n }\n }\n\n /**\n * @param {Array} flatCoordinates Flat coordinates.\n * @param {number} offset Offset.\n * @param {number} end End.\n * @param {number} stride Stride.\n * @param {boolean} close Close.\n * @private\n * @return {number} end End.\n */\n moveToLineTo_(flatCoordinates, offset, end, stride, close) {\n const context = this.context_;\n const pixelCoordinates = transform2D(\n flatCoordinates,\n offset,\n end,\n stride,\n this.transform_,\n this.pixelCoordinates_\n );\n context.moveTo(pixelCoordinates[0], pixelCoordinates[1]);\n let length = pixelCoordinates.length;\n if (close) {\n length -= 2;\n }\n for (let i = 2; i < length; i += 2) {\n context.lineTo(pixelCoordinates[i], pixelCoordinates[i + 1]);\n }\n if (close) {\n context.closePath();\n }\n return end;\n }\n\n /**\n * @param {Array} flatCoordinates Flat coordinates.\n * @param {number} offset Offset.\n * @param {Array} ends Ends.\n * @param {number} stride Stride.\n * @private\n * @return {number} End.\n */\n drawRings_(flatCoordinates, offset, ends, stride) {\n for (let i = 0, ii = ends.length; i < ii; ++i) {\n offset = this.moveToLineTo_(\n flatCoordinates,\n offset,\n ends[i],\n stride,\n true\n );\n }\n return offset;\n }\n\n /**\n * Render a circle geometry into the canvas. Rendering is immediate and uses\n * the current fill and stroke styles.\n *\n * @param {import(\"../../geom/Circle.js\").default} geometry Circle geometry.\n * @api\n */\n drawCircle(geometry) {\n if (!intersects(this.extent_, geometry.getExtent())) {\n return;\n }\n if (this.fillState_ || this.strokeState_) {\n if (this.fillState_) {\n this.setContextFillState_(this.fillState_);\n }\n if (this.strokeState_) {\n this.setContextStrokeState_(this.strokeState_);\n }\n const pixelCoordinates = transformGeom2D(\n geometry,\n this.transform_,\n this.pixelCoordinates_\n );\n const dx = pixelCoordinates[2] - pixelCoordinates[0];\n const dy = pixelCoordinates[3] - pixelCoordinates[1];\n const radius = Math.sqrt(dx * dx + dy * dy);\n const context = this.context_;\n context.beginPath();\n context.arc(\n pixelCoordinates[0],\n pixelCoordinates[1],\n radius,\n 0,\n 2 * Math.PI\n );\n if (this.fillState_) {\n context.fill();\n }\n if (this.strokeState_) {\n context.stroke();\n }\n }\n if (this.text_ !== '') {\n this.drawText_(geometry.getCenter(), 0, 2, 2);\n }\n }\n\n /**\n * Set the rendering style. Note that since this is an immediate rendering API,\n * any `zIndex` on the provided style will be ignored.\n *\n * @param {import(\"../../style/Style.js\").default} style The rendering style.\n * @api\n */\n setStyle(style) {\n this.setFillStrokeStyle(style.getFill(), style.getStroke());\n this.setImageStyle(style.getImage());\n this.setTextStyle(style.getText());\n }\n\n /**\n * @param {import(\"../../transform.js\").Transform} transform Transform.\n */\n setTransform(transform) {\n this.transform_ = transform;\n }\n\n /**\n * Render a geometry into the canvas. Call\n * {@link module:ol/render/canvas/Immediate~CanvasImmediateRenderer#setStyle renderer.setStyle()} first to set the rendering style.\n *\n * @param {import(\"../../geom/Geometry.js\").default|import(\"../Feature.js\").default} geometry The geometry to render.\n * @api\n */\n drawGeometry(geometry) {\n const type = geometry.getType();\n switch (type) {\n case 'Point':\n this.drawPoint(\n /** @type {import(\"../../geom/Point.js\").default} */ (geometry)\n );\n break;\n case 'LineString':\n this.drawLineString(\n /** @type {import(\"../../geom/LineString.js\").default} */ (geometry)\n );\n break;\n case 'Polygon':\n this.drawPolygon(\n /** @type {import(\"../../geom/Polygon.js\").default} */ (geometry)\n );\n break;\n case 'MultiPoint':\n this.drawMultiPoint(\n /** @type {import(\"../../geom/MultiPoint.js\").default} */ (geometry)\n );\n break;\n case 'MultiLineString':\n this.drawMultiLineString(\n /** @type {import(\"../../geom/MultiLineString.js\").default} */ (\n geometry\n )\n );\n break;\n case 'MultiPolygon':\n this.drawMultiPolygon(\n /** @type {import(\"../../geom/MultiPolygon.js\").default} */ (geometry)\n );\n break;\n case 'GeometryCollection':\n this.drawGeometryCollection(\n /** @type {import(\"../../geom/GeometryCollection.js\").default} */ (\n geometry\n )\n );\n break;\n case 'Circle':\n this.drawCircle(\n /** @type {import(\"../../geom/Circle.js\").default} */ (geometry)\n );\n break;\n default:\n }\n }\n\n /**\n * Render a feature into the canvas. Note that any `zIndex` on the provided\n * style will be ignored - features are rendered immediately in the order that\n * this method is called. If you need `zIndex` support, you should be using an\n * {@link module:ol/layer/Vector~VectorLayer} instead.\n *\n * @param {import(\"../../Feature.js\").default} feature Feature.\n * @param {import(\"../../style/Style.js\").default} style Style.\n * @api\n */\n drawFeature(feature, style) {\n const geometry = style.getGeometryFunction()(feature);\n if (!geometry || !intersects(this.extent_, geometry.getExtent())) {\n return;\n }\n this.setStyle(style);\n this.drawGeometry(geometry);\n }\n\n /**\n * Render a GeometryCollection to the canvas. Rendering is immediate and\n * uses the current styles appropriate for each geometry in the collection.\n *\n * @param {import(\"../../geom/GeometryCollection.js\").default} geometry Geometry collection.\n */\n drawGeometryCollection(geometry) {\n const geometries = geometry.getGeometriesArray();\n for (let i = 0, ii = geometries.length; i < ii; ++i) {\n this.drawGeometry(geometries[i]);\n }\n }\n\n /**\n * Render a Point geometry into the canvas. Rendering is immediate and uses\n * the current style.\n *\n * @param {import(\"../../geom/Point.js\").default|import(\"../Feature.js\").default} geometry Point geometry.\n */\n drawPoint(geometry) {\n if (this.squaredTolerance_) {\n geometry = /** @type {import(\"../../geom/Point.js\").default} */ (\n geometry.simplifyTransformed(\n this.squaredTolerance_,\n this.userTransform_\n )\n );\n }\n const flatCoordinates = geometry.getFlatCoordinates();\n const stride = geometry.getStride();\n if (this.image_) {\n this.drawImages_(flatCoordinates, 0, flatCoordinates.length, stride);\n }\n if (this.text_ !== '') {\n this.drawText_(flatCoordinates, 0, flatCoordinates.length, stride);\n }\n }\n\n /**\n * Render a MultiPoint geometry into the canvas. Rendering is immediate and\n * uses the current style.\n *\n * @param {import(\"../../geom/MultiPoint.js\").default|import(\"../Feature.js\").default} geometry MultiPoint geometry.\n */\n drawMultiPoint(geometry) {\n if (this.squaredTolerance_) {\n geometry = /** @type {import(\"../../geom/MultiPoint.js\").default} */ (\n geometry.simplifyTransformed(\n this.squaredTolerance_,\n this.userTransform_\n )\n );\n }\n const flatCoordinates = geometry.getFlatCoordinates();\n const stride = geometry.getStride();\n if (this.image_) {\n this.drawImages_(flatCoordinates, 0, flatCoordinates.length, stride);\n }\n if (this.text_ !== '') {\n this.drawText_(flatCoordinates, 0, flatCoordinates.length, stride);\n }\n }\n\n /**\n * Render a LineString into the canvas. Rendering is immediate and uses\n * the current style.\n *\n * @param {import(\"../../geom/LineString.js\").default|import(\"../Feature.js\").default} geometry LineString geometry.\n */\n drawLineString(geometry) {\n if (this.squaredTolerance_) {\n geometry = /** @type {import(\"../../geom/LineString.js\").default} */ (\n geometry.simplifyTransformed(\n this.squaredTolerance_,\n this.userTransform_\n )\n );\n }\n if (!intersects(this.extent_, geometry.getExtent())) {\n return;\n }\n if (this.strokeState_) {\n this.setContextStrokeState_(this.strokeState_);\n const context = this.context_;\n const flatCoordinates = geometry.getFlatCoordinates();\n context.beginPath();\n this.moveToLineTo_(\n flatCoordinates,\n 0,\n flatCoordinates.length,\n geometry.getStride(),\n false\n );\n context.stroke();\n }\n if (this.text_ !== '') {\n const flatMidpoint = geometry.getFlatMidpoint();\n this.drawText_(flatMidpoint, 0, 2, 2);\n }\n }\n\n /**\n * Render a MultiLineString geometry into the canvas. Rendering is immediate\n * and uses the current style.\n *\n * @param {import(\"../../geom/MultiLineString.js\").default|import(\"../Feature.js\").default} geometry MultiLineString geometry.\n */\n drawMultiLineString(geometry) {\n if (this.squaredTolerance_) {\n geometry =\n /** @type {import(\"../../geom/MultiLineString.js\").default} */ (\n geometry.simplifyTransformed(\n this.squaredTolerance_,\n this.userTransform_\n )\n );\n }\n const geometryExtent = geometry.getExtent();\n if (!intersects(this.extent_, geometryExtent)) {\n return;\n }\n if (this.strokeState_) {\n this.setContextStrokeState_(this.strokeState_);\n const context = this.context_;\n const flatCoordinates = geometry.getFlatCoordinates();\n let offset = 0;\n const ends = /** @type {Array} */ (geometry.getEnds());\n const stride = geometry.getStride();\n context.beginPath();\n for (let i = 0, ii = ends.length; i < ii; ++i) {\n offset = this.moveToLineTo_(\n flatCoordinates,\n offset,\n ends[i],\n stride,\n false\n );\n }\n context.stroke();\n }\n if (this.text_ !== '') {\n const flatMidpoints = geometry.getFlatMidpoints();\n this.drawText_(flatMidpoints, 0, flatMidpoints.length, 2);\n }\n }\n\n /**\n * Render a Polygon geometry into the canvas. Rendering is immediate and uses\n * the current style.\n *\n * @param {import(\"../../geom/Polygon.js\").default|import(\"../Feature.js\").default} geometry Polygon geometry.\n */\n drawPolygon(geometry) {\n if (this.squaredTolerance_) {\n geometry = /** @type {import(\"../../geom/Polygon.js\").default} */ (\n geometry.simplifyTransformed(\n this.squaredTolerance_,\n this.userTransform_\n )\n );\n }\n if (!intersects(this.extent_, geometry.getExtent())) {\n return;\n }\n if (this.strokeState_ || this.fillState_) {\n if (this.fillState_) {\n this.setContextFillState_(this.fillState_);\n }\n if (this.strokeState_) {\n this.setContextStrokeState_(this.strokeState_);\n }\n const context = this.context_;\n context.beginPath();\n this.drawRings_(\n geometry.getOrientedFlatCoordinates(),\n 0,\n /** @type {Array} */ (geometry.getEnds()),\n geometry.getStride()\n );\n if (this.fillState_) {\n context.fill();\n }\n if (this.strokeState_) {\n context.stroke();\n }\n }\n if (this.text_ !== '') {\n const flatInteriorPoint = geometry.getFlatInteriorPoint();\n this.drawText_(flatInteriorPoint, 0, 2, 2);\n }\n }\n\n /**\n * Render MultiPolygon geometry into the canvas. Rendering is immediate and\n * uses the current style.\n * @param {import(\"../../geom/MultiPolygon.js\").default} geometry MultiPolygon geometry.\n */\n drawMultiPolygon(geometry) {\n if (this.squaredTolerance_) {\n geometry = /** @type {import(\"../../geom/MultiPolygon.js\").default} */ (\n geometry.simplifyTransformed(\n this.squaredTolerance_,\n this.userTransform_\n )\n );\n }\n if (!intersects(this.extent_, geometry.getExtent())) {\n return;\n }\n if (this.strokeState_ || this.fillState_) {\n if (this.fillState_) {\n this.setContextFillState_(this.fillState_);\n }\n if (this.strokeState_) {\n this.setContextStrokeState_(this.strokeState_);\n }\n const context = this.context_;\n const flatCoordinates = geometry.getOrientedFlatCoordinates();\n let offset = 0;\n const endss = geometry.getEndss();\n const stride = geometry.getStride();\n context.beginPath();\n for (let i = 0, ii = endss.length; i < ii; ++i) {\n const ends = endss[i];\n offset = this.drawRings_(flatCoordinates, offset, ends, stride);\n }\n if (this.fillState_) {\n context.fill();\n }\n if (this.strokeState_) {\n context.stroke();\n }\n }\n if (this.text_ !== '') {\n const flatInteriorPoints = geometry.getFlatInteriorPoints();\n this.drawText_(flatInteriorPoints, 0, flatInteriorPoints.length, 2);\n }\n }\n\n /**\n * @param {import(\"../canvas.js\").FillState} fillState Fill state.\n * @private\n */\n setContextFillState_(fillState) {\n const context = this.context_;\n const contextFillState = this.contextFillState_;\n if (!contextFillState) {\n context.fillStyle = fillState.fillStyle;\n this.contextFillState_ = {\n fillStyle: fillState.fillStyle,\n };\n } else {\n if (contextFillState.fillStyle != fillState.fillStyle) {\n contextFillState.fillStyle = fillState.fillStyle;\n context.fillStyle = fillState.fillStyle;\n }\n }\n }\n\n /**\n * @param {import(\"../canvas.js\").StrokeState} strokeState Stroke state.\n * @private\n */\n setContextStrokeState_(strokeState) {\n const context = this.context_;\n const contextStrokeState = this.contextStrokeState_;\n if (!contextStrokeState) {\n context.lineCap = strokeState.lineCap;\n context.setLineDash(strokeState.lineDash);\n context.lineDashOffset = strokeState.lineDashOffset;\n context.lineJoin = strokeState.lineJoin;\n context.lineWidth = strokeState.lineWidth;\n context.miterLimit = strokeState.miterLimit;\n context.strokeStyle = strokeState.strokeStyle;\n this.contextStrokeState_ = {\n lineCap: strokeState.lineCap,\n lineDash: strokeState.lineDash,\n lineDashOffset: strokeState.lineDashOffset,\n lineJoin: strokeState.lineJoin,\n lineWidth: strokeState.lineWidth,\n miterLimit: strokeState.miterLimit,\n strokeStyle: strokeState.strokeStyle,\n };\n } else {\n if (contextStrokeState.lineCap != strokeState.lineCap) {\n contextStrokeState.lineCap = strokeState.lineCap;\n context.lineCap = strokeState.lineCap;\n }\n if (!equals(contextStrokeState.lineDash, strokeState.lineDash)) {\n context.setLineDash(\n (contextStrokeState.lineDash = strokeState.lineDash)\n );\n }\n if (contextStrokeState.lineDashOffset != strokeState.lineDashOffset) {\n contextStrokeState.lineDashOffset = strokeState.lineDashOffset;\n context.lineDashOffset = strokeState.lineDashOffset;\n }\n if (contextStrokeState.lineJoin != strokeState.lineJoin) {\n contextStrokeState.lineJoin = strokeState.lineJoin;\n context.lineJoin = strokeState.lineJoin;\n }\n if (contextStrokeState.lineWidth != strokeState.lineWidth) {\n contextStrokeState.lineWidth = strokeState.lineWidth;\n context.lineWidth = strokeState.lineWidth;\n }\n if (contextStrokeState.miterLimit != strokeState.miterLimit) {\n contextStrokeState.miterLimit = strokeState.miterLimit;\n context.miterLimit = strokeState.miterLimit;\n }\n if (contextStrokeState.strokeStyle != strokeState.strokeStyle) {\n contextStrokeState.strokeStyle = strokeState.strokeStyle;\n context.strokeStyle = strokeState.strokeStyle;\n }\n }\n }\n\n /**\n * @param {import(\"../canvas.js\").TextState} textState Text state.\n * @private\n */\n setContextTextState_(textState) {\n const context = this.context_;\n const contextTextState = this.contextTextState_;\n const textAlign = textState.textAlign\n ? textState.textAlign\n : defaultTextAlign;\n if (!contextTextState) {\n context.font = textState.font;\n context.textAlign = textAlign;\n context.textBaseline = textState.textBaseline;\n this.contextTextState_ = {\n font: textState.font,\n textAlign: textAlign,\n textBaseline: textState.textBaseline,\n };\n } else {\n if (contextTextState.font != textState.font) {\n contextTextState.font = textState.font;\n context.font = textState.font;\n }\n if (contextTextState.textAlign != textAlign) {\n contextTextState.textAlign = textAlign;\n context.textAlign = textAlign;\n }\n if (contextTextState.textBaseline != textState.textBaseline) {\n contextTextState.textBaseline = textState.textBaseline;\n context.textBaseline = textState.textBaseline;\n }\n }\n }\n\n /**\n * Set the fill and stroke style for subsequent draw operations. To clear\n * either fill or stroke styles, pass null for the appropriate parameter.\n *\n * @param {import(\"../../style/Fill.js\").default} fillStyle Fill style.\n * @param {import(\"../../style/Stroke.js\").default} strokeStyle Stroke style.\n */\n setFillStrokeStyle(fillStyle, strokeStyle) {\n if (!fillStyle) {\n this.fillState_ = null;\n } else {\n const fillStyleColor = fillStyle.getColor();\n this.fillState_ = {\n fillStyle: asColorLike(\n fillStyleColor ? fillStyleColor : defaultFillStyle\n ),\n };\n }\n if (!strokeStyle) {\n this.strokeState_ = null;\n } else {\n const strokeStyleColor = strokeStyle.getColor();\n const strokeStyleLineCap = strokeStyle.getLineCap();\n const strokeStyleLineDash = strokeStyle.getLineDash();\n const strokeStyleLineDashOffset = strokeStyle.getLineDashOffset();\n const strokeStyleLineJoin = strokeStyle.getLineJoin();\n const strokeStyleWidth = strokeStyle.getWidth();\n const strokeStyleMiterLimit = strokeStyle.getMiterLimit();\n const lineDash = strokeStyleLineDash\n ? strokeStyleLineDash\n : defaultLineDash;\n this.strokeState_ = {\n lineCap:\n strokeStyleLineCap !== undefined\n ? strokeStyleLineCap\n : defaultLineCap,\n lineDash:\n this.pixelRatio_ === 1\n ? lineDash\n : lineDash.map((n) => n * this.pixelRatio_),\n lineDashOffset:\n (strokeStyleLineDashOffset\n ? strokeStyleLineDashOffset\n : defaultLineDashOffset) * this.pixelRatio_,\n lineJoin:\n strokeStyleLineJoin !== undefined\n ? strokeStyleLineJoin\n : defaultLineJoin,\n lineWidth:\n (strokeStyleWidth !== undefined\n ? strokeStyleWidth\n : defaultLineWidth) * this.pixelRatio_,\n miterLimit:\n strokeStyleMiterLimit !== undefined\n ? strokeStyleMiterLimit\n : defaultMiterLimit,\n strokeStyle: asColorLike(\n strokeStyleColor ? strokeStyleColor : defaultStrokeStyle\n ),\n };\n }\n }\n\n /**\n * Set the image style for subsequent draw operations. Pass null to remove\n * the image style.\n *\n * @param {import(\"../../style/Image.js\").default} imageStyle Image style.\n */\n setImageStyle(imageStyle) {\n let imageSize;\n if (!imageStyle || !(imageSize = imageStyle.getSize())) {\n this.image_ = null;\n return;\n }\n const imagePixelRatio = imageStyle.getPixelRatio(this.pixelRatio_);\n const imageAnchor = imageStyle.getAnchor();\n const imageOrigin = imageStyle.getOrigin();\n this.image_ = imageStyle.getImage(this.pixelRatio_);\n this.imageAnchorX_ = imageAnchor[0] * imagePixelRatio;\n this.imageAnchorY_ = imageAnchor[1] * imagePixelRatio;\n this.imageHeight_ = imageSize[1] * imagePixelRatio;\n this.imageOpacity_ = imageStyle.getOpacity();\n this.imageOriginX_ = imageOrigin[0];\n this.imageOriginY_ = imageOrigin[1];\n this.imageRotateWithView_ = imageStyle.getRotateWithView();\n this.imageRotation_ = imageStyle.getRotation();\n const imageScale = imageStyle.getScaleArray();\n this.imageScale_ = [\n (imageScale[0] * this.pixelRatio_) / imagePixelRatio,\n (imageScale[1] * this.pixelRatio_) / imagePixelRatio,\n ];\n this.imageWidth_ = imageSize[0] * imagePixelRatio;\n }\n\n /**\n * Set the text style for subsequent draw operations. Pass null to\n * remove the text style.\n *\n * @param {import(\"../../style/Text.js\").default} textStyle Text style.\n */\n setTextStyle(textStyle) {\n if (!textStyle) {\n this.text_ = '';\n } else {\n const textFillStyle = textStyle.getFill();\n if (!textFillStyle) {\n this.textFillState_ = null;\n } else {\n const textFillStyleColor = textFillStyle.getColor();\n this.textFillState_ = {\n fillStyle: asColorLike(\n textFillStyleColor ? textFillStyleColor : defaultFillStyle\n ),\n };\n }\n const textStrokeStyle = textStyle.getStroke();\n if (!textStrokeStyle) {\n this.textStrokeState_ = null;\n } else {\n const textStrokeStyleColor = textStrokeStyle.getColor();\n const textStrokeStyleLineCap = textStrokeStyle.getLineCap();\n const textStrokeStyleLineDash = textStrokeStyle.getLineDash();\n const textStrokeStyleLineDashOffset =\n textStrokeStyle.getLineDashOffset();\n const textStrokeStyleLineJoin = textStrokeStyle.getLineJoin();\n const textStrokeStyleWidth = textStrokeStyle.getWidth();\n const textStrokeStyleMiterLimit = textStrokeStyle.getMiterLimit();\n this.textStrokeState_ = {\n lineCap:\n textStrokeStyleLineCap !== undefined\n ? textStrokeStyleLineCap\n : defaultLineCap,\n lineDash: textStrokeStyleLineDash\n ? textStrokeStyleLineDash\n : defaultLineDash,\n lineDashOffset: textStrokeStyleLineDashOffset\n ? textStrokeStyleLineDashOffset\n : defaultLineDashOffset,\n lineJoin:\n textStrokeStyleLineJoin !== undefined\n ? textStrokeStyleLineJoin\n : defaultLineJoin,\n lineWidth:\n textStrokeStyleWidth !== undefined\n ? textStrokeStyleWidth\n : defaultLineWidth,\n miterLimit:\n textStrokeStyleMiterLimit !== undefined\n ? textStrokeStyleMiterLimit\n : defaultMiterLimit,\n strokeStyle: asColorLike(\n textStrokeStyleColor ? textStrokeStyleColor : defaultStrokeStyle\n ),\n };\n }\n const textFont = textStyle.getFont();\n const textOffsetX = textStyle.getOffsetX();\n const textOffsetY = textStyle.getOffsetY();\n const textRotateWithView = textStyle.getRotateWithView();\n const textRotation = textStyle.getRotation();\n const textScale = textStyle.getScaleArray();\n const textText = textStyle.getText();\n const textTextAlign = textStyle.getTextAlign();\n const textTextBaseline = textStyle.getTextBaseline();\n this.textState_ = {\n font: textFont !== undefined ? textFont : defaultFont,\n textAlign:\n textTextAlign !== undefined ? textTextAlign : defaultTextAlign,\n textBaseline:\n textTextBaseline !== undefined\n ? textTextBaseline\n : defaultTextBaseline,\n };\n this.text_ =\n textText !== undefined\n ? Array.isArray(textText)\n ? textText.reduce((acc, t, i) => (acc += i % 2 ? ' ' : t), '')\n : textText\n : '';\n this.textOffsetX_ =\n textOffsetX !== undefined ? this.pixelRatio_ * textOffsetX : 0;\n this.textOffsetY_ =\n textOffsetY !== undefined ? this.pixelRatio_ * textOffsetY : 0;\n this.textRotateWithView_ =\n textRotateWithView !== undefined ? textRotateWithView : false;\n this.textRotation_ = textRotation !== undefined ? textRotation : 0;\n this.textScale_ = [\n this.pixelRatio_ * textScale[0],\n this.pixelRatio_ * textScale[1],\n ];\n }\n }\n}\n\nexport default CanvasImmediateRenderer;\n","/**\n * @module ol/renderer/vector\n */\nimport ImageState from '../ImageState.js';\nimport {getUid} from '../util.js';\n\n/**\n * Feature callback. The callback will be called with three arguments. The first\n * argument is one {@link module:ol/Feature~Feature feature} or {@link module:ol/render/Feature~RenderFeature render feature}\n * at the pixel, the second is the {@link module:ol/layer/Layer~Layer layer} of the feature and will be null for\n * unmanaged layers. The third is the {@link module:ol/geom/SimpleGeometry~SimpleGeometry} of the feature. For features\n * with a GeometryCollection geometry, it will be the first detected geometry from the collection.\n * @template T\n * @typedef {function(import(\"../Feature.js\").FeatureLike, import(\"../layer/Layer.js\").default, import(\"../geom/SimpleGeometry.js\").default): T} FeatureCallback\n */\n\n/**\n * Tolerance for geometry simplification in device pixels.\n * @type {number}\n */\nconst SIMPLIFY_TOLERANCE = 0.5;\n\n/**\n * @const\n * @type {Object}\n */\nconst GEOMETRY_RENDERERS = {\n 'Point': renderPointGeometry,\n 'LineString': renderLineStringGeometry,\n 'Polygon': renderPolygonGeometry,\n 'MultiPoint': renderMultiPointGeometry,\n 'MultiLineString': renderMultiLineStringGeometry,\n 'MultiPolygon': renderMultiPolygonGeometry,\n 'GeometryCollection': renderGeometryCollectionGeometry,\n 'Circle': renderCircleGeometry,\n};\n\n/**\n * @param {import(\"../Feature.js\").FeatureLike} feature1 Feature 1.\n * @param {import(\"../Feature.js\").FeatureLike} feature2 Feature 2.\n * @return {number} Order.\n */\nexport function defaultOrder(feature1, feature2) {\n return parseInt(getUid(feature1), 10) - parseInt(getUid(feature2), 10);\n}\n\n/**\n * @param {number} resolution Resolution.\n * @param {number} pixelRatio Pixel ratio.\n * @return {number} Squared pixel tolerance.\n */\nexport function getSquaredTolerance(resolution, pixelRatio) {\n const tolerance = getTolerance(resolution, pixelRatio);\n return tolerance * tolerance;\n}\n\n/**\n * @param {number} resolution Resolution.\n * @param {number} pixelRatio Pixel ratio.\n * @return {number} Pixel tolerance.\n */\nexport function getTolerance(resolution, pixelRatio) {\n return (SIMPLIFY_TOLERANCE * resolution) / pixelRatio;\n}\n\n/**\n * @param {import(\"../render/canvas/BuilderGroup.js\").default} builderGroup Builder group.\n * @param {import(\"../geom/Circle.js\").default} geometry Geometry.\n * @param {import(\"../style/Style.js\").default} style Style.\n * @param {import(\"../Feature.js\").default} feature Feature.\n * @param {import(\"../render/canvas/BuilderGroup.js\").default} [declutterBuilderGroup] Builder for decluttering.\n */\nfunction renderCircleGeometry(\n builderGroup,\n geometry,\n style,\n feature,\n declutterBuilderGroup\n) {\n const fillStyle = style.getFill();\n const strokeStyle = style.getStroke();\n if (fillStyle || strokeStyle) {\n const circleReplay = builderGroup.getBuilder(style.getZIndex(), 'Circle');\n circleReplay.setFillStrokeStyle(fillStyle, strokeStyle);\n circleReplay.drawCircle(geometry, feature);\n }\n const textStyle = style.getText();\n if (textStyle && textStyle.getText()) {\n const textReplay = (declutterBuilderGroup || builderGroup).getBuilder(\n style.getZIndex(),\n 'Text'\n );\n textReplay.setTextStyle(textStyle);\n textReplay.drawText(geometry, feature);\n }\n}\n\n/**\n * @param {import(\"../render/canvas/BuilderGroup.js\").default} replayGroup Replay group.\n * @param {import(\"../Feature.js\").FeatureLike} feature Feature.\n * @param {import(\"../style/Style.js\").default} style Style.\n * @param {number} squaredTolerance Squared tolerance.\n * @param {function(import(\"../events/Event.js\").default): void} listener Listener function.\n * @param {import(\"../proj.js\").TransformFunction} [transform] Transform from user to view projection.\n * @param {import(\"../render/canvas/BuilderGroup.js\").default} [declutterBuilderGroup] Builder for decluttering.\n * @return {boolean} `true` if style is loading.\n */\nexport function renderFeature(\n replayGroup,\n feature,\n style,\n squaredTolerance,\n listener,\n transform,\n declutterBuilderGroup\n) {\n let loading = false;\n const imageStyle = style.getImage();\n if (imageStyle) {\n const imageState = imageStyle.getImageState();\n if (imageState == ImageState.LOADED || imageState == ImageState.ERROR) {\n imageStyle.unlistenImageChange(listener);\n } else {\n if (imageState == ImageState.IDLE) {\n imageStyle.load();\n }\n imageStyle.listenImageChange(listener);\n loading = true;\n }\n }\n renderFeatureInternal(\n replayGroup,\n feature,\n style,\n squaredTolerance,\n transform,\n declutterBuilderGroup\n );\n\n return loading;\n}\n\n/**\n * @param {import(\"../render/canvas/BuilderGroup.js\").default} replayGroup Replay group.\n * @param {import(\"../Feature.js\").FeatureLike} feature Feature.\n * @param {import(\"../style/Style.js\").default} style Style.\n * @param {number} squaredTolerance Squared tolerance.\n * @param {import(\"../proj.js\").TransformFunction} [transform] Optional transform function.\n * @param {import(\"../render/canvas/BuilderGroup.js\").default} [declutterBuilderGroup] Builder for decluttering.\n */\nfunction renderFeatureInternal(\n replayGroup,\n feature,\n style,\n squaredTolerance,\n transform,\n declutterBuilderGroup\n) {\n const geometry = style.getGeometryFunction()(feature);\n if (!geometry) {\n return;\n }\n const simplifiedGeometry = geometry.simplifyTransformed(\n squaredTolerance,\n transform\n );\n const renderer = style.getRenderer();\n if (renderer) {\n renderGeometry(replayGroup, simplifiedGeometry, style, feature);\n } else {\n const geometryRenderer = GEOMETRY_RENDERERS[simplifiedGeometry.getType()];\n geometryRenderer(\n replayGroup,\n simplifiedGeometry,\n style,\n feature,\n declutterBuilderGroup\n );\n }\n}\n\n/**\n * @param {import(\"../render/canvas/BuilderGroup.js\").default} replayGroup Replay group.\n * @param {import(\"../geom/Geometry.js\").default|import(\"../render/Feature.js\").default} geometry Geometry.\n * @param {import(\"../style/Style.js\").default} style Style.\n * @param {import(\"../Feature.js\").FeatureLike} feature Feature.\n */\nfunction renderGeometry(replayGroup, geometry, style, feature) {\n if (geometry.getType() == 'GeometryCollection') {\n const geometries =\n /** @type {import(\"../geom/GeometryCollection.js\").default} */ (\n geometry\n ).getGeometries();\n for (let i = 0, ii = geometries.length; i < ii; ++i) {\n renderGeometry(replayGroup, geometries[i], style, feature);\n }\n return;\n }\n const replay = replayGroup.getBuilder(style.getZIndex(), 'Default');\n replay.drawCustom(\n /** @type {import(\"../geom/SimpleGeometry.js\").default} */ (geometry),\n feature,\n style.getRenderer(),\n style.getHitDetectionRenderer()\n );\n}\n\n/**\n * @param {import(\"../render/canvas/BuilderGroup.js\").default} replayGroup Replay group.\n * @param {import(\"../geom/GeometryCollection.js\").default} geometry Geometry.\n * @param {import(\"../style/Style.js\").default} style Style.\n * @param {import(\"../Feature.js\").default} feature Feature.\n * @param {import(\"../render/canvas/BuilderGroup.js\").default} [declutterBuilderGroup] Builder for decluttering.\n */\nfunction renderGeometryCollectionGeometry(\n replayGroup,\n geometry,\n style,\n feature,\n declutterBuilderGroup\n) {\n const geometries = geometry.getGeometriesArray();\n let i, ii;\n for (i = 0, ii = geometries.length; i < ii; ++i) {\n const geometryRenderer = GEOMETRY_RENDERERS[geometries[i].getType()];\n geometryRenderer(\n replayGroup,\n geometries[i],\n style,\n feature,\n declutterBuilderGroup\n );\n }\n}\n\n/**\n * @param {import(\"../render/canvas/BuilderGroup.js\").default} builderGroup Replay group.\n * @param {import(\"../geom/LineString.js\").default|import(\"../render/Feature.js\").default} geometry Geometry.\n * @param {import(\"../style/Style.js\").default} style Style.\n * @param {import(\"../Feature.js\").FeatureLike} feature Feature.\n * @param {import(\"../render/canvas/BuilderGroup.js\").default} [declutterBuilderGroup] Builder for decluttering.\n */\nfunction renderLineStringGeometry(\n builderGroup,\n geometry,\n style,\n feature,\n declutterBuilderGroup\n) {\n const strokeStyle = style.getStroke();\n if (strokeStyle) {\n const lineStringReplay = builderGroup.getBuilder(\n style.getZIndex(),\n 'LineString'\n );\n lineStringReplay.setFillStrokeStyle(null, strokeStyle);\n lineStringReplay.drawLineString(geometry, feature);\n }\n const textStyle = style.getText();\n if (textStyle && textStyle.getText()) {\n const textReplay = (declutterBuilderGroup || builderGroup).getBuilder(\n style.getZIndex(),\n 'Text'\n );\n textReplay.setTextStyle(textStyle);\n textReplay.drawText(geometry, feature);\n }\n}\n\n/**\n * @param {import(\"../render/canvas/BuilderGroup.js\").default} builderGroup Replay group.\n * @param {import(\"../geom/MultiLineString.js\").default|import(\"../render/Feature.js\").default} geometry Geometry.\n * @param {import(\"../style/Style.js\").default} style Style.\n * @param {import(\"../Feature.js\").FeatureLike} feature Feature.\n * @param {import(\"../render/canvas/BuilderGroup.js\").default} [declutterBuilderGroup] Builder for decluttering.\n */\nfunction renderMultiLineStringGeometry(\n builderGroup,\n geometry,\n style,\n feature,\n declutterBuilderGroup\n) {\n const strokeStyle = style.getStroke();\n if (strokeStyle) {\n const lineStringReplay = builderGroup.getBuilder(\n style.getZIndex(),\n 'LineString'\n );\n lineStringReplay.setFillStrokeStyle(null, strokeStyle);\n lineStringReplay.drawMultiLineString(geometry, feature);\n }\n const textStyle = style.getText();\n if (textStyle && textStyle.getText()) {\n const textReplay = (declutterBuilderGroup || builderGroup).getBuilder(\n style.getZIndex(),\n 'Text'\n );\n textReplay.setTextStyle(textStyle);\n textReplay.drawText(geometry, feature);\n }\n}\n\n/**\n * @param {import(\"../render/canvas/BuilderGroup.js\").default} builderGroup Replay group.\n * @param {import(\"../geom/MultiPolygon.js\").default} geometry Geometry.\n * @param {import(\"../style/Style.js\").default} style Style.\n * @param {import(\"../Feature.js\").default} feature Feature.\n * @param {import(\"../render/canvas/BuilderGroup.js\").default} [declutterBuilderGroup] Builder for decluttering.\n */\nfunction renderMultiPolygonGeometry(\n builderGroup,\n geometry,\n style,\n feature,\n declutterBuilderGroup\n) {\n const fillStyle = style.getFill();\n const strokeStyle = style.getStroke();\n if (strokeStyle || fillStyle) {\n const polygonReplay = builderGroup.getBuilder(style.getZIndex(), 'Polygon');\n polygonReplay.setFillStrokeStyle(fillStyle, strokeStyle);\n polygonReplay.drawMultiPolygon(geometry, feature);\n }\n const textStyle = style.getText();\n if (textStyle && textStyle.getText()) {\n const textReplay = (declutterBuilderGroup || builderGroup).getBuilder(\n style.getZIndex(),\n 'Text'\n );\n textReplay.setTextStyle(textStyle);\n textReplay.drawText(geometry, feature);\n }\n}\n\n/**\n * @param {import(\"../render/canvas/BuilderGroup.js\").default} builderGroup Replay group.\n * @param {import(\"../geom/Point.js\").default|import(\"../render/Feature.js\").default} geometry Geometry.\n * @param {import(\"../style/Style.js\").default} style Style.\n * @param {import(\"../Feature.js\").FeatureLike} feature Feature.\n * @param {import(\"../render/canvas/BuilderGroup.js\").default} [declutterBuilderGroup] Builder for decluttering.\n */\nfunction renderPointGeometry(\n builderGroup,\n geometry,\n style,\n feature,\n declutterBuilderGroup\n) {\n const imageStyle = style.getImage();\n const textStyle = style.getText();\n /** @type {import(\"../render/canvas.js\").DeclutterImageWithText} */\n let declutterImageWithText;\n if (imageStyle) {\n if (imageStyle.getImageState() != ImageState.LOADED) {\n return;\n }\n let imageBuilderGroup = builderGroup;\n if (declutterBuilderGroup) {\n const declutterMode = imageStyle.getDeclutterMode();\n if (declutterMode !== 'none') {\n imageBuilderGroup = declutterBuilderGroup;\n if (declutterMode === 'obstacle') {\n // draw in non-declutter group:\n const imageReplay = builderGroup.getBuilder(\n style.getZIndex(),\n 'Image'\n );\n imageReplay.setImageStyle(imageStyle, declutterImageWithText);\n imageReplay.drawPoint(geometry, feature);\n } else if (textStyle && textStyle.getText()) {\n declutterImageWithText = {};\n }\n }\n }\n const imageReplay = imageBuilderGroup.getBuilder(\n style.getZIndex(),\n 'Image'\n );\n imageReplay.setImageStyle(imageStyle, declutterImageWithText);\n imageReplay.drawPoint(geometry, feature);\n }\n if (textStyle && textStyle.getText()) {\n let textBuilderGroup = builderGroup;\n if (declutterBuilderGroup) {\n textBuilderGroup = declutterBuilderGroup;\n }\n const textReplay = textBuilderGroup.getBuilder(style.getZIndex(), 'Text');\n textReplay.setTextStyle(textStyle, declutterImageWithText);\n textReplay.drawText(geometry, feature);\n }\n}\n\n/**\n * @param {import(\"../render/canvas/BuilderGroup.js\").default} builderGroup Replay group.\n * @param {import(\"../geom/MultiPoint.js\").default|import(\"../render/Feature.js\").default} geometry Geometry.\n * @param {import(\"../style/Style.js\").default} style Style.\n * @param {import(\"../Feature.js\").FeatureLike} feature Feature.\n * @param {import(\"../render/canvas/BuilderGroup.js\").default} [declutterBuilderGroup] Builder for decluttering.\n */\nfunction renderMultiPointGeometry(\n builderGroup,\n geometry,\n style,\n feature,\n declutterBuilderGroup\n) {\n const imageStyle = style.getImage();\n const textStyle = style.getText();\n /** @type {import(\"../render/canvas.js\").DeclutterImageWithText} */\n let declutterImageWithText;\n if (imageStyle) {\n if (imageStyle.getImageState() != ImageState.LOADED) {\n return;\n }\n let imageBuilderGroup = builderGroup;\n if (declutterBuilderGroup) {\n const declutterMode = imageStyle.getDeclutterMode();\n if (declutterMode !== 'none') {\n imageBuilderGroup = declutterBuilderGroup;\n if (declutterMode === 'obstacle') {\n // draw in non-declutter group:\n const imageReplay = builderGroup.getBuilder(\n style.getZIndex(),\n 'Image'\n );\n imageReplay.setImageStyle(imageStyle, declutterImageWithText);\n imageReplay.drawMultiPoint(geometry, feature);\n } else if (textStyle && textStyle.getText()) {\n declutterImageWithText = {};\n }\n }\n }\n const imageReplay = imageBuilderGroup.getBuilder(\n style.getZIndex(),\n 'Image'\n );\n imageReplay.setImageStyle(imageStyle, declutterImageWithText);\n imageReplay.drawMultiPoint(geometry, feature);\n }\n if (textStyle && textStyle.getText()) {\n let textBuilderGroup = builderGroup;\n if (declutterBuilderGroup) {\n textBuilderGroup = declutterBuilderGroup;\n }\n const textReplay = textBuilderGroup.getBuilder(style.getZIndex(), 'Text');\n textReplay.setTextStyle(textStyle, declutterImageWithText);\n textReplay.drawText(geometry, feature);\n }\n}\n\n/**\n * @param {import(\"../render/canvas/BuilderGroup.js\").default} builderGroup Replay group.\n * @param {import(\"../geom/Polygon.js\").default|import(\"../render/Feature.js\").default} geometry Geometry.\n * @param {import(\"../style/Style.js\").default} style Style.\n * @param {import(\"../Feature.js\").FeatureLike} feature Feature.\n * @param {import(\"../render/canvas/BuilderGroup.js\").default} [declutterBuilderGroup] Builder for decluttering.\n */\nfunction renderPolygonGeometry(\n builderGroup,\n geometry,\n style,\n feature,\n declutterBuilderGroup\n) {\n const fillStyle = style.getFill();\n const strokeStyle = style.getStroke();\n if (fillStyle || strokeStyle) {\n const polygonReplay = builderGroup.getBuilder(style.getZIndex(), 'Polygon');\n polygonReplay.setFillStrokeStyle(fillStyle, strokeStyle);\n polygonReplay.drawPolygon(geometry, feature);\n }\n const textStyle = style.getText();\n if (textStyle && textStyle.getText()) {\n const textReplay = (declutterBuilderGroup || builderGroup).getBuilder(\n style.getZIndex(),\n 'Text'\n );\n textReplay.setTextStyle(textStyle);\n textReplay.drawText(geometry, feature);\n }\n}\n","/**\n * @module ol/render\n */\nimport CanvasImmediateRenderer from './render/canvas/Immediate.js';\nimport {DEVICE_PIXEL_RATIO} from './has.js';\nimport {\n apply as applyTransform,\n create as createTransform,\n multiply as multiplyTransform,\n scale as scaleTransform,\n} from './transform.js';\nimport {getSquaredTolerance} from './renderer/vector.js';\nimport {getTransformFromProjections, getUserProjection} from './proj.js';\n\n/**\n * @typedef {Object} State\n * @property {CanvasRenderingContext2D} context Canvas context that the layer is being rendered to.\n * @property {import(\"./Feature.js\").FeatureLike} feature Feature.\n * @property {import(\"./geom/SimpleGeometry.js\").default} geometry Geometry.\n * @property {number} pixelRatio Pixel ratio used by the layer renderer.\n * @property {number} resolution Resolution that the render batch was created and optimized for.\n * This is not the view's resolution that is being rendered.\n * @property {number} rotation Rotation of the rendered layer in radians.\n */\n\n/**\n * A function to be used when sorting features before rendering.\n * It takes two instances of {@link module:ol/Feature~Feature} or\n * {@link module:ol/render/Feature~RenderFeature} and returns a `{number}`.\n *\n * @typedef {function(import(\"./Feature.js\").FeatureLike, import(\"./Feature.js\").FeatureLike):number} OrderFunction\n */\n\n/**\n * @typedef {Object} ToContextOptions\n * @property {import(\"./size.js\").Size} [size] Desired size of the canvas in css\n * pixels. When provided, both canvas and css size will be set according to the\n * `pixelRatio`. If not provided, the current canvas and css sizes will not be\n * altered.\n * @property {number} [pixelRatio=window.devicePixelRatio] Pixel ratio (canvas\n * pixel to css pixel ratio) for the canvas.\n */\n\n/**\n * Binds a Canvas Immediate API to a canvas context, to allow drawing geometries\n * to the context's canvas.\n *\n * The units for geometry coordinates are css pixels relative to the top left\n * corner of the canvas element.\n * ```js\n * import {toContext} from 'ol/render.js';\n * import Fill from 'ol/style/Fill.js';\n * import Polygon from 'ol/geom/Polygon.js';\n *\n * const canvas = document.createElement('canvas');\n * const render = toContext(\n * canvas.getContext('2d'),\n * {size: [100, 100]}\n * );\n * render.setFillStrokeStyle(new Fill({ color: blue }));\n * render.drawPolygon(\n * new Polygon([[[0, 0], [100, 100], [100, 0], [0, 0]]])\n * );\n * ```\n *\n * @param {CanvasRenderingContext2D} context Canvas context.\n * @param {ToContextOptions} [options] Options.\n * @return {CanvasImmediateRenderer} Canvas Immediate.\n * @api\n */\nexport function toContext(context, options) {\n const canvas = context.canvas;\n options = options ? options : {};\n const pixelRatio = options.pixelRatio || DEVICE_PIXEL_RATIO;\n const size = options.size;\n if (size) {\n canvas.width = size[0] * pixelRatio;\n canvas.height = size[1] * pixelRatio;\n canvas.style.width = size[0] + 'px';\n canvas.style.height = size[1] + 'px';\n }\n const extent = [0, 0, canvas.width, canvas.height];\n const transform = scaleTransform(createTransform(), pixelRatio, pixelRatio);\n return new CanvasImmediateRenderer(context, pixelRatio, extent, transform, 0);\n}\n\n/**\n * Gets a vector context for drawing to the event's canvas.\n * @param {import(\"./render/Event.js\").default} event Render event.\n * @return {CanvasImmediateRenderer} Vector context.\n * @api\n */\nexport function getVectorContext(event) {\n if (!(event.context instanceof CanvasRenderingContext2D)) {\n throw new Error('Only works for render events from Canvas 2D layers');\n }\n\n // canvas may be at a different pixel ratio than frameState.pixelRatio\n const a = event.inversePixelTransform[0];\n const b = event.inversePixelTransform[1];\n const canvasPixelRatio = Math.sqrt(a * a + b * b);\n const frameState = event.frameState;\n const transform = multiplyTransform(\n event.inversePixelTransform.slice(),\n frameState.coordinateToPixelTransform\n );\n const squaredTolerance = getSquaredTolerance(\n frameState.viewState.resolution,\n canvasPixelRatio\n );\n let userTransform;\n const userProjection = getUserProjection();\n if (userProjection) {\n userTransform = getTransformFromProjections(\n userProjection,\n frameState.viewState.projection\n );\n }\n\n return new CanvasImmediateRenderer(\n event.context,\n canvasPixelRatio,\n frameState.extent,\n transform,\n frameState.viewState.rotation,\n squaredTolerance,\n userTransform\n );\n}\n\n/**\n * Gets the pixel of the event's canvas context from the map viewport's CSS pixel.\n * @param {import(\"./render/Event.js\").default} event Render event.\n * @param {import(\"./pixel.js\").Pixel} pixel CSS pixel relative to the top-left\n * corner of the map viewport.\n * @return {import(\"./pixel.js\").Pixel} Pixel on the event's canvas context.\n * @api\n */\nexport function getRenderPixel(event, pixel) {\n return applyTransform(event.inversePixelTransform, pixel.slice(0));\n}\n","/**\n * @module ol/reproj\n */\nimport {\n containsCoordinate,\n createEmpty,\n extend,\n forEachCorner,\n getCenter,\n getHeight,\n getTopLeft,\n getWidth,\n} from './extent.js';\nimport {createCanvasContext2D, releaseCanvas} from './dom.js';\nimport {getPointResolution, transform} from './proj.js';\nimport {solveLinearSystem} from './math.js';\n\nlet brokenDiagonalRendering_;\n\n/**\n * @type {Array}\n */\nexport const canvasPool = [];\n\n/**\n * This draws a small triangle into a canvas by setting the triangle as the clip region\n * and then drawing a (too large) rectangle\n *\n * @param {CanvasRenderingContext2D} ctx The context in which to draw the triangle\n * @param {number} u1 The x-coordinate of the second point. The first point is 0,0.\n * @param {number} v1 The y-coordinate of the second point.\n * @param {number} u2 The x-coordinate of the third point.\n * @param {number} v2 The y-coordinate of the third point.\n */\nfunction drawTestTriangle(ctx, u1, v1, u2, v2) {\n ctx.beginPath();\n ctx.moveTo(0, 0);\n ctx.lineTo(u1, v1);\n ctx.lineTo(u2, v2);\n ctx.closePath();\n ctx.save();\n ctx.clip();\n ctx.fillRect(0, 0, Math.max(u1, u2) + 1, Math.max(v1, v2));\n ctx.restore();\n}\n\n/**\n * Given the data from getImageData, see if the right values appear at the provided offset.\n * Returns true if either the color or transparency is off\n *\n * @param {Uint8ClampedArray} data The data returned from getImageData\n * @param {number} offset The pixel offset from the start of data.\n * @return {boolean} true if the diagonal rendering is broken\n */\nfunction verifyBrokenDiagonalRendering(data, offset) {\n // the values ought to be close to the rgba(210, 0, 0, 0.75)\n return (\n Math.abs(data[offset * 4] - 210) > 2 ||\n Math.abs(data[offset * 4 + 3] - 0.75 * 255) > 2\n );\n}\n\n/**\n * Determines if the current browser configuration can render triangular clip regions correctly.\n * This value is cached so the function is only expensive the first time called.\n * Firefox on Windows (as of now) does not if HWA is enabled. See https://bugzilla.mozilla.org/show_bug.cgi?id=1606976\n * Chrome works, and everything seems to work on OSX and Android. This function caches the\n * result. I suppose that it is conceivably possible that a browser might flip modes while the app is\n * running, but lets hope not.\n *\n * @return {boolean} true if the Diagonal Rendering is broken.\n */\nfunction isBrokenDiagonalRendering() {\n if (brokenDiagonalRendering_ === undefined) {\n const ctx = createCanvasContext2D(6, 6, canvasPool);\n ctx.globalCompositeOperation = 'lighter';\n ctx.fillStyle = 'rgba(210, 0, 0, 0.75)';\n drawTestTriangle(ctx, 4, 5, 4, 0);\n drawTestTriangle(ctx, 4, 5, 0, 5);\n const data = ctx.getImageData(0, 0, 3, 3).data;\n brokenDiagonalRendering_ =\n verifyBrokenDiagonalRendering(data, 0) ||\n verifyBrokenDiagonalRendering(data, 4) ||\n verifyBrokenDiagonalRendering(data, 8);\n releaseCanvas(ctx);\n canvasPool.push(ctx.canvas);\n }\n\n return brokenDiagonalRendering_;\n}\n\n/**\n * Calculates ideal resolution to use from the source in order to achieve\n * pixel mapping as close as possible to 1:1 during reprojection.\n * The resolution is calculated regardless of what resolutions\n * are actually available in the dataset (TileGrid, Image, ...).\n *\n * @param {import(\"./proj/Projection.js\").default} sourceProj Source projection.\n * @param {import(\"./proj/Projection.js\").default} targetProj Target projection.\n * @param {import(\"./coordinate.js\").Coordinate} targetCenter Target center.\n * @param {number} targetResolution Target resolution.\n * @return {number} The best resolution to use. Can be +-Infinity, NaN or 0.\n */\nexport function calculateSourceResolution(\n sourceProj,\n targetProj,\n targetCenter,\n targetResolution\n) {\n const sourceCenter = transform(targetCenter, targetProj, sourceProj);\n\n // calculate the ideal resolution of the source data\n let sourceResolution = getPointResolution(\n targetProj,\n targetResolution,\n targetCenter\n );\n\n const targetMetersPerUnit = targetProj.getMetersPerUnit();\n if (targetMetersPerUnit !== undefined) {\n sourceResolution *= targetMetersPerUnit;\n }\n const sourceMetersPerUnit = sourceProj.getMetersPerUnit();\n if (sourceMetersPerUnit !== undefined) {\n sourceResolution /= sourceMetersPerUnit;\n }\n\n // Based on the projection properties, the point resolution at the specified\n // coordinates may be slightly different. We need to reverse-compensate this\n // in order to achieve optimal results.\n\n const sourceExtent = sourceProj.getExtent();\n if (!sourceExtent || containsCoordinate(sourceExtent, sourceCenter)) {\n const compensationFactor =\n getPointResolution(sourceProj, sourceResolution, sourceCenter) /\n sourceResolution;\n if (isFinite(compensationFactor) && compensationFactor > 0) {\n sourceResolution /= compensationFactor;\n }\n }\n\n return sourceResolution;\n}\n\n/**\n * Calculates ideal resolution to use from the source in order to achieve\n * pixel mapping as close as possible to 1:1 during reprojection.\n * The resolution is calculated regardless of what resolutions\n * are actually available in the dataset (TileGrid, Image, ...).\n *\n * @param {import(\"./proj/Projection.js\").default} sourceProj Source projection.\n * @param {import(\"./proj/Projection.js\").default} targetProj Target projection.\n * @param {import(\"./extent.js\").Extent} targetExtent Target extent\n * @param {number} targetResolution Target resolution.\n * @return {number} The best resolution to use. Can be +-Infinity, NaN or 0.\n */\nexport function calculateSourceExtentResolution(\n sourceProj,\n targetProj,\n targetExtent,\n targetResolution\n) {\n const targetCenter = getCenter(targetExtent);\n let sourceResolution = calculateSourceResolution(\n sourceProj,\n targetProj,\n targetCenter,\n targetResolution\n );\n\n if (!isFinite(sourceResolution) || sourceResolution <= 0) {\n forEachCorner(targetExtent, function (corner) {\n sourceResolution = calculateSourceResolution(\n sourceProj,\n targetProj,\n corner,\n targetResolution\n );\n return isFinite(sourceResolution) && sourceResolution > 0;\n });\n }\n\n return sourceResolution;\n}\n\n/**\n * @typedef {Object} ImageExtent\n * @property {import(\"./extent.js\").Extent} extent Extent.\n * @property {HTMLCanvasElement|HTMLImageElement|HTMLVideoElement} image Image.\n */\n\n/**\n * Renders the source data into new canvas based on the triangulation.\n *\n * @param {number} width Width of the canvas.\n * @param {number} height Height of the canvas.\n * @param {number} pixelRatio Pixel ratio.\n * @param {number} sourceResolution Source resolution.\n * @param {import(\"./extent.js\").Extent} sourceExtent Extent of the data source.\n * @param {number} targetResolution Target resolution.\n * @param {import(\"./extent.js\").Extent} targetExtent Target extent.\n * @param {import(\"./reproj/Triangulation.js\").default} triangulation Calculated triangulation.\n * @param {Array} sources Array of sources.\n * @param {number} gutter Gutter of the sources.\n * @param {boolean} [renderEdges] Render reprojection edges.\n * @param {boolean} [interpolate] Use linear interpolation when resampling.\n * @return {HTMLCanvasElement} Canvas with reprojected data.\n */\nexport function render(\n width,\n height,\n pixelRatio,\n sourceResolution,\n sourceExtent,\n targetResolution,\n targetExtent,\n triangulation,\n sources,\n gutter,\n renderEdges,\n interpolate\n) {\n const context = createCanvasContext2D(\n Math.round(pixelRatio * width),\n Math.round(pixelRatio * height),\n canvasPool\n );\n\n if (!interpolate) {\n context.imageSmoothingEnabled = false;\n }\n\n if (sources.length === 0) {\n return context.canvas;\n }\n\n context.scale(pixelRatio, pixelRatio);\n\n function pixelRound(value) {\n return Math.round(value * pixelRatio) / pixelRatio;\n }\n\n context.globalCompositeOperation = 'lighter';\n\n const sourceDataExtent = createEmpty();\n sources.forEach(function (src, i, arr) {\n extend(sourceDataExtent, src.extent);\n });\n\n const canvasWidthInUnits = getWidth(sourceDataExtent);\n const canvasHeightInUnits = getHeight(sourceDataExtent);\n const stitchContext = createCanvasContext2D(\n Math.round((pixelRatio * canvasWidthInUnits) / sourceResolution),\n Math.round((pixelRatio * canvasHeightInUnits) / sourceResolution),\n canvasPool\n );\n\n if (!interpolate) {\n stitchContext.imageSmoothingEnabled = false;\n }\n\n const stitchScale = pixelRatio / sourceResolution;\n\n sources.forEach(function (src, i, arr) {\n const xPos = src.extent[0] - sourceDataExtent[0];\n const yPos = -(src.extent[3] - sourceDataExtent[3]);\n const srcWidth = getWidth(src.extent);\n const srcHeight = getHeight(src.extent);\n\n // This test should never fail -- but it does. Need to find a fix the upstream condition\n if (src.image.width > 0 && src.image.height > 0) {\n stitchContext.drawImage(\n src.image,\n gutter,\n gutter,\n src.image.width - 2 * gutter,\n src.image.height - 2 * gutter,\n xPos * stitchScale,\n yPos * stitchScale,\n srcWidth * stitchScale,\n srcHeight * stitchScale\n );\n }\n });\n\n const targetTopLeft = getTopLeft(targetExtent);\n\n triangulation.getTriangles().forEach(function (triangle, i, arr) {\n /* Calculate affine transform (src -> dst)\n * Resulting matrix can be used to transform coordinate\n * from `sourceProjection` to destination pixels.\n *\n * To optimize number of context calls and increase numerical stability,\n * we also do the following operations:\n * trans(-topLeftExtentCorner), scale(1 / targetResolution), scale(1, -1)\n * here before solving the linear system so [ui, vi] are pixel coordinates.\n *\n * Src points: xi, yi\n * Dst points: ui, vi\n * Affine coefficients: aij\n *\n * | x0 y0 1 0 0 0 | |a00| |u0|\n * | x1 y1 1 0 0 0 | |a01| |u1|\n * | x2 y2 1 0 0 0 | x |a02| = |u2|\n * | 0 0 0 x0 y0 1 | |a10| |v0|\n * | 0 0 0 x1 y1 1 | |a11| |v1|\n * | 0 0 0 x2 y2 1 | |a12| |v2|\n */\n const source = triangle.source;\n const target = triangle.target;\n let x0 = source[0][0],\n y0 = source[0][1];\n let x1 = source[1][0],\n y1 = source[1][1];\n let x2 = source[2][0],\n y2 = source[2][1];\n // Make sure that everything is on pixel boundaries\n const u0 = pixelRound((target[0][0] - targetTopLeft[0]) / targetResolution);\n const v0 = pixelRound(\n -(target[0][1] - targetTopLeft[1]) / targetResolution\n );\n const u1 = pixelRound((target[1][0] - targetTopLeft[0]) / targetResolution);\n const v1 = pixelRound(\n -(target[1][1] - targetTopLeft[1]) / targetResolution\n );\n const u2 = pixelRound((target[2][0] - targetTopLeft[0]) / targetResolution);\n const v2 = pixelRound(\n -(target[2][1] - targetTopLeft[1]) / targetResolution\n );\n\n // Shift all the source points to improve numerical stability\n // of all the subsequent calculations. The [x0, y0] is used here.\n // This is also used to simplify the linear system.\n const sourceNumericalShiftX = x0;\n const sourceNumericalShiftY = y0;\n x0 = 0;\n y0 = 0;\n x1 -= sourceNumericalShiftX;\n y1 -= sourceNumericalShiftY;\n x2 -= sourceNumericalShiftX;\n y2 -= sourceNumericalShiftY;\n\n const augmentedMatrix = [\n [x1, y1, 0, 0, u1 - u0],\n [x2, y2, 0, 0, u2 - u0],\n [0, 0, x1, y1, v1 - v0],\n [0, 0, x2, y2, v2 - v0],\n ];\n const affineCoefs = solveLinearSystem(augmentedMatrix);\n if (!affineCoefs) {\n return;\n }\n\n context.save();\n context.beginPath();\n\n if (isBrokenDiagonalRendering() || !interpolate) {\n // Make sure that all lines are horizontal or vertical\n context.moveTo(u1, v1);\n // This is the diagonal line. Do it in 4 steps\n const steps = 4;\n const ud = u0 - u1;\n const vd = v0 - v1;\n for (let step = 0; step < steps; step++) {\n // Go horizontally\n context.lineTo(\n u1 + pixelRound(((step + 1) * ud) / steps),\n v1 + pixelRound((step * vd) / (steps - 1))\n );\n // Go vertically\n if (step != steps - 1) {\n context.lineTo(\n u1 + pixelRound(((step + 1) * ud) / steps),\n v1 + pixelRound(((step + 1) * vd) / (steps - 1))\n );\n }\n }\n // We are almost at u0r, v0r\n context.lineTo(u2, v2);\n } else {\n context.moveTo(u1, v1);\n context.lineTo(u0, v0);\n context.lineTo(u2, v2);\n }\n\n context.clip();\n\n context.transform(\n affineCoefs[0],\n affineCoefs[2],\n affineCoefs[1],\n affineCoefs[3],\n u0,\n v0\n );\n\n context.translate(\n sourceDataExtent[0] - sourceNumericalShiftX,\n sourceDataExtent[3] - sourceNumericalShiftY\n );\n\n context.scale(\n sourceResolution / pixelRatio,\n -sourceResolution / pixelRatio\n );\n\n context.drawImage(stitchContext.canvas, 0, 0);\n context.restore();\n });\n\n releaseCanvas(stitchContext);\n canvasPool.push(stitchContext.canvas);\n\n if (renderEdges) {\n context.save();\n\n context.globalCompositeOperation = 'source-over';\n context.strokeStyle = 'black';\n context.lineWidth = 1;\n\n triangulation.getTriangles().forEach(function (triangle, i, arr) {\n const target = triangle.target;\n const u0 = (target[0][0] - targetTopLeft[0]) / targetResolution;\n const v0 = -(target[0][1] - targetTopLeft[1]) / targetResolution;\n const u1 = (target[1][0] - targetTopLeft[0]) / targetResolution;\n const v1 = -(target[1][1] - targetTopLeft[1]) / targetResolution;\n const u2 = (target[2][0] - targetTopLeft[0]) / targetResolution;\n const v2 = -(target[2][1] - targetTopLeft[1]) / targetResolution;\n\n context.beginPath();\n context.moveTo(u1, v1);\n context.lineTo(u0, v0);\n context.lineTo(u2, v2);\n context.closePath();\n context.stroke();\n });\n\n context.restore();\n }\n return context.canvas;\n}\n","/**\n * @module ol/reproj/common\n */\n\n/**\n * Default maximum allowed threshold (in pixels) for reprojection\n * triangulation.\n * @type {number}\n */\nexport const ERROR_THRESHOLD = 0.5;\n","/**\n * @module ol/reproj/Triangulation\n */\nimport {\n boundingExtent,\n createEmpty,\n extendCoordinate,\n getArea,\n getBottomLeft,\n getBottomRight,\n getTopLeft,\n getTopRight,\n getWidth,\n intersects,\n} from '../extent.js';\nimport {getTransform} from '../proj.js';\nimport {modulo} from '../math.js';\n\n/**\n * Single triangle; consists of 3 source points and 3 target points.\n * @typedef {Object} Triangle\n * @property {Array} source Source.\n * @property {Array} target Target.\n */\n\n/**\n * Maximum number of subdivision steps during raster reprojection triangulation.\n * Prevents high memory usage and large number of proj4 calls (for certain\n * transformations and areas). At most `2*(2^this)` triangles are created for\n * each triangulated extent (tile/image).\n * @type {number}\n */\nconst MAX_SUBDIVISION = 10;\n\n/**\n * Maximum allowed size of triangle relative to world width. When transforming\n * corners of world extent between certain projections, the resulting\n * triangulation seems to have zero error and no subdivision is performed. If\n * the triangle width is more than this (relative to world width; 0-1),\n * subdivison is forced (up to `MAX_SUBDIVISION`). Default is `0.25`.\n * @type {number}\n */\nconst MAX_TRIANGLE_WIDTH = 0.25;\n\n/**\n * @classdesc\n * Class containing triangulation of the given target extent.\n * Used for determining source data and the reprojection itself.\n */\nclass Triangulation {\n /**\n * @param {import(\"../proj/Projection.js\").default} sourceProj Source projection.\n * @param {import(\"../proj/Projection.js\").default} targetProj Target projection.\n * @param {import(\"../extent.js\").Extent} targetExtent Target extent to triangulate.\n * @param {import(\"../extent.js\").Extent} maxSourceExtent Maximal source extent that can be used.\n * @param {number} errorThreshold Acceptable error (in source units).\n * @param {?number} destinationResolution The (optional) resolution of the destination.\n */\n constructor(\n sourceProj,\n targetProj,\n targetExtent,\n maxSourceExtent,\n errorThreshold,\n destinationResolution\n ) {\n /**\n * @type {import(\"../proj/Projection.js\").default}\n * @private\n */\n this.sourceProj_ = sourceProj;\n\n /**\n * @type {import(\"../proj/Projection.js\").default}\n * @private\n */\n this.targetProj_ = targetProj;\n\n /** @type {!Object} */\n let transformInvCache = {};\n const transformInv = getTransform(this.targetProj_, this.sourceProj_);\n\n /**\n * @param {import(\"../coordinate.js\").Coordinate} c A coordinate.\n * @return {import(\"../coordinate.js\").Coordinate} Transformed coordinate.\n * @private\n */\n this.transformInv_ = function (c) {\n const key = c[0] + '/' + c[1];\n if (!transformInvCache[key]) {\n transformInvCache[key] = transformInv(c);\n }\n return transformInvCache[key];\n };\n\n /**\n * @type {import(\"../extent.js\").Extent}\n * @private\n */\n this.maxSourceExtent_ = maxSourceExtent;\n\n /**\n * @type {number}\n * @private\n */\n this.errorThresholdSquared_ = errorThreshold * errorThreshold;\n\n /**\n * @type {Array}\n * @private\n */\n this.triangles_ = [];\n\n /**\n * Indicates that the triangulation crosses edge of the source projection.\n * @type {boolean}\n * @private\n */\n this.wrapsXInSource_ = false;\n\n /**\n * @type {boolean}\n * @private\n */\n this.canWrapXInSource_ =\n this.sourceProj_.canWrapX() &&\n !!maxSourceExtent &&\n !!this.sourceProj_.getExtent() &&\n getWidth(maxSourceExtent) == getWidth(this.sourceProj_.getExtent());\n\n /**\n * @type {?number}\n * @private\n */\n this.sourceWorldWidth_ = this.sourceProj_.getExtent()\n ? getWidth(this.sourceProj_.getExtent())\n : null;\n\n /**\n * @type {?number}\n * @private\n */\n this.targetWorldWidth_ = this.targetProj_.getExtent()\n ? getWidth(this.targetProj_.getExtent())\n : null;\n\n const destinationTopLeft = getTopLeft(targetExtent);\n const destinationTopRight = getTopRight(targetExtent);\n const destinationBottomRight = getBottomRight(targetExtent);\n const destinationBottomLeft = getBottomLeft(targetExtent);\n const sourceTopLeft = this.transformInv_(destinationTopLeft);\n const sourceTopRight = this.transformInv_(destinationTopRight);\n const sourceBottomRight = this.transformInv_(destinationBottomRight);\n const sourceBottomLeft = this.transformInv_(destinationBottomLeft);\n\n /*\n * The maxSubdivision controls how many splittings of the target area can\n * be done. The idea here is to do a linear mapping of the target areas\n * but the actual overal reprojection (can be) extremely non-linear. The\n * default value of MAX_SUBDIVISION was chosen based on mapping a 256x256\n * tile size. However this function is also called to remap canvas rendered\n * layers which can be much larger. This calculation increases the maxSubdivision\n * value by the right factor so that each 256x256 pixel area has\n * MAX_SUBDIVISION divisions.\n */\n const maxSubdivision =\n MAX_SUBDIVISION +\n (destinationResolution\n ? Math.max(\n 0,\n Math.ceil(\n Math.log2(\n getArea(targetExtent) /\n (destinationResolution * destinationResolution * 256 * 256)\n )\n )\n )\n : 0);\n\n this.addQuad_(\n destinationTopLeft,\n destinationTopRight,\n destinationBottomRight,\n destinationBottomLeft,\n sourceTopLeft,\n sourceTopRight,\n sourceBottomRight,\n sourceBottomLeft,\n maxSubdivision\n );\n\n if (this.wrapsXInSource_) {\n let leftBound = Infinity;\n this.triangles_.forEach(function (triangle, i, arr) {\n leftBound = Math.min(\n leftBound,\n triangle.source[0][0],\n triangle.source[1][0],\n triangle.source[2][0]\n );\n });\n\n // Shift triangles to be as close to `leftBound` as possible\n // (if the distance is more than `worldWidth / 2` it can be closer.\n this.triangles_.forEach((triangle) => {\n if (\n Math.max(\n triangle.source[0][0],\n triangle.source[1][0],\n triangle.source[2][0]\n ) -\n leftBound >\n this.sourceWorldWidth_ / 2\n ) {\n const newTriangle = [\n [triangle.source[0][0], triangle.source[0][1]],\n [triangle.source[1][0], triangle.source[1][1]],\n [triangle.source[2][0], triangle.source[2][1]],\n ];\n if (newTriangle[0][0] - leftBound > this.sourceWorldWidth_ / 2) {\n newTriangle[0][0] -= this.sourceWorldWidth_;\n }\n if (newTriangle[1][0] - leftBound > this.sourceWorldWidth_ / 2) {\n newTriangle[1][0] -= this.sourceWorldWidth_;\n }\n if (newTriangle[2][0] - leftBound > this.sourceWorldWidth_ / 2) {\n newTriangle[2][0] -= this.sourceWorldWidth_;\n }\n\n // Rarely (if the extent contains both the dateline and prime meridian)\n // the shift can in turn break some triangles.\n // Detect this here and don't shift in such cases.\n const minX = Math.min(\n newTriangle[0][0],\n newTriangle[1][0],\n newTriangle[2][0]\n );\n const maxX = Math.max(\n newTriangle[0][0],\n newTriangle[1][0],\n newTriangle[2][0]\n );\n if (maxX - minX < this.sourceWorldWidth_ / 2) {\n triangle.source = newTriangle;\n }\n }\n });\n }\n\n transformInvCache = {};\n }\n\n /**\n * Adds triangle to the triangulation.\n * @param {import(\"../coordinate.js\").Coordinate} a The target a coordinate.\n * @param {import(\"../coordinate.js\").Coordinate} b The target b coordinate.\n * @param {import(\"../coordinate.js\").Coordinate} c The target c coordinate.\n * @param {import(\"../coordinate.js\").Coordinate} aSrc The source a coordinate.\n * @param {import(\"../coordinate.js\").Coordinate} bSrc The source b coordinate.\n * @param {import(\"../coordinate.js\").Coordinate} cSrc The source c coordinate.\n * @private\n */\n addTriangle_(a, b, c, aSrc, bSrc, cSrc) {\n this.triangles_.push({\n source: [aSrc, bSrc, cSrc],\n target: [a, b, c],\n });\n }\n\n /**\n * Adds quad (points in clock-wise order) to the triangulation\n * (and reprojects the vertices) if valid.\n * Performs quad subdivision if needed to increase precision.\n *\n * @param {import(\"../coordinate.js\").Coordinate} a The target a coordinate.\n * @param {import(\"../coordinate.js\").Coordinate} b The target b coordinate.\n * @param {import(\"../coordinate.js\").Coordinate} c The target c coordinate.\n * @param {import(\"../coordinate.js\").Coordinate} d The target d coordinate.\n * @param {import(\"../coordinate.js\").Coordinate} aSrc The source a coordinate.\n * @param {import(\"../coordinate.js\").Coordinate} bSrc The source b coordinate.\n * @param {import(\"../coordinate.js\").Coordinate} cSrc The source c coordinate.\n * @param {import(\"../coordinate.js\").Coordinate} dSrc The source d coordinate.\n * @param {number} maxSubdivision Maximal allowed subdivision of the quad.\n * @private\n */\n addQuad_(a, b, c, d, aSrc, bSrc, cSrc, dSrc, maxSubdivision) {\n const sourceQuadExtent = boundingExtent([aSrc, bSrc, cSrc, dSrc]);\n const sourceCoverageX = this.sourceWorldWidth_\n ? getWidth(sourceQuadExtent) / this.sourceWorldWidth_\n : null;\n const sourceWorldWidth = /** @type {number} */ (this.sourceWorldWidth_);\n\n // when the quad is wrapped in the source projection\n // it covers most of the projection extent, but not fully\n const wrapsX =\n this.sourceProj_.canWrapX() &&\n sourceCoverageX > 0.5 &&\n sourceCoverageX < 1;\n\n let needsSubdivision = false;\n\n if (maxSubdivision > 0) {\n if (this.targetProj_.isGlobal() && this.targetWorldWidth_) {\n const targetQuadExtent = boundingExtent([a, b, c, d]);\n const targetCoverageX =\n getWidth(targetQuadExtent) / this.targetWorldWidth_;\n needsSubdivision =\n targetCoverageX > MAX_TRIANGLE_WIDTH || needsSubdivision;\n }\n if (!wrapsX && this.sourceProj_.isGlobal() && sourceCoverageX) {\n needsSubdivision =\n sourceCoverageX > MAX_TRIANGLE_WIDTH || needsSubdivision;\n }\n }\n\n if (!needsSubdivision && this.maxSourceExtent_) {\n if (\n isFinite(sourceQuadExtent[0]) &&\n isFinite(sourceQuadExtent[1]) &&\n isFinite(sourceQuadExtent[2]) &&\n isFinite(sourceQuadExtent[3])\n ) {\n if (!intersects(sourceQuadExtent, this.maxSourceExtent_)) {\n // whole quad outside source projection extent -> ignore\n return;\n }\n }\n }\n\n let isNotFinite = 0;\n\n if (!needsSubdivision) {\n if (\n !isFinite(aSrc[0]) ||\n !isFinite(aSrc[1]) ||\n !isFinite(bSrc[0]) ||\n !isFinite(bSrc[1]) ||\n !isFinite(cSrc[0]) ||\n !isFinite(cSrc[1]) ||\n !isFinite(dSrc[0]) ||\n !isFinite(dSrc[1])\n ) {\n if (maxSubdivision > 0) {\n needsSubdivision = true;\n } else {\n // It might be the case that only 1 of the points is infinite. In this case\n // we can draw a single triangle with the other three points\n isNotFinite =\n (!isFinite(aSrc[0]) || !isFinite(aSrc[1]) ? 8 : 0) +\n (!isFinite(bSrc[0]) || !isFinite(bSrc[1]) ? 4 : 0) +\n (!isFinite(cSrc[0]) || !isFinite(cSrc[1]) ? 2 : 0) +\n (!isFinite(dSrc[0]) || !isFinite(dSrc[1]) ? 1 : 0);\n if (\n isNotFinite != 1 &&\n isNotFinite != 2 &&\n isNotFinite != 4 &&\n isNotFinite != 8\n ) {\n return;\n }\n }\n }\n }\n\n if (maxSubdivision > 0) {\n if (!needsSubdivision) {\n const center = [(a[0] + c[0]) / 2, (a[1] + c[1]) / 2];\n const centerSrc = this.transformInv_(center);\n\n let dx;\n if (wrapsX) {\n const centerSrcEstimX =\n (modulo(aSrc[0], sourceWorldWidth) +\n modulo(cSrc[0], sourceWorldWidth)) /\n 2;\n dx = centerSrcEstimX - modulo(centerSrc[0], sourceWorldWidth);\n } else {\n dx = (aSrc[0] + cSrc[0]) / 2 - centerSrc[0];\n }\n const dy = (aSrc[1] + cSrc[1]) / 2 - centerSrc[1];\n const centerSrcErrorSquared = dx * dx + dy * dy;\n needsSubdivision = centerSrcErrorSquared > this.errorThresholdSquared_;\n }\n if (needsSubdivision) {\n if (Math.abs(a[0] - c[0]) <= Math.abs(a[1] - c[1])) {\n // split horizontally (top & bottom)\n const bc = [(b[0] + c[0]) / 2, (b[1] + c[1]) / 2];\n const bcSrc = this.transformInv_(bc);\n const da = [(d[0] + a[0]) / 2, (d[1] + a[1]) / 2];\n const daSrc = this.transformInv_(da);\n\n this.addQuad_(\n a,\n b,\n bc,\n da,\n aSrc,\n bSrc,\n bcSrc,\n daSrc,\n maxSubdivision - 1\n );\n this.addQuad_(\n da,\n bc,\n c,\n d,\n daSrc,\n bcSrc,\n cSrc,\n dSrc,\n maxSubdivision - 1\n );\n } else {\n // split vertically (left & right)\n const ab = [(a[0] + b[0]) / 2, (a[1] + b[1]) / 2];\n const abSrc = this.transformInv_(ab);\n const cd = [(c[0] + d[0]) / 2, (c[1] + d[1]) / 2];\n const cdSrc = this.transformInv_(cd);\n\n this.addQuad_(\n a,\n ab,\n cd,\n d,\n aSrc,\n abSrc,\n cdSrc,\n dSrc,\n maxSubdivision - 1\n );\n this.addQuad_(\n ab,\n b,\n c,\n cd,\n abSrc,\n bSrc,\n cSrc,\n cdSrc,\n maxSubdivision - 1\n );\n }\n return;\n }\n }\n\n if (wrapsX) {\n if (!this.canWrapXInSource_) {\n return;\n }\n this.wrapsXInSource_ = true;\n }\n\n // Exactly zero or one of *Src is not finite\n // The triangles must have the diagonal line as the first side\n // This is to allow easy code in reproj.s to make it straight for broken\n // browsers that can't handle diagonal clipping\n if ((isNotFinite & 0xb) == 0) {\n this.addTriangle_(a, c, d, aSrc, cSrc, dSrc);\n }\n if ((isNotFinite & 0xe) == 0) {\n this.addTriangle_(a, c, b, aSrc, cSrc, bSrc);\n }\n if (isNotFinite) {\n // Try the other two triangles\n if ((isNotFinite & 0xd) == 0) {\n this.addTriangle_(b, d, a, bSrc, dSrc, aSrc);\n }\n if ((isNotFinite & 0x7) == 0) {\n this.addTriangle_(b, d, c, bSrc, dSrc, cSrc);\n }\n }\n }\n\n /**\n * Calculates extent of the `source` coordinates from all the triangles.\n *\n * @return {import(\"../extent.js\").Extent} Calculated extent.\n */\n calculateSourceExtent() {\n const extent = createEmpty();\n\n this.triangles_.forEach(function (triangle, i, arr) {\n const src = triangle.source;\n extendCoordinate(extent, src[0]);\n extendCoordinate(extent, src[1]);\n extendCoordinate(extent, src[2]);\n });\n\n return extent;\n }\n\n /**\n * @return {Array} Array of the calculated triangles.\n */\n getTriangles() {\n return this.triangles_;\n }\n}\n\nexport default Triangulation;\n","/**\n * @module ol/reproj/Tile\n */\nimport {ERROR_THRESHOLD} from './common.js';\n\nimport EventType from '../events/EventType.js';\nimport Tile from '../Tile.js';\nimport TileState from '../TileState.js';\nimport Triangulation from './Triangulation.js';\nimport {\n calculateSourceExtentResolution,\n canvasPool,\n render as renderReprojected,\n} from '../reproj.js';\nimport {clamp} from '../math.js';\nimport {getArea, getIntersection} from '../extent.js';\nimport {listen, unlistenByKey} from '../events.js';\nimport {releaseCanvas} from '../dom.js';\n\n/**\n * @typedef {function(number, number, number, number) : (import(\"../ImageTile.js\").default)} FunctionType\n */\n\n/**\n * @classdesc\n * Class encapsulating single reprojected tile.\n * See {@link module:ol/source/TileImage~TileImage}.\n *\n */\nclass ReprojTile extends Tile {\n /**\n * @param {import(\"../proj/Projection.js\").default} sourceProj Source projection.\n * @param {import(\"../tilegrid/TileGrid.js\").default} sourceTileGrid Source tile grid.\n * @param {import(\"../proj/Projection.js\").default} targetProj Target projection.\n * @param {import(\"../tilegrid/TileGrid.js\").default} targetTileGrid Target tile grid.\n * @param {import(\"../tilecoord.js\").TileCoord} tileCoord Coordinate of the tile.\n * @param {import(\"../tilecoord.js\").TileCoord} wrappedTileCoord Coordinate of the tile wrapped in X.\n * @param {number} pixelRatio Pixel ratio.\n * @param {number} gutter Gutter of the source tiles.\n * @param {FunctionType} getTileFunction\n * Function returning source tiles (z, x, y, pixelRatio).\n * @param {number} [errorThreshold] Acceptable reprojection error (in px).\n * @param {boolean} [renderEdges] Render reprojection edges.\n * @param {boolean} [interpolate] Use linear interpolation when resampling.\n */\n constructor(\n sourceProj,\n sourceTileGrid,\n targetProj,\n targetTileGrid,\n tileCoord,\n wrappedTileCoord,\n pixelRatio,\n gutter,\n getTileFunction,\n errorThreshold,\n renderEdges,\n interpolate\n ) {\n super(tileCoord, TileState.IDLE, {interpolate: !!interpolate});\n\n /**\n * @private\n * @type {boolean}\n */\n this.renderEdges_ = renderEdges !== undefined ? renderEdges : false;\n\n /**\n * @private\n * @type {number}\n */\n this.pixelRatio_ = pixelRatio;\n\n /**\n * @private\n * @type {number}\n */\n this.gutter_ = gutter;\n\n /**\n * @private\n * @type {HTMLCanvasElement}\n */\n this.canvas_ = null;\n\n /**\n * @private\n * @type {import(\"../tilegrid/TileGrid.js\").default}\n */\n this.sourceTileGrid_ = sourceTileGrid;\n\n /**\n * @private\n * @type {import(\"../tilegrid/TileGrid.js\").default}\n */\n this.targetTileGrid_ = targetTileGrid;\n\n /**\n * @private\n * @type {import(\"../tilecoord.js\").TileCoord}\n */\n this.wrappedTileCoord_ = wrappedTileCoord ? wrappedTileCoord : tileCoord;\n\n /**\n * @private\n * @type {!Array}\n */\n this.sourceTiles_ = [];\n\n /**\n * @private\n * @type {?Array}\n */\n this.sourcesListenerKeys_ = null;\n\n /**\n * @private\n * @type {number}\n */\n this.sourceZ_ = 0;\n\n const targetExtent = targetTileGrid.getTileCoordExtent(\n this.wrappedTileCoord_\n );\n const maxTargetExtent = this.targetTileGrid_.getExtent();\n let maxSourceExtent = this.sourceTileGrid_.getExtent();\n\n const limitedTargetExtent = maxTargetExtent\n ? getIntersection(targetExtent, maxTargetExtent)\n : targetExtent;\n\n if (getArea(limitedTargetExtent) === 0) {\n // Tile is completely outside range -> EMPTY\n // TODO: is it actually correct that the source even creates the tile ?\n this.state = TileState.EMPTY;\n return;\n }\n\n const sourceProjExtent = sourceProj.getExtent();\n if (sourceProjExtent) {\n if (!maxSourceExtent) {\n maxSourceExtent = sourceProjExtent;\n } else {\n maxSourceExtent = getIntersection(maxSourceExtent, sourceProjExtent);\n }\n }\n\n const targetResolution = targetTileGrid.getResolution(\n this.wrappedTileCoord_[0]\n );\n\n const sourceResolution = calculateSourceExtentResolution(\n sourceProj,\n targetProj,\n limitedTargetExtent,\n targetResolution\n );\n\n if (!isFinite(sourceResolution) || sourceResolution <= 0) {\n // invalid sourceResolution -> EMPTY\n // probably edges of the projections when no extent is defined\n this.state = TileState.EMPTY;\n return;\n }\n\n const errorThresholdInPixels =\n errorThreshold !== undefined ? errorThreshold : ERROR_THRESHOLD;\n\n /**\n * @private\n * @type {!import(\"./Triangulation.js\").default}\n */\n this.triangulation_ = new Triangulation(\n sourceProj,\n targetProj,\n limitedTargetExtent,\n maxSourceExtent,\n sourceResolution * errorThresholdInPixels,\n targetResolution\n );\n\n if (this.triangulation_.getTriangles().length === 0) {\n // no valid triangles -> EMPTY\n this.state = TileState.EMPTY;\n return;\n }\n\n this.sourceZ_ = sourceTileGrid.getZForResolution(sourceResolution);\n let sourceExtent = this.triangulation_.calculateSourceExtent();\n\n if (maxSourceExtent) {\n if (sourceProj.canWrapX()) {\n sourceExtent[1] = clamp(\n sourceExtent[1],\n maxSourceExtent[1],\n maxSourceExtent[3]\n );\n sourceExtent[3] = clamp(\n sourceExtent[3],\n maxSourceExtent[1],\n maxSourceExtent[3]\n );\n } else {\n sourceExtent = getIntersection(sourceExtent, maxSourceExtent);\n }\n }\n\n if (!getArea(sourceExtent)) {\n this.state = TileState.EMPTY;\n } else {\n const sourceRange = sourceTileGrid.getTileRangeForExtentAndZ(\n sourceExtent,\n this.sourceZ_\n );\n\n for (let srcX = sourceRange.minX; srcX <= sourceRange.maxX; srcX++) {\n for (let srcY = sourceRange.minY; srcY <= sourceRange.maxY; srcY++) {\n const tile = getTileFunction(this.sourceZ_, srcX, srcY, pixelRatio);\n if (tile) {\n this.sourceTiles_.push(tile);\n }\n }\n }\n\n if (this.sourceTiles_.length === 0) {\n this.state = TileState.EMPTY;\n }\n }\n }\n\n /**\n * Get the HTML Canvas element for this tile.\n * @return {HTMLCanvasElement} Canvas.\n */\n getImage() {\n return this.canvas_;\n }\n\n /**\n * @private\n */\n reproject_() {\n const sources = [];\n this.sourceTiles_.forEach((tile) => {\n if (tile && tile.getState() == TileState.LOADED) {\n sources.push({\n extent: this.sourceTileGrid_.getTileCoordExtent(tile.tileCoord),\n image: tile.getImage(),\n });\n }\n });\n this.sourceTiles_.length = 0;\n\n if (sources.length === 0) {\n this.state = TileState.ERROR;\n } else {\n const z = this.wrappedTileCoord_[0];\n const size = this.targetTileGrid_.getTileSize(z);\n const width = typeof size === 'number' ? size : size[0];\n const height = typeof size === 'number' ? size : size[1];\n const targetResolution = this.targetTileGrid_.getResolution(z);\n const sourceResolution = this.sourceTileGrid_.getResolution(\n this.sourceZ_\n );\n\n const targetExtent = this.targetTileGrid_.getTileCoordExtent(\n this.wrappedTileCoord_\n );\n\n this.canvas_ = renderReprojected(\n width,\n height,\n this.pixelRatio_,\n sourceResolution,\n this.sourceTileGrid_.getExtent(),\n targetResolution,\n targetExtent,\n this.triangulation_,\n sources,\n this.gutter_,\n this.renderEdges_,\n this.interpolate\n );\n\n this.state = TileState.LOADED;\n }\n this.changed();\n }\n\n /**\n * Load not yet loaded URI.\n */\n load() {\n if (this.state == TileState.IDLE) {\n this.state = TileState.LOADING;\n this.changed();\n\n let leftToLoad = 0;\n\n this.sourcesListenerKeys_ = [];\n this.sourceTiles_.forEach((tile) => {\n const state = tile.getState();\n if (state == TileState.IDLE || state == TileState.LOADING) {\n leftToLoad++;\n\n const sourceListenKey = listen(\n tile,\n EventType.CHANGE,\n function (e) {\n const state = tile.getState();\n if (\n state == TileState.LOADED ||\n state == TileState.ERROR ||\n state == TileState.EMPTY\n ) {\n unlistenByKey(sourceListenKey);\n leftToLoad--;\n if (leftToLoad === 0) {\n this.unlistenSources_();\n this.reproject_();\n }\n }\n },\n this\n );\n this.sourcesListenerKeys_.push(sourceListenKey);\n }\n });\n\n if (leftToLoad === 0) {\n setTimeout(this.reproject_.bind(this), 0);\n } else {\n this.sourceTiles_.forEach(function (tile, i, arr) {\n const state = tile.getState();\n if (state == TileState.IDLE) {\n tile.load();\n }\n });\n }\n }\n }\n\n /**\n * @private\n */\n unlistenSources_() {\n this.sourcesListenerKeys_.forEach(unlistenByKey);\n this.sourcesListenerKeys_ = null;\n }\n\n /**\n * Remove from the cache due to expiry\n */\n release() {\n if (this.canvas_) {\n releaseCanvas(this.canvas_.getContext('2d'));\n canvasPool.push(this.canvas_);\n this.canvas_ = null;\n }\n super.release();\n }\n}\n\nexport default ReprojTile;\n","/**\n * @module ol/source/TileEventType\n */\n\n/**\n * @enum {string}\n */\nexport default {\n /**\n * Triggered when a tile starts loading.\n * @event module:ol/source/Tile.TileSourceEvent#tileloadstart\n * @api\n */\n TILELOADSTART: 'tileloadstart',\n\n /**\n * Triggered when a tile finishes loading, either when its data is loaded,\n * or when loading was aborted because the tile is no longer needed.\n * @event module:ol/source/Tile.TileSourceEvent#tileloadend\n * @api\n */\n TILELOADEND: 'tileloadend',\n\n /**\n * Triggered if tile loading results in an error. Note that this is not the\n * right place to re-fetch tiles. See {@link module:ol/ImageTile~ImageTile#load}\n * for details.\n * @event module:ol/source/Tile.TileSourceEvent#tileloaderror\n * @api\n */\n TILELOADERROR: 'tileloaderror',\n};\n\n/**\n * @typedef {'tileloadstart'|'tileloadend'|'tileloaderror'} TileSourceEventTypes\n */\n","/**\n * @module ol/source/Source\n */\nimport BaseObject from '../Object.js';\nimport {get as getProjection} from '../proj.js';\n\n/**\n * @typedef {'undefined' | 'loading' | 'ready' | 'error'} State\n * State of the source, one of 'undefined', 'loading', 'ready' or 'error'.\n */\n\n/**\n * A function that takes a {@link module:ol/Map~FrameState} and returns a string or\n * an array of strings representing source attributions.\n *\n * @typedef {function(import(\"../Map.js\").FrameState): (string|Array)} Attribution\n */\n\n/**\n * A type that can be used to provide attribution information for data sources.\n *\n * It represents either\n * * a simple string (e.g. `'© Acme Inc.'`)\n * * an array of simple strings (e.g. `['© Acme Inc.', '© Bacme Inc.']`)\n * * a function that returns a string or array of strings ({@link module:ol/source/Source~Attribution})\n *\n * @typedef {string|Array|Attribution} AttributionLike\n */\n\n/**\n * @typedef {Object} Options\n * @property {AttributionLike} [attributions] Attributions.\n * @property {boolean} [attributionsCollapsible=true] Attributions are collapsible.\n * @property {import(\"../proj.js\").ProjectionLike} [projection] Projection. Default is the view projection.\n * @property {import(\"./Source.js\").State} [state='ready'] State.\n * @property {boolean} [wrapX=false] WrapX.\n * @property {boolean} [interpolate=false] Use interpolated values when resampling. By default,\n * the nearest neighbor is used when resampling.\n */\n\n/**\n * @classdesc\n * Abstract base class; normally only used for creating subclasses and not\n * instantiated in apps.\n * Base class for {@link module:ol/layer/Layer~Layer} sources.\n *\n * A generic `change` event is triggered when the state of the source changes.\n * @abstract\n * @api\n */\nclass Source extends BaseObject {\n /**\n * @param {Options} options Source options.\n */\n constructor(options) {\n super();\n\n /**\n * @protected\n * @type {import(\"../proj/Projection.js\").default|null}\n */\n this.projection = getProjection(options.projection);\n\n /**\n * @private\n * @type {?Attribution}\n */\n this.attributions_ = adaptAttributions(options.attributions);\n\n /**\n * @private\n * @type {boolean}\n */\n this.attributionsCollapsible_ =\n options.attributionsCollapsible !== undefined\n ? options.attributionsCollapsible\n : true;\n\n /**\n * This source is currently loading data. Sources that defer loading to the\n * map's tile queue never set this to `true`.\n * @type {boolean}\n */\n this.loading = false;\n\n /**\n * @private\n * @type {import(\"./Source.js\").State}\n */\n this.state_ = options.state !== undefined ? options.state : 'ready';\n\n /**\n * @private\n * @type {boolean}\n */\n this.wrapX_ = options.wrapX !== undefined ? options.wrapX : false;\n\n /**\n * @private\n * @type {boolean}\n */\n this.interpolate_ = !!options.interpolate;\n\n /**\n * @protected\n * @type {function(import(\"../View.js\").ViewOptions):void}\n */\n this.viewResolver = null;\n\n /**\n * @protected\n * @type {function(Error):void}\n */\n this.viewRejector = null;\n\n const self = this;\n /**\n * @private\n * @type {Promise}\n */\n this.viewPromise_ = new Promise(function (resolve, reject) {\n self.viewResolver = resolve;\n self.viewRejector = reject;\n });\n }\n\n /**\n * Get the attribution function for the source.\n * @return {?Attribution} Attribution function.\n * @api\n */\n getAttributions() {\n return this.attributions_;\n }\n\n /**\n * @return {boolean} Attributions are collapsible.\n * @api\n */\n getAttributionsCollapsible() {\n return this.attributionsCollapsible_;\n }\n\n /**\n * Get the projection of the source.\n * @return {import(\"../proj/Projection.js\").default|null} Projection.\n * @api\n */\n getProjection() {\n return this.projection;\n }\n\n /**\n * @param {import(\"../proj/Projection\").default} [projection] Projection.\n * @return {Array|null} Resolutions.\n */\n getResolutions(projection) {\n return null;\n }\n\n /**\n * @return {Promise} A promise for view-related properties.\n */\n getView() {\n return this.viewPromise_;\n }\n\n /**\n * Get the state of the source, see {@link import(\"./Source.js\").State} for possible states.\n * @return {import(\"./Source.js\").State} State.\n * @api\n */\n getState() {\n return this.state_;\n }\n\n /**\n * @return {boolean|undefined} Wrap X.\n */\n getWrapX() {\n return this.wrapX_;\n }\n\n /**\n * @return {boolean} Use linear interpolation when resampling.\n */\n getInterpolate() {\n return this.interpolate_;\n }\n\n /**\n * Refreshes the source. The source will be cleared, and data from the server will be reloaded.\n * @api\n */\n refresh() {\n this.changed();\n }\n\n /**\n * Set the attributions of the source.\n * @param {AttributionLike|undefined} attributions Attributions.\n * Can be passed as `string`, `Array`, {@link module:ol/source/Source~Attribution},\n * or `undefined`.\n * @api\n */\n setAttributions(attributions) {\n this.attributions_ = adaptAttributions(attributions);\n this.changed();\n }\n\n /**\n * Set the state of the source.\n * @param {import(\"./Source.js\").State} state State.\n */\n setState(state) {\n this.state_ = state;\n this.changed();\n }\n}\n\n/**\n * Turns the attributions option into an attributions function.\n * @param {AttributionLike|undefined} attributionLike The attribution option.\n * @return {Attribution|null} An attribution function (or null).\n */\nfunction adaptAttributions(attributionLike) {\n if (!attributionLike) {\n return null;\n }\n if (Array.isArray(attributionLike)) {\n return function (frameState) {\n return attributionLike;\n };\n }\n\n if (typeof attributionLike === 'function') {\n return attributionLike;\n }\n\n return function (frameState) {\n return [attributionLike];\n };\n}\n\nexport default Source;\n","/**\n * @module ol/tilegrid/TileGrid\n */\nimport TileRange, {\n createOrUpdate as createOrUpdateTileRange,\n} from '../TileRange.js';\nimport {DEFAULT_TILE_SIZE} from './common.js';\nimport {assert} from '../asserts.js';\nimport {ceil, clamp, floor} from '../math.js';\nimport {createOrUpdate, getTopLeft} from '../extent.js';\nimport {createOrUpdate as createOrUpdateTileCoord} from '../tilecoord.js';\nimport {intersectsLinearRing} from '../geom/flat/intersectsextent.js';\nimport {isSorted, linearFindNearest} from '../array.js';\nimport {toSize} from '../size.js';\n\n/**\n * @private\n * @type {import(\"../tilecoord.js\").TileCoord}\n */\nconst tmpTileCoord = [0, 0, 0];\n\n/**\n * Number of decimal digits to consider in integer values when rounding.\n * @type {number}\n */\nconst DECIMALS = 5;\n\n/**\n * @typedef {Object} Options\n * @property {import(\"../extent.js\").Extent} [extent] Extent for the tile grid. No tiles outside this\n * extent will be requested by {@link module:ol/source/Tile~TileSource} sources. When no `origin` or\n * `origins` are configured, the `origin` will be set to the top-left corner of the extent.\n * @property {number} [minZoom=0] Minimum zoom.\n * @property {import(\"../coordinate.js\").Coordinate} [origin] The tile grid origin, i.e. where the `x`\n * and `y` axes meet (`[z, 0, 0]`). Tile coordinates increase left to right and downwards. If not\n * specified, `extent` or `origins` must be provided.\n * @property {Array} [origins] Tile grid origins, i.e. where\n * the `x` and `y` axes meet (`[z, 0, 0]`), for each zoom level. If given, the array length\n * should match the length of the `resolutions` array, i.e. each resolution can have a different\n * origin. Tile coordinates increase left to right and downwards. If not specified, `extent` or\n * `origin` must be provided.\n * @property {!Array} resolutions Resolutions. The array index of each resolution needs\n * to match the zoom level. This means that even if a `minZoom` is configured, the resolutions\n * array will have a length of `maxZoom + 1`.\n * @property {Array} [sizes] Number of tile rows and columns\n * of the grid for each zoom level. If specified the values\n * define each zoom level's extent together with the `origin` or `origins`.\n * A grid `extent` can be configured in addition, and will further limit the extent\n * for which tile requests are made by sources. If the bottom-left corner of\n * an extent is used as `origin` or `origins`, then the `y` value must be\n * negative because OpenLayers tile coordinates use the top left as the origin.\n * @property {number|import(\"../size.js\").Size} [tileSize] Tile size.\n * Default is `[256, 256]`.\n * @property {Array} [tileSizes] Tile sizes. If given, the array length\n * should match the length of the `resolutions` array, i.e. each resolution can have a different\n * tile size.\n */\n\n/**\n * @classdesc\n * Base class for setting the grid pattern for sources accessing tiled-image\n * servers.\n * @api\n */\nclass TileGrid {\n /**\n * @param {Options} options Tile grid options.\n */\n constructor(options) {\n /**\n * @protected\n * @type {number}\n */\n this.minZoom = options.minZoom !== undefined ? options.minZoom : 0;\n\n /**\n * @private\n * @type {!Array}\n */\n this.resolutions_ = options.resolutions;\n assert(\n isSorted(\n this.resolutions_,\n function (a, b) {\n return b - a;\n },\n true\n ),\n 17\n ); // `resolutions` must be sorted in descending order\n\n // check if we've got a consistent zoom factor and origin\n let zoomFactor;\n if (!options.origins) {\n for (let i = 0, ii = this.resolutions_.length - 1; i < ii; ++i) {\n if (!zoomFactor) {\n zoomFactor = this.resolutions_[i] / this.resolutions_[i + 1];\n } else {\n if (this.resolutions_[i] / this.resolutions_[i + 1] !== zoomFactor) {\n zoomFactor = undefined;\n break;\n }\n }\n }\n }\n\n /**\n * @private\n * @type {number|undefined}\n */\n this.zoomFactor_ = zoomFactor;\n\n /**\n * @protected\n * @type {number}\n */\n this.maxZoom = this.resolutions_.length - 1;\n\n /**\n * @private\n * @type {import(\"../coordinate.js\").Coordinate|null}\n */\n this.origin_ = options.origin !== undefined ? options.origin : null;\n\n /**\n * @private\n * @type {Array}\n */\n this.origins_ = null;\n if (options.origins !== undefined) {\n this.origins_ = options.origins;\n assert(this.origins_.length == this.resolutions_.length, 20); // Number of `origins` and `resolutions` must be equal\n }\n\n const extent = options.extent;\n\n if (extent !== undefined && !this.origin_ && !this.origins_) {\n this.origin_ = getTopLeft(extent);\n }\n\n assert(\n (!this.origin_ && this.origins_) || (this.origin_ && !this.origins_),\n 18\n ); // Either `origin` or `origins` must be configured, never both\n\n /**\n * @private\n * @type {Array}\n */\n this.tileSizes_ = null;\n if (options.tileSizes !== undefined) {\n this.tileSizes_ = options.tileSizes;\n assert(this.tileSizes_.length == this.resolutions_.length, 19); // Number of `tileSizes` and `resolutions` must be equal\n }\n\n /**\n * @private\n * @type {number|import(\"../size.js\").Size}\n */\n this.tileSize_ =\n options.tileSize !== undefined\n ? options.tileSize\n : !this.tileSizes_\n ? DEFAULT_TILE_SIZE\n : null;\n assert(\n (!this.tileSize_ && this.tileSizes_) ||\n (this.tileSize_ && !this.tileSizes_),\n 22\n ); // Either `tileSize` or `tileSizes` must be configured, never both\n\n /**\n * @private\n * @type {import(\"../extent.js\").Extent}\n */\n this.extent_ = extent !== undefined ? extent : null;\n\n /**\n * @private\n * @type {Array}\n */\n this.fullTileRanges_ = null;\n\n /**\n * @private\n * @type {import(\"../size.js\").Size}\n */\n this.tmpSize_ = [0, 0];\n\n /**\n * @private\n * @type {import(\"../extent.js\").Extent}\n */\n this.tmpExtent_ = [0, 0, 0, 0];\n\n if (options.sizes !== undefined) {\n this.fullTileRanges_ = options.sizes.map(function (size, z) {\n const tileRange = new TileRange(\n Math.min(0, size[0]),\n Math.max(size[0] - 1, -1),\n Math.min(0, size[1]),\n Math.max(size[1] - 1, -1)\n );\n if (extent) {\n const restrictedTileRange = this.getTileRangeForExtentAndZ(extent, z);\n tileRange.minX = Math.max(restrictedTileRange.minX, tileRange.minX);\n tileRange.maxX = Math.min(restrictedTileRange.maxX, tileRange.maxX);\n tileRange.minY = Math.max(restrictedTileRange.minY, tileRange.minY);\n tileRange.maxY = Math.min(restrictedTileRange.maxY, tileRange.maxY);\n }\n return tileRange;\n }, this);\n } else if (extent) {\n this.calculateTileRanges_(extent);\n }\n }\n\n /**\n * Call a function with each tile coordinate for a given extent and zoom level.\n *\n * @param {import(\"../extent.js\").Extent} extent Extent.\n * @param {number} zoom Integer zoom level.\n * @param {function(import(\"../tilecoord.js\").TileCoord): void} callback Function called with each tile coordinate.\n * @api\n */\n forEachTileCoord(extent, zoom, callback) {\n const tileRange = this.getTileRangeForExtentAndZ(extent, zoom);\n for (let i = tileRange.minX, ii = tileRange.maxX; i <= ii; ++i) {\n for (let j = tileRange.minY, jj = tileRange.maxY; j <= jj; ++j) {\n callback([zoom, i, j]);\n }\n }\n }\n\n /**\n * @param {import(\"../tilecoord.js\").TileCoord} tileCoord Tile coordinate.\n * @param {function(number, import(\"../TileRange.js\").default): boolean} callback Callback.\n * @param {import(\"../TileRange.js\").default} [tempTileRange] Temporary import(\"../TileRange.js\").default object.\n * @param {import(\"../extent.js\").Extent} [tempExtent] Temporary import(\"../extent.js\").Extent object.\n * @return {boolean} Callback succeeded.\n */\n forEachTileCoordParentTileRange(\n tileCoord,\n callback,\n tempTileRange,\n tempExtent\n ) {\n let tileRange, x, y;\n let tileCoordExtent = null;\n let z = tileCoord[0] - 1;\n if (this.zoomFactor_ === 2) {\n x = tileCoord[1];\n y = tileCoord[2];\n } else {\n tileCoordExtent = this.getTileCoordExtent(tileCoord, tempExtent);\n }\n while (z >= this.minZoom) {\n if (this.zoomFactor_ === 2) {\n x = Math.floor(x / 2);\n y = Math.floor(y / 2);\n tileRange = createOrUpdateTileRange(x, x, y, y, tempTileRange);\n } else {\n tileRange = this.getTileRangeForExtentAndZ(\n tileCoordExtent,\n z,\n tempTileRange\n );\n }\n if (callback(z, tileRange)) {\n return true;\n }\n --z;\n }\n return false;\n }\n\n /**\n * Get the extent for this tile grid, if it was configured.\n * @return {import(\"../extent.js\").Extent} Extent.\n * @api\n */\n getExtent() {\n return this.extent_;\n }\n\n /**\n * Get the maximum zoom level for the grid.\n * @return {number} Max zoom.\n * @api\n */\n getMaxZoom() {\n return this.maxZoom;\n }\n\n /**\n * Get the minimum zoom level for the grid.\n * @return {number} Min zoom.\n * @api\n */\n getMinZoom() {\n return this.minZoom;\n }\n\n /**\n * Get the origin for the grid at the given zoom level.\n * @param {number} z Integer zoom level.\n * @return {import(\"../coordinate.js\").Coordinate} Origin.\n * @api\n */\n getOrigin(z) {\n if (this.origin_) {\n return this.origin_;\n }\n return this.origins_[z];\n }\n\n /**\n * Get the resolution for the given zoom level.\n * @param {number} z Integer zoom level.\n * @return {number} Resolution.\n * @api\n */\n getResolution(z) {\n return this.resolutions_[z];\n }\n\n /**\n * Get the list of resolutions for the tile grid.\n * @return {Array} Resolutions.\n * @api\n */\n getResolutions() {\n return this.resolutions_;\n }\n\n /**\n * @param {import(\"../tilecoord.js\").TileCoord} tileCoord Tile coordinate.\n * @param {import(\"../TileRange.js\").default} [tempTileRange] Temporary import(\"../TileRange.js\").default object.\n * @param {import(\"../extent.js\").Extent} [tempExtent] Temporary import(\"../extent.js\").Extent object.\n * @return {import(\"../TileRange.js\").default|null} Tile range.\n */\n getTileCoordChildTileRange(tileCoord, tempTileRange, tempExtent) {\n if (tileCoord[0] < this.maxZoom) {\n if (this.zoomFactor_ === 2) {\n const minX = tileCoord[1] * 2;\n const minY = tileCoord[2] * 2;\n return createOrUpdateTileRange(\n minX,\n minX + 1,\n minY,\n minY + 1,\n tempTileRange\n );\n }\n const tileCoordExtent = this.getTileCoordExtent(\n tileCoord,\n tempExtent || this.tmpExtent_\n );\n return this.getTileRangeForExtentAndZ(\n tileCoordExtent,\n tileCoord[0] + 1,\n tempTileRange\n );\n }\n return null;\n }\n\n /**\n * @param {import(\"../tilecoord.js\").TileCoord} tileCoord Tile coordinate.\n * @param {number} z Integer zoom level.\n * @param {import(\"../TileRange.js\").default} [tempTileRange] Temporary import(\"../TileRange.js\").default object.\n * @return {import(\"../TileRange.js\").default|null} Tile range.\n */\n getTileRangeForTileCoordAndZ(tileCoord, z, tempTileRange) {\n if (z > this.maxZoom || z < this.minZoom) {\n return null;\n }\n\n const tileCoordZ = tileCoord[0];\n const tileCoordX = tileCoord[1];\n const tileCoordY = tileCoord[2];\n\n if (z === tileCoordZ) {\n return createOrUpdateTileRange(\n tileCoordX,\n tileCoordY,\n tileCoordX,\n tileCoordY,\n tempTileRange\n );\n }\n\n if (this.zoomFactor_) {\n const factor = Math.pow(this.zoomFactor_, z - tileCoordZ);\n const minX = Math.floor(tileCoordX * factor);\n const minY = Math.floor(tileCoordY * factor);\n if (z < tileCoordZ) {\n return createOrUpdateTileRange(minX, minX, minY, minY, tempTileRange);\n }\n\n const maxX = Math.floor(factor * (tileCoordX + 1)) - 1;\n const maxY = Math.floor(factor * (tileCoordY + 1)) - 1;\n return createOrUpdateTileRange(minX, maxX, minY, maxY, tempTileRange);\n }\n\n const tileCoordExtent = this.getTileCoordExtent(tileCoord, this.tmpExtent_);\n return this.getTileRangeForExtentAndZ(tileCoordExtent, z, tempTileRange);\n }\n\n /**\n * Get the extent for a tile range.\n * @param {number} z Integer zoom level.\n * @param {import(\"../TileRange.js\").default} tileRange Tile range.\n * @param {import(\"../extent.js\").Extent} [tempExtent] Temporary import(\"../extent.js\").Extent object.\n * @return {import(\"../extent.js\").Extent} Extent.\n */\n getTileRangeExtent(z, tileRange, tempExtent) {\n const origin = this.getOrigin(z);\n const resolution = this.getResolution(z);\n const tileSize = toSize(this.getTileSize(z), this.tmpSize_);\n const minX = origin[0] + tileRange.minX * tileSize[0] * resolution;\n const maxX = origin[0] + (tileRange.maxX + 1) * tileSize[0] * resolution;\n const minY = origin[1] + tileRange.minY * tileSize[1] * resolution;\n const maxY = origin[1] + (tileRange.maxY + 1) * tileSize[1] * resolution;\n return createOrUpdate(minX, minY, maxX, maxY, tempExtent);\n }\n\n /**\n * Get a tile range for the given extent and integer zoom level.\n * @param {import(\"../extent.js\").Extent} extent Extent.\n * @param {number} z Integer zoom level.\n * @param {import(\"../TileRange.js\").default} [tempTileRange] Temporary tile range object.\n * @return {import(\"../TileRange.js\").default} Tile range.\n */\n getTileRangeForExtentAndZ(extent, z, tempTileRange) {\n this.getTileCoordForXYAndZ_(extent[0], extent[3], z, false, tmpTileCoord);\n const minX = tmpTileCoord[1];\n const minY = tmpTileCoord[2];\n this.getTileCoordForXYAndZ_(extent[2], extent[1], z, true, tmpTileCoord);\n const maxX = tmpTileCoord[1];\n const maxY = tmpTileCoord[2];\n return createOrUpdateTileRange(minX, maxX, minY, maxY, tempTileRange);\n }\n\n /**\n * @param {import(\"../tilecoord.js\").TileCoord} tileCoord Tile coordinate.\n * @return {import(\"../coordinate.js\").Coordinate} Tile center.\n */\n getTileCoordCenter(tileCoord) {\n const origin = this.getOrigin(tileCoord[0]);\n const resolution = this.getResolution(tileCoord[0]);\n const tileSize = toSize(this.getTileSize(tileCoord[0]), this.tmpSize_);\n return [\n origin[0] + (tileCoord[1] + 0.5) * tileSize[0] * resolution,\n origin[1] - (tileCoord[2] + 0.5) * tileSize[1] * resolution,\n ];\n }\n\n /**\n * Get the extent of a tile coordinate.\n *\n * @param {import(\"../tilecoord.js\").TileCoord} tileCoord Tile coordinate.\n * @param {import(\"../extent.js\").Extent} [tempExtent] Temporary extent object.\n * @return {import(\"../extent.js\").Extent} Extent.\n * @api\n */\n getTileCoordExtent(tileCoord, tempExtent) {\n const origin = this.getOrigin(tileCoord[0]);\n const resolution = this.getResolution(tileCoord[0]);\n const tileSize = toSize(this.getTileSize(tileCoord[0]), this.tmpSize_);\n const minX = origin[0] + tileCoord[1] * tileSize[0] * resolution;\n const minY = origin[1] - (tileCoord[2] + 1) * tileSize[1] * resolution;\n const maxX = minX + tileSize[0] * resolution;\n const maxY = minY + tileSize[1] * resolution;\n return createOrUpdate(minX, minY, maxX, maxY, tempExtent);\n }\n\n /**\n * Get the tile coordinate for the given map coordinate and resolution. This\n * method considers that coordinates that intersect tile boundaries should be\n * assigned the higher tile coordinate.\n *\n * @param {import(\"../coordinate.js\").Coordinate} coordinate Coordinate.\n * @param {number} resolution Resolution.\n * @param {import(\"../tilecoord.js\").TileCoord} [opt_tileCoord] Destination import(\"../tilecoord.js\").TileCoord object.\n * @return {import(\"../tilecoord.js\").TileCoord} Tile coordinate.\n * @api\n */\n getTileCoordForCoordAndResolution(coordinate, resolution, opt_tileCoord) {\n return this.getTileCoordForXYAndResolution_(\n coordinate[0],\n coordinate[1],\n resolution,\n false,\n opt_tileCoord\n );\n }\n\n /**\n * Note that this method should not be called for resolutions that correspond\n * to an integer zoom level. Instead call the `getTileCoordForXYAndZ_` method.\n * @param {number} x X.\n * @param {number} y Y.\n * @param {number} resolution Resolution (for a non-integer zoom level).\n * @param {boolean} reverseIntersectionPolicy Instead of letting edge\n * intersections go to the higher tile coordinate, let edge intersections\n * go to the lower tile coordinate.\n * @param {import(\"../tilecoord.js\").TileCoord} [opt_tileCoord] Temporary import(\"../tilecoord.js\").TileCoord object.\n * @return {import(\"../tilecoord.js\").TileCoord} Tile coordinate.\n * @private\n */\n getTileCoordForXYAndResolution_(\n x,\n y,\n resolution,\n reverseIntersectionPolicy,\n opt_tileCoord\n ) {\n const z = this.getZForResolution(resolution);\n const scale = resolution / this.getResolution(z);\n const origin = this.getOrigin(z);\n const tileSize = toSize(this.getTileSize(z), this.tmpSize_);\n\n let tileCoordX = (scale * (x - origin[0])) / resolution / tileSize[0];\n let tileCoordY = (scale * (origin[1] - y)) / resolution / tileSize[1];\n\n if (reverseIntersectionPolicy) {\n tileCoordX = ceil(tileCoordX, DECIMALS) - 1;\n tileCoordY = ceil(tileCoordY, DECIMALS) - 1;\n } else {\n tileCoordX = floor(tileCoordX, DECIMALS);\n tileCoordY = floor(tileCoordY, DECIMALS);\n }\n\n return createOrUpdateTileCoord(z, tileCoordX, tileCoordY, opt_tileCoord);\n }\n\n /**\n * Although there is repetition between this method and `getTileCoordForXYAndResolution_`,\n * they should have separate implementations. This method is for integer zoom\n * levels. The other method should only be called for resolutions corresponding\n * to non-integer zoom levels.\n * @param {number} x Map x coordinate.\n * @param {number} y Map y coordinate.\n * @param {number} z Integer zoom level.\n * @param {boolean} reverseIntersectionPolicy Instead of letting edge\n * intersections go to the higher tile coordinate, let edge intersections\n * go to the lower tile coordinate.\n * @param {import(\"../tilecoord.js\").TileCoord} [opt_tileCoord] Temporary import(\"../tilecoord.js\").TileCoord object.\n * @return {import(\"../tilecoord.js\").TileCoord} Tile coordinate.\n * @private\n */\n getTileCoordForXYAndZ_(x, y, z, reverseIntersectionPolicy, opt_tileCoord) {\n const origin = this.getOrigin(z);\n const resolution = this.getResolution(z);\n const tileSize = toSize(this.getTileSize(z), this.tmpSize_);\n\n let tileCoordX = (x - origin[0]) / resolution / tileSize[0];\n let tileCoordY = (origin[1] - y) / resolution / tileSize[1];\n\n if (reverseIntersectionPolicy) {\n tileCoordX = ceil(tileCoordX, DECIMALS) - 1;\n tileCoordY = ceil(tileCoordY, DECIMALS) - 1;\n } else {\n tileCoordX = floor(tileCoordX, DECIMALS);\n tileCoordY = floor(tileCoordY, DECIMALS);\n }\n\n return createOrUpdateTileCoord(z, tileCoordX, tileCoordY, opt_tileCoord);\n }\n\n /**\n * Get a tile coordinate given a map coordinate and zoom level.\n * @param {import(\"../coordinate.js\").Coordinate} coordinate Coordinate.\n * @param {number} z Zoom level.\n * @param {import(\"../tilecoord.js\").TileCoord} [opt_tileCoord] Destination import(\"../tilecoord.js\").TileCoord object.\n * @return {import(\"../tilecoord.js\").TileCoord} Tile coordinate.\n * @api\n */\n getTileCoordForCoordAndZ(coordinate, z, opt_tileCoord) {\n return this.getTileCoordForXYAndZ_(\n coordinate[0],\n coordinate[1],\n z,\n false,\n opt_tileCoord\n );\n }\n\n /**\n * @param {import(\"../tilecoord.js\").TileCoord} tileCoord Tile coordinate.\n * @return {number} Tile resolution.\n */\n getTileCoordResolution(tileCoord) {\n return this.resolutions_[tileCoord[0]];\n }\n\n /**\n * Get the tile size for a zoom level. The type of the return value matches the\n * `tileSize` or `tileSizes` that the tile grid was configured with. To always\n * get an {@link import(\"../size.js\").Size}, run the result through {@link module:ol/size.toSize}.\n * @param {number} z Z.\n * @return {number|import(\"../size.js\").Size} Tile size.\n * @api\n */\n getTileSize(z) {\n if (this.tileSize_) {\n return this.tileSize_;\n }\n return this.tileSizes_[z];\n }\n\n /**\n * @param {number} z Zoom level.\n * @return {import(\"../TileRange.js\").default} Extent tile range for the specified zoom level.\n */\n getFullTileRange(z) {\n if (!this.fullTileRanges_) {\n return this.extent_\n ? this.getTileRangeForExtentAndZ(this.extent_, z)\n : null;\n }\n return this.fullTileRanges_[z];\n }\n\n /**\n * @param {number} resolution Resolution.\n * @param {number|import(\"../array.js\").NearestDirectionFunction} [opt_direction]\n * If 0, the nearest resolution will be used.\n * If 1, the nearest higher resolution (lower Z) will be used. If -1, the\n * nearest lower resolution (higher Z) will be used. Default is 0.\n * Use a {@link module:ol/array~NearestDirectionFunction} for more precise control.\n *\n * For example to change tile Z at the midpoint of zoom levels\n * ```js\n * function(value, high, low) {\n * return value - low * Math.sqrt(high / low);\n * }\n * ```\n * @return {number} Z.\n * @api\n */\n getZForResolution(resolution, opt_direction) {\n const z = linearFindNearest(\n this.resolutions_,\n resolution,\n opt_direction || 0\n );\n return clamp(z, this.minZoom, this.maxZoom);\n }\n\n /**\n * The tile with the provided tile coordinate intersects the given viewport.\n * @param {import('../tilecoord.js').TileCoord} tileCoord Tile coordinate.\n * @param {Array} viewport Viewport as returned from {@link module:ol/extent.getRotatedViewport}.\n * @return {boolean} The tile with the provided tile coordinate intersects the given viewport.\n */\n tileCoordIntersectsViewport(tileCoord, viewport) {\n return intersectsLinearRing(\n viewport,\n 0,\n viewport.length,\n 2,\n this.getTileCoordExtent(tileCoord)\n );\n }\n\n /**\n * @param {!import(\"../extent.js\").Extent} extent Extent for this tile grid.\n * @private\n */\n calculateTileRanges_(extent) {\n const length = this.resolutions_.length;\n const fullTileRanges = new Array(length);\n for (let z = this.minZoom; z < length; ++z) {\n fullTileRanges[z] = this.getTileRangeForExtentAndZ(extent, z);\n }\n this.fullTileRanges_ = fullTileRanges;\n }\n}\n\nexport default TileGrid;\n","/**\n * @module ol/tilegrid\n */\nimport TileGrid from './tilegrid/TileGrid.js';\nimport {DEFAULT_MAX_ZOOM, DEFAULT_TILE_SIZE} from './tilegrid/common.js';\nimport {METERS_PER_UNIT, get as getProjection} from './proj.js';\nimport {\n containsCoordinate,\n createOrUpdate,\n getCorner,\n getHeight,\n getWidth,\n} from './extent.js';\nimport {toSize} from './size.js';\n\n/**\n * @param {import(\"./proj/Projection.js\").default} projection Projection.\n * @return {!TileGrid} Default tile grid for the\n * passed projection.\n */\nexport function getForProjection(projection) {\n let tileGrid = projection.getDefaultTileGrid();\n if (!tileGrid) {\n tileGrid = createForProjection(projection);\n projection.setDefaultTileGrid(tileGrid);\n }\n return tileGrid;\n}\n\n/**\n * @param {TileGrid} tileGrid Tile grid.\n * @param {import(\"./tilecoord.js\").TileCoord} tileCoord Tile coordinate.\n * @param {import(\"./proj/Projection.js\").default} projection Projection.\n * @return {import(\"./tilecoord.js\").TileCoord} Tile coordinate.\n */\nexport function wrapX(tileGrid, tileCoord, projection) {\n const z = tileCoord[0];\n const center = tileGrid.getTileCoordCenter(tileCoord);\n const projectionExtent = extentFromProjection(projection);\n if (!containsCoordinate(projectionExtent, center)) {\n const worldWidth = getWidth(projectionExtent);\n const worldsAway = Math.ceil(\n (projectionExtent[0] - center[0]) / worldWidth\n );\n center[0] += worldWidth * worldsAway;\n return tileGrid.getTileCoordForCoordAndZ(center, z);\n }\n return tileCoord;\n}\n\n/**\n * @param {import(\"./extent.js\").Extent} extent Extent.\n * @param {number} [maxZoom] Maximum zoom level (default is\n * DEFAULT_MAX_ZOOM).\n * @param {number|import(\"./size.js\").Size} [tileSize] Tile size (default uses\n * DEFAULT_TILE_SIZE).\n * @param {import(\"./extent.js\").Corner} [corner] Extent corner (default is `'top-left'`).\n * @return {!TileGrid} TileGrid instance.\n */\nexport function createForExtent(extent, maxZoom, tileSize, corner) {\n corner = corner !== undefined ? corner : 'top-left';\n\n const resolutions = resolutionsFromExtent(extent, maxZoom, tileSize);\n\n return new TileGrid({\n extent: extent,\n origin: getCorner(extent, corner),\n resolutions: resolutions,\n tileSize: tileSize,\n });\n}\n\n/**\n * @typedef {Object} XYZOptions\n * @property {import(\"./extent.js\").Extent} [extent] Extent for the tile grid. The origin for an XYZ tile grid is the\n * top-left corner of the extent. If `maxResolution` is not provided the zero level of the grid is defined by the resolution\n * at which one tile fits in the provided extent. If not provided, the extent of the EPSG:3857 projection is used.\n * @property {number} [maxResolution] Resolution at level zero.\n * @property {number} [maxZoom] Maximum zoom. The default is `42`. This determines the number of levels\n * in the grid set. For example, a `maxZoom` of 21 means there are 22 levels in the grid set.\n * @property {number} [minZoom=0] Minimum zoom.\n * @property {number|import(\"./size.js\").Size} [tileSize=[256, 256]] Tile size in pixels.\n */\n\n/**\n * Creates a tile grid with a standard XYZ tiling scheme.\n * @param {XYZOptions} [options] Tile grid options.\n * @return {!TileGrid} Tile grid instance.\n * @api\n */\nexport function createXYZ(options) {\n const xyzOptions = options || {};\n\n const extent = xyzOptions.extent || getProjection('EPSG:3857').getExtent();\n\n const gridOptions = {\n extent: extent,\n minZoom: xyzOptions.minZoom,\n tileSize: xyzOptions.tileSize,\n resolutions: resolutionsFromExtent(\n extent,\n xyzOptions.maxZoom,\n xyzOptions.tileSize,\n xyzOptions.maxResolution\n ),\n };\n return new TileGrid(gridOptions);\n}\n\n/**\n * Create a resolutions array from an extent. A zoom factor of 2 is assumed.\n * @param {import(\"./extent.js\").Extent} extent Extent.\n * @param {number} [maxZoom] Maximum zoom level (default is\n * DEFAULT_MAX_ZOOM).\n * @param {number|import(\"./size.js\").Size} [tileSize] Tile size (default uses\n * DEFAULT_TILE_SIZE).\n * @param {number} [maxResolution] Resolution at level zero.\n * @return {!Array} Resolutions array.\n */\nfunction resolutionsFromExtent(extent, maxZoom, tileSize, maxResolution) {\n maxZoom = maxZoom !== undefined ? maxZoom : DEFAULT_MAX_ZOOM;\n tileSize = toSize(tileSize !== undefined ? tileSize : DEFAULT_TILE_SIZE);\n\n const height = getHeight(extent);\n const width = getWidth(extent);\n\n maxResolution =\n maxResolution > 0\n ? maxResolution\n : Math.max(width / tileSize[0], height / tileSize[1]);\n\n const length = maxZoom + 1;\n const resolutions = new Array(length);\n for (let z = 0; z < length; ++z) {\n resolutions[z] = maxResolution / Math.pow(2, z);\n }\n return resolutions;\n}\n\n/**\n * @param {import(\"./proj.js\").ProjectionLike} projection Projection.\n * @param {number} [maxZoom] Maximum zoom level (default is\n * DEFAULT_MAX_ZOOM).\n * @param {number|import(\"./size.js\").Size} [tileSize] Tile size (default uses\n * DEFAULT_TILE_SIZE).\n * @param {import(\"./extent.js\").Corner} [corner] Extent corner (default is `'top-left'`).\n * @return {!TileGrid} TileGrid instance.\n */\nexport function createForProjection(projection, maxZoom, tileSize, corner) {\n const extent = extentFromProjection(projection);\n return createForExtent(extent, maxZoom, tileSize, corner);\n}\n\n/**\n * Generate a tile grid extent from a projection. If the projection has an\n * extent, it is used. If not, a global extent is assumed.\n * @param {import(\"./proj.js\").ProjectionLike} projection Projection.\n * @return {import(\"./extent.js\").Extent} Extent.\n */\nexport function extentFromProjection(projection) {\n projection = getProjection(projection);\n let extent = projection.getExtent();\n if (!extent) {\n const half =\n (180 * METERS_PER_UNIT.degrees) / projection.getMetersPerUnit();\n extent = createOrUpdate(-half, -half, half, half);\n }\n return extent;\n}\n","/**\n * @module ol/source/Tile\n */\nimport Event from '../events/Event.js';\nimport Source from './Source.js';\nimport TileCache from '../TileCache.js';\nimport TileState from '../TileState.js';\nimport {abstract} from '../util.js';\nimport {assert} from '../asserts.js';\nimport {equivalent} from '../proj.js';\nimport {getKeyZXY, withinExtentAndZ} from '../tilecoord.js';\nimport {\n getForProjection as getTileGridForProjection,\n wrapX,\n} from '../tilegrid.js';\nimport {scale as scaleSize, toSize} from '../size.js';\n\n/***\n * @template Return\n * @typedef {import(\"../Observable\").OnSignature &\n * import(\"../Observable\").OnSignature &\n * import(\"../Observable\").OnSignature &\n * import(\"../Observable\").CombinedOnSignature} TileSourceOnSignature\n */\n\n/**\n * @typedef {Object} Options\n * @property {import(\"./Source.js\").AttributionLike} [attributions] Attributions.\n * @property {boolean} [attributionsCollapsible=true] Attributions are collapsible.\n * @property {number} [cacheSize] CacheSize.\n * @property {boolean} [opaque=false] Whether the layer is opaque.\n * @property {number} [tilePixelRatio] TilePixelRatio.\n * @property {import(\"../proj.js\").ProjectionLike} [projection] Projection.\n * @property {import(\"./Source.js\").State} [state] State.\n * @property {import(\"../tilegrid/TileGrid.js\").default} [tileGrid] TileGrid.\n * @property {boolean} [wrapX=false] WrapX.\n * @property {number} [transition] Transition.\n * @property {string} [key] Key.\n * @property {number|import(\"../array.js\").NearestDirectionFunction} [zDirection=0] ZDirection.\n * @property {boolean} [interpolate=false] Use interpolated values when resampling. By default,\n * the nearest neighbor is used when resampling.\n */\n\n/**\n * @classdesc\n * Abstract base class; normally only used for creating subclasses and not\n * instantiated in apps.\n * Base class for sources providing images divided into a tile grid.\n * @abstract\n * @api\n */\nclass TileSource extends Source {\n /**\n * @param {Options} options SourceTile source options.\n */\n constructor(options) {\n super({\n attributions: options.attributions,\n attributionsCollapsible: options.attributionsCollapsible,\n projection: options.projection,\n state: options.state,\n wrapX: options.wrapX,\n interpolate: options.interpolate,\n });\n\n /***\n * @type {TileSourceOnSignature}\n */\n this.on;\n\n /***\n * @type {TileSourceOnSignature}\n */\n this.once;\n\n /***\n * @type {TileSourceOnSignature}\n */\n this.un;\n\n /**\n * @private\n * @type {boolean}\n */\n this.opaque_ = options.opaque !== undefined ? options.opaque : false;\n\n /**\n * @private\n * @type {number}\n */\n this.tilePixelRatio_ =\n options.tilePixelRatio !== undefined ? options.tilePixelRatio : 1;\n\n /**\n * @type {import(\"../tilegrid/TileGrid.js\").default|null}\n */\n this.tileGrid = options.tileGrid !== undefined ? options.tileGrid : null;\n\n const tileSize = [256, 256];\n if (this.tileGrid) {\n toSize(this.tileGrid.getTileSize(this.tileGrid.getMinZoom()), tileSize);\n }\n\n /**\n * @protected\n * @type {import(\"../TileCache.js\").default}\n */\n this.tileCache = new TileCache(options.cacheSize || 0);\n\n /**\n * @protected\n * @type {import(\"../size.js\").Size}\n */\n this.tmpSize = [0, 0];\n\n /**\n * @private\n * @type {string}\n */\n this.key_ = options.key || '';\n\n /**\n * @protected\n * @type {import(\"../Tile.js\").Options}\n */\n this.tileOptions = {\n transition: options.transition,\n interpolate: options.interpolate,\n };\n\n /**\n * zDirection hint, read by the renderer. Indicates which resolution should be used\n * by a renderer if the views resolution does not match any resolution of the tile source.\n * If 0, the nearest resolution will be used. If 1, the nearest lower resolution\n * will be used. If -1, the nearest higher resolution will be used.\n * @type {number|import(\"../array.js\").NearestDirectionFunction}\n */\n this.zDirection = options.zDirection ? options.zDirection : 0;\n }\n\n /**\n * @return {boolean} Can expire cache.\n */\n canExpireCache() {\n return this.tileCache.canExpireCache();\n }\n\n /**\n * @param {import(\"../proj/Projection.js\").default} projection Projection.\n * @param {!Object} usedTiles Used tiles.\n */\n expireCache(projection, usedTiles) {\n const tileCache = this.getTileCacheForProjection(projection);\n if (tileCache) {\n tileCache.expireCache(usedTiles);\n }\n }\n\n /**\n * @param {import(\"../proj/Projection.js\").default} projection Projection.\n * @param {number} z Zoom level.\n * @param {import(\"../TileRange.js\").default} tileRange Tile range.\n * @param {function(import(\"../Tile.js\").default):(boolean|void)} callback Called with each\n * loaded tile. If the callback returns `false`, the tile will not be\n * considered loaded.\n * @return {boolean} The tile range is fully covered with loaded tiles.\n */\n forEachLoadedTile(projection, z, tileRange, callback) {\n const tileCache = this.getTileCacheForProjection(projection);\n if (!tileCache) {\n return false;\n }\n\n let covered = true;\n let tile, tileCoordKey, loaded;\n for (let x = tileRange.minX; x <= tileRange.maxX; ++x) {\n for (let y = tileRange.minY; y <= tileRange.maxY; ++y) {\n tileCoordKey = getKeyZXY(z, x, y);\n loaded = false;\n if (tileCache.containsKey(tileCoordKey)) {\n tile = /** @type {!import(\"../Tile.js\").default} */ (\n tileCache.get(tileCoordKey)\n );\n loaded = tile.getState() === TileState.LOADED;\n if (loaded) {\n loaded = callback(tile) !== false;\n }\n }\n if (!loaded) {\n covered = false;\n }\n }\n }\n return covered;\n }\n\n /**\n * @param {import(\"../proj/Projection.js\").default} projection Projection.\n * @return {number} Gutter.\n */\n getGutterForProjection(projection) {\n return 0;\n }\n\n /**\n * Return the key to be used for all tiles in the source.\n * @return {string} The key for all tiles.\n */\n getKey() {\n return this.key_;\n }\n\n /**\n * Set the value to be used as the key for all tiles in the source.\n * @param {string} key The key for tiles.\n * @protected\n */\n setKey(key) {\n if (this.key_ !== key) {\n this.key_ = key;\n this.changed();\n }\n }\n\n /**\n * @param {import(\"../proj/Projection.js\").default} projection Projection.\n * @return {boolean} Opaque.\n */\n getOpaque(projection) {\n return this.opaque_;\n }\n\n /**\n * @param {import(\"../proj/Projection\").default} [projection] Projection.\n * @return {Array|null} Resolutions.\n */\n getResolutions(projection) {\n const tileGrid = projection\n ? this.getTileGridForProjection(projection)\n : this.tileGrid;\n if (!tileGrid) {\n return null;\n }\n return tileGrid.getResolutions();\n }\n\n /**\n * @abstract\n * @param {number} z Tile coordinate z.\n * @param {number} x Tile coordinate x.\n * @param {number} y Tile coordinate y.\n * @param {number} pixelRatio Pixel ratio.\n * @param {import(\"../proj/Projection.js\").default} projection Projection.\n * @return {!import(\"../Tile.js\").default} Tile.\n */\n getTile(z, x, y, pixelRatio, projection) {\n return abstract();\n }\n\n /**\n * Return the tile grid of the tile source.\n * @return {import(\"../tilegrid/TileGrid.js\").default|null} Tile grid.\n * @api\n */\n getTileGrid() {\n return this.tileGrid;\n }\n\n /**\n * @param {import(\"../proj/Projection.js\").default} projection Projection.\n * @return {!import(\"../tilegrid/TileGrid.js\").default} Tile grid.\n */\n getTileGridForProjection(projection) {\n if (!this.tileGrid) {\n return getTileGridForProjection(projection);\n }\n return this.tileGrid;\n }\n\n /**\n * @param {import(\"../proj/Projection.js\").default} projection Projection.\n * @return {import(\"../TileCache.js\").default} Tile cache.\n * @protected\n */\n getTileCacheForProjection(projection) {\n const sourceProjection = this.getProjection();\n assert(\n sourceProjection === null || equivalent(sourceProjection, projection),\n 68 // A VectorTile source can only be rendered if it has a projection compatible with the view projection.\n );\n return this.tileCache;\n }\n\n /**\n * Get the tile pixel ratio for this source. Subclasses may override this\n * method, which is meant to return a supported pixel ratio that matches the\n * provided `pixelRatio` as close as possible.\n * @param {number} pixelRatio Pixel ratio.\n * @return {number} Tile pixel ratio.\n */\n getTilePixelRatio(pixelRatio) {\n return this.tilePixelRatio_;\n }\n\n /**\n * @param {number} z Z.\n * @param {number} pixelRatio Pixel ratio.\n * @param {import(\"../proj/Projection.js\").default} projection Projection.\n * @return {import(\"../size.js\").Size} Tile size.\n */\n getTilePixelSize(z, pixelRatio, projection) {\n const tileGrid = this.getTileGridForProjection(projection);\n const tilePixelRatio = this.getTilePixelRatio(pixelRatio);\n const tileSize = toSize(tileGrid.getTileSize(z), this.tmpSize);\n if (tilePixelRatio == 1) {\n return tileSize;\n }\n return scaleSize(tileSize, tilePixelRatio, this.tmpSize);\n }\n\n /**\n * Returns a tile coordinate wrapped around the x-axis. When the tile coordinate\n * is outside the resolution and extent range of the tile grid, `null` will be\n * returned.\n * @param {import(\"../tilecoord.js\").TileCoord} tileCoord Tile coordinate.\n * @param {import(\"../proj/Projection.js\").default} [projection] Projection.\n * @return {import(\"../tilecoord.js\").TileCoord} Tile coordinate to be passed to the tileUrlFunction or\n * null if no tile URL should be created for the passed `tileCoord`.\n */\n getTileCoordForTileUrlFunction(tileCoord, projection) {\n projection = projection !== undefined ? projection : this.getProjection();\n const tileGrid = this.getTileGridForProjection(projection);\n if (this.getWrapX() && projection.isGlobal()) {\n tileCoord = wrapX(tileGrid, tileCoord, projection);\n }\n return withinExtentAndZ(tileCoord, tileGrid) ? tileCoord : null;\n }\n\n /**\n * Remove all cached tiles from the source. The next render cycle will fetch new tiles.\n * @api\n */\n clear() {\n this.tileCache.clear();\n }\n\n refresh() {\n this.clear();\n super.refresh();\n }\n\n /**\n * Increases the cache size if needed\n * @param {number} tileCount Minimum number of tiles needed.\n * @param {import(\"../proj/Projection.js\").default} projection Projection.\n */\n updateCacheSize(tileCount, projection) {\n const tileCache = this.getTileCacheForProjection(projection);\n if (tileCount > tileCache.highWaterMark) {\n tileCache.highWaterMark = tileCount;\n }\n }\n\n /**\n * Marks a tile coord as being used, without triggering a load.\n * @abstract\n * @param {number} z Tile coordinate z.\n * @param {number} x Tile coordinate x.\n * @param {number} y Tile coordinate y.\n * @param {import(\"../proj/Projection.js\").default} projection Projection.\n */\n useTile(z, x, y, projection) {}\n}\n\n/**\n * @classdesc\n * Events emitted by {@link module:ol/source/Tile~TileSource} instances are instances of this\n * type.\n */\nexport class TileSourceEvent extends Event {\n /**\n * @param {string} type Type.\n * @param {import(\"../Tile.js\").default} tile The tile.\n */\n constructor(type, tile) {\n super(type);\n\n /**\n * The tile related to the event.\n * @type {import(\"../Tile.js\").default}\n * @api\n */\n this.tile = tile;\n }\n}\n\nexport default TileSource;\n","/**\n * @module ol/tileurlfunction\n */\nimport {assert} from './asserts.js';\nimport {modulo} from './math.js';\nimport {hash as tileCoordHash} from './tilecoord.js';\n\n/**\n * @param {string} template Template.\n * @param {import(\"./tilegrid/TileGrid.js\").default} tileGrid Tile grid.\n * @return {import(\"./Tile.js\").UrlFunction} Tile URL function.\n */\nexport function createFromTemplate(template, tileGrid) {\n const zRegEx = /\\{z\\}/g;\n const xRegEx = /\\{x\\}/g;\n const yRegEx = /\\{y\\}/g;\n const dashYRegEx = /\\{-y\\}/g;\n return (\n /**\n * @param {import(\"./tilecoord.js\").TileCoord} tileCoord Tile Coordinate.\n * @param {number} pixelRatio Pixel ratio.\n * @param {import(\"./proj/Projection.js\").default} projection Projection.\n * @return {string|undefined} Tile URL.\n */\n function (tileCoord, pixelRatio, projection) {\n if (!tileCoord) {\n return undefined;\n }\n return template\n .replace(zRegEx, tileCoord[0].toString())\n .replace(xRegEx, tileCoord[1].toString())\n .replace(yRegEx, tileCoord[2].toString())\n .replace(dashYRegEx, function () {\n const z = tileCoord[0];\n const range = tileGrid.getFullTileRange(z);\n assert(range, 55); // The {-y} placeholder requires a tile grid with extent\n const y = range.getHeight() - tileCoord[2] - 1;\n return y.toString();\n });\n }\n );\n}\n\n/**\n * @param {Array} templates Templates.\n * @param {import(\"./tilegrid/TileGrid.js\").default} tileGrid Tile grid.\n * @return {import(\"./Tile.js\").UrlFunction} Tile URL function.\n */\nexport function createFromTemplates(templates, tileGrid) {\n const len = templates.length;\n const tileUrlFunctions = new Array(len);\n for (let i = 0; i < len; ++i) {\n tileUrlFunctions[i] = createFromTemplate(templates[i], tileGrid);\n }\n return createFromTileUrlFunctions(tileUrlFunctions);\n}\n\n/**\n * @param {Array} tileUrlFunctions Tile URL Functions.\n * @return {import(\"./Tile.js\").UrlFunction} Tile URL function.\n */\nexport function createFromTileUrlFunctions(tileUrlFunctions) {\n if (tileUrlFunctions.length === 1) {\n return tileUrlFunctions[0];\n }\n return (\n /**\n * @param {import(\"./tilecoord.js\").TileCoord} tileCoord Tile Coordinate.\n * @param {number} pixelRatio Pixel ratio.\n * @param {import(\"./proj/Projection.js\").default} projection Projection.\n * @return {string|undefined} Tile URL.\n */\n function (tileCoord, pixelRatio, projection) {\n if (!tileCoord) {\n return undefined;\n }\n const h = tileCoordHash(tileCoord);\n const index = modulo(h, tileUrlFunctions.length);\n return tileUrlFunctions[index](tileCoord, pixelRatio, projection);\n }\n );\n}\n\n/**\n * @param {import(\"./tilecoord.js\").TileCoord} tileCoord Tile coordinate.\n * @param {number} pixelRatio Pixel ratio.\n * @param {import(\"./proj/Projection.js\").default} projection Projection.\n * @return {string|undefined} Tile URL.\n */\nexport function nullTileUrlFunction(tileCoord, pixelRatio, projection) {\n return undefined;\n}\n\n/**\n * @param {string} url URL.\n * @return {Array} Array of urls.\n */\nexport function expandUrl(url) {\n const urls = [];\n let match = /\\{([a-z])-([a-z])\\}/.exec(url);\n if (match) {\n // char range\n const startCharCode = match[1].charCodeAt(0);\n const stopCharCode = match[2].charCodeAt(0);\n let charCode;\n for (charCode = startCharCode; charCode <= stopCharCode; ++charCode) {\n urls.push(url.replace(match[0], String.fromCharCode(charCode)));\n }\n return urls;\n }\n match = /\\{(\\d+)-(\\d+)\\}/.exec(url);\n if (match) {\n // number range\n const stop = parseInt(match[2], 10);\n for (let i = parseInt(match[1], 10); i <= stop; i++) {\n urls.push(url.replace(match[0], i.toString()));\n }\n return urls;\n }\n urls.push(url);\n return urls;\n}\n","/**\n * @module ol/source/UrlTile\n */\nimport TileEventType from './TileEventType.js';\nimport TileSource, {TileSourceEvent} from './Tile.js';\nimport TileState from '../TileState.js';\nimport {createFromTemplates, expandUrl} from '../tileurlfunction.js';\nimport {getKeyZXY} from '../tilecoord.js';\nimport {getUid} from '../util.js';\n\n/**\n * @typedef {Object} Options\n * @property {import(\"./Source.js\").AttributionLike} [attributions] Attributions.\n * @property {boolean} [attributionsCollapsible=true] Attributions are collapsible.\n * @property {number} [cacheSize] Cache size.\n * @property {boolean} [opaque=false] Whether the layer is opaque.\n * @property {import(\"../proj.js\").ProjectionLike} [projection] Projection.\n * @property {import(\"./Source.js\").State} [state] State.\n * @property {import(\"../tilegrid/TileGrid.js\").default} [tileGrid] TileGrid.\n * @property {import(\"../Tile.js\").LoadFunction} tileLoadFunction TileLoadFunction.\n * @property {number} [tilePixelRatio] TilePixelRatio.\n * @property {import(\"../Tile.js\").UrlFunction} [tileUrlFunction] TileUrlFunction.\n * @property {string} [url] Url.\n * @property {Array} [urls] Urls.\n * @property {boolean} [wrapX=true] WrapX.\n * @property {number} [transition] Transition.\n * @property {string} [key] Key.\n * @property {number|import(\"../array.js\").NearestDirectionFunction} [zDirection=0] ZDirection.\n * @property {boolean} [interpolate=false] Use interpolated values when resampling. By default,\n * the nearest neighbor is used when resampling.\n */\n\n/**\n * @classdesc\n * Base class for sources providing tiles divided into a tile grid over http.\n *\n * @fires import(\"./Tile.js\").TileSourceEvent\n */\nclass UrlTile extends TileSource {\n /**\n * @param {Options} options Image tile options.\n */\n constructor(options) {\n super({\n attributions: options.attributions,\n cacheSize: options.cacheSize,\n opaque: options.opaque,\n projection: options.projection,\n state: options.state,\n tileGrid: options.tileGrid,\n tilePixelRatio: options.tilePixelRatio,\n wrapX: options.wrapX,\n transition: options.transition,\n interpolate: options.interpolate,\n key: options.key,\n attributionsCollapsible: options.attributionsCollapsible,\n zDirection: options.zDirection,\n });\n\n /**\n * @private\n * @type {boolean}\n */\n this.generateTileUrlFunction_ =\n this.tileUrlFunction === UrlTile.prototype.tileUrlFunction;\n\n /**\n * @protected\n * @type {import(\"../Tile.js\").LoadFunction}\n */\n this.tileLoadFunction = options.tileLoadFunction;\n\n if (options.tileUrlFunction) {\n this.tileUrlFunction = options.tileUrlFunction;\n }\n\n /**\n * @protected\n * @type {!Array|null}\n */\n this.urls = null;\n\n if (options.urls) {\n this.setUrls(options.urls);\n } else if (options.url) {\n this.setUrl(options.url);\n }\n\n /**\n * @private\n * @type {!Object}\n */\n this.tileLoadingKeys_ = {};\n }\n\n /**\n * Return the tile load function of the source.\n * @return {import(\"../Tile.js\").LoadFunction} TileLoadFunction\n * @api\n */\n getTileLoadFunction() {\n return this.tileLoadFunction;\n }\n\n /**\n * Return the tile URL function of the source.\n * @return {import(\"../Tile.js\").UrlFunction} TileUrlFunction\n * @api\n */\n getTileUrlFunction() {\n return Object.getPrototypeOf(this).tileUrlFunction === this.tileUrlFunction\n ? this.tileUrlFunction.bind(this)\n : this.tileUrlFunction;\n }\n\n /**\n * Return the URLs used for this source.\n * When a tileUrlFunction is used instead of url or urls,\n * null will be returned.\n * @return {!Array|null} URLs.\n * @api\n */\n getUrls() {\n return this.urls;\n }\n\n /**\n * Handle tile change events.\n * @param {import(\"../events/Event.js\").default} event Event.\n * @protected\n */\n handleTileChange(event) {\n const tile = /** @type {import(\"../Tile.js\").default} */ (event.target);\n const uid = getUid(tile);\n const tileState = tile.getState();\n let type;\n if (tileState == TileState.LOADING) {\n this.tileLoadingKeys_[uid] = true;\n type = TileEventType.TILELOADSTART;\n } else if (uid in this.tileLoadingKeys_) {\n delete this.tileLoadingKeys_[uid];\n type =\n tileState == TileState.ERROR\n ? TileEventType.TILELOADERROR\n : tileState == TileState.LOADED\n ? TileEventType.TILELOADEND\n : undefined;\n }\n if (type != undefined) {\n this.dispatchEvent(new TileSourceEvent(type, tile));\n }\n }\n\n /**\n * Set the tile load function of the source.\n * @param {import(\"../Tile.js\").LoadFunction} tileLoadFunction Tile load function.\n * @api\n */\n setTileLoadFunction(tileLoadFunction) {\n this.tileCache.clear();\n this.tileLoadFunction = tileLoadFunction;\n this.changed();\n }\n\n /**\n * Set the tile URL function of the source.\n * @param {import(\"../Tile.js\").UrlFunction} tileUrlFunction Tile URL function.\n * @param {string} [key] Optional new tile key for the source.\n * @api\n */\n setTileUrlFunction(tileUrlFunction, key) {\n this.tileUrlFunction = tileUrlFunction;\n this.tileCache.pruneExceptNewestZ();\n if (typeof key !== 'undefined') {\n this.setKey(key);\n } else {\n this.changed();\n }\n }\n\n /**\n * Set the URL to use for requests.\n * @param {string} url URL.\n * @api\n */\n setUrl(url) {\n const urls = expandUrl(url);\n this.urls = urls;\n this.setUrls(urls);\n }\n\n /**\n * Set the URLs to use for requests.\n * @param {Array} urls URLs.\n * @api\n */\n setUrls(urls) {\n this.urls = urls;\n const key = urls.join('\\n');\n if (this.generateTileUrlFunction_) {\n this.setTileUrlFunction(createFromTemplates(urls, this.tileGrid), key);\n } else {\n this.setKey(key);\n }\n }\n\n /**\n * @param {import(\"../tilecoord.js\").TileCoord} tileCoord Tile coordinate.\n * @param {number} pixelRatio Pixel ratio.\n * @param {import(\"../proj/Projection.js\").default} projection Projection.\n * @return {string|undefined} Tile URL.\n */\n tileUrlFunction(tileCoord, pixelRatio, projection) {\n return undefined;\n }\n\n /**\n * Marks a tile coord as being used, without triggering a load.\n * @param {number} z Tile coordinate z.\n * @param {number} x Tile coordinate x.\n * @param {number} y Tile coordinate y.\n */\n useTile(z, x, y) {\n const tileCoordKey = getKeyZXY(z, x, y);\n if (this.tileCache.containsKey(tileCoordKey)) {\n this.tileCache.get(tileCoordKey);\n }\n }\n}\n\nexport default UrlTile;\n","/**\n * @module ol/source/TileImage\n */\nimport EventType from '../events/EventType.js';\nimport ImageTile from '../ImageTile.js';\nimport ReprojTile from '../reproj/Tile.js';\nimport TileCache from '../TileCache.js';\nimport TileState from '../TileState.js';\nimport UrlTile from './UrlTile.js';\nimport {equivalent, get as getProjection} from '../proj.js';\nimport {getKey, getKeyZXY} from '../tilecoord.js';\nimport {getForProjection as getTileGridForProjection} from '../tilegrid.js';\nimport {getUid} from '../util.js';\n\n/**\n * @typedef {Object} Options\n * @property {import(\"./Source.js\").AttributionLike} [attributions] Attributions.\n * @property {boolean} [attributionsCollapsible=true] Attributions are collapsible.\n * @property {number} [cacheSize] Initial tile cache size. Will auto-grow to hold at least the number of tiles in the viewport.\n * @property {null|string} [crossOrigin] The `crossOrigin` attribute for loaded images. Note that\n * you must provide a `crossOrigin` value if you want to access pixel data with the Canvas renderer.\n * See https://developer.mozilla.org/en-US/docs/Web/HTML/CORS_enabled_image for more detail.\n * @property {boolean} [interpolate=true] Use interpolated values when resampling. By default,\n * linear interpolation is used when resampling. Set to false to use the nearest neighbor instead.\n * @property {boolean} [opaque=false] Whether the layer is opaque.\n * @property {import(\"../proj.js\").ProjectionLike} [projection] Projection. Default is the view projection.\n * @property {number} [reprojectionErrorThreshold=0.5] Maximum allowed reprojection error (in pixels).\n * Higher values can increase reprojection performance, but decrease precision.\n * @property {import(\"./Source.js\").State} [state] Source state.\n * @property {typeof import(\"../ImageTile.js\").default} [tileClass] Class used to instantiate image tiles.\n * Default is {@link module:ol/ImageTile~ImageTile}.\n * @property {import(\"../tilegrid/TileGrid.js\").default} [tileGrid] Tile grid.\n * @property {import(\"../Tile.js\").LoadFunction} [tileLoadFunction] Optional function to load a tile given a URL. The default is\n * ```js\n * function(imageTile, src) {\n * imageTile.getImage().src = src;\n * };\n * ```\n * @property {number} [tilePixelRatio=1] The pixel ratio used by the tile service. For example, if the tile\n * service advertizes 256px by 256px tiles but actually sends 512px\n * by 512px images (for retina/hidpi devices) then `tilePixelRatio`\n * should be set to `2`.\n * @property {import(\"../Tile.js\").UrlFunction} [tileUrlFunction] Optional function to get tile URL given a tile coordinate and the projection.\n * @property {string} [url] URL template. Must include `{x}`, `{y}` or `{-y}`, and `{z}` placeholders.\n * A `{?-?}` template pattern, for example `subdomain{a-f}.domain.com`, may be\n * used instead of defining each one separately in the `urls` option.\n * @property {Array} [urls] An array of URL templates.\n * @property {boolean} [wrapX] Whether to wrap the world horizontally. The default, is to\n * request out-of-bounds tiles from the server. When set to `false`, only one\n * world will be rendered. When set to `true`, tiles will be requested for one\n * world only, but they will be wrapped horizontally to render multiple worlds.\n * @property {number} [transition] Duration of the opacity transition for rendering.\n * To disable the opacity transition, pass `transition: 0`.\n * @property {string} [key] Optional tile key for proper cache fetching\n * @property {number|import(\"../array.js\").NearestDirectionFunction} [zDirection=0]\n * Choose whether to use tiles with a higher or lower zoom level when between integer\n * zoom levels. See {@link module:ol/tilegrid/TileGrid~TileGrid#getZForResolution}.\n */\n\n/**\n * @classdesc\n * Base class for sources providing images divided into a tile grid.\n *\n * @fires import(\"./Tile.js\").TileSourceEvent\n * @api\n */\nclass TileImage extends UrlTile {\n /**\n * @param {!Options} options Image tile options.\n */\n constructor(options) {\n super({\n attributions: options.attributions,\n cacheSize: options.cacheSize,\n opaque: options.opaque,\n projection: options.projection,\n state: options.state,\n tileGrid: options.tileGrid,\n tileLoadFunction: options.tileLoadFunction\n ? options.tileLoadFunction\n : defaultTileLoadFunction,\n tilePixelRatio: options.tilePixelRatio,\n tileUrlFunction: options.tileUrlFunction,\n url: options.url,\n urls: options.urls,\n wrapX: options.wrapX,\n transition: options.transition,\n interpolate:\n options.interpolate !== undefined ? options.interpolate : true,\n key: options.key,\n attributionsCollapsible: options.attributionsCollapsible,\n zDirection: options.zDirection,\n });\n\n /**\n * @protected\n * @type {?string}\n */\n this.crossOrigin =\n options.crossOrigin !== undefined ? options.crossOrigin : null;\n\n /**\n * @protected\n * @type {typeof ImageTile}\n */\n this.tileClass =\n options.tileClass !== undefined ? options.tileClass : ImageTile;\n\n /**\n * @protected\n * @type {!Object}\n */\n this.tileCacheForProjection = {};\n\n /**\n * @protected\n * @type {!Object}\n */\n this.tileGridForProjection = {};\n\n /**\n * @private\n * @type {number|undefined}\n */\n this.reprojectionErrorThreshold_ = options.reprojectionErrorThreshold;\n\n /**\n * @private\n * @type {boolean}\n */\n this.renderReprojectionEdges_ = false;\n }\n\n /**\n * @return {boolean} Can expire cache.\n */\n canExpireCache() {\n if (this.tileCache.canExpireCache()) {\n return true;\n }\n for (const key in this.tileCacheForProjection) {\n if (this.tileCacheForProjection[key].canExpireCache()) {\n return true;\n }\n }\n\n return false;\n }\n\n /**\n * @param {import(\"../proj/Projection.js\").default} projection Projection.\n * @param {!Object} usedTiles Used tiles.\n */\n expireCache(projection, usedTiles) {\n const usedTileCache = this.getTileCacheForProjection(projection);\n\n this.tileCache.expireCache(\n this.tileCache == usedTileCache ? usedTiles : {}\n );\n for (const id in this.tileCacheForProjection) {\n const tileCache = this.tileCacheForProjection[id];\n tileCache.expireCache(tileCache == usedTileCache ? usedTiles : {});\n }\n }\n\n /**\n * @param {import(\"../proj/Projection.js\").default} projection Projection.\n * @return {number} Gutter.\n */\n getGutterForProjection(projection) {\n if (\n this.getProjection() &&\n projection &&\n !equivalent(this.getProjection(), projection)\n ) {\n return 0;\n }\n return this.getGutter();\n }\n\n /**\n * @return {number} Gutter.\n */\n getGutter() {\n return 0;\n }\n\n /**\n * Return the key to be used for all tiles in the source.\n * @return {string} The key for all tiles.\n */\n getKey() {\n let key = super.getKey();\n if (!this.getInterpolate()) {\n key += ':disable-interpolation';\n }\n return key;\n }\n\n /**\n * @param {import(\"../proj/Projection.js\").default} projection Projection.\n * @return {boolean} Opaque.\n */\n getOpaque(projection) {\n if (\n this.getProjection() &&\n projection &&\n !equivalent(this.getProjection(), projection)\n ) {\n return false;\n }\n return super.getOpaque(projection);\n }\n\n /**\n * @param {import(\"../proj/Projection.js\").default} projection Projection.\n * @return {!import(\"../tilegrid/TileGrid.js\").default} Tile grid.\n */\n getTileGridForProjection(projection) {\n const thisProj = this.getProjection();\n if (this.tileGrid && (!thisProj || equivalent(thisProj, projection))) {\n return this.tileGrid;\n }\n const projKey = getUid(projection);\n if (!(projKey in this.tileGridForProjection)) {\n this.tileGridForProjection[projKey] =\n getTileGridForProjection(projection);\n }\n return this.tileGridForProjection[projKey];\n }\n\n /**\n * @param {import(\"../proj/Projection.js\").default} projection Projection.\n * @return {import(\"../TileCache.js\").default} Tile cache.\n */\n getTileCacheForProjection(projection) {\n const thisProj = this.getProjection();\n if (!thisProj || equivalent(thisProj, projection)) {\n return this.tileCache;\n }\n const projKey = getUid(projection);\n if (!(projKey in this.tileCacheForProjection)) {\n this.tileCacheForProjection[projKey] = new TileCache(\n this.tileCache.highWaterMark\n );\n }\n return this.tileCacheForProjection[projKey];\n }\n\n /**\n * @param {number} z Tile coordinate z.\n * @param {number} x Tile coordinate x.\n * @param {number} y Tile coordinate y.\n * @param {number} pixelRatio Pixel ratio.\n * @param {import(\"../proj/Projection.js\").default} projection Projection.\n * @param {string} key The key set on the tile.\n * @return {!ImageTile} Tile.\n * @private\n */\n createTile_(z, x, y, pixelRatio, projection, key) {\n const tileCoord = [z, x, y];\n const urlTileCoord = this.getTileCoordForTileUrlFunction(\n tileCoord,\n projection\n );\n const tileUrl = urlTileCoord\n ? this.tileUrlFunction(urlTileCoord, pixelRatio, projection)\n : undefined;\n const tile = new this.tileClass(\n tileCoord,\n tileUrl !== undefined ? TileState.IDLE : TileState.EMPTY,\n tileUrl !== undefined ? tileUrl : '',\n this.crossOrigin,\n this.tileLoadFunction,\n this.tileOptions\n );\n tile.key = key;\n tile.addEventListener(EventType.CHANGE, this.handleTileChange.bind(this));\n return tile;\n }\n\n /**\n * @param {number} z Tile coordinate z.\n * @param {number} x Tile coordinate x.\n * @param {number} y Tile coordinate y.\n * @param {number} pixelRatio Pixel ratio.\n * @param {import(\"../proj/Projection.js\").default} projection Projection.\n * @return {!(ImageTile|ReprojTile)} Tile.\n */\n getTile(z, x, y, pixelRatio, projection) {\n const sourceProjection = this.getProjection();\n if (\n !sourceProjection ||\n !projection ||\n equivalent(sourceProjection, projection)\n ) {\n return this.getTileInternal(\n z,\n x,\n y,\n pixelRatio,\n sourceProjection || projection\n );\n }\n const cache = this.getTileCacheForProjection(projection);\n const tileCoord = [z, x, y];\n let tile;\n const tileCoordKey = getKey(tileCoord);\n if (cache.containsKey(tileCoordKey)) {\n tile = cache.get(tileCoordKey);\n }\n const key = this.getKey();\n if (tile && tile.key == key) {\n return tile;\n }\n const sourceTileGrid = this.getTileGridForProjection(sourceProjection);\n const targetTileGrid = this.getTileGridForProjection(projection);\n const wrappedTileCoord = this.getTileCoordForTileUrlFunction(\n tileCoord,\n projection\n );\n const newTile = new ReprojTile(\n sourceProjection,\n sourceTileGrid,\n projection,\n targetTileGrid,\n tileCoord,\n wrappedTileCoord,\n this.getTilePixelRatio(pixelRatio),\n this.getGutter(),\n (z, x, y, pixelRatio) =>\n this.getTileInternal(z, x, y, pixelRatio, sourceProjection),\n this.reprojectionErrorThreshold_,\n this.renderReprojectionEdges_,\n this.getInterpolate()\n );\n newTile.key = key;\n\n if (tile) {\n newTile.interimTile = tile;\n newTile.refreshInterimChain();\n cache.replace(tileCoordKey, newTile);\n } else {\n cache.set(tileCoordKey, newTile);\n }\n return newTile;\n }\n\n /**\n * @param {number} z Tile coordinate z.\n * @param {number} x Tile coordinate x.\n * @param {number} y Tile coordinate y.\n * @param {number} pixelRatio Pixel ratio.\n * @param {!import(\"../proj/Projection.js\").default} projection Projection.\n * @return {!ImageTile} Tile.\n * @protected\n */\n getTileInternal(z, x, y, pixelRatio, projection) {\n let tile = null;\n const tileCoordKey = getKeyZXY(z, x, y);\n const key = this.getKey();\n if (!this.tileCache.containsKey(tileCoordKey)) {\n tile = this.createTile_(z, x, y, pixelRatio, projection, key);\n this.tileCache.set(tileCoordKey, tile);\n } else {\n tile = this.tileCache.get(tileCoordKey);\n if (tile.key != key) {\n // The source's params changed. If the tile has an interim tile and if we\n // can use it then we use it. Otherwise we create a new tile. In both\n // cases we attempt to assign an interim tile to the new tile.\n const interimTile = tile;\n tile = this.createTile_(z, x, y, pixelRatio, projection, key);\n\n //make the new tile the head of the list,\n if (interimTile.getState() == TileState.IDLE) {\n //the old tile hasn't begun loading yet, and is now outdated, so we can simply discard it\n tile.interimTile = interimTile.interimTile;\n } else {\n tile.interimTile = interimTile;\n }\n tile.refreshInterimChain();\n this.tileCache.replace(tileCoordKey, tile);\n }\n }\n return tile;\n }\n\n /**\n * Sets whether to render reprojection edges or not (usually for debugging).\n * @param {boolean} render Render the edges.\n * @api\n */\n setRenderReprojectionEdges(render) {\n if (this.renderReprojectionEdges_ == render) {\n return;\n }\n this.renderReprojectionEdges_ = render;\n for (const id in this.tileCacheForProjection) {\n this.tileCacheForProjection[id].clear();\n }\n this.changed();\n }\n\n /**\n * Sets the tile grid to use when reprojecting the tiles to the given\n * projection instead of the default tile grid for the projection.\n *\n * This can be useful when the default tile grid cannot be created\n * (e.g. projection has no extent defined) or\n * for optimization reasons (custom tile size, resolutions, ...).\n *\n * @param {import(\"../proj.js\").ProjectionLike} projection Projection.\n * @param {import(\"../tilegrid/TileGrid.js\").default} tilegrid Tile grid to use for the projection.\n * @api\n */\n setTileGridForProjection(projection, tilegrid) {\n const proj = getProjection(projection);\n if (proj) {\n const projKey = getUid(proj);\n if (!(projKey in this.tileGridForProjection)) {\n this.tileGridForProjection[projKey] = tilegrid;\n }\n }\n }\n\n clear() {\n super.clear();\n for (const id in this.tileCacheForProjection) {\n this.tileCacheForProjection[id].clear();\n }\n }\n}\n\n/**\n * @param {ImageTile} imageTile Image tile.\n * @param {string} src Source.\n */\nfunction defaultTileLoadFunction(imageTile, src) {\n /** @type {HTMLImageElement|HTMLVideoElement} */ (imageTile.getImage()).src =\n src;\n}\n\nexport default TileImage;\n","/**\n * @module ol/source/BingMaps\n */\n\nimport TileImage from './TileImage.js';\nimport {applyTransform, intersects} from '../extent.js';\nimport {createFromTileUrlFunctions} from '../tileurlfunction.js';\nimport {createOrUpdate} from '../tilecoord.js';\nimport {createXYZ, extentFromProjection} from '../tilegrid.js';\nimport {get as getProjection, getTransformFromProjections} from '../proj.js';\nimport {jsonp as requestJSONP} from '../net.js';\n\n/**\n * @param {import('../tilecoord.js').TileCoord} tileCoord Tile coord.\n * @return {string} Quad key.\n */\nexport function quadKey(tileCoord) {\n const z = tileCoord[0];\n const digits = new Array(z);\n let mask = 1 << (z - 1);\n let i, charCode;\n for (i = 0; i < z; ++i) {\n // 48 is charCode for 0 - '0'.charCodeAt(0)\n charCode = 48;\n if (tileCoord[1] & mask) {\n charCode += 1;\n }\n if (tileCoord[2] & mask) {\n charCode += 2;\n }\n digits[i] = String.fromCharCode(charCode);\n mask >>= 1;\n }\n return digits.join('');\n}\n\n/**\n * The attribution containing a link to the Microsoft® Bing™ Maps Platform APIs’\n * Terms Of Use.\n * @const\n * @type {string}\n */\nconst TOS_ATTRIBUTION =\n '' +\n 'Terms of Use';\n\n/**\n * @typedef {Object} Options\n * @property {number} [cacheSize] Initial tile cache size. Will auto-grow to hold at least the number of tiles in the viewport.\n * @property {boolean} [hidpi=false] If `true` hidpi tiles will be requested.\n * @property {string} [culture='en-us'] Culture code.\n * @property {string} key Bing Maps API key. Get yours at https://www.bingmapsportal.com/.\n * @property {string} imagerySet Type of imagery.\n * @property {boolean} [interpolate=true] Use interpolated values when resampling. By default,\n * linear interpolation is used when resampling. Set to false to use the nearest neighbor instead.\n * @property {number} [maxZoom=21] Max zoom. Default is what's advertized by the BingMaps service.\n * @property {number} [reprojectionErrorThreshold=0.5] Maximum allowed reprojection error (in pixels).\n * Higher values can increase reprojection performance, but decrease precision.\n * @property {import(\"../Tile.js\").LoadFunction} [tileLoadFunction] Optional function to load a tile given a URL. The default is\n * ```js\n * function(imageTile, src) {\n * imageTile.getImage().src = src;\n * };\n * ```\n * @property {boolean} [wrapX=true] Whether to wrap the world horizontally.\n * @property {number} [transition] Duration of the opacity transition for rendering.\n * To disable the opacity transition, pass `transition: 0`.\n * @property {number|import(\"../array.js\").NearestDirectionFunction} [zDirection=0]\n * Choose whether to use tiles with a higher or lower zoom level when between integer\n * zoom levels. See {@link module:ol/tilegrid/TileGrid~TileGrid#getZForResolution}.\n */\n\n/**\n * @typedef {Object} BingMapsImageryMetadataResponse\n * @property {number} statusCode The response status code\n * @property {string} statusDescription The response status description\n * @property {string} authenticationResultCode The authentication result code\n * @property {Array} resourceSets The array of resource sets\n */\n\n/**\n * @typedef {Object} ResourceSet\n * @property {Array} resources Resources.\n */\n\n/**\n * @typedef {Object} Resource\n * @property {number} imageHeight The image height\n * @property {number} imageWidth The image width\n * @property {number} zoomMin The minimum zoom level\n * @property {number} zoomMax The maximum zoom level\n * @property {string} imageUrl The image URL\n * @property {Array} imageUrlSubdomains The image URL subdomains for rotation\n * @property {Array} [imageryProviders] The array of ImageryProviders\n */\n\n/**\n * @typedef {Object} ImageryProvider\n * @property {Array} coverageAreas The coverage areas\n * @property {string} [attribution] The attribution\n */\n\n/**\n * @typedef {Object} CoverageArea\n * @property {number} zoomMin The minimum zoom\n * @property {number} zoomMax The maximum zoom\n * @property {Array} bbox The coverage bounding box\n */\n\n/**\n * @classdesc\n * Layer source for Bing Maps tile data.\n * @api\n */\nclass BingMaps extends TileImage {\n /**\n * @param {Options} options Bing Maps options.\n */\n constructor(options) {\n const hidpi = options.hidpi !== undefined ? options.hidpi : false;\n\n super({\n cacheSize: options.cacheSize,\n crossOrigin: 'anonymous',\n interpolate: options.interpolate,\n opaque: true,\n projection: getProjection('EPSG:3857'),\n reprojectionErrorThreshold: options.reprojectionErrorThreshold,\n state: 'loading',\n tileLoadFunction: options.tileLoadFunction,\n tilePixelRatio: hidpi ? 2 : 1,\n wrapX: options.wrapX !== undefined ? options.wrapX : true,\n transition: options.transition,\n zDirection: options.zDirection,\n });\n\n /**\n * @private\n * @type {boolean}\n */\n this.hidpi_ = hidpi;\n\n /**\n * @private\n * @type {string}\n */\n this.culture_ = options.culture !== undefined ? options.culture : 'en-us';\n\n /**\n * @private\n * @type {number}\n */\n this.maxZoom_ = options.maxZoom !== undefined ? options.maxZoom : -1;\n\n /**\n * @private\n * @type {string}\n */\n this.apiKey_ = options.key;\n\n /**\n * @private\n * @type {string}\n */\n this.imagerySet_ = options.imagerySet;\n\n const url =\n 'https://dev.virtualearth.net/REST/v1/Imagery/Metadata/' +\n this.imagerySet_ +\n '?uriScheme=https&include=ImageryProviders&key=' +\n this.apiKey_ +\n '&c=' +\n this.culture_;\n\n requestJSONP(\n url,\n this.handleImageryMetadataResponse.bind(this),\n undefined,\n 'jsonp'\n );\n }\n\n /**\n * Get the api key used for this source.\n *\n * @return {string} The api key.\n * @api\n */\n getApiKey() {\n return this.apiKey_;\n }\n\n /**\n * Get the imagery set associated with this source.\n *\n * @return {string} The imagery set.\n * @api\n */\n getImagerySet() {\n return this.imagerySet_;\n }\n\n /**\n * @param {BingMapsImageryMetadataResponse} response Response.\n */\n handleImageryMetadataResponse(response) {\n if (\n response.statusCode != 200 ||\n response.statusDescription != 'OK' ||\n response.authenticationResultCode != 'ValidCredentials' ||\n response.resourceSets.length != 1 ||\n response.resourceSets[0].resources.length != 1\n ) {\n this.setState('error');\n return;\n }\n\n const resource = response.resourceSets[0].resources[0];\n const maxZoom = this.maxZoom_ == -1 ? resource.zoomMax : this.maxZoom_;\n\n const sourceProjection = this.getProjection();\n const extent = extentFromProjection(sourceProjection);\n const scale = this.hidpi_ ? 2 : 1;\n const tileSize =\n resource.imageWidth == resource.imageHeight\n ? resource.imageWidth / scale\n : [resource.imageWidth / scale, resource.imageHeight / scale];\n\n const tileGrid = createXYZ({\n extent: extent,\n minZoom: resource.zoomMin,\n maxZoom: maxZoom,\n tileSize: tileSize,\n });\n this.tileGrid = tileGrid;\n\n const culture = this.culture_;\n const hidpi = this.hidpi_;\n this.tileUrlFunction = createFromTileUrlFunctions(\n resource.imageUrlSubdomains.map(function (subdomain) {\n /** @type {import('../tilecoord.js').TileCoord} */\n const quadKeyTileCoord = [0, 0, 0];\n const imageUrl = resource.imageUrl\n .replace('{subdomain}', subdomain)\n .replace('{culture}', culture);\n return (\n /**\n * @param {import(\"../tilecoord.js\").TileCoord} tileCoord Tile coordinate.\n * @param {number} pixelRatio Pixel ratio.\n * @param {import(\"../proj/Projection.js\").default} projection Projection.\n * @return {string|undefined} Tile URL.\n */\n function (tileCoord, pixelRatio, projection) {\n if (!tileCoord) {\n return undefined;\n }\n createOrUpdate(\n tileCoord[0],\n tileCoord[1],\n tileCoord[2],\n quadKeyTileCoord\n );\n let url = imageUrl;\n if (hidpi) {\n url += '&dpi=d1&device=mobile';\n }\n return url.replace('{quadkey}', quadKey(quadKeyTileCoord));\n }\n );\n })\n );\n\n if (resource.imageryProviders) {\n const transform = getTransformFromProjections(\n getProjection('EPSG:4326'),\n this.getProjection()\n );\n\n this.setAttributions((frameState) => {\n const attributions = [];\n const viewState = frameState.viewState;\n const tileGrid = this.getTileGrid();\n const z = tileGrid.getZForResolution(\n viewState.resolution,\n this.zDirection\n );\n const tileCoord = tileGrid.getTileCoordForCoordAndZ(\n viewState.center,\n z\n );\n const zoom = tileCoord[0];\n resource.imageryProviders.map(function (imageryProvider) {\n let intersecting = false;\n const coverageAreas = imageryProvider.coverageAreas;\n for (let i = 0, ii = coverageAreas.length; i < ii; ++i) {\n const coverageArea = coverageAreas[i];\n if (zoom >= coverageArea.zoomMin && zoom <= coverageArea.zoomMax) {\n const bbox = coverageArea.bbox;\n const epsg4326Extent = [bbox[1], bbox[0], bbox[3], bbox[2]];\n const extent = applyTransform(epsg4326Extent, transform);\n if (intersects(extent, frameState.extent)) {\n intersecting = true;\n break;\n }\n }\n }\n if (intersecting) {\n attributions.push(imageryProvider.attribution);\n }\n });\n\n attributions.push(TOS_ATTRIBUTION);\n return attributions;\n });\n }\n\n this.setState('ready');\n }\n}\n\nexport default BingMaps;\n","/**\n * @module ol/source/XYZ\n */\n\nimport TileImage from './TileImage.js';\nimport {createXYZ, extentFromProjection} from '../tilegrid.js';\n\n/**\n * @typedef {Object} Options\n * @property {import(\"./Source.js\").AttributionLike} [attributions] Attributions.\n * @property {boolean} [attributionsCollapsible=true] Attributions are collapsible.\n * @property {number} [cacheSize] Initial tile cache size. Will auto-grow to hold at least the number of tiles in the viewport.\n * @property {null|string} [crossOrigin] The `crossOrigin` attribute for loaded images. Note that\n * you must provide a `crossOrigin` value if you want to access pixel data with the Canvas renderer.\n * See https://developer.mozilla.org/en-US/docs/Web/HTML/CORS_enabled_image for more detail.\n * @property {boolean} [interpolate=true] Use interpolated values when resampling. By default,\n * linear interpolation is used when resampling. Set to false to use the nearest neighbor instead.\n * @property {boolean} [opaque=false] Whether the layer is opaque.\n * @property {import(\"../proj.js\").ProjectionLike} [projection='EPSG:3857'] Projection.\n * @property {number} [reprojectionErrorThreshold=0.5] Maximum allowed reprojection error (in pixels).\n * Higher values can increase reprojection performance, but decrease precision.\n * @property {number} [maxZoom=42] Optional max zoom level. Not used if `tileGrid` is provided.\n * @property {number} [minZoom=0] Optional min zoom level. Not used if `tileGrid` is provided.\n * @property {number} [maxResolution] Optional tile grid resolution at level zero. Not used if `tileGrid` is provided.\n * @property {import(\"../tilegrid/TileGrid.js\").default} [tileGrid] Tile grid.\n * @property {import(\"../Tile.js\").LoadFunction} [tileLoadFunction] Optional function to load a tile given a URL. The default is\n * ```js\n * function(imageTile, src) {\n * imageTile.getImage().src = src;\n * };\n * ```\n * @property {number} [tilePixelRatio=1] The pixel ratio used by the tile service.\n * For example, if the tile service advertizes 256px by 256px tiles but actually sends 512px\n * by 512px images (for retina/hidpi devices) then `tilePixelRatio`\n * should be set to `2`.\n * @property {number|import(\"../size.js\").Size} [tileSize=[256, 256]] The tile size used by the tile service.\n * Not used if `tileGrid` is provided.\n * @property {number} [gutter=0] The size in pixels of the gutter around image tiles to ignore.\n * This allows artifacts of rendering at tile edges to be ignored.\n * Supported images should be wider and taller than the tile size by a value of `2 x gutter`.\n * @property {import(\"../Tile.js\").UrlFunction} [tileUrlFunction] Optional function to get\n * tile URL given a tile coordinate and the projection.\n * Required if `url` or `urls` are not provided.\n * @property {string} [url] URL template. Must include `{x}`, `{y}` or `{-y}`,\n * and `{z}` placeholders. A `{?-?}` template pattern, for example `subdomain{a-f}.domain.com`,\n * may be used instead of defining each one separately in the `urls` option.\n * @property {Array} [urls] An array of URL templates.\n * @property {boolean} [wrapX=true] Whether to wrap the world horizontally.\n * @property {number} [transition=250] Duration of the opacity transition for rendering.\n * To disable the opacity transition, pass `transition: 0`.\n * @property {number|import(\"../array.js\").NearestDirectionFunction} [zDirection=0]\n * Choose whether to use tiles with a higher or lower zoom level when between integer\n * zoom levels. See {@link module:ol/tilegrid/TileGrid~TileGrid#getZForResolution}.\n */\n\n/**\n * @classdesc\n * Layer source for tile data with URLs in a set XYZ format that are\n * defined in a URL template. By default, this follows the widely-used\n * Google grid where `x` 0 and `y` 0 are in the top left. Grids like\n * TMS where `x` 0 and `y` 0 are in the bottom left can be used by\n * using the `{-y}` placeholder in the URL template, so long as the\n * source does not have a custom tile grid. In this case\n * a `tileUrlFunction` can be used, such as:\n * ```js\n * tileUrlFunction: function(coordinate) {\n * return 'http://mapserver.com/' + coordinate[0] + '/' +\n * coordinate[1] + '/' + (-coordinate[2] - 1) + '.png';\n * }\n * ```\n * @api\n */\nclass XYZ extends TileImage {\n /**\n * @param {Options} [options] XYZ options.\n */\n constructor(options) {\n options = options || {};\n\n const projection =\n options.projection !== undefined ? options.projection : 'EPSG:3857';\n\n const tileGrid =\n options.tileGrid !== undefined\n ? options.tileGrid\n : createXYZ({\n extent: extentFromProjection(projection),\n maxResolution: options.maxResolution,\n maxZoom: options.maxZoom,\n minZoom: options.minZoom,\n tileSize: options.tileSize,\n });\n\n super({\n attributions: options.attributions,\n cacheSize: options.cacheSize,\n crossOrigin: options.crossOrigin,\n interpolate: options.interpolate,\n opaque: options.opaque,\n projection: projection,\n reprojectionErrorThreshold: options.reprojectionErrorThreshold,\n tileGrid: tileGrid,\n tileLoadFunction: options.tileLoadFunction,\n tilePixelRatio: options.tilePixelRatio,\n tileUrlFunction: options.tileUrlFunction,\n url: options.url,\n urls: options.urls,\n wrapX: options.wrapX !== undefined ? options.wrapX : true,\n transition: options.transition,\n attributionsCollapsible: options.attributionsCollapsible,\n zDirection: options.zDirection,\n });\n\n /**\n * @private\n * @type {number}\n */\n this.gutter_ = options.gutter !== undefined ? options.gutter : 0;\n }\n\n /**\n * @return {number} Gutter.\n */\n getGutter() {\n return this.gutter_;\n }\n}\n\nexport default XYZ;\n","/**\n * @module ol/source/CartoDB\n */\n\nimport XYZ from './XYZ.js';\n\n/**\n * @typedef {Object} Options\n * @property {import(\"./Source.js\").AttributionLike} [attributions] Attributions.\n * @property {number} [cacheSize] Initial tile cache size. Will auto-grow to hold at least the number of tiles in the viewport.\n * @property {null|string} [crossOrigin] The `crossOrigin` attribute for loaded images. Note that\n * you must provide a `crossOrigin` value if you want to access pixel data with the Canvas renderer.\n * See https://developer.mozilla.org/en-US/docs/Web/HTML/CORS_enabled_image for more detail.\n * @property {import(\"../proj.js\").ProjectionLike} [projection='EPSG:3857'] Projection.\n * @property {number} [maxZoom=18] Max zoom.\n * @property {number} [minZoom] Minimum zoom.\n * @property {boolean} [wrapX=true] Whether to wrap the world horizontally.\n * @property {Object} [config] If using anonymous maps, the CartoDB config to use. See\n * https://carto.com/developers/maps-api/guides/anonymous-maps/\n * for more detail.\n * If using named maps, a key-value lookup with the template parameters.\n * See https://carto.com/developers/maps-api/guides/named-maps/\n * for more detail.\n * @property {string} [map] If using named maps, this will be the name of the template to load.\n * See https://carto.com/developers/maps-api/guides/named-maps/\n * for more detail.\n * @property {string} [account] Username as used to access public Carto dashboard at https://{username}.carto.com/.\n * @property {number} [transition=250] Duration of the opacity transition for rendering.\n * To disable the opacity transition, pass `transition: 0`.\n * @property {number|import(\"../array.js\").NearestDirectionFunction} [zDirection=0]\n * Choose whether to use tiles with a higher or lower zoom level when between integer\n * zoom levels. See {@link module:ol/tilegrid/TileGrid~TileGrid#getZForResolution}.\n */\n\n/**\n * @typedef {Object} CartoDBLayerInfo\n * @property {string} layergroupid The layer group ID\n * @property {{https: string}} cdn_url The CDN URL\n */\n\n/**\n * @classdesc\n * Layer source for the CartoDB Maps API.\n * @api\n */\nclass CartoDB extends XYZ {\n /**\n * @param {Options} options CartoDB options.\n */\n constructor(options) {\n super({\n attributions: options.attributions,\n cacheSize: options.cacheSize,\n crossOrigin: options.crossOrigin,\n maxZoom: options.maxZoom !== undefined ? options.maxZoom : 18,\n minZoom: options.minZoom,\n projection: options.projection,\n transition: options.transition,\n wrapX: options.wrapX,\n zDirection: options.zDirection,\n });\n\n /**\n * @type {string}\n * @private\n */\n this.account_ = options.account;\n\n /**\n * @type {string}\n * @private\n */\n this.mapId_ = options.map || '';\n\n /**\n * @type {!Object}\n * @private\n */\n this.config_ = options.config || {};\n\n /**\n * @type {!Object}\n * @private\n */\n this.templateCache_ = {};\n\n this.initializeMap_();\n }\n\n /**\n * Returns the current config.\n * @return {!Object} The current configuration.\n * @api\n */\n getConfig() {\n return this.config_;\n }\n\n /**\n * Updates the carto db config.\n * @param {Object} config a key-value lookup. Values will replace current values\n * in the config.\n * @api\n */\n updateConfig(config) {\n Object.assign(this.config_, config);\n this.initializeMap_();\n }\n\n /**\n * Sets the CartoDB config\n * @param {Object} config In the case of anonymous maps, a CartoDB configuration\n * object.\n * If using named maps, a key-value lookup with the template parameters.\n * @api\n */\n setConfig(config) {\n this.config_ = config || {};\n this.initializeMap_();\n }\n\n /**\n * Issue a request to initialize the CartoDB map.\n * @private\n */\n initializeMap_() {\n const paramHash = JSON.stringify(this.config_);\n if (this.templateCache_[paramHash]) {\n this.applyTemplate_(this.templateCache_[paramHash]);\n return;\n }\n let mapUrl = 'https://' + this.account_ + '.carto.com/api/v1/map';\n\n if (this.mapId_) {\n mapUrl += '/named/' + this.mapId_;\n }\n\n const client = new XMLHttpRequest();\n client.addEventListener(\n 'load',\n this.handleInitResponse_.bind(this, paramHash)\n );\n client.addEventListener('error', this.handleInitError_.bind(this));\n client.open('POST', mapUrl);\n client.setRequestHeader('Content-type', 'application/json');\n client.send(JSON.stringify(this.config_));\n }\n\n /**\n * Handle map initialization response.\n * @param {string} paramHash a hash representing the parameter set that was used\n * for the request\n * @param {Event} event Event.\n * @private\n */\n handleInitResponse_(paramHash, event) {\n const client = /** @type {XMLHttpRequest} */ (event.target);\n // status will be 0 for file:// urls\n if (!client.status || (client.status >= 200 && client.status < 300)) {\n let response;\n try {\n response = /** @type {CartoDBLayerInfo} */ (\n JSON.parse(client.responseText)\n );\n } catch (err) {\n this.setState('error');\n return;\n }\n this.applyTemplate_(response);\n this.templateCache_[paramHash] = response;\n this.setState('ready');\n } else {\n this.setState('error');\n }\n }\n\n /**\n * @private\n * @param {Event} event Event.\n */\n handleInitError_(event) {\n this.setState('error');\n }\n\n /**\n * Apply the new tile urls returned by carto db\n * @param {CartoDBLayerInfo} data Result of carto db call.\n * @private\n */\n applyTemplate_(data) {\n const tilesUrl =\n 'https://' +\n data.cdn_url.https +\n '/' +\n this.account_ +\n '/api/v1/map/' +\n data.layergroupid +\n '/{z}/{x}/{y}.png';\n this.setUrl(tilesUrl);\n }\n}\n\nexport default CartoDB;\n","\nexport default function quickselect(arr, k, left, right, compare) {\n quickselectStep(arr, k, left || 0, right || (arr.length - 1), compare || defaultCompare);\n}\n\nfunction quickselectStep(arr, k, left, right, compare) {\n\n while (right > left) {\n if (right - left > 600) {\n var n = right - left + 1;\n var m = k - left + 1;\n var z = Math.log(n);\n var s = 0.5 * Math.exp(2 * z / 3);\n var sd = 0.5 * Math.sqrt(z * s * (n - s) / n) * (m - n / 2 < 0 ? -1 : 1);\n var newLeft = Math.max(left, Math.floor(k - m * s / n + sd));\n var newRight = Math.min(right, Math.floor(k + (n - m) * s / n + sd));\n quickselectStep(arr, k, newLeft, newRight, compare);\n }\n\n var t = arr[k];\n var i = left;\n var j = right;\n\n swap(arr, left, k);\n if (compare(arr[right], t) > 0) swap(arr, left, right);\n\n while (i < j) {\n swap(arr, i, j);\n i++;\n j--;\n while (compare(arr[i], t) < 0) i++;\n while (compare(arr[j], t) > 0) j--;\n }\n\n if (compare(arr[left], t) === 0) swap(arr, left, j);\n else {\n j++;\n swap(arr, j, right);\n }\n\n if (j <= k) left = j + 1;\n if (k <= j) right = j - 1;\n }\n}\n\nfunction swap(arr, i, j) {\n var tmp = arr[i];\n arr[i] = arr[j];\n arr[j] = tmp;\n}\n\nfunction defaultCompare(a, b) {\n return a < b ? -1 : a > b ? 1 : 0;\n}\n","import quickselect from 'quickselect';\n\nexport default class RBush {\n constructor(maxEntries = 9) {\n // max entries in a node is 9 by default; min node fill is 40% for best performance\n this._maxEntries = Math.max(4, maxEntries);\n this._minEntries = Math.max(2, Math.ceil(this._maxEntries * 0.4));\n this.clear();\n }\n\n all() {\n return this._all(this.data, []);\n }\n\n search(bbox) {\n let node = this.data;\n const result = [];\n\n if (!intersects(bbox, node)) return result;\n\n const toBBox = this.toBBox;\n const nodesToSearch = [];\n\n while (node) {\n for (let i = 0; i < node.children.length; i++) {\n const child = node.children[i];\n const childBBox = node.leaf ? toBBox(child) : child;\n\n if (intersects(bbox, childBBox)) {\n if (node.leaf) result.push(child);\n else if (contains(bbox, childBBox)) this._all(child, result);\n else nodesToSearch.push(child);\n }\n }\n node = nodesToSearch.pop();\n }\n\n return result;\n }\n\n collides(bbox) {\n let node = this.data;\n\n if (!intersects(bbox, node)) return false;\n\n const nodesToSearch = [];\n while (node) {\n for (let i = 0; i < node.children.length; i++) {\n const child = node.children[i];\n const childBBox = node.leaf ? this.toBBox(child) : child;\n\n if (intersects(bbox, childBBox)) {\n if (node.leaf || contains(bbox, childBBox)) return true;\n nodesToSearch.push(child);\n }\n }\n node = nodesToSearch.pop();\n }\n\n return false;\n }\n\n load(data) {\n if (!(data && data.length)) return this;\n\n if (data.length < this._minEntries) {\n for (let i = 0; i < data.length; i++) {\n this.insert(data[i]);\n }\n return this;\n }\n\n // recursively build the tree with the given data from scratch using OMT algorithm\n let node = this._build(data.slice(), 0, data.length - 1, 0);\n\n if (!this.data.children.length) {\n // save as is if tree is empty\n this.data = node;\n\n } else if (this.data.height === node.height) {\n // split root if trees have the same height\n this._splitRoot(this.data, node);\n\n } else {\n if (this.data.height < node.height) {\n // swap trees if inserted one is bigger\n const tmpNode = this.data;\n this.data = node;\n node = tmpNode;\n }\n\n // insert the small tree into the large tree at appropriate level\n this._insert(node, this.data.height - node.height - 1, true);\n }\n\n return this;\n }\n\n insert(item) {\n if (item) this._insert(item, this.data.height - 1);\n return this;\n }\n\n clear() {\n this.data = createNode([]);\n return this;\n }\n\n remove(item, equalsFn) {\n if (!item) return this;\n\n let node = this.data;\n const bbox = this.toBBox(item);\n const path = [];\n const indexes = [];\n let i, parent, goingUp;\n\n // depth-first iterative tree traversal\n while (node || path.length) {\n\n if (!node) { // go up\n node = path.pop();\n parent = path[path.length - 1];\n i = indexes.pop();\n goingUp = true;\n }\n\n if (node.leaf) { // check current node\n const index = findItem(item, node.children, equalsFn);\n\n if (index !== -1) {\n // item found, remove the item and condense tree upwards\n node.children.splice(index, 1);\n path.push(node);\n this._condense(path);\n return this;\n }\n }\n\n if (!goingUp && !node.leaf && contains(node, bbox)) { // go down\n path.push(node);\n indexes.push(i);\n i = 0;\n parent = node;\n node = node.children[0];\n\n } else if (parent) { // go right\n i++;\n node = parent.children[i];\n goingUp = false;\n\n } else node = null; // nothing found\n }\n\n return this;\n }\n\n toBBox(item) { return item; }\n\n compareMinX(a, b) { return a.minX - b.minX; }\n compareMinY(a, b) { return a.minY - b.minY; }\n\n toJSON() { return this.data; }\n\n fromJSON(data) {\n this.data = data;\n return this;\n }\n\n _all(node, result) {\n const nodesToSearch = [];\n while (node) {\n if (node.leaf) result.push(...node.children);\n else nodesToSearch.push(...node.children);\n\n node = nodesToSearch.pop();\n }\n return result;\n }\n\n _build(items, left, right, height) {\n\n const N = right - left + 1;\n let M = this._maxEntries;\n let node;\n\n if (N <= M) {\n // reached leaf level; return leaf\n node = createNode(items.slice(left, right + 1));\n calcBBox(node, this.toBBox);\n return node;\n }\n\n if (!height) {\n // target height of the bulk-loaded tree\n height = Math.ceil(Math.log(N) / Math.log(M));\n\n // target number of root entries to maximize storage utilization\n M = Math.ceil(N / Math.pow(M, height - 1));\n }\n\n node = createNode([]);\n node.leaf = false;\n node.height = height;\n\n // split the items into M mostly square tiles\n\n const N2 = Math.ceil(N / M);\n const N1 = N2 * Math.ceil(Math.sqrt(M));\n\n multiSelect(items, left, right, N1, this.compareMinX);\n\n for (let i = left; i <= right; i += N1) {\n\n const right2 = Math.min(i + N1 - 1, right);\n\n multiSelect(items, i, right2, N2, this.compareMinY);\n\n for (let j = i; j <= right2; j += N2) {\n\n const right3 = Math.min(j + N2 - 1, right2);\n\n // pack each entry recursively\n node.children.push(this._build(items, j, right3, height - 1));\n }\n }\n\n calcBBox(node, this.toBBox);\n\n return node;\n }\n\n _chooseSubtree(bbox, node, level, path) {\n while (true) {\n path.push(node);\n\n if (node.leaf || path.length - 1 === level) break;\n\n let minArea = Infinity;\n let minEnlargement = Infinity;\n let targetNode;\n\n for (let i = 0; i < node.children.length; i++) {\n const child = node.children[i];\n const area = bboxArea(child);\n const enlargement = enlargedArea(bbox, child) - area;\n\n // choose entry with the least area enlargement\n if (enlargement < minEnlargement) {\n minEnlargement = enlargement;\n minArea = area < minArea ? area : minArea;\n targetNode = child;\n\n } else if (enlargement === minEnlargement) {\n // otherwise choose one with the smallest area\n if (area < minArea) {\n minArea = area;\n targetNode = child;\n }\n }\n }\n\n node = targetNode || node.children[0];\n }\n\n return node;\n }\n\n _insert(item, level, isNode) {\n const bbox = isNode ? item : this.toBBox(item);\n const insertPath = [];\n\n // find the best node for accommodating the item, saving all nodes along the path too\n const node = this._chooseSubtree(bbox, this.data, level, insertPath);\n\n // put the item into the node\n node.children.push(item);\n extend(node, bbox);\n\n // split on node overflow; propagate upwards if necessary\n while (level >= 0) {\n if (insertPath[level].children.length > this._maxEntries) {\n this._split(insertPath, level);\n level--;\n } else break;\n }\n\n // adjust bboxes along the insertion path\n this._adjustParentBBoxes(bbox, insertPath, level);\n }\n\n // split overflowed node into two\n _split(insertPath, level) {\n const node = insertPath[level];\n const M = node.children.length;\n const m = this._minEntries;\n\n this._chooseSplitAxis(node, m, M);\n\n const splitIndex = this._chooseSplitIndex(node, m, M);\n\n const newNode = createNode(node.children.splice(splitIndex, node.children.length - splitIndex));\n newNode.height = node.height;\n newNode.leaf = node.leaf;\n\n calcBBox(node, this.toBBox);\n calcBBox(newNode, this.toBBox);\n\n if (level) insertPath[level - 1].children.push(newNode);\n else this._splitRoot(node, newNode);\n }\n\n _splitRoot(node, newNode) {\n // split root node\n this.data = createNode([node, newNode]);\n this.data.height = node.height + 1;\n this.data.leaf = false;\n calcBBox(this.data, this.toBBox);\n }\n\n _chooseSplitIndex(node, m, M) {\n let index;\n let minOverlap = Infinity;\n let minArea = Infinity;\n\n for (let i = m; i <= M - m; i++) {\n const bbox1 = distBBox(node, 0, i, this.toBBox);\n const bbox2 = distBBox(node, i, M, this.toBBox);\n\n const overlap = intersectionArea(bbox1, bbox2);\n const area = bboxArea(bbox1) + bboxArea(bbox2);\n\n // choose distribution with minimum overlap\n if (overlap < minOverlap) {\n minOverlap = overlap;\n index = i;\n\n minArea = area < minArea ? area : minArea;\n\n } else if (overlap === minOverlap) {\n // otherwise choose distribution with minimum area\n if (area < minArea) {\n minArea = area;\n index = i;\n }\n }\n }\n\n return index || M - m;\n }\n\n // sorts node children by the best axis for split\n _chooseSplitAxis(node, m, M) {\n const compareMinX = node.leaf ? this.compareMinX : compareNodeMinX;\n const compareMinY = node.leaf ? this.compareMinY : compareNodeMinY;\n const xMargin = this._allDistMargin(node, m, M, compareMinX);\n const yMargin = this._allDistMargin(node, m, M, compareMinY);\n\n // if total distributions margin value is minimal for x, sort by minX,\n // otherwise it's already sorted by minY\n if (xMargin < yMargin) node.children.sort(compareMinX);\n }\n\n // total margin of all possible split distributions where each node is at least m full\n _allDistMargin(node, m, M, compare) {\n node.children.sort(compare);\n\n const toBBox = this.toBBox;\n const leftBBox = distBBox(node, 0, m, toBBox);\n const rightBBox = distBBox(node, M - m, M, toBBox);\n let margin = bboxMargin(leftBBox) + bboxMargin(rightBBox);\n\n for (let i = m; i < M - m; i++) {\n const child = node.children[i];\n extend(leftBBox, node.leaf ? toBBox(child) : child);\n margin += bboxMargin(leftBBox);\n }\n\n for (let i = M - m - 1; i >= m; i--) {\n const child = node.children[i];\n extend(rightBBox, node.leaf ? toBBox(child) : child);\n margin += bboxMargin(rightBBox);\n }\n\n return margin;\n }\n\n _adjustParentBBoxes(bbox, path, level) {\n // adjust bboxes along the given tree path\n for (let i = level; i >= 0; i--) {\n extend(path[i], bbox);\n }\n }\n\n _condense(path) {\n // go through the path, removing empty nodes and updating bboxes\n for (let i = path.length - 1, siblings; i >= 0; i--) {\n if (path[i].children.length === 0) {\n if (i > 0) {\n siblings = path[i - 1].children;\n siblings.splice(siblings.indexOf(path[i]), 1);\n\n } else this.clear();\n\n } else calcBBox(path[i], this.toBBox);\n }\n }\n}\n\nfunction findItem(item, items, equalsFn) {\n if (!equalsFn) return items.indexOf(item);\n\n for (let i = 0; i < items.length; i++) {\n if (equalsFn(item, items[i])) return i;\n }\n return -1;\n}\n\n// calculate node's bbox from bboxes of its children\nfunction calcBBox(node, toBBox) {\n distBBox(node, 0, node.children.length, toBBox, node);\n}\n\n// min bounding rectangle of node children from k to p-1\nfunction distBBox(node, k, p, toBBox, destNode) {\n if (!destNode) destNode = createNode(null);\n destNode.minX = Infinity;\n destNode.minY = Infinity;\n destNode.maxX = -Infinity;\n destNode.maxY = -Infinity;\n\n for (let i = k; i < p; i++) {\n const child = node.children[i];\n extend(destNode, node.leaf ? toBBox(child) : child);\n }\n\n return destNode;\n}\n\nfunction extend(a, b) {\n a.minX = Math.min(a.minX, b.minX);\n a.minY = Math.min(a.minY, b.minY);\n a.maxX = Math.max(a.maxX, b.maxX);\n a.maxY = Math.max(a.maxY, b.maxY);\n return a;\n}\n\nfunction compareNodeMinX(a, b) { return a.minX - b.minX; }\nfunction compareNodeMinY(a, b) { return a.minY - b.minY; }\n\nfunction bboxArea(a) { return (a.maxX - a.minX) * (a.maxY - a.minY); }\nfunction bboxMargin(a) { return (a.maxX - a.minX) + (a.maxY - a.minY); }\n\nfunction enlargedArea(a, b) {\n return (Math.max(b.maxX, a.maxX) - Math.min(b.minX, a.minX)) *\n (Math.max(b.maxY, a.maxY) - Math.min(b.minY, a.minY));\n}\n\nfunction intersectionArea(a, b) {\n const minX = Math.max(a.minX, b.minX);\n const minY = Math.max(a.minY, b.minY);\n const maxX = Math.min(a.maxX, b.maxX);\n const maxY = Math.min(a.maxY, b.maxY);\n\n return Math.max(0, maxX - minX) *\n Math.max(0, maxY - minY);\n}\n\nfunction contains(a, b) {\n return a.minX <= b.minX &&\n a.minY <= b.minY &&\n b.maxX <= a.maxX &&\n b.maxY <= a.maxY;\n}\n\nfunction intersects(a, b) {\n return b.minX <= a.maxX &&\n b.minY <= a.maxY &&\n b.maxX >= a.minX &&\n b.maxY >= a.minY;\n}\n\nfunction createNode(children) {\n return {\n children,\n height: 1,\n leaf: true,\n minX: Infinity,\n minY: Infinity,\n maxX: -Infinity,\n maxY: -Infinity\n };\n}\n\n// sort an array so that items come in groups of n unsorted items, with groups sorted between each other;\n// combines selection algorithm with binary divide & conquer approach\n\nfunction multiSelect(arr, left, right, n, compare) {\n const stack = [left, right];\n\n while (stack.length) {\n right = stack.pop();\n left = stack.pop();\n\n if (right - left <= n) continue;\n\n const mid = left + Math.ceil((right - left) / n / 2) * n;\n quickselect(arr, mid, left, right, compare);\n\n stack.push(left, mid, mid, right);\n }\n}\n","/**\n * @module ol/structs/RBush\n */\nimport RBush_ from 'rbush';\nimport {createOrUpdate, equals} from '../extent.js';\nimport {getUid} from '../util.js';\nimport {isEmpty} from '../obj.js';\n\n/**\n * @typedef {Object} Entry\n * @property {number} minX MinX.\n * @property {number} minY MinY.\n * @property {number} maxX MaxX.\n * @property {number} maxY MaxY.\n * @property {Object} [value] Value.\n */\n\n/**\n * @classdesc\n * Wrapper around the RBush by Vladimir Agafonkin.\n * See https://github.com/mourner/rbush.\n *\n * @template T\n */\nclass RBush {\n /**\n * @param {number} [maxEntries] Max entries.\n */\n constructor(maxEntries) {\n /**\n * @private\n */\n this.rbush_ = new RBush_(maxEntries);\n\n /**\n * A mapping between the objects added to this rbush wrapper\n * and the objects that are actually added to the internal rbush.\n * @private\n * @type {Object}\n */\n this.items_ = {};\n }\n\n /**\n * Insert a value into the RBush.\n * @param {import(\"../extent.js\").Extent} extent Extent.\n * @param {T} value Value.\n */\n insert(extent, value) {\n /** @type {Entry} */\n const item = {\n minX: extent[0],\n minY: extent[1],\n maxX: extent[2],\n maxY: extent[3],\n value: value,\n };\n\n this.rbush_.insert(item);\n this.items_[getUid(value)] = item;\n }\n\n /**\n * Bulk-insert values into the RBush.\n * @param {Array} extents Extents.\n * @param {Array} values Values.\n */\n load(extents, values) {\n const items = new Array(values.length);\n for (let i = 0, l = values.length; i < l; i++) {\n const extent = extents[i];\n const value = values[i];\n\n /** @type {Entry} */\n const item = {\n minX: extent[0],\n minY: extent[1],\n maxX: extent[2],\n maxY: extent[3],\n value: value,\n };\n items[i] = item;\n this.items_[getUid(value)] = item;\n }\n this.rbush_.load(items);\n }\n\n /**\n * Remove a value from the RBush.\n * @param {T} value Value.\n * @return {boolean} Removed.\n */\n remove(value) {\n const uid = getUid(value);\n\n // get the object in which the value was wrapped when adding to the\n // internal rbush. then use that object to do the removal.\n const item = this.items_[uid];\n delete this.items_[uid];\n return this.rbush_.remove(item) !== null;\n }\n\n /**\n * Update the extent of a value in the RBush.\n * @param {import(\"../extent.js\").Extent} extent Extent.\n * @param {T} value Value.\n */\n update(extent, value) {\n const item = this.items_[getUid(value)];\n const bbox = [item.minX, item.minY, item.maxX, item.maxY];\n if (!equals(bbox, extent)) {\n this.remove(value);\n this.insert(extent, value);\n }\n }\n\n /**\n * Return all values in the RBush.\n * @return {Array} All.\n */\n getAll() {\n const items = this.rbush_.all();\n return items.map(function (item) {\n return item.value;\n });\n }\n\n /**\n * Return all values in the given extent.\n * @param {import(\"../extent.js\").Extent} extent Extent.\n * @return {Array} All in extent.\n */\n getInExtent(extent) {\n /** @type {Entry} */\n const bbox = {\n minX: extent[0],\n minY: extent[1],\n maxX: extent[2],\n maxY: extent[3],\n };\n const items = this.rbush_.search(bbox);\n return items.map(function (item) {\n return item.value;\n });\n }\n\n /**\n * Calls a callback function with each value in the tree.\n * If the callback returns a truthy value, this value is returned without\n * checking the rest of the tree.\n * @param {function(T): *} callback Callback.\n * @return {*} Callback return value.\n */\n forEach(callback) {\n return this.forEach_(this.getAll(), callback);\n }\n\n /**\n * Calls a callback function with each value in the provided extent.\n * @param {import(\"../extent.js\").Extent} extent Extent.\n * @param {function(T): *} callback Callback.\n * @return {*} Callback return value.\n */\n forEachInExtent(extent, callback) {\n return this.forEach_(this.getInExtent(extent), callback);\n }\n\n /**\n * @param {Array} values Values.\n * @param {function(T): *} callback Callback.\n * @private\n * @return {*} Callback return value.\n */\n forEach_(values, callback) {\n let result;\n for (let i = 0, l = values.length; i < l; i++) {\n result = callback(values[i]);\n if (result) {\n return result;\n }\n }\n return result;\n }\n\n /**\n * @return {boolean} Is empty.\n */\n isEmpty() {\n return isEmpty(this.items_);\n }\n\n /**\n * Remove all values from the RBush.\n */\n clear() {\n this.rbush_.clear();\n this.items_ = {};\n }\n\n /**\n * @param {import(\"../extent.js\").Extent} [extent] Extent.\n * @return {import(\"../extent.js\").Extent} Extent.\n */\n getExtent(extent) {\n const data = this.rbush_.toJSON();\n return createOrUpdate(data.minX, data.minY, data.maxX, data.maxY, extent);\n }\n\n /**\n * @param {RBush} rbush R-Tree.\n */\n concat(rbush) {\n this.rbush_.load(rbush.rbush_.all());\n for (const i in rbush.items_) {\n this.items_[i] = rbush.items_[i];\n }\n }\n}\n\nexport default RBush;\n","/**\n * @module ol/source/VectorEventType\n */\n\n/**\n * @enum {string}\n */\nexport default {\n /**\n * Triggered when a feature is added to the source.\n * @event module:ol/source/Vector.VectorSourceEvent#addfeature\n * @api\n */\n ADDFEATURE: 'addfeature',\n\n /**\n * Triggered when a feature is updated.\n * @event module:ol/source/Vector.VectorSourceEvent#changefeature\n * @api\n */\n CHANGEFEATURE: 'changefeature',\n\n /**\n * Triggered when the clear method is called on the source.\n * @event module:ol/source/Vector.VectorSourceEvent#clear\n * @api\n */\n CLEAR: 'clear',\n\n /**\n * Triggered when a feature is removed from the source.\n * See {@link module:ol/source/Vector~VectorSource#clear source.clear()} for exceptions.\n * @event module:ol/source/Vector.VectorSourceEvent#removefeature\n * @api\n */\n REMOVEFEATURE: 'removefeature',\n\n /**\n * Triggered when features starts loading.\n * @event module:ol/source/Vector.VectorSourceEvent#featuresloadstart\n * @api\n */\n FEATURESLOADSTART: 'featuresloadstart',\n\n /**\n * Triggered when features finishes loading.\n * @event module:ol/source/Vector.VectorSourceEvent#featuresloadend\n * @api\n */\n FEATURESLOADEND: 'featuresloadend',\n\n /**\n * Triggered if feature loading results in an error.\n * @event module:ol/source/Vector.VectorSourceEvent#featuresloaderror\n * @api\n */\n FEATURESLOADERROR: 'featuresloaderror',\n};\n\n/**\n * @typedef {'addfeature'|'changefeature'|'clear'|'removefeature'|'featuresloadstart'|'featuresloadend'|'featuresloaderror'} VectorSourceEventTypes\n */\n","/**\n * @module ol/source/Vector\n */\n\nimport Collection from '../Collection.js';\nimport CollectionEventType from '../CollectionEventType.js';\nimport Event from '../events/Event.js';\nimport EventType from '../events/EventType.js';\nimport ObjectEventType from '../ObjectEventType.js';\nimport RBush from '../structs/RBush.js';\nimport Source from './Source.js';\nimport VectorEventType from './VectorEventType.js';\nimport {TRUE, VOID} from '../functions.js';\nimport {all as allStrategy} from '../loadingstrategy.js';\nimport {assert} from '../asserts.js';\nimport {containsExtent, equals, wrapAndSliceX} from '../extent.js';\nimport {extend} from '../array.js';\nimport {getUid} from '../util.js';\nimport {isEmpty} from '../obj.js';\nimport {listen, unlistenByKey} from '../events.js';\nimport {xhr} from '../featureloader.js';\n\n/**\n * A function that takes an {@link module:ol/extent~Extent} and a resolution as arguments, and\n * returns an array of {@link module:ol/extent~Extent} with the extents to load. Usually this\n * is one of the standard {@link module:ol/loadingstrategy} strategies.\n *\n * @typedef {function(import(\"../extent.js\").Extent, number, import(\"../proj/Projection.js\").default): Array} LoadingStrategy\n * @api\n */\n\n/**\n * @classdesc\n * Events emitted by {@link module:ol/source/Vector~VectorSource} instances are instances of this\n * type.\n * @template {import(\"../geom/Geometry.js\").default} [Geometry=import(\"../geom/Geometry.js\").default]\n */\nexport class VectorSourceEvent extends Event {\n /**\n * @param {string} type Type.\n * @param {import(\"../Feature.js\").default} [feature] Feature.\n * @param {Array>} [features] Features.\n */\n constructor(type, feature, features) {\n super(type);\n\n /**\n * The added or removed feature for the `ADDFEATURE` and `REMOVEFEATURE` events, `undefined` otherwise.\n * @type {import(\"../Feature.js\").default|undefined}\n * @api\n */\n this.feature = feature;\n\n /**\n * The loaded features for the `FEATURESLOADED` event, `undefined` otherwise.\n * @type {Array>|undefined}\n * @api\n */\n this.features = features;\n }\n}\n\n/***\n * @template Return\n * @typedef {import(\"../Observable\").OnSignature &\n * import(\"../Observable\").OnSignature &\n * import(\"../Observable\").OnSignature &\n * import(\"../Observable\").CombinedOnSignature} VectorSourceOnSignature\n */\n\n/**\n * @typedef {Object} Options\n * @property {import(\"./Source.js\").AttributionLike} [attributions] Attributions.\n * @property {Array>|Collection>} [features]\n * Features. If provided as {@link module:ol/Collection~Collection}, the features in the source\n * and the collection will stay in sync.\n * @property {import(\"../format/Feature.js\").default} [format] The feature format used by the XHR\n * feature loader when `url` is set. Required if `url` is set, otherwise ignored.\n * @property {import(\"../featureloader.js\").FeatureLoader} [loader]\n * The loader function used to load features, from a remote source for example.\n * If this is not set and `url` is set, the source will create and use an XHR\n * feature loader. The `'featuresloadend'` and `'featuresloaderror'` events\n * will only fire if the `success` and `failure` callbacks are used.\n *\n * Example:\n *\n * ```js\n * import Vector from 'ol/source/Vector.js';\n * import GeoJSON from 'ol/format/GeoJSON.js';\n * import {bbox} from 'ol/loadingstrategy.js';\n *\n * const vectorSource = new Vector({\n * format: new GeoJSON(),\n * loader: function(extent, resolution, projection, success, failure) {\n * const proj = projection.getCode();\n * const url = 'https://ahocevar.com/geoserver/wfs?service=WFS&' +\n * 'version=1.1.0&request=GetFeature&typename=osm:water_areas&' +\n * 'outputFormat=application/json&srsname=' + proj + '&' +\n * 'bbox=' + extent.join(',') + ',' + proj;\n * const xhr = new XMLHttpRequest();\n * xhr.open('GET', url);\n * const onError = function() {\n * vectorSource.removeLoadedExtent(extent);\n * failure();\n * }\n * xhr.onerror = onError;\n * xhr.onload = function() {\n * if (xhr.status == 200) {\n * const features = vectorSource.getFormat().readFeatures(xhr.responseText);\n * vectorSource.addFeatures(features);\n * success(features);\n * } else {\n * onError();\n * }\n * }\n * xhr.send();\n * },\n * strategy: bbox,\n * });\n * ```\n * @property {boolean} [overlaps=true] This source may have overlapping geometries.\n * Setting this to `false` (e.g. for sources with polygons that represent administrative\n * boundaries or TopoJSON sources) allows the renderer to optimise fill and\n * stroke operations.\n * @property {LoadingStrategy} [strategy] The loading strategy to use.\n * By default an {@link module:ol/loadingstrategy.all}\n * strategy is used, a one-off strategy which loads all features at once.\n * @property {string|import(\"../featureloader.js\").FeatureUrlFunction} [url]\n * Setting this option instructs the source to load features using an XHR loader\n * (see {@link module:ol/featureloader.xhr}). Use a `string` and an\n * {@link module:ol/loadingstrategy.all} for a one-off download of all features from\n * the given URL. Use a {@link module:ol/featureloader~FeatureUrlFunction} to generate the url with\n * other loading strategies.\n * Requires `format` to be set as well.\n * When default XHR feature loader is provided, the features will\n * be transformed from the data projection to the view projection\n * during parsing. If your remote data source does not advertise its projection\n * properly, this transformation will be incorrect. For some formats, the\n * default projection (usually EPSG:4326) can be overridden by setting the\n * dataProjection constructor option on the format.\n * Note that if a source contains non-feature data, such as a GeoJSON geometry\n * or a KML NetworkLink, these will be ignored. Use a custom loader to load these.\n * @property {boolean} [useSpatialIndex=true]\n * By default, an RTree is used as spatial index. When features are removed and\n * added frequently, and the total number of features is low, setting this to\n * `false` may improve performance.\n *\n * Note that\n * {@link module:ol/source/Vector~VectorSource#getFeaturesInExtent},\n * {@link module:ol/source/Vector~VectorSource#getClosestFeatureToCoordinate} and\n * {@link module:ol/source/Vector~VectorSource#getExtent} cannot be used when `useSpatialIndex` is\n * set to `false`, and {@link module:ol/source/Vector~VectorSource#forEachFeatureInExtent} will loop\n * through all features.\n *\n * When set to `false`, the features will be maintained in an\n * {@link module:ol/Collection~Collection}, which can be retrieved through\n * {@link module:ol/source/Vector~VectorSource#getFeaturesCollection}.\n * @property {boolean} [wrapX=true] Wrap the world horizontally. For vector editing across the\n * -180° and 180° meridians to work properly, this should be set to `false`. The\n * resulting geometry coordinates will then exceed the world bounds.\n * @template {import(\"../geom/Geometry.js\").default} [Geometry=import(\"../geom/Geometry.js\").default]\n */\n\n/**\n * @classdesc\n * Provides a source of features for vector layers. Vector features provided\n * by this source are suitable for editing. See {@link module:ol/source/VectorTile~VectorTile} for\n * vector data that is optimized for rendering.\n *\n * @fires VectorSourceEvent\n * @api\n * @template {import(\"../geom/Geometry.js\").default} [Geometry=import(\"../geom/Geometry.js\").default]\n */\nclass VectorSource extends Source {\n /**\n * @param {Options} [options] Vector source options.\n */\n constructor(options) {\n options = options || {};\n\n super({\n attributions: options.attributions,\n interpolate: true,\n projection: undefined,\n state: 'ready',\n wrapX: options.wrapX !== undefined ? options.wrapX : true,\n });\n\n /***\n * @type {VectorSourceOnSignature}\n */\n this.on;\n\n /***\n * @type {VectorSourceOnSignature}\n */\n this.once;\n\n /***\n * @type {VectorSourceOnSignature}\n */\n this.un;\n\n /**\n * @private\n * @type {import(\"../featureloader.js\").FeatureLoader}\n */\n this.loader_ = VOID;\n\n /**\n * @private\n * @type {import(\"../format/Feature.js\").default|undefined}\n */\n this.format_ = options.format;\n\n /**\n * @private\n * @type {boolean}\n */\n this.overlaps_ = options.overlaps === undefined ? true : options.overlaps;\n\n /**\n * @private\n * @type {string|import(\"../featureloader.js\").FeatureUrlFunction|undefined}\n */\n this.url_ = options.url;\n\n if (options.loader !== undefined) {\n this.loader_ = options.loader;\n } else if (this.url_ !== undefined) {\n assert(this.format_, 7); // `format` must be set when `url` is set\n // create a XHR feature loader for \"url\" and \"format\"\n this.loader_ = xhr(\n this.url_,\n /** @type {import(\"../format/Feature.js\").default} */ (this.format_)\n );\n }\n\n /**\n * @private\n * @type {LoadingStrategy}\n */\n this.strategy_ =\n options.strategy !== undefined ? options.strategy : allStrategy;\n\n const useSpatialIndex =\n options.useSpatialIndex !== undefined ? options.useSpatialIndex : true;\n\n /**\n * @private\n * @type {RBush>}\n */\n this.featuresRtree_ = useSpatialIndex ? new RBush() : null;\n\n /**\n * @private\n * @type {RBush<{extent: import(\"../extent.js\").Extent}>}\n */\n this.loadedExtentsRtree_ = new RBush();\n\n /**\n * @type {number}\n * @private\n */\n this.loadingExtentsCount_ = 0;\n\n /**\n * @private\n * @type {!Object>}\n */\n this.nullGeometryFeatures_ = {};\n\n /**\n * A lookup of features by id (the return from feature.getId()).\n * @private\n * @type {!Object>}\n */\n this.idIndex_ = {};\n\n /**\n * A lookup of features by uid (using getUid(feature)).\n * @private\n * @type {!Object>}\n */\n this.uidIndex_ = {};\n\n /**\n * @private\n * @type {Object>}\n */\n this.featureChangeKeys_ = {};\n\n /**\n * @private\n * @type {Collection>|null}\n */\n this.featuresCollection_ = null;\n\n /** @type {Collection>} */\n let collection;\n /** @type {Array>} */\n let features;\n if (Array.isArray(options.features)) {\n features = options.features;\n } else if (options.features) {\n collection = options.features;\n features = collection.getArray();\n }\n if (!useSpatialIndex && collection === undefined) {\n collection = new Collection(features);\n }\n if (features !== undefined) {\n this.addFeaturesInternal(features);\n }\n if (collection !== undefined) {\n this.bindFeaturesCollection_(collection);\n }\n }\n\n /**\n * Add a single feature to the source. If you want to add a batch of features\n * at once, call {@link module:ol/source/Vector~VectorSource#addFeatures #addFeatures()}\n * instead. A feature will not be added to the source if feature with\n * the same id is already there. The reason for this behavior is to avoid\n * feature duplication when using bbox or tile loading strategies.\n * Note: this also applies if an {@link module:ol/Collection~Collection} is used for features,\n * meaning that if a feature with a duplicate id is added in the collection, it will\n * be removed from it right away.\n * @param {import(\"../Feature.js\").default} feature Feature to add.\n * @api\n */\n addFeature(feature) {\n this.addFeatureInternal(feature);\n this.changed();\n }\n\n /**\n * Add a feature without firing a `change` event.\n * @param {import(\"../Feature.js\").default} feature Feature.\n * @protected\n */\n addFeatureInternal(feature) {\n const featureKey = getUid(feature);\n\n if (!this.addToIndex_(featureKey, feature)) {\n if (this.featuresCollection_) {\n this.featuresCollection_.remove(feature);\n }\n return;\n }\n\n this.setupChangeEvents_(featureKey, feature);\n\n const geometry = feature.getGeometry();\n if (geometry) {\n const extent = geometry.getExtent();\n if (this.featuresRtree_) {\n this.featuresRtree_.insert(extent, feature);\n }\n } else {\n this.nullGeometryFeatures_[featureKey] = feature;\n }\n\n this.dispatchEvent(\n new VectorSourceEvent(VectorEventType.ADDFEATURE, feature)\n );\n }\n\n /**\n * @param {string} featureKey Unique identifier for the feature.\n * @param {import(\"../Feature.js\").default} feature The feature.\n * @private\n */\n setupChangeEvents_(featureKey, feature) {\n this.featureChangeKeys_[featureKey] = [\n listen(feature, EventType.CHANGE, this.handleFeatureChange_, this),\n listen(\n feature,\n ObjectEventType.PROPERTYCHANGE,\n this.handleFeatureChange_,\n this\n ),\n ];\n }\n\n /**\n * @param {string} featureKey Unique identifier for the feature.\n * @param {import(\"../Feature.js\").default} feature The feature.\n * @return {boolean} The feature is \"valid\", in the sense that it is also a\n * candidate for insertion into the Rtree.\n * @private\n */\n addToIndex_(featureKey, feature) {\n let valid = true;\n const id = feature.getId();\n if (id !== undefined) {\n if (!(id.toString() in this.idIndex_)) {\n this.idIndex_[id.toString()] = feature;\n } else {\n valid = false;\n }\n }\n if (valid) {\n assert(!(featureKey in this.uidIndex_), 30); // The passed `feature` was already added to the source\n this.uidIndex_[featureKey] = feature;\n }\n return valid;\n }\n\n /**\n * Add a batch of features to the source.\n * @param {Array>} features Features to add.\n * @api\n */\n addFeatures(features) {\n this.addFeaturesInternal(features);\n this.changed();\n }\n\n /**\n * Add features without firing a `change` event.\n * @param {Array>} features Features.\n * @protected\n */\n addFeaturesInternal(features) {\n const extents = [];\n const newFeatures = [];\n const geometryFeatures = [];\n\n for (let i = 0, length = features.length; i < length; i++) {\n const feature = features[i];\n const featureKey = getUid(feature);\n if (this.addToIndex_(featureKey, feature)) {\n newFeatures.push(feature);\n }\n }\n\n for (let i = 0, length = newFeatures.length; i < length; i++) {\n const feature = newFeatures[i];\n const featureKey = getUid(feature);\n this.setupChangeEvents_(featureKey, feature);\n\n const geometry = feature.getGeometry();\n if (geometry) {\n const extent = geometry.getExtent();\n extents.push(extent);\n geometryFeatures.push(feature);\n } else {\n this.nullGeometryFeatures_[featureKey] = feature;\n }\n }\n if (this.featuresRtree_) {\n this.featuresRtree_.load(extents, geometryFeatures);\n }\n\n if (this.hasListener(VectorEventType.ADDFEATURE)) {\n for (let i = 0, length = newFeatures.length; i < length; i++) {\n this.dispatchEvent(\n new VectorSourceEvent(VectorEventType.ADDFEATURE, newFeatures[i])\n );\n }\n }\n }\n\n /**\n * @param {!Collection>} collection Collection.\n * @private\n */\n bindFeaturesCollection_(collection) {\n let modifyingCollection = false;\n this.addEventListener(\n VectorEventType.ADDFEATURE,\n /**\n * @param {VectorSourceEvent} evt The vector source event\n */\n function (evt) {\n if (!modifyingCollection) {\n modifyingCollection = true;\n collection.push(evt.feature);\n modifyingCollection = false;\n }\n }\n );\n this.addEventListener(\n VectorEventType.REMOVEFEATURE,\n /**\n * @param {VectorSourceEvent} evt The vector source event\n */\n function (evt) {\n if (!modifyingCollection) {\n modifyingCollection = true;\n collection.remove(evt.feature);\n modifyingCollection = false;\n }\n }\n );\n collection.addEventListener(\n CollectionEventType.ADD,\n /**\n * @param {import(\"../Collection.js\").CollectionEvent>} evt The collection event\n */\n (evt) => {\n if (!modifyingCollection) {\n modifyingCollection = true;\n this.addFeature(evt.element);\n modifyingCollection = false;\n }\n }\n );\n collection.addEventListener(\n CollectionEventType.REMOVE,\n /**\n * @param {import(\"../Collection.js\").CollectionEvent>} evt The collection event\n */\n (evt) => {\n if (!modifyingCollection) {\n modifyingCollection = true;\n this.removeFeature(evt.element);\n modifyingCollection = false;\n }\n }\n );\n this.featuresCollection_ = collection;\n }\n\n /**\n * Remove all features from the source.\n * @param {boolean} [fast] Skip dispatching of {@link module:ol/source/Vector.VectorSourceEvent#event:removefeature} events.\n * @api\n */\n clear(fast) {\n if (fast) {\n for (const featureId in this.featureChangeKeys_) {\n const keys = this.featureChangeKeys_[featureId];\n keys.forEach(unlistenByKey);\n }\n if (!this.featuresCollection_) {\n this.featureChangeKeys_ = {};\n this.idIndex_ = {};\n this.uidIndex_ = {};\n }\n } else {\n if (this.featuresRtree_) {\n const removeAndIgnoreReturn = (feature) => {\n this.removeFeatureInternal(feature);\n };\n this.featuresRtree_.forEach(removeAndIgnoreReturn);\n for (const id in this.nullGeometryFeatures_) {\n this.removeFeatureInternal(this.nullGeometryFeatures_[id]);\n }\n }\n }\n if (this.featuresCollection_) {\n this.featuresCollection_.clear();\n }\n\n if (this.featuresRtree_) {\n this.featuresRtree_.clear();\n }\n this.nullGeometryFeatures_ = {};\n\n const clearEvent = new VectorSourceEvent(VectorEventType.CLEAR);\n this.dispatchEvent(clearEvent);\n this.changed();\n }\n\n /**\n * Iterate through all features on the source, calling the provided callback\n * with each one. If the callback returns any \"truthy\" value, iteration will\n * stop and the function will return the same value.\n * Note: this function only iterate through the feature that have a defined geometry.\n *\n * @param {function(import(\"../Feature.js\").default): T} callback Called with each feature\n * on the source. Return a truthy value to stop iteration.\n * @return {T|undefined} The return value from the last call to the callback.\n * @template T\n * @api\n */\n forEachFeature(callback) {\n if (this.featuresRtree_) {\n return this.featuresRtree_.forEach(callback);\n } else if (this.featuresCollection_) {\n this.featuresCollection_.forEach(callback);\n }\n }\n\n /**\n * Iterate through all features whose geometries contain the provided\n * coordinate, calling the callback with each feature. If the callback returns\n * a \"truthy\" value, iteration will stop and the function will return the same\n * value.\n *\n * @param {import(\"../coordinate.js\").Coordinate} coordinate Coordinate.\n * @param {function(import(\"../Feature.js\").default): T} callback Called with each feature\n * whose goemetry contains the provided coordinate.\n * @return {T|undefined} The return value from the last call to the callback.\n * @template T\n */\n forEachFeatureAtCoordinateDirect(coordinate, callback) {\n const extent = [coordinate[0], coordinate[1], coordinate[0], coordinate[1]];\n return this.forEachFeatureInExtent(extent, function (feature) {\n const geometry = feature.getGeometry();\n if (geometry.intersectsCoordinate(coordinate)) {\n return callback(feature);\n }\n return undefined;\n });\n }\n\n /**\n * Iterate through all features whose bounding box intersects the provided\n * extent (note that the feature's geometry may not intersect the extent),\n * calling the callback with each feature. If the callback returns a \"truthy\"\n * value, iteration will stop and the function will return the same value.\n *\n * If you are interested in features whose geometry intersects an extent, call\n * the {@link module:ol/source/Vector~VectorSource#forEachFeatureIntersectingExtent #forEachFeatureIntersectingExtent()} method instead.\n *\n * When `useSpatialIndex` is set to false, this method will loop through all\n * features, equivalent to {@link module:ol/source/Vector~VectorSource#forEachFeature #forEachFeature()}.\n *\n * @param {import(\"../extent.js\").Extent} extent Extent.\n * @param {function(import(\"../Feature.js\").default): T} callback Called with each feature\n * whose bounding box intersects the provided extent.\n * @return {T|undefined} The return value from the last call to the callback.\n * @template T\n * @api\n */\n forEachFeatureInExtent(extent, callback) {\n if (this.featuresRtree_) {\n return this.featuresRtree_.forEachInExtent(extent, callback);\n } else if (this.featuresCollection_) {\n this.featuresCollection_.forEach(callback);\n }\n }\n\n /**\n * Iterate through all features whose geometry intersects the provided extent,\n * calling the callback with each feature. If the callback returns a \"truthy\"\n * value, iteration will stop and the function will return the same value.\n *\n * If you only want to test for bounding box intersection, call the\n * {@link module:ol/source/Vector~VectorSource#forEachFeatureInExtent #forEachFeatureInExtent()} method instead.\n *\n * @param {import(\"../extent.js\").Extent} extent Extent.\n * @param {function(import(\"../Feature.js\").default): T} callback Called with each feature\n * whose geometry intersects the provided extent.\n * @return {T|undefined} The return value from the last call to the callback.\n * @template T\n * @api\n */\n forEachFeatureIntersectingExtent(extent, callback) {\n return this.forEachFeatureInExtent(\n extent,\n /**\n * @param {import(\"../Feature.js\").default} feature Feature.\n * @return {T|undefined} The return value from the last call to the callback.\n */\n function (feature) {\n const geometry = feature.getGeometry();\n if (geometry.intersectsExtent(extent)) {\n const result = callback(feature);\n if (result) {\n return result;\n }\n }\n }\n );\n }\n\n /**\n * Get the features collection associated with this source. Will be `null`\n * unless the source was configured with `useSpatialIndex` set to `false`, or\n * with an {@link module:ol/Collection~Collection} as `features`.\n * @return {Collection>|null} The collection of features.\n * @api\n */\n getFeaturesCollection() {\n return this.featuresCollection_;\n }\n\n /**\n * Get a snapshot of the features currently on the source in random order. The returned array\n * is a copy, the features are references to the features in the source.\n * @return {Array>} Features.\n * @api\n */\n getFeatures() {\n let features;\n if (this.featuresCollection_) {\n features = this.featuresCollection_.getArray().slice(0);\n } else if (this.featuresRtree_) {\n features = this.featuresRtree_.getAll();\n if (!isEmpty(this.nullGeometryFeatures_)) {\n extend(features, Object.values(this.nullGeometryFeatures_));\n }\n }\n return /** @type {Array>} */ (\n features\n );\n }\n\n /**\n * Get all features whose geometry intersects the provided coordinate.\n * @param {import(\"../coordinate.js\").Coordinate} coordinate Coordinate.\n * @return {Array>} Features.\n * @api\n */\n getFeaturesAtCoordinate(coordinate) {\n const features = [];\n this.forEachFeatureAtCoordinateDirect(coordinate, function (feature) {\n features.push(feature);\n });\n return features;\n }\n\n /**\n * Get all features whose bounding box intersects the provided extent. Note that this returns an array of\n * all features intersecting the given extent in random order (so it may include\n * features whose geometries do not intersect the extent).\n *\n * When `useSpatialIndex` is set to false, this method will return all\n * features.\n *\n * @param {import(\"../extent.js\").Extent} extent Extent.\n * @param {import(\"../proj/Projection.js\").default} [projection] Include features\n * where `extent` exceeds the x-axis bounds of `projection` and wraps around the world.\n * @return {Array>} Features.\n * @api\n */\n getFeaturesInExtent(extent, projection) {\n if (this.featuresRtree_) {\n const multiWorld = projection && projection.canWrapX() && this.getWrapX();\n\n if (!multiWorld) {\n return this.featuresRtree_.getInExtent(extent);\n }\n\n const extents = wrapAndSliceX(extent, projection);\n\n return [].concat(\n ...extents.map((anExtent) => this.featuresRtree_.getInExtent(anExtent))\n );\n } else if (this.featuresCollection_) {\n return this.featuresCollection_.getArray().slice(0);\n }\n return [];\n }\n\n /**\n * Get the closest feature to the provided coordinate.\n *\n * This method is not available when the source is configured with\n * `useSpatialIndex` set to `false`.\n * @param {import(\"../coordinate.js\").Coordinate} coordinate Coordinate.\n * @param {function(import(\"../Feature.js\").default):boolean} [filter] Feature filter function.\n * The filter function will receive one argument, the {@link module:ol/Feature~Feature feature}\n * and it should return a boolean value. By default, no filtering is made.\n * @return {import(\"../Feature.js\").default} Closest feature.\n * @api\n */\n getClosestFeatureToCoordinate(coordinate, filter) {\n // Find the closest feature using branch and bound. We start searching an\n // infinite extent, and find the distance from the first feature found. This\n // becomes the closest feature. We then compute a smaller extent which any\n // closer feature must intersect. We continue searching with this smaller\n // extent, trying to find a closer feature. Every time we find a closer\n // feature, we update the extent being searched so that any even closer\n // feature must intersect it. We continue until we run out of features.\n const x = coordinate[0];\n const y = coordinate[1];\n let closestFeature = null;\n const closestPoint = [NaN, NaN];\n let minSquaredDistance = Infinity;\n const extent = [-Infinity, -Infinity, Infinity, Infinity];\n filter = filter ? filter : TRUE;\n this.featuresRtree_.forEachInExtent(\n extent,\n /**\n * @param {import(\"../Feature.js\").default} feature Feature.\n */\n function (feature) {\n if (filter(feature)) {\n const geometry = feature.getGeometry();\n const previousMinSquaredDistance = minSquaredDistance;\n minSquaredDistance = geometry.closestPointXY(\n x,\n y,\n closestPoint,\n minSquaredDistance\n );\n if (minSquaredDistance < previousMinSquaredDistance) {\n closestFeature = feature;\n // This is sneaky. Reduce the extent that it is currently being\n // searched while the R-Tree traversal using this same extent object\n // is still in progress. This is safe because the new extent is\n // strictly contained by the old extent.\n const minDistance = Math.sqrt(minSquaredDistance);\n extent[0] = x - minDistance;\n extent[1] = y - minDistance;\n extent[2] = x + minDistance;\n extent[3] = y + minDistance;\n }\n }\n }\n );\n return closestFeature;\n }\n\n /**\n * Get the extent of the features currently in the source.\n *\n * This method is not available when the source is configured with\n * `useSpatialIndex` set to `false`.\n * @param {import(\"../extent.js\").Extent} [extent] Destination extent. If provided, no new extent\n * will be created. Instead, that extent's coordinates will be overwritten.\n * @return {import(\"../extent.js\").Extent} Extent.\n * @api\n */\n getExtent(extent) {\n return this.featuresRtree_.getExtent(extent);\n }\n\n /**\n * Get a feature by its identifier (the value returned by feature.getId()).\n * Note that the index treats string and numeric identifiers as the same. So\n * `source.getFeatureById(2)` will return a feature with id `'2'` or `2`.\n *\n * @param {string|number} id Feature identifier.\n * @return {import(\"../Feature.js\").default|null} The feature (or `null` if not found).\n * @api\n */\n getFeatureById(id) {\n const feature = this.idIndex_[id.toString()];\n return feature !== undefined ? feature : null;\n }\n\n /**\n * Get a feature by its internal unique identifier (using `getUid`).\n *\n * @param {string} uid Feature identifier.\n * @return {import(\"../Feature.js\").default|null} The feature (or `null` if not found).\n */\n getFeatureByUid(uid) {\n const feature = this.uidIndex_[uid];\n return feature !== undefined ? feature : null;\n }\n\n /**\n * Get the format associated with this source.\n *\n * @return {import(\"../format/Feature.js\").default|undefined} The feature format.\n * @api\n */\n getFormat() {\n return this.format_;\n }\n\n /**\n * @return {boolean} The source can have overlapping geometries.\n */\n getOverlaps() {\n return this.overlaps_;\n }\n\n /**\n * Get the url associated with this source.\n *\n * @return {string|import(\"../featureloader.js\").FeatureUrlFunction|undefined} The url.\n * @api\n */\n getUrl() {\n return this.url_;\n }\n\n /**\n * @param {Event} event Event.\n * @private\n */\n handleFeatureChange_(event) {\n const feature = /** @type {import(\"../Feature.js\").default} */ (\n event.target\n );\n const featureKey = getUid(feature);\n const geometry = feature.getGeometry();\n if (!geometry) {\n if (!(featureKey in this.nullGeometryFeatures_)) {\n if (this.featuresRtree_) {\n this.featuresRtree_.remove(feature);\n }\n this.nullGeometryFeatures_[featureKey] = feature;\n }\n } else {\n const extent = geometry.getExtent();\n if (featureKey in this.nullGeometryFeatures_) {\n delete this.nullGeometryFeatures_[featureKey];\n if (this.featuresRtree_) {\n this.featuresRtree_.insert(extent, feature);\n }\n } else {\n if (this.featuresRtree_) {\n this.featuresRtree_.update(extent, feature);\n }\n }\n }\n const id = feature.getId();\n if (id !== undefined) {\n const sid = id.toString();\n if (this.idIndex_[sid] !== feature) {\n this.removeFromIdIndex_(feature);\n this.idIndex_[sid] = feature;\n }\n } else {\n this.removeFromIdIndex_(feature);\n this.uidIndex_[featureKey] = feature;\n }\n this.changed();\n this.dispatchEvent(\n new VectorSourceEvent(VectorEventType.CHANGEFEATURE, feature)\n );\n }\n\n /**\n * Returns true if the feature is contained within the source.\n * @param {import(\"../Feature.js\").default} feature Feature.\n * @return {boolean} Has feature.\n * @api\n */\n hasFeature(feature) {\n const id = feature.getId();\n if (id !== undefined) {\n return id in this.idIndex_;\n }\n return getUid(feature) in this.uidIndex_;\n }\n\n /**\n * @return {boolean} Is empty.\n */\n isEmpty() {\n if (this.featuresRtree_) {\n return (\n this.featuresRtree_.isEmpty() && isEmpty(this.nullGeometryFeatures_)\n );\n }\n if (this.featuresCollection_) {\n return this.featuresCollection_.getLength() === 0;\n }\n return true;\n }\n\n /**\n * @param {import(\"../extent.js\").Extent} extent Extent.\n * @param {number} resolution Resolution.\n * @param {import(\"../proj/Projection.js\").default} projection Projection.\n */\n loadFeatures(extent, resolution, projection) {\n const loadedExtentsRtree = this.loadedExtentsRtree_;\n const extentsToLoad = this.strategy_(extent, resolution, projection);\n for (let i = 0, ii = extentsToLoad.length; i < ii; ++i) {\n const extentToLoad = extentsToLoad[i];\n const alreadyLoaded = loadedExtentsRtree.forEachInExtent(\n extentToLoad,\n /**\n * @param {{extent: import(\"../extent.js\").Extent}} object Object.\n * @return {boolean} Contains.\n */\n function (object) {\n return containsExtent(object.extent, extentToLoad);\n }\n );\n if (!alreadyLoaded) {\n ++this.loadingExtentsCount_;\n this.dispatchEvent(\n new VectorSourceEvent(VectorEventType.FEATURESLOADSTART)\n );\n this.loader_.call(\n this,\n extentToLoad,\n resolution,\n projection,\n (features) => {\n --this.loadingExtentsCount_;\n this.dispatchEvent(\n new VectorSourceEvent(\n VectorEventType.FEATURESLOADEND,\n undefined,\n features\n )\n );\n },\n () => {\n --this.loadingExtentsCount_;\n this.dispatchEvent(\n new VectorSourceEvent(VectorEventType.FEATURESLOADERROR)\n );\n }\n );\n loadedExtentsRtree.insert(extentToLoad, {extent: extentToLoad.slice()});\n }\n }\n this.loading =\n this.loader_.length < 4 ? false : this.loadingExtentsCount_ > 0;\n }\n\n refresh() {\n this.clear(true);\n this.loadedExtentsRtree_.clear();\n super.refresh();\n }\n\n /**\n * Remove an extent from the list of loaded extents.\n * @param {import(\"../extent.js\").Extent} extent Extent.\n * @api\n */\n removeLoadedExtent(extent) {\n const loadedExtentsRtree = this.loadedExtentsRtree_;\n let obj;\n loadedExtentsRtree.forEachInExtent(extent, function (object) {\n if (equals(object.extent, extent)) {\n obj = object;\n return true;\n }\n });\n if (obj) {\n loadedExtentsRtree.remove(obj);\n }\n }\n\n /**\n * Remove a single feature from the source. If you want to remove all features\n * at once, use the {@link module:ol/source/Vector~VectorSource#clear #clear()} method\n * instead.\n * @param {import(\"../Feature.js\").default} feature Feature to remove.\n * @api\n */\n removeFeature(feature) {\n if (!feature) {\n return;\n }\n const featureKey = getUid(feature);\n if (featureKey in this.nullGeometryFeatures_) {\n delete this.nullGeometryFeatures_[featureKey];\n } else {\n if (this.featuresRtree_) {\n this.featuresRtree_.remove(feature);\n }\n }\n const result = this.removeFeatureInternal(feature);\n if (result) {\n this.changed();\n }\n }\n\n /**\n * Remove feature without firing a `change` event.\n * @param {import(\"../Feature.js\").default} feature Feature.\n * @return {import(\"../Feature.js\").default|undefined} The removed feature\n * (or undefined if the feature was not found).\n * @protected\n */\n removeFeatureInternal(feature) {\n const featureKey = getUid(feature);\n const featureChangeKeys = this.featureChangeKeys_[featureKey];\n if (!featureChangeKeys) {\n return;\n }\n featureChangeKeys.forEach(unlistenByKey);\n delete this.featureChangeKeys_[featureKey];\n const id = feature.getId();\n if (id !== undefined) {\n delete this.idIndex_[id.toString()];\n }\n delete this.uidIndex_[featureKey];\n this.dispatchEvent(\n new VectorSourceEvent(VectorEventType.REMOVEFEATURE, feature)\n );\n return feature;\n }\n\n /**\n * Remove a feature from the id index. Called internally when the feature id\n * may have changed.\n * @param {import(\"../Feature.js\").default} feature The feature.\n * @return {boolean} Removed the feature from the index.\n * @private\n */\n removeFromIdIndex_(feature) {\n let removed = false;\n for (const id in this.idIndex_) {\n if (this.idIndex_[id] === feature) {\n delete this.idIndex_[id];\n removed = true;\n break;\n }\n }\n return removed;\n }\n\n /**\n * Set the new loader of the source. The next render cycle will use the\n * new loader.\n * @param {import(\"../featureloader.js\").FeatureLoader} loader The loader to set.\n * @api\n */\n setLoader(loader) {\n this.loader_ = loader;\n }\n\n /**\n * Points the source to a new url. The next render cycle will use the new url.\n * @param {string|import(\"../featureloader.js\").FeatureUrlFunction} url Url.\n * @api\n */\n setUrl(url) {\n assert(this.format_, 7); // `format` must be set when `url` is set\n this.url_ = url;\n this.setLoader(xhr(url, this.format_));\n }\n}\n\nexport default VectorSource;\n","/**\n * @module ol/source/Cluster\n */\n\nimport EventType from '../events/EventType.js';\nimport Feature from '../Feature.js';\nimport Point from '../geom/Point.js';\nimport VectorSource from './Vector.js';\nimport {add as addCoordinate, scale as scaleCoordinate} from '../coordinate.js';\nimport {assert} from '../asserts.js';\nimport {\n buffer,\n createEmpty,\n createOrUpdateFromCoordinate,\n getCenter,\n} from '../extent.js';\nimport {getUid} from '../util.js';\n\n/**\n * @typedef {Object} Options\n * @property {import(\"./Source.js\").AttributionLike} [attributions] Attributions.\n * @property {number} [distance=20] Distance in pixels within which features will\n * be clustered together.\n * @property {number} [minDistance=0] Minimum distance in pixels between clusters.\n * Will be capped at the configured distance.\n * By default no minimum distance is guaranteed. This config can be used to avoid\n * overlapping icons. As a tradoff, the cluster feature's position will no longer be\n * the center of all its features.\n * @property {function(Feature):Point} [geometryFunction]\n * Function that takes an {@link module:ol/Feature~Feature} as argument and returns an\n * {@link module:ol/geom/Point~Point} as cluster calculation point for the feature. When a\n * feature should not be considered for clustering, the function should return\n * `null`. The default, which works when the underlying source contains point\n * features only, is\n * ```js\n * function(feature) {\n * return feature.getGeometry();\n * }\n * ```\n * See {@link module:ol/geom/Polygon~Polygon#getInteriorPoint} for a way to get a cluster\n * calculation point for polygons.\n * @property {function(Point, Array):Feature} [createCluster]\n * Function that takes the cluster's center {@link module:ol/geom/Point~Point} and an array\n * of {@link module:ol/Feature~Feature} included in this cluster. Must return a\n * {@link module:ol/Feature~Feature} that will be used to render. Default implementation is:\n * ```js\n * function(point, features) {\n * return new Feature({\n * geometry: point,\n * features: features\n * });\n * }\n * ```\n * @property {VectorSource} [source=null] Source.\n * @property {boolean} [wrapX=true] Whether to wrap the world horizontally.\n */\n\n/**\n * @classdesc\n * Layer source to cluster vector data. Works out of the box with point\n * geometries. For other geometry types, or if not all geometries should be\n * considered for clustering, a custom `geometryFunction` can be defined.\n *\n * If the instance is disposed without also disposing the underlying\n * source `setSource(null)` has to be called to remove the listener reference\n * from the wrapped source.\n * @api\n */\nclass Cluster extends VectorSource {\n /**\n * @param {Options} options Cluster options.\n */\n constructor(options) {\n super({\n attributions: options.attributions,\n wrapX: options.wrapX,\n });\n\n /**\n * @type {number|undefined}\n * @protected\n */\n this.resolution = undefined;\n\n /**\n * @type {number}\n * @protected\n */\n this.distance = options.distance !== undefined ? options.distance : 20;\n\n /**\n * @type {number}\n * @protected\n */\n this.minDistance = options.minDistance || 0;\n\n /**\n * @type {number}\n * @protected\n */\n this.interpolationRatio = 0;\n\n /**\n * @type {Array}\n * @protected\n */\n this.features = [];\n\n /**\n * @param {Feature} feature Feature.\n * @return {Point} Cluster calculation point.\n * @protected\n */\n this.geometryFunction =\n options.geometryFunction ||\n function (feature) {\n const geometry = /** @type {Point} */ (feature.getGeometry());\n assert(geometry.getType() == 'Point', 10); // The default `geometryFunction` can only handle `Point` geometries\n return geometry;\n };\n\n /**\n * @type {function(Point, Array):Feature}\n * @private\n */\n this.createCustomCluster_ = options.createCluster;\n\n /**\n * @type {VectorSource|null}\n * @protected\n */\n this.source = null;\n\n /**\n * @private\n */\n this.boundRefresh_ = this.refresh.bind(this);\n\n this.updateDistance(this.distance, this.minDistance);\n this.setSource(options.source || null);\n }\n\n /**\n * Remove all features from the source.\n * @param {boolean} [fast] Skip dispatching of {@link module:ol/source/VectorEventType~VectorEventType#removefeature} events.\n * @api\n */\n clear(fast) {\n this.features.length = 0;\n super.clear(fast);\n }\n\n /**\n * Get the distance in pixels between clusters.\n * @return {number} Distance.\n * @api\n */\n getDistance() {\n return this.distance;\n }\n\n /**\n * Get a reference to the wrapped source.\n * @return {VectorSource|null} Source.\n * @api\n */\n getSource() {\n return this.source;\n }\n\n /**\n * @param {import(\"../extent.js\").Extent} extent Extent.\n * @param {number} resolution Resolution.\n * @param {import(\"../proj/Projection.js\").default} projection Projection.\n */\n loadFeatures(extent, resolution, projection) {\n this.source.loadFeatures(extent, resolution, projection);\n if (resolution !== this.resolution) {\n this.resolution = resolution;\n this.refresh();\n }\n }\n\n /**\n * Set the distance within which features will be clusterd together.\n * @param {number} distance The distance in pixels.\n * @api\n */\n setDistance(distance) {\n this.updateDistance(distance, this.minDistance);\n }\n\n /**\n * Set the minimum distance between clusters. Will be capped at the\n * configured distance.\n * @param {number} minDistance The minimum distance in pixels.\n * @api\n */\n setMinDistance(minDistance) {\n this.updateDistance(this.distance, minDistance);\n }\n\n /**\n * The configured minimum distance between clusters.\n * @return {number} The minimum distance in pixels.\n * @api\n */\n getMinDistance() {\n return this.minDistance;\n }\n\n /**\n * Replace the wrapped source.\n * @param {VectorSource|null} source The new source for this instance.\n * @api\n */\n setSource(source) {\n if (this.source) {\n this.source.removeEventListener(EventType.CHANGE, this.boundRefresh_);\n }\n this.source = source;\n if (source) {\n source.addEventListener(EventType.CHANGE, this.boundRefresh_);\n }\n this.refresh();\n }\n\n /**\n * Handle the source changing.\n */\n refresh() {\n this.clear();\n this.cluster();\n this.addFeatures(this.features);\n }\n\n /**\n * Update the distances and refresh the source if necessary.\n * @param {number} distance The new distance.\n * @param {number} minDistance The new minimum distance.\n */\n updateDistance(distance, minDistance) {\n const ratio =\n distance === 0 ? 0 : Math.min(minDistance, distance) / distance;\n const changed =\n distance !== this.distance || this.interpolationRatio !== ratio;\n this.distance = distance;\n this.minDistance = minDistance;\n this.interpolationRatio = ratio;\n if (changed) {\n this.refresh();\n }\n }\n\n /**\n * @protected\n */\n cluster() {\n if (this.resolution === undefined || !this.source) {\n return;\n }\n const extent = createEmpty();\n const mapDistance = this.distance * this.resolution;\n const features = this.source.getFeatures();\n\n /** @type {Object} */\n const clustered = {};\n\n for (let i = 0, ii = features.length; i < ii; i++) {\n const feature = features[i];\n if (!(getUid(feature) in clustered)) {\n const geometry = this.geometryFunction(feature);\n if (geometry) {\n const coordinates = geometry.getCoordinates();\n createOrUpdateFromCoordinate(coordinates, extent);\n buffer(extent, mapDistance, extent);\n\n const neighbors = this.source\n .getFeaturesInExtent(extent)\n .filter(function (neighbor) {\n const uid = getUid(neighbor);\n if (uid in clustered) {\n return false;\n }\n clustered[uid] = true;\n return true;\n });\n this.features.push(this.createCluster(neighbors, extent));\n }\n }\n }\n }\n\n /**\n * @param {Array} features Features\n * @param {import(\"../extent.js\").Extent} extent The searched extent for these features.\n * @return {Feature} The cluster feature.\n * @protected\n */\n createCluster(features, extent) {\n const centroid = [0, 0];\n for (let i = features.length - 1; i >= 0; --i) {\n const geometry = this.geometryFunction(features[i]);\n if (geometry) {\n addCoordinate(centroid, geometry.getCoordinates());\n } else {\n features.splice(i, 1);\n }\n }\n scaleCoordinate(centroid, 1 / features.length);\n const searchCenter = getCenter(extent);\n const ratio = this.interpolationRatio;\n const geometry = new Point([\n centroid[0] * (1 - ratio) + searchCenter[0] * ratio,\n centroid[1] * (1 - ratio) + searchCenter[1] * ratio,\n ]);\n if (this.createCustomCluster_) {\n return this.createCustomCluster_(geometry, features);\n }\n return new Feature({\n geometry,\n features,\n });\n }\n}\n\nexport default Cluster;\n","/**\n * @module ol/reproj/DataTile\n */\nimport {ERROR_THRESHOLD} from './common.js';\n\nimport DataTile, {asArrayLike, asImageLike, toArray} from '../DataTile.js';\nimport EventType from '../events/EventType.js';\nimport TileState from '../TileState.js';\nimport Triangulation from './Triangulation.js';\nimport {\n calculateSourceExtentResolution,\n canvasPool,\n render as renderReprojected,\n} from '../reproj.js';\nimport {clamp} from '../math.js';\nimport {createCanvasContext2D, releaseCanvas} from '../dom.js';\nimport {getArea, getIntersection} from '../extent.js';\nimport {listen, unlistenByKey} from '../events.js';\n\n/**\n * @typedef {function(number, number, number, number) : import(\"../DataTile.js\").default} TileGetter\n */\n\n/**\n * @typedef {Object} Options\n * @property {import(\"../proj/Projection.js\").default} sourceProj Source projection.\n * @property {import(\"../tilegrid/TileGrid.js\").default} sourceTileGrid Source tile grid.\n * @property {import(\"../proj/Projection.js\").default} targetProj Target projection.\n * @property {import(\"../tilegrid/TileGrid.js\").default} targetTileGrid Target tile grid.\n * @property {import(\"../tilecoord.js\").TileCoord} tileCoord Coordinate of the tile.\n * @property {import(\"../tilecoord.js\").TileCoord} [wrappedTileCoord] Coordinate of the tile wrapped in X.\n * @property {number} pixelRatio Pixel ratio.\n * @property {number} gutter Gutter of the source tiles.\n * @property {TileGetter} getTileFunction Function returning source tiles (z, x, y, pixelRatio).\n * @property {boolean} [interpolate=false] Use interpolated values when resampling. By default,\n * the nearest neighbor is used when resampling.\n * @property {number} [errorThreshold] Acceptable reprojection error (in px).\n * @property {number} [transition=250] A duration for tile opacity\n * transitions in milliseconds. A duration of 0 disables the opacity transition.\n */\n\n/**\n * @classdesc\n * Class encapsulating single reprojected data tile.\n * See {@link module:ol/source/DataTile~DataTileSource}.\n *\n */\nclass ReprojDataTile extends DataTile {\n /**\n * @param {Options} options Tile options.\n */\n constructor(options) {\n super({\n tileCoord: options.tileCoord,\n loader: () => Promise.resolve(new Uint8Array(4)),\n interpolate: options.interpolate,\n transition: options.transition,\n });\n\n /**\n * @private\n * @type {number}\n */\n this.pixelRatio_ = options.pixelRatio;\n\n /**\n * @private\n * @type {number}\n */\n this.gutter_ = options.gutter;\n\n /**\n * @type {import(\"../DataTile.js\").Data}\n * @private\n */\n this.reprojData_ = null;\n\n /**\n * @type {Error}\n * @private\n */\n this.reprojError_ = null;\n\n /**\n * @type {import('../size.js').Size}\n * @private\n */\n this.reprojSize_ = undefined;\n\n /**\n * @private\n * @type {import(\"../tilegrid/TileGrid.js\").default}\n */\n this.sourceTileGrid_ = options.sourceTileGrid;\n\n /**\n * @private\n * @type {import(\"../tilegrid/TileGrid.js\").default}\n */\n this.targetTileGrid_ = options.targetTileGrid;\n\n /**\n * @private\n * @type {import(\"../tilecoord.js\").TileCoord}\n */\n this.wrappedTileCoord_ = options.wrappedTileCoord || options.tileCoord;\n\n /**\n * @private\n * @type {!Array}\n */\n this.sourceTiles_ = [];\n\n /**\n * @private\n * @type {?Array}\n */\n this.sourcesListenerKeys_ = null;\n\n /**\n * @private\n * @type {number}\n */\n this.sourceZ_ = 0;\n\n const targetExtent = this.targetTileGrid_.getTileCoordExtent(\n this.wrappedTileCoord_\n );\n const maxTargetExtent = this.targetTileGrid_.getExtent();\n let maxSourceExtent = this.sourceTileGrid_.getExtent();\n\n const limitedTargetExtent = maxTargetExtent\n ? getIntersection(targetExtent, maxTargetExtent)\n : targetExtent;\n\n if (getArea(limitedTargetExtent) === 0) {\n // Tile is completely outside range -> EMPTY\n // TODO: is it actually correct that the source even creates the tile ?\n this.state = TileState.EMPTY;\n return;\n }\n\n const sourceProj = options.sourceProj;\n const sourceProjExtent = sourceProj.getExtent();\n if (sourceProjExtent) {\n if (!maxSourceExtent) {\n maxSourceExtent = sourceProjExtent;\n } else {\n maxSourceExtent = getIntersection(maxSourceExtent, sourceProjExtent);\n }\n }\n\n const targetResolution = this.targetTileGrid_.getResolution(\n this.wrappedTileCoord_[0]\n );\n\n const targetProj = options.targetProj;\n const sourceResolution = calculateSourceExtentResolution(\n sourceProj,\n targetProj,\n limitedTargetExtent,\n targetResolution\n );\n\n if (!isFinite(sourceResolution) || sourceResolution <= 0) {\n // invalid sourceResolution -> EMPTY\n // probably edges of the projections when no extent is defined\n this.state = TileState.EMPTY;\n return;\n }\n\n const errorThresholdInPixels =\n options.errorThreshold !== undefined\n ? options.errorThreshold\n : ERROR_THRESHOLD;\n\n /**\n * @private\n * @type {!import(\"./Triangulation.js\").default}\n */\n this.triangulation_ = new Triangulation(\n sourceProj,\n targetProj,\n limitedTargetExtent,\n maxSourceExtent,\n sourceResolution * errorThresholdInPixels,\n targetResolution\n );\n\n if (this.triangulation_.getTriangles().length === 0) {\n // no valid triangles -> EMPTY\n this.state = TileState.EMPTY;\n return;\n }\n\n this.sourceZ_ = this.sourceTileGrid_.getZForResolution(sourceResolution);\n let sourceExtent = this.triangulation_.calculateSourceExtent();\n\n if (maxSourceExtent) {\n if (sourceProj.canWrapX()) {\n sourceExtent[1] = clamp(\n sourceExtent[1],\n maxSourceExtent[1],\n maxSourceExtent[3]\n );\n sourceExtent[3] = clamp(\n sourceExtent[3],\n maxSourceExtent[1],\n maxSourceExtent[3]\n );\n } else {\n sourceExtent = getIntersection(sourceExtent, maxSourceExtent);\n }\n }\n\n if (!getArea(sourceExtent)) {\n this.state = TileState.EMPTY;\n } else {\n const sourceRange = this.sourceTileGrid_.getTileRangeForExtentAndZ(\n sourceExtent,\n this.sourceZ_\n );\n const getTile = options.getTileFunction;\n for (let srcX = sourceRange.minX; srcX <= sourceRange.maxX; srcX++) {\n for (let srcY = sourceRange.minY; srcY <= sourceRange.maxY; srcY++) {\n const tile = getTile(this.sourceZ_, srcX, srcY, this.pixelRatio_);\n if (tile) {\n this.sourceTiles_.push(tile);\n }\n }\n }\n\n if (this.sourceTiles_.length === 0) {\n this.state = TileState.EMPTY;\n }\n }\n }\n\n /**\n * Get the tile size.\n * @return {import('../size.js').Size} Tile size.\n */\n getSize() {\n return this.reprojSize_;\n }\n\n /**\n * Get the data for the tile.\n * @return {import(\"../DataTile.js\").Data} Tile data.\n */\n getData() {\n return this.reprojData_;\n }\n\n /**\n * Get any loading error.\n * @return {Error} Loading error.\n */\n getError() {\n return this.reprojError_;\n }\n\n /**\n * @private\n */\n reproject_() {\n const dataSources = [];\n this.sourceTiles_.forEach((tile) => {\n if (!tile || tile.getState() !== TileState.LOADED) {\n return;\n }\n const size = tile.getSize();\n const gutter = this.gutter_;\n /**\n * @type {import(\"../DataTile.js\").ArrayLike}\n */\n let tileData;\n const arrayData = asArrayLike(tile.getData());\n if (arrayData) {\n tileData = arrayData;\n } else {\n tileData = toArray(asImageLike(tile.getData()));\n }\n const pixelSize = [size[0] + 2 * gutter, size[1] + 2 * gutter];\n const isFloat = tileData instanceof Float32Array;\n const pixelCount = pixelSize[0] * pixelSize[1];\n const DataType = isFloat ? Float32Array : Uint8Array;\n const tileDataR = new DataType(tileData.buffer);\n const bytesPerElement = DataType.BYTES_PER_ELEMENT;\n const bytesPerPixel = (bytesPerElement * tileDataR.length) / pixelCount;\n const bytesPerRow = tileDataR.byteLength / pixelSize[1];\n const bandCount = Math.floor(\n bytesPerRow / bytesPerElement / pixelSize[0]\n );\n const packedLength = pixelCount * bandCount;\n let packedData = tileDataR;\n if (tileDataR.length !== packedLength) {\n packedData = new DataType(packedLength);\n let dataIndex = 0;\n let rowOffset = 0;\n const colCount = pixelSize[0] * bandCount;\n for (let rowIndex = 0; rowIndex < pixelSize[1]; ++rowIndex) {\n for (let colIndex = 0; colIndex < colCount; ++colIndex) {\n packedData[dataIndex++] = tileDataR[rowOffset + colIndex];\n }\n rowOffset += bytesPerRow / bytesPerElement;\n }\n }\n dataSources.push({\n extent: this.sourceTileGrid_.getTileCoordExtent(tile.tileCoord),\n data: new Uint8Array(packedData.buffer),\n dataType: DataType,\n bytesPerPixel: bytesPerPixel,\n pixelSize: pixelSize,\n });\n });\n this.sourceTiles_.length = 0;\n\n if (dataSources.length === 0) {\n this.state = TileState.ERROR;\n } else {\n const z = this.wrappedTileCoord_[0];\n const size = this.targetTileGrid_.getTileSize(z);\n const targetWidth = typeof size === 'number' ? size : size[0];\n const targetHeight = typeof size === 'number' ? size : size[1];\n const targetResolution = this.targetTileGrid_.getResolution(z);\n const sourceResolution = this.sourceTileGrid_.getResolution(\n this.sourceZ_\n );\n\n const targetExtent = this.targetTileGrid_.getTileCoordExtent(\n this.wrappedTileCoord_\n );\n\n let dataR, dataU;\n\n const bytesPerPixel = dataSources[0].bytesPerPixel;\n\n const reprojs = Math.ceil(bytesPerPixel / 3);\n for (let reproj = reprojs - 1; reproj >= 0; --reproj) {\n const sources = [];\n for (let i = 0, len = dataSources.length; i < len; ++i) {\n const dataSource = dataSources[i];\n const buffer = dataSource.data;\n const pixelSize = dataSource.pixelSize;\n const width = pixelSize[0];\n const height = pixelSize[1];\n const context = createCanvasContext2D(width, height, canvasPool);\n const imageData = context.createImageData(width, height);\n const data = imageData.data;\n let offset = reproj * 3;\n for (let j = 0, len = data.length; j < len; j += 4) {\n data[j] = buffer[offset];\n data[j + 1] = buffer[offset + 1];\n data[j + 2] = buffer[offset + 2];\n data[j + 3] = 255;\n offset += bytesPerPixel;\n }\n context.putImageData(imageData, 0, 0);\n sources.push({\n extent: dataSource.extent,\n image: context.canvas,\n });\n }\n\n const canvas = renderReprojected(\n targetWidth,\n targetHeight,\n this.pixelRatio_,\n sourceResolution,\n this.sourceTileGrid_.getExtent(),\n targetResolution,\n targetExtent,\n this.triangulation_,\n sources,\n this.gutter_,\n false,\n false\n );\n\n for (let i = 0, len = sources.length; i < len; ++i) {\n const canvas = sources[i].image;\n const context = canvas.getContext('2d');\n releaseCanvas(context);\n canvasPool.push(context.canvas);\n }\n\n const context = canvas.getContext('2d');\n const imageData = context.getImageData(\n 0,\n 0,\n canvas.width,\n canvas.height\n );\n\n releaseCanvas(context);\n canvasPool.push(canvas);\n\n if (!dataR) {\n dataU = new Uint8Array(\n bytesPerPixel * imageData.width * imageData.height\n );\n dataR = new dataSources[0].dataType(dataU.buffer);\n }\n\n const data = imageData.data;\n let offset = reproj * 3;\n for (let i = 0, len = data.length; i < len; i += 4) {\n if (data[i + 3] === 255) {\n dataU[offset] = data[i];\n dataU[offset + 1] = data[i + 1];\n dataU[offset + 2] = data[i + 2];\n } else {\n dataU[offset] = 0;\n dataU[offset + 1] = 0;\n dataU[offset + 2] = 0;\n }\n offset += bytesPerPixel;\n }\n }\n\n this.reprojData_ = dataR;\n this.reprojSize_ = [\n Math.round(targetWidth * this.pixelRatio_),\n Math.round(targetHeight * this.pixelRatio_),\n ];\n this.state = TileState.LOADED;\n }\n this.changed();\n }\n\n /**\n * Load not yet loaded URI.\n */\n load() {\n if (this.state !== TileState.IDLE && this.state !== TileState.ERROR) {\n return;\n }\n this.state = TileState.LOADING;\n this.changed();\n\n let leftToLoad = 0;\n\n this.sourcesListenerKeys_ = [];\n this.sourceTiles_.forEach((tile) => {\n const state = tile.getState();\n if (state !== TileState.IDLE && state !== TileState.LOADING) {\n return;\n }\n leftToLoad++;\n\n const sourceListenKey = listen(\n tile,\n EventType.CHANGE,\n function () {\n const state = tile.getState();\n if (\n state == TileState.LOADED ||\n state == TileState.ERROR ||\n state == TileState.EMPTY\n ) {\n unlistenByKey(sourceListenKey);\n leftToLoad--;\n if (leftToLoad === 0) {\n this.unlistenSources_();\n this.reproject_();\n }\n }\n },\n this\n );\n this.sourcesListenerKeys_.push(sourceListenKey);\n });\n\n if (leftToLoad === 0) {\n setTimeout(this.reproject_.bind(this), 0);\n } else {\n this.sourceTiles_.forEach(function (tile) {\n const state = tile.getState();\n if (state == TileState.IDLE) {\n tile.load();\n }\n });\n }\n }\n\n /**\n * @private\n */\n unlistenSources_() {\n this.sourcesListenerKeys_.forEach(unlistenByKey);\n this.sourcesListenerKeys_ = null;\n }\n}\n\nexport default ReprojDataTile;\n","/**\n * @module ol/source/DataTile\n */\nimport DataTile from '../DataTile.js';\nimport EventType from '../events/EventType.js';\nimport ReprojDataTile from '../reproj/DataTile.js';\nimport TileCache from '../TileCache.js';\nimport TileEventType from './TileEventType.js';\nimport TileSource, {TileSourceEvent} from './Tile.js';\nimport TileState from '../TileState.js';\nimport {\n createXYZ,\n extentFromProjection,\n getForProjection as getTileGridForProjection,\n} from '../tilegrid.js';\nimport {equivalent, get as getProjection} from '../proj.js';\nimport {getKeyZXY} from '../tilecoord.js';\nimport {getUid} from '../util.js';\nimport {toPromise} from '../functions.js';\nimport {toSize} from '../size.js';\n\n/**\n * Data tile loading function. The function is called with z, x, and y tile coordinates and\n * returns {@link import(\"../DataTile.js\").Data data} for a tile or a promise for the same.\n * @typedef {function(number, number, number) : (import(\"../DataTile.js\").Data|Promise)} Loader\n */\n\n/**\n * @typedef {Object} Options\n * @property {Loader} [loader] Data loader. Called with z, x, and y tile coordinates.\n * Returns {@link import(\"../DataTile.js\").Data data} for a tile or a promise for the same.\n * For loaders that generate images, the promise should not resolve until the image is loaded.\n * @property {import(\"./Source.js\").AttributionLike} [attributions] Attributions.\n * @property {boolean} [attributionsCollapsible=true] Attributions are collapsible.\n * @property {number} [maxZoom=42] Optional max zoom level. Not used if `tileGrid` is provided.\n * @property {number} [minZoom=0] Optional min zoom level. Not used if `tileGrid` is provided.\n * @property {number|import(\"../size.js\").Size} [tileSize=[256, 256]] The pixel width and height of the source tiles.\n * This may be different than the rendered pixel size if a `tileGrid` is provided.\n * @property {number} [gutter=0] The size in pixels of the gutter around data tiles to ignore.\n * This allows artifacts of rendering at tile edges to be ignored.\n * Supported data should be wider and taller than the tile size by a value of `2 x gutter`.\n * @property {number} [maxResolution] Optional tile grid resolution at level zero. Not used if `tileGrid` is provided.\n * @property {import(\"../proj.js\").ProjectionLike} [projection='EPSG:3857'] Tile projection.\n * @property {import(\"../tilegrid/TileGrid.js\").default} [tileGrid] Tile grid.\n * @property {boolean} [opaque=false] Whether the layer is opaque.\n * @property {import(\"./Source.js\").State} [state] The source state.\n * @property {boolean} [wrapX=false] Render tiles beyond the antimeridian.\n * @property {number} [transition] Transition time when fading in new tiles (in miliseconds).\n * @property {number} [bandCount=4] Number of bands represented in the data.\n * @property {boolean} [interpolate=false] Use interpolated values when resampling. By default,\n * the nearest neighbor is used when resampling.\n */\n\n/**\n * @classdesc\n * A source for typed array data tiles.\n *\n * @fires import(\"./Tile.js\").TileSourceEvent\n * @api\n */\nclass DataTileSource extends TileSource {\n /**\n * @param {Options} options DataTile source options.\n */\n constructor(options) {\n const projection =\n options.projection === undefined ? 'EPSG:3857' : options.projection;\n\n let tileGrid = options.tileGrid;\n if (tileGrid === undefined && projection) {\n tileGrid = createXYZ({\n extent: extentFromProjection(projection),\n maxResolution: options.maxResolution,\n maxZoom: options.maxZoom,\n minZoom: options.minZoom,\n tileSize: options.tileSize,\n });\n }\n\n super({\n cacheSize: 0.1, // don't cache on the source\n attributions: options.attributions,\n attributionsCollapsible: options.attributionsCollapsible,\n projection: projection,\n tileGrid: tileGrid,\n opaque: options.opaque,\n state: options.state,\n wrapX: options.wrapX,\n transition: options.transition,\n interpolate: options.interpolate,\n });\n\n /**\n * @private\n * @type {number}\n */\n this.gutter_ = options.gutter !== undefined ? options.gutter : 0;\n\n /**\n * @private\n * @type {import('../size.js').Size|null}\n */\n this.tileSize_ = options.tileSize ? toSize(options.tileSize) : null;\n\n /**\n * @private\n * @type {Array|null}\n */\n this.tileSizes_ = null;\n\n /**\n * @private\n * @type {!Object}\n */\n this.tileLoadingKeys_ = {};\n\n /**\n * @private\n */\n this.loader_ = options.loader;\n\n this.handleTileChange_ = this.handleTileChange_.bind(this);\n\n /**\n * @type {number}\n */\n this.bandCount = options.bandCount === undefined ? 4 : options.bandCount; // assume RGBA if undefined\n\n /**\n * @private\n * @type {!Object}\n */\n this.tileGridForProjection_ = {};\n\n /**\n * @private\n * @type {!Object}\n */\n this.tileCacheForProjection_ = {};\n }\n\n /**\n * Set the source tile sizes. The length of the array is expected to match the number of\n * levels in the tile grid.\n * @protected\n * @param {Array} tileSizes An array of tile sizes.\n */\n setTileSizes(tileSizes) {\n this.tileSizes_ = tileSizes;\n }\n\n /**\n * Get the source tile size at the given zoom level. This may be different than the rendered tile\n * size.\n * @protected\n * @param {number} z Tile zoom level.\n * @return {import('../size.js').Size} The source tile size.\n */\n getTileSize(z) {\n if (this.tileSizes_) {\n return this.tileSizes_[z];\n }\n if (this.tileSize_) {\n return this.tileSize_;\n }\n const tileGrid = this.getTileGrid();\n return tileGrid ? toSize(tileGrid.getTileSize(z)) : [256, 256];\n }\n\n /**\n * @param {import(\"../proj/Projection.js\").default} projection Projection.\n * @return {number} Gutter.\n */\n getGutterForProjection(projection) {\n const thisProj = this.getProjection();\n if (!thisProj || equivalent(thisProj, projection)) {\n return this.gutter_;\n }\n\n return 0;\n }\n\n /**\n * @param {Loader} loader The data loader.\n * @protected\n */\n setLoader(loader) {\n this.loader_ = loader;\n }\n\n /**\n * @param {number} z Tile coordinate z.\n * @param {number} x Tile coordinate x.\n * @param {number} y Tile coordinate y.\n * @param {import(\"../proj/Projection.js\").default} targetProj The output projection.\n * @param {import(\"../proj/Projection.js\").default} sourceProj The input projection.\n * @return {!DataTile} Tile.\n */\n getReprojTile_(z, x, y, targetProj, sourceProj) {\n const cache = this.getTileCacheForProjection(targetProj);\n const tileCoordKey = getKeyZXY(z, x, y);\n if (cache.containsKey(tileCoordKey)) {\n const tile = cache.get(tileCoordKey);\n if (tile && tile.key == this.getKey()) {\n return tile;\n }\n }\n\n const tileGrid = this.getTileGrid();\n const reprojTilePixelRatio = Math.max.apply(\n null,\n tileGrid.getResolutions().map((r, z) => {\n const tileSize = toSize(tileGrid.getTileSize(z));\n const textureSize = this.getTileSize(z);\n return Math.max(\n textureSize[0] / tileSize[0],\n textureSize[1] / tileSize[1]\n );\n })\n );\n\n const sourceTileGrid = this.getTileGridForProjection(sourceProj);\n const targetTileGrid = this.getTileGridForProjection(targetProj);\n const tileCoord = [z, x, y];\n const wrappedTileCoord = this.getTileCoordForTileUrlFunction(\n tileCoord,\n targetProj\n );\n\n const options = Object.assign(\n {\n sourceProj,\n sourceTileGrid,\n targetProj,\n targetTileGrid,\n tileCoord,\n wrappedTileCoord,\n pixelRatio: reprojTilePixelRatio,\n gutter: this.getGutterForProjection(sourceProj),\n getTileFunction: (z, x, y, pixelRatio) =>\n this.getTile(z, x, y, pixelRatio, sourceProj),\n },\n this.tileOptions\n );\n const newTile = new ReprojDataTile(options);\n newTile.key = this.getKey();\n return newTile;\n }\n\n /**\n * @param {number} z Tile coordinate z.\n * @param {number} x Tile coordinate x.\n * @param {number} y Tile coordinate y.\n * @param {number} pixelRatio Pixel ratio.\n * @param {import(\"../proj/Projection.js\").default} projection Projection.\n * @return {!DataTile} Tile.\n */\n getTile(z, x, y, pixelRatio, projection) {\n const sourceProjection = this.getProjection();\n if (\n sourceProjection &&\n projection &&\n !equivalent(sourceProjection, projection)\n ) {\n return this.getReprojTile_(z, x, y, projection, sourceProjection);\n }\n\n const size = this.getTileSize(z);\n const tileCoordKey = getKeyZXY(z, x, y);\n if (this.tileCache.containsKey(tileCoordKey)) {\n return this.tileCache.get(tileCoordKey);\n }\n\n const sourceLoader = this.loader_;\n\n function loader() {\n return toPromise(function () {\n return sourceLoader(z, x, y);\n });\n }\n\n const options = Object.assign(\n {\n tileCoord: [z, x, y],\n loader: loader,\n size: size,\n },\n this.tileOptions\n );\n\n const tile = new DataTile(options);\n tile.key = this.getKey();\n tile.addEventListener(EventType.CHANGE, this.handleTileChange_);\n\n this.tileCache.set(tileCoordKey, tile);\n return tile;\n }\n\n /**\n * Handle tile change events.\n * @param {import(\"../events/Event.js\").default} event Event.\n */\n handleTileChange_(event) {\n const tile = /** @type {import(\"../Tile.js\").default} */ (event.target);\n const uid = getUid(tile);\n const tileState = tile.getState();\n let type;\n if (tileState == TileState.LOADING) {\n this.tileLoadingKeys_[uid] = true;\n type = TileEventType.TILELOADSTART;\n } else if (uid in this.tileLoadingKeys_) {\n delete this.tileLoadingKeys_[uid];\n type =\n tileState == TileState.ERROR\n ? TileEventType.TILELOADERROR\n : tileState == TileState.LOADED\n ? TileEventType.TILELOADEND\n : undefined;\n }\n if (type) {\n this.dispatchEvent(new TileSourceEvent(type, tile));\n }\n }\n\n /**\n * @param {import(\"../proj/Projection.js\").default} projection Projection.\n * @return {!import(\"../tilegrid/TileGrid.js\").default} Tile grid.\n */\n getTileGridForProjection(projection) {\n const thisProj = this.getProjection();\n if (this.tileGrid && (!thisProj || equivalent(thisProj, projection))) {\n return this.tileGrid;\n }\n\n const projKey = getUid(projection);\n if (!(projKey in this.tileGridForProjection_)) {\n this.tileGridForProjection_[projKey] =\n getTileGridForProjection(projection);\n }\n return this.tileGridForProjection_[projKey];\n }\n\n /**\n * Sets the tile grid to use when reprojecting the tiles to the given\n * projection instead of the default tile grid for the projection.\n *\n * This can be useful when the default tile grid cannot be created\n * (e.g. projection has no extent defined) or\n * for optimization reasons (custom tile size, resolutions, ...).\n *\n * @param {import(\"../proj.js\").ProjectionLike} projection Projection.\n * @param {import(\"../tilegrid/TileGrid.js\").default} tilegrid Tile grid to use for the projection.\n * @api\n */\n setTileGridForProjection(projection, tilegrid) {\n const proj = getProjection(projection);\n if (proj) {\n const projKey = getUid(proj);\n if (!(projKey in this.tileGridForProjection_)) {\n this.tileGridForProjection_[projKey] = tilegrid;\n }\n }\n }\n\n /**\n * @param {import(\"../proj/Projection.js\").default} projection Projection.\n * @return {import(\"../TileCache.js\").default} Tile cache.\n */\n getTileCacheForProjection(projection) {\n const thisProj = this.getProjection();\n if (!thisProj || equivalent(thisProj, projection)) {\n return this.tileCache;\n }\n\n const projKey = getUid(projection);\n if (!(projKey in this.tileCacheForProjection_)) {\n this.tileCacheForProjection_[projKey] = new TileCache(0.1); // don't cache\n }\n return this.tileCacheForProjection_[projKey];\n }\n\n /**\n * @param {import(\"../proj/Projection.js\").default} projection Projection.\n * @param {!Object} usedTiles Used tiles.\n */\n expireCache(projection, usedTiles) {\n const usedTileCache = this.getTileCacheForProjection(projection);\n\n this.tileCache.expireCache(\n this.tileCache == usedTileCache ? usedTiles : {}\n );\n for (const id in this.tileCacheForProjection_) {\n const tileCache = this.tileCacheForProjection_[id];\n tileCache.expireCache(tileCache == usedTileCache ? usedTiles : {});\n }\n }\n\n clear() {\n super.clear();\n for (const id in this.tileCacheForProjection_) {\n this.tileCacheForProjection_[id].clear();\n }\n }\n}\n\nexport default DataTileSource;\n","/**\n * @module ol/source/GeoTIFF\n */\nimport DataTile from './DataTile.js';\nimport TileGrid from '../tilegrid/TileGrid.js';\nimport {\n Pool,\n globals as geotiffGlobals,\n fromBlob as tiffFromBlob,\n fromUrl as tiffFromUrl,\n fromUrls as tiffFromUrls,\n} from 'geotiff';\nimport {\n Projection,\n get as getCachedProjection,\n toUserCoordinate,\n toUserExtent,\n} from '../proj.js';\nimport {clamp} from '../math.js';\nimport {getCenter, getIntersection} from '../extent.js';\nimport {error as logError} from '../console.js';\nimport {fromCode as unitsFromCode} from '../proj/Units.js';\n\n/**\n * Determine if an image type is a mask.\n * See https://www.awaresystems.be/imaging/tiff/tifftags/newsubfiletype.html\n * @param {GeoTIFFImage} image The image.\n * @return {boolean} The image is a mask.\n */\nfunction isMask(image) {\n const fileDirectory = image.fileDirectory;\n const type = fileDirectory.NewSubfileType || 0;\n return (type & 4) === 4;\n}\n\n/**\n * @param {true|false|'auto'} preference The convertToRGB option.\n * @param {GeoTIFFImage} image The image.\n * @return {boolean} Use the `image.readRGB()` method.\n */\nfunction readRGB(preference, image) {\n if (!preference) {\n return false;\n }\n if (preference === true) {\n return true;\n }\n if (image.getSamplesPerPixel() !== 3) {\n return false;\n }\n const interpretation = image.fileDirectory.PhotometricInterpretation;\n const interpretations = geotiffGlobals.photometricInterpretations;\n return (\n interpretation === interpretations.CMYK ||\n interpretation === interpretations.YCbCr ||\n interpretation === interpretations.CIELab ||\n interpretation === interpretations.ICCLab\n );\n}\n\n/**\n * @typedef {Object} SourceInfo\n * @property {string} [url] URL for the source GeoTIFF.\n * @property {Array} [overviews] List of any overview URLs, only applies if the url parameter is given.\n * @property {Blob} [blob] Blob containing the source GeoTIFF. `blob` and `url` are mutually exclusive.\n * @property {number} [min=0] The minimum source data value. Rendered values are scaled from 0 to 1 based on\n * the configured min and max. If not provided and raster statistics are available, those will be used instead.\n * If neither are available, the minimum for the data type will be used. To disable this behavior, set\n * the `normalize` option to `false` in the constructor.\n * @property {number} [max] The maximum source data value. Rendered values are scaled from 0 to 1 based on\n * the configured min and max. If not provided and raster statistics are available, those will be used instead.\n * If neither are available, the maximum for the data type will be used. To disable this behavior, set\n * the `normalize` option to `false` in the constructor.\n * @property {number} [nodata] Values to discard (overriding any nodata values in the metadata).\n * When provided, an additional alpha band will be added to the data. Often the GeoTIFF metadata\n * will include information about nodata values, so you should only need to set this property if\n * you find that it is not already extracted from the metadata.\n * @property {Array} [bands] Band numbers to be read from (where the first band is `1`). If not provided, all bands will\n * be read. For example, if a GeoTIFF has blue (1), green (2), red (3), and near-infrared (4) bands, and you only need the\n * near-infrared band, configure `bands: [4]`.\n */\n\n/**\n * @typedef {Object} GeoKeys\n * @property {number} GTModelTypeGeoKey Model type.\n * @property {number} GTRasterTypeGeoKey Raster type.\n * @property {number} GeogAngularUnitsGeoKey Angular units.\n * @property {number} GeogInvFlatteningGeoKey Inverse flattening.\n * @property {number} GeogSemiMajorAxisGeoKey Semi-major axis.\n * @property {number} GeographicTypeGeoKey Geographic coordinate system code.\n * @property {number} ProjLinearUnitsGeoKey Projected linear unit code.\n * @property {number} ProjectedCSTypeGeoKey Projected coordinate system code.\n */\n\n/**\n * @typedef {import(\"geotiff\").GeoTIFF} GeoTIFF\n */\n\n/**\n * @typedef {import(\"geotiff\").MultiGeoTIFF} MultiGeoTIFF\n */\n\n/**\n * @typedef {Object} GDALMetadata\n * @property {string} STATISTICS_MINIMUM The minimum value (as a string).\n * @property {string} STATISTICS_MAXIMUM The maximum value (as a string).\n */\n\nconst STATISTICS_MAXIMUM = 'STATISTICS_MAXIMUM';\nconst STATISTICS_MINIMUM = 'STATISTICS_MINIMUM';\n\nconst defaultTileSize = 256;\n\n/**\n * @typedef {import(\"geotiff\").GeoTIFFImage} GeoTIFFImage\n */\n\nlet workerPool;\nfunction getWorkerPool() {\n if (!workerPool) {\n workerPool = new Pool();\n }\n return workerPool;\n}\n\n/**\n * Get the bounding box of an image. If the image does not have an affine transform,\n * the pixel bounds are returned.\n * @param {GeoTIFFImage} image The image.\n * @return {Array} The image bounding box.\n */\nfunction getBoundingBox(image) {\n try {\n return image.getBoundingBox();\n } catch (_) {\n const fileDirectory = image.fileDirectory;\n return [0, 0, fileDirectory.ImageWidth, fileDirectory.ImageLength];\n }\n}\n\n/**\n * Get the origin of an image. If the image does not have an affine transform,\n * the top-left corner of the pixel bounds is returned.\n * @param {GeoTIFFImage} image The image.\n * @return {Array} The image origin.\n */\nfunction getOrigin(image) {\n try {\n return image.getOrigin().slice(0, 2);\n } catch (_) {\n return [0, image.fileDirectory.ImageLength];\n }\n}\n\n/**\n * Get the resolution of an image. If the image does not have an affine transform,\n * the width of the image is compared with the reference image.\n * @param {GeoTIFFImage} image The image.\n * @param {GeoTIFFImage} referenceImage The reference image.\n * @return {Array} The map x and y units per pixel.\n */\nfunction getResolutions(image, referenceImage) {\n try {\n return image.getResolution(referenceImage);\n } catch (_) {\n return [\n referenceImage.fileDirectory.ImageWidth / image.fileDirectory.ImageWidth,\n referenceImage.fileDirectory.ImageHeight /\n image.fileDirectory.ImageHeight,\n ];\n }\n}\n\n/**\n * @param {GeoTIFFImage} image A GeoTIFF.\n * @return {import(\"../proj/Projection.js\").default} The image projection.\n */\nfunction getProjection(image) {\n const geoKeys = image.geoKeys;\n if (!geoKeys) {\n return null;\n }\n\n if (\n geoKeys.ProjectedCSTypeGeoKey &&\n geoKeys.ProjectedCSTypeGeoKey !== 32767\n ) {\n const code = 'EPSG:' + geoKeys.ProjectedCSTypeGeoKey;\n let projection = getCachedProjection(code);\n if (!projection) {\n const units = unitsFromCode(geoKeys.ProjLinearUnitsGeoKey);\n if (units) {\n projection = new Projection({\n code: code,\n units: units,\n });\n }\n }\n return projection;\n }\n\n if (geoKeys.GeographicTypeGeoKey && geoKeys.GeographicTypeGeoKey !== 32767) {\n const code = 'EPSG:' + geoKeys.GeographicTypeGeoKey;\n let projection = getCachedProjection(code);\n if (!projection) {\n const units = unitsFromCode(geoKeys.GeogAngularUnitsGeoKey);\n if (units) {\n projection = new Projection({\n code: code,\n units: units,\n });\n }\n }\n return projection;\n }\n\n return null;\n}\n\n/**\n * @param {GeoTIFF|MultiGeoTIFF} tiff A GeoTIFF.\n * @return {Promise>} Resolves to a list of images.\n */\nfunction getImagesForTIFF(tiff) {\n return tiff.getImageCount().then(function (count) {\n const requests = new Array(count);\n for (let i = 0; i < count; ++i) {\n requests[i] = tiff.getImage(i);\n }\n return Promise.all(requests);\n });\n}\n\n/**\n * @param {SourceInfo} source The GeoTIFF source.\n * @param {Object} options Options for the GeoTIFF source.\n * @return {Promise>} Resolves to a list of images.\n */\nfunction getImagesForSource(source, options) {\n let request;\n if (source.blob) {\n request = tiffFromBlob(source.blob);\n } else if (source.overviews) {\n request = tiffFromUrls(source.url, source.overviews, options);\n } else {\n request = tiffFromUrl(source.url, options);\n }\n return request.then(getImagesForTIFF);\n}\n\n/**\n * @param {number|Array|Array>} expected Expected value.\n * @param {number|Array|Array>} got Actual value.\n * @param {number} tolerance Accepted tolerance in fraction of expected between expected and got.\n * @param {string} message The error message.\n * @param {function(Error):void} rejector A function to be called with any error.\n */\nfunction assertEqual(expected, got, tolerance, message, rejector) {\n if (Array.isArray(expected)) {\n const length = expected.length;\n if (!Array.isArray(got) || length != got.length) {\n const error = new Error(message);\n rejector(error);\n throw error;\n }\n for (let i = 0; i < length; ++i) {\n assertEqual(expected[i], got[i], tolerance, message, rejector);\n }\n return;\n }\n\n got = /** @type {number} */ (got);\n if (Math.abs(expected - got) > tolerance * expected) {\n throw new Error(message);\n }\n}\n\n/**\n * @param {Array} array The data array.\n * @return {number} The minimum value.\n */\nfunction getMinForDataType(array) {\n if (array instanceof Int8Array) {\n return -128;\n }\n if (array instanceof Int16Array) {\n return -32768;\n }\n if (array instanceof Int32Array) {\n return -2147483648;\n }\n if (array instanceof Float32Array) {\n return 1.2e-38;\n }\n return 0;\n}\n\n/**\n * @param {Array} array The data array.\n * @return {number} The maximum value.\n */\nfunction getMaxForDataType(array) {\n if (array instanceof Int8Array) {\n return 127;\n }\n if (array instanceof Uint8Array) {\n return 255;\n }\n if (array instanceof Uint8ClampedArray) {\n return 255;\n }\n if (array instanceof Int16Array) {\n return 32767;\n }\n if (array instanceof Uint16Array) {\n return 65535;\n }\n if (array instanceof Int32Array) {\n return 2147483647;\n }\n if (array instanceof Uint32Array) {\n return 4294967295;\n }\n if (array instanceof Float32Array) {\n return 3.4e38;\n }\n return 255;\n}\n\n/**\n * @typedef {Object} GeoTIFFSourceOptions\n * @property {boolean} [forceXHR=false] Whether to force the usage of the browsers XMLHttpRequest API.\n * @property {Object} [headers] additional key-value pairs of headers to be passed with each request. Key is the header name, value the header value.\n * @property {string} [credentials] How credentials shall be handled. See\n * https://developer.mozilla.org/en-US/docs/Web/API/fetch for reference and possible values\n * @property {number} [maxRanges] The maximum amount of ranges to request in a single multi-range request.\n * By default only a single range is used.\n * @property {boolean} [allowFullFile=false] Whether or not a full file is accepted when only a portion is\n * requested. Only use this when you know the source image to be small enough to fit in memory.\n * @property {number} [blockSize=65536] The block size to use.\n * @property {number} [cacheSize=100] The number of blocks that shall be held in a LRU cache.\n */\n\n/**\n * @typedef {Object} Options\n * @property {Array} sources List of information about GeoTIFF sources.\n * Multiple sources can be combined when their resolution sets are equal after applying a scale.\n * The list of sources defines a mapping between input bands as they are read from each GeoTIFF and\n * the output bands that are provided by data tiles. To control which bands to read from each GeoTIFF,\n * use the {@link import(\"./GeoTIFF.js\").SourceInfo bands} property. If, for example, you specify two\n * sources, one with 3 bands and {@link import(\"./GeoTIFF.js\").SourceInfo nodata} configured, and\n * another with 1 band, the resulting data tiles will have 5 bands: 3 from the first source, 1 alpha\n * band from the first source, and 1 band from the second source.\n * @property {GeoTIFFSourceOptions} [sourceOptions] Additional options to be passed to [geotiff.js](https://geotiffjs.github.io/geotiff.js/module-geotiff.html)'s `fromUrl` or `fromUrls` methods.\n * @property {true|false|'auto'} [convertToRGB=false] By default, bands from the sources are read as-is. When\n * reading GeoTIFFs with the purpose of displaying them as RGB images, setting this to `true` will\n * convert other color spaces (YCbCr, CMYK) to RGB. Setting the option to `'auto'` will make it so CMYK, YCbCr,\n * CIELab, and ICCLab images will automatically be converted to RGB.\n * @property {boolean} [normalize=true] By default, the source data is normalized to values between\n * 0 and 1 with scaling factors based on the raster statistics or `min` and `max` properties of each source.\n * If instead you want to work with the raw values in a style expression, set this to `false`. Setting this option\n * to `false` will make it so any `min` and `max` properties on sources are ignored.\n * @property {boolean} [opaque=false] Whether the layer is opaque.\n * @property {number} [transition=250] Duration of the opacity transition for rendering.\n * To disable the opacity transition, pass `transition: 0`.\n * @property {boolean} [wrapX=false] Render tiles beyond the tile grid extent.\n * @property {boolean} [interpolate=true] Use interpolated values when resampling. By default,\n * the linear interpolation is used to resample the data. If false, nearest neighbor is used.\n */\n\n/**\n * @classdesc\n * A source for working with GeoTIFF data.\n * **Note for users of the full build**: The `GeoTIFF` source requires the\n * [geotiff.js](https://github.com/geotiffjs/geotiff.js) library to be loaded as well.\n *\n * @api\n */\nclass GeoTIFFSource extends DataTile {\n /**\n * @param {Options} options Data tile options.\n */\n constructor(options) {\n super({\n state: 'loading',\n tileGrid: null,\n projection: null,\n opaque: options.opaque,\n transition: options.transition,\n interpolate: options.interpolate !== false,\n wrapX: options.wrapX,\n });\n\n /**\n * @type {Array}\n * @private\n */\n this.sourceInfo_ = options.sources;\n\n const numSources = this.sourceInfo_.length;\n\n /**\n * @type {Object}\n * @private\n */\n this.sourceOptions_ = options.sourceOptions;\n\n /**\n * @type {Array>}\n * @private\n */\n this.sourceImagery_ = new Array(numSources);\n\n /**\n * @type {Array>}\n * @private\n */\n this.sourceMasks_ = new Array(numSources);\n\n /**\n * @type {Array}\n * @private\n */\n this.resolutionFactors_ = new Array(numSources);\n\n /**\n * @type {Array}\n * @private\n */\n this.samplesPerPixel_;\n\n /**\n * @type {Array>}\n * @private\n */\n this.nodataValues_;\n\n /**\n * @type {Array>}\n * @private\n */\n this.metadata_;\n\n /**\n * @type {boolean}\n * @private\n */\n this.normalize_ = options.normalize !== false;\n\n /**\n * @type {boolean}\n * @private\n */\n this.addAlpha_ = false;\n\n /**\n * @type {Error}\n * @private\n */\n this.error_ = null;\n\n /**\n * @type {true|false|'auto'}\n */\n this.convertToRGB_ = options.convertToRGB || false;\n\n this.setKey(this.sourceInfo_.map((source) => source.url).join(','));\n\n const self = this;\n const requests = new Array(numSources);\n for (let i = 0; i < numSources; ++i) {\n requests[i] = getImagesForSource(\n this.sourceInfo_[i],\n this.sourceOptions_\n );\n }\n Promise.all(requests)\n .then(function (sources) {\n self.configure_(sources);\n })\n .catch(function (error) {\n logError(error);\n self.error_ = error;\n self.setState('error');\n });\n }\n\n /**\n * @return {Error} A source loading error. When the source state is `error`, use this function\n * to get more information about the error. To debug a faulty configuration, you may want to use\n * a listener like\n * ```js\n * geotiffSource.on('change', () => {\n * if (geotiffSource.getState() === 'error') {\n * console.error(geotiffSource.getError());\n * }\n * });\n * ```\n */\n getError() {\n return this.error_;\n }\n\n /**\n * Determine the projection of the images in this GeoTIFF.\n * The default implementation looks at the ProjectedCSTypeGeoKey and the GeographicTypeGeoKey\n * of each image in turn.\n * You can override this method in a subclass to support more projections.\n *\n * @param {Array>} sources Each source is a list of images\n * from a single GeoTIFF.\n */\n determineProjection(sources) {\n const firstSource = sources[0];\n for (let i = firstSource.length - 1; i >= 0; --i) {\n const image = firstSource[i];\n const projection = getProjection(image);\n if (projection) {\n this.projection = projection;\n break;\n }\n }\n }\n\n /**\n * Configure the tile grid based on images within the source GeoTIFFs. Each GeoTIFF\n * must have the same internal tiled structure.\n * @param {Array>} sources Each source is a list of images\n * from a single GeoTIFF.\n * @private\n */\n configure_(sources) {\n let extent;\n let origin;\n let commonRenderTileSizes;\n let commonSourceTileSizes;\n let resolutions;\n const samplesPerPixel = new Array(sources.length);\n const nodataValues = new Array(sources.length);\n const metadata = new Array(sources.length);\n let minZoom = 0;\n\n const sourceCount = sources.length;\n for (let sourceIndex = 0; sourceIndex < sourceCount; ++sourceIndex) {\n const images = [];\n const masks = [];\n sources[sourceIndex].forEach((item) => {\n if (isMask(item)) {\n masks.push(item);\n } else {\n images.push(item);\n }\n });\n\n const imageCount = images.length;\n if (masks.length > 0 && masks.length !== imageCount) {\n throw new Error(\n `Expected one mask per image found ${masks.length} masks and ${imageCount} images`\n );\n }\n\n let sourceExtent;\n let sourceOrigin;\n const sourceTileSizes = new Array(imageCount);\n const renderTileSizes = new Array(imageCount);\n const sourceResolutions = new Array(imageCount);\n\n nodataValues[sourceIndex] = new Array(imageCount);\n metadata[sourceIndex] = new Array(imageCount);\n\n for (let imageIndex = 0; imageIndex < imageCount; ++imageIndex) {\n const image = images[imageIndex];\n const nodataValue = image.getGDALNoData();\n metadata[sourceIndex][imageIndex] = image.getGDALMetadata(0);\n nodataValues[sourceIndex][imageIndex] = nodataValue;\n\n const wantedSamples = this.sourceInfo_[sourceIndex].bands;\n samplesPerPixel[sourceIndex] = wantedSamples\n ? wantedSamples.length\n : image.getSamplesPerPixel();\n const level = imageCount - (imageIndex + 1);\n\n if (!sourceExtent) {\n sourceExtent = getBoundingBox(image);\n }\n\n if (!sourceOrigin) {\n sourceOrigin = getOrigin(image);\n }\n\n const imageResolutions = getResolutions(image, images[0]);\n sourceResolutions[level] = imageResolutions[0];\n\n const sourceTileSize = [image.getTileWidth(), image.getTileHeight()];\n\n // request larger blocks for untiled layouts\n if (\n sourceTileSize[0] !== sourceTileSize[1] &&\n sourceTileSize[1] < defaultTileSize\n ) {\n sourceTileSize[0] = defaultTileSize;\n sourceTileSize[1] = defaultTileSize;\n }\n\n sourceTileSizes[level] = sourceTileSize;\n\n const aspectRatio = imageResolutions[0] / Math.abs(imageResolutions[1]);\n renderTileSizes[level] = [\n sourceTileSize[0],\n sourceTileSize[1] / aspectRatio,\n ];\n }\n\n if (!extent) {\n extent = sourceExtent;\n } else {\n getIntersection(extent, sourceExtent, extent);\n }\n\n if (!origin) {\n origin = sourceOrigin;\n } else {\n const message = `Origin mismatch for source ${sourceIndex}, got [${sourceOrigin}] but expected [${origin}]`;\n assertEqual(origin, sourceOrigin, 0, message, this.viewRejector);\n }\n\n if (!resolutions) {\n resolutions = sourceResolutions;\n this.resolutionFactors_[sourceIndex] = 1;\n } else {\n if (resolutions.length - minZoom > sourceResolutions.length) {\n minZoom = resolutions.length - sourceResolutions.length;\n }\n const resolutionFactor =\n resolutions[resolutions.length - 1] /\n sourceResolutions[sourceResolutions.length - 1];\n this.resolutionFactors_[sourceIndex] = resolutionFactor;\n const scaledSourceResolutions = sourceResolutions.map(\n (resolution) => (resolution *= resolutionFactor)\n );\n const message = `Resolution mismatch for source ${sourceIndex}, got [${scaledSourceResolutions}] but expected [${resolutions}]`;\n assertEqual(\n resolutions.slice(minZoom, resolutions.length),\n scaledSourceResolutions,\n 0.02,\n message,\n this.viewRejector\n );\n }\n\n if (!commonRenderTileSizes) {\n commonRenderTileSizes = renderTileSizes;\n } else {\n assertEqual(\n commonRenderTileSizes.slice(minZoom, commonRenderTileSizes.length),\n renderTileSizes,\n 0.01,\n `Tile size mismatch for source ${sourceIndex}`,\n this.viewRejector\n );\n }\n\n if (!commonSourceTileSizes) {\n commonSourceTileSizes = sourceTileSizes;\n } else {\n assertEqual(\n commonSourceTileSizes.slice(minZoom, commonSourceTileSizes.length),\n sourceTileSizes,\n 0,\n `Tile size mismatch for source ${sourceIndex}`,\n this.viewRejector\n );\n }\n\n this.sourceImagery_[sourceIndex] = images.reverse();\n this.sourceMasks_[sourceIndex] = masks.reverse();\n }\n\n for (let i = 0, ii = this.sourceImagery_.length; i < ii; ++i) {\n const sourceImagery = this.sourceImagery_[i];\n while (sourceImagery.length < resolutions.length) {\n sourceImagery.unshift(undefined);\n }\n }\n\n if (!this.getProjection()) {\n this.determineProjection(sources);\n }\n\n this.samplesPerPixel_ = samplesPerPixel;\n this.nodataValues_ = nodataValues;\n this.metadata_ = metadata;\n\n // decide if we need to add an alpha band to handle nodata\n outer: for (let sourceIndex = 0; sourceIndex < sourceCount; ++sourceIndex) {\n // option 1: source is configured with a nodata value\n if (this.sourceInfo_[sourceIndex].nodata !== undefined) {\n this.addAlpha_ = true;\n break;\n }\n if (this.sourceMasks_[sourceIndex].length) {\n this.addAlpha_ = true;\n break;\n }\n\n const values = nodataValues[sourceIndex];\n\n // option 2: check image metadata for limited bands\n const bands = this.sourceInfo_[sourceIndex].bands;\n if (bands) {\n for (let i = 0; i < bands.length; ++i) {\n if (values[bands[i] - 1] !== null) {\n this.addAlpha_ = true;\n break outer;\n }\n }\n continue;\n }\n\n // option 3: check image metadata for all bands\n for (let imageIndex = 0; imageIndex < values.length; ++imageIndex) {\n if (values[imageIndex] !== null) {\n this.addAlpha_ = true;\n break outer;\n }\n }\n }\n\n let bandCount = this.addAlpha_ ? 1 : 0;\n for (let sourceIndex = 0; sourceIndex < sourceCount; ++sourceIndex) {\n bandCount += samplesPerPixel[sourceIndex];\n }\n this.bandCount = bandCount;\n\n const tileGrid = new TileGrid({\n extent: extent,\n minZoom: minZoom,\n origin: origin,\n resolutions: resolutions,\n tileSizes: commonRenderTileSizes,\n });\n\n this.tileGrid = tileGrid;\n this.setTileSizes(commonSourceTileSizes);\n\n this.setLoader(this.loadTile_.bind(this));\n this.setState('ready');\n\n const zoom = 1;\n if (resolutions.length === 2) {\n resolutions = [resolutions[0], resolutions[1], resolutions[1] / 2];\n } else if (resolutions.length === 1) {\n resolutions = [resolutions[0] * 2, resolutions[0], resolutions[0] / 2];\n }\n\n this.viewResolver({\n showFullExtent: true,\n projection: this.projection,\n resolutions: resolutions,\n center: toUserCoordinate(getCenter(extent), this.projection),\n extent: toUserExtent(extent, this.projection),\n zoom: zoom,\n });\n }\n\n /**\n * @param {number} z The z tile index.\n * @param {number} x The x tile index.\n * @param {number} y The y tile index.\n * @return {Promise} The composed tile data.\n * @private\n */\n loadTile_(z, x, y) {\n const sourceTileSize = this.getTileSize(z);\n const sourceCount = this.sourceImagery_.length;\n const requests = new Array(sourceCount * 2);\n const nodataValues = this.nodataValues_;\n const sourceInfo = this.sourceInfo_;\n const pool = getWorkerPool();\n for (let sourceIndex = 0; sourceIndex < sourceCount; ++sourceIndex) {\n const source = sourceInfo[sourceIndex];\n const resolutionFactor = this.resolutionFactors_[sourceIndex];\n const pixelBounds = [\n Math.round(x * (sourceTileSize[0] * resolutionFactor)),\n Math.round(y * (sourceTileSize[1] * resolutionFactor)),\n Math.round((x + 1) * (sourceTileSize[0] * resolutionFactor)),\n Math.round((y + 1) * (sourceTileSize[1] * resolutionFactor)),\n ];\n const image = this.sourceImagery_[sourceIndex][z];\n let samples;\n if (source.bands) {\n samples = source.bands.map(function (bandNumber) {\n return bandNumber - 1;\n });\n }\n\n /** @type {number|Array} */\n let fillValue;\n if ('nodata' in source && source.nodata !== null) {\n fillValue = source.nodata;\n } else {\n if (!samples) {\n fillValue = nodataValues[sourceIndex];\n } else {\n fillValue = samples.map(function (sampleIndex) {\n return nodataValues[sourceIndex][sampleIndex];\n });\n }\n }\n\n const readOptions = {\n window: pixelBounds,\n width: sourceTileSize[0],\n height: sourceTileSize[1],\n samples: samples,\n fillValue: fillValue,\n pool: pool,\n interleave: false,\n };\n if (readRGB(this.convertToRGB_, image)) {\n requests[sourceIndex] = image.readRGB(readOptions);\n } else {\n requests[sourceIndex] = image.readRasters(readOptions);\n }\n\n // requests after `sourceCount` are for mask data (if any)\n const maskIndex = sourceCount + sourceIndex;\n const mask = this.sourceMasks_[sourceIndex][z];\n if (!mask) {\n requests[maskIndex] = Promise.resolve(null);\n continue;\n }\n\n requests[maskIndex] = mask.readRasters({\n window: pixelBounds,\n width: sourceTileSize[0],\n height: sourceTileSize[1],\n samples: [0],\n pool: pool,\n interleave: false,\n });\n }\n\n return Promise.all(requests)\n .then(this.composeTile_.bind(this, sourceTileSize))\n .catch(function (error) {\n logError(error);\n throw error;\n });\n }\n\n /**\n * @param {import(\"../size.js\").Size} sourceTileSize The source tile size.\n * @param {Array} sourceSamples The source samples.\n * @return {import(\"../DataTile.js\").Data} The composed tile data.\n * @private\n */\n composeTile_(sourceTileSize, sourceSamples) {\n const metadata = this.metadata_;\n const sourceInfo = this.sourceInfo_;\n const sourceCount = this.sourceImagery_.length;\n const bandCount = this.bandCount;\n const samplesPerPixel = this.samplesPerPixel_;\n const nodataValues = this.nodataValues_;\n const normalize = this.normalize_;\n const addAlpha = this.addAlpha_;\n\n const pixelCount = sourceTileSize[0] * sourceTileSize[1];\n const dataLength = pixelCount * bandCount;\n\n /** @type {Uint8Array|Float32Array} */\n let data;\n if (normalize) {\n data = new Uint8Array(dataLength);\n } else {\n data = new Float32Array(dataLength);\n }\n\n let dataIndex = 0;\n for (let pixelIndex = 0; pixelIndex < pixelCount; ++pixelIndex) {\n let transparent = addAlpha;\n for (let sourceIndex = 0; sourceIndex < sourceCount; ++sourceIndex) {\n const source = sourceInfo[sourceIndex];\n\n let min = source.min;\n let max = source.max;\n let gain, bias;\n if (normalize) {\n const stats = metadata[sourceIndex][0];\n if (min === undefined) {\n if (stats && STATISTICS_MINIMUM in stats) {\n min = parseFloat(stats[STATISTICS_MINIMUM]);\n } else {\n min = getMinForDataType(sourceSamples[sourceIndex][0]);\n }\n }\n if (max === undefined) {\n if (stats && STATISTICS_MAXIMUM in stats) {\n max = parseFloat(stats[STATISTICS_MAXIMUM]);\n } else {\n max = getMaxForDataType(sourceSamples[sourceIndex][0]);\n }\n }\n\n gain = 255 / (max - min);\n bias = -min * gain;\n }\n\n for (\n let sampleIndex = 0;\n sampleIndex < samplesPerPixel[sourceIndex];\n ++sampleIndex\n ) {\n const sourceValue =\n sourceSamples[sourceIndex][sampleIndex][pixelIndex];\n\n let value;\n if (normalize) {\n value = clamp(gain * sourceValue + bias, 0, 255);\n } else {\n value = sourceValue;\n }\n\n if (!addAlpha) {\n data[dataIndex] = value;\n } else {\n let nodata = source.nodata;\n if (nodata === undefined) {\n let bandIndex;\n if (source.bands) {\n bandIndex = source.bands[sampleIndex] - 1;\n } else {\n bandIndex = sampleIndex;\n }\n nodata = nodataValues[sourceIndex][bandIndex];\n }\n\n const nodataIsNaN = isNaN(nodata);\n if (\n (!nodataIsNaN && sourceValue !== nodata) ||\n (nodataIsNaN && !isNaN(sourceValue))\n ) {\n transparent = false;\n data[dataIndex] = value;\n }\n }\n dataIndex++;\n }\n if (!transparent) {\n const maskIndex = sourceCount + sourceIndex;\n const mask = sourceSamples[maskIndex];\n if (mask && !mask[0][pixelIndex]) {\n transparent = true;\n }\n }\n }\n if (addAlpha) {\n if (!transparent) {\n data[dataIndex] = 255;\n }\n dataIndex++;\n }\n }\n\n return data;\n }\n}\n\n/**\n * Get a promise for view properties based on the source. Use the result of this function\n * as the `view` option in a map constructor.\n *\n * const source = new GeoTIFF(options);\n *\n * const map = new Map({\n * target: 'map',\n * layers: [\n * new TileLayer({\n * source: source,\n * }),\n * ],\n * view: source.getView(),\n * });\n *\n * @function\n * @return {Promise} A promise for view-related properties.\n * @api\n *\n */\nGeoTIFFSource.prototype.getView;\n\nexport default GeoTIFFSource;\n","/**\n * @module ol/source/Zoomify\n */\nimport {DEFAULT_TILE_SIZE} from '../tilegrid/common.js';\n\nimport ImageTile from '../ImageTile.js';\nimport TileGrid from '../tilegrid/TileGrid.js';\nimport TileImage from './TileImage.js';\nimport TileState from '../TileState.js';\nimport {assert} from '../asserts.js';\nimport {createCanvasContext2D} from '../dom.js';\nimport {createFromTileUrlFunctions, expandUrl} from '../tileurlfunction.js';\nimport {getCenter} from '../extent.js';\nimport {toSize} from '../size.js';\n\n/**\n * @typedef {'default' | 'truncated'} TierSizeCalculation\n */\n\nexport class CustomTile extends ImageTile {\n /**\n * @param {import(\"../size.js\").Size} tileSize Full tile size.\n * @param {import(\"../tilecoord.js\").TileCoord} tileCoord Tile coordinate.\n * @param {import(\"../TileState.js\").default} state State.\n * @param {string} src Image source URI.\n * @param {?string} crossOrigin Cross origin.\n * @param {import(\"../Tile.js\").LoadFunction} tileLoadFunction Tile load function.\n * @param {import(\"../Tile.js\").Options} [options] Tile options.\n */\n constructor(\n tileSize,\n tileCoord,\n state,\n src,\n crossOrigin,\n tileLoadFunction,\n options\n ) {\n super(tileCoord, state, src, crossOrigin, tileLoadFunction, options);\n\n /**\n * @private\n * @type {HTMLCanvasElement|HTMLImageElement|HTMLVideoElement}\n */\n this.zoomifyImage_ = null;\n\n /**\n * @type {import(\"../size.js\").Size}\n */\n this.tileSize_ = tileSize;\n }\n\n /**\n * Get the image element for this tile.\n * @return {HTMLCanvasElement|HTMLImageElement|HTMLVideoElement} Image.\n */\n getImage() {\n if (this.zoomifyImage_) {\n return this.zoomifyImage_;\n }\n const image = super.getImage();\n if (this.state == TileState.LOADED) {\n const tileSize = this.tileSize_;\n if (image.width == tileSize[0] && image.height == tileSize[1]) {\n this.zoomifyImage_ = image;\n return image;\n }\n const context = createCanvasContext2D(tileSize[0], tileSize[1]);\n context.drawImage(image, 0, 0);\n this.zoomifyImage_ = context.canvas;\n return context.canvas;\n }\n return image;\n }\n}\n\n/**\n * @typedef {Object} Options\n * @property {import(\"./Source.js\").AttributionLike} [attributions] Attributions.\n * @property {number} [cacheSize] Initial tile cache size. Will auto-grow to hold at least the number of tiles in the viewport.\n * @property {null|string} [crossOrigin] The `crossOrigin` attribute for loaded images. Note that\n * you must provide a `crossOrigin` value you want to access pixel data with the Canvas renderer.\n * See https://developer.mozilla.org/en-US/docs/Web/HTML/CORS_enabled_image for more detail.\n * @property {boolean} [interpolate=true] Use interpolated values when resampling. By default,\n * linear interpolation is used when resampling. Set to false to use the nearest neighbor instead.\n * @property {import(\"../proj.js\").ProjectionLike} [projection] Projection.\n * @property {number} [tilePixelRatio] The pixel ratio used by the tile service. For example, if the tile service advertizes 256px by 256px tiles but actually sends 512px by 512px images (for retina/hidpi devices) then `tilePixelRatio` should be set to `2`\n * @property {number} [reprojectionErrorThreshold=0.5] Maximum allowed reprojection error (in pixels).\n * Higher values can increase reprojection performance, but decrease precision.\n * @property {string} url URL template or base URL of the Zoomify service.\n * A base URL is the fixed part\n * of the URL, excluding the tile group, z, x, and y folder structure, e.g.\n * `http://my.zoomify.info/IMAGE.TIF/`. A URL template must include\n * `{TileGroup}`, `{x}`, `{y}`, and `{z}` placeholders, e.g.\n * `http://my.zoomify.info/IMAGE.TIF/{TileGroup}/{z}-{x}-{y}.jpg`.\n * Internet Imaging Protocol (IIP) with JTL extension can be also used with\n * `{tileIndex}` and `{z}` placeholders, e.g.\n * `http://my.zoomify.info?FIF=IMAGE.TIF&JTL={z},{tileIndex}`.\n * A `{?-?}` template pattern, for example `subdomain{a-f}.domain.com`, may be\n * used instead of defining each one separately in the `urls` option.\n * @property {TierSizeCalculation} [tierSizeCalculation] Tier size calculation method: `default` or `truncated`.\n * @property {import(\"../size.js\").Size} size Size.\n * @property {import(\"../extent.js\").Extent} [extent] Extent for the TileGrid that is created.\n * Default sets the TileGrid in the\n * fourth quadrant, meaning extent is `[0, -height, width, 0]`. To change the\n * extent to the first quadrant (the default for OpenLayers 2) set the extent\n * as `[0, 0, width, height]`.\n * @property {number} [transition] Duration of the opacity transition for rendering.\n * To disable the opacity transition, pass `transition: 0`.\n * @property {number} [tileSize=256] Tile size. Same tile size is used for all zoom levels.\n * @property {number|import(\"../array.js\").NearestDirectionFunction} [zDirection=0]\n * Choose whether to use tiles with a higher or lower zoom level when between integer\n * zoom levels. See {@link module:ol/tilegrid/TileGrid~TileGrid#getZForResolution}.\n */\n\n/**\n * @classdesc\n * Layer source for tile data in Zoomify format (both Zoomify and Internet\n * Imaging Protocol are supported).\n * @api\n */\nclass Zoomify extends TileImage {\n /**\n * @param {Options} options Options.\n */\n constructor(options) {\n const size = options.size;\n const tierSizeCalculation =\n options.tierSizeCalculation !== undefined\n ? options.tierSizeCalculation\n : 'default';\n\n const tilePixelRatio = options.tilePixelRatio || 1;\n const imageWidth = size[0];\n const imageHeight = size[1];\n const tierSizeInTiles = [];\n const tileSize = options.tileSize || DEFAULT_TILE_SIZE;\n let tileSizeForTierSizeCalculation = tileSize * tilePixelRatio;\n\n switch (tierSizeCalculation) {\n case 'default':\n while (\n imageWidth > tileSizeForTierSizeCalculation ||\n imageHeight > tileSizeForTierSizeCalculation\n ) {\n tierSizeInTiles.push([\n Math.ceil(imageWidth / tileSizeForTierSizeCalculation),\n Math.ceil(imageHeight / tileSizeForTierSizeCalculation),\n ]);\n tileSizeForTierSizeCalculation += tileSizeForTierSizeCalculation;\n }\n break;\n case 'truncated':\n let width = imageWidth;\n let height = imageHeight;\n while (\n width > tileSizeForTierSizeCalculation ||\n height > tileSizeForTierSizeCalculation\n ) {\n tierSizeInTiles.push([\n Math.ceil(width / tileSizeForTierSizeCalculation),\n Math.ceil(height / tileSizeForTierSizeCalculation),\n ]);\n width >>= 1;\n height >>= 1;\n }\n break;\n default: // Unknown `tierSizeCalculation` configured\n assert(false, 53);\n break;\n }\n\n tierSizeInTiles.push([1, 1]);\n tierSizeInTiles.reverse();\n\n const resolutions = [tilePixelRatio];\n const tileCountUpToTier = [0];\n for (let i = 1, ii = tierSizeInTiles.length; i < ii; i++) {\n resolutions.push(tilePixelRatio << i);\n tileCountUpToTier.push(\n tierSizeInTiles[i - 1][0] * tierSizeInTiles[i - 1][1] +\n tileCountUpToTier[i - 1]\n );\n }\n resolutions.reverse();\n\n const tileGrid = new TileGrid({\n tileSize: tileSize,\n extent: options.extent || [0, -imageHeight, imageWidth, 0],\n resolutions: resolutions,\n });\n\n let url = options.url;\n if (url && !url.includes('{TileGroup}') && !url.includes('{tileIndex}')) {\n url += '{TileGroup}/{z}-{x}-{y}.jpg';\n }\n const urls = expandUrl(url);\n\n let tileWidth = tileSize * tilePixelRatio;\n\n /**\n * @param {string} template Template.\n * @return {import(\"../Tile.js\").UrlFunction} Tile URL function.\n */\n function createFromTemplate(template) {\n return (\n /**\n * @param {import(\"../tilecoord.js\").TileCoord} tileCoord Tile Coordinate.\n * @param {number} pixelRatio Pixel ratio.\n * @param {import(\"../proj/Projection.js\").default} projection Projection.\n * @return {string|undefined} Tile URL.\n */\n function (tileCoord, pixelRatio, projection) {\n if (!tileCoord) {\n return undefined;\n }\n const tileCoordZ = tileCoord[0];\n const tileCoordX = tileCoord[1];\n const tileCoordY = tileCoord[2];\n const tileIndex =\n tileCoordX + tileCoordY * tierSizeInTiles[tileCoordZ][0];\n const tileGroup =\n ((tileIndex + tileCountUpToTier[tileCoordZ]) / tileWidth) | 0;\n const localContext = {\n 'z': tileCoordZ,\n 'x': tileCoordX,\n 'y': tileCoordY,\n 'tileIndex': tileIndex,\n 'TileGroup': 'TileGroup' + tileGroup,\n };\n return template.replace(/\\{(\\w+?)\\}/g, function (m, p) {\n return localContext[p];\n });\n }\n );\n }\n\n const tileUrlFunction = createFromTileUrlFunctions(\n urls.map(createFromTemplate)\n );\n\n const ZoomifyTileClass = CustomTile.bind(\n null,\n toSize(tileSize * tilePixelRatio)\n );\n\n super({\n attributions: options.attributions,\n cacheSize: options.cacheSize,\n crossOrigin: options.crossOrigin,\n interpolate: options.interpolate,\n projection: options.projection,\n tilePixelRatio: tilePixelRatio,\n reprojectionErrorThreshold: options.reprojectionErrorThreshold,\n tileClass: ZoomifyTileClass,\n tileGrid: tileGrid,\n tileUrlFunction: tileUrlFunction,\n transition: options.transition,\n });\n\n /**\n * @type {number|import(\"../array.js\").NearestDirectionFunction}\n */\n this.zDirection = options.zDirection;\n\n // Server retina tile detection (non-standard):\n // Try loading the center tile for the highest resolution. If it is not\n // available, we are dealing with retina tiles, and need to adjust the\n // tile url calculation.\n const tileUrl = tileGrid.getTileCoordForCoordAndResolution(\n getCenter(tileGrid.getExtent()),\n resolutions[resolutions.length - 1]\n );\n const testTileUrl = tileUrlFunction(tileUrl, 1, null);\n const image = new Image();\n image.addEventListener('error', () => {\n tileWidth = tileSize;\n this.changed();\n });\n image.src = testTileUrl;\n }\n}\n\nexport default Zoomify;\n","/**\n * @module ol/format/IIIFInfo\n */\n\nimport {assert} from '../asserts.js';\n\n/**\n * @typedef {Object} PreferredOptions\n * @property {string} [format] Preferred image format. Will be used if the image information\n * indicates support for that format.\n * @property {string} [quality] IIIF image qualitiy. Will be used if the image information\n * indicates support for that quality.\n */\n\n/**\n * @typedef {Object} SupportedFeatures\n * @property {Array} [supports] Supported IIIF image size and region\n * calculation features.\n * @property {Array} [formats] Supported image formats.\n * @property {Array} [qualities] Supported IIIF image qualities.\n */\n\n/**\n * @typedef {Object} TileInfo\n * @property {Array} scaleFactors Supported resolution scaling factors.\n * @property {number} width Tile width in pixels.\n * @property {number} [height] Tile height in pixels. Same as tile width if height is\n * not given.\n */\n\n/**\n * @typedef {Object} IiifProfile\n * @property {Array} [formats] Supported image formats for the image service.\n * @property {Array} [qualities] Supported IIIF image qualities.\n * @property {Array} [supports] Supported features.\n * @property {number} [maxArea] Maximum area (pixels) available for this image service.\n * @property {number} [maxHeight] Maximum height.\n * @property {number} [maxWidth] Maximum width.\n */\n\n/**\n * @typedef {Object|TileInfo>>}\n * ImageInformationResponse\n */\n\n/**\n * Enum representing the major IIIF Image API versions\n * @enum {string}\n */\nexport const Versions = {\n VERSION1: 'version1',\n VERSION2: 'version2',\n VERSION3: 'version3',\n};\n\n/**\n * Supported image formats, qualities and supported region / size calculation features\n * for different image API versions and compliance levels\n * @const\n * @type {Object>}\n */\nconst IIIF_PROFILE_VALUES = {};\nIIIF_PROFILE_VALUES[Versions.VERSION1] = {\n 'level0': {\n supports: [],\n formats: [],\n qualities: ['native'],\n },\n 'level1': {\n supports: ['regionByPx', 'sizeByW', 'sizeByH', 'sizeByPct'],\n formats: ['jpg'],\n qualities: ['native'],\n },\n 'level2': {\n supports: [\n 'regionByPx',\n 'regionByPct',\n 'sizeByW',\n 'sizeByH',\n 'sizeByPct',\n 'sizeByConfinedWh',\n 'sizeByWh',\n ],\n formats: ['jpg', 'png'],\n qualities: ['native', 'color', 'grey', 'bitonal'],\n },\n};\nIIIF_PROFILE_VALUES[Versions.VERSION2] = {\n 'level0': {\n supports: [],\n formats: ['jpg'],\n qualities: ['default'],\n },\n 'level1': {\n supports: ['regionByPx', 'sizeByW', 'sizeByH', 'sizeByPct'],\n formats: ['jpg'],\n qualities: ['default'],\n },\n 'level2': {\n supports: [\n 'regionByPx',\n 'regionByPct',\n 'sizeByW',\n 'sizeByH',\n 'sizeByPct',\n 'sizeByConfinedWh',\n 'sizeByDistortedWh',\n 'sizeByWh',\n ],\n formats: ['jpg', 'png'],\n qualities: ['default', 'bitonal'],\n },\n};\nIIIF_PROFILE_VALUES[Versions.VERSION3] = {\n 'level0': {\n supports: [],\n formats: ['jpg'],\n qualities: ['default'],\n },\n 'level1': {\n supports: ['regionByPx', 'regionSquare', 'sizeByW', 'sizeByH', 'sizeByWh'],\n formats: ['jpg'],\n qualities: ['default'],\n },\n 'level2': {\n supports: [\n 'regionByPx',\n 'regionSquare',\n 'regionByPct',\n 'sizeByW',\n 'sizeByH',\n 'sizeByPct',\n 'sizeByConfinedWh',\n 'sizeByWh',\n ],\n formats: ['jpg', 'png'],\n qualities: ['default'],\n },\n};\nIIIF_PROFILE_VALUES['none'] = {\n 'none': {\n supports: [],\n formats: [],\n qualities: [],\n },\n};\n\nconst COMPLIANCE_VERSION1 =\n /^https?:\\/\\/library\\.stanford\\.edu\\/iiif\\/image-api\\/(?:1\\.1\\/)?compliance\\.html#level[0-2]$/;\nconst COMPLIANCE_VERSION2 =\n /^https?:\\/\\/iiif\\.io\\/api\\/image\\/2\\/level[0-2](?:\\.json)?$/;\nconst COMPLIANCE_VERSION3 =\n /(^https?:\\/\\/iiif\\.io\\/api\\/image\\/3\\/level[0-2](?:\\.json)?$)|(^level[0-2]$)/;\n\nfunction generateVersion1Options(iiifInfo) {\n let levelProfile = iiifInfo.getComplianceLevelSupportedFeatures();\n // Version 1.0 and 1.1 do not require a profile.\n if (levelProfile === undefined) {\n levelProfile = IIIF_PROFILE_VALUES[Versions.VERSION1]['level0'];\n }\n return {\n url:\n iiifInfo.imageInfo['@id'] === undefined\n ? undefined\n : iiifInfo.imageInfo['@id'].replace(/\\/?(?:info\\.json)?$/g, ''),\n supports: levelProfile.supports,\n formats: [\n ...levelProfile.formats,\n iiifInfo.imageInfo.formats === undefined\n ? []\n : iiifInfo.imageInfo.formats,\n ],\n qualities: [\n ...levelProfile.qualities,\n iiifInfo.imageInfo.qualities === undefined\n ? []\n : iiifInfo.imageInfo.qualities,\n ],\n resolutions: iiifInfo.imageInfo.scale_factors,\n tileSize:\n iiifInfo.imageInfo.tile_width !== undefined\n ? iiifInfo.imageInfo.tile_height !== undefined\n ? [iiifInfo.imageInfo.tile_width, iiifInfo.imageInfo.tile_height]\n : [iiifInfo.imageInfo.tile_width, iiifInfo.imageInfo.tile_width]\n : iiifInfo.imageInfo.tile_height != undefined\n ? [iiifInfo.imageInfo.tile_height, iiifInfo.imageInfo.tile_height]\n : undefined,\n };\n}\n\nfunction generateVersion2Options(iiifInfo) {\n const levelProfile = iiifInfo.getComplianceLevelSupportedFeatures(),\n additionalProfile =\n Array.isArray(iiifInfo.imageInfo.profile) &&\n iiifInfo.imageInfo.profile.length > 1,\n profileSupports =\n additionalProfile && iiifInfo.imageInfo.profile[1].supports\n ? iiifInfo.imageInfo.profile[1].supports\n : [],\n profileFormats =\n additionalProfile && iiifInfo.imageInfo.profile[1].formats\n ? iiifInfo.imageInfo.profile[1].formats\n : [],\n profileQualities =\n additionalProfile && iiifInfo.imageInfo.profile[1].qualities\n ? iiifInfo.imageInfo.profile[1].qualities\n : [];\n return {\n url: iiifInfo.imageInfo['@id'].replace(/\\/?(?:info\\.json)?$/g, ''),\n sizes:\n iiifInfo.imageInfo.sizes === undefined\n ? undefined\n : iiifInfo.imageInfo.sizes.map(function (size) {\n return [size.width, size.height];\n }),\n tileSize:\n iiifInfo.imageInfo.tiles === undefined\n ? undefined\n : [\n iiifInfo.imageInfo.tiles.map(function (tile) {\n return tile.width;\n })[0],\n iiifInfo.imageInfo.tiles.map(function (tile) {\n return tile.height === undefined ? tile.width : tile.height;\n })[0],\n ],\n resolutions:\n iiifInfo.imageInfo.tiles === undefined\n ? undefined\n : iiifInfo.imageInfo.tiles.map(function (tile) {\n return tile.scaleFactors;\n })[0],\n supports: [...levelProfile.supports, ...profileSupports],\n formats: [...levelProfile.formats, ...profileFormats],\n qualities: [...levelProfile.qualities, ...profileQualities],\n };\n}\n\nfunction generateVersion3Options(iiifInfo) {\n const levelProfile = iiifInfo.getComplianceLevelSupportedFeatures(),\n formats =\n iiifInfo.imageInfo.extraFormats === undefined\n ? levelProfile.formats\n : [...levelProfile.formats, ...iiifInfo.imageInfo.extraFormats],\n preferredFormat =\n iiifInfo.imageInfo.preferredFormats !== undefined &&\n Array.isArray(iiifInfo.imageInfo.preferredFormats) &&\n iiifInfo.imageInfo.preferredFormats.length > 0\n ? iiifInfo.imageInfo.preferredFormats\n .filter(function (format) {\n return ['jpg', 'png', 'gif'].includes(format);\n })\n .reduce(function (acc, format) {\n return acc === undefined && formats.includes(format)\n ? format\n : acc;\n }, undefined)\n : undefined;\n return {\n url: iiifInfo.imageInfo['id'],\n sizes:\n iiifInfo.imageInfo.sizes === undefined\n ? undefined\n : iiifInfo.imageInfo.sizes.map(function (size) {\n return [size.width, size.height];\n }),\n tileSize:\n iiifInfo.imageInfo.tiles === undefined\n ? undefined\n : [\n iiifInfo.imageInfo.tiles.map(function (tile) {\n return tile.width;\n })[0],\n iiifInfo.imageInfo.tiles.map(function (tile) {\n return tile.height;\n })[0],\n ],\n resolutions:\n iiifInfo.imageInfo.tiles === undefined\n ? undefined\n : iiifInfo.imageInfo.tiles.map(function (tile) {\n return tile.scaleFactors;\n })[0],\n supports:\n iiifInfo.imageInfo.extraFeatures === undefined\n ? levelProfile.supports\n : [...levelProfile.supports, ...iiifInfo.imageInfo.extraFeatures],\n formats: formats,\n qualities:\n iiifInfo.imageInfo.extraQualities === undefined\n ? levelProfile.qualities\n : [...levelProfile.qualities, ...iiifInfo.imageInfo.extraQualities],\n preferredFormat: preferredFormat,\n };\n}\n\nconst versionFunctions = {};\nversionFunctions[Versions.VERSION1] = generateVersion1Options;\nversionFunctions[Versions.VERSION2] = generateVersion2Options;\nversionFunctions[Versions.VERSION3] = generateVersion3Options;\n\n/**\n * @classdesc\n * Format for transforming IIIF Image API image information responses into\n * IIIF tile source ready options\n *\n * @api\n */\nclass IIIFInfo {\n /**\n * @param {string|ImageInformationResponse} imageInfo\n * Deserialized image information JSON response object or JSON response as string\n */\n constructor(imageInfo) {\n this.setImageInfo(imageInfo);\n }\n\n /**\n * @param {string|ImageInformationResponse} imageInfo\n * Deserialized image information JSON response object or JSON response as string\n * @api\n */\n setImageInfo(imageInfo) {\n if (typeof imageInfo == 'string') {\n this.imageInfo = JSON.parse(imageInfo);\n } else {\n this.imageInfo = imageInfo;\n }\n }\n\n /**\n * @return {Versions} Major IIIF version.\n * @api\n */\n getImageApiVersion() {\n if (this.imageInfo === undefined) {\n return;\n }\n let context = this.imageInfo['@context'] || 'ol-no-context';\n if (typeof context == 'string') {\n context = [context];\n }\n for (let i = 0; i < context.length; i++) {\n switch (context[i]) {\n case 'http://library.stanford.edu/iiif/image-api/1.1/context.json':\n case 'http://iiif.io/api/image/1/context.json':\n return Versions.VERSION1;\n case 'http://iiif.io/api/image/2/context.json':\n return Versions.VERSION2;\n case 'http://iiif.io/api/image/3/context.json':\n return Versions.VERSION3;\n case 'ol-no-context':\n // Image API 1.0 has no '@context'\n if (\n this.getComplianceLevelEntryFromProfile(Versions.VERSION1) &&\n this.imageInfo.identifier\n ) {\n return Versions.VERSION1;\n }\n break;\n default:\n }\n }\n assert(false, 61);\n }\n\n /**\n * @param {Versions} version Optional IIIF image API version\n * @return {string} Compliance level as it appears in the IIIF image information\n * response.\n */\n getComplianceLevelEntryFromProfile(version) {\n if (this.imageInfo === undefined || this.imageInfo.profile === undefined) {\n return;\n }\n if (version === undefined) {\n version = this.getImageApiVersion();\n }\n switch (version) {\n case Versions.VERSION1:\n if (COMPLIANCE_VERSION1.test(this.imageInfo.profile)) {\n return this.imageInfo.profile;\n }\n break;\n case Versions.VERSION3:\n if (COMPLIANCE_VERSION3.test(this.imageInfo.profile)) {\n return this.imageInfo.profile;\n }\n break;\n case Versions.VERSION2:\n if (\n typeof this.imageInfo.profile === 'string' &&\n COMPLIANCE_VERSION2.test(this.imageInfo.profile)\n ) {\n return this.imageInfo.profile;\n }\n if (\n Array.isArray(this.imageInfo.profile) &&\n this.imageInfo.profile.length > 0 &&\n typeof this.imageInfo.profile[0] === 'string' &&\n COMPLIANCE_VERSION2.test(this.imageInfo.profile[0])\n ) {\n return this.imageInfo.profile[0];\n }\n break;\n default:\n }\n }\n\n /**\n * @param {Versions} version Optional IIIF image API version\n * @return {string} Compliance level, on of 'level0', 'level1' or 'level2' or undefined\n */\n getComplianceLevelFromProfile(version) {\n const complianceLevel = this.getComplianceLevelEntryFromProfile(version);\n if (complianceLevel === undefined) {\n return undefined;\n }\n const level = complianceLevel.match(/level[0-2](?:\\.json)?$/g);\n return Array.isArray(level) ? level[0].replace('.json', '') : undefined;\n }\n\n /**\n * @return {SupportedFeatures} Image formats, qualities and region / size calculation\n * methods that are supported by the IIIF service.\n */\n getComplianceLevelSupportedFeatures() {\n if (this.imageInfo === undefined) {\n return;\n }\n const version = this.getImageApiVersion();\n const level = this.getComplianceLevelFromProfile(version);\n if (level === undefined) {\n return IIIF_PROFILE_VALUES['none']['none'];\n }\n return IIIF_PROFILE_VALUES[version][level];\n }\n\n /**\n * @param {PreferredOptions} [preferredOptions] Optional options for preferred format and quality.\n * @return {import(\"../source/IIIF.js\").Options} IIIF tile source ready constructor options.\n * @api\n */\n getTileSourceOptions(preferredOptions) {\n const options = preferredOptions || {},\n version = this.getImageApiVersion();\n if (version === undefined) {\n return;\n }\n const imageOptions =\n version === undefined ? undefined : versionFunctions[version](this);\n if (imageOptions === undefined) {\n return;\n }\n return {\n url: imageOptions.url,\n version: version,\n size: [this.imageInfo.width, this.imageInfo.height],\n sizes: imageOptions.sizes,\n format:\n options.format !== undefined &&\n imageOptions.formats.includes(options.format)\n ? options.format\n : imageOptions.preferredFormat !== undefined\n ? imageOptions.preferredFormat\n : 'jpg',\n supports: imageOptions.supports,\n quality:\n options.quality && imageOptions.qualities.includes(options.quality)\n ? options.quality\n : imageOptions.qualities.includes('native')\n ? 'native'\n : 'default',\n resolutions: Array.isArray(imageOptions.resolutions)\n ? imageOptions.resolutions.sort(function (a, b) {\n return b - a;\n })\n : undefined,\n tileSize: imageOptions.tileSize,\n };\n }\n}\n\nexport default IIIFInfo;\n","/**\n * @module ol/source/IIIF\n */\n\nimport TileGrid from '../tilegrid/TileGrid.js';\nimport TileImage from './TileImage.js';\nimport {CustomTile} from './Zoomify.js';\nimport {DEFAULT_TILE_SIZE} from '../tilegrid/common.js';\nimport {Versions} from '../format/IIIFInfo.js';\nimport {assert} from '../asserts.js';\nimport {getTopLeft} from '../extent.js';\nimport {toSize} from '../size.js';\n\n/**\n * @typedef {Object} Options\n * @property {import(\"./Source.js\").AttributionLike} [attributions] Attributions.\n * @property {boolean} [attributionsCollapsible=true] Attributions are collapsible.\n * @property {number} [cacheSize] Size of the cache.\n * @property {null|string} [crossOrigin] The value for the crossOrigin option of the request.\n * @property {import(\"../extent.js\").Extent} [extent=[0, -height, width, 0]] The extent.\n * @property {string} [format='jpg'] Requested image format.\n * @property {boolean} [interpolate=true] Use interpolated values when resampling. By default,\n * linear interpolation is used when resampling. Set to false to use the nearest neighbor instead.\n * @property {import(\"../proj.js\").ProjectionLike} [projection] Projection.\n * @property {string} [quality] Requested IIIF image quality. Default is 'native'\n * for version 1, 'default' for versions 2 and 3.\n * @property {number} [reprojectionErrorThreshold=0.5] Maximum allowed reprojection error (in pixels).\n * Higher values can increase reprojection performance, but decrease precision.\n * @property {Array} [resolutions] Supported resolutions as given in IIIF 'scaleFactors'\n * @property {import(\"../size.js\").Size} size Size of the image [width, height].\n * @property {Array} [sizes] Supported scaled image sizes.\n * Content of the IIIF info.json 'sizes' property, but as array of Size objects.\n * @property {import(\"./Source.js\").State} [state] Source state.\n * @property {Array} [supports=[]] Supported IIIF region and size calculation\n * features.\n * @property {number} [tilePixelRatio] Tile pixel ratio.\n * @property {number|import(\"../size.js\").Size} [tileSize] Tile size.\n * Same tile size is used for all zoom levels. If tile size is a number,\n * a square tile is assumed. If the IIIF image service supports arbitrary\n * tiling (sizeByH, sizeByW, sizeByWh or sizeByPct as well as regionByPx or regionByPct\n * are supported), the default tilesize is 256.\n * @property {number} [transition] Transition.\n * @property {string} [url] Base URL of the IIIF Image service.\n * This should be the same as the IIIF Image ID.\n * @property {import(\"../format/IIIFInfo.js\").Versions} [version=Versions.VERSION2] Service's IIIF Image API version.\n * @property {number|import(\"../array.js\").NearestDirectionFunction} [zDirection=0]\n * Choose whether to use tiles with a higher or lower zoom level when between integer\n * zoom levels. See {@link module:ol/tilegrid/TileGrid~TileGrid#getZForResolution}.\n */\n\nfunction formatPercentage(percentage) {\n return percentage.toLocaleString('en', {maximumFractionDigits: 10});\n}\n\n/**\n * @classdesc\n * Layer source for IIIF Image API services.\n * @api\n */\nclass IIIF extends TileImage {\n /**\n * @param {Options} [options] Tile source options. Use {@link import(\"../format/IIIFInfo.js\").IIIFInfo}\n * to parse Image API service information responses into constructor options.\n * @api\n */\n constructor(options) {\n /**\n * @type {Partial}\n */\n const partialOptions = options || {};\n\n let baseUrl = partialOptions.url || '';\n baseUrl =\n baseUrl +\n (baseUrl.lastIndexOf('/') === baseUrl.length - 1 || baseUrl === ''\n ? ''\n : '/');\n const version = partialOptions.version || Versions.VERSION2;\n const sizes = partialOptions.sizes || [];\n const size = partialOptions.size;\n assert(\n size != undefined &&\n Array.isArray(size) &&\n size.length == 2 &&\n !isNaN(size[0]) &&\n size[0] > 0 &&\n !isNaN(size[1]) &&\n size[1] > 0,\n 60\n );\n const width = size[0];\n const height = size[1];\n const tileSize = partialOptions.tileSize;\n const tilePixelRatio = partialOptions.tilePixelRatio || 1;\n const format = partialOptions.format || 'jpg';\n const quality =\n partialOptions.quality ||\n (partialOptions.version == Versions.VERSION1 ? 'native' : 'default');\n let resolutions = partialOptions.resolutions || [];\n const supports = partialOptions.supports || [];\n const extent = partialOptions.extent || [0, -height, width, 0];\n\n const supportsListedSizes =\n sizes != undefined && Array.isArray(sizes) && sizes.length > 0;\n const supportsListedTiles =\n tileSize !== undefined &&\n ((typeof tileSize === 'number' &&\n Number.isInteger(tileSize) &&\n tileSize > 0) ||\n (Array.isArray(tileSize) && tileSize.length > 0));\n const supportsArbitraryTiling =\n supports != undefined &&\n Array.isArray(supports) &&\n (supports.includes('regionByPx') || supports.includes('regionByPct')) &&\n (supports.includes('sizeByWh') ||\n supports.includes('sizeByH') ||\n supports.includes('sizeByW') ||\n supports.includes('sizeByPct'));\n\n let tileWidth, tileHeight, maxZoom;\n\n resolutions.sort(function (a, b) {\n return b - a;\n });\n\n if (supportsListedTiles || supportsArbitraryTiling) {\n if (tileSize != undefined) {\n if (\n typeof tileSize === 'number' &&\n Number.isInteger(tileSize) &&\n tileSize > 0\n ) {\n tileWidth = tileSize;\n tileHeight = tileSize;\n } else if (Array.isArray(tileSize) && tileSize.length > 0) {\n if (\n tileSize.length == 1 ||\n (tileSize[1] == undefined && Number.isInteger(tileSize[0]))\n ) {\n tileWidth = tileSize[0];\n tileHeight = tileSize[0];\n }\n if (tileSize.length == 2) {\n if (\n Number.isInteger(tileSize[0]) &&\n Number.isInteger(tileSize[1])\n ) {\n tileWidth = tileSize[0];\n tileHeight = tileSize[1];\n } else if (\n tileSize[0] == undefined &&\n Number.isInteger(tileSize[1])\n ) {\n tileWidth = tileSize[1];\n tileHeight = tileSize[1];\n }\n }\n }\n }\n if (tileWidth === undefined || tileHeight === undefined) {\n tileWidth = DEFAULT_TILE_SIZE;\n tileHeight = DEFAULT_TILE_SIZE;\n }\n if (resolutions.length == 0) {\n maxZoom = Math.max(\n Math.ceil(Math.log(width / tileWidth) / Math.LN2),\n Math.ceil(Math.log(height / tileHeight) / Math.LN2)\n );\n for (let i = maxZoom; i >= 0; i--) {\n resolutions.push(Math.pow(2, i));\n }\n } else {\n const maxScaleFactor = Math.max(...resolutions);\n // TODO maxScaleFactor might not be a power to 2\n maxZoom = Math.round(Math.log(maxScaleFactor) / Math.LN2);\n }\n } else {\n // No tile support.\n tileWidth = width;\n tileHeight = height;\n resolutions = [];\n if (supportsListedSizes) {\n /*\n * 'sizes' provided. Use full region in different resolutions. Every\n * resolution has only one tile.\n */\n sizes.sort(function (a, b) {\n return a[0] - b[0];\n });\n maxZoom = -1;\n const ignoredSizesIndex = [];\n for (let i = 0; i < sizes.length; i++) {\n const resolution = width / sizes[i][0];\n if (\n resolutions.length > 0 &&\n resolutions[resolutions.length - 1] == resolution\n ) {\n ignoredSizesIndex.push(i);\n continue;\n }\n resolutions.push(resolution);\n maxZoom++;\n }\n if (ignoredSizesIndex.length > 0) {\n for (let i = 0; i < ignoredSizesIndex.length; i++) {\n sizes.splice(ignoredSizesIndex[i] - i, 1);\n }\n }\n } else {\n // No useful image information at all. Try pseudo tile with full image.\n resolutions.push(1);\n sizes.push([width, height]);\n maxZoom = 0;\n }\n }\n\n const tileGrid = new TileGrid({\n tileSize: [tileWidth, tileHeight],\n extent: extent,\n origin: getTopLeft(extent),\n resolutions: resolutions,\n });\n\n const tileUrlFunction = function (tileCoord, pixelRatio, projection) {\n let regionParam, sizeParam;\n const zoom = tileCoord[0];\n if (zoom > maxZoom) {\n return;\n }\n const tileX = tileCoord[1],\n tileY = tileCoord[2],\n scale = resolutions[zoom];\n if (\n tileX === undefined ||\n tileY === undefined ||\n scale === undefined ||\n tileX < 0 ||\n Math.ceil(width / scale / tileWidth) <= tileX ||\n tileY < 0 ||\n Math.ceil(height / scale / tileHeight) <= tileY\n ) {\n return;\n }\n if (supportsArbitraryTiling || supportsListedTiles) {\n const regionX = tileX * tileWidth * scale,\n regionY = tileY * tileHeight * scale;\n let regionW = tileWidth * scale,\n regionH = tileHeight * scale,\n sizeW = tileWidth,\n sizeH = tileHeight;\n if (regionX + regionW > width) {\n regionW = width - regionX;\n }\n if (regionY + regionH > height) {\n regionH = height - regionY;\n }\n if (regionX + tileWidth * scale > width) {\n sizeW = Math.floor((width - regionX + scale - 1) / scale);\n }\n if (regionY + tileHeight * scale > height) {\n sizeH = Math.floor((height - regionY + scale - 1) / scale);\n }\n if (\n regionX == 0 &&\n regionW == width &&\n regionY == 0 &&\n regionH == height\n ) {\n // canonical full image region parameter is 'full', not 'x,y,w,h'\n regionParam = 'full';\n } else if (\n !supportsArbitraryTiling ||\n supports.includes('regionByPx')\n ) {\n regionParam = regionX + ',' + regionY + ',' + regionW + ',' + regionH;\n } else if (supports.includes('regionByPct')) {\n const pctX = formatPercentage((regionX / width) * 100),\n pctY = formatPercentage((regionY / height) * 100),\n pctW = formatPercentage((regionW / width) * 100),\n pctH = formatPercentage((regionH / height) * 100);\n regionParam = 'pct:' + pctX + ',' + pctY + ',' + pctW + ',' + pctH;\n }\n if (\n version == Versions.VERSION3 &&\n (!supportsArbitraryTiling || supports.includes('sizeByWh'))\n ) {\n sizeParam = sizeW + ',' + sizeH;\n } else if (!supportsArbitraryTiling || supports.includes('sizeByW')) {\n sizeParam = sizeW + ',';\n } else if (supports.includes('sizeByH')) {\n sizeParam = ',' + sizeH;\n } else if (supports.includes('sizeByWh')) {\n sizeParam = sizeW + ',' + sizeH;\n } else if (supports.includes('sizeByPct')) {\n sizeParam = 'pct:' + formatPercentage(100 / scale);\n }\n } else {\n regionParam = 'full';\n if (supportsListedSizes) {\n const regionWidth = sizes[zoom][0],\n regionHeight = sizes[zoom][1];\n if (version == Versions.VERSION3) {\n if (regionWidth == width && regionHeight == height) {\n sizeParam = 'max';\n } else {\n sizeParam = regionWidth + ',' + regionHeight;\n }\n } else {\n if (regionWidth == width) {\n sizeParam = 'full';\n } else {\n sizeParam = regionWidth + ',';\n }\n }\n } else {\n sizeParam = version == Versions.VERSION3 ? 'max' : 'full';\n }\n }\n return (\n baseUrl + regionParam + '/' + sizeParam + '/0/' + quality + '.' + format\n );\n };\n\n const IiifTileClass = CustomTile.bind(\n null,\n toSize(tileSize || 256).map(function (size) {\n return size * tilePixelRatio;\n })\n );\n\n super({\n attributions: partialOptions.attributions,\n attributionsCollapsible: partialOptions.attributionsCollapsible,\n cacheSize: partialOptions.cacheSize,\n crossOrigin: partialOptions.crossOrigin,\n interpolate: partialOptions.interpolate,\n projection: partialOptions.projection,\n reprojectionErrorThreshold: partialOptions.reprojectionErrorThreshold,\n state: partialOptions.state,\n tileClass: IiifTileClass,\n tileGrid: tileGrid,\n tilePixelRatio: partialOptions.tilePixelRatio,\n tileUrlFunction: tileUrlFunction,\n transition: partialOptions.transition,\n });\n\n /**\n * @type {number|import(\"../array.js\").NearestDirectionFunction}\n */\n this.zDirection = partialOptions.zDirection;\n }\n}\n\nexport default IIIF;\n","/**\n * @module ol/reproj/Image\n */\nimport {ERROR_THRESHOLD} from './common.js';\n\nimport EventType from '../events/EventType.js';\nimport ImageBase from '../ImageBase.js';\nimport ImageState from '../ImageState.js';\nimport Triangulation from './Triangulation.js';\nimport {\n calculateSourceResolution,\n render as renderReprojected,\n} from '../reproj.js';\nimport {getCenter, getHeight, getIntersection, getWidth} from '../extent.js';\nimport {listen, unlistenByKey} from '../events.js';\n\n/**\n * @typedef {function(import(\"../extent.js\").Extent, number, number) : import(\"../ImageBase.js\").default} FunctionType\n */\n\n/**\n * @classdesc\n * Class encapsulating single reprojected image.\n * See {@link module:ol/source/Image~ImageSource}.\n */\nclass ReprojImage extends ImageBase {\n /**\n * @param {import(\"../proj/Projection.js\").default} sourceProj Source projection (of the data).\n * @param {import(\"../proj/Projection.js\").default} targetProj Target projection.\n * @param {import(\"../extent.js\").Extent} targetExtent Target extent.\n * @param {number} targetResolution Target resolution.\n * @param {number} pixelRatio Pixel ratio.\n * @param {FunctionType} getImageFunction\n * Function returning source images (extent, resolution, pixelRatio).\n * @param {boolean} interpolate Use linear interpolation when resampling.\n */\n constructor(\n sourceProj,\n targetProj,\n targetExtent,\n targetResolution,\n pixelRatio,\n getImageFunction,\n interpolate\n ) {\n const maxSourceExtent = sourceProj.getExtent();\n const maxTargetExtent = targetProj.getExtent();\n\n const limitedTargetExtent = maxTargetExtent\n ? getIntersection(targetExtent, maxTargetExtent)\n : targetExtent;\n\n const targetCenter = getCenter(limitedTargetExtent);\n const sourceResolution = calculateSourceResolution(\n sourceProj,\n targetProj,\n targetCenter,\n targetResolution\n );\n\n const errorThresholdInPixels = ERROR_THRESHOLD;\n\n const triangulation = new Triangulation(\n sourceProj,\n targetProj,\n limitedTargetExtent,\n maxSourceExtent,\n sourceResolution * errorThresholdInPixels,\n targetResolution\n );\n\n const sourceExtent = triangulation.calculateSourceExtent();\n const sourceImage = getImageFunction(\n sourceExtent,\n sourceResolution,\n pixelRatio\n );\n const state = sourceImage ? ImageState.IDLE : ImageState.EMPTY;\n const sourcePixelRatio = sourceImage ? sourceImage.getPixelRatio() : 1;\n\n super(targetExtent, targetResolution, sourcePixelRatio, state);\n\n /**\n * @private\n * @type {import(\"../proj/Projection.js\").default}\n */\n this.targetProj_ = targetProj;\n\n /**\n * @private\n * @type {import(\"../extent.js\").Extent}\n */\n this.maxSourceExtent_ = maxSourceExtent;\n\n /**\n * @private\n * @type {!import(\"./Triangulation.js\").default}\n */\n this.triangulation_ = triangulation;\n\n /**\n * @private\n * @type {number}\n */\n this.targetResolution_ = targetResolution;\n\n /**\n * @private\n * @type {import(\"../extent.js\").Extent}\n */\n this.targetExtent_ = targetExtent;\n\n /**\n * @private\n * @type {import(\"../ImageBase.js\").default}\n */\n this.sourceImage_ = sourceImage;\n\n /**\n * @private\n * @type {number}\n */\n this.sourcePixelRatio_ = sourcePixelRatio;\n\n /**\n * @private\n * @type {boolean}\n */\n this.interpolate_ = interpolate;\n\n /**\n * @private\n * @type {HTMLCanvasElement}\n */\n this.canvas_ = null;\n\n /**\n * @private\n * @type {?import(\"../events.js\").EventsKey}\n */\n this.sourceListenerKey_ = null;\n }\n\n /**\n * Clean up.\n */\n disposeInternal() {\n if (this.state == ImageState.LOADING) {\n this.unlistenSource_();\n }\n super.disposeInternal();\n }\n\n /**\n * @return {HTMLCanvasElement} Image.\n */\n getImage() {\n return this.canvas_;\n }\n\n /**\n * @return {import(\"../proj/Projection.js\").default} Projection.\n */\n getProjection() {\n return this.targetProj_;\n }\n\n /**\n * @private\n */\n reproject_() {\n const sourceState = this.sourceImage_.getState();\n if (sourceState == ImageState.LOADED) {\n const width = getWidth(this.targetExtent_) / this.targetResolution_;\n const height = getHeight(this.targetExtent_) / this.targetResolution_;\n\n this.canvas_ = renderReprojected(\n width,\n height,\n this.sourcePixelRatio_,\n this.sourceImage_.getResolution(),\n this.maxSourceExtent_,\n this.targetResolution_,\n this.targetExtent_,\n this.triangulation_,\n [\n {\n extent: this.sourceImage_.getExtent(),\n image: this.sourceImage_.getImage(),\n },\n ],\n 0,\n undefined,\n this.interpolate_\n );\n }\n this.state = sourceState;\n this.changed();\n }\n\n /**\n * Load not yet loaded URI.\n */\n load() {\n if (this.state == ImageState.IDLE) {\n this.state = ImageState.LOADING;\n this.changed();\n\n const sourceState = this.sourceImage_.getState();\n if (sourceState == ImageState.LOADED || sourceState == ImageState.ERROR) {\n this.reproject_();\n } else {\n this.sourceListenerKey_ = listen(\n this.sourceImage_,\n EventType.CHANGE,\n function (e) {\n const sourceState = this.sourceImage_.getState();\n if (\n sourceState == ImageState.LOADED ||\n sourceState == ImageState.ERROR\n ) {\n this.unlistenSource_();\n this.reproject_();\n }\n },\n this\n );\n this.sourceImage_.load();\n }\n }\n }\n\n /**\n * @private\n */\n unlistenSource_() {\n unlistenByKey(\n /** @type {!import(\"../events.js\").EventsKey} */ (this.sourceListenerKey_)\n );\n this.sourceListenerKey_ = null;\n }\n}\n\nexport default ReprojImage;\n","/**\n * @module ol/source/Image\n */\nimport Event from '../events/Event.js';\nimport ImageState from '../ImageState.js';\nimport ReprojImage from '../reproj/Image.js';\nimport Source from './Source.js';\nimport {abstract} from '../util.js';\nimport {equals} from '../extent.js';\nimport {equivalent} from '../proj.js';\nimport {linearFindNearest} from '../array.js';\n\n/**\n * @enum {string}\n */\nexport const ImageSourceEventType = {\n /**\n * Triggered when an image starts loading.\n * @event module:ol/source/Image.ImageSourceEvent#imageloadstart\n * @api\n */\n IMAGELOADSTART: 'imageloadstart',\n\n /**\n * Triggered when an image finishes loading.\n * @event module:ol/source/Image.ImageSourceEvent#imageloadend\n * @api\n */\n IMAGELOADEND: 'imageloadend',\n\n /**\n * Triggered if image loading results in an error.\n * @event module:ol/source/Image.ImageSourceEvent#imageloaderror\n * @api\n */\n IMAGELOADERROR: 'imageloaderror',\n};\n\n/**\n * @typedef {'imageloadend'|'imageloaderror'|'imageloadstart'} ImageSourceEventTypes\n */\n\n/**\n * @classdesc\n * Events emitted by {@link module:ol/source/Image~ImageSource} instances are instances of this\n * type.\n */\nexport class ImageSourceEvent extends Event {\n /**\n * @param {string} type Type.\n * @param {import(\"../Image.js\").default} image The image.\n */\n constructor(type, image) {\n super(type);\n\n /**\n * The image related to the event.\n * @type {import(\"../Image.js\").default}\n * @api\n */\n this.image = image;\n }\n}\n\n/***\n * @template Return\n * @typedef {import(\"../Observable\").OnSignature &\n * import(\"../Observable\").OnSignature &\n * import(\"../Observable\").OnSignature &\n * import(\"../Observable\").CombinedOnSignature} ImageSourceOnSignature\n */\n\n/**\n * @typedef {Object} Options\n * @property {import(\"./Source.js\").AttributionLike} [attributions] Attributions.\n * @property {boolean} [interpolate=true] Use interpolated values when resampling. By default,\n * linear interpolation is used when resampling. Set to false to use the nearest neighbor instead.\n * @property {import(\"../proj.js\").ProjectionLike} [projection] Projection.\n * @property {Array} [resolutions] Resolutions.\n * @property {import(\"./Source.js\").State} [state] State.\n */\n\n/**\n * @classdesc\n * Abstract base class; normally only used for creating subclasses and not\n * instantiated in apps.\n * Base class for sources providing a single image.\n * @abstract\n * @fires module:ol/source/Image.ImageSourceEvent\n * @api\n */\nclass ImageSource extends Source {\n /**\n * @param {Options} options Single image source options.\n */\n constructor(options) {\n super({\n attributions: options.attributions,\n projection: options.projection,\n state: options.state,\n interpolate:\n options.interpolate !== undefined ? options.interpolate : true,\n });\n\n /***\n * @type {ImageSourceOnSignature}\n */\n this.on;\n\n /***\n * @type {ImageSourceOnSignature}\n */\n this.once;\n\n /***\n * @type {ImageSourceOnSignature}\n */\n this.un;\n\n /**\n * @private\n * @type {Array|null}\n */\n this.resolutions_ =\n options.resolutions !== undefined ? options.resolutions : null;\n\n /**\n * @private\n * @type {import(\"../reproj/Image.js\").default}\n */\n this.reprojectedImage_ = null;\n\n /**\n * @private\n * @type {number}\n */\n this.reprojectedRevision_ = 0;\n }\n\n /**\n * @return {Array|null} Resolutions.\n */\n getResolutions() {\n return this.resolutions_;\n }\n\n /**\n * @param {Array|null} resolutions Resolutions.\n */\n setResolutions(resolutions) {\n this.resolutions_ = resolutions;\n }\n\n /**\n * @protected\n * @param {number} resolution Resolution.\n * @return {number} Resolution.\n */\n findNearestResolution(resolution) {\n const resolutions = this.getResolutions();\n if (resolutions) {\n const idx = linearFindNearest(resolutions, resolution, 0);\n resolution = resolutions[idx];\n }\n return resolution;\n }\n\n /**\n * @param {import(\"../extent.js\").Extent} extent Extent.\n * @param {number} resolution Resolution.\n * @param {number} pixelRatio Pixel ratio.\n * @param {import(\"../proj/Projection.js\").default} projection Projection.\n * @return {import(\"../ImageBase.js\").default} Single image.\n */\n getImage(extent, resolution, pixelRatio, projection) {\n const sourceProjection = this.getProjection();\n if (\n !sourceProjection ||\n !projection ||\n equivalent(sourceProjection, projection)\n ) {\n if (sourceProjection) {\n projection = sourceProjection;\n }\n return this.getImageInternal(extent, resolution, pixelRatio, projection);\n }\n if (this.reprojectedImage_) {\n if (\n this.reprojectedRevision_ == this.getRevision() &&\n equivalent(this.reprojectedImage_.getProjection(), projection) &&\n this.reprojectedImage_.getResolution() == resolution &&\n equals(this.reprojectedImage_.getExtent(), extent)\n ) {\n return this.reprojectedImage_;\n }\n this.reprojectedImage_.dispose();\n this.reprojectedImage_ = null;\n }\n\n this.reprojectedImage_ = new ReprojImage(\n sourceProjection,\n projection,\n extent,\n resolution,\n pixelRatio,\n (extent, resolution, pixelRatio) =>\n this.getImageInternal(extent, resolution, pixelRatio, sourceProjection),\n this.getInterpolate()\n );\n this.reprojectedRevision_ = this.getRevision();\n\n return this.reprojectedImage_;\n }\n\n /**\n * @abstract\n * @param {import(\"../extent.js\").Extent} extent Extent.\n * @param {number} resolution Resolution.\n * @param {number} pixelRatio Pixel ratio.\n * @param {import(\"../proj/Projection.js\").default} projection Projection.\n * @return {import(\"../ImageBase.js\").default} Single image.\n * @protected\n */\n getImageInternal(extent, resolution, pixelRatio, projection) {\n return abstract();\n }\n\n /**\n * Handle image change events.\n * @param {import(\"../events/Event.js\").default} event Event.\n * @protected\n */\n handleImageChange(event) {\n const image = /** @type {import(\"../Image.js\").default} */ (event.target);\n let type;\n switch (image.getState()) {\n case ImageState.LOADING:\n this.loading = true;\n type = ImageSourceEventType.IMAGELOADSTART;\n break;\n case ImageState.LOADED:\n this.loading = false;\n type = ImageSourceEventType.IMAGELOADEND;\n break;\n case ImageState.ERROR:\n this.loading = false;\n type = ImageSourceEventType.IMAGELOADERROR;\n break;\n default:\n return;\n }\n if (this.hasListener(type)) {\n this.dispatchEvent(new ImageSourceEvent(type, image));\n }\n }\n}\n\n/**\n * Default image load function for image sources that use import(\"../Image.js\").Image image\n * instances.\n * @param {import(\"../Image.js\").default} image Image.\n * @param {string} src Source.\n */\nexport function defaultImageLoadFunction(image, src) {\n /** @type {HTMLImageElement|HTMLVideoElement} */ (image.getImage()).src = src;\n}\n\nexport default ImageSource;\n","/**\n * @module ol/uri\n */\n\n/**\n * Appends query parameters to a URI.\n *\n * @param {string} uri The original URI, which may already have query data.\n * @param {!Object} params An object where keys are URI-encoded parameter keys,\n * and the values are arbitrary types or arrays.\n * @return {string} The new URI.\n */\nexport function appendParams(uri, params) {\n const keyParams = [];\n // Skip any null or undefined parameter values\n Object.keys(params).forEach(function (k) {\n if (params[k] !== null && params[k] !== undefined) {\n keyParams.push(k + '=' + encodeURIComponent(params[k]));\n }\n });\n const qs = keyParams.join('&');\n // remove any trailing ? or &\n uri = uri.replace(/[?&]$/, '');\n // append ? or & depending on whether uri has existing parameters\n uri += uri.includes('?') ? '&' : '?';\n return uri + qs;\n}\n","/**\n * @module ol/source/ImageArcGISRest\n */\n\nimport EventType from '../events/EventType.js';\nimport ImageSource, {defaultImageLoadFunction} from './Image.js';\nimport ImageWrapper from '../Image.js';\nimport {appendParams} from '../uri.js';\nimport {assert} from '../asserts.js';\nimport {containsExtent, getHeight, getWidth} from '../extent.js';\n\n/**\n * @typedef {Object} Options\n * @property {import(\"./Source.js\").AttributionLike} [attributions] Attributions.\n * @property {null|string} [crossOrigin] The `crossOrigin` attribute for loaded images. Note that\n * you must provide a `crossOrigin` value if you want to access pixel data with the Canvas renderer.\n * See https://developer.mozilla.org/en-US/docs/Web/HTML/CORS_enabled_image for more detail.\n * @property {boolean} [hidpi=true] Use the `ol/Map#pixelRatio` value when requesting the image from\n * the remote server.\n * @property {import(\"../Image.js\").LoadFunction} [imageLoadFunction] Optional function to load an image given\n * a URL.\n * @property {boolean} [interpolate=true] Use interpolated values when resampling. By default,\n * linear interpolation is used when resampling. Set to false to use the nearest neighbor instead.\n * @property {Object} [params] ArcGIS Rest parameters. This field is optional. Service\n * defaults will be used for any fields not specified. `FORMAT` is `PNG32` by default. `F` is\n * `IMAGE` by default. `TRANSPARENT` is `true` by default. `BBOX`, `SIZE`, `BBOXSR`, and `IMAGESR`\n * will be set dynamically. Set `LAYERS` to override the default service layer visibility. See\n * https://developers.arcgis.com/rest/services-reference/export-map.htm\n * for further reference.\n * @property {import(\"../proj.js\").ProjectionLike} [projection] Projection. Default is the view projection.\n * The projection code must contain a numeric end portion separated by :\n * or the entire code must form a valid ArcGIS SpatialReference definition.\n * @property {number} [ratio=1.5] Ratio. `1` means image requests are the size of the map viewport,\n * `2` means twice the size of the map viewport, and so on.\n * @property {Array} [resolutions] Resolutions. If specified, requests will be made for\n * these resolutions only.\n * @property {string} [url] ArcGIS Rest service URL for a Map Service or Image Service. The url\n * should include /MapServer or /ImageServer.\n */\n\n/**\n * @classdesc\n * Source for data from ArcGIS Rest services providing single, untiled images.\n * Useful when underlying map service has labels.\n *\n * If underlying map service is not using labels,\n * take advantage of ol image caching and use\n * {@link module:ol/source/TileArcGISRest~TileArcGISRest} data source.\n *\n * @fires module:ol/source/Image.ImageSourceEvent\n * @api\n */\nclass ImageArcGISRest extends ImageSource {\n /**\n * @param {Options} [options] Image ArcGIS Rest Options.\n */\n constructor(options) {\n options = options ? options : {};\n\n super({\n attributions: options.attributions,\n interpolate: options.interpolate,\n projection: options.projection,\n resolutions: options.resolutions,\n });\n\n /**\n * @private\n * @type {?string}\n */\n this.crossOrigin_ =\n options.crossOrigin !== undefined ? options.crossOrigin : null;\n\n /**\n * @private\n * @type {boolean}\n */\n this.hidpi_ = options.hidpi !== undefined ? options.hidpi : true;\n\n /**\n * @private\n * @type {string|undefined}\n */\n this.url_ = options.url;\n\n /**\n * @private\n * @type {import(\"../Image.js\").LoadFunction}\n */\n this.imageLoadFunction_ =\n options.imageLoadFunction !== undefined\n ? options.imageLoadFunction\n : defaultImageLoadFunction;\n\n /**\n * @private\n * @type {!Object}\n */\n this.params_ = options.params || {};\n\n /**\n * @private\n * @type {import(\"../Image.js\").default}\n */\n this.image_ = null;\n\n /**\n * @private\n * @type {import(\"../size.js\").Size}\n */\n this.imageSize_ = [0, 0];\n\n /**\n * @private\n * @type {number}\n */\n this.renderedRevision_ = 0;\n\n /**\n * @private\n * @type {number}\n */\n this.ratio_ = options.ratio !== undefined ? options.ratio : 1.5;\n }\n\n /**\n * Get the user-provided params, i.e. those passed to the constructor through\n * the \"params\" option, and possibly updated using the updateParams method.\n * @return {Object} Params.\n * @api\n */\n getParams() {\n return this.params_;\n }\n\n /**\n * @param {import(\"../extent.js\").Extent} extent Extent.\n * @param {number} resolution Resolution.\n * @param {number} pixelRatio Pixel ratio.\n * @param {import(\"../proj/Projection.js\").default} projection Projection.\n * @return {import(\"../Image.js\").default} Single image.\n */\n getImageInternal(extent, resolution, pixelRatio, projection) {\n if (this.url_ === undefined) {\n return null;\n }\n\n resolution = this.findNearestResolution(resolution);\n pixelRatio = this.hidpi_ ? pixelRatio : 1;\n\n const image = this.image_;\n if (\n image &&\n this.renderedRevision_ == this.getRevision() &&\n image.getResolution() == resolution &&\n image.getPixelRatio() == pixelRatio &&\n containsExtent(image.getExtent(), extent)\n ) {\n return image;\n }\n\n const params = {\n 'F': 'image',\n 'FORMAT': 'PNG32',\n 'TRANSPARENT': true,\n };\n Object.assign(params, this.params_);\n\n extent = extent.slice();\n const centerX = (extent[0] + extent[2]) / 2;\n const centerY = (extent[1] + extent[3]) / 2;\n if (this.ratio_ != 1) {\n const halfWidth = (this.ratio_ * getWidth(extent)) / 2;\n const halfHeight = (this.ratio_ * getHeight(extent)) / 2;\n extent[0] = centerX - halfWidth;\n extent[1] = centerY - halfHeight;\n extent[2] = centerX + halfWidth;\n extent[3] = centerY + halfHeight;\n }\n\n const imageResolution = resolution / pixelRatio;\n\n // Compute an integer width and height.\n const width = Math.ceil(getWidth(extent) / imageResolution);\n const height = Math.ceil(getHeight(extent) / imageResolution);\n\n // Modify the extent to match the integer width and height.\n extent[0] = centerX - (imageResolution * width) / 2;\n extent[2] = centerX + (imageResolution * width) / 2;\n extent[1] = centerY - (imageResolution * height) / 2;\n extent[3] = centerY + (imageResolution * height) / 2;\n\n this.imageSize_[0] = width;\n this.imageSize_[1] = height;\n\n const url = this.getRequestUrl_(\n extent,\n this.imageSize_,\n pixelRatio,\n projection,\n params\n );\n\n this.image_ = new ImageWrapper(\n extent,\n resolution,\n pixelRatio,\n url,\n this.crossOrigin_,\n this.imageLoadFunction_\n );\n\n this.renderedRevision_ = this.getRevision();\n\n this.image_.addEventListener(\n EventType.CHANGE,\n this.handleImageChange.bind(this)\n );\n\n return this.image_;\n }\n\n /**\n * Return the image load function of the source.\n * @return {import(\"../Image.js\").LoadFunction} The image load function.\n * @api\n */\n getImageLoadFunction() {\n return this.imageLoadFunction_;\n }\n\n /**\n * @param {import(\"../extent.js\").Extent} extent Extent.\n * @param {import(\"../size.js\").Size} size Size.\n * @param {number} pixelRatio Pixel ratio.\n * @param {import(\"../proj/Projection.js\").default} projection Projection.\n * @param {Object} params Params.\n * @return {string} Request URL.\n * @private\n */\n getRequestUrl_(extent, size, pixelRatio, projection, params) {\n // ArcGIS Server only wants the numeric portion of the projection ID.\n // (if there is no numeric portion the entire projection code must\n // form a valid ArcGIS SpatialReference definition).\n const srid = projection\n .getCode()\n .split(/:(?=\\d+$)/)\n .pop();\n\n params['SIZE'] = size[0] + ',' + size[1];\n params['BBOX'] = extent.join(',');\n params['BBOXSR'] = srid;\n params['IMAGESR'] = srid;\n params['DPI'] = Math.round(90 * pixelRatio);\n\n const url = this.url_;\n\n const modifiedUrl = url\n .replace(/MapServer\\/?$/, 'MapServer/export')\n .replace(/ImageServer\\/?$/, 'ImageServer/exportImage');\n if (modifiedUrl == url) {\n assert(false, 50); // `options.featureTypes` should be an Array\n }\n return appendParams(modifiedUrl, params);\n }\n\n /**\n * Return the URL used for this ArcGIS source.\n * @return {string|undefined} URL.\n * @api\n */\n getUrl() {\n return this.url_;\n }\n\n /**\n * Set the image load function of the source.\n * @param {import(\"../Image.js\").LoadFunction} imageLoadFunction Image load function.\n * @api\n */\n setImageLoadFunction(imageLoadFunction) {\n this.image_ = null;\n this.imageLoadFunction_ = imageLoadFunction;\n this.changed();\n }\n\n /**\n * Set the URL to use for requests.\n * @param {string|undefined} url URL.\n * @api\n */\n setUrl(url) {\n if (url != this.url_) {\n this.url_ = url;\n this.image_ = null;\n this.changed();\n }\n }\n\n /**\n * Update the user-provided params.\n * @param {Object} params Params.\n * @api\n */\n updateParams(params) {\n Object.assign(this.params_, params);\n this.image_ = null;\n this.changed();\n }\n}\n\nexport default ImageArcGISRest;\n","/**\n * @module ol/source/ImageCanvas\n */\n\nimport ImageCanvas from '../ImageCanvas.js';\nimport ImageSource from './Image.js';\nimport {\n containsExtent,\n getHeight,\n getWidth,\n scaleFromCenter,\n} from '../extent.js';\n\n/**\n * A function returning the canvas element (`{HTMLCanvasElement}`)\n * used by the source as an image. The arguments passed to the function are:\n * {@link module:ol/extent~Extent} the image extent, `{number}` the image resolution,\n * `{number}` the pixel ratio of the map, {@link module:ol/size~Size} the image size,\n * and {@link module:ol/proj/Projection~Projection} the image projection. The canvas returned by\n * this function is cached by the source. The this keyword inside the function\n * references the {@link module:ol/source/ImageCanvas~ImageCanvasSource}.\n *\n * @typedef {function(this:import(\"../ImageCanvas.js\").default, import(\"../extent.js\").Extent, number,\n * number, import(\"../size.js\").Size, import(\"../proj/Projection.js\").default): HTMLCanvasElement} FunctionType\n */\n\n/**\n * @typedef {Object} Options\n * @property {import(\"./Source.js\").AttributionLike} [attributions] Attributions.\n * @property {FunctionType} [canvasFunction] Canvas function.\n * The function returning the canvas element used by the source\n * as an image. The arguments passed to the function are: {@link import(\"../extent.js\").Extent} the\n * image extent, `{number}` the image resolution, `{number}` the pixel ratio of the map,\n * {@link import(\"../size.js\").Size} the image size, and {@link import(\"../proj/Projection.js\").default} the image\n * projection. The canvas returned by this function is cached by the source. If\n * the value returned by the function is later changed then\n * `changed` should be called on the source for the source to\n * invalidate the current cached image. See: {@link module:ol/Observable~Observable#changed}\n * @property {boolean} [interpolate=true] Use interpolated values when resampling. By default,\n * linear interpolation is used when resampling. Set to false to use the nearest neighbor instead.\n * @property {import(\"../proj.js\").ProjectionLike} [projection] Projection. Default is the view projection.\n * @property {number} [ratio=1.5] Ratio. 1 means canvases are the size of the map viewport, 2 means twice the\n * width and height of the map viewport, and so on. Must be `1` or higher.\n * @property {Array} [resolutions] Resolutions.\n * If specified, new canvases will be created for these resolutions\n * @property {import(\"./Source.js\").State} [state] Source state.\n */\n\n/**\n * @classdesc\n * Base class for image sources where a canvas element is the image.\n * @api\n */\nclass ImageCanvasSource extends ImageSource {\n /**\n * @param {Options} [options] ImageCanvas options.\n */\n constructor(options) {\n options = options ? options : {};\n\n super({\n attributions: options.attributions,\n interpolate: options.interpolate,\n projection: options.projection,\n resolutions: options.resolutions,\n state: options.state,\n });\n\n /**\n * @private\n * @type {FunctionType}\n */\n this.canvasFunction_ = options.canvasFunction;\n\n /**\n * @private\n * @type {import(\"../ImageCanvas.js\").default}\n */\n this.canvas_ = null;\n\n /**\n * @private\n * @type {number}\n */\n this.renderedRevision_ = 0;\n\n /**\n * @private\n * @type {number}\n */\n this.ratio_ = options.ratio !== undefined ? options.ratio : 1.5;\n }\n\n /**\n * @param {import(\"../extent.js\").Extent} extent Extent.\n * @param {number} resolution Resolution.\n * @param {number} pixelRatio Pixel ratio.\n * @param {import(\"../proj/Projection.js\").default} projection Projection.\n * @return {import(\"../ImageCanvas.js\").default} Single image.\n */\n getImageInternal(extent, resolution, pixelRatio, projection) {\n resolution = this.findNearestResolution(resolution);\n\n let canvas = this.canvas_;\n if (\n canvas &&\n this.renderedRevision_ == this.getRevision() &&\n canvas.getResolution() == resolution &&\n canvas.getPixelRatio() == pixelRatio &&\n containsExtent(canvas.getExtent(), extent)\n ) {\n return canvas;\n }\n\n extent = extent.slice();\n scaleFromCenter(extent, this.ratio_);\n const width = getWidth(extent) / resolution;\n const height = getHeight(extent) / resolution;\n const size = [width * pixelRatio, height * pixelRatio];\n\n const canvasElement = this.canvasFunction_.call(\n this,\n extent,\n resolution,\n pixelRatio,\n size,\n projection\n );\n if (canvasElement) {\n canvas = new ImageCanvas(extent, resolution, pixelRatio, canvasElement);\n }\n this.canvas_ = canvas;\n this.renderedRevision_ = this.getRevision();\n\n return canvas;\n }\n}\n\nexport default ImageCanvasSource;\n","/**\n * @module ol/source/ImageMapGuide\n */\n\nimport EventType from '../events/EventType.js';\nimport ImageSource, {defaultImageLoadFunction} from './Image.js';\nimport ImageWrapper from '../Image.js';\nimport {appendParams} from '../uri.js';\nimport {\n containsExtent,\n getCenter,\n getHeight,\n getWidth,\n scaleFromCenter,\n} from '../extent.js';\n\n/**\n * @typedef {Object} Options\n * @property {string} [url] The mapagent url.\n * @property {null|string} [crossOrigin] The `crossOrigin` attribute for loaded images. Note that\n * you must provide a `crossOrigin` value if you want to access pixel data with the Canvas renderer.\n * See https://developer.mozilla.org/en-US/docs/Web/HTML/CORS_enabled_image for more detail.\n * @property {number} [displayDpi=96] The display resolution.\n * @property {number} [metersPerUnit=1] The meters-per-unit value.\n * @property {boolean} [hidpi=true] Use the `ol/Map#pixelRatio` value when requesting\n * the image from the remote server.\n * @property {boolean} [useOverlay] If `true`, will use `GETDYNAMICMAPOVERLAYIMAGE`.\n * @property {import(\"../proj.js\").ProjectionLike} [projection] Projection. Default is the view projection.\n * @property {number} [ratio=1] Ratio. `1` means image requests are the size of the map viewport, `2` means\n * twice the width and height of the map viewport, and so on. Must be `1` or higher.\n * @property {Array} [resolutions] Resolutions.\n * If specified, requests will be made for these resolutions only.\n * @property {import(\"../Image.js\").LoadFunction} [imageLoadFunction] Optional function to load an image given a URL.\n * @property {boolean} [interpolate=true] Use interpolated values when resampling. By default,\n * linear interpolation is used when resampling. Set to false to use the nearest neighbor instead.\n * @property {Object} [params] Additional parameters.\n */\n\n/**\n * @classdesc\n * Source for images from Mapguide servers\n *\n * @fires module:ol/source/Image.ImageSourceEvent\n * @api\n */\nclass ImageMapGuide extends ImageSource {\n /**\n * @param {Options} options ImageMapGuide options.\n */\n constructor(options) {\n super({\n interpolate: options.interpolate,\n projection: options.projection,\n resolutions: options.resolutions,\n });\n\n /**\n * @private\n * @type {?string}\n */\n this.crossOrigin_ =\n options.crossOrigin !== undefined ? options.crossOrigin : null;\n\n /**\n * @private\n * @type {number}\n */\n this.displayDpi_ =\n options.displayDpi !== undefined ? options.displayDpi : 96;\n\n /**\n * @private\n * @type {!Object}\n */\n this.params_ = options.params || {};\n\n /**\n * @private\n * @type {string|undefined}\n */\n this.url_ = options.url;\n\n /**\n * @private\n * @type {import(\"../Image.js\").LoadFunction}\n */\n this.imageLoadFunction_ =\n options.imageLoadFunction !== undefined\n ? options.imageLoadFunction\n : defaultImageLoadFunction;\n\n /**\n * @private\n * @type {boolean}\n */\n this.hidpi_ = options.hidpi !== undefined ? options.hidpi : true;\n\n /**\n * @private\n * @type {number}\n */\n this.metersPerUnit_ =\n options.metersPerUnit !== undefined ? options.metersPerUnit : 1;\n\n /**\n * @private\n * @type {number}\n */\n this.ratio_ = options.ratio !== undefined ? options.ratio : 1;\n\n /**\n * @private\n * @type {boolean}\n */\n this.useOverlay_ =\n options.useOverlay !== undefined ? options.useOverlay : false;\n\n /**\n * @private\n * @type {import(\"../Image.js\").default}\n */\n this.image_ = null;\n\n /**\n * @private\n * @type {number}\n */\n this.renderedRevision_ = 0;\n }\n\n /**\n * Get the user-provided params, i.e. those passed to the constructor through\n * the \"params\" option, and possibly updated using the updateParams method.\n * @return {Object} Params.\n * @api\n */\n getParams() {\n return this.params_;\n }\n\n /**\n * @param {import(\"../extent.js\").Extent} extent Extent.\n * @param {number} resolution Resolution.\n * @param {number} pixelRatio Pixel ratio.\n * @param {import(\"../proj/Projection.js\").default} projection Projection.\n * @return {import(\"../Image.js\").default} Single image.\n */\n getImageInternal(extent, resolution, pixelRatio, projection) {\n resolution = this.findNearestResolution(resolution);\n pixelRatio = this.hidpi_ ? pixelRatio : 1;\n\n let image = this.image_;\n if (\n image &&\n this.renderedRevision_ == this.getRevision() &&\n image.getResolution() == resolution &&\n image.getPixelRatio() == pixelRatio &&\n containsExtent(image.getExtent(), extent)\n ) {\n return image;\n }\n\n if (this.ratio_ != 1) {\n extent = extent.slice();\n scaleFromCenter(extent, this.ratio_);\n }\n const width = getWidth(extent) / resolution;\n const height = getHeight(extent) / resolution;\n const size = [width * pixelRatio, height * pixelRatio];\n\n if (this.url_ !== undefined) {\n const imageUrl = this.getUrl(\n this.url_,\n this.params_,\n extent,\n size,\n projection\n );\n image = new ImageWrapper(\n extent,\n resolution,\n pixelRatio,\n imageUrl,\n this.crossOrigin_,\n this.imageLoadFunction_\n );\n image.addEventListener(\n EventType.CHANGE,\n this.handleImageChange.bind(this)\n );\n } else {\n image = null;\n }\n this.image_ = image;\n this.renderedRevision_ = this.getRevision();\n\n return image;\n }\n\n /**\n * Return the image load function of the source.\n * @return {import(\"../Image.js\").LoadFunction} The image load function.\n * @api\n */\n getImageLoadFunction() {\n return this.imageLoadFunction_;\n }\n\n /**\n * Update the user-provided params.\n * @param {Object} params Params.\n * @api\n */\n updateParams(params) {\n Object.assign(this.params_, params);\n this.changed();\n }\n\n /**\n * @param {string} baseUrl The mapagent url.\n * @param {Object} params Request parameters.\n * @param {import(\"../extent.js\").Extent} extent Extent.\n * @param {import(\"../size.js\").Size} size Size.\n * @param {import(\"../proj/Projection.js\").default} projection Projection.\n * @return {string} The mapagent map image request URL.\n */\n getUrl(baseUrl, params, extent, size, projection) {\n const scale = getScale(extent, size, this.metersPerUnit_, this.displayDpi_);\n const center = getCenter(extent);\n const baseParams = {\n 'OPERATION': this.useOverlay_\n ? 'GETDYNAMICMAPOVERLAYIMAGE'\n : 'GETMAPIMAGE',\n 'VERSION': '2.0.0',\n 'LOCALE': 'en',\n 'CLIENTAGENT': 'ol/source/ImageMapGuide source',\n 'CLIP': '1',\n 'SETDISPLAYDPI': this.displayDpi_,\n 'SETDISPLAYWIDTH': Math.round(size[0]),\n 'SETDISPLAYHEIGHT': Math.round(size[1]),\n 'SETVIEWSCALE': scale,\n 'SETVIEWCENTERX': center[0],\n 'SETVIEWCENTERY': center[1],\n };\n Object.assign(baseParams, params);\n return appendParams(baseUrl, baseParams);\n }\n\n /**\n * Set the image load function of the MapGuide source.\n * @param {import(\"../Image.js\").LoadFunction} imageLoadFunction Image load function.\n * @api\n */\n setImageLoadFunction(imageLoadFunction) {\n this.image_ = null;\n this.imageLoadFunction_ = imageLoadFunction;\n this.changed();\n }\n}\n\n/**\n * @param {import(\"../extent.js\").Extent} extent The map extents.\n * @param {import(\"../size.js\").Size} size The viewport size.\n * @param {number} metersPerUnit The meters-per-unit value.\n * @param {number} dpi The display resolution.\n * @return {number} The computed map scale.\n */\nfunction getScale(extent, size, metersPerUnit, dpi) {\n const mcsW = getWidth(extent);\n const mcsH = getHeight(extent);\n const devW = size[0];\n const devH = size[1];\n const mpp = 0.0254 / dpi;\n if (devH * mcsW > devW * mcsH) {\n return (mcsW * metersPerUnit) / (devW * mpp); // width limited\n }\n return (mcsH * metersPerUnit) / (devH * mpp); // height limited\n}\n\nexport default ImageMapGuide;\n","/**\n * @module ol/source/ImageStatic\n */\n\nimport EventType from '../events/EventType.js';\nimport ImageSource, {defaultImageLoadFunction} from './Image.js';\nimport ImageState from '../ImageState.js';\nimport ImageWrapper from '../Image.js';\nimport {createCanvasContext2D} from '../dom.js';\nimport {getHeight, getWidth, intersects} from '../extent.js';\nimport {get as getProjection} from '../proj.js';\n\n/**\n * @typedef {Object} Options\n * @property {import(\"./Source.js\").AttributionLike} [attributions] Attributions.\n * @property {null|string} [crossOrigin] The `crossOrigin` attribute for loaded images. Note that\n * you must provide a `crossOrigin` value if you want to access pixel data with the Canvas renderer.\n * See https://developer.mozilla.org/en-US/docs/Web/HTML/CORS_enabled_image for more detail.\n * @property {import(\"../extent.js\").Extent} [imageExtent] Extent of the image in map coordinates.\n * This is the [left, bottom, right, top] map coordinates of your image.\n * @property {import(\"../Image.js\").LoadFunction} [imageLoadFunction] Optional function to load an image given a URL.\n * @property {boolean} [interpolate=true] Use interpolated values when resampling. By default,\n * linear interpolation is used when resampling. Set to false to use the nearest neighbor instead.\n * @property {import(\"../proj.js\").ProjectionLike} [projection] Projection. Default is the view projection.\n * @property {import(\"../size.js\").Size} [imageSize] Size of the image in pixels. Usually the image size is auto-detected, so this\n * only needs to be set if auto-detection fails for some reason.\n * @property {string} url Image URL.\n */\n\n/**\n * @classdesc\n * A layer source for displaying a single, static image.\n * @api\n */\nclass Static extends ImageSource {\n /**\n * @param {Options} options ImageStatic options.\n */\n constructor(options) {\n const crossOrigin =\n options.crossOrigin !== undefined ? options.crossOrigin : null;\n\n const /** @type {import(\"../Image.js\").LoadFunction} */ imageLoadFunction =\n options.imageLoadFunction !== undefined\n ? options.imageLoadFunction\n : defaultImageLoadFunction;\n\n super({\n attributions: options.attributions,\n interpolate: options.interpolate,\n projection: getProjection(options.projection),\n });\n\n /**\n * @private\n * @type {string}\n */\n this.url_ = options.url;\n\n /**\n * @private\n * @type {import(\"../extent.js\").Extent}\n */\n this.imageExtent_ = options.imageExtent;\n\n /**\n * @private\n * @type {import(\"../Image.js\").default}\n */\n this.image_ = new ImageWrapper(\n this.imageExtent_,\n undefined,\n 1,\n this.url_,\n crossOrigin,\n imageLoadFunction\n );\n\n /**\n * @private\n * @type {import(\"../size.js\").Size|null}\n */\n this.imageSize_ = options.imageSize ? options.imageSize : null;\n\n this.image_.addEventListener(\n EventType.CHANGE,\n this.handleImageChange.bind(this)\n );\n }\n\n /**\n * Returns the image extent\n * @return {import(\"../extent.js\").Extent} image extent.\n * @api\n */\n getImageExtent() {\n return this.imageExtent_;\n }\n\n /**\n * @param {import(\"../extent.js\").Extent} extent Extent.\n * @param {number} resolution Resolution.\n * @param {number} pixelRatio Pixel ratio.\n * @param {import(\"../proj/Projection.js\").default} projection Projection.\n * @return {import(\"../Image.js\").default} Single image.\n */\n getImageInternal(extent, resolution, pixelRatio, projection) {\n if (intersects(extent, this.image_.getExtent())) {\n return this.image_;\n }\n return null;\n }\n\n /**\n * Return the URL used for this image source.\n * @return {string} URL.\n * @api\n */\n getUrl() {\n return this.url_;\n }\n\n /**\n * @param {import(\"../events/Event.js\").default} evt Event.\n */\n handleImageChange(evt) {\n if (this.image_.getState() == ImageState.LOADED) {\n const imageExtent = this.image_.getExtent();\n const image = this.image_.getImage();\n let imageWidth, imageHeight;\n if (this.imageSize_) {\n imageWidth = this.imageSize_[0];\n imageHeight = this.imageSize_[1];\n } else {\n imageWidth = image.width;\n imageHeight = image.height;\n }\n const extentWidth = getWidth(imageExtent);\n const extentHeight = getHeight(imageExtent);\n const xResolution = extentWidth / imageWidth;\n const yResolution = extentHeight / imageHeight;\n let targetWidth = imageWidth;\n let targetHeight = imageHeight;\n if (xResolution > yResolution) {\n targetWidth = Math.round(extentWidth / yResolution);\n } else {\n targetHeight = Math.round(extentHeight / xResolution);\n }\n if (targetWidth !== imageWidth || targetHeight !== imageHeight) {\n const context = createCanvasContext2D(targetWidth, targetHeight);\n if (!this.getInterpolate()) {\n context.imageSmoothingEnabled = false;\n }\n const canvas = context.canvas;\n context.drawImage(\n image,\n 0,\n 0,\n imageWidth,\n imageHeight,\n 0,\n 0,\n canvas.width,\n canvas.height\n );\n this.image_.setImage(canvas);\n }\n }\n super.handleImageChange(evt);\n }\n}\n\nexport default Static;\n","/**\n * @module ol/source/wms\n */\n\n/**\n * Default WMS version.\n * @type {string}\n */\nexport const DEFAULT_VERSION = '1.3.0';\n\n/**\n * @api\n * @typedef {'carmentaserver' | 'geoserver' | 'mapserver' | 'qgis'} ServerType\n * Set the server type to use implementation-specific parameters beyond the WMS specification.\n * - `'carmentaserver'`: HiDPI support for [Carmenta Server](https://www.carmenta.com/en/products/carmenta-server)\n * - `'geoserver'`: HiDPI support for [GeoServer](https://geoserver.org/)\n * - `'mapserver'`: HiDPI support for [MapServer](https://mapserver.org/)\n * - `'qgis'`: HiDPI support for [QGIS](https://qgis.org/)\n */\n","/**\n * @module ol/source/ImageWMS\n */\n\nimport EventType from '../events/EventType.js';\nimport ImageSource, {defaultImageLoadFunction} from './Image.js';\nimport ImageWrapper from '../Image.js';\nimport {DEFAULT_VERSION} from './wms.js';\nimport {appendParams} from '../uri.js';\nimport {assert} from '../asserts.js';\nimport {calculateSourceResolution} from '../reproj.js';\nimport {ceil, floor, round} from '../math.js';\nimport {compareVersions} from '../string.js';\nimport {\n containsExtent,\n getCenter,\n getForViewAndSize,\n getHeight,\n getWidth,\n} from '../extent.js';\nimport {get as getProjection, transform} from '../proj.js';\n\n/**\n * Number of decimal digits to consider in integer values when rounding.\n * @type {number}\n */\nconst DECIMALS = 4;\n\n/**\n * @const\n * @type {import(\"../size.js\").Size}\n */\nconst GETFEATUREINFO_IMAGE_SIZE = [101, 101];\n\n/**\n * @typedef {Object} Options\n * @property {import(\"./Source.js\").AttributionLike} [attributions] Attributions.\n * @property {null|string} [crossOrigin] The `crossOrigin` attribute for loaded images. Note that\n * you must provide a `crossOrigin` value if you want to access pixel data with the Canvas renderer.\n * See https://developer.mozilla.org/en-US/docs/Web/HTML/CORS_enabled_image for more detail.\n * @property {boolean} [hidpi=true] Use the `ol/Map#pixelRatio` value when requesting\n * the image from the remote server.\n * @property {import(\"./wms.js\").ServerType} [serverType] The type of\n * the remote WMS server: `mapserver`, `geoserver`, `carmentaserver`, or `qgis`.\n * Only needed if `hidpi` is `true`.\n * @property {import(\"../Image.js\").LoadFunction} [imageLoadFunction] Optional function to load an image given a URL.\n * @property {boolean} [interpolate=true] Use interpolated values when resampling. By default,\n * linear interpolation is used when resampling. Set to false to use the nearest neighbor instead.\n * @property {Object} [params] WMS request parameters.\n * At least a `LAYERS` param is required. `STYLES` is\n * `''` by default. `VERSION` is `1.3.0` by default. `WIDTH`, `HEIGHT`, `BBOX`\n * and `CRS` (`SRS` for WMS version < 1.3.0) will be set dynamically.\n * @property {import(\"../proj.js\").ProjectionLike} [projection] Projection. Default is the view projection.\n * @property {number} [ratio=1.5] Ratio. `1` means image requests are the size of the map viewport, `2` means\n * twice the width and height of the map viewport, and so on. Must be `1` or\n * higher.\n * @property {Array} [resolutions] Resolutions.\n * If specified, requests will be made for these resolutions only.\n * @property {string} [url] WMS service URL.\n */\n\n/**\n * @classdesc\n * Source for WMS servers providing single, untiled images.\n *\n * @fires module:ol/source/Image.ImageSourceEvent\n * @api\n */\nclass ImageWMS extends ImageSource {\n /**\n * @param {Options} [options] ImageWMS options.\n */\n constructor(options) {\n options = options ? options : {};\n\n super({\n attributions: options.attributions,\n interpolate: options.interpolate,\n projection: options.projection,\n resolutions: options.resolutions,\n });\n\n /**\n * @private\n * @type {?string}\n */\n this.crossOrigin_ =\n options.crossOrigin !== undefined ? options.crossOrigin : null;\n\n /**\n * @private\n * @type {string|undefined}\n */\n this.url_ = options.url;\n\n /**\n * @private\n * @type {import(\"../Image.js\").LoadFunction}\n */\n this.imageLoadFunction_ =\n options.imageLoadFunction !== undefined\n ? options.imageLoadFunction\n : defaultImageLoadFunction;\n\n /**\n * @private\n * @type {!Object}\n */\n this.params_ = Object.assign({}, options.params);\n\n /**\n * @private\n * @type {boolean}\n */\n this.v13_ = true;\n this.updateV13_();\n\n /**\n * @private\n * @type {import(\"./wms.js\").ServerType}\n */\n this.serverType_ = options.serverType;\n\n /**\n * @private\n * @type {boolean}\n */\n this.hidpi_ = options.hidpi !== undefined ? options.hidpi : true;\n\n /**\n * @private\n * @type {import(\"../Image.js\").default}\n */\n this.image_ = null;\n\n /**\n * @private\n * @type {import(\"../size.js\").Size}\n */\n this.imageSize_ = [0, 0];\n\n /**\n * @private\n * @type {number}\n */\n this.renderedRevision_ = 0;\n\n /**\n * @private\n * @type {number}\n */\n this.ratio_ = options.ratio !== undefined ? options.ratio : 1.5;\n }\n\n /**\n * Return the GetFeatureInfo URL for the passed coordinate, resolution, and\n * projection. Return `undefined` if the GetFeatureInfo URL cannot be\n * constructed.\n * @param {import(\"../coordinate.js\").Coordinate} coordinate Coordinate.\n * @param {number} resolution Resolution.\n * @param {import(\"../proj.js\").ProjectionLike} projection Projection.\n * @param {!Object} params GetFeatureInfo params. `INFO_FORMAT` at least should\n * be provided. If `QUERY_LAYERS` is not provided then the layers specified\n * in the `LAYERS` parameter will be used. `VERSION` should not be\n * specified here.\n * @return {string|undefined} GetFeatureInfo URL.\n * @api\n */\n getFeatureInfoUrl(coordinate, resolution, projection, params) {\n if (this.url_ === undefined) {\n return undefined;\n }\n const projectionObj = getProjection(projection);\n const sourceProjectionObj = this.getProjection();\n\n if (sourceProjectionObj && sourceProjectionObj !== projectionObj) {\n resolution = calculateSourceResolution(\n sourceProjectionObj,\n projectionObj,\n coordinate,\n resolution\n );\n coordinate = transform(coordinate, projectionObj, sourceProjectionObj);\n }\n\n const extent = getForViewAndSize(\n coordinate,\n resolution,\n 0,\n GETFEATUREINFO_IMAGE_SIZE\n );\n\n const baseParams = {\n 'SERVICE': 'WMS',\n 'VERSION': DEFAULT_VERSION,\n 'REQUEST': 'GetFeatureInfo',\n 'FORMAT': 'image/png',\n 'TRANSPARENT': true,\n 'QUERY_LAYERS': this.params_['LAYERS'],\n };\n Object.assign(baseParams, this.params_, params);\n\n const x = floor((coordinate[0] - extent[0]) / resolution, DECIMALS);\n const y = floor((extent[3] - coordinate[1]) / resolution, DECIMALS);\n baseParams[this.v13_ ? 'I' : 'X'] = x;\n baseParams[this.v13_ ? 'J' : 'Y'] = y;\n\n return this.getRequestUrl_(\n extent,\n GETFEATUREINFO_IMAGE_SIZE,\n 1,\n sourceProjectionObj || projectionObj,\n baseParams\n );\n }\n\n /**\n * Return the GetLegendGraphic URL, optionally optimized for the passed\n * resolution and possibly including any passed specific parameters. Returns\n * `undefined` if the GetLegendGraphic URL cannot be constructed.\n *\n * @param {number} [resolution] Resolution. If set to undefined, `SCALE`\n * will not be calculated and included in URL.\n * @param {Object} [params] GetLegendGraphic params. If `LAYER` is set, the\n * request is generated for this wms layer, else it will try to use the\n * configured wms layer. Default `FORMAT` is `image/png`.\n * `VERSION` should not be specified here.\n * @return {string|undefined} GetLegendGraphic URL.\n * @api\n */\n getLegendUrl(resolution, params) {\n if (this.url_ === undefined) {\n return undefined;\n }\n\n const baseParams = {\n 'SERVICE': 'WMS',\n 'VERSION': DEFAULT_VERSION,\n 'REQUEST': 'GetLegendGraphic',\n 'FORMAT': 'image/png',\n };\n\n if (params === undefined || params['LAYER'] === undefined) {\n const layers = this.params_.LAYERS;\n const isSingleLayer = !Array.isArray(layers) || layers.length === 1;\n if (!isSingleLayer) {\n return undefined;\n }\n baseParams['LAYER'] = layers;\n }\n\n if (resolution !== undefined) {\n const mpu = this.getProjection()\n ? this.getProjection().getMetersPerUnit()\n : 1;\n const pixelSize = 0.00028;\n baseParams['SCALE'] = (resolution * mpu) / pixelSize;\n }\n\n Object.assign(baseParams, params);\n\n return appendParams(/** @type {string} */ (this.url_), baseParams);\n }\n\n /**\n * Get the user-provided params, i.e. those passed to the constructor through\n * the \"params\" option, and possibly updated using the updateParams method.\n * @return {Object} Params.\n * @api\n */\n getParams() {\n return this.params_;\n }\n\n /**\n * @param {import(\"../extent.js\").Extent} extent Extent.\n * @param {number} resolution Resolution.\n * @param {number} pixelRatio Pixel ratio.\n * @param {import(\"../proj/Projection.js\").default} projection Projection.\n * @return {import(\"../Image.js\").default} Single image.\n */\n getImageInternal(extent, resolution, pixelRatio, projection) {\n if (this.url_ === undefined) {\n return null;\n }\n\n resolution = this.findNearestResolution(resolution);\n\n if (pixelRatio != 1 && (!this.hidpi_ || this.serverType_ === undefined)) {\n pixelRatio = 1;\n }\n\n const imageResolution = resolution / pixelRatio;\n\n const center = getCenter(extent);\n const viewWidth = ceil(getWidth(extent) / imageResolution, DECIMALS);\n const viewHeight = ceil(getHeight(extent) / imageResolution, DECIMALS);\n const viewExtent = getForViewAndSize(center, imageResolution, 0, [\n viewWidth,\n viewHeight,\n ]);\n const requestWidth = ceil(\n (this.ratio_ * getWidth(extent)) / imageResolution,\n DECIMALS\n );\n const requestHeight = ceil(\n (this.ratio_ * getHeight(extent)) / imageResolution,\n DECIMALS\n );\n const requestExtent = getForViewAndSize(center, imageResolution, 0, [\n requestWidth,\n requestHeight,\n ]);\n\n const image = this.image_;\n if (\n image &&\n this.renderedRevision_ == this.getRevision() &&\n image.getResolution() == resolution &&\n image.getPixelRatio() == pixelRatio &&\n containsExtent(image.getExtent(), viewExtent)\n ) {\n return image;\n }\n\n const params = {\n 'SERVICE': 'WMS',\n 'VERSION': DEFAULT_VERSION,\n 'REQUEST': 'GetMap',\n 'FORMAT': 'image/png',\n 'TRANSPARENT': true,\n };\n Object.assign(params, this.params_);\n\n this.imageSize_[0] = round(\n getWidth(requestExtent) / imageResolution,\n DECIMALS\n );\n this.imageSize_[1] = round(\n getHeight(requestExtent) / imageResolution,\n DECIMALS\n );\n\n const url = this.getRequestUrl_(\n requestExtent,\n this.imageSize_,\n pixelRatio,\n projection,\n params\n );\n\n this.image_ = new ImageWrapper(\n requestExtent,\n resolution,\n pixelRatio,\n url,\n this.crossOrigin_,\n this.imageLoadFunction_\n );\n\n this.renderedRevision_ = this.getRevision();\n\n this.image_.addEventListener(\n EventType.CHANGE,\n this.handleImageChange.bind(this)\n );\n\n return this.image_;\n }\n\n /**\n * Return the image load function of the source.\n * @return {import(\"../Image.js\").LoadFunction} The image load function.\n * @api\n */\n getImageLoadFunction() {\n return this.imageLoadFunction_;\n }\n\n /**\n * @param {import(\"../extent.js\").Extent} extent Extent.\n * @param {import(\"../size.js\").Size} size Size.\n * @param {number} pixelRatio Pixel ratio.\n * @param {import(\"../proj/Projection.js\").default} projection Projection.\n * @param {Object} params Params.\n * @return {string} Request URL.\n * @private\n */\n getRequestUrl_(extent, size, pixelRatio, projection, params) {\n assert(this.url_ !== undefined, 9); // `url` must be configured or set using `#setUrl()`\n\n params[this.v13_ ? 'CRS' : 'SRS'] = projection.getCode();\n\n if (!('STYLES' in this.params_)) {\n params['STYLES'] = '';\n }\n\n if (pixelRatio != 1) {\n switch (this.serverType_) {\n case 'geoserver':\n const dpi = (90 * pixelRatio + 0.5) | 0;\n if ('FORMAT_OPTIONS' in params) {\n params['FORMAT_OPTIONS'] += ';dpi:' + dpi;\n } else {\n params['FORMAT_OPTIONS'] = 'dpi:' + dpi;\n }\n break;\n case 'mapserver':\n params['MAP_RESOLUTION'] = 90 * pixelRatio;\n break;\n case 'carmentaserver':\n case 'qgis':\n params['DPI'] = 90 * pixelRatio;\n break;\n default: // Unknown `serverType` configured\n assert(false, 8);\n break;\n }\n }\n\n params['WIDTH'] = size[0];\n params['HEIGHT'] = size[1];\n\n const axisOrientation = projection.getAxisOrientation();\n let bbox;\n if (this.v13_ && axisOrientation.substr(0, 2) == 'ne') {\n bbox = [extent[1], extent[0], extent[3], extent[2]];\n } else {\n bbox = extent;\n }\n params['BBOX'] = bbox.join(',');\n\n return appendParams(/** @type {string} */ (this.url_), params);\n }\n\n /**\n * Return the URL used for this WMS source.\n * @return {string|undefined} URL.\n * @api\n */\n getUrl() {\n return this.url_;\n }\n\n /**\n * Set the image load function of the source.\n * @param {import(\"../Image.js\").LoadFunction} imageLoadFunction Image load function.\n * @api\n */\n setImageLoadFunction(imageLoadFunction) {\n this.image_ = null;\n this.imageLoadFunction_ = imageLoadFunction;\n this.changed();\n }\n\n /**\n * Set the URL to use for requests.\n * @param {string|undefined} url URL.\n * @api\n */\n setUrl(url) {\n if (url != this.url_) {\n this.url_ = url;\n this.image_ = null;\n this.changed();\n }\n }\n\n /**\n * Update the user-provided params.\n * @param {Object} params Params.\n * @api\n */\n updateParams(params) {\n Object.assign(this.params_, params);\n this.updateV13_();\n this.image_ = null;\n this.changed();\n }\n\n /**\n * @private\n */\n updateV13_() {\n const version = this.params_['VERSION'] || DEFAULT_VERSION;\n this.v13_ = compareVersions(version, '1.3') >= 0;\n }\n}\n\nexport default ImageWMS;\n","/**\n * @module ol/source/OSM\n */\n\nimport XYZ from './XYZ.js';\n\n/**\n * The attribution containing a link to the OpenStreetMap Copyright and License\n * page.\n * @const\n * @type {string}\n * @api\n */\nexport const ATTRIBUTION =\n '© ' +\n 'OpenStreetMap ' +\n 'contributors.';\n\n/**\n * @typedef {Object} Options\n * @property {import(\"./Source.js\").AttributionLike} [attributions] Attributions.\n * @property {number} [cacheSize] Initial tile cache size. Will auto-grow to hold at least the number of tiles in the viewport.\n * @property {null|string} [crossOrigin='anonymous'] The `crossOrigin` attribute for loaded images. Note that\n * you must provide a `crossOrigin` value if you want to access pixel data with the Canvas renderer.\n * See https://developer.mozilla.org/en-US/docs/Web/HTML/CORS_enabled_image for more detail.\n * @property {boolean} [interpolate=true] Use interpolated values when resampling. By default,\n * linear interpolation is used when resampling. Set to false to use the nearest neighbor instead.\n * @property {number} [maxZoom=19] Max zoom.\n * @property {boolean} [opaque=true] Whether the layer is opaque.\n * @property {number} [reprojectionErrorThreshold=0.5] Maximum allowed reprojection error (in pixels).\n * Higher values can increase reprojection performance, but decrease precision.\n * @property {import(\"../Tile.js\").LoadFunction} [tileLoadFunction] Optional function to load a tile given a URL. The default is\n * ```js\n * function(imageTile, src) {\n * imageTile.getImage().src = src;\n * };\n * ```\n * @property {number} [transition=250] Duration of the opacity transition for rendering.\n * To disable the opacity transition, pass `transition: 0`.\n * @property {string} [url='https://tile.openstreetmap.org/{z}/{x}/{y}.png'] URL template.\n * Must include `{x}`, `{y}` or `{-y}`, and `{z}` placeholders.\n * @property {boolean} [wrapX=true] Whether to wrap the world horizontally.\n * @property {number|import(\"../array.js\").NearestDirectionFunction} [zDirection=0]\n * Choose whether to use tiles with a higher or lower zoom level when between integer\n * zoom levels. See {@link module:ol/tilegrid/TileGrid~TileGrid#getZForResolution}.\n */\n\n/**\n * @classdesc\n * Layer source for the OpenStreetMap tile server.\n * @api\n */\nclass OSM extends XYZ {\n /**\n * @param {Options} [options] Open Street Map options.\n */\n constructor(options) {\n options = options || {};\n\n let attributions;\n if (options.attributions !== undefined) {\n attributions = options.attributions;\n } else {\n attributions = [ATTRIBUTION];\n }\n\n const crossOrigin =\n options.crossOrigin !== undefined ? options.crossOrigin : 'anonymous';\n\n const url =\n options.url !== undefined\n ? options.url\n : 'https://tile.openstreetmap.org/{z}/{x}/{y}.png';\n\n super({\n attributions: attributions,\n attributionsCollapsible: false,\n cacheSize: options.cacheSize,\n crossOrigin: crossOrigin,\n interpolate: options.interpolate,\n maxZoom: options.maxZoom !== undefined ? options.maxZoom : 19,\n opaque: options.opaque !== undefined ? options.opaque : true,\n reprojectionErrorThreshold: options.reprojectionErrorThreshold,\n tileLoadFunction: options.tileLoadFunction,\n transition: options.transition,\n url: url,\n wrapX: options.wrapX,\n zDirection: options.zDirection,\n });\n }\n}\n\nexport default OSM;\n","/**\n * @module ol/layer/BaseImage\n */\nimport Layer from './Layer.js';\n\n/**\n * @template {import(\"../source/Image.js\").default} ImageSourceType\n * @typedef {Object} Options\n * @property {string} [className='ol-layer'] A CSS class name to set to the layer element.\n * @property {number} [opacity=1] Opacity (0, 1).\n * @property {boolean} [visible=true] Visibility.\n * @property {import(\"../extent.js\").Extent} [extent] The bounding extent for layer rendering. The layer will not be\n * rendered outside of this extent.\n * @property {number} [zIndex] The z-index for layer rendering. At rendering time, the layers\n * will be ordered, first by Z-index and then by position. When `undefined`, a `zIndex` of 0 is assumed\n * for layers that are added to the map's `layers` collection, or `Infinity` when the layer's `setMap()`\n * method was used.\n * @property {number} [minResolution] The minimum resolution (inclusive) at which this layer will be\n * visible.\n * @property {number} [maxResolution] The maximum resolution (exclusive) below which this layer will\n * be visible.\n * @property {number} [minZoom] The minimum view zoom level (exclusive) above which this layer will be\n * visible.\n * @property {number} [maxZoom] The maximum view zoom level (inclusive) at which this layer will\n * be visible.\n * @property {import(\"../Map.js\").default} [map] Sets the layer as overlay on a map. The map will not manage\n * this layer in its layers collection, and the layer will be rendered on top. This is useful for\n * temporary layers. The standard way to add a layer to a map and have it managed by the map is to\n * use {@link import(\"../Map.js\").default#addLayer map.addLayer()}.\n * @property {ImageSourceType} [source] Source for this layer.\n * @property {Object} [properties] Arbitrary observable properties. Can be accessed with `#get()` and `#set()`.\n */\n\n/**\n * @classdesc\n * Server-rendered images that are available for arbitrary extents and\n * resolutions.\n * Note that any property set in the options is set as a {@link module:ol/Object~BaseObject}\n * property on the layer object; for example, setting `title: 'My Title'` in the\n * options means that `title` is observable, and has get/set accessors.\n *\n * @template {import(\"../source/Image.js\").default} ImageSourceType\n * @template {import(\"../renderer/Layer.js\").default} RendererType\n * @extends {Layer}\n * @api\n */\nclass BaseImageLayer extends Layer {\n /**\n * @param {Options} [options] Layer options.\n */\n constructor(options) {\n options = options ? options : {};\n super(options);\n }\n}\n\nexport default BaseImageLayer;\n","/**\n * @module ol/renderer/Layer\n */\nimport EventType from '../events/EventType.js';\nimport ImageState from '../ImageState.js';\nimport Observable from '../Observable.js';\nimport {abstract} from '../util.js';\n\n/**\n * @template {import(\"../layer/Layer.js\").default} LayerType\n */\nclass LayerRenderer extends Observable {\n /**\n * @param {LayerType} layer Layer.\n */\n constructor(layer) {\n super();\n\n /**\n * The renderer is initialized and ready to render.\n * @type {boolean}\n */\n this.ready = true;\n\n /** @private */\n this.boundHandleImageChange_ = this.handleImageChange_.bind(this);\n\n /**\n * @protected\n * @type {LayerType}\n */\n this.layer_ = layer;\n\n /**\n * @type {import(\"../render/canvas/ExecutorGroup\").default}\n */\n this.declutterExecutorGroup = null;\n }\n\n /**\n * Asynchronous layer level hit detection.\n * @param {import(\"../pixel.js\").Pixel} pixel Pixel.\n * @return {Promise>} Promise that resolves with\n * an array of features.\n */\n getFeatures(pixel) {\n return abstract();\n }\n\n /**\n * @param {import(\"../pixel.js\").Pixel} pixel Pixel.\n * @return {Uint8ClampedArray|Uint8Array|Float32Array|DataView|null} Pixel data.\n */\n getData(pixel) {\n return null;\n }\n\n /**\n * Determine whether render should be called.\n * @abstract\n * @param {import(\"../Map.js\").FrameState} frameState Frame state.\n * @return {boolean} Layer is ready to be rendered.\n */\n prepareFrame(frameState) {\n return abstract();\n }\n\n /**\n * Render the layer.\n * @abstract\n * @param {import(\"../Map.js\").FrameState} frameState Frame state.\n * @param {HTMLElement} target Target that may be used to render content to.\n * @return {HTMLElement} The rendered element.\n */\n renderFrame(frameState, target) {\n return abstract();\n }\n\n /**\n * @param {Object>} tiles Lookup of loaded tiles by zoom level.\n * @param {number} zoom Zoom level.\n * @param {import(\"../Tile.js\").default} tile Tile.\n * @return {boolean|void} If `false`, the tile will not be considered loaded.\n */\n loadedTileCallback(tiles, zoom, tile) {\n if (!tiles[zoom]) {\n tiles[zoom] = {};\n }\n tiles[zoom][tile.tileCoord.toString()] = tile;\n return undefined;\n }\n\n /**\n * Create a function that adds loaded tiles to the tile lookup.\n * @param {import(\"../source/Tile.js\").default} source Tile source.\n * @param {import(\"../proj/Projection.js\").default} projection Projection of the tiles.\n * @param {Object>} tiles Lookup of loaded tiles by zoom level.\n * @return {function(number, import(\"../TileRange.js\").default):boolean} A function that can be\n * called with a zoom level and a tile range to add loaded tiles to the lookup.\n * @protected\n */\n createLoadedTileFinder(source, projection, tiles) {\n return (\n /**\n * @param {number} zoom Zoom level.\n * @param {import(\"../TileRange.js\").default} tileRange Tile range.\n * @return {boolean} The tile range is fully loaded.\n */\n (zoom, tileRange) => {\n const callback = this.loadedTileCallback.bind(this, tiles, zoom);\n return source.forEachLoadedTile(projection, zoom, tileRange, callback);\n }\n );\n }\n /**\n * @abstract\n * @param {import(\"../coordinate.js\").Coordinate} coordinate Coordinate.\n * @param {import(\"../Map.js\").FrameState} frameState Frame state.\n * @param {number} hitTolerance Hit tolerance in pixels.\n * @param {import(\"./vector.js\").FeatureCallback} callback Feature callback.\n * @param {Array>} matches The hit detected matches with tolerance.\n * @return {T|undefined} Callback result.\n * @template T\n */\n forEachFeatureAtCoordinate(\n coordinate,\n frameState,\n hitTolerance,\n callback,\n matches\n ) {\n return undefined;\n }\n\n /**\n * @return {LayerType} Layer.\n */\n getLayer() {\n return this.layer_;\n }\n\n /**\n * Perform action necessary to get the layer rendered after new fonts have loaded\n * @abstract\n */\n handleFontsChanged() {}\n\n /**\n * Handle changes in image state.\n * @param {import(\"../events/Event.js\").default} event Image change event.\n * @private\n */\n handleImageChange_(event) {\n const image = /** @type {import(\"../Image.js\").default} */ (event.target);\n if (image.getState() === ImageState.LOADED) {\n this.renderIfReadyAndVisible();\n }\n }\n\n /**\n * Load the image if not already loaded, and register the image change\n * listener if needed.\n * @param {import(\"../ImageBase.js\").default} image Image.\n * @return {boolean} `true` if the image is already loaded, `false` otherwise.\n * @protected\n */\n loadImage(image) {\n let imageState = image.getState();\n if (imageState != ImageState.LOADED && imageState != ImageState.ERROR) {\n image.addEventListener(EventType.CHANGE, this.boundHandleImageChange_);\n }\n if (imageState == ImageState.IDLE) {\n image.load();\n imageState = image.getState();\n }\n return imageState == ImageState.LOADED;\n }\n\n /**\n * @protected\n */\n renderIfReadyAndVisible() {\n const layer = this.getLayer();\n if (layer && layer.getVisible() && layer.getSourceState() === 'ready') {\n layer.changed();\n }\n }\n\n /**\n * Clean up.\n */\n disposeInternal() {\n delete this.layer_;\n super.disposeInternal();\n }\n}\n\nexport default LayerRenderer;\n","/**\n * @module ol/renderer/canvas/Layer\n */\nimport LayerRenderer from '../Layer.js';\nimport RenderEvent from '../../render/Event.js';\nimport RenderEventType from '../../render/EventType.js';\nimport {\n apply as applyTransform,\n compose as composeTransform,\n create as createTransform,\n} from '../../transform.js';\nimport {asArray} from '../../color.js';\nimport {createCanvasContext2D} from '../../dom.js';\nimport {equals} from '../../array.js';\nimport {\n getBottomLeft,\n getBottomRight,\n getTopLeft,\n getTopRight,\n} from '../../extent.js';\n\n/**\n * @type {Array}\n */\nexport const canvasPool = [];\n\n/**\n * @type {CanvasRenderingContext2D}\n */\nlet pixelContext = null;\n\nfunction createPixelContext() {\n pixelContext = createCanvasContext2D(1, 1, undefined, {\n willReadFrequently: true,\n });\n}\n\n/**\n * @abstract\n * @template {import(\"../../layer/Layer.js\").default} LayerType\n * @extends {LayerRenderer}\n */\nclass CanvasLayerRenderer extends LayerRenderer {\n /**\n * @param {LayerType} layer Layer.\n */\n constructor(layer) {\n super(layer);\n\n /**\n * @protected\n * @type {HTMLElement}\n */\n this.container = null;\n\n /**\n * @protected\n * @type {number}\n */\n this.renderedResolution;\n\n /**\n * A temporary transform. The values in this transform should only be used in a\n * function that sets the values.\n * @protected\n * @type {import(\"../../transform.js\").Transform}\n */\n this.tempTransform = createTransform();\n\n /**\n * The transform for rendered pixels to viewport CSS pixels. This transform must\n * be set when rendering a frame and may be used by other functions after rendering.\n * @protected\n * @type {import(\"../../transform.js\").Transform}\n */\n this.pixelTransform = createTransform();\n\n /**\n * The transform for viewport CSS pixels to rendered pixels. This transform must\n * be set when rendering a frame and may be used by other functions after rendering.\n * @protected\n * @type {import(\"../../transform.js\").Transform}\n */\n this.inversePixelTransform = createTransform();\n\n /**\n * @type {CanvasRenderingContext2D}\n */\n this.context = null;\n\n /**\n * @type {boolean}\n */\n this.containerReused = false;\n\n /**\n * @private\n * @type {CanvasRenderingContext2D}\n */\n this.pixelContext_ = null;\n\n /**\n * @protected\n * @type {import(\"../../Map.js\").FrameState|null}\n */\n this.frameState = null;\n }\n\n /**\n * @param {HTMLCanvasElement|HTMLImageElement|HTMLVideoElement} image Image.\n * @param {number} col The column index.\n * @param {number} row The row index.\n * @return {Uint8ClampedArray|null} The image data.\n */\n getImageData(image, col, row) {\n if (!pixelContext) {\n createPixelContext();\n }\n pixelContext.clearRect(0, 0, 1, 1);\n\n let data;\n try {\n pixelContext.drawImage(image, col, row, 1, 1, 0, 0, 1, 1);\n data = pixelContext.getImageData(0, 0, 1, 1).data;\n } catch (err) {\n pixelContext = null;\n return null;\n }\n return data;\n }\n\n /**\n * @param {import('../../Map.js').FrameState} frameState Frame state.\n * @return {string} Background color.\n */\n getBackground(frameState) {\n const layer = this.getLayer();\n let background = layer.getBackground();\n if (typeof background === 'function') {\n background = background(frameState.viewState.resolution);\n }\n return background || undefined;\n }\n\n /**\n * Get a rendering container from an existing target, if compatible.\n * @param {HTMLElement} target Potential render target.\n * @param {string} transform CSS Transform.\n * @param {string} [backgroundColor] Background color.\n */\n useContainer(target, transform, backgroundColor) {\n const layerClassName = this.getLayer().getClassName();\n let container, context;\n if (\n target &&\n target.className === layerClassName &&\n (!backgroundColor ||\n (target &&\n target.style.backgroundColor &&\n equals(\n asArray(target.style.backgroundColor),\n asArray(backgroundColor)\n )))\n ) {\n const canvas = target.firstElementChild;\n if (canvas instanceof HTMLCanvasElement) {\n context = canvas.getContext('2d');\n }\n }\n if (context && context.canvas.style.transform === transform) {\n // Container of the previous layer renderer can be used.\n this.container = target;\n this.context = context;\n this.containerReused = true;\n } else if (this.containerReused) {\n // Previously reused container cannot be used any more.\n this.container = null;\n this.context = null;\n this.containerReused = false;\n }\n if (!this.container) {\n container = document.createElement('div');\n container.className = layerClassName;\n let style = container.style;\n style.position = 'absolute';\n style.width = '100%';\n style.height = '100%';\n context = createCanvasContext2D();\n const canvas = context.canvas;\n container.appendChild(canvas);\n style = canvas.style;\n style.position = 'absolute';\n style.left = '0';\n style.transformOrigin = 'top left';\n this.container = container;\n this.context = context;\n }\n if (\n !this.containerReused &&\n backgroundColor &&\n !this.container.style.backgroundColor\n ) {\n this.container.style.backgroundColor = backgroundColor;\n }\n }\n\n /**\n * @param {CanvasRenderingContext2D} context Context.\n * @param {import(\"../../Map.js\").FrameState} frameState Frame state.\n * @param {import(\"../../extent.js\").Extent} extent Clip extent.\n * @protected\n */\n clipUnrotated(context, frameState, extent) {\n const topLeft = getTopLeft(extent);\n const topRight = getTopRight(extent);\n const bottomRight = getBottomRight(extent);\n const bottomLeft = getBottomLeft(extent);\n\n applyTransform(frameState.coordinateToPixelTransform, topLeft);\n applyTransform(frameState.coordinateToPixelTransform, topRight);\n applyTransform(frameState.coordinateToPixelTransform, bottomRight);\n applyTransform(frameState.coordinateToPixelTransform, bottomLeft);\n\n const inverted = this.inversePixelTransform;\n applyTransform(inverted, topLeft);\n applyTransform(inverted, topRight);\n applyTransform(inverted, bottomRight);\n applyTransform(inverted, bottomLeft);\n\n context.save();\n context.beginPath();\n context.moveTo(Math.round(topLeft[0]), Math.round(topLeft[1]));\n context.lineTo(Math.round(topRight[0]), Math.round(topRight[1]));\n context.lineTo(Math.round(bottomRight[0]), Math.round(bottomRight[1]));\n context.lineTo(Math.round(bottomLeft[0]), Math.round(bottomLeft[1]));\n context.clip();\n }\n\n /**\n * @param {import(\"../../render/EventType.js\").default} type Event type.\n * @param {CanvasRenderingContext2D} context Context.\n * @param {import(\"../../Map.js\").FrameState} frameState Frame state.\n * @private\n */\n dispatchRenderEvent_(type, context, frameState) {\n const layer = this.getLayer();\n if (layer.hasListener(type)) {\n const event = new RenderEvent(\n type,\n this.inversePixelTransform,\n frameState,\n context\n );\n layer.dispatchEvent(event);\n }\n }\n\n /**\n * @param {CanvasRenderingContext2D} context Context.\n * @param {import(\"../../Map.js\").FrameState} frameState Frame state.\n * @protected\n */\n preRender(context, frameState) {\n this.frameState = frameState;\n this.dispatchRenderEvent_(RenderEventType.PRERENDER, context, frameState);\n }\n\n /**\n * @param {CanvasRenderingContext2D} context Context.\n * @param {import(\"../../Map.js\").FrameState} frameState Frame state.\n * @protected\n */\n postRender(context, frameState) {\n this.dispatchRenderEvent_(RenderEventType.POSTRENDER, context, frameState);\n }\n\n /**\n * Creates a transform for rendering to an element that will be rotated after rendering.\n * @param {import(\"../../coordinate.js\").Coordinate} center Center.\n * @param {number} resolution Resolution.\n * @param {number} rotation Rotation.\n * @param {number} pixelRatio Pixel ratio.\n * @param {number} width Width of the rendered element (in pixels).\n * @param {number} height Height of the rendered element (in pixels).\n * @param {number} offsetX Offset on the x-axis in view coordinates.\n * @protected\n * @return {!import(\"../../transform.js\").Transform} Transform.\n */\n getRenderTransform(\n center,\n resolution,\n rotation,\n pixelRatio,\n width,\n height,\n offsetX\n ) {\n const dx1 = width / 2;\n const dy1 = height / 2;\n const sx = pixelRatio / resolution;\n const sy = -sx;\n const dx2 = -center[0] + offsetX;\n const dy2 = -center[1];\n return composeTransform(\n this.tempTransform,\n dx1,\n dy1,\n sx,\n sy,\n -rotation,\n dx2,\n dy2\n );\n }\n\n /**\n * Clean up.\n */\n disposeInternal() {\n delete this.frameState;\n super.disposeInternal();\n }\n}\n\nexport default CanvasLayerRenderer;\n","/**\n * @module ol/renderer/canvas/ImageLayer\n */\nimport CanvasLayerRenderer from './Layer.js';\nimport ImageState from '../../ImageState.js';\nimport ViewHint from '../../ViewHint.js';\nimport {\n apply as applyTransform,\n compose as composeTransform,\n makeInverse,\n toString as toTransformString,\n} from '../../transform.js';\nimport {\n containsCoordinate,\n containsExtent,\n getHeight,\n getIntersection,\n getWidth,\n intersects as intersectsExtent,\n isEmpty,\n} from '../../extent.js';\nimport {fromUserExtent} from '../../proj.js';\n\n/**\n * @classdesc\n * Canvas renderer for image layers.\n * @api\n */\nclass CanvasImageLayerRenderer extends CanvasLayerRenderer {\n /**\n * @param {import(\"../../layer/Image.js\").default} imageLayer Image layer.\n */\n constructor(imageLayer) {\n super(imageLayer);\n\n /**\n * @protected\n * @type {?import(\"../../ImageBase.js\").default}\n */\n this.image_ = null;\n }\n\n /**\n * @return {HTMLCanvasElement|HTMLImageElement|HTMLVideoElement} Image.\n */\n getImage() {\n return !this.image_ ? null : this.image_.getImage();\n }\n\n /**\n * Determine whether render should be called.\n * @param {import(\"../../Map.js\").FrameState} frameState Frame state.\n * @return {boolean} Layer is ready to be rendered.\n */\n prepareFrame(frameState) {\n const layerState = frameState.layerStatesArray[frameState.layerIndex];\n const pixelRatio = frameState.pixelRatio;\n const viewState = frameState.viewState;\n const viewResolution = viewState.resolution;\n\n const imageSource = this.getLayer().getSource();\n\n const hints = frameState.viewHints;\n\n let renderedExtent = frameState.extent;\n if (layerState.extent !== undefined) {\n renderedExtent = getIntersection(\n renderedExtent,\n fromUserExtent(layerState.extent, viewState.projection)\n );\n }\n\n if (\n !hints[ViewHint.ANIMATING] &&\n !hints[ViewHint.INTERACTING] &&\n !isEmpty(renderedExtent)\n ) {\n if (imageSource) {\n const projection = viewState.projection;\n const image = imageSource.getImage(\n renderedExtent,\n viewResolution,\n pixelRatio,\n projection\n );\n if (image) {\n if (this.loadImage(image)) {\n this.image_ = image;\n } else if (image.getState() === ImageState.EMPTY) {\n this.image_ = null;\n }\n }\n } else {\n this.image_ = null;\n }\n }\n\n return !!this.image_;\n }\n\n /**\n * @param {import(\"../../pixel.js\").Pixel} pixel Pixel.\n * @return {Uint8ClampedArray} Data at the pixel location.\n */\n getData(pixel) {\n const frameState = this.frameState;\n if (!frameState) {\n return null;\n }\n\n const layer = this.getLayer();\n const coordinate = applyTransform(\n frameState.pixelToCoordinateTransform,\n pixel.slice()\n );\n\n const layerExtent = layer.getExtent();\n if (layerExtent) {\n if (!containsCoordinate(layerExtent, coordinate)) {\n return null;\n }\n }\n\n const imageExtent = this.image_.getExtent();\n const img = this.image_.getImage();\n\n const imageMapWidth = getWidth(imageExtent);\n const col = Math.floor(\n img.width * ((coordinate[0] - imageExtent[0]) / imageMapWidth)\n );\n if (col < 0 || col >= img.width) {\n return null;\n }\n\n const imageMapHeight = getHeight(imageExtent);\n const row = Math.floor(\n img.height * ((imageExtent[3] - coordinate[1]) / imageMapHeight)\n );\n if (row < 0 || row >= img.height) {\n return null;\n }\n\n return this.getImageData(img, col, row);\n }\n\n /**\n * Render the layer.\n * @param {import(\"../../Map.js\").FrameState} frameState Frame state.\n * @param {HTMLElement} target Target that may be used to render content to.\n * @return {HTMLElement} The rendered element.\n */\n renderFrame(frameState, target) {\n const image = this.image_;\n const imageExtent = image.getExtent();\n const imageResolution = image.getResolution();\n const imagePixelRatio = image.getPixelRatio();\n const layerState = frameState.layerStatesArray[frameState.layerIndex];\n const pixelRatio = frameState.pixelRatio;\n const viewState = frameState.viewState;\n const viewCenter = viewState.center;\n const viewResolution = viewState.resolution;\n const scale =\n (pixelRatio * imageResolution) / (viewResolution * imagePixelRatio);\n\n const extent = frameState.extent;\n const resolution = viewState.resolution;\n const rotation = viewState.rotation;\n // desired dimensions of the canvas in pixels\n const width = Math.round((getWidth(extent) / resolution) * pixelRatio);\n const height = Math.round((getHeight(extent) / resolution) * pixelRatio);\n\n // set forward and inverse pixel transforms\n composeTransform(\n this.pixelTransform,\n frameState.size[0] / 2,\n frameState.size[1] / 2,\n 1 / pixelRatio,\n 1 / pixelRatio,\n rotation,\n -width / 2,\n -height / 2\n );\n makeInverse(this.inversePixelTransform, this.pixelTransform);\n\n const canvasTransform = toTransformString(this.pixelTransform);\n\n this.useContainer(target, canvasTransform, this.getBackground(frameState));\n\n const context = this.context;\n const canvas = context.canvas;\n\n if (canvas.width != width || canvas.height != height) {\n canvas.width = width;\n canvas.height = height;\n } else if (!this.containerReused) {\n context.clearRect(0, 0, width, height);\n }\n\n // clipped rendering if layer extent is set\n let clipped = false;\n let render = true;\n if (layerState.extent) {\n const layerExtent = fromUserExtent(\n layerState.extent,\n viewState.projection\n );\n render = intersectsExtent(layerExtent, frameState.extent);\n clipped = render && !containsExtent(layerExtent, frameState.extent);\n if (clipped) {\n this.clipUnrotated(context, frameState, layerExtent);\n }\n }\n\n const img = image.getImage();\n\n const transform = composeTransform(\n this.tempTransform,\n width / 2,\n height / 2,\n scale,\n scale,\n 0,\n (imagePixelRatio * (imageExtent[0] - viewCenter[0])) / imageResolution,\n (imagePixelRatio * (viewCenter[1] - imageExtent[3])) / imageResolution\n );\n\n this.renderedResolution = (imageResolution * pixelRatio) / imagePixelRatio;\n\n const dw = img.width * transform[0];\n const dh = img.height * transform[3];\n\n if (!this.getLayer().getSource().getInterpolate()) {\n context.imageSmoothingEnabled = false;\n }\n\n this.preRender(context, frameState);\n if (render && dw >= 0.5 && dh >= 0.5) {\n const dx = transform[4];\n const dy = transform[5];\n const opacity = layerState.opacity;\n let previousAlpha;\n if (opacity !== 1) {\n previousAlpha = context.globalAlpha;\n context.globalAlpha = opacity;\n }\n context.drawImage(img, 0, 0, +img.width, +img.height, dx, dy, dw, dh);\n if (opacity !== 1) {\n context.globalAlpha = previousAlpha;\n }\n }\n this.postRender(context, frameState);\n\n if (clipped) {\n context.restore();\n }\n context.imageSmoothingEnabled = true;\n\n if (canvasTransform !== canvas.style.transform) {\n canvas.style.transform = canvasTransform;\n }\n\n return this.container;\n }\n}\n\nexport default CanvasImageLayerRenderer;\n","/**\n * @module ol/layer/Image\n */\nimport BaseImageLayer from './BaseImage.js';\nimport CanvasImageLayerRenderer from '../renderer/canvas/ImageLayer.js';\n\n/**\n * @classdesc\n * Server-rendered images that are available for arbitrary extents and\n * resolutions.\n * Note that any property set in the options is set as a {@link module:ol/Object~BaseObject}\n * property on the layer object; for example, setting `title: 'My Title'` in the\n * options means that `title` is observable, and has get/set accessors.\n *\n * @template {import(\"../source/Image.js\").default} ImageSourceType\n * @extends {BaseImageLayer}\n * @api\n */\nclass ImageLayer extends BaseImageLayer {\n /**\n * @param {import(\"./BaseImage.js\").Options} [options] Layer options.\n */\n constructor(options) {\n super(options);\n }\n\n createRenderer() {\n return new CanvasImageLayerRenderer(this);\n }\n\n /**\n * Get data for a pixel location. A four element RGBA array will be returned. For requests outside the\n * layer extent, `null` will be returned. Data for an image can only be retrieved if the\n * source's `crossOrigin` property is set.\n *\n * ```js\n * // display layer data on every pointer move\n * map.on('pointermove', (event) => {\n * console.log(layer.getData(event.pixel));\n * });\n * ```\n * @param {import(\"../pixel\").Pixel} pixel Pixel.\n * @return {Uint8ClampedArray|Uint8Array|Float32Array|DataView|null} Pixel data.\n * @api\n */\n getData(pixel) {\n return super.getData(pixel);\n }\n}\n\nexport default ImageLayer;\n","/**\n * @module ol/layer/TileProperty\n */\n\n/**\n * @enum {string}\n */\nexport default {\n PRELOAD: 'preload',\n USE_INTERIM_TILES_ON_ERROR: 'useInterimTilesOnError',\n};\n","/**\n * @module ol/layer/BaseTile\n */\nimport Layer from './Layer.js';\nimport TileProperty from './TileProperty.js';\n\n/***\n * @template Return\n * @typedef {import(\"../Observable\").OnSignature &\n * import(\"../Observable\").OnSignature &\n * import(\"../Observable\").OnSignature &\n * import(\"../Observable\").CombinedOnSignature} BaseTileLayerOnSignature\n */\n\n/**\n * @template {import(\"../source/Tile.js\").default} TileSourceType\n * @typedef {Object} Options\n * @property {string} [className='ol-layer'] A CSS class name to set to the layer element.\n * @property {number} [opacity=1] Opacity (0, 1).\n * @property {boolean} [visible=true] Visibility.\n * @property {import(\"../extent.js\").Extent} [extent] The bounding extent for layer rendering. The layer will not be\n * rendered outside of this extent.\n * @property {number} [zIndex] The z-index for layer rendering. At rendering time, the layers\n * will be ordered, first by Z-index and then by position. When `undefined`, a `zIndex` of 0 is assumed\n * for layers that are added to the map's `layers` collection, or `Infinity` when the layer's `setMap()`\n * method was used.\n * @property {number} [minResolution] The minimum resolution (inclusive) at which this layer will be\n * visible.\n * @property {number} [maxResolution] The maximum resolution (exclusive) below which this layer will\n * be visible.\n * @property {number} [minZoom] The minimum view zoom level (exclusive) above which this layer will be\n * visible.\n * @property {number} [maxZoom] The maximum view zoom level (inclusive) at which this layer will\n * be visible.\n * @property {number} [preload=0] Preload. Load low-resolution tiles up to `preload` levels. `0`\n * means no preloading.\n * @property {TileSourceType} [source] Source for this layer.\n * @property {import(\"../Map.js\").default} [map] Sets the layer as overlay on a map. The map will not manage\n * this layer in its layers collection, and the layer will be rendered on top. This is useful for\n * temporary layers. The standard way to add a layer to a map and have it managed by the map is to\n * use {@link import(\"../Map.js\").default#addLayer map.addLayer()}.\n * @property {boolean} [useInterimTilesOnError=true] Use interim tiles on error.\n * @property {Object} [properties] Arbitrary observable properties. Can be accessed with `#get()` and `#set()`.\n */\n\n/**\n * @classdesc\n * For layer sources that provide pre-rendered, tiled images in grids that are\n * organized by zoom levels for specific resolutions.\n * Note that any property set in the options is set as a {@link module:ol/Object~BaseObject}\n * property on the layer object; for example, setting `title: 'My Title'` in the\n * options means that `title` is observable, and has get/set accessors.\n *\n * @template {import(\"../source/Tile.js\").default} TileSourceType\n * @template {import(\"../renderer/Layer.js\").default} RendererType\n * @extends {Layer}\n * @api\n */\nclass BaseTileLayer extends Layer {\n /**\n * @param {Options} [options] Tile layer options.\n */\n constructor(options) {\n options = options ? options : {};\n\n const baseOptions = Object.assign({}, options);\n\n delete baseOptions.preload;\n delete baseOptions.useInterimTilesOnError;\n super(baseOptions);\n\n /***\n * @type {BaseTileLayerOnSignature}\n */\n this.on;\n\n /***\n * @type {BaseTileLayerOnSignature}\n */\n this.once;\n\n /***\n * @type {BaseTileLayerOnSignature}\n */\n this.un;\n\n this.setPreload(options.preload !== undefined ? options.preload : 0);\n this.setUseInterimTilesOnError(\n options.useInterimTilesOnError !== undefined\n ? options.useInterimTilesOnError\n : true\n );\n }\n\n /**\n * Return the level as number to which we will preload tiles up to.\n * @return {number} The level to preload tiles up to.\n * @observable\n * @api\n */\n getPreload() {\n return /** @type {number} */ (this.get(TileProperty.PRELOAD));\n }\n\n /**\n * Set the level as number to which we will preload tiles up to.\n * @param {number} preload The level to preload tiles up to.\n * @observable\n * @api\n */\n setPreload(preload) {\n this.set(TileProperty.PRELOAD, preload);\n }\n\n /**\n * Whether we use interim tiles on error.\n * @return {boolean} Use interim tiles on error.\n * @observable\n * @api\n */\n getUseInterimTilesOnError() {\n return /** @type {boolean} */ (\n this.get(TileProperty.USE_INTERIM_TILES_ON_ERROR)\n );\n }\n\n /**\n * Set whether we use interim tiles on error.\n * @param {boolean} useInterimTilesOnError Use interim tiles on error.\n * @observable\n * @api\n */\n setUseInterimTilesOnError(useInterimTilesOnError) {\n this.set(TileProperty.USE_INTERIM_TILES_ON_ERROR, useInterimTilesOnError);\n }\n\n /**\n * Get data for a pixel location. The return type depends on the source data. For image tiles,\n * a four element RGBA array will be returned. For data tiles, the array length will match the\n * number of bands in the dataset. For requests outside the layer extent, `null` will be returned.\n * Data for a image tiles can only be retrieved if the source's `crossOrigin` property is set.\n *\n * ```js\n * // display layer data on every pointer move\n * map.on('pointermove', (event) => {\n * console.log(layer.getData(event.pixel));\n * });\n * ```\n * @param {import(\"../pixel\").Pixel} pixel Pixel.\n * @return {Uint8ClampedArray|Uint8Array|Float32Array|DataView|null} Pixel data.\n * @api\n */\n getData(pixel) {\n return super.getData(pixel);\n }\n}\n\nexport default BaseTileLayer;\n","/**\n * @module ol/renderer/canvas/TileLayer\n */\nimport CanvasLayerRenderer from './Layer.js';\nimport ImageTile from '../../ImageTile.js';\nimport ReprojTile from '../../reproj/Tile.js';\nimport TileRange from '../../TileRange.js';\nimport TileState from '../../TileState.js';\nimport {\n apply as applyTransform,\n compose as composeTransform,\n makeInverse,\n toString as toTransformString,\n} from '../../transform.js';\nimport {ascending} from '../../array.js';\nimport {\n containsCoordinate,\n createEmpty,\n equals,\n getHeight,\n getIntersection,\n getRotatedViewport,\n getTopLeft,\n getWidth,\n intersects,\n} from '../../extent.js';\nimport {fromUserExtent} from '../../proj.js';\nimport {getUid} from '../../util.js';\nimport {toSize} from '../../size.js';\n\n/**\n * @classdesc\n * Canvas renderer for tile layers.\n * @api\n * @template {import(\"../../layer/Tile.js\").default|import(\"../../layer/VectorTile.js\").default} [LayerType=import(\"../../layer/Tile.js\").default|import(\"../../layer/VectorTile.js\").default]\n * @extends {CanvasLayerRenderer}\n */\nclass CanvasTileLayerRenderer extends CanvasLayerRenderer {\n /**\n * @param {LayerType} tileLayer Tile layer.\n */\n constructor(tileLayer) {\n super(tileLayer);\n\n /**\n * Rendered extent has changed since the previous `renderFrame()` call\n * @type {boolean}\n */\n this.extentChanged = true;\n\n /**\n * @private\n * @type {?import(\"../../extent.js\").Extent}\n */\n this.renderedExtent_ = null;\n\n /**\n * @protected\n * @type {number}\n */\n this.renderedPixelRatio;\n\n /**\n * @protected\n * @type {import(\"../../proj/Projection.js\").default}\n */\n this.renderedProjection = null;\n\n /**\n * @protected\n * @type {number}\n */\n this.renderedRevision;\n\n /**\n * @protected\n * @type {!Array}\n */\n this.renderedTiles = [];\n\n /**\n * @private\n * @type {boolean}\n */\n this.newTiles_ = false;\n\n /**\n * @protected\n * @type {import(\"../../extent.js\").Extent}\n */\n this.tmpExtent = createEmpty();\n\n /**\n * @private\n * @type {import(\"../../TileRange.js\").default}\n */\n this.tmpTileRange_ = new TileRange(0, 0, 0, 0);\n }\n\n /**\n * @protected\n * @param {import(\"../../Tile.js\").default} tile Tile.\n * @return {boolean} Tile is drawable.\n */\n isDrawableTile(tile) {\n const tileLayer = this.getLayer();\n const tileState = tile.getState();\n const useInterimTilesOnError = tileLayer.getUseInterimTilesOnError();\n return (\n tileState == TileState.LOADED ||\n tileState == TileState.EMPTY ||\n (tileState == TileState.ERROR && !useInterimTilesOnError)\n );\n }\n\n /**\n * @param {number} z Tile coordinate z.\n * @param {number} x Tile coordinate x.\n * @param {number} y Tile coordinate y.\n * @param {import(\"../../Map.js\").FrameState} frameState Frame state.\n * @return {!import(\"../../Tile.js\").default} Tile.\n */\n getTile(z, x, y, frameState) {\n const pixelRatio = frameState.pixelRatio;\n const projection = frameState.viewState.projection;\n const tileLayer = this.getLayer();\n const tileSource = tileLayer.getSource();\n let tile = tileSource.getTile(z, x, y, pixelRatio, projection);\n if (tile.getState() == TileState.ERROR) {\n if (tileLayer.getUseInterimTilesOnError() && tileLayer.getPreload() > 0) {\n // Preloaded tiles for lower resolutions might have finished loading.\n this.newTiles_ = true;\n }\n }\n if (!this.isDrawableTile(tile)) {\n tile = tile.getInterimTile();\n }\n return tile;\n }\n\n /**\n * @param {import(\"../../pixel.js\").Pixel} pixel Pixel.\n * @return {Uint8ClampedArray} Data at the pixel location.\n */\n getData(pixel) {\n const frameState = this.frameState;\n if (!frameState) {\n return null;\n }\n\n const layer = this.getLayer();\n const coordinate = applyTransform(\n frameState.pixelToCoordinateTransform,\n pixel.slice()\n );\n\n const layerExtent = layer.getExtent();\n if (layerExtent) {\n if (!containsCoordinate(layerExtent, coordinate)) {\n return null;\n }\n }\n\n const pixelRatio = frameState.pixelRatio;\n const projection = frameState.viewState.projection;\n const viewState = frameState.viewState;\n const source = layer.getRenderSource();\n const tileGrid = source.getTileGridForProjection(viewState.projection);\n const tilePixelRatio = source.getTilePixelRatio(frameState.pixelRatio);\n\n for (\n let z = tileGrid.getZForResolution(viewState.resolution);\n z >= tileGrid.getMinZoom();\n --z\n ) {\n const tileCoord = tileGrid.getTileCoordForCoordAndZ(coordinate, z);\n const tile = source.getTile(\n z,\n tileCoord[1],\n tileCoord[2],\n pixelRatio,\n projection\n );\n if (\n !(tile instanceof ImageTile || tile instanceof ReprojTile) ||\n (tile instanceof ReprojTile && tile.getState() === TileState.EMPTY)\n ) {\n return null;\n }\n\n if (tile.getState() !== TileState.LOADED) {\n continue;\n }\n\n const tileOrigin = tileGrid.getOrigin(z);\n const tileSize = toSize(tileGrid.getTileSize(z));\n const tileResolution = tileGrid.getResolution(z);\n\n const col = Math.floor(\n tilePixelRatio *\n ((coordinate[0] - tileOrigin[0]) / tileResolution -\n tileCoord[1] * tileSize[0])\n );\n\n const row = Math.floor(\n tilePixelRatio *\n ((tileOrigin[1] - coordinate[1]) / tileResolution -\n tileCoord[2] * tileSize[1])\n );\n\n const gutter = Math.round(\n tilePixelRatio * source.getGutterForProjection(viewState.projection)\n );\n\n return this.getImageData(tile.getImage(), col + gutter, row + gutter);\n }\n\n return null;\n }\n\n /**\n * @param {Object>} tiles Lookup of loaded tiles by zoom level.\n * @param {number} zoom Zoom level.\n * @param {import(\"../../Tile.js\").default} tile Tile.\n * @return {boolean|void} If `false`, the tile will not be considered loaded.\n */\n loadedTileCallback(tiles, zoom, tile) {\n if (this.isDrawableTile(tile)) {\n return super.loadedTileCallback(tiles, zoom, tile);\n }\n return false;\n }\n\n /**\n * Determine whether render should be called.\n * @param {import(\"../../Map.js\").FrameState} frameState Frame state.\n * @return {boolean} Layer is ready to be rendered.\n */\n prepareFrame(frameState) {\n return !!this.getLayer().getSource();\n }\n\n /**\n * Render the layer.\n * @param {import(\"../../Map.js\").FrameState} frameState Frame state.\n * @param {HTMLElement} target Target that may be used to render content to.\n * @return {HTMLElement} The rendered element.\n */\n renderFrame(frameState, target) {\n const layerState = frameState.layerStatesArray[frameState.layerIndex];\n const viewState = frameState.viewState;\n const projection = viewState.projection;\n const viewResolution = viewState.resolution;\n const viewCenter = viewState.center;\n const rotation = viewState.rotation;\n const pixelRatio = frameState.pixelRatio;\n\n const tileLayer = this.getLayer();\n const tileSource = tileLayer.getSource();\n const sourceRevision = tileSource.getRevision();\n const tileGrid = tileSource.getTileGridForProjection(projection);\n const z = tileGrid.getZForResolution(viewResolution, tileSource.zDirection);\n const tileResolution = tileGrid.getResolution(z);\n\n let extent = frameState.extent;\n const resolution = frameState.viewState.resolution;\n const tilePixelRatio = tileSource.getTilePixelRatio(pixelRatio);\n // desired dimensions of the canvas in pixels\n const width = Math.round((getWidth(extent) / resolution) * pixelRatio);\n const height = Math.round((getHeight(extent) / resolution) * pixelRatio);\n\n const layerExtent =\n layerState.extent && fromUserExtent(layerState.extent, projection);\n if (layerExtent) {\n extent = getIntersection(\n extent,\n fromUserExtent(layerState.extent, projection)\n );\n }\n\n const dx = (tileResolution * width) / 2 / tilePixelRatio;\n const dy = (tileResolution * height) / 2 / tilePixelRatio;\n const canvasExtent = [\n viewCenter[0] - dx,\n viewCenter[1] - dy,\n viewCenter[0] + dx,\n viewCenter[1] + dy,\n ];\n\n const tileRange = tileGrid.getTileRangeForExtentAndZ(extent, z);\n\n /**\n * @type {Object>}\n */\n const tilesToDrawByZ = {};\n tilesToDrawByZ[z] = {};\n\n const findLoadedTiles = this.createLoadedTileFinder(\n tileSource,\n projection,\n tilesToDrawByZ\n );\n\n const tmpExtent = this.tmpExtent;\n const tmpTileRange = this.tmpTileRange_;\n this.newTiles_ = false;\n const viewport = rotation\n ? getRotatedViewport(\n viewState.center,\n resolution,\n rotation,\n frameState.size\n )\n : undefined;\n for (let x = tileRange.minX; x <= tileRange.maxX; ++x) {\n for (let y = tileRange.minY; y <= tileRange.maxY; ++y) {\n if (\n rotation &&\n !tileGrid.tileCoordIntersectsViewport([z, x, y], viewport)\n ) {\n continue;\n }\n const tile = this.getTile(z, x, y, frameState);\n if (this.isDrawableTile(tile)) {\n const uid = getUid(this);\n if (tile.getState() == TileState.LOADED) {\n tilesToDrawByZ[z][tile.tileCoord.toString()] = tile;\n let inTransition = tile.inTransition(uid);\n if (inTransition && layerState.opacity !== 1) {\n // Skipping transition when layer is not fully opaque avoids visual artifacts.\n tile.endTransition(uid);\n inTransition = false;\n }\n if (\n !this.newTiles_ &&\n (inTransition || !this.renderedTiles.includes(tile))\n ) {\n this.newTiles_ = true;\n }\n }\n if (tile.getAlpha(uid, frameState.time) === 1) {\n // don't look for alt tiles if alpha is 1\n continue;\n }\n }\n\n const childTileRange = tileGrid.getTileCoordChildTileRange(\n tile.tileCoord,\n tmpTileRange,\n tmpExtent\n );\n\n let covered = false;\n if (childTileRange) {\n covered = findLoadedTiles(z + 1, childTileRange);\n }\n if (!covered) {\n tileGrid.forEachTileCoordParentTileRange(\n tile.tileCoord,\n findLoadedTiles,\n tmpTileRange,\n tmpExtent\n );\n }\n }\n }\n\n const canvasScale =\n ((tileResolution / viewResolution) * pixelRatio) / tilePixelRatio;\n\n // set forward and inverse pixel transforms\n composeTransform(\n this.pixelTransform,\n frameState.size[0] / 2,\n frameState.size[1] / 2,\n 1 / pixelRatio,\n 1 / pixelRatio,\n rotation,\n -width / 2,\n -height / 2\n );\n\n const canvasTransform = toTransformString(this.pixelTransform);\n\n this.useContainer(target, canvasTransform, this.getBackground(frameState));\n const context = this.context;\n const canvas = context.canvas;\n\n makeInverse(this.inversePixelTransform, this.pixelTransform);\n\n // set scale transform for calculating tile positions on the canvas\n composeTransform(\n this.tempTransform,\n width / 2,\n height / 2,\n canvasScale,\n canvasScale,\n 0,\n -width / 2,\n -height / 2\n );\n\n if (canvas.width != width || canvas.height != height) {\n canvas.width = width;\n canvas.height = height;\n } else if (!this.containerReused) {\n context.clearRect(0, 0, width, height);\n }\n\n if (layerExtent) {\n this.clipUnrotated(context, frameState, layerExtent);\n }\n\n if (!tileSource.getInterpolate()) {\n context.imageSmoothingEnabled = false;\n }\n\n this.preRender(context, frameState);\n\n this.renderedTiles.length = 0;\n /** @type {Array} */\n let zs = Object.keys(tilesToDrawByZ).map(Number);\n zs.sort(ascending);\n\n let clips, clipZs, currentClip;\n if (\n layerState.opacity === 1 &&\n (!this.containerReused ||\n tileSource.getOpaque(frameState.viewState.projection))\n ) {\n zs = zs.reverse();\n } else {\n clips = [];\n clipZs = [];\n }\n for (let i = zs.length - 1; i >= 0; --i) {\n const currentZ = zs[i];\n const currentTilePixelSize = tileSource.getTilePixelSize(\n currentZ,\n pixelRatio,\n projection\n );\n const currentResolution = tileGrid.getResolution(currentZ);\n const currentScale = currentResolution / tileResolution;\n const dx = currentTilePixelSize[0] * currentScale * canvasScale;\n const dy = currentTilePixelSize[1] * currentScale * canvasScale;\n const originTileCoord = tileGrid.getTileCoordForCoordAndZ(\n getTopLeft(canvasExtent),\n currentZ\n );\n const originTileExtent = tileGrid.getTileCoordExtent(originTileCoord);\n const origin = applyTransform(this.tempTransform, [\n (tilePixelRatio * (originTileExtent[0] - canvasExtent[0])) /\n tileResolution,\n (tilePixelRatio * (canvasExtent[3] - originTileExtent[3])) /\n tileResolution,\n ]);\n const tileGutter =\n tilePixelRatio * tileSource.getGutterForProjection(projection);\n const tilesToDraw = tilesToDrawByZ[currentZ];\n for (const tileCoordKey in tilesToDraw) {\n const tile = /** @type {import(\"../../ImageTile.js\").default} */ (\n tilesToDraw[tileCoordKey]\n );\n const tileCoord = tile.tileCoord;\n\n // Calculate integer positions and sizes so that tiles align\n const xIndex = originTileCoord[1] - tileCoord[1];\n const nextX = Math.round(origin[0] - (xIndex - 1) * dx);\n const yIndex = originTileCoord[2] - tileCoord[2];\n const nextY = Math.round(origin[1] - (yIndex - 1) * dy);\n const x = Math.round(origin[0] - xIndex * dx);\n const y = Math.round(origin[1] - yIndex * dy);\n const w = nextX - x;\n const h = nextY - y;\n const transition = z === currentZ;\n\n const inTransition =\n transition && tile.getAlpha(getUid(this), frameState.time) !== 1;\n let contextSaved = false;\n if (!inTransition) {\n if (clips) {\n // Clip mask for regions in this tile that already filled by a higher z tile\n currentClip = [x, y, x + w, y, x + w, y + h, x, y + h];\n for (let i = 0, ii = clips.length; i < ii; ++i) {\n if (z !== currentZ && currentZ < clipZs[i]) {\n const clip = clips[i];\n if (\n intersects(\n [x, y, x + w, y + h],\n [clip[0], clip[3], clip[4], clip[7]]\n )\n ) {\n if (!contextSaved) {\n context.save();\n contextSaved = true;\n }\n context.beginPath();\n // counter-clockwise (outer ring) for current tile\n context.moveTo(currentClip[0], currentClip[1]);\n context.lineTo(currentClip[2], currentClip[3]);\n context.lineTo(currentClip[4], currentClip[5]);\n context.lineTo(currentClip[6], currentClip[7]);\n // clockwise (inner ring) for higher z tile\n context.moveTo(clip[6], clip[7]);\n context.lineTo(clip[4], clip[5]);\n context.lineTo(clip[2], clip[3]);\n context.lineTo(clip[0], clip[1]);\n context.clip();\n }\n }\n }\n clips.push(currentClip);\n clipZs.push(currentZ);\n } else {\n context.clearRect(x, y, w, h);\n }\n }\n this.drawTileImage(\n tile,\n frameState,\n x,\n y,\n w,\n h,\n tileGutter,\n transition\n );\n if (clips && !inTransition) {\n if (contextSaved) {\n context.restore();\n }\n this.renderedTiles.unshift(tile);\n } else {\n this.renderedTiles.push(tile);\n }\n this.updateUsedTiles(frameState.usedTiles, tileSource, tile);\n }\n }\n\n this.renderedRevision = sourceRevision;\n this.renderedResolution = tileResolution;\n this.extentChanged =\n !this.renderedExtent_ || !equals(this.renderedExtent_, canvasExtent);\n this.renderedExtent_ = canvasExtent;\n this.renderedPixelRatio = pixelRatio;\n this.renderedProjection = projection;\n\n this.manageTilePyramid(\n frameState,\n tileSource,\n tileGrid,\n pixelRatio,\n projection,\n extent,\n z,\n tileLayer.getPreload()\n );\n this.scheduleExpireCache(frameState, tileSource);\n\n this.postRender(context, frameState);\n\n if (layerState.extent) {\n context.restore();\n }\n context.imageSmoothingEnabled = true;\n\n if (canvasTransform !== canvas.style.transform) {\n canvas.style.transform = canvasTransform;\n }\n\n return this.container;\n }\n\n /**\n * @param {import(\"../../ImageTile.js\").default} tile Tile.\n * @param {import(\"../../Map.js\").FrameState} frameState Frame state.\n * @param {number} x Left of the tile.\n * @param {number} y Top of the tile.\n * @param {number} w Width of the tile.\n * @param {number} h Height of the tile.\n * @param {number} gutter Tile gutter.\n * @param {boolean} transition Apply an alpha transition.\n */\n drawTileImage(tile, frameState, x, y, w, h, gutter, transition) {\n const image = this.getTileImage(tile);\n if (!image) {\n return;\n }\n const uid = getUid(this);\n const layerState = frameState.layerStatesArray[frameState.layerIndex];\n const alpha =\n layerState.opacity *\n (transition ? tile.getAlpha(uid, frameState.time) : 1);\n const alphaChanged = alpha !== this.context.globalAlpha;\n if (alphaChanged) {\n this.context.save();\n this.context.globalAlpha = alpha;\n }\n this.context.drawImage(\n image,\n gutter,\n gutter,\n image.width - 2 * gutter,\n image.height - 2 * gutter,\n x,\n y,\n w,\n h\n );\n\n if (alphaChanged) {\n this.context.restore();\n }\n if (alpha !== layerState.opacity) {\n frameState.animate = true;\n } else if (transition) {\n tile.endTransition(uid);\n }\n }\n\n /**\n * @return {HTMLCanvasElement} Image\n */\n getImage() {\n const context = this.context;\n return context ? context.canvas : null;\n }\n\n /**\n * Get the image from a tile.\n * @param {import(\"../../ImageTile.js\").default} tile Tile.\n * @return {HTMLCanvasElement|HTMLImageElement|HTMLVideoElement} Image.\n * @protected\n */\n getTileImage(tile) {\n return tile.getImage();\n }\n\n /**\n * @param {import(\"../../Map.js\").FrameState} frameState Frame state.\n * @param {import(\"../../source/Tile.js\").default} tileSource Tile source.\n * @protected\n */\n scheduleExpireCache(frameState, tileSource) {\n if (tileSource.canExpireCache()) {\n /**\n * @param {import(\"../../source/Tile.js\").default} tileSource Tile source.\n * @param {import(\"../../Map.js\").default} map Map.\n * @param {import(\"../../Map.js\").FrameState} frameState Frame state.\n */\n const postRenderFunction = function (tileSource, map, frameState) {\n const tileSourceKey = getUid(tileSource);\n if (tileSourceKey in frameState.usedTiles) {\n tileSource.expireCache(\n frameState.viewState.projection,\n frameState.usedTiles[tileSourceKey]\n );\n }\n }.bind(null, tileSource);\n\n frameState.postRenderFunctions.push(\n /** @type {import(\"../../Map.js\").PostRenderFunction} */ (\n postRenderFunction\n )\n );\n }\n }\n\n /**\n * @param {!Object>} usedTiles Used tiles.\n * @param {import(\"../../source/Tile.js\").default} tileSource Tile source.\n * @param {import('../../Tile.js').default} tile Tile.\n * @protected\n */\n updateUsedTiles(usedTiles, tileSource, tile) {\n // FIXME should we use tilesToDrawByZ instead?\n const tileSourceKey = getUid(tileSource);\n if (!(tileSourceKey in usedTiles)) {\n usedTiles[tileSourceKey] = {};\n }\n usedTiles[tileSourceKey][tile.getKey()] = true;\n }\n\n /**\n * Manage tile pyramid.\n * This function performs a number of functions related to the tiles at the\n * current zoom and lower zoom levels:\n * - registers idle tiles in frameState.wantedTiles so that they are not\n * discarded by the tile queue\n * - enqueues missing tiles\n * @param {import(\"../../Map.js\").FrameState} frameState Frame state.\n * @param {import(\"../../source/Tile.js\").default} tileSource Tile source.\n * @param {import(\"../../tilegrid/TileGrid.js\").default} tileGrid Tile grid.\n * @param {number} pixelRatio Pixel ratio.\n * @param {import(\"../../proj/Projection.js\").default} projection Projection.\n * @param {import(\"../../extent.js\").Extent} extent Extent.\n * @param {number} currentZ Current Z.\n * @param {number} preload Load low resolution tiles up to `preload` levels.\n * @param {function(import(\"../../Tile.js\").default):void} [tileCallback] Tile callback.\n * @protected\n */\n manageTilePyramid(\n frameState,\n tileSource,\n tileGrid,\n pixelRatio,\n projection,\n extent,\n currentZ,\n preload,\n tileCallback\n ) {\n const tileSourceKey = getUid(tileSource);\n if (!(tileSourceKey in frameState.wantedTiles)) {\n frameState.wantedTiles[tileSourceKey] = {};\n }\n const wantedTiles = frameState.wantedTiles[tileSourceKey];\n const tileQueue = frameState.tileQueue;\n const minZoom = tileGrid.getMinZoom();\n const rotation = frameState.viewState.rotation;\n const viewport = rotation\n ? getRotatedViewport(\n frameState.viewState.center,\n frameState.viewState.resolution,\n rotation,\n frameState.size\n )\n : undefined;\n let tileCount = 0;\n let tile, tileRange, tileResolution, x, y, z;\n for (z = minZoom; z <= currentZ; ++z) {\n tileRange = tileGrid.getTileRangeForExtentAndZ(extent, z, tileRange);\n tileResolution = tileGrid.getResolution(z);\n for (x = tileRange.minX; x <= tileRange.maxX; ++x) {\n for (y = tileRange.minY; y <= tileRange.maxY; ++y) {\n if (\n rotation &&\n !tileGrid.tileCoordIntersectsViewport([z, x, y], viewport)\n ) {\n continue;\n }\n if (currentZ - z <= preload) {\n ++tileCount;\n tile = tileSource.getTile(z, x, y, pixelRatio, projection);\n if (tile.getState() == TileState.IDLE) {\n wantedTiles[tile.getKey()] = true;\n if (!tileQueue.isKeyQueued(tile.getKey())) {\n tileQueue.enqueue([\n tile,\n tileSourceKey,\n tileGrid.getTileCoordCenter(tile.tileCoord),\n tileResolution,\n ]);\n }\n }\n if (tileCallback !== undefined) {\n tileCallback(tile);\n }\n } else {\n tileSource.useTile(z, x, y, projection);\n }\n }\n }\n }\n tileSource.updateCacheSize(tileCount, projection);\n }\n}\n\nexport default CanvasTileLayerRenderer;\n","/**\n * @module ol/layer/Tile\n */\nimport BaseTileLayer from './BaseTile.js';\nimport CanvasTileLayerRenderer from '../renderer/canvas/TileLayer.js';\n\n/**\n * @classdesc\n * For layer sources that provide pre-rendered, tiled images in grids that are\n * organized by zoom levels for specific resolutions.\n * Note that any property set in the options is set as a {@link module:ol/Object~BaseObject}\n * property on the layer object; for example, setting `title: 'My Title'` in the\n * options means that `title` is observable, and has get/set accessors.\n *\n * @template {import(\"../source/Tile.js\").default} TileSourceType\n * @extends BaseTileLayer\n * @api\n */\nclass TileLayer extends BaseTileLayer {\n /**\n * @param {import(\"./BaseTile.js\").Options} [options] Tile layer options.\n */\n constructor(options) {\n super(options);\n }\n\n createRenderer() {\n return new CanvasTileLayerRenderer(this);\n }\n}\n\nexport default TileLayer;\n","/**\n * @module ol/source/Raster\n */\nimport Disposable from '../Disposable.js';\nimport Event from '../events/Event.js';\nimport EventType from '../events/EventType.js';\nimport ImageCanvas from '../ImageCanvas.js';\nimport ImageLayer from '../layer/Image.js';\nimport ImageSource from './Image.js';\nimport Source from './Source.js';\nimport TileLayer from '../layer/Tile.js';\nimport TileQueue from '../TileQueue.js';\nimport TileSource from './Tile.js';\nimport {createCanvasContext2D} from '../dom.js';\nimport {create as createTransform} from '../transform.js';\nimport {equals, getCenter, getHeight, getWidth} from '../extent.js';\nimport {getUid} from '../util.js';\n\nlet hasImageData = true;\ntry {\n new ImageData(10, 10);\n} catch (_) {\n hasImageData = false;\n}\n\n/** @type {CanvasRenderingContext2D} */\nlet context;\n\n/**\n * @param {Uint8ClampedArray} data Image data.\n * @param {number} width Number of columns.\n * @param {number} height Number of rows.\n * @return {ImageData} Image data.\n */\nexport function newImageData(data, width, height) {\n if (hasImageData) {\n return new ImageData(data, width, height);\n }\n\n if (!context) {\n context = document.createElement('canvas').getContext('2d');\n }\n const imageData = context.createImageData(width, height);\n imageData.data.set(data);\n return imageData;\n}\n\n/**\n * @typedef {Object} MinionData\n * @property {Array} buffers Array of buffers.\n * @property {Object} meta Operation metadata.\n * @property {boolean} imageOps The operation is an image operation.\n * @property {number} width The width of the image.\n * @property {number} height The height of the image.\n */\n\n/* istanbul ignore next */\n/**\n * Create a function for running operations. This function is serialized for\n * use in a worker.\n * @param {function(Array, Object):*} operation The operation.\n * @return {function(MinionData):ArrayBuffer} A function that takes an object with\n * buffers, meta, imageOps, width, and height properties and returns an array\n * buffer.\n */\nfunction createMinion(operation) {\n let workerHasImageData = true;\n try {\n new ImageData(10, 10);\n } catch (_) {\n workerHasImageData = false;\n }\n\n function newWorkerImageData(data, width, height) {\n if (workerHasImageData) {\n return new ImageData(data, width, height);\n }\n return {data: data, width: width, height: height};\n }\n\n return function (data) {\n // bracket notation for minification support\n const buffers = data['buffers'];\n const meta = data['meta'];\n const imageOps = data['imageOps'];\n const width = data['width'];\n const height = data['height'];\n\n const numBuffers = buffers.length;\n const numBytes = buffers[0].byteLength;\n\n if (imageOps) {\n const images = new Array(numBuffers);\n for (let b = 0; b < numBuffers; ++b) {\n images[b] = newWorkerImageData(\n new Uint8ClampedArray(buffers[b]),\n width,\n height\n );\n }\n const output = operation(images, meta).data;\n return output.buffer;\n }\n\n const output = new Uint8ClampedArray(numBytes);\n const arrays = new Array(numBuffers);\n const pixels = new Array(numBuffers);\n for (let b = 0; b < numBuffers; ++b) {\n arrays[b] = new Uint8ClampedArray(buffers[b]);\n pixels[b] = [0, 0, 0, 0];\n }\n for (let i = 0; i < numBytes; i += 4) {\n for (let j = 0; j < numBuffers; ++j) {\n const array = arrays[j];\n pixels[j][0] = array[i];\n pixels[j][1] = array[i + 1];\n pixels[j][2] = array[i + 2];\n pixels[j][3] = array[i + 3];\n }\n const pixel = operation(pixels, meta);\n output[i] = pixel[0];\n output[i + 1] = pixel[1];\n output[i + 2] = pixel[2];\n output[i + 3] = pixel[3];\n }\n return output.buffer;\n };\n}\n\n/**\n * Create a worker for running operations.\n * @param {ProcessorOptions} config Processor options.\n * @param {function(MessageEvent): void} onMessage Called with a message event.\n * @return {Worker} The worker.\n */\nfunction createWorker(config, onMessage) {\n const lib = Object.keys(config.lib || {}).map(function (name) {\n return 'const ' + name + ' = ' + config.lib[name].toString() + ';';\n });\n\n const lines = lib.concat([\n 'const __minion__ = (' + createMinion.toString() + ')(',\n config.operation.toString(),\n ');',\n 'self.addEventListener(\"message\", function(event) {',\n ' const buffer = __minion__(event.data);',\n ' self.postMessage({buffer: buffer, meta: event.data.meta}, [buffer]);',\n '});',\n ]);\n\n const worker = new Worker(\n typeof Blob === 'undefined'\n ? 'data:text/javascript;base64,' +\n Buffer.from(lines.join('\\n'), 'binary').toString('base64')\n : URL.createObjectURL(new Blob(lines, {type: 'text/javascript'}))\n );\n worker.addEventListener('message', onMessage);\n return worker;\n}\n\n/**\n * @typedef {Object} FauxMessageEvent\n * @property {Object} data Message data.\n */\n\n/**\n * Create a faux worker for running operations.\n * @param {ProcessorOptions} config Configuration.\n * @param {function(FauxMessageEvent): void} onMessage Called with a message event.\n * @return {Object} The faux worker.\n */\nfunction createFauxWorker(config, onMessage) {\n const minion = createMinion(config.operation);\n let terminated = false;\n return {\n postMessage: function (data) {\n setTimeout(function () {\n if (terminated) {\n return;\n }\n onMessage({data: {buffer: minion(data), meta: data['meta']}});\n }, 0);\n },\n terminate: function () {\n terminated = true;\n },\n };\n}\n\n/**\n * @typedef {function(Error, ImageData, (Object|Array)): void} JobCallback\n */\n\n/**\n * @typedef {Object} Job\n * @property {Object} meta Job metadata.\n * @property {Array} inputs Array of input data.\n * @property {JobCallback} callback Called when the job is complete.\n */\n\n/**\n * @typedef {Object} ProcessorOptions\n * @property {number} threads Number of workers to spawn.\n * @property {Operation} operation The operation.\n * @property {Object} [lib] Functions that will be made available to operations run in a worker.\n * @property {number} queue The number of queued jobs to allow.\n * @property {boolean} [imageOps=false] Pass all the image data to the operation instead of a single pixel.\n */\n\n/**\n * @classdesc\n * A processor runs pixel or image operations in workers.\n */\nexport class Processor extends Disposable {\n /**\n * @param {ProcessorOptions} config Configuration.\n */\n constructor(config) {\n super();\n\n this._imageOps = !!config.imageOps;\n let threads;\n if (config.threads === 0) {\n threads = 0;\n } else if (this._imageOps) {\n threads = 1;\n } else {\n threads = config.threads || 1;\n }\n\n /**\n * @type {Array}\n */\n const workers = new Array(threads);\n if (threads) {\n for (let i = 0; i < threads; ++i) {\n workers[i] = createWorker(config, this._onWorkerMessage.bind(this, i));\n }\n } else {\n workers[0] = createFauxWorker(\n config,\n this._onWorkerMessage.bind(this, 0)\n );\n }\n this._workers = workers;\n\n /**\n * @type {Array}\n * @private\n */\n this._queue = [];\n\n this._maxQueueLength = config.queue || Infinity;\n this._running = 0;\n\n /**\n * @type {Object}\n * @private\n */\n this._dataLookup = {};\n\n /**\n * @type {Job}\n * @private\n */\n this._job = null;\n }\n\n /**\n * Run operation on input data.\n * @param {Array} inputs Array of image data.\n * @param {Object} meta A user data object. This is passed to all operations\n * and must be serializable.\n * @param {function(Error, ImageData, Object): void} callback Called when work\n * completes. The first argument is any error. The second is the ImageData\n * generated by operations. The third is the user data object.\n */\n process(inputs, meta, callback) {\n this._enqueue({\n inputs: inputs,\n meta: meta,\n callback: callback,\n });\n this._dispatch();\n }\n\n /**\n * Add a job to the queue.\n * @param {Job} job The job.\n */\n _enqueue(job) {\n this._queue.push(job);\n while (this._queue.length > this._maxQueueLength) {\n this._queue.shift().callback(null, null);\n }\n }\n\n /**\n * Dispatch a job.\n */\n _dispatch() {\n if (this._running || this._queue.length === 0) {\n return;\n }\n\n const job = this._queue.shift();\n this._job = job;\n const width = job.inputs[0].width;\n const height = job.inputs[0].height;\n const buffers = job.inputs.map(function (input) {\n return input.data.buffer;\n });\n const threads = this._workers.length;\n this._running = threads;\n if (threads === 1) {\n this._workers[0].postMessage(\n {\n buffers: buffers,\n meta: job.meta,\n imageOps: this._imageOps,\n width: width,\n height: height,\n },\n buffers\n );\n return;\n }\n\n const length = job.inputs[0].data.length;\n const segmentLength = 4 * Math.ceil(length / 4 / threads);\n for (let i = 0; i < threads; ++i) {\n const offset = i * segmentLength;\n const slices = [];\n for (let j = 0, jj = buffers.length; j < jj; ++j) {\n slices.push(buffers[j].slice(offset, offset + segmentLength));\n }\n this._workers[i].postMessage(\n {\n buffers: slices,\n meta: job.meta,\n imageOps: this._imageOps,\n width: width,\n height: height,\n },\n slices\n );\n }\n }\n\n /**\n * Handle messages from the worker.\n * @param {number} index The worker index.\n * @param {MessageEvent} event The message event.\n */\n _onWorkerMessage(index, event) {\n if (this.disposed) {\n return;\n }\n this._dataLookup[index] = event.data;\n --this._running;\n if (this._running === 0) {\n this._resolveJob();\n }\n }\n\n /**\n * Resolve a job. If there are no more worker threads, the processor callback\n * will be called.\n */\n _resolveJob() {\n const job = this._job;\n const threads = this._workers.length;\n let data, meta;\n if (threads === 1) {\n data = new Uint8ClampedArray(this._dataLookup[0]['buffer']);\n meta = this._dataLookup[0]['meta'];\n } else {\n const length = job.inputs[0].data.length;\n data = new Uint8ClampedArray(length);\n meta = new Array(threads);\n const segmentLength = 4 * Math.ceil(length / 4 / threads);\n for (let i = 0; i < threads; ++i) {\n const buffer = this._dataLookup[i]['buffer'];\n const offset = i * segmentLength;\n data.set(new Uint8ClampedArray(buffer), offset);\n meta[i] = this._dataLookup[i]['meta'];\n }\n }\n this._job = null;\n this._dataLookup = {};\n job.callback(\n null,\n newImageData(data, job.inputs[0].width, job.inputs[0].height),\n meta\n );\n this._dispatch();\n }\n\n /**\n * Terminate all workers associated with the processor.\n */\n disposeInternal() {\n for (let i = 0; i < this._workers.length; ++i) {\n this._workers[i].terminate();\n }\n this._workers.length = 0;\n }\n}\n\n/**\n * A function that takes an array of input data, performs some operation, and\n * returns an array of output data.\n * For `pixel` type operations, the function will be called with an array of\n * pixels, where each pixel is an array of four numbers (`[r, g, b, a]`) in the\n * range of 0 - 255. It should return a single pixel array.\n * For `'image'` type operations, functions will be called with an array of\n * [ImageData](https://developer.mozilla.org/en-US/docs/Web/API/ImageData)\n * and should return a single\n * [ImageData](https://developer.mozilla.org/en-US/docs/Web/API/ImageData).\n * The operations\n * are called with a second \"data\" argument, which can be used for storage. The\n * data object is accessible from raster events, where it can be initialized in\n * \"beforeoperations\" and accessed again in \"afteroperations\".\n *\n * @typedef {function((Array>|Array), Object):\n * (Array|ImageData)} Operation\n */\n\n/**\n * @enum {string}\n */\nconst RasterEventType = {\n /**\n * Triggered before operations are run. Listeners will receive an event object with\n * a `data` property that can be used to make data available to operations.\n * @event module:ol/source/Raster.RasterSourceEvent#beforeoperations\n * @api\n */\n BEFOREOPERATIONS: 'beforeoperations',\n\n /**\n * Triggered after operations are run. Listeners will receive an event object with\n * a `data` property. If more than one thread is used, `data` will be an array of\n * objects. If a single thread is used, `data` will be a single object.\n * @event module:ol/source/Raster.RasterSourceEvent#afteroperations\n * @api\n */\n AFTEROPERATIONS: 'afteroperations',\n};\n\n/**\n * @typedef {'pixel' | 'image'} RasterOperationType\n * Raster operation type. Supported values are `'pixel'` and `'image'`.\n */\n\n/**\n * @typedef {import(\"./Image.js\").ImageSourceEventTypes|'beforeoperations'|'afteroperations'} RasterSourceEventTypes\n */\n\n/**\n * @classdesc\n * Events emitted by {@link module:ol/source/Raster~RasterSource} instances are instances of this\n * type.\n */\nexport class RasterSourceEvent extends Event {\n /**\n * @param {string} type Type.\n * @param {import(\"../Map.js\").FrameState} frameState The frame state.\n * @param {Object|Array} data An object made available to operations. For \"afteroperations\" evenets\n * this will be an array of objects if more than one thread is used.\n */\n constructor(type, frameState, data) {\n super(type);\n\n /**\n * The raster extent.\n * @type {import(\"../extent.js\").Extent}\n * @api\n */\n this.extent = frameState.extent;\n\n /**\n * The pixel resolution (map units per pixel).\n * @type {number}\n * @api\n */\n this.resolution = frameState.viewState.resolution / frameState.pixelRatio;\n\n /**\n * An object made available to all operations. This can be used by operations\n * as a storage object (e.g. for calculating statistics).\n * @type {Object}\n * @api\n */\n this.data = data;\n }\n}\n\n/**\n * @typedef {Object} Options\n * @property {Array} sources Input\n * sources or layers. For vector data, use an VectorImage layer.\n * @property {Operation} [operation] Raster operation.\n * The operation will be called with data from input sources\n * and the output will be assigned to the raster source.\n * @property {Object} [lib] Functions that will be made available to operations run in a worker.\n * @property {number} [threads] By default, operations will be run in a single worker thread.\n * To avoid using workers altogether, set `threads: 0`. For pixel operations, operations can\n * be run in multiple worker threads. Note that there is additional overhead in\n * transferring data to multiple workers, and that depending on the user's\n * system, it may not be possible to parallelize the work.\n * @property {RasterOperationType} [operationType='pixel'] Operation type.\n * Supported values are `'pixel'` and `'image'`. By default,\n * `'pixel'` operations are assumed, and operations will be called with an\n * array of pixels from input sources. If set to `'image'`, operations will\n * be called with an array of ImageData objects from input sources.\n * @property {Array|null} [resolutions] Resolutions. If specified, raster operations will only\n * be run at the given resolutions. By default, the resolutions of the first source with resolutions\n * specified will be used, if any. Set to `null` to use any view resolution instead.\n */\n\n/***\n * @template Return\n * @typedef {import(\"../Observable\").OnSignature &\n * import(\"../Observable\").OnSignature &\n * import(\"../Observable\").OnSignature &\n * import(\"../Observable\").OnSignature &\n * import(\"../Observable\").CombinedOnSignature} RasterSourceOnSignature\n */\n\n/**\n * @classdesc\n * A source that transforms data from any number of input sources using an\n * {@link module:ol/source/Raster~Operation} function to transform input pixel values into\n * output pixel values.\n *\n * @fires module:ol/source/Raster.RasterSourceEvent\n * @api\n */\nclass RasterSource extends ImageSource {\n /**\n * @param {Options} options Options.\n */\n constructor(options) {\n super({\n projection: null,\n });\n\n /***\n * @type {RasterSourceOnSignature}\n */\n this.on;\n\n /***\n * @type {RasterSourceOnSignature}\n */\n this.once;\n\n /***\n * @type {RasterSourceOnSignature}\n */\n this.un;\n\n /**\n * @private\n * @type {Processor}\n */\n this.processor_ = null;\n\n /**\n * @private\n * @type {RasterOperationType}\n */\n this.operationType_ =\n options.operationType !== undefined ? options.operationType : 'pixel';\n\n /**\n * @private\n * @type {number}\n */\n this.threads_ = options.threads !== undefined ? options.threads : 1;\n\n /**\n * @private\n * @type {Array}\n */\n this.layers_ = createLayers(options.sources);\n\n const changed = this.changed.bind(this);\n for (let i = 0, ii = this.layers_.length; i < ii; ++i) {\n this.layers_[i].addEventListener(EventType.CHANGE, changed);\n }\n\n /** @type {boolean} */\n this.useResolutions_ = options.resolutions !== null;\n\n /**\n * @private\n * @type {import(\"../TileQueue.js\").default}\n */\n this.tileQueue_ = new TileQueue(function () {\n return 1;\n }, this.changed.bind(this));\n\n /**\n * The most recently requested frame state.\n * @type {import(\"../Map.js\").FrameState}\n * @private\n */\n this.requestedFrameState_;\n\n /**\n * The most recently rendered image canvas.\n * @type {import(\"../ImageCanvas.js\").default}\n * @private\n */\n this.renderedImageCanvas_ = null;\n\n /**\n * The most recently rendered revision.\n * @type {number}\n */\n this.renderedRevision_;\n\n /**\n * @private\n * @type {import(\"../Map.js\").FrameState}\n */\n this.frameState_ = {\n animate: false,\n coordinateToPixelTransform: createTransform(),\n declutterTree: null,\n extent: null,\n index: 0,\n layerIndex: 0,\n layerStatesArray: getLayerStatesArray(this.layers_),\n pixelRatio: 1,\n pixelToCoordinateTransform: createTransform(),\n postRenderFunctions: [],\n size: [0, 0],\n tileQueue: this.tileQueue_,\n time: Date.now(),\n usedTiles: {},\n viewState: /** @type {import(\"../View.js\").State} */ ({\n rotation: 0,\n }),\n viewHints: [],\n wantedTiles: {},\n mapId: getUid(this),\n renderTargets: {},\n };\n\n this.setAttributions(function (frameState) {\n const attributions = [];\n for (\n let index = 0, iMax = options.sources.length;\n index < iMax;\n ++index\n ) {\n const sourceOrLayer = options.sources[index];\n const source =\n sourceOrLayer instanceof Source\n ? sourceOrLayer\n : sourceOrLayer.getSource();\n if (!source) {\n continue;\n }\n const attributionGetter = source.getAttributions();\n if (typeof attributionGetter === 'function') {\n const sourceAttribution = attributionGetter(frameState);\n attributions.push.apply(attributions, sourceAttribution);\n }\n }\n return attributions.length !== 0 ? attributions : null;\n });\n\n if (options.operation !== undefined) {\n this.setOperation(options.operation, options.lib);\n }\n }\n\n /**\n * Set the operation.\n * @param {Operation} operation New operation.\n * @param {Object} [lib] Functions that will be available to operations run\n * in a worker.\n * @api\n */\n setOperation(operation, lib) {\n if (this.processor_) {\n this.processor_.dispose();\n }\n\n this.processor_ = new Processor({\n operation: operation,\n imageOps: this.operationType_ === 'image',\n queue: 1,\n lib: lib,\n threads: this.threads_,\n });\n this.changed();\n }\n\n /**\n * Update the stored frame state.\n * @param {import(\"../extent.js\").Extent} extent The view extent (in map units).\n * @param {number} resolution The view resolution.\n * @param {import(\"../proj/Projection.js\").default} projection The view projection.\n * @return {import(\"../Map.js\").FrameState} The updated frame state.\n * @private\n */\n updateFrameState_(extent, resolution, projection) {\n const frameState = /** @type {import(\"../Map.js\").FrameState} */ (\n Object.assign({}, this.frameState_)\n );\n\n frameState.viewState = /** @type {import(\"../View.js\").State} */ (\n Object.assign({}, frameState.viewState)\n );\n\n const center = getCenter(extent);\n\n frameState.size[0] = Math.ceil(getWidth(extent) / resolution);\n frameState.size[1] = Math.ceil(getHeight(extent) / resolution);\n frameState.extent = [\n center[0] - (frameState.size[0] * resolution) / 2,\n center[1] - (frameState.size[1] * resolution) / 2,\n center[0] + (frameState.size[0] * resolution) / 2,\n center[1] + (frameState.size[1] * resolution) / 2,\n ];\n frameState.time = Date.now();\n\n const viewState = frameState.viewState;\n viewState.center = center;\n viewState.projection = projection;\n viewState.resolution = resolution;\n return frameState;\n }\n\n /**\n * Determine if all sources are ready.\n * @return {boolean} All sources are ready.\n * @private\n */\n allSourcesReady_() {\n let ready = true;\n let source;\n for (let i = 0, ii = this.layers_.length; i < ii; ++i) {\n source = this.layers_[i].getSource();\n if (!source || source.getState() !== 'ready') {\n ready = false;\n break;\n }\n }\n return ready;\n }\n\n /**\n * @param {import(\"../extent.js\").Extent} extent Extent.\n * @param {number} resolution Resolution.\n * @param {number} pixelRatio Pixel ratio.\n * @param {import(\"../proj/Projection.js\").default} projection Projection.\n * @return {import(\"../ImageCanvas.js\").default} Single image.\n */\n getImage(extent, resolution, pixelRatio, projection) {\n if (!this.allSourcesReady_()) {\n return null;\n }\n\n resolution = this.findNearestResolution(resolution);\n const frameState = this.updateFrameState_(extent, resolution, projection);\n this.requestedFrameState_ = frameState;\n\n // check if we can't reuse the existing ol/ImageCanvas\n if (this.renderedImageCanvas_) {\n const renderedResolution = this.renderedImageCanvas_.getResolution();\n const renderedExtent = this.renderedImageCanvas_.getExtent();\n if (\n resolution !== renderedResolution ||\n !equals(frameState.extent, renderedExtent)\n ) {\n this.renderedImageCanvas_ = null;\n }\n }\n\n if (\n !this.renderedImageCanvas_ ||\n this.getRevision() !== this.renderedRevision_\n ) {\n this.processSources_();\n }\n\n frameState.tileQueue.loadMoreTiles(16, 16);\n\n if (frameState.animate) {\n requestAnimationFrame(this.changed.bind(this));\n }\n\n return this.renderedImageCanvas_;\n }\n\n /**\n * Start processing source data.\n * @private\n */\n processSources_() {\n const frameState = this.requestedFrameState_;\n const len = this.layers_.length;\n const imageDatas = new Array(len);\n for (let i = 0; i < len; ++i) {\n frameState.layerIndex = i;\n const imageData = getImageData(this.layers_[i], frameState);\n if (imageData) {\n imageDatas[i] = imageData;\n } else {\n return;\n }\n }\n\n const data = {};\n this.dispatchEvent(\n new RasterSourceEvent(RasterEventType.BEFOREOPERATIONS, frameState, data)\n );\n this.processor_.process(\n imageDatas,\n data,\n this.onWorkerComplete_.bind(this, frameState)\n );\n }\n\n /**\n * Called when pixel processing is complete.\n * @param {import(\"../Map.js\").FrameState} frameState The frame state.\n * @param {Error} err Any error during processing.\n * @param {ImageData} output The output image data.\n * @param {Object|Array} data The user data (or an array if more than one thread).\n * @private\n */\n onWorkerComplete_(frameState, err, output, data) {\n if (err || !output) {\n return;\n }\n\n // do nothing if extent or resolution changed\n const extent = frameState.extent;\n const resolution = frameState.viewState.resolution;\n if (\n resolution !== this.requestedFrameState_.viewState.resolution ||\n !equals(extent, this.requestedFrameState_.extent)\n ) {\n return;\n }\n\n let context;\n if (this.renderedImageCanvas_) {\n context = this.renderedImageCanvas_.getImage().getContext('2d');\n } else {\n const width = Math.round(getWidth(extent) / resolution);\n const height = Math.round(getHeight(extent) / resolution);\n context = createCanvasContext2D(width, height);\n this.renderedImageCanvas_ = new ImageCanvas(\n extent,\n resolution,\n 1,\n context.canvas\n );\n }\n context.putImageData(output, 0, 0);\n\n this.changed();\n this.renderedRevision_ = this.getRevision();\n\n this.dispatchEvent(\n new RasterSourceEvent(RasterEventType.AFTEROPERATIONS, frameState, data)\n );\n if (frameState.animate) {\n requestAnimationFrame(this.changed.bind(this));\n }\n }\n\n /**\n * @param {import(\"../proj/Projection\").default} [projection] Projection.\n * @return {Array|null} Resolutions.\n */\n getResolutions(projection) {\n if (!this.useResolutions_) {\n return null;\n }\n let resolutions = super.getResolutions();\n if (!resolutions) {\n for (let i = 0, ii = this.layers_.length; i < ii; ++i) {\n const source = this.layers_[i].getSource();\n resolutions = source.getResolutions(projection);\n if (resolutions) {\n break;\n }\n }\n }\n return resolutions;\n }\n\n disposeInternal() {\n if (this.processor_) {\n this.processor_.dispose();\n }\n super.disposeInternal();\n }\n}\n\n/**\n * Clean up and unregister the worker.\n * @function\n * @api\n */\nRasterSource.prototype.dispose;\n\n/**\n * A reusable canvas context.\n * @type {CanvasRenderingContext2D}\n * @private\n */\nlet sharedContext = null;\n\n/**\n * Get image data from a layer.\n * @param {import(\"../layer/Layer.js\").default} layer Layer to render.\n * @param {import(\"../Map.js\").FrameState} frameState The frame state.\n * @return {ImageData} The image data.\n */\nfunction getImageData(layer, frameState) {\n const renderer = layer.getRenderer();\n if (!renderer) {\n throw new Error('Unsupported layer type: ' + layer);\n }\n\n if (!renderer.prepareFrame(frameState)) {\n return null;\n }\n const width = frameState.size[0];\n const height = frameState.size[1];\n if (width === 0 || height === 0) {\n return null;\n }\n const container = renderer.renderFrame(frameState, null);\n let element;\n if (container instanceof HTMLCanvasElement) {\n element = container;\n } else {\n if (container) {\n element = container.firstElementChild;\n }\n if (!(element instanceof HTMLCanvasElement)) {\n throw new Error('Unsupported rendered element: ' + element);\n }\n if (element.width === width && element.height === height) {\n const context = element.getContext('2d');\n return context.getImageData(0, 0, width, height);\n }\n }\n\n if (!sharedContext) {\n sharedContext = createCanvasContext2D(width, height, undefined, {\n willReadFrequently: true,\n });\n } else {\n const canvas = sharedContext.canvas;\n if (canvas.width !== width || canvas.height !== height) {\n sharedContext = createCanvasContext2D(width, height, undefined, {\n willReadFrequently: true,\n });\n } else {\n sharedContext.clearRect(0, 0, width, height);\n }\n }\n sharedContext.drawImage(element, 0, 0, width, height);\n return sharedContext.getImageData(0, 0, width, height);\n}\n\n/**\n * Get a list of layer states from a list of layers.\n * @param {Array} layers Layers.\n * @return {Array} The layer states.\n */\nfunction getLayerStatesArray(layers) {\n return layers.map(function (layer) {\n return layer.getLayerState();\n });\n}\n\n/**\n * Create layers for all sources.\n * @param {Array} sources The sources.\n * @return {Array} Array of layers.\n */\nfunction createLayers(sources) {\n const len = sources.length;\n const layers = new Array(len);\n for (let i = 0; i < len; ++i) {\n layers[i] = createLayer(sources[i]);\n }\n return layers;\n}\n\n/**\n * Create a layer for the provided source.\n * @param {import(\"./Source.js\").default|import(\"../layer/Layer.js\").default} layerOrSource The layer or source.\n * @return {import(\"../layer/Layer.js\").default} The layer.\n */\nfunction createLayer(layerOrSource) {\n // @type {import(\"../layer/Layer.js\").default}\n let layer;\n if (layerOrSource instanceof Source) {\n if (layerOrSource instanceof TileSource) {\n layer = new TileLayer({source: layerOrSource});\n } else if (layerOrSource instanceof ImageSource) {\n layer = new ImageLayer({source: layerOrSource});\n }\n } else {\n layer = layerOrSource;\n }\n return layer;\n}\n\nexport default RasterSource;\n","/**\n * @module ol/source/Stamen\n */\n\nimport XYZ from './XYZ.js';\nimport {ATTRIBUTION as OSM_ATTRIBUTION} from './OSM.js';\n\n/**\n * @const\n * @type {Array}\n */\nconst ATTRIBUTIONS = [\n 'Map tiles by Stamen Design, ' +\n 'under CC BY' +\n ' 3.0.',\n OSM_ATTRIBUTION,\n];\n\n/**\n * @type {Object}\n */\nconst LayerConfig = {\n 'terrain': {\n extension: 'png',\n opaque: true,\n },\n 'terrain-background': {\n extension: 'png',\n opaque: true,\n },\n 'terrain-labels': {\n extension: 'png',\n opaque: false,\n },\n 'terrain-lines': {\n extension: 'png',\n opaque: false,\n },\n 'toner-background': {\n extension: 'png',\n opaque: true,\n },\n 'toner': {\n extension: 'png',\n opaque: true,\n },\n 'toner-hybrid': {\n extension: 'png',\n opaque: false,\n },\n 'toner-labels': {\n extension: 'png',\n opaque: false,\n },\n 'toner-lines': {\n extension: 'png',\n opaque: false,\n },\n 'toner-lite': {\n extension: 'png',\n opaque: true,\n },\n 'watercolor': {\n extension: 'jpg',\n opaque: true,\n },\n};\n\n/**\n * @type {Object}\n */\nconst ProviderConfig = {\n 'terrain': {\n minZoom: 0,\n maxZoom: 18,\n },\n 'toner': {\n minZoom: 0,\n maxZoom: 20,\n },\n 'watercolor': {\n minZoom: 0,\n maxZoom: 18,\n },\n};\n\n/**\n * @typedef {Object} Options\n * @property {number} [cacheSize] Initial tile cache size. Will auto-grow to hold at least the number of tiles in the viewport.\n * @property {boolean} [interpolate=true] Use interpolated values when resampling. By default,\n * linear interpolation is used when resampling. Set to false to use the nearest neighbor instead.\n * @property {string} layer Layer name.\n * @property {number} [minZoom] Minimum zoom.\n * @property {number} [maxZoom] Maximum zoom.\n * @property {number} [reprojectionErrorThreshold=0.5] Maximum allowed reprojection error (in pixels).\n * Higher values can increase reprojection performance, but decrease precision.\n * @property {import(\"../Tile.js\").LoadFunction} [tileLoadFunction]\n * Optional function to load a tile given a URL. The default is\n * ```js\n * function(imageTile, src) {\n * imageTile.getImage().src = src;\n * };\n * ```\n * @property {number} [transition=250] Duration of the opacity transition for rendering.\n * To disable the opacity transition, pass `transition: 0`.\n * @property {string} [url] URL template. Must include `{x}`, `{y}` or `{-y}`, and `{z}` placeholders.\n * @property {boolean} [wrapX=true] Whether to wrap the world horizontally.\n * @property {number|import(\"../array.js\").NearestDirectionFunction} [zDirection=0]\n * Choose whether to use tiles with a higher or lower zoom level when between integer\n * zoom levels. See {@link module:ol/tilegrid/TileGrid~TileGrid#getZForResolution}.\n */\n\n/**\n * @classdesc\n * Layer source for the Stamen tile server.\n * @api\n */\nclass Stamen extends XYZ {\n /**\n * @param {Options} options Stamen options.\n */\n constructor(options) {\n const i = options.layer.indexOf('-');\n const provider = i == -1 ? options.layer : options.layer.slice(0, i);\n const providerConfig = ProviderConfig[provider];\n\n const layerConfig = LayerConfig[options.layer];\n\n const url =\n options.url !== undefined\n ? options.url\n : 'https://stamen-tiles-{a-d}.a.ssl.fastly.net/' +\n options.layer +\n '/{z}/{x}/{y}.' +\n layerConfig.extension;\n\n super({\n attributions: ATTRIBUTIONS,\n cacheSize: options.cacheSize,\n crossOrigin: 'anonymous',\n interpolate: options.interpolate,\n maxZoom:\n options.maxZoom != undefined ? options.maxZoom : providerConfig.maxZoom,\n minZoom:\n options.minZoom != undefined ? options.minZoom : providerConfig.minZoom,\n opaque: layerConfig.opaque,\n reprojectionErrorThreshold: options.reprojectionErrorThreshold,\n tileLoadFunction: options.tileLoadFunction,\n transition: options.transition,\n url: url,\n wrapX: options.wrapX,\n zDirection: options.zDirection,\n });\n }\n}\n\nexport default Stamen;\n","/**\n * @module ol/source/TileArcGISRest\n */\n\nimport TileImage from './TileImage.js';\nimport {appendParams} from '../uri.js';\nimport {createEmpty} from '../extent.js';\nimport {modulo} from '../math.js';\nimport {scale as scaleSize, toSize} from '../size.js';\nimport {hash as tileCoordHash} from '../tilecoord.js';\n\n/**\n * @typedef {Object} Options\n * @property {import(\"./Source.js\").AttributionLike} [attributions] Attributions.\n * @property {number} [cacheSize] Initial tile cache size. Will auto-grow to hold at least the number of tiles in the viewport.\n * @property {null|string} [crossOrigin] The `crossOrigin` attribute for loaded images. Note that\n * you must provide a `crossOrigin` value if you want to access pixel data with the Canvas renderer.\n * See https://developer.mozilla.org/en-US/docs/Web/HTML/CORS_enabled_image for more detail.\n * @property {boolean} [interpolate=true] Use interpolated values when resampling. By default,\n * linear interpolation is used when resampling. Set to false to use the nearest neighbor instead.\n * @property {Object} [params] ArcGIS Rest parameters. This field is optional. Service defaults will be\n * used for any fields not specified. `FORMAT` is `PNG32` by default. `F` is `IMAGE` by\n * default. `TRANSPARENT` is `true` by default. `BBOX`, `SIZE`, `BBOXSR`,\n * and `IMAGESR` will be set dynamically. Set `LAYERS` to\n * override the default service layer visibility. See\n * https://developers.arcgis.com/rest/services-reference/export-map.htm\n * for further reference.\n * @property {boolean} [hidpi=true] Use the `ol/Map#pixelRatio` value when requesting\n * the image from the remote server.\n * @property {import(\"../tilegrid/TileGrid.js\").default} [tileGrid] Tile grid. Base this on the resolutions,\n * tilesize and extent supported by the server.\n * If this is not defined, a default grid will be used: if there is a projection\n * extent, the grid will be based on that; if not, a grid based on a global\n * extent with origin at 0,0 will be used.\n * @property {import(\"../proj.js\").ProjectionLike} [projection] Projection. Default is the view projection.\n * The projection code must contain a numeric end portion separated by :\n * or the entire code must form a valid ArcGIS SpatialReference definition.\n * @property {number} [reprojectionErrorThreshold=0.5] Maximum allowed reprojection error (in pixels).\n * Higher values can increase reprojection performance, but decrease precision.\n * @property {import(\"../Tile.js\").LoadFunction} [tileLoadFunction] Optional function to load a tile given a URL.\n * The default is\n * ```js\n * function(imageTile, src) {\n * imageTile.getImage().src = src;\n * };\n * ```\n * @property {string} [url] ArcGIS Rest service URL for a Map Service or Image Service. The\n * url should include /MapServer or /ImageServer.\n * @property {boolean} [wrapX=true] Whether to wrap the world horizontally.\n * @property {number} [transition] Duration of the opacity transition for rendering. To disable the opacity\n * transition, pass `transition: 0`.\n * @property {Array} [urls] ArcGIS Rest service urls. Use this instead of `url` when the ArcGIS\n * Service supports multiple urls for export requests.\n * @property {number|import(\"../array.js\").NearestDirectionFunction} [zDirection=0]\n * Choose whether to use tiles with a higher or lower zoom level when between integer\n * zoom levels. See {@link module:ol/tilegrid/TileGrid~TileGrid#getZForResolution}.\n */\n\n/**\n * @classdesc\n * Layer source for tile data from ArcGIS Rest services. Map and Image\n * Services are supported.\n *\n * For cached ArcGIS services, better performance is available using the\n * {@link module:ol/source/XYZ~XYZ} data source.\n * @api\n */\nclass TileArcGISRest extends TileImage {\n /**\n * @param {Options} [options] Tile ArcGIS Rest options.\n */\n constructor(options) {\n options = options ? options : {};\n\n super({\n attributions: options.attributions,\n cacheSize: options.cacheSize,\n crossOrigin: options.crossOrigin,\n interpolate: options.interpolate,\n projection: options.projection,\n reprojectionErrorThreshold: options.reprojectionErrorThreshold,\n tileGrid: options.tileGrid,\n tileLoadFunction: options.tileLoadFunction,\n url: options.url,\n urls: options.urls,\n wrapX: options.wrapX !== undefined ? options.wrapX : true,\n transition: options.transition,\n zDirection: options.zDirection,\n });\n\n /**\n * @private\n * @type {!Object}\n */\n this.params_ = options.params || {};\n\n /**\n * @private\n * @type {boolean}\n */\n this.hidpi_ = options.hidpi !== undefined ? options.hidpi : true;\n\n /**\n * @private\n * @type {import(\"../extent.js\").Extent}\n */\n this.tmpExtent_ = createEmpty();\n\n this.setKey(this.getKeyForParams_());\n }\n\n /**\n * @private\n * @return {string} The key for the current params.\n */\n getKeyForParams_() {\n let i = 0;\n const res = [];\n for (const key in this.params_) {\n res[i++] = key + '-' + this.params_[key];\n }\n return res.join('/');\n }\n\n /**\n * Get the user-provided params, i.e. those passed to the constructor through\n * the \"params\" option, and possibly updated using the updateParams method.\n * @return {Object} Params.\n * @api\n */\n getParams() {\n return this.params_;\n }\n\n /**\n * @param {import(\"../tilecoord.js\").TileCoord} tileCoord Tile coordinate.\n * @param {import(\"../size.js\").Size} tileSize Tile size.\n * @param {import(\"../extent.js\").Extent} tileExtent Tile extent.\n * @param {number} pixelRatio Pixel ratio.\n * @param {import(\"../proj/Projection.js\").default} projection Projection.\n * @param {Object} params Params.\n * @return {string|undefined} Request URL.\n * @private\n */\n getRequestUrl_(\n tileCoord,\n tileSize,\n tileExtent,\n pixelRatio,\n projection,\n params\n ) {\n const urls = this.urls;\n if (!urls) {\n return undefined;\n }\n\n // ArcGIS Server only wants the numeric portion of the projection ID.\n // (if there is no numeric portion the entire projection code must\n // form a valid ArcGIS SpatialReference definition).\n const srid = projection\n .getCode()\n .split(/:(?=\\d+$)/)\n .pop();\n\n params['SIZE'] = tileSize[0] + ',' + tileSize[1];\n params['BBOX'] = tileExtent.join(',');\n params['BBOXSR'] = srid;\n params['IMAGESR'] = srid;\n params['DPI'] = Math.round(\n params['DPI'] ? params['DPI'] * pixelRatio : 90 * pixelRatio\n );\n\n let url;\n if (urls.length == 1) {\n url = urls[0];\n } else {\n const index = modulo(tileCoordHash(tileCoord), urls.length);\n url = urls[index];\n }\n\n const modifiedUrl = url\n .replace(/MapServer\\/?$/, 'MapServer/export')\n .replace(/ImageServer\\/?$/, 'ImageServer/exportImage');\n return appendParams(modifiedUrl, params);\n }\n\n /**\n * Get the tile pixel ratio for this source.\n * @param {number} pixelRatio Pixel ratio.\n * @return {number} Tile pixel ratio.\n */\n getTilePixelRatio(pixelRatio) {\n return this.hidpi_ ? pixelRatio : 1;\n }\n\n /**\n * Update the user-provided params.\n * @param {Object} params Params.\n * @api\n */\n updateParams(params) {\n Object.assign(this.params_, params);\n this.setKey(this.getKeyForParams_());\n }\n\n /**\n * @param {import(\"../tilecoord.js\").TileCoord} tileCoord The tile coordinate\n * @param {number} pixelRatio The pixel ratio\n * @param {import(\"../proj/Projection.js\").default} projection The projection\n * @return {string|undefined} The tile URL\n * @override\n */\n tileUrlFunction(tileCoord, pixelRatio, projection) {\n let tileGrid = this.getTileGrid();\n if (!tileGrid) {\n tileGrid = this.getTileGridForProjection(projection);\n }\n\n if (tileGrid.getResolutions().length <= tileCoord[0]) {\n return undefined;\n }\n\n if (pixelRatio != 1 && !this.hidpi_) {\n pixelRatio = 1;\n }\n\n const tileExtent = tileGrid.getTileCoordExtent(tileCoord, this.tmpExtent_);\n let tileSize = toSize(tileGrid.getTileSize(tileCoord[0]), this.tmpSize);\n\n if (pixelRatio != 1) {\n tileSize = scaleSize(tileSize, pixelRatio, this.tmpSize);\n }\n\n // Apply default params and override with user specified values.\n const baseParams = {\n 'F': 'image',\n 'FORMAT': 'PNG32',\n 'TRANSPARENT': true,\n };\n Object.assign(baseParams, this.params_);\n\n return this.getRequestUrl_(\n tileCoord,\n tileSize,\n tileExtent,\n pixelRatio,\n projection,\n baseParams\n );\n }\n}\n\nexport default TileArcGISRest;\n","/**\n * @module ol/source/TileDebug\n */\n\nimport XYZ from './XYZ.js';\nimport {createCanvasContext2D} from '../dom.js';\nimport {toSize} from '../size.js';\n\n/**\n * @typedef {Object} Options\n * @property {import(\"../proj.js\").ProjectionLike} [projection='EPSG:3857'] Optional projection.\n * @property {import(\"../tilegrid/TileGrid.js\").default} [tileGrid] Tile grid.\n * @property {boolean} [wrapX=true] Whether to wrap the world horizontally.\n * @property {number|import(\"../array.js\").NearestDirectionFunction} [zDirection=0]\n * Set to `1` when debugging `VectorTile` sources with a default configuration.\n * Choose whether to use tiles with a higher or lower zoom level when between integer\n * zoom levels. See {@link module:ol/tilegrid/TileGrid~TileGrid#getZForResolution}.\n * @property {string} [template='z:{z} x:{x} y:{y}'] Template for labeling the tiles.\n * Should include `{x}`, `{y}` or `{-y}`, and `{z}` placeholders.\n */\n\n/**\n * @classdesc\n * A pseudo tile source, which does not fetch tiles from a server, but renders\n * a grid outline for the tile grid/projection along with the coordinates for\n * each tile. See examples/canvas-tiles for an example.\n * @api\n */\nclass TileDebug extends XYZ {\n /**\n * @param {Options} [options] Debug tile options.\n */\n constructor(options) {\n /**\n * @type {Options}\n */\n options = options || {};\n\n super({\n opaque: false,\n projection: options.projection,\n tileGrid: options.tileGrid,\n wrapX: options.wrapX !== undefined ? options.wrapX : true,\n zDirection: options.zDirection,\n url: options.template || 'z:{z} x:{x} y:{y}',\n tileLoadFunction: (tile, text) => {\n const z = tile.getTileCoord()[0];\n const tileSize = toSize(this.tileGrid.getTileSize(z));\n const context = createCanvasContext2D(tileSize[0], tileSize[1]);\n\n context.strokeStyle = 'grey';\n context.strokeRect(0.5, 0.5, tileSize[0] + 0.5, tileSize[1] + 0.5);\n\n context.fillStyle = 'grey';\n context.strokeStyle = 'white';\n context.textAlign = 'center';\n context.textBaseline = 'middle';\n context.font = '24px sans-serif';\n context.lineWidth = 4;\n context.strokeText(text, tileSize[0] / 2, tileSize[1] / 2, tileSize[0]);\n context.fillText(text, tileSize[0] / 2, tileSize[1] / 2, tileSize[0]);\n\n /** @type {import(\"../ImageTile.js\").default} */ (tile).setImage(\n context.canvas\n );\n },\n });\n }\n}\n\nexport default TileDebug;\n","/**\n * @module ol/source/TileJSON\n */\n// FIXME check order of async callbacks\n\n/**\n * See https://mapbox.com/developers/api/.\n */\n\nimport TileImage from './TileImage.js';\nimport {applyTransform, intersects} from '../extent.js';\nimport {assert} from '../asserts.js';\nimport {createFromTemplates} from '../tileurlfunction.js';\nimport {createXYZ, extentFromProjection} from '../tilegrid.js';\nimport {get as getProjection, getTransformFromProjections} from '../proj.js';\nimport {jsonp as requestJSONP} from '../net.js';\n\n/**\n * @typedef {Object} Config\n * @property {string} [name] The name.\n * @property {string} [description] The description.\n * @property {string} [version] The version.\n * @property {string} [attribution] The attribution.\n * @property {string} [template] The template.\n * @property {string} [legend] The legend.\n * @property {string} [scheme] The scheme.\n * @property {Array} tiles The tile URL templates.\n * @property {Array} [grids] Optional grids.\n * @property {number} [minzoom] Minimum zoom level.\n * @property {number} [maxzoom] Maximum zoom level.\n * @property {Array} [bounds] Optional bounds.\n * @property {Array} [center] Optional center.\n */\n\n/**\n * @typedef {Object} Options\n * @property {import(\"./Source.js\").AttributionLike} [attributions] Attributions.\n * @property {number} [cacheSize] Initial tile cache size. Will auto-grow to hold at least the number of tiles in the viewport.\n * @property {null|string} [crossOrigin] The `crossOrigin` attribute for loaded images. Note that\n * you must provide a `crossOrigin` value if you want to access pixel data with the Canvas renderer.\n * See https://developer.mozilla.org/en-US/docs/Web/HTML/CORS_enabled_image for more detail.\n * @property {boolean} [interpolate=true] Use interpolated values when resampling. By default,\n * linear interpolation is used when resampling. Set to false to use the nearest neighbor instead.\n * @property {boolean} [jsonp=false] Use JSONP with callback to load the TileJSON.\n * Useful when the server does not support CORS..\n * @property {number} [reprojectionErrorThreshold=0.5] Maximum allowed reprojection error (in pixels).\n * Higher values can increase reprojection performance, but decrease precision.\n * @property {Config} [tileJSON] TileJSON configuration for this source.\n * If not provided, `url` must be configured.\n * @property {import(\"../Tile.js\").LoadFunction} [tileLoadFunction] Optional function to load a tile given a URL. The default is\n * ```js\n * function(imageTile, src) {\n * imageTile.getImage().src = src;\n * };\n * ```\n * @property {number|import(\"../size.js\").Size} [tileSize=[256, 256]] The tile size used by the tile service.\n * Note: `tileSize` and other non-standard TileJSON properties are currently ignored.\n * @property {string} [url] URL to the TileJSON file. If not provided, `tileJSON` must be configured.\n * @property {boolean} [wrapX=true] Whether to wrap the world horizontally.\n * @property {number} [transition] Duration of the opacity transition for rendering.\n * To disable the opacity transition, pass `transition: 0`.\n * @property {number|import(\"../array.js\").NearestDirectionFunction} [zDirection=0]\n * Choose whether to use tiles with a higher or lower zoom level when between integer\n * zoom levels. See {@link module:ol/tilegrid/TileGrid~TileGrid#getZForResolution}.\n */\n\n/**\n * @classdesc\n * Layer source for tile data in TileJSON format.\n * @api\n */\nclass TileJSON extends TileImage {\n /**\n * @param {Options} options TileJSON options.\n */\n constructor(options) {\n super({\n attributions: options.attributions,\n cacheSize: options.cacheSize,\n crossOrigin: options.crossOrigin,\n interpolate: options.interpolate,\n projection: getProjection('EPSG:3857'),\n reprojectionErrorThreshold: options.reprojectionErrorThreshold,\n state: 'loading',\n tileLoadFunction: options.tileLoadFunction,\n wrapX: options.wrapX !== undefined ? options.wrapX : true,\n transition: options.transition,\n zDirection: options.zDirection,\n });\n\n /**\n * @type {Config}\n * @private\n */\n this.tileJSON_ = null;\n\n /**\n * @type {number|import(\"../size.js\").Size}\n * @private\n */\n this.tileSize_ = options.tileSize;\n\n if (options.url) {\n if (options.jsonp) {\n requestJSONP(\n options.url,\n this.handleTileJSONResponse.bind(this),\n this.handleTileJSONError.bind(this)\n );\n } else {\n const client = new XMLHttpRequest();\n client.addEventListener('load', this.onXHRLoad_.bind(this));\n client.addEventListener('error', this.onXHRError_.bind(this));\n client.open('GET', options.url);\n client.send();\n }\n } else if (options.tileJSON) {\n this.handleTileJSONResponse(options.tileJSON);\n } else {\n assert(false, 51); // Either `url` or `tileJSON` options must be provided\n }\n }\n\n /**\n * @private\n * @param {Event} event The load event.\n */\n onXHRLoad_(event) {\n const client = /** @type {XMLHttpRequest} */ (event.target);\n // status will be 0 for file:// urls\n if (!client.status || (client.status >= 200 && client.status < 300)) {\n let response;\n try {\n response = /** @type {Config} */ (JSON.parse(client.responseText));\n } catch (err) {\n this.handleTileJSONError();\n return;\n }\n this.handleTileJSONResponse(response);\n } else {\n this.handleTileJSONError();\n }\n }\n\n /**\n * @private\n * @param {Event} event The error event.\n */\n onXHRError_(event) {\n this.handleTileJSONError();\n }\n\n /**\n * @return {Config} The tilejson object.\n * @api\n */\n getTileJSON() {\n return this.tileJSON_;\n }\n\n /**\n * @protected\n * @param {Config} tileJSON Tile JSON.\n */\n handleTileJSONResponse(tileJSON) {\n const epsg4326Projection = getProjection('EPSG:4326');\n\n const sourceProjection = this.getProjection();\n let extent;\n if (tileJSON['bounds'] !== undefined) {\n const transform = getTransformFromProjections(\n epsg4326Projection,\n sourceProjection\n );\n extent = applyTransform(tileJSON['bounds'], transform);\n }\n\n const gridExtent = extentFromProjection(sourceProjection);\n const minZoom = tileJSON['minzoom'] || 0;\n const maxZoom = tileJSON['maxzoom'] || 22;\n const tileGrid = createXYZ({\n extent: gridExtent,\n maxZoom: maxZoom,\n minZoom: minZoom,\n tileSize: this.tileSize_,\n });\n this.tileGrid = tileGrid;\n\n this.tileUrlFunction = createFromTemplates(tileJSON['tiles'], tileGrid);\n\n if (tileJSON['attribution'] && !this.getAttributions()) {\n const attributionExtent = extent !== undefined ? extent : gridExtent;\n this.setAttributions(function (frameState) {\n if (intersects(attributionExtent, frameState.extent)) {\n return [tileJSON['attribution']];\n }\n return null;\n });\n }\n this.tileJSON_ = tileJSON;\n this.setState('ready');\n }\n\n /**\n * @protected\n */\n handleTileJSONError() {\n this.setState('error');\n }\n}\n\nexport default TileJSON;\n","/**\n * @module ol/source/TileWMS\n */\n\nimport TileImage from './TileImage.js';\nimport {DEFAULT_VERSION} from './wms.js';\nimport {appendParams} from '../uri.js';\nimport {assert} from '../asserts.js';\nimport {buffer, createEmpty} from '../extent.js';\nimport {buffer as bufferSize, scale as scaleSize, toSize} from '../size.js';\nimport {calculateSourceResolution} from '../reproj.js';\nimport {compareVersions} from '../string.js';\nimport {get as getProjection, transform, transformExtent} from '../proj.js';\nimport {modulo} from '../math.js';\nimport {hash as tileCoordHash} from '../tilecoord.js';\n\n/**\n * @typedef {Object} Options\n * @property {import(\"./Source.js\").AttributionLike} [attributions] Attributions.\n * @property {boolean} [attributionsCollapsible=true] Attributions are collapsible.\n * @property {number} [cacheSize] Initial tile cache size. Will auto-grow to hold at least the number of tiles in the viewport.\n * @property {null|string} [crossOrigin] The `crossOrigin` attribute for loaded images. Note that\n * you must provide a `crossOrigin` value if you want to access pixel data with the Canvas renderer.\n * See https://developer.mozilla.org/en-US/docs/Web/HTML/CORS_enabled_image for more detail.\n * @property {boolean} [interpolate=true] Use interpolated values when resampling. By default,\n * linear interpolation is used when resampling. Set to false to use the nearest neighbor instead.\n * @property {Object} params WMS request parameters.\n * At least a `LAYERS` param is required. `STYLES` is\n * `''` by default. `VERSION` is `1.3.0` by default. `WIDTH`, `HEIGHT`, `BBOX`\n * and `CRS` (`SRS` for WMS version < 1.3.0) will be set dynamically.\n * @property {number} [gutter=0]\n * The size in pixels of the gutter around image tiles to ignore. By setting\n * this property to a non-zero value, images will be requested that are wider\n * and taller than the tile size by a value of `2 x gutter`.\n * Using a non-zero value allows artifacts of rendering at tile edges to be\n * ignored. If you control the WMS service it is recommended to address\n * \"artifacts at tile edges\" issues by properly configuring the WMS service. For\n * example, MapServer has a `tile_map_edge_buffer` configuration parameter for\n * this. See https://mapserver.org/output/tile_mode.html.\n * @property {boolean} [hidpi=true] Use the `ol/Map#pixelRatio` value when requesting\n * the image from the remote server.\n * @property {import(\"../proj.js\").ProjectionLike} [projection] Projection. Default is the view projection.\n * @property {number} [reprojectionErrorThreshold=0.5] Maximum allowed reprojection error (in pixels).\n * Higher values can increase reprojection performance, but decrease precision.\n * @property {typeof import(\"../ImageTile.js\").default} [tileClass] Class used to instantiate image tiles.\n * Default is {@link module:ol/ImageTile~ImageTile}.\n * @property {import(\"../tilegrid/TileGrid.js\").default} [tileGrid] Tile grid. Base this on the resolutions,\n * tilesize and extent supported by the server.\n * If this is not defined, a default grid will be used: if there is a projection\n * extent, the grid will be based on that; if not, a grid based on a global\n * extent with origin at 0,0 will be used.\n * @property {import(\"./wms.js\").ServerType} [serverType] The type of\n * the remote WMS server: `mapserver`, `geoserver`, `carmentaserver`, or `qgis`.\n * Only needed if `hidpi` is `true`.\n * @property {import(\"../Tile.js\").LoadFunction} [tileLoadFunction] Optional function to load a tile given a URL. The default is\n * ```js\n * function(imageTile, src) {\n * imageTile.getImage().src = src;\n * };\n * ```\n * @property {string} [url] WMS service URL.\n * @property {Array} [urls] WMS service urls.\n * Use this instead of `url` when the WMS supports multiple urls for GetMap requests.\n * @property {boolean} [wrapX=true] Whether to wrap the world horizontally.\n * When set to `false`, only one world\n * will be rendered. When `true`, tiles will be requested for one world only,\n * but they will be wrapped horizontally to render multiple worlds.\n * @property {number} [transition] Duration of the opacity transition for rendering.\n * To disable the opacity transition, pass `transition: 0`.\n * @property {number|import(\"../array.js\").NearestDirectionFunction} [zDirection=0]\n * Choose whether to use tiles with a higher or lower zoom level when between integer\n * zoom levels. See {@link module:ol/tilegrid/TileGrid~TileGrid#getZForResolution}.\n */\n\n/**\n * @classdesc\n * Layer source for tile data from WMS servers.\n * @api\n */\nclass TileWMS extends TileImage {\n /**\n * @param {Options} [options] Tile WMS options.\n */\n constructor(options) {\n options = options ? options : /** @type {Options} */ ({});\n\n const params = Object.assign({}, options.params);\n\n const transparent = 'TRANSPARENT' in params ? params['TRANSPARENT'] : true;\n\n super({\n attributions: options.attributions,\n attributionsCollapsible: options.attributionsCollapsible,\n cacheSize: options.cacheSize,\n crossOrigin: options.crossOrigin,\n interpolate: options.interpolate,\n opaque: !transparent,\n projection: options.projection,\n reprojectionErrorThreshold: options.reprojectionErrorThreshold,\n tileClass: options.tileClass,\n tileGrid: options.tileGrid,\n tileLoadFunction: options.tileLoadFunction,\n url: options.url,\n urls: options.urls,\n wrapX: options.wrapX !== undefined ? options.wrapX : true,\n transition: options.transition,\n zDirection: options.zDirection,\n });\n\n /**\n * @private\n * @type {number}\n */\n this.gutter_ = options.gutter !== undefined ? options.gutter : 0;\n\n /**\n * @private\n * @type {!Object}\n */\n this.params_ = params;\n\n /**\n * @private\n * @type {boolean}\n */\n this.v13_ = true;\n\n /**\n * @private\n * @type {import(\"./wms.js\").ServerType}\n */\n this.serverType_ = options.serverType;\n\n /**\n * @private\n * @type {boolean}\n */\n this.hidpi_ = options.hidpi !== undefined ? options.hidpi : true;\n\n /**\n * @private\n * @type {import(\"../extent.js\").Extent}\n */\n this.tmpExtent_ = createEmpty();\n\n this.updateV13_();\n this.setKey(this.getKeyForParams_());\n }\n\n /**\n * Return the GetFeatureInfo URL for the passed coordinate, resolution, and\n * projection. Return `undefined` if the GetFeatureInfo URL cannot be\n * constructed.\n * @param {import(\"../coordinate.js\").Coordinate} coordinate Coordinate.\n * @param {number} resolution Resolution.\n * @param {import(\"../proj.js\").ProjectionLike} projection Projection.\n * @param {!Object} params GetFeatureInfo params. `INFO_FORMAT` at least should\n * be provided. If `QUERY_LAYERS` is not provided then the layers specified\n * in the `LAYERS` parameter will be used. `VERSION` should not be\n * specified here.\n * @return {string|undefined} GetFeatureInfo URL.\n * @api\n */\n getFeatureInfoUrl(coordinate, resolution, projection, params) {\n const projectionObj = getProjection(projection);\n const sourceProjectionObj = this.getProjection();\n\n let tileGrid = this.getTileGrid();\n if (!tileGrid) {\n tileGrid = this.getTileGridForProjection(projectionObj);\n }\n\n const z = tileGrid.getZForResolution(resolution, this.zDirection);\n const tileCoord = tileGrid.getTileCoordForCoordAndZ(coordinate, z);\n\n if (tileGrid.getResolutions().length <= tileCoord[0]) {\n return undefined;\n }\n\n let tileResolution = tileGrid.getResolution(tileCoord[0]);\n let tileExtent = tileGrid.getTileCoordExtent(tileCoord, this.tmpExtent_);\n let tileSize = toSize(tileGrid.getTileSize(tileCoord[0]), this.tmpSize);\n\n const gutter = this.gutter_;\n if (gutter !== 0) {\n tileSize = bufferSize(tileSize, gutter, this.tmpSize);\n tileExtent = buffer(tileExtent, tileResolution * gutter, tileExtent);\n }\n\n if (sourceProjectionObj && sourceProjectionObj !== projectionObj) {\n tileResolution = calculateSourceResolution(\n sourceProjectionObj,\n projectionObj,\n coordinate,\n tileResolution\n );\n tileExtent = transformExtent(\n tileExtent,\n projectionObj,\n sourceProjectionObj\n );\n coordinate = transform(coordinate, projectionObj, sourceProjectionObj);\n }\n\n const baseParams = {\n 'SERVICE': 'WMS',\n 'VERSION': DEFAULT_VERSION,\n 'REQUEST': 'GetFeatureInfo',\n 'FORMAT': 'image/png',\n 'TRANSPARENT': true,\n 'QUERY_LAYERS': this.params_['LAYERS'],\n };\n Object.assign(baseParams, this.params_, params);\n\n const x = Math.floor((coordinate[0] - tileExtent[0]) / tileResolution);\n const y = Math.floor((tileExtent[3] - coordinate[1]) / tileResolution);\n\n baseParams[this.v13_ ? 'I' : 'X'] = x;\n baseParams[this.v13_ ? 'J' : 'Y'] = y;\n\n return this.getRequestUrl_(\n tileCoord,\n tileSize,\n tileExtent,\n 1,\n sourceProjectionObj || projectionObj,\n baseParams\n );\n }\n\n /**\n * Return the GetLegendGraphic URL, optionally optimized for the passed\n * resolution and possibly including any passed specific parameters. Returns\n * `undefined` if the GetLegendGraphic URL cannot be constructed.\n *\n * @param {number} [resolution] Resolution. If set to undefined, `SCALE`\n * will not be calculated and included in URL.\n * @param {Object} [params] GetLegendGraphic params. If `LAYER` is set, the\n * request is generated for this wms layer, else it will try to use the\n * configured wms layer. Default `FORMAT` is `image/png`.\n * `VERSION` should not be specified here.\n * @return {string|undefined} GetLegendGraphic URL.\n * @api\n */\n getLegendUrl(resolution, params) {\n if (this.urls[0] === undefined) {\n return undefined;\n }\n\n const baseParams = {\n 'SERVICE': 'WMS',\n 'VERSION': DEFAULT_VERSION,\n 'REQUEST': 'GetLegendGraphic',\n 'FORMAT': 'image/png',\n };\n\n if (params === undefined || params['LAYER'] === undefined) {\n const layers = this.params_.LAYERS;\n const isSingleLayer = !Array.isArray(layers) || layers.length === 1;\n if (!isSingleLayer) {\n return undefined;\n }\n baseParams['LAYER'] = layers;\n }\n\n if (resolution !== undefined) {\n const mpu = this.getProjection()\n ? this.getProjection().getMetersPerUnit()\n : 1;\n const pixelSize = 0.00028;\n baseParams['SCALE'] = (resolution * mpu) / pixelSize;\n }\n\n Object.assign(baseParams, params);\n\n return appendParams(/** @type {string} */ (this.urls[0]), baseParams);\n }\n\n /**\n * @return {number} Gutter.\n */\n getGutter() {\n return this.gutter_;\n }\n\n /**\n * Get the user-provided params, i.e. those passed to the constructor through\n * the \"params\" option, and possibly updated using the updateParams method.\n * @return {Object} Params.\n * @api\n */\n getParams() {\n return this.params_;\n }\n\n /**\n * @param {import(\"../tilecoord.js\").TileCoord} tileCoord Tile coordinate.\n * @param {import(\"../size.js\").Size} tileSize Tile size.\n * @param {import(\"../extent.js\").Extent} tileExtent Tile extent.\n * @param {number} pixelRatio Pixel ratio.\n * @param {import(\"../proj/Projection.js\").default} projection Projection.\n * @param {Object} params Params.\n * @return {string|undefined} Request URL.\n * @private\n */\n getRequestUrl_(\n tileCoord,\n tileSize,\n tileExtent,\n pixelRatio,\n projection,\n params\n ) {\n const urls = this.urls;\n if (!urls) {\n return undefined;\n }\n\n params['WIDTH'] = tileSize[0];\n params['HEIGHT'] = tileSize[1];\n\n params[this.v13_ ? 'CRS' : 'SRS'] = projection.getCode();\n\n if (!('STYLES' in this.params_)) {\n params['STYLES'] = '';\n }\n\n if (pixelRatio != 1) {\n switch (this.serverType_) {\n case 'geoserver':\n const dpi = (90 * pixelRatio + 0.5) | 0;\n if ('FORMAT_OPTIONS' in params) {\n params['FORMAT_OPTIONS'] += ';dpi:' + dpi;\n } else {\n params['FORMAT_OPTIONS'] = 'dpi:' + dpi;\n }\n break;\n case 'mapserver':\n params['MAP_RESOLUTION'] = 90 * pixelRatio;\n break;\n case 'carmentaserver':\n case 'qgis':\n params['DPI'] = 90 * pixelRatio;\n break;\n default: // Unknown `serverType` configured\n assert(false, 52);\n break;\n }\n }\n\n const axisOrientation = projection.getAxisOrientation();\n const bbox = tileExtent;\n if (this.v13_ && axisOrientation.substr(0, 2) == 'ne') {\n let tmp;\n tmp = tileExtent[0];\n bbox[0] = tileExtent[1];\n bbox[1] = tmp;\n tmp = tileExtent[2];\n bbox[2] = tileExtent[3];\n bbox[3] = tmp;\n }\n params['BBOX'] = bbox.join(',');\n\n let url;\n if (urls.length == 1) {\n url = urls[0];\n } else {\n const index = modulo(tileCoordHash(tileCoord), urls.length);\n url = urls[index];\n }\n return appendParams(url, params);\n }\n\n /**\n * Get the tile pixel ratio for this source.\n * @param {number} pixelRatio Pixel ratio.\n * @return {number} Tile pixel ratio.\n */\n getTilePixelRatio(pixelRatio) {\n return !this.hidpi_ || this.serverType_ === undefined ? 1 : pixelRatio;\n }\n\n /**\n * @private\n * @return {string} The key for the current params.\n */\n getKeyForParams_() {\n let i = 0;\n const res = [];\n for (const key in this.params_) {\n res[i++] = key + '-' + this.params_[key];\n }\n return res.join('/');\n }\n\n /**\n * Update the user-provided params.\n * @param {Object} params Params.\n * @api\n */\n updateParams(params) {\n Object.assign(this.params_, params);\n this.updateV13_();\n this.setKey(this.getKeyForParams_());\n }\n\n /**\n * @private\n */\n updateV13_() {\n const version = this.params_['VERSION'] || DEFAULT_VERSION;\n this.v13_ = compareVersions(version, '1.3') >= 0;\n }\n\n /**\n * @param {import(\"../tilecoord.js\").TileCoord} tileCoord The tile coordinate\n * @param {number} pixelRatio The pixel ratio\n * @param {import(\"../proj/Projection.js\").default} projection The projection\n * @return {string|undefined} The tile URL\n * @override\n */\n tileUrlFunction(tileCoord, pixelRatio, projection) {\n let tileGrid = this.getTileGrid();\n if (!tileGrid) {\n tileGrid = this.getTileGridForProjection(projection);\n }\n\n if (tileGrid.getResolutions().length <= tileCoord[0]) {\n return undefined;\n }\n\n if (pixelRatio != 1 && (!this.hidpi_ || this.serverType_ === undefined)) {\n pixelRatio = 1;\n }\n\n const tileResolution = tileGrid.getResolution(tileCoord[0]);\n let tileExtent = tileGrid.getTileCoordExtent(tileCoord, this.tmpExtent_);\n let tileSize = toSize(tileGrid.getTileSize(tileCoord[0]), this.tmpSize);\n\n const gutter = this.gutter_;\n if (gutter !== 0) {\n tileSize = bufferSize(tileSize, gutter, this.tmpSize);\n tileExtent = buffer(tileExtent, tileResolution * gutter, tileExtent);\n }\n\n if (pixelRatio != 1) {\n tileSize = scaleSize(tileSize, pixelRatio, this.tmpSize);\n }\n\n const baseParams = {\n 'SERVICE': 'WMS',\n 'VERSION': DEFAULT_VERSION,\n 'REQUEST': 'GetMap',\n 'FORMAT': 'image/png',\n 'TRANSPARENT': true,\n };\n Object.assign(baseParams, this.params_);\n\n return this.getRequestUrl_(\n tileCoord,\n tileSize,\n tileExtent,\n pixelRatio,\n projection,\n baseParams\n );\n }\n}\n\nexport default TileWMS;\n","/**\n * @module ol/source/UTFGrid\n */\n\nimport EventType from '../events/EventType.js';\nimport Tile from '../Tile.js';\nimport TileSource from './Tile.js';\nimport TileState from '../TileState.js';\nimport {applyTransform, intersects} from '../extent.js';\nimport {assert} from '../asserts.js';\nimport {createFromTemplates, nullTileUrlFunction} from '../tileurlfunction.js';\nimport {createXYZ, extentFromProjection} from '../tilegrid.js';\nimport {getKeyZXY} from '../tilecoord.js';\nimport {get as getProjection, getTransformFromProjections} from '../proj.js';\nimport {listenOnce} from '../events.js';\nimport {jsonp as requestJSONP} from '../net.js';\n\n/**\n * @typedef {Object} UTFGridJSON\n * @property {Array} grid The grid.\n * @property {Array} keys The keys.\n * @property {Object} [data] Optional data.\n */\n\nexport class CustomTile extends Tile {\n /**\n * @param {import(\"../tilecoord.js\").TileCoord} tileCoord Tile coordinate.\n * @param {import(\"../TileState.js\").default} state State.\n * @param {string} src Image source URI.\n * @param {import(\"../extent.js\").Extent} extent Extent of the tile.\n * @param {boolean} preemptive Load the tile when visible (before it's needed).\n * @param {boolean} jsonp Load the tile as a script.\n */\n constructor(tileCoord, state, src, extent, preemptive, jsonp) {\n super(tileCoord, state);\n\n /**\n * @private\n * @type {string}\n */\n this.src_ = src;\n\n /**\n * @private\n * @type {import(\"../extent.js\").Extent}\n */\n this.extent_ = extent;\n\n /**\n * @private\n * @type {boolean}\n */\n this.preemptive_ = preemptive;\n\n /**\n * @private\n * @type {Array}\n */\n this.grid_ = null;\n\n /**\n * @private\n * @type {Array}\n */\n this.keys_ = null;\n\n /**\n * @private\n * @type {Object|undefined}\n */\n this.data_ = null;\n\n /**\n * @private\n * @type {boolean}\n */\n this.jsonp_ = jsonp;\n }\n\n /**\n * Get the image element for this tile.\n * @return {HTMLImageElement} Image.\n */\n getImage() {\n return null;\n }\n\n /**\n * Synchronously returns data at given coordinate (if available).\n * @param {import(\"../coordinate.js\").Coordinate} coordinate Coordinate.\n * @return {*} The data.\n */\n getData(coordinate) {\n if (!this.grid_ || !this.keys_) {\n return null;\n }\n const xRelative =\n (coordinate[0] - this.extent_[0]) / (this.extent_[2] - this.extent_[0]);\n const yRelative =\n (coordinate[1] - this.extent_[1]) / (this.extent_[3] - this.extent_[1]);\n\n const row = this.grid_[Math.floor((1 - yRelative) * this.grid_.length)];\n\n if (typeof row !== 'string') {\n return null;\n }\n\n let code = row.charCodeAt(Math.floor(xRelative * row.length));\n if (code >= 93) {\n code--;\n }\n if (code >= 35) {\n code--;\n }\n code -= 32;\n\n let data = null;\n if (code in this.keys_) {\n const id = this.keys_[code];\n if (this.data_ && id in this.data_) {\n data = this.data_[id];\n } else {\n data = id;\n }\n }\n return data;\n }\n\n /**\n * Calls the callback (synchronously by default) with the available data\n * for given coordinate (or `null` if not yet loaded).\n * @param {import(\"../coordinate.js\").Coordinate} coordinate Coordinate.\n * @param {function(*): void} callback Callback.\n * @param {boolean} [request] If `true` the callback is always async.\n * The tile data is requested if not yet loaded.\n */\n forDataAtCoordinate(coordinate, callback, request) {\n if (this.state == TileState.EMPTY && request === true) {\n this.state = TileState.IDLE;\n listenOnce(\n this,\n EventType.CHANGE,\n function (e) {\n callback(this.getData(coordinate));\n },\n this\n );\n this.loadInternal_();\n } else {\n if (request === true) {\n setTimeout(() => {\n callback(this.getData(coordinate));\n }, 0);\n } else {\n callback(this.getData(coordinate));\n }\n }\n }\n\n /**\n * Return the key to be used for all tiles in the source.\n * @return {string} The key for all tiles.\n */\n getKey() {\n return this.src_;\n }\n\n /**\n * @private\n */\n handleError_() {\n this.state = TileState.ERROR;\n this.changed();\n }\n\n /**\n * @param {!UTFGridJSON} json UTFGrid data.\n * @private\n */\n handleLoad_(json) {\n this.grid_ = json['grid'];\n this.keys_ = json['keys'];\n this.data_ = json['data'];\n\n this.state = TileState.LOADED;\n this.changed();\n }\n\n /**\n * @private\n */\n loadInternal_() {\n if (this.state == TileState.IDLE) {\n this.state = TileState.LOADING;\n if (this.jsonp_) {\n requestJSONP(\n this.src_,\n this.handleLoad_.bind(this),\n this.handleError_.bind(this)\n );\n } else {\n const client = new XMLHttpRequest();\n client.addEventListener('load', this.onXHRLoad_.bind(this));\n client.addEventListener('error', this.onXHRError_.bind(this));\n client.open('GET', this.src_);\n client.send();\n }\n }\n }\n\n /**\n * @private\n * @param {Event} event The load event.\n */\n onXHRLoad_(event) {\n const client = /** @type {XMLHttpRequest} */ (event.target);\n // status will be 0 for file:// urls\n if (!client.status || (client.status >= 200 && client.status < 300)) {\n let response;\n try {\n response = /** @type {!UTFGridJSON} */ (\n JSON.parse(client.responseText)\n );\n } catch (err) {\n this.handleError_();\n return;\n }\n this.handleLoad_(response);\n } else {\n this.handleError_();\n }\n }\n\n /**\n * @private\n * @param {Event} event The error event.\n */\n onXHRError_(event) {\n this.handleError_();\n }\n\n /**\n */\n load() {\n if (this.preemptive_) {\n this.loadInternal_();\n } else {\n this.setState(TileState.EMPTY);\n }\n }\n}\n\n/**\n * @typedef {Object} Options\n * @property {boolean} [preemptive=true]\n * If `true` the UTFGrid source loads the tiles based on their \"visibility\".\n * This improves the speed of response, but increases traffic.\n * Note that if set to `false` (lazy loading), you need to pass `true` as\n * `request` to the `forDataAtCoordinateAndResolution` method otherwise no\n * data will ever be loaded.\n * @property {boolean} [jsonp=false] Use JSONP with callback to load the TileJSON.\n * Useful when the server does not support CORS..\n * @property {import(\"./TileJSON.js\").Config} [tileJSON] TileJSON configuration for this source.\n * If not provided, `url` must be configured.\n * @property {string} [url] TileJSON endpoint that provides the configuration for this source.\n * Request will be made through JSONP. If not provided, `tileJSON` must be configured.\n * @property {number|import(\"../array.js\").NearestDirectionFunction} [zDirection=0]\n * Choose whether to use tiles with a higher or lower zoom level when between integer\n * zoom levels. See {@link module:ol/tilegrid/TileGrid~TileGrid#getZForResolution}.\n */\n\n/**\n * @classdesc\n * Layer source for UTFGrid interaction data loaded from TileJSON format.\n * @api\n */\nclass UTFGrid extends TileSource {\n /**\n * @param {Options} options Source options.\n */\n constructor(options) {\n super({\n projection: getProjection('EPSG:3857'),\n state: 'loading',\n zDirection: options.zDirection,\n });\n\n /**\n * @private\n * @type {boolean}\n */\n this.preemptive_ =\n options.preemptive !== undefined ? options.preemptive : true;\n\n /**\n * @private\n * @type {!import(\"../Tile.js\").UrlFunction}\n */\n this.tileUrlFunction_ = nullTileUrlFunction;\n\n /**\n * @private\n * @type {string|undefined}\n */\n this.template_ = undefined;\n\n /**\n * @private\n * @type {boolean}\n */\n this.jsonp_ = options.jsonp || false;\n\n if (options.url) {\n if (this.jsonp_) {\n requestJSONP(\n options.url,\n this.handleTileJSONResponse.bind(this),\n this.handleTileJSONError.bind(this)\n );\n } else {\n const client = new XMLHttpRequest();\n client.addEventListener('load', this.onXHRLoad_.bind(this));\n client.addEventListener('error', this.onXHRError_.bind(this));\n client.open('GET', options.url);\n client.send();\n }\n } else if (options.tileJSON) {\n this.handleTileJSONResponse(options.tileJSON);\n } else {\n assert(false, 51); // Either `url` or `tileJSON` options must be provided\n }\n }\n\n /**\n * @private\n * @param {Event} event The load event.\n */\n onXHRLoad_(event) {\n const client = /** @type {XMLHttpRequest} */ (event.target);\n // status will be 0 for file:// urls\n if (!client.status || (client.status >= 200 && client.status < 300)) {\n let response;\n try {\n response = /** @type {import(\"./TileJSON.js\").Config} */ (\n JSON.parse(client.responseText)\n );\n } catch (err) {\n this.handleTileJSONError();\n return;\n }\n this.handleTileJSONResponse(response);\n } else {\n this.handleTileJSONError();\n }\n }\n\n /**\n * @private\n * @param {Event} event The error event.\n */\n onXHRError_(event) {\n this.handleTileJSONError();\n }\n\n /**\n * Return the template from TileJSON.\n * @return {string|undefined} The template from TileJSON.\n * @api\n */\n getTemplate() {\n return this.template_;\n }\n\n /**\n * Calls the callback (synchronously by default) with the available data\n * for given coordinate and resolution (or `null` if not yet loaded or\n * in case of an error).\n * @param {import(\"../coordinate.js\").Coordinate} coordinate Coordinate.\n * @param {number} resolution Resolution.\n * @param {function(*): void} callback Callback.\n * @param {boolean} [request] If `true` the callback is always async.\n * The tile data is requested if not yet loaded.\n * @api\n */\n forDataAtCoordinateAndResolution(coordinate, resolution, callback, request) {\n if (this.tileGrid) {\n const z = this.tileGrid.getZForResolution(resolution, this.zDirection);\n const tileCoord = this.tileGrid.getTileCoordForCoordAndZ(coordinate, z);\n const tile = /** @type {!CustomTile} */ (\n this.getTile(\n tileCoord[0],\n tileCoord[1],\n tileCoord[2],\n 1,\n this.getProjection()\n )\n );\n tile.forDataAtCoordinate(coordinate, callback, request);\n } else {\n if (request === true) {\n setTimeout(function () {\n callback(null);\n }, 0);\n } else {\n callback(null);\n }\n }\n }\n\n /**\n * @protected\n */\n handleTileJSONError() {\n this.setState('error');\n }\n\n /**\n * TODO: very similar to ol/source/TileJSON#handleTileJSONResponse\n * @protected\n * @param {import(\"./TileJSON.js\").Config} tileJSON Tile JSON.\n */\n handleTileJSONResponse(tileJSON) {\n const epsg4326Projection = getProjection('EPSG:4326');\n\n const sourceProjection = this.getProjection();\n let extent;\n if (tileJSON['bounds'] !== undefined) {\n const transform = getTransformFromProjections(\n epsg4326Projection,\n sourceProjection\n );\n extent = applyTransform(tileJSON['bounds'], transform);\n }\n\n const gridExtent = extentFromProjection(sourceProjection);\n const minZoom = tileJSON['minzoom'] || 0;\n const maxZoom = tileJSON['maxzoom'] || 22;\n const tileGrid = createXYZ({\n extent: gridExtent,\n maxZoom: maxZoom,\n minZoom: minZoom,\n });\n this.tileGrid = tileGrid;\n\n this.template_ = tileJSON['template'];\n\n const grids = tileJSON['grids'];\n if (!grids) {\n this.setState('error');\n return;\n }\n\n this.tileUrlFunction_ = createFromTemplates(grids, tileGrid);\n\n if (tileJSON['attribution'] !== undefined) {\n const attributionExtent = extent !== undefined ? extent : gridExtent;\n this.setAttributions(function (frameState) {\n if (intersects(attributionExtent, frameState.extent)) {\n return [tileJSON['attribution']];\n }\n return null;\n });\n }\n\n this.setState('ready');\n }\n\n /**\n * @param {number} z Tile coordinate z.\n * @param {number} x Tile coordinate x.\n * @param {number} y Tile coordinate y.\n * @param {number} pixelRatio Pixel ratio.\n * @param {import(\"../proj/Projection.js\").default} projection Projection.\n * @return {!CustomTile} Tile.\n */\n getTile(z, x, y, pixelRatio, projection) {\n const tileCoordKey = getKeyZXY(z, x, y);\n if (this.tileCache.containsKey(tileCoordKey)) {\n return this.tileCache.get(tileCoordKey);\n }\n const tileCoord = [z, x, y];\n const urlTileCoord = this.getTileCoordForTileUrlFunction(\n tileCoord,\n projection\n );\n const tileUrl = this.tileUrlFunction_(urlTileCoord, pixelRatio, projection);\n const tile = new CustomTile(\n tileCoord,\n tileUrl !== undefined ? TileState.IDLE : TileState.EMPTY,\n tileUrl !== undefined ? tileUrl : '',\n this.tileGrid.getTileCoordExtent(tileCoord),\n this.preemptive_,\n this.jsonp_\n );\n this.tileCache.set(tileCoordKey, tile);\n return tile;\n }\n\n /**\n * Marks a tile coord as being used, without triggering a load.\n * @param {number} z Tile coordinate z.\n * @param {number} x Tile coordinate x.\n * @param {number} y Tile coordinate y.\n */\n useTile(z, x, y) {\n const tileCoordKey = getKeyZXY(z, x, y);\n if (this.tileCache.containsKey(tileCoordKey)) {\n this.tileCache.get(tileCoordKey);\n }\n }\n}\n\nexport default UTFGrid;\n","/**\n * @module ol/source/VectorTile\n */\n\nimport EventType from '../events/EventType.js';\nimport Tile from '../VectorTile.js';\nimport TileCache from '../TileCache.js';\nimport TileGrid from '../tilegrid/TileGrid.js';\nimport TileState from '../TileState.js';\nimport UrlTile from './UrlTile.js';\nimport VectorRenderTile from '../VectorRenderTile.js';\nimport {DEFAULT_MAX_ZOOM} from '../tilegrid/common.js';\nimport {\n buffer as bufferExtent,\n getIntersection,\n intersects,\n} from '../extent.js';\nimport {createXYZ, extentFromProjection} from '../tilegrid.js';\nimport {fromKey, getCacheKeyForTileKey, getKeyZXY} from '../tilecoord.js';\nimport {isEmpty} from '../obj.js';\nimport {loadFeaturesXhr} from '../featureloader.js';\nimport {toSize} from '../size.js';\n\n/**\n * @typedef {Object} Options\n * @property {import(\"./Source.js\").AttributionLike} [attributions] Attributions.\n * @property {boolean} [attributionsCollapsible=true] Attributions are collapsible.\n * @property {number} [cacheSize] Initial tile cache size. Will auto-grow to hold at least twice the number of tiles in the viewport.\n * @property {import(\"../extent.js\").Extent} [extent] Extent.\n * @property {import(\"../format/Feature.js\").default} [format] Feature format for tiles. Used and required by the default.\n * @property {boolean} [overlaps=true] This source may have overlapping geometries. Setting this\n * to `false` (e.g. for sources with polygons that represent administrative\n * boundaries or TopoJSON sources) allows the renderer to optimise fill and\n * stroke operations.\n * @property {import(\"../proj.js\").ProjectionLike} [projection='EPSG:3857'] Projection of the tile grid.\n * @property {import(\"./Source.js\").State} [state] Source state.\n * @property {typeof import(\"../VectorTile.js\").default} [tileClass] Class used to instantiate image tiles.\n * Default is {@link module:ol/VectorTile~VectorTile}.\n * @property {number} [maxZoom=22] Optional max zoom level. Not used if `tileGrid` is provided.\n * @property {number} [minZoom] Optional min zoom level. Not used if `tileGrid` is provided.\n * @property {number|import(\"../size.js\").Size} [tileSize=512] Optional tile size. Not used if `tileGrid` is provided.\n * @property {number} [maxResolution] Optional tile grid resolution at level zero. Not used if `tileGrid` is provided.\n * @property {import(\"../tilegrid/TileGrid.js\").default} [tileGrid] Tile grid.\n * @property {import(\"../Tile.js\").LoadFunction} [tileLoadFunction]\n * Optional function to load a tile given a URL. Could look like this for pbf tiles:\n * ```js\n * function(tile, url) {\n * tile.setLoader(function(extent, resolution, projection) {\n * fetch(url).then(function(response) {\n * response.arrayBuffer().then(function(data) {\n * const format = tile.getFormat() // ol/format/MVT configured as source format\n * const features = format.readFeatures(data, {\n * extent: extent,\n * featureProjection: projection\n * });\n * tile.setFeatures(features);\n * });\n * });\n * });\n * }\n * ```\n * If you do not need extent, resolution and projection to get the features for a tile (e.g.\n * for GeoJSON tiles), your `tileLoadFunction` does not need a `setLoader()` call. Only make sure\n * to call `setFeatures()` on the tile:\n * ```js\n * const format = new GeoJSON({featureProjection: map.getView().getProjection()});\n * async function tileLoadFunction(tile, url) {\n * const response = await fetch(url);\n * const data = await response.json();\n * tile.setFeatures(format.readFeatures(data));\n * }\n * ```\n * @property {import(\"../Tile.js\").UrlFunction} [tileUrlFunction] Optional function to get tile URL given a tile coordinate and the projection.\n * @property {string} [url] URL template. Must include `{x}`, `{y}` or `{-y}`, and `{z}` placeholders.\n * A `{?-?}` template pattern, for example `subdomain{a-f}.domain.com`, may be\n * used instead of defining each one separately in the `urls` option.\n * @property {number} [transition] A duration for tile opacity\n * transitions in milliseconds. A duration of 0 disables the opacity transition.\n * @property {Array} [urls] An array of URL templates.\n * @property {boolean} [wrapX=true] Whether to wrap the world horizontally.\n * When set to `false`, only one world\n * will be rendered. When set to `true`, tiles will be wrapped horizontally to\n * render multiple worlds.\n * @property {number|import(\"../array.js\").NearestDirectionFunction} [zDirection=1]\n * Choose whether to use tiles with a higher or lower zoom level when between integer\n * zoom levels. See {@link module:ol/tilegrid/TileGrid~TileGrid#getZForResolution}.\n */\n\n/**\n * @classdesc\n * Class for layer sources providing vector data divided into a tile grid, to be\n * used with {@link module:ol/layer/VectorTile~VectorTileLayer}. Although this source receives tiles\n * with vector features from the server, it is not meant for feature editing.\n * Features are optimized for rendering, their geometries are clipped at or near\n * tile boundaries and simplified for a view resolution. See\n * {@link module:ol/source/Vector~VectorSource} for vector sources that are suitable for feature\n * editing.\n *\n * @fires import(\"./Tile.js\").TileSourceEvent\n * @api\n */\nclass VectorTile extends UrlTile {\n /**\n * @param {!Options} options Vector tile options.\n */\n constructor(options) {\n const projection = options.projection || 'EPSG:3857';\n\n const extent = options.extent || extentFromProjection(projection);\n\n const tileGrid =\n options.tileGrid ||\n createXYZ({\n extent: extent,\n maxResolution: options.maxResolution,\n maxZoom: options.maxZoom !== undefined ? options.maxZoom : 22,\n minZoom: options.minZoom,\n tileSize: options.tileSize || 512,\n });\n\n super({\n attributions: options.attributions,\n attributionsCollapsible: options.attributionsCollapsible,\n cacheSize: options.cacheSize,\n interpolate: true,\n opaque: false,\n projection: projection,\n state: options.state,\n tileGrid: tileGrid,\n tileLoadFunction: options.tileLoadFunction\n ? options.tileLoadFunction\n : defaultLoadFunction,\n tileUrlFunction: options.tileUrlFunction,\n url: options.url,\n urls: options.urls,\n wrapX: options.wrapX === undefined ? true : options.wrapX,\n transition: options.transition,\n zDirection: options.zDirection === undefined ? 1 : options.zDirection,\n });\n\n /**\n * @private\n * @type {import(\"../format/Feature.js\").default|null}\n */\n this.format_ = options.format ? options.format : null;\n\n /**\n * @private\n * @type {TileCache}\n */\n this.sourceTileCache = new TileCache(this.tileCache.highWaterMark);\n\n /**\n * @private\n * @type {boolean}\n */\n this.overlaps_ = options.overlaps == undefined ? true : options.overlaps;\n\n /**\n * @protected\n * @type {typeof import(\"../VectorTile.js\").default}\n */\n this.tileClass = options.tileClass ? options.tileClass : Tile;\n\n /**\n * @private\n * @type {Object}\n */\n this.tileGrids_ = {};\n }\n\n /**\n * Get features whose bounding box intersects the provided extent. Only features for cached\n * tiles for the last rendered zoom level are available in the source. So this method is only\n * suitable for requesting tiles for extents that are currently rendered.\n *\n * Features are returned in random tile order and as they are included in the tiles. This means\n * they can be clipped, duplicated across tiles, and simplified to the render resolution.\n *\n * @param {import(\"../extent.js\").Extent} extent Extent.\n * @return {Array} Features.\n * @api\n */\n getFeaturesInExtent(extent) {\n const features = [];\n const tileCache = this.tileCache;\n if (tileCache.getCount() === 0) {\n return features;\n }\n const z = fromKey(tileCache.peekFirstKey())[0];\n const tileGrid = this.tileGrid;\n tileCache.forEach(function (tile) {\n if (tile.tileCoord[0] !== z || tile.getState() !== TileState.LOADED) {\n return;\n }\n const sourceTiles = tile.getSourceTiles();\n for (let i = 0, ii = sourceTiles.length; i < ii; ++i) {\n const sourceTile = sourceTiles[i];\n const tileCoord = sourceTile.tileCoord;\n if (intersects(extent, tileGrid.getTileCoordExtent(tileCoord))) {\n const tileFeatures = sourceTile.getFeatures();\n if (tileFeatures) {\n for (let j = 0, jj = tileFeatures.length; j < jj; ++j) {\n const candidate = tileFeatures[j];\n const geometry = candidate.getGeometry();\n if (intersects(extent, geometry.getExtent())) {\n features.push(candidate);\n }\n }\n }\n }\n }\n });\n return features;\n }\n\n /**\n * @return {boolean} The source can have overlapping geometries.\n */\n getOverlaps() {\n return this.overlaps_;\n }\n\n /**\n * clear {@link module:ol/TileCache~TileCache} and delete all source tiles\n * @api\n */\n clear() {\n this.tileCache.clear();\n this.sourceTileCache.clear();\n }\n\n /**\n * @param {import(\"../proj/Projection.js\").default} projection Projection.\n * @param {!Object} usedTiles Used tiles.\n */\n expireCache(projection, usedTiles) {\n const tileCache = this.getTileCacheForProjection(projection);\n const usedSourceTiles = Object.keys(usedTiles).reduce((acc, key) => {\n const cacheKey = getCacheKeyForTileKey(key);\n const tile = tileCache.peek(cacheKey);\n if (tile) {\n const sourceTiles = tile.sourceTiles;\n for (let i = 0, ii = sourceTiles.length; i < ii; ++i) {\n acc[sourceTiles[i].getKey()] = true;\n }\n }\n return acc;\n }, {});\n super.expireCache(projection, usedTiles);\n this.sourceTileCache.expireCache(usedSourceTiles);\n }\n\n /**\n * @param {number} pixelRatio Pixel ratio.\n * @param {import(\"../proj/Projection\").default} projection Projection.\n * @param {VectorRenderTile} tile Vector image tile.\n * @return {Array} Tile keys.\n */\n getSourceTiles(pixelRatio, projection, tile) {\n if (tile.getState() === TileState.IDLE) {\n tile.setState(TileState.LOADING);\n const urlTileCoord = tile.wrappedTileCoord;\n const tileGrid = this.getTileGridForProjection(projection);\n const extent = tileGrid.getTileCoordExtent(urlTileCoord);\n const z = urlTileCoord[0];\n const resolution = tileGrid.getResolution(z);\n // make extent 1 pixel smaller so we don't load tiles for < 0.5 pixel render space\n bufferExtent(extent, -resolution, extent);\n const sourceTileGrid = this.tileGrid;\n const sourceExtent = sourceTileGrid.getExtent();\n if (sourceExtent) {\n getIntersection(extent, sourceExtent, extent);\n }\n const sourceZ = sourceTileGrid.getZForResolution(\n resolution,\n this.zDirection\n );\n\n sourceTileGrid.forEachTileCoord(extent, sourceZ, (sourceTileCoord) => {\n const tileUrl = this.tileUrlFunction(\n sourceTileCoord,\n pixelRatio,\n projection\n );\n const sourceTile = this.sourceTileCache.containsKey(tileUrl)\n ? this.sourceTileCache.get(tileUrl)\n : new this.tileClass(\n sourceTileCoord,\n tileUrl ? TileState.IDLE : TileState.EMPTY,\n tileUrl,\n this.format_,\n this.tileLoadFunction\n );\n tile.sourceTiles.push(sourceTile);\n const sourceTileState = sourceTile.getState();\n if (sourceTileState < TileState.LOADED) {\n const listenChange = (event) => {\n this.handleTileChange(event);\n const state = sourceTile.getState();\n if (state === TileState.LOADED || state === TileState.ERROR) {\n const sourceTileKey = sourceTile.getKey();\n if (sourceTileKey in tile.errorTileKeys) {\n if (sourceTile.getState() === TileState.LOADED) {\n delete tile.errorTileKeys[sourceTileKey];\n }\n } else {\n tile.loadingSourceTiles--;\n }\n if (state === TileState.ERROR) {\n tile.errorTileKeys[sourceTileKey] = true;\n } else {\n sourceTile.removeEventListener(EventType.CHANGE, listenChange);\n }\n if (tile.loadingSourceTiles === 0) {\n tile.setState(\n isEmpty(tile.errorTileKeys)\n ? TileState.LOADED\n : TileState.ERROR\n );\n }\n }\n };\n sourceTile.addEventListener(EventType.CHANGE, listenChange);\n tile.loadingSourceTiles++;\n }\n if (sourceTileState === TileState.IDLE) {\n sourceTile.extent =\n sourceTileGrid.getTileCoordExtent(sourceTileCoord);\n sourceTile.projection = projection;\n sourceTile.resolution = sourceTileGrid.getResolution(\n sourceTileCoord[0]\n );\n this.sourceTileCache.set(tileUrl, sourceTile);\n sourceTile.load();\n }\n });\n if (!tile.loadingSourceTiles) {\n tile.setState(\n tile.sourceTiles.some(\n (sourceTile) => sourceTile.getState() === TileState.ERROR\n )\n ? TileState.ERROR\n : TileState.LOADED\n );\n }\n }\n\n return tile.sourceTiles;\n }\n\n /**\n * @param {number} z Tile coordinate z.\n * @param {number} x Tile coordinate x.\n * @param {number} y Tile coordinate y.\n * @param {number} pixelRatio Pixel ratio.\n * @param {import(\"../proj/Projection.js\").default} projection Projection.\n * @return {!VectorRenderTile} Tile.\n */\n getTile(z, x, y, pixelRatio, projection) {\n const coordKey = getKeyZXY(z, x, y);\n const key = this.getKey();\n let tile;\n if (this.tileCache.containsKey(coordKey)) {\n tile = this.tileCache.get(coordKey);\n if (tile.key === key) {\n return tile;\n }\n }\n const tileCoord = [z, x, y];\n let urlTileCoord = this.getTileCoordForTileUrlFunction(\n tileCoord,\n projection\n );\n const sourceExtent = this.getTileGrid().getExtent();\n const tileGrid = this.getTileGridForProjection(projection);\n if (urlTileCoord && sourceExtent) {\n const tileExtent = tileGrid.getTileCoordExtent(urlTileCoord);\n // make extent 1 pixel smaller so we don't load tiles for < 0.5 pixel render space\n bufferExtent(tileExtent, -tileGrid.getResolution(z), tileExtent);\n if (!intersects(sourceExtent, tileExtent)) {\n urlTileCoord = null;\n }\n }\n let empty = true;\n if (urlTileCoord !== null) {\n const sourceTileGrid = this.tileGrid;\n const resolution = tileGrid.getResolution(z);\n const sourceZ = sourceTileGrid.getZForResolution(resolution, 1);\n // make extent 1 pixel smaller so we don't load tiles for < 0.5 pixel render space\n const extent = tileGrid.getTileCoordExtent(urlTileCoord);\n bufferExtent(extent, -resolution, extent);\n sourceTileGrid.forEachTileCoord(extent, sourceZ, (sourceTileCoord) => {\n empty =\n empty &&\n !this.tileUrlFunction(sourceTileCoord, pixelRatio, projection);\n });\n }\n const newTile = new VectorRenderTile(\n tileCoord,\n empty ? TileState.EMPTY : TileState.IDLE,\n urlTileCoord,\n this.getSourceTiles.bind(this, pixelRatio, projection)\n );\n\n newTile.key = key;\n if (tile) {\n newTile.interimTile = tile;\n newTile.refreshInterimChain();\n this.tileCache.replace(coordKey, newTile);\n } else {\n this.tileCache.set(coordKey, newTile);\n }\n return newTile;\n }\n\n /**\n * @param {import(\"../proj/Projection.js\").default} projection Projection.\n * @return {!import(\"../tilegrid/TileGrid.js\").default} Tile grid.\n */\n getTileGridForProjection(projection) {\n const code = projection.getCode();\n let tileGrid = this.tileGrids_[code];\n if (!tileGrid) {\n // A tile grid that matches the tile size of the source tile grid is more\n // likely to have 1:1 relationships between source tiles and rendered tiles.\n const sourceTileGrid = this.tileGrid;\n const resolutions = sourceTileGrid.getResolutions().slice();\n const origins = resolutions.map(function (resolution, z) {\n return sourceTileGrid.getOrigin(z);\n });\n const tileSizes = resolutions.map(function (resolution, z) {\n return sourceTileGrid.getTileSize(z);\n });\n const length = DEFAULT_MAX_ZOOM + 1;\n for (let z = resolutions.length; z < length; ++z) {\n resolutions.push(resolutions[z - 1] / 2);\n origins.push(origins[z - 1]);\n tileSizes.push(tileSizes[z - 1]);\n }\n tileGrid = new TileGrid({\n extent: sourceTileGrid.getExtent(),\n origins: origins,\n resolutions: resolutions,\n tileSizes: tileSizes,\n });\n this.tileGrids_[code] = tileGrid;\n }\n return tileGrid;\n }\n\n /**\n * Get the tile pixel ratio for this source.\n * @param {number} pixelRatio Pixel ratio.\n * @return {number} Tile pixel ratio.\n */\n getTilePixelRatio(pixelRatio) {\n return pixelRatio;\n }\n\n /**\n * @param {number} z Z.\n * @param {number} pixelRatio Pixel ratio.\n * @param {import(\"../proj/Projection.js\").default} projection Projection.\n * @return {import(\"../size.js\").Size} Tile size.\n */\n getTilePixelSize(z, pixelRatio, projection) {\n const tileGrid = this.getTileGridForProjection(projection);\n const tileSize = toSize(tileGrid.getTileSize(z), this.tmpSize);\n return [\n Math.round(tileSize[0] * pixelRatio),\n Math.round(tileSize[1] * pixelRatio),\n ];\n }\n\n /**\n * Increases the cache size if needed\n * @param {number} tileCount Minimum number of tiles needed.\n * @param {import(\"../proj/Projection.js\").default} projection Projection.\n */\n updateCacheSize(tileCount, projection) {\n super.updateCacheSize(tileCount * 2, projection);\n this.sourceTileCache.highWaterMark =\n this.getTileCacheForProjection(projection).highWaterMark;\n }\n}\n\nexport default VectorTile;\n\n/**\n * Sets the loader for a tile.\n * @param {import(\"../VectorTile.js\").default} tile Vector tile.\n * @param {string} url URL.\n */\nexport function defaultLoadFunction(tile, url) {\n tile.setLoader(\n /**\n * @param {import(\"../extent.js\").Extent} extent Extent.\n * @param {number} resolution Resolution.\n * @param {import(\"../proj/Projection.js\").default} projection Projection.\n */\n function (extent, resolution, projection) {\n loadFeaturesXhr(\n url,\n tile.getFormat(),\n extent,\n resolution,\n projection,\n tile.onLoad.bind(tile),\n tile.onError.bind(tile)\n );\n }\n );\n}\n","/**\n * @module ol/tilegrid/WMTS\n */\n\nimport TileGrid from './TileGrid.js';\nimport {get as getProjection} from '../proj.js';\n\n/**\n * @typedef {Object} Options\n * @property {import(\"../extent.js\").Extent} [extent] Extent for the tile grid. No tiles\n * outside this extent will be requested by {@link module:ol/source/Tile~TileSource} sources.\n * When no `origin` or `origins` are configured, the `origin` will be set to the\n * top-left corner of the extent.\n * @property {import(\"../coordinate.js\").Coordinate} [origin] The tile grid origin, i.e.\n * where the `x` and `y` axes meet (`[z, 0, 0]`). Tile coordinates increase left\n * to right and downwards. If not specified, `extent` or `origins` must be provided.\n * @property {Array} [origins] Tile grid origins,\n * i.e. where the `x` and `y` axes meet (`[z, 0, 0]`), for each zoom level. If\n * given, the array length should match the length of the `resolutions` array, i.e.\n * each resolution can have a different origin. Tile coordinates increase left to\n * right and downwards. If not specified, `extent` or `origin` must be provided.\n * @property {!Array} resolutions Resolutions. The array index of each\n * resolution needs to match the zoom level. This means that even if a `minZoom`\n * is configured, the resolutions array will have a length of `maxZoom + 1`\n * @property {!Array} matrixIds matrix IDs. The length of this array needs\n * to match the length of the `resolutions` array.\n * @property {Array} [sizes] Number of tile rows and columns\n * of the grid for each zoom level. The values here are the `TileMatrixWidth` and\n * `TileMatrixHeight` advertised in the GetCapabilities response of the WMTS, and\n * define each zoom level's extent together with the `origin` or `origins`.\n * A grid `extent` can be configured in addition, and will further limit the extent for\n * which tile requests are made by sources. If the bottom-left corner of\n * an extent is used as `origin` or `origins`, then the `y` value must be\n * negative because OpenLayers tile coordinates use the top left as the origin.\n * @property {number|import(\"../size.js\").Size} [tileSize] Tile size.\n * @property {Array} [tileSizes] Tile sizes. The length of\n * this array needs to match the length of the `resolutions` array.\n */\n\n/**\n * @classdesc\n * Set the grid pattern for sources accessing WMTS tiled-image servers.\n * @api\n */\nclass WMTSTileGrid extends TileGrid {\n /**\n * @param {Options} options WMTS options.\n */\n constructor(options) {\n super({\n extent: options.extent,\n origin: options.origin,\n origins: options.origins,\n resolutions: options.resolutions,\n tileSize: options.tileSize,\n tileSizes: options.tileSizes,\n sizes: options.sizes,\n });\n\n /**\n * @private\n * @type {!Array}\n */\n this.matrixIds_ = options.matrixIds;\n }\n\n /**\n * @param {number} z Z.\n * @return {string} MatrixId..\n */\n getMatrixId(z) {\n return this.matrixIds_[z];\n }\n\n /**\n * Get the list of matrix identifiers.\n * @return {Array} MatrixIds.\n * @api\n */\n getMatrixIds() {\n return this.matrixIds_;\n }\n}\n\nexport default WMTSTileGrid;\n\n/**\n * Create a tile grid from a WMTS capabilities matrix set and an\n * optional TileMatrixSetLimits.\n * @param {Object} matrixSet An object representing a matrixSet in the\n * capabilities document.\n * @param {import(\"../extent.js\").Extent} [extent] An optional extent to restrict the tile\n * ranges the server provides.\n * @param {Array} [matrixLimits] An optional object representing\n * the available matrices for tileGrid.\n * @return {WMTSTileGrid} WMTS tileGrid instance.\n * @api\n */\nexport function createFromCapabilitiesMatrixSet(\n matrixSet,\n extent,\n matrixLimits\n) {\n /** @type {!Array} */\n const resolutions = [];\n /** @type {!Array} */\n const matrixIds = [];\n /** @type {!Array} */\n const origins = [];\n /** @type {!Array} */\n const tileSizes = [];\n /** @type {!Array} */\n const sizes = [];\n\n matrixLimits = matrixLimits !== undefined ? matrixLimits : [];\n\n const supportedCRSPropName = 'SupportedCRS';\n const matrixIdsPropName = 'TileMatrix';\n const identifierPropName = 'Identifier';\n const scaleDenominatorPropName = 'ScaleDenominator';\n const topLeftCornerPropName = 'TopLeftCorner';\n const tileWidthPropName = 'TileWidth';\n const tileHeightPropName = 'TileHeight';\n\n const code = matrixSet[supportedCRSPropName];\n const projection = getProjection(code);\n const metersPerUnit = projection.getMetersPerUnit();\n // swap origin x and y coordinates if axis orientation is lat/long\n const switchOriginXY = projection.getAxisOrientation().substr(0, 2) == 'ne';\n\n matrixSet[matrixIdsPropName].sort(function (a, b) {\n return b[scaleDenominatorPropName] - a[scaleDenominatorPropName];\n });\n\n matrixSet[matrixIdsPropName].forEach(function (elt) {\n let matrixAvailable;\n // use of matrixLimits to filter TileMatrices from GetCapabilities\n // TileMatrixSet from unavailable matrix levels.\n if (matrixLimits.length > 0) {\n matrixAvailable = matrixLimits.find(function (elt_ml) {\n if (elt[identifierPropName] == elt_ml[matrixIdsPropName]) {\n return true;\n }\n // Fallback for tileMatrix identifiers that don't get prefixed\n // by their tileMatrixSet identifiers.\n if (!elt[identifierPropName].includes(':')) {\n return (\n matrixSet[identifierPropName] + ':' + elt[identifierPropName] ===\n elt_ml[matrixIdsPropName]\n );\n }\n return false;\n });\n } else {\n matrixAvailable = true;\n }\n\n if (matrixAvailable) {\n matrixIds.push(elt[identifierPropName]);\n const resolution =\n (elt[scaleDenominatorPropName] * 0.28e-3) / metersPerUnit;\n const tileWidth = elt[tileWidthPropName];\n const tileHeight = elt[tileHeightPropName];\n if (switchOriginXY) {\n origins.push([\n elt[topLeftCornerPropName][1],\n elt[topLeftCornerPropName][0],\n ]);\n } else {\n origins.push(elt[topLeftCornerPropName]);\n }\n resolutions.push(resolution);\n tileSizes.push(\n tileWidth == tileHeight ? tileWidth : [tileWidth, tileHeight]\n );\n sizes.push([elt['MatrixWidth'], elt['MatrixHeight']]);\n }\n });\n\n return new WMTSTileGrid({\n extent: extent,\n origins: origins,\n resolutions: resolutions,\n matrixIds: matrixIds,\n tileSizes: tileSizes,\n sizes: sizes,\n });\n}\n","/**\n * @module ol/source/WMTS\n */\n\nimport TileImage from './TileImage.js';\nimport {appendParams} from '../uri.js';\nimport {containsExtent} from '../extent.js';\nimport {createFromCapabilitiesMatrixSet} from '../tilegrid/WMTS.js';\nimport {createFromTileUrlFunctions, expandUrl} from '../tileurlfunction.js';\nimport {equivalent, get as getProjection, transformExtent} from '../proj.js';\n\n/**\n * Request encoding. One of 'KVP', 'REST'.\n * @typedef {'KVP' | 'REST'} RequestEncoding\n */\n\n/**\n * @typedef {Object} Options\n * @property {import(\"./Source.js\").AttributionLike} [attributions] Attributions.\n * @property {boolean} [attributionsCollapsible=true] Attributions are collapsible.\n * @property {number} [cacheSize] Initial tile cache size. Will auto-grow to hold at least the number of tiles in the viewport.\n * @property {null|string} [crossOrigin] The `crossOrigin` attribute for loaded images. Note that\n * you must provide a `crossOrigin` value if you want to access pixel data with the Canvas renderer.\n * See https://developer.mozilla.org/en-US/docs/Web/HTML/CORS_enabled_image for more detail.\n * @property {boolean} [interpolate=true] Use interpolated values when resampling. By default,\n * linear interpolation is used when resampling. Set to false to use the nearest neighbor instead.\n * @property {import(\"../tilegrid/WMTS.js\").default} tileGrid Tile grid.\n * @property {import(\"../proj.js\").ProjectionLike} [projection] Projection. Default is the view projection.\n * @property {number} [reprojectionErrorThreshold=0.5] Maximum allowed reprojection error (in pixels).\n * Higher values can increase reprojection performance, but decrease precision.\n * @property {RequestEncoding} [requestEncoding='KVP'] Request encoding.\n * @property {string} layer Layer name as advertised in the WMTS capabilities.\n * @property {string} style Style name as advertised in the WMTS capabilities.\n * @property {typeof import(\"../ImageTile.js\").default} [tileClass] Class used to instantiate image tiles. Default is {@link module:ol/ImageTile~ImageTile}.\n * @property {number} [tilePixelRatio=1] The pixel ratio used by the tile service.\n * For example, if the tile service advertizes 256px by 256px tiles but actually sends 512px\n * by 512px images (for retina/hidpi devices) then `tilePixelRatio`\n * should be set to `2`.\n * @property {string} [format='image/jpeg'] Image format. Only used when `requestEncoding` is `'KVP'`.\n * @property {string} [version='1.0.0'] WMTS version.\n * @property {string} matrixSet Matrix set.\n * @property {!Object} [dimensions] Additional \"dimensions\" for tile requests.\n * This is an object with properties named like the advertised WMTS dimensions.\n * @property {string} [url] A URL for the service.\n * For the RESTful request encoding, this is a URL\n * template. For KVP encoding, it is normal URL. A `{?-?}` template pattern,\n * for example `subdomain{a-f}.domain.com`, may be used instead of defining\n * each one separately in the `urls` option.\n * @property {import(\"../Tile.js\").LoadFunction} [tileLoadFunction] Optional function to load a tile given a URL. The default is\n * ```js\n * function(imageTile, src) {\n * imageTile.getImage().src = src;\n * };\n * ```\n * @property {Array} [urls] An array of URLs.\n * Requests will be distributed among the URLs in this array.\n * @property {boolean} [wrapX=false] Whether to wrap the world horizontally.\n * @property {number} [transition] Duration of the opacity transition for rendering.\n * To disable the opacity transition, pass `transition: 0`.\n * @property {number|import(\"../array.js\").NearestDirectionFunction} [zDirection=0]\n * Choose whether to use tiles with a higher or lower zoom level when between integer\n * zoom levels. See {@link module:ol/tilegrid/TileGrid~TileGrid#getZForResolution}.\n */\n\n/**\n * @classdesc\n * Layer source for tile data from WMTS servers.\n * @api\n */\nclass WMTS extends TileImage {\n /**\n * @param {Options} options WMTS options.\n */\n constructor(options) {\n // TODO: add support for TileMatrixLimits\n\n const requestEncoding =\n options.requestEncoding !== undefined ? options.requestEncoding : 'KVP';\n\n // FIXME: should we create a default tileGrid?\n // we could issue a getCapabilities xhr to retrieve missing configuration\n const tileGrid = options.tileGrid;\n\n let urls = options.urls;\n if (urls === undefined && options.url !== undefined) {\n urls = expandUrl(options.url);\n }\n\n super({\n attributions: options.attributions,\n attributionsCollapsible: options.attributionsCollapsible,\n cacheSize: options.cacheSize,\n crossOrigin: options.crossOrigin,\n interpolate: options.interpolate,\n projection: options.projection,\n reprojectionErrorThreshold: options.reprojectionErrorThreshold,\n tileClass: options.tileClass,\n tileGrid: tileGrid,\n tileLoadFunction: options.tileLoadFunction,\n tilePixelRatio: options.tilePixelRatio,\n urls: urls,\n wrapX: options.wrapX !== undefined ? options.wrapX : false,\n transition: options.transition,\n zDirection: options.zDirection,\n });\n\n /**\n * @private\n * @type {string}\n */\n this.version_ = options.version !== undefined ? options.version : '1.0.0';\n\n /**\n * @private\n * @type {string}\n */\n this.format_ = options.format !== undefined ? options.format : 'image/jpeg';\n\n /**\n * @private\n * @type {!Object}\n */\n this.dimensions_ =\n options.dimensions !== undefined ? options.dimensions : {};\n\n /**\n * @private\n * @type {string}\n */\n this.layer_ = options.layer;\n\n /**\n * @private\n * @type {string}\n */\n this.matrixSet_ = options.matrixSet;\n\n /**\n * @private\n * @type {string}\n */\n this.style_ = options.style;\n\n // FIXME: should we guess this requestEncoding from options.url(s)\n // structure? that would mean KVP only if a template is not provided.\n\n /**\n * @private\n * @type {RequestEncoding}\n */\n this.requestEncoding_ = requestEncoding;\n\n this.setKey(this.getKeyForDimensions_());\n\n if (urls && urls.length > 0) {\n this.tileUrlFunction = createFromTileUrlFunctions(\n urls.map(this.createFromWMTSTemplate.bind(this))\n );\n }\n }\n\n /**\n * Set the URLs to use for requests.\n * URLs may contain OGC conform URL Template Variables: {TileMatrix}, {TileRow}, {TileCol}.\n * @param {Array} urls URLs.\n */\n setUrls(urls) {\n this.urls = urls;\n const key = urls.join('\\n');\n this.setTileUrlFunction(\n createFromTileUrlFunctions(\n urls.map(this.createFromWMTSTemplate.bind(this))\n ),\n key\n );\n }\n\n /**\n * Get the dimensions, i.e. those passed to the constructor through the\n * \"dimensions\" option, and possibly updated using the updateDimensions\n * method.\n * @return {!Object} Dimensions.\n * @api\n */\n getDimensions() {\n return this.dimensions_;\n }\n\n /**\n * Return the image format of the WMTS source.\n * @return {string} Format.\n * @api\n */\n getFormat() {\n return this.format_;\n }\n\n /**\n * Return the layer of the WMTS source.\n * @return {string} Layer.\n * @api\n */\n getLayer() {\n return this.layer_;\n }\n\n /**\n * Return the matrix set of the WMTS source.\n * @return {string} MatrixSet.\n * @api\n */\n getMatrixSet() {\n return this.matrixSet_;\n }\n\n /**\n * Return the request encoding, either \"KVP\" or \"REST\".\n * @return {RequestEncoding} Request encoding.\n * @api\n */\n getRequestEncoding() {\n return this.requestEncoding_;\n }\n\n /**\n * Return the style of the WMTS source.\n * @return {string} Style.\n * @api\n */\n getStyle() {\n return this.style_;\n }\n\n /**\n * Return the version of the WMTS source.\n * @return {string} Version.\n * @api\n */\n getVersion() {\n return this.version_;\n }\n\n /**\n * @private\n * @return {string} The key for the current dimensions.\n */\n getKeyForDimensions_() {\n const res = this.urls ? this.urls.slice(0) : [];\n for (const key in this.dimensions_) {\n res.push(key + '-' + this.dimensions_[key]);\n }\n return res.join('/');\n }\n\n /**\n * Update the dimensions.\n * @param {Object} dimensions Dimensions.\n * @api\n */\n updateDimensions(dimensions) {\n Object.assign(this.dimensions_, dimensions);\n this.setKey(this.getKeyForDimensions_());\n }\n\n /**\n * @param {string} template Template.\n * @return {import(\"../Tile.js\").UrlFunction} Tile URL function.\n */\n createFromWMTSTemplate(template) {\n const requestEncoding = this.requestEncoding_;\n\n // context property names are lower case to allow for a case insensitive\n // replacement as some services use different naming conventions\n const context = {\n 'layer': this.layer_,\n 'style': this.style_,\n 'tilematrixset': this.matrixSet_,\n };\n\n if (requestEncoding == 'KVP') {\n Object.assign(context, {\n 'Service': 'WMTS',\n 'Request': 'GetTile',\n 'Version': this.version_,\n 'Format': this.format_,\n });\n }\n\n // TODO: we may want to create our own appendParams function so that params\n // order conforms to wmts spec guidance, and so that we can avoid to escape\n // special template params\n\n template =\n requestEncoding == 'KVP'\n ? appendParams(template, context)\n : template.replace(/\\{(\\w+?)\\}/g, function (m, p) {\n return p.toLowerCase() in context ? context[p.toLowerCase()] : m;\n });\n\n const tileGrid = /** @type {import(\"../tilegrid/WMTS.js\").default} */ (\n this.tileGrid\n );\n const dimensions = this.dimensions_;\n\n return (\n /**\n * @param {import(\"../tilecoord.js\").TileCoord} tileCoord Tile coordinate.\n * @param {number} pixelRatio Pixel ratio.\n * @param {import(\"../proj/Projection.js\").default} projection Projection.\n * @return {string|undefined} Tile URL.\n */\n function (tileCoord, pixelRatio, projection) {\n if (!tileCoord) {\n return undefined;\n }\n const localContext = {\n 'TileMatrix': tileGrid.getMatrixId(tileCoord[0]),\n 'TileCol': tileCoord[1],\n 'TileRow': tileCoord[2],\n };\n Object.assign(localContext, dimensions);\n let url = template;\n if (requestEncoding == 'KVP') {\n url = appendParams(url, localContext);\n } else {\n url = url.replace(/\\{(\\w+?)\\}/g, function (m, p) {\n return localContext[p];\n });\n }\n return url;\n }\n );\n }\n}\n\nexport default WMTS;\n\n/**\n * Generate source options from a capabilities object.\n * @param {Object} wmtsCap An object representing the capabilities document.\n * @param {!Object} config Configuration properties for the layer. Defaults for\n * the layer will apply if not provided.\n *\n * Required config properties:\n * - layer - {string} The layer identifier.\n *\n * Optional config properties:\n * - matrixSet - {string} The matrix set identifier, required if there is\n * more than one matrix set in the layer capabilities.\n * - projection - {string} The desired CRS when no matrixSet is specified.\n * eg: \"EPSG:3857\". If the desired projection is not available,\n * an error is thrown.\n * - requestEncoding - {string} url encoding format for the layer. Default is\n * the first tile url format found in the GetCapabilities response.\n * - style - {string} The name of the style\n * - format - {string} Image format for the layer. Default is the first\n * format returned in the GetCapabilities response.\n * - crossOrigin - {string|null|undefined} Cross origin. Default is `undefined`.\n * @return {Options|null} WMTS source options object or `null` if the layer was not found.\n * @api\n */\nexport function optionsFromCapabilities(wmtsCap, config) {\n const layers = wmtsCap['Contents']['Layer'];\n const l = layers.find(function (elt) {\n return elt['Identifier'] == config['layer'];\n });\n if (!l) {\n return null;\n }\n const tileMatrixSets = wmtsCap['Contents']['TileMatrixSet'];\n let idx;\n if (l['TileMatrixSetLink'].length > 1) {\n if ('projection' in config) {\n idx = l['TileMatrixSetLink'].findIndex(function (elt) {\n const tileMatrixSet = tileMatrixSets.find(function (el) {\n return el['Identifier'] == elt['TileMatrixSet'];\n });\n const supportedCRS = tileMatrixSet['SupportedCRS'];\n const proj1 = getProjection(supportedCRS);\n const proj2 = getProjection(config['projection']);\n if (proj1 && proj2) {\n return equivalent(proj1, proj2);\n }\n return supportedCRS == config['projection'];\n });\n } else {\n idx = l['TileMatrixSetLink'].findIndex(function (elt) {\n return elt['TileMatrixSet'] == config['matrixSet'];\n });\n }\n } else {\n idx = 0;\n }\n if (idx < 0) {\n idx = 0;\n }\n const matrixSet =\n /** @type {string} */\n (l['TileMatrixSetLink'][idx]['TileMatrixSet']);\n const matrixLimits =\n /** @type {Array} */\n (l['TileMatrixSetLink'][idx]['TileMatrixSetLimits']);\n\n let format = /** @type {string} */ (l['Format'][0]);\n if ('format' in config) {\n format = config['format'];\n }\n idx = l['Style'].findIndex(function (elt) {\n if ('style' in config) {\n return elt['Title'] == config['style'];\n }\n return elt['isDefault'];\n });\n if (idx < 0) {\n idx = 0;\n }\n const style = /** @type {string} */ (l['Style'][idx]['Identifier']);\n\n const dimensions = {};\n if ('Dimension' in l) {\n l['Dimension'].forEach(function (elt, index, array) {\n const key = elt['Identifier'];\n let value = elt['Default'];\n if (value === undefined) {\n value = elt['Value'][0];\n }\n dimensions[key] = value;\n });\n }\n\n const matrixSets = wmtsCap['Contents']['TileMatrixSet'];\n const matrixSetObj = matrixSets.find(function (elt) {\n return elt['Identifier'] == matrixSet;\n });\n\n let projection;\n const code = matrixSetObj['SupportedCRS'];\n if (code) {\n projection = getProjection(code);\n }\n if ('projection' in config) {\n const projConfig = getProjection(config['projection']);\n if (projConfig) {\n if (!projection || equivalent(projConfig, projection)) {\n projection = projConfig;\n }\n }\n }\n\n let wrapX = false;\n const switchXY = projection.getAxisOrientation().substr(0, 2) == 'ne';\n\n let matrix = matrixSetObj.TileMatrix[0];\n\n // create default matrixLimit\n let selectedMatrixLimit = {\n MinTileCol: 0,\n MinTileRow: 0,\n // subtract one to end up at tile top left\n MaxTileCol: matrix.MatrixWidth - 1,\n MaxTileRow: matrix.MatrixHeight - 1,\n };\n\n //in case of matrix limits, use matrix limits to calculate extent\n if (matrixLimits) {\n selectedMatrixLimit = matrixLimits[matrixLimits.length - 1];\n const m = matrixSetObj.TileMatrix.find(\n (tileMatrixValue) =>\n tileMatrixValue.Identifier === selectedMatrixLimit.TileMatrix ||\n matrixSetObj.Identifier + ':' + tileMatrixValue.Identifier ===\n selectedMatrixLimit.TileMatrix\n );\n if (m) {\n matrix = m;\n }\n }\n\n const resolution =\n (matrix.ScaleDenominator * 0.00028) / projection.getMetersPerUnit(); // WMTS 1.0.0: standardized rendering pixel size\n const origin = switchXY\n ? [matrix.TopLeftCorner[1], matrix.TopLeftCorner[0]]\n : matrix.TopLeftCorner;\n const tileSpanX = matrix.TileWidth * resolution;\n const tileSpanY = matrix.TileHeight * resolution;\n let matrixSetExtent = matrixSetObj['BoundingBox'];\n if (matrixSetExtent && switchXY) {\n matrixSetExtent = [\n matrixSetExtent[1],\n matrixSetExtent[0],\n matrixSetExtent[3],\n matrixSetExtent[2],\n ];\n }\n let extent = [\n origin[0] + tileSpanX * selectedMatrixLimit.MinTileCol,\n // add one to get proper bottom/right coordinate\n origin[1] - tileSpanY * (1 + selectedMatrixLimit.MaxTileRow),\n origin[0] + tileSpanX * (1 + selectedMatrixLimit.MaxTileCol),\n origin[1] - tileSpanY * selectedMatrixLimit.MinTileRow,\n ];\n\n if (\n matrixSetExtent !== undefined &&\n !containsExtent(matrixSetExtent, extent)\n ) {\n const wgs84BoundingBox = l['WGS84BoundingBox'];\n const wgs84ProjectionExtent = getProjection('EPSG:4326').getExtent();\n extent = matrixSetExtent;\n if (wgs84BoundingBox) {\n wrapX =\n wgs84BoundingBox[0] === wgs84ProjectionExtent[0] &&\n wgs84BoundingBox[2] === wgs84ProjectionExtent[2];\n } else {\n const wgs84MatrixSetExtent = transformExtent(\n matrixSetExtent,\n matrixSetObj['SupportedCRS'],\n 'EPSG:4326'\n );\n // Ignore slight deviation from the correct x limits\n wrapX =\n wgs84MatrixSetExtent[0] - 1e-10 <= wgs84ProjectionExtent[0] &&\n wgs84MatrixSetExtent[2] + 1e-10 >= wgs84ProjectionExtent[2];\n }\n }\n\n const tileGrid = createFromCapabilitiesMatrixSet(\n matrixSetObj,\n extent,\n matrixLimits\n );\n\n /** @type {!Array} */\n const urls = [];\n let requestEncoding = config['requestEncoding'];\n requestEncoding = requestEncoding !== undefined ? requestEncoding : '';\n\n if (\n 'OperationsMetadata' in wmtsCap &&\n 'GetTile' in wmtsCap['OperationsMetadata']\n ) {\n const gets = wmtsCap['OperationsMetadata']['GetTile']['DCP']['HTTP']['Get'];\n\n for (let i = 0, ii = gets.length; i < ii; ++i) {\n if (gets[i]['Constraint']) {\n const constraint = gets[i]['Constraint'].find(function (element) {\n return element['name'] == 'GetEncoding';\n });\n const encodings = constraint['AllowedValues']['Value'];\n\n if (requestEncoding === '') {\n // requestEncoding not provided, use the first encoding from the list\n requestEncoding = encodings[0];\n }\n if (requestEncoding === 'KVP') {\n if (encodings.includes('KVP')) {\n urls.push(/** @type {string} */ (gets[i]['href']));\n }\n } else {\n break;\n }\n } else if (gets[i]['href']) {\n requestEncoding = 'KVP';\n urls.push(/** @type {string} */ (gets[i]['href']));\n }\n }\n }\n if (urls.length === 0) {\n requestEncoding = 'REST';\n l['ResourceURL'].forEach(function (element) {\n if (element['resourceType'] === 'tile') {\n format = element['format'];\n urls.push(/** @type {string} */ (element['template']));\n }\n });\n }\n\n return {\n urls: urls,\n layer: config['layer'],\n matrixSet: matrixSet,\n format: format,\n projection: projection,\n requestEncoding: requestEncoding,\n tileGrid: tileGrid,\n style: style,\n dimensions: dimensions,\n wrapX: wrapX,\n crossOrigin: config['crossOrigin'],\n };\n}\n","/**\n * @module ol/webgl\n */\n\nimport {SAFARI_BUG_237906} from './has.js';\n\n/**\n * Constants taken from goog.webgl\n */\n\n/**\n * Used by {@link module:ol/webgl/Helper~WebGLHelper} for buffers containing vertices data, such as\n * position, color, texture coordinate, etc. These vertices are then referenced by an index buffer\n * to be drawn on screen (see {@link module:ol/webgl.ELEMENT_ARRAY_BUFFER}).\n * @const\n * @type {number}\n * @api\n */\nexport const ARRAY_BUFFER = 0x8892;\n\n/**\n * Used by {@link module:ol/webgl/Helper~WebGLHelper} for buffers containing indices data.\n * Index buffers are essentially lists of references to vertices defined in a vertex buffer\n * (see {@link module:ol/webgl.ARRAY_BUFFER}), and define the primitives (triangles) to be drawn.\n * @const\n * @type {number}\n * @api\n */\nexport const ELEMENT_ARRAY_BUFFER = 0x8893;\n\n/**\n * Used by {link module:ol/webgl/Buffer~WebGLArrayBuffer}.\n * @const\n * @type {number}\n * @api\n */\nexport const STREAM_DRAW = 0x88e0;\n\n/**\n * Used by {link module:ol/webgl/Buffer~WebGLArrayBuffer}.\n * @const\n * @type {number}\n * @api\n */\nexport const STATIC_DRAW = 0x88e4;\n\n/**\n * Used by {link module:ol/webgl/Buffer~WebGLArrayBuffer}.\n * @const\n * @type {number}\n * @api\n */\nexport const DYNAMIC_DRAW = 0x88e8;\n\n/**\n * @const\n * @type {number}\n */\nexport const UNSIGNED_BYTE = 0x1401;\n\n/**\n * @const\n * @type {number}\n */\nexport const UNSIGNED_SHORT = 0x1403;\n\n/**\n * @const\n * @type {number}\n */\nexport const UNSIGNED_INT = 0x1405;\n\n/**\n * @const\n * @type {number}\n */\nexport const FLOAT = 0x1406;\n\n/** end of goog.webgl constants\n */\n\n/**\n * @const\n * @type {Array}\n */\nconst CONTEXT_IDS = ['experimental-webgl', 'webgl', 'webkit-3d', 'moz-webgl'];\n\n/**\n * @param {HTMLCanvasElement} canvas Canvas.\n * @param {Object} [attributes] Attributes.\n * @return {WebGLRenderingContext} WebGL rendering context.\n */\nexport function getContext(canvas, attributes) {\n attributes = Object.assign(\n {\n preserveDrawingBuffer: true,\n antialias: SAFARI_BUG_237906 ? false : true, // https://bugs.webkit.org/show_bug.cgi?id=237906\n },\n attributes\n );\n const ii = CONTEXT_IDS.length;\n for (let i = 0; i < ii; ++i) {\n try {\n const context = canvas.getContext(CONTEXT_IDS[i], attributes);\n if (context) {\n return /** @type {!WebGLRenderingContext} */ (context);\n }\n } catch (e) {\n // pass\n }\n }\n return null;\n}\n\n/**\n * @type {Array}\n */\nlet supportedExtensions;\n\n/**\n * @return {Array} List of supported WebGL extensions.\n */\nexport function getSupportedExtensions() {\n if (!supportedExtensions) {\n const canvas = document.createElement('canvas');\n const gl = getContext(canvas);\n if (gl) {\n supportedExtensions = gl.getSupportedExtensions();\n }\n }\n return supportedExtensions;\n}\n","/**\n * @module ol/xml\n */\nimport {extend} from './array.js';\n\n/**\n * When using {@link module:ol/xml.makeChildAppender} or\n * {@link module:ol/xml.makeSimpleNodeFactory}, the top `objectStack` item needs\n * to have this structure.\n * @typedef {Object} NodeStackItem\n * @property {Element} node Node.\n */\n\n/**\n * @typedef {function(Element, Array<*>): void} Parser\n */\n\n/**\n * @typedef {function(Element, *, Array<*>): void} Serializer\n */\n\n/**\n * @type {string}\n */\nexport const XML_SCHEMA_INSTANCE_URI =\n 'http://www.w3.org/2001/XMLSchema-instance';\n\n/**\n * @param {string} namespaceURI Namespace URI.\n * @param {string} qualifiedName Qualified name.\n * @return {Element} Node.\n */\nexport function createElementNS(namespaceURI, qualifiedName) {\n return getDocument().createElementNS(namespaceURI, qualifiedName);\n}\n\n/**\n * Recursively grab all text content of child nodes into a single string.\n * @param {Node} node Node.\n * @param {boolean} normalizeWhitespace Normalize whitespace: remove all line\n * breaks.\n * @return {string} All text content.\n * @api\n */\nexport function getAllTextContent(node, normalizeWhitespace) {\n return getAllTextContent_(node, normalizeWhitespace, []).join('');\n}\n\n/**\n * Recursively grab all text content of child nodes into a single string.\n * @param {Node} node Node.\n * @param {boolean} normalizeWhitespace Normalize whitespace: remove all line\n * breaks.\n * @param {Array} accumulator Accumulator.\n * @private\n * @return {Array} Accumulator.\n */\nexport function getAllTextContent_(node, normalizeWhitespace, accumulator) {\n if (\n node.nodeType == Node.CDATA_SECTION_NODE ||\n node.nodeType == Node.TEXT_NODE\n ) {\n if (normalizeWhitespace) {\n accumulator.push(String(node.nodeValue).replace(/(\\r\\n|\\r|\\n)/g, ''));\n } else {\n accumulator.push(node.nodeValue);\n }\n } else {\n let n;\n for (n = node.firstChild; n; n = n.nextSibling) {\n getAllTextContent_(n, normalizeWhitespace, accumulator);\n }\n }\n return accumulator;\n}\n\n/**\n * @param {Object} object Object.\n * @return {boolean} Is a document.\n */\nexport function isDocument(object) {\n return 'documentElement' in object;\n}\n\n/**\n * @param {Element} node Node.\n * @param {?string} namespaceURI Namespace URI.\n * @param {string} name Attribute name.\n * @return {string} Value\n */\nexport function getAttributeNS(node, namespaceURI, name) {\n return node.getAttributeNS(namespaceURI, name) || '';\n}\n\n/**\n * Parse an XML string to an XML Document.\n * @param {string} xml XML.\n * @return {Document} Document.\n * @api\n */\nexport function parse(xml) {\n return new DOMParser().parseFromString(xml, 'application/xml');\n}\n\n/**\n * Make an array extender function for extending the array at the top of the\n * object stack.\n * @param {function(this: T, Node, Array<*>): (Array<*>|undefined)} valueReader Value reader.\n * @param {T} [thisArg] The object to use as `this` in `valueReader`.\n * @return {Parser} Parser.\n * @template T\n */\nexport function makeArrayExtender(valueReader, thisArg) {\n return (\n /**\n * @param {Node} node Node.\n * @param {Array<*>} objectStack Object stack.\n */\n function (node, objectStack) {\n const value = valueReader.call(\n thisArg !== undefined ? thisArg : this,\n node,\n objectStack\n );\n if (value !== undefined) {\n const array = /** @type {Array<*>} */ (\n objectStack[objectStack.length - 1]\n );\n extend(array, value);\n }\n }\n );\n}\n\n/**\n * Make an array pusher function for pushing to the array at the top of the\n * object stack.\n * @param {function(this: T, Element, Array<*>): *} valueReader Value reader.\n * @param {T} [thisArg] The object to use as `this` in `valueReader`.\n * @return {Parser} Parser.\n * @template T\n */\nexport function makeArrayPusher(valueReader, thisArg) {\n return (\n /**\n * @param {Element} node Node.\n * @param {Array<*>} objectStack Object stack.\n */\n function (node, objectStack) {\n const value = valueReader.call(\n thisArg !== undefined ? thisArg : this,\n node,\n objectStack\n );\n if (value !== undefined) {\n const array = /** @type {Array<*>} */ (\n objectStack[objectStack.length - 1]\n );\n array.push(value);\n }\n }\n );\n}\n\n/**\n * Make an object stack replacer function for replacing the object at the\n * top of the stack.\n * @param {function(this: T, Node, Array<*>): *} valueReader Value reader.\n * @param {T} [thisArg] The object to use as `this` in `valueReader`.\n * @return {Parser} Parser.\n * @template T\n */\nexport function makeReplacer(valueReader, thisArg) {\n return (\n /**\n * @param {Node} node Node.\n * @param {Array<*>} objectStack Object stack.\n */\n function (node, objectStack) {\n const value = valueReader.call(\n thisArg !== undefined ? thisArg : this,\n node,\n objectStack\n );\n if (value !== undefined) {\n objectStack[objectStack.length - 1] = value;\n }\n }\n );\n}\n\n/**\n * Make an object property pusher function for adding a property to the\n * object at the top of the stack.\n * @param {function(this: T, Element, Array<*>): *} valueReader Value reader.\n * @param {string} [property] Property.\n * @param {T} [thisArg] The object to use as `this` in `valueReader`.\n * @return {Parser} Parser.\n * @template T\n */\nexport function makeObjectPropertyPusher(valueReader, property, thisArg) {\n return (\n /**\n * @param {Element} node Node.\n * @param {Array<*>} objectStack Object stack.\n */\n function (node, objectStack) {\n const value = valueReader.call(\n thisArg !== undefined ? thisArg : this,\n node,\n objectStack\n );\n if (value !== undefined) {\n const object = /** @type {!Object} */ (\n objectStack[objectStack.length - 1]\n );\n const name = property !== undefined ? property : node.localName;\n let array;\n if (name in object) {\n array = object[name];\n } else {\n array = [];\n object[name] = array;\n }\n array.push(value);\n }\n }\n );\n}\n\n/**\n * Make an object property setter function.\n * @param {function(this: T, Element, Array<*>): *} valueReader Value reader.\n * @param {string} [property] Property.\n * @param {T} [thisArg] The object to use as `this` in `valueReader`.\n * @return {Parser} Parser.\n * @template T\n */\nexport function makeObjectPropertySetter(valueReader, property, thisArg) {\n return (\n /**\n * @param {Element} node Node.\n * @param {Array<*>} objectStack Object stack.\n */\n function (node, objectStack) {\n const value = valueReader.call(\n thisArg !== undefined ? thisArg : this,\n node,\n objectStack\n );\n if (value !== undefined) {\n const object = /** @type {!Object} */ (\n objectStack[objectStack.length - 1]\n );\n const name = property !== undefined ? property : node.localName;\n object[name] = value;\n }\n }\n );\n}\n\n/**\n * Create a serializer that appends nodes written by its `nodeWriter` to its\n * designated parent. The parent is the `node` of the\n * {@link module:ol/xml~NodeStackItem} at the top of the `objectStack`.\n * @param {function(this: T, Node, V, Array<*>): void} nodeWriter Node writer.\n * @param {T} [thisArg] The object to use as `this` in `nodeWriter`.\n * @return {Serializer} Serializer.\n * @template T, V\n */\nexport function makeChildAppender(nodeWriter, thisArg) {\n return function (node, value, objectStack) {\n nodeWriter.call(\n thisArg !== undefined ? thisArg : this,\n node,\n value,\n objectStack\n );\n const parent = /** @type {NodeStackItem} */ (\n objectStack[objectStack.length - 1]\n );\n const parentNode = parent.node;\n parentNode.appendChild(node);\n };\n}\n\n/**\n * Create a serializer that calls the provided `nodeWriter` from\n * {@link module:ol/xml.serialize}. This can be used by the parent writer to have the\n * `nodeWriter` called with an array of values when the `nodeWriter` was\n * designed to serialize a single item. An example would be a LineString\n * geometry writer, which could be reused for writing MultiLineString\n * geometries.\n * @param {function(this: T, Element, V, Array<*>): void} nodeWriter Node writer.\n * @param {T} [thisArg] The object to use as `this` in `nodeWriter`.\n * @return {Serializer} Serializer.\n * @template T, V\n */\nexport function makeArraySerializer(nodeWriter, thisArg) {\n let serializersNS, nodeFactory;\n return function (node, value, objectStack) {\n if (serializersNS === undefined) {\n serializersNS = {};\n const serializers = {};\n serializers[node.localName] = nodeWriter;\n serializersNS[node.namespaceURI] = serializers;\n nodeFactory = makeSimpleNodeFactory(node.localName);\n }\n serialize(serializersNS, nodeFactory, value, objectStack);\n };\n}\n\n/**\n * Create a node factory which can use the `keys` passed to\n * {@link module:ol/xml.serialize} or {@link module:ol/xml.pushSerializeAndPop} as node names,\n * or a fixed node name. The namespace of the created nodes can either be fixed,\n * or the parent namespace will be used.\n * @param {string} [fixedNodeName] Fixed node name which will be used for all\n * created nodes. If not provided, the 3rd argument to the resulting node\n * factory needs to be provided and will be the nodeName.\n * @param {string} [fixedNamespaceURI] Fixed namespace URI which will be used for\n * all created nodes. If not provided, the namespace of the parent node will\n * be used.\n * @return {function(*, Array<*>, string=): (Node|undefined)} Node factory.\n */\nexport function makeSimpleNodeFactory(fixedNodeName, fixedNamespaceURI) {\n return (\n /**\n * @param {*} value Value.\n * @param {Array<*>} objectStack Object stack.\n * @param {string} [newNodeName] Node name.\n * @return {Node} Node.\n */\n function (value, objectStack, newNodeName) {\n const context = /** @type {NodeStackItem} */ (\n objectStack[objectStack.length - 1]\n );\n const node = context.node;\n let nodeName = fixedNodeName;\n if (nodeName === undefined) {\n nodeName = newNodeName;\n }\n\n const namespaceURI =\n fixedNamespaceURI !== undefined ? fixedNamespaceURI : node.namespaceURI;\n return createElementNS(namespaceURI, /** @type {string} */ (nodeName));\n }\n );\n}\n\n/**\n * A node factory that creates a node using the parent's `namespaceURI` and the\n * `nodeName` passed by {@link module:ol/xml.serialize} or\n * {@link module:ol/xml.pushSerializeAndPop} to the node factory.\n * @const\n * @type {function(*, Array<*>, string=): (Node|undefined)}\n */\nexport const OBJECT_PROPERTY_NODE_FACTORY = makeSimpleNodeFactory();\n\n/**\n * Create an array of `values` to be used with {@link module:ol/xml.serialize} or\n * {@link module:ol/xml.pushSerializeAndPop}, where `orderedKeys` has to be provided as\n * `key` argument.\n * @param {Object} object Key-value pairs for the sequence. Keys can\n * be a subset of the `orderedKeys`.\n * @param {Array} orderedKeys Keys in the order of the sequence.\n * @return {Array<*>} Values in the order of the sequence. The resulting array\n * has the same length as the `orderedKeys` array. Values that are not\n * present in `object` will be `undefined` in the resulting array.\n */\nexport function makeSequence(object, orderedKeys) {\n const length = orderedKeys.length;\n const sequence = new Array(length);\n for (let i = 0; i < length; ++i) {\n sequence[i] = object[orderedKeys[i]];\n }\n return sequence;\n}\n\n/**\n * Create a namespaced structure, using the same values for each namespace.\n * This can be used as a starting point for versioned parsers, when only a few\n * values are version specific.\n * @param {Array} namespaceURIs Namespace URIs.\n * @param {T} structure Structure.\n * @param {Object} [structureNS] Namespaced structure to add to.\n * @return {Object} Namespaced structure.\n * @template T\n */\nexport function makeStructureNS(namespaceURIs, structure, structureNS) {\n structureNS = structureNS !== undefined ? structureNS : {};\n let i, ii;\n for (i = 0, ii = namespaceURIs.length; i < ii; ++i) {\n structureNS[namespaceURIs[i]] = structure;\n }\n return structureNS;\n}\n\n/**\n * Parse a node using the parsers and object stack.\n * @param {Object>} parsersNS\n * Parsers by namespace.\n * @param {Element} node Node.\n * @param {Array<*>} objectStack Object stack.\n * @param {*} [thisArg] The object to use as `this`.\n */\nexport function parseNode(parsersNS, node, objectStack, thisArg) {\n let n;\n for (n = node.firstElementChild; n; n = n.nextElementSibling) {\n const parsers = parsersNS[n.namespaceURI];\n if (parsers !== undefined) {\n const parser = parsers[n.localName];\n if (parser !== undefined) {\n parser.call(thisArg, n, objectStack);\n }\n }\n }\n}\n\n/**\n * Push an object on top of the stack, parse and return the popped object.\n * @param {T} object Object.\n * @param {Object>} parsersNS\n * Parsers by namespace.\n * @param {Element} node Node.\n * @param {Array<*>} objectStack Object stack.\n * @param {*} [thisArg] The object to use as `this`.\n * @return {T} Object.\n * @template T\n */\nexport function pushParseAndPop(object, parsersNS, node, objectStack, thisArg) {\n objectStack.push(object);\n parseNode(parsersNS, node, objectStack, thisArg);\n return /** @type {T} */ (objectStack.pop());\n}\n\n/**\n * Walk through an array of `values` and call a serializer for each value.\n * @param {Object>} serializersNS\n * Namespaced serializers.\n * @param {function(this: T, *, Array<*>, (string|undefined)): (Node|undefined)} nodeFactory\n * Node factory. The `nodeFactory` creates the node whose namespace and name\n * will be used to choose a node writer from `serializersNS`. This\n * separation allows us to decide what kind of node to create, depending on\n * the value we want to serialize. An example for this would be different\n * geometry writers based on the geometry type.\n * @param {Array<*>} values Values to serialize. An example would be an array\n * of {@link module:ol/Feature~Feature} instances.\n * @param {Array<*>} objectStack Node stack.\n * @param {Array} [keys] Keys of the `values`. Will be passed to the\n * `nodeFactory`. This is used for serializing object literals where the\n * node name relates to the property key. The array length of `keys` has\n * to match the length of `values`. For serializing a sequence, `keys`\n * determines the order of the sequence.\n * @param {T} [thisArg] The object to use as `this` for the node factory and\n * serializers.\n * @template T\n */\nexport function serialize(\n serializersNS,\n nodeFactory,\n values,\n objectStack,\n keys,\n thisArg\n) {\n const length = (keys !== undefined ? keys : values).length;\n let value, node;\n for (let i = 0; i < length; ++i) {\n value = values[i];\n if (value !== undefined) {\n node = nodeFactory.call(\n thisArg !== undefined ? thisArg : this,\n value,\n objectStack,\n keys !== undefined ? keys[i] : undefined\n );\n if (node !== undefined) {\n serializersNS[node.namespaceURI][node.localName].call(\n thisArg,\n node,\n value,\n objectStack\n );\n }\n }\n }\n}\n\n/**\n * @param {O} object Object.\n * @param {Object>} serializersNS\n * Namespaced serializers.\n * @param {function(this: T, *, Array<*>, (string|undefined)): (Node|undefined)} nodeFactory\n * Node factory. The `nodeFactory` creates the node whose namespace and name\n * will be used to choose a node writer from `serializersNS`. This\n * separation allows us to decide what kind of node to create, depending on\n * the value we want to serialize. An example for this would be different\n * geometry writers based on the geometry type.\n * @param {Array<*>} values Values to serialize. An example would be an array\n * of {@link module:ol/Feature~Feature} instances.\n * @param {Array<*>} objectStack Node stack.\n * @param {Array} [keys] Keys of the `values`. Will be passed to the\n * `nodeFactory`. This is used for serializing object literals where the\n * node name relates to the property key. The array length of `keys` has\n * to match the length of `values`. For serializing a sequence, `keys`\n * determines the order of the sequence.\n * @param {T} [thisArg] The object to use as `this` for the node factory and\n * serializers.\n * @return {O|undefined} Object.\n * @template O, T\n */\nexport function pushSerializeAndPop(\n object,\n serializersNS,\n nodeFactory,\n values,\n objectStack,\n keys,\n thisArg\n) {\n objectStack.push(object);\n serialize(serializersNS, nodeFactory, values, objectStack, keys, thisArg);\n return /** @type {O|undefined} */ (objectStack.pop());\n}\n\nlet xmlSerializer_ = undefined;\n\n/**\n * Register a XMLSerializer. Can be used to inject a XMLSerializer\n * where there is no globally available implementation.\n *\n * @param {XMLSerializer} xmlSerializer A XMLSerializer.\n * @api\n */\nexport function registerXMLSerializer(xmlSerializer) {\n xmlSerializer_ = xmlSerializer;\n}\n\n/**\n * @return {XMLSerializer} The XMLSerializer.\n */\nexport function getXMLSerializer() {\n if (xmlSerializer_ === undefined && typeof XMLSerializer !== 'undefined') {\n xmlSerializer_ = new XMLSerializer();\n }\n return xmlSerializer_;\n}\n\nlet document_ = undefined;\n\n/**\n * Register a Document to use when creating nodes for XML serializations. Can be used\n * to inject a Document where there is no globally available implementation.\n *\n * @param {Document} document A Document.\n * @api\n */\nexport function registerDocument(document) {\n document_ = document;\n}\n\n/**\n * Get a document that should be used when creating nodes for XML serializations.\n * @return {Document} The document.\n */\nexport function getDocument() {\n if (document_ === undefined && typeof document !== 'undefined') {\n document_ = document.implementation.createDocument('', '', null);\n }\n return document_;\n}\n","/**\n * @module ol/webgl/Buffer\n */\nimport {\n ARRAY_BUFFER,\n DYNAMIC_DRAW,\n ELEMENT_ARRAY_BUFFER,\n STATIC_DRAW,\n STREAM_DRAW,\n} from '../webgl.js';\nimport {assert} from '../asserts.js';\n\n/**\n * Used to describe the intended usage for the data: `STATIC_DRAW`, `STREAM_DRAW`\n * or `DYNAMIC_DRAW`.\n * @enum {number}\n */\nexport const BufferUsage = {\n STATIC_DRAW: STATIC_DRAW,\n STREAM_DRAW: STREAM_DRAW,\n DYNAMIC_DRAW: DYNAMIC_DRAW,\n};\n\n/**\n * @classdesc\n * Object used to store an array of data as well as usage information for that data.\n * Stores typed arrays internally, either Float32Array or Uint16/32Array depending on\n * the buffer type (ARRAY_BUFFER or ELEMENT_ARRAY_BUFFER) and available extensions.\n *\n * To populate the array, you can either use:\n * * A size using `#ofSize(buffer)`\n * * An `ArrayBuffer` object using `#fromArrayBuffer(buffer)`\n * * A plain array using `#fromArray(array)`\n *\n * Note:\n * See the documentation of [WebGLRenderingContext.bufferData](https://developer.mozilla.org/en-US/docs/Web/API/WebGLRenderingContext/bufferData)\n * for more info on buffer usage.\n * @api\n */\nclass WebGLArrayBuffer {\n /**\n * @param {number} type Buffer type, either ARRAY_BUFFER or ELEMENT_ARRAY_BUFFER.\n * @param {number} [usage] Intended usage, either `STATIC_DRAW`, `STREAM_DRAW` or `DYNAMIC_DRAW`.\n * Default is `DYNAMIC_DRAW`.\n */\n constructor(type, usage) {\n /**\n * @private\n * @type {Float32Array|Uint32Array}\n */\n this.array = null;\n\n /**\n * @private\n * @type {number}\n */\n this.type = type;\n\n assert(type === ARRAY_BUFFER || type === ELEMENT_ARRAY_BUFFER, 62);\n\n /**\n * @private\n * @type {number}\n */\n this.usage = usage !== undefined ? usage : BufferUsage.STATIC_DRAW;\n }\n\n /**\n * Populates the buffer with an array of the given size (all values will be zeroes).\n * @param {number} size Array size\n */\n ofSize(size) {\n this.array = new (getArrayClassForType(this.type))(size);\n }\n\n /**\n * Populates the buffer with an array of the given size.\n * @param {Array} array Numerical array\n */\n fromArray(array) {\n this.array = getArrayClassForType(this.type).from(array);\n }\n\n /**\n * Populates the buffer with a raw binary array buffer.\n * @param {ArrayBuffer} buffer Raw binary buffer to populate the array with. Note that this buffer must have been\n * initialized for the same typed array class.\n */\n fromArrayBuffer(buffer) {\n this.array = new (getArrayClassForType(this.type))(buffer);\n }\n\n /**\n * @return {number} Buffer type.\n */\n getType() {\n return this.type;\n }\n\n /**\n * Will return null if the buffer was not initialized\n * @return {Float32Array|Uint32Array} Array.\n */\n getArray() {\n return this.array;\n }\n\n /**\n * @return {number} Usage.\n */\n getUsage() {\n return this.usage;\n }\n\n /**\n * Will return 0 if the buffer is not initialized\n * @return {number} Array size\n */\n getSize() {\n return this.array ? this.array.length : 0;\n }\n}\n\n/**\n * Returns a typed array constructor based on the given buffer type\n * @param {number} type Buffer type, either ARRAY_BUFFER or ELEMENT_ARRAY_BUFFER.\n * @return {Float32ArrayConstructor|Uint32ArrayConstructor} The typed array class to use for this buffer.\n */\nexport function getArrayClassForType(type) {\n switch (type) {\n case ARRAY_BUFFER:\n return Float32Array;\n case ELEMENT_ARRAY_BUFFER:\n return Uint32Array;\n default:\n return Float32Array;\n }\n}\n\nexport default WebGLArrayBuffer;\n","/**\n * @module ol/webgl/ContextEventType\n */\n\n/**\n * @enum {string}\n */\nexport default {\n LOST: 'webglcontextlost',\n RESTORED: 'webglcontextrestored',\n};\n","/**\n * @module ol/webgl/PostProcessingPass\n */\n\nimport {getUid} from '../util.js';\n\nconst DEFAULT_VERTEX_SHADER = `\n precision mediump float;\n \n attribute vec2 a_position;\n varying vec2 v_texCoord;\n varying vec2 v_screenCoord;\n \n uniform vec2 u_screenSize;\n \n void main() {\n v_texCoord = a_position * 0.5 + 0.5;\n v_screenCoord = v_texCoord * u_screenSize;\n gl_Position = vec4(a_position, 0.0, 1.0);\n }\n`;\n\nconst DEFAULT_FRAGMENT_SHADER = `\n precision mediump float;\n \n uniform sampler2D u_image;\n uniform float u_opacity;\n \n varying vec2 v_texCoord;\n \n void main() {\n gl_FragColor = texture2D(u_image, v_texCoord) * u_opacity;\n }\n`;\n\n/**\n * @typedef {Object} Options\n * @property {WebGLRenderingContext} webGlContext WebGL context; mandatory.\n * @property {number} [scaleRatio] Scale ratio; if < 1, the post process will render to a texture smaller than\n * the main canvas that will then be sampled up (useful for saving resource on blur steps).\n * @property {string} [vertexShader] Vertex shader source\n * @property {string} [fragmentShader] Fragment shader source\n * @property {Object} [uniforms] Uniform definitions for the post process step\n */\n\n/**\n * @typedef {Object} UniformInternalDescription\n * @property {import(\"./Helper\").UniformValue} value Value\n * @property {WebGLUniformLocation} location Location\n * @property {WebGLTexture} [texture] Texture\n * @private\n */\n\n/**\n * @classdesc\n * This class is used to define Post Processing passes with custom shaders and uniforms.\n * This is used internally by {@link module:ol/webgl/Helper~WebGLHelper}.\n *\n * Please note that the final output on the DOM canvas is expected to have premultiplied alpha, which means that\n * a pixel which is 100% red with an opacity of 50% must have a color of (r=0.5, g=0, b=0, a=0.5).\n * Failing to provide pixel colors with premultiplied alpha will result in render anomalies.\n *\n * The default post-processing pass does *not* multiply color values with alpha value, it expects color values to be\n * premultiplied.\n *\n * Default shaders are shown hereafter:\n *\n * * Vertex shader:\n *\n * ```\n * precision mediump float;\n *\n * attribute vec2 a_position;\n * varying vec2 v_texCoord;\n * varying vec2 v_screenCoord;\n *\n * uniform vec2 u_screenSize;\n *\n * void main() {\n * v_texCoord = a_position * 0.5 + 0.5;\n * v_screenCoord = v_texCoord * u_screenSize;\n * gl_Position = vec4(a_position, 0.0, 1.0);\n * }\n * ```\n *\n * * Fragment shader:\n *\n * ```\n * precision mediump float;\n *\n * uniform sampler2D u_image;\n * uniform float u_opacity;\n *\n * varying vec2 v_texCoord;\n *\n * void main() {\n * gl_FragColor = texture2D(u_image, v_texCoord) * u_opacity;\n * }\n * ```\n *\n * @api\n */\nclass WebGLPostProcessingPass {\n /**\n * @param {Options} options Options.\n */\n constructor(options) {\n this.gl_ = options.webGlContext;\n const gl = this.gl_;\n\n this.scaleRatio_ = options.scaleRatio || 1;\n\n this.renderTargetTexture_ = gl.createTexture();\n this.renderTargetTextureSize_ = null;\n\n this.frameBuffer_ = gl.createFramebuffer();\n\n // compile the program for the frame buffer\n // TODO: make compilation errors show up\n const vertexShader = gl.createShader(gl.VERTEX_SHADER);\n gl.shaderSource(\n vertexShader,\n options.vertexShader || DEFAULT_VERTEX_SHADER\n );\n gl.compileShader(vertexShader);\n const fragmentShader = gl.createShader(gl.FRAGMENT_SHADER);\n gl.shaderSource(\n fragmentShader,\n options.fragmentShader || DEFAULT_FRAGMENT_SHADER\n );\n gl.compileShader(fragmentShader);\n this.renderTargetProgram_ = gl.createProgram();\n gl.attachShader(this.renderTargetProgram_, vertexShader);\n gl.attachShader(this.renderTargetProgram_, fragmentShader);\n gl.linkProgram(this.renderTargetProgram_);\n\n // bind the vertices buffer for the frame buffer\n this.renderTargetVerticesBuffer_ = gl.createBuffer();\n const verticesArray = [-1, -1, 1, -1, -1, 1, 1, -1, 1, 1, -1, 1];\n gl.bindBuffer(gl.ARRAY_BUFFER, this.renderTargetVerticesBuffer_);\n gl.bufferData(\n gl.ARRAY_BUFFER,\n new Float32Array(verticesArray),\n gl.STATIC_DRAW\n );\n\n this.renderTargetAttribLocation_ = gl.getAttribLocation(\n this.renderTargetProgram_,\n 'a_position'\n );\n this.renderTargetUniformLocation_ = gl.getUniformLocation(\n this.renderTargetProgram_,\n 'u_screenSize'\n );\n this.renderTargetOpacityLocation_ = gl.getUniformLocation(\n this.renderTargetProgram_,\n 'u_opacity'\n );\n this.renderTargetTextureLocation_ = gl.getUniformLocation(\n this.renderTargetProgram_,\n 'u_image'\n );\n\n /**\n * Holds info about custom uniforms used in the post processing pass\n * @type {Array}\n * @private\n */\n this.uniforms_ = [];\n options.uniforms &&\n Object.keys(options.uniforms).forEach((name) => {\n this.uniforms_.push({\n value: options.uniforms[name],\n location: gl.getUniformLocation(this.renderTargetProgram_, name),\n });\n });\n }\n\n /**\n * Get the WebGL rendering context\n * @return {WebGLRenderingContext} The rendering context.\n * @api\n */\n getGL() {\n return this.gl_;\n }\n\n /**\n * Initialize the render target texture of the post process, make sure it is at the\n * right size and bind it as a render target for the next draw calls.\n * The last step to be initialized will be the one where the primitives are rendered.\n * @param {import(\"../Map.js\").FrameState} frameState current frame state\n * @api\n */\n init(frameState) {\n const gl = this.getGL();\n const textureSize = [\n gl.drawingBufferWidth * this.scaleRatio_,\n gl.drawingBufferHeight * this.scaleRatio_,\n ];\n\n // rendering goes to my buffer\n gl.bindFramebuffer(gl.FRAMEBUFFER, this.getFrameBuffer());\n gl.viewport(0, 0, textureSize[0], textureSize[1]);\n\n // if size has changed: adjust canvas & render target texture\n if (\n !this.renderTargetTextureSize_ ||\n this.renderTargetTextureSize_[0] !== textureSize[0] ||\n this.renderTargetTextureSize_[1] !== textureSize[1]\n ) {\n this.renderTargetTextureSize_ = textureSize;\n\n // create a new texture\n const level = 0;\n const internalFormat = gl.RGBA;\n const border = 0;\n const format = gl.RGBA;\n const type = gl.UNSIGNED_BYTE;\n const data = null;\n gl.bindTexture(gl.TEXTURE_2D, this.renderTargetTexture_);\n gl.texImage2D(\n gl.TEXTURE_2D,\n level,\n internalFormat,\n textureSize[0],\n textureSize[1],\n border,\n format,\n type,\n data\n );\n\n gl.texParameteri(gl.TEXTURE_2D, gl.TEXTURE_MIN_FILTER, gl.LINEAR);\n gl.texParameteri(gl.TEXTURE_2D, gl.TEXTURE_WRAP_S, gl.CLAMP_TO_EDGE);\n gl.texParameteri(gl.TEXTURE_2D, gl.TEXTURE_WRAP_T, gl.CLAMP_TO_EDGE);\n\n // bind the texture to the framebuffer\n gl.framebufferTexture2D(\n gl.FRAMEBUFFER,\n gl.COLOR_ATTACHMENT0,\n gl.TEXTURE_2D,\n this.renderTargetTexture_,\n 0\n );\n }\n }\n\n /**\n * Render to the next postprocessing pass (or to the canvas if final pass).\n * @param {import(\"../Map.js\").FrameState} frameState current frame state\n * @param {WebGLPostProcessingPass} [nextPass] Next pass, optional\n * @param {function(WebGLRenderingContext, import(\"../Map.js\").FrameState):void} [preCompose] Called before composing.\n * @param {function(WebGLRenderingContext, import(\"../Map.js\").FrameState):void} [postCompose] Called before composing.\n * @api\n */\n apply(frameState, nextPass, preCompose, postCompose) {\n const gl = this.getGL();\n const size = frameState.size;\n\n gl.bindFramebuffer(\n gl.FRAMEBUFFER,\n nextPass ? nextPass.getFrameBuffer() : null\n );\n gl.activeTexture(gl.TEXTURE0);\n gl.bindTexture(gl.TEXTURE_2D, this.renderTargetTexture_);\n\n if (!nextPass) {\n // clear the canvas if we are the first to render to it\n // and preserveDrawingBuffer is true\n const canvasId = getUid(gl.canvas);\n if (!frameState.renderTargets[canvasId]) {\n const attributes = gl.getContextAttributes();\n if (attributes && attributes.preserveDrawingBuffer) {\n gl.clearColor(0.0, 0.0, 0.0, 0.0);\n gl.clear(gl.COLOR_BUFFER_BIT);\n }\n\n frameState.renderTargets[canvasId] = true;\n }\n }\n\n gl.enable(gl.BLEND);\n gl.blendFunc(gl.ONE, gl.ONE_MINUS_SRC_ALPHA);\n gl.viewport(0, 0, gl.drawingBufferWidth, gl.drawingBufferHeight);\n\n gl.bindBuffer(gl.ARRAY_BUFFER, this.renderTargetVerticesBuffer_);\n\n gl.useProgram(this.renderTargetProgram_);\n gl.enableVertexAttribArray(this.renderTargetAttribLocation_);\n gl.vertexAttribPointer(\n this.renderTargetAttribLocation_,\n 2,\n gl.FLOAT,\n false,\n 0,\n 0\n );\n gl.uniform2f(this.renderTargetUniformLocation_, size[0], size[1]);\n gl.uniform1i(this.renderTargetTextureLocation_, 0);\n\n const opacity = frameState.layerStatesArray[frameState.layerIndex].opacity;\n gl.uniform1f(this.renderTargetOpacityLocation_, opacity);\n\n this.applyUniforms(frameState);\n\n if (preCompose) {\n preCompose(gl, frameState);\n }\n gl.drawArrays(gl.TRIANGLES, 0, 6);\n if (postCompose) {\n postCompose(gl, frameState);\n }\n }\n\n /**\n * @return {WebGLFramebuffer} Frame buffer\n * @api\n */\n getFrameBuffer() {\n return this.frameBuffer_;\n }\n\n /**\n * Sets the custom uniforms based on what was given in the constructor.\n * @param {import(\"../Map.js\").FrameState} frameState Frame state.\n * @private\n */\n applyUniforms(frameState) {\n const gl = this.getGL();\n\n let value;\n let textureSlot = 1;\n this.uniforms_.forEach(function (uniform) {\n value =\n typeof uniform.value === 'function'\n ? uniform.value(frameState)\n : uniform.value;\n\n // apply value based on type\n if (value instanceof HTMLCanvasElement || value instanceof ImageData) {\n // create a texture & put data\n if (!uniform.texture) {\n uniform.texture = gl.createTexture();\n }\n gl.activeTexture(gl[`TEXTURE${textureSlot}`]);\n gl.bindTexture(gl.TEXTURE_2D, uniform.texture);\n gl.texParameteri(gl.TEXTURE_2D, gl.TEXTURE_MIN_FILTER, gl.LINEAR);\n gl.texParameteri(gl.TEXTURE_2D, gl.TEXTURE_WRAP_S, gl.CLAMP_TO_EDGE);\n gl.texParameteri(gl.TEXTURE_2D, gl.TEXTURE_WRAP_T, gl.CLAMP_TO_EDGE);\n\n if (value instanceof ImageData) {\n gl.texImage2D(\n gl.TEXTURE_2D,\n 0,\n gl.RGBA,\n gl.RGBA,\n value.width,\n value.height,\n 0,\n gl.UNSIGNED_BYTE,\n new Uint8Array(value.data)\n );\n } else {\n gl.texImage2D(\n gl.TEXTURE_2D,\n 0,\n gl.RGBA,\n gl.RGBA,\n gl.UNSIGNED_BYTE,\n value\n );\n }\n\n // fill texture slots\n gl.uniform1i(uniform.location, textureSlot++);\n } else if (Array.isArray(value)) {\n switch (value.length) {\n case 2:\n gl.uniform2f(uniform.location, value[0], value[1]);\n return;\n case 3:\n gl.uniform3f(uniform.location, value[0], value[1], value[2]);\n return;\n case 4:\n gl.uniform4f(\n uniform.location,\n value[0],\n value[1],\n value[2],\n value[3]\n );\n return;\n default:\n return;\n }\n } else if (typeof value === 'number') {\n gl.uniform1f(uniform.location, value);\n }\n });\n }\n}\n\nexport default WebGLPostProcessingPass;\n","/**\n * @module ol/vec/mat4\n */\n\n/**\n * @return {Array} \"4x4 matrix representing a 3D identity transform.\"\n */\nexport function create() {\n return [1, 0, 0, 0, 0, 1, 0, 0, 0, 0, 1, 0, 0, 0, 0, 1];\n}\n\n/**\n * @param {Array} mat4 Flattened 4x4 matrix receiving the result.\n * @param {import(\"../transform.js\").Transform} transform Transformation matrix.\n * @return {Array} \"2D transformation matrix as flattened 4x4 matrix.\"\n */\nexport function fromTransform(mat4, transform) {\n mat4[0] = transform[0];\n mat4[1] = transform[1];\n mat4[4] = transform[2];\n mat4[5] = transform[3];\n mat4[12] = transform[4];\n mat4[13] = transform[5];\n return mat4;\n}\n","/**\n * @module ol/webgl/Helper\n */\nimport ContextEventType from '../webgl/ContextEventType.js';\nimport Disposable from '../Disposable.js';\nimport WebGLPostProcessingPass from './PostProcessingPass.js';\nimport {\n FLOAT,\n UNSIGNED_BYTE,\n UNSIGNED_INT,\n UNSIGNED_SHORT,\n getContext,\n} from '../webgl.js';\nimport {clear} from '../obj.js';\nimport {\n compose as composeTransform,\n create as createTransform,\n reset as resetTransform,\n rotate as rotateTransform,\n scale as scaleTransform,\n} from '../transform.js';\nimport {create, fromTransform} from '../vec/mat4.js';\nimport {getUid} from '../util.js';\n\n/**\n * @typedef {Object} BufferCacheEntry\n * @property {import(\"./Buffer.js\").default} buffer Buffer.\n * @property {WebGLBuffer} webGlBuffer WebGlBuffer.\n */\n\n/**\n * Shader types, either `FRAGMENT_SHADER` or `VERTEX_SHADER`.\n * @enum {number}\n */\nexport const ShaderType = {\n FRAGMENT_SHADER: 0x8b30,\n VERTEX_SHADER: 0x8b31,\n};\n\n/**\n * Names of uniforms made available to all shaders.\n * Please note: changing these *will* break custom shaders!\n * @enum {string}\n */\nexport const DefaultUniform = {\n PROJECTION_MATRIX: 'u_projectionMatrix',\n OFFSET_SCALE_MATRIX: 'u_offsetScaleMatrix',\n OFFSET_ROTATION_MATRIX: 'u_offsetRotateMatrix',\n TIME: 'u_time',\n ZOOM: 'u_zoom',\n RESOLUTION: 'u_resolution',\n SIZE_PX: 'u_sizePx',\n PIXEL_RATIO: 'u_pixelRatio',\n};\n\n/**\n * Attribute types, either `UNSIGNED_BYTE`, `UNSIGNED_SHORT`, `UNSIGNED_INT` or `FLOAT`\n * Note: an attribute stored in a `Float32Array` should be of type `FLOAT`.\n * @enum {number}\n */\nexport const AttributeType = {\n UNSIGNED_BYTE: UNSIGNED_BYTE,\n UNSIGNED_SHORT: UNSIGNED_SHORT,\n UNSIGNED_INT: UNSIGNED_INT,\n FLOAT: FLOAT,\n};\n\n/**\n * Description of an attribute in a buffer\n * @typedef {Object} AttributeDescription\n * @property {string} name Attribute name to use in shaders\n * @property {number} size Number of components per attributes\n * @property {AttributeType} [type] Attribute type, i.e. number of bytes used to store the value. This is\n * determined by the class of typed array which the buffer uses (eg. `Float32Array` for a `FLOAT` attribute).\n * Default is `FLOAT`.\n */\n\n/**\n * @typedef {number|Array|HTMLCanvasElement|HTMLImageElement|ImageData|import(\"../transform\").Transform} UniformLiteralValue\n */\n\n/**\n * Uniform value can be a number, array of numbers (2 to 4), canvas element or a callback returning\n * one of the previous types.\n * @typedef {UniformLiteralValue|function(import(\"../Map.js\").FrameState):UniformLiteralValue} UniformValue\n */\n\n/**\n * @typedef {Object} PostProcessesOptions\n * @property {number} [scaleRatio] Scale ratio; if < 1, the post process will render to a texture smaller than\n * the main canvas which will then be sampled up (useful for saving resource on blur steps).\n * @property {string} [vertexShader] Vertex shader source\n * @property {string} [fragmentShader] Fragment shader source\n * @property {Object} [uniforms] Uniform definitions for the post process step\n */\n\n/**\n * @typedef {Object} Options\n * @property {Object} [uniforms] Uniform definitions; property names must match the uniform\n * names in the provided or default shaders.\n * @property {Array} [postProcesses] Post-processes definitions\n * @property {string} [canvasCacheKey] The cache key for the canvas.\n */\n\n/**\n * @typedef {Object} UniformInternalDescription\n * @property {string} name Name\n * @property {UniformValue} [value] Value\n * @property {UniformValue} [prevValue] The previous value.\n * @property {WebGLTexture} [texture] Texture\n * @private\n */\n\n/**\n * @typedef {Object} CanvasCacheItem\n * @property {HTMLCanvasElement} canvas Canvas element.\n * @property {number} users The count of users of this canvas.\n */\n\n/**\n * @type {Object}\n */\nconst canvasCache = {};\n\n/**\n * @param {string} key The cache key for the canvas.\n * @return {string} The shared cache key.\n */\nfunction getSharedCanvasCacheKey(key) {\n return 'shared/' + key;\n}\n\nlet uniqueCanvasCacheKeyCount = 0;\n\n/**\n * @return {string} The unique cache key.\n */\nfunction getUniqueCanvasCacheKey() {\n const key = 'unique/' + uniqueCanvasCacheKeyCount;\n uniqueCanvasCacheKeyCount += 1;\n return key;\n}\n\n/**\n * @param {string} key The cache key for the canvas.\n * @return {HTMLCanvasElement} The canvas.\n */\nfunction getCanvas(key) {\n let cacheItem = canvasCache[key];\n if (!cacheItem) {\n const canvas = document.createElement('canvas');\n canvas.style.position = 'absolute';\n canvas.style.left = '0';\n cacheItem = {users: 0, canvas};\n canvasCache[key] = cacheItem;\n }\n\n cacheItem.users += 1;\n return cacheItem.canvas;\n}\n\n/**\n * @param {string} key The cache key for the canvas.\n */\nfunction releaseCanvas(key) {\n const cacheItem = canvasCache[key];\n if (!cacheItem) {\n return;\n }\n\n cacheItem.users -= 1;\n if (cacheItem.users > 0) {\n return;\n }\n\n const canvas = cacheItem.canvas;\n const gl = getContext(canvas);\n const extension = gl.getExtension('WEBGL_lose_context');\n if (extension) {\n extension.loseContext();\n }\n\n delete canvasCache[key];\n}\n\n/**\n * @classdesc\n * This class is intended to provide low-level functions related to WebGL rendering, so that accessing\n * directly the WebGL API should not be required anymore.\n *\n * Several operations are handled by the `WebGLHelper` class:\n *\n * ### Define custom shaders and uniforms\n *\n * *Shaders* are low-level programs executed on the GPU and written in GLSL. There are two types of shaders:\n *\n * Vertex shaders are used to manipulate the position and attribute of *vertices* of rendered primitives (ie. corners of a square).\n * Outputs are:\n *\n * * `gl_Position`: position of the vertex in screen space\n *\n * * Varyings usually prefixed with `v_` are passed on to the fragment shader\n *\n * Fragment shaders are used to control the actual color of the pixels drawn on screen. Their only output is `gl_FragColor`.\n *\n * Both shaders can take *uniforms* or *attributes* as input. Attributes are explained later. Uniforms are common, read-only values that\n * can be changed at every frame and can be of type float, arrays of float or images.\n *\n * Shaders must be compiled and assembled into a program like so:\n * ```js\n * // here we simply create two shaders and assemble them in a program which is then used\n * // for subsequent rendering calls; note how a frameState is required to set up a program,\n * // as several default uniforms are computed from it (projection matrix, zoom level, etc.)\n * const vertexShader = new WebGLVertex(VERTEX_SHADER);\n * const fragmentShader = new WebGLFragment(FRAGMENT_SHADER);\n * const program = this.context.getProgram(fragmentShader, vertexShader);\n * helper.useProgram(this.program, frameState);\n * ```\n *\n * Uniforms are defined using the `uniforms` option and can either be explicit values or callbacks taking the frame state as argument.\n * You can also change their value along the way like so:\n * ```js\n * helper.setUniformFloatValue('u_value', valueAsNumber);\n * ```\n *\n * ### Defining post processing passes\n *\n * *Post processing* describes the act of rendering primitives to a texture, and then rendering this texture to the final canvas\n * while applying special effects in screen space.\n * Typical uses are: blurring, color manipulation, depth of field, filtering...\n *\n * The `WebGLHelper` class offers the possibility to define post processes at creation time using the `postProcesses` option.\n * A post process step accepts the following options:\n *\n * * `fragmentShader` and `vertexShader`: text literals in GLSL language that will be compiled and used in the post processing step.\n * * `uniforms`: uniforms can be defined for the post processing steps just like for the main render.\n * * `scaleRatio`: allows using an intermediate texture smaller or higher than the final canvas in the post processing step.\n * This is typically used in blur steps to reduce the performance overhead by using an already downsampled texture as input.\n *\n * The {@link module:ol/webgl/PostProcessingPass~WebGLPostProcessingPass} class is used internally, refer to its documentation for more info.\n *\n * ### Binding WebGL buffers and flushing data into them\n *\n * Data that must be passed to the GPU has to be transferred using {@link module:ol/webgl/Buffer~WebGLArrayBuffer} objects.\n * A buffer has to be created only once, but must be bound every time the buffer content will be used for rendering.\n * This is done using {@link bindBuffer}.\n * When the buffer's array content has changed, the new data has to be flushed to the GPU memory; this is done using\n * {@link flushBufferData}. Note: this operation is expensive and should be done as infrequently as possible.\n *\n * When binding an array buffer, a `target` parameter must be given: it should be either {@link module:ol/webgl.ARRAY_BUFFER}\n * (if the buffer contains vertices data) or {@link module:ol/webgl.ELEMENT_ARRAY_BUFFER} (if the buffer contains indices data).\n *\n * Examples below:\n * ```js\n * // at initialization phase\n * const verticesBuffer = new WebGLArrayBuffer([], DYNAMIC_DRAW);\n * const indicesBuffer = new WebGLArrayBuffer([], DYNAMIC_DRAW);\n *\n * // when array values have changed\n * helper.flushBufferData(ARRAY_BUFFER, this.verticesBuffer);\n * helper.flushBufferData(ELEMENT_ARRAY_BUFFER, this.indicesBuffer);\n *\n * // at rendering phase\n * helper.bindBuffer(ARRAY_BUFFER, this.verticesBuffer);\n * helper.bindBuffer(ELEMENT_ARRAY_BUFFER, this.indicesBuffer);\n * ```\n *\n * ### Specifying attributes\n *\n * The GPU only receives the data as arrays of numbers. These numbers must be handled differently depending on what it describes (position, texture coordinate...).\n * Attributes are used to specify these uses. Specify the attribute names with\n * {@link module:ol/webgl/Helper~WebGLHelper#enableAttributes} (see code snippet below).\n *\n * Please note that you will have to specify the type and offset of the attributes in the data array. You can refer to the documentation of [WebGLRenderingContext.vertexAttribPointer](https://developer.mozilla.org/en-US/docs/Web/API/WebGLRenderingContext/vertexAttribPointer) for more explanation.\n * ```js\n * // here we indicate that the data array has the following structure:\n * // [posX, posY, offsetX, offsetY, texCoordU, texCoordV, posX, posY, ...]\n * helper.enableAttributes([\n * {\n * name: 'a_position',\n * size: 2\n * },\n * {\n * name: 'a_offset',\n * size: 2\n * },\n * {\n * name: 'a_texCoord',\n * size: 2\n * }\n * ])\n * ```\n *\n * ### Rendering primitives\n *\n * Once all the steps above have been achieved, rendering primitives to the screen is done using {@link prepareDraw}, {@link drawElements} and {@link finalizeDraw}.\n * ```js\n * // frame preparation step\n * helper.prepareDraw(frameState);\n *\n * // call this for every data array that has to be rendered on screen\n * helper.drawElements(0, this.indicesBuffer.getArray().length);\n *\n * // finalize the rendering by applying post processes\n * helper.finalizeDraw(frameState);\n * ```\n *\n * For an example usage of this class, refer to {@link module:ol/renderer/webgl/PointsLayer~WebGLPointsLayerRenderer}.\n */\nclass WebGLHelper extends Disposable {\n /**\n * @param {Options} [options] Options.\n */\n constructor(options) {\n super();\n options = options || {};\n\n /** @private */\n this.boundHandleWebGLContextLost_ = this.handleWebGLContextLost.bind(this);\n\n /** @private */\n this.boundHandleWebGLContextRestored_ =\n this.handleWebGLContextRestored.bind(this);\n\n /**\n * @private\n * @type {string}\n */\n this.canvasCacheKey_ = options.canvasCacheKey\n ? getSharedCanvasCacheKey(options.canvasCacheKey)\n : getUniqueCanvasCacheKey();\n\n /**\n * @private\n * @type {HTMLCanvasElement}\n */\n this.canvas_ = getCanvas(this.canvasCacheKey_);\n\n /**\n * @private\n * @type {WebGLRenderingContext}\n */\n this.gl_ = getContext(this.canvas_);\n\n /**\n * @private\n * @type {!Object}\n */\n this.bufferCache_ = {};\n\n /**\n * @private\n * @type {Object}\n */\n this.extensionCache_ = {};\n\n /**\n * @private\n * @type {WebGLProgram}\n */\n this.currentProgram_ = null;\n\n this.canvas_.addEventListener(\n ContextEventType.LOST,\n this.boundHandleWebGLContextLost_\n );\n this.canvas_.addEventListener(\n ContextEventType.RESTORED,\n this.boundHandleWebGLContextRestored_\n );\n\n /**\n * @private\n * @type {import(\"../transform.js\").Transform}\n */\n this.offsetRotateMatrix_ = createTransform();\n\n /**\n * @private\n * @type {import(\"../transform.js\").Transform}\n */\n this.offsetScaleMatrix_ = createTransform();\n\n /**\n * @private\n * @type {Array}\n */\n this.tmpMat4_ = create();\n\n /**\n * @private\n * @type {Object}\n */\n this.uniformLocations_ = {};\n\n /**\n * @private\n * @type {Object}\n */\n this.attribLocations_ = {};\n\n /**\n * Holds info about custom uniforms used in the post processing pass.\n * If the uniform is a texture, the WebGL Texture object will be stored here.\n * @type {Array}\n * @private\n */\n this.uniforms_ = [];\n if (options.uniforms) {\n this.setUniforms(options.uniforms);\n }\n\n const gl = this.getGL();\n\n /**\n * An array of PostProcessingPass objects is kept in this variable, built from the steps provided in the\n * options. If no post process was given, a default one is used (so as not to have to make an exception to\n * the frame buffer logic).\n * @type {Array}\n * @private\n */\n this.postProcessPasses_ = options.postProcesses\n ? options.postProcesses.map(function (options) {\n return new WebGLPostProcessingPass({\n webGlContext: gl,\n scaleRatio: options.scaleRatio,\n vertexShader: options.vertexShader,\n fragmentShader: options.fragmentShader,\n uniforms: options.uniforms,\n });\n })\n : [new WebGLPostProcessingPass({webGlContext: gl})];\n\n /**\n * @type {string|null}\n * @private\n */\n this.shaderCompileErrors_ = null;\n\n /**\n * @type {number}\n * @private\n */\n this.startTime_ = Date.now();\n }\n\n /**\n * @param {Object} uniforms Uniform definitions.\n */\n setUniforms(uniforms) {\n this.uniforms_ = [];\n for (const name in uniforms) {\n this.uniforms_.push({\n name: name,\n value: uniforms[name],\n });\n }\n this.uniformLocations_ = {};\n }\n\n /**\n * @param {string} canvasCacheKey The canvas cache key.\n * @return {boolean} The provided key matches the one this helper was constructed with.\n */\n canvasCacheKeyMatches(canvasCacheKey) {\n return this.canvasCacheKey_ === getSharedCanvasCacheKey(canvasCacheKey);\n }\n\n /**\n * Get a WebGL extension. If the extension is not supported, null is returned.\n * Extensions are cached after they are enabled for the first time.\n * @param {string} name The extension name.\n * @return {Object|null} The extension or null if not supported.\n */\n getExtension(name) {\n if (name in this.extensionCache_) {\n return this.extensionCache_[name];\n }\n const extension = this.gl_.getExtension(name);\n this.extensionCache_[name] = extension;\n return extension;\n }\n\n /**\n * Just bind the buffer if it's in the cache. Otherwise create\n * the WebGL buffer, bind it, populate it, and add an entry to\n * the cache.\n * @param {import(\"./Buffer\").default} buffer Buffer.\n */\n bindBuffer(buffer) {\n const gl = this.getGL();\n const bufferKey = getUid(buffer);\n let bufferCache = this.bufferCache_[bufferKey];\n if (!bufferCache) {\n const webGlBuffer = gl.createBuffer();\n bufferCache = {\n buffer: buffer,\n webGlBuffer: webGlBuffer,\n };\n this.bufferCache_[bufferKey] = bufferCache;\n }\n gl.bindBuffer(buffer.getType(), bufferCache.webGlBuffer);\n }\n\n /**\n * Update the data contained in the buffer array; this is required for the\n * new data to be rendered\n * @param {import(\"./Buffer\").default} buffer Buffer.\n */\n flushBufferData(buffer) {\n const gl = this.getGL();\n this.bindBuffer(buffer);\n gl.bufferData(buffer.getType(), buffer.getArray(), buffer.getUsage());\n }\n\n /**\n * @param {import(\"./Buffer.js\").default} buf Buffer.\n */\n deleteBuffer(buf) {\n const gl = this.getGL();\n const bufferKey = getUid(buf);\n const bufferCacheEntry = this.bufferCache_[bufferKey];\n if (bufferCacheEntry && !gl.isContextLost()) {\n gl.deleteBuffer(bufferCacheEntry.webGlBuffer);\n }\n delete this.bufferCache_[bufferKey];\n }\n\n /**\n * Clean up.\n */\n disposeInternal() {\n this.canvas_.removeEventListener(\n ContextEventType.LOST,\n this.boundHandleWebGLContextLost_\n );\n this.canvas_.removeEventListener(\n ContextEventType.RESTORED,\n this.boundHandleWebGLContextRestored_\n );\n\n releaseCanvas(this.canvasCacheKey_);\n\n delete this.gl_;\n delete this.canvas_;\n }\n\n /**\n * Clear the buffer & set the viewport to draw.\n * Post process passes will be initialized here, the first one being bound as a render target for\n * subsequent draw calls.\n * @param {import(\"../Map.js\").FrameState} frameState current frame state\n * @param {boolean} [disableAlphaBlend] If true, no alpha blending will happen.\n */\n prepareDraw(frameState, disableAlphaBlend) {\n const gl = this.getGL();\n const canvas = this.getCanvas();\n const size = frameState.size;\n const pixelRatio = frameState.pixelRatio;\n\n canvas.width = size[0] * pixelRatio;\n canvas.height = size[1] * pixelRatio;\n canvas.style.width = size[0] + 'px';\n canvas.style.height = size[1] + 'px';\n\n // loop backwards in post processes list\n for (let i = this.postProcessPasses_.length - 1; i >= 0; i--) {\n this.postProcessPasses_[i].init(frameState);\n }\n\n gl.bindTexture(gl.TEXTURE_2D, null);\n\n gl.clearColor(0.0, 0.0, 0.0, 0.0);\n gl.clear(gl.COLOR_BUFFER_BIT);\n\n gl.enable(gl.BLEND);\n gl.blendFunc(gl.ONE, disableAlphaBlend ? gl.ZERO : gl.ONE_MINUS_SRC_ALPHA);\n }\n\n /**\n * Clear the render target & bind it for future draw operations.\n * This is similar to `prepareDraw`, only post processes will not be applied.\n * Note: the whole viewport will be drawn to the render target, regardless of its size.\n * @param {import(\"../Map.js\").FrameState} frameState current frame state\n * @param {import(\"./RenderTarget.js\").default} renderTarget Render target to draw to\n * @param {boolean} [disableAlphaBlend] If true, no alpha blending will happen.\n */\n prepareDrawToRenderTarget(frameState, renderTarget, disableAlphaBlend) {\n const gl = this.getGL();\n const size = renderTarget.getSize();\n\n gl.bindFramebuffer(gl.FRAMEBUFFER, renderTarget.getFramebuffer());\n gl.viewport(0, 0, size[0], size[1]);\n gl.bindTexture(gl.TEXTURE_2D, renderTarget.getTexture());\n gl.clearColor(0.0, 0.0, 0.0, 0.0);\n gl.clear(gl.COLOR_BUFFER_BIT);\n gl.enable(gl.BLEND);\n gl.blendFunc(gl.ONE, disableAlphaBlend ? gl.ZERO : gl.ONE_MINUS_SRC_ALPHA);\n }\n\n /**\n * Execute a draw call based on the currently bound program, texture, buffers, attributes.\n * @param {number} start Start index.\n * @param {number} end End index.\n */\n drawElements(start, end) {\n const gl = this.getGL();\n this.getExtension('OES_element_index_uint');\n\n const elementType = gl.UNSIGNED_INT;\n const elementSize = 4;\n\n const numItems = end - start;\n const offsetInBytes = start * elementSize;\n gl.drawElements(gl.TRIANGLES, numItems, elementType, offsetInBytes);\n }\n\n /**\n * Apply the successive post process passes which will eventually render to the actual canvas.\n * @param {import(\"../Map.js\").FrameState} frameState current frame state\n * @param {function(WebGLRenderingContext, import(\"../Map.js\").FrameState):void} [preCompose] Called before composing.\n * @param {function(WebGLRenderingContext, import(\"../Map.js\").FrameState):void} [postCompose] Called before composing.\n */\n finalizeDraw(frameState, preCompose, postCompose) {\n // apply post processes using the next one as target\n for (let i = 0, ii = this.postProcessPasses_.length; i < ii; i++) {\n if (i === ii - 1) {\n this.postProcessPasses_[i].apply(\n frameState,\n null,\n preCompose,\n postCompose\n );\n } else {\n this.postProcessPasses_[i].apply(\n frameState,\n this.postProcessPasses_[i + 1]\n );\n }\n }\n }\n\n /**\n * @return {HTMLCanvasElement} Canvas.\n */\n getCanvas() {\n return this.canvas_;\n }\n\n /**\n * Get the WebGL rendering context\n * @return {WebGLRenderingContext} The rendering context.\n */\n getGL() {\n return this.gl_;\n }\n\n /**\n * Sets the default matrix uniforms for a given frame state. This is called internally in `prepareDraw`.\n * @param {import(\"../Map.js\").FrameState} frameState Frame state.\n */\n applyFrameState(frameState) {\n const size = frameState.size;\n const rotation = frameState.viewState.rotation;\n const pixelRatio = frameState.pixelRatio;\n\n const offsetScaleMatrix = resetTransform(this.offsetScaleMatrix_);\n scaleTransform(offsetScaleMatrix, 2 / size[0], 2 / size[1]);\n\n const offsetRotateMatrix = resetTransform(this.offsetRotateMatrix_);\n if (rotation !== 0) {\n rotateTransform(offsetRotateMatrix, -rotation);\n }\n\n this.setUniformMatrixValue(\n DefaultUniform.OFFSET_SCALE_MATRIX,\n fromTransform(this.tmpMat4_, offsetScaleMatrix)\n );\n this.setUniformMatrixValue(\n DefaultUniform.OFFSET_ROTATION_MATRIX,\n fromTransform(this.tmpMat4_, offsetRotateMatrix)\n );\n\n this.setUniformFloatValue(\n DefaultUniform.TIME,\n (Date.now() - this.startTime_) * 0.001\n );\n this.setUniformFloatValue(DefaultUniform.ZOOM, frameState.viewState.zoom);\n this.setUniformFloatValue(\n DefaultUniform.RESOLUTION,\n frameState.viewState.resolution\n );\n this.setUniformFloatValue(DefaultUniform.PIXEL_RATIO, pixelRatio);\n this.setUniformFloatVec2(DefaultUniform.SIZE_PX, [size[0], size[1]]);\n }\n\n /**\n * Sets the custom uniforms based on what was given in the constructor. This is called internally in `prepareDraw`.\n * @param {import(\"../Map.js\").FrameState} frameState Frame state.\n */\n applyUniforms(frameState) {\n const gl = this.getGL();\n\n let value;\n let textureSlot = 0;\n this.uniforms_.forEach((uniform) => {\n value =\n typeof uniform.value === 'function'\n ? uniform.value(frameState)\n : uniform.value;\n\n // apply value based on type\n if (\n value instanceof HTMLCanvasElement ||\n value instanceof HTMLImageElement ||\n value instanceof ImageData\n ) {\n // create a texture & put data\n if (!uniform.texture) {\n uniform.prevValue = undefined;\n uniform.texture = gl.createTexture();\n }\n gl.activeTexture(gl[`TEXTURE${textureSlot}`]);\n gl.bindTexture(gl.TEXTURE_2D, uniform.texture);\n gl.texParameteri(gl.TEXTURE_2D, gl.TEXTURE_MIN_FILTER, gl.LINEAR);\n gl.texParameteri(gl.TEXTURE_2D, gl.TEXTURE_WRAP_S, gl.CLAMP_TO_EDGE);\n gl.texParameteri(gl.TEXTURE_2D, gl.TEXTURE_WRAP_T, gl.CLAMP_TO_EDGE);\n\n const imageReady =\n !(value instanceof HTMLImageElement) ||\n /** @type {HTMLImageElement} */ (value).complete;\n if (imageReady && uniform.prevValue !== value) {\n uniform.prevValue = value;\n gl.texImage2D(\n gl.TEXTURE_2D,\n 0,\n gl.RGBA,\n gl.RGBA,\n gl.UNSIGNED_BYTE,\n value\n );\n }\n\n // fill texture slots by increasing index\n gl.uniform1i(this.getUniformLocation(uniform.name), textureSlot++);\n } else if (Array.isArray(value) && value.length === 6) {\n this.setUniformMatrixValue(\n uniform.name,\n fromTransform(this.tmpMat4_, value)\n );\n } else if (Array.isArray(value) && value.length <= 4) {\n switch (value.length) {\n case 2:\n gl.uniform2f(\n this.getUniformLocation(uniform.name),\n value[0],\n value[1]\n );\n return;\n case 3:\n gl.uniform3f(\n this.getUniformLocation(uniform.name),\n value[0],\n value[1],\n value[2]\n );\n return;\n case 4:\n gl.uniform4f(\n this.getUniformLocation(uniform.name),\n value[0],\n value[1],\n value[2],\n value[3]\n );\n return;\n default:\n return;\n }\n } else if (typeof value === 'number') {\n gl.uniform1f(this.getUniformLocation(uniform.name), value);\n }\n });\n }\n\n /**\n * Set up a program for use. The program will be set as the current one. Then, the uniforms used\n * in the program will be set based on the current frame state and the helper configuration.\n * @param {WebGLProgram} program Program.\n * @param {import(\"../Map.js\").FrameState} frameState Frame state.\n */\n useProgram(program, frameState) {\n const gl = this.getGL();\n gl.useProgram(program);\n this.currentProgram_ = program;\n this.uniformLocations_ = {};\n this.attribLocations_ = {};\n this.applyFrameState(frameState);\n this.applyUniforms(frameState);\n }\n\n /**\n * Will attempt to compile a vertex or fragment shader based on source\n * On error, the shader will be returned but\n * `gl.getShaderParameter(shader, gl.COMPILE_STATUS)` will return `true`\n * Use `gl.getShaderInfoLog(shader)` to have details\n * @param {string} source Shader source\n * @param {ShaderType} type VERTEX_SHADER or FRAGMENT_SHADER\n * @return {WebGLShader} Shader object\n */\n compileShader(source, type) {\n const gl = this.getGL();\n const shader = gl.createShader(type);\n gl.shaderSource(shader, source);\n gl.compileShader(shader);\n return shader;\n }\n\n /**\n * Create a program for a vertex and fragment shader. Throws if shader compilation fails.\n * @param {string} fragmentShaderSource Fragment shader source.\n * @param {string} vertexShaderSource Vertex shader source.\n * @return {WebGLProgram} Program\n */\n getProgram(fragmentShaderSource, vertexShaderSource) {\n const gl = this.getGL();\n\n const fragmentShader = this.compileShader(\n fragmentShaderSource,\n gl.FRAGMENT_SHADER\n );\n\n const vertexShader = this.compileShader(\n vertexShaderSource,\n gl.VERTEX_SHADER\n );\n\n const program = gl.createProgram();\n gl.attachShader(program, fragmentShader);\n gl.attachShader(program, vertexShader);\n gl.linkProgram(program);\n\n if (!gl.getShaderParameter(fragmentShader, gl.COMPILE_STATUS)) {\n const message = `Fragment shader compilation failed: ${gl.getShaderInfoLog(\n fragmentShader\n )}`;\n throw new Error(message);\n }\n gl.deleteShader(fragmentShader);\n\n if (!gl.getShaderParameter(vertexShader, gl.COMPILE_STATUS)) {\n const message = `Vertex shader compilation failed: ${gl.getShaderInfoLog(\n vertexShader\n )}`;\n throw new Error(message);\n }\n gl.deleteShader(vertexShader);\n\n if (!gl.getProgramParameter(program, gl.LINK_STATUS)) {\n const message = `GL program linking failed: ${gl.getShaderInfoLog(\n vertexShader\n )}`;\n throw new Error(message);\n }\n\n return program;\n }\n\n /**\n * Will get the location from the shader or the cache\n * @param {string} name Uniform name\n * @return {WebGLUniformLocation} uniformLocation\n */\n getUniformLocation(name) {\n if (this.uniformLocations_[name] === undefined) {\n this.uniformLocations_[name] = this.getGL().getUniformLocation(\n this.currentProgram_,\n name\n );\n }\n return this.uniformLocations_[name];\n }\n\n /**\n * Will get the location from the shader or the cache\n * @param {string} name Attribute name\n * @return {number} attribLocation\n */\n getAttributeLocation(name) {\n if (this.attribLocations_[name] === undefined) {\n this.attribLocations_[name] = this.getGL().getAttribLocation(\n this.currentProgram_,\n name\n );\n }\n return this.attribLocations_[name];\n }\n\n /**\n * Modifies the given transform to apply the rotation/translation/scaling of the given frame state.\n * The resulting transform can be used to convert world space coordinates to view coordinates.\n * @param {import(\"../Map.js\").FrameState} frameState Frame state.\n * @param {import(\"../transform\").Transform} transform Transform to update.\n * @return {import(\"../transform\").Transform} The updated transform object.\n */\n makeProjectionTransform(frameState, transform) {\n const size = frameState.size;\n const rotation = frameState.viewState.rotation;\n const resolution = frameState.viewState.resolution;\n const center = frameState.viewState.center;\n\n resetTransform(transform);\n composeTransform(\n transform,\n 0,\n 0,\n 2 / (resolution * size[0]),\n 2 / (resolution * size[1]),\n -rotation,\n -center[0],\n -center[1]\n );\n return transform;\n }\n\n /**\n * Give a value for a standard float uniform\n * @param {string} uniform Uniform name\n * @param {number} value Value\n */\n setUniformFloatValue(uniform, value) {\n this.getGL().uniform1f(this.getUniformLocation(uniform), value);\n }\n\n /**\n * Give a value for a vec2 uniform\n * @param {string} uniform Uniform name\n * @param {Array} value Array of length 4.\n */\n setUniformFloatVec2(uniform, value) {\n this.getGL().uniform2fv(this.getUniformLocation(uniform), value);\n }\n\n /**\n * Give a value for a vec4 uniform\n * @param {string} uniform Uniform name\n * @param {Array} value Array of length 4.\n */\n setUniformFloatVec4(uniform, value) {\n this.getGL().uniform4fv(this.getUniformLocation(uniform), value);\n }\n\n /**\n * Give a value for a standard matrix4 uniform\n * @param {string} uniform Uniform name\n * @param {Array} value Matrix value\n */\n setUniformMatrixValue(uniform, value) {\n this.getGL().uniformMatrix4fv(\n this.getUniformLocation(uniform),\n false,\n value\n );\n }\n\n /**\n * Will set the currently bound buffer to an attribute of the shader program. Used by `#enableAttributes`\n * internally.\n * @param {string} attribName Attribute name\n * @param {number} size Number of components per attributes\n * @param {number} type UNSIGNED_INT, UNSIGNED_BYTE, UNSIGNED_SHORT or FLOAT\n * @param {number} stride Stride in bytes (0 means attribs are packed)\n * @param {number} offset Offset in bytes\n * @private\n */\n enableAttributeArray_(attribName, size, type, stride, offset) {\n const location = this.getAttributeLocation(attribName);\n // the attribute has not been found in the shaders; do not enable it\n if (location < 0) {\n return;\n }\n this.getGL().enableVertexAttribArray(location);\n this.getGL().vertexAttribPointer(\n location,\n size,\n type,\n false,\n stride,\n offset\n );\n }\n\n /**\n * Will enable the following attributes to be read from the currently bound buffer,\n * i.e. tell the GPU where to read the different attributes in the buffer. An error in the\n * size/type/order of attributes will most likely break the rendering and throw a WebGL exception.\n * @param {Array} attributes Ordered list of attributes to read from the buffer\n */\n enableAttributes(attributes) {\n const stride = computeAttributesStride(attributes);\n let offset = 0;\n for (let i = 0; i < attributes.length; i++) {\n const attr = attributes[i];\n this.enableAttributeArray_(\n attr.name,\n attr.size,\n attr.type || FLOAT,\n stride,\n offset\n );\n offset += attr.size * getByteSizeFromType(attr.type);\n }\n }\n\n /**\n * WebGL context was lost\n * @private\n */\n handleWebGLContextLost() {\n clear(this.bufferCache_);\n this.currentProgram_ = null;\n }\n\n /**\n * WebGL context was restored\n * @private\n */\n handleWebGLContextRestored() {}\n\n /**\n * Will create or reuse a given webgl texture and apply the given size. If no image data\n * specified, the texture will be empty, otherwise image data will be used and the `size`\n * parameter will be ignored.\n * Note: wrap parameters are set to clamp to edge, min filter is set to linear.\n * @param {Array} size Expected size of the texture\n * @param {ImageData|HTMLImageElement|HTMLCanvasElement} [data] Image data/object to bind to the texture\n * @param {WebGLTexture} [texture] Existing texture to reuse\n * @return {WebGLTexture} The generated texture\n */\n createTexture(size, data, texture) {\n const gl = this.getGL();\n texture = texture || gl.createTexture();\n\n // set params & size\n const level = 0;\n const internalFormat = gl.RGBA;\n const border = 0;\n const format = gl.RGBA;\n const type = gl.UNSIGNED_BYTE;\n gl.bindTexture(gl.TEXTURE_2D, texture);\n if (data) {\n gl.texImage2D(gl.TEXTURE_2D, level, internalFormat, format, type, data);\n } else {\n gl.texImage2D(\n gl.TEXTURE_2D,\n level,\n internalFormat,\n size[0],\n size[1],\n border,\n format,\n type,\n null\n );\n }\n gl.texParameteri(gl.TEXTURE_2D, gl.TEXTURE_MIN_FILTER, gl.LINEAR);\n gl.texParameteri(gl.TEXTURE_2D, gl.TEXTURE_WRAP_S, gl.CLAMP_TO_EDGE);\n gl.texParameteri(gl.TEXTURE_2D, gl.TEXTURE_WRAP_T, gl.CLAMP_TO_EDGE);\n\n return texture;\n }\n}\n\n/**\n * Compute a stride in bytes based on a list of attributes\n * @param {Array} attributes Ordered list of attributes\n * @return {number} Stride, ie amount of values for each vertex in the vertex buffer\n */\nexport function computeAttributesStride(attributes) {\n let stride = 0;\n for (let i = 0; i < attributes.length; i++) {\n const attr = attributes[i];\n stride += attr.size * getByteSizeFromType(attr.type);\n }\n return stride;\n}\n\n/**\n * Computes the size in byte of an attribute type.\n * @param {AttributeType} type Attribute type\n * @return {number} The size in bytes\n */\nfunction getByteSizeFromType(type) {\n switch (type) {\n case AttributeType.UNSIGNED_BYTE:\n return Uint8Array.BYTES_PER_ELEMENT;\n case AttributeType.UNSIGNED_SHORT:\n return Uint16Array.BYTES_PER_ELEMENT;\n case AttributeType.UNSIGNED_INT:\n return Uint32Array.BYTES_PER_ELEMENT;\n case AttributeType.FLOAT:\n default:\n return Float32Array.BYTES_PER_ELEMENT;\n }\n}\n\nexport default WebGLHelper;\n","/**\n * @module ol/webgl/PaletteTexture\n */\n\nclass PaletteTexture {\n /**\n * @param {string} name The name of the texture.\n * @param {Uint8Array} data The texture data.\n */\n constructor(name, data) {\n this.name = name;\n this.data = data;\n\n /**\n * @type {WebGLTexture}\n * @private\n */\n this.texture_ = null;\n }\n\n /**\n * @param {WebGLRenderingContext} gl Rendering context.\n * @return {WebGLTexture} The texture.\n */\n getTexture(gl) {\n if (!this.texture_) {\n const texture = gl.createTexture();\n gl.bindTexture(gl.TEXTURE_2D, texture);\n gl.texParameteri(gl.TEXTURE_2D, gl.TEXTURE_WRAP_S, gl.CLAMP_TO_EDGE);\n gl.texParameteri(gl.TEXTURE_2D, gl.TEXTURE_WRAP_T, gl.CLAMP_TO_EDGE);\n gl.texParameteri(gl.TEXTURE_2D, gl.TEXTURE_MIN_FILTER, gl.NEAREST);\n gl.texParameteri(gl.TEXTURE_2D, gl.TEXTURE_MAG_FILTER, gl.NEAREST);\n gl.texImage2D(\n gl.TEXTURE_2D,\n 0,\n gl.RGBA,\n this.data.length / 4,\n 1,\n 0,\n gl.RGBA,\n gl.UNSIGNED_BYTE,\n this.data\n );\n this.texture_ = texture;\n }\n return this.texture_;\n }\n}\n\nexport default PaletteTexture;\n","/**\n * A wrapper class to simplify rendering to a texture instead of the final canvas\n * @module ol/webgl/RenderTarget\n */\nimport {equals} from '../array.js';\n\n// for pixel color reading\nconst tmpArray4 = new Uint8Array(4);\n\n/**\n * @classdesc\n * This class is a wrapper around the association of both a `WebGLTexture` and a `WebGLFramebuffer` instances,\n * simplifying initialization and binding for rendering.\n * @api\n */\nclass WebGLRenderTarget {\n /**\n * @param {import(\"./Helper.js\").default} helper WebGL helper; mandatory.\n * @param {Array} [size] Expected size of the render target texture; note: this can be changed later on.\n */\n constructor(helper, size) {\n /**\n * @private\n * @type {import(\"./Helper.js\").default}\n */\n this.helper_ = helper;\n const gl = helper.getGL();\n\n /**\n * @private\n * @type {WebGLTexture}\n */\n this.texture_ = gl.createTexture();\n\n /**\n * @private\n * @type {WebGLFramebuffer}\n */\n this.framebuffer_ = gl.createFramebuffer();\n\n /**\n * @type {Array}\n * @private\n */\n this.size_ = size || [1, 1];\n\n /**\n * @type {Uint8Array}\n * @private\n */\n this.data_ = new Uint8Array(0);\n\n /**\n * @type {boolean}\n * @private\n */\n this.dataCacheDirty_ = true;\n\n this.updateSize_();\n }\n\n /**\n * Changes the size of the render target texture. Note: will do nothing if the size\n * is already the same.\n * @param {Array} size Expected size of the render target texture\n * @api\n */\n setSize(size) {\n if (equals(size, this.size_)) {\n return;\n }\n this.size_[0] = size[0];\n this.size_[1] = size[1];\n this.updateSize_();\n }\n\n /**\n * Returns the size of the render target texture\n * @return {Array} Size of the render target texture\n * @api\n */\n getSize() {\n return this.size_;\n }\n\n /**\n * This will cause following calls to `#readAll` or `#readPixel` to download the content of the\n * render target into memory, which is an expensive operation.\n * This content will be kept in cache but should be cleared after each new render.\n * @api\n */\n clearCachedData() {\n this.dataCacheDirty_ = true;\n }\n\n /**\n * Returns the full content of the frame buffer as a series of r, g, b, a components\n * in the 0-255 range (unsigned byte).\n * @return {Uint8Array} Integer array of color values\n * @api\n */\n readAll() {\n if (this.dataCacheDirty_) {\n const size = this.size_;\n const gl = this.helper_.getGL();\n\n gl.bindFramebuffer(gl.FRAMEBUFFER, this.framebuffer_);\n gl.readPixels(\n 0,\n 0,\n size[0],\n size[1],\n gl.RGBA,\n gl.UNSIGNED_BYTE,\n this.data_\n );\n this.dataCacheDirty_ = false;\n }\n return this.data_;\n }\n\n /**\n * Reads one pixel of the frame buffer as an array of r, g, b, a components\n * in the 0-255 range (unsigned byte).\n * If x and/or y are outside of existing data, an array filled with 0 is returned.\n * @param {number} x Pixel coordinate\n * @param {number} y Pixel coordinate\n * @return {Uint8Array} Integer array with one color value (4 components)\n * @api\n */\n readPixel(x, y) {\n if (x < 0 || y < 0 || x > this.size_[0] || y >= this.size_[1]) {\n tmpArray4[0] = 0;\n tmpArray4[1] = 0;\n tmpArray4[2] = 0;\n tmpArray4[3] = 0;\n return tmpArray4;\n }\n\n this.readAll();\n const index =\n Math.floor(x) + (this.size_[1] - Math.floor(y) - 1) * this.size_[0];\n tmpArray4[0] = this.data_[index * 4];\n tmpArray4[1] = this.data_[index * 4 + 1];\n tmpArray4[2] = this.data_[index * 4 + 2];\n tmpArray4[3] = this.data_[index * 4 + 3];\n return tmpArray4;\n }\n\n /**\n * @return {WebGLTexture} Texture to render to\n */\n getTexture() {\n return this.texture_;\n }\n\n /**\n * @return {WebGLFramebuffer} Frame buffer of the render target\n */\n getFramebuffer() {\n return this.framebuffer_;\n }\n\n /**\n * @private\n */\n updateSize_() {\n const size = this.size_;\n const gl = this.helper_.getGL();\n\n this.texture_ = this.helper_.createTexture(size, null, this.texture_);\n\n gl.bindFramebuffer(gl.FRAMEBUFFER, this.framebuffer_);\n gl.viewport(0, 0, size[0], size[1]);\n gl.framebufferTexture2D(\n gl.FRAMEBUFFER,\n gl.COLOR_ATTACHMENT0,\n gl.TEXTURE_2D,\n this.texture_,\n 0\n );\n\n this.data_ = new Uint8Array(size[0] * size[1] * 4);\n }\n}\n\nexport default WebGLRenderTarget;\n","/**\n * @module ol/webgl/TileTexture\n */\n\nimport DataTile, {asArrayLike, asImageLike} from '../DataTile.js';\nimport EventTarget from '../events/Target.js';\nimport EventType from '../events/EventType.js';\nimport ImageTile from '../ImageTile.js';\nimport ReprojTile from '../reproj/Tile.js';\nimport TileState from '../TileState.js';\nimport WebGLArrayBuffer from './Buffer.js';\nimport {ARRAY_BUFFER, STATIC_DRAW} from '../webgl.js';\nimport {createCanvasContext2D} from '../dom.js';\nimport {toSize} from '../size.js';\n\n/**\n * @param {WebGLRenderingContext} gl The WebGL context.\n * @param {WebGLTexture} texture The texture.\n * @param {boolean} interpolate Interpolate when resampling.\n */\nfunction bindAndConfigure(gl, texture, interpolate) {\n const resampleFilter = interpolate ? gl.LINEAR : gl.NEAREST;\n gl.bindTexture(gl.TEXTURE_2D, texture);\n gl.texParameteri(gl.TEXTURE_2D, gl.TEXTURE_WRAP_S, gl.CLAMP_TO_EDGE);\n gl.texParameteri(gl.TEXTURE_2D, gl.TEXTURE_WRAP_T, gl.CLAMP_TO_EDGE);\n gl.texParameteri(gl.TEXTURE_2D, gl.TEXTURE_MIN_FILTER, resampleFilter);\n gl.texParameteri(gl.TEXTURE_2D, gl.TEXTURE_MAG_FILTER, resampleFilter);\n}\n\n/**\n * @param {WebGLRenderingContext} gl The WebGL context.\n * @param {WebGLTexture} texture The texture.\n * @param {import(\"../DataTile.js\").ImageLike} image The image.\n * @param {boolean} interpolate Interpolate when resampling.\n */\nfunction uploadImageTexture(gl, texture, image, interpolate) {\n bindAndConfigure(gl, texture, interpolate);\n\n gl.texImage2D(gl.TEXTURE_2D, 0, gl.RGBA, gl.RGBA, gl.UNSIGNED_BYTE, image);\n}\n\n/**\n * @param {import(\"./Helper.js\").default} helper The WebGL helper.\n * @param {WebGLTexture} texture The texture.\n * @param {import(\"../DataTile.js\").ArrayLike} data The pixel data.\n * @param {import(\"../size.js\").Size} size The pixel size.\n * @param {number} bandCount The band count.\n * @param {boolean} interpolate Interpolate when resampling.\n */\nfunction uploadDataTexture(\n helper,\n texture,\n data,\n size,\n bandCount,\n interpolate\n) {\n const gl = helper.getGL();\n let textureType;\n let canInterpolate;\n if (data instanceof Float32Array) {\n textureType = gl.FLOAT;\n helper.getExtension('OES_texture_float');\n const extension = helper.getExtension('OES_texture_float_linear');\n canInterpolate = extension !== null;\n } else {\n textureType = gl.UNSIGNED_BYTE;\n canInterpolate = true;\n }\n bindAndConfigure(gl, texture, interpolate && canInterpolate);\n\n const bytesPerRow = data.byteLength / size[1];\n let unpackAlignment = 1;\n if (bytesPerRow % 8 === 0) {\n unpackAlignment = 8;\n } else if (bytesPerRow % 4 === 0) {\n unpackAlignment = 4;\n } else if (bytesPerRow % 2 === 0) {\n unpackAlignment = 2;\n }\n\n let format;\n switch (bandCount) {\n case 1: {\n format = gl.LUMINANCE;\n break;\n }\n case 2: {\n format = gl.LUMINANCE_ALPHA;\n break;\n }\n case 3: {\n format = gl.RGB;\n break;\n }\n case 4: {\n format = gl.RGBA;\n break;\n }\n default: {\n throw new Error(`Unsupported number of bands: ${bandCount}`);\n }\n }\n\n const oldUnpackAlignment = gl.getParameter(gl.UNPACK_ALIGNMENT);\n gl.pixelStorei(gl.UNPACK_ALIGNMENT, unpackAlignment);\n gl.texImage2D(\n gl.TEXTURE_2D,\n 0,\n format,\n size[0],\n size[1],\n 0,\n format,\n textureType,\n data\n );\n gl.pixelStorei(gl.UNPACK_ALIGNMENT, oldUnpackAlignment);\n}\n\n/**\n * @type {CanvasRenderingContext2D}\n */\nlet pixelContext = null;\n\nfunction createPixelContext() {\n pixelContext = createCanvasContext2D(1, 1, undefined, {\n willReadFrequently: true,\n });\n}\n\n/**\n * @typedef {import(\"../DataTile.js\").default|ImageTile|ReprojTile} TileType\n */\n\n/**\n * @typedef {Object} Options\n * @property {TileType} tile The tile.\n * @property {import(\"../tilegrid/TileGrid.js\").default} grid Tile grid.\n * @property {import(\"../webgl/Helper.js\").default} helper WebGL helper.\n * @property {number} [gutter=0] The size in pixels of the gutter around image tiles to ignore.\n */\n\nclass TileTexture extends EventTarget {\n /**\n * @param {Options} options The tile texture options.\n */\n constructor(options) {\n super();\n\n /**\n * @type {TileType}\n */\n this.tile;\n\n /**\n * @type {Array}\n */\n this.textures = [];\n this.handleTileChange_ = this.handleTileChange_.bind(this);\n\n /**\n * @type {import(\"../size.js\").Size}\n * @private\n */\n this.renderSize_ = toSize(\n options.grid.getTileSize(options.tile.tileCoord[0])\n );\n\n /**\n * @type {number}\n * @private\n */\n this.gutter_ = options.gutter || 0;\n\n /**\n * @type {number}\n */\n this.bandCount = NaN;\n\n /**\n * @type {import(\"../webgl/Helper.js\").default}\n * @private\n */\n this.helper_ = options.helper;\n\n const coords = new WebGLArrayBuffer(ARRAY_BUFFER, STATIC_DRAW);\n coords.fromArray([\n 0, // P0\n 1,\n 1, // P1\n 1,\n 1, // P2\n 0,\n 0, // P3\n 0,\n ]);\n this.helper_.flushBufferData(coords);\n\n /**\n * @type {WebGLArrayBuffer}\n */\n this.coords = coords;\n\n this.setTile(options.tile);\n }\n\n /**\n * @param {TileType} tile Tile.\n */\n setTile(tile) {\n if (tile !== this.tile) {\n if (this.tile) {\n this.tile.removeEventListener(EventType.CHANGE, this.handleTileChange_);\n }\n this.tile = tile;\n this.textures.length = 0;\n this.loaded = tile.getState() === TileState.LOADED;\n if (this.loaded) {\n this.uploadTile_();\n } else {\n if (tile instanceof ImageTile) {\n const image = tile.getImage();\n if (image instanceof Image && !image.crossOrigin) {\n image.crossOrigin = 'anonymous';\n }\n }\n tile.addEventListener(EventType.CHANGE, this.handleTileChange_);\n }\n }\n }\n\n uploadTile_() {\n const helper = this.helper_;\n const gl = helper.getGL();\n const tile = this.tile;\n\n /**\n * @type {import(\"../DataTile.js\").Data}\n */\n let data;\n\n if (tile instanceof ImageTile || tile instanceof ReprojTile) {\n data = tile.getImage();\n } else {\n data = tile.getData();\n }\n\n const image = asImageLike(data);\n if (image) {\n const texture = gl.createTexture();\n this.textures.push(texture);\n this.bandCount = 4;\n uploadImageTexture(gl, texture, image, tile.interpolate);\n return;\n }\n\n data = asArrayLike(data);\n\n const sourceTileSize = /** @type {DataTile} */ (tile).getSize();\n const pixelSize = [\n sourceTileSize[0] + 2 * this.gutter_,\n sourceTileSize[1] + 2 * this.gutter_,\n ];\n const isFloat = data instanceof Float32Array;\n const pixelCount = pixelSize[0] * pixelSize[1];\n const DataType = isFloat ? Float32Array : Uint8Array;\n const bytesPerElement = DataType.BYTES_PER_ELEMENT;\n const bytesPerRow = data.byteLength / pixelSize[1];\n\n this.bandCount = Math.floor(bytesPerRow / bytesPerElement / pixelSize[0]);\n const textureCount = Math.ceil(this.bandCount / 4);\n\n if (textureCount === 1) {\n const texture = gl.createTexture();\n this.textures.push(texture);\n uploadDataTexture(\n helper,\n texture,\n data,\n pixelSize,\n this.bandCount,\n tile.interpolate\n );\n return;\n }\n\n const textureDataArrays = new Array(textureCount);\n for (let textureIndex = 0; textureIndex < textureCount; ++textureIndex) {\n const texture = gl.createTexture();\n this.textures.push(texture);\n\n const bandCount =\n textureIndex < textureCount - 1 ? 4 : ((this.bandCount - 1) % 4) + 1;\n textureDataArrays[textureIndex] = new DataType(pixelCount * bandCount);\n }\n\n let dataIndex = 0;\n let rowOffset = 0;\n const colCount = pixelSize[0] * this.bandCount;\n for (let rowIndex = 0; rowIndex < pixelSize[1]; ++rowIndex) {\n for (let colIndex = 0; colIndex < colCount; ++colIndex) {\n const dataValue = data[rowOffset + colIndex];\n\n const pixelIndex = Math.floor(dataIndex / this.bandCount);\n const bandIndex = colIndex % this.bandCount;\n const textureIndex = Math.floor(bandIndex / 4);\n const textureData = textureDataArrays[textureIndex];\n const bandCount = textureData.length / pixelCount;\n const textureBandIndex = bandIndex % 4;\n textureData[pixelIndex * bandCount + textureBandIndex] = dataValue;\n\n ++dataIndex;\n }\n rowOffset += bytesPerRow / bytesPerElement;\n }\n\n for (let textureIndex = 0; textureIndex < textureCount; ++textureIndex) {\n const texture = this.textures[textureIndex];\n const textureData = textureDataArrays[textureIndex];\n const bandCount = textureData.length / pixelCount;\n uploadDataTexture(\n helper,\n texture,\n textureData,\n pixelSize,\n bandCount,\n tile.interpolate\n );\n }\n }\n\n handleTileChange_() {\n if (this.tile.getState() === TileState.LOADED) {\n this.loaded = true;\n this.uploadTile_();\n this.dispatchEvent(EventType.CHANGE);\n }\n }\n\n disposeInternal() {\n const gl = this.helper_.getGL();\n this.helper_.deleteBuffer(this.coords);\n for (let i = 0; i < this.textures.length; ++i) {\n gl.deleteTexture(this.textures[i]);\n }\n this.tile.removeEventListener(EventType.CHANGE, this.handleTileChange_);\n }\n\n /**\n * @param {import(\"../DataTile.js\").ImageLike} image The image.\n * @param {number} renderCol The column index (in rendered tile space).\n * @param {number} renderRow The row index (in rendered tile space).\n * @return {Uint8ClampedArray|null} The data.\n * @private\n */\n getImagePixelData_(image, renderCol, renderRow) {\n const gutter = this.gutter_;\n const renderWidth = this.renderSize_[0];\n const renderHeight = this.renderSize_[1];\n\n if (!pixelContext) {\n createPixelContext();\n }\n pixelContext.clearRect(0, 0, 1, 1);\n\n const sourceWidth = image.width;\n const sourceHeight = image.height;\n\n const sourceWidthWithoutGutter = sourceWidth - 2 * gutter;\n const sourceHeightWithoutGutter = sourceHeight - 2 * gutter;\n\n const sourceCol =\n gutter + Math.floor(sourceWidthWithoutGutter * (renderCol / renderWidth));\n\n const sourceRow =\n gutter +\n Math.floor(sourceHeightWithoutGutter * (renderRow / renderHeight));\n\n let data;\n try {\n pixelContext.drawImage(image, sourceCol, sourceRow, 1, 1, 0, 0, 1, 1);\n data = pixelContext.getImageData(0, 0, 1, 1).data;\n } catch (err) {\n pixelContext = null;\n return null;\n }\n return data;\n }\n\n /**\n * @param {import(\"../DataTile.js\").ArrayLike} data The data.\n * @param {import(\"../size.js\").Size} sourceSize The size.\n * @param {number} renderCol The column index (in rendered tile space).\n * @param {number} renderRow The row index (in rendered tile space).\n * @return {import(\"../DataTile.js\").ArrayLike|null} The data.\n * @private\n */\n getArrayPixelData_(data, sourceSize, renderCol, renderRow) {\n const gutter = this.gutter_;\n const renderWidth = this.renderSize_[0];\n const renderHeight = this.renderSize_[1];\n\n const sourceWidthWithoutGutter = sourceSize[0];\n const sourceHeightWithoutGutter = sourceSize[1];\n const sourceWidth = sourceWidthWithoutGutter + 2 * gutter;\n const sourceHeight = sourceHeightWithoutGutter + 2 * gutter;\n\n const sourceCol =\n gutter + Math.floor(sourceWidthWithoutGutter * (renderCol / renderWidth));\n\n const sourceRow =\n gutter +\n Math.floor(sourceHeightWithoutGutter * (renderRow / renderHeight));\n\n if (data instanceof DataView) {\n const bytesPerPixel = data.byteLength / (sourceWidth * sourceHeight);\n const offset = bytesPerPixel * (sourceRow * sourceWidth + sourceCol);\n const buffer = data.buffer.slice(offset, offset + bytesPerPixel);\n return new DataView(buffer);\n }\n\n const offset = this.bandCount * (sourceRow * sourceWidth + sourceCol);\n return data.slice(offset, offset + this.bandCount);\n }\n\n /**\n * Get data for a pixel. If the tile is not loaded, null is returned.\n * @param {number} renderCol The column index (in rendered tile space).\n * @param {number} renderRow The row index (in rendered tile space).\n * @return {import(\"../DataTile.js\").ArrayLike|null} The data.\n */\n getPixelData(renderCol, renderRow) {\n if (!this.loaded) {\n return null;\n }\n\n if (this.tile instanceof DataTile) {\n const data = this.tile.getData();\n const arrayData = asArrayLike(data);\n if (arrayData) {\n const sourceSize = this.tile.getSize();\n return this.getArrayPixelData_(\n arrayData,\n sourceSize,\n renderCol,\n renderRow\n );\n }\n return this.getImagePixelData_(asImageLike(data), renderCol, renderRow);\n }\n\n return this.getImagePixelData_(this.tile.getImage(), renderCol, renderRow);\n }\n}\n\nexport default TileTexture;\n","/**\n * @module ol/renderer/webgl/Layer\n */\nimport LayerProperty from '../../layer/Property.js';\nimport LayerRenderer from '../Layer.js';\nimport RenderEvent from '../../render/Event.js';\nimport RenderEventType from '../../render/EventType.js';\nimport WebGLHelper from '../../webgl/Helper.js';\nimport {\n compose as composeTransform,\n create as createTransform,\n} from '../../transform.js';\n\n/**\n * @typedef {Object} PostProcessesOptions\n * @property {number} [scaleRatio] Scale ratio; if < 1, the post process will render to a texture smaller than\n * the main canvas that will then be sampled up (useful for saving resource on blur steps).\n * @property {string} [vertexShader] Vertex shader source\n * @property {string} [fragmentShader] Fragment shader source\n * @property {Object} [uniforms] Uniform definitions for the post process step\n */\n\n/**\n * @typedef {Object} Options\n * @property {Object} [uniforms] Uniform definitions for the post process steps\n * @property {Array} [postProcesses] Post-processes definitions\n */\n\n/**\n * @classdesc\n * Base WebGL renderer class.\n * Holds all logic related to data manipulation & some common rendering logic\n * @template {import(\"../../layer/Layer.js\").default} LayerType\n * @extends {LayerRenderer}\n */\nclass WebGLLayerRenderer extends LayerRenderer {\n /**\n * @param {LayerType} layer Layer.\n * @param {Options} [options] Options.\n */\n constructor(layer, options) {\n super(layer);\n\n options = options || {};\n\n /**\n * The transform for viewport CSS pixels to rendered pixels. This transform is only\n * set before dispatching rendering events.\n * @private\n * @type {import(\"../../transform.js\").Transform}\n */\n this.inversePixelTransform_ = createTransform();\n\n /**\n * @private\n * @type {CanvasRenderingContext2D}\n */\n this.pixelContext_ = null;\n\n /**\n * @private\n */\n this.postProcesses_ = options.postProcesses;\n\n /**\n * @private\n */\n this.uniforms_ = options.uniforms;\n\n /**\n * @type {WebGLHelper}\n * @protected\n */\n this.helper;\n\n layer.addChangeListener(LayerProperty.MAP, this.removeHelper.bind(this));\n\n this.dispatchPreComposeEvent = this.dispatchPreComposeEvent.bind(this);\n this.dispatchPostComposeEvent = this.dispatchPostComposeEvent.bind(this);\n }\n\n /**\n * @param {WebGLRenderingContext} context The WebGL rendering context.\n * @param {import(\"../../Map.js\").FrameState} frameState Frame state.\n * @protected\n */\n dispatchPreComposeEvent(context, frameState) {\n const layer = this.getLayer();\n if (layer.hasListener(RenderEventType.PRECOMPOSE)) {\n const event = new RenderEvent(\n RenderEventType.PRECOMPOSE,\n undefined,\n frameState,\n context\n );\n layer.dispatchEvent(event);\n }\n }\n\n /**\n * @param {WebGLRenderingContext} context The WebGL rendering context.\n * @param {import(\"../../Map.js\").FrameState} frameState Frame state.\n * @protected\n */\n dispatchPostComposeEvent(context, frameState) {\n const layer = this.getLayer();\n if (layer.hasListener(RenderEventType.POSTCOMPOSE)) {\n const event = new RenderEvent(\n RenderEventType.POSTCOMPOSE,\n undefined,\n frameState,\n context\n );\n layer.dispatchEvent(event);\n }\n }\n\n /**\n * Reset options (only handles uniforms).\n * @param {Options} options Options.\n */\n reset(options) {\n this.uniforms_ = options.uniforms;\n if (this.helper) {\n this.helper.setUniforms(this.uniforms_);\n }\n }\n\n /**\n * @protected\n */\n removeHelper() {\n if (this.helper) {\n this.helper.dispose();\n delete this.helper;\n }\n }\n\n /**\n * Determine whether renderFrame should be called.\n * @param {import(\"../../Map.js\").FrameState} frameState Frame state.\n * @return {boolean} Layer is ready to be rendered.\n */\n prepareFrame(frameState) {\n if (this.getLayer().getRenderSource()) {\n let incrementGroup = true;\n let groupNumber = -1;\n let className;\n for (let i = 0, ii = frameState.layerStatesArray.length; i < ii; i++) {\n const layer = frameState.layerStatesArray[i].layer;\n const renderer = layer.getRenderer();\n if (!(renderer instanceof WebGLLayerRenderer)) {\n incrementGroup = true;\n continue;\n }\n const layerClassName = layer.getClassName();\n if (incrementGroup || layerClassName !== className) {\n groupNumber += 1;\n incrementGroup = false;\n }\n className = layerClassName;\n if (renderer === this) {\n break;\n }\n }\n\n const canvasCacheKey =\n 'map/' + frameState.mapId + '/group/' + groupNumber;\n\n if (!this.helper || !this.helper.canvasCacheKeyMatches(canvasCacheKey)) {\n this.removeHelper();\n\n this.helper = new WebGLHelper({\n postProcesses: this.postProcesses_,\n uniforms: this.uniforms_,\n canvasCacheKey: canvasCacheKey,\n });\n\n if (className) {\n this.helper.getCanvas().className = className;\n }\n\n this.afterHelperCreated();\n }\n }\n\n return this.prepareFrameInternal(frameState);\n }\n\n /**\n * @protected\n */\n afterHelperCreated() {}\n\n /**\n * Determine whether renderFrame should be called.\n * @param {import(\"../../Map.js\").FrameState} frameState Frame state.\n * @return {boolean} Layer is ready to be rendered.\n * @protected\n */\n prepareFrameInternal(frameState) {\n return true;\n }\n\n /**\n * Clean up.\n */\n disposeInternal() {\n this.removeHelper();\n super.disposeInternal();\n }\n\n /**\n * @param {import(\"../../render/EventType.js\").default} type Event type.\n * @param {WebGLRenderingContext} context The rendering context.\n * @param {import(\"../../Map.js\").FrameState} frameState Frame state.\n * @private\n */\n dispatchRenderEvent_(type, context, frameState) {\n const layer = this.getLayer();\n if (layer.hasListener(type)) {\n composeTransform(\n this.inversePixelTransform_,\n 0,\n 0,\n frameState.pixelRatio,\n -frameState.pixelRatio,\n 0,\n 0,\n -frameState.size[1]\n );\n\n const event = new RenderEvent(\n type,\n this.inversePixelTransform_,\n frameState,\n context\n );\n layer.dispatchEvent(event);\n }\n }\n\n /**\n * @param {WebGLRenderingContext} context The rendering context.\n * @param {import(\"../../Map.js\").FrameState} frameState Frame state.\n * @protected\n */\n preRender(context, frameState) {\n this.dispatchRenderEvent_(RenderEventType.PRERENDER, context, frameState);\n }\n\n /**\n * @param {WebGLRenderingContext} context The rendering context.\n * @param {import(\"../../Map.js\").FrameState} frameState Frame state.\n * @protected\n */\n postRender(context, frameState) {\n this.dispatchRenderEvent_(RenderEventType.POSTRENDER, context, frameState);\n }\n}\n\nexport default WebGLLayerRenderer;\n","/**\n * @module ol/renderer/webgl/TileLayer\n */\nimport LRUCache from '../../structs/LRUCache.js';\nimport ReprojDataTile from '../../reproj/DataTile.js';\nimport ReprojTile from '../../reproj/Tile.js';\nimport TileRange from '../../TileRange.js';\nimport TileState from '../../TileState.js';\nimport TileTexture from '../../webgl/TileTexture.js';\nimport WebGLArrayBuffer from '../../webgl/Buffer.js';\nimport WebGLLayerRenderer from './Layer.js';\nimport {AttributeType} from '../../webgl/Helper.js';\nimport {ELEMENT_ARRAY_BUFFER, STATIC_DRAW} from '../../webgl.js';\nimport {\n apply as applyTransform,\n create as createTransform,\n reset as resetTransform,\n rotate as rotateTransform,\n scale as scaleTransform,\n translate as translateTransform,\n} from '../../transform.js';\nimport {ascending} from '../../array.js';\nimport {\n boundingExtent,\n containsCoordinate,\n getIntersection,\n isEmpty,\n} from '../../extent.js';\nimport {\n create as createMat4,\n fromTransform as mat4FromTransform,\n} from '../../vec/mat4.js';\nimport {\n createOrUpdate as createTileCoord,\n getKey as getTileCoordKey,\n} from '../../tilecoord.js';\nimport {fromUserExtent} from '../../proj.js';\nimport {getUid} from '../../util.js';\nimport {toSize} from '../../size.js';\n\nexport const Uniforms = {\n TILE_TEXTURE_ARRAY: 'u_tileTextures',\n TILE_TRANSFORM: 'u_tileTransform',\n TRANSITION_ALPHA: 'u_transitionAlpha',\n DEPTH: 'u_depth',\n TEXTURE_PIXEL_WIDTH: 'u_texturePixelWidth',\n TEXTURE_PIXEL_HEIGHT: 'u_texturePixelHeight',\n TEXTURE_RESOLUTION: 'u_textureResolution', // map units per texture pixel\n TEXTURE_ORIGIN_X: 'u_textureOriginX', // map x coordinate of left edge of texture\n TEXTURE_ORIGIN_Y: 'u_textureOriginY', // map y coordinate of top edge of texture\n RENDER_EXTENT: 'u_renderExtent', // intersection of layer, source, and view extent\n RESOLUTION: 'u_resolution',\n ZOOM: 'u_zoom',\n};\n\nexport const Attributes = {\n TEXTURE_COORD: 'a_textureCoord',\n};\n\n/**\n * @type {Array}\n */\nconst attributeDescriptions = [\n {\n name: Attributes.TEXTURE_COORD,\n size: 2,\n type: AttributeType.FLOAT,\n },\n];\n\n/**\n * @type {Object}\n */\nconst empty = {};\n\n/**\n * Transform a zoom level into a depth value ranging from -1 to 1.\n * @param {number} z A zoom level.\n * @return {number} A depth value.\n */\nfunction depthForZ(z) {\n return 2 * (1 - 1 / (z + 1)) - 1;\n}\n\n/**\n * Add a tile texture to the lookup.\n * @param {Object>} tileTexturesByZ Lookup of\n * tile textures by zoom level.\n * @param {import(\"../../webgl/TileTexture.js\").default} tileTexture A tile texture.\n * @param {number} z The zoom level.\n */\nfunction addTileTextureToLookup(tileTexturesByZ, tileTexture, z) {\n if (!(z in tileTexturesByZ)) {\n tileTexturesByZ[z] = [];\n }\n tileTexturesByZ[z].push(tileTexture);\n}\n\n/**\n * @param {import(\"../../Map.js\").FrameState} frameState Frame state.\n * @param {import(\"../../extent.js\").Extent} extent The frame extent.\n * @return {import(\"../../extent.js\").Extent} Frame extent intersected with layer extents.\n */\nfunction getRenderExtent(frameState, extent) {\n const layerState = frameState.layerStatesArray[frameState.layerIndex];\n if (layerState.extent) {\n extent = getIntersection(\n extent,\n fromUserExtent(layerState.extent, frameState.viewState.projection)\n );\n }\n const source = /** @type {import(\"../../source/Tile.js\").default} */ (\n layerState.layer.getRenderSource()\n );\n if (!source.getWrapX()) {\n const gridExtent = source\n .getTileGridForProjection(frameState.viewState.projection)\n .getExtent();\n if (gridExtent) {\n extent = getIntersection(extent, gridExtent);\n }\n }\n return extent;\n}\n\nfunction getCacheKey(source, tileCoord) {\n return `${source.getKey()},${getTileCoordKey(tileCoord)}`;\n}\n\n/**\n * @typedef {Object} Options\n * @property {string} vertexShader Vertex shader source.\n * @property {string} fragmentShader Fragment shader source.\n * @property {Object} [uniforms] Additional uniforms\n * made available to shaders.\n * @property {Array} [paletteTextures] Palette textures.\n * @property {number} [cacheSize=512] The texture cache size.\n */\n\n/**\n * @typedef {import(\"../../layer/WebGLTile.js\").default} LayerType\n */\n\n/**\n * @classdesc\n * WebGL renderer for tile layers.\n * @extends {WebGLLayerRenderer}\n * @api\n */\nclass WebGLTileLayerRenderer extends WebGLLayerRenderer {\n /**\n * @param {LayerType} tileLayer Tile layer.\n * @param {Options} options Options.\n */\n constructor(tileLayer, options) {\n super(tileLayer, {\n uniforms: options.uniforms,\n });\n\n /**\n * The last call to `renderFrame` was completed with all tiles loaded\n * @type {boolean}\n */\n this.renderComplete = false;\n\n /**\n * This transform converts texture coordinates to screen coordinates.\n * @type {import(\"../../transform.js\").Transform}\n * @private\n */\n this.tileTransform_ = createTransform();\n\n /**\n * @type {Array}\n * @private\n */\n this.tempMat4_ = createMat4();\n\n /**\n * @type {import(\"../../TileRange.js\").default}\n * @private\n */\n this.tempTileRange_ = new TileRange(0, 0, 0, 0);\n\n /**\n * @type {import(\"../../tilecoord.js\").TileCoord}\n * @private\n */\n this.tempTileCoord_ = createTileCoord(0, 0, 0);\n\n /**\n * @type {import(\"../../size.js\").Size}\n * @private\n */\n this.tempSize_ = [0, 0];\n\n /**\n * @type {WebGLProgram}\n * @private\n */\n this.program_;\n\n /**\n * @private\n */\n this.vertexShader_ = options.vertexShader;\n\n /**\n * @private\n */\n this.fragmentShader_ = options.fragmentShader;\n\n /**\n * Tiles are rendered as a quad with the following structure:\n *\n * [P3]---------[P2]\n * |` |\n * | ` B |\n * | ` |\n * | ` |\n * | A ` |\n * | ` |\n * [P0]---------[P1]\n *\n * Triangle A: P0, P1, P3\n * Triangle B: P1, P2, P3\n *\n * @private\n */\n this.indices_ = new WebGLArrayBuffer(ELEMENT_ARRAY_BUFFER, STATIC_DRAW);\n this.indices_.fromArray([0, 1, 3, 1, 2, 3]);\n\n const cacheSize = options.cacheSize !== undefined ? options.cacheSize : 512;\n\n /**\n * @type {import(\"../../structs/LRUCache.js\").default}\n * @private\n */\n this.tileTextureCache_ = new LRUCache(cacheSize);\n\n /**\n * @type {Array}\n * @private\n */\n this.paletteTextures_ = options.paletteTextures || [];\n\n /**\n * @private\n * @type {import(\"../../Map.js\").FrameState|null}\n */\n this.frameState_ = null;\n\n /**\n * @private\n * @type {import(\"../../proj/Projection.js\").default}\n */\n this.projection_ = undefined;\n }\n\n /**\n * @param {Options} options Options.\n */\n reset(options) {\n super.reset({\n uniforms: options.uniforms,\n });\n this.vertexShader_ = options.vertexShader;\n this.fragmentShader_ = options.fragmentShader;\n this.paletteTextures_ = options.paletteTextures || [];\n\n if (this.helper) {\n this.program_ = this.helper.getProgram(\n this.fragmentShader_,\n this.vertexShader_\n );\n }\n }\n\n afterHelperCreated() {\n this.program_ = this.helper.getProgram(\n this.fragmentShader_,\n this.vertexShader_\n );\n\n this.helper.flushBufferData(this.indices_);\n }\n\n /**\n * @param {import(\"../../webgl/TileTexture\").TileType} tile Tile.\n * @return {boolean} Tile is drawable.\n * @private\n */\n isDrawableTile_(tile) {\n const tileLayer = this.getLayer();\n const tileState = tile.getState();\n const useInterimTilesOnError = tileLayer.getUseInterimTilesOnError();\n return (\n tileState == TileState.LOADED ||\n tileState == TileState.EMPTY ||\n (tileState == TileState.ERROR && !useInterimTilesOnError)\n );\n }\n\n /**\n * Determine whether renderFrame should be called.\n * @param {import(\"../../Map.js\").FrameState} frameState Frame state.\n * @return {boolean} Layer is ready to be rendered.\n */\n prepareFrameInternal(frameState) {\n if (!this.projection_) {\n this.projection_ = frameState.viewState.projection;\n } else if (frameState.viewState.projection !== this.projection_) {\n this.clearCache();\n this.projection_ = frameState.viewState.projection;\n }\n\n const layer = this.getLayer();\n const source = layer.getRenderSource();\n if (!source) {\n return false;\n }\n\n if (isEmpty(getRenderExtent(frameState, frameState.extent))) {\n return false;\n }\n return source.getState() === 'ready';\n }\n\n /**\n * @param {import(\"../../Map.js\").FrameState} frameState Frame state.\n * @param {import(\"../../extent.js\").Extent} extent The extent to be rendered.\n * @param {number} initialZ The zoom level.\n * @param {Object>} tileTexturesByZ The zoom level.\n * @param {number} preload Number of additional levels to load.\n */\n enqueueTiles(frameState, extent, initialZ, tileTexturesByZ, preload) {\n const viewState = frameState.viewState;\n const tileLayer = this.getLayer();\n const tileSource = tileLayer.getRenderSource();\n const tileGrid = tileSource.getTileGridForProjection(viewState.projection);\n const gutter = tileSource.getGutterForProjection(viewState.projection);\n\n const tileSourceKey = getUid(tileSource);\n if (!(tileSourceKey in frameState.wantedTiles)) {\n frameState.wantedTiles[tileSourceKey] = {};\n }\n\n const wantedTiles = frameState.wantedTiles[tileSourceKey];\n const tileTextureCache = this.tileTextureCache_;\n\n const map = tileLayer.getMapInternal();\n const minZ = Math.max(\n initialZ - preload,\n tileGrid.getMinZoom(),\n tileGrid.getZForResolution(\n Math.min(\n tileLayer.getMaxResolution(),\n map\n ? map\n .getView()\n .getResolutionForZoom(Math.max(tileLayer.getMinZoom(), 0))\n : tileGrid.getResolution(0)\n ),\n tileSource.zDirection\n )\n );\n for (let z = initialZ; z >= minZ; --z) {\n const tileRange = tileGrid.getTileRangeForExtentAndZ(\n extent,\n z,\n this.tempTileRange_\n );\n\n const tileResolution = tileGrid.getResolution(z);\n\n for (let x = tileRange.minX; x <= tileRange.maxX; ++x) {\n for (let y = tileRange.minY; y <= tileRange.maxY; ++y) {\n const tileCoord = createTileCoord(z, x, y, this.tempTileCoord_);\n const cacheKey = getCacheKey(tileSource, tileCoord);\n\n /** @type {TileTexture} */\n let tileTexture;\n\n /** @type {import(\"../../webgl/TileTexture\").TileType} */\n let tile;\n\n if (tileTextureCache.containsKey(cacheKey)) {\n tileTexture = tileTextureCache.get(cacheKey);\n tile = tileTexture.tile;\n }\n if (!tileTexture || tileTexture.tile.key !== tileSource.getKey()) {\n tile = tileSource.getTile(\n z,\n x,\n y,\n frameState.pixelRatio,\n viewState.projection\n );\n if (!tileTexture) {\n tileTexture = new TileTexture({\n tile: tile,\n grid: tileGrid,\n helper: this.helper,\n gutter: gutter,\n });\n tileTextureCache.set(cacheKey, tileTexture);\n } else {\n if (this.isDrawableTile_(tile)) {\n tileTexture.setTile(tile);\n } else {\n const interimTile =\n /** @type {import(\"../../webgl/TileTexture\").TileType} */ (\n tile.getInterimTile()\n );\n tileTexture.setTile(interimTile);\n }\n }\n }\n\n addTileTextureToLookup(tileTexturesByZ, tileTexture, z);\n\n const tileQueueKey = tile.getKey();\n wantedTiles[tileQueueKey] = true;\n\n if (tile.getState() === TileState.IDLE) {\n if (!frameState.tileQueue.isKeyQueued(tileQueueKey)) {\n frameState.tileQueue.enqueue([\n tile,\n tileSourceKey,\n tileGrid.getTileCoordCenter(tileCoord),\n tileResolution,\n ]);\n }\n }\n }\n }\n }\n }\n\n /**\n * Render the layer.\n * @param {import(\"../../Map.js\").FrameState} frameState Frame state.\n * @return {HTMLElement} The rendered element.\n */\n renderFrame(frameState) {\n this.frameState_ = frameState;\n this.renderComplete = true;\n const gl = this.helper.getGL();\n this.preRender(gl, frameState);\n\n const viewState = frameState.viewState;\n const tileLayer = this.getLayer();\n const tileSource = tileLayer.getRenderSource();\n const tileGrid = tileSource.getTileGridForProjection(viewState.projection);\n const gutter = tileSource.getGutterForProjection(viewState.projection);\n const extent = getRenderExtent(frameState, frameState.extent);\n const z = tileGrid.getZForResolution(\n viewState.resolution,\n tileSource.zDirection\n );\n\n /**\n * @type {Object>}\n */\n const tileTexturesByZ = {};\n\n const preload = tileLayer.getPreload();\n if (frameState.nextExtent) {\n const targetZ = tileGrid.getZForResolution(\n viewState.nextResolution,\n tileSource.zDirection\n );\n const nextExtent = getRenderExtent(frameState, frameState.nextExtent);\n this.enqueueTiles(\n frameState,\n nextExtent,\n targetZ,\n tileTexturesByZ,\n preload\n );\n }\n\n this.enqueueTiles(frameState, extent, z, tileTexturesByZ, 0);\n if (preload > 0) {\n setTimeout(() => {\n this.enqueueTiles(\n frameState,\n extent,\n z - 1,\n tileTexturesByZ,\n preload - 1\n );\n }, 0);\n }\n\n /**\n * A lookup of alpha values for tiles at the target rendering resolution\n * for tiles that are in transition. If a tile coord key is absent from\n * this lookup, the tile should be rendered at alpha 1.\n * @type {Object}\n */\n const alphaLookup = {};\n\n const uid = getUid(this);\n const time = frameState.time;\n let blend = false;\n\n // look for cached tiles to use if a target tile is not ready\n const tileTextures = tileTexturesByZ[z];\n for (let i = 0, ii = tileTextures.length; i < ii; ++i) {\n const tileTexture = tileTextures[i];\n const tile = tileTexture.tile;\n if (\n (tile instanceof ReprojTile || tile instanceof ReprojDataTile) &&\n tile.getState() === TileState.EMPTY\n ) {\n continue;\n }\n const tileCoord = tile.tileCoord;\n\n if (tileTexture.loaded) {\n const alpha = tile.getAlpha(uid, time);\n if (alpha === 1) {\n // no need to look for alt tiles\n tile.endTransition(uid);\n continue;\n }\n blend = true;\n const tileCoordKey = getTileCoordKey(tileCoord);\n alphaLookup[tileCoordKey] = alpha;\n }\n this.renderComplete = false;\n\n // first look for child tiles (at z + 1)\n const coveredByChildren = this.findAltTiles_(\n tileGrid,\n tileCoord,\n z + 1,\n tileTexturesByZ\n );\n\n if (coveredByChildren) {\n continue;\n }\n\n // next look for parent tiles\n const minZoom = tileGrid.getMinZoom();\n for (let parentZ = z - 1; parentZ >= minZoom; --parentZ) {\n const coveredByParent = this.findAltTiles_(\n tileGrid,\n tileCoord,\n parentZ,\n tileTexturesByZ\n );\n\n if (coveredByParent) {\n break;\n }\n }\n }\n\n this.helper.useProgram(this.program_, frameState);\n this.helper.prepareDraw(frameState, !blend);\n\n const zs = Object.keys(tileTexturesByZ).map(Number).sort(ascending);\n\n const centerX = viewState.center[0];\n const centerY = viewState.center[1];\n\n for (let j = 0, jj = zs.length; j < jj; ++j) {\n const tileZ = zs[j];\n const tileResolution = tileGrid.getResolution(tileZ);\n const tileSize = toSize(tileGrid.getTileSize(tileZ), this.tempSize_);\n const tileOrigin = tileGrid.getOrigin(tileZ);\n\n const tileWidthWithGutter = tileSize[0] + 2 * gutter;\n const tileHeightWithGutter = tileSize[1] + 2 * gutter;\n const aspectRatio = tileWidthWithGutter / tileHeightWithGutter;\n\n const centerI =\n (centerX - tileOrigin[0]) / (tileSize[0] * tileResolution);\n const centerJ =\n (tileOrigin[1] - centerY) / (tileSize[1] * tileResolution);\n\n const tileScale = viewState.resolution / tileResolution;\n\n const depth = depthForZ(tileZ);\n const tileTextures = tileTexturesByZ[tileZ];\n for (let i = 0, ii = tileTextures.length; i < ii; ++i) {\n const tileTexture = tileTextures[i];\n if (!tileTexture.loaded) {\n continue;\n }\n const tile = tileTexture.tile;\n const tileCoord = tile.tileCoord;\n const tileCoordKey = getTileCoordKey(tileCoord);\n\n const tileCenterI = tileCoord[1];\n const tileCenterJ = tileCoord[2];\n\n resetTransform(this.tileTransform_);\n scaleTransform(\n this.tileTransform_,\n 2 / ((frameState.size[0] * tileScale) / tileWidthWithGutter),\n -2 / ((frameState.size[1] * tileScale) / tileWidthWithGutter)\n );\n rotateTransform(this.tileTransform_, viewState.rotation);\n scaleTransform(this.tileTransform_, 1, 1 / aspectRatio);\n translateTransform(\n this.tileTransform_,\n (tileSize[0] * (tileCenterI - centerI) - gutter) /\n tileWidthWithGutter,\n (tileSize[1] * (tileCenterJ - centerJ) - gutter) /\n tileHeightWithGutter\n );\n\n this.helper.setUniformMatrixValue(\n Uniforms.TILE_TRANSFORM,\n mat4FromTransform(this.tempMat4_, this.tileTransform_)\n );\n\n this.helper.bindBuffer(tileTexture.coords);\n this.helper.bindBuffer(this.indices_);\n this.helper.enableAttributes(attributeDescriptions);\n\n let textureSlot = 0;\n while (textureSlot < tileTexture.textures.length) {\n const textureProperty = 'TEXTURE' + textureSlot;\n const uniformName = `${Uniforms.TILE_TEXTURE_ARRAY}[${textureSlot}]`;\n gl.activeTexture(gl[textureProperty]);\n gl.bindTexture(gl.TEXTURE_2D, tileTexture.textures[textureSlot]);\n gl.uniform1i(\n this.helper.getUniformLocation(uniformName),\n textureSlot\n );\n ++textureSlot;\n }\n\n for (\n let paletteIndex = 0;\n paletteIndex < this.paletteTextures_.length;\n ++paletteIndex\n ) {\n const paletteTexture = this.paletteTextures_[paletteIndex];\n gl.activeTexture(gl['TEXTURE' + textureSlot]);\n const texture = paletteTexture.getTexture(gl);\n gl.bindTexture(gl.TEXTURE_2D, texture);\n gl.uniform1i(\n this.helper.getUniformLocation(paletteTexture.name),\n textureSlot\n );\n ++textureSlot;\n }\n\n const alpha =\n tileCoordKey in alphaLookup ? alphaLookup[tileCoordKey] : 1;\n\n if (alpha < 1) {\n frameState.animate = true;\n }\n\n this.helper.setUniformFloatValue(Uniforms.TRANSITION_ALPHA, alpha);\n this.helper.setUniformFloatValue(Uniforms.DEPTH, depth);\n this.helper.setUniformFloatValue(\n Uniforms.TEXTURE_PIXEL_WIDTH,\n tileWidthWithGutter\n );\n this.helper.setUniformFloatValue(\n Uniforms.TEXTURE_PIXEL_HEIGHT,\n tileHeightWithGutter\n );\n this.helper.setUniformFloatValue(\n Uniforms.TEXTURE_RESOLUTION,\n tileResolution\n );\n this.helper.setUniformFloatValue(\n Uniforms.TEXTURE_ORIGIN_X,\n tileOrigin[0] +\n tileCenterI * tileSize[0] * tileResolution -\n gutter * tileResolution\n );\n this.helper.setUniformFloatValue(\n Uniforms.TEXTURE_ORIGIN_Y,\n tileOrigin[1] -\n tileCenterJ * tileSize[1] * tileResolution +\n gutter * tileResolution\n );\n let gutterExtent = extent;\n if (gutter > 0) {\n gutterExtent = tileGrid.getTileCoordExtent(tileCoord);\n getIntersection(gutterExtent, extent, gutterExtent);\n }\n this.helper.setUniformFloatVec4(Uniforms.RENDER_EXTENT, gutterExtent);\n this.helper.setUniformFloatValue(\n Uniforms.RESOLUTION,\n viewState.resolution\n );\n this.helper.setUniformFloatValue(Uniforms.ZOOM, viewState.zoom);\n\n this.helper.drawElements(0, this.indices_.getSize());\n }\n }\n\n this.helper.finalizeDraw(\n frameState,\n this.dispatchPreComposeEvent,\n this.dispatchPostComposeEvent\n );\n\n const canvas = this.helper.getCanvas();\n\n const tileTextureCache = this.tileTextureCache_;\n while (tileTextureCache.canExpireCache()) {\n const tileTexture = tileTextureCache.pop();\n tileTexture.dispose();\n }\n\n // TODO: let the renderers manage their own cache instead of managing the source cache\n /**\n * Here we unconditionally expire the source cache since the renderer maintains\n * its own cache.\n * @param {import(\"../../Map.js\").default} map Map.\n * @param {import(\"../../Map.js\").FrameState} frameState Frame state.\n */\n const postRenderFunction = function (map, frameState) {\n tileSource.updateCacheSize(0.1, frameState.viewState.projection);\n tileSource.expireCache(frameState.viewState.projection, empty);\n };\n\n frameState.postRenderFunctions.push(postRenderFunction);\n\n this.postRender(gl, frameState);\n return canvas;\n }\n\n /**\n * @param {import(\"../../pixel.js\").Pixel} pixel Pixel.\n * @return {Uint8ClampedArray|Uint8Array|Float32Array|DataView} Data at the pixel location.\n */\n getData(pixel) {\n const gl = this.helper.getGL();\n if (!gl) {\n return null;\n }\n\n const frameState = this.frameState_;\n if (!frameState) {\n return null;\n }\n\n const layer = this.getLayer();\n const coordinate = applyTransform(\n frameState.pixelToCoordinateTransform,\n pixel.slice()\n );\n\n const viewState = frameState.viewState;\n const layerExtent = layer.getExtent();\n if (layerExtent) {\n if (\n !containsCoordinate(\n fromUserExtent(layerExtent, viewState.projection),\n coordinate\n )\n ) {\n return null;\n }\n }\n\n // determine last source suitable for rendering at coordinate\n const sources = layer.getSources(\n boundingExtent([coordinate]),\n viewState.resolution\n );\n let i, source, tileGrid;\n for (i = sources.length - 1; i >= 0; --i) {\n source = sources[i];\n if (source.getState() === 'ready') {\n tileGrid = source.getTileGridForProjection(viewState.projection);\n if (source.getWrapX()) {\n break;\n }\n const gridExtent = tileGrid.getExtent();\n if (!gridExtent || containsCoordinate(gridExtent, coordinate)) {\n break;\n }\n }\n }\n if (i < 0) {\n return null;\n }\n\n const tileTextureCache = this.tileTextureCache_;\n for (\n let z = tileGrid.getZForResolution(viewState.resolution);\n z >= tileGrid.getMinZoom();\n --z\n ) {\n const tileCoord = tileGrid.getTileCoordForCoordAndZ(coordinate, z);\n const cacheKey = getCacheKey(source, tileCoord);\n if (!tileTextureCache.containsKey(cacheKey)) {\n continue;\n }\n const tileTexture = tileTextureCache.get(cacheKey);\n const tile = tileTexture.tile;\n if (\n (tile instanceof ReprojTile || tile instanceof ReprojDataTile) &&\n tile.getState() === TileState.EMPTY\n ) {\n return null;\n }\n if (!tileTexture.loaded) {\n continue;\n }\n const tileOrigin = tileGrid.getOrigin(z);\n const tileSize = toSize(tileGrid.getTileSize(z));\n const tileResolution = tileGrid.getResolution(z);\n\n const col =\n (coordinate[0] - tileOrigin[0]) / tileResolution -\n tileCoord[1] * tileSize[0];\n\n const row =\n (tileOrigin[1] - coordinate[1]) / tileResolution -\n tileCoord[2] * tileSize[1];\n\n return tileTexture.getPixelData(col, row);\n }\n return null;\n }\n\n /**\n * Look for tiles covering the provided tile coordinate at an alternate\n * zoom level. Loaded tiles will be added to the provided tile texture lookup.\n * @param {import(\"../../tilegrid/TileGrid.js\").default} tileGrid The tile grid.\n * @param {import(\"../../tilecoord.js\").TileCoord} tileCoord The target tile coordinate.\n * @param {number} altZ The alternate zoom level.\n * @param {Object>} tileTexturesByZ Lookup of\n * tile textures by zoom level.\n * @return {boolean} The tile coordinate is covered by loaded tiles at the alternate zoom level.\n * @private\n */\n findAltTiles_(tileGrid, tileCoord, altZ, tileTexturesByZ) {\n const tileRange = tileGrid.getTileRangeForTileCoordAndZ(\n tileCoord,\n altZ,\n this.tempTileRange_\n );\n\n if (!tileRange) {\n return false;\n }\n\n let covered = true;\n const tileTextureCache = this.tileTextureCache_;\n const source = this.getLayer().getRenderSource();\n for (let x = tileRange.minX; x <= tileRange.maxX; ++x) {\n for (let y = tileRange.minY; y <= tileRange.maxY; ++y) {\n const cacheKey = getCacheKey(source, [altZ, x, y]);\n let loaded = false;\n if (tileTextureCache.containsKey(cacheKey)) {\n const tileTexture = tileTextureCache.get(cacheKey);\n if (tileTexture.loaded) {\n addTileTextureToLookup(tileTexturesByZ, tileTexture, altZ);\n loaded = true;\n }\n }\n if (!loaded) {\n covered = false;\n }\n }\n }\n return covered;\n }\n\n clearCache() {\n const tileTextureCache = this.tileTextureCache_;\n tileTextureCache.forEach((tileTexture) => tileTexture.dispose());\n tileTextureCache.clear();\n }\n\n removeHelper() {\n if (this.helper) {\n this.clearCache();\n }\n\n super.removeHelper();\n }\n\n /**\n * Clean up.\n */\n disposeInternal() {\n const helper = this.helper;\n if (helper) {\n const gl = helper.getGL();\n gl.deleteProgram(this.program_);\n delete this.program_;\n\n helper.deleteBuffer(this.indices_);\n }\n\n super.disposeInternal();\n\n delete this.indices_;\n delete this.tileTextureCache_;\n delete this.frameState_;\n }\n}\n\nexport default WebGLTileLayerRenderer;\n","/**\n * Operators and utilities used for style expressions\n * @module ol/style/expressions\n */\n\nimport PaletteTexture from '../webgl/PaletteTexture.js';\nimport {Uniforms} from '../renderer/webgl/TileLayer.js';\nimport {asArray, fromString, isStringColor} from '../color.js';\n\n/**\n * Base type used for literal style parameters; can be a number literal or the output of an operator,\n * which in turns takes {@link import(\"./expressions.js\").ExpressionValue} arguments.\n *\n * The following operators can be used:\n *\n * * Reading operators:\n * * `['band', bandIndex, xOffset, yOffset]` For tile layers only. Fetches pixel values from band\n * `bandIndex` of the source's data. The first `bandIndex` of the source data is `1`. Fetched values\n * are in the 0..1 range. {@link import(\"../source/TileImage.js\").default} sources have 4 bands: red,\n * green, blue and alpha. {@link import(\"../source/DataTile.js\").default} sources can have any number\n * of bands, depending on the underlying data source and\n * {@link import(\"../source/GeoTIFF.js\").Options configuration}. `xOffset` and `yOffset` are optional\n * and allow specifying pixel offsets for x and y. This is used for sampling data from neighboring pixels.\n * * `['get', 'attributeName']` fetches a feature attribute (it will be prefixed by `a_` in the shader)\n * Note: those will be taken from the attributes provided to the renderer\n * * `['resolution']` returns the current resolution\n * * `['time']` returns the time in seconds since the creation of the layer\n * * `['var', 'varName']` fetches a value from the style variables, or 0 if undefined\n * * `['zoom']` returns the current zoom level\n *\n * * Math operators:\n * * `['*', value1, value2]` multiplies `value1` by `value2`\n * * `['/', value1, value2]` divides `value1` by `value2`\n * * `['+', value1, value2]` adds `value1` and `value2`\n * * `['-', value1, value2]` subtracts `value2` from `value1`\n * * `['clamp', value, low, high]` clamps `value` between `low` and `high`\n * * `['%', value1, value2]` returns the result of `value1 % value2` (modulo)\n * * `['^', value1, value2]` returns the value of `value1` raised to the `value2` power\n * * `['abs', value1]` returns the absolute value of `value1`\n * * `['floor', value1]` returns the nearest integer less than or equal to `value1`\n * * `['round', value1]` returns the nearest integer to `value1`\n * * `['ceil', value1]` returns the nearest integer greater than or equal to `value1`\n * * `['sin', value1]` returns the sine of `value1`\n * * `['cos', value1]` returns the cosine of `value1`\n * * `['atan', value1, value2]` returns `atan2(value1, value2)`. If `value2` is not provided, returns `atan(value1)`\n *\n * * Transform operators:\n * * `['case', condition1, output1, ...conditionN, outputN, fallback]` selects the first output whose corresponding\n * condition evaluates to `true`. If no match is found, returns the `fallback` value.\n * All conditions should be `boolean`, output and fallback can be any kind.\n * * `['match', input, match1, output1, ...matchN, outputN, fallback]` compares the `input` value against all\n * provided `matchX` values, returning the output associated with the first valid match. If no match is found,\n * returns the `fallback` value.\n * `input` and `matchX` values must all be of the same type, and can be `number` or `string`. `outputX` and\n * `fallback` values must be of the same type, and can be of any kind.\n * * `['interpolate', interpolation, input, stop1, output1, ...stopN, outputN]` returns a value by interpolating between\n * pairs of inputs and outputs; `interpolation` can either be `['linear']` or `['exponential', base]` where `base` is\n * the rate of increase from stop A to stop B (i.e. power to which the interpolation ratio is raised); a value\n * of 1 is equivalent to `['linear']`.\n * `input` and `stopX` values must all be of type `number`. `outputX` values can be `number` or `color` values.\n * Note: `input` will be clamped between `stop1` and `stopN`, meaning that all output values will be comprised\n * between `output1` and `outputN`.\n *\n * * Logical operators:\n * * `['<', value1, value2]` returns `true` if `value1` is strictly lower than `value2`, or `false` otherwise.\n * * `['<=', value1, value2]` returns `true` if `value1` is lower than or equals `value2`, or `false` otherwise.\n * * `['>', value1, value2]` returns `true` if `value1` is strictly greater than `value2`, or `false` otherwise.\n * * `['>=', value1, value2]` returns `true` if `value1` is greater than or equals `value2`, or `false` otherwise.\n * * `['==', value1, value2]` returns `true` if `value1` equals `value2`, or `false` otherwise.\n * * `['!=', value1, value2]` returns `true` if `value1` does not equal `value2`, or `false` otherwise.\n * * `['!', value1]` returns `false` if `value1` is `true` or greater than `0`, or `true` otherwise.\n * * `['all', value1, value2, ...]` returns `true` if all the inputs are `true`, `false` otherwise.\n * * `['any', value1, value2, ...]` returns `true` if any of the inputs are `true`, `false` otherwise.\n * * `['between', value1, value2, value3]` returns `true` if `value1` is contained between `value2` and `value3`\n * (inclusively), or `false` otherwise.\n *\n * * Conversion operators:\n * * `['array', value1, ...valueN]` creates a numerical array from `number` values; please note that the amount of\n * values can currently only be 2, 3 or 4.\n * * `['color', red, green, blue, alpha]` creates a `color` value from `number` values; the `alpha` parameter is\n * optional; if not specified, it will be set to 1.\n * Note: `red`, `green` and `blue` components must be values between 0 and 255; `alpha` between 0 and 1.\n * * `['palette', index, colors]` picks a `color` value from an array of colors using the given index; the `index`\n * expression must evaluate to a number; the items in the `colors` array must be strings with hex colors\n * (e.g. `'#86A136'`), colors using the rgba[a] functional notation (e.g. `'rgb(134, 161, 54)'` or `'rgba(134, 161, 54, 1)'`),\n * named colors (e.g. `'red'`), or array literals with 3 ([r, g, b]) or 4 ([r, g, b, a]) values (with r, g, and b\n * in the 0-255 range and a in the 0-1 range).\n *\n * Values can either be literals or another operator, as they will be evaluated recursively.\n * Literal values can be of the following types:\n * * `boolean`\n * * `number`\n * * `string`\n * * {@link module:ol/color~Color}\n *\n * @typedef {Array<*>|import(\"../color.js\").Color|string|number|boolean} ExpressionValue\n * @api\n */\n\n/**\n * Possible inferred types from a given value or expression.\n * Note: these are binary flags.\n * @enum {number}\n */\nexport const ValueTypes = {\n NUMBER: 0b00001,\n STRING: 0b00010,\n COLOR: 0b00100,\n BOOLEAN: 0b01000,\n NUMBER_ARRAY: 0b10000,\n ANY: 0b11111,\n NONE: 0,\n};\n\n/**\n * An operator declaration must contain two methods: `getReturnType` which returns a type based on\n * the operator arguments, and `toGlsl` which returns a GLSL-compatible string.\n * Note: both methods can process arguments recursively.\n * @typedef {Object} Operator\n * @property {function(Array): ValueTypes|number} getReturnType Returns one or several types\n * @property {function(ParsingContext, Array, ValueTypes=): string} toGlsl Returns a GLSL-compatible string\n * Note: takes in an optional type hint as 3rd parameter\n */\n\n/**\n * Operator declarations\n * @type {Object}\n */\nexport const Operators = {};\n\n/**\n * Returns the possible types for a given value (each type being a binary flag)\n * To test a value use e.g. `getValueType(v) & ValueTypes.BOOLEAN`\n * @param {ExpressionValue} value Value\n * @return {ValueTypes|number} Type or types inferred from the value\n */\nexport function getValueType(value) {\n if (typeof value === 'number') {\n return ValueTypes.NUMBER;\n }\n if (typeof value === 'boolean') {\n return ValueTypes.BOOLEAN;\n }\n if (typeof value === 'string') {\n if (isStringColor(value)) {\n return ValueTypes.COLOR | ValueTypes.STRING;\n }\n return ValueTypes.STRING;\n }\n if (!Array.isArray(value)) {\n throw new Error(`Unhandled value type: ${JSON.stringify(value)}`);\n }\n const valueArr = /** @type {Array<*>} */ (value);\n const onlyNumbers = valueArr.every(function (v) {\n return typeof v === 'number';\n });\n if (onlyNumbers) {\n if (valueArr.length === 3 || valueArr.length === 4) {\n return ValueTypes.COLOR | ValueTypes.NUMBER_ARRAY;\n }\n return ValueTypes.NUMBER_ARRAY;\n }\n if (typeof valueArr[0] !== 'string') {\n throw new Error(\n `Expected an expression operator but received: ${JSON.stringify(\n valueArr\n )}`\n );\n }\n const operator = Operators[valueArr[0]];\n if (operator === undefined) {\n throw new Error(\n `Unrecognized expression operator: ${JSON.stringify(valueArr)}`\n );\n }\n return operator.getReturnType(valueArr.slice(1));\n}\n\n/**\n * Checks if only one value type is enabled in the input number.\n * @param {ValueTypes|number} valueType Number containing value type binary flags\n * @return {boolean} True if only one type flag is enabled, false if zero or multiple\n */\nexport function isTypeUnique(valueType) {\n return Math.log2(valueType) % 1 === 0;\n}\n\n/**\n * Context available during the parsing of an expression.\n * @typedef {Object} ParsingContext\n * @property {boolean} [inFragmentShader] If false, means the expression output should be made for a vertex shader\n * @property {Array} variables List of variables used in the expression; contains **unprefixed names**\n * @property {Array} attributes List of attributes used in the expression; contains **unprefixed names**\n * @property {Object} stringLiteralsMap This object maps all encountered string values to a number\n * @property {Object} functions Lookup of functions used by the style.\n * @property {number} [bandCount] Number of bands per pixel.\n * @property {Array} [paletteTextures] List of palettes used by the style.\n */\n\n/**\n * Will return the number as a float with a dot separator, which is required by GLSL.\n * @param {number} v Numerical value.\n * @return {string} The value as string.\n */\nexport function numberToGlsl(v) {\n const s = v.toString();\n return s.includes('.') ? s : s + '.0';\n}\n\n/**\n * Will return the number array as a float with a dot separator, concatenated with ', '.\n * @param {Array} array Numerical values array.\n * @return {string} The array as a vector, e. g.: `vec3(1.0, 2.0, 3.0)`.\n */\nexport function arrayToGlsl(array) {\n if (array.length < 2 || array.length > 4) {\n throw new Error(\n '`formatArray` can only output `vec2`, `vec3` or `vec4` arrays.'\n );\n }\n return `vec${array.length}(${array.map(numberToGlsl).join(', ')})`;\n}\n\n/**\n * Will normalize and converts to string a `vec4` color array compatible with GLSL.\n * @param {string|import(\"../color.js\").Color} color Color either in string format or [r, g, b, a] array format,\n * with RGB components in the 0..255 range and the alpha component in the 0..1 range.\n * Note that the final array will always have 4 components.\n * @return {string} The color expressed in the `vec4(1.0, 1.0, 1.0, 1.0)` form.\n */\nexport function colorToGlsl(color) {\n const array = asArray(color).slice();\n if (array.length < 4) {\n array.push(1);\n }\n return arrayToGlsl(\n array.map(function (c, i) {\n return i < 3 ? c / 255 : c;\n })\n );\n}\n\n/**\n * Returns a stable equivalent number for the string literal.\n * @param {ParsingContext} context Parsing context\n * @param {string} string String literal value\n * @return {number} Number equivalent\n */\nexport function getStringNumberEquivalent(context, string) {\n if (context.stringLiteralsMap[string] === undefined) {\n context.stringLiteralsMap[string] = Object.keys(\n context.stringLiteralsMap\n ).length;\n }\n return context.stringLiteralsMap[string];\n}\n\n/**\n * Returns a stable equivalent number for the string literal, for use in shaders. This number is then\n * converted to be a GLSL-compatible string.\n * @param {ParsingContext} context Parsing context\n * @param {string} string String literal value\n * @return {string} GLSL-compatible string containing a number\n */\nexport function stringToGlsl(context, string) {\n return numberToGlsl(getStringNumberEquivalent(context, string));\n}\n\n/**\n * Recursively parses a style expression and outputs a GLSL-compatible string. Takes in a parsing context that\n * will be read and modified during the parsing operation.\n * @param {ParsingContext} context Parsing context\n * @param {ExpressionValue} value Value\n * @param {ValueTypes|number} [typeHint] Hint for the expected final type (can be several types combined)\n * @return {string} GLSL-compatible output\n */\nexport function expressionToGlsl(context, value, typeHint) {\n // operator\n if (Array.isArray(value) && typeof value[0] === 'string') {\n const operator = Operators[value[0]];\n if (operator === undefined) {\n throw new Error(\n `Unrecognized expression operator: ${JSON.stringify(value)}`\n );\n }\n return operator.toGlsl(context, value.slice(1), typeHint);\n }\n\n const valueType = getValueType(value);\n if ((valueType & ValueTypes.NUMBER) > 0) {\n return numberToGlsl(/** @type {number} */ (value));\n }\n\n if ((valueType & ValueTypes.BOOLEAN) > 0) {\n return value.toString();\n }\n\n if (\n (valueType & ValueTypes.STRING) > 0 &&\n (typeHint === undefined || typeHint == ValueTypes.STRING)\n ) {\n return stringToGlsl(context, value.toString());\n }\n\n if (\n (valueType & ValueTypes.COLOR) > 0 &&\n (typeHint === undefined || typeHint == ValueTypes.COLOR)\n ) {\n return colorToGlsl(/** @type {Array | string} */ (value));\n }\n\n if ((valueType & ValueTypes.NUMBER_ARRAY) > 0) {\n return arrayToGlsl(/** @type {Array} */ (value));\n }\n\n throw new Error(`Unexpected expression ${value} (expected type ${typeHint})`);\n}\n\nfunction assertNumber(value) {\n if (!(getValueType(value) & ValueTypes.NUMBER)) {\n throw new Error(\n `A numeric value was expected, got ${JSON.stringify(value)} instead`\n );\n }\n}\nfunction assertNumbers(values) {\n for (let i = 0; i < values.length; i++) {\n assertNumber(values[i]);\n }\n}\nfunction assertString(value) {\n if (!(getValueType(value) & ValueTypes.STRING)) {\n throw new Error(\n `A string value was expected, got ${JSON.stringify(value)} instead`\n );\n }\n}\nfunction assertBoolean(value) {\n if (!(getValueType(value) & ValueTypes.BOOLEAN)) {\n throw new Error(\n `A boolean value was expected, got ${JSON.stringify(value)} instead`\n );\n }\n}\nfunction assertArgsCount(args, count) {\n if (args.length !== count) {\n throw new Error(\n `Exactly ${count} arguments were expected, got ${args.length} instead`\n );\n }\n}\nfunction assertArgsMinCount(args, count) {\n if (args.length < count) {\n throw new Error(\n `At least ${count} arguments were expected, got ${args.length} instead`\n );\n }\n}\nfunction assertArgsMaxCount(args, count) {\n if (args.length > count) {\n throw new Error(\n `At most ${count} arguments were expected, got ${args.length} instead`\n );\n }\n}\nfunction assertArgsEven(args) {\n if (args.length % 2 !== 0) {\n throw new Error(\n `An even amount of arguments was expected, got ${args} instead`\n );\n }\n}\nfunction assertArgsOdd(args) {\n if (args.length % 2 === 0) {\n throw new Error(\n `An odd amount of arguments was expected, got ${args} instead`\n );\n }\n}\nfunction assertUniqueInferredType(args, types) {\n if (!isTypeUnique(types)) {\n throw new Error(\n `Could not infer only one type from the following expression: ${JSON.stringify(\n args\n )}`\n );\n }\n}\n\nOperators['get'] = {\n getReturnType: function (args) {\n return ValueTypes.ANY;\n },\n toGlsl: function (context, args) {\n assertArgsCount(args, 1);\n assertString(args[0]);\n const value = args[0].toString();\n if (!context.attributes.includes(value)) {\n context.attributes.push(value);\n }\n const prefix = context.inFragmentShader ? 'v_' : 'a_';\n return prefix + value;\n },\n};\n\n/**\n * Get the uniform name given a variable name.\n * @param {string} variableName The variable name.\n * @return {string} The uniform name.\n */\nexport function uniformNameForVariable(variableName) {\n return 'u_var_' + variableName;\n}\n\nOperators['var'] = {\n getReturnType: function (args) {\n return ValueTypes.ANY;\n },\n toGlsl: function (context, args) {\n assertArgsCount(args, 1);\n assertString(args[0]);\n const value = args[0].toString();\n if (!context.variables.includes(value)) {\n context.variables.push(value);\n }\n return uniformNameForVariable(value);\n },\n};\n\nexport const PALETTE_TEXTURE_ARRAY = 'u_paletteTextures';\n\n// ['palette', index, colors]\nOperators['palette'] = {\n getReturnType: function (args) {\n return ValueTypes.COLOR;\n },\n toGlsl: function (context, args) {\n assertArgsCount(args, 2);\n assertNumber(args[0]);\n const index = expressionToGlsl(context, args[0]);\n const colors = args[1];\n if (!Array.isArray(colors)) {\n throw new Error('The second argument of palette must be an array');\n }\n const numColors = colors.length;\n const palette = new Uint8Array(numColors * 4);\n for (let i = 0; i < numColors; i++) {\n const candidate = colors[i];\n /**\n * @type {import('../color.js').Color}\n */\n let color;\n if (typeof candidate === 'string') {\n color = fromString(candidate);\n } else {\n if (!Array.isArray(candidate)) {\n throw new Error(\n 'The second argument of palette must be an array of strings or colors'\n );\n }\n const length = candidate.length;\n if (length === 4) {\n color = candidate;\n } else {\n if (length !== 3) {\n throw new Error(\n `Expected palette color to have 3 or 4 values, got ${length}`\n );\n }\n color = [candidate[0], candidate[1], candidate[2], 1];\n }\n }\n const offset = i * 4;\n palette[offset] = color[0];\n palette[offset + 1] = color[1];\n palette[offset + 2] = color[2];\n palette[offset + 3] = color[3] * 255;\n }\n if (!context.paletteTextures) {\n context.paletteTextures = [];\n }\n const paletteName = `${PALETTE_TEXTURE_ARRAY}[${context.paletteTextures.length}]`;\n const paletteTexture = new PaletteTexture(paletteName, palette);\n context.paletteTextures.push(paletteTexture);\n return `texture2D(${paletteName}, vec2((${index} + 0.5) / ${numColors}.0, 0.5))`;\n },\n};\n\nconst GET_BAND_VALUE_FUNC = 'getBandValue';\n\nOperators['band'] = {\n getReturnType: function (args) {\n return ValueTypes.NUMBER;\n },\n toGlsl: function (context, args) {\n assertArgsMinCount(args, 1);\n assertArgsMaxCount(args, 3);\n const band = args[0];\n\n if (!(GET_BAND_VALUE_FUNC in context.functions)) {\n let ifBlocks = '';\n const bandCount = context.bandCount || 1;\n for (let i = 0; i < bandCount; i++) {\n const colorIndex = Math.floor(i / 4);\n let bandIndex = i % 4;\n if (i === bandCount - 1 && bandIndex === 1) {\n // LUMINANCE_ALPHA - band 1 assigned to rgb and band 2 assigned to alpha\n bandIndex = 3;\n }\n const textureName = `${Uniforms.TILE_TEXTURE_ARRAY}[${colorIndex}]`;\n ifBlocks += `\n if (band == ${i + 1}.0) {\n return texture2D(${textureName}, v_textureCoord + vec2(dx, dy))[${bandIndex}];\n }\n `;\n }\n\n context.functions[GET_BAND_VALUE_FUNC] = `\n float getBandValue(float band, float xOffset, float yOffset) {\n float dx = xOffset / ${Uniforms.TEXTURE_PIXEL_WIDTH};\n float dy = yOffset / ${Uniforms.TEXTURE_PIXEL_HEIGHT};\n ${ifBlocks}\n }\n `;\n }\n\n const bandExpression = expressionToGlsl(context, band);\n const xOffsetExpression = expressionToGlsl(context, args[1] || 0);\n const yOffsetExpression = expressionToGlsl(context, args[2] || 0);\n return `${GET_BAND_VALUE_FUNC}(${bandExpression}, ${xOffsetExpression}, ${yOffsetExpression})`;\n },\n};\n\nOperators['time'] = {\n getReturnType: function (args) {\n return ValueTypes.NUMBER;\n },\n toGlsl: function (context, args) {\n assertArgsCount(args, 0);\n return 'u_time';\n },\n};\n\nOperators['zoom'] = {\n getReturnType: function (args) {\n return ValueTypes.NUMBER;\n },\n toGlsl: function (context, args) {\n assertArgsCount(args, 0);\n return 'u_zoom';\n },\n};\n\nOperators['resolution'] = {\n getReturnType: function (args) {\n return ValueTypes.NUMBER;\n },\n toGlsl: function (context, args) {\n assertArgsCount(args, 0);\n return 'u_resolution';\n },\n};\n\nOperators['*'] = {\n getReturnType: function (args) {\n return ValueTypes.NUMBER;\n },\n toGlsl: function (context, args) {\n assertArgsMinCount(args, 2);\n assertNumbers(args);\n return `(${args.map((arg) => expressionToGlsl(context, arg)).join(' * ')})`;\n },\n};\n\nOperators['/'] = {\n getReturnType: function (args) {\n return ValueTypes.NUMBER;\n },\n toGlsl: function (context, args) {\n assertArgsCount(args, 2);\n assertNumbers(args);\n return `(${expressionToGlsl(context, args[0])} / ${expressionToGlsl(\n context,\n args[1]\n )})`;\n },\n};\n\nOperators['+'] = {\n getReturnType: function (args) {\n return ValueTypes.NUMBER;\n },\n toGlsl: function (context, args) {\n assertArgsMinCount(args, 2);\n assertNumbers(args);\n\n return `(${args.map((arg) => expressionToGlsl(context, arg)).join(' + ')})`;\n },\n};\n\nOperators['-'] = {\n getReturnType: function (args) {\n return ValueTypes.NUMBER;\n },\n toGlsl: function (context, args) {\n assertArgsCount(args, 2);\n assertNumbers(args);\n return `(${expressionToGlsl(context, args[0])} - ${expressionToGlsl(\n context,\n args[1]\n )})`;\n },\n};\n\nOperators['clamp'] = {\n getReturnType: function (args) {\n return ValueTypes.NUMBER;\n },\n toGlsl: function (context, args) {\n assertArgsCount(args, 3);\n assertNumbers(args);\n const min = expressionToGlsl(context, args[1]);\n const max = expressionToGlsl(context, args[2]);\n return `clamp(${expressionToGlsl(context, args[0])}, ${min}, ${max})`;\n },\n};\n\nOperators['%'] = {\n getReturnType: function (args) {\n return ValueTypes.NUMBER;\n },\n toGlsl: function (context, args) {\n assertArgsCount(args, 2);\n assertNumbers(args);\n return `mod(${expressionToGlsl(context, args[0])}, ${expressionToGlsl(\n context,\n args[1]\n )})`;\n },\n};\n\nOperators['^'] = {\n getReturnType: function (args) {\n return ValueTypes.NUMBER;\n },\n toGlsl: function (context, args) {\n assertArgsCount(args, 2);\n assertNumbers(args);\n return `pow(${expressionToGlsl(context, args[0])}, ${expressionToGlsl(\n context,\n args[1]\n )})`;\n },\n};\n\nOperators['abs'] = {\n getReturnType: function (args) {\n return ValueTypes.NUMBER;\n },\n toGlsl: function (context, args) {\n assertArgsCount(args, 1);\n assertNumbers(args);\n return `abs(${expressionToGlsl(context, args[0])})`;\n },\n};\n\nOperators['floor'] = {\n getReturnType: function (args) {\n return ValueTypes.NUMBER;\n },\n toGlsl: function (context, args) {\n assertArgsCount(args, 1);\n assertNumbers(args);\n return `floor(${expressionToGlsl(context, args[0])})`;\n },\n};\n\nOperators['round'] = {\n getReturnType: function (args) {\n return ValueTypes.NUMBER;\n },\n toGlsl: function (context, args) {\n assertArgsCount(args, 1);\n assertNumbers(args);\n return `floor(${expressionToGlsl(context, args[0])} + 0.5)`;\n },\n};\n\nOperators['ceil'] = {\n getReturnType: function (args) {\n return ValueTypes.NUMBER;\n },\n toGlsl: function (context, args) {\n assertArgsCount(args, 1);\n assertNumbers(args);\n return `ceil(${expressionToGlsl(context, args[0])})`;\n },\n};\n\nOperators['sin'] = {\n getReturnType: function (args) {\n return ValueTypes.NUMBER;\n },\n toGlsl: function (context, args) {\n assertArgsCount(args, 1);\n assertNumbers(args);\n return `sin(${expressionToGlsl(context, args[0])})`;\n },\n};\n\nOperators['cos'] = {\n getReturnType: function (args) {\n return ValueTypes.NUMBER;\n },\n toGlsl: function (context, args) {\n assertArgsCount(args, 1);\n assertNumbers(args);\n return `cos(${expressionToGlsl(context, args[0])})`;\n },\n};\n\nOperators['atan'] = {\n getReturnType: function (args) {\n return ValueTypes.NUMBER;\n },\n toGlsl: function (context, args) {\n assertArgsMinCount(args, 1);\n assertArgsMaxCount(args, 2);\n assertNumbers(args);\n return args.length === 2\n ? `atan(${expressionToGlsl(context, args[0])}, ${expressionToGlsl(\n context,\n args[1]\n )})`\n : `atan(${expressionToGlsl(context, args[0])})`;\n },\n};\n\nOperators['>'] = {\n getReturnType: function (args) {\n return ValueTypes.BOOLEAN;\n },\n toGlsl: function (context, args) {\n assertArgsCount(args, 2);\n assertNumbers(args);\n return `(${expressionToGlsl(context, args[0])} > ${expressionToGlsl(\n context,\n args[1]\n )})`;\n },\n};\n\nOperators['>='] = {\n getReturnType: function (args) {\n return ValueTypes.BOOLEAN;\n },\n toGlsl: function (context, args) {\n assertArgsCount(args, 2);\n assertNumbers(args);\n return `(${expressionToGlsl(context, args[0])} >= ${expressionToGlsl(\n context,\n args[1]\n )})`;\n },\n};\n\nOperators['<'] = {\n getReturnType: function (args) {\n return ValueTypes.BOOLEAN;\n },\n toGlsl: function (context, args) {\n assertArgsCount(args, 2);\n assertNumbers(args);\n return `(${expressionToGlsl(context, args[0])} < ${expressionToGlsl(\n context,\n args[1]\n )})`;\n },\n};\n\nOperators['<='] = {\n getReturnType: function (args) {\n return ValueTypes.BOOLEAN;\n },\n toGlsl: function (context, args) {\n assertArgsCount(args, 2);\n assertNumbers(args);\n return `(${expressionToGlsl(context, args[0])} <= ${expressionToGlsl(\n context,\n args[1]\n )})`;\n },\n};\n\nfunction getEqualOperator(operator) {\n return {\n getReturnType: function (args) {\n return ValueTypes.BOOLEAN;\n },\n toGlsl: function (context, args) {\n assertArgsCount(args, 2);\n\n // find common type\n let type = ValueTypes.ANY;\n for (let i = 0; i < args.length; i++) {\n type &= getValueType(args[i]);\n }\n if (type === ValueTypes.NONE) {\n throw new Error(\n `All arguments should be of compatible type, got ${JSON.stringify(\n args\n )} instead`\n );\n }\n\n // Since it's not possible to have color types here, we can leave it out\n // This fixes issues in case the value type is ambiguously detected as a color (e.g. the string 'red')\n type &= ~ValueTypes.COLOR;\n\n return `(${expressionToGlsl(\n context,\n args[0],\n type\n )} ${operator} ${expressionToGlsl(context, args[1], type)})`;\n },\n };\n}\n\nOperators['=='] = getEqualOperator('==');\n\nOperators['!='] = getEqualOperator('!=');\n\nOperators['!'] = {\n getReturnType: function (args) {\n return ValueTypes.BOOLEAN;\n },\n toGlsl: function (context, args) {\n assertArgsCount(args, 1);\n assertBoolean(args[0]);\n return `(!${expressionToGlsl(context, args[0])})`;\n },\n};\n\nfunction getDecisionOperator(operator) {\n return {\n getReturnType: function (args) {\n return ValueTypes.BOOLEAN;\n },\n toGlsl: function (context, args) {\n assertArgsMinCount(args, 2);\n for (let i = 0; i < args.length; i++) {\n assertBoolean(args[i]);\n }\n let result = '';\n result = args\n .map((arg) => expressionToGlsl(context, arg))\n .join(` ${operator} `);\n result = `(${result})`;\n return result;\n },\n };\n}\n\nOperators['all'] = getDecisionOperator('&&');\n\nOperators['any'] = getDecisionOperator('||');\n\nOperators['between'] = {\n getReturnType: function (args) {\n return ValueTypes.BOOLEAN;\n },\n toGlsl: function (context, args) {\n assertArgsCount(args, 3);\n assertNumbers(args);\n const min = expressionToGlsl(context, args[1]);\n const max = expressionToGlsl(context, args[2]);\n const value = expressionToGlsl(context, args[0]);\n return `(${value} >= ${min} && ${value} <= ${max})`;\n },\n};\n\nOperators['array'] = {\n getReturnType: function (args) {\n return ValueTypes.NUMBER_ARRAY;\n },\n toGlsl: function (context, args) {\n assertArgsMinCount(args, 2);\n assertArgsMaxCount(args, 4);\n assertNumbers(args);\n const parsedArgs = args.map(function (val) {\n return expressionToGlsl(context, val, ValueTypes.NUMBER);\n });\n return `vec${args.length}(${parsedArgs.join(', ')})`;\n },\n};\n\nOperators['color'] = {\n getReturnType: function (args) {\n return ValueTypes.COLOR;\n },\n toGlsl: function (context, args) {\n assertArgsMinCount(args, 3);\n assertArgsMaxCount(args, 4);\n assertNumbers(args);\n const array = /** @type {Array} */ (args);\n if (args.length === 3) {\n array.push(1);\n }\n const parsedArgs = args.map(function (val, i) {\n return (\n expressionToGlsl(context, val, ValueTypes.NUMBER) +\n (i < 3 ? ' / 255.0' : '')\n );\n });\n return `vec${args.length}(${parsedArgs.join(', ')})`;\n },\n};\n\nOperators['interpolate'] = {\n getReturnType: function (args) {\n let type = ValueTypes.COLOR | ValueTypes.NUMBER;\n for (let i = 3; i < args.length; i += 2) {\n type = type & getValueType(args[i]);\n }\n return type;\n },\n toGlsl: function (context, args, typeHint) {\n assertArgsEven(args);\n assertArgsMinCount(args, 6);\n\n // validate interpolation type\n const type = args[0];\n let interpolation;\n switch (type[0]) {\n case 'linear':\n interpolation = 1;\n break;\n case 'exponential':\n interpolation = type[1];\n break;\n default:\n interpolation = null;\n }\n if (!interpolation) {\n throw new Error(\n `Invalid interpolation type for \"interpolate\" operator, received: ${JSON.stringify(\n type\n )}`\n );\n }\n\n // compute input/output types\n typeHint = typeHint !== undefined ? typeHint : ValueTypes.ANY;\n const outputType = Operators['interpolate'].getReturnType(args) & typeHint;\n assertUniqueInferredType(args, outputType);\n\n const input = expressionToGlsl(context, args[1]);\n const exponent = numberToGlsl(interpolation);\n\n let result = '';\n for (let i = 2; i < args.length - 2; i += 2) {\n const stop1 = expressionToGlsl(context, args[i]);\n const output1 =\n result || expressionToGlsl(context, args[i + 1], outputType);\n const stop2 = expressionToGlsl(context, args[i + 2]);\n const output2 = expressionToGlsl(context, args[i + 3], outputType);\n result = `mix(${output1}, ${output2}, pow(clamp((${input} - ${stop1}) / (${stop2} - ${stop1}), 0.0, 1.0), ${exponent}))`;\n }\n return result;\n },\n};\n\nOperators['match'] = {\n getReturnType: function (args) {\n let type = ValueTypes.ANY;\n for (let i = 2; i < args.length; i += 2) {\n type = type & getValueType(args[i]);\n }\n type = type & getValueType(args[args.length - 1]);\n return type;\n },\n toGlsl: function (context, args, typeHint) {\n assertArgsEven(args);\n assertArgsMinCount(args, 4);\n\n typeHint = typeHint !== undefined ? typeHint : ValueTypes.ANY;\n const outputType = Operators['match'].getReturnType(args) & typeHint;\n assertUniqueInferredType(args, outputType);\n\n const input = expressionToGlsl(context, args[0]);\n const fallback = expressionToGlsl(\n context,\n args[args.length - 1],\n outputType\n );\n let result = null;\n for (let i = args.length - 3; i >= 1; i -= 2) {\n const match = expressionToGlsl(context, args[i]);\n const output = expressionToGlsl(context, args[i + 1], outputType);\n result = `(${input} == ${match} ? ${output} : ${result || fallback})`;\n }\n return result;\n },\n};\n\nOperators['case'] = {\n getReturnType: function (args) {\n let type = ValueTypes.ANY;\n for (let i = 1; i < args.length; i += 2) {\n type = type & getValueType(args[i]);\n }\n type = type & getValueType(args[args.length - 1]);\n return type;\n },\n toGlsl: function (context, args, typeHint) {\n assertArgsOdd(args);\n assertArgsMinCount(args, 3);\n\n typeHint = typeHint !== undefined ? typeHint : ValueTypes.ANY;\n const outputType = Operators['case'].getReturnType(args) & typeHint;\n assertUniqueInferredType(args, outputType);\n for (let i = 0; i < args.length - 1; i += 2) {\n assertBoolean(args[i]);\n }\n\n const fallback = expressionToGlsl(\n context,\n args[args.length - 1],\n outputType\n );\n let result = null;\n for (let i = args.length - 3; i >= 0; i -= 2) {\n const condition = expressionToGlsl(context, args[i]);\n const output = expressionToGlsl(context, args[i + 1], outputType);\n result = `(${condition} ? ${output} : ${result || fallback})`;\n }\n return result;\n },\n};\n","/**\n * Classes and utilities for generating shaders from literal style objects\n * @module ol/webgl/ShaderBuilder\n */\n\nimport {\n ValueTypes,\n expressionToGlsl,\n getStringNumberEquivalent,\n uniformNameForVariable,\n} from '../style/expressions.js';\n\n/**\n * @typedef {Object} VaryingDescription\n * @property {string} name Varying name, as will be declared in the header.\n * @property {string} type Varying type, either `float`, `vec2`, `vec4`...\n * @property {string} expression Expression which will be assigned to the varying in the vertex shader, and\n * passed on to the fragment shader.\n */\n\n/**\n * @classdesc\n * This class implements a classic builder pattern for generating many different types of shaders.\n * Methods can be chained, e. g.:\n *\n * ```js\n * const shader = new ShaderBuilder()\n * .addVarying('v_width', 'float', 'a_width')\n * .addUniform('u_time')\n * .setColorExpression('...')\n * .setSizeExpression('...')\n * .outputSymbolFragmentShader();\n * ```\n */\nexport class ShaderBuilder {\n constructor() {\n /**\n * Uniforms; these will be declared in the header (should include the type).\n * @type {Array}\n * @private\n */\n this.uniforms = [];\n\n /**\n * Attributes; these will be declared in the header (should include the type).\n * @type {Array}\n * @private\n */\n this.attributes = [];\n\n /**\n * Varyings with a name, a type and an expression.\n * @type {Array}\n * @private\n */\n this.varyings = [];\n\n /**\n * @type {string}\n * @private\n */\n this.sizeExpression = 'vec2(1.0)';\n\n /**\n * @type {string}\n * @private\n */\n this.rotationExpression = '0.0';\n\n /**\n * @type {string}\n * @private\n */\n this.offsetExpression = 'vec2(0.0)';\n\n /**\n * @type {string}\n * @private\n */\n this.colorExpression = 'vec4(1.0)';\n\n /**\n * @type {string}\n * @private\n */\n this.texCoordExpression = 'vec4(0.0, 0.0, 1.0, 1.0)';\n\n /**\n * @type {string}\n * @private\n */\n this.discardExpression = 'false';\n\n /**\n * @type {boolean}\n * @private\n */\n this.rotateWithView = false;\n }\n\n /**\n * Adds a uniform accessible in both fragment and vertex shaders.\n * The given name should include a type, such as `sampler2D u_texture`.\n * @param {string} name Uniform name\n * @return {ShaderBuilder} the builder object\n */\n addUniform(name) {\n this.uniforms.push(name);\n return this;\n }\n\n /**\n * Adds an attribute accessible in the vertex shader, read from the geometry buffer.\n * The given name should include a type, such as `vec2 a_position`.\n * @param {string} name Attribute name\n * @return {ShaderBuilder} the builder object\n */\n addAttribute(name) {\n this.attributes.push(name);\n return this;\n }\n\n /**\n * Adds a varying defined in the vertex shader and accessible from the fragment shader.\n * The type and expression of the varying have to be specified separately.\n * @param {string} name Varying name\n * @param {'float'|'vec2'|'vec3'|'vec4'} type Type\n * @param {string} expression Expression used to assign a value to the varying.\n * @return {ShaderBuilder} the builder object\n */\n addVarying(name, type, expression) {\n this.varyings.push({\n name: name,\n type: type,\n expression: expression,\n });\n return this;\n }\n\n /**\n * Sets an expression to compute the size of the shape.\n * This expression can use all the uniforms and attributes available\n * in the vertex shader, and should evaluate to a `vec2` value.\n * @param {string} expression Size expression\n * @return {ShaderBuilder} the builder object\n */\n setSizeExpression(expression) {\n this.sizeExpression = expression;\n return this;\n }\n\n /**\n * Sets an expression to compute the rotation of the shape.\n * This expression can use all the uniforms and attributes available\n * in the vertex shader, and should evaluate to a `float` value in radians.\n * @param {string} expression Size expression\n * @return {ShaderBuilder} the builder object\n */\n setRotationExpression(expression) {\n this.rotationExpression = expression;\n return this;\n }\n\n /**\n * Sets an expression to compute the offset of the symbol from the point center.\n * This expression can use all the uniforms and attributes available\n * in the vertex shader, and should evaluate to a `vec2` value.\n * Note: will only be used for point geometry shaders.\n * @param {string} expression Offset expression\n * @return {ShaderBuilder} the builder object\n */\n setSymbolOffsetExpression(expression) {\n this.offsetExpression = expression;\n return this;\n }\n\n /**\n * Sets an expression to compute the color of the shape.\n * This expression can use all the uniforms, varyings and attributes available\n * in the fragment shader, and should evaluate to a `vec4` value.\n * @param {string} expression Color expression\n * @return {ShaderBuilder} the builder object\n */\n setColorExpression(expression) {\n this.colorExpression = expression;\n return this;\n }\n\n /**\n * Sets an expression to compute the texture coordinates of the vertices.\n * This expression can use all the uniforms and attributes available\n * in the vertex shader, and should evaluate to a `vec4` value.\n * @param {string} expression Texture coordinate expression\n * @return {ShaderBuilder} the builder object\n */\n setTextureCoordinateExpression(expression) {\n this.texCoordExpression = expression;\n return this;\n }\n\n /**\n * Sets an expression to determine whether a fragment (pixel) should be discarded,\n * i.e. not drawn at all.\n * This expression can use all the uniforms, varyings and attributes available\n * in the fragment shader, and should evaluate to a `bool` value (it will be\n * used in an `if` statement)\n * @param {string} expression Fragment discard expression\n * @return {ShaderBuilder} the builder object\n */\n setFragmentDiscardExpression(expression) {\n this.discardExpression = expression;\n return this;\n }\n\n /**\n * Sets whether the symbols should rotate with the view or stay aligned with the map.\n * Note: will only be used for point geometry shaders.\n * @param {boolean} rotateWithView Rotate with view\n * @return {ShaderBuilder} the builder object\n */\n setSymbolRotateWithView(rotateWithView) {\n this.rotateWithView = rotateWithView;\n return this;\n }\n\n /**\n * @return {string} Previously set size expression\n */\n getSizeExpression() {\n return this.sizeExpression;\n }\n\n /**\n * @return {string} Previously set symbol offset expression\n */\n getOffsetExpression() {\n return this.offsetExpression;\n }\n\n /**\n * @return {string} Previously set color expression\n */\n getColorExpression() {\n return this.colorExpression;\n }\n\n /**\n * @return {string} Previously set texture coordinate expression\n */\n getTextureCoordinateExpression() {\n return this.texCoordExpression;\n }\n\n /**\n * @return {string} Previously set fragment discard expression\n */\n getFragmentDiscardExpression() {\n return this.discardExpression;\n }\n\n /**\n * Generates a symbol vertex shader from the builder parameters,\n * intended to be used on point geometries.\n *\n * Four uniforms are hardcoded in all shaders: `u_projectionMatrix`, `u_offsetScaleMatrix`,\n * `u_offsetRotateMatrix`, `u_time`.\n *\n * The following attributes are hardcoded and expected to be present in the vertex buffers:\n * `vec2 a_position`, `float a_index` (being the index of the vertex in the quad, 0 to 3).\n *\n * The following varyings are hardcoded and gives the coordinate of the pixel both in the quad and on the texture:\n * `vec2 v_quadCoord`, `vec2 v_texCoord`\n *\n * @param {boolean} [forHitDetection] If true, the shader will be modified to include hit detection variables\n * (namely, hit color with encoded feature id).\n * @return {string} The full shader as a string.\n */\n getSymbolVertexShader(forHitDetection) {\n const offsetMatrix = this.rotateWithView\n ? 'u_offsetScaleMatrix * u_offsetRotateMatrix'\n : 'u_offsetScaleMatrix';\n\n let attributes = this.attributes;\n let varyings = this.varyings;\n\n if (forHitDetection) {\n attributes = attributes.concat('vec4 a_hitColor');\n varyings = varyings.concat({\n name: 'v_hitColor',\n type: 'vec4',\n expression: 'a_hitColor',\n });\n }\n\n return `precision mediump float;\nuniform mat4 u_projectionMatrix;\nuniform mat4 u_offsetScaleMatrix;\nuniform mat4 u_offsetRotateMatrix;\nuniform float u_time;\nuniform float u_zoom;\nuniform float u_resolution;\n${this.uniforms\n .map(function (uniform) {\n return 'uniform ' + uniform + ';';\n })\n .join('\\n')}\nattribute vec2 a_position;\nattribute float a_index;\n${attributes\n .map(function (attribute) {\n return 'attribute ' + attribute + ';';\n })\n .join('\\n')}\nvarying vec2 v_texCoord;\nvarying vec2 v_quadCoord;\n${varyings\n .map(function (varying) {\n return 'varying ' + varying.type + ' ' + varying.name + ';';\n })\n .join('\\n')}\nvoid main(void) {\n mat4 offsetMatrix = ${offsetMatrix};\n vec2 halfSize = ${this.sizeExpression} * 0.5;\n vec2 offset = ${this.offsetExpression};\n float angle = ${this.rotationExpression};\n float offsetX;\n float offsetY;\n if (a_index == 0.0) {\n offsetX = (offset.x - halfSize.x) * cos(angle) + (offset.y - halfSize.y) * sin(angle);\n offsetY = (offset.y - halfSize.y) * cos(angle) - (offset.x - halfSize.x) * sin(angle);\n } else if (a_index == 1.0) {\n offsetX = (offset.x + halfSize.x) * cos(angle) + (offset.y - halfSize.y) * sin(angle);\n offsetY = (offset.y - halfSize.y) * cos(angle) - (offset.x + halfSize.x) * sin(angle);\n } else if (a_index == 2.0) {\n offsetX = (offset.x + halfSize.x) * cos(angle) + (offset.y + halfSize.y) * sin(angle);\n offsetY = (offset.y + halfSize.y) * cos(angle) - (offset.x + halfSize.x) * sin(angle);\n } else {\n offsetX = (offset.x - halfSize.x) * cos(angle) + (offset.y + halfSize.y) * sin(angle);\n offsetY = (offset.y + halfSize.y) * cos(angle) - (offset.x - halfSize.x) * sin(angle);\n }\n vec4 offsets = offsetMatrix * vec4(offsetX, offsetY, 0.0, 0.0);\n gl_Position = u_projectionMatrix * vec4(a_position, 0.0, 1.0) + offsets;\n vec4 texCoord = ${this.texCoordExpression};\n float u = a_index == 0.0 || a_index == 3.0 ? texCoord.s : texCoord.p;\n float v = a_index == 2.0 || a_index == 3.0 ? texCoord.t : texCoord.q;\n v_texCoord = vec2(u, v);\n u = a_index == 0.0 || a_index == 3.0 ? 0.0 : 1.0;\n v = a_index == 2.0 || a_index == 3.0 ? 0.0 : 1.0;\n v_quadCoord = vec2(u, v);\n${varyings\n .map(function (varying) {\n return ' ' + varying.name + ' = ' + varying.expression + ';';\n })\n .join('\\n')}\n}`;\n }\n\n /**\n * Generates a symbol fragment shader from the builder parameters,\n * intended to be used on point geometries.\n *\n * Expects the following varyings to be transmitted by the vertex shader:\n * `vec2 v_quadCoord`, `vec2 v_texCoord`\n *\n * @param {boolean} [forHitDetection] If true, the shader will be modified to include hit detection variables\n * (namely, hit color with encoded feature id).\n * @return {string} The full shader as a string.\n */\n getSymbolFragmentShader(forHitDetection) {\n const hitDetectionBypass = forHitDetection\n ? ' if (gl_FragColor.a < 0.1) { discard; } gl_FragColor = v_hitColor;'\n : '';\n\n let varyings = this.varyings;\n\n if (forHitDetection) {\n varyings = varyings.concat({\n name: 'v_hitColor',\n type: 'vec4',\n expression: 'a_hitColor',\n });\n }\n\n return `precision mediump float;\nuniform float u_time;\nuniform float u_zoom;\nuniform float u_resolution;\n${this.uniforms\n .map(function (uniform) {\n return 'uniform ' + uniform + ';';\n })\n .join('\\n')}\nvarying vec2 v_texCoord;\nvarying vec2 v_quadCoord;\n${varyings\n .map(function (varying) {\n return 'varying ' + varying.type + ' ' + varying.name + ';';\n })\n .join('\\n')}\nvoid main(void) {\n if (${this.discardExpression}) { discard; }\n gl_FragColor = ${this.colorExpression};\n gl_FragColor.rgb *= gl_FragColor.a;\n${hitDetectionBypass}\n}`;\n }\n}\n\n/**\n * @typedef {Object} StyleParseResult\n * @property {ShaderBuilder} builder Shader builder pre-configured according to a given style\n * @property {Object} uniforms Uniform definitions.\n * @property {Array} attributes Attribute descriptions.\n */\n\n/**\n * Parses a {@link import(\"../style/literal\").LiteralStyle} object and returns a {@link ShaderBuilder}\n * object that has been configured according to the given style, as well as `attributes` and `uniforms`\n * arrays to be fed to the `WebGLPointsRenderer` class.\n *\n * Also returns `uniforms` and `attributes` properties as expected by the\n * {@link module:ol/renderer/webgl/PointsLayer~WebGLPointsLayerRenderer}.\n *\n * @param {import(\"../style/literal\").LiteralStyle} style Literal style.\n * @return {StyleParseResult} Result containing shader params, attributes and uniforms.\n */\nexport function parseLiteralStyle(style) {\n const symbStyle = style.symbol;\n const size = symbStyle.size !== undefined ? symbStyle.size : 1;\n const color = symbStyle.color || 'white';\n const texCoord = symbStyle.textureCoord || [0, 0, 1, 1];\n const offset = symbStyle.offset || [0, 0];\n const opacity = symbStyle.opacity !== undefined ? symbStyle.opacity : 1;\n const rotation = symbStyle.rotation !== undefined ? symbStyle.rotation : 0;\n\n /**\n * @type {import(\"../style/expressions.js\").ParsingContext}\n */\n const vertContext = {\n inFragmentShader: false,\n variables: [],\n attributes: [],\n stringLiteralsMap: {},\n functions: {},\n };\n const parsedSize = expressionToGlsl(\n vertContext,\n size,\n ValueTypes.NUMBER_ARRAY | ValueTypes.NUMBER\n );\n const parsedOffset = expressionToGlsl(\n vertContext,\n offset,\n ValueTypes.NUMBER_ARRAY\n );\n const parsedTexCoord = expressionToGlsl(\n vertContext,\n texCoord,\n ValueTypes.NUMBER_ARRAY\n );\n const parsedRotation = expressionToGlsl(\n vertContext,\n rotation,\n ValueTypes.NUMBER\n );\n\n /**\n * @type {import(\"../style/expressions.js\").ParsingContext}\n */\n const fragContext = {\n inFragmentShader: true,\n variables: vertContext.variables,\n attributes: [],\n stringLiteralsMap: vertContext.stringLiteralsMap,\n functions: {},\n };\n const parsedColor = expressionToGlsl(fragContext, color, ValueTypes.COLOR);\n const parsedOpacity = expressionToGlsl(\n fragContext,\n opacity,\n ValueTypes.NUMBER\n );\n\n let opacityFilter = '1.0';\n const visibleSize = `vec2(${expressionToGlsl(\n fragContext,\n size,\n ValueTypes.NUMBER_ARRAY | ValueTypes.NUMBER\n )}).x`;\n switch (symbStyle.symbolType) {\n case 'square':\n break;\n case 'image':\n break;\n // taken from https://thebookofshaders.com/07/\n case 'circle':\n opacityFilter = `(1.0-smoothstep(1.-4./${visibleSize},1.,dot(v_quadCoord-.5,v_quadCoord-.5)*4.))`;\n break;\n case 'triangle':\n const st = '(v_quadCoord*2.-1.)';\n const a = `(atan(${st}.x,${st}.y))`;\n opacityFilter = `(1.0-smoothstep(.5-3./${visibleSize},.5,cos(floor(.5+${a}/2.094395102)*2.094395102-${a})*length(${st})))`;\n break;\n\n default:\n throw new Error('Unexpected symbol type: ' + symbStyle.symbolType);\n }\n\n const builder = new ShaderBuilder()\n .setSizeExpression(`vec2(${parsedSize})`)\n .setRotationExpression(parsedRotation)\n .setSymbolOffsetExpression(parsedOffset)\n .setTextureCoordinateExpression(parsedTexCoord)\n .setSymbolRotateWithView(!!symbStyle.rotateWithView)\n .setColorExpression(\n `vec4(${parsedColor}.rgb, ${parsedColor}.a * ${parsedOpacity} * ${opacityFilter})`\n );\n\n if (style.filter) {\n const parsedFilter = expressionToGlsl(\n fragContext,\n style.filter,\n ValueTypes.BOOLEAN\n );\n builder.setFragmentDiscardExpression(`!${parsedFilter}`);\n }\n\n /** @type {Object} */\n const uniforms = {};\n\n // define one uniform per variable\n fragContext.variables.forEach(function (varName) {\n const uniformName = uniformNameForVariable(varName);\n builder.addUniform(`float ${uniformName}`);\n uniforms[uniformName] = function () {\n if (!style.variables || style.variables[varName] === undefined) {\n throw new Error(\n `The following variable is missing from the style: ${varName}`\n );\n }\n let value = style.variables[varName];\n if (typeof value === 'string') {\n value = getStringNumberEquivalent(vertContext, value);\n }\n return value !== undefined ? value : -9999999; // to avoid matching with the first string literal\n };\n });\n\n if (symbStyle.symbolType === 'image' && symbStyle.src) {\n const texture = new Image();\n texture.crossOrigin =\n symbStyle.crossOrigin === undefined ? 'anonymous' : symbStyle.crossOrigin;\n texture.src = symbStyle.src;\n builder\n .addUniform('sampler2D u_texture')\n .setColorExpression(\n builder.getColorExpression() + ' * texture2D(u_texture, v_texCoord)'\n );\n uniforms['u_texture'] = texture;\n }\n\n // for each feature attribute used in the fragment shader, define a varying that will be used to pass data\n // from the vertex to the fragment shader, as well as an attribute in the vertex shader (if not already present)\n fragContext.attributes.forEach(function (attrName) {\n if (!vertContext.attributes.includes(attrName)) {\n vertContext.attributes.push(attrName);\n }\n builder.addVarying(`v_${attrName}`, 'float', `a_${attrName}`);\n });\n\n // for each feature attribute used in the vertex shader, define an attribute in the vertex shader.\n vertContext.attributes.forEach(function (attrName) {\n builder.addAttribute(`float a_${attrName}`);\n });\n\n return {\n builder: builder,\n attributes: vertContext.attributes.map(function (attributeName) {\n return {\n name: attributeName,\n callback: function (feature, props) {\n let value = props[attributeName];\n if (typeof value === 'string') {\n value = getStringNumberEquivalent(vertContext, value);\n }\n return value !== undefined ? value : -9999999; // to avoid matching with the first string literal\n },\n };\n }),\n uniforms: uniforms,\n };\n}\n","/**\n * @module ol/style/Image\n */\nimport {abstract} from '../util.js';\nimport {toSize} from '../size.js';\n\n/**\n * @typedef {Object} Options\n * @property {number} opacity Opacity.\n * @property {boolean} rotateWithView If the image should get rotated with the view.\n * @property {number} rotation Rotation.\n * @property {number|import(\"../size.js\").Size} scale Scale.\n * @property {Array} displacement Displacement.\n * @property {\"declutter\"|\"obstacle\"|\"none\"|undefined} declutterMode Declutter mode: `declutter`, `obstacle`, 'none */\n\n/**\n * @classdesc\n * A base class used for creating subclasses and not instantiated in\n * apps. Base class for {@link module:ol/style/Icon~Icon}, {@link module:ol/style/Circle~CircleStyle} and\n * {@link module:ol/style/RegularShape~RegularShape}.\n * @abstract\n * @api\n */\nclass ImageStyle {\n /**\n * @param {Options} options Options.\n */\n constructor(options) {\n /**\n * @private\n * @type {number}\n */\n this.opacity_ = options.opacity;\n\n /**\n * @private\n * @type {boolean}\n */\n this.rotateWithView_ = options.rotateWithView;\n\n /**\n * @private\n * @type {number}\n */\n this.rotation_ = options.rotation;\n\n /**\n * @private\n * @type {number|import(\"../size.js\").Size}\n */\n this.scale_ = options.scale;\n\n /**\n * @private\n * @type {import(\"../size.js\").Size}\n */\n this.scaleArray_ = toSize(options.scale);\n\n /**\n * @private\n * @type {Array}\n */\n this.displacement_ = options.displacement;\n\n /**\n * @private\n * @type {\"declutter\"|\"obstacle\"|\"none\"|undefined}\n */\n this.declutterMode_ = options.declutterMode;\n }\n\n /**\n * Clones the style.\n * @return {ImageStyle} The cloned style.\n * @api\n */\n clone() {\n const scale = this.getScale();\n return new ImageStyle({\n opacity: this.getOpacity(),\n scale: Array.isArray(scale) ? scale.slice() : scale,\n rotation: this.getRotation(),\n rotateWithView: this.getRotateWithView(),\n displacement: this.getDisplacement().slice(),\n declutterMode: this.getDeclutterMode(),\n });\n }\n\n /**\n * Get the symbolizer opacity.\n * @return {number} Opacity.\n * @api\n */\n getOpacity() {\n return this.opacity_;\n }\n\n /**\n * Determine whether the symbolizer rotates with the map.\n * @return {boolean} Rotate with map.\n * @api\n */\n getRotateWithView() {\n return this.rotateWithView_;\n }\n\n /**\n * Get the symoblizer rotation.\n * @return {number} Rotation.\n * @api\n */\n getRotation() {\n return this.rotation_;\n }\n\n /**\n * Get the symbolizer scale.\n * @return {number|import(\"../size.js\").Size} Scale.\n * @api\n */\n getScale() {\n return this.scale_;\n }\n\n /**\n * Get the symbolizer scale array.\n * @return {import(\"../size.js\").Size} Scale array.\n */\n getScaleArray() {\n return this.scaleArray_;\n }\n\n /**\n * Get the displacement of the shape\n * @return {Array} Shape's center displacement\n * @api\n */\n getDisplacement() {\n return this.displacement_;\n }\n\n /**\n * Get the declutter mode of the shape\n * @return {\"declutter\"|\"obstacle\"|\"none\"|undefined} Shape's declutter mode\n * @api\n */\n getDeclutterMode() {\n return this.declutterMode_;\n }\n\n /**\n * Get the anchor point in pixels. The anchor determines the center point for the\n * symbolizer.\n * @abstract\n * @return {Array} Anchor.\n */\n getAnchor() {\n return abstract();\n }\n\n /**\n * Get the image element for the symbolizer.\n * @abstract\n * @param {number} pixelRatio Pixel ratio.\n * @return {HTMLCanvasElement|HTMLVideoElement|HTMLImageElement} Image element.\n */\n getImage(pixelRatio) {\n return abstract();\n }\n\n /**\n * @abstract\n * @return {HTMLCanvasElement|HTMLVideoElement|HTMLImageElement} Image element.\n */\n getHitDetectionImage() {\n return abstract();\n }\n\n /**\n * Get the image pixel ratio.\n * @param {number} pixelRatio Pixel ratio.\n * @return {number} Pixel ratio.\n */\n getPixelRatio(pixelRatio) {\n return 1;\n }\n\n /**\n * @abstract\n * @return {import(\"../ImageState.js\").default} Image state.\n */\n getImageState() {\n return abstract();\n }\n\n /**\n * @abstract\n * @return {import(\"../size.js\").Size} Image size.\n */\n getImageSize() {\n return abstract();\n }\n\n /**\n * Get the origin of the symbolizer.\n * @abstract\n * @return {Array} Origin.\n */\n getOrigin() {\n return abstract();\n }\n\n /**\n * Get the size of the symbolizer (in pixels).\n * @abstract\n * @return {import(\"../size.js\").Size} Size.\n */\n getSize() {\n return abstract();\n }\n\n /**\n * Set the displacement.\n *\n * @param {Array} displacement Displacement.\n * @api\n */\n setDisplacement(displacement) {\n this.displacement_ = displacement;\n }\n\n /**\n * Set the opacity.\n *\n * @param {number} opacity Opacity.\n * @api\n */\n setOpacity(opacity) {\n this.opacity_ = opacity;\n }\n\n /**\n * Set whether to rotate the style with the view.\n *\n * @param {boolean} rotateWithView Rotate with map.\n * @api\n */\n setRotateWithView(rotateWithView) {\n this.rotateWithView_ = rotateWithView;\n }\n\n /**\n * Set the rotation.\n *\n * @param {number} rotation Rotation.\n * @api\n */\n setRotation(rotation) {\n this.rotation_ = rotation;\n }\n\n /**\n * Set the scale.\n *\n * @param {number|import(\"../size.js\").Size} scale Scale.\n * @api\n */\n setScale(scale) {\n this.scale_ = scale;\n this.scaleArray_ = toSize(scale);\n }\n\n /**\n * @abstract\n * @param {function(import(\"../events/Event.js\").default): void} listener Listener function.\n */\n listenImageChange(listener) {\n abstract();\n }\n\n /**\n * Load not yet loaded URI.\n * @abstract\n */\n load() {\n abstract();\n }\n\n /**\n * @abstract\n * @param {function(import(\"../events/Event.js\").default): void} listener Listener function.\n */\n unlistenImageChange(listener) {\n abstract();\n }\n}\n\nexport default ImageStyle;\n","/**\n * @module ol/style/RegularShape\n */\n\nimport ImageState from '../ImageState.js';\nimport ImageStyle from './Image.js';\nimport {asArray} from '../color.js';\nimport {asColorLike} from '../colorlike.js';\nimport {createCanvasContext2D} from '../dom.js';\nimport {\n defaultFillStyle,\n defaultLineJoin,\n defaultLineWidth,\n defaultMiterLimit,\n defaultStrokeStyle,\n} from '../render/canvas.js';\n\n/**\n * Specify radius for regular polygons, or radius1 and radius2 for stars.\n * @typedef {Object} Options\n * @property {import(\"./Fill.js\").default} [fill] Fill style.\n * @property {number} points Number of points for stars and regular polygons. In case of a polygon, the number of points\n * is the number of sides.\n * @property {number} [radius] Radius of a regular polygon.\n * @property {number} [radius1] First radius of a star. Ignored if radius is set.\n * @property {number} [radius2] Second radius of a star.\n * @property {number} [angle=0] Shape's angle in radians. A value of 0 will have one of the shape's points facing up.\n * @property {Array} [displacement=[0, 0]] Displacement of the shape in pixels.\n * Positive values will shift the shape right and up.\n * @property {import(\"./Stroke.js\").default} [stroke] Stroke style.\n * @property {number} [rotation=0] Rotation in radians (positive rotation clockwise).\n * @property {boolean} [rotateWithView=false] Whether to rotate the shape with the view.\n * @property {number|import(\"../size.js\").Size} [scale=1] Scale. Unless two dimensional scaling is required a better\n * result may be obtained with appropriate settings for `radius`, `radius1` and `radius2`.\n * @property {\"declutter\"|\"obstacle\"|\"none\"|undefined} [declutterMode] Declutter mode.\n */\n\n/**\n * @typedef {Object} RenderOptions\n * @property {import(\"../colorlike.js\").ColorLike} [strokeStyle] StrokeStyle.\n * @property {number} strokeWidth StrokeWidth.\n * @property {number} size Size.\n * @property {Array|null} lineDash LineDash.\n * @property {number} lineDashOffset LineDashOffset.\n * @property {CanvasLineJoin} lineJoin LineJoin.\n * @property {number} miterLimit MiterLimit.\n */\n\n/**\n * @classdesc\n * Set regular shape style for vector features. The resulting shape will be\n * a regular polygon when `radius` is provided, or a star when `radius1` and\n * `radius2` are provided.\n * @api\n */\nclass RegularShape extends ImageStyle {\n /**\n * @param {Options} options Options.\n */\n constructor(options) {\n /**\n * @type {boolean}\n */\n const rotateWithView =\n options.rotateWithView !== undefined ? options.rotateWithView : false;\n\n super({\n opacity: 1,\n rotateWithView: rotateWithView,\n rotation: options.rotation !== undefined ? options.rotation : 0,\n scale: options.scale !== undefined ? options.scale : 1,\n displacement:\n options.displacement !== undefined ? options.displacement : [0, 0],\n declutterMode: options.declutterMode,\n });\n\n /**\n * @private\n * @type {Object}\n */\n this.canvas_ = undefined;\n\n /**\n * @private\n * @type {HTMLCanvasElement}\n */\n this.hitDetectionCanvas_ = null;\n\n /**\n * @private\n * @type {import(\"./Fill.js\").default}\n */\n this.fill_ = options.fill !== undefined ? options.fill : null;\n\n /**\n * @private\n * @type {Array}\n */\n this.origin_ = [0, 0];\n\n /**\n * @private\n * @type {number}\n */\n this.points_ = options.points;\n\n /**\n * @protected\n * @type {number}\n */\n this.radius_ =\n options.radius !== undefined ? options.radius : options.radius1;\n\n /**\n * @private\n * @type {number|undefined}\n */\n this.radius2_ = options.radius2;\n\n /**\n * @private\n * @type {number}\n */\n this.angle_ = options.angle !== undefined ? options.angle : 0;\n\n /**\n * @private\n * @type {import(\"./Stroke.js\").default}\n */\n this.stroke_ = options.stroke !== undefined ? options.stroke : null;\n\n /**\n * @private\n * @type {import(\"../size.js\").Size}\n */\n this.size_ = null;\n\n /**\n * @private\n * @type {RenderOptions}\n */\n this.renderOptions_ = null;\n\n this.render();\n }\n\n /**\n * Clones the style.\n * @return {RegularShape} The cloned style.\n * @api\n */\n clone() {\n const scale = this.getScale();\n const style = new RegularShape({\n fill: this.getFill() ? this.getFill().clone() : undefined,\n points: this.getPoints(),\n radius: this.getRadius(),\n radius2: this.getRadius2(),\n angle: this.getAngle(),\n stroke: this.getStroke() ? this.getStroke().clone() : undefined,\n rotation: this.getRotation(),\n rotateWithView: this.getRotateWithView(),\n scale: Array.isArray(scale) ? scale.slice() : scale,\n displacement: this.getDisplacement().slice(),\n declutterMode: this.getDeclutterMode(),\n });\n style.setOpacity(this.getOpacity());\n return style;\n }\n\n /**\n * Get the anchor point in pixels. The anchor determines the center point for the\n * symbolizer.\n * @return {Array} Anchor.\n * @api\n */\n getAnchor() {\n const size = this.size_;\n if (!size) {\n return null;\n }\n const displacement = this.getDisplacement();\n const scale = this.getScaleArray();\n // anchor is scaled by renderer but displacement should not be scaled\n // so divide by scale here\n return [\n size[0] / 2 - displacement[0] / scale[0],\n size[1] / 2 + displacement[1] / scale[1],\n ];\n }\n\n /**\n * Get the angle used in generating the shape.\n * @return {number} Shape's rotation in radians.\n * @api\n */\n getAngle() {\n return this.angle_;\n }\n\n /**\n * Get the fill style for the shape.\n * @return {import(\"./Fill.js\").default} Fill style.\n * @api\n */\n getFill() {\n return this.fill_;\n }\n\n /**\n * Set the fill style.\n * @param {import(\"./Fill.js\").default} fill Fill style.\n * @api\n */\n setFill(fill) {\n this.fill_ = fill;\n this.render();\n }\n\n /**\n * @return {HTMLCanvasElement} Image element.\n */\n getHitDetectionImage() {\n if (!this.hitDetectionCanvas_) {\n this.createHitDetectionCanvas_(this.renderOptions_);\n }\n return this.hitDetectionCanvas_;\n }\n\n /**\n * Get the image icon.\n * @param {number} pixelRatio Pixel ratio.\n * @return {HTMLCanvasElement} Image or Canvas element.\n * @api\n */\n getImage(pixelRatio) {\n let image = this.canvas_[pixelRatio];\n if (!image) {\n const renderOptions = this.renderOptions_;\n const context = createCanvasContext2D(\n renderOptions.size * pixelRatio,\n renderOptions.size * pixelRatio\n );\n this.draw_(renderOptions, context, pixelRatio);\n\n image = context.canvas;\n this.canvas_[pixelRatio] = image;\n }\n return image;\n }\n\n /**\n * Get the image pixel ratio.\n * @param {number} pixelRatio Pixel ratio.\n * @return {number} Pixel ratio.\n */\n getPixelRatio(pixelRatio) {\n return pixelRatio;\n }\n\n /**\n * @return {import(\"../size.js\").Size} Image size.\n */\n getImageSize() {\n return this.size_;\n }\n\n /**\n * @return {import(\"../ImageState.js\").default} Image state.\n */\n getImageState() {\n return ImageState.LOADED;\n }\n\n /**\n * Get the origin of the symbolizer.\n * @return {Array} Origin.\n * @api\n */\n getOrigin() {\n return this.origin_;\n }\n\n /**\n * Get the number of points for generating the shape.\n * @return {number} Number of points for stars and regular polygons.\n * @api\n */\n getPoints() {\n return this.points_;\n }\n\n /**\n * Get the (primary) radius for the shape.\n * @return {number} Radius.\n * @api\n */\n getRadius() {\n return this.radius_;\n }\n\n /**\n * Get the secondary radius for the shape.\n * @return {number|undefined} Radius2.\n * @api\n */\n getRadius2() {\n return this.radius2_;\n }\n\n /**\n * Get the size of the symbolizer (in pixels).\n * @return {import(\"../size.js\").Size} Size.\n * @api\n */\n getSize() {\n return this.size_;\n }\n\n /**\n * Get the stroke style for the shape.\n * @return {import(\"./Stroke.js\").default} Stroke style.\n * @api\n */\n getStroke() {\n return this.stroke_;\n }\n\n /**\n * Set the stroke style.\n * @param {import(\"./Stroke.js\").default} stroke Stroke style.\n * @api\n */\n setStroke(stroke) {\n this.stroke_ = stroke;\n this.render();\n }\n\n /**\n * @param {function(import(\"../events/Event.js\").default): void} listener Listener function.\n */\n listenImageChange(listener) {}\n\n /**\n * Load not yet loaded URI.\n */\n load() {}\n\n /**\n * @param {function(import(\"../events/Event.js\").default): void} listener Listener function.\n */\n unlistenImageChange(listener) {}\n\n /**\n * Calculate additional canvas size needed for the miter.\n * @param {string} lineJoin Line join\n * @param {number} strokeWidth Stroke width\n * @param {number} miterLimit Miter limit\n * @return {number} Additional canvas size needed\n * @private\n */\n calculateLineJoinSize_(lineJoin, strokeWidth, miterLimit) {\n if (\n strokeWidth === 0 ||\n this.points_ === Infinity ||\n (lineJoin !== 'bevel' && lineJoin !== 'miter')\n ) {\n return strokeWidth;\n }\n // m | ^\n // i | |\\ .\n // t >| #\\\n // e | |\\ \\ .\n // r \\s\\\n // | \\t\\ . .\n // \\r\\ . .\n // | \\o\\ . . . . .\n // e \\k\\ . . . .\n // | \\e\\ . . . . .\n // d \\ \\ . . . .\n // | _ _a_ _\\# . . .\n // r1 / ` . .\n // | . .\n // b / . .\n // | . .\n // / r2 . .\n // | . .\n // / . .\n // |α . .\n // / . .\n // ° center\n let r1 = this.radius_;\n let r2 = this.radius2_ === undefined ? r1 : this.radius2_;\n if (r1 < r2) {\n const tmp = r1;\n r1 = r2;\n r2 = tmp;\n }\n const points =\n this.radius2_ === undefined ? this.points_ : this.points_ * 2;\n const alpha = (2 * Math.PI) / points;\n const a = r2 * Math.sin(alpha);\n const b = Math.sqrt(r2 * r2 - a * a);\n const d = r1 - b;\n const e = Math.sqrt(a * a + d * d);\n const miterRatio = e / a;\n if (lineJoin === 'miter' && miterRatio <= miterLimit) {\n return miterRatio * strokeWidth;\n }\n // Calculate the distnce from center to the stroke corner where\n // it was cut short because of the miter limit.\n // l\n // ----+---- <= distance from center to here is maxr\n // /####|k ##\\\n // /#####^#####\\\n // /#### /+\\# s #\\\n // /### h/+++\\# t #\\\n // /### t/+++++\\# r #\\\n // /### a/+++++++\\# o #\\\n // /### p/++ fill +\\# k #\\\n ///#### /+++++^+++++\\# e #\\\n //#####/+++++/+\\+++++\\#####\\\n const k = strokeWidth / 2 / miterRatio;\n const l = (strokeWidth / 2) * (d / e);\n const maxr = Math.sqrt((r1 + k) * (r1 + k) + l * l);\n const bevelAdd = maxr - r1;\n if (this.radius2_ === undefined || lineJoin === 'bevel') {\n return bevelAdd * 2;\n }\n // If outer miter is over the miter limit the inner miter may reach through the\n // center and be longer than the bevel, same calculation as above but swap r1 / r2.\n const aa = r1 * Math.sin(alpha);\n const bb = Math.sqrt(r1 * r1 - aa * aa);\n const dd = r2 - bb;\n const ee = Math.sqrt(aa * aa + dd * dd);\n const innerMiterRatio = ee / aa;\n if (innerMiterRatio <= miterLimit) {\n const innerLength = (innerMiterRatio * strokeWidth) / 2 - r2 - r1;\n return 2 * Math.max(bevelAdd, innerLength);\n }\n return bevelAdd * 2;\n }\n\n /**\n * @return {RenderOptions} The render options\n * @protected\n */\n createRenderOptions() {\n let lineJoin = defaultLineJoin;\n let miterLimit = 0;\n let lineDash = null;\n let lineDashOffset = 0;\n let strokeStyle;\n let strokeWidth = 0;\n\n if (this.stroke_) {\n strokeStyle = this.stroke_.getColor();\n if (strokeStyle === null) {\n strokeStyle = defaultStrokeStyle;\n }\n strokeStyle = asColorLike(strokeStyle);\n strokeWidth = this.stroke_.getWidth();\n if (strokeWidth === undefined) {\n strokeWidth = defaultLineWidth;\n }\n lineDash = this.stroke_.getLineDash();\n lineDashOffset = this.stroke_.getLineDashOffset();\n lineJoin = this.stroke_.getLineJoin();\n if (lineJoin === undefined) {\n lineJoin = defaultLineJoin;\n }\n miterLimit = this.stroke_.getMiterLimit();\n if (miterLimit === undefined) {\n miterLimit = defaultMiterLimit;\n }\n }\n\n const add = this.calculateLineJoinSize_(lineJoin, strokeWidth, miterLimit);\n const maxRadius = Math.max(this.radius_, this.radius2_ || 0);\n const size = Math.ceil(2 * maxRadius + add);\n\n return {\n strokeStyle: strokeStyle,\n strokeWidth: strokeWidth,\n size: size,\n lineDash: lineDash,\n lineDashOffset: lineDashOffset,\n lineJoin: lineJoin,\n miterLimit: miterLimit,\n };\n }\n\n /**\n * @protected\n */\n render() {\n this.renderOptions_ = this.createRenderOptions();\n const size = this.renderOptions_.size;\n this.canvas_ = {};\n this.size_ = [size, size];\n }\n\n /**\n * @private\n * @param {RenderOptions} renderOptions Render options.\n * @param {CanvasRenderingContext2D} context The rendering context.\n * @param {number} pixelRatio The pixel ratio.\n */\n draw_(renderOptions, context, pixelRatio) {\n context.scale(pixelRatio, pixelRatio);\n // set origin to canvas center\n context.translate(renderOptions.size / 2, renderOptions.size / 2);\n\n this.createPath_(context);\n\n if (this.fill_) {\n let color = this.fill_.getColor();\n if (color === null) {\n color = defaultFillStyle;\n }\n context.fillStyle = asColorLike(color);\n context.fill();\n }\n if (this.stroke_) {\n context.strokeStyle = renderOptions.strokeStyle;\n context.lineWidth = renderOptions.strokeWidth;\n if (renderOptions.lineDash) {\n context.setLineDash(renderOptions.lineDash);\n context.lineDashOffset = renderOptions.lineDashOffset;\n }\n context.lineJoin = renderOptions.lineJoin;\n context.miterLimit = renderOptions.miterLimit;\n context.stroke();\n }\n }\n\n /**\n * @private\n * @param {RenderOptions} renderOptions Render options.\n */\n createHitDetectionCanvas_(renderOptions) {\n if (this.fill_) {\n let color = this.fill_.getColor();\n\n // determine if fill is transparent (or pattern or gradient)\n let opacity = 0;\n if (typeof color === 'string') {\n color = asArray(color);\n }\n if (color === null) {\n opacity = 1;\n } else if (Array.isArray(color)) {\n opacity = color.length === 4 ? color[3] : 1;\n }\n if (opacity === 0) {\n // if a transparent fill style is set, create an extra hit-detection image\n // with a default fill style\n const context = createCanvasContext2D(\n renderOptions.size,\n renderOptions.size\n );\n this.hitDetectionCanvas_ = context.canvas;\n\n this.drawHitDetectionCanvas_(renderOptions, context);\n }\n }\n if (!this.hitDetectionCanvas_) {\n this.hitDetectionCanvas_ = this.getImage(1);\n }\n }\n\n /**\n * @private\n * @param {CanvasRenderingContext2D} context The context to draw in.\n */\n createPath_(context) {\n let points = this.points_;\n const radius = this.radius_;\n if (points === Infinity) {\n context.arc(0, 0, radius, 0, 2 * Math.PI);\n } else {\n const radius2 = this.radius2_ === undefined ? radius : this.radius2_;\n if (this.radius2_ !== undefined) {\n points *= 2;\n }\n const startAngle = this.angle_ - Math.PI / 2;\n const step = (2 * Math.PI) / points;\n for (let i = 0; i < points; i++) {\n const angle0 = startAngle + i * step;\n const radiusC = i % 2 === 0 ? radius : radius2;\n context.lineTo(radiusC * Math.cos(angle0), radiusC * Math.sin(angle0));\n }\n context.closePath();\n }\n }\n\n /**\n * @private\n * @param {RenderOptions} renderOptions Render options.\n * @param {CanvasRenderingContext2D} context The context.\n */\n drawHitDetectionCanvas_(renderOptions, context) {\n // set origin to canvas center\n context.translate(renderOptions.size / 2, renderOptions.size / 2);\n\n this.createPath_(context);\n\n context.fillStyle = defaultFillStyle;\n context.fill();\n if (this.stroke_) {\n context.strokeStyle = renderOptions.strokeStyle;\n context.lineWidth = renderOptions.strokeWidth;\n if (renderOptions.lineDash) {\n context.setLineDash(renderOptions.lineDash);\n context.lineDashOffset = renderOptions.lineDashOffset;\n }\n context.lineJoin = renderOptions.lineJoin;\n context.miterLimit = renderOptions.miterLimit;\n context.stroke();\n }\n }\n}\n\nexport default RegularShape;\n","/**\n * @module ol/style/Circle\n */\n\nimport RegularShape from './RegularShape.js';\n\n/**\n * @typedef {Object} Options\n * @property {import(\"./Fill.js\").default} [fill] Fill style.\n * @property {number} radius Circle radius.\n * @property {import(\"./Stroke.js\").default} [stroke] Stroke style.\n * @property {Array} [displacement=[0,0]] displacement\n * @property {number|import(\"../size.js\").Size} [scale=1] Scale. A two dimensional scale will produce an ellipse.\n * Unless two dimensional scaling is required a better result may be obtained with an appropriate setting for `radius`.\n * @property {number} [rotation=0] Rotation in radians\n * (positive rotation clockwise, meaningful only when used in conjunction with a two dimensional scale).\n * @property {boolean} [rotateWithView=false] Whether to rotate the shape with the view\n * (meaningful only when used in conjunction with a two dimensional scale).\n * @property {\"declutter\"|\"obstacle\"|\"none\"|undefined} [declutterMode] Declutter mode\n */\n\n/**\n * @classdesc\n * Set circle style for vector features.\n * @api\n */\nclass CircleStyle extends RegularShape {\n /**\n * @param {Options} [options] Options.\n */\n constructor(options) {\n options = options ? options : {radius: 5};\n\n super({\n points: Infinity,\n fill: options.fill,\n radius: options.radius,\n stroke: options.stroke,\n scale: options.scale !== undefined ? options.scale : 1,\n rotation: options.rotation !== undefined ? options.rotation : 0,\n rotateWithView:\n options.rotateWithView !== undefined ? options.rotateWithView : false,\n displacement:\n options.displacement !== undefined ? options.displacement : [0, 0],\n declutterMode: options.declutterMode,\n });\n }\n\n /**\n * Clones the style.\n * @return {CircleStyle} The cloned style.\n * @api\n */\n clone() {\n const scale = this.getScale();\n const style = new CircleStyle({\n fill: this.getFill() ? this.getFill().clone() : undefined,\n stroke: this.getStroke() ? this.getStroke().clone() : undefined,\n radius: this.getRadius(),\n scale: Array.isArray(scale) ? scale.slice() : scale,\n rotation: this.getRotation(),\n rotateWithView: this.getRotateWithView(),\n displacement: this.getDisplacement().slice(),\n declutterMode: this.getDeclutterMode(),\n });\n style.setOpacity(this.getOpacity());\n return style;\n }\n\n /**\n * Set the circle radius.\n *\n * @param {number} radius Circle radius.\n * @api\n */\n setRadius(radius) {\n this.radius_ = radius;\n this.render();\n }\n}\n\nexport default CircleStyle;\n","/**\n * @module ol/style/Fill\n */\n\n/**\n * @typedef {Object} Options\n * @property {import(\"../color.js\").Color|import(\"../colorlike.js\").ColorLike|null} [color=null] A color, gradient or pattern.\n * See {@link module:ol/color~Color} and {@link module:ol/colorlike~ColorLike} for possible formats.\n * Default null; if null, the Canvas/renderer default black will be used.\n */\n\n/**\n * @classdesc\n * Set fill style for vector features.\n * @api\n */\nclass Fill {\n /**\n * @param {Options} [options] Options.\n */\n constructor(options) {\n options = options || {};\n\n /**\n * @private\n * @type {import(\"../color.js\").Color|import(\"../colorlike.js\").ColorLike|null}\n */\n this.color_ = options.color !== undefined ? options.color : null;\n }\n\n /**\n * Clones the style. The color is not cloned if it is an {@link module:ol/colorlike~ColorLike}.\n * @return {Fill} The cloned style.\n * @api\n */\n clone() {\n const color = this.getColor();\n return new Fill({\n color: Array.isArray(color) ? color.slice() : color || undefined,\n });\n }\n\n /**\n * Get the fill color.\n * @return {import(\"../color.js\").Color|import(\"../colorlike.js\").ColorLike|null} Color.\n * @api\n */\n getColor() {\n return this.color_;\n }\n\n /**\n * Set the color.\n *\n * @param {import(\"../color.js\").Color|import(\"../colorlike.js\").ColorLike|null} color Color.\n * @api\n */\n setColor(color) {\n this.color_ = color;\n }\n}\n\nexport default Fill;\n","/**\n * @module ol/style/IconImage\n */\n\nimport EventTarget from '../events/Target.js';\nimport EventType from '../events/EventType.js';\nimport ImageState from '../ImageState.js';\nimport {asString} from '../color.js';\nimport {createCanvasContext2D} from '../dom.js';\nimport {shared as iconImageCache} from './IconImageCache.js';\nimport {listenImage} from '../Image.js';\n\n/**\n * @type {CanvasRenderingContext2D}\n */\nlet taintedTestContext = null;\n\nclass IconImage extends EventTarget {\n /**\n * @param {HTMLImageElement|HTMLCanvasElement} image Image.\n * @param {string|undefined} src Src.\n * @param {import(\"../size.js\").Size} size Size.\n * @param {?string} crossOrigin Cross origin.\n * @param {import(\"../ImageState.js\").default} imageState Image state.\n * @param {import(\"../color.js\").Color} color Color.\n */\n constructor(image, src, size, crossOrigin, imageState, color) {\n super();\n\n /**\n * @private\n * @type {HTMLImageElement|HTMLCanvasElement}\n */\n this.hitDetectionImage_ = null;\n\n /**\n * @private\n * @type {HTMLImageElement|HTMLCanvasElement}\n */\n this.image_ = image;\n\n /**\n * @private\n * @type {string|null}\n */\n this.crossOrigin_ = crossOrigin;\n\n /**\n * @private\n * @type {Object}\n */\n this.canvas_ = {};\n\n /**\n * @private\n * @type {import(\"../color.js\").Color}\n */\n this.color_ = color;\n\n /**\n * @private\n * @type {?function():void}\n */\n this.unlisten_ = null;\n\n /**\n * @private\n * @type {import(\"../ImageState.js\").default}\n */\n this.imageState_ = imageState;\n\n /**\n * @private\n * @type {import(\"../size.js\").Size}\n */\n this.size_ = size;\n\n /**\n * @private\n * @type {string|undefined}\n */\n this.src_ = src;\n\n /**\n * @private\n */\n this.tainted_;\n }\n\n /**\n * @private\n */\n initializeImage_() {\n this.image_ = new Image();\n if (this.crossOrigin_ !== null) {\n this.image_.crossOrigin = this.crossOrigin_;\n }\n }\n\n /**\n * @private\n * @return {boolean} The image canvas is tainted.\n */\n isTainted_() {\n if (this.tainted_ === undefined && this.imageState_ === ImageState.LOADED) {\n if (!taintedTestContext) {\n taintedTestContext = createCanvasContext2D(1, 1, undefined, {\n willReadFrequently: true,\n });\n }\n taintedTestContext.drawImage(this.image_, 0, 0);\n try {\n taintedTestContext.getImageData(0, 0, 1, 1);\n this.tainted_ = false;\n } catch (e) {\n taintedTestContext = null;\n this.tainted_ = true;\n }\n }\n return this.tainted_ === true;\n }\n\n /**\n * @private\n */\n dispatchChangeEvent_() {\n this.dispatchEvent(EventType.CHANGE);\n }\n\n /**\n * @private\n */\n handleImageError_() {\n this.imageState_ = ImageState.ERROR;\n this.unlistenImage_();\n this.dispatchChangeEvent_();\n }\n\n /**\n * @private\n */\n handleImageLoad_() {\n this.imageState_ = ImageState.LOADED;\n if (this.size_) {\n this.image_.width = this.size_[0];\n this.image_.height = this.size_[1];\n } else {\n this.size_ = [this.image_.width, this.image_.height];\n }\n this.unlistenImage_();\n this.dispatchChangeEvent_();\n }\n\n /**\n * @param {number} pixelRatio Pixel ratio.\n * @return {HTMLImageElement|HTMLCanvasElement} Image or Canvas element.\n */\n getImage(pixelRatio) {\n if (!this.image_) {\n this.initializeImage_();\n }\n this.replaceColor_(pixelRatio);\n return this.canvas_[pixelRatio] ? this.canvas_[pixelRatio] : this.image_;\n }\n\n /**\n * @param {number} pixelRatio Pixel ratio.\n * @return {number} Image or Canvas element.\n */\n getPixelRatio(pixelRatio) {\n this.replaceColor_(pixelRatio);\n return this.canvas_[pixelRatio] ? pixelRatio : 1;\n }\n\n /**\n * @return {import(\"../ImageState.js\").default} Image state.\n */\n getImageState() {\n return this.imageState_;\n }\n\n /**\n * @return {HTMLImageElement|HTMLCanvasElement} Image element.\n */\n getHitDetectionImage() {\n if (!this.image_) {\n this.initializeImage_();\n }\n if (!this.hitDetectionImage_) {\n if (this.isTainted_()) {\n const width = this.size_[0];\n const height = this.size_[1];\n const context = createCanvasContext2D(width, height);\n context.fillRect(0, 0, width, height);\n this.hitDetectionImage_ = context.canvas;\n } else {\n this.hitDetectionImage_ = this.image_;\n }\n }\n return this.hitDetectionImage_;\n }\n\n /**\n * Get the size of the icon (in pixels).\n * @return {import(\"../size.js\").Size} Image size.\n */\n getSize() {\n return this.size_;\n }\n\n /**\n * @return {string|undefined} Image src.\n */\n getSrc() {\n return this.src_;\n }\n\n /**\n * Load not yet loaded URI.\n */\n load() {\n if (this.imageState_ !== ImageState.IDLE) {\n return;\n }\n if (!this.image_) {\n this.initializeImage_();\n }\n\n this.imageState_ = ImageState.LOADING;\n try {\n /** @type {HTMLImageElement} */ (this.image_).src = this.src_;\n } catch (e) {\n this.handleImageError_();\n }\n this.unlisten_ = listenImage(\n this.image_,\n this.handleImageLoad_.bind(this),\n this.handleImageError_.bind(this)\n );\n }\n\n /**\n * @param {number} pixelRatio Pixel ratio.\n * @private\n */\n replaceColor_(pixelRatio) {\n if (\n !this.color_ ||\n this.canvas_[pixelRatio] ||\n this.imageState_ !== ImageState.LOADED\n ) {\n return;\n }\n\n const image = this.image_;\n const canvas = document.createElement('canvas');\n canvas.width = Math.ceil(image.width * pixelRatio);\n canvas.height = Math.ceil(image.height * pixelRatio);\n\n const ctx = canvas.getContext('2d');\n ctx.scale(pixelRatio, pixelRatio);\n ctx.drawImage(image, 0, 0);\n\n ctx.globalCompositeOperation = 'multiply';\n ctx.fillStyle = asString(this.color_);\n ctx.fillRect(0, 0, canvas.width / pixelRatio, canvas.height / pixelRatio);\n\n ctx.globalCompositeOperation = 'destination-in';\n ctx.drawImage(image, 0, 0);\n\n this.canvas_[pixelRatio] = canvas;\n }\n\n /**\n * Discards event handlers which listen for load completion or errors.\n *\n * @private\n */\n unlistenImage_() {\n if (this.unlisten_) {\n this.unlisten_();\n this.unlisten_ = null;\n }\n }\n}\n\n/**\n * @param {HTMLImageElement|HTMLCanvasElement} image Image.\n * @param {string} src Src.\n * @param {import(\"../size.js\").Size} size Size.\n * @param {?string} crossOrigin Cross origin.\n * @param {import(\"../ImageState.js\").default} imageState Image state.\n * @param {import(\"../color.js\").Color} color Color.\n * @return {IconImage} Icon image.\n */\nexport function get(image, src, size, crossOrigin, imageState, color) {\n let iconImage = iconImageCache.get(src, crossOrigin, color);\n if (!iconImage) {\n iconImage = new IconImage(image, src, size, crossOrigin, imageState, color);\n iconImageCache.set(src, crossOrigin, color, iconImage);\n }\n return iconImage;\n}\n\nexport default IconImage;\n","/**\n * @module ol/style/Icon\n */\nimport EventType from '../events/EventType.js';\nimport ImageState from '../ImageState.js';\nimport ImageStyle from './Image.js';\nimport {asArray} from '../color.js';\nimport {assert} from '../asserts.js';\nimport {get as getIconImage} from './IconImage.js';\nimport {getUid} from '../util.js';\n\n/**\n * @typedef {'fraction' | 'pixels'} IconAnchorUnits\n * Anchor unit can be either a fraction of the icon size or in pixels.\n */\n\n/**\n * @typedef {'bottom-left' | 'bottom-right' | 'top-left' | 'top-right'} IconOrigin\n * Icon origin. One of 'bottom-left', 'bottom-right', 'top-left', 'top-right'.\n */\n\n/**\n * @typedef {Object} Options\n * @property {Array} [anchor=[0.5, 0.5]] Anchor. Default value is the icon center.\n * @property {IconOrigin} [anchorOrigin='top-left'] Origin of the anchor: `bottom-left`, `bottom-right`,\n * `top-left` or `top-right`.\n * @property {IconAnchorUnits} [anchorXUnits='fraction'] Units in which the anchor x value is\n * specified. A value of `'fraction'` indicates the x value is a fraction of the icon. A value of `'pixels'` indicates\n * the x value in pixels.\n * @property {IconAnchorUnits} [anchorYUnits='fraction'] Units in which the anchor y value is\n * specified. A value of `'fraction'` indicates the y value is a fraction of the icon. A value of `'pixels'` indicates\n * the y value in pixels.\n * @property {import(\"../color.js\").Color|string} [color] Color to tint the icon. If not specified,\n * the icon will be left as is.\n * @property {null|string} [crossOrigin] The `crossOrigin` attribute for loaded images. Note that you must provide a\n * `crossOrigin` value if you want to access pixel data with the Canvas renderer.\n * See https://developer.mozilla.org/en-US/docs/Web/HTML/CORS_enabled_image for more detail.\n * @property {HTMLImageElement|HTMLCanvasElement} [img] Image object for the icon. If the `src` option is not provided then the\n * provided image must already be loaded. And in that case, it is required\n * to provide the size of the image, with the `imgSize` option.\n * @property {import(\"../size.js\").Size} [imgSize] Image size in pixels. Only required if `img` is set and `src` is not.\n * The provided `imgSize` needs to match the actual size of the image.\n * @property {Array} [displacement=[0, 0]] Displacement of the icon in pixels.\n * Positive values will shift the icon right and up.\n * @property {number} [opacity=1] Opacity of the icon.\n * @property {number} [width] The width of the icon in pixels. This can't be used together with `scale`.\n * @property {number} [height] The height of the icon in pixels. This can't be used together with `scale`.\n * @property {number|import(\"../size.js\").Size} [scale=1] Scale.\n * @property {boolean} [rotateWithView=false] Whether to rotate the icon with the view.\n * @property {number} [rotation=0] Rotation in radians (positive rotation clockwise).\n * @property {Array} [offset=[0, 0]] Offset which, together with `size` and `offsetOrigin`, defines the\n * sub-rectangle to use from the original (sprite) image.\n * @property {IconOrigin} [offsetOrigin='top-left'] Origin of the offset: `bottom-left`, `bottom-right`,\n * `top-left` or `top-right`.\n * @property {import(\"../size.js\").Size} [size] Icon size in pixels. Used together with `offset` to define the\n * sub-rectangle to use from the original (sprite) image.\n * @property {string} [src] Image source URI.\n * @property {\"declutter\"|\"obstacle\"|\"none\"|undefined} [declutterMode] Declutter mode.\n */\n\n/**\n * @classdesc\n * Set icon style for vector features.\n * @api\n */\nclass Icon extends ImageStyle {\n /**\n * @param {Options} [options] Options.\n */\n constructor(options) {\n options = options || {};\n\n /**\n * @type {number}\n */\n const opacity = options.opacity !== undefined ? options.opacity : 1;\n\n /**\n * @type {number}\n */\n const rotation = options.rotation !== undefined ? options.rotation : 0;\n\n /**\n * @type {number|import(\"../size.js\").Size}\n */\n const scale = options.scale !== undefined ? options.scale : 1;\n\n /**\n * @type {boolean}\n */\n const rotateWithView =\n options.rotateWithView !== undefined ? options.rotateWithView : false;\n\n super({\n opacity: opacity,\n rotation: rotation,\n scale: scale,\n displacement:\n options.displacement !== undefined ? options.displacement : [0, 0],\n rotateWithView: rotateWithView,\n declutterMode: options.declutterMode,\n });\n\n /**\n * @private\n * @type {Array}\n */\n this.anchor_ = options.anchor !== undefined ? options.anchor : [0.5, 0.5];\n\n /**\n * @private\n * @type {Array}\n */\n this.normalizedAnchor_ = null;\n\n /**\n * @private\n * @type {IconOrigin}\n */\n this.anchorOrigin_ =\n options.anchorOrigin !== undefined ? options.anchorOrigin : 'top-left';\n\n /**\n * @private\n * @type {IconAnchorUnits}\n */\n this.anchorXUnits_ =\n options.anchorXUnits !== undefined ? options.anchorXUnits : 'fraction';\n\n /**\n * @private\n * @type {IconAnchorUnits}\n */\n this.anchorYUnits_ =\n options.anchorYUnits !== undefined ? options.anchorYUnits : 'fraction';\n\n /**\n * @private\n * @type {?string}\n */\n this.crossOrigin_ =\n options.crossOrigin !== undefined ? options.crossOrigin : null;\n\n /**\n * @type {HTMLImageElement|HTMLCanvasElement}\n */\n const image = options.img !== undefined ? options.img : null;\n\n /**\n * @private\n * @type {import(\"../size.js\").Size|undefined}\n */\n this.imgSize_ = options.imgSize;\n\n /**\n * @type {string|undefined}\n */\n let src = options.src;\n\n assert(!(src !== undefined && image), 4); // `image` and `src` cannot be provided at the same time\n assert(!image || (image && this.imgSize_), 5); // `imgSize` must be set when `image` is provided\n\n if ((src === undefined || src.length === 0) && image) {\n src = /** @type {HTMLImageElement} */ (image).src || getUid(image);\n }\n assert(src !== undefined && src.length > 0, 6); // A defined and non-empty `src` or `image` must be provided\n\n // `width` or `height` cannot be provided together with `scale`\n assert(\n !(\n (options.width !== undefined || options.height !== undefined) &&\n options.scale !== undefined\n ),\n 69\n );\n\n /**\n * @type {import(\"../ImageState.js\").default}\n */\n const imageState =\n options.src !== undefined ? ImageState.IDLE : ImageState.LOADED;\n\n /**\n * @private\n * @type {import(\"../color.js\").Color}\n */\n this.color_ = options.color !== undefined ? asArray(options.color) : null;\n\n /**\n * @private\n * @type {import(\"./IconImage.js\").default}\n */\n this.iconImage_ = getIconImage(\n image,\n /** @type {string} */ (src),\n this.imgSize_ !== undefined ? this.imgSize_ : null,\n this.crossOrigin_,\n imageState,\n this.color_\n );\n\n /**\n * @private\n * @type {Array}\n */\n this.offset_ = options.offset !== undefined ? options.offset : [0, 0];\n /**\n * @private\n * @type {IconOrigin}\n */\n this.offsetOrigin_ =\n options.offsetOrigin !== undefined ? options.offsetOrigin : 'top-left';\n\n /**\n * @private\n * @type {Array}\n */\n this.origin_ = null;\n\n /**\n * @private\n * @type {import(\"../size.js\").Size}\n */\n this.size_ = options.size !== undefined ? options.size : null;\n\n /**\n * @type {number|undefined}\n */\n this.width_ = options.width;\n\n /**\n * @type {number|undefined}\n */\n this.height_ = options.height;\n\n /**\n * Recalculate the scale if width or height where given.\n */\n if (this.width_ !== undefined || this.height_ !== undefined) {\n const image = this.getImage(1);\n const setScale = () => {\n this.updateScaleFromWidthAndHeight(this.width_, this.height_);\n };\n if (image.width > 0) {\n this.updateScaleFromWidthAndHeight(this.width_, this.height_);\n } else {\n image.addEventListener('load', setScale);\n }\n }\n }\n\n /**\n * Clones the style. The underlying Image/HTMLCanvasElement is not cloned.\n * @return {Icon} The cloned style.\n * @api\n */\n clone() {\n const scale = this.getScale();\n return new Icon({\n anchor: this.anchor_.slice(),\n anchorOrigin: this.anchorOrigin_,\n anchorXUnits: this.anchorXUnits_,\n anchorYUnits: this.anchorYUnits_,\n color:\n this.color_ && this.color_.slice\n ? this.color_.slice()\n : this.color_ || undefined,\n crossOrigin: this.crossOrigin_,\n imgSize: this.imgSize_,\n offset: this.offset_.slice(),\n offsetOrigin: this.offsetOrigin_,\n opacity: this.getOpacity(),\n rotateWithView: this.getRotateWithView(),\n rotation: this.getRotation(),\n scale: Array.isArray(scale) ? scale.slice() : scale,\n size: this.size_ !== null ? this.size_.slice() : undefined,\n src: this.getSrc(),\n displacement: this.getDisplacement().slice(),\n declutterMode: this.getDeclutterMode(),\n width: this.width_,\n height: this.height_,\n });\n }\n\n /**\n * Set the scale of the Icon by calculating it from given width and height and the\n * width and height of the image.\n *\n * @private\n * @param {number} width The width.\n * @param {number} height The height.\n */\n updateScaleFromWidthAndHeight(width, height) {\n const image = this.getImage(1);\n if (width !== undefined && height !== undefined) {\n super.setScale([width / image.width, height / image.height]);\n } else if (width !== undefined) {\n super.setScale([width / image.width, width / image.width]);\n } else if (height !== undefined) {\n super.setScale([height / image.height, height / image.height]);\n } else {\n super.setScale([1, 1]);\n }\n }\n\n /**\n * Get the anchor point in pixels. The anchor determines the center point for the\n * symbolizer.\n * @return {Array} Anchor.\n * @api\n */\n getAnchor() {\n let anchor = this.normalizedAnchor_;\n if (!anchor) {\n anchor = this.anchor_;\n const size = this.getSize();\n if (\n this.anchorXUnits_ == 'fraction' ||\n this.anchorYUnits_ == 'fraction'\n ) {\n if (!size) {\n return null;\n }\n anchor = this.anchor_.slice();\n if (this.anchorXUnits_ == 'fraction') {\n anchor[0] *= size[0];\n }\n if (this.anchorYUnits_ == 'fraction') {\n anchor[1] *= size[1];\n }\n }\n\n if (this.anchorOrigin_ != 'top-left') {\n if (!size) {\n return null;\n }\n if (anchor === this.anchor_) {\n anchor = this.anchor_.slice();\n }\n if (\n this.anchorOrigin_ == 'top-right' ||\n this.anchorOrigin_ == 'bottom-right'\n ) {\n anchor[0] = -anchor[0] + size[0];\n }\n if (\n this.anchorOrigin_ == 'bottom-left' ||\n this.anchorOrigin_ == 'bottom-right'\n ) {\n anchor[1] = -anchor[1] + size[1];\n }\n }\n this.normalizedAnchor_ = anchor;\n }\n const displacement = this.getDisplacement();\n const scale = this.getScaleArray();\n // anchor is scaled by renderer but displacement should not be scaled\n // so divide by scale here\n return [\n anchor[0] - displacement[0] / scale[0],\n anchor[1] + displacement[1] / scale[1],\n ];\n }\n\n /**\n * Set the anchor point. The anchor determines the center point for the\n * symbolizer.\n *\n * @param {Array} anchor Anchor.\n * @api\n */\n setAnchor(anchor) {\n this.anchor_ = anchor;\n this.normalizedAnchor_ = null;\n }\n\n /**\n * Get the icon color.\n * @return {import(\"../color.js\").Color} Color.\n * @api\n */\n getColor() {\n return this.color_;\n }\n\n /**\n * Get the image icon.\n * @param {number} pixelRatio Pixel ratio.\n * @return {HTMLImageElement|HTMLCanvasElement} Image or Canvas element.\n * @api\n */\n getImage(pixelRatio) {\n return this.iconImage_.getImage(pixelRatio);\n }\n\n /**\n * Get the pixel ratio.\n * @param {number} pixelRatio Pixel ratio.\n * @return {number} The pixel ratio of the image.\n * @api\n */\n getPixelRatio(pixelRatio) {\n return this.iconImage_.getPixelRatio(pixelRatio);\n }\n\n /**\n * @return {import(\"../size.js\").Size} Image size.\n */\n getImageSize() {\n return this.iconImage_.getSize();\n }\n\n /**\n * @return {import(\"../ImageState.js\").default} Image state.\n */\n getImageState() {\n return this.iconImage_.getImageState();\n }\n\n /**\n * @return {HTMLImageElement|HTMLCanvasElement} Image element.\n */\n getHitDetectionImage() {\n return this.iconImage_.getHitDetectionImage();\n }\n\n /**\n * Get the origin of the symbolizer.\n * @return {Array} Origin.\n * @api\n */\n getOrigin() {\n if (this.origin_) {\n return this.origin_;\n }\n let offset = this.offset_;\n\n if (this.offsetOrigin_ != 'top-left') {\n const size = this.getSize();\n const iconImageSize = this.iconImage_.getSize();\n if (!size || !iconImageSize) {\n return null;\n }\n offset = offset.slice();\n if (\n this.offsetOrigin_ == 'top-right' ||\n this.offsetOrigin_ == 'bottom-right'\n ) {\n offset[0] = iconImageSize[0] - size[0] - offset[0];\n }\n if (\n this.offsetOrigin_ == 'bottom-left' ||\n this.offsetOrigin_ == 'bottom-right'\n ) {\n offset[1] = iconImageSize[1] - size[1] - offset[1];\n }\n }\n this.origin_ = offset;\n return this.origin_;\n }\n\n /**\n * Get the image URL.\n * @return {string|undefined} Image src.\n * @api\n */\n getSrc() {\n return this.iconImage_.getSrc();\n }\n\n /**\n * Get the size of the icon (in pixels).\n * @return {import(\"../size.js\").Size} Image size.\n * @api\n */\n getSize() {\n return !this.size_ ? this.iconImage_.getSize() : this.size_;\n }\n\n /**\n * Get the width of the icon (in pixels).\n * @return {number} Icon width (in pixels).\n * @api\n */\n getWidth() {\n return this.width_;\n }\n\n /**\n * Get the height of the icon (in pixels).\n * @return {number} Icon height (in pixels).\n * @api\n */\n getHeight() {\n return this.height_;\n }\n\n /**\n * Set the width of the icon in pixels.\n *\n * @param {number} width The width to set.\n */\n setWidth(width) {\n this.width_ = width;\n this.updateScaleFromWidthAndHeight(width, this.height_);\n }\n\n /**\n * Set the height of the icon in pixels.\n *\n * @param {number} height The height to set.\n */\n setHeight(height) {\n this.height_ = height;\n this.updateScaleFromWidthAndHeight(this.width_, height);\n }\n\n /**\n * Set the scale and updates the width and height correspondingly.\n *\n * @param {number|import(\"../size.js\").Size} scale Scale.\n * @override\n * @api\n */\n setScale(scale) {\n super.setScale(scale);\n const image = this.getImage(1);\n if (image) {\n const widthScale = Array.isArray(scale) ? scale[0] : scale;\n if (widthScale !== undefined) {\n this.width_ = widthScale * image.width;\n }\n const heightScale = Array.isArray(scale) ? scale[1] : scale;\n if (heightScale !== undefined) {\n this.height_ = heightScale * image.height;\n }\n }\n }\n\n /**\n * @param {function(import(\"../events/Event.js\").default): void} listener Listener function.\n */\n listenImageChange(listener) {\n this.iconImage_.addEventListener(EventType.CHANGE, listener);\n }\n\n /**\n * Load not yet loaded URI.\n * When rendering a feature with an icon style, the vector renderer will\n * automatically call this method. However, you might want to call this\n * method yourself for preloading or other purposes.\n * @api\n */\n load() {\n this.iconImage_.load();\n }\n\n /**\n * @param {function(import(\"../events/Event.js\").default): void} listener Listener function.\n */\n unlistenImageChange(listener) {\n this.iconImage_.removeEventListener(EventType.CHANGE, listener);\n }\n}\n\nexport default Icon;\n","/**\n * @module ol/style/Stroke\n */\n\n/**\n * @typedef {Object} Options\n * @property {import(\"../color.js\").Color|import(\"../colorlike.js\").ColorLike} [color] A color, gradient or pattern.\n * See {@link module:ol/color~Color} and {@link module:ol/colorlike~ColorLike} for possible formats.\n * Default null; if null, the Canvas/renderer default black will be used.\n * @property {CanvasLineCap} [lineCap='round'] Line cap style: `butt`, `round`, or `square`.\n * @property {CanvasLineJoin} [lineJoin='round'] Line join style: `bevel`, `round`, or `miter`.\n * @property {Array} [lineDash] Line dash pattern. Default is `null` (no dash).\n * @property {number} [lineDashOffset=0] Line dash offset.\n * @property {number} [miterLimit=10] Miter limit.\n * @property {number} [width] Width.\n */\n\n/**\n * @classdesc\n * Set stroke style for vector features.\n * Note that the defaults given are the Canvas defaults, which will be used if\n * option is not defined. The `get` functions return whatever was entered in\n * the options; they will not return the default.\n * @api\n */\nclass Stroke {\n /**\n * @param {Options} [options] Options.\n */\n constructor(options) {\n options = options || {};\n\n /**\n * @private\n * @type {import(\"../color.js\").Color|import(\"../colorlike.js\").ColorLike}\n */\n this.color_ = options.color !== undefined ? options.color : null;\n\n /**\n * @private\n * @type {CanvasLineCap|undefined}\n */\n this.lineCap_ = options.lineCap;\n\n /**\n * @private\n * @type {Array|null}\n */\n this.lineDash_ = options.lineDash !== undefined ? options.lineDash : null;\n\n /**\n * @private\n * @type {number|undefined}\n */\n this.lineDashOffset_ = options.lineDashOffset;\n\n /**\n * @private\n * @type {CanvasLineJoin|undefined}\n */\n this.lineJoin_ = options.lineJoin;\n\n /**\n * @private\n * @type {number|undefined}\n */\n this.miterLimit_ = options.miterLimit;\n\n /**\n * @private\n * @type {number|undefined}\n */\n this.width_ = options.width;\n }\n\n /**\n * Clones the style.\n * @return {Stroke} The cloned style.\n * @api\n */\n clone() {\n const color = this.getColor();\n return new Stroke({\n color: Array.isArray(color) ? color.slice() : color || undefined,\n lineCap: this.getLineCap(),\n lineDash: this.getLineDash() ? this.getLineDash().slice() : undefined,\n lineDashOffset: this.getLineDashOffset(),\n lineJoin: this.getLineJoin(),\n miterLimit: this.getMiterLimit(),\n width: this.getWidth(),\n });\n }\n\n /**\n * Get the stroke color.\n * @return {import(\"../color.js\").Color|import(\"../colorlike.js\").ColorLike} Color.\n * @api\n */\n getColor() {\n return this.color_;\n }\n\n /**\n * Get the line cap type for the stroke.\n * @return {CanvasLineCap|undefined} Line cap.\n * @api\n */\n getLineCap() {\n return this.lineCap_;\n }\n\n /**\n * Get the line dash style for the stroke.\n * @return {Array|null} Line dash.\n * @api\n */\n getLineDash() {\n return this.lineDash_;\n }\n\n /**\n * Get the line dash offset for the stroke.\n * @return {number|undefined} Line dash offset.\n * @api\n */\n getLineDashOffset() {\n return this.lineDashOffset_;\n }\n\n /**\n * Get the line join type for the stroke.\n * @return {CanvasLineJoin|undefined} Line join.\n * @api\n */\n getLineJoin() {\n return this.lineJoin_;\n }\n\n /**\n * Get the miter limit for the stroke.\n * @return {number|undefined} Miter limit.\n * @api\n */\n getMiterLimit() {\n return this.miterLimit_;\n }\n\n /**\n * Get the stroke width.\n * @return {number|undefined} Width.\n * @api\n */\n getWidth() {\n return this.width_;\n }\n\n /**\n * Set the color.\n *\n * @param {import(\"../color.js\").Color|import(\"../colorlike.js\").ColorLike} color Color.\n * @api\n */\n setColor(color) {\n this.color_ = color;\n }\n\n /**\n * Set the line cap.\n *\n * @param {CanvasLineCap|undefined} lineCap Line cap.\n * @api\n */\n setLineCap(lineCap) {\n this.lineCap_ = lineCap;\n }\n\n /**\n * Set the line dash.\n *\n * @param {Array|null} lineDash Line dash.\n * @api\n */\n setLineDash(lineDash) {\n this.lineDash_ = lineDash;\n }\n\n /**\n * Set the line dash offset.\n *\n * @param {number|undefined} lineDashOffset Line dash offset.\n * @api\n */\n setLineDashOffset(lineDashOffset) {\n this.lineDashOffset_ = lineDashOffset;\n }\n\n /**\n * Set the line join.\n *\n * @param {CanvasLineJoin|undefined} lineJoin Line join.\n * @api\n */\n setLineJoin(lineJoin) {\n this.lineJoin_ = lineJoin;\n }\n\n /**\n * Set the miter limit.\n *\n * @param {number|undefined} miterLimit Miter limit.\n * @api\n */\n setMiterLimit(miterLimit) {\n this.miterLimit_ = miterLimit;\n }\n\n /**\n * Set the width.\n *\n * @param {number|undefined} width Width.\n * @api\n */\n setWidth(width) {\n this.width_ = width;\n }\n}\n\nexport default Stroke;\n","/**\n * @module ol/style/Style\n */\n\nimport CircleStyle from './Circle.js';\nimport Fill from './Fill.js';\nimport Stroke from './Stroke.js';\nimport {assert} from '../asserts.js';\n\n/**\n * A function that takes an {@link module:ol/Feature~Feature} and a `{number}`\n * representing the view's resolution. The function should return a\n * {@link module:ol/style/Style~Style} or an array of them. This way e.g. a\n * vector layer can be styled. If the function returns `undefined`, the\n * feature will not be rendered.\n *\n * @typedef {function(import(\"../Feature.js\").FeatureLike, number):(Style|Array