rsnext/packages/next/compiled/node-libs-browser/passthrough.js
Steven 777957e6b1
Compile native-url and node-libs-browser (#30032)
This prevents useless warnings about querystring.

```
warning next > native-url > querystring@0.2.1: The querystring API is considered Legacy. new code should use the URLSearchParams API instead.
warning next > node-libs-browser > url > querystring@0.2.0: The querystring API is considered Legacy. new code should use the URLSearchParams API instead.
```
2021-10-18 15:46:39 +00:00

1 line
No EOL
35 KiB
JavaScript
Raw Blame History

module.exports=(()=>{var e={334:(e,t)=>{function isArray(e){if(Array.isArray){return Array.isArray(e)}return objectToString(e)==="[object Array]"}t.isArray=isArray;function isBoolean(e){return typeof e==="boolean"}t.isBoolean=isBoolean;function isNull(e){return e===null}t.isNull=isNull;function isNullOrUndefined(e){return e==null}t.isNullOrUndefined=isNullOrUndefined;function isNumber(e){return typeof e==="number"}t.isNumber=isNumber;function isString(e){return typeof e==="string"}t.isString=isString;function isSymbol(e){return typeof e==="symbol"}t.isSymbol=isSymbol;function isUndefined(e){return e===void 0}t.isUndefined=isUndefined;function isRegExp(e){return objectToString(e)==="[object RegExp]"}t.isRegExp=isRegExp;function isObject(e){return typeof e==="object"&&e!==null}t.isObject=isObject;function isDate(e){return objectToString(e)==="[object Date]"}t.isDate=isDate;function isError(e){return objectToString(e)==="[object Error]"||e instanceof Error}t.isError=isError;function isFunction(e){return typeof e==="function"}t.isFunction=isFunction;function isPrimitive(e){return e===null||typeof e==="boolean"||typeof e==="number"||typeof e==="string"||typeof e==="symbol"||typeof e==="undefined"}t.isPrimitive=isPrimitive;t.isBuffer=Buffer.isBuffer;function objectToString(e){return Object.prototype.toString.call(e)}},989:(e,t,i)=>{try{var r=i(669);if(typeof r.inherits!=="function")throw"";e.exports=r.inherits}catch(t){e.exports=i(350)}},350:e=>{if(typeof Object.create==="function"){e.exports=function inherits(e,t){if(t){e.super_=t;e.prototype=Object.create(t.prototype,{constructor:{value:e,enumerable:false,writable:true,configurable:true}})}}}else{e.exports=function inherits(e,t){if(t){e.super_=t;var i=function(){};i.prototype=t.prototype;e.prototype=new i;e.prototype.constructor=e}}}},352:e=>{var t={}.toString;e.exports=Array.isArray||function(e){return t.call(e)=="[object Array]"}},404:e=>{"use strict";if(typeof process==="undefined"||!process.version||process.version.indexOf("v0.")===0||process.version.indexOf("v1.")===0&&process.version.indexOf("v1.8.")!==0){e.exports={nextTick:nextTick}}else{e.exports=process}function nextTick(e,t,i,r){if(typeof e!=="function"){throw new TypeError('"callback" argument must be a function')}var n=arguments.length;var a,f;switch(n){case 0:case 1:return process.nextTick(e);case 2:return process.nextTick(function afterTickOne(){e.call(null,t)});case 3:return process.nextTick(function afterTickTwo(){e.call(null,t,i)});case 4:return process.nextTick(function afterTickThree(){e.call(null,t,i,r)});default:a=new Array(n-1);f=0;while(f<a.length){a[f++]=arguments[f]}return process.nextTick(function afterTick(){e.apply(null,a)})}}},770:(e,t,i)=>{"use strict";var r=i(404);var n=Object.keys||function(e){var t=[];for(var i in e){t.push(i)}return t};e.exports=Duplex;var a=Object.create(i(334));a.inherits=i(989);var f=i(341);var o=i(63);a.inherits(Duplex,f);{var l=n(o.prototype);for(var s=0;s<l.length;s++){var u=l[s];if(!Duplex.prototype[u])Duplex.prototype[u]=o.prototype[u]}}function Duplex(e){if(!(this instanceof Duplex))return new Duplex(e);f.call(this,e);o.call(this,e);if(e&&e.readable===false)this.readable=false;if(e&&e.writable===false)this.writable=false;this.allowHalfOpen=true;if(e&&e.allowHalfOpen===false)this.allowHalfOpen=false;this.once("end",onend)}Object.defineProperty(Duplex.prototype,"writableHighWaterMark",{enumerable:false,get:function(){return this._writableState.highWaterMark}});function onend(){if(this.allowHalfOpen||this._writableState.ended)return;r.nextTick(onEndNT,this)}function onEndNT(e){e.end()}Object.defineProperty(Duplex.prototype,"destroyed",{get:function(){if(this._readableState===undefined||this._writableState===undefined){return false}return this._readableState.destroyed&&this._writableState.destroyed},set:function(e){if(this._readableState===undefined||this._writableState===undefined){return}this._readableState.destroyed=e;this._writableState.destroyed=e}});Duplex.prototype._destroy=function(e,t){this.push(null);this.end();r.nextTick(t,e)}},143:(e,t,i)=>{"use strict";e.exports=PassThrough;var r=i(826);var n=Object.create(i(334));n.inherits=i(989);n.inherits(PassThrough,r);function PassThrough(e){if(!(this instanceof PassThrough))return new PassThrough(e);r.call(this,e)}PassThrough.prototype._transform=function(e,t,i){i(null,e)}},341:(e,t,i)=>{"use strict";var r=i(404);e.exports=Readable;var n=i(352);var a;Readable.ReadableState=ReadableState;var f=i(614).EventEmitter;var o=function(e,t){return e.listeners(t).length};var l=i(65);var s=i(788).Buffer;var u=global.Uint8Array||function(){};function _uint8ArrayToBuffer(e){return s.from(e)}function _isUint8Array(e){return s.isBuffer(e)||e instanceof u}var d=Object.create(i(334));d.inherits=i(989);var h=i(669);var c=void 0;if(h&&h.debuglog){c=h.debuglog("stream")}else{c=function(){}}var p=i(878);var b=i(915);var g;d.inherits(Readable,l);var y=["error","close","destroy","pause","resume"];function prependListener(e,t,i){if(typeof e.prependListener==="function")return e.prependListener(t,i);if(!e._events||!e._events[t])e.on(t,i);else if(n(e._events[t]))e._events[t].unshift(i);else e._events[t]=[i,e._events[t]]}function ReadableState(e,t){a=a||i(770);e=e||{};var r=t instanceof a;this.objectMode=!!e.objectMode;if(r)this.objectMode=this.objectMode||!!e.readableObjectMode;var n=e.highWaterMark;var f=e.readableHighWaterMark;var o=this.objectMode?16:16*1024;if(n||n===0)this.highWaterMark=n;else if(r&&(f||f===0))this.highWaterMark=f;else this.highWaterMark=o;this.highWaterMark=Math.floor(this.highWaterMark);this.buffer=new p;this.length=0;this.pipes=null;this.pipesCount=0;this.flowing=null;this.ended=false;this.endEmitted=false;this.reading=false;this.sync=true;this.needReadable=false;this.emittedReadable=false;this.readableListening=false;this.resumeScheduled=false;this.destroyed=false;this.defaultEncoding=e.defaultEncoding||"utf8";this.awaitDrain=0;this.readingMore=false;this.decoder=null;this.encoding=null;if(e.encoding){if(!g)g=i(395).s;this.decoder=new g(e.encoding);this.encoding=e.encoding}}function Readable(e){a=a||i(770);if(!(this instanceof Readable))return new Readable(e);this._readableState=new ReadableState(e,this);this.readable=true;if(e){if(typeof e.read==="function")this._read=e.read;if(typeof e.destroy==="function")this._destroy=e.destroy}l.call(this)}Object.defineProperty(Readable.prototype,"destroyed",{get:function(){if(this._readableState===undefined){return false}return this._readableState.destroyed},set:function(e){if(!this._readableState){return}this._readableState.destroyed=e}});Readable.prototype.destroy=b.destroy;Readable.prototype._undestroy=b.undestroy;Readable.prototype._destroy=function(e,t){this.push(null);t(e)};Readable.prototype.push=function(e,t){var i=this._readableState;var r;if(!i.objectMode){if(typeof e==="string"){t=t||i.defaultEncoding;if(t!==i.encoding){e=s.from(e,t);t=""}r=true}}else{r=true}return readableAddChunk(this,e,t,false,r)};Readable.prototype.unshift=function(e){return readableAddChunk(this,e,null,true,false)};function readableAddChunk(e,t,i,r,n){var a=e._readableState;if(t===null){a.reading=false;onEofChunk(e,a)}else{var f;if(!n)f=chunkInvalid(a,t);if(f){e.emit("error",f)}else if(a.objectMode||t&&t.length>0){if(typeof t!=="string"&&!a.objectMode&&Object.getPrototypeOf(t)!==s.prototype){t=_uint8ArrayToBuffer(t)}if(r){if(a.endEmitted)e.emit("error",new Error("stream.unshift() after end event"));else addChunk(e,a,t,true)}else if(a.ended){e.emit("error",new Error("stream.push() after EOF"))}else{a.reading=false;if(a.decoder&&!i){t=a.decoder.write(t);if(a.objectMode||t.length!==0)addChunk(e,a,t,false);else maybeReadMore(e,a)}else{addChunk(e,a,t,false)}}}else if(!r){a.reading=false}}return needMoreData(a)}function addChunk(e,t,i,r){if(t.flowing&&t.length===0&&!t.sync){e.emit("data",i);e.read(0)}else{t.length+=t.objectMode?1:i.length;if(r)t.buffer.unshift(i);else t.buffer.push(i);if(t.needReadable)emitReadable(e)}maybeReadMore(e,t)}function chunkInvalid(e,t){var i;if(!_isUint8Array(t)&&typeof t!=="string"&&t!==undefined&&!e.objectMode){i=new TypeError("Invalid non-string/buffer chunk")}return i}function needMoreData(e){return!e.ended&&(e.needReadable||e.length<e.highWaterMark||e.length===0)}Readable.prototype.isPaused=function(){return this._readableState.flowing===false};Readable.prototype.setEncoding=function(e){if(!g)g=i(395).s;this._readableState.decoder=new g(e);this._readableState.encoding=e;return this};var w=8388608;function computeNewHighWaterMark(e){if(e>=w){e=w}else{e--;e|=e>>>1;e|=e>>>2;e|=e>>>4;e|=e>>>8;e|=e>>>16;e++}return e}function howMuchToRead(e,t){if(e<=0||t.length===0&&t.ended)return 0;if(t.objectMode)return 1;if(e!==e){if(t.flowing&&t.length)return t.buffer.head.data.length;else return t.length}if(e>t.highWaterMark)t.highWaterMark=computeNewHighWaterMark(e);if(e<=t.length)return e;if(!t.ended){t.needReadable=true;return 0}return t.length}Readable.prototype.read=function(e){c("read",e);e=parseInt(e,10);var t=this._readableState;var i=e;if(e!==0)t.emittedReadable=false;if(e===0&&t.needReadable&&(t.length>=t.highWaterMark||t.ended)){c("read: emitReadable",t.length,t.ended);if(t.length===0&&t.ended)endReadable(this);else emitReadable(this);return null}e=howMuchToRead(e,t);if(e===0&&t.ended){if(t.length===0)endReadable(this);return null}var r=t.needReadable;c("need readable",r);if(t.length===0||t.length-e<t.highWaterMark){r=true;c("length less than watermark",r)}if(t.ended||t.reading){r=false;c("reading or ended",r)}else if(r){c("do read");t.reading=true;t.sync=true;if(t.length===0)t.needReadable=true;this._read(t.highWaterMark);t.sync=false;if(!t.reading)e=howMuchToRead(i,t)}var n;if(e>0)n=fromList(e,t);else n=null;if(n===null){t.needReadable=true;e=0}else{t.length-=e}if(t.length===0){if(!t.ended)t.needReadable=true;if(i!==e&&t.ended)endReadable(this)}if(n!==null)this.emit("data",n);return n};function onEofChunk(e,t){if(t.ended)return;if(t.decoder){var i=t.decoder.end();if(i&&i.length){t.buffer.push(i);t.length+=t.objectMode?1:i.length}}t.ended=true;emitReadable(e)}function emitReadable(e){var t=e._readableState;t.needReadable=false;if(!t.emittedReadable){c("emitReadable",t.flowing);t.emittedReadable=true;if(t.sync)r.nextTick(emitReadable_,e);else emitReadable_(e)}}function emitReadable_(e){c("emit readable");e.emit("readable");flow(e)}function maybeReadMore(e,t){if(!t.readingMore){t.readingMore=true;r.nextTick(maybeReadMore_,e,t)}}function maybeReadMore_(e,t){var i=t.length;while(!t.reading&&!t.flowing&&!t.ended&&t.length<t.highWaterMark){c("maybeReadMore read 0");e.read(0);if(i===t.length)break;else i=t.length}t.readingMore=false}Readable.prototype._read=function(e){this.emit("error",new Error("_read() is not implemented"))};Readable.prototype.pipe=function(e,t){var i=this;var n=this._readableState;switch(n.pipesCount){case 0:n.pipes=e;break;case 1:n.pipes=[n.pipes,e];break;default:n.pipes.push(e);break}n.pipesCount+=1;c("pipe count=%d opts=%j",n.pipesCount,t);var a=(!t||t.end!==false)&&e!==process.stdout&&e!==process.stderr;var f=a?onend:unpipe;if(n.endEmitted)r.nextTick(f);else i.once("end",f);e.on("unpipe",onunpipe);function onunpipe(e,t){c("onunpipe");if(e===i){if(t&&t.hasUnpiped===false){t.hasUnpiped=true;cleanup()}}}function onend(){c("onend");e.end()}var l=pipeOnDrain(i);e.on("drain",l);var s=false;function cleanup(){c("cleanup");e.removeListener("close",onclose);e.removeListener("finish",onfinish);e.removeListener("drain",l);e.removeListener("error",onerror);e.removeListener("unpipe",onunpipe);i.removeListener("end",onend);i.removeListener("end",unpipe);i.removeListener("data",ondata);s=true;if(n.awaitDrain&&(!e._writableState||e._writableState.needDrain))l()}var u=false;i.on("data",ondata);function ondata(t){c("ondata");u=false;var r=e.write(t);if(false===r&&!u){if((n.pipesCount===1&&n.pipes===e||n.pipesCount>1&&indexOf(n.pipes,e)!==-1)&&!s){c("false write response, pause",i._readableState.awaitDrain);i._readableState.awaitDrain++;u=true}i.pause()}}function onerror(t){c("onerror",t);unpipe();e.removeListener("error",onerror);if(o(e,"error")===0)e.emit("error",t)}prependListener(e,"error",onerror);function onclose(){e.removeListener("finish",onfinish);unpipe()}e.once("close",onclose);function onfinish(){c("onfinish");e.removeListener("close",onclose);unpipe()}e.once("finish",onfinish);function unpipe(){c("unpipe");i.unpipe(e)}e.emit("pipe",i);if(!n.flowing){c("pipe resume");i.resume()}return e};function pipeOnDrain(e){return function(){var t=e._readableState;c("pipeOnDrain",t.awaitDrain);if(t.awaitDrain)t.awaitDrain--;if(t.awaitDrain===0&&o(e,"data")){t.flowing=true;flow(e)}}}Readable.prototype.unpipe=function(e){var t=this._readableState;var i={hasUnpiped:false};if(t.pipesCount===0)return this;if(t.pipesCount===1){if(e&&e!==t.pipes)return this;if(!e)e=t.pipes;t.pipes=null;t.pipesCount=0;t.flowing=false;if(e)e.emit("unpipe",this,i);return this}if(!e){var r=t.pipes;var n=t.pipesCount;t.pipes=null;t.pipesCount=0;t.flowing=false;for(var a=0;a<n;a++){r[a].emit("unpipe",this,i)}return this}var f=indexOf(t.pipes,e);if(f===-1)return this;t.pipes.splice(f,1);t.pipesCount-=1;if(t.pipesCount===1)t.pipes=t.pipes[0];e.emit("unpipe",this,i);return this};Readable.prototype.on=function(e,t){var i=l.prototype.on.call(this,e,t);if(e==="data"){if(this._readableState.flowing!==false)this.resume()}else if(e==="readable"){var n=this._readableState;if(!n.endEmitted&&!n.readableListening){n.readableListening=n.needReadable=true;n.emittedReadable=false;if(!n.reading){r.nextTick(nReadingNextTick,this)}else if(n.length){emitReadable(this)}}}return i};Readable.prototype.addListener=Readable.prototype.on;function nReadingNextTick(e){c("readable nexttick read 0");e.read(0)}Readable.prototype.resume=function(){var e=this._readableState;if(!e.flowing){c("resume");e.flowing=true;resume(this,e)}return this};function resume(e,t){if(!t.resumeScheduled){t.resumeScheduled=true;r.nextTick(resume_,e,t)}}function resume_(e,t){if(!t.reading){c("resume read 0");e.read(0)}t.resumeScheduled=false;t.awaitDrain=0;e.emit("resume");flow(e);if(t.flowing&&!t.reading)e.read(0)}Readable.prototype.pause=function(){c("call pause flowing=%j",this._readableState.flowing);if(false!==this._readableState.flowing){c("pause");this._readableState.flowing=false;this.emit("pause")}return this};function flow(e){var t=e._readableState;c("flow",t.flowing);while(t.flowing&&e.read()!==null){}}Readable.prototype.wrap=function(e){var t=this;var i=this._readableState;var r=false;e.on("end",function(){c("wrapped end");if(i.decoder&&!i.ended){var e=i.decoder.end();if(e&&e.length)t.push(e)}t.push(null)});e.on("data",function(n){c("wrapped data");if(i.decoder)n=i.decoder.write(n);if(i.objectMode&&(n===null||n===undefined))return;else if(!i.objectMode&&(!n||!n.length))return;var a=t.push(n);if(!a){r=true;e.pause()}});for(var n in e){if(this[n]===undefined&&typeof e[n]==="function"){this[n]=function(t){return function(){return e[t].apply(e,arguments)}}(n)}}for(var a=0;a<y.length;a++){e.on(y[a],this.emit.bind(this,y[a]))}this._read=function(t){c("wrapped _read",t);if(r){r=false;e.resume()}};return this};Object.defineProperty(Readable.prototype,"readableHighWaterMark",{enumerable:false,get:function(){return this._readableState.highWaterMark}});Readable._fromList=fromList;function fromList(e,t){if(t.length===0)return null;var i;if(t.objectMode)i=t.buffer.shift();else if(!e||e>=t.length){if(t.decoder)i=t.buffer.join("");else if(t.buffer.length===1)i=t.buffer.head.data;else i=t.buffer.concat(t.length);t.buffer.clear()}else{i=fromListPartial(e,t.buffer,t.decoder)}return i}function fromListPartial(e,t,i){var r;if(e<t.head.data.length){r=t.head.data.slice(0,e);t.head.data=t.head.data.slice(e)}else if(e===t.head.data.length){r=t.shift()}else{r=i?copyFromBufferString(e,t):copyFromBuffer(e,t)}return r}function copyFromBufferString(e,t){var i=t.head;var r=1;var n=i.data;e-=n.length;while(i=i.next){var a=i.data;var f=e>a.length?a.length:e;if(f===a.length)n+=a;else n+=a.slice(0,e);e-=f;if(e===0){if(f===a.length){++r;if(i.next)t.head=i.next;else t.head=t.tail=null}else{t.head=i;i.data=a.slice(f)}break}++r}t.length-=r;return n}function copyFromBuffer(e,t){var i=s.allocUnsafe(e);var r=t.head;var n=1;r.data.copy(i);e-=r.data.length;while(r=r.next){var a=r.data;var f=e>a.length?a.length:e;a.copy(i,i.length-e,0,f);e-=f;if(e===0){if(f===a.length){++n;if(r.next)t.head=r.next;else t.head=t.tail=null}else{t.head=r;r.data=a.slice(f)}break}++n}t.length-=n;return i}function endReadable(e){var t=e._readableState;if(t.length>0)throw new Error('"endReadable()" called on non-empty stream');if(!t.endEmitted){t.ended=true;r.nextTick(endReadableNT,t,e)}}function endReadableNT(e,t){if(!e.endEmitted&&e.length===0){e.endEmitted=true;t.readable=false;t.emit("end")}}function indexOf(e,t){for(var i=0,r=e.length;i<r;i++){if(e[i]===t)return i}return-1}},826:(e,t,i)=>{"use strict";e.exports=Transform;var r=i(770);var n=Object.create(i(334));n.inherits=i(989);n.inherits(Transform,r);function afterTransform(e,t){var i=this._transformState;i.transforming=false;var r=i.writecb;if(!r){return this.emit("error",new Error("write callback called multiple times"))}i.writechunk=null;i.writecb=null;if(t!=null)this.push(t);r(e);var n=this._readableState;n.reading=false;if(n.needReadable||n.length<n.highWaterMark){this._read(n.highWaterMark)}}function Transform(e){if(!(this instanceof Transform))return new Transform(e);r.call(this,e);this._transformState={afterTransform:afterTransform.bind(this),needTransform:false,transforming:false,writecb:null,writechunk:null,writeencoding:null};this._readableState.needReadable=true;this._readableState.sync=false;if(e){if(typeof e.transform==="function")this._transform=e.transform;if(typeof e.flush==="function")this._flush=e.flush}this.on("prefinish",prefinish)}function prefinish(){var e=this;if(typeof this._flush==="function"){this._flush(function(t,i){done(e,t,i)})}else{done(this,null,null)}}Transform.prototype.push=function(e,t){this._transformState.needTransform=false;return r.prototype.push.call(this,e,t)};Transform.prototype._transform=function(e,t,i){throw new Error("_transform() is not implemented")};Transform.prototype._write=function(e,t,i){var r=this._transformState;r.writecb=i;r.writechunk=e;r.writeencoding=t;if(!r.transforming){var n=this._readableState;if(r.needTransform||n.needReadable||n.length<n.highWaterMark)this._read(n.highWaterMark)}};Transform.prototype._read=function(e){var t=this._transformState;if(t.writechunk!==null&&t.writecb&&!t.transforming){t.transforming=true;this._transform(t.writechunk,t.writeencoding,t.afterTransform)}else{t.needTransform=true}};Transform.prototype._destroy=function(e,t){var i=this;r.prototype._destroy.call(this,e,function(e){t(e);i.emit("close")})};function done(e,t,i){if(t)return e.emit("error",t);if(i!=null)e.push(i);if(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)}},63:(e,t,i)=>{"use strict";var r=i(404);e.exports=Writable;function WriteReq(e,t,i){this.chunk=e;this.encoding=t;this.callback=i;this.next=null}function CorkedRequest(e){var t=this;this.next=null;this.entry=null;this.finish=function(){onCorkedFinish(t,e)}}var n=!process.browser&&["v0.10","v0.9."].indexOf(process.version.slice(0,5))>-1?setImmediate:r.nextTick;var a;Writable.WritableState=WritableState;var f=Object.create(i(334));f.inherits=i(989);var o={deprecate:i(262)};var l=i(65);var s=i(788).Buffer;var u=global.Uint8Array||function(){};function _uint8ArrayToBuffer(e){return s.from(e)}function _isUint8Array(e){return s.isBuffer(e)||e instanceof u}var d=i(915);f.inherits(Writable,l);function nop(){}function WritableState(e,t){a=a||i(770);e=e||{};var r=t instanceof a;this.objectMode=!!e.objectMode;if(r)this.objectMode=this.objectMode||!!e.writableObjectMode;var n=e.highWaterMark;var f=e.writableHighWaterMark;var o=this.objectMode?16:16*1024;if(n||n===0)this.highWaterMark=n;else if(r&&(f||f===0))this.highWaterMark=f;else this.highWaterMark=o;this.highWaterMark=Math.floor(this.highWaterMark);this.finalCalled=false;this.needDrain=false;this.ending=false;this.ended=false;this.finished=false;this.destroyed=false;var l=e.decodeStrings===false;this.decodeStrings=!l;this.defaultEncoding=e.defaultEncoding||"utf8";this.length=0;this.writing=false;this.corked=0;this.sync=true;this.bufferProcessing=false;this.onwrite=function(e){onwrite(t,e)};this.writecb=null;this.writelen=0;this.bufferedRequest=null;this.lastBufferedRequest=null;this.pendingcb=0;this.prefinished=false;this.errorEmitted=false;this.bufferedRequestCount=0;this.corkedRequestsFree=new CorkedRequest(this)}WritableState.prototype.getBuffer=function getBuffer(){var e=this.bufferedRequest;var t=[];while(e){t.push(e);e=e.next}return t};(function(){try{Object.defineProperty(WritableState.prototype,"buffer",{get:o.deprecate(function(){return this.getBuffer()},"_writableState.buffer is deprecated. Use _writableState.getBuffer "+"instead.","DEP0003")})}catch(e){}})();var h;if(typeof Symbol==="function"&&Symbol.hasInstance&&typeof Function.prototype[Symbol.hasInstance]==="function"){h=Function.prototype[Symbol.hasInstance];Object.defineProperty(Writable,Symbol.hasInstance,{value:function(e){if(h.call(this,e))return true;if(this!==Writable)return false;return e&&e._writableState instanceof WritableState}})}else{h=function(e){return e instanceof this}}function Writable(e){a=a||i(770);if(!h.call(Writable,this)&&!(this instanceof a)){return new Writable(e)}this._writableState=new WritableState(e,this);this.writable=true;if(e){if(typeof e.write==="function")this._write=e.write;if(typeof e.writev==="function")this._writev=e.writev;if(typeof e.destroy==="function")this._destroy=e.destroy;if(typeof e.final==="function")this._final=e.final}l.call(this)}Writable.prototype.pipe=function(){this.emit("error",new Error("Cannot pipe, not readable"))};function writeAfterEnd(e,t){var i=new Error("write after end");e.emit("error",i);r.nextTick(t,i)}function validChunk(e,t,i,n){var a=true;var f=false;if(i===null){f=new TypeError("May not write null values to stream")}else if(typeof i!=="string"&&i!==undefined&&!t.objectMode){f=new TypeError("Invalid non-string/buffer chunk")}if(f){e.emit("error",f);r.nextTick(n,f);a=false}return a}Writable.prototype.write=function(e,t,i){var r=this._writableState;var n=false;var a=!r.objectMode&&_isUint8Array(e);if(a&&!s.isBuffer(e)){e=_uint8ArrayToBuffer(e)}if(typeof t==="function"){i=t;t=null}if(a)t="buffer";else if(!t)t=r.defaultEncoding;if(typeof i!=="function")i=nop;if(r.ended)writeAfterEnd(this,i);else if(a||validChunk(this,r,e,i)){r.pendingcb++;n=writeOrBuffer(this,r,a,e,t,i)}return n};Writable.prototype.cork=function(){var e=this._writableState;e.corked++};Writable.prototype.uncork=function(){var e=this._writableState;if(e.corked){e.corked--;if(!e.writing&&!e.corked&&!e.finished&&!e.bufferProcessing&&e.bufferedRequest)clearBuffer(this,e)}};Writable.prototype.setDefaultEncoding=function setDefaultEncoding(e){if(typeof e==="string")e=e.toLowerCase();if(!(["hex","utf8","utf-8","ascii","binary","base64","ucs2","ucs-2","utf16le","utf-16le","raw"].indexOf((e+"").toLowerCase())>-1))throw new TypeError("Unknown encoding: "+e);this._writableState.defaultEncoding=e;return this};function decodeChunk(e,t,i){if(!e.objectMode&&e.decodeStrings!==false&&typeof t==="string"){t=s.from(t,i)}return t}Object.defineProperty(Writable.prototype,"writableHighWaterMark",{enumerable:false,get:function(){return this._writableState.highWaterMark}});function writeOrBuffer(e,t,i,r,n,a){if(!i){var f=decodeChunk(t,r,n);if(r!==f){i=true;n="buffer";r=f}}var o=t.objectMode?1:r.length;t.length+=o;var l=t.length<t.highWaterMark;if(!l)t.needDrain=true;if(t.writing||t.corked){var s=t.lastBufferedRequest;t.lastBufferedRequest={chunk:r,encoding:n,isBuf:i,callback:a,next:null};if(s){s.next=t.lastBufferedRequest}else{t.bufferedRequest=t.lastBufferedRequest}t.bufferedRequestCount+=1}else{doWrite(e,t,false,o,r,n,a)}return l}function doWrite(e,t,i,r,n,a,f){t.writelen=r;t.writecb=f;t.writing=true;t.sync=true;if(i)e._writev(n,t.onwrite);else e._write(n,a,t.onwrite);t.sync=false}function onwriteError(e,t,i,n,a){--t.pendingcb;if(i){r.nextTick(a,n);r.nextTick(finishMaybe,e,t);e._writableState.errorEmitted=true;e.emit("error",n)}else{a(n);e._writableState.errorEmitted=true;e.emit("error",n);finishMaybe(e,t)}}function onwriteStateUpdate(e){e.writing=false;e.writecb=null;e.length-=e.writelen;e.writelen=0}function onwrite(e,t){var i=e._writableState;var r=i.sync;var a=i.writecb;onwriteStateUpdate(i);if(t)onwriteError(e,i,r,t,a);else{var f=needFinish(i);if(!f&&!i.corked&&!i.bufferProcessing&&i.bufferedRequest){clearBuffer(e,i)}if(r){n(afterWrite,e,i,f,a)}else{afterWrite(e,i,f,a)}}}function afterWrite(e,t,i,r){if(!i)onwriteDrain(e,t);t.pendingcb--;r();finishMaybe(e,t)}function onwriteDrain(e,t){if(t.length===0&&t.needDrain){t.needDrain=false;e.emit("drain")}}function clearBuffer(e,t){t.bufferProcessing=true;var i=t.bufferedRequest;if(e._writev&&i&&i.next){var r=t.bufferedRequestCount;var n=new Array(r);var a=t.corkedRequestsFree;a.entry=i;var f=0;var o=true;while(i){n[f]=i;if(!i.isBuf)o=false;i=i.next;f+=1}n.allBuffers=o;doWrite(e,t,true,t.length,n,"",a.finish);t.pendingcb++;t.lastBufferedRequest=null;if(a.next){t.corkedRequestsFree=a.next;a.next=null}else{t.corkedRequestsFree=new CorkedRequest(t)}t.bufferedRequestCount=0}else{while(i){var l=i.chunk;var s=i.encoding;var u=i.callback;var d=t.objectMode?1:l.length;doWrite(e,t,false,d,l,s,u);i=i.next;t.bufferedRequestCount--;if(t.writing){break}}if(i===null)t.lastBufferedRequest=null}t.bufferedRequest=i;t.bufferProcessing=false}Writable.prototype._write=function(e,t,i){i(new Error("_write() is not implemented"))};Writable.prototype._writev=null;Writable.prototype.end=function(e,t,i){var r=this._writableState;if(typeof e==="function"){i=e;e=null;t=null}else if(typeof t==="function"){i=t;t=null}if(e!==null&&e!==undefined)this.write(e,t);if(r.corked){r.corked=1;this.uncork()}if(!r.ending&&!r.finished)endWritable(this,r,i)};function needFinish(e){return e.ending&&e.length===0&&e.bufferedRequest===null&&!e.finished&&!e.writing}function callFinal(e,t){e._final(function(i){t.pendingcb--;if(i){e.emit("error",i)}t.prefinished=true;e.emit("prefinish");finishMaybe(e,t)})}function prefinish(e,t){if(!t.prefinished&&!t.finalCalled){if(typeof e._final==="function"){t.pendingcb++;t.finalCalled=true;r.nextTick(callFinal,e,t)}else{t.prefinished=true;e.emit("prefinish")}}}function finishMaybe(e,t){var i=needFinish(t);if(i){prefinish(e,t);if(t.pendingcb===0){t.finished=true;e.emit("finish")}}return i}function endWritable(e,t,i){t.ending=true;finishMaybe(e,t);if(i){if(t.finished)r.nextTick(i);else e.once("finish",i)}t.ended=true;e.writable=false}function onCorkedFinish(e,t,i){var r=e.entry;e.entry=null;while(r){var n=r.callback;t.pendingcb--;n(i);r=r.next}if(t.corkedRequestsFree){t.corkedRequestsFree.next=e}else{t.corkedRequestsFree=e}}Object.defineProperty(Writable.prototype,"destroyed",{get:function(){if(this._writableState===undefined){return false}return this._writableState.destroyed},set:function(e){if(!this._writableState){return}this._writableState.destroyed=e}});Writable.prototype.destroy=d.destroy;Writable.prototype._undestroy=d.undestroy;Writable.prototype._destroy=function(e,t){this.end();t(e)}},878:(e,t,i)=>{"use strict";function _classCallCheck(e,t){if(!(e instanceof t)){throw new TypeError("Cannot call a class as a function")}}var r=i(788).Buffer;var n=i(669);function copyBuffer(e,t,i){e.copy(t,i)}e.exports=function(){function BufferList(){_classCallCheck(this,BufferList);this.head=null;this.tail=null;this.length=0}BufferList.prototype.push=function push(e){var t={data:e,next:null};if(this.length>0)this.tail.next=t;else this.head=t;this.tail=t;++this.length};BufferList.prototype.unshift=function unshift(e){var t={data:e,next:this.head};if(this.length===0)this.tail=t;this.head=t;++this.length};BufferList.prototype.shift=function shift(){if(this.length===0)return;var e=this.head.data;if(this.length===1)this.head=this.tail=null;else this.head=this.head.next;--this.length;return e};BufferList.prototype.clear=function clear(){this.head=this.tail=null;this.length=0};BufferList.prototype.join=function join(e){if(this.length===0)return"";var t=this.head;var i=""+t.data;while(t=t.next){i+=e+t.data}return i};BufferList.prototype.concat=function concat(e){if(this.length===0)return r.alloc(0);if(this.length===1)return this.head.data;var t=r.allocUnsafe(e>>>0);var i=this.head;var n=0;while(i){copyBuffer(i.data,t,n);n+=i.data.length;i=i.next}return t};return BufferList}();if(n&&n.inspect&&n.inspect.custom){e.exports.prototype[n.inspect.custom]=function(){var e=n.inspect({length:this.length});return this.constructor.name+" "+e}}},915:(e,t,i)=>{"use strict";var r=i(404);function destroy(e,t){var i=this;var n=this._readableState&&this._readableState.destroyed;var a=this._writableState&&this._writableState.destroyed;if(n||a){if(t){t(e)}else if(e&&(!this._writableState||!this._writableState.errorEmitted)){r.nextTick(emitErrorNT,this,e)}return this}if(this._readableState){this._readableState.destroyed=true}if(this._writableState){this._writableState.destroyed=true}this._destroy(e||null,function(e){if(!t&&e){r.nextTick(emitErrorNT,i,e);if(i._writableState){i._writableState.errorEmitted=true}}else if(t){t(e)}});return this}function undestroy(){if(this._readableState){this._readableState.destroyed=false;this._readableState.reading=false;this._readableState.ended=false;this._readableState.endEmitted=false}if(this._writableState){this._writableState.destroyed=false;this._writableState.ended=false;this._writableState.ending=false;this._writableState.finished=false;this._writableState.errorEmitted=false}}function emitErrorNT(e,t){e.emit("error",t)}e.exports={destroy:destroy,undestroy:undestroy}},65:(e,t,i)=>{e.exports=i(413)},788:(e,t,i)=>{var r=i(293);var n=r.Buffer;function copyProps(e,t){for(var i in e){t[i]=e[i]}}if(n.from&&n.alloc&&n.allocUnsafe&&n.allocUnsafeSlow){e.exports=r}else{copyProps(r,t);t.Buffer=SafeBuffer}function SafeBuffer(e,t,i){return n(e,t,i)}copyProps(n,SafeBuffer);SafeBuffer.from=function(e,t,i){if(typeof e==="number"){throw new TypeError("Argument must not be a number")}return n(e,t,i)};SafeBuffer.alloc=function(e,t,i){if(typeof e!=="number"){throw new TypeError("Argument must be a number")}var r=n(e);if(t!==undefined){if(typeof i==="string"){r.fill(t,i)}else{r.fill(t)}}else{r.fill(0)}return r};SafeBuffer.allocUnsafe=function(e){if(typeof e!=="number"){throw new TypeError("Argument must be a number")}return n(e)};SafeBuffer.allocUnsafeSlow=function(e){if(typeof e!=="number"){throw new TypeError("Argument must be a number")}return r.SlowBuffer(e)}},395:(e,t,i)=>{"use strict";var r=i(788).Buffer;var n=r.isEncoding||function(e){e=""+e;switch(e&&e.toLowerCase()){case"hex":case"utf8":case"utf-8":case"ascii":case"binary":case"base64":case"ucs2":case"ucs-2":case"utf16le":case"utf-16le":case"raw":return true;default:return false}};function _normalizeEncoding(e){if(!e)return"utf8";var t;while(true){switch(e){case"utf8":case"utf-8":return"utf8";case"ucs2":case"ucs-2":case"utf16le":case"utf-16le":return"utf16le";case"latin1":case"binary":return"latin1";case"base64":case"ascii":case"hex":return e;default:if(t)return;e=(""+e).toLowerCase();t=true}}}function normalizeEncoding(e){var t=_normalizeEncoding(e);if(typeof t!=="string"&&(r.isEncoding===n||!n(e)))throw new Error("Unknown encoding: "+e);return t||e}t.s=StringDecoder;function StringDecoder(e){this.encoding=normalizeEncoding(e);var t;switch(this.encoding){case"utf16le":this.text=utf16Text;this.end=utf16End;t=4;break;case"utf8":this.fillLast=utf8FillLast;t=4;break;case"base64":this.text=base64Text;this.end=base64End;t=3;break;default:this.write=simpleWrite;this.end=simpleEnd;return}this.lastNeed=0;this.lastTotal=0;this.lastChar=r.allocUnsafe(t)}StringDecoder.prototype.write=function(e){if(e.length===0)return"";var t;var i;if(this.lastNeed){t=this.fillLast(e);if(t===undefined)return"";i=this.lastNeed;this.lastNeed=0}else{i=0}if(i<e.length)return t?t+this.text(e,i):this.text(e,i);return t||""};StringDecoder.prototype.end=utf8End;StringDecoder.prototype.text=utf8Text;StringDecoder.prototype.fillLast=function(e){if(this.lastNeed<=e.length){e.copy(this.lastChar,this.lastTotal-this.lastNeed,0,this.lastNeed);return this.lastChar.toString(this.encoding,0,this.lastTotal)}e.copy(this.lastChar,this.lastTotal-this.lastNeed,0,e.length);this.lastNeed-=e.length};function utf8CheckByte(e){if(e<=127)return 0;else if(e>>5===6)return 2;else if(e>>4===14)return 3;else if(e>>3===30)return 4;return e>>6===2?-1:-2}function utf8CheckIncomplete(e,t,i){var r=t.length-1;if(r<i)return 0;var n=utf8CheckByte(t[r]);if(n>=0){if(n>0)e.lastNeed=n-1;return n}if(--r<i||n===-2)return 0;n=utf8CheckByte(t[r]);if(n>=0){if(n>0)e.lastNeed=n-2;return n}if(--r<i||n===-2)return 0;n=utf8CheckByte(t[r]);if(n>=0){if(n>0){if(n===2)n=0;else e.lastNeed=n-3}return n}return 0}function utf8CheckExtraBytes(e,t,i){if((t[0]&192)!==128){e.lastNeed=0;return"<22>"}if(e.lastNeed>1&&t.length>1){if((t[1]&192)!==128){e.lastNeed=1;return"<22>"}if(e.lastNeed>2&&t.length>2){if((t[2]&192)!==128){e.lastNeed=2;return"<22>"}}}}function utf8FillLast(e){var t=this.lastTotal-this.lastNeed;var i=utf8CheckExtraBytes(this,e,t);if(i!==undefined)return i;if(this.lastNeed<=e.length){e.copy(this.lastChar,t,0,this.lastNeed);return this.lastChar.toString(this.encoding,0,this.lastTotal)}e.copy(this.lastChar,t,0,e.length);this.lastNeed-=e.length}function utf8Text(e,t){var i=utf8CheckIncomplete(this,e,t);if(!this.lastNeed)return e.toString("utf8",t);this.lastTotal=i;var r=e.length-(i-this.lastNeed);e.copy(this.lastChar,0,r);return e.toString("utf8",t,r)}function utf8End(e){var t=e&&e.length?this.write(e):"";if(this.lastNeed)return t+"<22>";return t}function utf16Text(e,t){if((e.length-t)%2===0){var i=e.toString("utf16le",t);if(i){var r=i.charCodeAt(i.length-1);if(r>=55296&&r<=56319){this.lastNeed=2;this.lastTotal=4;this.lastChar[0]=e[e.length-2];this.lastChar[1]=e[e.length-1];return i.slice(0,-1)}}return i}this.lastNeed=1;this.lastTotal=2;this.lastChar[0]=e[e.length-1];return e.toString("utf16le",t,e.length-1)}function utf16End(e){var t=e&&e.length?this.write(e):"";if(this.lastNeed){var i=this.lastTotal-this.lastNeed;return t+this.lastChar.toString("utf16le",0,i)}return t}function base64Text(e,t){var i=(e.length-t)%3;if(i===0)return e.toString("base64",t);this.lastNeed=3-i;this.lastTotal=3;if(i===1){this.lastChar[0]=e[e.length-1]}else{this.lastChar[0]=e[e.length-2];this.lastChar[1]=e[e.length-1]}return e.toString("base64",t,e.length-i)}function base64End(e){var t=e&&e.length?this.write(e):"";if(this.lastNeed)return t+this.lastChar.toString("base64",0,3-this.lastNeed);return t}function simpleWrite(e){return e.toString(this.encoding)}function simpleEnd(e){return e&&e.length?this.write(e):""}},376:(e,t,i)=>{e.exports=i(193).PassThrough},193:(e,t,i)=>{var r=i(413);if(process.env.READABLE_STREAM==="disable"&&r){e.exports=r;t=e.exports=r.Readable;t.Readable=r.Readable;t.Writable=r.Writable;t.Duplex=r.Duplex;t.Transform=r.Transform;t.PassThrough=r.PassThrough;t.Stream=r}else{t=e.exports=i(341);t.Stream=r||t;t.Readable=t;t.Writable=i(63);t.Duplex=i(770);t.Transform=i(826);t.PassThrough=i(143)}},262:(e,t,i)=>{e.exports=i(669).deprecate},293:e=>{"use strict";e.exports=require("buffer")},614:e=>{"use strict";e.exports=require("events")},413:e=>{"use strict";e.exports=require("stream")},669:e=>{"use strict";e.exports=require("util")}};var t={};function __nccwpck_require__(i){if(t[i]){return t[i].exports}var r=t[i]={exports:{}};var n=true;try{e[i](r,r.exports,__nccwpck_require__);n=false}finally{if(n)delete t[i]}return r.exports}__nccwpck_require__.ab=__dirname+"/";return __nccwpck_require__(376)})();