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