-
Notifications
You must be signed in to change notification settings - Fork 0
/
bundle.js
1 lines (1 loc) · 50.1 KB
/
bundle.js
1
(()=>{var e={657:(e,t,n)=>{e=n.nmd(e);var r=void 0,a=function(t){return r||(r=new Promise((function(r,a){var i,o=void 0!==t?t:{},u=o.onAbort;o.onAbort=function(e){a(new Error(e)),u&&u(e)},o.postRun=o.postRun||[],o.postRun.push((function(){r(o)})),e=void 0,i||(i=void 0!==o?o:{}),i.onRuntimeInitialized=function(){function e(e,t){this.Ra=e,this.db=t,this.Qa=1,this.lb=[]}function t(e,t){if(this.db=t,t=V(e)+1,this.eb=Ut(t),null===this.eb)throw Error("Unable to allocate memory for the SQL string");L(e,j,this.eb,t),this.jb=this.eb,this.$a=this.pb=null}function n(e){if(this.filename="dbfile_"+(4294967295*Math.random()>>>0),null!=e){var t=this.filename,n=t?be("//"+t):"/";if(n=Je(n,4095&(void 0!==(t=mt(!0,!0))?t:438)|32768,0),e){if("string"==typeof e){for(var a=Array(e.length),i=0,u=e.length;i<u;++i)a[i]=e.charCodeAt(i);e=a}ot(n,146|t),dt(a=lt(n,"w"),e,0,e.length,0,void 0),ct(a),ot(n,t)}}this.handleError(o(this.filename,r)),this.db=E(r,"i32"),ae(this.db),this.fb={},this.Xa={}}var r=Ht(4),a=i.cwrap,o=a("sqlite3_open","number",["string","number"]),u=a("sqlite3_close_v2","number",["number"]),s=a("sqlite3_exec","number",["number","string","number","number","number"]),l=a("sqlite3_changes","number",["number"]),c=a("sqlite3_prepare_v2","number",["number","string","number","number","number"]),f=a("sqlite3_sql","string",["number"]),h=a("sqlite3_normalized_sql","string",["number"]),d=a("sqlite3_prepare_v2","number",["number","number","number","number","number"]),p=a("sqlite3_bind_text","number",["number","number","number","number","number"]),m=a("sqlite3_bind_blob","number",["number","number","number","number","number"]),b=a("sqlite3_bind_double","number",["number","number","number"]),y=a("sqlite3_bind_int","number",["number","number","number"]),_=a("sqlite3_bind_parameter_index","number",["number","string"]),v=a("sqlite3_step","number",["number"]),w=a("sqlite3_errmsg","string",["number"]),g=a("sqlite3_column_count","number",["number"]),k=a("sqlite3_data_count","number",["number"]),S=a("sqlite3_column_double","number",["number","number"]),T=a("sqlite3_column_text","string",["number","number"]),P=a("sqlite3_column_blob","number",["number","number"]),D=a("sqlite3_column_bytes","number",["number","number"]),N=a("sqlite3_column_type","number",["number","number"]),z=a("sqlite3_column_name","string",["number","number"]),I=a("sqlite3_reset","number",["number"]),W=a("sqlite3_clear_bindings","number",["number"]),C=a("sqlite3_finalize","number",["number"]),$=a("sqlite3_create_function_v2","number","number string number number number number number number number".split(" ")),B=a("sqlite3_value_type","number",["number"]),Y=a("sqlite3_value_bytes","number",["number"]),X=a("sqlite3_value_text","string",["number"]),Z=a("sqlite3_value_blob","number",["number"]),G=a("sqlite3_value_double","number",["number"]),J=a("sqlite3_result_double","",["number","number"]),K=a("sqlite3_result_null","",["number"]),ee=a("sqlite3_result_text","",["number","string","number","number"]),te=a("sqlite3_result_blob","",["number","number","number","number"]),ne=a("sqlite3_result_int","",["number","number"]),re=a("sqlite3_result_error","",["number","string","number"]),ae=a("RegisterExtensionFunctions","number",["number"]);e.prototype.bind=function(e){if(!this.Ra)throw"Statement closed";return this.reset(),Array.isArray(e)?this.Bb(e):null==e||"object"!=typeof e||this.Cb(e)},e.prototype.step=function(){if(!this.Ra)throw"Statement closed";this.Qa=1;var e=v(this.Ra);switch(e){case 100:return!0;case 101:return!1;default:throw this.db.handleError(e)}},e.prototype.Ib=function(e){return null==e&&(e=this.Qa,this.Qa+=1),S(this.Ra,e)},e.prototype.Jb=function(e){return null==e&&(e=this.Qa,this.Qa+=1),T(this.Ra,e)},e.prototype.getBlob=function(e){null==e&&(e=this.Qa,this.Qa+=1);var t=D(this.Ra,e);e=P(this.Ra,e);for(var n=new Uint8Array(t),r=0;r<t;r+=1)n[r]=U[e+r];return n},e.prototype.get=function(e){null!=e&&this.bind(e)&&this.step(),e=[];for(var t=k(this.Ra),n=0;n<t;n+=1)switch(N(this.Ra,n)){case 1:case 2:e.push(this.Ib(n));break;case 3:e.push(this.Jb(n));break;case 4:e.push(this.getBlob(n));break;default:e.push(null)}return e},e.prototype.getColumnNames=function(){for(var e=[],t=g(this.Ra),n=0;n<t;n+=1)e.push(z(this.Ra,n));return e},e.prototype.getAsObject=function(e){e=this.get(e);for(var t=this.getColumnNames(),n={},r=0;r<t.length;r+=1)n[t[r]]=e[r];return n},e.prototype.getSQL=function(){return f(this.Ra)},e.prototype.getNormalizedSQL=function(){return h(this.Ra)},e.prototype.run=function(e){return null!=e&&this.bind(e),this.step(),this.reset()},e.prototype.Fb=function(e,t){null==t&&(t=this.Qa,this.Qa+=1);var n=F(e=Pt(e));this.lb.push(n),this.db.handleError(p(this.Ra,t,n,e.length-1,0))},e.prototype.Ab=function(e,t){null==t&&(t=this.Qa,this.Qa+=1);var n=F(e);this.lb.push(n),this.db.handleError(m(this.Ra,t,n,e.length,0))},e.prototype.Eb=function(e,t){null==t&&(t=this.Qa,this.Qa+=1),this.db.handleError((e===(0|e)?y:b)(this.Ra,t,e))},e.prototype.Db=function(e){null==e&&(e=this.Qa,this.Qa+=1),m(this.Ra,e,0,0,0)},e.prototype.tb=function(e,t){switch(null==t&&(t=this.Qa,this.Qa+=1),typeof e){case"string":return void this.Fb(e,t);case"number":case"boolean":return void this.Eb(e+0,t);case"object":if(null===e)return void this.Db(t);if(null!=e.length)return void this.Ab(e,t)}throw"Wrong API use : tried to bind a value of an unknown type ("+e+")."},e.prototype.Cb=function(e){var t=this;return Object.keys(e).forEach((function(n){var r=_(t.Ra,n);0!==r&&t.tb(e[n],r)})),!0},e.prototype.Bb=function(e){for(var t=0;t<e.length;t+=1)this.tb(e[t],t+1);return!0},e.prototype.reset=function(){return 0===W(this.Ra)&&0===I(this.Ra)},e.prototype.freemem=function(){for(var e;void 0!==(e=this.lb.pop());)jt(e)},e.prototype.free=function(){var e=0===C(this.Ra);return delete this.db.fb[this.Ra],this.Ra=0,e},t.prototype.next=function(){if(null===this.eb)return{done:!0};if(null!==this.$a&&(this.$a.free(),this.$a=null),!this.db.db)throw this.nb(),Error("Database closed");var t=Bt(),n=Ht(4);O(r),O(n);try{this.db.handleError(d(this.db.db,this.jb,-1,r,n)),this.jb=E(n,"i32");var a=E(r,"i32");return 0===a?(this.nb(),{done:!0}):(this.$a=new e(a,this.db),this.db.fb[a]=this.$a,{value:this.$a,done:!1})}catch(e){throw this.pb=H(this.jb),this.nb(),e}finally{Qt(t)}},t.prototype.nb=function(){jt(this.eb),this.eb=null},t.prototype.getRemainingSQL=function(){return null!==this.pb?this.pb:H(this.jb)},"function"==typeof Symbol&&"symbol"==typeof Symbol.iterator&&(t.prototype[Symbol.iterator]=function(){return this}),n.prototype.run=function(e,t){if(!this.db)throw"Database closed";if(t){e=this.prepare(e,t);try{e.step()}finally{e.free()}}else this.handleError(s(this.db,e,0,0,r));return this},n.prototype.exec=function(t,n){if(!this.db)throw"Database closed";var a=Bt(),i=null;try{var o=V(t)+1,u=Ht(o);L(t,U,u,o);var s=u,l=Ht(4);for(t=[];0!==E(s,"i8");){O(r),O(l),this.handleError(d(this.db,s,-1,r,l));var c=E(r,"i32");if(s=E(l,"i32"),0!==c){for(o=null,i=new e(c,this),null!=n&&i.bind(n);i.step();)null===o&&(o={columns:i.getColumnNames(),values:[]},t.push(o)),o.values.push(i.get());i.free()}}return t}catch(e){throw i&&i.free(),e}finally{Qt(a)}},n.prototype.each=function(e,t,n,r){"function"==typeof t&&(r=n,n=t,t=void 0),e=this.prepare(e,t);try{for(;e.step();)n(e.getAsObject())}finally{e.free()}if("function"==typeof r)return r()},n.prototype.prepare=function(t,n){if(O(r),this.handleError(c(this.db,t,-1,r,0)),0===(t=E(r,"i32")))throw"Nothing to prepare";var a=new e(t,this);return null!=n&&a.bind(n),this.fb[t]=a},n.prototype.iterateStatements=function(e){return new t(e,this)},n.prototype.export=function(){Object.values(this.fb).forEach((function(e){e.free()})),Object.values(this.Xa).forEach(A),this.Xa={},this.handleError(u(this.db));var e=function(e){var t={encoding:"binary"};if((t=t||{}).flags=t.flags||"r",t.encoding=t.encoding||"binary","utf8"!==t.encoding&&"binary"!==t.encoding)throw Error('Invalid encoding type "'+t.encoding+'"');var n,r=lt(e,t.flags);e=at(e).size;var a=new Uint8Array(e);return ht(r,a,0,e,0),"utf8"===t.encoding?n=Q(a,0):"binary"===t.encoding&&(n=a),ct(r),n}(this.filename);return this.handleError(o(this.filename,r)),this.db=E(r,"i32"),e},n.prototype.close=function(){null!==this.db&&(Object.values(this.fb).forEach((function(e){e.free()})),Object.values(this.Xa).forEach(A),this.Xa={},this.handleError(u(this.db)),nt("/"+this.filename),this.db=null)},n.prototype.handleError=function(e){if(0===e)return null;throw e=w(this.db),Error(e)},n.prototype.getRowsModified=function(){return l(this.db)},n.prototype.create_function=function(e,t){Object.prototype.hasOwnProperty.call(this.Xa,e)&&(x(this.Xa[e]),delete this.Xa[e]);var n=function(e){var t=R;if(!q){q=new WeakMap;for(var n=0;n<t.length;n++){var r=t.get(n);r&&q.set(r,n)}}if(q.has(e))e=q.get(e);else{if(M.length)n=M.pop();else{n=t.length;try{t.grow(1)}catch(e){if(!(e instanceof RangeError))throw e;throw"Unable to grow wasm table. Set ALLOW_TABLE_GROWTH."}}try{t.set(n,e)}catch(o){if(!(o instanceof TypeError))throw o;if("function"==typeof WebAssembly.Function){var a={i:"i32",j:"i64",f:"f32",d:"f64"},i={parameters:[],results:[]};for(r=1;4>r;++r)i.parameters.push(a["viii"[r]]);r=new WebAssembly.Function(i,e)}else{for(i={i:127,j:126,f:125,d:124},(a=[1,0,1,96]).push(3),r=0;3>r;++r)a.push(i["iii"[r]]);a.push(0),a[1]=a.length-2,r=new Uint8Array([0,97,115,109,1,0,0,0].concat(a,[2,7,1,1,101,1,102,0,0,7,5,1,1,102,0,0])),r=new WebAssembly.Module(r),r=new WebAssembly.Instance(r,{e:{f:e}}).exports.f}t.set(n,r)}q.set(e,n),e=n}return e}((function(e,n,r){for(var a,i=[],o=0;o<n;o+=1){var u=E(r+4*o,"i32"),s=B(u);if(1===s||2===s)u=G(u);else if(3===s)u=X(u);else if(4===s){u=Y(s=u),s=Z(s);for(var l=new Uint8Array(u),c=0;c<u;c+=1)l[c]=U[s+c];u=l}else u=null;i.push(u)}try{a=t.apply(null,i)}catch(t){return void re(e,t,-1)}switch(typeof a){case"boolean":ne(e,a?1:0);break;case"number":J(e,a);break;case"string":ee(e,a,-1,-1);break;case"object":null===a?K(e):null!=a.length?(n=F(a),te(e,n,a.length,-1),jt(n)):re(e,"Wrong API use : tried to return a value of an unknown type ("+a+").",-1);break;default:K(e)}}));return this.Xa[e]=n,this.handleError($(this.db,e,t.length,1,0,n,0,0,0)),this},i.Database=n};var s,l={};for(s in i)i.hasOwnProperty(s)&&(l[s]=i[s]);var c,f,h,d,p="./this.program";c="object"==typeof window,f="function"==typeof importScripts,h="object"==typeof process&&"object"==typeof process.versions&&"string"==typeof process.versions.node,d=!c&&!h&&!f;var m,b,y,_,v="";h?(v=f?n(622).dirname(v)+"/":__dirname+"/",m=function(e,t){return y||(y=n(747)),_||(_=n(622)),e=_.normalize(e),y.readFileSync(e,t?null:"utf8")},b=function(e){return(e=m(e,!0)).buffer||(e=new Uint8Array(e)),P(e.buffer),e},1<process.argv.length&&(p=process.argv[1].replace(/\\/g,"/")),process.argv.slice(2),e.exports=i,i.inspect=function(){return"[Emscripten Module object]"}):d?("undefined"!=typeof read&&(m=function(e){return read(e)}),b=function(e){return"function"==typeof readbuffer?new Uint8Array(readbuffer(e)):(P("object"==typeof(e=read(e,"binary"))),e)},"undefined"!=typeof print&&("undefined"==typeof console&&(console={}),console.log=print,console.warn=console.error="undefined"!=typeof printErr?printErr:print)):(c||f)&&(f?v=self.location.href:document.currentScript&&(v=document.currentScript.src),v=0!==v.indexOf("blob:")?v.substr(0,v.lastIndexOf("/")+1):"",m=function(e){var t=new XMLHttpRequest;return t.open("GET",e,!1),t.send(null),t.responseText},f&&(b=function(e){var t=new XMLHttpRequest;return t.open("GET",e,!1),t.responseType="arraybuffer",t.send(null),new Uint8Array(t.response)}));var w=i.print||console.log.bind(console),g=i.printErr||console.warn.bind(console);for(s in l)l.hasOwnProperty(s)&&(i[s]=l[s]);l=null,i.thisProgram&&(p=i.thisProgram);var q,k,M=[];function x(e){q.delete(R.get(e)),M.push(e)}function A(e){x(e)}function O(e){var t="i32";switch("*"===t.charAt(t.length-1)&&(t="i32"),t){case"i1":case"i8":U[e>>0]=0;break;case"i16":I[e>>1]=0;break;case"i32":W[e>>2]=0;break;case"i64":le=[0,(se=0,1<=+Math.abs(se)?0<se?(0|Math.min(+Math.floor(se/4294967296),4294967295))>>>0:~~+Math.ceil((se-+(~~se>>>0))/4294967296)>>>0:0)],W[e>>2]=le[0],W[e+4>>2]=le[1];break;case"float":C[e>>2]=0;break;case"double":$[e>>3]=0;break;default:ie("invalid type for setValue: "+t)}}function E(e,t){switch("*"===(t=t||"i8").charAt(t.length-1)&&(t="i32"),t){case"i1":case"i8":return U[e>>0];case"i16":return I[e>>1];case"i32":case"i64":return W[e>>2];case"float":return C[e>>2];case"double":return $[e>>3];default:ie("invalid type for getValue: "+t)}return null}i.wasmBinary&&(k=i.wasmBinary),i.noExitRuntime&&i.noExitRuntime,"object"!=typeof WebAssembly&&ie("no native wasm support detected");var S,R,T=!1;function P(e,t){e||ie("Assertion failed: "+t)}function D(e){var t=i["_"+e];return P(t,"Cannot call unknown function "+e+", make sure it is exported"),t}function N(e,t,n,r){var a,i={string:function(e){var t=0;if(null!=e&&0!==e){var n=1+(e.length<<2);t=Ht(n),L(e,j,t,n)}return t},array:function(e){var t=Ht(e.length);return U.set(e,t),t}},o=D(e),u=[];if(e=0,r)for(var s=0;s<r.length;s++){var l=i[n[s]];l?(0===e&&(e=Bt()),u[s]=l(r[s])):u[s]=r[s]}return a=n=o.apply(null,u),n="string"===t?H(a):"boolean"===t?!!a:a,0!==e&&Qt(e),n}function F(e){var t=Ut(e.length);return e.subarray||e.slice?j.set(e,t):j.set(new Uint8Array(e),t),t}var z,U,j,I,W,C,$,B="undefined"!=typeof TextDecoder?new TextDecoder("utf8"):void 0;function Q(e,t,n){var r=t+n;for(n=t;e[n]&&!(n>=r);)++n;if(16<n-t&&e.subarray&&B)return B.decode(e.subarray(t,n));for(r="";t<n;){var a=e[t++];if(128&a){var i=63&e[t++];if(192==(224&a))r+=String.fromCharCode((31&a)<<6|i);else{var o=63&e[t++];65536>(a=224==(240&a)?(15&a)<<12|i<<6|o:(7&a)<<18|i<<12|o<<6|63&e[t++])?r+=String.fromCharCode(a):(a-=65536,r+=String.fromCharCode(55296|a>>10,56320|1023&a))}}else r+=String.fromCharCode(a)}return r}function H(e,t){return e?Q(j,e,t):""}function L(e,t,n,r){if(!(0<r))return 0;var a=n;r=n+r-1;for(var i=0;i<e.length;++i){var o=e.charCodeAt(i);if(55296<=o&&57343>=o&&(o=65536+((1023&o)<<10)|1023&e.charCodeAt(++i)),127>=o){if(n>=r)break;t[n++]=o}else{if(2047>=o){if(n+1>=r)break;t[n++]=192|o>>6}else{if(65535>=o){if(n+2>=r)break;t[n++]=224|o>>12}else{if(n+3>=r)break;t[n++]=240|o>>18,t[n++]=128|o>>12&63}t[n++]=128|o>>6&63}t[n++]=128|63&o}}return t[n]=0,n-a}function V(e){for(var t=0,n=0;n<e.length;++n){var r=e.charCodeAt(n);55296<=r&&57343>=r&&(r=65536+((1023&r)<<10)|1023&e.charCodeAt(++n)),127>=r?++t:t=2047>=r?t+2:65535>=r?t+3:t+4}return t}function Y(e){var t=V(e)+1,n=Ut(t);return n&&L(e,U,n,t),n}function X(e){z=e,i.HEAP8=U=new Int8Array(e),i.HEAP16=I=new Int16Array(e),i.HEAP32=W=new Int32Array(e),i.HEAPU8=j=new Uint8Array(e),i.HEAPU16=new Uint16Array(e),i.HEAPU32=new Uint32Array(e),i.HEAPF32=C=new Float32Array(e),i.HEAPF64=$=new Float64Array(e)}var Z=i.INITIAL_MEMORY||16777216;(S=i.wasmMemory?i.wasmMemory:new WebAssembly.Memory({initial:Z/65536,maximum:32768}))&&(z=S.buffer),Z=z.byteLength,X(z);var G=[],J=[],K=[],ee=[];function te(){var e=i.preRun.shift();G.unshift(e)}var ne=0,re=null,ae=null;function ie(e){throw i.onAbort&&i.onAbort(e),g(e),T=!0,new WebAssembly.RuntimeError("abort("+e+"). Build with -s ASSERTIONS=1 for more info.")}function oe(e){var t=fe;return String.prototype.startsWith?t.startsWith(e):0===t.indexOf(e)}function ue(){return oe("data:application/octet-stream;base64,")}i.preloadedImages={},i.preloadedAudios={};var se,le,ce,fe="sql-wasm.wasm";if(!ue()){var he=fe;fe=i.locateFile?i.locateFile(he,v):v+he}function de(){try{if(k)return new Uint8Array(k);if(b)return b(fe);throw"both async and sync fetching of the wasm failed"}catch(e){ie(e)}}function pe(e){for(;0<e.length;){var t=e.shift();if("function"==typeof t)t(i);else{var n=t.Hb;"number"==typeof n?void 0===t.mb?R.get(n)():R.get(n)(t.mb):n(void 0===t.mb?null:t.mb)}}}function me(e,t){for(var n=0,r=e.length-1;0<=r;r--){var a=e[r];"."===a?e.splice(r,1):".."===a?(e.splice(r,1),n++):n&&(e.splice(r,1),n--)}if(t)for(;n;n--)e.unshift("..");return e}function be(e){var t="/"===e.charAt(0),n="/"===e.substr(-1);return(e=me(e.split("/").filter((function(e){return!!e})),!t).join("/"))||t||(e="."),e&&n&&(e+="/"),(t?"/":"")+e}function ye(e){var t=/^(\/?|)([\s\S]*?)((?:\.{1,2}|[^\/]+?|)(\.[^.\/]*|))(?:[\/]*)$/.exec(e).slice(1);return e=t[0],t=t[1],e||t?(t&&(t=t.substr(0,t.length-1)),e+t):"."}function _e(e){if("/"===e)return"/";var t=(e=(e=be(e)).replace(/\/$/,"")).lastIndexOf("/");return-1===t?e:e.substr(t+1)}function ve(e){W[zt()>>2]=e}function we(){for(var e="",t=!1,n=arguments.length-1;-1<=n&&!t;n--){if("string"!=typeof(t=0<=n?arguments[n]:"/"))throw new TypeError("Arguments to path.resolve must be strings");if(!t)return"";e=t+"/"+e,t="/"===t.charAt(0)}return(t?"/":"")+(e=me(e.split("/").filter((function(e){return!!e})),!t).join("/"))||"."}var ge=[];function qe(e,t){ge[e]={input:[],output:[],cb:t},Ze(e,ke)}var ke={open:function(e){var t=ge[e.node.rdev];if(!t)throw new Ne(43);e.tty=t,e.seekable=!1},close:function(e){e.tty.cb.flush(e.tty)},flush:function(e){e.tty.cb.flush(e.tty)},read:function(e,t,n,r){if(!e.tty||!e.tty.cb.xb)throw new Ne(60);for(var a=0,i=0;i<r;i++){try{var o=e.tty.cb.xb(e.tty)}catch(e){throw new Ne(29)}if(void 0===o&&0===a)throw new Ne(6);if(null==o)break;a++,t[n+i]=o}return a&&(e.node.timestamp=Date.now()),a},write:function(e,t,n,r){if(!e.tty||!e.tty.cb.qb)throw new Ne(60);try{for(var a=0;a<r;a++)e.tty.cb.qb(e.tty,t[n+a])}catch(e){throw new Ne(29)}return r&&(e.node.timestamp=Date.now()),a}},Me={xb:function(e){if(!e.input.length){var t=null;if(h){var n=Buffer.zb?Buffer.zb(256):new Buffer(256),r=0;try{r=y.readSync(process.stdin.fd,n,0,256,null)}catch(e){if(-1==e.toString().indexOf("EOF"))throw e;r=0}t=0<r?n.slice(0,r).toString("utf-8"):null}else"undefined"!=typeof window&&"function"==typeof window.prompt?null!==(t=window.prompt("Input: "))&&(t+="\n"):"function"==typeof readline&&null!==(t=readline())&&(t+="\n");if(!t)return null;e.input=Pt(t,!0)}return e.input.shift()},qb:function(e,t){null===t||10===t?(w(Q(e.output,0)),e.output=[]):0!=t&&e.output.push(t)},flush:function(e){e.output&&0<e.output.length&&(w(Q(e.output,0)),e.output=[])}},xe={qb:function(e,t){null===t||10===t?(g(Q(e.output,0)),e.output=[]):0!=t&&e.output.push(t)},flush:function(e){e.output&&0<e.output.length&&(g(Q(e.output,0)),e.output=[])}},Ae={Va:null,Wa:function(){return Ae.createNode(null,"/",16895,0)},createNode:function(e,t,n,r){if(24576==(61440&n)||4096==(61440&n))throw new Ne(63);return Ae.Va||(Ae.Va={dir:{node:{Ua:Ae.Na.Ua,Ta:Ae.Na.Ta,lookup:Ae.Na.lookup,gb:Ae.Na.gb,rename:Ae.Na.rename,unlink:Ae.Na.unlink,rmdir:Ae.Na.rmdir,readdir:Ae.Na.readdir,symlink:Ae.Na.symlink},stream:{Za:Ae.Oa.Za}},file:{node:{Ua:Ae.Na.Ua,Ta:Ae.Na.Ta},stream:{Za:Ae.Oa.Za,read:Ae.Oa.read,write:Ae.Oa.write,sb:Ae.Oa.sb,hb:Ae.Oa.hb,ib:Ae.Oa.ib}},link:{node:{Ua:Ae.Na.Ua,Ta:Ae.Na.Ta,readlink:Ae.Na.readlink},stream:{}},ub:{node:{Ua:Ae.Na.Ua,Ta:Ae.Na.Ta},stream:Xe}}),$e((n=Ce(e,t,n,r)).mode)?(n.Na=Ae.Va.dir.node,n.Oa=Ae.Va.dir.stream,n.Ma={}):32768==(61440&n.mode)?(n.Na=Ae.Va.file.node,n.Oa=Ae.Va.file.stream,n.Sa=0,n.Ma=null):40960==(61440&n.mode)?(n.Na=Ae.Va.link.node,n.Oa=Ae.Va.link.stream):8192==(61440&n.mode)&&(n.Na=Ae.Va.ub.node,n.Oa=Ae.Va.ub.stream),n.timestamp=Date.now(),e&&(e.Ma[t]=n),n},Sb:function(e){if(e.Ma&&e.Ma.subarray){for(var t=[],n=0;n<e.Sa;++n)t.push(e.Ma[n]);return t}return e.Ma},Tb:function(e){return e.Ma?e.Ma.subarray?e.Ma.subarray(0,e.Sa):new Uint8Array(e.Ma):new Uint8Array(0)},vb:function(e,t){var n=e.Ma?e.Ma.length:0;n>=t||(t=Math.max(t,n*(1048576>n?2:1.125)>>>0),0!=n&&(t=Math.max(t,256)),n=e.Ma,e.Ma=new Uint8Array(t),0<e.Sa&&e.Ma.set(n.subarray(0,e.Sa),0))},Pb:function(e,t){if(e.Sa!=t)if(0==t)e.Ma=null,e.Sa=0;else{if(!e.Ma||e.Ma.subarray){var n=e.Ma;e.Ma=new Uint8Array(t),n&&e.Ma.set(n.subarray(0,Math.min(t,e.Sa)))}else if(e.Ma||(e.Ma=[]),e.Ma.length>t)e.Ma.length=t;else for(;e.Ma.length<t;)e.Ma.push(0);e.Sa=t}},Na:{Ua:function(e){var t={};return t.dev=8192==(61440&e.mode)?e.id:1,t.ino=e.id,t.mode=e.mode,t.nlink=1,t.uid=0,t.gid=0,t.rdev=e.rdev,$e(e.mode)?t.size=4096:32768==(61440&e.mode)?t.size=e.Sa:40960==(61440&e.mode)?t.size=e.link.length:t.size=0,t.atime=new Date(e.timestamp),t.mtime=new Date(e.timestamp),t.ctime=new Date(e.timestamp),t.Gb=4096,t.blocks=Math.ceil(t.size/t.Gb),t},Ta:function(e,t){void 0!==t.mode&&(e.mode=t.mode),void 0!==t.timestamp&&(e.timestamp=t.timestamp),void 0!==t.size&&Ae.Pb(e,t.size)},lookup:function(){throw Fe[44]},gb:function(e,t,n,r){return Ae.createNode(e,t,n,r)},rename:function(e,t,n){if($e(e.mode)){try{var r=We(t,n)}catch(e){}if(r)for(var a in r.Ma)throw new Ne(55)}delete e.parent.Ma[e.name],e.name=n,t.Ma[n]=e,e.parent=t},unlink:function(e,t){delete e.Ma[t]},rmdir:function(e,t){var n,r=We(e,t);for(n in r.Ma)throw new Ne(55);delete e.Ma[t]},readdir:function(e){var t,n=[".",".."];for(t in e.Ma)e.Ma.hasOwnProperty(t)&&n.push(t);return n},symlink:function(e,t,n){return(e=Ae.createNode(e,t,41471,0)).link=n,e},readlink:function(e){if(40960!=(61440&e.mode))throw new Ne(28);return e.link}},Oa:{read:function(e,t,n,r,a){var i=e.node.Ma;if(a>=e.node.Sa)return 0;if(8<(e=Math.min(e.node.Sa-a,r))&&i.subarray)t.set(i.subarray(a,a+e),n);else for(r=0;r<e;r++)t[n+r]=i[a+r];return e},write:function(e,t,n,r,a,i){if(t.buffer===U.buffer&&(i=!1),!r)return 0;if((e=e.node).timestamp=Date.now(),t.subarray&&(!e.Ma||e.Ma.subarray)){if(i)return e.Ma=t.subarray(n,n+r),e.Sa=r;if(0===e.Sa&&0===a)return e.Ma=t.slice(n,n+r),e.Sa=r;if(a+r<=e.Sa)return e.Ma.set(t.subarray(n,n+r),a),r}if(Ae.vb(e,a+r),e.Ma.subarray&&t.subarray)e.Ma.set(t.subarray(n,n+r),a);else for(i=0;i<r;i++)e.Ma[a+i]=t[n+i];return e.Sa=Math.max(e.Sa,a+r),r},Za:function(e,t,n){if(1===n?t+=e.position:2===n&&32768==(61440&e.node.mode)&&(t+=e.node.Sa),0>t)throw new Ne(28);return t},sb:function(e,t,n){Ae.vb(e.node,t+n),e.node.Sa=Math.max(e.node.Sa,t+n)},hb:function(e,t,n,r,a,i){if(P(0===t),32768!=(61440&e.node.mode))throw new Ne(43);if(e=e.node.Ma,2&i||e.buffer!==z){for((0<r||r+n<e.length)&&(e=e.subarray?e.subarray(r,r+n):Array.prototype.slice.call(e,r,r+n)),r=!0,i=16384*Math.ceil(n/16384),t=Ut(i);n<i;)U[t+n++]=0;if(!(n=t))throw new Ne(48);U.set(e,n)}else r=!1,n=e.byteOffset;return{Ob:n,kb:r}},ib:function(e,t,n,r,a){if(32768!=(61440&e.node.mode))throw new Ne(43);return 2&a||Ae.Oa.write(e,t,0,r,n,!1),0}}},Oe=null,Ee={},Se=[],Re=1,Te=null,Pe=!0,De={},Ne=null,Fe={};function ze(e,t){if(t=t||{},!(e=we("/",e)))return{path:"",node:null};var n,r={wb:!0,rb:0};for(n in r)void 0===t[n]&&(t[n]=r[n]);if(8<t.rb)throw new Ne(32);e=me(e.split("/").filter((function(e){return!!e})),!1);var a=Oe;for(r="/",n=0;n<e.length;n++){var i=n===e.length-1;if(i&&t.parent)break;if(a=We(a,e[n]),r=be(r+"/"+e[n]),a.ab&&(!i||i&&t.wb)&&(a=a.ab.root),!i||t.Ya)for(i=0;40960==(61440&a.mode);)if(a=rt(r),a=ze(r=we(ye(r),a),{rb:t.rb}).node,40<i++)throw new Ne(32)}return{path:r,node:a}}function Ue(e){for(var t;;){if(e===e.parent)return e=e.Wa.yb,t?"/"!==e[e.length-1]?e+"/"+t:e+t:e;t=t?e.name+"/"+t:e.name,e=e.parent}}function je(e,t){for(var n=0,r=0;r<t.length;r++)n=(n<<5)-n+t.charCodeAt(r)|0;return(e+n>>>0)%Te.length}function Ie(e){var t=je(e.parent.id,e.name);if(Te[t]===e)Te[t]=e.bb;else for(t=Te[t];t;){if(t.bb===e){t.bb=e.bb;break}t=t.bb}}function We(e,t){var n;if(n=(n=He(e,"x"))?n:e.Na.lookup?0:2)throw new Ne(n,e);for(n=Te[je(e.id,t)];n;n=n.bb){var r=n.name;if(n.parent.id===e.id&&r===t)return n}return e.Na.lookup(e,t)}function Ce(e,t,n,r){return t=je((e=new Tt(e,t,n,r)).parent.id,e.name),e.bb=Te[t],Te[t]=e}function $e(e){return 16384==(61440&e)}var Be={r:0,rs:1052672,"r+":2,w:577,wx:705,xw:705,"w+":578,"wx+":706,"xw+":706,a:1089,ax:1217,xa:1217,"a+":1090,"ax+":1218,"xa+":1218};function Qe(e){var t=["r","w","rw"][3&e];return 512&e&&(t+="w"),t}function He(e,t){return Pe||(-1===t.indexOf("r")||292&e.mode)&&(-1===t.indexOf("w")||146&e.mode)&&(-1===t.indexOf("x")||73&e.mode)?0:2}function Le(e,t){try{return We(e,t),20}catch(e){}return He(e,"wx")}function Ve(e,t,n){try{var r=We(e,t)}catch(e){return e.Pa}if(e=He(e,"wx"))return e;if(n){if(!$e(r.mode))return 54;if(r===r.parent||"/"===Ue(r))return 10}else if($e(r.mode))return 31;return 0}var Ye,Xe={open:function(e){e.Oa=Ee[e.node.rdev].Oa,e.Oa.open&&e.Oa.open(e)},Za:function(){throw new Ne(70)}};function Ze(e,t){Ee[e]={Oa:t}}function Ge(e,t){var n="/"===t,r=!t;if(n&&Oe)throw new Ne(10);if(!n&&!r){var a=ze(t,{wb:!1});if(t=a.path,(a=a.node).ab)throw new Ne(10);if(!$e(a.mode))throw new Ne(54)}t={type:e,Ub:{},yb:t,Mb:[]},(e=e.Wa(t)).Wa=t,t.root=e,n?Oe=e:a&&(a.ab=t,a.Wa&&a.Wa.Mb.push(t))}function Je(e,t,n){var r=ze(e,{parent:!0}).node;if(!(e=_e(e))||"."===e||".."===e)throw new Ne(28);var a=Le(r,e);if(a)throw new Ne(a);if(!r.Na.gb)throw new Ne(63);return r.Na.gb(r,e,t,n)}function Ke(e,t){Je(e,1023&(void 0!==t?t:511)|16384,0)}function et(e,t,n){void 0===n&&(n=t,t=438),Je(e,8192|t,n)}function tt(e,t){if(!we(e))throw new Ne(44);var n=ze(t,{parent:!0}).node;if(!n)throw new Ne(44);var r=Le(n,t=_e(t));if(r)throw new Ne(r);if(!n.Na.symlink)throw new Ne(63);n.Na.symlink(n,t,e)}function nt(e){var t=ze(e,{parent:!0}).node,n=_e(e),r=We(t,n),a=Ve(t,n,!1);if(a)throw new Ne(a);if(!t.Na.unlink)throw new Ne(63);if(r.ab)throw new Ne(10);try{De.willDeletePath&&De.willDeletePath(e)}catch(t){g("FS.trackingDelegate['willDeletePath']('"+e+"') threw an exception: "+t.message)}t.Na.unlink(t,n),Ie(r);try{De.onDeletePath&&De.onDeletePath(e)}catch(t){g("FS.trackingDelegate['onDeletePath']('"+e+"') threw an exception: "+t.message)}}function rt(e){if(!(e=ze(e).node))throw new Ne(44);if(!e.Na.readlink)throw new Ne(28);return we(Ue(e.parent),e.Na.readlink(e))}function at(e,t){if(!(e=ze(e,{Ya:!t}).node))throw new Ne(44);if(!e.Na.Ua)throw new Ne(63);return e.Na.Ua(e)}function it(e){return at(e,!0)}function ot(e,t){var n;if(!(n="string"==typeof e?ze(e,{Ya:!0}).node:e).Na.Ta)throw new Ne(63);n.Na.Ta(n,{mode:4095&t|-4096&n.mode,timestamp:Date.now()})}function ut(e){var t;if(!(t="string"==typeof e?ze(e,{Ya:!0}).node:e).Na.Ta)throw new Ne(63);t.Na.Ta(t,{timestamp:Date.now()})}function st(e,t){if(0>t)throw new Ne(28);var n;if(!(n="string"==typeof e?ze(e,{Ya:!0}).node:e).Na.Ta)throw new Ne(63);if($e(n.mode))throw new Ne(31);if(32768!=(61440&n.mode))throw new Ne(28);if(e=He(n,"w"))throw new Ne(e);n.Na.Ta(n,{size:t,timestamp:Date.now()})}function lt(e,t,n,r){if(""===e)throw new Ne(44);if("string"==typeof t){var a=Be[t];if(void 0===a)throw Error("Unknown file open mode: "+t);t=a}if(n=64&t?4095&(void 0===n?438:n)|32768:0,"object"==typeof e)var o=e;else{e=be(e);try{o=ze(e,{Ya:!(131072&t)}).node}catch(e){}}if(a=!1,64&t)if(o){if(128&t)throw new Ne(20)}else o=Je(e,n,0),a=!0;if(!o)throw new Ne(44);if(8192==(61440&o.mode)&&(t&=-513),65536&t&&!$e(o.mode))throw new Ne(54);if(!a&&(n=o?40960==(61440&o.mode)?32:$e(o.mode)&&("r"!==Qe(t)||512&t)?31:He(o,Qe(t)):44))throw new Ne(n);512&t&&st(o,0),t&=-131713,(r=function(e,t){_t||((_t=function(){}).prototype={});var n,r=new _t;for(n in e)r[n]=e[n];return e=r,t=function(e){for(e=e||0;e<=4096;e++)if(!Se[e])return e;throw new Ne(33)}(t),e.fd=t,Se[t]=e}({node:o,path:Ue(o),flags:t,seekable:!0,position:0,Oa:o.Oa,Rb:[],error:!1},r)).Oa.open&&r.Oa.open(r),!i.logReadFiles||1&t||(vt||(vt={}),e in vt||(vt[e]=1,g("FS.trackingDelegate error on read file: "+e)));try{De.onOpenFile&&(o=0,1!=(2097155&t)&&(o|=1),0!=(2097155&t)&&(o|=2),De.onOpenFile(e,o))}catch(t){g("FS.trackingDelegate['onOpenFile']('"+e+"', flags) threw an exception: "+t.message)}return r}function ct(e){if(null===e.fd)throw new Ne(8);e.ob&&(e.ob=null);try{e.Oa.close&&e.Oa.close(e)}catch(e){throw e}finally{Se[e.fd]=null}e.fd=null}function ft(e,t,n){if(null===e.fd)throw new Ne(8);if(!e.seekable||!e.Oa.Za)throw new Ne(70);if(0!=n&&1!=n&&2!=n)throw new Ne(28);e.position=e.Oa.Za(e,t,n),e.Rb=[]}function ht(e,t,n,r,a){if(0>r||0>a)throw new Ne(28);if(null===e.fd)throw new Ne(8);if(1==(2097155&e.flags))throw new Ne(8);if($e(e.node.mode))throw new Ne(31);if(!e.Oa.read)throw new Ne(28);var i=void 0!==a;if(i){if(!e.seekable)throw new Ne(70)}else a=e.position;return t=e.Oa.read(e,t,n,r,a),i||(e.position+=t),t}function dt(e,t,n,r,a,i){if(0>r||0>a)throw new Ne(28);if(null===e.fd)throw new Ne(8);if(0==(2097155&e.flags))throw new Ne(8);if($e(e.node.mode))throw new Ne(31);if(!e.Oa.write)throw new Ne(28);e.seekable&&1024&e.flags&&ft(e,0,2);var o=void 0!==a;if(o){if(!e.seekable)throw new Ne(70)}else a=e.position;t=e.Oa.write(e,t,n,r,a,i),o||(e.position+=t);try{e.path&&De.onWriteToFile&&De.onWriteToFile(e.path)}catch(t){g("FS.trackingDelegate['onWriteToFile']('"+e.path+"') threw an exception: "+t.message)}return t}function pt(){Ne||((Ne=function(e,t){this.node=t,this.Qb=function(e){this.Pa=e},this.Qb(e),this.message="FS error"}).prototype=Error(),Ne.prototype.constructor=Ne,[44].forEach((function(e){Fe[e]=new Ne(e),Fe[e].stack="<generic error, no stack>"})))}function mt(e,t){var n=0;return e&&(n|=365),t&&(n|=146),n}function bt(e,t,n){e=be("/dev/"+e);var r=mt(!!t,!!n);yt||(yt=64);var a=yt++<<8|0;Ze(a,{open:function(e){e.seekable=!1},close:function(){n&&n.buffer&&n.buffer.length&&n(10)},read:function(e,n,r,a){for(var i=0,o=0;o<a;o++){try{var u=t()}catch(e){throw new Ne(29)}if(void 0===u&&0===i)throw new Ne(6);if(null==u)break;i++,n[r+o]=u}return i&&(e.node.timestamp=Date.now()),i},write:function(e,t,r,a){for(var i=0;i<a;i++)try{n(t[r+i])}catch(e){throw new Ne(29)}return a&&(e.node.timestamp=Date.now()),i}}),et(e,r,a)}var yt,_t,vt,wt={},gt={};function qt(e,t,n){try{var r=e(t)}catch(e){if(e&&e.node&&be(t)!==be(Ue(e.node)))return-54;throw e}return W[n>>2]=r.dev,W[n+4>>2]=0,W[n+8>>2]=r.ino,W[n+12>>2]=r.mode,W[n+16>>2]=r.nlink,W[n+20>>2]=r.uid,W[n+24>>2]=r.gid,W[n+28>>2]=r.rdev,W[n+32>>2]=0,le=[r.size>>>0,(se=r.size,1<=+Math.abs(se)?0<se?(0|Math.min(+Math.floor(se/4294967296),4294967295))>>>0:~~+Math.ceil((se-+(~~se>>>0))/4294967296)>>>0:0)],W[n+40>>2]=le[0],W[n+44>>2]=le[1],W[n+48>>2]=4096,W[n+52>>2]=r.blocks,W[n+56>>2]=r.atime.getTime()/1e3|0,W[n+60>>2]=0,W[n+64>>2]=r.mtime.getTime()/1e3|0,W[n+68>>2]=0,W[n+72>>2]=r.ctime.getTime()/1e3|0,W[n+76>>2]=0,le=[r.ino>>>0,(se=r.ino,1<=+Math.abs(se)?0<se?(0|Math.min(+Math.floor(se/4294967296),4294967295))>>>0:~~+Math.ceil((se-+(~~se>>>0))/4294967296)>>>0:0)],W[n+80>>2]=le[0],W[n+84>>2]=le[1],0}var kt=void 0;function Mt(){return W[(kt+=4)-4>>2]}function xt(e){if(!(e=Se[e]))throw new Ne(8);return e}var At,Ot,Et={};function St(){if(!At){var e,t={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",_:p||"./this.program"};for(e in Et)t[e]=Et[e];var n=[];for(e in t)n.push(e+"="+t[e]);At=n}return At}function Rt(e){for(var t=Ot();Ot()-t<e/1e3;);}function Tt(e,t,n,r){e||(e=this),this.parent=e,this.Wa=e.Wa,this.ab=null,this.id=Re++,this.name=t,this.mode=n,this.Na={},this.Oa={},this.rdev=r}function Pt(e,t){var n=Array(V(e)+1);return e=L(e,n,0,n.length),t&&(n.length=e),n}Ot=h?function(){var e=process.hrtime();return 1e3*e[0]+e[1]/1e6}:"undefined"!=typeof dateNow?dateNow:function(){return performance.now()},i._usleep=Rt,Object.defineProperties(Tt.prototype,{read:{get:function(){return 365==(365&this.mode)},set:function(e){e?this.mode|=365:this.mode&=-366}},write:{get:function(){return 146==(146&this.mode)},set:function(e){e?this.mode|=146:this.mode&=-147}}}),pt(),Te=Array(4096),Ge(Ae,"/"),Ke("/tmp"),Ke("/home"),Ke("/home/web_user"),function(){Ke("/dev"),Ze(259,{read:function(){return 0},write:function(e,t,n,r){return r}}),et("/dev/null",259),qe(1280,Me),qe(1536,xe),et("/dev/tty",1280),et("/dev/tty1",1536);var e=function(){if("object"==typeof crypto&&"function"==typeof crypto.getRandomValues){var e=new Uint8Array(1);return function(){return crypto.getRandomValues(e),e[0]}}if(h)try{var t=n(417);return function(){return t.randomBytes(1)[0]}}catch(e){}return function(){ie("randomDevice")}}();bt("random",e),bt("urandom",e),Ke("/dev/shm"),Ke("/dev/shm/tmp")}(),Ke("/proc"),Ke("/proc/self"),Ke("/proc/self/fd"),Ge({Wa:function(){var e=Ce("/proc/self","fd",16895,73);return e.Na={lookup:function(e,t){var n=Se[+t];if(!n)throw new Ne(8);return(e={parent:null,Wa:{yb:"fake"},Na:{readlink:function(){return n.path}}}).parent=e}},e}},"/proc/self/fd"),J.push({Hb:function(){Nt()}});var Dt={b:function(e,t,n,r){ie("Assertion failed: "+H(e)+", at: "+[t?H(t):"unknown filename",n,r?H(r):"unknown function"])},r:function(e,t){!function(){function e(e){return(e=e.toTimeString().match(/\(([A-Za-z ]+)\)$/))?e[1]:"GMT"}if(!ce){ce=!0,W[$t()>>2]=60*(new Date).getTimezoneOffset();var t=(new Date).getFullYear(),n=new Date(t,0,1);t=new Date(t,6,1),W[Ct()>>2]=Number(n.getTimezoneOffset()!=t.getTimezoneOffset());var r=e(n),a=e(t);r=Y(r),a=Y(a),t.getTimezoneOffset()<n.getTimezoneOffset()?(W[Wt()>>2]=r,W[Wt()+4>>2]=a):(W[Wt()>>2]=a,W[Wt()+4>>2]=r)}}(),e=new Date(1e3*W[e>>2]),W[t>>2]=e.getSeconds(),W[t+4>>2]=e.getMinutes(),W[t+8>>2]=e.getHours(),W[t+12>>2]=e.getDate(),W[t+16>>2]=e.getMonth(),W[t+20>>2]=e.getFullYear()-1900,W[t+24>>2]=e.getDay();var n=new Date(e.getFullYear(),0,1);W[t+28>>2]=(e.getTime()-n.getTime())/864e5|0,W[t+36>>2]=-60*e.getTimezoneOffset();var r=new Date(e.getFullYear(),6,1).getTimezoneOffset();return e=0|(r!=(n=n.getTimezoneOffset())&&e.getTimezoneOffset()==Math.min(n,r)),W[t+32>>2]=e,e=W[Wt()+(e?4:0)>>2],W[t+40>>2]=e,t},j:function(e,t){try{var n;if(e=H(e),-8&t)var r=-28;else(n=ze(e,{Ya:!0}).node)?(e="",4&t&&(e+="r"),2&t&&(e+="w"),1&t&&(e+="x"),r=e&&He(n,e)?-2:0):r=-44;return r}catch(e){return void 0!==wt&&e instanceof Ne||ie(e),-e.Pa}},v:function(e,t){try{return ot(e=H(e),t),0}catch(e){return void 0!==wt&&e instanceof Ne||ie(e),-e.Pa}},D:function(e){try{return ut(e=H(e)),0}catch(e){return void 0!==wt&&e instanceof Ne||ie(e),-e.Pa}},w:function(e,t){try{var n=Se[e];if(!n)throw new Ne(8);return ot(n.node,t),0}catch(e){return void 0!==wt&&e instanceof Ne||ie(e),-e.Pa}},E:function(e){try{var t=Se[e];if(!t)throw new Ne(8);return ut(t.node),0}catch(e){return void 0!==wt&&e instanceof Ne||ie(e),-e.Pa}},c:function(e,t,n){kt=n;try{var r=xt(e);switch(t){case 0:var a=Mt();return 0>a?-28:lt(r.path,r.flags,0,a).fd;case 1:case 2:return 0;case 3:return r.flags;case 4:return a=Mt(),r.flags|=a,0;case 12:return a=Mt(),I[a+0>>1]=2,0;case 13:case 14:return 0;case 16:case 8:return-28;case 9:return ve(28),-1;default:return-28}}catch(e){return void 0!==wt&&e instanceof Ne||ie(e),-e.Pa}},x:function(e,t){try{return qt(at,xt(e).path,t)}catch(e){return void 0!==wt&&e instanceof Ne||ie(e),-e.Pa}},i:function(e,t,n){try{var r=Se[e];if(!r)throw new Ne(8);if(0==(2097155&r.flags))throw new Ne(28);return st(r.node,n),0}catch(e){return void 0!==wt&&e instanceof Ne||ie(e),-e.Pa}},J:function(e,t){try{return 0===t?-28:t<V("/")+1?-68:(L("/",j,e,t),e)}catch(e){return void 0!==wt&&e instanceof Ne||ie(e),-e.Pa}},F:function(){return 0},e:function(){return 42},u:function(e,t){try{return qt(it,e=H(e),t)}catch(e){return void 0!==wt&&e instanceof Ne||ie(e),-e.Pa}},t:function(e,t){try{return"/"===(e=be(e=H(e)))[e.length-1]&&(e=e.substr(0,e.length-1)),Ke(e,t),0}catch(e){return void 0!==wt&&e instanceof Ne||ie(e),-e.Pa}},A:function(e,t,n,r,a,i){try{e:{i<<=12;var o=!1;if(0!=(16&r)&&0!=e%16384)var u=-28;else{if(0!=(32&r)){var s=Lt(16384,t);if(!s){u=-48;break e}Ft(s,0,t),o=!0}else{var l=Se[a];if(!l){u=-8;break e}var c=i;if(0!=(2&n)&&0==(2&r)&&2!=(2097155&l.flags))throw new Ne(2);if(1==(2097155&l.flags))throw new Ne(2);if(!l.Oa.hb)throw new Ne(43);var f=l.Oa.hb(l,e,t,c,n,r);s=f.Ob,o=f.kb}gt[s]={Lb:s,Kb:t,kb:o,fd:a,Nb:n,flags:r,offset:i},u=s}}return u}catch(e){return void 0!==wt&&e instanceof Ne||ie(e),-e.Pa}},z:function(e,t){try{if(-1==(0|e)||0===t)var n=-28;else{var r=gt[e];if(r&&t===r.Kb){var a=Se[r.fd];if(2&r.Nb){var i=r.flags,o=r.offset,u=j.slice(e,e+t);a&&a.Oa.ib&&a.Oa.ib(a,u,o,t,i)}gt[e]=null,r.kb&&jt(r.Lb)}n=0}return n}catch(e){return void 0!==wt&&e instanceof Ne||ie(e),-e.Pa}},y:function(e,t,n){kt=n;try{return lt(H(e),t,Mt()).fd}catch(e){return void 0!==wt&&e instanceof Ne||ie(e),-e.Pa}},G:function(e,t,n){try{return ht(xt(e),U,t,n)}catch(e){return void 0!==wt&&e instanceof Ne||ie(e),-e.Pa}},l:function(e,t,n){try{if(e=H(e),0>=n)var r=-28;else{var a=rt(e),i=Math.min(n,V(a)),o=U[t+i];L(a,j,t,n+1),U[t+i]=o,r=i}return r}catch(e){return void 0!==wt&&e instanceof Ne||ie(e),-e.Pa}},C:function(e){try{var t=ze(e=H(e),{parent:!0}).node,n=_e(e),r=We(t,n),a=Ve(t,n,!0);if(a)throw new Ne(a);if(!t.Na.rmdir)throw new Ne(63);if(r.ab)throw new Ne(10);try{De.willDeletePath&&De.willDeletePath(e)}catch(t){g("FS.trackingDelegate['willDeletePath']('"+e+"') threw an exception: "+t.message)}t.Na.rmdir(t,n),Ie(r);try{De.onDeletePath&&De.onDeletePath(e)}catch(t){g("FS.trackingDelegate['onDeletePath']('"+e+"') threw an exception: "+t.message)}return 0}catch(e){return void 0!==wt&&e instanceof Ne||ie(e),-e.Pa}},f:function(e,t){try{return qt(at,e=H(e),t)}catch(e){return void 0!==wt&&e instanceof Ne||ie(e),-e.Pa}},H:function(e){try{return nt(e=H(e)),0}catch(e){return void 0!==wt&&e instanceof Ne||ie(e),-e.Pa}},n:function(e,t,n){j.copyWithin(e,t,t+n)},d:function(e){e>>>=0;var t=j.length;if(2147483648<e)return!1;for(var n=1;4>=n;n*=2){var r=t*(1+.2/n);r=Math.min(r,e+100663296),0<(r=Math.max(16777216,e,r))%65536&&(r+=65536-r%65536);e:{try{S.grow(Math.min(2147483648,r)-z.byteLength+65535>>>16),X(S.buffer);var a=1;break e}catch(e){}a=void 0}if(a)return!0}return!1},p:function(e,t){var n=0;return St().forEach((function(r,a){var i=t+n;for(a=W[e+4*a>>2]=i,i=0;i<r.length;++i)U[a++>>0]=r.charCodeAt(i);U[a>>0]=0,n+=r.length+1})),0},q:function(e,t){var n=St();W[e>>2]=n.length;var r=0;return n.forEach((function(e){r+=e.length+1})),W[t>>2]=r,0},g:function(e){try{return ct(xt(e)),0}catch(e){return void 0!==wt&&e instanceof Ne||ie(e),e.Pa}},o:function(e,t){try{var n=xt(e);return U[t>>0]=n.tty?2:$e(n.mode)?3:40960==(61440&n.mode)?7:4,0}catch(e){return void 0!==wt&&e instanceof Ne||ie(e),e.Pa}},m:function(e,t,n,r,a){try{var i=xt(e);return-9007199254740992>=(e=4294967296*n+(t>>>0))||9007199254740992<=e?-61:(ft(i,e,r),le=[i.position>>>0,(se=i.position,1<=+Math.abs(se)?0<se?(0|Math.min(+Math.floor(se/4294967296),4294967295))>>>0:~~+Math.ceil((se-+(~~se>>>0))/4294967296)>>>0:0)],W[a>>2]=le[0],W[a+4>>2]=le[1],i.ob&&0===e&&0===r&&(i.ob=null),0)}catch(e){return void 0!==wt&&e instanceof Ne||ie(e),e.Pa}},K:function(e){try{var t=xt(e);return t.Oa&&t.Oa.fsync?-t.Oa.fsync(t):0}catch(e){return void 0!==wt&&e instanceof Ne||ie(e),e.Pa}},I:function(e,t,n,r){try{e:{for(var a=xt(e),i=e=0;i<n;i++){var o=dt(a,U,W[t+8*i>>2],W[t+(8*i+4)>>2],void 0);if(0>o){var u=-1;break e}e+=o}u=e}return W[r>>2]=u,0}catch(e){return void 0!==wt&&e instanceof Ne||ie(e),e.Pa}},h:function(e){var t=Date.now();return W[e>>2]=t/1e3|0,W[e+4>>2]=t%1e3*1e3|0,0},a:S,k:function(e,t){if(0===e)return ve(28),-1;var n=W[e>>2];return 0>(e=W[e+4>>2])||999999999<e||0>n?(ve(28),-1):(0!==t&&(W[t>>2]=0,W[t+4>>2]=0),Rt(1e6*n+e/1e3))},B:function(e){switch(e){case 30:return 16384;case 85:return 131072;case 132:case 133:case 12:case 137:case 138:case 15:case 235:case 16:case 17:case 18:case 19:case 20:case 149:case 13:case 10:case 236:case 153:case 9:case 21:case 22:case 159:case 154:case 14:case 77:case 78:case 139:case 80:case 81:case 82:case 68:case 67:case 164:case 11:case 29:case 47:case 48:case 95:case 52:case 51:case 46:case 79:return 200809;case 27:case 246:case 127:case 128:case 23:case 24:case 160:case 161:case 181:case 182:case 242:case 183:case 184:case 243:case 244:case 245:case 165:case 178:case 179:case 49:case 50:case 168:case 169:case 175:case 170:case 171:case 172:case 97:case 76:case 32:case 173:case 35:return-1;case 176:case 177:case 7:case 155:case 8:case 157:case 125:case 126:case 92:case 93:case 129:case 130:case 131:case 94:case 91:return 1;case 74:case 60:case 69:case 70:case 4:return 1024;case 31:case 42:case 72:return 32;case 87:case 26:case 33:return 2147483647;case 34:case 1:return 47839;case 38:case 36:return 99;case 43:case 37:return 2048;case 0:return 2097152;case 3:return 65536;case 28:return 32768;case 44:return 32767;case 75:return 16384;case 39:return 1e3;case 89:return 700;case 71:return 256;case 40:return 255;case 2:return 100;case 180:return 64;case 25:return 20;case 5:return 16;case 6:return 6;case 73:return 4;case 84:return"object"==typeof navigator&&navigator.hardwareConcurrency||1}return ve(28),-1},L:function(e){var t=Date.now()/1e3|0;return e&&(W[e>>2]=t),t},s:function(e,t){if(t){var n=1e3*W[t+8>>2];n+=W[t+12>>2]/1e3}else n=Date.now();e=H(e);try{t=n;var r=ze(e,{Ya:!0}).node;return r.Na.Ta(r,{timestamp:Math.max(t,n)}),0}catch(t){if(!((e=t)instanceof Ne)){e+=" : ";e:{if(!(r=Error()).stack){try{throw Error()}catch(e){r=e}if(!r.stack){r="(no stack trace available)";break e}}r=r.stack.toString()}throw i.extraStackTrace&&(r+="\n"+i.extraStackTrace()),r=function(e){return e.replace(/\b_Z[\w\d_]+/g,(function(e){return e==e?e:e+" ["+e+"]"}))}(r),e+r}return ve(e.Pa),-1}}};!function(){function e(e){i.asm=e.exports,R=i.asm.M,ne--,i.monitorRunDependencies&&i.monitorRunDependencies(ne),0==ne&&(null!==re&&(clearInterval(re),re=null),ae&&(e=ae,ae=null,e()))}function t(t){e(t.instance)}function n(e){return(k||!c&&!f||"function"!=typeof fetch||oe("file://")?Promise.resolve().then(de):fetch(fe,{credentials:"same-origin"}).then((function(e){if(!e.ok)throw"failed to load wasm binary file at '"+fe+"'";return e.arrayBuffer()})).catch((function(){return de()}))).then((function(e){return WebAssembly.instantiate(e,r)})).then(e,(function(e){g("failed to asynchronously prepare wasm: "+e),ie(e)}))}var r={a:Dt};if(ne++,i.monitorRunDependencies&&i.monitorRunDependencies(ne),i.instantiateWasm)try{return i.instantiateWasm(r,e)}catch(e){return g("Module.instantiateWasm callback failed with error: "+e),!1}!function(){if(k||"function"!=typeof WebAssembly.instantiateStreaming||ue()||oe("file://")||"function"!=typeof fetch)return n(t);fetch(fe,{credentials:"same-origin"}).then((function(e){return WebAssembly.instantiateStreaming(e,r).then(t,(function(e){return g("wasm streaming compile failed: "+e),g("falling back to ArrayBuffer instantiation"),n(t)}))}))}()}();var Nt=i.___wasm_call_ctors=function(){return(Nt=i.___wasm_call_ctors=i.asm.N).apply(null,arguments)},Ft=i._memset=function(){return(Ft=i._memset=i.asm.O).apply(null,arguments)};i._sqlite3_free=function(){return(i._sqlite3_free=i.asm.P).apply(null,arguments)};var zt=i.___errno_location=function(){return(zt=i.___errno_location=i.asm.Q).apply(null,arguments)};i._sqlite3_finalize=function(){return(i._sqlite3_finalize=i.asm.R).apply(null,arguments)},i._sqlite3_reset=function(){return(i._sqlite3_reset=i.asm.S).apply(null,arguments)},i._sqlite3_clear_bindings=function(){return(i._sqlite3_clear_bindings=i.asm.T).apply(null,arguments)},i._sqlite3_value_blob=function(){return(i._sqlite3_value_blob=i.asm.U).apply(null,arguments)},i._sqlite3_value_text=function(){return(i._sqlite3_value_text=i.asm.V).apply(null,arguments)},i._sqlite3_value_bytes=function(){return(i._sqlite3_value_bytes=i.asm.W).apply(null,arguments)},i._sqlite3_value_double=function(){return(i._sqlite3_value_double=i.asm.X).apply(null,arguments)},i._sqlite3_value_int=function(){return(i._sqlite3_value_int=i.asm.Y).apply(null,arguments)},i._sqlite3_value_type=function(){return(i._sqlite3_value_type=i.asm.Z).apply(null,arguments)},i._sqlite3_result_blob=function(){return(i._sqlite3_result_blob=i.asm._).apply(null,arguments)},i._sqlite3_result_double=function(){return(i._sqlite3_result_double=i.asm.$).apply(null,arguments)},i._sqlite3_result_error=function(){return(i._sqlite3_result_error=i.asm.aa).apply(null,arguments)},i._sqlite3_result_int=function(){return(i._sqlite3_result_int=i.asm.ba).apply(null,arguments)},i._sqlite3_result_int64=function(){return(i._sqlite3_result_int64=i.asm.ca).apply(null,arguments)},i._sqlite3_result_null=function(){return(i._sqlite3_result_null=i.asm.da).apply(null,arguments)},i._sqlite3_result_text=function(){return(i._sqlite3_result_text=i.asm.ea).apply(null,arguments)},i._sqlite3_step=function(){return(i._sqlite3_step=i.asm.fa).apply(null,arguments)},i._sqlite3_column_count=function(){return(i._sqlite3_column_count=i.asm.ga).apply(null,arguments)},i._sqlite3_data_count=function(){return(i._sqlite3_data_count=i.asm.ha).apply(null,arguments)},i._sqlite3_column_blob=function(){return(i._sqlite3_column_blob=i.asm.ia).apply(null,arguments)},i._sqlite3_column_bytes=function(){return(i._sqlite3_column_bytes=i.asm.ja).apply(null,arguments)},i._sqlite3_column_double=function(){return(i._sqlite3_column_double=i.asm.ka).apply(null,arguments)},i._sqlite3_column_text=function(){return(i._sqlite3_column_text=i.asm.la).apply(null,arguments)},i._sqlite3_column_type=function(){return(i._sqlite3_column_type=i.asm.ma).apply(null,arguments)},i._sqlite3_column_name=function(){return(i._sqlite3_column_name=i.asm.na).apply(null,arguments)},i._sqlite3_bind_blob=function(){return(i._sqlite3_bind_blob=i.asm.oa).apply(null,arguments)},i._sqlite3_bind_double=function(){return(i._sqlite3_bind_double=i.asm.pa).apply(null,arguments)},i._sqlite3_bind_int=function(){return(i._sqlite3_bind_int=i.asm.qa).apply(null,arguments)},i._sqlite3_bind_text=function(){return(i._sqlite3_bind_text=i.asm.ra).apply(null,arguments)},i._sqlite3_bind_parameter_index=function(){return(i._sqlite3_bind_parameter_index=i.asm.sa).apply(null,arguments)},i._sqlite3_sql=function(){return(i._sqlite3_sql=i.asm.ta).apply(null,arguments)},i._sqlite3_normalized_sql=function(){return(i._sqlite3_normalized_sql=i.asm.ua).apply(null,arguments)},i._sqlite3_errmsg=function(){return(i._sqlite3_errmsg=i.asm.va).apply(null,arguments)},i._sqlite3_exec=function(){return(i._sqlite3_exec=i.asm.wa).apply(null,arguments)},i._sqlite3_prepare_v2=function(){return(i._sqlite3_prepare_v2=i.asm.xa).apply(null,arguments)},i._sqlite3_changes=function(){return(i._sqlite3_changes=i.asm.ya).apply(null,arguments)},i._sqlite3_close_v2=function(){return(i._sqlite3_close_v2=i.asm.za).apply(null,arguments)},i._sqlite3_create_function_v2=function(){return(i._sqlite3_create_function_v2=i.asm.Aa).apply(null,arguments)},i._sqlite3_open=function(){return(i._sqlite3_open=i.asm.Ba).apply(null,arguments)};var Ut=i._malloc=function(){return(Ut=i._malloc=i.asm.Ca).apply(null,arguments)},jt=i._free=function(){return(jt=i._free=i.asm.Da).apply(null,arguments)};i._RegisterExtensionFunctions=function(){return(i._RegisterExtensionFunctions=i.asm.Ea).apply(null,arguments)};var It,Wt=i.__get_tzname=function(){return(Wt=i.__get_tzname=i.asm.Fa).apply(null,arguments)},Ct=i.__get_daylight=function(){return(Ct=i.__get_daylight=i.asm.Ga).apply(null,arguments)},$t=i.__get_timezone=function(){return($t=i.__get_timezone=i.asm.Ha).apply(null,arguments)},Bt=i.stackSave=function(){return(Bt=i.stackSave=i.asm.Ia).apply(null,arguments)},Qt=i.stackRestore=function(){return(Qt=i.stackRestore=i.asm.Ja).apply(null,arguments)},Ht=i.stackAlloc=function(){return(Ht=i.stackAlloc=i.asm.Ka).apply(null,arguments)},Lt=i._memalign=function(){return(Lt=i._memalign=i.asm.La).apply(null,arguments)};function Vt(){function e(){if(!It&&(It=!0,i.calledRun=!0,!T)){if(i.noFSInit||Ye||(Ye=!0,pt(),i.stdin=i.stdin,i.stdout=i.stdout,i.stderr=i.stderr,i.stdin?bt("stdin",i.stdin):tt("/dev/tty","/dev/stdin"),i.stdout?bt("stdout",null,i.stdout):tt("/dev/tty","/dev/stdout"),i.stderr?bt("stderr",null,i.stderr):tt("/dev/tty1","/dev/stderr"),lt("/dev/stdin","r"),lt("/dev/stdout","w"),lt("/dev/stderr","w")),pe(J),Pe=!1,pe(K),i.onRuntimeInitialized&&i.onRuntimeInitialized(),i.postRun)for("function"==typeof i.postRun&&(i.postRun=[i.postRun]);i.postRun.length;){var e=i.postRun.shift();ee.unshift(e)}pe(ee)}}if(!(0<ne)){if(i.preRun)for("function"==typeof i.preRun&&(i.preRun=[i.preRun]);i.preRun.length;)te();pe(G),0<ne||(i.setStatus?(i.setStatus("Running..."),setTimeout((function(){setTimeout((function(){i.setStatus("")}),1),e()}),1)):e())}}if(i.cwrap=function(e,t,n,r){var a=(n=n||[]).every((function(e){return"number"===e}));return"string"!==t&&a&&!r?D(e):function(){return N(e,t,n,arguments)}},i.UTF8ToString=H,i.stackSave=Bt,i.stackRestore=Qt,i.stackAlloc=Ht,ae=function e(){It||Vt(),It||(ae=e)},i.run=Vt,i.preInit)for("function"==typeof i.preInit&&(i.preInit=[i.preInit]);0<i.preInit.length;)i.preInit.pop()();return Vt(),o})))};e.exports=a,e.exports.default=a},417:e=>{"use strict";e.exports=require("crypto")},747:e=>{"use strict";e.exports=require("fs")},622:e=>{"use strict";e.exports=require("path")}},t={};function n(r){if(t[r])return t[r].exports;var a=t[r]={id:r,loaded:!1,exports:{}};return e[r](a,a.exports,n),a.loaded=!0,a.exports}n.n=e=>{var t=e&&e.__esModule?()=>e.default:()=>e;return n.d(t,{a:t}),t},n.d=(e,t)=>{for(var r in t)n.o(t,r)&&!n.o(e,r)&&Object.defineProperty(e,r,{enumerable:!0,get:t[r]})},n.o=(e,t)=>Object.prototype.hasOwnProperty.call(e,t),n.nmd=e=>(e.paths=[],e.children||(e.children=[]),e),(()=>{"use strict";var e=n(657),t=n.n(e);const r=document.getElementById("db-input"),a=document.getElementById("db-drop"),i=document.getElementById("save-input"),o=document.getElementById("save-drop"),u=document.getElementById("save-report"),s=document.getElementById("data"),l=document.getElementById("error"),c=document.getElementById("title");let f=null;function h(e){return`${e.getFullYear()}年${e.getMonth()+1}月${e.getDate()}日`}function d(e){return e.getHours()>12?"下午"+(e.getHours()-12):`上午${e.getHours()}`}t()({locateFile:e=>`https://cdnjs.cloudflare.com/ajax/libs/sql.js/1.4.0/dist/${e}`}).then((function(e){f=e,a.hidden=!1}));let p=new Array;function m(){const e=document.querySelector("#playtime-table tbody");e.innerHTML="";let t=0;for(const[n,r]of p){const a=document.createElement("tr"),i=document.createElement("td"),o=document.createElement("td"),u=document.createElement("td");t+=r,i.innerText=`${h(n)} ${d(n)}點`,o.innerText=`${r}分鐘`,u.innerText=t>=60?`${Math.floor(t/60)}小時${Math.round(t%60)}分鐘`:`${t}分鐘`,a.appendChild(i),a.appendChild(o),a.appendChild(u),e.appendChild(a)}}function b(e){var t=e[0];if(t){var n=new FileReader;n.onload=function(){p.length=0,m(),c.innerText="";const e=new f.Database(new Uint8Array(n.result));let r=null;try{r=e.exec("SELECT timestamp_hr, played_ms FROM times ORDER BY timestamp_hr ASC")}catch(e){return a=`${t.name}並非時數紀錄檔`,l.classList.add("uk-alert"),l.innerText=a,void(s.hidden=!0)}var a;l.classList.remove("uk-alert"),l.innerText="",s.hidden=!1;const i=r[0];for(const e of i.values){const t=(o=Number(e[0]),new Date(1e3*(o-11644473600))),n=Math.round(Number(e[1])/1e3/60);p.push([t,n])}var o;c.innerText=t.name,m(),u.innerText=""},n.readAsArrayBuffer(t)}}function y(e){const t=e[0],n=new Date(t.lastModified),r=3600*Math.round(n.getTime()/1e3/3600);let a=0;for(const[e,t]of p){const i=e.getTime()/1e3;if(i<r)a+=t;else{if(i!=r)break;{const e=n.getTime()/1e3-r,i=3600;console.log(e),a+=e/i*t}}}a=Math.round(a);const i=Math.floor(a/60),o=Math.round(a%60);u.innerHTML+=`<div><code>${t.name}</code>: 至 <code>${h(n)} ${d(n)}點${n.getMinutes()}分</code> 的游戲時數為 <code>${i}小時${o}分鐘</code></div>`}r.onchange=()=>{b(r.files)},a.ondrop=function(e){e.stopPropagation(),e.preventDefault(),b(e.dataTransfer.files)},i.onchange=()=>{y(i.files)},o.ondrop=function(e){e.stopPropagation(),e.preventDefault(),y(e.dataTransfer.files)};for(const e of document.getElementsByClassName("file-drop"))e.ondragover=function(e){e.stopPropagation(),e.preventDefault()}})()})();