n.onsuccess=function(){t()},n.onerror=function(n){t(n)}}catch(e){t(e)}},n.prototype.get=function(t,n){try{vare=this.objectStore.get(t);e.onsuccess=function(t){vare=t.target.result;n(null,e)},e.onerror=function(t){n(t)}}catch(r){n(r)}},n.prototype.put=function(t,n,e){try{varr=this.objectStore.put(n,t);r.onsuccess=function(t){varn=t.target.result;e(null,n)},r.onerror=function(t){e(t)}}catch(i){e(i)}},n.prototype.delete=function(t,n){try{vare=this.objectStore.delete(t);e.onsuccess=function(t){vare=t.target.result;n(null,e)},e.onerror=function(t){n(t)}}catch(r){n(r)}},e.isSupported=function(){return!!o},e.prototype.open=function(t){varn=this;if(n.db)returnt(null,!1),void0;vare=!1,r=o.open(n.name);r.onupgradeneeded=function(t){varn=t.target.result;n.objectStoreNames.contains(i)&&n.deleteObjectStore(i),n.createObjectStore(i),e=!0},r.onsuccess=function(r){n.db=r.target.result,t(null,e)},r.onerror=function(n){t(n)}},e.prototype.getReadOnlyContext=function(){returnnewn(this.db,s)},e.prototype.getReadWriteContext=function(){returnnewn(this.db,a)},e}),e("src/providers/websql",["require","../constants","../constants","../constants","../constants","../constants"],function(t){functionn(t,n){vare=this;this.getTransaction=function(r){returne.transaction?(r(e.transaction),void0):(t[n?"readTransaction":"transaction"](function(t){e.transaction=t,r(t)}),void0)}}functione(t){this.name=t||r,this.db=null}varr=t("../constants").FILE_SYSTEM_NAME,i=t("../constants").FILE_STORE_NAME,o=t("../constants").WSQL_VERSION,a=t("../constants").WSQL_SIZE,s=t("../constants").WSQL_DESC;returnn.prototype.clear=function(t){functionn(n,e){t(e)}functione(){t(null)}this.getTransaction(function(t){t.executeSql("DELETE FROM "+i,[],e,n)})},n.prototype.get=function(t,n){functione(t,e){varr=0===e.rows.length?null:e.rows.item(0).data;n(null,r)}functionr(t,e){n(e)}this.getTransaction(function(n){n.executeSql("SELECT data FROM "+i+" WHERE id = ?",[t],e,r)})},n.prototype.put=function(t,n,e){functionr(){e(null)}functiono(t,n){e(n)}this.getTransaction(function(e){e.executeSql("INSERT OR REPLACE INTO "+i+" (id, data) VALUES (?, ?)",[t,n],r,o)})},n.prototype.delete=function(t,n){functione(){n(null)}functionr(t,e){n(e)}this.getTransaction(function(n){n.executeSql("DELETE FROM "+i+" WHERE id = ?",[t],e,r)})},e.isSupported=function(){return!!window.openDatabase},e.prototype.open=function(t){functionn(n,e){t(e)}functione(n){functione(n,e){varr=0===e.rows.item(0).count;t(null,r)}functiono(n,e){t(e)}r.db=u,n.executeSql("SELECT COUNT(id) AS count FROM "+i+";",[],e,o)}varr=this;if(r.db)returnt(null,!1),void0;varu=window.openDatabase(r.name,o,s,a);returnu?(u.transaction(function(t){t.executeSql("CREATE TABLE IF NOT EXISTS "+i+" (id unique, data)",[],e,n)}),void0):(t("[WebSQL] Unable to open database."),void0)},e.prototype.getReadOnlyContext=function(){returnnewn(this.db,!0)},e.prototype.getReadWriteContext=function(){returnnewn(this.db,!1)},e}),function(){functiont(t){vare=!1;returnfunction(){if(e)throwError("Callback was already called.");e=!0,t.apply(n,arguments)}}varn,r,i={};n=this,null!=n&&(r=n.async),i.noConflict=function(){returnn.async=r,i};varo=function(t,n){if(t.forEach)returnt.forEach(n);for(vare=0;t.length>e;e+=1)n(t[e],e,t)},a=function(t,n){if(t.map)returnt.map(n);vare=[];returno(t,function(t,r,i){e.push(n(t,r,i))}),e},s=function(t,n,e){returnt.reduce?t.reduce(n,e):(o(t,function(t,r,i){e=n(e,t,r,i)}),e)},u=function(t){if(Object.keys)returnObject.keys(t);varn=[];for(vareint)t.hasOwnProperty(e)&&n.push(e);returnn};"undefined"!=typeofprocess&&process.nextTick?(i.nextTick=process.nextTick,i.setImmediate="undefined"!=typeofsetImmediate?function(t){setImmediate(t)}:i.nextTick):"function"==typeofsetImmediate?(i.nextTick=function(t){setImmediate(t)},i.setImmediate=i.nextTick):(i.nextTick=function(t){setTimeout(t,0)},i.setImmediate=i.nextTick),i.each=function(n,e,r){if(r=r||function(){},!n.length)returnr();vari=0;o(n,function(o){e(o,t(function(t){t?(r(t),r=function(){}):(i+=1,i>=n.length&&r(null))}))})},i.forEa
}functionnn(t,n,e,r){functioni(t){t?r(t):r(null)}j(n,r)&&D(t,n,e,i)}functionen(t,n,e,r,i){functiono(t){t?i(t):i(null)}vara=t.openFiles[e];a?dn(a.flags).contains(Yn)?T(n,a,r,o):i(newSn("descriptor does not permit writing")):i(newSn("invalid file descriptor"))}functionrn(t,n,e,r,i,o){functiona(t,n){t?o(t):0>n.size+r?o(newOn("resulting file offset would be negative")):(s.position=n.size+r,o(null,s.position))}vars=t.openFiles[e];s||o(newSn("invalid file descriptor")),"SET"===i?0>r?o(newOn("resulting file offset would be negative")):(s.position=r,o(null,s.position)):"CUR"===i?0>s.position+r?o(newOn("resulting file offset would be negative")):(s.position+=r,o(null,s.position)):"END"===i?v(n,s,a):o(newOn("whence argument is not a proper value"))}functionon(t,n,e){functionr(t,n){t?e(t):e(null,n)}j(n,e)&&w(t,n,r)}functionan(t,n,e,r,i){functiono(t){t?i(t):i(null)}if(j(n,i)){vara=Date.now();e=e?e:a,r=r?r:a,A(t,n,e,r,o)}}functionsn(t,n,e,r,i,o){functiona(t){t?o(t):o(null)}vars=Date.now();r=r?r:s,i=i?i:s;varu=t.openFiles[e];u?dn(u.flags).contains(Yn)?S(n,u,r,i,a):o(newSn("descriptor does not permit writing")):o(newSn("invalid file descriptor"))}functionun(t,n,e,r){functioni(t){t?r(t):r(null)}functiono(e){e?r(e):b(t,n,i)}j(n,r)&&j(e,r)&&m(t,n,e,o)}functioncn(t,n,e,r){functioni(t){t?r(t):r(null)}j(n,r)&&j(e,r)&&E(t,n,e,i)}functionfn(t,n,e){functionr(t,n){t?e(t):e(null,n)}j(n,e)&&x(t,n,r)}functionln(t,n,e,r){functioni(n,e){if(n)r(n);else{vari=newo(e,t.name);r(null,i)}}j(e,r)&&y(n,e,i)}functionhn(t,n,e,r){functioni(t){t?r(t):r(null)}j(n,r)&&_(t,n,e,i)}functionpn(t,n,e,r,i){functiono(t){t?i(t):i(null)}vara=t.openFiles[e];a?dn(a.flags).contains(Yn)?k(n,a,r,o):i(newSn("descriptor does not permit writing")):i(newSn("invalid file descriptor"))}vardn=t("./../lib/nodash");t("./../lib/encoding");vargn=t("./path").normalize,vn=t("./path").dirname,yn=t("./path").basename,mn=t("./shared").guid;t("./shared").hash;varbn=t("./shared").nop,wn=t("./error").EExists,En=t("./error").EIsDirectory,xn=t("./error").ENoEntry,_n=t("./error").EBusy,kn=t("./error").ENotEmpty,An=t("./error").ENotDirectory,Sn=t("./error").EBadFileDescriptor;t("./error").ENotImplemented,t("./error").ENotMounted;varOn=t("./error").EInvalid,Rn=t("./error").EIO,Cn=t("./error").ELoop,In=t("./error").EFileSystemError,Dn=t("./error").ENoAttr,Tn=t("./constants").FILE_SYSTEM_NAME,Bn=t("./constants").FS_FORMAT,Mn=t("./constants").MODE_FILE,jn=t("./constants").MODE_DIRECTORY,zn=t("./constants").MODE_SYMBOLIC_LINK,Nn=t("./constants").MODE_META,Fn=t("./constants").ROOT_DIRECTORY_NAME,Un=t("./constants").SUPER_NODE_ID,Ln=t("./constants").SYMLOOP_MAX,Pn=t("./constants").FS_READY,Wn=t("./constants").FS_PENDING,qn=t("./constants").FS_ERROR,Hn=t("./constants").O_READ,Yn=t("./constants").O_WRITE,Xn=t("./constants").O_CREATE,Kn=t("./constants").O_EXCLUSIVE;t("./constants").O_TRUNCATE;varVn=t("./constants").O_APPEND,Zn=t("./constants").O_FLAGS,Qn=t("./constants").XATTR_CREATE,Gn=t("./constants").XATTR_REPLACE,$n=t("src/providers/providers"),Jn=t("src/adapters/adapters"),te=t("src/shell");returnN.providers=$n,N.adapters=Jn,N.prototype.open=function(t,n,e,r){r=z(arguments[arguments.length-1]);vari=this,o=i.queueOrRun(function(){vare=i.provider.getReadWriteContext();F(i,e,t,n,r)});o&&r(o)},N.prototype.close=function(t,n){U(this,t,z(n))},N.prototype.mkdir=function(t,n,e){"function"==typeofn&&(e=n),e=z(e);varr=this,i=r.queueOrRun(function(){varn=r.provider.getReadWriteContext();L(n,t,e)});i&&e(i)},N.prototype.rmdir=function(t,n){n=z(n);vare=this,r=e.queueOrRun(function(){varr=e.provider.getReadWriteContext();P(r,t,n)});r&&n(r)},N.prototype.stat=function(t,n){n=z(n);vare=this,r=e.queueOrRun(function(){varr=e.provider.getReadWriteContext();W(r,e.name,t,n)});r&&n(r)},N.prototype.fstat=function(t,n){n=z(n);vare=this,r=e.queueOrRun(function(){varr=e.provider.getReadWriteContext();q(e,r,t,n)});r&&n(r)},N.prototype.link=function(t,n,e){e=z(e);varr=this,i=r.queueOrRun(function(){vari=r.provider.getReadWriteContext();H(i,t,n,e)});i&&e(i)},N.prototype.unl