@bigbinary/neeto-playwright-reporter 1.6.4 → 1.6.5

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/index.js CHANGED
@@ -6,5 +6,5 @@ import e from"os";import n from"domain";import t,{readFileSync as a}from"fs";imp
6
6
  * MIT Licensed
7
7
  */
8
8
  function(e){var n,t,a,o=na.exports,s=i.extname,r=/^\s*([^;\s]*)(?:;|\s|$)/,c=/^text\//i;function u(e){if(!e||"string"!=typeof e)return!1;var n=r.exec(e),t=n&&o[n[1].toLowerCase()];return t&&t.charset?t.charset:!(!n||!c.test(n[1]))&&"UTF-8"}e.charset=u,e.charsets={lookup:u},e.contentType=function(n){if(!n||"string"!=typeof n)return!1;var t=-1===n.indexOf("/")?e.lookup(n):n;if(!t)return!1;if(-1===t.indexOf("charset")){var a=e.charset(t);a&&(t+="; charset="+a.toLowerCase())}return t},e.extension=function(n){if(!n||"string"!=typeof n)return!1;var t=r.exec(n),a=t&&e.extensions[t[1].toLowerCase()];if(!a||!a.length)return!1;return a[0]},e.extensions=Object.create(null),e.lookup=function(n){if(!n||"string"!=typeof n)return!1;var t=s("x."+n).toLowerCase().substr(1);if(!t)return!1;return e.types[t]||!1},e.types=Object.create(null),n=e.extensions,t=e.types,a=["nginx","apache",void 0,"iana"],Object.keys(o).forEach((function(e){var i=o[e],s=i.extensions;if(s&&s.length){n[e]=s;for(var r=0;r<s.length;r++){var c=s[r];if(t[c]){var u=a.indexOf(o[t[c]].source),p=a.indexOf(i.source);if("application/octet-stream"!==t[c]&&(u>p||u===p&&"application/"===t[c].substr(0,12)))continue}t[c]=e}}}))}(ea);var ta=function(e){var n="function"==typeof setImmediate?setImmediate:"object"==typeof process&&"function"==typeof process.nextTick?process.nextTick:null;n?n(e):setTimeout(e,0)},aa=function(e){var n=!1;return ta((function(){n=!0})),function(t,a){n?e(t,a):ta((function(){e(t,a)}))}};var ia=function(e){Object.keys(e.jobs).forEach(oa.bind(e)),e.jobs={}};function oa(e){"function"==typeof this.jobs[e]&&this.jobs[e]()}var sa=aa,ra=ia,ca=function(e,n,t,a){var i=t.keyedList?t.keyedList[t.index]:t.index;t.jobs[i]=function(e,n,t,a){var i;i=2==e.length?e(t,sa(a)):e(t,n,sa(a));return i}(n,i,e[i],(function(e,n){i in t.jobs&&(delete t.jobs[i],e?ra(t):t.results[i]=n,a(e,t.results))}))};var ua=function(e,n){var t=!Array.isArray(e),a={index:0,keyedList:t||n?Object.keys(e):null,jobs:{},results:t?{}:[],size:t?Object.keys(e).length:e.length};n&&a.keyedList.sort(t?n:function(t,a){return n(e[t],e[a])});return a};var pa=ia,la=aa,da=function(e){if(!Object.keys(this.jobs).length)return;this.index=this.size,pa(this),la(e)(null,this.results)};var ma=ca,fa=ua,ha=da,va=function(e,n,t){var a=fa(e);for(;a.index<(a.keyedList||e).length;)ma(e,n,a,(function(e,n){e?t(e,n):0!==Object.keys(a.jobs).length||t(null,a.results)})),a.index++;return ha.bind(a,t)};var xa={exports:{}},ba=ca,ga=ua,Da=da;function ya(e,n){return e<n?-1:e>n?1:0}xa.exports=function(e,n,t,a){var i=ga(e,t);return ba(e,n,i,(function t(o,s){o?a(o,s):(i.index++,i.index<(i.keyedList||e).length?ba(e,n,i,t):a(null,i.results))})),Da.bind(i,a)},xa.exports.ascending=ya,xa.exports.descending=function(e,n){return-1*ya(e,n)};var wa=xa.exports;var _a={parallel:va,serial:function(e,n,t){return wa(e,n,null,t)},serialOrdered:xa.exports},Ca=Zt,Ea=s,Fa=i,ka=u,ja=p,Ta=c.parse,Sa=t,Oa=d.Stream,Aa=ea,Ra=_a,Ba=function(e,n){return Object.keys(n).forEach((function(t){e[t]=e[t]||n[t]})),e},La=Na;function Na(e){if(!(this instanceof Na))return new Na(e);for(var n in this._overheadLength=0,this._valueLength=0,this._valuesToMeasure=[],Ca.call(this),e=e||{})this[n]=e[n]}function Pa(e){return Mt.isPlainObject(e)||Mt.isArray(e)}function Ia(e){return Mt.endsWith(e,"[]")?e.slice(0,-2):e}function za(e,n,t){return e?e.concat(n).map((function(e,n){return e=Ia(e),!t&&n?"["+e+"]":e})).join(t?".":""):n}Ea.inherits(Na,Ca),Na.LINE_BREAK="\r\n",Na.DEFAULT_CONTENT_TYPE="application/octet-stream",Na.prototype.append=function(e,n,t){"string"==typeof(t=t||{})&&(t={filename:t});var a=Ca.prototype.append.bind(this);if("number"==typeof n&&(n=""+n),Ea.isArray(n))this._error(new Error("Arrays are not supported."));else{var i=this._multiPartHeader(e,n,t),o=this._multiPartFooter();a(i),a(n),a(o),this._trackLength(i,n,t)}},Na.prototype._trackLength=function(e,n,t){var a=0;null!=t.knownLength?a+=+t.knownLength:Buffer.isBuffer(n)?a=n.length:"string"==typeof n&&(a=Buffer.byteLength(n)),this._valueLength+=a,this._overheadLength+=Buffer.byteLength(e)+Na.LINE_BREAK.length,n&&(n.path||n.readable&&n.hasOwnProperty("httpVersion")||n instanceof Oa)&&(t.knownLength||this._valuesToMeasure.push(n))},Na.prototype._lengthRetriever=function(e,n){e.hasOwnProperty("fd")?null!=e.end&&e.end!=1/0&&null!=e.start?n(null,e.end+1-(e.start?e.start:0)):Sa.stat(e.path,(function(t,a){var i;t?n(t):(i=a.size-(e.start?e.start:0),n(null,i))})):e.hasOwnProperty("httpVersion")?n(null,+e.headers["content-length"]):e.hasOwnProperty("httpModule")?(e.on("response",(function(t){e.pause(),n(null,+t.headers["content-length"])})),e.resume()):n("Unknown stream")},Na.prototype._multiPartHeader=function(e,n,t){if("string"==typeof t.header)return t.header;var a,i=this._getContentDisposition(n,t),o=this._getContentType(n,t),s="",r={"Content-Disposition":["form-data",'name="'+e+'"'].concat(i||[]),"Content-Type":[].concat(o||[])};for(var c in"object"==typeof t.header&&Ba(r,t.header),r)r.hasOwnProperty(c)&&null!=(a=r[c])&&(Array.isArray(a)||(a=[a]),a.length&&(s+=c+": "+a.join("; ")+Na.LINE_BREAK));return"--"+this.getBoundary()+Na.LINE_BREAK+s+Na.LINE_BREAK},Na.prototype._getContentDisposition=function(e,n){var t,a;return"string"==typeof n.filepath?t=Fa.normalize(n.filepath).replace(/\\/g,"/"):n.filename||e.name||e.path?t=Fa.basename(n.filename||e.name||e.path):e.readable&&e.hasOwnProperty("httpVersion")&&(t=Fa.basename(e.client._httpMessage.path||"")),t&&(a='filename="'+t+'"'),a},Na.prototype._getContentType=function(e,n){var t=n.contentType;return!t&&e.name&&(t=Aa.lookup(e.name)),!t&&e.path&&(t=Aa.lookup(e.path)),!t&&e.readable&&e.hasOwnProperty("httpVersion")&&(t=e.headers["content-type"]),t||!n.filepath&&!n.filename||(t=Aa.lookup(n.filepath||n.filename)),t||"object"!=typeof e||(t=Na.DEFAULT_CONTENT_TYPE),t},Na.prototype._multiPartFooter=function(){return function(e){var n=Na.LINE_BREAK;0===this._streams.length&&(n+=this._lastBoundary()),e(n)}.bind(this)},Na.prototype._lastBoundary=function(){return"--"+this.getBoundary()+"--"+Na.LINE_BREAK},Na.prototype.getHeaders=function(e){var n,t={"content-type":"multipart/form-data; boundary="+this.getBoundary()};for(n in e)e.hasOwnProperty(n)&&(t[n.toLowerCase()]=e[n]);return t},Na.prototype.setBoundary=function(e){this._boundary=e},Na.prototype.getBoundary=function(){return this._boundary||this._generateBoundary(),this._boundary},Na.prototype.getBuffer=function(){for(var e=new Buffer.alloc(0),n=this.getBoundary(),t=0,a=this._streams.length;t<a;t++)"function"!=typeof this._streams[t]&&(e=Buffer.isBuffer(this._streams[t])?Buffer.concat([e,this._streams[t]]):Buffer.concat([e,Buffer.from(this._streams[t])]),"string"==typeof this._streams[t]&&this._streams[t].substring(2,n.length+2)===n||(e=Buffer.concat([e,Buffer.from(Na.LINE_BREAK)])));return Buffer.concat([e,Buffer.from(this._lastBoundary())])},Na.prototype._generateBoundary=function(){for(var e="--------------------------",n=0;n<24;n++)e+=Math.floor(10*Math.random()).toString(16);this._boundary=e},Na.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},Na.prototype.hasKnownLength=function(){var e=!0;return this._valuesToMeasure.length&&(e=!1),e},Na.prototype.getLength=function(e){var n=this._overheadLength+this._valueLength;this._streams.length&&(n+=this._lastBoundary().length),this._valuesToMeasure.length?Ra.parallel(this._valuesToMeasure,this._lengthRetriever,(function(t,a){t?e(t):(a.forEach((function(e){n+=e})),e(null,n))})):process.nextTick(e.bind(this,null,n))},Na.prototype.submit=function(e,n){var t,a,i={method:"post"};return"string"==typeof e?(e=Ta(e),a=Ba({port:e.port,path:e.pathname,host:e.hostname,protocol:e.protocol},i)):(a=Ba(e,i)).port||(a.port="https:"==a.protocol?443:80),a.headers=this.getHeaders(e.headers),t="https:"==a.protocol?ja.request(a):ka.request(a),this.getLength(function(e,a){if(e&&"Unknown stream"!==e)this._error(e);else if(a&&t.setHeader("Content-Length",a),this.pipe(t),n){var i,o=function(e,a){return t.removeListener("error",o),t.removeListener("response",i),n.call(this,e,a)};i=o.bind(this,null),t.on("error",o),t.on("response",i)}}.bind(this)),t},Na.prototype._error=function(e){this.error||(this.error=e,this.pause(),this.emit("error",e))},Na.prototype.toString=function(){return"[object FormData]"};const Ua=Mt.toFlatObject(Mt,{},null,(function(e){return/^is[A-Z]/.test(e)}));function qa(e,n,t){if(!Mt.isObject(e))throw new TypeError("target must be an object");n=n||new(La||FormData);const a=(t=Mt.toFlatObject(t,{metaTokens:!0,dots:!1,indexes:!1},!1,(function(e,n){return!Mt.isUndefined(n[e])}))).metaTokens,i=t.visitor||u,o=t.dots,s=t.indexes,r=(t.Blob||"undefined"!=typeof Blob&&Blob)&&Mt.isSpecCompliantForm(n);if(!Mt.isFunction(i))throw new TypeError("visitor must be a function");function c(e){if(null===e)return"";if(Mt.isDate(e))return e.toISOString();if(!r&&Mt.isBlob(e))throw new Ht("Blob is not supported. Use a Buffer instead.");return Mt.isArrayBuffer(e)||Mt.isTypedArray(e)?r&&"function"==typeof Blob?new Blob([e]):Buffer.from(e):e}function u(e,t,i){let r=e;if(e&&!i&&"object"==typeof e)if(Mt.endsWith(t,"{}"))t=a?t:t.slice(0,-2),e=JSON.stringify(e);else if(Mt.isArray(e)&&function(e){return Mt.isArray(e)&&!e.some(Pa)}(e)||(Mt.isFileList(e)||Mt.endsWith(t,"[]"))&&(r=Mt.toArray(e)))return t=Ia(t),r.forEach((function(e,a){!Mt.isUndefined(e)&&null!==e&&n.append(!0===s?za([t],a,o):null===s?t:t+"[]",c(e))})),!1;return!!Pa(e)||(n.append(za(i,t,o),c(e)),!1)}const p=[],l=Object.assign(Ua,{defaultVisitor:u,convertValue:c,isVisitable:Pa});if(!Mt.isObject(e))throw new TypeError("data must be an object");return function e(t,a){if(!Mt.isUndefined(t)){if(-1!==p.indexOf(t))throw Error("Circular reference detected in "+a.join("."));p.push(t),Mt.forEach(t,(function(t,o){!0===(!(Mt.isUndefined(t)||null===t)&&i.call(n,t,Mt.isString(o)?o.trim():o,a,l))&&e(t,a?a.concat(o):[o])})),p.pop()}}(e),n}function Ma(e){const n={"!":"%21","'":"%27","(":"%28",")":"%29","~":"%7E","%20":"+","%00":"\0"};return encodeURIComponent(e).replace(/[!'()~]|%20|%00/g,(function(e){return n[e]}))}function Ha(e,n){this._pairs=[],e&&qa(e,this,n)}const $a=Ha.prototype;function Ga(e){return encodeURIComponent(e).replace(/%3A/gi,":").replace(/%24/g,"$").replace(/%2C/gi,",").replace(/%20/g,"+").replace(/%5B/gi,"[").replace(/%5D/gi,"]")}function Ka(e,n,t){if(!n)return e;const a=t&&t.encode||Ga,i=t&&t.serialize;let o;if(o=i?i(n,t):Mt.isURLSearchParams(n)?n.toString():new Ha(n,t).toString(a),o){const n=e.indexOf("#");-1!==n&&(e=e.slice(0,n)),e+=(-1===e.indexOf("?")?"?":"&")+o}return e}$a.append=function(e,n){this._pairs.push([e,n])},$a.toString=function(e){const n=e?function(n){return e.call(this,n,Ma)}:Ma;return this._pairs.map((function(e){return n(e[0])+"="+n(e[1])}),"").join("&")};class Wa{constructor(){this.handlers=[]}use(e,n,t){return this.handlers.push({fulfilled:e,rejected:n,synchronous:!!t&&t.synchronous,runWhen:t?t.runWhen:null}),this.handlers.length-1}eject(e){this.handlers[e]&&(this.handlers[e]=null)}clear(){this.handlers&&(this.handlers=[])}forEach(e){Mt.forEach(this.handlers,(function(n){null!==n&&e(n)}))}}var Va={silentJSONParsing:!0,forcedJSONParsing:!0,clarifyTimeoutError:!1},Ya={isNode:!0,classes:{URLSearchParams:c.URLSearchParams,FormData:La,Blob:"undefined"!=typeof Blob&&Blob||null},protocols:["http","https","file","data"]};const Ja="undefined"!=typeof window&&"undefined"!=typeof document,Xa="object"==typeof navigator&&navigator||void 0,Za=Ja&&(!Xa||["ReactNative","NativeScript","NS"].indexOf(Xa.product)<0),Qa="undefined"!=typeof WorkerGlobalScope&&self instanceof WorkerGlobalScope&&"function"==typeof self.importScripts,ei=Ja&&window.location.href||"http://localhost";var ni={...Object.freeze({__proto__:null,hasBrowserEnv:Ja,hasStandardBrowserEnv:Za,hasStandardBrowserWebWorkerEnv:Qa,navigator:Xa,origin:ei}),...Ya};function ti(e){function n(e,t,a,i){let o=e[i++];if("__proto__"===o)return!0;const s=Number.isFinite(+o),r=i>=e.length;if(o=!o&&Mt.isArray(a)?a.length:o,r)return Mt.hasOwnProp(a,o)?a[o]=[a[o],t]:a[o]=t,!s;a[o]&&Mt.isObject(a[o])||(a[o]=[]);return n(e,t,a[o],i)&&Mt.isArray(a[o])&&(a[o]=function(e){const n={},t=Object.keys(e);let a;const i=t.length;let o;for(a=0;a<i;a++)o=t[a],n[o]=e[o];return n}(a[o])),!s}if(Mt.isFormData(e)&&Mt.isFunction(e.entries)){const t={};return Mt.forEachEntry(e,((e,a)=>{n(function(e){return Mt.matchAll(/\w+|\[(\w*)]/g,e).map((e=>"[]"===e[0]?"":e[1]||e[0]))}(e),a,t,0)})),t}return null}const ai={transitional:Va,adapter:["xhr","http","fetch"],transformRequest:[function(e,n){const t=n.getContentType()||"",a=t.indexOf("application/json")>-1,i=Mt.isObject(e);i&&Mt.isHTMLForm(e)&&(e=new FormData(e));if(Mt.isFormData(e))return a?JSON.stringify(ti(e)):e;if(Mt.isArrayBuffer(e)||Mt.isBuffer(e)||Mt.isStream(e)||Mt.isFile(e)||Mt.isBlob(e)||Mt.isReadableStream(e))return e;if(Mt.isArrayBufferView(e))return e.buffer;if(Mt.isURLSearchParams(e))return n.setContentType("application/x-www-form-urlencoded;charset=utf-8",!1),e.toString();let o;if(i){if(t.indexOf("application/x-www-form-urlencoded")>-1)return function(e,n){return qa(e,new ni.classes.URLSearchParams,Object.assign({visitor:function(e,n,t,a){return ni.isNode&&Mt.isBuffer(e)?(this.append(n,e.toString("base64")),!1):a.defaultVisitor.apply(this,arguments)}},n))}(e,this.formSerializer).toString();if((o=Mt.isFileList(e))||t.indexOf("multipart/form-data")>-1){const n=this.env&&this.env.FormData;return qa(o?{"files[]":e}:e,n&&new n,this.formSerializer)}}return i||a?(n.setContentType("application/json",!1),function(e,n,t){if(Mt.isString(e))try{return(n||JSON.parse)(e),Mt.trim(e)}catch(e){if("SyntaxError"!==e.name)throw e}return(t||JSON.stringify)(e)}(e)):e}],transformResponse:[function(e){const n=this.transitional||ai.transitional,t=n&&n.forcedJSONParsing,a="json"===this.responseType;if(Mt.isResponse(e)||Mt.isReadableStream(e))return e;if(e&&Mt.isString(e)&&(t&&!this.responseType||a)){const t=!(n&&n.silentJSONParsing)&&a;try{return JSON.parse(e)}catch(e){if(t){if("SyntaxError"===e.name)throw Ht.from(e,Ht.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:ni.classes.FormData,Blob:ni.classes.Blob},validateStatus:function(e){return e>=200&&e<300},headers:{common:{Accept:"application/json, text/plain, */*","Content-Type":void 0}}};Mt.forEach(["delete","get","head","post","put","patch"],(e=>{ai.headers[e]={}}));const ii=Mt.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 oi=Symbol("internals");function si(e){return e&&String(e).trim().toLowerCase()}function ri(e){return!1===e||null==e?e:Mt.isArray(e)?e.map(ri):String(e)}function ci(e,n,t,a,i){return Mt.isFunction(a)?a.call(this,n,t):(i&&(n=t),Mt.isString(n)?Mt.isString(a)?-1!==n.indexOf(a):Mt.isRegExp(a)?a.test(n):void 0:void 0)}class ui{constructor(e){e&&this.set(e)}set(e,n,t){const a=this;function i(e,n,t){const i=si(n);if(!i)throw new Error("header name must be a non-empty string");const o=Mt.findKey(a,i);(!o||void 0===a[o]||!0===t||void 0===t&&!1!==a[o])&&(a[o||n]=ri(e))}const o=(e,n)=>Mt.forEach(e,((e,t)=>i(e,t,n)));if(Mt.isPlainObject(e)||e instanceof this.constructor)o(e,n);else if(Mt.isString(e)&&(e=e.trim())&&!/^[-_a-zA-Z0-9^`|~,!#$%&'*+.]+$/.test(e.trim()))o((e=>{const n={};let t,a,i;return e&&e.split("\n").forEach((function(e){i=e.indexOf(":"),t=e.substring(0,i).trim().toLowerCase(),a=e.substring(i+1).trim(),!t||n[t]&&ii[t]||("set-cookie"===t?n[t]?n[t].push(a):n[t]=[a]:n[t]=n[t]?n[t]+", "+a:a)})),n})(e),n);else if(Mt.isHeaders(e))for(const[n,a]of e.entries())i(a,n,t);else null!=e&&i(n,e,t);return this}get(e,n){if(e=si(e)){const t=Mt.findKey(this,e);if(t){const e=this[t];if(!n)return e;if(!0===n)return function(e){const n=Object.create(null),t=/([^\s,;=]+)\s*(?:=\s*([^,;]+))?/g;let a;for(;a=t.exec(e);)n[a[1]]=a[2];return n}(e);if(Mt.isFunction(n))return n.call(this,e,t);if(Mt.isRegExp(n))return n.exec(e);throw new TypeError("parser must be boolean|regexp|function")}}}has(e,n){if(e=si(e)){const t=Mt.findKey(this,e);return!(!t||void 0===this[t]||n&&!ci(0,this[t],t,n))}return!1}delete(e,n){const t=this;let a=!1;function i(e){if(e=si(e)){const i=Mt.findKey(t,e);!i||n&&!ci(0,t[i],i,n)||(delete t[i],a=!0)}}return Mt.isArray(e)?e.forEach(i):i(e),a}clear(e){const n=Object.keys(this);let t=n.length,a=!1;for(;t--;){const i=n[t];e&&!ci(0,this[i],i,e,!0)||(delete this[i],a=!0)}return a}normalize(e){const n=this,t={};return Mt.forEach(this,((a,i)=>{const o=Mt.findKey(t,i);if(o)return n[o]=ri(a),void delete n[i];const s=e?function(e){return e.trim().toLowerCase().replace(/([a-z\d])(\w*)/g,((e,n,t)=>n.toUpperCase()+t))}(i):String(i).trim();s!==i&&delete n[i],n[s]=ri(a),t[s]=!0})),this}concat(...e){return this.constructor.concat(this,...e)}toJSON(e){const n=Object.create(null);return Mt.forEach(this,((t,a)=>{null!=t&&!1!==t&&(n[a]=e&&Mt.isArray(t)?t.join(", "):t)})),n}[Symbol.iterator](){return Object.entries(this.toJSON())[Symbol.iterator]()}toString(){return Object.entries(this.toJSON()).map((([e,n])=>e+": "+n)).join("\n")}get[Symbol.toStringTag](){return"AxiosHeaders"}static from(e){return e instanceof this?e:new this(e)}static concat(e,...n){const t=new this(e);return n.forEach((e=>t.set(e))),t}static accessor(e){const n=(this[oi]=this[oi]={accessors:{}}).accessors,t=this.prototype;function a(e){const a=si(e);n[a]||(!function(e,n){const t=Mt.toCamelCase(" "+n);["get","set","has"].forEach((a=>{Object.defineProperty(e,a+t,{value:function(e,t,i){return this[a].call(this,n,e,t,i)},configurable:!0})}))}(t,e),n[a]=!0)}return Mt.isArray(e)?e.forEach(a):a(e),this}}function pi(e,n){const t=this||ai,a=n||t,i=ui.from(a.headers);let o=a.data;return Mt.forEach(e,(function(e){o=e.call(t,o,i.normalize(),n?n.status:void 0)})),i.normalize(),o}function li(e){return!(!e||!e.__CANCEL__)}function di(e,n,t){Ht.call(this,null==e?"canceled":e,Ht.ERR_CANCELED,n,t),this.name="CanceledError"}function mi(e,n,t){const a=t.config.validateStatus;t.status&&a&&!a(t.status)?n(new Ht("Request failed with status code "+t.status,[Ht.ERR_BAD_REQUEST,Ht.ERR_BAD_RESPONSE][Math.floor(t.status/100)-4],t.config,t.request,t)):e(t)}function fi(e,n){return e&&!function(e){return/^([a-z][a-z\d+\-.]*:)?\/\//i.test(e)}(n)?function(e,n){return n?e.replace(/\/?\/$/,"")+"/"+n.replace(/^\/+/,""):e}(e,n):n}ui.accessor(["Content-Type","Content-Length","Accept","Accept-Encoding","User-Agent","Authorization"]),Mt.reduceDescriptors(ui.prototype,(({value:e},n)=>{let t=n[0].toUpperCase()+n.slice(1);return{get:()=>e,set(e){this[t]=e}}})),Mt.freezeMethods(ui),Mt.inherits(di,Ht,{__CANCEL__:!0});var hi=c.parse,vi={ftp:21,gopher:70,http:80,https:443,ws:80,wss:443},xi=String.prototype.endsWith||function(e){return e.length<=this.length&&-1!==this.indexOf(e,this.length-e.length)};function bi(e){return process.env[e.toLowerCase()]||process.env[e.toUpperCase()]||""}var gi,Di,yi,wi,_i,Ci=function(e){var n="string"==typeof e?hi(e):e||{},t=n.protocol,a=n.host,i=n.port;if("string"!=typeof a||!a||"string"!=typeof t)return"";if(t=t.split(":",1)[0],!function(e,n){var t=(bi("npm_config_no_proxy")||bi("no_proxy")).toLowerCase();if(!t)return!0;if("*"===t)return!1;return t.split(/[,\s]/).every((function(t){if(!t)return!0;var a=t.match(/^(.+):(\d+)$/),i=a?a[1]:t,o=a?parseInt(a[2]):0;return!(!o||o===n)||(/^[.*]/.test(i)?("*"===i.charAt(0)&&(i=i.slice(1)),!xi.call(e,i)):e!==i)}))}(a=a.replace(/:\d*$/,""),i=parseInt(i)||vi[t]||0))return"";var o=bi("npm_config_"+t+"_proxy")||bi(t+"_proxy")||bi("npm_config_proxy")||bi("all_proxy");return o&&-1===o.indexOf("://")&&(o=t+"://"+o),o},Ei={exports:{}},Fi={exports:{}},ki={exports:{}};function ji(){if(Di)return gi;Di=1;var e=1e3,n=60*e,t=60*n,a=24*t,i=7*a,o=365.25*a;function s(e,n,t,a){var i=n>=1.5*t;return Math.round(e/t)+" "+a+(i?"s":"")}return gi=function(r,c){c=c||{};var u=typeof r;if("string"===u&&r.length>0)return function(s){if((s=String(s)).length>100)return;var r=/^(-?(?:\d+)?\.?\d+) *(milliseconds?|msecs?|ms|seconds?|secs?|s|minutes?|mins?|m|hours?|hrs?|h|days?|d|weeks?|w|years?|yrs?|y)?$/i.exec(s);if(!r)return;var c=parseFloat(r[1]);switch((r[2]||"ms").toLowerCase()){case"years":case"year":case"yrs":case"yr":case"y":return c*o;case"weeks":case"week":case"w":return c*i;case"days":case"day":case"d":return c*a;case"hours":case"hour":case"hrs":case"hr":case"h":return c*t;case"minutes":case"minute":case"mins":case"min":case"m":return c*n;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}}(r);if("number"===u&&isFinite(r))return c.long?function(i){var o=Math.abs(i);if(o>=a)return s(i,o,a,"day");if(o>=t)return s(i,o,t,"hour");if(o>=n)return s(i,o,n,"minute");if(o>=e)return s(i,o,e,"second");return i+" ms"}(r):function(i){var o=Math.abs(i);if(o>=a)return Math.round(i/a)+"d";if(o>=t)return Math.round(i/t)+"h";if(o>=n)return Math.round(i/n)+"m";if(o>=e)return Math.round(i/e)+"s";return i+"ms"}(r);throw new Error("val is not a non-empty string or a valid number. val="+JSON.stringify(r))},gi}function Ti(){if(wi)return yi;return wi=1,yi=function(e){function n(e){let a,i,o,s=null;function r(...e){if(!r.enabled)return;const t=r,i=Number(new Date),o=i-(a||i);t.diff=o,t.prev=a,t.curr=i,a=i,e[0]=n.coerce(e[0]),"string"!=typeof e[0]&&e.unshift("%O");let s=0;e[0]=e[0].replace(/%([a-zA-Z%])/g,((a,i)=>{if("%%"===a)return"%";s++;const o=n.formatters[i];if("function"==typeof o){const n=e[s];a=o.call(t,n),e.splice(s,1),s--}return a})),n.formatArgs.call(t,e);(t.log||n.log).apply(t,e)}return r.namespace=e,r.useColors=n.useColors(),r.color=n.selectColor(e),r.extend=t,r.destroy=n.destroy,Object.defineProperty(r,"enabled",{enumerable:!0,configurable:!1,get:()=>null!==s?s:(i!==n.namespaces&&(i=n.namespaces,o=n.enabled(e)),o),set:e=>{s=e}}),"function"==typeof n.init&&n.init(r),r}function t(e,t){const a=n(this.namespace+(void 0===t?":":t)+e);return a.log=this.log,a}function a(e){return e.toString().substring(2,e.toString().length-2).replace(/\.\*\?$/,"*")}return n.debug=n,n.default=n,n.coerce=function(e){if(e instanceof Error)return e.stack||e.message;return e},n.disable=function(){const e=[...n.names.map(a),...n.skips.map(a).map((e=>"-"+e))].join(",");return n.enable(""),e},n.enable=function(e){let t;n.save(e),n.namespaces=e,n.names=[],n.skips=[];const a=("string"==typeof e?e:"").split(/[\s,]+/),i=a.length;for(t=0;t<i;t++)a[t]&&("-"===(e=a[t].replace(/\*/g,".*?"))[0]?n.skips.push(new RegExp("^"+e.slice(1)+"$")):n.names.push(new RegExp("^"+e+"$")))},n.enabled=function(e){if("*"===e[e.length-1])return!0;let t,a;for(t=0,a=n.skips.length;t<a;t++)if(n.skips[t].test(e))return!1;for(t=0,a=n.names.length;t<a;t++)if(n.names[t].test(e))return!0;return!1},n.humanize=ji(),n.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((t=>{n[t]=e[t]})),n.names=[],n.skips=[],n.formatters={},n.selectColor=function(e){let t=0;for(let n=0;n<e.length;n++)t=(t<<5)-t+e.charCodeAt(n),t|=0;return n.colors[Math.abs(t)%n.colors.length]},n.enable(n.load()),n},yi}var Si,Oi,Ai,Ri,Bi,Li,Ni,Pi={exports:{}};function Ii(){return Oi?Si:(Oi=1,Si=(e,n=process.argv)=>{const t=e.startsWith("-")?"":1===e.length?"-":"--",a=n.indexOf(t+e),i=n.indexOf("--");return-1!==a&&(-1===i||a<i)})}function zi(){return Bi||(Bi=1,function(n,t){const a=h,i=s;t.init=function(e){e.inspectOpts={};const n=Object.keys(t.inspectOpts);for(let a=0;a<n.length;a++)e.inspectOpts[n[a]]=t.inspectOpts[n[a]]},t.log=function(...e){return process.stderr.write(i.formatWithOptions(t.inspectOpts,...e)+"\n")},t.formatArgs=function(e){const{namespace:a,useColors:i}=this;if(i){const t=this.color,i="[3"+(t<8?t:"8;5;"+t),o=` ${i};1m${a} `;e[0]=o+e[0].split("\n").join("\n"+o),e.push(i+"m+"+n.exports.humanize(this.diff)+"")}else e[0]=function(){if(t.inspectOpts.hideDate)return"";return(new Date).toISOString()+" "}()+a+" "+e[0]},t.save=function(e){e?process.env.DEBUG=e:delete process.env.DEBUG},t.load=function(){return process.env.DEBUG},t.useColors=function(){return"colors"in t.inspectOpts?Boolean(t.inspectOpts.colors):a.isatty(process.stderr.fd)},t.destroy=i.deprecate((()=>{}),"Instance method `debug.destroy()` is deprecated and no longer does anything. It will be removed in the next major version of `debug`."),t.colors=[6,2,3,4,5,1];try{const n=function(){if(Ri)return Ai;Ri=1;const n=e,t=h,a=Ii(),{env:i}=process;let o;function s(e){return 0!==e&&{level:e,hasBasic:!0,has256:e>=2,has16m:e>=3}}function r(e,t){if(0===o)return 0;if(a("color=16m")||a("color=full")||a("color=truecolor"))return 3;if(a("color=256"))return 2;if(e&&!t&&void 0===o)return 0;const s=o||0;if("dumb"===i.TERM)return s;if("win32"===process.platform){const e=n.release().split(".");return Number(e[0])>=10&&Number(e[2])>=10586?Number(e[2])>=14931?3:2:1}if("CI"in i)return["TRAVIS","CIRCLECI","APPVEYOR","GITLAB_CI","GITHUB_ACTIONS","BUILDKITE"].some((e=>e in i))||"codeship"===i.CI_NAME?1:s;if("TEAMCITY_VERSION"in i)return/^(9\.(0*[1-9]\d*)\.|\d{2,}\.)/.test(i.TEAMCITY_VERSION)?1:0;if("truecolor"===i.COLORTERM)return 3;if("TERM_PROGRAM"in i){const e=parseInt((i.TERM_PROGRAM_VERSION||"").split(".")[0],10);switch(i.TERM_PROGRAM){case"iTerm.app":return e>=3?3:2;case"Apple_Terminal":return 2}}return/-256(color)?$/i.test(i.TERM)?2:/^screen|^xterm|^vt100|^vt220|^rxvt|color|ansi|cygwin|linux/i.test(i.TERM)||"COLORTERM"in i?1:s}return a("no-color")||a("no-colors")||a("color=false")||a("color=never")?o=0:(a("color")||a("colors")||a("color=true")||a("color=always"))&&(o=1),"FORCE_COLOR"in i&&(o="true"===i.FORCE_COLOR?1:"false"===i.FORCE_COLOR?0:0===i.FORCE_COLOR.length?1:Math.min(parseInt(i.FORCE_COLOR,10),3)),Ai={supportsColor:function(e){return s(r(e,e&&e.isTTY))},stdout:s(r(!0,t.isatty(1))),stderr:s(r(!0,t.isatty(2)))},Ai}();n&&(n.stderr||n).level>=2&&(t.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){}t.inspectOpts=Object.keys(process.env).filter((e=>/^debug_/i.test(e))).reduce(((e,n)=>{const t=n.substring(6).toLowerCase().replace(/_([a-z])/g,((e,n)=>n.toUpperCase()));let a=process.env[n];return a=!!/^(yes|on|true|enabled)$/i.test(a)||!/^(no|off|false|disabled)$/i.test(a)&&("null"===a?null:Number(a)),e[t]=a,e}),{}),n.exports=Ti()(t);const{formatters:o}=n.exports;o.o=function(e){return this.inspectOpts.colors=this.useColors,i.inspect(e,this.inspectOpts).split("\n").map((e=>e.trim())).join(" ")},o.O=function(e){return this.inspectOpts.colors=this.useColors,i.inspect(e,this.inspectOpts)}}(Pi,Pi.exports)),Pi.exports}function Ui(){return Li||(Li=1,e=Fi,"undefined"==typeof process||"renderer"===process.type||!0===process.browser||process.__nwjs?e.exports=(_i||(_i=1,function(e,n){n.formatArgs=function(n){if(n[0]=(this.useColors?"%c":"")+this.namespace+(this.useColors?" %c":" ")+n[0]+(this.useColors?"%c ":" ")+"+"+e.exports.humanize(this.diff),!this.useColors)return;const t="color: "+this.color;n.splice(1,0,t,"color: inherit");let a=0,i=0;n[0].replace(/%[a-zA-Z%]/g,(e=>{"%%"!==e&&(a++,"%c"===e&&(i=a))})),n.splice(i,0,t)},n.save=function(e){try{e?n.storage.setItem("debug",e):n.storage.removeItem("debug")}catch(e){}},n.load=function(){let e;try{e=n.storage.getItem("debug")}catch(e){}return!e&&"undefined"!=typeof process&&"env"in process&&(e=process.env.DEBUG),e},n.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+)/)},n.storage=function(){try{return localStorage}catch(e){}}(),n.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`."))}})(),n.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"],n.log=console.debug||console.log||(()=>{}),e.exports=Ti()(n);const{formatters:t}=e.exports;t.j=function(e){try{return JSON.stringify(e)}catch(e){return"[UnexpectedJSONParseError]: "+e.message}}}(ki,ki.exports)),ki.exports):e.exports=zi()),Fi.exports;var e}var qi,Mi,Hi,$i=c,Gi=$i.URL,Ki=u,Wi=p,Vi=d.Writable,Yi=f,Ji=function(){if(!Ni){try{Ni=Ui()("follow-redirects")}catch(e){}"function"!=typeof Ni&&(Ni=function(){})}Ni.apply(null,arguments)};qi="undefined"!=typeof process,Mi="undefined"!=typeof window&&"undefined"!=typeof document,Hi=bo(Error.captureStackTrace),qi||!Mi&&Hi||console.warn("The follow-redirects package should be excluded from browser builds.");var Xi=!1;try{Yi(new Gi(""))}catch(e){Xi="ERR_INVALID_URL"===e.code}var Zi=["auth","host","hostname","href","path","pathname","port","protocol","query","search","hash"],Qi=["abort","aborted","connect","error","socket","timeout"],eo=Object.create(null);Qi.forEach((function(e){eo[e]=function(n,t,a){this._redirectable.emit(e,n,t,a)}}));var no=ho("ERR_INVALID_URL","Invalid URL",TypeError),to=ho("ERR_FR_REDIRECTION_FAILURE","Redirected request failed"),ao=ho("ERR_FR_TOO_MANY_REDIRECTS","Maximum number of redirects exceeded",to),io=ho("ERR_FR_MAX_BODY_LENGTH_EXCEEDED","Request body larger than maxBodyLength limit"),oo=ho("ERR_STREAM_WRITE_AFTER_END","write after end"),so=Vi.prototype.destroy||uo;function ro(e,n){Vi.call(this),this._sanitizeOptions(e),this._options=e,this._ended=!1,this._ending=!1,this._redirectCount=0,this._redirects=[],this._requestBodyLength=0,this._requestBodyBuffers=[],n&&this.on("response",n);var t=this;this._onNativeResponse=function(e){try{t._processResponse(e)}catch(e){t.emit("error",e instanceof to?e:new to({cause:e}))}},this._performRequest()}function co(e){var n={maxRedirects:21,maxBodyLength:10485760},t={};return Object.keys(e).forEach((function(a){var i=a+":",o=t[i]=e[a],s=n[a]=Object.create(o);Object.defineProperties(s,{request:{value:function(e,a,o){var s;return s=e,Gi&&s instanceof Gi?e=mo(e):xo(e)?e=mo(po(e)):(o=a,a=lo(e),e={protocol:i}),bo(a)&&(o=a,a=null),(a=Object.assign({maxRedirects:n.maxRedirects,maxBodyLength:n.maxBodyLength},e,a)).nativeProtocols=t,xo(a.host)||xo(a.hostname)||(a.hostname="::1"),Yi.equal(a.protocol,i,"protocol mismatch"),Ji("options",a),new ro(a,o)},configurable:!0,enumerable:!0,writable:!0},get:{value:function(e,n,t){var a=s.request(e,n,t);return a.end(),a},configurable:!0,enumerable:!0,writable:!0}})})),n}function uo(){}function po(e){var n;if(Xi)n=new Gi(e);else if(!xo((n=lo($i.parse(e))).protocol))throw new no({input:e});return n}function lo(e){if(/^\[/.test(e.hostname)&&!/^\[[:0-9a-f]+\]$/i.test(e.hostname))throw new no({input:e.href||e});if(/^\[/.test(e.host)&&!/^\[[:0-9a-f]+\](:\d+)?$/i.test(e.host))throw new no({input:e.href||e});return e}function mo(e,n){var t=n||{};for(var a of Zi)t[a]=e[a];return t.hostname.startsWith("[")&&(t.hostname=t.hostname.slice(1,-1)),""!==t.port&&(t.port=Number(t.port)),t.path=t.search?t.pathname+t.search:t.pathname,t}function fo(e,n){var t;for(var a in n)e.test(a)&&(t=n[a],delete n[a]);return null==t?void 0:String(t).trim()}function ho(e,n,t){function a(t){bo(Error.captureStackTrace)&&Error.captureStackTrace(this,this.constructor),Object.assign(this,t||{}),this.code=e,this.message=this.cause?n+": "+this.cause.message:n}return a.prototype=new(t||Error),Object.defineProperties(a.prototype,{constructor:{value:a,enumerable:!1},name:{value:"Error ["+e+"]",enumerable:!1}}),a}function vo(e,n){for(var t of Qi)e.removeListener(t,eo[t]);e.on("error",uo),e.destroy(n)}function xo(e){return"string"==typeof e||e instanceof String}function bo(e){return"function"==typeof e}ro.prototype=Object.create(Vi.prototype),ro.prototype.abort=function(){vo(this._currentRequest),this._currentRequest.abort(),this.emit("abort")},ro.prototype.destroy=function(e){return vo(this._currentRequest,e),so.call(this,e),this},ro.prototype.write=function(e,n,t){if(this._ending)throw new oo;if(!xo(e)&&("object"!=typeof(a=e)||!("length"in a)))throw new TypeError("data should be a string, Buffer or Uint8Array");var a;bo(n)&&(t=n,n=null),0!==e.length?this._requestBodyLength+e.length<=this._options.maxBodyLength?(this._requestBodyLength+=e.length,this._requestBodyBuffers.push({data:e,encoding:n}),this._currentRequest.write(e,n,t)):(this.emit("error",new io),this.abort()):t&&t()},ro.prototype.end=function(e,n,t){if(bo(e)?(t=e,e=n=null):bo(n)&&(t=n,n=null),e){var a=this,i=this._currentRequest;this.write(e,n,(function(){a._ended=!0,i.end(null,null,t)})),this._ending=!0}else this._ended=this._ending=!0,this._currentRequest.end(null,null,t)},ro.prototype.setHeader=function(e,n){this._options.headers[e]=n,this._currentRequest.setHeader(e,n)},ro.prototype.removeHeader=function(e){delete this._options.headers[e],this._currentRequest.removeHeader(e)},ro.prototype.setTimeout=function(e,n){var t=this;function a(n){n.setTimeout(e),n.removeListener("timeout",n.destroy),n.addListener("timeout",n.destroy)}function i(n){t._timeout&&clearTimeout(t._timeout),t._timeout=setTimeout((function(){t.emit("timeout"),o()}),e),a(n)}function o(){t._timeout&&(clearTimeout(t._timeout),t._timeout=null),t.removeListener("abort",o),t.removeListener("error",o),t.removeListener("response",o),t.removeListener("close",o),n&&t.removeListener("timeout",n),t.socket||t._currentRequest.removeListener("socket",i)}return n&&this.on("timeout",n),this.socket?i(this.socket):this._currentRequest.once("socket",i),this.on("socket",a),this.on("abort",o),this.on("error",o),this.on("response",o),this.on("close",o),this},["flushHeaders","getHeader","setNoDelay","setSocketKeepAlive"].forEach((function(e){ro.prototype[e]=function(n,t){return this._currentRequest[e](n,t)}})),["aborted","connection","socket"].forEach((function(e){Object.defineProperty(ro.prototype,e,{get:function(){return this._currentRequest[e]}})})),ro.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 n=e.path.indexOf("?");n<0?e.pathname=e.path:(e.pathname=e.path.substring(0,n),e.search=e.path.substring(n))}},ro.prototype._performRequest=function(){var e=this._options.protocol,n=this._options.nativeProtocols[e];if(!n)throw new TypeError("Unsupported protocol "+e);if(this._options.agents){var t=e.slice(0,-1);this._options.agent=this._options.agents[t]}var a=this._currentRequest=n.request(this._options,this._onNativeResponse);for(var i of(a._redirectable=this,Qi))a.on(i,eo[i]);if(this._currentUrl=/^\//.test(this._options.path)?$i.format(this._options):this._options.path,this._isRedirect){var o=0,s=this,r=this._requestBodyBuffers;!function e(n){if(a===s._currentRequest)if(n)s.emit("error",n);else if(o<r.length){var t=r[o++];a.finished||a.write(t.data,t.encoding,e)}else s._ended&&a.end()}()}},ro.prototype._processResponse=function(e){var n=e.statusCode;this._options.trackRedirects&&this._redirects.push({url:this._currentUrl,headers:e.headers,statusCode:n});var t,a=e.headers.location;if(!a||!1===this._options.followRedirects||n<300||n>=400)return e.responseUrl=this._currentUrl,e.redirects=this._redirects,this.emit("response",e),void(this._requestBodyBuffers=[]);if(vo(this._currentRequest),e.destroy(),++this._redirectCount>this._options.maxRedirects)throw new ao;var i=this._options.beforeRedirect;i&&(t=Object.assign({Host:e.req.getHeader("host")},this._options.headers));var o=this._options.method;((301===n||302===n)&&"POST"===this._options.method||303===n&&!/^(?:GET|HEAD)$/.test(this._options.method))&&(this._options.method="GET",this._requestBodyBuffers=[],fo(/^content-/i,this._options.headers));var s,r,c=fo(/^host$/i,this._options.headers),u=po(this._currentUrl),p=c||u.host,l=/^\w+:/.test(a)?this._currentUrl:$i.format(Object.assign(u,{host:p})),d=(s=a,r=l,Xi?new Gi(s,r):po($i.resolve(r,s)));if(Ji("redirecting to",d.href),this._isRedirect=!0,mo(d,this._options),(d.protocol!==u.protocol&&"https:"!==d.protocol||d.host!==p&&!function(e,n){Yi(xo(e)&&xo(n));var t=e.length-n.length-1;return t>0&&"."===e[t]&&e.endsWith(n)}(d.host,p))&&fo(/^(?:(?:proxy-)?authorization|cookie)$/i,this._options.headers),bo(i)){var m={headers:e.headers,statusCode:n},f={url:l,method:o,headers:t};i(this._options,m,f),this._sanitizeOptions(this._options)}this._performRequest()},Ei.exports=co({http:Ki,https:Wi}),Ei.exports.wrap=co;const go="1.7.7";function Do(e){const n=/^([-+\w]{1,25})(:?\/\/|:)/.exec(e);return n&&n[1]||""}const yo=/^(?:([^;]+);)?(?:[^;]+;)?(base64|),([\s\S]*)$/;const wo=Symbol("internals");class _o extends d.Transform{constructor(e){e=Mt.toFlatObject(e,{maxRate:0,chunkSize:65536,minChunkSize:100,timeWindow:500,ticksRate:2,samplesCount:15},null,((e,n)=>!Mt.isUndefined(n[e]))),super({readableHighWaterMark:e.chunkSize});const n=this[wo]={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&&(n.isCaptured||(n.isCaptured=!0))}))}_read(e){const n=this[wo];return n.onReadCallback&&n.onReadCallback(),super._read(e)}_transform(e,n,t){const a=this[wo],i=a.maxRate,o=this.readableHighWaterMark,s=a.timeWindow,r=i/(1e3/s),c=!1!==a.minChunkSize?Math.max(a.minChunkSize,.01*r):0,u=(e,n)=>{const t=Buffer.byteLength(e);a.bytesSeen+=t,a.bytes+=t,a.isCaptured&&this.emit("progress",a.bytesSeen),this.push(e)?process.nextTick(n):a.onReadCallback=()=>{a.onReadCallback=null,process.nextTick(n)}},p=(e,n)=>{const t=Buffer.byteLength(e);let p,l=null,d=o,m=0;if(i){const e=Date.now();(!a.ts||(m=e-a.ts)>=s)&&(a.ts=e,p=r-a.bytes,a.bytes=p<0?-p:0,m=0),p=r-a.bytes}if(i){if(p<=0)return setTimeout((()=>{n(null,e)}),s-m);p<d&&(d=p)}d&&t>d&&t-d>c&&(l=e.subarray(d),e=e.subarray(0,d)),u(e,l?()=>{process.nextTick(n,null,l)}:n)};p(e,(function e(n,a){if(n)return t(n);a?p(a,e):t(null)}))}}const{asyncIterator:Co}=Symbol,Eo=async function*(e){e.stream?yield*e.stream():e.arrayBuffer?yield await e.arrayBuffer():e[Co]?yield*e[Co]():yield e},Fo=Mt.ALPHABET.ALPHA_DIGIT+"-_",ko=new r,jo="\r\n",To=ko.encode(jo);class So{constructor(e,n){const{escapeName:t}=this.constructor,a=Mt.isString(n);let i=`Content-Disposition: form-data; name="${t(e)}"${!a&&n.name?`; filename="${t(n.name)}"`:""}${jo}`;a?n=ko.encode(String(n).replace(/\r?\n|\r\n?/g,jo)):i+=`Content-Type: ${n.type||"application/octet-stream"}${jo}`,this.headers=ko.encode(i+jo),this.contentLength=a?n.byteLength:n.size,this.size=this.headers.byteLength+this.contentLength+2,this.name=e,this.value=n}async*encode(){yield this.headers;const{value:e}=this;Mt.isTypedArray(e)?yield e:yield*Eo(e),yield To}static escapeName(e){return String(e).replace(/[\r\n"]/g,(e=>({"\r":"%0D","\n":"%0A",'"':"%22"}[e])))}}class Oo extends d.Transform{__transform(e,n,t){this.push(e),t()}_transform(e,n,t){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,n)}this.__transform(e,n,t)}}const Ao=(e,n)=>Mt.isAsyncFn(e)?function(...t){const a=t.pop();e.apply(this,t).then((e=>{try{n?a(null,...n(e)):a(null,e)}catch(e){a(e)}}),a)}:e;const Ro=(e,n,t=3)=>{let a=0;const i=function(e,n){e=e||10;const t=new Array(e),a=new Array(e);let i,o=0,s=0;return n=void 0!==n?n:1e3,function(r){const c=Date.now(),u=a[s];i||(i=c),t[o]=r,a[o]=c;let p=s,l=0;for(;p!==o;)l+=t[p++],p%=e;if(o=(o+1)%e,o===s&&(s=(s+1)%e),c-i<n)return;const d=u&&c-u;return d?Math.round(1e3*l/d):void 0}}(50,250);return function(e,n){let t,a,i=0,o=1e3/n;const s=(n,o=Date.now())=>{i=o,t=null,a&&(clearTimeout(a),a=null),e.apply(null,n)};return[(...e)=>{const n=Date.now(),r=n-i;r>=o?s(e,n):(t=e,a||(a=setTimeout((()=>{a=null,s(t)}),o-r)))},()=>t&&s(t)]}((t=>{const o=t.loaded,s=t.lengthComputable?t.total:void 0,r=o-a,c=i(r);a=o;e({loaded:o,total:s,progress:s?o/s:void 0,bytes:r,rate:c||void 0,estimated:c&&s&&o<=s?(s-o)/c:void 0,event:t,lengthComputable:null!=s,[n?"download":"upload"]:!0})}),t)},Bo=(e,n)=>{const t=null!=e;return[a=>n[0]({lengthComputable:t,total:e,loaded:a}),n[1]]},Lo=e=>(...n)=>Mt.asap((()=>e(...n))),No={flush:v.constants.Z_SYNC_FLUSH,finishFlush:v.constants.Z_SYNC_FLUSH},Po={flush:v.constants.BROTLI_OPERATION_FLUSH,finishFlush:v.constants.BROTLI_OPERATION_FLUSH},Io=Mt.isFunction(v.createBrotliDecompress),{http:zo,https:Uo}=Ei.exports,qo=/https:?/,Mo=ni.protocols.map((e=>e+":")),Ho=(e,[n,t])=>(e.on("end",t).on("error",t),n);function $o(e,n){e.beforeRedirects.proxy&&e.beforeRedirects.proxy(e),e.beforeRedirects.config&&e.beforeRedirects.config(e,n)}function Go(e,n,t){let a=n;if(!a&&!1!==a){const e=Ci(t);e&&(a=new URL(e))}if(a){if(a.username&&(a.auth=(a.username||"")+":"+(a.password||"")),a.auth){(a.auth.username||a.auth.password)&&(a.auth=(a.auth.username||"")+":"+(a.auth.password||""));const n=Buffer.from(a.auth,"utf8").toString("base64");e.headers["Proxy-Authorization"]="Basic "+n}e.headers.host=e.hostname+(e.port?":"+e.port:"");const n=a.hostname||a.host;e.hostname=n,e.host=n,e.port=a.port,e.path=t,a.protocol&&(e.protocol=a.protocol.includes(":")?a.protocol:`${a.protocol}:`)}e.beforeRedirects.proxy=function(e){Go(e,n,e.href)}}const Ko="undefined"!=typeof process&&"process"===Mt.kindOf(process),Wo=(e,n)=>(({address:e,family:n})=>{if(!Mt.isString(e))throw TypeError("address must be a string");return{address:e,family:n||(e.indexOf(".")<0?6:4)}})(Mt.isObject(e)?e:{address:e,family:n});var Vo=Ko&&function(e){return n=async function(n,t,a){let{data:i,lookup:o,family:r}=e;const{responseType:c,responseEncoding:l}=e,f=e.method.toUpperCase();let h,x,g=!1;if(o){const e=Ao(o,(e=>Mt.isArray(e)?e:[e]));o=(n,t,a)=>{e(n,t,((e,n,i)=>{if(e)return a(e);const o=Mt.isArray(n)?n.map((e=>Wo(e))):[Wo(n,i)];t.all?a(e,o):a(e,o[0].address,o[0].family)}))}}const D=new b,y=()=>{e.cancelToken&&e.cancelToken.unsubscribe(w),e.signal&&e.signal.removeEventListener("abort",w),D.removeAllListeners()};function w(n){D.emit("abort",!n||n.type?new di(null,e,x):n)}a(((e,n)=>{h=!0,n&&(g=!0,y())})),D.once("abort",t),(e.cancelToken||e.signal)&&(e.cancelToken&&e.cancelToken.subscribe(w),e.signal&&(e.signal.aborted?w():e.signal.addEventListener("abort",w)));const _=fi(e.baseURL,e.url),C=new URL(_,ni.hasBrowserEnv?ni.origin:void 0),E=C.protocol||Mo[0];if("data:"===E){let a;if("GET"!==f)return mi(n,t,{status:405,statusText:"method not allowed",headers:{},config:e});try{a=function(e,n,t){const a=t&&t.Blob||ni.classes.Blob,i=Do(e);if(void 0===n&&a&&(n=!0),"data"===i){e=i.length?e.slice(i.length+1):e;const t=yo.exec(e);if(!t)throw new Ht("Invalid URL",Ht.ERR_INVALID_URL);const o=t[1],s=t[2],r=t[3],c=Buffer.from(decodeURIComponent(r),s?"base64":"utf8");if(n){if(!a)throw new Ht("Blob is not supported",Ht.ERR_NOT_SUPPORT);return new a([c],{type:o})}return c}throw new Ht("Unsupported protocol "+i,Ht.ERR_NOT_SUPPORT)}(e.url,"blob"===c,{Blob:e.env&&e.env.Blob})}catch(n){throw Ht.from(n,Ht.ERR_BAD_REQUEST,e)}return"text"===c?(a=a.toString(l),l&&"utf8"!==l||(a=Mt.stripBOM(a))):"stream"===c&&(a=d.Readable.from(a)),mi(n,t,{data:a,status:200,statusText:"OK",headers:new ui,config:e})}if(-1===Mo.indexOf(E))return t(new Ht("Unsupported protocol "+E,Ht.ERR_BAD_REQUEST,e));const F=ui.from(e.headers).normalize();F.set("User-Agent","axios/"+go,!1);const{onUploadProgress:k,onDownloadProgress:j}=e,T=e.maxRate;let S,O;if(Mt.isSpecCompliantForm(i)){const e=F.getContentType(/boundary=([-_\w\d]{10,70})/i);i=((e,n,t)=>{const{tag:a="form-data-boundary",size:i=25,boundary:o=a+"-"+Mt.generateString(i,Fo)}=t||{};if(!Mt.isFormData(e))throw TypeError("FormData instance required");if(o.length<1||o.length>70)throw Error("boundary must be 10-70 characters long");const s=ko.encode("--"+o+jo),r=ko.encode("--"+o+"--"+jo+jo);let c=r.byteLength;const u=Array.from(e.entries()).map((([e,n])=>{const t=new So(e,n);return c+=t.size,t}));c+=s.byteLength*u.length,c=Mt.toFiniteNumber(c);const p={"Content-Type":`multipart/form-data; boundary=${o}`};return Number.isFinite(c)&&(p["Content-Length"]=c),n&&n(p),m.from(async function*(){for(const e of u)yield s,yield*e.encode();yield r}())})(i,(e=>{F.set(e)}),{tag:`axios-${go}-boundary`,boundary:e&&e[1]||void 0})}else if(Mt.isFormData(i)&&Mt.isFunction(i.getHeaders)){if(F.set(i.getHeaders()),!F.hasContentLength())try{const e=await s.promisify(i.getLength).call(i);Number.isFinite(e)&&e>=0&&F.setContentLength(e)}catch(e){}}else if(Mt.isBlob(i))i.size&&F.setContentType(i.type||"application/octet-stream"),F.setContentLength(i.size||0),i=d.Readable.from(Eo(i));else if(i&&!Mt.isStream(i)){if(Buffer.isBuffer(i));else if(Mt.isArrayBuffer(i))i=Buffer.from(new Uint8Array(i));else{if(!Mt.isString(i))return t(new Ht("Data after transformation must be a string, an ArrayBuffer, a Buffer, or a Stream",Ht.ERR_BAD_REQUEST,e));i=Buffer.from(i,"utf-8")}if(F.setContentLength(i.length,!1),e.maxBodyLength>-1&&i.length>e.maxBodyLength)return t(new Ht("Request body larger than maxBodyLength limit",Ht.ERR_BAD_REQUEST,e))}const A=Mt.toFiniteNumber(F.getContentLength());let R,B;Mt.isArray(T)?(S=T[0],O=T[1]):S=O=T,i&&(k||S)&&(Mt.isStream(i)||(i=d.Readable.from(i,{objectMode:!1})),i=d.pipeline([i,new _o({maxRate:Mt.toFiniteNumber(S)})],Mt.noop),k&&i.on("progress",Ho(i,Bo(A,Ro(Lo(k),!1,3))))),e.auth&&(R=(e.auth.username||"")+":"+(e.auth.password||"")),!R&&C.username&&(R=C.username+":"+C.password),R&&F.delete("authorization");try{B=Ka(C.pathname+C.search,e.params,e.paramsSerializer).replace(/^\?/,"")}catch(n){const a=new Error(n.message);return a.config=e,a.url=e.url,a.exists=!0,t(a)}F.set("Accept-Encoding","gzip, compress, deflate"+(Io?", br":""),!1);const L={path:B,method:f,headers:F.toJSON(),agents:{http:e.httpAgent,https:e.httpsAgent},auth:R,protocol:E,family:r,beforeRedirect:$o,beforeRedirects:{}};let N;!Mt.isUndefined(o)&&(L.lookup=o),e.socketPath?L.socketPath=e.socketPath:(L.hostname=C.hostname.startsWith("[")?C.hostname.slice(1,-1):C.hostname,L.port=C.port,Go(L,e.proxy,E+"//"+C.hostname+(C.port?":"+C.port:"")+L.path));const P=qo.test(L.protocol);if(L.agent=P?e.httpsAgent:e.httpAgent,e.transport?N=e.transport:0===e.maxRedirects?N=P?p:u:(e.maxRedirects&&(L.maxRedirects=e.maxRedirects),e.beforeRedirect&&(L.beforeRedirects.config=e.beforeRedirect),N=P?Uo:zo),e.maxBodyLength>-1?L.maxBodyLength=e.maxBodyLength:L.maxBodyLength=1/0,e.insecureHTTPParser&&(L.insecureHTTPParser=e.insecureHTTPParser),x=N.request(L,(function(a){if(x.destroyed)return;const i=[a],o=+a.headers["content-length"];if(j||O){const e=new _o({maxRate:Mt.toFiniteNumber(O)});j&&e.on("progress",Ho(e,Bo(o,Ro(Lo(j),!0,3)))),i.push(e)}let s=a;const r=a.req||x;if(!1!==e.decompress&&a.headers["content-encoding"])switch("HEAD"!==f&&204!==a.statusCode||delete a.headers["content-encoding"],(a.headers["content-encoding"]||"").toLowerCase()){case"gzip":case"x-gzip":case"compress":case"x-compress":i.push(v.createUnzip(No)),delete a.headers["content-encoding"];break;case"deflate":i.push(new Oo),i.push(v.createUnzip(No)),delete a.headers["content-encoding"];break;case"br":Io&&(i.push(v.createBrotliDecompress(Po)),delete a.headers["content-encoding"])}s=i.length>1?d.pipeline(i,Mt.noop):i[0];const u=d.finished(s,(()=>{u(),y()})),p={status:a.statusCode,statusText:a.statusMessage,headers:new ui(a.headers),config:e,request:r};if("stream"===c)p.data=s,mi(n,t,p);else{const a=[];let i=0;s.on("data",(function(n){a.push(n),i+=n.length,e.maxContentLength>-1&&i>e.maxContentLength&&(g=!0,s.destroy(),t(new Ht("maxContentLength size of "+e.maxContentLength+" exceeded",Ht.ERR_BAD_RESPONSE,e,r)))})),s.on("aborted",(function(){if(g)return;const n=new Ht("maxContentLength size of "+e.maxContentLength+" exceeded",Ht.ERR_BAD_RESPONSE,e,r);s.destroy(n),t(n)})),s.on("error",(function(n){x.destroyed||t(Ht.from(n,null,e,r))})),s.on("end",(function(){try{let e=1===a.length?a[0]:Buffer.concat(a);"arraybuffer"!==c&&(e=e.toString(l),l&&"utf8"!==l||(e=Mt.stripBOM(e))),p.data=e}catch(n){return t(Ht.from(n,null,e,p.request,p))}mi(n,t,p)}))}D.once("abort",(e=>{s.destroyed||(s.emit("error",e),s.destroy())}))})),D.once("abort",(e=>{t(e),x.destroy(e)})),x.on("error",(function(n){t(Ht.from(n,null,e,x))})),x.on("socket",(function(e){e.setKeepAlive(!0,6e4)})),e.timeout){const n=parseInt(e.timeout,10);if(Number.isNaN(n))return void t(new Ht("error trying to parse `config.timeout` to int",Ht.ERR_BAD_OPTION_VALUE,e,x));x.setTimeout(n,(function(){if(h)return;let n=e.timeout?"timeout of "+e.timeout+"ms exceeded":"timeout exceeded";const a=e.transitional||Va;e.timeoutErrorMessage&&(n=e.timeoutErrorMessage),t(new Ht(n,a.clarifyTimeoutError?Ht.ETIMEDOUT:Ht.ECONNABORTED,e,x)),w()}))}if(Mt.isStream(i)){let n=!1,t=!1;i.on("end",(()=>{n=!0})),i.once("error",(e=>{t=!0,x.destroy(e)})),i.on("close",(()=>{n||t||w(new di("Request stream has been aborted",e,x))})),i.pipe(x)}else x.end(i)},new Promise(((e,t)=>{let a,i;const o=(e,n)=>{i||(i=!0,a&&a(e,n))},s=e=>{o(e,!0),t(e)};n((n=>{o(n),e(n)}),s,(e=>a=e)).catch(s)}));var n},Yo=ni.hasStandardBrowserEnv?function(){const e=ni.navigator&&/(msie|trident)/i.test(ni.navigator.userAgent),n=document.createElement("a");let t;function a(t){let a=t;return e&&(n.setAttribute("href",a),a=n.href),n.setAttribute("href",a),{href:n.href,protocol:n.protocol?n.protocol.replace(/:$/,""):"",host:n.host,search:n.search?n.search.replace(/^\?/,""):"",hash:n.hash?n.hash.replace(/^#/,""):"",hostname:n.hostname,port:n.port,pathname:"/"===n.pathname.charAt(0)?n.pathname:"/"+n.pathname}}return t=a(window.location.href),function(e){const n=Mt.isString(e)?a(e):e;return n.protocol===t.protocol&&n.host===t.host}}():function(){return!0},Jo=ni.hasStandardBrowserEnv?{write(e,n,t,a,i,o){const s=[e+"="+encodeURIComponent(n)];Mt.isNumber(t)&&s.push("expires="+new Date(t).toGMTString()),Mt.isString(a)&&s.push("path="+a),Mt.isString(i)&&s.push("domain="+i),!0===o&&s.push("secure"),document.cookie=s.join("; ")},read(e){const n=document.cookie.match(new RegExp("(^|;\\s*)("+e+")=([^;]*)"));return n?decodeURIComponent(n[3]):null},remove(e){this.write(e,"",Date.now()-864e5)}}:{write(){},read:()=>null,remove(){}};const Xo=e=>e instanceof ui?{...e}:e;function Zo(e,n){n=n||{};const t={};function a(e,n,t){return Mt.isPlainObject(e)&&Mt.isPlainObject(n)?Mt.merge.call({caseless:t},e,n):Mt.isPlainObject(n)?Mt.merge({},n):Mt.isArray(n)?n.slice():n}function i(e,n,t){return Mt.isUndefined(n)?Mt.isUndefined(e)?void 0:a(void 0,e,t):a(e,n,t)}function o(e,n){if(!Mt.isUndefined(n))return a(void 0,n)}function s(e,n){return Mt.isUndefined(n)?Mt.isUndefined(e)?void 0:a(void 0,e):a(void 0,n)}function r(t,i,o){return o in n?a(t,i):o in e?a(void 0,t):void 0}const c={url:o,method:o,data:o,baseURL:s,transformRequest:s,transformResponse:s,paramsSerializer:s,timeout:s,timeoutMessage:s,withCredentials:s,withXSRFToken:s,adapter:s,responseType:s,xsrfCookieName:s,xsrfHeaderName:s,onUploadProgress:s,onDownloadProgress:s,decompress:s,maxContentLength:s,maxBodyLength:s,beforeRedirect:s,transport:s,httpAgent:s,httpsAgent:s,cancelToken:s,socketPath:s,responseEncoding:s,validateStatus:r,headers:(e,n)=>i(Xo(e),Xo(n),!0)};return Mt.forEach(Object.keys(Object.assign({},e,n)),(function(a){const o=c[a]||i,s=o(e[a],n[a],a);Mt.isUndefined(s)&&o!==r||(t[a]=s)})),t}var Qo=e=>{const n=Zo({},e);let t,{data:a,withXSRFToken:i,xsrfHeaderName:o,xsrfCookieName:s,headers:r,auth:c}=n;if(n.headers=r=ui.from(r),n.url=Ka(fi(n.baseURL,n.url),e.params,e.paramsSerializer),c&&r.set("Authorization","Basic "+btoa((c.username||"")+":"+(c.password?unescape(encodeURIComponent(c.password)):""))),Mt.isFormData(a))if(ni.hasStandardBrowserEnv||ni.hasStandardBrowserWebWorkerEnv)r.setContentType(void 0);else if(!1!==(t=r.getContentType())){const[e,...n]=t?t.split(";").map((e=>e.trim())).filter(Boolean):[];r.setContentType([e||"multipart/form-data",...n].join("; "))}if(ni.hasStandardBrowserEnv&&(i&&Mt.isFunction(i)&&(i=i(n)),i||!1!==i&&Yo(n.url))){const e=o&&s&&Jo.read(s);e&&r.set(o,e)}return n};var es="undefined"!=typeof XMLHttpRequest&&function(e){return new Promise((function(n,t){const a=Qo(e);let i=a.data;const o=ui.from(a.headers).normalize();let s,r,c,u,p,{responseType:l,onUploadProgress:d,onDownloadProgress:m}=a;function f(){u&&u(),p&&p(),a.cancelToken&&a.cancelToken.unsubscribe(s),a.signal&&a.signal.removeEventListener("abort",s)}let h=new XMLHttpRequest;function v(){if(!h)return;const a=ui.from("getAllResponseHeaders"in h&&h.getAllResponseHeaders());mi((function(e){n(e),f()}),(function(e){t(e),f()}),{data:l&&"text"!==l&&"json"!==l?h.response:h.responseText,status:h.status,statusText:h.statusText,headers:a,config:e,request:h}),h=null}h.open(a.method.toUpperCase(),a.url,!0),h.timeout=a.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&&(t(new Ht("Request aborted",Ht.ECONNABORTED,e,h)),h=null)},h.onerror=function(){t(new Ht("Network Error",Ht.ERR_NETWORK,e,h)),h=null},h.ontimeout=function(){let n=a.timeout?"timeout of "+a.timeout+"ms exceeded":"timeout exceeded";const i=a.transitional||Va;a.timeoutErrorMessage&&(n=a.timeoutErrorMessage),t(new Ht(n,i.clarifyTimeoutError?Ht.ETIMEDOUT:Ht.ECONNABORTED,e,h)),h=null},void 0===i&&o.setContentType(null),"setRequestHeader"in h&&Mt.forEach(o.toJSON(),(function(e,n){h.setRequestHeader(n,e)})),Mt.isUndefined(a.withCredentials)||(h.withCredentials=!!a.withCredentials),l&&"json"!==l&&(h.responseType=a.responseType),m&&([c,p]=Ro(m,!0),h.addEventListener("progress",c)),d&&h.upload&&([r,u]=Ro(d),h.upload.addEventListener("progress",r),h.upload.addEventListener("loadend",u)),(a.cancelToken||a.signal)&&(s=n=>{h&&(t(!n||n.type?new di(null,e,h):n),h.abort(),h=null)},a.cancelToken&&a.cancelToken.subscribe(s),a.signal&&(a.signal.aborted?s():a.signal.addEventListener("abort",s)));const x=Do(a.url);x&&-1===ni.protocols.indexOf(x)?t(new Ht("Unsupported protocol "+x+":",Ht.ERR_BAD_REQUEST,e)):h.send(i||null)}))};const ns=(e,n)=>{const{length:t}=e=e?e.filter(Boolean):[];if(n||t){let t,a=new AbortController;const i=function(e){if(!t){t=!0,s();const n=e instanceof Error?e:this.reason;a.abort(n instanceof Ht?n:new di(n instanceof Error?n.message:n))}};let o=n&&setTimeout((()=>{o=null,i(new Ht(`timeout ${n} of ms exceeded`,Ht.ETIMEDOUT))}),n);const s=()=>{e&&(o&&clearTimeout(o),o=null,e.forEach((e=>{e.unsubscribe?e.unsubscribe(i):e.removeEventListener("abort",i)})),e=null)};e.forEach((e=>e.addEventListener("abort",i)));const{signal:r}=a;return r.unsubscribe=()=>Mt.asap(s),r}},ts=function*(e,n){let t=e.byteLength;if(t<n)return void(yield e);let a,i=0;for(;i<t;)a=i+n,yield e.slice(i,a),i=a},as=async function*(e){if(e[Symbol.asyncIterator])return void(yield*e);const n=e.getReader();try{for(;;){const{done:e,value:t}=await n.read();if(e)break;yield t}}finally{await n.cancel()}},is=(e,n,t,a)=>{const i=async function*(e,n){for await(const t of as(e))yield*ts(t,n)}(e,n);let o,s=0,r=e=>{o||(o=!0,a&&a(e))};return new ReadableStream({async pull(e){try{const{done:n,value:a}=await i.next();if(n)return r(),void e.close();let o=a.byteLength;if(t){let e=s+=o;t(e)}e.enqueue(new Uint8Array(a))}catch(e){throw r(e),e}},cancel:e=>(r(e),i.return())},{highWaterMark:2})},os="function"==typeof fetch&&"function"==typeof Request&&"function"==typeof Response,ss=os&&"function"==typeof ReadableStream,rs=os&&("function"==typeof TextEncoder?(cs=new TextEncoder,e=>cs.encode(e)):async e=>new Uint8Array(await new Response(e).arrayBuffer()));var cs;const us=(e,...n)=>{try{return!!e(...n)}catch(e){return!1}},ps=ss&&us((()=>{let e=!1;const n=new Request(ni.origin,{body:new ReadableStream,method:"POST",get duplex(){return e=!0,"half"}}).headers.has("Content-Type");return e&&!n})),ls=ss&&us((()=>Mt.isReadableStream(new Response("").body))),ds={stream:ls&&(e=>e.body)};var ms;os&&(ms=new Response,["text","arrayBuffer","blob","formData","stream"].forEach((e=>{!ds[e]&&(ds[e]=Mt.isFunction(ms[e])?n=>n[e]():(n,t)=>{throw new Ht(`Response type '${e}' is not supported`,Ht.ERR_NOT_SUPPORT,t)})})));const fs=async(e,n)=>{const t=Mt.toFiniteNumber(e.getContentLength());return null==t?(async e=>{if(null==e)return 0;if(Mt.isBlob(e))return e.size;if(Mt.isSpecCompliantForm(e)){const n=new Request(ni.origin,{method:"POST",body:e});return(await n.arrayBuffer()).byteLength}return Mt.isArrayBufferView(e)||Mt.isArrayBuffer(e)?e.byteLength:(Mt.isURLSearchParams(e)&&(e+=""),Mt.isString(e)?(await rs(e)).byteLength:void 0)})(n):t};var hs=os&&(async e=>{let{url:n,method:t,data:a,signal:i,cancelToken:o,timeout:s,onDownloadProgress:r,onUploadProgress:c,responseType:u,headers:p,withCredentials:l="same-origin",fetchOptions:d}=Qo(e);u=u?(u+"").toLowerCase():"text";let m,f=ns([i,o&&o.toAbortSignal()],s);const h=f&&f.unsubscribe&&(()=>{f.unsubscribe()});let v;try{if(c&&ps&&"get"!==t&&"head"!==t&&0!==(v=await fs(p,a))){let e,t=new Request(n,{method:"POST",body:a,duplex:"half"});if(Mt.isFormData(a)&&(e=t.headers.get("content-type"))&&p.setContentType(e),t.body){const[e,n]=Bo(v,Ro(Lo(c)));a=is(t.body,65536,e,n)}}Mt.isString(l)||(l=l?"include":"omit");const i="credentials"in Request.prototype;m=new Request(n,{...d,signal:f,method:t.toUpperCase(),headers:p.normalize().toJSON(),body:a,duplex:"half",credentials:i?l:void 0});let o=await fetch(m);const s=ls&&("stream"===u||"response"===u);if(ls&&(r||s&&h)){const e={};["status","statusText","headers"].forEach((n=>{e[n]=o[n]}));const n=Mt.toFiniteNumber(o.headers.get("content-length")),[t,a]=r&&Bo(n,Ro(Lo(r),!0))||[];o=new Response(is(o.body,65536,t,(()=>{a&&a(),h&&h()})),e)}u=u||"text";let x=await ds[Mt.findKey(ds,u)||"text"](o,e);return!s&&h&&h(),await new Promise(((n,t)=>{mi(n,t,{data:x,headers:ui.from(o.headers),status:o.status,statusText:o.statusText,config:e,request:m})}))}catch(n){if(h&&h(),n&&"TypeError"===n.name&&/fetch/i.test(n.message))throw Object.assign(new Ht("Network Error",Ht.ERR_NETWORK,e,m),{cause:n.cause||n});throw Ht.from(n,n&&n.code,e,m)}});const vs={http:Vo,xhr:es,fetch:hs};Mt.forEach(vs,((e,n)=>{if(e){try{Object.defineProperty(e,"name",{value:n})}catch(e){}Object.defineProperty(e,"adapterName",{value:n})}}));const xs=e=>`- ${e}`,bs=e=>Mt.isFunction(e)||null===e||!1===e;var gs=e=>{e=Mt.isArray(e)?e:[e];const{length:n}=e;let t,a;const i={};for(let o=0;o<n;o++){let n;if(t=e[o],a=t,!bs(t)&&(a=vs[(n=String(t)).toLowerCase()],void 0===a))throw new Ht(`Unknown adapter '${n}'`);if(a)break;i[n||"#"+o]=a}if(!a){const e=Object.entries(i).map((([e,n])=>`adapter ${e} `+(!1===n?"is not supported by the environment":"is not available in the build")));throw new Ht("There is no suitable adapter to dispatch the request "+(n?e.length>1?"since :\n"+e.map(xs).join("\n"):" "+xs(e[0]):"as no adapter specified"),"ERR_NOT_SUPPORT")}return a};function Ds(e){if(e.cancelToken&&e.cancelToken.throwIfRequested(),e.signal&&e.signal.aborted)throw new di(null,e)}function ys(e){Ds(e),e.headers=ui.from(e.headers),e.data=pi.call(e,e.transformRequest),-1!==["post","put","patch"].indexOf(e.method)&&e.headers.setContentType("application/x-www-form-urlencoded",!1);return gs(e.adapter||ai.adapter)(e).then((function(n){return Ds(e),n.data=pi.call(e,e.transformResponse,n),n.headers=ui.from(n.headers),n}),(function(n){return li(n)||(Ds(e),n&&n.response&&(n.response.data=pi.call(e,e.transformResponse,n.response),n.response.headers=ui.from(n.response.headers))),Promise.reject(n)}))}const ws={};["object","boolean","number","function","string","symbol"].forEach(((e,n)=>{ws[e]=function(t){return typeof t===e||"a"+(n<1?"n ":" ")+e}}));const _s={};ws.transitional=function(e,n,t){function a(e,n){return"[Axios v1.7.7] Transitional option '"+e+"'"+n+(t?". "+t:"")}return(t,i,o)=>{if(!1===e)throw new Ht(a(i," has been removed"+(n?" in "+n:"")),Ht.ERR_DEPRECATED);return n&&!_s[i]&&(_s[i]=!0,console.warn(a(i," has been deprecated since v"+n+" and will be removed in the near future"))),!e||e(t,i,o)}};var Cs={assertOptions:function(e,n,t){if("object"!=typeof e)throw new Ht("options must be an object",Ht.ERR_BAD_OPTION_VALUE);const a=Object.keys(e);let i=a.length;for(;i-- >0;){const o=a[i],s=n[o];if(s){const n=e[o],t=void 0===n||s(n,o,e);if(!0!==t)throw new Ht("option "+o+" must be "+t,Ht.ERR_BAD_OPTION_VALUE)}else if(!0!==t)throw new Ht("Unknown option "+o,Ht.ERR_BAD_OPTION)}},validators:ws};const Es=Cs.validators;class Fs{constructor(e){this.defaults=e,this.interceptors={request:new Wa,response:new Wa}}async request(e,n){try{return await this._request(e,n)}catch(e){if(e instanceof Error){let n;Error.captureStackTrace?Error.captureStackTrace(n={}):n=new Error;const t=n.stack?n.stack.replace(/^.+\n/,""):"";try{e.stack?t&&!String(e.stack).endsWith(t.replace(/^.+\n.+\n/,""))&&(e.stack+="\n"+t):e.stack=t}catch(e){}}throw e}}_request(e,n){"string"==typeof e?(n=n||{}).url=e:n=e||{},n=Zo(this.defaults,n);const{transitional:t,paramsSerializer:a,headers:i}=n;void 0!==t&&Cs.assertOptions(t,{silentJSONParsing:Es.transitional(Es.boolean),forcedJSONParsing:Es.transitional(Es.boolean),clarifyTimeoutError:Es.transitional(Es.boolean)},!1),null!=a&&(Mt.isFunction(a)?n.paramsSerializer={serialize:a}:Cs.assertOptions(a,{encode:Es.function,serialize:Es.function},!0)),n.method=(n.method||this.defaults.method||"get").toLowerCase();let o=i&&Mt.merge(i.common,i[n.method]);i&&Mt.forEach(["delete","get","head","post","put","patch","common"],(e=>{delete i[e]})),n.headers=ui.concat(o,i);const s=[];let r=!0;this.interceptors.request.forEach((function(e){"function"==typeof e.runWhen&&!1===e.runWhen(n)||(r=r&&e.synchronous,s.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(!r){const e=[ys.bind(this),void 0];for(e.unshift.apply(e,s),e.push.apply(e,c),p=e.length,u=Promise.resolve(n);l<p;)u=u.then(e[l++],e[l++]);return u}p=s.length;let d=n;for(l=0;l<p;){const e=s[l++],n=s[l++];try{d=e(d)}catch(e){n.call(this,e);break}}try{u=ys.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 Ka(fi((e=Zo(this.defaults,e)).baseURL,e.url),e.params,e.paramsSerializer)}}Mt.forEach(["delete","get","head","options"],(function(e){Fs.prototype[e]=function(n,t){return this.request(Zo(t||{},{method:e,url:n,data:(t||{}).data}))}})),Mt.forEach(["post","put","patch"],(function(e){function n(n){return function(t,a,i){return this.request(Zo(i||{},{method:e,headers:n?{"Content-Type":"multipart/form-data"}:{},url:t,data:a}))}}Fs.prototype[e]=n(),Fs.prototype[e+"Form"]=n(!0)}));class ks{constructor(e){if("function"!=typeof e)throw new TypeError("executor must be a function.");let n;this.promise=new Promise((function(e){n=e}));const t=this;this.promise.then((e=>{if(!t._listeners)return;let n=t._listeners.length;for(;n-- >0;)t._listeners[n](e);t._listeners=null})),this.promise.then=e=>{let n;const a=new Promise((e=>{t.subscribe(e),n=e})).then(e);return a.cancel=function(){t.unsubscribe(n)},a},e((function(e,a,i){t.reason||(t.reason=new di(e,a,i),n(t.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 n=this._listeners.indexOf(e);-1!==n&&this._listeners.splice(n,1)}toAbortSignal(){const e=new AbortController,n=n=>{e.abort(n)};return this.subscribe(n),e.signal.unsubscribe=()=>this.unsubscribe(n),e.signal}static source(){let e;return{token:new ks((function(n){e=n})),cancel:e}}}const js={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};Object.entries(js).forEach((([e,n])=>{js[n]=e}));const Ts=function e(n){const t=new Fs(n),a=Zn(Fs.prototype.request,t);return Mt.extend(a,Fs.prototype,t,{allOwnKeys:!0}),Mt.extend(a,t,null,{allOwnKeys:!0}),a.create=function(t){return e(Zo(n,t))},a}(ai);Ts.Axios=Fs,Ts.CanceledError=di,Ts.CancelToken=ks,Ts.isCancel=li,Ts.VERSION=go,Ts.toFormData=qa,Ts.AxiosError=Ht,Ts.Cancel=Ts.CanceledError,Ts.all=function(e){return Promise.all(e)},Ts.spread=function(e){return function(n){return e.apply(null,n)}},Ts.isAxiosError=function(e){return Mt.isObject(e)&&!0===e.isAxiosError},Ts.mergeConfig=Zo,Ts.AxiosHeaders=ui,Ts.formToJSON=e=>ti(Mt.isHTMLForm(e)?new FormData(e):e),Ts.getAdapter=gs,Ts.HttpStatusCode=js,Ts.default=Ts;const Ss="/api/v1",Os=e=>{const n=(t=e,Object.entries(t).reduce(((e,n)=>(e[Mn(n[0])]=n[1],e)),{}));var t;return Ts.post(`${Ss}/reporter/runs`,{run:n},{skipSnakeCaseConversion:!0})},As=(e,n)=>Ts.put(`${Ss}/reporter/runs/${e}`,{run:n}),Rs=e=>Ts.get(`${Ss}/reporter/runs/${e}/heartbeat`),Bs=(e,n)=>Ts.post(`${Ss}/reporter/runs/${e}/test_entities`,{testEntity:n}),Ls="=".repeat(10),Ns={testData:(e,n)=>{let t=`\n-------Started reporting to NeetoPlaydash 🎭-------\nCI Build ID: ${e}\n`;return n&&(t+=`Total shards: ${n.total}\nCurrent shards: ${n.current}\n`),t+=`${"-".repeat(50)}\n`,t}},Ps={startingTest:(e,n)=>`${Ls}Starting ${e}${Ls}\n Time: ${(new Date).toUTCString()}\n History ID: ${n}`},Is={reportedTest:({title:e,status:n,historyId:t,completedAt:a,error:i,isTestReported:o=!0})=>{let s=`\n\n${o?"------------Reported to NeetoPlaydash------------":"-".repeat(49)}\n Title: ${e}\n History id: ${t}\n Status: ${n}\n Completed at: ${a}\n`;return s=i?s.concat(` Error:\n\n ${i.replaceAll("\n","\n ")}`):s,s.concat(`\n${"-".repeat(49)}\n`)}},zs={runReported:"Run completed and reported to NeetoPlaydash 🎉\n\n",finalStatus:({currentShard:e,status:n,duration:t})=>{let a=`------------------Run completed-------------------\n Status: ${n}\n Duration: ${(e=>{const n={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(n).filter((([e,n])=>0!==n)).map((([e,n])=>n+" "+(1!==n?`${e}s`:e))).join(", ")})(null!=t?t:0)}\n`;return a=0!==e?a.concat(` Shard: ${e}`):a,a.concat(`\n${"-".repeat(50)}\n`)}},Us=({command:e,messageOnError:n,shouldThrowError:t=!1,logLevel:a="warning"})=>{try{return g.execSync(e).toString().trim()}catch(e){if(t)throw e;L[a](n)}},qs=(e,n)=>{var t;const{title:a,parent:o,location:{file:s}}=e,r=e.titlePath(),c=null===(t=o.project())||void 0===t?void 0:t.name,u=i.relative(n,s),p=(({titlePath:e,title:n,project:t,rootDir:a,file:o})=>e.filter(((e,s)=>0!==s&&e!==n&&e!==t&&e!==i.relative(a,o))))({titlePath:r,title:a,project:c,rootDir:n,file:s});return{title:a,describe:p,project:c,spec:u,historyId:(({projectId:e,specName:n,describeTitles:t,testTitle:a})=>{const i=`[project=${e}]${n}${[...t,a].join("")}`,o=Wn(i);return`${Wn(n)}-${o}`})({projectId:null!=c?c:"",specName:u,describeTitles:p,testTitle:a})}},Ms=({rootDir:e},n)=>Ne(n.allTests().map((n=>qs(n,e)))),Hs=async e=>{try{await Rs(e)}catch(e){L.error(e.message),L.redText(A.stopped),process.exit(1)}},$s=async(e,n,t)=>{var a,i,o;const s=n.shard;e.config=n;const r=e.currentShard=null!==(a=null==s?void 0:s.current)&&void 0!==a?a:0;j.setContext({ciBuildId:e.ciBuildId,currentShard:null==s?void 0:s.current,rootDir:n.rootDir}),e.totalTestCount=t.allTests().length,e.rootDir=n.rootDir;const c={commitId:Us({command:"git rev-parse HEAD",messageOnError:T.failedToGetCommitSha}),commitName:Us({command:"git show-branch --no-name HEAD",messageOnError:T.failedToGetCommitMessage}),author:Us({command:"git show -s --format='%an' HEAD",messageOnError:T.failedToGetBranch}),branch:Us({command:"git branch --show-current",messageOnError:T.failedToGetBranch}),tags:"string"==typeof e.tags?e.tags.split(","):e.tags,ciBuildId:e.ciBuildId,configuration:{...n,baseDir:process.cwd()},shards:$n({currentShard:r})};try{if(await Os(c),e.hasRunStarted=!0,0===e.totalTestCount)return void L.redText(T.noTestsToReport);await Hs(e.ciBuildId),e.heartbeatInterval=setInterval((async()=>await Hs(e.ciBuildId)),45e3);const{data:a}=await Bs(e.ciBuildId,{testEntities:Ms(n,t),shard:r});e.attempts=a,L.log(Ns.testData(e.ciBuildId,s))}catch(a){e.shouldNotReportTest=!0;const s=a,r=null===(i=s.response)||void 0===i?void 0:i.data;L.error(null!==(o=null==r?void 0:r.error)&&void 0!==o?o:s.message),L.error(T.failedToInitializeRun),await Xn({context:{...c,testEntities:Ms(n,t)},error:a,title:"onBegin"}),((e,n)=>{var t,a;const{error:i}=null===(t=e.response)||void 0===t?void 0:t.data,o=null===(a=e.response)||void 0===a?void 0:a.status;n.shouldNotReportTest=!0,"Project does not exist."===i&&404===o?(L.redText(T.invalidProjectKey),process.exit(1)):"Could not authenticate, invalid API Key"===i&&401===o||"api-key"===n.apiKey?(L.redText(T.invalidApiKey),process.exit(1)):[w,_].includes(i)&&422===o?(L.redText(T.duplicateCiBuildId),process.exit(1)):(422===o&&(process.kill(process.pid,"SIGKILL"),process.exit(1)),Jn(o)&&L.yellowText(null!=i?i:e.message),L.yellowText(T.testsWillNotBeReported))})(s,e),clearInterval(e.heartbeatInterval)}},Gs=(e,n,t)=>Ts.post(`${Ss}/reporter/runs/${e}/test_entities/${n}/attempts`,t),Ks=({ciBuildId:e,historyId:n,id:t,payload:a})=>Ts.put(`${Ss}/reporter/runs/${e}/test_entities/${n}/attempts/${t}`,a),Ws=["screenshot","video","trace"],Vs=({location:e,snippet:n})=>{if(!e)return null;const{file:t,line:a,column:i}=e;return`# ${t} (${a}:${i}) \n\n\n ${n}`},Ys={KB:1024,MB:Math.pow(1024,2)},Js=(e,n)=>parseFloat((e/Ys[n]).toFixed(2));var Xs=class{constructor(e,n,t){this.etaBufferLength=e||100,this.valueBuffer=[t],this.timeBuffer=[n],this.eta="0"}update(e,n,t){this.valueBuffer.push(n),this.timeBuffer.push(e),this.calculate(t-n)}getTime(){return this.eta}calculate(e){const n=this.valueBuffer.length,t=Math.min(this.etaBufferLength,n),a=(this.valueBuffer[n-1]-this.valueBuffer[n-t])/(this.timeBuffer[n-1]-this.timeBuffer[n-t]);this.valueBuffer=this.valueBuffer.slice(-this.etaBufferLength),this.timeBuffer=this.timeBuffer.slice(-this.etaBufferLength);const i=Math.ceil(e/a/1e3);isNaN(i)?this.eta="NULL":isFinite(i)?this.eta=i>1e7?"INF":i<0?0:i:this.eta="INF"}};const Zs=D;var Qs=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,n=null){this.stream.isTTY&&Zs.cursorTo(this.stream,e,n)}cursorRelative(e=null,n=null){this.stream.isTTY&&(this.dy=this.dy+n,Zs.moveCursor(this.stream,e,n))}cursorRelativeReset(){this.stream.isTTY&&(Zs.moveCursor(this.stream,0,-this.dy),Zs.cursorTo(this.stream,0,null),this.dy=0)}clearRight(){this.stream.isTTY&&Zs.clearLine(this.stream,1)}clearLine(){this.stream.isTTY&&Zs.clearLine(this.stream,0)}clearBottom(){this.stream.isTTY&&Zs.clearScreenDown(this.stream)}newline(){this.stream.write("\n"),this.dy++}write(e,n=!1){!0===this.linewrap&&!1===n?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)}},er={exports:{}};const nr=({onlyFirst:e=!1}={})=>{const n=["[\\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(n,e?void 0:"g")};var tr={exports:{}};const ar=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));tr.exports=ar,tr.exports.default=ar;const ir=e=>"string"==typeof e?e.replace(nr(),""):e,or=tr.exports,sr=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},rr=e=>{if("string"!=typeof e||0===e.length)return 0;if(0===(e=ir(e)).length)return 0;e=e.replace(sr()," ");let n=0;for(let t=0;t<e.length;t++){const a=e.codePointAt(t);a<=31||a>=127&&a<=159||(a>=768&&a<=879||(a>65535&&t++,n+=or(a)?2:1))}return n};er.exports=rr,er.exports.default=rr;var cr=function(e,n,t){if(!0!==n.autopadding)return e;return"percentage"===t?(a=e,i=3,(n.autopaddingChar+a).slice(-i)):e;var a,i},ur=function(e,n){const t=Math.round(e*n.barsize),a=n.barsize-t;return n.barCompleteString.substr(0,t)+n.barGlue+n.barIncompleteString.substr(0,a)},pr=function(e,n,t){function a(e){return t?t*Math.round(e/t):e}function i(e){return(n.autopaddingChar+e).slice(-2)}return e>3600?i(Math.floor(e/3600))+"h"+i(a(e%3600/60))+"m":e>60?i(Math.floor(e/60))+"m"+i(a(e%60))+"s":e>10?i(a(e))+"s":i(e)+"s"};const lr=er.exports,dr=cr,mr=ur,fr=pr;var hr=function(e,n,t){let a=e.format;const i=e.formatTime||fr,o=e.formatValue||dr,s=e.formatBar||mr,r=Math.floor(100*n.progress)+"",c=n.stopTime||Date.now(),u=Math.round((c-n.startTime)/1e3),p=Object.assign({},t,{bar:s(n.progress,e),percentage:o(r,e,"percentage"),total:o(n.total,e,"total"),value:o(n.value,e,"value"),eta:o(n.eta,e,"eta"),eta_formatted:i(n.eta,e,5),duration:o(u,e,"duration"),duration_formatted:i(u,e,1)});a=a.replace(/\{(\w+)\}/g,(function(e,n){return void 0!==p[n]?p[n]:e}));const l=Math.max(0,n.maxWidth-lr(a)-2),d=Math.floor(l/2);switch(e.align){case"right":a=l>0?" ".repeat(l)+a:a;break;case"center":a=d>0?" ".repeat(d)+a:a}return a};function vr(e,n){return null==e?n:e}var xr={parse:function(e,n){const t={},a=Object.assign({},n,e);return t.throttleTime=1e3/vr(a.fps,10),t.stream=vr(a.stream,process.stderr),t.terminal=vr(a.terminal,null),t.clearOnComplete=vr(a.clearOnComplete,!1),t.stopOnComplete=vr(a.stopOnComplete,!1),t.barsize=vr(a.barsize,40),t.align=vr(a.align,"left"),t.hideCursor=vr(a.hideCursor,!1),t.linewrap=vr(a.linewrap,!1),t.barGlue=vr(a.barGlue,""),t.barCompleteChar=vr(a.barCompleteChar,"="),t.barIncompleteChar=vr(a.barIncompleteChar,"-"),t.format=vr(a.format,"progress [{bar}] {percentage}% | ETA: {eta}s | {value}/{total}"),t.formatTime=vr(a.formatTime,null),t.formatValue=vr(a.formatValue,null),t.formatBar=vr(a.formatBar,null),t.etaBufferLength=vr(a.etaBuffer,10),t.etaAsynchronousUpdate=vr(a.etaAsynchronousUpdate,!1),t.progressCalculationRelative=vr(a.progressCalculationRelative,!1),t.synchronousUpdate=vr(a.synchronousUpdate,!0),t.noTTYOutput=vr(a.noTTYOutput,!1),t.notTTYSchedule=vr(a.notTTYSchedule,2e3),t.emptyOnZero=vr(a.emptyOnZero,!1),t.forceRedraw=vr(a.forceRedraw,!1),t.autopadding=vr(a.autopadding,!1),t.gracefulExit=vr(a.gracefulExit,!1),t},assignDerivedOptions:function(e){return e.barCompleteString=e.barCompleteChar.repeat(e.barsize+1),e.barIncompleteString=e.barIncompleteChar.repeat(e.barsize+1),e.autopaddingChar=e.autopadding?vr(e.autopaddingChar," "):"",e}};const br=Xs,gr=Qs,Dr=hr,yr=xr,wr=x;var _r=class extends wr{constructor(e){super(),this.options=yr.assignDerivedOptions(e),this.terminal=this.options.terminal?this.options.terminal:new gr(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 br(this.options.etaBufferLength,0,0),this.payload={},this.isActive=!1,this.formatter="function"==typeof this.options.format?this.options.format:Dr}render(e=!1){const n={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 t=this.formatter(this.options,n,this.payload);(e||this.options.forceRedraw||this.options.noTTYOutput&&!this.terminal.isTTY()||this.lastDrawnString!=t)&&(this.emit("redraw-pre"),this.terminal.cursorTo(0,null),this.terminal.write(t),this.terminal.clearRight(),this.lastDrawnString=t,this.lastRedraw=Date.now(),this.emit("redraw-post"))}start(e,n,t){this.value=n||0,this.total=void 0!==e&&e>=0?e:100,this.startValue=n||0,this.payload=t||{},this.startTime=Date.now(),this.stopTime=null,this.lastDrawnString="",this.eta=new br(this.options.etaBufferLength,this.startTime,this.value),this.isActive=!0,this.emit("start",e,n)}stop(){this.isActive=!1,this.stopTime=Date.now(),this.emit("stop",this.total,this.value)}update(e,n={}){"number"==typeof e&&(this.value=e,this.eta.update(Date.now(),e,this.total));const t=("object"==typeof e?e:n)||{};this.emit("update",this.total,this.value);for(const e in t)this.payload[e]=t[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,n={}){"object"==typeof e?this.update(this.value+1,e):this.update(this.value+e,n)}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 Cr=_r,Er=xr;const Fr=Qs,kr=_r,jr=xr,Tr=x;var Sr={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:" {bar} {percentage}% | ETA: {eta}s | {value}/{total}",barCompleteChar:"█",barIncompleteChar:"░"},rect:{format:" {bar}■ {percentage}% | ETA: {eta}s | {value}/{total}",barCompleteChar:"■",barIncompleteChar:" "}};const Or=class extends Cr{constructor(e,n){super(Er.parse(e,n)),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,n){this.timer&&(super.update(e,n),this.options.synchronousUpdate&&this.lastRedraw+2*this.options.throttleTime<Date.now()&&this.render())}start(e,n,t){!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,n,t),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())}},Ar=class extends Tr{constructor(e,n){super(),this.bars=[],this.options=jr.parse(e,n),this.options.synchronousUpdate=!1,this.terminal=this.options.terminal?this.options.terminal:new Fr(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,n,t,a={}){const i=new kr(Object.assign({},this.options,{terminal:this.terminal},a));return this.bars.push(i),!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,i.start(e,n,t),this.emit("start")),i}remove(e){const n=this.bars.indexOf(e);return!(n<0)&&(this.bars.splice(n,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 Rr={Bar:Or,SingleBar:Or,MultiBar:Ar,Presets:Sr,Format:{Formatter:hr,BarFormat:ur,ValueFormat:cr,TimeFormat:pr}};const Br=(e,n)=>"flaky"===e?e:n,Lr=async(e,{url:n,headers:t},a)=>{const i=e.byteLength/1024>1024?"MB":"KB";const o=new Rr.Bar({format:`Uploading ${a} [{bar}] | {value}/{total} ${i} - ETA: {eta_formatted}`,clearOnComplete:!0},Rr.Presets.rect);return o.start(Js(e.byteLength,i),0),await((e,{url:n,headers:t},a)=>Ts.put(n,e,{...a,headers:t}))(e,{url:n,headers:t},{onUploadProgress:e=>{e.total&&e.lengthComputable&&o.update(Js(e.loaded,i))}}),o};var Nr,Pr,Ir={exports:{}};
9
- /*! https://mths.be/wtf8 v1.0.1 by @mathias */Nr=Ir,Pr=Ir.exports,function(e){var n=Pr,t=Nr&&Nr.exports==n&&Nr,a="object"==typeof C&&C;a.global!==a&&a.window!==a||(e=a);var i,o,s,r=String.fromCharCode;function c(e){for(var n,t,a=[],i=0,o=e.length;i<o;)(n=e.charCodeAt(i++))>=55296&&n<=56319&&i<o?56320==(64512&(t=e.charCodeAt(i++)))?a.push(((1023&n)<<10)+(1023&t)+65536):(a.push(n),i--):a.push(n);return a}function u(e,n){return r(e>>n&63|128)}function p(e){if(!(4294967168&e))return r(e);var n="";return 4294965248&e?4294901760&e?4292870144&e||(n=r(e>>18&7|240),n+=u(e,12),n+=u(e,6)):(n=r(e>>12&15|224),n+=u(e,6)):n=r(e>>6&31|192),n+=r(63&e|128)}function l(){if(s>=o)throw Error("Invalid byte index");var e=255&i[s];if(s++,128==(192&e))return 63&e;throw Error("Invalid continuation byte")}function d(){var e,n;if(s>o)throw Error("Invalid byte index");if(s==o)return!1;if(e=255&i[s],s++,!(128&e))return e;if(192==(224&e)){if((n=(31&e)<<6|l())>=128)return n;throw Error("Invalid continuation byte")}if(224==(240&e)){if((n=(15&e)<<12|l()<<6|l())>=2048)return n;throw Error("Invalid continuation byte")}if(240==(248&e)&&(n=(15&e)<<18|l()<<12|l()<<6|l())>=65536&&n<=1114111)return n;throw Error("Invalid WTF-8 detected")}var m={version:"1.0.1",encode:function(e){for(var n=c(e),t=n.length,a=-1,i="";++a<t;)i+=p(n[a]);return i},decode:function(e){i=c(e),o=i.length,s=0;for(var n,t=[];!1!==(n=d());)t.push(n);return function(e){for(var n,t=e.length,a=-1,i="";++a<t;)(n=e[a])>65535&&(i+=r((n-=65536)>>>10&1023|55296),n=56320|1023&n),i+=r(n);return i}(t)}};if(n&&!n.nodeType)if(t)t.exports=m;else{var f={}.hasOwnProperty;for(var h in m)f.call(m,h)&&(n[h]=m[h])}else e.wtf8=m}(C);var zr=Ir.exports;const Ur=async(e,n,{status:t,duration:i,errors:o,error:s,retry:r,attachments:c})=>{const u=new Date,{currentShard:p,rootDir:d,ciBuildId:m}=e,{title:f,repeatEachIndex:h}=n,{historyId:v}=qs(n,d),x=n.outcome(),b=Vn(r,h),g={shard:p,isExpected:"expected"===x,repeatEachIndex:h,status:Br(x,t)};try{const n={outcome:g,status:t,duration:i,log:zr.encode(o.map((e=>{var n;return null!==(n=e.message)&&void 0!==n?n:""})).join("\n")),screenshots:[],videos:[],traces:[],completedAt:u.toString(),errorSnippet:s&&Vs(s)};if(e.shouldNotReportTest)return;await Kn((()=>e.startedAttempts.has(Vn(v,b)))),L.underline(f);const r=c.map((({name:e,path:n,body:t,contentType:i})=>{if(!Ws.includes(e))return;const o=n?a(n):t,s=((e,n,t)=>null!=e?e:`${n}.${t.split("/")[1]}`)(n,e,i),{file:r,...c}=((e,n,t)=>{const a=e.byteLength;return{file:e,filename:t,checksum:l.createHash("md5").update(e).digest("base64"),byteSize:a,contentType:n}})(o,i,s);return{file:r,metadata:c,name:e}})).filter(qn(void 0)),p={metadata:ve("metadata",r)},{data:d}=await(e=>Ts.post(`${Ss}/reporter/direct_uploads`,{blob:e}))(p),h=await Promise.all(d.map((async({signedId:e,directUpload:t},a)=>{var i,o;return n[`${null===(i=r[a])||void 0===i?void 0:i.name}s`].push(e),Lr(r[a].file,t,`${f} - ${null===(o=r[a])||void 0===o?void 0:o.name}`)})));e.progressBars.push(...h);const x=Ks({ciBuildId:m,historyId:v,id:e.attempts[v][b],payload:n});e.testResultCalls.push(x),await x}catch(s){await Xn({context:{historyId:v,attemptIndex:b,title:f,status:t,outcome:g,duration:i,completedAt:u},error:s,title:"onTestEnd"}),L.error(s.message),L.error(S.failedToReportTest(f,v)),await Hs(m)}finally{L.log(Is.reportedTest({title:f,status:t,historyId:v,completedAt:u,error:s&&Vs(s),isTestReported:!e.shouldNotReportTest})),e.unreportedAttemptCount--,e.startedAttempts.delete(Vn(v,b))}},qr=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 Mr="axios-retry";function Hr(e){return!e.response&&(!!e.code&&(!["ERR_CANCELED","ECONNABORTED"].includes(e.code)&&(e=>!qr.has(e&&e.code))(e)))}const $r=["get","head","options"],Gr=$r.concat(["put","delete"]);function Kr(e){return"ECONNABORTED"!==e.code&&(!e.response||429===e.response.status||e.response.status>=500&&e.response.status<=599)}function Wr(e){return!!e.config?.method&&(Kr(e)&&-1!==Gr.indexOf(e.config.method))}function Vr(e){return Hr(e)||Wr(e)}function Yr(e=void 0){const n=e?.response?.headers["retry-after"];if(!n)return 0;let t=1e3*(Number(n)||0);return 0===t&&(t=(new Date(n).valueOf()||0)-Date.now()),Math.max(0,t)}const Jr={retries:3,retryCondition:Vr,retryDelay:function(e=0,n=void 0){return Math.max(0,Yr(n))},shouldResetTimeout:!1,onRetry:()=>{},onMaxRetryTimesExceeded:()=>{},validateResponse:null};function Xr(e,n,t=!1){const a=function(e,n){return{...Jr,...n,...e[Mr]}}(e,n||{});return a.retryCount=a.retryCount||0,a.lastRequestTime&&!t||(a.lastRequestTime=Date.now()),e[Mr]=a,a}const Zr=(e,n)=>{const t=e.interceptors.request.use((e=>(Xr(e,n,!0),e[Mr]?.validateResponse&&(e.validateStatus=()=>!1),e))),a=e.interceptors.response.use(null,(async t=>{const{config:a}=t;if(!a)return Promise.reject(t);const i=Xr(a,n);return t.response&&i.validateResponse?.(t.response)?t.response:await async function(e,n){const{retries:t,retryCondition:a}=e,i=(e.retryCount||0)<t&&a(n);if("object"==typeof i)try{return!1!==await i}catch(e){return!1}return i}(i,t)?async function(e,n,t,a){n.retryCount+=1;const{retryDelay:i,shouldResetTimeout:o,onRetry:s}=n,r=i(n.retryCount,t);if(function(e,n){e.defaults.agent===n.agent&&delete n.agent,e.defaults.httpAgent===n.httpAgent&&delete n.httpAgent,e.defaults.httpsAgent===n.httpsAgent&&delete n.httpsAgent}(e,a),!o&&a.timeout&&n.lastRequestTime){const e=Date.now()-n.lastRequestTime,i=a.timeout-e-r;if(i<=0)return Promise.reject(t);a.timeout=i}return a.transformRequest=[e=>e],await s(n.retryCount,t,a),a.signal?.aborted?Promise.resolve(e(a)):new Promise((n=>{const t=()=>{clearTimeout(i),n(e(a))},i=setTimeout((()=>{n(e(a)),a.signal?.removeEventListener&&a.signal.removeEventListener("abort",t)}),r);a.signal?.addEventListener&&a.signal.addEventListener("abort",t,{once:!0})}))}(e,i,t,a):(await async function(e,n){e.retryCount>=e.retries&&await e.onMaxRetryTimesExceeded(n,e.retryCount)}(i,t),Promise.reject(t))}));return{requestInterceptorId:t,responseInterceptorId:a}};Zr.isNetworkError=Hr,Zr.isSafeRequestError=function(e){return!!e.config?.method&&(Kr(e)&&-1!==$r.indexOf(e.config.method))},Zr.isIdempotentRequestError=Wr,Zr.isNetworkOrIdempotentRequestError=Vr,Zr.exponentialDelay=function(e=0,n=void 0,t=100){const a=2**e*t,i=Math.max(a,Yr(n));return i+.2*i*Math.random()},Zr.linearDelay=function(e=100){return(n=0,t=void 0)=>{const a=n*e;return Math.max(a,Yr(t))}},Zr.isRetryableError=Kr;const Qr="Content-Type",ec="Accept",nc="X-Api-Key",tc="Project-Key",ac="Reporter-Version",ic=e=>e===Object(e)&&!(e instanceof Buffer);function oc({projectKey:e,baseURL:n,apiKey:t}){Ts.defaults.baseURL=null!=n?n:"https://connect.neetoplaydash.com",Ts.defaults.skipSnakeCaseConversion=!1,(({projectKey:e,apiKey:n})=>{Ts.defaults.headers={...Ts.defaults.headers,[tc]:e,[ac]:JSON.parse(a(o(__dirname,"./package.json"),"utf8")).version,[nc]:null!=n?n:"",[ec]:"application/json",[Qr]:"application/json"}})({projectKey:e,apiKey:t}),Ts.interceptors.request.use((e=>{const n=e.data;return ic(n)&&!e.skipSnakeCaseConversion&&(e.data=Hn(n,(function(e,n){return[Mn(e),n]}))),e})),Ts.interceptors.response.use((e=>{const n=e.data;return ic(n)&&(e.data=Hn(n,(function(e,n){return[(t=e,t.replace(/(_\w)/g,(function(e){return e[1].toUpperCase()}))),n];var t}))),e})),Zr(Ts,{retryDelay:Zr.exponentialDelay,retryCondition:e=>{var n;const t=null===(n=e.status)||void 0===n?void 0:n.toString();return!!t&&(t.startsWith("5")||"404"===t)},retries:2})}class sc{constructor(e){var n;this.onBegin=(e,n)=>$s(this,e,n),this.onTestBegin=(e,n)=>(async(e,n,{retry:t})=>{var a,i;const{title:o,repeatEachIndex:s}=n,{rootDir:r,currentShard:c,ciBuildId:u}=e,{historyId:p}=qs(n,r),l=(new Date).toString(),d=Vn(t,s);if(e.unreportedAttemptCount++,e.shouldNotReportTest)L.invertBackground(Ps.startingTest(o,p));else try{if(await Kn((()=>{var n,t;return Un(e.attempts)&&Ie(null===(t=null===(n=e.attempts)||void 0===n?void 0:n[p])||void 0===t?void 0:t["0-0"])})),L.invertBackground(Ps.startingTest(o,p)),e.shouldNotReportTest)return;const n={status:"running",startedAt:l,shard:c,repeatEachIndex:s};if(0===t&&0===s)await Ks({ciBuildId:u,historyId:p,id:null===(i=null===(a=e.attempts)||void 0===a?void 0:a[p])||void 0===i?void 0:i["0-0"],payload:n});else{const{data:{attemptId:t}}=await Gs(u,p,n);e.attempts=qe(e.attempts,{[p]:{[d]:t}})}e.startedAttempts.add(Vn(p,d))}catch(e){await Xn({context:{historyId:p,attemptIndex:d,title:o},error:e,title:"onTestBegin"}),L.error(e.message),L.error(S.failedToReportTest(o,p)),await Hs(u)}})(this,e,n),this.onTestEnd=async(e,n)=>Ur(this,e,n),this.onEnd=async e=>(async(e,{status:n,duration:t})=>{var a,i;const{currentShard:o}=e;try{if(await Kn((()=>(e.hasRunStarted||e.shouldNotReportTest)&&0===e.unreportedAttemptCount)),L.bold(zs.finalStatus({currentShard:o,status:n,duration:t})),e.shouldNotReportTest)return;if(0===e.totalTestCount)return void await As(e.ciBuildId,{shards:$n({currentShard:o,status:"passed",duration:t})});await Promise.allSettled(e.testResultCalls),await As(e.ciBuildId,{shards:$n({currentShard:o,status:n,duration:t})})}catch(e){const o=null===(a=e.response)||void 0===a?void 0:a.data;await Xn({context:{runStatus:n,runDuration:t},error:e,title:"onEnd"}),L.error(null!==(i=o.error)&&void 0!==i?i:e.message),L.error(O.failedToReportRunStatus)}finally{e.shouldNotReportTest||0===e.totalTestCount||L.invertBackground(zs.runReported),clearInterval(e.heartbeatInterval)}})(this,e),this.attempts={},this.tags=e.tags,this.ciBuildId=e.ciBuildId,this.testResultCalls=[],this.totalTestCount=0,this.unreportedAttemptCount=0,this.hasRunStarted=!1,this.heartbeatInterval=null,this.rootDir="",this.currentShard=0,this.progressBars=[],this.startedAttempts=new Set,this.shouldNotReportTest=!1,this.apiKey=e.apiKey,j.configure({apiKey:Yn("9d5d98e72929dae3c8b3701f50032da1a02b80f9dc29a8e448a601871e5c82fd0ac2fa33c46443709cdb3eabc54a06ab"),environment:(null===(n=null==e?void 0:e.baseURL)||void 0===n?void 0:n.includes(".net"))?"staging":"production"}),j.setContext(e),((e,n)=>{oc(n),process.on("unhandledRejection",(async n=>{var t,a,i;const o=null===(t=n.response)||void 0===t?void 0:t.data;await Xn({context:{},error:n,title:"unhandledRejection"}),await Hs(e.ciBuildId),L.error(null!==(i=null!==(a=null==o?void 0:o.error)&&void 0!==a?a:n.message)&&void 0!==i?i:JSON.stringify(n))}))})(this,e)}}export{sc as default};
9
+ /*! https://mths.be/wtf8 v1.0.1 by @mathias */Nr=Ir,Pr=Ir.exports,function(e){var n=Pr,t=Nr&&Nr.exports==n&&Nr,a="object"==typeof C&&C;a.global!==a&&a.window!==a||(e=a);var i,o,s,r=String.fromCharCode;function c(e){for(var n,t,a=[],i=0,o=e.length;i<o;)(n=e.charCodeAt(i++))>=55296&&n<=56319&&i<o?56320==(64512&(t=e.charCodeAt(i++)))?a.push(((1023&n)<<10)+(1023&t)+65536):(a.push(n),i--):a.push(n);return a}function u(e,n){return r(e>>n&63|128)}function p(e){if(!(4294967168&e))return r(e);var n="";return 4294965248&e?4294901760&e?4292870144&e||(n=r(e>>18&7|240),n+=u(e,12),n+=u(e,6)):(n=r(e>>12&15|224),n+=u(e,6)):n=r(e>>6&31|192),n+=r(63&e|128)}function l(){if(s>=o)throw Error("Invalid byte index");var e=255&i[s];if(s++,128==(192&e))return 63&e;throw Error("Invalid continuation byte")}function d(){var e,n;if(s>o)throw Error("Invalid byte index");if(s==o)return!1;if(e=255&i[s],s++,!(128&e))return e;if(192==(224&e)){if((n=(31&e)<<6|l())>=128)return n;throw Error("Invalid continuation byte")}if(224==(240&e)){if((n=(15&e)<<12|l()<<6|l())>=2048)return n;throw Error("Invalid continuation byte")}if(240==(248&e)&&(n=(15&e)<<18|l()<<12|l()<<6|l())>=65536&&n<=1114111)return n;throw Error("Invalid WTF-8 detected")}var m={version:"1.0.1",encode:function(e){for(var n=c(e),t=n.length,a=-1,i="";++a<t;)i+=p(n[a]);return i},decode:function(e){i=c(e),o=i.length,s=0;for(var n,t=[];!1!==(n=d());)t.push(n);return function(e){for(var n,t=e.length,a=-1,i="";++a<t;)(n=e[a])>65535&&(i+=r((n-=65536)>>>10&1023|55296),n=56320|1023&n),i+=r(n);return i}(t)}};if(n&&!n.nodeType)if(t)t.exports=m;else{var f={}.hasOwnProperty;for(var h in m)f.call(m,h)&&(n[h]=m[h])}else e.wtf8=m}(C);var zr=Ir.exports;const Ur=async(e,n,{status:t,duration:i,errors:o,error:s,retry:r,attachments:c})=>{const u=new Date,{currentShard:p,rootDir:d,ciBuildId:m}=e,{title:f,repeatEachIndex:h}=n,{historyId:v}=qs(n,d),x=n.outcome(),b=Vn(r,h),g={shard:p,isExpected:"expected"===x,repeatEachIndex:h,status:Br(x,t)};try{const n={outcome:g,status:t,duration:i,log:zr.encode(o.map((e=>{var n;return null!==(n=e.message)&&void 0!==n?n:""})).join("\n")),screenshots:[],videos:[],traces:[],completedAt:u.toString(),errorSnippet:s&&Vs(s)};if(e.shouldNotReportTest)return;await Kn((()=>e.startedAttempts.has(Vn(v,b)))),L.underline(f);const r=c.map((({name:e,path:n,body:t,contentType:i})=>{if(!Ws.includes(e))return;const o=n?a(n):t,s=((e,n,t)=>(null!=e?e:`${n}.${t.split("/")[1]}`).replaceAll("/","-"))(n,e,i),{file:r,...c}=((e,n,t)=>{const a=e.byteLength;return{file:e,filename:t,checksum:l.createHash("md5").update(e).digest("base64"),byteSize:a,contentType:n}})(o,i,s);return{file:r,metadata:c,name:e}})).filter(qn(void 0)),p={metadata:ve("metadata",r)},{data:d}=await(({ciBuildId:e,historyId:n},t)=>Ts.post(`/api/v2/reporter/runs/${e}/test_entities/${n}/direct_uploads`,{blob:t}))({ciBuildId:e.ciBuildId,historyId:v},p),h=await Promise.all(d.map((async({signedId:e,directUpload:t},a)=>{var i,o;return n[`${null===(i=r[a])||void 0===i?void 0:i.name}s`].push(e),Lr(r[a].file,t,`${f} - ${null===(o=r[a])||void 0===o?void 0:o.name}`)})));e.progressBars.push(...h);const x=Ks({ciBuildId:m,historyId:v,id:e.attempts[v][b],payload:n});e.testResultCalls.push(x),await x}catch(s){await Xn({context:{historyId:v,attemptIndex:b,title:f,status:t,outcome:g,duration:i,completedAt:u},error:s,title:"onTestEnd"}),L.error(s.message),L.error(S.failedToReportTest(f,v)),await Hs(m)}finally{L.log(Is.reportedTest({title:f,status:t,historyId:v,completedAt:u,error:s&&Vs(s),isTestReported:!e.shouldNotReportTest})),e.unreportedAttemptCount--,e.startedAttempts.delete(Vn(v,b))}},qr=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 Mr="axios-retry";function Hr(e){return!e.response&&(!!e.code&&(!["ERR_CANCELED","ECONNABORTED"].includes(e.code)&&(e=>!qr.has(e&&e.code))(e)))}const $r=["get","head","options"],Gr=$r.concat(["put","delete"]);function Kr(e){return"ECONNABORTED"!==e.code&&(!e.response||429===e.response.status||e.response.status>=500&&e.response.status<=599)}function Wr(e){return!!e.config?.method&&(Kr(e)&&-1!==Gr.indexOf(e.config.method))}function Vr(e){return Hr(e)||Wr(e)}function Yr(e=void 0){const n=e?.response?.headers["retry-after"];if(!n)return 0;let t=1e3*(Number(n)||0);return 0===t&&(t=(new Date(n).valueOf()||0)-Date.now()),Math.max(0,t)}const Jr={retries:3,retryCondition:Vr,retryDelay:function(e=0,n=void 0){return Math.max(0,Yr(n))},shouldResetTimeout:!1,onRetry:()=>{},onMaxRetryTimesExceeded:()=>{},validateResponse:null};function Xr(e,n,t=!1){const a=function(e,n){return{...Jr,...n,...e[Mr]}}(e,n||{});return a.retryCount=a.retryCount||0,a.lastRequestTime&&!t||(a.lastRequestTime=Date.now()),e[Mr]=a,a}const Zr=(e,n)=>{const t=e.interceptors.request.use((e=>(Xr(e,n,!0),e[Mr]?.validateResponse&&(e.validateStatus=()=>!1),e))),a=e.interceptors.response.use(null,(async t=>{const{config:a}=t;if(!a)return Promise.reject(t);const i=Xr(a,n);return t.response&&i.validateResponse?.(t.response)?t.response:await async function(e,n){const{retries:t,retryCondition:a}=e,i=(e.retryCount||0)<t&&a(n);if("object"==typeof i)try{return!1!==await i}catch(e){return!1}return i}(i,t)?async function(e,n,t,a){n.retryCount+=1;const{retryDelay:i,shouldResetTimeout:o,onRetry:s}=n,r=i(n.retryCount,t);if(function(e,n){e.defaults.agent===n.agent&&delete n.agent,e.defaults.httpAgent===n.httpAgent&&delete n.httpAgent,e.defaults.httpsAgent===n.httpsAgent&&delete n.httpsAgent}(e,a),!o&&a.timeout&&n.lastRequestTime){const e=Date.now()-n.lastRequestTime,i=a.timeout-e-r;if(i<=0)return Promise.reject(t);a.timeout=i}return a.transformRequest=[e=>e],await s(n.retryCount,t,a),a.signal?.aborted?Promise.resolve(e(a)):new Promise((n=>{const t=()=>{clearTimeout(i),n(e(a))},i=setTimeout((()=>{n(e(a)),a.signal?.removeEventListener&&a.signal.removeEventListener("abort",t)}),r);a.signal?.addEventListener&&a.signal.addEventListener("abort",t,{once:!0})}))}(e,i,t,a):(await async function(e,n){e.retryCount>=e.retries&&await e.onMaxRetryTimesExceeded(n,e.retryCount)}(i,t),Promise.reject(t))}));return{requestInterceptorId:t,responseInterceptorId:a}};Zr.isNetworkError=Hr,Zr.isSafeRequestError=function(e){return!!e.config?.method&&(Kr(e)&&-1!==$r.indexOf(e.config.method))},Zr.isIdempotentRequestError=Wr,Zr.isNetworkOrIdempotentRequestError=Vr,Zr.exponentialDelay=function(e=0,n=void 0,t=100){const a=2**e*t,i=Math.max(a,Yr(n));return i+.2*i*Math.random()},Zr.linearDelay=function(e=100){return(n=0,t=void 0)=>{const a=n*e;return Math.max(a,Yr(t))}},Zr.isRetryableError=Kr;const Qr="Content-Type",ec="Accept",nc="X-Api-Key",tc="Project-Key",ac="Reporter-Version",ic=e=>e===Object(e)&&!(e instanceof Buffer);function oc({projectKey:e,baseURL:n,apiKey:t}){Ts.defaults.baseURL=null!=n?n:"https://connect.neetoplaydash.com",Ts.defaults.skipSnakeCaseConversion=!1,(({projectKey:e,apiKey:n})=>{Ts.defaults.headers={...Ts.defaults.headers,[tc]:e,[ac]:JSON.parse(a(o(__dirname,"./package.json"),"utf8")).version,[nc]:null!=n?n:"",[ec]:"application/json",[Qr]:"application/json"}})({projectKey:e,apiKey:t}),Ts.interceptors.request.use((e=>{const n=e.data;return ic(n)&&!e.skipSnakeCaseConversion&&(e.data=Hn(n,(function(e,n){return[Mn(e),n]}))),e})),Ts.interceptors.response.use((e=>{const n=e.data;return ic(n)&&(e.data=Hn(n,(function(e,n){return[(t=e,t.replace(/(_\w)/g,(function(e){return e[1].toUpperCase()}))),n];var t}))),e})),Zr(Ts,{retryDelay:Zr.exponentialDelay,retryCondition:e=>{var n;const t=null===(n=e.status)||void 0===n?void 0:n.toString();return!!t&&(t.startsWith("5")||"404"===t)},retries:2})}class sc{constructor(e){var n;this.onBegin=(e,n)=>$s(this,e,n),this.onTestBegin=(e,n)=>(async(e,n,{retry:t})=>{var a,i;const{title:o,repeatEachIndex:s}=n,{rootDir:r,currentShard:c,ciBuildId:u}=e,{historyId:p}=qs(n,r),l=(new Date).toString(),d=Vn(t,s);if(e.unreportedAttemptCount++,e.shouldNotReportTest)L.invertBackground(Ps.startingTest(o,p));else try{if(await Kn((()=>{var n,t;return Un(e.attempts)&&Ie(null===(t=null===(n=e.attempts)||void 0===n?void 0:n[p])||void 0===t?void 0:t["0-0"])})),L.invertBackground(Ps.startingTest(o,p)),e.shouldNotReportTest)return;const n={status:"running",startedAt:l,shard:c,repeatEachIndex:s};if(0===t&&0===s)await Ks({ciBuildId:u,historyId:p,id:null===(i=null===(a=e.attempts)||void 0===a?void 0:a[p])||void 0===i?void 0:i["0-0"],payload:n});else{const{data:{attemptId:t}}=await Gs(u,p,n);e.attempts=qe(e.attempts,{[p]:{[d]:t}})}}catch(e){await Xn({context:{historyId:p,attemptIndex:d,title:o},error:e,title:"onTestBegin"}),L.error(e.message),L.error(S.failedToReportTest(o,p)),await Hs(u)}finally{e.startedAttempts.add(Vn(p,d))}})(this,e,n),this.onTestEnd=async(e,n)=>Ur(this,e,n),this.onEnd=async e=>(async(e,{status:n,duration:t})=>{var a,i;const{currentShard:o}=e;try{if(await Kn((()=>(e.hasRunStarted||e.shouldNotReportTest)&&0===e.unreportedAttemptCount)),L.bold(zs.finalStatus({currentShard:o,status:n,duration:t})),e.shouldNotReportTest)return;if(0===e.totalTestCount)return void await As(e.ciBuildId,{shards:$n({currentShard:o,status:"passed",duration:t})});await Promise.allSettled(e.testResultCalls),await As(e.ciBuildId,{shards:$n({currentShard:o,status:n,duration:t})})}catch(e){const o=null===(a=e.response)||void 0===a?void 0:a.data;await Xn({context:{runStatus:n,runDuration:t},error:e,title:"onEnd"}),L.error(null!==(i=o.error)&&void 0!==i?i:e.message),L.error(O.failedToReportRunStatus)}finally{e.shouldNotReportTest||0===e.totalTestCount||L.invertBackground(zs.runReported),clearInterval(e.heartbeatInterval)}})(this,e),this.attempts={},this.tags=e.tags,this.ciBuildId=e.ciBuildId,this.testResultCalls=[],this.totalTestCount=0,this.unreportedAttemptCount=0,this.hasRunStarted=!1,this.heartbeatInterval=null,this.rootDir="",this.currentShard=0,this.progressBars=[],this.startedAttempts=new Set,this.shouldNotReportTest=!1,this.apiKey=e.apiKey,j.configure({apiKey:Yn("9d5d98e72929dae3c8b3701f50032da1a02b80f9dc29a8e448a601871e5c82fd0ac2fa33c46443709cdb3eabc54a06ab"),environment:(null===(n=null==e?void 0:e.baseURL)||void 0===n?void 0:n.includes(".net"))?"staging":"production"}),j.setContext(e),((e,n)=>{oc(n),process.on("unhandledRejection",(async n=>{var t,a,i;const o=null===(t=n.response)||void 0===t?void 0:t.data;await Xn({context:{},error:n,title:"unhandledRejection"}),await Hs(e.ciBuildId),L.error(null!==(i=null!==(a=null==o?void 0:o.error)&&void 0!==a?a:n.message)&&void 0!==i?i:JSON.stringify(n))}))})(this,e)}}export{sc as default};
10
10
  //# sourceMappingURL=index.js.map