@bigbinary/neeto-playwright-reporter 3.0.0-beta.1 → 3.0.0-beta.3
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/bin/extractReporterConfig.mjs +95 -0
- package/bin/neetoplaydash.mjs +106 -14
- package/index.cjs.js +1 -1
- package/index.cjs.js.map +1 -1
- package/index.js +1 -1
- package/index.js.map +1 -1
- package/package.json +2 -1
package/index.cjs.js
CHANGED
|
@@ -6,5 +6,5 @@
|
|
|
6
6
|
* MIT Licensed
|
|
7
7
|
*/
|
|
8
8
|
function(e){var t,n,a,o=ii.exports,r=i.extname,s=/^\s*([^;\s]*)(?:;|\s|$)/,c=/^text\//i;function u(e){if(!e||"string"!=typeof e)return!1;var t=s.exec(e),n=t&&o[t[1].toLowerCase()];return n&&n.charset?n.charset:!(!t||!c.test(t[1]))&&"UTF-8"}e.charset=u,e.charsets={lookup:u},e.contentType=function(t){if(!t||"string"!=typeof t)return!1;var n=-1===t.indexOf("/")?e.lookup(t):t;if(!n)return!1;if(-1===n.indexOf("charset")){var i=e.charset(n);i&&(n+="; charset="+i.toLowerCase())}return n},e.extension=function(t){if(!t||"string"!=typeof t)return!1;var n=s.exec(t),i=n&&e.extensions[n[1].toLowerCase()];if(!i||!i.length)return!1;return i[0]},e.extensions=Object.create(null),e.lookup=function(t){if(!t||"string"!=typeof t)return!1;var n=r("x."+t).toLowerCase().substr(1);if(!n)return!1;return e.types[n]||!1},e.types=Object.create(null),t=e.extensions,n=e.types,a=["nginx","apache",void 0,"iana"],Object.keys(o).forEach(function(e){var i=o[e],r=i.extensions;if(r&&r.length){t[e]=r;for(var s=0;s<r.length;s++){var c=r[s];if(n[c]){var u=a.indexOf(o[n[c]].source),p=a.indexOf(i.source);if("application/octet-stream"!==n[c]&&(u>p||u===p&&"application/"===n[c].substr(0,12)))continue}n[c]=e}}})}(ni);var ai=function(e){var t="function"==typeof setImmediate?setImmediate:"object"==typeof process&&"function"==typeof process.nextTick?process.nextTick:null;t?t(e):setTimeout(e,0)},oi=function(e){var t=!1;return ai(function(){t=!0}),function(n,i){t?e(n,i):ai(function(){e(n,i)})}};var ri=function(e){Object.keys(e.jobs).forEach(si.bind(e)),e.jobs={}};function si(e){"function"==typeof this.jobs[e]&&this.jobs[e]()}var ci=oi,ui=ri,pi=function(e,t,n,i){var a=n.keyedList?n.keyedList[n.index]:n.index;n.jobs[a]=function(e,t,n,i){var a;a=2==e.length?e(n,ci(i)):e(n,t,ci(i));return a}(t,a,e[a],function(e,t){a in n.jobs&&(delete n.jobs[a],e?ui(n):n.results[a]=t,i(e,n.results))})};var li=function(e,t){var n=!Array.isArray(e),i={index:0,keyedList:n||t?Object.keys(e):null,jobs:{},results:n?{}:[],size:n?Object.keys(e).length:e.length};t&&i.keyedList.sort(n?t:function(n,i){return t(e[n],e[i])});return i};var di=ri,mi=oi,fi=function(e){if(!Object.keys(this.jobs).length)return;this.index=this.size,di(this),mi(e)(null,this.results)};var hi=pi,vi=li,xi=fi,gi=function(e,t,n){var i=vi(e);for(;i.index<(i.keyedList||e).length;)hi(e,t,i,function(e,t){e?n(e,t):0!==Object.keys(i.jobs).length||n(null,i.results)}),i.index++;return xi.bind(i,n)};var bi={exports:{}},yi=pi,Di=li,wi=fi;function _i(e,t){return e<t?-1:e>t?1:0}bi.exports=function(e,t,n,i){var a=Di(e,n);return yi(e,t,a,function n(o,r){o?i(o,r):(a.index++,a.index<(a.keyedList||e).length?yi(e,t,a,n):i(null,a.results))}),wi.bind(a,i)},bi.exports.ascending=_i,bi.exports.descending=function(e,t){return-1*_i(e,t)};var Ei=bi.exports,Ci=function(e,t,n){return Ei(e,t,null,n)};var Fi,Ti,Ai={parallel:gi,serial:Ci,serialOrdered:bi.exports},ki=Object,ji=Error,Si=EvalError,Oi=RangeError,Ri=ReferenceError,Bi=SyntaxError;function Pi(){return Ti?Fi:(Ti=1,Fi=TypeError)}var Ii=URIError,Ni=Math.abs,Li=Math.floor,Ui=Math.max,zi=Math.min,qi=Math.pow,Mi=Math.round,Hi=Number.isNaN||function(e){return e!=e},$i=Object.getOwnPropertyDescriptor;if($i)try{$i([],"length")}catch(e){$i=null}var Gi=$i,Ki=Object.defineProperty||!1;if(Ki)try{Ki({},"a",{value:1})}catch(e){Ki=!1}var Wi,Vi,Yi,Ji,Xi,Zi,Qi,ea,ta=Ki;function na(){return Vi?Wi:(Vi=1,Wi=function(){if("function"!=typeof Symbol||"function"!=typeof Object.getOwnPropertySymbols)return!1;if("symbol"==typeof Symbol.iterator)return!0;var e={},t=Symbol("test"),n=Object(t);if("string"==typeof t)return!1;if("[object Symbol]"!==Object.prototype.toString.call(t))return!1;if("[object Symbol]"!==Object.prototype.toString.call(n))return!1;for(var i in e[t]=42,e)return!1;if("function"==typeof Object.keys&&0!==Object.keys(e).length)return!1;if("function"==typeof Object.getOwnPropertyNames&&0!==Object.getOwnPropertyNames(e).length)return!1;var a=Object.getOwnPropertySymbols(e);if(1!==a.length||a[0]!==t)return!1;if(!Object.prototype.propertyIsEnumerable.call(e,t))return!1;if("function"==typeof Object.getOwnPropertyDescriptor){var o=Object.getOwnPropertyDescriptor(e,t);if(42!==o.value||!0!==o.enumerable)return!1}return!0})}function ia(){return Zi?Xi:(Zi=1,Xi="undefined"!=typeof Reflect&&Reflect.getPrototypeOf||null)}function aa(){return ea?Qi:(ea=1,Qi=ki.getPrototypeOf||null)}var oa,ra,sa,ca,ua,pa,la,da,ma,fa,ha,va,xa,ga,ba=Object.prototype.toString,ya=Math.max,Da=function(e,t){for(var n=[],i=0;i<e.length;i+=1)n[i]=e[i];for(var a=0;a<t.length;a+=1)n[a+e.length]=t[a];return n},wa=function(e){var t=this;if("function"!=typeof t||"[object Function]"!==ba.apply(t))throw new TypeError("Function.prototype.bind called on incompatible "+t);for(var n,i=function(e,t){for(var n=[],i=t,a=0;i<e.length;i+=1,a+=1)n[a]=e[i];return n}(arguments,1),a=ya(0,t.length-i.length),o=[],r=0;r<a;r++)o[r]="$"+r;if(n=Function("binder","return function ("+function(e,t){for(var n="",i=0;i<e.length;i+=1)n+=e[i],i+1<e.length&&(n+=t);return n}(o,",")+"){ return binder.apply(this,arguments); }")(function(){if(this instanceof n){var a=t.apply(this,Da(i,arguments));return Object(a)===a?a:this}return t.apply(e,Da(i,arguments))}),t.prototype){var s=function(){};s.prototype=t.prototype,n.prototype=new s,s.prototype=null}return n},_a=Function.prototype.bind||wa;function Ea(){return ra?oa:(ra=1,oa=Function.prototype.call)}function Ca(){return ca?sa:(ca=1,sa=Function.prototype.apply)}function Fa(){if(da)return la;da=1;var e=_a,t=Ca(),n=Ea(),i=pa?ua:(pa=1,ua="undefined"!=typeof Reflect&&Reflect&&Reflect.apply);return la=i||e.call(n,t)}function Ta(){if(va)return ha;va=1;var e,t=function(){if(fa)return ma;fa=1;var e=_a,t=Pi(),n=Ea(),i=Fa();return ma=function(a){if(a.length<1||"function"!=typeof a[0])throw new t("a function is required");return i(e,n,a)}}(),n=Gi;try{e=[].__proto__===Array.prototype}catch(e){if(!e||"object"!=typeof e||!("code"in e)||"ERR_PROTO_ACCESS"!==e.code)throw e}var i=!!e&&n&&n(Object.prototype,"__proto__"),a=Object,o=a.getPrototypeOf;return ha=i&&"function"==typeof i.get?t([i.get]):"function"==typeof o&&function(e){return o(null==e?e:a(e))}}var Aa,ka=Function.prototype.call,ja=Object.prototype.hasOwnProperty,Sa=_a.call(ka,ja),Oa=ki,Ra=ji,Ba=Si,Pa=Oi,Ia=Ri,Na=Bi,La=Pi(),Ua=Ii,za=Ni,qa=Li,Ma=Ui,Ha=zi,$a=qi,Ga=Mi,Ka=function(e){return Hi(e)||0===e?e:e<0?-1:1},Wa=Function,Va=function(e){try{return Wa('"use strict"; return ('+e+").constructor;")()}catch(e){}},Ya=Gi,Ja=ta,Xa=function(){throw new La},Za=Ya?function(){try{return Xa}catch(e){try{return Ya(arguments,"callee").get}catch(e){return Xa}}}():Xa,Qa=function(){if(Ji)return Yi;Ji=1;var e="undefined"!=typeof Symbol&&Symbol,t=na();return Yi=function(){return"function"==typeof e&&("function"==typeof Symbol&&("symbol"==typeof e("foo")&&("symbol"==typeof Symbol("bar")&&t())))}}()(),eo=function(){if(ga)return xa;ga=1;var e=ia(),t=aa(),n=Ta();return xa=e?function(t){return e(t)}:t?function(e){if(!e||"object"!=typeof e&&"function"!=typeof e)throw new TypeError("getProto: not an object");return t(e)}:n?function(e){return n(e)}:null}(),to=aa(),no=ia(),io=Ca(),ao=Ea(),oo={},ro="undefined"!=typeof Uint8Array&&eo?eo(Uint8Array):Aa,so={__proto__:null,"%AggregateError%":"undefined"==typeof AggregateError?Aa:AggregateError,"%Array%":Array,"%ArrayBuffer%":"undefined"==typeof ArrayBuffer?Aa:ArrayBuffer,"%ArrayIteratorPrototype%":Qa&&eo?eo([][Symbol.iterator]()):Aa,"%AsyncFromSyncIteratorPrototype%":Aa,"%AsyncFunction%":oo,"%AsyncGenerator%":oo,"%AsyncGeneratorFunction%":oo,"%AsyncIteratorPrototype%":oo,"%Atomics%":"undefined"==typeof Atomics?Aa:Atomics,"%BigInt%":"undefined"==typeof BigInt?Aa:BigInt,"%BigInt64Array%":"undefined"==typeof BigInt64Array?Aa:BigInt64Array,"%BigUint64Array%":"undefined"==typeof BigUint64Array?Aa:BigUint64Array,"%Boolean%":Boolean,"%DataView%":"undefined"==typeof DataView?Aa:DataView,"%Date%":Date,"%decodeURI%":decodeURI,"%decodeURIComponent%":decodeURIComponent,"%encodeURI%":encodeURI,"%encodeURIComponent%":encodeURIComponent,"%Error%":Ra,"%eval%":eval,"%EvalError%":Ba,"%Float16Array%":"undefined"==typeof Float16Array?Aa:Float16Array,"%Float32Array%":"undefined"==typeof Float32Array?Aa:Float32Array,"%Float64Array%":"undefined"==typeof Float64Array?Aa:Float64Array,"%FinalizationRegistry%":"undefined"==typeof FinalizationRegistry?Aa:FinalizationRegistry,"%Function%":Wa,"%GeneratorFunction%":oo,"%Int8Array%":"undefined"==typeof Int8Array?Aa:Int8Array,"%Int16Array%":"undefined"==typeof Int16Array?Aa:Int16Array,"%Int32Array%":"undefined"==typeof Int32Array?Aa:Int32Array,"%isFinite%":isFinite,"%isNaN%":isNaN,"%IteratorPrototype%":Qa&&eo?eo(eo([][Symbol.iterator]())):Aa,"%JSON%":"object"==typeof JSON?JSON:Aa,"%Map%":"undefined"==typeof Map?Aa:Map,"%MapIteratorPrototype%":"undefined"!=typeof Map&&Qa&&eo?eo((new Map)[Symbol.iterator]()):Aa,"%Math%":Math,"%Number%":Number,"%Object%":Oa,"%Object.getOwnPropertyDescriptor%":Ya,"%parseFloat%":parseFloat,"%parseInt%":parseInt,"%Promise%":"undefined"==typeof Promise?Aa:Promise,"%Proxy%":"undefined"==typeof Proxy?Aa:Proxy,"%RangeError%":Pa,"%ReferenceError%":Ia,"%Reflect%":"undefined"==typeof Reflect?Aa:Reflect,"%RegExp%":RegExp,"%Set%":"undefined"==typeof Set?Aa:Set,"%SetIteratorPrototype%":"undefined"!=typeof Set&&Qa&&eo?eo((new Set)[Symbol.iterator]()):Aa,"%SharedArrayBuffer%":"undefined"==typeof SharedArrayBuffer?Aa:SharedArrayBuffer,"%String%":String,"%StringIteratorPrototype%":Qa&&eo?eo(""[Symbol.iterator]()):Aa,"%Symbol%":Qa?Symbol:Aa,"%SyntaxError%":Na,"%ThrowTypeError%":Za,"%TypedArray%":ro,"%TypeError%":La,"%Uint8Array%":"undefined"==typeof Uint8Array?Aa:Uint8Array,"%Uint8ClampedArray%":"undefined"==typeof Uint8ClampedArray?Aa:Uint8ClampedArray,"%Uint16Array%":"undefined"==typeof Uint16Array?Aa:Uint16Array,"%Uint32Array%":"undefined"==typeof Uint32Array?Aa:Uint32Array,"%URIError%":Ua,"%WeakMap%":"undefined"==typeof WeakMap?Aa:WeakMap,"%WeakRef%":"undefined"==typeof WeakRef?Aa:WeakRef,"%WeakSet%":"undefined"==typeof WeakSet?Aa:WeakSet,"%Function.prototype.call%":ao,"%Function.prototype.apply%":io,"%Object.defineProperty%":Ja,"%Object.getPrototypeOf%":to,"%Math.abs%":za,"%Math.floor%":qa,"%Math.max%":Ma,"%Math.min%":Ha,"%Math.pow%":$a,"%Math.round%":Ga,"%Math.sign%":Ka,"%Reflect.getPrototypeOf%":no};if(eo)try{null.error}catch(e){var co=eo(eo(e));so["%Error.prototype%"]=co}var uo,po,lo=function e(t){var n;if("%AsyncFunction%"===t)n=Va("async function () {}");else if("%GeneratorFunction%"===t)n=Va("function* () {}");else if("%AsyncGeneratorFunction%"===t)n=Va("async function* () {}");else if("%AsyncGenerator%"===t){var i=e("%AsyncGeneratorFunction%");i&&(n=i.prototype)}else if("%AsyncIteratorPrototype%"===t){var a=e("%AsyncGenerator%");a&&eo&&(n=eo(a.prototype))}return so[t]=n,n},mo={__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"]},fo=_a,ho=Sa,vo=fo.call(ao,Array.prototype.concat),xo=fo.call(io,Array.prototype.splice),go=fo.call(ao,String.prototype.replace),bo=fo.call(ao,String.prototype.slice),yo=fo.call(ao,RegExp.prototype.exec),Do=/[^%.[\]]+|\[(?:(-?\d+(?:\.\d+)?)|(["'])((?:(?!\2)[^\\]|\\.)*?)\2)\]|(?=(?:\.|\[\])(?:\.|\[\]|%$))/g,wo=/\\(\\)?/g,_o=function(e,t){var n,i=e;if(ho(mo,i)&&(i="%"+(n=mo[i])[0]+"%"),ho(so,i)){var a=so[i];if(a===oo&&(a=lo(i)),void 0===a&&!t)throw new La("intrinsic "+e+" exists, but is not available. Please file an issue!");return{alias:n,name:i,value:a}}throw new Na("intrinsic "+e+" does not exist!")};var Eo=function(e,t){if("string"!=typeof e||0===e.length)throw new La("intrinsic name must be a non-empty string");if(arguments.length>1&&"boolean"!=typeof t)throw new La('"allowMissing" argument must be a boolean');if(null===yo(/^%?[^%]*%?$/,e))throw new Na("`%` may not be present anywhere but at the beginning and end of the intrinsic name");var n=function(e){var t=bo(e,0,1),n=bo(e,-1);if("%"===t&&"%"!==n)throw new Na("invalid intrinsic syntax, expected closing `%`");if("%"===n&&"%"!==t)throw new Na("invalid intrinsic syntax, expected opening `%`");var i=[];return go(e,Do,function(e,t,n,a){i[i.length]=n?go(a,wo,"$1"):t||e}),i}(e),i=n.length>0?n[0]:"",a=_o("%"+i+"%",t),o=a.name,r=a.value,s=!1,c=a.alias;c&&(i=c[0],xo(n,vo([0,1],c)));for(var u=1,p=!0;u<n.length;u+=1){var l=n[u],d=bo(l,0,1),m=bo(l,-1);if(('"'===d||"'"===d||"`"===d||'"'===m||"'"===m||"`"===m)&&d!==m)throw new Na("property names with quotes must have matching quotes");if("constructor"!==l&&p||(s=!0),ho(so,o="%"+(i+="."+l)+"%"))r=so[o];else if(null!=r){if(!(l in r)){if(!t)throw new La("base intrinsic for "+e+" exists, but the property is not available.");return}if(Ya&&u+1>=n.length){var f=Ya(r,l);r=(p=!!f)&&"get"in f&&!("originalValue"in f.get)?f.get:r[l]}else p=ho(r,l),r=r[l];p&&!s&&(so[o]=r)}}return r}("%Object.defineProperty%",!0),Co=function(){if(po)return uo;po=1;var e=na();return uo=function(){return e()&&!!Symbol.toStringTag}}()(),Fo=Sa,To=Pi(),Ao=Co?Symbol.toStringTag:null,ko=ei,jo=a,So=i,Oo=r,Ro=s,Bo=o.parse,Po=n,Io=u.Stream,No=p,Lo=ni,Uo=Ai,zo=function(e,t){var n=arguments.length>2&&!!arguments[2]&&arguments[2].force,i=arguments.length>2&&!!arguments[2]&&arguments[2].nonConfigurable;if(void 0!==n&&"boolean"!=typeof n||void 0!==i&&"boolean"!=typeof i)throw new To("if provided, the `overrideIfSet` and `nonConfigurable` options must be booleans");!Ao||!n&&Fo(e,Ao)||(Eo?Eo(e,Ao,{configurable:!i,enumerable:!1,value:t,writable:!1}):e[Ao]=t)},qo=Sa,Mo=function(e,t){return Object.keys(t).forEach(function(n){e[n]=e[n]||t[n]}),e};function Ho(e){if(!(this instanceof Ho))return new Ho(e);for(var t in this._overheadLength=0,this._valueLength=0,this._valuesToMeasure=[],ko.call(this),e=e||{})this[t]=e[t]}jo.inherits(Ho,ko),Ho.LINE_BREAK="\r\n",Ho.DEFAULT_CONTENT_TYPE="application/octet-stream",Ho.prototype.append=function(e,t,n){"string"==typeof(n=n||{})&&(n={filename:n});var i=ko.prototype.append.bind(this);if("number"!=typeof t&&null!=t||(t=String(t)),Array.isArray(t))this._error(new Error("Arrays are not supported."));else{var a=this._multiPartHeader(e,t,n),o=this._multiPartFooter();i(a),i(t),i(o),this._trackLength(a,t,n)}},Ho.prototype._trackLength=function(e,t,n){var i=0;null!=n.knownLength?i+=Number(n.knownLength):Buffer.isBuffer(t)?i=t.length:"string"==typeof t&&(i=Buffer.byteLength(t)),this._valueLength+=i,this._overheadLength+=Buffer.byteLength(e)+Ho.LINE_BREAK.length,t&&(t.path||t.readable&&qo(t,"httpVersion")||t instanceof Io)&&(n.knownLength||this._valuesToMeasure.push(t))},Ho.prototype._lengthRetriever=function(e,t){qo(e,"fd")?null!=e.end&&e.end!=1/0&&null!=e.start?t(null,e.end+1-(e.start?e.start:0)):Po.stat(e.path,function(n,i){if(n)t(n);else{var a=i.size-(e.start?e.start:0);t(null,a)}}):qo(e,"httpVersion")?t(null,Number(e.headers["content-length"])):qo(e,"httpModule")?(e.on("response",function(n){e.pause(),t(null,Number(n.headers["content-length"]))}),e.resume()):t("Unknown stream")},Ho.prototype._multiPartHeader=function(e,t,n){if("string"==typeof n.header)return n.header;var i,a=this._getContentDisposition(t,n),o=this._getContentType(t,n),r="",s={"Content-Disposition":["form-data",'name="'+e+'"'].concat(a||[]),"Content-Type":[].concat(o||[])};for(var c in"object"==typeof n.header&&Mo(s,n.header),s)if(qo(s,c)){if(null==(i=s[c]))continue;Array.isArray(i)||(i=[i]),i.length&&(r+=c+": "+i.join("; ")+Ho.LINE_BREAK)}return"--"+this.getBoundary()+Ho.LINE_BREAK+r+Ho.LINE_BREAK},Ho.prototype._getContentDisposition=function(e,t){var n;if("string"==typeof t.filepath?n=So.normalize(t.filepath).replace(/\\/g,"/"):t.filename||e&&(e.name||e.path)?n=So.basename(t.filename||e&&(e.name||e.path)):e&&e.readable&&qo(e,"httpVersion")&&(n=So.basename(e.client._httpMessage.path||"")),n)return'filename="'+n+'"'},Ho.prototype._getContentType=function(e,t){var n=t.contentType;return!n&&e&&e.name&&(n=Lo.lookup(e.name)),!n&&e&&e.path&&(n=Lo.lookup(e.path)),!n&&e&&e.readable&&qo(e,"httpVersion")&&(n=e.headers["content-type"]),n||!t.filepath&&!t.filename||(n=Lo.lookup(t.filepath||t.filename)),!n&&e&&"object"==typeof e&&(n=Ho.DEFAULT_CONTENT_TYPE),n},Ho.prototype._multiPartFooter=function(){return function(e){var t=Ho.LINE_BREAK;0===this._streams.length&&(t+=this._lastBoundary()),e(t)}.bind(this)},Ho.prototype._lastBoundary=function(){return"--"+this.getBoundary()+"--"+Ho.LINE_BREAK},Ho.prototype.getHeaders=function(e){var t,n={"content-type":"multipart/form-data; boundary="+this.getBoundary()};for(t in e)qo(e,t)&&(n[t.toLowerCase()]=e[t]);return n},Ho.prototype.setBoundary=function(e){if("string"!=typeof e)throw new TypeError("FormData boundary must be a string");this._boundary=e},Ho.prototype.getBoundary=function(){return this._boundary||this._generateBoundary(),this._boundary},Ho.prototype.getBuffer=function(){for(var e=new Buffer.alloc(0),t=this.getBoundary(),n=0,i=this._streams.length;n<i;n++)"function"!=typeof this._streams[n]&&(e=Buffer.isBuffer(this._streams[n])?Buffer.concat([e,this._streams[n]]):Buffer.concat([e,Buffer.from(this._streams[n])]),"string"==typeof this._streams[n]&&this._streams[n].substring(2,t.length+2)===t||(e=Buffer.concat([e,Buffer.from(Ho.LINE_BREAK)])));return Buffer.concat([e,Buffer.from(this._lastBoundary())])},Ho.prototype._generateBoundary=function(){this._boundary="--------------------------"+No.randomBytes(12).toString("hex")},Ho.prototype.getLengthSync=function(){var e=this._overheadLength+this._valueLength;return this._streams.length&&(e+=this._lastBoundary().length),this.hasKnownLength()||this._error(new Error("Cannot calculate proper length in synchronous way.")),e},Ho.prototype.hasKnownLength=function(){var e=!0;return this._valuesToMeasure.length&&(e=!1),e},Ho.prototype.getLength=function(e){var t=this._overheadLength+this._valueLength;this._streams.length&&(t+=this._lastBoundary().length),this._valuesToMeasure.length?Uo.parallel(this._valuesToMeasure,this._lengthRetriever,function(n,i){n?e(n):(i.forEach(function(e){t+=e}),e(null,t))}):process.nextTick(e.bind(this,null,t))},Ho.prototype.submit=function(e,t){var n,i,a={method:"post"};return"string"==typeof e?(e=Bo(e),i=Mo({port:e.port,path:e.pathname,host:e.hostname,protocol:e.protocol},a)):(i=Mo(e,a)).port||(i.port="https:"===i.protocol?443:80),i.headers=this.getHeaders(e.headers),n="https:"===i.protocol?Ro.request(i):Oo.request(i),this.getLength(function(e,i){if(e&&"Unknown stream"!==e)this._error(e);else if(i&&n.setHeader("Content-Length",i),this.pipe(n),t){var a,o=function(e,i){return n.removeListener("error",o),n.removeListener("response",a),t.call(this,e,i)};a=o.bind(this,null),n.on("error",o),n.on("response",a)}}.bind(this)),n},Ho.prototype._error=function(e){this.error||(this.error=e,this.pause(),this.emit("error",e))},Ho.prototype.toString=function(){return"[object FormData]"},zo(Ho.prototype,"FormData");var $o=Ho;function Go(e){return $n.isPlainObject(e)||$n.isArray(e)}function Ko(e){return $n.endsWith(e,"[]")?e.slice(0,-2):e}function Wo(e,t,n){return e?e.concat(t).map(function(e,t){return e=Ko(e),!n&&t?"["+e+"]":e}).join(n?".":""):t}const Vo=$n.toFlatObject($n,{},null,function(e){return/^is[A-Z]/.test(e)});function Yo(e,t,n){if(!$n.isObject(e))throw new TypeError("target must be an object");t=t||new($o||FormData);const i=(n=$n.toFlatObject(n,{metaTokens:!0,dots:!1,indexes:!1},!1,function(e,t){return!$n.isUndefined(t[e])})).metaTokens,a=n.visitor||u,o=n.dots,r=n.indexes,s=(n.Blob||"undefined"!=typeof Blob&&Blob)&&$n.isSpecCompliantForm(t);if(!$n.isFunction(a))throw new TypeError("visitor must be a function");function c(e){if(null===e)return"";if($n.isDate(e))return e.toISOString();if($n.isBoolean(e))return e.toString();if(!s&&$n.isBlob(e))throw new Gn("Blob is not supported. Use a Buffer instead.");return $n.isArrayBuffer(e)||$n.isTypedArray(e)?s&&"function"==typeof Blob?new Blob([e]):Buffer.from(e):e}function u(e,n,a){let s=e;if(e&&!a&&"object"==typeof e)if($n.endsWith(n,"{}"))n=i?n:n.slice(0,-2),e=JSON.stringify(e);else if($n.isArray(e)&&function(e){return $n.isArray(e)&&!e.some(Go)}(e)||($n.isFileList(e)||$n.endsWith(n,"[]"))&&(s=$n.toArray(e)))return n=Ko(n),s.forEach(function(e,i){!$n.isUndefined(e)&&null!==e&&t.append(!0===r?Wo([n],i,o):null===r?n:n+"[]",c(e))}),!1;return!!Go(e)||(t.append(Wo(a,n,o),c(e)),!1)}const p=[],l=Object.assign(Vo,{defaultVisitor:u,convertValue:c,isVisitable:Go});if(!$n.isObject(e))throw new TypeError("data must be an object");return function e(n,i){if(!$n.isUndefined(n)){if(-1!==p.indexOf(n))throw Error("Circular reference detected in "+i.join("."));p.push(n),$n.forEach(n,function(n,o){!0===(!($n.isUndefined(n)||null===n)&&a.call(t,n,$n.isString(o)?o.trim():o,i,l))&&e(n,i?i.concat(o):[o])}),p.pop()}}(e),t}function Jo(e){const t={"!":"%21","'":"%27","(":"%28",")":"%29","~":"%7E","%20":"+","%00":"\0"};return encodeURIComponent(e).replace(/[!'()~]|%20|%00/g,function(e){return t[e]})}function Xo(e,t){this._pairs=[],e&&Yo(e,this,t)}const Zo=Xo.prototype;function Qo(e){return encodeURIComponent(e).replace(/%3A/gi,":").replace(/%24/g,"$").replace(/%2C/gi,",").replace(/%20/g,"+")}function er(e,t,n){if(!t)return e;const i=n&&n.encode||Qo;$n.isFunction(n)&&(n={serialize:n});const a=n&&n.serialize;let o;if(o=a?a(t,n):$n.isURLSearchParams(t)?t.toString():new Xo(t,n).toString(i),o){const t=e.indexOf("#");-1!==t&&(e=e.slice(0,t)),e+=(-1===e.indexOf("?")?"?":"&")+o}return e}Zo.append=function(e,t){this._pairs.push([e,t])},Zo.toString=function(e){const t=e?function(t){return e.call(this,t,Jo)}:Jo;return this._pairs.map(function(e){return t(e[0])+"="+t(e[1])},"").join("&")};class tr{constructor(){this.handlers=[]}use(e,t,n){return this.handlers.push({fulfilled:e,rejected:t,synchronous:!!n&&n.synchronous,runWhen:n?n.runWhen:null}),this.handlers.length-1}eject(e){this.handlers[e]&&(this.handlers[e]=null)}clear(){this.handlers&&(this.handlers=[])}forEach(e){$n.forEach(this.handlers,function(t){null!==t&&e(t)})}}var nr={silentJSONParsing:!0,forcedJSONParsing:!0,clarifyTimeoutError:!1},ir=o.URLSearchParams;const ar="abcdefghijklmnopqrstuvwxyz",or="0123456789",rr={DIGIT:or,ALPHA:ar,ALPHA_DIGIT:ar+ar.toUpperCase()+or};var sr={isNode:!0,classes:{URLSearchParams:ir,FormData:$o,Blob:"undefined"!=typeof Blob&&Blob||null},ALPHABET:rr,generateString:(e=16,t=rr.ALPHA_DIGIT)=>{let n="";const{length:i}=t,a=new Uint32Array(e);p.randomFillSync(a);for(let o=0;o<e;o++)n+=t[a[o]%i];return n},protocols:["http","https","file","data"]};const cr="undefined"!=typeof window&&"undefined"!=typeof document,ur="object"==typeof navigator&&navigator||void 0,pr=cr&&(!ur||["ReactNative","NativeScript","NS"].indexOf(ur.product)<0),lr="undefined"!=typeof WorkerGlobalScope&&self instanceof WorkerGlobalScope&&"function"==typeof self.importScripts,dr=cr&&window.location.href||"http://localhost";var mr={...Object.freeze({__proto__:null,hasBrowserEnv:cr,hasStandardBrowserEnv:pr,hasStandardBrowserWebWorkerEnv:lr,navigator:ur,origin:dr}),...sr};function fr(e){function t(e,n,i,a){let o=e[a++];if("__proto__"===o)return!0;const r=Number.isFinite(+o),s=a>=e.length;if(o=!o&&$n.isArray(i)?i.length:o,s)return $n.hasOwnProp(i,o)?i[o]=[i[o],n]:i[o]=n,!r;i[o]&&$n.isObject(i[o])||(i[o]=[]);return t(e,n,i[o],a)&&$n.isArray(i[o])&&(i[o]=function(e){const t={},n=Object.keys(e);let i;const a=n.length;let o;for(i=0;i<a;i++)o=n[i],t[o]=e[o];return t}(i[o])),!r}if($n.isFormData(e)&&$n.isFunction(e.entries)){const n={};return $n.forEachEntry(e,(e,i)=>{t(function(e){return $n.matchAll(/\w+|\[(\w*)]/g,e).map(e=>"[]"===e[0]?"":e[1]||e[0])}(e),i,n,0)}),n}return null}const hr={transitional:nr,adapter:["xhr","http","fetch"],transformRequest:[function(e,t){const n=t.getContentType()||"",i=n.indexOf("application/json")>-1,a=$n.isObject(e);a&&$n.isHTMLForm(e)&&(e=new FormData(e));if($n.isFormData(e))return i?JSON.stringify(fr(e)):e;if($n.isArrayBuffer(e)||$n.isBuffer(e)||$n.isStream(e)||$n.isFile(e)||$n.isBlob(e)||$n.isReadableStream(e))return e;if($n.isArrayBufferView(e))return e.buffer;if($n.isURLSearchParams(e))return t.setContentType("application/x-www-form-urlencoded;charset=utf-8",!1),e.toString();let o;if(a){if(n.indexOf("application/x-www-form-urlencoded")>-1)return function(e,t){return Yo(e,new mr.classes.URLSearchParams,{visitor:function(e,t,n,i){return mr.isNode&&$n.isBuffer(e)?(this.append(t,e.toString("base64")),!1):i.defaultVisitor.apply(this,arguments)},...t})}(e,this.formSerializer).toString();if((o=$n.isFileList(e))||n.indexOf("multipart/form-data")>-1){const t=this.env&&this.env.FormData;return Yo(o?{"files[]":e}:e,t&&new t,this.formSerializer)}}return a||i?(t.setContentType("application/json",!1),function(e,t,n){if($n.isString(e))try{return(t||JSON.parse)(e),$n.trim(e)}catch(e){if("SyntaxError"!==e.name)throw e}return(n||JSON.stringify)(e)}(e)):e}],transformResponse:[function(e){const t=this.transitional||hr.transitional,n=t&&t.forcedJSONParsing,i="json"===this.responseType;if($n.isResponse(e)||$n.isReadableStream(e))return e;if(e&&$n.isString(e)&&(n&&!this.responseType||i)){const n=!(t&&t.silentJSONParsing)&&i;try{return JSON.parse(e,this.parseReviver)}catch(e){if(n){if("SyntaxError"===e.name)throw Gn.from(e,Gn.ERR_BAD_RESPONSE,this,null,this.response);throw e}}}return e}],timeout:0,xsrfCookieName:"XSRF-TOKEN",xsrfHeaderName:"X-XSRF-TOKEN",maxContentLength:-1,maxBodyLength:-1,env:{FormData:mr.classes.FormData,Blob:mr.classes.Blob},validateStatus:function(e){return e>=200&&e<300},headers:{common:{Accept:"application/json, text/plain, */*","Content-Type":void 0}}};$n.forEach(["delete","get","head","post","put","patch"],e=>{hr.headers[e]={}});const vr=$n.toObjectSet(["age","authorization","content-length","content-type","etag","expires","from","host","if-modified-since","if-unmodified-since","last-modified","location","max-forwards","proxy-authorization","referer","retry-after","user-agent"]);const xr=Symbol("internals");function gr(e){return e&&String(e).trim().toLowerCase()}function br(e){return!1===e||null==e?e:$n.isArray(e)?e.map(br):String(e)}function yr(e,t,n,i,a){return $n.isFunction(i)?i.call(this,t,n):(a&&(t=n),$n.isString(t)?$n.isString(i)?-1!==t.indexOf(i):$n.isRegExp(i)?i.test(t):void 0:void 0)}let Dr=class{constructor(e){e&&this.set(e)}set(e,t,n){const i=this;function a(e,t,n){const a=gr(t);if(!a)throw new Error("header name must be a non-empty string");const o=$n.findKey(i,a);(!o||void 0===i[o]||!0===n||void 0===n&&!1!==i[o])&&(i[o||t]=br(e))}const o=(e,t)=>$n.forEach(e,(e,n)=>a(e,n,t));if($n.isPlainObject(e)||e instanceof this.constructor)o(e,t);else if($n.isString(e)&&(e=e.trim())&&!/^[-_a-zA-Z0-9^`|~,!#$%&'*+.]+$/.test(e.trim()))o((e=>{const t={};let n,i,a;return e&&e.split("\n").forEach(function(e){a=e.indexOf(":"),n=e.substring(0,a).trim().toLowerCase(),i=e.substring(a+1).trim(),!n||t[n]&&vr[n]||("set-cookie"===n?t[n]?t[n].push(i):t[n]=[i]:t[n]=t[n]?t[n]+", "+i:i)}),t})(e),t);else if($n.isObject(e)&&$n.isIterable(e)){let n,i,a={};for(const t of e){if(!$n.isArray(t))throw TypeError("Object iterator must return a key-value pair");a[i=t[0]]=(n=a[i])?$n.isArray(n)?[...n,t[1]]:[n,t[1]]:t[1]}o(a,t)}else null!=e&&a(t,e,n);return this}get(e,t){if(e=gr(e)){const n=$n.findKey(this,e);if(n){const e=this[n];if(!t)return e;if(!0===t)return function(e){const t=Object.create(null),n=/([^\s,;=]+)\s*(?:=\s*([^,;]+))?/g;let i;for(;i=n.exec(e);)t[i[1]]=i[2];return t}(e);if($n.isFunction(t))return t.call(this,e,n);if($n.isRegExp(t))return t.exec(e);throw new TypeError("parser must be boolean|regexp|function")}}}has(e,t){if(e=gr(e)){const n=$n.findKey(this,e);return!(!n||void 0===this[n]||t&&!yr(0,this[n],n,t))}return!1}delete(e,t){const n=this;let i=!1;function a(e){if(e=gr(e)){const a=$n.findKey(n,e);!a||t&&!yr(0,n[a],a,t)||(delete n[a],i=!0)}}return $n.isArray(e)?e.forEach(a):a(e),i}clear(e){const t=Object.keys(this);let n=t.length,i=!1;for(;n--;){const a=t[n];e&&!yr(0,this[a],a,e,!0)||(delete this[a],i=!0)}return i}normalize(e){const t=this,n={};return $n.forEach(this,(i,a)=>{const o=$n.findKey(n,a);if(o)return t[o]=br(i),void delete t[a];const r=e?function(e){return e.trim().toLowerCase().replace(/([a-z\d])(\w*)/g,(e,t,n)=>t.toUpperCase()+n)}(a):String(a).trim();r!==a&&delete t[a],t[r]=br(i),n[r]=!0}),this}concat(...e){return this.constructor.concat(this,...e)}toJSON(e){const t=Object.create(null);return $n.forEach(this,(n,i)=>{null!=n&&!1!==n&&(t[i]=e&&$n.isArray(n)?n.join(", "):n)}),t}[Symbol.iterator](){return Object.entries(this.toJSON())[Symbol.iterator]()}toString(){return Object.entries(this.toJSON()).map(([e,t])=>e+": "+t).join("\n")}getSetCookie(){return this.get("set-cookie")||[]}get[Symbol.toStringTag](){return"AxiosHeaders"}static from(e){return e instanceof this?e:new this(e)}static concat(e,...t){const n=new this(e);return t.forEach(e=>n.set(e)),n}static accessor(e){const t=(this[xr]=this[xr]={accessors:{}}).accessors,n=this.prototype;function i(e){const i=gr(e);t[i]||(!function(e,t){const n=$n.toCamelCase(" "+t);["get","set","has"].forEach(i=>{Object.defineProperty(e,i+n,{value:function(e,n,a){return this[i].call(this,t,e,n,a)},configurable:!0})})}(n,e),t[i]=!0)}return $n.isArray(e)?e.forEach(i):i(e),this}};function wr(e,t){const n=this||hr,i=t||n,a=Dr.from(i.headers);let o=i.data;return $n.forEach(e,function(e){o=e.call(n,o,a.normalize(),t?t.status:void 0)}),a.normalize(),o}function _r(e){return!(!e||!e.__CANCEL__)}function Er(e,t,n){Gn.call(this,null==e?"canceled":e,Gn.ERR_CANCELED,t,n),this.name="CanceledError"}function Cr(e,t,n){const i=n.config.validateStatus;n.status&&i&&!i(n.status)?t(new Gn("Request failed with status code "+n.status,[Gn.ERR_BAD_REQUEST,Gn.ERR_BAD_RESPONSE][Math.floor(n.status/100)-4],n.config,n.request,n)):e(n)}function Fr(e,t,n){let i=!function(e){return/^([a-z][a-z\d+\-.]*:)?\/\//i.test(e)}(t);return e&&(i||0==n)?function(e,t){return t?e.replace(/\/?\/$/,"")+"/"+t.replace(/^\/+/,""):e}(e,t):t}Dr.accessor(["Content-Type","Content-Length","Accept","Accept-Encoding","User-Agent","Authorization"]),$n.reduceDescriptors(Dr.prototype,({value:e},t)=>{let n=t[0].toUpperCase()+t.slice(1);return{get:()=>e,set(e){this[n]=e}}}),$n.freezeMethods(Dr),$n.inherits(Er,Gn,{__CANCEL__:!0});var Tr={},Ar=o.parse,kr={ftp:21,gopher:70,http:80,https:443,ws:80,wss:443},jr=String.prototype.endsWith||function(e){return e.length<=this.length&&-1!==this.indexOf(e,this.length-e.length)};function Sr(e){return process.env[e.toLowerCase()]||process.env[e.toUpperCase()]||""}Tr.getProxyForUrl=function(e){var t="string"==typeof e?Ar(e):e||{},n=t.protocol,i=t.host,a=t.port;if("string"!=typeof i||!i||"string"!=typeof n)return"";if(n=n.split(":",1)[0],!function(e,t){var n=(Sr("npm_config_no_proxy")||Sr("no_proxy")).toLowerCase();if(!n)return!0;if("*"===n)return!1;return n.split(/[,\s]/).every(function(n){if(!n)return!0;var i=n.match(/^(.+):(\d+)$/),a=i?i[1]:n,o=i?parseInt(i[2]):0;return!(!o||o===t)||(/^[.*]/.test(a)?("*"===a.charAt(0)&&(a=a.slice(1)),!jr.call(e,a)):e!==a)})}(i=i.replace(/:\d*$/,""),a=parseInt(a)||kr[n]||0))return"";var o=Sr("npm_config_"+n+"_proxy")||Sr(n+"_proxy")||Sr("npm_config_proxy")||Sr("all_proxy");return o&&-1===o.indexOf("://")&&(o=n+"://"+o),o};var Or,Rr,Br,Pr,Ir,Nr={exports:{}},Lr={exports:{}},Ur={exports:{}};function zr(){if(Rr)return Or;Rr=1;var e=1e3,t=60*e,n=60*t,i=24*n,a=7*i,o=365.25*i;function r(e,t,n,i){var a=t>=1.5*n;return Math.round(e/n)+" "+i+(a?"s":"")}return Or=function(s,c){c=c||{};var u=typeof s;if("string"===u&&s.length>0)return function(r){if((r=String(r)).length>100)return;var s=/^(-?(?:\d+)?\.?\d+) *(milliseconds?|msecs?|ms|seconds?|secs?|s|minutes?|mins?|m|hours?|hrs?|h|days?|d|weeks?|w|years?|yrs?|y)?$/i.exec(r);if(!s)return;var c=parseFloat(s[1]);switch((s[2]||"ms").toLowerCase()){case"years":case"year":case"yrs":case"yr":case"y":return c*o;case"weeks":case"week":case"w":return c*a;case"days":case"day":case"d":return c*i;case"hours":case"hour":case"hrs":case"hr":case"h":return c*n;case"minutes":case"minute":case"mins":case"min":case"m":return c*t;case"seconds":case"second":case"secs":case"sec":case"s":return c*e;case"milliseconds":case"millisecond":case"msecs":case"msec":case"ms":return c;default:return}}(s);if("number"===u&&isFinite(s))return c.long?function(a){var o=Math.abs(a);if(o>=i)return r(a,o,i,"day");if(o>=n)return r(a,o,n,"hour");if(o>=t)return r(a,o,t,"minute");if(o>=e)return r(a,o,e,"second");return a+" ms"}(s):function(a){var o=Math.abs(a);if(o>=i)return Math.round(a/i)+"d";if(o>=n)return Math.round(a/n)+"h";if(o>=t)return Math.round(a/t)+"m";if(o>=e)return Math.round(a/e)+"s";return a+"ms"}(s);throw new Error("val is not a non-empty string or a valid number. val="+JSON.stringify(s))},Or}function qr(){if(Pr)return Br;return Pr=1,Br=function(e){function t(e){let i,a,o,r=null;function s(...e){if(!s.enabled)return;const n=s,a=Number(new Date),o=a-(i||a);n.diff=o,n.prev=i,n.curr=a,i=a,e[0]=t.coerce(e[0]),"string"!=typeof e[0]&&e.unshift("%O");let r=0;e[0]=e[0].replace(/%([a-zA-Z%])/g,(i,a)=>{if("%%"===i)return"%";r++;const o=t.formatters[a];if("function"==typeof o){const t=e[r];i=o.call(n,t),e.splice(r,1),r--}return i}),t.formatArgs.call(n,e);(n.log||t.log).apply(n,e)}return s.namespace=e,s.useColors=t.useColors(),s.color=t.selectColor(e),s.extend=n,s.destroy=t.destroy,Object.defineProperty(s,"enabled",{enumerable:!0,configurable:!1,get:()=>null!==r?r:(a!==t.namespaces&&(a=t.namespaces,o=t.enabled(e)),o),set:e=>{r=e}}),"function"==typeof t.init&&t.init(s),s}function n(e,n){const i=t(this.namespace+(void 0===n?":":n)+e);return i.log=this.log,i}function i(e,t){let n=0,i=0,a=-1,o=0;for(;n<e.length;)if(i<t.length&&(t[i]===e[n]||"*"===t[i]))"*"===t[i]?(a=i,o=n,i++):(n++,i++);else{if(-1===a)return!1;i=a+1,o++,n=o}for(;i<t.length&&"*"===t[i];)i++;return i===t.length}return t.debug=t,t.default=t,t.coerce=function(e){if(e instanceof Error)return e.stack||e.message;return e},t.disable=function(){const e=[...t.names,...t.skips.map(e=>"-"+e)].join(",");return t.enable(""),e},t.enable=function(e){t.save(e),t.namespaces=e,t.names=[],t.skips=[];const n=("string"==typeof e?e:"").trim().replace(/\s+/g,",").split(",").filter(Boolean);for(const e of n)"-"===e[0]?t.skips.push(e.slice(1)):t.names.push(e)},t.enabled=function(e){for(const n of t.skips)if(i(e,n))return!1;for(const n of t.names)if(i(e,n))return!0;return!1},t.humanize=zr(),t.destroy=function(){console.warn("Instance method `debug.destroy()` is deprecated and no longer does anything. It will be removed in the next major version of `debug`.")},Object.keys(e).forEach(n=>{t[n]=e[n]}),t.names=[],t.skips=[],t.formatters={},t.selectColor=function(e){let n=0;for(let t=0;t<e.length;t++)n=(n<<5)-n+e.charCodeAt(t),n|=0;return t.colors[Math.abs(n)%t.colors.length]},t.enable(t.load()),t},Br}var Mr,Hr,$r,Gr,Kr,Wr,Vr,Yr={exports:{}};function Jr(){return Hr?Mr:(Hr=1,Mr=(e,t=process.argv)=>{const n=e.startsWith("-")?"":1===e.length?"-":"--",i=t.indexOf(n+e),a=t.indexOf("--");return-1!==i&&(-1===a||i<a)})}function Xr(){return Kr||(Kr=1,function(t,n){const i=m,o=a;n.init=function(e){e.inspectOpts={};const t=Object.keys(n.inspectOpts);for(let i=0;i<t.length;i++)e.inspectOpts[t[i]]=n.inspectOpts[t[i]]},n.log=function(...e){return process.stderr.write(o.formatWithOptions(n.inspectOpts,...e)+"\n")},n.formatArgs=function(e){const{namespace:i,useColors:a}=this;if(a){const n=this.color,a="[3"+(n<8?n:"8;5;"+n),o=` ${a};1m${i} [0m`;e[0]=o+e[0].split("\n").join("\n"+o),e.push(a+"m+"+t.exports.humanize(this.diff)+"[0m")}else e[0]=function(){if(n.inspectOpts.hideDate)return"";return(new Date).toISOString()+" "}()+i+" "+e[0]},n.save=function(e){e?process.env.DEBUG=e:delete process.env.DEBUG},n.load=function(){return process.env.DEBUG},n.useColors=function(){return"colors"in n.inspectOpts?Boolean(n.inspectOpts.colors):i.isatty(process.stderr.fd)},n.destroy=o.deprecate(()=>{},"Instance method `debug.destroy()` is deprecated and no longer does anything. It will be removed in the next major version of `debug`."),n.colors=[6,2,3,4,5,1];try{const t=function(){if(Gr)return $r;Gr=1;const t=e,n=m,i=Jr(),{env:a}=process;let o;function r(e){return 0!==e&&{level:e,hasBasic:!0,has256:e>=2,has16m:e>=3}}function s(e,n){if(0===o)return 0;if(i("color=16m")||i("color=full")||i("color=truecolor"))return 3;if(i("color=256"))return 2;if(e&&!n&&void 0===o)return 0;const r=o||0;if("dumb"===a.TERM)return r;if("win32"===process.platform){const e=t.release().split(".");return Number(e[0])>=10&&Number(e[2])>=10586?Number(e[2])>=14931?3:2:1}if("CI"in a)return["TRAVIS","CIRCLECI","APPVEYOR","GITLAB_CI","GITHUB_ACTIONS","BUILDKITE"].some(e=>e in a)||"codeship"===a.CI_NAME?1:r;if("TEAMCITY_VERSION"in a)return/^(9\.(0*[1-9]\d*)\.|\d{2,}\.)/.test(a.TEAMCITY_VERSION)?1:0;if("truecolor"===a.COLORTERM)return 3;if("TERM_PROGRAM"in a){const e=parseInt((a.TERM_PROGRAM_VERSION||"").split(".")[0],10);switch(a.TERM_PROGRAM){case"iTerm.app":return e>=3?3:2;case"Apple_Terminal":return 2}}return/-256(color)?$/i.test(a.TERM)?2:/^screen|^xterm|^vt100|^vt220|^rxvt|color|ansi|cygwin|linux/i.test(a.TERM)||"COLORTERM"in a?1:r}return i("no-color")||i("no-colors")||i("color=false")||i("color=never")?o=0:(i("color")||i("colors")||i("color=true")||i("color=always"))&&(o=1),"FORCE_COLOR"in a&&(o="true"===a.FORCE_COLOR?1:"false"===a.FORCE_COLOR?0:0===a.FORCE_COLOR.length?1:Math.min(parseInt(a.FORCE_COLOR,10),3)),$r={supportsColor:function(e){return r(s(e,e&&e.isTTY))},stdout:r(s(!0,n.isatty(1))),stderr:r(s(!0,n.isatty(2)))},$r}();t&&(t.stderr||t).level>=2&&(n.colors=[20,21,26,27,32,33,38,39,40,41,42,43,44,45,56,57,62,63,68,69,74,75,76,77,78,79,80,81,92,93,98,99,112,113,128,129,134,135,148,149,160,161,162,163,164,165,166,167,168,169,170,171,172,173,178,179,184,185,196,197,198,199,200,201,202,203,204,205,206,207,208,209,214,215,220,221])}catch(e){}n.inspectOpts=Object.keys(process.env).filter(e=>/^debug_/i.test(e)).reduce((e,t)=>{const n=t.substring(6).toLowerCase().replace(/_([a-z])/g,(e,t)=>t.toUpperCase());let i=process.env[t];return i=!!/^(yes|on|true|enabled)$/i.test(i)||!/^(no|off|false|disabled)$/i.test(i)&&("null"===i?null:Number(i)),e[n]=i,e},{}),t.exports=qr()(n);const{formatters:r}=t.exports;r.o=function(e){return this.inspectOpts.colors=this.useColors,o.inspect(e,this.inspectOpts).split("\n").map(e=>e.trim()).join(" ")},r.O=function(e){return this.inspectOpts.colors=this.useColors,o.inspect(e,this.inspectOpts)}}(Yr,Yr.exports)),Yr.exports}function Zr(){return Wr||(Wr=1,e=Lr,"undefined"==typeof process||"renderer"===process.type||!0===process.browser||process.__nwjs?e.exports=(Ir||(Ir=1,function(e,t){t.formatArgs=function(t){if(t[0]=(this.useColors?"%c":"")+this.namespace+(this.useColors?" %c":" ")+t[0]+(this.useColors?"%c ":" ")+"+"+e.exports.humanize(this.diff),!this.useColors)return;const n="color: "+this.color;t.splice(1,0,n,"color: inherit");let i=0,a=0;t[0].replace(/%[a-zA-Z%]/g,e=>{"%%"!==e&&(i++,"%c"===e&&(a=i))}),t.splice(a,0,n)},t.save=function(e){try{e?t.storage.setItem("debug",e):t.storage.removeItem("debug")}catch(e){}},t.load=function(){let e;try{e=t.storage.getItem("debug")||t.storage.getItem("DEBUG")}catch(e){}return!e&&"undefined"!=typeof process&&"env"in process&&(e=process.env.DEBUG),e},t.useColors=function(){if("undefined"!=typeof window&&window.process&&("renderer"===window.process.type||window.process.__nwjs))return!0;if("undefined"!=typeof navigator&&navigator.userAgent&&navigator.userAgent.toLowerCase().match(/(edge|trident)\/(\d+)/))return!1;let e;return"undefined"!=typeof document&&document.documentElement&&document.documentElement.style&&document.documentElement.style.WebkitAppearance||"undefined"!=typeof window&&window.console&&(window.console.firebug||window.console.exception&&window.console.table)||"undefined"!=typeof navigator&&navigator.userAgent&&(e=navigator.userAgent.toLowerCase().match(/firefox\/(\d+)/))&&parseInt(e[1],10)>=31||"undefined"!=typeof navigator&&navigator.userAgent&&navigator.userAgent.toLowerCase().match(/applewebkit\/(\d+)/)},t.storage=function(){try{return localStorage}catch(e){}}(),t.destroy=(()=>{let e=!1;return()=>{e||(e=!0,console.warn("Instance method `debug.destroy()` is deprecated and no longer does anything. It will be removed in the next major version of `debug`."))}})(),t.colors=["#0000CC","#0000FF","#0033CC","#0033FF","#0066CC","#0066FF","#0099CC","#0099FF","#00CC00","#00CC33","#00CC66","#00CC99","#00CCCC","#00CCFF","#3300CC","#3300FF","#3333CC","#3333FF","#3366CC","#3366FF","#3399CC","#3399FF","#33CC00","#33CC33","#33CC66","#33CC99","#33CCCC","#33CCFF","#6600CC","#6600FF","#6633CC","#6633FF","#66CC00","#66CC33","#9900CC","#9900FF","#9933CC","#9933FF","#99CC00","#99CC33","#CC0000","#CC0033","#CC0066","#CC0099","#CC00CC","#CC00FF","#CC3300","#CC3333","#CC3366","#CC3399","#CC33CC","#CC33FF","#CC6600","#CC6633","#CC9900","#CC9933","#CCCC00","#CCCC33","#FF0000","#FF0033","#FF0066","#FF0099","#FF00CC","#FF00FF","#FF3300","#FF3333","#FF3366","#FF3399","#FF33CC","#FF33FF","#FF6600","#FF6633","#FF9900","#FF9933","#FFCC00","#FFCC33"],t.log=console.debug||console.log||(()=>{}),e.exports=qr()(t);const{formatters:n}=e.exports;n.j=function(e){try{return JSON.stringify(e)}catch(e){return"[UnexpectedJSONParseError]: "+e.message}}}(Ur,Ur.exports)),Ur.exports):e.exports=Xr()),Lr.exports;var e}var Qr,es,ts,ns=o,is=ns.URL,as=r,os=s,rs=u.Writable,ss=d,cs=function(){if(!Vr){try{Vr=Zr()("follow-redirects")}catch(e){}"function"!=typeof Vr&&(Vr=function(){})}Vr.apply(null,arguments)};Qr="undefined"!=typeof process,es="undefined"!=typeof window&&"undefined"!=typeof document,ts=ks(Error.captureStackTrace),Qr||!es&&ts||console.warn("The follow-redirects package should be excluded from browser builds.");var us=!1;try{ss(new is(""))}catch(e){us="ERR_INVALID_URL"===e.code}var ps=["auth","host","hostname","href","path","pathname","port","protocol","query","search","hash"],ls=["abort","aborted","connect","error","socket","timeout"],ds=Object.create(null);ls.forEach(function(e){ds[e]=function(t,n,i){this._redirectable.emit(e,t,n,i)}});var ms=Fs("ERR_INVALID_URL","Invalid URL",TypeError),fs=Fs("ERR_FR_REDIRECTION_FAILURE","Redirected request failed"),hs=Fs("ERR_FR_TOO_MANY_REDIRECTS","Maximum number of redirects exceeded",fs),vs=Fs("ERR_FR_MAX_BODY_LENGTH_EXCEEDED","Request body larger than maxBodyLength limit"),xs=Fs("ERR_STREAM_WRITE_AFTER_END","write after end"),gs=rs.prototype.destroy||Ds;function bs(e,t){rs.call(this),this._sanitizeOptions(e),this._options=e,this._ended=!1,this._ending=!1,this._redirectCount=0,this._redirects=[],this._requestBodyLength=0,this._requestBodyBuffers=[],t&&this.on("response",t);var n=this;this._onNativeResponse=function(e){try{n._processResponse(e)}catch(e){n.emit("error",e instanceof fs?e:new fs({cause:e}))}},this._performRequest()}function ys(e){var t={maxRedirects:21,maxBodyLength:10485760},n={};return Object.keys(e).forEach(function(i){var a=i+":",o=n[a]=e[i],r=t[i]=Object.create(o);Object.defineProperties(r,{request:{value:function(e,i,o){var r;return r=e,is&&r instanceof is?e=Es(e):As(e)?e=Es(ws(e)):(o=i,i=_s(e),e={protocol:a}),ks(i)&&(o=i,i=null),(i=Object.assign({maxRedirects:t.maxRedirects,maxBodyLength:t.maxBodyLength},e,i)).nativeProtocols=n,As(i.host)||As(i.hostname)||(i.hostname="::1"),ss.equal(i.protocol,a,"protocol mismatch"),cs("options",i),new bs(i,o)},configurable:!0,enumerable:!0,writable:!0},get:{value:function(e,t,n){var i=r.request(e,t,n);return i.end(),i},configurable:!0,enumerable:!0,writable:!0}})}),t}function Ds(){}function ws(e){var t;if(us)t=new is(e);else if(!As((t=_s(ns.parse(e))).protocol))throw new ms({input:e});return t}function _s(e){if(/^\[/.test(e.hostname)&&!/^\[[:0-9a-f]+\]$/i.test(e.hostname))throw new ms({input:e.href||e});if(/^\[/.test(e.host)&&!/^\[[:0-9a-f]+\](:\d+)?$/i.test(e.host))throw new ms({input:e.href||e});return e}function Es(e,t){var n=t||{};for(var i of ps)n[i]=e[i];return n.hostname.startsWith("[")&&(n.hostname=n.hostname.slice(1,-1)),""!==n.port&&(n.port=Number(n.port)),n.path=n.search?n.pathname+n.search:n.pathname,n}function Cs(e,t){var n;for(var i in t)e.test(i)&&(n=t[i],delete t[i]);return null==n?void 0:String(n).trim()}function Fs(e,t,n){function i(n){ks(Error.captureStackTrace)&&Error.captureStackTrace(this,this.constructor),Object.assign(this,n||{}),this.code=e,this.message=this.cause?t+": "+this.cause.message:t}return i.prototype=new(n||Error),Object.defineProperties(i.prototype,{constructor:{value:i,enumerable:!1},name:{value:"Error ["+e+"]",enumerable:!1}}),i}function Ts(e,t){for(var n of ls)e.removeListener(n,ds[n]);e.on("error",Ds),e.destroy(t)}function As(e){return"string"==typeof e||e instanceof String}function ks(e){return"function"==typeof e}bs.prototype=Object.create(rs.prototype),bs.prototype.abort=function(){Ts(this._currentRequest),this._currentRequest.abort(),this.emit("abort")},bs.prototype.destroy=function(e){return Ts(this._currentRequest,e),gs.call(this,e),this},bs.prototype.write=function(e,t,n){if(this._ending)throw new xs;if(!As(e)&&("object"!=typeof(i=e)||!("length"in i)))throw new TypeError("data should be a string, Buffer or Uint8Array");var i;ks(t)&&(n=t,t=null),0!==e.length?this._requestBodyLength+e.length<=this._options.maxBodyLength?(this._requestBodyLength+=e.length,this._requestBodyBuffers.push({data:e,encoding:t}),this._currentRequest.write(e,t,n)):(this.emit("error",new vs),this.abort()):n&&n()},bs.prototype.end=function(e,t,n){if(ks(e)?(n=e,e=t=null):ks(t)&&(n=t,t=null),e){var i=this,a=this._currentRequest;this.write(e,t,function(){i._ended=!0,a.end(null,null,n)}),this._ending=!0}else this._ended=this._ending=!0,this._currentRequest.end(null,null,n)},bs.prototype.setHeader=function(e,t){this._options.headers[e]=t,this._currentRequest.setHeader(e,t)},bs.prototype.removeHeader=function(e){delete this._options.headers[e],this._currentRequest.removeHeader(e)},bs.prototype.setTimeout=function(e,t){var n=this;function i(t){t.setTimeout(e),t.removeListener("timeout",t.destroy),t.addListener("timeout",t.destroy)}function a(t){n._timeout&&clearTimeout(n._timeout),n._timeout=setTimeout(function(){n.emit("timeout"),o()},e),i(t)}function o(){n._timeout&&(clearTimeout(n._timeout),n._timeout=null),n.removeListener("abort",o),n.removeListener("error",o),n.removeListener("response",o),n.removeListener("close",o),t&&n.removeListener("timeout",t),n.socket||n._currentRequest.removeListener("socket",a)}return t&&this.on("timeout",t),this.socket?a(this.socket):this._currentRequest.once("socket",a),this.on("socket",i),this.on("abort",o),this.on("error",o),this.on("response",o),this.on("close",o),this},["flushHeaders","getHeader","setNoDelay","setSocketKeepAlive"].forEach(function(e){bs.prototype[e]=function(t,n){return this._currentRequest[e](t,n)}}),["aborted","connection","socket"].forEach(function(e){Object.defineProperty(bs.prototype,e,{get:function(){return this._currentRequest[e]}})}),bs.prototype._sanitizeOptions=function(e){if(e.headers||(e.headers={}),e.host&&(e.hostname||(e.hostname=e.host),delete e.host),!e.pathname&&e.path){var t=e.path.indexOf("?");t<0?e.pathname=e.path:(e.pathname=e.path.substring(0,t),e.search=e.path.substring(t))}},bs.prototype._performRequest=function(){var e=this._options.protocol,t=this._options.nativeProtocols[e];if(!t)throw new TypeError("Unsupported protocol "+e);if(this._options.agents){var n=e.slice(0,-1);this._options.agent=this._options.agents[n]}var i=this._currentRequest=t.request(this._options,this._onNativeResponse);for(var a of(i._redirectable=this,ls))i.on(a,ds[a]);if(this._currentUrl=/^\//.test(this._options.path)?ns.format(this._options):this._options.path,this._isRedirect){var o=0,r=this,s=this._requestBodyBuffers;!function e(t){if(i===r._currentRequest)if(t)r.emit("error",t);else if(o<s.length){var n=s[o++];i.finished||i.write(n.data,n.encoding,e)}else r._ended&&i.end()}()}},bs.prototype._processResponse=function(e){var t=e.statusCode;this._options.trackRedirects&&this._redirects.push({url:this._currentUrl,headers:e.headers,statusCode:t});var n,i=e.headers.location;if(!i||!1===this._options.followRedirects||t<300||t>=400)return e.responseUrl=this._currentUrl,e.redirects=this._redirects,this.emit("response",e),void(this._requestBodyBuffers=[]);if(Ts(this._currentRequest),e.destroy(),++this._redirectCount>this._options.maxRedirects)throw new hs;var a=this._options.beforeRedirect;a&&(n=Object.assign({Host:e.req.getHeader("host")},this._options.headers));var o=this._options.method;((301===t||302===t)&&"POST"===this._options.method||303===t&&!/^(?:GET|HEAD)$/.test(this._options.method))&&(this._options.method="GET",this._requestBodyBuffers=[],Cs(/^content-/i,this._options.headers));var r,s,c=Cs(/^host$/i,this._options.headers),u=ws(this._currentUrl),p=c||u.host,l=/^\w+:/.test(i)?this._currentUrl:ns.format(Object.assign(u,{host:p})),d=(r=i,s=l,us?new is(r,s):ws(ns.resolve(s,r)));if(cs("redirecting to",d.href),this._isRedirect=!0,Es(d,this._options),(d.protocol!==u.protocol&&"https:"!==d.protocol||d.host!==p&&!function(e,t){ss(As(e)&&As(t));var n=e.length-t.length-1;return n>0&&"."===e[n]&&e.endsWith(t)}(d.host,p))&&Cs(/^(?:(?:proxy-)?authorization|cookie)$/i,this._options.headers),ks(a)){var m={headers:e.headers,statusCode:t},f={url:l,method:o,headers:n};a(this._options,m,f),this._sanitizeOptions(this._options)}this._performRequest()},Nr.exports=ys({http:as,https:os}),Nr.exports.wrap=ys;const js="1.13.2";function Ss(e){const t=/^([-+\w]{1,25})(:?\/\/|:)/.exec(e);return t&&t[1]||""}const Os=/^(?:([^;]+);)?(?:[^;]+;)?(base64|),([\s\S]*)$/;const Rs=Symbol("internals");class Bs extends u.Transform{constructor(e){e=$n.toFlatObject(e,{maxRate:0,chunkSize:65536,minChunkSize:100,timeWindow:500,ticksRate:2,samplesCount:15},null,(e,t)=>!$n.isUndefined(t[e])),super({readableHighWaterMark:e.chunkSize});const t=this[Rs]={timeWindow:e.timeWindow,chunkSize:e.chunkSize,maxRate:e.maxRate,minChunkSize:e.minChunkSize,bytesSeen:0,isCaptured:!1,notifiedBytesLoaded:0,ts:Date.now(),bytes:0,onReadCallback:null};this.on("newListener",e=>{"progress"===e&&(t.isCaptured||(t.isCaptured=!0))})}_read(e){const t=this[Rs];return t.onReadCallback&&t.onReadCallback(),super._read(e)}_transform(e,t,n){const i=this[Rs],a=i.maxRate,o=this.readableHighWaterMark,r=i.timeWindow,s=a/(1e3/r),c=!1!==i.minChunkSize?Math.max(i.minChunkSize,.01*s):0,u=(e,t)=>{const n=Buffer.byteLength(e);i.bytesSeen+=n,i.bytes+=n,i.isCaptured&&this.emit("progress",i.bytesSeen),this.push(e)?process.nextTick(t):i.onReadCallback=()=>{i.onReadCallback=null,process.nextTick(t)}},p=(e,t)=>{const n=Buffer.byteLength(e);let p,l=null,d=o,m=0;if(a){const e=Date.now();(!i.ts||(m=e-i.ts)>=r)&&(i.ts=e,p=s-i.bytes,i.bytes=p<0?-p:0,m=0),p=s-i.bytes}if(a){if(p<=0)return setTimeout(()=>{t(null,e)},r-m);p<d&&(d=p)}d&&n>d&&n-d>c&&(l=e.subarray(d),e=e.subarray(0,d)),u(e,l?()=>{process.nextTick(t,null,l)}:t)};p(e,function e(t,i){if(t)return n(t);i?p(i,e):n(null)})}}const{asyncIterator:Ps}=Symbol,Is=async function*(e){e.stream?yield*e.stream():e.arrayBuffer?yield await e.arrayBuffer():e[Ps]?yield*e[Ps]():yield e},Ns=mr.ALPHABET.ALPHA_DIGIT+"-_",Ls="function"==typeof TextEncoder?new TextEncoder:new a.TextEncoder,Us="\r\n",zs=Ls.encode(Us);class qs{constructor(e,t){const{escapeName:n}=this.constructor,i=$n.isString(t);let a=`Content-Disposition: form-data; name="${n(e)}"${!i&&t.name?`; filename="${n(t.name)}"`:""}${Us}`;i?t=Ls.encode(String(t).replace(/\r?\n|\r\n?/g,Us)):a+=`Content-Type: ${t.type||"application/octet-stream"}${Us}`,this.headers=Ls.encode(a+Us),this.contentLength=i?t.byteLength:t.size,this.size=this.headers.byteLength+this.contentLength+2,this.name=e,this.value=t}async*encode(){yield this.headers;const{value:e}=this;$n.isTypedArray(e)?yield e:yield*Is(e),yield zs}static escapeName(e){return String(e).replace(/[\r\n"]/g,e=>({"\r":"%0D","\n":"%0A",'"':"%22"}[e]))}}class Ms extends u.Transform{__transform(e,t,n){this.push(e),n()}_transform(e,t,n){if(0!==e.length&&(this._transform=this.__transform,120!==e[0])){const e=Buffer.alloc(2);e[0]=120,e[1]=156,this.push(e,t)}this.__transform(e,t,n)}}const Hs=(e,t)=>$n.isAsyncFn(e)?function(...n){const i=n.pop();e.apply(this,n).then(e=>{try{t?i(null,...t(e)):i(null,e)}catch(e){i(e)}},i)}:e;const $s=(e,t,n=3)=>{let i=0;const a=function(e,t){e=e||10;const n=new Array(e),i=new Array(e);let a,o=0,r=0;return t=void 0!==t?t:1e3,function(s){const c=Date.now(),u=i[r];a||(a=c),n[o]=s,i[o]=c;let p=r,l=0;for(;p!==o;)l+=n[p++],p%=e;if(o=(o+1)%e,o===r&&(r=(r+1)%e),c-a<t)return;const d=u&&c-u;return d?Math.round(1e3*l/d):void 0}}(50,250);return function(e,t){let n,i,a=0,o=1e3/t;const r=(t,o=Date.now())=>{a=o,n=null,i&&(clearTimeout(i),i=null),e(...t)};return[(...e)=>{const t=Date.now(),s=t-a;s>=o?r(e,t):(n=e,i||(i=setTimeout(()=>{i=null,r(n)},o-s)))},()=>n&&r(n)]}(n=>{const o=n.loaded,r=n.lengthComputable?n.total:void 0,s=o-i,c=a(s);i=o;e({loaded:o,total:r,progress:r?o/r:void 0,bytes:s,rate:c||void 0,estimated:c&&r&&o<=r?(r-o)/c:void 0,event:n,lengthComputable:null!=r,[t?"download":"upload"]:!0})},n)},Gs=(e,t)=>{const n=null!=e;return[i=>t[0]({lengthComputable:n,total:e,loaded:i}),t[1]]},Ks=e=>(...t)=>$n.asap(()=>e(...t));const Ws={flush:f.constants.Z_SYNC_FLUSH,finishFlush:f.constants.Z_SYNC_FLUSH},Vs={flush:f.constants.BROTLI_OPERATION_FLUSH,finishFlush:f.constants.BROTLI_OPERATION_FLUSH},Ys=$n.isFunction(f.createBrotliDecompress),{http:Js,https:Xs}=Nr.exports,Zs=/https:?/,Qs=mr.protocols.map(e=>e+":"),ec=(e,[t,n])=>(e.on("end",n).on("error",n),t);const tc=new class{constructor(){this.sessions=Object.create(null)}getSession(e,t){t=Object.assign({sessionTimeout:1e3},t);let n=this.sessions[e];if(n){let e=n.length;for(let i=0;i<e;i++){const[e,o]=n[i];if(!e.destroyed&&!e.closed&&a.isDeepStrictEqual(o,t))return e}}const i=l.connect(e,t);let o;const r=()=>{if(o)return;o=!0;let t=n,a=t.length,r=a;for(;r--;)if(t[r][0]===i)return void(1===a?delete this.sessions[e]:t.splice(r,1))},s=i.request,{sessionTimeout:c}=t;if(null!=c){let e,t=0;i.request=function(){const n=s.apply(this,arguments);return t++,e&&(clearTimeout(e),e=null),n.once("close",()=>{--t||(e=setTimeout(()=>{e=null,r()},c))}),n}}i.once("close",r);let u=[i,t];return n?n.push(u):n=this.sessions[e]=[u],i}};function nc(e,t){e.beforeRedirects.proxy&&e.beforeRedirects.proxy(e),e.beforeRedirects.config&&e.beforeRedirects.config(e,t)}function ic(e,t,n){let i=t;if(!i&&!1!==i){const e=Tr.getProxyForUrl(n);e&&(i=new URL(e))}if(i){if(i.username&&(i.auth=(i.username||"")+":"+(i.password||"")),i.auth){(i.auth.username||i.auth.password)&&(i.auth=(i.auth.username||"")+":"+(i.auth.password||""));const t=Buffer.from(i.auth,"utf8").toString("base64");e.headers["Proxy-Authorization"]="Basic "+t}e.headers.host=e.hostname+(e.port?":"+e.port:"");const t=i.hostname||i.host;e.hostname=t,e.host=t,e.port=i.port,e.path=n,i.protocol&&(e.protocol=i.protocol.includes(":")?i.protocol:`${i.protocol}:`)}e.beforeRedirects.proxy=function(e){ic(e,t,e.href)}}const ac="undefined"!=typeof process&&"process"===$n.kindOf(process),oc=(e,t)=>(({address:e,family:t})=>{if(!$n.isString(e))throw TypeError("address must be a string");return{address:e,family:t||(e.indexOf(".")<0?6:4)}})($n.isObject(e)?e:{address:e,family:t}),rc={request(e,t){const n=e.protocol+"//"+e.hostname+":"+(e.port||80),{http2Options:i,headers:a}=e,o=tc.getSession(n,i),{HTTP2_HEADER_SCHEME:r,HTTP2_HEADER_METHOD:s,HTTP2_HEADER_PATH:c,HTTP2_HEADER_STATUS:u}=l.constants,p={[r]:e.protocol.replace(":",""),[s]:e.method,[c]:e.path};$n.forEach(a,(e,t)=>{":"!==t.charAt(0)&&(p[t]=e)});const d=o.request(p);return d.once("response",e=>{const n=d,i=(e=Object.assign({},e))[u];delete e[u],n.headers=e,n.statusCode=+i,t(n)}),d}};var sc=ac&&function(e){return t=async function(t,n,i){let{data:o,lookup:c,family:p,httpVersion:l=1,http2Options:d}=e;const{responseType:m,responseEncoding:v}=e,x=e.method.toUpperCase();let g,b,y=!1;if(l=+l,Number.isNaN(l))throw TypeError(`Invalid protocol version: '${e.httpVersion}' is not a number`);if(1!==l&&2!==l)throw TypeError(`Unsupported protocol version '${l}'`);const D=2===l;if(c){const e=Hs(c,e=>$n.isArray(e)?e:[e]);c=(t,n,i)=>{e(t,n,(e,t,a)=>{if(e)return i(e);const o=$n.isArray(t)?t.map(e=>oc(e)):[oc(t,a)];n.all?i(e,o):i(e,o[0].address,o[0].family)})}}const w=new h.EventEmitter;function _(t){try{w.emit("abort",!t||t.type?new Er(null,e,b):t)}catch(e){console.warn("emit error",e)}}w.once("abort",n);const E=()=>{e.cancelToken&&e.cancelToken.unsubscribe(_),e.signal&&e.signal.removeEventListener("abort",_),w.removeAllListeners()};(e.cancelToken||e.signal)&&(e.cancelToken&&e.cancelToken.subscribe(_),e.signal&&(e.signal.aborted?_():e.signal.addEventListener("abort",_))),i((e,t)=>{if(g=!0,t)return y=!0,void E();const{data:n}=e;if(n instanceof u.Readable||n instanceof u.Duplex){const e=u.finished(n,()=>{e(),E()})}else E()});const C=Fr(e.baseURL,e.url,e.allowAbsoluteUrls),F=new URL(C,mr.hasBrowserEnv?mr.origin:void 0),T=F.protocol||Qs[0];if("data:"===T){if(e.maxContentLength>-1){const t=function(e){if(!e||"string"!=typeof e)return 0;if(!e.startsWith("data:"))return 0;const t=e.indexOf(",");if(t<0)return 0;const n=e.slice(5,t),i=e.slice(t+1);if(/;base64/i.test(n)){let e=i.length;const t=i.length;for(let n=0;n<t;n++)if(37===i.charCodeAt(n)&&n+2<t){const t=i.charCodeAt(n+1),a=i.charCodeAt(n+2);(t>=48&&t<=57||t>=65&&t<=70||t>=97&&t<=102)&&(a>=48&&a<=57||a>=65&&a<=70||a>=97&&a<=102)&&(e-=2,n+=2)}let n=0,a=t-1;const o=e=>e>=2&&37===i.charCodeAt(e-2)&&51===i.charCodeAt(e-1)&&(68===i.charCodeAt(e)||100===i.charCodeAt(e));a>=0&&(61===i.charCodeAt(a)?(n++,a--):o(a)&&(n++,a-=3)),1===n&&a>=0&&(61===i.charCodeAt(a)||o(a))&&n++;const r=3*Math.floor(e/4)-(n||0);return r>0?r:0}return Buffer.byteLength(i,"utf8")}(String(e.url||C||""));if(t>e.maxContentLength)return n(new Gn("maxContentLength size of "+e.maxContentLength+" exceeded",Gn.ERR_BAD_RESPONSE,e))}let i;if("GET"!==x)return Cr(t,n,{status:405,statusText:"method not allowed",headers:{},config:e});try{i=function(e,t,n){const i=n&&n.Blob||mr.classes.Blob,a=Ss(e);if(void 0===t&&i&&(t=!0),"data"===a){e=a.length?e.slice(a.length+1):e;const n=Os.exec(e);if(!n)throw new Gn("Invalid URL",Gn.ERR_INVALID_URL);const o=n[1],r=n[2],s=n[3],c=Buffer.from(decodeURIComponent(s),r?"base64":"utf8");if(t){if(!i)throw new Gn("Blob is not supported",Gn.ERR_NOT_SUPPORT);return new i([c],{type:o})}return c}throw new Gn("Unsupported protocol "+a,Gn.ERR_NOT_SUPPORT)}(e.url,"blob"===m,{Blob:e.env&&e.env.Blob})}catch(t){throw Gn.from(t,Gn.ERR_BAD_REQUEST,e)}return"text"===m?(i=i.toString(v),v&&"utf8"!==v||(i=$n.stripBOM(i))):"stream"===m&&(i=u.Readable.from(i)),Cr(t,n,{data:i,status:200,statusText:"OK",headers:new Dr,config:e})}if(-1===Qs.indexOf(T))return n(new Gn("Unsupported protocol "+T,Gn.ERR_BAD_REQUEST,e));const A=Dr.from(e.headers).normalize();A.set("User-Agent","axios/"+js,!1);const{onUploadProgress:k,onDownloadProgress:j}=e,S=e.maxRate;let O,R;if($n.isSpecCompliantForm(o)){const e=A.getContentType(/boundary=([-_\w\d]{10,70})/i);o=((e,t,n)=>{const{tag:i="form-data-boundary",size:a=25,boundary:o=i+"-"+mr.generateString(a,Ns)}=n||{};if(!$n.isFormData(e))throw TypeError("FormData instance required");if(o.length<1||o.length>70)throw Error("boundary must be 10-70 characters long");const r=Ls.encode("--"+o+Us),s=Ls.encode("--"+o+"--"+Us);let c=s.byteLength;const p=Array.from(e.entries()).map(([e,t])=>{const n=new qs(e,t);return c+=n.size,n});c+=r.byteLength*p.length,c=$n.toFiniteNumber(c);const l={"Content-Type":`multipart/form-data; boundary=${o}`};return Number.isFinite(c)&&(l["Content-Length"]=c),t&&t(l),u.Readable.from(async function*(){for(const e of p)yield r,yield*e.encode();yield s}())})(o,e=>{A.set(e)},{tag:`axios-${js}-boundary`,boundary:e&&e[1]||void 0})}else if($n.isFormData(o)&&$n.isFunction(o.getHeaders)){if(A.set(o.getHeaders()),!A.hasContentLength())try{const e=await a.promisify(o.getLength).call(o);Number.isFinite(e)&&e>=0&&A.setContentLength(e)}catch(e){}}else if($n.isBlob(o)||$n.isFile(o))o.size&&A.setContentType(o.type||"application/octet-stream"),A.setContentLength(o.size||0),o=u.Readable.from(Is(o));else if(o&&!$n.isStream(o)){if(Buffer.isBuffer(o));else if($n.isArrayBuffer(o))o=Buffer.from(new Uint8Array(o));else{if(!$n.isString(o))return n(new Gn("Data after transformation must be a string, an ArrayBuffer, a Buffer, or a Stream",Gn.ERR_BAD_REQUEST,e));o=Buffer.from(o,"utf-8")}if(A.setContentLength(o.length,!1),e.maxBodyLength>-1&&o.length>e.maxBodyLength)return n(new Gn("Request body larger than maxBodyLength limit",Gn.ERR_BAD_REQUEST,e))}const B=$n.toFiniteNumber(A.getContentLength());let P,I;$n.isArray(S)?(O=S[0],R=S[1]):O=R=S,o&&(k||O)&&($n.isStream(o)||(o=u.Readable.from(o,{objectMode:!1})),o=u.pipeline([o,new Bs({maxRate:$n.toFiniteNumber(O)})],$n.noop),k&&o.on("progress",ec(o,Gs(B,$s(Ks(k),!1,3))))),e.auth&&(P=(e.auth.username||"")+":"+(e.auth.password||"")),!P&&F.username&&(P=F.username+":"+F.password),P&&A.delete("authorization");try{I=er(F.pathname+F.search,e.params,e.paramsSerializer).replace(/^\?/,"")}catch(t){const i=new Error(t.message);return i.config=e,i.url=e.url,i.exists=!0,n(i)}A.set("Accept-Encoding","gzip, compress, deflate"+(Ys?", br":""),!1);const N={path:I,method:x,headers:A.toJSON(),agents:{http:e.httpAgent,https:e.httpsAgent},auth:P,protocol:T,family:p,beforeRedirect:nc,beforeRedirects:{},http2Options:d};let L;!$n.isUndefined(c)&&(N.lookup=c),e.socketPath?N.socketPath=e.socketPath:(N.hostname=F.hostname.startsWith("[")?F.hostname.slice(1,-1):F.hostname,N.port=F.port,ic(N,e.proxy,T+"//"+F.hostname+(F.port?":"+F.port:"")+N.path));const U=Zs.test(N.protocol);if(N.agent=U?e.httpsAgent:e.httpAgent,D?L=rc:e.transport?L=e.transport:0===e.maxRedirects?L=U?s:r:(e.maxRedirects&&(N.maxRedirects=e.maxRedirects),e.beforeRedirect&&(N.beforeRedirects.config=e.beforeRedirect),L=U?Xs:Js),e.maxBodyLength>-1?N.maxBodyLength=e.maxBodyLength:N.maxBodyLength=1/0,e.insecureHTTPParser&&(N.insecureHTTPParser=e.insecureHTTPParser),b=L.request(N,function(i){if(b.destroyed)return;const a=[i],o=$n.toFiniteNumber(i.headers["content-length"]);if(j||R){const e=new Bs({maxRate:$n.toFiniteNumber(R)});j&&e.on("progress",ec(e,Gs(o,$s(Ks(j),!0,3)))),a.push(e)}let r=i;const s=i.req||b;if(!1!==e.decompress&&i.headers["content-encoding"])switch("HEAD"!==x&&204!==i.statusCode||delete i.headers["content-encoding"],(i.headers["content-encoding"]||"").toLowerCase()){case"gzip":case"x-gzip":case"compress":case"x-compress":a.push(f.createUnzip(Ws)),delete i.headers["content-encoding"];break;case"deflate":a.push(new Ms),a.push(f.createUnzip(Ws)),delete i.headers["content-encoding"];break;case"br":Ys&&(a.push(f.createBrotliDecompress(Vs)),delete i.headers["content-encoding"])}r=a.length>1?u.pipeline(a,$n.noop):a[0];const c={status:i.statusCode,statusText:i.statusMessage,headers:new Dr(i.headers),config:e,request:s};if("stream"===m)c.data=r,Cr(t,n,c);else{const i=[];let a=0;r.on("data",function(t){i.push(t),a+=t.length,e.maxContentLength>-1&&a>e.maxContentLength&&(y=!0,r.destroy(),_(new Gn("maxContentLength size of "+e.maxContentLength+" exceeded",Gn.ERR_BAD_RESPONSE,e,s)))}),r.on("aborted",function(){if(y)return;const t=new Gn("stream has been aborted",Gn.ERR_BAD_RESPONSE,e,s);r.destroy(t),n(t)}),r.on("error",function(t){b.destroyed||n(Gn.from(t,null,e,s))}),r.on("end",function(){try{let e=1===i.length?i[0]:Buffer.concat(i);"arraybuffer"!==m&&(e=e.toString(v),v&&"utf8"!==v||(e=$n.stripBOM(e))),c.data=e}catch(t){return n(Gn.from(t,null,e,c.request,c))}Cr(t,n,c)})}w.once("abort",e=>{r.destroyed||(r.emit("error",e),r.destroy())})}),w.once("abort",e=>{b.close?b.close():b.destroy(e)}),b.on("error",function(t){n(Gn.from(t,null,e,b))}),b.on("socket",function(e){e.setKeepAlive(!0,6e4)}),e.timeout){const t=parseInt(e.timeout,10);if(Number.isNaN(t))return void _(new Gn("error trying to parse `config.timeout` to int",Gn.ERR_BAD_OPTION_VALUE,e,b));b.setTimeout(t,function(){if(g)return;let t=e.timeout?"timeout of "+e.timeout+"ms exceeded":"timeout exceeded";const n=e.transitional||nr;e.timeoutErrorMessage&&(t=e.timeoutErrorMessage),_(new Gn(t,n.clarifyTimeoutError?Gn.ETIMEDOUT:Gn.ECONNABORTED,e,b))})}else b.setTimeout(0);if($n.isStream(o)){let t=!1,n=!1;o.on("end",()=>{t=!0}),o.once("error",e=>{n=!0,b.destroy(e)}),o.on("close",()=>{t||n||_(new Er("Request stream has been aborted",e,b))}),o.pipe(b)}else o&&b.write(o),b.end()},new Promise((e,n)=>{let i,a;const o=(e,t)=>{a||(a=!0,i&&i(e,t))},r=e=>{o(e,!0),n(e)};t(t=>{o(t),e(t)},r,e=>i=e).catch(r)});var t},cc=mr.hasStandardBrowserEnv?((e,t)=>n=>(n=new URL(n,mr.origin),e.protocol===n.protocol&&e.host===n.host&&(t||e.port===n.port)))(new URL(mr.origin),mr.navigator&&/(msie|trident)/i.test(mr.navigator.userAgent)):()=>!0,uc=mr.hasStandardBrowserEnv?{write(e,t,n,i,a,o,r){if("undefined"==typeof document)return;const s=[`${e}=${encodeURIComponent(t)}`];$n.isNumber(n)&&s.push(`expires=${new Date(n).toUTCString()}`),$n.isString(i)&&s.push(`path=${i}`),$n.isString(a)&&s.push(`domain=${a}`),!0===o&&s.push("secure"),$n.isString(r)&&s.push(`SameSite=${r}`),document.cookie=s.join("; ")},read(e){if("undefined"==typeof document)return null;const t=document.cookie.match(new RegExp("(?:^|; )"+e+"=([^;]*)"));return t?decodeURIComponent(t[1]):null},remove(e){this.write(e,"",Date.now()-864e5,"/")}}:{write(){},read:()=>null,remove(){}};const pc=e=>e instanceof Dr?{...e}:e;function lc(e,t){t=t||{};const n={};function i(e,t,n,i){return $n.isPlainObject(e)&&$n.isPlainObject(t)?$n.merge.call({caseless:i},e,t):$n.isPlainObject(t)?$n.merge({},t):$n.isArray(t)?t.slice():t}function a(e,t,n,a){return $n.isUndefined(t)?$n.isUndefined(e)?void 0:i(void 0,e,0,a):i(e,t,0,a)}function o(e,t){if(!$n.isUndefined(t))return i(void 0,t)}function r(e,t){return $n.isUndefined(t)?$n.isUndefined(e)?void 0:i(void 0,e):i(void 0,t)}function s(n,a,o){return o in t?i(n,a):o in e?i(void 0,n):void 0}const c={url:o,method:o,data:o,baseURL:r,transformRequest:r,transformResponse:r,paramsSerializer:r,timeout:r,timeoutMessage:r,withCredentials:r,withXSRFToken:r,adapter:r,responseType:r,xsrfCookieName:r,xsrfHeaderName:r,onUploadProgress:r,onDownloadProgress:r,decompress:r,maxContentLength:r,maxBodyLength:r,beforeRedirect:r,transport:r,httpAgent:r,httpsAgent:r,cancelToken:r,socketPath:r,responseEncoding:r,validateStatus:s,headers:(e,t,n)=>a(pc(e),pc(t),0,!0)};return $n.forEach(Object.keys({...e,...t}),function(i){const o=c[i]||a,r=o(e[i],t[i],i);$n.isUndefined(r)&&o!==s||(n[i]=r)}),n}var dc=e=>{const t=lc({},e);let{data:n,withXSRFToken:i,xsrfHeaderName:a,xsrfCookieName:o,headers:r,auth:s}=t;if(t.headers=r=Dr.from(r),t.url=er(Fr(t.baseURL,t.url,t.allowAbsoluteUrls),e.params,e.paramsSerializer),s&&r.set("Authorization","Basic "+btoa((s.username||"")+":"+(s.password?unescape(encodeURIComponent(s.password)):""))),$n.isFormData(n))if(mr.hasStandardBrowserEnv||mr.hasStandardBrowserWebWorkerEnv)r.setContentType(void 0);else if($n.isFunction(n.getHeaders)){const e=n.getHeaders(),t=["content-type","content-length"];Object.entries(e).forEach(([e,n])=>{t.includes(e.toLowerCase())&&r.set(e,n)})}if(mr.hasStandardBrowserEnv&&(i&&$n.isFunction(i)&&(i=i(t)),i||!1!==i&&cc(t.url))){const e=a&&o&&uc.read(o);e&&r.set(a,e)}return t};var mc="undefined"!=typeof XMLHttpRequest&&function(e){return new Promise(function(t,n){const i=dc(e);let a=i.data;const o=Dr.from(i.headers).normalize();let r,s,c,u,p,{responseType:l,onUploadProgress:d,onDownloadProgress:m}=i;function f(){u&&u(),p&&p(),i.cancelToken&&i.cancelToken.unsubscribe(r),i.signal&&i.signal.removeEventListener("abort",r)}let h=new XMLHttpRequest;function v(){if(!h)return;const i=Dr.from("getAllResponseHeaders"in h&&h.getAllResponseHeaders());Cr(function(e){t(e),f()},function(e){n(e),f()},{data:l&&"text"!==l&&"json"!==l?h.response:h.responseText,status:h.status,statusText:h.statusText,headers:i,config:e,request:h}),h=null}h.open(i.method.toUpperCase(),i.url,!0),h.timeout=i.timeout,"onloadend"in h?h.onloadend=v:h.onreadystatechange=function(){h&&4===h.readyState&&(0!==h.status||h.responseURL&&0===h.responseURL.indexOf("file:"))&&setTimeout(v)},h.onabort=function(){h&&(n(new Gn("Request aborted",Gn.ECONNABORTED,e,h)),h=null)},h.onerror=function(t){const i=new Gn(t&&t.message?t.message:"Network Error",Gn.ERR_NETWORK,e,h);i.event=t||null,n(i),h=null},h.ontimeout=function(){let t=i.timeout?"timeout of "+i.timeout+"ms exceeded":"timeout exceeded";const a=i.transitional||nr;i.timeoutErrorMessage&&(t=i.timeoutErrorMessage),n(new Gn(t,a.clarifyTimeoutError?Gn.ETIMEDOUT:Gn.ECONNABORTED,e,h)),h=null},void 0===a&&o.setContentType(null),"setRequestHeader"in h&&$n.forEach(o.toJSON(),function(e,t){h.setRequestHeader(t,e)}),$n.isUndefined(i.withCredentials)||(h.withCredentials=!!i.withCredentials),l&&"json"!==l&&(h.responseType=i.responseType),m&&([c,p]=$s(m,!0),h.addEventListener("progress",c)),d&&h.upload&&([s,u]=$s(d),h.upload.addEventListener("progress",s),h.upload.addEventListener("loadend",u)),(i.cancelToken||i.signal)&&(r=t=>{h&&(n(!t||t.type?new Er(null,e,h):t),h.abort(),h=null)},i.cancelToken&&i.cancelToken.subscribe(r),i.signal&&(i.signal.aborted?r():i.signal.addEventListener("abort",r)));const x=Ss(i.url);x&&-1===mr.protocols.indexOf(x)?n(new Gn("Unsupported protocol "+x+":",Gn.ERR_BAD_REQUEST,e)):h.send(a||null)})};const fc=(e,t)=>{const{length:n}=e=e?e.filter(Boolean):[];if(t||n){let n,i=new AbortController;const a=function(e){if(!n){n=!0,r();const t=e instanceof Error?e:this.reason;i.abort(t instanceof Gn?t:new Er(t instanceof Error?t.message:t))}};let o=t&&setTimeout(()=>{o=null,a(new Gn(`timeout ${t} of ms exceeded`,Gn.ETIMEDOUT))},t);const r=()=>{e&&(o&&clearTimeout(o),o=null,e.forEach(e=>{e.unsubscribe?e.unsubscribe(a):e.removeEventListener("abort",a)}),e=null)};e.forEach(e=>e.addEventListener("abort",a));const{signal:s}=i;return s.unsubscribe=()=>$n.asap(r),s}},hc=function*(e,t){let n=e.byteLength;if(n<t)return void(yield e);let i,a=0;for(;a<n;)i=a+t,yield e.slice(a,i),a=i},vc=async function*(e){if(e[Symbol.asyncIterator])return void(yield*e);const t=e.getReader();try{for(;;){const{done:e,value:n}=await t.read();if(e)break;yield n}}finally{await t.cancel()}},xc=(e,t,n,i)=>{const a=async function*(e,t){for await(const n of vc(e))yield*hc(n,t)}(e,t);let o,r=0,s=e=>{o||(o=!0,i&&i(e))};return new ReadableStream({async pull(e){try{const{done:t,value:i}=await a.next();if(t)return s(),void e.close();let o=i.byteLength;if(n){let e=r+=o;n(e)}e.enqueue(new Uint8Array(i))}catch(e){throw s(e),e}},cancel:e=>(s(e),a.return())},{highWaterMark:2})},{isFunction:gc}=$n,bc=(({Request:e,Response:t})=>({Request:e,Response:t}))($n.global),{ReadableStream:yc,TextEncoder:Dc}=$n.global,wc=(e,...t)=>{try{return!!e(...t)}catch(e){return!1}},_c=e=>{e=$n.merge.call({skipUndefined:!0},bc,e);const{fetch:t,Request:n,Response:i}=e,a=t?gc(t):"function"==typeof fetch,o=gc(n),r=gc(i);if(!a)return!1;const s=a&&gc(yc),c=a&&("function"==typeof Dc?(u=new Dc,e=>u.encode(e)):async e=>new Uint8Array(await new n(e).arrayBuffer()));var u;const p=o&&s&&wc(()=>{let e=!1;const t=new n(mr.origin,{body:new yc,method:"POST",get duplex(){return e=!0,"half"}}).headers.has("Content-Type");return e&&!t}),l=r&&s&&wc(()=>$n.isReadableStream(new i("").body)),d={stream:l&&(e=>e.body)};a&&["text","arrayBuffer","blob","formData","stream"].forEach(e=>{!d[e]&&(d[e]=(t,n)=>{let i=t&&t[e];if(i)return i.call(t);throw new Gn(`Response type '${e}' is not supported`,Gn.ERR_NOT_SUPPORT,n)})});const m=async(e,t)=>{const i=$n.toFiniteNumber(e.getContentLength());return null==i?(async e=>{if(null==e)return 0;if($n.isBlob(e))return e.size;if($n.isSpecCompliantForm(e)){const t=new n(mr.origin,{method:"POST",body:e});return(await t.arrayBuffer()).byteLength}return $n.isArrayBufferView(e)||$n.isArrayBuffer(e)?e.byteLength:($n.isURLSearchParams(e)&&(e+=""),$n.isString(e)?(await c(e)).byteLength:void 0)})(t):i};return async e=>{let{url:a,method:r,data:s,signal:c,cancelToken:u,timeout:f,onDownloadProgress:h,onUploadProgress:v,responseType:x,headers:g,withCredentials:b="same-origin",fetchOptions:y}=dc(e),D=t||fetch;x=x?(x+"").toLowerCase():"text";let w=fc([c,u&&u.toAbortSignal()],f),_=null;const E=w&&w.unsubscribe&&(()=>{w.unsubscribe()});let C;try{if(v&&p&&"get"!==r&&"head"!==r&&0!==(C=await m(g,s))){let e,t=new n(a,{method:"POST",body:s,duplex:"half"});if($n.isFormData(s)&&(e=t.headers.get("content-type"))&&g.setContentType(e),t.body){const[e,n]=Gs(C,$s(Ks(v)));s=xc(t.body,65536,e,n)}}$n.isString(b)||(b=b?"include":"omit");const t=o&&"credentials"in n.prototype,c={...y,signal:w,method:r.toUpperCase(),headers:g.normalize().toJSON(),body:s,duplex:"half",credentials:t?b:void 0};_=o&&new n(a,c);let u=await(o?D(_,y):D(a,c));const f=l&&("stream"===x||"response"===x);if(l&&(h||f&&E)){const e={};["status","statusText","headers"].forEach(t=>{e[t]=u[t]});const t=$n.toFiniteNumber(u.headers.get("content-length")),[n,a]=h&&Gs(t,$s(Ks(h),!0))||[];u=new i(xc(u.body,65536,n,()=>{a&&a(),E&&E()}),e)}x=x||"text";let F=await d[$n.findKey(d,x)||"text"](u,e);return!f&&E&&E(),await new Promise((t,n)=>{Cr(t,n,{data:F,headers:Dr.from(u.headers),status:u.status,statusText:u.statusText,config:e,request:_})})}catch(t){if(E&&E(),t&&"TypeError"===t.name&&/Load failed|fetch/i.test(t.message))throw Object.assign(new Gn("Network Error",Gn.ERR_NETWORK,e,_),{cause:t.cause||t});throw Gn.from(t,t&&t.code,e,_)}}},Ec=new Map,Cc=e=>{let t=e&&e.env||{};const{fetch:n,Request:i,Response:a}=t,o=[i,a,n];let r,s,c=o.length,u=Ec;for(;c--;)r=o[c],s=u.get(r),void 0===s&&u.set(r,s=c?new Map:_c(t)),u=s;return s};Cc();const Fc={http:sc,xhr:mc,fetch:{get:Cc}};$n.forEach(Fc,(e,t)=>{if(e){try{Object.defineProperty(e,"name",{value:t})}catch(e){}Object.defineProperty(e,"adapterName",{value:t})}});const Tc=e=>`- ${e}`,Ac=e=>$n.isFunction(e)||null===e||!1===e;var kc={getAdapter:function(e,t){e=$n.isArray(e)?e:[e];const{length:n}=e;let i,a;const o={};for(let r=0;r<n;r++){let n;if(i=e[r],a=i,!Ac(i)&&(a=Fc[(n=String(i)).toLowerCase()],void 0===a))throw new Gn(`Unknown adapter '${n}'`);if(a&&($n.isFunction(a)||(a=a.get(t))))break;o[n||"#"+r]=a}if(!a){const e=Object.entries(o).map(([e,t])=>`adapter ${e} `+(!1===t?"is not supported by the environment":"is not available in the build"));throw new Gn("There is no suitable adapter to dispatch the request "+(n?e.length>1?"since :\n"+e.map(Tc).join("\n"):" "+Tc(e[0]):"as no adapter specified"),"ERR_NOT_SUPPORT")}return a},adapters:Fc};function jc(e){if(e.cancelToken&&e.cancelToken.throwIfRequested(),e.signal&&e.signal.aborted)throw new Er(null,e)}function Sc(e){jc(e),e.headers=Dr.from(e.headers),e.data=wr.call(e,e.transformRequest),-1!==["post","put","patch"].indexOf(e.method)&&e.headers.setContentType("application/x-www-form-urlencoded",!1);return kc.getAdapter(e.adapter||hr.adapter,e)(e).then(function(t){return jc(e),t.data=wr.call(e,e.transformResponse,t),t.headers=Dr.from(t.headers),t},function(t){return _r(t)||(jc(e),t&&t.response&&(t.response.data=wr.call(e,e.transformResponse,t.response),t.response.headers=Dr.from(t.response.headers))),Promise.reject(t)})}const Oc={};["object","boolean","number","function","string","symbol"].forEach((e,t)=>{Oc[e]=function(n){return typeof n===e||"a"+(t<1?"n ":" ")+e}});const Rc={};Oc.transitional=function(e,t,n){function i(e,t){return"[Axios v"+js+"] Transitional option '"+e+"'"+t+(n?". "+n:"")}return(n,a,o)=>{if(!1===e)throw new Gn(i(a," has been removed"+(t?" in "+t:"")),Gn.ERR_DEPRECATED);return t&&!Rc[a]&&(Rc[a]=!0,console.warn(i(a," has been deprecated since v"+t+" and will be removed in the near future"))),!e||e(n,a,o)}},Oc.spelling=function(e){return(t,n)=>(console.warn(`${n} is likely a misspelling of ${e}`),!0)};var Bc={assertOptions:function(e,t,n){if("object"!=typeof e)throw new Gn("options must be an object",Gn.ERR_BAD_OPTION_VALUE);const i=Object.keys(e);let a=i.length;for(;a-- >0;){const o=i[a],r=t[o];if(r){const t=e[o],n=void 0===t||r(t,o,e);if(!0!==n)throw new Gn("option "+o+" must be "+n,Gn.ERR_BAD_OPTION_VALUE);continue}if(!0!==n)throw new Gn("Unknown option "+o,Gn.ERR_BAD_OPTION)}},validators:Oc};const Pc=Bc.validators;let Ic=class{constructor(e){this.defaults=e||{},this.interceptors={request:new tr,response:new tr}}async request(e,t){try{return await this._request(e,t)}catch(e){if(e instanceof Error){let t={};Error.captureStackTrace?Error.captureStackTrace(t):t=new Error;const n=t.stack?t.stack.replace(/^.+\n/,""):"";try{e.stack?n&&!String(e.stack).endsWith(n.replace(/^.+\n.+\n/,""))&&(e.stack+="\n"+n):e.stack=n}catch(e){}}throw e}}_request(e,t){"string"==typeof e?(t=t||{}).url=e:t=e||{},t=lc(this.defaults,t);const{transitional:n,paramsSerializer:i,headers:a}=t;void 0!==n&&Bc.assertOptions(n,{silentJSONParsing:Pc.transitional(Pc.boolean),forcedJSONParsing:Pc.transitional(Pc.boolean),clarifyTimeoutError:Pc.transitional(Pc.boolean)},!1),null!=i&&($n.isFunction(i)?t.paramsSerializer={serialize:i}:Bc.assertOptions(i,{encode:Pc.function,serialize:Pc.function},!0)),void 0!==t.allowAbsoluteUrls||(void 0!==this.defaults.allowAbsoluteUrls?t.allowAbsoluteUrls=this.defaults.allowAbsoluteUrls:t.allowAbsoluteUrls=!0),Bc.assertOptions(t,{baseUrl:Pc.spelling("baseURL"),withXsrfToken:Pc.spelling("withXSRFToken")},!0),t.method=(t.method||this.defaults.method||"get").toLowerCase();let o=a&&$n.merge(a.common,a[t.method]);a&&$n.forEach(["delete","get","head","post","put","patch","common"],e=>{delete a[e]}),t.headers=Dr.concat(o,a);const r=[];let s=!0;this.interceptors.request.forEach(function(e){"function"==typeof e.runWhen&&!1===e.runWhen(t)||(s=s&&e.synchronous,r.unshift(e.fulfilled,e.rejected))});const c=[];let u;this.interceptors.response.forEach(function(e){c.push(e.fulfilled,e.rejected)});let p,l=0;if(!s){const e=[Sc.bind(this),void 0];for(e.unshift(...r),e.push(...c),p=e.length,u=Promise.resolve(t);l<p;)u=u.then(e[l++],e[l++]);return u}p=r.length;let d=t;for(;l<p;){const e=r[l++],t=r[l++];try{d=e(d)}catch(e){t.call(this,e);break}}try{u=Sc.call(this,d)}catch(e){return Promise.reject(e)}for(l=0,p=c.length;l<p;)u=u.then(c[l++],c[l++]);return u}getUri(e){return er(Fr((e=lc(this.defaults,e)).baseURL,e.url,e.allowAbsoluteUrls),e.params,e.paramsSerializer)}};$n.forEach(["delete","get","head","options"],function(e){Ic.prototype[e]=function(t,n){return this.request(lc(n||{},{method:e,url:t,data:(n||{}).data}))}}),$n.forEach(["post","put","patch"],function(e){function t(t){return function(n,i,a){return this.request(lc(a||{},{method:e,headers:t?{"Content-Type":"multipart/form-data"}:{},url:n,data:i}))}}Ic.prototype[e]=t(),Ic.prototype[e+"Form"]=t(!0)});const Nc={Continue:100,SwitchingProtocols:101,Processing:102,EarlyHints:103,Ok:200,Created:201,Accepted:202,NonAuthoritativeInformation:203,NoContent:204,ResetContent:205,PartialContent:206,MultiStatus:207,AlreadyReported:208,ImUsed:226,MultipleChoices:300,MovedPermanently:301,Found:302,SeeOther:303,NotModified:304,UseProxy:305,Unused:306,TemporaryRedirect:307,PermanentRedirect:308,BadRequest:400,Unauthorized:401,PaymentRequired:402,Forbidden:403,NotFound:404,MethodNotAllowed:405,NotAcceptable:406,ProxyAuthenticationRequired:407,RequestTimeout:408,Conflict:409,Gone:410,LengthRequired:411,PreconditionFailed:412,PayloadTooLarge:413,UriTooLong:414,UnsupportedMediaType:415,RangeNotSatisfiable:416,ExpectationFailed:417,ImATeapot:418,MisdirectedRequest:421,UnprocessableEntity:422,Locked:423,FailedDependency:424,TooEarly:425,UpgradeRequired:426,PreconditionRequired:428,TooManyRequests:429,RequestHeaderFieldsTooLarge:431,UnavailableForLegalReasons:451,InternalServerError:500,NotImplemented:501,BadGateway:502,ServiceUnavailable:503,GatewayTimeout:504,HttpVersionNotSupported:505,VariantAlsoNegotiates:506,InsufficientStorage:507,LoopDetected:508,NotExtended:510,NetworkAuthenticationRequired:511,WebServerIsDown:521,ConnectionTimedOut:522,OriginIsUnreachable:523,TimeoutOccurred:524,SslHandshakeFailed:525,InvalidSslCertificate:526};Object.entries(Nc).forEach(([e,t])=>{Nc[t]=e});const Lc=function e(t){const n=new Ic(t),i=en(Ic.prototype.request,n);return $n.extend(i,Ic.prototype,n,{allOwnKeys:!0}),$n.extend(i,n,null,{allOwnKeys:!0}),i.create=function(n){return e(lc(t,n))},i}(hr);Lc.Axios=Ic,Lc.CanceledError=Er,Lc.CancelToken=class e{constructor(e){if("function"!=typeof e)throw new TypeError("executor must be a function.");let t;this.promise=new Promise(function(e){t=e});const n=this;this.promise.then(e=>{if(!n._listeners)return;let t=n._listeners.length;for(;t-- >0;)n._listeners[t](e);n._listeners=null}),this.promise.then=e=>{let t;const i=new Promise(e=>{n.subscribe(e),t=e}).then(e);return i.cancel=function(){n.unsubscribe(t)},i},e(function(e,i,a){n.reason||(n.reason=new Er(e,i,a),t(n.reason))})}throwIfRequested(){if(this.reason)throw this.reason}subscribe(e){this.reason?e(this.reason):this._listeners?this._listeners.push(e):this._listeners=[e]}unsubscribe(e){if(!this._listeners)return;const t=this._listeners.indexOf(e);-1!==t&&this._listeners.splice(t,1)}toAbortSignal(){const e=new AbortController,t=t=>{e.abort(t)};return this.subscribe(t),e.signal.unsubscribe=()=>this.unsubscribe(t),e.signal}static source(){let t;return{token:new e(function(e){t=e}),cancel:t}}},Lc.isCancel=_r,Lc.VERSION=js,Lc.toFormData=Yo,Lc.AxiosError=Gn,Lc.Cancel=Lc.CanceledError,Lc.all=function(e){return Promise.all(e)},Lc.spread=function(e){return function(t){return e.apply(null,t)}},Lc.isAxiosError=function(e){return $n.isObject(e)&&!0===e.isAxiosError},Lc.mergeConfig=lc,Lc.AxiosHeaders=Dr,Lc.formToJSON=e=>fr($n.isHTMLForm(e)?new FormData(e):e),Lc.getAdapter=kc.getAdapter,Lc.HttpStatusCode=Nc,Lc.default=Lc;const{Axios:Uc,AxiosError:zc,CanceledError:qc,isCancel:Mc,CancelToken:Hc,VERSION:$c,all:Gc,Cancel:Kc,isAxiosError:Wc,spread:Vc,toFormData:Yc,AxiosHeaders:Jc,HttpStatusCode:Xc,formToJSON:Zc,getAdapter:Qc,mergeConfig:eu}=Lc,tu="=".repeat(10),nu={requestFailed:(e,t,n)=>`API request attempt ${e} failed. ${t} retries left. Error: ${n}`,allRetriesFailed:e=>`API call failed after all retries: ${e}`},iu={schedulingFailed:e=>`Heartbeat scheduling failed: ${e}`,emergencyTriggered:"Emergency heartbeat triggered - no successful heartbeat in 100+ seconds",emergencyFailed:e=>`Emergency heartbeat failed: ${e}`,failed:e=>`Heartbeat failed: ${e}`,attemptFailed:(e,t,n)=>`Heartbeat attempt ${e} failed. ${t} retries left. Error: ${n}`},au={testData:(e,t)=>{let n=`\n-------Started reporting to NeetoPlaydash 🎭-------\nCI Build ID: ${e}\n`;return t&&(n+=`Total shards: ${t.total}\nCurrent shards: ${t.current}\n`),n+=`${"-".repeat(50)}\n`,n}},ou={startingTest:({titlePath:e,historyId:t,retry:n,repeatEachIndex:i})=>`${tu}Starting ${e}${tu}\n Time: ${(new Date).toUTCString()}\n History ID: ${t}${n?`\nRetry: ${n}`:""}${i?`\nRepeat index: ${i}`:""}`},ru={reportedTest:({title:e,status:t,historyId:n,completedAt:i,error:a,isTestReported:o=!0,retry:r,repeatEachIndex:s})=>{let c=`\n\n${o?"------------Reported to NeetoPlaydash------------":"-".repeat(49)}\n Title: ${e}\n History id: ${n}\n Status: ${t}\n Completed at: ${i}${r?`\nRetry: ${r}`:""}${s?`\nRepeat index: ${s}`:""}\n`;return c=a?c.concat(` Error:\n\n ${a.replaceAll("\n","\n ")}`):c,c.concat(`\n${"-".repeat(49)}\n`)}},su={runReported:"Run completed and reported to NeetoPlaydash 🎉\n\n",finalStatus:({currentShard:e,status:t,duration:n})=>{let i=`------------------Run completed-------------------\n Status: ${t}\n Duration: ${(e=>{const t={hour:Math.floor(e/36e5),minute:Math.floor(e/6e4)%60,second:Math.floor(e/1e3)%60,millisecond:Math.floor(e)%1e3};return Object.entries(t).filter(([e,t])=>0!==t).map(([e,t])=>t+" "+(1!==t?`${e}s`:e)).join(", ")})(null!=n?n:0)}\n`;return i=0!==e?i.concat(` Shard: ${e}`):i,i.concat(`\n${"-".repeat(50)}\n`)},dashboardUrlHeader:"View the run in the dashboard"};var cu={exports:{}},uu={};function pu(e,t){"boolean"==typeof t&&(t={forever:t}),this._originalTimeouts=JSON.parse(JSON.stringify(e)),this._timeouts=e,this._options=t||{},this._maxRetryTime=t&&t.maxRetryTime||1/0,this._fn=null,this._errors=[],this._attempts=1,this._operationTimeout=null,this._operationTimeoutCb=null,this._timeout=null,this._operationStart=null,this._timer=null,this._options.forever&&(this._cachedTimeouts=this._timeouts.slice(0))}var lu=pu;pu.prototype.reset=function(){this._attempts=1,this._timeouts=this._originalTimeouts.slice(0)},pu.prototype.stop=function(){this._timeout&&clearTimeout(this._timeout),this._timer&&clearTimeout(this._timer),this._timeouts=[],this._cachedTimeouts=null},pu.prototype.retry=function(e){if(this._timeout&&clearTimeout(this._timeout),!e)return!1;var t=(new Date).getTime();if(e&&t-this._operationStart>=this._maxRetryTime)return this._errors.push(e),this._errors.unshift(new Error("RetryOperation timeout occurred")),!1;this._errors.push(e);var n=this._timeouts.shift();if(void 0===n){if(!this._cachedTimeouts)return!1;this._errors.splice(0,this._errors.length-1),n=this._cachedTimeouts.slice(-1)}var i=this;return this._timer=setTimeout(function(){i._attempts++,i._operationTimeoutCb&&(i._timeout=setTimeout(function(){i._operationTimeoutCb(i._attempts)},i._operationTimeout),i._options.unref&&i._timeout.unref()),i._fn(i._attempts)},n),this._options.unref&&this._timer.unref(),!0},pu.prototype.attempt=function(e,t){this._fn=e,t&&(t.timeout&&(this._operationTimeout=t.timeout),t.cb&&(this._operationTimeoutCb=t.cb));var n=this;this._operationTimeoutCb&&(this._timeout=setTimeout(function(){n._operationTimeoutCb()},n._operationTimeout)),this._operationStart=(new Date).getTime(),this._fn(this._attempts)},pu.prototype.try=function(e){console.log("Using RetryOperation.try() is deprecated"),this.attempt(e)},pu.prototype.start=function(e){console.log("Using RetryOperation.start() is deprecated"),this.attempt(e)},pu.prototype.start=pu.prototype.try,pu.prototype.errors=function(){return this._errors},pu.prototype.attempts=function(){return this._attempts},pu.prototype.mainError=function(){if(0===this._errors.length)return null;for(var e={},t=null,n=0,i=0;i<this._errors.length;i++){var a=this._errors[i],o=a.message,r=(e[o]||0)+1;e[o]=r,r>=n&&(t=a,n=r)}return t},function(e){var t=lu;e.operation=function(n){var i=e.timeouts(n);return new t(i,{forever:n&&(n.forever||n.retries===1/0),unref:n&&n.unref,maxRetryTime:n&&n.maxRetryTime})},e.timeouts=function(e){if(e instanceof Array)return[].concat(e);var t={retries:10,factor:2,minTimeout:1e3,maxTimeout:1/0,randomize:!1};for(var n in e)t[n]=e[n];if(t.minTimeout>t.maxTimeout)throw new Error("minTimeout is greater than maxTimeout");for(var i=[],a=0;a<t.retries;a++)i.push(this.createTimeout(a,t));return e&&e.forever&&!i.length&&i.push(this.createTimeout(a,t)),i.sort(function(e,t){return e-t}),i},e.createTimeout=function(e,t){var n=t.randomize?Math.random()+1:1,i=Math.round(n*Math.max(t.minTimeout,1)*Math.pow(t.factor,e));return i=Math.min(i,t.maxTimeout)},e.wrap=function(t,n,i){if(n instanceof Array&&(i=n,n=null),!i)for(var a in i=[],t)"function"==typeof t[a]&&i.push(a);for(var o=0;o<i.length;o++){var r=i[o],s=t[r];t[r]=function(i){var a=e.operation(n),o=Array.prototype.slice.call(arguments,1),r=o.pop();o.push(function(e){a.retry(e)||(e&&(arguments[0]=a.mainError()),r.apply(this,arguments))}),a.attempt(function(){i.apply(t,o)})}.bind(t,s),t[r].options=n}}}(uu);var du=C(cu.exports=uu);const mu=Object.prototype.toString,fu=new Set(["network error","Failed to fetch","NetworkError when attempting to fetch resource.","The Internet connection appears to be offline.","Network request failed","fetch failed","terminated"," A network error occurred.","Network connection lost"]);function hu(e){var t;if(!(e&&(t=e,"[object Error]"===mu.call(t))&&"TypeError"===e.name&&"string"==typeof e.message))return!1;const{message:n,stack:i}=e;return"Load failed"===n?void 0===i||"__sentry_captured__"in e:!!n.startsWith("error sending request for url")||fu.has(n)}class vu extends Error{constructor(e){super(),e instanceof Error?(this.originalError=e,({message:e}=e)):(this.originalError=new Error(e),this.originalError.stack=this.stack),this.name="AbortError",this.message=e}}const xu=(e,t,n)=>{const i=n.retries-(t-1);return e.attemptNumber=t,e.retriesLeft=i,e};async function gu(e,t){return new Promise((n,i)=>{t={...t},t.onFailedAttempt??=()=>{},t.shouldRetry??=()=>!0,t.retries??=10;const a=du.operation(t),o=()=>{a.stop(),i(t.signal?.reason)};t.signal&&!t.signal.aborted&&t.signal.addEventListener("abort",o,{once:!0});const r=()=>{t.signal?.removeEventListener("abort",o),a.stop()};a.attempt(async o=>{try{const t=await e(o);r(),n(t)}catch(e){try{if(!(e instanceof Error))throw new TypeError(`Non-error was thrown: "${e}". You should only throw errors.`);if(e instanceof vu)throw e.originalError;if(e instanceof TypeError&&!hu(e))throw e;if(xu(e,o,t),await t.shouldRetry(e)||(a.stop(),i(e)),await t.onFailedAttempt(e),!a.retry(e))throw a.mainError()}catch(e){xu(e,o,t),r(),i(e)}}})})}const bu={retries:3,minTimeout:1e3,maxTimeout:8e3,factor:2,isCritical:!1,additionalRetryStatusCodes:[]},yu=(e,t={})=>(async(e,t={})=>{const n={...bu,...t};return gu(async()=>{var t;try{return await e()}catch(e){const i=e;if(!((e,t=[])=>{var n;if("ETIMEDOUT"===e.code||"ECONNRESET"===e.code||"ECONNABORTED"===e.code||"ENOTFOUND"===e.code||"EAI_AGAIN"===e.code)return!0;if(e.message&&e.message.toLowerCase().includes("timeout"))return!0;if(null===(n=e.response)||void 0===n?void 0:n.status){const n=e.response.status;return n>=500||404===n||408===n||429===n||t.includes(n)}return!0})(i,n.additionalRetryStatusCodes))throw new vu(`Non-retriable error: ${(null===(t=i.response)||void 0===t?void 0:t.status)||i.code}`);throw e}},{retries:n.retries,minTimeout:n.minTimeout,maxTimeout:n.maxTimeout,factor:n.factor,onFailedAttempt:e=>{n.isCritical?N.error(nu.requestFailed(e.attemptNumber,e.retriesLeft,e.message)):N.warning(nu.requestFailed(e.attemptNumber,e.retriesLeft,e.message))}})})(e,{...t,isCritical:!0}),Du="/api/v1",wu=e=>{const t=(n=e,Object.entries(n).reduce((e,t)=>(e[Ht(t[0])]=t[1],e),{}));var n;return yu(()=>Lc.post(`${Du}/reporter/runs`,{run:t},{skipSnakeCaseConversion:!0}),{additionalRetryStatusCodes:[422]})},_u=(e,t)=>yu(()=>Lc.put(`${Du}/reporter/runs/${e}`,{run:t}),{additionalRetryStatusCodes:[422]}),Eu=e=>Lc.get(`${Du}/reporter/runs/${e}/heartbeat`),Cu=(e,t)=>yu(()=>Lc.post(`${Du}/reporter/runs/${e}/test_entities`,{testEntity:t}),{additionalRetryStatusCodes:[422]});class Fu{constructor(e,t={interval:4e4,maxRetries:3,requestTimeout:3e3,retryDelay:1e3,emergencyThreshold:1e5}){this.ciBuildId=e,this.options=t,this.interval=null,this.emergencyTimeout=null,this.isServiceActive=!1,this.isHeartbeatInProgress=!1,this.lastSuccessfulHeartbeat=0,this.start=async()=>{this.isServiceActive||(this.isServiceActive=!0,this.lastSuccessfulHeartbeat=Date.now(),await this.sendHeartbeat(),this.scheduleNextHeartbeat(),this.scheduleEmergencyCheck())},this.stop=()=>{this.interval&&(clearInterval(this.interval),this.interval=null),this.emergencyTimeout&&(clearTimeout(this.emergencyTimeout),this.emergencyTimeout=null),this.isServiceActive=!1},this.scheduleNextHeartbeat=()=>{this.interval=setInterval(()=>{this.isHeartbeatInProgress||this.sendHeartbeat().catch(e=>{var t;N.error(iu.schedulingFailed(null!==(t=null==e?void 0:e.message)&&void 0!==t?t:String(e)))})},this.options.interval)},this.scheduleEmergencyCheck=()=>{this.emergencyTimeout=setTimeout(()=>{Date.now()-this.lastSuccessfulHeartbeat>this.options.emergencyThreshold&&(N.warning(iu.emergencyTriggered),this.isHeartbeatInProgress||this.sendEmergencyHeartbeat()),this.isServiceActive&&this.scheduleEmergencyCheck()},this.options.emergencyThreshold)},this.sendHeartbeat=async()=>{if(!this.isHeartbeatInProgress){this.isHeartbeatInProgress=!0;try{await gu(async()=>{await Eu(this.ciBuildId),this.lastSuccessfulHeartbeat=Date.now()},{retries:this.options.maxRetries,minTimeout:this.options.retryDelay,maxTimeout:this.options.retryDelay,onFailedAttempt:e=>{var t;const n=e;if(null===(t=n.response)||void 0===t?void 0:t.status){const e=n.response.status;if(e>=400&&e<500&&404!==e&&408!==e)throw new vu(`Non-retriable client error: ${e}`)}N.warning(iu.attemptFailed(e.attemptNumber,e.retriesLeft,e.message))}})}catch(e){this.handleHeartbeatFailure(e)}finally{this.isHeartbeatInProgress=!1}}},this.sendEmergencyHeartbeat=async()=>{var e;this.isHeartbeatInProgress=!0;try{await Eu(this.ciBuildId),this.lastSuccessfulHeartbeat=Date.now()}catch(t){N.error(iu.emergencyFailed(null!==(e=null==t?void 0:t.message)&&void 0!==e?e:String(t))),this.handleHeartbeatFailure(t)}finally{this.isHeartbeatInProgress=!1}},this.handleHeartbeatFailure=e=>{var t;const n=e instanceof vu;N.error(iu.failed(null!==(t=null==e?void 0:e.message)&&void 0!==t?t:String(e))),n&&(N.redText(R.stopped),this.stop(),process.exit(1))},this.sendImmediateHeartbeat=async()=>{this.isHeartbeatInProgress||await this.sendHeartbeat()}}get status(){return{isServiceActive:this.isServiceActive,isHeartbeatInProgress:this.isHeartbeatInProgress,lastHeartbeat:this.lastSuccessfulHeartbeat}}}const Tu=({command:e,messageOnError:t,shouldThrowError:n=!1,logLevel:i="warning"})=>{try{return v.execSync(e).toString().trim()}catch(e){if(n)throw e;N[i](t)}},Au=(e,t)=>{var n;const{title:a,parent:o,location:{file:r}}=e,s=e.titlePath(),c=null===(n=o.project())||void 0===n?void 0:n.name,u=i.relative(t,r),p=(({titlePath:e,title:t,project:n,rootDir:a,file:o})=>e.filter((e,r)=>0!==r&&e!==t&&e!==n&&e!==i.relative(a,o)))({titlePath:s,title:a,project:c,rootDir:t,file:r});return{title:a,describe:p,project:c,spec:u,historyId:(({projectId:e,specName:t,describeTitles:n,testTitle:i})=>{const a=`[project=${e}]${t}${[...n,i].join("")}`,o=Vt(a);return`${Vt(t)}-${o}`})({projectId:null!=c?c:"",specName:u,describeTitles:p,testTitle:a})}},ku=({rootDir:e},t)=>Le(t.allTests().map(t=>Au(t,e))),ju=async(e,t,n)=>{var i,a,o,r,s,c,u,p;let l=t.shard;if(!l){const e=process.env.NEETO_PLAYDASH_CURRENT_SHARD,t=process.env.NEETO_PLAYDASH_TOTAL_SHARDS;e&&t&&(l={current:parseInt(e),total:parseInt(t)})}e.config=t;const d=e.currentShard=null!==(i=null==l?void 0:l.current)&&void 0!==i?i:0;A.setContext({ciBuildId:e.ciBuildId,currentShard:null==l?void 0:l.current,rootDir:t.rootDir});const m=n.allTests();e.totalTestCount=m.length,e.rootDir=t.rootDir;const f=l?{...t,shard:l}:t,h={commitId:null!==(a=e.commitId)&&void 0!==a?a:Tu({command:"git rev-parse HEAD",messageOnError:k.failedToGetCommitSha}),commitName:null!==(o=e.title)&&void 0!==o?o:Tu({command:"git show-branch --no-name HEAD",messageOnError:k.failedToGetCommitMessage}),author:null!==(r=e.author)&&void 0!==r?r:Tu({command:"git show -s --format='%an' HEAD",messageOnError:k.failedToGetBranch}),branch:null!==(s=e.branch)&&void 0!==s?s:Tu({command:"git branch --show-current",messageOnError:k.failedToGetBranch}),tags:"string"==typeof e.tags?e.tags.split(","):e.tags,ciBuildId:e.ciBuildId,configuration:{...f,baseDir:process.cwd()},shards:Gt({currentShard:d})};try{if(await wu(h),e.hasRunStarted=!0,0===e.totalTestCount)return void N.redText(k.noTestsToReport);e.heartbeatManager=new Fu(e.ciBuildId),await e.heartbeatManager.start();const{data:i}=await Cu(e.ciBuildId,{testEntities:ku(t,n),shard:d});e.attempts=i,N.log(au.testData(e.ciBuildId,l))}catch(i){e.shouldNotReportTest=!0;const a=i,o=null===(c=a.response)||void 0===c?void 0:c.data;N.error(null!==(u=null==o?void 0:o.error)&&void 0!==u?u:a.message),N.error(k.failedToInitializeRun),await Zt({context:{...h,testEntities:ku(t,n)},error:i,title:"onBegin"}),((e,t)=>{var n,i;const{error:a}=e&&(e instanceof zc&&(null===(n=null==e?void 0:e.response)||void 0===n?void 0:n.data)||{error:void 0}),o=e&&(e instanceof zc?null===(i=null==e?void 0:e.response)||void 0===i?void 0:i.status:void 0);t.shouldNotReportTest=!0,"Project does not exist."===a&&404===o?(N.redText(k.invalidProjectKey),process.exit(1)):"Could not authenticate, invalid API Key"===a&&401===o||"api-key"===t.apiKey?(N.redText(k.invalidApiKey),process.exit(1)):[w,_].includes(a||"")&&422===o?(N.redText(k.duplicateCiBuildId),process.exit(1)):(422===o&&(process.kill(process.pid,"SIGKILL"),process.exit(1)),Xt(o)&&N.yellowText(null!=a?a:null==e?void 0:e.message),N.yellowText(k.testsWillNotBeReported))})(a,e),null===(p=e.heartbeatManager)||void 0===p||p.stop()}},Su=(e,t,n)=>yu(()=>Lc.post(`${Du}/reporter/runs/${e}/test_entities/${t}/attempts`,n),{additionalRetryStatusCodes:[422]}),Ou=({ciBuildId:e,historyId:t,id:n,payload:i})=>yu(()=>Lc.put(`${Du}/reporter/runs/${e}/test_entities/${t}/attempts/${n}`,i),{additionalRetryStatusCodes:[422]}),Ru=new Set(["ENOTFOUND","ENETUNREACH","UNABLE_TO_GET_ISSUER_CERT","UNABLE_TO_GET_CRL","UNABLE_TO_DECRYPT_CERT_SIGNATURE","UNABLE_TO_DECRYPT_CRL_SIGNATURE","UNABLE_TO_DECODE_ISSUER_PUBLIC_KEY","CERT_SIGNATURE_FAILURE","CRL_SIGNATURE_FAILURE","CERT_NOT_YET_VALID","CERT_HAS_EXPIRED","CRL_NOT_YET_VALID","CRL_HAS_EXPIRED","ERROR_IN_CERT_NOT_BEFORE_FIELD","ERROR_IN_CERT_NOT_AFTER_FIELD","ERROR_IN_CRL_LAST_UPDATE_FIELD","ERROR_IN_CRL_NEXT_UPDATE_FIELD","OUT_OF_MEM","DEPTH_ZERO_SELF_SIGNED_CERT","SELF_SIGNED_CERT_IN_CHAIN","UNABLE_TO_GET_ISSUER_CERT_LOCALLY","UNABLE_TO_VERIFY_LEAF_SIGNATURE","CERT_CHAIN_TOO_LONG","CERT_REVOKED","INVALID_CA","PATH_LENGTH_EXCEEDED","INVALID_PURPOSE","CERT_UNTRUSTED","CERT_REJECTED","HOSTNAME_MISMATCH"]);const Bu="axios-retry";function Pu(e){return!e.response&&(!!e.code&&(!["ERR_CANCELED","ECONNABORTED"].includes(e.code)&&(e=>!Ru.has(e&&e.code))(e)))}const Iu=["get","head","options"],Nu=Iu.concat(["put","delete"]);function Lu(e){return"ECONNABORTED"!==e.code&&(!e.response||429===e.response.status||e.response.status>=500&&e.response.status<=599)}function Uu(e){return!!e.config?.method&&(Lu(e)&&-1!==Nu.indexOf(e.config.method))}function zu(e){return Pu(e)||Uu(e)}function qu(e=void 0){const t=e?.response?.headers["retry-after"];if(!t)return 0;let n=1e3*(Number(t)||0);return 0===n&&(n=(new Date(t).valueOf()||0)-Date.now()),Math.max(0,n)}const Mu={retries:3,retryCondition:zu,retryDelay:function(e=0,t=void 0){return Math.max(0,qu(t))},shouldResetTimeout:!1,onRetry:()=>{},onMaxRetryTimesExceeded:()=>{},validateResponse:null};function Hu(e,t,n=!1){const i=function(e,t){return{...Mu,...t,...e[Bu]}}(e,t||{});return i.retryCount=i.retryCount||0,i.lastRequestTime&&!n||(i.lastRequestTime=Date.now()),e[Bu]=i,i}const $u=(e,t)=>{const n=e.interceptors.request.use(e=>(Hu(e,t,!0),e[Bu]?.validateResponse&&(e.validateStatus=()=>!1),e)),i=e.interceptors.response.use(null,async n=>{const{config:i}=n;if(!i)return Promise.reject(n);const a=Hu(i,t);return n.response&&a.validateResponse?.(n.response)?n.response:await async function(e,t){const{retries:n,retryCondition:i}=e,a=(e.retryCount||0)<n&&i(t);if("object"==typeof a)try{return!1!==await a}catch(e){return!1}return a}(a,n)?async function(e,t,n,i){t.retryCount+=1;const{retryDelay:a,shouldResetTimeout:o,onRetry:r}=t,s=a(t.retryCount,n);if(function(e,t){e.defaults.agent===t.agent&&delete t.agent,e.defaults.httpAgent===t.httpAgent&&delete t.httpAgent,e.defaults.httpsAgent===t.httpsAgent&&delete t.httpsAgent}(e,i),!o&&i.timeout&&t.lastRequestTime){const e=Date.now()-t.lastRequestTime,a=i.timeout-e-s;if(a<=0)return Promise.reject(n);i.timeout=a}return i.transformRequest=[e=>e],await r(t.retryCount,n,i),i.signal?.aborted?Promise.resolve(e(i)):new Promise(t=>{const n=()=>{clearTimeout(a),t(e(i))},a=setTimeout(()=>{t(e(i)),i.signal?.removeEventListener&&i.signal.removeEventListener("abort",n)},s);i.signal?.addEventListener&&i.signal.addEventListener("abort",n,{once:!0})})}(e,a,n,i):(await async function(e,t){e.retryCount>=e.retries&&await e.onMaxRetryTimesExceeded(t,e.retryCount)}(a,n),Promise.reject(n))});return{requestInterceptorId:n,responseInterceptorId:i}};$u.isNetworkError=Pu,$u.isSafeRequestError=function(e){return!!e.config?.method&&(Lu(e)&&-1!==Iu.indexOf(e.config.method))},$u.isIdempotentRequestError=Uu,$u.isNetworkOrIdempotentRequestError=zu,$u.exponentialDelay=function(e=0,t=void 0,n=100){const i=2**e*n,a=Math.max(i,qu(t));return a+.2*a*Math.random()},$u.linearDelay=function(e=100){return(t=0,n=void 0)=>{const i=t*e;return Math.max(i,qu(n))}},$u.isRetryableError=Lu;const Gu="Content-Type",Ku="Accept",Wu="X-Api-Key",Vu="Project-Key",Yu="Reporter-Version",Ju=e=>e===Object(e)&&!(e instanceof Buffer);function Xu({projectKey:e,baseURL:t,apiKey:n}){const i=new s.Agent({keepAlive:!0,keepAliveMsecs:6e4,timeout:9e4});Lc.defaults.baseURL=t||process.env.NEETO_PLAYDASH_API_BASE_URL||"https://connect.neetoplaydash.com",Lc.defaults.skipSnakeCaseConversion=!1,Lc.defaults.headers.common.Connection="keep-alive",Lc.defaults.httpsAgent=i,Lc.defaults.timeout=9e4,(({projectKey:e,apiKey:t})=>{Lc.defaults.headers={...Lc.defaults.headers,[Vu]:e,[Yu]:Qt(),[Wu]:null!=t?t:"",[Ku]:"application/json",[Gu]:"application/json"}})({projectKey:e,apiKey:n}),Lc.interceptors.request.use(e=>{const t=e.data;return Ju(t)&&!e.skipSnakeCaseConversion&&(e.data=$t(t,function(e,t){return[Ht(e),t]})),e}),Lc.interceptors.response.use(e=>{const t=e.data;return Ju(t)&&(e.data=$t(t,function(e,t){return[(n=e,n.replace(/(_\w)/g,function(e){return e[1].toUpperCase()})),t];var n})),e}),$u(Lc,{retries:3,retryDelay:e=>Math.min(1e3*Math.pow(2,e-1),1e4),retryCondition:e=>{var t;const n=null===(t=e.status)||void 0===t?void 0:t.toString();return!!$u.isNetworkOrIdempotentRequestError(e)||(!!("ETIMEDOUT"===e.code||"ECONNRESET"===e.code||"ECONNABORTED"===e.code||"ENOTFOUND"===e.code||"EAI_AGAIN"===e.code||e.message&&e.message.toLowerCase().includes("timeout"))||!!n&&(n.startsWith("5")||"404"===n||"408"===n||"429"===n))}})}const Zu=Lc.create({timeout:0,httpsAgent:new s.Agent({timeout:0})}),Qu=["screenshot","video","trace","lighthouse"],ep=({location:e,snippet:t})=>{if(!e)return null;const{file:n,line:i,column:a}=e;return`# ${n} (${i}:${a}) \n\n\n ${t}`},tp={KB:1024,MB:Math.pow(1024,2)},np=(e,t)=>parseFloat((e/tp[t]).toFixed(2));var ip=class{constructor(e,t,n){this.etaBufferLength=e||100,this.valueBuffer=[n],this.timeBuffer=[t],this.eta="0"}update(e,t,n){this.valueBuffer.push(t),this.timeBuffer.push(e),this.calculate(n-t)}getTime(){return this.eta}calculate(e){const t=this.valueBuffer.length,n=Math.min(this.etaBufferLength,t),i=(this.valueBuffer[t-1]-this.valueBuffer[t-n])/(this.timeBuffer[t-1]-this.timeBuffer[t-n]);this.valueBuffer=this.valueBuffer.slice(-this.etaBufferLength),this.timeBuffer=this.timeBuffer.slice(-this.etaBufferLength);const a=Math.ceil(e/i/1e3);isNaN(a)?this.eta="NULL":isFinite(a)?this.eta=a>1e7?"INF":a<0?0:a:this.eta="INF"}};const ap=x;var op=class{constructor(e){this.stream=e,this.linewrap=!0,this.dy=0}cursorSave(){this.stream.isTTY&&this.stream.write("7")}cursorRestore(){this.stream.isTTY&&this.stream.write("8")}cursor(e){this.stream.isTTY&&(e?this.stream.write("[?25h"):this.stream.write("[?25l"))}cursorTo(e=null,t=null){this.stream.isTTY&&ap.cursorTo(this.stream,e,t)}cursorRelative(e=null,t=null){this.stream.isTTY&&(this.dy=this.dy+t,ap.moveCursor(this.stream,e,t))}cursorRelativeReset(){this.stream.isTTY&&(ap.moveCursor(this.stream,0,-this.dy),ap.cursorTo(this.stream,0,null),this.dy=0)}clearRight(){this.stream.isTTY&&ap.clearLine(this.stream,1)}clearLine(){this.stream.isTTY&&ap.clearLine(this.stream,0)}clearBottom(){this.stream.isTTY&&ap.clearScreenDown(this.stream)}newline(){this.stream.write("\n"),this.dy++}write(e,t=!1){!0===this.linewrap&&!1===t?this.stream.write(e.substr(0,this.getWidth())):this.stream.write(e)}lineWrapping(e){this.stream.isTTY&&(this.linewrap=e,e?this.stream.write("[?7h"):this.stream.write("[?7l"))}isTTY(){return!0===this.stream.isTTY}getWidth(){return this.stream.columns||(this.stream.isTTY?80:200)}},rp={exports:{}};const sp=({onlyFirst:e=!1}={})=>{const t=["[\\u001B\\u009B][[\\]()#;?]*(?:(?:(?:(?:;[-a-zA-Z\\d\\/#&.:=?%@~_]+)*|[a-zA-Z\\d]+(?:;[-a-zA-Z\\d\\/#&.:=?%@~_]*)*)?\\u0007)","(?:(?:\\d{1,4}(?:;\\d{0,4})*)?[\\dA-PR-TZcf-ntqry=><~]))"].join("|");return new RegExp(t,e?void 0:"g")};var cp={exports:{}};const up=e=>!Number.isNaN(e)&&(e>=4352&&(e<=4447||9001===e||9002===e||11904<=e&&e<=12871&&12351!==e||12880<=e&&e<=19903||19968<=e&&e<=42182||43360<=e&&e<=43388||44032<=e&&e<=55203||63744<=e&&e<=64255||65040<=e&&e<=65049||65072<=e&&e<=65131||65281<=e&&e<=65376||65504<=e&&e<=65510||110592<=e&&e<=110593||127488<=e&&e<=127569||131072<=e&&e<=262141));cp.exports=up,cp.exports.default=up;const pp=e=>"string"==typeof e?e.replace(sp(),""):e,lp=cp.exports,dp=function(){return/\uD83C\uDFF4\uDB40\uDC67\uDB40\uDC62(?:\uDB40\uDC65\uDB40\uDC6E\uDB40\uDC67|\uDB40\uDC73\uDB40\uDC63\uDB40\uDC74|\uDB40\uDC77\uDB40\uDC6C\uDB40\uDC73)\uDB40\uDC7F|\uD83D\uDC68(?:\uD83C\uDFFC\u200D(?:\uD83E\uDD1D\u200D\uD83D\uDC68\uD83C\uDFFB|\uD83C[\uDF3E\uDF73\uDF93\uDFA4\uDFA8\uDFEB\uDFED]|\uD83D[\uDCBB\uDCBC\uDD27\uDD2C\uDE80\uDE92]|\uD83E[\uDDAF-\uDDB3\uDDBC\uDDBD])|\uD83C\uDFFF\u200D(?:\uD83E\uDD1D\u200D\uD83D\uDC68(?:\uD83C[\uDFFB-\uDFFE])|\uD83C[\uDF3E\uDF73\uDF93\uDFA4\uDFA8\uDFEB\uDFED]|\uD83D[\uDCBB\uDCBC\uDD27\uDD2C\uDE80\uDE92]|\uD83E[\uDDAF-\uDDB3\uDDBC\uDDBD])|\uD83C\uDFFE\u200D(?:\uD83E\uDD1D\u200D\uD83D\uDC68(?:\uD83C[\uDFFB-\uDFFD])|\uD83C[\uDF3E\uDF73\uDF93\uDFA4\uDFA8\uDFEB\uDFED]|\uD83D[\uDCBB\uDCBC\uDD27\uDD2C\uDE80\uDE92]|\uD83E[\uDDAF-\uDDB3\uDDBC\uDDBD])|\uD83C\uDFFD\u200D(?:\uD83E\uDD1D\u200D\uD83D\uDC68(?:\uD83C[\uDFFB\uDFFC])|\uD83C[\uDF3E\uDF73\uDF93\uDFA4\uDFA8\uDFEB\uDFED]|\uD83D[\uDCBB\uDCBC\uDD27\uDD2C\uDE80\uDE92]|\uD83E[\uDDAF-\uDDB3\uDDBC\uDDBD])|\u200D(?:\u2764\uFE0F\u200D(?:\uD83D\uDC8B\u200D)?\uD83D\uDC68|(?:\uD83D[\uDC68\uDC69])\u200D(?:\uD83D\uDC66\u200D\uD83D\uDC66|\uD83D\uDC67\u200D(?:\uD83D[\uDC66\uDC67]))|\uD83D\uDC66\u200D\uD83D\uDC66|\uD83D\uDC67\u200D(?:\uD83D[\uDC66\uDC67])|(?:\uD83D[\uDC68\uDC69])\u200D(?:\uD83D[\uDC66\uDC67])|[\u2695\u2696\u2708]\uFE0F|\uD83D[\uDC66\uDC67]|\uD83C[\uDF3E\uDF73\uDF93\uDFA4\uDFA8\uDFEB\uDFED]|\uD83D[\uDCBB\uDCBC\uDD27\uDD2C\uDE80\uDE92]|\uD83E[\uDDAF-\uDDB3\uDDBC\uDDBD])|(?:\uD83C\uDFFB\u200D[\u2695\u2696\u2708]|\uD83C\uDFFF\u200D[\u2695\u2696\u2708]|\uD83C\uDFFE\u200D[\u2695\u2696\u2708]|\uD83C\uDFFD\u200D[\u2695\u2696\u2708]|\uD83C\uDFFC\u200D[\u2695\u2696\u2708])\uFE0F|\uD83C\uDFFB\u200D(?:\uD83C[\uDF3E\uDF73\uDF93\uDFA4\uDFA8\uDFEB\uDFED]|\uD83D[\uDCBB\uDCBC\uDD27\uDD2C\uDE80\uDE92]|\uD83E[\uDDAF-\uDDB3\uDDBC\uDDBD])|\uD83C[\uDFFB-\uDFFF])|(?:\uD83E\uDDD1\uD83C\uDFFB\u200D\uD83E\uDD1D\u200D\uD83E\uDDD1|\uD83D\uDC69\uD83C\uDFFC\u200D\uD83E\uDD1D\u200D\uD83D\uDC69)\uD83C\uDFFB|\uD83E\uDDD1(?:\uD83C\uDFFF\u200D\uD83E\uDD1D\u200D\uD83E\uDDD1(?:\uD83C[\uDFFB-\uDFFF])|\u200D\uD83E\uDD1D\u200D\uD83E\uDDD1)|(?:\uD83E\uDDD1\uD83C\uDFFE\u200D\uD83E\uDD1D\u200D\uD83E\uDDD1|\uD83D\uDC69\uD83C\uDFFF\u200D\uD83E\uDD1D\u200D(?:\uD83D[\uDC68\uDC69]))(?:\uD83C[\uDFFB-\uDFFE])|(?:\uD83E\uDDD1\uD83C\uDFFC\u200D\uD83E\uDD1D\u200D\uD83E\uDDD1|\uD83D\uDC69\uD83C\uDFFD\u200D\uD83E\uDD1D\u200D\uD83D\uDC69)(?:\uD83C[\uDFFB\uDFFC])|\uD83D\uDC69(?:\uD83C\uDFFE\u200D(?:\uD83E\uDD1D\u200D\uD83D\uDC68(?:\uD83C[\uDFFB-\uDFFD\uDFFF])|\uD83C[\uDF3E\uDF73\uDF93\uDFA4\uDFA8\uDFEB\uDFED]|\uD83D[\uDCBB\uDCBC\uDD27\uDD2C\uDE80\uDE92]|\uD83E[\uDDAF-\uDDB3\uDDBC\uDDBD])|\uD83C\uDFFC\u200D(?:\uD83E\uDD1D\u200D\uD83D\uDC68(?:\uD83C[\uDFFB\uDFFD-\uDFFF])|\uD83C[\uDF3E\uDF73\uDF93\uDFA4\uDFA8\uDFEB\uDFED]|\uD83D[\uDCBB\uDCBC\uDD27\uDD2C\uDE80\uDE92]|\uD83E[\uDDAF-\uDDB3\uDDBC\uDDBD])|\uD83C\uDFFB\u200D(?:\uD83E\uDD1D\u200D\uD83D\uDC68(?:\uD83C[\uDFFC-\uDFFF])|\uD83C[\uDF3E\uDF73\uDF93\uDFA4\uDFA8\uDFEB\uDFED]|\uD83D[\uDCBB\uDCBC\uDD27\uDD2C\uDE80\uDE92]|\uD83E[\uDDAF-\uDDB3\uDDBC\uDDBD])|\uD83C\uDFFD\u200D(?:\uD83E\uDD1D\u200D\uD83D\uDC68(?:\uD83C[\uDFFB\uDFFC\uDFFE\uDFFF])|\uD83C[\uDF3E\uDF73\uDF93\uDFA4\uDFA8\uDFEB\uDFED]|\uD83D[\uDCBB\uDCBC\uDD27\uDD2C\uDE80\uDE92]|\uD83E[\uDDAF-\uDDB3\uDDBC\uDDBD])|\u200D(?:\u2764\uFE0F\u200D(?:\uD83D\uDC8B\u200D(?:\uD83D[\uDC68\uDC69])|\uD83D[\uDC68\uDC69])|\uD83C[\uDF3E\uDF73\uDF93\uDFA4\uDFA8\uDFEB\uDFED]|\uD83D[\uDCBB\uDCBC\uDD27\uDD2C\uDE80\uDE92]|\uD83E[\uDDAF-\uDDB3\uDDBC\uDDBD])|\uD83C\uDFFF\u200D(?:\uD83C[\uDF3E\uDF73\uDF93\uDFA4\uDFA8\uDFEB\uDFED]|\uD83D[\uDCBB\uDCBC\uDD27\uDD2C\uDE80\uDE92]|\uD83E[\uDDAF-\uDDB3\uDDBC\uDDBD]))|\uD83D\uDC69\u200D\uD83D\uDC69\u200D(?:\uD83D\uDC66\u200D\uD83D\uDC66|\uD83D\uDC67\u200D(?:\uD83D[\uDC66\uDC67]))|(?:\uD83E\uDDD1\uD83C\uDFFD\u200D\uD83E\uDD1D\u200D\uD83E\uDDD1|\uD83D\uDC69\uD83C\uDFFE\u200D\uD83E\uDD1D\u200D\uD83D\uDC69)(?:\uD83C[\uDFFB-\uDFFD])|\uD83D\uDC69\u200D\uD83D\uDC66\u200D\uD83D\uDC66|\uD83D\uDC69\u200D\uD83D\uDC69\u200D(?:\uD83D[\uDC66\uDC67])|(?:\uD83D\uDC41\uFE0F\u200D\uD83D\uDDE8|\uD83D\uDC69(?:\uD83C\uDFFF\u200D[\u2695\u2696\u2708]|\uD83C\uDFFE\u200D[\u2695\u2696\u2708]|\uD83C\uDFFC\u200D[\u2695\u2696\u2708]|\uD83C\uDFFB\u200D[\u2695\u2696\u2708]|\uD83C\uDFFD\u200D[\u2695\u2696\u2708]|\u200D[\u2695\u2696\u2708])|(?:(?:\u26F9|\uD83C[\uDFCB\uDFCC]|\uD83D\uDD75)\uFE0F|\uD83D\uDC6F|\uD83E[\uDD3C\uDDDE\uDDDF])\u200D[\u2640\u2642]|(?:\u26F9|\uD83C[\uDFCB\uDFCC]|\uD83D\uDD75)(?:\uD83C[\uDFFB-\uDFFF])\u200D[\u2640\u2642]|(?:\uD83C[\uDFC3\uDFC4\uDFCA]|\uD83D[\uDC6E\uDC71\uDC73\uDC77\uDC81\uDC82\uDC86\uDC87\uDE45-\uDE47\uDE4B\uDE4D\uDE4E\uDEA3\uDEB4-\uDEB6]|\uD83E[\uDD26\uDD37-\uDD39\uDD3D\uDD3E\uDDB8\uDDB9\uDDCD-\uDDCF\uDDD6-\uDDDD])(?:(?:\uD83C[\uDFFB-\uDFFF])\u200D[\u2640\u2642]|\u200D[\u2640\u2642])|\uD83C\uDFF4\u200D\u2620)\uFE0F|\uD83D\uDC69\u200D\uD83D\uDC67\u200D(?:\uD83D[\uDC66\uDC67])|\uD83C\uDFF3\uFE0F\u200D\uD83C\uDF08|\uD83D\uDC15\u200D\uD83E\uDDBA|\uD83D\uDC69\u200D\uD83D\uDC66|\uD83D\uDC69\u200D\uD83D\uDC67|\uD83C\uDDFD\uD83C\uDDF0|\uD83C\uDDF4\uD83C\uDDF2|\uD83C\uDDF6\uD83C\uDDE6|[#\*0-9]\uFE0F\u20E3|\uD83C\uDDE7(?:\uD83C[\uDDE6\uDDE7\uDDE9-\uDDEF\uDDF1-\uDDF4\uDDF6-\uDDF9\uDDFB\uDDFC\uDDFE\uDDFF])|\uD83C\uDDF9(?:\uD83C[\uDDE6\uDDE8\uDDE9\uDDEB-\uDDED\uDDEF-\uDDF4\uDDF7\uDDF9\uDDFB\uDDFC\uDDFF])|\uD83C\uDDEA(?:\uD83C[\uDDE6\uDDE8\uDDEA\uDDEC\uDDED\uDDF7-\uDDFA])|\uD83E\uDDD1(?:\uD83C[\uDFFB-\uDFFF])|\uD83C\uDDF7(?:\uD83C[\uDDEA\uDDF4\uDDF8\uDDFA\uDDFC])|\uD83D\uDC69(?:\uD83C[\uDFFB-\uDFFF])|\uD83C\uDDF2(?:\uD83C[\uDDE6\uDDE8-\uDDED\uDDF0-\uDDFF])|\uD83C\uDDE6(?:\uD83C[\uDDE8-\uDDEC\uDDEE\uDDF1\uDDF2\uDDF4\uDDF6-\uDDFA\uDDFC\uDDFD\uDDFF])|\uD83C\uDDF0(?:\uD83C[\uDDEA\uDDEC-\uDDEE\uDDF2\uDDF3\uDDF5\uDDF7\uDDFC\uDDFE\uDDFF])|\uD83C\uDDED(?:\uD83C[\uDDF0\uDDF2\uDDF3\uDDF7\uDDF9\uDDFA])|\uD83C\uDDE9(?:\uD83C[\uDDEA\uDDEC\uDDEF\uDDF0\uDDF2\uDDF4\uDDFF])|\uD83C\uDDFE(?:\uD83C[\uDDEA\uDDF9])|\uD83C\uDDEC(?:\uD83C[\uDDE6\uDDE7\uDDE9-\uDDEE\uDDF1-\uDDF3\uDDF5-\uDDFA\uDDFC\uDDFE])|\uD83C\uDDF8(?:\uD83C[\uDDE6-\uDDEA\uDDEC-\uDDF4\uDDF7-\uDDF9\uDDFB\uDDFD-\uDDFF])|\uD83C\uDDEB(?:\uD83C[\uDDEE-\uDDF0\uDDF2\uDDF4\uDDF7])|\uD83C\uDDF5(?:\uD83C[\uDDE6\uDDEA-\uDDED\uDDF0-\uDDF3\uDDF7-\uDDF9\uDDFC\uDDFE])|\uD83C\uDDFB(?:\uD83C[\uDDE6\uDDE8\uDDEA\uDDEC\uDDEE\uDDF3\uDDFA])|\uD83C\uDDF3(?:\uD83C[\uDDE6\uDDE8\uDDEA-\uDDEC\uDDEE\uDDF1\uDDF4\uDDF5\uDDF7\uDDFA\uDDFF])|\uD83C\uDDE8(?:\uD83C[\uDDE6\uDDE8\uDDE9\uDDEB-\uDDEE\uDDF0-\uDDF5\uDDF7\uDDFA-\uDDFF])|\uD83C\uDDF1(?:\uD83C[\uDDE6-\uDDE8\uDDEE\uDDF0\uDDF7-\uDDFB\uDDFE])|\uD83C\uDDFF(?:\uD83C[\uDDE6\uDDF2\uDDFC])|\uD83C\uDDFC(?:\uD83C[\uDDEB\uDDF8])|\uD83C\uDDFA(?:\uD83C[\uDDE6\uDDEC\uDDF2\uDDF3\uDDF8\uDDFE\uDDFF])|\uD83C\uDDEE(?:\uD83C[\uDDE8-\uDDEA\uDDF1-\uDDF4\uDDF6-\uDDF9])|\uD83C\uDDEF(?:\uD83C[\uDDEA\uDDF2\uDDF4\uDDF5])|(?:\uD83C[\uDFC3\uDFC4\uDFCA]|\uD83D[\uDC6E\uDC71\uDC73\uDC77\uDC81\uDC82\uDC86\uDC87\uDE45-\uDE47\uDE4B\uDE4D\uDE4E\uDEA3\uDEB4-\uDEB6]|\uD83E[\uDD26\uDD37-\uDD39\uDD3D\uDD3E\uDDB8\uDDB9\uDDCD-\uDDCF\uDDD6-\uDDDD])(?:\uD83C[\uDFFB-\uDFFF])|(?:\u26F9|\uD83C[\uDFCB\uDFCC]|\uD83D\uDD75)(?:\uD83C[\uDFFB-\uDFFF])|(?:[\u261D\u270A-\u270D]|\uD83C[\uDF85\uDFC2\uDFC7]|\uD83D[\uDC42\uDC43\uDC46-\uDC50\uDC66\uDC67\uDC6B-\uDC6D\uDC70\uDC72\uDC74-\uDC76\uDC78\uDC7C\uDC83\uDC85\uDCAA\uDD74\uDD7A\uDD90\uDD95\uDD96\uDE4C\uDE4F\uDEC0\uDECC]|\uD83E[\uDD0F\uDD18-\uDD1C\uDD1E\uDD1F\uDD30-\uDD36\uDDB5\uDDB6\uDDBB\uDDD2-\uDDD5])(?:\uD83C[\uDFFB-\uDFFF])|(?:[\u231A\u231B\u23E9-\u23EC\u23F0\u23F3\u25FD\u25FE\u2614\u2615\u2648-\u2653\u267F\u2693\u26A1\u26AA\u26AB\u26BD\u26BE\u26C4\u26C5\u26CE\u26D4\u26EA\u26F2\u26F3\u26F5\u26FA\u26FD\u2705\u270A\u270B\u2728\u274C\u274E\u2753-\u2755\u2757\u2795-\u2797\u27B0\u27BF\u2B1B\u2B1C\u2B50\u2B55]|\uD83C[\uDC04\uDCCF\uDD8E\uDD91-\uDD9A\uDDE6-\uDDFF\uDE01\uDE1A\uDE2F\uDE32-\uDE36\uDE38-\uDE3A\uDE50\uDE51\uDF00-\uDF20\uDF2D-\uDF35\uDF37-\uDF7C\uDF7E-\uDF93\uDFA0-\uDFCA\uDFCF-\uDFD3\uDFE0-\uDFF0\uDFF4\uDFF8-\uDFFF]|\uD83D[\uDC00-\uDC3E\uDC40\uDC42-\uDCFC\uDCFF-\uDD3D\uDD4B-\uDD4E\uDD50-\uDD67\uDD7A\uDD95\uDD96\uDDA4\uDDFB-\uDE4F\uDE80-\uDEC5\uDECC\uDED0-\uDED2\uDED5\uDEEB\uDEEC\uDEF4-\uDEFA\uDFE0-\uDFEB]|\uD83E[\uDD0D-\uDD3A\uDD3C-\uDD45\uDD47-\uDD71\uDD73-\uDD76\uDD7A-\uDDA2\uDDA5-\uDDAA\uDDAE-\uDDCA\uDDCD-\uDDFF\uDE70-\uDE73\uDE78-\uDE7A\uDE80-\uDE82\uDE90-\uDE95])|(?:[#\*0-9\xA9\xAE\u203C\u2049\u2122\u2139\u2194-\u2199\u21A9\u21AA\u231A\u231B\u2328\u23CF\u23E9-\u23F3\u23F8-\u23FA\u24C2\u25AA\u25AB\u25B6\u25C0\u25FB-\u25FE\u2600-\u2604\u260E\u2611\u2614\u2615\u2618\u261D\u2620\u2622\u2623\u2626\u262A\u262E\u262F\u2638-\u263A\u2640\u2642\u2648-\u2653\u265F\u2660\u2663\u2665\u2666\u2668\u267B\u267E\u267F\u2692-\u2697\u2699\u269B\u269C\u26A0\u26A1\u26AA\u26AB\u26B0\u26B1\u26BD\u26BE\u26C4\u26C5\u26C8\u26CE\u26CF\u26D1\u26D3\u26D4\u26E9\u26EA\u26F0-\u26F5\u26F7-\u26FA\u26FD\u2702\u2705\u2708-\u270D\u270F\u2712\u2714\u2716\u271D\u2721\u2728\u2733\u2734\u2744\u2747\u274C\u274E\u2753-\u2755\u2757\u2763\u2764\u2795-\u2797\u27A1\u27B0\u27BF\u2934\u2935\u2B05-\u2B07\u2B1B\u2B1C\u2B50\u2B55\u3030\u303D\u3297\u3299]|\uD83C[\uDC04\uDCCF\uDD70\uDD71\uDD7E\uDD7F\uDD8E\uDD91-\uDD9A\uDDE6-\uDDFF\uDE01\uDE02\uDE1A\uDE2F\uDE32-\uDE3A\uDE50\uDE51\uDF00-\uDF21\uDF24-\uDF93\uDF96\uDF97\uDF99-\uDF9B\uDF9E-\uDFF0\uDFF3-\uDFF5\uDFF7-\uDFFF]|\uD83D[\uDC00-\uDCFD\uDCFF-\uDD3D\uDD49-\uDD4E\uDD50-\uDD67\uDD6F\uDD70\uDD73-\uDD7A\uDD87\uDD8A-\uDD8D\uDD90\uDD95\uDD96\uDDA4\uDDA5\uDDA8\uDDB1\uDDB2\uDDBC\uDDC2-\uDDC4\uDDD1-\uDDD3\uDDDC-\uDDDE\uDDE1\uDDE3\uDDE8\uDDEF\uDDF3\uDDFA-\uDE4F\uDE80-\uDEC5\uDECB-\uDED2\uDED5\uDEE0-\uDEE5\uDEE9\uDEEB\uDEEC\uDEF0\uDEF3-\uDEFA\uDFE0-\uDFEB]|\uD83E[\uDD0D-\uDD3A\uDD3C-\uDD45\uDD47-\uDD71\uDD73-\uDD76\uDD7A-\uDDA2\uDDA5-\uDDAA\uDDAE-\uDDCA\uDDCD-\uDDFF\uDE70-\uDE73\uDE78-\uDE7A\uDE80-\uDE82\uDE90-\uDE95])\uFE0F|(?:[\u261D\u26F9\u270A-\u270D]|\uD83C[\uDF85\uDFC2-\uDFC4\uDFC7\uDFCA-\uDFCC]|\uD83D[\uDC42\uDC43\uDC46-\uDC50\uDC66-\uDC78\uDC7C\uDC81-\uDC83\uDC85-\uDC87\uDC8F\uDC91\uDCAA\uDD74\uDD75\uDD7A\uDD90\uDD95\uDD96\uDE45-\uDE47\uDE4B-\uDE4F\uDEA3\uDEB4-\uDEB6\uDEC0\uDECC]|\uD83E[\uDD0F\uDD18-\uDD1F\uDD26\uDD30-\uDD39\uDD3C-\uDD3E\uDDB5\uDDB6\uDDB8\uDDB9\uDDBB\uDDCD-\uDDCF\uDDD1-\uDDDD])/g},mp=e=>{if("string"!=typeof e||0===e.length)return 0;if(0===(e=pp(e)).length)return 0;e=e.replace(dp()," ");let t=0;for(let n=0;n<e.length;n++){const i=e.codePointAt(n);i<=31||i>=127&&i<=159||(i>=768&&i<=879||(i>65535&&n++,t+=lp(i)?2:1))}return t};rp.exports=mp,rp.exports.default=mp;var fp=function(e,t,n){if(!0!==t.autopadding)return e;return"percentage"===n?(i=e,(t.autopaddingChar+i).slice(-3)):e;var i},hp=function(e,t){const n=Math.round(e*t.barsize),i=t.barsize-n;return t.barCompleteString.substr(0,n)+t.barGlue+t.barIncompleteString.substr(0,i)},vp=function(e,t,n){function i(e){return n?n*Math.round(e/n):e}function a(e){return(t.autopaddingChar+e).slice(-2)}return e>3600?a(Math.floor(e/3600))+"h"+a(i(e%3600/60))+"m":e>60?a(Math.floor(e/60))+"m"+a(i(e%60))+"s":e>10?a(i(e))+"s":a(e)+"s"};const xp=rp.exports,gp=fp,bp=hp,yp=vp;var Dp=function(e,t,n){let i=e.format;const a=e.formatTime||yp,o=e.formatValue||gp,r=e.formatBar||bp,s=Math.floor(100*t.progress)+"",c=t.stopTime||Date.now(),u=Math.round((c-t.startTime)/1e3),p=Object.assign({},n,{bar:r(t.progress,e),percentage:o(s,e,"percentage"),total:o(t.total,e,"total"),value:o(t.value,e,"value"),eta:o(t.eta,e,"eta"),eta_formatted:a(t.eta,e,5),duration:o(u,e,"duration"),duration_formatted:a(u,e,1)});i=i.replace(/\{(\w+)\}/g,function(e,t){return void 0!==p[t]?p[t]:e});const l=Math.max(0,t.maxWidth-xp(i)-2),d=Math.floor(l/2);switch(e.align){case"right":i=l>0?" ".repeat(l)+i:i;break;case"center":i=d>0?" ".repeat(d)+i:i}return i};function wp(e,t){return null==e?t:e}var _p={parse:function(e,t){const n={},i=Object.assign({},t,e);return n.throttleTime=1e3/wp(i.fps,10),n.stream=wp(i.stream,process.stderr),n.terminal=wp(i.terminal,null),n.clearOnComplete=wp(i.clearOnComplete,!1),n.stopOnComplete=wp(i.stopOnComplete,!1),n.barsize=wp(i.barsize,40),n.align=wp(i.align,"left"),n.hideCursor=wp(i.hideCursor,!1),n.linewrap=wp(i.linewrap,!1),n.barGlue=wp(i.barGlue,""),n.barCompleteChar=wp(i.barCompleteChar,"="),n.barIncompleteChar=wp(i.barIncompleteChar,"-"),n.format=wp(i.format,"progress [{bar}] {percentage}% | ETA: {eta}s | {value}/{total}"),n.formatTime=wp(i.formatTime,null),n.formatValue=wp(i.formatValue,null),n.formatBar=wp(i.formatBar,null),n.etaBufferLength=wp(i.etaBuffer,10),n.etaAsynchronousUpdate=wp(i.etaAsynchronousUpdate,!1),n.progressCalculationRelative=wp(i.progressCalculationRelative,!1),n.synchronousUpdate=wp(i.synchronousUpdate,!0),n.noTTYOutput=wp(i.noTTYOutput,!1),n.notTTYSchedule=wp(i.notTTYSchedule,2e3),n.emptyOnZero=wp(i.emptyOnZero,!1),n.forceRedraw=wp(i.forceRedraw,!1),n.autopadding=wp(i.autopadding,!1),n.gracefulExit=wp(i.gracefulExit,!1),n},assignDerivedOptions:function(e){return e.barCompleteString=e.barCompleteChar.repeat(e.barsize+1),e.barIncompleteString=e.barIncompleteChar.repeat(e.barsize+1),e.autopaddingChar=e.autopadding?wp(e.autopaddingChar," "):"",e}};const Ep=ip,Cp=op,Fp=Dp,Tp=_p,Ap=h;var kp=class extends Ap{constructor(e){super(),this.options=Tp.assignDerivedOptions(e),this.terminal=this.options.terminal?this.options.terminal:new Cp(this.options.stream),this.value=0,this.startValue=0,this.total=100,this.lastDrawnString=null,this.startTime=null,this.stopTime=null,this.lastRedraw=Date.now(),this.eta=new Ep(this.options.etaBufferLength,0,0),this.payload={},this.isActive=!1,this.formatter="function"==typeof this.options.format?this.options.format:Fp}render(e=!1){const t={progress:this.getProgress(),eta:this.eta.getTime(),startTime:this.startTime,stopTime:this.stopTime,total:this.total,value:this.value,maxWidth:this.terminal.getWidth()};this.options.etaAsynchronousUpdate&&this.updateETA();const n=this.formatter(this.options,t,this.payload);(e||this.options.forceRedraw||this.options.noTTYOutput&&!this.terminal.isTTY()||this.lastDrawnString!=n)&&(this.emit("redraw-pre"),this.terminal.cursorTo(0,null),this.terminal.write(n),this.terminal.clearRight(),this.lastDrawnString=n,this.lastRedraw=Date.now(),this.emit("redraw-post"))}start(e,t,n){this.value=t||0,this.total=void 0!==e&&e>=0?e:100,this.startValue=t||0,this.payload=n||{},this.startTime=Date.now(),this.stopTime=null,this.lastDrawnString="",this.eta=new Ep(this.options.etaBufferLength,this.startTime,this.value),this.isActive=!0,this.emit("start",e,t)}stop(){this.isActive=!1,this.stopTime=Date.now(),this.emit("stop",this.total,this.value)}update(e,t={}){"number"==typeof e&&(this.value=e,this.eta.update(Date.now(),e,this.total));const n=("object"==typeof e?e:t)||{};this.emit("update",this.total,this.value);for(const e in n)this.payload[e]=n[e];this.value>=this.getTotal()&&this.options.stopOnComplete&&this.stop()}getProgress(){let e=this.value/this.total;return this.options.progressCalculationRelative&&(e=(this.value-this.startValue)/(this.total-this.startValue)),isNaN(e)&&(e=this.options&&this.options.emptyOnZero?0:1),e=Math.min(Math.max(e,0),1),e}increment(e=1,t={}){"object"==typeof e?this.update(this.value+1,e):this.update(this.value+e,t)}getTotal(){return this.total}setTotal(e){void 0!==e&&e>=0&&(this.total=e)}updateETA(){this.eta.update(Date.now(),this.value,this.total)}};const jp=kp,Sp=_p;const Op=op,Rp=kp,Bp=_p,Pp=h;var Ip={legacy:{format:"progress [{bar}] {percentage}% | ETA: {eta}s | {value}/{total}",barCompleteChar:"=",barIncompleteChar:"-"},shades_classic:{format:" {bar} {percentage}% | ETA: {eta}s | {value}/{total}",barCompleteChar:"█",barIncompleteChar:"░"},shades_grey:{format:" [90m{bar}[0m {percentage}% | ETA: {eta}s | {value}/{total}",barCompleteChar:"█",barIncompleteChar:"░"},rect:{format:" {bar}■ {percentage}% | ETA: {eta}s | {value}/{total}",barCompleteChar:"■",barIncompleteChar:" "}};const Np=class extends jp{constructor(e,t){super(Sp.parse(e,t)),this.timer=null,this.options.noTTYOutput&&!1===this.terminal.isTTY()&&(this.options.synchronousUpdate=!1),this.schedulingRate=this.terminal.isTTY()?this.options.throttleTime:this.options.notTTYSchedule,this.sigintCallback=null}render(){this.timer&&(clearTimeout(this.timer),this.timer=null),super.render(),this.options.noTTYOutput&&!1===this.terminal.isTTY()&&this.terminal.newline(),this.timer=setTimeout(this.render.bind(this),this.schedulingRate)}update(e,t){this.timer&&(super.update(e,t),this.options.synchronousUpdate&&this.lastRedraw+2*this.options.throttleTime<Date.now()&&this.render())}start(e,t,n){!1===this.options.noTTYOutput&&!1===this.terminal.isTTY()||(null===this.sigintCallback&&this.options.gracefulExit&&(this.sigintCallback=this.stop.bind(this),process.once("SIGINT",this.sigintCallback),process.once("SIGTERM",this.sigintCallback)),this.terminal.cursorSave(),!0===this.options.hideCursor&&this.terminal.cursor(!1),!1===this.options.linewrap&&this.terminal.lineWrapping(!1),super.start(e,t,n),this.render())}stop(){this.timer&&(this.sigintCallback&&(process.removeListener("SIGINT",this.sigintCallback),process.removeListener("SIGTERM",this.sigintCallback),this.sigintCallback=null),this.render(),super.stop(),clearTimeout(this.timer),this.timer=null,!0===this.options.hideCursor&&this.terminal.cursor(!0),!1===this.options.linewrap&&this.terminal.lineWrapping(!0),this.terminal.cursorRestore(),this.options.clearOnComplete?(this.terminal.cursorTo(0,null),this.terminal.clearLine()):this.terminal.newline())}},Lp=class extends Pp{constructor(e,t){super(),this.bars=[],this.options=Bp.parse(e,t),this.options.synchronousUpdate=!1,this.terminal=this.options.terminal?this.options.terminal:new Op(this.options.stream),this.timer=null,this.isActive=!1,this.schedulingRate=this.terminal.isTTY()?this.options.throttleTime:this.options.notTTYSchedule,this.loggingBuffer=[],this.sigintCallback=null}create(e,t,n,i={}){const a=new Rp(Object.assign({},this.options,{terminal:this.terminal},i));return this.bars.push(a),!1===this.options.noTTYOutput&&!1===this.terminal.isTTY()||(null===this.sigintCallback&&this.options.gracefulExit&&(this.sigintCallback=this.stop.bind(this),process.once("SIGINT",this.sigintCallback),process.once("SIGTERM",this.sigintCallback)),this.isActive||(!0===this.options.hideCursor&&this.terminal.cursor(!1),!1===this.options.linewrap&&this.terminal.lineWrapping(!1),this.timer=setTimeout(this.update.bind(this),this.schedulingRate)),this.isActive=!0,a.start(e,t,n),this.emit("start")),a}remove(e){const t=this.bars.indexOf(e);return!(t<0)&&(this.bars.splice(t,1),this.update(),this.terminal.newline(),this.terminal.clearBottom(),!0)}update(){if(this.timer&&(clearTimeout(this.timer),this.timer=null),this.emit("update-pre"),this.terminal.cursorRelativeReset(),this.emit("redraw-pre"),this.loggingBuffer.length>0)for(this.terminal.clearLine();this.loggingBuffer.length>0;)this.terminal.write(this.loggingBuffer.shift(),!0);for(let e=0;e<this.bars.length;e++)e>0&&this.terminal.newline(),this.bars[e].render();this.emit("redraw-post"),this.options.noTTYOutput&&!1===this.terminal.isTTY()&&(this.terminal.newline(),this.terminal.newline()),this.timer=setTimeout(this.update.bind(this),this.schedulingRate),this.emit("update-post"),this.options.stopOnComplete&&!this.bars.find(e=>e.isActive)&&this.stop()}stop(){if(clearTimeout(this.timer),this.timer=null,this.sigintCallback&&(process.removeListener("SIGINT",this.sigintCallback),process.removeListener("SIGTERM",this.sigintCallback),this.sigintCallback=null),this.isActive=!1,!0===this.options.hideCursor&&this.terminal.cursor(!0),!1===this.options.linewrap&&this.terminal.lineWrapping(!0),this.terminal.cursorRelativeReset(),this.emit("stop-pre-clear"),this.options.clearOnComplete)this.terminal.clearBottom();else{for(let e=0;e<this.bars.length;e++)e>0&&this.terminal.newline(),this.bars[e].render(),this.bars[e].stop();this.terminal.newline()}this.emit("stop")}log(e){this.loggingBuffer.push(e)}};var Up={Bar:Np,SingleBar:Np,MultiBar:Lp,Presets:Ip,Format:{Formatter:Dp,BarFormat:hp,ValueFormat:fp,TimeFormat:vp}};const zp=(e,t)=>"flaky"===e?e:t,qp=async(e,{url:t,headers:n},i)=>{const a=e.byteLength/1024>1024?"MB":"KB";const o=new Up.Bar({format:`Uploading ${i} [{bar}] | {value}/{total} ${a} - ETA: {eta_formatted}`,clearOnComplete:!0},Up.Presets.rect);return o.start(np(e.byteLength,a),0),await((e,{url:t,headers:n},i)=>yu(()=>Zu.put(t,e,{...i,headers:n,timeout:0})))(e,{url:t,headers:n},{onUploadProgress:e=>{e.total&&e.lengthComputable&&o.update(np(e.loaded,a))}}),o};var Mp,Hp,$p={exports:{}};
|
|
9
|
-
/*! https://mths.be/wtf8 v1.0.1 by @mathias */Mp=$p,Hp=$p.exports,function(e){var t=Hp,n=Mp&&Mp.exports==t&&Mp,i="object"==typeof E&&E;i.global!==i&&i.window!==i||(e=i);var a,o,r,s=String.fromCharCode;function c(e){for(var t,n,i=[],a=0,o=e.length;a<o;)(t=e.charCodeAt(a++))>=55296&&t<=56319&&a<o?56320==(64512&(n=e.charCodeAt(a++)))?i.push(((1023&t)<<10)+(1023&n)+65536):(i.push(t),a--):i.push(t);return i}function u(e,t){return s(e>>t&63|128)}function p(e){if(!(4294967168&e))return s(e);var t="";return 4294965248&e?4294901760&e?4292870144&e||(t=s(e>>18&7|240),t+=u(e,12),t+=u(e,6)):(t=s(e>>12&15|224),t+=u(e,6)):t=s(e>>6&31|192),t+=s(63&e|128)}function l(){if(r>=o)throw Error("Invalid byte index");var e=255&a[r];if(r++,128==(192&e))return 63&e;throw Error("Invalid continuation byte")}function d(){var e,t;if(r>o)throw Error("Invalid byte index");if(r==o)return!1;if(e=255&a[r],r++,!(128&e))return e;if(192==(224&e)){if((t=(31&e)<<6|l())>=128)return t;throw Error("Invalid continuation byte")}if(224==(240&e)){if((t=(15&e)<<12|l()<<6|l())>=2048)return t;throw Error("Invalid continuation byte")}if(240==(248&e)&&(t=(15&e)<<18|l()<<12|l()<<6|l())>=65536&&t<=1114111)return t;throw Error("Invalid WTF-8 detected")}var m={version:"1.0.1",encode:function(e){for(var t=c(e),n=t.length,i=-1,a="";++i<n;)a+=p(t[i]);return a},decode:function(e){a=c(e),o=a.length,r=0;for(var t,n=[];!1!==(t=d());)n.push(t);return function(e){for(var t,n=e.length,i=-1,a="";++i<n;)(t=e[i])>65535&&(a+=s((t-=65536)>>>10&1023|55296),t=56320|1023&t),a+=s(t);return a}(n)}};if(t&&!t.nodeType)if(n)n.exports=m;else{var f={}.hasOwnProperty;for(var h in m)f.call(m,h)&&(t[h]=m[h])}else e.wtf8=m}(E);var Gp=$p.exports;const Kp=async(e,t,{status:i,duration:a,errors:o,error:r,retry:s,attachments:u})=>{var p;const l=new Date,{currentShard:d,rootDir:m,ciBuildId:f}=e,{title:h,repeatEachIndex:v}=t,{historyId:x}=Au(t,m),g=t.outcome(),b=Yt(s,v),y={shard:d,isExpected:"expected"===g,repeatEachIndex:v,status:zp(g,i)};try{e.pendingTestEnds.add(Yt(x,b));const t={outcome:y,status:i,duration:a,log:Gp.encode(o.map(e=>{var t;return(null!==(t=e.message)&&void 0!==t?t:"").replace(/[\uD800-\uDFFF]/g,"?")}).join("\n")),screenshots:[],videos:[],traces:[],lighthouses:[],completedAt:l.toString(),errorSnippet:r&&ep(r)};if(e.shouldNotReportTest)return;const s=Yt(x,b);if(e.startedAttempts.has(s)||(N.warning(`Waiting for attempt to be started: ${h} (${x}-${b})`),await Wt(()=>e.startedAttempts.has(s)),e.startedAttempts.has(s)||N.error(`Attempt was never started for test "${h}" (${x}-${b}). This test cannot be reported.`)),e.shouldNotReportTest)return;N.underline(h);const p=u.map(({name:e,path:t,body:i,contentType:a})=>{if(Qu.includes(e))try{const o=t?n.readFileSync(t):i,r=((e,t,n)=>(null!=e?e:`${t}.${n.split("/")[1]}`).replaceAll("/","-"))(t,e,a),{file:s,...u}=((e,t,n)=>{const i=e.byteLength;return{file:e,filename:n,checksum:c.createHash("md5").update(Uint8Array.from(e)).digest("base64"),byteSize:i,contentType:t}})(o,a,r);return{file:s,metadata:u,name:e}}catch(n){const i=n instanceof Error?n.message:String(n);return void N.yellowText(`Skipping missing file: ${t||e} - ${i}`)}}).filter(Mt(void 0)),d={metadata:ge("metadata",p)};N.warning(`Requesting direct upload URLs for ${p.length} file(s): ${h}`);const m=Date.now(),{data:v}=await(({ciBuildId:e,historyId:t},n)=>yu(()=>Lc.post(`/api/v2/reporter/runs/${e}/test_entities/${t}/direct_uploads`,{blob:n}),{additionalRetryStatusCodes:[422]}))({ciBuildId:e.ciBuildId,historyId:x},d);N.warning(`Received direct upload URLs in ${Date.now()-m}ms: ${h}`);const g=Date.now(),D=await Promise.all(v.map(async({signedId:e,directUpload:n},i)=>{var a,o;return t[`${null===(a=p[i])||void 0===a?void 0:a.name}s`].push(e),qp(p[i].file,n,`${h} - ${null===(o=p[i])||void 0===o?void 0:o.name}`)}));e.progressBars.push(...D),qt(p)&&N.warning(`Uploaded ${p.length} file(s) in ${Date.now()-g}ms: ${h}`),N.warning(`Reporting test result to server: ${h} (${x}-${b})`);const w=Date.now(),_=Ou({ciBuildId:f,historyId:x,id:e.attempts[x][b],payload:t});e.testResultCalls.push(_),await _,N.warning(`Test result reported in ${Date.now()-w}ms: ${h}`)}catch(r){await Zt({context:{historyId:x,attemptIndex:b,title:h,status:i,outcome:y,duration:a,completedAt:l},error:r,title:"onTestEnd"}),N.error(r.message),N.error(O.failedToReportTest(h,x)),await(null===(p=e.heartbeatManager)||void 0===p?void 0:p.sendImmediateHeartbeat())}finally{N.log(ru.reportedTest({title:h,status:i,historyId:x,completedAt:l,error:r&&`${ep(r)}\n\n${Gp.encode(o.map(e=>{var t;return(null!==(t=e.message)&&void 0!==t?t:"").replace(/[\uD800-\uDFFF]/g,"?")}).join("\n"))}`,isTestReported:!e.shouldNotReportTest,retry:s,repeatEachIndex:v})),e.pendingTestEnds.delete(Yt(x,b)),e.startedAttempts.delete(Yt(x,b))}},Wp=g.extend({generateLighthouseMetaData:async({},e,t)=>{let n=0;const{title:i,outputDir:a}=t;await e(()=>{const e=i.replace(/[:]/g,"_");return{formats:{html:!0},name:n?e:`${e}-${n++}`,directory:a,get pathToLightHouseHTMLReport(){return`${a}/${this.name}.html`}}})},attachLighthouseReport:async({},e,t)=>{await e(async e=>{e.endsWith(".html")?await t.attach("lighthouse",{path:e,contentType:"text/html"}):N.redText(P.attachLightHouseReport.unsupportedFileType(e))})}}),Vp=(e,t)=>{b.setDefaultResultOrder("ipv4first");Xu({projectKey:t.projectKey||process.env.NEETO_PROJECT_KEY||"",baseURL:t.baseURL||process.env.NEETO_PLAYDASH_API_BASE_URL||"",apiKey:t.apiKey||process.env.NEETO_API_KEY||"",ciBuildId:t.ciBuildId||process.env.NEETO_CI_BUILD_ID||""}),process.on("unhandledRejection",async t=>{var n,i,a;try{const o=null===(n=t.response)||void 0===n?void 0:n.data;await Zt({context:{},error:t,title:"unhandledRejection"}),await(async e=>{try{await Eu(e)}catch(e){N.error(e.message),N.error(JSON.stringify(e,null,4)),N.redText(R.stopped),process.exit(1)}})(e.ciBuildId),N.error(null!==(a=null!==(i=null==o?void 0:o.error)&&void 0!==i?i:t.message)&&void 0!==a?a:JSON.stringify(t))}catch(t){N.error("Honeybadger failed :(")}})};exports.default=class{constructor(e){var t;this.reportLifecycleError=async(e,t,n={})=>{var i,a,o;let r=null;t instanceof zc&&(r=null!==(o=null===(a=null===(i=null==t?void 0:t.response)||void 0===i?void 0:i.data)||void 0===a?void 0:a.error)&&void 0!==o?o:null==t?void 0:t.message),N.error(`${e} failed: ${null!=r?r:String(t)}`),await Zt({context:{lifecycle:e,ciBuildId:this.ciBuildId,...n},error:t,title:`${e} - Fire and Forget Handler`})},this.onBegin=(e,t)=>{ju(this,e,t).catch(t=>this.reportLifecycleError("onBegin",t,{configDetails:JSON.stringify(e,null,2)}))},this.onTestBegin=(e,t)=>{(async(e,t,{retry:n})=>{var i,a,o;const{title:r,repeatEachIndex:s}=t,{rootDir:c,currentShard:u,ciBuildId:p}=e,{historyId:l}=Au(t,c),d=(new Date).toString(),m=Yt(n,s);if(e.shouldNotReportTest)N.invertBackground(ou.startingTest({titlePath:r,historyId:l,retry:n,repeatEachIndex:s}));else try{if(e.pendingTestBegins.add(Yt(l,m)),await Wt(()=>{var t,n;const i=qt(e.attempts),a=ze(null===(n=null===(t=e.attempts)||void 0===t?void 0:t[l])||void 0===n?void 0:n["0-0"]);return i&&a}),N.invertBackground(ou.startingTest({titlePath:r,historyId:l,retry:n,repeatEachIndex:s})),e.shouldNotReportTest)return;const t={status:"running",startedAt:d,shard:u,repeatEachIndex:s};if(0===n&&0===s)await Ou({ciBuildId:p,historyId:l,id:null===(a=null===(i=e.attempts)||void 0===i?void 0:i[l])||void 0===a?void 0:a["0-0"],payload:t});else{const{data:{attemptId:n}}=await Su(p,l,t);e.attempts=He(e.attempts,{[l]:{[m]:n}})}}catch(t){await Zt({context:{historyId:l,attemptIndex:m,title:r},error:t,title:"onTestBegin"}),N.error(t.message),N.error(j.failedToReportTest(r,l)),await(null===(o=e.heartbeatManager)||void 0===o?void 0:o.sendImmediateHeartbeat())}finally{e.pendingTestBegins.delete(Yt(l,m)),e.startedAttempts.add(Yt(l,m))}})(this,e,t).catch(t=>this.reportLifecycleError("onTestBegin",t,{testTitle:e.title,testLocation:e.location}))},this.onTestEnd=(e,t)=>{Kp(this,e,t).catch(n=>this.reportLifecycleError("onTestEnd",n,{testTitle:e.title,testLocation:e.location,testStatus:t.status,testDuration:t.duration}))},this.onEnd=e=>(async(e,{status:t,duration:n})=>{var i,a,o,r;const{currentShard:s}=e;let c=null;try{if(await Wt(()=>{const t=e.hasRunStarted||e.shouldNotReportTest,n=0===e.pendingTestBegins.size,i=0===e.pendingTestEnds.size,a=0===e.startedAttempts.size;return t&&n&&i&&a}),N.bold(su.finalStatus({currentShard:s,status:t,duration:n})),e.shouldNotReportTest)return;if(0===e.totalTestCount)return void await _u(e.ciBuildId,{shards:Gt({currentShard:s,status:"passed",duration:n})});await Promise.allSettled(e.testResultCalls);const a=await _u(e.ciBuildId,{shards:Gt({currentShard:s,status:t,duration:n})});c=null===(i=null==a?void 0:a.data)||void 0===i?void 0:i.dashboardUrl}catch(e){const i=null===(a=e.response)||void 0===a?void 0:a.data;await Zt({context:{runStatus:t,runDuration:n},error:e,title:"onEnd"}),N.error(null!==(o=i.error)&&void 0!==o?o:e.message),N.error(S.failedToReportRunStatus)}finally{e.shouldNotReportTest||0===e.totalTestCount||(N.invertBackground(su.runReported),c&&(N.underline(su.dashboardUrlHeader),N.log(c))),null===(r=e.heartbeatManager)||void 0===r||r.stop()}})(this,e);const n={projectKey:e.projectKey||process.env.NEETO_PROJECT_KEY||"",baseURL:e.baseURL||process.env.NEETO_PLAYDASH_API_BASE_URL||"",apiKey:e.apiKey||process.env.NEETO_API_KEY||"",ciBuildId:e.ciBuildId||process.env.NEETO_CI_BUILD_ID||"",tags:e.tags,title:e.title,commitId:e.commitId,author:e.author,branch:e.branch};this.attempts={},this.tags=n.tags,this.ciBuildId=n.ciBuildId,this.title=n.title,this.commitId=n.commitId,this.author=n.author,this.branch=n.branch,this.testResultCalls=[],this.totalTestCount=0,this.hasRunStarted=!1,this.heartbeatManager=null,this.rootDir="",this.currentShard=0,this.progressBars=[],this.startedAttempts=new Set,this.shouldNotReportTest=!1,this.pendingTestBegins=new Set,this.pendingTestEnds=new Set,this.apiKey=n.apiKey,A.configure({apiKey:Jt("9d5d98e72929dae3c8b3701f50032da1a02b80f9dc29a8e448a601871e5c82fd0ac2fa33c46443709cdb3eabc54a06ab"),environment:(null===(t=null==n?void 0:n.baseURL)||void 0===t?void 0:t.includes(".net"))?"staging":"production"}),A.setContext({...n,reporterVersion:Qt()}),Vp(this,n)}onStdOut(e,t){t&&N.bold(`Log from test "${t.title}"`),N.log(e.toString())}},exports.test=Wp;
|
|
9
|
+
/*! https://mths.be/wtf8 v1.0.1 by @mathias */Mp=$p,Hp=$p.exports,function(e){var t=Hp,n=Mp&&Mp.exports==t&&Mp,i="object"==typeof E&&E;i.global!==i&&i.window!==i||(e=i);var a,o,r,s=String.fromCharCode;function c(e){for(var t,n,i=[],a=0,o=e.length;a<o;)(t=e.charCodeAt(a++))>=55296&&t<=56319&&a<o?56320==(64512&(n=e.charCodeAt(a++)))?i.push(((1023&t)<<10)+(1023&n)+65536):(i.push(t),a--):i.push(t);return i}function u(e,t){return s(e>>t&63|128)}function p(e){if(!(4294967168&e))return s(e);var t="";return 4294965248&e?4294901760&e?4292870144&e||(t=s(e>>18&7|240),t+=u(e,12),t+=u(e,6)):(t=s(e>>12&15|224),t+=u(e,6)):t=s(e>>6&31|192),t+=s(63&e|128)}function l(){if(r>=o)throw Error("Invalid byte index");var e=255&a[r];if(r++,128==(192&e))return 63&e;throw Error("Invalid continuation byte")}function d(){var e,t;if(r>o)throw Error("Invalid byte index");if(r==o)return!1;if(e=255&a[r],r++,!(128&e))return e;if(192==(224&e)){if((t=(31&e)<<6|l())>=128)return t;throw Error("Invalid continuation byte")}if(224==(240&e)){if((t=(15&e)<<12|l()<<6|l())>=2048)return t;throw Error("Invalid continuation byte")}if(240==(248&e)&&(t=(15&e)<<18|l()<<12|l()<<6|l())>=65536&&t<=1114111)return t;throw Error("Invalid WTF-8 detected")}var m={version:"1.0.1",encode:function(e){for(var t=c(e),n=t.length,i=-1,a="";++i<n;)a+=p(t[i]);return a},decode:function(e){a=c(e),o=a.length,r=0;for(var t,n=[];!1!==(t=d());)n.push(t);return function(e){for(var t,n=e.length,i=-1,a="";++i<n;)(t=e[i])>65535&&(a+=s((t-=65536)>>>10&1023|55296),t=56320|1023&t),a+=s(t);return a}(n)}};if(t&&!t.nodeType)if(n)n.exports=m;else{var f={}.hasOwnProperty;for(var h in m)f.call(m,h)&&(t[h]=m[h])}else e.wtf8=m}(E);var Gp=$p.exports;const Kp=async(e,t,{status:i,duration:a,errors:o,error:r,retry:s,attachments:u})=>{var p;const l=new Date,{currentShard:d,rootDir:m,ciBuildId:f}=e,{title:h,repeatEachIndex:v}=t,{historyId:x}=Au(t,m),g=t.outcome(),b=Yt(s,v),y={shard:d,isExpected:"expected"===g,repeatEachIndex:v,status:zp(g,i)};try{e.pendingTestEnds.add(Yt(x,b));const t={outcome:y,status:i,duration:a,log:Gp.encode(o.map(e=>{var t;return(null!==(t=e.message)&&void 0!==t?t:"").replace(/[\uD800-\uDFFF]/g,"?")}).join("\n")),screenshots:[],videos:[],traces:[],lighthouses:[],completedAt:l.toString(),errorSnippet:r&&ep(r)};if(e.shouldNotReportTest)return;const s=Yt(x,b);if(e.startedAttempts.has(s)||(N.warning(`Waiting for attempt to be started: ${h} (${x}-${b})`),await Wt(()=>e.startedAttempts.has(s)),e.startedAttempts.has(s)||N.error(`Attempt was never started for test "${h}" (${x}-${b}). This test cannot be reported.`)),e.shouldNotReportTest)return;N.underline(h);const p=u.map(({name:e,path:t,body:i,contentType:a})=>{if(Qu.includes(e))try{const o=t?n.readFileSync(t):i,r=((e,t,n)=>(null!=e?e:`${t}.${n.split("/")[1]}`).replaceAll("/","-"))(t,e,a),{file:s,...u}=((e,t,n)=>{const i=e.byteLength;return{file:e,filename:n,checksum:c.createHash("md5").update(Uint8Array.from(e)).digest("base64"),byteSize:i,contentType:t}})(o,a,r);return{file:s,metadata:u,name:e}}catch(n){const i=n instanceof Error?n.message:String(n);return void N.yellowText(`Skipping missing file: ${t||e} - ${i}`)}}).filter(Mt(void 0)),d={metadata:ge("metadata",p)};N.warning(`Requesting direct upload URLs for ${p.length} file(s): ${h}`);const m=Date.now(),{data:v}=await(({ciBuildId:e,historyId:t},n)=>yu(()=>Lc.post(`/api/v2/reporter/runs/${e}/test_entities/${t}/direct_uploads`,{blob:n}),{additionalRetryStatusCodes:[422]}))({ciBuildId:e.ciBuildId,historyId:x},d);N.warning(`Received direct upload URLs in ${Date.now()-m}ms: ${h}`);const g=Date.now(),D=await Promise.all(v.map(async({signedId:e,directUpload:n},i)=>{var a,o;return t[`${null===(a=p[i])||void 0===a?void 0:a.name}s`].push(e),qp(p[i].file,n,`${h} - ${null===(o=p[i])||void 0===o?void 0:o.name}`)}));e.progressBars.push(...D),qt(p)&&N.warning(`Uploaded ${p.length} file(s) in ${Date.now()-g}ms: ${h}`),N.warning(`Reporting test result to server: ${h} (${x}-${b})`);const w=Date.now(),_=Ou({ciBuildId:f,historyId:x,id:e.attempts[x][b],payload:t});e.testResultCalls.push(_),await _,N.warning(`Test result reported in ${Date.now()-w}ms: ${h}`)}catch(r){await Zt({context:{historyId:x,attemptIndex:b,title:h,status:i,outcome:y,duration:a,completedAt:l},error:r,title:"onTestEnd"}),N.error(r.message),N.error(O.failedToReportTest(h,x)),await(null===(p=e.heartbeatManager)||void 0===p?void 0:p.sendImmediateHeartbeat())}finally{N.log(ru.reportedTest({title:h,status:i,historyId:x,completedAt:l,error:r&&`${ep(r)}\n\n${Gp.encode(o.map(e=>{var t;return(null!==(t=e.message)&&void 0!==t?t:"").replace(/[\uD800-\uDFFF]/g,"?")}).join("\n"))}`,isTestReported:!e.shouldNotReportTest,retry:s,repeatEachIndex:v})),e.pendingTestEnds.delete(Yt(x,b)),e.startedAttempts.delete(Yt(x,b))}},Wp=g.extend({generateLighthouseMetaData:async({},e,t)=>{let n=0;const{title:i,outputDir:a}=t;await e(()=>{const e=i.replace(/[:]/g,"_");return{formats:{html:!0},name:n?e:`${e}-${n++}`,directory:a,get pathToLightHouseHTMLReport(){return`${a}/${this.name}.html`}}})},attachLighthouseReport:async({},e,t)=>{await e(async e=>{e.endsWith(".html")?await t.attach("lighthouse",{path:e,contentType:"text/html"}):N.redText(P.attachLightHouseReport.unsupportedFileType(e))})}}),Vp=(e,t)=>{b.setDefaultResultOrder("ipv4first");Xu({projectKey:t.projectKey||process.env.NEETO_PROJECT_KEY||"",baseURL:t.baseURL||process.env.NEETO_PLAYDASH_API_BASE_URL||"",apiKey:t.apiKey||process.env.NEETO_API_KEY||"",ciBuildId:t.ciBuildId||process.env.NEETO_CI_BUILD_ID||""}),process.on("unhandledRejection",async t=>{var n,i,a;try{const o=null===(n=t.response)||void 0===n?void 0:n.data;await Zt({context:{},error:t,title:"unhandledRejection"}),await(async e=>{try{await Eu(e)}catch(e){N.error(e.message),N.error(JSON.stringify(e,null,4)),N.redText(R.stopped),process.exit(1)}})(e.ciBuildId),N.error(null!==(a=null!==(i=null==o?void 0:o.error)&&void 0!==i?i:t.message)&&void 0!==a?a:JSON.stringify(t))}catch(t){N.error("Honeybadger failed :(")}})};exports.default=class{constructor(e){var t;this.reportLifecycleError=async(e,t,n={})=>{var i,a,o;let r=null;t instanceof zc&&(r=null!==(o=null===(a=null===(i=null==t?void 0:t.response)||void 0===i?void 0:i.data)||void 0===a?void 0:a.error)&&void 0!==o?o:null==t?void 0:t.message),N.error(`${e} failed: ${null!=r?r:String(t)}`),await Zt({context:{lifecycle:e,ciBuildId:this.ciBuildId,...n},error:t,title:`${e} - Fire and Forget Handler`})},this.onBegin=(e,t)=>{ju(this,e,t).catch(t=>this.reportLifecycleError("onBegin",t,{configDetails:JSON.stringify(e,null,2)}))},this.onTestBegin=(e,t)=>{(async(e,t,{retry:n})=>{var i,a,o;const{title:r,repeatEachIndex:s}=t,{rootDir:c,currentShard:u,ciBuildId:p}=e,{historyId:l}=Au(t,c),d=(new Date).toString(),m=Yt(n,s);if(e.shouldNotReportTest)N.invertBackground(ou.startingTest({titlePath:r,historyId:l,retry:n,repeatEachIndex:s}));else try{if(e.pendingTestBegins.add(Yt(l,m)),await Wt(()=>{var t,n;const i=qt(e.attempts),a=ze(null===(n=null===(t=e.attempts)||void 0===t?void 0:t[l])||void 0===n?void 0:n["0-0"]);return i&&a}),N.invertBackground(ou.startingTest({titlePath:r,historyId:l,retry:n,repeatEachIndex:s})),e.shouldNotReportTest)return;const t={status:"running",startedAt:d,shard:u,repeatEachIndex:s};if(0===n&&0===s)await Ou({ciBuildId:p,historyId:l,id:null===(a=null===(i=e.attempts)||void 0===i?void 0:i[l])||void 0===a?void 0:a["0-0"],payload:t});else{const{data:{attemptId:n}}=await Su(p,l,t);e.attempts=He(e.attempts,{[l]:{[m]:n}})}}catch(t){await Zt({context:{historyId:l,attemptIndex:m,title:r},error:t,title:"onTestBegin"}),N.error(t.message),N.error(j.failedToReportTest(r,l)),await(null===(o=e.heartbeatManager)||void 0===o?void 0:o.sendImmediateHeartbeat())}finally{e.pendingTestBegins.delete(Yt(l,m)),e.startedAttempts.add(Yt(l,m))}})(this,e,t).catch(t=>this.reportLifecycleError("onTestBegin",t,{testTitle:e.title,testLocation:e.location}))},this.onTestEnd=(e,t)=>{Kp(this,e,t).catch(n=>this.reportLifecycleError("onTestEnd",n,{testTitle:e.title,testLocation:e.location,testStatus:t.status,testDuration:t.duration}))},this.onEnd=e=>(async(e,{status:t,duration:n})=>{var i,a,o,r;const{currentShard:s}=e;let c=null;try{if(await Wt(()=>{const t=e.hasRunStarted||e.shouldNotReportTest,n=0===e.pendingTestBegins.size,i=0===e.pendingTestEnds.size,a=0===e.startedAttempts.size;return t&&n&&i&&a}),N.bold(su.finalStatus({currentShard:s,status:t,duration:n})),e.shouldNotReportTest)return;if(0===e.totalTestCount)return void await _u(e.ciBuildId,{shards:Gt({currentShard:s,status:"passed",duration:n})});await Promise.allSettled(e.testResultCalls);const a=await _u(e.ciBuildId,{shards:Gt({currentShard:s,status:t,duration:n})});c=null===(i=null==a?void 0:a.data)||void 0===i?void 0:i.dashboardUrl}catch(e){const i=null===(a=e.response)||void 0===a?void 0:a.data;await Zt({context:{runStatus:t,runDuration:n},error:e,title:"onEnd"}),N.error(null!==(o=i.error)&&void 0!==o?o:e.message),N.error(S.failedToReportRunStatus)}finally{e.shouldNotReportTest||0===e.totalTestCount||(N.invertBackground(su.runReported),c&&(N.underline(su.dashboardUrlHeader),N.log(c))),null===(r=e.heartbeatManager)||void 0===r||r.stop()}})(this,e);const n={projectKey:e.projectKey||process.env.NEETO_PROJECT_KEY||"",baseURL:e.baseURL||process.env.NEETO_PLAYDASH_API_BASE_URL||"",apiKey:e.apiKey||process.env.NEETO_API_KEY||"",ciBuildId:e.ciBuildId||process.env.NEETO_CI_BUILD_ID||"",tags:e.tags||(()=>{const e=process.env.NEETO_PLAYDASH_TAGS;if(e)return e.includes(",")?e.split(","):e})()||[],title:e.title||process.env.NEETO_PLAYDASH_TITLE,commitId:e.commitId||process.env.NEETO_PLAYDASH_COMMIT_ID,author:e.author||process.env.NEETO_PLAYDASH_AUTHOR,branch:e.branch||process.env.NEETO_PLAYDASH_BRANCH};this.attempts={},this.tags=n.tags,this.ciBuildId=n.ciBuildId,this.title=n.title,this.commitId=n.commitId,this.author=n.author,this.branch=n.branch,this.testResultCalls=[],this.totalTestCount=0,this.hasRunStarted=!1,this.heartbeatManager=null,this.rootDir="",this.currentShard=0,this.progressBars=[],this.startedAttempts=new Set,this.shouldNotReportTest=!1,this.pendingTestBegins=new Set,this.pendingTestEnds=new Set,this.apiKey=n.apiKey,A.configure({apiKey:Jt("9d5d98e72929dae3c8b3701f50032da1a02b80f9dc29a8e448a601871e5c82fd0ac2fa33c46443709cdb3eabc54a06ab"),environment:(null===(t=null==n?void 0:n.baseURL)||void 0===t?void 0:t.includes(".net"))?"staging":"production"}),A.setContext({...n,reporterVersion:Qt()}),Vp(this,n)}onStdOut(e,t){t&&N.bold(`Log from test "${t.title}"`),N.log(e.toString())}},exports.test=Wp;
|
|
10
10
|
//# sourceMappingURL=index.cjs.js.map
|