diff --git a/dist/index.js b/dist/index.js index 74f78a8..cfefe91 100644 --- a/dist/index.js +++ b/dist/index.js @@ -17,7 +17,7 @@ e.exports=i(3765)},3583:(e,t,i)=>{"use strict"; * Copyright(c) 2015 Douglas Christopher Wilson * MIT Licensed */var a=i(7426);var r=i(1017).extname;var n=/^\s*([^;\s]*)(?:;|\s|$)/;var s=/^text\//i;t.charset=charset;t.charsets={lookup:charset};t.contentType=contentType;t.extension=extension;t.extensions=Object.create(null);t.lookup=lookup;t.types=Object.create(null);populateMaps(t.extensions,t.types);function charset(e){if(!e||typeof e!=="string"){return false}var t=n.exec(e);var i=t&&a[t[1].toLowerCase()];if(i&&i.charset){return i.charset}if(t&&s.test(t[1])){return"UTF-8"}return false}function contentType(e){if(!e||typeof e!=="string"){return false}var i=e.indexOf("/")===-1?t.lookup(e):e;if(!i){return false}if(i.indexOf("charset")===-1){var a=t.charset(i);if(a)i+="; charset="+a.toLowerCase()}return i}function extension(e){if(!e||typeof e!=="string"){return false}var i=n.exec(e);var a=i&&t.extensions[i[1].toLowerCase()];if(!a||!a.length){return false}return a[0]}function lookup(e){if(!e||typeof e!=="string"){return false}var i=r("x."+e).toLowerCase().substr(1);if(!i){return false}return t.types[i]||false}function populateMaps(e,t){var i=["nginx","apache",undefined,"iana"];Object.keys(a).forEach((function forEachMimeType(r){var n=a[r];var s=n.extensions;if(!s||!s.length){return}e[r]=s;for(var o=0;oc||l===c&&t[p].substr(0,12)==="application/")){continue}}t[p]=r}}))}},3973:(e,t,i)=>{e.exports=minimatch;minimatch.Minimatch=Minimatch;var a=function(){try{return i(1017)}catch(e){}}()||{sep:"/"};minimatch.sep=a.sep;var r=minimatch.GLOBSTAR=Minimatch.GLOBSTAR={};var n=i(3717);var s={"!":{open:"(?:(?!(?:",close:"))[^/]*?)"},"?":{open:"(?:",close:")?"},"+":{open:"(?:",close:")+"},"*":{open:"(?:",close:")*"},"@":{open:"(?:",close:")"}};var o="[^/]";var p=o+"*?";var l="(?:(?!(?:\\/|^)(?:\\.{1,2})($|\\/)).)*?";var c="(?:(?!(?:\\/|^)\\.).)*?";var d=charSet("().*{}+?[]^$\\!");function charSet(e){return e.split("").reduce((function(e,t){e[t]=true;return e}),{})}var u=/\/+/;minimatch.filter=filter;function filter(e,t){t=t||{};return function(i,a,r){return minimatch(i,e,t)}}function ext(e,t){t=t||{};var i={};Object.keys(e).forEach((function(t){i[t]=e[t]}));Object.keys(t).forEach((function(e){i[e]=t[e]}));return i}minimatch.defaults=function(e){if(!e||typeof e!=="object"||!Object.keys(e).length){return minimatch}var t=minimatch;var i=function minimatch(i,a,r){return t(i,a,ext(e,r))};i.Minimatch=function Minimatch(i,a){return new t.Minimatch(i,ext(e,a))};i.Minimatch.defaults=function defaults(i){return t.defaults(ext(e,i)).Minimatch};i.filter=function filter(i,a){return t.filter(i,ext(e,a))};i.defaults=function defaults(i){return t.defaults(ext(e,i))};i.makeRe=function makeRe(i,a){return t.makeRe(i,ext(e,a))};i.braceExpand=function braceExpand(i,a){return t.braceExpand(i,ext(e,a))};i.match=function(i,a,r){return t.match(i,a,ext(e,r))};return i};Minimatch.defaults=function(e){return minimatch.defaults(e).Minimatch};function minimatch(e,t,i){assertValidPattern(t);if(!i)i={};if(!i.nocomment&&t.charAt(0)==="#"){return false}return new Minimatch(t,i).match(e)}function Minimatch(e,t){if(!(this instanceof Minimatch)){return new Minimatch(e,t)}assertValidPattern(e);if(!t)t={};e=e.trim();if(!t.allowWindowsEscape&&a.sep!=="/"){e=e.split(a.sep).join("/")}this.options=t;this.set=[];this.pattern=e;this.regexp=null;this.negate=false;this.comment=false;this.empty=false;this.partial=!!t.partial;this.make()}Minimatch.prototype.debug=function(){};Minimatch.prototype.make=make;function make(){var e=this.pattern;var t=this.options;if(!t.nocomment&&e.charAt(0)==="#"){this.comment=true;return}if(!e){this.empty=true;return}this.parseNegate();var i=this.globSet=this.braceExpand();if(t.debug)this.debug=function debug(){console.error.apply(console,arguments)};this.debug(this.pattern,i);i=this.globParts=i.map((function(e){return e.split(u)}));this.debug(this.pattern,i);i=i.map((function(e,t,i){return e.map(this.parse,this)}),this);this.debug(this.pattern,i);i=i.filter((function(e){return e.indexOf(false)===-1}));this.debug(this.pattern,i);this.set=i}Minimatch.prototype.parseNegate=parseNegate;function parseNegate(){var e=this.pattern;var t=false;var i=this.options;var a=0;if(i.nonegate)return;for(var r=0,n=e.length;rm){throw new TypeError("pattern is too long")}};Minimatch.prototype.parse=parse;var h={};function parse(e,t){assertValidPattern(e);var i=this.options;if(e==="**"){if(!i.noglobstar)return r;else e="*"}if(e==="")return"";var a="";var n=!!i.nocase;var l=false;var c=[];var u=[];var m;var g=false;var y=-1;var v=-1;var b=e.charAt(0)==="."?"":i.dot?"(?!(?:^|\\/)\\.{1,2}(?:$|\\/))":"(?!\\.)";var x=this;function clearStateChar(){if(m){switch(m){case"*":a+=p;n=true;break;case"?":a+=o;n=true;break;default:a+="\\"+m;break}x.debug("clearStateChar %j %j",m,a);m=false}}for(var w=0,S=e.length,N;w-1;T--){var A=u[T];var D=a.slice(0,A.reStart);var I=a.slice(A.reStart,A.reEnd-8);var B=a.slice(A.reEnd-8,A.reEnd);var L=a.slice(A.reEnd);B+=L;var M=D.split("(").length-1;var k=L;for(w=0;w=0;s--){n=e[s];if(n)break}for(s=0;s>> no match, partial?",e,d,t,u);if(d===o)return true}return false}var h;if(typeof l==="string"){h=c===l;this.debug("string match",l,c,h)}else{h=c.match(l);this.debug("pattern match",l,c,h)}if(!h)return false}if(n===o&&s===p){return true}else if(n===o){return i}else if(s===p){return n===o-1&&e[n]===""}throw new Error("wtf?")};function globUnescape(e){return e.replace(/\\(.)/g,"$1")}function regExpEscape(e){return e.replace(/[-[\]{}()*+?.,\\^$|#\s]/g,"\\$&")}},1077:(e,t,i)=>{"use strict";const a=typeof process==="object"&&process?process:{stdout:null,stderr:null};const r=i(2361);const n=i(2781);const s=i(665);const o=i(1576).StringDecoder;const p=Symbol("EOF");const l=Symbol("maybeEmitEnd");const c=Symbol("emittedEnd");const d=Symbol("emittingEnd");const u=Symbol("emittedError");const m=Symbol("closed");const h=Symbol("read");const g=Symbol("flush");const y=Symbol("flushChunk");const v=Symbol("encoding");const b=Symbol("decoder");const x=Symbol("flowing");const w=Symbol("paused");const S=Symbol("resume");const N=Symbol("bufferLength");const E=Symbol("bufferPush");const C=Symbol("bufferShift");const _=Symbol("objectMode");const O=Symbol("destroyed");const P=global._MP_NO_ITERATOR_SYMBOLS_!=="1";const R=P&&Symbol.asyncIterator||Symbol("asyncIterator not implemented");const T=P&&Symbol.iterator||Symbol("iterator not implemented");const isEndish=e=>e==="end"||e==="finish"||e==="prefinish";const isArrayBuffer=e=>e instanceof ArrayBuffer||typeof e==="object"&&e.constructor&&e.constructor.name==="ArrayBuffer"&&e.byteLength>=0;const isArrayBufferView=e=>!Buffer.isBuffer(e)&&ArrayBuffer.isView(e);e.exports=class Minipass extends n{constructor(e){super();this[x]=false;this[w]=false;this.pipes=new s;this.buffer=new s;this[_]=e&&e.objectMode||false;if(this[_])this[v]=null;else this[v]=e&&e.encoding||null;if(this[v]==="buffer")this[v]=null;this[b]=this[v]?new o(this[v]):null;this[p]=false;this[c]=false;this[d]=false;this[m]=false;this[u]=null;this.writable=true;this.readable=true;this[N]=0;this[O]=false}get bufferLength(){return this[N]}get encoding(){return this[v]}set encoding(e){if(this[_])throw new Error("cannot set encoding in objectMode");if(this[v]&&e!==this[v]&&(this[b]&&this[b].lastNeed||this[N]))throw new Error("cannot change encoding");if(this[v]!==e){this[b]=e?new o(e):null;if(this.buffer.length)this.buffer=this.buffer.map((e=>this[b].write(e)))}this[v]=e}setEncoding(e){this.encoding=e}get objectMode(){return this[_]}set objectMode(e){this[_]=this[_]||!!e}write(e,t,i){if(this[p])throw new Error("write after end");if(this[O]){this.emit("error",Object.assign(new Error("Cannot call write after a stream was destroyed"),{code:"ERR_STREAM_DESTROYED"}));return true}if(typeof t==="function")i=t,t="utf8";if(!t)t="utf8";if(!this[_]&&!Buffer.isBuffer(e)){if(isArrayBufferView(e))e=Buffer.from(e.buffer,e.byteOffset,e.byteLength);else if(isArrayBuffer(e))e=Buffer.from(e);else if(typeof e!=="string")this.objectMode=true}if(!this.objectMode&&!e.length){if(this[N]!==0)this.emit("readable");if(i)i();return this.flowing}if(typeof e==="string"&&!this[_]&&!(t===this[v]&&!this[b].lastNeed)){e=Buffer.from(e,t)}if(Buffer.isBuffer(e)&&this[v])e=this[b].write(e);if(this.flowing){if(this[N]!==0)this[g](true);this.flowing?this.emit("data",e):this[E](e)}else this[E](e);if(this[N]!==0)this.emit("readable");if(i)i();return this.flowing}read(e){if(this[O])return null;try{if(this[N]===0||e===0||e>this[N])return null;if(this[_])e=null;if(this.buffer.length>1&&!this[_]){if(this.encoding)this.buffer=new s([Array.from(this.buffer).join("")]);else this.buffer=new s([Buffer.concat(Array.from(this.buffer),this[N])])}return this[h](e||null,this.buffer.head.value)}finally{this[l]()}}[h](e,t){if(e===t.length||e===null)this[C]();else{this.buffer.head.value=t.slice(e);t=t.slice(0,e);this[N]-=e}this.emit("data",t);if(!this.buffer.length&&!this[p])this.emit("drain");return t}end(e,t,i){if(typeof e==="function")i=e,e=null;if(typeof t==="function")i=t,t="utf8";if(e)this.write(e,t);if(i)this.once("end",i);this[p]=true;this.writable=false;if(this.flowing||!this[w])this[l]();return this}[S](){if(this[O])return;this[w]=false;this[x]=true;this.emit("resume");if(this.buffer.length)this[g]();else if(this[p])this[l]();else this.emit("drain")}resume(){return this[S]()}pause(){this[x]=false;this[w]=true}get destroyed(){return this[O]}get flowing(){return this[x]}get paused(){return this[w]}[E](e){if(this[_])this[N]+=1;else this[N]+=e.length;return this.buffer.push(e)}[C](){if(this.buffer.length){if(this[_])this[N]-=1;else this[N]-=this.buffer.head.value.length}return this.buffer.shift()}[g](e){do{}while(this[y](this[C]()));if(!e&&!this.buffer.length&&!this[p])this.emit("drain")}[y](e){return e?(this.emit("data",e),this.flowing):false}pipe(e,t){if(this[O])return;const i=this[c];t=t||{};if(e===a.stdout||e===a.stderr)t.end=false;else t.end=t.end!==false;const r={dest:e,opts:t,ondrain:e=>this[S]()};this.pipes.push(r);e.on("drain",r.ondrain);this[S]();if(i&&r.opts.end)r.dest.end();return e}addListener(e,t){return this.on(e,t)}on(e,t){try{return super.on(e,t)}finally{if(e==="data"&&!this.pipes.length&&!this.flowing)this[S]();else if(isEndish(e)&&this[c]){super.emit(e);this.removeAllListeners(e)}else if(e==="error"&&this[u]){t.call(this,this[u])}}}get emittedEnd(){return this[c]}[l](){if(!this[d]&&!this[c]&&!this[O]&&this.buffer.length===0&&this[p]){this[d]=true;this.emit("end");this.emit("prefinish");this.emit("finish");if(this[m])this.emit("close");this[d]=false}}emit(e,t){if(e!=="error"&&e!=="close"&&e!==O&&this[O])return;else if(e==="data"){if(!t)return;if(this.pipes.length)this.pipes.forEach((e=>e.dest.write(t)===false&&this.pause()))}else if(e==="end"){if(this[c]===true)return;this[c]=true;this.readable=false;if(this[b]){t=this[b].end();if(t){this.pipes.forEach((e=>e.dest.write(t)));super.emit("data",t)}}this.pipes.forEach((e=>{e.dest.removeListener("drain",e.ondrain);if(e.opts.end)e.dest.end()}))}else if(e==="close"){this[m]=true;if(!this[c]&&!this[O])return}else if(e==="error"){this[u]=t}const i=new Array(arguments.length);i[0]=e;i[1]=t;if(arguments.length>2){for(let e=2;e{e.push(t);if(!this[_])e.dataLength+=t.length}));return t.then((()=>e))}concat(){return this[_]?Promise.reject(new Error("cannot concat in objectMode")):this.collect().then((e=>this[_]?Promise.reject(new Error("cannot concat in objectMode")):this[v]?e.join(""):Buffer.concat(e,e.dataLength)))}promise(){return new Promise(((e,t)=>{this.on(O,(()=>t(new Error("stream destroyed"))));this.on("error",(e=>t(e)));this.on("end",(()=>e()))}))}[R](){const next=()=>{const e=this.read();if(e!==null)return Promise.resolve({done:false,value:e});if(this[p])return Promise.resolve({done:true});let t=null;let i=null;const onerr=e=>{this.removeListener("data",ondata);this.removeListener("end",onend);i(e)};const ondata=e=>{this.removeListener("error",onerr);this.removeListener("end",onend);this.pause();t({value:e,done:!!this[p]})};const onend=()=>{this.removeListener("error",onerr);this.removeListener("data",ondata);t({done:true})};const ondestroy=()=>onerr(new Error("stream destroyed"));return new Promise(((e,a)=>{i=a;t=e;this.once(O,ondestroy);this.once("error",onerr);this.once("end",onend);this.once("data",ondata)}))};return{next:next}}[T](){const next=()=>{const e=this.read();const t=e===null;return{value:e,done:t}};return{next:next}}destroy(e){if(this[O]){if(e)this.emit("error",e);else this.emit(O);return this}this[O]=true;this.buffer=new s;this[N]=0;if(typeof this.close==="function"&&!this[m])this.close();if(e)this.emit("error",e);else this.emit(O);return this}static isStream(e){return!!e&&(e instanceof Minipass||e instanceof n||e instanceof r&&(typeof e.pipe==="function"||typeof e.write==="function"&&typeof e.end==="function"))}}},6769:(e,t,i)=>{const a=i(9796).constants||{ZLIB_VERNUM:4736};e.exports=Object.freeze(Object.assign(Object.create(null),{Z_NO_FLUSH:0,Z_PARTIAL_FLUSH:1,Z_SYNC_FLUSH:2,Z_FULL_FLUSH:3,Z_FINISH:4,Z_BLOCK:5,Z_OK:0,Z_STREAM_END:1,Z_NEED_DICT:2,Z_ERRNO:-1,Z_STREAM_ERROR:-2,Z_DATA_ERROR:-3,Z_MEM_ERROR:-4,Z_BUF_ERROR:-5,Z_VERSION_ERROR:-6,Z_NO_COMPRESSION:0,Z_BEST_SPEED:1,Z_BEST_COMPRESSION:9,Z_DEFAULT_COMPRESSION:-1,Z_FILTERED:1,Z_HUFFMAN_ONLY:2,Z_RLE:3,Z_FIXED:4,Z_DEFAULT_STRATEGY:0,DEFLATE:1,INFLATE:2,GZIP:3,GUNZIP:4,DEFLATERAW:5,INFLATERAW:6,UNZIP:7,BROTLI_DECODE:8,BROTLI_ENCODE:9,Z_MIN_WINDOWBITS:8,Z_MAX_WINDOWBITS:15,Z_DEFAULT_WINDOWBITS:15,Z_MIN_CHUNK:64,Z_MAX_CHUNK:Infinity,Z_DEFAULT_CHUNK:16384,Z_MIN_MEMLEVEL:1,Z_MAX_MEMLEVEL:9,Z_DEFAULT_MEMLEVEL:8,Z_MIN_LEVEL:-1,Z_MAX_LEVEL:9,Z_DEFAULT_LEVEL:-1,BROTLI_OPERATION_PROCESS:0,BROTLI_OPERATION_FLUSH:1,BROTLI_OPERATION_FINISH:2,BROTLI_OPERATION_EMIT_METADATA:3,BROTLI_MODE_GENERIC:0,BROTLI_MODE_TEXT:1,BROTLI_MODE_FONT:2,BROTLI_DEFAULT_MODE:0,BROTLI_MIN_QUALITY:0,BROTLI_MAX_QUALITY:11,BROTLI_DEFAULT_QUALITY:11,BROTLI_MIN_WINDOW_BITS:10,BROTLI_MAX_WINDOW_BITS:24,BROTLI_LARGE_MAX_WINDOW_BITS:30,BROTLI_DEFAULT_WINDOW:22,BROTLI_MIN_INPUT_BLOCK_BITS:16,BROTLI_MAX_INPUT_BLOCK_BITS:24,BROTLI_PARAM_MODE:0,BROTLI_PARAM_QUALITY:1,BROTLI_PARAM_LGWIN:2,BROTLI_PARAM_LGBLOCK:3,BROTLI_PARAM_DISABLE_LITERAL_CONTEXT_MODELING:4,BROTLI_PARAM_SIZE_HINT:5,BROTLI_PARAM_LARGE_WINDOW:6,BROTLI_PARAM_NPOSTFIX:7,BROTLI_PARAM_NDIRECT:8,BROTLI_DECODER_RESULT_ERROR:0,BROTLI_DECODER_RESULT_SUCCESS:1,BROTLI_DECODER_RESULT_NEEDS_MORE_INPUT:2,BROTLI_DECODER_RESULT_NEEDS_MORE_OUTPUT:3,BROTLI_DECODER_PARAM_DISABLE_RING_BUFFER_REALLOCATION:0,BROTLI_DECODER_PARAM_LARGE_WINDOW:1,BROTLI_DECODER_NO_ERROR:0,BROTLI_DECODER_SUCCESS:1,BROTLI_DECODER_NEEDS_MORE_INPUT:2,BROTLI_DECODER_NEEDS_MORE_OUTPUT:3,BROTLI_DECODER_ERROR_FORMAT_EXUBERANT_NIBBLE:-1,BROTLI_DECODER_ERROR_FORMAT_RESERVED:-2,BROTLI_DECODER_ERROR_FORMAT_EXUBERANT_META_NIBBLE:-3,BROTLI_DECODER_ERROR_FORMAT_SIMPLE_HUFFMAN_ALPHABET:-4,BROTLI_DECODER_ERROR_FORMAT_SIMPLE_HUFFMAN_SAME:-5,BROTLI_DECODER_ERROR_FORMAT_CL_SPACE:-6,BROTLI_DECODER_ERROR_FORMAT_HUFFMAN_SPACE:-7,BROTLI_DECODER_ERROR_FORMAT_CONTEXT_MAP_REPEAT:-8,BROTLI_DECODER_ERROR_FORMAT_BLOCK_LENGTH_1:-9,BROTLI_DECODER_ERROR_FORMAT_BLOCK_LENGTH_2:-10,BROTLI_DECODER_ERROR_FORMAT_TRANSFORM:-11,BROTLI_DECODER_ERROR_FORMAT_DICTIONARY:-12,BROTLI_DECODER_ERROR_FORMAT_WINDOW_BITS:-13,BROTLI_DECODER_ERROR_FORMAT_PADDING_1:-14,BROTLI_DECODER_ERROR_FORMAT_PADDING_2:-15,BROTLI_DECODER_ERROR_FORMAT_DISTANCE:-16,BROTLI_DECODER_ERROR_DICTIONARY_NOT_SET:-19,BROTLI_DECODER_ERROR_INVALID_ARGUMENTS:-20,BROTLI_DECODER_ERROR_ALLOC_CONTEXT_MODES:-21,BROTLI_DECODER_ERROR_ALLOC_TREE_GROUPS:-22,BROTLI_DECODER_ERROR_ALLOC_CONTEXT_MAP:-25,BROTLI_DECODER_ERROR_ALLOC_RING_BUFFER_1:-26,BROTLI_DECODER_ERROR_ALLOC_RING_BUFFER_2:-27,BROTLI_DECODER_ERROR_ALLOC_BLOCK_TYPE_TREES:-30,BROTLI_DECODER_ERROR_UNREACHABLE:-31},a))},3486:(e,t,i)=>{"use strict";const a=i(9491);const r=i(4300).Buffer;const n=i(9796);const s=t.constants=i(6769);const o=i(1077);const p=r.concat;const l=Symbol("_superWrite");class ZlibError extends Error{constructor(e){super("zlib: "+e.message);this.code=e.code;this.errno=e.errno;if(!this.code)this.code="ZLIB_ERROR";this.message="zlib: "+e.message;Error.captureStackTrace(this,this.constructor)}get name(){return"ZlibError"}}const c=Symbol("opts");const d=Symbol("flushFlag");const u=Symbol("finishFlushFlag");const m=Symbol("fullFlushFlag");const h=Symbol("handle");const g=Symbol("onError");const y=Symbol("sawError");const v=Symbol("level");const b=Symbol("strategy");const x=Symbol("ended");const w=Symbol("_defaultFullFlush");class ZlibBase extends o{constructor(e,t){if(!e||typeof e!=="object")throw new TypeError("invalid options for ZlibBase constructor");super(e);this[y]=false;this[x]=false;this[c]=e;this[d]=e.flush;this[u]=e.finishFlush;try{this[h]=new n[t](e)}catch(e){throw new ZlibError(e)}this[g]=e=>{if(this[y])return;this[y]=true;this.close();this.emit("error",e)};this[h].on("error",(e=>this[g](new ZlibError(e))));this.once("end",(()=>this.close))}close(){if(this[h]){this[h].close();this[h]=null;this.emit("close")}}reset(){if(!this[y]){a(this[h],"zlib binding closed");return this[h].reset()}}flush(e){if(this.ended)return;if(typeof e!=="number")e=this[m];this.write(Object.assign(r.alloc(0),{[d]:e}))}end(e,t,i){if(e)this.write(e,t);this.flush(this[u]);this[x]=true;return super.end(null,null,i)}get ended(){return this[x]}write(e,t,i){if(typeof t==="function")i=t,t="utf8";if(typeof e==="string")e=r.from(e,t);if(this[y])return;a(this[h],"zlib binding closed");const n=this[h]._handle;const s=n.close;n.close=()=>{};const o=this[h].close;this[h].close=()=>{};r.concat=e=>e;let c;try{const t=typeof e[d]==="number"?e[d]:this[d];c=this[h]._processChunk(e,t);r.concat=p}catch(e){r.concat=p;this[g](new ZlibError(e))}finally{if(this[h]){this[h]._handle=n;n.close=s;this[h].close=o;this[h].removeAllListeners("error")}}if(this[h])this[h].on("error",(e=>this[g](new ZlibError(e))));let u;if(c){if(Array.isArray(c)&&c.length>0){u=this[l](r.from(c[0]));for(let e=1;e{this.flush(e);t()};try{this[h].params(e,t)}finally{this[h].flush=i}if(this[h]){this[v]=e;this[b]=t}}}}class Deflate extends Zlib{constructor(e){super(e,"Deflate")}}class Inflate extends Zlib{constructor(e){super(e,"Inflate")}}const S=Symbol("_portable");class Gzip extends Zlib{constructor(e){super(e,"Gzip");this[S]=e&&!!e.portable}[l](e){if(!this[S])return super[l](e);this[S]=false;e[9]=255;return super[l](e)}}class Gunzip extends Zlib{constructor(e){super(e,"Gunzip")}}class DeflateRaw extends Zlib{constructor(e){super(e,"DeflateRaw")}}class InflateRaw extends Zlib{constructor(e){super(e,"InflateRaw")}}class Unzip extends Zlib{constructor(e){super(e,"Unzip")}}class Brotli extends ZlibBase{constructor(e,t){e=e||{};e.flush=e.flush||s.BROTLI_OPERATION_PROCESS;e.finishFlush=e.finishFlush||s.BROTLI_OPERATION_FINISH;super(e,t);this[m]=s.BROTLI_OPERATION_FLUSH}}class BrotliCompress extends Brotli{constructor(e){super(e,"BrotliCompress")}}class BrotliDecompress extends Brotli{constructor(e){super(e,"BrotliDecompress")}}t.Deflate=Deflate;t.Inflate=Inflate;t.Gzip=Gzip;t.Gunzip=Gunzip;t.DeflateRaw=DeflateRaw;t.InflateRaw=InflateRaw;t.Unzip=Unzip;if(typeof n.BrotliCompress==="function"){t.BrotliCompress=BrotliCompress;t.BrotliDecompress=BrotliDecompress}else{t.BrotliCompress=t.BrotliDecompress=class{constructor(){throw new Error("Brotli is not supported in this version of Node.js")}}}},6186:(e,t,i)=>{const a=i(2853);const r=i(2930);const{mkdirpNative:n,mkdirpNativeSync:s}=i(4983);const{mkdirpManual:o,mkdirpManualSync:p}=i(356);const{useNative:l,useNativeSync:c}=i(4518);const mkdirp=(e,t)=>{e=r(e);t=a(t);return l(t)?n(e,t):o(e,t)};const mkdirpSync=(e,t)=>{e=r(e);t=a(t);return c(t)?s(e,t):p(e,t)};mkdirp.sync=mkdirpSync;mkdirp.native=(e,t)=>n(r(e),a(t));mkdirp.manual=(e,t)=>o(r(e),a(t));mkdirp.nativeSync=(e,t)=>s(r(e),a(t));mkdirp.manualSync=(e,t)=>p(r(e),a(t));e.exports=mkdirp},4992:(e,t,i)=>{const{dirname:a}=i(1017);const findMade=(e,t,i=undefined)=>{if(i===t)return Promise.resolve();return e.statAsync(t).then((e=>e.isDirectory()?i:undefined),(i=>i.code==="ENOENT"?findMade(e,a(t),t):undefined))};const findMadeSync=(e,t,i=undefined)=>{if(i===t)return undefined;try{return e.statSync(t).isDirectory()?i:undefined}catch(i){return i.code==="ENOENT"?findMadeSync(e,a(t),t):undefined}};e.exports={findMade:findMade,findMadeSync:findMadeSync}},356:(e,t,i)=>{const{dirname:a}=i(1017);const mkdirpManual=(e,t,i)=>{t.recursive=false;const r=a(e);if(r===e){return t.mkdirAsync(e,t).catch((e=>{if(e.code!=="EISDIR")throw e}))}return t.mkdirAsync(e,t).then((()=>i||e),(a=>{if(a.code==="ENOENT")return mkdirpManual(r,t).then((i=>mkdirpManual(e,t,i)));if(a.code!=="EEXIST"&&a.code!=="EROFS")throw a;return t.statAsync(e).then((e=>{if(e.isDirectory())return i;else throw a}),(()=>{throw a}))}))};const mkdirpManualSync=(e,t,i)=>{const r=a(e);t.recursive=false;if(r===e){try{return t.mkdirSync(e,t)}catch(e){if(e.code!=="EISDIR")throw e;else return}}try{t.mkdirSync(e,t);return i||e}catch(a){if(a.code==="ENOENT")return mkdirpManualSync(e,t,mkdirpManualSync(r,t,i));if(a.code!=="EEXIST"&&a.code!=="EROFS")throw a;try{if(!t.statSync(e).isDirectory())throw a}catch(e){throw a}}};e.exports={mkdirpManual:mkdirpManual,mkdirpManualSync:mkdirpManualSync}},4983:(e,t,i)=>{const{dirname:a}=i(1017);const{findMade:r,findMadeSync:n}=i(4992);const{mkdirpManual:s,mkdirpManualSync:o}=i(356);const mkdirpNative=(e,t)=>{t.recursive=true;const i=a(e);if(i===e)return t.mkdirAsync(e,t);return r(t,e).then((i=>t.mkdirAsync(e,t).then((()=>i)).catch((i=>{if(i.code==="ENOENT")return s(e,t);else throw i}))))};const mkdirpNativeSync=(e,t)=>{t.recursive=true;const i=a(e);if(i===e)return t.mkdirSync(e,t);const r=n(t,e);try{t.mkdirSync(e,t);return r}catch(i){if(i.code==="ENOENT")return o(e,t);else throw i}};e.exports={mkdirpNative:mkdirpNative,mkdirpNativeSync:mkdirpNativeSync}},2853:(e,t,i)=>{const{promisify:a}=i(3837);const r=i(7147);const optsArg=e=>{if(!e)e={mode:511,fs:r};else if(typeof e==="object")e={mode:511,fs:r,...e};else if(typeof e==="number")e={mode:e,fs:r};else if(typeof e==="string")e={mode:parseInt(e,8),fs:r};else throw new TypeError("invalid options argument");e.mkdir=e.mkdir||e.fs.mkdir||r.mkdir;e.mkdirAsync=a(e.mkdir);e.stat=e.stat||e.fs.stat||r.stat;e.statAsync=a(e.stat);e.statSync=e.statSync||e.fs.statSync||r.statSync;e.mkdirSync=e.mkdirSync||e.fs.mkdirSync||r.mkdirSync;return e};e.exports=optsArg},2930:(e,t,i)=>{const a=process.env.__TESTING_MKDIRP_PLATFORM__||process.platform;const{resolve:r,parse:n}=i(1017);const pathArg=e=>{if(/\0/.test(e)){throw Object.assign(new TypeError("path must be a string without null bytes"),{path:e,code:"ERR_INVALID_ARG_VALUE"})}e=r(e);if(a==="win32"){const t=/[*|"<>?:]/;const{root:i}=n(e);if(t.test(e.substr(i.length))){throw Object.assign(new Error("Illegal characters in path."),{path:e,code:"EINVAL"})}}return e};e.exports=pathArg},4518:(e,t,i)=>{const a=i(7147);const r=process.env.__TESTING_MKDIRP_NODE_VERSION__||process.version;const n=r.replace(/^v/,"").split(".");const s=+n[0]>10||+n[0]===10&&+n[1]>=12;const o=!s?()=>false:e=>e.mkdir===a.mkdir;const p=!s?()=>false:e=>e.mkdirSync===a.mkdirSync;e.exports={useNative:o,useNativeSync:p}},467:(e,t,i)=>{"use strict";Object.defineProperty(t,"__esModule",{value:true});function _interopDefault(e){return e&&typeof e==="object"&&"default"in e?e["default"]:e}var a=_interopDefault(i(2781));var r=_interopDefault(i(3685));var n=_interopDefault(i(7310));var s=_interopDefault(i(3323));var o=_interopDefault(i(5687));var p=_interopDefault(i(9796));const l=a.Readable;const c=Symbol("buffer");const d=Symbol("type");class Blob{constructor(){this[d]="";const e=arguments[0];const t=arguments[1];const i=[];let a=0;if(e){const t=e;const r=Number(t.length);for(let e=0;e1&&arguments[1]!==undefined?arguments[1]:{},r=i.size;let n=r===undefined?0:r;var s=i.timeout;let o=s===undefined?0:s;if(e==null){e=null}else if(isURLSearchParams(e)){e=Buffer.from(e.toString())}else if(isBlob(e));else if(Buffer.isBuffer(e));else if(Object.prototype.toString.call(e)==="[object ArrayBuffer]"){e=Buffer.from(e)}else if(ArrayBuffer.isView(e)){e=Buffer.from(e.buffer,e.byteOffset,e.byteLength)}else if(e instanceof a);else{e=Buffer.from(String(e))}this[m]={body:e,disturbed:false,error:null};this.size=n;this.timeout=o;if(e instanceof a){e.on("error",(function(e){const i=e.name==="AbortError"?e:new FetchError(`Invalid response body while trying to fetch ${t.url}: ${e.message}`,"system",e);t[m].error=i}))}}Body.prototype={get body(){return this[m].body},get bodyUsed(){return this[m].disturbed},arrayBuffer(){return consumeBody.call(this).then((function(e){return e.buffer.slice(e.byteOffset,e.byteOffset+e.byteLength)}))},blob(){let e=this.headers&&this.headers.get("content-type")||"";return consumeBody.call(this).then((function(t){return Object.assign(new Blob([],{type:e.toLowerCase()}),{[c]:t})}))},json(){var e=this;return consumeBody.call(this).then((function(t){try{return JSON.parse(t.toString())}catch(t){return Body.Promise.reject(new FetchError(`invalid json response body at ${e.url} reason: ${t.message}`,"invalid-json"))}}))},text(){return consumeBody.call(this).then((function(e){return e.toString()}))},buffer(){return consumeBody.call(this)},textConverted(){var e=this;return consumeBody.call(this).then((function(t){return convertBody(t,e.headers)}))}};Object.defineProperties(Body.prototype,{body:{enumerable:true},bodyUsed:{enumerable:true},arrayBuffer:{enumerable:true},blob:{enumerable:true},json:{enumerable:true},text:{enumerable:true}});Body.mixIn=function(e){for(const t of Object.getOwnPropertyNames(Body.prototype)){if(!(t in e)){const i=Object.getOwnPropertyDescriptor(Body.prototype,t);Object.defineProperty(e,t,i)}}};function consumeBody(){var e=this;if(this[m].disturbed){return Body.Promise.reject(new TypeError(`body used already for: ${this.url}`))}this[m].disturbed=true;if(this[m].error){return Body.Promise.reject(this[m].error)}let t=this.body;if(t===null){return Body.Promise.resolve(Buffer.alloc(0))}if(isBlob(t)){t=t.stream()}if(Buffer.isBuffer(t)){return Body.Promise.resolve(t)}if(!(t instanceof a)){return Body.Promise.resolve(Buffer.alloc(0))}let i=[];let r=0;let n=false;return new Body.Promise((function(a,s){let o;if(e.timeout){o=setTimeout((function(){n=true;s(new FetchError(`Response timeout while trying to fetch ${e.url} (over ${e.timeout}ms)`,"body-timeout"))}),e.timeout)}t.on("error",(function(t){if(t.name==="AbortError"){n=true;s(t)}else{s(new FetchError(`Invalid response body while trying to fetch ${e.url}: ${t.message}`,"system",t))}}));t.on("data",(function(t){if(n||t===null){return}if(e.size&&r+t.length>e.size){n=true;s(new FetchError(`content size at ${e.url} over limit: ${e.size}`,"max-size"));return}r+=t.length;i.push(t)}));t.on("end",(function(){if(n){return}clearTimeout(o);try{a(Buffer.concat(i,r))}catch(t){s(new FetchError(`Could not create Buffer from response body for ${e.url}: ${t.message}`,"system",t))}}))}))}function convertBody(e,t){if(typeof u!=="function"){throw new Error("The package `encoding` must be installed to use the textConverted() function")}const i=t.get("content-type");let a="utf-8";let r,n;if(i){r=/charset=([^;]*)/i.exec(i)}n=e.slice(0,1024).toString();if(!r&&n){r=/0&&arguments[0]!==undefined?arguments[0]:undefined;this[v]=Object.create(null);if(e instanceof Headers){const t=e.raw();const i=Object.keys(t);for(const e of i){for(const i of t[e]){this.append(e,i)}}return}if(e==null);else if(typeof e==="object"){const t=e[Symbol.iterator];if(t!=null){if(typeof t!=="function"){throw new TypeError("Header pairs must be iterable")}const i=[];for(const t of e){if(typeof t!=="object"||typeof t[Symbol.iterator]!=="function"){throw new TypeError("Each header pair must be iterable")}i.push(Array.from(t))}for(const e of i){if(e.length!==2){throw new TypeError("Each header pair must be a name/value tuple")}this.append(e[0],e[1])}}else{for(const t of Object.keys(e)){const i=e[t];this.append(t,i)}}}else{throw new TypeError("Provided initializer must be an object")}}get(e){e=`${e}`;validateName(e);const t=find(this[v],e);if(t===undefined){return null}return this[v][t].join(", ")}forEach(e){let t=arguments.length>1&&arguments[1]!==undefined?arguments[1]:undefined;let i=getHeaders(this);let a=0;while(a1&&arguments[1]!==undefined?arguments[1]:"key+value";const i=Object.keys(e[v]).sort();return i.map(t==="key"?function(e){return e.toLowerCase()}:t==="value"?function(t){return e[v][t].join(", ")}:function(t){return[t.toLowerCase(),e[v][t].join(", ")]})}const b=Symbol("internal");function createHeadersIterator(e,t){const i=Object.create(x);i[b]={target:e,kind:t,index:0};return i}const x=Object.setPrototypeOf({next(){if(!this||Object.getPrototypeOf(this)!==x){throw new TypeError("Value of `this` is not a HeadersIterator")}var e=this[b];const t=e.target,i=e.kind,a=e.index;const r=getHeaders(t,i);const n=r.length;if(a>=n){return{value:undefined,done:true}}this[b].index=a+1;return{value:r[a],done:false}}},Object.getPrototypeOf(Object.getPrototypeOf([][Symbol.iterator]())));Object.defineProperty(x,Symbol.toStringTag,{value:"HeadersIterator",writable:false,enumerable:false,configurable:true});function exportNodeCompatibleHeaders(e){const t=Object.assign({__proto__:null},e[v]);const i=find(e[v],"Host");if(i!==undefined){t[i]=t[i][0]}return t}function createHeadersLenient(e){const t=new Headers;for(const i of Object.keys(e)){if(g.test(i)){continue}if(Array.isArray(e[i])){for(const a of e[i]){if(y.test(a)){continue}if(t[v][i]===undefined){t[v][i]=[a]}else{t[v][i].push(a)}}}else if(!y.test(e[i])){t[v][i]=[e[i]]}}return t}const w=Symbol("Response internals");const S=r.STATUS_CODES;class Response{constructor(){let e=arguments.length>0&&arguments[0]!==undefined?arguments[0]:null;let t=arguments.length>1&&arguments[1]!==undefined?arguments[1]:{};Body.call(this,e,t);const i=t.status||200;const a=new Headers(t.headers);if(e!=null&&!a.has("Content-Type")){const t=extractContentType(e);if(t){a.append("Content-Type",t)}}this[w]={url:t.url,status:i,statusText:t.statusText||S[i],headers:a,counter:t.counter}}get url(){return this[w].url||""}get status(){return this[w].status}get ok(){return this[w].status>=200&&this[w].status<300}get redirected(){return this[w].counter>0}get statusText(){return this[w].statusText}get headers(){return this[w].headers}clone(){return new Response(clone(this),{url:this.url,status:this.status,statusText:this.statusText,headers:this.headers,ok:this.ok,redirected:this.redirected})}}Body.mixIn(Response.prototype);Object.defineProperties(Response.prototype,{url:{enumerable:true},status:{enumerable:true},ok:{enumerable:true},redirected:{enumerable:true},statusText:{enumerable:true},headers:{enumerable:true},clone:{enumerable:true}});Object.defineProperty(Response.prototype,Symbol.toStringTag,{value:"Response",writable:false,enumerable:false,configurable:true});const N=Symbol("Request internals");const E=n.URL||s.URL;const C=n.parse;const _=n.format;function parseURL(e){if(/^[a-zA-Z][a-zA-Z\d+\-.]*:/.exec(e)){e=new E(e).toString()}return C(e)}const O="destroy"in a.Readable.prototype;function isRequest(e){return typeof e==="object"&&typeof e[N]==="object"}function isAbortSignal(e){const t=e&&typeof e==="object"&&Object.getPrototypeOf(e);return!!(t&&t.constructor.name==="AbortSignal")}class Request{constructor(e){let t=arguments.length>1&&arguments[1]!==undefined?arguments[1]:{};let i;if(!isRequest(e)){if(e&&e.href){i=parseURL(e.href)}else{i=parseURL(`${e}`)}e={}}else{i=parseURL(e.url)}let a=t.method||e.method||"GET";a=a.toUpperCase();if((t.body!=null||isRequest(e)&&e.body!==null)&&(a==="GET"||a==="HEAD")){throw new TypeError("Request with GET/HEAD method cannot have body")}let r=t.body!=null?t.body:isRequest(e)&&e.body!==null?clone(e):null;Body.call(this,r,{timeout:t.timeout||e.timeout||0,size:t.size||e.size||0});const n=new Headers(t.headers||e.headers||{});if(r!=null&&!n.has("Content-Type")){const e=extractContentType(r);if(e){n.append("Content-Type",e)}}let s=isRequest(e)?e.signal:null;if("signal"in t)s=t.signal;if(s!=null&&!isAbortSignal(s)){throw new TypeError("Expected signal to be an instanceof AbortSignal")}this[N]={method:a,redirect:t.redirect||e.redirect||"follow",headers:n,parsedURL:i,signal:s};this.follow=t.follow!==undefined?t.follow:e.follow!==undefined?e.follow:20;this.compress=t.compress!==undefined?t.compress:e.compress!==undefined?e.compress:true;this.counter=t.counter||e.counter||0;this.agent=t.agent||e.agent}get method(){return this[N].method}get url(){return _(this[N].parsedURL)}get headers(){return this[N].headers}get redirect(){return this[N].redirect}get signal(){return this[N].signal}clone(){return new Request(this)}}Body.mixIn(Request.prototype);Object.defineProperty(Request.prototype,Symbol.toStringTag,{value:"Request",writable:false,enumerable:false,configurable:true});Object.defineProperties(Request.prototype,{method:{enumerable:true},url:{enumerable:true},headers:{enumerable:true},redirect:{enumerable:true},clone:{enumerable:true},signal:{enumerable:true}});function getNodeRequestOptions(e){const t=e[N].parsedURL;const i=new Headers(e[N].headers);if(!i.has("Accept")){i.set("Accept","*/*")}if(!t.protocol||!t.hostname){throw new TypeError("Only absolute URLs are supported")}if(!/^https?:$/.test(t.protocol)){throw new TypeError("Only HTTP(S) protocols are supported")}if(e.signal&&e.body instanceof a.Readable&&!O){throw new Error("Cancellation of streamed requests with AbortSignal is not supported in node < 8")}let r=null;if(e.body==null&&/^(POST|PUT)$/i.test(e.method)){r="0"}if(e.body!=null){const t=getTotalBytes(e);if(typeof t==="number"){r=String(t)}}if(r){i.set("Content-Length",r)}if(!i.has("User-Agent")){i.set("User-Agent","node-fetch/1.0 (+https://github.com/bitinn/node-fetch)")}if(e.compress&&!i.has("Accept-Encoding")){i.set("Accept-Encoding","gzip,deflate")}let n=e.agent;if(typeof n==="function"){n=n(t)}if(!i.has("Connection")&&!n){i.set("Connection","close")}return Object.assign({},t,{method:e.method,headers:exportNodeCompatibleHeaders(i),agent:n})}function AbortError(e){Error.call(this,e);this.type="aborted";this.message=e;Error.captureStackTrace(this,this.constructor)}AbortError.prototype=Object.create(Error.prototype);AbortError.prototype.constructor=AbortError;AbortError.prototype.name="AbortError";const P=n.URL||s.URL;const R=a.PassThrough;const T=function isDomainOrSubdomain(e,t){const i=new P(t).hostname;const a=new P(e).hostname;return i===a||i[i.length-a.length-1]==="."&&i.endsWith(a)};function fetch(e,t){if(!fetch.Promise){throw new Error("native promise missing, set fetch.Promise to your favorite alternative")}Body.Promise=fetch.Promise;return new fetch.Promise((function(i,n){const s=new Request(e,t);const l=getNodeRequestOptions(s);const c=(l.protocol==="https:"?o:r).request;const d=s.signal;let u=null;const m=function abort(){let e=new AbortError("The user aborted a request.");n(e);if(s.body&&s.body instanceof a.Readable){s.body.destroy(e)}if(!u||!u.body)return;u.body.emit("error",e)};if(d&&d.aborted){m();return}const h=function abortAndFinalize(){m();finalize()};const g=c(l);let y;if(d){d.addEventListener("abort",h)}function finalize(){g.abort();if(d)d.removeEventListener("abort",h);clearTimeout(y)}if(s.timeout){g.once("socket",(function(e){y=setTimeout((function(){n(new FetchError(`network timeout at: ${s.url}`,"request-timeout"));finalize()}),s.timeout)}))}g.on("error",(function(e){n(new FetchError(`request to ${s.url} failed, reason: ${e.message}`,"system",e));finalize()}));g.on("response",(function(e){clearTimeout(y);const t=createHeadersLenient(e.headers);if(fetch.isRedirect(e.statusCode)){const a=t.get("Location");let r=null;try{r=a===null?null:new P(a,s.url).toString()}catch(e){if(s.redirect!=="manual"){n(new FetchError(`uri requested responds with an invalid redirect URL: ${a}`,"invalid-redirect"));finalize();return}}switch(s.redirect){case"error":n(new FetchError(`uri requested responds with a redirect, redirect mode is set to error: ${s.url}`,"no-redirect"));finalize();return;case"manual":if(r!==null){try{t.set("Location",r)}catch(e){n(e)}}break;case"follow":if(r===null){break}if(s.counter>=s.follow){n(new FetchError(`maximum redirect reached at: ${s.url}`,"max-redirect"));finalize();return}const a={headers:new Headers(s.headers),follow:s.follow,counter:s.counter+1,agent:s.agent,compress:s.compress,method:s.method,body:s.body,signal:s.signal,timeout:s.timeout,size:s.size};if(!T(s.url,r)){for(const e of["authorization","www-authenticate","cookie","cookie2"]){a.headers.delete(e)}}if(e.statusCode!==303&&s.body&&getTotalBytes(s)===null){n(new FetchError("Cannot follow redirect with body being a readable stream","unsupported-redirect"));finalize();return}if(e.statusCode===303||(e.statusCode===301||e.statusCode===302)&&s.method==="POST"){a.method="GET";a.body=undefined;a.headers.delete("content-length")}i(fetch(new Request(r,a)));finalize();return}}e.once("end",(function(){if(d)d.removeEventListener("abort",h)}));let a=e.pipe(new R);const r={url:s.url,status:e.statusCode,statusText:e.statusMessage,headers:t,size:s.size,timeout:s.timeout,counter:s.counter};const o=t.get("Content-Encoding");if(!s.compress||s.method==="HEAD"||o===null||e.statusCode===204||e.statusCode===304){u=new Response(a,r);i(u);return}const l={flush:p.Z_SYNC_FLUSH,finishFlush:p.Z_SYNC_FLUSH};if(o=="gzip"||o=="x-gzip"){a=a.pipe(p.createGunzip(l));u=new Response(a,r);i(u);return}if(o=="deflate"||o=="x-deflate"){const t=e.pipe(new R);t.once("data",(function(e){if((e[0]&15)===8){a=a.pipe(p.createInflate())}else{a=a.pipe(p.createInflateRaw())}u=new Response(a,r);i(u)}));return}if(o=="br"&&typeof p.createBrotliDecompress==="function"){a=a.pipe(p.createBrotliDecompress());u=new Response(a,r);i(u);return}u=new Response(a,r);i(u)}));writeToStream(g,s)}))}fetch.isRedirect=function(e){return e===301||e===302||e===303||e===307||e===308};fetch.Promise=global.Promise;e.exports=t=fetch;Object.defineProperty(t,"__esModule",{value:true});t["default"]=t;t.Headers=Headers;t.Request=Request;t.Response=Response;t.FetchError=FetchError},2299:(e,t,i)=>{"use strict";var a=i(5477);var r=i(1907);var n={TRANSITIONAL:0,NONTRANSITIONAL:1};function normalize(e){return e.split("\0").map((function(e){return e.normalize("NFC")})).join("\0")}function findStatus(e){var t=0;var i=r.length-1;while(t<=i){var a=Math.floor((t+i)/2);var n=r[a];if(n[0][0]<=e&&n[0][1]>=e){return n}else if(n[0][0]>e){i=a-1}else{t=a+1}}return null}var s=/[\uD800-\uDBFF][\uDC00-\uDFFF]/g;function countSymbols(e){return e.replace(s,"_").length}function mapChars(e,t,i){var a=false;var r="";var s=countSymbols(e);for(var o=0;o253||o.length===0){n.error=true}for(var p=0;p63||s.length===0){n.error=true;break}}}if(n.error)return null;return s.join(".")};e.exports.toUnicode=function(e,t){var i=processing(e,t,n.NONTRANSITIONAL);return{domain:i.string,error:i.error}};e.exports.PROCESSING_OPTIONS=n},5871:e=>{"use strict";var t={};e.exports=t;function sign(e){return e<0?-1:1}function evenRound(e){if(e%1===.5&&(e&1)===0){return Math.floor(e)}else{return Math.round(e)}}function createNumberConversion(e,t){if(!t.unsigned){--e}const i=t.unsigned?0:-Math.pow(2,e);const a=Math.pow(2,e)-1;const r=t.moduloBitLength?Math.pow(2,t.moduloBitLength):Math.pow(2,e);const n=t.moduloBitLength?Math.pow(2,t.moduloBitLength-1):Math.pow(2,e-1);return function(e,s){if(!s)s={};let o=+e;if(s.enforceRange){if(!Number.isFinite(o)){throw new TypeError("Argument is not a finite number")}o=sign(o)*Math.floor(Math.abs(o));if(oa){throw new TypeError("Argument is not in byte range")}return o}if(!isNaN(o)&&s.clamp){o=evenRound(o);if(oa)o=a;return o}if(!Number.isFinite(o)||o===0){return 0}o=sign(o)*Math.floor(Math.abs(o));o=o%r;if(!t.unsigned&&o>=n){return o-r}else if(t.unsigned){if(o<0){o+=r}else if(o===-0){return 0}}return o}}t["void"]=function(){return undefined};t["boolean"]=function(e){return!!e};t["byte"]=createNumberConversion(8,{unsigned:false});t["octet"]=createNumberConversion(8,{unsigned:true});t["short"]=createNumberConversion(16,{unsigned:false});t["unsigned short"]=createNumberConversion(16,{unsigned:true});t["long"]=createNumberConversion(32,{unsigned:false});t["unsigned long"]=createNumberConversion(32,{unsigned:true});t["long long"]=createNumberConversion(32,{unsigned:false,moduloBitLength:64});t["unsigned long long"]=createNumberConversion(32,{unsigned:true,moduloBitLength:64});t["double"]=function(e){const t=+e;if(!Number.isFinite(t)){throw new TypeError("Argument is not a finite floating-point value")}return t};t["unrestricted double"]=function(e){const t=+e;if(isNaN(t)){throw new TypeError("Argument is NaN")}return t};t["float"]=t["double"];t["unrestricted float"]=t["unrestricted double"];t["DOMString"]=function(e,t){if(!t)t={};if(t.treatNullAsEmptyString&&e===null){return""}return String(e)};t["ByteString"]=function(e,t){const i=String(e);let a=undefined;for(let e=0;(a=i.codePointAt(e))!==undefined;++e){if(a>255){throw new TypeError("Argument is not a valid bytestring")}}return i};t["USVString"]=function(e){const t=String(e);const i=t.length;const a=[];for(let e=0;e57343){a.push(String.fromCodePoint(r))}else if(56320<=r&&r<=57343){a.push(String.fromCodePoint(65533))}else{if(e===i-1){a.push(String.fromCodePoint(65533))}else{const i=t.charCodeAt(e+1);if(56320<=i&&i<=57343){const t=r&1023;const n=i&1023;a.push(String.fromCodePoint((2<<15)+(2<<9)*t+n));++e}else{a.push(String.fromCodePoint(65533))}}}}return a.join("")};t["Date"]=function(e,t){if(!(e instanceof Date)){throw new TypeError("Argument is not a Date object")}if(isNaN(e)){return undefined}return e};t["RegExp"]=function(e,t){if(!(e instanceof RegExp)){e=new RegExp(e)}return e}},8262:(e,t,i)=>{"use strict";const a=i(33);t.implementation=class URLImpl{constructor(e){const t=e[0];const i=e[1];let r=null;if(i!==undefined){r=a.basicURLParse(i);if(r==="failure"){throw new TypeError("Invalid base URL")}}const n=a.basicURLParse(t,{baseURL:r});if(n==="failure"){throw new TypeError("Invalid URL")}this._url=n}get href(){return a.serializeURL(this._url)}set href(e){const t=a.basicURLParse(e);if(t==="failure"){throw new TypeError("Invalid URL")}this._url=t}get origin(){return a.serializeURLOrigin(this._url)}get protocol(){return this._url.scheme+":"}set protocol(e){a.basicURLParse(e+":",{url:this._url,stateOverride:"scheme start"})}get username(){return this._url.username}set username(e){if(a.cannotHaveAUsernamePasswordPort(this._url)){return}a.setTheUsername(this._url,e)}get password(){return this._url.password}set password(e){if(a.cannotHaveAUsernamePasswordPort(this._url)){return}a.setThePassword(this._url,e)}get host(){const e=this._url;if(e.host===null){return""}if(e.port===null){return a.serializeHost(e.host)}return a.serializeHost(e.host)+":"+a.serializeInteger(e.port)}set host(e){if(this._url.cannotBeABaseURL){return}a.basicURLParse(e,{url:this._url,stateOverride:"host"})}get hostname(){if(this._url.host===null){return""}return a.serializeHost(this._url.host)}set hostname(e){if(this._url.cannotBeABaseURL){return}a.basicURLParse(e,{url:this._url,stateOverride:"hostname"})}get port(){if(this._url.port===null){return""}return a.serializeInteger(this._url.port)}set port(e){if(a.cannotHaveAUsernamePasswordPort(this._url)){return}if(e===""){this._url.port=null}else{a.basicURLParse(e,{url:this._url,stateOverride:"port"})}}get pathname(){if(this._url.cannotBeABaseURL){return this._url.path[0]}if(this._url.path.length===0){return""}return"/"+this._url.path.join("/")}set pathname(e){if(this._url.cannotBeABaseURL){return}this._url.path=[];a.basicURLParse(e,{url:this._url,stateOverride:"path start"})}get search(){if(this._url.query===null||this._url.query===""){return""}return"?"+this._url.query}set search(e){const t=this._url;if(e===""){t.query=null;return}const i=e[0]==="?"?e.substring(1):e;t.query="";a.basicURLParse(i,{url:t,stateOverride:"query"})}get hash(){if(this._url.fragment===null||this._url.fragment===""){return""}return"#"+this._url.fragment}set hash(e){if(e===""){this._url.fragment=null;return}const t=e[0]==="#"?e.substring(1):e;this._url.fragment="";a.basicURLParse(t,{url:this._url,stateOverride:"fragment"})}toJSON(){return this.href}}},653:(e,t,i)=>{"use strict";const a=i(5871);const r=i(276);const n=i(8262);const s=r.implSymbol;function URL(t){if(!this||this[s]||!(this instanceof URL)){throw new TypeError("Failed to construct 'URL': Please use the 'new' operator, this DOM object constructor cannot be called as a function.")}if(arguments.length<1){throw new TypeError("Failed to construct 'URL': 1 argument required, but only "+arguments.length+" present.")}const i=[];for(let e=0;e{"use strict";t.URL=i(653)["interface"];t.serializeURL=i(33).serializeURL;t.serializeURLOrigin=i(33).serializeURLOrigin;t.basicURLParse=i(33).basicURLParse;t.setTheUsername=i(33).setTheUsername;t.setThePassword=i(33).setThePassword;t.serializeHost=i(33).serializeHost;t.serializeInteger=i(33).serializeInteger;t.parseURL=i(33).parseURL},33:(e,t,i)=>{"use strict";const a=i(5477);const r=i(2299);const n={ftp:21,file:null,gopher:70,http:80,https:443,ws:80,wss:443};const s=Symbol("failure");function countSymbols(e){return a.ucs2.decode(e).length}function at(e,t){const i=e[t];return isNaN(i)?undefined:String.fromCodePoint(i)}function isASCIIDigit(e){return e>=48&&e<=57}function isASCIIAlpha(e){return e>=65&&e<=90||e>=97&&e<=122}function isASCIIAlphanumeric(e){return isASCIIAlpha(e)||isASCIIDigit(e)}function isASCIIHex(e){return isASCIIDigit(e)||e>=65&&e<=70||e>=97&&e<=102}function isSingleDot(e){return e==="."||e.toLowerCase()==="%2e"}function isDoubleDot(e){e=e.toLowerCase();return e===".."||e==="%2e."||e===".%2e"||e==="%2e%2e"}function isWindowsDriveLetterCodePoints(e,t){return isASCIIAlpha(e)&&(t===58||t===124)}function isWindowsDriveLetterString(e){return e.length===2&&isASCIIAlpha(e.codePointAt(0))&&(e[1]===":"||e[1]==="|")}function isNormalizedWindowsDriveLetterString(e){return e.length===2&&isASCIIAlpha(e.codePointAt(0))&&e[1]===":"}function containsForbiddenHostCodePoint(e){return e.search(/\u0000|\u0009|\u000A|\u000D|\u0020|#|%|\/|:|\?|@|\[|\\|\]/)!==-1}function containsForbiddenHostCodePointExcludingPercent(e){return e.search(/\u0000|\u0009|\u000A|\u000D|\u0020|#|\/|:|\?|@|\[|\\|\]/)!==-1}function isSpecialScheme(e){return n[e]!==undefined}function isSpecial(e){return isSpecialScheme(e.scheme)}function defaultPort(e){return n[e]}function percentEncode(e){let t=e.toString(16).toUpperCase();if(t.length===1){t="0"+t}return"%"+t}function utf8PercentEncode(e){const t=new Buffer(e);let i="";for(let e=0;e126}const o=new Set([32,34,35,60,62,63,96,123,125]);function isPathPercentEncode(e){return isC0ControlPercentEncode(e)||o.has(e)}const p=new Set([47,58,59,61,64,91,92,93,94,124]);function isUserinfoPercentEncode(e){return isPathPercentEncode(e)||p.has(e)}function percentEncodeChar(e,t){const i=String.fromCodePoint(e);if(t(e)){return utf8PercentEncode(i)}return i}function parseIPv4Number(e){let t=10;if(e.length>=2&&e.charAt(0)==="0"&&e.charAt(1).toLowerCase()==="x"){e=e.substring(2);t=16}else if(e.length>=2&&e.charAt(0)==="0"){e=e.substring(1);t=8}if(e===""){return 0}const i=t===10?/[^0-9]/:t===16?/[^0-9A-Fa-f]/:/[^0-7]/;if(i.test(e)){return s}return parseInt(e,t)}function parseIPv4(e){const t=e.split(".");if(t[t.length-1]===""){if(t.length>1){t.pop()}}if(t.length>4){return e}const i=[];for(const a of t){if(a===""){return e}const t=parseIPv4Number(a);if(t===s){return e}i.push(t)}for(let e=0;e255){return s}}if(i[i.length-1]>=Math.pow(256,5-i.length)){return s}let a=i.pop();let r=0;for(const e of i){a+=e*Math.pow(256,3-r);++r}return a}function serializeIPv4(e){let t="";let i=e;for(let e=1;e<=4;++e){t=String(i%256)+t;if(e!==4){t="."+t}i=Math.floor(i/256)}return t}function parseIPv6(e){const t=[0,0,0,0,0,0,0,0];let i=0;let r=null;let n=0;e=a.ucs2.decode(e);if(e[n]===58){if(e[n+1]!==58){return s}n+=2;++i;r=i}while(n6){return s}let a=0;while(e[n]!==undefined){let r=null;if(a>0){if(e[n]===46&&a<4){++n}else{return s}}if(!isASCIIDigit(e[n])){return s}while(isASCIIDigit(e[n])){const t=parseInt(at(e,n));if(r===null){r=t}else if(r===0){return s}else{r=r*10+t}if(r>255){return s}++n}t[i]=t[i]*256+r;++a;if(a===2||a===4){++i}}if(a!==4){return s}break}else if(e[n]===58){++n;if(e[n]===undefined){return s}}else if(e[n]!==undefined){return s}t[i]=a;++i}if(r!==null){let e=i-r;i=7;while(i!==0&&e>0){const a=t[r+e-1];t[r+e-1]=t[i];t[i]=a;--i;--e}}else if(r===null&&i!==8){return s}return t}function serializeIPv6(e){let t="";const i=findLongestZeroSequence(e);const a=i.idx;let r=false;for(let i=0;i<=7;++i){if(r&&e[i]===0){continue}else if(r){r=false}if(a===i){const e=i===0?"::":":";t+=e;r=true;continue}t+=e[i].toString(16);if(i!==7){t+=":"}}return t}function parseHost(e,t){if(e[0]==="["){if(e[e.length-1]!=="]"){return s}return parseIPv6(e.substring(1,e.length-1))}if(!t){return parseOpaqueHost(e)}const i=utf8PercentDecode(e);const a=r.toASCII(i,false,r.PROCESSING_OPTIONS.NONTRANSITIONAL,false);if(a===null){return s}if(containsForbiddenHostCodePoint(a)){return s}const n=parseIPv4(a);if(typeof n==="number"||n===s){return n}return a}function parseOpaqueHost(e){if(containsForbiddenHostCodePointExcludingPercent(e)){return s}let t="";const i=a.ucs2.decode(e);for(let e=0;ei){t=a;i=r}a=null;r=0}else{if(a===null){a=n}++r}}if(r>i){t=a;i=r}return{idx:t,len:i}}function serializeHost(e){if(typeof e==="number"){return serializeIPv4(e)}if(e instanceof Array){return"["+serializeIPv6(e)+"]"}return e}function trimControlChars(e){return e.replace(/^[\u0000-\u001F\u0020]+|[\u0000-\u001F\u0020]+$/g,"")}function trimTabAndNewline(e){return e.replace(/\u0009|\u000A|\u000D/g,"")}function shortenPath(e){const t=e.path;if(t.length===0){return}if(e.scheme==="file"&&t.length===1&&isNormalizedWindowsDriveLetter(t[0])){return}t.pop()}function includesCredentials(e){return e.username!==""||e.password!==""}function cannotHaveAUsernamePasswordPort(e){return e.host===null||e.host===""||e.cannotBeABaseURL||e.scheme==="file"}function isNormalizedWindowsDriveLetter(e){return/^[A-Za-z]:$/.test(e)}function URLStateMachine(e,t,i,r,n){this.pointer=0;this.input=e;this.base=t||null;this.encodingOverride=i||"utf-8";this.stateOverride=n;this.url=r;this.failure=false;this.parseError=false;if(!this.url){this.url={scheme:"",username:"",password:"",host:null,port:null,path:[],query:null,fragment:null,cannotBeABaseURL:false};const e=trimControlChars(this.input);if(e!==this.input){this.parseError=true}this.input=e}const o=trimTabAndNewline(this.input);if(o!==this.input){this.parseError=true}this.input=o;this.state=n||"scheme start";this.buffer="";this.atFlag=false;this.arrFlag=false;this.passwordTokenSeenFlag=false;this.input=a.ucs2.decode(this.input);for(;this.pointer<=this.input.length;++this.pointer){const e=this.input[this.pointer];const t=isNaN(e)?undefined:String.fromCodePoint(e);const i=this["parse "+this.state](e,t);if(!i){break}else if(i===s){this.failure=true;break}}}URLStateMachine.prototype["parse scheme start"]=function parseSchemeStart(e,t){if(isASCIIAlpha(e)){this.buffer+=t.toLowerCase();this.state="scheme"}else if(!this.stateOverride){this.state="no scheme";--this.pointer}else{this.parseError=true;return s}return true};URLStateMachine.prototype["parse scheme"]=function parseScheme(e,t){if(isASCIIAlphanumeric(e)||e===43||e===45||e===46){this.buffer+=t.toLowerCase()}else if(e===58){if(this.stateOverride){if(isSpecial(this.url)&&!isSpecialScheme(this.buffer)){return false}if(!isSpecial(this.url)&&isSpecialScheme(this.buffer)){return false}if((includesCredentials(this.url)||this.url.port!==null)&&this.buffer==="file"){return false}if(this.url.scheme==="file"&&(this.url.host===""||this.url.host===null)){return false}}this.url.scheme=this.buffer;this.buffer="";if(this.stateOverride){return false}if(this.url.scheme==="file"){if(this.input[this.pointer+1]!==47||this.input[this.pointer+2]!==47){this.parseError=true}this.state="file"}else if(isSpecial(this.url)&&this.base!==null&&this.base.scheme===this.url.scheme){this.state="special relative or authority"}else if(isSpecial(this.url)){this.state="special authority slashes"}else if(this.input[this.pointer+1]===47){this.state="path or authority";++this.pointer}else{this.url.cannotBeABaseURL=true;this.url.path.push("");this.state="cannot-be-a-base-URL path"}}else if(!this.stateOverride){this.buffer="";this.state="no scheme";this.pointer=-1}else{this.parseError=true;return s}return true};URLStateMachine.prototype["parse no scheme"]=function parseNoScheme(e){if(this.base===null||this.base.cannotBeABaseURL&&e!==35){return s}else if(this.base.cannotBeABaseURL&&e===35){this.url.scheme=this.base.scheme;this.url.path=this.base.path.slice();this.url.query=this.base.query;this.url.fragment="";this.url.cannotBeABaseURL=true;this.state="fragment"}else if(this.base.scheme==="file"){this.state="file";--this.pointer}else{this.state="relative";--this.pointer}return true};URLStateMachine.prototype["parse special relative or authority"]=function parseSpecialRelativeOrAuthority(e){if(e===47&&this.input[this.pointer+1]===47){this.state="special authority ignore slashes";++this.pointer}else{this.parseError=true;this.state="relative";--this.pointer}return true};URLStateMachine.prototype["parse path or authority"]=function parsePathOrAuthority(e){if(e===47){this.state="authority"}else{this.state="path";--this.pointer}return true};URLStateMachine.prototype["parse relative"]=function parseRelative(e){this.url.scheme=this.base.scheme;if(isNaN(e)){this.url.username=this.base.username;this.url.password=this.base.password;this.url.host=this.base.host;this.url.port=this.base.port;this.url.path=this.base.path.slice();this.url.query=this.base.query}else if(e===47){this.state="relative slash"}else if(e===63){this.url.username=this.base.username;this.url.password=this.base.password;this.url.host=this.base.host;this.url.port=this.base.port;this.url.path=this.base.path.slice();this.url.query="";this.state="query"}else if(e===35){this.url.username=this.base.username;this.url.password=this.base.password;this.url.host=this.base.host;this.url.port=this.base.port;this.url.path=this.base.path.slice();this.url.query=this.base.query;this.url.fragment="";this.state="fragment"}else if(isSpecial(this.url)&&e===92){this.parseError=true;this.state="relative slash"}else{this.url.username=this.base.username;this.url.password=this.base.password;this.url.host=this.base.host;this.url.port=this.base.port;this.url.path=this.base.path.slice(0,this.base.path.length-1);this.state="path";--this.pointer}return true};URLStateMachine.prototype["parse relative slash"]=function parseRelativeSlash(e){if(isSpecial(this.url)&&(e===47||e===92)){if(e===92){this.parseError=true}this.state="special authority ignore slashes"}else if(e===47){this.state="authority"}else{this.url.username=this.base.username;this.url.password=this.base.password;this.url.host=this.base.host;this.url.port=this.base.port;this.state="path";--this.pointer}return true};URLStateMachine.prototype["parse special authority slashes"]=function parseSpecialAuthoritySlashes(e){if(e===47&&this.input[this.pointer+1]===47){this.state="special authority ignore slashes";++this.pointer}else{this.parseError=true;this.state="special authority ignore slashes";--this.pointer}return true};URLStateMachine.prototype["parse special authority ignore slashes"]=function parseSpecialAuthorityIgnoreSlashes(e){if(e!==47&&e!==92){this.state="authority";--this.pointer}else{this.parseError=true}return true};URLStateMachine.prototype["parse authority"]=function parseAuthority(e,t){if(e===64){this.parseError=true;if(this.atFlag){this.buffer="%40"+this.buffer}this.atFlag=true;const e=countSymbols(this.buffer);for(let t=0;tMath.pow(2,16)-1){this.parseError=true;return s}this.url.port=e===defaultPort(this.url.scheme)?null:e;this.buffer=""}if(this.stateOverride){return false}this.state="path start";--this.pointer}else{this.parseError=true;return s}return true};const l=new Set([47,92,63,35]);URLStateMachine.prototype["parse file"]=function parseFile(e){this.url.scheme="file";if(e===47||e===92){if(e===92){this.parseError=true}this.state="file slash"}else if(this.base!==null&&this.base.scheme==="file"){if(isNaN(e)){this.url.host=this.base.host;this.url.path=this.base.path.slice();this.url.query=this.base.query}else if(e===63){this.url.host=this.base.host;this.url.path=this.base.path.slice();this.url.query="";this.state="query"}else if(e===35){this.url.host=this.base.host;this.url.path=this.base.path.slice();this.url.query=this.base.query;this.url.fragment="";this.state="fragment"}else{if(this.input.length-this.pointer-1===0||!isWindowsDriveLetterCodePoints(e,this.input[this.pointer+1])||this.input.length-this.pointer-1>=2&&!l.has(this.input[this.pointer+2])){this.url.host=this.base.host;this.url.path=this.base.path.slice();shortenPath(this.url)}else{this.parseError=true}this.state="path";--this.pointer}}else{this.state="path";--this.pointer}return true};URLStateMachine.prototype["parse file slash"]=function parseFileSlash(e){if(e===47||e===92){if(e===92){this.parseError=true}this.state="file host"}else{if(this.base!==null&&this.base.scheme==="file"){if(isNormalizedWindowsDriveLetterString(this.base.path[0])){this.url.path.push(this.base.path[0])}else{this.url.host=this.base.host}}this.state="path";--this.pointer}return true};URLStateMachine.prototype["parse file host"]=function parseFileHost(e,t){if(isNaN(e)||e===47||e===92||e===63||e===35){--this.pointer;if(!this.stateOverride&&isWindowsDriveLetterString(this.buffer)){this.parseError=true;this.state="path"}else if(this.buffer===""){this.url.host="";if(this.stateOverride){return false}this.state="path start"}else{let e=parseHost(this.buffer,isSpecial(this.url));if(e===s){return s}if(e==="localhost"){e=""}this.url.host=e;if(this.stateOverride){return false}this.buffer="";this.state="path start"}}else{this.buffer+=t}return true};URLStateMachine.prototype["parse path start"]=function parsePathStart(e){if(isSpecial(this.url)){if(e===92){this.parseError=true}this.state="path";if(e!==47&&e!==92){--this.pointer}}else if(!this.stateOverride&&e===63){this.url.query="";this.state="query"}else if(!this.stateOverride&&e===35){this.url.fragment="";this.state="fragment"}else if(e!==undefined){this.state="path";if(e!==47){--this.pointer}}return true};URLStateMachine.prototype["parse path"]=function parsePath(e){if(isNaN(e)||e===47||isSpecial(this.url)&&e===92||!this.stateOverride&&(e===63||e===35)){if(isSpecial(this.url)&&e===92){this.parseError=true}if(isDoubleDot(this.buffer)){shortenPath(this.url);if(e!==47&&!(isSpecial(this.url)&&e===92)){this.url.path.push("")}}else if(isSingleDot(this.buffer)&&e!==47&&!(isSpecial(this.url)&&e===92)){this.url.path.push("")}else if(!isSingleDot(this.buffer)){if(this.url.scheme==="file"&&this.url.path.length===0&&isWindowsDriveLetterString(this.buffer)){if(this.url.host!==""&&this.url.host!==null){this.parseError=true;this.url.host=""}this.buffer=this.buffer[0]+":"}this.url.path.push(this.buffer)}this.buffer="";if(this.url.scheme==="file"&&(e===undefined||e===63||e===35)){while(this.url.path.length>1&&this.url.path[0]===""){this.parseError=true;this.url.path.shift()}}if(e===63){this.url.query="";this.state="query"}if(e===35){this.url.fragment="";this.state="fragment"}}else{if(e===37&&(!isASCIIHex(this.input[this.pointer+1])||!isASCIIHex(this.input[this.pointer+2]))){this.parseError=true}this.buffer+=percentEncodeChar(e,isPathPercentEncode)}return true};URLStateMachine.prototype["parse cannot-be-a-base-URL path"]=function parseCannotBeABaseURLPath(e){if(e===63){this.url.query="";this.state="query"}else if(e===35){this.url.fragment="";this.state="fragment"}else{if(!isNaN(e)&&e!==37){this.parseError=true}if(e===37&&(!isASCIIHex(this.input[this.pointer+1])||!isASCIIHex(this.input[this.pointer+2]))){this.parseError=true}if(!isNaN(e)){this.url.path[0]=this.url.path[0]+percentEncodeChar(e,isC0ControlPercentEncode)}}return true};URLStateMachine.prototype["parse query"]=function parseQuery(e,t){if(isNaN(e)||!this.stateOverride&&e===35){if(!isSpecial(this.url)||this.url.scheme==="ws"||this.url.scheme==="wss"){this.encodingOverride="utf-8"}const t=new Buffer(this.buffer);for(let e=0;e126||t[e]===34||t[e]===35||t[e]===60||t[e]===62){this.url.query+=percentEncode(t[e])}else{this.url.query+=String.fromCodePoint(t[e])}}this.buffer="";if(e===35){this.url.fragment="";this.state="fragment"}}else{if(e===37&&(!isASCIIHex(this.input[this.pointer+1])||!isASCIIHex(this.input[this.pointer+2]))){this.parseError=true}this.buffer+=t}return true};URLStateMachine.prototype["parse fragment"]=function parseFragment(e){if(isNaN(e)){}else if(e===0){this.parseError=true}else{if(e===37&&(!isASCIIHex(this.input[this.pointer+1])||!isASCIIHex(this.input[this.pointer+2]))){this.parseError=true}this.url.fragment+=percentEncodeChar(e,isC0ControlPercentEncode)}return true};function serializeURL(e,t){let i=e.scheme+":";if(e.host!==null){i+="//";if(e.username!==""||e.password!==""){i+=e.username;if(e.password!==""){i+=":"+e.password}i+="@"}i+=serializeHost(e.host);if(e.port!==null){i+=":"+e.port}}else if(e.host===null&&e.scheme==="file"){i+="//"}if(e.cannotBeABaseURL){i+=e.path[0]}else{for(const t of e.path){i+="/"+t}}if(e.query!==null){i+="?"+e.query}if(!t&&e.fragment!==null){i+="#"+e.fragment}return i}function serializeOrigin(e){let t=e.scheme+"://";t+=serializeHost(e.host);if(e.port!==null){t+=":"+e.port}return t}e.exports.serializeURL=serializeURL;e.exports.serializeURLOrigin=function(t){switch(t.scheme){case"blob":try{return e.exports.serializeURLOrigin(e.exports.parseURL(t.path[0]))}catch(e){return"null"}case"ftp":case"gopher":case"http":case"https":case"ws":case"wss":return serializeOrigin({scheme:t.scheme,host:t.host,port:t.port});case"file":return"file://";default:return"null"}};e.exports.basicURLParse=function(e,t){if(t===undefined){t={}}const i=new URLStateMachine(e,t.baseURL,t.encodingOverride,t.url,t.stateOverride);if(i.failure){return"failure"}return i.url};e.exports.setTheUsername=function(e,t){e.username="";const i=a.ucs2.decode(t);for(let t=0;t{"use strict";e.exports.mixin=function mixin(e,t){const i=Object.getOwnPropertyNames(t);for(let a=0;a{var a=i(2940);e.exports=a(once);e.exports.strict=a(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 f=function(){if(f.called)return f.value;f.called=true;return f.value=e.apply(this,arguments)};f.called=false;return f}function onceStrict(e){var f=function(){if(f.called)throw new Error(f.onceError);f.called=true;return f.value=e.apply(this,arguments)};var t=e.name||"Function wrapped with `once`";f.onceError=t+" shouldn't be called more than once";f.called=false;return f}},8714:e=>{"use strict";function posix(e){return e.charAt(0)==="/"}function win32(e){var t=/^([a-zA-Z]:|[\\\/]{2}[^\\\/]+[\\\/]+[^\\\/]+)?([\\\/])?([\s\S]*?)$/;var i=t.exec(e);var a=i[1]||"";var r=Boolean(a&&a.charAt(1)!==":");return Boolean(i[2]||r)}e.exports=process.platform==="win32"?win32:posix;e.exports.posix=posix;e.exports.win32=win32},4959:(e,t,i)=>{const a=i(9491);const r=i(1017);const n=i(7147);let s=undefined;try{s=i(1957)}catch(e){}const o={nosort:true,silent:true};let p=0;const l=process.platform==="win32";const defaults=e=>{const t=["unlink","chmod","stat","lstat","rmdir","readdir"];t.forEach((t=>{e[t]=e[t]||n[t];t=t+"Sync";e[t]=e[t]||n[t]}));e.maxBusyTries=e.maxBusyTries||3;e.emfileWait=e.emfileWait||1e3;if(e.glob===false){e.disableGlob=true}if(e.disableGlob!==true&&s===undefined){throw Error("glob dependency not found, set `options.disableGlob = true` if intentional")}e.disableGlob=e.disableGlob||false;e.glob=e.glob||o};const rimraf=(e,t,i)=>{if(typeof t==="function"){i=t;t={}}a(e,"rimraf: missing path");a.equal(typeof e,"string","rimraf: path should be a string");a.equal(typeof i,"function","rimraf: callback function required");a(t,"rimraf: invalid options argument provided");a.equal(typeof t,"object","rimraf: options should be object");defaults(t);let r=0;let n=null;let o=0;const next=e=>{n=n||e;if(--o===0)i(n)};const afterGlob=(e,a)=>{if(e)return i(e);o=a.length;if(o===0)return i();a.forEach((e=>{const CB=i=>{if(i){if((i.code==="EBUSY"||i.code==="ENOTEMPTY"||i.code==="EPERM")&&rrimraf_(e,t,CB)),r*100)}if(i.code==="EMFILE"&&primraf_(e,t,CB)),p++)}if(i.code==="ENOENT")i=null}p=0;next(i)};rimraf_(e,t,CB)}))};if(t.disableGlob||!s.hasMagic(e))return afterGlob(null,[e]);t.lstat(e,((i,a)=>{if(!i)return afterGlob(null,[e]);s(e,t.glob,afterGlob)}))};const rimraf_=(e,t,i)=>{a(e);a(t);a(typeof i==="function");t.lstat(e,((a,r)=>{if(a&&a.code==="ENOENT")return i(null);if(a&&a.code==="EPERM"&&l)fixWinEPERM(e,t,a,i);if(r&&r.isDirectory())return rmdir(e,t,a,i);t.unlink(e,(a=>{if(a){if(a.code==="ENOENT")return i(null);if(a.code==="EPERM")return l?fixWinEPERM(e,t,a,i):rmdir(e,t,a,i);if(a.code==="EISDIR")return rmdir(e,t,a,i)}return i(a)}))}))};const fixWinEPERM=(e,t,i,r)=>{a(e);a(t);a(typeof r==="function");t.chmod(e,438,(a=>{if(a)r(a.code==="ENOENT"?null:i);else t.stat(e,((a,n)=>{if(a)r(a.code==="ENOENT"?null:i);else if(n.isDirectory())rmdir(e,t,i,r);else t.unlink(e,r)}))}))};const fixWinEPERMSync=(e,t,i)=>{a(e);a(t);try{t.chmodSync(e,438)}catch(e){if(e.code==="ENOENT")return;else throw i}let r;try{r=t.statSync(e)}catch(e){if(e.code==="ENOENT")return;else throw i}if(r.isDirectory())rmdirSync(e,t,i);else t.unlinkSync(e)};const rmdir=(e,t,i,r)=>{a(e);a(t);a(typeof r==="function");t.rmdir(e,(a=>{if(a&&(a.code==="ENOTEMPTY"||a.code==="EEXIST"||a.code==="EPERM"))rmkids(e,t,r);else if(a&&a.code==="ENOTDIR")r(i);else r(a)}))};const rmkids=(e,t,i)=>{a(e);a(t);a(typeof i==="function");t.readdir(e,((a,n)=>{if(a)return i(a);let s=n.length;if(s===0)return t.rmdir(e,i);let o;n.forEach((a=>{rimraf(r.join(e,a),t,(a=>{if(o)return;if(a)return i(o=a);if(--s===0)t.rmdir(e,i)}))}))}))};const rimrafSync=(e,t)=>{t=t||{};defaults(t);a(e,"rimraf: missing path");a.equal(typeof e,"string","rimraf: path should be a string");a(t,"rimraf: missing options");a.equal(typeof t,"object","rimraf: options should be object");let i;if(t.disableGlob||!s.hasMagic(e)){i=[e]}else{try{t.lstatSync(e);i=[e]}catch(a){i=s.sync(e,t.glob)}}if(!i.length)return;for(let e=0;e{a(e);a(t);try{t.rmdirSync(e)}catch(a){if(a.code==="ENOENT")return;if(a.code==="ENOTDIR")throw i;if(a.code==="ENOTEMPTY"||a.code==="EEXIST"||a.code==="EPERM")rmkidsSync(e,t)}};const rmkidsSync=(e,t)=>{a(e);a(t);t.readdirSync(e).forEach((i=>rimrafSync(r.join(e,i),t)));const i=l?100:1;let n=0;do{let a=true;try{const r=t.rmdirSync(e,t);a=false;return r}finally{if(++n{(function(e){e.parser=function(e,t){return new SAXParser(e,t)};e.SAXParser=SAXParser;e.SAXStream=SAXStream;e.createStream=createStream;e.MAX_BUFFER_LENGTH=64*1024;var t=["comment","sgmlDecl","textNode","tagName","doctype","procInstName","procInstBody","entity","attribName","attribValue","cdata","script"];e.EVENTS=["text","processinginstruction","sgmldeclaration","doctype","comment","opentagstart","attribute","opentag","closetag","opencdata","cdata","closecdata","error","end","ready","script","opennamespace","closenamespace"];function SAXParser(t,i){if(!(this instanceof SAXParser)){return new SAXParser(t,i)}var a=this;clearBuffers(a);a.q=a.c="";a.bufferCheckPosition=e.MAX_BUFFER_LENGTH;a.opt=i||{};a.opt.lowercase=a.opt.lowercase||a.opt.lowercasetags;a.looseCase=a.opt.lowercase?"toLowerCase":"toUpperCase";a.tags=[];a.closed=a.closedRoot=a.sawRoot=false;a.tag=a.error=null;a.strict=!!t;a.noscript=!!(t||a.opt.noscript);a.state=h.BEGIN;a.strictEntities=a.opt.strictEntities;a.ENTITIES=a.strictEntities?Object.create(e.XML_ENTITIES):Object.create(e.ENTITIES);a.attribList=[];if(a.opt.xmlns){a.ns=Object.create(l)}a.trackPosition=a.opt.position!==false;if(a.trackPosition){a.position=a.line=a.column=0}emit(a,"onready")}if(!Object.create){Object.create=function(e){function F(){}F.prototype=e;var t=new F;return t}}if(!Object.keys){Object.keys=function(e){var t=[];for(var i in e)if(e.hasOwnProperty(i))t.push(i);return t}}function checkBufferLength(i){var a=Math.max(e.MAX_BUFFER_LENGTH,10);var r=0;for(var n=0,s=t.length;na){switch(t[n]){case"textNode":closeText(i);break;case"cdata":emitNode(i,"oncdata",i.cdata);i.cdata="";break;case"script":emitNode(i,"onscript",i.script);i.script="";break;default:error(i,"Max buffer length exceeded: "+t[n])}}r=Math.max(r,o)}var p=e.MAX_BUFFER_LENGTH-r;i.bufferCheckPosition=p+i.position}function clearBuffers(e){for(var i=0,a=t.length;i"||isWhitespace(e)}function isMatch(e,t){return e.test(t)}function notMatch(e,t){return!isMatch(e,t)}var h=0;e.STATE={BEGIN:h++,BEGIN_WHITESPACE:h++,TEXT:h++,TEXT_ENTITY:h++,OPEN_WAKA:h++,SGML_DECL:h++,SGML_DECL_QUOTED:h++,DOCTYPE:h++,DOCTYPE_QUOTED:h++,DOCTYPE_DTD:h++,DOCTYPE_DTD_QUOTED:h++,COMMENT_STARTING:h++,COMMENT:h++,COMMENT_ENDING:h++,COMMENT_ENDED:h++,CDATA:h++,CDATA_ENDING:h++,CDATA_ENDING_2:h++,PROC_INST:h++,PROC_INST_BODY:h++,PROC_INST_ENDING:h++,OPEN_TAG:h++,OPEN_TAG_SLASH:h++,ATTRIB:h++,ATTRIB_NAME:h++,ATTRIB_NAME_SAW_WHITE:h++,ATTRIB_VALUE:h++,ATTRIB_VALUE_QUOTED:h++,ATTRIB_VALUE_CLOSED:h++,ATTRIB_VALUE_UNQUOTED:h++,ATTRIB_VALUE_ENTITY_Q:h++,ATTRIB_VALUE_ENTITY_U:h++,CLOSE_TAG:h++,CLOSE_TAG_SAW_WHITE:h++,SCRIPT:h++,SCRIPT_ENDING:h++};e.XML_ENTITIES={amp:"&",gt:">",lt:"<",quot:'"',apos:"'"};e.ENTITIES={amp:"&",gt:">",lt:"<",quot:'"',apos:"'",AElig:198,Aacute:193,Acirc:194,Agrave:192,Aring:197,Atilde:195,Auml:196,Ccedil:199,ETH:208,Eacute:201,Ecirc:202,Egrave:200,Euml:203,Iacute:205,Icirc:206,Igrave:204,Iuml:207,Ntilde:209,Oacute:211,Ocirc:212,Ograve:210,Oslash:216,Otilde:213,Ouml:214,THORN:222,Uacute:218,Ucirc:219,Ugrave:217,Uuml:220,Yacute:221,aacute:225,acirc:226,aelig:230,agrave:224,aring:229,atilde:227,auml:228,ccedil:231,eacute:233,ecirc:234,egrave:232,eth:240,euml:235,iacute:237,icirc:238,igrave:236,iuml:239,ntilde:241,oacute:243,ocirc:244,ograve:242,oslash:248,otilde:245,ouml:246,szlig:223,thorn:254,uacute:250,ucirc:251,ugrave:249,uuml:252,yacute:253,yuml:255,copy:169,reg:174,nbsp:160,iexcl:161,cent:162,pound:163,curren:164,yen:165,brvbar:166,sect:167,uml:168,ordf:170,laquo:171,not:172,shy:173,macr:175,deg:176,plusmn:177,sup1:185,sup2:178,sup3:179,acute:180,micro:181,para:182,middot:183,cedil:184,ordm:186,raquo:187,frac14:188,frac12:189,frac34:190,iquest:191,times:215,divide:247,OElig:338,oelig:339,Scaron:352,scaron:353,Yuml:376,fnof:402,circ:710,tilde:732,Alpha:913,Beta:914,Gamma:915,Delta:916,Epsilon:917,Zeta:918,Eta:919,Theta:920,Iota:921,Kappa:922,Lambda:923,Mu:924,Nu:925,Xi:926,Omicron:927,Pi:928,Rho:929,Sigma:931,Tau:932,Upsilon:933,Phi:934,Chi:935,Psi:936,Omega:937,alpha:945,beta:946,gamma:947,delta:948,epsilon:949,zeta:950,eta:951,theta:952,iota:953,kappa:954,lambda:955,mu:956,nu:957,xi:958,omicron:959,pi:960,rho:961,sigmaf:962,sigma:963,tau:964,upsilon:965,phi:966,chi:967,psi:968,omega:969,thetasym:977,upsih:978,piv:982,ensp:8194,emsp:8195,thinsp:8201,zwnj:8204,zwj:8205,lrm:8206,rlm:8207,ndash:8211,mdash:8212,lsquo:8216,rsquo:8217,sbquo:8218,ldquo:8220,rdquo:8221,bdquo:8222,dagger:8224,Dagger:8225,bull:8226,hellip:8230,permil:8240,prime:8242,Prime:8243,lsaquo:8249,rsaquo:8250,oline:8254,frasl:8260,euro:8364,image:8465,weierp:8472,real:8476,trade:8482,alefsym:8501,larr:8592,uarr:8593,rarr:8594,darr:8595,harr:8596,crarr:8629,lArr:8656,uArr:8657,rArr:8658,dArr:8659,hArr:8660,forall:8704,part:8706,exist:8707,empty:8709,nabla:8711,isin:8712,notin:8713,ni:8715,prod:8719,sum:8721,minus:8722,lowast:8727,radic:8730,prop:8733,infin:8734,ang:8736,and:8743,or:8744,cap:8745,cup:8746,int:8747,there4:8756,sim:8764,cong:8773,asymp:8776,ne:8800,equiv:8801,le:8804,ge:8805,sub:8834,sup:8835,nsub:8836,sube:8838,supe:8839,oplus:8853,otimes:8855,perp:8869,sdot:8901,lceil:8968,rceil:8969,lfloor:8970,rfloor:8971,lang:9001,rang:9002,loz:9674,spades:9824,clubs:9827,hearts:9829,diams:9830};Object.keys(e.ENTITIES).forEach((function(t){var i=e.ENTITIES[t];var a=typeof i==="number"?String.fromCharCode(i):i;e.ENTITIES[t]=a}));for(var g in e.STATE){e.STATE[e.STATE[g]]=g}h=e.STATE;function emit(e,t,i){e[t]&&e[t](i)}function emitNode(e,t,i){if(e.textNode)closeText(e);emit(e,t,i)}function closeText(e){e.textNode=textopts(e.opt,e.textNode);if(e.textNode)emit(e,"ontext",e.textNode);e.textNode=""}function textopts(e,t){if(e.trim)t=t.trim();if(e.normalize)t=t.replace(/\s+/g," ");return t}function error(e,t){closeText(e);if(e.trackPosition){t+="\nLine: "+e.line+"\nColumn: "+e.column+"\nChar: "+e.c}t=new Error(t);e.error=t;emit(e,"onerror",t);return e}function end(e){if(e.sawRoot&&!e.closedRoot)strictFail(e,"Unclosed root tag");if(e.state!==h.BEGIN&&e.state!==h.BEGIN_WHITESPACE&&e.state!==h.TEXT){error(e,"Unexpected end")}closeText(e);e.c="";e.closed=true;emit(e,"onend");SAXParser.call(e,e.strict,e.opt);return e}function strictFail(e,t){if(typeof e!=="object"||!(e instanceof SAXParser)){throw new Error("bad call to strictFail")}if(e.strict){error(e,t)}}function newTag(e){if(!e.strict)e.tagName=e.tagName[e.looseCase]();var t=e.tags[e.tags.length-1]||e;var i=e.tag={name:e.tagName,attributes:{}};if(e.opt.xmlns){i.ns=t.ns}e.attribList.length=0;emitNode(e,"onopentagstart",i)}function qname(e,t){var i=e.indexOf(":");var a=i<0?["",e]:e.split(":");var r=a[0];var n=a[1];if(t&&e==="xmlns"){r="xmlns";n=""}return{prefix:r,local:n}}function attrib(e){if(!e.strict){e.attribName=e.attribName[e.looseCase]()}if(e.attribList.indexOf(e.attribName)!==-1||e.tag.attributes.hasOwnProperty(e.attribName)){e.attribName=e.attribValue="";return}if(e.opt.xmlns){var t=qname(e.attribName,true);var i=t.prefix;var a=t.local;if(i==="xmlns"){if(a==="xml"&&e.attribValue!==o){strictFail(e,"xml: prefix must be bound to "+o+"\n"+"Actual: "+e.attribValue)}else if(a==="xmlns"&&e.attribValue!==p){strictFail(e,"xmlns: prefix must be bound to "+p+"\n"+"Actual: "+e.attribValue)}else{var r=e.tag;var n=e.tags[e.tags.length-1]||e;if(r.ns===n.ns){r.ns=Object.create(n.ns)}r.ns[a]=e.attribValue}}e.attribList.push([e.attribName,e.attribValue])}else{e.tag.attributes[e.attribName]=e.attribValue;emitNode(e,"onattribute",{name:e.attribName,value:e.attribValue})}e.attribName=e.attribValue=""}function openTag(e,t){if(e.opt.xmlns){var i=e.tag;var a=qname(e.tagName);i.prefix=a.prefix;i.local=a.local;i.uri=i.ns[a.prefix]||"";if(i.prefix&&!i.uri){strictFail(e,"Unbound namespace prefix: "+JSON.stringify(e.tagName));i.uri=a.prefix}var r=e.tags[e.tags.length-1]||e;if(i.ns&&r.ns!==i.ns){Object.keys(i.ns).forEach((function(t){emitNode(e,"onopennamespace",{prefix:t,uri:i.ns[t]})}))}for(var n=0,s=e.attribList.length;n";e.tagName="";e.state=h.SCRIPT;return}emitNode(e,"onscript",e.script);e.script=""}var t=e.tags.length;var i=e.tagName;if(!e.strict){i=i[e.looseCase]()}var a=i;while(t--){var r=e.tags[t];if(r.name!==a){strictFail(e,"Unexpected close tag")}else{break}}if(t<0){strictFail(e,"Unmatched closing tag: "+e.tagName);e.textNode+="";e.state=h.TEXT;return}e.tagName=i;var n=e.tags.length;while(n-- >t){var s=e.tag=e.tags.pop();e.tagName=e.tag.name;emitNode(e,"onclosetag",e.tagName);var o={};for(var p in s.ns){o[p]=s.ns[p]}var l=e.tags[e.tags.length-1]||e;if(e.opt.xmlns&&s.ns!==l.ns){Object.keys(s.ns).forEach((function(t){var i=s.ns[t];emitNode(e,"onclosenamespace",{prefix:t,uri:i})}))}}if(t===0)e.closedRoot=true;e.tagName=e.attribValue=e.attribName="";e.attribList.length=0;e.state=h.TEXT}function parseEntity(e){var t=e.entity;var i=t.toLowerCase();var a;var r="";if(e.ENTITIES[t]){return e.ENTITIES[t]}if(e.ENTITIES[i]){return e.ENTITIES[i]}t=i;if(t.charAt(0)==="#"){if(t.charAt(1)==="x"){t=t.slice(2);a=parseInt(t,16);r=a.toString(16)}else{t=t.slice(1);a=parseInt(t,10);r=a.toString(10)}}t=t.replace(/^0+/,"");if(isNaN(a)||r.toLowerCase()!==t){strictFail(e,"Invalid character entity");return"&"+e.entity+";"}return String.fromCodePoint(a)}function beginWhiteSpace(e,t){if(t==="<"){e.state=h.OPEN_WAKA;e.startTagPosition=e.position}else if(!isWhitespace(t)){strictFail(e,"Non-whitespace before first tag.");e.textNode=t;e.state=h.TEXT}}function charAt(e,t){var i="";if(t"){emitNode(t,"onsgmldeclaration",t.sgmlDecl);t.sgmlDecl="";t.state=h.TEXT}else if(isQuote(a)){t.state=h.SGML_DECL_QUOTED;t.sgmlDecl+=a}else{t.sgmlDecl+=a}continue;case h.SGML_DECL_QUOTED:if(a===t.q){t.state=h.SGML_DECL;t.q=""}t.sgmlDecl+=a;continue;case h.DOCTYPE:if(a===">"){t.state=h.TEXT;emitNode(t,"ondoctype",t.doctype);t.doctype=true}else{t.doctype+=a;if(a==="["){t.state=h.DOCTYPE_DTD}else if(isQuote(a)){t.state=h.DOCTYPE_QUOTED;t.q=a}}continue;case h.DOCTYPE_QUOTED:t.doctype+=a;if(a===t.q){t.q="";t.state=h.DOCTYPE}continue;case h.DOCTYPE_DTD:t.doctype+=a;if(a==="]"){t.state=h.DOCTYPE}else if(isQuote(a)){t.state=h.DOCTYPE_DTD_QUOTED;t.q=a}continue;case h.DOCTYPE_DTD_QUOTED:t.doctype+=a;if(a===t.q){t.state=h.DOCTYPE_DTD;t.q=""}continue;case h.COMMENT:if(a==="-"){t.state=h.COMMENT_ENDING}else{t.comment+=a}continue;case h.COMMENT_ENDING:if(a==="-"){t.state=h.COMMENT_ENDED;t.comment=textopts(t.opt,t.comment);if(t.comment){emitNode(t,"oncomment",t.comment)}t.comment=""}else{t.comment+="-"+a;t.state=h.COMMENT}continue;case h.COMMENT_ENDED:if(a!==">"){strictFail(t,"Malformed comment");t.comment+="--"+a;t.state=h.COMMENT}else{t.state=h.TEXT}continue;case h.CDATA:if(a==="]"){t.state=h.CDATA_ENDING}else{t.cdata+=a}continue;case h.CDATA_ENDING:if(a==="]"){t.state=h.CDATA_ENDING_2}else{t.cdata+="]"+a;t.state=h.CDATA}continue;case h.CDATA_ENDING_2:if(a===">"){if(t.cdata){emitNode(t,"oncdata",t.cdata)}emitNode(t,"onclosecdata");t.cdata="";t.state=h.TEXT}else if(a==="]"){t.cdata+="]"}else{t.cdata+="]]"+a;t.state=h.CDATA}continue;case h.PROC_INST:if(a==="?"){t.state=h.PROC_INST_ENDING}else if(isWhitespace(a)){t.state=h.PROC_INST_BODY}else{t.procInstName+=a}continue;case h.PROC_INST_BODY:if(!t.procInstBody&&isWhitespace(a)){continue}else if(a==="?"){t.state=h.PROC_INST_ENDING}else{t.procInstBody+=a}continue;case h.PROC_INST_ENDING:if(a===">"){emitNode(t,"onprocessinginstruction",{name:t.procInstName,body:t.procInstBody});t.procInstName=t.procInstBody="";t.state=h.TEXT}else{t.procInstBody+="?"+a;t.state=h.PROC_INST_BODY}continue;case h.OPEN_TAG:if(isMatch(d,a)){t.tagName+=a}else{newTag(t);if(a===">"){openTag(t)}else if(a==="/"){t.state=h.OPEN_TAG_SLASH}else{if(!isWhitespace(a)){strictFail(t,"Invalid character in tag name")}t.state=h.ATTRIB}}continue;case h.OPEN_TAG_SLASH:if(a===">"){openTag(t,true);closeTag(t)}else{strictFail(t,"Forward-slash in opening tag not followed by >");t.state=h.ATTRIB}continue;case h.ATTRIB:if(isWhitespace(a)){continue}else if(a===">"){openTag(t)}else if(a==="/"){t.state=h.OPEN_TAG_SLASH}else if(isMatch(c,a)){t.attribName=a;t.attribValue="";t.state=h.ATTRIB_NAME}else{strictFail(t,"Invalid attribute name")}continue;case h.ATTRIB_NAME:if(a==="="){t.state=h.ATTRIB_VALUE}else if(a===">"){strictFail(t,"Attribute without value");t.attribValue=t.attribName;attrib(t);openTag(t)}else if(isWhitespace(a)){t.state=h.ATTRIB_NAME_SAW_WHITE}else if(isMatch(d,a)){t.attribName+=a}else{strictFail(t,"Invalid attribute name")}continue;case h.ATTRIB_NAME_SAW_WHITE:if(a==="="){t.state=h.ATTRIB_VALUE}else if(isWhitespace(a)){continue}else{strictFail(t,"Attribute without value");t.tag.attributes[t.attribName]="";t.attribValue="";emitNode(t,"onattribute",{name:t.attribName,value:""});t.attribName="";if(a===">"){openTag(t)}else if(isMatch(c,a)){t.attribName=a;t.state=h.ATTRIB_NAME}else{strictFail(t,"Invalid attribute name");t.state=h.ATTRIB}}continue;case h.ATTRIB_VALUE:if(isWhitespace(a)){continue}else if(isQuote(a)){t.q=a;t.state=h.ATTRIB_VALUE_QUOTED}else{strictFail(t,"Unquoted attribute value");t.state=h.ATTRIB_VALUE_UNQUOTED;t.attribValue=a}continue;case h.ATTRIB_VALUE_QUOTED:if(a!==t.q){if(a==="&"){t.state=h.ATTRIB_VALUE_ENTITY_Q}else{t.attribValue+=a}continue}attrib(t);t.q="";t.state=h.ATTRIB_VALUE_CLOSED;continue;case h.ATTRIB_VALUE_CLOSED:if(isWhitespace(a)){t.state=h.ATTRIB}else if(a===">"){openTag(t)}else if(a==="/"){t.state=h.OPEN_TAG_SLASH}else if(isMatch(c,a)){strictFail(t,"No whitespace between attributes");t.attribName=a;t.attribValue="";t.state=h.ATTRIB_NAME}else{strictFail(t,"Invalid attribute name")}continue;case h.ATTRIB_VALUE_UNQUOTED:if(!isAttribEnd(a)){if(a==="&"){t.state=h.ATTRIB_VALUE_ENTITY_U}else{t.attribValue+=a}continue}attrib(t);if(a===">"){openTag(t)}else{t.state=h.ATTRIB}continue;case h.CLOSE_TAG:if(!t.tagName){if(isWhitespace(a)){continue}else if(notMatch(c,a)){if(t.script){t.script+=""){closeTag(t)}else if(isMatch(d,a)){t.tagName+=a}else if(t.script){t.script+=""){closeTag(t)}else{strictFail(t,"Invalid characters in closing tag")}continue;case h.TEXT_ENTITY:case h.ATTRIB_VALUE_ENTITY_Q:case h.ATTRIB_VALUE_ENTITY_U:var p;var l;switch(t.state){case h.TEXT_ENTITY:p=h.TEXT;l="textNode";break;case h.ATTRIB_VALUE_ENTITY_Q:p=h.ATTRIB_VALUE_QUOTED;l="attribValue";break;case h.ATTRIB_VALUE_ENTITY_U:p=h.ATTRIB_VALUE_UNQUOTED;l="attribValue";break}if(a===";"){t[l]+=parseEntity(t);t.entity="";t.state=p}else if(isMatch(t.entity.length?m:u,a)){t.entity+=a}else{strictFail(t,"Invalid character in entity name");t[l]+="&"+t.entity+a;t.entity="";t.state=p}continue;default:throw new Error(t,"Unknown state: "+t.state)}}if(t.position>=t.bufferCheckPosition){checkBufferLength(t)}return t} -/*! http://mths.be/fromcodepoint v0.1.0 by @mathias */if(!String.fromCodePoint){(function(){var e=String.fromCharCode;var t=Math.floor;var fromCodePoint=function(){var i=16384;var a=[];var r;var n;var s=-1;var o=arguments.length;if(!o){return""}var p="";while(++s1114111||t(l)!==l){throw RangeError("Invalid code point: "+l)}if(l<=65535){a.push(l)}else{l-=65536;r=(l>>10)+55296;n=l%1024+56320;a.push(r,n)}if(s+1===o||a.length>i){p+=e.apply(null,a);a.length=0}}return p};if(Object.defineProperty){Object.defineProperty(String,"fromCodePoint",{value:fromCodePoint,configurable:true,writable:true})}else{String.fromCodePoint=fromCodePoint}})()}})(false?0:t)},5911:(e,t)=>{t=e.exports=SemVer;var i;if(typeof process==="object"&&process.env&&process.env.NODE_DEBUG&&/\bsemver\b/i.test(process.env.NODE_DEBUG)){i=function(){var e=Array.prototype.slice.call(arguments,0);e.unshift("SEMVER");console.log.apply(console,e)}}else{i=function(){}}t.SEMVER_SPEC_VERSION="2.0.0";var a=256;var r=Number.MAX_SAFE_INTEGER||9007199254740991;var n=16;var s=t.re=[];var o=t.src=[];var p=t.tokens={};var l=0;function tok(e){p[e]=l++}tok("NUMERICIDENTIFIER");o[p.NUMERICIDENTIFIER]="0|[1-9]\\d*";tok("NUMERICIDENTIFIERLOOSE");o[p.NUMERICIDENTIFIERLOOSE]="[0-9]+";tok("NONNUMERICIDENTIFIER");o[p.NONNUMERICIDENTIFIER]="\\d*[a-zA-Z-][a-zA-Z0-9-]*";tok("MAINVERSION");o[p.MAINVERSION]="("+o[p.NUMERICIDENTIFIER]+")\\."+"("+o[p.NUMERICIDENTIFIER]+")\\."+"("+o[p.NUMERICIDENTIFIER]+")";tok("MAINVERSIONLOOSE");o[p.MAINVERSIONLOOSE]="("+o[p.NUMERICIDENTIFIERLOOSE]+")\\."+"("+o[p.NUMERICIDENTIFIERLOOSE]+")\\."+"("+o[p.NUMERICIDENTIFIERLOOSE]+")";tok("PRERELEASEIDENTIFIER");o[p.PRERELEASEIDENTIFIER]="(?:"+o[p.NUMERICIDENTIFIER]+"|"+o[p.NONNUMERICIDENTIFIER]+")";tok("PRERELEASEIDENTIFIERLOOSE");o[p.PRERELEASEIDENTIFIERLOOSE]="(?:"+o[p.NUMERICIDENTIFIERLOOSE]+"|"+o[p.NONNUMERICIDENTIFIER]+")";tok("PRERELEASE");o[p.PRERELEASE]="(?:-("+o[p.PRERELEASEIDENTIFIER]+"(?:\\."+o[p.PRERELEASEIDENTIFIER]+")*))";tok("PRERELEASELOOSE");o[p.PRERELEASELOOSE]="(?:-?("+o[p.PRERELEASEIDENTIFIERLOOSE]+"(?:\\."+o[p.PRERELEASEIDENTIFIERLOOSE]+")*))";tok("BUILDIDENTIFIER");o[p.BUILDIDENTIFIER]="[0-9A-Za-z-]+";tok("BUILD");o[p.BUILD]="(?:\\+("+o[p.BUILDIDENTIFIER]+"(?:\\."+o[p.BUILDIDENTIFIER]+")*))";tok("FULL");tok("FULLPLAIN");o[p.FULLPLAIN]="v?"+o[p.MAINVERSION]+o[p.PRERELEASE]+"?"+o[p.BUILD]+"?";o[p.FULL]="^"+o[p.FULLPLAIN]+"$";tok("LOOSEPLAIN");o[p.LOOSEPLAIN]="[v=\\s]*"+o[p.MAINVERSIONLOOSE]+o[p.PRERELEASELOOSE]+"?"+o[p.BUILD]+"?";tok("LOOSE");o[p.LOOSE]="^"+o[p.LOOSEPLAIN]+"$";tok("GTLT");o[p.GTLT]="((?:<|>)?=?)";tok("XRANGEIDENTIFIERLOOSE");o[p.XRANGEIDENTIFIERLOOSE]=o[p.NUMERICIDENTIFIERLOOSE]+"|x|X|\\*";tok("XRANGEIDENTIFIER");o[p.XRANGEIDENTIFIER]=o[p.NUMERICIDENTIFIER]+"|x|X|\\*";tok("XRANGEPLAIN");o[p.XRANGEPLAIN]="[v=\\s]*("+o[p.XRANGEIDENTIFIER]+")"+"(?:\\.("+o[p.XRANGEIDENTIFIER]+")"+"(?:\\.("+o[p.XRANGEIDENTIFIER]+")"+"(?:"+o[p.PRERELEASE]+")?"+o[p.BUILD]+"?"+")?)?";tok("XRANGEPLAINLOOSE");o[p.XRANGEPLAINLOOSE]="[v=\\s]*("+o[p.XRANGEIDENTIFIERLOOSE]+")"+"(?:\\.("+o[p.XRANGEIDENTIFIERLOOSE]+")"+"(?:\\.("+o[p.XRANGEIDENTIFIERLOOSE]+")"+"(?:"+o[p.PRERELEASELOOSE]+")?"+o[p.BUILD]+"?"+")?)?";tok("XRANGE");o[p.XRANGE]="^"+o[p.GTLT]+"\\s*"+o[p.XRANGEPLAIN]+"$";tok("XRANGELOOSE");o[p.XRANGELOOSE]="^"+o[p.GTLT]+"\\s*"+o[p.XRANGEPLAINLOOSE]+"$";tok("COERCE");o[p.COERCE]="(^|[^\\d])"+"(\\d{1,"+n+"})"+"(?:\\.(\\d{1,"+n+"}))?"+"(?:\\.(\\d{1,"+n+"}))?"+"(?:$|[^\\d])";tok("COERCERTL");s[p.COERCERTL]=new RegExp(o[p.COERCE],"g");tok("LONETILDE");o[p.LONETILDE]="(?:~>?)";tok("TILDETRIM");o[p.TILDETRIM]="(\\s*)"+o[p.LONETILDE]+"\\s+";s[p.TILDETRIM]=new RegExp(o[p.TILDETRIM],"g");var c="$1~";tok("TILDE");o[p.TILDE]="^"+o[p.LONETILDE]+o[p.XRANGEPLAIN]+"$";tok("TILDELOOSE");o[p.TILDELOOSE]="^"+o[p.LONETILDE]+o[p.XRANGEPLAINLOOSE]+"$";tok("LONECARET");o[p.LONECARET]="(?:\\^)";tok("CARETTRIM");o[p.CARETTRIM]="(\\s*)"+o[p.LONECARET]+"\\s+";s[p.CARETTRIM]=new RegExp(o[p.CARETTRIM],"g");var d="$1^";tok("CARET");o[p.CARET]="^"+o[p.LONECARET]+o[p.XRANGEPLAIN]+"$";tok("CARETLOOSE");o[p.CARETLOOSE]="^"+o[p.LONECARET]+o[p.XRANGEPLAINLOOSE]+"$";tok("COMPARATORLOOSE");o[p.COMPARATORLOOSE]="^"+o[p.GTLT]+"\\s*("+o[p.LOOSEPLAIN]+")$|^$";tok("COMPARATOR");o[p.COMPARATOR]="^"+o[p.GTLT]+"\\s*("+o[p.FULLPLAIN]+")$|^$";tok("COMPARATORTRIM");o[p.COMPARATORTRIM]="(\\s*)"+o[p.GTLT]+"\\s*("+o[p.LOOSEPLAIN]+"|"+o[p.XRANGEPLAIN]+")";s[p.COMPARATORTRIM]=new RegExp(o[p.COMPARATORTRIM],"g");var u="$1$2$3";tok("HYPHENRANGE");o[p.HYPHENRANGE]="^\\s*("+o[p.XRANGEPLAIN]+")"+"\\s+-\\s+"+"("+o[p.XRANGEPLAIN]+")"+"\\s*$";tok("HYPHENRANGELOOSE");o[p.HYPHENRANGELOOSE]="^\\s*("+o[p.XRANGEPLAINLOOSE]+")"+"\\s+-\\s+"+"("+o[p.XRANGEPLAINLOOSE]+")"+"\\s*$";tok("STAR");o[p.STAR]="(<|>)?=?\\s*\\*";for(var m=0;ma){return null}var i=t.loose?s[p.LOOSE]:s[p.FULL];if(!i.test(e)){return null}try{return new SemVer(e,t)}catch(e){return null}}t.valid=valid;function valid(e,t){var i=parse(e,t);return i?i.version:null}t.clean=clean;function clean(e,t){var i=parse(e.trim().replace(/^[=v]+/,""),t);return i?i.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>a){throw new TypeError("version is longer than "+a+" characters")}if(!(this instanceof SemVer)){return new SemVer(e,t)}i("SemVer",e,t);this.options=t;this.loose=!!t.loose;var n=e.trim().match(t.loose?s[p.LOOSE]:s[p.FULL]);if(!n){throw new TypeError("Invalid Version: "+e)}this.raw=e;this.major=+n[1];this.minor=+n[2];this.patch=+n[3];if(this.major>r||this.major<0){throw new TypeError("Invalid major version")}if(this.minor>r||this.minor<0){throw new TypeError("Invalid minor version")}if(this.patch>r||this.patch<0){throw new TypeError("Invalid patch version")}if(!n[4]){this.prerelease=[]}else{this.prerelease=n[4].split(".").map((function(e){if(/^[0-9]+$/.test(e)){var t=+e;if(t>=0&&t=0){if(typeof this.prerelease[i]==="number"){this.prerelease[i]++;i=-2}}if(i===-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,i,a){if(typeof i==="string"){a=i;i=undefined}try{return new SemVer(e,i).inc(t,a).version}catch(e){return null}}t.diff=diff;function diff(e,t){if(eq(e,t)){return null}else{var i=parse(e);var a=parse(t);var r="";if(i.prerelease.length||a.prerelease.length){r="pre";var n="prerelease"}for(var s in i){if(s==="major"||s==="minor"||s==="patch"){if(i[s]!==a[s]){return r+s}}}return n}}t.compareIdentifiers=compareIdentifiers;var h=/^[0-9]+$/;function compareIdentifiers(e,t){var i=h.test(e);var a=h.test(t);if(i&&a){e=+e;t=+t}return e===t?0:i&&!a?-1:a&&!i?1:e0}t.lt=lt;function lt(e,t,i){return compare(e,t,i)<0}t.eq=eq;function eq(e,t,i){return compare(e,t,i)===0}t.neq=neq;function neq(e,t,i){return compare(e,t,i)!==0}t.gte=gte;function gte(e,t,i){return compare(e,t,i)>=0}t.lte=lte;function lte(e,t,i){return compare(e,t,i)<=0}t.cmp=cmp;function cmp(e,t,i,a){switch(t){case"===":if(typeof e==="object")e=e.version;if(typeof i==="object")i=i.version;return e===i;case"!==":if(typeof e==="object")e=e.version;if(typeof i==="object")i=i.version;return e!==i;case"":case"=":case"==":return eq(e,i,a);case"!=":return neq(e,i,a);case">":return gt(e,i,a);case">=":return gte(e,i,a);case"<":return lt(e,i,a);case"<=":return lte(e,i,a);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)}i("comparator",e,t);this.options=t;this.loose=!!t.loose;this.parse(e);if(this.semver===g){this.value=""}else{this.value=this.operator+this.semver.version}i("comp",this)}var g={};Comparator.prototype.parse=function(e){var t=this.options.loose?s[p.COMPARATORLOOSE]:s[p.COMPARATOR];var i=e.match(t);if(!i){throw new TypeError("Invalid comparator: "+e)}this.operator=i[1]!==undefined?i[1]:"";if(this.operator==="="){this.operator=""}if(!i[2]){this.semver=g}else{this.semver=new SemVer(i[2],this.options.loose)}};Comparator.prototype.toString=function(){return this.value};Comparator.prototype.test=function(e){i("Comparator.test",e,this.options.loose);if(this.semver===g||e===g){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 i;if(this.operator===""){if(this.value===""){return true}i=new Range(e.value,t);return satisfies(this.value,i,t)}else if(e.operator===""){if(e.value===""){return true}i=new Range(this.value,t);return satisfies(e.semver,i,t)}var a=(this.operator===">="||this.operator===">")&&(e.operator===">="||e.operator===">");var r=(this.operator==="<="||this.operator==="<")&&(e.operator==="<="||e.operator==="<");var n=this.semver.version===e.semver.version;var s=(this.operator===">="||this.operator==="<=")&&(e.operator===">="||e.operator==="<=");var o=cmp(this.semver,"<",e.semver,t)&&((this.operator===">="||this.operator===">")&&(e.operator==="<="||e.operator==="<"));var p=cmp(this.semver,">",e.semver,t)&&((this.operator==="<="||this.operator==="<")&&(e.operator===">="||e.operator===">"));return a||r||n&&s||o||p};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 a=t?s[p.HYPHENRANGELOOSE]:s[p.HYPHENRANGE];e=e.replace(a,hyphenReplace);i("hyphen replace",e);e=e.replace(s[p.COMPARATORTRIM],u);i("comparator trim",e,s[p.COMPARATORTRIM]);e=e.replace(s[p.TILDETRIM],c);e=e.replace(s[p.CARETTRIM],d);e=e.split(/\s+/).join(" ");var r=t?s[p.COMPARATORLOOSE]:s[p.COMPARATOR];var n=e.split(" ").map((function(e){return parseComparator(e,this.options)}),this).join(" ").split(/\s+/);if(this.options.loose){n=n.filter((function(e){return!!e.match(r)}))}n=n.map((function(e){return new Comparator(e,this.options)}),this);return n};Range.prototype.intersects=function(e,t){if(!(e instanceof Range)){throw new TypeError("a Range is required")}return this.set.some((function(i){return isSatisfiable(i,t)&&e.set.some((function(e){return isSatisfiable(e,t)&&i.every((function(i){return e.every((function(e){return i.intersects(e,t)}))}))}))}))};function isSatisfiable(e,t){var i=true;var a=e.slice();var r=a.pop();while(i&&a.length){i=a.every((function(e){return r.intersects(e,t)}));r=a.pop()}return i}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){i("comp",e,t);e=replaceCarets(e,t);i("caret",e);e=replaceTildes(e,t);i("tildes",e);e=replaceXRanges(e,t);i("xrange",e);e=replaceStars(e,t);i("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 a=t.loose?s[p.TILDELOOSE]:s[p.TILDE];return e.replace(a,(function(t,a,r,n,s){i("tilde",e,t,a,r,n,s);var o;if(isX(a)){o=""}else if(isX(r)){o=">="+a+".0.0 <"+(+a+1)+".0.0"}else if(isX(n)){o=">="+a+"."+r+".0 <"+a+"."+(+r+1)+".0"}else if(s){i("replaceTilde pr",s);o=">="+a+"."+r+"."+n+"-"+s+" <"+a+"."+(+r+1)+".0"}else{o=">="+a+"."+r+"."+n+" <"+a+"."+(+r+1)+".0"}i("tilde return",o);return o}))}function replaceCarets(e,t){return e.trim().split(/\s+/).map((function(e){return replaceCaret(e,t)})).join(" ")}function replaceCaret(e,t){i("caret",e,t);var a=t.loose?s[p.CARETLOOSE]:s[p.CARET];return e.replace(a,(function(t,a,r,n,s){i("caret",e,t,a,r,n,s);var o;if(isX(a)){o=""}else if(isX(r)){o=">="+a+".0.0 <"+(+a+1)+".0.0"}else if(isX(n)){if(a==="0"){o=">="+a+"."+r+".0 <"+a+"."+(+r+1)+".0"}else{o=">="+a+"."+r+".0 <"+(+a+1)+".0.0"}}else if(s){i("replaceCaret pr",s);if(a==="0"){if(r==="0"){o=">="+a+"."+r+"."+n+"-"+s+" <"+a+"."+r+"."+(+n+1)}else{o=">="+a+"."+r+"."+n+"-"+s+" <"+a+"."+(+r+1)+".0"}}else{o=">="+a+"."+r+"."+n+"-"+s+" <"+(+a+1)+".0.0"}}else{i("no pr");if(a==="0"){if(r==="0"){o=">="+a+"."+r+"."+n+" <"+a+"."+r+"."+(+n+1)}else{o=">="+a+"."+r+"."+n+" <"+a+"."+(+r+1)+".0"}}else{o=">="+a+"."+r+"."+n+" <"+(+a+1)+".0.0"}}i("caret return",o);return o}))}function replaceXRanges(e,t){i("replaceXRanges",e,t);return e.split(/\s+/).map((function(e){return replaceXRange(e,t)})).join(" ")}function replaceXRange(e,t){e=e.trim();var a=t.loose?s[p.XRANGELOOSE]:s[p.XRANGE];return e.replace(a,(function(a,r,n,s,o,p){i("xRange",e,a,r,n,s,o,p);var l=isX(n);var c=l||isX(s);var d=c||isX(o);var u=d;if(r==="="&&u){r=""}p=t.includePrerelease?"-0":"";if(l){if(r===">"||r==="<"){a="<0.0.0-0"}else{a="*"}}else if(r&&u){if(c){s=0}o=0;if(r===">"){r=">=";if(c){n=+n+1;s=0;o=0}else{s=+s+1;o=0}}else if(r==="<="){r="<";if(c){n=+n+1}else{s=+s+1}}a=r+n+"."+s+"."+o+p}else if(c){a=">="+n+".0.0"+p+" <"+(+n+1)+".0.0"+p}else if(d){a=">="+n+"."+s+".0"+p+" <"+n+"."+(+s+1)+".0"+p}i("xRange return",a);return a}))}function replaceStars(e,t){i("replaceStars",e,t);return e.trim().replace(s[p.STAR],"")}function hyphenReplace(e,t,i,a,r,n,s,o,p,l,c,d,u){if(isX(i)){t=""}else if(isX(a)){t=">="+i+".0.0"}else if(isX(r)){t=">="+i+"."+a+".0"}else{t=">="+t}if(isX(p)){o=""}else if(isX(l)){o="<"+(+p+1)+".0.0"}else if(isX(c)){o="<"+p+"."+(+l+1)+".0"}else if(d){o="<="+p+"."+l+"."+c+"-"+d}else{o="<="+o}return(t+" "+o).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 n=e[r].semver;if(n.major===t.major&&n.minor===t.minor&&n.patch===t.patch){return true}}}return false}return true}t.satisfies=satisfies;function satisfies(e,t,i){try{t=new Range(t,i)}catch(e){return false}return t.test(e)}t.maxSatisfying=maxSatisfying;function maxSatisfying(e,t,i){var a=null;var r=null;try{var n=new Range(t,i)}catch(e){return null}e.forEach((function(e){if(n.test(e)){if(!a||r.compare(e)===-1){a=e;r=new SemVer(a,i)}}}));return a}t.minSatisfying=minSatisfying;function minSatisfying(e,t,i){var a=null;var r=null;try{var n=new Range(t,i)}catch(e){return null}e.forEach((function(e){if(n.test(e)){if(!a||r.compare(e)===1){a=e;r=new SemVer(a,i)}}}));return a}t.minVersion=minVersion;function minVersion(e,t){e=new Range(e,t);var i=new SemVer("0.0.0");if(e.test(i)){return i}i=new SemVer("0.0.0-0");if(e.test(i)){return i}i=null;for(var a=0;a":if(t.prerelease.length===0){t.patch++}else{t.prerelease.push(0)}t.raw=t.format();case"":case">=":if(!i||gt(i,t)){i=t}break;case"<":case"<=":break;default:throw new Error("Unexpected operation: "+e.operator)}}))}if(i&&e.test(i)){return i}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,i){return outside(e,t,"<",i)}t.gtr=gtr;function gtr(e,t,i){return outside(e,t,">",i)}t.outside=outside;function outside(e,t,i,a){e=new SemVer(e,a);t=new Range(t,a);var r,n,s,o,p;switch(i){case">":r=gt;n=lte;s=lt;o=">";p=">=";break;case"<":r=lt;n=gte;s=gt;o="<";p="<=";break;default:throw new TypeError('Must provide a hilo val of "<" or ">"')}if(satisfies(e,t,a)){return false}for(var l=0;l=0.0.0")}d=d||e;u=u||e;if(r(e.semver,d.semver,a)){d=e}else if(s(e.semver,u.semver,a)){u=e}}));if(d.operator===o||d.operator===p){return false}if((!u.operator||u.operator===o)&&n(e,u.semver)){return false}else if(u.operator===p&&s(e,u.semver)){return false}}return true}t.prerelease=prerelease;function prerelease(e,t){var i=parse(e,t);return i&&i.prerelease.length?i.prerelease:null}t.intersects=intersects;function intersects(e,t,i){e=new Range(e,i);t=new Range(t,i);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 i=null;if(!t.rtl){i=e.match(s[p.COERCE])}else{var a;while((a=s[p.COERCERTL].exec(e))&&(!i||i.index+i[0].length!==e.length)){if(!i||a.index+a[0].length!==i.index+i[0].length){i=a}s[p.COERCERTL].lastIndex=a.index+a[1].length+a[2].length}s[p.COERCERTL].lastIndex=-1}if(i===null){return null}return parse(i[2]+"."+(i[3]||"0")+"."+(i[4]||"0"),t)}},4674:(e,t,i)=>{"use strict";t.c=t.create=i(4016);t.r=t.replace=i(5923);t.t=t.list=i(1525);t.u=t.update=i(407);t.x=t.extract=i(5317);t.Pack=i(7768);t.Unpack=i(7628);t.Parse=i(8917);t.ReadEntry=i(8116);t.WriteEntry=i(5450);t.Header=i(6043);t.Pax=i(7996);t.types=i(4173)},4016:(e,t,i)=>{"use strict";const a=i(5274);const r=i(7768);const n=i(7714);const s=i(1525);const o=i(1017);e.exports=(e,t,i)=>{if(typeof t==="function"){i=t}if(Array.isArray(e)){t=e,e={}}if(!t||!Array.isArray(t)||!t.length){throw new TypeError("no files or directories specified")}t=Array.from(t);const r=a(e);if(r.sync&&typeof i==="function"){throw new TypeError("callback not supported for sync tar functions")}if(!r.file&&typeof i==="function"){throw new TypeError("callback only supported with file option")}return r.file&&r.sync?createFileSync(r,t):r.file?createFile(r,t,i):r.sync?createSync(r,t):create(r,t)};const createFileSync=(e,t)=>{const i=new r.Sync(e);const a=new n.WriteStreamSync(e.file,{mode:e.mode||438});i.pipe(a);addFilesSync(i,t)};const createFile=(e,t,i)=>{const a=new r(e);const s=new n.WriteStream(e.file,{mode:e.mode||438});a.pipe(s);const o=new Promise(((e,t)=>{s.on("error",t);s.on("close",e);a.on("error",t)}));addFilesAsync(a,t);return i?o.then(i,i):o};const addFilesSync=(e,t)=>{t.forEach((t=>{if(t.charAt(0)==="@"){s({file:o.resolve(e.cwd,t.slice(1)),sync:true,noResume:true,onentry:t=>e.add(t)})}else{e.add(t)}}));e.end()};const addFilesAsync=(e,t)=>{while(t.length){const i=t.shift();if(i.charAt(0)==="@"){return s({file:o.resolve(e.cwd,i.slice(1)),noResume:true,onentry:t=>e.add(t)}).then((i=>addFilesAsync(e,t)))}else{e.add(i)}}e.end()};const createSync=(e,t)=>{const i=new r.Sync(e);addFilesSync(i,t);return i};const create=(e,t)=>{const i=new r(e);addFilesAsync(i,t);return i}},5317:(e,t,i)=>{"use strict";const a=i(5274);const r=i(7628);const n=i(7147);const s=i(7714);const o=i(1017);const p=i(8886);e.exports=(e,t,i)=>{if(typeof e==="function"){i=e,t=null,e={}}else if(Array.isArray(e)){t=e,e={}}if(typeof t==="function"){i=t,t=null}if(!t){t=[]}else{t=Array.from(t)}const r=a(e);if(r.sync&&typeof i==="function"){throw new TypeError("callback not supported for sync tar functions")}if(!r.file&&typeof i==="function"){throw new TypeError("callback only supported with file option")}if(t.length){filesFilter(r,t)}return r.file&&r.sync?extractFileSync(r):r.file?extractFile(r,i):r.sync?extractSync(r):extract(r)};const filesFilter=(e,t)=>{const i=new Map(t.map((e=>[p(e),true])));const a=e.filter;const mapHas=(e,t)=>{const a=t||o.parse(e).root||".";const r=e===a?false:i.has(e)?i.get(e):mapHas(o.dirname(e),a);i.set(e,r);return r};e.filter=a?(e,t)=>a(e,t)&&mapHas(p(e)):e=>mapHas(p(e))};const extractFileSync=e=>{const t=new r.Sync(e);const i=e.file;const a=n.statSync(i);const o=e.maxReadSize||16*1024*1024;const p=new s.ReadStreamSync(i,{readSize:o,size:a.size});p.pipe(t)};const extractFile=(e,t)=>{const i=new r(e);const a=e.maxReadSize||16*1024*1024;const o=e.file;const p=new Promise(((e,t)=>{i.on("error",t);i.on("close",e);n.stat(o,((e,r)=>{if(e){t(e)}else{const e=new s.ReadStream(o,{readSize:a,size:r.size});e.on("error",t);e.pipe(i)}}))}));return t?p.then(t,t):p};const extractSync=e=>new r.Sync(e);const extract=e=>new r(e)},1172:(e,t,i)=>{const a=process.env.__FAKE_PLATFORM__||process.platform;const r=a==="win32";const n=global.__FAKE_TESTING_FS__||i(7147);const{O_CREAT:s,O_TRUNC:o,O_WRONLY:p,UV_FS_O_FILEMAP:l=0}=n.constants;const c=r&&!!l;const d=512*1024;const u=l|o|s|p;e.exports=!c?()=>"w":e=>e{"use strict";const a=i(4173);const r=i(1017).posix;const n=i(2370);const s=Symbol("slurp");const o=Symbol("type");class Header{constructor(e,t,i,a){this.cksumValid=false;this.needPax=false;this.nullBlock=false;this.block=null;this.path=null;this.mode=null;this.uid=null;this.gid=null;this.size=null;this.mtime=null;this.cksum=null;this[o]="0";this.linkpath=null;this.uname=null;this.gname=null;this.devmaj=0;this.devmin=0;this.atime=null;this.ctime=null;if(Buffer.isBuffer(e)){this.decode(e,t||0,i,a)}else if(e){this.set(e)}}decode(e,t,i,a){if(!t){t=0}if(!e||!(e.length>=t+512)){throw new Error("need 512 bytes for header")}this.path=decString(e,t,100);this.mode=decNumber(e,t+100,8);this.uid=decNumber(e,t+108,8);this.gid=decNumber(e,t+116,8);this.size=decNumber(e,t+124,12);this.mtime=decDate(e,t+136,12);this.cksum=decNumber(e,t+148,12);this[s](i);this[s](a,true);this[o]=decString(e,t+156,1);if(this[o]===""){this[o]="0"}if(this[o]==="0"&&this.path.slice(-1)==="/"){this[o]="5"}if(this[o]==="5"){this.size=0}this.linkpath=decString(e,t+157,100);if(e.slice(t+257,t+265).toString()==="ustar\x0000"){this.uname=decString(e,t+265,32);this.gname=decString(e,t+297,32);this.devmaj=decNumber(e,t+329,8);this.devmin=decNumber(e,t+337,8);if(e[t+475]!==0){const i=decString(e,t+345,155);this.path=i+"/"+this.path}else{const i=decString(e,t+345,130);if(i){this.path=i+"/"+this.path}this.atime=decDate(e,t+476,12);this.ctime=decDate(e,t+488,12)}}let r=8*32;for(let i=t;i=t+512)){throw new Error("need 512 bytes for header")}const i=this.ctime||this.atime?130:155;const a=splitPrefix(this.path||"",i);const r=a[0];const n=a[1];this.needPax=a[2];this.needPax=encString(e,t,100,r)||this.needPax;this.needPax=encNumber(e,t+100,8,this.mode)||this.needPax;this.needPax=encNumber(e,t+108,8,this.uid)||this.needPax;this.needPax=encNumber(e,t+116,8,this.gid)||this.needPax;this.needPax=encNumber(e,t+124,12,this.size)||this.needPax;this.needPax=encDate(e,t+136,12,this.mtime)||this.needPax;e[t+156]=this[o].charCodeAt(0);this.needPax=encString(e,t+157,100,this.linkpath)||this.needPax;e.write("ustar\x0000",t+257,8);this.needPax=encString(e,t+265,32,this.uname)||this.needPax;this.needPax=encString(e,t+297,32,this.gname)||this.needPax;this.needPax=encNumber(e,t+329,8,this.devmaj)||this.needPax;this.needPax=encNumber(e,t+337,8,this.devmin)||this.needPax;this.needPax=encString(e,t+345,i,n)||this.needPax;if(e[t+475]!==0){this.needPax=encString(e,t+345,155,n)||this.needPax}else{this.needPax=encString(e,t+345,130,n)||this.needPax;this.needPax=encDate(e,t+476,12,this.atime)||this.needPax;this.needPax=encDate(e,t+488,12,this.ctime)||this.needPax}let s=8*32;for(let i=t;i{const i=100;let a=e;let n="";let s;const o=r.parse(e).root||".";if(Buffer.byteLength(a)i&&Buffer.byteLength(n)<=t){s=[a.slice(0,i-1),n,true]}else{a=r.join(r.basename(n),a);n=r.dirname(n)}}while(n!==o&&!s);if(!s){s=[e.slice(0,i-1),"",true]}}return s};const decString=(e,t,i)=>e.slice(t,t+i).toString("utf8").replace(/\0.*/,"");const decDate=(e,t,i)=>numToDate(decNumber(e,t,i));const numToDate=e=>e===null?null:new Date(e*1e3);const decNumber=(e,t,i)=>e[t]&128?n.parse(e.slice(t,t+i)):decSmallNumber(e,t,i);const nanNull=e=>isNaN(e)?null:e;const decSmallNumber=(e,t,i)=>nanNull(parseInt(e.slice(t,t+i).toString("utf8").replace(/\0.*$/,"").trim(),8));const p={12:8589934591,8:2097151};const encNumber=(e,t,i,a)=>a===null?false:a>p[i]||a<0?(n.encode(a,e.slice(t,t+i)),true):(encSmallNumber(e,t,i,a),false);const encSmallNumber=(e,t,i,a)=>e.write(octalString(a,i),t,i,"ascii");const octalString=(e,t)=>padOctal(Math.floor(e).toString(8),t);const padOctal=(e,t)=>(e.length===t-1?e:new Array(t-e.length-1).join("0")+e+" ")+"\0";const encDate=(e,t,i,a)=>a===null?false:encNumber(e,t,i,a.getTime()/1e3);const l=new Array(156).join("\0");const encString=(e,t,i,a)=>a===null?false:(e.write(a+l,t,i,"utf8"),a.length!==Buffer.byteLength(a)||a.length>i);e.exports=Header},5274:e=>{"use strict";const t=new Map([["C","cwd"],["f","file"],["z","gzip"],["P","preservePaths"],["U","unlink"],["strip-components","strip"],["stripComponents","strip"],["keep-newer","newer"],["keepNewer","newer"],["keep-newer-files","newer"],["keepNewerFiles","newer"],["k","keep"],["keep-existing","keep"],["keepExisting","keep"],["m","noMtime"],["no-mtime","noMtime"],["p","preserveOwner"],["L","follow"],["h","follow"]]);e.exports=e=>e?Object.keys(e).map((i=>[t.has(i)?t.get(i):i,e[i]])).reduce(((e,t)=>(e[t[0]]=t[1],e)),Object.create(null)):{}},2370:e=>{"use strict";const encode=(e,t)=>{if(!Number.isSafeInteger(e)){throw Error("cannot encode number outside of javascript safe integer range")}else if(e<0){encodeNegative(e,t)}else{encodePositive(e,t)}return t};const encodePositive=(e,t)=>{t[0]=128;for(var i=t.length;i>1;i--){t[i-1]=e&255;e=Math.floor(e/256)}};const encodeNegative=(e,t)=>{t[0]=255;var i=false;e=e*-1;for(var a=t.length;a>1;a--){var r=e&255;e=Math.floor(e/256);if(i){t[a-1]=onesComp(r)}else if(r===0){t[a-1]=0}else{i=true;t[a-1]=twosComp(r)}}};const parse=e=>{const t=e[0];const i=t===128?pos(e.slice(1,e.length)):t===255?twos(e):null;if(i===null){throw Error("invalid base256 encoding")}if(!Number.isSafeInteger(i)){throw Error("parsed number outside of javascript safe integer range")}return i};const twos=e=>{var t=e.length;var i=0;var a=false;for(var r=t-1;r>-1;r--){var n=e[r];var s;if(a){s=onesComp(n)}else if(n===0){s=n}else{a=true;s=twosComp(n)}if(s!==0){i-=s*Math.pow(256,t-r-1)}}return i};const pos=e=>{var t=e.length;var i=0;for(var a=t-1;a>-1;a--){var r=e[a];if(r!==0){i+=r*Math.pow(256,t-a-1)}}return i};const onesComp=e=>(255^e)&255;const twosComp=e=>(255^e)+1&255;e.exports={encode:encode,parse:parse}},1525:(e,t,i)=>{"use strict";const a=i(5274);const r=i(8917);const n=i(7147);const s=i(7714);const o=i(1017);const p=i(8886);e.exports=(e,t,i)=>{if(typeof e==="function"){i=e,t=null,e={}}else if(Array.isArray(e)){t=e,e={}}if(typeof t==="function"){i=t,t=null}if(!t){t=[]}else{t=Array.from(t)}const r=a(e);if(r.sync&&typeof i==="function"){throw new TypeError("callback not supported for sync tar functions")}if(!r.file&&typeof i==="function"){throw new TypeError("callback only supported with file option")}if(t.length){filesFilter(r,t)}if(!r.noResume){onentryFunction(r)}return r.file&&r.sync?listFileSync(r):r.file?listFile(r,i):list(r)};const onentryFunction=e=>{const t=e.onentry;e.onentry=t?e=>{t(e);e.resume()}:e=>e.resume()};const filesFilter=(e,t)=>{const i=new Map(t.map((e=>[p(e),true])));const a=e.filter;const mapHas=(e,t)=>{const a=t||o.parse(e).root||".";const r=e===a?false:i.has(e)?i.get(e):mapHas(o.dirname(e),a);i.set(e,r);return r};e.filter=a?(e,t)=>a(e,t)&&mapHas(p(e)):e=>mapHas(p(e))};const listFileSync=e=>{const t=list(e);const i=e.file;let a=true;let r;try{const s=n.statSync(i);const o=e.maxReadSize||16*1024*1024;if(s.size{const i=new r(e);const a=e.maxReadSize||16*1024*1024;const o=e.file;const p=new Promise(((e,t)=>{i.on("error",t);i.on("end",e);n.stat(o,((e,r)=>{if(e){t(e)}else{const e=new s.ReadStream(o,{readSize:a,size:r.size});e.on("error",t);e.pipe(i)}}))}));return t?p.then(t,t):p};const list=e=>new r(e)},9624:(e,t,i)=>{"use strict";const a=i(6186);const r=i(7147);const n=i(1017);const s=i(9051);const o=i(6843);class SymlinkError extends Error{constructor(e,t){super("Cannot extract through symbolic link");this.path=t;this.symlink=e}get name(){return"SylinkError"}}class CwdError extends Error{constructor(e,t){super(t+": Cannot cd into '"+e+"'");this.path=e;this.code=t}get name(){return"CwdError"}}const cGet=(e,t)=>e.get(o(t));const cSet=(e,t,i)=>e.set(o(t),i);const checkCwd=(e,t)=>{r.stat(e,((i,a)=>{if(i||!a.isDirectory()){i=new CwdError(e,i&&i.code||"ENOTDIR")}t(i)}))};e.exports=(e,t,i)=>{e=o(e);const p=t.umask;const l=t.mode|448;const c=(l&p)!==0;const d=t.uid;const u=t.gid;const m=typeof d==="number"&&typeof u==="number"&&(d!==t.processUid||u!==t.processGid);const h=t.preserve;const g=t.unlink;const y=t.cache;const v=o(t.cwd);const done=(t,a)=>{if(t){i(t)}else{cSet(y,e,true);if(a&&m){s(a,d,u,(e=>done(e)))}else if(c){r.chmod(e,l,i)}else{i()}}};if(y&&cGet(y,e)===true){return done()}if(e===v){return checkCwd(e,done)}if(h){return a(e,{mode:l}).then((e=>done(null,e)),done)}const b=o(n.relative(v,e));const x=b.split("/");mkdir_(v,x,l,y,g,v,null,done)};const mkdir_=(e,t,i,a,s,p,l,c)=>{if(!t.length){return c(null,l)}const d=t.shift();const u=o(n.resolve(e+"/"+d));if(cGet(a,u)){return mkdir_(u,t,i,a,s,p,l,c)}r.mkdir(u,i,onmkdir(u,t,i,a,s,p,l,c))};const onmkdir=(e,t,i,a,n,s,p,l)=>c=>{if(c){r.lstat(e,((d,u)=>{if(d){d.path=d.path&&o(d.path);l(d)}else if(u.isDirectory()){mkdir_(e,t,i,a,n,s,p,l)}else if(n){r.unlink(e,(o=>{if(o){return l(o)}r.mkdir(e,i,onmkdir(e,t,i,a,n,s,p,l))}))}else if(u.isSymbolicLink()){return l(new SymlinkError(e,e+"/"+t.join("/")))}else{l(c)}}))}else{p=p||e;mkdir_(e,t,i,a,n,s,p,l)}};const checkCwdSync=e=>{let t=false;let i="ENOTDIR";try{t=r.statSync(e).isDirectory()}catch(e){i=e.code}finally{if(!t){throw new CwdError(e,i)}}};e.exports.sync=(e,t)=>{e=o(e);const i=t.umask;const p=t.mode|448;const l=(p&i)!==0;const c=t.uid;const d=t.gid;const u=typeof c==="number"&&typeof d==="number"&&(c!==t.processUid||d!==t.processGid);const m=t.preserve;const h=t.unlink;const g=t.cache;const y=o(t.cwd);const done=t=>{cSet(g,e,true);if(t&&u){s.sync(t,c,d)}if(l){r.chmodSync(e,p)}};if(g&&cGet(g,e)===true){return done()}if(e===y){checkCwdSync(y);return done()}if(m){return done(a.sync(e,p))}const v=o(n.relative(y,e));const b=v.split("/");let x=null;for(let e=b.shift(),t=y;e&&(t+="/"+e);e=b.shift()){t=o(n.resolve(t));if(cGet(g,t)){continue}try{r.mkdirSync(t,p);x=x||t;cSet(g,t,true)}catch(e){const i=r.lstatSync(t);if(i.isDirectory()){cSet(g,t,true);continue}else if(h){r.unlinkSync(t);r.mkdirSync(t,p);x=x||t;cSet(g,t,true);continue}else if(i.isSymbolicLink()){return new SymlinkError(t,t+"/"+b.join("/"))}}}return done(x)}},8371:e=>{"use strict";e.exports=(e,t,i)=>{e&=4095;if(i){e=(e|384)&~18}if(t){if(e&256){e|=64}if(e&32){e|=8}if(e&4){e|=1}}return e}},7118:e=>{const t=Object.create(null);const{hasOwnProperty:i}=Object.prototype;e.exports=e=>{if(!i.call(t,e)){t[e]=e.normalize("NFKD")}return t[e]}},6843:e=>{const t=process.env.TESTING_TAR_FAKE_PLATFORM||process.platform;e.exports=t!=="win32"?e=>e:e=>e&&e.replace(/\\/g,"/")},7768:(e,t,i)=>{"use strict";class PackJob{constructor(e,t){this.path=e||"./";this.absolute=t;this.entry=null;this.stat=null;this.readdir=null;this.pending=false;this.ignore=false;this.piped=false}}const{Minipass:a}=i(6684);const r=i(3486);const n=i(8116);const s=i(5450);const o=s.Sync;const p=s.Tar;const l=i(665);const c=Buffer.alloc(1024);const d=Symbol("onStat");const u=Symbol("ended");const m=Symbol("queue");const h=Symbol("current");const g=Symbol("process");const y=Symbol("processing");const v=Symbol("processJob");const b=Symbol("jobs");const x=Symbol("jobDone");const w=Symbol("addFSEntry");const S=Symbol("addTarEntry");const N=Symbol("stat");const E=Symbol("readdir");const C=Symbol("onreaddir");const _=Symbol("pipe");const O=Symbol("entry");const P=Symbol("entryOpt");const R=Symbol("writeEntryClass");const T=Symbol("write");const A=Symbol("ondrain");const D=i(7147);const I=i(1017);const B=i(5899);const L=i(6843);const M=B(class Pack extends a{constructor(e){super(e);e=e||Object.create(null);this.opt=e;this.file=e.file||"";this.cwd=e.cwd||process.cwd();this.maxReadSize=e.maxReadSize;this.preservePaths=!!e.preservePaths;this.strict=!!e.strict;this.noPax=!!e.noPax;this.prefix=L(e.prefix||"");this.linkCache=e.linkCache||new Map;this.statCache=e.statCache||new Map;this.readdirCache=e.readdirCache||new Map;this[R]=s;if(typeof e.onwarn==="function"){this.on("warn",e.onwarn)}this.portable=!!e.portable;this.zip=null;if(e.gzip){if(typeof e.gzip!=="object"){e.gzip={}}if(this.portable){e.gzip.portable=true}this.zip=new r.Gzip(e.gzip);this.zip.on("data",(e=>super.write(e)));this.zip.on("end",(e=>super.end()));this.zip.on("drain",(e=>this[A]()));this.on("resume",(e=>this.zip.resume()))}else{this.on("drain",this[A])}this.noDirRecurse=!!e.noDirRecurse;this.follow=!!e.follow;this.noMtime=!!e.noMtime;this.mtime=e.mtime||null;this.filter=typeof e.filter==="function"?e.filter:e=>true;this[m]=new l;this[b]=0;this.jobs=+e.jobs||4;this[y]=false;this[u]=false}[T](e){return super.write(e)}add(e){this.write(e);return this}end(e){if(e){this.write(e)}this[u]=true;this[g]();return this}write(e){if(this[u]){throw new Error("write after end")}if(e instanceof n){this[S](e)}else{this[w](e)}return this.flowing}[S](e){const t=L(I.resolve(this.cwd,e.path));if(!this.filter(e.path,e)){e.resume()}else{const i=new PackJob(e.path,t,false);i.entry=new p(e,this[P](i));i.entry.on("end",(e=>this[x](i)));this[b]+=1;this[m].push(i)}this[g]()}[w](e){const t=L(I.resolve(this.cwd,e));this[m].push(new PackJob(e,t));this[g]()}[N](e){e.pending=true;this[b]+=1;const t=this.follow?"stat":"lstat";D[t](e.absolute,((t,i)=>{e.pending=false;this[b]-=1;if(t){this.emit("error",t)}else{this[d](e,i)}}))}[d](e,t){this.statCache.set(e.absolute,t);e.stat=t;if(!this.filter(e.path,t)){e.ignore=true}this[g]()}[E](e){e.pending=true;this[b]+=1;D.readdir(e.absolute,((t,i)=>{e.pending=false;this[b]-=1;if(t){return this.emit("error",t)}this[C](e,i)}))}[C](e,t){this.readdirCache.set(e.absolute,t);e.readdir=t;this[g]()}[g](){if(this[y]){return}this[y]=true;for(let e=this[m].head;e!==null&&this[b]this.warn(e,t,i),noPax:this.noPax,cwd:this.cwd,absolute:e.absolute,preservePaths:this.preservePaths,maxReadSize:this.maxReadSize,strict:this.strict,portable:this.portable,linkCache:this.linkCache,statCache:this.statCache,noMtime:this.noMtime,mtime:this.mtime,prefix:this.prefix}}[O](e){this[b]+=1;try{return new this[R](e.path,this[P](e)).on("end",(()=>this[x](e))).on("error",(e=>this.emit("error",e)))}catch(e){this.emit("error",e)}}[A](){if(this[h]&&this[h].entry){this[h].entry.resume()}}[_](e){e.piped=true;if(e.readdir){e.readdir.forEach((t=>{const i=e.path;const a=i==="./"?"":i.replace(/\/*$/,"/");this[w](a+t)}))}const t=e.entry;const i=this.zip;if(i){t.on("data",(e=>{if(!i.write(e)){t.pause()}}))}else{t.on("data",(e=>{if(!super.write(e)){t.pause()}}))}}pause(){if(this.zip){this.zip.pause()}return super.pause()}});class PackSync extends M{constructor(e){super(e);this[R]=o}pause(){}resume(){}[N](e){const t=this.follow?"statSync":"lstatSync";this[d](e,D[t](e.absolute))}[E](e,t){this[C](e,D.readdirSync(e.absolute))}[_](e){const t=e.entry;const i=this.zip;if(e.readdir){e.readdir.forEach((t=>{const i=e.path;const a=i==="./"?"":i.replace(/\/*$/,"/");this[w](a+t)}))}if(i){t.on("data",(e=>{i.write(e)}))}else{t.on("data",(e=>{super[T](e)}))}}}M.Sync=PackSync;e.exports=M},8917:(e,t,i)=>{"use strict";const a=i(5899);const r=i(6043);const n=i(2361);const s=i(665);const o=1024*1024;const p=i(8116);const l=i(7996);const c=i(3486);const{nextTick:d}=i(7282);const u=Buffer.from([31,139]);const m=Symbol("state");const h=Symbol("writeEntry");const g=Symbol("readEntry");const y=Symbol("nextEntry");const v=Symbol("processEntry");const b=Symbol("extendedHeader");const x=Symbol("globalExtendedHeader");const w=Symbol("meta");const S=Symbol("emitMeta");const N=Symbol("buffer");const E=Symbol("queue");const C=Symbol("ended");const _=Symbol("emittedEnd");const O=Symbol("emit");const P=Symbol("unzip");const R=Symbol("consumeChunk");const T=Symbol("consumeChunkSub");const A=Symbol("consumeBody");const D=Symbol("consumeMeta");const I=Symbol("consumeHeader");const B=Symbol("consuming");const L=Symbol("bufferConcat");const M=Symbol("maybeEnd");const k=Symbol("writing");const z=Symbol("aborted");const j=Symbol("onDone");const q=Symbol("sawValidEntry");const U=Symbol("sawNullBlock");const H=Symbol("sawEOF");const V=Symbol("closeStream");const noop=e=>true;e.exports=a(class Parser extends n{constructor(e){e=e||{};super(e);this.file=e.file||"";this[q]=null;this.on(j,(e=>{if(this[m]==="begin"||this[q]===false){this.warn("TAR_BAD_ARCHIVE","Unrecognized archive format")}}));if(e.ondone){this.on(j,e.ondone)}else{this.on(j,(e=>{this.emit("prefinish");this.emit("finish");this.emit("end")}))}this.strict=!!e.strict;this.maxMetaEntrySize=e.maxMetaEntrySize||o;this.filter=typeof e.filter==="function"?e.filter:noop;this.writable=true;this.readable=false;this[E]=new s;this[N]=null;this[g]=null;this[h]=null;this[m]="begin";this[w]="";this[b]=null;this[x]=null;this[C]=false;this[P]=null;this[z]=false;this[U]=false;this[H]=false;this.on("end",(()=>this[V]()));if(typeof e.onwarn==="function"){this.on("warn",e.onwarn)}if(typeof e.onentry==="function"){this.on("entry",e.onentry)}}[I](e,t){if(this[q]===null){this[q]=false}let i;try{i=new r(e,t,this[b],this[x])}catch(e){return this.warn("TAR_ENTRY_INVALID",e)}if(i.nullBlock){if(this[U]){this[H]=true;if(this[m]==="begin"){this[m]="header"}this[O]("eof")}else{this[U]=true;this[O]("nullBlock")}}else{this[U]=false;if(!i.cksumValid){this.warn("TAR_ENTRY_INVALID","checksum failure",{header:i})}else if(!i.path){this.warn("TAR_ENTRY_INVALID","path is required",{header:i})}else{const e=i.type;if(/^(Symbolic)?Link$/.test(e)&&!i.linkpath){this.warn("TAR_ENTRY_INVALID","linkpath required",{header:i})}else if(!/^(Symbolic)?Link$/.test(e)&&i.linkpath){this.warn("TAR_ENTRY_INVALID","linkpath forbidden",{header:i})}else{const e=this[h]=new p(i,this[b],this[x]);if(!this[q]){if(e.remain){const onend=()=>{if(!e.invalid){this[q]=true}};e.on("end",onend)}else{this[q]=true}}if(e.meta){if(e.size>this.maxMetaEntrySize){e.ignore=true;this[O]("ignoredEntry",e);this[m]="ignore";e.resume()}else if(e.size>0){this[w]="";e.on("data",(e=>this[w]+=e));this[m]="meta"}}else{this[b]=null;e.ignore=e.ignore||!this.filter(e.path,e);if(e.ignore){this[O]("ignoredEntry",e);this[m]=e.remain?"ignore":"header";e.resume()}else{if(e.remain){this[m]="body"}else{this[m]="header";e.end()}if(!this[g]){this[E].push(e);this[y]()}else{this[E].push(e)}}}}}}}[V](){d((()=>this.emit("close")))}[v](e){let t=true;if(!e){this[g]=null;t=false}else if(Array.isArray(e)){this.emit.apply(this,e)}else{this[g]=e;this.emit("entry",e);if(!e.emittedEnd){e.on("end",(e=>this[y]()));t=false}}return t}[y](){do{}while(this[v](this[E].shift()));if(!this[E].length){const e=this[g];const t=!e||e.flowing||e.size===e.remain;if(t){if(!this[k]){this.emit("drain")}}else{e.once("drain",(e=>this.emit("drain")))}}}[A](e,t){const i=this[h];const a=i.blockRemain;const r=a>=e.length&&t===0?e:e.slice(t,t+a);i.write(r);if(!i.blockRemain){this[m]="header";this[h]=null;i.end()}return r.length}[D](e,t){const i=this[h];const a=this[A](e,t);if(!this[h]){this[S](i)}return a}[O](e,t,i){if(!this[E].length&&!this[g]){this.emit(e,t,i)}else{this[E].push([e,t,i])}}[S](e){this[O]("meta",this[w]);switch(e.type){case"ExtendedHeader":case"OldExtendedHeader":this[b]=l.parse(this[w],this[b],false);break;case"GlobalExtendedHeader":this[x]=l.parse(this[w],this[x],true);break;case"NextFileHasLongPath":case"OldGnuLongPath":this[b]=this[b]||Object.create(null);this[b].path=this[w].replace(/\0.*/,"");break;case"NextFileHasLongLinkpath":this[b]=this[b]||Object.create(null);this[b].linkpath=this[w].replace(/\0.*/,"");break;default:throw new Error("unknown meta: "+e.type)}}abort(e){this[z]=true;this.emit("abort",e);this.warn("TAR_ABORT",e,{recoverable:false})}write(e){if(this[z]){return}if(this[P]===null&&e){if(this[N]){e=Buffer.concat([this[N],e]);this[N]=null}if(e.lengththis[R](e)));this[P].on("error",(e=>this.abort(e)));this[P].on("end",(e=>{this[C]=true;this[R]()}));this[k]=true;const i=this[P][t?"end":"write"](e);this[k]=false;return i}}this[k]=true;if(this[P]){this[P].write(e)}else{this[R](e)}this[k]=false;const t=this[E].length?false:this[g]?this[g].flowing:true;if(!t&&!this[E].length){this[g].once("drain",(e=>this.emit("drain")))}return t}[L](e){if(e&&!this[z]){this[N]=this[N]?Buffer.concat([this[N],e]):e}}[M](){if(this[C]&&!this[_]&&!this[z]&&!this[B]){this[_]=true;const e=this[h];if(e&&e.blockRemain){const t=this[N]?this[N].length:0;this.warn("TAR_BAD_ARCHIVE",`Truncated input (needed ${e.blockRemain} more bytes, only ${t} available)`,{entry:e});if(this[N]){e.write(this[N])}e.end()}this[O](j)}}[R](e){if(this[B]){this[L](e)}else if(!e&&!this[N]){this[M]()}else{this[B]=true;if(this[N]){this[L](e);const t=this[N];this[N]=null;this[T](t)}else{this[T](e)}while(this[N]&&this[N].length>=512&&!this[z]&&!this[H]){const e=this[N];this[N]=null;this[T](e)}this[B]=false}if(!this[N]||this[C]){this[M]()}}[T](e){let t=0;const i=e.length;while(t+512<=i&&!this[z]&&!this[H]){switch(this[m]){case"begin":case"header":this[I](e,t);t+=512;break;case"ignore":case"body":t+=this[A](e,t);break;case"meta":t+=this[D](e,t);break;default:throw new Error("invalid state: "+this[m])}}if(t{const a=i(9491);const r=i(7118);const n=i(8886);const{join:s}=i(1017);const o=process.env.TESTING_TAR_FAKE_PLATFORM||process.platform;const p=o==="win32";e.exports=()=>{const e=new Map;const t=new Map;const getDirs=e=>{const t=e.split("/").slice(0,-1).reduce(((e,t)=>{if(e.length){t=s(e[e.length-1],t)}e.push(t||"/");return e}),[]);return t};const i=new Set;const getQueues=i=>{const a=t.get(i);if(!a){throw new Error("function does not have any path reservations")}return{paths:a.paths.map((t=>e.get(t))),dirs:[...a.dirs].map((t=>e.get(t)))}};const check=e=>{const{paths:t,dirs:i}=getQueues(e);return t.every((t=>t[0]===e))&&i.every((t=>t[0]instanceof Set&&t[0].has(e)))};const run=e=>{if(i.has(e)||!check(e)){return false}i.add(e);e((()=>clear(e)));return true};const clear=r=>{if(!i.has(r)){return false}const{paths:n,dirs:s}=t.get(r);const o=new Set;n.forEach((t=>{const i=e.get(t);a.equal(i[0],r);if(i.length===1){e.delete(t)}else{i.shift();if(typeof i[0]==="function"){o.add(i[0])}else{i[0].forEach((e=>o.add(e)))}}}));s.forEach((t=>{const i=e.get(t);a(i[0]instanceof Set);if(i[0].size===1&&i.length===1){e.delete(t)}else if(i[0].size===1){i.shift();o.add(i[0])}else{i[0].delete(r)}}));i.delete(r);o.forEach((e=>run(e)));return true};const reserve=(i,a)=>{i=p?["win32 parallelization disabled"]:i.map((e=>r(n(s(e))).toLowerCase()));const o=new Set(i.map((e=>getDirs(e))).reduce(((e,t)=>e.concat(t))));t.set(a,{dirs:o,paths:i});i.forEach((t=>{const i=e.get(t);if(!i){e.set(t,[a])}else{i.push(a)}}));o.forEach((t=>{const i=e.get(t);if(!i){e.set(t,[new Set([a])])}else if(i[i.length-1]instanceof Set){i[i.length-1].add(a)}else{i.push(new Set([a]))}}));return run(a)};return{check:check,reserve:reserve}}},7996:(e,t,i)=>{"use strict";const a=i(6043);const r=i(1017);class Pax{constructor(e,t){this.atime=e.atime||null;this.charset=e.charset||null;this.comment=e.comment||null;this.ctime=e.ctime||null;this.gid=e.gid||null;this.gname=e.gname||null;this.linkpath=e.linkpath||null;this.mtime=e.mtime||null;this.path=e.path||null;this.size=e.size||null;this.uid=e.uid||null;this.uname=e.uname||null;this.dev=e.dev||null;this.ino=e.ino||null;this.nlink=e.nlink||null;this.global=t||false}encode(){const e=this.encodeBody();if(e===""){return null}const t=Buffer.byteLength(e);const i=512*Math.ceil(1+t/512);const n=Buffer.allocUnsafe(i);for(let e=0;e<512;e++){n[e]=0}new a({path:("PaxHeader/"+r.basename(this.path)).slice(0,99),mode:this.mode||420,uid:this.uid||null,gid:this.gid||null,size:t,mtime:this.mtime||null,type:this.global?"GlobalExtendedHeader":"ExtendedHeader",linkpath:"",uname:this.uname||"",gname:this.gname||"",devmaj:0,devmin:0,atime:this.atime||null,ctime:this.ctime||null}).encode(n);n.write(e,512,t,"utf8");for(let e=t+512;e=Math.pow(10,r)){r+=1}const n=r+a;return n+i}}Pax.parse=(e,t,i)=>new Pax(merge(parseKV(e),t),i);const merge=(e,t)=>t?Object.keys(e).reduce(((t,i)=>(t[i]=e[i],t)),t):e;const parseKV=e=>e.replace(/\n$/,"").split("\n").reduce(parseKVLine,Object.create(null));const parseKVLine=(e,t)=>{const i=parseInt(t,10);if(i!==Buffer.byteLength(t)+1){return e}t=t.slice((i+" ").length);const a=t.split("=");const r=a.shift().replace(/^SCHILY\.(dev|ino|nlink)/,"$1");if(!r){return e}const n=a.join("=");e[r]=/^([A-Z]+\.)?([mac]|birth|creation)time$/.test(r)?new Date(n*1e3):/^[0-9]+$/.test(n)?+n:n;return e};e.exports=Pax},8116:(e,t,i)=>{"use strict";const{Minipass:a}=i(6684);const r=i(6843);const n=Symbol("slurp");e.exports=class ReadEntry extends a{constructor(e,t,i){super();this.pause();this.extended=t;this.globalExtended=i;this.header=e;this.startBlockSize=512*Math.ceil(e.size/512);this.blockRemain=this.startBlockSize;this.remain=e.size;this.type=e.type;this.meta=false;this.ignore=false;switch(this.type){case"File":case"OldFile":case"Link":case"SymbolicLink":case"CharacterDevice":case"BlockDevice":case"Directory":case"FIFO":case"ContiguousFile":case"GNUDumpDir":break;case"NextFileHasLongLinkpath":case"NextFileHasLongPath":case"OldGnuLongPath":case"GlobalExtendedHeader":case"ExtendedHeader":case"OldExtendedHeader":this.meta=true;break;default:this.ignore=true}this.path=r(e.path);this.mode=e.mode;if(this.mode){this.mode=this.mode&4095}this.uid=e.uid;this.gid=e.gid;this.uname=e.uname;this.gname=e.gname;this.size=e.size;this.mtime=e.mtime;this.atime=e.atime;this.ctime=e.ctime;this.linkpath=r(e.linkpath);this.uname=e.uname;this.gname=e.gname;if(t){this[n](t)}if(i){this[n](i,true)}}write(e){const t=e.length;if(t>this.blockRemain){throw new Error("writing more to entry than is appropriate")}const i=this.remain;const a=this.blockRemain;this.remain=Math.max(0,i-t);this.blockRemain=Math.max(0,a-t);if(this.ignore){return true}if(i>=t){return super.write(e)}return super.write(e.slice(0,i))}[n](e,t){for(const i in e){if(e[i]!==null&&e[i]!==undefined&&!(t&&i==="path")){this[i]=i==="path"||i==="linkpath"?r(e[i]):e[i]}}}}},5923:(e,t,i)=>{"use strict";const a=i(5274);const r=i(7768);const n=i(7147);const s=i(7714);const o=i(1525);const p=i(1017);const l=i(6043);e.exports=(e,t,i)=>{const r=a(e);if(!r.file){throw new TypeError("file is required")}if(r.gzip){throw new TypeError("cannot append to compressed archives")}if(!t||!Array.isArray(t)||!t.length){throw new TypeError("no files or directories specified")}t=Array.from(t);return r.sync?replaceSync(r,t):replace(r,t,i)};const replaceSync=(e,t)=>{const i=new r.Sync(e);let a=true;let s;let o;try{try{s=n.openSync(e.file,"r+")}catch(t){if(t.code==="ENOENT"){s=n.openSync(e.file,"w+")}else{throw t}}const r=n.fstatSync(s);const p=Buffer.alloc(512);e:for(o=0;or.size){break}o+=i;if(e.mtimeCache){e.mtimeCache.set(t.path,t.mtime)}}a=false;streamSync(e,i,o,s,t)}finally{if(a){try{n.closeSync(s)}catch(e){}}}};const streamSync=(e,t,i,a,r)=>{const n=new s.WriteStreamSync(e.file,{fd:a,start:i});t.pipe(n);addFilesSync(t,r)};const replace=(e,t,i)=>{t=Array.from(t);const a=new r(e);const getPos=(t,i,a)=>{const cb=(e,i)=>{if(e){n.close(t,(t=>a(e)))}else{a(null,i)}};let r=0;if(i===0){return cb(null,0)}let s=0;const o=Buffer.alloc(512);const onread=(a,p)=>{if(a){return cb(a)}s+=p;if(s<512&&p){return n.read(t,o,s,o.length-s,r+s,onread)}if(r===0&&o[0]===31&&o[1]===139){return cb(new Error("cannot append to compressed archives"))}if(s<512){return cb(null,r)}const c=new l(o);if(!c.cksumValid){return cb(null,r)}const d=512*Math.ceil(c.size/512);if(r+d+512>i){return cb(null,r)}r+=d+512;if(r>=i){return cb(null,r)}if(e.mtimeCache){e.mtimeCache.set(c.path,c.mtime)}s=0;n.read(t,o,0,512,r,onread)};n.read(t,o,0,512,r,onread)};const o=new Promise(((i,r)=>{a.on("error",r);let o="r+";const onopen=(p,l)=>{if(p&&p.code==="ENOENT"&&o==="r+"){o="w+";return n.open(e.file,o,onopen)}if(p){return r(p)}n.fstat(l,((o,p)=>{if(o){return n.close(l,(()=>r(o)))}getPos(l,p.size,((n,o)=>{if(n){return r(n)}const p=new s.WriteStream(e.file,{fd:l,start:o});a.pipe(p);p.on("error",r);p.on("close",i);addFilesAsync(a,t)}))}))};n.open(e.file,o,onopen)}));return i?o.then(i,i):o};const addFilesSync=(e,t)=>{t.forEach((t=>{if(t.charAt(0)==="@"){o({file:p.resolve(e.cwd,t.slice(1)),sync:true,noResume:true,onentry:t=>e.add(t)})}else{e.add(t)}}));e.end()};const addFilesAsync=(e,t)=>{while(t.length){const i=t.shift();if(i.charAt(0)==="@"){return o({file:p.resolve(e.cwd,i.slice(1)),noResume:true,onentry:t=>e.add(t)}).then((i=>addFilesAsync(e,t)))}else{e.add(i)}}e.end()}},7111:(e,t,i)=>{const{isAbsolute:a,parse:r}=i(1017).win32;e.exports=e=>{let t="";let i=r(e);while(a(e)||i.root){const a=e.charAt(0)==="/"&&e.slice(0,4)!=="//?/"?"/":i.root;e=e.slice(a.length);t+=a;i=r(e)}return[t,e]}},8886:e=>{e.exports=e=>{let t=e.length-1;let i=-1;while(t>-1&&e.charAt(t)==="/"){i=t;t--}return i===-1?e:e.slice(0,i)}},4173:(e,t)=>{"use strict";t.name=new Map([["0","File"],["","OldFile"],["1","Link"],["2","SymbolicLink"],["3","CharacterDevice"],["4","BlockDevice"],["5","Directory"],["6","FIFO"],["7","ContiguousFile"],["g","GlobalExtendedHeader"],["x","ExtendedHeader"],["A","SolarisACL"],["D","GNUDumpDir"],["I","Inode"],["K","NextFileHasLongLinkpath"],["L","NextFileHasLongPath"],["M","ContinuationFile"],["N","OldGnuLongPath"],["S","SparseFile"],["V","TapeVolumeHeader"],["X","OldExtendedHeader"]]);t.code=new Map(Array.from(t.name).map((e=>[e[1],e[0]])))},7628:(e,t,i)=>{"use strict";const a=i(9491);const r=i(8917);const n=i(7147);const s=i(7714);const o=i(1017);const p=i(9624);const l=i(4808);const c=i(9587);const d=i(7111);const u=i(6843);const m=i(8886);const h=i(7118);const g=Symbol("onEntry");const y=Symbol("checkFs");const v=Symbol("checkFs2");const b=Symbol("pruneCache");const x=Symbol("isReusable");const w=Symbol("makeFs");const S=Symbol("file");const N=Symbol("directory");const E=Symbol("link");const C=Symbol("symlink");const _=Symbol("hardlink");const O=Symbol("unsupported");const P=Symbol("checkPath");const R=Symbol("mkdir");const T=Symbol("onError");const A=Symbol("pending");const D=Symbol("pend");const I=Symbol("unpend");const B=Symbol("ended");const L=Symbol("maybeClose");const M=Symbol("skip");const k=Symbol("doChown");const z=Symbol("uid");const j=Symbol("gid");const q=Symbol("checkedCwd");const U=i(6113);const H=i(1172);const V=process.env.TESTING_TAR_FAKE_PLATFORM||process.platform;const $=V==="win32";const unlinkFile=(e,t)=>{if(!$){return n.unlink(e,t)}const i=e+".DELETE."+U.randomBytes(16).toString("hex");n.rename(e,i,(e=>{if(e){return t(e)}n.unlink(i,t)}))};const unlinkFileSync=e=>{if(!$){return n.unlinkSync(e)}const t=e+".DELETE."+U.randomBytes(16).toString("hex");n.renameSync(e,t);n.unlinkSync(t)};const uint32=(e,t,i)=>e===e>>>0?e:t===t>>>0?t:i;const cacheKeyNormalize=e=>h(m(u(e))).toLowerCase();const pruneCache=(e,t)=>{t=cacheKeyNormalize(t);for(const i of e.keys()){const a=cacheKeyNormalize(i);if(a===t||a.indexOf(t+"/")===0){e.delete(i)}}};const dropCache=e=>{for(const t of e.keys()){e.delete(t)}};class Unpack extends r{constructor(e){if(!e){e={}}e.ondone=e=>{this[B]=true;this[L]()};super(e);this[q]=false;this.reservations=c();this.transform=typeof e.transform==="function"?e.transform:null;this.writable=true;this.readable=false;this[A]=0;this[B]=false;this.dirCache=e.dirCache||new Map;if(typeof e.uid==="number"||typeof e.gid==="number"){if(typeof e.uid!=="number"||typeof e.gid!=="number"){throw new TypeError("cannot set owner without number uid and gid")}if(e.preserveOwner){throw new TypeError("cannot preserve owner in archive and also set owner explicitly")}this.uid=e.uid;this.gid=e.gid;this.setOwner=true}else{this.uid=null;this.gid=null;this.setOwner=false}if(e.preserveOwner===undefined&&typeof e.uid!=="number"){this.preserveOwner=process.getuid&&process.getuid()===0}else{this.preserveOwner=!!e.preserveOwner}this.processUid=(this.preserveOwner||this.setOwner)&&process.getuid?process.getuid():null;this.processGid=(this.preserveOwner||this.setOwner)&&process.getgid?process.getgid():null;this.forceChown=e.forceChown===true;this.win32=!!e.win32||$;this.newer=!!e.newer;this.keep=!!e.keep;this.noMtime=!!e.noMtime;this.preservePaths=!!e.preservePaths;this.unlink=!!e.unlink;this.cwd=u(o.resolve(e.cwd||process.cwd()));this.strip=+e.strip||0;this.processUmask=e.noChmod?0:process.umask();this.umask=typeof e.umask==="number"?e.umask:this.processUmask;this.dmode=e.dmode||511&~this.umask;this.fmode=e.fmode||438&~this.umask;this.on("entry",(e=>this[g](e)))}warn(e,t,i={}){if(e==="TAR_BAD_ARCHIVE"||e==="TAR_ABORT"){i.recoverable=false}return super.warn(e,t,i)}[L](){if(this[B]&&this[A]===0){this.emit("prefinish");this.emit("finish");this.emit("end")}}[P](e){if(this.strip){const t=u(e.path).split("/");if(t.length=this.strip){e.linkpath=t.slice(this.strip).join("/")}else{return false}}}if(!this.preservePaths){const t=u(e.path);const i=t.split("/");if(i.includes("..")||$&&/^[a-z]:\.\.$/i.test(i[0])){this.warn("TAR_ENTRY_ERROR",`path contains '..'`,{entry:e,path:t});return false}const[a,r]=d(t);if(a){e.path=r;this.warn("TAR_ENTRY_INFO",`stripping ${a} from absolute path`,{entry:e,path:t})}}if(o.isAbsolute(e.path)){e.absolute=u(o.resolve(e.path))}else{e.absolute=u(o.resolve(this.cwd,e.path))}if(!this.preservePaths&&e.absolute.indexOf(this.cwd+"/")!==0&&e.absolute!==this.cwd){this.warn("TAR_ENTRY_ERROR","path escaped extraction target",{entry:e,path:u(e.path),resolvedPath:e.absolute,cwd:this.cwd});return false}if(e.absolute===this.cwd&&e.type!=="Directory"&&e.type!=="GNUDumpDir"){return false}if(this.win32){const{root:t}=o.win32.parse(e.absolute);e.absolute=t+l.encode(e.absolute.slice(t.length));const{root:i}=o.win32.parse(e.path);e.path=i+l.encode(e.path.slice(i.length))}return true}[g](e){if(!this[P](e)){return e.resume()}a.equal(typeof e.absolute,"string");switch(e.type){case"Directory":case"GNUDumpDir":if(e.mode){e.mode=e.mode|448}case"File":case"OldFile":case"ContiguousFile":case"Link":case"SymbolicLink":return this[y](e);case"CharacterDevice":case"BlockDevice":case"FIFO":default:return this[O](e)}}[T](e,t){if(e.name==="CwdError"){this.emit("error",e)}else{this.warn("TAR_ENTRY_ERROR",e,{entry:t});this[I]();t.resume()}}[R](e,t,i){p(u(e),{uid:this.uid,gid:this.gid,processUid:this.processUid,processGid:this.processGid,umask:this.processUmask,preserve:this.preservePaths,unlink:this.unlink,cache:this.dirCache,cwd:this.cwd,mode:t,noChmod:this.noChmod},i)}[k](e){return this.forceChown||this.preserveOwner&&(typeof e.uid==="number"&&e.uid!==this.processUid||typeof e.gid==="number"&&e.gid!==this.processGid)||(typeof this.uid==="number"&&this.uid!==this.processUid||typeof this.gid==="number"&&this.gid!==this.processGid)}[z](e){return uint32(this.uid,e.uid,this.processUid)}[j](e){return uint32(this.gid,e.gid,this.processGid)}[S](e,t){const i=e.mode&4095||this.fmode;const a=new s.WriteStream(e.absolute,{flags:H(e.size),mode:i,autoClose:false});a.on("error",(i=>{if(a.fd){n.close(a.fd,(()=>{}))}a.write=()=>true;this[T](i,e);t()}));let r=1;const done=i=>{if(i){if(a.fd){n.close(a.fd,(()=>{}))}this[T](i,e);t();return}if(--r===0){n.close(a.fd,(i=>{if(i){this[T](i,e)}else{this[I]()}t()}))}};a.on("finish",(t=>{const i=e.absolute;const s=a.fd;if(e.mtime&&!this.noMtime){r++;const t=e.atime||new Date;const a=e.mtime;n.futimes(s,t,a,(e=>e?n.utimes(i,t,a,(t=>done(t&&e))):done()))}if(this[k](e)){r++;const t=this[z](e);const a=this[j](e);n.fchown(s,t,a,(e=>e?n.chown(i,t,a,(t=>done(t&&e))):done()))}done()}));const o=this.transform?this.transform(e)||e:e;if(o!==e){o.on("error",(i=>{this[T](i,e);t()}));e.pipe(o)}o.pipe(a)}[N](e,t){const i=e.mode&4095||this.dmode;this[R](e.absolute,i,(i=>{if(i){this[T](i,e);t();return}let a=1;const done=i=>{if(--a===0){t();this[I]();e.resume()}};if(e.mtime&&!this.noMtime){a++;n.utimes(e.absolute,e.atime||new Date,e.mtime,done)}if(this[k](e)){a++;n.chown(e.absolute,this[z](e),this[j](e),done)}done()}))}[O](e){e.unsupported=true;this.warn("TAR_ENTRY_UNSUPPORTED",`unsupported entry type: ${e.type}`,{entry:e});e.resume()}[C](e,t){this[E](e,e.linkpath,"symlink",t)}[_](e,t){const i=u(o.resolve(this.cwd,e.linkpath));this[E](e,i,"link",t)}[D](){this[A]++}[I](){this[A]--;this[L]()}[M](e){this[I]();e.resume()}[x](e,t){return e.type==="File"&&!this.unlink&&t.isFile()&&t.nlink<=1&&!$}[y](e){this[D]();const t=[e.path];if(e.linkpath){t.push(e.linkpath)}this.reservations.reserve(t,(t=>this[v](e,t)))}[b](e){if(e.type==="SymbolicLink"){dropCache(this.dirCache)}else if(e.type!=="Directory"){pruneCache(this.dirCache,e.absolute)}}[v](e,t){this[b](e);const done=i=>{this[b](e);t(i)};const checkCwd=()=>{this[R](this.cwd,this.dmode,(t=>{if(t){this[T](t,e);done();return}this[q]=true;start()}))};const start=()=>{if(e.absolute!==this.cwd){const t=u(o.dirname(e.absolute));if(t!==this.cwd){return this[R](t,this.dmode,(t=>{if(t){this[T](t,e);done();return}afterMakeParent()}))}}afterMakeParent()};const afterMakeParent=()=>{n.lstat(e.absolute,((t,i)=>{if(i&&(this.keep||this.newer&&i.mtime>e.mtime)){this[M](e);done();return}if(t||this[x](e,i)){return this[w](null,e,done)}if(i.isDirectory()){if(e.type==="Directory"){const t=!this.noChmod&&e.mode&&(i.mode&4095)!==e.mode;const afterChmod=t=>this[w](t,e,done);if(!t){return afterChmod()}return n.chmod(e.absolute,e.mode,afterChmod)}if(e.absolute!==this.cwd){return n.rmdir(e.absolute,(t=>this[w](t,e,done)))}}if(e.absolute===this.cwd){return this[w](null,e,done)}unlinkFile(e.absolute,(t=>this[w](t,e,done)))}))};if(this[q]){start()}else{checkCwd()}}[w](e,t,i){if(e){this[T](e,t);i();return}switch(t.type){case"File":case"OldFile":case"ContiguousFile":return this[S](t,i);case"Link":return this[_](t,i);case"SymbolicLink":return this[C](t,i);case"Directory":case"GNUDumpDir":return this[N](t,i)}}[E](e,t,i,a){n[i](t,e.absolute,(t=>{if(t){this[T](t,e)}else{this[I]();e.resume()}a()}))}}const callSync=e=>{try{return[null,e()]}catch(e){return[e,null]}};class UnpackSync extends Unpack{[w](e,t){return super[w](e,t,(()=>{}))}[y](e){this[b](e);if(!this[q]){const t=this[R](this.cwd,this.dmode);if(t){return this[T](t,e)}this[q]=true}if(e.absolute!==this.cwd){const t=u(o.dirname(e.absolute));if(t!==this.cwd){const i=this[R](t,this.dmode);if(i){return this[T](i,e)}}}const[t,i]=callSync((()=>n.lstatSync(e.absolute)));if(i&&(this.keep||this.newer&&i.mtime>e.mtime)){return this[M](e)}if(t||this[x](e,i)){return this[w](null,e)}if(i.isDirectory()){if(e.type==="Directory"){const t=!this.noChmod&&e.mode&&(i.mode&4095)!==e.mode;const[a]=t?callSync((()=>{n.chmodSync(e.absolute,e.mode)})):[];return this[w](a,e)}const[t]=callSync((()=>n.rmdirSync(e.absolute)));this[w](t,e)}const[a]=e.absolute===this.cwd?[]:callSync((()=>unlinkFileSync(e.absolute)));this[w](a,e)}[S](e,t){const i=e.mode&4095||this.fmode;const oner=i=>{let r;try{n.closeSync(a)}catch(e){r=e}if(i||r){this[T](i||r,e)}t()};let a;try{a=n.openSync(e.absolute,H(e.size),i)}catch(e){return oner(e)}const r=this.transform?this.transform(e)||e:e;if(r!==e){r.on("error",(t=>this[T](t,e)));e.pipe(r)}r.on("data",(e=>{try{n.writeSync(a,e,0,e.length)}catch(e){oner(e)}}));r.on("end",(t=>{let i=null;if(e.mtime&&!this.noMtime){const t=e.atime||new Date;const r=e.mtime;try{n.futimesSync(a,t,r)}catch(a){try{n.utimesSync(e.absolute,t,r)}catch(e){i=a}}}if(this[k](e)){const t=this[z](e);const r=this[j](e);try{n.fchownSync(a,t,r)}catch(a){try{n.chownSync(e.absolute,t,r)}catch(e){i=i||a}}}oner(i)}))}[N](e,t){const i=e.mode&4095||this.dmode;const a=this[R](e.absolute,i);if(a){this[T](a,e);t();return}if(e.mtime&&!this.noMtime){try{n.utimesSync(e.absolute,e.atime||new Date,e.mtime)}catch(a){}}if(this[k](e)){try{n.chownSync(e.absolute,this[z](e),this[j](e))}catch(a){}}t();e.resume()}[R](e,t){try{return p.sync(u(e),{uid:this.uid,gid:this.gid,processUid:this.processUid,processGid:this.processGid,umask:this.processUmask,preserve:this.preservePaths,unlink:this.unlink,cache:this.dirCache,cwd:this.cwd,mode:t})}catch(e){return e}}[E](e,t,i,a){try{n[i+"Sync"](t,e.absolute);a();e.resume()}catch(t){return this[T](t,e)}}}Unpack.Sync=UnpackSync;e.exports=Unpack},407:(e,t,i)=>{"use strict";const a=i(5274);const r=i(5923);e.exports=(e,t,i)=>{const n=a(e);if(!n.file){throw new TypeError("file is required")}if(n.gzip){throw new TypeError("cannot append to compressed archives")}if(!t||!Array.isArray(t)||!t.length){throw new TypeError("no files or directories specified")}t=Array.from(t);mtimeFilter(n);return r(n,t,i)};const mtimeFilter=e=>{const t=e.filter;if(!e.mtimeCache){e.mtimeCache=new Map}e.filter=t?(i,a)=>t(i,a)&&!(e.mtimeCache.get(i)>a.mtime):(t,i)=>!(e.mtimeCache.get(t)>i.mtime)}},5899:e=>{"use strict";e.exports=e=>class extends e{warn(e,t,i={}){if(this.file){i.file=this.file}if(this.cwd){i.cwd=this.cwd}i.code=t instanceof Error&&t.code||e;i.tarCode=e;if(!this.strict&&i.recoverable!==false){if(t instanceof Error){i=Object.assign(t,i);t=t.message}this.emit("warn",i.tarCode,t,i)}else if(t instanceof Error){this.emit("error",Object.assign(t,i))}else{this.emit("error",Object.assign(new Error(`${e}: ${t}`),i))}}}},4808:e=>{"use strict";const t=["|","<",">","?",":"];const i=t.map((e=>String.fromCharCode(61440+e.charCodeAt(0))));const a=new Map(t.map(((e,t)=>[e,i[t]])));const r=new Map(i.map(((e,i)=>[e,t[i]])));e.exports={encode:e=>t.reduce(((e,t)=>e.split(t).join(a.get(t))),e),decode:e=>i.reduce(((e,t)=>e.split(t).join(r.get(t))),e)}},5450:(e,t,i)=>{"use strict";const{Minipass:a}=i(6684);const r=i(7996);const n=i(6043);const s=i(7147);const o=i(1017);const p=i(6843);const l=i(8886);const prefixPath=(e,t)=>{if(!t){return p(e)}e=p(e).replace(/^\.(\/|$)/,"");return l(t)+"/"+e};const c=16*1024*1024;const d=Symbol("process");const u=Symbol("file");const m=Symbol("directory");const h=Symbol("symlink");const g=Symbol("hardlink");const y=Symbol("header");const v=Symbol("read");const b=Symbol("lstat");const x=Symbol("onlstat");const w=Symbol("onread");const S=Symbol("onreadlink");const N=Symbol("openfile");const E=Symbol("onopenfile");const C=Symbol("close");const _=Symbol("mode");const O=Symbol("awaitDrain");const P=Symbol("ondrain");const R=Symbol("prefix");const T=Symbol("hadError");const A=i(5899);const D=i(4808);const I=i(7111);const B=i(8371);const L=A(class WriteEntry extends a{constructor(e,t){t=t||{};super(t);if(typeof e!=="string"){throw new TypeError("path is required")}this.path=p(e);this.portable=!!t.portable;this.myuid=process.getuid&&process.getuid()||0;this.myuser=process.env.USER||"";this.maxReadSize=t.maxReadSize||c;this.linkCache=t.linkCache||new Map;this.statCache=t.statCache||new Map;this.preservePaths=!!t.preservePaths;this.cwd=p(t.cwd||process.cwd());this.strict=!!t.strict;this.noPax=!!t.noPax;this.noMtime=!!t.noMtime;this.mtime=t.mtime||null;this.prefix=t.prefix?p(t.prefix):null;this.fd=null;this.blockLen=null;this.blockRemain=null;this.buf=null;this.offset=null;this.length=null;this.pos=null;this.remain=null;if(typeof t.onwarn==="function"){this.on("warn",t.onwarn)}let i=false;if(!this.preservePaths){const[e,t]=I(this.path);if(e){this.path=t;i=e}}this.win32=!!t.win32||process.platform==="win32";if(this.win32){this.path=D.decode(this.path.replace(/\\/g,"/"));e=e.replace(/\\/g,"/")}this.absolute=p(t.absolute||o.resolve(this.cwd,e));if(this.path===""){this.path="./"}if(i){this.warn("TAR_ENTRY_INFO",`stripping ${i} from absolute path`,{entry:this,path:i+this.path})}if(this.statCache.has(this.absolute)){this[x](this.statCache.get(this.absolute))}else{this[b]()}}emit(e,...t){if(e==="error"){this[T]=true}return super.emit(e,...t)}[b](){s.lstat(this.absolute,((e,t)=>{if(e){return this.emit("error",e)}this[x](t)}))}[x](e){this.statCache.set(this.absolute,e);this.stat=e;if(!e.isFile()){e.size=0}this.type=getType(e);this.emit("stat",e);this[d]()}[d](){switch(this.type){case"File":return this[u]();case"Directory":return this[m]();case"SymbolicLink":return this[h]();default:return this.end()}}[_](e){return B(e,this.type==="Directory",this.portable)}[R](e){return prefixPath(e,this.prefix)}[y](){if(this.type==="Directory"&&this.portable){this.noMtime=true}this.header=new n({path:this[R](this.path),linkpath:this.type==="Link"?this[R](this.linkpath):this.linkpath,mode:this[_](this.stat.mode),uid:this.portable?null:this.stat.uid,gid:this.portable?null:this.stat.gid,size:this.stat.size,mtime:this.noMtime?null:this.mtime||this.stat.mtime,type:this.type,uname:this.portable?null:this.stat.uid===this.myuid?this.myuser:"",atime:this.portable?null:this.stat.atime,ctime:this.portable?null:this.stat.ctime});if(this.header.encode()&&!this.noPax){super.write(new r({atime:this.portable?null:this.header.atime,ctime:this.portable?null:this.header.ctime,gid:this.portable?null:this.header.gid,mtime:this.noMtime?null:this.mtime||this.header.mtime,path:this[R](this.path),linkpath:this.type==="Link"?this[R](this.linkpath):this.linkpath,size:this.header.size,uid:this.portable?null:this.header.uid,uname:this.portable?null:this.header.uname,dev:this.portable?null:this.stat.dev,ino:this.portable?null:this.stat.ino,nlink:this.portable?null:this.stat.nlink}).encode())}super.write(this.header.block)}[m](){if(this.path.slice(-1)!=="/"){this.path+="/"}this.stat.size=0;this[y]();this.end()}[h](){s.readlink(this.absolute,((e,t)=>{if(e){return this.emit("error",e)}this[S](t)}))}[S](e){this.linkpath=p(e);this[y]();this.end()}[g](e){this.type="Link";this.linkpath=p(o.relative(this.cwd,e));this.stat.size=0;this[y]();this.end()}[u](){if(this.stat.nlink>1){const e=this.stat.dev+":"+this.stat.ino;if(this.linkCache.has(e)){const t=this.linkCache.get(e);if(t.indexOf(this.cwd)===0){return this[g](t)}}this.linkCache.set(e,this.absolute)}this[y]();if(this.stat.size===0){return this.end()}this[N]()}[N](){s.open(this.absolute,"r",((e,t)=>{if(e){return this.emit("error",e)}this[E](t)}))}[E](e){this.fd=e;if(this[T]){return this[C]()}this.blockLen=512*Math.ceil(this.stat.size/512);this.blockRemain=this.blockLen;const t=Math.min(this.blockLen,this.maxReadSize);this.buf=Buffer.allocUnsafe(t);this.offset=0;this.pos=0;this.remain=this.stat.size;this.length=this.buf.length;this[v]()}[v](){const{fd:e,buf:t,offset:i,length:a,pos:r}=this;s.read(e,t,i,a,r,((e,t)=>{if(e){return this[C]((()=>this.emit("error",e)))}this[w](t)}))}[C](e){s.close(this.fd,e)}[w](e){if(e<=0&&this.remain>0){const e=new Error("encountered unexpected EOF");e.path=this.absolute;e.syscall="read";e.code="EOF";return this[C]((()=>this.emit("error",e)))}if(e>this.remain){const e=new Error("did not encounter expected EOF");e.path=this.absolute;e.syscall="read";e.code="EOF";return this[C]((()=>this.emit("error",e)))}if(e===this.remain){for(let t=e;tthis[P]()))}else{this[P]()}}[O](e){this.once("drain",e)}write(e){if(this.blockRemaine?this.emit("error",e):this.end()))}if(this.offset>=this.length){this.buf=Buffer.allocUnsafe(Math.min(this.blockRemain,this.buf.length));this.offset=0}this.length=this.buf.length-this.offset;this[v]()}});class WriteEntrySync extends L{[b](){this[x](s.lstatSync(this.absolute))}[h](){this[S](s.readlinkSync(this.absolute))}[N](){this[E](s.openSync(this.absolute,"r"))}[v](){let e=true;try{const{fd:t,buf:i,offset:a,length:r,pos:n}=this;const o=s.readSync(t,i,a,r,n);this[w](o);e=false}finally{if(e){try{this[C]((()=>{}))}catch(e){}}}}[O](e){e()}[C](e){s.closeSync(this.fd);e()}}const M=A(class WriteEntryTar extends a{constructor(e,t){t=t||{};super(t);this.preservePaths=!!t.preservePaths;this.portable=!!t.portable;this.strict=!!t.strict;this.noPax=!!t.noPax;this.noMtime=!!t.noMtime;this.readEntry=e;this.type=e.type;if(this.type==="Directory"&&this.portable){this.noMtime=true}this.prefix=t.prefix||null;this.path=p(e.path);this.mode=this[_](e.mode);this.uid=this.portable?null:e.uid;this.gid=this.portable?null:e.gid;this.uname=this.portable?null:e.uname;this.gname=this.portable?null:e.gname;this.size=e.size;this.mtime=this.noMtime?null:t.mtime||e.mtime;this.atime=this.portable?null:e.atime;this.ctime=this.portable?null:e.ctime;this.linkpath=p(e.linkpath);if(typeof t.onwarn==="function"){this.on("warn",t.onwarn)}let i=false;if(!this.preservePaths){const[e,t]=I(this.path);if(e){this.path=t;i=e}}this.remain=e.size;this.blockRemain=e.startBlockSize;this.header=new n({path:this[R](this.path),linkpath:this.type==="Link"?this[R](this.linkpath):this.linkpath,mode:this.mode,uid:this.portable?null:this.uid,gid:this.portable?null:this.gid,size:this.size,mtime:this.noMtime?null:this.mtime,type:this.type,uname:this.portable?null:this.uname,atime:this.portable?null:this.atime,ctime:this.portable?null:this.ctime});if(i){this.warn("TAR_ENTRY_INFO",`stripping ${i} from absolute path`,{entry:this,path:i+this.path})}if(this.header.encode()&&!this.noPax){super.write(new r({atime:this.portable?null:this.atime,ctime:this.portable?null:this.ctime,gid:this.portable?null:this.gid,mtime:this.noMtime?null:this.mtime,path:this[R](this.path),linkpath:this.type==="Link"?this[R](this.linkpath):this.linkpath,size:this.size,uid:this.portable?null:this.uid,uname:this.portable?null:this.uname,dev:this.portable?null:this.readEntry.dev,ino:this.portable?null:this.readEntry.ino,nlink:this.portable?null:this.readEntry.nlink}).encode())}super.write(this.header.block);e.pipe(this)}[R](e){return prefixPath(e,this.prefix)}[_](e){return B(e,this.type==="Directory",this.portable)}write(e){const t=e.length;if(t>this.blockRemain){throw new Error("writing more to entry than is appropriate")}this.blockRemain-=t;return super.write(e)}end(){if(this.blockRemain){super.write(Buffer.alloc(this.blockRemain))}return super.end()}});L.Sync=WriteEntrySync;L.Tar=M;const getType=e=>e.isFile()?"File":e.isDirectory()?"Directory":e.isSymbolicLink()?"SymbolicLink":"Unsupported";e.exports=L},6684:(e,t,i)=>{"use strict";const a=typeof process==="object"&&process?process:{stdout:null,stderr:null};const r=i(2361);const n=i(2781);const s=i(1576);const o=s.StringDecoder;const p=Symbol("EOF");const l=Symbol("maybeEmitEnd");const c=Symbol("emittedEnd");const d=Symbol("emittingEnd");const u=Symbol("emittedError");const m=Symbol("closed");const h=Symbol("read");const g=Symbol("flush");const y=Symbol("flushChunk");const v=Symbol("encoding");const b=Symbol("decoder");const x=Symbol("flowing");const w=Symbol("paused");const S=Symbol("resume");const N=Symbol("buffer");const E=Symbol("pipes");const C=Symbol("bufferLength");const _=Symbol("bufferPush");const O=Symbol("bufferShift");const P=Symbol("objectMode");const R=Symbol("destroyed");const T=Symbol("error");const A=Symbol("emitData");const D=Symbol("emitEnd");const I=Symbol("emitEnd2");const B=Symbol("async");const L=Symbol("abort");const M=Symbol("aborted");const k=Symbol("signal");const defer=e=>Promise.resolve().then(e);const z=global._MP_NO_ITERATOR_SYMBOLS_!=="1";const j=z&&Symbol.asyncIterator||Symbol("asyncIterator not implemented");const q=z&&Symbol.iterator||Symbol("iterator not implemented");const isEndish=e=>e==="end"||e==="finish"||e==="prefinish";const isArrayBuffer=e=>e instanceof ArrayBuffer||typeof e==="object"&&e.constructor&&e.constructor.name==="ArrayBuffer"&&e.byteLength>=0;const isArrayBufferView=e=>!Buffer.isBuffer(e)&&ArrayBuffer.isView(e);class Pipe{constructor(e,t,i){this.src=e;this.dest=t;this.opts=i;this.ondrain=()=>e[S]();t.on("drain",this.ondrain)}unpipe(){this.dest.removeListener("drain",this.ondrain)}proxyErrors(){}end(){this.unpipe();if(this.opts.end)this.dest.end()}}class PipeProxyErrors extends Pipe{unpipe(){this.src.removeListener("error",this.proxyErrors);super.unpipe()}constructor(e,t,i){super(e,t,i);this.proxyErrors=e=>t.emit("error",e);e.on("error",this.proxyErrors)}}class Minipass extends n{constructor(e){super();this[x]=false;this[w]=false;this[E]=[];this[N]=[];this[P]=e&&e.objectMode||false;if(this[P])this[v]=null;else this[v]=e&&e.encoding||null;if(this[v]==="buffer")this[v]=null;this[B]=e&&!!e.async||false;this[b]=this[v]?new o(this[v]):null;this[p]=false;this[c]=false;this[d]=false;this[m]=false;this[u]=null;this.writable=true;this.readable=true;this[C]=0;this[R]=false;if(e&&e.debugExposeBuffer===true){Object.defineProperty(this,"buffer",{get:()=>this[N]})}if(e&&e.debugExposePipes===true){Object.defineProperty(this,"pipes",{get:()=>this[E]})}this[k]=e&&e.signal;this[M]=false;if(this[k]){this[k].addEventListener("abort",(()=>this[L]()));if(this[k].aborted){this[L]()}}}get bufferLength(){return this[C]}get encoding(){return this[v]}set encoding(e){if(this[P])throw new Error("cannot set encoding in objectMode");if(this[v]&&e!==this[v]&&(this[b]&&this[b].lastNeed||this[C]))throw new Error("cannot change encoding");if(this[v]!==e){this[b]=e?new o(e):null;if(this[N].length)this[N]=this[N].map((e=>this[b].write(e)))}this[v]=e}setEncoding(e){this.encoding=e}get objectMode(){return this[P]}set objectMode(e){this[P]=this[P]||!!e}get["async"](){return this[B]}set["async"](e){this[B]=this[B]||!!e}[L](){this[M]=true;this.emit("abort",this[k].reason);this.destroy(this[k].reason)}get aborted(){return this[M]}set aborted(e){}write(e,t,i){if(this[M])return false;if(this[p])throw new Error("write after end");if(this[R]){this.emit("error",Object.assign(new Error("Cannot call write after a stream was destroyed"),{code:"ERR_STREAM_DESTROYED"}));return true}if(typeof t==="function")i=t,t="utf8";if(!t)t="utf8";const a=this[B]?defer:e=>e();if(!this[P]&&!Buffer.isBuffer(e)){if(isArrayBufferView(e))e=Buffer.from(e.buffer,e.byteOffset,e.byteLength);else if(isArrayBuffer(e))e=Buffer.from(e);else if(typeof e!=="string")this.objectMode=true}if(this[P]){if(this.flowing&&this[C]!==0)this[g](true);if(this.flowing)this.emit("data",e);else this[_](e);if(this[C]!==0)this.emit("readable");if(i)a(i);return this.flowing}if(!e.length){if(this[C]!==0)this.emit("readable");if(i)a(i);return this.flowing}if(typeof e==="string"&&!(t===this[v]&&!this[b].lastNeed)){e=Buffer.from(e,t)}if(Buffer.isBuffer(e)&&this[v])e=this[b].write(e);if(this.flowing&&this[C]!==0)this[g](true);if(this.flowing)this.emit("data",e);else this[_](e);if(this[C]!==0)this.emit("readable");if(i)a(i);return this.flowing}read(e){if(this[R])return null;if(this[C]===0||e===0||e>this[C]){this[l]();return null}if(this[P])e=null;if(this[N].length>1&&!this[P]){if(this.encoding)this[N]=[this[N].join("")];else this[N]=[Buffer.concat(this[N],this[C])]}const t=this[h](e||null,this[N][0]);this[l]();return t}[h](e,t){if(e===t.length||e===null)this[O]();else{this[N][0]=t.slice(e);t=t.slice(0,e);this[C]-=e}this.emit("data",t);if(!this[N].length&&!this[p])this.emit("drain");return t}end(e,t,i){if(typeof e==="function")i=e,e=null;if(typeof t==="function")i=t,t="utf8";if(e)this.write(e,t);if(i)this.once("end",i);this[p]=true;this.writable=false;if(this.flowing||!this[w])this[l]();return this}[S](){if(this[R])return;this[w]=false;this[x]=true;this.emit("resume");if(this[N].length)this[g]();else if(this[p])this[l]();else this.emit("drain")}resume(){return this[S]()}pause(){this[x]=false;this[w]=true}get destroyed(){return this[R]}get flowing(){return this[x]}get paused(){return this[w]}[_](e){if(this[P])this[C]+=1;else this[C]+=e.length;this[N].push(e)}[O](){if(this[P])this[C]-=1;else this[C]-=this[N][0].length;return this[N].shift()}[g](e){do{}while(this[y](this[O]())&&this[N].length);if(!e&&!this[N].length&&!this[p])this.emit("drain")}[y](e){this.emit("data",e);return this.flowing}pipe(e,t){if(this[R])return;const i=this[c];t=t||{};if(e===a.stdout||e===a.stderr)t.end=false;else t.end=t.end!==false;t.proxyErrors=!!t.proxyErrors;if(i){if(t.end)e.end()}else{this[E].push(!t.proxyErrors?new Pipe(this,e,t):new PipeProxyErrors(this,e,t));if(this[B])defer((()=>this[S]()));else this[S]()}return e}unpipe(e){const t=this[E].find((t=>t.dest===e));if(t){this[E].splice(this[E].indexOf(t),1);t.unpipe()}}addListener(e,t){return this.on(e,t)}on(e,t){const i=super.on(e,t);if(e==="data"&&!this[E].length&&!this.flowing)this[S]();else if(e==="readable"&&this[C]!==0)super.emit("readable");else if(isEndish(e)&&this[c]){super.emit(e);this.removeAllListeners(e)}else if(e==="error"&&this[u]){if(this[B])defer((()=>t.call(this,this[u])));else t.call(this,this[u])}return i}get emittedEnd(){return this[c]}[l](){if(!this[d]&&!this[c]&&!this[R]&&this[N].length===0&&this[p]){this[d]=true;this.emit("end");this.emit("prefinish");this.emit("finish");if(this[m])this.emit("close");this[d]=false}}emit(e,t,...i){if(e!=="error"&&e!=="close"&&e!==R&&this[R])return;else if(e==="data"){return!this[P]&&!t?false:this[B]?defer((()=>this[A](t))):this[A](t)}else if(e==="end"){return this[D]()}else if(e==="close"){this[m]=true;if(!this[c]&&!this[R])return;const e=super.emit("close");this.removeAllListeners("close");return e}else if(e==="error"){this[u]=t;super.emit(T,t);const e=!this[k]||this.listeners("error").length?super.emit("error",t):false;this[l]();return e}else if(e==="resume"){const e=super.emit("resume");this[l]();return e}else if(e==="finish"||e==="prefinish"){const t=super.emit(e);this.removeAllListeners(e);return t}const a=super.emit(e,t,...i);this[l]();return a}[A](e){for(const t of this[E]){if(t.dest.write(e)===false)this.pause()}const t=super.emit("data",e);this[l]();return t}[D](){if(this[c])return;this[c]=true;this.readable=false;if(this[B])defer((()=>this[I]()));else this[I]()}[I](){if(this[b]){const e=this[b].end();if(e){for(const t of this[E]){t.dest.write(e)}super.emit("data",e)}}for(const e of this[E]){e.end()}const e=super.emit("end");this.removeAllListeners("end");return e}collect(){const e=[];if(!this[P])e.dataLength=0;const t=this.promise();this.on("data",(t=>{e.push(t);if(!this[P])e.dataLength+=t.length}));return t.then((()=>e))}concat(){return this[P]?Promise.reject(new Error("cannot concat in objectMode")):this.collect().then((e=>this[P]?Promise.reject(new Error("cannot concat in objectMode")):this[v]?e.join(""):Buffer.concat(e,e.dataLength)))}promise(){return new Promise(((e,t)=>{this.on(R,(()=>t(new Error("stream destroyed"))));this.on("error",(e=>t(e)));this.on("end",(()=>e()))}))}[j](){let e=false;const stop=()=>{this.pause();e=true;return Promise.resolve({done:true})};const next=()=>{if(e)return stop();const t=this.read();if(t!==null)return Promise.resolve({done:false,value:t});if(this[p])return stop();let i=null;let a=null;const onerr=e=>{this.removeListener("data",ondata);this.removeListener("end",onend);this.removeListener(R,ondestroy);stop();a(e)};const ondata=e=>{this.removeListener("error",onerr);this.removeListener("end",onend);this.removeListener(R,ondestroy);this.pause();i({value:e,done:!!this[p]})};const onend=()=>{this.removeListener("error",onerr);this.removeListener("data",ondata);this.removeListener(R,ondestroy);stop();i({done:true})};const ondestroy=()=>onerr(new Error("stream destroyed"));return new Promise(((e,t)=>{a=t;i=e;this.once(R,ondestroy);this.once("error",onerr);this.once("end",onend);this.once("data",ondata)}))};return{next:next,throw:stop,return:stop,[j](){return this}}}[q](){let e=false;const stop=()=>{this.pause();this.removeListener(T,stop);this.removeListener(R,stop);this.removeListener("end",stop);e=true;return{done:true}};const next=()=>{if(e)return stop();const t=this.read();return t===null?stop():{value:t}};this.once("end",stop);this.once(T,stop);this.once(R,stop);return{next:next,throw:stop,return:stop,[q](){return this}}}destroy(e){if(this[R]){if(e)this.emit("error",e);else this.emit(R);return this}this[R]=true;this[N].length=0;this[C]=0;if(typeof this.close==="function"&&!this[m])this.close();if(e)this.emit("error",e);else this.emit(R);return this}static isStream(e){return!!e&&(e instanceof Minipass||e instanceof n||e instanceof r&&(typeof e.pipe==="function"||typeof e.write==="function"&&typeof e.end==="function"))}}t.Minipass=Minipass},8065:(e,t,i)=>{"use strict";const{promisify:a}=i(3837);const r=i(8517);e.exports.fileSync=r.fileSync;const n=a(((e,t)=>r.file(e,((e,i,r,n)=>e?t(e):t(undefined,{path:i,fd:r,cleanup:a(n)})))));e.exports.file=async e=>n(e);e.exports.withFile=async function withFile(t,i){const{path:a,fd:r,cleanup:n}=await e.exports.file(i);try{return await t({path:a,fd:r})}finally{await n()}};e.exports.dirSync=r.dirSync;const s=a(((e,t)=>r.dir(e,((e,i,r)=>e?t(e):t(undefined,{path:i,cleanup:a(r)})))));e.exports.dir=async e=>s(e);e.exports.withDir=async function withDir(t,i){const{path:a,cleanup:r}=await e.exports.dir(i);try{return await t({path:a})}finally{await r()}};e.exports.tmpNameSync=r.tmpNameSync;e.exports.tmpName=a(r.tmpName);e.exports.tmpdir=r.tmpdir;e.exports.setGracefulCleanup=r.setGracefulCleanup},8517:(e,t,i)=>{ +/*! http://mths.be/fromcodepoint v0.1.0 by @mathias */if(!String.fromCodePoint){(function(){var e=String.fromCharCode;var t=Math.floor;var fromCodePoint=function(){var i=16384;var a=[];var r;var n;var s=-1;var o=arguments.length;if(!o){return""}var p="";while(++s1114111||t(l)!==l){throw RangeError("Invalid code point: "+l)}if(l<=65535){a.push(l)}else{l-=65536;r=(l>>10)+55296;n=l%1024+56320;a.push(r,n)}if(s+1===o||a.length>i){p+=e.apply(null,a);a.length=0}}return p};if(Object.defineProperty){Object.defineProperty(String,"fromCodePoint",{value:fromCodePoint,configurable:true,writable:true})}else{String.fromCodePoint=fromCodePoint}})()}})(false?0:t)},5911:(e,t)=>{t=e.exports=SemVer;var i;if(typeof process==="object"&&process.env&&process.env.NODE_DEBUG&&/\bsemver\b/i.test(process.env.NODE_DEBUG)){i=function(){var e=Array.prototype.slice.call(arguments,0);e.unshift("SEMVER");console.log.apply(console,e)}}else{i=function(){}}t.SEMVER_SPEC_VERSION="2.0.0";var a=256;var r=Number.MAX_SAFE_INTEGER||9007199254740991;var n=16;var s=a-6;var o=t.re=[];var p=t.safeRe=[];var l=t.src=[];var c=t.tokens={};var d=0;function tok(e){c[e]=d++}var u="[a-zA-Z0-9-]";var m=[["\\s",1],["\\d",a],[u,s]];function makeSafeRe(e){for(var t=0;t)?=?)";tok("XRANGEIDENTIFIERLOOSE");l[c.XRANGEIDENTIFIERLOOSE]=l[c.NUMERICIDENTIFIERLOOSE]+"|x|X|\\*";tok("XRANGEIDENTIFIER");l[c.XRANGEIDENTIFIER]=l[c.NUMERICIDENTIFIER]+"|x|X|\\*";tok("XRANGEPLAIN");l[c.XRANGEPLAIN]="[v=\\s]*("+l[c.XRANGEIDENTIFIER]+")"+"(?:\\.("+l[c.XRANGEIDENTIFIER]+")"+"(?:\\.("+l[c.XRANGEIDENTIFIER]+")"+"(?:"+l[c.PRERELEASE]+")?"+l[c.BUILD]+"?"+")?)?";tok("XRANGEPLAINLOOSE");l[c.XRANGEPLAINLOOSE]="[v=\\s]*("+l[c.XRANGEIDENTIFIERLOOSE]+")"+"(?:\\.("+l[c.XRANGEIDENTIFIERLOOSE]+")"+"(?:\\.("+l[c.XRANGEIDENTIFIERLOOSE]+")"+"(?:"+l[c.PRERELEASELOOSE]+")?"+l[c.BUILD]+"?"+")?)?";tok("XRANGE");l[c.XRANGE]="^"+l[c.GTLT]+"\\s*"+l[c.XRANGEPLAIN]+"$";tok("XRANGELOOSE");l[c.XRANGELOOSE]="^"+l[c.GTLT]+"\\s*"+l[c.XRANGEPLAINLOOSE]+"$";tok("COERCE");l[c.COERCE]="(^|[^\\d])"+"(\\d{1,"+n+"})"+"(?:\\.(\\d{1,"+n+"}))?"+"(?:\\.(\\d{1,"+n+"}))?"+"(?:$|[^\\d])";tok("COERCERTL");o[c.COERCERTL]=new RegExp(l[c.COERCE],"g");p[c.COERCERTL]=new RegExp(makeSafeRe(l[c.COERCE]),"g");tok("LONETILDE");l[c.LONETILDE]="(?:~>?)";tok("TILDETRIM");l[c.TILDETRIM]="(\\s*)"+l[c.LONETILDE]+"\\s+";o[c.TILDETRIM]=new RegExp(l[c.TILDETRIM],"g");p[c.TILDETRIM]=new RegExp(makeSafeRe(l[c.TILDETRIM]),"g");var h="$1~";tok("TILDE");l[c.TILDE]="^"+l[c.LONETILDE]+l[c.XRANGEPLAIN]+"$";tok("TILDELOOSE");l[c.TILDELOOSE]="^"+l[c.LONETILDE]+l[c.XRANGEPLAINLOOSE]+"$";tok("LONECARET");l[c.LONECARET]="(?:\\^)";tok("CARETTRIM");l[c.CARETTRIM]="(\\s*)"+l[c.LONECARET]+"\\s+";o[c.CARETTRIM]=new RegExp(l[c.CARETTRIM],"g");p[c.CARETTRIM]=new RegExp(makeSafeRe(l[c.CARETTRIM]),"g");var g="$1^";tok("CARET");l[c.CARET]="^"+l[c.LONECARET]+l[c.XRANGEPLAIN]+"$";tok("CARETLOOSE");l[c.CARETLOOSE]="^"+l[c.LONECARET]+l[c.XRANGEPLAINLOOSE]+"$";tok("COMPARATORLOOSE");l[c.COMPARATORLOOSE]="^"+l[c.GTLT]+"\\s*("+l[c.LOOSEPLAIN]+")$|^$";tok("COMPARATOR");l[c.COMPARATOR]="^"+l[c.GTLT]+"\\s*("+l[c.FULLPLAIN]+")$|^$";tok("COMPARATORTRIM");l[c.COMPARATORTRIM]="(\\s*)"+l[c.GTLT]+"\\s*("+l[c.LOOSEPLAIN]+"|"+l[c.XRANGEPLAIN]+")";o[c.COMPARATORTRIM]=new RegExp(l[c.COMPARATORTRIM],"g");p[c.COMPARATORTRIM]=new RegExp(makeSafeRe(l[c.COMPARATORTRIM]),"g");var y="$1$2$3";tok("HYPHENRANGE");l[c.HYPHENRANGE]="^\\s*("+l[c.XRANGEPLAIN]+")"+"\\s+-\\s+"+"("+l[c.XRANGEPLAIN]+")"+"\\s*$";tok("HYPHENRANGELOOSE");l[c.HYPHENRANGELOOSE]="^\\s*("+l[c.XRANGEPLAINLOOSE]+")"+"\\s+-\\s+"+"("+l[c.XRANGEPLAINLOOSE]+")"+"\\s*$";tok("STAR");l[c.STAR]="(<|>)?=?\\s*\\*";for(var v=0;va){return null}var i=t.loose?p[c.LOOSE]:p[c.FULL];if(!i.test(e)){return null}try{return new SemVer(e,t)}catch(e){return null}}t.valid=valid;function valid(e,t){var i=parse(e,t);return i?i.version:null}t.clean=clean;function clean(e,t){var i=parse(e.trim().replace(/^[=v]+/,""),t);return i?i.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>a){throw new TypeError("version is longer than "+a+" characters")}if(!(this instanceof SemVer)){return new SemVer(e,t)}i("SemVer",e,t);this.options=t;this.loose=!!t.loose;var n=e.trim().match(t.loose?p[c.LOOSE]:p[c.FULL]);if(!n){throw new TypeError("Invalid Version: "+e)}this.raw=e;this.major=+n[1];this.minor=+n[2];this.patch=+n[3];if(this.major>r||this.major<0){throw new TypeError("Invalid major version")}if(this.minor>r||this.minor<0){throw new TypeError("Invalid minor version")}if(this.patch>r||this.patch<0){throw new TypeError("Invalid patch version")}if(!n[4]){this.prerelease=[]}else{this.prerelease=n[4].split(".").map((function(e){if(/^[0-9]+$/.test(e)){var t=+e;if(t>=0&&t=0){if(typeof this.prerelease[i]==="number"){this.prerelease[i]++;i=-2}}if(i===-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,i,a){if(typeof i==="string"){a=i;i=undefined}try{return new SemVer(e,i).inc(t,a).version}catch(e){return null}}t.diff=diff;function diff(e,t){if(eq(e,t)){return null}else{var i=parse(e);var a=parse(t);var r="";if(i.prerelease.length||a.prerelease.length){r="pre";var n="prerelease"}for(var s in i){if(s==="major"||s==="minor"||s==="patch"){if(i[s]!==a[s]){return r+s}}}return n}}t.compareIdentifiers=compareIdentifiers;var b=/^[0-9]+$/;function compareIdentifiers(e,t){var i=b.test(e);var a=b.test(t);if(i&&a){e=+e;t=+t}return e===t?0:i&&!a?-1:a&&!i?1:e0}t.lt=lt;function lt(e,t,i){return compare(e,t,i)<0}t.eq=eq;function eq(e,t,i){return compare(e,t,i)===0}t.neq=neq;function neq(e,t,i){return compare(e,t,i)!==0}t.gte=gte;function gte(e,t,i){return compare(e,t,i)>=0}t.lte=lte;function lte(e,t,i){return compare(e,t,i)<=0}t.cmp=cmp;function cmp(e,t,i,a){switch(t){case"===":if(typeof e==="object")e=e.version;if(typeof i==="object")i=i.version;return e===i;case"!==":if(typeof e==="object")e=e.version;if(typeof i==="object")i=i.version;return e!==i;case"":case"=":case"==":return eq(e,i,a);case"!=":return neq(e,i,a);case">":return gt(e,i,a);case">=":return gte(e,i,a);case"<":return lt(e,i,a);case"<=":return lte(e,i,a);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)}e=e.trim().split(/\s+/).join(" ");i("comparator",e,t);this.options=t;this.loose=!!t.loose;this.parse(e);if(this.semver===x){this.value=""}else{this.value=this.operator+this.semver.version}i("comp",this)}var x={};Comparator.prototype.parse=function(e){var t=this.options.loose?p[c.COMPARATORLOOSE]:p[c.COMPARATOR];var i=e.match(t);if(!i){throw new TypeError("Invalid comparator: "+e)}this.operator=i[1]!==undefined?i[1]:"";if(this.operator==="="){this.operator=""}if(!i[2]){this.semver=x}else{this.semver=new SemVer(i[2],this.options.loose)}};Comparator.prototype.toString=function(){return this.value};Comparator.prototype.test=function(e){i("Comparator.test",e,this.options.loose);if(this.semver===x||e===x){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 i;if(this.operator===""){if(this.value===""){return true}i=new Range(e.value,t);return satisfies(this.value,i,t)}else if(e.operator===""){if(e.value===""){return true}i=new Range(this.value,t);return satisfies(e.semver,i,t)}var a=(this.operator===">="||this.operator===">")&&(e.operator===">="||e.operator===">");var r=(this.operator==="<="||this.operator==="<")&&(e.operator==="<="||e.operator==="<");var n=this.semver.version===e.semver.version;var s=(this.operator===">="||this.operator==="<=")&&(e.operator===">="||e.operator==="<=");var o=cmp(this.semver,"<",e.semver,t)&&((this.operator===">="||this.operator===">")&&(e.operator==="<="||e.operator==="<"));var p=cmp(this.semver,">",e.semver,t)&&((this.operator==="<="||this.operator==="<")&&(e.operator===">="||e.operator===">"));return a||r||n&&s||o||p};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.trim().split(/\s+/).join(" ");this.set=this.raw.split("||").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: "+this.raw)}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;var a=t?p[c.HYPHENRANGELOOSE]:p[c.HYPHENRANGE];e=e.replace(a,hyphenReplace);i("hyphen replace",e);e=e.replace(p[c.COMPARATORTRIM],y);i("comparator trim",e,p[c.COMPARATORTRIM]);e=e.replace(p[c.TILDETRIM],h);e=e.replace(p[c.CARETTRIM],g);e=e.split(/\s+/).join(" ");var r=t?p[c.COMPARATORLOOSE]:p[c.COMPARATOR];var n=e.split(" ").map((function(e){return parseComparator(e,this.options)}),this).join(" ").split(/\s+/);if(this.options.loose){n=n.filter((function(e){return!!e.match(r)}))}n=n.map((function(e){return new Comparator(e,this.options)}),this);return n};Range.prototype.intersects=function(e,t){if(!(e instanceof Range)){throw new TypeError("a Range is required")}return this.set.some((function(i){return isSatisfiable(i,t)&&e.set.some((function(e){return isSatisfiable(e,t)&&i.every((function(i){return e.every((function(e){return i.intersects(e,t)}))}))}))}))};function isSatisfiable(e,t){var i=true;var a=e.slice();var r=a.pop();while(i&&a.length){i=a.every((function(e){return r.intersects(e,t)}));r=a.pop()}return i}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){i("comp",e,t);e=replaceCarets(e,t);i("caret",e);e=replaceTildes(e,t);i("tildes",e);e=replaceXRanges(e,t);i("xrange",e);e=replaceStars(e,t);i("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 a=t.loose?p[c.TILDELOOSE]:p[c.TILDE];return e.replace(a,(function(t,a,r,n,s){i("tilde",e,t,a,r,n,s);var o;if(isX(a)){o=""}else if(isX(r)){o=">="+a+".0.0 <"+(+a+1)+".0.0"}else if(isX(n)){o=">="+a+"."+r+".0 <"+a+"."+(+r+1)+".0"}else if(s){i("replaceTilde pr",s);o=">="+a+"."+r+"."+n+"-"+s+" <"+a+"."+(+r+1)+".0"}else{o=">="+a+"."+r+"."+n+" <"+a+"."+(+r+1)+".0"}i("tilde return",o);return o}))}function replaceCarets(e,t){return e.trim().split(/\s+/).map((function(e){return replaceCaret(e,t)})).join(" ")}function replaceCaret(e,t){i("caret",e,t);var a=t.loose?p[c.CARETLOOSE]:p[c.CARET];return e.replace(a,(function(t,a,r,n,s){i("caret",e,t,a,r,n,s);var o;if(isX(a)){o=""}else if(isX(r)){o=">="+a+".0.0 <"+(+a+1)+".0.0"}else if(isX(n)){if(a==="0"){o=">="+a+"."+r+".0 <"+a+"."+(+r+1)+".0"}else{o=">="+a+"."+r+".0 <"+(+a+1)+".0.0"}}else if(s){i("replaceCaret pr",s);if(a==="0"){if(r==="0"){o=">="+a+"."+r+"."+n+"-"+s+" <"+a+"."+r+"."+(+n+1)}else{o=">="+a+"."+r+"."+n+"-"+s+" <"+a+"."+(+r+1)+".0"}}else{o=">="+a+"."+r+"."+n+"-"+s+" <"+(+a+1)+".0.0"}}else{i("no pr");if(a==="0"){if(r==="0"){o=">="+a+"."+r+"."+n+" <"+a+"."+r+"."+(+n+1)}else{o=">="+a+"."+r+"."+n+" <"+a+"."+(+r+1)+".0"}}else{o=">="+a+"."+r+"."+n+" <"+(+a+1)+".0.0"}}i("caret return",o);return o}))}function replaceXRanges(e,t){i("replaceXRanges",e,t);return e.split(/\s+/).map((function(e){return replaceXRange(e,t)})).join(" ")}function replaceXRange(e,t){e=e.trim();var a=t.loose?p[c.XRANGELOOSE]:p[c.XRANGE];return e.replace(a,(function(a,r,n,s,o,p){i("xRange",e,a,r,n,s,o,p);var l=isX(n);var c=l||isX(s);var d=c||isX(o);var u=d;if(r==="="&&u){r=""}p=t.includePrerelease?"-0":"";if(l){if(r===">"||r==="<"){a="<0.0.0-0"}else{a="*"}}else if(r&&u){if(c){s=0}o=0;if(r===">"){r=">=";if(c){n=+n+1;s=0;o=0}else{s=+s+1;o=0}}else if(r==="<="){r="<";if(c){n=+n+1}else{s=+s+1}}a=r+n+"."+s+"."+o+p}else if(c){a=">="+n+".0.0"+p+" <"+(+n+1)+".0.0"+p}else if(d){a=">="+n+"."+s+".0"+p+" <"+n+"."+(+s+1)+".0"+p}i("xRange return",a);return a}))}function replaceStars(e,t){i("replaceStars",e,t);return e.trim().replace(p[c.STAR],"")}function hyphenReplace(e,t,i,a,r,n,s,o,p,l,c,d,u){if(isX(i)){t=""}else if(isX(a)){t=">="+i+".0.0"}else if(isX(r)){t=">="+i+"."+a+".0"}else{t=">="+t}if(isX(p)){o=""}else if(isX(l)){o="<"+(+p+1)+".0.0"}else if(isX(c)){o="<"+p+"."+(+l+1)+".0"}else if(d){o="<="+p+"."+l+"."+c+"-"+d}else{o="<="+o}return(t+" "+o).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 n=e[r].semver;if(n.major===t.major&&n.minor===t.minor&&n.patch===t.patch){return true}}}return false}return true}t.satisfies=satisfies;function satisfies(e,t,i){try{t=new Range(t,i)}catch(e){return false}return t.test(e)}t.maxSatisfying=maxSatisfying;function maxSatisfying(e,t,i){var a=null;var r=null;try{var n=new Range(t,i)}catch(e){return null}e.forEach((function(e){if(n.test(e)){if(!a||r.compare(e)===-1){a=e;r=new SemVer(a,i)}}}));return a}t.minSatisfying=minSatisfying;function minSatisfying(e,t,i){var a=null;var r=null;try{var n=new Range(t,i)}catch(e){return null}e.forEach((function(e){if(n.test(e)){if(!a||r.compare(e)===1){a=e;r=new SemVer(a,i)}}}));return a}t.minVersion=minVersion;function minVersion(e,t){e=new Range(e,t);var i=new SemVer("0.0.0");if(e.test(i)){return i}i=new SemVer("0.0.0-0");if(e.test(i)){return i}i=null;for(var a=0;a":if(t.prerelease.length===0){t.patch++}else{t.prerelease.push(0)}t.raw=t.format();case"":case">=":if(!i||gt(i,t)){i=t}break;case"<":case"<=":break;default:throw new Error("Unexpected operation: "+e.operator)}}))}if(i&&e.test(i)){return i}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,i){return outside(e,t,"<",i)}t.gtr=gtr;function gtr(e,t,i){return outside(e,t,">",i)}t.outside=outside;function outside(e,t,i,a){e=new SemVer(e,a);t=new Range(t,a);var r,n,s,o,p;switch(i){case">":r=gt;n=lte;s=lt;o=">";p=">=";break;case"<":r=lt;n=gte;s=gt;o="<";p="<=";break;default:throw new TypeError('Must provide a hilo val of "<" or ">"')}if(satisfies(e,t,a)){return false}for(var l=0;l=0.0.0")}d=d||e;u=u||e;if(r(e.semver,d.semver,a)){d=e}else if(s(e.semver,u.semver,a)){u=e}}));if(d.operator===o||d.operator===p){return false}if((!u.operator||u.operator===o)&&n(e,u.semver)){return false}else if(u.operator===p&&s(e,u.semver)){return false}}return true}t.prerelease=prerelease;function prerelease(e,t){var i=parse(e,t);return i&&i.prerelease.length?i.prerelease:null}t.intersects=intersects;function intersects(e,t,i){e=new Range(e,i);t=new Range(t,i);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 i=null;if(!t.rtl){i=e.match(p[c.COERCE])}else{var a;while((a=p[c.COERCERTL].exec(e))&&(!i||i.index+i[0].length!==e.length)){if(!i||a.index+a[0].length!==i.index+i[0].length){i=a}p[c.COERCERTL].lastIndex=a.index+a[1].length+a[2].length}p[c.COERCERTL].lastIndex=-1}if(i===null){return null}return parse(i[2]+"."+(i[3]||"0")+"."+(i[4]||"0"),t)}},4674:(e,t,i)=>{"use strict";t.c=t.create=i(4016);t.r=t.replace=i(5923);t.t=t.list=i(1525);t.u=t.update=i(407);t.x=t.extract=i(5317);t.Pack=i(7768);t.Unpack=i(7628);t.Parse=i(8917);t.ReadEntry=i(8116);t.WriteEntry=i(5450);t.Header=i(6043);t.Pax=i(7996);t.types=i(4173)},4016:(e,t,i)=>{"use strict";const a=i(5274);const r=i(7768);const n=i(7714);const s=i(1525);const o=i(1017);e.exports=(e,t,i)=>{if(typeof t==="function"){i=t}if(Array.isArray(e)){t=e,e={}}if(!t||!Array.isArray(t)||!t.length){throw new TypeError("no files or directories specified")}t=Array.from(t);const r=a(e);if(r.sync&&typeof i==="function"){throw new TypeError("callback not supported for sync tar functions")}if(!r.file&&typeof i==="function"){throw new TypeError("callback only supported with file option")}return r.file&&r.sync?createFileSync(r,t):r.file?createFile(r,t,i):r.sync?createSync(r,t):create(r,t)};const createFileSync=(e,t)=>{const i=new r.Sync(e);const a=new n.WriteStreamSync(e.file,{mode:e.mode||438});i.pipe(a);addFilesSync(i,t)};const createFile=(e,t,i)=>{const a=new r(e);const s=new n.WriteStream(e.file,{mode:e.mode||438});a.pipe(s);const o=new Promise(((e,t)=>{s.on("error",t);s.on("close",e);a.on("error",t)}));addFilesAsync(a,t);return i?o.then(i,i):o};const addFilesSync=(e,t)=>{t.forEach((t=>{if(t.charAt(0)==="@"){s({file:o.resolve(e.cwd,t.slice(1)),sync:true,noResume:true,onentry:t=>e.add(t)})}else{e.add(t)}}));e.end()};const addFilesAsync=(e,t)=>{while(t.length){const i=t.shift();if(i.charAt(0)==="@"){return s({file:o.resolve(e.cwd,i.slice(1)),noResume:true,onentry:t=>e.add(t)}).then((i=>addFilesAsync(e,t)))}else{e.add(i)}}e.end()};const createSync=(e,t)=>{const i=new r.Sync(e);addFilesSync(i,t);return i};const create=(e,t)=>{const i=new r(e);addFilesAsync(i,t);return i}},5317:(e,t,i)=>{"use strict";const a=i(5274);const r=i(7628);const n=i(7147);const s=i(7714);const o=i(1017);const p=i(8886);e.exports=(e,t,i)=>{if(typeof e==="function"){i=e,t=null,e={}}else if(Array.isArray(e)){t=e,e={}}if(typeof t==="function"){i=t,t=null}if(!t){t=[]}else{t=Array.from(t)}const r=a(e);if(r.sync&&typeof i==="function"){throw new TypeError("callback not supported for sync tar functions")}if(!r.file&&typeof i==="function"){throw new TypeError("callback only supported with file option")}if(t.length){filesFilter(r,t)}return r.file&&r.sync?extractFileSync(r):r.file?extractFile(r,i):r.sync?extractSync(r):extract(r)};const filesFilter=(e,t)=>{const i=new Map(t.map((e=>[p(e),true])));const a=e.filter;const mapHas=(e,t)=>{const a=t||o.parse(e).root||".";const r=e===a?false:i.has(e)?i.get(e):mapHas(o.dirname(e),a);i.set(e,r);return r};e.filter=a?(e,t)=>a(e,t)&&mapHas(p(e)):e=>mapHas(p(e))};const extractFileSync=e=>{const t=new r.Sync(e);const i=e.file;const a=n.statSync(i);const o=e.maxReadSize||16*1024*1024;const p=new s.ReadStreamSync(i,{readSize:o,size:a.size});p.pipe(t)};const extractFile=(e,t)=>{const i=new r(e);const a=e.maxReadSize||16*1024*1024;const o=e.file;const p=new Promise(((e,t)=>{i.on("error",t);i.on("close",e);n.stat(o,((e,r)=>{if(e){t(e)}else{const e=new s.ReadStream(o,{readSize:a,size:r.size});e.on("error",t);e.pipe(i)}}))}));return t?p.then(t,t):p};const extractSync=e=>new r.Sync(e);const extract=e=>new r(e)},1172:(e,t,i)=>{const a=process.env.__FAKE_PLATFORM__||process.platform;const r=a==="win32";const n=global.__FAKE_TESTING_FS__||i(7147);const{O_CREAT:s,O_TRUNC:o,O_WRONLY:p,UV_FS_O_FILEMAP:l=0}=n.constants;const c=r&&!!l;const d=512*1024;const u=l|o|s|p;e.exports=!c?()=>"w":e=>e{"use strict";const a=i(4173);const r=i(1017).posix;const n=i(2370);const s=Symbol("slurp");const o=Symbol("type");class Header{constructor(e,t,i,a){this.cksumValid=false;this.needPax=false;this.nullBlock=false;this.block=null;this.path=null;this.mode=null;this.uid=null;this.gid=null;this.size=null;this.mtime=null;this.cksum=null;this[o]="0";this.linkpath=null;this.uname=null;this.gname=null;this.devmaj=0;this.devmin=0;this.atime=null;this.ctime=null;if(Buffer.isBuffer(e)){this.decode(e,t||0,i,a)}else if(e){this.set(e)}}decode(e,t,i,a){if(!t){t=0}if(!e||!(e.length>=t+512)){throw new Error("need 512 bytes for header")}this.path=decString(e,t,100);this.mode=decNumber(e,t+100,8);this.uid=decNumber(e,t+108,8);this.gid=decNumber(e,t+116,8);this.size=decNumber(e,t+124,12);this.mtime=decDate(e,t+136,12);this.cksum=decNumber(e,t+148,12);this[s](i);this[s](a,true);this[o]=decString(e,t+156,1);if(this[o]===""){this[o]="0"}if(this[o]==="0"&&this.path.slice(-1)==="/"){this[o]="5"}if(this[o]==="5"){this.size=0}this.linkpath=decString(e,t+157,100);if(e.slice(t+257,t+265).toString()==="ustar\x0000"){this.uname=decString(e,t+265,32);this.gname=decString(e,t+297,32);this.devmaj=decNumber(e,t+329,8);this.devmin=decNumber(e,t+337,8);if(e[t+475]!==0){const i=decString(e,t+345,155);this.path=i+"/"+this.path}else{const i=decString(e,t+345,130);if(i){this.path=i+"/"+this.path}this.atime=decDate(e,t+476,12);this.ctime=decDate(e,t+488,12)}}let r=8*32;for(let i=t;i=t+512)){throw new Error("need 512 bytes for header")}const i=this.ctime||this.atime?130:155;const a=splitPrefix(this.path||"",i);const r=a[0];const n=a[1];this.needPax=a[2];this.needPax=encString(e,t,100,r)||this.needPax;this.needPax=encNumber(e,t+100,8,this.mode)||this.needPax;this.needPax=encNumber(e,t+108,8,this.uid)||this.needPax;this.needPax=encNumber(e,t+116,8,this.gid)||this.needPax;this.needPax=encNumber(e,t+124,12,this.size)||this.needPax;this.needPax=encDate(e,t+136,12,this.mtime)||this.needPax;e[t+156]=this[o].charCodeAt(0);this.needPax=encString(e,t+157,100,this.linkpath)||this.needPax;e.write("ustar\x0000",t+257,8);this.needPax=encString(e,t+265,32,this.uname)||this.needPax;this.needPax=encString(e,t+297,32,this.gname)||this.needPax;this.needPax=encNumber(e,t+329,8,this.devmaj)||this.needPax;this.needPax=encNumber(e,t+337,8,this.devmin)||this.needPax;this.needPax=encString(e,t+345,i,n)||this.needPax;if(e[t+475]!==0){this.needPax=encString(e,t+345,155,n)||this.needPax}else{this.needPax=encString(e,t+345,130,n)||this.needPax;this.needPax=encDate(e,t+476,12,this.atime)||this.needPax;this.needPax=encDate(e,t+488,12,this.ctime)||this.needPax}let s=8*32;for(let i=t;i{const i=100;let a=e;let n="";let s;const o=r.parse(e).root||".";if(Buffer.byteLength(a)i&&Buffer.byteLength(n)<=t){s=[a.slice(0,i-1),n,true]}else{a=r.join(r.basename(n),a);n=r.dirname(n)}}while(n!==o&&!s);if(!s){s=[e.slice(0,i-1),"",true]}}return s};const decString=(e,t,i)=>e.slice(t,t+i).toString("utf8").replace(/\0.*/,"");const decDate=(e,t,i)=>numToDate(decNumber(e,t,i));const numToDate=e=>e===null?null:new Date(e*1e3);const decNumber=(e,t,i)=>e[t]&128?n.parse(e.slice(t,t+i)):decSmallNumber(e,t,i);const nanNull=e=>isNaN(e)?null:e;const decSmallNumber=(e,t,i)=>nanNull(parseInt(e.slice(t,t+i).toString("utf8").replace(/\0.*$/,"").trim(),8));const p={12:8589934591,8:2097151};const encNumber=(e,t,i,a)=>a===null?false:a>p[i]||a<0?(n.encode(a,e.slice(t,t+i)),true):(encSmallNumber(e,t,i,a),false);const encSmallNumber=(e,t,i,a)=>e.write(octalString(a,i),t,i,"ascii");const octalString=(e,t)=>padOctal(Math.floor(e).toString(8),t);const padOctal=(e,t)=>(e.length===t-1?e:new Array(t-e.length-1).join("0")+e+" ")+"\0";const encDate=(e,t,i,a)=>a===null?false:encNumber(e,t,i,a.getTime()/1e3);const l=new Array(156).join("\0");const encString=(e,t,i,a)=>a===null?false:(e.write(a+l,t,i,"utf8"),a.length!==Buffer.byteLength(a)||a.length>i);e.exports=Header},5274:e=>{"use strict";const t=new Map([["C","cwd"],["f","file"],["z","gzip"],["P","preservePaths"],["U","unlink"],["strip-components","strip"],["stripComponents","strip"],["keep-newer","newer"],["keepNewer","newer"],["keep-newer-files","newer"],["keepNewerFiles","newer"],["k","keep"],["keep-existing","keep"],["keepExisting","keep"],["m","noMtime"],["no-mtime","noMtime"],["p","preserveOwner"],["L","follow"],["h","follow"]]);e.exports=e=>e?Object.keys(e).map((i=>[t.has(i)?t.get(i):i,e[i]])).reduce(((e,t)=>(e[t[0]]=t[1],e)),Object.create(null)):{}},2370:e=>{"use strict";const encode=(e,t)=>{if(!Number.isSafeInteger(e)){throw Error("cannot encode number outside of javascript safe integer range")}else if(e<0){encodeNegative(e,t)}else{encodePositive(e,t)}return t};const encodePositive=(e,t)=>{t[0]=128;for(var i=t.length;i>1;i--){t[i-1]=e&255;e=Math.floor(e/256)}};const encodeNegative=(e,t)=>{t[0]=255;var i=false;e=e*-1;for(var a=t.length;a>1;a--){var r=e&255;e=Math.floor(e/256);if(i){t[a-1]=onesComp(r)}else if(r===0){t[a-1]=0}else{i=true;t[a-1]=twosComp(r)}}};const parse=e=>{const t=e[0];const i=t===128?pos(e.slice(1,e.length)):t===255?twos(e):null;if(i===null){throw Error("invalid base256 encoding")}if(!Number.isSafeInteger(i)){throw Error("parsed number outside of javascript safe integer range")}return i};const twos=e=>{var t=e.length;var i=0;var a=false;for(var r=t-1;r>-1;r--){var n=e[r];var s;if(a){s=onesComp(n)}else if(n===0){s=n}else{a=true;s=twosComp(n)}if(s!==0){i-=s*Math.pow(256,t-r-1)}}return i};const pos=e=>{var t=e.length;var i=0;for(var a=t-1;a>-1;a--){var r=e[a];if(r!==0){i+=r*Math.pow(256,t-a-1)}}return i};const onesComp=e=>(255^e)&255;const twosComp=e=>(255^e)+1&255;e.exports={encode:encode,parse:parse}},1525:(e,t,i)=>{"use strict";const a=i(5274);const r=i(8917);const n=i(7147);const s=i(7714);const o=i(1017);const p=i(8886);e.exports=(e,t,i)=>{if(typeof e==="function"){i=e,t=null,e={}}else if(Array.isArray(e)){t=e,e={}}if(typeof t==="function"){i=t,t=null}if(!t){t=[]}else{t=Array.from(t)}const r=a(e);if(r.sync&&typeof i==="function"){throw new TypeError("callback not supported for sync tar functions")}if(!r.file&&typeof i==="function"){throw new TypeError("callback only supported with file option")}if(t.length){filesFilter(r,t)}if(!r.noResume){onentryFunction(r)}return r.file&&r.sync?listFileSync(r):r.file?listFile(r,i):list(r)};const onentryFunction=e=>{const t=e.onentry;e.onentry=t?e=>{t(e);e.resume()}:e=>e.resume()};const filesFilter=(e,t)=>{const i=new Map(t.map((e=>[p(e),true])));const a=e.filter;const mapHas=(e,t)=>{const a=t||o.parse(e).root||".";const r=e===a?false:i.has(e)?i.get(e):mapHas(o.dirname(e),a);i.set(e,r);return r};e.filter=a?(e,t)=>a(e,t)&&mapHas(p(e)):e=>mapHas(p(e))};const listFileSync=e=>{const t=list(e);const i=e.file;let a=true;let r;try{const s=n.statSync(i);const o=e.maxReadSize||16*1024*1024;if(s.size{const i=new r(e);const a=e.maxReadSize||16*1024*1024;const o=e.file;const p=new Promise(((e,t)=>{i.on("error",t);i.on("end",e);n.stat(o,((e,r)=>{if(e){t(e)}else{const e=new s.ReadStream(o,{readSize:a,size:r.size});e.on("error",t);e.pipe(i)}}))}));return t?p.then(t,t):p};const list=e=>new r(e)},9624:(e,t,i)=>{"use strict";const a=i(6186);const r=i(7147);const n=i(1017);const s=i(9051);const o=i(6843);class SymlinkError extends Error{constructor(e,t){super("Cannot extract through symbolic link");this.path=t;this.symlink=e}get name(){return"SylinkError"}}class CwdError extends Error{constructor(e,t){super(t+": Cannot cd into '"+e+"'");this.path=e;this.code=t}get name(){return"CwdError"}}const cGet=(e,t)=>e.get(o(t));const cSet=(e,t,i)=>e.set(o(t),i);const checkCwd=(e,t)=>{r.stat(e,((i,a)=>{if(i||!a.isDirectory()){i=new CwdError(e,i&&i.code||"ENOTDIR")}t(i)}))};e.exports=(e,t,i)=>{e=o(e);const p=t.umask;const l=t.mode|448;const c=(l&p)!==0;const d=t.uid;const u=t.gid;const m=typeof d==="number"&&typeof u==="number"&&(d!==t.processUid||u!==t.processGid);const h=t.preserve;const g=t.unlink;const y=t.cache;const v=o(t.cwd);const done=(t,a)=>{if(t){i(t)}else{cSet(y,e,true);if(a&&m){s(a,d,u,(e=>done(e)))}else if(c){r.chmod(e,l,i)}else{i()}}};if(y&&cGet(y,e)===true){return done()}if(e===v){return checkCwd(e,done)}if(h){return a(e,{mode:l}).then((e=>done(null,e)),done)}const b=o(n.relative(v,e));const x=b.split("/");mkdir_(v,x,l,y,g,v,null,done)};const mkdir_=(e,t,i,a,s,p,l,c)=>{if(!t.length){return c(null,l)}const d=t.shift();const u=o(n.resolve(e+"/"+d));if(cGet(a,u)){return mkdir_(u,t,i,a,s,p,l,c)}r.mkdir(u,i,onmkdir(u,t,i,a,s,p,l,c))};const onmkdir=(e,t,i,a,n,s,p,l)=>c=>{if(c){r.lstat(e,((d,u)=>{if(d){d.path=d.path&&o(d.path);l(d)}else if(u.isDirectory()){mkdir_(e,t,i,a,n,s,p,l)}else if(n){r.unlink(e,(o=>{if(o){return l(o)}r.mkdir(e,i,onmkdir(e,t,i,a,n,s,p,l))}))}else if(u.isSymbolicLink()){return l(new SymlinkError(e,e+"/"+t.join("/")))}else{l(c)}}))}else{p=p||e;mkdir_(e,t,i,a,n,s,p,l)}};const checkCwdSync=e=>{let t=false;let i="ENOTDIR";try{t=r.statSync(e).isDirectory()}catch(e){i=e.code}finally{if(!t){throw new CwdError(e,i)}}};e.exports.sync=(e,t)=>{e=o(e);const i=t.umask;const p=t.mode|448;const l=(p&i)!==0;const c=t.uid;const d=t.gid;const u=typeof c==="number"&&typeof d==="number"&&(c!==t.processUid||d!==t.processGid);const m=t.preserve;const h=t.unlink;const g=t.cache;const y=o(t.cwd);const done=t=>{cSet(g,e,true);if(t&&u){s.sync(t,c,d)}if(l){r.chmodSync(e,p)}};if(g&&cGet(g,e)===true){return done()}if(e===y){checkCwdSync(y);return done()}if(m){return done(a.sync(e,p))}const v=o(n.relative(y,e));const b=v.split("/");let x=null;for(let e=b.shift(),t=y;e&&(t+="/"+e);e=b.shift()){t=o(n.resolve(t));if(cGet(g,t)){continue}try{r.mkdirSync(t,p);x=x||t;cSet(g,t,true)}catch(e){const i=r.lstatSync(t);if(i.isDirectory()){cSet(g,t,true);continue}else if(h){r.unlinkSync(t);r.mkdirSync(t,p);x=x||t;cSet(g,t,true);continue}else if(i.isSymbolicLink()){return new SymlinkError(t,t+"/"+b.join("/"))}}}return done(x)}},8371:e=>{"use strict";e.exports=(e,t,i)=>{e&=4095;if(i){e=(e|384)&~18}if(t){if(e&256){e|=64}if(e&32){e|=8}if(e&4){e|=1}}return e}},7118:e=>{const t=Object.create(null);const{hasOwnProperty:i}=Object.prototype;e.exports=e=>{if(!i.call(t,e)){t[e]=e.normalize("NFKD")}return t[e]}},6843:e=>{const t=process.env.TESTING_TAR_FAKE_PLATFORM||process.platform;e.exports=t!=="win32"?e=>e:e=>e&&e.replace(/\\/g,"/")},7768:(e,t,i)=>{"use strict";class PackJob{constructor(e,t){this.path=e||"./";this.absolute=t;this.entry=null;this.stat=null;this.readdir=null;this.pending=false;this.ignore=false;this.piped=false}}const{Minipass:a}=i(6684);const r=i(3486);const n=i(8116);const s=i(5450);const o=s.Sync;const p=s.Tar;const l=i(665);const c=Buffer.alloc(1024);const d=Symbol("onStat");const u=Symbol("ended");const m=Symbol("queue");const h=Symbol("current");const g=Symbol("process");const y=Symbol("processing");const v=Symbol("processJob");const b=Symbol("jobs");const x=Symbol("jobDone");const w=Symbol("addFSEntry");const S=Symbol("addTarEntry");const N=Symbol("stat");const E=Symbol("readdir");const C=Symbol("onreaddir");const _=Symbol("pipe");const O=Symbol("entry");const P=Symbol("entryOpt");const R=Symbol("writeEntryClass");const T=Symbol("write");const A=Symbol("ondrain");const D=i(7147);const I=i(1017);const B=i(5899);const L=i(6843);const M=B(class Pack extends a{constructor(e){super(e);e=e||Object.create(null);this.opt=e;this.file=e.file||"";this.cwd=e.cwd||process.cwd();this.maxReadSize=e.maxReadSize;this.preservePaths=!!e.preservePaths;this.strict=!!e.strict;this.noPax=!!e.noPax;this.prefix=L(e.prefix||"");this.linkCache=e.linkCache||new Map;this.statCache=e.statCache||new Map;this.readdirCache=e.readdirCache||new Map;this[R]=s;if(typeof e.onwarn==="function"){this.on("warn",e.onwarn)}this.portable=!!e.portable;this.zip=null;if(e.gzip){if(typeof e.gzip!=="object"){e.gzip={}}if(this.portable){e.gzip.portable=true}this.zip=new r.Gzip(e.gzip);this.zip.on("data",(e=>super.write(e)));this.zip.on("end",(e=>super.end()));this.zip.on("drain",(e=>this[A]()));this.on("resume",(e=>this.zip.resume()))}else{this.on("drain",this[A])}this.noDirRecurse=!!e.noDirRecurse;this.follow=!!e.follow;this.noMtime=!!e.noMtime;this.mtime=e.mtime||null;this.filter=typeof e.filter==="function"?e.filter:e=>true;this[m]=new l;this[b]=0;this.jobs=+e.jobs||4;this[y]=false;this[u]=false}[T](e){return super.write(e)}add(e){this.write(e);return this}end(e){if(e){this.write(e)}this[u]=true;this[g]();return this}write(e){if(this[u]){throw new Error("write after end")}if(e instanceof n){this[S](e)}else{this[w](e)}return this.flowing}[S](e){const t=L(I.resolve(this.cwd,e.path));if(!this.filter(e.path,e)){e.resume()}else{const i=new PackJob(e.path,t,false);i.entry=new p(e,this[P](i));i.entry.on("end",(e=>this[x](i)));this[b]+=1;this[m].push(i)}this[g]()}[w](e){const t=L(I.resolve(this.cwd,e));this[m].push(new PackJob(e,t));this[g]()}[N](e){e.pending=true;this[b]+=1;const t=this.follow?"stat":"lstat";D[t](e.absolute,((t,i)=>{e.pending=false;this[b]-=1;if(t){this.emit("error",t)}else{this[d](e,i)}}))}[d](e,t){this.statCache.set(e.absolute,t);e.stat=t;if(!this.filter(e.path,t)){e.ignore=true}this[g]()}[E](e){e.pending=true;this[b]+=1;D.readdir(e.absolute,((t,i)=>{e.pending=false;this[b]-=1;if(t){return this.emit("error",t)}this[C](e,i)}))}[C](e,t){this.readdirCache.set(e.absolute,t);e.readdir=t;this[g]()}[g](){if(this[y]){return}this[y]=true;for(let e=this[m].head;e!==null&&this[b]this.warn(e,t,i),noPax:this.noPax,cwd:this.cwd,absolute:e.absolute,preservePaths:this.preservePaths,maxReadSize:this.maxReadSize,strict:this.strict,portable:this.portable,linkCache:this.linkCache,statCache:this.statCache,noMtime:this.noMtime,mtime:this.mtime,prefix:this.prefix}}[O](e){this[b]+=1;try{return new this[R](e.path,this[P](e)).on("end",(()=>this[x](e))).on("error",(e=>this.emit("error",e)))}catch(e){this.emit("error",e)}}[A](){if(this[h]&&this[h].entry){this[h].entry.resume()}}[_](e){e.piped=true;if(e.readdir){e.readdir.forEach((t=>{const i=e.path;const a=i==="./"?"":i.replace(/\/*$/,"/");this[w](a+t)}))}const t=e.entry;const i=this.zip;if(i){t.on("data",(e=>{if(!i.write(e)){t.pause()}}))}else{t.on("data",(e=>{if(!super.write(e)){t.pause()}}))}}pause(){if(this.zip){this.zip.pause()}return super.pause()}});class PackSync extends M{constructor(e){super(e);this[R]=o}pause(){}resume(){}[N](e){const t=this.follow?"statSync":"lstatSync";this[d](e,D[t](e.absolute))}[E](e,t){this[C](e,D.readdirSync(e.absolute))}[_](e){const t=e.entry;const i=this.zip;if(e.readdir){e.readdir.forEach((t=>{const i=e.path;const a=i==="./"?"":i.replace(/\/*$/,"/");this[w](a+t)}))}if(i){t.on("data",(e=>{i.write(e)}))}else{t.on("data",(e=>{super[T](e)}))}}}M.Sync=PackSync;e.exports=M},8917:(e,t,i)=>{"use strict";const a=i(5899);const r=i(6043);const n=i(2361);const s=i(665);const o=1024*1024;const p=i(8116);const l=i(7996);const c=i(3486);const{nextTick:d}=i(7282);const u=Buffer.from([31,139]);const m=Symbol("state");const h=Symbol("writeEntry");const g=Symbol("readEntry");const y=Symbol("nextEntry");const v=Symbol("processEntry");const b=Symbol("extendedHeader");const x=Symbol("globalExtendedHeader");const w=Symbol("meta");const S=Symbol("emitMeta");const N=Symbol("buffer");const E=Symbol("queue");const C=Symbol("ended");const _=Symbol("emittedEnd");const O=Symbol("emit");const P=Symbol("unzip");const R=Symbol("consumeChunk");const T=Symbol("consumeChunkSub");const A=Symbol("consumeBody");const D=Symbol("consumeMeta");const I=Symbol("consumeHeader");const B=Symbol("consuming");const L=Symbol("bufferConcat");const M=Symbol("maybeEnd");const k=Symbol("writing");const z=Symbol("aborted");const j=Symbol("onDone");const q=Symbol("sawValidEntry");const U=Symbol("sawNullBlock");const H=Symbol("sawEOF");const V=Symbol("closeStream");const noop=e=>true;e.exports=a(class Parser extends n{constructor(e){e=e||{};super(e);this.file=e.file||"";this[q]=null;this.on(j,(e=>{if(this[m]==="begin"||this[q]===false){this.warn("TAR_BAD_ARCHIVE","Unrecognized archive format")}}));if(e.ondone){this.on(j,e.ondone)}else{this.on(j,(e=>{this.emit("prefinish");this.emit("finish");this.emit("end")}))}this.strict=!!e.strict;this.maxMetaEntrySize=e.maxMetaEntrySize||o;this.filter=typeof e.filter==="function"?e.filter:noop;this.writable=true;this.readable=false;this[E]=new s;this[N]=null;this[g]=null;this[h]=null;this[m]="begin";this[w]="";this[b]=null;this[x]=null;this[C]=false;this[P]=null;this[z]=false;this[U]=false;this[H]=false;this.on("end",(()=>this[V]()));if(typeof e.onwarn==="function"){this.on("warn",e.onwarn)}if(typeof e.onentry==="function"){this.on("entry",e.onentry)}}[I](e,t){if(this[q]===null){this[q]=false}let i;try{i=new r(e,t,this[b],this[x])}catch(e){return this.warn("TAR_ENTRY_INVALID",e)}if(i.nullBlock){if(this[U]){this[H]=true;if(this[m]==="begin"){this[m]="header"}this[O]("eof")}else{this[U]=true;this[O]("nullBlock")}}else{this[U]=false;if(!i.cksumValid){this.warn("TAR_ENTRY_INVALID","checksum failure",{header:i})}else if(!i.path){this.warn("TAR_ENTRY_INVALID","path is required",{header:i})}else{const e=i.type;if(/^(Symbolic)?Link$/.test(e)&&!i.linkpath){this.warn("TAR_ENTRY_INVALID","linkpath required",{header:i})}else if(!/^(Symbolic)?Link$/.test(e)&&i.linkpath){this.warn("TAR_ENTRY_INVALID","linkpath forbidden",{header:i})}else{const e=this[h]=new p(i,this[b],this[x]);if(!this[q]){if(e.remain){const onend=()=>{if(!e.invalid){this[q]=true}};e.on("end",onend)}else{this[q]=true}}if(e.meta){if(e.size>this.maxMetaEntrySize){e.ignore=true;this[O]("ignoredEntry",e);this[m]="ignore";e.resume()}else if(e.size>0){this[w]="";e.on("data",(e=>this[w]+=e));this[m]="meta"}}else{this[b]=null;e.ignore=e.ignore||!this.filter(e.path,e);if(e.ignore){this[O]("ignoredEntry",e);this[m]=e.remain?"ignore":"header";e.resume()}else{if(e.remain){this[m]="body"}else{this[m]="header";e.end()}if(!this[g]){this[E].push(e);this[y]()}else{this[E].push(e)}}}}}}}[V](){d((()=>this.emit("close")))}[v](e){let t=true;if(!e){this[g]=null;t=false}else if(Array.isArray(e)){this.emit.apply(this,e)}else{this[g]=e;this.emit("entry",e);if(!e.emittedEnd){e.on("end",(e=>this[y]()));t=false}}return t}[y](){do{}while(this[v](this[E].shift()));if(!this[E].length){const e=this[g];const t=!e||e.flowing||e.size===e.remain;if(t){if(!this[k]){this.emit("drain")}}else{e.once("drain",(e=>this.emit("drain")))}}}[A](e,t){const i=this[h];const a=i.blockRemain;const r=a>=e.length&&t===0?e:e.slice(t,t+a);i.write(r);if(!i.blockRemain){this[m]="header";this[h]=null;i.end()}return r.length}[D](e,t){const i=this[h];const a=this[A](e,t);if(!this[h]){this[S](i)}return a}[O](e,t,i){if(!this[E].length&&!this[g]){this.emit(e,t,i)}else{this[E].push([e,t,i])}}[S](e){this[O]("meta",this[w]);switch(e.type){case"ExtendedHeader":case"OldExtendedHeader":this[b]=l.parse(this[w],this[b],false);break;case"GlobalExtendedHeader":this[x]=l.parse(this[w],this[x],true);break;case"NextFileHasLongPath":case"OldGnuLongPath":this[b]=this[b]||Object.create(null);this[b].path=this[w].replace(/\0.*/,"");break;case"NextFileHasLongLinkpath":this[b]=this[b]||Object.create(null);this[b].linkpath=this[w].replace(/\0.*/,"");break;default:throw new Error("unknown meta: "+e.type)}}abort(e){this[z]=true;this.emit("abort",e);this.warn("TAR_ABORT",e,{recoverable:false})}write(e){if(this[z]){return}if(this[P]===null&&e){if(this[N]){e=Buffer.concat([this[N],e]);this[N]=null}if(e.lengththis[R](e)));this[P].on("error",(e=>this.abort(e)));this[P].on("end",(e=>{this[C]=true;this[R]()}));this[k]=true;const i=this[P][t?"end":"write"](e);this[k]=false;return i}}this[k]=true;if(this[P]){this[P].write(e)}else{this[R](e)}this[k]=false;const t=this[E].length?false:this[g]?this[g].flowing:true;if(!t&&!this[E].length){this[g].once("drain",(e=>this.emit("drain")))}return t}[L](e){if(e&&!this[z]){this[N]=this[N]?Buffer.concat([this[N],e]):e}}[M](){if(this[C]&&!this[_]&&!this[z]&&!this[B]){this[_]=true;const e=this[h];if(e&&e.blockRemain){const t=this[N]?this[N].length:0;this.warn("TAR_BAD_ARCHIVE",`Truncated input (needed ${e.blockRemain} more bytes, only ${t} available)`,{entry:e});if(this[N]){e.write(this[N])}e.end()}this[O](j)}}[R](e){if(this[B]){this[L](e)}else if(!e&&!this[N]){this[M]()}else{this[B]=true;if(this[N]){this[L](e);const t=this[N];this[N]=null;this[T](t)}else{this[T](e)}while(this[N]&&this[N].length>=512&&!this[z]&&!this[H]){const e=this[N];this[N]=null;this[T](e)}this[B]=false}if(!this[N]||this[C]){this[M]()}}[T](e){let t=0;const i=e.length;while(t+512<=i&&!this[z]&&!this[H]){switch(this[m]){case"begin":case"header":this[I](e,t);t+=512;break;case"ignore":case"body":t+=this[A](e,t);break;case"meta":t+=this[D](e,t);break;default:throw new Error("invalid state: "+this[m])}}if(t{const a=i(9491);const r=i(7118);const n=i(8886);const{join:s}=i(1017);const o=process.env.TESTING_TAR_FAKE_PLATFORM||process.platform;const p=o==="win32";e.exports=()=>{const e=new Map;const t=new Map;const getDirs=e=>{const t=e.split("/").slice(0,-1).reduce(((e,t)=>{if(e.length){t=s(e[e.length-1],t)}e.push(t||"/");return e}),[]);return t};const i=new Set;const getQueues=i=>{const a=t.get(i);if(!a){throw new Error("function does not have any path reservations")}return{paths:a.paths.map((t=>e.get(t))),dirs:[...a.dirs].map((t=>e.get(t)))}};const check=e=>{const{paths:t,dirs:i}=getQueues(e);return t.every((t=>t[0]===e))&&i.every((t=>t[0]instanceof Set&&t[0].has(e)))};const run=e=>{if(i.has(e)||!check(e)){return false}i.add(e);e((()=>clear(e)));return true};const clear=r=>{if(!i.has(r)){return false}const{paths:n,dirs:s}=t.get(r);const o=new Set;n.forEach((t=>{const i=e.get(t);a.equal(i[0],r);if(i.length===1){e.delete(t)}else{i.shift();if(typeof i[0]==="function"){o.add(i[0])}else{i[0].forEach((e=>o.add(e)))}}}));s.forEach((t=>{const i=e.get(t);a(i[0]instanceof Set);if(i[0].size===1&&i.length===1){e.delete(t)}else if(i[0].size===1){i.shift();o.add(i[0])}else{i[0].delete(r)}}));i.delete(r);o.forEach((e=>run(e)));return true};const reserve=(i,a)=>{i=p?["win32 parallelization disabled"]:i.map((e=>r(n(s(e))).toLowerCase()));const o=new Set(i.map((e=>getDirs(e))).reduce(((e,t)=>e.concat(t))));t.set(a,{dirs:o,paths:i});i.forEach((t=>{const i=e.get(t);if(!i){e.set(t,[a])}else{i.push(a)}}));o.forEach((t=>{const i=e.get(t);if(!i){e.set(t,[new Set([a])])}else if(i[i.length-1]instanceof Set){i[i.length-1].add(a)}else{i.push(new Set([a]))}}));return run(a)};return{check:check,reserve:reserve}}},7996:(e,t,i)=>{"use strict";const a=i(6043);const r=i(1017);class Pax{constructor(e,t){this.atime=e.atime||null;this.charset=e.charset||null;this.comment=e.comment||null;this.ctime=e.ctime||null;this.gid=e.gid||null;this.gname=e.gname||null;this.linkpath=e.linkpath||null;this.mtime=e.mtime||null;this.path=e.path||null;this.size=e.size||null;this.uid=e.uid||null;this.uname=e.uname||null;this.dev=e.dev||null;this.ino=e.ino||null;this.nlink=e.nlink||null;this.global=t||false}encode(){const e=this.encodeBody();if(e===""){return null}const t=Buffer.byteLength(e);const i=512*Math.ceil(1+t/512);const n=Buffer.allocUnsafe(i);for(let e=0;e<512;e++){n[e]=0}new a({path:("PaxHeader/"+r.basename(this.path)).slice(0,99),mode:this.mode||420,uid:this.uid||null,gid:this.gid||null,size:t,mtime:this.mtime||null,type:this.global?"GlobalExtendedHeader":"ExtendedHeader",linkpath:"",uname:this.uname||"",gname:this.gname||"",devmaj:0,devmin:0,atime:this.atime||null,ctime:this.ctime||null}).encode(n);n.write(e,512,t,"utf8");for(let e=t+512;e=Math.pow(10,r)){r+=1}const n=r+a;return n+i}}Pax.parse=(e,t,i)=>new Pax(merge(parseKV(e),t),i);const merge=(e,t)=>t?Object.keys(e).reduce(((t,i)=>(t[i]=e[i],t)),t):e;const parseKV=e=>e.replace(/\n$/,"").split("\n").reduce(parseKVLine,Object.create(null));const parseKVLine=(e,t)=>{const i=parseInt(t,10);if(i!==Buffer.byteLength(t)+1){return e}t=t.slice((i+" ").length);const a=t.split("=");const r=a.shift().replace(/^SCHILY\.(dev|ino|nlink)/,"$1");if(!r){return e}const n=a.join("=");e[r]=/^([A-Z]+\.)?([mac]|birth|creation)time$/.test(r)?new Date(n*1e3):/^[0-9]+$/.test(n)?+n:n;return e};e.exports=Pax},8116:(e,t,i)=>{"use strict";const{Minipass:a}=i(6684);const r=i(6843);const n=Symbol("slurp");e.exports=class ReadEntry extends a{constructor(e,t,i){super();this.pause();this.extended=t;this.globalExtended=i;this.header=e;this.startBlockSize=512*Math.ceil(e.size/512);this.blockRemain=this.startBlockSize;this.remain=e.size;this.type=e.type;this.meta=false;this.ignore=false;switch(this.type){case"File":case"OldFile":case"Link":case"SymbolicLink":case"CharacterDevice":case"BlockDevice":case"Directory":case"FIFO":case"ContiguousFile":case"GNUDumpDir":break;case"NextFileHasLongLinkpath":case"NextFileHasLongPath":case"OldGnuLongPath":case"GlobalExtendedHeader":case"ExtendedHeader":case"OldExtendedHeader":this.meta=true;break;default:this.ignore=true}this.path=r(e.path);this.mode=e.mode;if(this.mode){this.mode=this.mode&4095}this.uid=e.uid;this.gid=e.gid;this.uname=e.uname;this.gname=e.gname;this.size=e.size;this.mtime=e.mtime;this.atime=e.atime;this.ctime=e.ctime;this.linkpath=r(e.linkpath);this.uname=e.uname;this.gname=e.gname;if(t){this[n](t)}if(i){this[n](i,true)}}write(e){const t=e.length;if(t>this.blockRemain){throw new Error("writing more to entry than is appropriate")}const i=this.remain;const a=this.blockRemain;this.remain=Math.max(0,i-t);this.blockRemain=Math.max(0,a-t);if(this.ignore){return true}if(i>=t){return super.write(e)}return super.write(e.slice(0,i))}[n](e,t){for(const i in e){if(e[i]!==null&&e[i]!==undefined&&!(t&&i==="path")){this[i]=i==="path"||i==="linkpath"?r(e[i]):e[i]}}}}},5923:(e,t,i)=>{"use strict";const a=i(5274);const r=i(7768);const n=i(7147);const s=i(7714);const o=i(1525);const p=i(1017);const l=i(6043);e.exports=(e,t,i)=>{const r=a(e);if(!r.file){throw new TypeError("file is required")}if(r.gzip){throw new TypeError("cannot append to compressed archives")}if(!t||!Array.isArray(t)||!t.length){throw new TypeError("no files or directories specified")}t=Array.from(t);return r.sync?replaceSync(r,t):replace(r,t,i)};const replaceSync=(e,t)=>{const i=new r.Sync(e);let a=true;let s;let o;try{try{s=n.openSync(e.file,"r+")}catch(t){if(t.code==="ENOENT"){s=n.openSync(e.file,"w+")}else{throw t}}const r=n.fstatSync(s);const p=Buffer.alloc(512);e:for(o=0;or.size){break}o+=i;if(e.mtimeCache){e.mtimeCache.set(t.path,t.mtime)}}a=false;streamSync(e,i,o,s,t)}finally{if(a){try{n.closeSync(s)}catch(e){}}}};const streamSync=(e,t,i,a,r)=>{const n=new s.WriteStreamSync(e.file,{fd:a,start:i});t.pipe(n);addFilesSync(t,r)};const replace=(e,t,i)=>{t=Array.from(t);const a=new r(e);const getPos=(t,i,a)=>{const cb=(e,i)=>{if(e){n.close(t,(t=>a(e)))}else{a(null,i)}};let r=0;if(i===0){return cb(null,0)}let s=0;const o=Buffer.alloc(512);const onread=(a,p)=>{if(a){return cb(a)}s+=p;if(s<512&&p){return n.read(t,o,s,o.length-s,r+s,onread)}if(r===0&&o[0]===31&&o[1]===139){return cb(new Error("cannot append to compressed archives"))}if(s<512){return cb(null,r)}const c=new l(o);if(!c.cksumValid){return cb(null,r)}const d=512*Math.ceil(c.size/512);if(r+d+512>i){return cb(null,r)}r+=d+512;if(r>=i){return cb(null,r)}if(e.mtimeCache){e.mtimeCache.set(c.path,c.mtime)}s=0;n.read(t,o,0,512,r,onread)};n.read(t,o,0,512,r,onread)};const o=new Promise(((i,r)=>{a.on("error",r);let o="r+";const onopen=(p,l)=>{if(p&&p.code==="ENOENT"&&o==="r+"){o="w+";return n.open(e.file,o,onopen)}if(p){return r(p)}n.fstat(l,((o,p)=>{if(o){return n.close(l,(()=>r(o)))}getPos(l,p.size,((n,o)=>{if(n){return r(n)}const p=new s.WriteStream(e.file,{fd:l,start:o});a.pipe(p);p.on("error",r);p.on("close",i);addFilesAsync(a,t)}))}))};n.open(e.file,o,onopen)}));return i?o.then(i,i):o};const addFilesSync=(e,t)=>{t.forEach((t=>{if(t.charAt(0)==="@"){o({file:p.resolve(e.cwd,t.slice(1)),sync:true,noResume:true,onentry:t=>e.add(t)})}else{e.add(t)}}));e.end()};const addFilesAsync=(e,t)=>{while(t.length){const i=t.shift();if(i.charAt(0)==="@"){return o({file:p.resolve(e.cwd,i.slice(1)),noResume:true,onentry:t=>e.add(t)}).then((i=>addFilesAsync(e,t)))}else{e.add(i)}}e.end()}},7111:(e,t,i)=>{const{isAbsolute:a,parse:r}=i(1017).win32;e.exports=e=>{let t="";let i=r(e);while(a(e)||i.root){const a=e.charAt(0)==="/"&&e.slice(0,4)!=="//?/"?"/":i.root;e=e.slice(a.length);t+=a;i=r(e)}return[t,e]}},8886:e=>{e.exports=e=>{let t=e.length-1;let i=-1;while(t>-1&&e.charAt(t)==="/"){i=t;t--}return i===-1?e:e.slice(0,i)}},4173:(e,t)=>{"use strict";t.name=new Map([["0","File"],["","OldFile"],["1","Link"],["2","SymbolicLink"],["3","CharacterDevice"],["4","BlockDevice"],["5","Directory"],["6","FIFO"],["7","ContiguousFile"],["g","GlobalExtendedHeader"],["x","ExtendedHeader"],["A","SolarisACL"],["D","GNUDumpDir"],["I","Inode"],["K","NextFileHasLongLinkpath"],["L","NextFileHasLongPath"],["M","ContinuationFile"],["N","OldGnuLongPath"],["S","SparseFile"],["V","TapeVolumeHeader"],["X","OldExtendedHeader"]]);t.code=new Map(Array.from(t.name).map((e=>[e[1],e[0]])))},7628:(e,t,i)=>{"use strict";const a=i(9491);const r=i(8917);const n=i(7147);const s=i(7714);const o=i(1017);const p=i(9624);const l=i(4808);const c=i(9587);const d=i(7111);const u=i(6843);const m=i(8886);const h=i(7118);const g=Symbol("onEntry");const y=Symbol("checkFs");const v=Symbol("checkFs2");const b=Symbol("pruneCache");const x=Symbol("isReusable");const w=Symbol("makeFs");const S=Symbol("file");const N=Symbol("directory");const E=Symbol("link");const C=Symbol("symlink");const _=Symbol("hardlink");const O=Symbol("unsupported");const P=Symbol("checkPath");const R=Symbol("mkdir");const T=Symbol("onError");const A=Symbol("pending");const D=Symbol("pend");const I=Symbol("unpend");const B=Symbol("ended");const L=Symbol("maybeClose");const M=Symbol("skip");const k=Symbol("doChown");const z=Symbol("uid");const j=Symbol("gid");const q=Symbol("checkedCwd");const U=i(6113);const H=i(1172);const V=process.env.TESTING_TAR_FAKE_PLATFORM||process.platform;const $=V==="win32";const unlinkFile=(e,t)=>{if(!$){return n.unlink(e,t)}const i=e+".DELETE."+U.randomBytes(16).toString("hex");n.rename(e,i,(e=>{if(e){return t(e)}n.unlink(i,t)}))};const unlinkFileSync=e=>{if(!$){return n.unlinkSync(e)}const t=e+".DELETE."+U.randomBytes(16).toString("hex");n.renameSync(e,t);n.unlinkSync(t)};const uint32=(e,t,i)=>e===e>>>0?e:t===t>>>0?t:i;const cacheKeyNormalize=e=>h(m(u(e))).toLowerCase();const pruneCache=(e,t)=>{t=cacheKeyNormalize(t);for(const i of e.keys()){const a=cacheKeyNormalize(i);if(a===t||a.indexOf(t+"/")===0){e.delete(i)}}};const dropCache=e=>{for(const t of e.keys()){e.delete(t)}};class Unpack extends r{constructor(e){if(!e){e={}}e.ondone=e=>{this[B]=true;this[L]()};super(e);this[q]=false;this.reservations=c();this.transform=typeof e.transform==="function"?e.transform:null;this.writable=true;this.readable=false;this[A]=0;this[B]=false;this.dirCache=e.dirCache||new Map;if(typeof e.uid==="number"||typeof e.gid==="number"){if(typeof e.uid!=="number"||typeof e.gid!=="number"){throw new TypeError("cannot set owner without number uid and gid")}if(e.preserveOwner){throw new TypeError("cannot preserve owner in archive and also set owner explicitly")}this.uid=e.uid;this.gid=e.gid;this.setOwner=true}else{this.uid=null;this.gid=null;this.setOwner=false}if(e.preserveOwner===undefined&&typeof e.uid!=="number"){this.preserveOwner=process.getuid&&process.getuid()===0}else{this.preserveOwner=!!e.preserveOwner}this.processUid=(this.preserveOwner||this.setOwner)&&process.getuid?process.getuid():null;this.processGid=(this.preserveOwner||this.setOwner)&&process.getgid?process.getgid():null;this.forceChown=e.forceChown===true;this.win32=!!e.win32||$;this.newer=!!e.newer;this.keep=!!e.keep;this.noMtime=!!e.noMtime;this.preservePaths=!!e.preservePaths;this.unlink=!!e.unlink;this.cwd=u(o.resolve(e.cwd||process.cwd()));this.strip=+e.strip||0;this.processUmask=e.noChmod?0:process.umask();this.umask=typeof e.umask==="number"?e.umask:this.processUmask;this.dmode=e.dmode||511&~this.umask;this.fmode=e.fmode||438&~this.umask;this.on("entry",(e=>this[g](e)))}warn(e,t,i={}){if(e==="TAR_BAD_ARCHIVE"||e==="TAR_ABORT"){i.recoverable=false}return super.warn(e,t,i)}[L](){if(this[B]&&this[A]===0){this.emit("prefinish");this.emit("finish");this.emit("end")}}[P](e){if(this.strip){const t=u(e.path).split("/");if(t.length=this.strip){e.linkpath=t.slice(this.strip).join("/")}else{return false}}}if(!this.preservePaths){const t=u(e.path);const i=t.split("/");if(i.includes("..")||$&&/^[a-z]:\.\.$/i.test(i[0])){this.warn("TAR_ENTRY_ERROR",`path contains '..'`,{entry:e,path:t});return false}const[a,r]=d(t);if(a){e.path=r;this.warn("TAR_ENTRY_INFO",`stripping ${a} from absolute path`,{entry:e,path:t})}}if(o.isAbsolute(e.path)){e.absolute=u(o.resolve(e.path))}else{e.absolute=u(o.resolve(this.cwd,e.path))}if(!this.preservePaths&&e.absolute.indexOf(this.cwd+"/")!==0&&e.absolute!==this.cwd){this.warn("TAR_ENTRY_ERROR","path escaped extraction target",{entry:e,path:u(e.path),resolvedPath:e.absolute,cwd:this.cwd});return false}if(e.absolute===this.cwd&&e.type!=="Directory"&&e.type!=="GNUDumpDir"){return false}if(this.win32){const{root:t}=o.win32.parse(e.absolute);e.absolute=t+l.encode(e.absolute.slice(t.length));const{root:i}=o.win32.parse(e.path);e.path=i+l.encode(e.path.slice(i.length))}return true}[g](e){if(!this[P](e)){return e.resume()}a.equal(typeof e.absolute,"string");switch(e.type){case"Directory":case"GNUDumpDir":if(e.mode){e.mode=e.mode|448}case"File":case"OldFile":case"ContiguousFile":case"Link":case"SymbolicLink":return this[y](e);case"CharacterDevice":case"BlockDevice":case"FIFO":default:return this[O](e)}}[T](e,t){if(e.name==="CwdError"){this.emit("error",e)}else{this.warn("TAR_ENTRY_ERROR",e,{entry:t});this[I]();t.resume()}}[R](e,t,i){p(u(e),{uid:this.uid,gid:this.gid,processUid:this.processUid,processGid:this.processGid,umask:this.processUmask,preserve:this.preservePaths,unlink:this.unlink,cache:this.dirCache,cwd:this.cwd,mode:t,noChmod:this.noChmod},i)}[k](e){return this.forceChown||this.preserveOwner&&(typeof e.uid==="number"&&e.uid!==this.processUid||typeof e.gid==="number"&&e.gid!==this.processGid)||(typeof this.uid==="number"&&this.uid!==this.processUid||typeof this.gid==="number"&&this.gid!==this.processGid)}[z](e){return uint32(this.uid,e.uid,this.processUid)}[j](e){return uint32(this.gid,e.gid,this.processGid)}[S](e,t){const i=e.mode&4095||this.fmode;const a=new s.WriteStream(e.absolute,{flags:H(e.size),mode:i,autoClose:false});a.on("error",(i=>{if(a.fd){n.close(a.fd,(()=>{}))}a.write=()=>true;this[T](i,e);t()}));let r=1;const done=i=>{if(i){if(a.fd){n.close(a.fd,(()=>{}))}this[T](i,e);t();return}if(--r===0){n.close(a.fd,(i=>{if(i){this[T](i,e)}else{this[I]()}t()}))}};a.on("finish",(t=>{const i=e.absolute;const s=a.fd;if(e.mtime&&!this.noMtime){r++;const t=e.atime||new Date;const a=e.mtime;n.futimes(s,t,a,(e=>e?n.utimes(i,t,a,(t=>done(t&&e))):done()))}if(this[k](e)){r++;const t=this[z](e);const a=this[j](e);n.fchown(s,t,a,(e=>e?n.chown(i,t,a,(t=>done(t&&e))):done()))}done()}));const o=this.transform?this.transform(e)||e:e;if(o!==e){o.on("error",(i=>{this[T](i,e);t()}));e.pipe(o)}o.pipe(a)}[N](e,t){const i=e.mode&4095||this.dmode;this[R](e.absolute,i,(i=>{if(i){this[T](i,e);t();return}let a=1;const done=i=>{if(--a===0){t();this[I]();e.resume()}};if(e.mtime&&!this.noMtime){a++;n.utimes(e.absolute,e.atime||new Date,e.mtime,done)}if(this[k](e)){a++;n.chown(e.absolute,this[z](e),this[j](e),done)}done()}))}[O](e){e.unsupported=true;this.warn("TAR_ENTRY_UNSUPPORTED",`unsupported entry type: ${e.type}`,{entry:e});e.resume()}[C](e,t){this[E](e,e.linkpath,"symlink",t)}[_](e,t){const i=u(o.resolve(this.cwd,e.linkpath));this[E](e,i,"link",t)}[D](){this[A]++}[I](){this[A]--;this[L]()}[M](e){this[I]();e.resume()}[x](e,t){return e.type==="File"&&!this.unlink&&t.isFile()&&t.nlink<=1&&!$}[y](e){this[D]();const t=[e.path];if(e.linkpath){t.push(e.linkpath)}this.reservations.reserve(t,(t=>this[v](e,t)))}[b](e){if(e.type==="SymbolicLink"){dropCache(this.dirCache)}else if(e.type!=="Directory"){pruneCache(this.dirCache,e.absolute)}}[v](e,t){this[b](e);const done=i=>{this[b](e);t(i)};const checkCwd=()=>{this[R](this.cwd,this.dmode,(t=>{if(t){this[T](t,e);done();return}this[q]=true;start()}))};const start=()=>{if(e.absolute!==this.cwd){const t=u(o.dirname(e.absolute));if(t!==this.cwd){return this[R](t,this.dmode,(t=>{if(t){this[T](t,e);done();return}afterMakeParent()}))}}afterMakeParent()};const afterMakeParent=()=>{n.lstat(e.absolute,((t,i)=>{if(i&&(this.keep||this.newer&&i.mtime>e.mtime)){this[M](e);done();return}if(t||this[x](e,i)){return this[w](null,e,done)}if(i.isDirectory()){if(e.type==="Directory"){const t=!this.noChmod&&e.mode&&(i.mode&4095)!==e.mode;const afterChmod=t=>this[w](t,e,done);if(!t){return afterChmod()}return n.chmod(e.absolute,e.mode,afterChmod)}if(e.absolute!==this.cwd){return n.rmdir(e.absolute,(t=>this[w](t,e,done)))}}if(e.absolute===this.cwd){return this[w](null,e,done)}unlinkFile(e.absolute,(t=>this[w](t,e,done)))}))};if(this[q]){start()}else{checkCwd()}}[w](e,t,i){if(e){this[T](e,t);i();return}switch(t.type){case"File":case"OldFile":case"ContiguousFile":return this[S](t,i);case"Link":return this[_](t,i);case"SymbolicLink":return this[C](t,i);case"Directory":case"GNUDumpDir":return this[N](t,i)}}[E](e,t,i,a){n[i](t,e.absolute,(t=>{if(t){this[T](t,e)}else{this[I]();e.resume()}a()}))}}const callSync=e=>{try{return[null,e()]}catch(e){return[e,null]}};class UnpackSync extends Unpack{[w](e,t){return super[w](e,t,(()=>{}))}[y](e){this[b](e);if(!this[q]){const t=this[R](this.cwd,this.dmode);if(t){return this[T](t,e)}this[q]=true}if(e.absolute!==this.cwd){const t=u(o.dirname(e.absolute));if(t!==this.cwd){const i=this[R](t,this.dmode);if(i){return this[T](i,e)}}}const[t,i]=callSync((()=>n.lstatSync(e.absolute)));if(i&&(this.keep||this.newer&&i.mtime>e.mtime)){return this[M](e)}if(t||this[x](e,i)){return this[w](null,e)}if(i.isDirectory()){if(e.type==="Directory"){const t=!this.noChmod&&e.mode&&(i.mode&4095)!==e.mode;const[a]=t?callSync((()=>{n.chmodSync(e.absolute,e.mode)})):[];return this[w](a,e)}const[t]=callSync((()=>n.rmdirSync(e.absolute)));this[w](t,e)}const[a]=e.absolute===this.cwd?[]:callSync((()=>unlinkFileSync(e.absolute)));this[w](a,e)}[S](e,t){const i=e.mode&4095||this.fmode;const oner=i=>{let r;try{n.closeSync(a)}catch(e){r=e}if(i||r){this[T](i||r,e)}t()};let a;try{a=n.openSync(e.absolute,H(e.size),i)}catch(e){return oner(e)}const r=this.transform?this.transform(e)||e:e;if(r!==e){r.on("error",(t=>this[T](t,e)));e.pipe(r)}r.on("data",(e=>{try{n.writeSync(a,e,0,e.length)}catch(e){oner(e)}}));r.on("end",(t=>{let i=null;if(e.mtime&&!this.noMtime){const t=e.atime||new Date;const r=e.mtime;try{n.futimesSync(a,t,r)}catch(a){try{n.utimesSync(e.absolute,t,r)}catch(e){i=a}}}if(this[k](e)){const t=this[z](e);const r=this[j](e);try{n.fchownSync(a,t,r)}catch(a){try{n.chownSync(e.absolute,t,r)}catch(e){i=i||a}}}oner(i)}))}[N](e,t){const i=e.mode&4095||this.dmode;const a=this[R](e.absolute,i);if(a){this[T](a,e);t();return}if(e.mtime&&!this.noMtime){try{n.utimesSync(e.absolute,e.atime||new Date,e.mtime)}catch(a){}}if(this[k](e)){try{n.chownSync(e.absolute,this[z](e),this[j](e))}catch(a){}}t();e.resume()}[R](e,t){try{return p.sync(u(e),{uid:this.uid,gid:this.gid,processUid:this.processUid,processGid:this.processGid,umask:this.processUmask,preserve:this.preservePaths,unlink:this.unlink,cache:this.dirCache,cwd:this.cwd,mode:t})}catch(e){return e}}[E](e,t,i,a){try{n[i+"Sync"](t,e.absolute);a();e.resume()}catch(t){return this[T](t,e)}}}Unpack.Sync=UnpackSync;e.exports=Unpack},407:(e,t,i)=>{"use strict";const a=i(5274);const r=i(5923);e.exports=(e,t,i)=>{const n=a(e);if(!n.file){throw new TypeError("file is required")}if(n.gzip){throw new TypeError("cannot append to compressed archives")}if(!t||!Array.isArray(t)||!t.length){throw new TypeError("no files or directories specified")}t=Array.from(t);mtimeFilter(n);return r(n,t,i)};const mtimeFilter=e=>{const t=e.filter;if(!e.mtimeCache){e.mtimeCache=new Map}e.filter=t?(i,a)=>t(i,a)&&!(e.mtimeCache.get(i)>a.mtime):(t,i)=>!(e.mtimeCache.get(t)>i.mtime)}},5899:e=>{"use strict";e.exports=e=>class extends e{warn(e,t,i={}){if(this.file){i.file=this.file}if(this.cwd){i.cwd=this.cwd}i.code=t instanceof Error&&t.code||e;i.tarCode=e;if(!this.strict&&i.recoverable!==false){if(t instanceof Error){i=Object.assign(t,i);t=t.message}this.emit("warn",i.tarCode,t,i)}else if(t instanceof Error){this.emit("error",Object.assign(t,i))}else{this.emit("error",Object.assign(new Error(`${e}: ${t}`),i))}}}},4808:e=>{"use strict";const t=["|","<",">","?",":"];const i=t.map((e=>String.fromCharCode(61440+e.charCodeAt(0))));const a=new Map(t.map(((e,t)=>[e,i[t]])));const r=new Map(i.map(((e,i)=>[e,t[i]])));e.exports={encode:e=>t.reduce(((e,t)=>e.split(t).join(a.get(t))),e),decode:e=>i.reduce(((e,t)=>e.split(t).join(r.get(t))),e)}},5450:(e,t,i)=>{"use strict";const{Minipass:a}=i(6684);const r=i(7996);const n=i(6043);const s=i(7147);const o=i(1017);const p=i(6843);const l=i(8886);const prefixPath=(e,t)=>{if(!t){return p(e)}e=p(e).replace(/^\.(\/|$)/,"");return l(t)+"/"+e};const c=16*1024*1024;const d=Symbol("process");const u=Symbol("file");const m=Symbol("directory");const h=Symbol("symlink");const g=Symbol("hardlink");const y=Symbol("header");const v=Symbol("read");const b=Symbol("lstat");const x=Symbol("onlstat");const w=Symbol("onread");const S=Symbol("onreadlink");const N=Symbol("openfile");const E=Symbol("onopenfile");const C=Symbol("close");const _=Symbol("mode");const O=Symbol("awaitDrain");const P=Symbol("ondrain");const R=Symbol("prefix");const T=Symbol("hadError");const A=i(5899);const D=i(4808);const I=i(7111);const B=i(8371);const L=A(class WriteEntry extends a{constructor(e,t){t=t||{};super(t);if(typeof e!=="string"){throw new TypeError("path is required")}this.path=p(e);this.portable=!!t.portable;this.myuid=process.getuid&&process.getuid()||0;this.myuser=process.env.USER||"";this.maxReadSize=t.maxReadSize||c;this.linkCache=t.linkCache||new Map;this.statCache=t.statCache||new Map;this.preservePaths=!!t.preservePaths;this.cwd=p(t.cwd||process.cwd());this.strict=!!t.strict;this.noPax=!!t.noPax;this.noMtime=!!t.noMtime;this.mtime=t.mtime||null;this.prefix=t.prefix?p(t.prefix):null;this.fd=null;this.blockLen=null;this.blockRemain=null;this.buf=null;this.offset=null;this.length=null;this.pos=null;this.remain=null;if(typeof t.onwarn==="function"){this.on("warn",t.onwarn)}let i=false;if(!this.preservePaths){const[e,t]=I(this.path);if(e){this.path=t;i=e}}this.win32=!!t.win32||process.platform==="win32";if(this.win32){this.path=D.decode(this.path.replace(/\\/g,"/"));e=e.replace(/\\/g,"/")}this.absolute=p(t.absolute||o.resolve(this.cwd,e));if(this.path===""){this.path="./"}if(i){this.warn("TAR_ENTRY_INFO",`stripping ${i} from absolute path`,{entry:this,path:i+this.path})}if(this.statCache.has(this.absolute)){this[x](this.statCache.get(this.absolute))}else{this[b]()}}emit(e,...t){if(e==="error"){this[T]=true}return super.emit(e,...t)}[b](){s.lstat(this.absolute,((e,t)=>{if(e){return this.emit("error",e)}this[x](t)}))}[x](e){this.statCache.set(this.absolute,e);this.stat=e;if(!e.isFile()){e.size=0}this.type=getType(e);this.emit("stat",e);this[d]()}[d](){switch(this.type){case"File":return this[u]();case"Directory":return this[m]();case"SymbolicLink":return this[h]();default:return this.end()}}[_](e){return B(e,this.type==="Directory",this.portable)}[R](e){return prefixPath(e,this.prefix)}[y](){if(this.type==="Directory"&&this.portable){this.noMtime=true}this.header=new n({path:this[R](this.path),linkpath:this.type==="Link"?this[R](this.linkpath):this.linkpath,mode:this[_](this.stat.mode),uid:this.portable?null:this.stat.uid,gid:this.portable?null:this.stat.gid,size:this.stat.size,mtime:this.noMtime?null:this.mtime||this.stat.mtime,type:this.type,uname:this.portable?null:this.stat.uid===this.myuid?this.myuser:"",atime:this.portable?null:this.stat.atime,ctime:this.portable?null:this.stat.ctime});if(this.header.encode()&&!this.noPax){super.write(new r({atime:this.portable?null:this.header.atime,ctime:this.portable?null:this.header.ctime,gid:this.portable?null:this.header.gid,mtime:this.noMtime?null:this.mtime||this.header.mtime,path:this[R](this.path),linkpath:this.type==="Link"?this[R](this.linkpath):this.linkpath,size:this.header.size,uid:this.portable?null:this.header.uid,uname:this.portable?null:this.header.uname,dev:this.portable?null:this.stat.dev,ino:this.portable?null:this.stat.ino,nlink:this.portable?null:this.stat.nlink}).encode())}super.write(this.header.block)}[m](){if(this.path.slice(-1)!=="/"){this.path+="/"}this.stat.size=0;this[y]();this.end()}[h](){s.readlink(this.absolute,((e,t)=>{if(e){return this.emit("error",e)}this[S](t)}))}[S](e){this.linkpath=p(e);this[y]();this.end()}[g](e){this.type="Link";this.linkpath=p(o.relative(this.cwd,e));this.stat.size=0;this[y]();this.end()}[u](){if(this.stat.nlink>1){const e=this.stat.dev+":"+this.stat.ino;if(this.linkCache.has(e)){const t=this.linkCache.get(e);if(t.indexOf(this.cwd)===0){return this[g](t)}}this.linkCache.set(e,this.absolute)}this[y]();if(this.stat.size===0){return this.end()}this[N]()}[N](){s.open(this.absolute,"r",((e,t)=>{if(e){return this.emit("error",e)}this[E](t)}))}[E](e){this.fd=e;if(this[T]){return this[C]()}this.blockLen=512*Math.ceil(this.stat.size/512);this.blockRemain=this.blockLen;const t=Math.min(this.blockLen,this.maxReadSize);this.buf=Buffer.allocUnsafe(t);this.offset=0;this.pos=0;this.remain=this.stat.size;this.length=this.buf.length;this[v]()}[v](){const{fd:e,buf:t,offset:i,length:a,pos:r}=this;s.read(e,t,i,a,r,((e,t)=>{if(e){return this[C]((()=>this.emit("error",e)))}this[w](t)}))}[C](e){s.close(this.fd,e)}[w](e){if(e<=0&&this.remain>0){const e=new Error("encountered unexpected EOF");e.path=this.absolute;e.syscall="read";e.code="EOF";return this[C]((()=>this.emit("error",e)))}if(e>this.remain){const e=new Error("did not encounter expected EOF");e.path=this.absolute;e.syscall="read";e.code="EOF";return this[C]((()=>this.emit("error",e)))}if(e===this.remain){for(let t=e;tthis[P]()))}else{this[P]()}}[O](e){this.once("drain",e)}write(e){if(this.blockRemaine?this.emit("error",e):this.end()))}if(this.offset>=this.length){this.buf=Buffer.allocUnsafe(Math.min(this.blockRemain,this.buf.length));this.offset=0}this.length=this.buf.length-this.offset;this[v]()}});class WriteEntrySync extends L{[b](){this[x](s.lstatSync(this.absolute))}[h](){this[S](s.readlinkSync(this.absolute))}[N](){this[E](s.openSync(this.absolute,"r"))}[v](){let e=true;try{const{fd:t,buf:i,offset:a,length:r,pos:n}=this;const o=s.readSync(t,i,a,r,n);this[w](o);e=false}finally{if(e){try{this[C]((()=>{}))}catch(e){}}}}[O](e){e()}[C](e){s.closeSync(this.fd);e()}}const M=A(class WriteEntryTar extends a{constructor(e,t){t=t||{};super(t);this.preservePaths=!!t.preservePaths;this.portable=!!t.portable;this.strict=!!t.strict;this.noPax=!!t.noPax;this.noMtime=!!t.noMtime;this.readEntry=e;this.type=e.type;if(this.type==="Directory"&&this.portable){this.noMtime=true}this.prefix=t.prefix||null;this.path=p(e.path);this.mode=this[_](e.mode);this.uid=this.portable?null:e.uid;this.gid=this.portable?null:e.gid;this.uname=this.portable?null:e.uname;this.gname=this.portable?null:e.gname;this.size=e.size;this.mtime=this.noMtime?null:t.mtime||e.mtime;this.atime=this.portable?null:e.atime;this.ctime=this.portable?null:e.ctime;this.linkpath=p(e.linkpath);if(typeof t.onwarn==="function"){this.on("warn",t.onwarn)}let i=false;if(!this.preservePaths){const[e,t]=I(this.path);if(e){this.path=t;i=e}}this.remain=e.size;this.blockRemain=e.startBlockSize;this.header=new n({path:this[R](this.path),linkpath:this.type==="Link"?this[R](this.linkpath):this.linkpath,mode:this.mode,uid:this.portable?null:this.uid,gid:this.portable?null:this.gid,size:this.size,mtime:this.noMtime?null:this.mtime,type:this.type,uname:this.portable?null:this.uname,atime:this.portable?null:this.atime,ctime:this.portable?null:this.ctime});if(i){this.warn("TAR_ENTRY_INFO",`stripping ${i} from absolute path`,{entry:this,path:i+this.path})}if(this.header.encode()&&!this.noPax){super.write(new r({atime:this.portable?null:this.atime,ctime:this.portable?null:this.ctime,gid:this.portable?null:this.gid,mtime:this.noMtime?null:this.mtime,path:this[R](this.path),linkpath:this.type==="Link"?this[R](this.linkpath):this.linkpath,size:this.size,uid:this.portable?null:this.uid,uname:this.portable?null:this.uname,dev:this.portable?null:this.readEntry.dev,ino:this.portable?null:this.readEntry.ino,nlink:this.portable?null:this.readEntry.nlink}).encode())}super.write(this.header.block);e.pipe(this)}[R](e){return prefixPath(e,this.prefix)}[_](e){return B(e,this.type==="Directory",this.portable)}write(e){const t=e.length;if(t>this.blockRemain){throw new Error("writing more to entry than is appropriate")}this.blockRemain-=t;return super.write(e)}end(){if(this.blockRemain){super.write(Buffer.alloc(this.blockRemain))}return super.end()}});L.Sync=WriteEntrySync;L.Tar=M;const getType=e=>e.isFile()?"File":e.isDirectory()?"Directory":e.isSymbolicLink()?"SymbolicLink":"Unsupported";e.exports=L},6684:(e,t,i)=>{"use strict";const a=typeof process==="object"&&process?process:{stdout:null,stderr:null};const r=i(2361);const n=i(2781);const s=i(1576);const o=s.StringDecoder;const p=Symbol("EOF");const l=Symbol("maybeEmitEnd");const c=Symbol("emittedEnd");const d=Symbol("emittingEnd");const u=Symbol("emittedError");const m=Symbol("closed");const h=Symbol("read");const g=Symbol("flush");const y=Symbol("flushChunk");const v=Symbol("encoding");const b=Symbol("decoder");const x=Symbol("flowing");const w=Symbol("paused");const S=Symbol("resume");const N=Symbol("buffer");const E=Symbol("pipes");const C=Symbol("bufferLength");const _=Symbol("bufferPush");const O=Symbol("bufferShift");const P=Symbol("objectMode");const R=Symbol("destroyed");const T=Symbol("error");const A=Symbol("emitData");const D=Symbol("emitEnd");const I=Symbol("emitEnd2");const B=Symbol("async");const L=Symbol("abort");const M=Symbol("aborted");const k=Symbol("signal");const defer=e=>Promise.resolve().then(e);const z=global._MP_NO_ITERATOR_SYMBOLS_!=="1";const j=z&&Symbol.asyncIterator||Symbol("asyncIterator not implemented");const q=z&&Symbol.iterator||Symbol("iterator not implemented");const isEndish=e=>e==="end"||e==="finish"||e==="prefinish";const isArrayBuffer=e=>e instanceof ArrayBuffer||typeof e==="object"&&e.constructor&&e.constructor.name==="ArrayBuffer"&&e.byteLength>=0;const isArrayBufferView=e=>!Buffer.isBuffer(e)&&ArrayBuffer.isView(e);class Pipe{constructor(e,t,i){this.src=e;this.dest=t;this.opts=i;this.ondrain=()=>e[S]();t.on("drain",this.ondrain)}unpipe(){this.dest.removeListener("drain",this.ondrain)}proxyErrors(){}end(){this.unpipe();if(this.opts.end)this.dest.end()}}class PipeProxyErrors extends Pipe{unpipe(){this.src.removeListener("error",this.proxyErrors);super.unpipe()}constructor(e,t,i){super(e,t,i);this.proxyErrors=e=>t.emit("error",e);e.on("error",this.proxyErrors)}}class Minipass extends n{constructor(e){super();this[x]=false;this[w]=false;this[E]=[];this[N]=[];this[P]=e&&e.objectMode||false;if(this[P])this[v]=null;else this[v]=e&&e.encoding||null;if(this[v]==="buffer")this[v]=null;this[B]=e&&!!e.async||false;this[b]=this[v]?new o(this[v]):null;this[p]=false;this[c]=false;this[d]=false;this[m]=false;this[u]=null;this.writable=true;this.readable=true;this[C]=0;this[R]=false;if(e&&e.debugExposeBuffer===true){Object.defineProperty(this,"buffer",{get:()=>this[N]})}if(e&&e.debugExposePipes===true){Object.defineProperty(this,"pipes",{get:()=>this[E]})}this[k]=e&&e.signal;this[M]=false;if(this[k]){this[k].addEventListener("abort",(()=>this[L]()));if(this[k].aborted){this[L]()}}}get bufferLength(){return this[C]}get encoding(){return this[v]}set encoding(e){if(this[P])throw new Error("cannot set encoding in objectMode");if(this[v]&&e!==this[v]&&(this[b]&&this[b].lastNeed||this[C]))throw new Error("cannot change encoding");if(this[v]!==e){this[b]=e?new o(e):null;if(this[N].length)this[N]=this[N].map((e=>this[b].write(e)))}this[v]=e}setEncoding(e){this.encoding=e}get objectMode(){return this[P]}set objectMode(e){this[P]=this[P]||!!e}get["async"](){return this[B]}set["async"](e){this[B]=this[B]||!!e}[L](){this[M]=true;this.emit("abort",this[k].reason);this.destroy(this[k].reason)}get aborted(){return this[M]}set aborted(e){}write(e,t,i){if(this[M])return false;if(this[p])throw new Error("write after end");if(this[R]){this.emit("error",Object.assign(new Error("Cannot call write after a stream was destroyed"),{code:"ERR_STREAM_DESTROYED"}));return true}if(typeof t==="function")i=t,t="utf8";if(!t)t="utf8";const a=this[B]?defer:e=>e();if(!this[P]&&!Buffer.isBuffer(e)){if(isArrayBufferView(e))e=Buffer.from(e.buffer,e.byteOffset,e.byteLength);else if(isArrayBuffer(e))e=Buffer.from(e);else if(typeof e!=="string")this.objectMode=true}if(this[P]){if(this.flowing&&this[C]!==0)this[g](true);if(this.flowing)this.emit("data",e);else this[_](e);if(this[C]!==0)this.emit("readable");if(i)a(i);return this.flowing}if(!e.length){if(this[C]!==0)this.emit("readable");if(i)a(i);return this.flowing}if(typeof e==="string"&&!(t===this[v]&&!this[b].lastNeed)){e=Buffer.from(e,t)}if(Buffer.isBuffer(e)&&this[v])e=this[b].write(e);if(this.flowing&&this[C]!==0)this[g](true);if(this.flowing)this.emit("data",e);else this[_](e);if(this[C]!==0)this.emit("readable");if(i)a(i);return this.flowing}read(e){if(this[R])return null;if(this[C]===0||e===0||e>this[C]){this[l]();return null}if(this[P])e=null;if(this[N].length>1&&!this[P]){if(this.encoding)this[N]=[this[N].join("")];else this[N]=[Buffer.concat(this[N],this[C])]}const t=this[h](e||null,this[N][0]);this[l]();return t}[h](e,t){if(e===t.length||e===null)this[O]();else{this[N][0]=t.slice(e);t=t.slice(0,e);this[C]-=e}this.emit("data",t);if(!this[N].length&&!this[p])this.emit("drain");return t}end(e,t,i){if(typeof e==="function")i=e,e=null;if(typeof t==="function")i=t,t="utf8";if(e)this.write(e,t);if(i)this.once("end",i);this[p]=true;this.writable=false;if(this.flowing||!this[w])this[l]();return this}[S](){if(this[R])return;this[w]=false;this[x]=true;this.emit("resume");if(this[N].length)this[g]();else if(this[p])this[l]();else this.emit("drain")}resume(){return this[S]()}pause(){this[x]=false;this[w]=true}get destroyed(){return this[R]}get flowing(){return this[x]}get paused(){return this[w]}[_](e){if(this[P])this[C]+=1;else this[C]+=e.length;this[N].push(e)}[O](){if(this[P])this[C]-=1;else this[C]-=this[N][0].length;return this[N].shift()}[g](e){do{}while(this[y](this[O]())&&this[N].length);if(!e&&!this[N].length&&!this[p])this.emit("drain")}[y](e){this.emit("data",e);return this.flowing}pipe(e,t){if(this[R])return;const i=this[c];t=t||{};if(e===a.stdout||e===a.stderr)t.end=false;else t.end=t.end!==false;t.proxyErrors=!!t.proxyErrors;if(i){if(t.end)e.end()}else{this[E].push(!t.proxyErrors?new Pipe(this,e,t):new PipeProxyErrors(this,e,t));if(this[B])defer((()=>this[S]()));else this[S]()}return e}unpipe(e){const t=this[E].find((t=>t.dest===e));if(t){this[E].splice(this[E].indexOf(t),1);t.unpipe()}}addListener(e,t){return this.on(e,t)}on(e,t){const i=super.on(e,t);if(e==="data"&&!this[E].length&&!this.flowing)this[S]();else if(e==="readable"&&this[C]!==0)super.emit("readable");else if(isEndish(e)&&this[c]){super.emit(e);this.removeAllListeners(e)}else if(e==="error"&&this[u]){if(this[B])defer((()=>t.call(this,this[u])));else t.call(this,this[u])}return i}get emittedEnd(){return this[c]}[l](){if(!this[d]&&!this[c]&&!this[R]&&this[N].length===0&&this[p]){this[d]=true;this.emit("end");this.emit("prefinish");this.emit("finish");if(this[m])this.emit("close");this[d]=false}}emit(e,t,...i){if(e!=="error"&&e!=="close"&&e!==R&&this[R])return;else if(e==="data"){return!this[P]&&!t?false:this[B]?defer((()=>this[A](t))):this[A](t)}else if(e==="end"){return this[D]()}else if(e==="close"){this[m]=true;if(!this[c]&&!this[R])return;const e=super.emit("close");this.removeAllListeners("close");return e}else if(e==="error"){this[u]=t;super.emit(T,t);const e=!this[k]||this.listeners("error").length?super.emit("error",t):false;this[l]();return e}else if(e==="resume"){const e=super.emit("resume");this[l]();return e}else if(e==="finish"||e==="prefinish"){const t=super.emit(e);this.removeAllListeners(e);return t}const a=super.emit(e,t,...i);this[l]();return a}[A](e){for(const t of this[E]){if(t.dest.write(e)===false)this.pause()}const t=super.emit("data",e);this[l]();return t}[D](){if(this[c])return;this[c]=true;this.readable=false;if(this[B])defer((()=>this[I]()));else this[I]()}[I](){if(this[b]){const e=this[b].end();if(e){for(const t of this[E]){t.dest.write(e)}super.emit("data",e)}}for(const e of this[E]){e.end()}const e=super.emit("end");this.removeAllListeners("end");return e}collect(){const e=[];if(!this[P])e.dataLength=0;const t=this.promise();this.on("data",(t=>{e.push(t);if(!this[P])e.dataLength+=t.length}));return t.then((()=>e))}concat(){return this[P]?Promise.reject(new Error("cannot concat in objectMode")):this.collect().then((e=>this[P]?Promise.reject(new Error("cannot concat in objectMode")):this[v]?e.join(""):Buffer.concat(e,e.dataLength)))}promise(){return new Promise(((e,t)=>{this.on(R,(()=>t(new Error("stream destroyed"))));this.on("error",(e=>t(e)));this.on("end",(()=>e()))}))}[j](){let e=false;const stop=()=>{this.pause();e=true;return Promise.resolve({done:true})};const next=()=>{if(e)return stop();const t=this.read();if(t!==null)return Promise.resolve({done:false,value:t});if(this[p])return stop();let i=null;let a=null;const onerr=e=>{this.removeListener("data",ondata);this.removeListener("end",onend);this.removeListener(R,ondestroy);stop();a(e)};const ondata=e=>{this.removeListener("error",onerr);this.removeListener("end",onend);this.removeListener(R,ondestroy);this.pause();i({value:e,done:!!this[p]})};const onend=()=>{this.removeListener("error",onerr);this.removeListener("data",ondata);this.removeListener(R,ondestroy);stop();i({done:true})};const ondestroy=()=>onerr(new Error("stream destroyed"));return new Promise(((e,t)=>{a=t;i=e;this.once(R,ondestroy);this.once("error",onerr);this.once("end",onend);this.once("data",ondata)}))};return{next:next,throw:stop,return:stop,[j](){return this}}}[q](){let e=false;const stop=()=>{this.pause();this.removeListener(T,stop);this.removeListener(R,stop);this.removeListener("end",stop);e=true;return{done:true}};const next=()=>{if(e)return stop();const t=this.read();return t===null?stop():{value:t}};this.once("end",stop);this.once(T,stop);this.once(R,stop);return{next:next,throw:stop,return:stop,[q](){return this}}}destroy(e){if(this[R]){if(e)this.emit("error",e);else this.emit(R);return this}this[R]=true;this[N].length=0;this[C]=0;if(typeof this.close==="function"&&!this[m])this.close();if(e)this.emit("error",e);else this.emit(R);return this}static isStream(e){return!!e&&(e instanceof Minipass||e instanceof n||e instanceof r&&(typeof e.pipe==="function"||typeof e.write==="function"&&typeof e.end==="function"))}}t.Minipass=Minipass},8065:(e,t,i)=>{"use strict";const{promisify:a}=i(3837);const r=i(8517);e.exports.fileSync=r.fileSync;const n=a(((e,t)=>r.file(e,((e,i,r,n)=>e?t(e):t(undefined,{path:i,fd:r,cleanup:a(n)})))));e.exports.file=async e=>n(e);e.exports.withFile=async function withFile(t,i){const{path:a,fd:r,cleanup:n}=await e.exports.file(i);try{return await t({path:a,fd:r})}finally{await n()}};e.exports.dirSync=r.dirSync;const s=a(((e,t)=>r.dir(e,((e,i,r)=>e?t(e):t(undefined,{path:i,cleanup:a(r)})))));e.exports.dir=async e=>s(e);e.exports.withDir=async function withDir(t,i){const{path:a,cleanup:r}=await e.exports.dir(i);try{return await t({path:a})}finally{await r()}};e.exports.tmpNameSync=r.tmpNameSync;e.exports.tmpName=a(r.tmpName);e.exports.tmpdir=r.tmpdir;e.exports.setGracefulCleanup=r.setGracefulCleanup},8517:(e,t,i)=>{ /*! * Tmp *