diff --git a/templates/map/client/config.json b/templates/map/client/config.json
index 805f7e3f..02b076b5 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 d9a9cd9e..9d77addc 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 00000000..415d9af1
--- /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]+(0r-t.getDate())){t.setDate(t.getDate()+e);break}e-=r-t.getDate()+1,t.setDate(1),11>n?t.setMonth(n+1):(t.setMonth(0),t.setFullYear(t.getFullYear()+1))}return t}Mt=e.InternalError=Ct("InternalError");for(var sn=Array(256),un=0;256>un;++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=/