parcelRequire=function(e,r,n,t){var i="function"==typeof parcelRequire&&parcelRequire,o="function"==typeof require&&require;function u(n,t){if(!r[n]){if(!e[n]){var f="function"==typeof parcelRequire&&parcelRequire;if(!t&&f)return f(n,!0);if(i)return i(n,!0);if(o&&"string"==typeof n)return o(n);var c=new Error("Cannot find module '"+n+"'");throw c.code="MODULE_NOT_FOUND",c}p.resolve=function(r){return e[n][1][r]||r},p.cache={};var l=r[n]=new u.Module(n);e[n][0].call(l.exports,p,l,l.exports,this)}return r[n].exports;function p(e){return u(p.resolve(e))}}u.isParcelRequire=!0,u.Module=function(e){this.id=e,this.bundle=u,this.exports={}},u.modules=e,u.cache=r,u.parent=i,u.register=function(r,n){e[r]=[function(e,r){r.exports=n},{}]};for(var f=0;f1?e-1:0),f=1;f1)for(var n=1;n=0;n--){var s=r[n];"."===s?r.splice(n,1):".."===s?(r.splice(n,1),e++):e&&(r.splice(n,1),e--)}if(t)for(;e--;e)r.unshift("..");return r}var e=/^(\/?|)([\s\S]*?)((?:\.{1,2}|[^\/]+?|)(\.[^.\/]*|))(?:[\/]*)$/,n=function(r){return e.exec(r).slice(1)};function s(r,t){if(r.filter)return r.filter(t);for(var e=[],n=0;n=-1&&!n;o--){var i=o>=0?arguments[o]:r.cwd();if("string"!=typeof i)throw new TypeError("Arguments to path.resolve must be strings");i&&(e=i+"/"+e,n="/"===i.charAt(0))}return(n?"/":"")+(e=t(s(e.split("/"),function(r){return!!r}),!n).join("/"))||"."},exports.normalize=function(r){var e=exports.isAbsolute(r),n="/"===o(r,-1);return(r=t(s(r.split("/"),function(r){return!!r}),!e).join("/"))||e||(r="."),r&&n&&(r+="/"),(e?"/":"")+r},exports.isAbsolute=function(r){return"/"===r.charAt(0)},exports.join=function(){var r=Array.prototype.slice.call(arguments,0);return exports.normalize(s(r,function(r,t){if("string"!=typeof r)throw new TypeError("Arguments to path.join must be strings");return r}).join("/"))},exports.relative=function(r,t){function e(r){for(var t=0;t=0&&""===r[e];e--);return t>e?[]:r.slice(t,e-t+1)}r=exports.resolve(r).substr(1),t=exports.resolve(t).substr(1);for(var n=e(r.split("/")),s=e(t.split("/")),o=Math.min(n.length,s.length),i=o,u=0;u0)throw new Error("Invalid string. Length must be a multiple of 4");var e=r.indexOf("=");return-1===e&&(e=t),[e,e===t?0:4-e%4]}function u(r){var t=h(r),e=t[0],n=t[1];return 3*(e+n)/4-n}function c(r,t,e){return 3*(t+e)/4-e}function i(r){for(var n,o=h(r),a=o[0],u=o[1],i=new e(c(r,a,u)),f=0,A=u>0?a-4:a,d=0;d>16&255,i[f++]=n>>8&255,i[f++]=255&n;return 2===u&&(n=t[r.charCodeAt(d)]<<2|t[r.charCodeAt(d+1)]>>4,i[f++]=255&n),1===u&&(n=t[r.charCodeAt(d)]<<10|t[r.charCodeAt(d+1)]<<4|t[r.charCodeAt(d+2)]>>2,i[f++]=n>>8&255,i[f++]=255&n),i}function f(t){return r[t>>18&63]+r[t>>12&63]+r[t>>6&63]+r[63&t]}function A(r,t,e){for(var n,o=[],a=t;au?u:h+16383));return 1===o?(e=t[n-1],a.push(r[e>>2]+r[e<<4&63]+"==")):2===o&&(e=(t[n-2]<<8)+t[n-1],a.push(r[e>>10]+r[e>>4&63]+r[e<<2&63]+"=")),a.join("")}t["-".charCodeAt(0)]=62,t["_".charCodeAt(0)]=63; },{}],"JgNJ":[function(require,module,exports) { exports.read=function(a,o,t,r,h){var M,p,w=8*h-r-1,f=(1<>1,i=-7,N=t?h-1:0,n=t?-1:1,s=a[o+N];for(N+=n,M=s&(1<<-i)-1,s>>=-i,i+=w;i>0;M=256*M+a[o+N],N+=n,i-=8);for(p=M&(1<<-i)-1,M>>=-i,i+=r;i>0;p=256*p+a[o+N],N+=n,i-=8);if(0===M)M=1-e;else{if(M===f)return p?NaN:1/0*(s?-1:1);p+=Math.pow(2,r),M-=e}return(s?-1:1)*p*Math.pow(2,M-r)},exports.write=function(a,o,t,r,h,M){var p,w,f,e=8*M-h-1,i=(1<>1,n=23===h?Math.pow(2,-24)-Math.pow(2,-77):0,s=r?0:M-1,u=r?1:-1,l=o<0||0===o&&1/o<0?1:0;for(o=Math.abs(o),isNaN(o)||o===1/0?(w=isNaN(o)?1:0,p=i):(p=Math.floor(Math.log(o)/Math.LN2),o*(f=Math.pow(2,-p))<1&&(p--,f*=2),(o+=p+N>=1?n/f:n*Math.pow(2,1-N))*f>=2&&(p++,f/=2),p+N>=i?(w=0,p=i):p+N>=1?(w=(o*f-1)*Math.pow(2,h),p+=N):(w=o*Math.pow(2,N-1)*Math.pow(2,h),p=0));h>=8;a[t+s]=255&w,s+=u,w/=256,h-=8);for(p=p<0;a[t+s]=255&p,s+=u,p/=256,e-=8);a[t+s-u]|=128*l}; },{}],"REa7":[function(require,module,exports) { var r={}.toString;module.exports=Array.isArray||function(t){return"[object Array]"==r.call(t)}; },{}],"dskh":[function(require,module,exports) { var global = arguments[3]; var t=arguments[3],r=require("base64-js"),e=require("ieee754"),n=require("isarray");function i(){try{var t=new Uint8Array(1);return t.__proto__={__proto__:Uint8Array.prototype,foo:function(){return 42}},42===t.foo()&&"function"==typeof t.subarray&&0===t.subarray(1,1).byteLength}catch(r){return!1}}function o(){return f.TYPED_ARRAY_SUPPORT?2147483647:1073741823}function u(t,r){if(o()=o())throw new RangeError("Attempt to allocate Buffer larger than maximum size: 0x"+o().toString(16)+" bytes");return 0|t}function d(t){return+t!=t&&(t=0),f.alloc(+t)}function v(t,r){if(f.isBuffer(t))return t.length;if("undefined"!=typeof ArrayBuffer&&"function"==typeof ArrayBuffer.isView&&(ArrayBuffer.isView(t)||t instanceof ArrayBuffer))return t.byteLength;"string"!=typeof t&&(t=""+t);var e=t.length;if(0===e)return 0;for(var n=!1;;)switch(r){case"ascii":case"latin1":case"binary":return e;case"utf8":case"utf-8":case void 0:return $(t).length;case"ucs2":case"ucs-2":case"utf16le":case"utf-16le":return 2*e;case"hex":return e>>>1;case"base64":return K(t).length;default:if(n)return $(t).length;r=(""+r).toLowerCase(),n=!0}}function E(t,r,e){var n=!1;if((void 0===r||r<0)&&(r=0),r>this.length)return"";if((void 0===e||e>this.length)&&(e=this.length),e<=0)return"";if((e>>>=0)<=(r>>>=0))return"";for(t||(t="utf8");;)switch(t){case"hex":return x(this,r,e);case"utf8":case"utf-8":return Y(this,r,e);case"ascii":return L(this,r,e);case"latin1":case"binary":return D(this,r,e);case"base64":return S(this,r,e);case"ucs2":case"ucs-2":case"utf16le":case"utf-16le":return C(this,r,e);default:if(n)throw new TypeError("Unknown encoding: "+t);t=(t+"").toLowerCase(),n=!0}}function b(t,r,e){var n=t[r];t[r]=t[e],t[e]=n}function R(t,r,e,n,i){if(0===t.length)return-1;if("string"==typeof e?(n=e,e=0):e>2147483647?e=2147483647:e<-2147483648&&(e=-2147483648),e=+e,isNaN(e)&&(e=i?0:t.length-1),e<0&&(e=t.length+e),e>=t.length){if(i)return-1;e=t.length-1}else if(e<0){if(!i)return-1;e=0}if("string"==typeof r&&(r=f.from(r,n)),f.isBuffer(r))return 0===r.length?-1:_(t,r,e,n,i);if("number"==typeof r)return r&=255,f.TYPED_ARRAY_SUPPORT&&"function"==typeof Uint8Array.prototype.indexOf?i?Uint8Array.prototype.indexOf.call(t,r,e):Uint8Array.prototype.lastIndexOf.call(t,r,e):_(t,[r],e,n,i);throw new TypeError("val must be string, number or Buffer")}function _(t,r,e,n,i){var o,u=1,f=t.length,s=r.length;if(void 0!==n&&("ucs2"===(n=String(n).toLowerCase())||"ucs-2"===n||"utf16le"===n||"utf-16le"===n)){if(t.length<2||r.length<2)return-1;u=2,f/=2,s/=2,e/=2}function h(t,r){return 1===u?t[r]:t.readUInt16BE(r*u)}if(i){var a=-1;for(o=e;of&&(e=f-s),o=e;o>=0;o--){for(var c=!0,l=0;li&&(n=i):n=i;var o=r.length;if(o%2!=0)throw new TypeError("Invalid hex string");n>o/2&&(n=o/2);for(var u=0;u239?4:h>223?3:h>191?2:1;if(i+c<=e)switch(c){case 1:h<128&&(a=h);break;case 2:128==(192&(o=t[i+1]))&&(s=(31&h)<<6|63&o)>127&&(a=s);break;case 3:o=t[i+1],u=t[i+2],128==(192&o)&&128==(192&u)&&(s=(15&h)<<12|(63&o)<<6|63&u)>2047&&(s<55296||s>57343)&&(a=s);break;case 4:o=t[i+1],u=t[i+2],f=t[i+3],128==(192&o)&&128==(192&u)&&128==(192&f)&&(s=(15&h)<<18|(63&o)<<12|(63&u)<<6|63&f)>65535&&s<1114112&&(a=s)}null===a?(a=65533,c=1):a>65535&&(a-=65536,n.push(a>>>10&1023|55296),a=56320|1023&a),n.push(a),i+=c}return O(n)}exports.Buffer=f,exports.SlowBuffer=d,exports.INSPECT_MAX_BYTES=50,f.TYPED_ARRAY_SUPPORT=void 0!==t.TYPED_ARRAY_SUPPORT?t.TYPED_ARRAY_SUPPORT:i(),exports.kMaxLength=o(),f.poolSize=8192,f._augment=function(t){return t.__proto__=f.prototype,t},f.from=function(t,r,e){return s(null,t,r,e)},f.TYPED_ARRAY_SUPPORT&&(f.prototype.__proto__=Uint8Array.prototype,f.__proto__=Uint8Array,"undefined"!=typeof Symbol&&Symbol.species&&f[Symbol.species]===f&&Object.defineProperty(f,Symbol.species,{value:null,configurable:!0})),f.alloc=function(t,r,e){return a(null,t,r,e)},f.allocUnsafe=function(t){return c(null,t)},f.allocUnsafeSlow=function(t){return c(null,t)},f.isBuffer=function(t){return!(null==t||!t._isBuffer)},f.compare=function(t,r){if(!f.isBuffer(t)||!f.isBuffer(r))throw new TypeError("Arguments must be Buffers");if(t===r)return 0;for(var e=t.length,n=r.length,i=0,o=Math.min(e,n);i0&&(t=this.toString("hex",0,r).match(/.{2}/g).join(" "),this.length>r&&(t+=" ... ")),""},f.prototype.compare=function(t,r,e,n,i){if(!f.isBuffer(t))throw new TypeError("Argument must be a Buffer");if(void 0===r&&(r=0),void 0===e&&(e=t?t.length:0),void 0===n&&(n=0),void 0===i&&(i=this.length),r<0||e>t.length||n<0||i>this.length)throw new RangeError("out of range index");if(n>=i&&r>=e)return 0;if(n>=i)return-1;if(r>=e)return 1;if(this===t)return 0;for(var o=(i>>>=0)-(n>>>=0),u=(e>>>=0)-(r>>>=0),s=Math.min(o,u),h=this.slice(n,i),a=t.slice(r,e),c=0;ci)&&(e=i),t.length>0&&(e<0||r<0)||r>this.length)throw new RangeError("Attempt to write outside buffer bounds");n||(n="utf8");for(var o=!1;;)switch(n){case"hex":return A(this,t,r,e);case"utf8":case"utf-8":return m(this,t,r,e);case"ascii":return P(this,t,r,e);case"latin1":case"binary":return T(this,t,r,e);case"base64":return B(this,t,r,e);case"ucs2":case"ucs-2":case"utf16le":case"utf-16le":return U(this,t,r,e);default:if(o)throw new TypeError("Unknown encoding: "+n);n=(""+n).toLowerCase(),o=!0}},f.prototype.toJSON=function(){return{type:"Buffer",data:Array.prototype.slice.call(this._arr||this,0)}};var I=4096;function O(t){var r=t.length;if(r<=I)return String.fromCharCode.apply(String,t);for(var e="",n=0;nn)&&(e=n);for(var i="",o=r;oe)throw new RangeError("Trying to access beyond buffer length")}function k(t,r,e,n,i,o){if(!f.isBuffer(t))throw new TypeError('"buffer" argument must be a Buffer instance');if(r>i||rt.length)throw new RangeError("Index out of range")}function N(t,r,e,n){r<0&&(r=65535+r+1);for(var i=0,o=Math.min(t.length-e,2);i>>8*(n?i:1-i)}function z(t,r,e,n){r<0&&(r=4294967295+r+1);for(var i=0,o=Math.min(t.length-e,4);i>>8*(n?i:3-i)&255}function F(t,r,e,n,i,o){if(e+n>t.length)throw new RangeError("Index out of range");if(e<0)throw new RangeError("Index out of range")}function j(t,r,n,i,o){return o||F(t,r,n,4,3.4028234663852886e38,-3.4028234663852886e38),e.write(t,r,n,i,23,4),n+4}function q(t,r,n,i,o){return o||F(t,r,n,8,1.7976931348623157e308,-1.7976931348623157e308),e.write(t,r,n,i,52,8),n+8}f.prototype.slice=function(t,r){var e,n=this.length;if((t=~~t)<0?(t+=n)<0&&(t=0):t>n&&(t=n),(r=void 0===r?n:~~r)<0?(r+=n)<0&&(r=0):r>n&&(r=n),r0&&(i*=256);)n+=this[t+--r]*i;return n},f.prototype.readUInt8=function(t,r){return r||M(t,1,this.length),this[t]},f.prototype.readUInt16LE=function(t,r){return r||M(t,2,this.length),this[t]|this[t+1]<<8},f.prototype.readUInt16BE=function(t,r){return r||M(t,2,this.length),this[t]<<8|this[t+1]},f.prototype.readUInt32LE=function(t,r){return r||M(t,4,this.length),(this[t]|this[t+1]<<8|this[t+2]<<16)+16777216*this[t+3]},f.prototype.readUInt32BE=function(t,r){return r||M(t,4,this.length),16777216*this[t]+(this[t+1]<<16|this[t+2]<<8|this[t+3])},f.prototype.readIntLE=function(t,r,e){t|=0,r|=0,e||M(t,r,this.length);for(var n=this[t],i=1,o=0;++o=(i*=128)&&(n-=Math.pow(2,8*r)),n},f.prototype.readIntBE=function(t,r,e){t|=0,r|=0,e||M(t,r,this.length);for(var n=r,i=1,o=this[t+--n];n>0&&(i*=256);)o+=this[t+--n]*i;return o>=(i*=128)&&(o-=Math.pow(2,8*r)),o},f.prototype.readInt8=function(t,r){return r||M(t,1,this.length),128&this[t]?-1*(255-this[t]+1):this[t]},f.prototype.readInt16LE=function(t,r){r||M(t,2,this.length);var e=this[t]|this[t+1]<<8;return 32768&e?4294901760|e:e},f.prototype.readInt16BE=function(t,r){r||M(t,2,this.length);var e=this[t+1]|this[t]<<8;return 32768&e?4294901760|e:e},f.prototype.readInt32LE=function(t,r){return r||M(t,4,this.length),this[t]|this[t+1]<<8|this[t+2]<<16|this[t+3]<<24},f.prototype.readInt32BE=function(t,r){return r||M(t,4,this.length),this[t]<<24|this[t+1]<<16|this[t+2]<<8|this[t+3]},f.prototype.readFloatLE=function(t,r){return r||M(t,4,this.length),e.read(this,t,!0,23,4)},f.prototype.readFloatBE=function(t,r){return r||M(t,4,this.length),e.read(this,t,!1,23,4)},f.prototype.readDoubleLE=function(t,r){return r||M(t,8,this.length),e.read(this,t,!0,52,8)},f.prototype.readDoubleBE=function(t,r){return r||M(t,8,this.length),e.read(this,t,!1,52,8)},f.prototype.writeUIntLE=function(t,r,e,n){(t=+t,r|=0,e|=0,n)||k(this,t,r,e,Math.pow(2,8*e)-1,0);var i=1,o=0;for(this[r]=255&t;++o=0&&(o*=256);)this[r+i]=t/o&255;return r+e},f.prototype.writeUInt8=function(t,r,e){return t=+t,r|=0,e||k(this,t,r,1,255,0),f.TYPED_ARRAY_SUPPORT||(t=Math.floor(t)),this[r]=255&t,r+1},f.prototype.writeUInt16LE=function(t,r,e){return t=+t,r|=0,e||k(this,t,r,2,65535,0),f.TYPED_ARRAY_SUPPORT?(this[r]=255&t,this[r+1]=t>>>8):N(this,t,r,!0),r+2},f.prototype.writeUInt16BE=function(t,r,e){return t=+t,r|=0,e||k(this,t,r,2,65535,0),f.TYPED_ARRAY_SUPPORT?(this[r]=t>>>8,this[r+1]=255&t):N(this,t,r,!1),r+2},f.prototype.writeUInt32LE=function(t,r,e){return t=+t,r|=0,e||k(this,t,r,4,4294967295,0),f.TYPED_ARRAY_SUPPORT?(this[r+3]=t>>>24,this[r+2]=t>>>16,this[r+1]=t>>>8,this[r]=255&t):z(this,t,r,!0),r+4},f.prototype.writeUInt32BE=function(t,r,e){return t=+t,r|=0,e||k(this,t,r,4,4294967295,0),f.TYPED_ARRAY_SUPPORT?(this[r]=t>>>24,this[r+1]=t>>>16,this[r+2]=t>>>8,this[r+3]=255&t):z(this,t,r,!1),r+4},f.prototype.writeIntLE=function(t,r,e,n){if(t=+t,r|=0,!n){var i=Math.pow(2,8*e-1);k(this,t,r,e,i-1,-i)}var o=0,u=1,f=0;for(this[r]=255&t;++o>0)-f&255;return r+e},f.prototype.writeIntBE=function(t,r,e,n){if(t=+t,r|=0,!n){var i=Math.pow(2,8*e-1);k(this,t,r,e,i-1,-i)}var o=e-1,u=1,f=0;for(this[r+o]=255&t;--o>=0&&(u*=256);)t<0&&0===f&&0!==this[r+o+1]&&(f=1),this[r+o]=(t/u>>0)-f&255;return r+e},f.prototype.writeInt8=function(t,r,e){return t=+t,r|=0,e||k(this,t,r,1,127,-128),f.TYPED_ARRAY_SUPPORT||(t=Math.floor(t)),t<0&&(t=255+t+1),this[r]=255&t,r+1},f.prototype.writeInt16LE=function(t,r,e){return t=+t,r|=0,e||k(this,t,r,2,32767,-32768),f.TYPED_ARRAY_SUPPORT?(this[r]=255&t,this[r+1]=t>>>8):N(this,t,r,!0),r+2},f.prototype.writeInt16BE=function(t,r,e){return t=+t,r|=0,e||k(this,t,r,2,32767,-32768),f.TYPED_ARRAY_SUPPORT?(this[r]=t>>>8,this[r+1]=255&t):N(this,t,r,!1),r+2},f.prototype.writeInt32LE=function(t,r,e){return t=+t,r|=0,e||k(this,t,r,4,2147483647,-2147483648),f.TYPED_ARRAY_SUPPORT?(this[r]=255&t,this[r+1]=t>>>8,this[r+2]=t>>>16,this[r+3]=t>>>24):z(this,t,r,!0),r+4},f.prototype.writeInt32BE=function(t,r,e){return t=+t,r|=0,e||k(this,t,r,4,2147483647,-2147483648),t<0&&(t=4294967295+t+1),f.TYPED_ARRAY_SUPPORT?(this[r]=t>>>24,this[r+1]=t>>>16,this[r+2]=t>>>8,this[r+3]=255&t):z(this,t,r,!1),r+4},f.prototype.writeFloatLE=function(t,r,e){return j(this,t,r,!0,e)},f.prototype.writeFloatBE=function(t,r,e){return j(this,t,r,!1,e)},f.prototype.writeDoubleLE=function(t,r,e){return q(this,t,r,!0,e)},f.prototype.writeDoubleBE=function(t,r,e){return q(this,t,r,!1,e)},f.prototype.copy=function(t,r,e,n){if(e||(e=0),n||0===n||(n=this.length),r>=t.length&&(r=t.length),r||(r=0),n>0&&n=this.length)throw new RangeError("sourceStart out of bounds");if(n<0)throw new RangeError("sourceEnd out of bounds");n>this.length&&(n=this.length),t.length-r=0;--i)t[i+r]=this[i+e];else if(o<1e3||!f.TYPED_ARRAY_SUPPORT)for(i=0;i>>=0,e=void 0===e?this.length:e>>>0,t||(t=0),"number"==typeof t)for(o=r;o55295&&e<57344){if(!i){if(e>56319){(r-=3)>-1&&o.push(239,191,189);continue}if(u+1===n){(r-=3)>-1&&o.push(239,191,189);continue}i=e;continue}if(e<56320){(r-=3)>-1&&o.push(239,191,189),i=e;continue}e=65536+(i-55296<<10|e-56320)}else i&&(r-=3)>-1&&o.push(239,191,189);if(i=null,e<128){if((r-=1)<0)break;o.push(e)}else if(e<2048){if((r-=2)<0)break;o.push(e>>6|192,63&e|128)}else if(e<65536){if((r-=3)<0)break;o.push(e>>12|224,e>>6&63|128,63&e|128)}else{if(!(e<1114112))throw new Error("Invalid code point");if((r-=4)<0)break;o.push(e>>18|240,e>>12&63|128,e>>6&63|128,63&e|128)}}return o}function G(t){for(var r=[],e=0;e>8,i=e%256,o.push(i),o.push(n);return o}function K(t){return r.toByteArray(X(t))}function Q(t,r,e,n){for(var i=0;i=r.length||i>=t.length);++i)r[i+e]=t[i];return i}function W(t){return t!=t} },{"base64-js":"yh9p","ieee754":"JgNJ","isarray":"REa7","buffer":"dskh"}],"aSGf":[function(require,module,exports) { var global = arguments[3]; var Buffer = require("buffer").Buffer; var t=arguments[3],e=require("buffer").Buffer,r=require("../constants.js").FILE_SYSTEM_NAME,n=require("../constants.js").FILE_STORE_NAME,o=require("../constants.js").IDB_RW,u=require("../constants.js").IDB_RO,c=t.indexedDB||t.mozIndexedDB||t.webkitIndexedDB||t.msIndexedDB;function i(t,e){this.db=t,this.mode=e}function s(t){this.name=t||r,this.db=null}i.prototype._getObjectStore=function(){if(this.objectStore)return this.objectStore;var t=this.db.transaction(n,this.mode);return this.objectStore=t.objectStore(n),this.objectStore},i.prototype.clear=function(t){try{var e=this._getObjectStore().clear();e.onsuccess=function(){t()},e.onerror=function(e){e.preventDefault(),t(e.error)}}catch(r){t(r)}},i.prototype._get=function(t,e){try{var r=this._getObjectStore().get(t);r.onsuccess=function(t){var r=t.target.result;e(null,r)},r.onerror=function(t){t.preventDefault(),e(t.error)}}catch(n){e(n)}},i.prototype.getObject=function(t,e){this._get(t,e)},i.prototype.getBuffer=function(t,r){this._get(t,function(t,n){if(t)return r(t);r(null,e.from(n))})},i.prototype._put=function(t,e,r){try{var n=this._getObjectStore().put(e,t);n.onsuccess=function(t){var e=t.target.result;r(null,e)},n.onerror=function(t){t.preventDefault(),r(t.error)}}catch(o){r(o)}},i.prototype.putObject=function(t,e,r){this._put(t,e,r)},i.prototype.putBuffer=function(t,e,r){var n=e.buffer;this._put(t,n,r)},i.prototype.delete=function(t,e){try{var r=this._getObjectStore().delete(t);r.onsuccess=function(t){var r=t.target.result;e(null,r)},r.onerror=function(t){t.preventDefault(),e(t.error)}}catch(n){e(n)}},s.isSupported=function(){return!!c},s.prototype.open=function(t){var e=this;if(e.db)return t();try{var r=c.open(e.name);r.onupgradeneeded=function(t){var e=t.target.result;e.objectStoreNames.contains(n)&&e.deleteObjectStore(n),e.createObjectStore(n)},r.onsuccess=function(r){e.db=r.target.result,t()},r.onerror=function(e){e.preventDefault(),t(e.error)}}catch(o){t(o)}},s.prototype.getReadOnlyContext=function(){return new i(this.db,u)},s.prototype.getReadWriteContext=function(){return new i(this.db,o)},module.exports=s; },{"../constants.js":"gCho","buffer":"dskh"}],"Hmaa":[function(require,module,exports) { var t={};["3:EACCES:permission denied","9:EBADF:bad file descriptor","10:EBUSY:resource busy or locked","18:EINVAL:invalid argument","27:ENOTDIR:not a directory","28:EISDIR:illegal operation on a directory","34:ENOENT:no such file or directory","47:EEXIST:file already exists","50:EPERM:operation not permitted","51:ELOOP:too many symbolic links encountered","53:ENOTEMPTY:directory not empty","55:EIO:i/o error","1000:ENOTMOUNTED:not mounted","1001:EFILESYSTEMERROR:missing super node, use 'FORMAT' flag to format filesystem.","1002:ENOATTR:attribute does not exist"].forEach(function(e){var o=+(e=e.split(":"))[0],r=e[1],i=e[2];function s(t,e){Error.call(this),this.name=r,this.code=r,this.errno=o,this.message=t||i,e&&(this.path=e),this.stack=new Error(this.message).stack}s.prototype=Object.create(Error.prototype),s.prototype.constructor=s,s.prototype.toString=function(){var t=this.path?", '"+this.path+"'":"";return this.name+": "+this.message+t},t[r]=t[o]=s}),module.exports=t; },{}],"vLJO":[function(require,module,exports) { !function(){"use strict";for(var r="ABCDEFGHIJKLMNOPQRSTUVWXYZabcdefghijklmnopqrstuvwxyz0123456789+/",e=new Uint8Array(256),t=0;t>2],a+=r[(3&n[t])<<4|n[t+1]>>4],a+=r[(15&n[t+1])<<2|n[t+2]>>6],a+=r[63&n[t+2]];return o%3==2?a=a.substring(0,a.length-1)+"=":o%3==1&&(a=a.substring(0,a.length-2)+"=="),a},exports.decode=function(r){var t,n,o,a,h,c=.75*r.length,g=r.length,i=0;"="===r[r.length-1]&&(c--,"="===r[r.length-2]&&c--);var u=new ArrayBuffer(c),A=new Uint8Array(u);for(t=0;t>4,A[i++]=(15&o)<<4|a>>2,A[i++]=(3&a)<<6|63&h;return u}}(); },{}],"wqt1":[function(require,module,exports) { var Buffer = require("buffer").Buffer; var global = arguments[3]; var t=require("buffer").Buffer,n=arguments[3],e=require("../constants.js").FILE_SYSTEM_NAME,i=require("../constants.js").FILE_STORE_NAME,o=require("../constants.js").WSQL_VERSION,r=require("../constants.js").WSQL_SIZE,u=require("../constants.js").WSQL_DESC,a=require("../errors.js"),c=require("base64-arraybuffer");function s(t,n){var e=this;this.getTransaction=function(i){e.transaction?i(e.transaction):t[n?"readTransaction":"transaction"](function(t){e.transaction=t,i(t)})}}function f(t,n,e){function o(t,n){var i=0===n.rows.length?null:n.rows.item(0).data;e(null,i)}function r(t,n){e(n)}t(function(t){t.executeSql("SELECT data FROM "+i+" WHERE id = ? LIMIT 1;",[n],o,r)})}function E(t,n,e,o){function r(){o(null)}function u(t,n){o(n)}t(function(t){t.executeSql("INSERT OR REPLACE INTO "+i+" (id, data) VALUES (?, ?);",[n,e],r,u)})}function d(t){this.name=t||e,this.db=null}s.prototype.clear=function(t){function n(n,e){t(e)}function e(){t(null)}this.getTransaction(function(t){t.executeSql("DELETE FROM "+i+";",[],e,n)})},s.prototype.getObject=function(t,n){f(this.getTransaction,t,function(t,e){if(t)return n(t);try{e&&(e=JSON.parse(e))}catch(i){return n(i)}n(null,e)})},s.prototype.getBuffer=function(n,e){f(this.getTransaction,n,function(n,i){if(n)return e(n);if(i||""===i){var o=c.decode(i);i=t.from(o)}e(null,i)})},s.prototype.putObject=function(t,n,e){var i=JSON.stringify(n);E(this.getTransaction,t,i,e)},s.prototype.putBuffer=function(t,n,e){var i=c.encode(n.buffer);E(this.getTransaction,t,i,e)},s.prototype.delete=function(t,n){function e(){n(null)}function o(t,e){n(e)}this.getTransaction(function(n){n.executeSql("DELETE FROM "+i+" WHERE id = ?;",[t],e,o)})},d.isSupported=function(){return!!n.openDatabase},d.prototype.open=function(t){var e=this;if(e.db)return t();var c=n.openDatabase(e.name,o,u,r);function s(n,e){5===e.code&&t(new a.EINVAL("WebSQL cannot be accessed. If private browsing is enabled, disable it.")),t(e)}function f(){e.db=c,t()}c?c.transaction(function(t){t.executeSql("CREATE TABLE IF NOT EXISTS "+i+" (id unique, data TEXT);",[],function(t){t.executeSql("CREATE INDEX IF NOT EXISTS idx_"+i+"_id on "+i+" (id);",[],f,s)},s)}):t("[WebSQL] Unable to open database.")},d.prototype.getReadOnlyContext=function(){return new s(this.db,!0)},d.prototype.getReadWriteContext=function(){return new s(this.db,!1)},module.exports=d; },{"../constants.js":"gCho","../errors.js":"Hmaa","base64-arraybuffer":"vLJO","buffer":"dskh"}],"u4Zs":[function(require,module,exports) { var process = require("process"); var define; var e,t=require("process");!function(){var n={};void 0!==t&&t.nextTick?(n.nextTick=t.nextTick,"undefined"!=typeof setImmediate?n.setImmediate=function(e){setImmediate(e)}:n.setImmediate=n.nextTick):"function"==typeof setImmediate?(n.nextTick=function(e){setImmediate(e)},n.setImmediate=n.nextTick):(n.nextTick=function(e){setTimeout(e,0)},n.setImmediate=n.nextTick),n.eachSeries=function(e,t,n){if(n=n||function(){},!e.length)return n();var i=0;!function o(){t(e[i],function(t){t?(n(t),n=function(){}):(i+=1)>=e.length?n():o()})}()},n.forEachSeries=n.eachSeries,void 0!==e&&e.amd?e([],function(){return n}):"undefined"!=typeof module&&module.exports?module.exports=n:root.async=n}(); },{"process":"pBGv"}],"Xhog":[function(require,module,exports) { var t=require("../constants.js").FILE_SYSTEM_NAME,e=require("../../lib/async.js").setImmediate,o=function(){var t={};return function(e){return t.hasOwnProperty(e)||(t[e]={}),t[e]}}();function n(t,e){this.readOnly=e,this.objectStore=t}function r(e){this.name=e||t}n.prototype.clear=function(t){if(this.readOnly)e(function(){t("[MemoryContext] Error: write operation on read only context")});else{var o=this.objectStore;Object.keys(o).forEach(function(t){delete o[t]}),e(t)}},n.prototype.getObject=n.prototype.getBuffer=function(t,o){var n=this;e(function(){o(null,n.objectStore[t])})},n.prototype.putObject=n.prototype.putBuffer=function(t,o,n){this.readOnly?e(function(){n("[MemoryContext] Error: write operation on read only context")}):(this.objectStore[t]=o,e(n))},n.prototype.delete=function(t,o){this.readOnly?e(function(){o("[MemoryContext] Error: write operation on read only context")}):(delete this.objectStore[t],e(o))},r.isSupported=function(){return!0},r.prototype.open=function(t){this.db=o(this.name),e(t)},r.prototype.getReadOnlyContext=function(){return new n(this.db,!0)},r.prototype.getReadWriteContext=function(){return new n(this.db,!1)},module.exports=r; },{"../constants.js":"gCho","../../lib/async.js":"u4Zs"}],"UCG6":[function(require,module,exports) { var r=require("./indexeddb.js"),e=require("./websql.js"),o=require("./memory.js");module.exports={IndexedDB:r,WebSQL:e,Memory:o,Default:r,Fallback:function(){if(r.isSupported())return r;if(e.isSupported())return e;function o(){throw"[Filer Error] Your browser doesn't support IndexedDB or WebSQL."}return o.isSupported=function(){return!1},o}()}; },{"./indexeddb.js":"aSGf","./websql.js":"wqt1","./memory.js":"Xhog"}],"lsut":[function(require,module,exports) { var t=require("../constants.js").ENVIRONMENT;module.exports=function(n){(n=n||{}).TMP=n.TMP||t.TMP,n.PATH=n.PATH||t.PATH,this.get=function(t){return n[t]},this.set=function(t,e){n[t]=e}}; },{"../constants.js":"gCho"}],"bQx9":[function(require,module,exports) { module.exports=function(t,o){for(var a=[],e=0;e=0&&c>0){for(r=[],o=t.length;p>=0&&!l;)p==s?(r.push(p),s=t.indexOf(e,p+1)):1==r.length?l=[r.pop(),c]:((i=r.pop())=0?s:c;r.length&&(l=[o,f])}return l}module.exports=e,e.range=t; },{}],"dwX/":[function(require,module,exports) { var t=require("concat-map"),r=require("balanced-match");module.exports=f;var n="\0SLASH"+Math.random()+"\0",e="\0OPEN"+Math.random()+"\0",i="\0CLOSE"+Math.random()+"\0",o="\0COMMA"+Math.random()+"\0",a="\0PERIOD"+Math.random()+"\0";function s(t){return parseInt(t,10)==t?parseInt(t,10):t.charCodeAt(0)}function p(t){return t.split("\\\\").join(n).split("\\{").join(e).split("\\}").join(i).split("\\,").join(o).split("\\.").join(a)}function u(t){return t.split(n).join("\\").split(e).join("{").split(i).join("}").split(o).join(",").split(a).join(".")}function l(t){if(!t)return[""];var n=[],e=r("{","}",t);if(!e)return t.split(",");var i=e.pre,o=e.body,a=e.post,s=i.split(",");s[s.length-1]+="{"+o+"}";var p=l(a);return a.length&&(s[s.length-1]+=p.shift(),s.push.apply(s,p)),n.push.apply(n,s),n}function f(t){return t?("{}"===t.substr(0,2)&&(t="\\{\\}"+t.substr(2)),m(p(t),!0).map(u)):[]}function h(t){return t}function d(t){return"{"+t+"}"}function c(t){return/^-?0\d/.test(t)}function v(t,r){return t<=r}function g(t,r){return t>=r}function m(n,e){var o=[],a=r("{","}",n);if(!a||/\$$/.test(a.pre))return[n];var p,u=/^-?\d+\.\.-?\d+(?:\.\.-?\d+)?$/.test(a.body),f=/^[a-zA-Z]\.\.[a-zA-Z](?:\.\.-?\d+)?$/.test(a.body),h=u||f,b=a.body.indexOf(",")>=0;if(!h&&!b)return a.post.match(/,.*\}/)?m(n=a.pre+"{"+a.body+i+a.post):[n];if(h)p=a.body.split(/\.\./);else if(1===(p=l(a.body)).length&&1===(p=m(p[0],!1).map(d)).length)return(M=a.post.length?m(a.post,!1):[""]).map(function(t){return a.pre+p[0]+t});var j,y=a.pre,M=a.post.length?m(a.post,!1):[""];if(h){var A=s(p[0]),C=s(p[1]),O=Math.max(p[0].length,p[1].length),S=3==p.length?Math.abs(s(p[2])):1,$=v;C0){var z=new Array(q+1).join("0");I=E<0?"-"+z+I.slice(1):z+I}}j.push(I)}}else j=t(p,function(t){return m(t,!1)});for(var L=0;L65536)throw new TypeError("pattern is too long");var a=this.options;if(!a.noglobstar&&"**"===t)return e;if(""===t)return"";var o,c="",u=!!a.nocase,p=!1,f=[],g=[],l=!1,d=-1,b=-1,m="."===t.charAt(0)?"":a.dot?"(?!(?:^|\\/)\\.{1,2}(?:$|\\/))":"(?!\\.)",y=this;function w(){if(o){switch(o){case"*":c+=s,u=!0;break;case"?":c+=i,u=!0;break;default:c+="\\"+o}y.debug("clearStateChar %j %j",o,c),o=!1}}for(var x,j=0,k=t.length;j-1;L--){var q=g[L],B=c.slice(0,q.reStart),M=c.slice(q.reStart,q.reEnd-8),N=c.slice(q.reEnd-8,q.reEnd),_=c.slice(q.reEnd);N+=_;var G=B.split("(").length-1,P=_;for(j=0;j=0&&!(i=e[s]);s--);for(s=0;s>> no match, partial?",t,f,n,g),f!==o))}if("string"==typeof u?(c=i.nocase?p.toLowerCase()===u.toLowerCase():p===u,this.debug("string match",u,p,c)):(c=p.match(u),this.debug("pattern match",u,p,c)),!c)return!1}if(s===o&&a===h)return!0;if(s===o)return r;if(a===h)return s===o-1&&""===t[s];throw new Error("wtf?")}; },{"path":"UUq2","brace-expansion":"dwX/"}],"Kf0M":[function(require,module,exports) { var n=require("es6-promisify"),t=n.promisify,e=require("../path.js"),i=require("../errors.js"),r=require("./environment.js"),o=require("../../lib/async.js"),u=require("minimatch");function c(n,o){var u=this,c=new r((o=o||{}).env),f="/";Object.defineProperty(this,"fs",{get:function(){return n},enumerable:!0}),Object.defineProperty(this,"env",{get:function(){return c},enumerable:!0}),this.cd=function(t,r){t=e.resolve(f,t),n.stat(t,function(n,e){n?r(new i.ENOTDIR(null,t)):"DIRECTORY"===e.type?(f=t,r()):r(new i.ENOTDIR(null,t))})},this.pwd=function(){return f},this.promises={},["cd","exec","touch","cat","ls","rm","tempDir","mkdirp","find"].forEach(function(n){u.promises[n]=t(u[n].bind(u))})}c.prototype.exec=function(n,t,i){var r=this.fs;"function"==typeof t&&(i=t,t=[]),t=t||[],i=i||function(){},n=e.resolve(this.pwd(),n),r.readFile(n,"utf8",function(n,e){if(n)i(n);else try{new Function("fs","args","callback",e)(r,t,i)}catch(o){i(o)}})},c.prototype.touch=function(n,t,i){var r=this.fs;"function"==typeof t&&(i=t,t={}),t=t||{},i=i||function(){},n=e.resolve(this.pwd(),n),r.stat(n,function(e){e?!0===t.updateOnly?i():function(n){r.writeFile(n,"",i)}(n):function(n){var e=Date.now(),o=t.date||e,u=t.date||e;r.utimes(n,o,u,i)}(n)})},c.prototype.cat=function(n,t){var r=this,u=r.fs,c="";t=t||function(){},n?(n="string"==typeof n?[n]:n,o.eachSeries(n,function(n,t){var i=e.resolve(r.pwd(),n);u.readFile(i,"utf8",function(n,e){n?t(n):(c+=e+"\n",t())})},function(n){n?t(n):t(null,c.replace(/\n$/,""))})):t(new i.EINVAL("Missing files argument"))},c.prototype.ls=function(n,t,r){var u=this,c=u.fs;"function"==typeof t&&(r=t,t={}),t=t||{},r=r||function(){},n?function n(i,r){var f=e.resolve(u.pwd(),i),s=[];c.readdir(f,function(i,u){i?r(i):o.eachSeries(u,function(i,r){i=e.join(f,i),c.stat(i,function(i,o){if(i)r(i);else{var u=o;t.recursive&&"DIRECTORY"===o.type?n(e.join(f,u.name),function(n,t){n?r(n):(u.contents=t,s.push(u),r())}):(s.push(u),r())}})},function(n){r(n,s)})})}(n,r):r(new i.EINVAL("Missing dir argument"))},c.prototype.rm=function(n,t,r){var u=this,c=u.fs;"function"==typeof t&&(r=t,t={}),t=t||{},r=r||function(){},n?function n(r,f){r=e.resolve(u.pwd(),r),c.stat(r,function(u,s){u?f(u):"FILE"!==s.type?c.readdir(r,function(u,s){u?f(u):0!==s.length?t.recursive?(s=s.map(function(n){return e.join(r,n)}),o.eachSeries(s,n,function(n){n?f(n):c.rmdir(r,f)})):f(new i.ENOTEMPTY(null,r)):c.rmdir(r,f)}):c.unlink(r,f)})}(n,r):r(new i.EINVAL("Missing path argument"))},c.prototype.tempDir=function(n){var t=this.fs,e=this.env.get("TMP");n=n||function(){},t.mkdir(e,function(){n(null,e)})},c.prototype.mkdirp=function(n,t){var r=this.fs;t=t||function(){},n?"/"!==n?function n(t,o){r.stat(t,function(u,c){if(c){if(c.isDirectory())return void o();if(c.isFile())return void o(new i.ENOTDIR(null,t))}else{if(u&&"ENOENT"!==u.code)return void o(u);var f=e.dirname(t);"/"===f?r.mkdir(t,function(n){n&&"EEXIST"!==n.code?o(n):o()}):n(f,function(n){if(n)return o(n);r.mkdir(t,function(n){n&&"EEXIST"!==n.code?o(n):o()})})}})}(n,t):t():t(new i.EINVAL("Missing path argument"))},c.prototype.find=function(n,t,r){var c=this,f=c.fs;"function"==typeof t&&(r=t,t={}),r=r||function(){};var s=(t=t||{}).exec||function(n,t){t()},a=[];function p(n,i){var r=e.removeTrailing(n);!t.regex||t.regex.test(r)?t.name&&!u(e.basename(r),t.name)||t.path&&!u(e.dirname(r),t.path)?i():function(n,t){s(n,function(e){e?t(e):(a.push(n),t())})}(n,i):i()}function d(n,t){n=e.resolve(c.pwd(),n),f.readdir(n,function(i,r){i?"ENOTDIR"===i.code?p(n,t):t(i):p(e.addTrailing(n),function(i){i?t(i):(r=r.map(function(t){return e.join(n,t)}),o.eachSeries(r,d,function(n){t(n,a)}))})})}n?f.stat(n,function(t,e){t?r(t):e.isDirectory()?d(n,r):r(new i.ENOTDIR(null,n))}):r(new i.EINVAL("Missing path argument"))},module.exports=c; },{"es6-promisify":"0c0E","../path.js":"8thZ","../errors.js":"Hmaa","./environment.js":"lsut","../../lib/async.js":"u4Zs","minimatch":"Nt/K"}],"J4Qg":[function(require,module,exports) { function t(t,r){for(var o=r.length-1;o>=0;o--)r[o]===t&&r.splice(o,1);return r}var r=function(){};r.createInterface=function(r){var o={on:function(t,o){void 0===this[r]&&(this[r]={}),this[r].hasOwnProperty(t)||(this[r][t]=[]),this[r][t].push(o)},off:function(o,e){void 0!==this[r]&&this[r].hasOwnProperty(o)&&t(e,this[r][o])},trigger:function(t){if(void 0!==this[r]&&this[r].hasOwnProperty(t))for(var o=Array.prototype.slice.call(arguments,1),e=0;et&&(n=o,e.apply(this,arguments))}}function i(t,n){if(void 0!==t&&t||(t={}),"object"===e(n))for(var o in n)n.hasOwnProperty(o)&&(t[o]=n[o]);return t}var a=function(t){return void 0===t||void 0===t.localStorage?{getItem:function(){},setItem:function(){},removeItem:function(){}}:t.localStorage}(t);function s(){var e=this,n=Date.now();this.origin=o(),this.lastMessage=n,this.receivedIDs={},this.previousValues={};var r=function(){e._onStorageEvent.apply(e,arguments)};"undefined"!=typeof document&&(document.attachEvent?document.attachEvent("onstorage",r):t.addEventListener("storage",r,!1))}s.prototype._transaction=function(t){var e=1e3,n=20,o=this,r=!1,i=!1,s=null;function c(){if(!r){var u=Date.now(),f=0|a.getItem(p);if(f&&u-f=0;o--)t[o].timestamp0&&a.setItem(c,JSON.stringify(t))})}),s.prototype._cleanup_once=r(100,function(){var t=this;t._transaction(function(){Date.now();var e,n,o=0;try{n=JSON.parse(a.getItem(u)||"{}")}catch(r){n={}}for(e in n)t._once_expired(e,n)&&(delete n[e],o++);o>0&&a.setItem(u,JSON.stringify(n))})}),s.prototype._once_expired=function(t,n){if(!n)return!0;if(!n.hasOwnProperty(t))return!0;if("object"!==e(n[t]))return!0;var o=n[t].ttl||m,r=Date.now();return n[t].timestampg?t(new L.ELOOP(null,e)):(p=s.data,p=i(p),a=o(p),r=u(p),E===r?n.getObject(w,c):x(n,a,m)):t(null,s)}E===r?n.getObject(w,c):x(n,a,m)}function k(n,e,t,i,o,u,r){var a=t.xattrs;u===h&&a.hasOwnProperty(i)?r(new L.EEXIST("attribute already exists",e)):u!==A||a.hasOwnProperty(i)?(a[i]=o,n.putObject(t.id,t,function(i){i?r(i):S(n,e,t,{ctime:Date.now()},r)})):r(new L.ENOATTR(null,e))}function C(n,e){var t,i,o;function u(o){o?e(o):V.create({guid:n.guid,id:t.rnode,type:s},function(t,o){t?e(t):((i=o).nlinks+=1,n.putObject(i.id,i,r))})}function r(t){t?e(t):(o={},n.putObject(i.data,o,e))}n.getObject(w,function(i,o){!i&&o?e():!i||i instanceof L.ENOENT?F.create({guid:n.guid},function(i,o){i?e(i):(t=o,n.putObject(t.id,t,u))}):e(i)})}function X(n,e,t){e=i(e);var r,a,f,c,l=u(e),d=o(e);function p(e,i){e?t(e):(f=i,n.getObject(f.data,m))}function m(e,i){e?t(e):(c=i,V.create({guid:n.guid,type:s},function(e,i){e?t(e):((r=i).nlinks+=1,n.putObject(r.id,r,E))}))}function E(e){e?t(e):(a={},n.putObject(r.data,a,g))}function w(e){if(e)t(e);else{var i=Date.now();S(n,d,f,{mtime:i,ctime:i},t)}}function g(e){e?t(e):(c[l]=new R(r.id,s),n.putObject(f.data,c,w))}x(n,e,function(i,o){!i&&o?t(new L.EEXIST(null,e)):!i||i instanceof L.ENOENT?x(n,d,p):t(i)})}function M(n,e,t,o){var u=c.fsConstants,r=u.F_OK,a=u.R_OK,f=u.W_OK,l=u.X_OK,s=u.S_IXUSR,d=u.S_IXGRP,p=u.S_IXOTH;x(n,e=i(e),function(n,i){if(n)return o(n);if(t===r)return o(null);var u=Bn(i.mode,o);return u?t&(a|f)?o(null):t&l&&u&(s|d|p)?o(null):void o(new L.EACCES("permission denied",e)):void 0})}function q(n,e,t){e=i(e);var r,a,f,c,l=u(e),d=o(e);function p(i,o){i?t(i):E===l?t(new L.EBUSY(null,e)):o.hasOwnProperty(l)?(r=(c=o)[l].id,n.getObject(r,m)):t(new L.ENOENT(null,e))}function m(i,o){i?t(i):o.type!==s?t(new L.ENOTDIR(null,e)):(r=o,n.getObject(r.data,w))}function w(i,o){i?t(i):(a=o,Object.keys(a).length>0?t(new L.ENOTEMPTY(null,e)):(delete c[l],n.putObject(f.data,c,g)))}function g(e){if(e)t(e);else{var i=Date.now();S(n,d,f,{mtime:i,ctime:i},O)}}function O(e){e?t(e):n.delete(r.id,b)}function b(e){e?t(e):n.delete(r.data,t)}x(n,d,function(e,i){e?t(e):(f=i,n.getObject(f.data,p))})}function z(e,t,r,a,f){"function"==typeof a&&(f=a,a=null),t=i(t);var c,p,m,w,O,N=u(t),I=o(t),h=0;function A(n,i){n?f(n):i.type!==s?f(new L.ENOENT(null,t)):(c=i,e.getObject(c.data,D))}function D(n,i){n?f(n):(p=i).hasOwnProperty(N)?r.includes(y)?f(new L.ENOENT("O_CREATE and O_EXCLUSIVE are set, and the named file exists",t)):(m=p[N]).type===s&&r.includes(b)?f(new L.EISDIR("the named file is a directory and O_WRITE is set",t)):e.getObject(m.id,T):r.includes(v)?V.create({guid:e.guid,type:l},function(n,t){n?f(n):((w=t).nlinks+=1,a&&(w.mode=a),e.putObject(w.id,w,_))}):f(new L.ENOENT("O_CREATE is not set and the named file does not exist",t))}function T(n,a){if(n)f(n);else{var c=a;c.type===d?++h>g?f(new L.ELOOP(null,t)):function(n){n=i(n),I=o(n),N=u(n),E===N&&(r.includes(b)?f(new L.EISDIR("the named file is a directory and O_WRITE is set",t)):x(e,t,j));x(e,I,A)}(c.data):j(void 0,c)}}function j(n,e){n?f(n):f(null,w=e)}function _(t){t?f(t):(O=n.alloc(0),e.putBuffer(w.data,O,P))}function F(n){if(n)f(n);else{var t=Date.now();S(e,I,c,{mtime:t,ctime:t},B)}}function P(n){n?f(n):(p[N]=new R(w.id,l),e.putObject(c.data,p,F))}function B(n){n?f(n):f(null,w)}E===N?r.includes(b)?f(new L.EISDIR("the named file is a directory and O_WRITE is set",t)):x(e,t,j):x(e,I,A)}function Y(e,t,i,o,u,r){var a;function f(n){n?r(n):r(null,u)}function c(n){if(n)r(n);else{var i=Date.now();S(e,t.path,a,{mtime:i,ctime:i},f)}}function l(n){n?r(n):e.putObject(a.id,a,c)}e.getObject(t.id,function(f,c){if(f)r(f);else{a=c;var s=n.alloc(u);i.copy(s,0,o,o+u),t.position=u,a.size=u,a.version+=1,e.putBuffer(a.data,s,l)}})}function K(e,t,i,o,u,r,a){var f,c;function l(n){n?a(n):a(null,u)}function s(n){if(n)a(n);else{var i=Date.now();S(e,t.path,f,{mtime:i,ctime:i},l)}}function d(n){n?a(n):e.putObject(f.id,f,s)}function p(l,s){if(l)a(l);else{if(!(c=s))return a(new L.EIO("Expected Buffer"));var p=null!=r?r:t.position,m=Math.max(c.length,p+u),E=n.alloc(m);c&&c.copy(E),i.copy(E,p,o,o+u),void 0===r&&(t.position+=u),f.size=m,f.version+=1,e.putBuffer(f.data,E,d)}}e.getObject(t.id,function(n,t){n?a(n):(f=t,e.getBuffer(f.data,p))})}function U(n,e,t,i,o,u,r){var a,f;function c(n,a){if(n)r(n);else{if(!(f=a))return r(new L.EIO("Expected Buffer"));var c=null!=u?u:e.position;o=c+o>t.length?o-c:o,f.copy(t,i,c,c+o),void 0===u&&(e.position+=o),r(null,o)}}n.getObject(e.id,function(t,i){t?r(t):i.type===s?r(new L.EISDIR("the named file is a directory",e.path)):(a=i,n.getBuffer(a.data,c))})}function W(n,e,t){x(n,e=i(e),t)}function G(n,e,t){e.getNode(n,t)}function H(n,e,t){e=i(e);var r,a,f=u(e),c=o(e);function l(i,o){i?t(i):(a=o).hasOwnProperty(f)?n.getObject(a[f].id,t):t(new L.ENOENT("a component of the path does not name an existing file",e))}E===f?x(n,e,t):x(n,c,function(e,i){e?t(e):(r=i,n.getObject(r.data,l))})}function $(n,e,t,r){e=i(e);var a=u(e),f=o(e);t=i(t);var c,l,d,p,m,E,w=u(t),g=o(t),O=Date.now();function b(e){e?r(e):S(n,t,E,{ctime:O},r)}function v(e,t){e?r(e):((E=t).nlinks+=1,n.putObject(E.id,E,b))}function y(e){e?r(e):n.getObject(m,v)}function N(e,t){e?r(e):(p=t).hasOwnProperty(w)?r(new L.EEXIST("newpath resolves to an existing file",w)):(p[w]=l[a],m=p[w].id,n.putObject(d.data,p,y))}function I(e,t){e?r(e):(d=t,n.getObject(d.data,N))}function h(e,t){e?r(e):(l=t).hasOwnProperty(a)?l[a].type===s?r(new L.EPERM("oldpath refers to a directory")):x(n,g,I):r(new L.ENOENT("a component of either path prefix does not exist",a))}x(n,f,function(e,t){e?r(e):(c=t,n.getObject(c.data,h))})}function J(n,e,t){e=i(e);var r,a,f,c=u(e),l=o(e);function d(e){e?t(e):(delete a[c],n.putObject(r.data,a,function(e){if(e)t(e);else{var i=Date.now();S(n,l,r,{mtime:i,ctime:i},t)}}))}function p(e){e?t(e):n.delete(f.data,d)}function m(i,o){i?t(i):o.type===s?t(new L.EPERM("unlink not permitted on directories",c)):function(i,o){i?t(i):((f=o).nlinks-=1,f.nlinks<1?n.delete(f.id,p):n.putObject(f.id,f,function(i){i?t(i):S(n,e,f,{ctime:Date.now()},d)}))}(null,o)}function E(e,i){e?t(e):(a=i).hasOwnProperty(c)?n.getObject(a[c].id,m):t(new L.ENOENT("a component of the path does not name an existing file",c))}x(n,l,function(e,i){e?t(e):(r=i,n.getObject(r.data,E))})}function Q(n,e,t){var o,u;function r(n,e){if(n)t(n);else{u=e;var i=Object.keys(u);t(null,i)}}e=i(e),x(n,e,function(i,u){i?t(i):u.type!==s?t(new L.ENOTDIR(null,e)):(o=u,n.getObject(o.data,r))})}function Z(n,e,a,f){a=i(a);var c,l,s,p=u(a),m=o(a);function w(i,o){i?f(i):(l=o).hasOwnProperty(p)?f(new L.EEXIST(null,p)):V.create({guid:n.guid,type:d},function(i,o){i?f(i):((s=o).nlinks+=1,r(e)||(s.symlink_relpath=e,e=t.resolve(m,e)),s.size=e.length,s.data=e,n.putObject(s.id,s,O))})}function g(e){if(e)f(e);else{var t=Date.now();S(n,m,c,{mtime:t,ctime:t},f)}}function O(e){e?f(e):(l[p]=new R(s.id,d),n.putObject(c.data,l,g))}E===p?f(new L.EEXIST(null,p)):x(n,m,function(e,t){e?f(e):(c=t,n.getObject(c.data,w))})}function nn(n,e,t){e=i(e);var r,a,f=u(e),c=o(e);function l(e,i){e?t(e):(a=i).hasOwnProperty(f)?n.getObject(a[f].id,s):t(new L.ENOENT("a component of the path does not name an existing file",f))}function s(n,i){if(n)t(n);else if(i.type!==d)t(new L.EINVAL("path not a symbolic link",e));else{var o=i.symlink_relpath?i.symlink_relpath:i.data;t(null,o)}}x(n,c,function(e,i){e?t(e):(r=i,n.getObject(r.data,l))})}function en(e,t,o,u){var r;function a(t,i){if(t)u(t);else{if(!i)return u(new L.EIO("Expected Buffer"));var a=n.alloc(o);i&&i.copy(a),e.putBuffer(r.data,a,c)}}function f(n){if(n)u(n);else{var i=Date.now();S(e,t,r,{mtime:i,ctime:i},u)}}function c(n){n?u(n):(r.size=o,r.version+=1,e.putObject(r.id,r,f))}t=i(t),o<0?u(new L.EINVAL("length cannot be negative")):x(e,t,function(n,i){n?u(n):i.type===s?u(new L.EISDIR(null,t)):(r=i,e.getBuffer(r.data,a))})}function tn(e,t,i,o){var u;function r(t,r){if(t)o(t);else{var a;if(!r)return o(new L.EIO("Expected Buffer"));a=r?r.slice(0,i):n.alloc(i),e.putBuffer(u.data,a,f)}}function a(n){if(n)o(n);else{var i=Date.now();S(e,t.path,u,{mtime:i,ctime:i},o)}}function f(n){n?o(n):(u.size=i,u.version+=1,e.putObject(u.id,u,a))}i<0?o(new L.EINVAL("length cannot be negative")):t.getNode(e,function(n,t){n?o(n):t.type===s?o(new L.EISDIR):(u=t,e.getBuffer(u.data,r))})}function on(n,e,t,o,u){e=i(e),"number"!=typeof t||"number"!=typeof o?u(new L.EINVAL("atime and mtime must be number",e)):t<0||o<0?u(new L.EINVAL("atime and mtime must be positive integers",e)):x(n,e,function(i,r){i?u(i):S(n,e,r,{atime:t,ctime:o,mtime:o},u)})}function un(n,e,t,i,o){"number"!=typeof t||"number"!=typeof i?o(new L.EINVAL("atime and mtime must be a number")):t<0||i<0?o(new L.EINVAL("atime and mtime must be positive integers")):e.getNode(n,function(u,r){u?o(u):S(n,e.path,r,{atime:t,ctime:i,mtime:i},o)})}function rn(n,e,t,o,u,r){e=i(e),"string"!=typeof t?r(new L.EINVAL("attribute name must be a string",e)):t?null!==u&&u!==h&&u!==A?r(new L.EINVAL("invalid flag, must be null, XATTR_CREATE or XATTR_REPLACE",e)):x(n,e,function(i,a){if(i)return r(i);k(n,e,a,t,o,u,r)}):r(new L.EINVAL("attribute name cannot be an empty string",e))}function an(n,e,t,i,o,u){"string"!=typeof t?u(new L.EINVAL("attribute name must be a string")):t?null!==o&&o!==h&&o!==A?u(new L.EINVAL("invalid flag, must be null, XATTR_CREATE or XATTR_REPLACE")):e.getNode(n,function(r,a){if(r)return u(r);k(n,e.path,a,t,i,o,u)}):u(new L.EINVAL("attribute name cannot be an empty string"))}function fn(n,e,t,o){e=i(e),"string"!=typeof t?o(new L.EINVAL("attribute name must be a string",e)):t?x(n,e,function(n,i){if(n)return o(n);var u=i.xattrs;u.hasOwnProperty(t)?o(null,u[t]):o(new L.ENOATTR(null,e))}):o(new L.EINVAL("attribute name cannot be an empty string",e))}function cn(n,e,t,i){"string"!=typeof t?i(new L.EINVAL):t?e.getNode(n,function(n,e){if(n)return i(n);var o=e.xattrs;o.hasOwnProperty(t)?i(null,o[t]):i(new L.ENOATTR)}):i(new L.EINVAL("attribute name cannot be an empty string"))}function ln(n,e,t,o){e=i(e),"string"!=typeof t?o(new L.EINVAL("attribute name must be a string",e)):t?x(n,e,function(i,u){if(i)return o(i);var r=u.xattrs;r.hasOwnProperty(t)?(delete r[t],n.putObject(u.id,u,function(t){t?o(t):S(n,e,u,{ctime:Date.now()},o)})):o(new L.ENOATTR(null,e))}):o(new L.EINVAL("attribute name cannot be an empty string",e))}function sn(n,e,t,i){"string"!=typeof t?i(new L.EINVAL("attribute name must be a string")):t?e.getNode(n,function(o,u){if(o)return i(o);var r=u.xattrs;r.hasOwnProperty(t)?(delete r[t],n.putObject(u.id,u,function(t){t?i(t):S(n,e.path,u,{ctime:Date.now()},i)})):i(new L.ENOATTR)}):i(new L.EINVAL("attribute name cannot be an empty string"))}function dn(n){return I.hasOwnProperty(n)?I[n]:null}function pn(n,e,t){return n?"function"==typeof n?n={encoding:e,flag:t}:"string"==typeof n&&(n={encoding:n,flag:t}):n={encoding:e,flag:t},n}function mn(n,e,t){var i;return"function"==typeof e&&(t=e,e=!1),n?a(n)?i=new L.EINVAL("Path must be a string without null bytes.",n):e||r(n)||(i=new L.EINVAL("Path must be absolute.",n)):i=new L.EINVAL("Path must be a string",n),!i||(t(i),!1)}function En(n,e,t,i,o,u){if(arguments.length<6?(u=arguments[arguments.length-1],o=420):o=Bn(o,m,u),mn(t,u)){if(!(i=dn(i)))return u(new L.EINVAL("flags is not valid"),t);z(e,t,i,o,function(e,o){if(e)u(e);else{var r;r=i.includes(N)?o.size:0;var a=new _(t,o.id,i,r),f=n.allocDescriptor(a);u(null,f)}})}}function wn(n,e,t,i){n.openFiles[t]?(n.releaseDescriptor(t),i(null)):i(new L.EBADF)}function gn(n,e,t,i,o){mn(t,o)&&B(e,t,i,o)}function On(n,e,t,i,o){if(arguments.length<5)o=i,i=m;else if(!(i=Bn(i,m,o)))return;mn(t,o)&&X(e,t,o)}function bn(n,e,t,i,o){"function"==typeof i&&(o=i,i=c.fsConstants.F_OK),mn(t,o)&&M(e,t,i|=c.fsConstants.F_OK,o)}function vn(n,e,t,i,o){if(o=arguments[arguments.length-1],!t)return o(new Error("filename prefix is required"));var u=t+"-"+f.randomChars(6);mn(u,o)&&X(e,u,function(n){o(n,u)})}function yn(n,e,t,i){mn(t,i)&&q(e,t,i)}function Nn(n,e,t,i){mn(t,i)&&W(e,t,function(e,o){if(e)i(e);else{var u=new P(t,o,n.name);i(null,u)}})}function In(n,e,t,i){var o=n.openFiles[t];o?G(e,o,function(e,t){if(e)i(e);else{var u=new P(o.path,t,n.name);i(null,u)}}):i(new L.EBADF)}function hn(n,e,t,i,o){mn(t,o)&&mn(i,o)&&$(e,t,i,o)}function An(n,e,t,i){mn(t,i)&&J(e,t,i)}function Dn(n,e,t,i,o,u,r,a){o=void 0===o?0:o,u=void 0===u?i.length-o:u,a=arguments[arguments.length-1];var f=n.openFiles[t];f?f.flags.includes(O)?U(e,f,i,o,u,r,function(n,e){a(n,e||0,i)}):a(new L.EBADF("descriptor does not permit reading")):a(new L.EBADF)}function Tn(n,e,t,i){Vn(t,i)===t&&(n.openFiles[t]?i():i(new L.EBADF))}function jn(e,t,i,o,u){if(u=arguments[arguments.length-1],o=pn(o,null,"r"),mn(i,u)){var r=dn(o.flag||"r");if(!r)return u(new L.EINVAL("flags is not valid",i));z(t,i,r,function(a,f){if(a)return u(a);var c=new _(i,f.id,r,0),l=e.allocDescriptor(c);function s(){e.releaseDescriptor(l)}G(t,c,function(r,a){if(r)return s(),u(r);var f=new P(c.path,a,e.name);if(f.isDirectory())return s(),u(new L.EISDIR("illegal operation on directory",i));var l=f.size,d=n.alloc(l);U(t,c,d,0,l,0,function(n){if(s(),n)return u(n);var e;e="utf8"===o.encoding?j.decode(d):d,u(null,e)})})})}}function Ln(n,e,t,i,o,u,r,a){a=arguments[arguments.length-1],o=void 0===o?0:o,u=void 0===u?i.length-o:u;var f=n.openFiles[t];f?f.flags.includes(b)?i.length-o>>0}function Bn(n,e,t){return"function"==typeof e&&(t=e,e=void 0),Sn(n)?n&m:"number"==typeof n?(Number.isInteger(n),t(new L.EINVAL("mode not a valid an integer value",n)),!1):"string"==typeof n?Pn.test(n)?parseInt(n,8)&m:(t(new L.EINVAL("mode not a valid octal string",n)),!1):void 0!==e?e:(t(new L.EINVAL("mode not valid",n)),!1)}function xn(n,e,t,o){e=i(e),"number"!=typeof t?o(new L.EINVAL("mode must be number",e)):x(n,e,function(i,u){i?o(i):(u.mode=t,S(n,e,u,{mtime:Date.now()},o))})}function kn(n,e,t,i){"number"!=typeof t?i(new L.EINVAL("mode must be a number")):e.getNode(n,function(o,u){o?i(o):(u.mode=t,S(n,e.path,u,{mtime:Date.now()},i))})}function Cn(n,e,t,o,u){e=i(e),x(n,e,function(i,r){i?u(i):(r.uid=t,r.gid=o,S(n,e,r,{mtime:Date.now()},u))})}function Xn(n,e,t,i,o){e.getNode(n,function(u,r){u?o(u):(r.uid=t,r.gid=i,S(n,e.path,r,{mtime:Date.now()},o))})}function Mn(n,e,t,i,o){mn(t,o)&&fn(e,t,i,o)}function qn(n,e,t,i,o){var u=n.openFiles[t];u?cn(e,u,i,o):o(new L.EBADF)}function zn(n,e,t,i,o,u,r){"function"==typeof u&&(r=u,u=null),mn(t,r)&&rn(e,t,i,o,u,r)}function Yn(n,e,t,i,o,u,r){"function"==typeof u&&(r=u,u=null);var a=n.openFiles[t];a?a.flags.includes(b)?an(e,a,i,o,u,r):r(new L.EBADF("descriptor does not permit writing")):r(new L.EBADF)}function Kn(n,e,t,i,o){mn(t,o)&&ln(e,t,i,o)}function Un(n,e,t,i,o){var u=n.openFiles[t];u?u.flags.includes(b)?sn(e,u,i,o):o(new L.EBADF("descriptor does not permit writing")):o(new L.EBADF)}function Wn(n,e,t,i,o,u){var r=n.openFiles[t];r||u(new L.EBADF),"SET"===o?i<0?u(new L.EINVAL("resulting file offset would be negative")):(r.position=i,u(null,r.position)):"CUR"===o?r.position+i<0?u(new L.EINVAL("resulting file offset would be negative")):(r.position+=i,u(null,r.position)):"END"===o?G(e,r,function(n,e){n?u(n):e.size+i<0?u(new L.EINVAL("resulting file offset would be negative")):(r.position=e.size+i,u(null,r.position))}):u(new L.EINVAL("whence argument is not a proper value"))}function Gn(n,e,t,i){mn(t,i)&&Q(e,t,i)}function Hn(n){return"number"==typeof n?n:"object"===e(n)&&"function"==typeof n.getTime?n.getTime()/1e3:void 0}function $n(n,e,t,i,o,u){if(mn(t,u)){var r=Date.now();on(e,t,i=Hn(i||r),o=Hn(o||r),u)}}function Jn(n,e,t,i,o,u){var r=Date.now();i=Hn(i||r),o=Hn(o||r);var a=n.openFiles[t];a?a.flags.includes(b)?un(e,a,i,o,u):u(new L.EBADF("descriptor does not permit writing")):u(new L.EBADF)}function Qn(n,e,t,i,o){mn(t,o)&&(i=Bn(i,o))&&xn(e,t,i,o)}function Zn(n,e,t,i,o){if(i=Bn(i,o)){var u=n.openFiles[t];u?u.flags.includes(b)?kn(e,u,i,o):o(new L.EBADF("descriptor does not permit writing")):o(new L.EBADF)}}function ne(n,e,t,i,o,u){if(mn(t,u))return Sn(i)?Sn(o)?void Cn(e,t,i,o,u):u(new L.EINVAL("gid must be a valid integer",o)):u(new L.EINVAL("uid must be a valid integer",i))}function ee(n,e,t,i,o,u){if(!Sn(i))return u(new L.EINVAL("uid must be a valid integer",i));if(!Sn(o))return u(new L.EINVAL("gid must be a valid integer",o));var r=n.openFiles[t];r?r.flags.includes(b)?Xn(e,r,i,o,u):u(new L.EBADF("descriptor does not permit writing")):u(new L.EBADF)}function te(n,e,o,u,r){if(mn(o,r)&&mn(u,r)){o=i(o),u=i(u);var a,f,c,l,d=t.dirname(o),p=t.dirname(o),m=t.basename(o),E=t.basename(u),w=Date.now();x(e,o,function(n,t){n?r(n):t.type===s?x(e,d,h):$(e,o,u,A)})}function g(n,t){n?r(n):S(e,u,t,{ctime:w},r)}function O(n){n?r(n):e.getObject(l[E].id,g)}function b(n){n?r(n):(a.id===c.id&&(f=l),delete f[m],e.putObject(a.data,f,O))}function v(n){n?r(n):(l[E]=f[m],e.putObject(c.data,l,b))}function y(n,t){n?r(n):(l=t).hasOwnProperty(E)?q(e,u,v):v()}function N(n,t){n?r(n):(c=t,e.getObject(c.data,y))}function I(n,t){n?r(n):(f=t,x(e,p,N))}function h(n,t){n?r(n):(a=t,e.getObject(t.data,I))}function A(n){n?r(n):J(e,o,r)}}function ie(n,e,t,i,o,u){mn(t,!0,u=arguments[arguments.length-1])&&mn(i,u)&&Z(e,t,i,u)}function oe(n,e,t,i){mn(t,i)&&nn(e,t,i)}function ue(n,e,t,i){mn(t,i)&&H(e,t,function(e,o){if(e)i(e);else{var u=new P(t,o,n.name);i(null,u)}})}function re(n,e,t,i,o){i=i||0,mn(t,o=arguments[arguments.length-1])&&Vn(i,o)===i&&en(e,t,i,o)}function ae(n,e,t,i,o){o=arguments[arguments.length-1],i=i||0;var u=n.openFiles[t];if(u)if(u.flags.includes(b)){if(Vn(i,o)!==i)return;tn(e,u,i,o)}else o(new L.EBADF("descriptor does not permit writing"));else o(new L.EBADF)}module.exports={ensureRootDirectory:C,open:En,chmod:Qn,access:bn,fchmod:Zn,chown:ne,fchown:ee,close:wn,mknod:gn,mkdir:On,mkdtemp:vn,rmdir:yn,unlink:An,stat:Nn,fstat:In,link:hn,fsync:Tn,read:Dn,readFile:jn,write:Ln,writeFile:Rn,appendFile:_n,exists:Fn,getxattr:Mn,fgetxattr:qn,setxattr:zn,fsetxattr:Yn,removexattr:Kn,fremovexattr:Un,lseek:Wn,readdir:Gn,utimes:$n,futimes:Jn,rename:te,symlink:ie,readlink:oe,lstat:ue,truncate:re,ftruncate:ae}; },{"../path.js":"8thZ","../shared.js":"zFPO","../constants.js":"gCho","../encoding.js":"u0zp","../errors.js":"Hmaa","../directory-entry.js":"RlAD","../open-file-description.js":"E+68","../super-node.js":"3YM/","../node.js":"epsH","../stats.js":"OfGU","buffer":"dskh"}],"Q4+W":[function(require,module,exports) { var e=require("es6-promisify"),n=e.promisify,r=require("../path.js").isNull,t=require("../shared.js").nop,i=require("../constants.js"),o=i.FILE_SYSTEM_NAME,s=i.FS_FORMAT,a=i.FS_READY,m=i.FS_PENDING,u=i.FS_ERROR,c=i.FS_NODUPEIDCHECK,p=require("../providers/index.js"),l=require("../shell/shell.js"),f=require("../../lib/intercom.js"),d=require("../fs-watcher.js"),h=require("../errors.js"),v=require("../shared.js").guid,y=i.STDIN,R=i.STDOUT,g=i.STDERR,E=i.FIRST_DESCRIPTOR,S=require("./implementation.js");function w(e){return"function"==typeof e?e:function(e){if(e)throw e}}function x(e){e&&console.error("Filer error: ",e)}function F(e,q){q=q||x;var D=(e=e||{}).flags||[],O=e.guid?e.guid:v,j=e.provider||new p.Default(e.name||o),C=e.name||j.name,T=D.includes(s),b=this;b.readyState=m,b.name=C,b.error=null,b.stdin=y,b.stdout=R,b.stderr=g,b.constants=i.fsConstants,this.Shell=l.bind(void 0,this);var k={},I=E;Object.defineProperty(this,"openFiles",{get:function(){return k}}),this.allocDescriptor=function(e){var n=I++;return k[n]=e,n},this.releaseDescriptor=function(e){delete k[e]};var _=[];function N(e){return function(n){D.includes(c)?n(null,O()):function n(r){var t=O();e.getObject(t,function(e,i){e?r(e):i?n(r):r(null,t)})}(n)}}this.queueOrRun=function(e){var n;return a===b.readyState?e.call(b):u===b.readyState?n=new h.EFILESYSTEMERROR("unknown error"):_.push(e),n},this.watch=function(e,n,i){if(r(e))throw new Error("Path must be a string without null bytes.");"function"==typeof n&&(i=n,n={}),n=n||{},i=i||t;var o=new d;return o.start(e,!1,n.recursive),o.on("change",i),o},j.open(function(e){function n(e){function n(e){var n=j[e]();return n.flags=D,n.changes=[],n.guid=N(n),n.close=function(){var e=n.changes;!function(e){if(e.length){var n=f.getInstance();e.forEach(function(e){n.emit(e.event,e.path)})}}(e),e.length=0},n}b.provider={openReadWriteContext:function(){return n("getReadWriteContext")},openReadOnlyContext:function(){return n("getReadOnlyContext")}},b.readyState=e?u:a,_.forEach(function(e){e.call(this)}.bind(b)),_=null,q(e,b)}if(e)return n(e);var r=j.getReadWriteContext();r.guid=N(r),T?r.clear(function(e){if(e)return n(e);S.ensureRootDirectory(r,n)}):S.ensureRootDirectory(r,n)}),F.prototype.promises={},[{name:"open",promises:!0},{name:"access",promises:!0},{name:"chmod",promises:!0},{name:"fchmod"},{name:"chown",promises:!0},{name:"fchown"},{name:"close"},{name:"mknod",promises:!0},{name:"mkdir",promises:!0},{name:"mkdtemp",promises:!0},{name:"rmdir",promises:!0},{name:"stat",promises:!0},{name:"fstat"},{name:"fsync"},{name:"link",promises:!0},{name:"unlink",promises:!0},{name:"read"},{name:"readFile",promises:!0},{name:"write"},{name:"writeFile",promises:!0},{name:"appendFile",promises:!0},{name:"exists"},{name:"lseek"},{name:"readdir",promises:!0},{name:"rename",promises:!0},{name:"readlink",promises:!0},{name:"symlink",promises:!0},{name:"lstat",promises:!0},{name:"truncate",promises:!0},{name:"ftruncate"},{name:"utimes",promises:!0},{name:"futimes"},{name:"setxattr",promises:!0},{name:"getxattr",promises:!0},{name:"fsetxattr"},{name:"fgetxattr"},{name:"removexattr",promises:!0},{name:"fremovexattr"}].forEach(function(e){var r=e.name,t=!0===e.promises;F.prototype[r]=function(){var e=this,n=Array.prototype.slice.call(arguments,0),t=n.length-1,i="function"!=typeof n[t],o=w(n[t]),s=e.queueOrRun(function(){var s=e.provider.openReadWriteContext();if(u===e.readyState){var a=new h.EFILESYSTEMERROR("filesystem unavailable, operation canceled");return o.call(e,a)}function m(){s.close(),o.apply(e,arguments)}i?n.push(m):n[t]=m;var c=[e,s].concat(n);S[r].apply(null,c)});s&&o(s)},t&&(F.prototype.promises[r]=n(F.prototype[r].bind(b)))})}F.providers=p,module.exports=F; },{"es6-promisify":"0c0E","../path.js":"8thZ","../shared.js":"zFPO","../constants.js":"gCho","../providers/index.js":"UCG6","../shell/shell.js":"Kf0M","../../lib/intercom.js":"u7Jv","../fs-watcher.js":"p3D+","../errors.js":"Hmaa","./implementation.js":"HvxC"}],"2u/B":[function(require,module,exports) { var Buffer = require("buffer").Buffer; var e=require("buffer").Buffer;module.exports={FileSystem:require("./filesystem/interface.js"),Buffer:e,Path:require("./path.js"),Errors:require("./errors.js"),Shell:require("./shell/shell.js")}; },{"./filesystem/interface.js":"Q4+W","./path.js":"8thZ","./errors.js":"Hmaa","./shell/shell.js":"Kf0M","buffer":"dskh"}]},{},["2u/B"], "Filer")