From 4a9a0a05a3a20822fd2c5c64bc2f391922f8e65b Mon Sep 17 00:00:00 2001 From: Paul Merlin Date: Sat, 13 Jun 2020 14:30:57 +0200 Subject: [PATCH] Lint 3 --- dist/main/index.js | 2 +- src/provision.ts | 28 ++++++++++------------------ 2 files changed, 11 insertions(+), 19 deletions(-) diff --git a/dist/main/index.js b/dist/main/index.js index e0076fb..d125dfe 100644 --- a/dist/main/index.js +++ b/dist/main/index.js @@ -1 +1 @@ -module.exports=function(e,t){"use strict";var r={};function __webpack_require__(t){if(r[t]){return r[t].exports}var n=r[t]={i:t,l:false,exports:{}};var i=true;try{e[t].call(n.exports,n,n.exports,__webpack_require__);i=false}finally{if(i)delete r[t]}n.l=true;return n.exports}__webpack_require__.ab=__dirname+"/";function startup(){return __webpack_require__(131)}t(__webpack_require__);return startup()}({1:function(e,t,r){"use strict";var n=this&&this.__awaiter||function(e,t,r,n){function adopt(e){return e instanceof r?e:new r(function(t){t(e)})}return new(r||(r=Promise))(function(r,i){function fulfilled(e){try{step(n.next(e))}catch(e){i(e)}}function rejected(e){try{step(n["throw"](e))}catch(e){i(e)}}function step(e){e.done?r(e.value):adopt(e.value).then(fulfilled,rejected)}step((n=n.apply(e,t||[])).next())})};Object.defineProperty(t,"__esModule",{value:true});const i=r(129);const o=r(622);const a=r(669);const s=r(672);const u=a.promisify(i.exec);function cp(e,t,r={}){return n(this,void 0,void 0,function*(){const{force:n,recursive:i}=readCopyOptions(r);const a=(yield s.exists(t))?yield s.stat(t):null;if(a&&a.isFile()&&!n){return}const u=a&&a.isDirectory()?o.join(t,o.basename(e)):t;if(!(yield s.exists(e))){throw new Error(`no such file or directory: ${e}`)}const l=yield s.stat(e);if(l.isDirectory()){if(!i){throw new Error(`Failed to copy. ${e} is a directory, but tried to copy without recursive flag.`)}else{yield cpDirRecursive(e,u,0,n)}}else{if(o.relative(e,u)===""){throw new Error(`'${u}' and '${e}' are the same file`)}yield copyFile(e,u,n)}})}t.cp=cp;function mv(e,t,r={}){return n(this,void 0,void 0,function*(){if(yield s.exists(t)){let n=true;if(yield s.isDirectory(t)){t=o.join(t,o.basename(e));n=yield s.exists(t)}if(n){if(r.force==null||r.force){yield rmRF(t)}else{throw new Error("Destination already exists")}}}yield mkdirP(o.dirname(t));yield s.rename(e,t)})}t.mv=mv;function rmRF(e){return n(this,void 0,void 0,function*(){if(s.IS_WINDOWS){try{if(yield s.isDirectory(e,true)){yield u(`rd /s /q "${e}"`)}else{yield u(`del /f /a "${e}"`)}}catch(e){if(e.code!=="ENOENT")throw e}try{yield s.unlink(e)}catch(e){if(e.code!=="ENOENT")throw e}}else{let t=false;try{t=yield s.isDirectory(e)}catch(e){if(e.code!=="ENOENT")throw e;return}if(t){yield u(`rm -rf "${e}"`)}else{yield s.unlink(e)}}})}t.rmRF=rmRF;function mkdirP(e){return n(this,void 0,void 0,function*(){yield s.mkdirP(e)})}t.mkdirP=mkdirP;function which(e,t){return n(this,void 0,void 0,function*(){if(!e){throw new Error("parameter 'tool' is required")}if(t){const t=yield which(e,false);if(!t){if(s.IS_WINDOWS){throw new Error(`Unable to locate executable file: ${e}. Please verify either the file path exists or the file can be found within a directory specified by the PATH environment variable. Also verify the file has a valid extension for an executable file.`)}else{throw new Error(`Unable to locate executable file: ${e}. Please verify either the file path exists or the file can be found within a directory specified by the PATH environment variable. Also check the file mode to verify the file is executable.`)}}}try{const t=[];if(s.IS_WINDOWS&&process.env.PATHEXT){for(const e of process.env.PATHEXT.split(o.delimiter)){if(e){t.push(e)}}}if(s.isRooted(e)){const r=yield s.tryGetExecutablePath(e,t);if(r){return r}return""}if(e.includes("/")||s.IS_WINDOWS&&e.includes("\\")){return""}const r=[];if(process.env.PATH){for(const e of process.env.PATH.split(o.delimiter)){if(e){r.push(e)}}}for(const n of r){const r=yield s.tryGetExecutablePath(n+o.sep+e,t);if(r){return r}}return""}catch(e){throw new Error(`which failed with message ${e.message}`)}})}t.which=which;function readCopyOptions(e){const t=e.force==null?true:e.force;const r=Boolean(e.recursive);return{force:t,recursive:r}}function cpDirRecursive(e,t,r,i){return n(this,void 0,void 0,function*(){if(r>=255)return;r++;yield mkdirP(t);const n=yield s.readdir(e);for(const o of n){const n=`${e}/${o}`;const a=`${t}/${o}`;const u=yield s.lstat(n);if(u.isDirectory()){yield cpDirRecursive(n,a,r,i)}else{yield copyFile(n,a,i)}}yield s.chmod(t,(yield s.stat(e)).mode)})}function copyFile(e,t,r){return n(this,void 0,void 0,function*(){if((yield s.lstat(e)).isSymbolicLink()){try{yield s.lstat(t);yield s.unlink(t)}catch(e){if(e.code==="EPERM"){yield s.chmod(t,"0666");yield s.unlink(t)}}const r=yield s.readlink(e);yield s.symlink(r,t,s.IS_WINDOWS?"junction":null)}else if(!(yield s.exists(t))||r){yield s.copyFile(e,t)}})}},9:function(e,t,r){"use strict";var n=this&&this.__awaiter||function(e,t,r,n){function adopt(e){return e instanceof r?e:new r(function(t){t(e)})}return new(r||(r=Promise))(function(r,i){function fulfilled(e){try{step(n.next(e))}catch(e){i(e)}}function rejected(e){try{step(n["throw"](e))}catch(e){i(e)}}function step(e){e.done?r(e.value):adopt(e.value).then(fulfilled,rejected)}step((n=n.apply(e,t||[])).next())})};var i=this&&this.__importStar||function(e){if(e&&e.__esModule)return e;var t={};if(e!=null)for(var r in e)if(Object.hasOwnProperty.call(e,r))t[r]=e[r];t["default"]=e;return t};Object.defineProperty(t,"__esModule",{value:true});const o=i(r(87));const a=i(r(614));const s=i(r(129));const u=i(r(622));const l=i(r(1));const c=i(r(672));const f=process.platform==="win32";class ToolRunner extends a.EventEmitter{constructor(e,t,r){super();if(!e){throw new Error("Parameter 'toolPath' cannot be null or empty.")}this.toolPath=e;this.args=t||[];this.options=r||{}}_debug(e){if(this.options.listeners&&this.options.listeners.debug){this.options.listeners.debug(e)}}_getCommandString(e,t){const r=this._getSpawnFileName();const n=this._getSpawnArgs(e);let i=t?"":"[command]";if(f){if(this._isCmdFile()){i+=r;for(const e of n){i+=` ${e}`}}else if(e.windowsVerbatimArguments){i+=`"${r}"`;for(const e of n){i+=` ${e}`}}else{i+=this._windowsQuoteCmdArg(r);for(const e of n){i+=` ${this._windowsQuoteCmdArg(e)}`}}}else{i+=r;for(const e of n){i+=` ${e}`}}return i}_processLineBuffer(e,t,r){try{let n=t+e.toString();let i=n.indexOf(o.EOL);while(i>-1){const e=n.substring(0,i);r(e);n=n.substring(i+o.EOL.length);i=n.indexOf(o.EOL)}t=n}catch(e){this._debug(`error processing line. Failed with error ${e}`)}}_getSpawnFileName(){if(f){if(this._isCmdFile()){return process.env["COMSPEC"]||"cmd.exe"}}return this.toolPath}_getSpawnArgs(e){if(f){if(this._isCmdFile()){let t=`/D /S /C "${this._windowsQuoteCmdArg(this.toolPath)}`;for(const r of this.args){t+=" ";t+=e.windowsVerbatimArguments?r:this._windowsQuoteCmdArg(r)}t+='"';return[t]}}return this.args}_endsWith(e,t){return e.endsWith(t)}_isCmdFile(){const e=this.toolPath.toUpperCase();return this._endsWith(e,".CMD")||this._endsWith(e,".BAT")}_windowsQuoteCmdArg(e){if(!this._isCmdFile()){return this._uvQuoteCmdArg(e)}if(!e){return'""'}const t=[" ","\t","&","(",")","[","]","{","}","^","=",";","!","'","+",",","`","~","|","<",">",'"'];let r=false;for(const n of e){if(t.some(e=>e===n)){r=true;break}}if(!r){return e}let n='"';let i=true;for(let t=e.length;t>0;t--){n+=e[t-1];if(i&&e[t-1]==="\\"){n+="\\"}else if(e[t-1]==='"'){i=true;n+='"'}else{i=false}}n+='"';return n.split("").reverse().join("")}_uvQuoteCmdArg(e){if(!e){return'""'}if(!e.includes(" ")&&!e.includes("\t")&&!e.includes('"')){return e}if(!e.includes('"')&&!e.includes("\\")){return`"${e}"`}let t='"';let r=true;for(let n=e.length;n>0;n--){t+=e[n-1];if(r&&e[n-1]==="\\"){t+="\\"}else if(e[n-1]==='"'){r=true;t+="\\"}else{r=false}}t+='"';return t.split("").reverse().join("")}_cloneExecOptions(e){e=e||{};const t={cwd:e.cwd||process.cwd(),env:e.env||process.env,silent:e.silent||false,windowsVerbatimArguments:e.windowsVerbatimArguments||false,failOnStdErr:e.failOnStdErr||false,ignoreReturnCode:e.ignoreReturnCode||false,delay:e.delay||1e4};t.outStream=e.outStream||process.stdout;t.errStream=e.errStream||process.stderr;return t}_getSpawnOptions(e,t){e=e||{};const r={};r.cwd=e.cwd;r.env=e.env;r["windowsVerbatimArguments"]=e.windowsVerbatimArguments||this._isCmdFile();if(e.windowsVerbatimArguments){r.argv0=`"${t}"`}return r}exec(){return n(this,void 0,void 0,function*(){if(!c.isRooted(this.toolPath)&&(this.toolPath.includes("/")||f&&this.toolPath.includes("\\"))){this.toolPath=u.resolve(process.cwd(),this.options.cwd||process.cwd(),this.toolPath)}this.toolPath=yield l.which(this.toolPath,true);return new Promise((e,t)=>{this._debug(`exec tool: ${this.toolPath}`);this._debug("arguments:");for(const e of this.args){this._debug(` ${e}`)}const r=this._cloneExecOptions(this.options);if(!r.silent&&r.outStream){r.outStream.write(this._getCommandString(r)+o.EOL)}const n=new ExecState(r,this.toolPath);n.on("debug",e=>{this._debug(e)});const i=this._getSpawnFileName();const a=s.spawn(i,this._getSpawnArgs(r),this._getSpawnOptions(this.options,i));const u="";if(a.stdout){a.stdout.on("data",e=>{if(this.options.listeners&&this.options.listeners.stdout){this.options.listeners.stdout(e)}if(!r.silent&&r.outStream){r.outStream.write(e)}this._processLineBuffer(e,u,e=>{if(this.options.listeners&&this.options.listeners.stdline){this.options.listeners.stdline(e)}})})}const l="";if(a.stderr){a.stderr.on("data",e=>{n.processStderr=true;if(this.options.listeners&&this.options.listeners.stderr){this.options.listeners.stderr(e)}if(!r.silent&&r.errStream&&r.outStream){const t=r.failOnStdErr?r.errStream:r.outStream;t.write(e)}this._processLineBuffer(e,l,e=>{if(this.options.listeners&&this.options.listeners.errline){this.options.listeners.errline(e)}})})}a.on("error",e=>{n.processError=e.message;n.processExited=true;n.processClosed=true;n.CheckComplete()});a.on("exit",e=>{n.processExitCode=e;n.processExited=true;this._debug(`Exit code ${e} received from tool '${this.toolPath}'`);n.CheckComplete()});a.on("close",e=>{n.processExitCode=e;n.processExited=true;n.processClosed=true;this._debug(`STDIO streams have closed for tool '${this.toolPath}'`);n.CheckComplete()});n.on("done",(r,n)=>{if(u.length>0){this.emit("stdline",u)}if(l.length>0){this.emit("errline",l)}a.removeAllListeners();if(r){t(r)}else{e(n)}});if(this.options.input){if(!a.stdin){throw new Error("child process missing stdin")}a.stdin.end(this.options.input)}})})}}t.ToolRunner=ToolRunner;function argStringToArray(e){const t=[];let r=false;let n=false;let i="";function append(e){if(n&&e!=='"'){i+="\\"}i+=e;n=false}for(let o=0;o0){t.push(i);i=""}continue}append(a)}if(i.length>0){t.push(i.trim())}return t}t.argStringToArray=argStringToArray;class ExecState extends a.EventEmitter{constructor(e,t){super();this.processClosed=false;this.processError="";this.processExitCode=0;this.processExited=false;this.processStderr=false;this.delay=1e4;this.done=false;this.timeout=null;if(!t){throw new Error("toolPath must not be empty")}this.options=e;this.toolPath=t;if(e.delay){this.delay=e.delay}}CheckComplete(){if(this.done){return}if(this.processClosed){this._setResult()}else if(this.processExited){this.timeout=setTimeout(ExecState.HandleTimeout,this.delay,this)}}_debug(e){this.emit("debug",e)}_setResult(){let e;if(this.processExited){if(this.processError){e=new Error(`There was an error when attempting to execute the process '${this.toolPath}'. This may indicate the process failed to start. Error: ${this.processError}`)}else if(this.processExitCode!==0&&!this.options.ignoreReturnCode){e=new Error(`The process '${this.toolPath}' failed with exit code ${this.processExitCode}`)}else if(this.processStderr&&this.options.failOnStdErr){e=new Error(`The process '${this.toolPath}' failed because one or more lines were written to the STDERR stream`)}}if(this.timeout){clearTimeout(this.timeout);this.timeout=null}this.done=true;this.emit("done",e,this.processExitCode)}static HandleTimeout(e){if(e.done){return}if(!e.processClosed&&e.processExited){const t=`The STDIO streams did not close within ${e.delay/1e3} seconds of the exit event from process '${e.toolPath}'. This may indicate a child process inherited the STDIO streams and has not yet exited.`;e._debug(t)}e._setResult()}}},11:function(e){e.exports=wrappy;function wrappy(e,t){if(e&&t)return wrappy(e)(t);if(typeof e!=="function")throw new TypeError("need wrapper function");Object.keys(e).forEach(function(t){wrapper[t]=e[t]});return wrapper;function wrapper(){var t=new Array(arguments.length);for(var r=0;r{a.debug(`${t.arch}===${u} && ${t.platform}===${n}`);let r=t.arch===u&&t.platform===n;if(r&&t.platform_version){const n=e.exports._getOsVersion();if(n===t.platform_version){r=true}else{r=o.satisfies(n,t.platform_version)}}return r});if(f){a.debug(`matched ${s.version}`);c=s;break}}}if(c&&f){l=Object.assign({},c);l.files=[f]}return l})}t._findMatch=_findMatch;function _getOsVersion(){const t=s.platform();let r="";if(t==="darwin"){r=u.execSync("sw_vers -productVersion").toString()}else if(t==="linux"){const t=e.exports._readLinuxVersionFile();if(t){const e=t.split("\n");for(const t of e){const e=t.split("=");if(e.length===2&&e[0].trim()==="DISTRIB_RELEASE"){r=e[1].trim();break}}}}return r}t._getOsVersion=_getOsVersion;function _readLinuxVersionFile(){const e="/etc/lsb-release";let t="";if(l.existsSync(e)){t=l.readFileSync(e).toString()}return t}t._readLinuxVersionFile=_readLinuxVersionFile},49:function(e,t,r){var n=r(11);e.exports=n(once);e.exports.strict=n(onceStrict);once.proto=once(function(){Object.defineProperty(Function.prototype,"once",{value:function(){return once(this)},configurable:true});Object.defineProperty(Function.prototype,"onceStrict",{value:function(){return onceStrict(this)},configurable:true})});function once(e){var t=function(){if(t.called)return t.value;t.called=true;return t.value=e.apply(this,arguments)};t.called=false;return t}function onceStrict(e){var t=function(){if(t.called)throw new Error(t.onceError);t.called=true;return t.value=e.apply(this,arguments)};var r=e.name||"Function wrapped with `once`";t.onceError=r+" shouldn't be called more than once";t.called=false;return t}},58:function(e,t,r){e.exports=FileReader;var n=r(598);var i=r(689);var o=r(953);var a={EOF:true};var s={CLOSE:true};i(FileReader,o);function FileReader(e){var t=this;if(!(t instanceof FileReader)){throw new Error("FileReader must be called as constructor.")}if(!(e.type==="Link"&&e.Link||e.type==="File"&&e.File)){throw new Error("Non-file type "+e.type)}t._buffer=[];t._bytesEmitted=0;o.call(t,e)}FileReader.prototype._getStream=function(){var e=this;var t=e._stream=n.createReadStream(e._path,e.props);if(e.props.blksize){t.bufferSize=e.props.blksize}t.on("open",e.emit.bind(e,"open"));t.on("data",function(t){e._bytesEmitted+=t.length;if(!t.length){return}else if(e._paused||e._buffer.length){e._buffer.push(t);e._read()}else e.emit("data",t)});t.on("end",function(){if(e._paused||e._buffer.length){e._buffer.push(a);e._read()}else{e.emit("end")}if(e._bytesEmitted!==e.props.size){e.error("Didn't get expected byte count\n"+"expect: "+e.props.size+"\n"+"actual: "+e._bytesEmitted)}});t.on("close",function(){if(e._paused||e._buffer.length){e._buffer.push(s);e._read()}else{e.emit("close")}});t.on("error",function(t){e.emit("error",t)});e._read()};FileReader.prototype._read=function(){var e=this;if(e._paused){return}if(!e._stream){return e._getStream()}if(e._buffer.length){var t=e._buffer;for(var r=0,n=t.length;r=260){r._swallowErrors=true;r._path="\\\\?\\"+r.path.replace(/\//g,"\\")}}r.basename=s.basename(e.path);r.dirname=s.dirname(e.path);r.linkpath=e.linkpath||null;e.parent=e.root=null;r.size=e.size;if(typeof e.mode==="string"){e.mode=parseInt(e.mode,8)}r.readable=false;r.writable=true;r._buffer=[];r.ready=false;r.filter=typeof e.filter==="function"?e.filter:null;r._stat(t)}Writer.prototype._create=function(){var e=this;n[e.props.follow?"stat":"lstat"](e._path,function(t){if(t){return e.warn("Cannot create "+e._path+"\n"+"Unsupported type: "+e.type,"ENOTSUP")}e._finish()})};Writer.prototype._stat=function(e){var t=this;var r=t.props;var i=r.follow?"stat":"lstat";var a=t._proxy||t;if(e)statCb(null,e);else n[i](t._path,statCb);function statCb(e,r){if(t.filter&&!t.filter.call(a,a,r)){t._aborted=true;t.emit("end");t.emit("close");return}if(e||!r){return create(t)}t._old=r;var n=l(r);if(n!==t.type||t.type==="File"&&r.nlink>1){return o(t._path,function(e){if(e)return t.error(e);t._old=null;create(t)})}create(t)}};function create(e){a(s.dirname(e._path),Writer.dirmode,function(t,r){if(t)return e.error(t);e._madeDir=r;return e._create()})}function endChmod(e,t,r,i,o){var a=t.mode;var s=t.follow||e.type!=="SymbolicLink"?"chmod":"lchmod";if(!n[s])return o();if(typeof a!=="number")return o();var u=r.mode&parseInt("0777",8);a=a&parseInt("0777",8);if(a===u)return o();n[s](i,a,o)}function endChown(e,t,r,i,o){if(process.platform==="win32")return o();if(!process.getuid||process.getuid()!==0)return o();if(typeof t.uid!=="number"&&typeof t.gid!=="number")return o();if(r.uid===t.uid&&r.gid===t.gid)return o();var a=e.props.follow||e.type!=="SymbolicLink"?"chown":"lchown";if(!n[a])return o();if(typeof t.uid!=="number")t.uid=r.uid;if(typeof t.gid!=="number")t.gid=r.gid;n[a](i,t.uid,t.gid,o)}function endUtimes(e,t,r,i,o){if(!n.utimes||process.platform==="win32")return o();var a=t.follow||e.type!=="SymbolicLink"?"utimes":"lutimes";if(a==="lutimes"&&!n[a]){a="utimes"}if(!n[a])return o();var s=r.atime;var u=r.mtime;var l=t.atime;var c=t.mtime;if(l===undefined)l=s;if(c===undefined)c=u;if(!isDate(l))l=new Date(l);if(!isDate(c))l=new Date(c);if(l.getTime()===s.getTime()&&c.getTime()===u.getTime())return o();n[a](i,l,c,o)}Writer.prototype._finish=function(){var e=this;if(e._finishing)return;e._finishing=true;var t=0;var r=null;var i=false;if(e._old){e._old.atime=new Date(0);e._old.mtime=new Date(0);setProps(e._old)}else{var o=e.props.follow?"stat":"lstat";n[o](e._path,function(t,r){if(t){if(t.code==="ENOENT"&&(e.type==="Link"||e.type==="SymbolicLink")&&process.platform==="win32"){e.ready=true;e.emit("ready");e.emit("end");e.emit("close");e.end=e._finish=function(){};return}else return e.error(t)}setProps(e._old=r)})}return;function setProps(r){t+=3;endChmod(e,e.props,r,e._path,next("chmod"));endChown(e,e.props,r,e._path,next("chown"));endUtimes(e,e.props,r,e._path,next("utimes"))}function next(n){return function(o){if(r)return;if(o){o.fstream_finish_call=n;return e.error(r=o)}if(--t>0)return;if(i)return;i=true;if(!e._madeDir)return end();else endMadeDir(e,e._path,end);function end(t){if(t){t.fstream_finish_call="setupMadeDir";return e.error(t)}e.emit("end");e.emit("close")}}}};function endMadeDir(e,t,r){var n=e._madeDir;var i=s.dirname(t);endMadeDir_(e,i,function(t){if(t)return r(t);if(i===n){return r()}endMadeDir(e,i,r)})}function endMadeDir_(e,t,r){var i={};Object.keys(e.props).forEach(function(t){i[t]=e.props[t];if(t==="mode"&&e.type!=="Directory"){i[t]=i[t]|parseInt("0111",8)}});var o=3;var a=null;n.stat(t,function(n,o){if(n)return r(a=n);endChmod(e,i,o,t,next);endChown(e,i,o,t,next);endUtimes(e,i,o,t,next)});function next(e){if(a)return;if(e)return r(a=e);if(--o===0)return r()}}Writer.prototype.pipe=function(){this.error("Can't pipe from writable stream")};Writer.prototype.add=function(){this.error("Can't add to non-Directory type")};Writer.prototype.write=function(){return true};function objectToString(e){return Object.prototype.toString.call(e)}function isDate(e){return typeof e==="object"&&objectToString(e)==="[object Date]"}},87:function(e){e.exports=require("os")},93:function(e,t,r){var n=r(794).Stream;e.exports=legacy;function legacy(e){return{ReadStream:ReadStream,WriteStream:WriteStream};function ReadStream(t,r){if(!(this instanceof ReadStream))return new ReadStream(t,r);n.call(this);var i=this;this.path=t;this.fd=null;this.readable=true;this.paused=false;this.flags="r";this.mode=438;this.bufferSize=64*1024;r=r||{};var o=Object.keys(r);for(var a=0,s=o.length;athis.end){throw new Error("start must be <= end")}this.pos=this.start}if(this.fd!==null){process.nextTick(function(){i._read()});return}e.open(this.path,this.flags,this.mode,function(e,t){if(e){i.emit("error",e);i.readable=false;return}i.fd=t;i.emit("open",t);i._read()})}function WriteStream(t,r){if(!(this instanceof WriteStream))return new WriteStream(t,r);n.call(this);this.path=t;this.fd=null;this.writable=true;this.flags="w";this.encoding="binary";this.mode=438;this.bytesWritten=0;r=r||{};var i=Object.keys(r);for(var o=0,a=i.length;o= zero")}this.pos=this.start}this.busy=false;this._queue=[];if(this.fd===null){this._open=e.open;this._queue.push([this._open,this.path,this.flags,this.mode,undefined]);this.flush()}}}},100:function(){"use strict";if(!Buffer.prototype.indexOf){Buffer.prototype.indexOf=function(e,t){t=t||0;if(typeof e==="string"||e instanceof String){e=new Buffer(e)}else if(typeof e==="number"||e instanceof Number){e=new Buffer([e])}var r=e.length;for(var n=t;n<=this.length-r;n++){var i=false;for(var o=0;o=0;n--){var i=false;for(var o=0;o=e.length){if(t)t[a]=e;return r(null,e)}u.lastIndex=f;var n=u.exec(e);d=p;p+=n[0];h=d+n[1];f=u.lastIndex;if(c[h]||t&&t[h]===h){return process.nextTick(LOOP)}if(t&&Object.prototype.hasOwnProperty.call(t,h)){return gotResolvedLink(t[h])}return o.lstat(h,gotStat)}function gotStat(e,n){if(e)return r(e);if(!n.isSymbolicLink()){c[h]=true;if(t)t[h]=h;return process.nextTick(LOOP)}if(!i){var a=n.dev.toString(32)+":"+n.ino.toString(32);if(s.hasOwnProperty(a)){return gotTarget(null,s[a],h)}}o.stat(h,function(e){if(e)return r(e);o.readlink(h,function(e,t){if(!i)s[a]=t;gotTarget(e,t)})})}function gotTarget(e,i,o){if(e)return r(e);var a=n.resolve(d,i);if(t)t[o]=a;gotResolvedLink(a)}function gotResolvedLink(t){e=n.resolve(t,e.slice(f));start()}}},129:function(e){e.exports=require("child_process")},131:function(e,t,r){"use strict";var n=this&&this.__awaiter||function(e,t,r,n){function adopt(e){return e instanceof r?e:new r(function(t){t(e)})}return new(r||(r=Promise))(function(r,i){function fulfilled(e){try{step(n.next(e))}catch(e){i(e)}}function rejected(e){try{step(n["throw"](e))}catch(e){i(e)}}function step(e){e.done?r(e.value):adopt(e.value).then(fulfilled,rejected)}step((n=n.apply(e,t||[])).next())})};var i=this&&this.__importStar||function(e){if(e&&e.__esModule)return e;var t={};if(e!=null)for(var r in e)if(Object.hasOwnProperty.call(e,r))t[r]=e[r];t["default"]=e;return t};Object.defineProperty(t,"__esModule",{value:true});const o=i(r(470));const a=i(r(622));const s=r(982);const u=i(r(169));const l=i(r(317));const c=i(r(286));function run(){return n(this,void 0,void 0,function*(){try{const e=process.env[`GITHUB_WORKSPACE`]||"";const t=yield u.execute(yield resolveGradleExecutable(e),resolveBuildRootDirectory(e),parseCommandLineArguments());if(t.buildScanUrl){o.setOutput("build-scan-url",t.buildScanUrl)}if(t.status!==0){o.setFailed(`Gradle process exited with status ${t.status}`)}}catch(e){o.setFailed(e.message)}})}t.run=run;run();function resolveGradleExecutable(e){return n(this,void 0,void 0,function*(){const t=inputOrNull("gradle-version");if(t!==null&&t!=="wrapper"){return a.resolve(yield c.gradleVersion(t))}const r=inputOrNull("gradle-executable");if(r!==null){return a.resolve(e,r)}const n=inputOrNull("wrapper-directory");const i=n!==null?a.join(e,n):e;return a.resolve(i,l.wrapperFilename())})}function resolveBuildRootDirectory(e){const t=inputOrNull("build-root-directory");return t===null?a.resolve(e):a.resolve(e,t)}function parseCommandLineArguments(){const e=inputOrNull("arguments");return e===null?[]:s.parseArgsStringToArgv(e)}function inputOrNull(e){const t=o.getInput(e);if(t.length===0){return null}return t}},137:function(e){e.exports=collect;function collect(e){if(e._collected)return;if(e._paused)return e.on("resume",collect.bind(null,e));e._collected=true;e.pause();e.on("data",save);e.on("end",save);var t=[];function save(e){if(typeof e==="string")e=new Buffer(e);if(Buffer.isBuffer(e)&&!e.length)return;t.push(e)}e.on("entry",saveEntry);var r=[];function saveEntry(e){collect(e);r.push(e)}e.on("proxy",proxyPause);function proxyPause(e){e.pause()}e.pipe=function(n){return function(i){var o=0;(function unblockEntry(){var t=r[o++];if(!t)return resume();t.on("end",unblockEntry);if(i)i.add(t);else e.emit("entry",t)})();function resume(){e.removeListener("entry",saveEntry);e.removeListener("data",save);e.removeListener("end",save);e.pipe=n;if(i)e.pipe(i);t.forEach(function(t){if(t)e.emit("data",t);else e.emit("end")});e.resume()}return i}}(e.pipe)}},139:function(e,t,r){var n=r(417);e.exports=function nodeRNG(){return n.randomBytes(16)}},141:function(e,t,r){"use strict";var n=r(631);var i=r(16);var o=r(605);var a=r(211);var s=r(614);var u=r(357);var l=r(669);t.httpOverHttp=httpOverHttp;t.httpsOverHttp=httpsOverHttp;t.httpOverHttps=httpOverHttps;t.httpsOverHttps=httpsOverHttps;function httpOverHttp(e){var t=new TunnelingAgent(e);t.request=o.request;return t}function httpsOverHttp(e){var t=new TunnelingAgent(e);t.request=o.request;t.createSocket=createSecureSocket;t.defaultPort=443;return t}function httpOverHttps(e){var t=new TunnelingAgent(e);t.request=a.request;return t}function httpsOverHttps(e){var t=new TunnelingAgent(e);t.request=a.request;t.createSocket=createSecureSocket;t.defaultPort=443;return t}function TunnelingAgent(e){var t=this;t.options=e||{};t.proxyOptions=t.options.proxy||{};t.maxSockets=t.options.maxSockets||o.Agent.defaultMaxSockets;t.requests=[];t.sockets=[];t.on("free",function onFree(e,r,n,i){var o=toOptions(r,n,i);for(var a=0,s=t.requests.length;a=this.maxSockets){i.requests.push(o);return}i.createSocket(o,function(t){t.on("free",onFree);t.on("close",onCloseOrRemove);t.on("agentRemove",onCloseOrRemove);e.onSocket(t);function onFree(){i.emit("free",t,o)}function onCloseOrRemove(e){i.removeSocket(t);t.removeListener("free",onFree);t.removeListener("close",onCloseOrRemove);t.removeListener("agentRemove",onCloseOrRemove)}})};TunnelingAgent.prototype.createSocket=function createSocket(e,t){var r=this;var n={};r.sockets.push(n);var i=mergeOptions({},r.proxyOptions,{method:"CONNECT",path:e.host+":"+e.port,agent:false,headers:{host:e.host+":"+e.port}});if(e.localAddress){i.localAddress=e.localAddress}if(i.proxyAuth){i.headers=i.headers||{};i.headers["Proxy-Authorization"]="Basic "+new Buffer(i.proxyAuth).toString("base64")}c("making CONNECT request");var o=r.request(i);o.useChunkedEncodingByDefault=false;o.once("response",onResponse);o.once("upgrade",onUpgrade);o.once("connect",onConnect);o.once("error",onError);o.end();function onResponse(e){e.upgrade=true}function onUpgrade(e,t,r){process.nextTick(function(){onConnect(e,t,r)})}function onConnect(i,a,s){o.removeAllListeners();a.removeAllListeners();if(i.statusCode!==200){c("tunneling socket could not be established, statusCode=%d",i.statusCode);a.destroy();var u=new Error("tunneling socket could not be established, "+"statusCode="+i.statusCode);u.code="ECONNRESET";e.request.emit("error",u);r.removeSocket(n);return}if(s.length>0){c("got illegal response body from proxy");a.destroy();var u=new Error("got illegal response body from proxy");u.code="ECONNRESET";e.request.emit("error",u);r.removeSocket(n);return}c("tunneling connection has established");r.sockets[r.sockets.indexOf(n)]=a;return t(a)}function onError(t){o.removeAllListeners();c("tunneling socket could not be established, cause=%s\n",t.message,t.stack);var i=new Error("tunneling socket could not be established, "+"cause="+t.message);i.code="ECONNRESET";e.request.emit("error",i);r.removeSocket(n)}};TunnelingAgent.prototype.removeSocket=function removeSocket(e){var t=this.sockets.indexOf(e);if(t===-1){return}this.sockets.splice(t,1);var r=this.requests.shift();if(r){this.createSocket(r,function(e){r.request.onSocket(e)})}};function createSecureSocket(e,t){var r=this;TunnelingAgent.prototype.createSocket.call(r,e,function(n){var o=e.request.getHeader("host");var a=mergeOptions({},r.options,{socket:n,servername:o?o.replace(/:.*$/,""):e.host});var s=i.connect(0,a);r.sockets[r.sockets.indexOf(n)]=s;t(s)})}function toOptions(e,t,r){if(typeof e==="string"){return{host:e,port:t,localAddress:r}}return e}function mergeOptions(e){for(var t=1,r=arguments.length;t=this._length){this._resolve(this._values);return true}return false};SettledPromiseArray.prototype._promiseFulfilled=function(e,t){var r=new i;r._bitField=33554432;r._settledValueField=e;return this._promiseResolved(t,r)};SettledPromiseArray.prototype._promiseRejected=function(e,t){var r=new i;r._bitField=16777216;r._settledValueField=e;return this._promiseResolved(t,r)};e.settle=function(e){n.deprecated(".settle()",".reflect()");return new SettledPromiseArray(e).promise()};e.prototype.settle=function(){return e.settle(this)}}},169:function(e,t,r){"use strict";var n=this&&this.__awaiter||function(e,t,r,n){function adopt(e){return e instanceof r?e:new r(function(t){t(e)})}return new(r||(r=Promise))(function(r,i){function fulfilled(e){try{step(n.next(e))}catch(e){i(e)}}function rejected(e){try{step(n["throw"](e))}catch(e){i(e)}}function step(e){e.done?r(e.value):adopt(e.value).then(fulfilled,rejected)}step((n=n.apply(e,t||[])).next())})};var i=this&&this.__importStar||function(e){if(e&&e.__esModule)return e;var t={};if(e!=null)for(var r in e)if(Object.hasOwnProperty.call(e,r))t[r]=e[r];t["default"]=e;return t};Object.defineProperty(t,"__esModule",{value:true});const o=i(r(986));function execute(e,t,r){return n(this,void 0,void 0,function*(){let n=false;let i;const a=yield o.exec(e,r,{cwd:t,ignoreReturnCode:true,listeners:{stdline:e=>{if(e.startsWith("Publishing build scan...")){n=true}if(n&&e.length===0){n=false}if(n&&e.startsWith("http")){i=e.trim();n=false}}}});return new BuildResultImpl(a,i)})}t.execute=execute;class BuildResultImpl{constructor(e,t){this.status=e;this.buildScanUrl=t}}},194:function(e,t,r){var n=r(440);var i=r(225);var o=r(887);var a=r(794);var s=r(479);var u=r(761);var l=r(474);var c=r(657);var f=r(287);if(!a.Writable||!a.Writable.prototype.destroy)a=r(574);e.exports=function unzip(e,t,r,p){var h=o(),d=a.PassThrough();var v=e.stream(t);v.pipe(h).on("error",function(e){d.emit("error",e)});d.vars=h.pull(30).then(function(e){var t=s.parse(e).word32lu("signature").word16lu("versionsNeededToExtract").word16lu("flags").word16lu("compressionMethod").word16lu("lastModifiedTime").word16lu("lastModifiedDate").word32lu("crc32").word32lu("compressedSize").word32lu("uncompressedSize").word16lu("fileNameLength").word16lu("extraFieldLength").vars;t.lastModifiedDateTime=f(t.lastModifiedDate,t.lastModifiedTime);return h.pull(t.fileNameLength).then(function(e){t.fileName=e.toString("utf8");return h.pull(t.extraFieldLength)}).then(function(e){var o;t.extra=l(e,t);if(p&&p.compressedSize)t=p;if(t.flags&1)o=h.pull(12).then(function(e){if(!r)throw new Error("MISSING_PASSWORD");var n=i();String(r).split("").forEach(function(e){n.update(e)});for(var o=0;o>8&255:t.crc32>>24&255;if(e[11]!==a)throw new Error("BAD_PASSWORD");return t});return n.resolve(o).then(function(){d.emit("vars",t);return t})})});d.vars.then(function(e){var t=!(e.flags&8)||e.compressedSize>0,r;var n=e.compressionMethod?u.createInflateRaw():a.PassThrough();if(t){d.size=e.uncompressedSize;r=e.compressedSize}else{r=c.alloc(4);r.writeUInt32LE(134695760,0)}var i=h.stream(r);if(e.decrypt)i=i.pipe(e.decrypt.stream());i.pipe(n).on("error",function(e){d.emit("error",e)}).pipe(d).on("finish",function(){if(v.abort)v.abort();else if(v.close)v.close();else if(v.push)v.push();else console.log("warning - unable to close stream")})}).catch(function(e){d.emit("error",e)});return d}},211:function(e){e.exports=require("https")},220:function(e,t,r){"use strict";e.exports=function(e,t,n,i,o,a){var s=e._getDomain;var u=r(248);var l=u.tryCatch;var c=u.errorObj;var f=e._async;function MappingPromiseArray(e,t,r,n){this.constructor$(e);this._promise._captureStackTrace();var i=s();this._callback=i===null?t:u.domainBind(i,t);this._preservedValues=n===o?new Array(this.length()):null;this._limit=r;this._inFlight=0;this._queue=[];f.invoke(this._asyncInit,this,undefined)}u.inherits(MappingPromiseArray,t);MappingPromiseArray.prototype._asyncInit=function(){this._init$(undefined,-2)};MappingPromiseArray.prototype._init=function(){};MappingPromiseArray.prototype._promiseFulfilled=function(t,r){var n=this._values;var o=this.length();var s=this._preservedValues;var u=this._limit;if(r<0){r=r*-1-1;n[r]=t;if(u>=1){this._inFlight--;this._drainQueue();if(this._isResolved())return true}}else{if(u>=1&&this._inFlight>=u){n[r]=t;this._queue.push(r);return false}if(s!==null)s[r]=t;var f=this._promise;var p=this._callback;var h=f._boundValue();f._pushContext();var d=l(p).call(h,t,r,o);var v=f._popContext();a.checkForgottenReturns(d,v,s!==null?"Promise.filter":"Promise.map",f);if(d===c){this._reject(d.e);return true}var y=i(d,this._promise);if(y instanceof e){y=y._target();var g=y._bitField;if((g&50397184)===0){if(u>=1)this._inFlight++;n[r]=y;y._proxy(this,(r+1)*-1);return false}else if((g&33554432)!==0){d=y._value()}else if((g&16777216)!==0){this._reject(y._reason());return true}else{this._cancel();return true}}n[r]=d}var m=++this._totalResolved;if(m>=o){if(s!==null){this._filter(n,s)}else{this._resolve(n)}return true}return false};MappingPromiseArray.prototype._drainQueue=function(){var e=this._queue;var t=this._limit;var r=this._values;while(e.length>0&&this._inFlight=1?a:0;return new MappingPromiseArray(t,r,a,o).promise()}e.prototype.map=function(e,t){return map(this,e,t,null)};e.map=function(e,t,r,n){return map(e,t,r,n)}}},225:function(e,t,r){var n=r(965);var i=r(794);if(!i.Writable||!i.Writable.prototype.destroy)i=r(574);var o;function generateTable(){var e=3988292384,t,r,n;o=[];for(r=0;r<256;r++){t=r;for(n=0;n<8;n++)t=t&1?e^t>>>1:t=t>>>1;o[r]=t>>>0}}function crc(e,t){if(!o)generateTable();if(e.charCodeAt)e=e.charCodeAt(0);return n(t).shiftRight(8).and(16777215).xor(o[n(t).xor(e).and(255)]).value}function Decrypt(){if(!(this instanceof Decrypt))return new Decrypt;this.key0=305419896;this.key1=591751049;this.key2=878082192}Decrypt.prototype.update=function(e){this.key0=crc(e,this.key0);this.key1=n(this.key0).and(255).and(4294967295).add(this.key1);this.key1=n(this.key1).multiply(134775813).add(1).and(4294967295).value;this.key2=crc(n(this.key1).shiftRight(24).and(255),this.key2)};Decrypt.prototype.decryptByte=function(e){var t=n(this.key2).or(2);e=e^n(t).multiply(n(t^1)).shiftRight(8).and(255);this.update(e);return e};Decrypt.prototype.stream=function(){var e=i.Transform(),t=this;e._transform=function(e,r,n){for(var i=0;i0){if(typeof t!=="string"&&!o.objectMode&&Object.getPrototypeOf(t)!==l.prototype){t=_uint8ArrayToBuffer(t)}if(n){if(o.endEmitted)e.emit("error",new Error("stream.unshift() after end event"));else addChunk(e,o,t,true)}else if(o.ended){e.emit("error",new Error("stream.push() after EOF"))}else{o.reading=false;if(o.decoder&&!r){t=o.decoder.write(t);if(o.objectMode||t.length!==0)addChunk(e,o,t,false);else maybeReadMore(e,o)}else{addChunk(e,o,t,false)}}}else if(!n){o.reading=false}}return needMoreData(o)}function addChunk(e,t,r,n){if(t.flowing&&t.length===0&&!t.sync){e.emit("data",r);e.read(0)}else{t.length+=t.objectMode?1:r.length;if(n)t.buffer.unshift(r);else t.buffer.push(r);if(t.needReadable)emitReadable(e)}maybeReadMore(e,t)}function chunkInvalid(e,t){var r;if(!_isUint8Array(t)&&typeof t!=="string"&&t!==undefined&&!e.objectMode){r=new TypeError("Invalid non-string/buffer chunk")}return r}function needMoreData(e){return!e.ended&&(e.needReadable||e.length=m){e=m}else{e--;e|=e>>>1;e|=e>>>2;e|=e>>>4;e|=e>>>8;e|=e>>>16;e++}return e}function howMuchToRead(e,t){if(e<=0||t.length===0&&t.ended)return 0;if(t.objectMode)return 1;if(e!==e){if(t.flowing&&t.length)return t.buffer.head.data.length;else return t.length}if(e>t.highWaterMark)t.highWaterMark=computeNewHighWaterMark(e);if(e<=t.length)return e;if(!t.ended){t.needReadable=true;return 0}return t.length}Readable.prototype.read=function(e){h("read",e);e=parseInt(e,10);var t=this._readableState;var r=e;if(e!==0)t.emittedReadable=false;if(e===0&&t.needReadable&&(t.length>=t.highWaterMark||t.ended)){h("read: emitReadable",t.length,t.ended);if(t.length===0&&t.ended)endReadable(this);else emitReadable(this);return null}e=howMuchToRead(e,t);if(e===0&&t.ended){if(t.length===0)endReadable(this);return null}var n=t.needReadable;h("need readable",n);if(t.length===0||t.length-e0)i=fromList(e,t);else i=null;if(i===null){t.needReadable=true;e=0}else{t.length-=e}if(t.length===0){if(!t.ended)t.needReadable=true;if(r!==e&&t.ended)endReadable(this)}if(i!==null)this.emit("data",i);return i};function onEofChunk(e,t){if(t.ended)return;if(t.decoder){var r=t.decoder.end();if(r&&r.length){t.buffer.push(r);t.length+=t.objectMode?1:r.length}}t.ended=true;emitReadable(e)}function emitReadable(e){var t=e._readableState;t.needReadable=false;if(!t.emittedReadable){h("emitReadable",t.flowing);t.emittedReadable=true;if(t.sync)n.nextTick(emitReadable_,e);else emitReadable_(e)}}function emitReadable_(e){h("emit readable");e.emit("readable");flow(e)}function maybeReadMore(e,t){if(!t.readingMore){t.readingMore=true;n.nextTick(maybeReadMore_,e,t)}}function maybeReadMore_(e,t){var r=t.length;while(!t.reading&&!t.flowing&&!t.ended&&t.length1&&indexOf(i.pipes,e)!==-1)&&!l){h("false write response, pause",r._readableState.awaitDrain);r._readableState.awaitDrain++;c=true}r.pause()}}function onerror(t){h("onerror",t);unpipe();e.removeListener("error",onerror);if(s(e,"error")===0)e.emit("error",t)}prependListener(e,"error",onerror);function onclose(){e.removeListener("finish",onfinish);unpipe()}e.once("close",onclose);function onfinish(){h("onfinish");e.removeListener("close",onclose);unpipe()}e.once("finish",onfinish);function unpipe(){h("unpipe");r.unpipe(e)}e.emit("pipe",r);if(!i.flowing){h("pipe resume");r.resume()}return e};function pipeOnDrain(e){return function(){var t=e._readableState;h("pipeOnDrain",t.awaitDrain);if(t.awaitDrain)t.awaitDrain--;if(t.awaitDrain===0&&s(e,"data")){t.flowing=true;flow(e)}}}Readable.prototype.unpipe=function(e){var t=this._readableState;var r={hasUnpiped:false};if(t.pipesCount===0)return this;if(t.pipesCount===1){if(e&&e!==t.pipes)return this;if(!e)e=t.pipes;t.pipes=null;t.pipesCount=0;t.flowing=false;if(e)e.emit("unpipe",this,r);return this}if(!e){var n=t.pipes;var i=t.pipesCount;t.pipes=null;t.pipesCount=0;t.flowing=false;for(var o=0;o=t.length){if(t.decoder)r=t.buffer.join("");else if(t.buffer.length===1)r=t.buffer.head.data;else r=t.buffer.concat(t.length);t.buffer.clear()}else{r=fromListPartial(e,t.buffer,t.decoder)}return r}function fromListPartial(e,t,r){var n;if(eo.length?o.length:e;if(a===o.length)i+=o;else i+=o.slice(0,e);e-=a;if(e===0){if(a===o.length){++n;if(r.next)t.head=r.next;else t.head=t.tail=null}else{t.head=r;r.data=o.slice(a)}break}++n}t.length-=n;return i}function copyFromBuffer(e,t){var r=l.allocUnsafe(e);var n=t.head;var i=1;n.data.copy(r);e-=n.data.length;while(n=n.next){var o=n.data;var a=e>o.length?o.length:e;o.copy(r,r.length-e,0,a);e-=a;if(e===0){if(a===o.length){++i;if(n.next)t.head=n.next;else t.head=t.tail=null}else{t.head=n;n.data=o.slice(a)}break}++i}t.length-=i;return r}function endReadable(e){var t=e._readableState;if(t.length>0)throw new Error('"endReadable()" called on non-empty stream');if(!t.endEmitted){t.ended=true;n.nextTick(endReadableNT,t,e)}}function endReadableNT(e,t){if(!e.endEmitted&&e.length===0){e.endEmitted=true;t.readable=false;t.emit("end")}}function indexOf(e,t){for(var r=0,n=e.length;r-1?setImmediate:n.nextTick;var o;Writable.WritableState=WritableState;var a=Object.create(r(143));a.inherits=r(689);var s={deprecate:r(917)};var u=r(427);var l=r(608).Buffer;var c=global.Uint8Array||function(){};function _uint8ArrayToBuffer(e){return l.from(e)}function _isUint8Array(e){return l.isBuffer(e)||e instanceof c}var f=r(232);a.inherits(Writable,u);function nop(){}function WritableState(e,t){o=o||r(831);e=e||{};var n=t instanceof o;this.objectMode=!!e.objectMode;if(n)this.objectMode=this.objectMode||!!e.writableObjectMode;var i=e.highWaterMark;var a=e.writableHighWaterMark;var s=this.objectMode?16:16*1024;if(i||i===0)this.highWaterMark=i;else if(n&&(a||a===0))this.highWaterMark=a;else this.highWaterMark=s;this.highWaterMark=Math.floor(this.highWaterMark);this.finalCalled=false;this.needDrain=false;this.ending=false;this.ended=false;this.finished=false;this.destroyed=false;var u=e.decodeStrings===false;this.decodeStrings=!u;this.defaultEncoding=e.defaultEncoding||"utf8";this.length=0;this.writing=false;this.corked=0;this.sync=true;this.bufferProcessing=false;this.onwrite=function(e){onwrite(t,e)};this.writecb=null;this.writelen=0;this.bufferedRequest=null;this.lastBufferedRequest=null;this.pendingcb=0;this.prefinished=false;this.errorEmitted=false;this.bufferedRequestCount=0;this.corkedRequestsFree=new CorkedRequest(this)}WritableState.prototype.getBuffer=function getBuffer(){var e=this.bufferedRequest;var t=[];while(e){t.push(e);e=e.next}return t};(function(){try{Object.defineProperty(WritableState.prototype,"buffer",{get:s.deprecate(function(){return this.getBuffer()},"_writableState.buffer is deprecated. Use _writableState.getBuffer "+"instead.","DEP0003")})}catch(e){}})();var p;if(typeof Symbol==="function"&&Symbol.hasInstance&&typeof Function.prototype[Symbol.hasInstance]==="function"){p=Function.prototype[Symbol.hasInstance];Object.defineProperty(Writable,Symbol.hasInstance,{value:function(e){if(p.call(this,e))return true;if(this!==Writable)return false;return e&&e._writableState instanceof WritableState}})}else{p=function(e){return e instanceof this}}function Writable(e){o=o||r(831);if(!p.call(Writable,this)&&!(this instanceof o)){return new Writable(e)}this._writableState=new WritableState(e,this);this.writable=true;if(e){if(typeof e.write==="function")this._write=e.write;if(typeof e.writev==="function")this._writev=e.writev;if(typeof e.destroy==="function")this._destroy=e.destroy;if(typeof e.final==="function")this._final=e.final}u.call(this)}Writable.prototype.pipe=function(){this.emit("error",new Error("Cannot pipe, not readable"))};function writeAfterEnd(e,t){var r=new Error("write after end");e.emit("error",r);n.nextTick(t,r)}function validChunk(e,t,r,i){var o=true;var a=false;if(r===null){a=new TypeError("May not write null values to stream")}else if(typeof r!=="string"&&r!==undefined&&!t.objectMode){a=new TypeError("Invalid non-string/buffer chunk")}if(a){e.emit("error",a);n.nextTick(i,a);o=false}return o}Writable.prototype.write=function(e,t,r){var n=this._writableState;var i=false;var o=!n.objectMode&&_isUint8Array(e);if(o&&!l.isBuffer(e)){e=_uint8ArrayToBuffer(e)}if(typeof t==="function"){r=t;t=null}if(o)t="buffer";else if(!t)t=n.defaultEncoding;if(typeof r!=="function")r=nop;if(n.ended)writeAfterEnd(this,r);else if(o||validChunk(this,n,e,r)){n.pendingcb++;i=writeOrBuffer(this,n,o,e,t,r)}return i};Writable.prototype.cork=function(){var e=this._writableState;e.corked++};Writable.prototype.uncork=function(){var e=this._writableState;if(e.corked){e.corked--;if(!e.writing&&!e.corked&&!e.finished&&!e.bufferProcessing&&e.bufferedRequest)clearBuffer(this,e)}};Writable.prototype.setDefaultEncoding=function setDefaultEncoding(e){if(typeof e==="string")e=e.toLowerCase();if(!(["hex","utf8","utf-8","ascii","binary","base64","ucs2","ucs-2","utf16le","utf-16le","raw"].indexOf((e+"").toLowerCase())>-1))throw new TypeError("Unknown encoding: "+e);this._writableState.defaultEncoding=e;return this};function decodeChunk(e,t,r){if(!e.objectMode&&e.decodeStrings!==false&&typeof t==="string"){t=l.from(t,r)}return t}Object.defineProperty(Writable.prototype,"writableHighWaterMark",{enumerable:false,get:function(){return this._writableState.highWaterMark}});function writeOrBuffer(e,t,r,n,i,o){if(!r){var a=decodeChunk(t,n,i);if(n!==a){r=true;i="buffer";n=a}}var s=t.objectMode?1:n.length;t.length+=s;var u=t.lengththis.maxLength)return false;if(!this.stat&&y(this.cache,t)){var i=this.cache[t];if(Array.isArray(i))i="DIR";if(!r||i==="DIR")return i;if(r&&i==="FILE")return false}var o;var a=this.statCache[t];if(!a){var s;try{s=n.lstatSync(t)}catch(e){if(e&&(e.code==="ENOENT"||e.code==="ENOTDIR")){this.statCache[t]=false;return false}}if(s&&s.isSymbolicLink()){try{a=n.statSync(t)}catch(e){a=s}}else{a=s}}this.statCache[t]=a;var i=true;if(a)i=a.isDirectory()?"DIR":"FILE";this.cache[t]=this.cache[t]||i;if(r&&i==="FILE")return false;return i};GlobSync.prototype._mark=function(e){return p.mark(this,e)};GlobSync.prototype._makeAbs=function(e){return p.makeAbs(this,e)}},246:function(e,t,r){"use strict";e.exports=function(e,t,n,i,o){var a=r(248);var s=a.isArray;function toResolutionValue(e){switch(e){case-2:return[];case-3:return{}}}function PromiseArray(r){var n=this._promise=new e(t);if(r instanceof e){n._propagateFrom(r,3)}n._setOnCancel(this);this._values=r;this._length=0;this._totalResolved=0;this._init(undefined,-2)}a.inherits(PromiseArray,o);PromiseArray.prototype.length=function(){return this._length};PromiseArray.prototype.promise=function(){return this._promise};PromiseArray.prototype._init=function init(t,r){var o=n(this._values,this._promise);if(o instanceof e){o=o._target();var s=o._bitField;this._values=o;if((s&50397184)===0){this._promise._setAsyncGuaranteed();return o._then(init,this._reject,undefined,this,r)}else if((s&33554432)!==0){o=o._value()}else if((s&16777216)!==0){return this._reject(o._reason())}else{return this._cancel()}}o=a.asArray(o);if(o===null){var u=i("expecting an array or an iterable object but got "+a.classString(o)).reason();this._promise._rejectCallback(u,false);return}if(o.length===0){if(r===-5){this._resolveEmptyArray()}else{this._resolve(toResolutionValue(r))}return}this._iterate(o)};PromiseArray.prototype._iterate=function(t){var r=this.getActualLength(t.length);this._length=r;this._values=this.shouldCopyValues()?new Array(r):this._values;var i=this._promise;var o=false;var a=null;for(var s=0;s=this._length){this._resolve(this._values);return true}return false};PromiseArray.prototype._promiseCancelled=function(){this._cancel();return true};PromiseArray.prototype._promiseRejected=function(e){this._totalResolved++;this._reject(e);return true};PromiseArray.prototype._resultCancelled=function(){if(this._isResolved())return;var t=this._values;this._cancel();if(t instanceof e){t.cancel()}else{for(var r=0;r1;var n=t.length>0&&!(t.length===1&&t[0]==="constructor");var i=thisAssignmentPattern.test(e+"")&&es5.names(e).length>0;if(r||n||i){return true}}return false}catch(e){return false}}function toFastProperties(obj){function FakeConstructor(){}FakeConstructor.prototype=obj;var l=8;while(l--)new FakeConstructor;return obj;eval(obj)}var rident=/^[a-z$_][a-z$_0-9]*$/i;function isIdentifier(e){return rident.test(e)}function filledRange(e,t,r){var n=new Array(e);for(var i=0;i10||e[0]>0}();if(ret.isNode)ret.toFastProperties(process);try{throw new Error}catch(e){ret.lastLineError=e}module.exports=ret},250:function(e,t,r){var n=r(619);var i=process.cwd;var o=null;var a=process.env.GRACEFUL_FS_PLATFORM||process.platform;process.cwd=function(){if(!o)o=i.call(process);return o};try{process.cwd()}catch(e){}var s=process.chdir;process.chdir=function(e){o=null;s.call(process,e)};e.exports=patch;function patch(e){if(n.hasOwnProperty("O_SYMLINK")&&process.version.match(/^v0\.6\.[0-2]|^v0\.5\./)){patchLchmod(e)}if(!e.lutimes){patchLutimes(e)}e.chown=chownFix(e.chown);e.fchown=chownFix(e.fchown);e.lchown=chownFix(e.lchown);e.chmod=chmodFix(e.chmod);e.fchmod=chmodFix(e.fchmod);e.lchmod=chmodFix(e.lchmod);e.chownSync=chownFixSync(e.chownSync);e.fchownSync=chownFixSync(e.fchownSync);e.lchownSync=chownFixSync(e.lchownSync);e.chmodSync=chmodFixSync(e.chmodSync);e.fchmodSync=chmodFixSync(e.fchmodSync);e.lchmodSync=chmodFixSync(e.lchmodSync);e.stat=statFix(e.stat);e.fstat=statFix(e.fstat);e.lstat=statFix(e.lstat);e.statSync=statFixSync(e.statSync);e.fstatSync=statFixSync(e.fstatSync);e.lstatSync=statFixSync(e.lstatSync);if(!e.lchmod){e.lchmod=function(e,t,r){if(r)process.nextTick(r)};e.lchmodSync=function(){}}if(!e.lchown){e.lchown=function(e,t,r,n){if(n)process.nextTick(n)};e.lchownSync=function(){}}if(a==="win32"){e.rename=function(t){return function(r,n,i){var o=Date.now();var a=0;t(r,n,function CB(s){if(s&&(s.code==="EACCES"||s.code==="EPERM")&&Date.now()-o<6e4){setTimeout(function(){e.stat(n,function(e,o){if(e&&e.code==="ENOENT")t(r,n,CB);else i(s)})},a);if(a<100)a+=10;return}if(i)i(s)})}}(e.rename)}e.read=function(t){function read(r,n,i,o,a,s){var u;if(s&&typeof s==="function"){var l=0;u=function(c,f,p){if(c&&c.code==="EAGAIN"&&l<10){l++;return t.call(e,r,n,i,o,a,u)}s.apply(this,arguments)}}return t.call(e,r,n,i,o,a,u)}read.__proto__=t;return read}(e.read);e.readSync=function(t){return function(r,n,i,o,a){var s=0;while(true){try{return t.call(e,r,n,i,o,a)}catch(e){if(e.code==="EAGAIN"&&s<10){s++;continue}throw e}}}}(e.readSync);function patchLchmod(e){e.lchmod=function(t,r,i){e.open(t,n.O_WRONLY|n.O_SYMLINK,r,function(t,n){if(t){if(i)i(t);return}e.fchmod(n,r,function(t){e.close(n,function(e){if(i)i(t||e)})})})};e.lchmodSync=function(t,r){var i=e.openSync(t,n.O_WRONLY|n.O_SYMLINK,r);var o=true;var a;try{a=e.fchmodSync(i,r);o=false}finally{if(o){try{e.closeSync(i)}catch(e){}}else{e.closeSync(i)}}return a}}function patchLutimes(e){if(n.hasOwnProperty("O_SYMLINK")){e.lutimes=function(t,r,i,o){e.open(t,n.O_SYMLINK,function(t,n){if(t){if(o)o(t);return}e.futimes(n,r,i,function(t){e.close(n,function(e){if(o)o(t||e)})})})};e.lutimesSync=function(t,r,i){var o=e.openSync(t,n.O_SYMLINK);var a;var s=true;try{a=e.futimesSync(o,r,i);s=false}finally{if(s){try{e.closeSync(o)}catch(e){}}else{e.closeSync(o)}}return a}}else{e.lutimes=function(e,t,r,n){if(n)process.nextTick(n)};e.lutimesSync=function(){}}}function chmodFix(t){if(!t)return t;return function(r,n,i){return t.call(e,r,n,function(e){if(chownErOk(e))e=null;if(i)i.apply(this,arguments)})}}function chmodFixSync(t){if(!t)return t;return function(r,n){try{return t.call(e,r,n)}catch(e){if(!chownErOk(e))throw e}}}function chownFix(t){if(!t)return t;return function(r,n,i,o){return t.call(e,r,n,i,function(e){if(chownErOk(e))e=null;if(o)o.apply(this,arguments)})}}function chownFixSync(t){if(!t)return t;return function(r,n,i){try{return t.call(e,r,n,i)}catch(e){if(!chownErOk(e))throw e}}}function statFix(t){if(!t)return t;return function(r,n,i){if(typeof n==="function"){i=n;n=null}function callback(e,t){if(t){if(t.uid<0)t.uid+=4294967296;if(t.gid<0)t.gid+=4294967296}if(i)i.apply(this,arguments)}return n?t.call(e,r,n,callback):t.call(e,r,callback)}}function statFixSync(t){if(!t)return t;return function(r,n){var i=n?t.call(e,r,n):t.call(e,r);if(i.uid<0)i.uid+=4294967296;if(i.gid<0)i.gid+=4294967296;return i}}function chownErOk(e){if(!e)return true;if(e.code==="ENOSYS")return true;var t=!process.getuid||process.getuid()!==0;if(t){if(e.code==="EINVAL"||e.code==="EPERM")return true}return false}}},252:function(e,t,r){e.exports=DirWriter;var n=r(82);var i=r(689);var o=r(626);var a=r(622);var s=r(137);i(DirWriter,n);function DirWriter(e){var t=this;if(!(t instanceof DirWriter)){t.error("DirWriter must be called as constructor.",null,true)}if(e.type!=="Directory"||!e.Directory){t.error("Non-directory type "+e.type+" "+JSON.stringify(e),null,true)}n.call(this,e)}DirWriter.prototype._create=function(){var e=this;o(e._path,n.dirmode,function(t){if(t)return e.error(t);e.ready=true;e.emit("ready");e._process()})};DirWriter.prototype.write=function(){return true};DirWriter.prototype.end=function(){this._ended=true;this._process()};DirWriter.prototype.add=function(e){var t=this;s(e);if(!t.ready||t._currentEntry){t._buffer.push(e);return false}if(t._ended){return t.error("add after end")}t._buffer.push(e);t._process();return this._buffer.length===0};DirWriter.prototype._process=function(){var e=this;if(e._processing)return;var t=e._buffer.shift();if(!t){e.emit("drain");if(e._ended)e._finish();return}e._processing=true;e.emit("entry",t);var r=t;var i;do{i=r._path||r.path;if(i===e.root._path||i===e._path||i&&i.indexOf(e._path)===0){e._processing=false;if(t._collected)t.pipe();return e._process()}r=r.parent}while(r);var o={parent:e,root:e.root||e,type:t.type,depth:e.depth+1};i=t._path||t.path||t.props.path;if(t.parent){i=i.substr(t.parent._path.length+1)}o.path=a.join(e.path,a.join("/",i));o.filter=e.filter;Object.keys(t.props).forEach(function(e){if(!o.hasOwnProperty(e)){o[e]=t.props[e]}});var s=e._currentChild=new n(o);s.on("ready",function(){t.pipe(s);t.resume()});s.on("error",function(t){if(s._swallowErrors){e.warn(t);s.emit("end");s.emit("close")}else{e.emit("error",t)}});s.on("close",onend);var u=false;function onend(){if(u)return;u=true;e._currentChild=null;e._processing=false;e._process()}}},253:function(e,t,r){"use strict";e.exports=function(e){var t=r(248);var n=r(883).keys;var i=t.tryCatch;var o=t.errorObj;function catchFilter(r,a,s){return function(u){var l=s._boundValue();e:for(var c=0;c1){o.deprecated("calling Promise.try with more than 1 argument");var l=arguments[1];var c=arguments[2];u=a.isArray(l)?s(r).apply(c,l):s(r).call(c,l)}else{u=s(r)()}var f=n._popContext();o.checkForgottenReturns(u,f,"Promise.try",n);n._resolveFromSyncValue(u);return n};e.prototype._resolveFromSyncValue=function(e){if(e===a.errorObj){this._rejectCallback(e.e,false)}else{this._resolveCallback(e,true)}}}},272:function(e,t,r){"use strict";e.exports=function(e,t){var n=e._getDomain;var i=e._async;var o=r(607).Warning;var a=r(248);var s=a.canAttachTrace;var u;var l;var c=/[\\\/]bluebird[\\\/]js[\\\/](release|debug|instrumented)/;var f=/\((?:timers\.js):\d+:\d+\)/;var p=/[\/<\(](.+?):(\d+):(\d+)\)?\s*$/;var h=null;var d=null;var v=false;var y;var g=!!(a.env("BLUEBIRD_DEBUG")!=0&&(false||a.env("BLUEBIRD_DEBUG")||a.env("NODE_ENV")==="development"));var m=!!(a.env("BLUEBIRD_WARNINGS")!=0&&(g||a.env("BLUEBIRD_WARNINGS")));var _=!!(a.env("BLUEBIRD_LONG_STACK_TRACES")!=0&&(g||a.env("BLUEBIRD_LONG_STACK_TRACES")));var w=a.env("BLUEBIRD_W_FORGOTTEN_RETURN")!=0&&(m||!!a.env("BLUEBIRD_W_FORGOTTEN_RETURN"));e.prototype.suppressUnhandledRejections=function(){var e=this._target();e._bitField=e._bitField&~1048576|524288};e.prototype._ensurePossibleRejectionHandled=function(){if((this._bitField&524288)!==0)return;this._setRejectionIsUnhandled();i.invokeLater(this._notifyUnhandledRejection,this,undefined)};e.prototype._notifyUnhandledRejectionIsHandled=function(){fireRejectionEvent("rejectionHandled",u,undefined,this)};e.prototype._setReturnedNonUndefined=function(){this._bitField=this._bitField|268435456};e.prototype._returnedNonUndefined=function(){return(this._bitField&268435456)!==0};e.prototype._notifyUnhandledRejection=function(){if(this._isRejectionUnhandled()){var e=this._settledValue();this._setUnhandledRejectionIsNotified();fireRejectionEvent("unhandledRejection",l,e,this)}};e.prototype._setUnhandledRejectionIsNotified=function(){this._bitField=this._bitField|262144};e.prototype._unsetUnhandledRejectionIsNotified=function(){this._bitField=this._bitField&~262144};e.prototype._isUnhandledRejectionNotified=function(){return(this._bitField&262144)>0};e.prototype._setRejectionIsUnhandled=function(){this._bitField=this._bitField|1048576};e.prototype._unsetRejectionIsUnhandled=function(){this._bitField=this._bitField&~1048576;if(this._isUnhandledRejectionNotified()){this._unsetUnhandledRejectionIsNotified();this._notifyUnhandledRejectionIsHandled()}};e.prototype._isRejectionUnhandled=function(){return(this._bitField&1048576)>0};e.prototype._warn=function(e,t,r){return warn(e,t,r||this)};e.onPossiblyUnhandledRejection=function(e){var t=n();l=typeof e==="function"?t===null?e:a.domainBind(t,e):undefined};e.onUnhandledRejectionHandled=function(e){var t=n();u=typeof e==="function"?t===null?e:a.domainBind(t,e):undefined};var b=function(){};e.longStackTraces=function(){if(i.haveItemsQueued()&&!C.longStackTraces){throw new Error("cannot enable long stack traces after promises have been created\n\n See http://goo.gl/MqrFmX\n")}if(!C.longStackTraces&&longStackTracesIsSupported()){var r=e.prototype._captureStackTrace;var n=e.prototype._attachExtraTrace;C.longStackTraces=true;b=function(){if(i.haveItemsQueued()&&!C.longStackTraces){throw new Error("cannot enable long stack traces after promises have been created\n\n See http://goo.gl/MqrFmX\n")}e.prototype._captureStackTrace=r;e.prototype._attachExtraTrace=n;t.deactivateLongStackTraces();i.enableTrampoline();C.longStackTraces=false};e.prototype._captureStackTrace=longStackTracesCaptureStackTrace;e.prototype._attachExtraTrace=longStackTracesAttachExtraTrace;t.activateLongStackTraces();i.disableTrampolineIfNecessary()}};e.hasLongStackTraces=function(){return C.longStackTraces&&longStackTracesIsSupported()};var E=function(){try{if(typeof CustomEvent==="function"){var e=new CustomEvent("CustomEvent");a.global.dispatchEvent(e);return function(e,t){var r=new CustomEvent(e.toLowerCase(),{detail:t,cancelable:true});return!a.global.dispatchEvent(r)}}else if(typeof Event==="function"){var e=new Event("CustomEvent");a.global.dispatchEvent(e);return function(e,t){var r=new Event(e.toLowerCase(),{cancelable:true});r.detail=t;return!a.global.dispatchEvent(r)}}else{var e=document.createEvent("CustomEvent");e.initCustomEvent("testingtheevent",false,true,{});a.global.dispatchEvent(e);return function(e,t){var r=document.createEvent("CustomEvent");r.initCustomEvent(e.toLowerCase(),false,true,t);return!a.global.dispatchEvent(r)}}}catch(e){}return function(){return false}}();var S=function(){if(a.isNode){return function(){return process.emit.apply(process,arguments)}}else{if(!a.global){return function(){return false}}return function(e){var t="on"+e.toLowerCase();var r=a.global[t];if(!r)return false;r.apply(a.global,[].slice.call(arguments,1));return true}}}();function generatePromiseLifecycleEventObject(e,t){return{promise:t}}var R={promiseCreated:generatePromiseLifecycleEventObject,promiseFulfilled:generatePromiseLifecycleEventObject,promiseRejected:generatePromiseLifecycleEventObject,promiseResolved:generatePromiseLifecycleEventObject,promiseCancelled:generatePromiseLifecycleEventObject,promiseChained:function(e,t,r){return{promise:t,child:r}},warning:function(e,t){return{warning:t}},unhandledRejection:function(e,t,r){return{reason:t,promise:r}},rejectionHandled:generatePromiseLifecycleEventObject};var O=function(e){var t=false;try{t=S.apply(null,arguments)}catch(e){i.throwLater(e);t=true}var r=false;try{r=E(e,R[e].apply(null,arguments))}catch(e){i.throwLater(e);r=true}return r||t};e.config=function(t){t=Object(t);if("longStackTraces"in t){if(t.longStackTraces){e.longStackTraces()}else if(!t.longStackTraces&&e.hasLongStackTraces()){b()}}if("warnings"in t){var r=t.warnings;C.warnings=!!r;w=C.warnings;if(a.isObject(r)){if("wForgottenReturn"in r){w=!!r.wForgottenReturn}}}if("cancellation"in t&&t.cancellation&&!C.cancellation){if(i.haveItemsQueued()){throw new Error("cannot enable cancellation after promises are in use")}e.prototype._clearCancellationData=cancellationClearCancellationData;e.prototype._propagateFrom=cancellationPropagateFrom;e.prototype._onCancel=cancellationOnCancel;e.prototype._setOnCancel=cancellationSetOnCancel;e.prototype._attachCancellationCallback=cancellationAttachCancellationCallback;e.prototype._execute=cancellationExecute;T=cancellationPropagateFrom;C.cancellation=true}if("monitoring"in t){if(t.monitoring&&!C.monitoring){C.monitoring=true;e.prototype._fireEvent=O}else if(!t.monitoring&&C.monitoring){C.monitoring=false;e.prototype._fireEvent=defaultFireEvent}}return e};function defaultFireEvent(){return false}e.prototype._fireEvent=defaultFireEvent;e.prototype._execute=function(e,t,r){try{e(t,r)}catch(e){return e}};e.prototype._onCancel=function(){};e.prototype._setOnCancel=function(e){};e.prototype._attachCancellationCallback=function(e){};e.prototype._captureStackTrace=function(){};e.prototype._attachExtraTrace=function(){};e.prototype._clearCancellationData=function(){};e.prototype._propagateFrom=function(e,t){};function cancellationExecute(e,t,r){var n=this;try{e(t,r,function(e){if(typeof e!=="function"){throw new TypeError("onCancel must be a function, got: "+a.toString(e))}n._attachCancellationCallback(e)})}catch(e){return e}}function cancellationAttachCancellationCallback(e){if(!this._isCancellable())return this;var t=this._onCancel();if(t!==undefined){if(a.isArray(t)){t.push(e)}else{this._setOnCancel([t,e])}}else{this._setOnCancel(e)}}function cancellationOnCancel(){return this._onCancelField}function cancellationSetOnCancel(e){this._onCancelField=e}function cancellationClearCancellationData(){this._cancellationParent=undefined;this._onCancelField=undefined}function cancellationPropagateFrom(e,t){if((t&1)!==0){this._cancellationParent=e;var r=e._branchesRemainingToCancel;if(r===undefined){r=0}e._branchesRemainingToCancel=r+1}if((t&2)!==0&&e._isBound()){this._setBoundTo(e._boundTo)}}function bindingPropagateFrom(e,t){if((t&2)!==0&&e._isBound()){this._setBoundTo(e._boundTo)}}var T=bindingPropagateFrom;function boundValueFunction(){var t=this._boundTo;if(t!==undefined){if(t instanceof e){if(t.isFulfilled()){return t.value()}else{return undefined}}}return t}function longStackTracesCaptureStackTrace(){this._trace=new CapturedTrace(this._peekContext())}function longStackTracesAttachExtraTrace(e,t){if(s(e)){var r=this._trace;if(r!==undefined){if(t)r=r._parent}if(r!==undefined){r.attachExtraTrace(e)}else if(!e.__stackCleaned__){var n=parseStackAndMessage(e);a.notEnumerableProp(e,"stack",n.message+"\n"+n.stack.join("\n"));a.notEnumerableProp(e,"__stackCleaned__",true)}}}function checkForgottenReturns(e,t,r,n,i){if(e===undefined&&t!==null&&w){if(i!==undefined&&i._returnedNonUndefined())return;if((n._bitField&65535)===0)return;if(r)r=r+" ";var o="";var a="";if(t._trace){var s=t._trace.stack.split("\n");var u=cleanStack(s);for(var l=u.length-1;l>=0;--l){var c=u[l];if(!f.test(c)){var h=c.match(p);if(h){o="at "+h[1]+":"+h[2]+":"+h[3]+" "}break}}if(u.length>0){var d=u[0];for(var l=0;l0){a="\n"+s[l-1]}break}}}}var v="a promise was created in a "+r+"handler "+o+"but was not returned from it, "+"see http://goo.gl/rRqMUw"+a;n._warn(v,true,t)}}function deprecated(e,t){var r=e+" is deprecated and will be removed in a future version.";if(t)r+=" Use "+t+" instead.";return warn(r)}function warn(t,r,n){if(!C.warnings)return;var i=new o(t);var a;if(r){n._attachExtraTrace(i)}else if(C.longStackTraces&&(a=e._peekContext())){a.attachExtraTrace(i)}else{var s=parseStackAndMessage(i);i.stack=s.message+"\n"+s.stack.join("\n")}if(!O("warning",i)){formatAndLogError(i,"",true)}}function reconstructStack(e,t){for(var r=0;r=0;--s){if(n[s]===o){a=s;break}}for(var s=a;s>=0;--s){var u=n[s];if(t[i]===u){t.pop();i--}else{break}}t=n}}function cleanStack(e){var t=[];for(var r=0;r0&&e.name!="SyntaxError"){t=t.slice(r)}return t}function parseStackAndMessage(e){var t=e.stack;var r=e.toString();t=typeof t==="string"&&t.length>0?stackFramesAsArray(e):[" (No stack trace)"];return{message:r,stack:e.name=="SyntaxError"?t:cleanStack(t)}}function formatAndLogError(e,t,r){if(typeof console!=="undefined"){var n;if(a.isObject(e)){var i=e.stack;n=t+d(i,e)}else{n=t+String(e)}if(typeof y==="function"){y(n,r)}else if(typeof console.log==="function"||typeof console.log==="object"){console.log(n)}}}function fireRejectionEvent(e,t,r,n){var o=false;try{if(typeof t==="function"){o=true;if(e==="rejectionHandled"){t(n)}else{t(r,n)}}}catch(e){i.throwLater(e)}if(e==="unhandledRejection"){if(!O(e,r,n)&&!o){formatAndLogError(r,"Unhandled rejection ")}}else{O(e,n)}}function formatNonError(e){var t;if(typeof e==="function"){t="[function "+(e.name||"anonymous")+"]"}else{t=e&&typeof e.toString==="function"?e.toString():a.toString(e);var r=/\[object [a-zA-Z0-9$_]+\]/;if(r.test(t)){try{var n=JSON.stringify(e);t=n}catch(e){}}if(t.length===0){t="(empty array)"}}return"(<"+snip(t)+">, no stack trace)"}function snip(e){var t=41;if(e.length=o){return}x=function(e){if(c.test(e))return true;var t=parseLineInfo(e);if(t){if(t.fileName===a&&(i<=t.line&&t.line<=o)){return true}}return false}}function CapturedTrace(e){this._parent=e;this._promisesCreated=0;var t=this._length=1+(e===undefined?0:e._length);A(this,CapturedTrace);if(t>32)this.uncycle()}a.inherits(CapturedTrace,Error);t.CapturedTrace=CapturedTrace;CapturedTrace.prototype.uncycle=function(){var e=this._length;if(e<2)return;var t=[];var r={};for(var n=0,i=this;i!==undefined;++n){t.push(i);i=i._parent}e=this._length=n;for(var n=e-1;n>=0;--n){var o=t[n].stack;if(r[o]===undefined){r[o]=n}}for(var n=0;n0){t[s-1]._parent=undefined;t[s-1]._length=1}t[n]._parent=undefined;t[n]._length=1;var u=n>0?t[n-1]:this;if(s=0;--c){t[c]._length=l;l++}return}}};CapturedTrace.prototype.attachExtraTrace=function(e){if(e.__stackCleaned__)return;this.uncycle();var t=parseStackAndMessage(e);var r=t.message;var n=[t.stack];var i=this;while(i!==undefined){n.push(cleanStack(i.stack.split("\n")));i=i._parent}removeCommonRoots(n);removeDuplicateOrEmptyJumps(n);a.notEnumerableProp(e,"stack",reconstructStack(r,n));a.notEnumerableProp(e,"__stackCleaned__",true)};var A=function stackDetection(){var e=/^\s*at\s*/;var t=function(e,t){if(typeof e==="string")return e;if(t.name!==undefined&&t.message!==undefined){return t.toString()}return formatNonError(t)};if(typeof Error.stackTraceLimit==="number"&&typeof Error.captureStackTrace==="function"){Error.stackTraceLimit+=6;h=e;d=t;var r=Error.captureStackTrace;x=function(e){return c.test(e)};return function(e,t){Error.stackTraceLimit+=6;r(e,t);Error.stackTraceLimit-=6}}var n=new Error;if(typeof n.stack==="string"&&n.stack.split("\n")[0].indexOf("stackDetection@")>=0){h=/@/;d=t;v=true;return function captureStackTrace(e){e.stack=(new Error).stack}}var i;try{throw new Error}catch(e){i="stack"in e}if(!("stack"in n)&&i&&typeof Error.stackTraceLimit==="number"){h=e;d=t;return function captureStackTrace(e){Error.stackTraceLimit+=6;try{throw new Error}catch(t){e.stack=t.stack}Error.stackTraceLimit-=6}}d=function(e,t){if(typeof e==="string")return e;if((typeof t==="object"||typeof t==="function")&&t.name!==undefined&&t.message!==undefined){return t.toString()}return formatNonError(t)};return null}([]);if(typeof console!=="undefined"&&typeof console.warn!=="undefined"){y=function(e){console.warn(e)};if(a.isNode&&process.stderr.isTTY){y=function(e,t){var r=t?"":"";console.warn(r+e+"\n")}}else if(!a.isNode&&typeof(new Error).stack==="string"){y=function(e,t){console.warn("%c"+e,t?"color: darkorange":"color: red")}}}var C={warnings:m,longStackTraces:false,cancellation:false,monitoring:false};if(_)e.longStackTraces();return{longStackTraces:function(){return C.longStackTraces},warnings:function(){return C.warnings},cancellation:function(){return C.cancellation},monitoring:function(){return C.monitoring},propagateFromFunction:function(){return T},boundValueFunction:function(){return boundValueFunction},checkForgottenReturns:checkForgottenReturns,setBounds:setBounds,warn:warn,deprecated:deprecated,CapturedTrace:CapturedTrace,fireDomEvent:E,fireGlobalEvent:S}}},277:function(e,t,r){var n=r(794);var i=r(669);if(!n.Writable||!n.Writable.prototype.destroy)n=r(574);function NoopStream(){if(!(this instanceof NoopStream)){return new NoopStream}n.Transform.call(this)}i.inherits(NoopStream,n.Transform);NoopStream.prototype._transform=function(e,t,r){r()};e.exports=NoopStream},286:function(e,t,r){"use strict";var n=this&&this.__awaiter||function(e,t,r,n){function adopt(e){return e instanceof r?e:new r(function(t){t(e)})}return new(r||(r=Promise))(function(r,i){function fulfilled(e){try{step(n.next(e))}catch(e){i(e)}}function rejected(e){try{step(n["throw"](e))}catch(e){i(e)}}function step(e){e.done?r(e.value):adopt(e.value).then(fulfilled,rejected)}step((n=n.apply(e,t||[])).next())})};var i=this&&this.__importStar||function(e){if(e&&e.__esModule)return e;var t={};if(e!=null)for(var r in e)if(Object.hasOwnProperty.call(e,r))t[r]=e[r];t["default"]=e;return t};Object.defineProperty(t,"__esModule",{value:true});const o=i(r(747));const a=i(r(622));const s=i(r(874));const u=i(r(360));const l=i(r(470));const c=i(r(1));const f=i(r(533));const p=i(r(317));const h=new s.HttpClient("eskatos/gradle-command-action");const d="https://services.gradle.org/versions";function gradleVersion(e){return n(this,void 0,void 0,function*(){switch(e){case"current":return gradleCurrent();case"rc":return gradleReleaseCandidate();case"nightly":return gradleNightly();case"release-nightly":return gradleReleaseNightly();default:return gradle(e)}})}t.gradleVersion=gradleVersion;function gradleCurrent(){return n(this,void 0,void 0,function*(){const e=yield gradleVersionDeclaration(`${d}/current`);return provisionGradle(e.version,e.downloadUrl)})}function gradleReleaseCandidate(){return n(this,void 0,void 0,function*(){const e=yield gradleVersionDeclaration(`${d}/release-candidate`);if(e){return provisionGradle(e.version,e.downloadUrl)}return gradleCurrent()})}function gradleNightly(){return n(this,void 0,void 0,function*(){const e=yield gradleVersionDeclaration(`${d}/nightly`);return provisionGradle(e.version,e.downloadUrl)})}function gradleReleaseNightly(){return n(this,void 0,void 0,function*(){const e=yield gradleVersionDeclaration(`${d}/release-nightly`);return provisionGradle(e.version,e.downloadUrl)})}function gradle(e){return n(this,void 0,void 0,function*(){const t=yield findGradleVersionDeclaration(e);if(!t){throw new Error(`Gradle version ${e} does not exists`)}return provisionGradle(t.version,t.downloadUrl)})}function gradleVersionDeclaration(e){return n(this,void 0,void 0,function*(){return yield httpGetGradleVersion(e)})}function findGradleVersionDeclaration(e){return n(this,void 0,void 0,function*(){const t=yield httpGetGradleVersions(`${d}/all`);return t.find(t=>{return t.version===e})})}function provisionGradle(e,t){return n(this,void 0,void 0,function*(){const r=f.find("gradle",e);if(r.length>0){const e=executableFrom(r);l.info(`Provisioned Gradle executable ${e}`);return e}const n=process.env["HOME"]||"";const i=a.join(n,"gradle-provision-tmpdir");const s=a.join(i,"downloads");const u=a.join(i,"installs");yield c.mkdirP(s);yield c.mkdirP(u);l.info(`Downloading ${t}`);const p=a.join(s,`gradle-${e}-bin.zip`);yield httpDownload(t,p);l.info(`Downloaded at ${p}, size ${o.statSync(p).size}`);yield extractZip(p,u);const h=a.join(u,`gradle-${e}`);l.info(`Extracted in ${h}`);const d=executableFrom(h);o.chmodSync(d,"755");l.info(`Provisioned Gradle executable ${d}`);f.cacheDir(h,"gradle",e);return d})}function executableFrom(e){return a.join(e,"bin",`${p.installScriptFilename()}`)}function httpGetGradleVersion(e){return n(this,void 0,void 0,function*(){return JSON.parse(yield httpGetString(e))})}function httpGetGradleVersions(e){return n(this,void 0,void 0,function*(){return JSON.parse(yield httpGetString(e))})}function httpGetString(e){return n(this,void 0,void 0,function*(){const t=yield h.get(e);return t.readBody()})}function httpDownload(e,t){return n(this,void 0,void 0,function*(){return new Promise(function(r,n){const i=o.createWriteStream(t);h.get(e).then(e=>{e.message.pipe(i).on("close",()=>{r()}).on("error",e=>{n(e)})}).catch(e=>{n(e)})})})}function extractZip(e,t){return n(this,void 0,void 0,function*(){return new Promise(function(r,n){o.createReadStream(e).pipe(u.Extract({path:t})).on("close",()=>{r()}).on("error",e=>{n(e)})})})}},287:function(e){e.exports=function parseDateTime(e,t){const r=e&31;const n=e>>5&15;const i=(e>>9&127)+1980;const o=t?(t&31)*2:0;const a=t?t>>5&63:0;const s=t?t>>11:0;return new Date(Date.UTC(i,n-1,r,s,a,o))}},293:function(e){e.exports=require("buffer")},302:function(e,t,r){e.exports=realpath;realpath.realpath=realpath;realpath.sync=realpathSync;realpath.realpathSync=realpathSync;realpath.monkeypatch=monkeypatch;realpath.unmonkeypatch=unmonkeypatch;var n=r(747);var i=n.realpath;var o=n.realpathSync;var a=process.version;var s=/^v[0-5]\./.test(a);var u=r(117);function newError(e){return e&&e.syscall==="realpath"&&(e.code==="ELOOP"||e.code==="ENOMEM"||e.code==="ENAMETOOLONG")}function realpath(e,t,r){if(s){return i(e,t,r)}if(typeof t==="function"){r=t;t=null}i(e,t,function(n,i){if(newError(n)){u.realpath(e,t,r)}else{r(n,i)}})}function realpathSync(e,t){if(s){return o(e,t)}try{return o(e,t)}catch(r){if(newError(r)){return u.realpathSync(e,t)}else{throw r}}}function monkeypatch(){n.realpath=realpath;n.realpathSync=realpathSync}function unmonkeypatch(){n.realpath=i;n.realpathSync=o}},303:function(e,t,r){var n=r(794);var i=r(379);var o=r(553);var a=r(29);if(!n.Writable||!n.Writable.prototype.destroy)n=r(574);function parseOne(e,t){var r=n.PassThrough({objectMode:true});var s=n.PassThrough();var u=n.Transform({objectMode:true});var l=e instanceof RegExp?e:e&&new RegExp(e);var c;u._transform=function(e,t,r){if(c||l&&!l.exec(e.path)){e.autodrain();return r()}else{c=true;f.emit("entry",e);e.on("error",function(e){s.emit("error",e)});e.pipe(s).on("error",function(e){r(e)}).on("finish",function(e){r(null,e)})}};r.pipe(i(t)).on("error",function(e){s.emit("error",e)}).pipe(u).on("error",Object).on("finish",function(){if(!c)s.emit("error",new Error("PATTERN_NOT_FOUND"));else s.end()});var f=o(r,s);f.buffer=function(){return a(s)};return f}e.exports=parseOne},306:function(e,t,r){var n=r(896);var i=r(621);e.exports=expandTop;var o="\0SLASH"+Math.random()+"\0";var a="\0OPEN"+Math.random()+"\0";var s="\0CLOSE"+Math.random()+"\0";var u="\0COMMA"+Math.random()+"\0";var l="\0PERIOD"+Math.random()+"\0";function numeric(e){return parseInt(e,10)==e?parseInt(e,10):e.charCodeAt(0)}function escapeBraces(e){return e.split("\\\\").join(o).split("\\{").join(a).split("\\}").join(s).split("\\,").join(u).split("\\.").join(l)}function unescapeBraces(e){return e.split(o).join("\\").split(a).join("{").split(s).join("}").split(u).join(",").split(l).join(".")}function parseCommaParts(e){if(!e)return[""];var t=[];var r=i("{","}",e);if(!r)return e.split(",");var n=r.pre;var o=r.body;var a=r.post;var s=n.split(",");s[s.length-1]+="{"+o+"}";var u=parseCommaParts(a);if(a.length){s[s.length-1]+=u.shift();s.push.apply(s,u)}t.push.apply(t,s);return t}function expandTop(e){if(!e)return[];if(e.substr(0,2)==="{}"){e="\\{\\}"+e.substr(2)}return expand(escapeBraces(e),true).map(unescapeBraces)}function identity(e){return e}function embrace(e){return"{"+e+"}"}function isPadded(e){return/^-?0\d/.test(e)}function lte(e,t){return e<=t}function gte(e,t){return e>=t}function expand(e,t){var r=[];var o=i("{","}",e);if(!o||/\$$/.test(o.pre))return[e];var a=/^-?\d+\.\.-?\d+(?:\.\.-?\d+)?$/.test(o.body);var u=/^[a-zA-Z]\.\.[a-zA-Z](?:\.\.-?\d+)?$/.test(o.body);var l=a||u;var c=o.body.indexOf(",")>=0;if(!l&&!c){if(o.post.match(/,.*\}/)){e=o.pre+"{"+o.body+s+o.post;return expand(e)}return[e]}var f;if(l){f=o.body.split(/\.\./)}else{f=parseCommaParts(o.body);if(f.length===1){f=expand(f[0],false).map(embrace);if(f.length===1){var p=o.post.length?expand(o.post,false):[""];return p.map(function(e){return o.pre+f[0]+e})}}}var h=o.pre;var p=o.post.length?expand(o.post,false):[""];var d;if(l){var v=numeric(f[0]);var y=numeric(f[1]);var g=Math.max(f[0].length,f[1].length);var m=f.length==3?Math.abs(numeric(f[2])):1;var _=lte;var w=y0){var O=new Array(R+1).join("0");if(E<0)S="-"+O+S.slice(1);else S=O+S}}}d.push(S)}}else{d=n(f,function(e){return expand(e,false)})}for(var T=0;T=this._length){var n;if(this._isMap){n=c(this._values)}else{n={};var i=this.length();for(var o=0,a=this.length();o>1};function props(t){var r;var o=n(t);if(!a(o)){return i("cannot await properties of a non-object\n\n See http://goo.gl/MqrFmX\n")}else if(o instanceof e){r=o._then(e.props,undefined,undefined,undefined,undefined)}else{r=new PropertiesPromiseArray(o).promise()}if(o instanceof e){r._propagateFrom(o,2)}return r}e.prototype.props=function(){return props(this)};e.props=function(e){return props(e)}}},323:function(e,t,r){"use strict";e.exports=function(e,t,n){var i=r(248);var o=r(607).RangeError;var a=r(607).AggregateError;var s=i.isArray;var u={};function SomePromiseArray(e){this.constructor$(e);this._howMany=0;this._unwrap=false;this._initialized=false}i.inherits(SomePromiseArray,t);SomePromiseArray.prototype._init=function(){if(!this._initialized){return}if(this._howMany===0){this._resolve([]);return}this._init$(undefined,-5);var e=s(this._values);if(!this._isResolved()&&e&&this._howMany>this._canPossiblyFulfill()){this._reject(this._getRangeError(this.length()))}};SomePromiseArray.prototype.init=function(){this._initialized=true;this._init()};SomePromiseArray.prototype.setUnwrap=function(){this._unwrap=true};SomePromiseArray.prototype.howMany=function(){return this._howMany};SomePromiseArray.prototype.setHowMany=function(e){this._howMany=e};SomePromiseArray.prototype._promiseFulfilled=function(e){this._addFulfilled(e);if(this._fulfilled()===this.howMany()){this._values.length=this.howMany();if(this.howMany()===1&&this._unwrap){this._resolve(this._values[0])}else{this._resolve(this._values)}return true}return false};SomePromiseArray.prototype._promiseRejected=function(e){this._addRejected(e);return this._checkOutcome()};SomePromiseArray.prototype._promiseCancelled=function(){if(this._values instanceof e||this._values==null){return this._cancel()}this._addRejected(u);return this._checkOutcome()};SomePromiseArray.prototype._checkOutcome=function(){if(this.howMany()>this._canPossiblyFulfill()){var e=new a;for(var t=this.length();t0){this._reject(e)}else{this._cancel()}return true}return false};SomePromiseArray.prototype._fulfilled=function(){return this._totalResolved};SomePromiseArray.prototype._rejected=function(){return this._values.length-this.length()};SomePromiseArray.prototype._addRejected=function(e){this._values.push(e)};SomePromiseArray.prototype._addFulfilled=function(e){this._values[this._totalResolved++]=e};SomePromiseArray.prototype._canPossiblyFulfill=function(){return this.length()-this._rejected()};SomePromiseArray.prototype._getRangeError=function(e){var t="Input array must contain at least "+this._howMany+" items but contains only "+e+" items";return new o(t)};SomePromiseArray.prototype._resolveEmptyArray=function(){this._reject(this._getRangeError(0))};function some(e,t){if((t|0)!==t||t<0){return n("expecting a positive integer\n\n See http://goo.gl/MqrFmX\n")}var r=new SomePromiseArray(e);var i=r.promise();r.setHowMany(t);r.init();return i}e.some=function(e,t){return some(e,t)};e.prototype.some=function(e){return some(this,e)};e._SomePromiseArray=SomePromiseArray}},339:function(e,t,r){"use strict";var n=r(640);var i=Object.prototype.hasOwnProperty;var o=Array.isArray;var a={allowDots:false,allowPrototypes:false,arrayLimit:20,charset:"utf-8",charsetSentinel:false,comma:false,decoder:n.decode,delimiter:"&",depth:5,ignoreQueryPrefix:false,interpretNumericEntities:false,parameterLimit:1e3,parseArrays:true,plainObjects:false,strictNullHandling:false};var s=function(e){return e.replace(/&#(\d+);/g,function(e,t){return String.fromCharCode(parseInt(t,10))})};var u=function(e,t){if(e&&typeof e==="string"&&t.comma&&e.indexOf(",")>-1){return e.split(",")}return e};var l="utf8=%26%2310003%3B";var c="utf8=%E2%9C%93";var f=function parseQueryStringValues(e,t){var r={};var f=t.ignoreQueryPrefix?e.replace(/^\?/,""):e;var p=t.parameterLimit===Infinity?undefined:t.parameterLimit;var h=f.split(t.delimiter,p);var d=-1;var v;var y=t.charset;if(t.charsetSentinel){for(v=0;v-1){b=o(b)?[b]:b}if(i.call(r,w)){r[w]=n.combine(r[w],b)}else{r[w]=b}}return r};var p=function(e,t,r,n){var i=n?t:u(t,r);for(var o=e.length-1;o>=0;--o){var a;var s=e[o];if(s==="[]"&&r.parseArrays){a=[].concat(i)}else{a=r.plainObjects?Object.create(null):{};var l=s.charAt(0)==="["&&s.charAt(s.length-1)==="]"?s.slice(1,-1):s;var c=parseInt(l,10);if(!r.parseArrays&&l===""){a={0:i}}else if(!isNaN(c)&&s!==l&&String(c)===l&&c>=0&&(r.parseArrays&&c<=r.arrayLimit)){a=[];a[c]=i}else{a[l]=i}}i=a}return i};var h=function parseQueryStringKeys(e,t,r,n){if(!e){return}var o=r.allowDots?e.replace(/\.([^.[]+)/g,"[$1]"):e;var a=/(\[[^[\]]*])/;var s=/(\[[^[\]]*])/g;var u=r.depth>0&&a.exec(o);var l=u?o.slice(0,u.index):o;var c=[];if(l){if(!r.plainObjects&&i.call(Object.prototype,l)){if(!r.allowPrototypes){return}}c.push(l)}var f=0;while(r.depth>0&&(u=s.exec(o))!==null&&f0,h;a.__autodraining=u;var d=r.compressionMethod&&!u?i.createInflateRaw():o.PassThrough();if(c){a.size=r.uncompressedSize;h=r.compressedSize}else{h=p.alloc(4);h.writeUInt32LE(134695760,0)}return new s(function(t,r){e.stream(h).pipe(d).on("error",function(t){e.emit("error",t)}).pipe(a).on("finish",function(){return c?e._readRecord().then(t).catch(r):e._processDataDescriptor(a).then(t).catch(r)})})})})})};Parse.prototype._processDataDescriptor=function(e){var t=this;return t.pull(16).then(function(r){var n=a.parse(r).word32lu("dataDescriptorSignature").word32lu("crc32").word32lu("compressedSize").word32lu("uncompressedSize").vars;e.size=n.uncompressedSize;return t._readRecord()})};Parse.prototype._readCentralDirectoryFileHeader=function(){var e=this;return e.pull(42).then(function(t){var r=a.parse(t).word16lu("versionMadeBy").word16lu("versionsNeededToExtract").word16lu("flags").word16lu("compressionMethod").word16lu("lastModifiedTime").word16lu("lastModifiedDate").word32lu("crc32").word32lu("compressedSize").word32lu("uncompressedSize").word16lu("fileNameLength").word16lu("extraFieldLength").word16lu("fileCommentLength").word16lu("diskNumber").word16lu("internalFileAttributes").word32lu("externalFileAttributes").word32lu("offsetToLocalFileHeader").vars;return e.pull(r.fileNameLength).then(function(t){r.fileName=t.toString("utf8");return e.pull(r.extraFieldLength)}).then(function(t){return e.pull(r.fileCommentLength)}).then(function(t){return e._readRecord()})})};Parse.prototype._readEndOfCentralDirectoryRecord=function(){var e=this;return e.pull(18).then(function(t){var r=a.parse(t).word16lu("diskNumber").word16lu("diskStart").word16lu("numberOfRecordsOnDisk").word16lu("numberOfRecords").word32lu("sizeOfCentralDirectory").word32lu("offsetToStartOfCentralDirectory").word16lu("commentLength").vars;return e.pull(r.commentLength).then(function(t){t=t.toString("utf8");e.end();e.push(null)})})};Parse.prototype.promise=function(){var e=this;return new s(function(t,r){e.on("finish",t);e.on("error",r)})};e.exports=Parse},394:function(e,t,r){e.exports=Abstract;var n=r(794).Stream;var i=r(689);function Abstract(){n.call(this)}i(Abstract,n);Abstract.prototype.on=function(e,t){if(e==="ready"&&this.ready){process.nextTick(t.bind(this))}else{n.prototype.on.call(this,e,t)}return this};Abstract.prototype.abort=function(){this._aborted=true;this.emit("abort")};Abstract.prototype.destroy=function(){};Abstract.prototype.warn=function(e,t){var r=this;var n=decorate(e,t,r);if(!r.listeners("warn")){console.error("%s %s\n"+"path = %s\n"+"syscall = %s\n"+"fstream_type = %s\n"+"fstream_path = %s\n"+"fstream_unc_path = %s\n"+"fstream_class = %s\n"+"fstream_stack =\n%s\n",t||"UNKNOWN",n.stack,n.path,n.syscall,n.fstream_type,n.fstream_path,n.fstream_unc_path,n.fstream_class,n.fstream_stack.join("\n"))}else{r.emit("warn",n)}};Abstract.prototype.info=function(e,t){this.emit("info",e,t)};Abstract.prototype.error=function(e,t,r){var n=decorate(e,t,this);if(r)throw n;else this.emit("error",n)};function decorate(e,t,r){if(!(e instanceof Error))e=new Error(e);e.code=e.code||t;e.path=e.path||r.path;e.fstream_type=e.fstream_type||r.type;e.fstream_path=e.fstream_path||r.path;if(r._path!==r.path){e.fstream_unc_path=e.fstream_unc_path||r._path}if(r.linkpath){e.fstream_linkpath=e.fstream_linkpath||r.linkpath}e.fstream_class=e.fstream_class||r.constructor.name;e.fstream_stack=e.fstream_stack||(new Error).stack.split(/\n/).slice(3).map(function(e){return e.replace(/^ {4}at /,"")});return e}},402:function(e,t,r){e.exports=glob;var n=r(747);var i=r(302);var o=r(723);var a=o.Minimatch;var s=r(689);var u=r(614).EventEmitter;var l=r(622);var c=r(357);var f=r(681);var p=r(245);var h=r(856);var d=h.alphasort;var v=h.alphasorti;var y=h.setopts;var g=h.ownProp;var m=r(634);var _=r(669);var w=h.childrenIgnored;var b=h.isIgnored;var E=r(49);function glob(e,t,r){if(typeof t==="function")r=t,t={};if(!t)t={};if(t.sync){if(r)throw new TypeError("callback provided to sync glob");return p(e,t)}return new Glob(e,t,r)}glob.sync=p;var S=glob.GlobSync=p.GlobSync;glob.glob=glob;function extend(e,t){if(t===null||typeof t!=="object"){return e}var r=Object.keys(t);var n=r.length;while(n--){e[r[n]]=t[r[n]]}return e}glob.hasMagic=function(e,t){var r=extend({},t);r.noprocess=true;var n=new Glob(e,r);var i=n.minimatch.set;if(!e)return false;if(i.length>1)return true;for(var o=0;othis.maxLength)return t();if(!this.stat&&g(this.cache,r)){var o=this.cache[r];if(Array.isArray(o))o="DIR";if(!i||o==="DIR")return t(null,o);if(i&&o==="FILE")return t()}var a;var s=this.statCache[r];if(s!==undefined){if(s===false)return t(null,s);else{var u=s.isDirectory()?"DIR":"FILE";if(i&&u==="FILE")return t();else return t(null,u,s)}}var l=this;var c=m("stat\0"+r,lstatcb_);if(c)n.lstat(r,c);function lstatcb_(i,o){if(o&&o.isSymbolicLink()){return n.stat(r,function(n,i){if(n)l._stat2(e,r,null,o,t);else l._stat2(e,r,n,i,t)})}else{l._stat2(e,r,i,o,t)}}};Glob.prototype._stat2=function(e,t,r,n,i){if(r&&(r.code==="ENOENT"||r.code==="ENOTDIR")){this.statCache[t]=false;return i()}var o=e.slice(-1)==="/";this.statCache[t]=n;if(t.slice(-1)==="/"&&n&&!n.isDirectory())return i(null,false,n);var a=true;if(n)a=n.isDirectory()?"DIR":"FILE";this.cache[t]=this.cache[t]||a;if(o&&a==="FILE")return i();return i(null,a,n)}},409:function(e,t,r){"use strict";e.exports=function(e,t,n){var i=r(248);var o=e.TimeoutError;function HandleWrapper(e){this.handle=e}HandleWrapper.prototype._resultCancelled=function(){clearTimeout(this.handle)};var a=function(e){return s(+this).thenReturn(e)};var s=e.delay=function(r,i){var o;var s;if(i!==undefined){o=e.resolve(i)._then(a,null,null,r,undefined);if(n.cancellation()&&i instanceof e){o._setOnCancel(i)}}else{o=new e(t);s=setTimeout(function(){o._fulfill()},+r);if(n.cancellation()){o._setOnCancel(new HandleWrapper(s))}o._captureStackTrace()}o._setAsyncGuaranteed();return o};e.prototype.delay=function(e){return s(e,this)};var u=function(e,t,r){var n;if(typeof t!=="string"){if(t instanceof Error){n=t}else{n=new o("operation timed out")}}else{n=new o(t)}i.markAsOriginatingFromRejection(n);e._attachExtraTrace(n);e._reject(n);if(r!=null){r.cancel()}};function successClear(e){clearTimeout(this.handle);return e}function failureClear(e){clearTimeout(this.handle);throw e}e.prototype.timeout=function(e,t){e=+e;var r,i;var o=new HandleWrapper(setTimeout(function timeoutTimeout(){if(r.isPending()){u(r,t,i)}},e));if(n.cancellation()){i=this.then();r=i._then(successClear,failureClear,undefined,o,undefined);r._setOnCancel(o)}else{r=this._then(successClear,failureClear,undefined,o,undefined)}return r}}},413:function(e,t,r){e.exports=r(141)},414:function(e,t,r){"use strict";var n=Object.create;if(n){var i=n(null);var o=n(null);i[" size"]=o[" size"]=0}e.exports=function(e){var t=r(248);var n=t.canEvaluate;var a=t.isIdentifier;var s;var u;if(true){var l=function(e){return new Function("ensureMethod"," \n return function(obj) { \n 'use strict' \n var len = this.length; \n ensureMethod(obj, 'methodName'); \n switch(len) { \n case 1: return obj.methodName(this[0]); \n case 2: return obj.methodName(this[0], this[1]); \n case 3: return obj.methodName(this[0], this[1], this[2]); \n case 0: return obj.methodName(); \n default: \n return obj.methodName.apply(obj, this); \n } \n }; \n ".replace(/methodName/g,e))(ensureMethod)};var c=function(e){return new Function("obj"," \n 'use strict'; \n return obj.propertyName; \n ".replace("propertyName",e))};var f=function(e,t,r){var n=r[e];if(typeof n!=="function"){if(!a(e)){return null}n=t(e);r[e]=n;r[" size"]++;if(r[" size"]>512){var i=Object.keys(r);for(var o=0;o<256;++o)delete r[i[o]];r[" size"]=i.length-256}}return n};s=function(e){return f(e,l,i)};u=function(e){return f(e,c,o)}}function ensureMethod(r,n){var i;if(r!=null)i=r[n];if(typeof i!=="function"){var o="Object "+t.classString(r)+" has no method '"+t.toString(n)+"'";throw new e.TypeError(o)}return i}function caller(e){var t=this.pop();var r=ensureMethod(e,t);return r.apply(e,this)}e.prototype.call=function(e){var t=arguments.length;var r=new Array(Math.max(t-1,0));for(var i=1;i0){e+=" ";let t=true;for(const r in this.properties){if(this.properties.hasOwnProperty(r)){const n=this.properties[r];if(n){if(t){t=false}else{e+=","}e+=`${r}=${escapeProperty(n)}`}}}}e+=`${o}${escapeData(this.message)}`;return e}}function toCommandValue(e){if(e===null||e===undefined){return""}else if(typeof e==="string"||e instanceof String){return e}return JSON.stringify(e)}t.toCommandValue=toCommandValue;function escapeData(e){return toCommandValue(e).replace(/%/g,"%25").replace(/\r/g,"%0D").replace(/\n/g,"%0A")}function escapeProperty(e){return toCommandValue(e).replace(/%/g,"%25").replace(/\r/g,"%0D").replace(/\n/g,"%0A").replace(/:/g,"%3A").replace(/,/g,"%2C")}},440:function(e,t,r){"use strict";var n;if(typeof Promise!=="undefined")n=Promise;function noConflict(){try{if(Promise===i)Promise=n}catch(e){}return i}var i=r(983)();i.noConflict=noConflict;e.exports=i},441:function(e,t,r){e.exports=ProxyWriter;var n=r(82);var i=r(716);var o=r(689);var a=r(137);var s=r(747);o(ProxyWriter,n);function ProxyWriter(e){var t=this;if(!(t instanceof ProxyWriter)){throw new Error("ProxyWriter must be called as constructor.")}t.props=e;t._needDrain=false;n.call(t,e)}ProxyWriter.prototype._stat=function(){var e=this;var t=e.props;var r=t.follow?"stat":"lstat";s[r](t.path,function(r,o){var a;if(r||!o){a="File"}else{a=i(o)}t[a]=true;t.type=e.type=a;e._old=o;e._addProxy(n(t,o))})};ProxyWriter.prototype._addProxy=function(e){var t=this;if(t._proxy){return t.error("proxy already set")}t._proxy=e;["ready","error","close","pipe","drain","warn"].forEach(function(r){e.on(r,t.emit.bind(t,r))});t.emit("proxy",e);var r=t._buffer;r.forEach(function(t){e[t[0]].apply(e,t[1])});t._buffer.length=0;if(t._needsDrain)t.emit("drain")};ProxyWriter.prototype.add=function(e){a(e);if(!this._proxy){this._buffer.push(["add",[e]]);this._needDrain=true;return false}return this._proxy.add(e)};ProxyWriter.prototype.write=function(e){if(!this._proxy){this._buffer.push(["write",[e]]);this._needDrain=true;return false}return this._proxy.write(e)};ProxyWriter.prototype.end=function(e){if(!this._proxy){this._buffer.push(["end",[e]]);return false}return this._proxy.end(e)}},460:function(){(function(e,t){"use strict";if(e.setImmediate){return}var r=1;var n={};var i=false;var o=e.document;var a;function setImmediate(e){if(typeof e!=="function"){e=new Function(""+e)}var t=new Array(arguments.length-1);for(var i=0;i=e){var t;if(u==null){t=c.splice(0,e);if(!r.skip){t=t.slice()}}else{if(!r.skip){t=c.slice(u,e)}u=e}if(r.skip){r.cb()}else{r.cb(t)}}}}function builder(e){function next(){if(!p)e.next()}var t=words(function(e,t){return function(r){getBytes(e,function(e){f.set(r,t(e));next()})}});t.tap=function(t){e.nest(t,f.store)};t.into=function(t,r){if(!f.get(t))f.set(t,{});var n=f;f=a(n.get(t));e.nest(function(){r.apply(this,arguments);this.tap(function(){f=n})},f.store)};t.flush=function(){f.store={};next()};t.loop=function(t){var r=false;e.nest(false,function loop(){this.vars=f.store;t.call(this,function(){r=true;next()},f.store);this.tap(function(){if(r)e.next();else loop.call(this)}.bind(this))},f.store)};t.buffer=function(e,t){if(typeof t==="string"){t=f.get(t)}getBytes(t,function(t){f.set(e,t);next()})};t.skip=function(e){if(typeof e==="string"){e=f.get(e)}getBytes(e,function(){next()})};t.scan=function find(e,t){if(typeof t==="string"){t=new Buffer(t)}else if(!Buffer.isBuffer(t)){throw new Error("search must be a Buffer or a string")}var n=0;r=function(){var i=c.indexOf(t,u+n);var o=i-u-n;if(i!==-1){r=null;if(u!=null){f.set(e,c.slice(u,u+n+o));u+=n+o+t.length}else{f.set(e,c.slice(0,n+o));c.splice(0,n+o+t.length)}next();dispatch()}else{o=Math.max(c.length-t.length-u-n,0)}n+=o};dispatch()};t.peek=function(t){u=0;e.nest(function(){t.call(this,f.store);this.tap(function(){u=null})})};return t}var l=n.light(builder);l.writable=true;var c=o();l.write=function(e){c.push(e);dispatch()};var f=a();var p=false,h=false;l.end=function(){h=true};l.pipe=s.prototype.pipe;Object.getOwnPropertyNames(i.prototype).forEach(function(e){l[e]=i.prototype[e]});return l};t.parse=function parse(e){var t=words(function(i,o){return function(a){if(r+i<=e.length){var s=e.slice(r,r+i);r+=i;n.set(a,o(s))}else{n.set(a,null)}return t}});var r=0;var n=a();t.vars=n.store;t.tap=function(e){e.call(t,n.store);return t};t.into=function(e,r){if(!n.get(e)){n.set(e,{})}var i=n;n=a(i.get(e));r.call(t,n.store);n=i;return t};t.loop=function(e){var r=false;var i=function(){r=true};while(r===false){e.call(t,i,n.store)}return t};t.buffer=function(i,o){if(typeof o==="string"){o=n.get(o)}var a=e.slice(r,Math.min(e.length,r+o));r+=o;n.set(i,a);return t};t.skip=function(e){if(typeof e==="string"){e=n.get(e)}r+=e;return t};t.scan=function(i,o){if(typeof o==="string"){o=new Buffer(o)}else if(!Buffer.isBuffer(o)){throw new Error("search must be a Buffer or a string")}n.set(i,null);for(var a=0;a+r<=e.length-o.length+1;a++){for(var s=0;s=e.length};return t};function decodeLEu(e){var t=0;for(var r=0;r0)this._settlePromises()};e.prototype._unsetOnCancel=function(){this._onCancelField=undefined};e.prototype._isCancellable=function(){return this.isPending()&&!this._isCancelled()};e.prototype.isCancellable=function(){return this.isPending()&&!this.isCancelled()};e.prototype._doInvokeOnCancel=function(e,t){if(o.isArray(e)){for(var r=0;rn(this,void 0,void 0,function*(){return yield downloadToolAttempt(e,t||"",r)}),e=>{if(e instanceof HTTPError&&e.httpStatusCode){if(e.httpStatusCode<500&&e.httpStatusCode!==408&&e.httpStatusCode!==429){return false}}return true})})}t.downloadTool=downloadTool;function downloadToolAttempt(e,t,r){return n(this,void 0,void 0,function*(){if(u.existsSync(t)){throw new Error(`Destination file path ${t} already exists`)}const n=new p.HttpClient(b,[],{allowRetries:false});let i;if(r){a.debug("set auth");i={authorization:r}}const o=yield n.get(e,i);if(o.message.statusCode!==200){const t=new HTTPError(o.message.statusCode);a.debug(`Failed to download from "${e}". Code(${o.message.statusCode}) Message(${o.message.statusMessage})`);throw t}const l=v.promisify(d.pipeline);const c=_getGlobal("TEST_DOWNLOAD_TOOL_RESPONSE_MESSAGE_FACTORY",()=>o.message);const f=c();let h=false;try{yield l(f,u.createWriteStream(t));a.debug("download complete");h=true;return t}finally{if(!h){a.debug("download failed");try{yield s.rmRF(t)}catch(e){a.debug(`Failed to delete '${t}'. ${e.message}`)}}}})}function extract7z(e,t,r){return n(this,void 0,void 0,function*(){m.ok(w,"extract7z() not supported on current OS");m.ok(e,'parameter "file" is required');t=yield _createExtractFolder(t);const n=process.cwd();process.chdir(t);if(r){try{const t=a.isDebug()?"-bb1":"-bb0";const i=["x",t,"-bd","-sccUTF-8",e];const o={silent:true};yield g.exec(`"${r}"`,i,o)}finally{process.chdir(n)}}else{const r=f.join(__dirname,"..","scripts","Invoke-7zdec.ps1").replace(/'/g,"''").replace(/"|\n|\r/g,"");const i=e.replace(/'/g,"''").replace(/"|\n|\r/g,"");const o=t.replace(/'/g,"''").replace(/"|\n|\r/g,"");const a=`& '${r}' -Source '${i}' -Target '${o}'`;const u=["-NoLogo","-Sta","-NoProfile","-NonInteractive","-ExecutionPolicy","Unrestricted","-Command",a];const l={silent:true};try{const e=yield s.which("powershell",true);yield g.exec(`"${e}"`,u,l)}finally{process.chdir(n)}}return t})}t.extract7z=extract7z;function extractTar(e,t,r="xz"){return n(this,void 0,void 0,function*(){if(!e){throw new Error("parameter 'file' is required")}t=yield _createExtractFolder(t);a.debug("Checking tar --version");let n="";yield g.exec("tar --version",[],{ignoreReturnCode:true,silent:true,listeners:{stdout:e=>n+=e.toString(),stderr:e=>n+=e.toString()}});a.debug(n.trim());const i=n.toUpperCase().includes("GNU TAR");let o;if(r instanceof Array){o=r}else{o=[r]}if(a.isDebug()&&!r.includes("v")){o.push("-v")}let s=t;let u=e;if(w&&i){o.push("--force-local");s=t.replace(/\\/g,"/");u=e.replace(/\\/g,"/")}if(i){o.push("--warning=no-unknown-keyword")}o.push("-C",s,"-f",u);yield g.exec(`tar`,o);return t})}t.extractTar=extractTar;function extractZip(e,t){return n(this,void 0,void 0,function*(){if(!e){throw new Error("parameter 'file' is required")}t=yield _createExtractFolder(t);if(w){yield extractZipWin(e,t)}else{yield extractZipNix(e,t)}return t})}t.extractZip=extractZip;function extractZipWin(e,t){return n(this,void 0,void 0,function*(){const r=e.replace(/'/g,"''").replace(/"|\n|\r/g,"");const n=t.replace(/'/g,"''").replace(/"|\n|\r/g,"");const i=`$ErrorActionPreference = 'Stop' ; try { Add-Type -AssemblyName System.IO.Compression.FileSystem } catch { } ; [System.IO.Compression.ZipFile]::ExtractToDirectory('${r}', '${n}')`;const o=yield s.which("powershell",true);const a=["-NoLogo","-Sta","-NoProfile","-NonInteractive","-ExecutionPolicy","Unrestricted","-Command",i];yield g.exec(`"${o}"`,a)})}function extractZipNix(e,t){return n(this,void 0,void 0,function*(){const r=yield s.which("unzip",true);const n=[e];if(!a.isDebug()){n.unshift("-q")}yield g.exec(`"${r}"`,n,{cwd:t})})}function cacheDir(e,t,r,i){return n(this,void 0,void 0,function*(){r=h.clean(r)||r;i=i||c.arch();a.debug(`Caching tool ${t} ${r} ${i}`);a.debug(`source dir: ${e}`);if(!u.statSync(e).isDirectory()){throw new Error("sourceDir is not a directory")}const n=yield _createToolPath(t,r,i);for(const t of u.readdirSync(e)){const r=f.join(e,t);yield s.cp(r,n,{recursive:true})}_completeToolPath(t,r,i);return n})}t.cacheDir=cacheDir;function cacheFile(e,t,r,i,o){return n(this,void 0,void 0,function*(){i=h.clean(i)||i;o=o||c.arch();a.debug(`Caching tool ${r} ${i} ${o}`);a.debug(`source file: ${e}`);if(!u.statSync(e).isFile()){throw new Error("sourceFile is not a file")}const n=yield _createToolPath(r,i,o);const l=f.join(n,t);a.debug(`destination file ${l}`);yield s.cp(e,l);_completeToolPath(r,i,o);return n})}t.cacheFile=cacheFile;function find(e,t,r){if(!e){throw new Error("toolName parameter is required")}if(!t){throw new Error("versionSpec parameter is required")}r=r||c.arch();if(!_isExplicitVersion(t)){const n=findAllVersions(e,r);const i=_evaluateVersions(n,t);t=i}let n="";if(t){t=h.clean(t)||"";const i=f.join(_getCacheDirectory(),e,t,r);a.debug(`checking cache: ${i}`);if(u.existsSync(i)&&u.existsSync(`${i}.complete`)){a.debug(`Found tool in cache ${e} ${t} ${r}`);n=i}else{a.debug("not found")}}return n}t.find=find;function findAllVersions(e,t){const r=[];t=t||c.arch();const n=f.join(_getCacheDirectory(),e);if(u.existsSync(n)){const e=u.readdirSync(n);for(const i of e){if(_isExplicitVersion(i)){const e=f.join(n,i,t||"");if(u.existsSync(e)&&u.existsSync(`${e}.complete`)){r.push(i)}}}}return r}t.findAllVersions=findAllVersions;function getManifestFromRepo(e,t,r,i="master"){return n(this,void 0,void 0,function*(){let n=[];const o=`https://api.github.com/repos/${e}/${t}/git/trees/${i}`;const s=new p.HttpClient("tool-cache");const u={};if(r){a.debug("set auth");u.authorization=r}const l=yield s.getJson(o,u);if(!l.result){return n}let c="";for(const e of l.result.tree){if(e.path==="versions-manifest.json"){c=e.url;break}}u["accept"]="application/vnd.github.VERSION.raw";let f=yield(yield s.get(c,u)).readBody();if(f){f=f.replace(/^\uFEFF/,"");try{n=JSON.parse(f)}catch(e){a.debug("Invalid json")}}return n})}t.getManifestFromRepo=getManifestFromRepo;function findFromManifest(e,t,r,i=c.arch()){return n(this,void 0,void 0,function*(){const n=yield l._findMatch(e,t,r,i);return n})}t.findFromManifest=findFromManifest;function _createExtractFolder(e){return n(this,void 0,void 0,function*(){if(!e){e=f.join(_getTempDirectory(),y.default())}yield s.mkdirP(e);return e})}function _createToolPath(e,t,r){return n(this,void 0,void 0,function*(){const n=f.join(_getCacheDirectory(),e,h.clean(t)||t,r||"");a.debug(`destination ${n}`);const i=`${n}.complete`;yield s.rmRF(n);yield s.rmRF(i);yield s.mkdirP(n);return n})}function _completeToolPath(e,t,r){const n=f.join(_getCacheDirectory(),e,h.clean(t)||t,r||"");const i=`${n}.complete`;u.writeFileSync(i,"");a.debug("finished caching tool")}function _isExplicitVersion(e){const t=h.clean(e)||"";a.debug(`isExplicit: ${t}`);const r=h.valid(t)!=null;a.debug(`explicit? ${r}`);return r}function _evaluateVersions(e,t){let r="";a.debug(`evaluating ${e.length} versions`);e=e.sort((e,t)=>{if(h.gt(e,t)){return 1}return-1});for(let n=e.length-1;n>=0;n--){const i=e[n];const o=h.satisfies(i,t);if(o){r=i;break}}if(r){a.debug(`matched: ${r}`)}else{a.debug("match not found")}return r}function _getCacheDirectory(){const e=process.env["RUNNER_TOOL_CACHE"]||"";m.ok(e,"Expected RUNNER_TOOL_CACHE to be defined");return e}function _getTempDirectory(){const e=process.env["RUNNER_TEMP"]||"";m.ok(e,"Expected RUNNER_TEMP to be defined");return e}function _getGlobal(e,t){const r=global[e];return r!==undefined?r:t}},539:function(e,t,r){"use strict";Object.defineProperty(t,"__esModule",{value:true});const n=r(835);const i=r(605);const o=r(211);const a=r(950);let s;var u;(function(e){e[e["OK"]=200]="OK";e[e["MultipleChoices"]=300]="MultipleChoices";e[e["MovedPermanently"]=301]="MovedPermanently";e[e["ResourceMoved"]=302]="ResourceMoved";e[e["SeeOther"]=303]="SeeOther";e[e["NotModified"]=304]="NotModified";e[e["UseProxy"]=305]="UseProxy";e[e["SwitchProxy"]=306]="SwitchProxy";e[e["TemporaryRedirect"]=307]="TemporaryRedirect";e[e["PermanentRedirect"]=308]="PermanentRedirect";e[e["BadRequest"]=400]="BadRequest";e[e["Unauthorized"]=401]="Unauthorized";e[e["PaymentRequired"]=402]="PaymentRequired";e[e["Forbidden"]=403]="Forbidden";e[e["NotFound"]=404]="NotFound";e[e["MethodNotAllowed"]=405]="MethodNotAllowed";e[e["NotAcceptable"]=406]="NotAcceptable";e[e["ProxyAuthenticationRequired"]=407]="ProxyAuthenticationRequired";e[e["RequestTimeout"]=408]="RequestTimeout";e[e["Conflict"]=409]="Conflict";e[e["Gone"]=410]="Gone";e[e["TooManyRequests"]=429]="TooManyRequests";e[e["InternalServerError"]=500]="InternalServerError";e[e["NotImplemented"]=501]="NotImplemented";e[e["BadGateway"]=502]="BadGateway";e[e["ServiceUnavailable"]=503]="ServiceUnavailable";e[e["GatewayTimeout"]=504]="GatewayTimeout"})(u=t.HttpCodes||(t.HttpCodes={}));var l;(function(e){e["Accept"]="accept";e["ContentType"]="content-type"})(l=t.Headers||(t.Headers={}));var c;(function(e){e["ApplicationJson"]="application/json"})(c=t.MediaTypes||(t.MediaTypes={}));function getProxyUrl(e){let t=a.getProxyUrl(n.parse(e));return t?t.href:""}t.getProxyUrl=getProxyUrl;const f=[u.MovedPermanently,u.ResourceMoved,u.SeeOther,u.TemporaryRedirect,u.PermanentRedirect];const p=[u.BadGateway,u.ServiceUnavailable,u.GatewayTimeout];const h=["OPTIONS","GET","DELETE","HEAD"];const d=10;const v=5;class HttpClientResponse{constructor(e){this.message=e}readBody(){return new Promise(async(e,t)=>{let r=Buffer.alloc(0);this.message.on("data",e=>{r=Buffer.concat([r,e])});this.message.on("end",()=>{e(r.toString())})})}}t.HttpClientResponse=HttpClientResponse;function isHttps(e){let t=n.parse(e);return t.protocol==="https:"}t.isHttps=isHttps;class HttpClient{constructor(e,t,r){this._ignoreSslError=false;this._allowRedirects=true;this._allowRedirectDowngrade=false;this._maxRedirects=50;this._allowRetries=false;this._maxRetries=1;this._keepAlive=false;this._disposed=false;this.userAgent=e;this.handlers=t||[];this.requestOptions=r;if(r){if(r.ignoreSslError!=null){this._ignoreSslError=r.ignoreSslError}this._socketTimeout=r.socketTimeout;if(r.allowRedirects!=null){this._allowRedirects=r.allowRedirects}if(r.allowRedirectDowngrade!=null){this._allowRedirectDowngrade=r.allowRedirectDowngrade}if(r.maxRedirects!=null){this._maxRedirects=Math.max(r.maxRedirects,0)}if(r.keepAlive!=null){this._keepAlive=r.keepAlive}if(r.allowRetries!=null){this._allowRetries=r.allowRetries}if(r.maxRetries!=null){this._maxRetries=r.maxRetries}}}options(e,t){return this.request("OPTIONS",e,null,t||{})}get(e,t){return this.request("GET",e,null,t||{})}del(e,t){return this.request("DELETE",e,null,t||{})}post(e,t,r){return this.request("POST",e,t,r||{})}patch(e,t,r){return this.request("PATCH",e,t,r||{})}put(e,t,r){return this.request("PUT",e,t,r||{})}head(e,t){return this.request("HEAD",e,null,t||{})}sendStream(e,t,r,n){return this.request(e,t,r,n)}async getJson(e,t={}){t[l.Accept]=this._getExistingOrDefaultHeader(t,l.Accept,c.ApplicationJson);let r=await this.get(e,t);return this._processResponse(r,this.requestOptions)}async postJson(e,t,r={}){let n=JSON.stringify(t,null,2);r[l.Accept]=this._getExistingOrDefaultHeader(r,l.Accept,c.ApplicationJson);r[l.ContentType]=this._getExistingOrDefaultHeader(r,l.ContentType,c.ApplicationJson);let i=await this.post(e,n,r);return this._processResponse(i,this.requestOptions)}async putJson(e,t,r={}){let n=JSON.stringify(t,null,2);r[l.Accept]=this._getExistingOrDefaultHeader(r,l.Accept,c.ApplicationJson);r[l.ContentType]=this._getExistingOrDefaultHeader(r,l.ContentType,c.ApplicationJson);let i=await this.put(e,n,r);return this._processResponse(i,this.requestOptions)}async patchJson(e,t,r={}){let n=JSON.stringify(t,null,2);r[l.Accept]=this._getExistingOrDefaultHeader(r,l.Accept,c.ApplicationJson);r[l.ContentType]=this._getExistingOrDefaultHeader(r,l.ContentType,c.ApplicationJson);let i=await this.patch(e,n,r);return this._processResponse(i,this.requestOptions)}async request(e,t,r,i){if(this._disposed){throw new Error("Client has already been disposed.")}let o=n.parse(t);let a=this._prepareRequest(e,o,i);let s=this._allowRetries&&h.indexOf(e)!=-1?this._maxRetries+1:1;let l=0;let c;while(l0){const s=c.message.headers["location"];if(!s){break}let u=n.parse(s);if(o.protocol=="https:"&&o.protocol!=u.protocol&&!this._allowRedirectDowngrade){throw new Error("Redirect from HTTPS to HTTP protocol. This downgrade is not allowed for security reasons. If you want to allow this behavior, set the allowRedirectDowngrade option to true.")}await c.readBody();if(u.hostname!==o.hostname){for(let e in i){if(e.toLowerCase()==="authorization"){delete i[e]}}}a=this._prepareRequest(e,u,i);c=await this.requestRaw(a,r);t--}if(p.indexOf(c.message.statusCode)==-1){return c}l+=1;if(l{let i=function(e,t){if(e){n(e)}r(t)};this.requestRawWithCallback(e,t,i)})}requestRawWithCallback(e,t,r){let n;if(typeof t==="string"){e.options.headers["Content-Length"]=Buffer.byteLength(t,"utf8")}let i=false;let o=(e,t)=>{if(!i){i=true;r(e,t)}};let a=e.httpModule.request(e.options,e=>{let t=new HttpClientResponse(e);o(null,t)});a.on("socket",e=>{n=e});a.setTimeout(this._socketTimeout||3*6e4,()=>{if(n){n.end()}o(new Error("Request timeout: "+e.options.path),null)});a.on("error",function(e){o(e,null)});if(t&&typeof t==="string"){a.write(t,"utf8")}if(t&&typeof t!=="string"){t.on("close",function(){a.end()});t.pipe(a)}else{a.end()}}getAgent(e){let t=n.parse(e);return this._getAgent(t)}_prepareRequest(e,t,r){const n={};n.parsedUrl=t;const a=n.parsedUrl.protocol==="https:";n.httpModule=a?o:i;const s=a?443:80;n.options={};n.options.host=n.parsedUrl.hostname;n.options.port=n.parsedUrl.port?parseInt(n.parsedUrl.port):s;n.options.path=(n.parsedUrl.pathname||"")+(n.parsedUrl.search||"");n.options.method=e;n.options.headers=this._mergeHeaders(r);if(this.userAgent!=null){n.options.headers["user-agent"]=this.userAgent}n.options.agent=this._getAgent(n.parsedUrl);if(this.handlers){this.handlers.forEach(e=>{e.prepareRequest(n.options)})}return n}_mergeHeaders(e){const t=e=>Object.keys(e).reduce((t,r)=>(t[r.toLowerCase()]=e[r],t),{});if(this.requestOptions&&this.requestOptions.headers){return Object.assign({},t(this.requestOptions.headers),t(e))}return t(e||{})}_getExistingOrDefaultHeader(e,t,r){const n=e=>Object.keys(e).reduce((t,r)=>(t[r.toLowerCase()]=e[r],t),{});let i;if(this.requestOptions&&this.requestOptions.headers){i=n(this.requestOptions.headers)[t]}return e[t]||i||r}_getAgent(e){let t;let n=a.getProxyUrl(e);let u=n&&n.hostname;if(this._keepAlive&&u){t=this._proxyAgent}if(this._keepAlive&&!u){t=this._agent}if(!!t){return t}const l=e.protocol==="https:";let c=100;if(!!this.requestOptions){c=this.requestOptions.maxSockets||i.globalAgent.maxSockets}if(u){if(!s){s=r(413)}const e={maxSockets:c,keepAlive:this._keepAlive,proxy:{proxyAuth:n.auth,host:n.hostname,port:n.port}};let i;const o=n.protocol==="https:";if(l){i=o?s.httpsOverHttps:s.httpsOverHttp}else{i=o?s.httpOverHttps:s.httpOverHttp}t=i(e);this._proxyAgent=t}if(this._keepAlive&&!t){const e={keepAlive:this._keepAlive,maxSockets:c};t=l?new o.Agent(e):new i.Agent(e);this._agent=t}if(!t){t=l?o.globalAgent:i.globalAgent}if(l&&this._ignoreSslError){t.options=Object.assign(t.options||{},{rejectUnauthorized:false})}return t}_performExponentialBackoff(e){e=Math.min(d,e);const t=v*Math.pow(2,e);return new Promise(e=>setTimeout(()=>e(),t))}static dateTimeDeserializer(e,t){if(typeof t==="string"){let e=new Date(t);if(!isNaN(e.valueOf())){return e}}return t}async _processResponse(e,t){return new Promise(async(r,n)=>{const i=e.message.statusCode;const o={statusCode:i,result:null,headers:{}};if(i==u.NotFound){r(o)}let a;let s;try{s=await e.readBody();if(s&&s.length>0){if(t&&t.deserializeDates){a=JSON.parse(s,HttpClient.dateTimeDeserializer)}else{a=JSON.parse(s)}o.result=a}o.headers=e.message.headers}catch(e){}if(i>299){let e;if(a&&a.message){e=a.message}else if(s&&s.length>0){e=s}else{e="Failed request: ("+i+")"}let t=new Error(e);t["statusCode"]=i;if(o.result){t["result"]=o.result}n(t)}else{r(o)}})}}t.HttpClient=HttpClient},546:function(e,t,r){e.exports=DirReader;var n=r(598);var i=r(689);var o=r(622);var a=r(953);var s=r(357).ok;i(DirReader,a);function DirReader(e){var t=this;if(!(t instanceof DirReader)){throw new Error("DirReader must be called as constructor.")}if(e.type!=="Directory"||!e.Directory){throw new Error("Non-directory type "+e.type)}t.entries=null;t._index=-1;t._paused=false;t._length=-1;if(e.sort){this.sort=e.sort}a.call(this,e)}DirReader.prototype._getEntries=function(){var e=this;if(e._gotEntries)return;e._gotEntries=true;n.readdir(e._path,function(t,r){if(t)return e.error(t);e.entries=r;e.emit("entries",r);if(e._paused)e.once("resume",processEntries);else processEntries();function processEntries(){e._length=e.entries.length;if(typeof e.sort==="function"){e.entries=e.entries.sort(e.sort.bind(e))}e._read()}})};DirReader.prototype._read=function(){var e=this;if(!e.entries)return e._getEntries();if(e._paused||e._currentEntry||e._aborted){return}e._index++;if(e._index>=e.entries.length){if(!e._ended){e._ended=true;e.emit("end");e.emit("close")}return}var t=o.resolve(e._path,e.entries[e._index]);s(t!==e._path);s(e.entries[e._index]);e._currentEntry=t;n[e.props.follow?"stat":"lstat"](t,function(r,n){if(r)return e.error(r);var i=e._proxy||e;n.path=t;n.basename=o.basename(t);n.dirname=o.dirname(t);var s=e.getChildProps.call(i,n);s.path=t;s.basename=o.basename(t);s.dirname=o.dirname(t);var u=a(s,n);e._currentEntry=u;u.on("pause",function(t){if(!e._paused&&!u._disowned){e.pause(t)}});u.on("resume",function(t){if(e._paused&&!u._disowned){e.resume(t)}});u.on("stat",function(t){e.emit("_entryStat",u,t);if(u._aborted)return;if(u._paused){u.once("resume",function(){e.emit("entryStat",u,t)})}else e.emit("entryStat",u,t)});u.on("ready",function EMITCHILD(){if(e._paused){u.pause(e);return e.once("resume",EMITCHILD)}if(u.type==="Socket"){e.emit("socket",u)}else{e.emitEntry(u)}});var l=false;u.on("close",onend);u.on("disown",onend);function onend(){if(l)return;l=true;e.emit("childEnd",u);e.emit("entryEnd",u);e._currentEntry=null;if(!e._paused){e._read()}}u.on("error",function(t){if(u._swallowErrors){e.warn(t);u.emit("end");u.emit("close")}else{e.emit("error",t)}});["child","childEnd","warn"].forEach(function(t){u.on(t,e.emit.bind(e,t))})})};DirReader.prototype.disown=function(e){e.emit("beforeDisown");e._disowned=true;e.parent=e.root=null;if(e===this._currentEntry){this._currentEntry=null}e.emit("disown")};DirReader.prototype.getChildProps=function(){return{depth:this.depth+1,root:this.root||this,parent:this,follow:this.follow,filter:this.filter,sort:this.props.sort,hardlinks:this.props.hardlinks}};DirReader.prototype.pause=function(e){var t=this;if(t._paused)return;e=e||t;t._paused=true;if(t._currentEntry&&t._currentEntry.pause){t._currentEntry.pause(e)}t.emit("pause",e)};DirReader.prototype.resume=function(e){var t=this;if(!t._paused)return;e=e||t;t._paused=false;t.emit("resume",e);if(t._paused){return}if(t._currentEntry){if(t._currentEntry.resume)t._currentEntry.resume(e)}else t._read()};DirReader.prototype.emitEntry=function(e){this.emit("entry",e);this.emit("child",e)}},550:function(e,t){t=e.exports=SemVer;var r;if(typeof process==="object"&&process.env&&process.env.NODE_DEBUG&&/\bsemver\b/i.test(process.env.NODE_DEBUG)){r=function(){var e=Array.prototype.slice.call(arguments,0);e.unshift("SEMVER");console.log.apply(console,e)}}else{r=function(){}}t.SEMVER_SPEC_VERSION="2.0.0";var n=256;var i=Number.MAX_SAFE_INTEGER||9007199254740991;var o=16;var a=t.re=[];var s=t.src=[];var u=t.tokens={};var l=0;function tok(e){u[e]=l++}tok("NUMERICIDENTIFIER");s[u.NUMERICIDENTIFIER]="0|[1-9]\\d*";tok("NUMERICIDENTIFIERLOOSE");s[u.NUMERICIDENTIFIERLOOSE]="[0-9]+";tok("NONNUMERICIDENTIFIER");s[u.NONNUMERICIDENTIFIER]="\\d*[a-zA-Z-][a-zA-Z0-9-]*";tok("MAINVERSION");s[u.MAINVERSION]="("+s[u.NUMERICIDENTIFIER]+")\\."+"("+s[u.NUMERICIDENTIFIER]+")\\."+"("+s[u.NUMERICIDENTIFIER]+")";tok("MAINVERSIONLOOSE");s[u.MAINVERSIONLOOSE]="("+s[u.NUMERICIDENTIFIERLOOSE]+")\\."+"("+s[u.NUMERICIDENTIFIERLOOSE]+")\\."+"("+s[u.NUMERICIDENTIFIERLOOSE]+")";tok("PRERELEASEIDENTIFIER");s[u.PRERELEASEIDENTIFIER]="(?:"+s[u.NUMERICIDENTIFIER]+"|"+s[u.NONNUMERICIDENTIFIER]+")";tok("PRERELEASEIDENTIFIERLOOSE");s[u.PRERELEASEIDENTIFIERLOOSE]="(?:"+s[u.NUMERICIDENTIFIERLOOSE]+"|"+s[u.NONNUMERICIDENTIFIER]+")";tok("PRERELEASE");s[u.PRERELEASE]="(?:-("+s[u.PRERELEASEIDENTIFIER]+"(?:\\."+s[u.PRERELEASEIDENTIFIER]+")*))";tok("PRERELEASELOOSE");s[u.PRERELEASELOOSE]="(?:-?("+s[u.PRERELEASEIDENTIFIERLOOSE]+"(?:\\."+s[u.PRERELEASEIDENTIFIERLOOSE]+")*))";tok("BUILDIDENTIFIER");s[u.BUILDIDENTIFIER]="[0-9A-Za-z-]+";tok("BUILD");s[u.BUILD]="(?:\\+("+s[u.BUILDIDENTIFIER]+"(?:\\."+s[u.BUILDIDENTIFIER]+")*))";tok("FULL");tok("FULLPLAIN");s[u.FULLPLAIN]="v?"+s[u.MAINVERSION]+s[u.PRERELEASE]+"?"+s[u.BUILD]+"?";s[u.FULL]="^"+s[u.FULLPLAIN]+"$";tok("LOOSEPLAIN");s[u.LOOSEPLAIN]="[v=\\s]*"+s[u.MAINVERSIONLOOSE]+s[u.PRERELEASELOOSE]+"?"+s[u.BUILD]+"?";tok("LOOSE");s[u.LOOSE]="^"+s[u.LOOSEPLAIN]+"$";tok("GTLT");s[u.GTLT]="((?:<|>)?=?)";tok("XRANGEIDENTIFIERLOOSE");s[u.XRANGEIDENTIFIERLOOSE]=s[u.NUMERICIDENTIFIERLOOSE]+"|x|X|\\*";tok("XRANGEIDENTIFIER");s[u.XRANGEIDENTIFIER]=s[u.NUMERICIDENTIFIER]+"|x|X|\\*";tok("XRANGEPLAIN");s[u.XRANGEPLAIN]="[v=\\s]*("+s[u.XRANGEIDENTIFIER]+")"+"(?:\\.("+s[u.XRANGEIDENTIFIER]+")"+"(?:\\.("+s[u.XRANGEIDENTIFIER]+")"+"(?:"+s[u.PRERELEASE]+")?"+s[u.BUILD]+"?"+")?)?";tok("XRANGEPLAINLOOSE");s[u.XRANGEPLAINLOOSE]="[v=\\s]*("+s[u.XRANGEIDENTIFIERLOOSE]+")"+"(?:\\.("+s[u.XRANGEIDENTIFIERLOOSE]+")"+"(?:\\.("+s[u.XRANGEIDENTIFIERLOOSE]+")"+"(?:"+s[u.PRERELEASELOOSE]+")?"+s[u.BUILD]+"?"+")?)?";tok("XRANGE");s[u.XRANGE]="^"+s[u.GTLT]+"\\s*"+s[u.XRANGEPLAIN]+"$";tok("XRANGELOOSE");s[u.XRANGELOOSE]="^"+s[u.GTLT]+"\\s*"+s[u.XRANGEPLAINLOOSE]+"$";tok("COERCE");s[u.COERCE]="(^|[^\\d])"+"(\\d{1,"+o+"})"+"(?:\\.(\\d{1,"+o+"}))?"+"(?:\\.(\\d{1,"+o+"}))?"+"(?:$|[^\\d])";tok("COERCERTL");a[u.COERCERTL]=new RegExp(s[u.COERCE],"g");tok("LONETILDE");s[u.LONETILDE]="(?:~>?)";tok("TILDETRIM");s[u.TILDETRIM]="(\\s*)"+s[u.LONETILDE]+"\\s+";a[u.TILDETRIM]=new RegExp(s[u.TILDETRIM],"g");var c="$1~";tok("TILDE");s[u.TILDE]="^"+s[u.LONETILDE]+s[u.XRANGEPLAIN]+"$";tok("TILDELOOSE");s[u.TILDELOOSE]="^"+s[u.LONETILDE]+s[u.XRANGEPLAINLOOSE]+"$";tok("LONECARET");s[u.LONECARET]="(?:\\^)";tok("CARETTRIM");s[u.CARETTRIM]="(\\s*)"+s[u.LONECARET]+"\\s+";a[u.CARETTRIM]=new RegExp(s[u.CARETTRIM],"g");var f="$1^";tok("CARET");s[u.CARET]="^"+s[u.LONECARET]+s[u.XRANGEPLAIN]+"$";tok("CARETLOOSE");s[u.CARETLOOSE]="^"+s[u.LONECARET]+s[u.XRANGEPLAINLOOSE]+"$";tok("COMPARATORLOOSE");s[u.COMPARATORLOOSE]="^"+s[u.GTLT]+"\\s*("+s[u.LOOSEPLAIN]+")$|^$";tok("COMPARATOR");s[u.COMPARATOR]="^"+s[u.GTLT]+"\\s*("+s[u.FULLPLAIN]+")$|^$";tok("COMPARATORTRIM");s[u.COMPARATORTRIM]="(\\s*)"+s[u.GTLT]+"\\s*("+s[u.LOOSEPLAIN]+"|"+s[u.XRANGEPLAIN]+")";a[u.COMPARATORTRIM]=new RegExp(s[u.COMPARATORTRIM],"g");var p="$1$2$3";tok("HYPHENRANGE");s[u.HYPHENRANGE]="^\\s*("+s[u.XRANGEPLAIN]+")"+"\\s+-\\s+"+"("+s[u.XRANGEPLAIN]+")"+"\\s*$";tok("HYPHENRANGELOOSE");s[u.HYPHENRANGELOOSE]="^\\s*("+s[u.XRANGEPLAINLOOSE]+")"+"\\s+-\\s+"+"("+s[u.XRANGEPLAINLOOSE]+")"+"\\s*$";tok("STAR");s[u.STAR]="(<|>)?=?\\s*\\*";for(var h=0;hn){return null}var r=t.loose?a[u.LOOSE]:a[u.FULL];if(!r.test(e)){return null}try{return new SemVer(e,t)}catch(e){return null}}t.valid=valid;function valid(e,t){var r=parse(e,t);return r?r.version:null}t.clean=clean;function clean(e,t){var r=parse(e.trim().replace(/^[=v]+/,""),t);return r?r.version:null}t.SemVer=SemVer;function SemVer(e,t){if(!t||typeof t!=="object"){t={loose:!!t,includePrerelease:false}}if(e instanceof SemVer){if(e.loose===t.loose){return e}else{e=e.version}}else if(typeof e!=="string"){throw new TypeError("Invalid Version: "+e)}if(e.length>n){throw new TypeError("version is longer than "+n+" characters")}if(!(this instanceof SemVer)){return new SemVer(e,t)}r("SemVer",e,t);this.options=t;this.loose=!!t.loose;var o=e.trim().match(t.loose?a[u.LOOSE]:a[u.FULL]);if(!o){throw new TypeError("Invalid Version: "+e)}this.raw=e;this.major=+o[1];this.minor=+o[2];this.patch=+o[3];if(this.major>i||this.major<0){throw new TypeError("Invalid major version")}if(this.minor>i||this.minor<0){throw new TypeError("Invalid minor version")}if(this.patch>i||this.patch<0){throw new TypeError("Invalid patch version")}if(!o[4]){this.prerelease=[]}else{this.prerelease=o[4].split(".").map(function(e){if(/^[0-9]+$/.test(e)){var t=+e;if(t>=0&&t=0){if(typeof this.prerelease[r]==="number"){this.prerelease[r]++;r=-2}}if(r===-1){this.prerelease.push(0)}}if(t){if(this.prerelease[0]===t){if(isNaN(this.prerelease[1])){this.prerelease=[t,0]}}else{this.prerelease=[t,0]}}break;default:throw new Error("invalid increment argument: "+e)}this.format();this.raw=this.version;return this};t.inc=inc;function inc(e,t,r,n){if(typeof r==="string"){n=r;r=undefined}try{return new SemVer(e,r).inc(t,n).version}catch(e){return null}}t.diff=diff;function diff(e,t){if(eq(e,t)){return null}else{var r=parse(e);var n=parse(t);var i="";if(r.prerelease.length||n.prerelease.length){i="pre";var o="prerelease"}for(var a in r){if(a==="major"||a==="minor"||a==="patch"){if(r[a]!==n[a]){return i+a}}}return o}}t.compareIdentifiers=compareIdentifiers;var d=/^[0-9]+$/;function compareIdentifiers(e,t){var r=d.test(e);var n=d.test(t);if(r&&n){e=+e;t=+t}return e===t?0:r&&!n?-1:n&&!r?1:e0}t.lt=lt;function lt(e,t,r){return compare(e,t,r)<0}t.eq=eq;function eq(e,t,r){return compare(e,t,r)===0}t.neq=neq;function neq(e,t,r){return compare(e,t,r)!==0}t.gte=gte;function gte(e,t,r){return compare(e,t,r)>=0}t.lte=lte;function lte(e,t,r){return compare(e,t,r)<=0}t.cmp=cmp;function cmp(e,t,r,n){switch(t){case"===":if(typeof e==="object")e=e.version;if(typeof r==="object")r=r.version;return e===r;case"!==":if(typeof e==="object")e=e.version;if(typeof r==="object")r=r.version;return e!==r;case"":case"=":case"==":return eq(e,r,n);case"!=":return neq(e,r,n);case">":return gt(e,r,n);case">=":return gte(e,r,n);case"<":return lt(e,r,n);case"<=":return lte(e,r,n);default:throw new TypeError("Invalid operator: "+t)}}t.Comparator=Comparator;function Comparator(e,t){if(!t||typeof t!=="object"){t={loose:!!t,includePrerelease:false}}if(e instanceof Comparator){if(e.loose===!!t.loose){return e}else{e=e.value}}if(!(this instanceof Comparator)){return new Comparator(e,t)}r("comparator",e,t);this.options=t;this.loose=!!t.loose;this.parse(e);if(this.semver===v){this.value=""}else{this.value=this.operator+this.semver.version}r("comp",this)}var v={};Comparator.prototype.parse=function(e){var t=this.options.loose?a[u.COMPARATORLOOSE]:a[u.COMPARATOR];var r=e.match(t);if(!r){throw new TypeError("Invalid comparator: "+e)}this.operator=r[1]!==undefined?r[1]:"";if(this.operator==="="){this.operator=""}if(!r[2]){this.semver=v}else{this.semver=new SemVer(r[2],this.options.loose)}};Comparator.prototype.toString=function(){return this.value};Comparator.prototype.test=function(e){r("Comparator.test",e,this.options.loose);if(this.semver===v||e===v){return true}if(typeof e==="string"){try{e=new SemVer(e,this.options)}catch(e){return false}}return cmp(e,this.operator,this.semver,this.options)};Comparator.prototype.intersects=function(e,t){if(!(e instanceof Comparator)){throw new TypeError("a Comparator is required")}if(!t||typeof t!=="object"){t={loose:!!t,includePrerelease:false}}var r;if(this.operator===""){if(this.value===""){return true}r=new Range(e.value,t);return satisfies(this.value,r,t)}else if(e.operator===""){if(e.value===""){return true}r=new Range(this.value,t);return satisfies(e.semver,r,t)}var n=(this.operator===">="||this.operator===">")&&(e.operator===">="||e.operator===">");var i=(this.operator==="<="||this.operator==="<")&&(e.operator==="<="||e.operator==="<");var o=this.semver.version===e.semver.version;var a=(this.operator===">="||this.operator==="<=")&&(e.operator===">="||e.operator==="<=");var s=cmp(this.semver,"<",e.semver,t)&&((this.operator===">="||this.operator===">")&&(e.operator==="<="||e.operator==="<"));var u=cmp(this.semver,">",e.semver,t)&&((this.operator==="<="||this.operator==="<")&&(e.operator===">="||e.operator===">"));return n||i||o&&a||s||u};t.Range=Range;function Range(e,t){if(!t||typeof t!=="object"){t={loose:!!t,includePrerelease:false}}if(e instanceof Range){if(e.loose===!!t.loose&&e.includePrerelease===!!t.includePrerelease){return e}else{return new Range(e.raw,t)}}if(e instanceof Comparator){return new Range(e.value,t)}if(!(this instanceof Range)){return new Range(e,t)}this.options=t;this.loose=!!t.loose;this.includePrerelease=!!t.includePrerelease;this.raw=e;this.set=e.split(/\s*\|\|\s*/).map(function(e){return this.parseRange(e.trim())},this).filter(function(e){return e.length});if(!this.set.length){throw new TypeError("Invalid SemVer Range: "+e)}this.format()}Range.prototype.format=function(){this.range=this.set.map(function(e){return e.join(" ").trim()}).join("||").trim();return this.range};Range.prototype.toString=function(){return this.range};Range.prototype.parseRange=function(e){var t=this.options.loose;e=e.trim();var n=t?a[u.HYPHENRANGELOOSE]:a[u.HYPHENRANGE];e=e.replace(n,hyphenReplace);r("hyphen replace",e);e=e.replace(a[u.COMPARATORTRIM],p);r("comparator trim",e,a[u.COMPARATORTRIM]);e=e.replace(a[u.TILDETRIM],c);e=e.replace(a[u.CARETTRIM],f);e=e.split(/\s+/).join(" ");var i=t?a[u.COMPARATORLOOSE]:a[u.COMPARATOR];var o=e.split(" ").map(function(e){return parseComparator(e,this.options)},this).join(" ").split(/\s+/);if(this.options.loose){o=o.filter(function(e){return!!e.match(i)})}o=o.map(function(e){return new Comparator(e,this.options)},this);return o};Range.prototype.intersects=function(e,t){if(!(e instanceof Range)){throw new TypeError("a Range is required")}return this.set.some(function(r){return isSatisfiable(r,t)&&e.set.some(function(e){return isSatisfiable(e,t)&&r.every(function(r){return e.every(function(e){return r.intersects(e,t)})})})})};function isSatisfiable(e,t){var r=true;var n=e.slice();var i=n.pop();while(r&&n.length){r=n.every(function(e){return i.intersects(e,t)});i=n.pop()}return r}t.toComparators=toComparators;function toComparators(e,t){return new Range(e,t).set.map(function(e){return e.map(function(e){return e.value}).join(" ").trim().split(" ")})}function parseComparator(e,t){r("comp",e,t);e=replaceCarets(e,t);r("caret",e);e=replaceTildes(e,t);r("tildes",e);e=replaceXRanges(e,t);r("xrange",e);e=replaceStars(e,t);r("stars",e);return e}function isX(e){return!e||e.toLowerCase()==="x"||e==="*"}function replaceTildes(e,t){return e.trim().split(/\s+/).map(function(e){return replaceTilde(e,t)}).join(" ")}function replaceTilde(e,t){var n=t.loose?a[u.TILDELOOSE]:a[u.TILDE];return e.replace(n,function(t,n,i,o,a){r("tilde",e,t,n,i,o,a);var s;if(isX(n)){s=""}else if(isX(i)){s=">="+n+".0.0 <"+(+n+1)+".0.0"}else if(isX(o)){s=">="+n+"."+i+".0 <"+n+"."+(+i+1)+".0"}else if(a){r("replaceTilde pr",a);s=">="+n+"."+i+"."+o+"-"+a+" <"+n+"."+(+i+1)+".0"}else{s=">="+n+"."+i+"."+o+" <"+n+"."+(+i+1)+".0"}r("tilde return",s);return s})}function replaceCarets(e,t){return e.trim().split(/\s+/).map(function(e){return replaceCaret(e,t)}).join(" ")}function replaceCaret(e,t){r("caret",e,t);var n=t.loose?a[u.CARETLOOSE]:a[u.CARET];return e.replace(n,function(t,n,i,o,a){r("caret",e,t,n,i,o,a);var s;if(isX(n)){s=""}else if(isX(i)){s=">="+n+".0.0 <"+(+n+1)+".0.0"}else if(isX(o)){if(n==="0"){s=">="+n+"."+i+".0 <"+n+"."+(+i+1)+".0"}else{s=">="+n+"."+i+".0 <"+(+n+1)+".0.0"}}else if(a){r("replaceCaret pr",a);if(n==="0"){if(i==="0"){s=">="+n+"."+i+"."+o+"-"+a+" <"+n+"."+i+"."+(+o+1)}else{s=">="+n+"."+i+"."+o+"-"+a+" <"+n+"."+(+i+1)+".0"}}else{s=">="+n+"."+i+"."+o+"-"+a+" <"+(+n+1)+".0.0"}}else{r("no pr");if(n==="0"){if(i==="0"){s=">="+n+"."+i+"."+o+" <"+n+"."+i+"."+(+o+1)}else{s=">="+n+"."+i+"."+o+" <"+n+"."+(+i+1)+".0"}}else{s=">="+n+"."+i+"."+o+" <"+(+n+1)+".0.0"}}r("caret return",s);return s})}function replaceXRanges(e,t){r("replaceXRanges",e,t);return e.split(/\s+/).map(function(e){return replaceXRange(e,t)}).join(" ")}function replaceXRange(e,t){e=e.trim();var n=t.loose?a[u.XRANGELOOSE]:a[u.XRANGE];return e.replace(n,function(n,i,o,a,s,u){r("xRange",e,n,i,o,a,s,u);var l=isX(o);var c=l||isX(a);var f=c||isX(s);var p=f;if(i==="="&&p){i=""}u=t.includePrerelease?"-0":"";if(l){if(i===">"||i==="<"){n="<0.0.0-0"}else{n="*"}}else if(i&&p){if(c){a=0}s=0;if(i===">"){i=">=";if(c){o=+o+1;a=0;s=0}else{a=+a+1;s=0}}else if(i==="<="){i="<";if(c){o=+o+1}else{a=+a+1}}n=i+o+"."+a+"."+s+u}else if(c){n=">="+o+".0.0"+u+" <"+(+o+1)+".0.0"+u}else if(f){n=">="+o+"."+a+".0"+u+" <"+o+"."+(+a+1)+".0"+u}r("xRange return",n);return n})}function replaceStars(e,t){r("replaceStars",e,t);return e.trim().replace(a[u.STAR],"")}function hyphenReplace(e,t,r,n,i,o,a,s,u,l,c,f,p){if(isX(r)){t=""}else if(isX(n)){t=">="+r+".0.0"}else if(isX(i)){t=">="+r+"."+n+".0"}else{t=">="+t}if(isX(u)){s=""}else if(isX(l)){s="<"+(+u+1)+".0.0"}else if(isX(c)){s="<"+u+"."+(+l+1)+".0"}else if(f){s="<="+u+"."+l+"."+c+"-"+f}else{s="<="+s}return(t+" "+s).trim()}Range.prototype.test=function(e){if(!e){return false}if(typeof e==="string"){try{e=new SemVer(e,this.options)}catch(e){return false}}for(var t=0;t0){var o=e[i].semver;if(o.major===t.major&&o.minor===t.minor&&o.patch===t.patch){return true}}}return false}return true}t.satisfies=satisfies;function satisfies(e,t,r){try{t=new Range(t,r)}catch(e){return false}return t.test(e)}t.maxSatisfying=maxSatisfying;function maxSatisfying(e,t,r){var n=null;var i=null;try{var o=new Range(t,r)}catch(e){return null}e.forEach(function(e){if(o.test(e)){if(!n||i.compare(e)===-1){n=e;i=new SemVer(n,r)}}});return n}t.minSatisfying=minSatisfying;function minSatisfying(e,t,r){var n=null;var i=null;try{var o=new Range(t,r)}catch(e){return null}e.forEach(function(e){if(o.test(e)){if(!n||i.compare(e)===1){n=e;i=new SemVer(n,r)}}});return n}t.minVersion=minVersion;function minVersion(e,t){e=new Range(e,t);var r=new SemVer("0.0.0");if(e.test(r)){return r}r=new SemVer("0.0.0-0");if(e.test(r)){return r}r=null;for(var n=0;n":if(t.prerelease.length===0){t.patch++}else{t.prerelease.push(0)}t.raw=t.format();case"":case">=":if(!r||gt(r,t)){r=t}break;case"<":case"<=":break;default:throw new Error("Unexpected operation: "+e.operator)}})}if(r&&e.test(r)){return r}return null}t.validRange=validRange;function validRange(e,t){try{return new Range(e,t).range||"*"}catch(e){return null}}t.ltr=ltr;function ltr(e,t,r){return outside(e,t,"<",r)}t.gtr=gtr;function gtr(e,t,r){return outside(e,t,">",r)}t.outside=outside;function outside(e,t,r,n){e=new SemVer(e,n);t=new Range(t,n);var i,o,a,s,u;switch(r){case">":i=gt;o=lte;a=lt;s=">";u=">=";break;case"<":i=lt;o=gte;a=gt;s="<";u="<=";break;default:throw new TypeError('Must provide a hilo val of "<" or ">"')}if(satisfies(e,t,n)){return false}for(var l=0;l=0.0.0")}f=f||e;p=p||e;if(i(e.semver,f.semver,n)){f=e}else if(a(e.semver,p.semver,n)){p=e}});if(f.operator===s||f.operator===u){return false}if((!p.operator||p.operator===s)&&o(e,p.semver)){return false}else if(p.operator===u&&a(e,p.semver)){return false}}return true}t.prerelease=prerelease;function prerelease(e,t){var r=parse(e,t);return r&&r.prerelease.length?r.prerelease:null}t.intersects=intersects;function intersects(e,t,r){e=new Range(e,r);t=new Range(t,r);return e.intersects(t)}t.coerce=coerce;function coerce(e,t){if(e instanceof SemVer){return e}if(typeof e==="number"){e=String(e)}if(typeof e!=="string"){return null}t=t||{};var r=null;if(!t.rtl){r=e.match(a[u.COERCE])}else{var n;while((n=a[u.COERCERTL].exec(e))&&(!r||r.index+r[0].length!==e.length)){if(!r||n.index+n[0].length!==r.index+r[0].length){r=n}a[u.COERCERTL].lastIndex=n.index+n[1].length+n[2].length}a[u.COERCERTL].lastIndex=-1}if(r===null){return null}return parse(r[2]+"."+(r[3]||"0")+"."+(r[4]||"0"),t)}},553:function(e,t,r){"use strict";var n=r(574);function DuplexWrapper(e,t,r){if(typeof r==="undefined"){r=t;t=e;e=null}n.Duplex.call(this,e);if(typeof r.read!=="function"){r=new n.Readable(e).wrap(r)}this._writable=t;this._readable=r;this._waiting=false;var i=this;t.once("finish",function(){i.end()});this.once("finish",function(){t.end()});r.on("readable",function(){if(i._waiting){i._waiting=false;i._read()}});r.once("end",function(){i.push(null)});if(!e||typeof e.bubbleErrors==="undefined"||e.bubbleErrors){t.on("error",function(e){i.emit("error",e)});r.on("error",function(e){i.emit("error",e)})}}DuplexWrapper.prototype=Object.create(n.Duplex.prototype,{constructor:{value:DuplexWrapper}});DuplexWrapper.prototype._write=function _write(e,t,r){this._writable.write(e,t,r)};DuplexWrapper.prototype._read=function _read(){var e;var t=0;while((e=this._readable.read())!==null){this.push(e);t++}if(t===0){this._waiting=true}};e.exports=function duplex2(e,t,r){return new DuplexWrapper(e,t,r)};e.exports.DuplexWrapper=DuplexWrapper},566:function(e){if(typeof Object.create==="function"){e.exports=function inherits(e,t){if(t){e.super_=t;e.prototype=Object.create(t.prototype,{constructor:{value:e,enumerable:false,writable:true,configurable:true}})}}}else{e.exports=function inherits(e,t){if(t){e.super_=t;var r=function(){};r.prototype=t.prototype;e.prototype=new r;e.prototype.constructor=e}}}},569:function(e,t,r){e.exports=rimraf;rimraf.sync=rimrafSync;var n=r(357);var i=r(622);var o=r(747);var a=undefined;try{a=r(402)}catch(e){}var s=parseInt("666",8);var u={nosort:true,silent:true};var l=0;var c=process.platform==="win32";function defaults(e){var t=["unlink","chmod","stat","lstat","rmdir","readdir"];t.forEach(function(t){e[t]=e[t]||o[t];t=t+"Sync";e[t]=e[t]||o[t]});e.maxBusyTries=e.maxBusyTries||3;e.emfileWait=e.emfileWait||1e3;if(e.glob===false){e.disableGlob=true}if(e.disableGlob!==true&&a===undefined){throw Error("glob dependency not found, set `options.disableGlob = true` if intentional")}e.disableGlob=e.disableGlob||false;e.glob=e.glob||u}function rimraf(e,t,r){if(typeof t==="function"){r=t;t={}}n(e,"rimraf: missing path");n.equal(typeof e,"string","rimraf: path should be a string");n.equal(typeof r,"function","rimraf: callback function required");n(t,"rimraf: invalid options argument provided");n.equal(typeof t,"object","rimraf: options should be object");defaults(t);var i=0;var o=null;var s=0;if(t.disableGlob||!a.hasMagic(e))return afterGlob(null,[e]);t.lstat(e,function(r,n){if(!r)return afterGlob(null,[e]);a(e,t.glob,afterGlob)});function next(e){o=o||e;if(--s===0)r(o)}function afterGlob(e,n){if(e)return r(e);s=n.length;if(s===0)return r();n.forEach(function(e){rimraf_(e,t,function CB(r){if(r){if((r.code==="EBUSY"||r.code==="ENOTEMPTY"||r.code==="EPERM")&&i=0&&l>0){n=[];o=r.length;while(c>=0&&!s){if(c==u){n.push(c);u=r.indexOf(e,c+1)}else if(n.length==1){s=[n.pop(),l]}else{i=n.pop();if(i=0?u:l}if(n.length){s=[o,a]}}return s}},622:function(e){e.exports=require("path")},626:function(e,t,r){var n=r(622);var i=r(747);var o=parseInt("0777",8);e.exports=mkdirP.mkdirp=mkdirP.mkdirP=mkdirP;function mkdirP(e,t,r,a){if(typeof t==="function"){r=t;t={}}else if(!t||typeof t!=="object"){t={mode:t}}var s=t.mode;var u=t.fs||i;if(s===undefined){s=o}if(!a)a=null;var l=r||function(){};e=n.resolve(e);u.mkdir(e,s,function(r){if(!r){a=a||e;return l(null,a)}switch(r.code){case"ENOENT":if(n.dirname(e)===e)return l(r);mkdirP(n.dirname(e),t,function(r,n){if(r)l(r,n);else mkdirP(e,t,l,n)});break;default:u.stat(e,function(e,t){if(e||!t.isDirectory())l(r,a);else l(null,a)});break}})}mkdirP.sync=function sync(e,t,r){if(!t||typeof t!=="object"){t={mode:t}}var a=t.mode;var s=t.fs||i;if(a===undefined){a=o}if(!r)r=null;e=n.resolve(e);try{s.mkdirSync(e,a);r=r||e}catch(i){switch(i.code){case"ENOENT":r=sync(n.dirname(e),t,r);sync(e,t,r);break;default:var u;try{u=s.statSync(e)}catch(e){throw i}if(!u.isDirectory())throw i;break}}return r}},631:function(e){e.exports=require("net")},634:function(e,t,r){var n=r(11);var i=Object.create(null);var o=r(49);e.exports=n(inflight);function inflight(e,t){if(i[e]){i[e].push(t);return null}else{i[e]=[t];return makeres(e)}}function makeres(e){return o(function RES(){var t=i[e];var r=t.length;var n=slice(arguments);try{for(var o=0;or){t.splice(0,r);process.nextTick(function(){RES.apply(null,n)})}else{delete i[e]}}})}function slice(e){var t=e.length;var r=[];for(var n=0;n1){var t=e.pop();var n=t.obj[t.prop];if(r(n)){var i=[];for(var o=0;o=48&&s<=57||s>=65&&s<=90||s>=97&&s<=122){o+=i.charAt(a);continue}if(s<128){o=o+n[s];continue}if(s<2048){o=o+(n[192|s>>6]+n[128|s&63]);continue}if(s<55296||s>=57344){o=o+(n[224|s>>12]+n[128|s>>6&63]+n[128|s&63]);continue}a+=1;s=65536+((s&1023)<<10|i.charCodeAt(a)&1023);o+=n[240|s>>18]+n[128|s>>12&63]+n[128|s>>6&63]+n[128|s&63]}return o};var c=function compact(e){var t=[{obj:{o:e},prop:"o"}];var r=[];for(var n=0;n=0?e:this.length-e;var i=[].slice.call(arguments,2);if(t===undefined){t=this.length-n}else if(t>this.length-n){t=this.length-n}for(var e=0;e0){var l=n-s;if(l+t0){var h=i.slice();h.unshift(f);h.push(p);r.splice.apply(r,[u,1].concat(h));u+=h.length;i=[]}else{r.splice(u,1,f,p);u+=2}}else{o.push(r[u].slice(l));r[u]=r[u].slice(0,l);u++}}if(i.length>0){r.splice.apply(r,[u,0].concat(i));u+=i.length}while(o.lengththis.length)t=this.length;var n=0;for(var i=0;i=t-e?Math.min(l+(t-e)-a,u):u;r[s].copy(o,a,l,c);a+=c-l}return o};Buffers.prototype.pos=function(e){if(e<0||e>=this.length)throw new Error("oob");var t=e,r=0,n=null;for(;;){n=this.buffers[r];if(t=this.buffers[r].length){n=0;r++;if(r>=this.buffers.length){return-1}}var u=this.buffers[r][n];if(u==e[i]){if(i==0){o={i:r,j:n,pos:a}}i++;if(i==e.length){return o.pos}}else if(i!=0){r=o.i;n=o.j;a=o.pos;i=0}n++;a++}};Buffers.prototype.toBuffer=function(){return this.slice()};Buffers.prototype.toString=function(e,t,r){return this.slice(t,r).toString(e)}},643:function(e,t,r){"use strict";var n=r(819);var i=r(339);var o=r(755);e.exports={formats:o,parse:i,stringify:n}},657:function(e,t,r){var n=r(293).Buffer;if(n.from===undefined){n.from=function(e,t,r){return new n(e,t,r)};n.alloc=n.from}e.exports=n},658:function(e){"use strict";e.exports=function(e){var t=e._SomePromiseArray;function any(e){var r=new t(e);var n=r.promise();r.setHowMany(1);r.setUnwrap();r.init();return n}e.any=function(e){return any(e)};e.prototype.any=function(){return any(this)}}},663:function(e,t,r){"use strict";var n=r(248);var i=n.maybeWrapAsError;var o=r(607);var a=o.OperationalError;var s=r(883);function isUntypedError(e){return e instanceof Error&&s.getPrototypeOf(e)===Error.prototype}var u=/^(?:name|message|stack|cause)$/;function wrapAsOperationalError(e){var t;if(isUntypedError(e)){t=new a(e);t.name=e.name;t.message=e.message;t.stack=e.stack;var r=s.keys(e);for(var i=0;i=r)return t.mkdir(e);try{yield t.mkdir(e);return}catch(n){switch(n.code){case"ENOENT":{yield mkdirP(s.dirname(e),r,i+1);yield t.mkdir(e);return}default:{let r;try{r=yield t.stat(e)}catch(e){throw n}if(!r.isDirectory())throw n}}}})}t.mkdirP=mkdirP;function tryGetExecutablePath(e,r){return n(this,void 0,void 0,function*(){let n=undefined;try{n=yield t.stat(e)}catch(t){if(t.code!=="ENOENT"){console.log(`Unexpected error attempting to determine if executable file exists '${e}': ${t}`)}}if(n&&n.isFile()){if(t.IS_WINDOWS){const t=s.extname(e).toUpperCase();if(r.some(e=>e.toUpperCase()===t)){return e}}else{if(isUnixExecutable(n)){return e}}}const i=e;for(const o of r){e=i+o;n=undefined;try{n=yield t.stat(e)}catch(t){if(t.code!=="ENOENT"){console.log(`Unexpected error attempting to determine if executable file exists '${e}': ${t}`)}}if(n&&n.isFile()){if(t.IS_WINDOWS){try{const r=s.dirname(e);const n=s.basename(e).toUpperCase();for(const i of yield t.readdir(r)){if(n===i.toUpperCase()){e=s.join(r,i);break}}}catch(t){console.log(`Unexpected error attempting to determine the actual case of the file '${e}': ${t}`)}return e}else{if(isUnixExecutable(n)){return e}}}}return""})}t.tryGetExecutablePath=tryGetExecutablePath;function normalizeSeparators(e){e=e||"";if(t.IS_WINDOWS){e=e.replace(/\//g,"\\");return e.replace(/\\\\+/g,"\\")}return e.replace(/\/\/+/g,"/")}function isUnixExecutable(e){return(e.mode&1)>0||(e.mode&8)>0&&e.gid===process.getgid()||(e.mode&64)>0&&e.uid===process.getuid()}},674:function(e,t,r){"use strict";var n=r(608).Buffer;var i=n.isEncoding||function(e){e=""+e;switch(e&&e.toLowerCase()){case"hex":case"utf8":case"utf-8":case"ascii":case"binary":case"base64":case"ucs2":case"ucs-2":case"utf16le":case"utf-16le":case"raw":return true;default:return false}};function _normalizeEncoding(e){if(!e)return"utf8";var t;while(true){switch(e){case"utf8":case"utf-8":return"utf8";case"ucs2":case"ucs-2":case"utf16le":case"utf-16le":return"utf16le";case"latin1":case"binary":return"latin1";case"base64":case"ascii":case"hex":return e;default:if(t)return;e=(""+e).toLowerCase();t=true}}}function normalizeEncoding(e){var t=_normalizeEncoding(e);if(typeof t!=="string"&&(n.isEncoding===i||!i(e)))throw new Error("Unknown encoding: "+e);return t||e}t.StringDecoder=StringDecoder;function StringDecoder(e){this.encoding=normalizeEncoding(e);var t;switch(this.encoding){case"utf16le":this.text=utf16Text;this.end=utf16End;t=4;break;case"utf8":this.fillLast=utf8FillLast;t=4;break;case"base64":this.text=base64Text;this.end=base64End;t=3;break;default:this.write=simpleWrite;this.end=simpleEnd;return}this.lastNeed=0;this.lastTotal=0;this.lastChar=n.allocUnsafe(t)}StringDecoder.prototype.write=function(e){if(e.length===0)return"";var t;var r;if(this.lastNeed){t=this.fillLast(e);if(t===undefined)return"";r=this.lastNeed;this.lastNeed=0}else{r=0}if(r>5===6)return 2;else if(e>>4===14)return 3;else if(e>>3===30)return 4;return e>>6===2?-1:-2}function utf8CheckIncomplete(e,t,r){var n=t.length-1;if(n=0){if(i>0)e.lastNeed=i-1;return i}if(--n=0){if(i>0)e.lastNeed=i-2;return i}if(--n=0){if(i>0){if(i===2)i=0;else e.lastNeed=i-3}return i}return 0}function utf8CheckExtraBytes(e,t,r){if((t[0]&192)!==128){e.lastNeed=0;return"�"}if(e.lastNeed>1&&t.length>1){if((t[1]&192)!==128){e.lastNeed=1;return"�"}if(e.lastNeed>2&&t.length>2){if((t[2]&192)!==128){e.lastNeed=2;return"�"}}}}function utf8FillLast(e){var t=this.lastTotal-this.lastNeed;var r=utf8CheckExtraBytes(this,e,t);if(r!==undefined)return r;if(this.lastNeed<=e.length){e.copy(this.lastChar,t,0,this.lastNeed);return this.lastChar.toString(this.encoding,0,this.lastTotal)}e.copy(this.lastChar,t,0,e.length);this.lastNeed-=e.length}function utf8Text(e,t){var r=utf8CheckIncomplete(this,e,t);if(!this.lastNeed)return e.toString("utf8",t);this.lastTotal=r;var n=e.length-(r-this.lastNeed);e.copy(this.lastChar,0,n);return e.toString("utf8",t,n)}function utf8End(e){var t=e&&e.length?this.write(e):"";if(this.lastNeed)return t+"�";return t}function utf16Text(e,t){if((e.length-t)%2===0){var r=e.toString("utf16le",t);if(r){var n=r.charCodeAt(r.length-1);if(n>=55296&&n<=56319){this.lastNeed=2;this.lastTotal=4;this.lastChar[0]=e[e.length-2];this.lastChar[1]=e[e.length-1];return r.slice(0,-1)}}return r}this.lastNeed=1;this.lastTotal=2;this.lastChar[0]=e[e.length-1];return e.toString("utf16le",t,e.length-1)}function utf16End(e){var t=e&&e.length?this.write(e):"";if(this.lastNeed){var r=this.lastTotal-this.lastNeed;return t+this.lastChar.toString("utf16le",0,r)}return t}function base64Text(e,t){var r=(e.length-t)%3;if(r===0)return e.toString("base64",t);this.lastNeed=3-r;this.lastTotal=3;if(r===1){this.lastChar[0]=e[e.length-1]}else{this.lastChar[0]=e[e.length-2];this.lastChar[1]=e[e.length-1]}return e.toString("base64",t,e.length-r)}function base64End(e){var t=e&&e.length?this.write(e):"";if(this.lastNeed)return t+this.lastChar.toString("base64",0,3-this.lastNeed);return t}function simpleWrite(e){return e.toString(this.encoding)}function simpleEnd(e){return e&&e.length?this.write(e):""}},677:function(e,t,r){var n=r(479);var i=r(887);var o=r(194);var a=r(440);var s=r(29);var u=r(474);var l=r(657);var c=r(622);var f=r(311).Writer;var p=r(287);var h=l.alloc(4);h.writeUInt32LE(101010256,0);function getCrxHeader(e){var t=e.stream(0).pipe(i());return t.pull(4).then(function(e){var r=e.readUInt32LE(0);if(r===875721283){var i;return t.pull(12).then(function(e){i=n.parse(e).word32lu("version").word32lu("pubKeyLength").word32lu("signatureLength").vars}).then(function(){return t.pull(i.pubKeyLength+i.signatureLength)}).then(function(e){i.publicKey=e.slice(0,i.pubKeyLength);i.signature=e.slice(i.pubKeyLength);i.size=16+i.pubKeyLength+i.signatureLength;return i})}})}function getZip64CentralDirectory(e,t){var r=n.parse(t).word32lu("signature").word32lu("diskNumber").word64lu("offsetToStartOfCentralDirectory").word32lu("numberOfDisks").vars;if(r.signature!=117853008){throw new Error("invalid zip64 end of central dir locator signature (0x07064b50): 0x"+r.signature.toString(16))}var o=i();e.stream(r.offsetToStartOfCentralDirectory).pipe(o);return o.pull(56)}function parseZip64DirRecord(e){var t=n.parse(e).word32lu("signature").word64lu("sizeOfCentralDirectory").word16lu("version").word16lu("versionsNeededToExtract").word32lu("diskNumber").word32lu("diskStart").word64lu("numberOfRecordsOnDisk").word64lu("numberOfRecords").word64lu("sizeOfCentralDirectory").word64lu("offsetToStartOfCentralDirectory").vars;if(t.signature!=101075792){throw new Error("invalid zip64 end of central dir locator signature (0x06064b50): 0x0"+t.signature.toString(16))}return t}e.exports=function centralDirectory(e,t){var r=i(),l=i(),d=t&&t.tailSize||80,v,y,g,m;if(t&&t.crx)y=getCrxHeader(e);return e.size().then(function(t){v=t;e.stream(Math.max(0,t-d)).on("error",function(e){r.emit("error",e)}).pipe(r);return r.pull(h)}).then(function(){return a.props({directory:r.pull(22),crxHeader:y})}).then(function(t){var o=t.directory;g=t.crxHeader&&t.crxHeader.size||0;m=n.parse(o).word32lu("signature").word16lu("diskNumber").word16lu("diskStart").word16lu("numberOfRecordsOnDisk").word16lu("numberOfRecords").word32lu("sizeOfCentralDirectory").word32lu("offsetToStartOfCentralDirectory").word16lu("commentLength").vars;if(m.numberOfRecords==65535||m.numberOfRecords==65535||m.offsetToStartOfCentralDirectory==4294967295){const t=20;const n=v-(d-r.match+t);const o=i();e.stream(n).pipe(o);return o.pull(t).then(function(t){return getZip64CentralDirectory(e,t)}).then(function(e){m=parseZip64DirRecord(e)})}else{m.offsetToStartOfCentralDirectory+=g}}).then(function(){e.stream(m.offsetToStartOfCentralDirectory).pipe(l);m.extract=function(e){if(!e||!e.path)throw new Error("PATH_MISSING");return m.files.then(function(t){return a.map(t,function(t){if(t.type=="Directory")return;var r=c.join(e.path,t.path);if(r.indexOf(e.path)!=0){return}var n=e.getWriter?e.getWriter({path:r}):f({path:r});return new a(function(r,i){t.stream(e.password).on("error",i).pipe(n).on("close",r).on("error",i)})},e.concurrency>1?{concurrency:e.concurrency||undefined}:undefined)})};m.files=a.mapSeries(Array(m.numberOfRecords),function(){return l.pull(46).then(function(t){var r=n.parse(t).word32lu("signature").word16lu("versionMadeBy").word16lu("versionsNeededToExtract").word16lu("flags").word16lu("compressionMethod").word16lu("lastModifiedTime").word16lu("lastModifiedDate").word32lu("crc32").word32lu("compressedSize").word32lu("uncompressedSize").word16lu("fileNameLength").word16lu("extraFieldLength").word16lu("fileCommentLength").word16lu("diskNumber").word16lu("internalFileAttributes").word32lu("externalFileAttributes").word32lu("offsetToLocalFileHeader").vars;r.offsetToLocalFileHeader+=g;r.lastModifiedDateTime=p(r.lastModifiedDate,r.lastModifiedTime);return l.pull(r.fileNameLength).then(function(e){r.pathBuffer=e;r.path=e.toString("utf8");r.isUnicode=r.flags&17;return l.pull(r.extraFieldLength)}).then(function(e){r.extra=u(e,r);return l.pull(r.fileCommentLength)}).then(function(t){r.comment=t;r.type=r.uncompressedSize===0&&/[\/\\]$/.test(r.path)?"Directory":"File";r.stream=function(t){return o(e,r.offsetToLocalFileHeader,t,r)};r.buffer=function(e){return s(r.stream(e))};return r})})});return a.props(m)})}},681:function(e){"use strict";function posix(e){return e.charAt(0)==="/"}function win32(e){var t=/^([a-zA-Z]:|[\\\/]{2}[^\\\/]+[\\\/]+[^\\\/]+)?([\\\/])?([\s\S]*?)$/;var r=t.exec(e);var n=r[1]||"";var i=Boolean(n&&n.charAt(1)!==":");return Boolean(r[2]||i)}e.exports=process.platform==="win32"?win32:posix;e.exports.posix=posix;e.exports.win32=win32},685:function(e){"use strict";e.exports=function(e,t){var r=e.reduce;var n=e.all;function promiseAllThis(){return n(this)}function PromiseMapSeries(e,n){return r(e,n,t,t)}e.prototype.each=function(e){return r(this,e,t,0)._then(promiseAllThis,undefined,undefined,this,undefined)};e.prototype.mapSeries=function(e){return r(this,e,t,t)};e.each=function(e,n){return r(e,n,t,0)._then(promiseAllThis,undefined,undefined,e,undefined)};e.mapSeries=PromiseMapSeries}},689:function(e,t,r){try{var n=r(669);if(typeof n.inherits!=="function")throw"";e.exports=n.inherits}catch(t){e.exports=r(566)}},694:function(e,t,r){"use strict";e.exports=function(e){var t=r(248);var n=e._async;var i=t.tryCatch;var o=t.errorObj;function spreadAdapter(e,r){var a=this;if(!t.isArray(e))return successAdapter.call(a,e,r);var s=i(r).apply(a._boundValue(),[null].concat(e));if(s===o){n.throwLater(s.e)}}function successAdapter(e,t){var r=this;var a=r._boundValue();var s=e===undefined?i(t).call(a,null):i(t).call(a,null,e);if(s===o){n.throwLater(s.e)}}function errorAdapter(e,t){var r=this;if(!e){var a=new Error(e+"");a.cause=e;e=a}var s=i(t).call(r._boundValue(),e);if(s===o){n.throwLater(s.e)}}e.prototype.asCallback=e.prototype.nodeify=function(e,t){if(typeof e=="function"){var r=successAdapter;if(t!==undefined&&Object(t).spread){r=spreadAdapter}this._then(r,errorAdapter,undefined,this,e)}return this}}},715:function(e){"use strict";e.exports=function(e){function PromiseInspection(e){if(e!==undefined){e=e._target();this._bitField=e._bitField;this._settledValueField=e._isFateSealed()?e._settledValue():undefined}else{this._bitField=0;this._settledValueField=undefined}}PromiseInspection.prototype._settledValue=function(){return this._settledValueField};var t=PromiseInspection.prototype.value=function(){if(!this.isFulfilled()){throw new TypeError("cannot get fulfillment value of a non-fulfilled promise\n\n See http://goo.gl/MqrFmX\n")}return this._settledValue()};var r=PromiseInspection.prototype.error=PromiseInspection.prototype.reason=function(){if(!this.isRejected()){throw new TypeError("cannot get rejection reason of a non-rejected promise\n\n See http://goo.gl/MqrFmX\n")}return this._settledValue()};var n=PromiseInspection.prototype.isFulfilled=function(){return(this._bitField&33554432)!==0};var i=PromiseInspection.prototype.isRejected=function(){return(this._bitField&16777216)!==0};var o=PromiseInspection.prototype.isPending=function(){return(this._bitField&50397184)===0};var a=PromiseInspection.prototype.isResolved=function(){return(this._bitField&50331648)!==0};PromiseInspection.prototype.isCancelled=function(){return(this._bitField&8454144)!==0};e.prototype.__isCancelled=function(){return(this._bitField&65536)===65536};e.prototype._isCancelled=function(){return this._target().__isCancelled()};e.prototype.isCancelled=function(){return(this._target()._bitField&8454144)!==0};e.prototype.isPending=function(){return o.call(this._target())};e.prototype.isRejected=function(){return i.call(this._target())};e.prototype.isFulfilled=function(){return n.call(this._target())};e.prototype.isResolved=function(){return a.call(this._target())};e.prototype.value=function(){return t.call(this._target())};e.prototype.reason=function(){var e=this._target();e._unsetRejectionIsUnhandled();return r.call(e)};e.prototype._value=function(){return this._settledValue()};e.prototype._reason=function(){this._unsetRejectionIsUnhandled();return this._settledValue()};e.PromiseInspection=PromiseInspection}},716:function(e){e.exports=getType;function getType(e){var t=["Directory","File","SymbolicLink","Link","BlockDevice","CharacterDevice","FIFO","Socket"];var r;if(e.type&&t.indexOf(e.type)!==-1){e[e.type]=true;return e.type}for(var n=0,i=t.length;n1024*64){throw new TypeError("pattern is too long")}var r=this.options;if(!r.noglobstar&&e==="**")return i;if(e==="")return"";var n="";var o=!!r.nocase;var l=false;var c=[];var p=[];var d;var v=false;var y=-1;var g=-1;var m=e.charAt(0)==="."?"":r.dot?"(?!(?:^|\\/)\\.{1,2}(?:$|\\/))":"(?!\\.)";var _=this;function clearStateChar(){if(d){switch(d){case"*":n+=u;o=true;break;case"?":n+=s;o=true;break;default:n+="\\"+d;break}_.debug("clearStateChar %j %j",d,n);d=false}}for(var w=0,b=e.length,E;w-1;A--){var C=p[A];var k=n.slice(0,C.reStart);var P=n.slice(C.reStart,C.reEnd-8);var N=n.slice(C.reEnd-8,C.reEnd);var F=n.slice(C.reEnd);N+=F;var L=k.split("(").length-1;var B=F;for(w=0;w=0;a--){o=e[a];if(o)break}for(a=0;a>> no match, partial?",e,f,t,p);if(f===s)return true}return false}var d;if(typeof l==="string"){if(n.nocase){d=c.toLowerCase()===l.toLowerCase()}else{d=c===l}this.debug("string match",l,c,d)}else{d=c.match(l);this.debug("pattern match",l,c,d)}if(!d)return false}if(o===s&&a===u){return true}else if(o===s){return r}else if(a===u){var v=o===s-1&&e[o]==="";return v}throw new Error("wtf?")};function globUnescape(e){return e.replace(/\\(.)/g,"$1")}function regExpEscape(e){return e.replace(/[-[\]{}()*+?.,\\^$|#\s]/g,"\\$&")}},726:function(e,t,r){"use strict";var n;try{throw new Error}catch(e){n=e}var i=r(476);var o=r(895);var a=r(248);function Async(){this._customScheduler=false;this._isTickUsed=false;this._lateQueue=new o(16);this._normalQueue=new o(16);this._haveDrainedQueues=false;this._trampolineEnabled=true;var e=this;this.drainQueues=function(){e._drainQueues()};this._schedule=i}Async.prototype.setScheduler=function(e){var t=this._schedule;this._schedule=e;this._customScheduler=true;return t};Async.prototype.hasCustomScheduler=function(){return this._customScheduler};Async.prototype.enableTrampoline=function(){this._trampolineEnabled=true};Async.prototype.disableTrampolineIfNecessary=function(){if(a.hasDevTools){this._trampolineEnabled=false}};Async.prototype.haveItemsQueued=function(){return this._isTickUsed||this._haveDrainedQueues};Async.prototype.fatalError=function(e,t){if(t){process.stderr.write("Fatal "+(e instanceof Error?e.stack:e)+"\n");process.exit(2)}else{this.throwLater(e)}};Async.prototype.throwLater=function(e,t){if(arguments.length===1){t=e;e=function(){throw t}}if(typeof setTimeout!=="undefined"){setTimeout(function(){e(t)},0)}else try{this._schedule(function(){e(t)})}catch(e){throw new Error("No async scheduler available\n\n See http://goo.gl/MqrFmX\n")}};function AsyncInvokeLater(e,t,r){this._lateQueue.push(e,t,r);this._queueTick()}function AsyncInvoke(e,t,r){this._normalQueue.push(e,t,r);this._queueTick()}function AsyncSettlePromises(e){this._normalQueue._pushOne(e);this._queueTick()}if(!a.hasDevTools){Async.prototype.invokeLater=AsyncInvokeLater;Async.prototype.invoke=AsyncInvoke;Async.prototype.settlePromises=AsyncSettlePromises}else{Async.prototype.invokeLater=function(e,t,r){if(this._trampolineEnabled){AsyncInvokeLater.call(this,e,t,r)}else{this._schedule(function(){setTimeout(function(){e.call(t,r)},100)})}};Async.prototype.invoke=function(e,t,r){if(this._trampolineEnabled){AsyncInvoke.call(this,e,t,r)}else{this._schedule(function(){e.call(t,r)})}};Async.prototype.settlePromises=function(e){if(this._trampolineEnabled){AsyncSettlePromises.call(this,e)}else{this._schedule(function(){e._settlePromises()})}}}Async.prototype._drainQueue=function(e){while(e.length()>0){var t=e.shift();if(typeof t!=="function"){t._settlePromises();continue}var r=e.shift();var n=e.shift();t.call(r,n)}};Async.prototype._drainQueues=function(){this._drainQueue(this._normalQueue);this._reset();this._haveDrainedQueues=true;this._drainQueue(this._lateQueue)};Async.prototype._queueTick=function(){if(!this._isTickUsed){this._isTickUsed=true;this._schedule(this.drainQueues)}};Async.prototype._reset=function(){this._isTickUsed=false};e.exports=Async;e.exports.firstLineError=n},729:function(e,t,r){"use strict";var n=this&&this.__awaiter||function(e,t,r,n){return new(r||(r=Promise))(function(i,o){function fulfilled(e){try{step(n.next(e))}catch(e){o(e)}}function rejected(e){try{step(n["throw"](e))}catch(e){o(e)}}function step(e){e.done?i(e.value):new r(function(t){t(e.value)}).then(fulfilled,rejected)}step((n=n.apply(e,t||[])).next())})};Object.defineProperty(t,"__esModule",{value:true});const i=r(643);const o=r(835);const a=r(622);const s=r(761);function getUrl(e,t,r){const n=a.posix||a;let i="";if(!t){i=e}else if(!e){i=t}else{const r=o.parse(t);const a=o.parse(e);a.protocol=a.protocol||r.protocol;a.auth=a.auth||r.auth;a.host=a.host||r.host;a.pathname=n.resolve(r.pathname,a.pathname);if(!a.pathname.endsWith("/")&&e.endsWith("/")){a.pathname+="/"}i=o.format(a)}return r?getUrlWithParsedQueryParams(i,r):i}t.getUrl=getUrl;function getUrlWithParsedQueryParams(e,t){const r=e.replace(/\?$/g,"");const n=i.stringify(t.params,buildParamsStringifyOptions(t));return`${r}${n}`}function buildParamsStringifyOptions(e){let t={addQueryPrefix:true,delimiter:(e.options||{}).separator||"&",allowDots:(e.options||{}).shouldAllowDots||false,arrayFormat:(e.options||{}).arrayFormat||"repeat",encodeValuesOnly:(e.options||{}).shouldOnlyEncodeValues||true};return t}function decompressGzippedContent(e,t){return n(this,void 0,void 0,function*(){return new Promise((r,i)=>n(this,void 0,void 0,function*(){s.gunzip(e,function(e,n){if(e){i(e)}r(n.toString(t||"utf-8"))})}))})}t.decompressGzippedContent=decompressGzippedContent;function obtainContentCharset(e){const t=["ascii","utf8","utf16le","ucs2","base64","binary","hex"];const r=e.message.headers["content-type"]||"";const n=r.match(/charset=([^;,\r\n]+)/i);return n&&n[1]&&t.indexOf(n[1])!=-1?n[1]:"utf-8"}t.obtainContentCharset=obtainContentCharset},747:function(e){e.exports=require("fs")},755:function(e,t,r){"use strict";var n=String.prototype.replace;var i=/%20/g;var o=r(640);var a={RFC1738:"RFC1738",RFC3986:"RFC3986"};e.exports=o.assign({default:a.RFC3986,formatters:{RFC1738:function(e){return n.call(e,i,"+")},RFC3986:function(e){return String(e)}}},a)},761:function(e){e.exports=require("zlib")},780:function(e,t,r){"use strict";e.exports=function(e,t,n,i,o,a){var s=r(248);var u=r(607).TypeError;var l=r(248).inherits;var c=s.errorObj;var f=s.tryCatch;var p={};function thrower(e){setTimeout(function(){throw e},0)}function castPreservingDisposable(e){var t=n(e);if(t!==e&&typeof e._isDisposable==="function"&&typeof e._getDisposer==="function"&&e._isDisposable()){t._setDisposable(e._getDisposer())}return t}function dispose(t,r){var i=0;var a=t.length;var s=new e(o);function iterator(){if(i>=a)return s._fulfill();var o=castPreservingDisposable(t[i++]);if(o instanceof e&&o._isDisposable()){try{o=n(o._getDisposer().tryDispose(r),t.promise)}catch(e){return thrower(e)}if(o instanceof e){return o._then(iterator,thrower,null,null,null)}}iterator()}iterator();return s}function Disposer(e,t,r){this._data=e;this._promise=t;this._context=r}Disposer.prototype.data=function(){return this._data};Disposer.prototype.promise=function(){return this._promise};Disposer.prototype.resource=function(){if(this.promise().isFulfilled()){return this.promise().value()}return p};Disposer.prototype.tryDispose=function(e){var t=this.resource();var r=this._context;if(r!==undefined)r._pushContext();var n=t!==p?this.doDispose(t,e):null;if(r!==undefined)r._popContext();this._promise._unsetDisposable();this._data=null;return n};Disposer.isDisposer=function(e){return e!=null&&typeof e.resource==="function"&&typeof e.tryDispose==="function"};function FunctionDisposer(e,t,r){this.constructor$(e,t,r)}l(FunctionDisposer,Disposer);FunctionDisposer.prototype.doDispose=function(e,t){var r=this.data();return r.call(e,e,t)};function maybeUnwrapDisposer(e){if(Disposer.isDisposer(e)){this.resources[this.index]._setDisposable(e);return e.promise()}return e}function ResourceList(e){this.length=e;this.promise=null;this[e-1]=null}ResourceList.prototype._resultCancelled=function(){var t=this.length;for(var r=0;r0};e.prototype._getDisposer=function(){return this._disposer};e.prototype._unsetDisposable=function(){this._bitField=this._bitField&~131072;this._disposer=undefined};e.prototype.disposer=function(e){if(typeof e==="function"){return new FunctionDisposer(e,this,i())}throw new u}}},787:function(e,t,r){e.exports=FileWriter;var n=r(598);var i=r(82);var o=r(689);var a={};o(FileWriter,i);function FileWriter(e){var t=this;if(!(t instanceof FileWriter)){throw new Error("FileWriter must be called as constructor.")}if(e.type!=="File"||!e.File){throw new Error("Non-file type "+e.type)}t._buffer=[];t._bytesWritten=0;i.call(this,e)}FileWriter.prototype._create=function(){var e=this;if(e._stream)return;var t={};if(e.props.flags)t.flags=e.props.flags;t.mode=i.filemode;if(e._old&&e._old.blksize)t.bufferSize=e._old.blksize;e._stream=n.createWriteStream(e._path,t);e._stream.on("open",function(){e.ready=true;e._buffer.forEach(function(t){if(t===a)e._stream.end();else e._stream.write(t)});e.emit("ready");e.emit("drain")});e._stream.on("error",function(t){e.emit("error",t)});e._stream.on("drain",function(){e.emit("drain")});e._stream.on("close",function(){e._finish()})};FileWriter.prototype.write=function(e){var t=this;t._bytesWritten+=e.length;if(!t.ready){if(!Buffer.isBuffer(e)&&typeof e!=="string"){throw new Error("invalid write data")}t._buffer.push(e);return false}var r=t._stream.write(e);if(r===false&&t._stream._queue){return t._stream._queue.length<=2}else{return r}};FileWriter.prototype.end=function(e){var t=this;if(e)t.write(e);if(!t.ready){t._buffer.push(a);return false}return t._stream.end()};FileWriter.prototype._finish=function(){var e=this;if(typeof e.size==="number"&&e._bytesWritten!==e.size){e.error("Did not get expected byte count.\n"+"expect: "+e.size+"\n"+"actual: "+e._bytesWritten)}i.prototype._finish.call(e)}},794:function(e){e.exports=require("stream")},809:function(e,t,r){"use strict";e.exports=function(e,t,n,i,o,a){var s=r(248);var u=s.canEvaluate;var l=s.tryCatch;var c=s.errorObj;var f;if(true){if(u){var p=function(e){return new Function("value","holder"," \n 'use strict'; \n holder.pIndex = value; \n holder.checkFulfillment(this); \n ".replace(/Index/g,e))};var h=function(e){return new Function("promise","holder"," \n 'use strict'; \n holder.pIndex = promise; \n ".replace(/Index/g,e))};var d=function(t){var r=new Array(t);for(var n=0;n0&&typeof arguments[r]==="function"){o=arguments[r];if(true){if(r<=8&&u){var l=new e(i);l._captureStackTrace();var c=v[r-1];var p=new c(o);var h=y;for(var d=0;d0?g+y:""}},822:function(e){"use strict";if(typeof process==="undefined"||!process.version||process.version.indexOf("v0.")===0||process.version.indexOf("v1.")===0&&process.version.indexOf("v1.8.")!==0){e.exports={nextTick:nextTick}}else{e.exports=process}function nextTick(e,t,r,n){if(typeof e!=="function"){throw new TypeError('"callback" argument must be a function')}var i=arguments.length;var o,a;switch(i){case 0:case 1:return process.nextTick(e);case 2:return process.nextTick(function afterTickOne(){e.call(null,t)});case 3:return process.nextTick(function afterTickTwo(){e.call(null,t,r)});case 4:return process.nextTick(function afterTickThree(){e.call(null,t,r,n)});default:o=new Array(i-1);a=0;while(a=0)e.step+=n;else e.step=e.actions.length;var i=e.actions[e.step-1];if(i&&i.trap){e.step=i.step;i.cb()}else e.next()};e.jump=function(t){e.step=t;e.next()}}},874:function(e,t,r){"use strict";var n=this&&this.__awaiter||function(e,t,r,n){return new(r||(r=Promise))(function(i,o){function fulfilled(e){try{step(n.next(e))}catch(e){o(e)}}function rejected(e){try{step(n["throw"](e))}catch(e){o(e)}}function step(e){e.done?i(e.value):new r(function(t){t(e.value)}).then(fulfilled,rejected)}step((n=n.apply(e,t||[])).next())})};Object.defineProperty(t,"__esModule",{value:true});const i=r(835);const o=r(605);const a=r(211);const s=r(729);let u;let l;var c;(function(e){e[e["OK"]=200]="OK";e[e["MultipleChoices"]=300]="MultipleChoices";e[e["MovedPermanently"]=301]="MovedPermanently";e[e["ResourceMoved"]=302]="ResourceMoved";e[e["SeeOther"]=303]="SeeOther";e[e["NotModified"]=304]="NotModified";e[e["UseProxy"]=305]="UseProxy";e[e["SwitchProxy"]=306]="SwitchProxy";e[e["TemporaryRedirect"]=307]="TemporaryRedirect";e[e["PermanentRedirect"]=308]="PermanentRedirect";e[e["BadRequest"]=400]="BadRequest";e[e["Unauthorized"]=401]="Unauthorized";e[e["PaymentRequired"]=402]="PaymentRequired";e[e["Forbidden"]=403]="Forbidden";e[e["NotFound"]=404]="NotFound";e[e["MethodNotAllowed"]=405]="MethodNotAllowed";e[e["NotAcceptable"]=406]="NotAcceptable";e[e["ProxyAuthenticationRequired"]=407]="ProxyAuthenticationRequired";e[e["RequestTimeout"]=408]="RequestTimeout";e[e["Conflict"]=409]="Conflict";e[e["Gone"]=410]="Gone";e[e["TooManyRequests"]=429]="TooManyRequests";e[e["InternalServerError"]=500]="InternalServerError";e[e["NotImplemented"]=501]="NotImplemented";e[e["BadGateway"]=502]="BadGateway";e[e["ServiceUnavailable"]=503]="ServiceUnavailable";e[e["GatewayTimeout"]=504]="GatewayTimeout"})(c=t.HttpCodes||(t.HttpCodes={}));const f=[c.MovedPermanently,c.ResourceMoved,c.SeeOther,c.TemporaryRedirect,c.PermanentRedirect];const p=[c.BadGateway,c.ServiceUnavailable,c.GatewayTimeout];const h=["OPTIONS","GET","DELETE","HEAD"];const d=10;const v=5;class HttpClientResponse{constructor(e){this.message=e}readBody(){return new Promise((e,t)=>n(this,void 0,void 0,function*(){let r=Buffer.alloc(0);const i=s.obtainContentCharset(this);const o=this.message.headers["content-encoding"]||"";const a=new RegExp("(gzip$)|(gzip, *deflate)").test(o);this.message.on("data",function(e){const t=typeof e==="string"?Buffer.from(e,i):e;r=Buffer.concat([r,t])}).on("end",function(){return n(this,void 0,void 0,function*(){if(a){const t=yield s.decompressGzippedContent(r,i);e(t)}else{e(r.toString(i))}})}).on("error",function(e){t(e)})}))}}t.HttpClientResponse=HttpClientResponse;function isHttps(e){let t=i.parse(e);return t.protocol==="https:"}t.isHttps=isHttps;var y;(function(e){e["HTTP_PROXY"]="HTTP_PROXY";e["HTTPS_PROXY"]="HTTPS_PROXY";e["NO_PROXY"]="NO_PROXY"})(y||(y={}));class HttpClient{constructor(e,t,n){this._ignoreSslError=false;this._allowRedirects=true;this._allowRedirectDowngrade=false;this._maxRedirects=50;this._allowRetries=false;this._maxRetries=1;this._keepAlive=false;this._disposed=false;this.userAgent=e;this.handlers=t||[];let i=process.env[y.NO_PROXY];if(i){this._httpProxyBypassHosts=[];i.split(",").forEach(e=>{this._httpProxyBypassHosts.push(new RegExp(e,"i"))})}this.requestOptions=n;if(n){if(n.ignoreSslError!=null){this._ignoreSslError=n.ignoreSslError}this._socketTimeout=n.socketTimeout;this._httpProxy=n.proxy;if(n.proxy&&n.proxy.proxyBypassHosts){this._httpProxyBypassHosts=[];n.proxy.proxyBypassHosts.forEach(e=>{this._httpProxyBypassHosts.push(new RegExp(e,"i"))})}this._certConfig=n.cert;if(this._certConfig){u=r(747);if(this._certConfig.caFile&&u.existsSync(this._certConfig.caFile)){this._ca=u.readFileSync(this._certConfig.caFile,"utf8")}if(this._certConfig.certFile&&u.existsSync(this._certConfig.certFile)){this._cert=u.readFileSync(this._certConfig.certFile,"utf8")}if(this._certConfig.keyFile&&u.existsSync(this._certConfig.keyFile)){this._key=u.readFileSync(this._certConfig.keyFile,"utf8")}}if(n.allowRedirects!=null){this._allowRedirects=n.allowRedirects}if(n.allowRedirectDowngrade!=null){this._allowRedirectDowngrade=n.allowRedirectDowngrade}if(n.maxRedirects!=null){this._maxRedirects=Math.max(n.maxRedirects,0)}if(n.keepAlive!=null){this._keepAlive=n.keepAlive}if(n.allowRetries!=null){this._allowRetries=n.allowRetries}if(n.maxRetries!=null){this._maxRetries=n.maxRetries}}}options(e,t){return this.request("OPTIONS",e,null,t||{})}get(e,t){return this.request("GET",e,null,t||{})}del(e,t){return this.request("DELETE",e,null,t||{})}post(e,t,r){return this.request("POST",e,t,r||{})}patch(e,t,r){return this.request("PATCH",e,t,r||{})}put(e,t,r){return this.request("PUT",e,t,r||{})}head(e,t){return this.request("HEAD",e,null,t||{})}sendStream(e,t,r,n){return this.request(e,t,r,n)}request(e,t,r,o){return n(this,void 0,void 0,function*(){if(this._disposed){throw new Error("Client has already been disposed.")}let n=i.parse(t);let a=this._prepareRequest(e,n,o);let s=this._allowRetries&&h.indexOf(e)!=-1?this._maxRetries+1:1;let u=0;let l;while(u0){const s=l.message.headers["location"];if(!s){break}let u=i.parse(s);if(n.protocol=="https:"&&n.protocol!=u.protocol&&!this._allowRedirectDowngrade){throw new Error("Redirect from HTTPS to HTTP protocol. This downgrade is not allowed for security reasons. If you want to allow this behavior, set the allowRedirectDowngrade option to true.")}yield l.readBody();a=this._prepareRequest(e,u,o);l=yield this.requestRaw(a,r);t--}if(p.indexOf(l.message.statusCode)==-1){return l}u+=1;if(u{let i=function(e,t){if(e){n(e)}r(t)};this.requestRawWithCallback(e,t,i)})}requestRawWithCallback(e,t,r){let n;if(typeof t==="string"){e.options.headers["Content-Length"]=Buffer.byteLength(t,"utf8")}let i=false;let o=(e,t)=>{if(!i){i=true;r(e,t)}};let a=e.httpModule.request(e.options,e=>{let t=new HttpClientResponse(e);o(null,t)});a.on("socket",e=>{n=e});a.setTimeout(this._socketTimeout||3*6e4,()=>{if(n){n.destroy()}o(new Error("Request timeout: "+e.options.path),null)});a.on("error",function(e){o(e,null)});if(t&&typeof t==="string"){a.write(t,"utf8")}if(t&&typeof t!=="string"){t.on("close",function(){a.end()});t.pipe(a)}else{a.end()}}_prepareRequest(e,t,r){const n={};n.parsedUrl=t;const s=n.parsedUrl.protocol==="https:";n.httpModule=s?a:o;const u=s?443:80;n.options={};n.options.host=n.parsedUrl.hostname;n.options.port=n.parsedUrl.port?parseInt(n.parsedUrl.port):u;n.options.path=(n.parsedUrl.pathname||"")+(n.parsedUrl.search||"");n.options.method=e;n.options.headers=this._mergeHeaders(r);if(this.userAgent!=null){n.options.headers["user-agent"]=this.userAgent}n.options.agent=this._getAgent(n.parsedUrl);if(this.handlers&&!this._isPresigned(i.format(t))){this.handlers.forEach(e=>{e.prepareRequest(n.options)})}return n}_isPresigned(e){if(this.requestOptions&&this.requestOptions.presignedUrlPatterns){const t=this.requestOptions.presignedUrlPatterns;for(let r=0;rObject.keys(e).reduce((t,r)=>(t[r.toLowerCase()]=e[r],t),{});if(this.requestOptions&&this.requestOptions.headers){return Object.assign({},t(this.requestOptions.headers),t(e))}return t(e||{})}_getAgent(e){let t;let n=this._getProxy(e);let i=n.proxyUrl&&n.proxyUrl.hostname&&!this._isMatchInBypassProxyList(e);if(this._keepAlive&&i){t=this._proxyAgent}if(this._keepAlive&&!i){t=this._agent}if(!!t){return t}const s=e.protocol==="https:";let u=100;if(!!this.requestOptions){u=this.requestOptions.maxSockets||o.globalAgent.maxSockets}if(i){if(!l){l=r(413)}const e={maxSockets:u,keepAlive:this._keepAlive,proxy:{proxyAuth:n.proxyAuth,host:n.proxyUrl.hostname,port:n.proxyUrl.port}};let i;const o=n.proxyUrl.protocol==="https:";if(s){i=o?l.httpsOverHttps:l.httpsOverHttp}else{i=o?l.httpOverHttps:l.httpOverHttp}t=i(e);this._proxyAgent=t}if(this._keepAlive&&!t){const e={keepAlive:this._keepAlive,maxSockets:u};t=s?new a.Agent(e):new o.Agent(e);this._agent=t}if(!t){t=s?a.globalAgent:o.globalAgent}if(s&&this._ignoreSslError){t.options=Object.assign(t.options||{},{rejectUnauthorized:false})}if(s&&this._certConfig){t.options=Object.assign(t.options||{},{ca:this._ca,cert:this._cert,key:this._key,passphrase:this._certConfig.passphrase})}return t}_getProxy(e){let t=e.protocol==="https:";let r=this._httpProxy;let n=process.env[y.HTTPS_PROXY];let o=process.env[y.HTTP_PROXY];if(!r){if(n&&t){r={proxyUrl:n}}else if(o){r={proxyUrl:o}}}let a;let s;if(r){if(r.proxyUrl.length>0){a=i.parse(r.proxyUrl)}if(r.proxyUsername||r.proxyPassword){s=r.proxyUsername+":"+r.proxyPassword}}return{proxyUrl:a,proxyAuth:s}}_isMatchInBypassProxyList(e){if(!this._httpProxyBypassHosts){return false}let t=false;this._httpProxyBypassHosts.forEach(r=>{if(r.test(e.href)){t=true}});return t}_performExponentialBackoff(e){e=Math.min(d,e);const t=v*Math.pow(2,e);return new Promise(e=>setTimeout(()=>e(),t))}}t.HttpClient=HttpClient},882:function(e,t,r){"use strict";e.exports=PassThrough;var n=r(925);var i=Object.create(r(143));i.inherits=r(689);i.inherits(PassThrough,n);function PassThrough(e){if(!(this instanceof PassThrough))return new PassThrough(e);n.call(this,e)}PassThrough.prototype._transform=function(e,t,r){r(null,e)}},883:function(e){var t=function(){"use strict";return this===undefined}();if(t){e.exports={freeze:Object.freeze,defineProperty:Object.defineProperty,getDescriptor:Object.getOwnPropertyDescriptor,keys:Object.keys,names:Object.getOwnPropertyNames,getPrototypeOf:Object.getPrototypeOf,isArray:Array.isArray,isES5:t,propertyIsWritable:function(e,t){var r=Object.getOwnPropertyDescriptor(e,t);return!!(!r||r.writable||r.set)}}}else{var r={}.hasOwnProperty;var n={}.toString;var i={}.constructor.prototype;var o=function(e){var t=[];for(var n in e){if(r.call(e,n)){t.push(n)}}return t};var a=function(e,t){return{value:e[t]}};var s=function(e,t,r){e[t]=r.value;return e};var u=function(e){return e};var l=function(e){try{return Object(e).constructor.prototype}catch(e){return i}};var c=function(e){try{return n.call(e)==="[object Array]"}catch(e){return false}};e.exports={isArray:c,keys:o,names:o,defineProperty:s,getDescriptor:a,freeze:u,getPrototypeOf:l,isES5:t,propertyIsWritable:function(){return true}}}},887:function(e,t,r){var n=r(794);var i=r(440);var o=r(669);var a=r(657);var s="function";if(!n.Writable||!n.Writable.prototype.destroy)n=r(574);function PullStream(){if(!(this instanceof PullStream))return new PullStream;n.Duplex.call(this,{decodeStrings:false,objectMode:true});this.buffer=a.from("");var e=this;e.on("finish",function(){e.finished=true;e.emit("chunk",false)})}o.inherits(PullStream,n.Duplex);PullStream.prototype._write=function(e,t,r){this.buffer=a.concat([this.buffer,e]);this.cb=r;this.emit("chunk")};PullStream.prototype.stream=function(e,t){var r=n.PassThrough();var i,o=this;function cb(){if(typeof o.cb===s){var e=o.cb;o.cb=undefined;return e()}}function pull(){var n;if(o.buffer&&o.buffer.length){if(typeof e==="number"){n=o.buffer.slice(0,e);o.buffer=o.buffer.slice(e);e-=n.length;i=!e}else{var a=o.buffer.indexOf(e);if(a!==-1){o.match=a;if(t)a=a+e.length;n=o.buffer.slice(0,a);o.buffer=o.buffer.slice(a);i=true}else{var s=o.buffer.length-e.length;if(s<=0){cb()}else{n=o.buffer.slice(0,s);o.buffer=o.buffer.slice(s)}}}if(n)r.write(n,function(){if(o.buffer.length===0||e.length&&o.buffer.length<=e.length)cb()})}if(!i){if(o.finished&&!this.__ended){o.removeListener("chunk",pull);o.emit("error",new Error("FILE_ENDED"));this.__ended=true;return}}else{o.removeListener("chunk",pull);r.end()}}o.on("chunk",pull);pull();return r};PullStream.prototype.pull=function(e,t){if(e===0)return i.resolve("");if(!isNaN(e)&&this.buffer.length>e){var r=this.buffer.slice(0,e);this.buffer=this.buffer.slice(e);return i.resolve(r)}var o=a.from(""),s=this;var u=n.Transform();u._transform=function(e,t,r){o=a.concat([o,e]);r()};var l;var c;return new i(function(r,n){l=n;c=function(e){s.__emittedError=e;n(e)};if(s.finished)return n(new Error("FILE_ENDED"));s.once("error",c);s.stream(e,t).on("error",n).pipe(u).on("finish",function(){r(o)}).on("error",n)}).finally(function(){s.removeListener("error",l);s.removeListener("error",c)})};PullStream.prototype._read=function(){};e.exports=PullStream},895:function(e){"use strict";function arrayMove(e,t,r,n,i){for(var o=0;o=0){return r[e]}return undefined}Context.CapturedTrace=null;Context.create=createContext;Context.deactivateLongStackTraces=function(){};Context.activateLongStackTraces=function(){var r=e.prototype._pushContext;var n=e.prototype._popContext;var i=e._peekContext;var o=e.prototype._peekContext;var a=e.prototype._promiseCreated;Context.deactivateLongStackTraces=function(){e.prototype._pushContext=r;e.prototype._popContext=n;e._peekContext=i;e.prototype._peekContext=o;e.prototype._promiseCreated=a;t=false};t=true;e.prototype._pushContext=Context.prototype._pushContext;e.prototype._popContext=Context.prototype._popContext;e._peekContext=e.prototype._peekContext=peekContext;e.prototype._promiseCreated=function(){var e=this._peekContext();if(e&&e._promiseCreated==null)e._promiseCreated=this}};return Context}},925:function(e,t,r){"use strict";e.exports=Transform;var n=r(831);var i=Object.create(r(143));i.inherits=r(689);i.inherits(Transform,n);function afterTransform(e,t){var r=this._transformState;r.transforming=false;var n=r.writecb;if(!n){return this.emit("error",new Error("write callback called multiple times"))}r.writechunk=null;r.writecb=null;if(t!=null)this.push(t);n(e);var i=this._readableState;i.reading=false;if(i.needReadable||i.length0)this.tail.next=t;else this.head=t;this.tail=t;++this.length};BufferList.prototype.unshift=function unshift(e){var t={data:e,next:this.head};if(this.length===0)this.tail=t;this.head=t;++this.length};BufferList.prototype.shift=function shift(){if(this.length===0)return;var e=this.head.data;if(this.length===1)this.head=this.tail=null;else this.head=this.head.next;--this.length;return e};BufferList.prototype.clear=function clear(){this.head=this.tail=null;this.length=0};BufferList.prototype.join=function join(e){if(this.length===0)return"";var t=this.head;var r=""+t.data;while(t=t.next){r+=e+t.data}return r};BufferList.prototype.concat=function concat(e){if(this.length===0)return n.alloc(0);if(this.length===1)return this.head.data;var t=n.allocUnsafe(e>>>0);var r=this.head;var i=0;while(r){copyBuffer(r.data,t,i);i+=r.data.length;r=r.next}return t};return BufferList}();if(i&&i.inspect&&i.inspect.custom){e.exports.prototype[i.inspect.custom]=function(){var e=i.inspect({length:this.length});return this.constructor.name+" "+e}}},936:function(e,t,r){e.exports=SocketReader;var n=r(689);var i=r(953);n(SocketReader,i);function SocketReader(e){var t=this;if(!(t instanceof SocketReader)){throw new Error("SocketReader must be called as constructor.")}if(!(e.type==="Socket"&&e.Socket)){throw new Error("Non-socket type "+e.type)}i.call(t,e)}SocketReader.prototype._read=function(){var e=this;if(e._paused)return;if(!e._ended){e.emit("end");e.emit("close");e._ended=true}}},943:function(e){"use strict";e.exports=clone;function clone(e){if(e===null||typeof e!=="object")return e;if(e instanceof Object)var t={__proto__:e.__proto__};else var t=Object.create(null);Object.getOwnPropertyNames(e).forEach(function(r){Object.defineProperty(t,r,Object.getOwnPropertyDescriptor(e,r))});return t}},947:function(e){"use strict";e.exports=function(e,t,r,n){var i=false;var o=function(e,t){this._reject(t)};var a=function(e,t){t.promiseRejectionQueued=true;t.bindingPromise._then(o,o,null,this,e)};var s=function(e,t){if((this._bitField&50397184)===0){this._resolveCallback(t.target)}};var u=function(e,t){if(!t.promiseRejectionQueued)this._reject(e)};e.prototype.bind=function(o){if(!i){i=true;e.prototype._propagateFrom=n.propagateFromFunction();e.prototype._boundValue=n.boundValueFunction()}var l=r(o);var c=new e(t);c._propagateFrom(this,1);var f=this._target();c._setBoundTo(l);if(l instanceof e){var p={promiseRejectionQueued:false,promise:c,target:f,bindingPromise:l};f._then(t,a,undefined,c,p);l._then(s,u,undefined,c,p);c._setOnCancel(l)}else{c._resolveCallback(f)}return c};e.prototype._setBoundTo=function(e){if(e!==undefined){this._bitField=this._bitField|2097152;this._boundTo=e}else{this._bitField=this._bitField&~2097152}};e.prototype._isBound=function(){return(this._bitField&2097152)===2097152};e.bind=function(t,r){return e.resolve(r).bind(t)}}},948:function(e,t,r){"use strict";e.exports=function(e,t){var n={};var i=r(248);var o=r(663);var a=i.withAppended;var s=i.maybeWrapAsError;var u=i.canEvaluate;var l=r(607).TypeError;var c="Async";var f={__isPromisified__:true};var p=["arity","length","name","arguments","caller","callee","prototype","__isPromisified__"];var h=new RegExp("^(?:"+p.join("|")+")$");var d=function(e){return i.isIdentifier(e)&&e.charAt(0)!=="_"&&e!=="constructor"};function propsFilter(e){return!h.test(e)}function isPromisified(e){try{return e.__isPromisified__===true}catch(e){return false}}function hasPromisified(e,t,r){var n=i.getDataPropertyOrDefault(e,t+r,f);return n?isPromisified(n):false}function checkValid(e,t,r){for(var n=0;n=r;--n){t.push(n)}for(var n=e+1;n<=3;++n){t.push(n)}return t};var m=function(e){return i.filledRange(e,"_arg","")};var _=function(e){return i.filledRange(Math.max(e,3),"_arg","")};var w=function(e){if(typeof e.length==="number"){return Math.max(Math.min(e.length,1023+1),0)}return 0};y=function(r,u,l,c,f,p){var h=Math.max(0,w(c)-1);var d=g(h);var v=typeof r==="string"||u===n;function generateCallForArgumentCount(e){var t=m(e).join(", ");var r=e>0?", ":"";var n;if(v){n="ret = callback.call(this, {{args}}, nodeback); break;\n"}else{n=u===undefined?"ret = callback({{args}}, nodeback); break;\n":"ret = callback.call(receiver, {{args}}, nodeback); break;\n"}return n.replace("{{args}}",t).replace(", ",r)}function generateArgumentSwitchCase(){var e="";for(var t=0;te.trim().toUpperCase()).filter(e=>e)){if(n.some(t=>t===e)){return true}}return false}t.checkBypass=checkBypass},953:function(e,t,r){e.exports=Reader;var n=r(598);var i=r(794).Stream;var o=r(689);var a=r(622);var s=r(716);var u=Reader.hardLinks={};var l=r(394);o(Reader,l);var c=r(594);function Reader(e,t){var n=this;if(!(n instanceof Reader))return new Reader(e,t);if(typeof e==="string"){e={path:e}}var i;var o;if(e.type&&typeof e.type==="function"){i=e.type;o=i}else{i=s(e);o=Reader}if(t&&!i){i=s(t);e[i]=true;e.type=i}switch(i){case"Directory":o=r(546);break;case"Link":case"File":o=r(58);break;case"SymbolicLink":o=c;break;case"Socket":o=r(936);break;case null:o=r(73);break}if(!(n instanceof o)){return new o(e)}l.call(n);if(!e.path){n.error("Must provide a path",null,true)}n.readable=true;n.writable=false;n.type=i;n.props=e;n.depth=e.depth=e.depth||0;n.parent=e.parent||null;n.root=e.root||e.parent&&e.parent.root||n;n._path=n.path=a.resolve(e.path);if(process.platform==="win32"){n.path=n._path=n.path.replace(/\?/g,"_");if(n._path.length>=260){n._swallowErrors=true;n._path="\\\\?\\"+n.path.replace(/\//g,"\\")}}n.basename=e.basename=a.basename(n.path);n.dirname=e.dirname=a.dirname(n.path);e.parent=e.root=null;n.size=e.size;n.filter=typeof e.filter==="function"?e.filter:null;if(e.sort==="alpha")e.sort=alphasort;n._stat(t)}function alphasort(e,t){return e===t?0:e.toLowerCase()>t.toLowerCase()?1:e.toLowerCase()t?1:-1}Reader.prototype._stat=function(e){var t=this;var r=t.props;var i=r.follow?"stat":"lstat";if(e)process.nextTick(statCb.bind(null,null,e));else n[i](t._path,statCb);function statCb(e,n){if(e)return t.error(e);Object.keys(n).forEach(function(e){r[e]=n[e]});if(undefined!==t.size&&r.size!==t.size){return t.error("incorrect size")}t.size=r.size;var i=s(r);var o=r.hardlinks!==false;if(o&&i!=="Directory"&&r.nlink&&r.nlink>1){var a=r.dev+":"+r.ino;if(u[a]===t._path||!u[a]){u[a]=t._path}else{i=t.type=t.props.type="Link";t.Link=t.props.Link=true;t.linkpath=t.props.linkpath=u[a];t._stat=t._read=c.prototype._read}}if(t.type&&t.type!==i){t.error("Unexpected type: "+i)}if(t.filter){var l=t._proxy||t;if(!t.filter.call(l,l,r)){if(!t._disowned){t.abort();t.emit("end");t.emit("close")}return}}var f=["_stat","stat","ready"];var p=0;(function go(){if(t._aborted){t.emit("end");t.emit("close");return}if(t._paused&&t.type!=="Directory"){t.once("resume",go);return}var e=f[p++];if(!e){return t._read()}t.emit(e,r);go()})()}};Reader.prototype.pipe=function(e){var t=this;if(typeof e.add==="function"){t.on("entry",function(r){var n=e.add(r);if(n===false){t.pause()}})}return i.prototype.pipe.apply(this,arguments)};Reader.prototype.pause=function(e){this._paused=true;e=e||this;this.emit("pause",e);if(this._stream)this._stream.pause(e)};Reader.prototype.resume=function(e){this._paused=false;e=e||this;this.emit("resume",e);if(this._stream)this._stream.resume(e);this._read()};Reader.prototype._read=function(){this.error("Cannot read unknown type: "+this.type)}},965:function(e,t,r){e=r.nmd(e);var n=function(e){"use strict";var t=1e7,r=7,i=9007199254740992,o=smallToArray(i),a="0123456789abcdefghijklmnopqrstuvwxyz";var s=typeof BigInt==="function";function Integer(e,t,r,n){if(typeof e==="undefined")return Integer[0];if(typeof t!=="undefined")return+t===10&&!r?parseValue(e):h(e,t,r,n);return parseValue(e)}function BigInteger(e,t){this.value=e;this.sign=t;this.isSmall=false}BigInteger.prototype=Object.create(Integer.prototype);function SmallInteger(e){this.value=e;this.sign=e<0;this.isSmall=true}SmallInteger.prototype=Object.create(Integer.prototype);function NativeBigInt(e){this.value=e}NativeBigInt.prototype=Object.create(Integer.prototype);function isPrecise(e){return-i0)return Math.floor(e);return Math.ceil(e)}function add(e,r){var n=e.length,i=r.length,o=new Array(n),a=0,s=t,u,l;for(l=0;l=s?1:0;o[l]=u-a*s}while(l0)o.push(a);return o}function addAny(e,t){if(e.length>=t.length)return add(e,t);return add(t,e)}function addSmall(e,r){var n=e.length,i=new Array(n),o=t,a,s;for(s=0;s0){i[s++]=r%o;r=Math.floor(r/o)}return i}BigInteger.prototype.add=function(e){var t=parseValue(e);if(this.sign!==t.sign){return this.subtract(t.negate())}var r=this.value,n=t.value;if(t.isSmall){return new BigInteger(addSmall(r,Math.abs(n)),this.sign)}return new BigInteger(addAny(r,n),this.sign)};BigInteger.prototype.plus=BigInteger.prototype.add;SmallInteger.prototype.add=function(e){var t=parseValue(e);var r=this.value;if(r<0!==t.sign){return this.subtract(t.negate())}var n=t.value;if(t.isSmall){if(isPrecise(r+n))return new SmallInteger(r+n);n=smallToArray(Math.abs(n))}return new BigInteger(addSmall(n,Math.abs(r)),r<0)};SmallInteger.prototype.plus=SmallInteger.prototype.add;NativeBigInt.prototype.add=function(e){return new NativeBigInt(this.value+parseValue(e).value)};NativeBigInt.prototype.plus=NativeBigInt.prototype.add;function subtract(e,r){var n=e.length,i=r.length,o=new Array(n),a=0,s=t,u,l;for(u=0;u=0){n=subtract(e,t)}else{n=subtract(t,e);r=!r}n=arrayToSmall(n);if(typeof n==="number"){if(r)n=-n;return new SmallInteger(n)}return new BigInteger(n,r)}function subtractSmall(e,r,n){var i=e.length,o=new Array(i),a=-r,s=t,u,l;for(u=0;u=0)};SmallInteger.prototype.minus=SmallInteger.prototype.subtract;NativeBigInt.prototype.subtract=function(e){return new NativeBigInt(this.value-parseValue(e).value)};NativeBigInt.prototype.minus=NativeBigInt.prototype.subtract;BigInteger.prototype.negate=function(){return new BigInteger(this.value,!this.sign)};SmallInteger.prototype.negate=function(){var e=this.sign;var t=new SmallInteger(-this.value);t.sign=!e;return t};NativeBigInt.prototype.negate=function(){return new NativeBigInt(-this.value)};BigInteger.prototype.abs=function(){return new BigInteger(this.value,false)};SmallInteger.prototype.abs=function(){return new SmallInteger(Math.abs(this.value))};NativeBigInt.prototype.abs=function(){return new NativeBigInt(this.value>=0?this.value:-this.value)};function multiplyLong(e,r){var n=e.length,i=r.length,o=n+i,a=createArray(o),s=t,u,l,c,f,p;for(c=0;c0){i[u++]=a%o;a=Math.floor(a/o)}return i}function shiftLeft(e,t){var r=[];while(t-- >0)r.push(0);return r.concat(e)}function multiplyKaratsuba(e,t){var r=Math.max(e.length,t.length);if(r<=30)return multiplyLong(e,t);r=Math.ceil(r/2);var n=e.slice(r),i=e.slice(0,r),o=t.slice(r),a=t.slice(0,r);var s=multiplyKaratsuba(i,a),u=multiplyKaratsuba(n,o),l=multiplyKaratsuba(addAny(i,n),addAny(a,o));var c=addAny(addAny(s,shiftLeft(subtract(subtract(l,s),u),r)),shiftLeft(u,2*r));trim(c);return c}function useKaratsuba(e,t){return-.012*e-.012*t+15e-6*e*t>0}BigInteger.prototype.multiply=function(e){var r=parseValue(e),n=this.value,i=r.value,o=this.sign!==r.sign,a;if(r.isSmall){if(i===0)return Integer[0];if(i===1)return this;if(i===-1)return this.negate();a=Math.abs(i);if(a=0;p--){f=o-1;if(l[p+i]!==s){f=Math.floor((l[p+i]*o+l[p+i-1])/s)}h=0;d=0;y=c.length;for(v=0;vi){c=(c+1)*s}u=Math.ceil(c/f);do{p=multiplySmall(r,u);if(compareAbs(p,a)<=0)break;u--}while(u);o.push(u);a=subtract(a,p)}o.reverse();return[arrayToSmall(o),arrayToSmall(a)]}function divModSmall(e,r){var n=e.length,i=createArray(n),o=t,a,s,u,l;u=0;for(a=n-1;a>=0;--a){l=u*o+e[a];s=truncate(l/r);u=l-s*r;i[a]=s|0}return[i,u|0]}function divModAny(e,r){var n,i=parseValue(r);if(s){return[new NativeBigInt(e.value/i.value),new NativeBigInt(e.value%i.value)]}var o=e.value,a=i.value;var u;if(a===0)throw new Error("Cannot divide by zero");if(e.isSmall){if(i.isSmall){return[new SmallInteger(truncate(o/a)),new SmallInteger(o%a)]}return[Integer[0],e]}if(i.isSmall){if(a===1)return[e,Integer[0]];if(a==-1)return[e.negate(),Integer[0]];var l=Math.abs(a);if(lt.length?1:-1}for(var r=e.length-1;r>=0;r--){if(e[r]!==t[r])return e[r]>t[r]?1:-1}return 0}BigInteger.prototype.compareAbs=function(e){var t=parseValue(e),r=this.value,n=t.value;if(t.isSmall)return 1;return compareAbs(r,n)};SmallInteger.prototype.compareAbs=function(e){var t=parseValue(e),r=Math.abs(this.value),n=t.value;if(t.isSmall){n=Math.abs(n);return r===n?0:r>n?1:-1}return-1};NativeBigInt.prototype.compareAbs=function(e){var t=this.value;var r=parseValue(e).value;t=t>=0?t:-t;r=r>=0?r:-r;return t===r?0:t>r?1:-1};BigInteger.prototype.compare=function(e){if(e===Infinity){return-1}if(e===-Infinity){return 1}var t=parseValue(e),r=this.value,n=t.value;if(this.sign!==t.sign){return t.sign?1:-1}if(t.isSmall){return this.sign?-1:1}return compareAbs(r,n)*(this.sign?-1:1)};BigInteger.prototype.compareTo=BigInteger.prototype.compare;SmallInteger.prototype.compare=function(e){if(e===Infinity){return-1}if(e===-Infinity){return 1}var t=parseValue(e),r=this.value,n=t.value;if(t.isSmall){return r==n?0:r>n?1:-1}if(r<0!==t.sign){return r<0?-1:1}return r<0?1:-1};SmallInteger.prototype.compareTo=SmallInteger.prototype.compare;NativeBigInt.prototype.compare=function(e){if(e===Infinity){return-1}if(e===-Infinity){return 1}var t=this.value;var r=parseValue(e).value;return t===r?0:t>r?1:-1};NativeBigInt.prototype.compareTo=NativeBigInt.prototype.compare;BigInteger.prototype.equals=function(e){return this.compare(e)===0};NativeBigInt.prototype.eq=NativeBigInt.prototype.equals=SmallInteger.prototype.eq=SmallInteger.prototype.equals=BigInteger.prototype.eq=BigInteger.prototype.equals;BigInteger.prototype.notEquals=function(e){return this.compare(e)!==0};NativeBigInt.prototype.neq=NativeBigInt.prototype.notEquals=SmallInteger.prototype.neq=SmallInteger.prototype.notEquals=BigInteger.prototype.neq=BigInteger.prototype.notEquals;BigInteger.prototype.greater=function(e){return this.compare(e)>0};NativeBigInt.prototype.gt=NativeBigInt.prototype.greater=SmallInteger.prototype.gt=SmallInteger.prototype.greater=BigInteger.prototype.gt=BigInteger.prototype.greater;BigInteger.prototype.lesser=function(e){return this.compare(e)<0};NativeBigInt.prototype.lt=NativeBigInt.prototype.lesser=SmallInteger.prototype.lt=SmallInteger.prototype.lesser=BigInteger.prototype.lt=BigInteger.prototype.lesser;BigInteger.prototype.greaterOrEquals=function(e){return this.compare(e)>=0};NativeBigInt.prototype.geq=NativeBigInt.prototype.greaterOrEquals=SmallInteger.prototype.geq=SmallInteger.prototype.greaterOrEquals=BigInteger.prototype.geq=BigInteger.prototype.greaterOrEquals;BigInteger.prototype.lesserOrEquals=function(e){return this.compare(e)<=0};NativeBigInt.prototype.leq=NativeBigInt.prototype.lesserOrEquals=SmallInteger.prototype.leq=SmallInteger.prototype.lesserOrEquals=BigInteger.prototype.leq=BigInteger.prototype.lesserOrEquals;BigInteger.prototype.isEven=function(){return(this.value[0]&1)===0};SmallInteger.prototype.isEven=function(){return(this.value&1)===0};NativeBigInt.prototype.isEven=function(){return(this.value&BigInt(1))===BigInt(0)};BigInteger.prototype.isOdd=function(){return(this.value[0]&1)===1};SmallInteger.prototype.isOdd=function(){return(this.value&1)===1};NativeBigInt.prototype.isOdd=function(){return(this.value&BigInt(1))===BigInt(1)};BigInteger.prototype.isPositive=function(){return!this.sign};SmallInteger.prototype.isPositive=function(){return this.value>0};NativeBigInt.prototype.isPositive=SmallInteger.prototype.isPositive;BigInteger.prototype.isNegative=function(){return this.sign};SmallInteger.prototype.isNegative=function(){return this.value<0};NativeBigInt.prototype.isNegative=SmallInteger.prototype.isNegative;BigInteger.prototype.isUnit=function(){return false};SmallInteger.prototype.isUnit=function(){return Math.abs(this.value)===1};NativeBigInt.prototype.isUnit=function(){return this.abs().value===BigInt(1)};BigInteger.prototype.isZero=function(){return false};SmallInteger.prototype.isZero=function(){return this.value===0};NativeBigInt.prototype.isZero=function(){return this.value===BigInt(0)};BigInteger.prototype.isDivisibleBy=function(e){var t=parseValue(e);if(t.isZero())return false;if(t.isUnit())return true;if(t.compareAbs(2)===0)return this.isEven();return this.mod(t).isZero()};NativeBigInt.prototype.isDivisibleBy=SmallInteger.prototype.isDivisibleBy=BigInteger.prototype.isDivisibleBy;function isBasicPrime(e){var t=e.abs();if(t.isUnit())return false;if(t.equals(2)||t.equals(3)||t.equals(5))return true;if(t.isEven()||t.isDivisibleBy(3)||t.isDivisibleBy(5))return false;if(t.lesser(49))return true}function millerRabinTest(e,t){var r=e.prev(),i=r,o=0,a,s,u,l;while(i.isEven())i=i.divide(2),o++;e:for(u=0;u-i)return new SmallInteger(e-1);return new BigInteger(o,true)};NativeBigInt.prototype.prev=function(){return new NativeBigInt(this.value-BigInt(1))};var u=[1];while(2*u[u.length-1]<=t)u.push(2*u[u.length-1]);var l=u.length,c=u[l-1];function shift_isSmall(e){return Math.abs(e)<=t}BigInteger.prototype.shiftLeft=function(e){var t=parseValue(e).toJSNumber();if(!shift_isSmall(t)){throw new Error(String(t)+" is too large for shifting.")}if(t<0)return this.shiftRight(-t);var r=this;if(r.isZero())return r;while(t>=l){r=r.multiply(c);t-=l-1}return r.multiply(u[t])};NativeBigInt.prototype.shiftLeft=SmallInteger.prototype.shiftLeft=BigInteger.prototype.shiftLeft;BigInteger.prototype.shiftRight=function(e){var t;var r=parseValue(e).toJSNumber();if(!shift_isSmall(r)){throw new Error(String(r)+" is too large for shifting.")}if(r<0)return this.shiftLeft(-r);var n=this;while(r>=l){if(n.isZero()||n.isNegative()&&n.isUnit())return n;t=divModAny(n,c);n=t[1].isNegative()?t[0].prev():t[0];r-=l-1}t=divModAny(n,u[r]);return t[1].isNegative()?t[0].prev():t[0]};NativeBigInt.prototype.shiftRight=SmallInteger.prototype.shiftRight=BigInteger.prototype.shiftRight;function bitwise(e,t,r){t=parseValue(t);var i=e.isNegative(),o=t.isNegative();var a=i?e.not():e,s=o?t.not():t;var u=0,l=0;var f=null,p=null;var h=[];while(!a.isZero()||!s.isZero()){f=divModAny(a,c);u=f[1].toJSNumber();if(i){u=c-1-u}p=divModAny(s,c);l=p[1].toJSNumber();if(o){l=c-1-l}a=f[0];s=p[0];h.push(r(u,l))}var d=r(i?1:0,o?1:0)!==0?n(-1):n(0);for(var v=h.length-1;v>=0;v-=1){d=d.multiply(c).add(n(h[v]))}return d}BigInteger.prototype.not=function(){return this.negate().prev()};NativeBigInt.prototype.not=SmallInteger.prototype.not=BigInteger.prototype.not;BigInteger.prototype.and=function(e){return bitwise(this,e,function(e,t){return e&t})};NativeBigInt.prototype.and=SmallInteger.prototype.and=BigInteger.prototype.and;BigInteger.prototype.or=function(e){return bitwise(this,e,function(e,t){return e|t})};NativeBigInt.prototype.or=SmallInteger.prototype.or=BigInteger.prototype.or;BigInteger.prototype.xor=function(e){return bitwise(this,e,function(e,t){return e^t})};NativeBigInt.prototype.xor=SmallInteger.prototype.xor=BigInteger.prototype.xor;var f=1<<30,p=(t&-t)*(t&-t)|f;function roughLOB(e){var r=e.value,n=typeof r==="number"?r|f:typeof r==="bigint"?r|BigInt(f):r[0]+r[1]*t|p;return n&-n}function integerLogarithm(e,t){if(t.compareTo(e)<=0){var r=integerLogarithm(e,t.square(t));var i=r.p;var o=r.e;var a=i.multiply(t);return a.compareTo(e)<=0?{p:a,e:o*2+1}:{p:i,e:o*2}}return{p:n(1),e:0}}BigInteger.prototype.bitLength=function(){var e=this;if(e.compareTo(n(0))<0){e=e.negate().subtract(n(1))}if(e.compareTo(n(0))===0){return n(0)}return n(integerLogarithm(e,n(2)).e).add(n(1))};NativeBigInt.prototype.bitLength=SmallInteger.prototype.bitLength=BigInteger.prototype.bitLength;function max(e,t){e=parseValue(e);t=parseValue(t);return e.greater(t)?e:t}function min(e,t){e=parseValue(e);t=parseValue(t);return e.lesser(t)?e:t}function gcd(e,t){e=parseValue(e).abs();t=parseValue(t).abs();if(e.equals(t))return e;if(e.isZero())return t;if(t.isZero())return e;var r=Integer[1],n,i;while(e.isEven()&&t.isEven()){n=min(roughLOB(e),roughLOB(t));e=e.divide(n);t=t.divide(n);r=r.multiply(n)}while(e.isEven()){e=e.divide(roughLOB(e))}do{while(t.isEven()){t=t.divide(roughLOB(t))}if(e.greater(t)){i=t;t=e;e=i}t=t.subtract(e)}while(!t.isZero());return r.isUnit()?e:e.multiply(r)}function lcm(e,t){e=parseValue(e).abs();t=parseValue(t).abs();return e.divide(gcd(e,t)).multiply(t)}function randBetween(e,r,n){e=parseValue(e);r=parseValue(r);var i=n||Math.random;var o=min(e,r),a=max(e,r);var s=a.subtract(o).add(1);if(s.isSmall)return o.add(Math.floor(i()*s));var u=toBase(s,t).value;var l=[],c=true;for(var f=0;f=s){if(l==="1"&&s===1)continue;throw new Error(l+" is not a valid digit in base "+t+".")}}}t=parseValue(t);var c=[];var f=e[0]==="-";for(o=f?1:0;o"&&o=0;o--){n=n.add(e[o].times(i));i=i.times(t)}return r?n.negate():n}function stringify(e,t){t=t||a;if(e"}function toBase(e,t){t=n(t);if(t.isZero()){if(e.isZero())return{value:[0],isNegative:false};throw new Error("Cannot convert nonzero numbers to base 0.")}if(t.equals(-1)){if(e.isZero())return{value:[0],isNegative:false};if(e.isNegative())return{value:[].concat.apply([],Array.apply(null,Array(-e.toJSNumber())).map(Array.prototype.valueOf,[1,0])),isNegative:false};var r=Array.apply(null,Array(e.toJSNumber()-1)).map(Array.prototype.valueOf,[0,1]);r.unshift([1]);return{value:[].concat.apply([],r),isNegative:false}}var i=false;if(e.isNegative()&&t.isPositive()){i=true;e=e.abs()}if(t.isUnit()){if(e.isZero())return{value:[0],isNegative:false};return{value:Array.apply(null,Array(e.toJSNumber())).map(Number.prototype.valueOf,1),isNegative:i}}var o=[];var a=e,s;while(a.isNegative()||a.compareAbs(t)>=0){s=a.divmod(t);a=s.quotient;var u=s.remainder;if(u.isNegative()){u=t.minus(u).abs();a=a.next()}o.push(u.toJSNumber())}o.push(a.toJSNumber());return{value:o.reverse(),isNegative:i}}function toBaseString(e,t,r){var n=toBase(e,t);return(n.isNegative?"-":"")+n.value.map(function(e){return stringify(e,r)}).join("")}BigInteger.prototype.toArray=function(e){return toBase(this,e)};SmallInteger.prototype.toArray=function(e){return toBase(this,e)};NativeBigInt.prototype.toArray=function(e){return toBase(this,e)};BigInteger.prototype.toString=function(t,r){if(t===e)t=10;if(t!==10)return toBaseString(this,t,r);var n=this.value,i=n.length,o=String(n[--i]),a="0000000",s;while(--i>=0){s=String(n[i]);o+=a.slice(s.length)+s}var u=this.sign?"-":"";return u+o};SmallInteger.prototype.toString=function(t,r){if(t===e)t=10;if(t!=10)return toBaseString(this,t,r);return String(this.value)};NativeBigInt.prototype.toString=SmallInteger.prototype.toString;NativeBigInt.prototype.toJSON=BigInteger.prototype.toJSON=SmallInteger.prototype.toJSON=function(){return this.toString()};BigInteger.prototype.valueOf=function(){return parseInt(this.toString(),10)};BigInteger.prototype.toJSNumber=BigInteger.prototype.valueOf;SmallInteger.prototype.valueOf=function(){return this.value};SmallInteger.prototype.toJSNumber=SmallInteger.prototype.valueOf;NativeBigInt.prototype.valueOf=NativeBigInt.prototype.toJSNumber=function(){return parseInt(this.toString(),10)};function parseStringValue(e){if(isPrecise(+e)){var t=+e;if(t===truncate(t))return s?new NativeBigInt(BigInt(t)):new SmallInteger(t);throw new Error("Invalid integer: "+e)}var n=e[0]==="-";if(n)e=e.slice(1);var i=e.split(/e/i);if(i.length>2)throw new Error("Invalid integer: "+i.join("e"));if(i.length===2){var o=i[1];if(o[0]==="+")o=o.slice(1);o=+o;if(o!==truncate(o)||!isPrecise(o))throw new Error("Invalid integer: "+o+" is not a valid exponent.");var a=i[0];var u=a.indexOf(".");if(u>=0){o-=a.length-u-1;a=a.slice(0,u)+a.slice(u+1)}if(o<0)throw new Error("Cannot include negative exponent part for integers");a+=new Array(o+1).join("0");e=a}var l=/^([0-9][0-9]*)$/.test(e);if(!l)throw new Error("Invalid integer: "+e);if(s){return new NativeBigInt(BigInt(n?"-"+e:e))}var c=[],f=e.length,p=r,h=f-p;while(f>0){c.push(+e.slice(h,f));h-=p;if(h<0)h=0;f-=p}trim(c);return new BigInteger(c,n)}function parseNumberValue(e){if(s){return new NativeBigInt(BigInt(e))}if(isPrecise(e)){if(e!==truncate(e))throw new Error(e+" is not an integer.");return new SmallInteger(e)}return parseStringValue(e.toString())}function parseValue(e){if(typeof e==="number"){return parseNumberValue(e)}if(typeof e==="string"){return parseStringValue(e)}if(typeof e==="bigint"){return new NativeBigInt(e)}return e}for(var d=0;d<1e3;d++){Integer[d]=parseValue(d);if(d>0)Integer[-d]=parseValue(-d)}Integer.one=Integer[1];Integer.zero=Integer[0];Integer.minusOne=Integer[-1];Integer.max=max;Integer.min=min;Integer.gcd=gcd;Integer.lcm=lcm;Integer.isInstance=function(e){return e instanceof BigInteger||e instanceof SmallInteger||e instanceof NativeBigInt};Integer.randBetween=randBetween;Integer.fromArray=function(e,t,r){return parseBaseFromArray(e.map(parseValue),parseValue(t||10),r)};return Integer}();if(true&&e.hasOwnProperty("exports")){e.exports=n}if(typeof define==="function"&&define.amd){define(function(){return n})}},971:function(e,t,r){"use strict";e.exports=function(e,t){var n=r(248);var i=e.CancellationError;var o=n.errorObj;function PassThroughHandlerContext(e,t,r){this.promise=e;this.type=t;this.handler=r;this.called=false;this.cancelPromise=null}PassThroughHandlerContext.prototype.isFinallyHandler=function(){return this.type===0};function FinallyHandlerCancelReaction(e){this.finallyHandler=e}FinallyHandlerCancelReaction.prototype._resultCancelled=function(){checkCancel(this.finallyHandler)};function checkCancel(e,t){if(e.cancelPromise!=null){if(arguments.length>1){e.cancelPromise._reject(t)}else{e.cancelPromise._cancel()}e.cancelPromise=null;return true}return false}function succeed(){return finallyHandler.call(this,this.promise._target()._settledValue())}function fail(e){if(checkCancel(this,e))return;o.e=e;return o}function finallyHandler(r){var n=this.promise;var a=this.handler;if(!this.called){this.called=true;var s=this.isFinallyHandler()?a.call(n._boundValue()):a.call(n._boundValue(),r);if(s!==undefined){n._setReturnedNonUndefined();var u=t(s,n);if(u instanceof e){if(this.cancelPromise!=null){if(u._isCancelled()){var l=new i("late cancellation observer");n._attachExtraTrace(l);o.e=l;return o}else if(u.isPending()){u._attachCancellationCallback(new FinallyHandlerCancelReaction(this))}}return u._then(succeed,fail,undefined,this,undefined)}}}if(n.isRejected()){checkCancel(this);o.e=r;return o}else{checkCancel(this);return r}}e.prototype._passThrough=function(e,t,r,n){if(typeof e!=="function")return this.then();return this._then(r,n,undefined,new PassThroughHandlerContext(this,t,e),undefined)};e.prototype.lastly=e.prototype["finally"]=function(e){return this._passThrough(e,0,finallyHandler,finallyHandler)};e.prototype.tap=function(e){return this._passThrough(e,1,finallyHandler)};return PassThroughHandlerContext}},979:function(e,t,r){"use strict";var n=this&&this.__awaiter||function(e,t,r,n){function adopt(e){return e instanceof r?e:new r(function(t){t(e)})}return new(r||(r=Promise))(function(r,i){function fulfilled(e){try{step(n.next(e))}catch(e){i(e)}}function rejected(e){try{step(n["throw"](e))}catch(e){i(e)}}function step(e){e.done?r(e.value):adopt(e.value).then(fulfilled,rejected)}step((n=n.apply(e,t||[])).next())})};var i=this&&this.__importStar||function(e){if(e&&e.__esModule)return e;var t={};if(e!=null)for(var r in e)if(Object.hasOwnProperty.call(e,r))t[r]=e[r];t["default"]=e;return t};Object.defineProperty(t,"__esModule",{value:true});const o=i(r(470));class RetryHelper{constructor(e,t,r){if(e<1){throw new Error("max attempts should be greater than or equal to 1")}this.maxAttempts=e;this.minSeconds=Math.floor(t);this.maxSeconds=Math.floor(r);if(this.minSeconds>this.maxSeconds){throw new Error("min seconds should be less than or equal to max seconds")}}execute(e,t){return n(this,void 0,void 0,function*(){let r=1;while(rsetTimeout(t,e*1e3))})}}t.RetryHelper=RetryHelper},982:function(e,t){"use strict";t.__esModule=true;function parseArgsStringToArgv(e,t,r){var n=/([^\s'"]([^\s'"]*(['"])([^\3]*?)\3)+[^\s'"]*)|[^\s'"]+|(['"])([^\5]*?)\5/gi;var i=e;var o=[];if(t){o.push(t)}if(r){o.push(r)}var a;do{a=n.exec(i);if(a!==null){o.push(firstString(a[1],a[6],a[0]))}}while(a!==null);return o}t["default"]=parseArgsStringToArgv;t.parseArgsStringToArgv=parseArgsStringToArgv;function firstString(){var e=[];for(var t=0;t1){var r=new Array(t-1),n=0,o;for(o=0;o0&&typeof e!=="function"&&typeof t!=="function"){var r=".then() only accepts functions but was passed: "+a.classString(e);if(arguments.length>1){r+=", "+a.classString(t)}this._warn(r)}return this._then(e,t,undefined,undefined,undefined)};Promise.prototype.done=function(e,t){var r=this._then(e,t,undefined,undefined,undefined);r._setIsFinal()};Promise.prototype.spread=function(e){if(typeof e!=="function"){return i("expecting a function but got "+a.classString(e))}return this.all()._then(e,undefined,undefined,v,undefined)};Promise.prototype.toJSON=function(){var e={isFulfilled:false,isRejected:false,fulfillmentValue:undefined,rejectionReason:undefined};if(this.isFulfilled()){e.fulfillmentValue=this.value();e.isFulfilled=true}else if(this.isRejected()){e.rejectionReason=this.reason();e.isRejected=true}return e};Promise.prototype.all=function(){if(arguments.length>0){this._warn(".all() was passed arguments but it does not take any")}return new m(this).promise()};Promise.prototype.error=function(e){return this.caught(a.originatesFromRejection,e)};Promise.getNewLibraryCopy=e.exports;Promise.is=function(e){return e instanceof Promise};Promise.fromNode=Promise.fromCallback=function(e){var t=new Promise(d);t._captureStackTrace();var r=arguments.length>1?!!Object(arguments[1]).multiArgs:false;var n=x(e)(O(t,r));if(n===T){t._rejectCallback(n.e,true)}if(!t._isFateSealed())t._setAsyncGuaranteed();return t};Promise.all=function(e){return new m(e).promise()};Promise.cast=function(e){var t=g(e);if(!(t instanceof Promise)){t=new Promise(d);t._captureStackTrace();t._setFulfilled();t._rejectionHandler0=e}return t};Promise.resolve=Promise.fulfilled=Promise.cast;Promise.reject=Promise.rejected=function(e){var t=new Promise(d);t._captureStackTrace();t._rejectCallback(e,true);return t};Promise.setScheduler=function(e){if(typeof e!=="function"){throw new p("expecting a function but got "+a.classString(e))}return c.setScheduler(e)};Promise.prototype._then=function(e,t,r,n,i){var o=i!==undefined;var u=o?i:new Promise(d);var l=this._target();var f=l._bitField;if(!o){u._propagateFrom(this,3);u._captureStackTrace();if(n===undefined&&(this._bitField&2097152)!==0){if(!((f&50397184)===0)){n=this._boundValue()}else{n=l===this?undefined:this._boundTo}}this._fireEvent("promiseChained",this,u)}var p=s();if(!((f&50397184)===0)){var v,y,g=l._settlePromiseCtx;if((f&33554432)!==0){y=l._rejectionHandler0;v=e}else if((f&16777216)!==0){y=l._fulfillmentHandler0;v=t;l._unsetRejectionIsUnhandled()}else{g=l._settlePromiseLateCancellationObserver;y=new h("late cancellation observer");l._attachExtraTrace(y);v=t}c.invoke(g,l,{handler:p===null?v:typeof v==="function"&&a.domainBind(p,v),promise:u,receiver:n,value:y})}else{l._addCallbacks(e,t,u,n,p)}return u};Promise.prototype._length=function(){return this._bitField&65535};Promise.prototype._isFateSealed=function(){return(this._bitField&117506048)!==0};Promise.prototype._isFollowing=function(){return(this._bitField&67108864)===67108864};Promise.prototype._setLength=function(e){this._bitField=this._bitField&-65536|e&65535};Promise.prototype._setFulfilled=function(){this._bitField=this._bitField|33554432;this._fireEvent("promiseFulfilled",this)};Promise.prototype._setRejected=function(){this._bitField=this._bitField|16777216;this._fireEvent("promiseRejected",this)};Promise.prototype._setFollowing=function(){this._bitField=this._bitField|67108864;this._fireEvent("promiseResolved",this)};Promise.prototype._setIsFinal=function(){this._bitField=this._bitField|4194304};Promise.prototype._isFinal=function(){return(this._bitField&4194304)>0};Promise.prototype._unsetCancelled=function(){this._bitField=this._bitField&~65536};Promise.prototype._setCancelled=function(){this._bitField=this._bitField|65536;this._fireEvent("promiseCancelled",this)};Promise.prototype._setWillBeCancelled=function(){this._bitField=this._bitField|8388608};Promise.prototype._setAsyncGuaranteed=function(){if(c.hasCustomScheduler())return;this._bitField=this._bitField|134217728};Promise.prototype._receiverAt=function(e){var t=e===0?this._receiver0:this[e*4-4+3];if(t===o){return undefined}else if(t===undefined&&this._isBound()){return this._boundValue()}return t};Promise.prototype._promiseAt=function(e){return this[e*4-4+2]};Promise.prototype._fulfillmentHandlerAt=function(e){return this[e*4-4+0]};Promise.prototype._rejectionHandlerAt=function(e){return this[e*4-4+1]};Promise.prototype._boundValue=function(){};Promise.prototype._migrateCallback0=function(e){var t=e._bitField;var r=e._fulfillmentHandler0;var n=e._rejectionHandler0;var i=e._promise0;var a=e._receiverAt(0);if(a===undefined)a=o;this._addCallbacks(r,n,i,a,null)};Promise.prototype._migrateCallbackAt=function(e,t){var r=e._fulfillmentHandlerAt(t);var n=e._rejectionHandlerAt(t);var i=e._promiseAt(t);var a=e._receiverAt(t);if(a===undefined)a=o;this._addCallbacks(r,n,i,a,null)};Promise.prototype._addCallbacks=function(e,t,r,n,i){var o=this._length();if(o>=65535-4){o=0;this._setLength(0)}if(o===0){this._promise0=r;this._receiver0=n;if(typeof e==="function"){this._fulfillmentHandler0=i===null?e:a.domainBind(i,e)}if(typeof t==="function"){this._rejectionHandler0=i===null?t:a.domainBind(i,t)}}else{var s=o*4-4;this[s+2]=r;this[s+3]=n;if(typeof e==="function"){this[s+0]=i===null?e:a.domainBind(i,e)}if(typeof t==="function"){this[s+1]=i===null?t:a.domainBind(i,t)}}this._setLength(o+1);return o};Promise.prototype._proxy=function(e,t){this._addCallbacks(undefined,undefined,t,e,null)};Promise.prototype._resolveCallback=function(e,r){if((this._bitField&117506048)!==0)return;if(e===this)return this._rejectCallback(t(),false);var n=g(e,this);if(!(n instanceof Promise))return this._fulfill(e);if(r)this._propagateFrom(n,2);var i=n._target();if(i===this){this._reject(t());return}var o=i._bitField;if((o&50397184)===0){var a=this._length();if(a>0)i._migrateCallback0(this);for(var s=1;s>>16)return;if(e===this){var n=t();this._attachExtraTrace(n);return this._reject(n)}this._setFulfilled();this._rejectionHandler0=e;if((r&65535)>0){if((r&134217728)!==0){this._settlePromises()}else{c.settlePromises(this)}}};Promise.prototype._reject=function(e){var t=this._bitField;if((t&117506048)>>>16)return;this._setRejected();this._fulfillmentHandler0=e;if(this._isFinal()){return c.fatalError(e,a.isNode)}if((t&65535)>0){c.settlePromises(this)}else{this._ensurePossibleRejectionHandled()}};Promise.prototype._fulfillPromises=function(e,t){for(var r=1;r0){if((e&16842752)!==0){var r=this._fulfillmentHandler0;this._settlePromise0(this._rejectionHandler0,r,e);this._rejectPromises(t,r)}else{var n=this._rejectionHandler0;this._settlePromise0(this._fulfillmentHandler0,n,e);this._fulfillPromises(t,n)}this._setLength(0)}this._clearCancellationData()};Promise.prototype._settledValue=function(){var e=this._bitField;if((e&33554432)!==0){return this._rejectionHandler0}else if((e&16777216)!==0){return this._fulfillmentHandler0}};function deferResolve(e){this.promise._resolveCallback(e)}function deferReject(e){this.promise._rejectCallback(e,false)}Promise.defer=Promise.pending=function(){b.deprecated("Promise.defer","new Promise");var e=new Promise(d);return{promise:e,resolve:deferResolve,reject:deferReject}};a.notEnumerableProp(Promise,"_makeSelfResolutionError",t);r(266)(Promise,d,g,i,b);r(947)(Promise,d,g,b);r(514)(Promise,m,i,b);r(315)(Promise);r(715)(Promise);r(809)(Promise,m,g,d,c,s);Promise.Promise=Promise;Promise.version="3.4.7";r(220)(Promise,m,i,g,d,b);r(414)(Promise);r(780)(Promise,i,g,w,d,b);r(409)(Promise,d,b);r(25)(Promise,i,d,g,Proxyable,b);r(694)(Promise);r(948)(Promise,d);r(321)(Promise,m,g,i);r(832)(Promise,d,g,i);r(814)(Promise,m,i,g,d,b);r(149)(Promise,m,b);r(323)(Promise,m,i);r(610)(Promise,d);r(685)(Promise,d);r(658)(Promise);a.toFastProperties(Promise);a.toFastProperties(Promise.prototype);function fillTypes(e){var t=new Promise(d);t._fulfillmentHandler0=e;t._rejectionHandler0=e;t._promise0=e;t._receiver0=e}fillTypes({a:1});fillTypes({b:2});fillTypes({c:3});fillTypes(1);fillTypes(function(){});fillTypes(undefined);fillTypes(false);fillTypes(new Promise(d));b.setBounds(l.firstLineError,a.lastLineError);return Promise}},986:function(e,t,r){"use strict";var n=this&&this.__awaiter||function(e,t,r,n){function adopt(e){return e instanceof r?e:new r(function(t){t(e)})}return new(r||(r=Promise))(function(r,i){function fulfilled(e){try{step(n.next(e))}catch(e){i(e)}}function rejected(e){try{step(n["throw"](e))}catch(e){i(e)}}function step(e){e.done?r(e.value):adopt(e.value).then(fulfilled,rejected)}step((n=n.apply(e,t||[])).next())})};var i=this&&this.__importStar||function(e){if(e&&e.__esModule)return e;var t={};if(e!=null)for(var r in e)if(Object.hasOwnProperty.call(e,r))t[r]=e[r];t["default"]=e;return t};Object.defineProperty(t,"__esModule",{value:true});const o=i(r(9));function exec(e,t,r){return n(this,void 0,void 0,function*(){const n=o.argStringToArray(e);if(n.length===0){throw new Error(`Parameter 'commandLine' cannot be null or empty.`)}const i=n[0];t=n.slice(1).concat(t||[]);const a=new o.ToolRunner(i,t,r);return a.exec()})}t.exec=exec}},function(e){"use strict";!function(){e.nmd=function(e){e.paths=[];if(!e.children)e.children=[];Object.defineProperty(e,"loaded",{enumerable:true,get:function(){return e.l}});Object.defineProperty(e,"id",{enumerable:true,get:function(){return e.i}});return e}}()}); \ No newline at end of file +module.exports=function(e,t){"use strict";var r={};function __webpack_require__(t){if(r[t]){return r[t].exports}var n=r[t]={i:t,l:false,exports:{}};var i=true;try{e[t].call(n.exports,n,n.exports,__webpack_require__);i=false}finally{if(i)delete r[t]}n.l=true;return n.exports}__webpack_require__.ab=__dirname+"/";function startup(){return __webpack_require__(131)}t(__webpack_require__);return startup()}({1:function(e,t,r){"use strict";var n=this&&this.__awaiter||function(e,t,r,n){function adopt(e){return e instanceof r?e:new r(function(t){t(e)})}return new(r||(r=Promise))(function(r,i){function fulfilled(e){try{step(n.next(e))}catch(e){i(e)}}function rejected(e){try{step(n["throw"](e))}catch(e){i(e)}}function step(e){e.done?r(e.value):adopt(e.value).then(fulfilled,rejected)}step((n=n.apply(e,t||[])).next())})};Object.defineProperty(t,"__esModule",{value:true});const i=r(129);const o=r(622);const a=r(669);const s=r(672);const u=a.promisify(i.exec);function cp(e,t,r={}){return n(this,void 0,void 0,function*(){const{force:n,recursive:i}=readCopyOptions(r);const a=(yield s.exists(t))?yield s.stat(t):null;if(a&&a.isFile()&&!n){return}const u=a&&a.isDirectory()?o.join(t,o.basename(e)):t;if(!(yield s.exists(e))){throw new Error(`no such file or directory: ${e}`)}const l=yield s.stat(e);if(l.isDirectory()){if(!i){throw new Error(`Failed to copy. ${e} is a directory, but tried to copy without recursive flag.`)}else{yield cpDirRecursive(e,u,0,n)}}else{if(o.relative(e,u)===""){throw new Error(`'${u}' and '${e}' are the same file`)}yield copyFile(e,u,n)}})}t.cp=cp;function mv(e,t,r={}){return n(this,void 0,void 0,function*(){if(yield s.exists(t)){let n=true;if(yield s.isDirectory(t)){t=o.join(t,o.basename(e));n=yield s.exists(t)}if(n){if(r.force==null||r.force){yield rmRF(t)}else{throw new Error("Destination already exists")}}}yield mkdirP(o.dirname(t));yield s.rename(e,t)})}t.mv=mv;function rmRF(e){return n(this,void 0,void 0,function*(){if(s.IS_WINDOWS){try{if(yield s.isDirectory(e,true)){yield u(`rd /s /q "${e}"`)}else{yield u(`del /f /a "${e}"`)}}catch(e){if(e.code!=="ENOENT")throw e}try{yield s.unlink(e)}catch(e){if(e.code!=="ENOENT")throw e}}else{let t=false;try{t=yield s.isDirectory(e)}catch(e){if(e.code!=="ENOENT")throw e;return}if(t){yield u(`rm -rf "${e}"`)}else{yield s.unlink(e)}}})}t.rmRF=rmRF;function mkdirP(e){return n(this,void 0,void 0,function*(){yield s.mkdirP(e)})}t.mkdirP=mkdirP;function which(e,t){return n(this,void 0,void 0,function*(){if(!e){throw new Error("parameter 'tool' is required")}if(t){const t=yield which(e,false);if(!t){if(s.IS_WINDOWS){throw new Error(`Unable to locate executable file: ${e}. Please verify either the file path exists or the file can be found within a directory specified by the PATH environment variable. Also verify the file has a valid extension for an executable file.`)}else{throw new Error(`Unable to locate executable file: ${e}. Please verify either the file path exists or the file can be found within a directory specified by the PATH environment variable. Also check the file mode to verify the file is executable.`)}}}try{const t=[];if(s.IS_WINDOWS&&process.env.PATHEXT){for(const e of process.env.PATHEXT.split(o.delimiter)){if(e){t.push(e)}}}if(s.isRooted(e)){const r=yield s.tryGetExecutablePath(e,t);if(r){return r}return""}if(e.includes("/")||s.IS_WINDOWS&&e.includes("\\")){return""}const r=[];if(process.env.PATH){for(const e of process.env.PATH.split(o.delimiter)){if(e){r.push(e)}}}for(const n of r){const r=yield s.tryGetExecutablePath(n+o.sep+e,t);if(r){return r}}return""}catch(e){throw new Error(`which failed with message ${e.message}`)}})}t.which=which;function readCopyOptions(e){const t=e.force==null?true:e.force;const r=Boolean(e.recursive);return{force:t,recursive:r}}function cpDirRecursive(e,t,r,i){return n(this,void 0,void 0,function*(){if(r>=255)return;r++;yield mkdirP(t);const n=yield s.readdir(e);for(const o of n){const n=`${e}/${o}`;const a=`${t}/${o}`;const u=yield s.lstat(n);if(u.isDirectory()){yield cpDirRecursive(n,a,r,i)}else{yield copyFile(n,a,i)}}yield s.chmod(t,(yield s.stat(e)).mode)})}function copyFile(e,t,r){return n(this,void 0,void 0,function*(){if((yield s.lstat(e)).isSymbolicLink()){try{yield s.lstat(t);yield s.unlink(t)}catch(e){if(e.code==="EPERM"){yield s.chmod(t,"0666");yield s.unlink(t)}}const r=yield s.readlink(e);yield s.symlink(r,t,s.IS_WINDOWS?"junction":null)}else if(!(yield s.exists(t))||r){yield s.copyFile(e,t)}})}},9:function(e,t,r){"use strict";var n=this&&this.__awaiter||function(e,t,r,n){function adopt(e){return e instanceof r?e:new r(function(t){t(e)})}return new(r||(r=Promise))(function(r,i){function fulfilled(e){try{step(n.next(e))}catch(e){i(e)}}function rejected(e){try{step(n["throw"](e))}catch(e){i(e)}}function step(e){e.done?r(e.value):adopt(e.value).then(fulfilled,rejected)}step((n=n.apply(e,t||[])).next())})};var i=this&&this.__importStar||function(e){if(e&&e.__esModule)return e;var t={};if(e!=null)for(var r in e)if(Object.hasOwnProperty.call(e,r))t[r]=e[r];t["default"]=e;return t};Object.defineProperty(t,"__esModule",{value:true});const o=i(r(87));const a=i(r(614));const s=i(r(129));const u=i(r(622));const l=i(r(1));const c=i(r(672));const f=process.platform==="win32";class ToolRunner extends a.EventEmitter{constructor(e,t,r){super();if(!e){throw new Error("Parameter 'toolPath' cannot be null or empty.")}this.toolPath=e;this.args=t||[];this.options=r||{}}_debug(e){if(this.options.listeners&&this.options.listeners.debug){this.options.listeners.debug(e)}}_getCommandString(e,t){const r=this._getSpawnFileName();const n=this._getSpawnArgs(e);let i=t?"":"[command]";if(f){if(this._isCmdFile()){i+=r;for(const e of n){i+=` ${e}`}}else if(e.windowsVerbatimArguments){i+=`"${r}"`;for(const e of n){i+=` ${e}`}}else{i+=this._windowsQuoteCmdArg(r);for(const e of n){i+=` ${this._windowsQuoteCmdArg(e)}`}}}else{i+=r;for(const e of n){i+=` ${e}`}}return i}_processLineBuffer(e,t,r){try{let n=t+e.toString();let i=n.indexOf(o.EOL);while(i>-1){const e=n.substring(0,i);r(e);n=n.substring(i+o.EOL.length);i=n.indexOf(o.EOL)}t=n}catch(e){this._debug(`error processing line. Failed with error ${e}`)}}_getSpawnFileName(){if(f){if(this._isCmdFile()){return process.env["COMSPEC"]||"cmd.exe"}}return this.toolPath}_getSpawnArgs(e){if(f){if(this._isCmdFile()){let t=`/D /S /C "${this._windowsQuoteCmdArg(this.toolPath)}`;for(const r of this.args){t+=" ";t+=e.windowsVerbatimArguments?r:this._windowsQuoteCmdArg(r)}t+='"';return[t]}}return this.args}_endsWith(e,t){return e.endsWith(t)}_isCmdFile(){const e=this.toolPath.toUpperCase();return this._endsWith(e,".CMD")||this._endsWith(e,".BAT")}_windowsQuoteCmdArg(e){if(!this._isCmdFile()){return this._uvQuoteCmdArg(e)}if(!e){return'""'}const t=[" ","\t","&","(",")","[","]","{","}","^","=",";","!","'","+",",","`","~","|","<",">",'"'];let r=false;for(const n of e){if(t.some(e=>e===n)){r=true;break}}if(!r){return e}let n='"';let i=true;for(let t=e.length;t>0;t--){n+=e[t-1];if(i&&e[t-1]==="\\"){n+="\\"}else if(e[t-1]==='"'){i=true;n+='"'}else{i=false}}n+='"';return n.split("").reverse().join("")}_uvQuoteCmdArg(e){if(!e){return'""'}if(!e.includes(" ")&&!e.includes("\t")&&!e.includes('"')){return e}if(!e.includes('"')&&!e.includes("\\")){return`"${e}"`}let t='"';let r=true;for(let n=e.length;n>0;n--){t+=e[n-1];if(r&&e[n-1]==="\\"){t+="\\"}else if(e[n-1]==='"'){r=true;t+="\\"}else{r=false}}t+='"';return t.split("").reverse().join("")}_cloneExecOptions(e){e=e||{};const t={cwd:e.cwd||process.cwd(),env:e.env||process.env,silent:e.silent||false,windowsVerbatimArguments:e.windowsVerbatimArguments||false,failOnStdErr:e.failOnStdErr||false,ignoreReturnCode:e.ignoreReturnCode||false,delay:e.delay||1e4};t.outStream=e.outStream||process.stdout;t.errStream=e.errStream||process.stderr;return t}_getSpawnOptions(e,t){e=e||{};const r={};r.cwd=e.cwd;r.env=e.env;r["windowsVerbatimArguments"]=e.windowsVerbatimArguments||this._isCmdFile();if(e.windowsVerbatimArguments){r.argv0=`"${t}"`}return r}exec(){return n(this,void 0,void 0,function*(){if(!c.isRooted(this.toolPath)&&(this.toolPath.includes("/")||f&&this.toolPath.includes("\\"))){this.toolPath=u.resolve(process.cwd(),this.options.cwd||process.cwd(),this.toolPath)}this.toolPath=yield l.which(this.toolPath,true);return new Promise((e,t)=>{this._debug(`exec tool: ${this.toolPath}`);this._debug("arguments:");for(const e of this.args){this._debug(` ${e}`)}const r=this._cloneExecOptions(this.options);if(!r.silent&&r.outStream){r.outStream.write(this._getCommandString(r)+o.EOL)}const n=new ExecState(r,this.toolPath);n.on("debug",e=>{this._debug(e)});const i=this._getSpawnFileName();const a=s.spawn(i,this._getSpawnArgs(r),this._getSpawnOptions(this.options,i));const u="";if(a.stdout){a.stdout.on("data",e=>{if(this.options.listeners&&this.options.listeners.stdout){this.options.listeners.stdout(e)}if(!r.silent&&r.outStream){r.outStream.write(e)}this._processLineBuffer(e,u,e=>{if(this.options.listeners&&this.options.listeners.stdline){this.options.listeners.stdline(e)}})})}const l="";if(a.stderr){a.stderr.on("data",e=>{n.processStderr=true;if(this.options.listeners&&this.options.listeners.stderr){this.options.listeners.stderr(e)}if(!r.silent&&r.errStream&&r.outStream){const t=r.failOnStdErr?r.errStream:r.outStream;t.write(e)}this._processLineBuffer(e,l,e=>{if(this.options.listeners&&this.options.listeners.errline){this.options.listeners.errline(e)}})})}a.on("error",e=>{n.processError=e.message;n.processExited=true;n.processClosed=true;n.CheckComplete()});a.on("exit",e=>{n.processExitCode=e;n.processExited=true;this._debug(`Exit code ${e} received from tool '${this.toolPath}'`);n.CheckComplete()});a.on("close",e=>{n.processExitCode=e;n.processExited=true;n.processClosed=true;this._debug(`STDIO streams have closed for tool '${this.toolPath}'`);n.CheckComplete()});n.on("done",(r,n)=>{if(u.length>0){this.emit("stdline",u)}if(l.length>0){this.emit("errline",l)}a.removeAllListeners();if(r){t(r)}else{e(n)}});if(this.options.input){if(!a.stdin){throw new Error("child process missing stdin")}a.stdin.end(this.options.input)}})})}}t.ToolRunner=ToolRunner;function argStringToArray(e){const t=[];let r=false;let n=false;let i="";function append(e){if(n&&e!=='"'){i+="\\"}i+=e;n=false}for(let o=0;o0){t.push(i);i=""}continue}append(a)}if(i.length>0){t.push(i.trim())}return t}t.argStringToArray=argStringToArray;class ExecState extends a.EventEmitter{constructor(e,t){super();this.processClosed=false;this.processError="";this.processExitCode=0;this.processExited=false;this.processStderr=false;this.delay=1e4;this.done=false;this.timeout=null;if(!t){throw new Error("toolPath must not be empty")}this.options=e;this.toolPath=t;if(e.delay){this.delay=e.delay}}CheckComplete(){if(this.done){return}if(this.processClosed){this._setResult()}else if(this.processExited){this.timeout=setTimeout(ExecState.HandleTimeout,this.delay,this)}}_debug(e){this.emit("debug",e)}_setResult(){let e;if(this.processExited){if(this.processError){e=new Error(`There was an error when attempting to execute the process '${this.toolPath}'. This may indicate the process failed to start. Error: ${this.processError}`)}else if(this.processExitCode!==0&&!this.options.ignoreReturnCode){e=new Error(`The process '${this.toolPath}' failed with exit code ${this.processExitCode}`)}else if(this.processStderr&&this.options.failOnStdErr){e=new Error(`The process '${this.toolPath}' failed because one or more lines were written to the STDERR stream`)}}if(this.timeout){clearTimeout(this.timeout);this.timeout=null}this.done=true;this.emit("done",e,this.processExitCode)}static HandleTimeout(e){if(e.done){return}if(!e.processClosed&&e.processExited){const t=`The STDIO streams did not close within ${e.delay/1e3} seconds of the exit event from process '${e.toolPath}'. This may indicate a child process inherited the STDIO streams and has not yet exited.`;e._debug(t)}e._setResult()}}},11:function(e){e.exports=wrappy;function wrappy(e,t){if(e&&t)return wrappy(e)(t);if(typeof e!=="function")throw new TypeError("need wrapper function");Object.keys(e).forEach(function(t){wrapper[t]=e[t]});return wrapper;function wrapper(){var t=new Array(arguments.length);for(var r=0;r{a.debug(`${t.arch}===${u} && ${t.platform}===${n}`);let r=t.arch===u&&t.platform===n;if(r&&t.platform_version){const n=e.exports._getOsVersion();if(n===t.platform_version){r=true}else{r=o.satisfies(n,t.platform_version)}}return r});if(f){a.debug(`matched ${s.version}`);c=s;break}}}if(c&&f){l=Object.assign({},c);l.files=[f]}return l})}t._findMatch=_findMatch;function _getOsVersion(){const t=s.platform();let r="";if(t==="darwin"){r=u.execSync("sw_vers -productVersion").toString()}else if(t==="linux"){const t=e.exports._readLinuxVersionFile();if(t){const e=t.split("\n");for(const t of e){const e=t.split("=");if(e.length===2&&e[0].trim()==="DISTRIB_RELEASE"){r=e[1].trim();break}}}}return r}t._getOsVersion=_getOsVersion;function _readLinuxVersionFile(){const e="/etc/lsb-release";let t="";if(l.existsSync(e)){t=l.readFileSync(e).toString()}return t}t._readLinuxVersionFile=_readLinuxVersionFile},49:function(e,t,r){var n=r(11);e.exports=n(once);e.exports.strict=n(onceStrict);once.proto=once(function(){Object.defineProperty(Function.prototype,"once",{value:function(){return once(this)},configurable:true});Object.defineProperty(Function.prototype,"onceStrict",{value:function(){return onceStrict(this)},configurable:true})});function once(e){var t=function(){if(t.called)return t.value;t.called=true;return t.value=e.apply(this,arguments)};t.called=false;return t}function onceStrict(e){var t=function(){if(t.called)throw new Error(t.onceError);t.called=true;return t.value=e.apply(this,arguments)};var r=e.name||"Function wrapped with `once`";t.onceError=r+" shouldn't be called more than once";t.called=false;return t}},58:function(e,t,r){e.exports=FileReader;var n=r(598);var i=r(689);var o=r(953);var a={EOF:true};var s={CLOSE:true};i(FileReader,o);function FileReader(e){var t=this;if(!(t instanceof FileReader)){throw new Error("FileReader must be called as constructor.")}if(!(e.type==="Link"&&e.Link||e.type==="File"&&e.File)){throw new Error("Non-file type "+e.type)}t._buffer=[];t._bytesEmitted=0;o.call(t,e)}FileReader.prototype._getStream=function(){var e=this;var t=e._stream=n.createReadStream(e._path,e.props);if(e.props.blksize){t.bufferSize=e.props.blksize}t.on("open",e.emit.bind(e,"open"));t.on("data",function(t){e._bytesEmitted+=t.length;if(!t.length){return}else if(e._paused||e._buffer.length){e._buffer.push(t);e._read()}else e.emit("data",t)});t.on("end",function(){if(e._paused||e._buffer.length){e._buffer.push(a);e._read()}else{e.emit("end")}if(e._bytesEmitted!==e.props.size){e.error("Didn't get expected byte count\n"+"expect: "+e.props.size+"\n"+"actual: "+e._bytesEmitted)}});t.on("close",function(){if(e._paused||e._buffer.length){e._buffer.push(s);e._read()}else{e.emit("close")}});t.on("error",function(t){e.emit("error",t)});e._read()};FileReader.prototype._read=function(){var e=this;if(e._paused){return}if(!e._stream){return e._getStream()}if(e._buffer.length){var t=e._buffer;for(var r=0,n=t.length;r=260){r._swallowErrors=true;r._path="\\\\?\\"+r.path.replace(/\//g,"\\")}}r.basename=s.basename(e.path);r.dirname=s.dirname(e.path);r.linkpath=e.linkpath||null;e.parent=e.root=null;r.size=e.size;if(typeof e.mode==="string"){e.mode=parseInt(e.mode,8)}r.readable=false;r.writable=true;r._buffer=[];r.ready=false;r.filter=typeof e.filter==="function"?e.filter:null;r._stat(t)}Writer.prototype._create=function(){var e=this;n[e.props.follow?"stat":"lstat"](e._path,function(t){if(t){return e.warn("Cannot create "+e._path+"\n"+"Unsupported type: "+e.type,"ENOTSUP")}e._finish()})};Writer.prototype._stat=function(e){var t=this;var r=t.props;var i=r.follow?"stat":"lstat";var a=t._proxy||t;if(e)statCb(null,e);else n[i](t._path,statCb);function statCb(e,r){if(t.filter&&!t.filter.call(a,a,r)){t._aborted=true;t.emit("end");t.emit("close");return}if(e||!r){return create(t)}t._old=r;var n=l(r);if(n!==t.type||t.type==="File"&&r.nlink>1){return o(t._path,function(e){if(e)return t.error(e);t._old=null;create(t)})}create(t)}};function create(e){a(s.dirname(e._path),Writer.dirmode,function(t,r){if(t)return e.error(t);e._madeDir=r;return e._create()})}function endChmod(e,t,r,i,o){var a=t.mode;var s=t.follow||e.type!=="SymbolicLink"?"chmod":"lchmod";if(!n[s])return o();if(typeof a!=="number")return o();var u=r.mode&parseInt("0777",8);a=a&parseInt("0777",8);if(a===u)return o();n[s](i,a,o)}function endChown(e,t,r,i,o){if(process.platform==="win32")return o();if(!process.getuid||process.getuid()!==0)return o();if(typeof t.uid!=="number"&&typeof t.gid!=="number")return o();if(r.uid===t.uid&&r.gid===t.gid)return o();var a=e.props.follow||e.type!=="SymbolicLink"?"chown":"lchown";if(!n[a])return o();if(typeof t.uid!=="number")t.uid=r.uid;if(typeof t.gid!=="number")t.gid=r.gid;n[a](i,t.uid,t.gid,o)}function endUtimes(e,t,r,i,o){if(!n.utimes||process.platform==="win32")return o();var a=t.follow||e.type!=="SymbolicLink"?"utimes":"lutimes";if(a==="lutimes"&&!n[a]){a="utimes"}if(!n[a])return o();var s=r.atime;var u=r.mtime;var l=t.atime;var c=t.mtime;if(l===undefined)l=s;if(c===undefined)c=u;if(!isDate(l))l=new Date(l);if(!isDate(c))l=new Date(c);if(l.getTime()===s.getTime()&&c.getTime()===u.getTime())return o();n[a](i,l,c,o)}Writer.prototype._finish=function(){var e=this;if(e._finishing)return;e._finishing=true;var t=0;var r=null;var i=false;if(e._old){e._old.atime=new Date(0);e._old.mtime=new Date(0);setProps(e._old)}else{var o=e.props.follow?"stat":"lstat";n[o](e._path,function(t,r){if(t){if(t.code==="ENOENT"&&(e.type==="Link"||e.type==="SymbolicLink")&&process.platform==="win32"){e.ready=true;e.emit("ready");e.emit("end");e.emit("close");e.end=e._finish=function(){};return}else return e.error(t)}setProps(e._old=r)})}return;function setProps(r){t+=3;endChmod(e,e.props,r,e._path,next("chmod"));endChown(e,e.props,r,e._path,next("chown"));endUtimes(e,e.props,r,e._path,next("utimes"))}function next(n){return function(o){if(r)return;if(o){o.fstream_finish_call=n;return e.error(r=o)}if(--t>0)return;if(i)return;i=true;if(!e._madeDir)return end();else endMadeDir(e,e._path,end);function end(t){if(t){t.fstream_finish_call="setupMadeDir";return e.error(t)}e.emit("end");e.emit("close")}}}};function endMadeDir(e,t,r){var n=e._madeDir;var i=s.dirname(t);endMadeDir_(e,i,function(t){if(t)return r(t);if(i===n){return r()}endMadeDir(e,i,r)})}function endMadeDir_(e,t,r){var i={};Object.keys(e.props).forEach(function(t){i[t]=e.props[t];if(t==="mode"&&e.type!=="Directory"){i[t]=i[t]|parseInt("0111",8)}});var o=3;var a=null;n.stat(t,function(n,o){if(n)return r(a=n);endChmod(e,i,o,t,next);endChown(e,i,o,t,next);endUtimes(e,i,o,t,next)});function next(e){if(a)return;if(e)return r(a=e);if(--o===0)return r()}}Writer.prototype.pipe=function(){this.error("Can't pipe from writable stream")};Writer.prototype.add=function(){this.error("Can't add to non-Directory type")};Writer.prototype.write=function(){return true};function objectToString(e){return Object.prototype.toString.call(e)}function isDate(e){return typeof e==="object"&&objectToString(e)==="[object Date]"}},87:function(e){e.exports=require("os")},93:function(e,t,r){var n=r(794).Stream;e.exports=legacy;function legacy(e){return{ReadStream:ReadStream,WriteStream:WriteStream};function ReadStream(t,r){if(!(this instanceof ReadStream))return new ReadStream(t,r);n.call(this);var i=this;this.path=t;this.fd=null;this.readable=true;this.paused=false;this.flags="r";this.mode=438;this.bufferSize=64*1024;r=r||{};var o=Object.keys(r);for(var a=0,s=o.length;athis.end){throw new Error("start must be <= end")}this.pos=this.start}if(this.fd!==null){process.nextTick(function(){i._read()});return}e.open(this.path,this.flags,this.mode,function(e,t){if(e){i.emit("error",e);i.readable=false;return}i.fd=t;i.emit("open",t);i._read()})}function WriteStream(t,r){if(!(this instanceof WriteStream))return new WriteStream(t,r);n.call(this);this.path=t;this.fd=null;this.writable=true;this.flags="w";this.encoding="binary";this.mode=438;this.bytesWritten=0;r=r||{};var i=Object.keys(r);for(var o=0,a=i.length;o= zero")}this.pos=this.start}this.busy=false;this._queue=[];if(this.fd===null){this._open=e.open;this._queue.push([this._open,this.path,this.flags,this.mode,undefined]);this.flush()}}}},100:function(){"use strict";if(!Buffer.prototype.indexOf){Buffer.prototype.indexOf=function(e,t){t=t||0;if(typeof e==="string"||e instanceof String){e=new Buffer(e)}else if(typeof e==="number"||e instanceof Number){e=new Buffer([e])}var r=e.length;for(var n=t;n<=this.length-r;n++){var i=false;for(var o=0;o=0;n--){var i=false;for(var o=0;o=e.length){if(t)t[a]=e;return r(null,e)}u.lastIndex=f;var n=u.exec(e);d=p;p+=n[0];h=d+n[1];f=u.lastIndex;if(c[h]||t&&t[h]===h){return process.nextTick(LOOP)}if(t&&Object.prototype.hasOwnProperty.call(t,h)){return gotResolvedLink(t[h])}return o.lstat(h,gotStat)}function gotStat(e,n){if(e)return r(e);if(!n.isSymbolicLink()){c[h]=true;if(t)t[h]=h;return process.nextTick(LOOP)}if(!i){var a=n.dev.toString(32)+":"+n.ino.toString(32);if(s.hasOwnProperty(a)){return gotTarget(null,s[a],h)}}o.stat(h,function(e){if(e)return r(e);o.readlink(h,function(e,t){if(!i)s[a]=t;gotTarget(e,t)})})}function gotTarget(e,i,o){if(e)return r(e);var a=n.resolve(d,i);if(t)t[o]=a;gotResolvedLink(a)}function gotResolvedLink(t){e=n.resolve(t,e.slice(f));start()}}},129:function(e){e.exports=require("child_process")},131:function(e,t,r){"use strict";var n=this&&this.__awaiter||function(e,t,r,n){function adopt(e){return e instanceof r?e:new r(function(t){t(e)})}return new(r||(r=Promise))(function(r,i){function fulfilled(e){try{step(n.next(e))}catch(e){i(e)}}function rejected(e){try{step(n["throw"](e))}catch(e){i(e)}}function step(e){e.done?r(e.value):adopt(e.value).then(fulfilled,rejected)}step((n=n.apply(e,t||[])).next())})};var i=this&&this.__importStar||function(e){if(e&&e.__esModule)return e;var t={};if(e!=null)for(var r in e)if(Object.hasOwnProperty.call(e,r))t[r]=e[r];t["default"]=e;return t};Object.defineProperty(t,"__esModule",{value:true});const o=i(r(470));const a=i(r(622));const s=r(982);const u=i(r(169));const l=i(r(317));const c=i(r(286));function run(){return n(this,void 0,void 0,function*(){try{const e=process.env[`GITHUB_WORKSPACE`]||"";const t=yield u.execute(yield resolveGradleExecutable(e),resolveBuildRootDirectory(e),parseCommandLineArguments());if(t.buildScanUrl){o.setOutput("build-scan-url",t.buildScanUrl)}if(t.status!==0){o.setFailed(`Gradle process exited with status ${t.status}`)}}catch(e){o.setFailed(e.message)}})}t.run=run;run();function resolveGradleExecutable(e){return n(this,void 0,void 0,function*(){const t=inputOrNull("gradle-version");if(t!==null&&t!=="wrapper"){return a.resolve(yield c.gradleVersion(t))}const r=inputOrNull("gradle-executable");if(r!==null){return a.resolve(e,r)}const n=inputOrNull("wrapper-directory");const i=n!==null?a.join(e,n):e;return a.resolve(i,l.wrapperFilename())})}function resolveBuildRootDirectory(e){const t=inputOrNull("build-root-directory");return t===null?a.resolve(e):a.resolve(e,t)}function parseCommandLineArguments(){const e=inputOrNull("arguments");return e===null?[]:s.parseArgsStringToArgv(e)}function inputOrNull(e){const t=o.getInput(e);if(t.length===0){return null}return t}},137:function(e){e.exports=collect;function collect(e){if(e._collected)return;if(e._paused)return e.on("resume",collect.bind(null,e));e._collected=true;e.pause();e.on("data",save);e.on("end",save);var t=[];function save(e){if(typeof e==="string")e=new Buffer(e);if(Buffer.isBuffer(e)&&!e.length)return;t.push(e)}e.on("entry",saveEntry);var r=[];function saveEntry(e){collect(e);r.push(e)}e.on("proxy",proxyPause);function proxyPause(e){e.pause()}e.pipe=function(n){return function(i){var o=0;(function unblockEntry(){var t=r[o++];if(!t)return resume();t.on("end",unblockEntry);if(i)i.add(t);else e.emit("entry",t)})();function resume(){e.removeListener("entry",saveEntry);e.removeListener("data",save);e.removeListener("end",save);e.pipe=n;if(i)e.pipe(i);t.forEach(function(t){if(t)e.emit("data",t);else e.emit("end")});e.resume()}return i}}(e.pipe)}},139:function(e,t,r){var n=r(417);e.exports=function nodeRNG(){return n.randomBytes(16)}},141:function(e,t,r){"use strict";var n=r(631);var i=r(16);var o=r(605);var a=r(211);var s=r(614);var u=r(357);var l=r(669);t.httpOverHttp=httpOverHttp;t.httpsOverHttp=httpsOverHttp;t.httpOverHttps=httpOverHttps;t.httpsOverHttps=httpsOverHttps;function httpOverHttp(e){var t=new TunnelingAgent(e);t.request=o.request;return t}function httpsOverHttp(e){var t=new TunnelingAgent(e);t.request=o.request;t.createSocket=createSecureSocket;t.defaultPort=443;return t}function httpOverHttps(e){var t=new TunnelingAgent(e);t.request=a.request;return t}function httpsOverHttps(e){var t=new TunnelingAgent(e);t.request=a.request;t.createSocket=createSecureSocket;t.defaultPort=443;return t}function TunnelingAgent(e){var t=this;t.options=e||{};t.proxyOptions=t.options.proxy||{};t.maxSockets=t.options.maxSockets||o.Agent.defaultMaxSockets;t.requests=[];t.sockets=[];t.on("free",function onFree(e,r,n,i){var o=toOptions(r,n,i);for(var a=0,s=t.requests.length;a=this.maxSockets){i.requests.push(o);return}i.createSocket(o,function(t){t.on("free",onFree);t.on("close",onCloseOrRemove);t.on("agentRemove",onCloseOrRemove);e.onSocket(t);function onFree(){i.emit("free",t,o)}function onCloseOrRemove(e){i.removeSocket(t);t.removeListener("free",onFree);t.removeListener("close",onCloseOrRemove);t.removeListener("agentRemove",onCloseOrRemove)}})};TunnelingAgent.prototype.createSocket=function createSocket(e,t){var r=this;var n={};r.sockets.push(n);var i=mergeOptions({},r.proxyOptions,{method:"CONNECT",path:e.host+":"+e.port,agent:false,headers:{host:e.host+":"+e.port}});if(e.localAddress){i.localAddress=e.localAddress}if(i.proxyAuth){i.headers=i.headers||{};i.headers["Proxy-Authorization"]="Basic "+new Buffer(i.proxyAuth).toString("base64")}c("making CONNECT request");var o=r.request(i);o.useChunkedEncodingByDefault=false;o.once("response",onResponse);o.once("upgrade",onUpgrade);o.once("connect",onConnect);o.once("error",onError);o.end();function onResponse(e){e.upgrade=true}function onUpgrade(e,t,r){process.nextTick(function(){onConnect(e,t,r)})}function onConnect(i,a,s){o.removeAllListeners();a.removeAllListeners();if(i.statusCode!==200){c("tunneling socket could not be established, statusCode=%d",i.statusCode);a.destroy();var u=new Error("tunneling socket could not be established, "+"statusCode="+i.statusCode);u.code="ECONNRESET";e.request.emit("error",u);r.removeSocket(n);return}if(s.length>0){c("got illegal response body from proxy");a.destroy();var u=new Error("got illegal response body from proxy");u.code="ECONNRESET";e.request.emit("error",u);r.removeSocket(n);return}c("tunneling connection has established");r.sockets[r.sockets.indexOf(n)]=a;return t(a)}function onError(t){o.removeAllListeners();c("tunneling socket could not be established, cause=%s\n",t.message,t.stack);var i=new Error("tunneling socket could not be established, "+"cause="+t.message);i.code="ECONNRESET";e.request.emit("error",i);r.removeSocket(n)}};TunnelingAgent.prototype.removeSocket=function removeSocket(e){var t=this.sockets.indexOf(e);if(t===-1){return}this.sockets.splice(t,1);var r=this.requests.shift();if(r){this.createSocket(r,function(e){r.request.onSocket(e)})}};function createSecureSocket(e,t){var r=this;TunnelingAgent.prototype.createSocket.call(r,e,function(n){var o=e.request.getHeader("host");var a=mergeOptions({},r.options,{socket:n,servername:o?o.replace(/:.*$/,""):e.host});var s=i.connect(0,a);r.sockets[r.sockets.indexOf(n)]=s;t(s)})}function toOptions(e,t,r){if(typeof e==="string"){return{host:e,port:t,localAddress:r}}return e}function mergeOptions(e){for(var t=1,r=arguments.length;t=this._length){this._resolve(this._values);return true}return false};SettledPromiseArray.prototype._promiseFulfilled=function(e,t){var r=new i;r._bitField=33554432;r._settledValueField=e;return this._promiseResolved(t,r)};SettledPromiseArray.prototype._promiseRejected=function(e,t){var r=new i;r._bitField=16777216;r._settledValueField=e;return this._promiseResolved(t,r)};e.settle=function(e){n.deprecated(".settle()",".reflect()");return new SettledPromiseArray(e).promise()};e.prototype.settle=function(){return e.settle(this)}}},169:function(e,t,r){"use strict";var n=this&&this.__awaiter||function(e,t,r,n){function adopt(e){return e instanceof r?e:new r(function(t){t(e)})}return new(r||(r=Promise))(function(r,i){function fulfilled(e){try{step(n.next(e))}catch(e){i(e)}}function rejected(e){try{step(n["throw"](e))}catch(e){i(e)}}function step(e){e.done?r(e.value):adopt(e.value).then(fulfilled,rejected)}step((n=n.apply(e,t||[])).next())})};var i=this&&this.__importStar||function(e){if(e&&e.__esModule)return e;var t={};if(e!=null)for(var r in e)if(Object.hasOwnProperty.call(e,r))t[r]=e[r];t["default"]=e;return t};Object.defineProperty(t,"__esModule",{value:true});const o=i(r(986));function execute(e,t,r){return n(this,void 0,void 0,function*(){let n=false;let i;const a=yield o.exec(e,r,{cwd:t,ignoreReturnCode:true,listeners:{stdline:e=>{if(e.startsWith("Publishing build scan...")){n=true}if(n&&e.length===0){n=false}if(n&&e.startsWith("http")){i=e.trim();n=false}}}});return new BuildResultImpl(a,i)})}t.execute=execute;class BuildResultImpl{constructor(e,t){this.status=e;this.buildScanUrl=t}}},194:function(e,t,r){var n=r(440);var i=r(225);var o=r(887);var a=r(794);var s=r(479);var u=r(761);var l=r(474);var c=r(657);var f=r(287);if(!a.Writable||!a.Writable.prototype.destroy)a=r(574);e.exports=function unzip(e,t,r,p){var h=o(),d=a.PassThrough();var v=e.stream(t);v.pipe(h).on("error",function(e){d.emit("error",e)});d.vars=h.pull(30).then(function(e){var t=s.parse(e).word32lu("signature").word16lu("versionsNeededToExtract").word16lu("flags").word16lu("compressionMethod").word16lu("lastModifiedTime").word16lu("lastModifiedDate").word32lu("crc32").word32lu("compressedSize").word32lu("uncompressedSize").word16lu("fileNameLength").word16lu("extraFieldLength").vars;t.lastModifiedDateTime=f(t.lastModifiedDate,t.lastModifiedTime);return h.pull(t.fileNameLength).then(function(e){t.fileName=e.toString("utf8");return h.pull(t.extraFieldLength)}).then(function(e){var o;t.extra=l(e,t);if(p&&p.compressedSize)t=p;if(t.flags&1)o=h.pull(12).then(function(e){if(!r)throw new Error("MISSING_PASSWORD");var n=i();String(r).split("").forEach(function(e){n.update(e)});for(var o=0;o>8&255:t.crc32>>24&255;if(e[11]!==a)throw new Error("BAD_PASSWORD");return t});return n.resolve(o).then(function(){d.emit("vars",t);return t})})});d.vars.then(function(e){var t=!(e.flags&8)||e.compressedSize>0,r;var n=e.compressionMethod?u.createInflateRaw():a.PassThrough();if(t){d.size=e.uncompressedSize;r=e.compressedSize}else{r=c.alloc(4);r.writeUInt32LE(134695760,0)}var i=h.stream(r);if(e.decrypt)i=i.pipe(e.decrypt.stream());i.pipe(n).on("error",function(e){d.emit("error",e)}).pipe(d).on("finish",function(){if(v.abort)v.abort();else if(v.close)v.close();else if(v.push)v.push();else console.log("warning - unable to close stream")})}).catch(function(e){d.emit("error",e)});return d}},211:function(e){e.exports=require("https")},220:function(e,t,r){"use strict";e.exports=function(e,t,n,i,o,a){var s=e._getDomain;var u=r(248);var l=u.tryCatch;var c=u.errorObj;var f=e._async;function MappingPromiseArray(e,t,r,n){this.constructor$(e);this._promise._captureStackTrace();var i=s();this._callback=i===null?t:u.domainBind(i,t);this._preservedValues=n===o?new Array(this.length()):null;this._limit=r;this._inFlight=0;this._queue=[];f.invoke(this._asyncInit,this,undefined)}u.inherits(MappingPromiseArray,t);MappingPromiseArray.prototype._asyncInit=function(){this._init$(undefined,-2)};MappingPromiseArray.prototype._init=function(){};MappingPromiseArray.prototype._promiseFulfilled=function(t,r){var n=this._values;var o=this.length();var s=this._preservedValues;var u=this._limit;if(r<0){r=r*-1-1;n[r]=t;if(u>=1){this._inFlight--;this._drainQueue();if(this._isResolved())return true}}else{if(u>=1&&this._inFlight>=u){n[r]=t;this._queue.push(r);return false}if(s!==null)s[r]=t;var f=this._promise;var p=this._callback;var h=f._boundValue();f._pushContext();var d=l(p).call(h,t,r,o);var v=f._popContext();a.checkForgottenReturns(d,v,s!==null?"Promise.filter":"Promise.map",f);if(d===c){this._reject(d.e);return true}var y=i(d,this._promise);if(y instanceof e){y=y._target();var g=y._bitField;if((g&50397184)===0){if(u>=1)this._inFlight++;n[r]=y;y._proxy(this,(r+1)*-1);return false}else if((g&33554432)!==0){d=y._value()}else if((g&16777216)!==0){this._reject(y._reason());return true}else{this._cancel();return true}}n[r]=d}var m=++this._totalResolved;if(m>=o){if(s!==null){this._filter(n,s)}else{this._resolve(n)}return true}return false};MappingPromiseArray.prototype._drainQueue=function(){var e=this._queue;var t=this._limit;var r=this._values;while(e.length>0&&this._inFlight=1?a:0;return new MappingPromiseArray(t,r,a,o).promise()}e.prototype.map=function(e,t){return map(this,e,t,null)};e.map=function(e,t,r,n){return map(e,t,r,n)}}},225:function(e,t,r){var n=r(965);var i=r(794);if(!i.Writable||!i.Writable.prototype.destroy)i=r(574);var o;function generateTable(){var e=3988292384,t,r,n;o=[];for(r=0;r<256;r++){t=r;for(n=0;n<8;n++)t=t&1?e^t>>>1:t=t>>>1;o[r]=t>>>0}}function crc(e,t){if(!o)generateTable();if(e.charCodeAt)e=e.charCodeAt(0);return n(t).shiftRight(8).and(16777215).xor(o[n(t).xor(e).and(255)]).value}function Decrypt(){if(!(this instanceof Decrypt))return new Decrypt;this.key0=305419896;this.key1=591751049;this.key2=878082192}Decrypt.prototype.update=function(e){this.key0=crc(e,this.key0);this.key1=n(this.key0).and(255).and(4294967295).add(this.key1);this.key1=n(this.key1).multiply(134775813).add(1).and(4294967295).value;this.key2=crc(n(this.key1).shiftRight(24).and(255),this.key2)};Decrypt.prototype.decryptByte=function(e){var t=n(this.key2).or(2);e=e^n(t).multiply(n(t^1)).shiftRight(8).and(255);this.update(e);return e};Decrypt.prototype.stream=function(){var e=i.Transform(),t=this;e._transform=function(e,r,n){for(var i=0;i0){if(typeof t!=="string"&&!o.objectMode&&Object.getPrototypeOf(t)!==l.prototype){t=_uint8ArrayToBuffer(t)}if(n){if(o.endEmitted)e.emit("error",new Error("stream.unshift() after end event"));else addChunk(e,o,t,true)}else if(o.ended){e.emit("error",new Error("stream.push() after EOF"))}else{o.reading=false;if(o.decoder&&!r){t=o.decoder.write(t);if(o.objectMode||t.length!==0)addChunk(e,o,t,false);else maybeReadMore(e,o)}else{addChunk(e,o,t,false)}}}else if(!n){o.reading=false}}return needMoreData(o)}function addChunk(e,t,r,n){if(t.flowing&&t.length===0&&!t.sync){e.emit("data",r);e.read(0)}else{t.length+=t.objectMode?1:r.length;if(n)t.buffer.unshift(r);else t.buffer.push(r);if(t.needReadable)emitReadable(e)}maybeReadMore(e,t)}function chunkInvalid(e,t){var r;if(!_isUint8Array(t)&&typeof t!=="string"&&t!==undefined&&!e.objectMode){r=new TypeError("Invalid non-string/buffer chunk")}return r}function needMoreData(e){return!e.ended&&(e.needReadable||e.length=m){e=m}else{e--;e|=e>>>1;e|=e>>>2;e|=e>>>4;e|=e>>>8;e|=e>>>16;e++}return e}function howMuchToRead(e,t){if(e<=0||t.length===0&&t.ended)return 0;if(t.objectMode)return 1;if(e!==e){if(t.flowing&&t.length)return t.buffer.head.data.length;else return t.length}if(e>t.highWaterMark)t.highWaterMark=computeNewHighWaterMark(e);if(e<=t.length)return e;if(!t.ended){t.needReadable=true;return 0}return t.length}Readable.prototype.read=function(e){h("read",e);e=parseInt(e,10);var t=this._readableState;var r=e;if(e!==0)t.emittedReadable=false;if(e===0&&t.needReadable&&(t.length>=t.highWaterMark||t.ended)){h("read: emitReadable",t.length,t.ended);if(t.length===0&&t.ended)endReadable(this);else emitReadable(this);return null}e=howMuchToRead(e,t);if(e===0&&t.ended){if(t.length===0)endReadable(this);return null}var n=t.needReadable;h("need readable",n);if(t.length===0||t.length-e0)i=fromList(e,t);else i=null;if(i===null){t.needReadable=true;e=0}else{t.length-=e}if(t.length===0){if(!t.ended)t.needReadable=true;if(r!==e&&t.ended)endReadable(this)}if(i!==null)this.emit("data",i);return i};function onEofChunk(e,t){if(t.ended)return;if(t.decoder){var r=t.decoder.end();if(r&&r.length){t.buffer.push(r);t.length+=t.objectMode?1:r.length}}t.ended=true;emitReadable(e)}function emitReadable(e){var t=e._readableState;t.needReadable=false;if(!t.emittedReadable){h("emitReadable",t.flowing);t.emittedReadable=true;if(t.sync)n.nextTick(emitReadable_,e);else emitReadable_(e)}}function emitReadable_(e){h("emit readable");e.emit("readable");flow(e)}function maybeReadMore(e,t){if(!t.readingMore){t.readingMore=true;n.nextTick(maybeReadMore_,e,t)}}function maybeReadMore_(e,t){var r=t.length;while(!t.reading&&!t.flowing&&!t.ended&&t.length1&&indexOf(i.pipes,e)!==-1)&&!l){h("false write response, pause",r._readableState.awaitDrain);r._readableState.awaitDrain++;c=true}r.pause()}}function onerror(t){h("onerror",t);unpipe();e.removeListener("error",onerror);if(s(e,"error")===0)e.emit("error",t)}prependListener(e,"error",onerror);function onclose(){e.removeListener("finish",onfinish);unpipe()}e.once("close",onclose);function onfinish(){h("onfinish");e.removeListener("close",onclose);unpipe()}e.once("finish",onfinish);function unpipe(){h("unpipe");r.unpipe(e)}e.emit("pipe",r);if(!i.flowing){h("pipe resume");r.resume()}return e};function pipeOnDrain(e){return function(){var t=e._readableState;h("pipeOnDrain",t.awaitDrain);if(t.awaitDrain)t.awaitDrain--;if(t.awaitDrain===0&&s(e,"data")){t.flowing=true;flow(e)}}}Readable.prototype.unpipe=function(e){var t=this._readableState;var r={hasUnpiped:false};if(t.pipesCount===0)return this;if(t.pipesCount===1){if(e&&e!==t.pipes)return this;if(!e)e=t.pipes;t.pipes=null;t.pipesCount=0;t.flowing=false;if(e)e.emit("unpipe",this,r);return this}if(!e){var n=t.pipes;var i=t.pipesCount;t.pipes=null;t.pipesCount=0;t.flowing=false;for(var o=0;o=t.length){if(t.decoder)r=t.buffer.join("");else if(t.buffer.length===1)r=t.buffer.head.data;else r=t.buffer.concat(t.length);t.buffer.clear()}else{r=fromListPartial(e,t.buffer,t.decoder)}return r}function fromListPartial(e,t,r){var n;if(eo.length?o.length:e;if(a===o.length)i+=o;else i+=o.slice(0,e);e-=a;if(e===0){if(a===o.length){++n;if(r.next)t.head=r.next;else t.head=t.tail=null}else{t.head=r;r.data=o.slice(a)}break}++n}t.length-=n;return i}function copyFromBuffer(e,t){var r=l.allocUnsafe(e);var n=t.head;var i=1;n.data.copy(r);e-=n.data.length;while(n=n.next){var o=n.data;var a=e>o.length?o.length:e;o.copy(r,r.length-e,0,a);e-=a;if(e===0){if(a===o.length){++i;if(n.next)t.head=n.next;else t.head=t.tail=null}else{t.head=n;n.data=o.slice(a)}break}++i}t.length-=i;return r}function endReadable(e){var t=e._readableState;if(t.length>0)throw new Error('"endReadable()" called on non-empty stream');if(!t.endEmitted){t.ended=true;n.nextTick(endReadableNT,t,e)}}function endReadableNT(e,t){if(!e.endEmitted&&e.length===0){e.endEmitted=true;t.readable=false;t.emit("end")}}function indexOf(e,t){for(var r=0,n=e.length;r-1?setImmediate:n.nextTick;var o;Writable.WritableState=WritableState;var a=Object.create(r(143));a.inherits=r(689);var s={deprecate:r(917)};var u=r(427);var l=r(608).Buffer;var c=global.Uint8Array||function(){};function _uint8ArrayToBuffer(e){return l.from(e)}function _isUint8Array(e){return l.isBuffer(e)||e instanceof c}var f=r(232);a.inherits(Writable,u);function nop(){}function WritableState(e,t){o=o||r(831);e=e||{};var n=t instanceof o;this.objectMode=!!e.objectMode;if(n)this.objectMode=this.objectMode||!!e.writableObjectMode;var i=e.highWaterMark;var a=e.writableHighWaterMark;var s=this.objectMode?16:16*1024;if(i||i===0)this.highWaterMark=i;else if(n&&(a||a===0))this.highWaterMark=a;else this.highWaterMark=s;this.highWaterMark=Math.floor(this.highWaterMark);this.finalCalled=false;this.needDrain=false;this.ending=false;this.ended=false;this.finished=false;this.destroyed=false;var u=e.decodeStrings===false;this.decodeStrings=!u;this.defaultEncoding=e.defaultEncoding||"utf8";this.length=0;this.writing=false;this.corked=0;this.sync=true;this.bufferProcessing=false;this.onwrite=function(e){onwrite(t,e)};this.writecb=null;this.writelen=0;this.bufferedRequest=null;this.lastBufferedRequest=null;this.pendingcb=0;this.prefinished=false;this.errorEmitted=false;this.bufferedRequestCount=0;this.corkedRequestsFree=new CorkedRequest(this)}WritableState.prototype.getBuffer=function getBuffer(){var e=this.bufferedRequest;var t=[];while(e){t.push(e);e=e.next}return t};(function(){try{Object.defineProperty(WritableState.prototype,"buffer",{get:s.deprecate(function(){return this.getBuffer()},"_writableState.buffer is deprecated. Use _writableState.getBuffer "+"instead.","DEP0003")})}catch(e){}})();var p;if(typeof Symbol==="function"&&Symbol.hasInstance&&typeof Function.prototype[Symbol.hasInstance]==="function"){p=Function.prototype[Symbol.hasInstance];Object.defineProperty(Writable,Symbol.hasInstance,{value:function(e){if(p.call(this,e))return true;if(this!==Writable)return false;return e&&e._writableState instanceof WritableState}})}else{p=function(e){return e instanceof this}}function Writable(e){o=o||r(831);if(!p.call(Writable,this)&&!(this instanceof o)){return new Writable(e)}this._writableState=new WritableState(e,this);this.writable=true;if(e){if(typeof e.write==="function")this._write=e.write;if(typeof e.writev==="function")this._writev=e.writev;if(typeof e.destroy==="function")this._destroy=e.destroy;if(typeof e.final==="function")this._final=e.final}u.call(this)}Writable.prototype.pipe=function(){this.emit("error",new Error("Cannot pipe, not readable"))};function writeAfterEnd(e,t){var r=new Error("write after end");e.emit("error",r);n.nextTick(t,r)}function validChunk(e,t,r,i){var o=true;var a=false;if(r===null){a=new TypeError("May not write null values to stream")}else if(typeof r!=="string"&&r!==undefined&&!t.objectMode){a=new TypeError("Invalid non-string/buffer chunk")}if(a){e.emit("error",a);n.nextTick(i,a);o=false}return o}Writable.prototype.write=function(e,t,r){var n=this._writableState;var i=false;var o=!n.objectMode&&_isUint8Array(e);if(o&&!l.isBuffer(e)){e=_uint8ArrayToBuffer(e)}if(typeof t==="function"){r=t;t=null}if(o)t="buffer";else if(!t)t=n.defaultEncoding;if(typeof r!=="function")r=nop;if(n.ended)writeAfterEnd(this,r);else if(o||validChunk(this,n,e,r)){n.pendingcb++;i=writeOrBuffer(this,n,o,e,t,r)}return i};Writable.prototype.cork=function(){var e=this._writableState;e.corked++};Writable.prototype.uncork=function(){var e=this._writableState;if(e.corked){e.corked--;if(!e.writing&&!e.corked&&!e.finished&&!e.bufferProcessing&&e.bufferedRequest)clearBuffer(this,e)}};Writable.prototype.setDefaultEncoding=function setDefaultEncoding(e){if(typeof e==="string")e=e.toLowerCase();if(!(["hex","utf8","utf-8","ascii","binary","base64","ucs2","ucs-2","utf16le","utf-16le","raw"].indexOf((e+"").toLowerCase())>-1))throw new TypeError("Unknown encoding: "+e);this._writableState.defaultEncoding=e;return this};function decodeChunk(e,t,r){if(!e.objectMode&&e.decodeStrings!==false&&typeof t==="string"){t=l.from(t,r)}return t}Object.defineProperty(Writable.prototype,"writableHighWaterMark",{enumerable:false,get:function(){return this._writableState.highWaterMark}});function writeOrBuffer(e,t,r,n,i,o){if(!r){var a=decodeChunk(t,n,i);if(n!==a){r=true;i="buffer";n=a}}var s=t.objectMode?1:n.length;t.length+=s;var u=t.lengththis.maxLength)return false;if(!this.stat&&y(this.cache,t)){var i=this.cache[t];if(Array.isArray(i))i="DIR";if(!r||i==="DIR")return i;if(r&&i==="FILE")return false}var o;var a=this.statCache[t];if(!a){var s;try{s=n.lstatSync(t)}catch(e){if(e&&(e.code==="ENOENT"||e.code==="ENOTDIR")){this.statCache[t]=false;return false}}if(s&&s.isSymbolicLink()){try{a=n.statSync(t)}catch(e){a=s}}else{a=s}}this.statCache[t]=a;var i=true;if(a)i=a.isDirectory()?"DIR":"FILE";this.cache[t]=this.cache[t]||i;if(r&&i==="FILE")return false;return i};GlobSync.prototype._mark=function(e){return p.mark(this,e)};GlobSync.prototype._makeAbs=function(e){return p.makeAbs(this,e)}},246:function(e,t,r){"use strict";e.exports=function(e,t,n,i,o){var a=r(248);var s=a.isArray;function toResolutionValue(e){switch(e){case-2:return[];case-3:return{}}}function PromiseArray(r){var n=this._promise=new e(t);if(r instanceof e){n._propagateFrom(r,3)}n._setOnCancel(this);this._values=r;this._length=0;this._totalResolved=0;this._init(undefined,-2)}a.inherits(PromiseArray,o);PromiseArray.prototype.length=function(){return this._length};PromiseArray.prototype.promise=function(){return this._promise};PromiseArray.prototype._init=function init(t,r){var o=n(this._values,this._promise);if(o instanceof e){o=o._target();var s=o._bitField;this._values=o;if((s&50397184)===0){this._promise._setAsyncGuaranteed();return o._then(init,this._reject,undefined,this,r)}else if((s&33554432)!==0){o=o._value()}else if((s&16777216)!==0){return this._reject(o._reason())}else{return this._cancel()}}o=a.asArray(o);if(o===null){var u=i("expecting an array or an iterable object but got "+a.classString(o)).reason();this._promise._rejectCallback(u,false);return}if(o.length===0){if(r===-5){this._resolveEmptyArray()}else{this._resolve(toResolutionValue(r))}return}this._iterate(o)};PromiseArray.prototype._iterate=function(t){var r=this.getActualLength(t.length);this._length=r;this._values=this.shouldCopyValues()?new Array(r):this._values;var i=this._promise;var o=false;var a=null;for(var s=0;s=this._length){this._resolve(this._values);return true}return false};PromiseArray.prototype._promiseCancelled=function(){this._cancel();return true};PromiseArray.prototype._promiseRejected=function(e){this._totalResolved++;this._reject(e);return true};PromiseArray.prototype._resultCancelled=function(){if(this._isResolved())return;var t=this._values;this._cancel();if(t instanceof e){t.cancel()}else{for(var r=0;r1;var n=t.length>0&&!(t.length===1&&t[0]==="constructor");var i=thisAssignmentPattern.test(e+"")&&es5.names(e).length>0;if(r||n||i){return true}}return false}catch(e){return false}}function toFastProperties(obj){function FakeConstructor(){}FakeConstructor.prototype=obj;var l=8;while(l--)new FakeConstructor;return obj;eval(obj)}var rident=/^[a-z$_][a-z$_0-9]*$/i;function isIdentifier(e){return rident.test(e)}function filledRange(e,t,r){var n=new Array(e);for(var i=0;i10||e[0]>0}();if(ret.isNode)ret.toFastProperties(process);try{throw new Error}catch(e){ret.lastLineError=e}module.exports=ret},250:function(e,t,r){var n=r(619);var i=process.cwd;var o=null;var a=process.env.GRACEFUL_FS_PLATFORM||process.platform;process.cwd=function(){if(!o)o=i.call(process);return o};try{process.cwd()}catch(e){}var s=process.chdir;process.chdir=function(e){o=null;s.call(process,e)};e.exports=patch;function patch(e){if(n.hasOwnProperty("O_SYMLINK")&&process.version.match(/^v0\.6\.[0-2]|^v0\.5\./)){patchLchmod(e)}if(!e.lutimes){patchLutimes(e)}e.chown=chownFix(e.chown);e.fchown=chownFix(e.fchown);e.lchown=chownFix(e.lchown);e.chmod=chmodFix(e.chmod);e.fchmod=chmodFix(e.fchmod);e.lchmod=chmodFix(e.lchmod);e.chownSync=chownFixSync(e.chownSync);e.fchownSync=chownFixSync(e.fchownSync);e.lchownSync=chownFixSync(e.lchownSync);e.chmodSync=chmodFixSync(e.chmodSync);e.fchmodSync=chmodFixSync(e.fchmodSync);e.lchmodSync=chmodFixSync(e.lchmodSync);e.stat=statFix(e.stat);e.fstat=statFix(e.fstat);e.lstat=statFix(e.lstat);e.statSync=statFixSync(e.statSync);e.fstatSync=statFixSync(e.fstatSync);e.lstatSync=statFixSync(e.lstatSync);if(!e.lchmod){e.lchmod=function(e,t,r){if(r)process.nextTick(r)};e.lchmodSync=function(){}}if(!e.lchown){e.lchown=function(e,t,r,n){if(n)process.nextTick(n)};e.lchownSync=function(){}}if(a==="win32"){e.rename=function(t){return function(r,n,i){var o=Date.now();var a=0;t(r,n,function CB(s){if(s&&(s.code==="EACCES"||s.code==="EPERM")&&Date.now()-o<6e4){setTimeout(function(){e.stat(n,function(e,o){if(e&&e.code==="ENOENT")t(r,n,CB);else i(s)})},a);if(a<100)a+=10;return}if(i)i(s)})}}(e.rename)}e.read=function(t){function read(r,n,i,o,a,s){var u;if(s&&typeof s==="function"){var l=0;u=function(c,f,p){if(c&&c.code==="EAGAIN"&&l<10){l++;return t.call(e,r,n,i,o,a,u)}s.apply(this,arguments)}}return t.call(e,r,n,i,o,a,u)}read.__proto__=t;return read}(e.read);e.readSync=function(t){return function(r,n,i,o,a){var s=0;while(true){try{return t.call(e,r,n,i,o,a)}catch(e){if(e.code==="EAGAIN"&&s<10){s++;continue}throw e}}}}(e.readSync);function patchLchmod(e){e.lchmod=function(t,r,i){e.open(t,n.O_WRONLY|n.O_SYMLINK,r,function(t,n){if(t){if(i)i(t);return}e.fchmod(n,r,function(t){e.close(n,function(e){if(i)i(t||e)})})})};e.lchmodSync=function(t,r){var i=e.openSync(t,n.O_WRONLY|n.O_SYMLINK,r);var o=true;var a;try{a=e.fchmodSync(i,r);o=false}finally{if(o){try{e.closeSync(i)}catch(e){}}else{e.closeSync(i)}}return a}}function patchLutimes(e){if(n.hasOwnProperty("O_SYMLINK")){e.lutimes=function(t,r,i,o){e.open(t,n.O_SYMLINK,function(t,n){if(t){if(o)o(t);return}e.futimes(n,r,i,function(t){e.close(n,function(e){if(o)o(t||e)})})})};e.lutimesSync=function(t,r,i){var o=e.openSync(t,n.O_SYMLINK);var a;var s=true;try{a=e.futimesSync(o,r,i);s=false}finally{if(s){try{e.closeSync(o)}catch(e){}}else{e.closeSync(o)}}return a}}else{e.lutimes=function(e,t,r,n){if(n)process.nextTick(n)};e.lutimesSync=function(){}}}function chmodFix(t){if(!t)return t;return function(r,n,i){return t.call(e,r,n,function(e){if(chownErOk(e))e=null;if(i)i.apply(this,arguments)})}}function chmodFixSync(t){if(!t)return t;return function(r,n){try{return t.call(e,r,n)}catch(e){if(!chownErOk(e))throw e}}}function chownFix(t){if(!t)return t;return function(r,n,i,o){return t.call(e,r,n,i,function(e){if(chownErOk(e))e=null;if(o)o.apply(this,arguments)})}}function chownFixSync(t){if(!t)return t;return function(r,n,i){try{return t.call(e,r,n,i)}catch(e){if(!chownErOk(e))throw e}}}function statFix(t){if(!t)return t;return function(r,n,i){if(typeof n==="function"){i=n;n=null}function callback(e,t){if(t){if(t.uid<0)t.uid+=4294967296;if(t.gid<0)t.gid+=4294967296}if(i)i.apply(this,arguments)}return n?t.call(e,r,n,callback):t.call(e,r,callback)}}function statFixSync(t){if(!t)return t;return function(r,n){var i=n?t.call(e,r,n):t.call(e,r);if(i.uid<0)i.uid+=4294967296;if(i.gid<0)i.gid+=4294967296;return i}}function chownErOk(e){if(!e)return true;if(e.code==="ENOSYS")return true;var t=!process.getuid||process.getuid()!==0;if(t){if(e.code==="EINVAL"||e.code==="EPERM")return true}return false}}},252:function(e,t,r){e.exports=DirWriter;var n=r(82);var i=r(689);var o=r(626);var a=r(622);var s=r(137);i(DirWriter,n);function DirWriter(e){var t=this;if(!(t instanceof DirWriter)){t.error("DirWriter must be called as constructor.",null,true)}if(e.type!=="Directory"||!e.Directory){t.error("Non-directory type "+e.type+" "+JSON.stringify(e),null,true)}n.call(this,e)}DirWriter.prototype._create=function(){var e=this;o(e._path,n.dirmode,function(t){if(t)return e.error(t);e.ready=true;e.emit("ready");e._process()})};DirWriter.prototype.write=function(){return true};DirWriter.prototype.end=function(){this._ended=true;this._process()};DirWriter.prototype.add=function(e){var t=this;s(e);if(!t.ready||t._currentEntry){t._buffer.push(e);return false}if(t._ended){return t.error("add after end")}t._buffer.push(e);t._process();return this._buffer.length===0};DirWriter.prototype._process=function(){var e=this;if(e._processing)return;var t=e._buffer.shift();if(!t){e.emit("drain");if(e._ended)e._finish();return}e._processing=true;e.emit("entry",t);var r=t;var i;do{i=r._path||r.path;if(i===e.root._path||i===e._path||i&&i.indexOf(e._path)===0){e._processing=false;if(t._collected)t.pipe();return e._process()}r=r.parent}while(r);var o={parent:e,root:e.root||e,type:t.type,depth:e.depth+1};i=t._path||t.path||t.props.path;if(t.parent){i=i.substr(t.parent._path.length+1)}o.path=a.join(e.path,a.join("/",i));o.filter=e.filter;Object.keys(t.props).forEach(function(e){if(!o.hasOwnProperty(e)){o[e]=t.props[e]}});var s=e._currentChild=new n(o);s.on("ready",function(){t.pipe(s);t.resume()});s.on("error",function(t){if(s._swallowErrors){e.warn(t);s.emit("end");s.emit("close")}else{e.emit("error",t)}});s.on("close",onend);var u=false;function onend(){if(u)return;u=true;e._currentChild=null;e._processing=false;e._process()}}},253:function(e,t,r){"use strict";e.exports=function(e){var t=r(248);var n=r(883).keys;var i=t.tryCatch;var o=t.errorObj;function catchFilter(r,a,s){return function(u){var l=s._boundValue();e:for(var c=0;c1){o.deprecated("calling Promise.try with more than 1 argument");var l=arguments[1];var c=arguments[2];u=a.isArray(l)?s(r).apply(c,l):s(r).call(c,l)}else{u=s(r)()}var f=n._popContext();o.checkForgottenReturns(u,f,"Promise.try",n);n._resolveFromSyncValue(u);return n};e.prototype._resolveFromSyncValue=function(e){if(e===a.errorObj){this._rejectCallback(e.e,false)}else{this._resolveCallback(e,true)}}}},272:function(e,t,r){"use strict";e.exports=function(e,t){var n=e._getDomain;var i=e._async;var o=r(607).Warning;var a=r(248);var s=a.canAttachTrace;var u;var l;var c=/[\\\/]bluebird[\\\/]js[\\\/](release|debug|instrumented)/;var f=/\((?:timers\.js):\d+:\d+\)/;var p=/[\/<\(](.+?):(\d+):(\d+)\)?\s*$/;var h=null;var d=null;var v=false;var y;var g=!!(a.env("BLUEBIRD_DEBUG")!=0&&(false||a.env("BLUEBIRD_DEBUG")||a.env("NODE_ENV")==="development"));var m=!!(a.env("BLUEBIRD_WARNINGS")!=0&&(g||a.env("BLUEBIRD_WARNINGS")));var _=!!(a.env("BLUEBIRD_LONG_STACK_TRACES")!=0&&(g||a.env("BLUEBIRD_LONG_STACK_TRACES")));var w=a.env("BLUEBIRD_W_FORGOTTEN_RETURN")!=0&&(m||!!a.env("BLUEBIRD_W_FORGOTTEN_RETURN"));e.prototype.suppressUnhandledRejections=function(){var e=this._target();e._bitField=e._bitField&~1048576|524288};e.prototype._ensurePossibleRejectionHandled=function(){if((this._bitField&524288)!==0)return;this._setRejectionIsUnhandled();i.invokeLater(this._notifyUnhandledRejection,this,undefined)};e.prototype._notifyUnhandledRejectionIsHandled=function(){fireRejectionEvent("rejectionHandled",u,undefined,this)};e.prototype._setReturnedNonUndefined=function(){this._bitField=this._bitField|268435456};e.prototype._returnedNonUndefined=function(){return(this._bitField&268435456)!==0};e.prototype._notifyUnhandledRejection=function(){if(this._isRejectionUnhandled()){var e=this._settledValue();this._setUnhandledRejectionIsNotified();fireRejectionEvent("unhandledRejection",l,e,this)}};e.prototype._setUnhandledRejectionIsNotified=function(){this._bitField=this._bitField|262144};e.prototype._unsetUnhandledRejectionIsNotified=function(){this._bitField=this._bitField&~262144};e.prototype._isUnhandledRejectionNotified=function(){return(this._bitField&262144)>0};e.prototype._setRejectionIsUnhandled=function(){this._bitField=this._bitField|1048576};e.prototype._unsetRejectionIsUnhandled=function(){this._bitField=this._bitField&~1048576;if(this._isUnhandledRejectionNotified()){this._unsetUnhandledRejectionIsNotified();this._notifyUnhandledRejectionIsHandled()}};e.prototype._isRejectionUnhandled=function(){return(this._bitField&1048576)>0};e.prototype._warn=function(e,t,r){return warn(e,t,r||this)};e.onPossiblyUnhandledRejection=function(e){var t=n();l=typeof e==="function"?t===null?e:a.domainBind(t,e):undefined};e.onUnhandledRejectionHandled=function(e){var t=n();u=typeof e==="function"?t===null?e:a.domainBind(t,e):undefined};var b=function(){};e.longStackTraces=function(){if(i.haveItemsQueued()&&!C.longStackTraces){throw new Error("cannot enable long stack traces after promises have been created\n\n See http://goo.gl/MqrFmX\n")}if(!C.longStackTraces&&longStackTracesIsSupported()){var r=e.prototype._captureStackTrace;var n=e.prototype._attachExtraTrace;C.longStackTraces=true;b=function(){if(i.haveItemsQueued()&&!C.longStackTraces){throw new Error("cannot enable long stack traces after promises have been created\n\n See http://goo.gl/MqrFmX\n")}e.prototype._captureStackTrace=r;e.prototype._attachExtraTrace=n;t.deactivateLongStackTraces();i.enableTrampoline();C.longStackTraces=false};e.prototype._captureStackTrace=longStackTracesCaptureStackTrace;e.prototype._attachExtraTrace=longStackTracesAttachExtraTrace;t.activateLongStackTraces();i.disableTrampolineIfNecessary()}};e.hasLongStackTraces=function(){return C.longStackTraces&&longStackTracesIsSupported()};var E=function(){try{if(typeof CustomEvent==="function"){var e=new CustomEvent("CustomEvent");a.global.dispatchEvent(e);return function(e,t){var r=new CustomEvent(e.toLowerCase(),{detail:t,cancelable:true});return!a.global.dispatchEvent(r)}}else if(typeof Event==="function"){var e=new Event("CustomEvent");a.global.dispatchEvent(e);return function(e,t){var r=new Event(e.toLowerCase(),{cancelable:true});r.detail=t;return!a.global.dispatchEvent(r)}}else{var e=document.createEvent("CustomEvent");e.initCustomEvent("testingtheevent",false,true,{});a.global.dispatchEvent(e);return function(e,t){var r=document.createEvent("CustomEvent");r.initCustomEvent(e.toLowerCase(),false,true,t);return!a.global.dispatchEvent(r)}}}catch(e){}return function(){return false}}();var S=function(){if(a.isNode){return function(){return process.emit.apply(process,arguments)}}else{if(!a.global){return function(){return false}}return function(e){var t="on"+e.toLowerCase();var r=a.global[t];if(!r)return false;r.apply(a.global,[].slice.call(arguments,1));return true}}}();function generatePromiseLifecycleEventObject(e,t){return{promise:t}}var R={promiseCreated:generatePromiseLifecycleEventObject,promiseFulfilled:generatePromiseLifecycleEventObject,promiseRejected:generatePromiseLifecycleEventObject,promiseResolved:generatePromiseLifecycleEventObject,promiseCancelled:generatePromiseLifecycleEventObject,promiseChained:function(e,t,r){return{promise:t,child:r}},warning:function(e,t){return{warning:t}},unhandledRejection:function(e,t,r){return{reason:t,promise:r}},rejectionHandled:generatePromiseLifecycleEventObject};var O=function(e){var t=false;try{t=S.apply(null,arguments)}catch(e){i.throwLater(e);t=true}var r=false;try{r=E(e,R[e].apply(null,arguments))}catch(e){i.throwLater(e);r=true}return r||t};e.config=function(t){t=Object(t);if("longStackTraces"in t){if(t.longStackTraces){e.longStackTraces()}else if(!t.longStackTraces&&e.hasLongStackTraces()){b()}}if("warnings"in t){var r=t.warnings;C.warnings=!!r;w=C.warnings;if(a.isObject(r)){if("wForgottenReturn"in r){w=!!r.wForgottenReturn}}}if("cancellation"in t&&t.cancellation&&!C.cancellation){if(i.haveItemsQueued()){throw new Error("cannot enable cancellation after promises are in use")}e.prototype._clearCancellationData=cancellationClearCancellationData;e.prototype._propagateFrom=cancellationPropagateFrom;e.prototype._onCancel=cancellationOnCancel;e.prototype._setOnCancel=cancellationSetOnCancel;e.prototype._attachCancellationCallback=cancellationAttachCancellationCallback;e.prototype._execute=cancellationExecute;T=cancellationPropagateFrom;C.cancellation=true}if("monitoring"in t){if(t.monitoring&&!C.monitoring){C.monitoring=true;e.prototype._fireEvent=O}else if(!t.monitoring&&C.monitoring){C.monitoring=false;e.prototype._fireEvent=defaultFireEvent}}return e};function defaultFireEvent(){return false}e.prototype._fireEvent=defaultFireEvent;e.prototype._execute=function(e,t,r){try{e(t,r)}catch(e){return e}};e.prototype._onCancel=function(){};e.prototype._setOnCancel=function(e){};e.prototype._attachCancellationCallback=function(e){};e.prototype._captureStackTrace=function(){};e.prototype._attachExtraTrace=function(){};e.prototype._clearCancellationData=function(){};e.prototype._propagateFrom=function(e,t){};function cancellationExecute(e,t,r){var n=this;try{e(t,r,function(e){if(typeof e!=="function"){throw new TypeError("onCancel must be a function, got: "+a.toString(e))}n._attachCancellationCallback(e)})}catch(e){return e}}function cancellationAttachCancellationCallback(e){if(!this._isCancellable())return this;var t=this._onCancel();if(t!==undefined){if(a.isArray(t)){t.push(e)}else{this._setOnCancel([t,e])}}else{this._setOnCancel(e)}}function cancellationOnCancel(){return this._onCancelField}function cancellationSetOnCancel(e){this._onCancelField=e}function cancellationClearCancellationData(){this._cancellationParent=undefined;this._onCancelField=undefined}function cancellationPropagateFrom(e,t){if((t&1)!==0){this._cancellationParent=e;var r=e._branchesRemainingToCancel;if(r===undefined){r=0}e._branchesRemainingToCancel=r+1}if((t&2)!==0&&e._isBound()){this._setBoundTo(e._boundTo)}}function bindingPropagateFrom(e,t){if((t&2)!==0&&e._isBound()){this._setBoundTo(e._boundTo)}}var T=bindingPropagateFrom;function boundValueFunction(){var t=this._boundTo;if(t!==undefined){if(t instanceof e){if(t.isFulfilled()){return t.value()}else{return undefined}}}return t}function longStackTracesCaptureStackTrace(){this._trace=new CapturedTrace(this._peekContext())}function longStackTracesAttachExtraTrace(e,t){if(s(e)){var r=this._trace;if(r!==undefined){if(t)r=r._parent}if(r!==undefined){r.attachExtraTrace(e)}else if(!e.__stackCleaned__){var n=parseStackAndMessage(e);a.notEnumerableProp(e,"stack",n.message+"\n"+n.stack.join("\n"));a.notEnumerableProp(e,"__stackCleaned__",true)}}}function checkForgottenReturns(e,t,r,n,i){if(e===undefined&&t!==null&&w){if(i!==undefined&&i._returnedNonUndefined())return;if((n._bitField&65535)===0)return;if(r)r=r+" ";var o="";var a="";if(t._trace){var s=t._trace.stack.split("\n");var u=cleanStack(s);for(var l=u.length-1;l>=0;--l){var c=u[l];if(!f.test(c)){var h=c.match(p);if(h){o="at "+h[1]+":"+h[2]+":"+h[3]+" "}break}}if(u.length>0){var d=u[0];for(var l=0;l0){a="\n"+s[l-1]}break}}}}var v="a promise was created in a "+r+"handler "+o+"but was not returned from it, "+"see http://goo.gl/rRqMUw"+a;n._warn(v,true,t)}}function deprecated(e,t){var r=e+" is deprecated and will be removed in a future version.";if(t)r+=" Use "+t+" instead.";return warn(r)}function warn(t,r,n){if(!C.warnings)return;var i=new o(t);var a;if(r){n._attachExtraTrace(i)}else if(C.longStackTraces&&(a=e._peekContext())){a.attachExtraTrace(i)}else{var s=parseStackAndMessage(i);i.stack=s.message+"\n"+s.stack.join("\n")}if(!O("warning",i)){formatAndLogError(i,"",true)}}function reconstructStack(e,t){for(var r=0;r=0;--s){if(n[s]===o){a=s;break}}for(var s=a;s>=0;--s){var u=n[s];if(t[i]===u){t.pop();i--}else{break}}t=n}}function cleanStack(e){var t=[];for(var r=0;r0&&e.name!="SyntaxError"){t=t.slice(r)}return t}function parseStackAndMessage(e){var t=e.stack;var r=e.toString();t=typeof t==="string"&&t.length>0?stackFramesAsArray(e):[" (No stack trace)"];return{message:r,stack:e.name=="SyntaxError"?t:cleanStack(t)}}function formatAndLogError(e,t,r){if(typeof console!=="undefined"){var n;if(a.isObject(e)){var i=e.stack;n=t+d(i,e)}else{n=t+String(e)}if(typeof y==="function"){y(n,r)}else if(typeof console.log==="function"||typeof console.log==="object"){console.log(n)}}}function fireRejectionEvent(e,t,r,n){var o=false;try{if(typeof t==="function"){o=true;if(e==="rejectionHandled"){t(n)}else{t(r,n)}}}catch(e){i.throwLater(e)}if(e==="unhandledRejection"){if(!O(e,r,n)&&!o){formatAndLogError(r,"Unhandled rejection ")}}else{O(e,n)}}function formatNonError(e){var t;if(typeof e==="function"){t="[function "+(e.name||"anonymous")+"]"}else{t=e&&typeof e.toString==="function"?e.toString():a.toString(e);var r=/\[object [a-zA-Z0-9$_]+\]/;if(r.test(t)){try{var n=JSON.stringify(e);t=n}catch(e){}}if(t.length===0){t="(empty array)"}}return"(<"+snip(t)+">, no stack trace)"}function snip(e){var t=41;if(e.length=o){return}x=function(e){if(c.test(e))return true;var t=parseLineInfo(e);if(t){if(t.fileName===a&&(i<=t.line&&t.line<=o)){return true}}return false}}function CapturedTrace(e){this._parent=e;this._promisesCreated=0;var t=this._length=1+(e===undefined?0:e._length);A(this,CapturedTrace);if(t>32)this.uncycle()}a.inherits(CapturedTrace,Error);t.CapturedTrace=CapturedTrace;CapturedTrace.prototype.uncycle=function(){var e=this._length;if(e<2)return;var t=[];var r={};for(var n=0,i=this;i!==undefined;++n){t.push(i);i=i._parent}e=this._length=n;for(var n=e-1;n>=0;--n){var o=t[n].stack;if(r[o]===undefined){r[o]=n}}for(var n=0;n0){t[s-1]._parent=undefined;t[s-1]._length=1}t[n]._parent=undefined;t[n]._length=1;var u=n>0?t[n-1]:this;if(s=0;--c){t[c]._length=l;l++}return}}};CapturedTrace.prototype.attachExtraTrace=function(e){if(e.__stackCleaned__)return;this.uncycle();var t=parseStackAndMessage(e);var r=t.message;var n=[t.stack];var i=this;while(i!==undefined){n.push(cleanStack(i.stack.split("\n")));i=i._parent}removeCommonRoots(n);removeDuplicateOrEmptyJumps(n);a.notEnumerableProp(e,"stack",reconstructStack(r,n));a.notEnumerableProp(e,"__stackCleaned__",true)};var A=function stackDetection(){var e=/^\s*at\s*/;var t=function(e,t){if(typeof e==="string")return e;if(t.name!==undefined&&t.message!==undefined){return t.toString()}return formatNonError(t)};if(typeof Error.stackTraceLimit==="number"&&typeof Error.captureStackTrace==="function"){Error.stackTraceLimit+=6;h=e;d=t;var r=Error.captureStackTrace;x=function(e){return c.test(e)};return function(e,t){Error.stackTraceLimit+=6;r(e,t);Error.stackTraceLimit-=6}}var n=new Error;if(typeof n.stack==="string"&&n.stack.split("\n")[0].indexOf("stackDetection@")>=0){h=/@/;d=t;v=true;return function captureStackTrace(e){e.stack=(new Error).stack}}var i;try{throw new Error}catch(e){i="stack"in e}if(!("stack"in n)&&i&&typeof Error.stackTraceLimit==="number"){h=e;d=t;return function captureStackTrace(e){Error.stackTraceLimit+=6;try{throw new Error}catch(t){e.stack=t.stack}Error.stackTraceLimit-=6}}d=function(e,t){if(typeof e==="string")return e;if((typeof t==="object"||typeof t==="function")&&t.name!==undefined&&t.message!==undefined){return t.toString()}return formatNonError(t)};return null}([]);if(typeof console!=="undefined"&&typeof console.warn!=="undefined"){y=function(e){console.warn(e)};if(a.isNode&&process.stderr.isTTY){y=function(e,t){var r=t?"":"";console.warn(r+e+"\n")}}else if(!a.isNode&&typeof(new Error).stack==="string"){y=function(e,t){console.warn("%c"+e,t?"color: darkorange":"color: red")}}}var C={warnings:m,longStackTraces:false,cancellation:false,monitoring:false};if(_)e.longStackTraces();return{longStackTraces:function(){return C.longStackTraces},warnings:function(){return C.warnings},cancellation:function(){return C.cancellation},monitoring:function(){return C.monitoring},propagateFromFunction:function(){return T},boundValueFunction:function(){return boundValueFunction},checkForgottenReturns:checkForgottenReturns,setBounds:setBounds,warn:warn,deprecated:deprecated,CapturedTrace:CapturedTrace,fireDomEvent:E,fireGlobalEvent:S}}},277:function(e,t,r){var n=r(794);var i=r(669);if(!n.Writable||!n.Writable.prototype.destroy)n=r(574);function NoopStream(){if(!(this instanceof NoopStream)){return new NoopStream}n.Transform.call(this)}i.inherits(NoopStream,n.Transform);NoopStream.prototype._transform=function(e,t,r){r()};e.exports=NoopStream},286:function(e,t,r){"use strict";var n=this&&this.__awaiter||function(e,t,r,n){function adopt(e){return e instanceof r?e:new r(function(t){t(e)})}return new(r||(r=Promise))(function(r,i){function fulfilled(e){try{step(n.next(e))}catch(e){i(e)}}function rejected(e){try{step(n["throw"](e))}catch(e){i(e)}}function step(e){e.done?r(e.value):adopt(e.value).then(fulfilled,rejected)}step((n=n.apply(e,t||[])).next())})};var i=this&&this.__importStar||function(e){if(e&&e.__esModule)return e;var t={};if(e!=null)for(var r in e)if(Object.hasOwnProperty.call(e,r))t[r]=e[r];t["default"]=e;return t};Object.defineProperty(t,"__esModule",{value:true});const o=i(r(747));const a=i(r(622));const s=i(r(874));const u=i(r(360));const l=i(r(470));const c=i(r(1));const f=i(r(533));const p=i(r(317));const h=new s.HttpClient("eskatos/gradle-command-action");const d="https://services.gradle.org/versions";function gradleVersion(e){return n(this,void 0,void 0,function*(){switch(e){case"current":return gradleCurrent();case"rc":return gradleReleaseCandidate();case"nightly":return gradleNightly();case"release-nightly":return gradleReleaseNightly();default:return gradle(e)}})}t.gradleVersion=gradleVersion;function gradleCurrent(){return n(this,void 0,void 0,function*(){const e=yield gradleVersionDeclaration(`${d}/current`);return provisionGradle(e.version,e.downloadUrl)})}function gradleReleaseCandidate(){return n(this,void 0,void 0,function*(){const e=yield gradleVersionDeclaration(`${d}/release-candidate`);if(e){return provisionGradle(e.version,e.downloadUrl)}return gradleCurrent()})}function gradleNightly(){return n(this,void 0,void 0,function*(){const e=yield gradleVersionDeclaration(`${d}/nightly`);return provisionGradle(e.version,e.downloadUrl)})}function gradleReleaseNightly(){return n(this,void 0,void 0,function*(){const e=yield gradleVersionDeclaration(`${d}/release-nightly`);return provisionGradle(e.version,e.downloadUrl)})}function gradle(e){return n(this,void 0,void 0,function*(){const t=yield findGradleVersionDeclaration(e);if(!t){throw new Error(`Gradle version ${e} does not exists`)}return provisionGradle(t.version,t.downloadUrl)})}function gradleVersionDeclaration(e){return n(this,void 0,void 0,function*(){return yield httpGetGradleVersion(e)})}function findGradleVersionDeclaration(e){return n(this,void 0,void 0,function*(){const t=yield httpGetGradleVersions(`${d}/all`);return t.find(t=>{return t.version===e})})}function provisionGradle(e,t){return n(this,void 0,void 0,function*(){const r=f.find("gradle",e);if(r.length>0){const e=executableFrom(r);l.info(`Provisioned Gradle executable ${e}`);return e}const n=process.env["HOME"]||"";const i=a.join(n,"gradle-provision-tmpdir");const s=a.join(i,"downloads");const u=a.join(i,"installs");yield c.mkdirP(s);yield c.mkdirP(u);l.info(`Downloading ${t}`);const p=a.join(s,`gradle-${e}-bin.zip`);yield httpDownload(t,p);l.info(`Downloaded at ${p}, size ${o.statSync(p).size}`);yield extractZip(p,u);const h=a.join(u,`gradle-${e}`);l.info(`Extracted in ${h}`);const d=executableFrom(h);o.chmodSync(d,"755");l.info(`Provisioned Gradle executable ${d}`);f.cacheDir(h,"gradle",e);return d})}function executableFrom(e){return a.join(e,"bin",`${p.installScriptFilename()}`)}function httpGetGradleVersion(e){return n(this,void 0,void 0,function*(){return JSON.parse(yield httpGetString(e))})}function httpGetGradleVersions(e){return n(this,void 0,void 0,function*(){return JSON.parse(yield httpGetString(e))})}function httpGetString(e){return n(this,void 0,void 0,function*(){const t=yield h.get(e);return t.readBody()})}function httpDownload(e,t){return n(this,void 0,void 0,function*(){const r=o.createWriteStream(t);try{const t=yield h.get(e);t.message.pipe(r);return new Promise(function(e){e()})}finally{r.close()}})}function extractZip(e,t){return n(this,void 0,void 0,function*(){return new Promise(function(r,n){o.createReadStream(e).pipe(u.Extract({path:t})).on("close",()=>{r()}).on("error",e=>{n(e)})})})}},287:function(e){e.exports=function parseDateTime(e,t){const r=e&31;const n=e>>5&15;const i=(e>>9&127)+1980;const o=t?(t&31)*2:0;const a=t?t>>5&63:0;const s=t?t>>11:0;return new Date(Date.UTC(i,n-1,r,s,a,o))}},293:function(e){e.exports=require("buffer")},302:function(e,t,r){e.exports=realpath;realpath.realpath=realpath;realpath.sync=realpathSync;realpath.realpathSync=realpathSync;realpath.monkeypatch=monkeypatch;realpath.unmonkeypatch=unmonkeypatch;var n=r(747);var i=n.realpath;var o=n.realpathSync;var a=process.version;var s=/^v[0-5]\./.test(a);var u=r(117);function newError(e){return e&&e.syscall==="realpath"&&(e.code==="ELOOP"||e.code==="ENOMEM"||e.code==="ENAMETOOLONG")}function realpath(e,t,r){if(s){return i(e,t,r)}if(typeof t==="function"){r=t;t=null}i(e,t,function(n,i){if(newError(n)){u.realpath(e,t,r)}else{r(n,i)}})}function realpathSync(e,t){if(s){return o(e,t)}try{return o(e,t)}catch(r){if(newError(r)){return u.realpathSync(e,t)}else{throw r}}}function monkeypatch(){n.realpath=realpath;n.realpathSync=realpathSync}function unmonkeypatch(){n.realpath=i;n.realpathSync=o}},303:function(e,t,r){var n=r(794);var i=r(379);var o=r(553);var a=r(29);if(!n.Writable||!n.Writable.prototype.destroy)n=r(574);function parseOne(e,t){var r=n.PassThrough({objectMode:true});var s=n.PassThrough();var u=n.Transform({objectMode:true});var l=e instanceof RegExp?e:e&&new RegExp(e);var c;u._transform=function(e,t,r){if(c||l&&!l.exec(e.path)){e.autodrain();return r()}else{c=true;f.emit("entry",e);e.on("error",function(e){s.emit("error",e)});e.pipe(s).on("error",function(e){r(e)}).on("finish",function(e){r(null,e)})}};r.pipe(i(t)).on("error",function(e){s.emit("error",e)}).pipe(u).on("error",Object).on("finish",function(){if(!c)s.emit("error",new Error("PATTERN_NOT_FOUND"));else s.end()});var f=o(r,s);f.buffer=function(){return a(s)};return f}e.exports=parseOne},306:function(e,t,r){var n=r(896);var i=r(621);e.exports=expandTop;var o="\0SLASH"+Math.random()+"\0";var a="\0OPEN"+Math.random()+"\0";var s="\0CLOSE"+Math.random()+"\0";var u="\0COMMA"+Math.random()+"\0";var l="\0PERIOD"+Math.random()+"\0";function numeric(e){return parseInt(e,10)==e?parseInt(e,10):e.charCodeAt(0)}function escapeBraces(e){return e.split("\\\\").join(o).split("\\{").join(a).split("\\}").join(s).split("\\,").join(u).split("\\.").join(l)}function unescapeBraces(e){return e.split(o).join("\\").split(a).join("{").split(s).join("}").split(u).join(",").split(l).join(".")}function parseCommaParts(e){if(!e)return[""];var t=[];var r=i("{","}",e);if(!r)return e.split(",");var n=r.pre;var o=r.body;var a=r.post;var s=n.split(",");s[s.length-1]+="{"+o+"}";var u=parseCommaParts(a);if(a.length){s[s.length-1]+=u.shift();s.push.apply(s,u)}t.push.apply(t,s);return t}function expandTop(e){if(!e)return[];if(e.substr(0,2)==="{}"){e="\\{\\}"+e.substr(2)}return expand(escapeBraces(e),true).map(unescapeBraces)}function identity(e){return e}function embrace(e){return"{"+e+"}"}function isPadded(e){return/^-?0\d/.test(e)}function lte(e,t){return e<=t}function gte(e,t){return e>=t}function expand(e,t){var r=[];var o=i("{","}",e);if(!o||/\$$/.test(o.pre))return[e];var a=/^-?\d+\.\.-?\d+(?:\.\.-?\d+)?$/.test(o.body);var u=/^[a-zA-Z]\.\.[a-zA-Z](?:\.\.-?\d+)?$/.test(o.body);var l=a||u;var c=o.body.indexOf(",")>=0;if(!l&&!c){if(o.post.match(/,.*\}/)){e=o.pre+"{"+o.body+s+o.post;return expand(e)}return[e]}var f;if(l){f=o.body.split(/\.\./)}else{f=parseCommaParts(o.body);if(f.length===1){f=expand(f[0],false).map(embrace);if(f.length===1){var p=o.post.length?expand(o.post,false):[""];return p.map(function(e){return o.pre+f[0]+e})}}}var h=o.pre;var p=o.post.length?expand(o.post,false):[""];var d;if(l){var v=numeric(f[0]);var y=numeric(f[1]);var g=Math.max(f[0].length,f[1].length);var m=f.length==3?Math.abs(numeric(f[2])):1;var _=lte;var w=y0){var O=new Array(R+1).join("0");if(E<0)S="-"+O+S.slice(1);else S=O+S}}}d.push(S)}}else{d=n(f,function(e){return expand(e,false)})}for(var T=0;T=this._length){var n;if(this._isMap){n=c(this._values)}else{n={};var i=this.length();for(var o=0,a=this.length();o>1};function props(t){var r;var o=n(t);if(!a(o)){return i("cannot await properties of a non-object\n\n See http://goo.gl/MqrFmX\n")}else if(o instanceof e){r=o._then(e.props,undefined,undefined,undefined,undefined)}else{r=new PropertiesPromiseArray(o).promise()}if(o instanceof e){r._propagateFrom(o,2)}return r}e.prototype.props=function(){return props(this)};e.props=function(e){return props(e)}}},323:function(e,t,r){"use strict";e.exports=function(e,t,n){var i=r(248);var o=r(607).RangeError;var a=r(607).AggregateError;var s=i.isArray;var u={};function SomePromiseArray(e){this.constructor$(e);this._howMany=0;this._unwrap=false;this._initialized=false}i.inherits(SomePromiseArray,t);SomePromiseArray.prototype._init=function(){if(!this._initialized){return}if(this._howMany===0){this._resolve([]);return}this._init$(undefined,-5);var e=s(this._values);if(!this._isResolved()&&e&&this._howMany>this._canPossiblyFulfill()){this._reject(this._getRangeError(this.length()))}};SomePromiseArray.prototype.init=function(){this._initialized=true;this._init()};SomePromiseArray.prototype.setUnwrap=function(){this._unwrap=true};SomePromiseArray.prototype.howMany=function(){return this._howMany};SomePromiseArray.prototype.setHowMany=function(e){this._howMany=e};SomePromiseArray.prototype._promiseFulfilled=function(e){this._addFulfilled(e);if(this._fulfilled()===this.howMany()){this._values.length=this.howMany();if(this.howMany()===1&&this._unwrap){this._resolve(this._values[0])}else{this._resolve(this._values)}return true}return false};SomePromiseArray.prototype._promiseRejected=function(e){this._addRejected(e);return this._checkOutcome()};SomePromiseArray.prototype._promiseCancelled=function(){if(this._values instanceof e||this._values==null){return this._cancel()}this._addRejected(u);return this._checkOutcome()};SomePromiseArray.prototype._checkOutcome=function(){if(this.howMany()>this._canPossiblyFulfill()){var e=new a;for(var t=this.length();t0){this._reject(e)}else{this._cancel()}return true}return false};SomePromiseArray.prototype._fulfilled=function(){return this._totalResolved};SomePromiseArray.prototype._rejected=function(){return this._values.length-this.length()};SomePromiseArray.prototype._addRejected=function(e){this._values.push(e)};SomePromiseArray.prototype._addFulfilled=function(e){this._values[this._totalResolved++]=e};SomePromiseArray.prototype._canPossiblyFulfill=function(){return this.length()-this._rejected()};SomePromiseArray.prototype._getRangeError=function(e){var t="Input array must contain at least "+this._howMany+" items but contains only "+e+" items";return new o(t)};SomePromiseArray.prototype._resolveEmptyArray=function(){this._reject(this._getRangeError(0))};function some(e,t){if((t|0)!==t||t<0){return n("expecting a positive integer\n\n See http://goo.gl/MqrFmX\n")}var r=new SomePromiseArray(e);var i=r.promise();r.setHowMany(t);r.init();return i}e.some=function(e,t){return some(e,t)};e.prototype.some=function(e){return some(this,e)};e._SomePromiseArray=SomePromiseArray}},339:function(e,t,r){"use strict";var n=r(640);var i=Object.prototype.hasOwnProperty;var o=Array.isArray;var a={allowDots:false,allowPrototypes:false,arrayLimit:20,charset:"utf-8",charsetSentinel:false,comma:false,decoder:n.decode,delimiter:"&",depth:5,ignoreQueryPrefix:false,interpretNumericEntities:false,parameterLimit:1e3,parseArrays:true,plainObjects:false,strictNullHandling:false};var s=function(e){return e.replace(/&#(\d+);/g,function(e,t){return String.fromCharCode(parseInt(t,10))})};var u=function(e,t){if(e&&typeof e==="string"&&t.comma&&e.indexOf(",")>-1){return e.split(",")}return e};var l="utf8=%26%2310003%3B";var c="utf8=%E2%9C%93";var f=function parseQueryStringValues(e,t){var r={};var f=t.ignoreQueryPrefix?e.replace(/^\?/,""):e;var p=t.parameterLimit===Infinity?undefined:t.parameterLimit;var h=f.split(t.delimiter,p);var d=-1;var v;var y=t.charset;if(t.charsetSentinel){for(v=0;v-1){b=o(b)?[b]:b}if(i.call(r,w)){r[w]=n.combine(r[w],b)}else{r[w]=b}}return r};var p=function(e,t,r,n){var i=n?t:u(t,r);for(var o=e.length-1;o>=0;--o){var a;var s=e[o];if(s==="[]"&&r.parseArrays){a=[].concat(i)}else{a=r.plainObjects?Object.create(null):{};var l=s.charAt(0)==="["&&s.charAt(s.length-1)==="]"?s.slice(1,-1):s;var c=parseInt(l,10);if(!r.parseArrays&&l===""){a={0:i}}else if(!isNaN(c)&&s!==l&&String(c)===l&&c>=0&&(r.parseArrays&&c<=r.arrayLimit)){a=[];a[c]=i}else{a[l]=i}}i=a}return i};var h=function parseQueryStringKeys(e,t,r,n){if(!e){return}var o=r.allowDots?e.replace(/\.([^.[]+)/g,"[$1]"):e;var a=/(\[[^[\]]*])/;var s=/(\[[^[\]]*])/g;var u=r.depth>0&&a.exec(o);var l=u?o.slice(0,u.index):o;var c=[];if(l){if(!r.plainObjects&&i.call(Object.prototype,l)){if(!r.allowPrototypes){return}}c.push(l)}var f=0;while(r.depth>0&&(u=s.exec(o))!==null&&f0,h;a.__autodraining=u;var d=r.compressionMethod&&!u?i.createInflateRaw():o.PassThrough();if(c){a.size=r.uncompressedSize;h=r.compressedSize}else{h=p.alloc(4);h.writeUInt32LE(134695760,0)}return new s(function(t,r){e.stream(h).pipe(d).on("error",function(t){e.emit("error",t)}).pipe(a).on("finish",function(){return c?e._readRecord().then(t).catch(r):e._processDataDescriptor(a).then(t).catch(r)})})})})})};Parse.prototype._processDataDescriptor=function(e){var t=this;return t.pull(16).then(function(r){var n=a.parse(r).word32lu("dataDescriptorSignature").word32lu("crc32").word32lu("compressedSize").word32lu("uncompressedSize").vars;e.size=n.uncompressedSize;return t._readRecord()})};Parse.prototype._readCentralDirectoryFileHeader=function(){var e=this;return e.pull(42).then(function(t){var r=a.parse(t).word16lu("versionMadeBy").word16lu("versionsNeededToExtract").word16lu("flags").word16lu("compressionMethod").word16lu("lastModifiedTime").word16lu("lastModifiedDate").word32lu("crc32").word32lu("compressedSize").word32lu("uncompressedSize").word16lu("fileNameLength").word16lu("extraFieldLength").word16lu("fileCommentLength").word16lu("diskNumber").word16lu("internalFileAttributes").word32lu("externalFileAttributes").word32lu("offsetToLocalFileHeader").vars;return e.pull(r.fileNameLength).then(function(t){r.fileName=t.toString("utf8");return e.pull(r.extraFieldLength)}).then(function(t){return e.pull(r.fileCommentLength)}).then(function(t){return e._readRecord()})})};Parse.prototype._readEndOfCentralDirectoryRecord=function(){var e=this;return e.pull(18).then(function(t){var r=a.parse(t).word16lu("diskNumber").word16lu("diskStart").word16lu("numberOfRecordsOnDisk").word16lu("numberOfRecords").word32lu("sizeOfCentralDirectory").word32lu("offsetToStartOfCentralDirectory").word16lu("commentLength").vars;return e.pull(r.commentLength).then(function(t){t=t.toString("utf8");e.end();e.push(null)})})};Parse.prototype.promise=function(){var e=this;return new s(function(t,r){e.on("finish",t);e.on("error",r)})};e.exports=Parse},394:function(e,t,r){e.exports=Abstract;var n=r(794).Stream;var i=r(689);function Abstract(){n.call(this)}i(Abstract,n);Abstract.prototype.on=function(e,t){if(e==="ready"&&this.ready){process.nextTick(t.bind(this))}else{n.prototype.on.call(this,e,t)}return this};Abstract.prototype.abort=function(){this._aborted=true;this.emit("abort")};Abstract.prototype.destroy=function(){};Abstract.prototype.warn=function(e,t){var r=this;var n=decorate(e,t,r);if(!r.listeners("warn")){console.error("%s %s\n"+"path = %s\n"+"syscall = %s\n"+"fstream_type = %s\n"+"fstream_path = %s\n"+"fstream_unc_path = %s\n"+"fstream_class = %s\n"+"fstream_stack =\n%s\n",t||"UNKNOWN",n.stack,n.path,n.syscall,n.fstream_type,n.fstream_path,n.fstream_unc_path,n.fstream_class,n.fstream_stack.join("\n"))}else{r.emit("warn",n)}};Abstract.prototype.info=function(e,t){this.emit("info",e,t)};Abstract.prototype.error=function(e,t,r){var n=decorate(e,t,this);if(r)throw n;else this.emit("error",n)};function decorate(e,t,r){if(!(e instanceof Error))e=new Error(e);e.code=e.code||t;e.path=e.path||r.path;e.fstream_type=e.fstream_type||r.type;e.fstream_path=e.fstream_path||r.path;if(r._path!==r.path){e.fstream_unc_path=e.fstream_unc_path||r._path}if(r.linkpath){e.fstream_linkpath=e.fstream_linkpath||r.linkpath}e.fstream_class=e.fstream_class||r.constructor.name;e.fstream_stack=e.fstream_stack||(new Error).stack.split(/\n/).slice(3).map(function(e){return e.replace(/^ {4}at /,"")});return e}},402:function(e,t,r){e.exports=glob;var n=r(747);var i=r(302);var o=r(723);var a=o.Minimatch;var s=r(689);var u=r(614).EventEmitter;var l=r(622);var c=r(357);var f=r(681);var p=r(245);var h=r(856);var d=h.alphasort;var v=h.alphasorti;var y=h.setopts;var g=h.ownProp;var m=r(634);var _=r(669);var w=h.childrenIgnored;var b=h.isIgnored;var E=r(49);function glob(e,t,r){if(typeof t==="function")r=t,t={};if(!t)t={};if(t.sync){if(r)throw new TypeError("callback provided to sync glob");return p(e,t)}return new Glob(e,t,r)}glob.sync=p;var S=glob.GlobSync=p.GlobSync;glob.glob=glob;function extend(e,t){if(t===null||typeof t!=="object"){return e}var r=Object.keys(t);var n=r.length;while(n--){e[r[n]]=t[r[n]]}return e}glob.hasMagic=function(e,t){var r=extend({},t);r.noprocess=true;var n=new Glob(e,r);var i=n.minimatch.set;if(!e)return false;if(i.length>1)return true;for(var o=0;othis.maxLength)return t();if(!this.stat&&g(this.cache,r)){var o=this.cache[r];if(Array.isArray(o))o="DIR";if(!i||o==="DIR")return t(null,o);if(i&&o==="FILE")return t()}var a;var s=this.statCache[r];if(s!==undefined){if(s===false)return t(null,s);else{var u=s.isDirectory()?"DIR":"FILE";if(i&&u==="FILE")return t();else return t(null,u,s)}}var l=this;var c=m("stat\0"+r,lstatcb_);if(c)n.lstat(r,c);function lstatcb_(i,o){if(o&&o.isSymbolicLink()){return n.stat(r,function(n,i){if(n)l._stat2(e,r,null,o,t);else l._stat2(e,r,n,i,t)})}else{l._stat2(e,r,i,o,t)}}};Glob.prototype._stat2=function(e,t,r,n,i){if(r&&(r.code==="ENOENT"||r.code==="ENOTDIR")){this.statCache[t]=false;return i()}var o=e.slice(-1)==="/";this.statCache[t]=n;if(t.slice(-1)==="/"&&n&&!n.isDirectory())return i(null,false,n);var a=true;if(n)a=n.isDirectory()?"DIR":"FILE";this.cache[t]=this.cache[t]||a;if(o&&a==="FILE")return i();return i(null,a,n)}},409:function(e,t,r){"use strict";e.exports=function(e,t,n){var i=r(248);var o=e.TimeoutError;function HandleWrapper(e){this.handle=e}HandleWrapper.prototype._resultCancelled=function(){clearTimeout(this.handle)};var a=function(e){return s(+this).thenReturn(e)};var s=e.delay=function(r,i){var o;var s;if(i!==undefined){o=e.resolve(i)._then(a,null,null,r,undefined);if(n.cancellation()&&i instanceof e){o._setOnCancel(i)}}else{o=new e(t);s=setTimeout(function(){o._fulfill()},+r);if(n.cancellation()){o._setOnCancel(new HandleWrapper(s))}o._captureStackTrace()}o._setAsyncGuaranteed();return o};e.prototype.delay=function(e){return s(e,this)};var u=function(e,t,r){var n;if(typeof t!=="string"){if(t instanceof Error){n=t}else{n=new o("operation timed out")}}else{n=new o(t)}i.markAsOriginatingFromRejection(n);e._attachExtraTrace(n);e._reject(n);if(r!=null){r.cancel()}};function successClear(e){clearTimeout(this.handle);return e}function failureClear(e){clearTimeout(this.handle);throw e}e.prototype.timeout=function(e,t){e=+e;var r,i;var o=new HandleWrapper(setTimeout(function timeoutTimeout(){if(r.isPending()){u(r,t,i)}},e));if(n.cancellation()){i=this.then();r=i._then(successClear,failureClear,undefined,o,undefined);r._setOnCancel(o)}else{r=this._then(successClear,failureClear,undefined,o,undefined)}return r}}},413:function(e,t,r){e.exports=r(141)},414:function(e,t,r){"use strict";var n=Object.create;if(n){var i=n(null);var o=n(null);i[" size"]=o[" size"]=0}e.exports=function(e){var t=r(248);var n=t.canEvaluate;var a=t.isIdentifier;var s;var u;if(true){var l=function(e){return new Function("ensureMethod"," \n return function(obj) { \n 'use strict' \n var len = this.length; \n ensureMethod(obj, 'methodName'); \n switch(len) { \n case 1: return obj.methodName(this[0]); \n case 2: return obj.methodName(this[0], this[1]); \n case 3: return obj.methodName(this[0], this[1], this[2]); \n case 0: return obj.methodName(); \n default: \n return obj.methodName.apply(obj, this); \n } \n }; \n ".replace(/methodName/g,e))(ensureMethod)};var c=function(e){return new Function("obj"," \n 'use strict'; \n return obj.propertyName; \n ".replace("propertyName",e))};var f=function(e,t,r){var n=r[e];if(typeof n!=="function"){if(!a(e)){return null}n=t(e);r[e]=n;r[" size"]++;if(r[" size"]>512){var i=Object.keys(r);for(var o=0;o<256;++o)delete r[i[o]];r[" size"]=i.length-256}}return n};s=function(e){return f(e,l,i)};u=function(e){return f(e,c,o)}}function ensureMethod(r,n){var i;if(r!=null)i=r[n];if(typeof i!=="function"){var o="Object "+t.classString(r)+" has no method '"+t.toString(n)+"'";throw new e.TypeError(o)}return i}function caller(e){var t=this.pop();var r=ensureMethod(e,t);return r.apply(e,this)}e.prototype.call=function(e){var t=arguments.length;var r=new Array(Math.max(t-1,0));for(var i=1;i0){e+=" ";let t=true;for(const r in this.properties){if(this.properties.hasOwnProperty(r)){const n=this.properties[r];if(n){if(t){t=false}else{e+=","}e+=`${r}=${escapeProperty(n)}`}}}}e+=`${o}${escapeData(this.message)}`;return e}}function toCommandValue(e){if(e===null||e===undefined){return""}else if(typeof e==="string"||e instanceof String){return e}return JSON.stringify(e)}t.toCommandValue=toCommandValue;function escapeData(e){return toCommandValue(e).replace(/%/g,"%25").replace(/\r/g,"%0D").replace(/\n/g,"%0A")}function escapeProperty(e){return toCommandValue(e).replace(/%/g,"%25").replace(/\r/g,"%0D").replace(/\n/g,"%0A").replace(/:/g,"%3A").replace(/,/g,"%2C")}},440:function(e,t,r){"use strict";var n;if(typeof Promise!=="undefined")n=Promise;function noConflict(){try{if(Promise===i)Promise=n}catch(e){}return i}var i=r(983)();i.noConflict=noConflict;e.exports=i},441:function(e,t,r){e.exports=ProxyWriter;var n=r(82);var i=r(716);var o=r(689);var a=r(137);var s=r(747);o(ProxyWriter,n);function ProxyWriter(e){var t=this;if(!(t instanceof ProxyWriter)){throw new Error("ProxyWriter must be called as constructor.")}t.props=e;t._needDrain=false;n.call(t,e)}ProxyWriter.prototype._stat=function(){var e=this;var t=e.props;var r=t.follow?"stat":"lstat";s[r](t.path,function(r,o){var a;if(r||!o){a="File"}else{a=i(o)}t[a]=true;t.type=e.type=a;e._old=o;e._addProxy(n(t,o))})};ProxyWriter.prototype._addProxy=function(e){var t=this;if(t._proxy){return t.error("proxy already set")}t._proxy=e;["ready","error","close","pipe","drain","warn"].forEach(function(r){e.on(r,t.emit.bind(t,r))});t.emit("proxy",e);var r=t._buffer;r.forEach(function(t){e[t[0]].apply(e,t[1])});t._buffer.length=0;if(t._needsDrain)t.emit("drain")};ProxyWriter.prototype.add=function(e){a(e);if(!this._proxy){this._buffer.push(["add",[e]]);this._needDrain=true;return false}return this._proxy.add(e)};ProxyWriter.prototype.write=function(e){if(!this._proxy){this._buffer.push(["write",[e]]);this._needDrain=true;return false}return this._proxy.write(e)};ProxyWriter.prototype.end=function(e){if(!this._proxy){this._buffer.push(["end",[e]]);return false}return this._proxy.end(e)}},460:function(){(function(e,t){"use strict";if(e.setImmediate){return}var r=1;var n={};var i=false;var o=e.document;var a;function setImmediate(e){if(typeof e!=="function"){e=new Function(""+e)}var t=new Array(arguments.length-1);for(var i=0;i=e){var t;if(u==null){t=c.splice(0,e);if(!r.skip){t=t.slice()}}else{if(!r.skip){t=c.slice(u,e)}u=e}if(r.skip){r.cb()}else{r.cb(t)}}}}function builder(e){function next(){if(!p)e.next()}var t=words(function(e,t){return function(r){getBytes(e,function(e){f.set(r,t(e));next()})}});t.tap=function(t){e.nest(t,f.store)};t.into=function(t,r){if(!f.get(t))f.set(t,{});var n=f;f=a(n.get(t));e.nest(function(){r.apply(this,arguments);this.tap(function(){f=n})},f.store)};t.flush=function(){f.store={};next()};t.loop=function(t){var r=false;e.nest(false,function loop(){this.vars=f.store;t.call(this,function(){r=true;next()},f.store);this.tap(function(){if(r)e.next();else loop.call(this)}.bind(this))},f.store)};t.buffer=function(e,t){if(typeof t==="string"){t=f.get(t)}getBytes(t,function(t){f.set(e,t);next()})};t.skip=function(e){if(typeof e==="string"){e=f.get(e)}getBytes(e,function(){next()})};t.scan=function find(e,t){if(typeof t==="string"){t=new Buffer(t)}else if(!Buffer.isBuffer(t)){throw new Error("search must be a Buffer or a string")}var n=0;r=function(){var i=c.indexOf(t,u+n);var o=i-u-n;if(i!==-1){r=null;if(u!=null){f.set(e,c.slice(u,u+n+o));u+=n+o+t.length}else{f.set(e,c.slice(0,n+o));c.splice(0,n+o+t.length)}next();dispatch()}else{o=Math.max(c.length-t.length-u-n,0)}n+=o};dispatch()};t.peek=function(t){u=0;e.nest(function(){t.call(this,f.store);this.tap(function(){u=null})})};return t}var l=n.light(builder);l.writable=true;var c=o();l.write=function(e){c.push(e);dispatch()};var f=a();var p=false,h=false;l.end=function(){h=true};l.pipe=s.prototype.pipe;Object.getOwnPropertyNames(i.prototype).forEach(function(e){l[e]=i.prototype[e]});return l};t.parse=function parse(e){var t=words(function(i,o){return function(a){if(r+i<=e.length){var s=e.slice(r,r+i);r+=i;n.set(a,o(s))}else{n.set(a,null)}return t}});var r=0;var n=a();t.vars=n.store;t.tap=function(e){e.call(t,n.store);return t};t.into=function(e,r){if(!n.get(e)){n.set(e,{})}var i=n;n=a(i.get(e));r.call(t,n.store);n=i;return t};t.loop=function(e){var r=false;var i=function(){r=true};while(r===false){e.call(t,i,n.store)}return t};t.buffer=function(i,o){if(typeof o==="string"){o=n.get(o)}var a=e.slice(r,Math.min(e.length,r+o));r+=o;n.set(i,a);return t};t.skip=function(e){if(typeof e==="string"){e=n.get(e)}r+=e;return t};t.scan=function(i,o){if(typeof o==="string"){o=new Buffer(o)}else if(!Buffer.isBuffer(o)){throw new Error("search must be a Buffer or a string")}n.set(i,null);for(var a=0;a+r<=e.length-o.length+1;a++){for(var s=0;s=e.length};return t};function decodeLEu(e){var t=0;for(var r=0;r0)this._settlePromises()};e.prototype._unsetOnCancel=function(){this._onCancelField=undefined};e.prototype._isCancellable=function(){return this.isPending()&&!this._isCancelled()};e.prototype.isCancellable=function(){return this.isPending()&&!this.isCancelled()};e.prototype._doInvokeOnCancel=function(e,t){if(o.isArray(e)){for(var r=0;rn(this,void 0,void 0,function*(){return yield downloadToolAttempt(e,t||"",r)}),e=>{if(e instanceof HTTPError&&e.httpStatusCode){if(e.httpStatusCode<500&&e.httpStatusCode!==408&&e.httpStatusCode!==429){return false}}return true})})}t.downloadTool=downloadTool;function downloadToolAttempt(e,t,r){return n(this,void 0,void 0,function*(){if(u.existsSync(t)){throw new Error(`Destination file path ${t} already exists`)}const n=new p.HttpClient(b,[],{allowRetries:false});let i;if(r){a.debug("set auth");i={authorization:r}}const o=yield n.get(e,i);if(o.message.statusCode!==200){const t=new HTTPError(o.message.statusCode);a.debug(`Failed to download from "${e}". Code(${o.message.statusCode}) Message(${o.message.statusMessage})`);throw t}const l=v.promisify(d.pipeline);const c=_getGlobal("TEST_DOWNLOAD_TOOL_RESPONSE_MESSAGE_FACTORY",()=>o.message);const f=c();let h=false;try{yield l(f,u.createWriteStream(t));a.debug("download complete");h=true;return t}finally{if(!h){a.debug("download failed");try{yield s.rmRF(t)}catch(e){a.debug(`Failed to delete '${t}'. ${e.message}`)}}}})}function extract7z(e,t,r){return n(this,void 0,void 0,function*(){m.ok(w,"extract7z() not supported on current OS");m.ok(e,'parameter "file" is required');t=yield _createExtractFolder(t);const n=process.cwd();process.chdir(t);if(r){try{const t=a.isDebug()?"-bb1":"-bb0";const i=["x",t,"-bd","-sccUTF-8",e];const o={silent:true};yield g.exec(`"${r}"`,i,o)}finally{process.chdir(n)}}else{const r=f.join(__dirname,"..","scripts","Invoke-7zdec.ps1").replace(/'/g,"''").replace(/"|\n|\r/g,"");const i=e.replace(/'/g,"''").replace(/"|\n|\r/g,"");const o=t.replace(/'/g,"''").replace(/"|\n|\r/g,"");const a=`& '${r}' -Source '${i}' -Target '${o}'`;const u=["-NoLogo","-Sta","-NoProfile","-NonInteractive","-ExecutionPolicy","Unrestricted","-Command",a];const l={silent:true};try{const e=yield s.which("powershell",true);yield g.exec(`"${e}"`,u,l)}finally{process.chdir(n)}}return t})}t.extract7z=extract7z;function extractTar(e,t,r="xz"){return n(this,void 0,void 0,function*(){if(!e){throw new Error("parameter 'file' is required")}t=yield _createExtractFolder(t);a.debug("Checking tar --version");let n="";yield g.exec("tar --version",[],{ignoreReturnCode:true,silent:true,listeners:{stdout:e=>n+=e.toString(),stderr:e=>n+=e.toString()}});a.debug(n.trim());const i=n.toUpperCase().includes("GNU TAR");let o;if(r instanceof Array){o=r}else{o=[r]}if(a.isDebug()&&!r.includes("v")){o.push("-v")}let s=t;let u=e;if(w&&i){o.push("--force-local");s=t.replace(/\\/g,"/");u=e.replace(/\\/g,"/")}if(i){o.push("--warning=no-unknown-keyword")}o.push("-C",s,"-f",u);yield g.exec(`tar`,o);return t})}t.extractTar=extractTar;function extractZip(e,t){return n(this,void 0,void 0,function*(){if(!e){throw new Error("parameter 'file' is required")}t=yield _createExtractFolder(t);if(w){yield extractZipWin(e,t)}else{yield extractZipNix(e,t)}return t})}t.extractZip=extractZip;function extractZipWin(e,t){return n(this,void 0,void 0,function*(){const r=e.replace(/'/g,"''").replace(/"|\n|\r/g,"");const n=t.replace(/'/g,"''").replace(/"|\n|\r/g,"");const i=`$ErrorActionPreference = 'Stop' ; try { Add-Type -AssemblyName System.IO.Compression.FileSystem } catch { } ; [System.IO.Compression.ZipFile]::ExtractToDirectory('${r}', '${n}')`;const o=yield s.which("powershell",true);const a=["-NoLogo","-Sta","-NoProfile","-NonInteractive","-ExecutionPolicy","Unrestricted","-Command",i];yield g.exec(`"${o}"`,a)})}function extractZipNix(e,t){return n(this,void 0,void 0,function*(){const r=yield s.which("unzip",true);const n=[e];if(!a.isDebug()){n.unshift("-q")}yield g.exec(`"${r}"`,n,{cwd:t})})}function cacheDir(e,t,r,i){return n(this,void 0,void 0,function*(){r=h.clean(r)||r;i=i||c.arch();a.debug(`Caching tool ${t} ${r} ${i}`);a.debug(`source dir: ${e}`);if(!u.statSync(e).isDirectory()){throw new Error("sourceDir is not a directory")}const n=yield _createToolPath(t,r,i);for(const t of u.readdirSync(e)){const r=f.join(e,t);yield s.cp(r,n,{recursive:true})}_completeToolPath(t,r,i);return n})}t.cacheDir=cacheDir;function cacheFile(e,t,r,i,o){return n(this,void 0,void 0,function*(){i=h.clean(i)||i;o=o||c.arch();a.debug(`Caching tool ${r} ${i} ${o}`);a.debug(`source file: ${e}`);if(!u.statSync(e).isFile()){throw new Error("sourceFile is not a file")}const n=yield _createToolPath(r,i,o);const l=f.join(n,t);a.debug(`destination file ${l}`);yield s.cp(e,l);_completeToolPath(r,i,o);return n})}t.cacheFile=cacheFile;function find(e,t,r){if(!e){throw new Error("toolName parameter is required")}if(!t){throw new Error("versionSpec parameter is required")}r=r||c.arch();if(!_isExplicitVersion(t)){const n=findAllVersions(e,r);const i=_evaluateVersions(n,t);t=i}let n="";if(t){t=h.clean(t)||"";const i=f.join(_getCacheDirectory(),e,t,r);a.debug(`checking cache: ${i}`);if(u.existsSync(i)&&u.existsSync(`${i}.complete`)){a.debug(`Found tool in cache ${e} ${t} ${r}`);n=i}else{a.debug("not found")}}return n}t.find=find;function findAllVersions(e,t){const r=[];t=t||c.arch();const n=f.join(_getCacheDirectory(),e);if(u.existsSync(n)){const e=u.readdirSync(n);for(const i of e){if(_isExplicitVersion(i)){const e=f.join(n,i,t||"");if(u.existsSync(e)&&u.existsSync(`${e}.complete`)){r.push(i)}}}}return r}t.findAllVersions=findAllVersions;function getManifestFromRepo(e,t,r,i="master"){return n(this,void 0,void 0,function*(){let n=[];const o=`https://api.github.com/repos/${e}/${t}/git/trees/${i}`;const s=new p.HttpClient("tool-cache");const u={};if(r){a.debug("set auth");u.authorization=r}const l=yield s.getJson(o,u);if(!l.result){return n}let c="";for(const e of l.result.tree){if(e.path==="versions-manifest.json"){c=e.url;break}}u["accept"]="application/vnd.github.VERSION.raw";let f=yield(yield s.get(c,u)).readBody();if(f){f=f.replace(/^\uFEFF/,"");try{n=JSON.parse(f)}catch(e){a.debug("Invalid json")}}return n})}t.getManifestFromRepo=getManifestFromRepo;function findFromManifest(e,t,r,i=c.arch()){return n(this,void 0,void 0,function*(){const n=yield l._findMatch(e,t,r,i);return n})}t.findFromManifest=findFromManifest;function _createExtractFolder(e){return n(this,void 0,void 0,function*(){if(!e){e=f.join(_getTempDirectory(),y.default())}yield s.mkdirP(e);return e})}function _createToolPath(e,t,r){return n(this,void 0,void 0,function*(){const n=f.join(_getCacheDirectory(),e,h.clean(t)||t,r||"");a.debug(`destination ${n}`);const i=`${n}.complete`;yield s.rmRF(n);yield s.rmRF(i);yield s.mkdirP(n);return n})}function _completeToolPath(e,t,r){const n=f.join(_getCacheDirectory(),e,h.clean(t)||t,r||"");const i=`${n}.complete`;u.writeFileSync(i,"");a.debug("finished caching tool")}function _isExplicitVersion(e){const t=h.clean(e)||"";a.debug(`isExplicit: ${t}`);const r=h.valid(t)!=null;a.debug(`explicit? ${r}`);return r}function _evaluateVersions(e,t){let r="";a.debug(`evaluating ${e.length} versions`);e=e.sort((e,t)=>{if(h.gt(e,t)){return 1}return-1});for(let n=e.length-1;n>=0;n--){const i=e[n];const o=h.satisfies(i,t);if(o){r=i;break}}if(r){a.debug(`matched: ${r}`)}else{a.debug("match not found")}return r}function _getCacheDirectory(){const e=process.env["RUNNER_TOOL_CACHE"]||"";m.ok(e,"Expected RUNNER_TOOL_CACHE to be defined");return e}function _getTempDirectory(){const e=process.env["RUNNER_TEMP"]||"";m.ok(e,"Expected RUNNER_TEMP to be defined");return e}function _getGlobal(e,t){const r=global[e];return r!==undefined?r:t}},539:function(e,t,r){"use strict";Object.defineProperty(t,"__esModule",{value:true});const n=r(835);const i=r(605);const o=r(211);const a=r(950);let s;var u;(function(e){e[e["OK"]=200]="OK";e[e["MultipleChoices"]=300]="MultipleChoices";e[e["MovedPermanently"]=301]="MovedPermanently";e[e["ResourceMoved"]=302]="ResourceMoved";e[e["SeeOther"]=303]="SeeOther";e[e["NotModified"]=304]="NotModified";e[e["UseProxy"]=305]="UseProxy";e[e["SwitchProxy"]=306]="SwitchProxy";e[e["TemporaryRedirect"]=307]="TemporaryRedirect";e[e["PermanentRedirect"]=308]="PermanentRedirect";e[e["BadRequest"]=400]="BadRequest";e[e["Unauthorized"]=401]="Unauthorized";e[e["PaymentRequired"]=402]="PaymentRequired";e[e["Forbidden"]=403]="Forbidden";e[e["NotFound"]=404]="NotFound";e[e["MethodNotAllowed"]=405]="MethodNotAllowed";e[e["NotAcceptable"]=406]="NotAcceptable";e[e["ProxyAuthenticationRequired"]=407]="ProxyAuthenticationRequired";e[e["RequestTimeout"]=408]="RequestTimeout";e[e["Conflict"]=409]="Conflict";e[e["Gone"]=410]="Gone";e[e["TooManyRequests"]=429]="TooManyRequests";e[e["InternalServerError"]=500]="InternalServerError";e[e["NotImplemented"]=501]="NotImplemented";e[e["BadGateway"]=502]="BadGateway";e[e["ServiceUnavailable"]=503]="ServiceUnavailable";e[e["GatewayTimeout"]=504]="GatewayTimeout"})(u=t.HttpCodes||(t.HttpCodes={}));var l;(function(e){e["Accept"]="accept";e["ContentType"]="content-type"})(l=t.Headers||(t.Headers={}));var c;(function(e){e["ApplicationJson"]="application/json"})(c=t.MediaTypes||(t.MediaTypes={}));function getProxyUrl(e){let t=a.getProxyUrl(n.parse(e));return t?t.href:""}t.getProxyUrl=getProxyUrl;const f=[u.MovedPermanently,u.ResourceMoved,u.SeeOther,u.TemporaryRedirect,u.PermanentRedirect];const p=[u.BadGateway,u.ServiceUnavailable,u.GatewayTimeout];const h=["OPTIONS","GET","DELETE","HEAD"];const d=10;const v=5;class HttpClientResponse{constructor(e){this.message=e}readBody(){return new Promise(async(e,t)=>{let r=Buffer.alloc(0);this.message.on("data",e=>{r=Buffer.concat([r,e])});this.message.on("end",()=>{e(r.toString())})})}}t.HttpClientResponse=HttpClientResponse;function isHttps(e){let t=n.parse(e);return t.protocol==="https:"}t.isHttps=isHttps;class HttpClient{constructor(e,t,r){this._ignoreSslError=false;this._allowRedirects=true;this._allowRedirectDowngrade=false;this._maxRedirects=50;this._allowRetries=false;this._maxRetries=1;this._keepAlive=false;this._disposed=false;this.userAgent=e;this.handlers=t||[];this.requestOptions=r;if(r){if(r.ignoreSslError!=null){this._ignoreSslError=r.ignoreSslError}this._socketTimeout=r.socketTimeout;if(r.allowRedirects!=null){this._allowRedirects=r.allowRedirects}if(r.allowRedirectDowngrade!=null){this._allowRedirectDowngrade=r.allowRedirectDowngrade}if(r.maxRedirects!=null){this._maxRedirects=Math.max(r.maxRedirects,0)}if(r.keepAlive!=null){this._keepAlive=r.keepAlive}if(r.allowRetries!=null){this._allowRetries=r.allowRetries}if(r.maxRetries!=null){this._maxRetries=r.maxRetries}}}options(e,t){return this.request("OPTIONS",e,null,t||{})}get(e,t){return this.request("GET",e,null,t||{})}del(e,t){return this.request("DELETE",e,null,t||{})}post(e,t,r){return this.request("POST",e,t,r||{})}patch(e,t,r){return this.request("PATCH",e,t,r||{})}put(e,t,r){return this.request("PUT",e,t,r||{})}head(e,t){return this.request("HEAD",e,null,t||{})}sendStream(e,t,r,n){return this.request(e,t,r,n)}async getJson(e,t={}){t[l.Accept]=this._getExistingOrDefaultHeader(t,l.Accept,c.ApplicationJson);let r=await this.get(e,t);return this._processResponse(r,this.requestOptions)}async postJson(e,t,r={}){let n=JSON.stringify(t,null,2);r[l.Accept]=this._getExistingOrDefaultHeader(r,l.Accept,c.ApplicationJson);r[l.ContentType]=this._getExistingOrDefaultHeader(r,l.ContentType,c.ApplicationJson);let i=await this.post(e,n,r);return this._processResponse(i,this.requestOptions)}async putJson(e,t,r={}){let n=JSON.stringify(t,null,2);r[l.Accept]=this._getExistingOrDefaultHeader(r,l.Accept,c.ApplicationJson);r[l.ContentType]=this._getExistingOrDefaultHeader(r,l.ContentType,c.ApplicationJson);let i=await this.put(e,n,r);return this._processResponse(i,this.requestOptions)}async patchJson(e,t,r={}){let n=JSON.stringify(t,null,2);r[l.Accept]=this._getExistingOrDefaultHeader(r,l.Accept,c.ApplicationJson);r[l.ContentType]=this._getExistingOrDefaultHeader(r,l.ContentType,c.ApplicationJson);let i=await this.patch(e,n,r);return this._processResponse(i,this.requestOptions)}async request(e,t,r,i){if(this._disposed){throw new Error("Client has already been disposed.")}let o=n.parse(t);let a=this._prepareRequest(e,o,i);let s=this._allowRetries&&h.indexOf(e)!=-1?this._maxRetries+1:1;let l=0;let c;while(l0){const s=c.message.headers["location"];if(!s){break}let u=n.parse(s);if(o.protocol=="https:"&&o.protocol!=u.protocol&&!this._allowRedirectDowngrade){throw new Error("Redirect from HTTPS to HTTP protocol. This downgrade is not allowed for security reasons. If you want to allow this behavior, set the allowRedirectDowngrade option to true.")}await c.readBody();if(u.hostname!==o.hostname){for(let e in i){if(e.toLowerCase()==="authorization"){delete i[e]}}}a=this._prepareRequest(e,u,i);c=await this.requestRaw(a,r);t--}if(p.indexOf(c.message.statusCode)==-1){return c}l+=1;if(l{let i=function(e,t){if(e){n(e)}r(t)};this.requestRawWithCallback(e,t,i)})}requestRawWithCallback(e,t,r){let n;if(typeof t==="string"){e.options.headers["Content-Length"]=Buffer.byteLength(t,"utf8")}let i=false;let o=(e,t)=>{if(!i){i=true;r(e,t)}};let a=e.httpModule.request(e.options,e=>{let t=new HttpClientResponse(e);o(null,t)});a.on("socket",e=>{n=e});a.setTimeout(this._socketTimeout||3*6e4,()=>{if(n){n.end()}o(new Error("Request timeout: "+e.options.path),null)});a.on("error",function(e){o(e,null)});if(t&&typeof t==="string"){a.write(t,"utf8")}if(t&&typeof t!=="string"){t.on("close",function(){a.end()});t.pipe(a)}else{a.end()}}getAgent(e){let t=n.parse(e);return this._getAgent(t)}_prepareRequest(e,t,r){const n={};n.parsedUrl=t;const a=n.parsedUrl.protocol==="https:";n.httpModule=a?o:i;const s=a?443:80;n.options={};n.options.host=n.parsedUrl.hostname;n.options.port=n.parsedUrl.port?parseInt(n.parsedUrl.port):s;n.options.path=(n.parsedUrl.pathname||"")+(n.parsedUrl.search||"");n.options.method=e;n.options.headers=this._mergeHeaders(r);if(this.userAgent!=null){n.options.headers["user-agent"]=this.userAgent}n.options.agent=this._getAgent(n.parsedUrl);if(this.handlers){this.handlers.forEach(e=>{e.prepareRequest(n.options)})}return n}_mergeHeaders(e){const t=e=>Object.keys(e).reduce((t,r)=>(t[r.toLowerCase()]=e[r],t),{});if(this.requestOptions&&this.requestOptions.headers){return Object.assign({},t(this.requestOptions.headers),t(e))}return t(e||{})}_getExistingOrDefaultHeader(e,t,r){const n=e=>Object.keys(e).reduce((t,r)=>(t[r.toLowerCase()]=e[r],t),{});let i;if(this.requestOptions&&this.requestOptions.headers){i=n(this.requestOptions.headers)[t]}return e[t]||i||r}_getAgent(e){let t;let n=a.getProxyUrl(e);let u=n&&n.hostname;if(this._keepAlive&&u){t=this._proxyAgent}if(this._keepAlive&&!u){t=this._agent}if(!!t){return t}const l=e.protocol==="https:";let c=100;if(!!this.requestOptions){c=this.requestOptions.maxSockets||i.globalAgent.maxSockets}if(u){if(!s){s=r(413)}const e={maxSockets:c,keepAlive:this._keepAlive,proxy:{proxyAuth:n.auth,host:n.hostname,port:n.port}};let i;const o=n.protocol==="https:";if(l){i=o?s.httpsOverHttps:s.httpsOverHttp}else{i=o?s.httpOverHttps:s.httpOverHttp}t=i(e);this._proxyAgent=t}if(this._keepAlive&&!t){const e={keepAlive:this._keepAlive,maxSockets:c};t=l?new o.Agent(e):new i.Agent(e);this._agent=t}if(!t){t=l?o.globalAgent:i.globalAgent}if(l&&this._ignoreSslError){t.options=Object.assign(t.options||{},{rejectUnauthorized:false})}return t}_performExponentialBackoff(e){e=Math.min(d,e);const t=v*Math.pow(2,e);return new Promise(e=>setTimeout(()=>e(),t))}static dateTimeDeserializer(e,t){if(typeof t==="string"){let e=new Date(t);if(!isNaN(e.valueOf())){return e}}return t}async _processResponse(e,t){return new Promise(async(r,n)=>{const i=e.message.statusCode;const o={statusCode:i,result:null,headers:{}};if(i==u.NotFound){r(o)}let a;let s;try{s=await e.readBody();if(s&&s.length>0){if(t&&t.deserializeDates){a=JSON.parse(s,HttpClient.dateTimeDeserializer)}else{a=JSON.parse(s)}o.result=a}o.headers=e.message.headers}catch(e){}if(i>299){let e;if(a&&a.message){e=a.message}else if(s&&s.length>0){e=s}else{e="Failed request: ("+i+")"}let t=new Error(e);t["statusCode"]=i;if(o.result){t["result"]=o.result}n(t)}else{r(o)}})}}t.HttpClient=HttpClient},546:function(e,t,r){e.exports=DirReader;var n=r(598);var i=r(689);var o=r(622);var a=r(953);var s=r(357).ok;i(DirReader,a);function DirReader(e){var t=this;if(!(t instanceof DirReader)){throw new Error("DirReader must be called as constructor.")}if(e.type!=="Directory"||!e.Directory){throw new Error("Non-directory type "+e.type)}t.entries=null;t._index=-1;t._paused=false;t._length=-1;if(e.sort){this.sort=e.sort}a.call(this,e)}DirReader.prototype._getEntries=function(){var e=this;if(e._gotEntries)return;e._gotEntries=true;n.readdir(e._path,function(t,r){if(t)return e.error(t);e.entries=r;e.emit("entries",r);if(e._paused)e.once("resume",processEntries);else processEntries();function processEntries(){e._length=e.entries.length;if(typeof e.sort==="function"){e.entries=e.entries.sort(e.sort.bind(e))}e._read()}})};DirReader.prototype._read=function(){var e=this;if(!e.entries)return e._getEntries();if(e._paused||e._currentEntry||e._aborted){return}e._index++;if(e._index>=e.entries.length){if(!e._ended){e._ended=true;e.emit("end");e.emit("close")}return}var t=o.resolve(e._path,e.entries[e._index]);s(t!==e._path);s(e.entries[e._index]);e._currentEntry=t;n[e.props.follow?"stat":"lstat"](t,function(r,n){if(r)return e.error(r);var i=e._proxy||e;n.path=t;n.basename=o.basename(t);n.dirname=o.dirname(t);var s=e.getChildProps.call(i,n);s.path=t;s.basename=o.basename(t);s.dirname=o.dirname(t);var u=a(s,n);e._currentEntry=u;u.on("pause",function(t){if(!e._paused&&!u._disowned){e.pause(t)}});u.on("resume",function(t){if(e._paused&&!u._disowned){e.resume(t)}});u.on("stat",function(t){e.emit("_entryStat",u,t);if(u._aborted)return;if(u._paused){u.once("resume",function(){e.emit("entryStat",u,t)})}else e.emit("entryStat",u,t)});u.on("ready",function EMITCHILD(){if(e._paused){u.pause(e);return e.once("resume",EMITCHILD)}if(u.type==="Socket"){e.emit("socket",u)}else{e.emitEntry(u)}});var l=false;u.on("close",onend);u.on("disown",onend);function onend(){if(l)return;l=true;e.emit("childEnd",u);e.emit("entryEnd",u);e._currentEntry=null;if(!e._paused){e._read()}}u.on("error",function(t){if(u._swallowErrors){e.warn(t);u.emit("end");u.emit("close")}else{e.emit("error",t)}});["child","childEnd","warn"].forEach(function(t){u.on(t,e.emit.bind(e,t))})})};DirReader.prototype.disown=function(e){e.emit("beforeDisown");e._disowned=true;e.parent=e.root=null;if(e===this._currentEntry){this._currentEntry=null}e.emit("disown")};DirReader.prototype.getChildProps=function(){return{depth:this.depth+1,root:this.root||this,parent:this,follow:this.follow,filter:this.filter,sort:this.props.sort,hardlinks:this.props.hardlinks}};DirReader.prototype.pause=function(e){var t=this;if(t._paused)return;e=e||t;t._paused=true;if(t._currentEntry&&t._currentEntry.pause){t._currentEntry.pause(e)}t.emit("pause",e)};DirReader.prototype.resume=function(e){var t=this;if(!t._paused)return;e=e||t;t._paused=false;t.emit("resume",e);if(t._paused){return}if(t._currentEntry){if(t._currentEntry.resume)t._currentEntry.resume(e)}else t._read()};DirReader.prototype.emitEntry=function(e){this.emit("entry",e);this.emit("child",e)}},550:function(e,t){t=e.exports=SemVer;var r;if(typeof process==="object"&&process.env&&process.env.NODE_DEBUG&&/\bsemver\b/i.test(process.env.NODE_DEBUG)){r=function(){var e=Array.prototype.slice.call(arguments,0);e.unshift("SEMVER");console.log.apply(console,e)}}else{r=function(){}}t.SEMVER_SPEC_VERSION="2.0.0";var n=256;var i=Number.MAX_SAFE_INTEGER||9007199254740991;var o=16;var a=t.re=[];var s=t.src=[];var u=t.tokens={};var l=0;function tok(e){u[e]=l++}tok("NUMERICIDENTIFIER");s[u.NUMERICIDENTIFIER]="0|[1-9]\\d*";tok("NUMERICIDENTIFIERLOOSE");s[u.NUMERICIDENTIFIERLOOSE]="[0-9]+";tok("NONNUMERICIDENTIFIER");s[u.NONNUMERICIDENTIFIER]="\\d*[a-zA-Z-][a-zA-Z0-9-]*";tok("MAINVERSION");s[u.MAINVERSION]="("+s[u.NUMERICIDENTIFIER]+")\\."+"("+s[u.NUMERICIDENTIFIER]+")\\."+"("+s[u.NUMERICIDENTIFIER]+")";tok("MAINVERSIONLOOSE");s[u.MAINVERSIONLOOSE]="("+s[u.NUMERICIDENTIFIERLOOSE]+")\\."+"("+s[u.NUMERICIDENTIFIERLOOSE]+")\\."+"("+s[u.NUMERICIDENTIFIERLOOSE]+")";tok("PRERELEASEIDENTIFIER");s[u.PRERELEASEIDENTIFIER]="(?:"+s[u.NUMERICIDENTIFIER]+"|"+s[u.NONNUMERICIDENTIFIER]+")";tok("PRERELEASEIDENTIFIERLOOSE");s[u.PRERELEASEIDENTIFIERLOOSE]="(?:"+s[u.NUMERICIDENTIFIERLOOSE]+"|"+s[u.NONNUMERICIDENTIFIER]+")";tok("PRERELEASE");s[u.PRERELEASE]="(?:-("+s[u.PRERELEASEIDENTIFIER]+"(?:\\."+s[u.PRERELEASEIDENTIFIER]+")*))";tok("PRERELEASELOOSE");s[u.PRERELEASELOOSE]="(?:-?("+s[u.PRERELEASEIDENTIFIERLOOSE]+"(?:\\."+s[u.PRERELEASEIDENTIFIERLOOSE]+")*))";tok("BUILDIDENTIFIER");s[u.BUILDIDENTIFIER]="[0-9A-Za-z-]+";tok("BUILD");s[u.BUILD]="(?:\\+("+s[u.BUILDIDENTIFIER]+"(?:\\."+s[u.BUILDIDENTIFIER]+")*))";tok("FULL");tok("FULLPLAIN");s[u.FULLPLAIN]="v?"+s[u.MAINVERSION]+s[u.PRERELEASE]+"?"+s[u.BUILD]+"?";s[u.FULL]="^"+s[u.FULLPLAIN]+"$";tok("LOOSEPLAIN");s[u.LOOSEPLAIN]="[v=\\s]*"+s[u.MAINVERSIONLOOSE]+s[u.PRERELEASELOOSE]+"?"+s[u.BUILD]+"?";tok("LOOSE");s[u.LOOSE]="^"+s[u.LOOSEPLAIN]+"$";tok("GTLT");s[u.GTLT]="((?:<|>)?=?)";tok("XRANGEIDENTIFIERLOOSE");s[u.XRANGEIDENTIFIERLOOSE]=s[u.NUMERICIDENTIFIERLOOSE]+"|x|X|\\*";tok("XRANGEIDENTIFIER");s[u.XRANGEIDENTIFIER]=s[u.NUMERICIDENTIFIER]+"|x|X|\\*";tok("XRANGEPLAIN");s[u.XRANGEPLAIN]="[v=\\s]*("+s[u.XRANGEIDENTIFIER]+")"+"(?:\\.("+s[u.XRANGEIDENTIFIER]+")"+"(?:\\.("+s[u.XRANGEIDENTIFIER]+")"+"(?:"+s[u.PRERELEASE]+")?"+s[u.BUILD]+"?"+")?)?";tok("XRANGEPLAINLOOSE");s[u.XRANGEPLAINLOOSE]="[v=\\s]*("+s[u.XRANGEIDENTIFIERLOOSE]+")"+"(?:\\.("+s[u.XRANGEIDENTIFIERLOOSE]+")"+"(?:\\.("+s[u.XRANGEIDENTIFIERLOOSE]+")"+"(?:"+s[u.PRERELEASELOOSE]+")?"+s[u.BUILD]+"?"+")?)?";tok("XRANGE");s[u.XRANGE]="^"+s[u.GTLT]+"\\s*"+s[u.XRANGEPLAIN]+"$";tok("XRANGELOOSE");s[u.XRANGELOOSE]="^"+s[u.GTLT]+"\\s*"+s[u.XRANGEPLAINLOOSE]+"$";tok("COERCE");s[u.COERCE]="(^|[^\\d])"+"(\\d{1,"+o+"})"+"(?:\\.(\\d{1,"+o+"}))?"+"(?:\\.(\\d{1,"+o+"}))?"+"(?:$|[^\\d])";tok("COERCERTL");a[u.COERCERTL]=new RegExp(s[u.COERCE],"g");tok("LONETILDE");s[u.LONETILDE]="(?:~>?)";tok("TILDETRIM");s[u.TILDETRIM]="(\\s*)"+s[u.LONETILDE]+"\\s+";a[u.TILDETRIM]=new RegExp(s[u.TILDETRIM],"g");var c="$1~";tok("TILDE");s[u.TILDE]="^"+s[u.LONETILDE]+s[u.XRANGEPLAIN]+"$";tok("TILDELOOSE");s[u.TILDELOOSE]="^"+s[u.LONETILDE]+s[u.XRANGEPLAINLOOSE]+"$";tok("LONECARET");s[u.LONECARET]="(?:\\^)";tok("CARETTRIM");s[u.CARETTRIM]="(\\s*)"+s[u.LONECARET]+"\\s+";a[u.CARETTRIM]=new RegExp(s[u.CARETTRIM],"g");var f="$1^";tok("CARET");s[u.CARET]="^"+s[u.LONECARET]+s[u.XRANGEPLAIN]+"$";tok("CARETLOOSE");s[u.CARETLOOSE]="^"+s[u.LONECARET]+s[u.XRANGEPLAINLOOSE]+"$";tok("COMPARATORLOOSE");s[u.COMPARATORLOOSE]="^"+s[u.GTLT]+"\\s*("+s[u.LOOSEPLAIN]+")$|^$";tok("COMPARATOR");s[u.COMPARATOR]="^"+s[u.GTLT]+"\\s*("+s[u.FULLPLAIN]+")$|^$";tok("COMPARATORTRIM");s[u.COMPARATORTRIM]="(\\s*)"+s[u.GTLT]+"\\s*("+s[u.LOOSEPLAIN]+"|"+s[u.XRANGEPLAIN]+")";a[u.COMPARATORTRIM]=new RegExp(s[u.COMPARATORTRIM],"g");var p="$1$2$3";tok("HYPHENRANGE");s[u.HYPHENRANGE]="^\\s*("+s[u.XRANGEPLAIN]+")"+"\\s+-\\s+"+"("+s[u.XRANGEPLAIN]+")"+"\\s*$";tok("HYPHENRANGELOOSE");s[u.HYPHENRANGELOOSE]="^\\s*("+s[u.XRANGEPLAINLOOSE]+")"+"\\s+-\\s+"+"("+s[u.XRANGEPLAINLOOSE]+")"+"\\s*$";tok("STAR");s[u.STAR]="(<|>)?=?\\s*\\*";for(var h=0;hn){return null}var r=t.loose?a[u.LOOSE]:a[u.FULL];if(!r.test(e)){return null}try{return new SemVer(e,t)}catch(e){return null}}t.valid=valid;function valid(e,t){var r=parse(e,t);return r?r.version:null}t.clean=clean;function clean(e,t){var r=parse(e.trim().replace(/^[=v]+/,""),t);return r?r.version:null}t.SemVer=SemVer;function SemVer(e,t){if(!t||typeof t!=="object"){t={loose:!!t,includePrerelease:false}}if(e instanceof SemVer){if(e.loose===t.loose){return e}else{e=e.version}}else if(typeof e!=="string"){throw new TypeError("Invalid Version: "+e)}if(e.length>n){throw new TypeError("version is longer than "+n+" characters")}if(!(this instanceof SemVer)){return new SemVer(e,t)}r("SemVer",e,t);this.options=t;this.loose=!!t.loose;var o=e.trim().match(t.loose?a[u.LOOSE]:a[u.FULL]);if(!o){throw new TypeError("Invalid Version: "+e)}this.raw=e;this.major=+o[1];this.minor=+o[2];this.patch=+o[3];if(this.major>i||this.major<0){throw new TypeError("Invalid major version")}if(this.minor>i||this.minor<0){throw new TypeError("Invalid minor version")}if(this.patch>i||this.patch<0){throw new TypeError("Invalid patch version")}if(!o[4]){this.prerelease=[]}else{this.prerelease=o[4].split(".").map(function(e){if(/^[0-9]+$/.test(e)){var t=+e;if(t>=0&&t=0){if(typeof this.prerelease[r]==="number"){this.prerelease[r]++;r=-2}}if(r===-1){this.prerelease.push(0)}}if(t){if(this.prerelease[0]===t){if(isNaN(this.prerelease[1])){this.prerelease=[t,0]}}else{this.prerelease=[t,0]}}break;default:throw new Error("invalid increment argument: "+e)}this.format();this.raw=this.version;return this};t.inc=inc;function inc(e,t,r,n){if(typeof r==="string"){n=r;r=undefined}try{return new SemVer(e,r).inc(t,n).version}catch(e){return null}}t.diff=diff;function diff(e,t){if(eq(e,t)){return null}else{var r=parse(e);var n=parse(t);var i="";if(r.prerelease.length||n.prerelease.length){i="pre";var o="prerelease"}for(var a in r){if(a==="major"||a==="minor"||a==="patch"){if(r[a]!==n[a]){return i+a}}}return o}}t.compareIdentifiers=compareIdentifiers;var d=/^[0-9]+$/;function compareIdentifiers(e,t){var r=d.test(e);var n=d.test(t);if(r&&n){e=+e;t=+t}return e===t?0:r&&!n?-1:n&&!r?1:e0}t.lt=lt;function lt(e,t,r){return compare(e,t,r)<0}t.eq=eq;function eq(e,t,r){return compare(e,t,r)===0}t.neq=neq;function neq(e,t,r){return compare(e,t,r)!==0}t.gte=gte;function gte(e,t,r){return compare(e,t,r)>=0}t.lte=lte;function lte(e,t,r){return compare(e,t,r)<=0}t.cmp=cmp;function cmp(e,t,r,n){switch(t){case"===":if(typeof e==="object")e=e.version;if(typeof r==="object")r=r.version;return e===r;case"!==":if(typeof e==="object")e=e.version;if(typeof r==="object")r=r.version;return e!==r;case"":case"=":case"==":return eq(e,r,n);case"!=":return neq(e,r,n);case">":return gt(e,r,n);case">=":return gte(e,r,n);case"<":return lt(e,r,n);case"<=":return lte(e,r,n);default:throw new TypeError("Invalid operator: "+t)}}t.Comparator=Comparator;function Comparator(e,t){if(!t||typeof t!=="object"){t={loose:!!t,includePrerelease:false}}if(e instanceof Comparator){if(e.loose===!!t.loose){return e}else{e=e.value}}if(!(this instanceof Comparator)){return new Comparator(e,t)}r("comparator",e,t);this.options=t;this.loose=!!t.loose;this.parse(e);if(this.semver===v){this.value=""}else{this.value=this.operator+this.semver.version}r("comp",this)}var v={};Comparator.prototype.parse=function(e){var t=this.options.loose?a[u.COMPARATORLOOSE]:a[u.COMPARATOR];var r=e.match(t);if(!r){throw new TypeError("Invalid comparator: "+e)}this.operator=r[1]!==undefined?r[1]:"";if(this.operator==="="){this.operator=""}if(!r[2]){this.semver=v}else{this.semver=new SemVer(r[2],this.options.loose)}};Comparator.prototype.toString=function(){return this.value};Comparator.prototype.test=function(e){r("Comparator.test",e,this.options.loose);if(this.semver===v||e===v){return true}if(typeof e==="string"){try{e=new SemVer(e,this.options)}catch(e){return false}}return cmp(e,this.operator,this.semver,this.options)};Comparator.prototype.intersects=function(e,t){if(!(e instanceof Comparator)){throw new TypeError("a Comparator is required")}if(!t||typeof t!=="object"){t={loose:!!t,includePrerelease:false}}var r;if(this.operator===""){if(this.value===""){return true}r=new Range(e.value,t);return satisfies(this.value,r,t)}else if(e.operator===""){if(e.value===""){return true}r=new Range(this.value,t);return satisfies(e.semver,r,t)}var n=(this.operator===">="||this.operator===">")&&(e.operator===">="||e.operator===">");var i=(this.operator==="<="||this.operator==="<")&&(e.operator==="<="||e.operator==="<");var o=this.semver.version===e.semver.version;var a=(this.operator===">="||this.operator==="<=")&&(e.operator===">="||e.operator==="<=");var s=cmp(this.semver,"<",e.semver,t)&&((this.operator===">="||this.operator===">")&&(e.operator==="<="||e.operator==="<"));var u=cmp(this.semver,">",e.semver,t)&&((this.operator==="<="||this.operator==="<")&&(e.operator===">="||e.operator===">"));return n||i||o&&a||s||u};t.Range=Range;function Range(e,t){if(!t||typeof t!=="object"){t={loose:!!t,includePrerelease:false}}if(e instanceof Range){if(e.loose===!!t.loose&&e.includePrerelease===!!t.includePrerelease){return e}else{return new Range(e.raw,t)}}if(e instanceof Comparator){return new Range(e.value,t)}if(!(this instanceof Range)){return new Range(e,t)}this.options=t;this.loose=!!t.loose;this.includePrerelease=!!t.includePrerelease;this.raw=e;this.set=e.split(/\s*\|\|\s*/).map(function(e){return this.parseRange(e.trim())},this).filter(function(e){return e.length});if(!this.set.length){throw new TypeError("Invalid SemVer Range: "+e)}this.format()}Range.prototype.format=function(){this.range=this.set.map(function(e){return e.join(" ").trim()}).join("||").trim();return this.range};Range.prototype.toString=function(){return this.range};Range.prototype.parseRange=function(e){var t=this.options.loose;e=e.trim();var n=t?a[u.HYPHENRANGELOOSE]:a[u.HYPHENRANGE];e=e.replace(n,hyphenReplace);r("hyphen replace",e);e=e.replace(a[u.COMPARATORTRIM],p);r("comparator trim",e,a[u.COMPARATORTRIM]);e=e.replace(a[u.TILDETRIM],c);e=e.replace(a[u.CARETTRIM],f);e=e.split(/\s+/).join(" ");var i=t?a[u.COMPARATORLOOSE]:a[u.COMPARATOR];var o=e.split(" ").map(function(e){return parseComparator(e,this.options)},this).join(" ").split(/\s+/);if(this.options.loose){o=o.filter(function(e){return!!e.match(i)})}o=o.map(function(e){return new Comparator(e,this.options)},this);return o};Range.prototype.intersects=function(e,t){if(!(e instanceof Range)){throw new TypeError("a Range is required")}return this.set.some(function(r){return isSatisfiable(r,t)&&e.set.some(function(e){return isSatisfiable(e,t)&&r.every(function(r){return e.every(function(e){return r.intersects(e,t)})})})})};function isSatisfiable(e,t){var r=true;var n=e.slice();var i=n.pop();while(r&&n.length){r=n.every(function(e){return i.intersects(e,t)});i=n.pop()}return r}t.toComparators=toComparators;function toComparators(e,t){return new Range(e,t).set.map(function(e){return e.map(function(e){return e.value}).join(" ").trim().split(" ")})}function parseComparator(e,t){r("comp",e,t);e=replaceCarets(e,t);r("caret",e);e=replaceTildes(e,t);r("tildes",e);e=replaceXRanges(e,t);r("xrange",e);e=replaceStars(e,t);r("stars",e);return e}function isX(e){return!e||e.toLowerCase()==="x"||e==="*"}function replaceTildes(e,t){return e.trim().split(/\s+/).map(function(e){return replaceTilde(e,t)}).join(" ")}function replaceTilde(e,t){var n=t.loose?a[u.TILDELOOSE]:a[u.TILDE];return e.replace(n,function(t,n,i,o,a){r("tilde",e,t,n,i,o,a);var s;if(isX(n)){s=""}else if(isX(i)){s=">="+n+".0.0 <"+(+n+1)+".0.0"}else if(isX(o)){s=">="+n+"."+i+".0 <"+n+"."+(+i+1)+".0"}else if(a){r("replaceTilde pr",a);s=">="+n+"."+i+"."+o+"-"+a+" <"+n+"."+(+i+1)+".0"}else{s=">="+n+"."+i+"."+o+" <"+n+"."+(+i+1)+".0"}r("tilde return",s);return s})}function replaceCarets(e,t){return e.trim().split(/\s+/).map(function(e){return replaceCaret(e,t)}).join(" ")}function replaceCaret(e,t){r("caret",e,t);var n=t.loose?a[u.CARETLOOSE]:a[u.CARET];return e.replace(n,function(t,n,i,o,a){r("caret",e,t,n,i,o,a);var s;if(isX(n)){s=""}else if(isX(i)){s=">="+n+".0.0 <"+(+n+1)+".0.0"}else if(isX(o)){if(n==="0"){s=">="+n+"."+i+".0 <"+n+"."+(+i+1)+".0"}else{s=">="+n+"."+i+".0 <"+(+n+1)+".0.0"}}else if(a){r("replaceCaret pr",a);if(n==="0"){if(i==="0"){s=">="+n+"."+i+"."+o+"-"+a+" <"+n+"."+i+"."+(+o+1)}else{s=">="+n+"."+i+"."+o+"-"+a+" <"+n+"."+(+i+1)+".0"}}else{s=">="+n+"."+i+"."+o+"-"+a+" <"+(+n+1)+".0.0"}}else{r("no pr");if(n==="0"){if(i==="0"){s=">="+n+"."+i+"."+o+" <"+n+"."+i+"."+(+o+1)}else{s=">="+n+"."+i+"."+o+" <"+n+"."+(+i+1)+".0"}}else{s=">="+n+"."+i+"."+o+" <"+(+n+1)+".0.0"}}r("caret return",s);return s})}function replaceXRanges(e,t){r("replaceXRanges",e,t);return e.split(/\s+/).map(function(e){return replaceXRange(e,t)}).join(" ")}function replaceXRange(e,t){e=e.trim();var n=t.loose?a[u.XRANGELOOSE]:a[u.XRANGE];return e.replace(n,function(n,i,o,a,s,u){r("xRange",e,n,i,o,a,s,u);var l=isX(o);var c=l||isX(a);var f=c||isX(s);var p=f;if(i==="="&&p){i=""}u=t.includePrerelease?"-0":"";if(l){if(i===">"||i==="<"){n="<0.0.0-0"}else{n="*"}}else if(i&&p){if(c){a=0}s=0;if(i===">"){i=">=";if(c){o=+o+1;a=0;s=0}else{a=+a+1;s=0}}else if(i==="<="){i="<";if(c){o=+o+1}else{a=+a+1}}n=i+o+"."+a+"."+s+u}else if(c){n=">="+o+".0.0"+u+" <"+(+o+1)+".0.0"+u}else if(f){n=">="+o+"."+a+".0"+u+" <"+o+"."+(+a+1)+".0"+u}r("xRange return",n);return n})}function replaceStars(e,t){r("replaceStars",e,t);return e.trim().replace(a[u.STAR],"")}function hyphenReplace(e,t,r,n,i,o,a,s,u,l,c,f,p){if(isX(r)){t=""}else if(isX(n)){t=">="+r+".0.0"}else if(isX(i)){t=">="+r+"."+n+".0"}else{t=">="+t}if(isX(u)){s=""}else if(isX(l)){s="<"+(+u+1)+".0.0"}else if(isX(c)){s="<"+u+"."+(+l+1)+".0"}else if(f){s="<="+u+"."+l+"."+c+"-"+f}else{s="<="+s}return(t+" "+s).trim()}Range.prototype.test=function(e){if(!e){return false}if(typeof e==="string"){try{e=new SemVer(e,this.options)}catch(e){return false}}for(var t=0;t0){var o=e[i].semver;if(o.major===t.major&&o.minor===t.minor&&o.patch===t.patch){return true}}}return false}return true}t.satisfies=satisfies;function satisfies(e,t,r){try{t=new Range(t,r)}catch(e){return false}return t.test(e)}t.maxSatisfying=maxSatisfying;function maxSatisfying(e,t,r){var n=null;var i=null;try{var o=new Range(t,r)}catch(e){return null}e.forEach(function(e){if(o.test(e)){if(!n||i.compare(e)===-1){n=e;i=new SemVer(n,r)}}});return n}t.minSatisfying=minSatisfying;function minSatisfying(e,t,r){var n=null;var i=null;try{var o=new Range(t,r)}catch(e){return null}e.forEach(function(e){if(o.test(e)){if(!n||i.compare(e)===1){n=e;i=new SemVer(n,r)}}});return n}t.minVersion=minVersion;function minVersion(e,t){e=new Range(e,t);var r=new SemVer("0.0.0");if(e.test(r)){return r}r=new SemVer("0.0.0-0");if(e.test(r)){return r}r=null;for(var n=0;n":if(t.prerelease.length===0){t.patch++}else{t.prerelease.push(0)}t.raw=t.format();case"":case">=":if(!r||gt(r,t)){r=t}break;case"<":case"<=":break;default:throw new Error("Unexpected operation: "+e.operator)}})}if(r&&e.test(r)){return r}return null}t.validRange=validRange;function validRange(e,t){try{return new Range(e,t).range||"*"}catch(e){return null}}t.ltr=ltr;function ltr(e,t,r){return outside(e,t,"<",r)}t.gtr=gtr;function gtr(e,t,r){return outside(e,t,">",r)}t.outside=outside;function outside(e,t,r,n){e=new SemVer(e,n);t=new Range(t,n);var i,o,a,s,u;switch(r){case">":i=gt;o=lte;a=lt;s=">";u=">=";break;case"<":i=lt;o=gte;a=gt;s="<";u="<=";break;default:throw new TypeError('Must provide a hilo val of "<" or ">"')}if(satisfies(e,t,n)){return false}for(var l=0;l=0.0.0")}f=f||e;p=p||e;if(i(e.semver,f.semver,n)){f=e}else if(a(e.semver,p.semver,n)){p=e}});if(f.operator===s||f.operator===u){return false}if((!p.operator||p.operator===s)&&o(e,p.semver)){return false}else if(p.operator===u&&a(e,p.semver)){return false}}return true}t.prerelease=prerelease;function prerelease(e,t){var r=parse(e,t);return r&&r.prerelease.length?r.prerelease:null}t.intersects=intersects;function intersects(e,t,r){e=new Range(e,r);t=new Range(t,r);return e.intersects(t)}t.coerce=coerce;function coerce(e,t){if(e instanceof SemVer){return e}if(typeof e==="number"){e=String(e)}if(typeof e!=="string"){return null}t=t||{};var r=null;if(!t.rtl){r=e.match(a[u.COERCE])}else{var n;while((n=a[u.COERCERTL].exec(e))&&(!r||r.index+r[0].length!==e.length)){if(!r||n.index+n[0].length!==r.index+r[0].length){r=n}a[u.COERCERTL].lastIndex=n.index+n[1].length+n[2].length}a[u.COERCERTL].lastIndex=-1}if(r===null){return null}return parse(r[2]+"."+(r[3]||"0")+"."+(r[4]||"0"),t)}},553:function(e,t,r){"use strict";var n=r(574);function DuplexWrapper(e,t,r){if(typeof r==="undefined"){r=t;t=e;e=null}n.Duplex.call(this,e);if(typeof r.read!=="function"){r=new n.Readable(e).wrap(r)}this._writable=t;this._readable=r;this._waiting=false;var i=this;t.once("finish",function(){i.end()});this.once("finish",function(){t.end()});r.on("readable",function(){if(i._waiting){i._waiting=false;i._read()}});r.once("end",function(){i.push(null)});if(!e||typeof e.bubbleErrors==="undefined"||e.bubbleErrors){t.on("error",function(e){i.emit("error",e)});r.on("error",function(e){i.emit("error",e)})}}DuplexWrapper.prototype=Object.create(n.Duplex.prototype,{constructor:{value:DuplexWrapper}});DuplexWrapper.prototype._write=function _write(e,t,r){this._writable.write(e,t,r)};DuplexWrapper.prototype._read=function _read(){var e;var t=0;while((e=this._readable.read())!==null){this.push(e);t++}if(t===0){this._waiting=true}};e.exports=function duplex2(e,t,r){return new DuplexWrapper(e,t,r)};e.exports.DuplexWrapper=DuplexWrapper},566:function(e){if(typeof Object.create==="function"){e.exports=function inherits(e,t){if(t){e.super_=t;e.prototype=Object.create(t.prototype,{constructor:{value:e,enumerable:false,writable:true,configurable:true}})}}}else{e.exports=function inherits(e,t){if(t){e.super_=t;var r=function(){};r.prototype=t.prototype;e.prototype=new r;e.prototype.constructor=e}}}},569:function(e,t,r){e.exports=rimraf;rimraf.sync=rimrafSync;var n=r(357);var i=r(622);var o=r(747);var a=undefined;try{a=r(402)}catch(e){}var s=parseInt("666",8);var u={nosort:true,silent:true};var l=0;var c=process.platform==="win32";function defaults(e){var t=["unlink","chmod","stat","lstat","rmdir","readdir"];t.forEach(function(t){e[t]=e[t]||o[t];t=t+"Sync";e[t]=e[t]||o[t]});e.maxBusyTries=e.maxBusyTries||3;e.emfileWait=e.emfileWait||1e3;if(e.glob===false){e.disableGlob=true}if(e.disableGlob!==true&&a===undefined){throw Error("glob dependency not found, set `options.disableGlob = true` if intentional")}e.disableGlob=e.disableGlob||false;e.glob=e.glob||u}function rimraf(e,t,r){if(typeof t==="function"){r=t;t={}}n(e,"rimraf: missing path");n.equal(typeof e,"string","rimraf: path should be a string");n.equal(typeof r,"function","rimraf: callback function required");n(t,"rimraf: invalid options argument provided");n.equal(typeof t,"object","rimraf: options should be object");defaults(t);var i=0;var o=null;var s=0;if(t.disableGlob||!a.hasMagic(e))return afterGlob(null,[e]);t.lstat(e,function(r,n){if(!r)return afterGlob(null,[e]);a(e,t.glob,afterGlob)});function next(e){o=o||e;if(--s===0)r(o)}function afterGlob(e,n){if(e)return r(e);s=n.length;if(s===0)return r();n.forEach(function(e){rimraf_(e,t,function CB(r){if(r){if((r.code==="EBUSY"||r.code==="ENOTEMPTY"||r.code==="EPERM")&&i=0&&l>0){n=[];o=r.length;while(c>=0&&!s){if(c==u){n.push(c);u=r.indexOf(e,c+1)}else if(n.length==1){s=[n.pop(),l]}else{i=n.pop();if(i=0?u:l}if(n.length){s=[o,a]}}return s}},622:function(e){e.exports=require("path")},626:function(e,t,r){var n=r(622);var i=r(747);var o=parseInt("0777",8);e.exports=mkdirP.mkdirp=mkdirP.mkdirP=mkdirP;function mkdirP(e,t,r,a){if(typeof t==="function"){r=t;t={}}else if(!t||typeof t!=="object"){t={mode:t}}var s=t.mode;var u=t.fs||i;if(s===undefined){s=o}if(!a)a=null;var l=r||function(){};e=n.resolve(e);u.mkdir(e,s,function(r){if(!r){a=a||e;return l(null,a)}switch(r.code){case"ENOENT":if(n.dirname(e)===e)return l(r);mkdirP(n.dirname(e),t,function(r,n){if(r)l(r,n);else mkdirP(e,t,l,n)});break;default:u.stat(e,function(e,t){if(e||!t.isDirectory())l(r,a);else l(null,a)});break}})}mkdirP.sync=function sync(e,t,r){if(!t||typeof t!=="object"){t={mode:t}}var a=t.mode;var s=t.fs||i;if(a===undefined){a=o}if(!r)r=null;e=n.resolve(e);try{s.mkdirSync(e,a);r=r||e}catch(i){switch(i.code){case"ENOENT":r=sync(n.dirname(e),t,r);sync(e,t,r);break;default:var u;try{u=s.statSync(e)}catch(e){throw i}if(!u.isDirectory())throw i;break}}return r}},631:function(e){e.exports=require("net")},634:function(e,t,r){var n=r(11);var i=Object.create(null);var o=r(49);e.exports=n(inflight);function inflight(e,t){if(i[e]){i[e].push(t);return null}else{i[e]=[t];return makeres(e)}}function makeres(e){return o(function RES(){var t=i[e];var r=t.length;var n=slice(arguments);try{for(var o=0;or){t.splice(0,r);process.nextTick(function(){RES.apply(null,n)})}else{delete i[e]}}})}function slice(e){var t=e.length;var r=[];for(var n=0;n1){var t=e.pop();var n=t.obj[t.prop];if(r(n)){var i=[];for(var o=0;o=48&&s<=57||s>=65&&s<=90||s>=97&&s<=122){o+=i.charAt(a);continue}if(s<128){o=o+n[s];continue}if(s<2048){o=o+(n[192|s>>6]+n[128|s&63]);continue}if(s<55296||s>=57344){o=o+(n[224|s>>12]+n[128|s>>6&63]+n[128|s&63]);continue}a+=1;s=65536+((s&1023)<<10|i.charCodeAt(a)&1023);o+=n[240|s>>18]+n[128|s>>12&63]+n[128|s>>6&63]+n[128|s&63]}return o};var c=function compact(e){var t=[{obj:{o:e},prop:"o"}];var r=[];for(var n=0;n=0?e:this.length-e;var i=[].slice.call(arguments,2);if(t===undefined){t=this.length-n}else if(t>this.length-n){t=this.length-n}for(var e=0;e0){var l=n-s;if(l+t0){var h=i.slice();h.unshift(f);h.push(p);r.splice.apply(r,[u,1].concat(h));u+=h.length;i=[]}else{r.splice(u,1,f,p);u+=2}}else{o.push(r[u].slice(l));r[u]=r[u].slice(0,l);u++}}if(i.length>0){r.splice.apply(r,[u,0].concat(i));u+=i.length}while(o.lengththis.length)t=this.length;var n=0;for(var i=0;i=t-e?Math.min(l+(t-e)-a,u):u;r[s].copy(o,a,l,c);a+=c-l}return o};Buffers.prototype.pos=function(e){if(e<0||e>=this.length)throw new Error("oob");var t=e,r=0,n=null;for(;;){n=this.buffers[r];if(t=this.buffers[r].length){n=0;r++;if(r>=this.buffers.length){return-1}}var u=this.buffers[r][n];if(u==e[i]){if(i==0){o={i:r,j:n,pos:a}}i++;if(i==e.length){return o.pos}}else if(i!=0){r=o.i;n=o.j;a=o.pos;i=0}n++;a++}};Buffers.prototype.toBuffer=function(){return this.slice()};Buffers.prototype.toString=function(e,t,r){return this.slice(t,r).toString(e)}},643:function(e,t,r){"use strict";var n=r(819);var i=r(339);var o=r(755);e.exports={formats:o,parse:i,stringify:n}},657:function(e,t,r){var n=r(293).Buffer;if(n.from===undefined){n.from=function(e,t,r){return new n(e,t,r)};n.alloc=n.from}e.exports=n},658:function(e){"use strict";e.exports=function(e){var t=e._SomePromiseArray;function any(e){var r=new t(e);var n=r.promise();r.setHowMany(1);r.setUnwrap();r.init();return n}e.any=function(e){return any(e)};e.prototype.any=function(){return any(this)}}},663:function(e,t,r){"use strict";var n=r(248);var i=n.maybeWrapAsError;var o=r(607);var a=o.OperationalError;var s=r(883);function isUntypedError(e){return e instanceof Error&&s.getPrototypeOf(e)===Error.prototype}var u=/^(?:name|message|stack|cause)$/;function wrapAsOperationalError(e){var t;if(isUntypedError(e)){t=new a(e);t.name=e.name;t.message=e.message;t.stack=e.stack;var r=s.keys(e);for(var i=0;i=r)return t.mkdir(e);try{yield t.mkdir(e);return}catch(n){switch(n.code){case"ENOENT":{yield mkdirP(s.dirname(e),r,i+1);yield t.mkdir(e);return}default:{let r;try{r=yield t.stat(e)}catch(e){throw n}if(!r.isDirectory())throw n}}}})}t.mkdirP=mkdirP;function tryGetExecutablePath(e,r){return n(this,void 0,void 0,function*(){let n=undefined;try{n=yield t.stat(e)}catch(t){if(t.code!=="ENOENT"){console.log(`Unexpected error attempting to determine if executable file exists '${e}': ${t}`)}}if(n&&n.isFile()){if(t.IS_WINDOWS){const t=s.extname(e).toUpperCase();if(r.some(e=>e.toUpperCase()===t)){return e}}else{if(isUnixExecutable(n)){return e}}}const i=e;for(const o of r){e=i+o;n=undefined;try{n=yield t.stat(e)}catch(t){if(t.code!=="ENOENT"){console.log(`Unexpected error attempting to determine if executable file exists '${e}': ${t}`)}}if(n&&n.isFile()){if(t.IS_WINDOWS){try{const r=s.dirname(e);const n=s.basename(e).toUpperCase();for(const i of yield t.readdir(r)){if(n===i.toUpperCase()){e=s.join(r,i);break}}}catch(t){console.log(`Unexpected error attempting to determine the actual case of the file '${e}': ${t}`)}return e}else{if(isUnixExecutable(n)){return e}}}}return""})}t.tryGetExecutablePath=tryGetExecutablePath;function normalizeSeparators(e){e=e||"";if(t.IS_WINDOWS){e=e.replace(/\//g,"\\");return e.replace(/\\\\+/g,"\\")}return e.replace(/\/\/+/g,"/")}function isUnixExecutable(e){return(e.mode&1)>0||(e.mode&8)>0&&e.gid===process.getgid()||(e.mode&64)>0&&e.uid===process.getuid()}},674:function(e,t,r){"use strict";var n=r(608).Buffer;var i=n.isEncoding||function(e){e=""+e;switch(e&&e.toLowerCase()){case"hex":case"utf8":case"utf-8":case"ascii":case"binary":case"base64":case"ucs2":case"ucs-2":case"utf16le":case"utf-16le":case"raw":return true;default:return false}};function _normalizeEncoding(e){if(!e)return"utf8";var t;while(true){switch(e){case"utf8":case"utf-8":return"utf8";case"ucs2":case"ucs-2":case"utf16le":case"utf-16le":return"utf16le";case"latin1":case"binary":return"latin1";case"base64":case"ascii":case"hex":return e;default:if(t)return;e=(""+e).toLowerCase();t=true}}}function normalizeEncoding(e){var t=_normalizeEncoding(e);if(typeof t!=="string"&&(n.isEncoding===i||!i(e)))throw new Error("Unknown encoding: "+e);return t||e}t.StringDecoder=StringDecoder;function StringDecoder(e){this.encoding=normalizeEncoding(e);var t;switch(this.encoding){case"utf16le":this.text=utf16Text;this.end=utf16End;t=4;break;case"utf8":this.fillLast=utf8FillLast;t=4;break;case"base64":this.text=base64Text;this.end=base64End;t=3;break;default:this.write=simpleWrite;this.end=simpleEnd;return}this.lastNeed=0;this.lastTotal=0;this.lastChar=n.allocUnsafe(t)}StringDecoder.prototype.write=function(e){if(e.length===0)return"";var t;var r;if(this.lastNeed){t=this.fillLast(e);if(t===undefined)return"";r=this.lastNeed;this.lastNeed=0}else{r=0}if(r>5===6)return 2;else if(e>>4===14)return 3;else if(e>>3===30)return 4;return e>>6===2?-1:-2}function utf8CheckIncomplete(e,t,r){var n=t.length-1;if(n=0){if(i>0)e.lastNeed=i-1;return i}if(--n=0){if(i>0)e.lastNeed=i-2;return i}if(--n=0){if(i>0){if(i===2)i=0;else e.lastNeed=i-3}return i}return 0}function utf8CheckExtraBytes(e,t,r){if((t[0]&192)!==128){e.lastNeed=0;return"�"}if(e.lastNeed>1&&t.length>1){if((t[1]&192)!==128){e.lastNeed=1;return"�"}if(e.lastNeed>2&&t.length>2){if((t[2]&192)!==128){e.lastNeed=2;return"�"}}}}function utf8FillLast(e){var t=this.lastTotal-this.lastNeed;var r=utf8CheckExtraBytes(this,e,t);if(r!==undefined)return r;if(this.lastNeed<=e.length){e.copy(this.lastChar,t,0,this.lastNeed);return this.lastChar.toString(this.encoding,0,this.lastTotal)}e.copy(this.lastChar,t,0,e.length);this.lastNeed-=e.length}function utf8Text(e,t){var r=utf8CheckIncomplete(this,e,t);if(!this.lastNeed)return e.toString("utf8",t);this.lastTotal=r;var n=e.length-(r-this.lastNeed);e.copy(this.lastChar,0,n);return e.toString("utf8",t,n)}function utf8End(e){var t=e&&e.length?this.write(e):"";if(this.lastNeed)return t+"�";return t}function utf16Text(e,t){if((e.length-t)%2===0){var r=e.toString("utf16le",t);if(r){var n=r.charCodeAt(r.length-1);if(n>=55296&&n<=56319){this.lastNeed=2;this.lastTotal=4;this.lastChar[0]=e[e.length-2];this.lastChar[1]=e[e.length-1];return r.slice(0,-1)}}return r}this.lastNeed=1;this.lastTotal=2;this.lastChar[0]=e[e.length-1];return e.toString("utf16le",t,e.length-1)}function utf16End(e){var t=e&&e.length?this.write(e):"";if(this.lastNeed){var r=this.lastTotal-this.lastNeed;return t+this.lastChar.toString("utf16le",0,r)}return t}function base64Text(e,t){var r=(e.length-t)%3;if(r===0)return e.toString("base64",t);this.lastNeed=3-r;this.lastTotal=3;if(r===1){this.lastChar[0]=e[e.length-1]}else{this.lastChar[0]=e[e.length-2];this.lastChar[1]=e[e.length-1]}return e.toString("base64",t,e.length-r)}function base64End(e){var t=e&&e.length?this.write(e):"";if(this.lastNeed)return t+this.lastChar.toString("base64",0,3-this.lastNeed);return t}function simpleWrite(e){return e.toString(this.encoding)}function simpleEnd(e){return e&&e.length?this.write(e):""}},677:function(e,t,r){var n=r(479);var i=r(887);var o=r(194);var a=r(440);var s=r(29);var u=r(474);var l=r(657);var c=r(622);var f=r(311).Writer;var p=r(287);var h=l.alloc(4);h.writeUInt32LE(101010256,0);function getCrxHeader(e){var t=e.stream(0).pipe(i());return t.pull(4).then(function(e){var r=e.readUInt32LE(0);if(r===875721283){var i;return t.pull(12).then(function(e){i=n.parse(e).word32lu("version").word32lu("pubKeyLength").word32lu("signatureLength").vars}).then(function(){return t.pull(i.pubKeyLength+i.signatureLength)}).then(function(e){i.publicKey=e.slice(0,i.pubKeyLength);i.signature=e.slice(i.pubKeyLength);i.size=16+i.pubKeyLength+i.signatureLength;return i})}})}function getZip64CentralDirectory(e,t){var r=n.parse(t).word32lu("signature").word32lu("diskNumber").word64lu("offsetToStartOfCentralDirectory").word32lu("numberOfDisks").vars;if(r.signature!=117853008){throw new Error("invalid zip64 end of central dir locator signature (0x07064b50): 0x"+r.signature.toString(16))}var o=i();e.stream(r.offsetToStartOfCentralDirectory).pipe(o);return o.pull(56)}function parseZip64DirRecord(e){var t=n.parse(e).word32lu("signature").word64lu("sizeOfCentralDirectory").word16lu("version").word16lu("versionsNeededToExtract").word32lu("diskNumber").word32lu("diskStart").word64lu("numberOfRecordsOnDisk").word64lu("numberOfRecords").word64lu("sizeOfCentralDirectory").word64lu("offsetToStartOfCentralDirectory").vars;if(t.signature!=101075792){throw new Error("invalid zip64 end of central dir locator signature (0x06064b50): 0x0"+t.signature.toString(16))}return t}e.exports=function centralDirectory(e,t){var r=i(),l=i(),d=t&&t.tailSize||80,v,y,g,m;if(t&&t.crx)y=getCrxHeader(e);return e.size().then(function(t){v=t;e.stream(Math.max(0,t-d)).on("error",function(e){r.emit("error",e)}).pipe(r);return r.pull(h)}).then(function(){return a.props({directory:r.pull(22),crxHeader:y})}).then(function(t){var o=t.directory;g=t.crxHeader&&t.crxHeader.size||0;m=n.parse(o).word32lu("signature").word16lu("diskNumber").word16lu("diskStart").word16lu("numberOfRecordsOnDisk").word16lu("numberOfRecords").word32lu("sizeOfCentralDirectory").word32lu("offsetToStartOfCentralDirectory").word16lu("commentLength").vars;if(m.numberOfRecords==65535||m.numberOfRecords==65535||m.offsetToStartOfCentralDirectory==4294967295){const t=20;const n=v-(d-r.match+t);const o=i();e.stream(n).pipe(o);return o.pull(t).then(function(t){return getZip64CentralDirectory(e,t)}).then(function(e){m=parseZip64DirRecord(e)})}else{m.offsetToStartOfCentralDirectory+=g}}).then(function(){e.stream(m.offsetToStartOfCentralDirectory).pipe(l);m.extract=function(e){if(!e||!e.path)throw new Error("PATH_MISSING");return m.files.then(function(t){return a.map(t,function(t){if(t.type=="Directory")return;var r=c.join(e.path,t.path);if(r.indexOf(e.path)!=0){return}var n=e.getWriter?e.getWriter({path:r}):f({path:r});return new a(function(r,i){t.stream(e.password).on("error",i).pipe(n).on("close",r).on("error",i)})},e.concurrency>1?{concurrency:e.concurrency||undefined}:undefined)})};m.files=a.mapSeries(Array(m.numberOfRecords),function(){return l.pull(46).then(function(t){var r=n.parse(t).word32lu("signature").word16lu("versionMadeBy").word16lu("versionsNeededToExtract").word16lu("flags").word16lu("compressionMethod").word16lu("lastModifiedTime").word16lu("lastModifiedDate").word32lu("crc32").word32lu("compressedSize").word32lu("uncompressedSize").word16lu("fileNameLength").word16lu("extraFieldLength").word16lu("fileCommentLength").word16lu("diskNumber").word16lu("internalFileAttributes").word32lu("externalFileAttributes").word32lu("offsetToLocalFileHeader").vars;r.offsetToLocalFileHeader+=g;r.lastModifiedDateTime=p(r.lastModifiedDate,r.lastModifiedTime);return l.pull(r.fileNameLength).then(function(e){r.pathBuffer=e;r.path=e.toString("utf8");r.isUnicode=r.flags&17;return l.pull(r.extraFieldLength)}).then(function(e){r.extra=u(e,r);return l.pull(r.fileCommentLength)}).then(function(t){r.comment=t;r.type=r.uncompressedSize===0&&/[\/\\]$/.test(r.path)?"Directory":"File";r.stream=function(t){return o(e,r.offsetToLocalFileHeader,t,r)};r.buffer=function(e){return s(r.stream(e))};return r})})});return a.props(m)})}},681:function(e){"use strict";function posix(e){return e.charAt(0)==="/"}function win32(e){var t=/^([a-zA-Z]:|[\\\/]{2}[^\\\/]+[\\\/]+[^\\\/]+)?([\\\/])?([\s\S]*?)$/;var r=t.exec(e);var n=r[1]||"";var i=Boolean(n&&n.charAt(1)!==":");return Boolean(r[2]||i)}e.exports=process.platform==="win32"?win32:posix;e.exports.posix=posix;e.exports.win32=win32},685:function(e){"use strict";e.exports=function(e,t){var r=e.reduce;var n=e.all;function promiseAllThis(){return n(this)}function PromiseMapSeries(e,n){return r(e,n,t,t)}e.prototype.each=function(e){return r(this,e,t,0)._then(promiseAllThis,undefined,undefined,this,undefined)};e.prototype.mapSeries=function(e){return r(this,e,t,t)};e.each=function(e,n){return r(e,n,t,0)._then(promiseAllThis,undefined,undefined,e,undefined)};e.mapSeries=PromiseMapSeries}},689:function(e,t,r){try{var n=r(669);if(typeof n.inherits!=="function")throw"";e.exports=n.inherits}catch(t){e.exports=r(566)}},694:function(e,t,r){"use strict";e.exports=function(e){var t=r(248);var n=e._async;var i=t.tryCatch;var o=t.errorObj;function spreadAdapter(e,r){var a=this;if(!t.isArray(e))return successAdapter.call(a,e,r);var s=i(r).apply(a._boundValue(),[null].concat(e));if(s===o){n.throwLater(s.e)}}function successAdapter(e,t){var r=this;var a=r._boundValue();var s=e===undefined?i(t).call(a,null):i(t).call(a,null,e);if(s===o){n.throwLater(s.e)}}function errorAdapter(e,t){var r=this;if(!e){var a=new Error(e+"");a.cause=e;e=a}var s=i(t).call(r._boundValue(),e);if(s===o){n.throwLater(s.e)}}e.prototype.asCallback=e.prototype.nodeify=function(e,t){if(typeof e=="function"){var r=successAdapter;if(t!==undefined&&Object(t).spread){r=spreadAdapter}this._then(r,errorAdapter,undefined,this,e)}return this}}},715:function(e){"use strict";e.exports=function(e){function PromiseInspection(e){if(e!==undefined){e=e._target();this._bitField=e._bitField;this._settledValueField=e._isFateSealed()?e._settledValue():undefined}else{this._bitField=0;this._settledValueField=undefined}}PromiseInspection.prototype._settledValue=function(){return this._settledValueField};var t=PromiseInspection.prototype.value=function(){if(!this.isFulfilled()){throw new TypeError("cannot get fulfillment value of a non-fulfilled promise\n\n See http://goo.gl/MqrFmX\n")}return this._settledValue()};var r=PromiseInspection.prototype.error=PromiseInspection.prototype.reason=function(){if(!this.isRejected()){throw new TypeError("cannot get rejection reason of a non-rejected promise\n\n See http://goo.gl/MqrFmX\n")}return this._settledValue()};var n=PromiseInspection.prototype.isFulfilled=function(){return(this._bitField&33554432)!==0};var i=PromiseInspection.prototype.isRejected=function(){return(this._bitField&16777216)!==0};var o=PromiseInspection.prototype.isPending=function(){return(this._bitField&50397184)===0};var a=PromiseInspection.prototype.isResolved=function(){return(this._bitField&50331648)!==0};PromiseInspection.prototype.isCancelled=function(){return(this._bitField&8454144)!==0};e.prototype.__isCancelled=function(){return(this._bitField&65536)===65536};e.prototype._isCancelled=function(){return this._target().__isCancelled()};e.prototype.isCancelled=function(){return(this._target()._bitField&8454144)!==0};e.prototype.isPending=function(){return o.call(this._target())};e.prototype.isRejected=function(){return i.call(this._target())};e.prototype.isFulfilled=function(){return n.call(this._target())};e.prototype.isResolved=function(){return a.call(this._target())};e.prototype.value=function(){return t.call(this._target())};e.prototype.reason=function(){var e=this._target();e._unsetRejectionIsUnhandled();return r.call(e)};e.prototype._value=function(){return this._settledValue()};e.prototype._reason=function(){this._unsetRejectionIsUnhandled();return this._settledValue()};e.PromiseInspection=PromiseInspection}},716:function(e){e.exports=getType;function getType(e){var t=["Directory","File","SymbolicLink","Link","BlockDevice","CharacterDevice","FIFO","Socket"];var r;if(e.type&&t.indexOf(e.type)!==-1){e[e.type]=true;return e.type}for(var n=0,i=t.length;n1024*64){throw new TypeError("pattern is too long")}var r=this.options;if(!r.noglobstar&&e==="**")return i;if(e==="")return"";var n="";var o=!!r.nocase;var l=false;var c=[];var p=[];var d;var v=false;var y=-1;var g=-1;var m=e.charAt(0)==="."?"":r.dot?"(?!(?:^|\\/)\\.{1,2}(?:$|\\/))":"(?!\\.)";var _=this;function clearStateChar(){if(d){switch(d){case"*":n+=u;o=true;break;case"?":n+=s;o=true;break;default:n+="\\"+d;break}_.debug("clearStateChar %j %j",d,n);d=false}}for(var w=0,b=e.length,E;w-1;A--){var C=p[A];var k=n.slice(0,C.reStart);var P=n.slice(C.reStart,C.reEnd-8);var N=n.slice(C.reEnd-8,C.reEnd);var F=n.slice(C.reEnd);N+=F;var L=k.split("(").length-1;var B=F;for(w=0;w=0;a--){o=e[a];if(o)break}for(a=0;a>> no match, partial?",e,f,t,p);if(f===s)return true}return false}var d;if(typeof l==="string"){if(n.nocase){d=c.toLowerCase()===l.toLowerCase()}else{d=c===l}this.debug("string match",l,c,d)}else{d=c.match(l);this.debug("pattern match",l,c,d)}if(!d)return false}if(o===s&&a===u){return true}else if(o===s){return r}else if(a===u){var v=o===s-1&&e[o]==="";return v}throw new Error("wtf?")};function globUnescape(e){return e.replace(/\\(.)/g,"$1")}function regExpEscape(e){return e.replace(/[-[\]{}()*+?.,\\^$|#\s]/g,"\\$&")}},726:function(e,t,r){"use strict";var n;try{throw new Error}catch(e){n=e}var i=r(476);var o=r(895);var a=r(248);function Async(){this._customScheduler=false;this._isTickUsed=false;this._lateQueue=new o(16);this._normalQueue=new o(16);this._haveDrainedQueues=false;this._trampolineEnabled=true;var e=this;this.drainQueues=function(){e._drainQueues()};this._schedule=i}Async.prototype.setScheduler=function(e){var t=this._schedule;this._schedule=e;this._customScheduler=true;return t};Async.prototype.hasCustomScheduler=function(){return this._customScheduler};Async.prototype.enableTrampoline=function(){this._trampolineEnabled=true};Async.prototype.disableTrampolineIfNecessary=function(){if(a.hasDevTools){this._trampolineEnabled=false}};Async.prototype.haveItemsQueued=function(){return this._isTickUsed||this._haveDrainedQueues};Async.prototype.fatalError=function(e,t){if(t){process.stderr.write("Fatal "+(e instanceof Error?e.stack:e)+"\n");process.exit(2)}else{this.throwLater(e)}};Async.prototype.throwLater=function(e,t){if(arguments.length===1){t=e;e=function(){throw t}}if(typeof setTimeout!=="undefined"){setTimeout(function(){e(t)},0)}else try{this._schedule(function(){e(t)})}catch(e){throw new Error("No async scheduler available\n\n See http://goo.gl/MqrFmX\n")}};function AsyncInvokeLater(e,t,r){this._lateQueue.push(e,t,r);this._queueTick()}function AsyncInvoke(e,t,r){this._normalQueue.push(e,t,r);this._queueTick()}function AsyncSettlePromises(e){this._normalQueue._pushOne(e);this._queueTick()}if(!a.hasDevTools){Async.prototype.invokeLater=AsyncInvokeLater;Async.prototype.invoke=AsyncInvoke;Async.prototype.settlePromises=AsyncSettlePromises}else{Async.prototype.invokeLater=function(e,t,r){if(this._trampolineEnabled){AsyncInvokeLater.call(this,e,t,r)}else{this._schedule(function(){setTimeout(function(){e.call(t,r)},100)})}};Async.prototype.invoke=function(e,t,r){if(this._trampolineEnabled){AsyncInvoke.call(this,e,t,r)}else{this._schedule(function(){e.call(t,r)})}};Async.prototype.settlePromises=function(e){if(this._trampolineEnabled){AsyncSettlePromises.call(this,e)}else{this._schedule(function(){e._settlePromises()})}}}Async.prototype._drainQueue=function(e){while(e.length()>0){var t=e.shift();if(typeof t!=="function"){t._settlePromises();continue}var r=e.shift();var n=e.shift();t.call(r,n)}};Async.prototype._drainQueues=function(){this._drainQueue(this._normalQueue);this._reset();this._haveDrainedQueues=true;this._drainQueue(this._lateQueue)};Async.prototype._queueTick=function(){if(!this._isTickUsed){this._isTickUsed=true;this._schedule(this.drainQueues)}};Async.prototype._reset=function(){this._isTickUsed=false};e.exports=Async;e.exports.firstLineError=n},729:function(e,t,r){"use strict";var n=this&&this.__awaiter||function(e,t,r,n){return new(r||(r=Promise))(function(i,o){function fulfilled(e){try{step(n.next(e))}catch(e){o(e)}}function rejected(e){try{step(n["throw"](e))}catch(e){o(e)}}function step(e){e.done?i(e.value):new r(function(t){t(e.value)}).then(fulfilled,rejected)}step((n=n.apply(e,t||[])).next())})};Object.defineProperty(t,"__esModule",{value:true});const i=r(643);const o=r(835);const a=r(622);const s=r(761);function getUrl(e,t,r){const n=a.posix||a;let i="";if(!t){i=e}else if(!e){i=t}else{const r=o.parse(t);const a=o.parse(e);a.protocol=a.protocol||r.protocol;a.auth=a.auth||r.auth;a.host=a.host||r.host;a.pathname=n.resolve(r.pathname,a.pathname);if(!a.pathname.endsWith("/")&&e.endsWith("/")){a.pathname+="/"}i=o.format(a)}return r?getUrlWithParsedQueryParams(i,r):i}t.getUrl=getUrl;function getUrlWithParsedQueryParams(e,t){const r=e.replace(/\?$/g,"");const n=i.stringify(t.params,buildParamsStringifyOptions(t));return`${r}${n}`}function buildParamsStringifyOptions(e){let t={addQueryPrefix:true,delimiter:(e.options||{}).separator||"&",allowDots:(e.options||{}).shouldAllowDots||false,arrayFormat:(e.options||{}).arrayFormat||"repeat",encodeValuesOnly:(e.options||{}).shouldOnlyEncodeValues||true};return t}function decompressGzippedContent(e,t){return n(this,void 0,void 0,function*(){return new Promise((r,i)=>n(this,void 0,void 0,function*(){s.gunzip(e,function(e,n){if(e){i(e)}r(n.toString(t||"utf-8"))})}))})}t.decompressGzippedContent=decompressGzippedContent;function obtainContentCharset(e){const t=["ascii","utf8","utf16le","ucs2","base64","binary","hex"];const r=e.message.headers["content-type"]||"";const n=r.match(/charset=([^;,\r\n]+)/i);return n&&n[1]&&t.indexOf(n[1])!=-1?n[1]:"utf-8"}t.obtainContentCharset=obtainContentCharset},747:function(e){e.exports=require("fs")},755:function(e,t,r){"use strict";var n=String.prototype.replace;var i=/%20/g;var o=r(640);var a={RFC1738:"RFC1738",RFC3986:"RFC3986"};e.exports=o.assign({default:a.RFC3986,formatters:{RFC1738:function(e){return n.call(e,i,"+")},RFC3986:function(e){return String(e)}}},a)},761:function(e){e.exports=require("zlib")},780:function(e,t,r){"use strict";e.exports=function(e,t,n,i,o,a){var s=r(248);var u=r(607).TypeError;var l=r(248).inherits;var c=s.errorObj;var f=s.tryCatch;var p={};function thrower(e){setTimeout(function(){throw e},0)}function castPreservingDisposable(e){var t=n(e);if(t!==e&&typeof e._isDisposable==="function"&&typeof e._getDisposer==="function"&&e._isDisposable()){t._setDisposable(e._getDisposer())}return t}function dispose(t,r){var i=0;var a=t.length;var s=new e(o);function iterator(){if(i>=a)return s._fulfill();var o=castPreservingDisposable(t[i++]);if(o instanceof e&&o._isDisposable()){try{o=n(o._getDisposer().tryDispose(r),t.promise)}catch(e){return thrower(e)}if(o instanceof e){return o._then(iterator,thrower,null,null,null)}}iterator()}iterator();return s}function Disposer(e,t,r){this._data=e;this._promise=t;this._context=r}Disposer.prototype.data=function(){return this._data};Disposer.prototype.promise=function(){return this._promise};Disposer.prototype.resource=function(){if(this.promise().isFulfilled()){return this.promise().value()}return p};Disposer.prototype.tryDispose=function(e){var t=this.resource();var r=this._context;if(r!==undefined)r._pushContext();var n=t!==p?this.doDispose(t,e):null;if(r!==undefined)r._popContext();this._promise._unsetDisposable();this._data=null;return n};Disposer.isDisposer=function(e){return e!=null&&typeof e.resource==="function"&&typeof e.tryDispose==="function"};function FunctionDisposer(e,t,r){this.constructor$(e,t,r)}l(FunctionDisposer,Disposer);FunctionDisposer.prototype.doDispose=function(e,t){var r=this.data();return r.call(e,e,t)};function maybeUnwrapDisposer(e){if(Disposer.isDisposer(e)){this.resources[this.index]._setDisposable(e);return e.promise()}return e}function ResourceList(e){this.length=e;this.promise=null;this[e-1]=null}ResourceList.prototype._resultCancelled=function(){var t=this.length;for(var r=0;r0};e.prototype._getDisposer=function(){return this._disposer};e.prototype._unsetDisposable=function(){this._bitField=this._bitField&~131072;this._disposer=undefined};e.prototype.disposer=function(e){if(typeof e==="function"){return new FunctionDisposer(e,this,i())}throw new u}}},787:function(e,t,r){e.exports=FileWriter;var n=r(598);var i=r(82);var o=r(689);var a={};o(FileWriter,i);function FileWriter(e){var t=this;if(!(t instanceof FileWriter)){throw new Error("FileWriter must be called as constructor.")}if(e.type!=="File"||!e.File){throw new Error("Non-file type "+e.type)}t._buffer=[];t._bytesWritten=0;i.call(this,e)}FileWriter.prototype._create=function(){var e=this;if(e._stream)return;var t={};if(e.props.flags)t.flags=e.props.flags;t.mode=i.filemode;if(e._old&&e._old.blksize)t.bufferSize=e._old.blksize;e._stream=n.createWriteStream(e._path,t);e._stream.on("open",function(){e.ready=true;e._buffer.forEach(function(t){if(t===a)e._stream.end();else e._stream.write(t)});e.emit("ready");e.emit("drain")});e._stream.on("error",function(t){e.emit("error",t)});e._stream.on("drain",function(){e.emit("drain")});e._stream.on("close",function(){e._finish()})};FileWriter.prototype.write=function(e){var t=this;t._bytesWritten+=e.length;if(!t.ready){if(!Buffer.isBuffer(e)&&typeof e!=="string"){throw new Error("invalid write data")}t._buffer.push(e);return false}var r=t._stream.write(e);if(r===false&&t._stream._queue){return t._stream._queue.length<=2}else{return r}};FileWriter.prototype.end=function(e){var t=this;if(e)t.write(e);if(!t.ready){t._buffer.push(a);return false}return t._stream.end()};FileWriter.prototype._finish=function(){var e=this;if(typeof e.size==="number"&&e._bytesWritten!==e.size){e.error("Did not get expected byte count.\n"+"expect: "+e.size+"\n"+"actual: "+e._bytesWritten)}i.prototype._finish.call(e)}},794:function(e){e.exports=require("stream")},809:function(e,t,r){"use strict";e.exports=function(e,t,n,i,o,a){var s=r(248);var u=s.canEvaluate;var l=s.tryCatch;var c=s.errorObj;var f;if(true){if(u){var p=function(e){return new Function("value","holder"," \n 'use strict'; \n holder.pIndex = value; \n holder.checkFulfillment(this); \n ".replace(/Index/g,e))};var h=function(e){return new Function("promise","holder"," \n 'use strict'; \n holder.pIndex = promise; \n ".replace(/Index/g,e))};var d=function(t){var r=new Array(t);for(var n=0;n0&&typeof arguments[r]==="function"){o=arguments[r];if(true){if(r<=8&&u){var l=new e(i);l._captureStackTrace();var c=v[r-1];var p=new c(o);var h=y;for(var d=0;d0?g+y:""}},822:function(e){"use strict";if(typeof process==="undefined"||!process.version||process.version.indexOf("v0.")===0||process.version.indexOf("v1.")===0&&process.version.indexOf("v1.8.")!==0){e.exports={nextTick:nextTick}}else{e.exports=process}function nextTick(e,t,r,n){if(typeof e!=="function"){throw new TypeError('"callback" argument must be a function')}var i=arguments.length;var o,a;switch(i){case 0:case 1:return process.nextTick(e);case 2:return process.nextTick(function afterTickOne(){e.call(null,t)});case 3:return process.nextTick(function afterTickTwo(){e.call(null,t,r)});case 4:return process.nextTick(function afterTickThree(){e.call(null,t,r,n)});default:o=new Array(i-1);a=0;while(a=0)e.step+=n;else e.step=e.actions.length;var i=e.actions[e.step-1];if(i&&i.trap){e.step=i.step;i.cb()}else e.next()};e.jump=function(t){e.step=t;e.next()}}},874:function(e,t,r){"use strict";var n=this&&this.__awaiter||function(e,t,r,n){return new(r||(r=Promise))(function(i,o){function fulfilled(e){try{step(n.next(e))}catch(e){o(e)}}function rejected(e){try{step(n["throw"](e))}catch(e){o(e)}}function step(e){e.done?i(e.value):new r(function(t){t(e.value)}).then(fulfilled,rejected)}step((n=n.apply(e,t||[])).next())})};Object.defineProperty(t,"__esModule",{value:true});const i=r(835);const o=r(605);const a=r(211);const s=r(729);let u;let l;var c;(function(e){e[e["OK"]=200]="OK";e[e["MultipleChoices"]=300]="MultipleChoices";e[e["MovedPermanently"]=301]="MovedPermanently";e[e["ResourceMoved"]=302]="ResourceMoved";e[e["SeeOther"]=303]="SeeOther";e[e["NotModified"]=304]="NotModified";e[e["UseProxy"]=305]="UseProxy";e[e["SwitchProxy"]=306]="SwitchProxy";e[e["TemporaryRedirect"]=307]="TemporaryRedirect";e[e["PermanentRedirect"]=308]="PermanentRedirect";e[e["BadRequest"]=400]="BadRequest";e[e["Unauthorized"]=401]="Unauthorized";e[e["PaymentRequired"]=402]="PaymentRequired";e[e["Forbidden"]=403]="Forbidden";e[e["NotFound"]=404]="NotFound";e[e["MethodNotAllowed"]=405]="MethodNotAllowed";e[e["NotAcceptable"]=406]="NotAcceptable";e[e["ProxyAuthenticationRequired"]=407]="ProxyAuthenticationRequired";e[e["RequestTimeout"]=408]="RequestTimeout";e[e["Conflict"]=409]="Conflict";e[e["Gone"]=410]="Gone";e[e["TooManyRequests"]=429]="TooManyRequests";e[e["InternalServerError"]=500]="InternalServerError";e[e["NotImplemented"]=501]="NotImplemented";e[e["BadGateway"]=502]="BadGateway";e[e["ServiceUnavailable"]=503]="ServiceUnavailable";e[e["GatewayTimeout"]=504]="GatewayTimeout"})(c=t.HttpCodes||(t.HttpCodes={}));const f=[c.MovedPermanently,c.ResourceMoved,c.SeeOther,c.TemporaryRedirect,c.PermanentRedirect];const p=[c.BadGateway,c.ServiceUnavailable,c.GatewayTimeout];const h=["OPTIONS","GET","DELETE","HEAD"];const d=10;const v=5;class HttpClientResponse{constructor(e){this.message=e}readBody(){return new Promise((e,t)=>n(this,void 0,void 0,function*(){let r=Buffer.alloc(0);const i=s.obtainContentCharset(this);const o=this.message.headers["content-encoding"]||"";const a=new RegExp("(gzip$)|(gzip, *deflate)").test(o);this.message.on("data",function(e){const t=typeof e==="string"?Buffer.from(e,i):e;r=Buffer.concat([r,t])}).on("end",function(){return n(this,void 0,void 0,function*(){if(a){const t=yield s.decompressGzippedContent(r,i);e(t)}else{e(r.toString(i))}})}).on("error",function(e){t(e)})}))}}t.HttpClientResponse=HttpClientResponse;function isHttps(e){let t=i.parse(e);return t.protocol==="https:"}t.isHttps=isHttps;var y;(function(e){e["HTTP_PROXY"]="HTTP_PROXY";e["HTTPS_PROXY"]="HTTPS_PROXY";e["NO_PROXY"]="NO_PROXY"})(y||(y={}));class HttpClient{constructor(e,t,n){this._ignoreSslError=false;this._allowRedirects=true;this._allowRedirectDowngrade=false;this._maxRedirects=50;this._allowRetries=false;this._maxRetries=1;this._keepAlive=false;this._disposed=false;this.userAgent=e;this.handlers=t||[];let i=process.env[y.NO_PROXY];if(i){this._httpProxyBypassHosts=[];i.split(",").forEach(e=>{this._httpProxyBypassHosts.push(new RegExp(e,"i"))})}this.requestOptions=n;if(n){if(n.ignoreSslError!=null){this._ignoreSslError=n.ignoreSslError}this._socketTimeout=n.socketTimeout;this._httpProxy=n.proxy;if(n.proxy&&n.proxy.proxyBypassHosts){this._httpProxyBypassHosts=[];n.proxy.proxyBypassHosts.forEach(e=>{this._httpProxyBypassHosts.push(new RegExp(e,"i"))})}this._certConfig=n.cert;if(this._certConfig){u=r(747);if(this._certConfig.caFile&&u.existsSync(this._certConfig.caFile)){this._ca=u.readFileSync(this._certConfig.caFile,"utf8")}if(this._certConfig.certFile&&u.existsSync(this._certConfig.certFile)){this._cert=u.readFileSync(this._certConfig.certFile,"utf8")}if(this._certConfig.keyFile&&u.existsSync(this._certConfig.keyFile)){this._key=u.readFileSync(this._certConfig.keyFile,"utf8")}}if(n.allowRedirects!=null){this._allowRedirects=n.allowRedirects}if(n.allowRedirectDowngrade!=null){this._allowRedirectDowngrade=n.allowRedirectDowngrade}if(n.maxRedirects!=null){this._maxRedirects=Math.max(n.maxRedirects,0)}if(n.keepAlive!=null){this._keepAlive=n.keepAlive}if(n.allowRetries!=null){this._allowRetries=n.allowRetries}if(n.maxRetries!=null){this._maxRetries=n.maxRetries}}}options(e,t){return this.request("OPTIONS",e,null,t||{})}get(e,t){return this.request("GET",e,null,t||{})}del(e,t){return this.request("DELETE",e,null,t||{})}post(e,t,r){return this.request("POST",e,t,r||{})}patch(e,t,r){return this.request("PATCH",e,t,r||{})}put(e,t,r){return this.request("PUT",e,t,r||{})}head(e,t){return this.request("HEAD",e,null,t||{})}sendStream(e,t,r,n){return this.request(e,t,r,n)}request(e,t,r,o){return n(this,void 0,void 0,function*(){if(this._disposed){throw new Error("Client has already been disposed.")}let n=i.parse(t);let a=this._prepareRequest(e,n,o);let s=this._allowRetries&&h.indexOf(e)!=-1?this._maxRetries+1:1;let u=0;let l;while(u0){const s=l.message.headers["location"];if(!s){break}let u=i.parse(s);if(n.protocol=="https:"&&n.protocol!=u.protocol&&!this._allowRedirectDowngrade){throw new Error("Redirect from HTTPS to HTTP protocol. This downgrade is not allowed for security reasons. If you want to allow this behavior, set the allowRedirectDowngrade option to true.")}yield l.readBody();a=this._prepareRequest(e,u,o);l=yield this.requestRaw(a,r);t--}if(p.indexOf(l.message.statusCode)==-1){return l}u+=1;if(u{let i=function(e,t){if(e){n(e)}r(t)};this.requestRawWithCallback(e,t,i)})}requestRawWithCallback(e,t,r){let n;if(typeof t==="string"){e.options.headers["Content-Length"]=Buffer.byteLength(t,"utf8")}let i=false;let o=(e,t)=>{if(!i){i=true;r(e,t)}};let a=e.httpModule.request(e.options,e=>{let t=new HttpClientResponse(e);o(null,t)});a.on("socket",e=>{n=e});a.setTimeout(this._socketTimeout||3*6e4,()=>{if(n){n.destroy()}o(new Error("Request timeout: "+e.options.path),null)});a.on("error",function(e){o(e,null)});if(t&&typeof t==="string"){a.write(t,"utf8")}if(t&&typeof t!=="string"){t.on("close",function(){a.end()});t.pipe(a)}else{a.end()}}_prepareRequest(e,t,r){const n={};n.parsedUrl=t;const s=n.parsedUrl.protocol==="https:";n.httpModule=s?a:o;const u=s?443:80;n.options={};n.options.host=n.parsedUrl.hostname;n.options.port=n.parsedUrl.port?parseInt(n.parsedUrl.port):u;n.options.path=(n.parsedUrl.pathname||"")+(n.parsedUrl.search||"");n.options.method=e;n.options.headers=this._mergeHeaders(r);if(this.userAgent!=null){n.options.headers["user-agent"]=this.userAgent}n.options.agent=this._getAgent(n.parsedUrl);if(this.handlers&&!this._isPresigned(i.format(t))){this.handlers.forEach(e=>{e.prepareRequest(n.options)})}return n}_isPresigned(e){if(this.requestOptions&&this.requestOptions.presignedUrlPatterns){const t=this.requestOptions.presignedUrlPatterns;for(let r=0;rObject.keys(e).reduce((t,r)=>(t[r.toLowerCase()]=e[r],t),{});if(this.requestOptions&&this.requestOptions.headers){return Object.assign({},t(this.requestOptions.headers),t(e))}return t(e||{})}_getAgent(e){let t;let n=this._getProxy(e);let i=n.proxyUrl&&n.proxyUrl.hostname&&!this._isMatchInBypassProxyList(e);if(this._keepAlive&&i){t=this._proxyAgent}if(this._keepAlive&&!i){t=this._agent}if(!!t){return t}const s=e.protocol==="https:";let u=100;if(!!this.requestOptions){u=this.requestOptions.maxSockets||o.globalAgent.maxSockets}if(i){if(!l){l=r(413)}const e={maxSockets:u,keepAlive:this._keepAlive,proxy:{proxyAuth:n.proxyAuth,host:n.proxyUrl.hostname,port:n.proxyUrl.port}};let i;const o=n.proxyUrl.protocol==="https:";if(s){i=o?l.httpsOverHttps:l.httpsOverHttp}else{i=o?l.httpOverHttps:l.httpOverHttp}t=i(e);this._proxyAgent=t}if(this._keepAlive&&!t){const e={keepAlive:this._keepAlive,maxSockets:u};t=s?new a.Agent(e):new o.Agent(e);this._agent=t}if(!t){t=s?a.globalAgent:o.globalAgent}if(s&&this._ignoreSslError){t.options=Object.assign(t.options||{},{rejectUnauthorized:false})}if(s&&this._certConfig){t.options=Object.assign(t.options||{},{ca:this._ca,cert:this._cert,key:this._key,passphrase:this._certConfig.passphrase})}return t}_getProxy(e){let t=e.protocol==="https:";let r=this._httpProxy;let n=process.env[y.HTTPS_PROXY];let o=process.env[y.HTTP_PROXY];if(!r){if(n&&t){r={proxyUrl:n}}else if(o){r={proxyUrl:o}}}let a;let s;if(r){if(r.proxyUrl.length>0){a=i.parse(r.proxyUrl)}if(r.proxyUsername||r.proxyPassword){s=r.proxyUsername+":"+r.proxyPassword}}return{proxyUrl:a,proxyAuth:s}}_isMatchInBypassProxyList(e){if(!this._httpProxyBypassHosts){return false}let t=false;this._httpProxyBypassHosts.forEach(r=>{if(r.test(e.href)){t=true}});return t}_performExponentialBackoff(e){e=Math.min(d,e);const t=v*Math.pow(2,e);return new Promise(e=>setTimeout(()=>e(),t))}}t.HttpClient=HttpClient},882:function(e,t,r){"use strict";e.exports=PassThrough;var n=r(925);var i=Object.create(r(143));i.inherits=r(689);i.inherits(PassThrough,n);function PassThrough(e){if(!(this instanceof PassThrough))return new PassThrough(e);n.call(this,e)}PassThrough.prototype._transform=function(e,t,r){r(null,e)}},883:function(e){var t=function(){"use strict";return this===undefined}();if(t){e.exports={freeze:Object.freeze,defineProperty:Object.defineProperty,getDescriptor:Object.getOwnPropertyDescriptor,keys:Object.keys,names:Object.getOwnPropertyNames,getPrototypeOf:Object.getPrototypeOf,isArray:Array.isArray,isES5:t,propertyIsWritable:function(e,t){var r=Object.getOwnPropertyDescriptor(e,t);return!!(!r||r.writable||r.set)}}}else{var r={}.hasOwnProperty;var n={}.toString;var i={}.constructor.prototype;var o=function(e){var t=[];for(var n in e){if(r.call(e,n)){t.push(n)}}return t};var a=function(e,t){return{value:e[t]}};var s=function(e,t,r){e[t]=r.value;return e};var u=function(e){return e};var l=function(e){try{return Object(e).constructor.prototype}catch(e){return i}};var c=function(e){try{return n.call(e)==="[object Array]"}catch(e){return false}};e.exports={isArray:c,keys:o,names:o,defineProperty:s,getDescriptor:a,freeze:u,getPrototypeOf:l,isES5:t,propertyIsWritable:function(){return true}}}},887:function(e,t,r){var n=r(794);var i=r(440);var o=r(669);var a=r(657);var s="function";if(!n.Writable||!n.Writable.prototype.destroy)n=r(574);function PullStream(){if(!(this instanceof PullStream))return new PullStream;n.Duplex.call(this,{decodeStrings:false,objectMode:true});this.buffer=a.from("");var e=this;e.on("finish",function(){e.finished=true;e.emit("chunk",false)})}o.inherits(PullStream,n.Duplex);PullStream.prototype._write=function(e,t,r){this.buffer=a.concat([this.buffer,e]);this.cb=r;this.emit("chunk")};PullStream.prototype.stream=function(e,t){var r=n.PassThrough();var i,o=this;function cb(){if(typeof o.cb===s){var e=o.cb;o.cb=undefined;return e()}}function pull(){var n;if(o.buffer&&o.buffer.length){if(typeof e==="number"){n=o.buffer.slice(0,e);o.buffer=o.buffer.slice(e);e-=n.length;i=!e}else{var a=o.buffer.indexOf(e);if(a!==-1){o.match=a;if(t)a=a+e.length;n=o.buffer.slice(0,a);o.buffer=o.buffer.slice(a);i=true}else{var s=o.buffer.length-e.length;if(s<=0){cb()}else{n=o.buffer.slice(0,s);o.buffer=o.buffer.slice(s)}}}if(n)r.write(n,function(){if(o.buffer.length===0||e.length&&o.buffer.length<=e.length)cb()})}if(!i){if(o.finished&&!this.__ended){o.removeListener("chunk",pull);o.emit("error",new Error("FILE_ENDED"));this.__ended=true;return}}else{o.removeListener("chunk",pull);r.end()}}o.on("chunk",pull);pull();return r};PullStream.prototype.pull=function(e,t){if(e===0)return i.resolve("");if(!isNaN(e)&&this.buffer.length>e){var r=this.buffer.slice(0,e);this.buffer=this.buffer.slice(e);return i.resolve(r)}var o=a.from(""),s=this;var u=n.Transform();u._transform=function(e,t,r){o=a.concat([o,e]);r()};var l;var c;return new i(function(r,n){l=n;c=function(e){s.__emittedError=e;n(e)};if(s.finished)return n(new Error("FILE_ENDED"));s.once("error",c);s.stream(e,t).on("error",n).pipe(u).on("finish",function(){r(o)}).on("error",n)}).finally(function(){s.removeListener("error",l);s.removeListener("error",c)})};PullStream.prototype._read=function(){};e.exports=PullStream},895:function(e){"use strict";function arrayMove(e,t,r,n,i){for(var o=0;o=0){return r[e]}return undefined}Context.CapturedTrace=null;Context.create=createContext;Context.deactivateLongStackTraces=function(){};Context.activateLongStackTraces=function(){var r=e.prototype._pushContext;var n=e.prototype._popContext;var i=e._peekContext;var o=e.prototype._peekContext;var a=e.prototype._promiseCreated;Context.deactivateLongStackTraces=function(){e.prototype._pushContext=r;e.prototype._popContext=n;e._peekContext=i;e.prototype._peekContext=o;e.prototype._promiseCreated=a;t=false};t=true;e.prototype._pushContext=Context.prototype._pushContext;e.prototype._popContext=Context.prototype._popContext;e._peekContext=e.prototype._peekContext=peekContext;e.prototype._promiseCreated=function(){var e=this._peekContext();if(e&&e._promiseCreated==null)e._promiseCreated=this}};return Context}},925:function(e,t,r){"use strict";e.exports=Transform;var n=r(831);var i=Object.create(r(143));i.inherits=r(689);i.inherits(Transform,n);function afterTransform(e,t){var r=this._transformState;r.transforming=false;var n=r.writecb;if(!n){return this.emit("error",new Error("write callback called multiple times"))}r.writechunk=null;r.writecb=null;if(t!=null)this.push(t);n(e);var i=this._readableState;i.reading=false;if(i.needReadable||i.length0)this.tail.next=t;else this.head=t;this.tail=t;++this.length};BufferList.prototype.unshift=function unshift(e){var t={data:e,next:this.head};if(this.length===0)this.tail=t;this.head=t;++this.length};BufferList.prototype.shift=function shift(){if(this.length===0)return;var e=this.head.data;if(this.length===1)this.head=this.tail=null;else this.head=this.head.next;--this.length;return e};BufferList.prototype.clear=function clear(){this.head=this.tail=null;this.length=0};BufferList.prototype.join=function join(e){if(this.length===0)return"";var t=this.head;var r=""+t.data;while(t=t.next){r+=e+t.data}return r};BufferList.prototype.concat=function concat(e){if(this.length===0)return n.alloc(0);if(this.length===1)return this.head.data;var t=n.allocUnsafe(e>>>0);var r=this.head;var i=0;while(r){copyBuffer(r.data,t,i);i+=r.data.length;r=r.next}return t};return BufferList}();if(i&&i.inspect&&i.inspect.custom){e.exports.prototype[i.inspect.custom]=function(){var e=i.inspect({length:this.length});return this.constructor.name+" "+e}}},936:function(e,t,r){e.exports=SocketReader;var n=r(689);var i=r(953);n(SocketReader,i);function SocketReader(e){var t=this;if(!(t instanceof SocketReader)){throw new Error("SocketReader must be called as constructor.")}if(!(e.type==="Socket"&&e.Socket)){throw new Error("Non-socket type "+e.type)}i.call(t,e)}SocketReader.prototype._read=function(){var e=this;if(e._paused)return;if(!e._ended){e.emit("end");e.emit("close");e._ended=true}}},943:function(e){"use strict";e.exports=clone;function clone(e){if(e===null||typeof e!=="object")return e;if(e instanceof Object)var t={__proto__:e.__proto__};else var t=Object.create(null);Object.getOwnPropertyNames(e).forEach(function(r){Object.defineProperty(t,r,Object.getOwnPropertyDescriptor(e,r))});return t}},947:function(e){"use strict";e.exports=function(e,t,r,n){var i=false;var o=function(e,t){this._reject(t)};var a=function(e,t){t.promiseRejectionQueued=true;t.bindingPromise._then(o,o,null,this,e)};var s=function(e,t){if((this._bitField&50397184)===0){this._resolveCallback(t.target)}};var u=function(e,t){if(!t.promiseRejectionQueued)this._reject(e)};e.prototype.bind=function(o){if(!i){i=true;e.prototype._propagateFrom=n.propagateFromFunction();e.prototype._boundValue=n.boundValueFunction()}var l=r(o);var c=new e(t);c._propagateFrom(this,1);var f=this._target();c._setBoundTo(l);if(l instanceof e){var p={promiseRejectionQueued:false,promise:c,target:f,bindingPromise:l};f._then(t,a,undefined,c,p);l._then(s,u,undefined,c,p);c._setOnCancel(l)}else{c._resolveCallback(f)}return c};e.prototype._setBoundTo=function(e){if(e!==undefined){this._bitField=this._bitField|2097152;this._boundTo=e}else{this._bitField=this._bitField&~2097152}};e.prototype._isBound=function(){return(this._bitField&2097152)===2097152};e.bind=function(t,r){return e.resolve(r).bind(t)}}},948:function(e,t,r){"use strict";e.exports=function(e,t){var n={};var i=r(248);var o=r(663);var a=i.withAppended;var s=i.maybeWrapAsError;var u=i.canEvaluate;var l=r(607).TypeError;var c="Async";var f={__isPromisified__:true};var p=["arity","length","name","arguments","caller","callee","prototype","__isPromisified__"];var h=new RegExp("^(?:"+p.join("|")+")$");var d=function(e){return i.isIdentifier(e)&&e.charAt(0)!=="_"&&e!=="constructor"};function propsFilter(e){return!h.test(e)}function isPromisified(e){try{return e.__isPromisified__===true}catch(e){return false}}function hasPromisified(e,t,r){var n=i.getDataPropertyOrDefault(e,t+r,f);return n?isPromisified(n):false}function checkValid(e,t,r){for(var n=0;n=r;--n){t.push(n)}for(var n=e+1;n<=3;++n){t.push(n)}return t};var m=function(e){return i.filledRange(e,"_arg","")};var _=function(e){return i.filledRange(Math.max(e,3),"_arg","")};var w=function(e){if(typeof e.length==="number"){return Math.max(Math.min(e.length,1023+1),0)}return 0};y=function(r,u,l,c,f,p){var h=Math.max(0,w(c)-1);var d=g(h);var v=typeof r==="string"||u===n;function generateCallForArgumentCount(e){var t=m(e).join(", ");var r=e>0?", ":"";var n;if(v){n="ret = callback.call(this, {{args}}, nodeback); break;\n"}else{n=u===undefined?"ret = callback({{args}}, nodeback); break;\n":"ret = callback.call(receiver, {{args}}, nodeback); break;\n"}return n.replace("{{args}}",t).replace(", ",r)}function generateArgumentSwitchCase(){var e="";for(var t=0;te.trim().toUpperCase()).filter(e=>e)){if(n.some(t=>t===e)){return true}}return false}t.checkBypass=checkBypass},953:function(e,t,r){e.exports=Reader;var n=r(598);var i=r(794).Stream;var o=r(689);var a=r(622);var s=r(716);var u=Reader.hardLinks={};var l=r(394);o(Reader,l);var c=r(594);function Reader(e,t){var n=this;if(!(n instanceof Reader))return new Reader(e,t);if(typeof e==="string"){e={path:e}}var i;var o;if(e.type&&typeof e.type==="function"){i=e.type;o=i}else{i=s(e);o=Reader}if(t&&!i){i=s(t);e[i]=true;e.type=i}switch(i){case"Directory":o=r(546);break;case"Link":case"File":o=r(58);break;case"SymbolicLink":o=c;break;case"Socket":o=r(936);break;case null:o=r(73);break}if(!(n instanceof o)){return new o(e)}l.call(n);if(!e.path){n.error("Must provide a path",null,true)}n.readable=true;n.writable=false;n.type=i;n.props=e;n.depth=e.depth=e.depth||0;n.parent=e.parent||null;n.root=e.root||e.parent&&e.parent.root||n;n._path=n.path=a.resolve(e.path);if(process.platform==="win32"){n.path=n._path=n.path.replace(/\?/g,"_");if(n._path.length>=260){n._swallowErrors=true;n._path="\\\\?\\"+n.path.replace(/\//g,"\\")}}n.basename=e.basename=a.basename(n.path);n.dirname=e.dirname=a.dirname(n.path);e.parent=e.root=null;n.size=e.size;n.filter=typeof e.filter==="function"?e.filter:null;if(e.sort==="alpha")e.sort=alphasort;n._stat(t)}function alphasort(e,t){return e===t?0:e.toLowerCase()>t.toLowerCase()?1:e.toLowerCase()t?1:-1}Reader.prototype._stat=function(e){var t=this;var r=t.props;var i=r.follow?"stat":"lstat";if(e)process.nextTick(statCb.bind(null,null,e));else n[i](t._path,statCb);function statCb(e,n){if(e)return t.error(e);Object.keys(n).forEach(function(e){r[e]=n[e]});if(undefined!==t.size&&r.size!==t.size){return t.error("incorrect size")}t.size=r.size;var i=s(r);var o=r.hardlinks!==false;if(o&&i!=="Directory"&&r.nlink&&r.nlink>1){var a=r.dev+":"+r.ino;if(u[a]===t._path||!u[a]){u[a]=t._path}else{i=t.type=t.props.type="Link";t.Link=t.props.Link=true;t.linkpath=t.props.linkpath=u[a];t._stat=t._read=c.prototype._read}}if(t.type&&t.type!==i){t.error("Unexpected type: "+i)}if(t.filter){var l=t._proxy||t;if(!t.filter.call(l,l,r)){if(!t._disowned){t.abort();t.emit("end");t.emit("close")}return}}var f=["_stat","stat","ready"];var p=0;(function go(){if(t._aborted){t.emit("end");t.emit("close");return}if(t._paused&&t.type!=="Directory"){t.once("resume",go);return}var e=f[p++];if(!e){return t._read()}t.emit(e,r);go()})()}};Reader.prototype.pipe=function(e){var t=this;if(typeof e.add==="function"){t.on("entry",function(r){var n=e.add(r);if(n===false){t.pause()}})}return i.prototype.pipe.apply(this,arguments)};Reader.prototype.pause=function(e){this._paused=true;e=e||this;this.emit("pause",e);if(this._stream)this._stream.pause(e)};Reader.prototype.resume=function(e){this._paused=false;e=e||this;this.emit("resume",e);if(this._stream)this._stream.resume(e);this._read()};Reader.prototype._read=function(){this.error("Cannot read unknown type: "+this.type)}},965:function(e,t,r){e=r.nmd(e);var n=function(e){"use strict";var t=1e7,r=7,i=9007199254740992,o=smallToArray(i),a="0123456789abcdefghijklmnopqrstuvwxyz";var s=typeof BigInt==="function";function Integer(e,t,r,n){if(typeof e==="undefined")return Integer[0];if(typeof t!=="undefined")return+t===10&&!r?parseValue(e):h(e,t,r,n);return parseValue(e)}function BigInteger(e,t){this.value=e;this.sign=t;this.isSmall=false}BigInteger.prototype=Object.create(Integer.prototype);function SmallInteger(e){this.value=e;this.sign=e<0;this.isSmall=true}SmallInteger.prototype=Object.create(Integer.prototype);function NativeBigInt(e){this.value=e}NativeBigInt.prototype=Object.create(Integer.prototype);function isPrecise(e){return-i0)return Math.floor(e);return Math.ceil(e)}function add(e,r){var n=e.length,i=r.length,o=new Array(n),a=0,s=t,u,l;for(l=0;l=s?1:0;o[l]=u-a*s}while(l0)o.push(a);return o}function addAny(e,t){if(e.length>=t.length)return add(e,t);return add(t,e)}function addSmall(e,r){var n=e.length,i=new Array(n),o=t,a,s;for(s=0;s0){i[s++]=r%o;r=Math.floor(r/o)}return i}BigInteger.prototype.add=function(e){var t=parseValue(e);if(this.sign!==t.sign){return this.subtract(t.negate())}var r=this.value,n=t.value;if(t.isSmall){return new BigInteger(addSmall(r,Math.abs(n)),this.sign)}return new BigInteger(addAny(r,n),this.sign)};BigInteger.prototype.plus=BigInteger.prototype.add;SmallInteger.prototype.add=function(e){var t=parseValue(e);var r=this.value;if(r<0!==t.sign){return this.subtract(t.negate())}var n=t.value;if(t.isSmall){if(isPrecise(r+n))return new SmallInteger(r+n);n=smallToArray(Math.abs(n))}return new BigInteger(addSmall(n,Math.abs(r)),r<0)};SmallInteger.prototype.plus=SmallInteger.prototype.add;NativeBigInt.prototype.add=function(e){return new NativeBigInt(this.value+parseValue(e).value)};NativeBigInt.prototype.plus=NativeBigInt.prototype.add;function subtract(e,r){var n=e.length,i=r.length,o=new Array(n),a=0,s=t,u,l;for(u=0;u=0){n=subtract(e,t)}else{n=subtract(t,e);r=!r}n=arrayToSmall(n);if(typeof n==="number"){if(r)n=-n;return new SmallInteger(n)}return new BigInteger(n,r)}function subtractSmall(e,r,n){var i=e.length,o=new Array(i),a=-r,s=t,u,l;for(u=0;u=0)};SmallInteger.prototype.minus=SmallInteger.prototype.subtract;NativeBigInt.prototype.subtract=function(e){return new NativeBigInt(this.value-parseValue(e).value)};NativeBigInt.prototype.minus=NativeBigInt.prototype.subtract;BigInteger.prototype.negate=function(){return new BigInteger(this.value,!this.sign)};SmallInteger.prototype.negate=function(){var e=this.sign;var t=new SmallInteger(-this.value);t.sign=!e;return t};NativeBigInt.prototype.negate=function(){return new NativeBigInt(-this.value)};BigInteger.prototype.abs=function(){return new BigInteger(this.value,false)};SmallInteger.prototype.abs=function(){return new SmallInteger(Math.abs(this.value))};NativeBigInt.prototype.abs=function(){return new NativeBigInt(this.value>=0?this.value:-this.value)};function multiplyLong(e,r){var n=e.length,i=r.length,o=n+i,a=createArray(o),s=t,u,l,c,f,p;for(c=0;c0){i[u++]=a%o;a=Math.floor(a/o)}return i}function shiftLeft(e,t){var r=[];while(t-- >0)r.push(0);return r.concat(e)}function multiplyKaratsuba(e,t){var r=Math.max(e.length,t.length);if(r<=30)return multiplyLong(e,t);r=Math.ceil(r/2);var n=e.slice(r),i=e.slice(0,r),o=t.slice(r),a=t.slice(0,r);var s=multiplyKaratsuba(i,a),u=multiplyKaratsuba(n,o),l=multiplyKaratsuba(addAny(i,n),addAny(a,o));var c=addAny(addAny(s,shiftLeft(subtract(subtract(l,s),u),r)),shiftLeft(u,2*r));trim(c);return c}function useKaratsuba(e,t){return-.012*e-.012*t+15e-6*e*t>0}BigInteger.prototype.multiply=function(e){var r=parseValue(e),n=this.value,i=r.value,o=this.sign!==r.sign,a;if(r.isSmall){if(i===0)return Integer[0];if(i===1)return this;if(i===-1)return this.negate();a=Math.abs(i);if(a=0;p--){f=o-1;if(l[p+i]!==s){f=Math.floor((l[p+i]*o+l[p+i-1])/s)}h=0;d=0;y=c.length;for(v=0;vi){c=(c+1)*s}u=Math.ceil(c/f);do{p=multiplySmall(r,u);if(compareAbs(p,a)<=0)break;u--}while(u);o.push(u);a=subtract(a,p)}o.reverse();return[arrayToSmall(o),arrayToSmall(a)]}function divModSmall(e,r){var n=e.length,i=createArray(n),o=t,a,s,u,l;u=0;for(a=n-1;a>=0;--a){l=u*o+e[a];s=truncate(l/r);u=l-s*r;i[a]=s|0}return[i,u|0]}function divModAny(e,r){var n,i=parseValue(r);if(s){return[new NativeBigInt(e.value/i.value),new NativeBigInt(e.value%i.value)]}var o=e.value,a=i.value;var u;if(a===0)throw new Error("Cannot divide by zero");if(e.isSmall){if(i.isSmall){return[new SmallInteger(truncate(o/a)),new SmallInteger(o%a)]}return[Integer[0],e]}if(i.isSmall){if(a===1)return[e,Integer[0]];if(a==-1)return[e.negate(),Integer[0]];var l=Math.abs(a);if(lt.length?1:-1}for(var r=e.length-1;r>=0;r--){if(e[r]!==t[r])return e[r]>t[r]?1:-1}return 0}BigInteger.prototype.compareAbs=function(e){var t=parseValue(e),r=this.value,n=t.value;if(t.isSmall)return 1;return compareAbs(r,n)};SmallInteger.prototype.compareAbs=function(e){var t=parseValue(e),r=Math.abs(this.value),n=t.value;if(t.isSmall){n=Math.abs(n);return r===n?0:r>n?1:-1}return-1};NativeBigInt.prototype.compareAbs=function(e){var t=this.value;var r=parseValue(e).value;t=t>=0?t:-t;r=r>=0?r:-r;return t===r?0:t>r?1:-1};BigInteger.prototype.compare=function(e){if(e===Infinity){return-1}if(e===-Infinity){return 1}var t=parseValue(e),r=this.value,n=t.value;if(this.sign!==t.sign){return t.sign?1:-1}if(t.isSmall){return this.sign?-1:1}return compareAbs(r,n)*(this.sign?-1:1)};BigInteger.prototype.compareTo=BigInteger.prototype.compare;SmallInteger.prototype.compare=function(e){if(e===Infinity){return-1}if(e===-Infinity){return 1}var t=parseValue(e),r=this.value,n=t.value;if(t.isSmall){return r==n?0:r>n?1:-1}if(r<0!==t.sign){return r<0?-1:1}return r<0?1:-1};SmallInteger.prototype.compareTo=SmallInteger.prototype.compare;NativeBigInt.prototype.compare=function(e){if(e===Infinity){return-1}if(e===-Infinity){return 1}var t=this.value;var r=parseValue(e).value;return t===r?0:t>r?1:-1};NativeBigInt.prototype.compareTo=NativeBigInt.prototype.compare;BigInteger.prototype.equals=function(e){return this.compare(e)===0};NativeBigInt.prototype.eq=NativeBigInt.prototype.equals=SmallInteger.prototype.eq=SmallInteger.prototype.equals=BigInteger.prototype.eq=BigInteger.prototype.equals;BigInteger.prototype.notEquals=function(e){return this.compare(e)!==0};NativeBigInt.prototype.neq=NativeBigInt.prototype.notEquals=SmallInteger.prototype.neq=SmallInteger.prototype.notEquals=BigInteger.prototype.neq=BigInteger.prototype.notEquals;BigInteger.prototype.greater=function(e){return this.compare(e)>0};NativeBigInt.prototype.gt=NativeBigInt.prototype.greater=SmallInteger.prototype.gt=SmallInteger.prototype.greater=BigInteger.prototype.gt=BigInteger.prototype.greater;BigInteger.prototype.lesser=function(e){return this.compare(e)<0};NativeBigInt.prototype.lt=NativeBigInt.prototype.lesser=SmallInteger.prototype.lt=SmallInteger.prototype.lesser=BigInteger.prototype.lt=BigInteger.prototype.lesser;BigInteger.prototype.greaterOrEquals=function(e){return this.compare(e)>=0};NativeBigInt.prototype.geq=NativeBigInt.prototype.greaterOrEquals=SmallInteger.prototype.geq=SmallInteger.prototype.greaterOrEquals=BigInteger.prototype.geq=BigInteger.prototype.greaterOrEquals;BigInteger.prototype.lesserOrEquals=function(e){return this.compare(e)<=0};NativeBigInt.prototype.leq=NativeBigInt.prototype.lesserOrEquals=SmallInteger.prototype.leq=SmallInteger.prototype.lesserOrEquals=BigInteger.prototype.leq=BigInteger.prototype.lesserOrEquals;BigInteger.prototype.isEven=function(){return(this.value[0]&1)===0};SmallInteger.prototype.isEven=function(){return(this.value&1)===0};NativeBigInt.prototype.isEven=function(){return(this.value&BigInt(1))===BigInt(0)};BigInteger.prototype.isOdd=function(){return(this.value[0]&1)===1};SmallInteger.prototype.isOdd=function(){return(this.value&1)===1};NativeBigInt.prototype.isOdd=function(){return(this.value&BigInt(1))===BigInt(1)};BigInteger.prototype.isPositive=function(){return!this.sign};SmallInteger.prototype.isPositive=function(){return this.value>0};NativeBigInt.prototype.isPositive=SmallInteger.prototype.isPositive;BigInteger.prototype.isNegative=function(){return this.sign};SmallInteger.prototype.isNegative=function(){return this.value<0};NativeBigInt.prototype.isNegative=SmallInteger.prototype.isNegative;BigInteger.prototype.isUnit=function(){return false};SmallInteger.prototype.isUnit=function(){return Math.abs(this.value)===1};NativeBigInt.prototype.isUnit=function(){return this.abs().value===BigInt(1)};BigInteger.prototype.isZero=function(){return false};SmallInteger.prototype.isZero=function(){return this.value===0};NativeBigInt.prototype.isZero=function(){return this.value===BigInt(0)};BigInteger.prototype.isDivisibleBy=function(e){var t=parseValue(e);if(t.isZero())return false;if(t.isUnit())return true;if(t.compareAbs(2)===0)return this.isEven();return this.mod(t).isZero()};NativeBigInt.prototype.isDivisibleBy=SmallInteger.prototype.isDivisibleBy=BigInteger.prototype.isDivisibleBy;function isBasicPrime(e){var t=e.abs();if(t.isUnit())return false;if(t.equals(2)||t.equals(3)||t.equals(5))return true;if(t.isEven()||t.isDivisibleBy(3)||t.isDivisibleBy(5))return false;if(t.lesser(49))return true}function millerRabinTest(e,t){var r=e.prev(),i=r,o=0,a,s,u,l;while(i.isEven())i=i.divide(2),o++;e:for(u=0;u-i)return new SmallInteger(e-1);return new BigInteger(o,true)};NativeBigInt.prototype.prev=function(){return new NativeBigInt(this.value-BigInt(1))};var u=[1];while(2*u[u.length-1]<=t)u.push(2*u[u.length-1]);var l=u.length,c=u[l-1];function shift_isSmall(e){return Math.abs(e)<=t}BigInteger.prototype.shiftLeft=function(e){var t=parseValue(e).toJSNumber();if(!shift_isSmall(t)){throw new Error(String(t)+" is too large for shifting.")}if(t<0)return this.shiftRight(-t);var r=this;if(r.isZero())return r;while(t>=l){r=r.multiply(c);t-=l-1}return r.multiply(u[t])};NativeBigInt.prototype.shiftLeft=SmallInteger.prototype.shiftLeft=BigInteger.prototype.shiftLeft;BigInteger.prototype.shiftRight=function(e){var t;var r=parseValue(e).toJSNumber();if(!shift_isSmall(r)){throw new Error(String(r)+" is too large for shifting.")}if(r<0)return this.shiftLeft(-r);var n=this;while(r>=l){if(n.isZero()||n.isNegative()&&n.isUnit())return n;t=divModAny(n,c);n=t[1].isNegative()?t[0].prev():t[0];r-=l-1}t=divModAny(n,u[r]);return t[1].isNegative()?t[0].prev():t[0]};NativeBigInt.prototype.shiftRight=SmallInteger.prototype.shiftRight=BigInteger.prototype.shiftRight;function bitwise(e,t,r){t=parseValue(t);var i=e.isNegative(),o=t.isNegative();var a=i?e.not():e,s=o?t.not():t;var u=0,l=0;var f=null,p=null;var h=[];while(!a.isZero()||!s.isZero()){f=divModAny(a,c);u=f[1].toJSNumber();if(i){u=c-1-u}p=divModAny(s,c);l=p[1].toJSNumber();if(o){l=c-1-l}a=f[0];s=p[0];h.push(r(u,l))}var d=r(i?1:0,o?1:0)!==0?n(-1):n(0);for(var v=h.length-1;v>=0;v-=1){d=d.multiply(c).add(n(h[v]))}return d}BigInteger.prototype.not=function(){return this.negate().prev()};NativeBigInt.prototype.not=SmallInteger.prototype.not=BigInteger.prototype.not;BigInteger.prototype.and=function(e){return bitwise(this,e,function(e,t){return e&t})};NativeBigInt.prototype.and=SmallInteger.prototype.and=BigInteger.prototype.and;BigInteger.prototype.or=function(e){return bitwise(this,e,function(e,t){return e|t})};NativeBigInt.prototype.or=SmallInteger.prototype.or=BigInteger.prototype.or;BigInteger.prototype.xor=function(e){return bitwise(this,e,function(e,t){return e^t})};NativeBigInt.prototype.xor=SmallInteger.prototype.xor=BigInteger.prototype.xor;var f=1<<30,p=(t&-t)*(t&-t)|f;function roughLOB(e){var r=e.value,n=typeof r==="number"?r|f:typeof r==="bigint"?r|BigInt(f):r[0]+r[1]*t|p;return n&-n}function integerLogarithm(e,t){if(t.compareTo(e)<=0){var r=integerLogarithm(e,t.square(t));var i=r.p;var o=r.e;var a=i.multiply(t);return a.compareTo(e)<=0?{p:a,e:o*2+1}:{p:i,e:o*2}}return{p:n(1),e:0}}BigInteger.prototype.bitLength=function(){var e=this;if(e.compareTo(n(0))<0){e=e.negate().subtract(n(1))}if(e.compareTo(n(0))===0){return n(0)}return n(integerLogarithm(e,n(2)).e).add(n(1))};NativeBigInt.prototype.bitLength=SmallInteger.prototype.bitLength=BigInteger.prototype.bitLength;function max(e,t){e=parseValue(e);t=parseValue(t);return e.greater(t)?e:t}function min(e,t){e=parseValue(e);t=parseValue(t);return e.lesser(t)?e:t}function gcd(e,t){e=parseValue(e).abs();t=parseValue(t).abs();if(e.equals(t))return e;if(e.isZero())return t;if(t.isZero())return e;var r=Integer[1],n,i;while(e.isEven()&&t.isEven()){n=min(roughLOB(e),roughLOB(t));e=e.divide(n);t=t.divide(n);r=r.multiply(n)}while(e.isEven()){e=e.divide(roughLOB(e))}do{while(t.isEven()){t=t.divide(roughLOB(t))}if(e.greater(t)){i=t;t=e;e=i}t=t.subtract(e)}while(!t.isZero());return r.isUnit()?e:e.multiply(r)}function lcm(e,t){e=parseValue(e).abs();t=parseValue(t).abs();return e.divide(gcd(e,t)).multiply(t)}function randBetween(e,r,n){e=parseValue(e);r=parseValue(r);var i=n||Math.random;var o=min(e,r),a=max(e,r);var s=a.subtract(o).add(1);if(s.isSmall)return o.add(Math.floor(i()*s));var u=toBase(s,t).value;var l=[],c=true;for(var f=0;f=s){if(l==="1"&&s===1)continue;throw new Error(l+" is not a valid digit in base "+t+".")}}}t=parseValue(t);var c=[];var f=e[0]==="-";for(o=f?1:0;o"&&o=0;o--){n=n.add(e[o].times(i));i=i.times(t)}return r?n.negate():n}function stringify(e,t){t=t||a;if(e"}function toBase(e,t){t=n(t);if(t.isZero()){if(e.isZero())return{value:[0],isNegative:false};throw new Error("Cannot convert nonzero numbers to base 0.")}if(t.equals(-1)){if(e.isZero())return{value:[0],isNegative:false};if(e.isNegative())return{value:[].concat.apply([],Array.apply(null,Array(-e.toJSNumber())).map(Array.prototype.valueOf,[1,0])),isNegative:false};var r=Array.apply(null,Array(e.toJSNumber()-1)).map(Array.prototype.valueOf,[0,1]);r.unshift([1]);return{value:[].concat.apply([],r),isNegative:false}}var i=false;if(e.isNegative()&&t.isPositive()){i=true;e=e.abs()}if(t.isUnit()){if(e.isZero())return{value:[0],isNegative:false};return{value:Array.apply(null,Array(e.toJSNumber())).map(Number.prototype.valueOf,1),isNegative:i}}var o=[];var a=e,s;while(a.isNegative()||a.compareAbs(t)>=0){s=a.divmod(t);a=s.quotient;var u=s.remainder;if(u.isNegative()){u=t.minus(u).abs();a=a.next()}o.push(u.toJSNumber())}o.push(a.toJSNumber());return{value:o.reverse(),isNegative:i}}function toBaseString(e,t,r){var n=toBase(e,t);return(n.isNegative?"-":"")+n.value.map(function(e){return stringify(e,r)}).join("")}BigInteger.prototype.toArray=function(e){return toBase(this,e)};SmallInteger.prototype.toArray=function(e){return toBase(this,e)};NativeBigInt.prototype.toArray=function(e){return toBase(this,e)};BigInteger.prototype.toString=function(t,r){if(t===e)t=10;if(t!==10)return toBaseString(this,t,r);var n=this.value,i=n.length,o=String(n[--i]),a="0000000",s;while(--i>=0){s=String(n[i]);o+=a.slice(s.length)+s}var u=this.sign?"-":"";return u+o};SmallInteger.prototype.toString=function(t,r){if(t===e)t=10;if(t!=10)return toBaseString(this,t,r);return String(this.value)};NativeBigInt.prototype.toString=SmallInteger.prototype.toString;NativeBigInt.prototype.toJSON=BigInteger.prototype.toJSON=SmallInteger.prototype.toJSON=function(){return this.toString()};BigInteger.prototype.valueOf=function(){return parseInt(this.toString(),10)};BigInteger.prototype.toJSNumber=BigInteger.prototype.valueOf;SmallInteger.prototype.valueOf=function(){return this.value};SmallInteger.prototype.toJSNumber=SmallInteger.prototype.valueOf;NativeBigInt.prototype.valueOf=NativeBigInt.prototype.toJSNumber=function(){return parseInt(this.toString(),10)};function parseStringValue(e){if(isPrecise(+e)){var t=+e;if(t===truncate(t))return s?new NativeBigInt(BigInt(t)):new SmallInteger(t);throw new Error("Invalid integer: "+e)}var n=e[0]==="-";if(n)e=e.slice(1);var i=e.split(/e/i);if(i.length>2)throw new Error("Invalid integer: "+i.join("e"));if(i.length===2){var o=i[1];if(o[0]==="+")o=o.slice(1);o=+o;if(o!==truncate(o)||!isPrecise(o))throw new Error("Invalid integer: "+o+" is not a valid exponent.");var a=i[0];var u=a.indexOf(".");if(u>=0){o-=a.length-u-1;a=a.slice(0,u)+a.slice(u+1)}if(o<0)throw new Error("Cannot include negative exponent part for integers");a+=new Array(o+1).join("0");e=a}var l=/^([0-9][0-9]*)$/.test(e);if(!l)throw new Error("Invalid integer: "+e);if(s){return new NativeBigInt(BigInt(n?"-"+e:e))}var c=[],f=e.length,p=r,h=f-p;while(f>0){c.push(+e.slice(h,f));h-=p;if(h<0)h=0;f-=p}trim(c);return new BigInteger(c,n)}function parseNumberValue(e){if(s){return new NativeBigInt(BigInt(e))}if(isPrecise(e)){if(e!==truncate(e))throw new Error(e+" is not an integer.");return new SmallInteger(e)}return parseStringValue(e.toString())}function parseValue(e){if(typeof e==="number"){return parseNumberValue(e)}if(typeof e==="string"){return parseStringValue(e)}if(typeof e==="bigint"){return new NativeBigInt(e)}return e}for(var d=0;d<1e3;d++){Integer[d]=parseValue(d);if(d>0)Integer[-d]=parseValue(-d)}Integer.one=Integer[1];Integer.zero=Integer[0];Integer.minusOne=Integer[-1];Integer.max=max;Integer.min=min;Integer.gcd=gcd;Integer.lcm=lcm;Integer.isInstance=function(e){return e instanceof BigInteger||e instanceof SmallInteger||e instanceof NativeBigInt};Integer.randBetween=randBetween;Integer.fromArray=function(e,t,r){return parseBaseFromArray(e.map(parseValue),parseValue(t||10),r)};return Integer}();if(true&&e.hasOwnProperty("exports")){e.exports=n}if(typeof define==="function"&&define.amd){define(function(){return n})}},971:function(e,t,r){"use strict";e.exports=function(e,t){var n=r(248);var i=e.CancellationError;var o=n.errorObj;function PassThroughHandlerContext(e,t,r){this.promise=e;this.type=t;this.handler=r;this.called=false;this.cancelPromise=null}PassThroughHandlerContext.prototype.isFinallyHandler=function(){return this.type===0};function FinallyHandlerCancelReaction(e){this.finallyHandler=e}FinallyHandlerCancelReaction.prototype._resultCancelled=function(){checkCancel(this.finallyHandler)};function checkCancel(e,t){if(e.cancelPromise!=null){if(arguments.length>1){e.cancelPromise._reject(t)}else{e.cancelPromise._cancel()}e.cancelPromise=null;return true}return false}function succeed(){return finallyHandler.call(this,this.promise._target()._settledValue())}function fail(e){if(checkCancel(this,e))return;o.e=e;return o}function finallyHandler(r){var n=this.promise;var a=this.handler;if(!this.called){this.called=true;var s=this.isFinallyHandler()?a.call(n._boundValue()):a.call(n._boundValue(),r);if(s!==undefined){n._setReturnedNonUndefined();var u=t(s,n);if(u instanceof e){if(this.cancelPromise!=null){if(u._isCancelled()){var l=new i("late cancellation observer");n._attachExtraTrace(l);o.e=l;return o}else if(u.isPending()){u._attachCancellationCallback(new FinallyHandlerCancelReaction(this))}}return u._then(succeed,fail,undefined,this,undefined)}}}if(n.isRejected()){checkCancel(this);o.e=r;return o}else{checkCancel(this);return r}}e.prototype._passThrough=function(e,t,r,n){if(typeof e!=="function")return this.then();return this._then(r,n,undefined,new PassThroughHandlerContext(this,t,e),undefined)};e.prototype.lastly=e.prototype["finally"]=function(e){return this._passThrough(e,0,finallyHandler,finallyHandler)};e.prototype.tap=function(e){return this._passThrough(e,1,finallyHandler)};return PassThroughHandlerContext}},979:function(e,t,r){"use strict";var n=this&&this.__awaiter||function(e,t,r,n){function adopt(e){return e instanceof r?e:new r(function(t){t(e)})}return new(r||(r=Promise))(function(r,i){function fulfilled(e){try{step(n.next(e))}catch(e){i(e)}}function rejected(e){try{step(n["throw"](e))}catch(e){i(e)}}function step(e){e.done?r(e.value):adopt(e.value).then(fulfilled,rejected)}step((n=n.apply(e,t||[])).next())})};var i=this&&this.__importStar||function(e){if(e&&e.__esModule)return e;var t={};if(e!=null)for(var r in e)if(Object.hasOwnProperty.call(e,r))t[r]=e[r];t["default"]=e;return t};Object.defineProperty(t,"__esModule",{value:true});const o=i(r(470));class RetryHelper{constructor(e,t,r){if(e<1){throw new Error("max attempts should be greater than or equal to 1")}this.maxAttempts=e;this.minSeconds=Math.floor(t);this.maxSeconds=Math.floor(r);if(this.minSeconds>this.maxSeconds){throw new Error("min seconds should be less than or equal to max seconds")}}execute(e,t){return n(this,void 0,void 0,function*(){let r=1;while(rsetTimeout(t,e*1e3))})}}t.RetryHelper=RetryHelper},982:function(e,t){"use strict";t.__esModule=true;function parseArgsStringToArgv(e,t,r){var n=/([^\s'"]([^\s'"]*(['"])([^\3]*?)\3)+[^\s'"]*)|[^\s'"]+|(['"])([^\5]*?)\5/gi;var i=e;var o=[];if(t){o.push(t)}if(r){o.push(r)}var a;do{a=n.exec(i);if(a!==null){o.push(firstString(a[1],a[6],a[0]))}}while(a!==null);return o}t["default"]=parseArgsStringToArgv;t.parseArgsStringToArgv=parseArgsStringToArgv;function firstString(){var e=[];for(var t=0;t1){var r=new Array(t-1),n=0,o;for(o=0;o0&&typeof e!=="function"&&typeof t!=="function"){var r=".then() only accepts functions but was passed: "+a.classString(e);if(arguments.length>1){r+=", "+a.classString(t)}this._warn(r)}return this._then(e,t,undefined,undefined,undefined)};Promise.prototype.done=function(e,t){var r=this._then(e,t,undefined,undefined,undefined);r._setIsFinal()};Promise.prototype.spread=function(e){if(typeof e!=="function"){return i("expecting a function but got "+a.classString(e))}return this.all()._then(e,undefined,undefined,v,undefined)};Promise.prototype.toJSON=function(){var e={isFulfilled:false,isRejected:false,fulfillmentValue:undefined,rejectionReason:undefined};if(this.isFulfilled()){e.fulfillmentValue=this.value();e.isFulfilled=true}else if(this.isRejected()){e.rejectionReason=this.reason();e.isRejected=true}return e};Promise.prototype.all=function(){if(arguments.length>0){this._warn(".all() was passed arguments but it does not take any")}return new m(this).promise()};Promise.prototype.error=function(e){return this.caught(a.originatesFromRejection,e)};Promise.getNewLibraryCopy=e.exports;Promise.is=function(e){return e instanceof Promise};Promise.fromNode=Promise.fromCallback=function(e){var t=new Promise(d);t._captureStackTrace();var r=arguments.length>1?!!Object(arguments[1]).multiArgs:false;var n=x(e)(O(t,r));if(n===T){t._rejectCallback(n.e,true)}if(!t._isFateSealed())t._setAsyncGuaranteed();return t};Promise.all=function(e){return new m(e).promise()};Promise.cast=function(e){var t=g(e);if(!(t instanceof Promise)){t=new Promise(d);t._captureStackTrace();t._setFulfilled();t._rejectionHandler0=e}return t};Promise.resolve=Promise.fulfilled=Promise.cast;Promise.reject=Promise.rejected=function(e){var t=new Promise(d);t._captureStackTrace();t._rejectCallback(e,true);return t};Promise.setScheduler=function(e){if(typeof e!=="function"){throw new p("expecting a function but got "+a.classString(e))}return c.setScheduler(e)};Promise.prototype._then=function(e,t,r,n,i){var o=i!==undefined;var u=o?i:new Promise(d);var l=this._target();var f=l._bitField;if(!o){u._propagateFrom(this,3);u._captureStackTrace();if(n===undefined&&(this._bitField&2097152)!==0){if(!((f&50397184)===0)){n=this._boundValue()}else{n=l===this?undefined:this._boundTo}}this._fireEvent("promiseChained",this,u)}var p=s();if(!((f&50397184)===0)){var v,y,g=l._settlePromiseCtx;if((f&33554432)!==0){y=l._rejectionHandler0;v=e}else if((f&16777216)!==0){y=l._fulfillmentHandler0;v=t;l._unsetRejectionIsUnhandled()}else{g=l._settlePromiseLateCancellationObserver;y=new h("late cancellation observer");l._attachExtraTrace(y);v=t}c.invoke(g,l,{handler:p===null?v:typeof v==="function"&&a.domainBind(p,v),promise:u,receiver:n,value:y})}else{l._addCallbacks(e,t,u,n,p)}return u};Promise.prototype._length=function(){return this._bitField&65535};Promise.prototype._isFateSealed=function(){return(this._bitField&117506048)!==0};Promise.prototype._isFollowing=function(){return(this._bitField&67108864)===67108864};Promise.prototype._setLength=function(e){this._bitField=this._bitField&-65536|e&65535};Promise.prototype._setFulfilled=function(){this._bitField=this._bitField|33554432;this._fireEvent("promiseFulfilled",this)};Promise.prototype._setRejected=function(){this._bitField=this._bitField|16777216;this._fireEvent("promiseRejected",this)};Promise.prototype._setFollowing=function(){this._bitField=this._bitField|67108864;this._fireEvent("promiseResolved",this)};Promise.prototype._setIsFinal=function(){this._bitField=this._bitField|4194304};Promise.prototype._isFinal=function(){return(this._bitField&4194304)>0};Promise.prototype._unsetCancelled=function(){this._bitField=this._bitField&~65536};Promise.prototype._setCancelled=function(){this._bitField=this._bitField|65536;this._fireEvent("promiseCancelled",this)};Promise.prototype._setWillBeCancelled=function(){this._bitField=this._bitField|8388608};Promise.prototype._setAsyncGuaranteed=function(){if(c.hasCustomScheduler())return;this._bitField=this._bitField|134217728};Promise.prototype._receiverAt=function(e){var t=e===0?this._receiver0:this[e*4-4+3];if(t===o){return undefined}else if(t===undefined&&this._isBound()){return this._boundValue()}return t};Promise.prototype._promiseAt=function(e){return this[e*4-4+2]};Promise.prototype._fulfillmentHandlerAt=function(e){return this[e*4-4+0]};Promise.prototype._rejectionHandlerAt=function(e){return this[e*4-4+1]};Promise.prototype._boundValue=function(){};Promise.prototype._migrateCallback0=function(e){var t=e._bitField;var r=e._fulfillmentHandler0;var n=e._rejectionHandler0;var i=e._promise0;var a=e._receiverAt(0);if(a===undefined)a=o;this._addCallbacks(r,n,i,a,null)};Promise.prototype._migrateCallbackAt=function(e,t){var r=e._fulfillmentHandlerAt(t);var n=e._rejectionHandlerAt(t);var i=e._promiseAt(t);var a=e._receiverAt(t);if(a===undefined)a=o;this._addCallbacks(r,n,i,a,null)};Promise.prototype._addCallbacks=function(e,t,r,n,i){var o=this._length();if(o>=65535-4){o=0;this._setLength(0)}if(o===0){this._promise0=r;this._receiver0=n;if(typeof e==="function"){this._fulfillmentHandler0=i===null?e:a.domainBind(i,e)}if(typeof t==="function"){this._rejectionHandler0=i===null?t:a.domainBind(i,t)}}else{var s=o*4-4;this[s+2]=r;this[s+3]=n;if(typeof e==="function"){this[s+0]=i===null?e:a.domainBind(i,e)}if(typeof t==="function"){this[s+1]=i===null?t:a.domainBind(i,t)}}this._setLength(o+1);return o};Promise.prototype._proxy=function(e,t){this._addCallbacks(undefined,undefined,t,e,null)};Promise.prototype._resolveCallback=function(e,r){if((this._bitField&117506048)!==0)return;if(e===this)return this._rejectCallback(t(),false);var n=g(e,this);if(!(n instanceof Promise))return this._fulfill(e);if(r)this._propagateFrom(n,2);var i=n._target();if(i===this){this._reject(t());return}var o=i._bitField;if((o&50397184)===0){var a=this._length();if(a>0)i._migrateCallback0(this);for(var s=1;s>>16)return;if(e===this){var n=t();this._attachExtraTrace(n);return this._reject(n)}this._setFulfilled();this._rejectionHandler0=e;if((r&65535)>0){if((r&134217728)!==0){this._settlePromises()}else{c.settlePromises(this)}}};Promise.prototype._reject=function(e){var t=this._bitField;if((t&117506048)>>>16)return;this._setRejected();this._fulfillmentHandler0=e;if(this._isFinal()){return c.fatalError(e,a.isNode)}if((t&65535)>0){c.settlePromises(this)}else{this._ensurePossibleRejectionHandled()}};Promise.prototype._fulfillPromises=function(e,t){for(var r=1;r0){if((e&16842752)!==0){var r=this._fulfillmentHandler0;this._settlePromise0(this._rejectionHandler0,r,e);this._rejectPromises(t,r)}else{var n=this._rejectionHandler0;this._settlePromise0(this._fulfillmentHandler0,n,e);this._fulfillPromises(t,n)}this._setLength(0)}this._clearCancellationData()};Promise.prototype._settledValue=function(){var e=this._bitField;if((e&33554432)!==0){return this._rejectionHandler0}else if((e&16777216)!==0){return this._fulfillmentHandler0}};function deferResolve(e){this.promise._resolveCallback(e)}function deferReject(e){this.promise._rejectCallback(e,false)}Promise.defer=Promise.pending=function(){b.deprecated("Promise.defer","new Promise");var e=new Promise(d);return{promise:e,resolve:deferResolve,reject:deferReject}};a.notEnumerableProp(Promise,"_makeSelfResolutionError",t);r(266)(Promise,d,g,i,b);r(947)(Promise,d,g,b);r(514)(Promise,m,i,b);r(315)(Promise);r(715)(Promise);r(809)(Promise,m,g,d,c,s);Promise.Promise=Promise;Promise.version="3.4.7";r(220)(Promise,m,i,g,d,b);r(414)(Promise);r(780)(Promise,i,g,w,d,b);r(409)(Promise,d,b);r(25)(Promise,i,d,g,Proxyable,b);r(694)(Promise);r(948)(Promise,d);r(321)(Promise,m,g,i);r(832)(Promise,d,g,i);r(814)(Promise,m,i,g,d,b);r(149)(Promise,m,b);r(323)(Promise,m,i);r(610)(Promise,d);r(685)(Promise,d);r(658)(Promise);a.toFastProperties(Promise);a.toFastProperties(Promise.prototype);function fillTypes(e){var t=new Promise(d);t._fulfillmentHandler0=e;t._rejectionHandler0=e;t._promise0=e;t._receiver0=e}fillTypes({a:1});fillTypes({b:2});fillTypes({c:3});fillTypes(1);fillTypes(function(){});fillTypes(undefined);fillTypes(false);fillTypes(new Promise(d));b.setBounds(l.firstLineError,a.lastLineError);return Promise}},986:function(e,t,r){"use strict";var n=this&&this.__awaiter||function(e,t,r,n){function adopt(e){return e instanceof r?e:new r(function(t){t(e)})}return new(r||(r=Promise))(function(r,i){function fulfilled(e){try{step(n.next(e))}catch(e){i(e)}}function rejected(e){try{step(n["throw"](e))}catch(e){i(e)}}function step(e){e.done?r(e.value):adopt(e.value).then(fulfilled,rejected)}step((n=n.apply(e,t||[])).next())})};var i=this&&this.__importStar||function(e){if(e&&e.__esModule)return e;var t={};if(e!=null)for(var r in e)if(Object.hasOwnProperty.call(e,r))t[r]=e[r];t["default"]=e;return t};Object.defineProperty(t,"__esModule",{value:true});const o=i(r(9));function exec(e,t,r){return n(this,void 0,void 0,function*(){const n=o.argStringToArray(e);if(n.length===0){throw new Error(`Parameter 'commandLine' cannot be null or empty.`)}const i=n[0];t=n.slice(1).concat(t||[]);const a=new o.ToolRunner(i,t,r);return a.exec()})}t.exec=exec}},function(e){"use strict";!function(){e.nmd=function(e){e.paths=[];if(!e.children)e.children=[];Object.defineProperty(e,"loaded",{enumerable:true,get:function(){return e.l}});Object.defineProperty(e,"id",{enumerable:true,get:function(){return e.i}});return e}}()}); \ No newline at end of file diff --git a/src/provision.ts b/src/provision.ts index 1709d1f..bb9fa3f 100644 --- a/src/provision.ts +++ b/src/provision.ts @@ -141,24 +141,16 @@ async function httpGetString(url: string): Promise { } async function httpDownload(url: string, localPath: string): Promise { - return new Promise(function (resolve, reject) { - const writeStream = fs.createWriteStream(localPath) - httpc - .get(url) - .then(response => { - response.message - .pipe(writeStream) - .on('close', () => { - resolve() - }) - .on('error', err => { - reject(err) - }) - }) - .catch(reason => { - reject(reason) - }) - }) + const writeStream = fs.createWriteStream(localPath) + try { + const response = await httpc.get(url) + response.message.pipe(writeStream) + return new Promise(function (resolve) { + resolve() + }) + } finally { + writeStream.close() + } } async function extractZip(zip: string, destination: string): Promise {