!function(a){if("object"==typeofexports&&"undefined"!=typeofmodule)module.exports=a();elseif("function"==typeofdefine&&define.amd)define([],a);else{varb;b="undefined"!=typeofwindow?window:"undefined"!=typeofglobal?global:"undefined"!=typeofself?self:this,b.BrowserFS=a()}}(function(){vara;returnfunctionb(a,c,d){functione(g,h){if(!c[g]){if(!a[g]){vari="function"==typeofrequire&&require;if(!h&&i)returni(g,!0);if(f)returnf(g,!0);varj=newError("Cannot find module '"+g+"'");throwj.code="MODULE_NOT_FOUND",j}vark=c[g]={exports:{}};a[g][0].call(k.exports,function(b){varc=a[g][1][b];returne(c?c:b)},k,k.exports,b,a,c,d)}returnc[g].exports}for(varf="function"==typeofrequire&&require,g=0;g<d.length;g++)e(d[g]);returne}({1:[function(b,c,d){(function(b,d){!function(){functione(){}functionf(a){returna}functiong(a){return!!a}functionh(a){return!a}functioni(a){returnfunction(){if(null===a)thrownewError("Callback was already called.");a.apply(this,arguments),a=null}}functionj(a){returnfunction(){null!==a&&(a.apply(this,arguments),a=null)}}functionk(a){returnO(a)||"number"==typeofa.length&&a.length>=0&&a.length%1===0}functionl(a,b){for(varc=-1,d=a.length;++c<d;)b(a[c],c,a)}functionm(a,b){for(varc=-1,d=a.length,e=Array(d);++c<d;)e[c]=b(a[c],c,a);returne}functionn(a){returnm(Array(a),function(a,b){returnb})}functiono(a,b,c){returnl(a,function(a,d,e){c=b(c,a,d,e)}),c}functionp(a,b){l(Q(a),function(c){b(a[c],c)})}functionq(a,b){for(varc=0;c<a.length;c++)if(a[c]===b)returnc;return-1}functionr(a){varb,c,d=-1;returnk(a)?(b=a.length,function(){returnd++,b>d?d:null}):(c=Q(a),b=c.length,function(){returnd++,b>d?c[d]:null})}functions(a,b){returnb=null==b?a.length-1:+b,function(){for(varc=Math.max(arguments.length-b,0),d=Array(c),e=0;c>e;e++)d[e]=arguments[e+b];switch(b){case0:returna.call(this,d);case1:returna.call(this,arguments[0],d)}}}functiont(a){returnfunction(b,c,d){returna(b,d)}}functionu(a){returnfunction(b,c,d){d=j(d||e),b=b||[];varf=r(b);if(0>=a)returnd(null);varg=!1,h=0,k=!1;!functionl(){if(g&&0>=h)returnd(null);for(;a>h&&!k;){vare=f();if(null===e)returng=!0,void(0>=h&&d(null));h+=1,c(b[e],e,i(function(a){h-=1,a?(d(a),k=!0):l()}))}}()}}functionv(a){returnfunction(b,c,d){returna(L.eachOf,b,c,d)}}functionw(a){returnfunction(b,c,d,e){returna(u(c),b,d,e)}}functionx(a){returnfunction(b,c,d){returna(L.eachOfSeries,b,c,d)}}functiony(a,b,c,d){d=j(d||e),b=b||[];varf=k(b)?[]:{};a(b,function(a,b,d){c(a,function(a,c){f[b]=c,d(a)})},function(a){d(a,f)})}functionz(a,b,c,d){vare=[];a(b,function(a,b,d){c(a,function(c){c&&e.push({index:b,value:a}),d()})},function(){d(m(e.sort(function(a,b){returna.index-b.index}),function(a){returna.value}))})}functionA(a,b,c,d){z(a,b,function(a,b){c(a,function(a){b(!a)})},d)}functionB(a,b,c){returnfunction(d,e,f,g){functionh(){g&&g(c(!1,void0))}functioni(a,d,e){returng?voidf(a,function(d){g&&b(d)&&(g(c(!0,a)),g=f=!1),e()}):e()}arguments.length>3?a(d,e,i,h):(g=f,f=e,a(d,i,h))}}functionC(a,b){returnb}functionD(a,b,c){c=c||e;vard=k(b)?[]:{};a(b,function(a,b,c){a(s(function(a,e){e.length<=1&&(e=e[0]),d[b]=e,c(a)}))},function(a){c(a,d)})}functionE(a,b,c,d){vare=[];a(b,function(a,b,d){c(a,function(a,b){e=e.concat(b||[]),d(a)})},function(a){d(a,e)})}functionF(a,b,c){functiond(a,b,c,d){if(null!=d&&"function"!=typeofd)thrownewError("task callback must be a function");returna.started=!0,O(b)||(b=[b]),0===b.length&&a.idle()?L.setImmediate(function(){a.drain()}):(l(b,function(b){varf={data:b,callback:d||e};c?a.tasks.unshift(f):a.tasks.push(f),a.tasks.length===a.concurrency&&a.saturated()}),voidL.setImmediate(a.process))}functionf(a,b){returnfunction(){g-=1;varc=!1,d=arguments;l(b,function(a){l(h,function(b,d){b!==a||c||(h.splice(d,1),c=!0)}),a.callback.apply(a,d)}),a.tasks.length+g===0&&a.drain(),a.process()}}if(null==b)b=1;elseif(0===b)thrownewError("Concurrency must not be zero");varg=0,h=[],j={tasks:[],concurrency:b,payload:c,saturated:e,empty:e,drain:e,started:!1,paused:!1,push:function(a,b){d(j,a,!1,b)},kill:
},a.prototype.readUInt16BE=function(a){returnthis.readUInt8(a)<<8|this.readUInt8(a+1)},a.prototype.readUInt32LE=function(a){return(this.readUInt8(a+3)<<24|this.readUInt8(a+2)<<16|this.readUInt8(a+1)<<8|this.readUInt8(a))>>>0},a.prototype.readUInt32BE=function(a){return(this.readUInt8(a)<<24|this.readUInt8(a+1)<<16|this.readUInt8(a+2)<<8|this.readUInt8(a+3))>>>0},a.prototype.readFloatLE=function(a){returnthis.intbits2float(this.readInt32LE(a))},a.prototype.readFloatBE=function(a){returnthis.intbits2float(this.readInt32BE(a))},a.prototype.readDoubleLE=function(a){returnthis.longbits2double(this.readInt32LE(a+4),this.readInt32LE(a))},a.prototype.readDoubleBE=function(a){returnthis.longbits2double(this.readInt32BE(a),this.readInt32BE(a+4))},a.prototype.copy=function(a,b){thrownewError("BufferCore implementations should implement copy.")},a.prototype.fill=function(a,b,c){for(vard=b;c>d;d++)this.writeUInt8(d,a)},a.prototype.float2intbits=function(a){varb,c,d;return0===a?0:a===Number.POSITIVE_INFINITY?f:a===Number.NEGATIVE_INFINITY?g:isNaN(a)?h:(d=0>a?1:0,a=Math.abs(a),1.1754942106924411e-38>=a&&a>=1.401298464324817e-45?(b=0,c=Math.round(a/Math.pow(2,-126)*Math.pow(2,23)),d<<31|b<<23|c):(b=Math.floor(Math.log(a)/Math.LN2),c=Math.round((a/Math.pow(2,b)-1)*Math.pow(2,23)),d<<31|b+127<<23|c))},a.prototype.double2longbits=function(a){varb,c,d,e;return0===a?[0,0]:a===Number.POSITIVE_INFINITY?[0,2146435072]:a===Number.NEGATIVE_INFINITY?[0,-1048576]:isNaN(a)?[0,2146959360]:(e=0>a?1<<31:0,a=Math.abs(a),2.225073858507201e-308>=a&&a>=5e-324?(b=0,d=a/Math.pow(2,-1022)*Math.pow(2,52)):(b=Math.floor(Math.log(a)/Math.LN2),a<Math.pow(2,b)&&(b-=1),d=(a/Math.pow(2,b)-1)*Math.pow(2,52),b=b+1023<<20),c=d*Math.pow(2,-32)|0|e|b,[65535&d,c])},a.prototype.intbits2float=function(a){if(a===f)returnNumber.POSITIVE_INFINITY;if(a===g)returnNumber.NEGATIVE_INFINITY;varb,c=(2147483648&a)>>>31,h=(2139095040&a)>>>23,i=8388607&a;returnb=0===h?Math.pow(-1,c)*i*Math.pow(2,-149):Math.pow(-1,c)*(1+i*Math.pow(2,-23))*Math.pow(2,h-127),(e>b||b>d)&&(b=NaN),b},a.prototype.longbits2double=function(a,b){varc=(2147483648&a)>>>31,d=(2146435072&a)>>>20,e=(1048575&a)*Math.pow(2,32)+b;return0===d&&0===e?0:2047===d?0===e?1===c?Number.NEGATIVE_INFINITY:Number.POSITIVE_INFINITY:NaN:0===d?Math.pow(-1,c)*e*Math.pow(2,-1074):Math.pow(-1,c)*(1+e*Math.pow(2,-52))*Math.pow(2,d-1023)},a}();c.BufferCoreCommon=i},{}],4:[function(a,b,c){vard=this&&this.__extends||function(a,b){functionc(){this.constructor=a}for(vardinb)b.hasOwnProperty(d)&&(a[d]=b[d]);a.prototype=null===b?Object.create(b):(c.prototype=b.prototype,newc)},e=a("./buffer_core"),f=[4294967040,4294902015,4278255615,16777215],g=function(a){functionb(b){a.call(this),this.length=b,this.buff=newArray(Math.ceil(b/4));for(varc=this.buff.length,d=0;c>d;d++)this.buff[d]=0}returnd(b,a),b.isAvailable=function(){return!0},b.prototype.getLength=function(){returnthis.length},b.prototype.writeUInt8=function(a,b){b&=255;varc=a>>2,d=3&a;this.buff[c]=this.buff[c]&f[d],this.buff[c]=this.buff[c]|b<<(d<<3)},b.prototype.readUInt8=function(a){varb=a>>2,c=3&a;returnthis.buff[b]>>(c<<3)&255},b.prototype.copy=function(a,c){for(vard=newb(c-a),e=a;c>e;e++)d.writeUInt8(e-a,this.readUInt8(e));returnd},b.name="Array",b}(e.BufferCoreCommon);b.exports=g},{"./buffer_core":3}],5:[function(a,b,c){vard=this&&this.__extends||function(a,b){functionc(){this.constructor=a}for(vardinb)b.hasOwnProperty(d)&&(a[d]=b[d]);a.prototype=null===b?Object.create(b):(c.prototype=b.prototype,newc)},e=a("./buffer_core"),f=a("./util"),g=function(a){functionb(b){if(a.call(this),"number"==typeofb)this.buff=newDataView(newArrayBuffer(b));elseif(binstanceofDataView)this.buff=b;elseif(f.isArrayBufferView(b))this.buff=newDataView(b.buffer,b.byteOffset,b.byteLength);else{if(!f.isArrayBuffer(b))thrownewTypeError("Invalid argument.");this.buff=newDataView(b)}this.length=this.buff.byteLength}returnd(b,a),b.isAvailable=function(){return"undefined"!=typeofDataView},b.prototype.getLength=function(){returnthis.length},b.prototype.writeInt8
a.read(0),c!==b.length);)c=b.length;b.readingMore=!1}functionp(a){returnfunction(){varb=a._readableState;F("pipeOnDrain",b.awaitDrain),b.awaitDrain&&b.awaitDrain--,0===b.awaitDrain&&D(a,"data")&&(b.flowing=!0,t(a))}}functionq(a){F("readable nexttick read 0"),a.read(0)}functionr(a,b){b.resumeScheduled||(b.resumeScheduled=!0,z(s,a,b))}functions(a,b){b.reading||(F("resume read 0"),a.read(0)),b.resumeScheduled=!1,a.emit("resume"),t(a),b.flowing&&!b.reading&&a.read(0)}functiont(a){varb=a._readableState;if(F("flow",b.flowing),b.flowing)dovarc=a.read();while(null!==c&&b.flowing)}functionu(a,b){varc,d=b.buffer,e=b.length,f=!!b.decoder,g=!!b.objectMode;if(0===d.length)returnnull;if(0===e)c=null;elseif(g)c=d.shift();elseif(!a||a>=e)c=f?d.join(""):1===d.length?d[0]:B.concat(d,e),d.length=0;elseif(a<d[0].length){varh=d[0];c=h.slice(0,a),d[0]=h.slice(a)}elseif(a===d[0].length)c=d.shift();else{c=f?"":newB(a);for(vari=0,j=0,k=d.length;k>j&&a>i;j++){varh=d[0],l=Math.min(a-i,h.length);f?c+=h.slice(0,l):h.copy(c,i,0,l),l<h.length?d[0]=h.slice(l):d.shift(),i+=l}}returnc}functionv(a){varb=a._readableState;if(b.length>0)thrownewError("endReadable called on non-empty stream");b.endEmitted||(b.ended=!0,z(w,b,a))}functionw(a,b){a.endEmitted||0!==a.length||(a.endEmitted=!0,b.readable=!1,b.emit("end"))}functionx(a,b){for(varc=0,d=a.length;d>c;c++)b(a[c],c)}functiony(a,b){for(varc=0,d=a.length;d>c;c++)if(a[c]===b)returnc;return-1}b.exports=e;varz=a("process-nextick-args"),A=a("isarray"),B=a("buffer").Buffer;e.ReadableState=d;varC,D=(a("events"),function(a,b){returna.listeners(b).length});!function(){try{C=a("stream")}catch(b){}finally{C||(C=a("events").EventEmitter)}}();varB=a("buffer").Buffer,E=a("core-util-is");E.inherits=a("inherits");varF,G=a("util");F=G&&G.debuglog?G.debuglog("stream"):function(){};varH;E.inherits(e,C);varI,I;e.prototype.push=function(a,b){varc=this._readableState;returnc.objectMode||"string"!=typeofa||(b=b||c.defaultEncoding,b!==c.encoding&&(a=newB(a,b),b="")),f(this,c,a,b,!1)},e.prototype.unshift=function(a){varb=this._readableState;returnf(this,b,a,"",!0)},e.prototype.isPaused=function(){returnthis._readableState.flowing===!1},e.prototype.setEncoding=function(b){returnH||(H=a("string_decoder/").StringDecoder),this._readableState.decoder=newH(b),this._readableState.encoding=b,this};varJ=8388608;e.prototype.read=function(a){F("read",a);varb=this._readableState,c=a;if(("number"!=typeofa||a>0)&&(b.emittedReadable=!1),0===a&&b.needReadable&&(b.length>=b.highWaterMark||b.ended))returnF("read: emitReadable",b.length,b.ended),0===b.length&&b.ended?v(this):l(this),null;if(a=i(a,b),0===a&&b.ended)return0===b.length&&v(this),null;vard=b.needReadable;F("need readable",d),(0===b.length||b.length-a<b.highWaterMark)&&(d=!0,F("length less than watermark",d)),(b.ended||b.reading)&&(d=!1,F("reading or ended",d)),d&&(F("do read"),b.reading=!0,b.sync=!0,0===b.length&&(b.needReadable=!0),this._read(b.highWaterMark),b.sync=!1),d&&!b.reading&&(a=i(c,b));vare;returne=a>0?u(a,b):null,null===e&&(b.needReadable=!0,a=0),b.length-=a,0!==b.length||b.ended||(b.needReadable=!0),c!==a&&b.ended&&0===b.length&&v(this),null!==e&&this.emit("data",e),e},e.prototype._read=function(a){this.emit("error",newError("not implemented"))},e.prototype.pipe=function(a,b){functiond(a){F("onunpipe"),a===l&&f()}functione(){F("onend"),a.end()}functionf(){F("cleanup"),a.removeListener("close",i),a.removeListener("finish",j),a.removeListener("drain",q),a.removeListener("error",h),a.removeListener("unpipe",d),l.removeListener("end",e),l.removeListener("end",f),l.removeListener("data",g),r=!0,!m.awaitDrain||a._writableState&&!a._writableState.needDrain||q()}functiong(b){F("ondata");varc=a.write(b);!1===c&&(1!==m.pipesCount||m.pipes[0]!==a||1!==l.listenerCount("data")||r||(F("false write response, pause",l._readableState.awaitDrain),l._readableState.awaitDrain++),l.pause())}functionh(b){F("onerror",b),k(),a.removeListener("error",h),0===D(a,"error")&&a.emit("error",b)}functioni(){a.removeListener("finish",j),k()}fun
i--,m+=e[g++]<<n,n+=8}if(m!==(65535&c.check)){a.msg="header crc mismatch",c.mode=la;break}m=0,n=0}c.head&&(c.head.hcrc=c.flags>>9&1,c.head.done=!0),a.adler=c.check=0,c.mode=V;break;caseT:for(;32>n;){if(0===i)breaka;i--,m+=e[g++]<<n,n+=8}a.adler=c.check=d(m),m=0,n=0,c.mode=U;caseU:if(0===c.havedict)returna.next_out=h,a.avail_out=j,a.next_in=g,a.avail_in=i,c.hold=m,c.bits=n,E;a.adler=c.check=1,c.mode=V;caseV:if(b===A||b===B)breaka;caseW:if(c.last){m>>>=7&n,n-=7&n,c.mode=ia;break}for(;3>n;){if(0===i)breaka;i--,m+=e[g++]<<n,n+=8}switch(c.last=1&m,m>>>=1,n-=1,3&m){case0:c.mode=X;break;case1:if(k(c),c.mode=ba,b===B){m>>>=2,n-=2;breaka}break;case2:c.mode=$;break;case3:a.msg="invalid block type",c.mode=la}m>>>=2,n-=2;break;caseX:for(m>>>=7&n,n-=7&n;32>n;){if(0===i)breaka;i--,m+=e[g++]<<n,n+=8}if((65535&m)!==(m>>>16^65535)){a.msg="invalid stored block lengths",c.mode=la;break}if(c.length=65535&m,m=0,n=0,c.mode=Y,b===B)breaka;caseY:c.mode=Z;caseZ:if(q=c.length){if(q>i&&(q=i),q>j&&(q=j),0===q)breaka;r.arraySet(f,e,g,q,h),i-=q,g+=q,j-=q,h+=q,c.length-=q;break}c.mode=V;break;case$:for(;14>n;){if(0===i)breaka;i--,m+=e[g++]<<n,n+=8}if(c.nlen=(31&m)+257,m>>>=5,n-=5,c.ndist=(31&m)+1,m>>>=5,n-=5,c.ncode=(15&m)+4,m>>>=4,n-=4,c.nlen>286||c.ndist>30){a.msg="too many length or distance symbols",c.mode=la;break}c.have=0,c.mode=_;case_:for(;c.have<c.ncode;){for(;3>n;){if(0===i)breaka;i--,m+=e[g++]<<n,n+=8}c.lens[Ca[c.have++]]=7&m,m>>>=3,n-=3}for(;c.have<19;)c.lens[Ca[c.have++]]=0;if(c.lencode=c.lendyn,c.lenbits=7,ya={bits:c.lenbits},xa=v(w,c.lens,0,19,c.lencode,0,c.work,ya),c.lenbits=ya.bits,xa){a.msg="invalid code lengths set",c.mode=la;break}c.have=0,c.mode=aa;caseaa:for(;c.have<c.nlen+c.ndist;){for(;Aa=c.lencode[m&(1<<c.lenbits)-1],qa=Aa>>>24,ra=Aa>>>16&255,sa=65535&Aa,!(n>=qa);){if(0===i)breaka;i--,m+=e[g++]<<n,n+=8}if(16>sa)m>>>=qa,n-=qa,c.lens[c.have++]=sa;else{if(16===sa){for(za=qa+2;za>n;){if(0===i)breaka;i--,m+=e[g++]<<n,n+=8}if(m>>>=qa,n-=qa,0===c.have){a.msg="invalid bit length repeat",c.mode=la;break}wa=c.lens[c.have-1],q=3+(3&m),m>>>=2,n-=2}elseif(17===sa){for(za=qa+3;za>n;){if(0===i)breaka;i--,m+=e[g++]<<n,n+=8}m>>>=qa,n-=qa,wa=0,q=3+(7&m),m>>>=3,n-=3}else{for(za=qa+7;za>n;){if(0===i)breaka;i--,m+=e[g++]<<n,n+=8}m>>>=qa,n-=qa,wa=0,q=11+(127&m),m>>>=7,n-=7}if(c.have+q>c.nlen+c.ndist){a.msg="invalid bit length repeat",c.mode=la;break}for(;q--;)c.lens[c.have++]=wa}}if(c.mode===la)break;if(0===c.lens[256]){a.msg="invalid code -- missing end-of-block",c.mode=la;break}if(c.lenbits=9,ya={bits:c.lenbits},xa=v(x,c.lens,0,c.nlen,c.lencode,0,c.work,ya),c.lenbits=ya.bits,xa){a.msg="invalid literal/lengths set",c.mode=la;break}if(c.distbits=6,c.distcode=c.distdyn,ya={bits:c.distbits},xa=v(y,c.lens,c.nlen,c.ndist,c.distcode,0,c.work,ya),c.distbits=ya.bits,xa){a.msg="invalid distances set",c.mode=la;break}if(c.mode=ba,b===B)breaka;caseba:c.mode=ca;caseca:if(i>=6&&j>=258){a.next_out=h,a.avail_out=j,a.next_in=g,a.avail_in=i,c.hold=m,c.bits=n,u(a,p),h=a.next_out,f=a.output,j=a.avail_out,g=a.next_in,e=a.input,i=a.avail_in,m=c.hold,n=c.bits,c.mode===V&&(c.back=-1);break}for(c.back=0;Aa=c.lencode[m&(1<<c.lenbits)-1],qa=Aa>>>24,ra=Aa>>>16&255,sa=65535&Aa,!(n>=qa);){if(0===i)breaka;i--,m+=e[g++]<<n,n+=8}if(ra&&0===(240&ra)){for(ta=qa,ua=ra,va=sa;Aa=c.lencode[va+((m&(1<<ta+ua)-1)>>ta)],qa=Aa>>>24,ra=Aa>>>16&255,sa=65535&Aa,!(n>=ta+qa);){if(0===i)breaka;i--,m+=e[g++]<<n,n+=8}m>>>=ta,n-=ta,c.back+=ta}if(m>>>=qa,n-=qa,c.back+=qa,c.length=sa,0===ra){c.mode=ha;break}if(32&ra){c.back=-1,c.mode=V;break}if(64&ra){a.msg="invalid literal/length code",c.mode=la;break}c.extra=15&ra,c.mode=da;caseda:if(c.extra){for(za=c.extra;za>n;){if(0===i)breaka;i--,m+=e[g++]<<n,n+=8}c.length+=m&(1<<c.extra)-1,m>>>=c.extra,n-=c.extra,c.back+=c.extra}c.was=c.length,c.mode=ea;caseea:for(;Aa=c.distcode[m&(1<<c.distbits)-1],qa=Aa>>>24,ra=Aa>>>16&255,sa=65535&Aa,!(n>=qa);){if(0===i)breaka;i--,m+=e[g++]<<n,n+=8}if(0===(240&ra)){for(ta=qa,ua=ra,va=sa;Aa=c.distcode[va+((m&(1<<ta+ua)-1)>>ta)],qa=Aa>>>24,ra=Aa>>>16&255,sa=65535&Aa,!(n>=ta+qa);){if(0===
}(c.ExternalFileAttributeType||(c.ExternalFileAttributeType={}));c.ExternalFileAttributeType;!function(a){a[a.STORED=0]="STORED",a[a.SHRUNK=1]="SHRUNK",a[a.REDUCED_1=2]="REDUCED_1",a[a.REDUCED_2=3]="REDUCED_2",a[a.REDUCED_3=4]="REDUCED_3",a[a.REDUCED_4=5]="REDUCED_4",a[a.IMPLODE=6]="IMPLODE",a[a.DEFLATE=8]="DEFLATE",a[a.DEFLATE64=9]="DEFLATE64",a[a.TERSE_OLD=10]="TERSE_OLD",a[a.BZIP2=12]="BZIP2",a[a.LZMA=14]="LZMA",a[a.TERSE_NEW=18]="TERSE_NEW",a[a.LZ77=19]="LZ77",a[a.WAVPACK=97]="WAVPACK",a[a.PPMD=98]="PPMD"}(c.CompressionMethod||(c.CompressionMethod={}));varp=c.CompressionMethod,q=function(){functiona(a){if(this.data=a,67324752!==a.readUInt32LE(0))thrownewg.ApiError(g.ErrorCode.EINVAL,"Invalid Zip file: Local file header has invalid signature: "+this.data.readUInt32LE(0))}returna.prototype.versionNeeded=function(){returnthis.data.readUInt16LE(4)},a.prototype.flags=function(){returnthis.data.readUInt16LE(6)},a.prototype.compressionMethod=function(){returnthis.data.readUInt16LE(8)},a.prototype.lastModFileTime=function(){returnd(this.data.readUInt16LE(10),this.data.readUInt16LE(12))},a.prototype.rawLastModFileTime=function(){returnthis.data.readUInt32LE(10)},a.prototype.crc32=function(){returnthis.data.readUInt32LE(14)},a.prototype.fileNameLength=function(){returnthis.data.readUInt16LE(26)},a.prototype.extraFieldLength=function(){returnthis.data.readUInt16LE(28)},a.prototype.fileName=function(){returne(this.data,this.useUTF8(),30,this.fileNameLength())},a.prototype.extraField=function(){vara=30+this.fileNameLength();returnthis.data.slice(a,a+this.extraFieldLength())},a.prototype.totalSize=function(){return30+this.fileNameLength()+this.extraFieldLength()},a.prototype.useUTF8=function(){return2048===(2048&this.flags())},a}();c.FileHeader=q;varr=function(){functiona(a,b,c){this.header=a,this.record=b,this.data=c}returna.prototype.decompress=function(){vara=this.header.compressionMethod();switch(a){casep.DEFLATE:varb=n(l.buffer2Arrayish(this.data.slice(0,this.record.compressedSize())),{chunkSize:this.record.uncompressedSize()});returnl.arrayish2Buffer(b);casep.STORED:returnl.copyingSlice(this.data,0,this.record.uncompressedSize());default:varc=p[a];throwc=c?c:"Unknown: "+a,newg.ApiError(g.ErrorCode.EINVAL,"Invalid compression method on file '"+this.header.fileName()+"': "+c)}},a.prototype.getHeader=function(){returnthis.header},a.prototype.getRecord=function(){returnthis.record},a.prototype.getRawData=function(){returnthis.data},a}();c.FileData=r;vars=function(){functiona(a){this.data=a}returna.prototype.crc32=function(){returnthis.data.readUInt32LE(0)},a.prototype.compressedSize=function(){returnthis.data.readUInt32LE(4)},a.prototype.uncompressedSize=function(){returnthis.data.readUInt32LE(8)},a}();c.DataDescriptor=s;vart=function(){functiona(a){if(this.data=a,134630224!==this.data.readUInt32LE(0))thrownewg.ApiError(g.ErrorCode.EINVAL,"Invalid archive extra data record signature: "+this.data.readUInt32LE(0))}returna.prototype.length=function(){returnthis.data.readUInt32LE(4)},a.prototype.extraFieldData=function(){returnthis.data.slice(8,8+this.length())},a}();c.ArchiveExtraDataRecord=t;varu=function(){functiona(a){if(this.data=a,84233040!==this.data.readUInt32LE(0))thrownewg.ApiError(g.ErrorCode.EINVAL,"Invalid digital signature signature: "+this.data.readUInt32LE(0))}returna.prototype.size=function(){returnthis.data.readUInt16LE(4)},a.prototype.signatureData=function(){returnthis.data.slice(6,6+this.size())},a}();c.DigitalSignature=u;varv=function(){functiona(a,b){if(this.zipData=a,this.data=b,33639248!==this.data.readUInt32LE(0))thrownewg.ApiError(g.ErrorCode.EINVAL,"Invalid Zip file: Central directory record has invalid signature: "+this.data.readUInt32LE(0));this._filename=this.produceFilename()}returna.prototype.versionMadeBy=function(){returnthis.data.readUInt16LE(4)},a.prototype.versionNeeded=function(){returnthis.data.readUInt16LE(6)},a.prototype.flag=function(){returnthis.data.readUInt16LE(8)},a.prototype.compressionMethod=function(){returnthis.data.read
e(b,f)&&f(null,newr(g,a,c,d.toStats(),i))})},c.prototype.openFile=function(a,b,c){vard=this,f=this.store.beginTransaction("readonly");this.findINode(f,a,function(g,h){e(g,c)&&f.get(h.id,function(f,g){e(f,c)&&(void0===g?c(i.ApiError.ENOENT(a)):c(null,newr(d,a,b,h.toStats(),g)))})})},c.prototype.removeEntry=function(a,c,d){vare=this,g=this.store.beginTransaction("readwrite"),h=k.dirname(a),j=k.basename(a);this.findINodeAndDirListing(g,h,function(h,k,l){if(f(h,g,d))if(l[j]){varm=l[j];deletel[j],e.getINode(g,a,m,function(e,h){f(e,g,d)&&(!c&&h.isDirectory()?g.abort(function(){d(i.ApiError.EISDIR(a))}):c&&!h.isDirectory()?g.abort(function(){d(i.ApiError.ENOTDIR(a))}):g.del(h.id,function(a){f(a,g,d)&&g.del(m,function(a){f(a,g,d)&&g.put(k.id,newb(JSON.stringify(l)),!0,function(a){f(a,g,d)&&g.commit(d)})})}))})}elseg.abort(function(){d(i.ApiError.ENOENT(a))})})},c.prototype.unlink=function(a,b){this.removeEntry(a,!1,b)},c.prototype.rmdir=function(a,b){varc=this;this.readdir(a,function(d,e){d?b(d):e.length>0?b(i.ApiError.ENOTEMPTY(a)):c.removeEntry(a,!0,b)})},c.prototype.mkdir=function(a,c,d){vare=this.store.beginTransaction("readwrite"),f=newb("{}");this.commitNewFile(e,a,j.FileType.DIRECTORY,c,f,d)},c.prototype.readdir=function(a,b){varc=this,d=this.store.beginTransaction("readonly");this.findINode(d,a,function(f,g){e(f,b)&&c.getDirListing(d,a,g,function(a,c){e(a,b)&&b(null,Object.keys(c))})})},c.prototype._sync=function(a,b,c,d){vare=this,g=this.store.beginTransaction("readwrite");this._findINode(g,k.dirname(a),k.basename(a),function(h,i){f(h,g,d)&&e.getINode(g,a,i,function(a,e){if(f(a,g,d)){varh=e.update(c);g.put(e.id,b,!0,function(a){f(a,g,d)&&(h?g.put(i,e.toBuffer(),!0,function(a){f(a,g,d)&&g.commit(d)}):g.commit(d))})}})})},c}(h.BaseFileSystem);c.AsyncKeyValueFileSystem=s}).call(this,a("bfs-buffer").Buffer)},{"../core/api_error":49,"../core/file_system":54,"../core/node_fs_stats":57,"../generic/inode":61,"../generic/preload_file":63,"bfs-buffer":2,path:10}],63:[function(a,b,c){(function(b){vard=this&&this.__extends||function(a,b){functionc(){this.constructor=a}for(vardinb)b.hasOwnProperty(d)&&(a[d]=b[d]);a.prototype=null===b?Object.create(b):(c.prototype=b.prototype,newc)},e=a("../core/file"),f=a("../core/api_error"),g=a("../core/node_fs"),h=function(a){functionc(c,d,e,f,g){if(a.call(this),this._pos=0,this._dirty=!1,this._fs=c,this._path=d,this._flag=e,this._stat=f,null!=g?this._buffer=g:this._buffer=newb(0),this._stat.size!==this._buffer.length&&this._flag.isReadable())thrownewError("Invalid buffer: Buffer is "+this._buffer.length+" long, yet Stats object specifies that file is "+this._stat.size+" long.")}returnd(c,a),c.prototype.isDirty=function(){returnthis._dirty},c.prototype.resetDirty=function(){this._dirty=!1},c.prototype.getBuffer=function(){returnthis._buffer},c.prototype.getStats=function(){returnthis._stat},c.prototype.getFlag=function(){returnthis._flag},c.prototype.getPath=function(){returnthis._path},c.prototype.getPos=function(){returnthis._flag.isAppendable()?this._stat.size:this._pos},c.prototype.advancePos=function(a){returnthis._pos+=a},c.prototype.setPos=function(a){returnthis._pos=a},c.prototype.sync=function(a){try{this.syncSync(),a()}catch(b){a(b)}},c.prototype.syncSync=function(){thrownewf.ApiError(f.ErrorCode.ENOTSUP)},c.prototype.close=function(a){try{this.closeSync(),a()}catch(b){a(b)}},c.prototype.closeSync=function(){thrownewf.ApiError(f.ErrorCode.ENOTSUP)},c.prototype.stat=function(a){try{a(null,this._stat.clone())}catch(b){a(b)}},c.prototype.statSync=function(){returnthis._stat.clone()},c.prototype.truncate=function(a,b){try{this.truncateSync(a),this._flag.isSynchronous()&&!g.getRootFS().supportsSynch()&&this.sync(b),b()}catch(c){returnb(c)}},c.prototype.truncateSync=function(a){if(this._dirty=!0,!this._flag.isWriteable())thrownewf.ApiError(f.ErrorCode.EPERM,"File not opened with a writeable mode.");if(this._stat.mtime=newDate,a>this._buffer.length){varc=newb(a-this._buffer.length);returnc.fill(0),this.writeSync(c,0,c.length,this._buffer.length),v