UNPKG

@mymindstorm/rpm-extract

Version:

Programmatically extract files from rpm packages

1 lines 151 kB
var ku=Object.create;var Lt=Object.defineProperty;var Cu=Object.getOwnPropertyDescriptor;var Uu=Object.getOwnPropertyNames;var Fu=Object.getPrototypeOf,Wu=Object.prototype.hasOwnProperty;var b=(e,t)=>()=>(t||e((t={exports:{}}).exports,t),t.exports),Hu=(e,t)=>{for(var r in t)Lt(e,r,{get:t[r],enumerable:!0})},vn=(e,t,r,i)=>{if(t&&typeof t=="object"||typeof t=="function")for(let n of Uu(t))!Wu.call(e,n)&&n!==r&&Lt(e,n,{get:()=>t[n],enumerable:!(i=Cu(t,n))||i.enumerable});return e};var F=(e,t,r)=>(r=e!=null?ku(Fu(e)):{},vn(t||!e||!e.__esModule?Lt(r,"default",{value:e,enumerable:!0}):r,e)),zu=e=>vn(Lt({},"__esModule",{value:!0}),e);var et=b((dy,En)=>{"use strict";var wn=function(e,t,r){return function(){for(var i=this,n=new Array(arguments.length),a=0;a<arguments.length;a++)n[a]=arguments[a];return new t(function(f,o){n.push(function(l,h){if(l)o(l);else if(r.multiArgs){for(var d=new Array(arguments.length-1),y=1;y<arguments.length;y++)d[y-1]=arguments[y];f(d)}else f(h)}),e.apply(i,n)})}},mn=En.exports=function(e,t,r){typeof t!="function"&&(r=t,t=Promise),r=r||{},r.exclude=r.exclude||[/.+Sync$/];var i=function(a){var f=function(o){return typeof o=="string"?a===o:o.test(a)};return r.include?r.include.some(f):!r.exclude.some(f)},n=typeof e=="function"?function(){return r.excludeMain?e.apply(this,arguments):wn(e,t,r).apply(this,arguments)}:{};return Object.keys(e).reduce(function(a,f){var o=e[f];return a[f]=typeof o=="function"&&i(f)?wn(o,t,r):o,a},n)};mn.all=mn});var xn=b((cy,An)=>{An.exports=Mn;function Mn(e,t){if(e&&t)return Mn(e)(t);if(typeof e!="function")throw new TypeError("need wrapper function");return Object.keys(e).forEach(function(i){r[i]=e[i]}),r;function r(){for(var i=new Array(arguments.length),n=0;n<i.length;n++)i[n]=arguments[n];var a=e.apply(this,i),f=i[i.length-1];return typeof a=="function"&&a!==f&&Object.keys(f).forEach(function(o){a[o]=f[o]}),a}}});var qn=b((py,qr)=>{var On=xn();qr.exports=On(qt);qr.exports.strict=On(Ln);qt.proto=qt(function(){Object.defineProperty(Function.prototype,"once",{value:function(){return qt(this)},configurable:!0}),Object.defineProperty(Function.prototype,"onceStrict",{value:function(){return Ln(this)},configurable:!0})});function qt(e){var t=function(){return t.called?t.value:(t.called=!0,t.value=e.apply(this,arguments))};return t.called=!1,t}function Ln(e){var t=function(){if(t.called)throw new Error(t.onceError);return t.called=!0,t.value=e.apply(this,arguments)},r=e.name||"Function wrapped with `once`";return t.onceError=r+" shouldn't be called more than once",t.called=!1,t}});var Dn=b((yy,In)=>{var Vu=qn(),$u=function(){},Ku=function(e){return e.setHeader&&typeof e.abort=="function"},Zu=function(e){return e.stdio&&Array.isArray(e.stdio)&&e.stdio.length===3},Pn=function(e,t,r){if(typeof t=="function")return Pn(e,null,t);t||(t={}),r=Vu(r||$u);var i=e._writableState,n=e._readableState,a=t.readable||t.readable!==!1&&e.readable,f=t.writable||t.writable!==!1&&e.writable,o=!1,l=function(){e.writable||h()},h=function(){f=!1,a||r.call(e)},d=function(){a=!1,f||r.call(e)},y=function(p){r.call(e,p?new Error("exited with error code: "+p):null)},_=function(p){r.call(e,p)},u=function(){process.nextTick(s)},s=function(){if(!o){if(a&&!(n&&n.ended&&!n.destroyed))return r.call(e,new Error("premature close"));if(f&&!(i&&i.ended&&!i.destroyed))return r.call(e,new Error("premature close"))}},c=function(){e.req.on("finish",h)};return Ku(e)?(e.on("complete",h),e.on("abort",u),e.req?c():e.on("request",c)):f&&!i&&(e.on("end",l),e.on("close",l)),Zu(e)&&e.on("exit",y),e.on("end",d),e.on("finish",h),t.error!==!1&&e.on("error",_),e.on("close",u),function(){o=!0,e.removeListener("complete",h),e.removeListener("abort",u),e.removeListener("request",c),e.req&&e.req.removeListener("finish",h),e.removeListener("end",l),e.removeListener("close",l),e.removeListener("finish",h),e.removeListener("exit",y),e.removeListener("end",d),e.removeListener("error",_),e.removeListener("close",u)}};In.exports=Pn});var Pt=b(Re=>{Re.size=104;Re.encode=function(e){e.name[e.name.length-1]!=="\0"&&(e.name+="\0");var t=Xu(e.name),r=new Buffer(110+t.length);return e.mtime instanceof Date&&(e.mtime=Math.round(e.mtime.getTime()/1e3)),r.write("070701",0),r.write(W(e.ino,8),6),r.write(W(e.mode,8),14),r.write(W(e.uid,8),22),r.write(W(e.gid,8),30),r.write(W(e.nlink,8),38),r.write(W(e.mtime,8),46),r.write(W(e.size,8),54),r.write(W(e.devmajor,8),62),r.write(W(e.devminor,8),70),r.write(W(e.rdevmajor,8),78),r.write(W(e.rdevminor,8),86),r.write(W(e.name.length,8),94),r.write(W(0,8),102),r.write(t,110),r};Re.decode=function(e){var t={};return t.ino=H(e),t.mode=H(e,8),t.uid=H(e,16),t.gid=H(e,24),t.nlink=H(e,32),t.mtime=new Date(H(e,40)*1e3),t.size=H(e,48),t.devmajor=H(e,56),t.devminor=H(e,64),t.rdevmajor=H(e,72),t.rdevminor=H(e,80),t._nameLength=H(e,88),t._sizeStrike=t.size+4-(t.size%4||4),t._nameStrike=t._nameLength+4-((6+Re.size+t._nameLength)%4||4),e.consume(Re.size),t};function H(e,t,r){return t=t||0,r=r||8,parseInt(e.toString("ascii",t,t+r),16)}function W(e,t){e=e||0;var r=Math.min(e,Math.pow(16,t)-1).toString(16);return r=r.toUpperCase(),r=Array(t-r.length+1).join("0")+r,r}function Xu(e){var t=(e.length+2)%4,r=(4-t)%4;return e+Array(r+1).join("\0")}Re.decodeHex=H});var Pr=b(tt=>{tt.size=70;tt.encode=function(e){e.name[e.name.length-1]!=="\0"&&(e.name+="\0");var t=new Buffer(76+e.name.length);return e.mtime instanceof Date&&(e.mtime=Math.round(e.mtime.getTime()/1e3)),t.write("070707",0),t.write(Z(e.dev,6),6),t.write(Z(e.ino,6),12),t.write(Z(e.mode,6),18),t.write(Z(e.uid,6),24),t.write(Z(e.gid,6),30),t.write(Z(e.nlink,6),36),t.write(Z(e.rdev,6),42),t.write(Z(e.mtime,11),48),t.write(Z(e.name.length,6),59),t.write(Z(e.size,11),65),t.write(e.name,76),t};tt.decode=function(e){var t={};return t.dev=K(e),t.ino=K(e,6),t.mode=K(e,12),t.uid=K(e,18),t.gid=K(e,24),t.nlink=K(e,30),t.rdev=K(e,36),t.mtime=new Date(K(e,42,11)*1e3),t._nameLength=K(e,53),t.size=K(e,59,11),t._sizeStrike=t.size,t._nameStrike=t._nameLength,e.consume(tt.size),t};function K(e,t,r){return t=t||0,r=r||6,parseInt(e.toString("ascii",t,t+r),8)}function Z(e,t){e=e||0;var r=Math.min(e,Math.pow(8,t)-1).toString(8);return r=Array(t-r.length+1).join("0")+r,r}});var Bn=b((_y,jn)=>{var Ir=require("util"),X=require("constants"),Ju=Dn(),Nn=require("stream").Readable,It=require("stream").Writable,Qu={name:"TRAILER!!!",nlink:1};jn.exports=J;var Dt=function(e){It.call(this),this.written=0,this._to=e,this._destroyed=!1};Ir.inherits(Dt,It);Dt.prototype._write=function(e,t,r){if(this.written+=e.length,this._to._push(e))return r();this._to._drain=r};Dt.prototype.destroy=function(){this._destroyed||(this._destroyed=!0,this.emit("close"))};function J(e){if(!(this instanceof J))return new J(e);Nn.call(this,e),this.newc=e&&e.format==="newc",this.newc?this._encode=Pt().encode:this._encode=Pr().encode,this.padding=512,this._ino=1,this._stream=null,this._finalized=!1,this._finalizing=!1,this._destroyed=!1,this._drain=Dr,this._size=0}Ir.inherits(J,Nn);J.prototype.entry=function(e,t,r){if(this._stream)throw new Error("already piping an entry");if(!(this._finalized||this._destroyed)){typeof t=="function"&&(r=t,t=null),e.linkname&&(t=new Buffer(e.linkname));var i=this;if(r||(r=Dr),e.dev||(e.dev=parseInt(777777,8)),e.ino||(e.ino=this._ino++),e.mode||(e.mode=parseInt(100644,8)),e.nlink||(e.nlink=1),e.mtime||(e.mtime=new Date),e.rdevminor||(e.rdevminor=e.rdev),e.devminor||(e.devminor=e.dev),e.type&&(e.mode=ts(e.type,e.mode)),typeof t=="string"&&(t=new Buffer(t)),Buffer.isBuffer(t)){if(e.size=t.length,this._push(this._encode(e)),this._push(t),this.newc){var n=t.length%4,a=(4-n)%4;this._push(new Buffer(new Array(a+1).join("\0")))}return process.nextTick(r),new rt}if(this._push(this._encode(e)),(e.mode&X.S_IFMT)!==X.S_IFREG)return process.nextTick(r),new rt;var f=new Dt(this);return this._stream=f,Ju(f,function(o){if(i._stream=null,o)return i.destroy(),r(o);if(f.written!==e.size)return i.destroy(),r(new Error("size mismatch"));if(i.newc){var l=f.written%4,h=(4-l)%4;i._push(new Buffer(new Array(h+1).join("\0")))}i._finalizing&&i.finalize(),r()}),f}};var rt=function(){It.call(this),this._destroyed=!1};Ir.inherits(rt,It);rt.prototype._write=function(e,t,r){r(new Error("No body allowed for this entry"))};rt.prototype.destroy=function(){this._destroyed||(this._destroyed=!0,this.emit("close"))};J.prototype.finalize=function(){if(this._stream){this._finalizing=!0;return}if(!this._finalized){this._push(this._encode(Qu));var e=new Buffer(this.padding);e.fill(0),this.push(e.slice(0,this.padding-this._size)),this.push(null)}};J.prototype._push=function(e){return this._size+=e.length,this._size>=this.padding&&(this._push=this.push),this.push(e)};J.prototype.destroy=function(e){this._destroyed||(this._destroyed=!0,e&&this.emit("error",e),this.emit("close"),this._stream&&this._stream.destroy&&this._stream.destroy())};J.prototype._read=function(e){var t=this._drain;this._drain=Dr,t()};function Dr(){}var es=parseInt(7777,8);function ts(e,t){var r=0;return e==="file"&&(r=X.S_IFREG),e==="directory"&&(r=X.S_IFDIR),e==="symlink"&&(r=X.S_IFLNK),e==="socket"&&(r=X.S_IFSOCK),e==="block-device"&&(r=X.S_IFBLK),e==="character-device"&&(r=X.S_IFCHR),e==="fifo"&&(r=X.S_IFIFO),(r||X.S_IFMT&t)|es&t}["file","directory","symlink","socket","fifo"].forEach(function(e){J.prototype[e]=function(t,r,i){return t.type=e,this.entry(t,r,i)}})});var it=b((vy,Nr)=>{"use strict";typeof process>"u"||!process.version||process.version.indexOf("v0.")===0||process.version.indexOf("v1.")===0&&process.version.indexOf("v1.8.")!==0?Nr.exports={nextTick:rs}:Nr.exports=process;function rs(e,t,r,i){if(typeof e!="function")throw new TypeError('"callback" argument must be a function');var n=arguments.length,a,f;switch(n){case 0:case 1:return process.nextTick(e);case 2:return process.nextTick(function(){e.call(null,t)});case 3:return process.nextTick(function(){e.call(null,t,r)});case 4:return process.nextTick(function(){e.call(null,t,r,i)});default:for(a=new Array(n-1),f=0;f<a.length;)a[f++]=arguments[f];return process.nextTick(function(){e.apply(null,a)})}}});var Cn=b((wy,kn)=>{var is={}.toString;kn.exports=Array.isArray||function(e){return is.call(e)=="[object Array]"}});var jr=b((my,Un)=>{Un.exports=require("stream")});var jt=b((Br,Wn)=>{var Nt=require("buffer"),ne=Nt.Buffer;function Fn(e,t){for(var r in e)t[r]=e[r]}ne.from&&ne.alloc&&ne.allocUnsafe&&ne.allocUnsafeSlow?Wn.exports=Nt:(Fn(Nt,Br),Br.Buffer=ke);function ke(e,t,r){return ne(e,t,r)}Fn(ne,ke);ke.from=function(e,t,r){if(typeof e=="number")throw new TypeError("Argument must not be a number");return ne(e,t,r)};ke.alloc=function(e,t,r){if(typeof e!="number")throw new TypeError("Argument must be a number");var i=ne(e);return t!==void 0?typeof r=="string"?i.fill(t,r):i.fill(t):i.fill(0),i};ke.allocUnsafe=function(e){if(typeof e!="number")throw new TypeError("Argument must be a number");return ne(e)};ke.allocUnsafeSlow=function(e){if(typeof e!="number")throw new TypeError("Argument must be a number");return Nt.SlowBuffer(e)}});var Ce=b(U=>{function ns(e){return Array.isArray?Array.isArray(e):Bt(e)==="[object Array]"}U.isArray=ns;function as(e){return typeof e=="boolean"}U.isBoolean=as;function fs(e){return e===null}U.isNull=fs;function os(e){return e==null}U.isNullOrUndefined=os;function us(e){return typeof e=="number"}U.isNumber=us;function ss(e){return typeof e=="string"}U.isString=ss;function ls(e){return typeof e=="symbol"}U.isSymbol=ls;function ds(e){return e===void 0}U.isUndefined=ds;function hs(e){return Bt(e)==="[object RegExp]"}U.isRegExp=hs;function cs(e){return typeof e=="object"&&e!==null}U.isObject=cs;function ps(e){return Bt(e)==="[object Date]"}U.isDate=ps;function ys(e){return Bt(e)==="[object Error]"||e instanceof Error}U.isError=ys;function gs(e){return typeof e=="function"}U.isFunction=gs;function bs(e){return e===null||typeof e=="boolean"||typeof e=="number"||typeof e=="string"||typeof e=="symbol"||typeof e>"u"}U.isPrimitive=bs;U.isBuffer=require("buffer").Buffer.isBuffer;function Bt(e){return Object.prototype.toString.call(e)}});var Hn=b((Sy,kr)=>{typeof Object.create=="function"?kr.exports=function(t,r){r&&(t.super_=r,t.prototype=Object.create(r.prototype,{constructor:{value:t,enumerable:!1,writable:!0,configurable:!0}}))}:kr.exports=function(t,r){if(r){t.super_=r;var i=function(){};i.prototype=r.prototype,t.prototype=new i,t.prototype.constructor=t}}});var k=b((Ry,Ur)=>{try{if(Cr=require("util"),typeof Cr.inherits!="function")throw"";Ur.exports=Cr.inherits}catch{Ur.exports=Hn()}var Cr});var Gn=b((Ty,Fr)=>{"use strict";function _s(e,t){if(!(e instanceof t))throw new TypeError("Cannot call a class as a function")}var zn=jt().Buffer,nt=require("util");function vs(e,t,r){e.copy(t,r)}Fr.exports=function(){function e(){_s(this,e),this.head=null,this.tail=null,this.length=0}return e.prototype.push=function(r){var i={data:r,next:null};this.length>0?this.tail.next=i:this.head=i,this.tail=i,++this.length},e.prototype.unshift=function(r){var i={data:r,next:this.head};this.length===0&&(this.tail=i),this.head=i,++this.length},e.prototype.shift=function(){if(this.length!==0){var r=this.head.data;return this.length===1?this.head=this.tail=null:this.head=this.head.next,--this.length,r}},e.prototype.clear=function(){this.head=this.tail=null,this.length=0},e.prototype.join=function(r){if(this.length===0)return"";for(var i=this.head,n=""+i.data;i=i.next;)n+=r+i.data;return n},e.prototype.concat=function(r){if(this.length===0)return zn.alloc(0);for(var i=zn.allocUnsafe(r>>>0),n=this.head,a=0;n;)vs(n.data,i,a),a+=n.data.length,n=n.next;return i},e}();nt&&nt.inspect&&nt.inspect.custom&&(Fr.exports.prototype[nt.inspect.custom]=function(){var e=nt.inspect({length:this.length});return this.constructor.name+" "+e})});var Wr=b((My,Yn)=>{"use strict";var kt=it();function ws(e,t){var r=this,i=this._readableState&&this._readableState.destroyed,n=this._writableState&&this._writableState.destroyed;return i||n?(t?t(e):e&&(this._writableState?this._writableState.errorEmitted||(this._writableState.errorEmitted=!0,kt.nextTick(Ct,this,e)):kt.nextTick(Ct,this,e)),this):(this._readableState&&(this._readableState.destroyed=!0),this._writableState&&(this._writableState.destroyed=!0),this._destroy(e||null,function(a){!t&&a?r._writableState?r._writableState.errorEmitted||(r._writableState.errorEmitted=!0,kt.nextTick(Ct,r,a)):kt.nextTick(Ct,r,a):t&&t(a)}),this)}function ms(){this._readableState&&(this._readableState.destroyed=!1,this._readableState.reading=!1,this._readableState.ended=!1,this._readableState.endEmitted=!1),this._writableState&&(this._writableState.destroyed=!1,this._writableState.ended=!1,this._writableState.ending=!1,this._writableState.finalCalled=!1,this._writableState.prefinished=!1,this._writableState.finished=!1,this._writableState.errorEmitted=!1)}function Ct(e,t){e.emit("error",t)}Yn.exports={destroy:ws,undestroy:ms}});var Ut=b((Ay,Vn)=>{Vn.exports=require("util").deprecate});var zr=b((xy,ta)=>{"use strict";var Te=it();ta.exports=j;function Kn(e){var t=this;this.next=null,this.entry=null,this.finish=function(){Cs(t,e)}}var Es=!process.browser&&["v0.10","v0.9."].indexOf(process.version.slice(0,5))>-1?setImmediate:Te.nextTick,Ue;j.WritableState=ft;var Zn=Object.create(Ce());Zn.inherits=k();var Ss={deprecate:Ut()},Xn=jr(),Wt=jt().Buffer,Rs=(typeof global<"u"?global:typeof window<"u"?window:typeof self<"u"?self:{}).Uint8Array||function(){};function Ts(e){return Wt.from(e)}function Ms(e){return Wt.isBuffer(e)||e instanceof Rs}var Jn=Wr();Zn.inherits(j,Xn);function As(){}function ft(e,t){Ue=Ue||Me(),e=e||{};var r=t instanceof Ue;this.objectMode=!!e.objectMode,r&&(this.objectMode=this.objectMode||!!e.writableObjectMode);var i=e.highWaterMark,n=e.writableHighWaterMark,a=this.objectMode?16:16*1024;i||i===0?this.highWaterMark=i:r&&(n||n===0)?this.highWaterMark=n:this.highWaterMark=a,this.highWaterMark=Math.floor(this.highWaterMark),this.finalCalled=!1,this.needDrain=!1,this.ending=!1,this.ended=!1,this.finished=!1,this.destroyed=!1;var f=e.decodeStrings===!1;this.decodeStrings=!f,this.defaultEncoding=e.defaultEncoding||"utf8",this.length=0,this.writing=!1,this.corked=0,this.sync=!0,this.bufferProcessing=!1,this.onwrite=function(o){Ds(t,o)},this.writecb=null,this.writelen=0,this.bufferedRequest=null,this.lastBufferedRequest=null,this.pendingcb=0,this.prefinished=!1,this.errorEmitted=!1,this.bufferedRequestCount=0,this.corkedRequestsFree=new Kn(this)}ft.prototype.getBuffer=function(){for(var t=this.bufferedRequest,r=[];t;)r.push(t),t=t.next;return r};(function(){try{Object.defineProperty(ft.prototype,"buffer",{get:Ss.deprecate(function(){return this.getBuffer()},"_writableState.buffer is deprecated. Use _writableState.getBuffer instead.","DEP0003")})}catch{}})();var Ft;typeof Symbol=="function"&&Symbol.hasInstance&&typeof Function.prototype[Symbol.hasInstance]=="function"?(Ft=Function.prototype[Symbol.hasInstance],Object.defineProperty(j,Symbol.hasInstance,{value:function(e){return Ft.call(this,e)?!0:this!==j?!1:e&&e._writableState instanceof ft}})):Ft=function(e){return e instanceof this};function j(e){if(Ue=Ue||Me(),!Ft.call(j,this)&&!(this instanceof Ue))return new j(e);this._writableState=new ft(e,this),this.writable=!0,e&&(typeof e.write=="function"&&(this._write=e.write),typeof e.writev=="function"&&(this._writev=e.writev),typeof e.destroy=="function"&&(this._destroy=e.destroy),typeof e.final=="function"&&(this._final=e.final)),Xn.call(this)}j.prototype.pipe=function(){this.emit("error",new Error("Cannot pipe, not readable"))};function xs(e,t){var r=new Error("write after end");e.emit("error",r),Te.nextTick(t,r)}function Os(e,t,r,i){var n=!0,a=!1;return r===null?a=new TypeError("May not write null values to stream"):typeof r!="string"&&r!==void 0&&!t.objectMode&&(a=new TypeError("Invalid non-string/buffer chunk")),a&&(e.emit("error",a),Te.nextTick(i,a),n=!1),n}j.prototype.write=function(e,t,r){var i=this._writableState,n=!1,a=!i.objectMode&&Ms(e);return a&&!Wt.isBuffer(e)&&(e=Ts(e)),typeof t=="function"&&(r=t,t=null),a?t="buffer":t||(t=i.defaultEncoding),typeof r!="function"&&(r=As),i.ended?xs(this,r):(a||Os(this,i,e,r))&&(i.pendingcb++,n=qs(this,i,a,e,t,r)),n};j.prototype.cork=function(){var e=this._writableState;e.corked++};j.prototype.uncork=function(){var e=this._writableState;e.corked&&(e.corked--,!e.writing&&!e.corked&&!e.bufferProcessing&&e.bufferedRequest&&Qn(this,e))};j.prototype.setDefaultEncoding=function(t){if(typeof t=="string"&&(t=t.toLowerCase()),!(["hex","utf8","utf-8","ascii","binary","base64","ucs2","ucs-2","utf16le","utf-16le","raw"].indexOf((t+"").toLowerCase())>-1))throw new TypeError("Unknown encoding: "+t);return this._writableState.defaultEncoding=t,this};function Ls(e,t,r){return!e.objectMode&&e.decodeStrings!==!1&&typeof t=="string"&&(t=Wt.from(t,r)),t}Object.defineProperty(j.prototype,"writableHighWaterMark",{enumerable:!1,get:function(){return this._writableState.highWaterMark}});function qs(e,t,r,i,n,a){if(!r){var f=Ls(t,i,n);i!==f&&(r=!0,n="buffer",i=f)}var o=t.objectMode?1:i.length;t.length+=o;var l=t.length<t.highWaterMark;if(l||(t.needDrain=!0),t.writing||t.corked){var h=t.lastBufferedRequest;t.lastBufferedRequest={chunk:i,encoding:n,isBuf:r,callback:a,next:null},h?h.next=t.lastBufferedRequest:t.bufferedRequest=t.lastBufferedRequest,t.bufferedRequestCount+=1}else Hr(e,t,!1,o,i,n,a);return l}function Hr(e,t,r,i,n,a,f){t.writelen=i,t.writecb=f,t.writing=!0,t.sync=!0,r?e._writev(n,t.onwrite):e._write(n,a,t.onwrite),t.sync=!1}function Ps(e,t,r,i,n){--t.pendingcb,r?(Te.nextTick(n,i),Te.nextTick(at,e,t),e._writableState.errorEmitted=!0,e.emit("error",i)):(n(i),e._writableState.errorEmitted=!0,e.emit("error",i),at(e,t))}function Is(e){e.writing=!1,e.writecb=null,e.length-=e.writelen,e.writelen=0}function Ds(e,t){var r=e._writableState,i=r.sync,n=r.writecb;if(Is(r),t)Ps(e,r,i,t,n);else{var a=ea(r);!a&&!r.corked&&!r.bufferProcessing&&r.bufferedRequest&&Qn(e,r),i?Es($n,e,r,a,n):$n(e,r,a,n)}}function $n(e,t,r,i){r||Ns(e,t),t.pendingcb--,i(),at(e,t)}function Ns(e,t){t.length===0&&t.needDrain&&(t.needDrain=!1,e.emit("drain"))}function Qn(e,t){t.bufferProcessing=!0;var r=t.bufferedRequest;if(e._writev&&r&&r.next){var i=t.bufferedRequestCount,n=new Array(i),a=t.corkedRequestsFree;a.entry=r;for(var f=0,o=!0;r;)n[f]=r,r.isBuf||(o=!1),r=r.next,f+=1;n.allBuffers=o,Hr(e,t,!0,t.length,n,"",a.finish),t.pendingcb++,t.lastBufferedRequest=null,a.next?(t.corkedRequestsFree=a.next,a.next=null):t.corkedRequestsFree=new Kn(t),t.bufferedRequestCount=0}else{for(;r;){var l=r.chunk,h=r.encoding,d=r.callback,y=t.objectMode?1:l.length;if(Hr(e,t,!1,y,l,h,d),r=r.next,t.bufferedRequestCount--,t.writing)break}r===null&&(t.lastBufferedRequest=null)}t.bufferedRequest=r,t.bufferProcessing=!1}j.prototype._write=function(e,t,r){r(new Error("_write() is not implemented"))};j.prototype._writev=null;j.prototype.end=function(e,t,r){var i=this._writableState;typeof e=="function"?(r=e,e=null,t=null):typeof t=="function"&&(r=t,t=null),e!=null&&this.write(e,t),i.corked&&(i.corked=1,this.uncork()),i.ending||ks(this,i,r)};function ea(e){return e.ending&&e.length===0&&e.bufferedRequest===null&&!e.finished&&!e.writing}function js(e,t){e._final(function(r){t.pendingcb--,r&&e.emit("error",r),t.prefinished=!0,e.emit("prefinish"),at(e,t)})}function Bs(e,t){!t.prefinished&&!t.finalCalled&&(typeof e._final=="function"?(t.pendingcb++,t.finalCalled=!0,Te.nextTick(js,e,t)):(t.prefinished=!0,e.emit("prefinish")))}function at(e,t){var r=ea(t);return r&&(Bs(e,t),t.pendingcb===0&&(t.finished=!0,e.emit("finish"))),r}function ks(e,t,r){t.ending=!0,at(e,t),r&&(t.finished?Te.nextTick(r):e.once("finish",r)),t.ended=!0,e.writable=!1}function Cs(e,t,r){var i=e.entry;for(e.entry=null;i;){var n=i.callback;t.pendingcb--,n(r),i=i.next}t.corkedRequestsFree.next=e}Object.defineProperty(j.prototype,"destroyed",{get:function(){return this._writableState===void 0?!1:this._writableState.destroyed},set:function(e){this._writableState&&(this._writableState.destroyed=e)}});j.prototype.destroy=Jn.destroy;j.prototype._undestroy=Jn.undestroy;j.prototype._destroy=function(e,t){this.end(),t(e)}});var Me=b((Oy,aa)=>{"use strict";var ra=it(),Us=Object.keys||function(e){var t=[];for(var r in e)t.push(r);return t};aa.exports=ae;var ia=Object.create(Ce());ia.inherits=k();var na=Vr(),Yr=zr();ia.inherits(ae,na);for(Gr=Us(Yr.prototype),Ht=0;Ht<Gr.length;Ht++)zt=Gr[Ht],ae.prototype[zt]||(ae.prototype[zt]=Yr.prototype[zt]);var Gr,zt,Ht;function ae(e){if(!(this instanceof ae))return new ae(e);na.call(this,e),Yr.call(this,e),e&&e.readable===!1&&(this.readable=!1),e&&e.writable===!1&&(this.writable=!1),this.allowHalfOpen=!0,e&&e.allowHalfOpen===!1&&(this.allowHalfOpen=!1),this.once("end",Fs)}Object.defineProperty(ae.prototype,"writableHighWaterMark",{enumerable:!1,get:function(){return this._writableState.highWaterMark}});function Fs(){this.allowHalfOpen||this._writableState.ended||ra.nextTick(Ws,this)}function Ws(e){e.end()}Object.defineProperty(ae.prototype,"destroyed",{get:function(){return this._readableState===void 0||this._writableState===void 0?!1:this._readableState.destroyed&&this._writableState.destroyed},set:function(e){this._readableState===void 0||this._writableState===void 0||(this._readableState.destroyed=e,this._writableState.destroyed=e)}});ae.prototype._destroy=function(e,t){this.push(null),this.end(),ra.nextTick(t,e)}});var ua=b(($r,oa)=>{var Gt=require("buffer"),fe=Gt.Buffer;function fa(e,t){for(var r in e)t[r]=e[r]}fe.from&&fe.alloc&&fe.allocUnsafe&&fe.allocUnsafeSlow?oa.exports=Gt:(fa(Gt,$r),$r.Buffer=Fe);function Fe(e,t,r){return fe(e,t,r)}fa(fe,Fe);Fe.from=function(e,t,r){if(typeof e=="number")throw new TypeError("Argument must not be a number");return fe(e,t,r)};Fe.alloc=function(e,t,r){if(typeof e!="number")throw new TypeError("Argument must be a number");var i=fe(e);return t!==void 0?typeof r=="string"?i.fill(t,r):i.fill(t):i.fill(0),i};Fe.allocUnsafe=function(e){if(typeof e!="number")throw new TypeError("Argument must be a number");return fe(e)};Fe.allocUnsafeSlow=function(e){if(typeof e!="number")throw new TypeError("Argument must be a number");return Gt.SlowBuffer(e)}});var Ae=b(la=>{"use strict";var Zr=ua().Buffer,sa=Zr.isEncoding||function(e){switch(e=""+e,e&&e.toLowerCase()){case"hex":case"utf8":case"utf-8":case"ascii":case"binary":case"base64":case"ucs2":case"ucs-2":case"utf16le":case"utf-16le":case"raw":return!0;default:return!1}};function Hs(e){if(!e)return"utf8";for(var t;;)switch(e){case"utf8":case"utf-8":return"utf8";case"ucs2":case"ucs-2":case"utf16le":case"utf-16le":return"utf16le";case"latin1":case"binary":return"latin1";case"base64":case"ascii":case"hex":return e;default:if(t)return;e=(""+e).toLowerCase(),t=!0}}function zs(e){var t=Hs(e);if(typeof t!="string"&&(Zr.isEncoding===sa||!sa(e)))throw new Error("Unknown encoding: "+e);return t||e}la.StringDecoder=ot;function ot(e){this.encoding=zs(e);var t;switch(this.encoding){case"utf16le":this.text=Zs,this.end=Xs,t=4;break;case"utf8":this.fillLast=Vs,t=4;break;case"base64":this.text=Js,this.end=Qs,t=3;break;default:this.write=el,this.end=tl;return}this.lastNeed=0,this.lastTotal=0,this.lastChar=Zr.allocUnsafe(t)}ot.prototype.write=function(e){if(e.length===0)return"";var t,r;if(this.lastNeed){if(t=this.fillLast(e),t===void 0)return"";r=this.lastNeed,this.lastNeed=0}else r=0;return r<e.length?t?t+this.text(e,r):this.text(e,r):t||""};ot.prototype.end=Ks;ot.prototype.text=$s;ot.prototype.fillLast=function(e){if(this.lastNeed<=e.length)return e.copy(this.lastChar,this.lastTotal-this.lastNeed,0,this.lastNeed),this.lastChar.toString(this.encoding,0,this.lastTotal);e.copy(this.lastChar,this.lastTotal-this.lastNeed,0,e.length),this.lastNeed-=e.length};function Kr(e){return e<=127?0:e>>5===6?2:e>>4===14?3:e>>3===30?4:e>>6===2?-1:-2}function Gs(e,t,r){var i=t.length-1;if(i<r)return 0;var n=Kr(t[i]);return n>=0?(n>0&&(e.lastNeed=n-1),n):--i<r||n===-2?0:(n=Kr(t[i]),n>=0?(n>0&&(e.lastNeed=n-2),n):--i<r||n===-2?0:(n=Kr(t[i]),n>=0?(n>0&&(n===2?n=0:e.lastNeed=n-3),n):0))}function Ys(e,t,r){if((t[0]&192)!==128)return e.lastNeed=0,"\uFFFD";if(e.lastNeed>1&&t.length>1){if((t[1]&192)!==128)return e.lastNeed=1,"\uFFFD";if(e.lastNeed>2&&t.length>2&&(t[2]&192)!==128)return e.lastNeed=2,"\uFFFD"}}function Vs(e){var t=this.lastTotal-this.lastNeed,r=Ys(this,e,t);if(r!==void 0)return r;if(this.lastNeed<=e.length)return e.copy(this.lastChar,t,0,this.lastNeed),this.lastChar.toString(this.encoding,0,this.lastTotal);e.copy(this.lastChar,t,0,e.length),this.lastNeed-=e.length}function $s(e,t){var r=Gs(this,e,t);if(!this.lastNeed)return e.toString("utf8",t);this.lastTotal=r;var i=e.length-(r-this.lastNeed);return e.copy(this.lastChar,0,i),e.toString("utf8",t,i)}function Ks(e){var t=e&&e.length?this.write(e):"";return this.lastNeed?t+"\uFFFD":t}function Zs(e,t){if((e.length-t)%2===0){var r=e.toString("utf16le",t);if(r){var i=r.charCodeAt(r.length-1);if(i>=55296&&i<=56319)return this.lastNeed=2,this.lastTotal=4,this.lastChar[0]=e[e.length-2],this.lastChar[1]=e[e.length-1],r.slice(0,-1)}return r}return this.lastNeed=1,this.lastTotal=2,this.lastChar[0]=e[e.length-1],e.toString("utf16le",t,e.length-1)}function Xs(e){var t=e&&e.length?this.write(e):"";if(this.lastNeed){var r=this.lastTotal-this.lastNeed;return t+this.lastChar.toString("utf16le",0,r)}return t}function Js(e,t){var r=(e.length-t)%3;return r===0?e.toString("base64",t):(this.lastNeed=3-r,this.lastTotal=3,r===1?this.lastChar[0]=e[e.length-1]:(this.lastChar[0]=e[e.length-2],this.lastChar[1]=e[e.length-1]),e.toString("base64",t,e.length-r))}function Qs(e){var t=e&&e.length?this.write(e):"";return this.lastNeed?t+this.lastChar.toString("base64",0,3-this.lastNeed):t}function el(e){return e.toString(this.encoding)}function tl(e){return e&&e.length?this.write(e):""}});var Vr=b((Py,Ea)=>{"use strict";var He=it();Ea.exports=q;var rl=Cn(),ut;q.ReadableState=ba;var qy=require("events").EventEmitter,pa=function(e,t){return e.listeners(t).length},ti=jr(),st=jt().Buffer,il=(typeof global<"u"?global:typeof window<"u"?window:typeof self<"u"?self:{}).Uint8Array||function(){};function nl(e){return st.from(e)}function al(e){return st.isBuffer(e)||e instanceof il}var ya=Object.create(Ce());ya.inherits=k();var Xr=require("util"),x=void 0;Xr&&Xr.debuglog?x=Xr.debuglog("stream"):x=function(){};var fl=Gn(),ga=Wr(),We;ya.inherits(q,ti);var Jr=["error","close","destroy","pause","resume"];function ol(e,t,r){if(typeof e.prependListener=="function")return e.prependListener(t,r);!e._events||!e._events[t]?e.on(t,r):rl(e._events[t])?e._events[t].unshift(r):e._events[t]=[r,e._events[t]]}function ba(e,t){ut=ut||Me(),e=e||{};var r=t instanceof ut;this.objectMode=!!e.objectMode,r&&(this.objectMode=this.objectMode||!!e.readableObjectMode);var i=e.highWaterMark,n=e.readableHighWaterMark,a=this.objectMode?16:16*1024;i||i===0?this.highWaterMark=i:r&&(n||n===0)?this.highWaterMark=n:this.highWaterMark=a,this.highWaterMark=Math.floor(this.highWaterMark),this.buffer=new fl,this.length=0,this.pipes=null,this.pipesCount=0,this.flowing=null,this.ended=!1,this.endEmitted=!1,this.reading=!1,this.sync=!0,this.needReadable=!1,this.emittedReadable=!1,this.readableListening=!1,this.resumeScheduled=!1,this.destroyed=!1,this.defaultEncoding=e.defaultEncoding||"utf8",this.awaitDrain=0,this.readingMore=!1,this.decoder=null,this.encoding=null,e.encoding&&(We||(We=Ae().StringDecoder),this.decoder=new We(e.encoding),this.encoding=e.encoding)}function q(e){if(ut=ut||Me(),!(this instanceof q))return new q(e);this._readableState=new ba(e,this),this.readable=!0,e&&(typeof e.read=="function"&&(this._read=e.read),typeof e.destroy=="function"&&(this._destroy=e.destroy)),ti.call(this)}Object.defineProperty(q.prototype,"destroyed",{get:function(){return this._readableState===void 0?!1:this._readableState.destroyed},set:function(e){this._readableState&&(this._readableState.destroyed=e)}});q.prototype.destroy=ga.destroy;q.prototype._undestroy=ga.undestroy;q.prototype._destroy=function(e,t){this.push(null),t(e)};q.prototype.push=function(e,t){var r=this._readableState,i;return r.objectMode?i=!0:typeof e=="string"&&(t=t||r.defaultEncoding,t!==r.encoding&&(e=st.from(e,t),t=""),i=!0),_a(this,e,t,!1,i)};q.prototype.unshift=function(e){return _a(this,e,null,!0,!1)};function _a(e,t,r,i,n){var a=e._readableState;if(t===null)a.reading=!1,dl(e,a);else{var f;n||(f=ul(a,t)),f?e.emit("error",f):a.objectMode||t&&t.length>0?(typeof t!="string"&&!a.objectMode&&Object.getPrototypeOf(t)!==st.prototype&&(t=nl(t)),i?a.endEmitted?e.emit("error",new Error("stream.unshift() after end event")):Qr(e,a,t,!0):a.ended?e.emit("error",new Error("stream.push() after EOF")):(a.reading=!1,a.decoder&&!r?(t=a.decoder.write(t),a.objectMode||t.length!==0?Qr(e,a,t,!1):va(e,a)):Qr(e,a,t,!1))):i||(a.reading=!1)}return sl(a)}function Qr(e,t,r,i){t.flowing&&t.length===0&&!t.sync?(e.emit("data",r),e.read(0)):(t.length+=t.objectMode?1:r.length,i?t.buffer.unshift(r):t.buffer.push(r),t.needReadable&&Yt(e)),va(e,t)}function ul(e,t){var r;return!al(t)&&typeof t!="string"&&t!==void 0&&!e.objectMode&&(r=new TypeError("Invalid non-string/buffer chunk")),r}function sl(e){return!e.ended&&(e.needReadable||e.length<e.highWaterMark||e.length===0)}q.prototype.isPaused=function(){return this._readableState.flowing===!1};q.prototype.setEncoding=function(e){return We||(We=Ae().StringDecoder),this._readableState.decoder=new We(e),this._readableState.encoding=e,this};var da=8388608;function ll(e){return e>=da?e=da:(e--,e|=e>>>1,e|=e>>>2,e|=e>>>4,e|=e>>>8,e|=e>>>16,e++),e}function ha(e,t){return e<=0||t.length===0&&t.ended?0:t.objectMode?1:e!==e?t.flowing&&t.length?t.buffer.head.data.length:t.length:(e>t.highWaterMark&&(t.highWaterMark=ll(e)),e<=t.length?e:t.ended?t.length:(t.needReadable=!0,0))}q.prototype.read=function(e){x("read",e),e=parseInt(e,10);var t=this._readableState,r=e;if(e!==0&&(t.emittedReadable=!1),e===0&&t.needReadable&&(t.length>=t.highWaterMark||t.ended))return x("read: emitReadable",t.length,t.ended),t.length===0&&t.ended?ei(this):Yt(this),null;if(e=ha(e,t),e===0&&t.ended)return t.length===0&&ei(this),null;var i=t.needReadable;x("need readable",i),(t.length===0||t.length-e<t.highWaterMark)&&(i=!0,x("length less than watermark",i)),t.ended||t.reading?(i=!1,x("reading or ended",i)):i&&(x("do read"),t.reading=!0,t.sync=!0,t.length===0&&(t.needReadable=!0),this._read(t.highWaterMark),t.sync=!1,t.reading||(e=ha(r,t)));var n;return e>0?n=wa(e,t):n=null,n===null?(t.needReadable=!0,e=0):t.length-=e,t.length===0&&(t.ended||(t.needReadable=!0),r!==e&&t.ended&&ei(this)),n!==null&&this.emit("data",n),n};function dl(e,t){if(!t.ended){if(t.decoder){var r=t.decoder.end();r&&r.length&&(t.buffer.push(r),t.length+=t.objectMode?1:r.length)}t.ended=!0,Yt(e)}}function Yt(e){var t=e._readableState;t.needReadable=!1,t.emittedReadable||(x("emitReadable",t.flowing),t.emittedReadable=!0,t.sync?He.nextTick(ca,e):ca(e))}function ca(e){x("emit readable"),e.emit("readable"),ri(e)}function va(e,t){t.readingMore||(t.readingMore=!0,He.nextTick(hl,e,t))}function hl(e,t){for(var r=t.length;!t.reading&&!t.flowing&&!t.ended&&t.length<t.highWaterMark&&(x("maybeReadMore read 0"),e.read(0),r!==t.length);)r=t.length;t.readingMore=!1}q.prototype._read=function(e){this.emit("error",new Error("_read() is not implemented"))};q.prototype.pipe=function(e,t){var r=this,i=this._readableState;switch(i.pipesCount){case 0:i.pipes=e;break;case 1:i.pipes=[i.pipes,e];break;default:i.pipes.push(e);break}i.pipesCount+=1,x("pipe count=%d opts=%j",i.pipesCount,t);var n=(!t||t.end!==!1)&&e!==process.stdout&&e!==process.stderr,a=n?o:p;i.endEmitted?He.nextTick(a):r.once("end",a),e.on("unpipe",f);function f(g,w){x("onunpipe"),g===r&&w&&w.hasUnpiped===!1&&(w.hasUnpiped=!0,d())}function o(){x("onend"),e.end()}var l=cl(r);e.on("drain",l);var h=!1;function d(){x("cleanup"),e.removeListener("close",s),e.removeListener("finish",c),e.removeListener("drain",l),e.removeListener("error",u),e.removeListener("unpipe",f),r.removeListener("end",o),r.removeListener("end",p),r.removeListener("data",_),h=!0,i.awaitDrain&&(!e._writableState||e._writableState.needDrain)&&l()}var y=!1;r.on("data",_);function _(g){x("ondata"),y=!1;var w=e.write(g);w===!1&&!y&&((i.pipesCount===1&&i.pipes===e||i.pipesCount>1&&ma(i.pipes,e)!==-1)&&!h&&(x("false write response, pause",i.awaitDrain),i.awaitDrain++,y=!0),r.pause())}function u(g){x("onerror",g),p(),e.removeListener("error",u),pa(e,"error")===0&&e.emit("error",g)}ol(e,"error",u);function s(){e.removeListener("finish",c),p()}e.once("close",s);function c(){x("onfinish"),e.removeListener("close",s),p()}e.once("finish",c);function p(){x("unpipe"),r.unpipe(e)}return e.emit("pipe",r),i.flowing||(x("pipe resume"),r.resume()),e};function cl(e){return function(){var t=e._readableState;x("pipeOnDrain",t.awaitDrain),t.awaitDrain&&t.awaitDrain--,t.awaitDrain===0&&pa(e,"data")&&(t.flowing=!0,ri(e))}}q.prototype.unpipe=function(e){var t=this._readableState,r={hasUnpiped:!1};if(t.pipesCount===0)return this;if(t.pipesCount===1)return e&&e!==t.pipes?this:(e||(e=t.pipes),t.pipes=null,t.pipesCount=0,t.flowing=!1,e&&e.emit("unpipe",this,r),this);if(!e){var i=t.pipes,n=t.pipesCount;t.pipes=null,t.pipesCount=0,t.flowing=!1;for(var a=0;a<n;a++)i[a].emit("unpipe",this,{hasUnpiped:!1});return this}var f=ma(t.pipes,e);return f===-1?this:(t.pipes.splice(f,1),t.pipesCount-=1,t.pipesCount===1&&(t.pipes=t.pipes[0]),e.emit("unpipe",this,r),this)};q.prototype.on=function(e,t){var r=ti.prototype.on.call(this,e,t);if(e==="data")this._readableState.flowing!==!1&&this.resume();else if(e==="readable"){var i=this._readableState;!i.endEmitted&&!i.readableListening&&(i.readableListening=i.needReadable=!0,i.emittedReadable=!1,i.reading?i.length&&Yt(this):He.nextTick(pl,this))}return r};q.prototype.addListener=q.prototype.on;function pl(e){x("readable nexttick read 0"),e.read(0)}q.prototype.resume=function(){var e=this._readableState;return e.flowing||(x("resume"),e.flowing=!0,yl(this,e)),this};function yl(e,t){t.resumeScheduled||(t.resumeScheduled=!0,He.nextTick(gl,e,t))}function gl(e,t){t.reading||(x("resume read 0"),e.read(0)),t.resumeScheduled=!1,t.awaitDrain=0,e.emit("resume"),ri(e),t.flowing&&!t.reading&&e.read(0)}q.prototype.pause=function(){return x("call pause flowing=%j",this._readableState.flowing),this._readableState.flowing!==!1&&(x("pause"),this._readableState.flowing=!1,this.emit("pause")),this};function ri(e){var t=e._readableState;for(x("flow",t.flowing);t.flowing&&e.read()!==null;);}q.prototype.wrap=function(e){var t=this,r=this._readableState,i=!1;e.on("end",function(){if(x("wrapped end"),r.decoder&&!r.ended){var f=r.decoder.end();f&&f.length&&t.push(f)}t.push(null)}),e.on("data",function(f){if(x("wrapped data"),r.decoder&&(f=r.decoder.write(f)),!(r.objectMode&&f==null)&&!(!r.objectMode&&(!f||!f.length))){var o=t.push(f);o||(i=!0,e.pause())}});for(var n in e)this[n]===void 0&&typeof e[n]=="function"&&(this[n]=function(f){return function(){return e[f].apply(e,arguments)}}(n));for(var a=0;a<Jr.length;a++)e.on(Jr[a],this.emit.bind(this,Jr[a]));return this._read=function(f){x("wrapped _read",f),i&&(i=!1,e.resume())},this};Object.defineProperty(q.prototype,"readableHighWaterMark",{enumerable:!1,get:function(){return this._readableState.highWaterMark}});q._fromList=wa;function wa(e,t){if(t.length===0)return null;var r;return t.objectMode?r=t.buffer.shift():!e||e>=t.length?(t.decoder?r=t.buffer.join(""):t.buffer.length===1?r=t.buffer.head.data:r=t.buffer.concat(t.length),t.buffer.clear()):r=bl(e,t.buffer,t.decoder),r}function bl(e,t,r){var i;return e<t.head.data.length?(i=t.head.data.slice(0,e),t.head.data=t.head.data.slice(e)):e===t.head.data.length?i=t.shift():i=r?_l(e,t):vl(e,t),i}function _l(e,t){var r=t.head,i=1,n=r.data;for(e-=n.length;r=r.next;){var a=r.data,f=e>a.length?a.length:e;if(f===a.length?n+=a:n+=a.slice(0,e),e-=f,e===0){f===a.length?(++i,r.next?t.head=r.next:t.head=t.tail=null):(t.head=r,r.data=a.slice(f));break}++i}return t.length-=i,n}function vl(e,t){var r=st.allocUnsafe(e),i=t.head,n=1;for(i.data.copy(r),e-=i.data.length;i=i.next;){var a=i.data,f=e>a.length?a.length:e;if(a.copy(r,r.length-e,0,f),e-=f,e===0){f===a.length?(++n,i.next?t.head=i.next:t.head=t.tail=null):(t.head=i,i.data=a.slice(f));break}++n}return t.length-=n,r}function ei(e){var t=e._readableState;if(t.length>0)throw new Error('"endReadable()" called on non-empty stream');t.endEmitted||(t.ended=!0,He.nextTick(wl,t,e))}function wl(e,t){!e.endEmitted&&e.length===0&&(e.endEmitted=!0,t.readable=!1,t.emit("end"))}function ma(e,t){for(var r=0,i=e.length;r<i;r++)if(e[r]===t)return r;return-1}});var ii=b((Iy,Ta)=>{"use strict";Ta.exports=oe;var Vt=Me(),Ra=Object.create(Ce());Ra.inherits=k();Ra.inherits(oe,Vt);function ml(e,t){var r=this._transformState;r.transforming=!1;var i=r.writecb;if(!i)return this.emit("error",new Error("write callback called multiple times"));r.writechunk=null,r.writecb=null,t!=null&&this.push(t),i(e);var n=this._readableState;n.reading=!1,(n.needReadable||n.length<n.highWaterMark)&&this._read(n.highWaterMark)}function oe(e){if(!(this instanceof oe))return new oe(e);Vt.call(this,e),this._transformState={afterTransform:ml.bind(this),needTransform:!1,transforming:!1,writecb:null,writechunk:null,writeencoding:null},this._readableState.needReadable=!0,this._readableState.sync=!1,e&&(typeof e.transform=="function"&&(this._transform=e.transform),typeof e.flush=="function"&&(this._flush=e.flush)),this.on("prefinish",El)}function El(){var e=this;typeof this._flush=="function"?this._flush(function(t,r){Sa(e,t,r)}):Sa(this,null,null)}oe.prototype.push=function(e,t){return this._transformState.needTransform=!1,Vt.prototype.push.call(this,e,t)};oe.prototype._transform=function(e,t,r){throw new Error("_transform() is not implemented")};oe.prototype._write=function(e,t,r){var i=this._transformState;if(i.writecb=r,i.writechunk=e,i.writeencoding=t,!i.transforming){var n=this._readableState;(i.needTransform||n.needReadable||n.length<n.highWaterMark)&&this._read(n.highWaterMark)}};oe.prototype._read=function(e){var t=this._transformState;t.writechunk!==null&&t.writecb&&!t.transforming?(t.transforming=!0,this._transform(t.writechunk,t.writeencoding,t.afterTransform)):t.needTransform=!0};oe.prototype._destroy=function(e,t){var r=this;Vt.prototype._destroy.call(this,e,function(i){t(i),r.emit("close")})};function Sa(e,t,r){if(t)return e.emit("error",t);if(r!=null&&e.push(r),e._writableState.length)throw new Error("Calling transform done when ws.length != 0");if(e._transformState.transforming)throw new Error("Calling transform done when still transforming");return e.push(null)}});var Oa=b((Dy,xa)=>{"use strict";xa.exports=lt;var Ma=ii(),Aa=Object.create(Ce());Aa.inherits=k();Aa.inherits(lt,Ma);function lt(e){if(!(this instanceof lt))return new lt(e);Ma.call(this,e)}lt.prototype._transform=function(e,t,r){r(null,e)}});var ni=b((C,$t)=>{var Q=require("stream");process.env.READABLE_STREAM==="disable"&&Q?($t.exports=Q,C=$t.exports=Q.Readable,C.Readable=Q.Readable,C.Writable=Q.Writable,C.Duplex=Q.Duplex,C.Transform=Q.Transform,C.PassThrough=Q.PassThrough,C.Stream=Q):(C=$t.exports=Vr(),C.Stream=Q||C,C.Readable=C,C.Writable=zr(),C.Duplex=Me(),C.Transform=ii(),C.PassThrough=Oa())});var qa=b((Ny,La)=>{La.exports=ni().Duplex});var fi=b((ai,Ia)=>{var Kt=require("buffer"),ee=Kt.Buffer;function Pa(e,t){for(var r in e)t[r]=e[r]}ee.from&&ee.alloc&&ee.allocUnsafe&&ee.allocUnsafeSlow?Ia.exports=Kt:(Pa(Kt,ai),ai.Buffer=xe);function xe(e,t,r){return ee(e,t,r)}xe.prototype=Object.create(ee.prototype);Pa(ee,xe);xe.from=function(e,t,r){if(typeof e=="number")throw new TypeError("Argument must not be a number");return ee(e,t,r)};xe.alloc=function(e,t,r){if(typeof e!="number")throw new TypeError("Argument must be a number");var i=ee(e);return t!==void 0?typeof r=="string"?i.fill(t,r):i.fill(t):i.fill(0),i};xe.allocUnsafe=function(e){if(typeof e!="number")throw new TypeError("Argument must be a number");return ee(e)};xe.allocUnsafeSlow=function(e){if(typeof e!="number")throw new TypeError("Argument must be a number");return Kt.SlowBuffer(e)}});var Na=b((jy,Da)=>{var oi=qa(),Sl=require("util"),ze=fi().Buffer;function I(e){if(!(this instanceof I))return new I(e);if(this._bufs=[],this.length=0,typeof e=="function"){this._callback=e;var t=function(i){this._callback&&(this._callback(i),this._callback=null)}.bind(this);this.on("pipe",function(i){i.on("error",t)}),this.on("unpipe",function(i){i.removeListener("error",t)})}else this.append(e);oi.call(this)}Sl.inherits(I,oi);I.prototype._offset=function(t){var r=0,i=0,n;if(t===0)return[0,0];for(;i<this._bufs.length;i++){if(n=r+this._bufs[i].length,t<n||i==this._bufs.length-1)return[i,t-r];r=n}};I.prototype.append=function(t){var r=0;if(ze.isBuffer(t))this._appendBuffer(t);else if(Array.isArray(t))for(;r<t.length;r++)this.append(t[r]);else if(t instanceof I)for(;r<t._bufs.length;r++)this.append(t._bufs[r]);else t!=null&&(typeof t=="number"&&(t=t.toString()),this._appendBuffer(ze.from(t)));return this};I.prototype._appendBuffer=function(t){this._bufs.push(t),this.length+=t.length};I.prototype._write=function(t,r,i){this._appendBuffer(t),typeof i=="function"&&i()};I.prototype._read=function(t){if(!this.length)return this.push(null);t=Math.min(t,this.length),this.push(this.slice(0,t)),this.consume(t)};I.prototype.end=function(t){oi.prototype.end.call(this,t),this._callback&&(this._callback(null,this.slice()),this._callback=null)};I.prototype.get=function(t){return this.slice(t,t+1)[0]};I.prototype.slice=function(t,r){return typeof t=="number"&&t<0&&(t+=this.length),typeof r=="number"&&r<0&&(r+=this.length),this.copy(null,0,t,r)};I.prototype.copy=function(t,r,i,n){if((typeof i!="number"||i<0)&&(i=0),(typeof n!="number"||n>this.length)&&(n=this.length),i>=this.length||n<=0)return t||ze.alloc(0);var a=!!t,f=this._offset(i),o=n-i,l=o,h=a&&r||0,d=f[1],y,_;if(i===0&&n==this.length){if(!a)return this._bufs.length===1?this._bufs[0]:ze.concat(this._bufs,this.length);for(_=0;_<this._bufs.length;_++)this._bufs[_].copy(t,h),h+=this._bufs[_].length;return t}if(l<=this._bufs[f[0]].length-d)return a?this._bufs[f[0]].copy(t,r,d,d+l):this._bufs[f[0]].slice(d,d+l);for(a||(t=ze.allocUnsafe(o)),_=f[0];_<this._bufs.length;_++){if(y=this._bufs[_].length-d,l>y)this._bufs[_].copy(t,h,d),h+=y;else{this._bufs[_].copy(t,h,d,d+l),h+=y;break}l-=y,d&&(d=0)}return t.length>h?t.slice(0,h):t};I.prototype.shallowSlice=function(t,r){t=t||0,r=r||this.length,t<0&&(t+=this.length),r<0&&(r+=this.length);var i=this._offset(t),n=this._offset(r),a=this._bufs.slice(i[0],n[0]+1);return n[1]==0?a.pop():a[a.length-1]=a[a.length-1].slice(0,n[1]),i[1]!=0&&(a[0]=a[0].slice(i[1])),new I(a)};I.prototype.toString=function(t,r,i){return this.slice(r,i).toString(t)};I.prototype.consume=function(t){if(t=Math.trunc(t),Number.isNaN(t)||t<=0)return this;for(;this._bufs.length;)if(t>=this._bufs[0].length)t-=this._bufs[0].length,this.length-=this._bufs[0].length,this._bufs.shift();else{this._bufs[0]=this._bufs[0].slice(t),this.length-=t;break}return this};I.prototype.duplicate=function(){for(var t=0,r=new I;t<this._bufs.length;t++)r.append(this._bufs[t]);return r};I.prototype.destroy=function(){this._bufs.length=0,this.length=0,this.push(null)};(function(){var e={readDoubleBE:8,readDoubleLE:8,readFloatBE:4,readFloatLE:4,readInt32BE:4,readInt32LE:4,readUInt32BE:4,readUInt32LE:4,readInt16BE:2,readInt16LE:2,readUInt16BE:2,readUInt16LE:2,readInt8:1,readUInt8:1};for(var t in e)(function(r){I.prototype[r]=function(i){return this.slice(i,i+e[r])[r](0)}})(t)})();Da.exports=I});var ja=b(si=>{var ui=Pt();si.size=ui.size;si.decode=function(e){var t=ui.decodeHex(e,96),r=ui.decode(e);return r.checksum=t,r}});var ka=b(Ba=>{var Rl=ja(),Tl=Pt(),Ml=Pr();Ba.type=function(e){var t;if(parseInt(e.toString("ascii",0,2),256)===parseInt(70707,8))throw new Error("Old Binary format is not supported");var r=e.toString("ascii",0,6);switch(r){case"070707":t=Ml;break;case"070701":t=Tl;break;case"070702":t=Rl;break;case"707070":case"707010":case"707020":throw new Error("Small endianess not supported");default:throw new Error('Not a cpio (magic = "'+r+'")')}return e.consume(6),t}});var li=b((Cy,Ca)=>{Ca.exports=require("stream")});var Ga=b((Uy,za)=>{"use strict";function Ua(e,t){var r=Object.keys(e);if(Object.getOwnPropertySymbols){var i=Object.getOwnPropertySymbols(e);t&&(i=i.filter(function(n){return Object.getOwnPropertyDescriptor(e,n).enumerable})),r.push.apply(r,i)}return r}function Fa(e){for(var t=1;t<arguments.length;t++){var r=arguments[t]!=null?arguments[t]:{};t%2?Ua(Object(r),!0).forEach(function(i){Al(e,i,r[i])}):Object.getOwnPropertyDescriptors?Object.defineProperties(e,Object.getOwnPropertyDescriptors(r)):Ua(Object(r)).forEach(function(i){Object.defineProperty(e,i,Object.getOwnPropertyDescriptor(r,i))})}return e}function Al(e,t,r){return t=Ha(t),t in e?Object.defineProperty(e,t,{value:r,enumerable:!0,configurable:!0,writable:!0}):e[t]=r,e}function xl(e,t){if(!(e instanceof t))throw new TypeError("Cannot call a class as a function")}function Wa(e,t){for(var r=0;r<t.length;r++){var i=t[r];i.enumerable=i.enumerable||!1,i.configurable=!0,"value"in i&&(i.writable=!0),Object.defineProperty(e,Ha(i.key),i)}}function Ol(e,t,r){return t&&Wa(e.prototype,t),r&&Wa(e,r),Object.defineProperty(e,"prototype",{writable:!1}),e}function Ha(e){var t=Ll(e,"string");return typeof t=="symbol"?t:String(t)}function Ll(e,t){if(typeof e!="object"||e===null)return e;var r=e[Symbol.toPrimitive];if(r!==void 0){var i=r.call(e,t||"default");if(typeof i!="object")return i;throw new TypeError("@@toPrimitive must return a primitive value.")}return(t==="string"?String:Number)(e)}var ql=require("buffer"),Zt=ql.Buffer,Pl=require("util"),di=Pl.inspect,Il=di&&di.custom||"inspect";function Dl(e,t,r){Zt.prototype.copy.call(e,t,r)}za.exports=function(){function e(){xl(this,e),this.head=null,this.tail=null,this.length=0}return Ol(e,[{key:"push",value:function(r){var i={data:r,next:null};this.length>0?this.tail.next=i:this.head=i,this.tail=i,++this.length}},{key:"unshift",value:function(r){var i={data:r,next:this.head};this.length===0&&(this.tail=i),this.head=i,++this.length}},{key:"shift",value:function(){if(this.length!==0){var r=this.head.data;return this.length===1?this.head=this.tail=null:this.head=this.head.next,--this.length,r}}},{key:"clear",value:function(){this.head=this.tail=null,this.length=0}},{key:"join",value:function(r){if(this.length===0)return"";for(var i=this.head,n=""+i.data;i=i.next;)n+=r+i.data;return n}},{key:"concat",value:function(r){if(this.length===0)return Zt.alloc(0);for(var i=Zt.allocUnsafe(r>>>0),n=this.head,a=0;n;)Dl(n.data,i,a),a+=n.data.length,n=n.next;return i}},{key:"consume",value:function(r,i){var n;return r<this.head.data.length?(n=this.head.data.slice(0,r),this.head.data=this.head.data.slice(r)):r===this.head.data.length?n=this.shift():n=i?this._getString(r):this._getBuffer(r),n}},{key:"first",value:function(){return this.head.data}},{key:"_getString",value:function(r){var i=this.head,n=1,a=i.data;for(r-=a.length;i=i.next;){var f=i.data,o=r>f.length?f.length:r;if(o===f.length?a+=f:a+=f.slice(0,r),r-=o,r===0){o===f.length?(++n,i.next?this.head=i.next:this.head=this.tail=null):(this.head=i,i.data=f.slice(o));break}++n}return this.length-=n,a}},{key:"_getBuffer",value:function(r){var i=Zt.allocUnsafe(r),n=this.head,a=1;for(n.data.copy(i),r-=n.data.length;n=n.next;){var f=n.data,o=r>f.length?f.length:r;if(f.copy(i,i.length-r,0,o),r-=o,r===0){o===f.length?(++a,n.next?this.head=n.next:this.head=this.tail=null):(this.head=n,n.data=f.slice(o));break}++a}return this.length-=a,i}},{key:Il,value:function(r,i){return di(this,Fa(Fa({},i),{},{depth:0,customInspect:!1}))}}]),e}()});var ci=b((Fy,Va)=>{"use strict";function Nl(e,t){var r=this,i=this._readableState&&this._readableState.destroyed,n=this._writableState&&this._writableState.destroyed;return i||n?(t?t(e):e&&(this._writ