
// We are modularizing this manually because the current modularize setting in Emscripten has some issues:
// https://github.com/kripken/emscripten/issues/5820
// In addition, When you use emcc's modularization, it still expects to export a global object called `Module`,
// which is able to be used/called before the WASM is loaded.
// The modularization below exports a promise that loads and resolves to the actual sql.js module.
// That way, this module can't be used before the WASM is finished loading.

// We are going to define a function that a user will call to start loading initializing our Sql.js library
// However, that function might be called multiple times, and on subsequent calls, we don't actually want it to instantiate a new instance of the Module
// Instead, we want to return the previously loaded module

// TODO: Make this not declare a global if used in the browser
var initSqlJsPromise = undefined;

var initSqlJs = function (moduleConfig) {

    if (initSqlJsPromise){
      return initSqlJsPromise;
    }
    // If we're here, we've never called this function before
    initSqlJsPromise = new Promise(function (resolveModule, reject) {

        // We are modularizing this manually because the current modularize setting in Emscripten has some issues:
        // https://github.com/kripken/emscripten/issues/5820

        // The way to affect the loading of emcc compiled modules is to create a variable called `Module` and add
        // properties to it, like `preRun`, `postRun`, etc
        // We are using that to get notified when the WASM has finished loading.
        // Only then will we return our promise

        // If they passed in a moduleConfig object, use that
        // Otherwise, initialize Module to the empty object
        var Module = typeof moduleConfig !== 'undefined' ? moduleConfig : {};

        // EMCC only allows for a single onAbort function (not an array of functions)
        // So if the user defined their own onAbort function, we remember it and call it
        var originalOnAbortFunction = Module['onAbort'];
        Module['onAbort'] = function (errorThatCausedAbort) {
            reject(new Error(errorThatCausedAbort));
            if (originalOnAbortFunction){
              originalOnAbortFunction(errorThatCausedAbort);
            }
        };

        Module['postRun'] = Module['postRun'] || [];
        Module['postRun'].push(function () {
            // When Emscripted calls postRun, this promise resolves with the built Module
            resolveModule(Module);
        });

        // There is a section of code in the emcc-generated code below that looks like this:
        // (Note that this is lowercase `module`)
        // if (typeof module !== 'undefined') {
        //     module['exports'] = Module;
        // }
        // When that runs, it's going to overwrite our own modularization export efforts in shell-post.js!
        // The only way to tell emcc not to emit it is to pass the MODULARIZE=1 or MODULARIZE_INSTANCE=1 flags,
        // but that carries with it additional unnecessary baggage/bugs we don't want either.
        // So, we have three options:
        // 1) We undefine `module`
        // 2) We remember what `module['exports']` was at the beginning of this function and we restore it later
        // 3) We write a script to remove those lines of code as part of the Make process.
        //
        // Since those are the only lines of code that care about module, we will undefine it. It's the most straightforward
        // of the options, and has the side effect of reducing emcc's efforts to modify the module if its output were to change in the future.
        // That's a nice side effect since we're handling the modularization efforts ourselves
        module = undefined;

        // The emcc-generated code and shell-post.js code goes below,
        // meaning that all of it runs inside of this promise. If anything throws an exception, our promise will abort

var Module;Module||(Module=typeof Module !== 'undefined' ? Module : {});null;
Module.onRuntimeInitialized=function(){function a(h,l){this.Ka=h;this.db=l;this.Ja=1;this.ob=[]}function b(h,l){this.db=l;l=aa(h)+1;this.ab=da(l);if(null===this.ab)throw Error("Unable to allocate memory for the SQL string");d(h,r,this.ab,l);this.mb=this.ab;this.Ya=this.Fb=null}function c(h,{filename:l=!1}={}){!1===l?(this.filename="dbfile_"+(4294967295*Math.random()>>>0),this.Nc=!0,null!=h&&t.rb("/",this.filename,h,!0,!0)):this.filename=h;this.handleError(g(this.filename,e));this.db=z(e,"i32");Ab(this.db);
this.gb={};this.Ra={}}var e=A(4),f=Module.cwrap,g=f("sqlite3_open","number",["string","number"]),k=f("sqlite3_close_v2","number",["number"]),m=f("sqlite3_exec","number",["number","string","number","number","number"]),p=f("sqlite3_changes","number",["number"]),q=f("sqlite3_prepare_v2","number",["number","string","number","number","number"]),n=f("sqlite3_sql","string",["number"]),u=f("sqlite3_normalized_sql","string",["number"]),y=f("sqlite3_prepare_v2","number",["number","number","number","number",
"number"]),D=f("sqlite3_bind_text","number",["number","number","number","number","number"]),B=f("sqlite3_bind_blob","number",["number","number","number","number","number"]),E=f("sqlite3_bind_double","number",["number","number","number"]),V=f("sqlite3_bind_int","number",["number","number","number"]),ba=f("sqlite3_bind_parameter_index","number",["number","string"]),W=f("sqlite3_step","number",["number"]),Ja=f("sqlite3_errmsg","string",["number"]),F=f("sqlite3_column_count","number",["number"]),Bb=f("sqlite3_data_count",
"number",["number"]),Cb=f("sqlite3_column_double","number",["number","number"]),ab=f("sqlite3_column_text","string",["number","number"]),Db=f("sqlite3_column_blob","number",["number","number"]),Eb=f("sqlite3_column_bytes","number",["number","number"]),Fb=f("sqlite3_column_type","number",["number","number"]),Gb=f("sqlite3_column_name","string",["number","number"]),Hb=f("sqlite3_reset","number",["number"]),Ib=f("sqlite3_clear_bindings","number",["number"]),Jb=f("sqlite3_finalize","number",["number"]),
Kb=f("sqlite3_create_function_v2","number","number string number number number number number number number".split(" ")),Lb=f("sqlite3_value_type","number",["number"]),Mb=f("sqlite3_value_bytes","number",["number"]),Nb=f("sqlite3_value_text","string",["number"]),Ob=f("sqlite3_value_blob","number",["number"]),Pb=f("sqlite3_value_double","number",["number"]),Qb=f("sqlite3_result_double","",["number","number"]),bb=f("sqlite3_result_null","",["number"]),Rb=f("sqlite3_result_text","",["number","string",
"number","number"]),Sb=f("sqlite3_result_blob","",["number","number","number","number"]),Tb=f("sqlite3_result_int","",["number","number"]),cb=f("sqlite3_result_error","",["number","string","number"]),Ab=f("RegisterExtensionFunctions","number",["number"]);a.prototype.bind=function(h){if(!this.Ka)throw"Statement closed";this.reset();return Array.isArray(h)?this.pc(h):null!=h&&"object"===typeof h?this.qc(h):!0};a.prototype.step=function(){if(!this.Ka)throw"Statement closed";this.Ja=1;var h=W(this.Ka);
switch(h){case 100:return!0;case 101:return!1;default:throw this.db.handleError(h);}};a.prototype.Zb=function(h){null==h&&(h=this.Ja,this.Ja+=1);return Cb(this.Ka,h)};a.prototype.Gc=function(h){null==h&&(h=this.Ja,this.Ja+=1);h=ab(this.Ka,h);if("function"!==typeof BigInt)throw Error("BigInt is not supported");return BigInt(h)};a.prototype.Ic=function(h){null==h&&(h=this.Ja,this.Ja+=1);return ab(this.Ka,h)};a.prototype.getBlob=function(h){null==h&&(h=this.Ja,this.Ja+=1);var l=Eb(this.Ka,h);h=Db(this.Ka,
h);for(var v=new Uint8Array(l),w=0;w<l;w+=1)v[w]=C[h+w];return v};a.prototype.get=function(h,l){l=l||{};null!=h&&this.bind(h)&&this.step();h=[];for(var v=Bb(this.Ka),w=0;w<v;w+=1)switch(Fb(this.Ka,w)){case 1:var x=l.useBigInt?this.Gc(w):this.Zb(w);h.push(x);break;case 2:h.push(this.Zb(w));break;case 3:h.push(this.Ic(w));break;case 4:h.push(this.getBlob(w));break;default:h.push(null)}return h};a.prototype.getColumnNames=function(){for(var h=[],l=F(this.Ka),v=0;v<l;v+=1)h.push(Gb(this.Ka,v));return h};
a.prototype.getAsObject=function(h,l){h=this.get(h,l);l=this.getColumnNames();for(var v={},w=0;w<l.length;w+=1)v[l[w]]=h[w];return v};a.prototype.getSQL=function(){return n(this.Ka)};a.prototype.getNormalizedSQL=function(){return u(this.Ka)};a.prototype.run=function(h){null!=h&&this.bind(h);this.step();return this.reset()};a.prototype.Ob=function(h,l){null==l&&(l=this.Ja,this.Ja+=1);h=ea(h);var v=fa(h);this.ob.push(v);this.db.handleError(D(this.Ka,l,v,h.length-1,0))};a.prototype.oc=function(h,l){null==
l&&(l=this.Ja,this.Ja+=1);var v=fa(h);this.ob.push(v);this.db.handleError(B(this.Ka,l,v,h.length,0))};a.prototype.Nb=function(h,l){null==l&&(l=this.Ja,this.Ja+=1);this.db.handleError((h===(h|0)?V:E)(this.Ka,l,h))};a.prototype.rc=function(h){null==h&&(h=this.Ja,this.Ja+=1);B(this.Ka,h,0,0,0)};a.prototype.Pb=function(h,l){null==l&&(l=this.Ja,this.Ja+=1);switch(typeof h){case "string":this.Ob(h,l);return;case "number":this.Nb(h,l);return;case "bigint":this.Ob(h.toString(),l);return;case "boolean":this.Nb(h+
0,l);return;case "object":if(null===h){this.rc(l);return}if(null!=h.length){this.oc(h,l);return}}throw"Wrong API use : tried to bind a value of an unknown type ("+h+").";};a.prototype.qc=function(h){var l=this;Object.keys(h).forEach(function(v){var w=ba(l.Ka,v);0!==w&&l.Pb(h[v],w)});return!0};a.prototype.pc=function(h){for(var l=0;l<h.length;l+=1)this.Pb(h[l],l+1);return!0};a.prototype.reset=function(){this.freemem();return 0===Ib(this.Ka)&&0===Hb(this.Ka)};a.prototype.freemem=function(){for(var h;void 0!==
(h=this.ob.pop());)ha(h)};a.prototype.free=function(){this.freemem();var h=0===Jb(this.Ka);delete this.db.gb[this.Ka];this.Ka=0;return h};b.prototype.next=function(){if(null===this.ab)return{done:!0};null!==this.Ya&&(this.Ya.free(),this.Ya=null);if(!this.db.db)throw this.tb(),Error("Database closed");var h=ja(),l=A(4);ka(e);ka(l);try{this.db.handleError(y(this.db.db,this.mb,-1,e,l));this.mb=z(l,"i32");var v=z(e,"i32");if(0===v)return this.tb(),{done:!0};this.Ya=new a(v,this.db);this.db.gb[v]=this.Ya;
return{value:this.Ya,done:!1}}catch(w){throw this.Fb=J(this.mb),this.tb(),w;}finally{la(h)}};b.prototype.tb=function(){ha(this.ab);this.ab=null};b.prototype.getRemainingSQL=function(){return null!==this.Fb?this.Fb:J(this.mb)};"function"===typeof Symbol&&"symbol"===typeof Symbol.iterator&&(b.prototype[Symbol.iterator]=function(){return this});c.prototype.run=function(h,l){if(!this.db)throw"Database closed";if(l){h=this.prepare(h,l);try{h.step()}finally{h.free()}}else this.handleError(m(this.db,h,0,
0,e));return this};c.prototype.exec=function(h,l,v){if(!this.db)throw"Database closed";var w=ja(),x=null;try{var G=aa(h)+1,I=A(G);d(h,C,I,G);var ia=I;var ca=A(4);for(h=[];0!==z(ia,"i8");){ka(e);ka(ca);this.handleError(y(this.db,ia,-1,e,ca));var H=z(e,"i32");ia=z(ca,"i32");if(0!==H){G=null;x=new a(H,this);for(null!=l&&x.bind(l);x.step();)null===G&&(G={columns:x.getColumnNames(),values:[]},h.push(G)),G.values.push(x.get(null,v));x.free()}}return h}catch(N){throw x&&x.free(),N;}finally{la(w)}};c.prototype.each=
function(h,l,v,w,x){"function"===typeof l&&(w=v,v=l,l=void 0);h=this.prepare(h,l);try{for(;h.step();)v(h.getAsObject(null,x))}finally{h.free()}if("function"===typeof w)return w()};c.prototype.prepare=function(h,l){ka(e);this.handleError(q(this.db,h,-1,e,0));h=z(e,"i32");if(0===h)throw"Nothing to prepare";var v=new a(h,this);null!=l&&v.bind(l);return this.gb[h]=v};c.prototype.iterateStatements=function(h){return new b(h,this)};c.prototype["export"]=function(){Object.values(this.gb).forEach(function(l){l.free()});
Object.values(this.Ra).forEach(ma);this.Ra={};this.handleError(k(this.db));var h=t.readFile(this.filename,{encoding:"binary"});this.handleError(g(this.filename,e));this.db=z(e,"i32");return h};c.prototype.close=function(){null!==this.db&&(Object.values(this.gb).forEach(function(h){h.free()}),Object.values(this.Ra).forEach(ma),this.Ra={},this.handleError(k(this.db)),this.Nc&&t.unlink("/"+this.filename),this.db=null)};c.prototype.handleError=function(h){if(0===h)return null;h=Ja(this.db);throw Error(h);
};c.prototype.getRowsModified=function(){return p(this.db)};c.prototype.create_function=function(h,l){Object.prototype.hasOwnProperty.call(this.Ra,h)&&(ma(this.Ra[h]),delete this.Ra[h]);var v=na(function(w,x,G){for(var I,ia=[],ca=0;ca<x;ca+=1){var H=z(G+4*ca,"i32"),N=Lb(H);if(1===N||2===N)H=Pb(H);else if(3===N)H=Nb(H);else if(4===N){N=H;H=Mb(N);N=Ob(N);for(var db=new Uint8Array(H),ya=0;ya<H;ya+=1)db[ya]=C[N+ya];H=db}else H=null;ia.push(H)}try{I=l.apply(null,ia)}catch(Ub){cb(w,Ub,-1);return}switch(typeof I){case "boolean":Tb(w,
I?1:0);break;case "number":Qb(w,I);break;case "string":Rb(w,I,-1,-1);break;case "object":null===I?bb(w):null!=I.length?(x=fa(I),Sb(w,x,I.length,-1),ha(x)):cb(w,"Wrong API use : tried to return a value of an unknown type ("+I+").",-1);break;default:bb(w)}},"viii");this.Ra[h]=v;this.handleError(Kb(this.db,h,l.length,1,0,v,0,0,0));return this};Module.Database=c;var oa=new Map;Module.register_for_idb=h=>{let l=na(function(x,G){x=oa.get(x);return h.lock(x,G)?0:5},"iii"),v=na(function(x,G){x=oa.get(x);
h.unlock(x,G);return 0},"iii"),w=na(function(x,G){x=J(x);oa.set(G,x)},"vii");Module._register_for_idb(l,v,w)};Module.cleanup_file=h=>{let l=[...oa.entries()].find(v=>v[1]===h);oa.delete(l[0])};Module.reset_filesystem=()=>{t.root=null;t.ic()}};var pa=Object.assign({},Module),qa="./this.program",ra="object"==typeof window,sa="function"==typeof importScripts,ta="object"==typeof process&&"object"==typeof process.versions&&"string"==typeof process.versions.node,K="",ua,va,wa,fs,xa,za;
if(ta)K=sa?require("path").dirname(K)+"/":__dirname+"/",za=()=>{xa||(fs=require("fs"),xa=require("path"))},ua=function(a,b){za();a=xa.normalize(a);return fs.readFileSync(a,b?void 0:"utf8")},wa=a=>{a=ua(a,!0);a.buffer||(a=new Uint8Array(a));return a},va=(a,b,c)=>{za();a=xa.normalize(a);fs.readFile(a,function(e,f){e?c(e):b(f.buffer)})},1<process.argv.length&&(qa=process.argv[1].replace(/\\/g,"/")),process.argv.slice(2),"undefined"!=typeof module&&(module.exports=Module),Module.inspect=function(){return"[Emscripten Module object]"};
else if(ra||sa)sa?K=self.location.href:"undefined"!=typeof document&&document.currentScript&&(K=document.currentScript.src),K=0!==K.indexOf("blob:")?K.substr(0,K.replace(/[?#].*/,"").lastIndexOf("/")+1):"",ua=a=>{var b=new XMLHttpRequest;b.open("GET",a,!1);b.send(null);return b.responseText},sa&&(wa=a=>{var b=new XMLHttpRequest;b.open("GET",a,!1);b.responseType="arraybuffer";b.send(null);return new Uint8Array(b.response)}),va=(a,b,c)=>{var e=new XMLHttpRequest;e.open("GET",a,!0);e.responseType="arraybuffer";
e.onload=()=>{200==e.status||0==e.status&&e.response?b(e.response):c()};e.onerror=c;e.send(null)};var Aa=Module.print||console.log.bind(console),L=Module.printErr||console.warn.bind(console);Object.assign(Module,pa);pa=null;Module.thisProgram&&(qa=Module.thisProgram);function Ba(a){return 128>a?[a]:[a%128|128,a>>7]}var Ca=[],Da;
function na(a,b){if(!Da){Da=new WeakMap;for(var c=M.length,e=0;e<0+c;e++){var f=M.get(e);f&&Da.set(f,e)}}if(Da.has(a))return Da.get(a);if(Ca.length)c=Ca.pop();else{try{M.grow(1)}catch(m){if(!(m instanceof RangeError))throw m;throw"Unable to grow wasm table. Set ALLOW_TABLE_GROWTH.";}c=M.length-1}try{M.set(c,a)}catch(m){if(!(m instanceof TypeError))throw m;if("function"==typeof WebAssembly.Function){e=WebAssembly.Function;f={i:"i32",j:"i64",f:"f32",d:"f64",p:"i32"};for(var g={parameters:[],results:"v"==
b[0]?[]:[f[b[0]]]},k=1;k<b.length;++k)g.parameters.push(f[b[k]]);b=new e(g,a)}else{e=[1,96];f=b.slice(0,1);b=b.slice(1);g={i:127,p:127,j:126,f:125,d:124};e=e.concat(Ba(b.length));for(k=0;k<b.length;++k)e.push(g[b[k]]);"v"==f?e.push(0):e=e.concat([1,g[f]]);e=[1].concat(Ba(e.length),e);b=new Uint8Array([0,97,115,109,1,0,0,0].concat(e,[2,7,1,1,101,1,102,0,0,7,5,1,1,102,0,0]));b=new WebAssembly.Module(b);b=(new WebAssembly.Instance(b,{e:{f:a}})).exports.f}M.set(c,b)}Da.set(a,c);return c}
function ma(a){Da.delete(M.get(a));Ca.push(a)}var Ea;Module.wasmBinary&&(Ea=Module.wasmBinary);var noExitRuntime=Module.noExitRuntime||!0;"object"!=typeof WebAssembly&&O("no native wasm support detected");var Fa,Ga=!1;
function Ha(a,b,c,e){var f={string:function(q){var n=0;if(null!==q&&void 0!==q&&0!==q){var u=(q.length<<2)+1;n=A(u);d(q,r,n,u)}return n},array:function(q){var n=A(q.length);C.set(q,n);return n}};a=Module["_"+a];var g=[],k=0;if(e)for(var m=0;m<e.length;m++){var p=f[c[m]];p?(0===k&&(k=ja()),g[m]=p(e[m])):g[m]=e[m]}c=a.apply(null,g);return c=function(q){0!==k&&la(k);return"string"===b?J(q):"boolean"===b?!!q:q}(c)}var Ia=0,Ka=1;
function fa(a){var b=Ia==Ka?A(a.length):da(a.length);a.subarray||a.slice||(a=new Uint8Array(a));r.set(a,b);return b}var La="undefined"!=typeof TextDecoder?new TextDecoder("utf8"):void 0;
function Ma(a,b,c){var e=b+c;for(c=b;a[c]&&!(c>=e);)++c;if(16<c-b&&a.buffer&&La)return La.decode(a.subarray(b,c));for(e="";b<c;){var f=a[b++];if(f&128){var g=a[b++]&63;if(192==(f&224))e+=String.fromCharCode((f&31)<<6|g);else{var k=a[b++]&63;f=224==(f&240)?(f&15)<<12|g<<6|k:(f&7)<<18|g<<12|k<<6|a[b++]&63;65536>f?e+=String.fromCharCode(f):(f-=65536,e+=String.fromCharCode(55296|f>>10,56320|f&1023))}}else e+=String.fromCharCode(f)}return e}function J(a,b){return a?Ma(r,a,b):""}
function d(a,b,c,e){if(!(0<e))return 0;var f=c;e=c+e-1;for(var g=0;g<a.length;++g){var k=a.charCodeAt(g);if(55296<=k&&57343>=k){var m=a.charCodeAt(++g);k=65536+((k&1023)<<10)|m&1023}if(127>=k){if(c>=e)break;b[c++]=k}else{if(2047>=k){if(c+1>=e)break;b[c++]=192|k>>6}else{if(65535>=k){if(c+2>=e)break;b[c++]=224|k>>12}else{if(c+3>=e)break;b[c++]=240|k>>18;b[c++]=128|k>>12&63}b[c++]=128|k>>6&63}b[c++]=128|k&63}}b[c]=0;return c-f}
function aa(a){for(var b=0,c=0;c<a.length;++c){var e=a.charCodeAt(c);55296<=e&&57343>=e&&(e=65536+((e&1023)<<10)|a.charCodeAt(++c)&1023);127>=e?++b:b=2047>=e?b+2:65535>=e?b+3:b+4}return b}function Na(a){var b=aa(a)+1,c=da(b);c&&d(a,C,c,b);return c}var Oa,C,r,Pa,P,Q,Qa,Ra;
function Sa(){var a=Fa.buffer;Oa=a;Module.HEAP8=C=new Int8Array(a);Module.HEAP16=Pa=new Int16Array(a);Module.HEAP32=P=new Int32Array(a);Module.HEAPU8=r=new Uint8Array(a);Module.HEAPU16=new Uint16Array(a);Module.HEAPU32=Q=new Uint32Array(a);Module.HEAPF32=Qa=new Float32Array(a);Module.HEAPF64=Ra=new Float64Array(a)}var M,Ta=[],Ua=[],Va=[];function Wa(){var a=Module.preRun.shift();Ta.unshift(a)}var Xa=0,Ya=null,Za=null;
function $a(){Xa++;Module.monitorRunDependencies&&Module.monitorRunDependencies(Xa)}function eb(){Xa--;Module.monitorRunDependencies&&Module.monitorRunDependencies(Xa);if(0==Xa&&(null!==Ya&&(clearInterval(Ya),Ya=null),Za)){var a=Za;Za=null;a()}}function O(a){if(Module.onAbort)Module.onAbort(a);a="Aborted("+a+")";L(a);Ga=!0;throw new WebAssembly.RuntimeError(a+". Build with -sASSERTIONS for more info.");}function fb(){return R.startsWith("data:application/octet-stream;base64,")}var R;R="sql-wasm.wasm";
if(!fb()){var gb=R;R=Module.locateFile?Module.locateFile(gb,K):K+gb}function hb(){var a=R;try{if(a==R&&Ea)return new Uint8Array(Ea);if(wa)return wa(a);throw"both async and sync fetching of the wasm failed";}catch(b){O(b)}}
function ib(){if(!Ea&&(ra||sa)){if("function"==typeof fetch&&!R.startsWith("file://"))return fetch(R,{credentials:"same-origin"}).then(function(a){if(!a.ok)throw"failed to load wasm binary file at '"+R+"'";return a.arrayBuffer()}).catch(function(){return hb()});if(va)return new Promise(function(a,b){va(R,function(c){a(new Uint8Array(c))},b)})}return Promise.resolve().then(function(){return hb()})}var S,T;
function jb(a){for(;0<a.length;){var b=a.shift();if("function"==typeof b)b(Module);else{var c=b.bd;"number"==typeof c?void 0===b.qb?M.get(c)():M.get(c)(b.qb):c(void 0===b.qb?null:b.qb)}}}function z(a,b="i8"){b.endsWith("*")&&(b="i32");switch(b){case "i1":return C[a>>0];case "i8":return C[a>>0];case "i16":return Pa[a>>1];case "i32":return P[a>>2];case "i64":return P[a>>2];case "float":return Qa[a>>2];case "double":return Number(Ra[a>>3]);default:O("invalid type for getValue: "+b)}return null}
function ka(a){var b="i32";b.endsWith("*")&&(b="i32");switch(b){case "i1":C[a>>0]=0;break;case "i8":C[a>>0]=0;break;case "i16":Pa[a>>1]=0;break;case "i32":P[a>>2]=0;break;case "i64":T=[0,(S=0,1<=+Math.abs(S)?0<S?(Math.min(+Math.floor(S/4294967296),4294967295)|0)>>>0:~~+Math.ceil((S-+(~~S>>>0))/4294967296)>>>0:0)];P[a>>2]=T[0];P[a+4>>2]=T[1];break;case "float":Qa[a>>2]=0;break;case "double":Ra[a>>3]=0;break;default:O("invalid type for setValue: "+b)}}
var kb=(a,b)=>{for(var c=0,e=a.length-1;0<=e;e--){var f=a[e];"."===f?a.splice(e,1):".."===f?(a.splice(e,1),c++):c&&(a.splice(e,1),c--)}if(b)for(;c;c--)a.unshift("..");return a},U=a=>{var b="/"===a.charAt(0),c="/"===a.substr(-1);(a=kb(a.split("/").filter(e=>!!e),!b).join("/"))||b||(a=".");a&&c&&(a+="/");return(b?"/":"")+a},lb=a=>{var b=/^(\/?|)([\s\S]*?)((?:\.{1,2}|[^\/]+?|)(\.[^.\/]*|))(?:[\/]*)$/.exec(a).slice(1);a=b[0];b=b[1];if(!a&&!b)return".";b&&(b=b.substr(0,b.length-1));return a+b},X=a=>{if("/"===
a)return"/";a=U(a);a=a.replace(/\/$/,"");var b=a.lastIndexOf("/");return-1===b?a:a.substr(b+1)},mb=(a,b)=>U(a+"/"+b);function nb(){if("object"==typeof crypto&&"function"==typeof crypto.getRandomValues){var a=new Uint8Array(1);return function(){crypto.getRandomValues(a);return a[0]}}if(ta)try{var b=require("crypto");return function(){return b.randomBytes(1)[0]}}catch(c){}return function(){O("randomDevice")}}
function ob(){for(var a="",b=!1,c=arguments.length-1;-1<=c&&!b;c--){b=0<=c?arguments[c]:t.cwd();if("string"!=typeof b)throw new TypeError("Arguments to path.resolve must be strings");if(!b)return"";a=b+"/"+a;b="/"===b.charAt(0)}a=kb(a.split("/").filter(e=>!!e),!b).join("/");return(b?"/":"")+a||"."}
var pb=(a,b)=>{function c(k){for(var m=0;m<k.length&&""===k[m];m++);for(var p=k.length-1;0<=p&&""===k[p];p--);return m>p?[]:k.slice(m,p-m+1)}a=ob(a).substr(1);b=ob(b).substr(1);a=c(a.split("/"));b=c(b.split("/"));for(var e=Math.min(a.length,b.length),f=e,g=0;g<e;g++)if(a[g]!==b[g]){f=g;break}e=[];for(g=f;g<a.length;g++)e.push("..");e=e.concat(b.slice(f));return e.join("/")},qb=[];function rb(a,b){qb[a]={input:[],output:[],$a:b};t.Jb(a,sb)}
var sb={open:function(a){var b=qb[a.node.rdev];if(!b)throw new t.ErrnoError(43);a.tty=b;a.seekable=!1},close:function(a){a.tty.$a.flush(a.tty)},flush:function(a){a.tty.$a.flush(a.tty)},read:function(a,b,c,e){if(!a.tty||!a.tty.$a.$b)throw new t.ErrnoError(60);for(var f=0,g=0;g<e;g++){try{var k=a.tty.$a.$b(a.tty)}catch(m){throw new t.ErrnoError(29);}if(void 0===k&&0===f)throw new t.ErrnoError(6);if(null===k||void 0===k)break;f++;b[c+g]=k}f&&(a.node.timestamp=Date.now());return f},write:function(a,b,
c,e){if(!a.tty||!a.tty.$a.Gb)throw new t.ErrnoError(60);try{for(var f=0;f<e;f++)a.tty.$a.Gb(a.tty,b[c+f])}catch(g){throw new t.ErrnoError(29);}e&&(a.node.timestamp=Date.now());return f}},tb={$b:function(a){if(!a.input.length){var b=null;if(ta){var c=Buffer.alloc(256),e=0;try{e=fs.readSync(process.stdin.fd,c,0,256,-1)}catch(f){if(f.toString().includes("EOF"))e=0;else throw f;}0<e?b=c.slice(0,e).toString("utf-8"):b=null}else"undefined"!=typeof window&&"function"==typeof window.prompt?(b=window.prompt("Input: "),
null!==b&&(b+="\n")):"function"==typeof readline&&(b=readline(),null!==b&&(b+="\n"));if(!b)return null;a.input=ea(b,!0)}return a.input.shift()},Gb:function(a,b){null===b||10===b?(Aa(Ma(a.output,0)),a.output=[]):0!=b&&a.output.push(b)},flush:function(a){a.output&&0<a.output.length&&(Aa(Ma(a.output,0)),a.output=[])}},ub={Gb:function(a,b){null===b||10===b?(L(Ma(a.output,0)),a.output=[]):0!=b&&a.output.push(b)},flush:function(a){a.output&&0<a.output.length&&(L(Ma(a.output,0)),a.output=[])}};
function vb(a){a=65536*Math.ceil(a/65536);var b=wb(65536,a);if(!b)return 0;r.fill(0,b,b+a);return b}
var Y={Oa:null,mount:function(){return Y.createNode(null,"/",16895,0)},createNode:function(a,b,c,e){if(t.Jc(c)||t.isFIFO(c))throw new t.ErrnoError(63);Y.Oa||(Y.Oa={dir:{node:{getattr:Y.node_ops.getattr,setattr:Y.node_ops.setattr,lookup:Y.node_ops.lookup,mknod:Y.node_ops.mknod,rename:Y.node_ops.rename,unlink:Y.node_ops.unlink,rmdir:Y.node_ops.rmdir,readdir:Y.node_ops.readdir,symlink:Y.node_ops.symlink},stream:{llseek:Y.stream_ops.llseek}},file:{node:{getattr:Y.node_ops.getattr,setattr:Y.node_ops.setattr},
stream:{llseek:Y.stream_ops.llseek,read:Y.stream_ops.read,write:Y.stream_ops.write,allocate:Y.stream_ops.allocate,mmap:Y.stream_ops.mmap,msync:Y.stream_ops.msync}},link:{node:{getattr:Y.node_ops.getattr,setattr:Y.node_ops.setattr,readlink:Y.node_ops.readlink},stream:{}},Rb:{node:{getattr:Y.node_ops.getattr,setattr:Y.node_ops.setattr},stream:t.vc}});c=t.createNode(a,b,c,e);t.isDir(c.mode)?(c.node_ops=Y.Oa.dir.node,c.stream_ops=Y.Oa.dir.stream,c.Ha={}):t.isFile(c.mode)?(c.node_ops=Y.Oa.file.node,c.stream_ops=
Y.Oa.file.stream,c.La=0,c.Ha=null):t.Za(c.mode)?(c.node_ops=Y.Oa.link.node,c.stream_ops=Y.Oa.link.stream):t.jb(c.mode)&&(c.node_ops=Y.Oa.Rb.node,c.stream_ops=Y.Oa.Rb.stream);c.timestamp=Date.now();a&&(a.Ha[b]=c,a.timestamp=c.timestamp);return c},cd:function(a){return a.Ha?a.Ha.subarray?a.Ha.subarray(0,a.La):new Uint8Array(a.Ha):new Uint8Array(0)},Wb:function(a,b){var c=a.Ha?a.Ha.length:0;c>=b||(b=Math.max(b,c*(1048576>c?2:1.125)>>>0),0!=c&&(b=Math.max(b,256)),c=a.Ha,a.Ha=new Uint8Array(b),0<a.La&&
a.Ha.set(c.subarray(0,a.La),0))},Uc:function(a,b){if(a.La!=b)if(0==b)a.Ha=null,a.La=0;else{var c=a.Ha;a.Ha=new Uint8Array(b);c&&a.Ha.set(c.subarray(0,Math.min(b,a.La)));a.La=b}},node_ops:{getattr:function(a){var b={};b.dev=t.jb(a.mode)?a.id:1;b.ino=a.id;b.mode=a.mode;b.nlink=1;b.uid=0;b.gid=0;b.rdev=a.rdev;t.isDir(a.mode)?b.size=4096:t.isFile(a.mode)?b.size=a.La:t.Za(a.mode)?b.size=a.link.length:b.size=0;b.atime=new Date(a.timestamp);b.mtime=new Date(a.timestamp);b.ctime=new Date(a.timestamp);b.sc=
4096;b.blocks=Math.ceil(b.size/b.sc);return b},setattr:function(a,b){void 0!==b.mode&&(a.mode=b.mode);void 0!==b.timestamp&&(a.timestamp=b.timestamp);void 0!==b.size&&Y.Uc(a,b.size)},lookup:function(){throw t.wb[44];},mknod:function(a,b,c,e){return Y.createNode(a,b,c,e)},rename:function(a,b,c){if(t.isDir(a.mode)){try{var e=t.lookupNode(b,c)}catch(g){}if(e)for(var f in e.Ha)throw new t.ErrnoError(55);}delete a.parent.Ha[a.name];a.parent.timestamp=Date.now();a.name=c;b.Ha[c]=a;b.timestamp=a.parent.timestamp;
a.parent=b},unlink:function(a,b){delete a.Ha[b];a.timestamp=Date.now()},rmdir:function(a,b){var c=t.lookupNode(a,b),e;for(e in c.Ha)throw new t.ErrnoError(55);delete a.Ha[b];a.timestamp=Date.now()},readdir:function(a){var b=[".",".."],c;for(c in a.Ha)a.Ha.hasOwnProperty(c)&&b.push(c);return b},symlink:function(a,b,c){a=Y.createNode(a,b,41471,0);a.link=c;return a},readlink:function(a){if(!t.Za(a.mode))throw new t.ErrnoError(28);return a.link}},stream_ops:{read:function(a,b,c,e,f){var g=a.node.Ha;if(f>=
a.node.La)return 0;a=Math.min(a.node.La-f,e);if(8<a&&g.subarray)b.set(g.subarray(f,f+a),c);else for(e=0;e<a;e++)b[c+e]=g[f+e];return a},write:function(a,b,c,e,f,g){b.buffer===C.buffer&&(g=!1);if(!e)return 0;a=a.node;a.timestamp=Date.now();if(b.subarray&&(!a.Ha||a.Ha.subarray)){if(g)return a.Ha=b.subarray(c,c+e),a.La=e;if(0===a.La&&0===f)return a.Ha=b.slice(c,c+e),a.La=e;if(f+e<=a.La)return a.Ha.set(b.subarray(c,c+e),f),e}Y.Wb(a,f+e);if(a.Ha.subarray&&b.subarray)a.Ha.set(b.subarray(c,c+e),f);else for(g=
0;g<e;g++)a.Ha[f+g]=b[c+g];a.La=Math.max(a.La,f+e);return e},llseek:function(a,b,c){1===c?b+=a.position:2===c&&t.isFile(a.node.mode)&&(b+=a.node.La);if(0>b)throw new t.ErrnoError(28);return b},allocate:function(a,b,c){Y.Wb(a.node,b+c);a.node.La=Math.max(a.node.La,b+c)},mmap:function(a,b,c,e,f){if(!t.isFile(a.node.mode))throw new t.ErrnoError(43);a=a.node.Ha;if(f&2||a.buffer!==Oa){if(0<c||c+b<a.length)a.subarray?a=a.subarray(c,c+b):a=Array.prototype.slice.call(a,c,c+b);c=!0;b=vb(b);if(!b)throw new t.ErrnoError(48);
C.set(a,b)}else c=!1,b=a.byteOffset;return{hc:b,Mb:c}},msync:function(a,b,c,e,f){if(!t.isFile(a.node.mode))throw new t.ErrnoError(43);if(f&2)return 0;Y.stream_ops.write(a,b,0,e,c,!1);return 0}}};function xb(a,b,c){var e="al "+a;va(a,function(f){f||O('Loading data file "'+a+'" failed (no arrayBuffer).');b(new Uint8Array(f));e&&eb()},function(){if(c)c();else throw'Loading data file "'+a+'" failed.';});e&&$a()}
var t={root:null,fb:[],Ub:{},streams:[],Pc:1,Na:null,Tb:"/",Ab:!1,dc:!0,ErrnoError:null,wb:{},Dc:null,nb:0,lookupPath:(a,b={})=>{a=ob(t.cwd(),a);if(!a)return{path:"",node:null};b=Object.assign({ub:!0,Ib:0},b);if(8<b.Ib)throw new t.ErrnoError(32);a=kb(a.split("/").filter(k=>!!k),!1);for(var c=t.root,e="/",f=0;f<a.length;f++){var g=f===a.length-1;if(g&&b.parent)break;c=t.lookupNode(c,a[f]);e=U(e+"/"+a[f]);t.Va(c)&&(!g||g&&b.ub)&&(c=c.eb.root);if(!g||b.Ma)for(g=0;t.Za(c.mode);)if(c=t.readlink(e),e=ob(lb(e),
c),c=t.lookupPath(e,{Ib:b.Ib+1}).node,40<g++)throw new t.ErrnoError(32);}return{path:e,node:c}},Sa:a=>{for(var b;;){if(t.isRoot(a))return a=a.mount.fc,b?"/"!==a[a.length-1]?a+"/"+b:a+b:a;b=b?a.name+"/"+b:a.name;a=a.parent}},zb:(a,b)=>{for(var c=0,e=0;e<b.length;e++)c=(c<<5)-c+b.charCodeAt(e)|0;return(a+c>>>0)%t.Na.length},bc:a=>{var b=t.zb(a.parent.id,a.name);a.Xa=t.Na[b];t.Na[b]=a},cc:a=>{var b=t.zb(a.parent.id,a.name);if(t.Na[b]===a)t.Na[b]=a.Xa;else for(b=t.Na[b];b;){if(b.Xa===a){b.Xa=a.Xa;break}b=
b.Xa}},lookupNode:(a,b)=>{var c=t.Lc(a);if(c)throw new t.ErrnoError(c,a);for(c=t.Na[t.zb(a.id,b)];c;c=c.Xa){var e=c.name;if(c.parent.id===a.id&&e===b)return c}return t.lookup(a,b)},createNode:(a,b,c,e)=>{a=new t.FSNode(a,b,c,e);t.bc(a);return a},sb:a=>{t.cc(a)},isRoot:a=>a===a.parent,Va:a=>!!a.eb,isFile:a=>32768===(a&61440),isDir:a=>16384===(a&61440),Za:a=>40960===(a&61440),jb:a=>8192===(a&61440),Jc:a=>24576===(a&61440),isFIFO:a=>4096===(a&61440),isSocket:a=>49152===(a&49152),Ec:{r:0,"r+":2,w:577,
"w+":578,a:1089,"a+":1090},Oc:a=>{var b=t.Ec[a];if("undefined"==typeof b)throw Error("Unknown file open mode: "+a);return b},Xb:a=>{var b=["r","w","rw"][a&3];a&512&&(b+="w");return b},Ua:(a,b)=>{if(t.dc)return 0;if(!b.includes("r")||a.mode&292){if(b.includes("w")&&!(a.mode&146)||b.includes("x")&&!(a.mode&73))return 2}else return 2;return 0},Lc:a=>{var b=t.Ua(a,"x");return b?b:a.node_ops.lookup?0:2},Eb:(a,b)=>{try{return t.lookupNode(a,b),20}catch(c){}return t.Ua(a,"wx")},kb:(a,b,c)=>{try{var e=t.lookupNode(a,
b)}catch(f){return f.Ia}if(a=t.Ua(a,"wx"))return a;if(c){if(!t.isDir(e.mode))return 54;if(t.isRoot(e)||t.Sa(e)===t.cwd())return 10}else if(t.isDir(e.mode))return 31;return 0},Mc:(a,b)=>a?t.Za(a.mode)?32:t.isDir(a.mode)&&("r"!==t.Xb(b)||b&512)?31:t.Ua(a,t.Xb(b)):44,lc:4096,Qc:(a=0,b=t.lc)=>{for(;a<=b;a++)if(!t.streams[a])return a;throw new t.ErrnoError(33);},Ta:a=>t.streams[a],Sb:(a,b,c)=>{t.hb||(t.hb=function(){this.Pa={}},t.hb.prototype={},Object.defineProperties(t.hb.prototype,{object:{get:function(){return this.node},
set:function(e){this.node=e}},flags:{get:function(){return this.Pa.flags},set:function(e){this.Pa.flags=e}},position:{get:function(){return this.Pa.position},set:function(e){this.Pa.position=e}}}));a=Object.assign(new t.hb,a);b=t.Qc(b,c);a.fd=b;return t.streams[b]=a},wc:a=>{t.streams[a]=null},vc:{open:a=>{a.stream_ops=t.Hc(a.node.rdev).stream_ops;a.stream_ops.open&&a.stream_ops.open(a)},llseek:()=>{throw new t.ErrnoError(70);}},Db:a=>a>>8,gd:a=>a&255,Wa:(a,b)=>a<<8|b,Jb:(a,b)=>{t.Ub[a]={stream_ops:b}},
Hc:a=>t.Ub[a],Yb:a=>{var b=[];for(a=[a];a.length;){var c=a.pop();b.push(c);a.push.apply(a,c.fb)}return b},jc:(a,b)=>{function c(k){t.nb--;return b(k)}function e(k){if(k){if(!e.Cc)return e.Cc=!0,c(k)}else++g>=f.length&&c(null)}"function"==typeof a&&(b=a,a=!1);t.nb++;1<t.nb&&L("warning: "+t.nb+" FS.syncfs operations in flight at once, probably just doing extra work");var f=t.Yb(t.root.mount),g=0;f.forEach(k=>{if(!k.type.jc)return e(null);k.type.jc(k,a,e)})},mount:(a,b,c)=>{var e="/"===c,f=!c;if(e&&
t.root)throw new t.ErrnoError(10);if(!e&&!f){var g=t.lookupPath(c,{ub:!1});c=g.path;g=g.node;if(t.Va(g))throw new t.ErrnoError(10);if(!t.isDir(g.mode))throw new t.ErrnoError(54);}b={type:a,kd:b,fc:c,fb:[]};a=a.mount(b);a.mount=b;b.root=a;e?t.root=a:g&&(g.eb=b,g.mount&&g.mount.fb.push(b));return a},nd:a=>{a=t.lookupPath(a,{ub:!1});if(!t.Va(a.node))throw new t.ErrnoError(28);a=a.node;var b=a.eb,c=t.Yb(b);Object.keys(t.Na).forEach(e=>{for(e=t.Na[e];e;){var f=e.Xa;c.includes(e.mount)&&t.sb(e);e=f}});
a.eb=null;a.mount.fb.splice(a.mount.fb.indexOf(b),1)},lookup:(a,b)=>a.node_ops.lookup(a,b),mknod:(a,b,c)=>{var e=t.lookupPath(a,{parent:!0}).node;a=X(a);if(!a||"."===a||".."===a)throw new t.ErrnoError(28);var f=t.Eb(e,a);if(f)throw new t.ErrnoError(f);if(!e.node_ops.mknod)throw new t.ErrnoError(63);return e.node_ops.mknod(e,a,b,c)},create:(a,b)=>t.mknod(a,(void 0!==b?b:438)&4095|32768,0),mkdir:(a,b)=>t.mknod(a,(void 0!==b?b:511)&1023|16384,0),hd:(a,b)=>{a=a.split("/");for(var c="",e=0;e<a.length;++e)if(a[e]){c+=
"/"+a[e];try{t.mkdir(c,b)}catch(f){if(20!=f.Ia)throw f;}}},lb:(a,b,c)=>{"undefined"==typeof c&&(c=b,b=438);return t.mknod(a,b|8192,c)},symlink:(a,b)=>{if(!ob(a))throw new t.ErrnoError(44);var c=t.lookupPath(b,{parent:!0}).node;if(!c)throw new t.ErrnoError(44);b=X(b);var e=t.Eb(c,b);if(e)throw new t.ErrnoError(e);if(!c.node_ops.symlink)throw new t.ErrnoError(63);return c.node_ops.symlink(c,b,a)},rename:(a,b)=>{var c=lb(a),e=lb(b),f=X(a),g=X(b);var k=t.lookupPath(a,{parent:!0});var m=k.node;k=t.lookupPath(b,
{parent:!0});k=k.node;if(!m||!k)throw new t.ErrnoError(44);if(m.mount!==k.mount)throw new t.ErrnoError(75);var p=t.lookupNode(m,f);a=pb(a,e);if("."!==a.charAt(0))throw new t.ErrnoError(28);a=pb(b,c);if("."!==a.charAt(0))throw new t.ErrnoError(55);try{var q=t.lookupNode(k,g)}catch(n){}if(p!==q){b=t.isDir(p.mode);if(f=t.kb(m,f,b))throw new t.ErrnoError(f);if(f=q?t.kb(k,g,b):t.Eb(k,g))throw new t.ErrnoError(f);if(!m.node_ops.rename)throw new t.ErrnoError(63);if(t.Va(p)||q&&t.Va(q))throw new t.ErrnoError(10);
if(k!==m&&(f=t.Ua(m,"w")))throw new t.ErrnoError(f);t.cc(p);try{m.node_ops.rename(p,k,g)}catch(n){throw n;}finally{t.bc(p)}}},rmdir:a=>{var b=t.lookupPath(a,{parent:!0}).node;a=X(a);var c=t.lookupNode(b,a),e=t.kb(b,a,!0);if(e)throw new t.ErrnoError(e);if(!b.node_ops.rmdir)throw new t.ErrnoError(63);if(t.Va(c))throw new t.ErrnoError(10);b.node_ops.rmdir(b,a);t.sb(c)},readdir:a=>{a=t.lookupPath(a,{Ma:!0}).node;if(!a.node_ops.readdir)throw new t.ErrnoError(54);return a.node_ops.readdir(a)},unlink:a=>
{var b=t.lookupPath(a,{parent:!0}).node;if(!b)throw new t.ErrnoError(44);a=X(a);var c=t.lookupNode(b,a),e=t.kb(b,a,!1);if(e)throw new t.ErrnoError(e);if(!b.node_ops.unlink)throw new t.ErrnoError(63);if(t.Va(c))throw new t.ErrnoError(10);b.node_ops.unlink(b,a);t.sb(c)},readlink:a=>{a=t.lookupPath(a).node;if(!a)throw new t.ErrnoError(44);if(!a.node_ops.readlink)throw new t.ErrnoError(28);return ob(t.Sa(a.parent),a.node_ops.readlink(a))},stat:(a,b)=>{a=t.lookupPath(a,{Ma:!b}).node;if(!a)throw new t.ErrnoError(44);
if(!a.node_ops.getattr)throw new t.ErrnoError(63);return a.node_ops.getattr(a)},lstat:a=>t.stat(a,!0),chmod:(a,b,c)=>{a="string"==typeof a?t.lookupPath(a,{Ma:!c}).node:a;if(!a.node_ops.setattr)throw new t.ErrnoError(63);a.node_ops.setattr(a,{mode:b&4095|a.mode&-4096,timestamp:Date.now()})},lchmod:(a,b)=>{t.chmod(a,b,!0)},fchmod:(a,b)=>{a=t.Ta(a);if(!a)throw new t.ErrnoError(8);t.chmod(a.node,b)},chown:(a,b,c,e)=>{a="string"==typeof a?t.lookupPath(a,{Ma:!e}).node:a;if(!a.node_ops.setattr)throw new t.ErrnoError(63);
a.node_ops.setattr(a,{timestamp:Date.now()})},lchown:(a,b,c)=>{t.chown(a,b,c,!0)},fchown:(a,b,c)=>{a=t.Ta(a);if(!a)throw new t.ErrnoError(8);t.chown(a.node,b,c)},truncate:(a,b)=>{if(0>b)throw new t.ErrnoError(28);a="string"==typeof a?t.lookupPath(a,{Ma:!0}).node:a;if(!a.node_ops.setattr)throw new t.ErrnoError(63);if(t.isDir(a.mode))throw new t.ErrnoError(31);if(!t.isFile(a.mode))throw new t.ErrnoError(28);var c=t.Ua(a,"w");if(c)throw new t.ErrnoError(c);a.node_ops.setattr(a,{size:b,timestamp:Date.now()})},
Fc:(a,b)=>{a=t.Ta(a);if(!a)throw new t.ErrnoError(8);if(0===(a.flags&2097155))throw new t.ErrnoError(28);t.truncate(a.node,b)},Xc:(a,b,c)=>{a=t.lookupPath(a,{Ma:!0}).node;a.node_ops.setattr(a,{timestamp:Math.max(b,c)})},open:(a,b,c)=>{if(""===a)throw new t.ErrnoError(44);b="string"==typeof b?t.Oc(b):b;c=b&64?("undefined"==typeof c?438:c)&4095|32768:0;if("object"==typeof a)var e=a;else{a=U(a);try{e=t.lookupPath(a,{Ma:!(b&131072)}).node}catch(g){}}var f=!1;if(b&64)if(e){if(b&128)throw new t.ErrnoError(20);
}else e=t.mknod(a,c,0),f=!0;if(!e)throw new t.ErrnoError(44);t.jb(e.mode)&&(b&=-513);if(b&65536&&!t.isDir(e.mode))throw new t.ErrnoError(54);if(!f&&(c=t.Mc(e,b)))throw new t.ErrnoError(c);b&512&&!f&&t.truncate(e,0);b&=-131713;e=t.Sb({node:e,path:t.Sa(e),flags:b,seekable:!0,position:0,stream_ops:e.stream_ops,Wc:[],error:!1});e.stream_ops.open&&e.stream_ops.open(e);!Module.logReadFiles||b&1||(t.Hb||(t.Hb={}),a in t.Hb||(t.Hb[a]=1));return e},close:a=>{if(t.cb(a))throw new t.ErrnoError(8);a.yb&&(a.yb=
null);try{a.stream_ops.close&&a.stream_ops.close(a)}catch(b){throw b;}finally{t.wc(a.fd)}a.fd=null},cb:a=>null===a.fd,llseek:(a,b,c)=>{if(t.cb(a))throw new t.ErrnoError(8);if(!a.seekable||!a.stream_ops.llseek)throw new t.ErrnoError(70);if(0!=c&&1!=c&&2!=c)throw new t.ErrnoError(28);a.position=a.stream_ops.llseek(a,b,c);a.Wc=[];return a.position},read:(a,b,c,e,f)=>{if(0>e||0>f)throw new t.ErrnoError(28);if(t.cb(a))throw new t.ErrnoError(8);if(1===(a.flags&2097155))throw new t.ErrnoError(8);if(t.isDir(a.node.mode))throw new t.ErrnoError(31);
if(!a.stream_ops.read)throw new t.ErrnoError(28);var g="undefined"!=typeof f;if(!g)f=a.position;else if(!a.seekable)throw new t.ErrnoError(70);b=a.stream_ops.read(a,b,c,e,f);g||(a.position+=b);return b},write:(a,b,c,e,f,g)=>{if(0>e||0>f)throw new t.ErrnoError(28);if(t.cb(a))throw new t.ErrnoError(8);if(0===(a.flags&2097155))throw new t.ErrnoError(8);if(t.isDir(a.node.mode))throw new t.ErrnoError(31);if(!a.stream_ops.write)throw new t.ErrnoError(28);a.seekable&&a.flags&1024&&t.llseek(a,0,2);var k=
"undefined"!=typeof f;if(!k)f=a.position;else if(!a.seekable)throw new t.ErrnoError(70);b=a.stream_ops.write(a,b,c,e,f,g);k||(a.position+=b);return b},allocate:(a,b,c)=>{if(t.cb(a))throw new t.ErrnoError(8);if(0>b||0>=c)throw new t.ErrnoError(28);if(0===(a.flags&2097155))throw new t.ErrnoError(8);if(!t.isFile(a.node.mode)&&!t.isDir(a.node.mode))throw new t.ErrnoError(43);if(!a.stream_ops.allocate)throw new t.ErrnoError(138);a.stream_ops.allocate(a,b,c)},mmap:(a,b,c,e,f)=>{if(0!==(e&2)&&0===(f&2)&&
2!==(a.flags&2097155))throw new t.ErrnoError(2);if(1===(a.flags&2097155))throw new t.ErrnoError(2);if(!a.stream_ops.mmap)throw new t.ErrnoError(43);return a.stream_ops.mmap(a,b,c,e,f)},msync:(a,b,c,e,f)=>a&&a.stream_ops.msync?a.stream_ops.msync(a,b,c,e,f):0,jd:()=>0,ec:(a,b,c)=>{if(!a.stream_ops.ec)throw new t.ErrnoError(59);return a.stream_ops.ec(a,b,c)},readFile:(a,b={})=>{b.flags=b.flags||0;b.encoding=b.encoding||"binary";if("utf8"!==b.encoding&&"binary"!==b.encoding)throw Error('Invalid encoding type "'+
b.encoding+'"');var c,e=t.open(a,b.flags);a=t.stat(a).size;var f=new Uint8Array(a);t.read(e,f,0,a,0);"utf8"===b.encoding?c=Ma(f,0):"binary"===b.encoding&&(c=f);t.close(e);return c},writeFile:(a,b,c={})=>{c.flags=c.flags||577;a=t.open(a,c.flags,c.mode);if("string"==typeof b){var e=new Uint8Array(aa(b)+1);b=d(b,e,0,e.length);t.write(a,e,0,b,void 0,c.uc)}else if(ArrayBuffer.isView(b))t.write(a,b,0,b.byteLength,void 0,c.uc);else throw Error("Unsupported data type");t.close(a)},cwd:()=>t.Tb,chdir:a=>{a=
t.lookupPath(a,{Ma:!0});if(null===a.node)throw new t.ErrnoError(44);if(!t.isDir(a.node.mode))throw new t.ErrnoError(54);var b=t.Ua(a.node,"x");if(b)throw new t.ErrnoError(b);t.Tb=a.path},yc:()=>{t.mkdir("/tmp");t.mkdir("/home");t.mkdir("/home/web_user")},xc:()=>{t.mkdir("/dev");t.Jb(t.Wa(1,3),{read:()=>0,write:(b,c,e,f)=>f});t.lb("/dev/null",t.Wa(1,3));rb(t.Wa(5,0),tb);rb(t.Wa(6,0),ub);t.lb("/dev/tty",t.Wa(5,0));t.lb("/dev/tty1",t.Wa(6,0));var a=nb();t.Qa("/dev","random",a);t.Qa("/dev","urandom",
a);t.mkdir("/dev/shm");t.mkdir("/dev/shm/tmp")},Ac:()=>{t.mkdir("/proc");var a=t.mkdir("/proc/self");t.mkdir("/proc/self/fd");t.mount({mount:()=>{var b=t.createNode(a,"fd",16895,73);b.node_ops={lookup:(c,e)=>{var f=t.Ta(+e);if(!f)throw new t.ErrnoError(8);c={parent:null,mount:{fc:"fake"},node_ops:{readlink:()=>f.path}};return c.parent=c}};return b}},{},"/proc/self/fd")},Bc:()=>{Module.stdin?t.Qa("/dev","stdin",Module.stdin):t.symlink("/dev/tty","/dev/stdin");Module.stdout?t.Qa("/dev","stdout",null,
Module.stdout):t.symlink("/dev/tty","/dev/stdout");Module.stderr?t.Qa("/dev","stderr",null,Module.stderr):t.symlink("/dev/tty1","/dev/stderr");t.open("/dev/stdin",0);t.open("/dev/stdout",1);t.open("/dev/stderr",1)},Vb:()=>{t.ErrnoError||(t.ErrnoError=function(a,b){this.node=b;this.Vc=function(c){this.Ia=c};this.Vc(a);this.message="FS error"},t.ErrnoError.prototype=Error(),t.ErrnoError.prototype.constructor=t.ErrnoError,[44].forEach(a=>{t.wb[a]=new t.ErrnoError(a);t.wb[a].stack="<generic error, no stack>"}))},
ic:()=>{t.Vb();t.Na=Array(4096);t.mount(Y,{},"/");t.yc();t.xc();t.Ac();t.Dc={MEMFS:Y}},ib:(a,b,c)=>{t.ib.Ab=!0;t.Vb();Module.stdin=a||Module.stdin;Module.stdout=b||Module.stdout;Module.stderr=c||Module.stderr;t.Bc()},ld:()=>{t.ib.Ab=!1;for(var a=0;a<t.streams.length;a++){var b=t.streams[a];b&&t.close(b)}},xb:(a,b)=>{var c=0;a&&(c|=365);b&&(c|=146);return c},ad:(a,b)=>{a=t.pb(a,b);return a.exists?a.object:null},pb:(a,b)=>{try{var c=t.lookupPath(a,{Ma:!b});a=c.path}catch(f){}var e={isRoot:!1,exists:!1,
error:0,name:null,path:null,object:null,Rc:!1,Tc:null,Sc:null};try{c=t.lookupPath(a,{parent:!0}),e.Rc=!0,e.Tc=c.path,e.Sc=c.node,e.name=X(a),c=t.lookupPath(a,{Ma:!b}),e.exists=!0,e.path=c.path,e.object=c.node,e.name=c.node.name,e.isRoot="/"===c.path}catch(f){e.error=f.Ia}return e},Zc:(a,b)=>{a="string"==typeof a?a:t.Sa(a);for(b=b.split("/").reverse();b.length;){var c=b.pop();if(c){var e=U(a+"/"+c);try{t.mkdir(e)}catch(f){}a=e}}return e},zc:(a,b,c,e,f)=>{a="string"==typeof a?a:t.Sa(a);b=U(a+"/"+b);
return t.create(b,t.xb(e,f))},rb:(a,b,c,e,f,g)=>{var k=b;a&&(a="string"==typeof a?a:t.Sa(a),k=b?U(a+"/"+b):a);a=t.xb(e,f);k=t.create(k,a);if(c){if("string"==typeof c){b=Array(c.length);e=0;for(f=c.length;e<f;++e)b[e]=c.charCodeAt(e);c=b}t.chmod(k,a|146);b=t.open(k,577);t.write(b,c,0,c.length,0,g);t.close(b);t.chmod(k,a)}return k},Qa:(a,b,c,e)=>{a=mb("string"==typeof a?a:t.Sa(a),b);b=t.xb(!!c,!!e);t.Qa.Db||(t.Qa.Db=64);var f=t.Wa(t.Qa.Db++,0);t.Jb(f,{open:g=>{g.seekable=!1},close:()=>{e&&e.buffer&&
e.buffer.length&&e(10)},read:(g,k,m,p)=>{for(var q=0,n=0;n<p;n++){try{var u=c()}catch(y){throw new t.ErrnoError(29);}if(void 0===u&&0===q)throw new t.ErrnoError(6);if(null===u||void 0===u)break;q++;k[m+n]=u}q&&(g.node.timestamp=Date.now());return q},write:(g,k,m,p)=>{for(var q=0;q<p;q++)try{e(k[m+q])}catch(n){throw new t.ErrnoError(29);}p&&(g.node.timestamp=Date.now());return q}});return t.lb(a,b,f)},vb:a=>{if(a.Bb||a.Kc||a.link||a.Ha)return!0;if("undefined"!=typeof XMLHttpRequest)throw Error("Lazy loading should have been performed (contents set) in createLazyFile, but it was not. Lazy loading only works in web workers. Use --embed-file or --preload-file in emcc on the main thread.");
if(ua)try{a.Ha=ea(ua(a.url),!0),a.La=a.Ha.length}catch(b){throw new t.ErrnoError(29);}else throw Error("Cannot load without read() or XMLHttpRequest.");},Yc:(a,b,c,e,f)=>{function g(){this.Cb=!1;this.Pa=[]}function k(n,u,y,D,B){n=n.node.Ha;if(B>=n.length)return 0;D=Math.min(n.length-B,D);if(n.slice)for(var E=0;E<D;E++)u[y+E]=n[B+E];else for(E=0;E<D;E++)u[y+E]=n.get(B+E);return D}g.prototype.get=function(n){if(!(n>this.length-1||0>n)){var u=n%this.chunkSize;return this.ac(n/this.chunkSize|0)[u]}};
g.prototype.kc=function(n){this.ac=n};g.prototype.Qb=function(){var n=new XMLHttpRequest;n.open("HEAD",c,!1);n.send(null);if(!(200<=n.status&&300>n.status||304===n.status))throw Error("Couldn't load "+c+". Status: "+n.status);var u=Number(n.getResponseHeader("Content-length")),y,D=(y=n.getResponseHeader("Accept-Ranges"))&&"bytes"===y;n=(y=n.getResponseHeader("Content-Encoding"))&&"gzip"===y;var B=1048576;D||(B=u);var E=this;E.kc(V=>{var ba=V*B,W=(V+1)*B-1;W=Math.min(W,u-1);if("undefined"==typeof E.Pa[V]){var Ja=
E.Pa;if(ba>W)throw Error("invalid range ("+ba+", "+W+") or no bytes requested!");if(W>u-1)throw Error("only "+u+" bytes available! programmer error!");var F=new XMLHttpRequest;F.open("GET",c,!1);u!==B&&F.setRequestHeader("Range","bytes="+ba+"-"+W);F.responseType="arraybuffer";F.overrideMimeType&&F.overrideMimeType("text/plain; charset=x-user-defined");F.send(null);if(!(200<=F.status&&300>F.status||304===F.status))throw Error("Couldn't load "+c+". Status: "+F.status);ba=void 0!==F.response?new Uint8Array(F.response||
[]):ea(F.responseText||"",!0);Ja[V]=ba}if("undefined"==typeof E.Pa[V])throw Error("doXHR failed!");return E.Pa[V]});if(n||!u)B=u=1,B=u=this.ac(0).length,Aa("LazyFiles on gzip forces download of the whole file when length is accessed");this.nc=u;this.mc=B;this.Cb=!0};if("undefined"!=typeof XMLHttpRequest){if(!sa)throw"Cannot do synchronous binary XHRs outside webworkers in modern browsers. Use --embed-file or --preload-file in emcc";var m=new g;Object.defineProperties(m,{length:{get:function(){this.Cb||
this.Qb();return this.nc}},chunkSize:{get:function(){this.Cb||this.Qb();return this.mc}}});m={Bb:!1,Ha:m}}else m={Bb:!1,url:c};var p=t.zc(a,b,m,e,f);m.Ha?p.Ha=m.Ha:m.url&&(p.Ha=null,p.url=m.url);Object.defineProperties(p,{La:{get:function(){return this.Ha.length}}});var q={};Object.keys(p.stream_ops).forEach(n=>{var u=p.stream_ops[n];q[n]=function(){t.vb(p);return u.apply(null,arguments)}});q.read=(n,u,y,D,B)=>{t.vb(p);return k(n,u,y,D,B)};q.mmap=(n,u,y)=>{t.vb(p);var D=vb(u);if(!D)throw new t.ErrnoError(48);
k(n,C,D,u,y);return{hc:D,Mb:!0}};p.stream_ops=q;return p},$c:(a,b,c,e,f,g,k,m,p,q)=>{function n(y){function D(B){q&&q();m||t.rb(a,b,B,e,f,p);g&&g();eb()}yb.dd(y,u,D,()=>{k&&k();eb()})||D(y)}var u=b?ob(U(a+"/"+b)):a;$a();"string"==typeof c?xb(c,y=>n(y),k):n(c)},indexedDB:()=>window.indexedDB||window.mozIndexedDB||window.webkitIndexedDB||window.msIndexedDB,Kb:()=>"EM_FS_"+window.location.pathname,Lb:20,bb:"FILE_DATA",md:(a,b,c)=>{b=b||(()=>{});c=c||(()=>{});var e=t.indexedDB();try{var f=e.open(t.Kb(),
t.Lb)}catch(g){return c(g)}f.onupgradeneeded=()=>{Aa("creating db");f.result.createObjectStore(t.bb)};f.onsuccess=()=>{var g=f.result.transaction([t.bb],"readwrite"),k=g.objectStore(t.bb),m=0,p=0,q=a.length;a.forEach(n=>{n=k.put(t.pb(n).object.Ha,n);n.onsuccess=()=>{m++;m+p==q&&(0==p?b():c())};n.onerror=()=>{p++;m+p==q&&(0==p?b():c())}});g.onerror=c};f.onerror=c},ed:(a,b,c)=>{b=b||(()=>{});c=c||(()=>{});var e=t.indexedDB();try{var f=e.open(t.Kb(),t.Lb)}catch(g){return c(g)}f.onupgradeneeded=c;f.onsuccess=
()=>{var g=f.result;try{var k=g.transaction([t.bb],"readonly")}catch(u){c(u);return}var m=k.objectStore(t.bb),p=0,q=0,n=a.length;a.forEach(u=>{var y=m.get(u);y.onsuccess=()=>{t.pb(u).exists&&t.unlink(u);t.rb(lb(u),X(u),y.result,!0,!0,!0);p++;p+q==n&&(0==q?b():c())};y.onerror=()=>{q++;p+q==n&&(0==q?b():c())}});k.onerror=c};f.onerror=c}};
function zb(a,b,c){if("/"===b.charAt(0))return b;if(-100===a)a=t.cwd();else{a=t.Ta(a);if(!a)throw new t.ErrnoError(8);a=a.path}if(0==b.length){if(!c)throw new t.ErrnoError(44);return a}return U(a+"/"+b)}
function Vb(a,b,c){try{var e=a(b)}catch(f){if(f&&f.node&&U(b)!==U(t.Sa(f.node)))return-54;throw f;}P[c>>2]=e.dev;P[c+4>>2]=0;P[c+8>>2]=e.ino;P[c+12>>2]=e.mode;P[c+16>>2]=e.nlink;P[c+20>>2]=e.uid;P[c+24>>2]=e.gid;P[c+28>>2]=e.rdev;P[c+32>>2]=0;T=[e.size>>>0,(S=e.size,1<=+Math.abs(S)?0<S?(Math.min(+Math.floor(S/4294967296),4294967295)|0)>>>0:~~+Math.ceil((S-+(~~S>>>0))/4294967296)>>>0:0)];P[c+40>>2]=T[0];P[c+44>>2]=T[1];P[c+48>>2]=4096;P[c+52>>2]=e.blocks;P[c+56>>2]=e.atime.getTime()/1E3|0;P[c+60>>
2]=0;P[c+64>>2]=e.mtime.getTime()/1E3|0;P[c+68>>2]=0;P[c+72>>2]=e.ctime.getTime()/1E3|0;P[c+76>>2]=0;T=[e.ino>>>0,(S=e.ino,1<=+Math.abs(S)?0<S?(Math.min(+Math.floor(S/4294967296),4294967295)|0)>>>0:~~+Math.ceil((S-+(~~S>>>0))/4294967296)>>>0:0)];P[c+80>>2]=T[0];P[c+84>>2]=T[1];return 0}var Wb=void 0;function Xb(){Wb+=4;return P[Wb-4>>2]}function Z(a){a=t.Ta(a);if(!a)throw new t.ErrnoError(8);return a}
function Yb(a,b,c){function e(p){return(p=p.toTimeString().match(/\(([A-Za-z ]+)\)$/))?p[1]:"GMT"}var f=(new Date).getFullYear(),g=new Date(f,0,1),k=new Date(f,6,1);f=g.getTimezoneOffset();var m=k.getTimezoneOffset();P[a>>2]=60*Math.max(f,m);P[b>>2]=Number(f!=m);a=e(g);b=e(k);a=Na(a);b=Na(b);m<f?(Q[c>>2]=a,Q[c+4>>2]=b):(Q[c>>2]=b,Q[c+4>>2]=a)}function Zb(a,b,c){Zb.tc||(Zb.tc=!0,Yb(a,b,c))}var $b;$b=ta?()=>{var a=process.hrtime();return 1E3*a[0]+a[1]/1E6}:()=>performance.now();var ac={};
function bc(){if(!cc){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",_:qa||"./this.program"},b;for(b in ac)void 0===ac[b]?delete a[b]:a[b]=ac[b];var c=[];for(b in a)c.push(b+"="+a[b]);cc=c}return cc}var cc;
function dc(a,b,c,e){a||(a=this);this.parent=a;this.mount=a.mount;this.eb=null;this.id=t.Pc++;this.name=b;this.mode=c;this.node_ops={};this.stream_ops={};this.rdev=e}Object.defineProperties(dc.prototype,{read:{get:function(){return 365===(this.mode&365)},set:function(a){a?this.mode|=365:this.mode&=-366}},write:{get:function(){return 146===(this.mode&146)},set:function(a){a?this.mode|=146:this.mode&=-147}},Kc:{get:function(){return t.isDir(this.mode)}},Bb:{get:function(){return t.jb(this.mode)}}});
t.FSNode=dc;t.ic();var yb;function ea(a,b){var c=Array(aa(a)+1);a=d(a,c,0,c.length);b&&(c.length=a);return c}
var fc={a:function(a,b,c,e){O("Assertion failed: "+J(a)+", at: "+[b?J(b):"unknown filename",c,e?J(e):"unknown function"])},h:function(a,b){try{return a=J(a),t.chmod(a,b),0}catch(c){if("undefined"==typeof t||!(c instanceof t.ErrnoError))throw c;return-c.Ia}},H:function(a,b,c){try{b=J(b);b=zb(a,b);if(c&-8)return-28;var e=t.lookupPath(b,{Ma:!0}).node;if(!e)return-44;a="";c&4&&(a+="r");c&2&&(a+="w");c&1&&(a+="x");return a&&t.Ua(e,a)?-2:0}catch(f){if("undefined"==typeof t||!(f instanceof t.ErrnoError))throw f;
return-f.Ia}},i:function(a,b){try{return t.fchmod(a,b),0}catch(c){if("undefined"==typeof t||!(c instanceof t.ErrnoError))throw c;return-c.Ia}},g:function(a,b,c){try{return t.fchown(a,b,c),0}catch(e){if("undefined"==typeof t||!(e instanceof t.ErrnoError))throw e;return-e.Ia}},b:function(a,b,c){Wb=c;try{var e=Z(a);switch(b){case 0:var f=Xb();return 0>f?-28:t.Sb(e,f).fd;case 1:case 2:return 0;case 3:return e.flags;case 4:return f=Xb(),e.flags|=f,0;case 5:return f=Xb(),Pa[f+0>>1]=2,0;case 6:case 7:return 0;
case 16:case 8:return-28;case 9:return P[ec()>>2]=28,-1;default:return-28}}catch(g){if("undefined"==typeof t||!(g instanceof t.ErrnoError))throw g;return-g.Ia}},G:function(a,b){try{var c=Z(a);return Vb(t.stat,c.path,b)}catch(e){if("undefined"==typeof t||!(e instanceof t.ErrnoError))throw e;return-e.Ia}},l:function(a,b,c){try{b=c+2097152>>>0<4194305-!!b?(b>>>0)+4294967296*c:NaN;if(isNaN(b))return-61;t.Fc(a,b);return 0}catch(e){if("undefined"==typeof t||!(e instanceof t.ErrnoError))throw e;return-e.Ia}},
B:function(a,b){try{if(0===b)return-28;var c=t.cwd(),e=aa(c)+1;if(b<e)return-68;d(c,r,a,b);return e}catch(f){if("undefined"==typeof t||!(f instanceof t.ErrnoError))throw f;return-f.Ia}},E:function(a,b){try{return a=J(a),Vb(t.lstat,a,b)}catch(c){if("undefined"==typeof t||!(c instanceof t.ErrnoError))throw c;return-c.Ia}},y:function(a,b,c){try{return b=J(b),b=zb(a,b),b=U(b),"/"===b[b.length-1]&&(b=b.substr(0,b.length-1)),t.mkdir(b,c,0),0}catch(e){if("undefined"==typeof t||!(e instanceof t.ErrnoError))throw e;
return-e.Ia}},D:function(a,b,c,e){try{b=J(b);var f=e&256;b=zb(a,b,e&4096);return Vb(f?t.lstat:t.stat,b,c)}catch(g){if("undefined"==typeof t||!(g instanceof t.ErrnoError))throw g;return-g.Ia}},v:function(a,b,c,e){Wb=e;try{b=J(b);b=zb(a,b);var f=e?Xb():0;return t.open(b,c,f).fd}catch(g){if("undefined"==typeof t||!(g instanceof t.ErrnoError))throw g;return-g.Ia}},t:function(a,b,c,e){try{b=J(b);b=zb(a,b);if(0>=e)return-28;var f=t.readlink(b),g=Math.min(e,aa(f)),k=C[c+g];d(f,r,c,e+1);C[c+g]=k;return g}catch(m){if("undefined"==
typeof t||!(m instanceof t.ErrnoError))throw m;return-m.Ia}},s:function(a){try{return a=J(a),t.rmdir(a),0}catch(b){if("undefined"==typeof t||!(b instanceof t.ErrnoError))throw b;return-b.Ia}},F:function(a,b){try{return a=J(a),Vb(t.stat,a,b)}catch(c){if("undefined"==typeof t||!(c instanceof t.ErrnoError))throw c;return-c.Ia}},p:function(a,b,c){try{return b=J(b),b=zb(a,b),0===c?t.unlink(b):512===c?t.rmdir(b):O("Invalid flags passed to unlinkat"),0}catch(e){if("undefined"==typeof t||!(e instanceof t.ErrnoError))throw e;
return-e.Ia}},o:function(a,b,c){try{b=J(b);b=zb(a,b,!0);if(c){var e=P[c>>2],f=P[c+4>>2];g=1E3*e+f/1E6;c+=8;e=P[c>>2];f=P[c+4>>2];k=1E3*e+f/1E6}else var g=Date.now(),k=g;t.Xc(b,g,k);return 0}catch(m){if("undefined"==typeof t||!(m instanceof t.ErrnoError))throw m;return-m.Ia}},e:function(){return Date.now()},j:function(a,b){a=new Date(1E3*P[a>>2]);P[b>>2]=a.getSeconds();P[b+4>>2]=a.getMinutes();P[b+8>>2]=a.getHours();P[b+12>>2]=a.getDate();P[b+16>>2]=a.getMonth();P[b+20>>2]=a.getFullYear()-1900;P[b+
24>>2]=a.getDay();var c=new Date(a.getFullYear(),0,1);P[b+28>>2]=(a.getTime()-c.getTime())/864E5|0;P[b+36>>2]=-(60*a.getTimezoneOffset());var e=(new Date(a.getFullYear(),6,1)).getTimezoneOffset();c=c.getTimezoneOffset();P[b+32>>2]=(e!=c&&a.getTimezoneOffset()==Math.min(c,e))|0},w:function(a,b,c,e,f,g){try{var k=t.Ta(e);if(!k)return-8;var m=t.mmap(k,a,f,b,c),p=m.hc;P[g>>2]=m.Mb;return p}catch(q){if("undefined"==typeof t||!(q instanceof t.ErrnoError))throw q;return-q.Ia}},x:function(a,b,c,e,f,g){try{var k=
t.Ta(f);if(k&&c&2){var m=r.slice(a,a+b);t.msync(k,m,g,b,e)}}catch(p){if("undefined"==typeof t||!(p instanceof t.ErrnoError))throw p;return-p.Ia}},n:Zb,q:function(){return 2147483648},d:$b,c:function(a){var b=r.length;a>>>=0;if(2147483648<a)return!1;for(var c=1;4>=c;c*=2){var e=b*(1+.2/c);e=Math.min(e,a+100663296);var f=Math;e=Math.max(a,e);f=f.min.call(f,2147483648,e+(65536-e%65536)%65536);a:{try{Fa.grow(f-Oa.byteLength+65535>>>16);Sa();var g=1;break a}catch(k){}g=void 0}if(g)return!0}return!1},z:function(a,
b){var c=0;bc().forEach(function(e,f){var g=b+c;f=Q[a+4*f>>2]=g;for(g=0;g<e.length;++g)C[f++>>0]=e.charCodeAt(g);C[f>>0]=0;c+=e.length+1});return 0},A:function(a,b){var c=bc();Q[a>>2]=c.length;var e=0;c.forEach(function(f){e+=f.length+1});Q[b>>2]=e;return 0},f:function(a){try{var b=Z(a);t.close(b);return 0}catch(c){if("undefined"==typeof t||!(c instanceof t.ErrnoError))throw c;return c.Ia}},m:function(a,b){try{var c=Z(a),e=c.tty?2:t.isDir(c.mode)?3:t.Za(c.mode)?7:4;C[b>>0]=e;return 0}catch(f){if("undefined"==
typeof t||!(f instanceof t.ErrnoError))throw f;return f.Ia}},u:function(a,b,c,e){try{a:{var f=Z(a);a=b;for(var g=b=0;g<c;g++){var k=Q[a>>2],m=Q[a+4>>2];a+=8;var p=t.read(f,C,k,m,void 0);if(0>p){var q=-1;break a}b+=p;if(p<m)break}q=b}P[e>>2]=q;return 0}catch(n){if("undefined"==typeof t||!(n instanceof t.ErrnoError))throw n;return n.Ia}},k:function(a,b,c,e,f){try{b=c+2097152>>>0<4194305-!!b?(b>>>0)+4294967296*c:NaN;if(isNaN(b))return 61;var g=Z(a);t.llseek(g,b,e);T=[g.position>>>0,(S=g.position,1<=
+Math.abs(S)?0<S?(Math.min(+Math.floor(S/4294967296),4294967295)|0)>>>0:~~+Math.ceil((S-+(~~S>>>0))/4294967296)>>>0:0)];P[f>>2]=T[0];P[f+4>>2]=T[1];g.yb&&0===b&&0===e&&(g.yb=null);return 0}catch(k){if("undefined"==typeof t||!(k instanceof t.ErrnoError))throw k;return k.Ia}},C:function(a){try{var b=Z(a);return b.stream_ops&&b.stream_ops.fsync?-b.stream_ops.fsync(b):0}catch(c){if("undefined"==typeof t||!(c instanceof t.ErrnoError))throw c;return c.Ia}},r:function(a,b,c,e){try{a:{var f=Z(a);a=b;for(var g=
b=0;g<c;g++){var k=Q[a>>2],m=Q[a+4>>2];a+=8;var p=t.write(f,C,k,m,void 0);if(0>p){var q=-1;break a}b+=p}q=b}Q[e>>2]=q;return 0}catch(n){if("undefined"==typeof t||!(n instanceof t.ErrnoError))throw n;return n.Ia}}};
(function(){function a(f){Module.asm=f.exports;Fa=Module.asm.I;Sa();M=Module.asm.Aa;Ua.unshift(Module.asm.J);eb()}function b(f){a(f.instance)}function c(f){return ib().then(function(g){return WebAssembly.instantiate(g,e)}).then(function(g){return g}).then(f,function(g){L("failed to asynchronously prepare wasm: "+g);O(g)})}var e={a:fc};$a();if(Module.instantiateWasm)try{return Module.instantiateWasm(e,a)}catch(f){return L("Module.instantiateWasm callback failed with error: "+f),!1}(function(){return Ea||
"function"!=typeof WebAssembly.instantiateStreaming||fb()||R.startsWith("file://")||ta||"function"!=typeof fetch?c(b):fetch(R,{credentials:"same-origin"}).then(function(f){return WebAssembly.instantiateStreaming(f,e).then(b,function(g){L("wasm streaming compile failed: "+g);L("falling back to ArrayBuffer instantiation");return c(b)})})})();return{}})();Module.___wasm_call_ctors=function(){return(Module.___wasm_call_ctors=Module.asm.J).apply(null,arguments)};
Module._sqlite3_vfs_find=function(){return(Module._sqlite3_vfs_find=Module.asm.K).apply(null,arguments)};Module._sqlite3_free=function(){return(Module._sqlite3_free=Module.asm.L).apply(null,arguments)};Module._sqlite3_value_double=function(){return(Module._sqlite3_value_double=Module.asm.M).apply(null,arguments)};Module._sqlite3_value_text=function(){return(Module._sqlite3_value_text=Module.asm.N).apply(null,arguments)};
var ec=Module.___errno_location=function(){return(ec=Module.___errno_location=Module.asm.O).apply(null,arguments)};Module._sqlite3_prepare_v2=function(){return(Module._sqlite3_prepare_v2=Module.asm.P).apply(null,arguments)};Module._sqlite3_step=function(){return(Module._sqlite3_step=Module.asm.Q).apply(null,arguments)};Module._sqlite3_finalize=function(){return(Module._sqlite3_finalize=Module.asm.R).apply(null,arguments)};
Module._sqlite3_reset=function(){return(Module._sqlite3_reset=Module.asm.S).apply(null,arguments)};Module._sqlite3_value_int=function(){return(Module._sqlite3_value_int=Module.asm.T).apply(null,arguments)};Module._sqlite3_clear_bindings=function(){return(Module._sqlite3_clear_bindings=Module.asm.U).apply(null,arguments)};Module._sqlite3_value_blob=function(){return(Module._sqlite3_value_blob=Module.asm.V).apply(null,arguments)};
Module._sqlite3_value_bytes=function(){return(Module._sqlite3_value_bytes=Module.asm.W).apply(null,arguments)};Module._sqlite3_value_type=function(){return(Module._sqlite3_value_type=Module.asm.X).apply(null,arguments)};Module._sqlite3_result_blob=function(){return(Module._sqlite3_result_blob=Module.asm.Y).apply(null,arguments)};Module._sqlite3_result_double=function(){return(Module._sqlite3_result_double=Module.asm.Z).apply(null,arguments)};
Module._sqlite3_result_error=function(){return(Module._sqlite3_result_error=Module.asm._).apply(null,arguments)};Module._sqlite3_result_int=function(){return(Module._sqlite3_result_int=Module.asm.$).apply(null,arguments)};Module._sqlite3_result_int64=function(){return(Module._sqlite3_result_int64=Module.asm.aa).apply(null,arguments)};Module._sqlite3_result_null=function(){return(Module._sqlite3_result_null=Module.asm.ba).apply(null,arguments)};
Module._sqlite3_result_text=function(){return(Module._sqlite3_result_text=Module.asm.ca).apply(null,arguments)};Module._sqlite3_sql=function(){return(Module._sqlite3_sql=Module.asm.da).apply(null,arguments)};Module._sqlite3_column_count=function(){return(Module._sqlite3_column_count=Module.asm.ea).apply(null,arguments)};Module._sqlite3_data_count=function(){return(Module._sqlite3_data_count=Module.asm.fa).apply(null,arguments)};
Module._sqlite3_column_blob=function(){return(Module._sqlite3_column_blob=Module.asm.ga).apply(null,arguments)};Module._sqlite3_column_bytes=function(){return(Module._sqlite3_column_bytes=Module.asm.ha).apply(null,arguments)};Module._sqlite3_column_double=function(){return(Module._sqlite3_column_double=Module.asm.ia).apply(null,arguments)};Module._sqlite3_column_text=function(){return(Module._sqlite3_column_text=Module.asm.ja).apply(null,arguments)};
Module._sqlite3_column_type=function(){return(Module._sqlite3_column_type=Module.asm.ka).apply(null,arguments)};Module._sqlite3_column_name=function(){return(Module._sqlite3_column_name=Module.asm.la).apply(null,arguments)};Module._sqlite3_bind_blob=function(){return(Module._sqlite3_bind_blob=Module.asm.ma).apply(null,arguments)};Module._sqlite3_bind_double=function(){return(Module._sqlite3_bind_double=Module.asm.na).apply(null,arguments)};
Module._sqlite3_bind_int=function(){return(Module._sqlite3_bind_int=Module.asm.oa).apply(null,arguments)};Module._sqlite3_bind_text=function(){return(Module._sqlite3_bind_text=Module.asm.pa).apply(null,arguments)};Module._sqlite3_bind_parameter_index=function(){return(Module._sqlite3_bind_parameter_index=Module.asm.qa).apply(null,arguments)};Module._sqlite3_normalized_sql=function(){return(Module._sqlite3_normalized_sql=Module.asm.ra).apply(null,arguments)};
Module._sqlite3_errmsg=function(){return(Module._sqlite3_errmsg=Module.asm.sa).apply(null,arguments)};Module._sqlite3_exec=function(){return(Module._sqlite3_exec=Module.asm.ta).apply(null,arguments)};Module._sqlite3_changes=function(){return(Module._sqlite3_changes=Module.asm.ua).apply(null,arguments)};Module._sqlite3_close_v2=function(){return(Module._sqlite3_close_v2=Module.asm.va).apply(null,arguments)};
Module._sqlite3_create_function_v2=function(){return(Module._sqlite3_create_function_v2=Module.asm.wa).apply(null,arguments)};Module._sqlite3_open=function(){return(Module._sqlite3_open=Module.asm.xa).apply(null,arguments)};var da=Module._malloc=function(){return(da=Module._malloc=Module.asm.ya).apply(null,arguments)},ha=Module._free=function(){return(ha=Module._free=Module.asm.za).apply(null,arguments)};
Module._RegisterExtensionFunctions=function(){return(Module._RegisterExtensionFunctions=Module.asm.Ba).apply(null,arguments)};Module._register_for_idb=function(){return(Module._register_for_idb=Module.asm.Ca).apply(null,arguments)};
var wb=Module._emscripten_builtin_memalign=function(){return(wb=Module._emscripten_builtin_memalign=Module.asm.Da).apply(null,arguments)},ja=Module.stackSave=function(){return(ja=Module.stackSave=Module.asm.Ea).apply(null,arguments)},la=Module.stackRestore=function(){return(la=Module.stackRestore=Module.asm.Fa).apply(null,arguments)},A=Module.stackAlloc=function(){return(A=Module.stackAlloc=Module.asm.Ga).apply(null,arguments)};
Module.cwrap=function(a,b,c,e){c=c||[];var f=c.every(function(g){return"number"===g});return"string"!==b&&f&&!e?Module["_"+a]:function(){return Ha(a,b,c,arguments)}};Module.UTF8ToString=J;Module.stackSave=ja;Module.stackRestore=la;Module.stackAlloc=A;Module.FS=t;var gc;Za=function hc(){gc||ic();gc||(Za=hc)};
function ic(){function a(){if(!gc&&(gc=!0,Module.calledRun=!0,!Ga)){Module.noFSInit||t.ib.Ab||t.ib();t.dc=!1;jb(Ua);if(Module.onRuntimeInitialized)Module.onRuntimeInitialized();if(Module.postRun)for("function"==typeof Module.postRun&&(Module.postRun=[Module.postRun]);Module.postRun.length;){var b=Module.postRun.shift();Va.unshift(b)}jb(Va)}}if(!(0<Xa)){if(Module.preRun)for("function"==typeof Module.preRun&&(Module.preRun=[Module.preRun]);Module.preRun.length;)Wa();jb(Ta);0<Xa||(Module.setStatus?(Module.setStatus("Running..."),
setTimeout(function(){setTimeout(function(){Module.setStatus("")},1);a()},1)):a())}}Module.run=ic;if(Module.preInit)for("function"==typeof Module.preInit&&(Module.preInit=[Module.preInit]);0<Module.preInit.length;)Module.preInit.pop()();ic();


        // The shell-pre.js and emcc-generated code goes above
        return Module;
    }); // The end of the promise being returned

  return initSqlJsPromise;
} // The end of our initSqlJs function

// This bit below is copied almost exactly from what you get when you use the MODULARIZE=1 flag with emcc
// However, we don't want to use the emcc modularization. See shell-pre.js
if (typeof exports === 'object' && typeof module === 'object'){
    module.exports = initSqlJs;
    // This will allow the module to be used in ES6 or CommonJS
    module.exports.default = initSqlJs;
}
else if (typeof define === 'function' && define['amd']) {
    define([], function() { return initSqlJs; });
}
else if (typeof exports === 'object'){
    exports["Module"] = initSqlJs;
}
