react-doc-viewer-x
Version:
File viewer for React.
11 lines • 87.2 kB
JavaScript
"use strict";const R=require("./index-B-i6PH_c.cjs"),rn=require("./url-Bx0ZSydb.cjs");function nn(e,t){for(var r=0;r<t.length;r++){const n=t[r];if(typeof n!="string"&&!Array.isArray(n)){for(const i in n)if(i!=="default"&&!(i in e)){const c=Object.getOwnPropertyDescriptor(n,i);c&&Object.defineProperty(e,i,c.get?c:{enumerable:!0,get:()=>n[i]})}}}return Object.freeze(Object.defineProperty(e,Symbol.toStringTag,{value:"Module"}))}var qe={},gr={exports:{}},Rt={};(function(e){e.fetch=i(R.commonjsGlobal.fetch)&&i(R.commonjsGlobal.ReadableStream),e.writableStream=i(R.commonjsGlobal.WritableStream),e.abortController=i(R.commonjsGlobal.AbortController);var t;function r(){if(t!==void 0)return t;if(R.commonjsGlobal.XMLHttpRequest){t=new R.commonjsGlobal.XMLHttpRequest;try{t.open("GET",R.commonjsGlobal.XDomainRequest?"/":"https://example.com")}catch{t=null}}else t=null;return t}function n(c){var l=r();if(!l)return!1;try{return l.responseType=c,l.responseType===c}catch{}return!1}e.arraybuffer=e.fetch||n("arraybuffer"),e.msstream=!e.fetch&&n("ms-stream"),e.mozchunkedarraybuffer=!e.fetch&&n("moz-chunked-arraybuffer"),e.overrideMimeType=e.fetch||(r()?i(r().overrideMimeType):!1);function i(c){return typeof c=="function"}t=null})(Rt);var gt={exports:{}};typeof Object.create=="function"?gt.exports=function(t,r){r&&(t.super_=r,t.prototype=Object.create(r.prototype,{constructor:{value:t,enumerable:!1,writable:!0,configurable:!0}}))}:gt.exports=function(t,r){if(r){t.super_=r;var n=function(){};n.prototype=r.prototype,t.prototype=new n,t.prototype.constructor=t}};var ue=gt.exports,We={},vt={exports:{}},Tt={exports:{}},_e=typeof Reflect=="object"?Reflect:null,Ut=_e&&typeof _e.apply=="function"?_e.apply:function(t,r,n){return Function.prototype.apply.call(t,r,n)},Le;_e&&typeof _e.ownKeys=="function"?Le=_e.ownKeys:Object.getOwnPropertySymbols?Le=function(t){return Object.getOwnPropertyNames(t).concat(Object.getOwnPropertySymbols(t))}:Le=function(t){return Object.getOwnPropertyNames(t)};function on(e){console&&console.warn&&console.warn(e)}var vr=Number.isNaN||function(t){return t!==t};function x(){x.init.call(this)}Tt.exports=x;Tt.exports.once=un;x.EventEmitter=x;x.prototype._events=void 0;x.prototype._eventsCount=0;x.prototype._maxListeners=void 0;var kt=10;function Ge(e){if(typeof e!="function")throw new TypeError('The "listener" argument must be of type Function. Received type '+typeof e)}Object.defineProperty(x,"defaultMaxListeners",{enumerable:!0,get:function(){return kt},set:function(e){if(typeof e!="number"||e<0||vr(e))throw new RangeError('The value of "defaultMaxListeners" is out of range. It must be a non-negative number. Received '+e+".");kt=e}});x.init=function(){(this._events===void 0||this._events===Object.getPrototypeOf(this)._events)&&(this._events=Object.create(null),this._eventsCount=0),this._maxListeners=this._maxListeners||void 0};x.prototype.setMaxListeners=function(t){if(typeof t!="number"||t<0||vr(t))throw new RangeError('The value of "n" is out of range. It must be a non-negative number. Received '+t+".");return this._maxListeners=t,this};function br(e){return e._maxListeners===void 0?x.defaultMaxListeners:e._maxListeners}x.prototype.getMaxListeners=function(){return br(this)};x.prototype.emit=function(t){for(var r=[],n=1;n<arguments.length;n++)r.push(arguments[n]);var i=t==="error",c=this._events;if(c!==void 0)i=i&&c.error===void 0;else if(!i)return!1;if(i){var l;if(r.length>0&&(l=r[0]),l instanceof Error)throw l;var h=new Error("Unhandled error."+(l?" ("+l.message+")":""));throw h.context=l,h}var p=c[t];if(p===void 0)return!1;if(typeof p=="function")Ut(p,this,r);else for(var A=p.length,C=Er(p,A),n=0;n<A;++n)Ut(C[n],this,r);return!0};function mr(e,t,r,n){var i,c,l;if(Ge(r),c=e._events,c===void 0?(c=e._events=Object.create(null),e._eventsCount=0):(c.newListener!==void 0&&(e.emit("newListener",t,r.listener?r.listener:r),c=e._events),l=c[t]),l===void 0)l=c[t]=r,++e._eventsCount;else if(typeof l=="function"?l=c[t]=n?[r,l]:[l,r]:n?l.unshift(r):l.push(r),i=br(e),i>0&&l.length>i&&!l.warned){l.warned=!0;var h=new Error("Possible EventEmitter memory leak detected. "+l.length+" "+String(t)+" listeners added. Use emitter.setMaxListeners() to increase limit");h.name="MaxListenersExceededWarning",h.emitter=e,h.type=t,h.count=l.length,on(h)}return e}x.prototype.addListener=function(t,r){return mr(this,t,r,!1)};x.prototype.on=x.prototype.addListener;x.prototype.prependListener=function(t,r){return mr(this,t,r,!0)};function an(){if(!this.fired)return this.target.removeListener(this.type,this.wrapFn),this.fired=!0,arguments.length===0?this.listener.call(this.target):this.listener.apply(this.target,arguments)}function _r(e,t,r){var n={fired:!1,wrapFn:void 0,target:e,type:t,listener:r},i=an.bind(n);return i.listener=r,n.wrapFn=i,i}x.prototype.once=function(t,r){return Ge(r),this.on(t,_r(this,t,r)),this};x.prototype.prependOnceListener=function(t,r){return Ge(r),this.prependListener(t,_r(this,t,r)),this};x.prototype.removeListener=function(t,r){var n,i,c,l,h;if(Ge(r),i=this._events,i===void 0)return this;if(n=i[t],n===void 0)return this;if(n===r||n.listener===r)--this._eventsCount===0?this._events=Object.create(null):(delete i[t],i.removeListener&&this.emit("removeListener",t,n.listener||r));else if(typeof n!="function"){for(c=-1,l=n.length-1;l>=0;l--)if(n[l]===r||n[l].listener===r){h=n[l].listener,c=l;break}if(c<0)return this;c===0?n.shift():fn(n,c),n.length===1&&(i[t]=n[0]),i.removeListener!==void 0&&this.emit("removeListener",t,h||r)}return this};x.prototype.off=x.prototype.removeListener;x.prototype.removeAllListeners=function(t){var r,n,i;if(n=this._events,n===void 0)return this;if(n.removeListener===void 0)return arguments.length===0?(this._events=Object.create(null),this._eventsCount=0):n[t]!==void 0&&(--this._eventsCount===0?this._events=Object.create(null):delete n[t]),this;if(arguments.length===0){var c=Object.keys(n),l;for(i=0;i<c.length;++i)l=c[i],l!=="removeListener"&&this.removeAllListeners(l);return this.removeAllListeners("removeListener"),this._events=Object.create(null),this._eventsCount=0,this}if(r=n[t],typeof r=="function")this.removeListener(t,r);else if(r!==void 0)for(i=r.length-1;i>=0;i--)this.removeListener(t,r[i]);return this};function wr(e,t,r){var n=e._events;if(n===void 0)return[];var i=n[t];return i===void 0?[]:typeof i=="function"?r?[i.listener||i]:[i]:r?sn(i):Er(i,i.length)}x.prototype.listeners=function(t){return wr(this,t,!0)};x.prototype.rawListeners=function(t){return wr(this,t,!1)};x.listenerCount=function(e,t){return typeof e.listenerCount=="function"?e.listenerCount(t):Sr.call(e,t)};x.prototype.listenerCount=Sr;function Sr(e){var t=this._events;if(t!==void 0){var r=t[e];if(typeof r=="function")return 1;if(r!==void 0)return r.length}return 0}x.prototype.eventNames=function(){return this._eventsCount>0?Le(this._events):[]};function Er(e,t){for(var r=new Array(t),n=0;n<t;++n)r[n]=e[n];return r}function fn(e,t){for(;t+1<e.length;t++)e[t]=e[t+1];e.pop()}function sn(e){for(var t=new Array(e.length),r=0;r<t.length;++r)t[r]=e[r].listener||e[r];return t}function un(e,t){return new Promise(function(r,n){function i(l){e.removeListener(t,c),n(l)}function c(){typeof e.removeListener=="function"&&e.removeListener("error",i),r([].slice.call(arguments))}Ar(e,t,c,{once:!0}),t!=="error"&&ln(e,i,{once:!0})})}function ln(e,t,r){typeof e.on=="function"&&Ar(e,"error",t,r)}function Ar(e,t,r,n){if(typeof e.on=="function")n.once?e.once(t,r):e.on(t,r);else if(typeof e.addEventListener=="function")e.addEventListener(t,function i(c){n.once&&e.removeEventListener(t,i),r(c)});else throw new TypeError('The "emitter" argument must be of type EventEmitter. Received type '+typeof e)}var Rr=Tt.exports,Tr=Rr.EventEmitter;const xe=R.getAugmentedNamespace(R.dist);var Ot={},Or={},Pr=function(){if(typeof Symbol!="function"||typeof Object.getOwnPropertySymbols!="function")return!1;if(typeof Symbol.iterator=="symbol")return!0;var t={},r=Symbol("test"),n=Object(r);if(typeof r=="string"||Object.prototype.toString.call(r)!=="[object Symbol]"||Object.prototype.toString.call(n)!=="[object Symbol]")return!1;var i=42;t[r]=i;for(r in t)return!1;if(typeof Object.keys=="function"&&Object.keys(t).length!==0||typeof Object.getOwnPropertyNames=="function"&&Object.getOwnPropertyNames(t).length!==0)return!1;var c=Object.getOwnPropertySymbols(t);if(c.length!==1||c[0]!==r||!Object.prototype.propertyIsEnumerable.call(t,r))return!1;if(typeof Object.getOwnPropertyDescriptor=="function"){var l=Object.getOwnPropertyDescriptor(t,r);if(l.value!==i||l.enumerable!==!0)return!1}return!0},cn=Pr,Pt=function(){return cn()&&!!Symbol.toStringTag},dn=Error,pn=EvalError,hn=RangeError,yn=ReferenceError,jr=SyntaxError,He=TypeError,gn=URIError,qt=typeof Symbol<"u"&&Symbol,vn=Pr,bn=function(){return typeof qt!="function"||typeof Symbol!="function"||typeof qt("foo")!="symbol"||typeof Symbol("bar")!="symbol"?!1:vn()},Ze={__proto__:null,foo:{}},mn=Object,_n=function(){return{__proto__:Ze}.foo===Ze.foo&&!(Ze instanceof mn)},wn="Function.prototype.bind called on incompatible ",Sn=Object.prototype.toString,En=Math.max,An="[object Function]",Wt=function(t,r){for(var n=[],i=0;i<t.length;i+=1)n[i]=t[i];for(var c=0;c<r.length;c+=1)n[c+t.length]=r[c];return n},Rn=function(t,r){for(var n=[],i=r,c=0;i<t.length;i+=1,c+=1)n[c]=t[i];return n},Tn=function(e,t){for(var r="",n=0;n<e.length;n+=1)r+=e[n],n+1<e.length&&(r+=t);return r},On=function(t){var r=this;if(typeof r!="function"||Sn.apply(r)!==An)throw new TypeError(wn+r);for(var n=Rn(arguments,1),i,c=function(){if(this instanceof i){var C=r.apply(this,Wt(n,arguments));return Object(C)===C?C:this}return r.apply(t,Wt(n,arguments))},l=En(0,r.length-n.length),h=[],p=0;p<l;p++)h[p]="$"+p;if(i=Function("binder","return function ("+Tn(h,",")+"){ return binder.apply(this,arguments); }")(c),r.prototype){var A=function(){};A.prototype=r.prototype,i.prototype=new A,A.prototype=null}return i},Pn=On,jt=Function.prototype.bind||Pn,jn=Function.prototype.call,Mn=Object.prototype.hasOwnProperty,Ln=jt,Cn=Ln.call(jn,Mn),k,Nn=dn,In=pn,Dn=hn,Bn=yn,Se=jr,we=He,Fn=gn,Mr=Function,Qe=function(e){try{return Mr('"use strict"; return ('+e+").constructor;")()}catch{}},ce=Object.getOwnPropertyDescriptor;if(ce)try{ce({},"")}catch{ce=null}var et=function(){throw new we},$n=ce?function(){try{return arguments.callee,et}catch{try{return ce(arguments,"callee").get}catch{return et}}}():et,ge=bn(),Un=_n(),V=Object.getPrototypeOf||(Un?function(e){return e.__proto__}:null),be={},kn=typeof Uint8Array>"u"||!V?k:V(Uint8Array),de={__proto__:null,"%AggregateError%":typeof AggregateError>"u"?k:AggregateError,"%Array%":Array,"%ArrayBuffer%":typeof ArrayBuffer>"u"?k:ArrayBuffer,"%ArrayIteratorPrototype%":ge&&V?V([][Symbol.iterator]()):k,"%AsyncFromSyncIteratorPrototype%":k,"%AsyncFunction%":be,"%AsyncGenerator%":be,"%AsyncGeneratorFunction%":be,"%AsyncIteratorPrototype%":be,"%Atomics%":typeof Atomics>"u"?k:Atomics,"%BigInt%":typeof BigInt>"u"?k:BigInt,"%BigInt64Array%":typeof BigInt64Array>"u"?k:BigInt64Array,"%BigUint64Array%":typeof BigUint64Array>"u"?k:BigUint64Array,"%Boolean%":Boolean,"%DataView%":typeof DataView>"u"?k:DataView,"%Date%":Date,"%decodeURI%":decodeURI,"%decodeURIComponent%":decodeURIComponent,"%encodeURI%":encodeURI,"%encodeURIComponent%":encodeURIComponent,"%Error%":Nn,"%eval%":eval,"%EvalError%":In,"%Float32Array%":typeof Float32Array>"u"?k:Float32Array,"%Float64Array%":typeof Float64Array>"u"?k:Float64Array,"%FinalizationRegistry%":typeof FinalizationRegistry>"u"?k:FinalizationRegistry,"%Function%":Mr,"%GeneratorFunction%":be,"%Int8Array%":typeof Int8Array>"u"?k:Int8Array,"%Int16Array%":typeof Int16Array>"u"?k:Int16Array,"%Int32Array%":typeof Int32Array>"u"?k:Int32Array,"%isFinite%":isFinite,"%isNaN%":isNaN,"%IteratorPrototype%":ge&&V?V(V([][Symbol.iterator]())):k,"%JSON%":typeof JSON=="object"?JSON:k,"%Map%":typeof Map>"u"?k:Map,"%MapIteratorPrototype%":typeof Map>"u"||!ge||!V?k:V(new Map()[Symbol.iterator]()),"%Math%":Math,"%Number%":Number,"%Object%":Object,"%parseFloat%":parseFloat,"%parseInt%":parseInt,"%Promise%":typeof Promise>"u"?k:Promise,"%Proxy%":typeof Proxy>"u"?k:Proxy,"%RangeError%":Dn,"%ReferenceError%":Bn,"%Reflect%":typeof Reflect>"u"?k:Reflect,"%RegExp%":RegExp,"%Set%":typeof Set>"u"?k:Set,"%SetIteratorPrototype%":typeof Set>"u"||!ge||!V?k:V(new Set()[Symbol.iterator]()),"%SharedArrayBuffer%":typeof SharedArrayBuffer>"u"?k:SharedArrayBuffer,"%String%":String,"%StringIteratorPrototype%":ge&&V?V(""[Symbol.iterator]()):k,"%Symbol%":ge?Symbol:k,"%SyntaxError%":Se,"%ThrowTypeError%":$n,"%TypedArray%":kn,"%TypeError%":we,"%Uint8Array%":typeof Uint8Array>"u"?k:Uint8Array,"%Uint8ClampedArray%":typeof Uint8ClampedArray>"u"?k:Uint8ClampedArray,"%Uint16Array%":typeof Uint16Array>"u"?k:Uint16Array,"%Uint32Array%":typeof Uint32Array>"u"?k:Uint32Array,"%URIError%":Fn,"%WeakMap%":typeof WeakMap>"u"?k:WeakMap,"%WeakRef%":typeof WeakRef>"u"?k:WeakRef,"%WeakSet%":typeof WeakSet>"u"?k:WeakSet};if(V)try{null.error}catch(e){var qn=V(V(e));de["%Error.prototype%"]=qn}var Wn=function e(t){var r;if(t==="%AsyncFunction%")r=Qe("async function () {}");else if(t==="%GeneratorFunction%")r=Qe("function* () {}");else if(t==="%AsyncGeneratorFunction%")r=Qe("async function* () {}");else if(t==="%AsyncGenerator%"){var n=e("%AsyncGeneratorFunction%");n&&(r=n.prototype)}else if(t==="%AsyncIteratorPrototype%"){var i=e("%AsyncGenerator%");i&&V&&(r=V(i.prototype))}return de[t]=r,r},Gt={__proto__:null,"%ArrayBufferPrototype%":["ArrayBuffer","prototype"],"%ArrayPrototype%":["Array","prototype"],"%ArrayProto_entries%":["Array","prototype","entries"],"%ArrayProto_forEach%":["Array","prototype","forEach"],"%ArrayProto_keys%":["Array","prototype","keys"],"%ArrayProto_values%":["Array","prototype","values"],"%AsyncFunctionPrototype%":["AsyncFunction","prototype"],"%AsyncGenerator%":["AsyncGeneratorFunction","prototype"],"%AsyncGeneratorPrototype%":["AsyncGeneratorFunction","prototype","prototype"],"%BooleanPrototype%":["Boolean","prototype"],"%DataViewPrototype%":["DataView","prototype"],"%DatePrototype%":["Date","prototype"],"%ErrorPrototype%":["Error","prototype"],"%EvalErrorPrototype%":["EvalError","prototype"],"%Float32ArrayPrototype%":["Float32Array","prototype"],"%Float64ArrayPrototype%":["Float64Array","prototype"],"%FunctionPrototype%":["Function","prototype"],"%Generator%":["GeneratorFunction","prototype"],"%GeneratorPrototype%":["GeneratorFunction","prototype","prototype"],"%Int8ArrayPrototype%":["Int8Array","prototype"],"%Int16ArrayPrototype%":["Int16Array","prototype"],"%Int32ArrayPrototype%":["Int32Array","prototype"],"%JSONParse%":["JSON","parse"],"%JSONStringify%":["JSON","stringify"],"%MapPrototype%":["Map","prototype"],"%NumberPrototype%":["Number","prototype"],"%ObjectPrototype%":["Object","prototype"],"%ObjProto_toString%":["Object","prototype","toString"],"%ObjProto_valueOf%":["Object","prototype","valueOf"],"%PromisePrototype%":["Promise","prototype"],"%PromiseProto_then%":["Promise","prototype","then"],"%Promise_all%":["Promise","all"],"%Promise_reject%":["Promise","reject"],"%Promise_resolve%":["Promise","resolve"],"%RangeErrorPrototype%":["RangeError","prototype"],"%ReferenceErrorPrototype%":["ReferenceError","prototype"],"%RegExpPrototype%":["RegExp","prototype"],"%SetPrototype%":["Set","prototype"],"%SharedArrayBufferPrototype%":["SharedArrayBuffer","prototype"],"%StringPrototype%":["String","prototype"],"%SymbolPrototype%":["Symbol","prototype"],"%SyntaxErrorPrototype%":["SyntaxError","prototype"],"%TypedArrayPrototype%":["TypedArray","prototype"],"%TypeErrorPrototype%":["TypeError","prototype"],"%Uint8ArrayPrototype%":["Uint8Array","prototype"],"%Uint8ClampedArrayPrototype%":["Uint8ClampedArray","prototype"],"%Uint16ArrayPrototype%":["Uint16Array","prototype"],"%Uint32ArrayPrototype%":["Uint32Array","prototype"],"%URIErrorPrototype%":["URIError","prototype"],"%WeakMapPrototype%":["WeakMap","prototype"],"%WeakSetPrototype%":["WeakSet","prototype"]},Te=jt,Fe=Cn,Gn=Te.call(Function.call,Array.prototype.concat),xn=Te.call(Function.apply,Array.prototype.splice),xt=Te.call(Function.call,String.prototype.replace),$e=Te.call(Function.call,String.prototype.slice),Hn=Te.call(Function.call,RegExp.prototype.exec),Vn=/[^%.[\]]+|\[(?:(-?\d+(?:\.\d+)?)|(["'])((?:(?!\2)[^\\]|\\.)*?)\2)\]|(?=(?:\.|\[\])(?:\.|\[\]|%$))/g,zn=/\\(\\)?/g,Kn=function(t){var r=$e(t,0,1),n=$e(t,-1);if(r==="%"&&n!=="%")throw new Se("invalid intrinsic syntax, expected closing `%`");if(n==="%"&&r!=="%")throw new Se("invalid intrinsic syntax, expected opening `%`");var i=[];return xt(t,Vn,function(c,l,h,p){i[i.length]=h?xt(p,zn,"$1"):l||c}),i},Yn=function(t,r){var n=t,i;if(Fe(Gt,n)&&(i=Gt[n],n="%"+i[0]+"%"),Fe(de,n)){var c=de[n];if(c===be&&(c=Wn(n)),typeof c>"u"&&!r)throw new we("intrinsic "+t+" exists, but is not available. Please file an issue!");return{alias:i,name:n,value:c}}throw new Se("intrinsic "+t+" does not exist!")},Oe=function(t,r){if(typeof t!="string"||t.length===0)throw new we("intrinsic name must be a non-empty string");if(arguments.length>1&&typeof r!="boolean")throw new we('"allowMissing" argument must be a boolean');if(Hn(/^%?[^%]*%?$/,t)===null)throw new Se("`%` may not be present anywhere but at the beginning and end of the intrinsic name");var n=Kn(t),i=n.length>0?n[0]:"",c=Yn("%"+i+"%",r),l=c.name,h=c.value,p=!1,A=c.alias;A&&(i=A[0],xn(n,Gn([0,1],A)));for(var C=1,E=!0;C<n.length;C+=1){var I=n[C],q=$e(I,0,1),P=$e(I,-1);if((q==='"'||q==="'"||q==="`"||P==='"'||P==="'"||P==="`")&&q!==P)throw new Se("property names with quotes must have matching quotes");if((I==="constructor"||!E)&&(p=!0),i+="."+I,l="%"+i+"%",Fe(de,l))h=de[l];else if(h!=null){if(!(I in h)){if(!r)throw new we("base intrinsic for "+t+" exists, but the property is not available.");return}if(ce&&C+1>=n.length){var N=ce(h,I);E=!!N,E&&"get"in N&&!("originalValue"in N.get)?h=N.get:h=h[I]}else E=Fe(h,I),h=h[I];E&&!p&&(de[l]=h)}}return h},Lr={exports:{}},tt,Ht;function Mt(){if(Ht)return tt;Ht=1;var e=Oe,t=e("%Object.defineProperty%",!0)||!1;if(t)try{t({},"a",{value:1})}catch{t=!1}return tt=t,tt}var Jn=Oe,Ce=Jn("%Object.getOwnPropertyDescriptor%",!0);if(Ce)try{Ce([],"length")}catch{Ce=null}var Lt=Ce,Vt=Mt(),Xn=jr,ve=He,zt=Lt,Zn=function(t,r,n){if(!t||typeof t!="object"&&typeof t!="function")throw new ve("`obj` must be an object or a function`");if(typeof r!="string"&&typeof r!="symbol")throw new ve("`property` must be a string or a symbol`");if(arguments.length>3&&typeof arguments[3]!="boolean"&&arguments[3]!==null)throw new ve("`nonEnumerable`, if provided, must be a boolean or null");if(arguments.length>4&&typeof arguments[4]!="boolean"&&arguments[4]!==null)throw new ve("`nonWritable`, if provided, must be a boolean or null");if(arguments.length>5&&typeof arguments[5]!="boolean"&&arguments[5]!==null)throw new ve("`nonConfigurable`, if provided, must be a boolean or null");if(arguments.length>6&&typeof arguments[6]!="boolean")throw new ve("`loose`, if provided, must be a boolean");var i=arguments.length>3?arguments[3]:null,c=arguments.length>4?arguments[4]:null,l=arguments.length>5?arguments[5]:null,h=arguments.length>6?arguments[6]:!1,p=!!zt&&zt(t,r);if(Vt)Vt(t,r,{configurable:l===null&&p?p.configurable:!l,enumerable:i===null&&p?p.enumerable:!i,value:n,writable:c===null&&p?p.writable:!c});else if(h||!i&&!c&&!l)t[r]=n;else throw new Xn("This environment does not support defining a property as non-configurable, non-writable, or non-enumerable.")},bt=Mt(),Cr=function(){return!!bt};Cr.hasArrayLengthDefineBug=function(){if(!bt)return null;try{return bt([],"length",{value:1}).length!==1}catch{return!0}};var Qn=Cr,ei=Oe,Kt=Zn,ti=Qn(),Yt=Lt,Jt=He,ri=ei("%Math.floor%"),ni=function(t,r){if(typeof t!="function")throw new Jt("`fn` is not a function");if(typeof r!="number"||r<0||r>4294967295||ri(r)!==r)throw new Jt("`length` must be a positive 32-bit integer");var n=arguments.length>2&&!!arguments[2],i=!0,c=!0;if("length"in t&&Yt){var l=Yt(t,"length");l&&!l.configurable&&(i=!1),l&&!l.writable&&(c=!1)}return(i||c||!n)&&(ti?Kt(t,"length",r,!0,!0):Kt(t,"length",r)),t};(function(e){var t=jt,r=Oe,n=ni,i=He,c=r("%Function.prototype.apply%"),l=r("%Function.prototype.call%"),h=r("%Reflect.apply%",!0)||t.call(l,c),p=Mt(),A=r("%Math.max%");e.exports=function(I){if(typeof I!="function")throw new i("a function is required");var q=h(t,l,arguments);return n(q,1+A(0,I.length-(arguments.length-1)),!0)};var C=function(){return h(t,c,arguments)};p?p(e.exports,"apply",{value:C}):e.exports.apply=C})(Lr);var Nr=Lr.exports,Ir=Oe,Dr=Nr,ii=Dr(Ir("String.prototype.indexOf")),Br=function(t,r){var n=Ir(t,!!r);return typeof n=="function"&&ii(t,".prototype.")>-1?Dr(n):n},oi=Pt(),ai=Br,mt=ai("Object.prototype.toString"),Ve=function(t){return oi&&t&&typeof t=="object"&&Symbol.toStringTag in t?!1:mt(t)==="[object Arguments]"},Fr=function(t){return Ve(t)?!0:t!==null&&typeof t=="object"&&typeof t.length=="number"&&t.length>=0&&mt(t)!=="[object Array]"&&mt(t.callee)==="[object Function]"},fi=function(){return Ve(arguments)}();Ve.isLegacyArguments=Fr;var si=fi?Ve:Fr,ui=Object.prototype.toString,li=Function.prototype.toString,ci=/^\s*(?:function)?\*/,$r=Pt(),rt=Object.getPrototypeOf,di=function(){if(!$r)return!1;try{return Function("return function*() {}")()}catch{}},nt,pi=function(t){if(typeof t!="function")return!1;if(ci.test(li.call(t)))return!0;if(!$r){var r=ui.call(t);return r==="[object GeneratorFunction]"}if(!rt)return!1;if(typeof nt>"u"){var n=di();nt=n?rt(n):!1}return rt(t)===nt},Ur=Function.prototype.toString,me=typeof Reflect=="object"&&Reflect!==null&&Reflect.apply,_t,Ne;if(typeof me=="function"&&typeof Object.defineProperty=="function")try{_t=Object.defineProperty({},"length",{get:function(){throw Ne}}),Ne={},me(function(){throw 42},null,_t)}catch(e){e!==Ne&&(me=null)}else me=null;var hi=/^\s*class\b/,wt=function(t){try{var r=Ur.call(t);return hi.test(r)}catch{return!1}},it=function(t){try{return wt(t)?!1:(Ur.call(t),!0)}catch{return!1}},Ie=Object.prototype.toString,yi="[object Object]",gi="[object Function]",vi="[object GeneratorFunction]",bi="[object HTMLAllCollection]",mi="[object HTML document.all class]",_i="[object HTMLCollection]",wi=typeof Symbol=="function"&&!!Symbol.toStringTag,Si=!(0 in[,]),St=function(){return!1};if(typeof document=="object"){var Ei=document.all;Ie.call(Ei)===Ie.call(document.all)&&(St=function(t){if((Si||!t)&&(typeof t>"u"||typeof t=="object"))try{var r=Ie.call(t);return(r===bi||r===mi||r===_i||r===yi)&&t("")==null}catch{}return!1})}var Ai=me?function(t){if(St(t))return!0;if(!t||typeof t!="function"&&typeof t!="object")return!1;try{me(t,null,_t)}catch(r){if(r!==Ne)return!1}return!wt(t)&&it(t)}:function(t){if(St(t))return!0;if(!t||typeof t!="function"&&typeof t!="object")return!1;if(wi)return it(t);if(wt(t))return!1;var r=Ie.call(t);return r!==gi&&r!==vi&&!/^\[object HTML/.test(r)?!1:it(t)},Ri=Ai,Ti=Object.prototype.toString,kr=Object.prototype.hasOwnProperty,Oi=function(t,r,n){for(var i=0,c=t.length;i<c;i++)kr.call(t,i)&&(n==null?r(t[i],i,t):r.call(n,t[i],i,t))},Pi=function(t,r,n){for(var i=0,c=t.length;i<c;i++)n==null?r(t.charAt(i),i,t):r.call(n,t.charAt(i),i,t)},ji=function(t,r,n){for(var i in t)kr.call(t,i)&&(n==null?r(t[i],i,t):r.call(n,t[i],i,t))},Mi=function(t,r,n){if(!Ri(r))throw new TypeError("iterator must be a function");var i;arguments.length>=3&&(i=n),Ti.call(t)==="[object Array]"?Oi(t,r,i):typeof t=="string"?Pi(t,r,i):ji(t,r,i)},Li=Mi,Ci=["Float32Array","Float64Array","Int8Array","Int16Array","Int32Array","Uint8Array","Uint8ClampedArray","Uint16Array","Uint32Array","BigInt64Array","BigUint64Array"],ot=Ci,Ni=typeof globalThis>"u"?R.commonjsGlobal:globalThis,Ii=function(){for(var t=[],r=0;r<ot.length;r++)typeof Ni[ot[r]]=="function"&&(t[t.length]=ot[r]);return t},Ue=Li,Di=Ii,Xt=Nr,Ct=Br,De=Lt,Bi=Ct("Object.prototype.toString"),qr=Pt(),Zt=typeof globalThis>"u"?R.commonjsGlobal:globalThis,Et=Di(),Nt=Ct("String.prototype.slice"),at=Object.getPrototypeOf,Fi=Ct("Array.prototype.indexOf",!0)||function(t,r){for(var n=0;n<t.length;n+=1)if(t[n]===r)return n;return-1},ke={__proto__:null};qr&&De&&at?Ue(Et,function(e){var t=new Zt[e];if(Symbol.toStringTag in t){var r=at(t),n=De(r,Symbol.toStringTag);if(!n){var i=at(r);n=De(i,Symbol.toStringTag)}ke["$"+e]=Xt(n.get)}}):Ue(Et,function(e){var t=new Zt[e],r=t.slice||t.set;r&&(ke["$"+e]=Xt(r))});var $i=function(t){var r=!1;return Ue(ke,function(n,i){if(!r)try{"$"+n(t)===i&&(r=Nt(i,1))}catch{}}),r},Ui=function(t){var r=!1;return Ue(ke,function(n,i){if(!r)try{n(t),r=Nt(i,1)}catch{}}),r},Wr=function(t){if(!t||typeof t!="object")return!1;if(!qr){var r=Nt(Bi(t),8,-1);return Fi(Et,r)>-1?r:r!=="Object"?!1:Ui(t)}return De?$i(t):null},ki=Wr,qi=function(t){return!!ki(t)};(function(e){var t=si,r=pi,n=Wr,i=qi;function c(v){return v.call.bind(v)}var l=typeof BigInt<"u",h=typeof Symbol<"u",p=c(Object.prototype.toString),A=c(Number.prototype.valueOf),C=c(String.prototype.valueOf),E=c(Boolean.prototype.valueOf);if(l)var I=c(BigInt.prototype.valueOf);if(h)var q=c(Symbol.prototype.valueOf);function P(v,Pe){if(typeof v!="object")return!1;try{return Pe(v),!0}catch{return!1}}e.isArgumentsObject=t,e.isGeneratorFunction=r,e.isTypedArray=i;function N(v){return typeof Promise<"u"&&v instanceof Promise||v!==null&&typeof v=="object"&&typeof v.then=="function"&&typeof v.catch=="function"}e.isPromise=N;function M(v){return typeof ArrayBuffer<"u"&&ArrayBuffer.isView?ArrayBuffer.isView(v):i(v)||g(v)}e.isArrayBufferView=M;function u(v){return n(v)==="Uint8Array"}e.isUint8Array=u;function m(v){return n(v)==="Uint8ClampedArray"}e.isUint8ClampedArray=m;function S(v){return n(v)==="Uint16Array"}e.isUint16Array=S;function T(v){return n(v)==="Uint32Array"}e.isUint32Array=T;function j(v){return n(v)==="Int8Array"}e.isInt8Array=j;function F(v){return n(v)==="Int16Array"}e.isInt16Array=F;function W(v){return n(v)==="Int32Array"}e.isInt32Array=W;function $(v){return n(v)==="Float32Array"}e.isFloat32Array=$;function D(v){return n(v)==="Float64Array"}e.isFloat64Array=D;function z(v){return n(v)==="BigInt64Array"}e.isBigInt64Array=z;function J(v){return n(v)==="BigUint64Array"}e.isBigUint64Array=J;function X(v){return p(v)==="[object Map]"}X.working=typeof Map<"u"&&X(new Map);function ne(v){return typeof Map>"u"?!1:X.working?X(v):v instanceof Map}e.isMap=ne;function Z(v){return p(v)==="[object Set]"}Z.working=typeof Set<"u"&&Z(new Set);function ie(v){return typeof Set>"u"?!1:Z.working?Z(v):v instanceof Set}e.isSet=ie;function oe(v){return p(v)==="[object WeakMap]"}oe.working=typeof WeakMap<"u"&&oe(new WeakMap);function ee(v){return typeof WeakMap>"u"?!1:oe.working?oe(v):v instanceof WeakMap}e.isWeakMap=ee;function te(v){return p(v)==="[object WeakSet]"}te.working=typeof WeakSet<"u"&&te(new WeakSet);function K(v){return te(v)}e.isWeakSet=K;function re(v){return p(v)==="[object ArrayBuffer]"}re.working=typeof ArrayBuffer<"u"&&re(new ArrayBuffer);function fe(v){return typeof ArrayBuffer>"u"?!1:re.working?re(v):v instanceof ArrayBuffer}e.isArrayBuffer=fe;function d(v){return p(v)==="[object DataView]"}d.working=typeof ArrayBuffer<"u"&&typeof DataView<"u"&&d(new DataView(new ArrayBuffer(1),0,1));function g(v){return typeof DataView>"u"?!1:d.working?d(v):v instanceof DataView}e.isDataView=g;var _=typeof SharedArrayBuffer<"u"?SharedArrayBuffer:void 0;function B(v){return p(v)==="[object SharedArrayBuffer]"}function s(v){return typeof _>"u"?!1:(typeof B.working>"u"&&(B.working=B(new _)),B.working?B(v):v instanceof _)}e.isSharedArrayBuffer=s;function f(v){return p(v)==="[object AsyncFunction]"}e.isAsyncFunction=f;function y(v){return p(v)==="[object Map Iterator]"}e.isMapIterator=y;function w(v){return p(v)==="[object Set Iterator]"}e.isSetIterator=w;function L(v){return p(v)==="[object Generator]"}e.isGeneratorObject=L;function o(v){return p(v)==="[object WebAssembly.Module]"}e.isWebAssemblyCompiledModule=o;function a(v){return P(v,A)}e.isNumberObject=a;function b(v){return P(v,C)}e.isStringObject=b;function O(v){return P(v,E)}e.isBooleanObject=O;function H(v){return l&&P(v,I)}e.isBigIntObject=H;function U(v){return h&&P(v,q)}e.isSymbolObject=U;function G(v){return a(v)||b(v)||O(v)||H(v)||U(v)}e.isBoxedPrimitive=G;function se(v){return typeof Uint8Array<"u"&&(fe(v)||s(v))}e.isAnyArrayBuffer=se,["isProxy","isExternal","isModuleNamespaceObject"].forEach(function(v){Object.defineProperty(e,v,{enumerable:!1,value:function(){throw new Error(v+" is not supported in userland")}})})})(Or);var Wi=function(t){return t&&typeof t=="object"&&typeof t.copy=="function"&&typeof t.fill=="function"&&typeof t.readUInt8=="function"};(function(e){var t=Object.getOwnPropertyDescriptors||function(g){for(var _=Object.keys(g),B={},s=0;s<_.length;s++)B[_[s]]=Object.getOwnPropertyDescriptor(g,_[s]);return B},r=/%[sdj%]/g;e.format=function(d){if(!j(d)){for(var g=[],_=0;_<arguments.length;_++)g.push(l(arguments[_]));return g.join(" ")}for(var _=1,B=arguments,s=B.length,f=String(d).replace(r,function(w){if(w==="%%")return"%";if(_>=s)return w;switch(w){case"%s":return String(B[_++]);case"%d":return Number(B[_++]);case"%j":try{return JSON.stringify(B[_++])}catch{return"[Circular]"}default:return w}}),y=B[_];_<s;y=B[++_])m(y)||!D(y)?f+=" "+y:f+=" "+l(y);return f},e.deprecate=function(d,g){if(typeof R.process$1<"u"&&R.process$1.noDeprecation===!0)return d;if(typeof R.process$1>"u")return function(){return e.deprecate(d,g).apply(this,arguments)};var _=!1;function B(){if(!_){if(R.process$1.throwDeprecation)throw new Error(g);R.process$1.traceDeprecation?console.trace(g):console.error(g),_=!0}return d.apply(this,arguments)}return B};var n={},i=/^$/;if(R.process$1.env.NODE_DEBUG){var c=R.process$1.env.NODE_DEBUG;c=c.replace(/[|\\{}()[\]^$+?.]/g,"\\$&").replace(/\*/g,".*").replace(/,/g,"$|^").toUpperCase(),i=new RegExp("^"+c+"$","i")}e.debuglog=function(d){if(d=d.toUpperCase(),!n[d])if(i.test(d)){var g=R.process$1.pid;n[d]=function(){var _=e.format.apply(e,arguments);console.error("%s %d: %s",d,g,_)}}else n[d]=function(){};return n[d]};function l(d,g){var _={seen:[],stylize:p};return arguments.length>=3&&(_.depth=arguments[2]),arguments.length>=4&&(_.colors=arguments[3]),u(g)?_.showHidden=g:g&&e._extend(_,g),W(_.showHidden)&&(_.showHidden=!1),W(_.depth)&&(_.depth=2),W(_.colors)&&(_.colors=!1),W(_.customInspect)&&(_.customInspect=!0),_.colors&&(_.stylize=h),C(_,d,_.depth)}e.inspect=l,l.colors={bold:[1,22],italic:[3,23],underline:[4,24],inverse:[7,27],white:[37,39],grey:[90,39],black:[30,39],blue:[34,39],cyan:[36,39],green:[32,39],magenta:[35,39],red:[31,39],yellow:[33,39]},l.styles={special:"cyan",number:"yellow",boolean:"yellow",undefined:"grey",null:"bold",string:"green",date:"magenta",regexp:"red"};function h(d,g){var _=l.styles[g];return _?"\x1B["+l.colors[_][0]+"m"+d+"\x1B["+l.colors[_][1]+"m":d}function p(d,g){return d}function A(d){var g={};return d.forEach(function(_,B){g[_]=!0}),g}function C(d,g,_){if(d.customInspect&&g&&X(g.inspect)&&g.inspect!==e.inspect&&!(g.constructor&&g.constructor.prototype===g)){var B=g.inspect(_,d);return j(B)||(B=C(d,B,_)),B}var s=E(d,g);if(s)return s;var f=Object.keys(g),y=A(f);if(d.showHidden&&(f=Object.getOwnPropertyNames(g)),J(g)&&(f.indexOf("message")>=0||f.indexOf("description")>=0))return I(g);if(f.length===0){if(X(g)){var w=g.name?": "+g.name:"";return d.stylize("[Function"+w+"]","special")}if($(g))return d.stylize(RegExp.prototype.toString.call(g),"regexp");if(z(g))return d.stylize(Date.prototype.toString.call(g),"date");if(J(g))return I(g)}var L="",o=!1,a=["{","}"];if(M(g)&&(o=!0,a=["[","]"]),X(g)){var b=g.name?": "+g.name:"";L=" [Function"+b+"]"}if($(g)&&(L=" "+RegExp.prototype.toString.call(g)),z(g)&&(L=" "+Date.prototype.toUTCString.call(g)),J(g)&&(L=" "+I(g)),f.length===0&&(!o||g.length==0))return a[0]+L+a[1];if(_<0)return $(g)?d.stylize(RegExp.prototype.toString.call(g),"regexp"):d.stylize("[Object]","special");d.seen.push(g);var O;return o?O=q(d,g,_,y,f):O=f.map(function(H){return P(d,g,_,y,H,o)}),d.seen.pop(),N(O,L,a)}function E(d,g){if(W(g))return d.stylize("undefined","undefined");if(j(g)){var _="'"+JSON.stringify(g).replace(/^"|"$/g,"").replace(/'/g,"\\'").replace(/\\"/g,'"')+"'";return d.stylize(_,"string")}if(T(g))return d.stylize(""+g,"number");if(u(g))return d.stylize(""+g,"boolean");if(m(g))return d.stylize("null","null")}function I(d){return"["+Error.prototype.toString.call(d)+"]"}function q(d,g,_,B,s){for(var f=[],y=0,w=g.length;y<w;++y)te(g,String(y))?f.push(P(d,g,_,B,String(y),!0)):f.push("");return s.forEach(function(L){L.match(/^\d+$/)||f.push(P(d,g,_,B,L,!0))}),f}function P(d,g,_,B,s,f){var y,w,L;if(L=Object.getOwnPropertyDescriptor(g,s)||{value:g[s]},L.get?L.set?w=d.stylize("[Getter/Setter]","special"):w=d.stylize("[Getter]","special"):L.set&&(w=d.stylize("[Setter]","special")),te(B,s)||(y="["+s+"]"),w||(d.seen.indexOf(L.value)<0?(m(_)?w=C(d,L.value,null):w=C(d,L.value,_-1),w.indexOf(`
`)>-1&&(f?w=w.split(`
`).map(function(o){return" "+o}).join(`
`).slice(2):w=`
`+w.split(`
`).map(function(o){return" "+o}).join(`
`))):w=d.stylize("[Circular]","special")),W(y)){if(f&&s.match(/^\d+$/))return w;y=JSON.stringify(""+s),y.match(/^"([a-zA-Z_][a-zA-Z_0-9]*)"$/)?(y=y.slice(1,-1),y=d.stylize(y,"name")):(y=y.replace(/'/g,"\\'").replace(/\\"/g,'"').replace(/(^"|"$)/g,"'"),y=d.stylize(y,"string"))}return y+": "+w}function N(d,g,_){var B=d.reduce(function(s,f){return f.indexOf(`
`)>=0,s+f.replace(/\u001b\[\d\d?m/g,"").length+1},0);return B>60?_[0]+(g===""?"":g+`
`)+" "+d.join(`,
`)+" "+_[1]:_[0]+g+" "+d.join(", ")+" "+_[1]}e.types=Or;function M(d){return Array.isArray(d)}e.isArray=M;function u(d){return typeof d=="boolean"}e.isBoolean=u;function m(d){return d===null}e.isNull=m;function S(d){return d==null}e.isNullOrUndefined=S;function T(d){return typeof d=="number"}e.isNumber=T;function j(d){return typeof d=="string"}e.isString=j;function F(d){return typeof d=="symbol"}e.isSymbol=F;function W(d){return d===void 0}e.isUndefined=W;function $(d){return D(d)&&Z(d)==="[object RegExp]"}e.isRegExp=$,e.types.isRegExp=$;function D(d){return typeof d=="object"&&d!==null}e.isObject=D;function z(d){return D(d)&&Z(d)==="[object Date]"}e.isDate=z,e.types.isDate=z;function J(d){return D(d)&&(Z(d)==="[object Error]"||d instanceof Error)}e.isError=J,e.types.isNativeError=J;function X(d){return typeof d=="function"}e.isFunction=X;function ne(d){return d===null||typeof d=="boolean"||typeof d=="number"||typeof d=="string"||typeof d=="symbol"||typeof d>"u"}e.isPrimitive=ne,e.isBuffer=Wi;function Z(d){return Object.prototype.toString.call(d)}function ie(d){return d<10?"0"+d.toString(10):d.toString(10)}var oe=["Jan","Feb","Mar","Apr","May","Jun","Jul","Aug","Sep","Oct","Nov","Dec"];function ee(){var d=new Date,g=[ie(d.getHours()),ie(d.getMinutes()),ie(d.getSeconds())].join(":");return[d.getDate(),oe[d.getMonth()],g].join(" ")}e.log=function(){console.log("%s - %s",ee(),e.format.apply(e,arguments))},e.inherits=ue,e._extend=function(d,g){if(!g||!D(g))return d;for(var _=Object.keys(g),B=_.length;B--;)d[_[B]]=g[_[B]];return d};function te(d,g){return Object.prototype.hasOwnProperty.call(d,g)}var K=typeof Symbol<"u"?Symbol("util.promisify.custom"):void 0;e.promisify=function(g){if(typeof g!="function")throw new TypeError('The "original" argument must be of type Function');if(K&&g[K]){var _=g[K];if(typeof _!="function")throw new TypeError('The "util.promisify.custom" argument must be of type Function');return Object.defineProperty(_,K,{value:_,enumerable:!1,writable:!1,configurable:!0}),_}function _(){for(var B,s,f=new Promise(function(L,o){B=L,s=o}),y=[],w=0;w<arguments.length;w++)y.push(arguments[w]);y.push(function(L,o){L?s(L):B(o)});try{g.apply(this,y)}catch(L){s(L)}return f}return Object.setPrototypeOf(_,Object.getPrototypeOf(g)),K&&Object.defineProperty(_,K,{value:_,enumerable:!1,writable:!1,configurable:!0}),Object.defineProperties(_,t(g))},e.promisify.custom=K;function re(d,g){if(!d){var _=new Error("Promise was rejected with a falsy value");_.reason=d,d=_}return g(d)}function fe(d){if(typeof d!="function")throw new TypeError('The "original" argument must be of type Function');function g(){for(var _=[],B=0;B<arguments.length;B++)_.push(arguments[B]);var s=_.pop();if(typeof s!="function")throw new TypeError("The last argument must be of type Function");var f=this,y=function(){return s.apply(f,arguments)};d.apply(this,_).then(function(w){R.process$1.nextTick(y.bind(null,null,w))},function(w){R.process$1.nextTick(re.bind(null,w,y))})}return Object.setPrototypeOf(g,Object.getPrototypeOf(d)),Object.defineProperties(g,t(d)),g}e.callbackify=fe})(Ot);var ft,Qt;function Gi(){if(Qt)return ft;Qt=1;function e(P,N){var M=Object.keys(P);if(Object.getOwnPropertySymbols){var u=Object.getOwnPropertySymbols(P);N&&(u=u.filter(function(m){return Object.getOwnPropertyDescriptor(P,m).enumerable})),M.push.apply(M,u)}return M}function t(P){for(var N=1;N<arguments.length;N++){var M=arguments[N]!=null?arguments[N]:{};N%2?e(Object(M),!0).forEach(function(u){r(P,u,M[u])}):Object.getOwnPropertyDescriptors?Object.defineProperties(P,Object.getOwnPropertyDescriptors(M)):e(Object(M)).forEach(function(u){Object.defineProperty(P,u,Object.getOwnPropertyDescriptor(M,u))})}return P}function r(P,N,M){return N=l(N),N in P?Object.defineProperty(P,N,{value:M,enumerable:!0,configurable:!0,writable:!0}):P[N]=M,P}function n(P,N){if(!(P instanceof N))throw new TypeError("Cannot call a class as a function")}function i(P,N){for(var M=0;M<N.length;M++){var u=N[M];u.enumerable=u.enumerable||!1,u.configurable=!0,"value"in u&&(u.writable=!0),Object.defineProperty(P,l(u.key),u)}}function c(P,N,M){return N&&i(P.prototype,N),Object.defineProperty(P,"prototype",{writable:!1}),P}function l(P){var N=h(P,"string");return typeof N=="symbol"?N:String(N)}function h(P,N){if(typeof P!="object"||P===null)return P;var M=P[Symbol.toPrimitive];if(M!==void 0){var u=M.call(P,N||"default");if(typeof u!="object")return u;throw new TypeError("@@toPrimitive must return a primitive value.")}return(N==="string"?String:Number)(P)}var p=xe,A=p.Buffer,C=Ot,E=C.inspect,I=E&&E.custom||"inspect";function q(P,N,M){A.prototype.copy.call(P,N,M)}return ft=function(){function P(){n(this,P),this.head=null,this.tail=null,this.length=0}return c(P,[{key:"push",value:function(M){var u={data:M,next:null};this.length>0?this.tail.next=u:this.head=u,this.tail=u,++this.length}},{key:"unshift",value:function(M){var u={data:M,next:this.head};this.length===0&&(this.tail=u),this.head=u,++this.length}},{key:"shift",value:function(){if(this.length!==0){var M=this.head.data;return this.length===1?this.head=this.tail=null:this.head=this.head.next,--this.length,M}}},{key:"clear",value:function(){this.head=this.tail=null,this.length=0}},{key:"join",value:function(M){if(this.length===0)return"";for(var u=this.head,m=""+u.data;u=u.next;)m+=M+u.data;return m}},{key:"concat",value:function(M){if(this.length===0)return A.alloc(0);for(var u=A.allocUnsafe(M>>>0),m=this.head,S=0;m;)q(m.data,u,S),S+=m.data.length,m=m.next;return u}},{key:"consume",value:function(M,u){var m;return M<this.head.data.length?(m=this.head.data.slice(0,M),this.head.data=this.head.data.slice(M)):M===this.head.data.length?m=this.shift():m=u?this._getString(M):this._getBuffer(M),m}},{key:"first",value:function(){return this.head.data}},{key:"_getString",value:function(M){var u=this.head,m=1,S=u.data;for(M-=S.length;u=u.next;){var T=u.data,j=M>T.length?T.length:M;if(j===T.length?S+=T:S+=T.slice(0,M),M-=j,M===0){j===T.length?(++m,u.next?this.head=u.next:this.head=this.tail=null):(this.head=u,u.data=T.slice(j));break}++m}return this.length-=m,S}},{key:"_getBuffer",value:function(M){var u=A.allocUnsafe(M),m=this.head,S=1;for(m.data.copy(u),M-=m.data.length;m=m.next;){var T=m.data,j=M>T.length?T.length:M;if(T.copy(u,u.length-M,0,j),M-=j,M===0){j===T.length?(++S,m.next?this.head=m.next:this.head=this.tail=null):(this.head=m,m.data=T.slice(j));break}++S}return this.length-=S,u}},{key:I,value:function(M,u){return E(this,t(t({},u),{},{depth:0,customInspect:!1}))}}]),P}(),ft}function xi(e,t){var r=this,n=this._readableState&&this._readableState.destroyed,i=this._writableState&&this._writableState.destroyed;return n||i?(t?t(e):e&&(this._writableState?this._writableState.errorEmitted||(this._writableState.errorEmitted=!0,R.process$1.nextTick(At,this,e)):R.process$1.nextTick(At,this,e)),this):(this._readableState&&(this._readableState.destroyed=!0),this._writableState&&(this._writableState.destroyed=!0),this._destroy(e||null,function(c){!t&&c?r._writableState?r._writableState.errorEmitted?R.process$1.nextTick(Be,r):(r._writableState.errorEmitted=!0,R.process$1.nextTick(er,r,c)):R.process$1.nextTick(er,r,c):t?(R.process$1.nextTick(Be,r),t(c)):R.process$1.nextTick(Be,r)}),this)}function er(e,t){At(e,t),Be(e)}function Be(e){e._writableState&&!e._writableState.emitClose||e._readableState&&!e._readableState.emitClose||e.emit("close")}function Hi(){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 At(e,t){e.emit("error",t)}function Vi(e,t){var r=e._readableState,n=e._writableState;r&&r.autoDestroy||n&&n.autoDestroy?e.destroy(t):e.emit("error",t)}var Gr={destroy:xi,undestroy:Hi,errorOrDestroy:Vi},pe={};function zi(e,t){e.prototype=Object.create(t.prototype),e.prototype.constructor=e,e.__proto__=t}var xr={};function Q(e,t,r){r||(r=Error);function n(c,l,h){return typeof t=="string"?t:t(c,l,h)}var i=function(c){zi(l,c);function l(h,p,A){return c.call(this,n(h,p,A))||this}return l}(r);i.prototype.name=r.name,i.prototype.code=e,xr[e]=i}function tr(e,t){if(Array.isArray(e)){var r=e.length;return e=e.map(function(n){return String(n)}),r>2?"one of ".concat(t," ").concat(e.slice(0,r-1).join(", "),", or ")+e[r-1]:r===2?"one of ".concat(t," ").concat(e[0]," or ").concat(e[1]):"of ".concat(t," ").concat(e[0])}else return"of ".concat(t," ").concat(String(e))}function Ki(e,t,r){return e.substr(0,t.length)===t}function Yi(e,t,r){return(r===void 0||r>e.length)&&(r=e.length),e.substring(r-t.length,r)===t}function Ji(e,t,r){return typeof r!="number"&&(r=0),r+t.length>e.length?!1:e.indexOf(t,r)!==-1}Q("ERR_INVALID_OPT_VALUE",function(e,t){return'The value "'+t+'" is invalid for option "'+e+'"'},TypeError);Q("ERR_INVALID_ARG_TYPE",function(e,t,r){var n;typeof t=="string"&&Ki(t,"not ")?(n="must not be",t=t.replace(/^not /,"")):n="must be";var i;if(Yi(e," argument"))i="The ".concat(e," ").concat(n," ").concat(tr(t,"type"));else{var c=Ji(e,".")?"property":"argument";i='The "'.concat(e,'" ').concat(c," ").concat(n," ").concat(tr(t,"type"))}return i+=". Received type ".concat(typeof r),i},TypeError);Q("ERR_STREAM_PUSH_AFTER_EOF","stream.push() after EOF");Q("ERR_METHOD_NOT_IMPLEMENTED",function(e){return"The "+e+" method is not implemented"});Q("ERR_STREAM_PREMATURE_CLOSE","Premature close");Q("ERR_STREAM_DESTROYED",function(e){return"Cannot call "+e+" after a stream was destroyed"});Q("ERR_MULTIPLE_CALLBACK","Callback called multiple times");Q("ERR_STREAM_CANNOT_PIPE","Cannot pipe, not readable");Q("ERR_STREAM_WRITE_AFTER_END","write after end");Q("ERR_STREAM_NULL_VALUES","May not write null values to stream",TypeError);Q("ERR_UNKNOWN_ENCODING",function(e){return"Unknown encoding: "+e},TypeError);Q("ERR_STREAM_UNSHIFT_AFTER_END_EVENT","stream.unshift() after end event");pe.codes=xr;var Xi=pe.codes.ERR_INVALID_OPT_VALUE;function Zi(e,t,r){return e.highWaterMark!=null?e.highWaterMark:t?e[r]:null}function Qi(e,t,r,n){var i=Zi(t,n,r);if(i!=null){if(!(isFinite(i)&&Math.floor(i)===i)||i<0){var c=n?r:"highWaterMark";throw new Xi(c,i)}return Math.floor(i)}return e.objectMode?16:16*1024}var Hr={getHighWaterMark:Qi},eo=to;function to(e,t){if(st("noDeprecation"))return e;var r=!1;function n(){if(!r){if(st("throwDeprecation"))throw new Error(t);st("traceDeprecation")?console.trace(t):console.warn(t),r=!0}return e.apply(this,arguments)}return n}function st(e){try{if(!R.commonjsGlobal.localStorage)return!1}catch{return!1}var t=R.commonjsGlobal.localStorage[e];return t==null?!1:String(t).toLowerCase()==="true"}var ut,rr;function Vr(){if(rr)return ut;rr=1,ut=$;function e(s){var f=this;this.next=null,this.entry=null,this.finish=function(){B(f,s)}}var t;$.WritableState=F;var r={deprecate:eo},n=Tr,i=xe.Buffer,c=(typeof R.commonjsGlobal<"u"?R.commonjsGlobal:typeof window<"u"?window:typeof self<"u"?self:{}).Uint8Array||function(){};function l(s){return i.from(s)}function h(s){return i.isBuffer(s)||s instanceof c}var p=Gr,A=Hr,C=A.getHighWaterMark,E=pe.codes,I=E.ERR_INVALID_ARG_TYPE,q=E.ERR_METHOD_NOT_IMPLEMENTED,P=E.ERR_MULTIPLE_CALLBACK,N=E.ERR_STREAM_CANNOT_PIPE,M=E.ERR_STREAM_DESTROYED,u=E.ERR_STREAM_NULL_VALUES,m=E.ERR_STREAM_WRITE_AFTER_END,S=E.ERR_UNKNOWN_ENCODING,T=p.errorOrDestroy;ue($,n);function j(){}function F(s,f,y){t=t||Ee(),s=s||{},typeof y!="boolean"&&(y=f instanceof t),this.objectMode=!!s.objectMode,y&&(this.objectMode=this.objectMode||!!s.writableObjectMode),this.highWaterMark=C(this,s,"writableHighWaterMark",y),this.finalCalled=!1,this.needDrain=!1,this.ending=!1,this.ended=!1,this.finished=!1,this.destroyed=!1;var w=s.decodeStrings===!1;this.decodeStrings=!w,this.defaultEncoding=s.defaultEncoding||"utf8",this.length=0,this.writing=!1,this.corked=0,this.sync=!0,this.bufferProcessing=!1,this.onwrite=function(L){oe(f,L)},this.writecb=null,this.writelen=0,this.bufferedRequest=null,this.lastBufferedRequest=null,this.pendingcb=0,this.prefinished=!1,this.errorEmitted=!1,this.emitClose=s.emitClose!==!1,this.autoDestroy=!!s.autoDestroy,this.bufferedRequestCount=0,this.corkedRequestsFree=new e(this)}F.prototype.getBuffer=function(){for(var f=this.bufferedRequest,y=[];f;)y.push(f),f=f.next;return y},function(){try{Object.defineProperty(F.prototype,"buffer",{get:r.deprecate(function(){return this.getBuffer()},"_writableState.buffer is deprecated. Use _writableState.getBuffer instead.","DEP0003")})}catch{}}();var W;typeof Symbol=="function"&&Symbol.hasInstance&&typeof Function.prototype[Symbol.hasInstance]=="function"?(W=Function.prototype[Symbol.hasInstance],Object.defineProperty($,Symbol.hasInstance,{value:function(f){return W.call(this,f)?!0:this!==$?!1:f&&f._writableState instanceof F}})):W=function(f){return f instanceof this};function $(s){t=t||Ee();var f=this instanceof t;if(!f&&!W.call($,this))return new $(s);this._writableState=new F(s,this,f),this.writable=!0,s&&(typeof s.write=="function"&&(this._write=s.write),typeof s.writev=="function"&&(this._writev=s.writev),typeof s.destroy=="function"&&(this._destroy=s.destroy),typeof s.final=="function"&&(this._final=s.final)),n.call(this)}$.prototype.pipe=function(){T(this,new N)};function D(s,f){var y=new m;T(s,y),R.process$1.nextTick(f,y)}function z(s,f,y,w){var L;return y===null?L=new u:typeof y!="string"&&!f.objectMode&&(L=new I("chunk",["string","Buffer"],y)),L?(T(s,L),R.process$1.nextTick(w,L),!1):!0}$.prototype.write=function(s,f,y){var w=this._writableState,L=!1,o=!w.objectMode&&h(s);return o&&!i.isBuffer(s)&&(s=l(s)),typeof f=="function"&&(y=f,f=null),o?f="buffer":f||(f=w.defaultEncoding),typeof y!="function"&&(y=j),w.ending?D(this,y):(o||z(this,w,s,y))&&(w.pendingcb++,L=X(this,w,o,s,f,y)),L},$.prototype.cork=function(){this._writableState.corked++},$.prototype.uncork=function(){var s=this._writableState;s.corked&&(s.corked--,!s.writing&&!s.corked&&!s.bufferProcessing&&s.bufferedRequest&&K(this,s))},$.prototype.setDefaultEncoding=function(f){if(typeof f=="string"&&(f=f.toLowerCase()),!(["hex","utf8","utf-8","ascii","binary","base64","ucs2","ucs-2","utf16le","utf-16le","raw"].indexOf((f+"").toLowerCase())>-1))throw new S(f);return this._writableState.defaultEncoding=f,this},Object.defineProperty($.prototype,"writableBuffer",{enumerable:!1,get:function(){return this._writableState&&this._writableState.getBuffer()}});function J(s,f,y){return!s.objectMode&&s.decodeStrings!==!1&&typeof f=="string"&&(f=i.from(f,y)),f}Object.defineProperty($.prototype,"writableHighWaterMark",{enumerable:!1,get:function(){return this._writableState.highWaterMark}});function X(s,f,y,w,L,o){if(!y){var a=J(f,w,L);w!==a&&(y=!0,L="buffer",w=a)}var b=f.objectMode?1:w.length;f.length+=b;var O=f.length<f.highWaterMark;if(O||(f.needDrain=!0),f.writing||f.corked){var H=f.lastBufferedRequest;f.lastBufferedRequest={chunk:w,encoding:L,isBuf:y,callback:o,next:null},H?H.next=f.lastBufferedRequest:f.bufferedRequest=f.lastBufferedRequest,f.bufferedRequestCount+=1}else ne(s,f,!1,b,w,L,o);return O}function ne(s,f,y,w,L,o,a){f.writelen=w,f.writecb=a,f.writing=!0,f.sync=!0,f.destroyed?f.onwrite(new M("write")):y?s._writev(L,f.onwrite):s._write(L,o,f.onwrite),f.sync=!1}function Z(s,f,y,w,L){--f.pendingcb,y?(R.process$1.nextTick(L,w),R.process$1.nextTick(g,s,f),s._writableState.errorEmitted=!0,T(s,w)):(L(w),s._writableState.errorEmitted=!0,T(s,w),g(s,f))}function ie(s){s.writing=!1,s.writecb=null,s.length-=s.writelen,s.writelen=0}function oe(s,f){var y=s._writableState,w=y.sync,L=y.writecb;if(typeof L!="function")throw new P;if(ie(y),f)Z(s,y,w,f,L);else{var o=re(y)||s.destroyed;!o&&!y.corked&&!y.bufferProcessing&&y.bufferedRequest&&K(s,y),w?R.process$1.nextTick(ee,s,y,o,L):ee(s,y,o,L)}}function ee(s,f,y,w){y||te(s,f),f.pendingcb--,w(),g(s,f)}function te(s,f){f.length===0&&f.needDrain&&(f.needDrain=!1,s.emit("drain"))}function K(s,f){f.bufferProcessing=!0;var y=f.bufferedRequest;if(s._writev&&y&&y.next){var w=f.bufferedRequestCount,L=new Array(w),o=f.corkedRequestsFree;o.entry=y;for(var a=0,b=!0;y;)L[a]=y,y.isBuf||(b=!1),y=y.next,a+=1;L.allBuffers=b,ne(s,f,!0,f.length,L,"",o.finish),f.pendingcb++,f.lastBufferedRequest=null,o.next?(f.corkedRequestsFree=o.next,o.next=null):f.corkedRequestsFree=new e(f),f.bufferedRequestCount=0}else{for(;y;){var O=y.chunk,H=y.encoding,U=y.callback,G=f.objectMode?1:O.length;if(ne(s,f,!1,G,O,H,U),y=y.next,f.bufferedRequestCount--,f.writing)break}y===null&&(f.lastBufferedRequest=null)}f.bufferedRequest=y,f.bufferProcessing=!1}$.prototype._write=function(s,f,y){y(new q("_write()"))},$.prototype._writev=null,$.prototype.end=function(s,f,y){var w=this._writableState;return typeof s=="function"?(y=s,s=null,f=null):typeof f=="function"&&(y=f,f=null),s!=null&&this.write(s,f),w.corked&&(w.corked=1,this.uncork()),w.ending||_(this,w,y),this},Object.defineProperty($.prototype,"writableLength",{enumerable:!1,get:function(){return this._writableState.length}});function re(s){return s.ending&&s.length===0&&s.bufferedRequest===null&&!s.finished&&!s.writing}function fe(s,f){s._final(function(y){f.pendingcb--,y&&T(s,y),f.prefinished=!0,s.emit("prefinish"),g(s,f)})}function d(s,f){!f.prefinished&&!f.finalCalled&&(typeof s._final=="function"&&!f.destroyed?(f.pendingcb++,f.finalCalled=!0,R.process$1.nextTick(fe,s,f)):(f.prefinished=!0,s.emit("prefinish")))}function g(s,f){var y=re(f);if(y&&(d(s,f),f.pendingcb===0&&(f.finished=!0,s.emit("finish"),f.autoDestroy))){var w=s._readableState;(!w||w.autoDestroy&&w.endEmitted)&&s.destroy()}return y}function _(s,f,y){f.ending=!0,g(s,f),y&&(f.finished?R.process$1.nextTick(y):s.once("finish",y)),f.ended=!0,s.writable=!1}function B(s,f,y){var w=s.entry;for(s.entry=null;w;){var L=w.callback;f.pendingcb--,L(y),w=w.next}f.corkedRequestsFree.next=s}return Object.defineProperty($.prototype,"destroyed",{enumerable:!1,get:function(){return this._writableState===void 0?!1:this._writableState.destroyed},set:function(f){this._writableState&&(this._writableState.destroyed=f)}}),$.prototype.destroy=p.destroy,$.prototype._undestroy=p.undestroy,$.prototype._destroy=function(s,f){f(s)},ut}var lt,nr;function Ee(){if(nr)return lt;nr=1;var e=Object.keys||function(A){var C=[];for(var E in A)C.push(E);return C};lt=l;var t=Kr(),r=Vr();ue(l,t);for(var n=e(r.prototype),i=0;i<n.length;i++){var c=n[i];l.prototype[c]||(l.prototype[c]=r.prototype[c])}function l(A){if(!(this instanceof l))return new l(A);t.call(this,A),r.call(this,A),this.allowHalfOpen=!0,A&&(A.readable===!1&&(this.readable=!1),A.writable===!1&&(this.writable=!1),A.allowHalfOpen===!1&&(this.allowHalfOpen=!1,this.once("end",h)))}Object.defineProperty(l.prototype,"writableHighWaterMark",{enumerable:!1,get:function(){return this._writableState.highWaterMark}}),Object.defineProperty(l.prototype,"writableBuffer",{enumerable:!1,get:function(){return this._writableState&&this._writableState.getBuffer()}}),Object.defineProperty(l.prototype,"writableLength",{enumerable:!1,get:function(){return this._writableState.length}});function h(){this._writableState.ended||R.process$1.nextTick(p,this)}function p(A){A.end()}return Object.defineProperty(l.prototype,"destroyed",{enumerable:!1,get:function(){return this._readableState===void 0||this._writableState===void 0?!1:this._readableState.destroyed&&this._writableState.destroyed},set:function(C){this._readableState===void 0||this._writableState===void 0||(this._readableState.destroyed=C,this._writableState.destroyed=C)}}),lt}var ct={},je={exports:{}};/*! safe-buffer. MIT License. Feross Aboukhadijeh <https://feross.org/opensource> */var ir;function ro(){return ir||(ir=1,function(e,t){var r=xe,n=r.Buffer;function i(l,h){for(var p in l)h[p]=l[p]}n.from&&n.alloc&&n.allocUnsafe&&n.allocUnsafeSlow?e.exports=r:(i(r,t),t.Buffer=c);function c(l,h,p){return n(l,h,p)}c.prototype=Object.create(n.prototype),i(n,c),c.from=function(l,h,p){if(typeof l=="number")throw new TypeError("Argument must not be a number");return n(l,h,p)},c.alloc=function(l,h,p){if(typeof l!="number")throw new TypeError("Argument must be a number");var A=n(l);return h!==void 0?typeof p=="string"?A.fill(h,p):A.fill(h):A.fill(0),A},c.allocUnsafe=function(l){if(typeof l!="number")throw new TypeError("Argument must be a number");return n(l)},c.allocUnsafeSlow=function(l){if(typeof l!="number")throw new TypeError("Argument must be a number");return r.SlowBuffer(l)}}(je,je.exports)),je.exports}var or;function ar(){if(or)return ct;or=1;var e=ro().Buffer,t=e.isEncoding||function(u){switch(u=""+u,u&&u.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 r(u){if(!u)return"utf8";for(var m;;)switch(u){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 u;default:if(m)return;u=(""+u).toLowerCase(),m=!0}}function n(u){var m=r(u);if(typeof m!="string"&&(e.isEncoding===t||!t(u)))throw new Error("Unknown encoding: "+u);return m||u}ct.StringDecoder=i;function i(u){this.encoding=n(u);var m;switch(this.encoding){case"utf16le":this.text=E,this.end=I,m=4;break;case"utf8":this.fillLast=p,m=4;break;case"base64":this.text=q,this.end=P,m=3;break;default:this.write=N,this.end=M;return}this.lastNeed=0,this.lastTotal=0,this.lastChar=e.allocUnsafe(m)}i.prototype.write=function(u){if(u.length===0)return"";var m,S;if(this.lastNeed){if(m=this.fillLast(u),m===void 0)return"";S=this.lastNeed,this.lastNeed=0}else S=0;return S<u.length?m?m+this.text(u,S):this.text(u,S):m||""},i.prototype.end=C,i.prototype.text=A,i.prototype.fillLast=function(u){if(this.lastNeed<=u.length)return u.copy(this.lastChar,this.lastTotal-this.lastNeed,0,this.lastNeed),this.lastChar.toString(this.encoding,0,this.lastTotal);u.copy(this.lastChar,this.lastTotal-this.lastNeed,0,u.length),this.lastNeed-=u.length};function c(u){return u<=127?0:u>>5===6?2:u>>4===14?3:u>>3===30?4:u>>6===2?-1:-2}function l(u,m,S){var T=m.length-1;if(T<S)return 0;var j=c(m[T]);return j>=0?(j>0&&(u.lastNeed=j-1),j):--T<S||j===-2?0:(j=c(m[T]),j>=0?(j>0&&(u.lastNeed=j-2),j):--T<S||j===-2?0:(j=c(m[T]),j>=0?(j>0&&(j===2?j=0:u.lastNeed=j-3),j):0))}function h(u,m,S){if((m[0]&192)!==128)return u.lastNeed=0,"�";if(u.lastNeed>1&&m.length>1){if((m[1]&192)!==128)return u.lastNeed=1,"�";if(u.lastNeed>2&&m.length>2&&(m[2]&192)!==128)return u.lastNeed=2,"�"}}function p(u){var m=this.lastTotal-this.lastNeed,S=h(this,u);if(S!==void 0)return S;if(this.lastNeed<=u.length)return u.copy(this.lastChar,m,0,this.lastNeed),this.lastChar.toString(this.encoding,0,this.lastTotal);u.copy(this.lastChar,m,0,u.length),this.lastNeed-=u.length}function A(u,m){var S=l(this,u,m);if(!this.lastNeed)return u.toString("utf8",m);this.lastTotal=S;var T=u.length-(S-this.lastNeed);return u.copy(this.lastChar,0,T),u.toString("utf8",m,T)}function C(u){var m=u&&u.length?this.write(u):"";return this.lastNeed?m+"�":m}function E(u,m){if((u.length-m)%2===0){var S=u.toString("utf16le",m);if(S){var T=S.charCodeAt(S.length-1);if(T>=55296&&T<=56319)return this.lastNeed=2,this.lastTotal=4,this.lastChar[0]=u[u.length-2],this.lastChar[1]=u[u.length-1],S.slice(0,-1)}return S}return this.lastNeed=1,this.lastTotal=2,this.lastChar[0]=u[u.length-1],u.toString("utf16le",m,u.length-1)}function I(u){var m=u&&u.length?this.write(u):"";if(this.lastNeed){var S=this.lastTotal-this.lastNeed;return m+this.lastChar.toString("utf16le",0,S)}return m}function q(u,m){var S=(u.length-m)%3;return S===0?u.toString("base64",m):(this.lastNeed=3-S,this.lastTotal=3,S===1?this.lastChar[0]=u[u.length-1]:(this.lastChar[0]=u[u.length-2],this.lastChar[1]=u[u.length-1]),u.toString("base64",m,u.length-S))}function P(u){var m=u&&u.length?this.write(u):"";return this.lastNeed?m+this.lastChar.toString("base64",0,3-this.lastNeed):m}function N(u){return u.toString(this.encoding)}function M(u){return u&&u.length?this.write(u):""}return ct}var fr=pe.codes.ERR_STREAM_PREMATURE_CLOSE;function no(e){var t=!1;return function(){if(!t){t=!0;for(var r=arguments.length,n=new Array(r),i=0;i<r;i++)n[i]=arguments[i];e.apply(this,n)}}}function io(){}function oo(e){return e.setHeader&&typeof e.abort=="function"}function zr(e,t,r){if(typeof t=="function")return zr(e,null,t);t||(t={}),r=no(r||io);var n=t.readable||t.readable!==!1&&e.readable,i=t.writable||t.writable!==!1&&e.writable,c=function(){e.writable||h()},l=e._writableState&&e._writableState.finished,h=function(){i=!1,l=!0,n||r.call(e)},p=e._readableState&&e._readableState.endEmitted,A=function(){n=!1,p=!0,i||r.call(e)},C=function(P){r.call(e,P)},E=function(){var P;if(n&&!p)return(!e._readableState||!e._readableState.ended)&&(P=new fr),r.call(e,P);if(i&&!l)return(!e._writableState||!e._writableState.ended)&&(P=new fr),r.call(e,P)},I=function(){e.req.on("finish",h)};return oo(e)?(e.on("complete",h),e.on("abort",E),e.req?I():e.on("request",I)):i&&!e._writableState&&(e.on("end",c),e.on("close",c)),e.on("end",A),e.on("finish",h),t.error!==!1&&e.on("error",C),e.on("close",E),function(){e.removeListener("complete",h),e.removeListener("abort",E),e.removeListener("request",I),e.req&&e.req.removeListener("finish",h),e.removeListener("end",c),e.removeListener("close",c),e.removeListener("finish",h),e.removeListener("end",A),e.removeListener("error",C),e.removeListener("close",E)}}var It=zr,dt,sr;function ao(){if(sr)return dt;sr=1;var e;function t(S,T,j){return T=r(T),T in S?Object.defineProperty(S,T,{value:j,enumerable:!0,configurable:!0,writable:!0}):S[T]=j,S}function r(S){var T=n(S,"string");return typeof T=="symbol"?T:String(T)}function n(S,T){if(typeof S!="object"||S===null)return S;var j=S[Symbol.toPrimitive];if(j!==void 0){var F=j.call(S,T||"default");if(typeof F!="object")return F;throw new TypeError("@@toPrimitive must return a primitive value.")}return(T==="string"?String:Number)(S)}var i=It,c=Symbol("lastResolve"),l=Symbol("lastReject"),h=Symbol("error"),p=Symbol("ended"),A=Symbol("lastPromise"),C=Symbol("handlePromise"),E=Symbol("stream");function I(S,T){return{value:S,done:T}}function q(S){var T=S[c];if(T!==null){var j=S[E].read();j!==null&&(S[A]=null,S[c]=null,S[l]=null,T(I(j,!1)))}}function P(S){R.process$1.nextTick(q,S)}function N(S,T){return function(j,F){S.then(function(){if(T[p]){j(I(void 0,!0));return}T[C](j,F)},F)}}var M=Object.getPrototypeOf(function(){}),u=Object.setPrototypeOf((e={get stream(){return this[E]},next:function(){var T=this,j=this[h];if(j!==null)return Promise.reject(j);if(this[p])return Promise.resolve(I(void 0,!0));if(this[E].destroyed)return new Promise(function(D,z){R.process$1.nextTick(function(){T[h]?z(T[h]):D(I(void 0,!0))})});var F=this[A],W;if(F)W=new Promise(N(F,this));else{var $=this[E].read();if($!==null)return Promise.resolve(I($,!1));W=new Promise(this[C])}return this[A]=W,W}},t(e,Symbol.asyncIterator,function(){return this}),t(e,"return",function(){var T=this;return new Promise(function(j,F){T[E].destroy(null,function(W){if(W){F(W);return}j(I(void 0,!0))})})}),e),M),m=function(T){var j,F=Object.create(u,(j={},t(j,E,{value:T,writable:!0}),t(j,c,{value:null,writable:!0}),t(j,l,{value:null,writable:!0}),t(j,h,{value:null,writable:!0}),t(j,p,{value:T._readableState.endEmitted,writable:!0}),t(j,C,{value:function($,D){var z=F[E].read();z?(F[A]=null,F[c]=null,F[l]=null,$(I(z,!1))):(F[c]=$,F[l]=D)},writable:!0}),j));return F[A]=null,i(T,function(W){if(W&&W.code!=="ERR_STREAM_PREMATURE_CLOSE"){var $=F[l];$!==null&&(F[A]=null,F[c]=null,F[l]=null,$(W)),F[h]=W;return}var D=F[c];D!==null&&(F[A]=null,F[c]=null,F[l]=null,D(I(void 0,!0))),F[p]=!0}),T.on("readable",P.bind(null,F)),F};return dt=m,dt}var pt,ur;function fo(){return ur||(ur=1,pt=function(){throw new Error("Readable.from is not available in the browser")}),pt}var ht,lr;function Kr(){if(lr)return ht;lr=1,ht=D;var e;D.ReadableState=$,Rr.EventEmitter;var t=function(a,b){return a.listeners(b).length},r=Tr,n=xe.Buffer,i=(typeof R.commonjsGlobal<"u"?R.commonjsGlobal:typeof window<"u"?window:typeof self<"u"?self:{}).Uint8Array||function(){};function c(o){return n.from(o)}function l(o){return n.isBuffer(o)||o instanceof i}var h=Ot,p;h&&h.debuglog?p=h.debuglog("stream"):p=function(){};var A=Gi(),C=Gr,E=Hr,I=E.getHighWaterMark,q=pe.codes,P=q.ERR_INVALID_ARG_TYPE,N=q.ERR_STREAM_PUSH_AFTER_EOF,M=q.ERR_METHOD_NOT_IMPLEMENTED,u=q.ERR_STREAM_UNSHIFT_AFTER_END_EVENT,m,S,T;ue(D,r);var j=C.errorOrDestroy,F=["error","close","destroy","pause","resume"];function W(o,a,b){if(typeof o.prependListener=="function")return o.prependListener(a,b);!o._events||!o._events[a]?o.on(a,b):Array.isArray(o._events[a])?o._events[a].unshift(b):o._events[a]=[b,o._events[a]]}function $(o,a,b){e=e||Ee(),o=o||{},typeof b!="boolean"&&(b=a instanceof e),this.objectMode=!!o.objectMode,b&&(this.objectMode=this.objectMode||!!o.readableObjectMode),this.highWaterMark=I(this,o,"readableHighWaterMark",b),this.buffer=new A,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.paused=!0,this.emitClose=o.emitClose!==!1,this.autoDestroy=!!o.autoDestroy,this.destroyed=!1,this.defaultEncoding=o.defaultEncoding||"utf8",this.awaitDrain=0,this.readingMore=!1,this.decoder=null,this.encoding=null,o.encoding&&(m||(m=ar().StringDecoder),this.decoder=new m(o.encoding),this.encoding=o.encoding)}function D(o){if(e=e||Ee(),!(this instanceof D))return new D(o);var a=this instanceof e;this._readableState=new $(o,this,a),this.readable=!0,o&&(typeof o.read=="function"&&(this._read=o.read),typeof o.destroy=="function"&&(this._destroy=o.destroy)),r.call(this)}Object.defineProperty(D.prototype,"destroyed",{enumerable:!1,get:function(){return this._readableState===void 0?!1:this._readableState.destroyed},set:function(a){this._readableState&&(this._readableState.destroyed=a)}}),D.prototype.destroy=C.destroy,D.prototype._undestroy=C.undestroy,D.prototype._destroy=function(o,a){a(o)},D.prototype.push=function(o,a){var b=this._readableState,O;return b.objectMode?O=!0:typeof o=="string"&&(a=a||b.defaultEncoding,a!==b.encoding&&(o=n.from(o,a),a=""),O=!0),z(this,o,a,!1,O)},D.prototype.unshift=function(o){return z(this,o,null,!0,!1)};function z(o,a,b,O,H){p("readableAddChunk",a);var U=o._readableState;if(a===null)U.reading=!1,oe(o,U);else{var G;if(H||(G=X(U,a)),G)j(o,G);else if(U.objectMode||a&&a.length>0)if(typeof a!="string"&&!U.objectMode&&Object.getPrototypeOf(a)!==n.prototype&&(a=c(a)),O)U.endEmitted?j(o,new u):J(o,U,a,!0);else if(U.ended)j(o,new N);else{if(U.destroyed)return!1;U.reading=!1,U.decoder&&!b?(a=U.decoder.write(a),U.objectMode||a.length!==0?J(o,U,a,!1):K(o,U)):J(o,U,a,!1)}else O||(U.reading=!1,K(o,U))}return!U.ended&&(U.length<U.highWaterMark||U.length===0)}function J(o,a,b,O){a.flowing&&a.length===0&&!a.sync?(a.awaitDrain=0,o.emit("data",b)):(a.length+=a.objectMode?1:b.length,O?a.buffer.unshift(b):a.buffer.push(b),a.needReadable&&ee(o)),K(o,a)}function X(o,a){var b;return!l(a)&&typeof a!="string"&&a!==void 0&&!o.objectMode&&(b=new P("chunk",["string","Buffer","Uint8Array"],a)),b}D.prototype.isPaused=function(){return this._readableState.flowing===!1},D.prototype.setEncoding=function(o){m||(m=ar().StringDecoder);var a=new m(o);this._readableState.decoder=a,this._readableState.encoding=this._readableState.decoder.encoding;for(var b=this._readableState.buffer.head,O="";b!==null;)O+=a.write(b.data),b=b.next;return this._readableState.buffer.clear(),O!==""&&this._readableState.buffer.push(O),this._readableState.length=O.length,this};var ne=1073741824;function Z(o){return o>=ne?o=ne:(o--,o|=o>>>1,o|=o>>>2,o|=o>>>4,o|=o>>>8,o|=o>>>16,o++),o}function ie(o,a){return o<=0||a.length===0&&a.ended?0:a.objectMode?1:o!==o?a.flowing&&a.length?a.buffer.head.data.length:a.length:(o>a.highWaterMark&&(a.highWaterMark=Z(o)),o<=a.length?o:a.ended?a.length:(a.needReadable=!0,0))}D.prototype.read=function(o){p("read",o),o=parseInt(o,10);var a=this._readableState,b=o;if(o!==0&&(a.emittedReadable=!1),o===0&&a.needReadable&&((a.highWaterMark!==0?a.length>=a.highWaterMark:a.length>0)||a.ended))return p("read: emitReadable",a.length,a.ended),a.length===0&&a.ended?y(this):ee(this),null;if(o=ie(o,a),o===0&&a.ended)return a.length===0&&y(this),null;var O=a.needReadable;p("need readable",O),(a.length===0||a.length-o<a.highWaterMark)&&(O=!0,p("length less than watermark",O)),a.ended||a.reading?(O=!1,p("reading or ended",O)):O&&(p("do read"),a.reading=!0,a.sync=!0,a.length===0&&(a.needReadable=!0),this._read(a.highWaterMark),a.sync=!1,a.reading||(o=ie(b,a)));var H;return o>0?H=f(o,a):H=null,H===null?(a.needReadable=a.length<=a.highWaterMark,o=0):(a.length-=o,a.awaitDrain=0),a.length===0&&(a.ended||(a.needReadable=!0),b!==o&&a.ended&&y(this)),H!==null&&this.emit("data",H),H};function oe(o,a){if(p("onEofChunk"),!a.ended){if(a.decoder){var b=a.decoder.end();b&&b.length&&(a.buffer.push(b),a.length+=a.objectMode?1:b.length)}a.ended=!0,a.sync?ee(o):(a.needReadable=!1,a.emittedReadable||(a.emittedReadable=!0,te(o)))}}function ee(o){var a=o._readableState;p("emitReadable",a.needReadable,a.emittedReadable),a.needReadable=!1,a.emittedReadable||(p("emitReadable",a.flowing),a.emittedReadable=!0,R.process$1.nextTick(te,o))}function te(o){var a=o._readableState;p("emitReadable_",a.destroyed,a.length,a.ended),!a.destroyed&&(a.length||a.ended)&&(o.emit("readable"),a.emittedReadable=!1),a.needReadable=!a.flowing&&!a.ended&&a.length<=a.highWaterMark,s(o)}function K(o,a){a.readingMore||(a.readingMore=!0,R.process$1.nextTick(re,o,a))}function re(o,a){for(;!a.reading&&!a.ended&&(a.length<a.highWaterMark||a.flowing&&a.length===0);){var b=a.length;if(p("maybeReadMore read 0"),o.read(0),b===a.length)break}a.readingMore=!1}D.prototype._read=function(o){j(this,new M("_read()"))},D.prototype.pipe=function(o,a){var b=this,O=this._readableState;switch(O.pipesCount){case 0:O.pipes=o;break;case 1:O.pipes=[O.pipes,o];break;default:O.pipes.push(o);break}O.pipesCount+=1,p("pipe count=%d opts=%j",O.pipesCount,a);var H=(!a||a.end!==!1)&&o!==R.process$1.stdout&&o!==R.process$1.stderr,U=H?se:Ae;O.endEmitted?R.process$1.nextTick(U):b.once("end",U),o.on("unpipe",G);function G(he,ye){p("onunpipe"),he===b&&ye&&ye.hasUnpiped===!1&&(ye.hasUnpiped=!0,Ft())}function se(){p("onend"),o.end()}var v=fe(b);o.on("drain",v);var Pe=!1;function Ft(){p("cleanup"),o.removeListener("close",Je),o.removeListener("finish",Xe),o.removeListener("drain",v),o.removeListener("error",Ye),o.removeListener("unpipe",G),b.removeListener("end",se),b.removeListener("end",Ae),b.removeListener("data",$t),Pe=!0,O.awaitDrain&&(!o._writableState||o._writableState.needDrain)&&v()}b.on("data",$t);function $t(he){p("ondata");var ye=o.write(he);p("dest.write",ye),ye===!1&&((O.pipesCount===1&&O.pipes===o||O.pipesCount>1&&L(O.pipes,o)!==-1)&&!Pe&&(p("false write response, pause",O.awaitDrain),O.awaitDrain++),b.pause())}function Ye(he){p("onerror",he),Ae(),o.removeListener("error",Ye),t(o,"error")===0&&j(o,he)}W(o,"error",Ye);function Je(){o.removeListener("finish",Xe),Ae()}o.once("close",Je);function Xe(){p("onfinish"),o.removeListener("close",Je),Ae()}o.once("finish",Xe);function Ae(){p("unpipe"),b.unpipe(o)}return o.emit("pipe",b),O.flowing||(p("pipe resume"),b.resume()),o};function fe(o){return function(){var b=o._readableState;p("pipeOnDrain",b.awaitDrain),b.awaitDrain&&b.awaitDrain--,b.awaitDrain===0&&t(o,"data")&&(b.flowing=!0,s(o))}}D.prototype.unpipe=function(o){var a=this._readableState,b={hasUnpiped:!1};if(a.pipesCount===0)return this;if(a.pipesCount===1)return o&&o!==a.pipes?this:(o||(o=a.pipes),a.pipes=null,a.pipesCount=0,a.flowing=!1,o&&o.emit("unpipe",this,b),this);if(!o){var O=a.pipes,H=a.pipesCount;a.pipes=null,a.pipesCount=0,a.flowing=!1;for(var U=0;U<H;U++)O[U].emit("unpipe",this,{hasUnpiped:!1});return this}var G=L(a.pipes,o);return G===-1?this:(a.pipes.splice(G,1),a.pipesCount-=1,a.pipesCount===1&&(a.pipes=a.pipes[0]),o.emit("unpipe",this,b),this)},D.prototype.on=function(o,a){var b=r.prototype.on.call(this,o,a),O=this._readableState;return o==="data"?(O.readableListening=this.listenerCount("readable")>0,O.flowing!==!1&&this.resume()):o==="readable"&&!O.endEmitted&&!O.readableListening&&(O.readableListening=O.needReadable=!0,O.flowing=!1,O.emittedReadable=!1,p("on readable",O.length,O.reading),O.length?ee(this):O.reading||R.process$1.nextTick(g,this)),b},D.prototype.addListener=D.prototype.on,D.prototype.removeListener=function(o,a){var b=r.prototype.removeListener.call(this,o,a);return o==="readable"&&R.process$1.nextTick(d,this),b},D.prototype.removeAllListeners=function(o){var a=r.prototype.removeAllListeners.apply(this,arguments);return(o==="readable"||o===void 0)&&R.process$1.nextTick(d,this),a};function d(o){var a=o._readableState;a.readableListening=o.listenerCount("readable")>0,a.resumeScheduled&&!a.paused?a.flowing=!0:o.listenerCount("data")>0&&o.resume()}function g(o){p("readable nexttick read 0"),o.read(0)}D.prototype.resume=function(){var o=this._readableState;return o.flowing||(p("resume"),o.flowing=!o.readableListening,_(this,o)),o.paused=!1,this};function _(o,a){a.resumeScheduled||(a.resumeScheduled=!0,R.process$1.nextTick(B,o,a))}function B(o,a){p("resume",a.reading),a.reading||o.read(0),a.resumeScheduled=!1,o.emit("resume"),s(o),a.flowing&&!a.reading&&o.read(0)}D.prototype.pause=function(){return p("call pause flowing=%j",this._readableState.flowing),this._readableState.flowing!==!1&&(p("pause"),this._readableState.flowing=!1,this.emit("pause")),this._readableState.paused=!0,this};function s(o){var a=o._readableState;for(p("flow",a.flowing);a.flowing&&o.read()!==null;);}D.prototype.wrap=function(o){var a=this,b=this._readableState,O=!1;o.on("end",function(){if(p("wrapped end"),b.decoder&&!b.ended){var G=b.decoder.end();G&&G.length&&a.push(G)}a.push(null)}),o.on("data",function(G){if(p("wrapped data"),b.decoder&&(G=b.decoder.write(G)),!(b.objectMode&&G==null)&&!(!b.objectMode&&(!G||!G.length))){var se=a.push(G);se||(O=!0,o.pause())}});for(var H in o)this[H]===void 0&&typeof o[H]=="function"&&(this[H]=function(se){return function(){return o[se].apply(o,arguments)}}(H));for(var U=0;U<F.length;U++)o.on(F[U],this.emit.bind(this,F[U]));return this._read=function(G){p("wrapped _read",G),O&&(O=!1,o.resume())},this},typeof Symbol=="function"&&(D.prototype[Symbol.asyncIterator]=function(){return S===void 0&&(S=ao()),S(this)}),Object.defineProperty(D.prototype,"readableHighWaterMark",{enumerable:!1,get:function(){return this._readableState.highWaterMark}}),Object.defineProperty(D.prototype,"readableBuffer",{enumerable:!1,get:function(){return this._readableState&&this._readableState.buffer}}),Object.defineProperty(D.prototype,"readableFlowing",{enumerable:!1,get:function(){return this._readableState.flowing},set:function(a){this._readableState&&(this._readableState.flowing=a)}}),D._fromList=f,Object.defineProperty(D.prototype,"readableLength",{enumerable:!1,get:function(){return this._readableState.length}});function f(o,a){if(a.length===0)return null;var b;return a.objectMode?b=a.buffer.shift():!o||o>=a.length?(a.decoder?b=a.buffer.join(""):a.buffer.length===1?b=a.buffer.first():b=a.buffer.concat(a.length),a.buffer.clear()):b=a.buffer.consume(o,a.decoder),b}function y(o){var a=o._readableState;p("endReadable",a.endEmitted),a.endEmitted||(a.ended=!0,R.process$1.nextTick(w,a,o))}function w(o,a){if(p("endReadableNT",o.endEmitted,o.length),!o.endEmitted&&o.length===0&&(o.endEmitted=!0,a.readable=!1,a.emit("end"),o.autoDestroy)){var b=a._writableState;(!b||b.autoDestroy&&b.finished)&&a.destroy()}}typeof Symbol=="function"&&(D.from=function(o,a){return T===void 0&&(T=fo()),T(D,o,a)});function L(o,a){for(var b=0,O=o.length;b<O;b++)if(o[b]===a)return b;return-1}return ht}var Yr=ae,ze=pe.codes,so=ze.ERR_METHOD_NOT_IMPLEMENTED,uo=ze.ERR_MULTIPLE_CALLBACK,lo=ze.ERR_TRANSFORM_ALREADY_TRANSFORMING,co=ze.ERR_TRANSFORM_WITH_LENGTH_0,Ke=Ee();ue(ae,Ke);function po(e,t){var r=this._transformState;r.transforming=!1;var n=r.writecb;if(n===null)return this.emit("error",new uo);r.writechunk=null,r.writecb=null,t!=null&&this.push(t),n(e);var i=this._readableState;i.reading=!1,(i.needReadable||i.length<i.highWaterMark)&&this._read(i.highWaterMark)}function ae(e){if(!(this instanceof ae))return new ae(e);Ke.call(this,e),this._transformState={afterTransform:po.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",ho)}function ho(){var e=this;typeof this._flush=="function"&&!this._readableState.destroyed?this._flush(function(t,r){cr(e,t,r)}):cr(this,null,null)}ae.prototype.push=function(e,t){return this._transformState.needTransform=!1,Ke.prototype.push.call(this,e,t)};ae.prototype._transform=function(e,t,r){r(new so("_transform()"))};ae.prototype._write=function(e,t,r){var n=this._transformState;if(n.writecb=r,n.writechunk=e,n.writeencoding=t,!n.transforming){var i=this._readableState;(n.needTransform||i.needReadable||i.length<i.highWaterMark)&&this._read(i.highWaterMark)}};ae.prototype._read=function(e){var t=this._transformState;t.writechunk!==null&&!t.transforming?(t.transforming=!0,this._transform(t.writechunk,t.writeencoding,t.afterTransform)):t.needTransform=!0};ae.prototype._destroy=function(e,t){Ke.prototype._destroy.call(this,e,function(r){t(r)})};function cr(e,t,r){if(t)return e.emit("error",t);if(r!=null&&e.push(r),e._writableState.length)throw new co;if(e._transformState.transforming)throw new lo;return e.push(null)}var yo=Re,Jr=Yr;ue(Re,Jr);function Re(e){if(!(this instanceof Re))return new Re(e);Jr.call(this,e)}Re.prototype._transform=function(e,t,r){r(null,e)};var yt;function go(e){var t=!1;return function(){t||(t=!0,e.apply(void 0,arguments))}}var Xr=pe.codes,vo=Xr.ERR_MISSING_ARGS,bo=Xr.ERR_STREAM_DESTROYED;function dr(e){if(e)throw e}function mo(e){return e.setHeader&&typeof e.abort=="function"}function _o(e,t,r,n){n=go(n);var i=!1;e.on("close",function(){i=!0}),yt===void 0&&(yt=It),yt(e,{readable:t,writable:r},function(l){if(l)return n(l);i=!0,n()});var c=!1;return function(l){if(!i&&!c){if(c=!0,mo(e))return e.abort();if(typeof e.destroy=="function")return e.destroy();n(l||new bo("pipe"))}}}function pr(e){e()}function wo(e,t){return e.pipe(t)}function So(e){return!e.length||typeof e[e.length-1]!="function"?dr:e.pop()}function Eo(){for(var e=arguments.length,t=new Array(e),r=0;r<e;r++)t[r]=arguments[r];var n=So(t);if(Array.isArray(t[0])&&(t=t[0]),t.length<2)throw new vo("streams");var i,c=t.map(function(l,h){var p=h<t.length-1,A=h>0;return _o(l,p,A,function(C){i||(i=C),C&&c.forEach(pr),!p&&(c.forEach(pr),n(i))})});return t.reduce(wo)}var Ao=Eo;(function(e,t){t=e.exports=Kr(),t.Stream=t,t.Readable=t,t.Writable=Vr(),t.Duplex=Ee(),t.Transform=Yr,t.PassThrough=yo,t.finished=It,t.pipeline=Ao})(vt,vt.exports);var Zr=vt.exports,hr=Rt,Ro=ue,Qr=Zr,Me=We.readyStates={UNSENT:0,OPENED:1,HEADERS_RECEIVED:2,LOADING:3,DONE:4},Dt=We.IncomingMessage=function(e,t,r,n){var i=this;if(Qr.Readable.call(i),i._mode=r,i.headers={},i.rawHeaders=[],i.trailers={},i.rawTrailers=[],i.on("end",function(){R.process$1.nextTick(function(){i.emit("close")})}),r==="fetch"){let C=function(){l.read().then(function(E){if(!i._destroyed){if(n(E.done),E.done){i.push(null);return}i.push(R.Buffer.from(E.value)),C()}}).catch(function(E){n(!0),i._destroyed||i.emit("error",E)})};if(i._fetchResponse=t,i.url=t.url,i.statusCode=t.status,i.statusMessage=t.statusText,t.headers.forEach(function(E,I){i.headers[I.toLowerCase()]=E,i.rawHeaders.push(I,E)}),hr.writableStream){var c=new WritableStream({write:function(E){return n(!1),new Promise(function(I,q){i._destroyed?q():i.push(R.Buffer.from(E))?I():i._resumeFetch=I})},close:function(){n(!0),i._destroyed||i.push(null)},abort:function(E){n(!0),i._destroyed||i.emit("error",E)}});try{t.body.pipeTo(c).catch(function(E){n(!0),i._destroyed||i.emit("error",E)});return}catch{}}var l=t.body.getReader();C()}else{i._xhr=e,i._pos=0,i.url=e.responseURL,i.statusCode=e.status,i.statusMessage=e.statusText;var h=e.getAllResponseHeaders().split(/\r?\n/);if(h.forEach(function(C){var E=C.match(/^([^:]+):\s*(.*)/);if(E){var I=E[1].toLowerCase();I==="set-cookie"?(i.headers[I]===void 0&&(i.headers[I]=[]),i.headers[I].push(E[2])):i.headers[I]!==void 0?i.headers[I]+=", "+E[2]:i.headers[I]=E[2],i.rawHeaders.push(E[1],E[2])}}),i._charset="x-user-defined",!hr.overrideMimeType){var p=i.rawHeaders["mime-type"];if(p){var A=p.match(/;\s*charset=([^;])(;|$)/);A&&(i._charset=A[1].toLowerCase())}i._charset||(i._charset="utf-8")}}};Ro(Dt,Qr.Readable);Dt.prototype._read=function(){var e=this,t=e._resumeFetch;t&&(e._resumeFetch=null,t())};Dt.prototype._onXHRProgress=function(e){var t=this,r=t._xhr,n=null;switch(t._mode){case"text":if(n=r.responseText,n.length>t._pos){var i=n.substr(t._pos);if(t._charset==="x-user-defined"){for(var c=R.Buffer.alloc(i.length),l=0;l<i.length;l++)c[l]=i.charCodeAt(l)&255;t.push(c)}else t.push(i,t._charset);t._pos=n.length}break;case"arraybuffer":if(r.readyState!==Me.DONE||!r.response)break;n=r.response,t.push(R.Buffer.from(new Uint8Array(n)));break;case"moz-chunked-arraybuffer":if(n=r.response,r.readyState!==Me.LOADING||!n)break;t.push(R.Buffer.from(new Uint8Array(n)));break;case"ms-stream":if(n=r.response,r.readyState!==Me.LOADING)break;var h=new R.commonjsGlobal.MSStreamReader;h.onprogress=function(){h.result.byteLength>t._pos&&(t.push(R.Buffer.from(new Uint8Array(h.result.slice(t._pos)))),t._pos=h.result.byteLength)},h.onload=function(){e(!0),t.push(null)},h.readAsArrayBuffer(n);break}t._xhr.readyState===Me.DONE&&t._mode!=="ms-stream"&&(e(!0),t.push(null))};var le=Rt,To=ue,en=We,Bt=Zr,Oo=en.IncomingMessage,yr=en.readyStates;function Po(e,t){return le.fetch&&t?"fetch":le.mozchunkedarraybuffer?"moz-chunked-arraybuffer":le.msstream?"ms-stream":le.arraybuffer&&e?"arraybuffer":"text"}var Y=gr.exports=function(e){var t=this;Bt.Writable.call(t),t._opts=e,t._body=[],t._headers={},e.auth&&t.setHeader("Authorization","Basic "+R.Buffer.from(e.auth).toString("base64")),Object.keys(e.headers).forEach(function(i){t.setHeader(i,e.headers[i])});var r,n=!0;if(e.mode==="disable-fetch"||"requestTimeout"in e&&!le.abortController)n=!1,r=!0;else if(e.mode==="prefer-streaming")r=!1;else if(e.mode==="allow-wrong-content-type")r=!le.overrideMimeType;else if(!e.mode||e.mode==="default"||e.mode==="prefer-fast")r=!0;else throw new Error("Invalid value for opts.mode");t._mode=Po(r,n),t._fetchTimer=null,t._socketTimeout=null,t._socketTimer=null,t.on("finish",function(){t._onFinish()})};To(Y,Bt.Writable);Y.prototype.setHeader=function(e,t){var r=this,n=e.toLowerCase();Mo.indexOf(n)===-1&&(r._headers[n]={name:e,value:t})};Y.prototype.getHeader=function(e){var t=this._headers[e.toLowerCase()];return t?t.value:null};Y.prototype.removeHeader=function(e){var t=this;delete t._headers[e.toLowerCase()]};Y.prototype._onFinish=function(){var e=this;if(!e._destroyed){var t=e._opts;"timeout"in t&&t.timeout!==0&&e.setTimeout(t.timeout);var r=e._headers,n=null;t.method!=="GET"&&t.method!=="HEAD"&&(n=new Blob(e._body,{type:(r["content-type"]||{}).value||""}));var i=[];if(Object.keys(r).forEach(function(p){var A=r[p].name,C=r[p].value;Array.isArray(C)?C.forEach(function(E){i.push([A,E])}):i.push([A,C])}),e._mode==="fetch"){var c=null;if(le.abortController){var l=new AbortController;c=l.signal,e._fetchAbortController=l,"requestTimeout"in t&&t.requestTimeout!==0&&(e._fetchTimer=R.commonjsGlobal.setTimeout(function(){e.emit("requestTimeout"),e._fetchAbortController&&e._fetchAbortController.abort()},t.requestTimeout))}R.commonjsGlobal.fetch(e._opts.url,{method:e._opts.method,headers:i,body:n||void 0,mode:"cors",credentials:t.withCredentials?"include":"same-origin",signal:c}).then(function(p){e._fetchResponse=p,e._resetTimers(!1),e._connect()},function(p){e._resetTimers(!0),e._destroyed||e.emit("error",p)})}else{var h=e._xhr=new R.commonjsGlobal.XMLHttpRequest;try{h.open(e._opts.method,e._opts.url,!0)}catch(p){R.process$1.nextTick(function(){e.emit("error",p)});return}"responseType"in h&&(h.responseType=e._mode),"withCredentials"in h&&(h.withCredentials=!!t.withCredentials),e._mode==="text"&&"overrideMimeType"in h&&h.overrideMimeType("text/plain; charset=x-user-defined"),"requestTimeout"in t&&(h.timeout=t.requestTimeout,h.ontimeout=function(){e.emit("requestTimeout")}),i.forEach(function(p){h.setRequestHeader(p[0],p[1])}),e._response=null,h.onreadystatechange=function(){switch(h.readyState){case yr.LOADING:case yr.DONE:e._onXHRProgress();break}},e._mode==="moz-chunked-arraybuffer"&&(h.onprogress=function(){e._onXHRProgress()}),h.onerror=function(){e._destroyed||(e._resetTimers(!0),e.emit("error",new Error("XHR error")))};try{h.send(n)}catch(p){R.process$1.nextTick(function(){e.emit("error",p)});return}}}};function jo(e){try{var t=e.status;return t!==null&&t!==0}catch{return!1}}Y.prototype._onXHRProgress=function(){var e=this;e._resetTimers(!1),!(!jo(e._xhr)||e._destroyed)&&(e._response||e._connect(),e._response._onXHRProgress(e._resetTimers.bind(e)))};Y.prototype._connect=function(){var e=this;e._destroyed||(e._response=new Oo(e._xhr,e._fetchResponse,e._mode,e._resetTimers.bind(e)),e._response.on("error",function(t){e.emit("error",t)}),e.emit("response",e._response))};Y.prototype._write=function(e,t,r){var n=this;n._body.push(e),r()};Y.prototype._resetTimers=function(e){var t=this;R.commonjsGlobal.clearTimeout(t._socketTimer),t._socketTimer=null,e?(R.commonjsGlobal.clearTimeout(t._fetchTimer),t._fetchTimer=null):t._socketTimeout&&(t._socketTimer=R.commonjsGlobal.setTimeout(function(){t.emit("timeout")},t._socketTimeout))};Y.prototype.abort=Y.prototype.destroy=function(e){var t=this;t._destroyed=!0,t._resetTimers(!0),t._response&&(t._response._destroyed=!0),t._xhr?t._xhr.abort():t._fetchAbortController&&t._fetchAbortController.abort(),e&&t.emit("error",e)};Y.prototype.end=function(e,t,r){var n=this;typeof e=="function"&&(r=e,e=void 0),Bt.Writable.prototype.end.call(n,e,t,r)};Y.prototype.setTimeout=function(e,t){var r=this;t&&r.once("timeout",t),r._socketTimeout=e,r._resetTimers(!1)};Y.prototype.flushHeaders=function(){};Y.prototype.setNoDelay=function(){};Y.prototype.setSocketKeepAlive=function(){};var Mo=["accept-charset","accept-encoding","access-control-request-headers","access-control-request-method","connection","content-length","cookie","cookie2","date","dnt","expect","host","keep-alive","origin","referer","te","trailer","transfer-encoding","upgrade","via"],Lo=gr.exports,Co=Io,No=Object.prototype.hasOwnProperty;function Io(){for(var e={},t=0;t<arguments.length;t++){var r=arguments[t];for(var n in r)No.call(r,n)&&(e[n]=r[n])}return e}var Do={100:"Continue",101:"Switching Protocols",102:"Processing",200:"OK",201:"Created",202:"Accepted",203:"Non-Authoritative Information",204:"No Content",205:"Reset Content",206:"Partial Content",207:"Multi-Status",208:"Already Reported",226:"IM Used",300:"Multiple Choices",301:"Moved Permanently",302:"Found",303:"See Other",304:"Not Modified",305:"Use Proxy",307:"Temporary Redirect",308:"Permanent Redirect",400:"Bad Request",401:"Unauthorized",402:"Payment Required",403:"Forbidden",404:"Not Found",405:"Method Not Allowed",406:"Not Acceptable",407:"Proxy Authentication Required",408:"Request Timeout",409:"Conflict",410:"Gone",411:"Length Required",412:"Precondition Failed",413:"Payload Too Large",414:"URI Too Long",415:"Unsupported Media Type",416:"Range Not Satisfiable",417:"Expectation Failed",418:"I'm a teapot",421:"Misdirected Request",422:"Unprocessable Entity",423:"Locked",424:"Failed Dependency",425:"Unordered Collection",426:"Upgrade Required",428:"Precondition Required",429:"Too Many Requests",431:"Request Header Fields Too Large",451:"Unavailable For Legal Reasons",500:"Internal Server Error",501:"Not Implemented",502:"Bad Gateway",503:"Service Unavailable",504:"Gateway Timeout",505:"HTTP Version Not Supported",506:"Variant Also Negotiates",507:"Insufficient Storage",508:"Loop Detected",509:"Bandwidth Limit Exceeded",510:"Not Extended",511:"Network Authentication Required"};const tn=R.getAugmentedNamespace(rn.url);(function(e){var t=Lo,r=We,n=Co,i=Do,c=tn,l=e;l.request=function(h,p){typeof h=="string"?h=c.parse(h):h=n(h);var A=R.commonjsGlobal.location.protocol.search(/^https?:$/)===-1?"http:":"",C=h.protocol||A,E=h.hostname||h.host,I=h.port,q=h.path||"/";E&&E.indexOf(":")!==-1&&(E="["+E+"]"),h.url=(E?C+"//"+E:"")+(I?":"+I:"")+q,h.method=(h.method||"GET").toUpperCase(),h.headers=h.headers||{};var P=new t(h);return p&&P.on("response",p),P},l.get=function(p,A){var C=l.request(p,A);return C.end(),C},l.ClientRequest=t,l.IncomingMessage=r.IncomingMessage,l.Agent=function(){},l.Agent.defaultMaxSockets=4,l.globalAgent=new l.Agent,l.STATUS_CODES=i,l.METHODS=["CHECKOUT","CONNECT","COPY","DELETE","GET","HEAD","LOCK","M-SEARCH","MERGE","MKACTIVITY","MKCOL","MOVE","NOTIFY","OPTIONS","PATCH","POST","PROPFIND","PROPPATCH","PURGE","PUT","REPORT","SEARCH","SUBSCRIBE","TRACE","UNLOCK","UNSUBSCRIBE"]})(qe);const Bo=R.getDefaultExportFromCjs(qe),Fo=nn({__proto__:null,default:Bo},[qe]);exports.index=Fo;exports.require$$1=tn;exports.streamHttp=qe;