filer/dist/filer.min.js

115 lines
275 KiB
JavaScript
Raw Normal View History

<<<<<<< HEAD
<<<<<<< HEAD
2018-06-25 12:27:14 +00:00
/*! filer 0.0.44 2018-06-25 */
2018-05-29 18:03:59 +00:00
!function(a){if("object"==typeof exports&&"undefined"!=typeof module)module.exports=a();else if("function"==typeof define&&define.amd)define([],a);else{var b;b="undefined"!=typeof window?window:"undefined"!=typeof global?global:"undefined"!=typeof self?self:this,b.Filer=a()}}(function(){var a;return function a(b,c,d){function e(g,h){if(!c[g]){if(!b[g]){var i="function"==typeof require&&require;if(!h&&i)return i(g,!0);if(f)return f(g,!0);var j=new Error("Cannot find module '"+g+"'");throw j.code="MODULE_NOT_FOUND",j}var k=c[g]={exports:{}};b[g][0].call(k.exports,function(a){var c=b[g][1][a];return e(c||a)},k,k.exports,a,b,c,d)}return c[g].exports}for(var f="function"==typeof require&&require,g=0;g<d.length;g++)e(d[g]);return e}({1:[function(b,c,d){!function(){var b={};"undefined"!=typeof process&&process.nextTick?(b.nextTick=process.nextTick,"undefined"!=typeof setImmediate?b.setImmediate=function(a){setImmediate(a)}:b.setImmediate=b.nextTick):"function"==typeof setImmediate?(b.nextTick=function(a){setImmediate(a)},b.setImmediate=b.nextTick):(b.nextTick=function(a){setTimeout(a,0)},b.setImmediate=b.nextTick),b.eachSeries=function(a,b,c){if(c=c||function(){},!a.length)return c();var d=0,e=function(){b(a[d],function(b){b?(c(b),c=function(){}):(d+=1,d>=a.length?c():e())})};e()},b.forEachSeries=b.eachSeries,void 0!==a&&a.amd?a([],function(){return b}):void 0!==c&&c.exports?c.exports=b:root.async=b}()},{}],2:[function(a,b,c){function d(a,b){for(var c=b.length-1;c>=0;c--)b[c]===a&&b.splice(c,1);return b}var e=function(){};e.createInterface=function(a){var b={};return b.on=function(b,c){void 0===this[a]&&(this[a]={}),this[a].hasOwnProperty(b)||(this[a][b]=[]),this[a][b].push(c)},b.off=function(b,c){void 0!==this[a]&&this[a].hasOwnProperty(b)&&d(c,this[a][b])},b.trigger=function(b){if(void 0!==this[a]&&this[a].hasOwnProperty(b))for(var c=Array.prototype.slice.call(arguments,1),d=0;d<this[a][b].length;d++)this[a][b][d].apply(this[a][b][d],c)},b.removeAllListeners=function(b){if(void 0!==this[a]){var c=this;c[a][b].forEach(function(a){c.off(b,a)})}},b};var f=e.createInterface("_handlers");e.prototype._on=f.on,e.prototype._off=f.off,e.prototype._trigger=f.trigger;var g=e.createInterface("handlers");e.prototype.on=function(){g.on.apply(this,arguments),Array.prototype.unshift.call(arguments,"on"),this._trigger.apply(this,arguments)},e.prototype.off=g.off,e.prototype.trigger=g.trigger,e.prototype.removeAllListeners=g.removeAllListeners,b.exports=e},{}],3:[function(a,b,c){(function(c){function d(a,b){var c=0;return function(){var d=Date.now();d-c>a&&(c=d,b.apply(this,arguments))}}function e(a,b){if(void 0!==a&&a||(a={}),"object"==typeof b)for(var c in b)b.hasOwnProperty(c)&&(a[c]=b[c]);return a}function f(){var a=this,b=Date.now();this.origin=h(),this.lastMessage=b,this.receivedIDs={},this.previousValues={};var d=function(){a._onStorageEvent.apply(a,arguments)};"undefined"!=typeof document&&(document.attachEvent?document.attachEvent("onstorage",d):c.addEventListener("storage",d,!1))}var g=a("./eventemitter.js"),h=a("../src/shared.js").guid,i=function(a){return void 0===a||void 0===a.localStorage?{getItem:function(){},setItem:function(){},removeItem:function(){}}:a.localStorage}(c);f.prototype._transaction=function(a){function b(){if(!g){var k=Date.now(),m=0|i.getItem(l);if(m&&k-m<d)return h||(f._on("storage",b),h=!0),void(j=setTimeout(b,e));g=!0,i.setItem(l,k),a(),c()}}function c(){h&&f._off("storage",b),j&&clearTimeout(j),i.removeItem(l)}var d=1e3,e=20,f=this,g=!1,h=!1,j=null;b()},f.prototype._cleanup_emit=d(100,function(){this._transaction(function(){var a,b=Date.now(),c=b-m,d=0;try{a=JSON.parse(i.getItem(j)||"[]")}catch(f){a=[]}for(var e=a.length-1;e>=0;e--)a[e].timestamp<c&&(a.splice(e,1),d++);d>0&&i.setItem(j,JSON.stringify(a))})}),f.prototype._cleanup_once=d(100,function(){var a=this;a._transaction(function(){var b,c,d=(Date.now(),0);try{c=JSON.parse(i.getItem(k)||"{}")}catch(e){c={}}for(b in c)a._once_expired(b,c)&&(delete c[b],d++);d>0&&i.setItem(k,JSON.stringify(c))})}),f.prototype._once_expired=function(a,b){if(!b)return!0;if
2018-06-25 12:27:14 +00:00
;this._cache=Object.create(null),this._lruList=Object.create(null),this._mru=0,this._lru=0,this._length=0,this._itemCount=0},d.prototype.dump=function(){return this._cache},d.prototype.dumpLru=function(){return this._lruList},d.prototype.set=function(b,c){if(a(this._cache,b))return this._dispose&&this._dispose(b,this._cache[b].value),this._maxAge&&(this._cache[b].now=Date.now()),this._cache[b].value=c,this.get(b),!0;var d=this._lengthCalculator(c),e=this._maxAge?Date.now():0,f=new j(b,c,this._mru++,d,e);return f.length>this._max?(this._dispose&&this._dispose(b,c),!1):(this._length+=f.length,this._lruList[f.lu]=this._cache[b]=f,this._itemCount++,this._length>this._max&&g(this),!0)},d.prototype.has=function(b){if(!a(this._cache,b))return!1;var c=this._cache[b];return!(this._maxAge&&Date.now()-c.now>this._maxAge)},d.prototype.get=function(a){return e(this,a,!0)},d.prototype.peek=function(a){return e(this,a,!1)},d.prototype.pop=function(){var a=this._lruList[this._lru];return i(this,a),a||null},d.prototype.del=function(a){i(this,this._cache[a])}}()},{}],11:[function(a,b,c){!function(a,b,c,d){function e(a){return a.split("").reduce(function(a,b){return a[b]=!0,a},{})}function f(a,b){return b=b||{},function(c,d,e){return h(c,a,b)}}function g(a,b){a=a||{},b=b||{};var c={};return Object.keys(b).forEach(function(a){c[a]=b[a]}),Object.keys(a).forEach(function(b){c[b]=a[b]}),c}function h(a,b,c){if("string"!=typeof b)throw new TypeError("glob pattern string required");return c||(c={}),!(!c.nocomment&&"#"===b.charAt(0))&&(""===b.trim()?""===a:new i(b,c).match(a))}function i(a,b){if(!(this instanceof i))return new i(a,b,t);if("string"!=typeof a)throw new TypeError("glob pattern string required");b||(b={}),a=a.trim(),"win32"===d&&(a=a.split("\\").join("/"));var c=a+"\n"+v(b),e=h.cache.get(c);if(e)return e;h.cache.set(c,this),this.options=b,this.set=[],this.pattern=a,this.regexp=null,this.negate=!1,this.comment=!1,this.empty=!1,this.make()}function j(){if(!this._made){var a=this.pattern,b=this.options;if(!b.nocomment&&"#"===a.charAt(0))return void(this.comment=!0);if(!a)return void(this.empty=!0);this.parseNegate();var c=this.globSet=this.braceExpand();b.debug&&(this.debug=console.error),this.debug(this.pattern,c),c=this.globParts=c.map(function(a){return a.split(B)}),this.debug(this.pattern,c),c=c.map(function(a,b,c){return a.map(this.parse,this)},this),this.debug(this.pattern,c),c=c.filter(function(a){return-1===a.indexOf(!1)}),this.debug(this.pattern,c),this.set=c}}function k(){var a=this.pattern,b=!1,c=this.options,d=0;if(!c.nonegate){for(var e=0,f=a.length;e<f&&"!"===a.charAt(e);e++)b=!b,d++;d&&(this.pattern=a.substr(d)),this.negate=b}}function l(a,b,c){return c=c||"0",a+="",a.length>=b?a:new Array(b-a.length+1).join(c)+a}function m(a,b){function c(){s.push(w),w=""}if(b=b||this.options,void 0===(a=void 0===a?this.pattern:a))throw new Error("undefined pattern");if(b.nobrace||!a.match(/\{.*\}/))return[a];var d=!1;if("{"!==a.charAt(0)){this.debug(a);for(var e=null,f=0,g=a.length;f<g;f++){var h=a.charAt(f);if(this.debug(f,h),"\\"===h)d=!d;else if("{"===h&&!d){e=a.substr(0,f);break}}if(null===e)return this.debug("no sets"),[a];return m.call(this,a.substr(f),b).map(function(a){return e+a})}var i=a.match(/^\{(-?[0-9]+)\.\.(-?[0-9]+)\}/);if(i){this.debug("numset",i[1],i[2]);for(var j,k=m.call(this,a.substr(i[0].length),b),n=+i[1],o="0"===i[1][0],p=i[1].length,q=+i[2],r=n>q?-1:1,s=[],f=n;f!=q+r;f+=r){j=o?l(f,p):f+"";for(var t=0,u=k.length;t<u;t++)s.push(j+k[t])}return s}var f=1,v=1,s=[],w="",d=!1;this.debug("Entering for");a:for(f=1,g=a.length;f<g;f++){var h=a.charAt(f);if(this.debug("",f,h),d)d=!1,w+="\\"+h;else switch(h){case"\\":d=!0;continue;case"{":v++,w+="{";continue;case"}":if(0===--v){c(),f++;break a}w+=h;continue;case",":1===v?c():w+=h;continue;default:w+=h;continue}}if(0!==v)return this.debug("didn't close",a),m.call(this,"\\"+a,b);this.debug("set",s),this.debug("suffix",a.substr(f));var k=m.call(this,a.substr(f),b),x=1===s.length;this.debug("set pre-expanded",s),s=s.map(function(a){return m.call(this,a,b)},this),this.debug("set
b.getNode(a,g)}function ca(a,b,c,d,e){I(c,e)&&C(b,c,d,e)}function da(a,b,c,d,e){var f=a.openFiles[c];f?D(b,f,d,e):e(new Xa.EBADF)}function ea(a,b,c,d,e,f,g){"function"==typeof f&&(g=f,f=null),I(c,g)&&A(b,c,d,e,f,g)}function fa(a,b,c,d,e,f,g){"function"==typeof f&&(g=f,f=null);var h=a.openFiles[c];h?wa(h.flags).contains(Na)?B(b,h,d,e,f,g):g(new Xa.EBADF("descriptor does not permit writing")):g(new Xa.EBADF)}function ga(a,b,c,d,e){I(c,e)&&E(b,c,d,e)}function ha(a,b,c,d,e){var f=a.openFiles[c];f?wa(f.flags).contains(Na)?F(b,f,d,e):e(new Xa.EBADF("descriptor does not permit writing")):e(new Xa.EBADF)}function ia(a,b,c,d,e,f){function g(a,b){a?f(a):b.size+d<0?f(new Xa.EINVAL("resulting file offset would be negative")):(h.position=b.size+d,f(null,h.position))}var h=a.openFiles[c];h||f(new Xa.EBADF),"SET"===e?d<0?f(new Xa.EINVAL("resulting file offset would be negative")):(h.position=d,f(null,h.position)):"CUR"===e?h.position+d<0?f(new Xa.EINVAL("resulting file offset would be negative")):(h.position+=d,f(null,h.position)):"END"===e?p(b,h,g):f(new Xa.EINVAL("whence argument is not a proper value"))}function ja(a,b,c,d){I(c,d)&&t(b,c,d)}function ka(a,b,c,d,e,f){if(I(c,f)){var g=Date.now();d=d||g,e=e||g,y(b,c,d,e,f)}}function la(a,b,c,d,e,f){var g=Date.now();d=d||g,e=e||g;var h=a.openFiles[c];h?wa(h.flags).contains(Na)?z(b,h,d,e,f):f(new Xa.EBADF("descriptor does not permit writing")):f(new Xa.EBADF)}function ma(a,b,c,d,e){I(c,e)&&(d=Z(d,"mode"))&&$(b,c,d,e)}function na(a,b,c,d,e){if(d=Z(d,"mode")){var f=a.openFiles[c];f?wa(f.flags).contains(Na)?_(b,f,d,e):e(new Xa.EBADF("descriptor does not permit writing")):e(new Xa.EBADF)}}function oa(a,b,c,d,e,f){if(I(c,f))return Y(d)?Y(e)?void aa(b,c,d,e,f):f(new Xa.EINVAL("gid must be a valid integer",e)):f(new Xa.EINVAL("uid must be a valid integer",d))}function pa(a,b,c,d,e,f){if(!Y(d))return f(new Xa.EINVAL("uid must be a valid integer",d));if(!Y(e))return f(new Xa.EINVAL("gid must be a valid integer",e));var g=a.openFiles[c];g?wa(g.flags).contains(Na)?ba(b,g,d,e,f):f(new Xa.EBADF("descriptor does not permit writing")):f(new Xa.EBADF)}function qa(a,b,c,e,g){function h(a,c){a?g(a):(y=c,d(b,e,y,{ctime:D},g))}function i(a){a?g(a):b.getObject(x[C].id,h)}function k(a){a?g(a):(u.id===w.id&&(v=x),delete v[B],b.putObject(u.data,v,i))}function l(a){a?g(a):(x[C]=v[B],b.putObject(w.data,x,k))}function m(a,c){a?g(a):(x=c,wa(x).has(C)?j(b,e,l):l())}function n(a,c){a?g(a):(w=c,b.getObject(w.data,m))}function o(a,c){a?g(a):(v=c,f(b,A,n))}function p(a,c){a?g(a):(u=c,b.getObject(c.data,o))}function q(a){a?g(a):s(b,c,g)}function t(a,d){a?g(a):d.type===Fa?f(b,z,p):r(b,c,e,q)}if(I(c,g)&&I(e,g)){c=ya(c),e=ya(e);var u,v,w,x,y,z=xa.dirname(c),A=xa.dirname(c),B=xa.basename(c),C=xa.basename(e),D=Date.now();f(b,c,t)}}function ra(a,b,c,d,e,f){f=arguments[arguments.length-1],I(c,!0,f)&&I(d,f)&&u(b,c,d,f)}function sa(a,b,c,d){I(c,d)&&v(b,c,d)}function ta(a,b,c,d){function e(b,e){if(b)d(b);else{var f=new ab(c,e,a.name);d(null,f)}}I(c,d)&&q(b,c,e)}function ua(a,b,c,d,e){e=arguments[arguments.length-1],d=d||0,I(c,e)&&w(b,c,d,e)}function va(a,b,c,d,e){e=arguments[arguments.length-1],d=d||0;var f=a.openFiles[c];f?wa(f.flags).contains(Na)?x(b,f,d,e):e(new Xa.EBADF("descriptor does not permit writing")):e(new Xa.EBADF)}var wa=a("../../lib/nodash.js"),xa=a("../path.js"),ya=xa.normalize,za=xa.dirname,Aa=xa.basename,Ba=xa.isAbsolute,Ca=xa.isNull,Da=a("../constants.js"),Ea=Da.NODE_TYPE_FILE,Fa=Da.NODE_TYPE_DIRECTORY,Ga=Da.NODE_TYPE_SYMBOLIC_LINK,Ha=Da.NODE_TYPE_META,Ia=(Da.DEFAULT_FILE_PERMISSIONS,Da.DEFAULT_DIR_PERMISSIONS,Da.FULL_READ_WRITE_EXEC_PERMISSIONS),Ja=Da.ROOT_DIRECTORY_NAME,Ka=Da.SUPER_NODE_ID,La=Da.SYMLOOP_MAX,Ma=Da.O_READ,Na=Da.O_WRITE,Oa=Da.O_CREATE,Pa=Da.O_EXCLUSIVE,Qa=(Da.O_TRUNCATE,Da.O_APPEND),Ra=Da.O_FLAGS,Sa=Da.XATTR_CREATE,Ta=Da.XATTR_REPLACE,Ua=Da.FS_NOMTIME,Va=Da.FS_NOCTIME,Wa=a("../encoding.js"),Xa=a("../errors.js"),Ya=a("../directory-entry.js"),Za=a("../open-file-description.js"),$a=a("../super-node.js"),_a=a("../node.js"),ab=a("../stats.js"),bb=a("../buffer.js"),cb=/^[0-7]+$/;b.exports={ensureRootDi
=======
<<<<<<< HEAD
/*! filer 0.0.44 2017-05-25 */
!function(a){if("object"==typeof exports&&"undefined"!=typeof module)module.exports=a();else if("function"==typeof define&&define.amd)define([],a);else{var b;b="undefined"!=typeof window?window:"undefined"!=typeof global?global:"undefined"!=typeof self?self:this,b.Filer=a()}}(function(){var a;return function b(a,c,d){function e(g,h){if(!c[g]){if(!a[g]){var i="function"==typeof require&&require;if(!h&&i)return i(g,!0);if(f)return f(g,!0);var j=new Error("Cannot find module '"+g+"'");throw j.code="MODULE_NOT_FOUND",j}var k=c[g]={exports:{}};a[g][0].call(k.exports,function(b){var c=a[g][1][b];return e(c?c:b)},k,k.exports,b,a,c,d)}return c[g].exports}for(var f="function"==typeof require&&require,g=0;g<d.length;g++)e(d[g]);return e}({1:[function(b,c,d){!function(){var b={};"undefined"!=typeof process&&process.nextTick?(b.nextTick=process.nextTick,"undefined"!=typeof setImmediate?b.setImmediate=function(a){setImmediate(a)}:b.setImmediate=b.nextTick):"function"==typeof setImmediate?(b.nextTick=function(a){setImmediate(a)},b.setImmediate=b.nextTick):(b.nextTick=function(a){setTimeout(a,0)},b.setImmediate=b.nextTick),b.eachSeries=function(a,b,c){if(c=c||function(){},!a.length)return c();var d=0,e=function(){b(a[d],function(b){b?(c(b),c=function(){}):(d+=1,d>=a.length?c():e())})};e()},b.forEachSeries=b.eachSeries,"undefined"!=typeof a&&a.amd?a([],function(){return b}):"undefined"!=typeof c&&c.exports?c.exports=b:root.async=b}()},{}],2:[function(a,b,c){function d(a,b){for(var c=b.length-1;c>=0;c--)b[c]===a&&b.splice(c,1);return b}var e=function(){};e.createInterface=function(a){var b={};return b.on=function(b,c){"undefined"==typeof this[a]&&(this[a]={}),this[a].hasOwnProperty(b)||(this[a][b]=[]),this[a][b].push(c)},b.off=function(b,c){"undefined"!=typeof this[a]&&this[a].hasOwnProperty(b)&&d(c,this[a][b])},b.trigger=function(b){if("undefined"!=typeof this[a]&&this[a].hasOwnProperty(b))for(var c=Array.prototype.slice.call(arguments,1),d=0;d<this[a][b].length;d++)this[a][b][d].apply(this[a][b][d],c)},b.removeAllListeners=function(b){if("undefined"!=typeof this[a]){var c=this;c[a][b].forEach(function(a){c.off(b,a)})}},b};var f=e.createInterface("_handlers");e.prototype._on=f.on,e.prototype._off=f.off,e.prototype._trigger=f.trigger;var g=e.createInterface("handlers");e.prototype.on=function(){g.on.apply(this,arguments),Array.prototype.unshift.call(arguments,"on"),this._trigger.apply(this,arguments)},e.prototype.off=g.off,e.prototype.trigger=g.trigger,e.prototype.removeAllListeners=g.removeAllListeners,b.exports=e},{}],3:[function(a,b,c){(function(c){function d(a,b){var c=0;return function(){var d=Date.now();d-c>a&&(c=d,b.apply(this,arguments))}}function e(a,b){if("undefined"!=typeof a&&a||(a={}),"object"==typeof b)for(var c in b)b.hasOwnProperty(c)&&(a[c]=b[c]);return a}function f(){var a=this,b=Date.now();this.origin=h(),this.lastMessage=b,this.receivedIDs={},this.previousValues={};var d=function(){a._onStorageEvent.apply(a,arguments)};"undefined"!=typeof document&&(document.attachEvent?document.attachEvent("onstorage",d):c.addEventListener("storage",d,!1))}var g=a("./eventemitter.js"),h=a("../src/shared.js").guid,i=function(a){return"undefined"==typeof a||"undefined"==typeof a.localStorage?{getItem:function(){},setItem:function(){},removeItem:function(){}}:a.localStorage}(c);f.prototype._transaction=function(a){function b(){if(!g){var k=Date.now(),m=0|i.getItem(l);if(m&&d>k-m)return h||(f._on("storage",b),h=!0),void(j=setTimeout(b,e));g=!0,i.setItem(l,k),a(),c()}}function c(){h&&f._off("storage",b),j&&clearTimeout(j),i.removeItem(l)}var d=1e3,e=20,f=this,g=!1,h=!1,j=null;b()},f.prototype._cleanup_emit=d(100,function(){var a=this;a._transaction(function(){var a,b=Date.now(),c=b-m,d=0;try{a=JSON.parse(i.getItem(j)||"[]")}catch(e){a=[]}for(var f=a.length-1;f>=0;f--)a[f].timestamp<c&&(a.splice(f,1),d++);d>0&&i.setItem(j,JSON.stringify(a))})}),f.prototype._cleanup_once=d(100,function(){var a=this;a._transaction(function(){var b,c,d=(Date.now(),0);try{c=JSON.parse(i.getItem(k)||"{}")}catch(e){c={}}for(b in c)a._once_expired(b,c)&&(delete
var h=a.charAt(f);if(this.debug(f,h),"\\"===h)d=!d;else if("{"===h&&!d){e=a.substr(0,f);break}}if(null===e)return this.debug("no sets"),[a];var i=m.call(this,a.substr(f),b);return i.map(function(a){return e+a})}var j=a.match(/^\{(-?[0-9]+)\.\.(-?[0-9]+)\}/);if(j){this.debug("numset",j[1],j[2]);for(var k,n=m.call(this,a.substr(j[0].length),b),o=+j[1],p="0"===j[1][0],q=j[1].length,r=+j[2],s=o>r?-1:1,t=[],f=o;f!=r+s;f+=s){k=p?l(f,q):f+"";for(var u=0,v=n.length;v>u;u++)t.push(k+n[u])}return t}var f=1,w=1,t=[],x="",d=!1;this.debug("Entering for");a:for(f=1,g=a.length;g>f;f++){var h=a.charAt(f);if(this.debug("",f,h),d)d=!1,x+="\\"+h;else switch(h){case"\\":d=!0;continue;case"{":w++,x+="{";continue;case"}":if(w--,0===w){c(),f++;break a}x+=h;continue;case",":1===w?c():x+=h;continue;default:x+=h;continue}}if(0!==w)return this.debug("didn't close",a),m.call(this,"\\"+a,b);this.debug("set",t),this.debug("suffix",a.substr(f));var n=m.call(this,a.substr(f),b),y=1===t.length;this.debug("set pre-expanded",t),t=t.map(function(a){return m.call(this,a,b)},this),this.debug("set expanded",t),t=t.reduce(function(a,b){return a.concat(b)}),y&&(t=t.map(function(a){return"{"+a+"}"}));for(var z=[],f=0,g=t.length;g>f;f++)for(var u=0,v=n.length;v>u;u++)z.push(t[f]+n[u]);return z}function n(a,b){function c(){if(f){switch(f){case"*":h+=x,i=!0;break;case"?":h+=w,i=!0;break;default:h+="\\"+f}p.debug("clearStateChar %j %j",f,h),f=!1}}var d=this.options;if(!d.noglobstar&&"**"===a)return u;if(""===a)return"";for(var e,f,g,h="",i=!!d.nocase,j=!1,k=[],l=!1,m=-1,n=-1,o="."===a.charAt(0)?"":d.dot?"(?!(?:^|\\/)\\.{1,2}(?:$|\\/))":"(?!\\.)",p=this,r=0,s=a.length;s>r&&(g=a.charAt(r));r++)if(this.debug("%s %s %s %j",a,r,h,g),j&&A[g])h+="\\"+g,j=!1;else switch(g){case"/":return!1;case"\\":c(),j=!0;continue;case"?":case"*":case"+":case"@":case"!":if(this.debug("%s %s %s %j <-- stateChar",a,r,h,g),l){this.debug(" in class"),"!"===g&&r===n+1&&(g="^"),h+=g;continue}p.debug("call clearStateChar %j",f),c(),f=g,d.noext&&c();continue;case"(":if(l){h+="(";continue}if(!f){h+="\\(";continue}e=f,k.push({type:e,start:r-1,reStart:h.length}),h+="!"===f?"(?:(?!":"(?:",this.debug("plType %j %j",f,h),f=!1;continue;case")":if(l||!k.length){h+="\\)";continue}switch(c(),i=!0,h+=")",e=k.pop().type){case"!":h+="[^/]*?)";break;case"?":case"+":case"*":h+=e;case"@":}continue;case"|":if(l||!k.length||j){h+="\\|",j=!1;continue}c(),h+="|";continue;case"[":if(c(),l){h+="\\"+g;continue}l=!0,n=r,m=h.length,h+=g;continue;case"]":if(r===n+1||!l){h+="\\"+g,j=!1;continue}i=!0,l=!1,h+=g;continue;default:c(),j?j=!1:!A[g]||"^"===g&&l||(h+="\\"),h+=g}if(l){var t=a.substr(n+1),v=this.parse(t,C);h=h.substr(0,m)+"\\["+v[0],i=i||v[1]}for(var y;y=k.pop();){var z=h.slice(y.reStart+3);z=z.replace(/((?:\\{2})*)(\\?)\|/g,function(a,b,c){return c||(c="\\"),b+b+c+"|"}),this.debug("tail=%j\n %s",z,z);var B="*"===y.type?x:"?"===y.type?w:"\\"+y.type;i=!0,h=h.slice(0,y.reStart)+B+"\\("+z}c(),j&&(h+="\\\\");var D=!1;switch(h.charAt(0)){case".":case"[":case"(":D=!0}if(""!==h&&i&&(h="(?=.)"+h),D&&(h=o+h),b===C)return[h,i];if(!i)return q(a);var E=d.nocase?"i":"",F=new RegExp("^"+h+"$",E);return F._glob=a,F._src=h,F}function o(){if(this.regexp||this.regexp===!1)return this.regexp;var a=this.set;if(!a.length)return this.regexp=!1;var b=this.options,c=b.noglobstar?x:b.dot?y:z,d=b.nocase?"i":"",e=a.map(function(a){return a.map(function(a){return a===u?c:"string"==typeof a?r(a):a._src}).join("\\/")}).join("|");e="^(?:"+e+")$",this.negate&&(e="^(?!"+e+").*$");try{return this.regexp=new RegExp(e,d)}catch(f){return this.regexp=!1}}function p(a,b){if(this.debug("match",a,this.pattern),this.comment)return!1;if(this.empty)return""===a;if("/"===a&&b)return!0;var c=this.options;"win32"===d&&(a=a.split("\\").join("/")),a=a.split(B),this.debug(this.pattern,"split",a);var e=this.set;this.debug(this.pattern,"set",e);for(var f,g=a.length-1;g>=0&&!(f=a[g]);g--);for(var g=0,h=e.length;h>g;g++){var i=e[g],j=a;c.matchBase&&1===i.length&&(j=[f]);var k=this.matchOne(j,i,b);if(k)return c.flipNegate?!0:!this.negate}return c.flipNegate?!1:this.
ta.O_APPEND),Ga=ta.O_FLAGS,Ha=ta.XATTR_CREATE,Ia=ta.XATTR_REPLACE,Ja=ta.FS_NOMTIME,Ka=ta.FS_NOCTIME,La=a("../encoding.js"),Ma=a("../errors.js"),Na=a("../directory-entry.js"),Oa=a("../open-file-description.js"),Pa=a("../super-node.js"),Qa=a("../node.js"),Ra=a("../stats.js"),Sa=a("../buffer.js");b.exports={ensureRootDirectory:h,open:J,close:K,mknod:L,mkdir:M,rmdir:N,unlink:R,stat:O,fstat:P,link:Q,read:S,readFile:T,write:U,writeFile:V,appendFile:W,exists:X,getxattr:Y,fgetxattr:Z,setxattr:$,fsetxattr:_,removexattr:aa,fremovexattr:ba,lseek:ca,readdir:da,utimes:ea,futimes:fa,rename:ga,symlink:ha,readlink:ia,lstat:ja,truncate:ka,ftruncate:la}},{"../../lib/nodash.js":4,"../buffer.js":14,"../constants.js":15,"../directory-entry.js":16,"../encoding.js":17,"../errors.js":18,"../node.js":23,"../open-file-description.js":24,"../path.js":25,"../stats.js":33,"../super-node.js":34}],20:[function(a,b,c){function d(a){return"function"==typeof a?a:function(a){if(a)throw a}}function e(a){a&&console.error("Filer error: ",a)}function f(a,b){function c(){I.forEach(function(a){a.call(this)}.bind(F)),I=null}function d(a){return function(b){function c(b){var d=B();a.getObject(d,function(a,e){return a?void b(a):void(e?c(b):b(null,d))})}return g(j).contains(p)?void b(null,B()):void c(b)}}function f(a){if(a.length){var b=s.getInstance();a.forEach(function(a){b.emit(a.event,a.path)})}}a=a||{},b=b||e;var j=a.flags,B=a.guid?a.guid:v,C=a.provider||new q.Default(a.name||k),D=a.name||C.name,E=g(j).contains(l),F=this;F.readyState=n,F.name=D,F.error=null,F.stdin=w,F.stdout=x,F.stderr=y,this.Shell=r.bind(void 0,this);var G={},H=z;Object.defineProperty(this,"openFiles",{get:function(){return G}}),this.allocDescriptor=function(a){var b=H++;return G[b]=a,b},this.releaseDescriptor=function(a){delete G[a]};var I=[];this.queueOrRun=function(a){var b;return m==F.readyState?a.call(F):o==F.readyState?b=new u.EFILESYSTEMERROR("unknown error"):I.push(a),b},this.watch=function(a,b,c){if(h(a))throw new Error("Path must be a string without null bytes.");"function"==typeof b&&(c=b,b={}),b=b||{},c=c||i;var d=new t;return d.start(a,!1,b.recursive),d.on("change",c),d},C.open(function(a){function e(a){function e(a){var b=C[a]();return b.flags=j,b.changes=[],b.guid=d(b),b.close=function(){var a=b.changes;f(a),a.length=0},b}F.provider={openReadWriteContext:function(){return e("getReadWriteContext")},openReadOnlyContext:function(){return e("getReadOnlyContext")}},a?F.readyState=o:F.readyState=m,c(),b(a,F)}if(a)return e(a);var g=C.getReadWriteContext();g.guid=d(g),E?g.clear(function(a){return a?e(a):void A.ensureRootDirectory(g,e)}):A.ensureRootDirectory(g,e)})}var g=a("../../lib/nodash.js"),h=a("../path.js").isNull,i=a("../shared.js").nop,j=a("../constants.js"),k=j.FILE_SYSTEM_NAME,l=j.FS_FORMAT,m=j.FS_READY,n=j.FS_PENDING,o=j.FS_ERROR,p=j.FS_NODUPEIDCHECK,q=a("../providers/index.js"),r=a("../shell/shell.js"),s=a("../../lib/intercom.js"),t=a("../fs-watcher.js"),u=a("../errors.js"),v=a("../shared.js").guid,w=j.STDIN,x=j.STDOUT,y=j.STDERR,z=j.FIRST_DESCRIPTOR,A=a("./implementation.js");f.providers=q,["open","close","mknod","mkdir","rmdir","stat","fstat","link","unlink","read","readFile","write","writeFile","appendFile","exists","lseek","readdir","rename","readlink","symlink","lstat","truncate","ftruncate","utimes","futimes","setxattr","getxattr","fsetxattr","fgetxattr","removexattr","fremovexattr"].forEach(function(a){f.prototype[a]=function(){var b=this,c=Array.prototype.slice.call(arguments,0),e=c.length-1,f="function"!=typeof c[e],g=d(c[e]),h=b.queueOrRun(function(){function d(){h.close(),g.apply(b,arguments)}var h=b.provider.openReadWriteContext();if(o===b.readyState){var i=new u.EFILESYSTEMERROR("filesystem unavailable, operation canceled");return g.call(b,i)}f?c.push(d):c[e]=d;var j=[b,h].concat(c);A[a].apply(null,j)});h&&g(h)}}),b.exports=f},{"../../lib/intercom.js":3,"../../lib/nodash.js":4,"../constants.js":15,"../errors.js":18,"../fs-watcher.js":21,"../path.js":25,"../providers/index.js":26,"../shared.js":30,"../shell/shell.js":32,"./implementation.js":19}],21:[function(
=======
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};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;f<n.length;f++)u(n[f]);if(n.length){var c=u(n[n.length-1]);"object"==typeof exports&&"undefined"!=typeof module?module.exports=c:"function"==typeof define&&define.amd?define(function(){return c}):t&&(this[t]=c)}return u}({13:[function(require,module,exports) {
=======
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};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;f<n.length;f++)u(n[f]);if(n.length){var c=u(n[n.length-1]);"object"==typeof exports&&"undefined"!=typeof module?module.exports=c:"function"==typeof define&&define.amd?define(function(){return c}):t&&(this[t]=c)}return u}({14:[function(require,module,exports) {
>>>>>>> Fix tests so they work and pass with Parcel.js, updated outdated, remove .babelrc
var n="function"==typeof Symbol&&"symbol"==typeof Symbol.iterator?function(n){return typeof n}:function(n){return n&&"function"==typeof Symbol&&n.constructor===Symbol&&n!==Symbol.prototype?"symbol":typeof n},t=Array.prototype,r=t.forEach,e=t.indexOf,o=t.some,u=Object.prototype,l=u.hasOwnProperty,f=Object.keys,i={};function c(n,t){return l.call(n,t)}var a=f||function(n){if(n!==Object(n))throw new TypeError("Invalid object");var t=[];for(var r in n)c(n,r)&&t.push(r);return t};function y(n){return null==n?0:n.length===+n.length?n.length:a(n).length}function p(n){return n}function s(n,t,e){var o,u;if(null!=n)if(r&&n.forEach===r)n.forEach(t,e);else if(n.length===+n.length){for(o=0,u=n.length;o<u;o++)if(t.call(e,n[o],o,n)===i)return}else{var l=l(n);for(o=0,u=l.length;o<u;o++)if(t.call(e,n[l[o]],l[o],n)===i)return}}function h(n,t,r){t||(t=p);var e=!1;return null==n?e:o&&n.some===o?n.some(t,r):(s(n,function(n,o,u){if(e||(e=t.call(r,n,o,u)))return i}),!!e)}function v(n,t){return null!=n&&(e&&n.indexOf===e?-1!=n.indexOf(t):h(n,function(n){return n===t}))}function b(n){this.value=n}function m(t){return t&&"object"==(void 0===t?"undefined":n(t))&&!Array.isArray(t)&&l.call(t,"__wrapped__")?t:new b(t)}b.prototype.has=function(n){return c(this.value,n)},b.prototype.contains=function(n){return v(this.value,n)},b.prototype.size=function(){return y(this.value)},module.exports=m;
},{}],4:[function(require,module,exports) {
function r(r,n){for(var t=0,e=r.length-1;e>=0;e--){var i=r[e];"."===i?r.splice(e,1):".."===i?(r.splice(e,1),t++):t&&(r.splice(e,1),t--)}if(n)for(;t--;t)r.unshift("..");return r}var n=/^(\/?)([\s\S]+\/(?!$)|\/)?((?:\.{1,2}$|[\s\S]+?)?(\.[^.\/]*)?)$/,t=function(r){var t=n.exec(r);return[t[1]||"",t[2]||"",t[3]||"",t[4]||""]};function e(){for(var n="",t=!1,e=arguments.length-1;e>=-1&&!t;e--){var i=e>=0?arguments[e]:"/";"string"==typeof i&&i&&(n=i+"/"+n,t="/"===i.charAt(0))}return(t?"/":"")+(n=r(n.split("/").filter(function(r){return!!r}),!t).join("/"))||"."}function i(n){var t="/"===n.charAt(0);n.substr(-1);return(n=r(n.split("/").filter(function(r){return!!r}),!t).join("/"))||t||(n="."),(t?"/":"")+n}function u(){return i(Array.prototype.slice.call(arguments,0).filter(function(r,n){return r&&"string"==typeof r}).join("/"))}function o(r,n){function t(r){for(var n=0;n<r.length&&""===r[n];n++);for(var t=r.length-1;t>=0&&""===r[t];t--);return n>t?[]:r.slice(n,t-n+1)}r=e(r).substr(1),n=e(n).substr(1);for(var i=t(r.split("/")),u=t(n.split("/")),o=Math.min(i.length,u.length),l=o,s=0;s<o;s++)if(i[s]!==u[s]){l=s;break}var f=[];for(s=l;s<i.length;s++)f.push("..");return(f=f.concat(u.slice(l))).join("/")}function l(r){var n=t(r),e=n[0],i=n[1];return e||i?(i&&(i=i.substr(0,i.length-1)),e+i):"."}function s(r,n){var e=t(r)[2];return n&&e.substr(-1*n.length)===n&&(e=e.substr(0,e.length-n.length)),""===e?"/":e}function f(r){return t(r)[3]}function a(r){return"/"===r.charAt(0)}function c(r){return-1!==(""+r).indexOf("\0")}function h(r){return r.replace(/\/*$/,"/")}function p(r){return""===(r=r.replace(/\/*$/,""))?"/":r}module.exports={normalize:i,resolve:e,join:u,relative:o,sep:"/",delimiter:":",dirname:l,basename:s,extname:f,isAbsolute:a,isNull:c,addTrailing:h,removeTrailing:p};
},{}],15:[function(require,module,exports) {
function x(){return"xxxxxxxx-xxxx-4xxx-yxxx-xxxxxxxxxxxx".replace(/[xy]/g,function(x){var r=16*Math.random()|0;return("x"==x?r:3&r|8).toString(16)}).toUpperCase()}function r(){}function n(x){for(var r=[],n=x.length,t=0;t<n;t++)r[t]=x[t];return r}module.exports={guid:x,u8toArray:n,nop:r};
},{}],16:[function(require,module,exports) {
var E="READ",R="WRITE",_="CREATE",T="EXCLUSIVE",O="TRUNCATE",I="APPEND",S="CREATE",D="REPLACE";module.exports={FILE_SYSTEM_NAME:"local",FILE_STORE_NAME:"files",IDB_RO:"readonly",IDB_RW:"readwrite",WSQL_VERSION:"1",WSQL_SIZE:5242880,WSQL_DESC:"FileSystem Storage",MODE_FILE:"FILE",MODE_DIRECTORY:"DIRECTORY",MODE_SYMBOLIC_LINK:"SYMLINK",MODE_META:"META",SYMLOOP_MAX:10,BINARY_MIME_TYPE:"application/octet-stream",JSON_MIME_TYPE:"application/json",ROOT_DIRECTORY_NAME:"/",FS_FORMAT:"FORMAT",FS_NOCTIME:"NOCTIME",FS_NOMTIME:"NOMTIME",FS_NODUPEIDCHECK:"FS_NODUPEIDCHECK",O_READ:E,O_WRITE:R,O_CREATE:_,O_EXCLUSIVE:T,O_TRUNCATE:O,O_APPEND:I,O_FLAGS:{r:[E],"r+":[E,R],w:[R,_,O],"w+":[R,E,_,O],wx:[R,_,T,O],"wx+":[R,E,_,T,O],a:[R,_,I],"a+":[R,E,_,I],ax:[R,_,T,I],"ax+":[R,E,_,T,I]},XATTR_CREATE:S,XATTR_REPLACE:D,FS_READY:"READY",FS_PENDING:"PENDING",FS_ERROR:"ERROR",SUPER_NODE_ID:"00000000-0000-0000-0000-000000000000",STDIN:0,STDOUT:1,STDERR:2,FIRST_DESCRIPTOR:3,ENVIRONMENT:{TMP:"/tmp",PATH:""}};
},{}],5:[function(require,module,exports) {
var t={};["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;
},{}],37:[function(require,module,exports) {
"use strict";exports.byteLength=u,exports.toByteArray=i,exports.fromByteArray=d;for(var r=[],t=[],e="undefined"!=typeof Uint8Array?Uint8Array:Array,n="ABCDEFGHIJKLMNOPQRSTUVWXYZabcdefghijklmnopqrstuvwxyz0123456789+/",o=0,a=n.length;o<a;++o)r[o]=n[o],t[n.charCodeAt(o)]=o;function h(r){var t=r.length;if(t%4>0)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<A;d+=4)n=t[r.charCodeAt(d)]<<18|t[r.charCodeAt(d+1)]<<12|t[r.charCodeAt(d+2)]<<6|t[r.charCodeAt(d+3)],i[f++]=n>>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;a<e;a+=3)n=(r[a]<<16&16711680)+(r[a+1]<<8&65280)+(255&r[a+2]),o.push(f(n));return o.join("")}function d(t){for(var e,n=t.length,o=n%3,a=[],h=0,u=n-o;h<u;h+=16383)a.push(A(t,h,h+16383>u?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;
},{}],38:[function(require,module,exports) {
exports.read=function(a,o,t,r,h){var M,p,w=8*h-r-1,f=(1<<w)-1,e=f>>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<<e)-1,N=i>>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<<h|w,e+=h;e>0;a[t+s]=255&p,s+=u,p/=256,e-=8);a[t+s-u]|=128*l};
},{}],39:[function(require,module,exports) {
var r={}.toString;module.exports=Array.isArray||function(t){return"[object Array]"==r.call(t)};
},{}],13:[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(t){return!1}}function o(){return f.TYPED_ARRAY_SUPPORT?2147483647:1073741823}function u(t,r){if(o()<r)throw new RangeError("Invalid typed array length");return f.TYPED_ARRAY_SUPPORT?(t=new Uint8Array(r)).__proto__=f.prototype:(null===t&&(t=new f(r)),t.length=r),t}function f(t,r,e){if(!(f.TYPED_ARRAY_SUPPORT||this instanceof f))return new f(t,r,e);if("number"==typeof t){if("string"==typeof r)throw new Error("If encoding is specified then the first argument must be a string");return c(this,t)}return s(this,t,r,e)}function s(t,r,e,n){if("number"==typeof r)throw new TypeError('"value" argument must not be a number');return"undefined"!=typeof ArrayBuffer&&r instanceof ArrayBuffer?g(t,r,e,n):"string"==typeof r?l(t,r,e):y(t,r)}function h(t){if("number"!=typeof t)throw new TypeError('"size" argument must be a number');if(t<0)throw new RangeError('"size" argument must not be negative')}function a(t,r,e,n){return h(r),r<=0?u(t,r):void 0!==e?"string"==typeof n?u(t,r).fill(e,n):u(t,r).fill(e):u(t,r)}function c(t,r){if(h(r),t=u(t,r<0?0:0|w(r)),!f.TYPED_ARRAY_SUPPORT)for(var e=0;e<r;++e)t[e]=0;return t}function l(t,r,e){if("string"==typeof e&&""!==e||(e="utf8"),!f.isEncoding(e))throw new TypeError('"encoding" must be a valid string encoding');var n=0|v(r,e),i=(t=u(t,n)).write(r,e);return i!==n&&(t=t.slice(0,i)),t}function p(t,r){var e=r.length<0?0:0|w(r.length);t=u(t,e);for(var n=0;n<e;n+=1)t[n]=255&r[n];return t}function g(t,r,e,n){if(r.byteLength,e<0||r.byteLength<e)throw new RangeError("'offset' is out of bounds");if(r.byteLength<e+(n||0))throw new RangeError("'length' is out of bounds");return r=void 0===e&&void 0===n?new Uint8Array(r):void 0===n?new Uint8Array(r,e):new Uint8Array(r,e,n),f.TYPED_ARRAY_SUPPORT?(t=r).__proto__=f.prototype:t=p(t,r),t}function y(t,r){if(f.isBuffer(r)){var e=0|w(r.length);return 0===(t=u(t,e)).length?t:(r.copy(t,0,0,e),t)}if(r){if("undefined"!=typeof ArrayBuffer&&r.buffer instanceof ArrayBuffer||"length"in r)return"number"!=typeof r.length||W(r.length)?u(t,0):p(t,r);if("Buffer"===r.type&&n(r.data))return p(t,r.data)}throw new TypeError("First argument must be a string, Buffer, ArrayBuffer, Array, or array-like object.")}function w(t){if(t>=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.
},{"base64-js":37,"ieee754":38,"isarray":39,"buffer":13}],3:[function(require,module,exports) {
var Buffer = require("buffer").Buffer;
var r=require("buffer").Buffer;function e(e,t,o){return e instanceof ArrayBuffer&&(e=new Uint8Array(e)),new r(e,t,o)}e.prototype=Object.create(r.prototype),e.prototype.constructor=e,Object.keys(r).forEach(function(t){r.hasOwnProperty(t)&&(e[t]=r[t])}),module.exports=e;
},{"buffer":13}],55:[function(require,module,exports) {
var global = arguments[3];
var t=arguments[3],e=require("../constants.js").FILE_SYSTEM_NAME,r=require("../constants.js").FILE_STORE_NAME,n=require("../constants.js").IDB_RW,o=require("../constants.js").IDB_RO,u=require("../errors.js"),c=require("../buffer.js"),i=t.indexedDB||t.mozIndexedDB||t.webkitIndexedDB||t.msIndexedDB;function s(t,e){this.db=t,this.mode=e}function a(t){this.name=t||e,this.db=null}s.prototype._getObjectStore=function(){if(this.objectStore)return this.objectStore;var t=this.db.transaction(r,this.mode);return this.objectStore=t.objectStore(r),this.objectStore},s.prototype.clear=function(t){try{var e=this._getObjectStore().clear();e.onsuccess=function(){t()},e.onerror=function(e){e.preventDefault(),t(e.error)}}catch(e){t(e)}},s.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(t){e(t)}},s.prototype.getObject=function(t,e){this._get(t,e)},s.prototype.getBuffer=function(t,e){this._get(t,function(t,r){if(t)return e(t);e(null,new c(r))})},s.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(t){r(t)}},s.prototype.putObject=function(t,e,r){this._put(t,e,r)},s.prototype.putBuffer=function(t,e,r){var n=e.buffer;this._put(t,n,r)},s.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(t){e(t)}},a.isSupported=function(){return!!i},a.prototype.open=function(t){var e=this;if(e.db)return t();try{var n=i.open(e.name);n.onupgradeneeded=function(t){var e=t.target.result;e.objectStoreNames.contains(r)&&e.deleteObjectStore(r),e.createObjectStore(r)},n.onsuccess=function(r){e.db=r.target.result,t()},n.onerror=function(e){e.preventDefault(),t(e.error)}}catch(e){t(e)}},a.prototype.getReadOnlyContext=function(){return new s(this.db,o)},a.prototype.getReadWriteContext=function(){return new s(this.db,n)},module.exports=a;
},{"../constants.js":16,"../errors.js":5,"../buffer.js":3}],69:[function(require,module,exports) {
!function(){"use strict";for(var r="ABCDEFGHIJKLMNOPQRSTUVWXYZabcdefghijklmnopqrstuvwxyz0123456789+/",e=new Uint8Array(256),t=0;t<r.length;t++)e[r.charCodeAt(t)]=t;exports.encode=function(e){var t,n=new Uint8Array(e),o=n.length,a="";for(t=0;t<o;t+=3)a+=r[n[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<g;t+=4)n=e[r.charCodeAt(t)],o=e[r.charCodeAt(t+1)],a=e[r.charCodeAt(t+2)],h=e[r.charCodeAt(t+3)],A[i++]=n<<2|o>>4,A[i++]=(15&o)<<4|a>>2,A[i++]=(3&a)<<6|63&h;return u}}();
},{}],56:[function(require,module,exports) {
var global = arguments[3];
var t=arguments[3],n=require("../constants.js").FILE_SYSTEM_NAME,e=require("../constants.js").FILE_STORE_NAME,i=require("../constants.js").WSQL_VERSION,o=require("../constants.js").WSQL_SIZE,r=require("../constants.js").WSQL_DESC,u=require("../errors.js"),a=require("../buffer.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,i){function o(t,n){var e=0===n.rows.length?null:n.rows.item(0).data;i(null,e)}function r(t,n){i(n)}t(function(t){t.executeSql("SELECT data FROM "+e+" WHERE id = ? LIMIT 1;",[n],o,r)})}function E(t,n,i,o){function r(t,n){o(null)}function u(t,n){o(n)}t(function(t){t.executeSql("INSERT OR REPLACE INTO "+e+" (id, data) VALUES (?, ?);",[n,i],r,u)})}function d(t){this.name=t||n,this.db=null}s.prototype.clear=function(t){function n(n,e){t(e)}function i(n,e){t(null)}this.getTransaction(function(t){t.executeSql("DELETE FROM "+e+";",[],i,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(t){return n(t)}n(null,e)})},s.prototype.getBuffer=function(t,n){f(this.getTransaction,t,function(t,e){if(t)return n(t);if(e||""===e){var i=c.decode(e);e=new a(i)}n(null,e)})},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 i(t,e){n(null)}function o(t,e){n(e)}this.getTransaction(function(n){n.executeSql("DELETE FROM "+e+" WHERE id = ?;",[t],i,o)})},d.isSupported=function(){return!!t.openDatabase},d.prototype.open=function(n){var a=this;if(a.db)return n();var c=t.openDatabase(a.name,i,r,o);function s(t,e){5===e.code&&n(new u.EINVAL("WebSQL cannot be accessed. If private browsing is enabled, disable it.")),n(e)}function f(t,e){a.db=c,n()}c?c.transaction(function(t){t.executeSql("CREATE TABLE IF NOT EXISTS "+e+" (id unique, data TEXT);",[],function(t){t.executeSql("CREATE INDEX IF NOT EXISTS idx_"+e+"_id on "+e+" (id);",[],f,s)},s)}):n("[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":16,"../errors.js":5,"../buffer.js":3,"base64-arraybuffer":69}],46:[function(require,module,exports) {
var t,e,n=module.exports={};function r(){throw new Error("setTimeout has not been defined")}function o(){throw new Error("clearTimeout has not been defined")}function i(e){if(t===setTimeout)return setTimeout(e,0);if((t===r||!t)&&setTimeout)return t=setTimeout,setTimeout(e,0);try{return t(e,0)}catch(n){try{return t.call(null,e,0)}catch(n){return t.call(this,e,0)}}}function u(t){if(e===clearTimeout)return clearTimeout(t);if((e===o||!e)&&clearTimeout)return e=clearTimeout,clearTimeout(t);try{return e(t)}catch(n){try{return e.call(null,t)}catch(n){return e.call(this,t)}}}!function(){try{t="function"==typeof setTimeout?setTimeout:r}catch(e){t=r}try{e="function"==typeof clearTimeout?clearTimeout:o}catch(t){e=o}}();var c,s=[],l=!1,a=-1;function f(){l&&c&&(l=!1,c.length?s=c.concat(s):a=-1,s.length&&h())}function h(){if(!l){var t=i(f);l=!0;for(var e=s.length;e;){for(c=s,s=[];++a<e;)c&&c[a].run();a=-1,e=s.length}c=null,l=!1,u(t)}}function m(t,e){this.fun=t,this.array=e}function p(){}n.nextTick=function(t){var e=new Array(arguments.length-1);if(arguments.length>1)for(var n=1;n<arguments.length;n++)e[n-1]=arguments[n];s.push(new m(t,e)),1!==s.length||l||i(h)},m.prototype.run=function(){this.fun.apply(null,this.array)},n.title="browser",n.browser=!0,n.env={},n.argv=[],n.version="",n.versions={},n.on=p,n.addListener=p,n.once=p,n.off=p,n.removeListener=p,n.removeAllListeners=p,n.emit=p,n.prependListener=p,n.prependOnceListener=p,n.listeners=function(t){return[]},n.binding=function(t){throw new Error("process.binding is not supported")},n.cwd=function(){return"/"},n.chdir=function(t){throw new Error("process.chdir is not supported")},n.umask=function(){return 0};
},{}],21:[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":46}],57:[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":16,"../../lib/async.js":21}],19:[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":55,"./websql.js":56,"./memory.js":57}],24:[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":16}],22:[function(require,module,exports) {
var Buffer = require("buffer").Buffer;
var e=require("buffer").Buffer;function r(e){return e.toString("utf8")}function u(r){return new e(r,"utf8")}module.exports={encode:u,decode:r};
},{"buffer":13}],43:[function(require,module,exports) {
var process = require("process");
var r=require("process");function t(r,t){for(var e=0,n=r.length-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<r.length;n++)t(r[n],n,r)&&e.push(r[n]);return e}exports.resolve=function(){for(var e="",n=!1,o=arguments.length-1;o>=-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<r.length&&""===r[t];t++);for(var e=r.length-1;e>=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;u<o;u++)if(n[u]!==s[u]){i=u;break}var l=[];for(u=i;u<n.length;u++)l.push("..");return(l=l.concat(s.slice(i))).join("/")},exports.sep="/",exports.delimiter=":",exports.dirname=function(r){var t=n(r),e=t[0],s=t[1];return e||s?(s&&(s=s.substr(0,s.length-1)),e+s):"."},exports.basename=function(r,t){var e=n(r)[2];return t&&e.substr(-1*t.length)===t&&(e=e.substr(0,e.length-t.length)),e},exports.extname=function(r){return n(r)[3]};var o="b"==="ab".substr(-1)?function(r,t,e){return r.substr(t,e)}:function(r,t,e){return t<0&&(t=r.length+t),r.substr(t,e)};
},{"process":46}],67:[function(require,module,exports) {
module.exports=function(t,o){for(var a=[],e=0;e<t.length;e++){var n=o(t[e],e);r(n)?a.push.apply(a,n):a.push(n)}return a};var r=Array.isArray||function(r){return"[object Array]"===Object.prototype.toString.call(r)};
},{}],68:[function(require,module,exports) {
"use strict";function e(e,r,i){e instanceof RegExp&&(e=n(e,i)),r instanceof RegExp&&(r=n(r,i));var o=t(e,r,i);return o&&{start:o[0],end:o[1],pre:i.slice(0,o[0]),body:i.slice(o[0]+e.length,o[1]),post:i.slice(o[1]+r.length)}}function n(e,n){var t=n.match(e);return t?t[0]:null}function t(e,n,t){var r,i,o,f,l,s=t.indexOf(e),c=t.indexOf(n,s+1),p=s;if(s>=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())<o&&(o=i,f=c),c=t.indexOf(n,p+1)),p=s<c&&s>=0?s:c;r.length&&(l=[o,f])}return l}module.exports=e,e.range=t;
},{}],44:[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;C<A&&(S*=-1,$=g);var x=p.some(c);j=[];for(var E=A;$(E,C);E+=S){var I;if(f)"\\"===(I=String.fromCharCode(E))&&(I="");else if(I=String(E),x){var q=O-I.length;if(q>0){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;L<j.length;L++)for(var P=0;P<M.length;P++){var Z=y+j[L]+M[P];(!e||h||Z)&&o.push(Z)}return o}
},{"concat-map":67,"balanced-match":68}],30:[function(require,module,exports) {
module.exports=g,g.Minimatch=l;var t={sep:"/"};try{t=require("path")}catch(t){}var e=g.GLOBSTAR=l.GLOBSTAR={},n=require("brace-expansion"),r={"!":{open:"(?:(?!(?:",close:"))[^/]*?)"},"?":{open:"(?:",close:")?"},"+":{open:"(?:",close:")+"},"*":{open:"(?:",close:")*"},"@":{open:"(?:",close:")"}},i="[^/]",s=i+"*?",a="(?:(?!(?:\\/|^)(?:\\.{1,2})($|\\/)).)*?",o="(?:(?!(?:\\/|^)\\.).)*?",h=c("().*{}+?[]^$\\!");function c(t){return t.split("").reduce(function(t,e){return t[e]=!0,t},{})}var u=/\/+/;function p(t,e){return e=e||{},function(n,r,i){return g(n,t,e)}}function f(t,e){t=t||{},e=e||{};var n={};return Object.keys(e).forEach(function(t){n[t]=e[t]}),Object.keys(t).forEach(function(e){n[e]=t[e]}),n}function g(t,e,n){if("string"!=typeof e)throw new TypeError("glob pattern string required");return n||(n={}),!(!n.nocomment&&"#"===e.charAt(0))&&(""===e.trim()?""===t:new l(e,n).match(t))}function l(e,n){if(!(this instanceof l))return new l(e,n);if("string"!=typeof e)throw new TypeError("glob pattern string required");n||(n={}),e=e.trim(),"/"!==t.sep&&(e=e.split(t.sep).join("/")),this.options=n,this.set=[],this.pattern=e,this.regexp=null,this.negate=!1,this.comment=!1,this.empty=!1,this.make()}function d(){if(!this._made){var t=this.pattern,e=this.options;if(e.nocomment||"#"!==t.charAt(0))if(t){this.parseNegate();var n=this.globSet=this.braceExpand();e.debug&&(this.debug=console.error),this.debug(this.pattern,n),n=this.globParts=n.map(function(t){return t.split(u)}),this.debug(this.pattern,n),n=n.map(function(t,e,n){return t.map(this.parse,this)},this),this.debug(this.pattern,n),n=n.filter(function(t){return-1===t.indexOf(!1)}),this.debug(this.pattern,n),this.set=n}else this.empty=!0;else this.comment=!0}}function b(){var t=this.pattern,e=!1,n=0;if(!this.options.nonegate){for(var r=0,i=t.length;r<i&&"!"===t.charAt(r);r++)e=!e,n++;n&&(this.pattern=t.substr(n)),this.negate=e}}function m(t,e){if(e||(e=this instanceof l?this.options:{}),void 0===(t=void 0===t?this.pattern:t))throw new TypeError("undefined pattern");return e.nobrace||!t.match(/\{.*\}/)?[t]:n(t)}g.filter=p,g.defaults=function(t){if(!t||!Object.keys(t).length)return g;var e=g,n=function(n,r,i){return e.minimatch(n,r,f(t,i))};return n.Minimatch=function(n,r){return new e.Minimatch(n,f(t,r))},n},l.defaults=function(t){return t&&Object.keys(t).length?g.defaults(t).Minimatch:l},l.prototype.debug=function(){},l.prototype.make=d,l.prototype.parseNegate=b,g.braceExpand=function(t,e){return m(t,e)},l.prototype.braceExpand=m,l.prototype.parse=y;var v={};function y(t,n){if(t.length>65536)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,O=t.length;j<O&&(x=t.charAt(j));j++)if(this.debug("%s\t%s %s %j",t,j,c,x),p&&h[x])c+="\\"+x,p=!1;else switch(x){case"/":return!1;case"\\":w(),p=!0;continue;case"?":case"*":case"+":case"@":case"!":if(this.debug("%s\t%s %s %j <-- stateChar",t,j,c,x),l){this.debug(" in class"),"!"===x&&j===b+1&&(x="^"),c+=x;continue}y.debug("call clearStateChar %j",o),w(),o=x,a.noext&&w();continue;case"(":if(l){c+="(";continue}if(!o){c+="\\(";continue}f.push({type:o,start:j-1,reStart:c.length,open:r[o].open,close:r[o].close}),c+="!"===o?"(?:(?!(?:":"(?:",this.debug("plType %j %j",o,c),o=!1;continue;case")":if(l||!f.length){c+="\\)";continue}w(),u=!0;var k=f.pop();c+=k.close,"!"===k.type&&g.push(k),k.reEnd=c.length;continue;case"|":if(l||!f.length||p){c+="\\|",p=!1;continue}w(),c+="|";continue;case"[":if(w(),l){c+="\\"+x;continue}l=!0,b=j,d=c.length,c+=x;continue;case"]":if(j===b+1||!l){c+="\\"+x,p=!1;continue}if(l){var A=t.substring(b+1,j);try{RegExp("["+A+"]")}catch(t){var S=this.parse(A,v);c=c.substr(0,d)+"\\["+S[0]+"\\]",u=u||S[1],l=!1;continue}}u=!0,l=!1,c+=x;continue;default:w(),p?p=!1:!h[x]||"^"===x&&l||(c+="\\"),c+
},{"path":43,"brace-expansion":44}],7:[function(require,module,exports) {
var n=require("../path.js"),t=require("../errors.js"),e=require("./environment.js"),i=require("../../lib/async.js"),r=require("../encoding.js"),o=require("minimatch");function u(i,r){var o=new e((r=r||{}).env),u="/";Object.defineProperty(this,"fs",{get:function(){return i},enumerable:!0}),Object.defineProperty(this,"env",{get:function(){return o},enumerable:!0}),this.cd=function(e,r){e=n.resolve(u,e),i.stat(e,function(n,i){n?r(new t.ENOTDIR(null,e)):"DIRECTORY"===i.type?(u=e,r()):r(new t.ENOTDIR(null,e))})},this.pwd=function(){return u}}u.prototype.exec=function(t,e,i){var r=this.fs;"function"==typeof e&&(i=e,e=[]),e=e||[],i=i||function(){},t=n.resolve(this.pwd(),t),r.readFile(t,"utf8",function(n,t){if(n)i(n);else try{new Function("fs","args","callback",t)(r,e,i)}catch(n){i(n)}})},u.prototype.touch=function(t,e,i){var r=this.fs;"function"==typeof e&&(i=e,e={}),e=e||{},i=i||function(){},t=n.resolve(this.pwd(),t),r.stat(t,function(n,o){n?!0===e.updateOnly?i():function(n){r.writeFile(n,"",i)}(t):function(n){var t=Date.now(),o=e.date||t,u=e.date||t;r.utimes(n,o,u,i)}(t)})},u.prototype.cat=function(e,r){var o=this,u=o.fs,f="";r=r||function(){},e?(e="string"==typeof e?[e]:e,i.eachSeries(e,function(t,e){var i=n.resolve(o.pwd(),t);u.readFile(i,"utf8",function(n,t){n?e(n):(f+=t+"\n",e())})},function(n){n?r(n):r(null,f.replace(/\n$/,""))})):r(new t.EINVAL("Missing files argument"))},u.prototype.ls=function(e,r,o){var u=this,f=u.fs;"function"==typeof r&&(o=r,r={}),r=r||{},o=o||function(){},e?function t(e,o){var c=n.resolve(u.pwd(),e),s=[];f.readdir(c,function(e,u){e?o(e):i.eachSeries(u,function(e,i){e=n.join(c,e),f.stat(e,function(o,u){if(o)i(o);else{var f={path:n.basename(e),links:u.nlinks,size:u.size,modified:u.mtime,type:u.type};r.recursive&&"DIRECTORY"===u.type?t(n.join(c,f.path),function(n,t){n?i(n):(f.contents=t,s.push(f),i())}):(s.push(f),i())}})},function(n){o(n,s)})})}(e,o):o(new t.EINVAL("Missing dir argument"))},u.prototype.rm=function(e,r,o){var u=this,f=u.fs;"function"==typeof r&&(o=r,r={}),r=r||{},o=o||function(){},e?function e(o,c){o=n.resolve(u.pwd(),o),f.stat(o,function(u,s){u?c(u):"FILE"!==s.type?f.readdir(o,function(u,s){u?c(u):0!==s.length?r.recursive?(s=s.map(function(t){return n.join(o,t)}),i.eachSeries(s,e,function(n){n?c(n):f.rmdir(o,c)})):c(new t.ENOTEMPTY(null,o)):f.rmdir(o,c)}):f.unlink(o,c)})}(e,o):o(new t.EINVAL("Missing path argument"))},u.prototype.tempDir=function(n){var t=this.fs,e=this.env.get("TMP");n=n||function(){},t.mkdir(e,function(t){n(null,e)})},u.prototype.mkdirp=function(e,i){var r=this.fs;i=i||function(){},e?"/"!==e?function e(i,o){r.stat(i,function(u,f){if(f){if(f.isDirectory())return void o();if(f.isFile())return void o(new t.ENOTDIR(null,i))}else{if(u&&"ENOENT"!==u.code)return void o(u);var c=n.dirname(i);"/"===c?r.mkdir(i,function(n){n&&"EEXIST"!=n.code?o(n):o()}):e(c,function(n){if(n)return o(n);r.mkdir(i,function(n){n&&"EEXIST"!=n.code?o(n):o()})})}})}(e,i):i():i(new t.EINVAL("Missing path argument"))},u.prototype.find=function(e,r,u){var f=this,c=f.fs;"function"==typeof r&&(u=r,r={}),u=u||function(){};var s=(r=r||{}).exec||function(n,t){t()},a=[];function p(t,e){var i=n.removeTrailing(t);!r.regex||r.regex.test(i)?r.name&&!o(n.basename(i),r.name)||r.path&&!o(n.dirname(i),r.path)?e():function(n,t){s(n,function(e){e?t(e):(a.push(n),t())})}(t,e):e()}function d(t,e){t=n.resolve(f.pwd(),t),c.readdir(t,function(r,o){r?"ENOTDIR"===r.code?p(t,e):e(r):p(n.addTrailing(t),function(r){r?e(r):(o=o.map(function(e){return n.join(t,e)}),i.eachSeries(o,d,function(n){e(n,a)}))})})}e?c.stat(e,function(n,i){n?u(n):i.isDirectory()?d(e,u):u(new t.ENOTDIR(null,e))}):u(new t.EINVAL("Missing path argument"))},module.exports=u;
},{"../path.js":4,"../errors.js":5,"./environment.js":24,"../../lib/async.js":21,"../encoding.js":22,"minimatch":30}],45:[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;e<this[r][t].length;e++)this[r][t][e].apply(this[r][t][e],o)},removeAllListeners:function(t){if(void 0!==this[r]){var o=this;o[r][t].forEach(function(r){o.off(t,r)})}}};return o};var o=r.createInterface("_handlers");r.prototype._on=o.on,r.prototype._off=o.off,r.prototype._trigger=o.trigger;var e=r.createInterface("handlers");r.prototype.on=function(){e.on.apply(this,arguments),Array.prototype.unshift.call(arguments,"on"),this._trigger.apply(this,arguments)},r.prototype.off=e.off,r.prototype.trigger=e.trigger,r.prototype.removeAllListeners=e.removeAllListeners,module.exports=r;
},{}],17:[function(require,module,exports) {
var global = arguments[3];
var t=arguments[3],e="function"==typeof Symbol&&"symbol"==typeof Symbol.iterator?function(t){return typeof t}:function(t){return t&&"function"==typeof Symbol&&t.constructor===Symbol&&t!==Symbol.prototype?"symbol":typeof t},n=require("./eventemitter.js"),o=require("../src/shared.js").guid;function r(t,e){var n=0;return function(){var o=Date.now();o-n>t&&(n=o,e.apply(this,arguments))}}function i(t,n){if(void 0!==t&&t||(t={}),"object"===(void 0===n?"undefined":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<e)return i||(o._on("storage",c),i=!0),void(s=setTimeout(c,n));r=!0,a.setItem(p,u),t(),function(){i&&o._off("storage",c);s&&clearTimeout(s);a.removeItem(p)}()}}c()},s.prototype._cleanup_emit=r(100,function(){this._transaction(function(){var t,e=Date.now()-f,n=0;try{t=JSON.parse(a.getItem(c)||"[]")}catch(e){t=[]}for(var o=t.length-1;o>=0;o--)t[o].timestamp<e&&(t.splice(o,1),n++);n>0&&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(t){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].timestamp<r-o},s.prototype._localStorageChanged=function(t,e){if(t&&t.key)return t.key===e;var n=a.getItem(e);return n!==this.previousValues[e]&&(this.previousValues[e]=n,!0)},s.prototype._onStorageEvent=function(e){e=e||t.event;var n=this;this._localStorageChanged(e,c)&&this._transaction(function(){var t,e=Date.now(),o=a.getItem(c);try{t=JSON.parse(o||"[]")}catch(e){t=[]}for(var r=0;r<t.length;r++)if(t[r].origin!==n.origin&&!(t[r].timestamp<n.lastMessage)){if(t[r].id){if(n.receivedIDs.hasOwnProperty(t[r].id))continue;n.receivedIDs[t[r].id]=!0}n.trigger(t[r].name,t[r].payload)}n.lastMessage=e}),this._trigger("storage",e)},s.prototype._emit=function(t,e,n){if((n="string"==typeof n||"number"==typeof n?String(n):null)&&n.length){if(this.receivedIDs.hasOwnProperty(n))return;this.receivedIDs[n]=!0}var o={id:n,name:t,origin:this.origin,timestamp:Date.now(),payload:e},r=this;this._transaction(function(){var n=a.getItem(c)||"[]",i="[]"===n?"":",";n=[n.substring(0,n.length-1),i,JSON.stringify(o),"]"].join(""),a.setItem(c,n),r.trigger(t,e),setTimeout(function(){r._cleanup_emit()},50)})},s.prototype.emit=function(t,e){this._emit.apply(this,arguments),this._trigger("emit",t,e)},s.prototype.once=function(t,e,n){if(s.supported){var o=this;this._transaction(function(){var r;try{r=JSON.parse(a.getItem(u)||"{}")}catch(t){r={}}o._once_expired(t,r)&&(r[t]={},r[t].timestamp=Date.now(),"number"==typeof n&&(r[t].ttl=1e3*n),a.setItem(u,JSON.stringify(r)),e(),setTimeout(function(){o._cleanup_once()},50))})}},i(s.prototype,n.prototype),s.supported=void 0!==a;var c="intercom",u="intercom_once",p="intercom_lock",f=5e4,m=36e5;s.destroy=function(){a.removeItem(p),a.removeItem(c),a.removeItem(u)},s.getInstance=function(){var t;return function(){return t||(t=new s),t}}(),module.exports=s;
},{"./eventemitter.js":45,"../src/shared.js":15}],18:[function(require,module,exports) {
var e=require("../lib/eventemitter.js"),t=require("./path.js"),n=require("../lib/intercom.js");function r(){e.call(this);var r,i,o=this,s=!1;function c(e){(i===e||s&&0===e.indexOf(r))&&o.trigger("change","change",e)}o.start=function(e,o,a){if(!i){if(t.isNull(e))throw new Error("Path must be a string without null bytes.");i=t.normalize(e),(s=!0===a)&&(r="/"===i?"/":i+"/"),n.getInstance().on("change",c)}},o.close=function(){n.getInstance().off("change",c),o.removeAllListeners("change")}}r.prototype=new e,r.prototype.constructor=r,module.exports=r;
},{"../lib/eventemitter.js":45,"./path.js":4,"../lib/intercom.js":17}],50:[function(require,module,exports) {
var t=require("./constants.js").MODE_FILE;module.exports=function(s,e){this.id=s,this.type=e||t};
},{"./constants.js":16}],51:[function(require,module,exports) {
var t=require("./errors.js");function e(t,e,i,o){this.path=t,this.id=e,this.flags=i,this.position=o}e.prototype.getNode=function(e,i){var o=this.id,r=this.path;e.getObject(o,function(e,o){return e?i(e):o?void i(null,o):i(new t.EBADF("file descriptor refers to unknown node",r))})},module.exports=e;
},{"./errors.js":5}],52:[function(require,module,exports) {
var t=require("./constants.js");function e(e){var i=Date.now();this.id=t.SUPER_NODE_ID,this.mode=t.MODE_META,this.atime=e.atime||i,this.ctime=e.ctime||i,this.mtime=e.mtime||i,this.rnode=e.rnode}e.create=function(t,i){t.guid(function(n,o){n?i(n):(t.rnode=t.rnode||o,i(null,new e(t)))})},module.exports=e;
},{"./constants.js":16}],53:[function(require,module,exports) {
var i=require("./constants.js").MODE_FILE;function t(t){var s=Date.now();this.id=t.id,this.mode=t.mode||i,this.size=t.size||0,this.atime=t.atime||s,this.ctime=t.ctime||s,this.mtime=t.mtime||s,this.flags=t.flags||[],this.xattrs=t.xattrs||{},this.nlinks=t.nlinks||0,this.version=t.version||0,this.blksize=void 0,this.nblocks=1,this.data=t.data}function s(i,t,s){i[t]?s(null):i.guid(function(n,e){i[t]=e,s(n)})}t.create=function(i,n){s(i,"id",function(e){e?n(e):s(i,"data",function(s){s?n(s):n(null,new t(i))})})},module.exports=t;
},{"./constants.js":16}],54:[function(require,module,exports) {
var t=require("./constants.js");function i(t,i){this.node=t.id,this.dev=i,this.size=t.size,this.nlinks=t.nlinks,this.atime=t.atime,this.mtime=t.mtime,this.ctime=t.ctime,this.type=t.mode}i.prototype.isFile=function(){return this.type===t.MODE_FILE},i.prototype.isDirectory=function(){return this.type===t.MODE_DIRECTORY},i.prototype.isSymbolicLink=function(){return this.type===t.MODE_SYMBOLIC_LINK},i.prototype.isSocket=i.prototype.isFIFO=i.prototype.isCharacterDevice=i.prototype.isBlockDevice=function(){return!1},module.exports=i;
},{"./constants.js":16}],20:[function(require,module,exports) {
<<<<<<< HEAD
var n="function"==typeof Symbol&&"symbol"==typeof Symbol.iterator?function(n){return typeof n}:function(n){return n&&"function"==typeof Symbol&&n.constructor===Symbol&&n!==Symbol.prototype?"symbol":typeof n},t=require("../../lib/nodash.js"),e=require("../path.js"),i=e.normalize,o=e.dirname,a=e.basename,u=e.isAbsolute,c=e.isNull,r=require("../constants.js"),f=r.MODE_FILE,s=r.MODE_DIRECTORY,l=r.MODE_SYMBOLIC_LINK,d=r.MODE_META,m=r.ROOT_DIRECTORY_NAME,p=r.SUPER_NODE_ID,E=r.SYMLOOP_MAX,w=r.O_READ,g=r.O_WRITE,O=r.O_CREATE,b=r.O_EXCLUSIVE,v=r.O_TRUNCATE,N=r.O_APPEND,A=r.O_FLAGS,h=r.XATTR_CREATE,I=r.XATTR_REPLACE,j=r.FS_NOMTIME,y=r.FS_NOCTIME,T=require("../encoding.js"),D=require("../errors.js"),L=require("../directory-entry.js"),R=require("../open-file-description.js"),x=require("../super-node.js"),V=require("../node.js"),F=require("../stats.js"),B=require("../buffer.js");function _(n){return function(t,e){t?n(t):n(null,e)}}function S(n,e,i,o,a){var u=n.flags;t(u).contains(y)&&delete o.ctime,t(u).contains(j)&&delete o.mtime;var c=!1;function r(t){n.changes.push({event:"change",path:e}),a(t)}o.ctime&&(i.ctime=o.ctime,i.atime=o.ctime,c=!0),o.atime&&(i.atime=o.atime,c=!0),o.mtime&&(i.mtime=o.mtime,c=!0),c?n.putObject(i.id,i,r):r()}function P(n,t,e,u){if(e!==s&&e!==f)return u(new D.EINVAL("mode must be a directory or file",t));t=i(t);var c,r,l,d=a(t),m=o(t);function p(e,i){!e&&i?u(new D.EEXIST("path name already exists",t)):!e||e instanceof D.ENOENT?n.getObject(c.data,E):u(e)}function E(t,i){t?u(t):(r=i,V.create({guid:n.guid,mode:e},function(t,e){t?u(t):((l=e).nlinks+=1,n.putObject(l.id,l,g))}))}function w(t){if(t)u(t);else{var e=Date.now();S(n,m,l,{mtime:e,ctime:e},u)}}function g(t){t?u(t):(r[d]=new L(l.id,e),n.putObject(c.data,r,w))}k(n,m,function(e,i){e?u(e):i.mode!==s?u(new D.ENOTDIR("a component of the path prefix is not a directory",t)):(c=i,k(n,t,p))})}function k(n,e,u){if(!(e=i(e)))return u(new D.ENOENT("path is an empty string"));var c=a(e),r=o(e),f=0;function w(t,e){t?u(t):e&&e.mode===d&&e.rnode?n.getObject(e.rnode,g):u(new D.EFILESYSTEMERROR)}function g(n,t){n?u(n):t?u(null,t):u(new D.ENOENT)}function O(t,i){t?u(t):i.mode===s&&i.data?n.getObject(i.data,b):u(new D.ENOTDIR("a component of the path prefix is not a directory",e))}function b(i,o){if(i)u(i);else if(t(o).has(c)){var a=o[c].id;n.getObject(a,v)}else u(new D.ENOENT(null,e))}function v(t,s){var d;t?u(t):s.mode==l?++f>E?u(new D.ELOOP(null,e)):(d=s.data,d=i(d),r=o(d),c=a(d),m==c?n.getObject(p,w):k(n,r,O)):u(null,s)}m==c?n.getObject(p,w):k(n,r,O)}function C(t,e,i,o,a,u){var c;function r(n,r){r&&r.xattrs[i];n?u(n):a===h&&r.xattrs.hasOwnProperty(i)?u(new D.EEXIST("attribute already exists",e)):a!==I||r.xattrs.hasOwnProperty(i)?(r.xattrs[i]=o,t.putObject(r.id,r,function(n){n?u(n):S(t,c,r,{ctime:Date.now()},u)})):u(new D.ENOATTR(null,e))}"string"==typeof e?(c=e,k(t,e,r)):"object"==(void 0===e?"undefined":n(e))&&"string"==typeof e.id?(c=e.path,t.getObject(e.id,r)):u(new D.EINVAL("path or file descriptor of wrong type",e))}function M(n,t){var e,i,o;function a(o){o?t(o):V.create({guid:n.guid,id:e.rnode,mode:s},function(e,o){e?t(e):((i=o).nlinks+=1,n.putObject(i.id,i,u))})}function u(e){e?t(e):(o={},n.putObject(i.data,o,t))}n.getObject(p,function(i,o){!i&&o?t():!i||i instanceof D.ENOENT?x.create({guid:n.guid},function(i,o){i?t(i):(e=o,n.putObject(e.id,e,a))}):t(i)})}function X(n,t,e){t=i(t);var u,c,r,f,l=a(t),d=o(t);function m(t,i){t?e(t):(r=i,n.getObject(r.data,p))}function p(t,i){t?e(t):(f=i,V.create({guid:n.guid,mode:s},function(t,i){t?e(t):((u=i).nlinks+=1,n.putObject(u.id,u,E))}))}function E(t){t?e(t):(c={},n.putObject(u.data,c,g))}function w(t){if(t)e(t);else{var i=Date.now();S(n,d,r,{mtime:i,ctime:i},e)}}function g(t){t?e(t):(f[l]=new L(u.id,s),n.putObject(r.data,f,w))}k(n,t,function(i,o){!i&&o?e(new D.EEXIST(null,t)):!i||i instanceof D.ENOENT?k(n,d,m):e(i)})}function z(n,e,u){e=i(e);var c,r,f,l=a(e),d=o(e);function p(i,o){i?u(i):m==l?u(new D.EBUSY(null,e)):t(o).has(l)?(c=(f=o)[l].id,n.getObject(c,E)):u(new D.ENOENT(null,e))}function E(t,i){t?u(t):i.mode!=s?u(new D.E
},{"../../lib/nodash.js":13,"../path.js":4,"../constants.js":15,"../encoding.js":37,"../errors.js":5,"../directory-entry.js":38,"../open-file-description.js":39,"../super-node.js":40,"../node.js":41,"../stats.js":42,"../buffer.js":3}],6:[function(require,module,exports) {
var e=require("../../lib/nodash.js"),t=require("../path.js").isNull,r=require("../shared.js").nop,n=require("../constants.js"),i=n.FILE_SYSTEM_NAME,o=n.FS_FORMAT,a=n.FS_READY,u=n.FS_PENDING,s=n.FS_ERROR,c=n.FS_NODUPEIDCHECK,l=require("../providers/index.js"),f=require("../shell/shell.js"),d=require("../../lib/intercom.js"),p=require("../fs-watcher.js"),h=require("../errors.js"),v=require("../shared.js").guid,R=n.STDIN,g=n.STDOUT,y=n.STDERR,E=n.FIRST_DESCRIPTOR,S=require("./implementation.js");function m(e){return"function"==typeof e?e:function(e){if(e)throw e}}function x(n,f){f=f||r;var m=(n=n||{}).flags,x=n.guid?n.guid:v,w=n.provider||new l.Default(n.name||i),F=n.name||w.name,j=e(m).contains(o),q=this;q.readyState=u,q.name=F,q.error=null,q.stdin=R,q.stdout=g,q.stderr=y;var D={},O=E;Object.defineProperty(this,"openFiles",{get:function(){return D}}),this.allocDescriptor=function(e){var t=O++;return D[t]=e,t},this.releaseDescriptor=function(e){delete D[e]};var T=[];function C(t){return function(r){e(m).contains(c)?r(null,x()):function e(r){var n=x();t.getObject(n,function(t,i){t?r(t):i?e(r):r(null,n)})}(r)}}this.queueOrRun=function(e){var t;return a==q.readyState?e.call(q):s==q.readyState?t=new h.EFILESYSTEMERROR("unknown error"):T.push(e),t},this.watch=function(e,n,i){if(t(e))throw new Error("Path must be a string without null bytes.");"function"==typeof n&&(i=n,n={}),n=n||{},i=i||r;var o=new p;return o.start(e,!1,n.recursive),o.on("change",i),o},w.open(function(e){function t(e){function t(e){var t=w[e]();return t.flags=m,t.changes=[],t.guid=C(t),t.close=function(){var e=t.changes;!function(e){if(e.length){var t=d.getInstance();e.forEach(function(e){t.emit(e.event,e.path)})}}(e),e.length=0},t}q.provider={openReadWriteContext:function(){return t("getReadWriteContext")},openReadOnlyContext:function(){return t("getReadOnlyContext")}},q.readyState=e?s:a,T.forEach(function(e){e.call(this)}.bind(q)),T=null,f(e,q)}if(e)return t(e);var r=w.getReadWriteContext();r.guid=C(r),j?r.clear(function(e){if(e)return t(e);S.ensureRootDirectory(r,t)}):S.ensureRootDirectory(r,t)})}x.providers=l,["open","close","mknod","mkdir","rmdir","stat","fstat","link","unlink","read","readFile","write","writeFile","appendFile","exists","lseek","readdir","rename","readlink","symlink","lstat","truncate","ftruncate","utimes","futimes","setxattr","getxattr","fsetxattr","fgetxattr","removexattr","fremovexattr"].forEach(function(e){x.prototype[e]=function(){var t=this,r=Array.prototype.slice.call(arguments,0),n=r.length-1,i="function"!=typeof r[n],o=m(r[n]),a=t.queueOrRun(function(){var a=t.provider.openReadWriteContext();if(s===t.readyState){var u=new h.EFILESYSTEMERROR("filesystem unavailable, operation canceled");return o.call(t,u)}function c(){a.close(),o.apply(t,arguments)}i?r.push(c):r[n]=c;var l=[t,a].concat(r);S[e].apply(null,l)});a&&o(a)}}),x.prototype.Shell=function(e){return new f(this,e)},module.exports=x;
},{"../../lib/nodash.js":13,"../path.js":4,"../shared.js":14,"../constants.js":15,"../providers/index.js":18,"../shell/shell.js":19,"../../lib/intercom.js":16,"../fs-watcher.js":17,"../errors.js":5,"./implementation.js":20}],1:[function(require,module,exports) {
module.exports={FileSystem:require("./filesystem/interface.js"),Buffer:require("./buffer.js"),Path:require("./path.js"),Errors:require("./errors.js")};
},{"./filesystem/interface.js":6,"./buffer.js":3,"./path.js":4,"./errors.js":5}]},{},[1], "Filer")
//# sourceMappingURL=/filer.min.map
>>>>>>> Switch to parceljs for bundling, eslint for linting, drop grunt
>>>>>>> Switch to parceljs for bundling, eslint for linting, drop grunt
=======
var n=require("../../lib/nodash.js"),e=require("../path.js"),t=e.normalize,i=e.dirname,o=e.basename,a=e.isAbsolute,u=e.isNull,c=require("../constants.js"),r=c.MODE_FILE,f=c.MODE_DIRECTORY,s=c.MODE_SYMBOLIC_LINK,l=c.MODE_META,d=c.ROOT_DIRECTORY_NAME,m=c.SUPER_NODE_ID,E=c.SYMLOOP_MAX,p=c.O_READ,w=c.O_WRITE,g=c.O_CREATE,O=c.O_EXCLUSIVE,b=c.O_TRUNCATE,v=c.O_APPEND,N=c.O_FLAGS,I=c.XATTR_CREATE,h=c.XATTR_REPLACE,A=c.FS_NOMTIME,T=c.FS_NOCTIME,D=require("../encoding.js"),j=require("../errors.js"),R=require("../directory-entry.js"),y=require("../open-file-description.js"),L=require("../super-node.js"),V=require("../node.js"),F=require("../stats.js"),B=require("../buffer.js");function _(e,t,i,o,a){var u=e.flags;n(u).contains(T)&&delete o.ctime,n(u).contains(A)&&delete o.mtime;var c=!1;function r(n){e.changes.push({event:"change",path:t}),a(n)}o.ctime&&(i.ctime=o.ctime,i.atime=o.ctime,c=!0),o.atime&&(i.atime=o.atime,c=!0),o.mtime&&(i.mtime=o.mtime,c=!0),c?e.putObject(i.id,i,r):r()}function x(n,e,a,u){if(a!==f&&a!==r)return u(new j.EINVAL("mode must be a directory or file",e));e=t(e);var c,s,l,d=o(e),m=i(e);function E(t,i){!t&&i?u(new j.EEXIST("path name already exists",e)):!t||t instanceof j.ENOENT?n.getObject(c.data,p):u(t)}function p(e,t){e?u(e):(s=t,V.create({guid:n.guid,mode:a},function(e,t){e?u(e):((l=t).nlinks+=1,n.putObject(l.id,l,g))}))}function w(e){if(e)u(e);else{var t=Date.now();_(n,m,l,{mtime:t,ctime:t},u)}}function g(e){e?u(e):(s[d]=new R(l.id,a),n.putObject(c.data,s,w))}S(n,m,function(t,i){t?u(t):i.mode!==f?u(new j.ENOTDIR("a component of the path prefix is not a directory",e)):(c=i,S(n,e,E))})}function S(e,a,u){if(!(a=t(a)))return u(new j.ENOENT("path is an empty string"));var c=o(a),r=i(a),p=0;function w(n,t){n?u(n):t&&t.mode===l&&t.rnode?e.getObject(t.rnode,g):u(new j.EFILESYSTEMERROR)}function g(n,e){n?u(n):e?u(null,e):u(new j.ENOENT)}function O(n,t){n?u(n):t.mode===f&&t.data?e.getObject(t.data,b):u(new j.ENOTDIR("a component of the path prefix is not a directory",a))}function b(t,i){if(t)u(t);else if(n(i).has(c)){var o=i[c].id;e.getObject(o,v)}else u(new j.ENOENT(null,a))}function v(n,f){var l;n?u(n):f.mode==s?++p>E?u(new j.ELOOP(null,a)):(l=f.data,l=t(l),r=i(l),c=o(l),d==c?e.getObject(m,w):S(e,r,O)):u(null,f)}d==c?e.getObject(m,w):S(e,r,O)}function C(n,e,t,i,o,a,u){var c=t.xattrs;a===I&&c.hasOwnProperty(i)?u(new j.EEXIST("attribute already exists",e)):a!==h||c.hasOwnProperty(i)?(c[i]=o,n.putObject(t.id,t,function(i){i?u(i):_(n,e,t,{ctime:Date.now()},u)})):u(new j.ENOATTR(null,e))}function P(n,e){var t,i,o;function a(o){o?e(o):V.create({guid:n.guid,id:t.rnode,mode:f},function(t,o){t?e(t):((i=o).nlinks+=1,n.putObject(i.id,i,u))})}function u(t){t?e(t):(o={},n.putObject(i.data,o,e))}n.getObject(m,function(i,o){!i&&o?e():!i||i instanceof j.ENOENT?L.create({guid:n.guid},function(i,o){i?e(i):(t=o,n.putObject(t.id,t,a))}):e(i)})}function k(n,e,a){e=t(e);var u,c,r,s,l=o(e),d=i(e);function m(e,t){e?a(e):(r=t,n.getObject(r.data,E))}function E(e,t){e?a(e):(s=t,V.create({guid:n.guid,mode:f},function(e,t){e?a(e):((u=t).nlinks+=1,n.putObject(u.id,u,p))}))}function p(e){e?a(e):(c={},n.putObject(u.data,c,g))}function w(e){if(e)a(e);else{var t=Date.now();_(n,d,r,{mtime:t,ctime:t},a)}}function g(e){e?a(e):(s[l]=new R(u.id,f),n.putObject(r.data,s,w))}S(n,e,function(t,i){!t&&i?a(new j.EEXIST(null,e)):!t||t instanceof j.ENOENT?S(n,d,m):a(t)})}function M(e,a,u){a=t(a);var c,r,s,l=o(a),m=i(a);function E(t,i){t?u(t):d==l?u(new j.EBUSY(null,a)):n(i).has(l)?(c=(s=i)[l].id,e.getObject(c,p)):u(new j.ENOENT(null,a))}function p(n,t){n?u(n):t.mode!=f?u(new j.ENOTDIR(null,a)):(c=t,e.getObject(c.data,w))}function w(t,i){t?u(t):n(i).size()>0?u(new j.ENOTEMPTY(null,a)):(delete s[l],e.putObject(r.data,s,g))}function g(n){if(n)u(n);else{var t=Date.now();_(e,m,r,{mtime:t,ctime:t},O)}}function O(n){n?u(n):e.delete(c.id,b)}function b(n){n?u(n):e.delete(c.data,u)}S(e,m,function(n,t){n?u(n):(r=t,e.getObject(r.data,E))})}function X(e,a,u,c){a=t(a);var l,m,p,b,v,N=o(a),I=i(a),h=0;function A(n,t){n?c(n):t.mode!==f?c(new j.ENOENT(null,a)):(l=t,e.getObject(l
},{"../../lib/nodash.js":14,"../path.js":4,"../constants.js":16,"../encoding.js":22,"../errors.js":5,"../directory-entry.js":50,"../open-file-description.js":51,"../super-node.js":52,"../node.js":53,"../stats.js":54,"../buffer.js":3}],6:[function(require,module,exports) {
var e=require("../../lib/nodash.js"),t=require("../path.js").isNull,r=require("../shared.js").nop,n=require("../constants.js"),i=n.FILE_SYSTEM_NAME,o=n.FS_FORMAT,a=n.FS_READY,u=n.FS_PENDING,s=n.FS_ERROR,c=n.FS_NODUPEIDCHECK,l=require("../providers/index.js"),f=require("../shell/shell.js"),d=require("../../lib/intercom.js"),h=require("../fs-watcher.js"),p=require("../errors.js"),v=require("../shared.js").guid,R=n.STDIN,g=n.STDOUT,E=n.STDERR,S=n.FIRST_DESCRIPTOR,y=require("./implementation.js");function m(e){return"function"==typeof e?e:function(e){if(e)throw e}}function x(e){e&&console.error("Filer error: ",e)}function F(n,m){m=m||x;var F=(n=n||{}).flags,j=n.guid?n.guid:v,q=n.provider||new l.Default(n.name||i),w=n.name||q.name,D=e(F).contains(o),O=this;O.readyState=u,O.name=w,O.error=null,O.stdin=R,O.stdout=g,O.stderr=E,this.Shell=f.bind(void 0,this);var T={},b=S;Object.defineProperty(this,"openFiles",{get:function(){return T}}),this.allocDescriptor=function(e){var t=b++;return T[t]=e,t},this.releaseDescriptor=function(e){delete T[e]};var C=[];function I(t){return function(r){e(F).contains(c)?r(null,j()):function e(r){var n=j();t.getObject(n,function(t,i){t?r(t):i?e(r):r(null,n)})}(r)}}this.queueOrRun=function(e){var t;return a==O.readyState?e.call(O):s==O.readyState?t=new p.EFILESYSTEMERROR("unknown error"):C.push(e),t},this.watch=function(e,n,i){if(t(e))throw new Error("Path must be a string without null bytes.");"function"==typeof n&&(i=n,n={}),n=n||{},i=i||r;var o=new h;return o.start(e,!1,n.recursive),o.on("change",i),o},q.open(function(e){function t(e){function t(e){var t=q[e]();return t.flags=F,t.changes=[],t.guid=I(t),t.close=function(){var e=t.changes;!function(e){if(e.length){var t=d.getInstance();e.forEach(function(e){t.emit(e.event,e.path)})}}(e),e.length=0},t}O.provider={openReadWriteContext:function(){return t("getReadWriteContext")},openReadOnlyContext:function(){return t("getReadOnlyContext")}},O.readyState=e?s:a,C.forEach(function(e){e.call(this)}.bind(O)),C=null,m(e,O)}if(e)return t(e);var r=q.getReadWriteContext();r.guid=I(r),D?r.clear(function(e){if(e)return t(e);y.ensureRootDirectory(r,t)}):y.ensureRootDirectory(r,t)})}F.providers=l,["open","close","mknod","mkdir","rmdir","stat","fstat","link","unlink","read","readFile","write","writeFile","appendFile","exists","lseek","readdir","rename","readlink","symlink","lstat","truncate","ftruncate","utimes","futimes","setxattr","getxattr","fsetxattr","fgetxattr","removexattr","fremovexattr"].forEach(function(e){F.prototype[e]=function(){var t=this,r=Array.prototype.slice.call(arguments,0),n=r.length-1,i="function"!=typeof r[n],o=m(r[n]),a=t.queueOrRun(function(){var a=t.provider.openReadWriteContext();if(s===t.readyState){var u=new p.EFILESYSTEMERROR("filesystem unavailable, operation canceled");return o.call(t,u)}function c(){a.close(),o.apply(t,arguments)}i?r.push(c):r[n]=c;var l=[t,a].concat(r);y[e].apply(null,l)});a&&o(a)}}),module.exports=F;
},{"../../lib/nodash.js":14,"../path.js":4,"../shared.js":15,"../constants.js":16,"../providers/index.js":19,"../shell/shell.js":7,"../../lib/intercom.js":17,"../fs-watcher.js":18,"../errors.js":5,"./implementation.js":20}],1:[function(require,module,exports) {
module.exports={FileSystem:require("./filesystem/interface.js"),Buffer:require("./buffer.js"),Path:require("./path.js"),Errors:require("./errors.js"),Shell:require("./shell/shell.js")};
},{"./filesystem/interface.js":6,"./buffer.js":3,"./path.js":4,"./errors.js":5,"./shell/shell.js":7}]},{},[1], "Filer")
//# sourceMappingURL=/filer.min.map
>>>>>>> Fix tests so they work and pass with Parcel.js, updated outdated, remove .babelrc