@checksum-ai/runtime 1.0.17 → 1.0.18
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/checksum-root/checksum.config.ts +4 -4
- package/cli.js +2 -2
- package/index.d.ts +4 -4
- package/index.js +2 -2
- package/package.json +1 -1
|
@@ -33,14 +33,14 @@ export default getChecksumConfig({
|
|
|
33
33
|
|
|
34
34
|
options: {
|
|
35
35
|
/**
|
|
36
|
-
* Whether to
|
|
36
|
+
* Whether to use Checksum Smart Selector when trying to locate elements
|
|
37
37
|
*/
|
|
38
|
-
|
|
38
|
+
useChecksumSelectors: true,
|
|
39
39
|
|
|
40
40
|
/**
|
|
41
|
-
* Whether to use
|
|
41
|
+
* Whether to use Checksum AI when trying to locate elements
|
|
42
42
|
*/
|
|
43
|
-
|
|
43
|
+
useChecksumAI: true,
|
|
44
44
|
|
|
45
45
|
/**
|
|
46
46
|
* Whether to use mock API data when running your tests
|
package/cli.js
CHANGED
|
@@ -1,4 +1,4 @@
|
|
|
1
|
-
var m=Object.create;var
|
|
1
|
+
var m=Object.create;var p=Object.defineProperty;var f=Object.getOwnPropertyDescriptor;var C=Object.getOwnPropertyNames;var w=Object.getPrototypeOf,y=Object.prototype.hasOwnProperty;var k=(c,t,e,s)=>{if(t&&typeof t=="object"||typeof t=="function")for(let o of C(t))!y.call(c,o)&&o!==e&&p(c,o,{get:()=>t[o],enumerable:!(s=f(t,o))||s.enumerable});return c};var P=(c,t,e)=>(e=c!=null?m(w(c)):{},k(t||!c||!c.__esModule?p(e,"default",{value:c,enumerable:!0}):e,c));var n=require("fs"),l=P(require("child_process")),r=require("path");var d="checksum";var g=class{constructor(){this.UPLOAD_AGENT_PATH=(0,r.join)(__dirname,"upload-agent.js");this.CHECKSUM_API_URL="http://localhost:3000";this.didFail=!1;this.mock=!0;this.completeIndicators={upload:!1,tests:!1,report:!1};this.guardReturn=async(t,e=1e3,s="action hang guard timed out")=>{let o="guard-timed-out",i=async()=>(await this.awaitSleep(e+1e3),o),a=await Promise.race([t,i()]);if(typeof a=="string"&&a===o)throw new Error(s);return a};this.awaitSleep=t=>new Promise(e=>setTimeout(e,t))}async execute(){var t;switch(process.argv[2]){case"init":this.install();break;case"test":if(((t=process.argv)==null?void 0:t[3])==="--help"){await this.printHelp("test");break}await this.test(process.argv.slice(3));break;case"show-report":this.showReport(process.argv.slice(3));break;default:await this.printHelp()}process.exit(0)}async execCmd(t){let e=await l.spawn(t,{shell:!0,stdio:"inherit"});return new Promise((o,i)=>{e.on("exit",a=>{a===0?o(!0):i(new Error(`Checsum failed execution with code: ${a} `))})})}async getCmdOutput(t){return new Promise(function(e,s){l.exec(t,(o,i,a)=>{if(o){s(`Error executing command: ${o.message}`);return}e(i)})})}async printHelp(t){switch(t){default:console.log(`
|
|
2
2
|
Checksum CLI
|
|
3
3
|
Usage: checksum [command] [options]
|
|
4
4
|
|
|
@@ -10,7 +10,7 @@ show-report [options] [report] show HTML report
|
|
|
10
10
|
`);break;case"test":try{let e="npx playwright test --help",s=(await this.getCmdOutput(e)).replace(/npx playwright/g,"yarn checksum").split(`
|
|
11
11
|
`);s.splice(5,0," --checksum-config=<config> Checksum configuration in JSON format").join(`
|
|
12
12
|
`),console.log(s.join(`
|
|
13
|
-
`))}catch(e){console.log("Error",e.message)}break
|
|
13
|
+
`))}catch(e){console.log("Error",e.message)}break}}async showReport(t){let e=`npx playwright show-report ${t.join(" ")}`;try{await this.execCmd(e)}catch(s){console.log("Error showing report",s.message)}}async test(t){t=this.getChecksumConfigFromCommand(t),this.setChecksumConfig(),await this.getSession();let e;try{let{uuid:o,uploadURL:i}=this.testSession;e=await this.guardReturn(this.startUploadAgent(o,i),1e4,"Upload agent timeout")}catch{console.log("Error starting upload agent. Test results will not be available on checksum.")}this.buildVolatileConfig();let s=`${e?`CHECKSUM_UPLOAD_AGENT_PORT=${e} `:""} PWDEBUG=console npx playwright test --config ${this.getPlaywrightConfigFile()} ${t.join(" ")}`;try{await this.execCmd(s)}catch(o){this.didFail=!0,console.log("Error during test",o.message)}finally{let o=this.getPlaywrightReportPath();(0,n.existsSync)(o)?this.uploadAgent.stdin.write(`cli:report=${o}`):console.log(`Could not find report file at ${o}`),this.completeIndicators.tests=!0,await this.handleCompleteMessage()}}getPlaywrightReportPath(){var o,i;let t=(0,r.join)(process.cwd(),"playwright-report"),e=require(this.getPlaywrightConfigFile()),{reporter:s}=e;return s instanceof Array&&s.length>1&&((o=s[1])!=null&&o.outputFolder)&&(t=(i=s[1])==null?void 0:i.outputFolder),process.env.PLAYWRIGHT_HTML_REPORT&&(t=process.env.PLAYWRIGHT_HTML_REPORT),(0,r.join)(t,"index.html")}getPlaywrightConfigFile(){return(0,r.join)(this.getRootDirPath(),"playwright.config.ts")}startUploadAgent(t,e){return new Promise((s,o)=>{console.log("Starting upload agent"),this.uploadAgent=l.spawn("node",[this.UPLOAD_AGENT_PATH,JSON.stringify({sessionId:t,checksumApiURL:this.CHECKSUM_API_URL,apiKey:this.config.apiKey}),...this.mock?["mock"]:[]]),this.uploadAgent.stdout.on("data",i=>{let a=i.toString().trim();if(!a.startsWith("upag:"))return;let[u,h]=a.substring(5).split("=");u==="port"?(console.log("Received port from upload agent",h),s(h)):this.handleUploadAgentMessage(u,h)}),this.uploadAgent.on("exit",(i,a)=>{console.log(`upload agent process exited with code ${i} and signal ${a}`)}),this.uploadAgent.on("error",i=>{console.error(`Error starting upload agent: ${i.message}`)})})}async handleUploadAgentMessage(t,e){switch(t){case"complete":this.sendUploadsComplete().then(()=>{this.completeIndicators.upload=!0});break;case"report-uploaded":let s=await this.sendTestrunEnd();this.completeIndicators.report=!0,s&&console.log(`*******************
|
|
14
14
|
* Checksum report URL: ${s}
|
|
15
15
|
*******************`);break;default:console.warn(`Unhandled upload agent message: ${t}=${e}`)}}async handleCompleteMessage(){for(;;)Object.keys(this.completeIndicators).find(t=>!this.completeIndicators[t])?await this.awaitSleep(1e3):(console.log("Tests complete"),this.shutdown(this.didFail?1:0))}shutdown(t=0){this.cleanup(),process.exit(t)}buildVolatileConfig(){if(!this.volatileChecksumConfig)return;let t=this.getVolatileConfigPath(),e=`
|
|
16
16
|
import { RunMode, getChecksumConfig } from "@checksum-ai/runtime";
|
package/index.d.ts
CHANGED
|
@@ -15,13 +15,13 @@ export enum RunMode {
|
|
|
15
15
|
|
|
16
16
|
export type RuntimeOptions = {
|
|
17
17
|
/**
|
|
18
|
-
*
|
|
18
|
+
* Whether to use Checksum Smart Selector when trying to locate elements
|
|
19
19
|
*/
|
|
20
|
-
|
|
20
|
+
useChecksumSelectors: boolean;
|
|
21
21
|
/**
|
|
22
|
-
* use
|
|
22
|
+
* Whether to use Checksum AI when trying to locate elements
|
|
23
23
|
*/
|
|
24
|
-
|
|
24
|
+
useChecksumAI: boolean;
|
|
25
25
|
/**
|
|
26
26
|
* add new assertions
|
|
27
27
|
*/
|
package/index.js
CHANGED
|
@@ -266,8 +266,8 @@ m2: `).concat(this.mapper2.__debugToString().split(`
|
|
|
266
266
|
`:return e.formatting.formatOnEnter(Cn,Qn,Ge)}return[]}function br(rn,Cn,Dn,On,Qn,Ge){Ge===void 0&&(Ge=e.emptyOptions),ee();var cn=be(rn),Wn=e.createTextSpanFromBounds(Cn,Dn),Ki=e.formatting.getFormatContext(Qn,W);return e.flatMap(e.deduplicate(On,e.equateValues,e.compareValues),function(dt){return Me.throwIfCancellationRequested(),e.codefix.getFixes({errorCode:dt,sourceFile:cn,span:Wn,program:pe,host:W,cancellationToken:Me,formatContext:Ki,preferences:Ge})})}function Te(rn,Cn,Dn,On){On===void 0&&(On=e.emptyOptions),ee(),e.Debug.assert(rn.type==="file");var Qn=be(rn.fileName),Ge=e.formatting.getFormatContext(Dn,W);return e.codefix.getAllFixes({fixId:Cn,sourceFile:Qn,program:pe,host:W,cancellationToken:Me,formatContext:Ge,preferences:On})}function Ze(rn,Cn,Dn){var On;Dn===void 0&&(Dn=e.emptyOptions),ee(),e.Debug.assert(rn.type==="file");var Qn=be(rn.fileName),Ge=e.formatting.getFormatContext(Cn,W),cn=(On=rn.mode)!==null&&On!==void 0?On:rn.skipDestructiveCodeActions?"SortAndCombine":"All";return e.OrganizeImports.organizeImports(Qn,Ge,W,pe,Dn,cn)}function Xe(rn,Cn,Dn,On){return On===void 0&&(On=e.emptyOptions),e.getEditsForFileRename(p(),rn,Cn,W,e.formatting.getFormatContext(Dn,W),On,Oe)}function de(rn,Cn){var Dn=typeof rn=="string"?Cn:rn;return e.isArray(Dn)?Promise.all(Dn.map(function(On){return Ye(On)})):Ye(Dn)}function Ye(rn){var Cn=function(Dn){return e.toPath(Dn,Le,Ae)};return e.Debug.assertEqual(rn.type,"install package"),W.installPackage?W.installPackage({fileName:Cn(rn.file),packageName:rn.packageName}):Promise.reject("Host does not implement `installPackage`")}function ar(rn,Cn,Dn){return e.JsDoc.getDocCommentTemplateAtPosition(e.getNewLineOrDefaultFromHost(W),ge.getCurrentSourceFile(rn),Cn,Dn)}function Sr(rn,Cn,Dn){if(Dn===60)return!1;var On=ge.getCurrentSourceFile(rn);if(e.isInString(On,Cn))return!1;if(e.isInsideJsxElementOrAttribute(On,Cn))return Dn===123;if(e.isInTemplateString(On,Cn))return!1;switch(Dn){case 39:case 34:case 96:return!e.isInComment(On,Cn)}return!0}function pr(rn,Cn){var Dn=ge.getCurrentSourceFile(rn),On=e.findPrecedingToken(Cn,Dn);if(On){var Qn=On.kind===31&&e.isJsxOpeningElement(On.parent)?On.parent.parent:e.isJsxText(On)&&e.isJsxElement(On.parent)?On.parent:void 0;if(Qn&&bn(Qn))return{newText:"</".concat(Qn.openingElement.tagName.getText(Dn),">")};var Ge=On.kind===31&&e.isJsxOpeningFragment(On.parent)?On.parent.parent:e.isJsxText(On)&&e.isJsxFragment(On.parent)?On.parent:void 0;if(Ge&&Vn(Ge))return{newText:"</>"}}}function Fr(rn,Cn){return{lineStarts:rn.getLineStarts(),firstLine:rn.getLineAndCharacterOfPosition(Cn.pos).line,lastLine:rn.getLineAndCharacterOfPosition(Cn.end).line}}function Vr(rn,Cn,Dn){for(var On=ge.getCurrentSourceFile(rn),Qn=[],Ge=Fr(On,Cn),cn=Ge.lineStarts,Wn=Ge.firstLine,Ki=Ge.lastLine,dt=Dn||!1,qi=Number.MAX_VALUE,Ci=new e.Map,Tt=new RegExp(/\S/),ot=e.isInsideJsxElement(On,cn[Wn]),Yi=ot?"{/*":"//",ni=Wn;ni<=Ki;ni++){var Va=On.text.substring(cn[ni],On.getLineEndOfPosition(cn[ni])),Ua=Tt.exec(Va);Ua&&(qi=Math.min(qi,Ua.index),Ci.set(ni.toString(),Ua.index),Va.substr(Ua.index,Yi.length)!==Yi&&(dt=Dn===void 0||Dn))}for(var ni=Wn;ni<=Ki;ni++)if(!(Wn!==Ki&&cn[ni]===Cn.end)){var za=Ci.get(ni.toString());za!==void 0&&(ot?Qn.push.apply(Qn,fn(rn,{pos:cn[ni]+qi,end:On.getLineEndOfPosition(cn[ni])},dt,ot)):dt?Qn.push({newText:Yi,span:{length:0,start:cn[ni]+qi}}):On.text.substr(cn[ni]+za,Yi.length)===Yi&&Qn.push({newText:"",span:{length:Yi.length,start:cn[ni]+za}}))}return Qn}function fn(rn,Cn,Dn,On){for(var Qn,Ge=ge.getCurrentSourceFile(rn),cn=[],Wn=Ge.text,Ki=!1,dt=Dn||!1,qi=[],Ci=Cn.pos,Tt=On!==void 0?On:e.isInsideJsxElement(Ge,Ci),ot=Tt?"{/*":"/*",Yi=Tt?"*/}":"*/",ni=Tt?"\\{\\/\\*":"\\/\\*",Va=Tt?"\\*\\/\\}":"\\*\\/";Ci<=Cn.end;){var Ua=Wn.substr(Ci,ot.length)===ot?ot.length:0,za=e.isInComment(Ge,Ci+Ua);if(za)Tt&&(za.pos--,za.end++),qi.push(za.pos),za.kind===3&&qi.push(za.end),Ki=!0,Ci=za.end+1;else{var xo=Wn.substring(Ci,Cn.end).search("(".concat(ni,")|(").concat(Va,")"));dt=Dn!==void 0?Dn:dt||!e.isTextWhiteSpaceLike(Wn,Ci,xo===-1?Cn.end:Ci+xo),Ci=xo===-1?Cn.end+1:Ci+xo+Yi.length}}if(dt||!Ki){((Qn=e.isInComment(Ge,Cn.pos))===null||Qn===void 0?void 0:Qn.kind)!==2&&e.insertSorted(qi,Cn.pos,e.compareValues),e.insertSorted(qi,Cn.end,e.compareValues);var Ea=qi[0];Wn.substr(Ea,ot.length)!==ot&&cn.push({newText:ot,span:{length:0,start:Ea}});for(var ho=1;ho<qi.length-1;ho++)Wn.substr(qi[ho]-Yi.length,Yi.length)!==Yi&&cn.push({newText:Yi,span:{length:0,start:qi[ho]}}),Wn.substr(qi[ho],ot.length)!==ot&&cn.push({newText:ot,span:{length:0,start:qi[ho]}});cn.length%2!==0&&cn.push({newText:Yi,span:{length:0,start:qi[qi.length-1]}})}else for(var Aa=0,Vi=qi;Aa<Vi.length;Aa++){var Xi=Vi[Aa],ao=Xi-Yi.length>0?Xi-Yi.length:0,Ua=Wn.substr(ao,Yi.length)===Yi?Yi.length:0;cn.push({newText:"",span:{length:ot.length,start:Xi-Ua}})}return cn}function Wr(rn,Cn){var Dn=ge.getCurrentSourceFile(rn),On=Fr(Dn,Cn),Qn=On.firstLine,Ge=On.lastLine;return Qn===Ge&&Cn.pos!==Cn.end?fn(rn,Cn,!0):Vr(rn,Cn,!0)}function zn(rn,Cn){var Dn=ge.getCurrentSourceFile(rn),On=[],Qn=Cn.pos,Ge=Cn.end;Qn===Ge&&(Ge+=e.isInsideJsxElement(Dn,Qn)?2:1);for(var cn=Qn;cn<=Ge;cn++){var Wn=e.isInComment(Dn,cn);if(Wn){switch(Wn.kind){case 2:On.push.apply(On,Vr(rn,{end:Wn.end,pos:Wn.pos+1},!1));break;case 3:On.push.apply(On,fn(rn,{end:Wn.end,pos:Wn.pos+1},!1))}cn=Wn.end+1}}return On}function bn(rn){var Cn=rn.openingElement,Dn=rn.closingElement,On=rn.parent;return!e.tagNamesAreEquivalent(Cn.tagName,Dn.tagName)||e.isJsxElement(On)&&e.tagNamesAreEquivalent(Cn.tagName,On.openingElement.tagName)&&bn(On)}function Vn(rn){var Cn=rn.closingFragment,Dn=rn.parent;return!!(Cn.flags&131072)||e.isJsxFragment(Dn)&&Vn(Dn)}function yn(rn,Cn,Dn){var On=ge.getCurrentSourceFile(rn),Qn=e.formatting.getRangeOfEnclosingComment(On,Cn);return Qn&&(!Dn||Qn.kind===3)?e.createTextSpanFromRange(Qn):void 0}function Hn(rn,Cn){ee();var Dn=be(rn);Me.throwIfCancellationRequested();var On=Dn.text,Qn=[];if(Cn.length>0&&!Va(Dn.fileName))for(var Ge=Yi(),cn=void 0;cn=Ge.exec(On);){Me.throwIfCancellationRequested();var Wn=3;e.Debug.assert(cn.length===Cn.length+Wn);var Ki=cn[1],dt=cn.index+Ki.length;if(e.isInComment(Dn,dt)){for(var qi=void 0,Ci=0;Ci<Cn.length;Ci++)cn[Ci+Wn]&&(qi=Cn[Ci]);if(qi===void 0)return e.Debug.fail();if(!ni(On.charCodeAt(dt+qi.text.length))){var Tt=cn[2];Qn.push({descriptor:qi,message:Tt,position:dt})}}}return Qn;function ot(Ua){return Ua.replace(/[\-\[\]\/\{\}\(\)\*\+\?\.\\\^\$\|]/g,"\\$&")}function Yi(){var Ua=/(?:\/\/+\s*)/.source,za=/(?:\/\*+\s*)/.source,xo=/(?:^(?:\s|\*)*)/.source,Ea="("+xo+"|"+Ua+"|"+za+")",ho="(?:"+e.map(Cn,function(fo){return"("+ot(fo.text)+")"}).join("|")+")",Aa=/(?:$|\*\/)/.source,Vi=/(?:.*?)/.source,Xi="("+ho+Vi+")",ao=Ea+Xi+Aa;return new RegExp(ao,"gim")}function ni(Ua){return Ua>=97&&Ua<=122||Ua>=65&&Ua<=90||Ua>=48&&Ua<=57}function Va(Ua){return e.stringContains(Ua,"/node_modules/")}}function ki(rn,Cn,Dn){return ee(),e.Rename.getRenameInfo(pe,be(rn),Cn,Dn||{})}function ti(rn,Cn,Dn,On,Qn,Ge){var cn=typeof Cn=="number"?[Cn,void 0]:[Cn.pos,Cn.end],Wn=cn[0],Ki=cn[1];return{file:rn,startPosition:Wn,endPosition:Ki,program:p(),host:W,formatContext:e.formatting.getFormatContext(On,W),cancellationToken:Me,preferences:Dn,triggerReason:Qn,kind:Ge}}function Hi(rn,Cn,Dn){return{file:rn,program:p(),host:W,span:Cn,preferences:Dn,cancellationToken:Me}}function Ai(rn,Cn){return e.SmartSelectionRange.getSmartSelectionRange(Cn,ge.getCurrentSourceFile(rn))}function gi(rn,Cn,Dn,On,Qn){Dn===void 0&&(Dn=e.emptyOptions),ee();var Ge=be(rn);return e.refactor.getApplicableRefactors(ti(Ge,Cn,Dn,e.emptyOptions,On,Qn))}function Pn(rn,Cn,Dn,On,Qn,Ge){Ge===void 0&&(Ge=e.emptyOptions),ee();var cn=be(rn);return e.refactor.getEditsForRefactor(ti(cn,Dn,Ge,Cn),On,Qn)}function Pe(rn,Cn){return Cn===0?{line:0,character:0}:Oe.toLineColumnOffset(rn,Cn)}function Ir(rn,Cn){ee();var Dn=e.CallHierarchy.resolveCallHierarchyDeclaration(pe,e.getTouchingPropertyName(be(rn),Cn));return Dn&&e.mapOneOrMany(Dn,function(On){return e.CallHierarchy.createCallHierarchyItem(pe,On)})}function we(rn,Cn){ee();var Dn=be(rn),On=e.firstOrOnly(e.CallHierarchy.resolveCallHierarchyDeclaration(pe,Cn===0?Dn:e.getTouchingPropertyName(Dn,Cn)));return On?e.CallHierarchy.getIncomingCalls(pe,On,Me):[]}function hn(rn,Cn){ee();var Dn=be(rn),On=e.firstOrOnly(e.CallHierarchy.resolveCallHierarchyDeclaration(pe,Cn===0?Dn:e.getTouchingPropertyName(Dn,Cn)));return On?e.CallHierarchy.getOutgoingCalls(pe,On):[]}function jn(rn,Cn,Dn){Dn===void 0&&(Dn=e.emptyOptions),ee();var On=be(rn);return e.InlayHints.provideInlayHints(Hi(On,Cn,Dn))}var gn={dispose:Re,cleanupSemanticCache:Se,getSyntacticDiagnostics:er,getSemanticDiagnostics:wr,getSuggestionDiagnostics:mr,getCompilerOptionsDiagnostics:Ue,getSyntacticClassifications:Tn,getSemanticClassifications:Cr,getEncodedSyntacticClassifications:Nn,getEncodedSemanticClassifications:Ur,getCompletionsAtPosition:a,getCompletionEntryDetails:qr,getCompletionEntrySymbol:ln,getSignatureHelpItems:Rr,getQuickInfoAtPosition:dr,getDefinitionAtPosition:jr,getDefinitionAndBoundSpan:xr,getImplementationAtPosition:Lr,getTypeDefinitionAtPosition:en,getReferencesAtPosition:Ee,findReferences:Ar,getFileReferences:Ce,getOccurrencesAtPosition:pn,getDocumentHighlights:ye,getNameOrDottedNameSpan:nn,getBreakpointStatementAtPosition:vn,getNavigateToItems:cr,getRenameInfo:ki,getSmartSelectionRange:Ai,findRenameLocations:or,getNavigationBarItems:Ie,getNavigationTree:qe,getOutliningSpans:$n,getTodoComments:Hn,getBraceMatchingAtPosition:Dr,getIndentationAtPosition:Pr,getFormattingEditsForRange:Jr,getFormattingEditsForDocument:sn,getFormattingEditsAfterKeystroke:je,getDocCommentTemplateAtPosition:ar,isValidBraceCompletionAtPosition:Sr,getJsxClosingTagAtPosition:pr,getSpanOfEnclosingComment:yn,getCodeFixesAtPosition:br,getCombinedCodeFix:Te,applyCodeActionCommand:de,organizeImports:Ze,getEditsForFileRename:Xe,getEmitOutput:Mr,getNonBoundSourceFile:Qr,getProgram:p,getCurrentProgram:function(){return pe},getAutoImportProvider:V,updateIsDefinitionOfReferencedSymbols:xe,getApplicableRefactors:gi,getEditsForRefactor:Pn,toLineColumnOffset:Pe,getSourceMapper:function(){return Oe},clearSourceMapperCache:function(){return Oe.clearCache()},prepareCallHierarchy:Ir,provideCallHierarchyIncomingCalls:we,provideCallHierarchyOutgoingCalls:hn,toggleLineComment:Vr,toggleMultilineComment:fn,commentSelection:Wr,uncommentSelection:zn,provideInlayHints:jn};switch(G){case e.LanguageServiceMode.Semantic:break;case e.LanguageServiceMode.PartialSemantic:te.forEach(function(rn){return gn[rn]=function(){throw new Error("LanguageService Operation: ".concat(rn," not allowed in LanguageServiceMode.PartialSemantic"))}});break;case e.LanguageServiceMode.Syntactic:j.forEach(function(rn){return gn[rn]=function(){throw new Error("LanguageService Operation: ".concat(rn," not allowed in LanguageServiceMode.Syntactic"))}});break;default:e.Debug.assertNever(G)}return gn}e.createLanguageService=O;function I(W){return W.nameTable||q(W),W.nameTable}e.getNameTable=I;function q(W){var u=W.nameTable=new e.Map;W.forEachChild(function P(L){if(e.isIdentifier(L)&&!e.isTagName(L)&&L.escapedText||e.isStringOrNumericLiteralLike(L)&&Q(L)){var H=e.getEscapedTextOfIdentifierOrLiteral(L);u.set(H,u.get(H)===void 0?L.pos:-1)}else if(e.isPrivateIdentifier(L)){var H=L.escapedText;u.set(H,u.get(H)===void 0?L.pos:-1)}if(e.forEachChild(L,P),e.hasJSDocNodes(L))for(var G=0,ge=L.jsDoc;G<ge.length;G++){var pe=ge[G];e.forEachChild(pe,P)}})}function Q(W){return e.isDeclarationName(W)||W.parent.kind===280||A(W)||e.isLiteralComputedPropertyDeclarationName(W)}function Z(W){var u=he(W);return u&&(e.isObjectLiteralExpression(u.parent)||e.isJsxAttributes(u.parent))?u:void 0}e.getContainingObjectLiteralElement=Z;function he(W){switch(W.kind){case 10:case 14:case 8:if(W.parent.kind===164)return e.isObjectLiteralElement(W.parent.parent)?W.parent.parent:void 0;case 79:return e.isObjectLiteralElement(W.parent)&&(W.parent.parent.kind===207||W.parent.parent.kind===289)&&W.parent.name===W?W.parent:void 0}}function x(W,u){var P=Z(W);if(P){var L=u.getContextualType(P.parent),H=L&&E(P,u,L,!1);if(H&&H.length===1)return e.first(H)}return u.getSymbolAtLocation(W)}function E(W,u,P,L){var H=e.getNameFromPropertyName(W.name);if(!H)return e.emptyArray;if(!P.isUnion()){var G=P.getProperty(H);return G?[G]:e.emptyArray}var ge=e.mapDefined(P.types,function(pe){return(e.isObjectLiteralExpression(W.parent)||e.isJsxAttributes(W.parent))&&u.isTypeInvalidDueToUnionDiscriminant(pe,W.parent)?void 0:pe.getProperty(H)});if(L&&(ge.length===0||ge.length===P.types.length)){var G=P.getProperty(H);if(G)return[G]}return ge.length===0?e.mapDefined(P.types,function(pe){return pe.getProperty(H)}):ge}e.getPropertySymbolsFromContextualType=E;function A(W){return W&&W.parent&&W.parent.kind===209&&W.parent.argumentExpression===W}function ne(W){if(typeof __dirname<"u")return e.combinePaths(__dirname,e.getDefaultLibFileName(W));throw new Error("getDefaultLibFilePath is only supported when consumed as a node module. ")}e.getDefaultLibFilePath=ne,e.setObjectAllocator(D())})(fr||(fr={}));var fr;(function(e){var t;(function(v){function g(F,y){if(F.isDeclarationFile)return;var R=e.getTokenAtPosition(F,y),re=F.getLineAndCharacterOfPosition(y).line;if(F.getLineAndCharacterOfPosition(R.getStart(F)).line>re){var U=e.findPrecedingToken(R.pos,F);if(!U||F.getLineAndCharacterOfPosition(U.getEnd()).line!==re)return;R=U}if(R.flags&16777216)return;return ce(R);function d(w,M){var f=e.canHaveDecorators(w)?e.findLast(w.modifiers,e.isDecorator):void 0,D=f?e.skipTrivia(F.text,f.end):w.getStart(F);return e.createTextSpanFromBounds(D,(M||w).getEnd())}function m(w,M){return d(w,e.findNextToken(M,M.parent,F))}function le(w,M){return w&&re===F.getLineAndCharacterOfPosition(w.getStart(F)).line?ce(w):ce(M)}function ue(w,M,f){if(w){var D=w.indexOf(M);if(D>=0){for(var C=D,T=D+1;C>0&&f(w[C-1]);)C--;for(;T<w.length&&f(w[T]);)T++;return e.createTextSpanFromBounds(e.skipTrivia(F.text,w[C].pos),w[T-1].end)}}return d(M)}function oe(w){return ce(e.findPrecedingToken(w.pos,F))}function se(w){return ce(e.findNextToken(w,w.parent,F))}function ce(w){if(w){var M=w.parent;switch(w.kind){case 240:return De(w.declarationList.declarations[0]);case 257:case 169:case 168:return De(w);case 166:return B(w);case 259:case 171:case 170:case 174:case 175:case 173:case 215:case 216:return X(w);case 238:if(e.isFunctionBlock(w))return S(w);case 265:return J(w);case 295:return J(w.block);case 241:return d(w.expression);case 250:return d(w.getChildAt(0),w.expression);case 244:return m(w,w.expression);case 243:return ce(w.statement);case 256:return d(w.getChildAt(0));case 242:return m(w,w.expression);case 253:return ce(w.statement);case 249:case 248:return d(w.getChildAt(0),w.label);case 245:return j(w);case 246:return m(w,w.expression);case 247:return te(w);case 252:return m(w,w.expression);case 292:case 293:return ce(w.statements[0]);case 255:return J(w.tryBlock);case 254:return d(w,w.expression);case 274:return d(w,w.expression);case 268:return d(w,w.moduleReference);case 269:return d(w,w.moduleSpecifier);case 275:return d(w,w.moduleSpecifier);case 264:if(e.getModuleInstanceState(w)!==1)return;case 260:case 263:case 302:case 205:return d(w);case 251:return ce(w.statement);case 167:return ue(M.modifiers,w,e.isDecorator);case 203:case 204:return O(w);case 261:case 262:return;case 26:case 1:return le(e.findPrecedingToken(w.pos,F));case 27:return oe(w);case 18:return q(w);case 19:return Q(w);case 23:return Z(w);case 20:return he(w);case 21:return x(w);case 58:return E(w);case 31:case 29:return A(w);case 115:return ne(w);case 91:case 83:case 96:return se(w);case 162:return W(w);default:if(e.isArrayLiteralOrObjectLiteralDestructuringPattern(w))return I(w);if((w.kind===79||w.kind===227||w.kind===299||w.kind===300)&&e.isArrayLiteralOrObjectLiteralDestructuringPattern(M))return d(w);if(w.kind===223){var f=w,D=f.left,C=f.operatorToken;if(e.isArrayLiteralOrObjectLiteralDestructuringPattern(D))return I(D);if(C.kind===63&&e.isArrayLiteralOrObjectLiteralDestructuringPattern(w.parent))return d(w);if(C.kind===27)return ce(D)}if(e.isExpressionNode(w))switch(M.kind){case 243:return oe(w);case 167:return ce(w.parent);case 245:case 247:return d(w);case 223:if(w.parent.operatorToken.kind===27)return d(w);break;case 216:if(w.parent.body===w)return d(w);break}switch(w.parent.kind){case 299:if(w.parent.name===w&&!e.isArrayLiteralOrObjectLiteralDestructuringPattern(w.parent.parent))return ce(w.parent.initializer);break;case 213:if(w.parent.type===w)return se(w.parent.type);break;case 257:case 166:{var T=w.parent,N=T.initializer,k=T.type;if(N===w||k===w||e.isAssignmentOperator(w.kind))return oe(w);break}case 223:{var D=w.parent.left;if(e.isArrayLiteralOrObjectLiteralDestructuringPattern(D)&&w!==D)return oe(w);break}default:if(e.isFunctionLike(w.parent)&&w.parent.type===w)return oe(w)}return ce(w.parent)}}function me(u){return e.isVariableDeclarationList(u.parent)&&u.parent.declarations[0]===u?d(e.findPrecedingToken(u.pos,F,u.parent),u):d(u)}function De(u){if(u.parent.parent.kind===246)return ce(u.parent.parent);var P=u.parent;if(e.isBindingPattern(u.name))return O(u.name);if(e.hasOnlyExpressionInitializer(u)&&u.initializer||e.hasSyntacticModifier(u,1)||P.parent.kind===247)return me(u);if(e.isVariableDeclarationList(u.parent)&&u.parent.declarations[0]!==u)return ce(e.findPrecedingToken(u.pos,F,u.parent))}function $(u){return!!u.initializer||u.dotDotDotToken!==void 0||e.hasSyntacticModifier(u,12)}function B(u){if(e.isBindingPattern(u.name))return O(u.name);if($(u))return d(u);var P=u.parent,L=P.parameters.indexOf(u);return e.Debug.assert(L!==-1),L!==0?B(P.parameters[L-1]):ce(P.body)}function Y(u){return e.hasSyntacticModifier(u,1)||u.parent.kind===260&&u.kind!==173}function X(u){if(u.body)return Y(u)?d(u):ce(u.body)}function S(u){var P=u.statements.length?u.statements[0]:u.getLastToken();return Y(u.parent)?le(u.parent,P):ce(P)}function J(u){switch(u.parent.kind){case 264:if(e.getModuleInstanceState(u.parent)!==1)return;case 244:case 242:case 246:return le(u.parent,u.statements[0]);case 245:case 247:return le(e.findPrecedingToken(u.pos,F,u.parent),u.statements[0])}return ce(u.statements[0])}function te(u){if(u.initializer.kind===258){var P=u.initializer;if(P.declarations.length>0)return ce(P.declarations[0])}else return ce(u.initializer)}function j(u){if(u.initializer)return te(u);if(u.condition)return d(u.condition);if(u.incrementor)return d(u.incrementor)}function O(u){var P=e.forEach(u.elements,function(L){return L.kind!==229?L:void 0});return P?ce(P):u.parent.kind===205?d(u.parent):me(u.parent)}function I(u){e.Debug.assert(u.kind!==204&&u.kind!==203);var P=u.kind===206?u.elements:u.properties,L=e.forEach(P,function(H){return H.kind!==229?H:void 0});return L?ce(L):d(u.parent.kind===223?u.parent:u)}function q(u){switch(u.parent.kind){case 263:var P=u.parent;return le(e.findPrecedingToken(u.pos,F,u.parent),P.members.length?P.members[0]:P.getLastToken(F));case 260:var L=u.parent;return le(e.findPrecedingToken(u.pos,F,u.parent),L.members.length?L.members[0]:L.getLastToken(F));case 266:return le(u.parent.parent,u.parent.clauses[0])}return ce(u.parent)}function Q(u){switch(u.parent.kind){case 265:if(e.getModuleInstanceState(u.parent.parent)!==1)return;case 263:case 260:return d(u);case 238:if(e.isFunctionBlock(u.parent))return d(u);case 295:return ce(e.lastOrUndefined(u.parent.statements));case 266:var P=u.parent,L=e.lastOrUndefined(P.clauses);return L?ce(e.lastOrUndefined(L.statements)):void 0;case 203:var H=u.parent;return ce(e.lastOrUndefined(H.elements)||H);default:if(e.isArrayLiteralOrObjectLiteralDestructuringPattern(u.parent)){var G=u.parent;return d(e.lastOrUndefined(G.properties)||G)}return ce(u.parent)}}function Z(u){switch(u.parent.kind){case 204:var P=u.parent;return d(e.lastOrUndefined(P.elements)||P);default:if(e.isArrayLiteralOrObjectLiteralDestructuringPattern(u.parent)){var L=u.parent;return d(e.lastOrUndefined(L.elements)||L)}return ce(u.parent)}}function he(u){return u.parent.kind===243||u.parent.kind===210||u.parent.kind===211?oe(u):u.parent.kind===214?se(u):ce(u.parent)}function x(u){switch(u.parent.kind){case 215:case 259:case 216:case 171:case 170:case 174:case 175:case 173:case 244:case 243:case 245:case 247:case 210:case 211:case 214:return oe(u);default:return ce(u.parent)}}function E(u){return e.isFunctionLike(u.parent)||u.parent.kind===299||u.parent.kind===166?oe(u):ce(u.parent)}function A(u){return u.parent.kind===213?se(u):ce(u.parent)}function ne(u){return u.parent.kind===243?m(u,u.parent.expression):ce(u.parent)}function W(u){return u.parent.kind===247?se(u):ce(u.parent)}}}v.spanInSourceFileAtLocation=g})(t=e.BreakpointResolver||(e.BreakpointResolver={}))})(fr||(fr={}));var fr;(function(e){function t(v,g,F){var y=[];F=e.fixupCompilerOptions(F,y);var R=e.isArray(v)?v:[v],re=e.transformNodes(void 0,void 0,e.factory,F,R,g,!0);return re.diagnostics=e.concatenate(re.diagnostics,y),re}e.transform=t})(fr||(fr={}));var JS=function(){return this}(),fr;(function(e){function t(w,M){w&&w.log("*INTERNAL ERROR* - Exception in typescript services: "+M.message)}var v=function(){function w(M){this.scriptSnapshotShim=M}return w.prototype.getText=function(M,f){return this.scriptSnapshotShim.getText(M,f)},w.prototype.getLength=function(){return this.scriptSnapshotShim.getLength()},w.prototype.getChangeRange=function(M){var f=M,D=this.scriptSnapshotShim.getChangeRange(f.scriptSnapshotShim);if(D===null)return null;var C=JSON.parse(D);return e.createTextChangeRange(e.createTextSpan(C.span.start,C.span.length),C.newLength)},w.prototype.dispose=function(){"dispose"in this.scriptSnapshotShim&&this.scriptSnapshotShim.dispose()},w}(),g=function(){function w(M){var f=this;this.shimHost=M,this.loggingEnabled=!1,this.tracingEnabled=!1,"getModuleResolutionsForFile"in this.shimHost&&(this.resolveModuleNames=function(D,C){var T=JSON.parse(f.shimHost.getModuleResolutionsForFile(C));return e.map(D,function(N){var k=e.getProperty(T,N);return k?{resolvedFileName:k,extension:e.extensionFromPath(k),isExternalLibraryImport:!1}:void 0})}),"directoryExists"in this.shimHost&&(this.directoryExists=function(D){return f.shimHost.directoryExists(D)}),"getTypeReferenceDirectiveResolutionsForFile"in this.shimHost&&(this.resolveTypeReferenceDirectives=function(D,C){var T=JSON.parse(f.shimHost.getTypeReferenceDirectiveResolutionsForFile(C));return e.map(D,function(N){return e.getProperty(T,e.isString(N)?N:N.fileName.toLowerCase())})})}return w.prototype.log=function(M){this.loggingEnabled&&this.shimHost.log(M)},w.prototype.trace=function(M){this.tracingEnabled&&this.shimHost.trace(M)},w.prototype.error=function(M){this.shimHost.error(M)},w.prototype.getProjectVersion=function(){if(this.shimHost.getProjectVersion)return this.shimHost.getProjectVersion()},w.prototype.getTypeRootsVersion=function(){return this.shimHost.getTypeRootsVersion?this.shimHost.getTypeRootsVersion():0},w.prototype.useCaseSensitiveFileNames=function(){return this.shimHost.useCaseSensitiveFileNames?this.shimHost.useCaseSensitiveFileNames():!1},w.prototype.getCompilationSettings=function(){var M=this.shimHost.getCompilationSettings();if(M===null||M==="")throw Error("LanguageServiceShimHostAdapter.getCompilationSettings: empty compilationSettings");var f=JSON.parse(M);return f.allowNonTsExtensions=!0,f},w.prototype.getScriptFileNames=function(){var M=this.shimHost.getScriptFileNames();return JSON.parse(M)},w.prototype.getScriptSnapshot=function(M){var f=this.shimHost.getScriptSnapshot(M);return f&&new v(f)},w.prototype.getScriptKind=function(M){return"getScriptKind"in this.shimHost?this.shimHost.getScriptKind(M):0},w.prototype.getScriptVersion=function(M){return this.shimHost.getScriptVersion(M)},w.prototype.getLocalizedDiagnosticMessages=function(){var M=this.shimHost.getLocalizedDiagnosticMessages();if(M===null||M==="")return null;try{return JSON.parse(M)}catch(f){return this.log(f.description||"diagnosticMessages.generated.json has invalid JSON format"),null}},w.prototype.getCancellationToken=function(){var M=this.shimHost.getCancellationToken();return new e.ThrottledCancellationToken(M)},w.prototype.getCurrentDirectory=function(){return this.shimHost.getCurrentDirectory()},w.prototype.getDirectories=function(M){return JSON.parse(this.shimHost.getDirectories(M))},w.prototype.getDefaultLibFileName=function(M){return this.shimHost.getDefaultLibFileName(JSON.stringify(M))},w.prototype.readDirectory=function(M,f,D,C,T){var N=e.getFileMatcherPatterns(M,D,C,this.shimHost.useCaseSensitiveFileNames(),this.shimHost.getCurrentDirectory());return JSON.parse(this.shimHost.readDirectory(M,JSON.stringify(f),JSON.stringify(N.basePaths),N.excludePattern,N.includeFilePattern,N.includeDirectoryPattern,T))},w.prototype.readFile=function(M,f){return this.shimHost.readFile(M,f)},w.prototype.fileExists=function(M){return this.shimHost.fileExists(M)},w}();e.LanguageServiceShimHostAdapter=g;var F=function(){function w(M){var f=this;this.shimHost=M,this.useCaseSensitiveFileNames=this.shimHost.useCaseSensitiveFileNames?this.shimHost.useCaseSensitiveFileNames():!1,"directoryExists"in this.shimHost?this.directoryExists=function(D){return f.shimHost.directoryExists(D)}:this.directoryExists=void 0,"realpath"in this.shimHost?this.realpath=function(D){return f.shimHost.realpath(D)}:this.realpath=void 0}return w.prototype.readDirectory=function(M,f,D,C,T){var N=e.getFileMatcherPatterns(M,D,C,this.shimHost.useCaseSensitiveFileNames(),this.shimHost.getCurrentDirectory());return JSON.parse(this.shimHost.readDirectory(M,JSON.stringify(f),JSON.stringify(N.basePaths),N.excludePattern,N.includeFilePattern,N.includeDirectoryPattern,T))},w.prototype.fileExists=function(M){return this.shimHost.fileExists(M)},w.prototype.readFile=function(M){return this.shimHost.readFile(M)},w.prototype.getDirectories=function(M){return JSON.parse(this.shimHost.getDirectories(M))},w}();e.CoreServicesShimHostAdapter=F;function y(w,M,f,D){var C;D&&(w.log(M),C=e.timestamp());var T=f();if(D){var N=e.timestamp();if(w.log("".concat(M," completed in ").concat(N-C," msec")),e.isString(T)){var k=T;k.length>128&&(k=k.substring(0,128)+"..."),w.log(" result.length=".concat(k.length,", result='").concat(JSON.stringify(k),"'"))}}return T}function R(w,M,f,D){return re(w,M,!0,f,D)}function re(w,M,f,D,C){try{var T=y(w,M,D,C);return f?JSON.stringify({result:T}):T}catch(N){return N instanceof e.OperationCanceledException?JSON.stringify({canceled:!0}):(t(w,N),N.description=M,JSON.stringify({error:N}))}}var U=function(){function w(M){this.factory=M,M.registerShim(this)}return w.prototype.dispose=function(M){this.factory.unregisterShim(this)},w}();function d(w,M){return w.map(function(f){return m(f,M)})}e.realizeDiagnostics=d;function m(w,M){return{message:e.flattenDiagnosticMessageText(w.messageText,M),start:w.start,length:w.length,category:e.diagnosticCategoryName(w),code:w.code,reportsUnnecessary:w.reportsUnnecessary,reportsDeprecated:w.reportsDeprecated}}var le=function(w){ev(M,w);function M(f,D,C){var T=w.call(this,f)||this;return T.host=D,T.languageService=C,T.logPerformance=!1,T.logger=T.host,T}return M.prototype.forwardJSONCall=function(f,D){return R(this.logger,f,D,this.logPerformance)},M.prototype.dispose=function(f){this.logger.log("dispose()"),this.languageService.dispose(),this.languageService=null,JS&&JS.CollectGarbage&&(JS.CollectGarbage(),this.logger.log("CollectGarbage()")),this.logger=null,w.prototype.dispose.call(this,f)},M.prototype.refresh=function(f){this.forwardJSONCall("refresh(".concat(f,")"),function(){return null})},M.prototype.cleanupSemanticCache=function(){var f=this;this.forwardJSONCall("cleanupSemanticCache()",function(){return f.languageService.cleanupSemanticCache(),null})},M.prototype.realizeDiagnostics=function(f){var D=e.getNewLineOrDefaultFromHost(this.host);return d(f,D)},M.prototype.getSyntacticClassifications=function(f,D,C){var T=this;return this.forwardJSONCall("getSyntacticClassifications('".concat(f,"', ").concat(D,", ").concat(C,")"),function(){return T.languageService.getSyntacticClassifications(f,e.createTextSpan(D,C))})},M.prototype.getSemanticClassifications=function(f,D,C){var T=this;return this.forwardJSONCall("getSemanticClassifications('".concat(f,"', ").concat(D,", ").concat(C,")"),function(){return T.languageService.getSemanticClassifications(f,e.createTextSpan(D,C))})},M.prototype.getEncodedSyntacticClassifications=function(f,D,C){var T=this;return this.forwardJSONCall("getEncodedSyntacticClassifications('".concat(f,"', ").concat(D,", ").concat(C,")"),function(){return ue(T.languageService.getEncodedSyntacticClassifications(f,e.createTextSpan(D,C)))})},M.prototype.getEncodedSemanticClassifications=function(f,D,C){var T=this;return this.forwardJSONCall("getEncodedSemanticClassifications('".concat(f,"', ").concat(D,", ").concat(C,")"),function(){return ue(T.languageService.getEncodedSemanticClassifications(f,e.createTextSpan(D,C)))})},M.prototype.getSyntacticDiagnostics=function(f){var D=this;return this.forwardJSONCall("getSyntacticDiagnostics('".concat(f,"')"),function(){var C=D.languageService.getSyntacticDiagnostics(f);return D.realizeDiagnostics(C)})},M.prototype.getSemanticDiagnostics=function(f){var D=this;return this.forwardJSONCall("getSemanticDiagnostics('".concat(f,"')"),function(){var C=D.languageService.getSemanticDiagnostics(f);return D.realizeDiagnostics(C)})},M.prototype.getSuggestionDiagnostics=function(f){var D=this;return this.forwardJSONCall("getSuggestionDiagnostics('".concat(f,"')"),function(){return D.realizeDiagnostics(D.languageService.getSuggestionDiagnostics(f))})},M.prototype.getCompilerOptionsDiagnostics=function(){var f=this;return this.forwardJSONCall("getCompilerOptionsDiagnostics()",function(){var D=f.languageService.getCompilerOptionsDiagnostics();return f.realizeDiagnostics(D)})},M.prototype.getQuickInfoAtPosition=function(f,D){var C=this;return this.forwardJSONCall("getQuickInfoAtPosition('".concat(f,"', ").concat(D,")"),function(){return C.languageService.getQuickInfoAtPosition(f,D)})},M.prototype.getNameOrDottedNameSpan=function(f,D,C){var T=this;return this.forwardJSONCall("getNameOrDottedNameSpan('".concat(f,"', ").concat(D,", ").concat(C,")"),function(){return T.languageService.getNameOrDottedNameSpan(f,D,C)})},M.prototype.getBreakpointStatementAtPosition=function(f,D){var C=this;return this.forwardJSONCall("getBreakpointStatementAtPosition('".concat(f,"', ").concat(D,")"),function(){return C.languageService.getBreakpointStatementAtPosition(f,D)})},M.prototype.getSignatureHelpItems=function(f,D,C){var T=this;return this.forwardJSONCall("getSignatureHelpItems('".concat(f,"', ").concat(D,")"),function(){return T.languageService.getSignatureHelpItems(f,D,C)})},M.prototype.getDefinitionAtPosition=function(f,D){var C=this;return this.forwardJSONCall("getDefinitionAtPosition('".concat(f,"', ").concat(D,")"),function(){return C.languageService.getDefinitionAtPosition(f,D)})},M.prototype.getDefinitionAndBoundSpan=function(f,D){var C=this;return this.forwardJSONCall("getDefinitionAndBoundSpan('".concat(f,"', ").concat(D,")"),function(){return C.languageService.getDefinitionAndBoundSpan(f,D)})},M.prototype.getTypeDefinitionAtPosition=function(f,D){var C=this;return this.forwardJSONCall("getTypeDefinitionAtPosition('".concat(f,"', ").concat(D,")"),function(){return C.languageService.getTypeDefinitionAtPosition(f,D)})},M.prototype.getImplementationAtPosition=function(f,D){var C=this;return this.forwardJSONCall("getImplementationAtPosition('".concat(f,"', ").concat(D,")"),function(){return C.languageService.getImplementationAtPosition(f,D)})},M.prototype.getRenameInfo=function(f,D,C){var T=this;return this.forwardJSONCall("getRenameInfo('".concat(f,"', ").concat(D,")"),function(){return T.languageService.getRenameInfo(f,D,C)})},M.prototype.getSmartSelectionRange=function(f,D){var C=this;return this.forwardJSONCall("getSmartSelectionRange('".concat(f,"', ").concat(D,")"),function(){return C.languageService.getSmartSelectionRange(f,D)})},M.prototype.findRenameLocations=function(f,D,C,T,N){var k=this;return this.forwardJSONCall("findRenameLocations('".concat(f,"', ").concat(D,", ").concat(C,", ").concat(T,", ").concat(N,")"),function(){return k.languageService.findRenameLocations(f,D,C,T,N)})},M.prototype.getBraceMatchingAtPosition=function(f,D){var C=this;return this.forwardJSONCall("getBraceMatchingAtPosition('".concat(f,"', ").concat(D,")"),function(){return C.languageService.getBraceMatchingAtPosition(f,D)})},M.prototype.isValidBraceCompletionAtPosition=function(f,D,C){var T=this;return this.forwardJSONCall("isValidBraceCompletionAtPosition('".concat(f,"', ").concat(D,", ").concat(C,")"),function(){return T.languageService.isValidBraceCompletionAtPosition(f,D,C)})},M.prototype.getSpanOfEnclosingComment=function(f,D,C){var T=this;return this.forwardJSONCall("getSpanOfEnclosingComment('".concat(f,"', ").concat(D,")"),function(){return T.languageService.getSpanOfEnclosingComment(f,D,C)})},M.prototype.getIndentationAtPosition=function(f,D,C){var T=this;return this.forwardJSONCall("getIndentationAtPosition('".concat(f,"', ").concat(D,")"),function(){var N=JSON.parse(C);return T.languageService.getIndentationAtPosition(f,D,N)})},M.prototype.getReferencesAtPosition=function(f,D){var C=this;return this.forwardJSONCall("getReferencesAtPosition('".concat(f,"', ").concat(D,")"),function(){return C.languageService.getReferencesAtPosition(f,D)})},M.prototype.findReferences=function(f,D){var C=this;return this.forwardJSONCall("findReferences('".concat(f,"', ").concat(D,")"),function(){return C.languageService.findReferences(f,D)})},M.prototype.getFileReferences=function(f){var D=this;return this.forwardJSONCall("getFileReferences('".concat(f,")"),function(){return D.languageService.getFileReferences(f)})},M.prototype.getOccurrencesAtPosition=function(f,D){var C=this;return this.forwardJSONCall("getOccurrencesAtPosition('".concat(f,"', ").concat(D,")"),function(){return C.languageService.getOccurrencesAtPosition(f,D)})},M.prototype.getDocumentHighlights=function(f,D,C){var T=this;return this.forwardJSONCall("getDocumentHighlights('".concat(f,"', ").concat(D,")"),function(){var N=T.languageService.getDocumentHighlights(f,D,JSON.parse(C)),k=e.toFileNameLowerCase(e.normalizeSlashes(f));return e.filter(N,function(me){return e.toFileNameLowerCase(e.normalizeSlashes(me.fileName))===k})})},M.prototype.getCompletionsAtPosition=function(f,D,C,T){var N=this;return this.forwardJSONCall("getCompletionsAtPosition('".concat(f,"', ").concat(D,", ").concat(C,", ").concat(T,")"),function(){return N.languageService.getCompletionsAtPosition(f,D,C,T)})},M.prototype.getCompletionEntryDetails=function(f,D,C,T,N,k,me){var De=this;return this.forwardJSONCall("getCompletionEntryDetails('".concat(f,"', ").concat(D,", '").concat(C,"')"),function(){var $=T===void 0?void 0:JSON.parse(T);return De.languageService.getCompletionEntryDetails(f,D,C,$,N,k,me)})},M.prototype.getFormattingEditsForRange=function(f,D,C,T){var N=this;return this.forwardJSONCall("getFormattingEditsForRange('".concat(f,"', ").concat(D,", ").concat(C,")"),function(){var k=JSON.parse(T);return N.languageService.getFormattingEditsForRange(f,D,C,k)})},M.prototype.getFormattingEditsForDocument=function(f,D){var C=this;return this.forwardJSONCall("getFormattingEditsForDocument('".concat(f,"')"),function(){var T=JSON.parse(D);return C.languageService.getFormattingEditsForDocument(f,T)})},M.prototype.getFormattingEditsAfterKeystroke=function(f,D,C,T){var N=this;return this.forwardJSONCall("getFormattingEditsAfterKeystroke('".concat(f,"', ").concat(D,", '").concat(C,"')"),function(){var k=JSON.parse(T);return N.languageService.getFormattingEditsAfterKeystroke(f,D,C,k)})},M.prototype.getDocCommentTemplateAtPosition=function(f,D,C){var T=this;return this.forwardJSONCall("getDocCommentTemplateAtPosition('".concat(f,"', ").concat(D,")"),function(){return T.languageService.getDocCommentTemplateAtPosition(f,D,C)})},M.prototype.getNavigateToItems=function(f,D,C){var T=this;return this.forwardJSONCall("getNavigateToItems('".concat(f,"', ").concat(D,", ").concat(C,")"),function(){return T.languageService.getNavigateToItems(f,D,C)})},M.prototype.getNavigationBarItems=function(f){var D=this;return this.forwardJSONCall("getNavigationBarItems('".concat(f,"')"),function(){return D.languageService.getNavigationBarItems(f)})},M.prototype.getNavigationTree=function(f){var D=this;return this.forwardJSONCall("getNavigationTree('".concat(f,"')"),function(){return D.languageService.getNavigationTree(f)})},M.prototype.getOutliningSpans=function(f){var D=this;return this.forwardJSONCall("getOutliningSpans('".concat(f,"')"),function(){return D.languageService.getOutliningSpans(f)})},M.prototype.getTodoComments=function(f,D){var C=this;return this.forwardJSONCall("getTodoComments('".concat(f,"')"),function(){return C.languageService.getTodoComments(f,JSON.parse(D))})},M.prototype.prepareCallHierarchy=function(f,D){var C=this;return this.forwardJSONCall("prepareCallHierarchy('".concat(f,"', ").concat(D,")"),function(){return C.languageService.prepareCallHierarchy(f,D)})},M.prototype.provideCallHierarchyIncomingCalls=function(f,D){var C=this;return this.forwardJSONCall("provideCallHierarchyIncomingCalls('".concat(f,"', ").concat(D,")"),function(){return C.languageService.provideCallHierarchyIncomingCalls(f,D)})},M.prototype.provideCallHierarchyOutgoingCalls=function(f,D){var C=this;return this.forwardJSONCall("provideCallHierarchyOutgoingCalls('".concat(f,"', ").concat(D,")"),function(){return C.languageService.provideCallHierarchyOutgoingCalls(f,D)})},M.prototype.provideInlayHints=function(f,D,C){var T=this;return this.forwardJSONCall("provideInlayHints('".concat(f,"', '").concat(JSON.stringify(D),"', ").concat(JSON.stringify(C),")"),function(){return T.languageService.provideInlayHints(f,D,C)})},M.prototype.getEmitOutput=function(f){var D=this;return this.forwardJSONCall("getEmitOutput('".concat(f,"')"),function(){var C=D.languageService.getEmitOutput(f),T=C.diagnostics,N=jS(C,["diagnostics"]);return Li(Li({},N),{diagnostics:D.realizeDiagnostics(T)})})},M.prototype.getEmitOutputObject=function(f){var D=this;return re(this.logger,"getEmitOutput('".concat(f,"')"),!1,function(){return D.languageService.getEmitOutput(f)},this.logPerformance)},M.prototype.toggleLineComment=function(f,D){var C=this;return this.forwardJSONCall("toggleLineComment('".concat(f,"', '").concat(JSON.stringify(D),"')"),function(){return C.languageService.toggleLineComment(f,D)})},M.prototype.toggleMultilineComment=function(f,D){var C=this;return this.forwardJSONCall("toggleMultilineComment('".concat(f,"', '").concat(JSON.stringify(D),"')"),function(){return C.languageService.toggleMultilineComment(f,D)})},M.prototype.commentSelection=function(f,D){var C=this;return this.forwardJSONCall("commentSelection('".concat(f,"', '").concat(JSON.stringify(D),"')"),function(){return C.languageService.commentSelection(f,D)})},M.prototype.uncommentSelection=function(f,D){var C=this;return this.forwardJSONCall("uncommentSelection('".concat(f,"', '").concat(JSON.stringify(D),"')"),function(){return C.languageService.uncommentSelection(f,D)})},M}(U);function ue(w){return{spans:w.spans.join(","),endOfLineState:w.endOfLineState}}var oe=function(w){ev(M,w);function M(f,D){var C=w.call(this,f)||this;return C.logger=D,C.logPerformance=!1,C.classifier=e.createClassifier(),C}return M.prototype.getEncodedLexicalClassifications=function(f,D,C){var T=this;return C===void 0&&(C=!1),R(this.logger,"getEncodedLexicalClassifications",function(){return ue(T.classifier.getEncodedLexicalClassifications(f,D,C))},this.logPerformance)},M.prototype.getClassificationsForLine=function(f,D,C){C===void 0&&(C=!1);for(var T=this.classifier.getClassificationsForLine(f,D,C),N="",k=0,me=T.entries;k<me.length;k++){var De=me[k];N+=De.length+`
|
|
267
267
|
`,N+=De.classification+`
|
|
268
268
|
`}return N+=T.finalLexState,N},M}(U),se=function(w){ev(M,w);function M(f,D,C){var T=w.call(this,f)||this;return T.logger=D,T.host=C,T.logPerformance=!1,T}return M.prototype.forwardJSONCall=function(f,D){return R(this.logger,f,D,this.logPerformance)},M.prototype.resolveModuleName=function(f,D,C){var T=this;return this.forwardJSONCall("resolveModuleName('".concat(f,"')"),function(){var N=JSON.parse(C),k=e.resolveModuleName(D,e.normalizeSlashes(f),N,T.host),me=k.resolvedModule?k.resolvedModule.resolvedFileName:void 0;return k.resolvedModule&&k.resolvedModule.extension!==".ts"&&k.resolvedModule.extension!==".tsx"&&k.resolvedModule.extension!==".d.ts"&&(me=void 0),{resolvedFileName:me,failedLookupLocations:k.failedLookupLocations,affectingLocations:k.affectingLocations}})},M.prototype.resolveTypeReferenceDirective=function(f,D,C){var T=this;return this.forwardJSONCall("resolveTypeReferenceDirective(".concat(f,")"),function(){var N=JSON.parse(C),k=e.resolveTypeReferenceDirective(D,e.normalizeSlashes(f),N,T.host);return{resolvedFileName:k.resolvedTypeReferenceDirective?k.resolvedTypeReferenceDirective.resolvedFileName:void 0,primary:k.resolvedTypeReferenceDirective?k.resolvedTypeReferenceDirective.primary:!0,failedLookupLocations:k.failedLookupLocations}})},M.prototype.getPreProcessedFileInfo=function(f,D){var C=this;return this.forwardJSONCall("getPreProcessedFileInfo('".concat(f,"')"),function(){var T=e.preProcessFile(e.getSnapshotText(D),!0,!0);return{referencedFiles:C.convertFileReferences(T.referencedFiles),importedFiles:C.convertFileReferences(T.importedFiles),ambientExternalModules:T.ambientExternalModules,isLibFile:T.isLibFile,typeReferenceDirectives:C.convertFileReferences(T.typeReferenceDirectives),libReferenceDirectives:C.convertFileReferences(T.libReferenceDirectives)}})},M.prototype.getAutomaticTypeDirectiveNames=function(f){var D=this;return this.forwardJSONCall("getAutomaticTypeDirectiveNames('".concat(f,"')"),function(){var C=JSON.parse(f);return e.getAutomaticTypeDirectiveNames(C,D.host)})},M.prototype.convertFileReferences=function(f){if(f){for(var D=[],C=0,T=f;C<T.length;C++){var N=T[C];D.push({path:e.normalizeSlashes(N.fileName),position:N.pos,length:N.end-N.pos})}return D}},M.prototype.getTSConfigFileInfo=function(f,D){var C=this;return this.forwardJSONCall("getTSConfigFileInfo('".concat(f,"')"),function(){var T=e.parseJsonText(f,e.getSnapshotText(D)),N=e.normalizeSlashes(f),k=e.parseJsonSourceFileConfigFileContent(T,C.host,e.getDirectoryPath(N),{},N);return{options:k.options,typeAcquisition:k.typeAcquisition,files:k.fileNames,raw:k.raw,errors:d(qn(qn([],T.parseDiagnostics,!0),k.errors,!0),`\r
|
|
269
|
-
`)}})},M.prototype.getDefaultCompilationSettings=function(){return this.forwardJSONCall("getDefaultCompilationSettings()",function(){return e.getDefaultCompilerOptions()})},M.prototype.discoverTypings=function(f){var D=this,C=e.createGetCanonicalFileName(!1);return this.forwardJSONCall("discoverTypings()",function(){var T=JSON.parse(f);return D.safeList===void 0&&(D.safeList=e.JsTyping.loadSafeList(D.host,e.toPath(T.safeListPath,T.safeListPath,C))),e.JsTyping.discoverTypings(D.host,function(N){return D.logger.log(N)},T.fileNames,e.toPath(T.projectRootPath,T.projectRootPath,C),D.safeList,T.packageNameToTypingLocation,T.typeAcquisition,T.unresolvedImports,T.typesRegistry,e.emptyOptions)})},M}(U),ce=function(){function w(){this._shims=[]}return w.prototype.getServicesVersion=function(){return e.servicesVersion},w.prototype.createLanguageServiceShim=function(M){try{this.documentRegistry===void 0&&(this.documentRegistry=e.createDocumentRegistry(M.useCaseSensitiveFileNames&&M.useCaseSensitiveFileNames(),M.getCurrentDirectory()));var f=new g(M),D=e.createLanguageService(f,this.documentRegistry,!1);return new le(this,M,D)}catch(C){throw t(M,C),C}},w.prototype.createClassifierShim=function(M){try{return new oe(this,M)}catch(f){throw t(M,f),f}},w.prototype.createCoreServicesShim=function(M){try{var f=new F(M);return new se(this,M,f)}catch(D){throw t(M,D),D}},w.prototype.close=function(){e.clear(this._shims),this.documentRegistry=void 0},w.prototype.registerShim=function(M){this._shims.push(M)},w.prototype.unregisterShim=function(M){for(var f=0;f<this._shims.length;f++)if(this._shims[f]===M){delete this._shims[f];return}throw new Error("Invalid operation")},w}();e.TypeScriptServicesFactory=ce})(fr||(fr={}));(function(){if(typeof globalThis!="object")try{Object.defineProperty(Object.prototype,"__magic__",{get:function(){return this},configurable:!0}),__magic__.globalThis=__magic__,typeof globalThis>"u"&&(window.globalThis=window),delete Object.prototype.__magic__}catch{window.globalThis=window}})();(typeof process>"u"||process.browser)&&(globalThis.TypeScript=globalThis.TypeScript||{},globalThis.TypeScript.Services=globalThis.TypeScript.Services||{},globalThis.TypeScript.Services.TypeScriptServicesFactory=fr.TypeScriptServicesFactory,globalThis.toolsVersion=fr.versionMajorMinor);typeof Eh<"u"&&Eh.exports&&(Eh.exports=fr);var fr;(function(e){function t(F,y,R,re){if(Object.defineProperty(oe,"name",Li(Li({},Object.getOwnPropertyDescriptor(oe,"name")),{value:F})),re)for(var U=0,d=Object.keys(re);U<d.length;U++){var m=d[U],le=+m;!isNaN(le)&&e.hasProperty(y,"".concat(le))&&(y[le]=e.Debug.deprecate(y[le],Li(Li({},re[le]),{name:F})))}var ue=v(y,R);return oe;function oe(){for(var se=[],ce=0;ce<arguments.length;ce++)se[ce]=arguments[ce];var w=ue(se),M=w!==void 0?y[w]:void 0;if(typeof M=="function")return M.apply(void 0,se);throw new TypeError("Invalid arguments")}}e.createOverload=t;function v(F,y){return function(R){for(var re=0;e.hasProperty(F,"".concat(re))&&e.hasProperty(y,"".concat(re));re++){var U=y[re];if(U(R))return re}}}function g(F){return{overload:function(y){return{bind:function(R){return{finish:function(){return t(F,y,R)},deprecate:function(re){return{finish:function(){return t(F,y,R,re)}}}}}}}}}e.buildOverload=g})(fr||(fr={}));var fr;(function(e){var t={since:"4.0",warnAfter:"4.1",message:"Use the appropriate method on 'ts.factory' or the 'factory' supplied by your transformation context instead."};e.createNodeArray=e.Debug.deprecate(e.factory.createNodeArray,t),e.createNumericLiteral=e.Debug.deprecate(e.factory.createNumericLiteral,t),e.createBigIntLiteral=e.Debug.deprecate(e.factory.createBigIntLiteral,t),e.createStringLiteral=e.Debug.deprecate(e.factory.createStringLiteral,t),e.createStringLiteralFromNode=e.Debug.deprecate(e.factory.createStringLiteralFromNode,t),e.createRegularExpressionLiteral=e.Debug.deprecate(e.factory.createRegularExpressionLiteral,t),e.createLoopVariable=e.Debug.deprecate(e.factory.createLoopVariable,t),e.createUniqueName=e.Debug.deprecate(e.factory.createUniqueName,t),e.createPrivateIdentifier=e.Debug.deprecate(e.factory.createPrivateIdentifier,t),e.createSuper=e.Debug.deprecate(e.factory.createSuper,t),e.createThis=e.Debug.deprecate(e.factory.createThis,t),e.createNull=e.Debug.deprecate(e.factory.createNull,t),e.createTrue=e.Debug.deprecate(e.factory.createTrue,t),e.createFalse=e.Debug.deprecate(e.factory.createFalse,t),e.createModifier=e.Debug.deprecate(e.factory.createModifier,t),e.createModifiersFromModifierFlags=e.Debug.deprecate(e.factory.createModifiersFromModifierFlags,t),e.createQualifiedName=e.Debug.deprecate(e.factory.createQualifiedName,t),e.updateQualifiedName=e.Debug.deprecate(e.factory.updateQualifiedName,t),e.createComputedPropertyName=e.Debug.deprecate(e.factory.createComputedPropertyName,t),e.updateComputedPropertyName=e.Debug.deprecate(e.factory.updateComputedPropertyName,t),e.createTypeParameterDeclaration=e.Debug.deprecate(e.factory.createTypeParameterDeclaration,t),e.updateTypeParameterDeclaration=e.Debug.deprecate(e.factory.updateTypeParameterDeclaration,t),e.createParameter=e.Debug.deprecate(e.factory.createParameterDeclaration,t),e.updateParameter=e.Debug.deprecate(e.factory.updateParameterDeclaration,t),e.createDecorator=e.Debug.deprecate(e.factory.createDecorator,t),e.updateDecorator=e.Debug.deprecate(e.factory.updateDecorator,t),e.createProperty=e.Debug.deprecate(e.factory.createPropertyDeclaration,t),e.updateProperty=e.Debug.deprecate(e.factory.updatePropertyDeclaration,t),e.createMethod=e.Debug.deprecate(e.factory.createMethodDeclaration,t),e.updateMethod=e.Debug.deprecate(e.factory.updateMethodDeclaration,t),e.createConstructor=e.Debug.deprecate(e.factory.createConstructorDeclaration,t),e.updateConstructor=e.Debug.deprecate(e.factory.updateConstructorDeclaration,t),e.createGetAccessor=e.Debug.deprecate(e.factory.createGetAccessorDeclaration,t),e.updateGetAccessor=e.Debug.deprecate(e.factory.updateGetAccessorDeclaration,t),e.createSetAccessor=e.Debug.deprecate(e.factory.createSetAccessorDeclaration,t),e.updateSetAccessor=e.Debug.deprecate(e.factory.updateSetAccessorDeclaration,t),e.createCallSignature=e.Debug.deprecate(e.factory.createCallSignature,t),e.updateCallSignature=e.Debug.deprecate(e.factory.updateCallSignature,t),e.createConstructSignature=e.Debug.deprecate(e.factory.createConstructSignature,t),e.updateConstructSignature=e.Debug.deprecate(e.factory.updateConstructSignature,t),e.updateIndexSignature=e.Debug.deprecate(e.factory.updateIndexSignature,t),e.createKeywordTypeNode=e.Debug.deprecate(e.factory.createKeywordTypeNode,t),e.createTypePredicateNodeWithModifier=e.Debug.deprecate(e.factory.createTypePredicateNode,t),e.updateTypePredicateNodeWithModifier=e.Debug.deprecate(e.factory.updateTypePredicateNode,t),e.createTypeReferenceNode=e.Debug.deprecate(e.factory.createTypeReferenceNode,t),e.updateTypeReferenceNode=e.Debug.deprecate(e.factory.updateTypeReferenceNode,t),e.createFunctionTypeNode=e.Debug.deprecate(e.factory.createFunctionTypeNode,t),e.updateFunctionTypeNode=e.Debug.deprecate(e.factory.updateFunctionTypeNode,t),e.createConstructorTypeNode=e.Debug.deprecate(function(v,g,F){return e.factory.createConstructorTypeNode(void 0,v,g,F)},t),e.updateConstructorTypeNode=e.Debug.deprecate(function(v,g,F,y){return e.factory.updateConstructorTypeNode(v,v.modifiers,g,F,y)},t),e.createTypeQueryNode=e.Debug.deprecate(e.factory.createTypeQueryNode,t),e.updateTypeQueryNode=e.Debug.deprecate(e.factory.updateTypeQueryNode,t),e.createTypeLiteralNode=e.Debug.deprecate(e.factory.createTypeLiteralNode,t),e.updateTypeLiteralNode=e.Debug.deprecate(e.factory.updateTypeLiteralNode,t),e.createArrayTypeNode=e.Debug.deprecate(e.factory.createArrayTypeNode,t),e.updateArrayTypeNode=e.Debug.deprecate(e.factory.updateArrayTypeNode,t),e.createTupleTypeNode=e.Debug.deprecate(e.factory.createTupleTypeNode,t),e.updateTupleTypeNode=e.Debug.deprecate(e.factory.updateTupleTypeNode,t),e.createOptionalTypeNode=e.Debug.deprecate(e.factory.createOptionalTypeNode,t),e.updateOptionalTypeNode=e.Debug.deprecate(e.factory.updateOptionalTypeNode,t),e.createRestTypeNode=e.Debug.deprecate(e.factory.createRestTypeNode,t),e.updateRestTypeNode=e.Debug.deprecate(e.factory.updateRestTypeNode,t),e.createUnionTypeNode=e.Debug.deprecate(e.factory.createUnionTypeNode,t),e.updateUnionTypeNode=e.Debug.deprecate(e.factory.updateUnionTypeNode,t),e.createIntersectionTypeNode=e.Debug.deprecate(e.factory.createIntersectionTypeNode,t),e.updateIntersectionTypeNode=e.Debug.deprecate(e.factory.updateIntersectionTypeNode,t),e.createConditionalTypeNode=e.Debug.deprecate(e.factory.createConditionalTypeNode,t),e.updateConditionalTypeNode=e.Debug.deprecate(e.factory.updateConditionalTypeNode,t),e.createInferTypeNode=e.Debug.deprecate(e.factory.createInferTypeNode,t),e.updateInferTypeNode=e.Debug.deprecate(e.factory.updateInferTypeNode,t),e.createImportTypeNode=e.Debug.deprecate(e.factory.createImportTypeNode,t),e.updateImportTypeNode=e.Debug.deprecate(e.factory.updateImportTypeNode,t),e.createParenthesizedType=e.Debug.deprecate(e.factory.createParenthesizedType,t),e.updateParenthesizedType=e.Debug.deprecate(e.factory.updateParenthesizedType,t),e.createThisTypeNode=e.Debug.deprecate(e.factory.createThisTypeNode,t),e.updateTypeOperatorNode=e.Debug.deprecate(e.factory.updateTypeOperatorNode,t),e.createIndexedAccessTypeNode=e.Debug.deprecate(e.factory.createIndexedAccessTypeNode,t),e.updateIndexedAccessTypeNode=e.Debug.deprecate(e.factory.updateIndexedAccessTypeNode,t),e.createMappedTypeNode=e.Debug.deprecate(e.factory.createMappedTypeNode,t),e.updateMappedTypeNode=e.Debug.deprecate(e.factory.updateMappedTypeNode,t),e.createLiteralTypeNode=e.Debug.deprecate(e.factory.createLiteralTypeNode,t),e.updateLiteralTypeNode=e.Debug.deprecate(e.factory.updateLiteralTypeNode,t),e.createObjectBindingPattern=e.Debug.deprecate(e.factory.createObjectBindingPattern,t),e.updateObjectBindingPattern=e.Debug.deprecate(e.factory.updateObjectBindingPattern,t),e.createArrayBindingPattern=e.Debug.deprecate(e.factory.createArrayBindingPattern,t),e.updateArrayBindingPattern=e.Debug.deprecate(e.factory.updateArrayBindingPattern,t),e.createBindingElement=e.Debug.deprecate(e.factory.createBindingElement,t),e.updateBindingElement=e.Debug.deprecate(e.factory.updateBindingElement,t),e.createArrayLiteral=e.Debug.deprecate(e.factory.createArrayLiteralExpression,t),e.updateArrayLiteral=e.Debug.deprecate(e.factory.updateArrayLiteralExpression,t),e.createObjectLiteral=e.Debug.deprecate(e.factory.createObjectLiteralExpression,t),e.updateObjectLiteral=e.Debug.deprecate(e.factory.updateObjectLiteralExpression,t),e.createPropertyAccess=e.Debug.deprecate(e.factory.createPropertyAccessExpression,t),e.updatePropertyAccess=e.Debug.deprecate(e.factory.updatePropertyAccessExpression,t),e.createPropertyAccessChain=e.Debug.deprecate(e.factory.createPropertyAccessChain,t),e.updatePropertyAccessChain=e.Debug.deprecate(e.factory.updatePropertyAccessChain,t),e.createElementAccess=e.Debug.deprecate(e.factory.createElementAccessExpression,t),e.updateElementAccess=e.Debug.deprecate(e.factory.updateElementAccessExpression,t),e.createElementAccessChain=e.Debug.deprecate(e.factory.createElementAccessChain,t),e.updateElementAccessChain=e.Debug.deprecate(e.factory.updateElementAccessChain,t),e.createCall=e.Debug.deprecate(e.factory.createCallExpression,t),e.updateCall=e.Debug.deprecate(e.factory.updateCallExpression,t),e.createCallChain=e.Debug.deprecate(e.factory.createCallChain,t),e.updateCallChain=e.Debug.deprecate(e.factory.updateCallChain,t),e.createNew=e.Debug.deprecate(e.factory.createNewExpression,t),e.updateNew=e.Debug.deprecate(e.factory.updateNewExpression,t),e.createTypeAssertion=e.Debug.deprecate(e.factory.createTypeAssertion,t),e.updateTypeAssertion=e.Debug.deprecate(e.factory.updateTypeAssertion,t),e.createParen=e.Debug.deprecate(e.factory.createParenthesizedExpression,t),e.updateParen=e.Debug.deprecate(e.factory.updateParenthesizedExpression,t),e.createFunctionExpression=e.Debug.deprecate(e.factory.createFunctionExpression,t),e.updateFunctionExpression=e.Debug.deprecate(e.factory.updateFunctionExpression,t),e.createDelete=e.Debug.deprecate(e.factory.createDeleteExpression,t),e.updateDelete=e.Debug.deprecate(e.factory.updateDeleteExpression,t),e.createTypeOf=e.Debug.deprecate(e.factory.createTypeOfExpression,t),e.updateTypeOf=e.Debug.deprecate(e.factory.updateTypeOfExpression,t),e.createVoid=e.Debug.deprecate(e.factory.createVoidExpression,t),e.updateVoid=e.Debug.deprecate(e.factory.updateVoidExpression,t),e.createAwait=e.Debug.deprecate(e.factory.createAwaitExpression,t),e.updateAwait=e.Debug.deprecate(e.factory.updateAwaitExpression,t),e.createPrefix=e.Debug.deprecate(e.factory.createPrefixUnaryExpression,t),e.updatePrefix=e.Debug.deprecate(e.factory.updatePrefixUnaryExpression,t),e.createPostfix=e.Debug.deprecate(e.factory.createPostfixUnaryExpression,t),e.updatePostfix=e.Debug.deprecate(e.factory.updatePostfixUnaryExpression,t),e.createBinary=e.Debug.deprecate(e.factory.createBinaryExpression,t),e.updateConditional=e.Debug.deprecate(e.factory.updateConditionalExpression,t),e.createTemplateExpression=e.Debug.deprecate(e.factory.createTemplateExpression,t),e.updateTemplateExpression=e.Debug.deprecate(e.factory.updateTemplateExpression,t),e.createTemplateHead=e.Debug.deprecate(e.factory.createTemplateHead,t),e.createTemplateMiddle=e.Debug.deprecate(e.factory.createTemplateMiddle,t),e.createTemplateTail=e.Debug.deprecate(e.factory.createTemplateTail,t),e.createNoSubstitutionTemplateLiteral=e.Debug.deprecate(e.factory.createNoSubstitutionTemplateLiteral,t),e.updateYield=e.Debug.deprecate(e.factory.updateYieldExpression,t),e.createSpread=e.Debug.deprecate(e.factory.createSpreadElement,t),e.updateSpread=e.Debug.deprecate(e.factory.updateSpreadElement,t),e.createOmittedExpression=e.Debug.deprecate(e.factory.createOmittedExpression,t),e.createAsExpression=e.Debug.deprecate(e.factory.createAsExpression,t),e.updateAsExpression=e.Debug.deprecate(e.factory.updateAsExpression,t),e.createNonNullExpression=e.Debug.deprecate(e.factory.createNonNullExpression,t),e.updateNonNullExpression=e.Debug.deprecate(e.factory.updateNonNullExpression,t),e.createNonNullChain=e.Debug.deprecate(e.factory.createNonNullChain,t),e.updateNonNullChain=e.Debug.deprecate(e.factory.updateNonNullChain,t),e.createMetaProperty=e.Debug.deprecate(e.factory.createMetaProperty,t),e.updateMetaProperty=e.Debug.deprecate(e.factory.updateMetaProperty,t),e.createTemplateSpan=e.Debug.deprecate(e.factory.createTemplateSpan,t),e.updateTemplateSpan=e.Debug.deprecate(e.factory.updateTemplateSpan,t),e.createSemicolonClassElement=e.Debug.deprecate(e.factory.createSemicolonClassElement,t),e.createBlock=e.Debug.deprecate(e.factory.createBlock,t),e.updateBlock=e.Debug.deprecate(e.factory.updateBlock,t),e.createVariableStatement=e.Debug.deprecate(e.factory.createVariableStatement,t),e.updateVariableStatement=e.Debug.deprecate(e.factory.updateVariableStatement,t),e.createEmptyStatement=e.Debug.deprecate(e.factory.createEmptyStatement,t),e.createExpressionStatement=e.Debug.deprecate(e.factory.createExpressionStatement,t),e.updateExpressionStatement=e.Debug.deprecate(e.factory.updateExpressionStatement,t),e.createStatement=e.Debug.deprecate(e.factory.createExpressionStatement,t),e.updateStatement=e.Debug.deprecate(e.factory.updateExpressionStatement,t),e.createIf=e.Debug.deprecate(e.factory.createIfStatement,t),e.updateIf=e.Debug.deprecate(e.factory.updateIfStatement,t),e.createDo=e.Debug.deprecate(e.factory.createDoStatement,t),e.updateDo=e.Debug.deprecate(e.factory.updateDoStatement,t),e.createWhile=e.Debug.deprecate(e.factory.createWhileStatement,t),e.updateWhile=e.Debug.deprecate(e.factory.updateWhileStatement,t),e.createFor=e.Debug.deprecate(e.factory.createForStatement,t),e.updateFor=e.Debug.deprecate(e.factory.updateForStatement,t),e.createForIn=e.Debug.deprecate(e.factory.createForInStatement,t),e.updateForIn=e.Debug.deprecate(e.factory.updateForInStatement,t),e.createForOf=e.Debug.deprecate(e.factory.createForOfStatement,t),e.updateForOf=e.Debug.deprecate(e.factory.updateForOfStatement,t),e.createContinue=e.Debug.deprecate(e.factory.createContinueStatement,t),e.updateContinue=e.Debug.deprecate(e.factory.updateContinueStatement,t),e.createBreak=e.Debug.deprecate(e.factory.createBreakStatement,t),e.updateBreak=e.Debug.deprecate(e.factory.updateBreakStatement,t),e.createReturn=e.Debug.deprecate(e.factory.createReturnStatement,t),e.updateReturn=e.Debug.deprecate(e.factory.updateReturnStatement,t),e.createWith=e.Debug.deprecate(e.factory.createWithStatement,t),e.updateWith=e.Debug.deprecate(e.factory.updateWithStatement,t),e.createSwitch=e.Debug.deprecate(e.factory.createSwitchStatement,t),e.updateSwitch=e.Debug.deprecate(e.factory.updateSwitchStatement,t),e.createLabel=e.Debug.deprecate(e.factory.createLabeledStatement,t),e.updateLabel=e.Debug.deprecate(e.factory.updateLabeledStatement,t),e.createThrow=e.Debug.deprecate(e.factory.createThrowStatement,t),e.updateThrow=e.Debug.deprecate(e.factory.updateThrowStatement,t),e.createTry=e.Debug.deprecate(e.factory.createTryStatement,t),e.updateTry=e.Debug.deprecate(e.factory.updateTryStatement,t),e.createDebuggerStatement=e.Debug.deprecate(e.factory.createDebuggerStatement,t),e.createVariableDeclarationList=e.Debug.deprecate(e.factory.createVariableDeclarationList,t),e.updateVariableDeclarationList=e.Debug.deprecate(e.factory.updateVariableDeclarationList,t),e.createFunctionDeclaration=e.Debug.deprecate(e.factory.createFunctionDeclaration,t),e.updateFunctionDeclaration=e.Debug.deprecate(e.factory.updateFunctionDeclaration,t),e.createClassDeclaration=e.Debug.deprecate(e.factory.createClassDeclaration,t),e.updateClassDeclaration=e.Debug.deprecate(e.factory.updateClassDeclaration,t),e.createInterfaceDeclaration=e.Debug.deprecate(e.factory.createInterfaceDeclaration,t),e.updateInterfaceDeclaration=e.Debug.deprecate(e.factory.updateInterfaceDeclaration,t),e.createTypeAliasDeclaration=e.Debug.deprecate(e.factory.createTypeAliasDeclaration,t),e.updateTypeAliasDeclaration=e.Debug.deprecate(e.factory.updateTypeAliasDeclaration,t),e.createEnumDeclaration=e.Debug.deprecate(e.factory.createEnumDeclaration,t),e.updateEnumDeclaration=e.Debug.deprecate(e.factory.updateEnumDeclaration,t),e.createModuleDeclaration=e.Debug.deprecate(e.factory.createModuleDeclaration,t),e.updateModuleDeclaration=e.Debug.deprecate(e.factory.updateModuleDeclaration,t),e.createModuleBlock=e.Debug.deprecate(e.factory.createModuleBlock,t),e.updateModuleBlock=e.Debug.deprecate(e.factory.updateModuleBlock,t),e.createCaseBlock=e.Debug.deprecate(e.factory.createCaseBlock,t),e.updateCaseBlock=e.Debug.deprecate(e.factory.updateCaseBlock,t),e.createNamespaceExportDeclaration=e.Debug.deprecate(e.factory.createNamespaceExportDeclaration,t),e.updateNamespaceExportDeclaration=e.Debug.deprecate(e.factory.updateNamespaceExportDeclaration,t),e.createImportEqualsDeclaration=e.Debug.deprecate(e.factory.createImportEqualsDeclaration,t),e.updateImportEqualsDeclaration=e.Debug.deprecate(e.factory.updateImportEqualsDeclaration,t),e.createImportDeclaration=e.Debug.deprecate(e.factory.createImportDeclaration,t),e.updateImportDeclaration=e.Debug.deprecate(e.factory.updateImportDeclaration,t),e.createNamespaceImport=e.Debug.deprecate(e.factory.createNamespaceImport,t),e.updateNamespaceImport=e.Debug.deprecate(e.factory.updateNamespaceImport,t),e.createNamedImports=e.Debug.deprecate(e.factory.createNamedImports,t),e.updateNamedImports=e.Debug.deprecate(e.factory.updateNamedImports,t),e.createImportSpecifier=e.Debug.deprecate(e.factory.createImportSpecifier,t),e.updateImportSpecifier=e.Debug.deprecate(e.factory.updateImportSpecifier,t),e.createExportAssignment=e.Debug.deprecate(e.factory.createExportAssignment,t),e.updateExportAssignment=e.Debug.deprecate(e.factory.updateExportAssignment,t),e.createNamedExports=e.Debug.deprecate(e.factory.createNamedExports,t),e.updateNamedExports=e.Debug.deprecate(e.factory.updateNamedExports,t),e.createExportSpecifier=e.Debug.deprecate(e.factory.createExportSpecifier,t),e.updateExportSpecifier=e.Debug.deprecate(e.factory.updateExportSpecifier,t),e.createExternalModuleReference=e.Debug.deprecate(e.factory.createExternalModuleReference,t),e.updateExternalModuleReference=e.Debug.deprecate(e.factory.updateExternalModuleReference,t),e.createJSDocTypeExpression=e.Debug.deprecate(e.factory.createJSDocTypeExpression,t),e.createJSDocTypeTag=e.Debug.deprecate(e.factory.createJSDocTypeTag,t),e.createJSDocReturnTag=e.Debug.deprecate(e.factory.createJSDocReturnTag,t),e.createJSDocThisTag=e.Debug.deprecate(e.factory.createJSDocThisTag,t),e.createJSDocComment=e.Debug.deprecate(e.factory.createJSDocComment,t),e.createJSDocParameterTag=e.Debug.deprecate(e.factory.createJSDocParameterTag,t),e.createJSDocClassTag=e.Debug.deprecate(e.factory.createJSDocClassTag,t),e.createJSDocAugmentsTag=e.Debug.deprecate(e.factory.createJSDocAugmentsTag,t),e.createJSDocEnumTag=e.Debug.deprecate(e.factory.createJSDocEnumTag,t),e.createJSDocTemplateTag=e.Debug.deprecate(e.factory.createJSDocTemplateTag,t),e.createJSDocTypedefTag=e.Debug.deprecate(e.factory.createJSDocTypedefTag,t),e.createJSDocCallbackTag=e.Debug.deprecate(e.factory.createJSDocCallbackTag,t),e.createJSDocSignature=e.Debug.deprecate(e.factory.createJSDocSignature,t),e.createJSDocPropertyTag=e.Debug.deprecate(e.factory.createJSDocPropertyTag,t),e.createJSDocTypeLiteral=e.Debug.deprecate(e.factory.createJSDocTypeLiteral,t),e.createJSDocImplementsTag=e.Debug.deprecate(e.factory.createJSDocImplementsTag,t),e.createJSDocAuthorTag=e.Debug.deprecate(e.factory.createJSDocAuthorTag,t),e.createJSDocPublicTag=e.Debug.deprecate(e.factory.createJSDocPublicTag,t),e.createJSDocPrivateTag=e.Debug.deprecate(e.factory.createJSDocPrivateTag,t),e.createJSDocProtectedTag=e.Debug.deprecate(e.factory.createJSDocProtectedTag,t),e.createJSDocReadonlyTag=e.Debug.deprecate(e.factory.createJSDocReadonlyTag,t),e.createJSDocTag=e.Debug.deprecate(e.factory.createJSDocUnknownTag,t),e.createJsxElement=e.Debug.deprecate(e.factory.createJsxElement,t),e.updateJsxElement=e.Debug.deprecate(e.factory.updateJsxElement,t),e.createJsxSelfClosingElement=e.Debug.deprecate(e.factory.createJsxSelfClosingElement,t),e.updateJsxSelfClosingElement=e.Debug.deprecate(e.factory.updateJsxSelfClosingElement,t),e.createJsxOpeningElement=e.Debug.deprecate(e.factory.createJsxOpeningElement,t),e.updateJsxOpeningElement=e.Debug.deprecate(e.factory.updateJsxOpeningElement,t),e.createJsxClosingElement=e.Debug.deprecate(e.factory.createJsxClosingElement,t),e.updateJsxClosingElement=e.Debug.deprecate(e.factory.updateJsxClosingElement,t),e.createJsxFragment=e.Debug.deprecate(e.factory.createJsxFragment,t),e.createJsxText=e.Debug.deprecate(e.factory.createJsxText,t),e.updateJsxText=e.Debug.deprecate(e.factory.updateJsxText,t),e.createJsxOpeningFragment=e.Debug.deprecate(e.factory.createJsxOpeningFragment,t),e.createJsxJsxClosingFragment=e.Debug.deprecate(e.factory.createJsxJsxClosingFragment,t),e.updateJsxFragment=e.Debug.deprecate(e.factory.updateJsxFragment,t),e.createJsxAttribute=e.Debug.deprecate(e.factory.createJsxAttribute,t),e.updateJsxAttribute=e.Debug.deprecate(e.factory.updateJsxAttribute,t),e.createJsxAttributes=e.Debug.deprecate(e.factory.createJsxAttributes,t),e.updateJsxAttributes=e.Debug.deprecate(e.factory.updateJsxAttributes,t),e.createJsxSpreadAttribute=e.Debug.deprecate(e.factory.createJsxSpreadAttribute,t),e.updateJsxSpreadAttribute=e.Debug.deprecate(e.factory.updateJsxSpreadAttribute,t),e.createJsxExpression=e.Debug.deprecate(e.factory.createJsxExpression,t),e.updateJsxExpression=e.Debug.deprecate(e.factory.updateJsxExpression,t),e.createCaseClause=e.Debug.deprecate(e.factory.createCaseClause,t),e.updateCaseClause=e.Debug.deprecate(e.factory.updateCaseClause,t),e.createDefaultClause=e.Debug.deprecate(e.factory.createDefaultClause,t),e.updateDefaultClause=e.Debug.deprecate(e.factory.updateDefaultClause,t),e.createHeritageClause=e.Debug.deprecate(e.factory.createHeritageClause,t),e.updateHeritageClause=e.Debug.deprecate(e.factory.updateHeritageClause,t),e.createCatchClause=e.Debug.deprecate(e.factory.createCatchClause,t),e.updateCatchClause=e.Debug.deprecate(e.factory.updateCatchClause,t),e.createPropertyAssignment=e.Debug.deprecate(e.factory.createPropertyAssignment,t),e.updatePropertyAssignment=e.Debug.deprecate(e.factory.updatePropertyAssignment,t),e.createShorthandPropertyAssignment=e.Debug.deprecate(e.factory.createShorthandPropertyAssignment,t),e.updateShorthandPropertyAssignment=e.Debug.deprecate(e.factory.updateShorthandPropertyAssignment,t),e.createSpreadAssignment=e.Debug.deprecate(e.factory.createSpreadAssignment,t),e.updateSpreadAssignment=e.Debug.deprecate(e.factory.updateSpreadAssignment,t),e.createEnumMember=e.Debug.deprecate(e.factory.createEnumMember,t),e.updateEnumMember=e.Debug.deprecate(e.factory.updateEnumMember,t),e.updateSourceFileNode=e.Debug.deprecate(e.factory.updateSourceFile,t),e.createNotEmittedStatement=e.Debug.deprecate(e.factory.createNotEmittedStatement,t),e.createPartiallyEmittedExpression=e.Debug.deprecate(e.factory.createPartiallyEmittedExpression,t),e.updatePartiallyEmittedExpression=e.Debug.deprecate(e.factory.updatePartiallyEmittedExpression,t),e.createCommaList=e.Debug.deprecate(e.factory.createCommaListExpression,t),e.updateCommaList=e.Debug.deprecate(e.factory.updateCommaListExpression,t),e.createBundle=e.Debug.deprecate(e.factory.createBundle,t),e.updateBundle=e.Debug.deprecate(e.factory.updateBundle,t),e.createImmediatelyInvokedFunctionExpression=e.Debug.deprecate(e.factory.createImmediatelyInvokedFunctionExpression,t),e.createImmediatelyInvokedArrowFunction=e.Debug.deprecate(e.factory.createImmediatelyInvokedArrowFunction,t),e.createVoidZero=e.Debug.deprecate(e.factory.createVoidZero,t),e.createExportDefault=e.Debug.deprecate(e.factory.createExportDefault,t),e.createExternalModuleExport=e.Debug.deprecate(e.factory.createExternalModuleExport,t),e.createNamespaceExport=e.Debug.deprecate(e.factory.createNamespaceExport,t),e.updateNamespaceExport=e.Debug.deprecate(e.factory.updateNamespaceExport,t),e.createToken=e.Debug.deprecate(function(g){return e.factory.createToken(g)},t),e.createIdentifier=e.Debug.deprecate(function(g){return e.factory.createIdentifier(g,void 0,void 0)},t),e.createTempVariable=e.Debug.deprecate(function(g){return e.factory.createTempVariable(g,void 0)},t),e.getGeneratedNameForNode=e.Debug.deprecate(function(g){return e.factory.getGeneratedNameForNode(g,void 0)},t),e.createOptimisticUniqueName=e.Debug.deprecate(function(g){return e.factory.createUniqueName(g,16)},t),e.createFileLevelUniqueName=e.Debug.deprecate(function(g){return e.factory.createUniqueName(g,48)},t),e.createIndexSignature=e.Debug.deprecate(function(g,F,y,R){return e.factory.createIndexSignature(g,F,y,R)},t),e.createTypePredicateNode=e.Debug.deprecate(function(g,F){return e.factory.createTypePredicateNode(void 0,g,F)},t),e.updateTypePredicateNode=e.Debug.deprecate(function(g,F,y){return e.factory.updateTypePredicateNode(g,void 0,F,y)},t),e.createLiteral=e.Debug.deprecate(function(g){return typeof g=="number"?e.factory.createNumericLiteral(g):typeof g=="object"&&"base10Value"in g?e.factory.createBigIntLiteral(g):typeof g=="boolean"?g?e.factory.createTrue():e.factory.createFalse():typeof g=="string"?e.factory.createStringLiteral(g,void 0):e.factory.createStringLiteralFromNode(g)},{since:"4.0",warnAfter:"4.1",message:"Use `factory.createStringLiteral`, `factory.createStringLiteralFromNode`, `factory.createNumericLiteral`, `factory.createBigIntLiteral`, `factory.createTrue`, `factory.createFalse`, or the factory supplied by your transformation context instead."}),e.createMethodSignature=e.Debug.deprecate(function(g,F,y,R,re){return e.factory.createMethodSignature(void 0,R,re,g,F,y)},t),e.updateMethodSignature=e.Debug.deprecate(function(g,F,y,R,re,U){return e.factory.updateMethodSignature(g,g.modifiers,re,U,F,y,R)},t),e.createTypeOperatorNode=e.Debug.deprecate(function(g,F){var y;return F?y=g:(F=g,y=141),e.factory.createTypeOperatorNode(y,F)},t),e.createTaggedTemplate=e.Debug.deprecate(function(g,F,y){var R;return y?R=F:y=F,e.factory.createTaggedTemplateExpression(g,R,y)},t),e.updateTaggedTemplate=e.Debug.deprecate(function(g,F,y,R){var re;return R?re=y:R=y,e.factory.updateTaggedTemplateExpression(g,F,re,R)},t),e.updateBinary=e.Debug.deprecate(function(g,F,y,R){return R===void 0&&(R=g.operatorToken),typeof R=="number"&&(R=R===g.operatorToken.kind?g.operatorToken:e.factory.createToken(R)),e.factory.updateBinaryExpression(g,F,R,y)},t),e.createConditional=e.Debug.deprecate(function(g,F,y,R,re){return arguments.length===5?e.factory.createConditionalExpression(g,F,y,R,re):arguments.length===3?e.factory.createConditionalExpression(g,e.factory.createToken(57),F,e.factory.createToken(58),y):e.Debug.fail("Argument count mismatch")},t),e.createYield=e.Debug.deprecate(function(g,F){var y;return F?y=g:F=g,e.factory.createYieldExpression(y,F)},t),e.createClassExpression=e.Debug.deprecate(function(g,F,y,R,re){return e.factory.createClassExpression(void 0,g,F,y,R,re)},t),e.updateClassExpression=e.Debug.deprecate(function(g,F,y,R,re,U){return e.factory.updateClassExpression(g,void 0,F,y,R,re,U)},t),e.createPropertySignature=e.Debug.deprecate(function(g,F,y,R,re){var U=e.factory.createPropertySignature(g,F,y,R);return U.initializer=re,U},t),e.updatePropertySignature=e.Debug.deprecate(function(g,F,y,R,re,U){var d=e.factory.updatePropertySignature(g,F,y,R,re);return g.initializer!==U&&(d===g&&(d=e.factory.cloneNode(g)),d.initializer=U),d},t),e.createExpressionWithTypeArguments=e.Debug.deprecate(function(g,F){return e.factory.createExpressionWithTypeArguments(F,g)},t),e.updateExpressionWithTypeArguments=e.Debug.deprecate(function(g,F,y){return e.factory.updateExpressionWithTypeArguments(g,y,F)},t),e.createArrowFunction=e.Debug.deprecate(function(g,F,y,R,re,U){return arguments.length===6?e.factory.createArrowFunction(g,F,y,R,re,U):arguments.length===5?e.factory.createArrowFunction(g,F,y,R,void 0,re):e.Debug.fail("Argument count mismatch")},t),e.updateArrowFunction=e.Debug.deprecate(function(g,F,y,R,re,U,d){return arguments.length===7?e.factory.updateArrowFunction(g,F,y,R,re,U,d):arguments.length===6?e.factory.updateArrowFunction(g,F,y,R,re,g.equalsGreaterThanToken,U):e.Debug.fail("Argument count mismatch")},t),e.createVariableDeclaration=e.Debug.deprecate(function(g,F,y,R){return arguments.length===4?e.factory.createVariableDeclaration(g,F,y,R):arguments.length>=1&&arguments.length<=3?e.factory.createVariableDeclaration(g,void 0,F,y):e.Debug.fail("Argument count mismatch")},t),e.updateVariableDeclaration=e.Debug.deprecate(function(g,F,y,R,re){return arguments.length===5?e.factory.updateVariableDeclaration(g,F,y,R,re):arguments.length===4?e.factory.updateVariableDeclaration(g,F,g.exclamationToken,y,R):e.Debug.fail("Argument count mismatch")},t),e.createImportClause=e.Debug.deprecate(function(g,F,y){return y===void 0&&(y=!1),e.factory.createImportClause(y,g,F)},t),e.updateImportClause=e.Debug.deprecate(function(g,F,y,R){return e.factory.updateImportClause(g,R,F,y)},t),e.createExportDeclaration=e.Debug.deprecate(function(g,F,y,R,re){return re===void 0&&(re=!1),e.factory.createExportDeclaration(g,F,re,y,R)},t),e.updateExportDeclaration=e.Debug.deprecate(function(g,F,y,R,re,U){return e.factory.updateExportDeclaration(g,F,y,U,R,re,g.assertClause)},t),e.createJSDocParamTag=e.Debug.deprecate(function(g,F,y,R){return e.factory.createJSDocParameterTag(void 0,g,F,y,!1,R?e.factory.createNodeArray([e.factory.createJSDocText(R)]):void 0)},t),e.createComma=e.Debug.deprecate(function(g,F){return e.factory.createComma(g,F)},t),e.createLessThan=e.Debug.deprecate(function(g,F){return e.factory.createLessThan(g,F)},t),e.createAssignment=e.Debug.deprecate(function(g,F){return e.factory.createAssignment(g,F)},t),e.createStrictEquality=e.Debug.deprecate(function(g,F){return e.factory.createStrictEquality(g,F)},t),e.createStrictInequality=e.Debug.deprecate(function(g,F){return e.factory.createStrictInequality(g,F)},t),e.createAdd=e.Debug.deprecate(function(g,F){return e.factory.createAdd(g,F)},t),e.createSubtract=e.Debug.deprecate(function(g,F){return e.factory.createSubtract(g,F)},t),e.createLogicalAnd=e.Debug.deprecate(function(g,F){return e.factory.createLogicalAnd(g,F)},t),e.createLogicalOr=e.Debug.deprecate(function(g,F){return e.factory.createLogicalOr(g,F)},t),e.createPostfixIncrement=e.Debug.deprecate(function(g){return e.factory.createPostfixIncrement(g)},t),e.createLogicalNot=e.Debug.deprecate(function(g){return e.factory.createLogicalNot(g)},t),e.createNode=e.Debug.deprecate(function(g,F,y){return F===void 0&&(F=0),y===void 0&&(y=0),e.setTextRangePosEnd(g===308?e.parseBaseNodeFactory.createBaseSourceFileNode(g):g===79?e.parseBaseNodeFactory.createBaseIdentifierNode(g):g===80?e.parseBaseNodeFactory.createBasePrivateIdentifierNode(g):e.isNodeKind(g)?e.parseBaseNodeFactory.createBaseNode(g):e.parseBaseNodeFactory.createBaseTokenNode(g),F,y)},{since:"4.0",warnAfter:"4.1",message:"Use an appropriate `factory` method instead."}),e.getMutableClone=e.Debug.deprecate(function(g){var F=e.factory.cloneNode(g);return e.setTextRange(F,g),e.setParent(F,g.parent),F},{since:"4.0",warnAfter:"4.1",message:"Use an appropriate `factory.update...` method instead, use `setCommentRange` or `setSourceMapRange`, and avoid setting `parent`."})})(fr||(fr={}));var fr;(function(e){e.isTypeAssertion=e.Debug.deprecate(function(v){return v.kind===213},{since:"4.0",warnAfter:"4.1",message:"Use `isTypeAssertionExpression` instead."})})(fr||(fr={}));var fr;(function(e){e.isIdentifierOrPrivateIdentifier=e.Debug.deprecate(function(v){return e.isMemberName(v)},{since:"4.2",warnAfter:"4.3",message:"Use `isMemberName` instead."})})(fr||(fr={}));var fr;(function(e){function t(g){var F=g.createConstructorTypeNode,y=g.updateConstructorTypeNode;g.createConstructorTypeNode=e.buildOverload("createConstructorTypeNode").overload({0:function(R,re,U,d){return F(R,re,U,d)},1:function(R,re,U){return F(void 0,R,re,U)}}).bind({0:function(R){return R.length===4},1:function(R){return R.length===3}}).deprecate({1:{since:"4.2",warnAfter:"4.3",message:"Use the overload that accepts 'modifiers'"}}).finish(),g.updateConstructorTypeNode=e.buildOverload("updateConstructorTypeNode").overload({0:function(R,re,U,d,m){return y(R,re,U,d,m)},1:function(R,re,U,d){return y(R,R.modifiers,re,U,d)}}).bind({0:function(R){return R.length===5},1:function(R){return R.length===4}}).deprecate({1:{since:"4.2",warnAfter:"4.3",message:"Use the overload that accepts 'modifiers'"}}).finish()}var v=e.createNodeFactory;e.createNodeFactory=function(g,F){var y=v(g,F);return t(y),y},t(e.factory)})(fr||(fr={}));var fr;(function(e){function t(g){var F=g.createImportTypeNode,y=g.updateImportTypeNode;g.createImportTypeNode=e.buildOverload("createImportTypeNode").overload({0:function(R,re,U,d,m){return F(R,re,U,d,m)},1:function(R,re,U,d){return F(R,void 0,re,U,d)}}).bind({0:function(R){var re=R[1],U=R[2],d=R[3],m=R[4];return(re===void 0||e.isImportTypeAssertionContainer(re))&&(U===void 0||!e.isArray(U))&&(d===void 0||e.isArray(d))&&(m===void 0||typeof m=="boolean")},1:function(R){var re=R[1],U=R[2],d=R[3],m=R[4];return m===void 0&&(re===void 0||e.isEntityName(re))&&(U===void 0||e.isArray(U))&&(d===void 0||typeof d=="boolean")}}).deprecate({1:{since:"4.6",warnAfter:"4.7",message:"Use the overload that accepts 'assertions'"}}).finish(),g.updateImportTypeNode=e.buildOverload("updateImportTypeNode").overload({0:function(R,re,U,d,m,le){return y(R,re,U,d,m,le)},1:function(R,re,U,d,m){return y(R,re,R.assertions,U,d,m)}}).bind({0:function(R){var re=R[2],U=R[3],d=R[4],m=R[5];return(re===void 0||e.isImportTypeAssertionContainer(re))&&(U===void 0||!e.isArray(U))&&(d===void 0||e.isArray(d))&&(m===void 0||typeof m=="boolean")},1:function(R){var re=R[2],U=R[3],d=R[4],m=R[5];return m===void 0&&(re===void 0||e.isEntityName(re))&&(U===void 0||e.isArray(U))&&(d===void 0||typeof d=="boolean")}}).deprecate({1:{since:"4.6",warnAfter:"4.7",message:"Use the overload that accepts 'assertions'"}}).finish()}var v=e.createNodeFactory;e.createNodeFactory=function(g,F){var y=v(g,F);return t(y),y},t(e.factory)})(fr||(fr={}));var fr;(function(e){function t(g){var F=g.createTypeParameterDeclaration,y=g.updateTypeParameterDeclaration;g.createTypeParameterDeclaration=e.buildOverload("createTypeParameterDeclaration").overload({0:function(R,re,U,d){return F(R,re,U,d)},1:function(R,re,U){return F(void 0,R,re,U)}}).bind({0:function(R){var re=R[0];return re===void 0||e.isArray(re)},1:function(R){var re=R[0];return re!==void 0&&!e.isArray(re)}}).deprecate({1:{since:"4.7",warnAfter:"4.8",message:"Use the overload that accepts 'modifiers'"}}).finish(),g.updateTypeParameterDeclaration=e.buildOverload("updateTypeParameterDeclaration").overload({0:function(R,re,U,d,m){return y(R,re,U,d,m)},1:function(R,re,U,d){return y(R,R.modifiers,re,U,d)}}).bind({0:function(R){var re=R[1];return re===void 0||e.isArray(re)},1:function(R){var re=R[1];return re!==void 0&&!e.isArray(re)}}).deprecate({1:{since:"4.7",warnAfter:"4.8",message:"Use the overload that accepts 'modifiers'"}}).finish()}var v=e.createNodeFactory;e.createNodeFactory=function(g,F){var y=v(g,F);return t(y),y},t(e.factory)})(fr||(fr={}));var fr;(function(e){var t={since:"4.8",warnAfter:"4.9.0-0",message:"Decorators have been combined with modifiers. Callers should switch to an overload that does not accept a 'decorators' parameter."},v={since:"4.8",warnAfter:"4.9.0-0",message:"Decorators are no longer supported for this function. Callers should switch to an overload that does not accept a 'decorators' parameter."},g={since:"4.8",warnAfter:"4.9.0-0",message:"Decorators and modifiers are no longer supported for this function. Callers should switch to an overload that does not accept the 'decorators' and 'modifiers' parameters."};function F(R){var re=R.createParameterDeclaration,U=R.updateParameterDeclaration,d=R.createPropertyDeclaration,m=R.updatePropertyDeclaration,le=R.createMethodDeclaration,ue=R.updateMethodDeclaration,oe=R.createConstructorDeclaration,se=R.updateConstructorDeclaration,ce=R.createGetAccessorDeclaration,w=R.updateGetAccessorDeclaration,M=R.createSetAccessorDeclaration,f=R.updateSetAccessorDeclaration,D=R.createIndexSignature,C=R.updateIndexSignature,T=R.createClassStaticBlockDeclaration,N=R.updateClassStaticBlockDeclaration,k=R.createClassExpression,me=R.updateClassExpression,De=R.createFunctionDeclaration,$=R.updateFunctionDeclaration,B=R.createClassDeclaration,Y=R.updateClassDeclaration,X=R.createInterfaceDeclaration,S=R.updateInterfaceDeclaration,J=R.createTypeAliasDeclaration,te=R.updateTypeAliasDeclaration,j=R.createEnumDeclaration,O=R.updateEnumDeclaration,I=R.createModuleDeclaration,q=R.updateModuleDeclaration,Q=R.createImportEqualsDeclaration,Z=R.updateImportEqualsDeclaration,he=R.createImportDeclaration,x=R.updateImportDeclaration,E=R.createExportAssignment,A=R.updateExportAssignment,ne=R.createExportDeclaration,W=R.updateExportDeclaration;R.createParameterDeclaration=e.buildOverload("createParameterDeclaration").overload({0:function(u,P,L,H,G,ge){return re(u,P,L,H,G,ge)},1:function(u,P,L,H,G,ge,pe){return re(e.concatenate(u,P),L,H,G,ge,pe)}}).bind({0:function(u){var P=u[1],L=u[2],H=u[3],G=u[4],ge=u[5],pe=u[6];return pe===void 0&&(P===void 0||!e.isArray(P))&&(L===void 0||typeof L=="string"||e.isBindingName(L))&&(H===void 0||typeof H=="object"&&e.isQuestionToken(H))&&(G===void 0||e.isTypeNode(G))&&(ge===void 0||e.isExpression(ge))},1:function(u){var P=u[1],L=u[2],H=u[3],G=u[4],ge=u[5],pe=u[6];return(P===void 0||e.isArray(P))&&(L===void 0||typeof L=="object"&&e.isDotDotDotToken(L))&&(H===void 0||typeof H=="string"||e.isBindingName(H))&&(G===void 0||e.isQuestionToken(G))&&(ge===void 0||e.isTypeNode(ge))&&(pe===void 0||e.isExpression(pe))}}).deprecate({1:t}).finish(),R.updateParameterDeclaration=e.buildOverload("updateParameterDeclaration").overload({0:function(u,P,L,H,G,ge,pe){return U(u,P,L,H,G,ge,pe)},1:function(u,P,L,H,G,ge,pe,He){return U(u,e.concatenate(P,L),H,G,ge,pe,He)}}).bind({0:function(u){var P=u[2],L=u[3],H=u[4],G=u[5],ge=u[6],pe=u[7];return pe===void 0&&(P===void 0||!e.isArray(P))&&(L===void 0||typeof L=="string"||e.isBindingName(L))&&(H===void 0||typeof H=="object"&&e.isQuestionToken(H))&&(G===void 0||e.isTypeNode(G))&&(ge===void 0||e.isExpression(ge))},1:function(u){var P=u[2],L=u[3],H=u[4],G=u[5],ge=u[6],pe=u[7];return(P===void 0||e.isArray(P))&&(L===void 0||typeof L=="object"&&e.isDotDotDotToken(L))&&(H===void 0||typeof H=="string"||e.isBindingName(H))&&(G===void 0||e.isQuestionToken(G))&&(ge===void 0||e.isTypeNode(ge))&&(pe===void 0||e.isExpression(pe))}}).deprecate({1:t}).finish(),R.createPropertyDeclaration=e.buildOverload("createPropertyDeclaration").overload({0:function(u,P,L,H,G){return d(u,P,L,H,G)},1:function(u,P,L,H,G,ge){return d(e.concatenate(u,P),L,H,G,ge)}}).bind({0:function(u){var P=u[1],L=u[2],H=u[3],G=u[4],ge=u[5];return ge===void 0&&(P===void 0||!e.isArray(P))&&(L===void 0||typeof L=="object"&&e.isQuestionOrExclamationToken(L))&&(H===void 0||e.isTypeNode(H))&&(G===void 0||e.isExpression(G))},1:function(u){var P=u[1],L=u[2],H=u[3],G=u[4],ge=u[5];return(P===void 0||e.isArray(P))&&(L===void 0||typeof L=="string"||e.isPropertyName(L))&&(H===void 0||e.isQuestionOrExclamationToken(H))&&(G===void 0||e.isTypeNode(G))&&(ge===void 0||e.isExpression(ge))}}).deprecate({1:t}).finish(),R.updatePropertyDeclaration=e.buildOverload("updatePropertyDeclaration").overload({0:function(u,P,L,H,G,ge){return m(u,P,L,H,G,ge)},1:function(u,P,L,H,G,ge,pe){return m(u,e.concatenate(P,L),H,G,ge,pe)}}).bind({0:function(u){var P=u[2],L=u[3],H=u[4],G=u[5],ge=u[6];return ge===void 0&&(P===void 0||!e.isArray(P))&&(L===void 0||typeof L=="object"&&e.isQuestionOrExclamationToken(L))&&(H===void 0||e.isTypeNode(H))&&(G===void 0||e.isExpression(G))},1:function(u){var P=u[2],L=u[3],H=u[4],G=u[5],ge=u[6];return(P===void 0||e.isArray(P))&&(L===void 0||typeof L=="string"||e.isPropertyName(L))&&(H===void 0||e.isQuestionOrExclamationToken(H))&&(G===void 0||e.isTypeNode(G))&&(ge===void 0||e.isExpression(ge))}}).deprecate({1:t}).finish(),R.createMethodDeclaration=e.buildOverload("createMethodDeclaration").overload({0:function(u,P,L,H,G,ge,pe,He){return le(u,P,L,H,G,ge,pe,He)},1:function(u,P,L,H,G,ge,pe,He,Je){return le(e.concatenate(u,P),L,H,G,ge,pe,He,Je)}}).bind({0:function(u){var P=u[1],L=u[2],H=u[3],G=u[4],ge=u[5],pe=u[6],He=u[7],Je=u[8];return Je===void 0&&(P===void 0||!e.isArray(P))&&(L===void 0||typeof L=="string"||e.isPropertyName(L))&&(H===void 0||typeof H=="object"&&e.isQuestionToken(H))&&(G===void 0||e.isArray(G))&&(ge===void 0||!e.some(ge,e.isTypeParameterDeclaration))&&(pe===void 0||!e.isArray(pe))&&(He===void 0||e.isBlock(He))},1:function(u){var P=u[1],L=u[2],H=u[3],G=u[4],ge=u[5],pe=u[6],He=u[7],Je=u[8];return(P===void 0||e.isArray(P))&&(L===void 0||typeof L=="object"&&e.isAsteriskToken(L))&&(H===void 0||typeof H=="string"||e.isPropertyName(H))&&(G===void 0||!e.isArray(G))&&(ge===void 0||!e.some(ge,e.isParameter))&&(pe===void 0||e.isArray(pe))&&(He===void 0||e.isTypeNode(He))&&(Je===void 0||e.isBlock(Je))}}).deprecate({1:t}).finish(),R.updateMethodDeclaration=e.buildOverload("updateMethodDeclaration").overload({0:function(u,P,L,H,G,ge,pe,He,Je){return ue(u,P,L,H,G,ge,pe,He,Je)},1:function(u,P,L,H,G,ge,pe,He,Je,Me){return ue(u,e.concatenate(P,L),H,G,ge,pe,He,Je,Me)}}).bind({0:function(u){var P=u[2],L=u[3],H=u[4],G=u[5],ge=u[6],pe=u[7],He=u[8],Je=u[9];return Je===void 0&&(P===void 0||!e.isArray(P))&&(L===void 0||typeof L=="string"||e.isPropertyName(L))&&(H===void 0||typeof H=="object"&&e.isQuestionToken(H))&&(G===void 0||e.isArray(G))&&(ge===void 0||!e.some(ge,e.isTypeParameterDeclaration))&&(pe===void 0||!e.isArray(pe))&&(He===void 0||e.isBlock(He))},1:function(u){var P=u[2],L=u[3],H=u[4],G=u[5],ge=u[6],pe=u[7],He=u[8],Je=u[9];return(P===void 0||e.isArray(P))&&(L===void 0||typeof L=="object"&&e.isAsteriskToken(L))&&(H===void 0||typeof H=="string"||e.isPropertyName(H))&&(G===void 0||!e.isArray(G))&&(ge===void 0||!e.some(ge,e.isParameter))&&(pe===void 0||e.isArray(pe))&&(He===void 0||e.isTypeNode(He))&&(Je===void 0||e.isBlock(Je))}}).deprecate({1:t}).finish(),R.createConstructorDeclaration=e.buildOverload("createConstructorDeclaration").overload({0:function(u,P,L){return oe(u,P,L)},1:function(u,P,L,H){return oe(P,L,H)}}).bind({0:function(u){var P=u[0],L=u[1],H=u[2],G=u[3];return G===void 0&&(P===void 0||!e.some(P,e.isDecorator))&&(L===void 0||!e.some(L,e.isModifier))&&(H===void 0||!e.isArray(H))},1:function(u){var P=u[0],L=u[1],H=u[2],G=u[3];return(P===void 0||!e.some(P,e.isModifier))&&(L===void 0||!e.some(L,e.isParameter))&&(H===void 0||e.isArray(H))&&(G===void 0||e.isBlock(G))}}).deprecate({1:v}).finish(),R.updateConstructorDeclaration=e.buildOverload("updateConstructorDeclaration").overload({0:function(u,P,L,H){return se(u,P,L,H)},1:function(u,P,L,H,G){return se(u,L,H,G)}}).bind({0:function(u){var P=u[1],L=u[2],H=u[3],G=u[4];return G===void 0&&(P===void 0||!e.some(P,e.isDecorator))&&(L===void 0||!e.some(L,e.isModifier))&&(H===void 0||!e.isArray(H))},1:function(u){var P=u[1],L=u[2],H=u[3],G=u[4];return(P===void 0||!e.some(P,e.isModifier))&&(L===void 0||!e.some(L,e.isParameter))&&(H===void 0||e.isArray(H))&&(G===void 0||e.isBlock(G))}}).deprecate({1:v}).finish(),R.createGetAccessorDeclaration=e.buildOverload("createGetAccessorDeclaration").overload({0:function(u,P,L,H,G){return ce(u,P,L,H,G)},1:function(u,P,L,H,G,ge){return ce(e.concatenate(u,P),L,H,G,ge)}}).bind({0:function(u){var P=u[1],L=u[2],H=u[3],G=u[4],ge=u[5];return ge===void 0&&(P===void 0||!e.isArray(P))&&(L===void 0||e.isArray(L))&&(H===void 0||!e.isArray(H))&&(G===void 0||e.isBlock(G))},1:function(u){var P=u[1],L=u[2],H=u[3],G=u[4],ge=u[5];return(P===void 0||e.isArray(P))&&(L===void 0||!e.isArray(L))&&(H===void 0||e.isArray(H))&&(G===void 0||e.isTypeNode(G))&&(ge===void 0||e.isBlock(ge))}}).deprecate({1:t}).finish(),R.updateGetAccessorDeclaration=e.buildOverload("updateGetAccessorDeclaration").overload({0:function(u,P,L,H,G,ge){return w(u,P,L,H,G,ge)},1:function(u,P,L,H,G,ge,pe){return w(u,e.concatenate(P,L),H,G,ge,pe)}}).bind({0:function(u){var P=u[2],L=u[3],H=u[4],G=u[5],ge=u[6];return ge===void 0&&(P===void 0||!e.isArray(P))&&(L===void 0||e.isArray(L))&&(H===void 0||!e.isArray(H))&&(G===void 0||e.isBlock(G))},1:function(u){var P=u[2],L=u[3],H=u[4],G=u[5],ge=u[6];return(P===void 0||e.isArray(P))&&(L===void 0||!e.isArray(L))&&(H===void 0||e.isArray(H))&&(G===void 0||e.isTypeNode(G))&&(ge===void 0||e.isBlock(ge))}}).deprecate({1:t}).finish(),R.createSetAccessorDeclaration=e.buildOverload("createSetAccessorDeclaration").overload({0:function(u,P,L,H){return M(u,P,L,H)},1:function(u,P,L,H,G){return M(e.concatenate(u,P),L,H,G)}}).bind({0:function(u){var P=u[1],L=u[2],H=u[3],G=u[4];return G===void 0&&(P===void 0||!e.isArray(P))&&(L===void 0||e.isArray(L))&&(H===void 0||!e.isArray(H))},1:function(u){var P=u[1],L=u[2],H=u[3],G=u[4];return(P===void 0||e.isArray(P))&&(L===void 0||!e.isArray(L))&&(H===void 0||e.isArray(H))&&(G===void 0||e.isBlock(G))}}).deprecate({1:t}).finish(),R.updateSetAccessorDeclaration=e.buildOverload("updateSetAccessorDeclaration").overload({0:function(u,P,L,H,G){return f(u,P,L,H,G)},1:function(u,P,L,H,G,ge){return f(u,e.concatenate(P,L),H,G,ge)}}).bind({0:function(u){var P=u[2],L=u[3],H=u[4],G=u[5];return G===void 0&&(P===void 0||!e.isArray(P))&&(L===void 0||e.isArray(L))&&(H===void 0||!e.isArray(H))},1:function(u){var P=u[2],L=u[3],H=u[4],G=u[5];return(P===void 0||e.isArray(P))&&(L===void 0||!e.isArray(L))&&(H===void 0||e.isArray(H))&&(G===void 0||e.isBlock(G))}}).deprecate({1:t}).finish(),R.createIndexSignature=e.buildOverload("createIndexSignature").overload({0:function(u,P,L){return D(u,P,L)},1:function(u,P,L,H){return D(P,L,H)}}).bind({0:function(u){var P=u[0],L=u[1],H=u[2],G=u[3];return G===void 0&&(P===void 0||e.every(P,e.isModifier))&&(L===void 0||e.every(L,e.isParameter))&&(H===void 0||!e.isArray(H))},1:function(u){var P=u[0],L=u[1],H=u[2],G=u[3];return(P===void 0||e.every(P,e.isDecorator))&&(L===void 0||e.every(L,e.isModifier))&&(H===void 0||e.isArray(H))&&(G===void 0||e.isTypeNode(G))}}).deprecate({1:v}).finish(),R.updateIndexSignature=e.buildOverload("updateIndexSignature").overload({0:function(u,P,L,H){return C(u,P,L,H)},1:function(u,P,L,H,G){return C(u,L,H,G)}}).bind({0:function(u){var P=u[1],L=u[2],H=u[3],G=u[4];return G===void 0&&(P===void 0||e.every(P,e.isModifier))&&(L===void 0||e.every(L,e.isParameter))&&(H===void 0||!e.isArray(H))},1:function(u){var P=u[1],L=u[2],H=u[3],G=u[4];return(P===void 0||e.every(P,e.isDecorator))&&(L===void 0||e.every(L,e.isModifier))&&(H===void 0||e.isArray(H))&&(G===void 0||e.isTypeNode(G))}}).deprecate({1:v}).finish(),R.createClassStaticBlockDeclaration=e.buildOverload("createClassStaticBlockDeclaration").overload({0:function(u){return T(u)},1:function(u,P,L){return T(L)}}).bind({0:function(u){var P=u[0],L=u[1],H=u[2];return L===void 0&&H===void 0&&(P===void 0||!e.isArray(P))},1:function(u){var P=u[0],L=u[1],H=u[2];return(P===void 0||e.isArray(P))&&(L===void 0||e.isArray(P))&&(H===void 0||e.isBlock(H))}}).deprecate({1:g}).finish(),R.updateClassStaticBlockDeclaration=e.buildOverload("updateClassStaticBlockDeclaration").overload({0:function(u,P){return N(u,P)},1:function(u,P,L,H){return N(u,H)}}).bind({0:function(u){var P=u[1],L=u[2],H=u[3];return L===void 0&&H===void 0&&(P===void 0||!e.isArray(P))},1:function(u){var P=u[1],L=u[2],H=u[3];return(P===void 0||e.isArray(P))&&(L===void 0||e.isArray(P))&&(H===void 0||e.isBlock(H))}}).deprecate({1:g}).finish(),R.createClassExpression=e.buildOverload("createClassExpression").overload({0:function(u,P,L,H,G){return k(u,P,L,H,G)},1:function(u,P,L,H,G,ge){return k(e.concatenate(u,P),L,H,G,ge)}}).bind({0:function(u){var P=u[1],L=u[2],H=u[3],G=u[4],ge=u[5];return ge===void 0&&(P===void 0||!e.isArray(P))&&(L===void 0||e.isArray(L))&&(H===void 0||e.every(H,e.isHeritageClause))&&(G===void 0||e.every(G,e.isClassElement))},1:function(u){var P=u[1],L=u[2],H=u[3],G=u[4],ge=u[5];return(P===void 0||e.isArray(P))&&(L===void 0||!e.isArray(L))&&(H===void 0||e.every(H,e.isTypeParameterDeclaration))&&(G===void 0||e.every(G,e.isHeritageClause))&&(ge===void 0||e.isArray(ge))}}).deprecate({1:v}).finish(),R.updateClassExpression=e.buildOverload("updateClassExpression").overload({0:function(u,P,L,H,G,ge){return me(u,P,L,H,G,ge)},1:function(u,P,L,H,G,ge,pe){return me(u,e.concatenate(P,L),H,G,ge,pe)}}).bind({0:function(u){var P=u[2],L=u[3],H=u[4],G=u[5],ge=u[6];return ge===void 0&&(P===void 0||!e.isArray(P))&&(L===void 0||e.isArray(L))&&(H===void 0||e.every(H,e.isHeritageClause))&&(G===void 0||e.every(G,e.isClassElement))},1:function(u){var P=u[2],L=u[3],H=u[4],G=u[5],ge=u[6];return(P===void 0||e.isArray(P))&&(L===void 0||!e.isArray(L))&&(H===void 0||e.every(H,e.isTypeParameterDeclaration))&&(G===void 0||e.every(G,e.isHeritageClause))&&(ge===void 0||e.isArray(ge))}}).deprecate({1:v}).finish(),R.createFunctionDeclaration=e.buildOverload("createFunctionDeclaration").overload({0:function(u,P,L,H,G,ge,pe){return De(u,P,L,H,G,ge,pe)},1:function(u,P,L,H,G,ge,pe,He){return De(P,L,H,G,ge,pe,He)}}).bind({0:function(u){var P=u[1],L=u[2],H=u[3],G=u[4],ge=u[5],pe=u[6],He=u[7];return He===void 0&&(P===void 0||!e.isArray(P))&&(L===void 0||typeof L=="string"||e.isIdentifier(L))&&(H===void 0||e.isArray(H))&&(G===void 0||e.every(G,e.isParameter))&&(ge===void 0||!e.isArray(ge))&&(pe===void 0||e.isBlock(pe))},1:function(u){var P=u[1],L=u[2],H=u[3],G=u[4],ge=u[5],pe=u[6],He=u[7];return(P===void 0||e.isArray(P))&&(L===void 0||typeof L!="string"&&e.isAsteriskToken(L))&&(H===void 0||!e.isArray(H))&&(G===void 0||e.every(G,e.isTypeParameterDeclaration))&&(ge===void 0||e.isArray(ge))&&(pe===void 0||e.isTypeNode(pe))&&(He===void 0||e.isBlock(He))}}).deprecate({1:v}).finish(),R.updateFunctionDeclaration=e.buildOverload("updateFunctionDeclaration").overload({0:function(u,P,L,H,G,ge,pe,He){return $(u,P,L,H,G,ge,pe,He)},1:function(u,P,L,H,G,ge,pe,He,Je){return $(u,L,H,G,ge,pe,He,Je)}}).bind({0:function(u){var P=u[2],L=u[3],H=u[4],G=u[5],ge=u[6],pe=u[7],He=u[8];return He===void 0&&(P===void 0||!e.isArray(P))&&(L===void 0||e.isIdentifier(L))&&(H===void 0||e.isArray(H))&&(G===void 0||e.every(G,e.isParameter))&&(ge===void 0||!e.isArray(ge))&&(pe===void 0||e.isBlock(pe))},1:function(u){var P=u[2],L=u[3],H=u[4],G=u[5],ge=u[6],pe=u[7],He=u[8];return(P===void 0||e.isArray(P))&&(L===void 0||typeof L!="string"&&e.isAsteriskToken(L))&&(H===void 0||!e.isArray(H))&&(G===void 0||e.every(G,e.isTypeParameterDeclaration))&&(ge===void 0||e.isArray(ge))&&(pe===void 0||e.isTypeNode(pe))&&(He===void 0||e.isBlock(He))}}).deprecate({1:v}).finish(),R.createClassDeclaration=e.buildOverload("createClassDeclaration").overload({0:function(u,P,L,H,G){return B(u,P,L,H,G)},1:function(u,P,L,H,G,ge){return B(e.concatenate(u,P),L,H,G,ge)}}).bind({0:function(u){var P=u[1],L=u[2],H=u[3],G=u[4],ge=u[5];return ge===void 0&&(P===void 0||!e.isArray(P))&&(L===void 0||e.isArray(L))&&(H===void 0||e.every(H,e.isHeritageClause))&&(G===void 0||e.every(G,e.isClassElement))},1:function(){return!0}}).deprecate({1:t}).finish(),R.updateClassDeclaration=e.buildOverload("updateClassDeclaration").overload({0:function(u,P,L,H,G,ge){return Y(u,P,L,H,G,ge)},1:function(u,P,L,H,G,ge,pe){return Y(u,e.concatenate(P,L),H,G,ge,pe)}}).bind({0:function(u){var P=u[2],L=u[3],H=u[4],G=u[5],ge=u[6];return ge===void 0&&(P===void 0||!e.isArray(P))&&(L===void 0||e.isArray(L))&&(H===void 0||e.every(H,e.isHeritageClause))&&(G===void 0||e.every(G,e.isClassElement))},1:function(u){var P=u[2],L=u[3],H=u[4],G=u[5],ge=u[6];return(P===void 0||e.isArray(P))&&(L===void 0||!e.isArray(L))&&(H===void 0||e.every(H,e.isTypeParameterDeclaration))&&(G===void 0||e.every(G,e.isHeritageClause))&&(ge===void 0||e.isArray(ge))}}).deprecate({1:t}).finish(),R.createInterfaceDeclaration=e.buildOverload("createInterfaceDeclaration").overload({0:function(u,P,L,H,G){return X(u,P,L,H,G)},1:function(u,P,L,H,G,ge){return X(P,L,H,G,ge)}}).bind({0:function(u){var P=u[0],L=u[1],H=u[2],G=u[3],ge=u[4],pe=u[5];return pe===void 0&&(P===void 0||e.every(P,e.isModifier))&&(L===void 0||!e.isArray(L))&&(H===void 0||e.isArray(H))&&(G===void 0||e.every(G,e.isHeritageClause))&&(ge===void 0||e.every(ge,e.isTypeElement))},1:function(u){var P=u[0],L=u[1],H=u[2],G=u[3],ge=u[4],pe=u[5];return(P===void 0||e.every(P,e.isDecorator))&&(L===void 0||e.isArray(L))&&(H===void 0||!e.isArray(H))&&(G===void 0||e.every(G,e.isTypeParameterDeclaration))&&(ge===void 0||e.every(ge,e.isHeritageClause))&&(pe===void 0||e.every(pe,e.isTypeElement))}}).deprecate({1:v}).finish(),R.updateInterfaceDeclaration=e.buildOverload("updateInterfaceDeclaration").overload({0:function(u,P,L,H,G,ge){return S(u,P,L,H,G,ge)},1:function(u,P,L,H,G,ge,pe){return S(u,L,H,G,ge,pe)}}).bind({0:function(u){var P=u[1],L=u[2],H=u[3],G=u[4],ge=u[5],pe=u[6];return pe===void 0&&(P===void 0||e.every(P,e.isModifier))&&(L===void 0||!e.isArray(L))&&(H===void 0||e.isArray(H))&&(G===void 0||e.every(G,e.isHeritageClause))&&(ge===void 0||e.every(ge,e.isTypeElement))},1:function(u){var P=u[1],L=u[2],H=u[3],G=u[4],ge=u[5],pe=u[6];return(P===void 0||e.every(P,e.isDecorator))&&(L===void 0||e.isArray(L))&&(H===void 0||!e.isArray(H))&&(G===void 0||e.every(G,e.isTypeParameterDeclaration))&&(ge===void 0||e.every(ge,e.isHeritageClause))&&(pe===void 0||e.every(pe,e.isTypeElement))}}).deprecate({1:v}).finish(),R.createTypeAliasDeclaration=e.buildOverload("createTypeAliasDeclaration").overload({0:function(u,P,L,H){return J(u,P,L,H)},1:function(u,P,L,H,G){return J(P,L,H,G)}}).bind({0:function(u){var P=u[0],L=u[1],H=u[2],G=u[3],ge=u[4];return ge===void 0&&(P===void 0||e.every(P,e.isModifier))&&(L===void 0||!e.isArray(L))&&(H===void 0||e.isArray(H))&&(G===void 0||!e.isArray(G))},1:function(u){var P=u[0],L=u[1],H=u[2],G=u[3],ge=u[4];return(P===void 0||e.every(P,e.isDecorator))&&(L===void 0||e.isArray(L))&&(H===void 0||!e.isArray(H))&&(G===void 0||e.isArray(G))&&(ge===void 0||e.isTypeNode(ge))}}).deprecate({1:v}).finish(),R.updateTypeAliasDeclaration=e.buildOverload("updateTypeAliasDeclaration").overload({0:function(u,P,L,H,G){return te(u,P,L,H,G)},1:function(u,P,L,H,G,ge){return te(u,L,H,G,ge)}}).bind({0:function(u){var P=u[1],L=u[2],H=u[3],G=u[4],ge=u[5];return ge===void 0&&(P===void 0||e.every(P,e.isModifier))&&(L===void 0||!e.isArray(L))&&(H===void 0||e.isArray(H))&&(G===void 0||!e.isArray(G))},1:function(u){var P=u[1],L=u[2],H=u[3],G=u[4],ge=u[5];return(P===void 0||e.every(P,e.isDecorator))&&(L===void 0||e.isArray(L))&&(H===void 0||!e.isArray(H))&&(G===void 0||e.isArray(G))&&(ge===void 0||e.isTypeNode(ge))}}).deprecate({1:v}).finish(),R.createEnumDeclaration=e.buildOverload("createEnumDeclaration").overload({0:function(u,P,L){return j(u,P,L)},1:function(u,P,L,H){return j(P,L,H)}}).bind({0:function(u){var P=u[0],L=u[1],H=u[2],G=u[3];return G===void 0&&(P===void 0||e.every(P,e.isModifier))&&(L===void 0||!e.isArray(L))&&(H===void 0||e.isArray(H))},1:function(u){var P=u[0],L=u[1],H=u[2],G=u[3];return(P===void 0||e.every(P,e.isDecorator))&&(L===void 0||e.isArray(L))&&(H===void 0||!e.isArray(H))&&(G===void 0||e.isArray(G))}}).deprecate({1:v}).finish(),R.updateEnumDeclaration=e.buildOverload("updateEnumDeclaration").overload({0:function(u,P,L,H){return O(u,P,L,H)},1:function(u,P,L,H,G){return O(u,L,H,G)}}).bind({0:function(u){var P=u[1],L=u[2],H=u[3],G=u[4];return G===void 0&&(P===void 0||e.every(P,e.isModifier))&&(L===void 0||!e.isArray(L))&&(H===void 0||e.isArray(H))},1:function(u){var P=u[1],L=u[2],H=u[3],G=u[4];return(P===void 0||e.every(P,e.isDecorator))&&(L===void 0||e.isArray(L))&&(H===void 0||!e.isArray(H))&&(G===void 0||e.isArray(G))}}).deprecate({1:v}).finish(),R.createModuleDeclaration=e.buildOverload("createModuleDeclaration").overload({0:function(u,P,L,H){return I(u,P,L,H)},1:function(u,P,L,H,G){return I(P,L,H,G)}}).bind({0:function(u){var P=u[0],L=u[1],H=u[2],G=u[3],ge=u[4];return ge===void 0&&(P===void 0||e.every(P,e.isModifier))&&L!==void 0&&!e.isArray(L)&&(H===void 0||e.isModuleBody(H))&&(G===void 0||typeof G=="number")},1:function(u){var P=u[0],L=u[1],H=u[2],G=u[3],ge=u[4];return(P===void 0||e.every(P,e.isDecorator))&&(L===void 0||e.isArray(L))&&H!==void 0&&e.isModuleName(H)&&(G===void 0||typeof G=="object")&&(ge===void 0||typeof ge=="number")}}).deprecate({1:v}).finish(),R.updateModuleDeclaration=e.buildOverload("updateModuleDeclaration").overload({0:function(u,P,L,H){return q(u,P,L,H)},1:function(u,P,L,H,G){return q(u,L,H,G)}}).bind({0:function(u){var P=u[1],L=u[2],H=u[3],G=u[4];return G===void 0&&(P===void 0||e.every(P,e.isModifier))&&(L===void 0||!e.isArray(L))&&(H===void 0||e.isModuleBody(H))},1:function(u){var P=u[1],L=u[2],H=u[3],G=u[4];return(P===void 0||e.every(P,e.isDecorator))&&(L===void 0||e.isArray(L))&&H!==void 0&&e.isModuleName(H)&&(G===void 0||e.isModuleBody(G))}}).deprecate({1:v}).finish(),R.createImportEqualsDeclaration=e.buildOverload("createImportEqualsDeclaration").overload({0:function(u,P,L,H){return Q(u,P,L,H)},1:function(u,P,L,H,G){return Q(P,L,H,G)}}).bind({0:function(u){var P=u[0],L=u[1],H=u[2],G=u[3],ge=u[4];return ge===void 0&&(P===void 0||e.every(P,e.isModifier))&&(L===void 0||typeof L=="boolean")&&typeof H!="boolean"&&typeof G!="string"},1:function(u){var P=u[0],L=u[1],H=u[2],G=u[3],ge=u[4];return(P===void 0||e.every(P,e.isDecorator))&&(L===void 0||e.isArray(L))&&(H===void 0||typeof H=="boolean")&&(typeof G=="string"||e.isIdentifier(G))&&ge!==void 0&&e.isModuleReference(ge)}}).deprecate({1:v}).finish(),R.updateImportEqualsDeclaration=e.buildOverload("updateImportEqualsDeclaration").overload({0:function(u,P,L,H,G){return Z(u,P,L,H,G)},1:function(u,P,L,H,G,ge){return Z(u,L,H,G,ge)}}).bind({0:function(u){var P=u[1],L=u[2],H=u[3],G=u[4],ge=u[5];return ge===void 0&&(P===void 0||e.every(P,e.isModifier))&&(L===void 0||typeof L=="boolean")&&typeof H!="boolean"&&typeof G!="string"},1:function(u){var P=u[1],L=u[2],H=u[3],G=u[4],ge=u[5];return(P===void 0||e.every(P,e.isDecorator))&&(L===void 0||e.isArray(L))&&(H===void 0||typeof H=="boolean")&&(typeof G=="string"||e.isIdentifier(G))&&ge!==void 0&&e.isModuleReference(ge)}}).deprecate({1:v}).finish(),R.createImportDeclaration=e.buildOverload("createImportDeclaration").overload({0:function(u,P,L,H){return he(u,P,L,H)},1:function(u,P,L,H,G){return he(P,L,H,G)}}).bind({0:function(u){var P=u[0],L=u[1],H=u[2],G=u[3],ge=u[4];return ge===void 0&&(P===void 0||e.every(P,e.isModifier))&&(L===void 0||!e.isArray(L))&&H!==void 0&&e.isExpression(H)&&(G===void 0||e.isAssertClause(G))},1:function(u){var P=u[0],L=u[1],H=u[2],G=u[3],ge=u[4];return(P===void 0||e.every(P,e.isDecorator))&&(L===void 0||e.isArray(L))&&(H===void 0||e.isImportClause(H))&&G!==void 0&&e.isExpression(G)&&(ge===void 0||e.isAssertClause(ge))}}).deprecate({1:v}).finish(),R.updateImportDeclaration=e.buildOverload("updateImportDeclaration").overload({0:function(u,P,L,H,G){return x(u,P,L,H,G)},1:function(u,P,L,H,G,ge){return x(u,L,H,G,ge)}}).bind({0:function(u){var P=u[1],L=u[2],H=u[3],G=u[4],ge=u[5];return ge===void 0&&(P===void 0||e.every(P,e.isModifier))&&(L===void 0||!e.isArray(L))&&(H===void 0||e.isExpression(H))&&(G===void 0||e.isAssertClause(G))},1:function(u){var P=u[1],L=u[2],H=u[3],G=u[4],ge=u[5];return(P===void 0||e.every(P,e.isDecorator))&&(L===void 0||e.isArray(L))&&(H===void 0||e.isImportClause(H))&&G!==void 0&&e.isExpression(G)&&(ge===void 0||e.isAssertClause(ge))}}).deprecate({1:v}).finish(),R.createExportAssignment=e.buildOverload("createExportAssignment").overload({0:function(u,P,L){return E(u,P,L)},1:function(u,P,L,H){return E(P,L,H)}}).bind({0:function(u){var P=u[0],L=u[1],H=u[2],G=u[3];return G===void 0&&(P===void 0||e.every(P,e.isModifier))&&(L===void 0||typeof L=="boolean")&&typeof H=="object"},1:function(u){var P=u[0],L=u[1],H=u[2],G=u[3];return(P===void 0||e.every(P,e.isDecorator))&&(L===void 0||e.isArray(L))&&(H===void 0||typeof H=="boolean")&&G!==void 0&&e.isExpression(G)}}).deprecate({1:v}).finish(),R.updateExportAssignment=e.buildOverload("updateExportAssignment").overload({0:function(u,P,L){return A(u,P,L)},1:function(u,P,L,H){return A(u,L,H)}}).bind({0:function(u){var P=u[1],L=u[2],H=u[3];return H===void 0&&(P===void 0||e.every(P,e.isModifier))&&L!==void 0&&!e.isArray(L)},1:function(u){var P=u[1],L=u[2],H=u[3];return(P===void 0||e.every(P,e.isDecorator))&&(L===void 0||e.isArray(L))&&H!==void 0&&e.isExpression(H)}}).deprecate({1:v}).finish(),R.createExportDeclaration=e.buildOverload("createExportDeclaration").overload({0:function(u,P,L,H,G){return ne(u,P,L,H,G)},1:function(u,P,L,H,G,ge){return ne(P,L,H,G,ge)}}).bind({0:function(u){var P=u[0],L=u[1],H=u[2],G=u[3],ge=u[4],pe=u[5];return pe===void 0&&(P===void 0||e.every(P,e.isModifier))&&typeof L=="boolean"&&typeof H!="boolean"&&(G===void 0||e.isExpression(G))&&(ge===void 0||e.isAssertClause(ge))},1:function(u){var P=u[0],L=u[1],H=u[2],G=u[3],ge=u[4],pe=u[5];return(P===void 0||e.every(P,e.isDecorator))&&(L===void 0||e.isArray(L))&&typeof H=="boolean"&&(G===void 0||e.isNamedExportBindings(G))&&(ge===void 0||e.isExpression(ge))&&(pe===void 0||e.isAssertClause(pe))}}).deprecate({1:v}).finish(),R.updateExportDeclaration=e.buildOverload("updateExportDeclaration").overload({0:function(u,P,L,H,G,ge){return W(u,P,L,H,G,ge)},1:function(u,P,L,H,G,ge,pe){return W(u,L,H,G,ge,pe)}}).bind({0:function(u){var P=u[1],L=u[2],H=u[3],G=u[4],ge=u[5],pe=u[6];return pe===void 0&&(P===void 0||e.every(P,e.isModifier))&&typeof L=="boolean"&&typeof H!="boolean"&&(G===void 0||e.isExpression(G))&&(ge===void 0||e.isAssertClause(ge))},1:function(u){var P=u[1],L=u[2],H=u[3],G=u[4],ge=u[5],pe=u[6];return(P===void 0||e.every(P,e.isDecorator))&&(L===void 0||e.isArray(L))&&typeof H=="boolean"&&(G===void 0||e.isNamedExportBindings(G))&&(ge===void 0||e.isExpression(ge))&&(pe===void 0||e.isAssertClause(pe))}}).deprecate({1:v}).finish()}var y=e.createNodeFactory;e.createNodeFactory=function(R,re){var U=y(R,re);return F(U),U},F(e.factory)})(fr||(fr={}));var fr;(function(e){typeof console<"u"&&(e.Debug.loggingHost={log:function(t,v){switch(t){case e.LogLevel.Error:return console.error(v);case e.LogLevel.Warning:return console.warn(v);case e.LogLevel.Info:return console.log(v);case e.LogLevel.Verbose:return console.log(v)}}})})(fr||(fr={}))});var HF={};rF(HF,{RunMode:()=>Qm,getChecksumConfig:()=>gS,getLogin:()=>O1,init:()=>GF});module.exports=nF(HF);var vh=(g=>(g[g.Element=0]="Element",g[g.VisibleElement=1]="VisibleElement",g[g.AtPointElement=2]="AtPointElement",g))(vh||{});var S6=require("path");var Qm=(g=>(g.Normal="normal",g.Heal="heal",g.Refactor="refactor",g))(Qm||{});var E1=(U=>(U.Locator="locator",U.GetByRole="getByRole",U.GetByText="getByText",U.GetByLabel="getByLabel",U.GetByPlaceholder="getByPlaceholder",U.GetByAltText="getByAltText",U.GetByTitle="getByTitle",U.GetByTestId="getByTestId",U))(E1||{}),k1=(y=>(y.First="first",y.Last="last",y.Nth="nth",y.Filter="filter",y.Or="or",y))(k1||{});var Qp=T1(require("path")),N1=require("fs");var yh=e=>new Promise(t=>setTimeout(t,e)),cS=async(e,t=1e3,v="action hang guard timed out")=>{let g="guard-timed-out",F=async()=>(await yh(t+1e3),g),y=await Promise.race([e,F()]);if(typeof y=="string"&&y===g)throw new Error(v);return y};function uS(e=5,t="0123456789abcdefghijklmnopqrstuvwxyzABCDEFGHIJKLMNOPQRSTUVWXYZ"){let v="";for(let g=e;g>0;--g)v+=t[Math.floor(Math.random()*t.length)];return v}async function P1(e,t){let v=_S(e,t),{ungzip:g}=lS(),F=await g((0,N1.readFileSync)(v));return JSON.parse(F)}function qv(e){return Qp.join(Qp.dirname(e),"..")}function _S(e,t){return Qp.join(iF(e),`${t}.checksum.esra`)}function iF(e){return Qp.join(dS(e),"esra")}function v6(e,t){return Qp.join(dS(e),"har",t)}function y6(e,t){return Qp.join(dS(e),"trace",`${t}.playwright-trace.zip`)}function dS(e){return Qp.join(e,"test-data")}function tF(){return{uploadAgentHOST:"localhost",uploadAgentPort:3e3}}var A1=async e=>{try{await cS(e,5e3)}catch{}},pS=e=>{let t=/\/\/.*/,v=/\/\*[\s\S]*?\*\//g;return e.replace(t,"").replace(v,"")};async function I1(e,t){Qc("Fetching selection data..");let g=async y=>t.evaluate(async R=>await window.checksum.testRunner.getSelectionDataForSelector(R),y),F=await g(e);if(F||(Qc("Failed, waiting for network idle..."),await A1(t.waitForLoadState("networkidle")),F=await g(e),F)||(Qc("Failed, waiting for element to be visible..."),await A1(t.locator(e).waitFor({state:"visible"})),F=await g(e),F)||(Qc("Failed, will wait 5000ms..."),await yh(5e3),F=await g(e),F))return F}async function w1(e,t,v,g=6e4){return t in e?cS(e[t](...v),g,"Execution timeout"):e}var h6=!1;function D6(e){h6=e}function Qc(...e){h6&&console.log(...e)}function fS(){return Qp.join(__dirname,"..","..","..","checksum")}function O1(e){try{let t=require(`${fS()}/login.ts`).default;return async v=>{await t(v,e)}}catch(t){throw console.warn("Could not find checksum login file. Please set login.ts file in your checksum folder"),t}}var Vv;function b6(){if(Vv)return Vv;let e;try{let t=(0,N1.existsSync)(`${fS()}/checksum.config.tmp.ts`)?"checksum.config.tmp.ts":"checksum.config.ts";e=require(`${fS()}/${t}`).default}catch{console.warn("Could not find checksum config file, will run with defaults"),e=gS()}return e}function gS(e={}){return Vv={...{apiKey:void 0,runMode:"normal",baseURL:void 0,apiURL:void 0,username:void 0,password:void 0,options:{actionsESRAfallback:!0,actionsLLMFallback:!1,newAssertionsEnabled:!0,useMockData:!1,printLogs:!1,writeTraceFile:!1},...tF()},...e},(!Vv.username||!Vv.password)&&console.warn("Username and/or password missing in config file"),Vv}var lm=class{constructor(t,v,g={generateSelectionData:!1}){this.page=t;this.phaseSetter=v;this.options=g;this.page=t,this.phaseSetter=v}addMetadata(t){}async execute(t,v,g){return w1(t,v,g)}async executeWithSelectors(t,v,g,F=void 0,y={}){for(let{selector:R,tag:re}of t){this.phaseSetter({phase:F,payload:{selector:R,...y}});let U=this.page.locator(R);this.log(`Running with selector=${R})`);let d=!1;["check","uncheck"].includes(v)&&re!=="input"&&(d=!0);let m=this.generateSelectionDataForSelector(R);if(await this.execute(U,d?"click":v,g)===!1){this.log("Fallback selector timeout");continue}return m}}async generateSelectionDataForSelector(t){let{generateSelectionData:v}=this.options;if(!v)return{selector:t,generatedLocator:void 0,esraMetadata:void 0};try{let g=await I1(t,this.page);if(!g)throw new Error(`[generateSelectionDataForSelector] Failed to generate selection data for selector ${t}`);return g}catch(g){throw this.log(g.message),g}}log(...t){Qc(...t)}};var F1=require("path"),hh=class extends lm{constructor(){super(...arguments);this.locatorTypeEnumToFieldMap={[0]:"element",[1]:"visibleElement",[2]:"atPointElement"}}init(v){return this.esraData={...this.esraData,minSelectionScore:.5,...v},this}async resolve(v){try{let{method:g,args:F}=v,{checksumId:y}=this.esraData,R=await this.getActionIdToESRAMap();if(!(y in R)){let m=`No ESRA metadata found for id ${y}`;throw new Error(m)}let re=await this.getTestIdsForLocator(R[y]),{elementDataMap:U}=await this.getSelectors(re),d=await this.executeWithSelectors(Object.values(U),g,F,"esra-action");if(d)return[d];throw new Error("Exhausted ESRA selectors")}catch(g){this.log(g.message);return}}async getActionIdToESRAMap(){try{this.actionIdToESRAMap||(this.actionIdToESRAMap=await P1((0,F1.join)((0,F1.dirname)(this.esraData.fileName),".."),this.esraData.testId))}catch(v){return super.log("Could not read ESRA metadata file, ",v),{}}return this.actionIdToESRAMap}async getSelectors(v){let g=[],F={};if(!v)return{selectors:g,elementDataMap:F};for(let y in Object.keys(vh)){let R=v.testIds[this.locatorTypeEnumToFieldMap[y]];if(!R)continue;let re=`[data-checksum-testid="${R}"]`;g.push(re),F[re]={...v.elementData[this.locatorTypeEnumToFieldMap[y]],selector:v.selectors[this.locatorTypeEnumToFieldMap[y]]}}for(let y in Object.keys(vh)){let R=v.selectors[this.locatorTypeEnumToFieldMap[y]];R&&(g.push(R),F[R]={...v.elementData[this.locatorTypeEnumToFieldMap[y]],selector:R})}return this.log("Selectors for ESRA metadata:",g),{selectors:g,elementDataMap:F}}async getTestIdsForLocator(v,g={}){let{cachedSelector:F=void 0,retriesLeft:y=3,retryMaxTimeout:R=3e3,staticMetadata:re}=g;this.phaseSetter({phase:"esra-search"});let U=await this.page.evaluate(async({esraMetadata:d,cachedSelector:m,staticMetadata:le,minSelectionScore:ue})=>await window.checksum.testRunner.getMatchingElementSelectionData(d,{minSelectionScore:ue,cachedSelector:m,staticMetadata:le}),{esraMetadata:v,cachedSelector:F,staticMetadata:re,minSelectionScore:this.esraData.minSelectionScore});if(!U){if(y>0)return this.log("[getTestIdsForLocator] no match found, waiting and retrying..."),await yh(R/y),this.getTestIdsForLocator(v,{...g,retriesLeft:y-1});this.log("[getTestIdsForLocator] failed to locate")}return U}toString(){return`ESRA Fallback (checksumId: ${this.esraData.checksumId})`}};var Dh=class extends lm{init(){return this}async resolve(t){try{let{locator:v,method:g,args:F}=t;if(!["check","uncheck"].includes(g))return;this.phaseSetter({phase:"force"});let y=!1;for(let re of Array.from(F))if(typeof re=="object"){re.force=!0,y=!0;break}if(y||(F=Array.from(F),F.push({force:!0})),await this.execute(v,g,F)!==!1)return[{selector:v._selector,generatedLocator:void 0,esraMetadata:void 0}];this.log("Locator timed out, ")}catch(v){this.log("initiateFallbackSequence exception, ",v);return}}toString(){return"Force Fallback"}};var qf=class extends lm{constructor(){super(...arguments);this.config={llm:{persistChecksumIds:!1}};this.runningChecksumIdIndex=[0];this.steps=[];this.selectionData=[];this.finish=!1;this.actionsCounter=1;this.mockServer=!1}init(v){let{goal:g,apiKey:F,apiUrl:y}=v;return qf.goal=g,qf.apiKey=F,y&&(qf.API_BASE_URL=y),this}async resolve(){try{if(await this.initSession(),!await this.iterate()){this.log("[LLMFallback] LLMFallback failed");return}return this.selectionData}catch(v){this.log("[LLMFallback] Error resolving",v);return}}async iterate(){let v=!1,g=qf.CLIENT_MAX_ITERATIONS;do{let{reducedHTML:F,flashingHTML:y,elementsForNodeInterpretation:R}=await this.page.evaluate(async([U])=>window.checksum.testGenerator.reduceHTML({overrideInteractableElementsSelectors:U}),[[void 0]]),re=await this.getNextAction({reducedHTML:F,flashingHTML:y,elementsForNodeInterpretation:R,hasPreviousActionFailed:v});if(re.thought==="finish")return this.log("[LLMFallback] Received finish step"),this.steps.length>0;if(["failed","fail"].includes(re.thought))return this.log("[LLMFallback] Received failed signal, will quit"),!1;re={...re,...await this.getPlaywrightLocatorForChecksumId(re.action.checksumid)};try{let U=await this.executeWithSelectors([{...re,tag:null}],re.action.type,["fill","navigate"].includes(re.action.type)?[re.action.value]:[],"llm-action",{thought:re.thought});if(U)v=!1,this.selectionData.push({...U,method:{name:re.action.type,args:["fill","navigate"].includes(re.action.type)?[re.action.value]:[]},comment:re.thought});else throw new Error("Action failed")}catch(U){this.log("[LLMFallback] Error while executing selector",U.message),v=!0;continue}if(this.steps.push(re),--g<=0){this.log("[LLMFallback] Maximum repeatition reached");break}}while(!0);return!1}async getNextAction({reducedHTML:v,flashingHTML:g,hasPreviousActionFailed:F,elementsForNodeInterpretation:y}){let{apiKey:R}=qf;if(this.mockServer)return this.finish?{thought:"finish"}:(--this.actionsCounter===0&&(this.finish=!0),{thought:"mock-thought",action:{type:"click",checksumid:"10"}});let re={reduction:{reducedHTML:v,flashingHTML:g,elementsForNodeInterpretation:y},currentURL:this.page.url()};try{let d=await(await fetch(`${qf.API_BASE_URL}/iterate`,{method:"POST",headers:{"Content-Type":"application/json",ChecksumAppCode:qf.apiKey},body:JSON.stringify({appName:R,sessionId:this.sessionId,iterationData:re,hasPreviousActionFailed:F})})).json();return this.log("[LLMFallback] Received next action",d),d}catch(U){throw this.log("[LLMFallback] Error calling iterate",U),U}}async initSession(){let{apiKey:v,goal:g,thoughts:F}=qf;if(this.log("[LLMFallback] Calling init session...",{appName:v,goal:g,thoughts:F}),this.mockServer){this.sessionId="mock-session-id";return}let y={storyTitle:g,thoughtsAndActions:{previous:F.slice(0,Math.max(F.length-1,0)).map(R=>({thought:R})),failing:{thought:F[F.length-1]},next:[]}};this.phaseSetter({phase:"llm-prompt",payload:{thought:y.thoughtsAndActions.failing.thought}});try{let R=await fetch(`${qf.API_BASE_URL}/init`,{method:"POST",headers:{"Content-Type":"application/json",ChecksumAppCode:qf.apiKey},body:JSON.stringify({appName:v,data:y})});this.sessionId=await R.text(),this.log("[LLMFallback] Session ID",this.sessionId)}catch(R){throw this.log("[LLMFallback] Error calling init session",R),R}}addMetadata(v){qf.thoughts.push(v.thought)}async getPlaywrightLocatorForChecksumId(v){return!v||isNaN(Number(v))?(this.log(`[getPlaywrightSelectorForChecksumId] Detected invalid checksum id : ${v},,,`),{selector:v}):(!this.config.llm.persistChecksumIds&&this.runningChecksumIdIndex.length>1&&Number(v)<this.runningChecksumIdIndex[this.runningChecksumIdIndex.length-2]&&this.log(`[getPlaywrightSelectorForChecksumId] Detected invalid checksum id, possibly from previous prompt: ${v},
|
|
270
|
-
current running checksum id index: ${this.runningChecksumIdIndex[this.runningChecksumIdIndex.length-1]}`),await this.page.evaluate(async F=>window.checksum.testGenerator.getSelectorForChecksumId(F),v))}getFailedThought(){return qf.thoughts[qf.thoughts.length-1]}toString(){return`LLM Fallback ${this.getFailedThought()}`}},Xp=qf;Xp.API_BASE_URL="http://localhost:3000/client-api/runtime/ai-fallback",Xp.CLIENT_MAX_ITERATIONS=10,Xp.thoughts=[];var C6=T1(require("path")),x6=require("fs"),aF="checksum-playwright-runtime.js",oF=__dirname+"/checksumlib.js";var Cg=class{constructor(t,v="normal",g,F,y,R,re){this.page=t;this.runMode=v;this.testIdSelector=g;this.codeMirror=F;this.options=y;this.apiKey=R;this.apiURL=re;this.locatorTypeEnumToFieldMap={[0]:"element",[1]:"visibleElement",[2]:"atPointElement"};this.minSelectionScore=.5;this.phasePayload=void 0;this.locatorStack=[];this.fallbacks=[];this.checksumStepStack=[];this.phaseMap={};this.setPhase=t=>{let{phase:v,payload:g,clear:F}=t;F&&(this.phase=void 0,this.phasePayload=void 0),v&&(this.phase=v),g&&(this.phasePayload=g)};this.registerPageEvents(),this.resetFallbacks(),this.proxy=new Proxy(this,{get:function(d,m){return d.getPageMethod(m)}}),D6(y.printLogs)}async prepareAPIMock(){let t={GET:0,POST:0,PUT:0,DELETE:0},v=C6.join(v6(qv(this.testInfo.file),this.checksumTestId),"test.har");if(!(0,x6.existsSync)(v)){Qc(`Could not find har file ${v} for test`);return}await this.page.routeFromHAR(v,{url:"*/**",notFound:"fallback",update:!1});let g=this.page._routes[0].handler;await this.page.route("**/*",F=>{let y=F.request().headers(),R=F.request().method();y["Checksum-Id"]=(++t[R]).toString(),F.request()._applyFallbackOverrides({headers:y}),g(F)})}registerPageEvents(){this.page.on("framenavigated",async t=>{t===this.page.mainFrame()&&(this.navigationPromise=new Promise((v,g)=>this.loadScript().then(v).catch(g)))}),this.page.context().tracing.start({screenshots:!0,snapshots:!0})}getPageMethod(t){return this.phase=void 0,typeof this[t]=="function"?this[t].bind(this):!Object.values(E1).includes(t)||!this.testInfo?this.page[t]:(this.locatorStack.length===0&&(this.pageInitialCallInTestFile=this.getFirstStackTraceFromTestFile()),this.pushToLocatorStack([{type:t,base:this.page,line:this.pageInitialCallInTestFile.line}]),function(g,F){try{return this.executeLocator(g,F)}catch(y){throw this.popLocatorChain(),y}}.bind(this))}static async init(t,v,{runMode:g="normal",testIdSelector:F=void 0,apiKey:y,apiURL:R,options:re={}}){return new Cg(t,g,F,v,{
|
|
269
|
+
`)}})},M.prototype.getDefaultCompilationSettings=function(){return this.forwardJSONCall("getDefaultCompilationSettings()",function(){return e.getDefaultCompilerOptions()})},M.prototype.discoverTypings=function(f){var D=this,C=e.createGetCanonicalFileName(!1);return this.forwardJSONCall("discoverTypings()",function(){var T=JSON.parse(f);return D.safeList===void 0&&(D.safeList=e.JsTyping.loadSafeList(D.host,e.toPath(T.safeListPath,T.safeListPath,C))),e.JsTyping.discoverTypings(D.host,function(N){return D.logger.log(N)},T.fileNames,e.toPath(T.projectRootPath,T.projectRootPath,C),D.safeList,T.packageNameToTypingLocation,T.typeAcquisition,T.unresolvedImports,T.typesRegistry,e.emptyOptions)})},M}(U),ce=function(){function w(){this._shims=[]}return w.prototype.getServicesVersion=function(){return e.servicesVersion},w.prototype.createLanguageServiceShim=function(M){try{this.documentRegistry===void 0&&(this.documentRegistry=e.createDocumentRegistry(M.useCaseSensitiveFileNames&&M.useCaseSensitiveFileNames(),M.getCurrentDirectory()));var f=new g(M),D=e.createLanguageService(f,this.documentRegistry,!1);return new le(this,M,D)}catch(C){throw t(M,C),C}},w.prototype.createClassifierShim=function(M){try{return new oe(this,M)}catch(f){throw t(M,f),f}},w.prototype.createCoreServicesShim=function(M){try{var f=new F(M);return new se(this,M,f)}catch(D){throw t(M,D),D}},w.prototype.close=function(){e.clear(this._shims),this.documentRegistry=void 0},w.prototype.registerShim=function(M){this._shims.push(M)},w.prototype.unregisterShim=function(M){for(var f=0;f<this._shims.length;f++)if(this._shims[f]===M){delete this._shims[f];return}throw new Error("Invalid operation")},w}();e.TypeScriptServicesFactory=ce})(fr||(fr={}));(function(){if(typeof globalThis!="object")try{Object.defineProperty(Object.prototype,"__magic__",{get:function(){return this},configurable:!0}),__magic__.globalThis=__magic__,typeof globalThis>"u"&&(window.globalThis=window),delete Object.prototype.__magic__}catch{window.globalThis=window}})();(typeof process>"u"||process.browser)&&(globalThis.TypeScript=globalThis.TypeScript||{},globalThis.TypeScript.Services=globalThis.TypeScript.Services||{},globalThis.TypeScript.Services.TypeScriptServicesFactory=fr.TypeScriptServicesFactory,globalThis.toolsVersion=fr.versionMajorMinor);typeof Eh<"u"&&Eh.exports&&(Eh.exports=fr);var fr;(function(e){function t(F,y,R,re){if(Object.defineProperty(oe,"name",Li(Li({},Object.getOwnPropertyDescriptor(oe,"name")),{value:F})),re)for(var U=0,d=Object.keys(re);U<d.length;U++){var m=d[U],le=+m;!isNaN(le)&&e.hasProperty(y,"".concat(le))&&(y[le]=e.Debug.deprecate(y[le],Li(Li({},re[le]),{name:F})))}var ue=v(y,R);return oe;function oe(){for(var se=[],ce=0;ce<arguments.length;ce++)se[ce]=arguments[ce];var w=ue(se),M=w!==void 0?y[w]:void 0;if(typeof M=="function")return M.apply(void 0,se);throw new TypeError("Invalid arguments")}}e.createOverload=t;function v(F,y){return function(R){for(var re=0;e.hasProperty(F,"".concat(re))&&e.hasProperty(y,"".concat(re));re++){var U=y[re];if(U(R))return re}}}function g(F){return{overload:function(y){return{bind:function(R){return{finish:function(){return t(F,y,R)},deprecate:function(re){return{finish:function(){return t(F,y,R,re)}}}}}}}}}e.buildOverload=g})(fr||(fr={}));var fr;(function(e){var t={since:"4.0",warnAfter:"4.1",message:"Use the appropriate method on 'ts.factory' or the 'factory' supplied by your transformation context instead."};e.createNodeArray=e.Debug.deprecate(e.factory.createNodeArray,t),e.createNumericLiteral=e.Debug.deprecate(e.factory.createNumericLiteral,t),e.createBigIntLiteral=e.Debug.deprecate(e.factory.createBigIntLiteral,t),e.createStringLiteral=e.Debug.deprecate(e.factory.createStringLiteral,t),e.createStringLiteralFromNode=e.Debug.deprecate(e.factory.createStringLiteralFromNode,t),e.createRegularExpressionLiteral=e.Debug.deprecate(e.factory.createRegularExpressionLiteral,t),e.createLoopVariable=e.Debug.deprecate(e.factory.createLoopVariable,t),e.createUniqueName=e.Debug.deprecate(e.factory.createUniqueName,t),e.createPrivateIdentifier=e.Debug.deprecate(e.factory.createPrivateIdentifier,t),e.createSuper=e.Debug.deprecate(e.factory.createSuper,t),e.createThis=e.Debug.deprecate(e.factory.createThis,t),e.createNull=e.Debug.deprecate(e.factory.createNull,t),e.createTrue=e.Debug.deprecate(e.factory.createTrue,t),e.createFalse=e.Debug.deprecate(e.factory.createFalse,t),e.createModifier=e.Debug.deprecate(e.factory.createModifier,t),e.createModifiersFromModifierFlags=e.Debug.deprecate(e.factory.createModifiersFromModifierFlags,t),e.createQualifiedName=e.Debug.deprecate(e.factory.createQualifiedName,t),e.updateQualifiedName=e.Debug.deprecate(e.factory.updateQualifiedName,t),e.createComputedPropertyName=e.Debug.deprecate(e.factory.createComputedPropertyName,t),e.updateComputedPropertyName=e.Debug.deprecate(e.factory.updateComputedPropertyName,t),e.createTypeParameterDeclaration=e.Debug.deprecate(e.factory.createTypeParameterDeclaration,t),e.updateTypeParameterDeclaration=e.Debug.deprecate(e.factory.updateTypeParameterDeclaration,t),e.createParameter=e.Debug.deprecate(e.factory.createParameterDeclaration,t),e.updateParameter=e.Debug.deprecate(e.factory.updateParameterDeclaration,t),e.createDecorator=e.Debug.deprecate(e.factory.createDecorator,t),e.updateDecorator=e.Debug.deprecate(e.factory.updateDecorator,t),e.createProperty=e.Debug.deprecate(e.factory.createPropertyDeclaration,t),e.updateProperty=e.Debug.deprecate(e.factory.updatePropertyDeclaration,t),e.createMethod=e.Debug.deprecate(e.factory.createMethodDeclaration,t),e.updateMethod=e.Debug.deprecate(e.factory.updateMethodDeclaration,t),e.createConstructor=e.Debug.deprecate(e.factory.createConstructorDeclaration,t),e.updateConstructor=e.Debug.deprecate(e.factory.updateConstructorDeclaration,t),e.createGetAccessor=e.Debug.deprecate(e.factory.createGetAccessorDeclaration,t),e.updateGetAccessor=e.Debug.deprecate(e.factory.updateGetAccessorDeclaration,t),e.createSetAccessor=e.Debug.deprecate(e.factory.createSetAccessorDeclaration,t),e.updateSetAccessor=e.Debug.deprecate(e.factory.updateSetAccessorDeclaration,t),e.createCallSignature=e.Debug.deprecate(e.factory.createCallSignature,t),e.updateCallSignature=e.Debug.deprecate(e.factory.updateCallSignature,t),e.createConstructSignature=e.Debug.deprecate(e.factory.createConstructSignature,t),e.updateConstructSignature=e.Debug.deprecate(e.factory.updateConstructSignature,t),e.updateIndexSignature=e.Debug.deprecate(e.factory.updateIndexSignature,t),e.createKeywordTypeNode=e.Debug.deprecate(e.factory.createKeywordTypeNode,t),e.createTypePredicateNodeWithModifier=e.Debug.deprecate(e.factory.createTypePredicateNode,t),e.updateTypePredicateNodeWithModifier=e.Debug.deprecate(e.factory.updateTypePredicateNode,t),e.createTypeReferenceNode=e.Debug.deprecate(e.factory.createTypeReferenceNode,t),e.updateTypeReferenceNode=e.Debug.deprecate(e.factory.updateTypeReferenceNode,t),e.createFunctionTypeNode=e.Debug.deprecate(e.factory.createFunctionTypeNode,t),e.updateFunctionTypeNode=e.Debug.deprecate(e.factory.updateFunctionTypeNode,t),e.createConstructorTypeNode=e.Debug.deprecate(function(v,g,F){return e.factory.createConstructorTypeNode(void 0,v,g,F)},t),e.updateConstructorTypeNode=e.Debug.deprecate(function(v,g,F,y){return e.factory.updateConstructorTypeNode(v,v.modifiers,g,F,y)},t),e.createTypeQueryNode=e.Debug.deprecate(e.factory.createTypeQueryNode,t),e.updateTypeQueryNode=e.Debug.deprecate(e.factory.updateTypeQueryNode,t),e.createTypeLiteralNode=e.Debug.deprecate(e.factory.createTypeLiteralNode,t),e.updateTypeLiteralNode=e.Debug.deprecate(e.factory.updateTypeLiteralNode,t),e.createArrayTypeNode=e.Debug.deprecate(e.factory.createArrayTypeNode,t),e.updateArrayTypeNode=e.Debug.deprecate(e.factory.updateArrayTypeNode,t),e.createTupleTypeNode=e.Debug.deprecate(e.factory.createTupleTypeNode,t),e.updateTupleTypeNode=e.Debug.deprecate(e.factory.updateTupleTypeNode,t),e.createOptionalTypeNode=e.Debug.deprecate(e.factory.createOptionalTypeNode,t),e.updateOptionalTypeNode=e.Debug.deprecate(e.factory.updateOptionalTypeNode,t),e.createRestTypeNode=e.Debug.deprecate(e.factory.createRestTypeNode,t),e.updateRestTypeNode=e.Debug.deprecate(e.factory.updateRestTypeNode,t),e.createUnionTypeNode=e.Debug.deprecate(e.factory.createUnionTypeNode,t),e.updateUnionTypeNode=e.Debug.deprecate(e.factory.updateUnionTypeNode,t),e.createIntersectionTypeNode=e.Debug.deprecate(e.factory.createIntersectionTypeNode,t),e.updateIntersectionTypeNode=e.Debug.deprecate(e.factory.updateIntersectionTypeNode,t),e.createConditionalTypeNode=e.Debug.deprecate(e.factory.createConditionalTypeNode,t),e.updateConditionalTypeNode=e.Debug.deprecate(e.factory.updateConditionalTypeNode,t),e.createInferTypeNode=e.Debug.deprecate(e.factory.createInferTypeNode,t),e.updateInferTypeNode=e.Debug.deprecate(e.factory.updateInferTypeNode,t),e.createImportTypeNode=e.Debug.deprecate(e.factory.createImportTypeNode,t),e.updateImportTypeNode=e.Debug.deprecate(e.factory.updateImportTypeNode,t),e.createParenthesizedType=e.Debug.deprecate(e.factory.createParenthesizedType,t),e.updateParenthesizedType=e.Debug.deprecate(e.factory.updateParenthesizedType,t),e.createThisTypeNode=e.Debug.deprecate(e.factory.createThisTypeNode,t),e.updateTypeOperatorNode=e.Debug.deprecate(e.factory.updateTypeOperatorNode,t),e.createIndexedAccessTypeNode=e.Debug.deprecate(e.factory.createIndexedAccessTypeNode,t),e.updateIndexedAccessTypeNode=e.Debug.deprecate(e.factory.updateIndexedAccessTypeNode,t),e.createMappedTypeNode=e.Debug.deprecate(e.factory.createMappedTypeNode,t),e.updateMappedTypeNode=e.Debug.deprecate(e.factory.updateMappedTypeNode,t),e.createLiteralTypeNode=e.Debug.deprecate(e.factory.createLiteralTypeNode,t),e.updateLiteralTypeNode=e.Debug.deprecate(e.factory.updateLiteralTypeNode,t),e.createObjectBindingPattern=e.Debug.deprecate(e.factory.createObjectBindingPattern,t),e.updateObjectBindingPattern=e.Debug.deprecate(e.factory.updateObjectBindingPattern,t),e.createArrayBindingPattern=e.Debug.deprecate(e.factory.createArrayBindingPattern,t),e.updateArrayBindingPattern=e.Debug.deprecate(e.factory.updateArrayBindingPattern,t),e.createBindingElement=e.Debug.deprecate(e.factory.createBindingElement,t),e.updateBindingElement=e.Debug.deprecate(e.factory.updateBindingElement,t),e.createArrayLiteral=e.Debug.deprecate(e.factory.createArrayLiteralExpression,t),e.updateArrayLiteral=e.Debug.deprecate(e.factory.updateArrayLiteralExpression,t),e.createObjectLiteral=e.Debug.deprecate(e.factory.createObjectLiteralExpression,t),e.updateObjectLiteral=e.Debug.deprecate(e.factory.updateObjectLiteralExpression,t),e.createPropertyAccess=e.Debug.deprecate(e.factory.createPropertyAccessExpression,t),e.updatePropertyAccess=e.Debug.deprecate(e.factory.updatePropertyAccessExpression,t),e.createPropertyAccessChain=e.Debug.deprecate(e.factory.createPropertyAccessChain,t),e.updatePropertyAccessChain=e.Debug.deprecate(e.factory.updatePropertyAccessChain,t),e.createElementAccess=e.Debug.deprecate(e.factory.createElementAccessExpression,t),e.updateElementAccess=e.Debug.deprecate(e.factory.updateElementAccessExpression,t),e.createElementAccessChain=e.Debug.deprecate(e.factory.createElementAccessChain,t),e.updateElementAccessChain=e.Debug.deprecate(e.factory.updateElementAccessChain,t),e.createCall=e.Debug.deprecate(e.factory.createCallExpression,t),e.updateCall=e.Debug.deprecate(e.factory.updateCallExpression,t),e.createCallChain=e.Debug.deprecate(e.factory.createCallChain,t),e.updateCallChain=e.Debug.deprecate(e.factory.updateCallChain,t),e.createNew=e.Debug.deprecate(e.factory.createNewExpression,t),e.updateNew=e.Debug.deprecate(e.factory.updateNewExpression,t),e.createTypeAssertion=e.Debug.deprecate(e.factory.createTypeAssertion,t),e.updateTypeAssertion=e.Debug.deprecate(e.factory.updateTypeAssertion,t),e.createParen=e.Debug.deprecate(e.factory.createParenthesizedExpression,t),e.updateParen=e.Debug.deprecate(e.factory.updateParenthesizedExpression,t),e.createFunctionExpression=e.Debug.deprecate(e.factory.createFunctionExpression,t),e.updateFunctionExpression=e.Debug.deprecate(e.factory.updateFunctionExpression,t),e.createDelete=e.Debug.deprecate(e.factory.createDeleteExpression,t),e.updateDelete=e.Debug.deprecate(e.factory.updateDeleteExpression,t),e.createTypeOf=e.Debug.deprecate(e.factory.createTypeOfExpression,t),e.updateTypeOf=e.Debug.deprecate(e.factory.updateTypeOfExpression,t),e.createVoid=e.Debug.deprecate(e.factory.createVoidExpression,t),e.updateVoid=e.Debug.deprecate(e.factory.updateVoidExpression,t),e.createAwait=e.Debug.deprecate(e.factory.createAwaitExpression,t),e.updateAwait=e.Debug.deprecate(e.factory.updateAwaitExpression,t),e.createPrefix=e.Debug.deprecate(e.factory.createPrefixUnaryExpression,t),e.updatePrefix=e.Debug.deprecate(e.factory.updatePrefixUnaryExpression,t),e.createPostfix=e.Debug.deprecate(e.factory.createPostfixUnaryExpression,t),e.updatePostfix=e.Debug.deprecate(e.factory.updatePostfixUnaryExpression,t),e.createBinary=e.Debug.deprecate(e.factory.createBinaryExpression,t),e.updateConditional=e.Debug.deprecate(e.factory.updateConditionalExpression,t),e.createTemplateExpression=e.Debug.deprecate(e.factory.createTemplateExpression,t),e.updateTemplateExpression=e.Debug.deprecate(e.factory.updateTemplateExpression,t),e.createTemplateHead=e.Debug.deprecate(e.factory.createTemplateHead,t),e.createTemplateMiddle=e.Debug.deprecate(e.factory.createTemplateMiddle,t),e.createTemplateTail=e.Debug.deprecate(e.factory.createTemplateTail,t),e.createNoSubstitutionTemplateLiteral=e.Debug.deprecate(e.factory.createNoSubstitutionTemplateLiteral,t),e.updateYield=e.Debug.deprecate(e.factory.updateYieldExpression,t),e.createSpread=e.Debug.deprecate(e.factory.createSpreadElement,t),e.updateSpread=e.Debug.deprecate(e.factory.updateSpreadElement,t),e.createOmittedExpression=e.Debug.deprecate(e.factory.createOmittedExpression,t),e.createAsExpression=e.Debug.deprecate(e.factory.createAsExpression,t),e.updateAsExpression=e.Debug.deprecate(e.factory.updateAsExpression,t),e.createNonNullExpression=e.Debug.deprecate(e.factory.createNonNullExpression,t),e.updateNonNullExpression=e.Debug.deprecate(e.factory.updateNonNullExpression,t),e.createNonNullChain=e.Debug.deprecate(e.factory.createNonNullChain,t),e.updateNonNullChain=e.Debug.deprecate(e.factory.updateNonNullChain,t),e.createMetaProperty=e.Debug.deprecate(e.factory.createMetaProperty,t),e.updateMetaProperty=e.Debug.deprecate(e.factory.updateMetaProperty,t),e.createTemplateSpan=e.Debug.deprecate(e.factory.createTemplateSpan,t),e.updateTemplateSpan=e.Debug.deprecate(e.factory.updateTemplateSpan,t),e.createSemicolonClassElement=e.Debug.deprecate(e.factory.createSemicolonClassElement,t),e.createBlock=e.Debug.deprecate(e.factory.createBlock,t),e.updateBlock=e.Debug.deprecate(e.factory.updateBlock,t),e.createVariableStatement=e.Debug.deprecate(e.factory.createVariableStatement,t),e.updateVariableStatement=e.Debug.deprecate(e.factory.updateVariableStatement,t),e.createEmptyStatement=e.Debug.deprecate(e.factory.createEmptyStatement,t),e.createExpressionStatement=e.Debug.deprecate(e.factory.createExpressionStatement,t),e.updateExpressionStatement=e.Debug.deprecate(e.factory.updateExpressionStatement,t),e.createStatement=e.Debug.deprecate(e.factory.createExpressionStatement,t),e.updateStatement=e.Debug.deprecate(e.factory.updateExpressionStatement,t),e.createIf=e.Debug.deprecate(e.factory.createIfStatement,t),e.updateIf=e.Debug.deprecate(e.factory.updateIfStatement,t),e.createDo=e.Debug.deprecate(e.factory.createDoStatement,t),e.updateDo=e.Debug.deprecate(e.factory.updateDoStatement,t),e.createWhile=e.Debug.deprecate(e.factory.createWhileStatement,t),e.updateWhile=e.Debug.deprecate(e.factory.updateWhileStatement,t),e.createFor=e.Debug.deprecate(e.factory.createForStatement,t),e.updateFor=e.Debug.deprecate(e.factory.updateForStatement,t),e.createForIn=e.Debug.deprecate(e.factory.createForInStatement,t),e.updateForIn=e.Debug.deprecate(e.factory.updateForInStatement,t),e.createForOf=e.Debug.deprecate(e.factory.createForOfStatement,t),e.updateForOf=e.Debug.deprecate(e.factory.updateForOfStatement,t),e.createContinue=e.Debug.deprecate(e.factory.createContinueStatement,t),e.updateContinue=e.Debug.deprecate(e.factory.updateContinueStatement,t),e.createBreak=e.Debug.deprecate(e.factory.createBreakStatement,t),e.updateBreak=e.Debug.deprecate(e.factory.updateBreakStatement,t),e.createReturn=e.Debug.deprecate(e.factory.createReturnStatement,t),e.updateReturn=e.Debug.deprecate(e.factory.updateReturnStatement,t),e.createWith=e.Debug.deprecate(e.factory.createWithStatement,t),e.updateWith=e.Debug.deprecate(e.factory.updateWithStatement,t),e.createSwitch=e.Debug.deprecate(e.factory.createSwitchStatement,t),e.updateSwitch=e.Debug.deprecate(e.factory.updateSwitchStatement,t),e.createLabel=e.Debug.deprecate(e.factory.createLabeledStatement,t),e.updateLabel=e.Debug.deprecate(e.factory.updateLabeledStatement,t),e.createThrow=e.Debug.deprecate(e.factory.createThrowStatement,t),e.updateThrow=e.Debug.deprecate(e.factory.updateThrowStatement,t),e.createTry=e.Debug.deprecate(e.factory.createTryStatement,t),e.updateTry=e.Debug.deprecate(e.factory.updateTryStatement,t),e.createDebuggerStatement=e.Debug.deprecate(e.factory.createDebuggerStatement,t),e.createVariableDeclarationList=e.Debug.deprecate(e.factory.createVariableDeclarationList,t),e.updateVariableDeclarationList=e.Debug.deprecate(e.factory.updateVariableDeclarationList,t),e.createFunctionDeclaration=e.Debug.deprecate(e.factory.createFunctionDeclaration,t),e.updateFunctionDeclaration=e.Debug.deprecate(e.factory.updateFunctionDeclaration,t),e.createClassDeclaration=e.Debug.deprecate(e.factory.createClassDeclaration,t),e.updateClassDeclaration=e.Debug.deprecate(e.factory.updateClassDeclaration,t),e.createInterfaceDeclaration=e.Debug.deprecate(e.factory.createInterfaceDeclaration,t),e.updateInterfaceDeclaration=e.Debug.deprecate(e.factory.updateInterfaceDeclaration,t),e.createTypeAliasDeclaration=e.Debug.deprecate(e.factory.createTypeAliasDeclaration,t),e.updateTypeAliasDeclaration=e.Debug.deprecate(e.factory.updateTypeAliasDeclaration,t),e.createEnumDeclaration=e.Debug.deprecate(e.factory.createEnumDeclaration,t),e.updateEnumDeclaration=e.Debug.deprecate(e.factory.updateEnumDeclaration,t),e.createModuleDeclaration=e.Debug.deprecate(e.factory.createModuleDeclaration,t),e.updateModuleDeclaration=e.Debug.deprecate(e.factory.updateModuleDeclaration,t),e.createModuleBlock=e.Debug.deprecate(e.factory.createModuleBlock,t),e.updateModuleBlock=e.Debug.deprecate(e.factory.updateModuleBlock,t),e.createCaseBlock=e.Debug.deprecate(e.factory.createCaseBlock,t),e.updateCaseBlock=e.Debug.deprecate(e.factory.updateCaseBlock,t),e.createNamespaceExportDeclaration=e.Debug.deprecate(e.factory.createNamespaceExportDeclaration,t),e.updateNamespaceExportDeclaration=e.Debug.deprecate(e.factory.updateNamespaceExportDeclaration,t),e.createImportEqualsDeclaration=e.Debug.deprecate(e.factory.createImportEqualsDeclaration,t),e.updateImportEqualsDeclaration=e.Debug.deprecate(e.factory.updateImportEqualsDeclaration,t),e.createImportDeclaration=e.Debug.deprecate(e.factory.createImportDeclaration,t),e.updateImportDeclaration=e.Debug.deprecate(e.factory.updateImportDeclaration,t),e.createNamespaceImport=e.Debug.deprecate(e.factory.createNamespaceImport,t),e.updateNamespaceImport=e.Debug.deprecate(e.factory.updateNamespaceImport,t),e.createNamedImports=e.Debug.deprecate(e.factory.createNamedImports,t),e.updateNamedImports=e.Debug.deprecate(e.factory.updateNamedImports,t),e.createImportSpecifier=e.Debug.deprecate(e.factory.createImportSpecifier,t),e.updateImportSpecifier=e.Debug.deprecate(e.factory.updateImportSpecifier,t),e.createExportAssignment=e.Debug.deprecate(e.factory.createExportAssignment,t),e.updateExportAssignment=e.Debug.deprecate(e.factory.updateExportAssignment,t),e.createNamedExports=e.Debug.deprecate(e.factory.createNamedExports,t),e.updateNamedExports=e.Debug.deprecate(e.factory.updateNamedExports,t),e.createExportSpecifier=e.Debug.deprecate(e.factory.createExportSpecifier,t),e.updateExportSpecifier=e.Debug.deprecate(e.factory.updateExportSpecifier,t),e.createExternalModuleReference=e.Debug.deprecate(e.factory.createExternalModuleReference,t),e.updateExternalModuleReference=e.Debug.deprecate(e.factory.updateExternalModuleReference,t),e.createJSDocTypeExpression=e.Debug.deprecate(e.factory.createJSDocTypeExpression,t),e.createJSDocTypeTag=e.Debug.deprecate(e.factory.createJSDocTypeTag,t),e.createJSDocReturnTag=e.Debug.deprecate(e.factory.createJSDocReturnTag,t),e.createJSDocThisTag=e.Debug.deprecate(e.factory.createJSDocThisTag,t),e.createJSDocComment=e.Debug.deprecate(e.factory.createJSDocComment,t),e.createJSDocParameterTag=e.Debug.deprecate(e.factory.createJSDocParameterTag,t),e.createJSDocClassTag=e.Debug.deprecate(e.factory.createJSDocClassTag,t),e.createJSDocAugmentsTag=e.Debug.deprecate(e.factory.createJSDocAugmentsTag,t),e.createJSDocEnumTag=e.Debug.deprecate(e.factory.createJSDocEnumTag,t),e.createJSDocTemplateTag=e.Debug.deprecate(e.factory.createJSDocTemplateTag,t),e.createJSDocTypedefTag=e.Debug.deprecate(e.factory.createJSDocTypedefTag,t),e.createJSDocCallbackTag=e.Debug.deprecate(e.factory.createJSDocCallbackTag,t),e.createJSDocSignature=e.Debug.deprecate(e.factory.createJSDocSignature,t),e.createJSDocPropertyTag=e.Debug.deprecate(e.factory.createJSDocPropertyTag,t),e.createJSDocTypeLiteral=e.Debug.deprecate(e.factory.createJSDocTypeLiteral,t),e.createJSDocImplementsTag=e.Debug.deprecate(e.factory.createJSDocImplementsTag,t),e.createJSDocAuthorTag=e.Debug.deprecate(e.factory.createJSDocAuthorTag,t),e.createJSDocPublicTag=e.Debug.deprecate(e.factory.createJSDocPublicTag,t),e.createJSDocPrivateTag=e.Debug.deprecate(e.factory.createJSDocPrivateTag,t),e.createJSDocProtectedTag=e.Debug.deprecate(e.factory.createJSDocProtectedTag,t),e.createJSDocReadonlyTag=e.Debug.deprecate(e.factory.createJSDocReadonlyTag,t),e.createJSDocTag=e.Debug.deprecate(e.factory.createJSDocUnknownTag,t),e.createJsxElement=e.Debug.deprecate(e.factory.createJsxElement,t),e.updateJsxElement=e.Debug.deprecate(e.factory.updateJsxElement,t),e.createJsxSelfClosingElement=e.Debug.deprecate(e.factory.createJsxSelfClosingElement,t),e.updateJsxSelfClosingElement=e.Debug.deprecate(e.factory.updateJsxSelfClosingElement,t),e.createJsxOpeningElement=e.Debug.deprecate(e.factory.createJsxOpeningElement,t),e.updateJsxOpeningElement=e.Debug.deprecate(e.factory.updateJsxOpeningElement,t),e.createJsxClosingElement=e.Debug.deprecate(e.factory.createJsxClosingElement,t),e.updateJsxClosingElement=e.Debug.deprecate(e.factory.updateJsxClosingElement,t),e.createJsxFragment=e.Debug.deprecate(e.factory.createJsxFragment,t),e.createJsxText=e.Debug.deprecate(e.factory.createJsxText,t),e.updateJsxText=e.Debug.deprecate(e.factory.updateJsxText,t),e.createJsxOpeningFragment=e.Debug.deprecate(e.factory.createJsxOpeningFragment,t),e.createJsxJsxClosingFragment=e.Debug.deprecate(e.factory.createJsxJsxClosingFragment,t),e.updateJsxFragment=e.Debug.deprecate(e.factory.updateJsxFragment,t),e.createJsxAttribute=e.Debug.deprecate(e.factory.createJsxAttribute,t),e.updateJsxAttribute=e.Debug.deprecate(e.factory.updateJsxAttribute,t),e.createJsxAttributes=e.Debug.deprecate(e.factory.createJsxAttributes,t),e.updateJsxAttributes=e.Debug.deprecate(e.factory.updateJsxAttributes,t),e.createJsxSpreadAttribute=e.Debug.deprecate(e.factory.createJsxSpreadAttribute,t),e.updateJsxSpreadAttribute=e.Debug.deprecate(e.factory.updateJsxSpreadAttribute,t),e.createJsxExpression=e.Debug.deprecate(e.factory.createJsxExpression,t),e.updateJsxExpression=e.Debug.deprecate(e.factory.updateJsxExpression,t),e.createCaseClause=e.Debug.deprecate(e.factory.createCaseClause,t),e.updateCaseClause=e.Debug.deprecate(e.factory.updateCaseClause,t),e.createDefaultClause=e.Debug.deprecate(e.factory.createDefaultClause,t),e.updateDefaultClause=e.Debug.deprecate(e.factory.updateDefaultClause,t),e.createHeritageClause=e.Debug.deprecate(e.factory.createHeritageClause,t),e.updateHeritageClause=e.Debug.deprecate(e.factory.updateHeritageClause,t),e.createCatchClause=e.Debug.deprecate(e.factory.createCatchClause,t),e.updateCatchClause=e.Debug.deprecate(e.factory.updateCatchClause,t),e.createPropertyAssignment=e.Debug.deprecate(e.factory.createPropertyAssignment,t),e.updatePropertyAssignment=e.Debug.deprecate(e.factory.updatePropertyAssignment,t),e.createShorthandPropertyAssignment=e.Debug.deprecate(e.factory.createShorthandPropertyAssignment,t),e.updateShorthandPropertyAssignment=e.Debug.deprecate(e.factory.updateShorthandPropertyAssignment,t),e.createSpreadAssignment=e.Debug.deprecate(e.factory.createSpreadAssignment,t),e.updateSpreadAssignment=e.Debug.deprecate(e.factory.updateSpreadAssignment,t),e.createEnumMember=e.Debug.deprecate(e.factory.createEnumMember,t),e.updateEnumMember=e.Debug.deprecate(e.factory.updateEnumMember,t),e.updateSourceFileNode=e.Debug.deprecate(e.factory.updateSourceFile,t),e.createNotEmittedStatement=e.Debug.deprecate(e.factory.createNotEmittedStatement,t),e.createPartiallyEmittedExpression=e.Debug.deprecate(e.factory.createPartiallyEmittedExpression,t),e.updatePartiallyEmittedExpression=e.Debug.deprecate(e.factory.updatePartiallyEmittedExpression,t),e.createCommaList=e.Debug.deprecate(e.factory.createCommaListExpression,t),e.updateCommaList=e.Debug.deprecate(e.factory.updateCommaListExpression,t),e.createBundle=e.Debug.deprecate(e.factory.createBundle,t),e.updateBundle=e.Debug.deprecate(e.factory.updateBundle,t),e.createImmediatelyInvokedFunctionExpression=e.Debug.deprecate(e.factory.createImmediatelyInvokedFunctionExpression,t),e.createImmediatelyInvokedArrowFunction=e.Debug.deprecate(e.factory.createImmediatelyInvokedArrowFunction,t),e.createVoidZero=e.Debug.deprecate(e.factory.createVoidZero,t),e.createExportDefault=e.Debug.deprecate(e.factory.createExportDefault,t),e.createExternalModuleExport=e.Debug.deprecate(e.factory.createExternalModuleExport,t),e.createNamespaceExport=e.Debug.deprecate(e.factory.createNamespaceExport,t),e.updateNamespaceExport=e.Debug.deprecate(e.factory.updateNamespaceExport,t),e.createToken=e.Debug.deprecate(function(g){return e.factory.createToken(g)},t),e.createIdentifier=e.Debug.deprecate(function(g){return e.factory.createIdentifier(g,void 0,void 0)},t),e.createTempVariable=e.Debug.deprecate(function(g){return e.factory.createTempVariable(g,void 0)},t),e.getGeneratedNameForNode=e.Debug.deprecate(function(g){return e.factory.getGeneratedNameForNode(g,void 0)},t),e.createOptimisticUniqueName=e.Debug.deprecate(function(g){return e.factory.createUniqueName(g,16)},t),e.createFileLevelUniqueName=e.Debug.deprecate(function(g){return e.factory.createUniqueName(g,48)},t),e.createIndexSignature=e.Debug.deprecate(function(g,F,y,R){return e.factory.createIndexSignature(g,F,y,R)},t),e.createTypePredicateNode=e.Debug.deprecate(function(g,F){return e.factory.createTypePredicateNode(void 0,g,F)},t),e.updateTypePredicateNode=e.Debug.deprecate(function(g,F,y){return e.factory.updateTypePredicateNode(g,void 0,F,y)},t),e.createLiteral=e.Debug.deprecate(function(g){return typeof g=="number"?e.factory.createNumericLiteral(g):typeof g=="object"&&"base10Value"in g?e.factory.createBigIntLiteral(g):typeof g=="boolean"?g?e.factory.createTrue():e.factory.createFalse():typeof g=="string"?e.factory.createStringLiteral(g,void 0):e.factory.createStringLiteralFromNode(g)},{since:"4.0",warnAfter:"4.1",message:"Use `factory.createStringLiteral`, `factory.createStringLiteralFromNode`, `factory.createNumericLiteral`, `factory.createBigIntLiteral`, `factory.createTrue`, `factory.createFalse`, or the factory supplied by your transformation context instead."}),e.createMethodSignature=e.Debug.deprecate(function(g,F,y,R,re){return e.factory.createMethodSignature(void 0,R,re,g,F,y)},t),e.updateMethodSignature=e.Debug.deprecate(function(g,F,y,R,re,U){return e.factory.updateMethodSignature(g,g.modifiers,re,U,F,y,R)},t),e.createTypeOperatorNode=e.Debug.deprecate(function(g,F){var y;return F?y=g:(F=g,y=141),e.factory.createTypeOperatorNode(y,F)},t),e.createTaggedTemplate=e.Debug.deprecate(function(g,F,y){var R;return y?R=F:y=F,e.factory.createTaggedTemplateExpression(g,R,y)},t),e.updateTaggedTemplate=e.Debug.deprecate(function(g,F,y,R){var re;return R?re=y:R=y,e.factory.updateTaggedTemplateExpression(g,F,re,R)},t),e.updateBinary=e.Debug.deprecate(function(g,F,y,R){return R===void 0&&(R=g.operatorToken),typeof R=="number"&&(R=R===g.operatorToken.kind?g.operatorToken:e.factory.createToken(R)),e.factory.updateBinaryExpression(g,F,R,y)},t),e.createConditional=e.Debug.deprecate(function(g,F,y,R,re){return arguments.length===5?e.factory.createConditionalExpression(g,F,y,R,re):arguments.length===3?e.factory.createConditionalExpression(g,e.factory.createToken(57),F,e.factory.createToken(58),y):e.Debug.fail("Argument count mismatch")},t),e.createYield=e.Debug.deprecate(function(g,F){var y;return F?y=g:F=g,e.factory.createYieldExpression(y,F)},t),e.createClassExpression=e.Debug.deprecate(function(g,F,y,R,re){return e.factory.createClassExpression(void 0,g,F,y,R,re)},t),e.updateClassExpression=e.Debug.deprecate(function(g,F,y,R,re,U){return e.factory.updateClassExpression(g,void 0,F,y,R,re,U)},t),e.createPropertySignature=e.Debug.deprecate(function(g,F,y,R,re){var U=e.factory.createPropertySignature(g,F,y,R);return U.initializer=re,U},t),e.updatePropertySignature=e.Debug.deprecate(function(g,F,y,R,re,U){var d=e.factory.updatePropertySignature(g,F,y,R,re);return g.initializer!==U&&(d===g&&(d=e.factory.cloneNode(g)),d.initializer=U),d},t),e.createExpressionWithTypeArguments=e.Debug.deprecate(function(g,F){return e.factory.createExpressionWithTypeArguments(F,g)},t),e.updateExpressionWithTypeArguments=e.Debug.deprecate(function(g,F,y){return e.factory.updateExpressionWithTypeArguments(g,y,F)},t),e.createArrowFunction=e.Debug.deprecate(function(g,F,y,R,re,U){return arguments.length===6?e.factory.createArrowFunction(g,F,y,R,re,U):arguments.length===5?e.factory.createArrowFunction(g,F,y,R,void 0,re):e.Debug.fail("Argument count mismatch")},t),e.updateArrowFunction=e.Debug.deprecate(function(g,F,y,R,re,U,d){return arguments.length===7?e.factory.updateArrowFunction(g,F,y,R,re,U,d):arguments.length===6?e.factory.updateArrowFunction(g,F,y,R,re,g.equalsGreaterThanToken,U):e.Debug.fail("Argument count mismatch")},t),e.createVariableDeclaration=e.Debug.deprecate(function(g,F,y,R){return arguments.length===4?e.factory.createVariableDeclaration(g,F,y,R):arguments.length>=1&&arguments.length<=3?e.factory.createVariableDeclaration(g,void 0,F,y):e.Debug.fail("Argument count mismatch")},t),e.updateVariableDeclaration=e.Debug.deprecate(function(g,F,y,R,re){return arguments.length===5?e.factory.updateVariableDeclaration(g,F,y,R,re):arguments.length===4?e.factory.updateVariableDeclaration(g,F,g.exclamationToken,y,R):e.Debug.fail("Argument count mismatch")},t),e.createImportClause=e.Debug.deprecate(function(g,F,y){return y===void 0&&(y=!1),e.factory.createImportClause(y,g,F)},t),e.updateImportClause=e.Debug.deprecate(function(g,F,y,R){return e.factory.updateImportClause(g,R,F,y)},t),e.createExportDeclaration=e.Debug.deprecate(function(g,F,y,R,re){return re===void 0&&(re=!1),e.factory.createExportDeclaration(g,F,re,y,R)},t),e.updateExportDeclaration=e.Debug.deprecate(function(g,F,y,R,re,U){return e.factory.updateExportDeclaration(g,F,y,U,R,re,g.assertClause)},t),e.createJSDocParamTag=e.Debug.deprecate(function(g,F,y,R){return e.factory.createJSDocParameterTag(void 0,g,F,y,!1,R?e.factory.createNodeArray([e.factory.createJSDocText(R)]):void 0)},t),e.createComma=e.Debug.deprecate(function(g,F){return e.factory.createComma(g,F)},t),e.createLessThan=e.Debug.deprecate(function(g,F){return e.factory.createLessThan(g,F)},t),e.createAssignment=e.Debug.deprecate(function(g,F){return e.factory.createAssignment(g,F)},t),e.createStrictEquality=e.Debug.deprecate(function(g,F){return e.factory.createStrictEquality(g,F)},t),e.createStrictInequality=e.Debug.deprecate(function(g,F){return e.factory.createStrictInequality(g,F)},t),e.createAdd=e.Debug.deprecate(function(g,F){return e.factory.createAdd(g,F)},t),e.createSubtract=e.Debug.deprecate(function(g,F){return e.factory.createSubtract(g,F)},t),e.createLogicalAnd=e.Debug.deprecate(function(g,F){return e.factory.createLogicalAnd(g,F)},t),e.createLogicalOr=e.Debug.deprecate(function(g,F){return e.factory.createLogicalOr(g,F)},t),e.createPostfixIncrement=e.Debug.deprecate(function(g){return e.factory.createPostfixIncrement(g)},t),e.createLogicalNot=e.Debug.deprecate(function(g){return e.factory.createLogicalNot(g)},t),e.createNode=e.Debug.deprecate(function(g,F,y){return F===void 0&&(F=0),y===void 0&&(y=0),e.setTextRangePosEnd(g===308?e.parseBaseNodeFactory.createBaseSourceFileNode(g):g===79?e.parseBaseNodeFactory.createBaseIdentifierNode(g):g===80?e.parseBaseNodeFactory.createBasePrivateIdentifierNode(g):e.isNodeKind(g)?e.parseBaseNodeFactory.createBaseNode(g):e.parseBaseNodeFactory.createBaseTokenNode(g),F,y)},{since:"4.0",warnAfter:"4.1",message:"Use an appropriate `factory` method instead."}),e.getMutableClone=e.Debug.deprecate(function(g){var F=e.factory.cloneNode(g);return e.setTextRange(F,g),e.setParent(F,g.parent),F},{since:"4.0",warnAfter:"4.1",message:"Use an appropriate `factory.update...` method instead, use `setCommentRange` or `setSourceMapRange`, and avoid setting `parent`."})})(fr||(fr={}));var fr;(function(e){e.isTypeAssertion=e.Debug.deprecate(function(v){return v.kind===213},{since:"4.0",warnAfter:"4.1",message:"Use `isTypeAssertionExpression` instead."})})(fr||(fr={}));var fr;(function(e){e.isIdentifierOrPrivateIdentifier=e.Debug.deprecate(function(v){return e.isMemberName(v)},{since:"4.2",warnAfter:"4.3",message:"Use `isMemberName` instead."})})(fr||(fr={}));var fr;(function(e){function t(g){var F=g.createConstructorTypeNode,y=g.updateConstructorTypeNode;g.createConstructorTypeNode=e.buildOverload("createConstructorTypeNode").overload({0:function(R,re,U,d){return F(R,re,U,d)},1:function(R,re,U){return F(void 0,R,re,U)}}).bind({0:function(R){return R.length===4},1:function(R){return R.length===3}}).deprecate({1:{since:"4.2",warnAfter:"4.3",message:"Use the overload that accepts 'modifiers'"}}).finish(),g.updateConstructorTypeNode=e.buildOverload("updateConstructorTypeNode").overload({0:function(R,re,U,d,m){return y(R,re,U,d,m)},1:function(R,re,U,d){return y(R,R.modifiers,re,U,d)}}).bind({0:function(R){return R.length===5},1:function(R){return R.length===4}}).deprecate({1:{since:"4.2",warnAfter:"4.3",message:"Use the overload that accepts 'modifiers'"}}).finish()}var v=e.createNodeFactory;e.createNodeFactory=function(g,F){var y=v(g,F);return t(y),y},t(e.factory)})(fr||(fr={}));var fr;(function(e){function t(g){var F=g.createImportTypeNode,y=g.updateImportTypeNode;g.createImportTypeNode=e.buildOverload("createImportTypeNode").overload({0:function(R,re,U,d,m){return F(R,re,U,d,m)},1:function(R,re,U,d){return F(R,void 0,re,U,d)}}).bind({0:function(R){var re=R[1],U=R[2],d=R[3],m=R[4];return(re===void 0||e.isImportTypeAssertionContainer(re))&&(U===void 0||!e.isArray(U))&&(d===void 0||e.isArray(d))&&(m===void 0||typeof m=="boolean")},1:function(R){var re=R[1],U=R[2],d=R[3],m=R[4];return m===void 0&&(re===void 0||e.isEntityName(re))&&(U===void 0||e.isArray(U))&&(d===void 0||typeof d=="boolean")}}).deprecate({1:{since:"4.6",warnAfter:"4.7",message:"Use the overload that accepts 'assertions'"}}).finish(),g.updateImportTypeNode=e.buildOverload("updateImportTypeNode").overload({0:function(R,re,U,d,m,le){return y(R,re,U,d,m,le)},1:function(R,re,U,d,m){return y(R,re,R.assertions,U,d,m)}}).bind({0:function(R){var re=R[2],U=R[3],d=R[4],m=R[5];return(re===void 0||e.isImportTypeAssertionContainer(re))&&(U===void 0||!e.isArray(U))&&(d===void 0||e.isArray(d))&&(m===void 0||typeof m=="boolean")},1:function(R){var re=R[2],U=R[3],d=R[4],m=R[5];return m===void 0&&(re===void 0||e.isEntityName(re))&&(U===void 0||e.isArray(U))&&(d===void 0||typeof d=="boolean")}}).deprecate({1:{since:"4.6",warnAfter:"4.7",message:"Use the overload that accepts 'assertions'"}}).finish()}var v=e.createNodeFactory;e.createNodeFactory=function(g,F){var y=v(g,F);return t(y),y},t(e.factory)})(fr||(fr={}));var fr;(function(e){function t(g){var F=g.createTypeParameterDeclaration,y=g.updateTypeParameterDeclaration;g.createTypeParameterDeclaration=e.buildOverload("createTypeParameterDeclaration").overload({0:function(R,re,U,d){return F(R,re,U,d)},1:function(R,re,U){return F(void 0,R,re,U)}}).bind({0:function(R){var re=R[0];return re===void 0||e.isArray(re)},1:function(R){var re=R[0];return re!==void 0&&!e.isArray(re)}}).deprecate({1:{since:"4.7",warnAfter:"4.8",message:"Use the overload that accepts 'modifiers'"}}).finish(),g.updateTypeParameterDeclaration=e.buildOverload("updateTypeParameterDeclaration").overload({0:function(R,re,U,d,m){return y(R,re,U,d,m)},1:function(R,re,U,d){return y(R,R.modifiers,re,U,d)}}).bind({0:function(R){var re=R[1];return re===void 0||e.isArray(re)},1:function(R){var re=R[1];return re!==void 0&&!e.isArray(re)}}).deprecate({1:{since:"4.7",warnAfter:"4.8",message:"Use the overload that accepts 'modifiers'"}}).finish()}var v=e.createNodeFactory;e.createNodeFactory=function(g,F){var y=v(g,F);return t(y),y},t(e.factory)})(fr||(fr={}));var fr;(function(e){var t={since:"4.8",warnAfter:"4.9.0-0",message:"Decorators have been combined with modifiers. Callers should switch to an overload that does not accept a 'decorators' parameter."},v={since:"4.8",warnAfter:"4.9.0-0",message:"Decorators are no longer supported for this function. Callers should switch to an overload that does not accept a 'decorators' parameter."},g={since:"4.8",warnAfter:"4.9.0-0",message:"Decorators and modifiers are no longer supported for this function. Callers should switch to an overload that does not accept the 'decorators' and 'modifiers' parameters."};function F(R){var re=R.createParameterDeclaration,U=R.updateParameterDeclaration,d=R.createPropertyDeclaration,m=R.updatePropertyDeclaration,le=R.createMethodDeclaration,ue=R.updateMethodDeclaration,oe=R.createConstructorDeclaration,se=R.updateConstructorDeclaration,ce=R.createGetAccessorDeclaration,w=R.updateGetAccessorDeclaration,M=R.createSetAccessorDeclaration,f=R.updateSetAccessorDeclaration,D=R.createIndexSignature,C=R.updateIndexSignature,T=R.createClassStaticBlockDeclaration,N=R.updateClassStaticBlockDeclaration,k=R.createClassExpression,me=R.updateClassExpression,De=R.createFunctionDeclaration,$=R.updateFunctionDeclaration,B=R.createClassDeclaration,Y=R.updateClassDeclaration,X=R.createInterfaceDeclaration,S=R.updateInterfaceDeclaration,J=R.createTypeAliasDeclaration,te=R.updateTypeAliasDeclaration,j=R.createEnumDeclaration,O=R.updateEnumDeclaration,I=R.createModuleDeclaration,q=R.updateModuleDeclaration,Q=R.createImportEqualsDeclaration,Z=R.updateImportEqualsDeclaration,he=R.createImportDeclaration,x=R.updateImportDeclaration,E=R.createExportAssignment,A=R.updateExportAssignment,ne=R.createExportDeclaration,W=R.updateExportDeclaration;R.createParameterDeclaration=e.buildOverload("createParameterDeclaration").overload({0:function(u,P,L,H,G,ge){return re(u,P,L,H,G,ge)},1:function(u,P,L,H,G,ge,pe){return re(e.concatenate(u,P),L,H,G,ge,pe)}}).bind({0:function(u){var P=u[1],L=u[2],H=u[3],G=u[4],ge=u[5],pe=u[6];return pe===void 0&&(P===void 0||!e.isArray(P))&&(L===void 0||typeof L=="string"||e.isBindingName(L))&&(H===void 0||typeof H=="object"&&e.isQuestionToken(H))&&(G===void 0||e.isTypeNode(G))&&(ge===void 0||e.isExpression(ge))},1:function(u){var P=u[1],L=u[2],H=u[3],G=u[4],ge=u[5],pe=u[6];return(P===void 0||e.isArray(P))&&(L===void 0||typeof L=="object"&&e.isDotDotDotToken(L))&&(H===void 0||typeof H=="string"||e.isBindingName(H))&&(G===void 0||e.isQuestionToken(G))&&(ge===void 0||e.isTypeNode(ge))&&(pe===void 0||e.isExpression(pe))}}).deprecate({1:t}).finish(),R.updateParameterDeclaration=e.buildOverload("updateParameterDeclaration").overload({0:function(u,P,L,H,G,ge,pe){return U(u,P,L,H,G,ge,pe)},1:function(u,P,L,H,G,ge,pe,He){return U(u,e.concatenate(P,L),H,G,ge,pe,He)}}).bind({0:function(u){var P=u[2],L=u[3],H=u[4],G=u[5],ge=u[6],pe=u[7];return pe===void 0&&(P===void 0||!e.isArray(P))&&(L===void 0||typeof L=="string"||e.isBindingName(L))&&(H===void 0||typeof H=="object"&&e.isQuestionToken(H))&&(G===void 0||e.isTypeNode(G))&&(ge===void 0||e.isExpression(ge))},1:function(u){var P=u[2],L=u[3],H=u[4],G=u[5],ge=u[6],pe=u[7];return(P===void 0||e.isArray(P))&&(L===void 0||typeof L=="object"&&e.isDotDotDotToken(L))&&(H===void 0||typeof H=="string"||e.isBindingName(H))&&(G===void 0||e.isQuestionToken(G))&&(ge===void 0||e.isTypeNode(ge))&&(pe===void 0||e.isExpression(pe))}}).deprecate({1:t}).finish(),R.createPropertyDeclaration=e.buildOverload("createPropertyDeclaration").overload({0:function(u,P,L,H,G){return d(u,P,L,H,G)},1:function(u,P,L,H,G,ge){return d(e.concatenate(u,P),L,H,G,ge)}}).bind({0:function(u){var P=u[1],L=u[2],H=u[3],G=u[4],ge=u[5];return ge===void 0&&(P===void 0||!e.isArray(P))&&(L===void 0||typeof L=="object"&&e.isQuestionOrExclamationToken(L))&&(H===void 0||e.isTypeNode(H))&&(G===void 0||e.isExpression(G))},1:function(u){var P=u[1],L=u[2],H=u[3],G=u[4],ge=u[5];return(P===void 0||e.isArray(P))&&(L===void 0||typeof L=="string"||e.isPropertyName(L))&&(H===void 0||e.isQuestionOrExclamationToken(H))&&(G===void 0||e.isTypeNode(G))&&(ge===void 0||e.isExpression(ge))}}).deprecate({1:t}).finish(),R.updatePropertyDeclaration=e.buildOverload("updatePropertyDeclaration").overload({0:function(u,P,L,H,G,ge){return m(u,P,L,H,G,ge)},1:function(u,P,L,H,G,ge,pe){return m(u,e.concatenate(P,L),H,G,ge,pe)}}).bind({0:function(u){var P=u[2],L=u[3],H=u[4],G=u[5],ge=u[6];return ge===void 0&&(P===void 0||!e.isArray(P))&&(L===void 0||typeof L=="object"&&e.isQuestionOrExclamationToken(L))&&(H===void 0||e.isTypeNode(H))&&(G===void 0||e.isExpression(G))},1:function(u){var P=u[2],L=u[3],H=u[4],G=u[5],ge=u[6];return(P===void 0||e.isArray(P))&&(L===void 0||typeof L=="string"||e.isPropertyName(L))&&(H===void 0||e.isQuestionOrExclamationToken(H))&&(G===void 0||e.isTypeNode(G))&&(ge===void 0||e.isExpression(ge))}}).deprecate({1:t}).finish(),R.createMethodDeclaration=e.buildOverload("createMethodDeclaration").overload({0:function(u,P,L,H,G,ge,pe,He){return le(u,P,L,H,G,ge,pe,He)},1:function(u,P,L,H,G,ge,pe,He,Je){return le(e.concatenate(u,P),L,H,G,ge,pe,He,Je)}}).bind({0:function(u){var P=u[1],L=u[2],H=u[3],G=u[4],ge=u[5],pe=u[6],He=u[7],Je=u[8];return Je===void 0&&(P===void 0||!e.isArray(P))&&(L===void 0||typeof L=="string"||e.isPropertyName(L))&&(H===void 0||typeof H=="object"&&e.isQuestionToken(H))&&(G===void 0||e.isArray(G))&&(ge===void 0||!e.some(ge,e.isTypeParameterDeclaration))&&(pe===void 0||!e.isArray(pe))&&(He===void 0||e.isBlock(He))},1:function(u){var P=u[1],L=u[2],H=u[3],G=u[4],ge=u[5],pe=u[6],He=u[7],Je=u[8];return(P===void 0||e.isArray(P))&&(L===void 0||typeof L=="object"&&e.isAsteriskToken(L))&&(H===void 0||typeof H=="string"||e.isPropertyName(H))&&(G===void 0||!e.isArray(G))&&(ge===void 0||!e.some(ge,e.isParameter))&&(pe===void 0||e.isArray(pe))&&(He===void 0||e.isTypeNode(He))&&(Je===void 0||e.isBlock(Je))}}).deprecate({1:t}).finish(),R.updateMethodDeclaration=e.buildOverload("updateMethodDeclaration").overload({0:function(u,P,L,H,G,ge,pe,He,Je){return ue(u,P,L,H,G,ge,pe,He,Je)},1:function(u,P,L,H,G,ge,pe,He,Je,Me){return ue(u,e.concatenate(P,L),H,G,ge,pe,He,Je,Me)}}).bind({0:function(u){var P=u[2],L=u[3],H=u[4],G=u[5],ge=u[6],pe=u[7],He=u[8],Je=u[9];return Je===void 0&&(P===void 0||!e.isArray(P))&&(L===void 0||typeof L=="string"||e.isPropertyName(L))&&(H===void 0||typeof H=="object"&&e.isQuestionToken(H))&&(G===void 0||e.isArray(G))&&(ge===void 0||!e.some(ge,e.isTypeParameterDeclaration))&&(pe===void 0||!e.isArray(pe))&&(He===void 0||e.isBlock(He))},1:function(u){var P=u[2],L=u[3],H=u[4],G=u[5],ge=u[6],pe=u[7],He=u[8],Je=u[9];return(P===void 0||e.isArray(P))&&(L===void 0||typeof L=="object"&&e.isAsteriskToken(L))&&(H===void 0||typeof H=="string"||e.isPropertyName(H))&&(G===void 0||!e.isArray(G))&&(ge===void 0||!e.some(ge,e.isParameter))&&(pe===void 0||e.isArray(pe))&&(He===void 0||e.isTypeNode(He))&&(Je===void 0||e.isBlock(Je))}}).deprecate({1:t}).finish(),R.createConstructorDeclaration=e.buildOverload("createConstructorDeclaration").overload({0:function(u,P,L){return oe(u,P,L)},1:function(u,P,L,H){return oe(P,L,H)}}).bind({0:function(u){var P=u[0],L=u[1],H=u[2],G=u[3];return G===void 0&&(P===void 0||!e.some(P,e.isDecorator))&&(L===void 0||!e.some(L,e.isModifier))&&(H===void 0||!e.isArray(H))},1:function(u){var P=u[0],L=u[1],H=u[2],G=u[3];return(P===void 0||!e.some(P,e.isModifier))&&(L===void 0||!e.some(L,e.isParameter))&&(H===void 0||e.isArray(H))&&(G===void 0||e.isBlock(G))}}).deprecate({1:v}).finish(),R.updateConstructorDeclaration=e.buildOverload("updateConstructorDeclaration").overload({0:function(u,P,L,H){return se(u,P,L,H)},1:function(u,P,L,H,G){return se(u,L,H,G)}}).bind({0:function(u){var P=u[1],L=u[2],H=u[3],G=u[4];return G===void 0&&(P===void 0||!e.some(P,e.isDecorator))&&(L===void 0||!e.some(L,e.isModifier))&&(H===void 0||!e.isArray(H))},1:function(u){var P=u[1],L=u[2],H=u[3],G=u[4];return(P===void 0||!e.some(P,e.isModifier))&&(L===void 0||!e.some(L,e.isParameter))&&(H===void 0||e.isArray(H))&&(G===void 0||e.isBlock(G))}}).deprecate({1:v}).finish(),R.createGetAccessorDeclaration=e.buildOverload("createGetAccessorDeclaration").overload({0:function(u,P,L,H,G){return ce(u,P,L,H,G)},1:function(u,P,L,H,G,ge){return ce(e.concatenate(u,P),L,H,G,ge)}}).bind({0:function(u){var P=u[1],L=u[2],H=u[3],G=u[4],ge=u[5];return ge===void 0&&(P===void 0||!e.isArray(P))&&(L===void 0||e.isArray(L))&&(H===void 0||!e.isArray(H))&&(G===void 0||e.isBlock(G))},1:function(u){var P=u[1],L=u[2],H=u[3],G=u[4],ge=u[5];return(P===void 0||e.isArray(P))&&(L===void 0||!e.isArray(L))&&(H===void 0||e.isArray(H))&&(G===void 0||e.isTypeNode(G))&&(ge===void 0||e.isBlock(ge))}}).deprecate({1:t}).finish(),R.updateGetAccessorDeclaration=e.buildOverload("updateGetAccessorDeclaration").overload({0:function(u,P,L,H,G,ge){return w(u,P,L,H,G,ge)},1:function(u,P,L,H,G,ge,pe){return w(u,e.concatenate(P,L),H,G,ge,pe)}}).bind({0:function(u){var P=u[2],L=u[3],H=u[4],G=u[5],ge=u[6];return ge===void 0&&(P===void 0||!e.isArray(P))&&(L===void 0||e.isArray(L))&&(H===void 0||!e.isArray(H))&&(G===void 0||e.isBlock(G))},1:function(u){var P=u[2],L=u[3],H=u[4],G=u[5],ge=u[6];return(P===void 0||e.isArray(P))&&(L===void 0||!e.isArray(L))&&(H===void 0||e.isArray(H))&&(G===void 0||e.isTypeNode(G))&&(ge===void 0||e.isBlock(ge))}}).deprecate({1:t}).finish(),R.createSetAccessorDeclaration=e.buildOverload("createSetAccessorDeclaration").overload({0:function(u,P,L,H){return M(u,P,L,H)},1:function(u,P,L,H,G){return M(e.concatenate(u,P),L,H,G)}}).bind({0:function(u){var P=u[1],L=u[2],H=u[3],G=u[4];return G===void 0&&(P===void 0||!e.isArray(P))&&(L===void 0||e.isArray(L))&&(H===void 0||!e.isArray(H))},1:function(u){var P=u[1],L=u[2],H=u[3],G=u[4];return(P===void 0||e.isArray(P))&&(L===void 0||!e.isArray(L))&&(H===void 0||e.isArray(H))&&(G===void 0||e.isBlock(G))}}).deprecate({1:t}).finish(),R.updateSetAccessorDeclaration=e.buildOverload("updateSetAccessorDeclaration").overload({0:function(u,P,L,H,G){return f(u,P,L,H,G)},1:function(u,P,L,H,G,ge){return f(u,e.concatenate(P,L),H,G,ge)}}).bind({0:function(u){var P=u[2],L=u[3],H=u[4],G=u[5];return G===void 0&&(P===void 0||!e.isArray(P))&&(L===void 0||e.isArray(L))&&(H===void 0||!e.isArray(H))},1:function(u){var P=u[2],L=u[3],H=u[4],G=u[5];return(P===void 0||e.isArray(P))&&(L===void 0||!e.isArray(L))&&(H===void 0||e.isArray(H))&&(G===void 0||e.isBlock(G))}}).deprecate({1:t}).finish(),R.createIndexSignature=e.buildOverload("createIndexSignature").overload({0:function(u,P,L){return D(u,P,L)},1:function(u,P,L,H){return D(P,L,H)}}).bind({0:function(u){var P=u[0],L=u[1],H=u[2],G=u[3];return G===void 0&&(P===void 0||e.every(P,e.isModifier))&&(L===void 0||e.every(L,e.isParameter))&&(H===void 0||!e.isArray(H))},1:function(u){var P=u[0],L=u[1],H=u[2],G=u[3];return(P===void 0||e.every(P,e.isDecorator))&&(L===void 0||e.every(L,e.isModifier))&&(H===void 0||e.isArray(H))&&(G===void 0||e.isTypeNode(G))}}).deprecate({1:v}).finish(),R.updateIndexSignature=e.buildOverload("updateIndexSignature").overload({0:function(u,P,L,H){return C(u,P,L,H)},1:function(u,P,L,H,G){return C(u,L,H,G)}}).bind({0:function(u){var P=u[1],L=u[2],H=u[3],G=u[4];return G===void 0&&(P===void 0||e.every(P,e.isModifier))&&(L===void 0||e.every(L,e.isParameter))&&(H===void 0||!e.isArray(H))},1:function(u){var P=u[1],L=u[2],H=u[3],G=u[4];return(P===void 0||e.every(P,e.isDecorator))&&(L===void 0||e.every(L,e.isModifier))&&(H===void 0||e.isArray(H))&&(G===void 0||e.isTypeNode(G))}}).deprecate({1:v}).finish(),R.createClassStaticBlockDeclaration=e.buildOverload("createClassStaticBlockDeclaration").overload({0:function(u){return T(u)},1:function(u,P,L){return T(L)}}).bind({0:function(u){var P=u[0],L=u[1],H=u[2];return L===void 0&&H===void 0&&(P===void 0||!e.isArray(P))},1:function(u){var P=u[0],L=u[1],H=u[2];return(P===void 0||e.isArray(P))&&(L===void 0||e.isArray(P))&&(H===void 0||e.isBlock(H))}}).deprecate({1:g}).finish(),R.updateClassStaticBlockDeclaration=e.buildOverload("updateClassStaticBlockDeclaration").overload({0:function(u,P){return N(u,P)},1:function(u,P,L,H){return N(u,H)}}).bind({0:function(u){var P=u[1],L=u[2],H=u[3];return L===void 0&&H===void 0&&(P===void 0||!e.isArray(P))},1:function(u){var P=u[1],L=u[2],H=u[3];return(P===void 0||e.isArray(P))&&(L===void 0||e.isArray(P))&&(H===void 0||e.isBlock(H))}}).deprecate({1:g}).finish(),R.createClassExpression=e.buildOverload("createClassExpression").overload({0:function(u,P,L,H,G){return k(u,P,L,H,G)},1:function(u,P,L,H,G,ge){return k(e.concatenate(u,P),L,H,G,ge)}}).bind({0:function(u){var P=u[1],L=u[2],H=u[3],G=u[4],ge=u[5];return ge===void 0&&(P===void 0||!e.isArray(P))&&(L===void 0||e.isArray(L))&&(H===void 0||e.every(H,e.isHeritageClause))&&(G===void 0||e.every(G,e.isClassElement))},1:function(u){var P=u[1],L=u[2],H=u[3],G=u[4],ge=u[5];return(P===void 0||e.isArray(P))&&(L===void 0||!e.isArray(L))&&(H===void 0||e.every(H,e.isTypeParameterDeclaration))&&(G===void 0||e.every(G,e.isHeritageClause))&&(ge===void 0||e.isArray(ge))}}).deprecate({1:v}).finish(),R.updateClassExpression=e.buildOverload("updateClassExpression").overload({0:function(u,P,L,H,G,ge){return me(u,P,L,H,G,ge)},1:function(u,P,L,H,G,ge,pe){return me(u,e.concatenate(P,L),H,G,ge,pe)}}).bind({0:function(u){var P=u[2],L=u[3],H=u[4],G=u[5],ge=u[6];return ge===void 0&&(P===void 0||!e.isArray(P))&&(L===void 0||e.isArray(L))&&(H===void 0||e.every(H,e.isHeritageClause))&&(G===void 0||e.every(G,e.isClassElement))},1:function(u){var P=u[2],L=u[3],H=u[4],G=u[5],ge=u[6];return(P===void 0||e.isArray(P))&&(L===void 0||!e.isArray(L))&&(H===void 0||e.every(H,e.isTypeParameterDeclaration))&&(G===void 0||e.every(G,e.isHeritageClause))&&(ge===void 0||e.isArray(ge))}}).deprecate({1:v}).finish(),R.createFunctionDeclaration=e.buildOverload("createFunctionDeclaration").overload({0:function(u,P,L,H,G,ge,pe){return De(u,P,L,H,G,ge,pe)},1:function(u,P,L,H,G,ge,pe,He){return De(P,L,H,G,ge,pe,He)}}).bind({0:function(u){var P=u[1],L=u[2],H=u[3],G=u[4],ge=u[5],pe=u[6],He=u[7];return He===void 0&&(P===void 0||!e.isArray(P))&&(L===void 0||typeof L=="string"||e.isIdentifier(L))&&(H===void 0||e.isArray(H))&&(G===void 0||e.every(G,e.isParameter))&&(ge===void 0||!e.isArray(ge))&&(pe===void 0||e.isBlock(pe))},1:function(u){var P=u[1],L=u[2],H=u[3],G=u[4],ge=u[5],pe=u[6],He=u[7];return(P===void 0||e.isArray(P))&&(L===void 0||typeof L!="string"&&e.isAsteriskToken(L))&&(H===void 0||!e.isArray(H))&&(G===void 0||e.every(G,e.isTypeParameterDeclaration))&&(ge===void 0||e.isArray(ge))&&(pe===void 0||e.isTypeNode(pe))&&(He===void 0||e.isBlock(He))}}).deprecate({1:v}).finish(),R.updateFunctionDeclaration=e.buildOverload("updateFunctionDeclaration").overload({0:function(u,P,L,H,G,ge,pe,He){return $(u,P,L,H,G,ge,pe,He)},1:function(u,P,L,H,G,ge,pe,He,Je){return $(u,L,H,G,ge,pe,He,Je)}}).bind({0:function(u){var P=u[2],L=u[3],H=u[4],G=u[5],ge=u[6],pe=u[7],He=u[8];return He===void 0&&(P===void 0||!e.isArray(P))&&(L===void 0||e.isIdentifier(L))&&(H===void 0||e.isArray(H))&&(G===void 0||e.every(G,e.isParameter))&&(ge===void 0||!e.isArray(ge))&&(pe===void 0||e.isBlock(pe))},1:function(u){var P=u[2],L=u[3],H=u[4],G=u[5],ge=u[6],pe=u[7],He=u[8];return(P===void 0||e.isArray(P))&&(L===void 0||typeof L!="string"&&e.isAsteriskToken(L))&&(H===void 0||!e.isArray(H))&&(G===void 0||e.every(G,e.isTypeParameterDeclaration))&&(ge===void 0||e.isArray(ge))&&(pe===void 0||e.isTypeNode(pe))&&(He===void 0||e.isBlock(He))}}).deprecate({1:v}).finish(),R.createClassDeclaration=e.buildOverload("createClassDeclaration").overload({0:function(u,P,L,H,G){return B(u,P,L,H,G)},1:function(u,P,L,H,G,ge){return B(e.concatenate(u,P),L,H,G,ge)}}).bind({0:function(u){var P=u[1],L=u[2],H=u[3],G=u[4],ge=u[5];return ge===void 0&&(P===void 0||!e.isArray(P))&&(L===void 0||e.isArray(L))&&(H===void 0||e.every(H,e.isHeritageClause))&&(G===void 0||e.every(G,e.isClassElement))},1:function(){return!0}}).deprecate({1:t}).finish(),R.updateClassDeclaration=e.buildOverload("updateClassDeclaration").overload({0:function(u,P,L,H,G,ge){return Y(u,P,L,H,G,ge)},1:function(u,P,L,H,G,ge,pe){return Y(u,e.concatenate(P,L),H,G,ge,pe)}}).bind({0:function(u){var P=u[2],L=u[3],H=u[4],G=u[5],ge=u[6];return ge===void 0&&(P===void 0||!e.isArray(P))&&(L===void 0||e.isArray(L))&&(H===void 0||e.every(H,e.isHeritageClause))&&(G===void 0||e.every(G,e.isClassElement))},1:function(u){var P=u[2],L=u[3],H=u[4],G=u[5],ge=u[6];return(P===void 0||e.isArray(P))&&(L===void 0||!e.isArray(L))&&(H===void 0||e.every(H,e.isTypeParameterDeclaration))&&(G===void 0||e.every(G,e.isHeritageClause))&&(ge===void 0||e.isArray(ge))}}).deprecate({1:t}).finish(),R.createInterfaceDeclaration=e.buildOverload("createInterfaceDeclaration").overload({0:function(u,P,L,H,G){return X(u,P,L,H,G)},1:function(u,P,L,H,G,ge){return X(P,L,H,G,ge)}}).bind({0:function(u){var P=u[0],L=u[1],H=u[2],G=u[3],ge=u[4],pe=u[5];return pe===void 0&&(P===void 0||e.every(P,e.isModifier))&&(L===void 0||!e.isArray(L))&&(H===void 0||e.isArray(H))&&(G===void 0||e.every(G,e.isHeritageClause))&&(ge===void 0||e.every(ge,e.isTypeElement))},1:function(u){var P=u[0],L=u[1],H=u[2],G=u[3],ge=u[4],pe=u[5];return(P===void 0||e.every(P,e.isDecorator))&&(L===void 0||e.isArray(L))&&(H===void 0||!e.isArray(H))&&(G===void 0||e.every(G,e.isTypeParameterDeclaration))&&(ge===void 0||e.every(ge,e.isHeritageClause))&&(pe===void 0||e.every(pe,e.isTypeElement))}}).deprecate({1:v}).finish(),R.updateInterfaceDeclaration=e.buildOverload("updateInterfaceDeclaration").overload({0:function(u,P,L,H,G,ge){return S(u,P,L,H,G,ge)},1:function(u,P,L,H,G,ge,pe){return S(u,L,H,G,ge,pe)}}).bind({0:function(u){var P=u[1],L=u[2],H=u[3],G=u[4],ge=u[5],pe=u[6];return pe===void 0&&(P===void 0||e.every(P,e.isModifier))&&(L===void 0||!e.isArray(L))&&(H===void 0||e.isArray(H))&&(G===void 0||e.every(G,e.isHeritageClause))&&(ge===void 0||e.every(ge,e.isTypeElement))},1:function(u){var P=u[1],L=u[2],H=u[3],G=u[4],ge=u[5],pe=u[6];return(P===void 0||e.every(P,e.isDecorator))&&(L===void 0||e.isArray(L))&&(H===void 0||!e.isArray(H))&&(G===void 0||e.every(G,e.isTypeParameterDeclaration))&&(ge===void 0||e.every(ge,e.isHeritageClause))&&(pe===void 0||e.every(pe,e.isTypeElement))}}).deprecate({1:v}).finish(),R.createTypeAliasDeclaration=e.buildOverload("createTypeAliasDeclaration").overload({0:function(u,P,L,H){return J(u,P,L,H)},1:function(u,P,L,H,G){return J(P,L,H,G)}}).bind({0:function(u){var P=u[0],L=u[1],H=u[2],G=u[3],ge=u[4];return ge===void 0&&(P===void 0||e.every(P,e.isModifier))&&(L===void 0||!e.isArray(L))&&(H===void 0||e.isArray(H))&&(G===void 0||!e.isArray(G))},1:function(u){var P=u[0],L=u[1],H=u[2],G=u[3],ge=u[4];return(P===void 0||e.every(P,e.isDecorator))&&(L===void 0||e.isArray(L))&&(H===void 0||!e.isArray(H))&&(G===void 0||e.isArray(G))&&(ge===void 0||e.isTypeNode(ge))}}).deprecate({1:v}).finish(),R.updateTypeAliasDeclaration=e.buildOverload("updateTypeAliasDeclaration").overload({0:function(u,P,L,H,G){return te(u,P,L,H,G)},1:function(u,P,L,H,G,ge){return te(u,L,H,G,ge)}}).bind({0:function(u){var P=u[1],L=u[2],H=u[3],G=u[4],ge=u[5];return ge===void 0&&(P===void 0||e.every(P,e.isModifier))&&(L===void 0||!e.isArray(L))&&(H===void 0||e.isArray(H))&&(G===void 0||!e.isArray(G))},1:function(u){var P=u[1],L=u[2],H=u[3],G=u[4],ge=u[5];return(P===void 0||e.every(P,e.isDecorator))&&(L===void 0||e.isArray(L))&&(H===void 0||!e.isArray(H))&&(G===void 0||e.isArray(G))&&(ge===void 0||e.isTypeNode(ge))}}).deprecate({1:v}).finish(),R.createEnumDeclaration=e.buildOverload("createEnumDeclaration").overload({0:function(u,P,L){return j(u,P,L)},1:function(u,P,L,H){return j(P,L,H)}}).bind({0:function(u){var P=u[0],L=u[1],H=u[2],G=u[3];return G===void 0&&(P===void 0||e.every(P,e.isModifier))&&(L===void 0||!e.isArray(L))&&(H===void 0||e.isArray(H))},1:function(u){var P=u[0],L=u[1],H=u[2],G=u[3];return(P===void 0||e.every(P,e.isDecorator))&&(L===void 0||e.isArray(L))&&(H===void 0||!e.isArray(H))&&(G===void 0||e.isArray(G))}}).deprecate({1:v}).finish(),R.updateEnumDeclaration=e.buildOverload("updateEnumDeclaration").overload({0:function(u,P,L,H){return O(u,P,L,H)},1:function(u,P,L,H,G){return O(u,L,H,G)}}).bind({0:function(u){var P=u[1],L=u[2],H=u[3],G=u[4];return G===void 0&&(P===void 0||e.every(P,e.isModifier))&&(L===void 0||!e.isArray(L))&&(H===void 0||e.isArray(H))},1:function(u){var P=u[1],L=u[2],H=u[3],G=u[4];return(P===void 0||e.every(P,e.isDecorator))&&(L===void 0||e.isArray(L))&&(H===void 0||!e.isArray(H))&&(G===void 0||e.isArray(G))}}).deprecate({1:v}).finish(),R.createModuleDeclaration=e.buildOverload("createModuleDeclaration").overload({0:function(u,P,L,H){return I(u,P,L,H)},1:function(u,P,L,H,G){return I(P,L,H,G)}}).bind({0:function(u){var P=u[0],L=u[1],H=u[2],G=u[3],ge=u[4];return ge===void 0&&(P===void 0||e.every(P,e.isModifier))&&L!==void 0&&!e.isArray(L)&&(H===void 0||e.isModuleBody(H))&&(G===void 0||typeof G=="number")},1:function(u){var P=u[0],L=u[1],H=u[2],G=u[3],ge=u[4];return(P===void 0||e.every(P,e.isDecorator))&&(L===void 0||e.isArray(L))&&H!==void 0&&e.isModuleName(H)&&(G===void 0||typeof G=="object")&&(ge===void 0||typeof ge=="number")}}).deprecate({1:v}).finish(),R.updateModuleDeclaration=e.buildOverload("updateModuleDeclaration").overload({0:function(u,P,L,H){return q(u,P,L,H)},1:function(u,P,L,H,G){return q(u,L,H,G)}}).bind({0:function(u){var P=u[1],L=u[2],H=u[3],G=u[4];return G===void 0&&(P===void 0||e.every(P,e.isModifier))&&(L===void 0||!e.isArray(L))&&(H===void 0||e.isModuleBody(H))},1:function(u){var P=u[1],L=u[2],H=u[3],G=u[4];return(P===void 0||e.every(P,e.isDecorator))&&(L===void 0||e.isArray(L))&&H!==void 0&&e.isModuleName(H)&&(G===void 0||e.isModuleBody(G))}}).deprecate({1:v}).finish(),R.createImportEqualsDeclaration=e.buildOverload("createImportEqualsDeclaration").overload({0:function(u,P,L,H){return Q(u,P,L,H)},1:function(u,P,L,H,G){return Q(P,L,H,G)}}).bind({0:function(u){var P=u[0],L=u[1],H=u[2],G=u[3],ge=u[4];return ge===void 0&&(P===void 0||e.every(P,e.isModifier))&&(L===void 0||typeof L=="boolean")&&typeof H!="boolean"&&typeof G!="string"},1:function(u){var P=u[0],L=u[1],H=u[2],G=u[3],ge=u[4];return(P===void 0||e.every(P,e.isDecorator))&&(L===void 0||e.isArray(L))&&(H===void 0||typeof H=="boolean")&&(typeof G=="string"||e.isIdentifier(G))&&ge!==void 0&&e.isModuleReference(ge)}}).deprecate({1:v}).finish(),R.updateImportEqualsDeclaration=e.buildOverload("updateImportEqualsDeclaration").overload({0:function(u,P,L,H,G){return Z(u,P,L,H,G)},1:function(u,P,L,H,G,ge){return Z(u,L,H,G,ge)}}).bind({0:function(u){var P=u[1],L=u[2],H=u[3],G=u[4],ge=u[5];return ge===void 0&&(P===void 0||e.every(P,e.isModifier))&&(L===void 0||typeof L=="boolean")&&typeof H!="boolean"&&typeof G!="string"},1:function(u){var P=u[1],L=u[2],H=u[3],G=u[4],ge=u[5];return(P===void 0||e.every(P,e.isDecorator))&&(L===void 0||e.isArray(L))&&(H===void 0||typeof H=="boolean")&&(typeof G=="string"||e.isIdentifier(G))&&ge!==void 0&&e.isModuleReference(ge)}}).deprecate({1:v}).finish(),R.createImportDeclaration=e.buildOverload("createImportDeclaration").overload({0:function(u,P,L,H){return he(u,P,L,H)},1:function(u,P,L,H,G){return he(P,L,H,G)}}).bind({0:function(u){var P=u[0],L=u[1],H=u[2],G=u[3],ge=u[4];return ge===void 0&&(P===void 0||e.every(P,e.isModifier))&&(L===void 0||!e.isArray(L))&&H!==void 0&&e.isExpression(H)&&(G===void 0||e.isAssertClause(G))},1:function(u){var P=u[0],L=u[1],H=u[2],G=u[3],ge=u[4];return(P===void 0||e.every(P,e.isDecorator))&&(L===void 0||e.isArray(L))&&(H===void 0||e.isImportClause(H))&&G!==void 0&&e.isExpression(G)&&(ge===void 0||e.isAssertClause(ge))}}).deprecate({1:v}).finish(),R.updateImportDeclaration=e.buildOverload("updateImportDeclaration").overload({0:function(u,P,L,H,G){return x(u,P,L,H,G)},1:function(u,P,L,H,G,ge){return x(u,L,H,G,ge)}}).bind({0:function(u){var P=u[1],L=u[2],H=u[3],G=u[4],ge=u[5];return ge===void 0&&(P===void 0||e.every(P,e.isModifier))&&(L===void 0||!e.isArray(L))&&(H===void 0||e.isExpression(H))&&(G===void 0||e.isAssertClause(G))},1:function(u){var P=u[1],L=u[2],H=u[3],G=u[4],ge=u[5];return(P===void 0||e.every(P,e.isDecorator))&&(L===void 0||e.isArray(L))&&(H===void 0||e.isImportClause(H))&&G!==void 0&&e.isExpression(G)&&(ge===void 0||e.isAssertClause(ge))}}).deprecate({1:v}).finish(),R.createExportAssignment=e.buildOverload("createExportAssignment").overload({0:function(u,P,L){return E(u,P,L)},1:function(u,P,L,H){return E(P,L,H)}}).bind({0:function(u){var P=u[0],L=u[1],H=u[2],G=u[3];return G===void 0&&(P===void 0||e.every(P,e.isModifier))&&(L===void 0||typeof L=="boolean")&&typeof H=="object"},1:function(u){var P=u[0],L=u[1],H=u[2],G=u[3];return(P===void 0||e.every(P,e.isDecorator))&&(L===void 0||e.isArray(L))&&(H===void 0||typeof H=="boolean")&&G!==void 0&&e.isExpression(G)}}).deprecate({1:v}).finish(),R.updateExportAssignment=e.buildOverload("updateExportAssignment").overload({0:function(u,P,L){return A(u,P,L)},1:function(u,P,L,H){return A(u,L,H)}}).bind({0:function(u){var P=u[1],L=u[2],H=u[3];return H===void 0&&(P===void 0||e.every(P,e.isModifier))&&L!==void 0&&!e.isArray(L)},1:function(u){var P=u[1],L=u[2],H=u[3];return(P===void 0||e.every(P,e.isDecorator))&&(L===void 0||e.isArray(L))&&H!==void 0&&e.isExpression(H)}}).deprecate({1:v}).finish(),R.createExportDeclaration=e.buildOverload("createExportDeclaration").overload({0:function(u,P,L,H,G){return ne(u,P,L,H,G)},1:function(u,P,L,H,G,ge){return ne(P,L,H,G,ge)}}).bind({0:function(u){var P=u[0],L=u[1],H=u[2],G=u[3],ge=u[4],pe=u[5];return pe===void 0&&(P===void 0||e.every(P,e.isModifier))&&typeof L=="boolean"&&typeof H!="boolean"&&(G===void 0||e.isExpression(G))&&(ge===void 0||e.isAssertClause(ge))},1:function(u){var P=u[0],L=u[1],H=u[2],G=u[3],ge=u[4],pe=u[5];return(P===void 0||e.every(P,e.isDecorator))&&(L===void 0||e.isArray(L))&&typeof H=="boolean"&&(G===void 0||e.isNamedExportBindings(G))&&(ge===void 0||e.isExpression(ge))&&(pe===void 0||e.isAssertClause(pe))}}).deprecate({1:v}).finish(),R.updateExportDeclaration=e.buildOverload("updateExportDeclaration").overload({0:function(u,P,L,H,G,ge){return W(u,P,L,H,G,ge)},1:function(u,P,L,H,G,ge,pe){return W(u,L,H,G,ge,pe)}}).bind({0:function(u){var P=u[1],L=u[2],H=u[3],G=u[4],ge=u[5],pe=u[6];return pe===void 0&&(P===void 0||e.every(P,e.isModifier))&&typeof L=="boolean"&&typeof H!="boolean"&&(G===void 0||e.isExpression(G))&&(ge===void 0||e.isAssertClause(ge))},1:function(u){var P=u[1],L=u[2],H=u[3],G=u[4],ge=u[5],pe=u[6];return(P===void 0||e.every(P,e.isDecorator))&&(L===void 0||e.isArray(L))&&typeof H=="boolean"&&(G===void 0||e.isNamedExportBindings(G))&&(ge===void 0||e.isExpression(ge))&&(pe===void 0||e.isAssertClause(pe))}}).deprecate({1:v}).finish()}var y=e.createNodeFactory;e.createNodeFactory=function(R,re){var U=y(R,re);return F(U),U},F(e.factory)})(fr||(fr={}));var fr;(function(e){typeof console<"u"&&(e.Debug.loggingHost={log:function(t,v){switch(t){case e.LogLevel.Error:return console.error(v);case e.LogLevel.Warning:return console.warn(v);case e.LogLevel.Info:return console.log(v);case e.LogLevel.Verbose:return console.log(v)}}})})(fr||(fr={}))});var HF={};rF(HF,{RunMode:()=>Qm,getChecksumConfig:()=>gS,getLogin:()=>O1,init:()=>GF});module.exports=nF(HF);var vh=(g=>(g[g.Element=0]="Element",g[g.VisibleElement=1]="VisibleElement",g[g.AtPointElement=2]="AtPointElement",g))(vh||{});var S6=require("path");var Qm=(g=>(g.Normal="normal",g.Heal="heal",g.Refactor="refactor",g))(Qm||{});var E1=(U=>(U.Locator="locator",U.GetByRole="getByRole",U.GetByText="getByText",U.GetByLabel="getByLabel",U.GetByPlaceholder="getByPlaceholder",U.GetByAltText="getByAltText",U.GetByTitle="getByTitle",U.GetByTestId="getByTestId",U))(E1||{}),k1=(y=>(y.First="first",y.Last="last",y.Nth="nth",y.Filter="filter",y.Or="or",y))(k1||{});var Qp=T1(require("path")),N1=require("fs");var yh=e=>new Promise(t=>setTimeout(t,e)),cS=async(e,t=1e3,v="action hang guard timed out")=>{let g="guard-timed-out",F=async()=>(await yh(t+1e3),g),y=await Promise.race([e,F()]);if(typeof y=="string"&&y===g)throw new Error(v);return y};function uS(e=5,t="0123456789abcdefghijklmnopqrstuvwxyzABCDEFGHIJKLMNOPQRSTUVWXYZ"){let v="";for(let g=e;g>0;--g)v+=t[Math.floor(Math.random()*t.length)];return v}async function P1(e,t){let v=_S(e,t),{ungzip:g}=lS(),F=await g((0,N1.readFileSync)(v));return JSON.parse(F)}function qv(e){return Qp.join(Qp.dirname(e),"..")}function _S(e,t){return Qp.join(iF(e),`${t}.checksum.esra`)}function iF(e){return Qp.join(dS(e),"esra")}function v6(e,t){return Qp.join(dS(e),"har",t)}function y6(e,t){return Qp.join(dS(e),"trace",`${t}.playwright-trace.zip`)}function dS(e){return Qp.join(e,"test-data")}function tF(){return{uploadAgentHOST:"localhost",uploadAgentPort:3e3}}var A1=async e=>{try{await cS(e,5e3)}catch{}},pS=e=>{let t=/\/\/.*/,v=/\/\*[\s\S]*?\*\//g;return e.replace(t,"").replace(v,"")};async function I1(e,t){Qc("Fetching selection data..");let g=async y=>t.evaluate(async R=>await window.checksum.testRunner.getSelectionDataForSelector(R),y),F=await g(e);if(F||(Qc("Failed, waiting for network idle..."),await A1(t.waitForLoadState("networkidle")),F=await g(e),F)||(Qc("Failed, waiting for element to be visible..."),await A1(t.locator(e).waitFor({state:"visible"})),F=await g(e),F)||(Qc("Failed, will wait 5000ms..."),await yh(5e3),F=await g(e),F))return F}async function w1(e,t,v,g=6e4){return t in e?cS(e[t](...v),g,"Execution timeout"):e}var h6=!1;function D6(e){h6=e}function Qc(...e){h6&&console.log(...e)}function fS(){return Qp.join(__dirname,"..","..","..","checksum")}function O1(e){try{let t=require(`${fS()}/login.ts`).default;return async v=>{await t(v,e)}}catch(t){throw console.warn("Could not find checksum login file. Please set login.ts file in your checksum folder"),t}}var Vv;function b6(){if(Vv)return Vv;let e;try{let t=(0,N1.existsSync)(`${fS()}/checksum.config.tmp.ts`)?"checksum.config.tmp.ts":"checksum.config.ts";e=require(`${fS()}/${t}`).default}catch{console.warn("Could not find checksum config file, will run with defaults"),e=gS()}return e}function gS(e={}){return Vv={...{apiKey:void 0,runMode:"normal",baseURL:void 0,apiURL:void 0,username:void 0,password:void 0,options:{useChecksumSelectors:!0,useChecksumAI:!1,newAssertionsEnabled:!0,useMockData:!1,printLogs:!1,writeTraceFile:!1},...tF()},...e},(!Vv.username||!Vv.password)&&console.warn("Username and/or password missing in config file"),Vv}var lm=class{constructor(t,v,g={generateSelectionData:!1}){this.page=t;this.phaseSetter=v;this.options=g;this.page=t,this.phaseSetter=v}addMetadata(t){}async execute(t,v,g){return w1(t,v,g)}async executeWithSelectors(t,v,g,F=void 0,y={}){for(let{selector:R,tag:re}of t){this.phaseSetter({phase:F,payload:{selector:R,...y}});let U=this.page.locator(R);this.log(`Running with selector=${R})`);let d=!1;["check","uncheck"].includes(v)&&re!=="input"&&(d=!0);let m=this.generateSelectionDataForSelector(R);if(await this.execute(U,d?"click":v,g)===!1){this.log("Fallback selector timeout");continue}return m}}async generateSelectionDataForSelector(t){let{generateSelectionData:v}=this.options;if(!v)return{selector:t,generatedLocator:void 0,esraMetadata:void 0};try{let g=await I1(t,this.page);if(!g)throw new Error(`[generateSelectionDataForSelector] Failed to generate selection data for selector ${t}`);return g}catch(g){throw this.log(g.message),g}}log(...t){Qc(...t)}};var F1=require("path"),hh=class extends lm{constructor(){super(...arguments);this.locatorTypeEnumToFieldMap={[0]:"element",[1]:"visibleElement",[2]:"atPointElement"}}init(v){return this.esraData={...this.esraData,minSelectionScore:.5,...v},this}async resolve(v){try{let{method:g,args:F}=v,{checksumId:y}=this.esraData,R=await this.getActionIdToESRAMap();if(!(y in R)){let m=`No ESRA metadata found for id ${y}`;throw new Error(m)}let re=await this.getTestIdsForLocator(R[y]),{elementDataMap:U}=await this.getSelectors(re),d=await this.executeWithSelectors(Object.values(U),g,F,"esra-action");if(d)return[d];throw new Error("Exhausted ESRA selectors")}catch(g){this.log(g.message);return}}async getActionIdToESRAMap(){try{this.actionIdToESRAMap||(this.actionIdToESRAMap=await P1((0,F1.join)((0,F1.dirname)(this.esraData.fileName),".."),this.esraData.testId))}catch(v){return super.log("Could not read ESRA metadata file, ",v),{}}return this.actionIdToESRAMap}async getSelectors(v){let g=[],F={};if(!v)return{selectors:g,elementDataMap:F};for(let y in Object.keys(vh)){let R=v.testIds[this.locatorTypeEnumToFieldMap[y]];if(!R)continue;let re=`[data-checksum-testid="${R}"]`;g.push(re),F[re]={...v.elementData[this.locatorTypeEnumToFieldMap[y]],selector:v.selectors[this.locatorTypeEnumToFieldMap[y]]}}for(let y in Object.keys(vh)){let R=v.selectors[this.locatorTypeEnumToFieldMap[y]];R&&(g.push(R),F[R]={...v.elementData[this.locatorTypeEnumToFieldMap[y]],selector:R})}return this.log("Selectors for ESRA metadata:",g),{selectors:g,elementDataMap:F}}async getTestIdsForLocator(v,g={}){let{cachedSelector:F=void 0,retriesLeft:y=3,retryMaxTimeout:R=3e3,staticMetadata:re}=g;this.phaseSetter({phase:"esra-search"});let U=await this.page.evaluate(async({esraMetadata:d,cachedSelector:m,staticMetadata:le,minSelectionScore:ue})=>await window.checksum.testRunner.getMatchingElementSelectionData(d,{minSelectionScore:ue,cachedSelector:m,staticMetadata:le}),{esraMetadata:v,cachedSelector:F,staticMetadata:re,minSelectionScore:this.esraData.minSelectionScore});if(!U){if(y>0)return this.log("[getTestIdsForLocator] no match found, waiting and retrying..."),await yh(R/y),this.getTestIdsForLocator(v,{...g,retriesLeft:y-1});this.log("[getTestIdsForLocator] failed to locate")}return U}toString(){return`ESRA Fallback (checksumId: ${this.esraData.checksumId})`}};var Dh=class extends lm{init(){return this}async resolve(t){try{let{locator:v,method:g,args:F}=t;if(!["check","uncheck"].includes(g))return;this.phaseSetter({phase:"force"});let y=!1;for(let re of Array.from(F))if(typeof re=="object"){re.force=!0,y=!0;break}if(y||(F=Array.from(F),F.push({force:!0})),await this.execute(v,g,F)!==!1)return[{selector:v._selector,generatedLocator:void 0,esraMetadata:void 0}];this.log("Locator timed out, ")}catch(v){this.log("initiateFallbackSequence exception, ",v);return}}toString(){return"Force Fallback"}};var qf=class extends lm{constructor(){super(...arguments);this.config={llm:{persistChecksumIds:!1}};this.runningChecksumIdIndex=[0];this.steps=[];this.selectionData=[];this.finish=!1;this.actionsCounter=1;this.mockServer=!1}init(v){let{goal:g,apiKey:F,apiUrl:y}=v;return qf.goal=g,qf.apiKey=F,y&&(qf.API_BASE_URL=y),this}async resolve(){try{if(await this.initSession(),!await this.iterate()){this.log("[LLMFallback] LLMFallback failed");return}return this.selectionData}catch(v){this.log("[LLMFallback] Error resolving",v);return}}async iterate(){let v=!1,g=qf.CLIENT_MAX_ITERATIONS;do{let{reducedHTML:F,flashingHTML:y,elementsForNodeInterpretation:R}=await this.page.evaluate(async([U])=>window.checksum.testGenerator.reduceHTML({overrideInteractableElementsSelectors:U}),[[void 0]]),re=await this.getNextAction({reducedHTML:F,flashingHTML:y,elementsForNodeInterpretation:R,hasPreviousActionFailed:v});if(re.thought==="finish")return this.log("[LLMFallback] Received finish step"),this.steps.length>0;if(["failed","fail"].includes(re.thought))return this.log("[LLMFallback] Received failed signal, will quit"),!1;re={...re,...await this.getPlaywrightLocatorForChecksumId(re.action.checksumid)};try{let U=await this.executeWithSelectors([{...re,tag:null}],re.action.type,["fill","navigate"].includes(re.action.type)?[re.action.value]:[],"llm-action",{thought:re.thought});if(U)v=!1,this.selectionData.push({...U,method:{name:re.action.type,args:["fill","navigate"].includes(re.action.type)?[re.action.value]:[]},comment:re.thought});else throw new Error("Action failed")}catch(U){this.log("[LLMFallback] Error while executing selector",U.message),v=!0;continue}if(this.steps.push(re),--g<=0){this.log("[LLMFallback] Maximum repeatition reached");break}}while(!0);return!1}async getNextAction({reducedHTML:v,flashingHTML:g,hasPreviousActionFailed:F,elementsForNodeInterpretation:y}){let{apiKey:R}=qf;if(this.mockServer)return this.finish?{thought:"finish"}:(--this.actionsCounter===0&&(this.finish=!0),{thought:"mock-thought",action:{type:"click",checksumid:"10"}});let re={reduction:{reducedHTML:v,flashingHTML:g,elementsForNodeInterpretation:y},currentURL:this.page.url()};try{let d=await(await fetch(`${qf.API_BASE_URL}/iterate`,{method:"POST",headers:{"Content-Type":"application/json",ChecksumAppCode:qf.apiKey},body:JSON.stringify({appName:R,sessionId:this.sessionId,iterationData:re,hasPreviousActionFailed:F})})).json();return this.log("[LLMFallback] Received next action",d),d}catch(U){throw this.log("[LLMFallback] Error calling iterate",U),U}}async initSession(){let{apiKey:v,goal:g,thoughts:F}=qf;if(this.log("[LLMFallback] Calling init session...",{appName:v,goal:g,thoughts:F}),this.mockServer){this.sessionId="mock-session-id";return}let y={storyTitle:g,thoughtsAndActions:{previous:F.slice(0,Math.max(F.length-1,0)).map(R=>({thought:R})),failing:{thought:F[F.length-1]},next:[]}};this.phaseSetter({phase:"llm-prompt",payload:{thought:y.thoughtsAndActions.failing.thought}});try{let R=await fetch(`${qf.API_BASE_URL}/init`,{method:"POST",headers:{"Content-Type":"application/json",ChecksumAppCode:qf.apiKey},body:JSON.stringify({appName:v,data:y})});this.sessionId=await R.text(),this.log("[LLMFallback] Session ID",this.sessionId)}catch(R){throw this.log("[LLMFallback] Error calling init session",R),R}}addMetadata(v){qf.thoughts.push(v.thought)}async getPlaywrightLocatorForChecksumId(v){return!v||isNaN(Number(v))?(this.log(`[getPlaywrightSelectorForChecksumId] Detected invalid checksum id : ${v},,,`),{selector:v}):(!this.config.llm.persistChecksumIds&&this.runningChecksumIdIndex.length>1&&Number(v)<this.runningChecksumIdIndex[this.runningChecksumIdIndex.length-2]&&this.log(`[getPlaywrightSelectorForChecksumId] Detected invalid checksum id, possibly from previous prompt: ${v},
|
|
270
|
+
current running checksum id index: ${this.runningChecksumIdIndex[this.runningChecksumIdIndex.length-1]}`),await this.page.evaluate(async F=>window.checksum.testGenerator.getSelectorForChecksumId(F),v))}getFailedThought(){return qf.thoughts[qf.thoughts.length-1]}toString(){return`LLM Fallback ${this.getFailedThought()}`}},Xp=qf;Xp.API_BASE_URL="http://localhost:3000/client-api/runtime/ai-fallback",Xp.CLIENT_MAX_ITERATIONS=10,Xp.thoughts=[];var C6=T1(require("path")),x6=require("fs"),aF="checksum-playwright-runtime.js",oF=__dirname+"/checksumlib.js";var Cg=class{constructor(t,v="normal",g,F,y,R,re){this.page=t;this.runMode=v;this.testIdSelector=g;this.codeMirror=F;this.options=y;this.apiKey=R;this.apiURL=re;this.locatorTypeEnumToFieldMap={[0]:"element",[1]:"visibleElement",[2]:"atPointElement"};this.minSelectionScore=.5;this.phasePayload=void 0;this.locatorStack=[];this.fallbacks=[];this.checksumStepStack=[];this.phaseMap={};this.setPhase=t=>{let{phase:v,payload:g,clear:F}=t;F&&(this.phase=void 0,this.phasePayload=void 0),v&&(this.phase=v),g&&(this.phasePayload=g)};this.registerPageEvents(),this.resetFallbacks(),this.proxy=new Proxy(this,{get:function(d,m){return d.getPageMethod(m)}}),D6(y.printLogs)}async prepareAPIMock(){let t={GET:0,POST:0,PUT:0,DELETE:0},v=C6.join(v6(qv(this.testInfo.file),this.checksumTestId),"test.har");if(!(0,x6.existsSync)(v)){Qc(`Could not find har file ${v} for test`);return}await this.page.routeFromHAR(v,{url:"*/**",notFound:"fallback",update:!1});let g=this.page._routes[0].handler;await this.page.route("**/*",F=>{let y=F.request().headers(),R=F.request().method();y["Checksum-Id"]=(++t[R]).toString(),F.request()._applyFallbackOverrides({headers:y}),g(F)})}registerPageEvents(){this.page.on("framenavigated",async t=>{t===this.page.mainFrame()&&(this.navigationPromise=new Promise((v,g)=>this.loadScript().then(v).catch(g)))}),this.page.context().tracing.start({screenshots:!0,snapshots:!0})}getPageMethod(t){return this.phase=void 0,typeof this[t]=="function"?this[t].bind(this):!Object.values(E1).includes(t)||!this.testInfo?this.page[t]:(this.locatorStack.length===0&&(this.pageInitialCallInTestFile=this.getFirstStackTraceFromTestFile()),this.pushToLocatorStack([{type:t,base:this.page,line:this.pageInitialCallInTestFile.line}]),function(g,F){try{return this.executeLocator(g,F)}catch(y){throw this.popLocatorChain(),y}}.bind(this))}static async init(t,v,{runMode:g="normal",testIdSelector:F=void 0,apiKey:y,apiURL:R,options:re={}}){return new Cg(t,g,F,v,{useChecksumSelectors:!0,useChecksumAI:!0,newAssertionsEnabled:!0,writeTraceFile:!0,useMockData:!1,printLogs:!1,...re},y,R).proxy}popLocatorChain(){return this.locatorStack.pop()}async initWithTest(t){this.testInfo=t,this.phase="script",this.setupStepInterceptors()}async onTestComplete(){if(this.options.writeTraceFile){let t=y6(qv(this.testInfo.file),this.checksumTestId);return await this.page.context().tracing.stop({path:t}),t}}async testId(t){this.checksumTestId=t,(this.options.useMockData||this.runMode==="refactor")&&await this.prepareAPIMock()}checksumSelector(t){return this.options.useChecksumSelectors&&(this.fallbacks.push(this.constructFallback(hh).init({checksumId:t,fileName:this.testInfo.file,testId:this.checksumTestId})),this.sortFallbacks()),this.checksumStepId=t,this.proxy}checksumAI(...t){if(t.length===0)throw new Error("checksumAI missing arguments");if(!this.options.useChecksumAI)return this.proxy;let{apiKey:v,apiURL:g}=this;if(this.fallbacks.push(this.constructFallback(Xp).init({goal:this.testInfo.title,apiKey:v,apiURL:g})),this.sortFallbacks(),this.fallbacks.filter(F=>F instanceof Xp).forEach(F=>F.addMetadata({thought:t[0]})),this.checksumStepInitialCallInTestFile=this.getFirstStackTraceFromTestFile(),t.length===1)return this.proxy;if(typeof t[1]!="function")throw new Error("Second argument for withChecksumStep must be a function");this.checksumStepStack.push(t[0]);try{console.log("=== running test function");let F=this;return async function(){await t[1](),console.log("==== done running test function"),F.checksumStepStack.pop()}()}catch(F){console.log(F),this.checksumStepStack.pop()}}async loadScript(){try{return this.navigationPromise&&await this.navigationPromise,await this.page.addScriptTag({path:oF}),await this.page.evaluate(async({initModules:t,ESRAselectionRules:v})=>{window.checksum.testRunner.init(v,[],t)},{ESRAselectionRules:{testIdSelector:this.testIdSelector},initModules:{assertionGenerator:!0}}),Qc(`[init] init script loaded for ${this.page.url()}`),!0}catch{return!1}}pushToLocatorStack(t){this.locatorStack.push(t)}getCurrentLocatorChain(){if(this.locatorStack.length)return this.locatorStack[this.locatorStack.length-1]}getCurrentLocatorInChain(){let t=this.getCurrentLocatorChain();return t==null?void 0:t[t.length-1]}getMessage(t,{initialSelector:v,selector:g,thought:F}={}){switch(t){case"script":return"Firing up checksum";case"initial":return`${v} failed, trying some checksum magic...`;case"force":return"check/uncheck methods failed, falling back to click action";case"esra-search":return"Checksum is looking for potential alternatives to resolve the issue...";case"esra-action":return`AI: use selector ${g}`;case"llm-prompt":return`Checksum is trying to achieve step "${F}" using AI...`;case"llm-action":return`AI: "${F}" using selector "${g}"`;case"fail":return`Checksum couldn't resolve the issue executing ${v}`}}onFallbackSuccess(){let t=this.testInfo._steps[this.testInfo._steps.length-1];t&&!t.endWallTime&&t.complete({error:{message:`Failed to resolve ${this.initialLocatorTitle}`,stack:""}})}setupStepInterceptors(){let t=["checksum-page.ts","checksum-test-extension.ts","checksum-playwright-runtime.js","code-mirror.ts","utils.ts","fallback/esra-fallback.ts","fallback/force-fallback.ts","fallback/llm-fallback.ts"].map(R=>(0,S6.join)(__dirname,R)),v={},g=R=>{var U,d,m;return v[R.stepId]!==void 0?v[R.stepId]:R.location&&!t.includes(R.location.file)?!1:!!(R.stepId.includes(".evaluate@")||R.stepId.includes(".addScriptTag@")||(U=R.title)!=null&&U.includes("evaluate")||(d=R.title)!=null&&d.includes("addScriptTag")||(m=R.title)!=null&&m.includes("waitForLoadState")||R.category==="fixture")},F=this.testInfo._onStepBegin;this.testInfo._onStepBegin=R=>{if(!this.phase&&g(R)){v[R.stepId]=!0;return}return v[R.stepId]=!1,this.phase==="initial"&&(this.initialLocatorTitle=R.title,R.location=this.pageInitialCallInTestFile),R.title.startsWith("proxy.")&&(R.title=R.title.replace("proxy.","page.")),this.phase&&this.phase!=="initial"&&(this.phaseMap[R.stepId]={phase:this.phase,payload:this.phasePayload,initialLocatorTitle:this.initialLocatorTitle},R.location=void 0,R.title=this.getMessage(this.phase,{initialSelector:this.initialLocatorTitle,...this.phasePayload})),this.phase=void 0,this.phasePayload=void 0,F(R)};let y=this.testInfo._onStepEnd;this.testInfo._onStepEnd=R=>{if(!v[R.stepId]){if(this.phaseMap[R.stepId]){let{phase:re,initialLocatorTitle:U,payload:d}=this.phaseMap[R.stepId];re==="fail"&&(R.error={message:`Failed to resolve ${U}`,stack:""})}return y(R)}}}getFirstStackTraceFromTestFile(){let t=this.getTestFileStackTrace()[0];if(!t)throw new Error(`Could not find test file location from stack trace ${Cg.getStackTrace()}`);let g=[/\((.*):(\d+):(\d+)\)$/,/.*at (.*):(\d+):(\d+)$/].map(re=>re.exec(t)).find(re=>re!==null);if(!g)throw new Error(`Could not find test file location from stack trace ${t}`);let[,F,y,R]=g;return{file:F,line:parseInt(y),column:parseInt(R)}}getTestFileStackTrace(){return Cg.getStackTrace().filter(v=>v.includes(this.testInfo.file))}isCalledDirectlyFromTestFunction(){let t=this.getTestFileStackTrace();if(t.length!==1+this.checksumStepStack.length)return!1;let v=t[0],g=/.*at (.*):(\d+):(\d+)$/;return this.checksumStepStack.length===0&&!g.exec(v)?!1:!this.isCalledThroughMethodInAnotherFile(v)}isCalledThroughMethodInAnotherFile(t){let v=Cg.getStackTrace(),g=["node:internal","/node_modules/@playwright"],F=v.indexOf(t)-1;for(;F>=0&&g.some(R=>v[F].includes(R));)F--;let y=v[F];return!y.includes("checksum-page.ts")&&!y.includes(aF)}static getStackTrace(){return new Error().stack.split(`
|
|
271
271
|
`)}getLocator(t,v){let g=this.getCurrentLocatorInChain();return g.base[g.type](t,v)}executeLocator(t,v){try{Qc(`
|
|
272
272
|
Executing locator ${this.getCurrentLocatorInChain().type} with ${typeof t=="string"?`selector ${t}`:"locator"}`);let g=this.getLocator(t,v);return new Proxy(g,{get:function(y,R){return this.getLocatorMethod(g,y,R)}.bind(this)})}catch(g){Qc("Failed to locate",g)}}getLocatorMethod(t,v,g){return g==="constructor"?function(...y){return this.popLocatorChain(),v.constructor(...y)}:g in v&&typeof v[g]!="function"||g===Symbol.toPrimitive||g in Object?(this.popLocatorChain(),v[g]):[...Object.values(E1),...Object.values(k1)].includes(g)?g==="or"?(Qc("'Or' locator not supported, will execute normally"),this.popLocatorChain(),v[g]):(this.getCurrentLocatorChain().push({type:g,base:t}),function(...y){return this.executeLocator(...y)}.bind(this)):async function(...y){let R=await this.executeLocatorAction(t,g,y);return this.popLocatorChain(),R}.bind(this)}async executeLocatorAction(t,v,g){this.selector=t._selector;let F=this.getChecksumStepId();Qc("Executing",v,this.selector);let y=v==="_expect";try{Qc("Running initial locator..."),await this.navigationPromise,await this.page.evaluate(()=>!!window.checksum)||Qc("[loadScript] checksum libs missing, marking as failed"),await this.stepWillExecute(y),this.phase="initial";let re=await w1(t,v,g,this.getTimeout(v,g));if(re!==!1)return await this.onStepSuccess(F,v==="_expect"),re;await this.onStepFailure()}catch(R){Qc("Failed initial execution. Exception:",R.message)}return this.initiateFallbackSequence(F,t,v,g)}getChecksumStepId(){let t=this.checksumStepId;return this.checksumStepId=void 0,t}async stepWillExecute(t){this.selectionData=void 0,this.runMode==="refactor"&&(Qc(`stepWillExecute called for line ${this.pageInitialCallInTestFile.line}`),this.isCalledDirectlyFromTestFunction()&&(await this.evaluateWithChecksum(async()=>await window.checksum.testRunner.startMonitoringForAssertions()),this.selectionData=[await I1(this.selector,this.page)].filter(v=>v),Object.values(this.selectionData).length===0?Qc(`Failed fetching selection data ${t?"- maybe because it is not visible and running inside expect":""}`):Qc("Successfully fetched selection data")))}async onStepSuccess(t,v,g=!1){var U,d,m,le;let F=(U=this.fallbacks.find(ue=>ue instanceof Xp))==null?void 0:U.getFailedThought();if(this.resetFallbacks(),this.runMode==="normal"||this.runMode==="heal"&&!g||!this.codeMirror||!this.getCurrentLocatorChain())return;if(!this.isCalledDirectlyFromTestFunction()){Qc("<!> Step called from helper function, will not refactor step");return}if(this.runMode==="refactor"&&!this.selectionData.length){Qc("Failed fetching selection data, will not refactor step");return}Qc("Will update in-memory code"+(this.selectionData&&this.selectionData.length>0?`
|
|
273
273
|
locators:
|