
var CanvasKitInit = (() => {
  var _scriptName = import.meta.url;
  
  return (
function(moduleArg = {}) {
  var moduleRtn;

var q=moduleArg,aa,ba,ca=new Promise((a,b)=>{aa=a;ba=b}),da="object"==typeof window,ea="function"==typeof importScripts;
(function(a){a.Jd=a.Jd||[];a.Jd.push(function(){a.MakeSWCanvasSurface=function(b){var c=b,d="undefined"!==typeof OffscreenCanvas&&c instanceof OffscreenCanvas;if(!("undefined"!==typeof HTMLCanvasElement&&c instanceof HTMLCanvasElement||d||(c=document.getElementById(b),c)))throw"Canvas with id "+b+" was not found";if(b=a.MakeSurface(c.width,c.height))b.ge=c;return b};a.MakeCanvasSurface||(a.MakeCanvasSurface=a.MakeSWCanvasSurface);a.MakeSurface=function(b,c){var d={width:b,height:c,colorType:a.ColorType.RGBA_8888,
alphaType:a.AlphaType.Unpremul,colorSpace:a.ColorSpace.SRGB},f=b*c*4,h=a._malloc(f);if(d=a.Surface._makeRasterDirect(d,h,4*b))d.ge=null,d.Ge=b,d.De=c,d.Ee=f,d.ne=h,d.getCanvas().clear(a.TRANSPARENT);return d};a.MakeRasterDirectSurface=function(b,c,d){return a.Surface._makeRasterDirect(b,c.byteOffset,d)};a.Surface.prototype.flush=function(b){a.Gd(this.Fd);this._flush();if(this.ge){var c=new Uint8ClampedArray(a.HEAPU8.buffer,this.ne,this.Ee);c=new ImageData(c,this.Ge,this.De);b?this.ge.getContext("2d").putImageData(c,
0,0,b[0],b[1],b[2]-b[0],b[3]-b[1]):this.ge.getContext("2d").putImageData(c,0,0)}};a.Surface.prototype.dispose=function(){this.ne&&a._free(this.ne);this.delete()};a.Gd=a.Gd||function(){};a.he=a.he||function(){return null}})})(q);
(function(a){a.Jd=a.Jd||[];a.Jd.push(function(){function b(k,p,t){return k&&k.hasOwnProperty(p)?k[p]:t}function c(k){var p=ha(ia);ia[p]=k;return p}function d(k){return k.naturalHeight||k.videoHeight||k.displayHeight||k.height}function f(k){return k.naturalWidth||k.videoWidth||k.displayWidth||k.width}function h(k,p,t,v){k.bindTexture(k.TEXTURE_2D,p);v||t.alphaType!==a.AlphaType.Premul||k.pixelStorei(k.UNPACK_PREMULTIPLY_ALPHA_WEBGL,!0);return p}function n(k,p,t){t||p.alphaType!==a.AlphaType.Premul||
k.pixelStorei(k.UNPACK_PREMULTIPLY_ALPHA_WEBGL,!1);k.bindTexture(k.TEXTURE_2D,null)}a.GetWebGLContext=function(k,p){if(!k)throw"null canvas passed into makeWebGLContext";var t={alpha:b(p,"alpha",1),depth:b(p,"depth",1),stencil:b(p,"stencil",8),antialias:b(p,"antialias",0),premultipliedAlpha:b(p,"premultipliedAlpha",1),preserveDrawingBuffer:b(p,"preserveDrawingBuffer",0),preferLowPowerToHighPerformance:b(p,"preferLowPowerToHighPerformance",0),failIfMajorPerformanceCaveat:b(p,"failIfMajorPerformanceCaveat",
0),enableExtensionsByDefault:b(p,"enableExtensionsByDefault",1),explicitSwapControl:b(p,"explicitSwapControl",0),renderViaOffscreenBackBuffer:b(p,"renderViaOffscreenBackBuffer",0)};t.majorVersion=p&&p.majorVersion?p.majorVersion:"undefined"!==typeof WebGL2RenderingContext?2:1;if(t.explicitSwapControl)throw"explicitSwapControl is not supported";k=ja(k,t);if(!k)return 0;ka(k);x.Sd.getExtension("WEBGL_debug_renderer_info");return k};a.deleteContext=function(k){x===la[k]&&(x=null);"object"==typeof JSEvents&&
JSEvents.ef(la[k].Sd.canvas);la[k]&&la[k].Sd.canvas&&(la[k].Sd.canvas.Be=void 0);la[k]=null};a._setTextureCleanup({deleteTexture:function(k,p){var t=ia[p];t&&la[k].Sd.deleteTexture(t);ia[p]=null}});a.MakeWebGLContext=function(k){if(!this.Gd(k))return null;var p=this._MakeGrContext();if(!p)return null;p.Fd=k;var t=p.delete.bind(p);p["delete"]=function(){a.Gd(this.Fd);t()}.bind(p);return x.pe=p};a.MakeGrContext=a.MakeWebGLContext;a.GrDirectContext.prototype.getResourceCacheLimitBytes=function(){a.Gd(this.Fd);
this._getResourceCacheLimitBytes()};a.GrDirectContext.prototype.getResourceCacheUsageBytes=function(){a.Gd(this.Fd);this._getResourceCacheUsageBytes()};a.GrDirectContext.prototype.releaseResourcesAndAbandonContext=function(){a.Gd(this.Fd);this._releaseResourcesAndAbandonContext()};a.GrDirectContext.prototype.setResourceCacheLimitBytes=function(k){a.Gd(this.Fd);this._setResourceCacheLimitBytes(k)};a.MakeOnScreenGLSurface=function(k,p,t,v,z,A){if(!this.Gd(k.Fd))return null;p=void 0===z||void 0===A?
this._MakeOnScreenGLSurface(k,p,t,v):this._MakeOnScreenGLSurface(k,p,t,v,z,A);if(!p)return null;p.Fd=k.Fd;return p};a.MakeRenderTarget=function(){var k=arguments[0];if(!this.Gd(k.Fd))return null;if(3===arguments.length){var p=this._MakeRenderTargetWH(k,arguments[1],arguments[2]);if(!p)return null}else if(2===arguments.length){if(p=this._MakeRenderTargetII(k,arguments[1]),!p)return null}else return null;p.Fd=k.Fd;return p};a.MakeWebGLCanvasSurface=function(k,p,t){p=p||null;var v=k,z="undefined"!==
typeof OffscreenCanvas&&v instanceof OffscreenCanvas;if(!("undefined"!==typeof HTMLCanvasElement&&v instanceof HTMLCanvasElement||z||(v=document.getElementById(k),v)))throw"Canvas with id "+k+" was not found";k=this.GetWebGLContext(v,t);if(!k||0>k)throw"failed to create webgl context: err "+k;k=this.MakeWebGLContext(k);p=this.MakeOnScreenGLSurface(k,v.width,v.height,p);return p?p:(p=v.cloneNode(!0),v.parentNode.replaceChild(p,v),p.classList.add("ck-replaced"),a.MakeSWCanvasSurface(p))};a.MakeCanvasSurface=
a.MakeWebGLCanvasSurface;a.Surface.prototype.makeImageFromTexture=function(k,p){a.Gd(this.Fd);k=c(k);if(p=this._makeImageFromTexture(this.Fd,k,p))p.ae=k;return p};a.Surface.prototype.makeImageFromTextureSource=function(k,p,t){p||={height:d(k),width:f(k),colorType:a.ColorType.RGBA_8888,alphaType:t?a.AlphaType.Premul:a.AlphaType.Unpremul};p.colorSpace||(p.colorSpace=a.ColorSpace.SRGB);a.Gd(this.Fd);var v=x.Sd;t=h(v,v.createTexture(),p,t);2===x.version?v.texImage2D(v.TEXTURE_2D,0,v.RGBA,p.width,p.height,
0,v.RGBA,v.UNSIGNED_BYTE,k):v.texImage2D(v.TEXTURE_2D,0,v.RGBA,v.RGBA,v.UNSIGNED_BYTE,k);n(v,p);this._resetContext();return this.makeImageFromTexture(t,p)};a.Surface.prototype.updateTextureFromSource=function(k,p,t){if(k.ae){a.Gd(this.Fd);var v=k.getImageInfo(),z=x.Sd,A=h(z,ia[k.ae],v,t);2===x.version?z.texImage2D(z.TEXTURE_2D,0,z.RGBA,f(p),d(p),0,z.RGBA,z.UNSIGNED_BYTE,p):z.texImage2D(z.TEXTURE_2D,0,z.RGBA,z.RGBA,z.UNSIGNED_BYTE,p);n(z,v,t);this._resetContext();ia[k.ae]=null;k.ae=c(A);v.colorSpace=
k.getColorSpace();p=this._makeImageFromTexture(this.Fd,k.ae,v);t=k.Ed.Hd;z=k.Ed.Ld;k.Ed.Hd=p.Ed.Hd;k.Ed.Ld=p.Ed.Ld;p.Ed.Hd=t;p.Ed.Ld=z;p.delete();v.colorSpace.delete()}};a.MakeLazyImageFromTextureSource=function(k,p,t){p||={height:d(k),width:f(k),colorType:a.ColorType.RGBA_8888,alphaType:t?a.AlphaType.Premul:a.AlphaType.Unpremul};p.colorSpace||(p.colorSpace=a.ColorSpace.SRGB);var v={makeTexture:function(){var z=x,A=z.Sd,E=h(A,A.createTexture(),p,t);2===z.version?A.texImage2D(A.TEXTURE_2D,0,A.RGBA,
p.width,p.height,0,A.RGBA,A.UNSIGNED_BYTE,k):A.texImage2D(A.TEXTURE_2D,0,A.RGBA,A.RGBA,A.UNSIGNED_BYTE,k);n(A,p,t);return c(E)},freeSrc:function(){}};"VideoFrame"===k.constructor.name&&(v.freeSrc=function(){k.close()});return a.Image._makeFromGenerator(p,v)};a.Gd=function(k){return k?ka(k):!1};a.he=function(){return x&&x.pe&&!x.pe.isDeleted()?x.pe:null}})})(q);
(function(a){function b(l){return(f(255*l[3])<<24|f(255*l[0])<<16|f(255*l[1])<<8|f(255*l[2])<<0)>>>0}function c(l){if(l&&l._ck)return l;if(l instanceof Float32Array){for(var e=Math.floor(l.length/4),g=new Uint32Array(e),m=0;m<e;m++)g[m]=b(l.slice(4*m,4*(m+1)));return g}if(l instanceof Uint32Array)return l;if(l instanceof Array&&l[0]instanceof Float32Array)return l.map(b)}function d(l){if(void 0===l)return 1;var e=parseFloat(l);return l&&-1!==l.indexOf("%")?e/100:e}function f(l){return Math.round(Math.max(0,
Math.min(l||0,255)))}function h(l,e){e&&e._ck||a._free(l)}function n(l,e,g){if(!l||!l.length)return 0;if(l&&l._ck)return l.byteOffset;var m=a[e].BYTES_PER_ELEMENT;g||=a._malloc(l.length*m);a[e].set(l,g/m);return g}function k(l){var e={Qd:0,count:l.length,colorType:a.ColorType.RGBA_F32};if(l instanceof Float32Array)e.Qd=n(l,"HEAPF32"),e.count=l.length/4;else if(l instanceof Uint32Array)e.Qd=n(l,"HEAPU32"),e.colorType=a.ColorType.RGBA_8888;else if(l instanceof Array){if(l&&l.length){for(var g=a._malloc(16*
l.length),m=0,r=g/4,u=0;u<l.length;u++)for(var w=0;4>w;w++)a.HEAPF32[r+m]=l[u][w],m++;l=g}else l=0;e.Qd=l}else throw"Invalid argument to copyFlexibleColorArray, Not a color array "+typeof l;return e}function p(l){if(!l)return 0;var e=V.toTypedArray();if(l.length){if(6===l.length||9===l.length)return n(l,"HEAPF32",L),6===l.length&&a.HEAPF32.set(Oc,6+L/4),L;if(16===l.length)return e[0]=l[0],e[1]=l[1],e[2]=l[3],e[3]=l[4],e[4]=l[5],e[5]=l[7],e[6]=l[12],e[7]=l[13],e[8]=l[15],L;throw"invalid matrix size";
}if(void 0===l.m11)throw"invalid matrix argument";e[0]=l.m11;e[1]=l.m21;e[2]=l.m41;e[3]=l.m12;e[4]=l.m22;e[5]=l.m42;e[6]=l.m14;e[7]=l.m24;e[8]=l.m44;return L}function t(l){if(!l)return 0;var e=S.toTypedArray();if(l.length){if(16!==l.length&&6!==l.length&&9!==l.length)throw"invalid matrix size";if(16===l.length)return n(l,"HEAPF32",fa);e.fill(0);e[0]=l[0];e[1]=l[1];e[3]=l[2];e[4]=l[3];e[5]=l[4];e[7]=l[5];e[10]=1;e[12]=l[6];e[13]=l[7];e[15]=l[8];6===l.length&&(e[12]=0,e[13]=0,e[15]=1);return fa}if(void 0===
l.m11)throw"invalid matrix argument";e[0]=l.m11;e[1]=l.m21;e[2]=l.m31;e[3]=l.m41;e[4]=l.m12;e[5]=l.m22;e[6]=l.m32;e[7]=l.m42;e[8]=l.m13;e[9]=l.m23;e[10]=l.m33;e[11]=l.m43;e[12]=l.m14;e[13]=l.m24;e[14]=l.m34;e[15]=l.m44;return fa}function v(l,e){return n(l,"HEAPF32",e||Y)}function z(l,e,g,m){var r=ya.toTypedArray();r[0]=l;r[1]=e;r[2]=g;r[3]=m;return Y}function A(l){for(var e=new Float32Array(4),g=0;4>g;g++)e[g]=a.HEAPF32[l/4+g];return e}function E(l,e){return n(l,"HEAPF32",e||P)}function M(l,e){return n(l,
"HEAPF32",e||ob)}a.Color=function(l,e,g,m){void 0===m&&(m=1);return a.Color4f(f(l)/255,f(e)/255,f(g)/255,m)};a.ColorAsInt=function(l,e,g,m){void 0===m&&(m=255);return(f(m)<<24|f(l)<<16|f(e)<<8|f(g)<<0&268435455)>>>0};a.Color4f=function(l,e,g,m){void 0===m&&(m=1);return Float32Array.of(l,e,g,m)};Object.defineProperty(a,"TRANSPARENT",{get:function(){return a.Color4f(0,0,0,0)}});Object.defineProperty(a,"BLACK",{get:function(){return a.Color4f(0,0,0,1)}});Object.defineProperty(a,"WHITE",{get:function(){return a.Color4f(1,
1,1,1)}});Object.defineProperty(a,"RED",{get:function(){return a.Color4f(1,0,0,1)}});Object.defineProperty(a,"GREEN",{get:function(){return a.Color4f(0,1,0,1)}});Object.defineProperty(a,"BLUE",{get:function(){return a.Color4f(0,0,1,1)}});Object.defineProperty(a,"YELLOW",{get:function(){return a.Color4f(1,1,0,1)}});Object.defineProperty(a,"CYAN",{get:function(){return a.Color4f(0,1,1,1)}});Object.defineProperty(a,"MAGENTA",{get:function(){return a.Color4f(1,0,1,1)}});a.getColorComponents=function(l){return[Math.floor(255*
l[0]),Math.floor(255*l[1]),Math.floor(255*l[2]),l[3]]};a.parseColorString=function(l,e){l=l.toLowerCase();if(l.startsWith("#")){e=255;switch(l.length){case 9:e=parseInt(l.slice(7,9),16);case 7:var g=parseInt(l.slice(1,3),16);var m=parseInt(l.slice(3,5),16);var r=parseInt(l.slice(5,7),16);break;case 5:e=17*parseInt(l.slice(4,5),16);case 4:g=17*parseInt(l.slice(1,2),16),m=17*parseInt(l.slice(2,3),16),r=17*parseInt(l.slice(3,4),16)}return a.Color(g,m,r,e/255)}return l.startsWith("rgba")?(l=l.slice(5,
-1),l=l.split(","),a.Color(+l[0],+l[1],+l[2],d(l[3]))):l.startsWith("rgb")?(l=l.slice(4,-1),l=l.split(","),a.Color(+l[0],+l[1],+l[2],d(l[3]))):l.startsWith("gray(")||l.startsWith("hsl")||!e||(l=e[l],void 0===l)?a.BLACK:l};a.multiplyByAlpha=function(l,e){l=l.slice();l[3]=Math.max(0,Math.min(l[3]*e,1));return l};a.Malloc=function(l,e){var g=a._malloc(e*l.BYTES_PER_ELEMENT);return{_ck:!0,length:e,byteOffset:g,Xd:null,subarray:function(m,r){m=this.toTypedArray().subarray(m,r);m._ck=!0;return m},toTypedArray:function(){if(this.Xd&&
this.Xd.length)return this.Xd;this.Xd=new l(a.HEAPU8.buffer,g,e);this.Xd._ck=!0;return this.Xd}}};a.Free=function(l){a._free(l.byteOffset);l.byteOffset=0;l.toTypedArray=null;l.Xd=null};var L=0,V,fa=0,S,Y=0,ya,W,P=0,Nb,ra=0,Ob,pb=0,Pb,qb=0,Va,Ga=0,Qb,ob=0,Rb,Sb=0,Oc=Float32Array.of(0,0,1);a.onRuntimeInitialized=function(){function l(e,g,m,r,u,w,B){w||(w=4*r.width,r.colorType===a.ColorType.RGBA_F16?w*=2:r.colorType===a.ColorType.RGBA_F32&&(w*=4));var J=w*r.height;var F=u?u.byteOffset:a._malloc(J);if(B?
!e._readPixels(r,F,w,g,m,B):!e._readPixels(r,F,w,g,m))return u||a._free(F),null;if(u)return u.toTypedArray();switch(r.colorType){case a.ColorType.RGBA_8888:case a.ColorType.RGBA_F16:e=(new Uint8Array(a.HEAPU8.buffer,F,J)).slice();break;case a.ColorType.RGBA_F32:e=(new Float32Array(a.HEAPU8.buffer,F,J)).slice();break;default:return null}a._free(F);return e}ya=a.Malloc(Float32Array,4);Y=ya.byteOffset;S=a.Malloc(Float32Array,16);fa=S.byteOffset;V=a.Malloc(Float32Array,9);L=V.byteOffset;Qb=a.Malloc(Float32Array,
12);ob=Qb.byteOffset;Rb=a.Malloc(Float32Array,12);Sb=Rb.byteOffset;W=a.Malloc(Float32Array,4);P=W.byteOffset;Nb=a.Malloc(Float32Array,4);ra=Nb.byteOffset;Ob=a.Malloc(Float32Array,3);pb=Ob.byteOffset;Pb=a.Malloc(Float32Array,3);qb=Pb.byteOffset;Va=a.Malloc(Int32Array,4);Ga=Va.byteOffset;a.ColorSpace.SRGB=a.ColorSpace._MakeSRGB();a.ColorSpace.DISPLAY_P3=a.ColorSpace._MakeDisplayP3();a.ColorSpace.ADOBE_RGB=a.ColorSpace._MakeAdobeRGB();a.GlyphRunFlags={IsWhiteSpace:a._GlyphRunFlags_isWhiteSpace};a.Path.MakeFromCmds=
function(e){var g=n(e,"HEAPF32"),m=a.Path._MakeFromCmds(g,e.length);h(g,e);return m};a.Path.MakeFromVerbsPointsWeights=function(e,g,m){var r=n(e,"HEAPU8"),u=n(g,"HEAPF32"),w=n(m,"HEAPF32"),B=a.Path._MakeFromVerbsPointsWeights(r,e.length,u,g.length/2,w,m&&m.length||0);h(r,e);h(u,g);h(w,m);return B};a.PathBuilder.prototype.addArc=function(e,g,m){e=E(e);this._addArc(e,g,m);return this};a.PathBuilder.prototype.addCircle=function(e,g,m,r){this._addCircle(e,g,m,!!r);return this};a.PathBuilder.prototype.addOval=
function(e,g,m){void 0===m&&(m=1);e=E(e);this._addOval(e,!!g,m);return this};a.PathBuilder.prototype.addPath=function(){var e=Array.prototype.slice.call(arguments),g=e[0],m=!1;"boolean"===typeof e[e.length-1]&&(m=e.pop());if(1===e.length)this._addPath(g,1,0,0,0,1,0,0,0,1,m);else if(2===e.length)e=e[1],this._addPath(g,e[0],e[1],e[2],e[3],e[4],e[5],e[6]||0,e[7]||0,e[8]||1,m);else if(7===e.length||10===e.length)this._addPath(g,e[1],e[2],e[3],e[4],e[5],e[6],e[7]||0,e[8]||0,e[9]||1,m);else return null;
return this};a.PathBuilder.prototype.addPolygon=function(e,g){var m=n(e,"HEAPF32");this._addPolygon(m,e.length/2,g);h(m,e);return this};a.PathBuilder.prototype.addRect=function(e,g){e=E(e);this._addRect(e,!!g);return this};a.PathBuilder.prototype.addRRect=function(e,g){e=M(e);this._addRRect(e,!!g);return this};a.PathBuilder.prototype.addVerbsPointsWeights=function(e,g,m){var r=n(e,"HEAPU8"),u=n(g,"HEAPF32"),w=n(m,"HEAPF32");this._addVerbsPointsWeights(r,e.length,u,g.length/2,w,m&&m.length||0);h(r,
e);h(u,g);h(w,m);return this};a.PathBuilder.prototype.arc=function(e,g,m,r,u,w){e=a.LTRBRect(e-m,g-m,e+m,g+m);u=(u-r)/Math.PI*180-360*!!w;r=(new a.PathBuilder).addArc(e,r/Math.PI*180,u).detachAndDelete();this.addPath(r,!0);r.delete();return this};a.PathBuilder.prototype.arcToOval=function(e,g,m,r){e=E(e);this._arcToOval(e,g,m,r);return this};a.PathBuilder.prototype.arcToRotated=function(e,g,m,r,u,w,B){this._arcToRotated(e,g,m,!!r,!!u,w,B);return this};a.PathBuilder.prototype.arcToTangent=function(e,
g,m,r,u){this._arcToTangent(e,g,m,r,u);return this};a.PathBuilder.prototype.close=function(){this._close();return this};a.PathBuilder.prototype.conicTo=function(e,g,m,r,u){this._conicTo(e,g,m,r,u);return this};a.Path.prototype.computeTightBounds=function(e){this._computeTightBounds(P);var g=W.toTypedArray();return e?(e.set(g),e):g.slice()};a.PathBuilder.prototype.cubicTo=function(e,g,m,r,u,w){this._cubicTo(e,g,m,r,u,w);return this};a.PathBuilder.prototype.detachAndDelete=function(){var e=this.detach();
this.delete();return e};a.Path.prototype.getBounds=function(e){this._getBounds(P);var g=W.toTypedArray();return e?(e.set(g),e):g.slice()};a.PathBuilder.prototype.getBounds=function(e){this._getBounds(P);var g=W.toTypedArray();return e?(e.set(g),e):g.slice()};a.PathBuilder.prototype.lineTo=function(e,g){this._lineTo(e,g);return this};a.PathBuilder.prototype.moveTo=function(e,g){this._moveTo(e,g);return this};a.PathBuilder.prototype.offset=function(e,g){this._transform(1,0,e,0,1,g,0,0,1);return this};
a.PathBuilder.prototype.quadTo=function(e,g,m,r){this._quadTo(e,g,m,r);return this};a.PathBuilder.prototype.rArcTo=function(e,g,m,r,u,w,B){this._rArcTo(e,g,m,r,u,w,B);return this};a.PathBuilder.prototype.rConicTo=function(e,g,m,r,u){this._rConicTo(e,g,m,r,u);return this};a.PathBuilder.prototype.rCubicTo=function(e,g,m,r,u,w){this._rCubicTo(e,g,m,r,u,w);return this};a.PathBuilder.prototype.rLineTo=function(e,g){this._rLineTo(e,g);return this};a.PathBuilder.prototype.rMoveTo=function(e,g){this._rMoveTo(e,
g);return this};a.PathBuilder.prototype.rQuadTo=function(e,g,m,r){this._rQuadTo(e,g,m,r);return this};a.Path.prototype.makeStroked=function(e){e=e||{};e.width=e.width||1;e.miter_limit=e.miter_limit||4;e.cap=e.cap||a.StrokeCap.Butt;e.join=e.join||a.StrokeJoin.Miter;e.precision=e.precision||1;return this._makeStroked(e)};a.PathBuilder.prototype.transform=function(){if(1===arguments.length){var e=arguments[0];this._transform(e[0],e[1],e[2],e[3],e[4],e[5],e[6]||0,e[7]||0,e[8]||1)}else if(6===arguments.length||
9===arguments.length)e=arguments,this._transform(e[0],e[1],e[2],e[3],e[4],e[5],e[6]||0,e[7]||0,e[8]||1);else throw"transform expected to take 1 or 9 arguments. Got "+arguments.length;return this};a.Path.prototype.makeTrimmed=function(e,g,m){return this._makeTrimmed(e,g,!!m)};a.Image.prototype.encodeToBytes=function(e,g){var m=a.he();e=e||a.ImageFormat.PNG;g=g||100;return m?this._encodeToBytes(e,g,m):this._encodeToBytes(e,g)};a.Image.prototype.makeShaderCubic=function(e,g,m,r,u){u=p(u);return this._makeShaderCubic(e,
g,m,r,u)};a.Image.prototype.makeShaderOptions=function(e,g,m,r,u){u=p(u);return this._makeShaderOptions(e,g,m,r,u)};a.Image.prototype.readPixels=function(e,g,m,r,u){var w=a.he();return l(this,e,g,m,r,u,w)};a.Canvas.prototype.clear=function(e){a.Gd(this.Fd);e=v(e);this._clear(e)};a.Canvas.prototype.clipRRect=function(e,g,m){a.Gd(this.Fd);e=M(e);this._clipRRect(e,g,m)};a.Canvas.prototype.clipRect=function(e,g,m){a.Gd(this.Fd);e=E(e);this._clipRect(e,g,m)};a.Canvas.prototype.concat=function(e){a.Gd(this.Fd);
e=t(e);this._concat(e)};a.Canvas.prototype.drawArc=function(e,g,m,r,u){a.Gd(this.Fd);e=E(e);this._drawArc(e,g,m,r,u)};a.Canvas.prototype.drawAtlas=function(e,g,m,r,u,w,B){if(e&&r&&g&&m&&g.length===m.length){a.Gd(this.Fd);u||(u=a.BlendMode.SrcOver);var J=n(g,"HEAPF32"),F=n(m,"HEAPF32"),R=m.length/4,T=n(c(w),"HEAPU32");if(B&&"B"in B&&"C"in B)this._drawAtlasCubic(e,F,J,T,R,u,B.B,B.C,r);else{let sa=a.FilterMode.Linear,Ha=a.MipmapMode.None;B&&(sa=B.filter,"mipmap"in B&&(Ha=B.mipmap));this._drawAtlasOptions(e,
F,J,T,R,u,sa,Ha,r)}h(J,g);h(F,m);h(T,w)}};a.Canvas.prototype.drawCircle=function(e,g,m,r){a.Gd(this.Fd);this._drawCircle(e,g,m,r)};a.Canvas.prototype.drawColor=function(e,g){a.Gd(this.Fd);e=v(e);void 0!==g?this._drawColor(e,g):this._drawColor(e)};a.Canvas.prototype.drawColorInt=function(e,g){a.Gd(this.Fd);this._drawColorInt(e,g||a.BlendMode.SrcOver)};a.Canvas.prototype.drawColorComponents=function(e,g,m,r,u){a.Gd(this.Fd);e=z(e,g,m,r);void 0!==u?this._drawColor(e,u):this._drawColor(e)};a.Canvas.prototype.drawDRRect=
function(e,g,m){a.Gd(this.Fd);e=M(e,ob);g=M(g,Sb);this._drawDRRect(e,g,m)};a.Canvas.prototype.drawImage=function(e,g,m,r){a.Gd(this.Fd);this._drawImage(e,g,m,r||null)};a.Canvas.prototype.drawImageCubic=function(e,g,m,r,u,w){a.Gd(this.Fd);this._drawImageCubic(e,g,m,r,u,w||null)};a.Canvas.prototype.drawImageOptions=function(e,g,m,r,u,w){a.Gd(this.Fd);this._drawImageOptions(e,g,m,r,u,w||null)};a.Canvas.prototype.drawImageNine=function(e,g,m,r,u){a.Gd(this.Fd);g=n(g,"HEAP32",Ga);m=E(m);this._drawImageNine(e,
g,m,r,u||null)};a.Canvas.prototype.drawImageRect=function(e,g,m,r,u){a.Gd(this.Fd);E(g,P);E(m,ra);this._drawImageRect(e,P,ra,r,!!u)};a.Canvas.prototype.drawImageRectCubic=function(e,g,m,r,u,w){a.Gd(this.Fd);E(g,P);E(m,ra);this._drawImageRectCubic(e,P,ra,r,u,w||null)};a.Canvas.prototype.drawImageRectOptions=function(e,g,m,r,u,w){a.Gd(this.Fd);E(g,P);E(m,ra);this._drawImageRectOptions(e,P,ra,r,u,w||null)};a.Canvas.prototype.drawLine=function(e,g,m,r,u){a.Gd(this.Fd);this._drawLine(e,g,m,r,u)};a.Canvas.prototype.drawOval=
function(e,g){a.Gd(this.Fd);e=E(e);this._drawOval(e,g)};a.Canvas.prototype.drawPaint=function(e){a.Gd(this.Fd);this._drawPaint(e)};a.Canvas.prototype.drawParagraph=function(e,g,m){a.Gd(this.Fd);this._drawParagraph(e,g,m)};a.Canvas.prototype.drawPatch=function(e,g,m,r,u){if(24>e.length)throw"Need 12 cubic points";if(g&&4>g.length)throw"Need 4 colors";if(m&&8>m.length)throw"Need 4 shader coordinates";a.Gd(this.Fd);const w=n(e,"HEAPF32"),B=g?n(c(g),"HEAPU32"):0,J=m?n(m,"HEAPF32"):0;r||(r=a.BlendMode.Modulate);
this._drawPatch(w,B,J,r,u);h(J,m);h(B,g);h(w,e)};a.Canvas.prototype.drawPath=function(e,g){a.Gd(this.Fd);this._drawPath(e,g)};a.Canvas.prototype.drawPicture=function(e){a.Gd(this.Fd);this._drawPicture(e)};a.Canvas.prototype.drawPoints=function(e,g,m){a.Gd(this.Fd);var r=n(g,"HEAPF32");this._drawPoints(e,r,g.length/2,m);h(r,g)};a.Canvas.prototype.drawRRect=function(e,g){a.Gd(this.Fd);e=M(e);this._drawRRect(e,g)};a.Canvas.prototype.drawRect=function(e,g){a.Gd(this.Fd);e=E(e);this._drawRect(e,g)};a.Canvas.prototype.drawRect4f=
function(e,g,m,r,u){a.Gd(this.Fd);this._drawRect4f(e,g,m,r,u)};a.Canvas.prototype.drawShadow=function(e,g,m,r,u,w,B){a.Gd(this.Fd);var J=n(u,"HEAPF32"),F=n(w,"HEAPF32");g=n(g,"HEAPF32",pb);m=n(m,"HEAPF32",qb);this._drawShadow(e,g,m,r,J,F,B);h(J,u);h(F,w)};a.getShadowLocalBounds=function(e,g,m,r,u,w,B){e=p(e);m=n(m,"HEAPF32",pb);r=n(r,"HEAPF32",qb);if(!this._getShadowLocalBounds(e,g,m,r,u,w,P))return null;g=W.toTypedArray();return B?(B.set(g),B):g.slice()};a.Canvas.prototype.drawTextBlob=function(e,
g,m,r){a.Gd(this.Fd);this._drawTextBlob(e,g,m,r)};a.Canvas.prototype.drawVertices=function(e,g,m){a.Gd(this.Fd);this._drawVertices(e,g,m)};a.Canvas.prototype.getDeviceClipBounds=function(e){this._getDeviceClipBounds(Ga);var g=Va.toTypedArray();e?e.set(g):e=g.slice();return e};a.Canvas.prototype.quickReject=function(e){e=E(e);return this._quickReject(e)};a.Canvas.prototype.getLocalToDevice=function(){this._getLocalToDevice(fa);for(var e=fa,g=Array(16),m=0;16>m;m++)g[m]=a.HEAPF32[e/4+m];return g};a.Canvas.prototype.getTotalMatrix=
function(){this._getTotalMatrix(L);for(var e=Array(9),g=0;9>g;g++)e[g]=a.HEAPF32[L/4+g];return e};a.Canvas.prototype.makeSurface=function(e){e=this._makeSurface(e);e.Fd=this.Fd;return e};a.Canvas.prototype.readPixels=function(e,g,m,r,u){a.Gd(this.Fd);return l(this,e,g,m,r,u)};a.Canvas.prototype.saveLayer=function(e,g,m,r,u){g=E(g);return this._saveLayer(e||null,g,m||null,r||0,u||a.TileMode.Clamp)};a.Canvas.prototype.writePixels=function(e,g,m,r,u,w,B,J){if(e.byteLength%(g*m))throw"pixels length must be a multiple of the srcWidth * srcHeight";
a.Gd(this.Fd);var F=e.byteLength/(g*m);w=w||a.AlphaType.Unpremul;B=B||a.ColorType.RGBA_8888;J=J||a.ColorSpace.SRGB;var R=F*g;F=n(e,"HEAPU8");g=this._writePixels({width:g,height:m,colorType:B,alphaType:w,colorSpace:J},F,R,r,u);h(F,e);return g};a.ColorFilter.MakeBlend=function(e,g,m){e=v(e);m=m||a.ColorSpace.SRGB;return a.ColorFilter._MakeBlend(e,g,m)};a.ColorFilter.MakeMatrix=function(e){if(!e||20!==e.length)throw"invalid color matrix";var g=n(e,"HEAPF32"),m=a.ColorFilter._makeMatrix(g);h(g,e);return m};
a.ContourMeasure.prototype.getPosTan=function(e,g){this._getPosTan(e,P);e=W.toTypedArray();return g?(g.set(e),g):e.slice()};a.ImageFilter.prototype.getOutputBounds=function(e,g,m){e=E(e,P);g=p(g);this._getOutputBounds(e,g,Ga);g=Va.toTypedArray();return m?(m.set(g),m):g.slice()};a.ImageFilter.MakeDropShadow=function(e,g,m,r,u,w){u=v(u,Y);return a.ImageFilter._MakeDropShadow(e,g,m,r,u,w)};a.ImageFilter.MakeDropShadowOnly=function(e,g,m,r,u,w){u=v(u,Y);return a.ImageFilter._MakeDropShadowOnly(e,g,m,
r,u,w)};a.ImageFilter.MakeImage=function(e,g,m,r){m=E(m,P);r=E(r,ra);if("B"in g&&"C"in g)return a.ImageFilter._MakeImageCubic(e,g.B,g.C,m,r);const u=g.filter;let w=a.MipmapMode.None;"mipmap"in g&&(w=g.mipmap);return a.ImageFilter._MakeImageOptions(e,u,w,m,r)};a.ImageFilter.MakeMatrixTransform=function(e,g,m){e=p(e);if("B"in g&&"C"in g)return a.ImageFilter._MakeMatrixTransformCubic(e,g.B,g.C,m);const r=g.filter;let u=a.MipmapMode.None;"mipmap"in g&&(u=g.mipmap);return a.ImageFilter._MakeMatrixTransformOptions(e,
r,u,m)};a.Paint.prototype.getColor=function(){this._getColor(Y);return A(Y)};a.Paint.prototype.setColor=function(e,g){g=g||null;e=v(e);this._setColor(e,g)};a.Paint.prototype.setColorComponents=function(e,g,m,r,u){u=u||null;e=z(e,g,m,r);this._setColor(e,u)};a.Path.prototype.getPoint=function(e,g){this._getPoint(e,P);e=W.toTypedArray();return g?(g[0]=e[0],g[1]=e[1],g):e.slice(0,2)};a.Picture.prototype.makeShader=function(e,g,m,r,u){r=p(r);u=E(u);return this._makeShader(e,g,m,r,u)};a.Picture.prototype.cullRect=
function(e){this._cullRect(P);var g=W.toTypedArray();return e?(e.set(g),e):g.slice()};a.PictureRecorder.prototype.beginRecording=function(e,g){e=E(e);return this._beginRecording(e,!!g)};a.Surface.prototype.getCanvas=function(){var e=this._getCanvas();e.Fd=this.Fd;return e};a.Surface.prototype.makeImageSnapshot=function(e){a.Gd(this.Fd);e=n(e,"HEAP32",Ga);return this._makeImageSnapshot(e)};a.Surface.prototype.makeSurface=function(e){a.Gd(this.Fd);e=this._makeSurface(e);e.Fd=this.Fd;return e};a.Surface.prototype.Fe=
function(e,g){this.$d||(this.$d=this.getCanvas());return requestAnimationFrame(function(){a.Gd(this.Fd);e(this.$d);this.flush(g)}.bind(this))};a.Surface.prototype.requestAnimationFrame||(a.Surface.prototype.requestAnimationFrame=a.Surface.prototype.Fe);a.Surface.prototype.Ce=function(e,g){this.$d||(this.$d=this.getCanvas());requestAnimationFrame(function(){a.Gd(this.Fd);e(this.$d);this.flush(g);this.dispose()}.bind(this))};a.Surface.prototype.drawOnce||(a.Surface.prototype.drawOnce=a.Surface.prototype.Ce);
a.PathEffect.MakeDash=function(e,g){g||=0;if(!e.length||1===e.length%2)throw"Intervals array must have even length";var m=n(e,"HEAPF32");g=a.PathEffect._MakeDash(m,e.length,g);h(m,e);return g};a.PathEffect.MakeLine2D=function(e,g){g=p(g);return a.PathEffect._MakeLine2D(e,g)};a.PathEffect.MakePath2D=function(e,g){e=p(e);return a.PathEffect._MakePath2D(e,g)};a.Shader.MakeColor=function(e,g){g=g||null;e=v(e);return a.Shader._MakeColor(e,g)};a.Shader.Blend=a.Shader.MakeBlend;a.Shader.Color=a.Shader.MakeColor;
a.Shader.MakeLinearGradient=function(e,g,m,r,u,w,B,J){J=J||null;var F=k(m),R=n(r,"HEAPF32");B=B||0;w=p(w);var T=W.toTypedArray();T.set(e);T.set(g,2);e=a.Shader._MakeLinearGradient(P,F.Qd,F.colorType,R,F.count,u,B,w,J);h(F.Qd,m);r&&h(R,r);return e};a.Shader.MakeRadialGradient=function(e,g,m,r,u,w,B,J){J=J||null;var F=k(m),R=n(r,"HEAPF32");B=B||0;w=p(w);e=a.Shader._MakeRadialGradient(e[0],e[1],g,F.Qd,F.colorType,R,F.count,u,B,w,J);h(F.Qd,m);r&&h(R,r);return e};a.Shader.MakeSweepGradient=function(e,
g,m,r,u,w,B,J,F,R){R=R||null;var T=k(m),sa=n(r,"HEAPF32");B=B||0;J=J||0;F=F||360;w=p(w);e=a.Shader._MakeSweepGradient(e,g,T.Qd,T.colorType,sa,T.count,u,J,F,B,w,R);h(T.Qd,m);r&&h(sa,r);return e};a.Shader.MakeTwoPointConicalGradient=function(e,g,m,r,u,w,B,J,F,R){R=R||null;var T=k(u),sa=n(w,"HEAPF32");F=F||0;J=p(J);var Ha=W.toTypedArray();Ha.set(e);Ha.set(m,2);e=a.Shader._MakeTwoPointConicalGradient(P,g,r,T.Qd,T.colorType,sa,T.count,B,F,J,R);h(T.Qd,u);w&&h(sa,w);return e};a.Vertices.prototype.bounds=
function(e){this._bounds(P);var g=W.toTypedArray();return e?(e.set(g),e):g.slice()};a.Jd&&a.Jd.forEach(function(e){e()})};a.computeTonalColors=function(l){var e=n(l.ambient,"HEAPF32"),g=n(l.spot,"HEAPF32");this._computeTonalColors(e,g);var m={ambient:A(e),spot:A(g)};h(e,l.ambient);h(g,l.spot);return m};a.LTRBRect=function(l,e,g,m){return Float32Array.of(l,e,g,m)};a.XYWHRect=function(l,e,g,m){return Float32Array.of(l,e,l+g,e+m)};a.LTRBiRect=function(l,e,g,m){return Int32Array.of(l,e,g,m)};a.XYWHiRect=
function(l,e,g,m){return Int32Array.of(l,e,l+g,e+m)};a.RRectXY=function(l,e,g){return Float32Array.of(l[0],l[1],l[2],l[3],e,g,e,g,e,g,e,g)};a.MakeAnimatedImageFromEncoded=function(l){l=new Uint8Array(l);var e=a._malloc(l.byteLength);a.HEAPU8.set(l,e);return(l=a._decodeAnimatedImage(e,l.byteLength))?l:null};a.MakeImageFromEncoded=function(l){l=new Uint8Array(l);var e=a._malloc(l.byteLength);a.HEAPU8.set(l,e);return(l=a._decodeImage(e,l.byteLength))?l:null};var Wa=null;a.MakeImageFromCanvasImageSource=
function(l){var e=l.width,g=l.height;Wa||=document.createElement("canvas");Wa.width=e;Wa.height=g;var m=Wa.getContext("2d",{willReadFrequently:!0});m.drawImage(l,0,0);l=m.getImageData(0,0,e,g);return a.MakeImage({width:e,height:g,alphaType:a.AlphaType.Unpremul,colorType:a.ColorType.RGBA_8888,colorSpace:a.ColorSpace.SRGB},l.data,4*e)};a.MakeImage=function(l,e,g){var m=a._malloc(e.length);a.HEAPU8.set(e,m);return a._MakeImage(l,m,e.length,g)};a.MakeVertices=function(l,e,g,m,r,u){var w=r&&r.length||
0,B=0;g&&g.length&&(B|=1);m&&m.length&&(B|=2);void 0===u||u||(B|=4);l=new a._VerticesBuilder(l,e.length/2,w,B);n(e,"HEAPF32",l.positions());l.texCoords()&&n(g,"HEAPF32",l.texCoords());l.colors()&&n(c(m),"HEAPU32",l.colors());l.indices()&&n(r,"HEAPU16",l.indices());return l.detach()};(function(l){l.Jd=l.Jd||[];l.Jd.push(function(){l.Bidi.getBidiRegions=function(e,g){if((e=l.Bidi._getBidiRegions(e,g===l.TextDirection.LTR?1:0))&&e.length){g=[];for(let m=0;m<e.length;m+=3)g.push({start:e[m],end:e[m+1],
level:e[m+2]});e=g}else e=[];return e};l.Bidi.reorderVisual=function(e){var g=n(e,"HEAPU8"),m=l.Bidi._reorderVisual(g,e&&e.length||0);h(g,e);if(m&&m.length){e=[];for(g=0;g<m.length;g+=1)e.push({index:m[g]});m=e}else m=[];return m};l.CodeUnits.compute=function(e){if((e=l.CodeUnits._compute(e))&&e.length){var g=[];for(let m=0;m<e.length;m+=1)g.push({flags:e[m]});e=g}else e=[];return e};l.TextDirection||(l.TextDirection={LTR:{value:1},RTL:{value:0}})})})(q);a.Jd=a.Jd||[];a.Jd.push(function(){});a.Jd=
a.Jd||[];a.Jd.push(function(){a.MakePicture=function(l){l=new Uint8Array(l);var e=a._malloc(l.byteLength);a.HEAPU8.set(l,e);return(l=a._MakePicture(e,l.byteLength))?l:null}});a.Jd=a.Jd||[];a.Jd.push(function(){a.RuntimeEffect.Make=function(l,e){return a.RuntimeEffect._Make(l,{onError:e||function(g){console.log("RuntimeEffect error",g)}})};a.RuntimeEffect.MakeForBlender=function(l,e){return a.RuntimeEffect._MakeForBlender(l,{onError:e||function(g){console.log("RuntimeEffect error",g)}})};a.RuntimeEffect.prototype.makeShader=
function(l,e){var g=!l._ck,m=n(l,"HEAPF32");e=p(e);return this._makeShader(m,4*l.length,g,e)};a.RuntimeEffect.prototype.makeShaderWithChildren=function(l,e,g){var m=!l._ck,r=n(l,"HEAPF32");g=p(g);for(var u=[],w=0;w<e.length;w++)u.push(e[w].Ed.Hd);e=n(u,"HEAPU32");return this._makeShaderWithChildren(r,4*l.length,m,e,u.length,g)};a.RuntimeEffect.prototype.makeBlender=function(l){var e=!l._ck,g=n(l,"HEAPF32");return this._makeBlender(g,4*l.length,e)}})})(q);var ma=Object.assign({},q),na="",oa,pa;
if(da||ea)ea?na=self.location.href:"undefined"!=typeof document&&document.currentScript&&(na=document.currentScript.src),_scriptName&&(na=_scriptName),na.startsWith("blob:")?na="":na=na.substr(0,na.replace(/[?#].*/,"").lastIndexOf("/")+1),ea&&(pa=a=>{var b=new XMLHttpRequest;b.open("GET",a,!1);b.responseType="arraybuffer";b.send(null);return new Uint8Array(b.response)}),oa=a=>fetch(a,{credentials:"same-origin"}).then(b=>b.ok?b.arrayBuffer():Promise.reject(Error(b.status+" : "+b.url)));
var qa=console.log.bind(console),ta=console.error.bind(console);Object.assign(q,ma);ma=null;var ua,va=!1,wa,y,xa,za,C,D,G,Aa;function Ba(){var a=ua.buffer;q.HEAP8=wa=new Int8Array(a);q.HEAP16=xa=new Int16Array(a);q.HEAPU8=y=new Uint8Array(a);q.HEAPU16=za=new Uint16Array(a);q.HEAP32=C=new Int32Array(a);q.HEAPU32=D=new Uint32Array(a);q.HEAPF32=G=new Float32Array(a);q.HEAPF64=Aa=new Float64Array(a)}var Ca=[],Da=[],Ea=[],Fa=0,Ia=null,Ja=null;
function Ka(a){a="Aborted("+a+")";ta(a);va=!0;a=new WebAssembly.RuntimeError(a+". Build with -sASSERTIONS for more info.");ba(a);throw a;}var La=a=>a.startsWith("data:application/octet-stream;base64,"),Ma;function Na(a){return oa(a).then(b=>new Uint8Array(b),()=>{if(pa)var b=pa(a);else throw"both async and sync fetching of the wasm failed";return b})}function Oa(a,b,c){return Na(a).then(d=>WebAssembly.instantiate(d,b)).then(c,d=>{ta(`failed to asynchronously prepare wasm: ${d}`);Ka(d)})}
function Pa(a,b){var c=Ma;return"function"!=typeof WebAssembly.instantiateStreaming||La(c)||"function"!=typeof fetch?Oa(c,a,b):fetch(c,{credentials:"same-origin"}).then(d=>WebAssembly.instantiateStreaming(d,a).then(b,function(f){ta(`wasm streaming compile failed: ${f}`);ta("falling back to ArrayBuffer instantiation");return Oa(c,a,b)}))}function Qa(a){this.name="ExitStatus";this.message=`Program terminated with exit(${a})`;this.status=a}var Ra=a=>{a.forEach(b=>b(q))},Sa=q.noExitRuntime||!0;
class Ta{constructor(a){this.Hd=a-24}}var Ua=0,Xa=0,Ya={},Za=a=>{for(;a.length;){var b=a.pop();a.pop()(b)}};function $a(a){return this.fromWireType(D[a>>2])}
var ab={},bb={},cb={},db,fb=(a,b,c)=>{function d(k){k=c(k);if(k.length!==a.length)throw new db("Mismatched type converter count");for(var p=0;p<a.length;++p)eb(a[p],k[p])}a.forEach(k=>cb[k]=b);var f=Array(b.length),h=[],n=0;b.forEach((k,p)=>{bb.hasOwnProperty(k)?f[p]=bb[k]:(h.push(k),ab.hasOwnProperty(k)||(ab[k]=[]),ab[k].push(()=>{f[p]=bb[k];++n;n===h.length&&d(f)}))});0===h.length&&d(f)},gb,H=a=>{for(var b="";y[a];)b+=gb[y[a++]];return b},I;
function hb(a,b,c={}){var d=b.name;if(!a)throw new I(`type "${d}" must have a positive integer typeid pointer`);if(bb.hasOwnProperty(a)){if(c.Re)return;throw new I(`Cannot register type '${d}' twice`);}bb[a]=b;delete cb[a];ab.hasOwnProperty(a)&&(b=ab[a],delete ab[a],b.forEach(f=>f()))}function eb(a,b,c={}){return hb(a,b,c)}
var ib=a=>{throw new I(a.Ed.Kd.Id.name+" instance already deleted");},jb=!1,kb=()=>{},lb=(a,b,c)=>{if(b===c)return a;if(void 0===c.Nd)return null;a=lb(a,b,c.Nd);return null===a?null:c.Je(a)},mb={},nb={},rb=(a,b)=>{if(void 0===b)throw new I("ptr should not be undefined");for(;a.Nd;)b=a.ee(b),a=a.Nd;return nb[b]},tb=(a,b)=>{if(!b.Kd||!b.Hd)throw new db("makeClassHandle requires ptr and ptrType");if(!!b.Od!==!!b.Ld)throw new db("Both smartPtrType and smartPtr must be specified");b.count={value:1};return sb(Object.create(a,
{Ed:{value:b,writable:!0}}))},sb=a=>{if("undefined"===typeof FinalizationRegistry)return sb=b=>b,a;jb=new FinalizationRegistry(b=>{b=b.Ed;--b.count.value;0===b.count.value&&(b.Ld?b.Od.Ud(b.Ld):b.Kd.Id.Ud(b.Hd))});sb=b=>{var c=b.Ed;c.Ld&&jb.register(b,{Ed:c},b);return b};kb=b=>{jb.unregister(b)};return sb(a)},ub=[];function vb(){}
var wb=(a,b)=>Object.defineProperty(b,"name",{value:a}),xb=(a,b,c)=>{if(void 0===a[b].Md){var d=a[b];a[b]=function(...f){if(!a[b].Md.hasOwnProperty(f.length))throw new I(`Function '${c}' called with an invalid number of arguments (${f.length}) - expects one of (${a[b].Md})!`);return a[b].Md[f.length].apply(this,f)};a[b].Md=[];a[b].Md[d.Vd]=d}},yb=(a,b,c)=>{if(q.hasOwnProperty(a)){if(void 0===c||void 0!==q[a].Md&&void 0!==q[a].Md[c])throw new I(`Cannot register public name '${a}' twice`);xb(q,a,a);
if(q[a].Md.hasOwnProperty(c))throw new I(`Cannot register multiple overloads of a function with the same number of arguments (${c})!`);q[a].Md[c]=b}else q[a]=b,q[a].Vd=c},zb=a=>{a=a.replace(/[^a-zA-Z0-9_]/g,"$");var b=a.charCodeAt(0);return 48<=b&&57>=b?`_${a}`:a};function Ab(a,b,c,d,f,h,n,k){this.name=a;this.constructor=b;this.Zd=c;this.Ud=d;this.Nd=f;this.Me=h;this.ee=n;this.Je=k;this.Ue=[]}
var Bb=(a,b,c)=>{for(;b!==c;){if(!b.ee)throw new I(`Expected null or instance of ${c.name}, got an instance of ${b.name}`);a=b.ee(a);b=b.Nd}return a};function Cb(a,b){if(null===b){if(this.qe)throw new I(`null is not a valid ${this.name}`);return 0}if(!b.Ed)throw new I(`Cannot pass "${Db(b)}" as a ${this.name}`);if(!b.Ed.Hd)throw new I(`Cannot pass deleted object as a pointer of type ${this.name}`);return Bb(b.Ed.Hd,b.Ed.Kd.Id,this.Id)}
function Eb(a,b){if(null===b){if(this.qe)throw new I(`null is not a valid ${this.name}`);if(this.je){var c=this.re();null!==a&&a.push(this.Ud,c);return c}return 0}if(!b||!b.Ed)throw new I(`Cannot pass "${Db(b)}" as a ${this.name}`);if(!b.Ed.Hd)throw new I(`Cannot pass deleted object as a pointer of type ${this.name}`);if(!this.ie&&b.Ed.Kd.ie)throw new I(`Cannot convert argument of type ${b.Ed.Od?b.Ed.Od.name:b.Ed.Kd.name} to parameter type ${this.name}`);c=Bb(b.Ed.Hd,b.Ed.Kd.Id,this.Id);if(this.je){if(void 0===
b.Ed.Ld)throw new I("Passing raw pointer to smart pointer is illegal");switch(this.Ze){case 0:if(b.Ed.Od===this)c=b.Ed.Ld;else throw new I(`Cannot convert argument of type ${b.Ed.Od?b.Ed.Od.name:b.Ed.Kd.name} to parameter type ${this.name}`);break;case 1:c=b.Ed.Ld;break;case 2:if(b.Ed.Od===this)c=b.Ed.Ld;else{var d=b.clone();c=this.Ve(c,Fb(()=>d["delete"]()));null!==a&&a.push(this.Ud,c)}break;default:throw new I("Unsupporting sharing policy");}}return c}
function Gb(a,b){if(null===b){if(this.qe)throw new I(`null is not a valid ${this.name}`);return 0}if(!b.Ed)throw new I(`Cannot pass "${Db(b)}" as a ${this.name}`);if(!b.Ed.Hd)throw new I(`Cannot pass deleted object as a pointer of type ${this.name}`);if(b.Ed.Kd.ie)throw new I(`Cannot convert argument of type ${b.Ed.Kd.name} to parameter type ${this.name}`);return Bb(b.Ed.Hd,b.Ed.Kd.Id,this.Id)}
function Hb(a,b,c,d,f,h,n,k,p,t,v){this.name=a;this.Id=b;this.qe=c;this.ie=d;this.je=f;this.Te=h;this.Ze=n;this.ye=k;this.re=p;this.Ve=t;this.Ud=v;f||void 0!==b.Nd?this.toWireType=Eb:(this.toWireType=d?Cb:Gb,this.Rd=null)}
var Ib=(a,b,c)=>{if(!q.hasOwnProperty(a))throw new db("Replacing nonexistent public symbol");void 0!==q[a].Md&&void 0!==c?q[a].Md[c]=b:(q[a]=b,q[a].Vd=c)},K,Jb=(a,b,c=[])=>{a.includes("j")?(a=a.replace(/p/g,"i"),b=(0,q["dynCall_"+a])(b,...c)):b=K.get(b)(...c);return b},Kb=(a,b)=>(...c)=>Jb(a,b,c),N=(a,b)=>{a=H(a);var c=a.includes("j")?Kb(a,b):K.get(b);if("function"!=typeof c)throw new I(`unknown function pointer with signature ${a}: ${b}`);return c},Lb,Ub=a=>{a=Mb(a);var b=H(a);Tb(a);return b},Vb=
(a,b)=>{function c(h){f[h]||bb[h]||(cb[h]?cb[h].forEach(c):(d.push(h),f[h]=!0))}var d=[],f={};b.forEach(c);throw new Lb(`${a}: `+d.map(Ub).join([", "]));};function Wb(a){for(var b=1;b<a.length;++b)if(null!==a[b]&&void 0===a[b].Rd)return!0;return!1}
function Xb(a,b,c,d,f){var h=b.length;if(2>h)throw new I("argTypes array size mismatch! Must at least get return value and 'this' types!");var n=null!==b[1]&&null!==c,k=Wb(b),p="void"!==b[0].name,t=h-2,v=Array(t),z=[],A=[];return wb(a,function(...E){A.length=0;z.length=n?2:1;z[0]=f;if(n){var M=b[1].toWireType(A,this);z[1]=M}for(var L=0;L<t;++L)v[L]=b[L+2].toWireType(A,E[L]),z.push(v[L]);E=d(...z);if(k)Za(A);else for(L=n?1:2;L<b.length;L++){var V=1===L?M:v[L-2];null!==b[L].Rd&&b[L].Rd(V)}M=p?b[0].fromWireType(E):
void 0;return M})}
var Yb=(a,b)=>{for(var c=[],d=0;d<a;d++)c.push(D[b+4*d>>2]);return c},Zb=a=>{a=a.trim();const b=a.indexOf("(");return-1!==b?a.substr(0,b):a},$b=[],ac=[],bc=a=>{9<a&&0===--ac[a+1]&&(ac[a]=void 0,$b.push(a))},cc=a=>{if(!a)throw new I("Cannot use deleted val. handle = "+a);return ac[a]},Fb=a=>{switch(a){case void 0:return 2;case null:return 4;case !0:return 6;case !1:return 8;default:const b=$b.pop()||ac.length;ac[b]=a;ac[b+1]=1;return b}},dc={name:"emscripten::val",fromWireType:a=>{var b=cc(a);bc(a);
return b},toWireType:(a,b)=>Fb(b),Pd:8,readValueFromPointer:$a,Rd:null},ec=(a,b,c)=>{switch(b){case 1:return c?function(d){return this.fromWireType(wa[d])}:function(d){return this.fromWireType(y[d])};case 2:return c?function(d){return this.fromWireType(xa[d>>1])}:function(d){return this.fromWireType(za[d>>1])};case 4:return c?function(d){return this.fromWireType(C[d>>2])}:function(d){return this.fromWireType(D[d>>2])};default:throw new TypeError(`invalid integer width (${b}): ${a}`);}},fc=(a,b)=>
{var c=bb[a];if(void 0===c)throw a=`${b} has unknown type ${Ub(a)}`,new I(a);return c},Db=a=>{if(null===a)return"null";var b=typeof a;return"object"===b||"array"===b||"function"===b?a.toString():""+a},gc=(a,b)=>{switch(b){case 4:return function(c){return this.fromWireType(G[c>>2])};case 8:return function(c){return this.fromWireType(Aa[c>>3])};default:throw new TypeError(`invalid float width (${b}): ${a}`);}},hc=(a,b,c)=>{switch(b){case 1:return c?d=>wa[d]:d=>y[d];case 2:return c?d=>xa[d>>1]:d=>za[d>>
1];case 4:return c?d=>C[d>>2]:d=>D[d>>2];default:throw new TypeError(`invalid integer width (${b}): ${a}`);}},ic=(a,b,c)=>{var d=y;if(!(0<c))return 0;var f=b;c=b+c-1;for(var h=0;h<a.length;++h){var n=a.charCodeAt(h);if(55296<=n&&57343>=n){var k=a.charCodeAt(++h);n=65536+((n&1023)<<10)|k&1023}if(127>=n){if(b>=c)break;d[b++]=n}else{if(2047>=n){if(b+1>=c)break;d[b++]=192|n>>6}else{if(65535>=n){if(b+2>=c)break;d[b++]=224|n>>12}else{if(b+3>=c)break;d[b++]=240|n>>18;d[b++]=128|n>>12&63}d[b++]=128|n>>6&
63}d[b++]=128|n&63}}d[b]=0;return b-f},jc=a=>{for(var b=0,c=0;c<a.length;++c){var d=a.charCodeAt(c);127>=d?b++:2047>=d?b+=2:55296<=d&&57343>=d?(b+=4,++c):b+=3}return b},kc="undefined"!=typeof TextDecoder?new TextDecoder:void 0,lc=(a,b=0,c=NaN)=>{var d=b+c;for(c=b;a[c]&&!(c>=d);)++c;if(16<c-b&&a.buffer&&kc)return kc.decode(a.subarray(b,c));for(d="";b<c;){var f=a[b++];if(f&128){var h=a[b++]&63;if(192==(f&224))d+=String.fromCharCode((f&31)<<6|h);else{var n=a[b++]&63;f=224==(f&240)?(f&15)<<12|h<<6|n:
(f&7)<<18|h<<12|n<<6|a[b++]&63;65536>f?d+=String.fromCharCode(f):(f-=65536,d+=String.fromCharCode(55296|f>>10,56320|f&1023))}}else d+=String.fromCharCode(f)}return d},mc="undefined"!=typeof TextDecoder?new TextDecoder("utf-16le"):void 0,nc=(a,b)=>{var c=a>>1;for(var d=c+b/2;!(c>=d)&&za[c];)++c;c<<=1;if(32<c-a&&mc)return mc.decode(y.subarray(a,c));c="";for(d=0;!(d>=b/2);++d){var f=xa[a+2*d>>1];if(0==f)break;c+=String.fromCharCode(f)}return c},oc=(a,b,c)=>{c??=2147483647;if(2>c)return 0;c-=2;var d=
b;c=c<2*a.length?c/2:a.length;for(var f=0;f<c;++f)xa[b>>1]=a.charCodeAt(f),b+=2;xa[b>>1]=0;return b-d},pc=a=>2*a.length,qc=(a,b)=>{for(var c=0,d="";!(c>=b/4);){var f=C[a+4*c>>2];if(0==f)break;++c;65536<=f?(f-=65536,d+=String.fromCharCode(55296|f>>10,56320|f&1023)):d+=String.fromCharCode(f)}return d},rc=(a,b,c)=>{c??=2147483647;if(4>c)return 0;var d=b;c=d+c-4;for(var f=0;f<a.length;++f){var h=a.charCodeAt(f);if(55296<=h&&57343>=h){var n=a.charCodeAt(++f);h=65536+((h&1023)<<10)|n&1023}C[b>>2]=h;b+=
4;if(b+4>c)break}C[b>>2]=0;return b-d},sc=a=>{for(var b=0,c=0;c<a.length;++c){var d=a.charCodeAt(c);55296<=d&&57343>=d&&++c;b+=4}return b},tc=(a,b,c)=>{var d=[];a=a.toWireType(d,c);d.length&&(D[b>>2]=Fb(d));return a},uc=[],vc={},wc=a=>{var b=vc[a];return void 0===b?H(a):b},xc=()=>{function a(b){b.$$$embind_global$$$=b;var c="object"==typeof $$$embind_global$$$&&b.$$$embind_global$$$==b;c||delete b.$$$embind_global$$$;return c}if("object"==typeof globalThis)return globalThis;if("object"==typeof $$$embind_global$$$)return $$$embind_global$$$;
"object"==typeof global&&a(global)?$$$embind_global$$$=global:"object"==typeof self&&a(self)&&($$$embind_global$$$=self);if("object"==typeof $$$embind_global$$$)return $$$embind_global$$$;throw Error("unable to get global object.");},yc=a=>{var b=uc.length;uc.push(a);return b},zc=(a,b)=>{for(var c=Array(a),d=0;d<a;++d)c[d]=fc(D[b+4*d>>2],"parameter "+d);return c},Ac=Reflect.construct,O,Bc=a=>{var b=a.getExtension("ANGLE_instanced_arrays");b&&(a.vertexAttribDivisor=(c,d)=>b.vertexAttribDivisorANGLE(c,
d),a.drawArraysInstanced=(c,d,f,h)=>b.drawArraysInstancedANGLE(c,d,f,h),a.drawElementsInstanced=(c,d,f,h,n)=>b.drawElementsInstancedANGLE(c,d,f,h,n))},Cc=a=>{var b=a.getExtension("OES_vertex_array_object");b&&(a.createVertexArray=()=>b.createVertexArrayOES(),a.deleteVertexArray=c=>b.deleteVertexArrayOES(c),a.bindVertexArray=c=>b.bindVertexArrayOES(c),a.isVertexArray=c=>b.isVertexArrayOES(c))},Dc=a=>{var b=a.getExtension("WEBGL_draw_buffers");b&&(a.drawBuffers=(c,d)=>b.drawBuffersWEBGL(c,d))},Ec=a=>
{var b="ANGLE_instanced_arrays EXT_blend_minmax EXT_disjoint_timer_query EXT_frag_depth EXT_shader_texture_lod EXT_sRGB OES_element_index_uint OES_fbo_render_mipmap OES_standard_derivatives OES_texture_float OES_texture_half_float OES_texture_half_float_linear OES_vertex_array_object WEBGL_color_buffer_float WEBGL_depth_texture WEBGL_draw_buffers EXT_color_buffer_float EXT_conservative_depth EXT_disjoint_timer_query_webgl2 EXT_texture_norm16 NV_shader_noperspective_interpolation WEBGL_clip_cull_distance EXT_clip_control EXT_color_buffer_half_float EXT_depth_clamp EXT_float_blend EXT_polygon_offset_clamp EXT_texture_compression_bptc EXT_texture_compression_rgtc EXT_texture_filter_anisotropic KHR_parallel_shader_compile OES_texture_float_linear WEBGL_blend_func_extended WEBGL_compressed_texture_astc WEBGL_compressed_texture_etc WEBGL_compressed_texture_etc1 WEBGL_compressed_texture_s3tc WEBGL_compressed_texture_s3tc_srgb WEBGL_debug_renderer_info WEBGL_debug_shaders WEBGL_lose_context WEBGL_multi_draw WEBGL_polygon_mode".split(" ");
return(a.getSupportedExtensions()||[]).filter(c=>b.includes(c))},Fc=1,Gc=[],Hc=[],Ic=[],Jc=[],ia=[],Kc=[],Lc=[],la=[],Q=[],Mc=[],Nc=[],Pc={},Qc={},Rc=4,Sc=0,ha=a=>{for(var b=Fc++,c=a.length;c<b;c++)a[c]=null;return b},Tc=(a,b,c,d)=>{for(var f=0;f<a;f++){var h=O[c](),n=h&&ha(d);h?(h.name=n,d[n]=h):U||=1282;C[b+4*f>>2]=n}},ja=(a,b)=>{a.te||(a.te=a.getContext,a.getContext=function(d,f){f=a.te(d,f);return"webgl"==d==f instanceof WebGLRenderingContext?f:null});var c=1<b.majorVersion?a.getContext("webgl2",
b):a.getContext("webgl",b);return c?Uc(c,b):0},Uc=(a,b)=>{var c=ha(la),d={handle:c,attributes:b,version:b.majorVersion,Sd:a};a.canvas&&(a.canvas.Be=d);la[c]=d;("undefined"==typeof b.Ke||b.Ke)&&Vc(d);return c},ka=a=>{x=la[a];q.$e=O=x?.Sd;return!(a&&!O)},Vc=a=>{a||=x;if(!a.Se){a.Se=!0;var b=a.Sd;b.df=b.getExtension("WEBGL_multi_draw");b.bf=b.getExtension("EXT_polygon_offset_clamp");b.af=b.getExtension("EXT_clip_control");b.ff=b.getExtension("WEBGL_polygon_mode");Bc(b);Cc(b);Dc(b);b.ve=b.getExtension("WEBGL_draw_instanced_base_vertex_base_instance");
b.xe=b.getExtension("WEBGL_multi_draw_instanced_base_vertex_base_instance");2<=a.version&&(b.Td=b.getExtension("EXT_disjoint_timer_query_webgl2"));if(2>a.version||!b.Td)b.Td=b.getExtension("EXT_disjoint_timer_query");Ec(b).forEach(c=>{c.includes("lose_context")||c.includes("debug")||b.getExtension(c)})}},x,U,Wc=(a,b)=>{O.bindFramebuffer(a,Ic[b])},Xc=a=>{O.bindVertexArray(Lc[a])},Yc=a=>O.clear(a),Zc=(a,b,c,d)=>O.clearColor(a,b,c,d),$c=a=>O.clearStencil(a),ad=(a,b)=>{for(var c=0;c<a;c++){var d=C[b+
4*c>>2];O.deleteVertexArray(Lc[d]);Lc[d]=null}},bd=[],cd=(a,b)=>{Tc(a,b,"createVertexArray",Lc)};function dd(){var a=Ec(O);return a=a.concat(a.map(b=>"GL_"+b))}
var ed=(a,b,c)=>{if(b){var d=void 0;switch(a){case 36346:d=1;break;case 36344:0!=c&&1!=c&&(U||=1280);return;case 34814:case 36345:d=0;break;case 34466:var f=O.getParameter(34467);d=f?f.length:0;break;case 33309:if(2>x.version){U||=1282;return}d=dd().length;break;case 33307:case 33308:if(2>x.version){U||=1280;return}d=33307==a?3:0}if(void 0===d)switch(f=O.getParameter(a),typeof f){case "number":d=f;break;case "boolean":d=f?1:0;break;case "string":U||=1280;return;case "object":if(null===f)switch(a){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:d=
0;break;default:U||=1280;return}else{if(f instanceof Float32Array||f instanceof Uint32Array||f instanceof Int32Array||f instanceof Array){for(a=0;a<f.length;++a)switch(c){case 0:C[b+4*a>>2]=f[a];break;case 2:G[b+4*a>>2]=f[a];break;case 4:wa[b+a]=f[a]?1:0}return}try{d=f.name|0}catch(h){U||=1280;ta(`GL_INVALID_ENUM in glGet${c}v: Unknown object returned from WebGL getParameter(${a})! (error: ${h})`);return}}break;default:U||=1280;ta(`GL_INVALID_ENUM in glGet${c}v: Native code calling glGet${c}v(${a}) and it returns ${f} of type ${typeof f}!`);
return}switch(c){case 1:c=d;D[b>>2]=c;D[b+4>>2]=(c-D[b>>2])/4294967296;break;case 0:C[b>>2]=d;break;case 2:G[b>>2]=d;break;case 4:wa[b]=d?1:0}}else U||=1281},fd=(a,b)=>ed(a,b,0),gd=(a,b,c)=>{if(c){a=Q[a];b=2>x.version?O.Td.getQueryObjectEXT(a,b):O.getQueryParameter(a,b);var d;"boolean"==typeof b?d=b?1:0:d=b;D[c>>2]=d;D[c+4>>2]=(d-D[c>>2])/4294967296}else U||=1281},jd=a=>{var b=jc(a)+1,c=hd(b);c&&ic(a,c,b);return c},kd=a=>{var b=Pc[a];if(!b){switch(a){case 7939:b=jd(dd().join(" "));break;case 7936:case 7937:case 37445:case 37446:(b=
O.getParameter(a))||(U||=1280);b=b?jd(b):0;break;case 7938:b=O.getParameter(7938);var c=`OpenGL ES 2.0 (${b})`;2<=x.version&&(c=`OpenGL ES 3.0 (${b})`);b=jd(c);break;case 35724:b=O.getParameter(35724);c=b.match(/^WebGL GLSL ES ([0-9]\.[0-9][0-9]?)(?:$| .*)/);null!==c&&(3==c[1].length&&(c[1]+="0"),b=`OpenGL ES GLSL ES ${c[1]} (${b})`);b=jd(b);break;default:U||=1280}Pc[a]=b}return b},ld=(a,b)=>{if(2>x.version)return U||=1282,0;var c=Qc[a];if(c)return 0>b||b>=c.length?(U||=1281,0):c[b];switch(a){case 7939:return c=
dd().map(jd),c=Qc[a]=c,0>b||b>=c.length?(U||=1281,0):c[b];default:return U||=1280,0}},md=a=>"]"==a.slice(-1)&&a.lastIndexOf("["),nd=a=>{a-=5120;return 0==a?wa:1==a?y:2==a?xa:4==a?C:6==a?G:5==a||28922==a||28520==a||30779==a||30782==a?D:za},od=(a,b,c,d,f)=>{a=nd(a);b=d*((Sc||c)*({5:3,6:4,8:2,29502:3,29504:4,26917:2,26918:2,29846:3,29847:4}[b-6402]||1)*a.BYTES_PER_ELEMENT+Rc-1&-Rc);return a.subarray(f>>>31-Math.clz32(a.BYTES_PER_ELEMENT),f+b>>>31-Math.clz32(a.BYTES_PER_ELEMENT))},X=a=>{var b=O.Ie;if(b){var c=
b.de[a];"number"==typeof c&&(b.de[a]=c=O.getUniformLocation(b,b.ze[a]+(0<c?`[${c}]`:"")));return c}U||=1282},pd=[],qd=[],rd={},td=()=>{if(!sd){var a={USER:"web_user",LOGNAME:"web_user",PATH:"/",PWD:"/",HOME:"/home/web_user",LANG:("object"==typeof navigator&&navigator.languages&&navigator.languages[0]||"C").replace("-","_")+".UTF-8",_:"./this.program"},b;for(b in rd)void 0===rd[b]?delete a[b]:a[b]=rd[b];var c=[];for(b in a)c.push(`${b}=${a[b]}`);sd=c}return sd},sd,ud=[null,[],[]];
db=q.InternalError=class extends Error{constructor(a){super(a);this.name="InternalError"}};for(var vd=Array(256),wd=0;256>wd;++wd)vd[wd]=String.fromCharCode(wd);gb=vd;I=q.BindingError=class extends Error{constructor(a){super(a);this.name="BindingError"}};
Object.assign(vb.prototype,{isAliasOf:function(a){if(!(this instanceof vb&&a instanceof vb))return!1;var b=this.Ed.Kd.Id,c=this.Ed.Hd;a.Ed=a.Ed;var d=a.Ed.Kd.Id;for(a=a.Ed.Hd;b.Nd;)c=b.ee(c),b=b.Nd;for(;d.Nd;)a=d.ee(a),d=d.Nd;return b===d&&c===a},clone:function(){this.Ed.Hd||ib(this);if(this.Ed.ce)return this.Ed.count.value+=1,this;var a=sb,b=Object,c=b.create,d=Object.getPrototypeOf(this),f=this.Ed;a=a(c.call(b,d,{Ed:{value:{count:f.count,be:f.be,ce:f.ce,Hd:f.Hd,Kd:f.Kd,Ld:f.Ld,Od:f.Od}}}));a.Ed.count.value+=
1;a.Ed.be=!1;return a},["delete"](){this.Ed.Hd||ib(this);if(this.Ed.be&&!this.Ed.ce)throw new I("Object already scheduled for deletion");kb(this);var a=this.Ed;--a.count.value;0===a.count.value&&(a.Ld?a.Od.Ud(a.Ld):a.Kd.Id.Ud(a.Hd));this.Ed.ce||(this.Ed.Ld=void 0,this.Ed.Hd=void 0)},isDeleted:function(){return!this.Ed.Hd},deleteLater:function(){this.Ed.Hd||ib(this);if(this.Ed.be&&!this.Ed.ce)throw new I("Object already scheduled for deletion");ub.push(this);this.Ed.be=!0;return this}});
Object.assign(Hb.prototype,{Ne(a){this.ye&&(a=this.ye(a));return a},ue(a){this.Ud?.(a)},Pd:8,readValueFromPointer:$a,fromWireType:function(a){function b(){return this.je?tb(this.Id.Zd,{Kd:this.Te,Hd:c,Od:this,Ld:a}):tb(this.Id.Zd,{Kd:this,Hd:a})}var c=this.Ne(a);if(!c)return this.ue(a),null;var d=rb(this.Id,c);if(void 0!==d){if(0===d.Ed.count.value)return d.Ed.Hd=c,d.Ed.Ld=a,d.clone();d=d.clone();this.ue(a);return d}d=this.Id.Me(c);d=mb[d];if(!d)return b.call(this);d=this.ie?d.He:d.pointerType;var f=
lb(c,this.Id,d.Id);return null===f?b.call(this):this.je?tb(d.Id.Zd,{Kd:d,Hd:f,Od:this,Ld:a}):tb(d.Id.Zd,{Kd:d,Hd:f})}});Lb=q.UnboundTypeError=((a,b)=>{var c=wb(b,function(d){this.name=b;this.message=d;d=Error(d).stack;void 0!==d&&(this.stack=this.toString()+"\n"+d.replace(/^Error(:[^\n]*)?\n/,""))});c.prototype=Object.create(a.prototype);c.prototype.constructor=c;c.prototype.toString=function(){return void 0===this.message?this.name:`${this.name}: ${this.message}`};return c})(Error,"UnboundTypeError");
ac.push(0,1,void 0,1,null,1,!0,1,!1,1);q.count_emval_handles=()=>ac.length/2-5-$b.length;for(var xd=0;32>xd;++xd)bd.push(Array(xd));var yd=new Float32Array(288);for(xd=0;288>=xd;++xd)pd[xd]=yd.subarray(0,xd);var zd=new Int32Array(288);for(xd=0;288>=xd;++xd)qd[xd]=zd.subarray(0,xd);
var Md={z:(a,b,c)=>{var d=new Ta(a);D[d.Hd+16>>2]=0;D[d.Hd+4>>2]=b;D[d.Hd+8>>2]=c;Ua=a;Xa++;throw Ua;},dd:()=>{Ka("")},C:a=>{var b=Ya[a];delete Ya[a];var c=b.re,d=b.Ud,f=b.we,h=f.map(n=>n.Qe).concat(f.map(n=>n.Xe));fb([a],h,n=>{var k={};f.forEach((p,t)=>{var v=n[t],z=p.Oe,A=p.Pe,E=n[t+f.length],M=p.We,L=p.Ye;k[p.Le]={read:V=>v.fromWireType(z(A,V)),write:(V,fa)=>{var S=[];M(L,V,E.toWireType(S,fa));Za(S)}}});return[{name:b.name,fromWireType:p=>{var t={},v;for(v in k)t[v]=k[v].read(p);d(p);return t},
toWireType:(p,t)=>{for(var v in k)if(!(v in t))throw new TypeError(`Missing field: "${v}"`);var z=c();for(v in k)k[v].write(z,t[v]);null!==p&&p.push(d,z);return z},Pd:8,readValueFromPointer:$a,Rd:d}]})},N:()=>{},cd:(a,b,c,d)=>{b=H(b);eb(a,{name:b,fromWireType:function(f){return!!f},toWireType:function(f,h){return h?c:d},Pd:8,readValueFromPointer:function(f){return this.fromWireType(y[f])},Rd:null})},d:(a,b,c,d,f,h,n,k,p,t,v,z,A)=>{v=H(v);h=N(f,h);k&&=N(n,k);t&&=N(p,t);A=N(z,A);var E=zb(v);yb(E,function(){Vb(`Cannot construct ${v} due to unbound types`,
[d])});fb([a,b,c],d?[d]:[],M=>{M=M[0];if(d){var L=M.Id;var V=L.Zd}else V=vb.prototype;M=wb(v,function(...ya){if(Object.getPrototypeOf(this)!==fa)throw new I("Use 'new' to construct "+v);if(void 0===S.Wd)throw new I(v+" has no accessible constructor");var W=S.Wd[ya.length];if(void 0===W)throw new I(`Tried to invoke ctor of ${v} with invalid number of parameters (${ya.length}) - expected (${Object.keys(S.Wd).toString()}) parameters instead!`);return W.apply(this,ya)});var fa=Object.create(V,{constructor:{value:M}});
M.prototype=fa;var S=new Ab(v,M,fa,A,L,h,k,t);if(S.Nd){var Y;(Y=S.Nd).fe??(Y.fe=[]);S.Nd.fe.push(S)}L=new Hb(v,S,!0,!1,!1);Y=new Hb(v+"*",S,!1,!1,!1);V=new Hb(v+" const*",S,!1,!0,!1);mb[a]={pointerType:Y,He:V};Ib(E,M);return[L,Y,V]})},c:(a,b,c,d,f,h,n)=>{var k=Yb(c,d);b=H(b);b=Zb(b);h=N(f,h);fb([],[a],p=>{function t(){Vb(`Cannot call ${v} due to unbound types`,k)}p=p[0];var v=`${p.name}.${b}`;b.startsWith("@@")&&(b=Symbol[b.substring(2)]);var z=p.Id.constructor;void 0===z[b]?(t.Vd=c-1,z[b]=t):(xb(z,
b,v),z[b].Md[c-1]=t);fb([],k,A=>{A=[A[0],null].concat(A.slice(1));A=Xb(v,A,null,h,n);void 0===z[b].Md?(A.Vd=c-1,z[b]=A):z[b].Md[c-1]=A;if(p.Id.fe)for(const E of p.Id.fe)E.constructor.hasOwnProperty(b)||(E.constructor[b]=A);return[]});return[]})},x:(a,b,c,d,f,h)=>{var n=Yb(b,c);f=N(d,f);fb([],[a],k=>{k=k[0];var p=`constructor ${k.name}`;void 0===k.Id.Wd&&(k.Id.Wd=[]);if(void 0!==k.Id.Wd[b-1])throw new I(`Cannot register multiple constructors with identical number of parameters (${b-1}) for class '${k.name}'! Overload resolution is currently only performed using the parameter count, not actual type info!`);
k.Id.Wd[b-1]=()=>{Vb(`Cannot construct ${k.name} due to unbound types`,n)};fb([],n,t=>{t.splice(1,0,null);k.Id.Wd[b-1]=Xb(p,t,null,f,h);return[]});return[]})},a:(a,b,c,d,f,h,n,k)=>{var p=Yb(c,d);b=H(b);b=Zb(b);h=N(f,h);fb([],[a],t=>{function v(){Vb(`Cannot call ${z} due to unbound types`,p)}t=t[0];var z=`${t.name}.${b}`;b.startsWith("@@")&&(b=Symbol[b.substring(2)]);k&&t.Id.Ue.push(b);var A=t.Id.Zd,E=A[b];void 0===E||void 0===E.Md&&E.className!==t.name&&E.Vd===c-2?(v.Vd=c-2,v.className=t.name,A[b]=
v):(xb(A,b,z),A[b].Md[c-2]=v);fb([],p,M=>{M=Xb(z,M,t,h,n);void 0===A[b].Md?(M.Vd=c-2,A[b]=M):A[b].Md[c-2]=M;return[]});return[]})},q:(a,b,c)=>{a=H(a);fb([],[b],d=>{d=d[0];q[a]=d.fromWireType(c);return[]})},bd:a=>eb(a,dc),h:(a,b,c,d)=>{function f(){}b=H(b);f.values={};eb(a,{name:b,constructor:f,fromWireType:function(h){return this.constructor.values[h]},toWireType:(h,n)=>n.value,Pd:8,readValueFromPointer:ec(b,c,d),Rd:null});yb(b,f)},b:(a,b,c)=>{var d=fc(a,"enum");b=H(b);a=d.constructor;d=Object.create(d.constructor.prototype,
{value:{value:c},constructor:{value:wb(`${d.name}_${b}`,function(){})}});a.values[c]=d;a[b]=d},L:(a,b,c)=>{b=H(b);eb(a,{name:b,fromWireType:d=>d,toWireType:(d,f)=>f,Pd:8,readValueFromPointer:gc(b,c),Rd:null})},o:(a,b,c,d,f,h)=>{var n=Yb(b,c);a=H(a);a=Zb(a);f=N(d,f);yb(a,function(){Vb(`Cannot call ${a} due to unbound types`,n)},b-1);fb([],n,k=>{k=[k[0],null].concat(k.slice(1));Ib(a,Xb(a,k,null,f,h),b-1);return[]})},w:(a,b,c,d,f)=>{b=H(b);-1===f&&(f=4294967295);f=k=>k;if(0===d){var h=32-8*c;f=k=>k<<
h>>>h}var n=b.includes("unsigned")?function(k,p){return p>>>0}:function(k,p){return p};eb(a,{name:b,fromWireType:f,toWireType:n,Pd:8,readValueFromPointer:hc(b,c,0!==d),Rd:null})},i:(a,b,c)=>{function d(h){return new f(wa.buffer,D[h+4>>2],D[h>>2])}var f=[Int8Array,Uint8Array,Int16Array,Uint16Array,Int32Array,Uint32Array,Float32Array,Float64Array][b];c=H(c);eb(a,{name:c,fromWireType:d,Pd:8,readValueFromPointer:d},{Re:!0})},m:(a,b,c,d,f,h,n,k,p,t,v,z)=>{c=H(c);h=N(f,h);k=N(n,k);t=N(p,t);z=N(v,z);fb([a],
[b],A=>{A=A[0];return[new Hb(c,A.Id,!1,!1,!0,A,d,h,k,t,z)]})},K:(a,b)=>{b=H(b);var c="std::string"===b;eb(a,{name:b,fromWireType:function(d){var f=D[d>>2],h=d+4;if(c)for(var n=h,k=0;k<=f;++k){var p=h+k;if(k==f||0==y[p]){n=n?lc(y,n,p-n):"";if(void 0===t)var t=n;else t+=String.fromCharCode(0),t+=n;n=p+1}}else{t=Array(f);for(k=0;k<f;++k)t[k]=String.fromCharCode(y[h+k]);t=t.join("")}Tb(d);return t},toWireType:function(d,f){f instanceof ArrayBuffer&&(f=new Uint8Array(f));var h="string"==typeof f;if(!(h||
f instanceof Uint8Array||f instanceof Uint8ClampedArray||f instanceof Int8Array))throw new I("Cannot pass non-string to std::string");var n=c&&h?jc(f):f.length;var k=hd(4+n+1),p=k+4;D[k>>2]=n;if(c&&h)ic(f,p,n+1);else if(h)for(h=0;h<n;++h){var t=f.charCodeAt(h);if(255<t)throw Tb(p),new I("String has UTF-16 code units that do not fit in 8 bits");y[p+h]=t}else for(h=0;h<n;++h)y[p+h]=f[h];null!==d&&d.push(Tb,k);return k},Pd:8,readValueFromPointer:$a,Rd(d){Tb(d)}})},G:(a,b,c)=>{c=H(c);if(2===b){var d=
nc;var f=oc;var h=pc;var n=k=>za[k>>1]}else 4===b&&(d=qc,f=rc,h=sc,n=k=>D[k>>2]);eb(a,{name:c,fromWireType:k=>{for(var p=D[k>>2],t,v=k+4,z=0;z<=p;++z){var A=k+4+z*b;if(z==p||0==n(A))v=d(v,A-v),void 0===t?t=v:(t+=String.fromCharCode(0),t+=v),v=A+b}Tb(k);return t},toWireType:(k,p)=>{if("string"!=typeof p)throw new I(`Cannot pass non-string to C++ string type ${c}`);var t=h(p),v=hd(4+t+b);D[v>>2]=t/b;f(p,v+4,t+b);null!==k&&k.push(Tb,v);return v},Pd:8,readValueFromPointer:$a,Rd(k){Tb(k)}})},B:(a,b,c,
d,f,h)=>{Ya[a]={name:H(b),re:N(c,d),Ud:N(f,h),we:[]}},l:(a,b,c,d,f,h,n,k,p,t)=>{Ya[a].we.push({Le:H(b),Qe:c,Oe:N(d,f),Pe:h,Xe:n,We:N(k,p),Ye:t})},ad:(a,b)=>{b=H(b);eb(a,{cf:!0,name:b,Pd:0,fromWireType:()=>{},toWireType:()=>{}})},$c:()=>1,_c:()=>{throw Infinity;},Zc:(a,b,c)=>{a=cc(a);b=fc(b,"emval::as");return tc(b,c,a)},Yc:(a,b,c,d)=>{a=uc[a];b=cc(b);return a(null,b,c,d)},r:(a,b,c,d,f)=>{a=uc[a];b=cc(b);c=wc(c);return a(b,b[c],d,f)},g:bc,Xc:a=>{if(0===a)return Fb(xc());a=wc(a);return Fb(xc()[a])},
p:(a,b,c)=>{var d=zc(a,b),f=d.shift();a--;var h=Array(a);b=`methodCaller<(${d.map(n=>n.name).join(", ")}) => ${f.name}>`;return yc(wb(b,(n,k,p,t)=>{for(var v=0,z=0;z<a;++z)h[z]=d[z].readValueFromPointer(t+v),v+=d[z].Pd;n=1===c?Ac(k,h):k.apply(n,h);return tc(f,p,n)}))},F:a=>{9<a&&(ac[a+1]+=1)},E:()=>Fb([]),y:a=>Fb(wc(a)),Wc:()=>Fb({}),n:a=>{var b=cc(a);Za(b);bc(a)},A:(a,b,c)=>{a=cc(a);b=cc(b);c=cc(c);a[b]=c},k:(a,b)=>{a=fc(a,"_emval_take_value");a=a.readValueFromPointer(b);return Fb(a)},Vc:(a,b,c,
d)=>{var f=(new Date).getFullYear(),h=(new Date(f,0,1)).getTimezoneOffset();f=(new Date(f,6,1)).getTimezoneOffset();D[a>>2]=60*Math.max(h,f);C[b>>2]=Number(h!=f);b=n=>{var k=Math.abs(n);return`UTC${0<=n?"-":"+"}${String(Math.floor(k/60)).padStart(2,"0")}${String(k%60).padStart(2,"0")}`};a=b(h);b=b(f);f<h?(ic(a,c,17),ic(b,d,17)):(ic(a,d,17),ic(b,c,17))},Uc:()=>performance.now(),Tc:a=>O.activeTexture(a),Sc:(a,b)=>{O.attachShader(Hc[a],Kc[b])},Rc:(a,b)=>{O.beginQuery(a,Q[b])},Qc:(a,b)=>{O.Td.beginQueryEXT(a,
Q[b])},Pc:(a,b,c)=>{O.bindAttribLocation(Hc[a],b,c?lc(y,c):"")},Oc:(a,b)=>{35051==a?O.oe=b:35052==a&&(O.Yd=b);O.bindBuffer(a,Gc[b])},Nc:Wc,Mc:(a,b)=>{O.bindRenderbuffer(a,Jc[b])},Lc:(a,b)=>{O.bindSampler(a,Mc[b])},Kc:(a,b)=>{O.bindTexture(a,ia[b])},Jc:Xc,Ic:Xc,Hc:(a,b,c,d)=>O.blendColor(a,b,c,d),Gc:a=>O.blendEquation(a),Fc:(a,b)=>O.blendFunc(a,b),Ec:(a,b,c,d,f,h,n,k,p,t)=>O.blitFramebuffer(a,b,c,d,f,h,n,k,p,t),Dc:(a,b,c,d)=>{2<=x.version?c&&b?O.bufferData(a,y,d,c,b):O.bufferData(a,b,d):O.bufferData(a,
c?y.subarray(c,c+b):b,d)},Cc:(a,b,c,d)=>{2<=x.version?c&&O.bufferSubData(a,b,y,d,c):O.bufferSubData(a,b,y.subarray(d,d+c))},Bc:a=>O.checkFramebufferStatus(a),Ac:Yc,zc:Zc,yc:$c,xc:(a,b,c,d)=>O.clientWaitSync(Nc[a],b,(c>>>0)+4294967296*d),wc:(a,b,c,d)=>{O.colorMask(!!a,!!b,!!c,!!d)},vc:a=>{O.compileShader(Kc[a])},uc:(a,b,c,d,f,h,n,k)=>{2<=x.version?O.Yd||!n?O.compressedTexImage2D(a,b,c,d,f,h,n,k):O.compressedTexImage2D(a,b,c,d,f,h,y,k,n):O.compressedTexImage2D(a,b,c,d,f,h,y.subarray(k,k+n))},tc:(a,
b,c,d,f,h,n,k,p)=>{2<=x.version?O.Yd||!k?O.compressedTexSubImage2D(a,b,c,d,f,h,n,k,p):O.compressedTexSubImage2D(a,b,c,d,f,h,n,y,p,k):O.compressedTexSubImage2D(a,b,c,d,f,h,n,y.subarray(p,p+k))},sc:(a,b,c,d,f)=>O.copyBufferSubData(a,b,c,d,f),rc:(a,b,c,d,f,h,n,k)=>O.copyTexSubImage2D(a,b,c,d,f,h,n,k),qc:()=>{var a=ha(Hc),b=O.createProgram();b.name=a;b.me=b.ke=b.le=0;b.se=1;Hc[a]=b;return a},pc:a=>{var b=ha(Kc);Kc[b]=O.createShader(a);return b},oc:a=>O.cullFace(a),nc:(a,b)=>{for(var c=0;c<a;c++){var d=
C[b+4*c>>2],f=Gc[d];f&&(O.deleteBuffer(f),f.name=0,Gc[d]=null,d==O.oe&&(O.oe=0),d==O.Yd&&(O.Yd=0))}},mc:(a,b)=>{for(var c=0;c<a;++c){var d=C[b+4*c>>2],f=Ic[d];f&&(O.deleteFramebuffer(f),f.name=0,Ic[d]=null)}},lc:a=>{if(a){var b=Hc[a];b?(O.deleteProgram(b),b.name=0,Hc[a]=null):U||=1281}},kc:(a,b)=>{for(var c=0;c<a;c++){var d=C[b+4*c>>2],f=Q[d];f&&(O.deleteQuery(f),Q[d]=null)}},jc:(a,b)=>{for(var c=0;c<a;c++){var d=C[b+4*c>>2],f=Q[d];f&&(O.Td.deleteQueryEXT(f),Q[d]=null)}},ic:(a,b)=>{for(var c=0;c<
a;c++){var d=C[b+4*c>>2],f=Jc[d];f&&(O.deleteRenderbuffer(f),f.name=0,Jc[d]=null)}},hc:(a,b)=>{for(var c=0;c<a;c++){var d=C[b+4*c>>2],f=Mc[d];f&&(O.deleteSampler(f),f.name=0,Mc[d]=null)}},gc:a=>{if(a){var b=Kc[a];b?(O.deleteShader(b),Kc[a]=null):U||=1281}},fc:a=>{if(a){var b=Nc[a];b?(O.deleteSync(b),b.name=0,Nc[a]=null):U||=1281}},ec:(a,b)=>{for(var c=0;c<a;c++){var d=C[b+4*c>>2],f=ia[d];f&&(O.deleteTexture(f),f.name=0,ia[d]=null)}},dc:ad,cc:ad,bc:a=>{O.depthMask(!!a)},ac:a=>O.disable(a),$b:a=>{O.disableVertexAttribArray(a)},
_b:(a,b,c)=>{O.drawArrays(a,b,c)},Zb:(a,b,c,d)=>{O.drawArraysInstanced(a,b,c,d)},Yb:(a,b,c,d,f)=>{O.ve.drawArraysInstancedBaseInstanceWEBGL(a,b,c,d,f)},Xb:(a,b)=>{for(var c=bd[a],d=0;d<a;d++)c[d]=C[b+4*d>>2];O.drawBuffers(c)},Wb:(a,b,c,d)=>{O.drawElements(a,b,c,d)},Vb:(a,b,c,d,f)=>{O.drawElementsInstanced(a,b,c,d,f)},Ub:(a,b,c,d,f,h,n)=>{O.ve.drawElementsInstancedBaseVertexBaseInstanceWEBGL(a,b,c,d,f,h,n)},Tb:(a,b,c,d,f,h)=>{O.drawElements(a,d,f,h)},Sb:a=>O.enable(a),Rb:a=>{O.enableVertexAttribArray(a)},
Qb:a=>O.endQuery(a),Pb:a=>{O.Td.endQueryEXT(a)},Ob:(a,b)=>(a=O.fenceSync(a,b))?(b=ha(Nc),a.name=b,Nc[b]=a,b):0,Nb:()=>O.finish(),Mb:()=>O.flush(),Lb:(a,b,c,d)=>{O.framebufferRenderbuffer(a,b,c,Jc[d])},Kb:(a,b,c,d,f)=>{O.framebufferTexture2D(a,b,c,ia[d],f)},Jb:a=>O.frontFace(a),Ib:(a,b)=>{Tc(a,b,"createBuffer",Gc)},Hb:(a,b)=>{Tc(a,b,"createFramebuffer",Ic)},Gb:(a,b)=>{Tc(a,b,"createQuery",Q)},Fb:(a,b)=>{for(var c=0;c<a;c++){var d=O.Td.createQueryEXT();if(!d){for(U||=1282;c<a;)C[b+4*c++>>2]=0;break}var f=
ha(Q);d.name=f;Q[f]=d;C[b+4*c>>2]=f}},Eb:(a,b)=>{Tc(a,b,"createRenderbuffer",Jc)},Db:(a,b)=>{Tc(a,b,"createSampler",Mc)},Cb:(a,b)=>{Tc(a,b,"createTexture",ia)},Bb:cd,Ab:cd,zb:a=>O.generateMipmap(a),yb:(a,b,c)=>{c?C[c>>2]=O.getBufferParameter(a,b):U||=1281},xb:()=>{var a=O.getError()||U;U=0;return a},wb:(a,b)=>ed(a,b,2),vb:(a,b,c,d)=>{a=O.getFramebufferAttachmentParameter(a,b,c);if(a instanceof WebGLRenderbuffer||a instanceof WebGLTexture)a=a.name|0;C[d>>2]=a},ub:fd,tb:(a,b,c,d)=>{a=O.getProgramInfoLog(Hc[a]);
null===a&&(a="(unknown error)");b=0<b&&d?ic(a,d,b):0;c&&(C[c>>2]=b)},sb:(a,b,c)=>{if(c)if(a>=Fc)U||=1281;else if(a=Hc[a],35716==b)a=O.getProgramInfoLog(a),null===a&&(a="(unknown error)"),C[c>>2]=a.length+1;else if(35719==b){if(!a.me){var d=O.getProgramParameter(a,35718);for(b=0;b<d;++b)a.me=Math.max(a.me,O.getActiveUniform(a,b).name.length+1)}C[c>>2]=a.me}else if(35722==b){if(!a.ke)for(d=O.getProgramParameter(a,35721),b=0;b<d;++b)a.ke=Math.max(a.ke,O.getActiveAttrib(a,b).name.length+1);C[c>>2]=a.ke}else if(35381==
b){if(!a.le)for(d=O.getProgramParameter(a,35382),b=0;b<d;++b)a.le=Math.max(a.le,O.getActiveUniformBlockName(a,b).length+1);C[c>>2]=a.le}else C[c>>2]=O.getProgramParameter(a,b);else U||=1281},rb:gd,qb:gd,pb:(a,b,c)=>{if(c){a=O.getQueryParameter(Q[a],b);var d;"boolean"==typeof a?d=a?1:0:d=a;C[c>>2]=d}else U||=1281},ob:(a,b,c)=>{if(c){a=O.Td.getQueryObjectEXT(Q[a],b);var d;"boolean"==typeof a?d=a?1:0:d=a;C[c>>2]=d}else U||=1281},nb:(a,b,c)=>{c?C[c>>2]=O.getQuery(a,b):U||=1281},mb:(a,b,c)=>{c?C[c>>2]=
O.Td.getQueryEXT(a,b):U||=1281},lb:(a,b,c)=>{c?C[c>>2]=O.getRenderbufferParameter(a,b):U||=1281},kb:(a,b,c,d)=>{a=O.getShaderInfoLog(Kc[a]);null===a&&(a="(unknown error)");b=0<b&&d?ic(a,d,b):0;c&&(C[c>>2]=b)},jb:(a,b,c,d)=>{a=O.getShaderPrecisionFormat(a,b);C[c>>2]=a.rangeMin;C[c+4>>2]=a.rangeMax;C[d>>2]=a.precision},ib:(a,b,c)=>{c?35716==b?(a=O.getShaderInfoLog(Kc[a]),null===a&&(a="(unknown error)"),C[c>>2]=a?a.length+1:0):35720==b?(a=O.getShaderSource(Kc[a]),C[c>>2]=a?a.length+1:0):C[c>>2]=O.getShaderParameter(Kc[a],
b):U||=1281},hb:kd,gb:ld,fb:(a,b)=>{b=b?lc(y,b):"";if(a=Hc[a]){var c=a,d=c.de,f=c.Ae,h;if(!d){c.de=d={};c.ze={};var n=O.getProgramParameter(c,35718);for(h=0;h<n;++h){var k=O.getActiveUniform(c,h);var p=k.name;k=k.size;var t=md(p);t=0<t?p.slice(0,t):p;var v=c.se;c.se+=k;f[t]=[k,v];for(p=0;p<k;++p)d[v]=p,c.ze[v++]=t}}c=a.de;d=0;f=b;h=md(b);0<h&&(d=parseInt(b.slice(h+1))>>>0,f=b.slice(0,h));if((f=a.Ae[f])&&d<f[0]&&(d+=f[1],c[d]=c[d]||O.getUniformLocation(a,b)))return d}else U||=1281;return-1},eb:(a,
b,c)=>{for(var d=bd[b],f=0;f<b;f++)d[f]=C[c+4*f>>2];O.invalidateFramebuffer(a,d)},db:(a,b,c,d,f,h,n)=>{for(var k=bd[b],p=0;p<b;p++)k[p]=C[c+4*p>>2];O.invalidateSubFramebuffer(a,k,d,f,h,n)},cb:a=>O.isSync(Nc[a]),bb:a=>(a=ia[a])?O.isTexture(a):0,ab:a=>O.lineWidth(a),$a:a=>{a=Hc[a];O.linkProgram(a);a.de=0;a.Ae={}},_a:(a,b,c,d,f,h)=>{O.xe.multiDrawArraysInstancedBaseInstanceWEBGL(a,C,b>>2,C,c>>2,C,d>>2,D,f>>2,h)},Za:(a,b,c,d,f,h,n,k)=>{O.xe.multiDrawElementsInstancedBaseVertexBaseInstanceWEBGL(a,C,b>>
2,c,C,d>>2,C,f>>2,C,h>>2,D,n>>2,k)},Ya:(a,b)=>{3317==a?Rc=b:3314==a&&(Sc=b);O.pixelStorei(a,b)},Xa:(a,b)=>{O.Td.queryCounterEXT(Q[a],b)},Wa:a=>O.readBuffer(a),Va:(a,b,c,d,f,h,n)=>{if(2<=x.version)if(O.oe)O.readPixels(a,b,c,d,f,h,n);else{var k=nd(h);n>>>=31-Math.clz32(k.BYTES_PER_ELEMENT);O.readPixels(a,b,c,d,f,h,k,n)}else(k=od(h,f,c,d,n))?O.readPixels(a,b,c,d,f,h,k):U||=1280},Ua:(a,b,c,d)=>O.renderbufferStorage(a,b,c,d),Ta:(a,b,c,d,f)=>O.renderbufferStorageMultisample(a,b,c,d,f),Sa:(a,b,c)=>{O.samplerParameterf(Mc[a],
b,c)},Ra:(a,b,c)=>{O.samplerParameteri(Mc[a],b,c)},Qa:(a,b,c)=>{O.samplerParameteri(Mc[a],b,C[c>>2])},Pa:(a,b,c,d)=>O.scissor(a,b,c,d),Oa:(a,b,c,d)=>{for(var f="",h=0;h<b;++h){var n=(n=D[c+4*h>>2])?lc(y,n,d?D[d+4*h>>2]:void 0):"";f+=n}O.shaderSource(Kc[a],f)},Na:(a,b,c)=>O.stencilFunc(a,b,c),Ma:(a,b,c,d)=>O.stencilFuncSeparate(a,b,c,d),La:a=>O.stencilMask(a),Ka:(a,b)=>O.stencilMaskSeparate(a,b),Ja:(a,b,c)=>O.stencilOp(a,b,c),Ia:(a,b,c,d)=>O.stencilOpSeparate(a,b,c,d),Ha:(a,b,c,d,f,h,n,k,p)=>{if(2<=
x.version){if(O.Yd){O.texImage2D(a,b,c,d,f,h,n,k,p);return}if(p){var t=nd(k);p>>>=31-Math.clz32(t.BYTES_PER_ELEMENT);O.texImage2D(a,b,c,d,f,h,n,k,t,p);return}}t=p?od(k,n,d,f,p):null;O.texImage2D(a,b,c,d,f,h,n,k,t)},Ga:(a,b,c)=>O.texParameterf(a,b,c),Fa:(a,b,c)=>{O.texParameterf(a,b,G[c>>2])},Ea:(a,b,c)=>O.texParameteri(a,b,c),Da:(a,b,c)=>{O.texParameteri(a,b,C[c>>2])},Ca:(a,b,c,d,f)=>O.texStorage2D(a,b,c,d,f),Ba:(a,b,c,d,f,h,n,k,p)=>{if(2<=x.version){if(O.Yd){O.texSubImage2D(a,b,c,d,f,h,n,k,p);return}if(p){var t=
nd(k);O.texSubImage2D(a,b,c,d,f,h,n,k,t,p>>>31-Math.clz32(t.BYTES_PER_ELEMENT));return}}p=p?od(k,n,f,h,p):null;O.texSubImage2D(a,b,c,d,f,h,n,k,p)},Aa:(a,b)=>{O.uniform1f(X(a),b)},za:(a,b,c)=>{if(2<=x.version)b&&O.uniform1fv(X(a),G,c>>2,b);else{if(288>=b)for(var d=pd[b],f=0;f<b;++f)d[f]=G[c+4*f>>2];else d=G.subarray(c>>2,c+4*b>>2);O.uniform1fv(X(a),d)}},ya:(a,b)=>{O.uniform1i(X(a),b)},xa:(a,b,c)=>{if(2<=x.version)b&&O.uniform1iv(X(a),C,c>>2,b);else{if(288>=b)for(var d=qd[b],f=0;f<b;++f)d[f]=C[c+4*
f>>2];else d=C.subarray(c>>2,c+4*b>>2);O.uniform1iv(X(a),d)}},wa:(a,b,c)=>{O.uniform2f(X(a),b,c)},va:(a,b,c)=>{if(2<=x.version)b&&O.uniform2fv(X(a),G,c>>2,2*b);else{if(144>=b){b*=2;for(var d=pd[b],f=0;f<b;f+=2)d[f]=G[c+4*f>>2],d[f+1]=G[c+(4*f+4)>>2]}else d=G.subarray(c>>2,c+8*b>>2);O.uniform2fv(X(a),d)}},ua:(a,b,c)=>{O.uniform2i(X(a),b,c)},ta:(a,b,c)=>{if(2<=x.version)b&&O.uniform2iv(X(a),C,c>>2,2*b);else{if(144>=b){b*=2;for(var d=qd[b],f=0;f<b;f+=2)d[f]=C[c+4*f>>2],d[f+1]=C[c+(4*f+4)>>2]}else d=
C.subarray(c>>2,c+8*b>>2);O.uniform2iv(X(a),d)}},sa:(a,b,c,d)=>{O.uniform3f(X(a),b,c,d)},ra:(a,b,c)=>{if(2<=x.version)b&&O.uniform3fv(X(a),G,c>>2,3*b);else{if(96>=b){b*=3;for(var d=pd[b],f=0;f<b;f+=3)d[f]=G[c+4*f>>2],d[f+1]=G[c+(4*f+4)>>2],d[f+2]=G[c+(4*f+8)>>2]}else d=G.subarray(c>>2,c+12*b>>2);O.uniform3fv(X(a),d)}},qa:(a,b,c,d)=>{O.uniform3i(X(a),b,c,d)},pa:(a,b,c)=>{if(2<=x.version)b&&O.uniform3iv(X(a),C,c>>2,3*b);else{if(96>=b){b*=3;for(var d=qd[b],f=0;f<b;f+=3)d[f]=C[c+4*f>>2],d[f+1]=C[c+(4*
f+4)>>2],d[f+2]=C[c+(4*f+8)>>2]}else d=C.subarray(c>>2,c+12*b>>2);O.uniform3iv(X(a),d)}},oa:(a,b,c,d,f)=>{O.uniform4f(X(a),b,c,d,f)},na:(a,b,c)=>{if(2<=x.version)b&&O.uniform4fv(X(a),G,c>>2,4*b);else{if(72>=b){var d=pd[4*b],f=G;c>>=2;b*=4;for(var h=0;h<b;h+=4){var n=c+h;d[h]=f[n];d[h+1]=f[n+1];d[h+2]=f[n+2];d[h+3]=f[n+3]}}else d=G.subarray(c>>2,c+16*b>>2);O.uniform4fv(X(a),d)}},ma:(a,b,c,d,f)=>{O.uniform4i(X(a),b,c,d,f)},la:(a,b,c)=>{if(2<=x.version)b&&O.uniform4iv(X(a),C,c>>2,4*b);else{if(72>=b){b*=
4;for(var d=qd[b],f=0;f<b;f+=4)d[f]=C[c+4*f>>2],d[f+1]=C[c+(4*f+4)>>2],d[f+2]=C[c+(4*f+8)>>2],d[f+3]=C[c+(4*f+12)>>2]}else d=C.subarray(c>>2,c+16*b>>2);O.uniform4iv(X(a),d)}},ka:(a,b,c,d)=>{if(2<=x.version)b&&O.uniformMatrix2fv(X(a),!!c,G,d>>2,4*b);else{if(72>=b){b*=4;for(var f=pd[b],h=0;h<b;h+=4)f[h]=G[d+4*h>>2],f[h+1]=G[d+(4*h+4)>>2],f[h+2]=G[d+(4*h+8)>>2],f[h+3]=G[d+(4*h+12)>>2]}else f=G.subarray(d>>2,d+16*b>>2);O.uniformMatrix2fv(X(a),!!c,f)}},ja:(a,b,c,d)=>{if(2<=x.version)b&&O.uniformMatrix3fv(X(a),
!!c,G,d>>2,9*b);else{if(32>=b){b*=9;for(var f=pd[b],h=0;h<b;h+=9)f[h]=G[d+4*h>>2],f[h+1]=G[d+(4*h+4)>>2],f[h+2]=G[d+(4*h+8)>>2],f[h+3]=G[d+(4*h+12)>>2],f[h+4]=G[d+(4*h+16)>>2],f[h+5]=G[d+(4*h+20)>>2],f[h+6]=G[d+(4*h+24)>>2],f[h+7]=G[d+(4*h+28)>>2],f[h+8]=G[d+(4*h+32)>>2]}else f=G.subarray(d>>2,d+36*b>>2);O.uniformMatrix3fv(X(a),!!c,f)}},ia:(a,b,c,d)=>{if(2<=x.version)b&&O.uniformMatrix4fv(X(a),!!c,G,d>>2,16*b);else{if(18>=b){var f=pd[16*b],h=G;d>>=2;b*=16;for(var n=0;n<b;n+=16){var k=d+n;f[n]=h[k];
f[n+1]=h[k+1];f[n+2]=h[k+2];f[n+3]=h[k+3];f[n+4]=h[k+4];f[n+5]=h[k+5];f[n+6]=h[k+6];f[n+7]=h[k+7];f[n+8]=h[k+8];f[n+9]=h[k+9];f[n+10]=h[k+10];f[n+11]=h[k+11];f[n+12]=h[k+12];f[n+13]=h[k+13];f[n+14]=h[k+14];f[n+15]=h[k+15]}}else f=G.subarray(d>>2,d+64*b>>2);O.uniformMatrix4fv(X(a),!!c,f)}},ha:a=>{a=Hc[a];O.useProgram(a);O.Ie=a},ga:(a,b)=>O.vertexAttrib1f(a,b),fa:(a,b)=>{O.vertexAttrib2f(a,G[b>>2],G[b+4>>2])},ea:(a,b)=>{O.vertexAttrib3f(a,G[b>>2],G[b+4>>2],G[b+8>>2])},da:(a,b)=>{O.vertexAttrib4f(a,
G[b>>2],G[b+4>>2],G[b+8>>2],G[b+12>>2])},ca:(a,b)=>{O.vertexAttribDivisor(a,b)},ba:(a,b,c,d,f)=>{O.vertexAttribIPointer(a,b,c,d,f)},aa:(a,b,c,d,f,h)=>{O.vertexAttribPointer(a,b,c,!!d,f,h)},$:(a,b,c,d)=>O.viewport(a,b,c,d),_:(a,b,c,d)=>{O.waitSync(Nc[a],b,(c>>>0)+4294967296*d)},Z:a=>{var b=y.length;a>>>=0;if(2147483648<a)return!1;for(var c=1;4>=c;c*=2){var d=b*(1+1/c);d=Math.min(d,a+100663296);a:{d=(Math.min(2147483648,65536*Math.ceil(Math.max(a,d)/65536))-ua.buffer.byteLength+65535)/65536|0;try{ua.grow(d);
Ba();var f=1;break a}catch(h){}f=void 0}if(f)return!0}return!1},Y:()=>x?x.handle:0,gd:(a,b)=>{var c=0;td().forEach((d,f)=>{var h=b+c;f=D[a+4*f>>2]=h;for(h=0;h<d.length;++h)wa[f++]=d.charCodeAt(h);wa[f]=0;c+=d.length+1});return 0},fd:(a,b)=>{var c=td();D[a>>2]=c.length;var d=0;c.forEach(f=>d+=f.length+1);D[b>>2]=d;return 0},X:a=>{Sa||(va=!0);throw new Qa(a);},ed:()=>52,O:function(){return 70},M:(a,b,c,d)=>{for(var f=0,h=0;h<c;h++){var n=D[b>>2],k=D[b+4>>2];b+=8;for(var p=0;p<k;p++){var t=y[n+p],v=
ud[a];0===t||10===t?((1===a?qa:ta)(lc(v)),v.length=0):v.push(t)}f+=k}D[d>>2]=f;return 0},W:Wc,V:Yc,U:Zc,T:$c,D:fd,J:kd,S:ld,f:Ad,v:Bd,e:Cd,I:Dd,H:Ed,t:Fd,u:Gd,s:Hd,j:Id,R:Jd,Q:Kd,P:Ld},Z=function(){function a(c){Z=c.exports;ua=Z.hd;Ba();K=Z.kd;Da.unshift(Z.id);Fa--;0==Fa&&(null!==Ia&&(clearInterval(Ia),Ia=null),Ja&&(c=Ja,Ja=null,c()));return Z}var b={a:Md};Fa++;if(q.instantiateWasm)try{return q.instantiateWasm(b,a)}catch(c){ta(`Module.instantiateWasm callback failed with error: ${c}`),ba(c)}Ma??=
q.locateFile?La("canvaskit.wasm")?"canvaskit.wasm":na+"canvaskit.wasm":(new URL("canvaskit.wasm",import.meta.url)).href;Pa(b,function(c){a(c.instance)}).catch(ba);return{}}(),Mb=a=>(Mb=Z.jd)(a),hd=q._malloc=a=>(hd=q._malloc=Z.ld)(a),Tb=q._free=a=>(Tb=q._free=Z.md)(a),Nd=(a,b)=>(Nd=Z.nd)(a,b),Od=a=>(Od=Z.od)(a),Pd=()=>(Pd=Z.pd)();q.dynCall_viji=(a,b,c,d,f)=>(q.dynCall_viji=Z.qd)(a,b,c,d,f);q.dynCall_vijiii=(a,b,c,d,f,h,n)=>(q.dynCall_vijiii=Z.rd)(a,b,c,d,f,h,n);
q.dynCall_viiiiij=(a,b,c,d,f,h,n,k)=>(q.dynCall_viiiiij=Z.sd)(a,b,c,d,f,h,n,k);q.dynCall_vij=(a,b,c,d)=>(q.dynCall_vij=Z.td)(a,b,c,d);q.dynCall_jii=(a,b,c)=>(q.dynCall_jii=Z.ud)(a,b,c);q.dynCall_jiiiiii=(a,b,c,d,f,h,n)=>(q.dynCall_jiiiiii=Z.vd)(a,b,c,d,f,h,n);q.dynCall_jiiiiji=(a,b,c,d,f,h,n,k)=>(q.dynCall_jiiiiji=Z.wd)(a,b,c,d,f,h,n,k);q.dynCall_ji=(a,b)=>(q.dynCall_ji=Z.xd)(a,b);q.dynCall_iijj=(a,b,c,d,f,h)=>(q.dynCall_iijj=Z.yd)(a,b,c,d,f,h);
q.dynCall_jiji=(a,b,c,d,f)=>(q.dynCall_jiji=Z.zd)(a,b,c,d,f);q.dynCall_viijii=(a,b,c,d,f,h,n)=>(q.dynCall_viijii=Z.Ad)(a,b,c,d,f,h,n);q.dynCall_iiiiij=(a,b,c,d,f,h,n)=>(q.dynCall_iiiiij=Z.Bd)(a,b,c,d,f,h,n);q.dynCall_iiiiijj=(a,b,c,d,f,h,n,k,p)=>(q.dynCall_iiiiijj=Z.Cd)(a,b,c,d,f,h,n,k,p);q.dynCall_iiiiiijj=(a,b,c,d,f,h,n,k,p,t)=>(q.dynCall_iiiiiijj=Z.Dd)(a,b,c,d,f,h,n,k,p,t);function Cd(a,b,c,d){var f=Pd();try{return K.get(a)(b,c,d)}catch(h){Od(f);if(h!==h+0)throw h;Nd(1,0)}}
function Ad(a,b){var c=Pd();try{return K.get(a)(b)}catch(d){Od(c);if(d!==d+0)throw d;Nd(1,0)}}function Ld(a,b,c,d,f,h,n,k,p,t){var v=Pd();try{K.get(a)(b,c,d,f,h,n,k,p,t)}catch(z){Od(v);if(z!==z+0)throw z;Nd(1,0)}}function Hd(a,b,c,d){var f=Pd();try{K.get(a)(b,c,d)}catch(h){Od(f);if(h!==h+0)throw h;Nd(1,0)}}function Gd(a,b,c){var d=Pd();try{K.get(a)(b,c)}catch(f){Od(d);if(f!==f+0)throw f;Nd(1,0)}}function Fd(a,b){var c=Pd();try{K.get(a)(b)}catch(d){Od(c);if(d!==d+0)throw d;Nd(1,0)}}
function Id(a,b,c,d,f){var h=Pd();try{K.get(a)(b,c,d,f)}catch(n){Od(h);if(n!==n+0)throw n;Nd(1,0)}}function Bd(a,b,c){var d=Pd();try{return K.get(a)(b,c)}catch(f){Od(d);if(f!==f+0)throw f;Nd(1,0)}}function Kd(a,b,c,d,f,h,n){var k=Pd();try{K.get(a)(b,c,d,f,h,n)}catch(p){Od(k);if(p!==p+0)throw p;Nd(1,0)}}function Ed(a,b,c,d,f,h,n,k){var p=Pd();try{return K.get(a)(b,c,d,f,h,n,k)}catch(t){Od(p);if(t!==t+0)throw t;Nd(1,0)}}
function Jd(a,b,c,d,f,h){var n=Pd();try{K.get(a)(b,c,d,f,h)}catch(k){Od(n);if(k!==k+0)throw k;Nd(1,0)}}function Dd(a,b,c,d,f){var h=Pd();try{return K.get(a)(b,c,d,f)}catch(n){Od(h);if(n!==n+0)throw n;Nd(1,0)}}var Qd,Rd;Ja=function Sd(){Qd||Td();Qd||(Ja=Sd)};function Td(){if(!(0<Fa)){if(!Rd&&(Rd=1,Ra(Ca),0<Fa))return;Qd||(Qd=1,q.calledRun=1,va||(Ra(Da),aa(q),q.onRuntimeInitialized?.(),Ra(Ea)))}}Td();moduleRtn=ca;


  return moduleRtn;
}
);
})();
export default CanvasKitInit;
