@edpire/sdk 0.6.4 → 0.6.7
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/README.md +445 -443
- package/bin/create.js +0 -0
- package/dist/chunk-76CZ6Z7T.mjs +1 -0
- package/dist/client.d.mts +44 -3
- package/dist/client.mjs +15 -5
- package/dist/core.d.mts +149 -0
- package/dist/core.mjs +1 -0
- package/dist/dist-UCCG7PHU.mjs +11 -0
- package/dist/esm-RQP7AIMT.mjs +136 -0
- package/dist/index.d.mts +8 -1
- package/dist/index.mjs +52 -7
- package/dist/react.d.mts +9 -1
- package/dist/react.mjs +52 -7
- package/dist/sql-wasm-browser-NICPVFVD.mjs +2 -0
- package/dist/umd/index.global.js +454 -251
- package/examples/nextjs/README.md +66 -66
- package/examples/vite-express/README.md +69 -69
- package/examples/vite-express/server.ts +96 -90
- package/examples/vite-express/src/App.tsx +56 -56
- package/package.json +17 -11
- package/src/styles/runtime-utilities.css +1 -1
- package/src/styles/shell.css +1 -1
|
@@ -0,0 +1,2 @@
|
|
|
1
|
+
import{a as Cr,c as W}from"./chunk-76CZ6Z7T.mjs";var Gr=Cr((Lt,ht)=>{var Rt=void 0,St=function(re){return Rt||(Rt=new Promise(function(Je,He){var I=typeof re<"u"?re:{},ne=I.onAbort;I.onAbort=function(t){He(new Error(t)),ne&&ne(t)},I.postRun=I.postRun||[],I.postRun.push(function(){Je(I)}),ht=void 0;var s;s||(s=typeof I<"u"?I:{});var Ke=!!globalThis.window,xt=!!globalThis.WorkerGlobalScope;s.onRuntimeInitialized=function(){function t(o,l){switch(typeof l){case"boolean":Xr(o,l?1:0);break;case"number":Fr(o,l);break;case"string":Vr(o,l,-1,-1);break;case"object":if(l===null)Xe(o);else if(l.length!=null){var h=qt(l.length);k.set(l,h),Yr(o,h,l.length,-1),ft(h)}else At(o,"Wrong API use : tried to return a value of an unknown type ("+l+").",-1);break;default:Xe(o)}}function e(o,l){for(var h=[],b=0;b<o;b+=1){var w=j(l+4*b,"i32"),d=Qr(w);if(d===1||d===2)w=Wr(w);else if(d===3)w=$r(w);else if(d===4){d=w,w=zr(d),d=Br(d);for(var T=new Uint8Array(w),x=0;x<w;x+=1)T[x]=k[d+x];w=T}else w=null;h.push(w)}return h}function r(o,l){this.Qa=o,this.db=l,this.Oa=1,this.yb=[]}function n(o,l){if(this.db=l,this.ob=Et(o),this.ob===null)throw Error("Unable to allocate memory for the SQL string");this.ub=this.ob,this.gb=this.Fb=null}function i(o){if(this.filename="dbfile_"+(4294967295*Math.random()>>>0),o!=null){var l=this.filename,h="/",b=l;if(h&&(h=typeof h=="string"?h:Bt(h),b=l?Qt(h+"/"+l):h),l=ve(!0,!0),b=cr(b,l),o){if(typeof o=="string"){h=Array(o.length);for(var w=0,d=o.length;w<d;++w)h[w]=o.charCodeAt(w);o=h}yt(b,l|146),h=et(b,577),Pe(h,o,0,o.length,0),Zt(h),yt(b,l)}}this.handleError(p(this.filename,a)),this.db=j(a,"i32"),Ce(this.db),this.pb={},this.Sa={}}var a=C(4),u=s.cwrap,p=u("sqlite3_open","number",["string","number"]),y=u("sqlite3_close_v2","number",["number"]),m=u("sqlite3_exec","number",["number","string","number","number","number"]),g=u("sqlite3_changes","number",["number"]),M=u("sqlite3_prepare_v2","number",["number","string","number","number","number"]),Be=u("sqlite3_sql","string",["number"]),Er=u("sqlite3_normalized_sql","string",["number"]),We=u("sqlite3_prepare_v2","number",["number","number","number","number","number"]),qr=u("sqlite3_bind_text","number",["number","number","number","number","number"]),Fe=u("sqlite3_bind_blob","number",["number","number","number","number","number"]),kr=u("sqlite3_bind_double","number",["number","number","number"]),Mr=u("sqlite3_bind_int","number",["number","number","number"]),Nr=u("sqlite3_bind_parameter_index","number",["number","string"]),Ar=u("sqlite3_step","number",["number"]),Rr=u("sqlite3_errmsg","string",["number"]),Sr=u("sqlite3_column_count","number",["number"]),Lr=u("sqlite3_data_count","number",["number"]),xr=u("sqlite3_column_double","number",["number","number"]),Ve=u("sqlite3_column_text","string",["number","number"]),Or=u("sqlite3_column_blob","number",["number","number"]),Tr=u("sqlite3_column_bytes","number",["number","number"]),Pr=u("sqlite3_column_type","number",["number","number"]),Ur=u("sqlite3_column_name","string",["number","number"]),Dr=u("sqlite3_reset","number",["number"]),Ir=u("sqlite3_clear_bindings","number",["number"]),jr=u("sqlite3_finalize","number",["number"]),Ye=u("sqlite3_create_function_v2","number","number string number number number number number number number".split(" ")),Qr=u("sqlite3_value_type","number",["number"]),zr=u("sqlite3_value_bytes","number",["number"]),$r=u("sqlite3_value_text","string",["number"]),Br=u("sqlite3_value_blob","number",["number"]),Wr=u("sqlite3_value_double","number",["number"]),Fr=u("sqlite3_result_double","",["number","number"]),Xe=u("sqlite3_result_null","",["number"]),Vr=u("sqlite3_result_text","",["number","string","number","number"]),Yr=u("sqlite3_result_blob","",["number","number","number","number"]),Xr=u("sqlite3_result_int","",["number","number"]),At=u("sqlite3_result_error","",["number","string","number"]),Ze=u("sqlite3_aggregate_context","number",["number","number"]),Ce=u("RegisterExtensionFunctions","number",["number"]),Ge=u("sqlite3_update_hook","number",["number","number","number"]);r.prototype.bind=function(o){if(!this.Qa)throw"Statement closed";return this.reset(),Array.isArray(o)?this.Wb(o):o!=null&&typeof o=="object"?this.Xb(o):!0},r.prototype.step=function(){if(!this.Qa)throw"Statement closed";this.Oa=1;var o=Ar(this.Qa);switch(o){case 100:return!0;case 101:return!1;default:throw this.db.handleError(o)}},r.prototype.Pb=function(o){return o==null&&(o=this.Oa,this.Oa+=1),xr(this.Qa,o)},r.prototype.hc=function(o){if(o==null&&(o=this.Oa,this.Oa+=1),o=Ve(this.Qa,o),typeof BigInt!="function")throw Error("BigInt is not supported");return BigInt(o)},r.prototype.mc=function(o){return o==null&&(o=this.Oa,this.Oa+=1),Ve(this.Qa,o)},r.prototype.getBlob=function(o){o==null&&(o=this.Oa,this.Oa+=1);var l=Tr(this.Qa,o);o=Or(this.Qa,o);for(var h=new Uint8Array(l),b=0;b<l;b+=1)h[b]=k[o+b];return h},r.prototype.get=function(o,l){l=l||{},o!=null&&this.bind(o)&&this.step(),o=[];for(var h=Lr(this.Qa),b=0;b<h;b+=1)switch(Pr(this.Qa,b)){case 1:var w=l.useBigInt?this.hc(b):this.Pb(b);o.push(w);break;case 2:o.push(this.Pb(b));break;case 3:o.push(this.mc(b));break;case 4:o.push(this.getBlob(b));break;default:o.push(null)}return o},r.prototype.Db=function(){for(var o=[],l=Sr(this.Qa),h=0;h<l;h+=1)o.push(Ur(this.Qa,h));return o},r.prototype.Ob=function(o,l){o=this.get(o,l),l=this.Db();for(var h={},b=0;b<l.length;b+=1)h[l[b]]=o[b];return h},r.prototype.lc=function(){return Be(this.Qa)},r.prototype.ic=function(){return Er(this.Qa)},r.prototype.Jb=function(o){return o!=null&&this.bind(o),this.step(),this.reset()},r.prototype.Lb=function(o,l){l==null&&(l=this.Oa,this.Oa+=1),o=Et(o),this.yb.push(o),this.db.handleError(qr(this.Qa,l,o,-1,0))},r.prototype.Vb=function(o,l){l==null&&(l=this.Oa,this.Oa+=1);var h=qt(o.length);k.set(o,h),this.yb.push(h),this.db.handleError(Fe(this.Qa,l,h,o.length,0))},r.prototype.Kb=function(o,l){l==null&&(l=this.Oa,this.Oa+=1),this.db.handleError((o===(o|0)?Mr:kr)(this.Qa,l,o))},r.prototype.Yb=function(o){o==null&&(o=this.Oa,this.Oa+=1),Fe(this.Qa,o,0,0,0)},r.prototype.Mb=function(o,l){switch(l==null&&(l=this.Oa,this.Oa+=1),typeof o){case"string":this.Lb(o,l);return;case"number":this.Kb(o,l);return;case"bigint":this.Lb(o.toString(),l);return;case"boolean":this.Kb(o+0,l);return;case"object":if(o===null){this.Yb(l);return}if(o.length!=null){this.Vb(o,l);return}}throw"Wrong API use : tried to bind a value of an unknown type ("+o+")."},r.prototype.Xb=function(o){var l=this;return Object.keys(o).forEach(function(h){var b=Nr(l.Qa,h);b!==0&&l.Mb(o[h],b)}),!0},r.prototype.Wb=function(o){for(var l=0;l<o.length;l+=1)this.Mb(o[l],l+1);return!0},r.prototype.reset=function(){return this.Cb(),Ir(this.Qa)===0&&Dr(this.Qa)===0},r.prototype.Cb=function(){for(var o;(o=this.yb.pop())!==void 0;)ft(o)},r.prototype.cb=function(){this.Cb();var o=jr(this.Qa)===0;return delete this.db.pb[this.Qa],this.Qa=0,o},n.prototype.next=function(){if(this.ob===null)return{done:!0};if(this.gb!==null&&(this.gb.cb(),this.gb=null),!this.db.db)throw this.Ab(),Error("Database closed");var o=Mt(),l=C(4);ot(a),ot(l);try{this.db.handleError(We(this.db.db,this.ub,-1,a,l)),this.ub=j(l,"i32");var h=j(a,"i32");return h===0?(this.Ab(),{done:!0}):(this.gb=new r(h,this.db),this.db.pb[h]=this.gb,{value:this.gb,done:!1})}catch(b){throw this.Fb=q(this.ub),this.Ab(),b}finally{kt(o)}},n.prototype.Ab=function(){ft(this.ob),this.ob=null},n.prototype.jc=function(){return this.Fb!==null?this.Fb:q(this.ub)},typeof Symbol=="function"&&typeof Symbol.iterator=="symbol"&&(n.prototype[Symbol.iterator]=function(){return this}),i.prototype.Jb=function(o,l){if(!this.db)throw"Database closed";if(l){o=this.Gb(o,l);try{o.step()}finally{o.cb()}}else this.handleError(m(this.db,o,0,0,a));return this},i.prototype.exec=function(o,l,h){if(!this.db)throw"Database closed";var b=null,w=null,d=null;try{d=w=Et(o);var T=C(4);for(o=[];j(d,"i8")!==0;){ot(a),ot(T),this.handleError(We(this.db,d,-1,a,T));var x=j(a,"i32");if(d=j(T,"i32"),x!==0){var S=null;for(b=new r(x,this),l!=null&&b.bind(l);b.step();)S===null&&(S={columns:b.Db(),values:[]},o.push(S)),S.values.push(b.get(null,h));b.cb()}}return o}catch(P){throw b&&b.cb(),P}finally{w&&ft(w)}},i.prototype.ec=function(o,l,h,b,w){typeof l=="function"&&(b=h,h=l,l=void 0),o=this.Gb(o,l);try{for(;o.step();)h(o.Ob(null,w))}finally{o.cb()}if(typeof b=="function")return b()},i.prototype.Gb=function(o,l){if(ot(a),this.handleError(M(this.db,o,-1,a,0)),o=j(a,"i32"),o===0)throw"Nothing to prepare";var h=new r(o,this);return l!=null&&h.bind(l),this.pb[o]=h},i.prototype.pc=function(o){return new n(o,this)},i.prototype.fc=function(){Object.values(this.pb).forEach(function(l){l.cb()}),Object.values(this.Sa).forEach($),this.Sa={},this.handleError(y(this.db));var o=mr(this.filename);return this.handleError(p(this.filename,a)),this.db=j(a,"i32"),Ce(this.db),o},i.prototype.close=function(){this.db!==null&&(Object.values(this.pb).forEach(function(o){o.cb()}),Object.values(this.Sa).forEach($),this.Sa={},this.fb&&($(this.fb),this.fb=void 0),this.handleError(y(this.db)),Se("/"+this.filename),this.db=null)},i.prototype.handleError=function(o){if(o===0)return null;throw o=Rr(this.db),Error(o)},i.prototype.kc=function(){return g(this.db)},i.prototype.bc=function(o,l){Object.prototype.hasOwnProperty.call(this.Sa,o)&&($(this.Sa[o]),delete this.Sa[o]);var h=lt(function(b,w,d){w=e(w,d);try{var T=l.apply(null,w)}catch(x){At(b,x,-1);return}t(b,T)},"viii");return this.Sa[o]=h,this.handleError(Ye(this.db,o,l.length,1,0,h,0,0,0)),this},i.prototype.ac=function(o,l){var h=l.init||function(){return null},b=l.finalize||function(S){return S},w=l.step;if(!w)throw"An aggregate function must have a step function in "+o;var d={};Object.hasOwnProperty.call(this.Sa,o)&&($(this.Sa[o]),delete this.Sa[o]),l=o+"__finalize",Object.hasOwnProperty.call(this.Sa,l)&&($(this.Sa[l]),delete this.Sa[l]);var T=lt(function(S,P,ee){var G=Ze(S,1);Object.hasOwnProperty.call(d,G)||(d[G]=h()),P=e(P,ee),P=[d[G]].concat(P);try{d[G]=w.apply(null,P)}catch(Zr){delete d[G],At(S,Zr,-1)}},"viii"),x=lt(function(S){var P=Ze(S,1);try{var ee=b(d[P])}catch(G){delete d[P],At(S,G,-1);return}t(S,ee),delete d[P]},"vi");return this.Sa[o]=T,this.Sa[l]=x,this.handleError(Ye(this.db,o,w.length-1,1,0,0,T,x,0)),this},i.prototype.vc=function(o){return this.fb&&(Ge(this.db,0,0),$(this.fb),this.fb=void 0),o?(this.fb=lt(function(l,h,b,w,d){switch(h){case 18:l="insert";break;case 23:l="update";break;case 9:l="delete";break;default:throw"unknown operationCode in updateHook callback: "+h}if(b=q(b),w=q(w),d>Number.MAX_SAFE_INTEGER)throw"rowId too big to fit inside a Number";o(l,b,w,Number(d))},"viiiij"),Ge(this.db,this.fb,0),this):this},r.prototype.bind=r.prototype.bind,r.prototype.step=r.prototype.step,r.prototype.get=r.prototype.get,r.prototype.getColumnNames=r.prototype.Db,r.prototype.getAsObject=r.prototype.Ob,r.prototype.getSQL=r.prototype.lc,r.prototype.getNormalizedSQL=r.prototype.ic,r.prototype.run=r.prototype.Jb,r.prototype.reset=r.prototype.reset,r.prototype.freemem=r.prototype.Cb,r.prototype.free=r.prototype.cb,n.prototype.next=n.prototype.next,n.prototype.getRemainingSQL=n.prototype.jc,i.prototype.run=i.prototype.Jb,i.prototype.exec=i.prototype.exec,i.prototype.each=i.prototype.ec,i.prototype.prepare=i.prototype.Gb,i.prototype.iterateStatements=i.prototype.pc,i.prototype.export=i.prototype.fc,i.prototype.close=i.prototype.close,i.prototype.handleError=i.prototype.handleError,i.prototype.getRowsModified=i.prototype.kc,i.prototype.create_function=i.prototype.bc,i.prototype.create_aggregate=i.prototype.ac,i.prototype.updateHook=i.prototype.vc,s.Database=i};var ie="./this.program",oe=globalThis.document?.currentScript?.src;xt&&(oe=self.location.href);var Ot="",ae,Tt;if(Ke||xt){try{Ot=new URL(".",oe).href}catch{}xt&&(Tt=t=>{var e=new XMLHttpRequest;return e.open("GET",t,!1),e.responseType="arraybuffer",e.send(null),new Uint8Array(e.response)}),ae=async t=>{if(t=await fetch(t,{credentials:"same-origin"}),t.ok)return t.arrayBuffer();throw Error(t.status+" : "+t.url)}}var Pt=console.log.bind(console),F=console.error.bind(console),rt,bt=!1,Ut,k,N,nt,E,v,Dt,It,O;function ue(){var t=Nt.buffer;k=new Int8Array(t),nt=new Int16Array(t),N=new Uint8Array(t),new Uint16Array(t),E=new Int32Array(t),v=new Uint32Array(t),Dt=new Float32Array(t),It=new Float64Array(t),O=new BigInt64Array(t),new BigUint64Array(t)}function J(t){throw s.onAbort?.(t),t="Aborted("+t+")",F(t),bt=!0,new WebAssembly.RuntimeError(t+". Build with -sASSERTIONS for more info.")}var jt;async function tr(t){if(!rt)try{var e=await ae(t);return new Uint8Array(e)}catch{}if(t==jt&&rt)t=new Uint8Array(rt);else if(Tt)t=Tt(t);else throw"both async and sync fetching of the wasm failed";return t}async function er(t,e){try{var r=await tr(t);return await WebAssembly.instantiate(r,e)}catch(n){F(`failed to asynchronously prepare wasm: ${n}`),J(n)}}async function rr(t){var e=jt;if(!rt)try{var r=fetch(e,{credentials:"same-origin"});return await WebAssembly.instantiateStreaming(r,t)}catch(n){F(`wasm streaming compile failed: ${n}`),F("falling back to ArrayBuffer instantiation")}return er(e,t)}class se{constructor(e){W(this,"name","ExitStatus");this.message=`Program terminated with exit(${e})`,this.status=e}}var le=t=>{for(;0<t.length;)t.shift()(s)},fe=[],he=[],nr=()=>{var t=s.preRun.shift();he.push(t)},V=0,it=null;function j(t,e="i8"){switch(e.endsWith("*")&&(e="*"),e){case"i1":return k[t];case"i8":return k[t];case"i16":return nt[t>>1];case"i32":return E[t>>2];case"i64":return O[t>>3];case"float":return Dt[t>>2];case"double":return It[t>>3];case"*":return v[t>>2];default:J(`invalid type for getValue: ${e}`)}}var pt=!0;function ot(t){var e="i32";switch(e.endsWith("*")&&(e="*"),e){case"i1":k[t]=0;break;case"i8":k[t]=0;break;case"i16":nt[t>>1]=0;break;case"i32":E[t>>2]=0;break;case"i64":O[t>>3]=BigInt(0);break;case"float":Dt[t>>2]=0;break;case"double":It[t>>3]=0;break;case"*":v[t>>2]=0;break;default:J(`invalid type for setValue: ${e}`)}}var be=new TextDecoder,pe=(t,e,r,n)=>{if(r=e+r,n)return r;for(;t[e]&&!(e>=r);)++e;return e},q=(t,e,r)=>t?be.decode(N.subarray(t,pe(N,t,e,r))):"",ce=(t,e)=>{for(var r=0,n=t.length-1;0<=n;n--){var i=t[n];i==="."?t.splice(n,1):i===".."?(t.splice(n,1),r++):r&&(t.splice(n,1),r--)}if(e)for(;r;r--)t.unshift("..");return t},Qt=t=>{var e=t.charAt(0)==="/",r=t.slice(-1)==="/";return(t=ce(t.split("/").filter(n=>!!n),!e).join("/"))||e||(t="."),t&&r&&(t+="/"),(e?"/":"")+t},me=t=>{var e=/^(\/?|)([\s\S]*?)((?:\.{1,2}|[^\/]+?|)(\.[^.\/]*|))(?:[\/]*)$/.exec(t).slice(1);return t=e[0],e=e[1],!t&&!e?".":(e&&(e=e.slice(0,-1)),t+e)},ct=t=>t&&t.match(/([^\/]+|\/)\/*$/)[1],ir=()=>t=>crypto.getRandomValues(t),we=t=>{(we=ir())(t)},or=(...t)=>{for(var e="",r=!1,n=t.length-1;-1<=n&&!r;n--){if(r=0<=n?t[n]:"/",typeof r!="string")throw new TypeError("Arguments to path.resolve must be strings");if(!r)return"";e=r+"/"+e,r=r.charAt(0)==="/"}return e=ce(e.split("/").filter(i=>!!i),!r).join("/"),(r?"/":"")+e||"."},at=t=>{var e=pe(t,0);return be.decode(t.buffer?t.subarray(0,e):new Uint8Array(t.slice(0,e)))},zt=[],H=t=>{for(var e=0,r=0;r<t.length;++r){var n=t.charCodeAt(r);127>=n?e++:2047>=n?e+=2:55296<=n&&57343>=n?(e+=4,++r):e+=3}return e},U=(t,e,r,n)=>{if(!(0<n))return 0;var i=r;n=r+n-1;for(var a=0;a<t.length;++a){var u=t.codePointAt(a);if(127>=u){if(r>=n)break;e[r++]=u}else if(2047>=u){if(r+1>=n)break;e[r++]=192|u>>6,e[r++]=128|u&63}else if(65535>=u){if(r+2>=n)break;e[r++]=224|u>>12,e[r++]=128|u>>6&63,e[r++]=128|u&63}else{if(r+3>=n)break;e[r++]=240|u>>18,e[r++]=128|u>>12&63,e[r++]=128|u>>6&63,e[r++]=128|u&63,a++}}return e[r]=0,r-i},de=[];function ye(t,e){de[t]={input:[],output:[],kb:e},Yt(t,ar)}var ar={open(t){var e=de[t.node.nb];if(!e)throw new f(43);t.Va=e,t.seekable=!1},close(t){t.Va.kb.lb(t.Va)},lb(t){t.Va.kb.lb(t.Va)},read(t,e,r,n){if(!t.Va||!t.Va.kb.Qb)throw new f(60);for(var i=0,a=0;a<n;a++){try{var u=t.Va.kb.Qb(t.Va)}catch{throw new f(29)}if(u===void 0&&i===0)throw new f(6);if(u==null)break;i++,e[r+a]=u}return i&&(t.node.$a=Date.now()),i},write(t,e,r,n){if(!t.Va||!t.Va.kb.Hb)throw new f(60);try{for(var i=0;i<n;i++)t.Va.kb.Hb(t.Va,e[r+i])}catch{throw new f(29)}return n&&(t.node.Ua=t.node.Ta=Date.now()),i}},ur={Qb(){t:{if(!zt.length){var t=null;if(globalThis.window?.prompt&&(t=window.prompt("Input: "),t!==null&&(t+=`
|
|
2
|
+
`)),!t){var e=null;break t}e=Array(H(t)+1),t=U(t,e,0,e.length),e.length=t,zt=e}e=zt.shift()}return e},Hb(t,e){e===null||e===10?(Pt(at(t.output)),t.output=[]):e!=0&&t.output.push(e)},lb(t){0<t.output?.length&&(Pt(at(t.output)),t.output=[])},Dc(){return{yc:25856,Ac:5,xc:191,zc:35387,wc:[3,28,127,21,4,0,1,0,17,19,26,0,18,15,23,22,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0]}},Ec(){return 0},Fc(){return[24,80]}},sr={Hb(t,e){e===null||e===10?(F(at(t.output)),t.output=[]):e!=0&&t.output.push(e)},lb(t){0<t.output?.length&&(F(at(t.output)),t.output=[])}},c={Za:null,ab(){return c.createNode(null,"/",16895,0)},createNode(t,e,r,n){if((r&61440)===24576||(r&61440)===4096)throw new f(63);return c.Za||(c.Za={dir:{node:{Wa:c.La.Wa,Xa:c.La.Xa,mb:c.La.mb,rb:c.La.rb,Tb:c.La.Tb,xb:c.La.xb,vb:c.La.vb,Ib:c.La.Ib,wb:c.La.wb},stream:{Ya:c.Ma.Ya}},file:{node:{Wa:c.La.Wa,Xa:c.La.Xa},stream:{Ya:c.Ma.Ya,read:c.Ma.read,write:c.Ma.write,sb:c.Ma.sb,tb:c.Ma.tb}},link:{node:{Wa:c.La.Wa,Xa:c.La.Xa,eb:c.La.eb},stream:{}},Nb:{node:{Wa:c.La.Wa,Xa:c.La.Xa},stream:pr}}),r=qe(t,e,r,n),R(r.mode)?(r.La=c.Za.dir.node,r.Ma=c.Za.dir.stream,r.Na={}):(r.mode&61440)===32768?(r.La=c.Za.file.node,r.Ma=c.Za.file.stream,r.Ra=0,r.Na=null):(r.mode&61440)===40960?(r.La=c.Za.link.node,r.Ma=c.Za.link.stream):(r.mode&61440)===8192&&(r.La=c.Za.Nb.node,r.Ma=c.Za.Nb.stream),r.$a=r.Ua=r.Ta=Date.now(),t&&(t.Na[e]=r,t.$a=t.Ua=t.Ta=r.$a),r},Cc(t){return t.Na?t.Na.subarray?t.Na.subarray(0,t.Ra):new Uint8Array(t.Na):new Uint8Array(0)},La:{Wa(t){var e={};return e.cc=(t.mode&61440)===8192?t.id:1,e.oc=t.id,e.mode=t.mode,e.rc=1,e.uid=0,e.nc=0,e.nb=t.nb,R(t.mode)?e.size=4096:(t.mode&61440)===32768?e.size=t.Ra:(t.mode&61440)===40960?e.size=t.link.length:e.size=0,e.$a=new Date(t.$a),e.Ua=new Date(t.Ua),e.Ta=new Date(t.Ta),e.Zb=4096,e.$b=Math.ceil(e.size/e.Zb),e},Xa(t,e){for(var r of["mode","atime","mtime","ctime"])e[r]!=null&&(t[r]=e[r]);e.size!==void 0&&(e=e.size,t.Ra!=e&&(e==0?(t.Na=null,t.Ra=0):(r=t.Na,t.Na=new Uint8Array(e),r&&t.Na.set(r.subarray(0,Math.min(e,t.Ra))),t.Ra=e)))},mb(){throw c.zb||(c.zb=new f(44),c.zb.stack="<generic error, no stack>"),c.zb},rb(t,e,r,n){return c.createNode(t,e,r,n)},Tb(t,e,r){try{var n=Y(e,r)}catch{}if(n){if(R(t.mode))for(var i in n.Na)throw new f(55);Ft(n)}delete t.parent.Na[t.name],e.Na[r]=t,t.name=r,e.Ta=e.Ua=t.parent.Ta=t.parent.Ua=Date.now()},xb(t,e){delete t.Na[e],t.Ta=t.Ua=Date.now()},vb(t,e){var r=Y(t,e),n;for(n in r.Na)throw new f(55);delete t.Na[e],t.Ta=t.Ua=Date.now()},Ib(t){return[".","..",...Object.keys(t.Na)]},wb(t,e,r){return t=c.createNode(t,e,41471,0),t.link=r,t},eb(t){if((t.mode&61440)!==40960)throw new f(28);return t.link}},Ma:{read(t,e,r,n,i){var a=t.node.Na;if(i>=t.node.Ra)return 0;if(t=Math.min(t.node.Ra-i,n),8<t&&a.subarray)e.set(a.subarray(i,i+t),r);else for(n=0;n<t;n++)e[r+n]=a[i+n];return t},write(t,e,r,n,i,a){if(e.buffer===k.buffer&&(a=!1),!n)return 0;if(t=t.node,t.Ua=t.Ta=Date.now(),e.subarray&&(!t.Na||t.Na.subarray)){if(a)return t.Na=e.subarray(r,r+n),t.Ra=n;if(t.Ra===0&&i===0)return t.Na=e.slice(r,r+n),t.Ra=n;if(i+n<=t.Ra)return t.Na.set(e.subarray(r,r+n),i),n}a=i+n;var u=t.Na?t.Na.length:0;if(u>=a||(a=Math.max(a,u*(1048576>u?2:1.125)>>>0),u!=0&&(a=Math.max(a,256)),u=t.Na,t.Na=new Uint8Array(a),0<t.Ra&&t.Na.set(u.subarray(0,t.Ra),0)),t.Na.subarray&&e.subarray)t.Na.set(e.subarray(r,r+n),i);else for(a=0;a<n;a++)t.Na[i+a]=e[r+a];return t.Ra=Math.max(t.Ra,i+n),n},Ya(t,e,r){if(r===1?e+=t.position:r===2&&(t.node.mode&61440)===32768&&(e+=t.node.Ra),0>e)throw new f(28);return e},sb(t,e,r,n,i){if((t.node.mode&61440)!==32768)throw new f(43);if(t=t.node.Na,i&2||!t||t.buffer!==k.buffer){i=!0,n=65536*Math.ceil(e/65536);var a=ze(65536,n);if(a&&N.fill(0,a,a+n),n=a,!n)throw new f(48);t&&((0<r||r+e<t.length)&&(t.subarray?t=t.subarray(r,r+e):t=Array.prototype.slice.call(t,r,r+e)),k.set(t,n))}else i=!1,n=t.byteOffset;return{tc:n,Ub:i}},tb(t,e,r,n){return c.Ma.write(t,e,0,n,r,!1),0}}},ve=(t,e)=>{var r=0;return t&&(r|=365),e&&(r|=146),r},$t=null,_e={},K=[],lr=1,Q=null,ge=!1,Ee=!0,f=class{constructor(t){W(this,"name","ErrnoError");this.Pa=t}},fr=class{constructor(){W(this,"qb",{});W(this,"node",null)}get flags(){return this.qb.flags}set flags(t){this.qb.flags=t}get position(){return this.qb.position}set position(t){this.qb.position=t}},hr=class{constructor(t,e,r,n){W(this,"La",{});W(this,"Ma",{});W(this,"ib",null);t||(t=this),this.parent=t,this.ab=t.ab,this.id=lr++,this.name=e,this.mode=r,this.nb=n,this.$a=this.Ua=this.Ta=Date.now()}get read(){return(this.mode&365)===365}set read(t){t?this.mode|=365:this.mode&=-366}get write(){return(this.mode&146)===146}set write(t){t?this.mode|=146:this.mode&=-147}};function L(t,e={}){if(!t)throw new f(44);e.Bb??(e.Bb=!0),t.charAt(0)==="/"||(t="//"+t);var r=0;t:for(;40>r;r++){t=t.split("/").filter(p=>!!p);for(var n=$t,i="/",a=0;a<t.length;a++){var u=a===t.length-1;if(u&&e.parent)break;if(t[a]!==".")if(t[a]==="..")if(i=me(i),n===n.parent){t=i+"/"+t.slice(a+1).join("/"),r--;continue t}else n=n.parent;else{i=Qt(i+"/"+t[a]);try{n=Y(n,t[a])}catch(p){if(p?.Pa===44&&u&&e.sc)return{path:i};throw p}if(!n.ib||u&&!e.Bb||(n=n.ib.root),(n.mode&61440)===40960&&(!u||e.hb)){if(!n.La.eb)throw new f(52);n=n.La.eb(n),n.charAt(0)==="/"||(n=me(i)+"/"+n),t=n+"/"+t.slice(a+1).join("/");continue t}}}return{path:i,node:n}}throw new f(32)}function Bt(t){for(var e;;){if(t===t.parent)return t=t.ab.Sb,e?t[t.length-1]!=="/"?`${t}/${e}`:t+e:t;e=e?`${t.name}/${e}`:t.name,t=t.parent}}function Wt(t,e){for(var r=0,n=0;n<e.length;n++)r=(r<<5)-r+e.charCodeAt(n)|0;return(t+r>>>0)%Q.length}function Ft(t){var e=Wt(t.parent.id,t.name);if(Q[e]===t)Q[e]=t.jb;else for(e=Q[e];e;){if(e.jb===t){e.jb=t.jb;break}e=e.jb}}function Y(t,e){var r=R(t.mode)?(r=tt(t,"x"))?r:t.La.mb?0:2:54;if(r)throw new f(r);for(r=Q[Wt(t.id,e)];r;r=r.jb){var n=r.name;if(r.parent.id===t.id&&n===e)return r}return t.La.mb(t,e)}function qe(t,e,r,n){return t=new hr(t,e,r,n),e=Wt(t.parent.id,t.name),t.jb=Q[e],Q[e]=t}function R(t){return(t&61440)===16384}function tt(t,e){return Ee?0:e.includes("r")&&!(t.mode&292)||e.includes("w")&&!(t.mode&146)||e.includes("x")&&!(t.mode&73)?2:0}function ke(t,e){if(!R(t.mode))return 54;try{return Y(t,e),20}catch{}return tt(t,"wx")}function Me(t,e,r){try{var n=Y(t,e)}catch(i){return i.Pa}if(t=tt(t,"wx"))return t;if(r){if(!R(n.mode))return 54;if(n===n.parent||Bt(n)==="/")return 10}else if(R(n.mode))return 31;return 0}function mt(t){if(!t)throw new f(63);return t}function A(t){if(t=K[t],!t)throw new f(8);return t}function Ne(t,e=-1){if(t=Object.assign(new fr,t),e==-1)t:{for(e=0;4096>=e;e++)if(!K[e])break t;throw new f(33)}return t.bb=e,K[e]=t}function br(t,e=-1){return t=Ne(t,e),t.Ma?.Bc?.(t),t}function Vt(t,e,r){var n=t?.Ma.Xa;t=n?t:e,n??(n=e.La.Xa),mt(n),n(t,r)}var pr={open(t){t.Ma=_e[t.node.nb].Ma,t.Ma.open?.(t)},Ya(){throw new f(70)}};function Yt(t,e){_e[t]={Ma:e}}function Ae(t,e){var r=e==="/";if(r&&$t)throw new f(10);if(!r&&e){var n=L(e,{Bb:!1});if(e=n.path,n=n.node,n.ib)throw new f(10);if(!R(n.mode))throw new f(54)}e={type:t,Gc:{},Sb:e,qc:[]},t=t.ab(e),t.ab=e,e.root=t,r?$t=t:n&&(n.ib=e,n.ab&&n.ab.qc.push(e))}function wt(t,e,r){var n=L(t,{parent:!0}).node;if(t=ct(t),!t)throw new f(28);if(t==="."||t==="..")throw new f(20);var i=ke(n,t);if(i)throw new f(i);if(!n.La.rb)throw new f(63);return n.La.rb(n,t,e,r)}function cr(t,e=438){return wt(t,e&4095|32768,0)}function D(t,e=511){return wt(t,e&1023|16384,0)}function dt(t,e,r){typeof r>"u"&&(r=e,e=438),wt(t,e|8192,r)}function Xt(t,e){if(!or(t))throw new f(44);var r=L(e,{parent:!0}).node;if(!r)throw new f(44);e=ct(e);var n=ke(r,e);if(n)throw new f(n);if(!r.La.wb)throw new f(63);r.La.wb(r,e,t)}function Re(t){var e=L(t,{parent:!0}).node;t=ct(t);var r=Y(e,t),n=Me(e,t,!0);if(n)throw new f(n);if(!e.La.vb)throw new f(63);if(r.ib)throw new f(10);e.La.vb(e,t),Ft(r)}function Se(t){var e=L(t,{parent:!0}).node;if(!e)throw new f(44);t=ct(t);var r=Y(e,t),n=Me(e,t,!1);if(n)throw new f(n);if(!e.La.xb)throw new f(63);if(r.ib)throw new f(10);e.La.xb(e,t),Ft(r)}function ut(t,e){return t=L(t,{hb:!e}).node,mt(t.La.Wa)(t)}function Le(t,e,r,n){Vt(t,e,{mode:r&4095|e.mode&-4096,Ta:Date.now(),dc:n})}function yt(t,e){t=typeof t=="string"?L(t,{hb:!0}).node:t,Le(null,t,e)}function xe(t,e,r){if(R(e.mode))throw new f(31);if((e.mode&61440)!==32768)throw new f(28);var n=tt(e,"w");if(n)throw new f(n);Vt(t,e,{size:r,timestamp:Date.now()})}function et(t,e,r=438){if(t==="")throw new f(44);if(typeof e=="string"){var n={r:0,"r+":2,w:577,"w+":578,a:1089,"a+":1090}[e];if(typeof n>"u")throw Error(`Unknown file open mode: ${e}`);e=n}if(r=e&64?r&4095|32768:0,typeof t=="object")n=t;else{var i=t.endsWith("/"),a=L(t,{hb:!(e&131072),sc:!0});n=a.node,t=a.path}if(a=!1,e&64)if(n){if(e&128)throw new f(20)}else{if(i)throw new f(31);n=wt(t,r|511,0),a=!0}if(!n)throw new f(44);if((n.mode&61440)===8192&&(e&=-513),e&65536&&!R(n.mode))throw new f(54);if(!a&&(n?(n.mode&61440)===40960?i=32:(i=["r","w","rw"][e&3],e&512&&(i+="w"),i=R(n.mode)&&(i!=="r"||e&576)?31:tt(n,i)):i=44,i))throw new f(i);return e&512&&!a&&(i=n,i=typeof i=="string"?L(i,{hb:!0}).node:i,xe(null,i,0)),e=Ne({node:n,path:Bt(n),flags:e&-131713,seekable:!0,position:0,Ma:n.Ma,uc:[],error:!1}),e.Ma.open&&e.Ma.open(e),a&&yt(n,r&511),e}function Zt(t){if(t.bb===null)throw new f(8);t.Eb&&(t.Eb=null);try{t.Ma.close&&t.Ma.close(t)}catch(e){throw e}finally{K[t.bb]=null}t.bb=null}function Oe(t,e,r){if(t.bb===null)throw new f(8);if(!t.seekable||!t.Ma.Ya)throw new f(70);if(r!=0&&r!=1&&r!=2)throw new f(28);t.position=t.Ma.Ya(t,e,r),t.uc=[]}function Te(t,e,r,n,i){if(0>n||0>i)throw new f(28);if(t.bb===null)throw new f(8);if((t.flags&2097155)===1)throw new f(8);if(R(t.node.mode))throw new f(31);if(!t.Ma.read)throw new f(28);var a=typeof i<"u";if(!a)i=t.position;else if(!t.seekable)throw new f(70);return e=t.Ma.read(t,e,r,n,i),a||(t.position+=e),e}function Pe(t,e,r,n,i){if(0>n||0>i)throw new f(28);if(t.bb===null)throw new f(8);if((t.flags&2097155)===0)throw new f(8);if(R(t.node.mode))throw new f(31);if(!t.Ma.write)throw new f(28);t.seekable&&t.flags&1024&&Oe(t,0,2);var a=typeof i<"u";if(!a)i=t.position;else if(!t.seekable)throw new f(70);return e=t.Ma.write(t,e,r,n,i,void 0),a||(t.position+=e),e}function mr(t){var e=e||0,r="binary";r!=="utf8"&&r!=="binary"&&J(`Invalid encoding type "${r}"`),e=et(t,e),t=ut(t).size;var n=new Uint8Array(t);return Te(e,n,0,t,0),r==="utf8"&&(n=at(n)),Zt(e),n}function z(t,e,r){t=Qt("/dev/"+t);var n=ve(!!e,!!r);z.Rb??(z.Rb=64);var i=z.Rb++<<8|0;Yt(i,{open(a){a.seekable=!1},close(){r?.buffer?.length&&r(10)},read(a,u,p,y){for(var m=0,g=0;g<y;g++){try{var M=e()}catch{throw new f(29)}if(M===void 0&&m===0)throw new f(6);if(M==null)break;m++,u[p+g]=M}return m&&(a.node.$a=Date.now()),m},write(a,u,p,y){for(var m=0;m<y;m++)try{r(u[p+m])}catch{throw new f(29)}return y&&(a.node.Ua=a.node.Ta=Date.now()),m}}),dt(t,n,i)}var _={};function X(t,e,r){if(e.charAt(0)==="/")return e;if(t=t===-100?"/":A(t).path,e.length==0){if(!r)throw new f(44);return t}return t+"/"+e}function vt(t,e){v[t>>2]=e.cc,v[t+4>>2]=e.mode,v[t+8>>2]=e.rc,v[t+12>>2]=e.uid,v[t+16>>2]=e.nc,v[t+20>>2]=e.nb,O[t+24>>3]=BigInt(e.size),E[t+32>>2]=4096,E[t+36>>2]=e.$b;var r=e.$a.getTime(),n=e.Ua.getTime(),i=e.Ta.getTime();return O[t+40>>3]=BigInt(Math.floor(r/1e3)),v[t+48>>2]=r%1e3*1e6,O[t+56>>3]=BigInt(Math.floor(n/1e3)),v[t+64>>2]=n%1e3*1e6,O[t+72>>3]=BigInt(Math.floor(i/1e3)),v[t+80>>2]=i%1e3*1e6,O[t+88>>3]=BigInt(e.oc),0}var _t=void 0,gt=()=>{var t=E[+_t>>2];return _t+=4,t},Ct=0,wr=[0,31,60,91,121,152,182,213,244,274,305,335],dr=[0,31,59,90,120,151,181,212,243,273,304,334],st={},Ue=t=>{if(!(t instanceof se||t=="unwind"))throw t},De=t=>{throw Ut=t,pt||0<Ct||(s.onExit?.(t),bt=!0),new se(t)},yr=t=>{if(!bt)try{t()}catch(e){Ue(e)}finally{if(!(pt||0<Ct))try{Ut=t=Ut,De(t)}catch(e){Ue(e)}}},Gt={},Ie=()=>{if(!Jt){var t={USER:"web_user",LOGNAME:"web_user",PATH:"/",PWD:"/",HOME:"/home/web_user",LANG:(globalThis.navigator?.language??"C").replace("-","_")+".UTF-8",_:ie||"./this.program"},e;for(e in Gt)Gt[e]===void 0?delete t[e]:t[e]=Gt[e];var r=[];for(e in t)r.push(`${e}=${t[e]}`);Jt=r}return Jt},Jt,vr=(t,e,r,n)=>{var i={string:m=>{var g=0;if(m!=null&&m!==0){g=H(m)+1;var M=C(g);U(m,N,M,g),g=M}return g},array:m=>{var g=C(m.length);return k.set(m,g),g}};t=s["_"+t];var a=[],u=0;if(n)for(var p=0;p<n.length;p++){var y=i[r[p]];y?(u===0&&(u=Mt()),a[p]=y(n[p])):a[p]=n[p]}return r=t(...a),r=(function(m){return u!==0&&kt(u),e==="string"?q(m):e==="boolean"?!!m:m})(r)},Et=t=>{var e=H(t)+1,r=qt(e);return r&&U(t,N,r,e),r},Z,Ht=[],$=t=>{Z.delete(B.get(t)),B.set(t,null),Ht.push(t)},je=t=>{let e=t.length;return[e%128|128,e>>7,...t]},_r={i:127,p:127,j:126,f:125,d:124,e:111},Qe=t=>je(Array.from(t,e=>_r[e])),lt=(t,e)=>{if(!Z){Z=new WeakMap;var r=B.length;if(Z)for(var n=0;n<0+r;n++){var i=B.get(n);i&&Z.set(i,n)}}if(r=Z.get(t)||0)return r;r=Ht.length?Ht.pop():B.grow(1);try{B.set(r,t)}catch(a){if(!(a instanceof TypeError))throw a;e=Uint8Array.of(0,97,115,109,1,0,0,0,1,...je([1,96,...Qe(e.slice(1)),...Qe(e[0]==="v"?"":e[0])]),2,7,1,1,101,1,102,0,0,7,5,1,1,102,0,0),e=new WebAssembly.Module(e),e=new WebAssembly.Instance(e,{e:{f:t}}).exports.f,B.set(r,e)}return Z.set(t,r),r};if(Q=Array(4096),Ae(c,"/"),D("/tmp"),D("/home"),D("/home/web_user"),(function(){D("/dev"),Yt(259,{read:()=>0,write:(n,i,a,u)=>u,Ya:()=>0}),dt("/dev/null",259),ye(1280,ur),ye(1536,sr),dt("/dev/tty",1280),dt("/dev/tty1",1536);var t=new Uint8Array(1024),e=0,r=()=>(e===0&&(we(t),e=t.byteLength),t[--e]);z("random",r),z("urandom",r),D("/dev/shm"),D("/dev/shm/tmp")})(),(function(){D("/proc");var t=D("/proc/self");D("/proc/self/fd"),Ae({ab(){var e=qe(t,"fd",16895,73);return e.Ma={Ya:c.Ma.Ya},e.La={mb(r,n){r=+n;var i=A(r);return r={parent:null,ab:{Sb:"fake"},La:{eb:()=>i.path},id:r+1},r.parent=r},Ib(){return Array.from(K.entries()).filter(([,r])=>r).map(([r])=>r.toString())}},e}},"/proc/self/fd")})(),s.noExitRuntime&&(pt=s.noExitRuntime),s.print&&(Pt=s.print),s.printErr&&(F=s.printErr),s.wasmBinary&&(rt=s.wasmBinary),s.thisProgram&&(ie=s.thisProgram),s.preInit)for(typeof s.preInit=="function"&&(s.preInit=[s.preInit]);0<s.preInit.length;)s.preInit.shift()();s.stackSave=()=>Mt(),s.stackRestore=t=>kt(t),s.stackAlloc=t=>C(t),s.cwrap=(t,e,r,n)=>{var i=!r||r.every(a=>a==="number"||a==="boolean");return e!=="string"&&i&&!n?s["_"+t]:(...a)=>vr(t,e,r,a)},s.addFunction=lt,s.removeFunction=$,s.UTF8ToString=q,s.stringToNewUTF8=Et,s.writeArrayToMemory=(t,e)=>{k.set(t,e)};var qt,ft,ze,$e,kt,C,Mt,Nt,B,gr={a:(t,e,r,n)=>J(`Assertion failed: ${q(t)}, at: `+[e?q(e):"unknown filename",r,n?q(n):"unknown function"]),i:function(t,e){try{return t=q(t),yt(t,e),0}catch(r){if(typeof _>"u"||r.name!=="ErrnoError")throw r;return-r.Pa}},L:function(t,e,r){try{if(e=q(e),e=X(t,e),r&-8)return-28;var n=L(e,{hb:!0}).node;return n?(t="",r&4&&(t+="r"),r&2&&(t+="w"),r&1&&(t+="x"),t&&tt(n,t)?-2:0):-44}catch(i){if(typeof _>"u"||i.name!=="ErrnoError")throw i;return-i.Pa}},j:function(t,e){try{var r=A(t);return Le(r,r.node,e,!1),0}catch(n){if(typeof _>"u"||n.name!=="ErrnoError")throw n;return-n.Pa}},h:function(t){try{var e=A(t);return Vt(e,e.node,{timestamp:Date.now(),dc:!1}),0}catch(r){if(typeof _>"u"||r.name!=="ErrnoError")throw r;return-r.Pa}},b:function(t,e,r){_t=r;try{var n=A(t);switch(e){case 0:var i=gt();if(0>i)break;for(;K[i];)i++;return br(n,i).bb;case 1:case 2:return 0;case 3:return n.flags;case 4:return i=gt(),n.flags|=i,0;case 12:return i=gt(),nt[i+0>>1]=2,0;case 13:case 14:return 0}return-28}catch(a){if(typeof _>"u"||a.name!=="ErrnoError")throw a;return-a.Pa}},g:function(t,e){try{var r=A(t),n=r.node,i=r.Ma.Wa;t=i?r:n,i??(i=n.La.Wa),mt(i);var a=i(t);return vt(e,a)}catch(u){if(typeof _>"u"||u.name!=="ErrnoError")throw u;return-u.Pa}},H:function(t,e){e=-9007199254740992>e||9007199254740992<e?NaN:Number(e);try{if(isNaN(e))return-61;var r=A(t);if(0>e||(r.flags&2097155)===0)throw new f(28);return xe(r,r.node,e),0}catch(n){if(typeof _>"u"||n.name!=="ErrnoError")throw n;return-n.Pa}},G:function(t,e){try{if(e===0)return-28;var r=H("/")+1;return e<r?-68:(U("/",N,t,e),r)}catch(n){if(typeof _>"u"||n.name!=="ErrnoError")throw n;return-n.Pa}},K:function(t,e){try{return t=q(t),vt(e,ut(t,!0))}catch(r){if(typeof _>"u"||r.name!=="ErrnoError")throw r;return-r.Pa}},C:function(t,e,r){try{return e=q(e),e=X(t,e),D(e,r),0}catch(n){if(typeof _>"u"||n.name!=="ErrnoError")throw n;return-n.Pa}},J:function(t,e,r,n){try{e=q(e);var i=n&256;return e=X(t,e,n&4096),vt(r,i?ut(e,!0):ut(e))}catch(a){if(typeof _>"u"||a.name!=="ErrnoError")throw a;return-a.Pa}},x:function(t,e,r,n){_t=n;try{e=q(e),e=X(t,e);var i=n?gt():0;return et(e,r,i).bb}catch(a){if(typeof _>"u"||a.name!=="ErrnoError")throw a;return-a.Pa}},v:function(t,e,r,n){try{if(e=q(e),e=X(t,e),0>=n)return-28;var i=L(e).node;if(!i)throw new f(44);if(!i.La.eb)throw new f(28);var a=i.La.eb(i),u=Math.min(n,H(a)),p=k[r+u];return U(a,N,r,n+1),k[r+u]=p,u}catch(y){if(typeof _>"u"||y.name!=="ErrnoError")throw y;return-y.Pa}},u:function(t){try{return t=q(t),Re(t),0}catch(e){if(typeof _>"u"||e.name!=="ErrnoError")throw e;return-e.Pa}},f:function(t,e){try{return t=q(t),vt(e,ut(t))}catch(r){if(typeof _>"u"||r.name!=="ErrnoError")throw r;return-r.Pa}},r:function(t,e,r){try{if(e=q(e),e=X(t,e),r)if(r===512)Re(e);else return-28;else Se(e);return 0}catch(n){if(typeof _>"u"||n.name!=="ErrnoError")throw n;return-n.Pa}},q:function(t,e,r){try{e=q(e),e=X(t,e,!0);var n=Date.now(),i,a;if(r){var u=v[r>>2]+4294967296*E[r+4>>2],p=E[r+8>>2];p==1073741823?i=n:p==1073741822?i=null:i=1e3*u+p/1e6,r+=16,u=v[r>>2]+4294967296*E[r+4>>2],p=E[r+8>>2],p==1073741823?a=n:p==1073741822?a=null:a=1e3*u+p/1e6}else a=i=n;if((a??i)!==null){t=i;var y=L(e,{hb:!0}).node;mt(y.La.Xa)(y,{$a:t,Ua:a})}return 0}catch(m){if(typeof _>"u"||m.name!=="ErrnoError")throw m;return-m.Pa}},m:()=>J(""),l:()=>{pt=!1,Ct=0},A:function(t,e){t=-9007199254740992>t||9007199254740992<t?NaN:Number(t),t=new Date(1e3*t),E[e>>2]=t.getSeconds(),E[e+4>>2]=t.getMinutes(),E[e+8>>2]=t.getHours(),E[e+12>>2]=t.getDate(),E[e+16>>2]=t.getMonth(),E[e+20>>2]=t.getFullYear()-1900,E[e+24>>2]=t.getDay();var r=t.getFullYear();E[e+28>>2]=(r%4!==0||r%100===0&&r%400!==0?dr:wr)[t.getMonth()]+t.getDate()-1|0,E[e+36>>2]=-(60*t.getTimezoneOffset()),r=new Date(t.getFullYear(),6,1).getTimezoneOffset();var n=new Date(t.getFullYear(),0,1).getTimezoneOffset();E[e+32>>2]=(r!=n&&t.getTimezoneOffset()==Math.min(n,r))|0},y:function(t,e,r,n,i,a,u){i=-9007199254740992>i||9007199254740992<i?NaN:Number(i);try{var p=A(n);if((e&2)!==0&&(r&2)===0&&(p.flags&2097155)!==2)throw new f(2);if((p.flags&2097155)===1)throw new f(2);if(!p.Ma.sb)throw new f(43);if(!t)throw new f(28);var y=p.Ma.sb(p,t,i,e,r),m=y.tc;return E[a>>2]=y.Ub,v[u>>2]=m,0}catch(g){if(typeof _>"u"||g.name!=="ErrnoError")throw g;return-g.Pa}},z:function(t,e,r,n,i,a){a=-9007199254740992>a||9007199254740992<a?NaN:Number(a);try{var u=A(i);if(r&2){if((u.node.mode&61440)!==32768)throw new f(43);n&2||u.Ma.tb&&u.Ma.tb(u,N.slice(t,t+e),a,e,n)}}catch(p){if(typeof _>"u"||p.name!=="ErrnoError")throw p;return-p.Pa}},n:(t,e)=>{if(st[t]&&(clearTimeout(st[t].id),delete st[t]),!e)return 0;var r=setTimeout(()=>{delete st[t],yr(()=>$e(t,performance.now()))},e);return st[t]={id:r,Hc:e},0},B:(t,e,r,n)=>{var i=new Date().getFullYear(),a=new Date(i,0,1).getTimezoneOffset();i=new Date(i,6,1).getTimezoneOffset(),v[t>>2]=60*Math.max(a,i),E[e>>2]=+(a!=i),e=u=>{var p=Math.abs(u);return`UTC${0<=u?"-":"+"}${String(Math.floor(p/60)).padStart(2,"0")}${String(p%60).padStart(2,"0")}`},t=e(a),e=e(i),i<a?(U(t,N,r,17),U(e,N,n,17)):(U(t,N,n,17),U(e,N,r,17))},d:()=>Date.now(),s:()=>2147483648,c:()=>performance.now(),o:t=>{var e=N.length;if(t>>>=0,2147483648<t)return!1;for(var r=1;4>=r;r*=2){var n=e*(1+.2/r);n=Math.min(n,t+100663296);t:{n=(Math.min(2147483648,65536*Math.ceil(Math.max(t,n)/65536))-Nt.buffer.byteLength+65535)/65536|0;try{Nt.grow(n),ue();var i=1;break t}catch{}i=void 0}if(i)return!0}return!1},E:(t,e)=>{var r=0,n=0,i;for(i of Ie()){var a=e+r;v[t+n>>2]=a,r+=U(i,N,a,1/0)+1,n+=4}return 0},F:(t,e)=>{var r=Ie();v[t>>2]=r.length,t=0;for(var n of r)t+=H(n)+1;return v[e>>2]=t,0},e:function(t){try{var e=A(t);return Zt(e),0}catch(r){if(typeof _>"u"||r.name!=="ErrnoError")throw r;return r.Pa}},p:function(t,e){try{var r=A(t);return k[e]=r.Va?2:R(r.mode)?3:(r.mode&61440)===40960?7:4,nt[e+2>>1]=0,O[e+8>>3]=BigInt(0),O[e+16>>3]=BigInt(0),0}catch(n){if(typeof _>"u"||n.name!=="ErrnoError")throw n;return n.Pa}},w:function(t,e,r,n){try{t:{var i=A(t);t=e;for(var a,u=e=0;u<r;u++){var p=v[t>>2],y=v[t+4>>2];t+=8;var m=Te(i,k,p,y,a);if(0>m){var g=-1;break t}if(e+=m,m<y)break;typeof a<"u"&&(a+=m)}g=e}return v[n>>2]=g,0}catch(M){if(typeof _>"u"||M.name!=="ErrnoError")throw M;return M.Pa}},D:function(t,e,r,n){e=-9007199254740992>e||9007199254740992<e?NaN:Number(e);try{if(isNaN(e))return 61;var i=A(t);return Oe(i,e,r),O[n>>3]=BigInt(i.position),i.Eb&&e===0&&r===0&&(i.Eb=null),0}catch(a){if(typeof _>"u"||a.name!=="ErrnoError")throw a;return a.Pa}},I:function(t){try{var e=A(t);return e.Ma?.lb?.(e)}catch(r){if(typeof _>"u"||r.name!=="ErrnoError")throw r;return r.Pa}},t:function(t,e,r,n){try{t:{var i=A(t);t=e;for(var a,u=e=0;u<r;u++){var p=v[t>>2],y=v[t+4>>2];t+=8;var m=Pe(i,k,p,y,a);if(0>m){var g=-1;break t}if(e+=m,m<y)break;typeof a<"u"&&(a+=m)}g=e}return v[n>>2]=g,0}catch(M){if(typeof _>"u"||M.name!=="ErrnoError")throw M;return M.Pa}},k:De};function Kt(){function t(){if(s.calledRun=!0,!bt){if(!s.noFSInit&&!ge){var e,r;ge=!0,e??(e=s.stdin),r??(r=s.stdout),n??(n=s.stderr),e?z("stdin",e):Xt("/dev/tty","/dev/stdin"),r?z("stdout",null,r):Xt("/dev/tty","/dev/stdout"),n?z("stderr",null,n):Xt("/dev/tty1","/dev/stderr"),et("/dev/stdin",0),et("/dev/stdout",1),et("/dev/stderr",1)}if(te.N(),Ee=!1,s.onRuntimeInitialized?.(),s.postRun)for(typeof s.postRun=="function"&&(s.postRun=[s.postRun]);s.postRun.length;){var n=s.postRun.shift();fe.push(n)}le(fe)}}if(0<V)it=Kt;else{if(s.preRun)for(typeof s.preRun=="function"&&(s.preRun=[s.preRun]);s.preRun.length;)nr();le(he),0<V?it=Kt:s.setStatus?(s.setStatus("Running..."),setTimeout(()=>{setTimeout(()=>s.setStatus(""),1),t()},1)):t()}}var te;return(async function(){function t(r){return r=te=r.exports,s._sqlite3_free=r.P,s._sqlite3_value_text=r.Q,s._sqlite3_prepare_v2=r.R,s._sqlite3_step=r.S,s._sqlite3_reset=r.T,s._sqlite3_exec=r.U,s._sqlite3_finalize=r.V,s._sqlite3_column_name=r.W,s._sqlite3_column_text=r.X,s._sqlite3_column_type=r.Y,s._sqlite3_errmsg=r.Z,s._sqlite3_clear_bindings=r._,s._sqlite3_value_blob=r.$,s._sqlite3_value_bytes=r.aa,s._sqlite3_value_double=r.ba,s._sqlite3_value_int=r.ca,s._sqlite3_value_type=r.da,s._sqlite3_result_blob=r.ea,s._sqlite3_result_double=r.fa,s._sqlite3_result_error=r.ga,s._sqlite3_result_int=r.ha,s._sqlite3_result_int64=r.ia,s._sqlite3_result_null=r.ja,s._sqlite3_result_text=r.ka,s._sqlite3_aggregate_context=r.la,s._sqlite3_column_count=r.ma,s._sqlite3_data_count=r.na,s._sqlite3_column_blob=r.oa,s._sqlite3_column_bytes=r.pa,s._sqlite3_column_double=r.qa,s._sqlite3_bind_blob=r.ra,s._sqlite3_bind_double=r.sa,s._sqlite3_bind_int=r.ta,s._sqlite3_bind_text=r.ua,s._sqlite3_bind_parameter_index=r.va,s._sqlite3_sql=r.wa,s._sqlite3_normalized_sql=r.xa,s._sqlite3_changes=r.ya,s._sqlite3_close_v2=r.za,s._sqlite3_create_function_v2=r.Aa,s._sqlite3_update_hook=r.Ba,s._sqlite3_open=r.Ca,qt=s._malloc=r.Da,ft=s._free=r.Ea,s._RegisterExtensionFunctions=r.Fa,ze=r.Ga,$e=r.Ha,kt=r.Ia,C=r.Ja,Mt=r.Ka,Nt=r.M,B=r.O,ue(),V--,s.monitorRunDependencies?.(V),V==0&&it&&(r=it,it=null,r()),te}V++,s.monitorRunDependencies?.(V);var e={a:gr};return s.instantiateWasm?new Promise(r=>{s.instantiateWasm(e,(n,i)=>{r(t(n,i))})}):(jt??(jt=s.locateFile?s.locateFile("sql-wasm-browser.wasm",Ot):Ot+"sql-wasm-browser.wasm"),t((await rr(e)).instance))})(),Kt(),I}),Rt)};typeof Lt=="object"&&typeof ht=="object"?(ht.exports=St,ht.exports.default=St):typeof define=="function"&&define.amd?define([],function(){return St}):typeof Lt=="object"&&(Lt.Module=St)});export default Gr();
|