filer/dist/filer.min.js

80 lines
86 KiB
JavaScript
Raw Normal View History

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;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}({"0c0E":[function(require,module,exports) {
2019-01-03 04:12:19 +00:00
"use strict";Object.defineProperty(exports,"__esModule",{value:!0});var r="__ES6-PROMISIFY--CUSTOM-ARGUMENTS__";function o(e){if("function"!=typeof e)throw new TypeError("Argument to promisify must be a function");var n=e[r],t=o.Promise||Promise;if("function"!=typeof t)throw new Error("No Promise implementation found; do you need a polyfill?");return function(){for(var r=this,o=arguments.length,i=Array(o),f=0;f<o;f++)i[f]=arguments[f];return new t(function(o,t){i.push(function(r){if(r)return t(r);for(var e=arguments.length,i=Array(e>1?e-1:0),f=1;f<e;f++)i[f-1]=arguments[f];if(1===i.length||!n)return o(i[0]);var u={};i.forEach(function(r,o){var e=n[o];e&&(u[e]=r)}),o(u)}),e.call.apply(e,[r].concat(i))})}}o.argumentNames=r,o.Promise=void 0,exports.promisify=o;
},{}],"pBGv":[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(n){t=r}try{e="function"==typeof clearTimeout?clearTimeout:o}catch(n){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};
},{}],"UUq2":[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)};
2018-12-21 19:33:38 +00:00
},{"process":"pBGv"}],"8thZ":[function(require,module,exports) {
var process = require("process");
var e=require("process");e.cwd=function(){return"/"};var r=require("path"),n=Object.create(r);n.basename=function(e,n){var i=r.basename(e,n);return""===i?"/":i},n.normalize=function(e){return"/"===(e=r.normalize(e))?e:n.removeTrailing(e)},n.isNull=function(e){return-1!==(""+e).indexOf("\0")},n.addTrailing=function(e){return e.replace(/\/*$/,"/")},n.removeTrailing=function(e){return""===(e=e.replace(/\/*$/,""))?"/":e},module.exports=n;
2019-02-07 21:38:32 +00:00
},{"path":"UUq2","process":"pBGv"}],"gCho":[function(require,module,exports) {
var _="READ",E="WRITE",O="CREATE",R="EXCLUSIVE",I="TRUNCATE",S="APPEND",T="CREATE",N="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",NODE_TYPE_FILE:"FILE",NODE_TYPE_DIRECTORY:"DIRECTORY",NODE_TYPE_SYMBOLIC_LINK:"SYMLINK",NODE_TYPE_META:"META",DEFAULT_DIR_PERMISSIONS:493,DEFAULT_FILE_PERMISSIONS:420,FULL_READ_WRITE_EXEC_PERMISSIONS:511,READ_WRITE_PERMISSIONS:438,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:_,O_WRITE:E,O_CREATE:O,O_EXCLUSIVE:R,O_TRUNCATE:I,O_APPEND:S,O_FLAGS:{r:[_],"r+":[_,E],w:[E,O,I],"w+":[E,_,O,I],wx:[E,O,R,I],"wx+":[E,_,O,R,I],a:[E,O,S],"a+":[E,_,O,S],ax:[E,O,R,S],"ax+":[E,_,O,R,S]},XATTR_CREATE:T,XATTR_REPLACE:N,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:""},fsConstants:{O_RDONLY:0,O_WRONLY:1,O_RDWR:2,S_IFMT:61440,S_IFREG:32768,S_IFDIR:16384,S_IFCHR:8192,S_IFBLK:24576,S_IFIFO:4096,S_IFLNK:40960,S_IFSOCK:49152,O_CREAT:512,O_EXCL:2048,O_NOCTTY:131072,O_TRUNC:1024,O_APPEND:8,O_DIRECTORY:1048576,O_NOFOLLOW:256,O_SYNC:128,O_DSYNC:4194304,O_SYMLINK:2097152,O_NONBLOCK:4,S_IRWXU:448,S_IRUSR:256,S_IWUSR:128,S_IXUSR:64,S_IRWXG:56,S_IRGRP:32,S_IWGRP:16,S_IXGRP:8,S_IRWXO:7,S_IROTH:4,S_IWOTH:2,S_IXOTH:1,F_OK:0,R_OK:4,W_OK:2,X_OK:1,UV_FS_COPYFILE_EXCL:1,COPYFILE_EXCL:1}};
},{}],"yh9p":[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;
},{}],"JgNJ":[function(require,module,exports) {
2019-01-03 04:12:19 +00:00
exports.read=function(o,t,a,r,h){var M,p,w=8*h-r-1,f=(1<<w)-1,N=f>>1,n=-7,i=a?h-1:0,e=a?-1:1,s=o[t+i];for(i+=e,M=s&(1<<-n)-1,s>>=-n,n+=w;n>0;M=256*M+o[t+i],i+=e,n-=8);for(p=M&(1<<-n)-1,M>>=-n,n+=r;n>0;p=256*p+o[t+i],i+=e,n-=8);if(0===M)M=1-N;else{if(M===f)return p?NaN:1/0*(s?-1:1);p+=Math.pow(2,r),M-=N}return(s?-1:1)*p*Math.pow(2,M-r)},exports.write=function(o,t,a,r,h,M){var p,w,f,N=8*M-h-1,n=(1<<N)-1,i=n>>1,e=23===h?Math.pow(2,-24)-Math.pow(2,-77):0,s=r?0:M-1,u=r?1:-1,l=t<0||0===t&&1/t<0?1:0;for(t=Math.abs(t),isNaN(t)||t===1/0?(w=isNaN(t)?1:0,p=n):(p=Math.floor(Math.log(t)/Math.LN2),t*(f=Math.pow(2,-p))<1&&(p--,f*=2),(t+=p+i>=1?e/f:e*Math.pow(2,1-i))*f>=2&&(p++,f/=2),p+i>=n?(w=0,p=n):p+i>=1?(w=(t*f-1)*Math.pow(2,h),p+=i):(w=t*Math.pow(2,i-1)*Math.pow(2,h),p=0));h>=8;o[a+s]=255&w,s+=u,w/=256,h-=8);for(p=p<<h|w,N+=h;N>0;o[a+s]=255&p,s+=u,p/=256,N-=8);o[a+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];
2019-01-03 04:12:19 +00:00
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 u.TYPED_ARRAY_SUPPORT?2147483647:1073741823}function s(t,r){if(o()<r)throw new RangeError("Invalid typed array length");return u.TYPED_ARRAY_SUPPORT?(t=new Uint8Array(r)).__proto__=u.prototype:(null===t&&(t=new u(r)),t.length=r),t}function u(t,r,e){if(!(u.TYPED_ARRAY_SUPPORT||this instanceof u))return new u(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 p(this,t)}return h(this,t,r,e)}function h(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 f(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 f(r),r<=0?s(t,r):void 0!==e?"string"==typeof n?s(t,r).fill(e,n):s(t,r).fill(e):s(t,r)}function p(t,r){if(f(r),t=s(t,r<0?0:0|w(r)),!u.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"),!u.isEncoding(e))throw new TypeError('"encoding" must be a valid string encoding');var n=0|v(r,e),i=(t=s(t,n)).write(r,e);return i!==n&&(t=t.slice(0,i)),t}function c(t,r){var e=r.length<0?0:0|w(r.length);t=s(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),u.TYPED_ARRAY_SUPPORT?(t=r).__proto__=u.prototype:t=c(t,r),t}function y(t,r){if(u.isBuffer(r)){var e=0|w(r.length);return 0===(t=s(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||d(r.length)?s(t,0):c(t,r);if("Buffer"===r.type&&n(r.data))return c(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 E(t){return+t!=t&&(t=0),u.alloc(+t)}function v(t,r){if(u.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 K(t).length;case"ucs2":case"ucs-2":case"utf16le":case"utf-16le":return 2*e;case"hex":return e>>>1;case"base64":return I(t).length;default:if(n)return K(t).length;r=(""+r).toLowerCase(),n=!0}}function R(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 k(this,r,e);case"utf8":case"utf-8":return O(this,r,e);case"ascii":return L(this,r,e);case"latin1":case"binary":return M(this,r,e);case"base64":return S(this,r,e);case"ucs2":case"ucs-2":case"utf16le":case"utf-16le":return N(this,r,e);default:if(n)throw new TypeError("Unknown encoding: "+t);t=(t+"").toLowerCase(),n=!0}}function _(t,r,e){var n=t[r];t[r]=t[e],t[e]=n}function A(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=u.from(r,n)),u.
2018-12-21 19:33:38 +00:00
},{"base64-js":"yh9p","ieee754":"JgNJ","isarray":"REa7","buffer":"dskh"}],"aSGf":[function(require,module,exports) {
var Buffer = require("buffer").Buffer;
2019-02-07 21:38:32 +00:00
var global = arguments[3];
var t=require("buffer").Buffer,e=arguments[3],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;function c(t,e){this.db=t,this.mode=e}function i(t){this.name=t||r,this.db=null}c.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},c.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)}},c.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)}},c.prototype.getObject=function(t,e){this._get(t,e)},c.prototype.getBuffer=function(e,r){this._get(e,function(e,n){if(e)return r(e);r(null,t.from(n))})},c.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)}},c.prototype.putObject=function(t,e,r){this._put(t,e,r)},c.prototype.putBuffer=function(t,e,r){var n=e.buffer;this._put(t,n,r)},c.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)}},i.isSupported=function(){return!!(e.indexedDB||e.mozIndexedDB||e.webkitIndexedDB||e.msIndexedDB)},i.prototype.open=function(t){var r=this;if(r.db)return t();try{var o=(e.indexedDB||e.mozIndexedDB||e.webkitIndexedDB||e.msIndexedDB).open(r.name);o.onupgradeneeded=function(t){var e=t.target.result;e.objectStoreNames.contains(n)&&e.deleteObjectStore(n),e.createObjectStore(n)},o.onsuccess=function(e){r.db=e.target.result,t()},o.onerror=function(e){e.preventDefault(),t(e.error)}}catch(u){t(u)}},i.prototype.getReadOnlyContext=function(){return new c(this.db,u)},i.prototype.getReadWriteContext=function(){return new c(this.db,o)},module.exports=i;
2019-01-03 04:12:19 +00:00
},{"../constants.js":"gCho","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}();
2018-12-21 19:33:38 +00:00
},{"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;
2018-12-21 19:33:38 +00:00
},{"../constants.js":"gCho","../../lib/async.js":"u4Zs"}],"UCG6":[function(require,module,exports) {
2019-01-03 04:12:19 +00:00
var e=require("./indexeddb.js"),r=require("./memory.js");module.exports={IndexedDB:e,Default:e,Memory:r};
},{"./indexeddb.js":"aSGf","./memory.js":"Xhog"}],"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;
},{}],"lsut":[function(require,module,exports) {
2019-02-07 21:38:32 +00:00
"use strict";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,s){n[t]=s}};
2018-12-21 19:33:38 +00:00
},{"../constants.js":"gCho"}],"bQx9":[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)};
},{}],"6D9y":[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;
},{}],"dwX/":[function(require,module,exports) {
2019-01-03 04:12:19 +00:00
var t=require("concat-map"),r=require("balanced-match");module.exports=h;var o="\0SLASH"+Math.random()+"\0",n="\0OPEN"+Math.random()+"\0",a="\0CLOSE"+Math.random()+"\0",p="\0COMMA"+Math.random()+"\0",s="\0PERIOD"+Math.random()+"\0";function u(t){return parseInt(t,10)==t?parseInt(t,10):t.charCodeAt(0)}function l(t){return t.split("\\\\").join(o).split("\\{").join(n).split("\\}").join(a).split("\\,").join(p).split("\\.").join(s)}function f(t){return t.split(o).join("\\").split(n).join("{").split(a).join("}").split(p).join(",").split(s).join(".")}function e(t){if(!t)return[""];var o=[],n=r("{","}",t);if(!n)return t.split(",");var a=n.pre,p=n.body,s=n.post,u=a.split(",");u[u.length-1]+="{"+p+"}";var l=e(s);return s.length&&(u[u.length-1]+=l.shift(),u.push.apply(u,l)),o.push.apply(o,u),o}function h(t){return t?("{}"===t.substr(0,2)&&(t="\\{\\}"+t.substr(2)),M(l(t),!0).map(f)):[]}function v(t){return t}function i(t){return"{"+t+"}"}function g(t){return/^-?0\d/.test(t)}function b(t,r){return t<=r}function j(t,r){return t>=r}function M(o,n){var p=[],s=r("{","}",o);if(!s||/\$$/.test(s.pre))return[o];var l,f=/^-?\d+\.\.-?\d+(?:\.\.-?\d+)?$/.test(s.body),h=/^[a-zA-Z]\.\.[a-zA-Z](?:\.\.-?\d+)?$/.test(s.body),v=f||h,m=s.body.indexOf(",")>=0;if(!v&&!m)return s.post.match(/,.*\}/)?M(o=s.pre+"{"+s.body+a+s.post):[o];if(v)l=s.body.split(/\.\./);else if(1===(l=e(s.body)).length&&1===(l=M(l[0],!1).map(i)).length)return(y=s.post.length?M(s.post,!1):[""]).map(function(t){return s.pre+l[0]+t});var C,O=s.pre,y=s.post.length?M(s.post,!1):[""];if(v){var A=u(l[0]),$=u(l[1]),E=Math.max(l[0].length,l[1].length),I=3==l.length?Math.abs(u(l[2])):1,S=b;$<A&&(I*=-1,S=j);var d=l.some(g);C=[];for(var L=A;S(L,$);L+=I){var Z;if(h)"\\"===(Z=String.fromCharCode(L))&&(Z="");else if(Z=String(L),d){var D=E-Z.length;if(D>0){var H=new Array(D+1).join("0");Z=L<0?"-"+H+Z.slice(1):H+Z}}C.push(Z)}}else C=t(l,function(t){return M(t,!1)});for(var R=0;R<C.length;R++)for(var k=0;k<y.length;k++){var q=O+C[R]+y[k];(!n||v||q)&&p.push(q)}return p}
},{"concat-map":"bQx9","balanced-match":"6D9y"}],"Nt/K":[function(require,module,exports) {
2019-01-03 04:12:19 +00:00
module.exports=l,l.Minimatch=d;var t={sep:"/"};try{t=require("path")}catch(O){}var r=l.GLOBSTAR=d.GLOBSTAR={},n=require("brace-expansion"),e={"!":{open:"(?:(?!(?:",close:"))[^/]*?)"},"?":{open:"(?:",close:")?"},"+":{open:"(?:",close:")+"},"*":{open:"(?:",close:")*"},"@":{open:"(?:",close:")"}},i="[^/]",a=i+"*?",o="(?:(?!(?:\\/|^)(?:\\.{1,2})($|\\/)).)*?",h="(?:(?!(?:\\/|^)\\.).)*?",c=u("().*{}+?[]^$\\!");function u(t){return t.split("").reduce(function(t,r){return t[r]=!0,t},{})}var p=/\/+/;function f(t,r){return r=r||{},function(n,e,i){return l(n,t,r)}}function g(t,r){t=t||{},r=r||{};var n={};return Object.keys(r).forEach(function(t){n[t]=r[t]}),Object.keys(t).forEach(function(r){n[r]=t[r]}),n}function l(t,r,n){if("string"!=typeof r)throw new TypeError("glob pattern string required");return n||(n={}),!(!n.nocomment&&"#"===r.charAt(0))&&(""===r.trim()?""===t:new d(r,n).match(t))}function d(r,n){if(!(this instanceof d))return new d(r,n);if("string"!=typeof r)throw new TypeError("glob pattern string required");n||(n={}),r=r.trim(),"/"!==t.sep&&(r=r.split(t.sep).join("/")),this.options=n,this.set=[],this.pattern=r,this.regexp=null,this.negate=!1,this.comment=!1,this.empty=!1,this.make()}function b(){if(!this._made){var t=this.pattern,r=this.options;if(r.nocomment||"#"!==t.charAt(0))if(t){this.parseNegate();var n=this.globSet=this.braceExpand();r.debug&&(this.debug=console.error),this.debug(this.pattern,n),n=this.globParts=n.map(function(t){return t.split(p)}),this.debug(this.pattern,n),n=n.map(function(t,r,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 m(){var t=this.pattern,r=!1,n=0;if(!this.options.nonegate){for(var e=0,i=t.length;e<i&&"!"===t.charAt(e);e++)r=!r,n++;n&&(this.pattern=t.substr(n)),this.negate=r}}function v(t,r){if(r||(r=this instanceof d?this.options:{}),void 0===(t=void 0===t?this.pattern:t))throw new TypeError("undefined pattern");return r.nobrace||!t.match(/\{.*\}/)?[t]:n(t)}l.filter=f,l.defaults=function(t){if(!t||!Object.keys(t).length)return l;var r=l,n=function(n,e,i){return r.minimatch(n,e,g(t,i))};return n.Minimatch=function(n,e){return new r.Minimatch(n,g(t,e))},n},d.defaults=function(t){return t&&Object.keys(t).length?l.defaults(t).Minimatch:d},d.prototype.debug=function(){},d.prototype.make=b,d.prototype.parseNegate=m,l.braceExpand=function(t,r){return v(t,r)},d.prototype.braceExpand=v,d.prototype.parse=y;var s={};function y(t,n){if(t.length>65536)throw new TypeError("pattern is too long");var o=this.options;if(!o.noglobstar&&"**"===t)return r;if(""===t)return"";var h,u="",p=!!o.nocase,f=!1,g=[],l=[],d=!1,b=-1,m=-1,v="."===t.charAt(0)?"":o.dot?"(?!(?:^|\\/)\\.{1,2}(?:$|\\/))":"(?!\\.)",y=this;function w(){if(h){switch(h){case"*":u+=a,p=!0;break;case"?":u+=i,p=!0;break;default:u+="\\"+h}y.debug("clearStateChar %j %j",h,u),h=!1}}for(var x,j=0,k=t.length;j<k&&(x=t.charAt(j));j++)if(this.debug("%s\t%s %s %j",t,j,u,x),f&&c[x])u+="\\"+x,f=!1;else switch(x){case"/":return!1;case"\\":w(),f=!0;continue;case"?":case"*":case"+":case"@":case"!":if(this.debug("%s\t%s %s %j <-- stateChar",t,j,u,x),d){this.debug(" in class"),"!"===x&&j===m+1&&(x="^"),u+=x;continue}y.debug("call clearStateChar %j",h),w(),h=x,o.noext&&w();continue;case"(":if(d){u+="(";continue}if(!h){u+="\\(";continue}g.push({type:h,start:j-1,reStart:u.length,open:e[h].open,close:e[h].close}),u+="!"===h?"(?:(?!(?:":"(?:",this.debug("plType %j %j",h,u),h=!1;continue;case")":if(d||!g.length){u+="\\)";continue}w(),p=!0;var A=g.pop();u+=A.close,"!"===A.type&&l.push(A),A.reEnd=u.length;continue;case"|":if(d||!g.length||f){u+="\\|",f=!1;continue}w(),u+="|";continue;case"[":if(w(),d){u+="\\"+x;continue}d=!0,m=j,b=u.length,u+=x;continue;case"]":if(j===m+1||!d){u+="\\"+x,f=!1;continue}if(d){var $=t.substring(m+1,j);try{RegExp("["+$+"]")}catch(O){var R=this.parse($,s);u=u.substr(0,b)+"\\["+R[0]+"\\]",p=p||R[1],d=!1;continue}}p=!0,d=!1,u+=x;continue;default:w(),f?f=!1:!c[x]||"^"===x&&d||(u+="\\"),u+
2018-12-21 19:33:38 +00:00
},{"path":"UUq2","brace-expansion":"dwX/"}],"Kf0M":[function(require,module,exports) {
2019-01-03 04:12:19 +00:00
var n=require("es6-promisify"),i=n.promisify,e=require("../path.js"),t=require("../errors.js"),o=require("./environment.js"),r=require("../../lib/async.js"),u=require("minimatch");function f(n,r){var u=this,f=new o((r=r||{}).env),s="/";Object.defineProperty(this,"fs",{get:function(){return n},enumerable:!0}),Object.defineProperty(this,"env",{get:function(){return f},enumerable:!0}),this.cd=function(i,o){i=e.resolve(s,i),n.stat(i,function(n,e){n?o(new t.ENOTDIR(null,i)):"DIRECTORY"===e.type?(s=i,o()):o(new t.ENOTDIR(null,i))})},this.pwd=function(){return s},this.promises={},["cd","exec","touch","cat","ls","rm","tempDir","mkdirp","find"].forEach(function(n){u.promises[n]=i(u[n].bind(u))})}f.prototype.exec=function(n,i,t){var o=this.fs;"function"==typeof i&&(t=i,i=[]),i=i||[],t=t||function(){},n=e.resolve(this.pwd(),n),o.readFile(n,"utf8",function(n,e){if(n)t(n);else try{new Function("fs","args","callback",e)(o,i,t)}catch(r){t(r)}})},f.prototype.touch=function(n,i,t){var o=this.fs;"function"==typeof i&&(t=i,i={}),i=i||{},t=t||function(){},n=e.resolve(this.pwd(),n),o.stat(n,function(e){e?!0===i.updateOnly?t():function(n){o.writeFile(n,"",t)}(n):function(n){var e=Date.now(),r=i.date||e,u=i.date||e;o.utimes(n,r,u,t)}(n)})},f.prototype.cat=function(n,i){var o=this,u=o.fs,f="";i=i||function(){},n?(n="string"==typeof n?[n]:n,r.eachSeries(n,function(n,i){var t=e.resolve(o.pwd(),n);u.readFile(t,"utf8",function(n,e){n?i(n):(f+=e+"\n",i())})},function(n){n?i(n):i(null,f.replace(/\n$/,""))})):i(new t.EINVAL("Missing files argument"))},f.prototype.ls=function(n,i,o){var u=this,f=u.fs;"function"==typeof i&&(o=i,i={}),i=i||{},o=o||function(){},n?function n(t,o){var s=e.resolve(u.pwd(),t),c=[];f.readdir(s,function(t,u){t?o(t):r.eachSeries(u,function(t,o){t=e.join(s,t),f.stat(t,function(t,r){if(t)o(t);else{var u=r;i.recursive&&"DIRECTORY"===r.type?n(e.join(s,u.name),function(n,i){n?o(n):(u.contents=i,c.push(u),o())}):(c.push(u),o())}})},function(n){o(n,c)})})}(n,o):o(new t.EINVAL("Missing dir argument"))},f.prototype.rm=function(n,i,o){var u=this,f=u.fs;"function"==typeof i&&(o=i,i={}),i=i||{},o=o||function(){},n?function n(o,s){o=e.resolve(u.pwd(),o),f.stat(o,function(u,c){u?s(u):"FILE"!==c.type?f.readdir(o,function(u,c){u?s(u):0!==c.length?i.recursive?(c=c.map(function(n){return e.join(o,n)}),r.eachSeries(c,n,function(n){n?s(n):f.rmdir(o,s)})):s(new t.ENOTEMPTY(null,o)):f.rmdir(o,s)}):f.unlink(o,s)})}(n,o):o(new t.EINVAL("Missing path argument"))},f.prototype.tempDir=function(n){var i=this.fs,e=this.env.get("TMP");n=n||function(){},i.mkdir(e,function(){n(null,e)})},f.prototype.mkdirp=function(n,i){var o=this.fs;i=i||function(){},n?"/"!==n?function n(i,r){o.stat(i,function(u,f){if(f){if(f.isDirectory())return void r();if(f.isFile())return void r(new t.ENOTDIR(null,i))}else{if(u&&"ENOENT"!==u.code)return void r(u);var s=e.dirname(i);"/"===s?o.mkdir(i,function(n){n&&"EEXIST"!==n.code?r(n):r()}):n(s,function(n){if(n)return r(n);o.mkdir(i,function(n){n&&"EEXIST"!==n.code?r(n):r()})})}})}(n,i):i():i(new t.EINVAL("Missing path argument"))},f.prototype.find=function(n,i,o){var f=this,s=f.fs;"function"==typeof i&&(o=i,i={}),o=o||function(){};var c=(i=i||{}).exec||function(n,i){i()},p=[];function a(n,t){var o=e.removeTrailing(n);!i.regex||i.regex.test(o)?i.name&&!u(e.basename(o),i.name)||i.path&&!u(e.dirname(o),i.path)?t():function(n,i){c(n,function(e){e?i(e):(p.push(n),i())})}(n,t):t()}function d(n,i){n=e.resolve(f.pwd(),n),s.readdir(n,function(t,o){t?"ENOTDIR"===t.code?a(n,i):i(t):a(e.addTrailing(n),function(t){t?i(t):(o=o.map(function(i){return e.join(n,i)}),r.eachSeries(o,d,function(n){i(n,p)}))})})}n?s.stat(n,function(i,e){i?o(i):e.isDirectory()?d(n,o):o(new t.ENOTDIR(null,n))}):o(new t.EINVAL("Missing path argument"))},module.exports=f;
2018-12-21 19:33:38 +00:00
},{"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;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;
2019-02-07 21:38:32 +00:00
},{}],"zFPO":[function(require,module,exports) {
function x(x){return x.replace(/[xy]/g,function(x){var n=16*Math.random()|0;return("x"===x?n:3&n|8).toString(16)})}function n(){return x("xxxxxxxx-xxxx-4xxx-yxxx-xxxxxxxxxxxx").toUpperCase()}function r(n){return x("x".repeat(n=n||6))}function t(){}module.exports={guid:n,nop:t,randomChars:r};
},{}],"u7Jv":[function(require,module,exports) {
var global = arguments[3];
var t=arguments[3];function e(t){return(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})(t)}var 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"===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(r){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(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].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(i){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(i){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;
2018-12-21 19:33:38 +00:00
},{"./eventemitter.js":"J4Qg","../src/shared.js":"zFPO"}],"p3D+":[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;
2019-02-07 21:38:32 +00:00
},{"../lib/eventemitter.js":"J4Qg","./path.js":"8thZ","../lib/intercom.js":"u7Jv"}],"RlAD":[function(require,module,exports) {
var t=require("./constants.js").NODE_TYPE_FILE;module.exports=function(s,e){this.id=s,this.type=e||t};
2019-01-03 04:12:19 +00:00
},{"./constants.js":"gCho"}],"U1jA":[function(require,module,exports) {
var r=require("./constants"),e=r.FIRST_DESCRIPTOR,n={},t=function(){for(var r=e;o(r);)r++;return r},o=function(r){return n[r]},i=function(r){var e=t();return n[e]=r,e},u=function(r){return delete n[r]};module.exports={allocDescriptor:i,releaseDescriptor:u,getOpenFileDescription:o};
},{"./constants":"gCho"}],"epsH":[function(require,module,exports) {
function t(t,i){if(!(t instanceof i))throw new TypeError("Cannot call a class as a function")}function i(t,i){for(var s=0;s<i.length;s++){var e=i[s];e.enumerable=e.enumerable||!1,e.configurable=!0,"value"in e&&(e.writable=!0),Object.defineProperty(t,e.key,e)}}function s(t,s,e){return s&&i(t.prototype,s),e&&i(t,e),t}var e=require("./constants"),n=e.NODE_TYPE_FILE,r=e.NODE_TYPE_DIRECTORY,a=e.NODE_TYPE_SYMBOLIC_LINK,o=e.DEFAULT_FILE_PERMISSIONS,u=e.DEFAULT_DIR_PERMISSIONS,h=require("./constants").fsConstants,c=h.S_IFREG,f=h.S_IFDIR,m=h.S_IFLNK;function d(t,i,s){if(t[i])return s();t.guid(function(e,n){if(e)return s(e);t[i]=n,s()})}function l(t,i){switch(t){case r:return(i||u)|f;case a:return(i||o)|m;case n:default:return(i||o)|c}}var p=function(){function i(s){t(this,i);var e=Date.now();this.id=s.id,this.data=s.data,this.size=s.size||0,this.atime=s.atime||e,this.ctime=s.ctime||e,this.mtime=s.mtime||e,this.flags=s.flags||[],this.xattrs=s.xattrs||{},this.nlinks=s.nlinks||0,"string"==typeof s.type?this.type=s.type:"string"==typeof s.mode?this.type=s.mode:this.type=n,this.permissions=s.permissions||l(this.type),this.uid=s.uid||0,this.gid=s.gid||0}return s(i,[{key:"toJSON",value:function(){return{id:this.id,data:this.data,size:this.size,atime:this.atime,ctime:this.ctime,mtime:this.ctime,flags:this.flags,xattrs:this.xattrs,nlinks:this.nlinks,mode:this.type,permissions:this.permissions,uid:this.uid,gid:this.gid}}},{key:"mode",get:function(){return l(this.type,this.permissions)},set:function(t){this.permissions=t}}]),i}();module.exports.create=function(t,i){d(t,"id",function(s){if(s)return i(s);d(t,"data",function(s){if(s)return i(s);i(null,new p(t))})})};
2018-12-21 19:33:38 +00:00
},{"./constants":"gCho"}],"E+68":[function(require,module,exports) {
var e=require("./errors.js"),t=require("./node");function i(e,t,i,r){this.path=e,this.id=t,this.flags=i,this.position=r}i.prototype.getNode=function(i,r){var o=this.id,n=this.path;i.getObject(o,function(i,o){return i?r(i):o?void t.create(o,r):r(new e.EBADF("file descriptor refers to unknown node",n))})},module.exports=i;
2018-12-21 19:33:38 +00:00
},{"./errors.js":"Hmaa","./node":"epsH"}],"3YM/":[function(require,module,exports) {
var t=require("./constants.js");function e(e){var i=Date.now();this.id=t.SUPER_NODE_ID,this.type=t.NODE_TYPE_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;
2018-12-21 19:33:38 +00:00
},{"./constants.js":"gCho"}],"OfGU":[function(require,module,exports) {
2019-02-07 21:38:32 +00:00
"use strict";var t=require("./constants.js"),i=require("./path.js");function e(t){return new Date(Number(t))}function s(t,s,o){this.dev=o,this.node=s.id,this.type=s.type,this.size=s.size,this.nlinks=s.nlinks,this.atime=e(s.atime),this.mtime=e(s.mtime),this.ctime=e(s.ctime),this.atimeMs=s.atime,this.mtimeMs=s.mtime,this.ctimeMs=s.ctime,this.version=s.version,this.mode=s.mode,this.uid=s.uid,this.gid=s.gid,this.name=i.basename(t)}s.prototype.isFile=function(){return this.type===t.NODE_TYPE_FILE},s.prototype.isDirectory=function(){return this.type===t.NODE_TYPE_DIRECTORY},s.prototype.isSymbolicLink=function(){return this.type===t.NODE_TYPE_SYMBOLIC_LINK},s.prototype.isSocket=s.prototype.isFIFO=s.prototype.isCharacterDevice=s.prototype.isBlockDevice=function(){return!1},module.exports=s;
2018-12-21 19:33:38 +00:00
},{"./constants.js":"gCho","./path.js":"8thZ"}],"HvxC":[function(require,module,exports) {
var Buffer = require("buffer").Buffer;
2019-02-08 03:54:40 +00:00
var n=require("buffer").Buffer;function t(n){return(t="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})(n)}var e=require("../path.js"),i=e.normalize,u=e.dirname,o=e.basename,f=e.isAbsolute,s=require("../shared.js"),r=require("../constants.js"),a=r.NODE_TYPE_FILE,c=r.NODE_TYPE_DIRECTORY,p=r.NODE_TYPE_SYMBOLIC_LINK,d=r.NODE_TYPE_META,m=r.FULL_READ_WRITE_EXEC_PERMISSIONS,E=r.ROOT_DIRECTORY_NAME,w=r.SUPER_NODE_ID,O=r.SYMLOOP_MAX,l=r.O_READ,g=r.O_WRITE,v=r.O_CREATE,y=r.O_EXCLUSIVE,N=r.O_APPEND,A=r.O_FLAGS,D=r.XATTR_CREATE,I=r.XATTR_REPLACE,j=r.FS_NOMTIME,T=r.FS_NOCTIME,h=require("../errors.js"),b=require("../directory-entry.js"),L=require("../open-files.js"),R=require("../open-file-description.js"),F=require("../super-node.js"),V=require("../node.js"),B=require("../stats.js");function P(n,t,e,i,u){var o=n.flags;o.includes(T)&&delete i.ctime,o.includes(j)&&delete i.mtime;var f=!1;function s(e){n.changes.push({event:"change",path:t}),u(e)}i.ctime&&(e.ctime=i.ctime,e.atime=i.ctime,f=!0),i.atime&&(e.atime=i.atime,f=!0),i.mtime&&(e.mtime=i.mtime,f=!0),f?n.putObject(e.id,e,s):s()}function S(n,t,e,f){if(e!==c&&e!==a)return f(new h.EINVAL("type must be a directory or file",t));t=i(t);var s,r,p,d=o(t),m=u(t);function E(e,i){!e&&i?f(new h.EEXIST("path name already exists",t)):!e||e instanceof h.ENOENT?n.getObject(s.data,w):f(e)}function w(t,i){t?f(t):(r=i,V.create({guid:n.guid,type:e},function(t,e){t?f(t):((p=e).nlinks+=1,n.putObject(p.id,p,l))}))}function O(t){if(t)f(t);else{var e=Date.now();P(n,m,p,{mtime:e,ctime:e},f)}}function l(t){t?f(t):(r[d]=new b(p.id,e),n.putObject(s.data,r,O))}_(n,m,function(e,i){e?f(e):i.type!==c?f(new h.ENOTDIR("a component of the path prefix is not a directory",t)):(s=i,_(n,t,E))})}function _(n,t,e){if(!(t=i(t)))return e(new h.ENOENT("path is an empty string"));var f=o(t),s=u(t),r=0;function a(t,i){if(t)return e(t);var u=new F(i);u&&u.type===d&&u.rnode?n.getObject(u.rnode,m):e(new h.EFILESYSTEMERROR)}function m(n,t){n?e(n):t?V.create(t,e):e(new h.ENOENT)}function l(i,u){i?e(i):u.type===c&&u.data?n.getObject(u.data,g):e(new h.ENOTDIR("a component of the path prefix is not a directory",t))}function g(i,u){if(i)e(i);else if(u.hasOwnProperty(f)){var o=u[f].id;n.getObject(o,v)}else e(new h.ENOENT(null,t))}function v(n,t){if(n)return e(n);V.create(t,y)}function y(c,d){var m;c?e(c):d.type===p?++r>O?e(new h.ELOOP(null,t)):(m=d.data,m=i(m),s=u(m),f=o(m),E===f?n.getObject(w,a):_(n,s,l)):e(null,d)}E===f?n.getObject(w,a):_(n,s,l)}function x(n,t,e,i,u,o,f){var s=e.xattrs;o===D&&s.hasOwnProperty(i)?f(new h.EEXIST("attribute already exists",t)):o!==I||s.hasOwnProperty(i)?(s[i]=u,n.putObject(e.id,e,function(i){i?f(i):P(n,t,e,{ctime:Date.now()},f)})):f(new h.ENOATTR(null,t))}function C(n,t){var e,i,u;function o(u){u?t(u):V.create({guid:n.guid,id:e.rnode,type:c},function(e,u){e?t(e):((i=u).nlinks+=1,n.putObject(i.id,i,f))})}function f(e){e?t(e):(u={},n.putObject(i.data,u,t))}n.getObject(w,function(i,u){!i&&u?t():!i||i instanceof h.ENOENT?F.create({guid:n.guid},function(i,u){i?t(i):(e=u,n.putObject(e.id,e,o))}):t(i)})}function X(n,t,e){t=i(t);var f,s,r,a,p=o(t),d=u(t);function m(t,i){t?e(t):(r=i,n.getObject(r.data,E))}function E(t,i){t?e(t):(a=i,V.create({guid:n.guid,type:c},function(t,i){t?e(t):((f=i).nlinks+=1,n.putObject(f.id,f,w))}))}function w(t){t?e(t):(s={},n.putObject(f.data,s,l))}function O(t){if(t)e(t);else{var i=Date.now();P(n,d,r,{mtime:i,ctime:i},e)}}function l(t){t?e(t):(a[p]=new b(f.id,c),n.putObject(r.data,a,O))}_(n,t,function(i,u){!i&&u?e(new h.EEXIST(null,t)):!i||i instanceof h.ENOENT?_(n,d,m):e(i)})}function q(n,t,e,u){var o=r.fsConstants,f=o.F_OK,s=o.R_OK,a=o.W_OK,c=o.X_OK,p=o.S_IXUSR,d=o.S_IXGRP,m=o.S_IXOTH;_(n,t=i(t),function(n,i){if(n)return u(n);if(e===f)return u(null);var o=Pn(i.mode,u);return o?e&(s|a)?u(null):e&c&&o&(p|d|m)?u(null):void u(new h.EACCES("permission denied",t)):void 0})}function M(n,t,e){t=i(t);var f,s,r,a,p=o(t),d=u(t);function m(i,
2019-02-07 21:38:32 +00:00
},{"../path.js":"8thZ","../shared.js":"zFPO","../constants.js":"gCho","../errors.js":"Hmaa","../directory-entry.js":"RlAD","../open-files.js":"U1jA","../open-file-description.js":"E+68","../super-node.js":"3YM/","../node.js":"epsH","../stats.js":"OfGU","buffer":"dskh"}],"Q4+W":[function(require,module,exports) {
2019-01-03 04:12:19 +00:00
var Buffer = require("buffer").Buffer;
2019-02-07 21:38:32 +00:00
var e=require("buffer").Buffer,r=require("es6-promisify"),t=r.promisify,n=require("../path.js"),a=require("../providers/index.js"),s=require("../shell/shell.js"),o=require("../../lib/intercom.js"),i=require("../fs-watcher.js"),u=require("../errors.js"),m=require("../shared.js"),c=m.nop,f=m.guid,l=require("../constants.js"),h=l.fsConstants,p=l.FILE_SYSTEM_NAME,d=l.FS_FORMAT,g=l.FS_READY,b=l.FS_PENDING,A=l.FS_ERROR,P=l.FS_NODUPEIDCHECK,v=l.STDIN,y=l.STDOUT,E=l.STDERR,R=require("./implementation.js");function w(e){return"function"==typeof e?e:function(e){if(e)throw e}}function S(e){e&&console.error("Filer error: ",e)}function O(e){if(!(e&&e.protocol&&e.pathname))return e;if("file:"!==e.protocol)throw new u.EINVAL("only file: URLs are supported for paths",e);for(var r=e.pathname,t=0;t<r.length;t++)if("%"===r[t]){var n=32|r.codePointAt(t+2);if("2"===r[t+1]&&102===n)throw new u.EINVAL("file: URLs must not include encoded / characters",e)}return decodeURIComponent(r)}function x(r){return e.isBuffer(r)?r.toString():r}function F(e,r){return e?n.isNull(e)?new u.EINVAL("Path must be a string without null bytes.",e):r||n.isAbsolute(e)?void 0:new u.EINVAL("Path must be absolute.",e):new u.EINVAL("Path must be a string",e)}function _(e,r,t){var n=e[r],a=F(n=x(n=O(n)),t);if(a)throw a;e[r]=n}function q(e,r){r=r||S;var m=(e=e||{}).flags||[],l=e.guid?e.guid:f,O=e.provider||new a.Default(e.name||p),x=e.name||O.name,F=m.includes(d),I=this;I.readyState=b,I.name=x,I.error=null,I.stdin=v,I.stdout=y,I.stderr=E,I.constants=h,I.F_OK=h.F_OK,I.R_OK=h.R_OK,I.W_OK=h.W_OK,I.X_OK=h.X_OK,this.Shell=s.bind(void 0,this);var N=[];function j(e){return function(r){m.includes(P)?r(null,l()):function r(t){var n=l();e.getObject(n,function(e,a){e?t(e):a?r(t):t(null,n)})}(r)}}this.queueOrRun=function(e){var r;return g===I.readyState?e.call(I):A===I.readyState?r=new u.EFILESYSTEMERROR("unknown error"):N.push(e),r},this.watch=function(e,r,t){if(n.isNull(e))throw new Error("Path must be a string without null bytes.");"function"==typeof r&&(t=r,r={}),r=r||{},t=t||c;var a=new i;return a.start(e,!1,r.recursive),a.on("change",t),a},O.open(function(e){function t(e){function t(e){var r=O[e]();return r.name=x,r.flags=m,r.changes=[],r.guid=j(r),r.close=function(){var e=r.changes;!function(e){if(e.length){var r=o.getInstance();e.forEach(function(e){r.emit(e.event,e.path)})}}(e),e.length=0},r}I.provider={openReadWriteContext:function(){return t("getReadWriteContext")},openReadOnlyContext:function(){return t("getReadOnlyContext")}},I.readyState=e?A:g,N.forEach(function(e){e.call(this)}.bind(I)),N=null,r(e,I)}if(e)return t(e);var n=O.getReadWriteContext();n.guid=j(n),F?n.clear(function(e){if(e)return t(e);R.ensureRootDirectory(n,t)}):R.ensureRootDirectory(n,t)}),q.prototype.promises={},[{name:"appendFile",promises:!0,absPathArgs:[0]},{name:"access",promises:!0,absPathArgs:[0]},{name:"chown",promises:!0,absPathArgs:[0]},{name:"chmod",promises:!0,absPathArgs:[0]},{name:"close"},{name:"exists",absPathArgs:[0]},{name:"fchown"},{name:"fchmod"},{name:"fgetxattr"},{name:"fremovexattr"},{name:"fsetxattr"},{name:"fstat"},{name:"fsync"},{name:"ftruncate"},{name:"futimes"},{name:"getxattr",promises:!0,absPathArgs:[0]},{name:"link",promises:!0,absPathArgs:[0,1]},{name:"lseek"},{name:"lstat",promises:!0},{name:"mkdir",promises:!0,absPathArgs:[0]},{name:"mkdtemp",promises:!0},{name:"mknod",promises:!0,absPathArgs:[0]},{name:"open",promises:!0,absPathArgs:[0]},{name:"readdir",promises:!0,absPathArgs:[0]},{name:"read"},{name:"readFile",promises:!0,absPathArgs:[0]},{name:"readlink",promises:!0,absPathArgs:[0]},{name:"removexattr",promises:!0,absPathArgs:[0]},{name:"rename",promises:!0,absPathArgs:[0,1]},{name:"rmdir",promises:!0,absPathArgs:[0]},{name:"setxattr",promises:!0,absPathArgs:[0]},{name:"stat",promises:!0,absPathArgs:[0]},{name:"symlink",promises:!0,relPathArgs:[0],absPathArgs:[1]},{name:"truncate",promises:!0,absPathArgs:[0]},{name:"unlink",promises:!0,absPathArgs:[0]},{name:"utimes",promises:!0,absPathArgs:[0]},{name:"writeFile",promises:!0,absPathArgs:[0]},{name:"write"}].forEach(
},{"es6-promisify":"0c0E","../path.js":"8thZ","../providers/index.js":"UCG6","../shell/shell.js":"Kf0M","../../lib/intercom.js":"u7Jv","../fs-watcher.js":"p3D+","../errors.js":"Hmaa","../shared.js":"zFPO","../constants.js":"gCho","./implementation.js":"HvxC","buffer":"dskh"}],"2u/B":[function(require,module,exports) {
var Buffer = require("buffer").Buffer;
2019-01-03 04:12:19 +00:00
var e=require("buffer").Buffer,r=null,l=null;module.exports=l={FileSystem:require("./filesystem/interface.js"),Buffer:e,Path:require("./path.js"),path:require("./path.js"),Errors:require("./errors.js"),Shell:require("./shell/shell.js")},Object.defineProperty(l,"fs",{enumerable:!0,get:function(){return r||(r=new l.FileSystem),r}});
2018-12-21 19:33:38 +00:00
},{"./filesystem/interface.js":"Q4+W","./path.js":"8thZ","./errors.js":"Hmaa","./shell/shell.js":"Kf0M","buffer":"dskh"}]},{},["2u/B"], "Filer")