@checksum-ai/runtime 1.4.0 → 1.4.1

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/.env CHANGED
@@ -1 +1 @@
1
- CHECKSUM_RUNTIME_BUILD_TIME=2025-10-23T16:39:15.702Z
1
+ CHECKSUM_RUNTIME_BUILD_TIME=2025-10-30T09:51:49.674Z
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@checksum-ai/runtime",
3
- "version": "1.4.0",
3
+ "version": "1.4.1",
4
4
  "description": "Checksum.ai test runtime",
5
5
  "main": "index.js",
6
6
  "dependencies": {
@@ -6,7 +6,7 @@
6
6
  `).join(`
7
7
  `+o),e.push(n+"m+"+zn.exports.humanize(this.diff)+"\x1B[0m")}else e[0]=b0()+t+" "+e[0]}r(g0,"formatArgs");function b0(){return ie.inspectOpts.hideDate?"":new Date().toISOString()+" "}r(b0,"getDate");function y0(...e){return process.stderr.write(Bn.formatWithOptions(ie.inspectOpts,...e)+`
8
8
  `)}r(y0,"log");function _0(e){e?process.env.DEBUG=e:delete process.env.DEBUG}r(_0,"save");function w0(){return process.env.DEBUG}r(w0,"load");function E0(e){e.inspectOpts={};let t=Object.keys(ie.inspectOpts);for(let i=0;i<t.length;i++)e.inspectOpts[t[i]]=ie.inspectOpts[t[i]]}r(E0,"init");zn.exports=As()(ie);var{formatters:nm}=zn.exports;nm.o=function(e){return this.inspectOpts.colors=this.useColors,Bn.inspect(e,this.inspectOpts).split(`
9
- `).map(t=>t.trim()).join(" ")};nm.O=function(e){return this.inspectOpts.colors=this.useColors,Bn.inspect(e,this.inspectOpts)}});var om=_((_R,Fs)=>{typeof process>"u"||process.type==="renderer"||process.browser===!0||process.__nwjs?Fs.exports=Xf():Fs.exports=rm()});var cm=_((wR,sm)=>{var Ea;sm.exports=function(){if(!Ea){try{Ea=om()("follow-redirects")}catch{}typeof Ea!="function"&&(Ea=r(function(){},"debug"))}Ea.apply(null,arguments)}});var fm=_((SR,Ws)=>{var ka=require("url"),Sa=ka.URL,S0=require("http"),k0=require("https"),Ms=require("stream").Writable,js=require("assert"),lm=cm();r(function(){var t=typeof process<"u",i=typeof window<"u"&&typeof document<"u",a=Kt(Error.captureStackTrace);!t&&(i||!a)&&console.warn("The follow-redirects package should be excluded from browser builds.")},"detectUnsupportedEnvironment")();var Ps=!1;try{js(new Sa(""))}catch(e){Ps=e.code==="ERR_INVALID_URL"}var T0=["auth","host","hostname","href","path","pathname","port","protocol","query","search","hash"],Bs=["abort","aborted","connect","error","socket","timeout"],zs=Object.create(null);Bs.forEach(function(e){zs[e]=function(t,i,a){this._redirectable.emit(e,t,i,a)}});var Ds=Ta("ERR_INVALID_URL","Invalid URL",TypeError),Ns=Ta("ERR_FR_REDIRECTION_FAILURE","Redirected request failed"),R0=Ta("ERR_FR_TOO_MANY_REDIRECTS","Maximum number of redirects exceeded",Ns),C0=Ta("ERR_FR_MAX_BODY_LENGTH_EXCEEDED","Request body larger than maxBodyLength limit"),A0=Ta("ERR_STREAM_WRITE_AFTER_END","write after end"),O0=Ms.prototype.destroy||um;function he(e,t){Ms.call(this),this._sanitizeOptions(e),this._options=e,this._ended=!1,this._ending=!1,this._redirectCount=0,this._redirects=[],this._requestBodyLength=0,this._requestBodyBuffers=[],t&&this.on("response",t);var i=this;this._onNativeResponse=function(a){try{i._processResponse(a)}catch(n){i.emit("error",n instanceof Ns?n:new Ns({cause:n}))}},this._performRequest()}r(he,"RedirectableRequest");he.prototype=Object.create(Ms.prototype);he.prototype.abort=function(){Hs(this._currentRequest),this._currentRequest.abort(),this.emit("abort")};he.prototype.destroy=function(e){return Hs(this._currentRequest,e),O0.call(this,e),this};he.prototype.write=function(e,t,i){if(this._ending)throw new A0;if(!Wt(e)&&!L0(e))throw new TypeError("data should be a string, Buffer or Uint8Array");if(Kt(t)&&(i=t,t=null),e.length===0){i&&i();return}this._requestBodyLength+e.length<=this._options.maxBodyLength?(this._requestBodyLength+=e.length,this._requestBodyBuffers.push({data:e,encoding:t}),this._currentRequest.write(e,t,i)):(this.emit("error",new C0),this.abort())};he.prototype.end=function(e,t,i){if(Kt(e)?(i=e,e=t=null):Kt(t)&&(i=t,t=null),!e)this._ended=this._ending=!0,this._currentRequest.end(null,null,i);else{var a=this,n=this._currentRequest;this.write(e,t,function(){a._ended=!0,n.end(null,null,i)}),this._ending=!0}};he.prototype.setHeader=function(e,t){this._options.headers[e]=t,this._currentRequest.setHeader(e,t)};he.prototype.removeHeader=function(e){delete this._options.headers[e],this._currentRequest.removeHeader(e)};he.prototype.setTimeout=function(e,t){var i=this;function a(s){s.setTimeout(e),s.removeListener("timeout",s.destroy),s.addListener("timeout",s.destroy)}r(a,"destroyOnTimeout");function n(s){i._timeout&&clearTimeout(i._timeout),i._timeout=setTimeout(function(){i.emit("timeout"),o()},e),a(s)}r(n,"startTimer");function o(){i._timeout&&(clearTimeout(i._timeout),i._timeout=null),i.removeListener("abort",o),i.removeListener("error",o),i.removeListener("response",o),i.removeListener("close",o),t&&i.removeListener("timeout",t),i.socket||i._currentRequest.removeListener("socket",n)}return r(o,"clearTimer"),t&&this.on("timeout",t),this.socket?n(this.socket):this._currentRequest.once("socket",n),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){he.prototype[e]=function(t,i){return this._currentRequest[e](t,i)}});["aborted","connection","socket"].forEach(function(e){Object.defineProperty(he.prototype,e,{get:r(function(){return this._currentRequest[e]},"get")})});he.prototype._sanitizeOptions=function(e){if(e.headers||(e.headers={}),e.host&&(e.hostname||(e.hostname=e.host),delete e.host),!e.pathname&&e.path){var t=e.path.indexOf("?");t<0?e.pathname=e.path:(e.pathname=e.path.substring(0,t),e.search=e.path.substring(t))}};he.prototype._performRequest=function(){var e=this._options.protocol,t=this._options.nativeProtocols[e];if(!t)throw new TypeError("Unsupported protocol "+e);if(this._options.agents){var i=e.slice(0,-1);this._options.agent=this._options.agents[i]}var a=this._currentRequest=t.request(this._options,this._onNativeResponse);a._redirectable=this;for(var n of Bs)a.on(n,zs[n]);if(this._currentUrl=/^\//.test(this._options.path)?ka.format(this._options):this._options.path,this._isRedirect){var o=0,s=this,c=this._requestBodyBuffers;r(function u(l){if(a===s._currentRequest)if(l)s.emit("error",l);else if(o<c.length){var p=c[o++];a.finished||a.write(p.data,p.encoding,u)}else s._ended&&a.end()},"writeNext")()}};he.prototype._processResponse=function(e){var t=e.statusCode;this._options.trackRedirects&&this._redirects.push({url:this._currentUrl,headers:e.headers,statusCode:t});var i=e.headers.location;if(!i||this._options.followRedirects===!1||t<300||t>=400){e.responseUrl=this._currentUrl,e.redirects=this._redirects,this.emit("response",e),this._requestBodyBuffers=[];return}if(Hs(this._currentRequest),e.destroy(),++this._redirectCount>this._options.maxRedirects)throw new R0;var a,n=this._options.beforeRedirect;n&&(a=Object.assign({Host:e.req.getHeader("host")},this._options.headers));var o=this._options.method;((t===301||t===302)&&this._options.method==="POST"||t===303&&!/^(?:GET|HEAD)$/.test(this._options.method))&&(this._options.method="GET",this._requestBodyBuffers=[],Ls(/^content-/i,this._options.headers));var s=Ls(/^host$/i,this._options.headers),c=qs(this._currentUrl),u=s||c.host,l=/^\w+:/.test(i)?this._currentUrl:ka.format(Object.assign(c,{host:u})),p=I0(i,l);if(lm("redirecting to",p.href),this._isRedirect=!0,Us(p,this._options),(p.protocol!==c.protocol&&p.protocol!=="https:"||p.host!==u&&!F0(p.host,u))&&Ls(/^(?:(?:proxy-)?authorization|cookie)$/i,this._options.headers),Kt(n)){var f={headers:e.headers,statusCode:t},m={url:l,method:o,headers:a};n(this._options,f,m),this._sanitizeOptions(this._options)}this._performRequest()};function pm(e){var t={maxRedirects:21,maxBodyLength:10485760},i={};return Object.keys(e).forEach(function(a){var n=a+":",o=i[n]=e[a],s=t[a]=Object.create(o);function c(l,p,f){return D0(l)?l=Us(l):Wt(l)?l=Us(qs(l)):(f=p,p=dm(l),l={protocol:n}),Kt(p)&&(f=p,p=null),p=Object.assign({maxRedirects:t.maxRedirects,maxBodyLength:t.maxBodyLength},l,p),p.nativeProtocols=i,!Wt(p.host)&&!Wt(p.hostname)&&(p.hostname="::1"),js.equal(p.protocol,n,"protocol mismatch"),lm("options",p),new he(p,f)}r(c,"request");function u(l,p,f){var m=s.request(l,p,f);return m.end(),m}r(u,"get"),Object.defineProperties(s,{request:{value:c,configurable:!0,enumerable:!0,writable:!0},get:{value:u,configurable:!0,enumerable:!0,writable:!0}})}),t}r(pm,"wrap");function um(){}r(um,"noop");function qs(e){var t;if(Ps)t=new Sa(e);else if(t=dm(ka.parse(e)),!Wt(t.protocol))throw new Ds({input:e});return t}r(qs,"parseUrl");function I0(e,t){return Ps?new Sa(e,t):qs(ka.resolve(t,e))}r(I0,"resolveUrl");function dm(e){if(/^\[/.test(e.hostname)&&!/^\[[:0-9a-f]+\]$/i.test(e.hostname))throw new Ds({input:e.href||e});if(/^\[/.test(e.host)&&!/^\[[:0-9a-f]+\](:\d+)?$/i.test(e.host))throw new Ds({input:e.href||e});return e}r(dm,"validateUrl");function Us(e,t){var i=t||{};for(var a of T0)i[a]=e[a];return i.hostname.startsWith("[")&&(i.hostname=i.hostname.slice(1,-1)),i.port!==""&&(i.port=Number(i.port)),i.path=i.search?i.pathname+i.search:i.pathname,i}r(Us,"spreadUrlObject");function Ls(e,t){var i;for(var a in t)e.test(a)&&(i=t[a],delete t[a]);return i===null||typeof i>"u"?void 0:String(i).trim()}r(Ls,"removeMatchingHeaders");function Ta(e,t,i){function a(n){Kt(Error.captureStackTrace)&&Error.captureStackTrace(this,this.constructor),Object.assign(this,n||{}),this.code=e,this.message=this.cause?t+": "+this.cause.message:t}return r(a,"CustomError"),a.prototype=new(i||Error),Object.defineProperties(a.prototype,{constructor:{value:a,enumerable:!1},name:{value:"Error ["+e+"]",enumerable:!1}}),a}r(Ta,"createErrorType");function Hs(e,t){for(var i of Bs)e.removeListener(i,zs[i]);e.on("error",um),e.destroy(t)}r(Hs,"destroyRequest");function F0(e,t){js(Wt(e)&&Wt(t));var i=e.length-t.length-1;return i>0&&e[i]==="."&&e.endsWith(t)}r(F0,"isSubdomain");function Wt(e){return typeof e=="string"||e instanceof String}r(Wt,"isString");function Kt(e){return typeof e=="function"}r(Kt,"isFunction");function L0(e){return typeof e=="object"&&"length"in e}r(L0,"isBuffer");function D0(e){return Sa&&e instanceof Sa}r(D0,"isURL");Ws.exports=pm({http:S0,https:k0});Ws.exports.wrap=pm});var lw={};mc(lw,{TestRunMonitor:()=>Qn});module.exports=sh(lw);var ar=r(e=>new Promise(t=>setTimeout(t,e)),"awaitSleep");var Xm=require("child_process"),er=require("crypto"),V=require("fs"),Qm=require("http"),eh=se(require("net")),Ce=require("path");var Pd=se(Rd()),ot=require("fs"),Bd=require("path");var Ke=se(require("path")),es=require("fs");var Go=require("path"),En=require("fs");function qb(e,t,i=10){let a=e;for(let n=0;n<i;n++){let o=(0,Go.join)(a,"package.json");if((0,En.existsSync)(o))try{if(JSON.parse((0,En.readFileSync)(o,"utf8")).name===t)return a}catch{}a=(0,Go.join)(a,"..")}}r(qb,"findRepositoryRoot");function Cd(e,t=10){return qb(e,"checksum-customer-engineering-workspace",t)}r(Cd,"findCustomerEngineeringRoot");var ts=se(Ld());var U=r((e,t)=>{if(e==null||e==="")return(t==null?void 0:t.default)??!1;let i=e.toLowerCase().trim();return i==="true"?!0:i==="false"?!1:(t==null?void 0:t.default)??!1},"parseBoolean");var ny=__dirname,Dd=Ke.join(__dirname,".."),Md=(0,es.existsSync)(Dd)?Dd:ny;(0,ts.config)({path:Ke.resolve(Md,".env")});var Xo=U(process.env.CHECKSUM_RUNTIME_DEV_MODE);function ry(){let e=__dirname;for(;!(0,es.existsSync)(Ke.join(e,"package.json"));)e=Ke.join(e,"..");return e}r(ry,"findRoot");var wi=ry(),oy=Cd(wi,10);(0,ts.config)({path:[Md,oy].filter(Boolean).map(e=>Ke.resolve(e,".env")),override:!1});var kn=U(process.env.CHECKSUM_VTG_E2E_TEST_MODE),Nd=Ke.join(wi,"vtg-build","index.html"),Qo=kn?!0:U(process.env.CHECKSUM_RUNTIME_REPO_MODE),Ud=U(process.env.CHECKSUM_VTG_SEPARATE_PROCESS),sy=Qo?Ke.join(wi,"package","pw-report-template.html"):Ke.join(wi,"pw-report-template.html"),cy=U(process.env.CHECKSUM_DEBUG_ANALYTICS),ly=U(process.env.CHECKSUM_LOG_ANALYTICS_TO_CONSOLE),Tn={isDevMode:Xo,isRepoMode:Qo,CI:!!process.env.CI,checksumRootFolderBypass:kn?"packages/runtime/test/e2e/checksum":Qo&&process.env.CHECKSUM_RUNTIME_ROOT_FOLDER_BYPASS_FOR_REPO_MODE?process.env.CHECKSUM_RUNTIME_ROOT_FOLDER_BYPASS_FOR_REPO_MODE:process.env.CHECKSUM_RUNTIME_ROOT_FOLDER_BYPASS,logLevel:process.env.CHECKSUM_RUNTIME_LOG_LEVEL??"warnings",checksumScript:{source:process.env.CHECKSUM_RUNTIME_SCRIPT_SOURCE??(Xo?"url":"file"),url:process.env.CHECKSUM_RUNTIME_SCRIPT_URL,path:wi+"/checksumlib.js"},runtimeRoot:wi,playwrightReporter:{htmlReportTemplatePath:sy},bypassProxyForLocalhost:U(process.env.CHECKSUM_RUNTIME_BYPASS_PROXY_FOR_LOCALHOST),promptKillActivePlaywrightProcesses:U(process.env.CHECKSUM_RUNTIME_PROMPT_KILL_ACTIVE_PLAYWRIGHT_PROCESSES,{default:!0}),useCLIDebug:U(process.env.CHECKSUM_RUNTIME_USE_CLI_DEBUG),useRemoteDebugging:{enabled:U(process.env.CHECKSUM_RUNTIME_USE_REMOTE_DEBUGGING),port:parseInt(process.env.CHECKSUM_AGENT_RUNTIME_REMOTE_DEBUGGING_PORT??"9500")},testRun:{timeMachine:{active:!0,headless:!U(process.env.CHECKSUM_RUNTIME_SHOW_RUNTIME_TIME_MACHINE),recordRRwebEventsToFile:U(process.env.CHECKSUM_RUNTIME_RECORD_RRWEB_EVENTS_TO_FILE,{default:!0})},monitoring:{defaultProvider:process.env.CHECKSUM_RUNTIME_MONITORING_DEFAULT_PROVIDER??"newrelic",debugAnalytics:cy,logToConsole:ly,newrelic:{appName:process.env.CHECKSUM_RUNTIME_MONITORING_NEWRELIC_APP_NAME??"checksum-runtime",licenseKey:"b4f3f644f40df19fe3d385c75428a450FFFFNRAL",logging:U(process.env.NEW_RELIC_LOG_ENABLED,{default:!1})},segment:{writeKey:process.env.CHECKSUM_RUNTIME_MONITORING_SEGMENT_WRITE_KEY??"TMuP8uorDj4QzJfNs0gEHDO7kHozVBOo",devWriteKey:process.env.CHECKSUM_RUNTIME_MONITORING_SEGMENT_DEV_WRITE_KEY??"gofHHwvdNHJNmb7KqACUmypZclVHEQ2l"}},autoRecovery:{verboseConsoleLog:U(process.env.CHECKSUM_RUNTIME_AUTO_RECOVERY_CONSOLE_LOG,{default:!1}),sessionTimeout:18e4},disableAutoRecovery:U(process.env.CHECKSUM_RUNTIME_DISABLE_AUTO_RECOVERY),disableHostReports:U(process.env.CHECKSUM_RUNTIME_DISABLE_HOST_REPORTS),request:{userEmail:process.env.CHECKSUM_RUNTIME_REQUEST_USER_EMAIL,reason:process.env.CHECKSUM_RUNTIME_REQUEST_REASON},platform:{name:process.env.CHECKSUM_RUNTIME_PLATFORM_NAME},runType:process.env.CHECKSUM_RUNTIME_RUN_TYPE},vtg:{isSeparateProcess:Ud,isE2ETestMode:kn,writeLogFile:U(process.env.CHECKSUM_VTG_WRITE_LOG_FILE,{default:!0}),appSource:process.env.CHECKSUM_VTG_APP_SOURCE??(Xo?"served-app":"served-build-file"),localUrl:`file://${Nd}`,localBuildPath:Nd,appURL:process.env.CHECKSUM_VTG_APP_URL,writeRrwebEventsToFile:U(process.env.CHECKSUM_VTG_RECORD_EVENTS_TO_FILE),useFakeStory:U(process.env.CHECKSUM_VTG_USE_FAKE_STORY)||kn,logAPIServer:{interval:U(process.env.CHECKSUM_VTG_LOG_API_SERVER_INTERVAL),httpTransactions:U(process.env.CHECKSUM_VTG_LOG_API_SERVER_HTTP_TRANSACTIONS,{default:!0})},customerEngRepoInternalUtilsRelativePath:process.env.CHECKSUM_VTG_CUSTOMER_ENG_REPO_INTERNAL_UTILS_RELATIVE_PATH??"tools/internal-utils.ts",fakeStory:{goal:process.env.CHECKSUM_VTG_FAKE_STORY_GOAL??"Send email via outreach list",instructions:process.env.CHECKSUM_VTG_FAKE_STORY_INSTRUCTIONS??"Make sure to select a user from the list first"},fakeTestGeneration:{internalTestId:process.env.CHECKSUM_VTG_FAKE_STORY_INTERNAL_TEST_ID??`tempID${Date.now().toString().slice(-5)}`,generationBatchId:process.env.CHECKSUM_VTG_FAKE_GENERATION_BATCH_ID??`tempID${Date.now().toString().slice(-5)}`},remoteDebugging:Ud?!0:U(process.env.CHECKSUM_VTG_REMOTE_DEBUGGING),appRemoteDebuggingPort:parseInt(process.env.CHECKSUM_VTG_REMOTE_DEBUGGING_PORT??"9230"),vtgRemoteDebuggingPort:parseInt(process.env.CHECKSUM_VTG_REMOTE_DEBUGGING_PORT??"9231"),taskTimeMachine:{showTaskTimeMachine:U(process.env.CHECKSUM_VTG_SHOW_TASK_TIME_MACHINE),taskTimeout:parseInt(process.env.CHECKSUM_VTG_TASK_TIME_MACHINE_TIMEOUT??"240000"),debugPort:parseInt(process.env.CHECKSUM_VTG_TASK_TIME_MACHINE_DEBUG_PORT??"9232"),logPerformance:U(process.env.CHECKSUM_VTG_TASK_TIME_MACHINE_LOG_PERFORMANCE,{default:!0})},aiAssertions:{disabled:U(process.env.CHECKSUM_VTG_AI_ASSERTIONS_DISABLED),allowRefactoring:U(process.env.CHECKSUM_VTG_ALLOW_AI_ASSERTIONS_REFACTORING),allowFiltering:U(process.env.CHECKSUM_VTG_ALLOW_AI_ASSERTIONS_FILTERING),logPerformance:U(process.env.CHECKSUM_VTG_AI_ASSERTIONS_LOG_PERFORMANCE,{default:!1})},aiLocators:{disabled:U(process.env.CHECKSUM_VTG_AI_LOCATORS_DISABLED),useFakeAILocators:U(process.env.CHECKSUM_VTG_USE_FAKE_AI_LOCATORS)}},benchmark:U(process.env.BENCHMARK_MODE),buildTime:process.env.CHECKSUM_RUNTIME_BUILD_TIME??"unknown",llm:{models:{openai:{key:process.env.CHECKSUM_RUNTIME_OPENAI_API_KEY},anthropic:{key:process.env.CHECKSUM_RUNTIME_ANTHROPIC_API_KEY},gemini:{model:process.env.CHECKSUM_RUNTIME_GEMINI_MODEL},groq:{apiKey:process.env.CHECKSUM_RUNTIME_GROQ_API_KEY}}},gcp:{credentialsFile:process.env.CHECKSUM_RUNTIME_GCP_CREDENTIALS_FILE}};var Rn=r(e=>isNaN(e)?0:e,"getStat");var jd=r((e,t)=>Object.values(t[e]||{}).some(i=>{var a,n;return(n=(a=i.autoRecoveryMetadata)==null?void 0:a.data)==null?void 0:n.autoRecovered}),"isAutoRecovered");var is=class is{constructor(t,i,a,n={},o={},s){this.reportHTMLFilePath=t;this.testRunUUID=i;this.pwTestIdToChecksumTestId=a;this.playwrightIdToMetadata=n;this.channel=s;this.supportVideo=!1;this.config={hosted:!0,assetsBaseURL:"https://api.checksum.ai/api/test-runs"};this.config={...this.config,...o}}async process(){this.channel.debug("Extracting report...");let t=this.extractReportBase64();this.channel.debug("Preparing new report...");let i=await this.editZipFile(t);this.channel.debug("Writing report to file..."),this.writeFile(i)}testHasTrace(t,i){try{if(!this.report)return!0;let a=Object.keys(this.pwTestIdToChecksumTestId??{}).find(o=>this.pwTestIdToChecksumTestId[o]===t);if(!a)return!0;let n=r(o=>o.some(s=>{var c;return(c=s.attachments)==null?void 0:c.some(u=>u.name==="trace")}),"hasTrace");for(let o of this.report.files)for(let s of o.tests)if(s.testId===a&&s.projectName===i&&n(s.results))return!0;return!1}catch(a){return this.channel.debug("Failed to check if test has trace, assuming trace exists",a),!0}}getStatPerFile(){let t=[];return this.report.files.forEach(i=>{i.tests.forEach(a=>{t.push({checksumTestId:this.pwTestIdToChecksumTestId[a.testId],playwrightTestId:a.testId,success:!!a.ok,recovered:jd(a.testId,this.playwrightIdToMetadata),bug:a.tags.includes("bug")||a.annotations.some(n=>n.type==="bug"),outcome:a.outcome})})}),t}getProcessedFilePath(){return this.reportHTMLFilePath}extractReportBase64(){var a;try{let n=(a=(0,ot.statSync)(this.reportHTMLFilePath))==null?void 0:a.size;this.channel.debug(`Report HTML file size approximately ${n} bytes`)}catch(n){this.channel.debug(`Failed to retrieve file size for ${this.reportHTMLFilePath}`,n)}let i=(0,ot.readFileSync)(this.reportHTMLFilePath,"utf-8").match(/window\.playwrightReportBase64 = "(.*)";/);if(i&&i[1])return i[1];{let n="Could not extract playwrightReportBase64 from HTML file";throw this.channel.debug(n),new Error(n)}}writeFile(t){let i=(0,ot.readFileSync)(Tn.playwrightReporter.htmlReportTemplatePath,"utf-8");i=i+`<script>
9
+ `).map(t=>t.trim()).join(" ")};nm.O=function(e){return this.inspectOpts.colors=this.useColors,Bn.inspect(e,this.inspectOpts)}});var om=_((_R,Fs)=>{typeof process>"u"||process.type==="renderer"||process.browser===!0||process.__nwjs?Fs.exports=Xf():Fs.exports=rm()});var cm=_((wR,sm)=>{var Ea;sm.exports=function(){if(!Ea){try{Ea=om()("follow-redirects")}catch{}typeof Ea!="function"&&(Ea=r(function(){},"debug"))}Ea.apply(null,arguments)}});var fm=_((SR,Ws)=>{var ka=require("url"),Sa=ka.URL,S0=require("http"),k0=require("https"),Ms=require("stream").Writable,js=require("assert"),lm=cm();r(function(){var t=typeof process<"u",i=typeof window<"u"&&typeof document<"u",a=Kt(Error.captureStackTrace);!t&&(i||!a)&&console.warn("The follow-redirects package should be excluded from browser builds.")},"detectUnsupportedEnvironment")();var Ps=!1;try{js(new Sa(""))}catch(e){Ps=e.code==="ERR_INVALID_URL"}var T0=["auth","host","hostname","href","path","pathname","port","protocol","query","search","hash"],Bs=["abort","aborted","connect","error","socket","timeout"],zs=Object.create(null);Bs.forEach(function(e){zs[e]=function(t,i,a){this._redirectable.emit(e,t,i,a)}});var Ds=Ta("ERR_INVALID_URL","Invalid URL",TypeError),Ns=Ta("ERR_FR_REDIRECTION_FAILURE","Redirected request failed"),R0=Ta("ERR_FR_TOO_MANY_REDIRECTS","Maximum number of redirects exceeded",Ns),C0=Ta("ERR_FR_MAX_BODY_LENGTH_EXCEEDED","Request body larger than maxBodyLength limit"),A0=Ta("ERR_STREAM_WRITE_AFTER_END","write after end"),O0=Ms.prototype.destroy||um;function he(e,t){Ms.call(this),this._sanitizeOptions(e),this._options=e,this._ended=!1,this._ending=!1,this._redirectCount=0,this._redirects=[],this._requestBodyLength=0,this._requestBodyBuffers=[],t&&this.on("response",t);var i=this;this._onNativeResponse=function(a){try{i._processResponse(a)}catch(n){i.emit("error",n instanceof Ns?n:new Ns({cause:n}))}},this._performRequest()}r(he,"RedirectableRequest");he.prototype=Object.create(Ms.prototype);he.prototype.abort=function(){Hs(this._currentRequest),this._currentRequest.abort(),this.emit("abort")};he.prototype.destroy=function(e){return Hs(this._currentRequest,e),O0.call(this,e),this};he.prototype.write=function(e,t,i){if(this._ending)throw new A0;if(!Wt(e)&&!L0(e))throw new TypeError("data should be a string, Buffer or Uint8Array");if(Kt(t)&&(i=t,t=null),e.length===0){i&&i();return}this._requestBodyLength+e.length<=this._options.maxBodyLength?(this._requestBodyLength+=e.length,this._requestBodyBuffers.push({data:e,encoding:t}),this._currentRequest.write(e,t,i)):(this.emit("error",new C0),this.abort())};he.prototype.end=function(e,t,i){if(Kt(e)?(i=e,e=t=null):Kt(t)&&(i=t,t=null),!e)this._ended=this._ending=!0,this._currentRequest.end(null,null,i);else{var a=this,n=this._currentRequest;this.write(e,t,function(){a._ended=!0,n.end(null,null,i)}),this._ending=!0}};he.prototype.setHeader=function(e,t){this._options.headers[e]=t,this._currentRequest.setHeader(e,t)};he.prototype.removeHeader=function(e){delete this._options.headers[e],this._currentRequest.removeHeader(e)};he.prototype.setTimeout=function(e,t){var i=this;function a(s){s.setTimeout(e),s.removeListener("timeout",s.destroy),s.addListener("timeout",s.destroy)}r(a,"destroyOnTimeout");function n(s){i._timeout&&clearTimeout(i._timeout),i._timeout=setTimeout(function(){i.emit("timeout"),o()},e),a(s)}r(n,"startTimer");function o(){i._timeout&&(clearTimeout(i._timeout),i._timeout=null),i.removeListener("abort",o),i.removeListener("error",o),i.removeListener("response",o),i.removeListener("close",o),t&&i.removeListener("timeout",t),i.socket||i._currentRequest.removeListener("socket",n)}return r(o,"clearTimer"),t&&this.on("timeout",t),this.socket?n(this.socket):this._currentRequest.once("socket",n),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){he.prototype[e]=function(t,i){return this._currentRequest[e](t,i)}});["aborted","connection","socket"].forEach(function(e){Object.defineProperty(he.prototype,e,{get:r(function(){return this._currentRequest[e]},"get")})});he.prototype._sanitizeOptions=function(e){if(e.headers||(e.headers={}),e.host&&(e.hostname||(e.hostname=e.host),delete e.host),!e.pathname&&e.path){var t=e.path.indexOf("?");t<0?e.pathname=e.path:(e.pathname=e.path.substring(0,t),e.search=e.path.substring(t))}};he.prototype._performRequest=function(){var e=this._options.protocol,t=this._options.nativeProtocols[e];if(!t)throw new TypeError("Unsupported protocol "+e);if(this._options.agents){var i=e.slice(0,-1);this._options.agent=this._options.agents[i]}var a=this._currentRequest=t.request(this._options,this._onNativeResponse);a._redirectable=this;for(var n of Bs)a.on(n,zs[n]);if(this._currentUrl=/^\//.test(this._options.path)?ka.format(this._options):this._options.path,this._isRedirect){var o=0,s=this,c=this._requestBodyBuffers;r(function u(l){if(a===s._currentRequest)if(l)s.emit("error",l);else if(o<c.length){var p=c[o++];a.finished||a.write(p.data,p.encoding,u)}else s._ended&&a.end()},"writeNext")()}};he.prototype._processResponse=function(e){var t=e.statusCode;this._options.trackRedirects&&this._redirects.push({url:this._currentUrl,headers:e.headers,statusCode:t});var i=e.headers.location;if(!i||this._options.followRedirects===!1||t<300||t>=400){e.responseUrl=this._currentUrl,e.redirects=this._redirects,this.emit("response",e),this._requestBodyBuffers=[];return}if(Hs(this._currentRequest),e.destroy(),++this._redirectCount>this._options.maxRedirects)throw new R0;var a,n=this._options.beforeRedirect;n&&(a=Object.assign({Host:e.req.getHeader("host")},this._options.headers));var o=this._options.method;((t===301||t===302)&&this._options.method==="POST"||t===303&&!/^(?:GET|HEAD)$/.test(this._options.method))&&(this._options.method="GET",this._requestBodyBuffers=[],Ls(/^content-/i,this._options.headers));var s=Ls(/^host$/i,this._options.headers),c=qs(this._currentUrl),u=s||c.host,l=/^\w+:/.test(i)?this._currentUrl:ka.format(Object.assign(c,{host:u})),p=I0(i,l);if(lm("redirecting to",p.href),this._isRedirect=!0,Us(p,this._options),(p.protocol!==c.protocol&&p.protocol!=="https:"||p.host!==u&&!F0(p.host,u))&&Ls(/^(?:(?:proxy-)?authorization|cookie)$/i,this._options.headers),Kt(n)){var f={headers:e.headers,statusCode:t},m={url:l,method:o,headers:a};n(this._options,f,m),this._sanitizeOptions(this._options)}this._performRequest()};function pm(e){var t={maxRedirects:21,maxBodyLength:10485760},i={};return Object.keys(e).forEach(function(a){var n=a+":",o=i[n]=e[a],s=t[a]=Object.create(o);function c(l,p,f){return D0(l)?l=Us(l):Wt(l)?l=Us(qs(l)):(f=p,p=dm(l),l={protocol:n}),Kt(p)&&(f=p,p=null),p=Object.assign({maxRedirects:t.maxRedirects,maxBodyLength:t.maxBodyLength},l,p),p.nativeProtocols=i,!Wt(p.host)&&!Wt(p.hostname)&&(p.hostname="::1"),js.equal(p.protocol,n,"protocol mismatch"),lm("options",p),new he(p,f)}r(c,"request");function u(l,p,f){var m=s.request(l,p,f);return m.end(),m}r(u,"get"),Object.defineProperties(s,{request:{value:c,configurable:!0,enumerable:!0,writable:!0},get:{value:u,configurable:!0,enumerable:!0,writable:!0}})}),t}r(pm,"wrap");function um(){}r(um,"noop");function qs(e){var t;if(Ps)t=new Sa(e);else if(t=dm(ka.parse(e)),!Wt(t.protocol))throw new Ds({input:e});return t}r(qs,"parseUrl");function I0(e,t){return Ps?new Sa(e,t):qs(ka.resolve(t,e))}r(I0,"resolveUrl");function dm(e){if(/^\[/.test(e.hostname)&&!/^\[[:0-9a-f]+\]$/i.test(e.hostname))throw new Ds({input:e.href||e});if(/^\[/.test(e.host)&&!/^\[[:0-9a-f]+\](:\d+)?$/i.test(e.host))throw new Ds({input:e.href||e});return e}r(dm,"validateUrl");function Us(e,t){var i=t||{};for(var a of T0)i[a]=e[a];return i.hostname.startsWith("[")&&(i.hostname=i.hostname.slice(1,-1)),i.port!==""&&(i.port=Number(i.port)),i.path=i.search?i.pathname+i.search:i.pathname,i}r(Us,"spreadUrlObject");function Ls(e,t){var i;for(var a in t)e.test(a)&&(i=t[a],delete t[a]);return i===null||typeof i>"u"?void 0:String(i).trim()}r(Ls,"removeMatchingHeaders");function Ta(e,t,i){function a(n){Kt(Error.captureStackTrace)&&Error.captureStackTrace(this,this.constructor),Object.assign(this,n||{}),this.code=e,this.message=this.cause?t+": "+this.cause.message:t}return r(a,"CustomError"),a.prototype=new(i||Error),Object.defineProperties(a.prototype,{constructor:{value:a,enumerable:!1},name:{value:"Error ["+e+"]",enumerable:!1}}),a}r(Ta,"createErrorType");function Hs(e,t){for(var i of Bs)e.removeListener(i,zs[i]);e.on("error",um),e.destroy(t)}r(Hs,"destroyRequest");function F0(e,t){js(Wt(e)&&Wt(t));var i=e.length-t.length-1;return i>0&&e[i]==="."&&e.endsWith(t)}r(F0,"isSubdomain");function Wt(e){return typeof e=="string"||e instanceof String}r(Wt,"isString");function Kt(e){return typeof e=="function"}r(Kt,"isFunction");function L0(e){return typeof e=="object"&&"length"in e}r(L0,"isBuffer");function D0(e){return Sa&&e instanceof Sa}r(D0,"isURL");Ws.exports=pm({http:S0,https:k0});Ws.exports.wrap=pm});var lw={};mc(lw,{TestRunMonitor:()=>Qn});module.exports=sh(lw);var ar=r(e=>new Promise(t=>setTimeout(t,e)),"awaitSleep");var Xm=require("child_process"),er=require("crypto"),V=require("fs"),Qm=require("http"),eh=se(require("net")),Ce=require("path");var Pd=se(Rd()),ot=require("fs"),Bd=require("path");var Ke=se(require("path")),es=require("fs");var Go=require("path"),En=require("fs");function qb(e,t,i=10){let a=e;for(let n=0;n<i;n++){let o=(0,Go.join)(a,"package.json");if((0,En.existsSync)(o))try{if(JSON.parse((0,En.readFileSync)(o,"utf8")).name===t)return a}catch{}a=(0,Go.join)(a,"..")}}r(qb,"findRepositoryRoot");function Cd(e,t=10){return qb(e,"checksum-customer-engineering-workspace",t)}r(Cd,"findCustomerEngineeringRoot");var ts=se(Ld());var U=r((e,t)=>{if(e==null||e==="")return(t==null?void 0:t.default)??!1;let i=e.toLowerCase().trim();return i==="true"?!0:i==="false"?!1:(t==null?void 0:t.default)??!1},"parseBoolean");var ny=__dirname,Dd=Ke.join(__dirname,".."),Md=(0,es.existsSync)(Dd)?Dd:ny;(0,ts.config)({path:Ke.resolve(Md,".env")});var Xo=U(process.env.CHECKSUM_RUNTIME_DEV_MODE);function ry(){let e=__dirname;for(;!(0,es.existsSync)(Ke.join(e,"package.json"));)e=Ke.join(e,"..");return e}r(ry,"findRoot");var wi=ry(),oy=Cd(wi,10);(0,ts.config)({path:[Md,oy].filter(Boolean).map(e=>Ke.resolve(e,".env")),override:!1});var kn=U(process.env.CHECKSUM_VTG_E2E_TEST_MODE),Nd=Ke.join(wi,"vtg-build","index.html"),Qo=kn?!0:U(process.env.CHECKSUM_RUNTIME_REPO_MODE),Ud=U(process.env.CHECKSUM_VTG_SEPARATE_PROCESS),sy=Qo?Ke.join(wi,"package","pw-report-template.html"):Ke.join(wi,"pw-report-template.html"),cy=U(process.env.CHECKSUM_DEBUG_ANALYTICS),ly=U(process.env.CHECKSUM_LOG_ANALYTICS_TO_CONSOLE),Tn={isDevMode:Xo,isRepoMode:Qo,CI:!!process.env.CI,checksumRootFolderBypass:kn?"packages/runtime/test/e2e/checksum":Qo&&process.env.CHECKSUM_RUNTIME_ROOT_FOLDER_BYPASS_FOR_REPO_MODE?process.env.CHECKSUM_RUNTIME_ROOT_FOLDER_BYPASS_FOR_REPO_MODE:process.env.CHECKSUM_RUNTIME_ROOT_FOLDER_BYPASS,logLevel:process.env.CHECKSUM_RUNTIME_LOG_LEVEL??"warnings",checksumScript:{source:process.env.CHECKSUM_RUNTIME_SCRIPT_SOURCE??(Xo?"url":"file"),url:process.env.CHECKSUM_RUNTIME_SCRIPT_URL,path:wi+"/checksumlib.js"},runtimeRoot:wi,playwrightReporter:{htmlReportTemplatePath:sy},bypassProxyForLocalhost:U(process.env.CHECKSUM_RUNTIME_BYPASS_PROXY_FOR_LOCALHOST),promptKillActivePlaywrightProcesses:U(process.env.CHECKSUM_RUNTIME_PROMPT_KILL_ACTIVE_PLAYWRIGHT_PROCESSES,{default:!0}),useCLIDebug:U(process.env.CHECKSUM_RUNTIME_USE_CLI_DEBUG),useRemoteDebugging:{enabled:U(process.env.CHECKSUM_RUNTIME_USE_REMOTE_DEBUGGING),port:parseInt(process.env.CHECKSUM_AGENT_RUNTIME_REMOTE_DEBUGGING_PORT??"9500")},testRun:{timeMachine:{active:!0,headless:!U(process.env.CHECKSUM_RUNTIME_SHOW_RUNTIME_TIME_MACHINE),recordRRwebEventsToFile:U(process.env.CHECKSUM_RUNTIME_RECORD_RRWEB_EVENTS_TO_FILE,{default:!0})},monitoring:{defaultProvider:process.env.CHECKSUM_RUNTIME_MONITORING_DEFAULT_PROVIDER??"newrelic",debugAnalytics:cy,logToConsole:ly,newrelic:{appName:process.env.CHECKSUM_RUNTIME_MONITORING_NEWRELIC_APP_NAME??"checksum-runtime",licenseKey:"b4f3f644f40df19fe3d385c75428a450FFFFNRAL",logging:U(process.env.NEW_RELIC_LOG_ENABLED,{default:!1})},segment:{writeKey:process.env.CHECKSUM_RUNTIME_MONITORING_SEGMENT_WRITE_KEY??"TMuP8uorDj4QzJfNs0gEHDO7kHozVBOo",devWriteKey:process.env.CHECKSUM_RUNTIME_MONITORING_SEGMENT_DEV_WRITE_KEY??"gofHHwvdNHJNmb7KqACUmypZclVHEQ2l"}},autoRecovery:{verboseConsoleLog:U(process.env.CHECKSUM_RUNTIME_AUTO_RECOVERY_CONSOLE_LOG,{default:!1}),sessionTimeout:18e4},disableAutoRecovery:U(process.env.CHECKSUM_RUNTIME_DISABLE_AUTO_RECOVERY),disableHostReports:U(process.env.CHECKSUM_RUNTIME_DISABLE_HOST_REPORTS),request:{userEmail:process.env.CHECKSUM_RUNTIME_REQUEST_USER_EMAIL,reason:process.env.CHECKSUM_RUNTIME_REQUEST_REASON},platform:{name:process.env.CHECKSUM_RUNTIME_PLATFORM_NAME},runType:process.env.CHECKSUM_RUNTIME_RUN_TYPE},vtg:{isSeparateProcess:Ud,isE2ETestMode:kn,writeLogFile:U(process.env.CHECKSUM_VTG_WRITE_LOG_FILE,{default:!0}),appSource:process.env.CHECKSUM_VTG_APP_SOURCE??(Xo?"served-app":"served-build-file"),localUrl:`file://${Nd}`,localBuildPath:Nd,appURL:process.env.CHECKSUM_VTG_APP_URL,writeRrwebEventsToFile:U(process.env.CHECKSUM_VTG_RECORD_EVENTS_TO_FILE),useFakeStory:U(process.env.CHECKSUM_VTG_USE_FAKE_STORY)||kn,logAPIServer:{interval:U(process.env.CHECKSUM_VTG_LOG_API_SERVER_INTERVAL),httpTransactions:U(process.env.CHECKSUM_VTG_LOG_API_SERVER_HTTP_TRANSACTIONS,{default:!0})},customerEngRepoInternalUtilsRelativePath:process.env.CHECKSUM_VTG_CUSTOMER_ENG_REPO_INTERNAL_UTILS_RELATIVE_PATH??"tools/internal-utils.ts",fakeStory:{goal:process.env.CHECKSUM_VTG_FAKE_STORY_GOAL??"Send email via outreach list",instructions:process.env.CHECKSUM_VTG_FAKE_STORY_INSTRUCTIONS??"Make sure to select a user from the list first"},fakeTestGeneration:{internalTestId:process.env.CHECKSUM_VTG_FAKE_STORY_INTERNAL_TEST_ID??`tempID${Date.now().toString().slice(-5)}`,generationBatchId:process.env.CHECKSUM_VTG_FAKE_GENERATION_BATCH_ID??`tempID${Date.now().toString().slice(-5)}`},remoteDebugging:Ud?!0:U(process.env.CHECKSUM_VTG_REMOTE_DEBUGGING),appRemoteDebuggingPort:parseInt(process.env.CHECKSUM_VTG_REMOTE_DEBUGGING_PORT??"9230"),vtgRemoteDebuggingPort:parseInt(process.env.CHECKSUM_VTG_REMOTE_DEBUGGING_PORT??"9231"),taskTimeMachine:{showTaskTimeMachine:U(process.env.CHECKSUM_VTG_SHOW_TASK_TIME_MACHINE),taskTimeout:parseInt(process.env.CHECKSUM_VTG_TASK_TIME_MACHINE_TIMEOUT??"240000"),debugPort:parseInt(process.env.CHECKSUM_VTG_TASK_TIME_MACHINE_DEBUG_PORT??"9232"),logPerformance:U(process.env.CHECKSUM_VTG_TASK_TIME_MACHINE_LOG_PERFORMANCE,{default:!0})},aiAssertions:{disabled:U(process.env.CHECKSUM_VTG_AI_ASSERTIONS_DISABLED),allowRefactoring:U(process.env.CHECKSUM_VTG_ALLOW_AI_ASSERTIONS_REFACTORING),allowFiltering:U(process.env.CHECKSUM_VTG_ALLOW_AI_ASSERTIONS_FILTERING),logPerformance:U(process.env.CHECKSUM_VTG_AI_ASSERTIONS_LOG_PERFORMANCE,{default:!1})},aiLocators:{disabled:U(process.env.CHECKSUM_VTG_AI_LOCATORS_DISABLED),useFakeAILocators:U(process.env.CHECKSUM_VTG_USE_FAKE_AI_LOCATORS)}},benchmark:U(process.env.BENCHMARK_MODE),buildTime:process.env.CHECKSUM_RUNTIME_BUILD_TIME??"unknown",llm:{models:{openai:{key:process.env.CHECKSUM_RUNTIME_OPENAI_API_KEY},anthropic:{key:process.env.CHECKSUM_RUNTIME_ANTHROPIC_API_KEY},gemini:{model:process.env.CHECKSUM_RUNTIME_GEMINI_MODEL},groq:{apiKey:process.env.CHECKSUM_RUNTIME_GROQ_API_KEY}}},gcp:{credentialsFile:process.env.CHECKSUM_RUNTIME_GCP_CREDENTIALS_FILE}};var Rn=r(e=>isNaN(e)?0:e,"getStat");var jd=r((e,t)=>Object.values(t[e]||{}).some(i=>{var a,n;return(n=(a=i.autoRecoveryMetadata)==null?void 0:a.data)==null?void 0:n.autoRecovered}),"isAutoRecovered");var is=class is{constructor(t,i,a,n={},o={},s){this.reportHTMLFilePath=t;this.testRunUUID=i;this.pwTestIdToChecksumTestId=a;this.playwrightIdToMetadata=n;this.channel=s;this.supportVideo=!1;this.config={hosted:!0,assetsBaseURL:"https://api.checksum.ai/api/test-runs"};this.config={...this.config,...o}}async process(){this.channel.debug("Extracting report...");let t=this.extractReportBase64();this.channel.debug("Preparing new report...");let i=await this.editZipFile(t);this.channel.debug("Writing report to file..."),this.writeFile(i)}testHasTrace(t,i){try{if(!this.report)return!0;let a=Object.keys(this.pwTestIdToChecksumTestId??{}).find(o=>this.pwTestIdToChecksumTestId[o]===t);if(!a)return!0;let n=r(o=>o.some(s=>{var c;return(c=s.attachments)==null?void 0:c.some(u=>u.name==="trace")}),"hasTrace");for(let o of this.report.files)for(let s of o.tests)if(s.testId===a&&s.projectName===i&&n(s.results))return!0;return!1}catch(a){return this.channel.debug("Failed to check if test has trace, assuming trace exists",a),!0}}getStatPerFile(){let t=[];return this.report.files.forEach(i=>{i.tests.forEach(a=>{t.push({checksumTestId:this.pwTestIdToChecksumTestId[a.testId],playwrightTestId:a.testId,success:!!a.ok,recovered:jd(a.testId,this.playwrightIdToMetadata),bug:a.tags.includes("bug")||a.annotations.some(n=>n.type==="bug")||a.title.includes("@bug"),outcome:a.outcome})})}),t}getProcessedFilePath(){return this.reportHTMLFilePath}extractReportBase64(){var a;try{let n=(a=(0,ot.statSync)(this.reportHTMLFilePath))==null?void 0:a.size;this.channel.debug(`Report HTML file size approximately ${n} bytes`)}catch(n){this.channel.debug(`Failed to retrieve file size for ${this.reportHTMLFilePath}`,n)}let i=(0,ot.readFileSync)(this.reportHTMLFilePath,"utf-8").match(/window\.playwrightReportBase64 = "(.*)";/);if(i&&i[1])return i[1];{let n="Could not extract playwrightReportBase64 from HTML file";throw this.channel.debug(n),new Error(n)}}writeFile(t){let i=(0,ot.readFileSync)(Tn.playwrightReporter.htmlReportTemplatePath,"utf-8");i=i+`<script>
10
10
  window.playwrightReportBase64 = "${t}";
11
11
  </script>`;let a=this.getProcessedFilePath().replace(".html",".backup.html");(0,ot.writeFileSync)(a,(0,ot.readFileSync)(this.getProcessedFilePath())),(0,ot.writeFileSync)(this.getProcessedFilePath(),i)}getReportsStats(){return this.stats}async editZipFile(t){let i=t.replace("data:application/zip;base64,",""),a=await(0,Pd.loadAsync)(i,{base64:!0});for(let o of Object.keys(a.files)){let s=a.file(o);if(s){let c=await s.async("string"),u=JSON.parse(c);o.startsWith("report")?(this.handleReportJSON(u),this.report=u,this.extractStats(u)):this.handleFileReportJSON(u),a.file(o,JSON.stringify(u))}}return`data:application/zip;base64,${await a.generateAsync({type:"base64",compression:"DEFLATE"})}`}extractStats(t){if(!t.stats)return;let{expected:i,unexpected:a,flaky:n}=t.stats,o=this.getStatPerFile(),s={passed:Rn(n)+Rn(i),failed:Rn(a),bug:o.filter(c=>c.bug).length,recovered:o.filter(c=>c.recovered).length,tests:o};o.forEach(c=>{c.bug&&(c.outcome==="expected"||c.outcome==="flaky"?s.passed--:c.outcome==="unexpected"&&s.failed--)}),this.stats=s}makeAttachmentPath(t){return this.config.hosted?`${this.config.assetsBaseURL}/${this.testRunUUID}/report-data-file-url?fileName=${(0,Bd.basename)(t)}`:t}handleReportJSON(t){let i={},a=r(n=>{let o=n.testId,s=this.playwrightIdToMetadata[o];s&&(i[o]=s),n.results.forEach(c=>{this.processAttachments(c.attachments,n.testId)})},"getChecksumMetadataForPWTestId");t.files.forEach(n=>{n.tests.forEach(a)}),t.checksumMetadata=i}handleFileReportJSON(t){var i;(i=t.tests)==null||i.forEach(a=>{var n;(n=a.results)==null||n.forEach(o=>{this.processAttachments(o.attachments,a.testId)})})}processAttachments(t,i){if(t.forEach(a=>this.updateAttachment(a,i)),!this.supportVideo){let a=t.findIndex(n=>n.name==="video");a!==-1&&t.splice(a,1)}}updateAttachment(t,i){t.path&&(t.path=this.makeAttachmentPath(t.path))}};r(is,"PlaywrightReportProcessor");var Cn=is;var zd={trace:"application/zip","trace-backup-file":"application/zip",har:"application/zip",report:"text/html","rrweb-recording":"application/json"},uy={click:"click",fill:"input",click_and_type:"click_and_type",clear_and_type:"clear_and_type",double_click:"double_click",drag_and_drop:"drag_and_drop",hover:"hover",navigate:"navigation",keystroke:"keystroke",selectoption:"selectoption",upload_files:"upload_files",wait:"wait",get_more_items:"get_more_items",reset:void 0,save:void 0,fail:void 0,finish:void 0,dismiss_modal:void 0,vision_help:void 0,switch_tab:"switch_tab",expand_interactable_elements:void 0,approve_release:void 0,logout_and_login:"logout_and_login",canvas_click:"canvas_click",native_accept:"native_accept",native_dismiss:"native_dismiss",hard_assertion:void 0,soft_assertion:void 0,recovery:void 0,scroll:void 0},ok=Object.fromEntries(Object.entries(uy).map(e=>e.reverse())),dy={goto:"navigation",click:"click",dblclick:"double_click",dragTo:"drag_and_drop",check:"check",uncheck:"uncheck",fill:"input",hover:"hover",selectOption:"selectoption",waitForTimeout:"wait","keyboard.press":"keystroke",setInputFiles:"upload_files",getPage:"switch_tab",reauthenticate:"logout_and_login",canvasClick:"canvas_click"},sk=Object.fromEntries(Object.entries(dy).map(e=>e.reverse()));var ck={input:[1,2],selectoption:[1,2],keystroke:[1,2],wait:[1,2],navigation:[1,2],click:[0,1],double_click:[0,1],drag_and_drop:[1,2],upload_files:[1,2],canvas_click:[1,2],logout_and_login:[1],login:[1,2],click_and_type:[1,2],clear_and_type:[1,2],check:[0,1],uncheck:[0,1],hover:[0,1]},lk={input:1,selectoption:1,keystroke:1,wait:-1,navigation:1,click:0,double_click:0,drag_and_drop:1,upload_files:1,canvas_click:-1,logout_and_login:-1,login:1,click_and_type:0,clear_and_type:0,check:0,uncheck:0,hover:0,native_accept:-1,native_dismiss:-1};function xa(e,t){return r(function(){return e.apply(t,arguments)},"wrap")}r(xa,"bind");var{toString:fy}=Object.prototype,{getPrototypeOf:rs}=Object,On=(e=>t=>{let i=fy.call(t);return e[i]||(e[i]=i.slice(8,-1).toLowerCase())})(Object.create(null)),De=r(e=>(e=e.toLowerCase(),t=>On(t)===e),"kindOfTest"),In=r(e=>t=>typeof t===e,"typeOfTest"),{isArray:Ei}=Array,ga=In("undefined");function my(e){return e!==null&&!ga(e)&&e.constructor!==null&&!ga(e.constructor)&&be(e.constructor.isBuffer)&&e.constructor.isBuffer(e)}r(my,"isBuffer");var Wd=De("ArrayBuffer");function hy(e){let t;return typeof ArrayBuffer<"u"&&ArrayBuffer.isView?t=ArrayBuffer.isView(e):t=e&&e.buffer&&Wd(e.buffer),t}r(hy,"isArrayBufferView");var vy=In("string"),be=In("function"),Kd=In("number"),Fn=r(e=>e!==null&&typeof e=="object","isObject"),xy=r(e=>e===!0||e===!1,"isBoolean"),An=r(e=>{if(On(e)!=="object")return!1;let t=rs(e);return(t===null||t===Object.prototype||Object.getPrototypeOf(t)===null)&&!(Symbol.toStringTag in e)&&!(Symbol.iterator in e)},"isPlainObject"),gy=De("Date"),by=De("File"),yy=De("Blob"),_y=De("FileList"),wy=r(e=>Fn(e)&&be(e.pipe),"isStream"),Ey=r(e=>{let t;return e&&(typeof FormData=="function"&&e instanceof FormData||be(e.append)&&((t=On(e))==="formdata"||t==="object"&&be(e.toString)&&e.toString()==="[object FormData]"))},"isFormData"),Sy=De("URLSearchParams"),[ky,Ty,Ry,Cy]=["ReadableStream","Request","Response","Headers"].map(De),Ay=r(e=>e.trim?e.trim():e.replace(/^[\s\uFEFF\xA0]+|[\s\uFEFF\xA0]+$/g,""),"trim");function ba(e,t,{allOwnKeys:i=!1}={}){if(e===null||typeof e>"u")return;let a,n;if(typeof e!="object"&&(e=[e]),Ei(e))for(a=0,n=e.length;a<n;a++)t.call(null,e[a],a,e);else{let o=i?Object.getOwnPropertyNames(e):Object.keys(e),s=o.length,c;for(a=0;a<s;a++)c=o[a],t.call(null,e[c],c,e)}}r(ba,"forEach");function Vd(e,t){t=t.toLowerCase();let i=Object.keys(e),a=i.length,n;for(;a-- >0;)if(n=i[a],t===n.toLowerCase())return n;return null}r(Vd,"findKey");var Bt=typeof globalThis<"u"?globalThis:typeof self<"u"?self:typeof window<"u"?window:global,Zd=r(e=>!ga(e)&&e!==Bt,"isContextDefined");function ns(){let{caseless:e}=Zd(this)&&this||{},t={},i=r((a,n)=>{let o=e&&Vd(t,n)||n;An(t[o])&&An(a)?t[o]=ns(t[o],a):An(a)?t[o]=ns({},a):Ei(a)?t[o]=a.slice():t[o]=a},"assignValue");for(let a=0,n=arguments.length;a<n;a++)arguments[a]&&ba(arguments[a],i);return t}r(ns,"merge");var Oy=r((e,t,i,{allOwnKeys:a}={})=>(ba(t,(n,o)=>{i&&be(n)?e[o]=xa(n,i):e[o]=n},{allOwnKeys:a}),e),"extend"),Iy=r(e=>(e.charCodeAt(0)===65279&&(e=e.slice(1)),e),"stripBOM"),Fy=r((e,t,i,a)=>{e.prototype=Object.create(t.prototype,a),e.prototype.constructor=e,Object.defineProperty(e,"super",{value:t.prototype}),i&&Object.assign(e.prototype,i)},"inherits"),Ly=r((e,t,i,a)=>{let n,o,s,c={};if(t=t||{},e==null)return t;do{for(n=Object.getOwnPropertyNames(e),o=n.length;o-- >0;)s=n[o],(!a||a(s,e,t))&&!c[s]&&(t[s]=e[s],c[s]=!0);e=i!==!1&&rs(e)}while(e&&(!i||i(e,t))&&e!==Object.prototype);return t},"toFlatObject"),Dy=r((e,t,i)=>{e=String(e),(i===void 0||i>e.length)&&(i=e.length),i-=t.length;let a=e.indexOf(t,i);return a!==-1&&a===i},"endsWith"),Ny=r(e=>{if(!e)return null;if(Ei(e))return e;let t=e.length;if(!Kd(t))return null;let i=new Array(t);for(;t-- >0;)i[t]=e[t];return i},"toArray"),Uy=(e=>t=>e&&t instanceof e)(typeof Uint8Array<"u"&&rs(Uint8Array)),My=r((e,t)=>{let a=(e&&e[Symbol.iterator]).call(e),n;for(;(n=a.next())&&!n.done;){let o=n.value;t.call(e,o[0],o[1])}},"forEachEntry"),jy=r((e,t)=>{let i,a=[];for(;(i=e.exec(t))!==null;)a.push(i);return a},"matchAll"),Py=De("HTMLFormElement"),By=r(e=>e.toLowerCase().replace(/[-_\s]([a-z\d])(\w*)/g,r(function(i,a,n){return a.toUpperCase()+n},"replacer")),"toCamelCase"),qd=(({hasOwnProperty:e})=>(t,i)=>e.call(t,i))(Object.prototype),zy=De("RegExp"),Gd=r((e,t)=>{let i=Object.getOwnPropertyDescriptors(e),a={};ba(i,(n,o)=>{let s;(s=t(n,o,e))!==!1&&(a[o]=s||n)}),Object.defineProperties(e,a)},"reduceDescriptors"),qy=r(e=>{Gd(e,(t,i)=>{if(be(e)&&["arguments","caller","callee"].indexOf(i)!==-1)return!1;let a=e[i];if(be(a)){if(t.enumerable=!1,"writable"in t){t.writable=!1;return}t.set||(t.set=()=>{throw Error("Can not rewrite read-only method '"+i+"'")})}})},"freezeMethods"),Hy=r((e,t)=>{let i={},a=r(n=>{n.forEach(o=>{i[o]=!0})},"define");return Ei(e)?a(e):a(String(e).split(t)),i},"toObjectSet"),Wy=r(()=>{},"noop"),Ky=r((e,t)=>e!=null&&Number.isFinite(e=+e)?e:t,"toFiniteNumber"),as="abcdefghijklmnopqrstuvwxyz",Hd="0123456789",$d={DIGIT:Hd,ALPHA:as,ALPHA_DIGIT:as+as.toUpperCase()+Hd},Vy=r((e=16,t=$d.ALPHA_DIGIT)=>{let i="",{length:a}=t;for(;e--;)i+=t[Math.random()*a|0];return i},"generateString");function Zy(e){return!!(e&&be(e.append)&&e[Symbol.toStringTag]==="FormData"&&e[Symbol.iterator])}r(Zy,"isSpecCompliantForm");var Gy=r(e=>{let t=new Array(10),i=r((a,n)=>{if(Fn(a)){if(t.indexOf(a)>=0)return;if(!("toJSON"in a)){t[n]=a;let o=Ei(a)?[]:{};return ba(a,(s,c)=>{let u=i(s,n+1);!ga(u)&&(o[c]=u)}),t[n]=void 0,o}}return a},"visit");return i(e,0)},"toJSONObject"),$y=De("AsyncFunction"),Jy=r(e=>e&&(Fn(e)||be(e))&&be(e.then)&&be(e.catch),"isThenable"),Jd=((e,t)=>e?setImmediate:t?((i,a)=>(Bt.addEventListener("message",({source:n,data:o})=>{n===Bt&&o===i&&a.length&&a.shift()()},!1),n=>{a.push(n),Bt.postMessage(i,"*")}))(`axios@${Math.random()}`,[]):i=>setTimeout(i))(typeof setImmediate=="function",be(Bt.postMessage)),Yy=typeof queueMicrotask<"u"?queueMicrotask.bind(Bt):typeof process<"u"&&process.nextTick||Jd,d={isArray:Ei,isArrayBuffer:Wd,isBuffer:my,isFormData:Ey,isArrayBufferView:hy,isString:vy,isNumber:Kd,isBoolean:xy,isObject:Fn,isPlainObject:An,isReadableStream:ky,isRequest:Ty,isResponse:Ry,isHeaders:Cy,isUndefined:ga,isDate:gy,isFile:by,isBlob:yy,isRegExp:zy,isFunction:be,isStream:wy,isURLSearchParams:Sy,isTypedArray:Uy,isFileList:_y,forEach:ba,merge:ns,extend:Oy,trim:Ay,stripBOM:Iy,inherits:Fy,toFlatObject:Ly,kindOf:On,kindOfTest:De,endsWith:Dy,toArray:Ny,forEachEntry:My,matchAll:jy,isHTMLForm:Py,hasOwnProperty:qd,hasOwnProp:qd,reduceDescriptors:Gd,freezeMethods:qy,toObjectSet:Hy,toCamelCase:By,noop:Wy,toFiniteNumber:Ky,findKey:Vd,global:Bt,isContextDefined:Zd,ALPHABET:$d,generateString:Vy,isSpecCompliantForm:Zy,toJSONObject:Gy,isAsyncFn:$y,isThenable:Jy,setImmediate:Jd,asap:Yy};function Si(e,t,i,a,n){Error.call(this),Error.captureStackTrace?Error.captureStackTrace(this,this.constructor):this.stack=new Error().stack,this.message=e,this.name="AxiosError",t&&(this.code=t),i&&(this.config=i),a&&(this.request=a),n&&(this.response=n,this.status=n.status?n.status:null)}r(Si,"AxiosError");d.inherits(Si,Error,{toJSON:r(function(){return{message:this.message,name:this.name,description:this.description,number:this.number,fileName:this.fileName,lineNumber:this.lineNumber,columnNumber:this.columnNumber,stack:this.stack,config:d.toJSONObject(this.config),code:this.code,status:this.status}},"toJSON")});var Yd=Si.prototype,Xd={};["ERR_BAD_OPTION_VALUE","ERR_BAD_OPTION","ECONNABORTED","ETIMEDOUT","ERR_NETWORK","ERR_FR_TOO_MANY_REDIRECTS","ERR_DEPRECATED","ERR_BAD_RESPONSE","ERR_BAD_REQUEST","ERR_CANCELED","ERR_NOT_SUPPORT","ERR_INVALID_URL"].forEach(e=>{Xd[e]={value:e}});Object.defineProperties(Si,Xd);Object.defineProperty(Yd,"isAxiosError",{value:!0});Si.from=(e,t,i,a,n,o)=>{let s=Object.create(Yd);return d.toFlatObject(e,s,r(function(u){return u!==Error.prototype},"filter"),c=>c!=="isAxiosError"),Si.call(s,e.message,t,i,a,n),s.cause=e,s.name=e.name,o&&Object.assign(s,o),s};var k=Si;var Df=se(Lf(),1),Nn=Df.default;function vs(e){return d.isPlainObject(e)||d.isArray(e)}r(vs,"isVisitable");function Uf(e){return d.endsWith(e,"[]")?e.slice(0,-2):e}r(Uf,"removeBrackets");function Nf(e,t,i){return e?e.concat(t).map(r(function(n,o){return n=Uf(n),!i&&o?"["+n+"]":n},"each")).join(i?".":""):t}r(Nf,"renderKey");function N_(e){return d.isArray(e)&&!e.some(vs)}r(N_,"isFlatArray");var U_=d.toFlatObject(d,{},null,r(function(t){return/^is[A-Z]/.test(t)},"filter"));function M_(e,t,i){if(!d.isObject(e))throw new TypeError("target must be an object");t=t||new(Nn||FormData),i=d.toFlatObject(i,{metaTokens:!0,dots:!1,indexes:!1},!1,r(function(g,x){return!d.isUndefined(x[g])},"defined"));let a=i.metaTokens,n=i.visitor||p,o=i.dots,s=i.indexes,u=(i.Blob||typeof Blob<"u"&&Blob)&&d.isSpecCompliantForm(t);if(!d.isFunction(n))throw new TypeError("visitor must be a function");function l(v){if(v===null)return"";if(d.isDate(v))return v.toISOString();if(!u&&d.isBlob(v))throw new k("Blob is not supported. Use a Buffer instead.");return d.isArrayBuffer(v)||d.isTypedArray(v)?u&&typeof Blob=="function"?new Blob([v]):Buffer.from(v):v}r(l,"convertValue");function p(v,g,x){let b=v;if(v&&!x&&typeof v=="object"){if(d.endsWith(g,"{}"))g=a?g:g.slice(0,-2),v=JSON.stringify(v);else if(d.isArray(v)&&N_(v)||(d.isFileList(v)||d.endsWith(g,"[]"))&&(b=d.toArray(v)))return g=Uf(g),b.forEach(r(function(E,S){!(d.isUndefined(E)||E===null)&&t.append(s===!0?Nf([g],S,o):s===null?g:g+"[]",l(E))},"each")),!1}return vs(v)?!0:(t.append(Nf(x,g,o),l(v)),!1)}r(p,"defaultVisitor");let f=[],m=Object.assign(U_,{defaultVisitor:p,convertValue:l,isVisitable:vs});function h(v,g){if(!d.isUndefined(v)){if(f.indexOf(v)!==-1)throw Error("Circular reference detected in "+g.join("."));f.push(v),d.forEach(v,r(function(b,y){(!(d.isUndefined(b)||b===null)&&n.call(t,b,d.isString(y)?y.trim():y,g,m))===!0&&h(b,g?g.concat(y):[y])},"each")),f.pop()}}if(r(h,"build"),!d.isObject(e))throw new TypeError("data must be an object");return h(e),t}r(M_,"toFormData");var _t=M_;function Mf(e){let t={"!":"%21","'":"%27","(":"%28",")":"%29","~":"%7E","%20":"+","%00":"\0"};return encodeURIComponent(e).replace(/[!'()~]|%20|%00/g,r(function(a){return t[a]},"replacer"))}r(Mf,"encode");function jf(e,t){this._pairs=[],e&&_t(e,this,t)}r(jf,"AxiosURLSearchParams");var Pf=jf.prototype;Pf.append=r(function(t,i){this._pairs.push([t,i])},"append");Pf.toString=r(function(t){let i=t?function(a){return t.call(this,a,Mf)}:Mf;return this._pairs.map(r(function(n){return i(n[0])+"="+i(n[1])},"each"),"").join("&")},"toString");var Bf=jf;function j_(e){return encodeURIComponent(e).replace(/%3A/gi,":").replace(/%24/g,"$").replace(/%2C/gi,",").replace(/%20/g,"+").replace(/%5B/gi,"[").replace(/%5D/gi,"]")}r(j_,"encode");function zt(e,t,i){if(!t)return e;let a=i&&i.encode||j_;d.isFunction(i)&&(i={serialize:i});let n=i&&i.serialize,o;if(n?o=n(t,i):o=d.isURLSearchParams(t)?t.toString():new Bf(t,i).toString(a),o){let s=e.indexOf("#");s!==-1&&(e=e.slice(0,s)),e+=(e.indexOf("?")===-1?"?":"&")+o}return e}r(zt,"buildURL");var bs=class bs{constructor(){this.handlers=[]}use(t,i,a){return this.handlers.push({fulfilled:t,rejected:i,synchronous:a?a.synchronous:!1,runWhen:a?a.runWhen:null}),this.handlers.length-1}eject(t){this.handlers[t]&&(this.handlers[t]=null)}clear(){this.handlers&&(this.handlers=[])}forEach(t){d.forEach(this.handlers,r(function(a){a!==null&&t(a)},"forEachHandler"))}};r(bs,"InterceptorManager");var xs=bs,gs=xs;var ki={silentJSONParsing:!0,forcedJSONParsing:!0,clarifyTimeoutError:!1};var zf=se(require("url"),1),qf=zf.default.URLSearchParams;var Hf={isNode:!0,classes:{URLSearchParams:qf,FormData:Nn,Blob:typeof Blob<"u"&&Blob||null},protocols:["http","https","file","data"]};var ws={};mc(ws,{hasBrowserEnv:()=>_s,hasStandardBrowserEnv:()=>P_,hasStandardBrowserWebWorkerEnv:()=>B_,navigator:()=>ys,origin:()=>z_});var _s=typeof window<"u"&&typeof document<"u",ys=typeof navigator=="object"&&navigator||void 0,P_=_s&&(!ys||["ReactNative","NativeScript","NS"].indexOf(ys.product)<0),B_=typeof WorkerGlobalScope<"u"&&self instanceof WorkerGlobalScope&&typeof self.importScripts=="function",z_=_s&&window.location.href||"http://localhost";var P={...ws,...Hf};function Es(e,t){return _t(e,new P.classes.URLSearchParams,Object.assign({visitor:r(function(i,a,n,o){return P.isNode&&d.isBuffer(i)?(this.append(a,i.toString("base64")),!1):o.defaultVisitor.apply(this,arguments)},"visitor")},t))}r(Es,"toURLEncodedForm");function q_(e){return d.matchAll(/\w+|\[(\w*)]/g,e).map(t=>t[0]==="[]"?"":t[1]||t[0])}r(q_,"parsePropPath");function H_(e){let t={},i=Object.keys(e),a,n=i.length,o;for(a=0;a<n;a++)o=i[a],t[o]=e[o];return t}r(H_,"arrayToObject");function W_(e){function t(i,a,n,o){let s=i[o++];if(s==="__proto__")return!0;let c=Number.isFinite(+s),u=o>=i.length;return s=!s&&d.isArray(n)?n.length:s,u?(d.hasOwnProp(n,s)?n[s]=[n[s],a]:n[s]=a,!c):((!n[s]||!d.isObject(n[s]))&&(n[s]=[]),t(i,a,n[s],o)&&d.isArray(n[s])&&(n[s]=H_(n[s])),!c)}if(r(t,"buildPath"),d.isFormData(e)&&d.isFunction(e.entries)){let i={};return d.forEachEntry(e,(a,n)=>{t(q_(a),n,i,0)}),i}return null}r(W_,"formDataToJSON");var Un=W_;function K_(e,t,i){if(d.isString(e))try{return(t||JSON.parse)(e),d.trim(e)}catch(a){if(a.name!=="SyntaxError")throw a}return(i||JSON.stringify)(e)}r(K_,"stringifySafely");var Ss={transitional:ki,adapter:["xhr","http","fetch"],transformRequest:[r(function(t,i){let a=i.getContentType()||"",n=a.indexOf("application/json")>-1,o=d.isObject(t);if(o&&d.isHTMLForm(t)&&(t=new FormData(t)),d.isFormData(t))return n?JSON.stringify(Un(t)):t;if(d.isArrayBuffer(t)||d.isBuffer(t)||d.isStream(t)||d.isFile(t)||d.isBlob(t)||d.isReadableStream(t))return t;if(d.isArrayBufferView(t))return t.buffer;if(d.isURLSearchParams(t))return i.setContentType("application/x-www-form-urlencoded;charset=utf-8",!1),t.toString();let c;if(o){if(a.indexOf("application/x-www-form-urlencoded")>-1)return Es(t,this.formSerializer).toString();if((c=d.isFileList(t))||a.indexOf("multipart/form-data")>-1){let u=this.env&&this.env.FormData;return _t(c?{"files[]":t}:t,u&&new u,this.formSerializer)}}return o||n?(i.setContentType("application/json",!1),K_(t)):t},"transformRequest")],transformResponse:[r(function(t){let i=this.transitional||Ss.transitional,a=i&&i.forcedJSONParsing,n=this.responseType==="json";if(d.isResponse(t)||d.isReadableStream(t))return t;if(t&&d.isString(t)&&(a&&!this.responseType||n)){let s=!(i&&i.silentJSONParsing)&&n;try{return JSON.parse(t)}catch(c){if(s)throw c.name==="SyntaxError"?k.from(c,k.ERR_BAD_RESPONSE,this,null,this.response):c}}return t},"transformResponse")],timeout:0,xsrfCookieName:"XSRF-TOKEN",xsrfHeaderName:"X-XSRF-TOKEN",maxContentLength:-1,maxBodyLength:-1,env:{FormData:P.classes.FormData,Blob:P.classes.Blob},validateStatus:r(function(t){return t>=200&&t<300},"validateStatus"),headers:{common:{Accept:"application/json, text/plain, */*","Content-Type":void 0}}};d.forEach(["delete","get","head","post","put","patch"],e=>{Ss.headers[e]={}});var Ti=Ss;var V_=d.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"]),Wf=r(e=>{let t={},i,a,n;return e&&e.split(`
12
12
  `).forEach(r(function(s){n=s.indexOf(":"),i=s.substring(0,n).trim().toLowerCase(),a=s.substring(n+1).trim(),!(!i||t[i]&&V_[i])&&(i==="set-cookie"?t[i]?t[i].push(a):t[i]=[a]:t[i]=t[i]?t[i]+", "+a:a)},"parser")),t},"default");var Kf=Symbol("internals");function ya(e){return e&&String(e).trim().toLowerCase()}r(ya,"normalizeHeader");function Mn(e){return e===!1||e==null?e:d.isArray(e)?e.map(Mn):String(e)}r(Mn,"normalizeValue");function Z_(e){let t=Object.create(null),i=/([^\s,;=]+)\s*(?:=\s*([^,;]+))?/g,a;for(;a=i.exec(e);)t[a[1]]=a[2];return t}r(Z_,"parseTokens");var G_=r(e=>/^[-_a-zA-Z0-9^`|~,!#$%&'*+.]+$/.test(e.trim()),"isValidHeaderName");function ks(e,t,i,a,n){if(d.isFunction(a))return a.call(this,t,i);if(n&&(t=i),!!d.isString(t)){if(d.isString(a))return t.indexOf(a)!==-1;if(d.isRegExp(a))return a.test(t)}}r(ks,"matchHeaderValue");function $_(e){return e.trim().toLowerCase().replace(/([a-z\d])(\w*)/g,(t,i,a)=>i.toUpperCase()+a)}r($_,"formatHeader");function J_(e,t){let i=d.toCamelCase(" "+t);["get","set","has"].forEach(a=>{Object.defineProperty(e,a+i,{value:r(function(n,o,s){return this[a].call(this,t,n,o,s)},"value"),configurable:!0})})}r(J_,"buildAccessors");var Ts=class Ts{constructor(t){t&&this.set(t)}set(t,i,a){let n=this;function o(c,u,l){let p=ya(u);if(!p)throw new Error("header name must be a non-empty string");let f=d.findKey(n,p);(!f||n[f]===void 0||l===!0||l===void 0&&n[f]!==!1)&&(n[f||u]=Mn(c))}r(o,"setHeader");let s=r((c,u)=>d.forEach(c,(l,p)=>o(l,p,u)),"setHeaders");if(d.isPlainObject(t)||t instanceof this.constructor)s(t,i);else if(d.isString(t)&&(t=t.trim())&&!G_(t))s(Wf(t),i);else if(d.isHeaders(t))for(let[c,u]of t.entries())o(u,c,a);else t!=null&&o(i,t,a);return this}get(t,i){if(t=ya(t),t){let a=d.findKey(this,t);if(a){let n=this[a];if(!i)return n;if(i===!0)return Z_(n);if(d.isFunction(i))return i.call(this,n,a);if(d.isRegExp(i))return i.exec(n);throw new TypeError("parser must be boolean|regexp|function")}}}has(t,i){if(t=ya(t),t){let a=d.findKey(this,t);return!!(a&&this[a]!==void 0&&(!i||ks(this,this[a],a,i)))}return!1}delete(t,i){let a=this,n=!1;function o(s){if(s=ya(s),s){let c=d.findKey(a,s);c&&(!i||ks(a,a[c],c,i))&&(delete a[c],n=!0)}}return r(o,"deleteHeader"),d.isArray(t)?t.forEach(o):o(t),n}clear(t){let i=Object.keys(this),a=i.length,n=!1;for(;a--;){let o=i[a];(!t||ks(this,this[o],o,t,!0))&&(delete this[o],n=!0)}return n}normalize(t){let i=this,a={};return d.forEach(this,(n,o)=>{let s=d.findKey(a,o);if(s){i[s]=Mn(n),delete i[o];return}let c=t?$_(o):String(o).trim();c!==o&&delete i[o],i[c]=Mn(n),a[c]=!0}),this}concat(...t){return this.constructor.concat(this,...t)}toJSON(t){let i=Object.create(null);return d.forEach(this,(a,n)=>{a!=null&&a!==!1&&(i[n]=t&&d.isArray(a)?a.join(", "):a)}),i}[Symbol.iterator](){return Object.entries(this.toJSON())[Symbol.iterator]()}toString(){return Object.entries(this.toJSON()).map(([t,i])=>t+": "+i).join(`