@loxia-labs/loxia-autopilot-one 1.0.4 → 1.0.5

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
Files changed (116) hide show
  1. package/README.md +1 -1
  2. package/bin/cli.js +1 -1
  3. package/bin/loxia-terminal-v2.js +1 -1
  4. package/bin/loxia-terminal.js +1 -1
  5. package/bin/start-with-terminal.js +1 -1
  6. package/package.json +1 -1
  7. package/scripts/install-scanners.js +1 -1
  8. package/src/analyzers/CSSAnalyzer.js +1 -1
  9. package/src/analyzers/ConfigValidator.js +1 -1
  10. package/src/analyzers/ESLintAnalyzer.js +1 -1
  11. package/src/analyzers/JavaScriptAnalyzer.js +1 -1
  12. package/src/analyzers/PrettierFormatter.js +1 -1
  13. package/src/analyzers/PythonAnalyzer.js +1 -1
  14. package/src/analyzers/SecurityAnalyzer.js +1 -1
  15. package/src/analyzers/TypeScriptAnalyzer.js +1 -1
  16. package/src/analyzers/codeCloneDetector/analyzer.js +1 -1
  17. package/src/analyzers/codeCloneDetector/detector.js +1 -1
  18. package/src/analyzers/codeCloneDetector/index.js +1 -1
  19. package/src/analyzers/codeCloneDetector/parser.js +1 -1
  20. package/src/analyzers/codeCloneDetector/reporter.js +1 -1
  21. package/src/analyzers/codeCloneDetector/scanner.js +1 -1
  22. package/src/core/agentPool.js +1 -1
  23. package/src/core/agentScheduler.js +1 -1
  24. package/src/core/contextManager.js +1 -1
  25. package/src/core/messageProcessor.js +1 -1
  26. package/src/core/orchestrator.js +1 -1
  27. package/src/core/stateManager.js +1 -1
  28. package/src/index.js +1 -1
  29. package/src/interfaces/cli.js +1 -1
  30. package/src/interfaces/terminal/__tests__/smoke/advancedFeatures.test.js +1 -1
  31. package/src/interfaces/terminal/__tests__/smoke/agentControl.test.js +1 -1
  32. package/src/interfaces/terminal/__tests__/smoke/agents.test.js +1 -1
  33. package/src/interfaces/terminal/__tests__/smoke/components.test.js +1 -1
  34. package/src/interfaces/terminal/__tests__/smoke/connection.test.js +1 -1
  35. package/src/interfaces/terminal/__tests__/smoke/enhancements.test.js +1 -1
  36. package/src/interfaces/terminal/__tests__/smoke/imports.test.js +1 -1
  37. package/src/interfaces/terminal/__tests__/smoke/messages.test.js +1 -1
  38. package/src/interfaces/terminal/__tests__/smoke/tools.test.js +1 -1
  39. package/src/interfaces/terminal/api/apiClient.js +1 -1
  40. package/src/interfaces/terminal/api/messageRouter.js +1 -1
  41. package/src/interfaces/terminal/api/session.js +1 -1
  42. package/src/interfaces/terminal/api/websocket.js +1 -1
  43. package/src/interfaces/terminal/components/AgentCreator.js +1 -1
  44. package/src/interfaces/terminal/components/AgentEditor.js +1 -1
  45. package/src/interfaces/terminal/components/AgentSwitcher.js +1 -1
  46. package/src/interfaces/terminal/components/ErrorBoundary.js +1 -1
  47. package/src/interfaces/terminal/components/ErrorPanel.js +1 -1
  48. package/src/interfaces/terminal/components/Header.js +1 -1
  49. package/src/interfaces/terminal/components/HelpPanel.js +1 -1
  50. package/src/interfaces/terminal/components/InputBox.js +1 -1
  51. package/src/interfaces/terminal/components/Layout.js +1 -1
  52. package/src/interfaces/terminal/components/LoadingSpinner.js +1 -1
  53. package/src/interfaces/terminal/components/MessageList.js +1 -1
  54. package/src/interfaces/terminal/components/MultilineTextInput.js +1 -1
  55. package/src/interfaces/terminal/components/SearchPanel.js +1 -1
  56. package/src/interfaces/terminal/components/SettingsPanel.js +1 -1
  57. package/src/interfaces/terminal/components/StatusBar.js +1 -1
  58. package/src/interfaces/terminal/components/TextInput.js +1 -1
  59. package/src/interfaces/terminal/config/agentEditorConstants.js +1 -1
  60. package/src/interfaces/terminal/config/constants.js +1 -1
  61. package/src/interfaces/terminal/index.js +1 -1
  62. package/src/interfaces/terminal/state/useAgentControl.js +1 -1
  63. package/src/interfaces/terminal/state/useAgents.js +1 -1
  64. package/src/interfaces/terminal/state/useConnection.js +1 -1
  65. package/src/interfaces/terminal/state/useMessages.js +1 -1
  66. package/src/interfaces/terminal/state/useTools.js +1 -1
  67. package/src/interfaces/terminal/utils/debugLogger.js +1 -1
  68. package/src/interfaces/terminal/utils/settingsStorage.js +1 -1
  69. package/src/interfaces/terminal/utils/theme.js +1 -1
  70. package/src/interfaces/webServer.js +1 -1
  71. package/src/modules/fileExplorer/controller.js +1 -1
  72. package/src/modules/fileExplorer/index.js +1 -1
  73. package/src/modules/fileExplorer/middleware.js +1 -1
  74. package/src/modules/fileExplorer/routes.js +1 -1
  75. package/src/services/aiService.js +1 -1
  76. package/src/services/apiKeyManager.js +1 -1
  77. package/src/services/benchmarkService.js +1 -1
  78. package/src/services/budgetService.js +1 -1
  79. package/src/services/contextInjectionService.js +1 -1
  80. package/src/services/conversationCompactionService.js +1 -1
  81. package/src/services/errorHandler.js +1 -1
  82. package/src/services/fileAttachmentService.js +1 -1
  83. package/src/services/modelRouterService.js +1 -1
  84. package/src/services/modelsService.js +1 -1
  85. package/src/services/qualityInspector.js +1 -1
  86. package/src/services/tokenCountingService.js +1 -1
  87. package/src/tools/agentCommunicationTool.js +1 -1
  88. package/src/tools/agentDelayTool.js +1 -1
  89. package/src/tools/asyncToolManager.js +1 -1
  90. package/src/tools/baseTool.js +1 -1
  91. package/src/tools/browserTool.js +1 -1
  92. package/src/tools/cloneDetectionTool.js +1 -1
  93. package/src/tools/dependencyResolverTool.js +1 -1
  94. package/src/tools/fileContentReplaceTool.js +1 -1
  95. package/src/tools/fileSystemTool.js +1 -1
  96. package/src/tools/fileTreeTool.js +1 -1
  97. package/src/tools/imageTool.js +1 -1
  98. package/src/tools/importAnalyzerTool.js +1 -1
  99. package/src/tools/jobDoneTool.js +1 -1
  100. package/src/tools/seekTool.js +1 -1
  101. package/src/tools/staticAnalysisTool.js +1 -1
  102. package/src/tools/taskManagerTool.js +1 -1
  103. package/src/tools/terminalTool.js +1 -1
  104. package/src/tools/webTool.js +1 -1
  105. package/src/types/agent.js +1 -1
  106. package/src/types/contextReference.js +1 -1
  107. package/src/types/conversation.js +1 -1
  108. package/src/types/toolCommand.js +1 -1
  109. package/src/utilities/attachmentValidator.js +1 -1
  110. package/src/utilities/configManager.js +1 -1
  111. package/src/utilities/constants.js +1 -1
  112. package/src/utilities/directoryAccessManager.js +1 -1
  113. package/src/utilities/fileProcessor.js +1 -1
  114. package/src/utilities/logger.js +1 -1
  115. package/src/utilities/tagParser.js +1 -1
  116. package/src/utilities/toolConstants.js +1 -1
@@ -1 +1 @@
1
- function a0_0x5dcd(_0x1a5ce8,_0x3a12ba){_0x1a5ce8=_0x1a5ce8-0x14f;const _0x12424b=a0_0x1242();let _0x5dcd11=_0x12424b[_0x1a5ce8];if(a0_0x5dcd['pHbqsK']===undefined){var _0x44acd3=function(_0x263549){const _0x158073='abcdefghijklmnopqrstuvwxyzABCDEFGHIJKLMNOPQRSTUVWXYZ0123456789+/=';let _0x30a0a4='',_0x525afa='';for(let _0x2d43f0=0x0,_0x4ac676,_0x35b1c8,_0x5d8118=0x0;_0x35b1c8=_0x263549['charAt'](_0x5d8118++);~_0x35b1c8&&(_0x4ac676=_0x2d43f0%0x4?_0x4ac676*0x40+_0x35b1c8:_0x35b1c8,_0x2d43f0++%0x4)?_0x30a0a4+=String['fromCharCode'](0xff&_0x4ac676>>(-0x2*_0x2d43f0&0x6)):0x0){_0x35b1c8=_0x158073['indexOf'](_0x35b1c8);}for(let _0x183b3f=0x0,_0xae841f=_0x30a0a4['length'];_0x183b3f<_0xae841f;_0x183b3f++){_0x525afa+='%'+('00'+_0x30a0a4['charCodeAt'](_0x183b3f)['toString'](0x10))['slice'](-0x2);}return decodeURIComponent(_0x525afa);};a0_0x5dcd['LDElzi']=_0x44acd3,a0_0x5dcd['UcPput']={},a0_0x5dcd['pHbqsK']=!![];}const _0xdd11b8=_0x12424b[0x0],_0x126995=_0x1a5ce8+_0xdd11b8,_0x5308fc=a0_0x5dcd['UcPput'][_0x126995];return!_0x5308fc?(_0x5dcd11=a0_0x5dcd['LDElzi'](_0x5dcd11),a0_0x5dcd['UcPput'][_0x126995]=_0x5dcd11):_0x5dcd11=_0x5308fc,_0x5dcd11;}const a0_0x5702c7=a0_0x5dcd;function a0_0x1242(){const _0x37314e=['nduWmtmXsxbrD0n4','twvZC2fNzq','sMf2yvnJCMLWDcbHBMfSExnPCYbJB21WBgv0zwq','y29TCgLSzxjpChrPB25Z','Dg9mB3DLCKnHC2u','mti4nJyZoeP1EhHVza','u3LUDgf4igvYCM9Y','yw5HBhL6zxiTzxjYB3i','u0vwrvjjvfK','z2v0u3rHCNq','u2nYAxb0vgfYz2v0','zMXHDhrLBKrPywDUB3n0AwnnzxnZywDLvgv4Da','mJa5nZa5swDsB0T6','y29Kzq','CgfYC2veAwfNBM9ZDgLJCW','ndKYnJGXufLKtLPX','nJyYmdm4nxbssM1dzG','rvjst1i','tw9KDwXLs2LUza','tgf0zxn0','ntq0otu2rwTqvw5j','v0fstKLorW','zgLYBMfTzq','su1qt1ju','Bg9Nz2vY','y3jLyxrLu291CMnLrMLSzq','ChvZAa','mZu1ntC2mNDtsNDPzG','zM9YBwf0rgLHz25VC3rPyW','rgLHz25VC3rPy0nHDgvNB3j5','nLrOA3nKBW','C2v2zxjPDhK','z2v0u2vTyw50AwneAwfNBM9ZDgLJCW','BwvZC2fNzq','tw9KDwXLuMvZB2X1DgLVBKTPBMq','zMLSDgvY','zMLSzq','u3LUDgf4s2LUza','nZi4zLz0uwjT','rvnozxH0','u1Lovefy','C3rHCNq','q0furuDpuLK','y2f0zwDVCNK','BgvUz3rO','zMLSzu5HBwu','u3vNz2vZDgLVBG','y3jLyxrLuhjVz3jHBq','BgLUzq','uMvHy3q'];a0_0x1242=function(){return _0x37314e;};return a0_0x1242();}(function(_0x3b9c8e,_0x1f7078){const _0x6e7c93=a0_0x5dcd,_0x57daf3=_0x3b9c8e();while(!![]){try{const _0x5242ee=-parseInt(_0x6e7c93(0x17c))/0x1+-parseInt(_0x6e7c93(0x14f))/0x2+parseInt(_0x6e7c93(0x165))/0x3+-parseInt(_0x6e7c93(0x15e))/0x4+-parseInt(_0x6e7c93(0x15a))/0x5+-parseInt(_0x6e7c93(0x168))/0x6*(parseInt(_0x6e7c93(0x159))/0x7)+-parseInt(_0x6e7c93(0x170))/0x8*(-parseInt(_0x6e7c93(0x156))/0x9);if(_0x5242ee===_0x1f7078)break;else _0x57daf3['push'](_0x57daf3['shift']());}catch(_0x508704){_0x57daf3['push'](_0x57daf3['shift']());}}}(a0_0x1242,0xa6618));import a0_0x30a0a4 from'typescript';import a0_0x525afa from'path';import{STATIC_ANALYSIS}from'../utilities/constants.js';class JavaScriptAnalyzer{constructor(_0x2d43f0=null){const _0x50a2f1=a0_0x5dcd;this[_0x50a2f1(0x162)]=_0x2d43f0,this['compilerOptions']={'allowJs':!![],'checkJs':!![],'noEmit':!![],'jsx':a0_0x30a0a4['JsxEmit'][_0x50a2f1(0x17b)],'target':a0_0x30a0a4[_0x50a2f1(0x154)][_0x50a2f1(0x15d)],'module':a0_0x30a0a4[_0x50a2f1(0x15c)][_0x50a2f1(0x171)],'moduleResolution':a0_0x30a0a4[_0x50a2f1(0x16c)]['NodeJs'],'esModuleInterop':!![],'skipLibCheck':!![],'strict':![],'noImplicitAny':![]};}async['analyze'](_0x4ac676,_0x35b1c8,_0x5d8118={}){const _0x49b7c7=a0_0x5dcd;try{const _0x183b3f=[],_0xae841f=a0_0x30a0a4[_0x49b7c7(0x163)](_0x4ac676,_0x35b1c8,a0_0x30a0a4[_0x49b7c7(0x154)][_0x49b7c7(0x15d)],!![]),_0x2d645b=this['getSyntacticDiagnostics'](_0xae841f);_0x183b3f['push'](..._0x2d645b);const _0x1ef8c9=await this[_0x49b7c7(0x16a)](_0x4ac676,_0x35b1c8);return _0x183b3f['push'](..._0x1ef8c9),this['logger']?.['debug'](_0x49b7c7(0x17e),{'file':_0x4ac676,'totalDiagnostics':_0x183b3f[_0x49b7c7(0x176)],'errors':_0x183b3f['filter'](_0x492b20=>_0x492b20[_0x49b7c7(0x169)]===STATIC_ANALYSIS[_0x49b7c7(0x152)]['ERROR'])['length'],'warnings':_0x183b3f[_0x49b7c7(0x16d)](_0x5b09fd=>_0x5b09fd['severity']===STATIC_ANALYSIS[_0x49b7c7(0x152)]['WARNING'])[_0x49b7c7(0x176)]}),_0x183b3f;}catch(_0x582540){return this[_0x49b7c7(0x162)]?.['error']('JavaScript\x20analysis\x20failed',{'file':_0x4ac676,'error':_0x582540['message']}),[{'file':_0x4ac676,'line':0x0,'column':0x0,'severity':STATIC_ANALYSIS[_0x49b7c7(0x152)]['ERROR'],'rule':_0x49b7c7(0x151),'message':'Analysis\x20failed:\x20'+_0x582540['message'],'category':STATIC_ANALYSIS[_0x49b7c7(0x174)][_0x49b7c7(0x172)]}];}}['getSyntacticDiagnostics'](_0x303fa8){const _0x357824=a0_0x5dcd,_0x51f754=[],_0x257ab4=_0xf0b4a0=>{const _0x1db0a8=a0_0x5dcd;if(_0xf0b4a0['kind']===a0_0x30a0a4[_0x1db0a8(0x16f)]['Unknown']){const _0x490da8=_0x303fa8['getLineAndCharacterOfPosition'](_0xf0b4a0[_0x1db0a8(0x153)]());_0x51f754[_0x1db0a8(0x164)]({'file':_0x303fa8[_0x1db0a8(0x177)],'line':_0x490da8[_0x1db0a8(0x17a)]+0x1,'column':_0x490da8['character']+0x1,'severity':STATIC_ANALYSIS[_0x1db0a8(0x152)]['ERROR'],'rule':'syntax-error','message':_0x1db0a8(0x150),'category':STATIC_ANALYSIS[_0x1db0a8(0x174)][_0x1db0a8(0x172)],'fixable':![]});}a0_0x30a0a4['forEachChild'](_0xf0b4a0,_0x257ab4);};_0x257ab4(_0x303fa8);if(_0x303fa8['parseDiagnostics']&&_0x303fa8['parseDiagnostics']['length']>0x0)for(const _0x2d3099 of _0x303fa8[_0x357824(0x158)]){_0x51f754[_0x357824(0x164)](this['formatDiagnostic'](_0x2d3099,_0x303fa8));}return _0x51f754;}async[a0_0x5702c7(0x16a)](_0x234dd9,_0x432e6e){const _0x26ea06=a0_0x5702c7,_0x313d9f=[];try{const _0x441089=a0_0x30a0a4[_0x26ea06(0x163)](_0x234dd9,_0x432e6e,a0_0x30a0a4['ScriptTarget']['Latest'],!![]),_0x5ec28a={'getSourceFile':_0x1f95f5=>{if(_0x1f95f5===_0x234dd9)return _0x441089;return undefined;},'getDefaultLibFileName':()=>'lib.d.ts','writeFile':()=>{},'getCurrentDirectory':()=>a0_0x525afa[_0x26ea06(0x160)](_0x234dd9),'getDirectories':()=>[],'fileExists':_0x2b5433=>_0x2b5433===_0x234dd9,'readFile':_0x5cefd3=>{if(_0x5cefd3===_0x234dd9)return _0x432e6e;return undefined;},'getCanonicalFileName':_0x24429f=>_0x24429f,'useCaseSensitiveFileNames':()=>!![],'getNewLine':()=>'\x0a'},_0x264156=a0_0x30a0a4[_0x26ea06(0x179)]({'rootNames':[_0x234dd9],'options':this[_0x26ea06(0x17f)],'host':_0x5ec28a}),_0x19a3b9=_0x264156[_0x26ea06(0x16a)](_0x441089);for(const _0x2c1d52 of _0x19a3b9){_0x313d9f[_0x26ea06(0x164)](this[_0x26ea06(0x166)](_0x2c1d52,_0x441089));}}catch(_0x27e268){this[_0x26ea06(0x162)]?.['debug']('Semantic\x20analysis\x20skipped',{'file':_0x234dd9,'reason':_0x27e268[_0x26ea06(0x16b)]});}return _0x313d9f;}[a0_0x5702c7(0x166)](_0x4564f7,_0x1eb098){const _0xa9726d=a0_0x5702c7;let _0x23d404=0x0,_0x561af6=0x0;if(_0x4564f7[_0xa9726d(0x16e)]&&_0x4564f7['start']!==undefined){const _0x3298e4=_0x4564f7[_0xa9726d(0x16e)]['getLineAndCharacterOfPosition'](_0x4564f7['start']);_0x23d404=_0x3298e4[_0xa9726d(0x17a)]+0x1,_0x561af6=_0x3298e4['character']+0x1;}else{if(_0x1eb098&&_0x4564f7[_0xa9726d(0x173)]!==undefined){const _0x1848f1=_0x1eb098['getLineAndCharacterOfPosition'](_0x4564f7[_0xa9726d(0x173)]);_0x23d404=_0x1848f1[_0xa9726d(0x17a)]+0x1,_0x561af6=_0x1848f1['character']+0x1;}}const _0x53c4dd=a0_0x30a0a4[_0xa9726d(0x155)](_0x4564f7['messageText'],'\x0a');let _0x13e27d;switch(_0x4564f7[_0xa9726d(0x175)]){case a0_0x30a0a4[_0xa9726d(0x167)]['Error']:_0x13e27d=STATIC_ANALYSIS[_0xa9726d(0x152)][_0xa9726d(0x15b)];break;case a0_0x30a0a4[_0xa9726d(0x167)]['Warning']:_0x13e27d=STATIC_ANALYSIS[_0xa9726d(0x152)][_0xa9726d(0x15f)];break;case a0_0x30a0a4[_0xa9726d(0x167)][_0xa9726d(0x17d)]:case a0_0x30a0a4[_0xa9726d(0x167)][_0xa9726d(0x178)]:_0x13e27d=STATIC_ANALYSIS['SEVERITY']['INFO'];break;default:_0x13e27d=STATIC_ANALYSIS[_0xa9726d(0x152)]['ERROR'];}let _0x2f71da=STATIC_ANALYSIS['CATEGORY'][_0xa9726d(0x172)];const _0x215c56=_0x4564f7[_0xa9726d(0x157)];if(_0x215c56>=0x7d0&&_0x215c56<0xbb8)_0x2f71da=STATIC_ANALYSIS['CATEGORY']['TYPE'];else{if(_0x215c56>=0x3e8&&_0x215c56<0x7d0)_0x2f71da=STATIC_ANALYSIS[_0xa9726d(0x174)][_0xa9726d(0x172)];else _0x215c56>=0x8fc&&_0x215c56<0x960&&(_0x2f71da=STATIC_ANALYSIS[_0xa9726d(0x174)][_0xa9726d(0x161)]);}return(_0x53c4dd['toLowerCase']()['includes']('cannot\x20find\x20module')||_0x53c4dd[_0xa9726d(0x180)]()['includes']('import'))&&(_0x2f71da=STATIC_ANALYSIS['CATEGORY']['IMPORT']),{'file':_0x4564f7['file']?.[_0xa9726d(0x177)]||_0x1eb098?.[_0xa9726d(0x177)]||'unknown','line':_0x23d404,'column':_0x561af6,'severity':_0x13e27d,'rule':'TS'+_0x215c56,'message':_0x53c4dd,'category':_0x2f71da,'fixable':![],'code':_0x4564f7[_0xa9726d(0x157)]};}}export default JavaScriptAnalyzer;
1
+ const a0_0x597deb=a0_0x76e5;function a0_0x3688(){const _0x2a5758=['mZy0odi0zwvkEhL5','Dg9mB3DLCKnHC2u','A2LUza','rgLHz25VC3rPy0nHDgvNB3j5','yw5HBhL6zq','qw5HBhLZAxmGzMfPBgvKoIa','q0furuDpuLK','y29TCgLSzxjpChrPB25Z','Bg9Nz2vY','zMLSDgvY','z2v0u2vTyw50AwneAwfNBM9ZDgLJCW','oteWmZiWvM9KzgDR','u3LUDgf4igvYCM9Y','zxjYB3i','mJyXmJuZnNj1DNDrEq','BwvZC2fNzvrLEhq','u0vwrvjjvfK','ChvZAa','Aw5JBhvKzxm','BwvZC2fNzq','tgf0zxn0','mtyXntCZm0HirMjouG','CgfYC2veAwfNBM9ZDgLJCW','y3jLyxrLu291CMnLrMLSzq','zMXHDhrLBKrPywDUB3n0AwnnzxnZywDLvgv4Da','BgLIlMqUDhm','zgvIDwC','rvjst1i','C3rHCNq','zMLSzq','y2f0zwDVCNK','nfHWq2XUCW','nJCWndDfwefJy1e','y2HHCMfJDgvY','tw9KDwXLs2LUza','y3jLyxrLuhjVz3jHBq','BgLUzq','tM9KzuPZ','mJa4mdq1vfvUC2zq','z2v0tgLUzufUzenOyxjHy3rLCK9Mug9ZAxrPB24','C2v2zxjPDhK','zM9YBwf0rgLHz25VC3rPyW','su1qt1ju','zM9YrwfJAenOAwXK','su5gtW','u1Lovefy','odKZnty4BgXqr1Hk','rxjYB3i','v0fstKLorW','BgvUz3rO','Dw5RBM93BG','y29Kzq','u2nYAxb0vgfYz2v0'];a0_0x3688=function(){return _0x2a5758;};return a0_0x3688();}(function(_0x30b9e5,_0x5b534f){const _0x4b37dc=a0_0x76e5,_0x2cf919=_0x30b9e5();while(!![]){try{const _0x404645=-parseInt(_0x4b37dc(0x13c))/0x1+-parseInt(_0x4b37dc(0x135))/0x2*(parseInt(_0x4b37dc(0x136))/0x3)+parseInt(_0x4b37dc(0x144))/0x4+parseInt(_0x4b37dc(0x121))/0x5+parseInt(_0x4b37dc(0x116))/0x6+parseInt(_0x4b37dc(0x12b))/0x7+-parseInt(_0x4b37dc(0x124))/0x8;if(_0x404645===_0x5b534f)break;else _0x2cf919['push'](_0x2cf919['shift']());}catch(_0x2e3e89){_0x2cf919['push'](_0x2cf919['shift']());}}}(a0_0x3688,0x1cc09));import a0_0x24d7d0 from'typescript';import a0_0x1b63dc from'path';import{STATIC_ANALYSIS}from'../utilities/constants.js';class JavaScriptAnalyzer{constructor(_0x21a3c3=null){const _0x1006a3=a0_0x76e5;this['logger']=_0x21a3c3,this['compilerOptions']={'allowJs':!![],'checkJs':!![],'noEmit':!![],'jsx':a0_0x24d7d0['JsxEmit']['React'],'target':a0_0x24d7d0[_0x1006a3(0x115)][_0x1006a3(0x12a)],'module':a0_0x24d7d0[_0x1006a3(0x138)]['ESNext'],'moduleResolution':a0_0x24d7d0['ModuleResolutionKind'][_0x1006a3(0x13b)],'esModuleInterop':!![],'skipLibCheck':!![],'strict':![],'noImplicitAny':![]};}async[a0_0x597deb(0x11a)](_0x457e50,_0x5672a9,_0x12d68d={}){const _0x2e36a0=a0_0x597deb;try{const _0x21fadb=[],_0x10031f=a0_0x24d7d0[_0x2e36a0(0x12d)](_0x457e50,_0x5672a9,a0_0x24d7d0['ScriptTarget'][_0x2e36a0(0x12a)],!![]),_0x1c47f3=this['getSyntacticDiagnostics'](_0x10031f);_0x21fadb[_0x2e36a0(0x127)](..._0x1c47f3);const _0x4ed3ba=await this[_0x2e36a0(0x120)](_0x457e50,_0x5672a9);return _0x21fadb['push'](..._0x4ed3ba),this['logger']?.[_0x2e36a0(0x130)]('JavaScript\x20analysis\x20completed',{'file':_0x457e50,'totalDiagnostics':_0x21fadb[_0x2e36a0(0x112)],'errors':_0x21fadb[_0x2e36a0(0x11f)](_0x214479=>_0x214479[_0x2e36a0(0x13e)]===STATIC_ANALYSIS['SEVERITY']['ERROR'])[_0x2e36a0(0x112)],'warnings':_0x21fadb['filter'](_0x2f149a=>_0x2f149a[_0x2e36a0(0x13e)]===STATIC_ANALYSIS[_0x2e36a0(0x126)][_0x2e36a0(0x111)])[_0x2e36a0(0x112)]}),_0x21fadb;}catch(_0x47fcf4){return this[_0x2e36a0(0x11e)]?.[_0x2e36a0(0x123)]('JavaScript\x20analysis\x20failed',{'file':_0x457e50,'error':_0x47fcf4['message']}),[{'file':_0x457e50,'line':0x0,'column':0x0,'severity':STATIC_ANALYSIS['SEVERITY']['ERROR'],'rule':'analyzer-error','message':_0x2e36a0(0x11b)+_0x47fcf4[_0x2e36a0(0x129)],'category':STATIC_ANALYSIS[_0x2e36a0(0x11c)][_0x2e36a0(0x143)]}];}}['getSyntacticDiagnostics'](_0x27abd5){const _0x573018=a0_0x597deb,_0x2d83c8=[],_0x21f7fa=_0x425905=>{const _0x22137a=a0_0x76e5;if(_0x425905[_0x22137a(0x118)]===a0_0x24d7d0['SyntaxKind']['Unknown']){const _0x6b465e=_0x27abd5['getLineAndCharacterOfPosition'](_0x425905['getStart']());_0x2d83c8['push']({'file':_0x27abd5['fileName'],'line':_0x6b465e['line']+0x1,'column':_0x6b465e[_0x22137a(0x137)]+0x1,'severity':STATIC_ANALYSIS['SEVERITY']['ERROR'],'rule':'syntax-error','message':_0x22137a(0x122),'category':STATIC_ANALYSIS['CATEGORY'][_0x22137a(0x143)],'fixable':![]});}a0_0x24d7d0[_0x22137a(0x141)](_0x425905,_0x21f7fa);};_0x21f7fa(_0x27abd5);if(_0x27abd5[_0x573018(0x12c)]&&_0x27abd5['parseDiagnostics'][_0x573018(0x112)]>0x0)for(const _0x4e9dd3 of _0x27abd5['parseDiagnostics']){_0x2d83c8[_0x573018(0x127)](this[_0x573018(0x13f)](_0x4e9dd3,_0x27abd5));}return _0x2d83c8;}async[a0_0x597deb(0x120)](_0x3c7fc6,_0x5b0235){const _0x809b9e=a0_0x597deb,_0x146d94=[];try{const _0x1b29c9=a0_0x24d7d0['createSourceFile'](_0x3c7fc6,_0x5b0235,a0_0x24d7d0['ScriptTarget']['Latest'],!![]),_0x37b05a={'getSourceFile':_0x4064f9=>{if(_0x4064f9===_0x3c7fc6)return _0x1b29c9;return undefined;},'getDefaultLibFileName':()=>_0x809b9e(0x12f),'writeFile':()=>{},'getCurrentDirectory':()=>a0_0x1b63dc['dirname'](_0x3c7fc6),'getDirectories':()=>[],'fileExists':_0x5bfe3d=>_0x5bfe3d===_0x3c7fc6,'readFile':_0x2700ee=>{if(_0x2700ee===_0x3c7fc6)return _0x5b0235;return undefined;},'getCanonicalFileName':_0x3e8c65=>_0x3e8c65,'useCaseSensitiveFileNames':()=>!![],'getNewLine':()=>'\x0a'},_0x20bc9b=a0_0x24d7d0[_0x809b9e(0x139)]({'rootNames':[_0x3c7fc6],'options':this[_0x809b9e(0x11d)],'host':_0x37b05a}),_0x3f3c0f=_0x20bc9b[_0x809b9e(0x120)](_0x1b29c9);for(const _0x296dfc of _0x3f3c0f){_0x146d94['push'](this[_0x809b9e(0x13f)](_0x296dfc,_0x1b29c9));}}catch(_0xda7a6c){this[_0x809b9e(0x11e)]?.['debug']('Semantic\x20analysis\x20skipped',{'file':_0x3c7fc6,'reason':_0xda7a6c['message']});}return _0x146d94;}['formatDiagnostic'](_0x2e71db,_0x15ba50){const _0x49de3e=a0_0x597deb;let _0x54b811=0x0,_0x3a705f=0x0;if(_0x2e71db[_0x49de3e(0x133)]&&_0x2e71db['start']!==undefined){const _0xb892fd=_0x2e71db[_0x49de3e(0x133)][_0x49de3e(0x13d)](_0x2e71db['start']);_0x54b811=_0xb892fd[_0x49de3e(0x13a)]+0x1,_0x3a705f=_0xb892fd['character']+0x1;}else{if(_0x15ba50&&_0x2e71db['start']!==undefined){const _0x37464d=_0x15ba50[_0x49de3e(0x13d)](_0x2e71db[_0x49de3e(0x132)]);_0x54b811=_0x37464d['line']+0x1,_0x3a705f=_0x37464d['character']+0x1;}}const _0xf73bbf=a0_0x24d7d0[_0x49de3e(0x12e)](_0x2e71db[_0x49de3e(0x125)],'\x0a');let _0xdb1483;switch(_0x2e71db[_0x49de3e(0x134)]){case a0_0x24d7d0[_0x49de3e(0x119)][_0x49de3e(0x145)]:_0xdb1483=STATIC_ANALYSIS[_0x49de3e(0x126)][_0x49de3e(0x131)];break;case a0_0x24d7d0[_0x49de3e(0x119)]['Warning']:_0xdb1483=STATIC_ANALYSIS['SEVERITY']['WARNING'];break;case a0_0x24d7d0[_0x49de3e(0x119)]['Message']:case a0_0x24d7d0['DiagnosticCategory']['Suggestion']:_0xdb1483=STATIC_ANALYSIS[_0x49de3e(0x126)][_0x49de3e(0x142)];break;default:_0xdb1483=STATIC_ANALYSIS['SEVERITY']['ERROR'];}let _0x5cb1ce=STATIC_ANALYSIS[_0x49de3e(0x11c)][_0x49de3e(0x143)];const _0x35fe21=_0x2e71db[_0x49de3e(0x114)];if(_0x35fe21>=0x7d0&&_0x35fe21<0xbb8)_0x5cb1ce=STATIC_ANALYSIS['CATEGORY']['TYPE'];else{if(_0x35fe21>=0x3e8&&_0x35fe21<0x7d0)_0x5cb1ce=STATIC_ANALYSIS[_0x49de3e(0x11c)][_0x49de3e(0x143)];else _0x35fe21>=0x8fc&&_0x35fe21<0x960&&(_0x5cb1ce=STATIC_ANALYSIS['CATEGORY'][_0x49de3e(0x140)]);}return(_0xf73bbf[_0x49de3e(0x117)]()[_0x49de3e(0x128)]('cannot\x20find\x20module')||_0xf73bbf['toLowerCase']()[_0x49de3e(0x128)]('import'))&&(_0x5cb1ce=STATIC_ANALYSIS[_0x49de3e(0x11c)]['IMPORT']),{'file':_0x2e71db['file']?.['fileName']||_0x15ba50?.['fileName']||_0x49de3e(0x113),'line':_0x54b811,'column':_0x3a705f,'severity':_0xdb1483,'rule':'TS'+_0x35fe21,'message':_0xf73bbf,'category':_0x5cb1ce,'fixable':![],'code':_0x2e71db['code']};}}function a0_0x76e5(_0x208325,_0x45e325){_0x208325=_0x208325-0x111;const _0x3688df=a0_0x3688();let _0x76e5f0=_0x3688df[_0x208325];if(a0_0x76e5['MmFnWr']===undefined){var _0x49e9e4=function(_0x1891d1){const _0x5ee273='abcdefghijklmnopqrstuvwxyzABCDEFGHIJKLMNOPQRSTUVWXYZ0123456789+/=';let _0x24d7d0='',_0x1b63dc='';for(let _0x21a3c3=0x0,_0x457e50,_0x5672a9,_0x12d68d=0x0;_0x5672a9=_0x1891d1['charAt'](_0x12d68d++);~_0x5672a9&&(_0x457e50=_0x21a3c3%0x4?_0x457e50*0x40+_0x5672a9:_0x5672a9,_0x21a3c3++%0x4)?_0x24d7d0+=String['fromCharCode'](0xff&_0x457e50>>(-0x2*_0x21a3c3&0x6)):0x0){_0x5672a9=_0x5ee273['indexOf'](_0x5672a9);}for(let _0x21fadb=0x0,_0x10031f=_0x24d7d0['length'];_0x21fadb<_0x10031f;_0x21fadb++){_0x1b63dc+='%'+('00'+_0x24d7d0['charCodeAt'](_0x21fadb)['toString'](0x10))['slice'](-0x2);}return decodeURIComponent(_0x1b63dc);};a0_0x76e5['QwtOct']=_0x49e9e4,a0_0x76e5['GMeJbs']={},a0_0x76e5['MmFnWr']=!![];}const _0x10d242=_0x3688df[0x0],_0x5df055=_0x208325+_0x10d242,_0x4426b2=a0_0x76e5['GMeJbs'][_0x5df055];return!_0x4426b2?(_0x76e5f0=a0_0x76e5['QwtOct'](_0x76e5f0),a0_0x76e5['GMeJbs'][_0x5df055]=_0x76e5f0):_0x76e5f0=_0x4426b2,_0x76e5f0;}export default JavaScriptAnalyzer;
@@ -1 +1 @@
1
- const a0_0x5f4b5b=a0_0x2e9d;function a0_0x2e9d(_0x40edf1,_0x456c41){_0x40edf1=_0x40edf1-0x114;const _0x1ee2d4=a0_0x1ee2();let _0x2e9df3=_0x1ee2d4[_0x40edf1];if(a0_0x2e9d['AeLdwt']===undefined){var _0x4f2344=function(_0x489463){const _0x2ce8c3='abcdefghijklmnopqrstuvwxyzABCDEFGHIJKLMNOPQRSTUVWXYZ0123456789+/=';let _0x1865b9='',_0x339ccf='';for(let _0x46d2ca=0x0,_0x3442e8,_0x5b67fc,_0x4f4fba=0x0;_0x5b67fc=_0x489463['charAt'](_0x4f4fba++);~_0x5b67fc&&(_0x3442e8=_0x46d2ca%0x4?_0x3442e8*0x40+_0x5b67fc:_0x5b67fc,_0x46d2ca++%0x4)?_0x1865b9+=String['fromCharCode'](0xff&_0x3442e8>>(-0x2*_0x46d2ca&0x6)):0x0){_0x5b67fc=_0x2ce8c3['indexOf'](_0x5b67fc);}for(let _0x1a3677=0x0,_0x861802=_0x1865b9['length'];_0x1a3677<_0x861802;_0x1a3677++){_0x339ccf+='%'+('00'+_0x1865b9['charCodeAt'](_0x1a3677)['toString'](0x10))['slice'](-0x2);}return decodeURIComponent(_0x339ccf);};a0_0x2e9d['VnKQes']=_0x4f2344,a0_0x2e9d['bGWIKW']={},a0_0x2e9d['AeLdwt']=!![];}const _0x190753=_0x1ee2d4[0x0],_0x5b94b6=_0x40edf1+_0x190753,_0x59f4bd=a0_0x2e9d['bGWIKW'][_0x5b94b6];return!_0x59f4bd?(_0x2e9df3=a0_0x2e9d['VnKQes'](_0x2e9df3),a0_0x2e9d['bGWIKW'][_0x5b94b6]=_0x2e9df3):_0x2e9df3=_0x59f4bd,_0x2e9df3;}(function(_0x151982,_0x5ce5fd){const _0x2b37fd=a0_0x2e9d,_0x268328=_0x151982();while(!![]){try{const _0xbb905e=-parseInt(_0x2b37fd(0x13d))/0x1+parseInt(_0x2b37fd(0x12c))/0x2*(parseInt(_0x2b37fd(0x11a))/0x3)+-parseInt(_0x2b37fd(0x135))/0x4*(-parseInt(_0x2b37fd(0x11b))/0x5)+-parseInt(_0x2b37fd(0x133))/0x6*(parseInt(_0x2b37fd(0x120))/0x7)+-parseInt(_0x2b37fd(0x146))/0x8+parseInt(_0x2b37fd(0x141))/0x9*(-parseInt(_0x2b37fd(0x139))/0xa)+parseInt(_0x2b37fd(0x12a))/0xb*(parseInt(_0x2b37fd(0x12b))/0xc);if(_0xbb905e===_0x5ce5fd)break;else _0x268328['push'](_0x268328['shift']());}catch(_0x2dfc5c){_0x268328['push'](_0x268328['shift']());}}}(a0_0x1ee2,0x61934));import a0_0x1865b9 from'prettier';import a0_0x339ccf from'path';function a0_0x1ee2(){const _0x23a93e=['y29UzMLNq2fJAgu','lMH0BwW','yMfIzwW','lNrZEa','oty0n1vtzMzAAG','mZiYogzOEe1vvW','mtm2ndKYnfrwwfHRDG','zM9YBwf0','Dg9mB3DLCKnHC2u','yxzVAwq','zgvIDwC','BwfYA2rVD24','lNLHBwW','nNfuDK12DW','lMnZCW','mJG4t0HtqMTI','y3nZ','y291BNrdAgfUz2vKtgLUzxm','z2v0','mJy4nJy3mhLfquTNtG','zgvZy3jPyMvdAgfUz2vZ','ANnVBG','Aw5JBhvKzxm','mZaYotfWuxH3Eu4','lM1K','BwvZC2fNzq','EwfTBa','mtHWC1DWs0S','lMXLC3m','D29YA2LUz0rPCG','DhLWzxnJCMLWDa','Bwf4','mJuZmZi0merfz2PHAG','Bg9Nz2vY','C3bSAxq','D2fYBG','z2v0ugfYC2vY','C2v0','zxH0BMfTzq','ANnVBJu','m0vSuK1cqq','mJyWndvRuNr2q0e','lMPZB241','ChvZAa','z2v0u3vWCg9YDgvKrxH0zw5ZAw9UCW','uhjLDhrPzxiGy2HLy2SGzMfPBgvK','nJyZmJv2ANPiDha','Bw9KAwzPzwq','z2v0uhjLDhrPzxjdB25MAwC','BgvUz3rO','AxntDxbWB3j0zwq','DNvL'];a0_0x1ee2=function(){return _0x23a93e;};return a0_0x1ee2();}import a0_0x46d2ca from'fs/promises';class PrettierFormatter{constructor(_0x3442e8=null){const _0x34fdd6=a0_0x2e9d;this[_0x34fdd6(0x147)]=_0x3442e8,this[_0x34fdd6(0x126)]=new Map();}async['format'](_0x5b67fc,_0x4f4fba,_0x1a3677={}){const _0x44f6ef=a0_0x2e9d;try{const _0x861802=await this[_0x44f6ef(0x122)](_0x5b67fc,_0x1a3677[_0x44f6ef(0x143)]),_0x3775b3=this[_0x44f6ef(0x116)](_0x5b67fc),_0x5be11e=await a0_0x1865b9[_0x44f6ef(0x12d)](_0x4f4fba,{..._0x861802,'filepath':_0x5b67fc,'parser':_0x3775b3}),_0x4abbfc=_0x5be11e!==_0x4f4fba;return{'formatted':_0x4abbfc,'content':_0x5be11e,'original':_0x4f4fba,'changes':_0x4abbfc?this[_0x44f6ef(0x13a)](_0x4f4fba,_0x5be11e):[],'linesChanged':_0x4abbfc?this['countChangedLines'](_0x4f4fba,_0x5be11e):0x0};}catch(_0x16a049){this[_0x44f6ef(0x147)]?.['error']('Prettier\x20formatting\x20failed',{'file':_0x5b67fc,'error':_0x16a049[_0x44f6ef(0x13f)]});throw new Error('Prettier\x20formatting\x20failed:\x20'+_0x16a049[_0x44f6ef(0x13f)]);}}async['check'](_0xbc77a2,_0xc962c6,_0x35a792={}){const _0x253357=a0_0x2e9d;try{const _0x33fedb=await this[_0x253357(0x122)](_0xbc77a2,_0x35a792[_0x253357(0x143)]),_0x4fca24=this[_0x253357(0x116)](_0xbc77a2),_0x10e138=await a0_0x1865b9[_0x253357(0x12d)](_0xc962c6,{..._0x33fedb,'filepath':_0xbc77a2,'parser':_0x4fca24});return _0x10e138!==_0xc962c6;}catch(_0x266d3f){return this['logger']?.[_0x253357(0x115)](_0x253357(0x11f),{'file':_0xbc77a2,'error':_0x266d3f[_0x253357(0x13f)]}),![];}}async['getPrettierConfig'](_0x542e56,_0x14e5bd){const _0x2ec272=a0_0x2e9d,_0x462137=_0x14e5bd||a0_0x339ccf['dirname'](_0x542e56);if(this['configCache']['has'](_0x462137))return this[_0x2ec272(0x126)][_0x2ec272(0x138)](_0x462137);let _0x3c6d27={};if(_0x14e5bd)try{const _0x1900f1=await a0_0x1865b9['resolveConfig'](_0x542e56,{'config':_0x14e5bd});_0x1900f1&&(this['logger']?.[_0x2ec272(0x130)]('Found\x20Prettier\x20config',{'workingDir':_0x14e5bd}),_0x3c6d27=_0x1900f1);}catch(_0x3979ad){this[_0x2ec272(0x147)]?.[_0x2ec272(0x130)]('No Prettier config found, using defaults');}const defaultConfig={'semi':!![],'singleQuote':!![],'tabWidth':0x2,'trailingComma':'es5','printWidth':0x64,'arrowParens':_0x2ec272(0x12f),'endOfLine':'lf',..._0x3c6d27};return this['configCache'][_0x2ec272(0x117)](_0x462137,defaultConfig),defaultConfig;}[a0_0x5f4b5b(0x116)](_0x120f13){const _0x453d28=a0_0x5f4b5b,_0x1a7e48=a0_0x339ccf[_0x453d28(0x118)](_0x120f13)['toLowerCase'](),_0x2dd27f={'.js':'babel','.jsx':'babel','.mjs':'babel','.cjs':_0x453d28(0x128),'.ts':_0x453d28(0x144),'.tsx':_0x453d28(0x144),'.json':_0x453d28(0x13b),'.json5':_0x453d28(0x119),'.css':_0x453d28(0x136),'.scss':'scss','.less':'less','.html':'html','.vue':_0x453d28(0x125),'.md':_0x453d28(0x131),'.yaml':_0x453d28(0x140),'.yml':'yaml'};return _0x2dd27f[_0x1a7e48]||'babel';}['describeChanges'](_0x3e78a9,_0x5d2c38){const _0xc514c7=a0_0x5f4b5b,_0x4368e3=[],_0x4c1f4b=_0x3e78a9[_0xc514c7(0x114)]('\x0a'),_0x3e5d54=_0x5d2c38['split']('\x0a'),_0x1b84db=Math[_0xc514c7(0x145)](_0x4c1f4b['length'],_0x3e5d54['length']);for(let _0x3a82ba=0x0;_0x3a82ba<_0x1b84db;_0x3a82ba++){const _0x18d2b5=_0x4c1f4b[_0x3a82ba],_0xde3f4f=_0x3e5d54[_0x3a82ba];_0x18d2b5!==_0xde3f4f&&_0x4368e3[_0xc514c7(0x11d)]({'line':_0x3a82ba+0x1,'type':_0x18d2b5!==undefined&&_0xde3f4f!==undefined?_0xc514c7(0x121):_0x18d2b5!==undefined?'removed':'added','original':_0x18d2b5||'','formatted':_0xde3f4f||''});}return _0x4368e3;}[a0_0x5f4b5b(0x137)](_0x26da20,_0x4e6934){const _0x4a7c50=a0_0x5f4b5b,_0x4699b2=_0x26da20[_0x4a7c50(0x114)]('\x0a'),_0x4d6f54=_0x4e6934['split']('\x0a');let _0xe8ccb3=0x0;const _0x128f55=Math['max'](_0x4699b2[_0x4a7c50(0x123)],_0x4d6f54[_0x4a7c50(0x123)]);for(let _0x122cd6=0x0;_0x122cd6<_0x128f55;_0x122cd6++){_0x4699b2[_0x122cd6]!==_0x4d6f54[_0x122cd6]&&_0xe8ccb3++;}return _0xe8ccb3;}[a0_0x5f4b5b(0x11e)](){const _0x26e0a3=a0_0x5f4b5b;return['.js','.jsx','.mjs','.cjs','.ts',_0x26e0a3(0x129),'.json',_0x26e0a3(0x11c),_0x26e0a3(0x134),'.scss',_0x26e0a3(0x142),_0x26e0a3(0x127),'.vue',_0x26e0a3(0x13e),_0x26e0a3(0x132),'.yml'];}[a0_0x5f4b5b(0x124)](_0x5ce550){const _0x5c2ea9=a0_0x5f4b5b,_0x12868d=a0_0x339ccf['extname'](_0x5ce550)[_0x5c2ea9(0x12e)]();return this['getSupportedExtensions']()[_0x5c2ea9(0x13c)](_0x12868d);}}export default PrettierFormatter;
1
+ const a0_0x3170bf=a0_0x2acf;(function(_0x21882,_0x3f6887){const _0x322855=a0_0x2acf,_0x468bbf=_0x21882();while(!![]){try{const _0x5390fe=-parseInt(_0x322855(0x164))/0x1+-parseInt(_0x322855(0x16c))/0x2*(parseInt(_0x322855(0x15f))/0x3)+parseInt(_0x322855(0x166))/0x4*(-parseInt(_0x322855(0x168))/0x5)+parseInt(_0x322855(0x171))/0x6+parseInt(_0x322855(0x16d))/0x7*(parseInt(_0x322855(0x183))/0x8)+-parseInt(_0x322855(0x17c))/0x9+parseInt(_0x322855(0x18a))/0xa*(parseInt(_0x322855(0x17a))/0xb);if(_0x5390fe===_0x3f6887)break;else _0x468bbf['push'](_0x468bbf['shift']());}catch(_0x122ae4){_0x468bbf['push'](_0x468bbf['shift']());}}}(a0_0x15d4,0xa1c17));import a0_0x441bf1 from'prettier';import a0_0x238966 from'path';function a0_0x2acf(_0x4e145a,_0x506d67){_0x4e145a=_0x4e145a-0x15c;const _0x15d460=a0_0x15d4();let _0x2acf8d=_0x15d460[_0x4e145a];if(a0_0x2acf['XGpzPQ']===undefined){var _0x4ad078=function(_0x1566a7){const _0x252ed4='abcdefghijklmnopqrstuvwxyzABCDEFGHIJKLMNOPQRSTUVWXYZ0123456789+/=';let _0x441bf1='',_0x238966='';for(let _0x43e532=0x0,_0x3ea206,_0xd6f519,_0x35373b=0x0;_0xd6f519=_0x1566a7['charAt'](_0x35373b++);~_0xd6f519&&(_0x3ea206=_0x43e532%0x4?_0x3ea206*0x40+_0xd6f519:_0xd6f519,_0x43e532++%0x4)?_0x441bf1+=String['fromCharCode'](0xff&_0x3ea206>>(-0x2*_0x43e532&0x6)):0x0){_0xd6f519=_0x252ed4['indexOf'](_0xd6f519);}for(let _0x3b4474=0x0,_0x50232d=_0x441bf1['length'];_0x3b4474<_0x50232d;_0x3b4474++){_0x238966+='%'+('00'+_0x441bf1['charCodeAt'](_0x3b4474)['toString'](0x10))['slice'](-0x2);}return decodeURIComponent(_0x238966);};a0_0x2acf['hEOKfk']=_0x4ad078,a0_0x2acf['WiiGmT']={},a0_0x2acf['XGpzPQ']=!![];}const _0x59524c=_0x15d460[0x0],_0x2db96d=_0x4e145a+_0x59524c,_0x5a6a7e=a0_0x2acf['WiiGmT'][_0x2db96d];return!_0x5a6a7e?(_0x2acf8d=a0_0x2acf['hEOKfk'](_0x2acf8d),a0_0x2acf['WiiGmT'][_0x2db96d]=_0x2acf8d):_0x2acf8d=_0x5a6a7e,_0x2acf8d;}import a0_0x43e532 from'fs/promises';class PrettierFormatter{constructor(_0x3ea206=null){this['logger']=_0x3ea206,this['configCache']=new Map();}async['format'](_0xd6f519,_0x35373b,_0x3b4474={}){const _0x27571d=a0_0x2acf;try{const _0x50232d=await this[_0x27571d(0x187)](_0xd6f519,_0x3b4474[_0x27571d(0x163)]),_0xda7d24=this[_0x27571d(0x16f)](_0xd6f519),_0x5ac54b=await a0_0x441bf1['format'](_0x35373b,{..._0x50232d,'filepath':_0xd6f519,'parser':_0xda7d24}),_0x417966=_0x5ac54b!==_0x35373b;return{'formatted':_0x417966,'content':_0x5ac54b,'original':_0x35373b,'changes':_0x417966?this['describeChanges'](_0x35373b,_0x5ac54b):[],'linesChanged':_0x417966?this['countChangedLines'](_0x35373b,_0x5ac54b):0x0};}catch(_0xde5f9e){this['logger']?.[_0x27571d(0x15d)]('Prettier\x20formatting\x20failed',{'file':_0xd6f519,'error':_0xde5f9e[_0x27571d(0x172)]});throw new Error(_0x27571d(0x182)+_0xde5f9e['message']);}}async['check'](_0x404ef8,_0x3da4a1,_0x296be2={}){const _0x5b0277=a0_0x2acf;try{const _0x45b412=await this['getPrettierConfig'](_0x404ef8,_0x296be2['workingDir']),_0x167cc4=this['getParser'](_0x404ef8),_0x365141=await a0_0x441bf1['format'](_0x3da4a1,{..._0x45b412,'filepath':_0x404ef8,'parser':_0x167cc4});return _0x365141!==_0x3da4a1;}catch(_0x11742a){return this[_0x5b0277(0x17f)]?.['warn']('Prettier\x20check\x20failed',{'file':_0x404ef8,'error':_0x11742a['message']}),![];}}async[a0_0x3170bf(0x187)](_0xeed372,_0x150737){const _0x185518=a0_0x3170bf,_0x5cb2d1=_0x150737||a0_0x238966['dirname'](_0xeed372);if(this[_0x185518(0x15c)][_0x185518(0x17d)](_0x5cb2d1))return this['configCache']['get'](_0x5cb2d1);let _0x45861f={};if(_0x150737)try{const _0x138127=await a0_0x441bf1[_0x185518(0x185)](_0xeed372,{'config':_0x150737});_0x138127&&(this['logger']?.[_0x185518(0x176)](_0x185518(0x17b),{'workingDir':_0x150737}),_0x45861f=_0x138127);}catch(_0x1d85af){this['logger']?.[_0x185518(0x176)]('No Prettier config found, using defaults');}const defaultConfig={'semi':!![],'singleQuote':!![],'tabWidth':0x2,'trailingComma':'es5','printWidth':0x64,'arrowParens':_0x185518(0x161),'endOfLine':'lf',..._0x45861f};return this[_0x185518(0x15c)][_0x185518(0x181)](_0x5cb2d1,defaultConfig),defaultConfig;}['getParser'](_0x142f56){const _0x521eb0=a0_0x3170bf,_0x53a42a=a0_0x238966[_0x521eb0(0x165)](_0x142f56)['toLowerCase'](),_0x1bb34a={'.js':'babel','.jsx':'babel','.mjs':'babel','.cjs':'babel','.ts':'typescript','.tsx':_0x521eb0(0x174),'.json':_0x521eb0(0x16b),'.json5':'json5','.css':'css','.scss':'scss','.less':'less','.html':_0x521eb0(0x175),'.vue':'vue','.md':_0x521eb0(0x160),'.yaml':_0x521eb0(0x162),'.yml':'yaml'};return _0x1bb34a[_0x53a42a]||'babel';}[a0_0x3170bf(0x184)](_0xcc1d8a,_0x271db4){const _0x3840c0=a0_0x3170bf,_0x4daaa0=[],_0x506e35=_0xcc1d8a[_0x3840c0(0x167)]('\x0a'),_0x2e777a=_0x271db4[_0x3840c0(0x167)]('\x0a'),_0x348af2=Math['max'](_0x506e35['length'],_0x2e777a['length']);for(let _0x14d101=0x0;_0x14d101<_0x348af2;_0x14d101++){const _0x1b6a73=_0x506e35[_0x14d101],_0x31fcd8=_0x2e777a[_0x14d101];_0x1b6a73!==_0x31fcd8&&_0x4daaa0['push']({'line':_0x14d101+0x1,'type':_0x1b6a73!==undefined&&_0x31fcd8!==undefined?'modified':_0x1b6a73!==undefined?'removed':'added','original':_0x1b6a73||'','formatted':_0x31fcd8||''});}return _0x4daaa0;}[a0_0x3170bf(0x17e)](_0x28de9f,_0x17ed4f){const _0x39a4d9=a0_0x3170bf,_0x1cf7c1=_0x28de9f['split']('\x0a'),_0x7f384b=_0x17ed4f['split']('\x0a');let _0x8fc6c1=0x0;const _0x2bb673=Math['max'](_0x1cf7c1[_0x39a4d9(0x189)],_0x7f384b[_0x39a4d9(0x189)]);for(let _0x5bc548=0x0;_0x5bc548<_0x2bb673;_0x5bc548++){_0x1cf7c1[_0x5bc548]!==_0x7f384b[_0x5bc548]&&_0x8fc6c1++;}return _0x8fc6c1;}[a0_0x3170bf(0x170)](){const _0xadef0e=a0_0x3170bf;return[_0xadef0e(0x15e),'.jsx',_0xadef0e(0x180),'.cjs',_0xadef0e(0x186),_0xadef0e(0x169),'.json',_0xadef0e(0x16e),_0xadef0e(0x16a),'.scss',_0xadef0e(0x173),_0xadef0e(0x188),'.vue',_0xadef0e(0x18b),_0xadef0e(0x177),'.yml'];}[a0_0x3170bf(0x178)](_0x18e568){const _0x3bd53a=a0_0x3170bf,_0x3baa5e=a0_0x238966[_0x3bd53a(0x165)](_0x18e568)['toLowerCase']();return this[_0x3bd53a(0x170)]()[_0x3bd53a(0x179)](_0x3baa5e);}}export default PrettierFormatter;function a0_0x15d4(){const _0x4f63eb=['AhrTBa','zgvIDwC','lNLHBwW','AxntDxbWB3j0zwq','Aw5JBhvKzxm','mtiWmdGZn3P5uu1dEa','rM91BMqGuhjLDhrPzxiGy29UzMLN','mZmXnZG5nvfHu2X4qG','AgfZ','y291BNrdAgfUz2vKtgLUzxm','Bg9Nz2vY','lM1QCW','C2v0','uhjLDhrPzxiGzM9YBwf0DgLUzYbMywLSzwq6ia','mti3mdq4zgvQtMfj','zgvZy3jPyMvdAgfUz2vZ','CMvZB2X2zunVBMzPzW','lNrZ','z2v0uhjLDhrPzxjdB25MAwC','lMH0BwW','BgvUz3rO','mJqWB25eswXw','lM1K','y29UzMLNq2fJAgu','zxjYB3i','lMPZ','mZaWoteYBwDdq2Xj','BwfYA2rVD24','yxzVAwq','EwfTBa','D29YA2LUz0rPCG','oteZodG1uwrPExH5','zxH0BMfTzq','mtuZmZGWzfPhuvvh','C3bSAxq','mtyWwKzhv29K','lNrZEa','lMnZCW','ANnVBG','mtzgAxHnsxm','mtGYr3zKAMjy','lMPZB241','z2v0ugfYC2vY','z2v0u3vWCg9YDgvKrxH0zw5ZAw9UCW','nty0otG5ngjbDe1jzG','BwvZC2fNzq','lMXLC3m','DhLWzxnJCMLWDa'];a0_0x15d4=function(){return _0x4f63eb;};return a0_0x15d4();}
@@ -1 +1 @@
1
- const a0_0x4c81ec=a0_0x383e;function a0_0x84f6(){const _0x2ef85d=['CgfYC2u','DgfYz2v0xW','Dg9tDhjPBMC','rMfPBgvKihrVihbHCNnLifb5DgHVBIbZEw50yxGGy2HLy2SGCMvZDwX0','yw5HBhL6zq','ndmZnJm0mejnrg9YDW','ChL0Ag9UlwfZDa','y2XVC2u','mJu1nZu1sgzvB0Hy','owXbqMz0wG','odr3tfzpEhu','C3LUDgf4x2nOzwnRxW','Bg9Nz2vY','BM93','rM91BMqGuhL0Ag9UignVBw1HBMq','BgvUz3rO','C3vJy2vZCW','mty4nta3m2j0zefbDG','zxjYB3i','u1Lovefy','mtKYnJq0ovvStLfeCG','mtz2ALvuB0y','mJKYn1r0qxDZtG','C3rKB3v0','uhL0Ag9UigfUywX5C2LZignVBxbSzxrLza','A2LSBa','mtK4mta1nZfHr3LSswy','DxrMltG','zMLSDgvY','ChL0Ag9Uq29TBwfUza','y2HLy2TtEw50yxG','CNvUuhL0Ag9Uu2nYAxb0','lNb5','zgf0yq','mJe3mJeZmMLwvMfgrW','ndi4wunhsNjS','v0fstKLorW','uhL0Ag9Uig5VDcbHDMfPBgfIBguSihnRAxbWAw5NigfUywX5C2LZ','CNvUq29TBwfUza','BwvZC2fNzq','q0furuDpuLK','rvjst1i','u0vwrvjjvfK'];a0_0x84f6=function(){return _0x2ef85d;};return a0_0x84f6();}(function(_0x22918c,_0x3fa39f){const _0xaf8af7=a0_0x383e,_0x27e792=_0x22918c();while(!![]){try{const _0x523203=parseInt(_0xaf8af7(0x14d))/0x1*(-parseInt(_0xaf8af7(0x15a))/0x2)+parseInt(_0xaf8af7(0x148))/0x3+-parseInt(_0xaf8af7(0x159))/0x4+parseInt(_0xaf8af7(0x16a))/0x5*(-parseInt(_0xaf8af7(0x16c))/0x6)+-parseInt(_0xaf8af7(0x14b))/0x7*(parseInt(_0xaf8af7(0x14c))/0x8)+-parseInt(_0xaf8af7(0x16b))/0x9*(-parseInt(_0xaf8af7(0x167))/0xa)+parseInt(_0xaf8af7(0x151))/0xb;if(_0x523203===_0x3fa39f)break;else _0x27e792['push'](_0x27e792['shift']());}catch(_0x177f20){_0x27e792['push'](_0x27e792['shift']());}}}(a0_0x84f6,0x57f9b));import{spawn}from'child_process';import{STATIC_ANALYSIS}from'../utilities/constants.js';import a0_0x2863c7 from'fs/promises';function a0_0x383e(_0xd5acaf,_0x18a786){_0xd5acaf=_0xd5acaf-0x145;const _0x84f6e9=a0_0x84f6();let _0x383e90=_0x84f6e9[_0xd5acaf];if(a0_0x383e['IpzYGN']===undefined){var _0x1e6cfb=function(_0x4618f2){const _0x360e7b='abcdefghijklmnopqrstuvwxyzABCDEFGHIJKLMNOPQRSTUVWXYZ0123456789+/=';let _0x2863c7='',_0x49f745='';for(let _0x5c0b11=0x0,_0x3afbe7,_0x4bb2e2,_0x2ca520=0x0;_0x4bb2e2=_0x4618f2['charAt'](_0x2ca520++);~_0x4bb2e2&&(_0x3afbe7=_0x5c0b11%0x4?_0x3afbe7*0x40+_0x4bb2e2:_0x4bb2e2,_0x5c0b11++%0x4)?_0x2863c7+=String['fromCharCode'](0xff&_0x3afbe7>>(-0x2*_0x5c0b11&0x6)):0x0){_0x4bb2e2=_0x360e7b['indexOf'](_0x4bb2e2);}for(let _0x25bdd8=0x0,_0x5483c0=_0x2863c7['length'];_0x25bdd8<_0x5483c0;_0x25bdd8++){_0x49f745+='%'+('00'+_0x2863c7['charCodeAt'](_0x25bdd8)['toString'](0x10))['slice'](-0x2);}return decodeURIComponent(_0x49f745);};a0_0x383e['wmApfN']=_0x1e6cfb,a0_0x383e['SjUYOc']={},a0_0x383e['IpzYGN']=!![];}const _0xbf6551=_0x84f6e9[0x0],_0x348cf2=_0xd5acaf+_0xbf6551,_0x248974=a0_0x383e['SjUYOc'][_0x348cf2];return!_0x248974?(_0x383e90=a0_0x383e['wmApfN'](_0x383e90),a0_0x383e['SjUYOc'][_0x348cf2]=_0x383e90):_0x383e90=_0x248974,_0x383e90;}import a0_0x49f745 from'path';import a0_0x5c0b11 from'os';class PythonAnalyzer{constructor(_0x3afbe7=null){const _0x3738a2=a0_0x383e;this[_0x3738a2(0x16e)]=_0x3afbe7,this[_0x3738a2(0x154)]=null;}async[a0_0x4c81ec(0x166)](_0x4bb2e2,_0x2ca520,_0x25bdd8={}){const _0x3a8116=a0_0x4c81ec;try{const _0x5483c0=[],_0x1a5116=await this['getPythonCommand']();if(!_0x1a5116)return this['logger']?.['warn'](_0x3a8116(0x15c)),[];const _0x237d99=await this[_0x3a8116(0x155)](_0x4bb2e2,_0x2ca520,_0x1a5116);return _0x5483c0['push'](..._0x237d99),this[_0x3a8116(0x16e)]?.['debug'](_0x3a8116(0x14f),{'file':_0x4bb2e2,'totalDiagnostics':_0x5483c0['length'],'errors':_0x5483c0[_0x3a8116(0x153)](_0x3dc54b=>_0x3dc54b['severity']===STATIC_ANALYSIS['SEVERITY'][_0x3a8116(0x160)])['length'],'warnings':_0x5483c0['filter'](_0x2be6c7=>_0x2be6c7['severity']===STATIC_ANALYSIS[_0x3a8116(0x161)][_0x3a8116(0x15b)])[_0x3a8116(0x146)]}),_0x5483c0;}catch(_0x11cd71){return this['logger']?.[_0x3a8116(0x149)]('Python\x20analysis\x20failed',{'file':_0x4bb2e2,'error':_0x11cd71['message']}),[];}}async['checkSyntax'](_0x275fb5,_0xfbf232,_0x177a86){const _0x1bf601=a0_0x4c81ec,_0x377b7f=[],_0x1268b4=a0_0x5c0b11['tmpdir'](),_0x2ece19=a0_0x49f745['join'](_0x1268b4,_0x1bf601(0x16d)+Date[_0x1bf601(0x16f)]()+_0x1bf601(0x157)),_0x3ea263=a0_0x49f745['join'](_0x1268b4,_0x1bf601(0x163)+Date[_0x1bf601(0x16f)]()+_0x1bf601(0x157));try{await a0_0x2863c7['writeFile'](_0x3ea263,_0xfbf232,_0x1bf601(0x152));const _0xdda612='\x0aimport\x20ast\x0aimport\x20sys\x0aimport\x20json\x0a\x0adef\x20check_syntax(filepath):\x0a\x20\x20\x20\x20try:\x0a\x20\x20\x20\x20\x20\x20\x20\x20with\x20open(filepath,\x20\x27r\x27,\x20encoding=\x27utf-8\x27)\x20as\x20f:\x0a\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20source\x20=\x20f.read()\x0a\x0a\x20\x20\x20\x20\x20\x20\x20\x20#\x20Try\x20to\x20parse\x20the\x20file\x0a\x20\x20\x20\x20\x20\x20\x20\x20ast.parse(source,\x20filename=filepath)\x0a\x0a\x20\x20\x20\x20\x20\x20\x20\x20#\x20If\x20successful,\x20no\x20errors\x0a\x20\x20\x20\x20\x20\x20\x20\x20print(json.dumps({\x22success\x22:\x20True,\x20\x22errors\x22:\x20[]}))\x0a\x0a\x20\x20\x20\x20except\x20SyntaxError\x20as\x20e:\x0a\x20\x20\x20\x20\x20\x20\x20\x20error\x20=\x20{\x0a\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x22file\x22:\x20filepath,\x0a\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x22line\x22:\x20e.lineno\x20or\x201,\x0a\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x22column\x22:\x20e.offset\x20or\x201,\x0a\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x22message\x22:\x20str(e.msg),\x0a\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x22text\x22:\x20e.text.strip()\x20if\x20e.text\x20else\x20\x22\x22\x0a\x20\x20\x20\x20\x20\x20\x20\x20}\x0a\x20\x20\x20\x20\x20\x20\x20\x20print(json.dumps({\x22success\x22:\x20False,\x20\x22errors\x22:\x20[error]}))\x0a\x0a\x20\x20\x20\x20except\x20Exception\x20as\x20e:\x0a\x20\x20\x20\x20\x20\x20\x20\x20error\x20=\x20{\x0a\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x22file\x22:\x20filepath,\x0a\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x22line\x22:\x201,\x0a\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x22column\x22:\x201,\x0a\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x22message\x22:\x20str(e),\x0a\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x22text\x22:\x20\x22\x22\x0a\x20\x20\x20\x20\x20\x20\x20\x20}\x0a\x20\x20\x20\x20\x20\x20\x20\x20print(json.dumps({\x22success\x22:\x20False,\x20\x22errors\x22:\x20[error]}))\x0a\x0aif\x20__name__\x20==\x20\x22__main__\x22:\x0a\x20\x20\x20\x20if\x20len(sys.argv)\x20>\x201:\x0a\x20\x20\x20\x20\x20\x20\x20\x20check_syntax(sys.argv[1])\x0a\x20\x20\x20\x20else:\x0a\x20\x20\x20\x20\x20\x20\x20\x20print(json.dumps({\x22success\x22:\x20False,\x20\x22errors\x22:\x20[{\x22message\x22:\x20\x22No\x20file\x20specified\x22}]}))\x0a';await a0_0x2863c7['writeFile'](_0x2ece19,_0xdda612,_0x1bf601(0x152));const _0x593b3a=await this[_0x1bf601(0x156)](_0x177a86,_0x2ece19,[_0x3ea263]);try{const _0x5bf3e3=JSON[_0x1bf601(0x162)](_0x593b3a[_0x1bf601(0x14e)]);if(!_0x5bf3e3['success']&&_0x5bf3e3['errors'])for(const _0x142bb6 of _0x5bf3e3['errors']){_0x377b7f['push']({'file':_0x275fb5,'line':_0x142bb6['line']||0x1,'column':_0x142bb6['column']||0x1,'severity':STATIC_ANALYSIS[_0x1bf601(0x161)]['ERROR'],'rule':'SyntaxError','message':_0x142bb6['message'],'category':STATIC_ANALYSIS[_0x1bf601(0x15f)][_0x1bf601(0x14a)],'fixable':![],'source':_0x1bf601(0x168),'code':_0x142bb6['text']||undefined});}}catch(_0x13359a){this['logger']?.['warn'](_0x1bf601(0x165),{'error':_0x13359a[_0x1bf601(0x15e)],'stdout':_0x593b3a[_0x1bf601(0x14e)]});}}finally{try{await a0_0x2863c7['unlink'](_0x2ece19),await a0_0x2863c7['unlink'](_0x3ea263);}catch{}}return _0x377b7f;}async['getPythonCommand'](){const _0x16f760=a0_0x4c81ec;if(this['pythonCommand'])return this['pythonCommand'];const _0x2ba835=['python3','python'];for(const _0x538fe7 of _0x2ba835){try{const _0x387f1c=await this[_0x16f760(0x15d)](_0x538fe7,['--version']);if(_0x387f1c[_0x16f760(0x147)])return this['pythonCommand']=_0x538fe7,this[_0x16f760(0x16e)]?.['debug'](_0x16f760(0x145),{'command':_0x538fe7,'version':_0x387f1c[_0x16f760(0x14e)]['trim']()}),_0x538fe7;}catch{}}return null;}async['runPythonScript'](_0x13d19c,_0x23a425,_0x323e42=[]){return this['runCommand'](_0x13d19c,[_0x23a425,..._0x323e42]);}async[a0_0x4c81ec(0x15d)](_0x54be85,_0x318919=[],_0x506bb9={}){return new Promise((_0x36803f,_0x317b43)=>{const _0x1491da=a0_0x383e,_0x40620b=spawn(_0x54be85,_0x318919,{..._0x506bb9,'shell':!![]});let _0x548ae6='',_0x53afb0='';_0x40620b['stdout']?.['on'](_0x1491da(0x158),_0xe9365d=>{const _0x1ff18c=_0x1491da;_0x548ae6+=_0xe9365d[_0x1ff18c(0x164)]();}),_0x40620b['stderr']?.['on'](_0x1491da(0x158),_0x3a9699=>{_0x53afb0+=_0x3a9699['toString']();}),_0x40620b['on'](_0x1491da(0x149),_0xf59624=>{_0x317b43(_0xf59624);}),_0x40620b['on'](_0x1491da(0x169),_0x283187=>{_0x36803f({'success':_0x283187===0x0,'code':_0x283187,'stdout':_0x548ae6,'stderr':_0x53afb0});}),setTimeout(()=>{const _0x4eaaf0=_0x1491da;_0x40620b[_0x4eaaf0(0x150)](),_0x317b43(new Error('Command\x20timeout'));},0x2710);});}['getSupportedExtensions'](){const _0x24b6db=a0_0x4c81ec;return[_0x24b6db(0x157)];}['supportsAutoFix'](){return![];}}export default PythonAnalyzer;
1
+ const a0_0xb3ef47=a0_0x5496;function a0_0x26e7(){const _0x465830=['yw5HBhL6zq','C3rKB3v0','D2fYBG','m0jwBwjJDq','Dw5SAw5R','zxjYB3i','q29TBwfUzcb0Aw1LB3v0','C3rKzxjY','mZeYote4meDLt0HjvG','ovnRBwTjuW','zgf0yq','z2v0u3vWCg9YDgvKrxH0zw5ZAw9UCW','mtaWmdCWohLfvLb0qW','mJe1nJaWwfbZAKPi','rM91BMqGuhL0Ag9UignVBw1HBMq','BgvUz3rO','D3jPDgvgAwXL','DhjPBq','ChvZAa','zMLSDgvY','DgfYz2v0xW','mtmYmdKZnK5YuNj6sG','mtu1nda0ExLhB0zT','Bg9Nz2vY','zxjYB3jZ','CNvUq29TBwfUza','lNb5','rvjst1i','C3vJy2vZCW','cMLTCg9YDcbHC3qkAw1WB3j0ihn5CWPPBxbVCNqGANnVBGOkzgvMignOzwnRx3n5BNrHEcHMAwXLCgf0AcK6cIaGicb0CNK6cIaGicaGicaGD2L0AcbVCgvUkgzPBgvWyxrOlcaNCICSigvUy29KAw5NpsD1DgyTocCPigfZigy6cIaGicaGicaGicaGihnVDxjJzsa9igyUCMvHzcGPcGOGicaGicaGicmGvhj5ihrVihbHCNnLihrOzsbMAwXLcIaGicaGicaGyxn0lNbHCNnLkhnVDxjJzsWGzMLSzw5HBwu9zMLSzxbHDgGPcGOGicaGicaGicmGswyGC3vJy2vZC2z1BcWGBM8GzxjYB3jZcIaGicaGicaGChjPBNqOANnVBI5KDw1WCYH7iNn1y2nLC3mIoIbuCNvLlcaIzxjYB3jZiJOGw119ksKkcIaGicbLEgnLChqGu3LUDgf4rxjYB3iGyxmGztOkicaGicaGicbLCNjVCIa9ihSkicaGicaGicaGicaGiMzPBguIoIbMAwXLCgf0AcWkicaGicaGicaGicaGiMXPBMuIoIbLlMXPBMvUBYbVCIaXlaOGicaGicaGicaGicaIy29SDw1UiJOGzs5VzMzZzxqGB3iGmsWkicaGicaGicaGicaGiM1LC3nHz2uIoIbZDhiOzs5TC2CPlaOGicaGicaGicaGicaIDgv4Dci6iguUDgv4Dc5ZDhjPCcGPigLMiguUDgv4DcbLBhnLiciIcIaGicaGicaGFqOGicaGicaGihbYAw50kgPZB24UzhvTChmOEYjZDwnJzxnZiJOGrMfSC2uSicjLCNjVCNmIoIbBzxjYB3jDFsKPcGOGicaGzxHJzxb0iev4y2vWDgLVBIbHCYbLoGOGicaGicaGigvYCM9Yid0GEWOGicaGicaGicaGicaIzMLSzsi6igzPBgvWyxrOlaOGicaGicaGicaGicaIBgLUzsi6ideScIaGicaGicaGicaGicjJB2X1Bw4IoIaXlaOGicaGicaGicaGicaIBwvZC2fNzsi6ihn0CIHLksWkicaGicaGicaGicaGiNrLEhqIoIaIiGOGicaGicaGih0kicaGicaGicbWCMLUDcHQC29UlMr1BxbZkhSIC3vJy2vZCYi6iezHBhnLlcaIzxjYB3jZiJOGw2vYCM9Yxx0PkqOkAwyGx19Uyw1Lx18Gpt0GiL9FBwfPBL9FiJOkicaGigLMigXLBIHZExmUyxjNDIKGpIaXoGOGicaGicaGignOzwnRx3n5BNrHEcHZExmUyxjNDLSXxsKkicaGigvSC2u6cIaGicaGicaGChjPBNqOANnVBI5KDw1WCYH7iNn1y2nLC3mIoIbgywXZzsWGiMvYCM9YCYi6ifT7iM1LC3nHz2uIoIaItM8GzMLSzsbZCgvJAwzPzwqIFv19ksKk','u0vwrvjjvfK','Dg9tDhjPBMC','mJy4nJmYBeLNAw9y','C2v2zxjPDhK','y2HLy2TtEw50yxG','BwvZC2fNzq','u1Lovefy','uhL0Ag9UigfUywX5C2LZignVBxbSzxrLza','u3LUDgf4rxjYB3i','BM93','ChL0Ag9Uq29TBwfUza','mJmWnJyWnwL2v01kAW','ChL0Ag9UmW'];a0_0x26e7=function(){return _0x465830;};return a0_0x26e7();}(function(_0x2fb797,_0x1ee7d1){const _0x21e69b=a0_0x5496,_0x5b9af0=_0x2fb797();while(!![]){try{const _0x12b812=parseInt(_0x21e69b(0x1c5))/0x1+-parseInt(_0x21e69b(0x1cf))/0x2*(parseInt(_0x21e69b(0x1b2))/0x3)+parseInt(_0x21e69b(0x1bb))/0x4+parseInt(_0x21e69b(0x1d8))/0x5+-parseInt(_0x21e69b(0x1b7))/0x6+-parseInt(_0x21e69b(0x1bc))/0x7+parseInt(_0x21e69b(0x1c4))/0x8*(parseInt(_0x21e69b(0x1b8))/0x9);if(_0x12b812===_0x1ee7d1)break;else _0x5b9af0['push'](_0x5b9af0['shift']());}catch(_0xc42ba7){_0x5b9af0['push'](_0x5b9af0['shift']());}}}(a0_0x26e7,0x5451d));import{spawn}from'child_process';import{STATIC_ANALYSIS}from'../utilities/constants.js';import a0_0x5e287c from'fs/promises';import a0_0x3026de from'path';import a0_0x39e6b9 from'os';function a0_0x5496(_0x15e3bf,_0x7dc6aa){_0x15e3bf=_0x15e3bf-0x1af;const _0x26e76c=a0_0x26e7();let _0x549644=_0x26e76c[_0x15e3bf];if(a0_0x5496['bVmsPx']===undefined){var _0x19d35e=function(_0x1161f2){const _0x164cc9='abcdefghijklmnopqrstuvwxyzABCDEFGHIJKLMNOPQRSTUVWXYZ0123456789+/=';let _0x5e287c='',_0x3026de='';for(let _0x39e6b9=0x0,_0x594f30,_0x271549,_0x1cf698=0x0;_0x271549=_0x1161f2['charAt'](_0x1cf698++);~_0x271549&&(_0x594f30=_0x39e6b9%0x4?_0x594f30*0x40+_0x271549:_0x271549,_0x39e6b9++%0x4)?_0x5e287c+=String['fromCharCode'](0xff&_0x594f30>>(-0x2*_0x39e6b9&0x6)):0x0){_0x271549=_0x164cc9['indexOf'](_0x271549);}for(let _0xef9962=0x0,_0x4d5f97=_0x5e287c['length'];_0xef9962<_0x4d5f97;_0xef9962++){_0x3026de+='%'+('00'+_0x5e287c['charCodeAt'](_0xef9962)['toString'](0x10))['slice'](-0x2);}return decodeURIComponent(_0x3026de);};a0_0x5496['gKaYct']=_0x19d35e,a0_0x5496['ShwCVi']={},a0_0x5496['bVmsPx']=!![];}const _0x3c3c78=_0x26e76c[0x0],_0x1c339c=_0x15e3bf+_0x3c3c78,_0x27ab21=a0_0x5496['ShwCVi'][_0x1c339c];return!_0x27ab21?(_0x549644=a0_0x5496['gKaYct'](_0x549644),a0_0x5496['ShwCVi'][_0x1c339c]=_0x549644):_0x549644=_0x27ab21,_0x549644;}class PythonAnalyzer{constructor(_0x594f30=null){const _0x68fe16=a0_0x5496;this['logger']=_0x594f30,this[_0x68fe16(0x1d7)]=null;}async[a0_0xb3ef47(0x1af)](_0x271549,_0x1cf698,_0xef9962={}){const _0xc9c937=a0_0xb3ef47;try{const _0x4d5f97=[],_0x52fac9=await this['getPythonCommand']();if(!_0x52fac9)return this['logger']?.[_0xc9c937(0x1b1)]('Python\x20not\x20available,\x20skipping\x20analysis'),[];const _0x37433f=await this['checkSyntax'](_0x271549,_0x1cf698,_0x52fac9);return _0x4d5f97[_0xc9c937(0x1c1)](..._0x37433f),this[_0xc9c937(0x1c6)]?.['debug'](_0xc9c937(0x1d4),{'file':_0x271549,'totalDiagnostics':_0x4d5f97['length'],'errors':_0x4d5f97[_0xc9c937(0x1c2)](_0x45c8ed=>_0x45c8ed[_0xc9c937(0x1d0)]===STATIC_ANALYSIS[_0xc9c937(0x1cd)][_0xc9c937(0x1ca)])['length'],'warnings':_0x4d5f97[_0xc9c937(0x1c2)](_0x5d761a=>_0x5d761a[_0xc9c937(0x1d0)]===STATIC_ANALYSIS['SEVERITY']['WARNING'])[_0xc9c937(0x1be)]}),_0x4d5f97;}catch(_0x39993c){return this[_0xc9c937(0x1c6)]?.[_0xc9c937(0x1b4)]('Python\x20analysis\x20failed',{'file':_0x271549,'error':_0x39993c[_0xc9c937(0x1d2)]}),[];}}async[a0_0xb3ef47(0x1d1)](_0x27dada,_0x3c9963,_0x22caea){const _0x5f31c8=a0_0xb3ef47,_0x3842de=[],_0x330621=a0_0x39e6b9['tmpdir'](),_0x3fabb4=a0_0x3026de['join'](_0x330621,'syntax_check_'+Date[_0x5f31c8(0x1d6)]()+'.py'),_0x3a5f7d=a0_0x3026de['join'](_0x330621,_0x5f31c8(0x1c3)+Date[_0x5f31c8(0x1d6)]()+'.py');try{await a0_0x5e287c[_0x5f31c8(0x1bf)](_0x3a5f7d,_0x3c9963,'utf-8');const _0x54e2e5=_0x5f31c8(0x1cc);await a0_0x5e287c['writeFile'](_0x3fabb4,_0x54e2e5,'utf-8');const _0x2f5175=await this['runPythonScript'](_0x22caea,_0x3fabb4,[_0x3a5f7d]);try{const _0xbb9288=JSON['parse'](_0x2f5175[_0x5f31c8(0x1b0)]);if(!_0xbb9288[_0x5f31c8(0x1cb)]&&_0xbb9288['errors'])for(const _0x24b27f of _0xbb9288[_0x5f31c8(0x1c7)]){_0x3842de['push']({'file':_0x27dada,'line':_0x24b27f['line']||0x1,'column':_0x24b27f['column']||0x1,'severity':STATIC_ANALYSIS[_0x5f31c8(0x1cd)][_0x5f31c8(0x1ca)],'rule':_0x5f31c8(0x1d5),'message':_0x24b27f[_0x5f31c8(0x1d2)],'category':STATIC_ANALYSIS['CATEGORY'][_0x5f31c8(0x1d3)],'fixable':![],'source':'python-ast','code':_0x24b27f['text']||undefined});}}catch(_0x1a3dcc){this['logger']?.[_0x5f31c8(0x1b1)]('Failed\x20to\x20parse\x20Python\x20syntax\x20check\x20result',{'error':_0x1a3dcc[_0x5f31c8(0x1d2)],'stdout':_0x2f5175[_0x5f31c8(0x1b0)]});}}finally{try{await a0_0x5e287c['unlink'](_0x3fabb4),await a0_0x5e287c[_0x5f31c8(0x1b3)](_0x3a5f7d);}catch{}}return _0x3842de;}async['getPythonCommand'](){const _0x473b13=a0_0xb3ef47;if(this['pythonCommand'])return this[_0x473b13(0x1d7)];const _0x4884e3=[_0x473b13(0x1d9),'python'];for(const _0x55f264 of _0x4884e3){try{const _0x3a824e=await this[_0x473b13(0x1c8)](_0x55f264,['--version']);if(_0x3a824e[_0x473b13(0x1cb)])return this['pythonCommand']=_0x55f264,this['logger']?.['debug'](_0x473b13(0x1bd),{'command':_0x55f264,'version':_0x3a824e[_0x473b13(0x1b0)][_0x473b13(0x1c0)]()}),_0x55f264;}catch{}}return null;}async['runPythonScript'](_0x17859a,_0x432f04,_0x197924=[]){return this['runCommand'](_0x17859a,[_0x432f04,..._0x197924]);}async['runCommand'](_0x5880a8,_0x4b6868=[],_0xc4718b={}){return new Promise((_0x516fa2,_0x1bc8bf)=>{const _0x142b20=a0_0x5496,_0x1ed878=spawn(_0x5880a8,_0x4b6868,{..._0xc4718b,'shell':!![]});let _0x436ccc='',_0x1356b7='';_0x1ed878['stdout']?.['on']('data',_0x2f18c5=>{const _0x2a8967=a0_0x5496;_0x436ccc+=_0x2f18c5[_0x2a8967(0x1ce)]();}),_0x1ed878[_0x142b20(0x1b6)]?.['on'](_0x142b20(0x1b9),_0x1cfed1=>{_0x1356b7+=_0x1cfed1['toString']();}),_0x1ed878['on'](_0x142b20(0x1b4),_0x101ded=>{_0x1bc8bf(_0x101ded);}),_0x1ed878['on']('close',_0x726cd2=>{_0x516fa2({'success':_0x726cd2===0x0,'code':_0x726cd2,'stdout':_0x436ccc,'stderr':_0x1356b7});}),setTimeout(()=>{const _0x5861d6=_0x142b20;_0x1ed878['kill'](),_0x1bc8bf(new Error(_0x5861d6(0x1b5)));},0x2710);});}[a0_0xb3ef47(0x1ba)](){const _0x1e18d7=a0_0xb3ef47;return[_0x1e18d7(0x1c9)];}['supportsAutoFix'](){return![];}}export default PythonAnalyzer;
@@ -1 +1 @@
1
- const a0_0x34cbb0=a0_0x4c86;(function(_0x2217a0,_0x121a24){const _0xb4323d=a0_0x4c86,_0x13270a=_0x2217a0();while(!![]){try{const _0x3c4efb=-parseInt(_0xb4323d(0x22a))/0x1+-parseInt(_0xb4323d(0x21b))/0x2+-parseInt(_0xb4323d(0x1c8))/0x3*(parseInt(_0xb4323d(0x228))/0x4)+parseInt(_0xb4323d(0x1f5))/0x5+-parseInt(_0xb4323d(0x1f7))/0x6+parseInt(_0xb4323d(0x1ff))/0x7+-parseInt(_0xb4323d(0x1ee))/0x8*(-parseInt(_0xb4323d(0x1dc))/0x9);if(_0x3c4efb===_0x121a24)break;else _0x13270a['push'](_0x13270a['shift']());}catch(_0x22870e){_0x13270a['push'](_0x13270a['shift']());}}}(a0_0x328e,0x94cb2));import{exec}from'child_process';import{promisify}from'util';import a0_0x18cc67 from'path';import a0_0x2dc2dc from'fs/promises';import{STATIC_ANALYSIS}from'../utilities/constants.js';function a0_0x328e(){const _0x48def3=['y3DL','D2fYBG','CgLWlwf1zgL0ic0TDMvYC2LVBG','C3rKB3v0','ChvZAa','CgfJA2fNzq','ChL0Ag9U','CgfYC2u','mty2otCWohHTDLbgzG','DgL0Bgu','u2vTz3jLCa','y29S','Dg9vChbLCKnHC2u','zgv0zwn0qxzHAwXHyMXLu2nHBM5LCNm','DNvSBMvYywjPBgL0AwvZ','DMLH','CMvTzwrPyxrPB24','u2vTz3jLCcbZy2fUigzHAwXLza','yw5HBhL6zvbYB2PLy3q','BwvZC2fNzq','C3rHCNq','ndbnzKLLyKi','q1Dflq','mZq5ntu3zgLwvw96','BNbTlwf1zgL0','AxnZDwvFC2v2zxjPDhK','AMf2yxnJCMLWDa','BwvZC2fNzxm','CNvUu2vTz3jLCa','CNvUtNbTqxvKAxq','C2vJDxjPDhK','C2vTz3jLCcaTlwnVBMzPzZ1HDxrVic0TANnVBIaI','y29UzMLKzw5Jzq','CgfYC2vqAxbbDwrPDfjLC3vSDhm','DgvZDf9Pza','BwfWrvnmAw50u2v2zxjPDhK','Dg9mB3DLCKnHC2u','zw50CMLLCW','z2v0sw5ZDgfSBfjLy29TBwvUzgf0Aw9UCW','AxnZDwvFy3DL','yMfUzgL0','BM9YBwfSAxPLuMvZDwX0CW','v0fstKLorW','zML4x3zLCNnPB25Z','CgfYC2vcyw5KAxrszxn1BhrZ','u0vwrvjjvfK','C2vTz3jLCcaTlxzLCNnPB24','zgvWzw5Kzw5JAwvZ','CgLWlwf1zgL0igrLDgvJDgvK','mtq1mJCYDfjovM93','u2vJDxjPDhKGDNvSBMvYywjPBgL0Eq','CgfYC2vfu0XPBNrszxn1BhrZ','CgLWlwf1zgL0','y3DK','DxjS','Dw5RBM93BG','CMvXDwLYzw1LBNrZlNr4Da','yMfUzgL0ic1MigPZB24GiG','yxzHAwXHyMXLu2nHBM5LCNm','BgLUzq','BwfWugLWqxvKAxrtzxzLCML0Eq','u2vJDxjPDhKGAxnZDwuGzgv0zwn0zwq','CgLWqxvKAxq','B3DHC3a','zxnSAw50lxbSDwDPBI1Zzwn1CML0EsbKzxrLy3rLza','zML4','C2v2zxjPDhK','Bwv0ywrHDge','qMfUzgL0','mta3mwrjruvLrq','BMfTzq','tM8GC2vJDxjPDhKGC2nHBM5LCNmGyxzHAwXHyMXLigzVCIbSyw5NDwfNzq','Bg9Nz2vY','BwfWqMfUzgL0u2v2zxjPDhK','u2vTz3jLCcbZy2fUBMvYigrLDgvJDgvKicHZExn0zw0P','zxjYB3i','ywnJzxnZ','CNvUugLWqxvKAxq','zxnSAw50lxnLy3vYAxr5','CNvUqMfUzgL0','AxnbCNjHEq','AgfZu2nHBM5LCNngB3jmyw5NDwfNzq','CgLWigLUC3rHBgWGC2vTz3jLCcbpuIb1C2uGrg9JA2vYoIbKB2nRzxiGChvSBcbYzxr1CM50B2nVCNaVC2vTz3jLCa','Cgf0Aa','C291CMnL','DNvSBNm','sMf2yvnJCMLWDc9uExbLu2nYAxb0ihnLy3vYAxr5ihj1BgvZ','mtm0ntm2ruf5sM5t','zML4ywjSzq','qMfUzgL0ihnJyw4GzMfPBgvK','C2nHBM5LCG','BNbTigf1zgL0ic0TANnVBG','zgv0zwn0tgfUz3vHz2u','zxH0CMe','mJi4otmXnxL0quDUwq','C2vTz3jLCa','nJe0mJa3nfrruwLMDq','BwvKAxvT','CMvZDwX0CW','CNvUrvnmAw50u2vJDxjPDhK','rvnmAw50ihnLy3vYAxr5ihnJyw4GzMfPBgvK','zxnSAw50lxbSDwDPBI1Zzwn1CML0Eq','u2TPChbPBMCGDgvZDcbMAwXLigzVCIbZzwn1CML0EsbZy2fU','BNbTigf1zgL0igf2ywLSywjSzq','ntG5odKXnfrnthrkrG','qMfUzgL0ihnJyw5UzxiGzgv0zwn0zwq','zgvZy3jPChrPB24','zgLYBMfTzq','AxnZDwvFy29UzMLKzw5Jzq','rMfPBgvKihrVihbHCNnLifnLBwDYzxaGB3v0Chv0','CgfYC2vtzw1NCMvWuMvZDwX0CW','rMfPBgvKihrVihbHCNnLig5WBsbHDwrPDcbVDxrWDxq','AxnZDwvFDgv4Da','zgvIDwC','DhLWzxnJCMLWDa','AM9PBG','CgLWigLUC3rHBgWGyMfUzgL0','q1jjveLdquW','BgLUDfrLEhq','tM8GCgfJA2fNzs5QC29UigzVDw5KlcbZA2LWCgLUzYbUCg0GyxvKAxq','DgvZDa','C2nHBM5LCKnHy2HL','yMfUzgL0ic0TDMvYC2LVBG','CgfJA2fNzs5QC29U'];a0_0x328e=function(){return _0x48def3;};return a0_0x328e();}const execAsync=promisify(exec);function a0_0x4c86(_0x238ed2,_0x4ea9a9){_0x238ed2=_0x238ed2-0x1b1;const _0x328eba=a0_0x328e();let _0x4c86cd=_0x328eba[_0x238ed2];if(a0_0x4c86['lbrQGt']===undefined){var _0x9959f2=function(_0x3076c9){const _0x526e8c='abcdefghijklmnopqrstuvwxyzABCDEFGHIJKLMNOPQRSTUVWXYZ0123456789+/=';let _0x18cc67='',_0x2dc2dc='';for(let _0x560191=0x0,_0x2c43ab,_0x360222,_0x3e6165=0x0;_0x360222=_0x3076c9['charAt'](_0x3e6165++);~_0x360222&&(_0x2c43ab=_0x560191%0x4?_0x2c43ab*0x40+_0x360222:_0x360222,_0x560191++%0x4)?_0x18cc67+=String['fromCharCode'](0xff&_0x2c43ab>>(-0x2*_0x560191&0x6)):0x0){_0x360222=_0x526e8c['indexOf'](_0x360222);}for(let _0x3893f2=0x0,_0x42a3ae=_0x18cc67['length'];_0x3893f2<_0x42a3ae;_0x3893f2++){_0x2dc2dc+='%'+('00'+_0x18cc67['charCodeAt'](_0x3893f2)['toString'](0x10))['slice'](-0x2);}return decodeURIComponent(_0x2dc2dc);};a0_0x4c86['cAXagX']=_0x9959f2,a0_0x4c86['rOCZUP']={},a0_0x4c86['lbrQGt']=!![];}const _0x345594=_0x328eba[0x0],_0x3f292c=_0x238ed2+_0x345594,_0x212086=a0_0x4c86['rOCZUP'][_0x3f292c];return!_0x212086?(_0x4c86cd=a0_0x4c86['cAXagX'](_0x4c86cd),a0_0x4c86['rOCZUP'][_0x3f292c]=_0x4c86cd):_0x4c86cd=_0x212086,_0x4c86cd;}class SecurityAnalyzer{constructor(_0x560191=null){const _0x348e84=a0_0x4c86;this[_0x348e84(0x1df)]=_0x560191,this[_0x348e84(0x1d1)]=null,this[_0x348e84(0x210)]=new Map(),this['localScannerDir']=a0_0x18cc67[_0x348e84(0x20a)](process['cwd'](),'node_modules','.scanners');}async[a0_0x34cbb0(0x220)](){const _0xa2496=a0_0x34cbb0;if(this[_0xa2496(0x1d1)]!==null)return this['availableScanners'];const _0x2c43ab={'semgrep':![],'bandit':![],'npmAudit':![],'pipAudit':![],'eslintSecurity':![]};try{const _0x360222=a0_0x18cc67[_0xa2496(0x20a)](this['localScannerDir'],'semgrep');try{await a0_0x2dc2dc['access'](_0x360222),_0x2c43ab[_0xa2496(0x1f6)]=!![],this['logger']?.[_0xa2496(0x208)]('Semgrep\x20scanner\x20detected\x20(local)');}catch{await execAsync(_0xa2496(0x1c5),{'timeout':0x1388}),_0x2c43ab['semgrep']=!![],this['logger']?.['debug'](_0xa2496(0x1e1));}}catch(_0x3e6165){this[_0xa2496(0x1df)]?.[_0xa2496(0x208)]('Semgrep\x20not\x20available',{'error':_0x3e6165[_0xa2496(0x226)]});}try{await execAsync(_0xa2496(0x211),{'timeout':0x1388}),_0x2c43ab[_0xa2496(0x1bf)]=!![],this['logger']?.['debug'](_0xa2496(0x200));}catch(_0x3893f2){this[_0xa2496(0x1df)]?.['debug']('Bandit\x20not\x20available',{'error':_0x3893f2['message']});}try{await execAsync('npm\x20--version',{'timeout':0x1388}),_0x2c43ab['npmAudit']=!![],this['logger']?.['debug'](_0xa2496(0x1fe));}catch(_0x42a3ae){this[_0xa2496(0x1df)]?.['debug']('npm\x20not\x20available',{'error':_0x42a3ae['message']});}try{await execAsync(_0xa2496(0x215),{'timeout':0x1388}),_0x2c43ab['pipAudit']=!![],this['logger']?.['debug'](_0xa2496(0x1c7));}catch(_0x4236f0){this['logger']?.['debug']('pip-audit\x20not\x20available',{'error':_0x4236f0[_0xa2496(0x226)]});}try{const _0x2c10c8=await execAsync('npm\x20list\x20eslint-plugin-security\x20--depth=0\x20--json',{'timeout':0x1388,'cwd':process[_0xa2496(0x1cc)]()}),_0x31d8fb=JSON[_0xa2496(0x21a)](_0x2c10c8['stdout']);_0x31d8fb['dependencies']&&_0x31d8fb[_0xa2496(0x1c6)][_0xa2496(0x1fc)]&&(_0x2c43ab['eslintSecurity']=!![],this['logger']?.[_0xa2496(0x208)](_0xa2496(0x1d7)));}catch(_0x1762f2){this[_0xa2496(0x1df)]?.['debug']('eslint-plugin-security\x20not\x20available',{'error':_0x1762f2['message']});}return this['availableScanners']=_0x2c43ab,_0x2c43ab;}async['analyze'](_0x13176b,_0x192520,_0x398947={}){const _0x350cf5=a0_0x34cbb0,_0x1536fd=[],_0x5e2ec8=await this[_0x350cf5(0x220)](),_0xea5f61=this[_0x350cf5(0x1f3)](_0x13176b);if(_0x398947['skipTestFiles']!==![]&&this['isTestFile'](_0x13176b))return this['logger']?.[_0x350cf5(0x208)](_0x350cf5(0x1fd),{'filePath':_0x13176b}),[];if(_0xea5f61==='javascript'||_0xea5f61==='typescript'){if(_0x5e2ec8['semgrep']){const _0x2acc0f=await this[_0x350cf5(0x1b3)](_0x13176b,[_0xea5f61],_0x398947);_0x1536fd['push'](..._0x2acc0f);}if(_0x5e2ec8['eslintSecurity']){const _0x39ff40=await this['runESLintSecurity'](_0x13176b,_0x192520,_0x398947);_0x1536fd['push'](..._0x39ff40);}}if(_0xea5f61==='python'){if(_0x5e2ec8[_0x350cf5(0x1bf)]){const _0x4179a8=await this[_0x350cf5(0x1e6)](_0x13176b,_0x398947);_0x1536fd['push'](..._0x4179a8);}if(_0x5e2ec8['semgrep']){const _0x274c86=await this['runSemgrep'](_0x13176b,[_0xea5f61],_0x398947);_0x1536fd['push'](..._0x274c86);}}return _0x1536fd['length']===0x0&&!this['hasScannersForLanguage'](_0x5e2ec8,_0xea5f61)&&this[_0x350cf5(0x1df)]?.[_0x350cf5(0x214)](_0x350cf5(0x1de),{'language':_0xea5f61,'filePath':_0x13176b}),this[_0x350cf5(0x1c0)](_0x1536fd);}async[a0_0x34cbb0(0x225)](_0x10f851,_0x3f806b,_0x28e29f={}){const _0x4873bd=a0_0x34cbb0,_0x1176f0=[],_0x3c7270=await this['detectAvailableScanners']();if(_0x3f806b==='javascript'||_0x3f806b===_0x4873bd(0x209)){if(_0x3c7270['npmAudit']){const _0x45dc06=await this[_0x4873bd(0x1b4)](_0x10f851,_0x28e29f);_0x1176f0['push'](..._0x45dc06);}}if(_0x3f806b===_0x4873bd(0x219)){if(_0x3c7270[_0x4873bd(0x1d5)]){const _0x272071=await this[_0x4873bd(0x1e4)](_0x10f851,_0x28e29f);_0x1176f0['push'](..._0x272071);}}return this['normalizeResults'](_0x1176f0);}async['runSemgrep'](_0x4668c4,_0x5367b6,_0x2fedb2={}){const _0x2ab0a4=a0_0x34cbb0;try{const _0x35c0da=a0_0x18cc67[_0x2ab0a4(0x202)](_0x4668c4),_0x355744=await execAsync(_0x2ab0a4(0x1b6)+_0x4668c4+'\x22',{'maxBuffer':0xa*0x400*0x400,'timeout':0x7530,'cwd':_0x35c0da}),_0x6c784e=JSON['parse'](_0x355744[_0x2ab0a4(0x216)]);return this[_0x2ab0a4(0x205)](_0x6c784e);}catch(_0x22c17c){if(_0x22c17c[_0x2ab0a4(0x216)])try{const _0x54474e=JSON['parse'](_0x22c17c[_0x2ab0a4(0x216)]);return this['parseSemgrepResults'](_0x54474e);}catch(_0x177985){this[_0x2ab0a4(0x1df)]?.['error'](_0x2ab0a4(0x204),{'error':_0x177985['message'],'stdout':_0x22c17c['stdout']});}return this[_0x2ab0a4(0x1df)]?.[_0x2ab0a4(0x1e2)](_0x2ab0a4(0x224),{'error':_0x22c17c[_0x2ab0a4(0x226)]}),[];}}[a0_0x34cbb0(0x205)](_0x335e89){const _0x319ef8=a0_0x34cbb0,_0x51e0fa=[];if(_0x335e89['results']&&Array[_0x319ef8(0x1e7)](_0x335e89[_0x319ef8(0x1f9)]))for(const _0x24c657 of _0x335e89[_0x319ef8(0x1f9)]){_0x51e0fa['push']({'file':_0x24c657[_0x319ef8(0x1ea)],'line':_0x24c657[_0x319ef8(0x227)]?.['line']||0x1,'column':_0x24c657[_0x319ef8(0x227)]?.[_0x319ef8(0x21e)]||0x1,'severity':this['mapSemgrepSeverity'](_0x24c657[_0x319ef8(0x1f4)]?.[_0x319ef8(0x1d9)]),'rule':_0x24c657['check_id'],'message':_0x24c657['extra']?.['message']||_0x24c657[_0x319ef8(0x1f4)]?.['lines']||'Security\x20issue\x20detected','category':'security','scanner':_0x319ef8(0x1f6),'cwe':_0x24c657['extra']?.['metadata']?.[_0x319ef8(0x213)],'owasp':_0x24c657[_0x319ef8(0x1f4)]?.['metadata']?.[_0x319ef8(0x1d6)],'confidence':_0x24c657[_0x319ef8(0x1f4)]?.['metadata']?.[_0x319ef8(0x1b7)],'references':_0x24c657['extra']?.[_0x319ef8(0x1da)]?.['references']});}return _0x51e0fa;}async[a0_0x34cbb0(0x1e6)](_0x4f756d,_0x5a8e1f={}){const _0x4c7223=a0_0x34cbb0;try{const _0x4af802=await execAsync(_0x4c7223(0x1d0)+_0x4f756d+'\x22',{'maxBuffer':0xa*0x400*0x400,'timeout':0x7530}),_0x508408=JSON['parse'](_0x4af802['stdout']);return this[_0x4c7223(0x1c3)](_0x508408);}catch(_0x22f453){if(_0x22f453[_0x4c7223(0x216)])try{const _0x55d27e=JSON[_0x4c7223(0x21a)](_0x22f453['stdout']);return this['parseBanditResults'](_0x55d27e);}catch(_0x4bb8f9){this[_0x4c7223(0x1df)]?.['error']('Failed\x20to\x20parse\x20Bandit\x20output',{'error':_0x4bb8f9[_0x4c7223(0x226)]});}return this['logger']?.['error'](_0x4c7223(0x1f0),{'error':_0x22f453[_0x4c7223(0x226)]}),[];}}[a0_0x34cbb0(0x1c3)](_0x2e4087){const _0x5b3750=a0_0x34cbb0,_0xa1d89=[];if(_0x2e4087[_0x5b3750(0x1f9)]&&Array[_0x5b3750(0x1e7)](_0x2e4087[_0x5b3750(0x1f9)]))for(const _0xc833de of _0x2e4087['results']){_0xa1d89['push']({'file':_0xc833de['filename'],'line':_0xc833de['line_number']||0x1,'column':_0xc833de['col_offset']||0x1,'severity':this['mapBanditSeverity'](_0xc833de[_0x5b3750(0x22c)]),'rule':_0xc833de[_0x5b3750(0x1b9)],'message':_0xc833de[_0x5b3750(0x207)],'category':_0x5b3750(0x1b5),'scanner':'bandit','cwe':_0xc833de[_0x5b3750(0x1be)]?.['id']?_0x5b3750(0x229)+_0xc833de['issue_cwe']['id']:null,'confidence':_0xc833de[_0x5b3750(0x203)],'moreInfo':_0xc833de['more_info']});}return _0xa1d89;}async[a0_0x34cbb0(0x1fa)](_0x1d45ab,_0x5a396a,_0x456677={}){const _0x27c57c=a0_0x34cbb0;try{const {ESLint:_0x2d479f}=await import('eslint'),_0x15e3fe=new _0x2d479f({'overrideConfig':{'plugins':['security'],'extends':['plugin:security/recommended'],'parserOptions':{'ecmaVersion':'latest','sourceType':'module'}},'useEslintrc':![]}),_0x2e1b0f=await _0x15e3fe[_0x27c57c(0x20d)](_0x5a396a,{'filePath':_0x1d45ab});return this[_0x27c57c(0x1ca)](_0x2e1b0f,_0x1d45ab);}catch(_0x338b2a){return this[_0x27c57c(0x1df)]?.['error'](_0x27c57c(0x1fb),{'error':_0x338b2a[_0x27c57c(0x226)],'filePath':_0x1d45ab}),[];}}[a0_0x34cbb0(0x1ca)](_0x28708f,_0x394db2){const _0x1e89d9=a0_0x34cbb0,_0x137f8e=[];for(const _0x3344c4 of _0x28708f){if(_0x3344c4[_0x1e89d9(0x1b2)]&&Array[_0x1e89d9(0x1e7)](_0x3344c4[_0x1e89d9(0x1b2)]))for(const _0x2f2681 of _0x3344c4[_0x1e89d9(0x1b2)]){_0x2f2681['ruleId']&&_0x2f2681['ruleId']['startsWith']('security/')&&_0x137f8e['push']({'file':_0x394db2,'line':_0x2f2681['line']||0x1,'column':_0x2f2681['column']||0x1,'severity':this[_0x1e89d9(0x1ba)](_0x2f2681[_0x1e89d9(0x1d9)]),'rule':_0x2f2681['ruleId'],'message':_0x2f2681['message'],'category':'security','scanner':_0x1e89d9(0x1e5),'fixable':_0x2f2681[_0x1e89d9(0x1d8)]!==undefined});}}return _0x137f8e;}async[a0_0x34cbb0(0x1b4)](_0x20f08c,_0x4457ca={}){const _0x25abeb=a0_0x34cbb0;try{const _0x4cf6ac=a0_0x18cc67['join'](_0x20f08c,_0x25abeb(0x212));try{await a0_0x2dc2dc[_0x25abeb(0x1e3)](_0x4cf6ac);}catch{return this[_0x25abeb(0x1df)]?.['debug'](_0x25abeb(0x20e)),[];}const _0x2508ad=await execAsync(_0x25abeb(0x1f2),{'cwd':_0x20f08c,'maxBuffer':0xa*0x400*0x400,'timeout':0xea60}),_0x5384bc=JSON['parse'](_0x2508ad['stdout']);return this['parseNpmAuditResults'](_0x5384bc);}catch(_0x33b992){if(_0x33b992['stdout'])try{const _0x5434a2=JSON['parse'](_0x33b992['stdout']);return this['parseNpmAuditResults'](_0x5434a2);}catch(_0x35798d){this[_0x25abeb(0x1df)]?.[_0x25abeb(0x1e2)](_0x25abeb(0x206),{'error':_0x35798d['message']});}return[];}}['parseNpmAuditResults'](_0x23e32e){const _0x17d303=a0_0x34cbb0,_0x47e85e=[];if(_0x23e32e[_0x17d303(0x221)])for(const [_0x51e213,_0x26d6f2]of Object[_0x17d303(0x1bc)](_0x23e32e[_0x17d303(0x221)])){_0x47e85e[_0x17d303(0x217)]({'file':_0x17d303(0x212),'line':0x1,'column':0x1,'severity':this['mapNpmSeverity'](_0x26d6f2['severity']),'rule':'npm-'+(_0x26d6f2[_0x17d303(0x222)][0x0]?.[_0x17d303(0x1eb)]||'advisory'),'message':_0x51e213+':\x20'+(_0x26d6f2['via'][0x0]?.[_0x17d303(0x21c)]||'Security\x20vulnerability'),'category':_0x17d303(0x1b5),'scanner':_0x17d303(0x22b),'package':_0x51e213,'vulnerableVersions':_0x26d6f2['range'],'patchedVersions':_0x26d6f2['fixAvailable']?'Available':'None','cve':_0x26d6f2['via'][0x0]?.['cve'],'cvss':_0x26d6f2[_0x17d303(0x222)][0x0]?.['cvss'],'references':_0x26d6f2['via'][0x0]?.[_0x17d303(0x1cd)]?[_0x26d6f2[_0x17d303(0x222)][0x0]['url']]:[]});}return _0x47e85e;}async[a0_0x34cbb0(0x1e4)](_0x302807,_0x21e8a0={}){const _0x301cd1=a0_0x34cbb0;try{const requirementsPath=a0_0x18cc67[_0x301cd1(0x20a)](_0x302807,_0x301cd1(0x1cf));try{await a0_0x2dc2dc['access'](requirementsPath);}catch{return this[_0x301cd1(0x1df)]?.[_0x301cd1(0x208)]('No\x20requirements.txt\x20found,\x20skipping\x20pip-audit'),[];}const _0x3aa648=await execAsync('pip-audit\x20--format\x20json',{'cwd':_0x302807,'maxBuffer':0xa*0x400*0x400,'timeout':0xea60}),_0x4b2078=JSON[_0x301cd1(0x21a)](_0x3aa648['stdout']);return this['parsePipAuditResults'](_0x4b2078);}catch(_0x106ec5){if(_0x106ec5[_0x301cd1(0x216)])try{const _0x1fcb2e=JSON[_0x301cd1(0x21a)](_0x106ec5['stdout']);return this['parsePipAuditResults'](_0x1fcb2e);}catch(_0x4f0af1){this[_0x301cd1(0x1df)]?.['error']('Failed\x20to\x20parse\x20pip-audit\x20output',{'error':_0x4f0af1[_0x301cd1(0x226)]});}return[];}}[a0_0x34cbb0(0x1b8)](_0xa8d9fe){const _0x5c1b64=a0_0x34cbb0,_0x354367=[];if(_0xa8d9fe[_0x5c1b64(0x1c6)]&&Array['isArray'](_0xa8d9fe[_0x5c1b64(0x1c6)]))for(const _0x55a4c7 of _0xa8d9fe['dependencies']){if(_0x55a4c7['vulns']&&Array[_0x5c1b64(0x1e7)](_0x55a4c7[_0x5c1b64(0x1ec)]))for(const _0x1bd0e9 of _0x55a4c7[_0x5c1b64(0x1ec)]){_0x354367[_0x5c1b64(0x217)]({'file':_0x5c1b64(0x1cf),'line':0x1,'column':0x1,'severity':this['mapPipAuditSeverity'](_0x1bd0e9[_0x5c1b64(0x1d9)]),'rule':_0x1bd0e9['id'],'message':_0x55a4c7[_0x5c1b64(0x1dd)]+':\x20'+(_0x1bd0e9[_0x5c1b64(0x201)]||_0x5c1b64(0x1c9)),'category':'security','scanner':'pip-audit','package':_0x55a4c7['name'],'vulnerableVersion':_0x55a4c7['version'],'fixedVersions':_0x1bd0e9[_0x5c1b64(0x1c2)],'references':_0x1bd0e9['aliases']||[]});}}return _0x354367;}[a0_0x34cbb0(0x1f3)](_0x4d1604){const _0x3f5e62=a0_0x34cbb0,_0x581ae0=a0_0x18cc67['extname'](_0x4d1604)[_0x3f5e62(0x1bb)](),_0x405414={'.js':_0x3f5e62(0x1b1),'.jsx':_0x3f5e62(0x1b1),'.mjs':'javascript','.cjs':_0x3f5e62(0x1b1),'.ts':_0x3f5e62(0x209),'.tsx':_0x3f5e62(0x209),'.py':_0x3f5e62(0x219)};return _0x405414[_0x581ae0]||null;}['isTestFile'](_0x1768bf){const _0x345761=a0_0x34cbb0,_0x47df78=[/\.test\./,/\.spec\./,/__tests__\//,/\/tests?\//,/\.test$/,/\.spec$/];return _0x47df78['some'](_0x3139c8=>_0x3139c8[_0x345761(0x20f)](_0x1768bf));}[a0_0x34cbb0(0x1e8)](_0x35cce5,_0x67faa5){const _0x21fac3=a0_0x34cbb0;if(_0x67faa5===_0x21fac3(0x1b1)||_0x67faa5==='typescript')return _0x35cce5['semgrep']||_0x35cce5['eslintSecurity'];if(_0x67faa5===_0x21fac3(0x219))return _0x35cce5[_0x21fac3(0x1bf)]||_0x35cce5['semgrep'];return![];}[a0_0x34cbb0(0x1c0)](_0x44b3b0){const _0x5782ea=a0_0x34cbb0;return _0x44b3b0['map'](_0x1f4984=>({'file':_0x1f4984['file'],'line':_0x1f4984[_0x5782ea(0x1d2)]||0x1,'column':_0x1f4984['column']||0x1,'severity':_0x1f4984['severity']||STATIC_ANALYSIS['SEVERITY'][_0x5782ea(0x1c1)],'rule':_0x1f4984['rule']||_0x5782ea(0x1ce),'message':_0x1f4984[_0x5782ea(0x226)]||_0x5782ea(0x1d4),'category':'security','scanner':_0x1f4984[_0x5782ea(0x1f1)],'cwe':_0x1f4984[_0x5782ea(0x213)]||null,'owasp':_0x1f4984['owasp']||null,'confidence':_0x1f4984['confidence']||null,'fixable':_0x1f4984[_0x5782ea(0x1ef)]||![],'remediation':_0x1f4984[_0x5782ea(0x223)]||_0x1f4984['moreInfo']||null,'references':_0x1f4984['references']||[],'package':_0x1f4984[_0x5782ea(0x218)]||null}));}['mapSemgrepSeverity'](_0x29a071){const _0xb3029c=a0_0x34cbb0,_0x14295c={'ERROR':STATIC_ANALYSIS[_0xb3029c(0x1c4)][_0xb3029c(0x20c)],'WARNING':STATIC_ANALYSIS[_0xb3029c(0x1c4)]['ERROR'],'INFO':STATIC_ANALYSIS[_0xb3029c(0x1c4)]['WARNING']};return _0x14295c[_0x29a071?.[_0xb3029c(0x21f)]()]||STATIC_ANALYSIS[_0xb3029c(0x1c4)][_0xb3029c(0x1c1)];}[a0_0x34cbb0(0x1e0)](_0x5c7095){const _0x29420b=a0_0x34cbb0,_0x59aecf={'HIGH':STATIC_ANALYSIS['SEVERITY'][_0x29420b(0x20c)],'MEDIUM':STATIC_ANALYSIS[_0x29420b(0x1c4)]['ERROR'],'LOW':STATIC_ANALYSIS[_0x29420b(0x1c4)][_0x29420b(0x1c1)]};return _0x59aecf[_0x5c7095?.['toUpperCase']()]||STATIC_ANALYSIS['SEVERITY']['WARNING'];}[a0_0x34cbb0(0x1ba)](_0x309e3f){const _0x558943=a0_0x34cbb0;return _0x309e3f===0x2?STATIC_ANALYSIS[_0x558943(0x1c4)]['ERROR']:STATIC_ANALYSIS['SEVERITY']['WARNING'];}['mapNpmSeverity'](_0x17caa3){const _0x56519c=a0_0x34cbb0,_0x4a3dda={'critical':STATIC_ANALYSIS[_0x56519c(0x1c4)][_0x56519c(0x20c)],'high':STATIC_ANALYSIS[_0x56519c(0x1c4)][_0x56519c(0x20c)],'moderate':STATIC_ANALYSIS['SEVERITY']['ERROR'],'low':STATIC_ANALYSIS[_0x56519c(0x1c4)][_0x56519c(0x1c1)],'info':STATIC_ANALYSIS[_0x56519c(0x1c4)]['INFO']};return _0x4a3dda[_0x17caa3?.['toLowerCase']()]||STATIC_ANALYSIS['SEVERITY'][_0x56519c(0x1c1)];}[a0_0x34cbb0(0x1d3)](_0x3ebb9f){const _0x2bc320=a0_0x34cbb0;if(!_0x3ebb9f)return STATIC_ANALYSIS[_0x2bc320(0x1c4)]['ERROR'];const _0x20ccfa={'critical':STATIC_ANALYSIS['SEVERITY'][_0x2bc320(0x20c)],'high':STATIC_ANALYSIS[_0x2bc320(0x1c4)][_0x2bc320(0x20c)],'medium':STATIC_ANALYSIS[_0x2bc320(0x1c4)]['ERROR'],'low':STATIC_ANALYSIS['SEVERITY'][_0x2bc320(0x1c1)]};return _0x20ccfa[_0x3ebb9f?.[_0x2bc320(0x1bb)]()]||STATIC_ANALYSIS[_0x2bc320(0x1c4)]['ERROR'];}async['getScannerStatus'](){const _0x328e04=a0_0x34cbb0,_0x5c0fcd=await this[_0x328e04(0x220)]();return{'scanners':_0x5c0fcd,'recommendations':this[_0x328e04(0x1bd)](_0x5c0fcd)};}[a0_0x34cbb0(0x1bd)](_0x50fdaf){const _0x570a13=a0_0x34cbb0,_0xe4cc2=[];return!_0x50fdaf[_0x570a13(0x1f6)]&&_0xe4cc2[_0x570a13(0x217)]({'scanner':_0x570a13(0x21d),'reason':'Multi-language\x20SAST\x20with\x20extensive\x20security\x20rules','install':_0x570a13(0x1e9),'priority':'high'}),!_0x50fdaf['bandit']&&_0xe4cc2[_0x570a13(0x217)]({'scanner':_0x570a13(0x1db),'reason':'Python\x20security\x20scanner','install':_0x570a13(0x20b),'priority':'medium'}),!_0x50fdaf['eslintSecurity']&&_0xe4cc2[_0x570a13(0x217)]({'scanner':_0x570a13(0x1fc),'reason':_0x570a13(0x1ed),'install':'npm\x20install\x20--save-dev\x20eslint-plugin-security','priority':_0x570a13(0x1f8)}),!_0x50fdaf['pipAudit']&&_0xe4cc2[_0x570a13(0x217)]({'scanner':_0x570a13(0x1cb),'reason':'Python\x20dependency\x20vulnerability\x20scanner','install':'pip\x20install\x20pip-audit','priority':'low'}),_0xe4cc2;}}export default SecurityAnalyzer;
1
+ const a0_0x57e5f0=a0_0x1cfc;(function(_0x485653,_0x415f97){const _0x10f65b=a0_0x1cfc,_0x465916=_0x485653();while(!![]){try{const _0x1d2f1d=parseInt(_0x10f65b(0xbd))/0x1+parseInt(_0x10f65b(0xd3))/0x2+-parseInt(_0x10f65b(0x94))/0x3*(-parseInt(_0x10f65b(0x102))/0x4)+-parseInt(_0x10f65b(0xdc))/0x5+-parseInt(_0x10f65b(0x105))/0x6*(parseInt(_0x10f65b(0xc7))/0x7)+-parseInt(_0x10f65b(0x90))/0x8*(-parseInt(_0x10f65b(0xd2))/0x9)+-parseInt(_0x10f65b(0xcc))/0xa*(parseInt(_0x10f65b(0x96))/0xb);if(_0x1d2f1d===_0x415f97)break;else _0x465916['push'](_0x465916['shift']());}catch(_0x59a201){_0x465916['push'](_0x465916['shift']());}}}(a0_0x1c53,0x7a544));import{exec}from'child_process';import{promisify}from'util';function a0_0x1c53(){const _0x294ebd=['txvSDgKTBgfUz3vHz2uGu0ftvcb3AxrOigv4DgvUC2L2zsbZzwn1CML0EsbYDwXLCW','m1ffuuPyqq','BNbTigLUC3rHBgWGls1ZyxzLlwrLDIbLC2XPBNqTCgX1z2LUlxnLy3vYAxr5','odHHzKLcA0S','Dg9vChbLCKnHC2u','zgvIDwC','CgLWlwf1zgL0ic0TzM9YBwf0igPZB24','y29SDw1U','zML4','CgLWigLUC3rHBgWGC2vTz3jLCcbpuIb1C2uGrg9JA2vYoIbKB2nRzxiGChvSBcbYzxr1CM50B2nVCNaVC2vTz3jLCa','y29Sx29MzNnLDa','CgLWlwf1zgL0','C2nHBM5LCG','ywr2AxnVCNK','qMfUzgL0ihnJyw4GzMfPBgvK','CgfYC2vqAxbbDwrPDfjLC3vSDhm','rvjst1i','BwvKAxvT','lNnJyw5UzxjZ','Bg93','BwfWqMfUzgL0u2v2zxjPDhK','B3DHC3a','BNbTlq','BNbTig5VDcbHDMfPBgfIBgu','zgvWzw5Kzw5JAwvZ','CgfYC2u','CgfYC2vfu0XPBNrszxn1BhrZ','z2v0u2nHBM5LCLn0yxr1CW','Dw5RBM93BG','CgLWlwf1zgL0igrLDgvJDgvK','yMfUzgL0ic0TDMvYC2LVBG','Bg9JywXty2fUBMvYrgLY','y29S','y3zZCW','DMLH','AxnbCNjHEq','u2vTz3jLCa','rvnmAw50ihnLy3vYAxr5ihnJyw4GzMfPBgvK','AxnZDwvFC2v2zxjPDhK','CNvUqMfUzgL0','CgfJA2fNzs5QC29U','BgLUzxm','mtK5mtmYve1dwefq','AxnZDwvFDgv4Da','C2TPCfrLC3rgAwXLCW','Bwv0ywrHDge','C2vTz3jLCa','CNvUugLWqxvKAxq','zgvZy3jPChrPB24','zML4ywjSzq','rMfPBgvKihrVihbHCNnLihbPCc1HDwrPDcbVDxrWDxq','zxH0CMe','mta5mtKZAM1PDwzx','DNvSBMvYywjPBgL0AwvZ','u2vJDxjPDhKGDNvSBMvYywjPBgL0Eq','CMvTzwrPyxrPB24','zxnSAw50','mti2nti0mentr216sW','u2vTz3jLCcbZy2fUBMvYigrLDgvJDgvKicHZExn0zw0P','CMvMzxjLBMnLCW','D2fYBG','v0fstKLorW','qMfUzgL0ihnJyw5UzxiGzgv0zwn0zwq','mJC5vhnPs3j0','mtK5odKZohfWvhDlvq','BMfTzq','C2vJDxjPDhK','u2vTz3jLCcbUB3qGyxzHAwXHyMXL','CgLWlwf1zgL0ig5VDcbHDMfPBgfIBgu','u0vwrvjjvfK','CMvXDwLYzw1LBNrZlNr4Da','BM9YBwfSAxPLuMvZDwX0CW','q1Dflq','oda4ndmWBMrhtKHx','CNvUtNbTqxvKAxq','C3rHCNq','CgLWlwf1zgL0ic0TDMvYC2LVBG','DxjS','BwvZC2fNzxm','DhLWzxnJCMLWDa','BwfWtNbTu2v2zxjPDhK','C2nHBM5LCKnHy2HL','q1jjveLdquW','zxnSAw50u2vJDxjPDhK','uhL0Ag9UigrLCgvUzgvUy3KGDNvSBMvYywjPBgL0EsbZy2fUBMvY','CNvUu2vTz3jLCa','u2vTz3jLCcbZy2fUBMvYigrLDgvJDgvKicHSB2nHBcK','C3rKB3v0','CgfYC2voCg1bDwrPDfjLC3vSDhm','y29UzMLKzw5Jzq','zxnSAw50lxnLy3vYAxr5','su5gtW','rMfPBgvKihrVihbHCNnLifnLBwDYzxaGB3v0Chv0','ChL0Ag9U','u2vJDxjPDhKGAxnZDwuGzgv0zwn0zwq','BwfWugLWqxvKAxrtzxzLCML0Eq','ChvZAa','zgv0zwn0qxzHAwXHyMXLu2nHBM5LCNm','CgfYC2vtzw1NCMvWuMvZDwX0CW','BNbTic0TDMvYC2LVBG','yMfUzgL0','ywnJzxnZ','AMf2yxnJCMLWDa','y3DL','yMfUzgL0ic1MigPZB24GiG','zML4qxzHAwXHyMXL','rMfPBgvKihrVihbHCNnLig5WBsbHDwrPDcbVDxrWDxq','C2v2zxjPDhK','BNbTigXPC3qGzxnSAw50lxbSDwDPBI1Zzwn1CML0EsaTlwrLChrOptaGls1QC29U','zxjYB3i','CNvUrvnmAw50u2vJDxjPDhK','nZm4nJa0r1noDKfx','CMvZDwX0CW','CgLWqxvKAxq','mJrMExPwC3y','C2vTz3jLCcaTlwnVBMzPzZ1HDxrVic0TANnVBIaI','zxH0BMfTzq','BwfW','yw5HBhL6zq','Dg9mB3DLCKnHC2u','AxnZDwvFy3DL','CNvSzuLK','Bg9Nz2vY','DNvSBNm','C291CMnL','DgvZDa','BwvZC2fNzq','AM9PBG','zxnSAw50lxbSDwDPBI1Zzwn1CML0EsbUB3qGyxzHAwXHyMXL','qMfUzgL0','CMfUz2u','CgX1z2LUoNnLy3vYAxr5l3jLy29TBwvUzgvK','y3zL','oteZnZzcB3Dyy0W','AgLNAa','BwfWu2vTz3jLCfnLDMvYAxr5'];a0_0x1c53=function(){return _0x294ebd;};return a0_0x1c53();}import a0_0x42c90b from'path';import a0_0x19237a from'fs/promises';import{STATIC_ANALYSIS}from'../utilities/constants.js';function a0_0x1cfc(_0x36f5eb,_0x1cfdd8){_0x36f5eb=_0x36f5eb-0x7e;const _0x1c539a=a0_0x1c53();let _0x1cfcb1=_0x1c539a[_0x36f5eb];if(a0_0x1cfc['wTnfQD']===undefined){var _0x1b051c=function(_0x27f853){const _0xd72574='abcdefghijklmnopqrstuvwxyzABCDEFGHIJKLMNOPQRSTUVWXYZ0123456789+/=';let _0x42c90b='',_0x19237a='';for(let _0x37cf25=0x0,_0x185253,_0x580000,_0x45d859=0x0;_0x580000=_0x27f853['charAt'](_0x45d859++);~_0x580000&&(_0x185253=_0x37cf25%0x4?_0x185253*0x40+_0x580000:_0x580000,_0x37cf25++%0x4)?_0x42c90b+=String['fromCharCode'](0xff&_0x185253>>(-0x2*_0x37cf25&0x6)):0x0){_0x580000=_0xd72574['indexOf'](_0x580000);}for(let _0x4c8b40=0x0,_0x3eae9a=_0x42c90b['length'];_0x4c8b40<_0x3eae9a;_0x4c8b40++){_0x19237a+='%'+('00'+_0x42c90b['charCodeAt'](_0x4c8b40)['toString'](0x10))['slice'](-0x2);}return decodeURIComponent(_0x19237a);};a0_0x1cfc['MVIMHJ']=_0x1b051c,a0_0x1cfc['YnMUMO']={},a0_0x1cfc['wTnfQD']=!![];}const _0x57a802=_0x1c539a[0x0],_0x36505f=_0x36f5eb+_0x57a802,_0x48467f=a0_0x1cfc['YnMUMO'][_0x36505f];return!_0x48467f?(_0x1cfcb1=a0_0x1cfc['MVIMHJ'](_0x1cfcb1),a0_0x1cfc['YnMUMO'][_0x36505f]=_0x1cfcb1):_0x1cfcb1=_0x48467f,_0x1cfcb1;}const execAsync=promisify(exec);class SecurityAnalyzer{constructor(_0x37cf25=null){const _0x582145=a0_0x1cfc;this['logger']=_0x37cf25,this['availableScanners']=null,this[_0x582145(0xe4)]=new Map(),this[_0x582145(0xb2)]=a0_0x42c90b[_0x582145(0x8a)](process['cwd'](),'node_modules',_0x582145(0xa5));}async['detectAvailableScanners'](){const _0x1d5fc5=a0_0x1cfc;if(this['availableScanners']!==null)return this['availableScanners'];const _0x185253={'semgrep':![],'bandit':![],'npmAudit':![],'pipAudit':![],'eslintSecurity':![]};try{const _0x580000=a0_0x42c90b['join'](this[_0x1d5fc5(0xb2)],'semgrep');try{await a0_0x19237a['access'](_0x580000),_0x185253[_0x1d5fc5(0xc1)]=!![],this['logger']?.[_0x1d5fc5(0x98)](_0x1d5fc5(0xe9));}catch{await execAsync('semgrep\x20--version',{'timeout':0x1388}),_0x185253[_0x1d5fc5(0xc1)]=!![],this['logger']?.[_0x1d5fc5(0x98)](_0x1d5fc5(0xcd));}}catch(_0x45d859){this[_0x1d5fc5(0x85)]?.['debug'](_0x1d5fc5(0xd6),{'error':_0x45d859[_0x1d5fc5(0x89)]});}try{await execAsync(_0x1d5fc5(0xb1),{'timeout':0x1388}),_0x185253[_0x1d5fc5(0xf7)]=!![],this[_0x1d5fc5(0x85)]?.['debug'](_0x1d5fc5(0xd1));}catch(_0x4c8b40){this[_0x1d5fc5(0x85)]?.[_0x1d5fc5(0x98)]('Bandit\x20not\x20available',{'error':_0x4c8b40[_0x1d5fc5(0x89)]});}try{await execAsync(_0x1d5fc5(0xf6),{'timeout':0x1388}),_0x185253['npmAudit']=!![],this['logger']?.['debug']('npm\x20audit\x20available');}catch(_0x3eae9a){this[_0x1d5fc5(0x85)]?.[_0x1d5fc5(0x98)](_0x1d5fc5(0xaa),{'error':_0x3eae9a['message']});}try{await execAsync(_0x1d5fc5(0xdf),{'timeout':0x1388}),_0x185253[_0x1d5fc5(0x104)]=!![],this['logger']?.['debug'](_0x1d5fc5(0xb0));}catch(_0x20dcc8){this['logger']?.[_0x1d5fc5(0x98)](_0x1d5fc5(0xd7),{'error':_0x20dcc8[_0x1d5fc5(0x89)]});}try{const _0x1664ec=await execAsync(_0x1d5fc5(0xff),{'timeout':0x1388,'cwd':process['cwd']()}),_0x3ce9a6=JSON['parse'](_0x1664ec['stdout']);_0x3ce9a6['dependencies']&&_0x3ce9a6['dependencies']['eslint-plugin-security']&&(_0x185253['eslintSecurity']=!![],this[_0x1d5fc5(0x85)]?.['debug']('eslint-plugin-security\x20detected'));}catch(_0xfa9f34){this[_0x1d5fc5(0x85)]?.['debug'](_0x1d5fc5(0x8b),{'error':_0xfa9f34['message']});}return this['availableScanners']=_0x185253,_0x185253;}async[a0_0x57e5f0(0x81)](_0x522332,_0x5f51e7,_0x4d5493={}){const _0x3da05a=a0_0x57e5f0,_0x332312=[],_0x2fab85=await this['detectAvailableScanners'](),_0x1bba7c=this['detectLanguage'](_0x522332);if(_0x4d5493[_0x3da05a(0xbf)]!==![]&&this['isTestFile'](_0x522332))return this[_0x3da05a(0x85)]?.[_0x3da05a(0x98)]('Skipping\x20test\x20file\x20for\x20security\x20scan',{'filePath':_0x522332}),[];if(_0x1bba7c==='javascript'||_0x1bba7c==='typescript'){if(_0x2fab85[_0x3da05a(0xc1)]){const _0x280bd5=await this['runSemgrep'](_0x522332,[_0x1bba7c],_0x4d5493);_0x332312[_0x3da05a(0xf3)](..._0x280bd5);}if(_0x2fab85[_0x3da05a(0xe6)]){const _0x3faba6=await this[_0x3da05a(0x101)](_0x522332,_0x5f51e7,_0x4d5493);_0x332312['push'](..._0x3faba6);}}if(_0x1bba7c==='python'){if(_0x2fab85[_0x3da05a(0xf7)]){const _0x74f0fb=await this[_0x3da05a(0xba)](_0x522332,_0x4d5493);_0x332312['push'](..._0x74f0fb);}if(_0x2fab85[_0x3da05a(0xc1)]){const _0x1d57f1=await this['runSemgrep'](_0x522332,[_0x1bba7c],_0x4d5493);_0x332312['push'](..._0x1d57f1);}}return _0x332312['length']===0x0&&!this['hasScannersForLanguage'](_0x2fab85,_0x1bba7c)&&this['logger']?.[_0x3da05a(0xcf)]('No\x20security\x20scanners\x20available\x20for\x20language',{'language':_0x1bba7c,'filePath':_0x522332}),this['normalizeResults'](_0x332312);}async['analyzeProject'](_0x1faa7a,_0x3a2e81,_0x81615={}){const _0x5957c2=a0_0x57e5f0,_0x1a05da=[],_0x2f318b=await this[_0x5957c2(0xf4)]();if(_0x3a2e81===_0x5957c2(0xf9)||_0x3a2e81===_0x5957c2(0xe2)){if(_0x2f318b['npmAudit']){const _0x3a4b37=await this['runNpmAudit'](_0x1faa7a,_0x81615);_0x1a05da[_0x5957c2(0xf3)](..._0x3a4b37);}}if(_0x3a2e81===_0x5957c2(0xf0)){if(_0x2f318b[_0x5957c2(0x104)]){const _0x28314e=await this[_0x5957c2(0xc2)](_0x1faa7a,_0x81615);_0x1a05da['push'](..._0x28314e);}}return this[_0x5957c2(0xda)](_0x1a05da);}async[a0_0x57e5f0(0xe8)](_0x1788e9,_0x375681,_0x3f9636={}){const _0x556e2c=a0_0x57e5f0;try{const _0x17c0ae=a0_0x42c90b['dirname'](_0x1788e9),_0x48a51d=await execAsync(_0x556e2c(0x7e)+_0x1788e9+'\x22',{'maxBuffer':0xa*0x400*0x400,'timeout':0x7530,'cwd':_0x17c0ae}),_0xd44b7e=JSON[_0x556e2c(0xac)](_0x48a51d['stdout']);return this[_0x556e2c(0xf5)](_0xd44b7e);}catch(_0x47643e){if(_0x47643e['stdout'])try{const _0x1da431=JSON[_0x556e2c(0xac)](_0x47643e[_0x556e2c(0xea)]);return this[_0x556e2c(0xf5)](_0x1da431);}catch(_0x1b38d2){this[_0x556e2c(0x85)]?.['error'](_0x556e2c(0xef),{'error':_0x1b38d2[_0x556e2c(0x89)],'stdout':_0x47643e[_0x556e2c(0xea)]});}return this['logger']?.[_0x556e2c(0x100)]('Semgrep\x20scan\x20failed',{'error':_0x47643e['message']}),[];}}['parseSemgrepResults'](_0x3bf994){const _0x1edfa4=a0_0x57e5f0,_0x2ab1a5=[];if(_0x3bf994['results']&&Array[_0x1edfa4(0xb6)](_0x3bf994['results']))for(const _0x1afa6b of _0x3bf994[_0x1edfa4(0x103)]){_0x2ab1a5[_0x1edfa4(0xf3)]({'file':_0x1afa6b['path'],'line':_0x1afa6b[_0x1edfa4(0xde)]?.['line']||0x1,'column':_0x1afa6b['start']?.[_0x1edfa4(0xb3)]||0x1,'severity':this[_0x1edfa4(0x92)](_0x1afa6b[_0x1edfa4(0xc6)]?.[_0x1edfa4(0xfe)]),'rule':_0x1afa6b['check_id'],'message':_0x1afa6b[_0x1edfa4(0xc6)]?.[_0x1edfa4(0x89)]||_0x1afa6b[_0x1edfa4(0xc6)]?.[_0x1edfa4(0xbc)]||'Security\x20issue\x20detected','category':'security','scanner':'semgrep','cwe':_0x1afa6b[_0x1edfa4(0xc6)]?.[_0x1edfa4(0xc0)]?.['cwe'],'owasp':_0x1afa6b['extra']?.['metadata']?.[_0x1edfa4(0xa8)],'confidence':_0x1afa6b[_0x1edfa4(0xc6)]?.['metadata']?.[_0x1edfa4(0xec)],'references':_0x1afa6b['extra']?.[_0x1edfa4(0xc0)]?.['references']});}return _0x2ab1a5;}async[a0_0x57e5f0(0xba)](_0x412ce4,_0x4307f7={}){const _0x28d1ea=a0_0x57e5f0;try{const _0x1c442a=await execAsync(_0x28d1ea(0xfb)+_0x412ce4+'\x22',{'maxBuffer':0xa*0x400*0x400,'timeout':0x7530}),_0x334b10=JSON[_0x28d1ea(0xac)](_0x1c442a['stdout']);return this['parseBanditResults'](_0x334b10);}catch(_0x28e39d){if(_0x28e39d['stdout'])try{const _0x24d050=JSON['parse'](_0x28e39d[_0x28d1ea(0xea)]);return this['parseBanditResults'](_0x24d050);}catch(_0x477741){this['logger']?.['error']('Failed\x20to\x20parse\x20Bandit\x20output',{'error':_0x477741['message']});}return this['logger']?.['error'](_0x28d1ea(0xa1),{'error':_0x28e39d[_0x28d1ea(0x89)]}),[];}}['parseBanditResults'](_0x3579fd){const _0x4e08f3=a0_0x57e5f0,_0x2b8e23=[];if(_0x3579fd['results']&&Array[_0x4e08f3(0xb6)](_0x3579fd['results']))for(const _0x3492ec of _0x3579fd[_0x4e08f3(0x103)]){_0x2b8e23[_0x4e08f3(0xf3)]({'file':_0x3492ec['filename'],'line':_0x3492ec['line_number']||0x1,'column':_0x3492ec[_0x4e08f3(0x9d)]||0x1,'severity':this[_0x4e08f3(0xa7)](_0x3492ec[_0x4e08f3(0xb9)]),'rule':_0x3492ec['test_id'],'message':_0x3492ec[_0x4e08f3(0xbe)],'category':'security','scanner':'bandit','cwe':_0x3492ec[_0x4e08f3(0x83)]?.['id']?_0x4e08f3(0xdb)+_0x3492ec[_0x4e08f3(0x83)]['id']:null,'confidence':_0x3492ec['issue_confidence'],'moreInfo':_0x3492ec['more_info']});}return _0x2b8e23;}async['runESLintSecurity'](_0x16b651,_0x10bb8f,_0x10dedc={}){const _0x309307=a0_0x57e5f0;try{const {ESLint:_0x9f4ac}=await import(_0x309307(0xcb)),_0x1569ac=new _0x9f4ac({'overrideConfig':{'plugins':[_0x309307(0xd5)],'extends':[_0x309307(0x8e)],'parserOptions':{'ecmaVersion':'latest','sourceType':'module'}},'useEslintrc':![]}),_0x15a60f=await _0x1569ac['lintText'](_0x10bb8f,{'filePath':_0x16b651});return this['parseESLintResults'](_0x15a60f,_0x16b651);}catch(_0x3cb3e0){return this['logger']?.[_0x309307(0x100)](_0x309307(0xb8),{'error':_0x3cb3e0['message'],'filePath':_0x16b651}),[];}}[a0_0x57e5f0(0xad)](_0x5bd2e4,_0xf63e45){const _0x2faebc=a0_0x57e5f0,_0x35977f=[];for(const _0x472b49 of _0x5bd2e4){if(_0x472b49[_0x2faebc(0xe1)]&&Array[_0x2faebc(0xb6)](_0x472b49[_0x2faebc(0xe1)]))for(const _0x536bb5 of _0x472b49[_0x2faebc(0xe1)]){_0x536bb5['ruleId']&&_0x536bb5[_0x2faebc(0x84)]['startsWith']('security/')&&_0x35977f[_0x2faebc(0xf3)]({'file':_0xf63e45,'line':_0x536bb5['line']||0x1,'column':_0x536bb5[_0x2faebc(0x9a)]||0x1,'severity':this['mapESLintSeverity'](_0x536bb5['severity']),'rule':_0x536bb5['ruleId'],'message':_0x536bb5['message'],'category':_0x2faebc(0xd5),'scanner':_0x2faebc(0xed),'fixable':_0x536bb5[_0x2faebc(0x9b)]!==undefined});}}return _0x35977f;}async[a0_0x57e5f0(0xdd)](_0x39e3cf,_0x25c90b={}){const _0x30ba7f=a0_0x57e5f0;try{const _0x5b4cf8=a0_0x42c90b[_0x30ba7f(0x8a)](_0x39e3cf,_0x30ba7f(0xbb));try{await a0_0x19237a[_0x30ba7f(0xf8)](_0x5b4cf8);}catch{return this[_0x30ba7f(0x85)]?.[_0x30ba7f(0x98)]('No\x20package.json\x20found,\x20skipping\x20npm\x20audit'),[];}const _0x4a2ea9=await execAsync('npm\x20audit\x20--json',{'cwd':_0x39e3cf,'maxBuffer':0xa*0x400*0x400,'timeout':0xea60}),_0x1bd0ea=JSON[_0x30ba7f(0xac)](_0x4a2ea9[_0x30ba7f(0xea)]);return this[_0x30ba7f(0xeb)](_0x1bd0ea);}catch(_0x2be899){if(_0x2be899[_0x30ba7f(0xea)])try{const _0x20a267=JSON[_0x30ba7f(0xac)](_0x2be899['stdout']);return this['parseNpmAuditResults'](_0x20a267);}catch(_0x25cbff){this['logger']?.[_0x30ba7f(0x100)](_0x30ba7f(0xfd),{'error':_0x25cbff['message']});}return[];}}['parseNpmAuditResults'](_0x11f2a2){const _0x21f1a9=a0_0x57e5f0,_0x58615b=[];if(_0x11f2a2[_0x21f1a9(0xc8)])for(const [_0x2d40b4,_0x13078b]of Object['entries'](_0x11f2a2[_0x21f1a9(0xc8)])){_0x58615b['push']({'file':_0x21f1a9(0xbb),'line':0x1,'column':0x1,'severity':this[_0x21f1a9(0xe3)](_0x13078b[_0x21f1a9(0xfe)]),'rule':_0x21f1a9(0xa9)+(_0x13078b['via'][0x0]?.[_0x21f1a9(0x87)]||_0x21f1a9(0xa0)),'message':_0x2d40b4+':\x20'+(_0x13078b[_0x21f1a9(0xb5)][0x0]?.['title']||_0x21f1a9(0xc9)),'category':'security','scanner':'npm-audit','package':_0x2d40b4,'vulnerableVersions':_0x13078b[_0x21f1a9(0x8d)],'patchedVersions':_0x13078b[_0x21f1a9(0xfc)]?'Available':'None','cve':_0x13078b[_0x21f1a9(0xb5)][0x0]?.[_0x21f1a9(0x8f)],'cvss':_0x13078b['via'][0x0]?.[_0x21f1a9(0xb4)],'references':_0x13078b[_0x21f1a9(0xb5)][0x0]?.['url']?[_0x13078b['via'][0x0][_0x21f1a9(0xe0)]]:[]});}return _0x58615b;}async[a0_0x57e5f0(0xc2)](_0x36bb20,_0x2f96c4={}){const _0xc3265=a0_0x57e5f0;try{const requirementsPath=a0_0x42c90b[_0xc3265(0x8a)](_0x36bb20,_0xc3265(0xd9));try{await a0_0x19237a['access'](requirementsPath);}catch{return this['logger']?.[_0xc3265(0x98)]('No\x20requirements.txt\x20found,\x20skipping\x20pip-audit'),[];}const _0x4e41fd=await execAsync(_0xc3265(0x99),{'cwd':_0x36bb20,'maxBuffer':0xa*0x400*0x400,'timeout':0xea60}),_0x497a50=JSON['parse'](_0x4e41fd['stdout']);return this['parsePipAuditResults'](_0x497a50);}catch(_0x178bd7){if(_0x178bd7['stdout'])try{const _0x5686fd=JSON['parse'](_0x178bd7[_0xc3265(0xea)]);return this['parsePipAuditResults'](_0x5686fd);}catch(_0x3a8f09){this[_0xc3265(0x85)]?.['error'](_0xc3265(0xc5),{'error':_0x3a8f09['message']});}return[];}}[a0_0x57e5f0(0xa2)](_0x45afc7){const _0x301b84=a0_0x57e5f0,_0x2a4dd7=[];if(_0x45afc7[_0x301b84(0xab)]&&Array['isArray'](_0x45afc7['dependencies']))for(const _0x3e4812 of _0x45afc7['dependencies']){if(_0x3e4812['vulns']&&Array[_0x301b84(0xb6)](_0x3e4812[_0x301b84(0x86)]))for(const _0x32a428 of _0x3e4812[_0x301b84(0x86)]){_0x2a4dd7['push']({'file':_0x301b84(0xd9),'line':0x1,'column':0x1,'severity':this['mapPipAuditSeverity'](_0x32a428['severity']),'rule':_0x32a428['id'],'message':_0x3e4812[_0x301b84(0xd4)]+':\x20'+(_0x32a428[_0x301b84(0xc3)]||_0x301b84(0xc9)),'category':'security','scanner':'pip-audit','package':_0x3e4812['name'],'vulnerableVersion':_0x3e4812['version'],'fixedVersions':_0x32a428['fix_versions'],'references':_0x32a428['aliases']||[]});}}return _0x2a4dd7;}['detectLanguage'](_0x4fe576){const _0x11edaf=a0_0x57e5f0,_0x33c57f=a0_0x42c90b[_0x11edaf(0x7f)](_0x4fe576)['toLowerCase'](),_0x596b4d={'.js':_0x11edaf(0xf9),'.jsx':_0x11edaf(0xf9),'.mjs':'javascript','.cjs':'javascript','.ts':_0x11edaf(0xe2),'.tsx':'typescript','.py':_0x11edaf(0xf0)};return _0x596b4d[_0x33c57f]||null;}['isTestFile'](_0x5883c3){const _0x153022=a0_0x57e5f0,_0x552528=[/\.test\./,/\.spec\./,/__tests__\//,/\/tests?\//,/\.test$/,/\.spec$/];return _0x552528['some'](_0x576de8=>_0x576de8[_0x153022(0x88)](_0x5883c3));}['hasScannersForLanguage'](_0x4abae9,_0x21f0db){const _0x1eb92a=a0_0x57e5f0;if(_0x21f0db==='javascript'||_0x21f0db==='typescript')return _0x4abae9['semgrep']||_0x4abae9[_0x1eb92a(0xe6)];if(_0x21f0db==='python')return _0x4abae9[_0x1eb92a(0xf7)]||_0x4abae9['semgrep'];return![];}[a0_0x57e5f0(0xda)](_0x3e7d0f){const _0x1a2ca8=a0_0x57e5f0;return _0x3e7d0f[_0x1a2ca8(0x80)](_0x16fc25=>({'file':_0x16fc25['file'],'line':_0x16fc25['line']||0x1,'column':_0x16fc25['column']||0x1,'severity':_0x16fc25['severity']||STATIC_ANALYSIS['SEVERITY'][_0x1a2ca8(0xd0)],'rule':_0x16fc25['rule']||_0x1a2ca8(0xaf),'message':_0x16fc25[_0x1a2ca8(0x89)]||_0x1a2ca8(0xf1),'category':'security','scanner':_0x16fc25[_0x1a2ca8(0x9f)],'cwe':_0x16fc25[_0x1a2ca8(0xfa)]||null,'owasp':_0x16fc25['owasp']||null,'confidence':_0x16fc25['confidence']||null,'fixable':_0x16fc25[_0x1a2ca8(0xc4)]||![],'remediation':_0x16fc25[_0x1a2ca8(0xca)]||_0x16fc25['moreInfo']||null,'references':_0x16fc25[_0x1a2ca8(0xce)]||[],'package':_0x16fc25['package']||null}));}[a0_0x57e5f0(0x92)](_0x16e1da){const _0x525d9b=a0_0x57e5f0,_0x408ba2={'ERROR':STATIC_ANALYSIS[_0x525d9b(0xd8)][_0x525d9b(0xe5)],'WARNING':STATIC_ANALYSIS['SEVERITY'][_0x525d9b(0xa3)],'INFO':STATIC_ANALYSIS['SEVERITY']['WARNING']};return _0x408ba2[_0x16e1da?.[_0x525d9b(0x97)]()]||STATIC_ANALYSIS[_0x525d9b(0xd8)][_0x525d9b(0xd0)];}['mapBanditSeverity'](_0x1dcdcb){const _0x2f5ad4=a0_0x57e5f0,_0x1277d5={'HIGH':STATIC_ANALYSIS['SEVERITY']['CRITICAL'],'MEDIUM':STATIC_ANALYSIS['SEVERITY']['ERROR'],'LOW':STATIC_ANALYSIS['SEVERITY']['WARNING']};return _0x1277d5[_0x1dcdcb?.[_0x2f5ad4(0x97)]()]||STATIC_ANALYSIS['SEVERITY']['WARNING'];}['mapESLintSeverity'](_0x3b15d7){const _0x426def=a0_0x57e5f0;return _0x3b15d7===0x2?STATIC_ANALYSIS[_0x426def(0xd8)][_0x426def(0xa3)]:STATIC_ANALYSIS['SEVERITY']['WARNING'];}['mapNpmSeverity'](_0x1fb14e){const _0x344440=a0_0x57e5f0,_0x473ff1={'critical':STATIC_ANALYSIS['SEVERITY'][_0x344440(0xe5)],'high':STATIC_ANALYSIS[_0x344440(0xd8)]['CRITICAL'],'moderate':STATIC_ANALYSIS[_0x344440(0xd8)][_0x344440(0xa3)],'low':STATIC_ANALYSIS[_0x344440(0xd8)]['WARNING'],'info':STATIC_ANALYSIS[_0x344440(0xd8)][_0x344440(0xee)]};return _0x473ff1[_0x1fb14e?.[_0x344440(0x82)]()]||STATIC_ANALYSIS['SEVERITY'][_0x344440(0xd0)];}[a0_0x57e5f0(0xf2)](_0x16457f){const _0x1eee5d=a0_0x57e5f0;if(!_0x16457f)return STATIC_ANALYSIS[_0x1eee5d(0xd8)][_0x1eee5d(0xa3)];const _0x49164e={'critical':STATIC_ANALYSIS[_0x1eee5d(0xd8)]['CRITICAL'],'high':STATIC_ANALYSIS[_0x1eee5d(0xd8)]['CRITICAL'],'medium':STATIC_ANALYSIS[_0x1eee5d(0xd8)][_0x1eee5d(0xa3)],'low':STATIC_ANALYSIS[_0x1eee5d(0xd8)][_0x1eee5d(0xd0)]};return _0x49164e[_0x16457f?.[_0x1eee5d(0x82)]()]||STATIC_ANALYSIS[_0x1eee5d(0xd8)]['ERROR'];}async[a0_0x57e5f0(0xae)](){const _0x31c36a=await this['detectAvailableScanners']();return{'scanners':_0x31c36a,'recommendations':this['getInstallRecommendations'](_0x31c36a)};}['getInstallRecommendations'](_0x4cc2cc){const _0x1de3b6=a0_0x57e5f0,_0x5bd3db=[];return!_0x4cc2cc[_0x1de3b6(0xc1)]&&_0x5bd3db['push']({'scanner':_0x1de3b6(0xb7),'reason':_0x1de3b6(0x93),'install':_0x1de3b6(0x9c),'priority':_0x1de3b6(0x91)}),!_0x4cc2cc[_0x1de3b6(0xf7)]&&_0x5bd3db[_0x1de3b6(0xf3)]({'scanner':_0x1de3b6(0x8c),'reason':'Python\x20security\x20scanner','install':'pip\x20install\x20bandit','priority':_0x1de3b6(0xa4)}),!_0x4cc2cc['eslintSecurity']&&_0x5bd3db[_0x1de3b6(0xf3)]({'scanner':'eslint-plugin-security','reason':'JavaScript/TypeScript\x20security\x20rules','install':_0x1de3b6(0x95),'priority':_0x1de3b6(0xa4)}),!_0x4cc2cc[_0x1de3b6(0x104)]&&_0x5bd3db[_0x1de3b6(0xf3)]({'scanner':_0x1de3b6(0x9e),'reason':_0x1de3b6(0xe7),'install':'pip\x20install\x20pip-audit','priority':_0x1de3b6(0xa6)}),_0x5bd3db;}}export default SecurityAnalyzer;
@@ -1 +1 @@
1
- const a0_0x25ad85=a0_0x593d;(function(_0x1e954d,_0x3b6164){const _0x4cf13f=a0_0x593d,_0x2e7ae0=_0x1e954d();while(!![]){try{const _0x4291a4=parseInt(_0x4cf13f(0x173))/0x1*(-parseInt(_0x4cf13f(0x174))/0x2)+-parseInt(_0x4cf13f(0x164))/0x3+-parseInt(_0x4cf13f(0x179))/0x4*(-parseInt(_0x4cf13f(0x189))/0x5)+parseInt(_0x4cf13f(0x16d))/0x6+parseInt(_0x4cf13f(0x17c))/0x7+parseInt(_0x4cf13f(0x160))/0x8*(parseInt(_0x4cf13f(0x176))/0x9)+-parseInt(_0x4cf13f(0x17d))/0xa*(parseInt(_0x4cf13f(0x180))/0xb);if(_0x4291a4===_0x3b6164)break;else _0x2e7ae0['push'](_0x2e7ae0['shift']());}catch(_0x1b806e){_0x2e7ae0['push'](_0x2e7ae0['shift']());}}}(a0_0x2fa8,0xa73da));import a0_0x3ffba7 from'typescript';import a0_0x1806d5 from'path';import{STATIC_ANALYSIS}from'../utilities/constants.js';function a0_0x593d(_0x222271,_0xb3f9ae){_0x222271=_0x222271-0x15b;const _0x2fa874=a0_0x2fa8();let _0x593de2=_0x2fa874[_0x222271];if(a0_0x593d['zJoiZx']===undefined){var _0x3fdb2e=function(_0x45e849){const _0x5e726b='abcdefghijklmnopqrstuvwxyzABCDEFGHIJKLMNOPQRSTUVWXYZ0123456789+/=';let _0x3ffba7='',_0x1806d5='';for(let _0x555069=0x0,_0x1bbd49,_0x6727de,_0x36555e=0x0;_0x6727de=_0x45e849['charAt'](_0x36555e++);~_0x6727de&&(_0x1bbd49=_0x555069%0x4?_0x1bbd49*0x40+_0x6727de:_0x6727de,_0x555069++%0x4)?_0x3ffba7+=String['fromCharCode'](0xff&_0x1bbd49>>(-0x2*_0x555069&0x6)):0x0){_0x6727de=_0x5e726b['indexOf'](_0x6727de);}for(let _0x2c672a=0x0,_0x360a60=_0x3ffba7['length'];_0x2c672a<_0x360a60;_0x2c672a++){_0x1806d5+='%'+('00'+_0x3ffba7['charCodeAt'](_0x2c672a)['toString'](0x10))['slice'](-0x2);}return decodeURIComponent(_0x1806d5);};a0_0x593d['pvMvMb']=_0x3fdb2e,a0_0x593d['muGZzJ']={},a0_0x593d['zJoiZx']=!![];}const _0x44a89e=_0x2fa874[0x0],_0x360fa8=_0x222271+_0x44a89e,_0x2042b7=a0_0x593d['muGZzJ'][_0x360fa8];return!_0x2042b7?(_0x593de2=a0_0x593d['pvMvMb'](_0x593de2),a0_0x593d['muGZzJ'][_0x360fa8]=_0x593de2):_0x593de2=_0x2042b7,_0x593de2;}function a0_0x2fa8(){const _0x47a8da=['ndG4tgLwDfnX','Bg9Nz2vY','C3rHCNq','ntu3nde0oufUu2PbtW','mty5mdGWAfLqEKHj','q0furuDpuLK','zgvIDwC','mtyWnLvbwhrlua','sNn4rw1PDa','BgLIlMqUDhm','y2XHC3m','v0fstKLorW','rgLHz25VC3rPy0nHDgvNB3j5','Aw50zxjMywnL','zMLSzq','Aw5JBhvKzxm','ndG4ntbSB0DdCwC','z2v0tgLUzufUzenOyxjHy3rLCK9Mug9ZAxrPB24','uMvHy3q','y29TCgLSzxjpChrPB25Z','z2v0u3LUDgfJDgLJrgLHz25VC3rPy3m','y3jLyxrLu291CMnLrMLSzq','mtaYmZK3nNvLDhPvCG','tgf0zxn0','tw9KDwXLs2LUza','rxjYB3i','mtm0otqZmgPgrxDAyG','zMLSzu5HBwu','z2v0u2vTyw50AwneAwfNBM9ZDgLJCW','zM9YBwf0rgLHz25VC3rPyW','CgfYC2veAwfNBM9ZDgLJCW','u0vwrvjjvfK','u1Lovefy','ChvZAa','zMXHDhrLBKrPywDUB3n0AwnnzxnZywDLvgv4Da','nte3ndu4nKvjufHNEq','u3vNz2vZDgLVBG','C2v2zxjPDhK','BgvUz3rO','rvjst1i','rvnozxH0','mtqZmJyXqMHWy1DM','mKjxBM9YAa','su1qt1ju','nJnoz0v0vLO','u2nYAxb0vgfYz2v0','BgLUzq'];a0_0x2fa8=function(){return _0x47a8da;};return a0_0x2fa8();}class TypeScriptAnalyzer{constructor(_0x555069=null){const _0x95874=a0_0x593d;this[_0x95874(0x17a)]=_0x555069,this[_0x95874(0x15d)]={'noEmit':!![],'jsx':a0_0x3ffba7[_0x95874(0x181)][_0x95874(0x15c)],'target':a0_0x3ffba7['ScriptTarget'][_0x95874(0x161)],'module':a0_0x3ffba7[_0x95874(0x162)][_0x95874(0x172)],'moduleResolution':a0_0x3ffba7['ModuleResolutionKind']['NodeJs'],'esModuleInterop':!![],'skipLibCheck':!![],'strict':!![],'noImplicitAny':!![],'strictNullChecks':!![],'strictFunctionTypes':!![],'allowJs':![]};}async['analyze'](_0x1bbd49,_0x6727de,_0x36555e={}){const _0x5d245b=a0_0x593d;try{const _0x2c672a=[],_0x360a60=a0_0x3ffba7['createSourceFile'](_0x1bbd49,_0x6727de,a0_0x3ffba7[_0x5d245b(0x177)]['Latest'],!![]),_0x276316=this[_0x5d245b(0x15e)](_0x360a60);_0x2c672a['push'](..._0x276316);const _0x39357f=await this[_0x5d245b(0x166)](_0x1bbd49,_0x6727de);return _0x2c672a['push'](..._0x39357f),this[_0x5d245b(0x17a)]?.[_0x5d245b(0x17f)]('TypeScript\x20analysis\x20completed',{'file':_0x1bbd49,'totalDiagnostics':_0x2c672a[_0x5d245b(0x170)],'errors':_0x2c672a['filter'](_0x45b12f=>_0x45b12f[_0x5d245b(0x16f)]===STATIC_ANALYSIS['SEVERITY'][_0x5d245b(0x171)])['length'],'warnings':_0x2c672a['filter'](_0x349aef=>_0x349aef['severity']===STATIC_ANALYSIS[_0x5d245b(0x169)]['WARNING'])['length']}),_0x2c672a;}catch(_0x3b0b09){return this[_0x5d245b(0x17a)]?.['error']('TypeScript\x20analysis\x20failed',{'file':_0x1bbd49,'error':_0x3b0b09['message']}),[{'file':_0x1bbd49,'line':0x0,'column':0x0,'severity':STATIC_ANALYSIS['SEVERITY']['ERROR'],'rule':'analyzer-error','message':'Analysis\x20failed:\x20'+_0x3b0b09['message'],'category':STATIC_ANALYSIS[_0x5d245b(0x17e)][_0x5d245b(0x16a)]}];}}['getSyntacticDiagnostics'](_0x22153b){const _0x526595=a0_0x593d,_0x3f72e9=[];if(_0x22153b[_0x526595(0x168)]&&_0x22153b[_0x526595(0x168)]['length']>0x0)for(const _0x5692b6 of _0x22153b[_0x526595(0x168)]){_0x3f72e9[_0x526595(0x16b)](this[_0x526595(0x167)](_0x5692b6,_0x22153b));}return _0x3f72e9;}async[a0_0x25ad85(0x166)](_0x3984e6,_0x2d2dc4){const _0x170754=a0_0x25ad85,_0x286a5b=[];try{const _0x3721c5=a0_0x3ffba7[_0x170754(0x15f)](_0x3984e6,_0x2d2dc4,a0_0x3ffba7[_0x170754(0x177)]['Latest'],!![]),_0x1cd8bd={'getSourceFile':_0x4cc5f4=>{if(_0x4cc5f4===_0x3984e6)return _0x3721c5;return undefined;},'getDefaultLibFileName':()=>_0x170754(0x182),'writeFile':()=>{},'getCurrentDirectory':()=>a0_0x1806d5['dirname'](_0x3984e6),'getDirectories':()=>[],'fileExists':_0x16e2bb=>_0x16e2bb===_0x3984e6,'readFile':_0x21746e=>{if(_0x21746e===_0x3984e6)return _0x2d2dc4;return undefined;},'getCanonicalFileName':_0x57a84d=>_0x57a84d,'useCaseSensitiveFileNames':()=>!![],'getNewLine':()=>'\x0a'},_0x242e9d=a0_0x3ffba7['createProgram']({'rootNames':[_0x3984e6],'options':this['compilerOptions'],'host':_0x1cd8bd}),_0x42cdb2=_0x242e9d[_0x170754(0x15e)](_0x3721c5),_0x495dda=_0x242e9d[_0x170754(0x166)](_0x3721c5);for(const _0x12aae1 of[..._0x42cdb2,..._0x495dda]){_0x286a5b[_0x170754(0x16b)](this['formatDiagnostic'](_0x12aae1,_0x3721c5));}}catch(_0x98c9b5){this[_0x170754(0x17a)]?.['debug']('Semantic\x20analysis\x20encountered\x20error',{'file':_0x3984e6,'error':_0x98c9b5['message']});}return _0x286a5b;}[a0_0x25ad85(0x167)](_0x1290d3,_0x248418){const _0x41b318=a0_0x25ad85;let _0x5cae80=0x0,_0x4842da=0x0;if(_0x1290d3[_0x41b318(0x187)]&&_0x1290d3[_0x41b318(0x17b)]!==undefined){const _0x965d70=_0x1290d3[_0x41b318(0x187)]['getLineAndCharacterOfPosition'](_0x1290d3['start']);_0x5cae80=_0x965d70[_0x41b318(0x178)]+0x1,_0x4842da=_0x965d70['character']+0x1;}else{if(_0x248418&&_0x1290d3['start']!==undefined){const _0x1922f6=_0x248418[_0x41b318(0x15b)](_0x1290d3['start']);_0x5cae80=_0x1922f6[_0x41b318(0x178)]+0x1,_0x4842da=_0x1922f6['character']+0x1;}}const _0x15c4f3=a0_0x3ffba7[_0x41b318(0x16c)](_0x1290d3['messageText'],'\x0a');let _0x52c67b;switch(_0x1290d3['category']){case a0_0x3ffba7[_0x41b318(0x185)][_0x41b318(0x163)]:_0x52c67b=STATIC_ANALYSIS['SEVERITY'][_0x41b318(0x171)];break;case a0_0x3ffba7[_0x41b318(0x185)]['Warning']:_0x52c67b=STATIC_ANALYSIS[_0x41b318(0x169)][_0x41b318(0x184)];break;case a0_0x3ffba7['DiagnosticCategory']['Message']:case a0_0x3ffba7[_0x41b318(0x185)][_0x41b318(0x16e)]:_0x52c67b=STATIC_ANALYSIS[_0x41b318(0x169)]['INFO'];break;default:_0x52c67b=STATIC_ANALYSIS[_0x41b318(0x169)][_0x41b318(0x171)];}let _0x1bd5cc=STATIC_ANALYSIS['CATEGORY']['SYNTAX'];const _0xb4c0d2=_0x1290d3['code'];if(_0xb4c0d2>=0x7d0&&_0xb4c0d2<0xbb8)_0x1bd5cc=STATIC_ANALYSIS[_0x41b318(0x17e)]['TYPE'];else{if(_0xb4c0d2>=0x3e8&&_0xb4c0d2<0x7d0)_0x1bd5cc=STATIC_ANALYSIS[_0x41b318(0x17e)][_0x41b318(0x16a)];else _0xb4c0d2>=0x8fc&&_0xb4c0d2<0x960&&(_0x1bd5cc=STATIC_ANALYSIS['CATEGORY'][_0x41b318(0x175)]);}const _0x51786f=_0x15c4f3['toLowerCase']();if(_0x51786f['includes']('cannot\x20find\x20module')||_0x51786f[_0x41b318(0x188)]('import')||_0x51786f[_0x41b318(0x188)]('export'))_0x1bd5cc=STATIC_ANALYSIS['CATEGORY']['IMPORT'];else(_0x51786f['includes']('type')||_0x51786f[_0x41b318(0x188)](_0x41b318(0x186))||_0x51786f[_0x41b318(0x188)](_0x41b318(0x183)))&&(_0x1bd5cc=STATIC_ANALYSIS['CATEGORY']['TYPE']);return{'file':_0x1290d3['file']?.[_0x41b318(0x165)]||_0x248418?.[_0x41b318(0x165)]||'unknown','line':_0x5cae80,'column':_0x4842da,'severity':_0x52c67b,'rule':'TS'+_0xb4c0d2,'message':_0x15c4f3,'category':_0x1bd5cc,'fixable':![],'code':_0x1290d3['code']};}}export default TypeScriptAnalyzer;
1
+ const a0_0x338f19=a0_0x189e;(function(_0x137d12,_0x28d219){const _0x318bb9=a0_0x189e,_0x5cc343=_0x137d12();while(!![]){try{const _0x20becc=parseInt(_0x318bb9(0xdb))/0x1+-parseInt(_0x318bb9(0xdf))/0x2+-parseInt(_0x318bb9(0xe0))/0x3*(-parseInt(_0x318bb9(0xd3))/0x4)+parseInt(_0x318bb9(0xe6))/0x5*(-parseInt(_0x318bb9(0xda))/0x6)+parseInt(_0x318bb9(0xde))/0x7+parseInt(_0x318bb9(0xf2))/0x8+-parseInt(_0x318bb9(0xed))/0x9;if(_0x20becc===_0x28d219)break;else _0x5cc343['push'](_0x5cc343['shift']());}catch(_0x8a0f9e){_0x5cc343['push'](_0x5cc343['shift']());}}}(a0_0x14c4,0x9dfd2));import a0_0x223594 from'typescript';import a0_0x460c37 from'path';function a0_0x14c4(){const _0x5c5c0b=['odu1odv0DvLAwwC','q0furuDpuLK','u3vNz2vZDgLVBG','y2f0zwDVCNK','u2vTyw50AwmGyw5HBhLZAxmGzw5JB3vUDgvYzwqGzxjYB3i','zMLSzq','v2fYBMLUzW','mti1ndG3nJnrtvnyDLe','u1Lovefy','zxjYB3i','Bg9Nz2vY','rvjst1i','mZmYnJeWnfzrvhjYAW','su1qt1ju','z2v0u2vTyw50AwneAwfNBM9ZDgLJCW','u0vwrvjjvfK','rgLHz25VC3rPy0nHDgvNB3j5','zM9YBwf0rgLHz25VC3rPyW','qw5HBhLZAxmGzMfPBgvKoIa','DhLWzq','CgfYC2veAwfNBM9ZDgLJCW','zgvIDwC','v0fstKLorW','BwvZC2fNzvrLEhq','zMXHDhrLBKrPywDUB3n0AwnnzxnZywDLvgv4Da','Aw5JBhvKzxm','C2v2zxjPDhK','zMLSDgvY','twvZC2fNzq','Dw5RBM93BG','sNn4rw1PDa','ndrgzvDTzeW','tw9KDwXLuMvZB2X1DgLVBKTPBMq','C3rHCNq','Dg9mB3DLCKnHC2u','tgf0zxn0','z2v0u3LUDgfJDgLJrgLHz25VC3rPy3m','ChvZAa','mZbXufPZrvC','mte2mJiWm1nLtMDYCa','rvnozxH0','zMLSzu5HBwu','mZmWotGXmg5QAu1irW','otC2mtz6A3HVwKq','mZqWotHHsMXMt0e','y2XHC3m','vhLWzvnJCMLWDcbHBMfSExnPCYbMywLSzwq','vhLWzvnJCMLWDcbHBMfSExnPCYbJB21WBgv0zwq','BwvZC2fNzq','y3jLyxrLuhjVz3jHBq'];a0_0x14c4=function(){return _0x5c5c0b;};return a0_0x14c4();}function a0_0x189e(_0x27d6cf,_0x431e18){_0x27d6cf=_0x27d6cf-0xcc;const _0x14c463=a0_0x14c4();let _0x189e9f=_0x14c463[_0x27d6cf];if(a0_0x189e['YxCMXS']===undefined){var _0x2d404d=function(_0x45e971){const _0x5f2a19='abcdefghijklmnopqrstuvwxyzABCDEFGHIJKLMNOPQRSTUVWXYZ0123456789+/=';let _0x223594='',_0x460c37='';for(let _0xe9c164=0x0,_0xdc9e92,_0x45ab62,_0x8055dc=0x0;_0x45ab62=_0x45e971['charAt'](_0x8055dc++);~_0x45ab62&&(_0xdc9e92=_0xe9c164%0x4?_0xdc9e92*0x40+_0x45ab62:_0x45ab62,_0xe9c164++%0x4)?_0x223594+=String['fromCharCode'](0xff&_0xdc9e92>>(-0x2*_0xe9c164&0x6)):0x0){_0x45ab62=_0x5f2a19['indexOf'](_0x45ab62);}for(let _0xbda0f=0x0,_0x134782=_0x223594['length'];_0xbda0f<_0x134782;_0xbda0f++){_0x460c37+='%'+('00'+_0x223594['charCodeAt'](_0xbda0f)['toString'](0x10))['slice'](-0x2);}return decodeURIComponent(_0x460c37);};a0_0x189e['pEOHyo']=_0x2d404d,a0_0x189e['xVlpWB']={},a0_0x189e['YxCMXS']=!![];}const _0x2dba14=_0x14c463[0x0],_0x58e128=_0x27d6cf+_0x2dba14,_0xa1617b=a0_0x189e['xVlpWB'][_0x58e128];return!_0xa1617b?(_0x189e9f=a0_0x189e['pEOHyo'](_0x189e9f),a0_0x189e['xVlpWB'][_0x58e128]=_0x189e9f):_0x189e9f=_0xa1617b,_0x189e9f;}import{STATIC_ANALYSIS}from'../utilities/constants.js';class TypeScriptAnalyzer{constructor(_0xe9c164=null){const _0x5a8bbd=a0_0x189e;this['logger']=_0xe9c164,this['compilerOptions']={'noEmit':!![],'jsx':a0_0x223594[_0x5a8bbd(0xd2)]['React'],'target':a0_0x223594['ScriptTarget'][_0x5a8bbd(0xd7)],'module':a0_0x223594['ModuleKind'][_0x5a8bbd(0xdc)],'moduleResolution':a0_0x223594[_0x5a8bbd(0xd4)]['NodeJs'],'esModuleInterop':!![],'skipLibCheck':!![],'strict':!![],'noImplicitAny':!![],'strictNullChecks':!![],'strictFunctionTypes':!![],'allowJs':![]};}async['analyze'](_0xdc9e92,_0x45ab62,_0x8055dc={}){const _0x433492=a0_0x189e;try{const _0xbda0f=[],_0x134782=a0_0x223594['createSourceFile'](_0xdc9e92,_0x45ab62,a0_0x223594['ScriptTarget']['Latest'],!![]),_0x4e488d=this[_0x433492(0xd8)](_0x134782);_0xbda0f['push'](..._0x4e488d);const _0xd7ec0c=await this[_0x433492(0xf4)](_0xdc9e92,_0x45ab62);return _0xbda0f['push'](..._0xd7ec0c),this['logger']?.[_0x433492(0xfb)](_0x433492(0xe3),{'file':_0xdc9e92,'totalDiagnostics':_0xbda0f['length'],'errors':_0xbda0f[_0x433492(0xcf)](_0x4c59b8=>_0x4c59b8['severity']===STATIC_ANALYSIS[_0x433492(0xf5)][_0x433492(0xf1)])['length'],'warnings':_0xbda0f[_0x433492(0xcf)](_0x264bf6=>_0x264bf6[_0x433492(0xce)]===STATIC_ANALYSIS['SEVERITY'][_0x433492(0xfc)])['length']}),_0xbda0f;}catch(_0x4e1469){return this[_0x433492(0xf0)]?.[_0x433492(0xef)](_0x433492(0xe2),{'file':_0xdc9e92,'error':_0x4e1469[_0x433492(0xe4)]}),[{'file':_0xdc9e92,'line':0x0,'column':0x0,'severity':STATIC_ANALYSIS[_0x433492(0xf5)][_0x433492(0xf1)],'rule':'analyzer-error','message':_0x433492(0xf8)+_0x4e1469['message'],'category':STATIC_ANALYSIS[_0x433492(0xe7)]['SYNTAX']}];}}['getSyntacticDiagnostics'](_0x5e0046){const _0x501497=a0_0x189e,_0x4cb681=[];if(_0x5e0046[_0x501497(0xfa)]&&_0x5e0046['parseDiagnostics']['length']>0x0)for(const _0x2c310e of _0x5e0046['parseDiagnostics']){_0x4cb681['push'](this[_0x501497(0xf7)](_0x2c310e,_0x5e0046));}return _0x4cb681;}async[a0_0x338f19(0xf4)](_0xd776ad,_0x22141d){const _0x535cb7=a0_0x338f19,_0x3f6583=[];try{const _0x4a5904=a0_0x223594['createSourceFile'](_0xd776ad,_0x22141d,a0_0x223594['ScriptTarget'][_0x535cb7(0xd7)],!![]),_0x4dbef5={'getSourceFile':_0x343d89=>{if(_0x343d89===_0xd776ad)return _0x4a5904;return undefined;},'getDefaultLibFileName':()=>'lib.d.ts','writeFile':()=>{},'getCurrentDirectory':()=>a0_0x460c37['dirname'](_0xd776ad),'getDirectories':()=>[],'fileExists':_0x4b5b0d=>_0x4b5b0d===_0xd776ad,'readFile':_0x21b4fe=>{if(_0x21b4fe===_0xd776ad)return _0x22141d;return undefined;},'getCanonicalFileName':_0x4bd8b6=>_0x4bd8b6,'useCaseSensitiveFileNames':()=>!![],'getNewLine':()=>'\x0a'},_0x284b59=a0_0x223594[_0x535cb7(0xe5)]({'rootNames':[_0xd776ad],'options':this['compilerOptions'],'host':_0x4dbef5}),_0x56d28f=_0x284b59[_0x535cb7(0xd8)](_0x4a5904),_0x395310=_0x284b59['getSemanticDiagnostics'](_0x4a5904);for(const _0x35f38f of[..._0x56d28f,..._0x395310]){_0x3f6583[_0x535cb7(0xd9)](this[_0x535cb7(0xf7)](_0x35f38f,_0x4a5904));}}catch(_0x9fb511){this[_0x535cb7(0xf0)]?.[_0x535cb7(0xfb)](_0x535cb7(0xea),{'file':_0xd776ad,'error':_0x9fb511['message']});}return _0x3f6583;}['formatDiagnostic'](_0x3967b0,_0x58566b){const _0x273f52=a0_0x338f19;let _0x3350f2=0x0,_0x3385f1=0x0;if(_0x3967b0[_0x273f52(0xeb)]&&_0x3967b0[_0x273f52(0xd5)]!==undefined){const _0x422759=_0x3967b0[_0x273f52(0xeb)]['getLineAndCharacterOfPosition'](_0x3967b0[_0x273f52(0xd5)]);_0x3350f2=_0x422759['line']+0x1,_0x3385f1=_0x422759['character']+0x1;}else{if(_0x58566b&&_0x3967b0['start']!==undefined){const _0x3b96e5=_0x58566b['getLineAndCharacterOfPosition'](_0x3967b0['start']);_0x3350f2=_0x3b96e5['line']+0x1,_0x3385f1=_0x3b96e5['character']+0x1;}}const _0x13dcd0=a0_0x223594[_0x273f52(0xcc)](_0x3967b0[_0x273f52(0xfd)],'\x0a');let _0x112250;switch(_0x3967b0[_0x273f52(0xe9)]){case a0_0x223594['DiagnosticCategory']['Error']:_0x112250=STATIC_ANALYSIS['SEVERITY'][_0x273f52(0xf1)];break;case a0_0x223594['DiagnosticCategory'][_0x273f52(0xec)]:_0x112250=STATIC_ANALYSIS['SEVERITY'][_0x273f52(0xfc)];break;case a0_0x223594[_0x273f52(0xf6)][_0x273f52(0xd0)]:case a0_0x223594['DiagnosticCategory'][_0x273f52(0xe8)]:_0x112250=STATIC_ANALYSIS['SEVERITY']['INFO'];break;default:_0x112250=STATIC_ANALYSIS[_0x273f52(0xf5)]['ERROR'];}let _0x595e8e=STATIC_ANALYSIS['CATEGORY'][_0x273f52(0xee)];const _0x439bd9=_0x3967b0['code'];if(_0x439bd9>=0x7d0&&_0x439bd9<0xbb8)_0x595e8e=STATIC_ANALYSIS['CATEGORY']['TYPE'];else{if(_0x439bd9>=0x3e8&&_0x439bd9<0x7d0)_0x595e8e=STATIC_ANALYSIS['CATEGORY']['SYNTAX'];else _0x439bd9>=0x8fc&&_0x439bd9<0x960&&(_0x595e8e=STATIC_ANALYSIS[_0x273f52(0xe7)][_0x273f52(0xf3)]);}const _0x4cfb0f=_0x13dcd0[_0x273f52(0xd6)]();if(_0x4cfb0f[_0x273f52(0xcd)]('cannot\x20find\x20module')||_0x4cfb0f[_0x273f52(0xcd)]('import')||_0x4cfb0f['includes']('export'))_0x595e8e=STATIC_ANALYSIS['CATEGORY'][_0x273f52(0xf3)];else(_0x4cfb0f['includes'](_0x273f52(0xf9))||_0x4cfb0f[_0x273f52(0xcd)]('interface')||_0x4cfb0f[_0x273f52(0xcd)](_0x273f52(0xe1)))&&(_0x595e8e=STATIC_ANALYSIS[_0x273f52(0xe7)]['TYPE']);return{'file':_0x3967b0['file']?.['fileName']||_0x58566b?.[_0x273f52(0xdd)]||_0x273f52(0xd1),'line':_0x3350f2,'column':_0x3385f1,'severity':_0x112250,'rule':'TS'+_0x439bd9,'message':_0x13dcd0,'category':_0x595e8e,'fixable':![],'code':_0x3967b0['code']};}}export default TypeScriptAnalyzer;
@@ -1 +1 @@
1
- const a0_0x461db3=a0_0x51a8;(function(_0x5ec752,_0x278a96){const _0x2937ab=a0_0x51a8,_0x33dba2=_0x5ec752();while(!![]){try{const _0x2b3f28=-parseInt(_0x2937ab(0xcf))/0x1*(parseInt(_0x2937ab(0xb9))/0x2)+-parseInt(_0x2937ab(0xcb))/0x3+-parseInt(_0x2937ab(0xaa))/0x4+-parseInt(_0x2937ab(0xdd))/0x5+parseInt(_0x2937ab(0xdb))/0x6+parseInt(_0x2937ab(0xb5))/0x7*(parseInt(_0x2937ab(0xc9))/0x8)+parseInt(_0x2937ab(0xbf))/0x9;if(_0x2b3f28===_0x278a96)break;else _0x33dba2['push'](_0x33dba2['shift']());}catch(_0x1a5bf2){_0x33dba2['push'](_0x33dba2['shift']());}}}(a0_0x1ee7,0xaa689));function a0_0x1ee7(){const _0x3109f0=['zxn0Aw1HDgvfzMzVCNq','z2vUzxjHDgvszwzHy3rVCMLUz0fKDMLJzq','ChvZAa','nc4GuMvWBgfJzsbHBgWGAw5ZDgfUy2vZihDPDgGGy2fSBhmGDg8GDgHLig5LDYbMDw5JDgLVBG','BwLU','zhvWBgLJyxrLzeXPBMvZ','y2fSy3vSyxrLsw1Wywn0u2nVCMu','BgvUz3rO','mZjPD0LRyvy','zw5KtgLUzq','mtiZotq0mu5cEvzrvG','qw5HBhL6Aw5NignSB25LCYbMB3iGCMvMywn0B3jPBMCGB3bWB3j0Dw5PDgLLCY4UlG','y29Kzq','y2fSy3vSyxrLtwv0CMLJCW','mu9ovLzvzq','zwXZzq','Dhj1BMnHDgvdB2rL','Dg9vChbLCKnHC2u','Bg9NmG','CM91BMq','igXVy2f0Aw9UCW','lcbHBMqGCMvKDwnLignVzguGC2L6zq','AM9PBG','zM9YrwfJAa','Bwv0CMLJCW','rNvUy3rPB24','mJKYmtq5mhjiuwz0Aq','yMXVy2TZ','mtq2ntGYmfvnthftyW','zgv0zxjTAw5LuMvMywn0B3jPBMDtDhjHDgvNEq','C29Tzq','lIbuAgLZigLZigeGAgLNAc1PBxbHy3qGCMvMywn0B3jPBMCGB3bWB3j0Dw5PDhK','yw5HBhL6zunSB25LCW','mI4Gtw92zsbYzwXHDgvKig1LDgHVzhmGyw5KihbYB3bLCNrPzxmGAw50BYb0AguGy2XHC3m','zxH0CMfJDc1TB2r1Bgu','Bg93','zw50CMLLCW','DMfY','BwvKAxvT','y29UzMLKzw5Jzq','y2XVBMuT','zxH0CMfJDc1JBgfZCW','Aw1Wywn0u2nVCMu','ms4Gq3jLyxrLigeGBMv3ignSyxnZihrVigvUy2fWC3vSyxrLihrOAxmGzNvUy3rPB25HBgL0Eq','zxH0CMfJDgvKrNvUy3rPB24','z2vUzxjHDgvszwfZB25PBMC','Dg9gAxHLza','zgv0zxjTAw5LuhjPB3jPDhK','rwXPBwLUyxrLia','ms4GrxH0CMfJDcb0AguGzhvWBgLJyxrLzcbJB2rLihvZAw5Nia','mte3nty0nePWwLzdta','lcbYzxn1BhrPBMCGAw4G','y2HHCKf0','zgvZy3jPyMvczw5LzML0CW','CMv0DxjU','cI4UlIaODhj1BMnHDgvKkq','C2L6zq','y3jLyxrLrNvUy3rPB25oyw1L','z2vUzxjHDgvby3rPB25HyMXLu3rLChm','DhLWzq','C29YDa','mZeWnZiZsgvIsLPP','sw1WCM92zsbJB2rLig9Yz2fUAxPHDgLVBIbHy3jVC3mG','D2HPBgu','Aw5JBhvKzxm','mty5mJG1ogn3tK9nra','BwfW','zxH0CMfJDc1MDw5JDgLVBG','uMvMywn0B3jPBMCGDg8G','C3vNz2vZDe5HBwu','C3rHCNrmAw5L','mty5mJe1ntDzt3vot20','mI4GuMvWBgfJzsbHBgWGAw5ZDgfUy2vZihDPDgGGDgHLigv4DhjHy3rLzcb2zxjZAw9U'];a0_0x1ee7=function(){return _0x3109f0;};return a0_0x1ee7();}function a0_0x51a8(_0x1c5856,_0x5654fd){_0x1c5856=_0x1c5856-0xa5;const _0x1ee797=a0_0x1ee7();let _0x51a824=_0x1ee797[_0x1c5856];if(a0_0x51a8['fNXxci']===undefined){var _0xffe534=function(_0x4bdb18){const _0x2bf6cd='abcdefghijklmnopqrstuvwxyzABCDEFGHIJKLMNOPQRSTUVWXYZ0123456789+/=';let _0x1aa994='',_0x13b87d='';for(let _0x58dad8=0x0,_0x15fc63,_0x3713c6,_0x226269=0x0;_0x3713c6=_0x4bdb18['charAt'](_0x226269++);~_0x3713c6&&(_0x15fc63=_0x58dad8%0x4?_0x15fc63*0x40+_0x3713c6:_0x3713c6,_0x58dad8++%0x4)?_0x1aa994+=String['fromCharCode'](0xff&_0x15fc63>>(-0x2*_0x58dad8&0x6)):0x0){_0x3713c6=_0x2bf6cd['indexOf'](_0x3713c6);}for(let _0xaf73e5=0x0,_0x4df00c=_0x1aa994['length'];_0xaf73e5<_0x4df00c;_0xaf73e5++){_0x13b87d+='%'+('00'+_0x1aa994['charCodeAt'](_0xaf73e5)['toString'](0x10))['slice'](-0x2);}return decodeURIComponent(_0x13b87d);};a0_0x51a8['rdOGYW']=_0xffe534,a0_0x51a8['etGnAn']={},a0_0x51a8['fNXxci']=!![];}const _0x29e26d=_0x1ee797[0x0],_0x336f83=_0x1c5856+_0x29e26d,_0x496477=a0_0x51a8['etGnAn'][_0x336f83];return!_0x496477?(_0x51a824=a0_0x51a8['rdOGYW'](_0x51a824),a0_0x51a8['etGnAn'][_0x336f83]=_0x51a824):_0x51a824=_0x496477,_0x51a824;}export class RefactoringAnalyzer{constructor(_0x1aa994){this['config']=_0x1aa994;}[a0_0x461db3(0xe1)](_0x13b87d){const _0x38adb6=a0_0x461db3;return console['log'](_0x38adb6(0xcc)),_0x13b87d['map']((_0x58dad8,_0x15fc63)=>{const _0x1a4e00=_0x38adb6,_0x3713c6=this[_0x1a4e00(0xce)](_0x58dad8),_0x226269=this[_0x1a4e00(0xc2)](_0x58dad8,_0x3713c6);return{'id':_0x1a4e00(0xe9)+(_0x15fc63+0x1),'type':_0x58dad8[_0x1a4e00(0xb3)],'confidence':_0x58dad8['confidence'],'instances':_0x58dad8['blocks'][_0x1a4e00(0xba)](_0xaf73e5=>({'file':_0xaf73e5['file'],'startLine':_0xaf73e5[_0x1a4e00(0xbe)],'endLine':_0xaf73e5[_0x1a4e00(0xca)],'code':this[_0x1a4e00(0xd1)](_0xaf73e5['code']),'fullCode':_0xaf73e5[_0x1a4e00(0xcd)],'blockType':_0xaf73e5[_0x1a4e00(0xb3)]})),'metrics':_0x3713c6,'refactoringAdvice':_0x226269};})[_0x38adb6(0xb4)]((_0x4df00c,_0x3742ae)=>_0x3742ae[_0x38adb6(0xd9)][_0x38adb6(0xeb)]-_0x4df00c[_0x38adb6(0xd9)]['impactScore']);}[a0_0x461db3(0xce)](_0x464031){const _0x329aef=a0_0x461db3,_0x135f24=_0x464031[_0x329aef(0xdc)],_0x832b3=_0x464031['tokenCount'],_0x1b1a8c=this['averageLineCount'](_0x135f24),_0xce326c=_0x135f24[_0x329aef(0xc8)],_0x43ffa8=this[_0x329aef(0xc7)](_0x832b3,_0x1b1a8c,_0xce326c,_0x464031[_0x329aef(0xe8)]),_0x492d6f=_0x1b1a8c*(_0xce326c-0x1),_0x5e1c7a=_0x832b3*(_0xce326c-0x1);return{'tokenCount':_0x832b3,'lineCount':_0x1b1a8c,'instanceCount':_0xce326c,'duplicatedLines':_0x492d6f,'duplicatedTokens':_0x5e1c7a,'impactScore':parseFloat(_0x43ffa8[_0x329aef(0xa6)](0x2)),'filesCovered':new Set(_0x135f24['map'](_0x4f2a61=>_0x4f2a61['file']))[_0x329aef(0xb0)]};}['calculateImpactScore'](_0x319c0e,_0x238db6,_0x18bfea,_0x4bebce){const _0x5ee108=a0_0x461db3,_0x42c90e=Math['log10'](_0x319c0e+0x1)*0x2,_0x363af1=Math[_0x5ee108(0xd3)](_0x18bfea+0x1)*0x3,_0x36e81d=_0x4bebce*0x2,_0x5c920d=Math[_0x5ee108(0xc5)](_0x238db6/0xa,0x3);return _0x42c90e+_0x363af1+_0x36e81d+_0x5c920d;}[a0_0x461db3(0xc2)](_0x461478,_0x404207){const _0x32ecd8=a0_0x461db3,_0x47f102=this['determineRefactoringStrategy'](_0x461478,_0x404207),_0x3c7622=this[_0x32ecd8(0xa7)](_0x404207),_0x23edf6=this[_0x32ecd8(0xbd)](_0x461478),_0x2bf18a=this[_0x32ecd8(0xa5)](_0x461478,_0x404207,_0x47f102),_0x2a0edf=this[_0x32ecd8(0xc1)](_0x404207,_0x47f102),_0x359345=this['describeBenefits'](_0x404207);return{'priority':_0x3c7622,'strategy':_0x47f102,'suggestedName':_0x23edf6,'reasoning':_0x2bf18a,'estimatedEffort':_0x2a0edf,'benefits':_0x359345,'actionableSteps':this['generateActionableSteps'](_0x47f102,_0x23edf6,_0x404207)};}[a0_0x461db3(0xde)](_0x46b453,_0x35ee28){const _0x8e5757=a0_0x461db3,{tokenCount:_0x480f17,lineCount:_0x4d829f,instanceCount:_0x2dd206,filesCovered:_0x552900}=_0x35ee28,_0x545dfc=_0x46b453[_0x8e5757(0xdc)]['map'](_0x123873=>_0x123873['type']),_0x1b32d2=_0x545dfc['some'](_0x31dc9f=>_0x31dc9f['includes'](_0x8e5757(0xda))||_0x31dc9f[_0x8e5757(0xb8)]('Method')),_0x5d1c3a=_0x545dfc[_0x8e5757(0xdf)](_0x3e00f7=>_0x3e00f7[_0x8e5757(0xb8)]('Class'));if(_0x5d1c3a&&_0x4d829f>0x32)return _0x8e5757(0xe3);else{if(_0x552900>0x2&&_0x480f17>0x64)return'extract-module';else{if(_0x1b32d2||_0x4d829f>=0xa&&_0x4d829f<=0x32)return'extract-function';else{if(_0x4d829f>0x32)return'extract-class';else return _0x4d829f<0xa?'extract-constant-or-utility':_0x8e5757(0xbb);}}}}['determinePriority'](_0x357a87){const _0x3601ec=a0_0x461db3,{impactScore:_0x1abbb3}=_0x357a87;if(_0x1abbb3>=0x8)return'high';if(_0x1abbb3>=0x5)return _0x3601ec(0xe7);return _0x3601ec(0xe4);}['suggestName'](_0x48c2be){const _0x1642d2=a0_0x461db3,_0x4ca06b=_0x48c2be[_0x1642d2(0xdc)][_0x1642d2(0xba)](_0x3ad166=>_0x3ad166['code'])['join']('\x20'),_0x1a8089=_0x4ca06b['match'](/[a-zA-Z_$][a-zA-Z0-9_$]*/g)||[],_0x4ff0ba={};_0x1a8089[_0x1642d2(0xd8)](_0x52b804=>{const _0xe3e232=_0x1642d2;if(['const','let',_0xe3e232(0xe6),'function',_0xe3e232(0xae),'if',_0xe3e232(0xd0),'for',_0xe3e232(0xb7)][_0xe3e232(0xb8)](_0x52b804))return;_0x4ff0ba[_0x52b804]=(_0x4ff0ba[_0x52b804]||0x0)+0x1;});const _0x14188b=Object[_0x1642d2(0xe5)](_0x4ff0ba)['sort']((_0x4c4814,_0xf52d0a)=>_0xf52d0a[0x1]-_0x4c4814[0x1])['slice'](0x0,0x3);if(_0x14188b[_0x1642d2(0xc8)]>0x0){const _0x40fb85=_0x14188b[_0x1642d2(0xba)](([_0x8e5389])=>_0x8e5389);return this[_0x1642d2(0xb1)](_0x40fb85);}return _0x1642d2(0xed);}['createFunctionName'](_0x439bff){const _0x5a69ca=a0_0x461db3;if(_0x439bff['length']===0x0)return _0x5a69ca(0xed);return _0x439bff[0x0]+_0x439bff['slice'](0x1)['map'](_0x779726=>_0x779726[_0x5a69ca(0xac)](0x0)[_0x5a69ca(0xd2)]()+_0x779726['slice'](0x1))[_0x5a69ca(0xd7)]('');}['generateReasoning'](_0x57b402,_0x34f638,_0x5bee84){const _0x1f8d30=a0_0x461db3,{instanceCount:_0x57ae0c,duplicatedLines:_0x13d33c,filesCovered:_0x244a96}=_0x34f638;let _0x4f0d60='This\x20'+_0x57b402['type']+'\x20code\x20pattern\x20appears\x20'+_0x57ae0c+'\x20times';return _0x244a96>0x1&&(_0x4f0d60+='\x20across\x20'+_0x244a96+'\x20different\x20files'),_0x4f0d60+=_0x1f8d30(0xab)+_0x13d33c+'\x20duplicated\x20lines.\x20',_0x4f0d60+=_0x1f8d30(0xbc)+_0x5bee84['replace'](/-/g,'\x20')+'\x20would\x20improve\x20maintainability',_0x57ae0c>=0x3&&(_0x4f0d60+=', reduce bugs from inconsistent changes'),_0x4f0d60+=_0x1f8d30(0xd6),_0x34f638[_0x1f8d30(0xeb)]>=0x8&&(_0x4f0d60+=_0x1f8d30(0xe0)),_0x4f0d60+'.';}[a0_0x461db3(0xc1)](_0x2ed142,_0x1734d7){const _0x4880cf=a0_0x461db3,{lineCount:_0x3d804a,instanceCount:_0x19ed64,filesCovered:_0x1928d2}=_0x2ed142;let _0x2d4906=0x0;_0x2d4906+=Math[_0x4880cf(0xc5)](_0x3d804a/0xa,0x5),_0x2d4906+=_0x19ed64*0.5,_0x2d4906+=_0x1928d2*0.5;if(_0x1734d7==='extract-module')_0x2d4906+=0x3;else{if(_0x1734d7===_0x4880cf(0xea))_0x2d4906+=0x2;else _0x1734d7==='extract-function'&&(_0x2d4906+=0x1);}if(_0x2d4906<=0x3)return _0x4880cf(0xe4);if(_0x2d4906<=0x7)return'medium';return'high';}[a0_0x461db3(0xad)](_0x4ada17){const _0x25e624=a0_0x461db3,_0x1e4d47=[];return _0x1e4d47['push'](_0x25e624(0xa8)+_0x4ada17[_0x25e624(0xc6)]+'\x20duplicated\x20lines\x20of\x20code'),_0x1e4d47[_0x25e624(0xc3)]('Improve\x20maintainability\x20by\x20centralizing\x20logic\x20in\x20one\x20place'),_0x4ada17['instanceCount']>=0x3&&_0x1e4d47['push']('Reduce\x20risk\x20of\x20inconsistent\x20changes\x20across\x20'+_0x4ada17['instanceCount']+_0x25e624(0xd5)),_0x4ada17['filesCovered']>0x2&&_0x1e4d47[_0x25e624(0xc3)](_0x25e624(0xb6)+_0x4ada17['filesCovered']+'\x20files'),_0x1e4d47['push']('Make\x20future\x20changes\x20easier\x20and\x20less\x20error-prone'),_0x1e4d47;}[a0_0x461db3(0xb2)](_0x523a0e,_0x2cf86d,_0x1d1736){const _0x4548ed=a0_0x461db3,_0x487f8f=[];switch(_0x523a0e){case'extract-function':_0x487f8f[_0x4548ed(0xc3)]('1.\x20Create\x20a\x20new\x20function\x20named\x20\x27'+_0x2cf86d+'\x27'),_0x487f8f[_0x4548ed(0xc3)]('2.\x20Move\x20the\x20duplicated\x20logic\x20into\x20this\x20function'),_0x487f8f['push']('3. Identify parameters needed from the surrounding context'),_0x487f8f[_0x4548ed(0xc3)](_0x4548ed(0xc4)),_0x487f8f['push']('5.\x20Test\x20to\x20ensure\x20behavior\x20is\x20preserved');break;case _0x4548ed(0xea):_0x487f8f[_0x4548ed(0xc3)](_0x4548ed(0xec)),_0x487f8f['push'](_0x4548ed(0xe2)),_0x487f8f['push']('3.\x20Update\x20all\x20instances\x20to\x20use\x20the\x20new\x20class'),_0x487f8f[_0x4548ed(0xc3)]('4.\x20Consider\x20dependency\x20injection\x20for\x20better\x20testability');break;case'extract-module':_0x487f8f[_0x4548ed(0xc3)]('1.\x20Create\x20a\x20new\x20module/file\x20for\x20this\x20shared\x20functionality'),_0x487f8f['push']('2.\x20Move\x20the\x20duplicated\x20code\x20into\x20the\x20new\x20module'),_0x487f8f['push']('3.\x20Export\x20the\x20necessary\x20functions/classes'),_0x487f8f['push']('4. Update all files to import from the new module'),_0x487f8f[_0x4548ed(0xc3)]('5.\x20Update\x20any\x20build\x20configurations\x20if\x20needed');break;default:_0x487f8f[_0x4548ed(0xc3)](_0x4548ed(0xa9)+_0x523a0e['replace'](/-/g,'\x20')),_0x487f8f['push'](_0x4548ed(0xc0)),_0x487f8f[_0x4548ed(0xc3)]('3.\x20Test\x20thoroughly');}return _0x487f8f;}['truncateCode'](_0x3a0977,_0x59db7b=0xa){const _0x5ddcb8=a0_0x461db3,_0x57d17f=_0x3a0977['split']('\x0a');if(_0x57d17f[_0x5ddcb8(0xc8)]<=_0x59db7b)return _0x3a0977;return _0x57d17f['slice'](0x0,_0x59db7b)['join']('\x0a')+_0x5ddcb8(0xaf);}['averageLineCount'](_0x548937){const _0x2cdc28=a0_0x461db3,_0x3c1820=_0x548937['reduce']((_0xb711d6,_0x2fd40d)=>_0xb711d6+(_0x2fd40d[_0x2cdc28(0xca)]-_0x2fd40d[_0x2cdc28(0xbe)]+0x1),0x0);return Math[_0x2cdc28(0xd4)](_0x3c1820/_0x548937['length']);}}
1
+ const a0_0x2d71df=a0_0x5f6a;function a0_0x5f6a(_0x13fea6,_0x54305d){_0x13fea6=_0x13fea6-0xbe;const _0x30d140=a0_0x30d1();let _0x5f6a7c=_0x30d140[_0x13fea6];if(a0_0x5f6a['EPlnyr']===undefined){var _0x153db7=function(_0x4a3adc){const _0x1a28ad='abcdefghijklmnopqrstuvwxyzABCDEFGHIJKLMNOPQRSTUVWXYZ0123456789+/=';let _0x1312fc='',_0x5bd7cb='';for(let _0x36406a=0x0,_0x4a632e,_0x491fe3,_0x41ebb=0x0;_0x491fe3=_0x4a3adc['charAt'](_0x41ebb++);~_0x491fe3&&(_0x4a632e=_0x36406a%0x4?_0x4a632e*0x40+_0x491fe3:_0x491fe3,_0x36406a++%0x4)?_0x1312fc+=String['fromCharCode'](0xff&_0x4a632e>>(-0x2*_0x36406a&0x6)):0x0){_0x491fe3=_0x1a28ad['indexOf'](_0x491fe3);}for(let _0x276cad=0x0,_0x1e330b=_0x1312fc['length'];_0x276cad<_0x1e330b;_0x276cad++){_0x5bd7cb+='%'+('00'+_0x1312fc['charCodeAt'](_0x276cad)['toString'](0x10))['slice'](-0x2);}return decodeURIComponent(_0x5bd7cb);};a0_0x5f6a['OyCigr']=_0x153db7,a0_0x5f6a['RwuncE']={},a0_0x5f6a['EPlnyr']=!![];}const _0xc861a7=_0x30d140[0x0],_0x5307db=_0x13fea6+_0xc861a7,_0x1cd535=a0_0x5f6a['RwuncE'][_0x5307db];return!_0x1cd535?(_0x5f6a7c=a0_0x5f6a['OyCigr'](_0x5f6a7c),a0_0x5f6a['RwuncE'][_0x5307db]=_0x5f6a7c):_0x5f6a7c=_0x1cd535,_0x5f6a7c;}function a0_0x30d1(){const _0x1aee22=['n0z1v1fOva','q2XHC3m','ihDVDwXKigLTChjVDMuGBwfPBNrHAw5HyMLSAxr5','Dhj1BMnHDgvdB2rL','zxH0CMfJDc1MDw5JDgLVBG','otuXnduWCfLtDMrI','igXVy2f0Aw9UCW','qw5HBhL6Aw5NignSB25LCYbMB3iGCMvMywn0B3jPBMCGB3bWB3j0Dw5PDgLLCY4UlG','yw5HBhL6zunSB25LCW','CMvWBgfJzq','Dg9Rzw5dB3vUDa','nte4nda2tgDQzKrl','Aw5JBhvKzxm','Aw1Wywn0u2nVCMu','y3jLyxrLrNvUy3rPB25oyw1L','Bg9Nmta','CMv0DxjU','DMfY','cI4UlIaODhj1BMnHDgvKkq','lcbYzxn1BhrPBMCGAw4G','igfJCM9ZCYa','zM9YrwfJAa','zxH0CMfJDc1JB25ZDgfUDc1VCI11DgLSAxr5','ntu2nJC2tfb2wvvz','twfRzsbMDxr1CMuGy2HHBMDLCYbLyxnPzxiGyw5KigXLC3mGzxjYB3iTChjVBMu','y29Kzq','CMvKDwnL','ihrPBwvZ','mtuZEeLLEgX6','nc4GuMvWBgfJzsbHBgWGAw5ZDgfUy2vZihDPDgGGy2fSBhmGDg8GDgHLig5LDYbMDw5JDgLVBG','nJG5odK1AKzQzeHi','BwLU','sw1WCM92zsbJB2rLig9Yz2fUAxPHDgLVBIbHy3jVC3mG','igr1CgXPy2f0zwqGBgLUzxmUia','vgHPCYa','C29YDa','twv0Ag9K','mJC3mdq0ofrdvhnAzW','nc4Gq29UC2LKzxiGzgvWzw5Kzw5JEsbPBMPLy3rPB24GzM9YigjLDhrLCIb0zxn0ywjPBgL0Eq','odeWotm2DLzWyvPu','AgLNAa','y2fSy3vSyxrLtwv0CMLJCW','AM9PBG','y2HHCKf0','zwXZzq','C29Tzq','zw50CMLLCW','y29UC3q','mY4GrxHWB3j0ihrOzsbUzwnLC3nHCNKGzNvUy3rPB25Zl2nSyxnZzxm','BwvKAxvT','rNvUy3rPB24','y29UzMLN','zgv0zxjTAw5LuhjPB3jPDhK','BwfW','z2vUzxjHDgvszwzHy3rVCMLUz0fKDMLJzq','y2XVBMuT','Bg9NmG','zhvWBgLJyxrLzeXPBMvZ','Aw5ZDgfUy2vdB3vUDa','C3bSAxq','C2XPy2u','lIbuAgLZigLZigeGAgLNAc1PBxbHy3qGCMvMywn0B3jPBMCGB3bWB3j0Dw5PDhK','munwDNHiCW','ignVzguGCgf0DgvYBIbHChbLyxjZia','zw5KtgLUzq','D2HPBgu','BgvUz3rO','mtq3mdqXn2vNBffTva','Dg9vChbLCKnHC2u','ChvZAa','yMXVy2TZ'];a0_0x30d1=function(){return _0x1aee22;};return a0_0x30d1();}(function(_0x2cd596,_0x3590dc){const _0x418071=a0_0x5f6a,_0x2e3cf8=_0x2cd596();while(!![]){try{const _0x40f1da=-parseInt(_0x418071(0xdd))/0x1*(parseInt(_0x418071(0xfd))/0x2)+-parseInt(_0x418071(0xe2))/0x3+-parseInt(_0x418071(0xc6))/0x4+parseInt(_0x418071(0x104))/0x5+parseInt(_0x418071(0xf1))/0x6*(-parseInt(_0x418071(0xe6))/0x7)+-parseInt(_0x418071(0xc4))/0x8+-parseInt(_0x418071(0x102))/0x9*(-parseInt(_0x418071(0xeb))/0xa);if(_0x40f1da===_0x3590dc)break;else _0x2e3cf8['push'](_0x2e3cf8['shift']());}catch(_0x5276e9){_0x2e3cf8['push'](_0x2e3cf8['shift']());}}}(a0_0x30d1,0x55d26));export class RefactoringAnalyzer{constructor(_0x1312fc){const _0x540da5=a0_0x5f6a;this[_0x540da5(0xd2)]=_0x1312fc;}[a0_0x2d71df(0xee)](_0x5bd7cb){const _0x33ba74=a0_0x2d71df;return console['log'](_0x33ba74(0xed)),_0x5bd7cb['map']((_0x36406a,_0x4a632e)=>{const _0x5c72c0=_0x33ba74,_0x491fe3=this[_0x5c72c0(0xc8)](_0x36406a),_0x41ebb=this[_0x5c72c0(0xd5)](_0x36406a,_0x491fe3);return{'id':_0x5c72c0(0xd6)+(_0x4a632e+0x1),'type':_0x36406a['type'],'confidence':_0x36406a['confidence'],'instances':_0x36406a[_0x5c72c0(0xe5)]['map'](_0x276cad=>({'file':_0x276cad['file'],'startLine':_0x276cad['startLine'],'endLine':_0x276cad['endLine'],'code':this[_0x5c72c0(0xe9)](_0x276cad['code']),'fullCode':_0x276cad[_0x5c72c0(0xff)],'blockType':_0x276cad['type']})),'metrics':_0x491fe3,'refactoringAdvice':_0x41ebb};})[_0x33ba74(0xc2)]((_0x1e330b,_0x2eb56e)=>_0x2eb56e['metrics'][_0x33ba74(0xf3)]-_0x1e330b['metrics'][_0x33ba74(0xf3)]);}[a0_0x2d71df(0xc8)](_0x126158){const _0x257562=a0_0x2d71df,_0x141bee=_0x126158[_0x257562(0xe5)],_0x2199ff=_0x126158[_0x257562(0xf0)],_0x38aee5=this['averageLineCount'](_0x141bee),_0x947761=_0x141bee[_0x257562(0xe1)],_0x13e460=this['calculateImpactScore'](_0x2199ff,_0x38aee5,_0x947761,_0x126158['confidence']),_0x57cab2=_0x38aee5*(_0x947761-0x1),_0x61b3d3=_0x2199ff*(_0x947761-0x1);return{'tokenCount':_0x2199ff,'lineCount':_0x38aee5,'instanceCount':_0x947761,'duplicatedLines':_0x57cab2,'duplicatedTokens':_0x61b3d3,'impactScore':parseFloat(_0x13e460['toFixed'](0x2)),'filesCovered':new Set(_0x141bee[_0x257562(0xd4)](_0x104b88=>_0x104b88['file']))['size']};}['calculateImpactScore'](_0x1cf341,_0x70f9f5,_0x15b9f0,_0x1e90c7){const _0x39ea2e=a0_0x2d71df,_0x4c4e26=Math[_0x39ea2e(0xf5)](_0x1cf341+0x1)*0x2,_0x48978c=Math[_0x39ea2e(0xd7)](_0x15b9f0+0x1)*0x3,_0x10bc69=_0x1e90c7*0x2,_0x4087ee=Math[_0x39ea2e(0xbe)](_0x70f9f5/0xa,0x3);return _0x4c4e26+_0x48978c+_0x10bc69+_0x4087ee;}[a0_0x2d71df(0xd5)](_0x28a9ec,_0x233bb0){const _0x34f8f3=a0_0x2d71df,_0x554e3c=this['determineRefactoringStrategy'](_0x28a9ec,_0x233bb0),_0x5c3c93=this[_0x34f8f3(0xd3)](_0x233bb0),_0x7a7827=this['suggestName'](_0x28a9ec),_0x23b215=this['generateReasoning'](_0x28a9ec,_0x233bb0,_0x554e3c),_0x302a47=this['estimateEffort'](_0x233bb0,_0x554e3c),_0x3de942=this['describeBenefits'](_0x233bb0);return{'priority':_0x5c3c93,'strategy':_0x554e3c,'suggestedName':_0x7a7827,'reasoning':_0x23b215,'estimatedEffort':_0x302a47,'benefits':_0x3de942,'actionableSteps':this['generateActionableSteps'](_0x554e3c,_0x7a7827,_0x233bb0)};}['determineRefactoringStrategy'](_0x10c2c2,_0xc04076){const _0x270b5c=a0_0x2d71df,{tokenCount:_0x413f77,lineCount:_0x2f797f,instanceCount:_0x1fc546,filesCovered:_0x561edc}=_0xc04076,_0x2f275c=_0x10c2c2[_0x270b5c(0xe5)][_0x270b5c(0xd4)](_0x49fa89=>_0x49fa89['type']),_0x26f5b4=_0x2f275c[_0x270b5c(0xcc)](_0x227fee=>_0x227fee[_0x270b5c(0xf2)](_0x270b5c(0xd1))||_0x227fee['includes'](_0x270b5c(0xc3))),_0x5980ec=_0x2f275c['some'](_0x443752=>_0x443752['includes'](_0x270b5c(0xe7)));if(_0x5980ec&&_0x2f797f>0x32)return'extract-module';else{if(_0x561edc>0x2&&_0x413f77>0x64)return'extract-module';else{if(_0x26f5b4||_0x2f797f>=0xa&&_0x2f797f<=0x32)return _0x270b5c(0xea);else{if(_0x2f797f>0x32)return'extract-class';else return _0x2f797f<0xa?_0x270b5c(0xfc):'extract-function';}}}}[a0_0x2d71df(0xd3)](_0x10b8d5){const _0x2aa80a=a0_0x2d71df,{impactScore:_0x2cdf3f}=_0x10b8d5;if(_0x2cdf3f>=0x8)return _0x2aa80a(0xc7);if(_0x2cdf3f>=0x5)return'medium';return'low';}['suggestName'](_0x162ead){const _0x599841=a0_0x2d71df,_0x516899=_0x162ead['blocks'][_0x599841(0xd4)](_0x1d9e04=>_0x1d9e04[_0x599841(0xff)])[_0x599841(0xc9)]('\x20'),_0x4e0774=_0x516899['match'](/[a-zA-Z_$][a-zA-Z0-9_$]*/g)||[],_0x3b967d={};_0x4e0774[_0x599841(0xfb)](_0x3e4030=>{const _0xcf7070=_0x599841;if([_0xcf7070(0xce),'let',_0xcf7070(0xf7),'function',_0xcf7070(0xf6),'if',_0xcf7070(0xcb),'for',_0xcf7070(0xe0)]['includes'](_0x3e4030))return;_0x3b967d[_0x3e4030]=(_0x3b967d[_0x3e4030]||0x0)+0x1;});const _0x3b4f86=Object[_0x599841(0xcd)](_0x3b967d)['sort']((_0x5af1c4,_0x2ab8ee)=>_0x2ab8ee[0x1]-_0x5af1c4[0x1])[_0x599841(0xdb)](0x0,0x3);if(_0x3b4f86['length']>0x0){const _0x55951f=_0x3b4f86[_0x599841(0xd4)](([_0x409906])=>_0x409906);return this[_0x599841(0xf4)](_0x55951f);}return'extractedFunction';}[a0_0x2d71df(0xf4)](_0x4035d6){const _0x54a549=a0_0x2d71df;if(_0x4035d6['length']===0x0)return'extractedFunction';return _0x4035d6[0x0]+_0x4035d6['slice'](0x1)[_0x54a549(0xd4)](_0x4dd45e=>_0x4dd45e[_0x54a549(0xca)](0x0)[_0x54a549(0xe3)]()+_0x4dd45e['slice'](0x1))[_0x54a549(0xc9)]('');}['generateReasoning'](_0x4c0868,_0x5a979a,_0x4632af){const _0x37ab72=a0_0x2d71df,{instanceCount:_0x3725b2,duplicatedLines:_0x39d05f,filesCovered:_0x1fada8}=_0x5a979a;let _0x19969f=_0x37ab72(0xc1)+_0x4c0868['type']+_0x37ab72(0xde)+_0x3725b2+_0x37ab72(0x101);return _0x1fada8>0x1&&(_0x19969f+=_0x37ab72(0xfa)+_0x1fada8+'\x20different\x20files'),_0x19969f+=_0x37ab72(0xf9)+_0x39d05f+_0x37ab72(0xc0),_0x19969f+='Refactoring\x20to\x20'+_0x4632af[_0x37ab72(0xef)](/-/g,'\x20')+_0x37ab72(0xe8),_0x3725b2>=0x3&&(_0x19969f+=', reduce bugs from inconsistent changes'),_0x19969f+=',\x20and\x20reduce\x20code\x20size',_0x5a979a[_0x37ab72(0xf3)]>=0x8&&(_0x19969f+=_0x37ab72(0xdc)),_0x19969f+'.';}['estimateEffort'](_0x3158e7,_0x4a065d){const _0x1f1379=a0_0x2d71df,{lineCount:_0x51236a,instanceCount:_0x21d09d,filesCovered:_0x572af0}=_0x3158e7;let _0xdd30fd=0x0;_0xdd30fd+=Math[_0x1f1379(0xbe)](_0x51236a/0xa,0x5),_0xdd30fd+=_0x21d09d*0.5,_0xdd30fd+=_0x572af0*0.5;if(_0x4a065d==='extract-module')_0xdd30fd+=0x3;else{if(_0x4a065d==='extract-class')_0xdd30fd+=0x2;else _0x4a065d==='extract-function'&&(_0xdd30fd+=0x1);}if(_0xdd30fd<=0x3)return'low';if(_0xdd30fd<=0x7)return _0x1f1379(0xd0);return'high';}['describeBenefits'](_0x397f7d){const _0x19d243=a0_0x2d71df,_0x200cde=[];return _0x200cde['push']('Eliminate\x20'+_0x397f7d[_0x19d243(0xd8)]+'\x20duplicated\x20lines\x20of\x20code'),_0x200cde['push']('Improve\x20maintainability\x20by\x20centralizing\x20logic\x20in\x20one\x20place'),_0x397f7d[_0x19d243(0xd9)]>=0x3&&_0x200cde['push']('Reduce\x20risk\x20of\x20inconsistent\x20changes\x20across\x20'+_0x397f7d[_0x19d243(0xd9)]+_0x19d243(0xec)),_0x397f7d['filesCovered']>0x2&&_0x200cde[_0x19d243(0xe4)](_0x19d243(0xbf)+_0x397f7d['filesCovered']+'\x20files'),_0x200cde['push'](_0x19d243(0xfe)),_0x200cde;}['generateActionableSteps'](_0x532c7c,_0x198bd3,_0x157dbf){const _0x22f2a0=a0_0x2d71df,_0x1990c1=[];switch(_0x532c7c){case'extract-function':_0x1990c1[_0x22f2a0(0xe4)]('1.\x20Create\x20a\x20new\x20function\x20named\x20\x27'+_0x198bd3+'\x27'),_0x1990c1['push']('2.\x20Move\x20the\x20duplicated\x20logic\x20into\x20this\x20function'),_0x1990c1[_0x22f2a0(0xe4)]('3. Identify parameters needed from the surrounding context'),_0x1990c1['push'](_0x22f2a0(0x103)),_0x1990c1['push']('5.\x20Test\x20to\x20ensure\x20behavior\x20is\x20preserved');break;case'extract-class':_0x1990c1[_0x22f2a0(0xe4)]('1.\x20Create\x20a\x20new\x20class\x20to\x20encapsulate\x20this\x20functionality'),_0x1990c1['push']('2.\x20Move\x20related\x20methods\x20and\x20properties\x20into\x20the\x20class'),_0x1990c1['push']('3.\x20Update\x20all\x20instances\x20to\x20use\x20the\x20new\x20class'),_0x1990c1[_0x22f2a0(0xe4)](_0x22f2a0(0xc5));break;case'extract-module':_0x1990c1['push']('1.\x20Create\x20a\x20new\x20module/file\x20for\x20this\x20shared\x20functionality'),_0x1990c1[_0x22f2a0(0xe4)]('2.\x20Move\x20the\x20duplicated\x20code\x20into\x20the\x20new\x20module'),_0x1990c1[_0x22f2a0(0xe4)](_0x22f2a0(0xcf)),_0x1990c1['push']('4. Update all files to import from the new module'),_0x1990c1['push']('5.\x20Update\x20any\x20build\x20configurations\x20if\x20needed');break;default:_0x1990c1['push']('1.\x20Extract\x20the\x20duplicated\x20code\x20using\x20'+_0x532c7c[_0x22f2a0(0xef)](/-/g,'\x20')),_0x1990c1['push']('2.\x20Replace\x20all\x20instances\x20with\x20the\x20extracted\x20version'),_0x1990c1['push']('3.\x20Test\x20thoroughly');}return _0x1990c1;}['truncateCode'](_0x416fcd,_0x2005a5=0xa){const _0x31688b=a0_0x2d71df,_0x299ece=_0x416fcd[_0x31688b(0xda)]('\x0a');if(_0x299ece['length']<=_0x2005a5)return _0x416fcd;return _0x299ece['slice'](0x0,_0x2005a5)['join']('\x0a')+_0x31688b(0xf8);}['averageLineCount'](_0x29e966){const _0x5d5e8b=a0_0x2d71df,_0x19cd1f=_0x29e966[_0x5d5e8b(0x100)]((_0x2d86ab,_0x3e3bd0)=>_0x2d86ab+(_0x3e3bd0[_0x5d5e8b(0xdf)]-_0x3e3bd0['startLine']+0x1),0x0);return Math['round'](_0x19cd1f/_0x29e966['length']);}}
@@ -1 +1 @@
1
- const a0_0xd0f053=a0_0x3767;(function(_0x3d5276,_0x2943ce){const _0x240737=a0_0x3767,_0x418cf9=_0x3d5276();while(!![]){try{const _0x504db9=parseInt(_0x240737(0x19d))/0x1*(parseInt(_0x240737(0x1ae))/0x2)+-parseInt(_0x240737(0x1a0))/0x3+parseInt(_0x240737(0x1ac))/0x4*(-parseInt(_0x240737(0x193))/0x5)+-parseInt(_0x240737(0x19b))/0x6*(parseInt(_0x240737(0x1ad))/0x7)+parseInt(_0x240737(0x1b0))/0x8*(parseInt(_0x240737(0x1b1))/0x9)+-parseInt(_0x240737(0x196))/0xa*(-parseInt(_0x240737(0x1a7))/0xb)+-parseInt(_0x240737(0x190))/0xc*(-parseInt(_0x240737(0x1a3))/0xd);if(_0x504db9===_0x2943ce)break;else _0x418cf9['push'](_0x418cf9['shift']());}catch(_0x417b1c){_0x418cf9['push'](_0x418cf9['shift']());}}}(a0_0x1241,0x71947));export class CloneDetector{constructor(_0x5ee9f5,_0x563b02){const _0x2d9069=a0_0x3767;this[_0x2d9069(0x1a6)]=_0x5ee9f5,this['parser']=_0x563b02;}[a0_0xd0f053(0x1a9)](_0x4f0ccc){const _0x1527db=a0_0xd0f053;console['log'](_0x1527db(0x19e));const _0x3e78d7=[],_0x239a4f=[];for(const _0x38efcd of _0x4f0ccc){_0x239a4f['push'](..._0x38efcd[_0x1527db(0x1a5)]);}console[_0x1527db(0x194)]('Analyzing\x20'+_0x239a4f['length']+_0x1527db(0x1ab));const _0x24a8ce=this[_0x1527db(0x1b3)](_0x239a4f);for(const [_0x407e83,_0x5ec931]of Object[_0x1527db(0x1b2)](_0x24a8ce)){_0x5ec931['length']>0x1&&_0x3e78d7[_0x1527db(0x199)]({'type':_0x1527db(0x1a4),'confidence':0x1,'blocks':_0x5ec931,'tokenCount':_0x5ec931[0x0]['tokens'][_0x1527db(0x195)]});}const _0x61d0a1=this[_0x1527db(0x1aa)](_0x239a4f);return _0x3e78d7[_0x1527db(0x199)](..._0x61d0a1),console['log']('Found\x20'+_0x3e78d7[_0x1527db(0x195)]+'\x20clone\x20groups'),_0x3e78d7;}[a0_0xd0f053(0x1b3)](_0x2ca566){const _0x2da8fe=a0_0xd0f053,_0x3724e4={};for(const _0x361a39 of _0x2ca566){if(_0x361a39['tokens']['length']<this[_0x2da8fe(0x1a6)][_0x2da8fe(0x18f)])continue;!_0x3724e4[_0x361a39['hash']]&&(_0x3724e4[_0x361a39[_0x2da8fe(0x1b4)]]=[]),_0x3724e4[_0x361a39[_0x2da8fe(0x1b4)]][_0x2da8fe(0x199)](_0x361a39);}return _0x3724e4;}['findSimilarClones'](_0x4fc0c2){const _0x44e098=a0_0xd0f053,_0x3c3da0=[],processed=new Set(),_0x5ad940=_0x4fc0c2[_0x44e098(0x197)](_0x1d6d6a=>_0x1d6d6a[_0x44e098(0x198)]['length']>=this['config']['minTokens']);for(let _0x1b2c87=0x0;_0x1b2c87<_0x5ad940[_0x44e098(0x195)];_0x1b2c87++){const _0x25a73d=_0x5ad940[_0x1b2c87],_0x1e6ce7=[_0x25a73d];if(processed[_0x44e098(0x192)](_0x25a73d['id']))continue;for(let _0x52963f=_0x1b2c87+0x1;_0x52963f<_0x5ad940[_0x44e098(0x195)];_0x52963f++){const _0x334975=_0x5ad940[_0x52963f];if(processed['has'](_0x334975['id']))continue;if(_0x25a73d[_0x44e098(0x1b4)]===_0x334975[_0x44e098(0x1b4)])continue;const _0x3d7430=this[_0x44e098(0x19a)](_0x25a73d,_0x334975);_0x3d7430>=this[_0x44e098(0x1a6)][_0x44e098(0x1a1)]&&(_0x1e6ce7['push'](_0x334975),processed['add'](_0x334975['id']));}_0x1e6ce7['length']>0x1&&(processed['add'](_0x25a73d['id']),_0x3c3da0[_0x44e098(0x199)]({'type':'similar','confidence':this['calculateGroupConfidence'](_0x1e6ce7),'blocks':_0x1e6ce7,'tokenCount':Math[_0x44e098(0x1a8)](..._0x1e6ce7[_0x44e098(0x1a2)](_0x3a98db=>_0x3a98db['tokens'][_0x44e098(0x195)]))}));}return _0x3c3da0;}[a0_0xd0f053(0x19a)](_0x369816,_0x1e5ae9){const _0xa0ce20=a0_0xd0f053,_0xc7b4f1=_0x369816[_0xa0ce20(0x198)],_0x1a1594=_0x1e5ae9['tokens'],_0x1cb502=Math['min'](_0xc7b4f1['length'],_0x1a1594['length'])/Math[_0xa0ce20(0x1a8)](_0xc7b4f1['length'],_0x1a1594['length']);if(_0x1cb502<0.7)return 0x0;const _0x298715=this[_0xa0ce20(0x19f)](_0xc7b4f1,_0x1a1594),_0x23846a=0x2*_0x298715/(_0xc7b4f1['length']+_0x1a1594['length']);return _0x23846a;}['longestCommonSubsequence'](_0x51b027,_0x2a9237){const _0x1eb835=a0_0xd0f053,_0x16c655=_0x51b027[_0x1eb835(0x195)],_0x41fa98=_0x2a9237['length'];if(_0x16c655*_0x41fa98>0x186a0)return this['approximateLCS'](_0x51b027,_0x2a9237);const _0x49058e=Array(_0x16c655+0x1)[_0x1eb835(0x19c)](0x0)[_0x1eb835(0x1a2)](()=>Array(_0x41fa98+0x1)[_0x1eb835(0x19c)](0x0));for(let _0x584ec0=0x1;_0x584ec0<=_0x16c655;_0x584ec0++){for(let _0x1a26f6=0x1;_0x1a26f6<=_0x41fa98;_0x1a26f6++){_0x51b027[_0x584ec0-0x1]===_0x2a9237[_0x1a26f6-0x1]?_0x49058e[_0x584ec0][_0x1a26f6]=_0x49058e[_0x584ec0-0x1][_0x1a26f6-0x1]+0x1:_0x49058e[_0x584ec0][_0x1a26f6]=Math['max'](_0x49058e[_0x584ec0-0x1][_0x1a26f6],_0x49058e[_0x584ec0][_0x1a26f6-0x1]);}}return _0x49058e[_0x16c655][_0x41fa98];}[a0_0xd0f053(0x18e)](_0x1b7471,_0x4b21ed){const _0x4d7ec1=a0_0xd0f053,_0x46db14=0x64;let _0x38d4b8=0x0;for(let _0x364d94=0x0;_0x364d94<_0x1b7471[_0x4d7ec1(0x195)];_0x364d94+=_0x46db14){const _0x25d911=_0x1b7471['slice'](_0x364d94,_0x364d94+_0x46db14),_0x2fa3c3=new Set(_0x4b21ed[_0x4d7ec1(0x1af)](Math[_0x4d7ec1(0x1a8)](0x0,_0x364d94-_0x46db14),_0x364d94+_0x46db14*0x2));_0x38d4b8+=_0x25d911[_0x4d7ec1(0x197)](_0x1eef03=>_0x2fa3c3['has'](_0x1eef03))[_0x4d7ec1(0x195)];}return _0x38d4b8;}[a0_0xd0f053(0x191)](_0x60f23f){const _0x472670=a0_0xd0f053;if(_0x60f23f[_0x472670(0x195)]===0x0)return 0x0;let _0x41fd9f=0x0,_0x556941=0x0;for(let _0x109ee0=0x0;_0x109ee0<_0x60f23f['length'];_0x109ee0++){for(let _0x337b93=_0x109ee0+0x1;_0x337b93<_0x60f23f[_0x472670(0x195)];_0x337b93++){_0x41fd9f+=this[_0x472670(0x19a)](_0x60f23f[_0x109ee0],_0x60f23f[_0x337b93]),_0x556941++;}}return _0x556941>0x0?_0x41fd9f/_0x556941:0x0;}}function a0_0x3767(_0x52c89c,_0x39056d){_0x52c89c=_0x52c89c-0x18e;const _0x124132=a0_0x1241();let _0x3767aa=_0x124132[_0x52c89c];if(a0_0x3767['iNNovd']===undefined){var _0x2597f2=function(_0xf558fc){const _0x11b017='abcdefghijklmnopqrstuvwxyzABCDEFGHIJKLMNOPQRSTUVWXYZ0123456789+/=';let _0x5ee9f5='',_0x563b02='';for(let _0x4f0ccc=0x0,_0x3e78d7,_0x239a4f,_0x24a8ce=0x0;_0x239a4f=_0xf558fc['charAt'](_0x24a8ce++);~_0x239a4f&&(_0x3e78d7=_0x4f0ccc%0x4?_0x3e78d7*0x40+_0x239a4f:_0x239a4f,_0x4f0ccc++%0x4)?_0x5ee9f5+=String['fromCharCode'](0xff&_0x3e78d7>>(-0x2*_0x4f0ccc&0x6)):0x0){_0x239a4f=_0x11b017['indexOf'](_0x239a4f);}for(let _0x61d0a1=0x0,_0x38efcd=_0x5ee9f5['length'];_0x61d0a1<_0x38efcd;_0x61d0a1++){_0x563b02+='%'+('00'+_0x5ee9f5['charCodeAt'](_0x61d0a1)['toString'](0x10))['slice'](-0x2);}return decodeURIComponent(_0x563b02);};a0_0x3767['QOPuAI']=_0x2597f2,a0_0x3767['mweYnU']={},a0_0x3767['iNNovd']=!![];}const _0x3ff29a=_0x124132[0x0],_0x239efa=_0x52c89c+_0x3ff29a,_0x61973d=a0_0x3767['mweYnU'][_0x239efa];return!_0x61973d?(_0x3767aa=a0_0x3767['QOPuAI'](_0x3767aa),a0_0x3767['mweYnU'][_0x239efa]=_0x3767aa):_0x3767aa=_0x61973d,_0x3767aa;}function a0_0x1241(){const _0x121ba4=['y2fSy3vSyxrLr3jVDxbdB25MAwrLBMnL','AgfZ','nJeXmZbXsgzVuwm','Bg9N','BgvUz3rO','mJbvC2rQuuC','zMLSDgvY','Dg9Rzw5Z','ChvZAa','y2fSy3vSyxrLqMXVy2TtAw1PBgfYAxr5','nJy2AxrsvMz2','zMLSBa','ota0m2DVEhriCa','rgv0zwn0Aw5NignSB25LCY4UlG','Bg9Uz2vZDenVBw1VBLn1yNnLCxvLBMnL','mJm4mJG0ovHPz2LqzG','C2LTAwXHCML0EvrOCMvZAg9Sza','BwfW','mtC4mZGXntHxvhvNthi','zxHHy3q','yMXVy2TZ','y29UzMLN','mJe4ntm3CfLMzfb4','Bwf4','zgv0zwn0q2XVBMvZ','zMLUzfnPBwLSyxjdBg9Uzxm','ignVzguGyMXVy2TZ','mJG0t0HKy1rJ','nduYouvuyKPOCq','odjsu3j6wKC','C2XPy2u','ndC3nLv4EeDIza','nJi4mLr2Evj5uW','zw50CMLLCW','z3jVDxbcEuHHC2G','AgfZAa','yxbWCM94Aw1HDgvmq1m','BwLUvg9Rzw5Z','mtjqwKj1s3y'];a0_0x1241=function(){return _0x121ba4;};return a0_0x1241();}
1
+ function a0_0xb309(_0x8c17d4,_0x1ad3ab){_0x8c17d4=_0x8c17d4-0x7d;const _0x5baca9=a0_0x5bac();let _0xb3092b=_0x5baca9[_0x8c17d4];if(a0_0xb309['Qttmfv']===undefined){var _0x2ec5ba=function(_0x2b9f3d){const _0x86738d='abcdefghijklmnopqrstuvwxyzABCDEFGHIJKLMNOPQRSTUVWXYZ0123456789+/=';let _0xfef786='',_0x578677='';for(let _0x47fdcd=0x0,_0x67e671,_0xa304e7,_0x4d062e=0x0;_0xa304e7=_0x2b9f3d['charAt'](_0x4d062e++);~_0xa304e7&&(_0x67e671=_0x47fdcd%0x4?_0x67e671*0x40+_0xa304e7:_0xa304e7,_0x47fdcd++%0x4)?_0xfef786+=String['fromCharCode'](0xff&_0x67e671>>(-0x2*_0x47fdcd&0x6)):0x0){_0xa304e7=_0x86738d['indexOf'](_0xa304e7);}for(let _0x438737=0x0,_0x524267=_0xfef786['length'];_0x438737<_0x524267;_0x438737++){_0x578677+='%'+('00'+_0xfef786['charCodeAt'](_0x438737)['toString'](0x10))['slice'](-0x2);}return decodeURIComponent(_0x578677);};a0_0xb309['zOHvjv']=_0x2ec5ba,a0_0xb309['ioVIDK']={},a0_0xb309['Qttmfv']=!![];}const _0x4bb5df=_0x5baca9[0x0],_0x25abda=_0x8c17d4+_0x4bb5df,_0x5ead47=a0_0xb309['ioVIDK'][_0x25abda];return!_0x5ead47?(_0xb3092b=a0_0xb309['zOHvjv'](_0xb3092b),a0_0xb309['ioVIDK'][_0x25abda]=_0xb3092b):_0xb3092b=_0x5ead47,_0xb3092b;}const a0_0x402ac4=a0_0xb309;function a0_0x5bac(){const _0x41147f=['nti5nte1qMfmtMPc','CgfYC2vY','Bwf4','y2fSy3vSyxrLqMXVy2TtAw1PBgfYAxr5','nJeWmZv4tMXLq2S','nJz2y1fIsg0','BgvUz3rO','y29UzMLN','mZC4mtCWvNHQswLU','nJrZEuPZAxi','mZiYodrryw9Zr3q','rM91BMqG','Bg9Uz2vZDenVBw1VBLn1yNnLCxvLBMnL','z3jVDxbcEuHHC2G','mJy5mZaXnKPgshD4AG','mtiYmZboy3Dpz2G','C2LTAwXHCML0EvrOCMvZAg9Sza','Dg9Rzw5Z','zgv0zwn0q2XVBMvZ','BwLUvg9Rzw5Z','Bg9N','AgfZAa','zMLSBa','rgv0zwn0Aw5NignSB25LCY4UlG','mJG0mtaWvevztLzT','yxbWCM94Aw1HDgvmq1m','AgfZ','BwLU','ChvZAa','mtHiCNrszNm'];a0_0x5bac=function(){return _0x41147f;};return a0_0x5bac();}(function(_0x391489,_0x4e1d88){const _0xf2a136=a0_0xb309,_0x432f95=_0x391489();while(!![]){try{const _0x55830b=parseInt(_0xf2a136(0x80))/0x1*(-parseInt(_0xf2a136(0x90))/0x2)+-parseInt(_0xf2a136(0x81))/0x3+-parseInt(_0xf2a136(0x99))/0x4+-parseInt(_0xf2a136(0x85))/0x5*(-parseInt(_0xf2a136(0x86))/0x6)+-parseInt(_0xf2a136(0x8b))/0x7*(-parseInt(_0xf2a136(0x8a))/0x8)+parseInt(_0xf2a136(0x8f))/0x9+parseInt(_0xf2a136(0x89))/0xa;if(_0x55830b===_0x4e1d88)break;else _0x432f95['push'](_0x432f95['shift']());}catch(_0xca8f02){_0x432f95['push'](_0x432f95['shift']());}}}(a0_0x5bac,0x24c56));export class CloneDetector{constructor(_0xfef786,_0x578677){const _0x14fa82=a0_0xb309;this[_0x14fa82(0x88)]=_0xfef786,this[_0x14fa82(0x82)]=_0x578677;}[a0_0x402ac4(0x93)](_0x47fdcd){const _0x1ac9c5=a0_0x402ac4;console[_0x1ac9c5(0x95)](_0x1ac9c5(0x98));const _0x67e671=[],_0xa304e7=[];for(const _0x524267 of _0x47fdcd){_0xa304e7[_0x1ac9c5(0x7f)](..._0x524267['blocks']);}console['log']('Analyzing\x20'+_0xa304e7['length']+'\x20code\x20blocks');const _0x4d062e=this['groupByHash'](_0xa304e7);for(const [_0x41b43,_0x1d46cf]of Object['entries'](_0x4d062e)){_0x1d46cf[_0x1ac9c5(0x87)]>0x1&&_0x67e671[_0x1ac9c5(0x7f)]({'type':'exact','confidence':0x1,'blocks':_0x1d46cf,'tokenCount':_0x1d46cf[0x0][_0x1ac9c5(0x92)][_0x1ac9c5(0x87)]});}const _0x438737=this['findSimilarClones'](_0xa304e7);return _0x67e671[_0x1ac9c5(0x7f)](..._0x438737),console['log'](_0x1ac9c5(0x8c)+_0x67e671['length']+'\x20clone\x20groups'),_0x67e671;}[a0_0x402ac4(0x8e)](_0x3c0a2f){const _0xb40755=a0_0x402ac4,_0x579d58={};for(const _0x12b167 of _0x3c0a2f){if(_0x12b167[_0xb40755(0x92)]['length']<this[_0xb40755(0x88)][_0xb40755(0x94)])continue;!_0x579d58[_0x12b167['hash']]&&(_0x579d58[_0x12b167['hash']]=[]),_0x579d58[_0x12b167['hash']][_0xb40755(0x7f)](_0x12b167);}return _0x579d58;}['findSimilarClones'](_0xed0371){const _0x341458=a0_0x402ac4,_0x13a746=[],processed=new Set(),_0x5c2f2e=_0xed0371['filter'](_0x4f1290=>_0x4f1290['tokens']['length']>=this[_0x341458(0x88)][_0x341458(0x94)]);for(let _0x55e035=0x0;_0x55e035<_0x5c2f2e['length'];_0x55e035++){const _0x22ea14=_0x5c2f2e[_0x55e035],_0x2cbb9c=[_0x22ea14];if(processed[_0x341458(0x7d)](_0x22ea14['id']))continue;for(let _0x4a5fbc=_0x55e035+0x1;_0x4a5fbc<_0x5c2f2e[_0x341458(0x87)];_0x4a5fbc++){const _0x200ee2=_0x5c2f2e[_0x4a5fbc];if(processed[_0x341458(0x7d)](_0x200ee2['id']))continue;if(_0x22ea14[_0x341458(0x96)]===_0x200ee2['hash'])continue;const _0x1a3254=this[_0x341458(0x84)](_0x22ea14,_0x200ee2);_0x1a3254>=this[_0x341458(0x88)][_0x341458(0x91)]&&(_0x2cbb9c[_0x341458(0x7f)](_0x200ee2),processed['add'](_0x200ee2['id']));}_0x2cbb9c['length']>0x1&&(processed['add'](_0x22ea14['id']),_0x13a746[_0x341458(0x7f)]({'type':'similar','confidence':this['calculateGroupConfidence'](_0x2cbb9c),'blocks':_0x2cbb9c,'tokenCount':Math['max'](..._0x2cbb9c['map'](_0x408ee0=>_0x408ee0['tokens']['length']))}));}return _0x13a746;}[a0_0x402ac4(0x84)](_0x53857e,_0xeb1114){const _0x5be091=a0_0x402ac4,_0x2122d2=_0x53857e['tokens'],_0x595f7e=_0xeb1114[_0x5be091(0x92)],_0x2abfc0=Math[_0x5be091(0x7e)](_0x2122d2[_0x5be091(0x87)],_0x595f7e['length'])/Math[_0x5be091(0x83)](_0x2122d2['length'],_0x595f7e['length']);if(_0x2abfc0<0.7)return 0x0;const _0x215276=this['longestCommonSubsequence'](_0x2122d2,_0x595f7e),_0x130548=0x2*_0x215276/(_0x2122d2[_0x5be091(0x87)]+_0x595f7e[_0x5be091(0x87)]);return _0x130548;}[a0_0x402ac4(0x8d)](_0x7f7c73,_0x505625){const _0x254f35=a0_0x402ac4,_0x4339cb=_0x7f7c73[_0x254f35(0x87)],_0x3d5c59=_0x505625[_0x254f35(0x87)];if(_0x4339cb*_0x3d5c59>0x186a0)return this[_0x254f35(0x9a)](_0x7f7c73,_0x505625);const _0x81b7d=Array(_0x4339cb+0x1)[_0x254f35(0x97)](0x0)['map'](()=>Array(_0x3d5c59+0x1)[_0x254f35(0x97)](0x0));for(let _0x1818d9=0x1;_0x1818d9<=_0x4339cb;_0x1818d9++){for(let _0x4c446c=0x1;_0x4c446c<=_0x3d5c59;_0x4c446c++){_0x7f7c73[_0x1818d9-0x1]===_0x505625[_0x4c446c-0x1]?_0x81b7d[_0x1818d9][_0x4c446c]=_0x81b7d[_0x1818d9-0x1][_0x4c446c-0x1]+0x1:_0x81b7d[_0x1818d9][_0x4c446c]=Math[_0x254f35(0x83)](_0x81b7d[_0x1818d9-0x1][_0x4c446c],_0x81b7d[_0x1818d9][_0x4c446c-0x1]);}}return _0x81b7d[_0x4339cb][_0x3d5c59];}['approximateLCS'](_0x2aa6c1,_0x442316){const _0x4fdec7=a0_0x402ac4,_0x17cb96=0x64;let _0x300eb7=0x0;for(let _0x3f8e28=0x0;_0x3f8e28<_0x2aa6c1[_0x4fdec7(0x87)];_0x3f8e28+=_0x17cb96){const _0x5b39ad=_0x2aa6c1['slice'](_0x3f8e28,_0x3f8e28+_0x17cb96),_0x2dc4da=new Set(_0x442316['slice'](Math[_0x4fdec7(0x83)](0x0,_0x3f8e28-_0x17cb96),_0x3f8e28+_0x17cb96*0x2));_0x300eb7+=_0x5b39ad['filter'](_0x1dd295=>_0x2dc4da['has'](_0x1dd295))[_0x4fdec7(0x87)];}return _0x300eb7;}['calculateGroupConfidence'](_0x1b4b9a){if(_0x1b4b9a['length']===0x0)return 0x0;let _0x33ce26=0x0,_0x49ffe2=0x0;for(let _0x5a27fd=0x0;_0x5a27fd<_0x1b4b9a['length'];_0x5a27fd++){for(let _0x11f4bf=_0x5a27fd+0x1;_0x11f4bf<_0x1b4b9a['length'];_0x11f4bf++){_0x33ce26+=this['calculateBlockSimilarity'](_0x1b4b9a[_0x5a27fd],_0x1b4b9a[_0x11f4bf]),_0x49ffe2++;}}return _0x49ffe2>0x0?_0x33ce26/_0x49ffe2:0x0;}}