var Module = (function() { var _scriptDir = import.meta.url; return ( function(Module) { Module = Module || {}; var e;e||(e=typeof Module !== 'undefined' ? Module : {});var aa,r;e.ready=new Promise(function(a,b){aa=a;r=b});var t={},u;for(u in e)e.hasOwnProperty(u)&&(t[u]=e[u]);var v="",ba;v=self.location.href;_scriptDir&&(v=_scriptDir);0!==v.indexOf("blob:")?v=v.substr(0,v.lastIndexOf("/")+1):v="";ba=function(a){var b=new XMLHttpRequest;b.open("GET",a,!1);b.responseType="arraybuffer";b.send(null);return new Uint8Array(b.response)};var ca=e.print||console.log.bind(console),w=e.printErr||console.warn.bind(console); for(u in t)t.hasOwnProperty(u)&&(e[u]=t[u]);t=null;var da=0,y;e.wasmBinary&&(y=e.wasmBinary);var noExitRuntime=e.noExitRuntime||!0;"object"!==typeof WebAssembly&&z("no native wasm support detected");var ea,fa=!1,ha=new TextDecoder("utf8"); function ia(a,b,c){var d=A;if(0=g){var k=a.charCodeAt(++f);g=65536+((g&1023)<<10)|k&1023}if(127>=g){if(b>=c)break;d[b++]=g}else{if(2047>=g){if(b+1>=c)break;d[b++]=192|g>>6}else{if(65535>=g){if(b+2>=c)break;d[b++]=224|g>>12}else{if(b+3>=c)break;d[b++]=240|g>>18;d[b++]=128|g>>12&63}d[b++]=128|g>>6&63}d[b++]=128|g&63}}d[b]=0}}var ja=new TextDecoder("utf-16le"); function ka(a,b){var c=a>>1;for(b=c+b/2;!(c>=b)&&B[c];)++c;return ja.decode(A.subarray(a,c<<1))}function la(a,b,c){void 0===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>1]=a.charCodeAt(f),b+=2;D[b>>1]=0;return b-d}function ma(a){return 2*a.length}function na(a,b){for(var c=0,d="";!(c>=b/4);){var f=E[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} function oa(a,b,c){void 0===c&&(c=2147483647);if(4>c)return 0;var d=b;c=d+c-4;for(var f=0;f=g){var k=a.charCodeAt(++f);g=65536+((g&1023)<<10)|k&1023}E[b>>2]=g;b+=4;if(b+4>c)break}E[b>>2]=0;return b-d}function pa(a){for(var b=0,c=0;c=d&&++c;b+=4}return b}var qa,ra,A,D,B,E,F,sa,ta; function ua(){var a=ea.buffer;qa=a;e.HEAP8=ra=new Int8Array(a);e.HEAP16=D=new Int16Array(a);e.HEAP32=E=new Int32Array(a);e.HEAPU8=A=new Uint8Array(a);e.HEAPU16=B=new Uint16Array(a);e.HEAPU32=F=new Uint32Array(a);e.HEAPF32=sa=new Float32Array(a);e.HEAPF64=ta=new Float64Array(a)}var G,va=[],wa=[],xa=[];function ya(){var a=e.preRun.shift();va.unshift(a)}var H=0,za=null,J=null;e.preloadedImages={};e.preloadedAudios={}; function z(a){if(e.onAbort)e.onAbort(a);w(a);fa=!0;a=new WebAssembly.RuntimeError("abort("+a+"). Build with -s ASSERTIONS=1 for more info.");r(a);throw a;}var K=(new URL("avif_dec.wasm",import.meta.url)).toString();function Aa(){try{if(K==K&&y)return new Uint8Array(y);if(ba)return ba(K);throw"both async and sync fetching of the wasm failed";}catch(a){z(a)}} function Ba(){return y||"function"!==typeof fetch?Promise.resolve().then(function(){return Aa()}):fetch(K,{credentials:"same-origin"}).then(function(a){if(!a.ok)throw"failed to load wasm binary file at '"+K+"'";return a.arrayBuffer()}).catch(function(){return Aa()})}function Ca(a){for(;0=b?"_"+a:a} function Ga(a,b){a=Fa(a);return(new Function("body","return function "+a+'() {\n "use strict"; return body.apply(this, arguments);\n};\n'))(b)}function Ha(a){var b=Error,c=Ga(a,function(d){this.name=a;this.message=d;d=Error(d).stack;void 0!==d&&(this.stack=this.toString()+"\n"+d.replace(/^Error(:[^\n]*)?\n/,""))});c.prototype=Object.create(b.prototype);c.prototype.constructor=c;c.prototype.toString=function(){return void 0===this.message?this.name:this.name+": "+this.message};return c} var Ia=void 0;function Q(a){throw new Ia(a);}var Ja=void 0;function Ka(a,b){function c(h){h=b(h);if(h.length!==d.length)throw new Ja("Mismatched type converter count");for(var n=0;n>2])}function Qa(a){if(null===a)return"null";var b=typeof a;return"object"===b||"array"===b||"function"===b?a.toString():""+a} function Ra(a,b){switch(b){case 2:return function(c){return this.fromWireType(sa[c>>2])};case 3:return function(c){return this.fromWireType(ta[c>>3])};default:throw new TypeError("Unknown float type: "+a);}}function Sa(a){var b=Function;if(!(b instanceof Function))throw new TypeError("new_ called with constructor type "+typeof b+" which is not a function");var c=Ga(b.name||"unknownFunctionName",function(){});c.prototype=b.prototype;c=new c;a=b.apply(c,a);return a instanceof Object?a:c} function Ta(a){for(;a.length;){var b=a.pop();a.pop()(b)}}function Ua(a,b){var c=e;if(void 0===c[a].O){var d=c[a];c[a]=function(){c[a].O.hasOwnProperty(arguments.length)||Q("Function '"+b+"' called with an invalid number of arguments ("+arguments.length+") - expects one of ("+c[a].O+")!");return c[a].O[arguments.length].apply(this,arguments)};c[a].O=[];c[a].O[d.T]=d}} function Va(a,b,c){e.hasOwnProperty(a)?((void 0===c||void 0!==e[a].O&&void 0!==e[a].O[c])&&Q("Cannot register public name '"+a+"' twice"),Ua(a,a),e.hasOwnProperty(c)&&Q("Cannot register multiple overloads of a function with the same number of arguments ("+c+")!"),e[a].O[c]=b):(e[a]=b,void 0!==c&&(e[a].X=c))}function Wa(a,b){for(var c=[],d=0;d>2)+d]);return c} function Xa(a,b){var c=[];return function(){c.length=arguments.length;for(var d=0;d>1]}:function(d){return B[d>>1]};case 2:return c?function(d){return E[d>>2]}:function(d){return F[d>>2]};default:throw new TypeError("Unknown integer type: "+a);}}var db={}; function eb(){return"object"===typeof globalThis?globalThis:Function("return this")()}function fb(a,b){var c=O[a];void 0===c&&Q(b+" has unknown type "+$a(a));return c}for(var gb={},hb=[null,[],[]],ib=Array(256),V=0;256>V;++V)ib[V]=String.fromCharCode(V);Ea=ib;Ia=e.BindingError=Ha("BindingError");Ja=e.InternalError=Ha("InternalError");e.count_emval_handles=function(){for(var a=0,b=5;b>g])},P:null})},B:function(a,b){b=M(b);R(a,{name:b,fromWireType:function(c){var d=S[c].value;Oa(c);return d},toWireType:function(c,d){return T(d)}, argPackAdvance:8,readValueFromPointer:Pa,P:null})},q:function(a,b,c){c=Da(c);b=M(b);R(a,{name:b,fromWireType:function(d){return d},toWireType:function(d,f){if("number"!==typeof f&&"boolean"!==typeof f)throw new TypeError('Cannot convert "'+Qa(f)+'" to '+this.name);return f},argPackAdvance:8,readValueFromPointer:Ra(b,c),P:null})},t:function(a,b,c,d,f,g){var k=Wa(b,c);a=M(a);f=Ya(d,f);Va(a,function(){bb("Cannot call "+a+" due to unbound types",k)},b-1);Ka(k,function(h){var n=a,l=a;h=[h[0],null].concat(h.slice(1)); var m=f,q=h.length;2>q&&Q("argTypes array size mismatch! Must at least get return value and 'this' types!");for(var x=null!==h[1]&&!1,C=!1,p=1;p>>h}}var n=b.includes("unsigned");R(a,{name:b,fromWireType:g,toWireType:function(l,m){if("number"!==typeof m&&"boolean"!==typeof m)throw new TypeError('Cannot convert "'+Qa(m)+'" to '+this.name);if(mf)throw new TypeError('Passing a number "'+Qa(m)+'" from JS side to C/C++ side to an argument of type "'+b+'", which is outside the valid range ['+d+", "+f+"]!");return n?m>>>0:m|0},argPackAdvance:8,readValueFromPointer:cb(b,k,0!==d),P:null})},d:function(a, b,c){function d(g){g>>=2;var k=F;return new f(qa,k[g+1],k[g])}var f=[Int8Array,Uint8Array,Int16Array,Uint16Array,Int32Array,Uint32Array,Float32Array,Float64Array][b];c=M(c);R(a,{name:c,fromWireType:d,argPackAdvance:8,readValueFromPointer:d},{U:!0})},m:function(a,b){b=M(b);var c="std::string"===b;R(a,{name:b,fromWireType:function(d){var f=F[d>>2];if(c)for(var g=d+4,k=0;k<=f;++k){var h=d+4+k;if(k==f||0==A[h]){if(g){for(var n=g+(h-g),l=g;!(l>=n)&&A[l];)++l;g=ha.decode(A.subarray(g,l))}else g="";if(void 0=== m)var m=g;else m+=String.fromCharCode(0),m+=g;g=h+1}}else{m=Array(f);for(k=0;k=q&&(q=65536+((q&1023)<<10)|f.charCodeAt(++m)& 1023);127>=q?++l:l=2047>=q?l+2:65535>=q?l+3:l+4}return l}:function(){return f.length})(),h=jb(4+k+1);F[h>>2]=k;if(c&&g)ia(f,h+4,k+1);else if(g)for(g=0;g>2],m=k(),q,x=n+4,C=0;C<=l;++C){var p=n+4+C*b;if(C==l||0==m[p>>h])x=d(x,p-x),void 0===q?q=x:(q+=String.fromCharCode(0),q+=x),x=p+b}U(n);return q},toWireType:function(n,l){"string"!==typeof l&&Q("Cannot pass non-string to C++ string type "+c);var m=g(l),q=jb(4+m+b);F[q>>2]=m>>h;f(l,q+4,m+b);null!==n&&n.push(U,q);return q},argPackAdvance:8,readValueFromPointer:Pa,P:function(n){U(n)}})},s:function(a,b){b= M(b);R(a,{W:!0,name:b,argPackAdvance:0,fromWireType:function(){},toWireType:function(){}})},h:Oa,i:function(a){if(0===a)return T(eb());var b=db[a];a=void 0===b?M(a):b;return T(eb()[a])},n:function(a){4>> 2) + "+ g+'], "parameter '+g+'");\nvar arg'+g+" = argType"+g+".readValueFromPointer(args);\nargs += argType"+g+"['argPackAdvance'];\n";f=(new Function("requireRegisteredType","Module","__emval_register",k+("var obj = new constructor("+f+");\nreturn __emval_register(obj);\n}\n")))(fb,e,T);gb[b]=f}return f(a,c,d)},a:function(){z()},g:function(a,b){W(a,b||1);throw"longjmp";},y:function(a,b,c){A.copyWithin(a,b,b+c)},k:function(a){var b=A.length;a>>>=0;if(2147483648=c;c*=2){var d=b*(1+ .2/c);d=Math.min(d,a+100663296);d=Math.max(a,d);0>>16);ua();var f=1;break a}catch(g){}f=void 0}if(f)return!0}return!1},z:function(){return 0},u:function(){},A:function(a,b,c,d){for(var f=0,g=0;g>2],h=E[b+(8*g+4)>>2],n=0;n>2]=f;return 0},b:function(){return da},f:kb,w:lb,p:mb,x:nb,c:function(a){da=a}}; (function(){function a(f){e.asm=f.exports;ea=e.asm.C;ua();G=e.asm.L;wa.unshift(e.asm.D);H--;e.monitorRunDependencies&&e.monitorRunDependencies(H);0==H&&(null!==za&&(clearInterval(za),za=null),J&&(f=J,J=null,f()))}function b(f){a(f.instance)}function c(f){return Ba().then(function(g){return WebAssembly.instantiate(g,d)}).then(f,function(g){w("failed to asynchronously prepare wasm: "+g);z(g)})}var d={a:ob};H++;e.monitorRunDependencies&&e.monitorRunDependencies(H);if(e.instantiateWasm)try{return e.instantiateWasm(d, a)}catch(f){return w("Module.instantiateWasm callback failed with error: "+f),!1}(function(){return y||"function"!==typeof WebAssembly.instantiateStreaming||K.startsWith("data:application/octet-stream;base64,")||"function"!==typeof fetch?c(b):fetch(K,{credentials:"same-origin"}).then(function(f){return WebAssembly.instantiateStreaming(f,d).then(b,function(g){w("wasm streaming compile failed: "+g);w("falling back to ArrayBuffer instantiation");return c(b)})})})().catch(r);return{}})(); e.___wasm_call_ctors=function(){return(e.___wasm_call_ctors=e.asm.D).apply(null,arguments)};var jb=e._malloc=function(){return(jb=e._malloc=e.asm.E).apply(null,arguments)},U=e._free=function(){return(U=e._free=e.asm.F).apply(null,arguments)},ab=e.___getTypeName=function(){return(ab=e.___getTypeName=e.asm.G).apply(null,arguments)};e.___embind_register_native_and_builtin_types=function(){return(e.___embind_register_native_and_builtin_types=e.asm.H).apply(null,arguments)}; var X=e.stackSave=function(){return(X=e.stackSave=e.asm.I).apply(null,arguments)},Y=e.stackRestore=function(){return(Y=e.stackRestore=e.asm.J).apply(null,arguments)},W=e._setThrew=function(){return(W=e._setThrew=e.asm.K).apply(null,arguments)};e.dynCall_iiijii=function(){return(e.dynCall_iiijii=e.asm.M).apply(null,arguments)};e.dynCall_jiji=function(){return(e.dynCall_jiji=e.asm.N).apply(null,arguments)}; function nb(a,b,c,d,f,g,k,h){var n=X();try{G.get(a)(b,c,d,f,g,k,h)}catch(l){Y(n);if(l!==l+0&&"longjmp"!==l)throw l;W(1,0)}}function mb(a,b,c,d,f){var g=X();try{G.get(a)(b,c,d,f)}catch(k){Y(g);if(k!==k+0&&"longjmp"!==k)throw k;W(1,0)}}function kb(a,b,c){var d=X();try{return G.get(a)(b,c)}catch(f){Y(d);if(f!==f+0&&"longjmp"!==f)throw f;W(1,0)}}function lb(a,b,c,d,f){var g=X();try{return G.get(a)(b,c,d,f)}catch(k){Y(g);if(k!==k+0&&"longjmp"!==k)throw k;W(1,0)}}var Z;J=function pb(){Z||qb();Z||(J=pb)}; function qb(){function a(){if(!Z&&(Z=!0,e.calledRun=!0,!fa)){Ca(wa);aa(e);if(e.onRuntimeInitialized)e.onRuntimeInitialized();if(e.postRun)for("function"==typeof e.postRun&&(e.postRun=[e.postRun]);e.postRun.length;){var b=e.postRun.shift();xa.unshift(b)}Ca(xa)}}if(!(0