
var Module = (() => {
  var _scriptDir = typeof document !== 'undefined' && document.currentScript ? document.currentScript.src : undefined;
  if (typeof __filename !== 'undefined') _scriptDir = _scriptDir || __filename;
  return (
function(Module) {
  Module = Module || {};


var Module;Module||(Module=typeof Module !== 'undefined' ? Module : {});var aa,ba;Module.ready=new Promise(function(a,b){aa=a;ba=b});null;
Module.onRuntimeInitialized=function(){function a(f,l){switch(typeof l){case "boolean":hc(f,l?1:0);break;case "number":ic(f,l);break;case "string":jc(f,l,-1,-1);break;case "object":if(null===l)lb(f);else if(null!=l.length){var m=ca(l);kc(f,m,l.length,-1);da(m)}else wa(f,"Wrong API use : tried to return a value of an unknown type ("+l+").",-1);break;default:lb(f)}}function b(f,l){for(var m=[],n=0;n<f;n+=1){var u=k(l+4*n,"i32"),x=lc(u);if(1===x||2===x)u=mc(u);else if(3===x)u=nc(u);else if(4===x){x=
u;u=oc(x);x=pc(x);for(var L=new Uint8Array(u),F=0;F<u;F+=1)L[F]=q[x+F];u=L}else u=null;m.push(u)}return m}function c(f,l){this.La=f;this.db=l;this.Ja=1;this.fb=[]}function d(f,l){this.db=l;l=ea(f)+1;this.Ya=fa(l);if(null===this.Ya)throw Error("Unable to allocate memory for the SQL string");r(f,t,this.Ya,l);this.eb=this.Ya;this.Ua=this.hb=null}function e(f){this.filename="dbfile_"+(4294967295*Math.random()>>>0);if(null!=f){var l=this.filename,m="/",n=l;m&&(m="string"==typeof m?m:ha(m),n=l?y(m+"/"+
l):m);l=ia(!0,!0);n=ja(n,(void 0!==l?l:438)&4095|32768,0);if(f){if("string"==typeof f){m=Array(f.length);for(var u=0,x=f.length;u<x;++u)m[u]=f.charCodeAt(u);f=m}ka(n,l|146);m=la(n,577);na(m,f,0,f.length,0);oa(m);ka(n,l)}}this.handleError(p(this.filename,g));this.db=k(g,"i32");qc(this.db);this.Za={};this.Na={}}var g=A(4),h=Module.cwrap,p=h("sqlite3_open","number",["string","number"]),w=h("sqlite3_close_v2","number",["number"]),v=h("sqlite3_exec","number",["number","string","number","number","number"]),
z=h("sqlite3_changes","number",["number"]),R=h("sqlite3_prepare_v2","number",["number","string","number","number","number"]),ob=h("sqlite3_sql","string",["number"]),rc=h("sqlite3_normalized_sql","string",["number"]),pb=h("sqlite3_prepare_v2","number",["number","number","number","number","number"]),sc=h("sqlite3_bind_text","number",["number","number","number","number","number"]),qb=h("sqlite3_bind_blob","number",["number","number","number","number","number"]),tc=h("sqlite3_bind_double","number",["number",
"number","number"]),uc=h("sqlite3_bind_int","number",["number","number","number"]),vc=h("sqlite3_bind_parameter_index","number",["number","string"]),wc=h("sqlite3_step","number",["number"]),xc=h("sqlite3_errmsg","string",["number"]),yc=h("sqlite3_column_count","number",["number"]),zc=h("sqlite3_data_count","number",["number"]),Ac=h("sqlite3_column_double","number",["number","number"]),rb=h("sqlite3_column_text","string",["number","number"]),Bc=h("sqlite3_column_blob","number",["number","number"]),
Cc=h("sqlite3_column_bytes","number",["number","number"]),Dc=h("sqlite3_column_type","number",["number","number"]),Ec=h("sqlite3_column_name","string",["number","number"]),Fc=h("sqlite3_reset","number",["number"]),Gc=h("sqlite3_clear_bindings","number",["number"]),Hc=h("sqlite3_finalize","number",["number"]),sb=h("sqlite3_create_function_v2","number","number string number number number number number number number".split(" ")),lc=h("sqlite3_value_type","number",["number"]),oc=h("sqlite3_value_bytes",
"number",["number"]),nc=h("sqlite3_value_text","string",["number"]),pc=h("sqlite3_value_blob","number",["number"]),mc=h("sqlite3_value_double","number",["number"]),ic=h("sqlite3_result_double","",["number","number"]),lb=h("sqlite3_result_null","",["number"]),jc=h("sqlite3_result_text","",["number","string","number","number"]),kc=h("sqlite3_result_blob","",["number","number","number","number"]),hc=h("sqlite3_result_int","",["number","number"]),wa=h("sqlite3_result_error","",["number","string","number"]),
tb=h("sqlite3_aggregate_context","number",["number","number"]),qc=h("RegisterExtensionFunctions","number",["number"]);c.prototype.bind=function(f){if(!this.La)throw"Statement closed";this.reset();return Array.isArray(f)?this.bindFromArray(f):null!=f&&"object"===typeof f?this.bindFromObject(f):!0};c.prototype.step=function(){if(!this.La)throw"Statement closed";this.Ja=1;var f=wc(this.La);switch(f){case 100:return!0;case 101:return!1;default:throw this.db.handleError(f);}};c.prototype.getNumber=function(f){null==
f&&(f=this.Ja,this.Ja+=1);return Ac(this.La,f)};c.prototype.getBigInt=function(f){null==f&&(f=this.Ja,this.Ja+=1);f=rb(this.La,f);if("function"!==typeof BigInt)throw Error("BigInt is not supported");return BigInt(f)};c.prototype.getString=function(f){null==f&&(f=this.Ja,this.Ja+=1);return rb(this.La,f)};c.prototype.getBlob=function(f){null==f&&(f=this.Ja,this.Ja+=1);var l=Cc(this.La,f);f=Bc(this.La,f);for(var m=new Uint8Array(l),n=0;n<l;n+=1)m[n]=q[f+n];return m};c.prototype.get=function(f,l){l=l||
{};null!=f&&this.bind(f)&&this.step();f=[];for(var m=zc(this.La),n=0;n<m;n+=1)switch(Dc(this.La,n)){case 1:var u=l.useBigInt?this.getBigInt(n):this.getNumber(n);f.push(u);break;case 2:f.push(this.getNumber(n));break;case 3:f.push(this.getString(n));break;case 4:f.push(this.getBlob(n));break;default:f.push(null)}return f};c.prototype.getColumnNames=function(){for(var f=[],l=yc(this.La),m=0;m<l;m+=1)f.push(Ec(this.La,m));return f};c.prototype.getAsObject=function(f,l){f=this.get(f,l);l=this.getColumnNames();
for(var m={},n=0;n<l.length;n+=1)m[l[n]]=f[n];return m};c.prototype.getSQL=function(){return ob(this.La)};c.prototype.getNormalizedSQL=function(){return rc(this.La)};c.prototype.run=function(f){null!=f&&this.bind(f);this.step();return this.reset()};c.prototype.bindString=function(f,l){null==l&&(l=this.Ja,this.Ja+=1);f=pa(f);var m=ca(f);this.fb.push(m);this.db.handleError(sc(this.La,l,m,f.length-1,0));return!0};c.prototype.bindBlob=function(f,l){null==l&&(l=this.Ja,this.Ja+=1);var m=ca(f);this.fb.push(m);
this.db.handleError(qb(this.La,l,m,f.length,0));return!0};c.prototype.bindNumber=function(f,l){null==l&&(l=this.Ja,this.Ja+=1);this.db.handleError((f===(f|0)?uc:tc)(this.La,l,f));return!0};c.prototype.bindNull=function(f){null==f&&(f=this.Ja,this.Ja+=1);return 0===qb(this.La,f,0,0,0)};c.prototype.lb=function(f,l){null==l&&(l=this.Ja,this.Ja+=1);switch(typeof f){case "string":this.bindString(f,l);return;case "number":this.bindNumber(f,l);return;case "bigint":this.bindString(f.toString(),l);return;
case "boolean":this.bindNumber(f+0,l);return;case "object":if(null===f){this.bindNull(l);return}if(null!=f.length){this.bindBlob(f,l);return}}throw"Wrong API use : tried to bind a value of an unknown type ("+f+").";};c.prototype.bindFromObject=function(f){var l=this;Object.keys(f).forEach(function(m){var n=vc(l.La,m);0!==n&&l.lb(f[m],n)});return!0};c.prototype.bindFromArray=function(f){for(var l=0;l<f.length;l+=1)this.lb(f[l],l+1);return!0};c.prototype.reset=function(){this.freemem();return 0===Gc(this.La)&&
0===Fc(this.La)};c.prototype.freemem=function(){for(var f;void 0!==(f=this.fb.pop());)da(f)};c.prototype.free=function(){this.freemem();var f=0===Hc(this.La);delete this.db.Za[this.La];this.La=0;return f};d.prototype.next=function(){if(null===this.Ya)return{done:!0};null!==this.Ua&&(this.Ua.free(),this.Ua=null);if(!this.db.db)throw this.finalize(),Error("Database closed");var f=qa(),l=A(4);ra(g);ra(l);try{this.db.handleError(pb(this.db.db,this.eb,-1,g,l));this.eb=k(l,"i32");var m=k(g,"i32");if(0===
m)return this.finalize(),{done:!0};this.Ua=new c(m,this.db);this.db.Za[m]=this.Ua;return{value:this.Ua,done:!1}}catch(n){throw this.hb=B(this.eb),this.finalize(),n;}finally{sa(f)}};d.prototype.finalize=function(){da(this.Ya);this.Ya=null};d.prototype.getRemainingSQL=function(){return null!==this.hb?this.hb:B(this.eb)};"function"===typeof Symbol&&"symbol"===typeof Symbol.iterator&&(d.prototype[Symbol.iterator]=function(){return this});e.prototype.run=function(f,l){if(!this.db)throw"Database closed";
if(l){f=this.prepare(f,l);try{f.step()}finally{f.free()}}else this.handleError(v(this.db,f,0,0,g));return this};e.prototype.exec=function(f,l,m){if(!this.db)throw"Database closed";var n=qa(),u=null;try{var x=ea(f)+1,L=A(x);r(f,q,L,x);var F=L;var G=A(4);for(f=[];0!==k(F,"i8");){ra(g);ra(G);this.handleError(pb(this.db,F,-1,g,G));var H=k(g,"i32");F=k(G,"i32");if(0!==H){x={columns:[],values:[]};f.push(x);u=new c(H,this);for(null!=l&&u.bind(l);u.step();)x.columns=u.getColumnNames(),x.values.push(u.get(null,
m));u.free()}}return f}catch(ma){throw u&&u.free(),ma;}finally{sa(n)}};e.prototype.each=function(f,l,m,n,u){"function"===typeof l&&(n=m,m=l,l=void 0);f=this.prepare(f,l);try{for(;f.step();)m(f.getAsObject(null,u))}finally{f.free()}if("function"===typeof n)return n()};e.prototype.prepare=function(f,l){ra(g);this.handleError(R(this.db,f,-1,g,0));f=k(g,"i32");if(0===f)throw"Nothing to prepare";var m=new c(f,this);null!=l&&m.bind(l);return this.Za[f]=m};e.prototype.iterateStatements=function(f){return new d(f,
this)};e.prototype["export"]=function(){Object.values(this.Za).forEach(function(l){l.free()});Object.values(this.Na).forEach(ta);this.Na={};this.handleError(w(this.db));var f=ua(this.filename);this.handleError(p(this.filename,g));this.db=k(g,"i32");return f};e.prototype.close=function(){null!==this.db&&(Object.values(this.Za).forEach(function(f){f.free()}),Object.values(this.Na).forEach(ta),this.Na={},this.handleError(w(this.db)),va("/"+this.filename),this.db=null)};e.prototype.handleError=function(f){if(0===
f)return null;f=xc(this.db);throw Error(f);};e.prototype.getRowsModified=function(){return z(this.db)};e.prototype.create_function=function(f,l){Object.prototype.hasOwnProperty.call(this.Na,f)&&(ta(this.Na[f]),delete this.Na[f]);var m=xa(function(n,u,x){u=b(u,x);try{var L=l.apply(null,u)}catch(F){wa(n,F,-1);return}a(n,L)},"viii");this.Na[f]=m;this.handleError(sb(this.db,f,l.length,1,0,m,0,0,0));return this};e.prototype.create_aggregate=function(f,l){var m=l.init||function(){return null},n=l.finalize||
function(G){return G},u=l.step;if(!u)throw"An aggregate function must have a step function in "+f;var x={};Object.hasOwnProperty.call(this.Na,f)&&(ta(this.Na[f]),delete this.Na[f]);l=f+"__finalize";Object.hasOwnProperty.call(this.Na,l)&&(ta(this.Na[l]),delete this.Na[l]);var L=xa(function(G,H,ma){var Y=tb(G,1);Object.hasOwnProperty.call(x,Y)||(x[Y]=m());H=b(H,ma);H=[x[Y]].concat(H);try{x[Y]=u.apply(null,H)}catch(Jc){delete x[Y],wa(G,Jc,-1)}},"viii"),F=xa(function(G){var H=tb(G,1);try{var ma=n(x[H])}catch(Y){delete x[H];
wa(G,Y,-1);return}a(G,ma);delete x[H]},"vi");this.Na[f]=L;this.Na[l]=F;this.handleError(sb(this.db,f,u.length-1,1,0,0,L,F,0));return this};Module.Database=e};var ya=Object.assign({},Module),za="./this.program",Aa="object"==typeof window,Ba="function"==typeof importScripts,Ca="object"==typeof process&&"object"==typeof process.versions&&"string"==typeof process.versions.node,C="",Da,Ea,Fa,fs,Ga,Ha;
if(Ca)C=Ba?require("path").dirname(C)+"/":__dirname+"/",Ha=()=>{Ga||(fs=require("fs"),Ga=require("path"))},Da=function(a,b){Ha();a=Ga.normalize(a);return fs.readFileSync(a,b?void 0:"utf8")},Fa=a=>{a=Da(a,!0);a.buffer||(a=new Uint8Array(a));return a},Ea=(a,b,c)=>{Ha();a=Ga.normalize(a);fs.readFile(a,function(d,e){d?c(d):b(e.buffer)})},1<process.argv.length&&(za=process.argv[1].replace(/\\/g,"/")),process.argv.slice(2),Module.inspect=function(){return"[Emscripten Module object]"};else if(Aa||Ba)Ba?
C=self.location.href:"undefined"!=typeof document&&document.currentScript&&(C=document.currentScript.src),_scriptDir&&(C=_scriptDir),0!==C.indexOf("blob:")?C=C.substr(0,C.replace(/[?#].*/,"").lastIndexOf("/")+1):C="",Da=a=>{var b=new XMLHttpRequest;b.open("GET",a,!1);b.send(null);return b.responseText},Ba&&(Fa=a=>{var b=new XMLHttpRequest;b.open("GET",a,!1);b.responseType="arraybuffer";b.send(null);return new Uint8Array(b.response)}),Ea=(a,b,c)=>{var d=new XMLHttpRequest;d.open("GET",a,!0);d.responseType=
"arraybuffer";d.onload=()=>{200==d.status||0==d.status&&d.response?b(d.response):c()};d.onerror=c;d.send(null)};var Ia=Module.print||console.log.bind(console),D=Module.printErr||console.warn.bind(console);Object.assign(Module,ya);ya=null;Module.thisProgram&&(za=Module.thisProgram);var Ja;Module.wasmBinary&&(Ja=Module.wasmBinary);var noExitRuntime=Module.noExitRuntime||!0;"object"!=typeof WebAssembly&&E("no native wasm support detected");
var Ka,La=!1,Ma="undefined"!=typeof TextDecoder?new TextDecoder("utf8"):void 0;
function Na(a,b,c){var d=b+c;for(c=b;a[c]&&!(c>=d);)++c;if(16<c-b&&a.buffer&&Ma)return Ma.decode(a.subarray(b,c));for(d="";b<c;){var e=a[b++];if(e&128){var g=a[b++]&63;if(192==(e&224))d+=String.fromCharCode((e&31)<<6|g);else{var h=a[b++]&63;e=224==(e&240)?(e&15)<<12|g<<6|h:(e&7)<<18|g<<12|h<<6|a[b++]&63;65536>e?d+=String.fromCharCode(e):(e-=65536,d+=String.fromCharCode(55296|e>>10,56320|e&1023))}}else d+=String.fromCharCode(e)}return d}function B(a,b){return a?Na(t,a,b):""}
function r(a,b,c,d){if(!(0<d))return 0;var e=c;d=c+d-1;for(var g=0;g<a.length;++g){var h=a.charCodeAt(g);if(55296<=h&&57343>=h){var p=a.charCodeAt(++g);h=65536+((h&1023)<<10)|p&1023}if(127>=h){if(c>=d)break;b[c++]=h}else{if(2047>=h){if(c+1>=d)break;b[c++]=192|h>>6}else{if(65535>=h){if(c+2>=d)break;b[c++]=224|h>>12}else{if(c+3>=d)break;b[c++]=240|h>>18;b[c++]=128|h>>12&63}b[c++]=128|h>>6&63}b[c++]=128|h&63}}b[c]=0;return c-e}
function ea(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}var Oa,q,t,Pa,I,J,Qa,Ra;function Sa(){var a=Ka.buffer;Oa=a;Module.HEAP8=q=new Int8Array(a);Module.HEAP16=Pa=new Int16Array(a);Module.HEAP32=I=new Int32Array(a);Module.HEAPU8=t=new Uint8Array(a);Module.HEAPU16=new Uint16Array(a);Module.HEAPU32=J=new Uint32Array(a);Module.HEAPF32=Qa=new Float32Array(a);Module.HEAPF64=Ra=new Float64Array(a)}var K,Ta=[],Ua=[],Va=[];
function Wa(){var a=Module.preRun.shift();Ta.unshift(a)}var Xa=0,Ya=null,Za=null;function E(a){if(Module.onAbort)Module.onAbort(a);a="Aborted("+a+")";D(a);La=!0;a=new WebAssembly.RuntimeError(a+". Build with -sASSERTIONS for more info.");ba(a);throw a;}function $a(){return M.startsWith("data:application/octet-stream;base64,")}var M;M="sql-wasm.wasm";if(!$a()){var ab=M;M=Module.locateFile?Module.locateFile(ab,C):C+ab}
function bb(){var a=M;try{if(a==M&&Ja)return new Uint8Array(Ja);if(Fa)return Fa(a);throw"both async and sync fetching of the wasm failed";}catch(b){E(b)}}
function cb(){if(!Ja&&(Aa||Ba)){if("function"==typeof fetch&&!M.startsWith("file://"))return fetch(M,{credentials:"same-origin"}).then(function(a){if(!a.ok)throw"failed to load wasm binary file at '"+M+"'";return a.arrayBuffer()}).catch(function(){return bb()});if(Ea)return new Promise(function(a,b){Ea(M,function(c){a(new Uint8Array(c))},b)})}return Promise.resolve().then(function(){return bb()})}var N,O;function db(a){for(;0<a.length;)a.shift()(Module)}
function k(a,b="i8"){b.endsWith("*")&&(b="*");switch(b){case "i1":return q[a>>0];case "i8":return q[a>>0];case "i16":return Pa[a>>1];case "i32":return I[a>>2];case "i64":return I[a>>2];case "float":return Qa[a>>2];case "double":return Ra[a>>3];case "*":return J[a>>2];default:E("invalid type for getValue: "+b)}return null}
function ra(a){var b="i32";b.endsWith("*")&&(b="*");switch(b){case "i1":q[a>>0]=0;break;case "i8":q[a>>0]=0;break;case "i16":Pa[a>>1]=0;break;case "i32":I[a>>2]=0;break;case "i64":O=[0,(N=0,1<=+Math.abs(N)?0<N?(Math.min(+Math.floor(N/4294967296),4294967295)|0)>>>0:~~+Math.ceil((N-+(~~N>>>0))/4294967296)>>>0:0)];I[a>>2]=O[0];I[a+4>>2]=O[1];break;case "float":Qa[a>>2]=0;break;case "double":Ra[a>>3]=0;break;case "*":J[a>>2]=0;break;default:E("invalid type for setValue: "+b)}}
var eb=(a,b)=>{for(var c=0,d=a.length-1;0<=d;d--){var e=a[d];"."===e?a.splice(d,1):".."===e?(a.splice(d,1),c++):c&&(a.splice(d,1),c--)}if(b)for(;c;c--)a.unshift("..");return a},y=a=>{var b="/"===a.charAt(0),c="/"===a.substr(-1);(a=eb(a.split("/").filter(d=>!!d),!b).join("/"))||b||(a=".");a&&c&&(a+="/");return(b?"/":"")+a},fb=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},gb=a=>{if("/"===
a)return"/";a=y(a);a=a.replace(/\/$/,"");var b=a.lastIndexOf("/");return-1===b?a:a.substr(b+1)};function hb(){if("object"==typeof crypto&&"function"==typeof crypto.getRandomValues){var a=new Uint8Array(1);return()=>{crypto.getRandomValues(a);return a[0]}}if(Ca)try{var b=require("crypto");return()=>b.randomBytes(1)[0]}catch(c){}return()=>E("randomDevice")}
function ib(){for(var a="",b=!1,c=arguments.length-1;-1<=c&&!b;c--){b=0<=c?arguments[c]:"/";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=eb(a.split("/").filter(d=>!!d),!b).join("/");return(b?"/":"")+a||"."}function pa(a,b){var c=Array(ea(a)+1);a=r(a,c,0,c.length);b&&(c.length=a);return c}var jb=[];function kb(a,b){jb[a]={input:[],output:[],Xa:b};mb(a,nb)}
var nb={open:function(a){var b=jb[a.node.rdev];if(!b)throw new P(43);a.tty=b;a.seekable=!1},close:function(a){a.tty.Xa.fsync(a.tty)},fsync:function(a){a.tty.Xa.fsync(a.tty)},read:function(a,b,c,d){if(!a.tty||!a.tty.Xa.pb)throw new P(60);for(var e=0,g=0;g<d;g++){try{var h=a.tty.Xa.pb(a.tty)}catch(p){throw new P(29);}if(void 0===h&&0===e)throw new P(6);if(null===h||void 0===h)break;e++;b[c+g]=h}e&&(a.node.timestamp=Date.now());return e},write:function(a,b,c,d){if(!a.tty||!a.tty.Xa.ib)throw new P(60);
try{for(var e=0;e<d;e++)a.tty.Xa.ib(a.tty,b[c+e])}catch(g){throw new P(29);}d&&(a.node.timestamp=Date.now());return e}},ub={pb:function(a){if(!a.input.length){var b=null;if(Ca){var c=Buffer.alloc(256),d=0;try{d=fs.readSync(process.stdin.fd,c,0,256,-1)}catch(e){if(e.toString().includes("EOF"))d=0;else throw e;}0<d?b=c.slice(0,d).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=pa(b,!0)}return a.input.shift()},ib:function(a,b){null===b||10===b?(Ia(Na(a.output,0)),a.output=[]):0!=b&&a.output.push(b)},fsync:function(a){a.output&&0<a.output.length&&(Ia(Na(a.output,0)),a.output=[])}},vb={ib:function(a,b){null===b||10===b?(D(Na(a.output,0)),a.output=[]):0!=b&&a.output.push(b)},fsync:function(a){a.output&&0<a.output.length&&(D(Na(a.output,0)),a.output=[])}},Q={Qa:null,Ra:function(){return Q.createNode(null,"/",16895,0)},
createNode:function(a,b,c,d){if(24576===(c&61440)||4096===(c&61440))throw new P(63);Q.Qa||(Q.Qa={dir:{node:{Pa:Q.Ga.Pa,Oa:Q.Ga.Oa,lookup:Q.Ga.lookup,ab:Q.Ga.ab,rename:Q.Ga.rename,unlink:Q.Ga.unlink,rmdir:Q.Ga.rmdir,readdir:Q.Ga.readdir,symlink:Q.Ga.symlink},stream:{Ta:Q.Ha.Ta}},file:{node:{Pa:Q.Ga.Pa,Oa:Q.Ga.Oa},stream:{Ta:Q.Ha.Ta,read:Q.Ha.read,write:Q.Ha.write,kb:Q.Ha.kb,bb:Q.Ha.bb,cb:Q.Ha.cb}},link:{node:{Pa:Q.Ga.Pa,Oa:Q.Ga.Oa,readlink:Q.Ga.readlink},stream:{}},mb:{node:{Pa:Q.Ga.Pa,Oa:Q.Ga.Oa},
stream:wb}});c=xb(a,b,c,d);16384===(c.mode&61440)?(c.Ga=Q.Qa.dir.node,c.Ha=Q.Qa.dir.stream,c.Ia={}):32768===(c.mode&61440)?(c.Ga=Q.Qa.file.node,c.Ha=Q.Qa.file.stream,c.Ma=0,c.Ia=null):40960===(c.mode&61440)?(c.Ga=Q.Qa.link.node,c.Ha=Q.Qa.link.stream):8192===(c.mode&61440)&&(c.Ga=Q.Qa.mb.node,c.Ha=Q.Qa.mb.stream);c.timestamp=Date.now();a&&(a.Ia[b]=c,a.timestamp=c.timestamp);return c},zb:function(a){return a.Ia?a.Ia.subarray?a.Ia.subarray(0,a.Ma):new Uint8Array(a.Ia):new Uint8Array(0)},nb:function(a,
b){var c=a.Ia?a.Ia.length:0;c>=b||(b=Math.max(b,c*(1048576>c?2:1.125)>>>0),0!=c&&(b=Math.max(b,256)),c=a.Ia,a.Ia=new Uint8Array(b),0<a.Ma&&a.Ia.set(c.subarray(0,a.Ma),0))},wb:function(a,b){if(a.Ma!=b)if(0==b)a.Ia=null,a.Ma=0;else{var c=a.Ia;a.Ia=new Uint8Array(b);c&&a.Ia.set(c.subarray(0,Math.min(b,a.Ma)));a.Ma=b}},Ga:{Pa:function(a){var b={};b.dev=8192===(a.mode&61440)?a.id:1;b.ino=a.id;b.mode=a.mode;b.nlink=1;b.uid=0;b.gid=0;b.rdev=a.rdev;16384===(a.mode&61440)?b.size=4096:32768===(a.mode&61440)?
b.size=a.Ma:40960===(a.mode&61440)?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.sb=4096;b.blocks=Math.ceil(b.size/b.sb);return b},Oa:function(a,b){void 0!==b.mode&&(a.mode=b.mode);void 0!==b.timestamp&&(a.timestamp=b.timestamp);void 0!==b.size&&Q.wb(a,b.size)},lookup:function(){throw yb[44];},ab:function(a,b,c,d){return Q.createNode(a,b,c,d)},rename:function(a,b,c){if(16384===(a.mode&61440)){try{var d=zb(b,c)}catch(g){}if(d)for(var e in d.Ia)throw new P(55);
}delete a.parent.Ia[a.name];a.parent.timestamp=Date.now();a.name=c;b.Ia[c]=a;b.timestamp=a.parent.timestamp;a.parent=b},unlink:function(a,b){delete a.Ia[b];a.timestamp=Date.now()},rmdir:function(a,b){var c=zb(a,b),d;for(d in c.Ia)throw new P(55);delete a.Ia[b];a.timestamp=Date.now()},readdir:function(a){var b=[".",".."],c;for(c in a.Ia)a.Ia.hasOwnProperty(c)&&b.push(c);return b},symlink:function(a,b,c){a=Q.createNode(a,b,41471,0);a.link=c;return a},readlink:function(a){if(40960!==(a.mode&61440))throw new P(28);
return a.link}},Ha:{read:function(a,b,c,d,e){var g=a.node.Ia;if(e>=a.node.Ma)return 0;a=Math.min(a.node.Ma-e,d);if(8<a&&g.subarray)b.set(g.subarray(e,e+a),c);else for(d=0;d<a;d++)b[c+d]=g[e+d];return a},write:function(a,b,c,d,e,g){b.buffer===q.buffer&&(g=!1);if(!d)return 0;a=a.node;a.timestamp=Date.now();if(b.subarray&&(!a.Ia||a.Ia.subarray)){if(g)return a.Ia=b.subarray(c,c+d),a.Ma=d;if(0===a.Ma&&0===e)return a.Ia=b.slice(c,c+d),a.Ma=d;if(e+d<=a.Ma)return a.Ia.set(b.subarray(c,c+d),e),d}Q.nb(a,e+
d);if(a.Ia.subarray&&b.subarray)a.Ia.set(b.subarray(c,c+d),e);else for(g=0;g<d;g++)a.Ia[e+g]=b[c+g];a.Ma=Math.max(a.Ma,e+d);return d},Ta:function(a,b,c){1===c?b+=a.position:2===c&&32768===(a.node.mode&61440)&&(b+=a.node.Ma);if(0>b)throw new P(28);return b},kb:function(a,b,c){Q.nb(a.node,b+c);a.node.Ma=Math.max(a.node.Ma,b+c)},bb:function(a,b,c,d,e){if(32768!==(a.node.mode&61440))throw new P(43);a=a.node.Ia;if(e&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=65536*Math.ceil(b/65536);(e=Ab(65536,b))?(t.fill(0,e,e+b),b=e):b=0;if(!b)throw new P(48);q.set(a,b)}else c=!1,b=a.byteOffset;return{vb:b,rb:c}},cb:function(a,b,c,d,e){if(32768!==(a.node.mode&61440))throw new P(43);if(e&2)return 0;Q.Ha.write(a,b,0,d,c,!1);return 0}}},Bb=null,Cb={},S=[],Db=1,T=null,Eb=!0,P=null,yb={},U=(a,b={})=>{a=ib("/",a);if(!a)return{path:"",node:null};b=Object.assign({ob:!0,jb:0},b);if(8<b.jb)throw new P(32);a=eb(a.split("/").filter(h=>!!h),!1);for(var c=Bb,d="/",
e=0;e<a.length;e++){var g=e===a.length-1;if(g&&b.parent)break;c=zb(c,a[e]);d=y(d+"/"+a[e]);c.Va&&(!g||g&&b.ob)&&(c=c.Va.root);if(!g||b.Sa)for(g=0;40960===(c.mode&61440);)if(c=Fb(d),d=ib(fb(d),c),c=U(d,{jb:b.jb+1}).node,40<g++)throw new P(32);}return{path:d,node:c}},ha=a=>{for(var b;;){if(a===a.parent)return a=a.Ra.qb,b?"/"!==a[a.length-1]?a+"/"+b:a+b:a;b=b?a.name+"/"+b:a.name;a=a.parent}},Gb=(a,b)=>{for(var c=0,d=0;d<b.length;d++)c=(c<<5)-c+b.charCodeAt(d)|0;return(a+c>>>0)%T.length},Hb=a=>{var b=
Gb(a.parent.id,a.name);if(T[b]===a)T[b]=a.Wa;else for(b=T[b];b;){if(b.Wa===a){b.Wa=a.Wa;break}b=b.Wa}},zb=(a,b)=>{var c;if(c=(c=Ib(a,"x"))?c:a.Ga.lookup?0:2)throw new P(c,a);for(c=T[Gb(a.id,b)];c;c=c.Wa){var d=c.name;if(c.parent.id===a.id&&d===b)return c}return a.Ga.lookup(a,b)},xb=(a,b,c,d)=>{a=new Jb(a,b,c,d);b=Gb(a.parent.id,a.name);a.Wa=T[b];return T[b]=a},Kb={r:0,"r+":2,w:577,"w+":578,a:1089,"a+":1090},Lb=a=>{var b=["r","w","rw"][a&3];a&512&&(b+="w");return b},Ib=(a,b)=>{if(Eb)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},Mb=(a,b)=>{try{return zb(a,b),20}catch(c){}return Ib(a,"wx")},Nb=(a,b,c)=>{try{var d=zb(a,b)}catch(e){return e.Ka}if(a=Ib(a,"wx"))return a;if(c){if(16384!==(d.mode&61440))return 54;if(d===d.parent||"/"===ha(d))return 10}else if(16384===(d.mode&61440))return 31;return 0},Ob=(a=0)=>{for(;4096>=a;a++)if(!S[a])return a;throw new P(33);},Qb=(a,b)=>{Pb||(Pb=function(){this.$a={}},Pb.prototype={},
Object.defineProperties(Pb.prototype,{object:{get:function(){return this.node},set:function(c){this.node=c}},flags:{get:function(){return this.$a.flags},set:function(c){this.$a.flags=c}},position:{get:function(){return this.$a.position},set:function(c){this.$a.position=c}}}));a=Object.assign(new Pb,a);b=Ob(b);a.fd=b;return S[b]=a},wb={open:a=>{a.Ha=Cb[a.node.rdev].Ha;a.Ha.open&&a.Ha.open(a)},Ta:()=>{throw new P(70);}},mb=(a,b)=>{Cb[a]={Ha:b}},Rb=(a,b)=>{var c="/"===b,d=!b;if(c&&Bb)throw new P(10);
if(!c&&!d){var e=U(b,{ob:!1});b=e.path;e=e.node;if(e.Va)throw new P(10);if(16384!==(e.mode&61440))throw new P(54);}b={type:a,Ab:{},qb:b,ub:[]};a=a.Ra(b);a.Ra=b;b.root=a;c?Bb=a:e&&(e.Va=b,e.Ra&&e.Ra.ub.push(b))},ja=(a,b,c)=>{var d=U(a,{parent:!0}).node;a=gb(a);if(!a||"."===a||".."===a)throw new P(28);var e=Mb(d,a);if(e)throw new P(e);if(!d.Ga.ab)throw new P(63);return d.Ga.ab(d,a,b,c)},V=(a,b)=>ja(a,(void 0!==b?b:511)&1023|16384,0),Sb=(a,b,c)=>{"undefined"==typeof c&&(c=b,b=438);ja(a,b|8192,c)},Tb=
(a,b)=>{if(!ib(a))throw new P(44);var c=U(b,{parent:!0}).node;if(!c)throw new P(44);b=gb(b);var d=Mb(c,b);if(d)throw new P(d);if(!c.Ga.symlink)throw new P(63);c.Ga.symlink(c,b,a)},Ub=a=>{var b=U(a,{parent:!0}).node;a=gb(a);var c=zb(b,a),d=Nb(b,a,!0);if(d)throw new P(d);if(!b.Ga.rmdir)throw new P(63);if(c.Va)throw new P(10);b.Ga.rmdir(b,a);Hb(c)},va=a=>{var b=U(a,{parent:!0}).node;if(!b)throw new P(44);a=gb(a);var c=zb(b,a),d=Nb(b,a,!1);if(d)throw new P(d);if(!b.Ga.unlink)throw new P(63);if(c.Va)throw new P(10);
b.Ga.unlink(b,a);Hb(c)},Fb=a=>{a=U(a).node;if(!a)throw new P(44);if(!a.Ga.readlink)throw new P(28);return ib(ha(a.parent),a.Ga.readlink(a))},Vb=(a,b)=>{a=U(a,{Sa:!b}).node;if(!a)throw new P(44);if(!a.Ga.Pa)throw new P(63);return a.Ga.Pa(a)},Wb=a=>Vb(a,!0),ka=(a,b)=>{a="string"==typeof a?U(a,{Sa:!0}).node:a;if(!a.Ga.Oa)throw new P(63);a.Ga.Oa(a,{mode:b&4095|a.mode&-4096,timestamp:Date.now()})},Xb=(a,b)=>{if(0>b)throw new P(28);a="string"==typeof a?U(a,{Sa:!0}).node:a;if(!a.Ga.Oa)throw new P(63);if(16384===
(a.mode&61440))throw new P(31);if(32768!==(a.mode&61440))throw new P(28);var c=Ib(a,"w");if(c)throw new P(c);a.Ga.Oa(a,{size:b,timestamp:Date.now()})},la=(a,b,c)=>{if(""===a)throw new P(44);if("string"==typeof b){var d=Kb[b];if("undefined"==typeof d)throw Error("Unknown file open mode: "+b);b=d}c=b&64?("undefined"==typeof c?438:c)&4095|32768:0;if("object"==typeof a)var e=a;else{a=y(a);try{e=U(a,{Sa:!(b&131072)}).node}catch(g){}}d=!1;if(b&64)if(e){if(b&128)throw new P(20);}else e=ja(a,c,0),d=!0;if(!e)throw new P(44);
8192===(e.mode&61440)&&(b&=-513);if(b&65536&&16384!==(e.mode&61440))throw new P(54);if(!d&&(c=e?40960===(e.mode&61440)?32:16384===(e.mode&61440)&&("r"!==Lb(b)||b&512)?31:Ib(e,Lb(b)):44))throw new P(c);b&512&&!d&&Xb(e,0);b&=-131713;e=Qb({node:e,path:ha(e),flags:b,seekable:!0,position:0,Ha:e.Ha,yb:[],error:!1});e.Ha.open&&e.Ha.open(e);!Module.logReadFiles||b&1||(Yb||(Yb={}),a in Yb||(Yb[a]=1));return e},oa=a=>{if(null===a.fd)throw new P(8);a.gb&&(a.gb=null);try{a.Ha.close&&a.Ha.close(a)}catch(b){throw b;
}finally{S[a.fd]=null}a.fd=null},Zb=(a,b,c)=>{if(null===a.fd)throw new P(8);if(!a.seekable||!a.Ha.Ta)throw new P(70);if(0!=c&&1!=c&&2!=c)throw new P(28);a.position=a.Ha.Ta(a,b,c);a.yb=[]},$b=(a,b,c,d,e)=>{if(0>d||0>e)throw new P(28);if(null===a.fd)throw new P(8);if(1===(a.flags&2097155))throw new P(8);if(16384===(a.node.mode&61440))throw new P(31);if(!a.Ha.read)throw new P(28);var g="undefined"!=typeof e;if(!g)e=a.position;else if(!a.seekable)throw new P(70);b=a.Ha.read(a,b,c,d,e);g||(a.position+=
b);return b},na=(a,b,c,d,e)=>{if(0>d||0>e)throw new P(28);if(null===a.fd)throw new P(8);if(0===(a.flags&2097155))throw new P(8);if(16384===(a.node.mode&61440))throw new P(31);if(!a.Ha.write)throw new P(28);a.seekable&&a.flags&1024&&Zb(a,0,2);var g="undefined"!=typeof e;if(!g)e=a.position;else if(!a.seekable)throw new P(70);b=a.Ha.write(a,b,c,d,e,void 0);g||(a.position+=b);return b},ua=a=>{var b="binary";if("utf8"!==b&&"binary"!==b)throw Error('Invalid encoding type "'+b+'"');var c;var d=la(a,d||0);
a=Vb(a).size;var e=new Uint8Array(a);$b(d,e,0,a,0);"utf8"===b?c=Na(e,0):"binary"===b&&(c=e);oa(d);return c},ac=()=>{P||(P=function(a,b){this.node=b;this.xb=function(c){this.Ka=c};this.xb(a);this.message="FS error"},P.prototype=Error(),P.prototype.constructor=P,[44].forEach(a=>{yb[a]=new P(a);yb[a].stack="<generic error, no stack>"}))},bc,ia=(a,b)=>{var c=0;a&&(c|=365);b&&(c|=146);return c},dc=(a,b,c)=>{a=y("/dev/"+a);var d=ia(!!b,!!c);cc||(cc=64);var e=cc++<<8|0;mb(e,{open:g=>{g.seekable=!1},close:()=>
{c&&c.buffer&&c.buffer.length&&c(10)},read:(g,h,p,w)=>{for(var v=0,z=0;z<w;z++){try{var R=b()}catch(ob){throw new P(29);}if(void 0===R&&0===v)throw new P(6);if(null===R||void 0===R)break;v++;h[p+z]=R}v&&(g.node.timestamp=Date.now());return v},write:(g,h,p,w)=>{for(var v=0;v<w;v++)try{c(h[p+v])}catch(z){throw new P(29);}w&&(g.node.timestamp=Date.now());return v}});Sb(a,d,e)},cc,W={},Pb,Yb;
function ec(a,b,c){if("/"===b.charAt(0))return b;a=-100===a?"/":X(a).path;if(0==b.length){if(!c)throw new P(44);return a}return y(a+"/"+b)}
function fc(a,b,c){try{var d=a(b)}catch(e){if(e&&e.node&&y(b)!==y(ha(e.node)))return-54;throw e;}I[c>>2]=d.dev;I[c+8>>2]=d.ino;I[c+12>>2]=d.mode;J[c+16>>2]=d.nlink;I[c+20>>2]=d.uid;I[c+24>>2]=d.gid;I[c+28>>2]=d.rdev;O=[d.size>>>0,(N=d.size,1<=+Math.abs(N)?0<N?(Math.min(+Math.floor(N/4294967296),4294967295)|0)>>>0:~~+Math.ceil((N-+(~~N>>>0))/4294967296)>>>0:0)];I[c+40>>2]=O[0];I[c+44>>2]=O[1];I[c+48>>2]=4096;I[c+52>>2]=d.blocks;O=[Math.floor(d.atime.getTime()/1E3)>>>0,(N=Math.floor(d.atime.getTime()/
1E3),1<=+Math.abs(N)?0<N?(Math.min(+Math.floor(N/4294967296),4294967295)|0)>>>0:~~+Math.ceil((N-+(~~N>>>0))/4294967296)>>>0:0)];I[c+56>>2]=O[0];I[c+60>>2]=O[1];J[c+64>>2]=0;O=[Math.floor(d.mtime.getTime()/1E3)>>>0,(N=Math.floor(d.mtime.getTime()/1E3),1<=+Math.abs(N)?0<N?(Math.min(+Math.floor(N/4294967296),4294967295)|0)>>>0:~~+Math.ceil((N-+(~~N>>>0))/4294967296)>>>0:0)];I[c+72>>2]=O[0];I[c+76>>2]=O[1];J[c+80>>2]=0;O=[Math.floor(d.ctime.getTime()/1E3)>>>0,(N=Math.floor(d.ctime.getTime()/1E3),1<=+Math.abs(N)?
0<N?(Math.min(+Math.floor(N/4294967296),4294967295)|0)>>>0:~~+Math.ceil((N-+(~~N>>>0))/4294967296)>>>0:0)];I[c+88>>2]=O[0];I[c+92>>2]=O[1];J[c+96>>2]=0;O=[d.ino>>>0,(N=d.ino,1<=+Math.abs(N)?0<N?(Math.min(+Math.floor(N/4294967296),4294967295)|0)>>>0:~~+Math.ceil((N-+(~~N>>>0))/4294967296)>>>0:0)];I[c+104>>2]=O[0];I[c+108>>2]=O[1];return 0}var gc=void 0;function Ic(){gc+=4;return I[gc-4>>2]}function X(a){a=S[a];if(!a)throw new P(8);return a}function Kc(a){return J[a>>2]+4294967296*I[a+4>>2]}
function Lc(a){var b=ea(a)+1,c=fa(b);c&&r(a,q,c,b);return c}function Mc(a,b,c){function d(w){return(w=w.toTimeString().match(/\(([A-Za-z ]+)\)$/))?w[1]:"GMT"}var e=(new Date).getFullYear(),g=new Date(e,0,1),h=new Date(e,6,1);e=g.getTimezoneOffset();var p=h.getTimezoneOffset();I[a>>2]=60*Math.max(e,p);I[b>>2]=Number(e!=p);a=d(g);b=d(h);a=Lc(a);b=Lc(b);p<e?(J[c>>2]=a,J[c+4>>2]=b):(J[c>>2]=b,J[c+4>>2]=a)}function Nc(a,b,c){Nc.tb||(Nc.tb=!0,Mc(a,b,c))}var Oc;
Oc=Ca?()=>{var a=process.hrtime();return 1E3*a[0]+a[1]/1E6}:()=>performance.now();var Pc={};function Qc(){if(!Rc){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",_:za||"./this.program"},b;for(b in Pc)void 0===Pc[b]?delete a[b]:a[b]=Pc[b];var c=[];for(b in a)c.push(b+"="+a[b]);Rc=c}return Rc}var Rc,Z=void 0,Sc=[];
function xa(a,b){if(!Z){Z=new WeakMap;var c=K.length;if(Z)for(var d=0;d<0+c;d++){var e=K.get(d);e&&Z.set(e,d)}}if(Z.has(a))return Z.get(a);if(Sc.length)c=Sc.pop();else{try{K.grow(1)}catch(p){if(!(p instanceof RangeError))throw p;throw"Unable to grow wasm table. Set ALLOW_TABLE_GROWTH.";}c=K.length-1}try{K.set(c,a)}catch(p){if(!(p instanceof TypeError))throw p;if("function"==typeof WebAssembly.Function){d=WebAssembly.Function;e={i:"i32",j:"i64",f:"f32",d:"f64",p:"i32"};for(var g={parameters:[],results:"v"==
b[0]?[]:[e[b[0]]]},h=1;h<b.length;++h)g.parameters.push(e[b[h]]);b=new d(g,a)}else{d=[1,96];e=b.slice(0,1);b=b.slice(1);g={i:127,p:127,j:126,f:125,d:124};h=b.length;128>h?d.push(h):d.push(h%128|128,h>>7);for(h=0;h<b.length;++h)d.push(g[b[h]]);"v"==e?d.push(0):d.push(1,g[e]);b=[0,97,115,109,1,0,0,0,1];e=d.length;128>e?b.push(e):b.push(e%128|128,e>>7);b.push.apply(b,d);b.push(2,7,1,1,101,1,102,0,0,7,5,1,1,102,0,0);b=new WebAssembly.Module(new Uint8Array(b));b=(new WebAssembly.Instance(b,{e:{f:a}})).exports.f}K.set(c,
b)}Z.set(a,c);return c}function ta(a){Z.delete(K.get(a));Sc.push(a)}var Tc=0,Uc=1;function ca(a){var b=Tc==Uc?A(a.length):fa(a.length);a.subarray||a.slice||(a=new Uint8Array(a));t.set(a,b);return b}
function Vc(a,b,c,d){var e={string:v=>{var z=0;if(null!==v&&void 0!==v&&0!==v){var R=(v.length<<2)+1;z=A(R);r(v,t,z,R)}return z},array:v=>{var z=A(v.length);q.set(v,z);return z}};a=Module["_"+a];var g=[],h=0;if(d)for(var p=0;p<d.length;p++){var w=e[c[p]];w?(0===h&&(h=qa()),g[p]=w(d[p])):g[p]=d[p]}c=a.apply(null,g);return c=function(v){0!==h&&sa(h);return"string"===b?B(v):"boolean"===b?!!v:v}(c)}
function Jb(a,b,c,d){a||(a=this);this.parent=a;this.Ra=a.Ra;this.Va=null;this.id=Db++;this.name=b;this.mode=c;this.Ga={};this.Ha={};this.rdev=d}Object.defineProperties(Jb.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}}});ac();T=Array(4096);Rb(Q,"/");V("/tmp");V("/home");V("/home/web_user");
(()=>{V("/dev");mb(259,{read:()=>0,write:(b,c,d,e)=>e});Sb("/dev/null",259);kb(1280,ub);kb(1536,vb);Sb("/dev/tty",1280);Sb("/dev/tty1",1536);var a=hb();dc("random",a);dc("urandom",a);V("/dev/shm");V("/dev/shm/tmp")})();(()=>{V("/proc");var a=V("/proc/self");V("/proc/self/fd");Rb({Ra:()=>{var b=xb(a,"fd",16895,73);b.Ga={lookup:(c,d)=>{var e=S[+d];if(!e)throw new P(8);c={parent:null,Ra:{qb:"fake"},Ga:{readlink:()=>e.path}};return c.parent=c}};return b}},"/proc/self/fd")})();
var Xc={a:function(a,b,c,d){E("Assertion failed: "+B(a)+", at: "+[b?B(b):"unknown filename",c,d?B(d):"unknown function"])},h:function(a,b){try{return a=B(a),ka(a,b),0}catch(c){if("undefined"==typeof W||!(c instanceof P))throw c;return-c.Ka}},H:function(a,b,c){try{b=B(b);b=ec(a,b);if(c&-8)return-28;var d=U(b,{Sa:!0}).node;if(!d)return-44;a="";c&4&&(a+="r");c&2&&(a+="w");c&1&&(a+="x");return a&&Ib(d,a)?-2:0}catch(e){if("undefined"==typeof W||!(e instanceof P))throw e;return-e.Ka}},i:function(a,b){try{var c=
S[a];if(!c)throw new P(8);ka(c.node,b);return 0}catch(d){if("undefined"==typeof W||!(d instanceof P))throw d;return-d.Ka}},g:function(a){try{var b=S[a];if(!b)throw new P(8);var c=b.node;var d="string"==typeof c?U(c,{Sa:!0}).node:c;if(!d.Ga.Oa)throw new P(63);d.Ga.Oa(d,{timestamp:Date.now()});return 0}catch(e){if("undefined"==typeof W||!(e instanceof P))throw e;return-e.Ka}},b:function(a,b,c){gc=c;try{var d=X(a);switch(b){case 0:var e=Ic();return 0>e?-28:Qb(d,e).fd;case 1:case 2:return 0;case 3:return d.flags;
case 4:return e=Ic(),d.flags|=e,0;case 5:return e=Ic(),Pa[e+0>>1]=2,0;case 6:case 7:return 0;case 16:case 8:return-28;case 9:return I[Wc()>>2]=28,-1;default:return-28}}catch(g){if("undefined"==typeof W||!(g instanceof P))throw g;return-g.Ka}},G:function(a,b){try{var c=X(a);return fc(Vb,c.path,b)}catch(d){if("undefined"==typeof W||!(d instanceof P))throw d;return-d.Ka}},l:function(a,b,c){try{b=c+2097152>>>0<4194305-!!b?(b>>>0)+4294967296*c:NaN;if(isNaN(b))return-61;var d=S[a];if(!d)throw new P(8);
if(0===(d.flags&2097155))throw new P(28);Xb(d.node,b);return 0}catch(e){if("undefined"==typeof W||!(e instanceof P))throw e;return-e.Ka}},B:function(a,b){try{if(0===b)return-28;var c=ea("/")+1;if(b<c)return-68;r("/",t,a,b);return c}catch(d){if("undefined"==typeof W||!(d instanceof P))throw d;return-d.Ka}},E:function(a,b){try{return a=B(a),fc(Wb,a,b)}catch(c){if("undefined"==typeof W||!(c instanceof P))throw c;return-c.Ka}},y:function(a,b,c){try{return b=B(b),b=ec(a,b),b=y(b),"/"===b[b.length-1]&&
(b=b.substr(0,b.length-1)),V(b,c),0}catch(d){if("undefined"==typeof W||!(d instanceof P))throw d;return-d.Ka}},D:function(a,b,c,d){try{b=B(b);var e=d&256;b=ec(a,b,d&4096);return fc(e?Wb:Vb,b,c)}catch(g){if("undefined"==typeof W||!(g instanceof P))throw g;return-g.Ka}},v:function(a,b,c,d){gc=d;try{b=B(b);b=ec(a,b);var e=d?Ic():0;return la(b,c,e).fd}catch(g){if("undefined"==typeof W||!(g instanceof P))throw g;return-g.Ka}},t:function(a,b,c,d){try{b=B(b);b=ec(a,b);if(0>=d)return-28;var e=Fb(b),g=Math.min(d,
ea(e)),h=q[c+g];r(e,t,c,d+1);q[c+g]=h;return g}catch(p){if("undefined"==typeof W||!(p instanceof P))throw p;return-p.Ka}},s:function(a){try{return a=B(a),Ub(a),0}catch(b){if("undefined"==typeof W||!(b instanceof P))throw b;return-b.Ka}},F:function(a,b){try{return a=B(a),fc(Vb,a,b)}catch(c){if("undefined"==typeof W||!(c instanceof P))throw c;return-c.Ka}},p:function(a,b,c){try{return b=B(b),b=ec(a,b),0===c?va(b):512===c?Ub(b):E("Invalid flags passed to unlinkat"),0}catch(d){if("undefined"==typeof W||
!(d instanceof P))throw d;return-d.Ka}},o:function(a,b,c){try{b=B(b);b=ec(a,b,!0);if(c){var d=Kc(c),e=I[c+8>>2];g=1E3*d+e/1E6;c+=16;d=Kc(c);e=I[c+8>>2];h=1E3*d+e/1E6}else var g=Date.now(),h=g;a=g;var p=U(b,{Sa:!0}).node;p.Ga.Oa(p,{timestamp:Math.max(a,h)});return 0}catch(w){if("undefined"==typeof W||!(w instanceof P))throw w;return-w.Ka}},e:function(){return Date.now()},j:function(a,b){a=new Date(1E3*Kc(a));I[b>>2]=a.getSeconds();I[b+4>>2]=a.getMinutes();I[b+8>>2]=a.getHours();I[b+12>>2]=a.getDate();
I[b+16>>2]=a.getMonth();I[b+20>>2]=a.getFullYear()-1900;I[b+24>>2]=a.getDay();var c=new Date(a.getFullYear(),0,1);I[b+28>>2]=(a.getTime()-c.getTime())/864E5|0;I[b+36>>2]=-(60*a.getTimezoneOffset());var d=(new Date(a.getFullYear(),6,1)).getTimezoneOffset();c=c.getTimezoneOffset();I[b+32>>2]=(d!=c&&a.getTimezoneOffset()==Math.min(c,d))|0},w:function(a,b,c,d,e,g){try{var h=X(d);if(0!==(b&2)&&0===(c&2)&&2!==(h.flags&2097155))throw new P(2);if(1===(h.flags&2097155))throw new P(2);if(!h.Ha.bb)throw new P(43);
var p=h.Ha.bb(h,a,e,b,c);var w=p.vb;I[g>>2]=p.rb;return w}catch(v){if("undefined"==typeof W||!(v instanceof P))throw v;return-v.Ka}},x:function(a,b,c,d,e,g){try{var h=X(e);if(c&2){var p=t.slice(a,a+b);h&&h.Ha.cb&&h.Ha.cb(h,p,g,b,d)}}catch(w){if("undefined"==typeof W||!(w instanceof P))throw w;return-w.Ka}},n:Nc,q:function(){return 2147483648},d:Oc,c:function(a){var b=t.length;a>>>=0;if(2147483648<a)return!1;for(var c=1;4>=c;c*=2){var d=b*(1+.2/c);d=Math.min(d,a+100663296);var e=Math;d=Math.max(a,
d);e=e.min.call(e,2147483648,d+(65536-d%65536)%65536);a:{try{Ka.grow(e-Oa.byteLength+65535>>>16);Sa();var g=1;break a}catch(h){}g=void 0}if(g)return!0}return!1},z:function(a,b){var c=0;Qc().forEach(function(d,e){var g=b+c;e=J[a+4*e>>2]=g;for(g=0;g<d.length;++g)q[e++>>0]=d.charCodeAt(g);q[e>>0]=0;c+=d.length+1});return 0},A:function(a,b){var c=Qc();J[a>>2]=c.length;var d=0;c.forEach(function(e){d+=e.length+1});J[b>>2]=d;return 0},f:function(a){try{var b=X(a);oa(b);return 0}catch(c){if("undefined"==
typeof W||!(c instanceof P))throw c;return c.Ka}},m:function(a,b){try{var c=X(a);q[b>>0]=c.tty?2:16384===(c.mode&61440)?3:40960===(c.mode&61440)?7:4;return 0}catch(d){if("undefined"==typeof W||!(d instanceof P))throw d;return d.Ka}},u:function(a,b,c,d){try{a:{var e=X(a);a=b;for(var g=b=0;g<c;g++){var h=J[a>>2],p=J[a+4>>2];a+=8;var w=$b(e,q,h,p);if(0>w){var v=-1;break a}b+=w;if(w<p)break}v=b}J[d>>2]=v;return 0}catch(z){if("undefined"==typeof W||!(z instanceof P))throw z;return z.Ka}},k:function(a,
b,c,d,e){try{b=c+2097152>>>0<4194305-!!b?(b>>>0)+4294967296*c:NaN;if(isNaN(b))return 61;var g=X(a);Zb(g,b,d);O=[g.position>>>0,(N=g.position,1<=+Math.abs(N)?0<N?(Math.min(+Math.floor(N/4294967296),4294967295)|0)>>>0:~~+Math.ceil((N-+(~~N>>>0))/4294967296)>>>0:0)];I[e>>2]=O[0];I[e+4>>2]=O[1];g.gb&&0===b&&0===d&&(g.gb=null);return 0}catch(h){if("undefined"==typeof W||!(h instanceof P))throw h;return h.Ka}},C:function(a){try{var b=X(a);return b.Ha&&b.Ha.fsync?b.Ha.fsync(b):0}catch(c){if("undefined"==
typeof W||!(c instanceof P))throw c;return c.Ka}},r:function(a,b,c,d){try{a:{var e=X(a);a=b;for(var g=b=0;g<c;g++){var h=J[a>>2],p=J[a+4>>2];a+=8;var w=na(e,q,h,p);if(0>w){var v=-1;break a}b+=w}v=b}J[d>>2]=v;return 0}catch(z){if("undefined"==typeof W||!(z instanceof P))throw z;return z.Ka}}};
(function(){function a(e){Module.asm=e.exports;Ka=Module.asm.I;Sa();K=Module.asm.Aa;Ua.unshift(Module.asm.J);Xa--;Module.monitorRunDependencies&&Module.monitorRunDependencies(Xa);0==Xa&&(null!==Ya&&(clearInterval(Ya),Ya=null),Za&&(e=Za,Za=null,e()))}function b(e){a(e.instance)}function c(e){return cb().then(function(g){return WebAssembly.instantiate(g,d)}).then(function(g){return g}).then(e,function(g){D("failed to asynchronously prepare wasm: "+g);E(g)})}var d={a:Xc};Xa++;Module.monitorRunDependencies&&
Module.monitorRunDependencies(Xa);if(Module.instantiateWasm)try{return Module.instantiateWasm(d,a)}catch(e){return D("Module.instantiateWasm callback failed with error: "+e),!1}(function(){return Ja||"function"!=typeof WebAssembly.instantiateStreaming||$a()||M.startsWith("file://")||Ca||"function"!=typeof fetch?c(b):fetch(M,{credentials:"same-origin"}).then(function(e){return WebAssembly.instantiateStreaming(e,d).then(b,function(g){D("wasm streaming compile failed: "+g);D("falling back to ArrayBuffer instantiation");
return c(b)})})})().catch(ba);return{}})();Module.___wasm_call_ctors=function(){return(Module.___wasm_call_ctors=Module.asm.J).apply(null,arguments)};Module._sqlite3_free=function(){return(Module._sqlite3_free=Module.asm.K).apply(null,arguments)};Module._sqlite3_value_double=function(){return(Module._sqlite3_value_double=Module.asm.L).apply(null,arguments)};Module._sqlite3_value_text=function(){return(Module._sqlite3_value_text=Module.asm.M).apply(null,arguments)};
var Wc=Module.___errno_location=function(){return(Wc=Module.___errno_location=Module.asm.N).apply(null,arguments)};Module._sqlite3_prepare_v2=function(){return(Module._sqlite3_prepare_v2=Module.asm.O).apply(null,arguments)};Module._sqlite3_step=function(){return(Module._sqlite3_step=Module.asm.P).apply(null,arguments)};Module._sqlite3_finalize=function(){return(Module._sqlite3_finalize=Module.asm.Q).apply(null,arguments)};
Module._sqlite3_reset=function(){return(Module._sqlite3_reset=Module.asm.R).apply(null,arguments)};Module._sqlite3_value_int=function(){return(Module._sqlite3_value_int=Module.asm.S).apply(null,arguments)};Module._sqlite3_clear_bindings=function(){return(Module._sqlite3_clear_bindings=Module.asm.T).apply(null,arguments)};Module._sqlite3_value_blob=function(){return(Module._sqlite3_value_blob=Module.asm.U).apply(null,arguments)};
Module._sqlite3_value_bytes=function(){return(Module._sqlite3_value_bytes=Module.asm.V).apply(null,arguments)};Module._sqlite3_value_type=function(){return(Module._sqlite3_value_type=Module.asm.W).apply(null,arguments)};Module._sqlite3_result_blob=function(){return(Module._sqlite3_result_blob=Module.asm.X).apply(null,arguments)};Module._sqlite3_result_double=function(){return(Module._sqlite3_result_double=Module.asm.Y).apply(null,arguments)};
Module._sqlite3_result_error=function(){return(Module._sqlite3_result_error=Module.asm.Z).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.$).apply(null,arguments)};Module._sqlite3_result_null=function(){return(Module._sqlite3_result_null=Module.asm.aa).apply(null,arguments)};
Module._sqlite3_result_text=function(){return(Module._sqlite3_result_text=Module.asm.ba).apply(null,arguments)};Module._sqlite3_sql=function(){return(Module._sqlite3_sql=Module.asm.ca).apply(null,arguments)};Module._sqlite3_aggregate_context=function(){return(Module._sqlite3_aggregate_context=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 fa=Module._malloc=function(){return(fa=Module._malloc=Module.asm.ya).apply(null,arguments)},da=Module._free=function(){return(da=Module._free=Module.asm.za).apply(null,arguments)};Module._RegisterExtensionFunctions=function(){return(Module._RegisterExtensionFunctions=Module.asm.Ba).apply(null,arguments)};
var Ab=Module._emscripten_builtin_memalign=function(){return(Ab=Module._emscripten_builtin_memalign=Module.asm.Ca).apply(null,arguments)},qa=Module.stackSave=function(){return(qa=Module.stackSave=Module.asm.Da).apply(null,arguments)},sa=Module.stackRestore=function(){return(sa=Module.stackRestore=Module.asm.Ea).apply(null,arguments)},A=Module.stackAlloc=function(){return(A=Module.stackAlloc=Module.asm.Fa).apply(null,arguments)};Module.UTF8ToString=B;Module.stackAlloc=A;Module.stackSave=qa;
Module.stackRestore=sa;Module.cwrap=function(a,b,c,d){c=c||[];var e=c.every(g=>"number"===g||"boolean"===g);return"string"!==b&&e&&!d?Module["_"+a]:function(){return Vc(a,b,c,arguments)}};var Yc;Za=function Zc(){Yc||$c();Yc||(Za=Zc)};
function $c(){function a(){if(!Yc&&(Yc=!0,Module.calledRun=!0,!La)){Module.noFSInit||bc||(bc=!0,ac(),Module.stdin=Module.stdin,Module.stdout=Module.stdout,Module.stderr=Module.stderr,Module.stdin?dc("stdin",Module.stdin):Tb("/dev/tty","/dev/stdin"),Module.stdout?dc("stdout",null,Module.stdout):Tb("/dev/tty","/dev/stdout"),Module.stderr?dc("stderr",null,Module.stderr):Tb("/dev/tty1","/dev/stderr"),la("/dev/stdin",0),la("/dev/stdout",1),la("/dev/stderr",1));Eb=!1;db(Ua);aa(Module);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)}db(Va)}}if(!(0<Xa)){if(Module.preRun)for("function"==typeof Module.preRun&&(Module.preRun=[Module.preRun]);Module.preRun.length;)Wa();db(Ta);0<Xa||(Module.setStatus?(Module.setStatus("Running..."),setTimeout(function(){setTimeout(function(){Module.setStatus("")},1);a()},1)):a())}}
if(Module.preInit)for("function"==typeof Module.preInit&&(Module.preInit=[Module.preInit]);0<Module.preInit.length;)Module.preInit.pop()();$c();


  return Module.ready
}
);
})();
if (typeof exports === 'object' && typeof module === 'object')
  module.exports = Module;
else if (typeof define === 'function' && define['amd'])
  define([], function() { return Module; });
else if (typeof exports === 'object')
  exports["Module"] = Module;
/* global initSqlJs */
/* eslint-env worker */
/* eslint no-restricted-globals: ["error"] */

"use strict";

var db;

function onModuleReady(SQL) {
    function createDb(data) {
        if (db != null) db.close();
        db = new SQL.Database(data);
        return db;
    }

    var buff; var data; var result;
    data = this["data"];
    var config = data["config"] ? data["config"] : {};
    switch (data && data["action"]) {
        case "open":
            buff = data["buffer"];
            createDb(buff && new Uint8Array(buff));
            return postMessage({
                id: data["id"],
                ready: true
            });
        case "exec":
            if (db === null) {
                createDb();
            }
            if (!data["sql"]) {
                throw "exec: Missing query string";
            }
            return postMessage({
                id: data["id"],
                results: db.exec(data["sql"], data["params"], config)
            });
        case "each":
            if (db === null) {
                createDb();
            }
            var callback = function callback(row) {
                return postMessage({
                    id: data["id"],
                    row: row,
                    finished: false
                });
            };
            var done = function done() {
                return postMessage({
                    id: data["id"],
                    finished: true
                });
            };
            return db.each(data["sql"], data["params"], callback, done, config);
        case "export":
            buff = db["export"]();
            result = {
                id: data["id"],
                buffer: buff
            };
            try {
                return postMessage(result, [result]);
            } catch (error) {
                return postMessage(result);
            }
        case "close":
            if (db) {
                db.close();
            }
            return postMessage({
                id: data["id"]
            });
        default:
            throw new Error("Invalid action : " + (data && data["action"]));
    }
}

function onError(err) {
    return postMessage({
        id: this["data"]["id"],
        error: err["message"]
    });
}

if (typeof importScripts === "function") {
    db = null;
    var sqlModuleReady = initSqlJs();
    self.onmessage = function onmessage(event) {
        return sqlModuleReady
            .then(onModuleReady.bind(event))
            .catch(onError.bind(event));
    };
}
