@ranger-testing/ranger-cli 2.4.4 → 2.4.6
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/build/cli.js +1 -1
- package/build/commands/addEnv.js +1 -1
- package/build/commands/authEncrypt.js +1 -1
- package/build/commands/clean.js +1 -1
- package/build/commands/config.js +1 -1
- package/build/commands/env.js +1 -1
- package/build/commands/feature.js +1 -1
- package/build/commands/hook.js +1 -1
- package/build/commands/hooks/autoPrompt.js +1 -1
- package/build/commands/hooks/disable.js +1 -1
- package/build/commands/hooks/enable.js +1 -1
- package/build/commands/hooks/exitPlanMode.js +1 -1
- package/build/commands/hooks/index.js +1 -1
- package/build/commands/hooks/output.js +1 -1
- package/build/commands/hooks/planReminder.js +1 -1
- package/build/commands/hooks/planStart.js +1 -1
- package/build/commands/hooks/postEdit.js +1 -1
- package/build/commands/hooks/preCompact.js +1 -1
- package/build/commands/hooks/sessionEnd.js +1 -1
- package/build/commands/hooks/sessionStart.js +1 -1
- package/build/commands/hooks/stopHook.js +1 -1
- package/build/commands/index.js +1 -1
- package/build/commands/login.js +1 -1
- package/build/commands/setup/claude.js +1 -1
- package/build/commands/setup/opencode.js +1 -1
- package/build/commands/setupCi.js +1 -1
- package/build/commands/skillup.js +1 -1
- package/build/commands/start.js +1 -1
- package/build/commands/status.js +1 -1
- package/build/commands/update.js +1 -1
- package/build/commands/updateEnv.js +1 -1
- package/build/commands/useEnv.js +1 -1
- package/build/commands/utils/activeProfile.js +1 -1
- package/build/commands/utils/agentEnv.js +1 -1
- package/build/commands/utils/browserSessionsApi.js +1 -1
- package/build/commands/utils/claudeConfig.js +1 -1
- package/build/commands/utils/claudeOverrideSettings.js +1 -1
- package/build/commands/utils/claudePlugin.js +1 -1
- package/build/commands/utils/crypto.js +1 -1
- package/build/commands/utils/desirePathLog.js +1 -1
- package/build/commands/utils/deviceAuth.js +1 -1
- package/build/commands/utils/environment.js +1 -1
- package/build/commands/utils/featureApi.js +1 -1
- package/build/commands/utils/featureReportGenerator.js +1 -1
- package/build/commands/utils/fixWebmDuration.js +1 -1
- package/build/commands/utils/git.js +1 -1
- package/build/commands/utils/keychain.js +1 -1
- package/build/commands/utils/localAgentInstallationsApi.js +1 -1
- package/build/commands/utils/mcpImageBase64.js +1 -1
- package/build/commands/utils/model.js +1 -1
- package/build/commands/utils/opencodeConfig.js +1 -1
- package/build/commands/utils/playwrightCli.js +1 -1
- package/build/commands/utils/profileMessages.js +1 -1
- package/build/commands/utils/profileSetupBanner.js +1 -1
- package/build/commands/utils/rangerConfig.js +1 -1
- package/build/commands/utils/rangerRoot.js +1 -1
- package/build/commands/utils/reportGenerator.js +1 -1
- package/build/commands/utils/retry.js +1 -1
- package/build/commands/utils/sessionCache.js +1 -1
- package/build/commands/utils/settings.js +1 -1
- package/build/commands/utils/skillContent.js +1 -1
- package/build/commands/utils/skills.js +1 -1
- package/build/commands/utils/stitchWebmFiles.js +1 -1
- package/build/commands/utils/telemetry.js +1 -1
- package/build/commands/utils/tokenRefresh.js +1 -0
- package/build/commands/utils/traceSnapshotMapper.js +1 -1
- package/build/commands/utils/userApi.js +1 -1
- package/build/commands/utils/version.js +1 -1
- package/build/commands/verifyFeature.js +1 -1
- package/build/commands/verifyFeatureCli.js +1 -1
- package/build/commands/verifyInBrowser.js +1 -1
- package/package.json +1 -1
package/build/commands/update.js
CHANGED
|
@@ -1 +1 @@
|
|
|
1
|
-
(function(_0x96dd10,_0x7819df){const _0x20191f=_0x54a6,_0x2056a7=_0x96dd10();while(!![]){try{const _0x124e89=parseInt(_0x20191f(0x12d))/0x1*(parseInt(_0x20191f(0x13f))/0x2)+parseInt(_0x20191f(0x12c))/0x3+-parseInt(_0x20191f(0x15a))/0x4+parseInt(_0x20191f(0x131))/0x5+parseInt(_0x20191f(0x11b))/0x6*(-parseInt(_0x20191f(0x146))/0x7)+-parseInt(_0x20191f(0x12e))/0x8*(parseInt(_0x20191f(0x13c))/0x9)+-parseInt(_0x20191f(0x12b))/0xa;if(_0x124e89===_0x7819df)break;else _0x2056a7['push'](_0x2056a7['shift']());}catch(_0xb12f0e){_0x2056a7['push'](_0x2056a7['shift']());}}}(_0x1acd,0x775dd));import{spawn}from'child_process';function _0x54a6(_0x1cb599,_0x5a56ca){_0x1cb599=_0x1cb599-0x118;const _0x1acd77=_0x1acd();let _0x54a6c3=_0x1acd77[_0x1cb599];return _0x54a6c3;}import{existsSync}from'fs';function _0x1acd(){const _0x33fa1e=['BjjpP','\x20ranger-managed\x20skill(s)...','win32','dqFlo','warn','30810owEYty','1346928OHkRlv','35858nlCTJL','8kGHsAo','qDlLF','update','3763170YyHqxr','utf-8','BNBqI','Pbaky','active-profile.txt','cGfgK','sloog','length','push','ROPtr','findIndex','6080805IaviOl','marketplace','ranger@trailhead','8npLZPj','qhpzp','kAHwE','@latest','zRRVQ','Claude\x20plugin\x20updated\x20(project\x20scope).','project','483NRCIwu','close','\x0aSuccessfully\x20updated\x20to\x20version\x20','\x0a✅\x20Update\x20complete!','plugin','qRarp','error','pipe','\x0aReinstalling\x20','opencode','splice','active-feature.txt','cpraf','\x0aNo\x20ranger-managed\x20skills\x20found\x20to\x20reinstall.','log','SmlOo','Clnfg','join','\x0aCurrent\x20version:\x20','ooAKZ','624832cjbwjr','\x20skill\x20','version','trailhead','inherit','gncEW','ScNFi','trim','\x0aInstalling\x20','platform','\x0aCould\x20not\x20check\x20latest\x20version:\x20','--scope','\x0aClaude\x20plugin\x20updated\x20(user\x20scope).','zFzuV','1842mYOiRR','GLFto','kUmkD','QopTf','Update\x20failed:\x20','Update\x20failed.','yziUG','RCsfQ','claude','Nlqyk','user'];_0x1acd=function(){return _0x33fa1e;};return _0x1acd();}import{readFile,writeFile}from'fs/promises';import{installSkill,removeSkill,RANGER_MANAGED_SKILLS,DEPRECATED_SKILLS}from'./utils/skills.js';import{PACKAGE_NAME,getCurrentVersion,getLatestVersion,compareVersions}from'./utils/version.js';import{getSkillsDir}from'./utils/claudeConfig.js';import{getOpencodeSkillsDir}from'./utils/opencodeConfig.js';import{join}from'path';import{migrateActiveProfileFile}from'./utils/activeProfile.js';import{getRangerDir}from'./utils/rangerRoot.js';import{isMarketplaceAdded,isPluginInstalled}from'./utils/claudePlugin.js';async function runInstall(){const _0x41bc27=_0x54a6,_0x5b7ebc={'WAHCF':function(_0x2843e3,_0x3be8c6){return _0x2843e3(_0x3be8c6);},'QopTf':function(_0x5de420,_0x1e63cb){return _0x5de420===_0x1e63cb;},'biCHv':'npm','Clnfg':_0x41bc27(0x15e),'kAHwE':_0x41bc27(0x14c)};return new Promise(_0x57ea5a=>{const _0x1ab88d=_0x41bc27;console['log'](_0x1ab88d(0x162)+PACKAGE_NAME+'@latest...\x0a');const _0x3d9a16=spawn(_0x5b7ebc['biCHv'],['install','-g',PACKAGE_NAME+_0x1ab88d(0x142)],{'stdio':_0x5b7ebc[_0x1ab88d(0x156)],'shell':process[_0x1ab88d(0x163)]===_0x1ab88d(0x128)});_0x3d9a16['on']('close',_0x1e8230=>{const _0x1875cb=_0x1ab88d;_0x5b7ebc['WAHCF'](_0x57ea5a,_0x5b7ebc[_0x1875cb(0x11e)](_0x1e8230,0x0));}),_0x3d9a16['on'](_0x5b7ebc[_0x1ab88d(0x141)],()=>{_0x57ea5a(![]);});});}async function updateClaudeMarketplace(){const _0x12b581=_0x54a6,_0x5e22b4={'qRarp':function(_0x2b6024,_0x1e0a84){return _0x2b6024===_0x1e0a84;},'RCsfQ':function(_0x31bf54,_0x2b4aee){return _0x31bf54(_0x2b4aee);},'SblyB':'plugin','Kfhlt':_0x12b581(0x13d),'zRRVQ':_0x12b581(0x130),'ooAKZ':_0x12b581(0x14d),'qhpzp':_0x12b581(0x128)};return new Promise(_0x1692d4=>{const _0x41de6c=_0x12b581,_0x2c1462={'TEuds':function(_0x575546,_0x48a889){const _0x3bde03=_0x54a6;return _0x5e22b4[_0x3bde03(0x122)](_0x575546,_0x48a889);}},_0x99e604=spawn('claude',[_0x5e22b4['SblyB'],_0x5e22b4['Kfhlt'],_0x5e22b4[_0x41de6c(0x143)],_0x41de6c(0x15d)],{'stdio':_0x5e22b4[_0x41de6c(0x159)],'shell':process['platform']===_0x5e22b4[_0x41de6c(0x140)]});_0x99e604['on'](_0x41de6c(0x147),_0x13342d=>{const _0x4aa2c9=_0x41de6c;_0x1692d4(_0x5e22b4[_0x4aa2c9(0x14b)](_0x13342d,0x0));}),_0x99e604['on'](_0x41de6c(0x14c),()=>{_0x2c1462['TEuds'](_0x1692d4,![]);});});}async function updateClaudePlugin(_0x3a8008){const _0x217d97=_0x54a6,_0x4637e9={'UPTEV':function(_0x388077,_0x34b1f6){return _0x388077===_0x34b1f6;},'hNdTz':_0x217d97(0x13e),'sloog':function(_0x2f1cfd,_0x3390ef,_0x336f89,_0x2c2c15){return _0x2f1cfd(_0x3390ef,_0x336f89,_0x2c2c15);},'ScNFi':'win32'};return new Promise(_0x2498d2=>{const _0x215368=_0x217d97,_0x47208f={'ROPtr':function(_0x27a7cc,_0x1b85a4){return _0x4637e9['UPTEV'](_0x27a7cc,_0x1b85a4);},'BjjpP':function(_0x5cd96d,_0x2a95eb){return _0x5cd96d(_0x2a95eb);}},_0xa8dee5=[_0x215368(0x14a),_0x215368(0x130),_0x4637e9['hNdTz']];_0x3a8008&&_0xa8dee5['push'](_0x215368(0x118),_0x3a8008);const _0x12ddfe=_0x4637e9[_0x215368(0x137)](spawn,'claude',_0xa8dee5,{'stdio':'pipe','shell':process['platform']===_0x4637e9[_0x215368(0x160)]});_0x12ddfe['on'](_0x215368(0x147),_0x58257e=>{const _0x243468=_0x215368;_0x2498d2(_0x47208f[_0x243468(0x13a)](_0x58257e,0x0));}),_0x12ddfe['on']('error',()=>{const _0x511e77=_0x215368;_0x47208f[_0x511e77(0x126)](_0x2498d2,![]);});});}function isSkillInstalled(_0xa919a4,_0x8acc53,_0x545384){const _0x37e0e0=_0x54a6,_0x196a8c={'dqFlo':'opencode','GLFto':function(_0x32dd72,_0x2207f6){return _0x32dd72(_0x2207f6);}},_0x530174=_0x545384===_0x196a8c[_0x37e0e0(0x129)]?getOpencodeSkillsDir(_0x8acc53):_0x196a8c[_0x37e0e0(0x11c)](getSkillsDir,_0x8acc53),_0x27ab42=join(_0x530174,_0xa919a4);return existsSync(_0x27ab42);}async function reinstallSkills(_0xba6ba5){const _0x2d3646=_0x54a6,_0x14bc5b={'tEiVz':_0x2d3646(0x145),'cpraf':_0x2d3646(0x125),'feTIK':function(_0x202821,_0x5adabc,_0x2d0dab,_0x529196){return _0x202821(_0x5adabc,_0x2d0dab,_0x529196);},'yziUG':'claude','kUmkD':_0x2d3646(0x14f),'gncEW':function(_0x14029c,_0x29e2e9,_0x404b5b){return _0x14029c(_0x29e2e9,_0x404b5b);},'SmlOo':function(_0x10d5f1,_0x64997,_0x4b1ce3){return _0x10d5f1(_0x64997,_0x4b1ce3);}},_0x286edc=[_0x14bc5b['tEiVz'],_0x14bc5b[_0x2d3646(0x152)]],_0x271157=[];for(const _0x4f8d13 of _0x286edc){for(const _0x5c3b1c of RANGER_MANAGED_SKILLS){_0x14bc5b['feTIK'](isSkillInstalled,_0x5c3b1c,_0x4f8d13,_0x2d3646(0x123))&&_0x271157['push']({'skillName':_0x5c3b1c,'level':_0x4f8d13,'platform':_0x14bc5b[_0x2d3646(0x121)]}),isSkillInstalled(_0x5c3b1c,_0x4f8d13,'opencode')&&_0x271157[_0x2d3646(0x139)]({'skillName':_0x5c3b1c,'level':_0x4f8d13,'platform':_0x14bc5b[_0x2d3646(0x11d)]});}}for(const _0x11aff6 of _0x286edc){for(const _0x1f6fb6 of DEPRECATED_SKILLS){await _0x14bc5b[_0x2d3646(0x15f)](removeSkill,_0x1f6fb6,_0x11aff6);}}if(_0x271157[_0x2d3646(0x138)]===0x0){console[_0x2d3646(0x154)](_0x2d3646(0x153));return;}console[_0x2d3646(0x154)](_0x2d3646(0x14e)+_0x271157['length']+_0x2d3646(0x127));for(const {skillName:_0x5ca72b,level:_0x212ba0,platform:_0x956704}of _0x271157){try{await _0x14bc5b[_0x2d3646(0x155)](installSkill,_0x5ca72b,{'level':_0x212ba0,'cliVersion':_0xba6ba5,'platform':_0x956704});}catch(_0x1e2c56){console['warn']('\x20\x20Failed\x20to\x20reinstall\x20'+_0x956704+'\x20'+_0x212ba0+_0x2d3646(0x15b)+_0x5ca72b+':',_0x1e2c56);}}}async function ensureActiveProfileGitignored(){const _0x5dcc53=_0x54a6,_0x4b5d79={'Chmuc':function(_0x127aa9){return _0x127aa9();},'qDlLF':'.gitignore','AdjSV':function(_0x113246,_0x14a00b,_0x6ceb54){return _0x113246(_0x14a00b,_0x6ceb54);},'cGfgK':function(_0x4b6176,_0x16624b){return _0x4b6176===_0x16624b;},'xKBCU':_0x5dcc53(0x135),'gkeYV':function(_0xb066a4,_0x59e41e,_0x5d7859,_0x39923d){return _0xb066a4(_0x59e41e,_0x5d7859,_0x39923d);}},_0x4c8daa=join(_0x4b5d79['Chmuc'](getRangerDir),_0x4b5d79[_0x5dcc53(0x12f)]);if(!existsSync(_0x4c8daa))return![];let _0x216235='';try{_0x216235=await _0x4b5d79['AdjSV'](readFile,_0x4c8daa,'utf-8');}catch{return![];}const _0x26b278=_0x216235['split'](/\r?\n/);if(_0x26b278['some'](_0x362fa0=>_0x362fa0['trim']()===_0x5dcc53(0x135)))return![];let _0x73b64c=_0x26b278[_0x5dcc53(0x13b)](_0x572230=>_0x572230[_0x5dcc53(0x161)]()===_0x5dcc53(0x151));_0x4b5d79[_0x5dcc53(0x136)](_0x73b64c,-0x1)&&(_0x73b64c=_0x26b278[_0x5dcc53(0x138)]);_0x26b278[_0x5dcc53(0x150)](_0x73b64c,0x0,_0x4b5d79['xKBCU']);let _0x11415e=_0x26b278[_0x5dcc53(0x157)]('\x0a');!_0x11415e['endsWith']('\x0a')&&(_0x11415e+='\x0a');try{await _0x4b5d79['gkeYV'](writeFile,_0x4c8daa,_0x11415e,_0x5dcc53(0x132));}catch{return![];}return!![];}export async function update(){const _0x137538=_0x54a6,_0x4e8772={'BNBqI':'Checking\x20for\x20updates...','Nlqyk':function(_0x18fbdc,_0x1383ca){return _0x18fbdc===_0x1383ca;},'sJmrS':function(_0x5da6ca,_0x531924){return _0x5da6ca(_0x531924);},'FdCXb':function(_0x3bea55){return _0x3bea55();},'NioWW':function(_0x1ff0ff){return _0x1ff0ff();},'DdyaU':_0x137538(0x119),'Pbaky':function(_0x2c9869,_0x282262){return _0x2c9869(_0x282262);},'SAIor':'project','zFzuV':'✓\x20Migrated\x20active\x20profile\x20file','GbOMH':_0x137538(0x149)},_0x59e64e=getCurrentVersion();console['log'](_0x137538(0x158)+_0x59e64e),console[_0x137538(0x154)](_0x4e8772[_0x137538(0x133)]);const _0x15687b=getLatestVersion();let _0x3cecbd=_0x59e64e;if(!_0x15687b['version']){console[_0x137538(0x12a)](_0x137538(0x164)+_0x15687b[_0x137538(0x14c)]),console[_0x137538(0x154)]('Attempting\x20install\x20anyway...');const _0x1ff6ef=await runInstall();if(_0x1ff6ef)console['log']('\x0aSuccessfully\x20installed\x20latest\x20version.'),_0x3cecbd=getCurrentVersion();else throw new Error(_0x137538(0x11f)+_0x15687b[_0x137538(0x14c)]);}else{const _0x32f28c=_0x15687b[_0x137538(0x15c)];console[_0x137538(0x154)]('Latest\x20version:\x20\x20'+_0x32f28c);const _0x122c52=compareVersions(_0x59e64e,_0x32f28c);if(_0x4e8772[_0x137538(0x124)](_0x122c52,0x0))console['log']('\x0aYou\x20are\x20already\x20on\x20the\x20latest\x20version.');else{if(_0x122c52<0x0)console['log']('\x0aYour\x20version\x20('+_0x59e64e+')\x20is\x20newer\x20than\x20the\x20published\x20version\x20('+_0x32f28c+').');else{const _0x131c33=await runInstall();if(_0x131c33)console['log'](_0x137538(0x148)+_0x32f28c),_0x3cecbd=_0x32f28c;else throw new Error(_0x137538(0x120));}}}await reinstallSkills(_0x3cecbd);const _0x2c3b1f=await isMarketplaceAdded(_0x137538(0x15d)),_0x1deab6=await _0x4e8772['sJmrS'](isPluginInstalled,'ranger@trailhead');if(_0x2c3b1f){const _0x3534b4=await _0x4e8772['FdCXb'](updateClaudeMarketplace);_0x3534b4&&console[_0x137538(0x154)]('\x0aClaude\x20marketplace\x20updated\x20(trailhead).');}if(_0x1deab6){const _0x2654bc=await _0x4e8772['NioWW'](updateClaudePlugin);_0x2654bc&&console[_0x137538(0x154)](_0x4e8772['DdyaU']);const _0x4c3a74=await _0x4e8772[_0x137538(0x134)](updateClaudePlugin,_0x4e8772['SAIor']);_0x4c3a74&&console['log']((_0x2654bc?'':'\x0a')+_0x137538(0x144));}const _0x22e6c2=await migrateActiveProfileFile();_0x22e6c2&&console[_0x137538(0x154)](_0x4e8772[_0x137538(0x11a)]);const _0x176a44=await ensureActiveProfileGitignored();console['log'](_0x4e8772['GbOMH']);}
|
|
1
|
+
(function(_0x81c05d,_0x42298f){const _0x2164b6=_0x5ee8,_0x4f663e=_0x81c05d();while(!![]){try{const _0x12de27=parseInt(_0x2164b6(0x1dc))/0x1+parseInt(_0x2164b6(0x1fe))/0x2*(parseInt(_0x2164b6(0x203))/0x3)+parseInt(_0x2164b6(0x1e9))/0x4+-parseInt(_0x2164b6(0x1f3))/0x5*(parseInt(_0x2164b6(0x20a))/0x6)+parseInt(_0x2164b6(0x1fb))/0x7+-parseInt(_0x2164b6(0x1da))/0x8*(-parseInt(_0x2164b6(0x204))/0x9)+-parseInt(_0x2164b6(0x1d6))/0xa*(parseInt(_0x2164b6(0x1d1))/0xb);if(_0x12de27===_0x42298f)break;else _0x4f663e['push'](_0x4f663e['shift']());}catch(_0x374017){_0x4f663e['push'](_0x4f663e['shift']());}}}(_0xea9c,0x72c16));import{spawn}from'child_process';import{existsSync}from'fs';import{readFile,writeFile}from'fs/promises';import{installSkill,removeSkill,RANGER_MANAGED_SKILLS,DEPRECATED_SKILLS}from'./utils/skills.js';import{PACKAGE_NAME,getCurrentVersion,getLatestVersion,compareVersions}from'./utils/version.js';import{getSkillsDir}from'./utils/claudeConfig.js';import{getOpencodeSkillsDir}from'./utils/opencodeConfig.js';import{join}from'path';import{migrateActiveProfileFile}from'./utils/activeProfile.js';import{getRangerDir}from'./utils/rangerRoot.js';import{isMarketplaceAdded,isPluginInstalled}from'./utils/claudePlugin.js';async function runInstall(){const _0xb76d55=_0x5ee8,_0x5c747f={'XOKYj':function(_0x3dc9d2,_0x46a0c4){return _0x3dc9d2===_0x46a0c4;},'oPCWw':_0xb76d55(0x1f1),'WfiYG':_0xb76d55(0x1e2),'ZubDd':_0xb76d55(0x1d3)};return new Promise(_0x2a3980=>{const _0x128980=_0xb76d55,_0x41cc63={'yoaBi':function(_0x3ca4d0,_0x4b9443){return _0x3ca4d0(_0x4b9443);},'wpxMF':function(_0x305ec5,_0x64f326){const _0x11246a=_0x5ee8;return _0x5c747f[_0x11246a(0x1de)](_0x305ec5,_0x64f326);}};console[_0x128980(0x1e5)]('\x0aInstalling\x20'+PACKAGE_NAME+_0x128980(0x1eb));const _0x3e7792=spawn(_0x5c747f[_0x128980(0x1dd)],[_0x128980(0x1f9),'-g',PACKAGE_NAME+_0x128980(0x1e7)],{'stdio':'inherit','shell':process[_0x128980(0x208)]==='win32'});_0x3e7792['on'](_0x5c747f['WfiYG'],_0x567bfe=>{_0x41cc63['yoaBi'](_0x2a3980,_0x41cc63['wpxMF'](_0x567bfe,0x0));}),_0x3e7792['on'](_0x5c747f['ZubDd'],()=>{_0x2a3980(![]);});});}async function updateClaudeMarketplace(){const _0x24ff6f=_0x5ee8,_0x36e79f={'NJpku':function(_0x402eca,_0x11fa0b){return _0x402eca(_0x11fa0b);},'TLuKA':function(_0x28bbab,_0x3e9199){return _0x28bbab===_0x3e9199;},'ZlkVg':function(_0x1e9119,_0x18a486,_0x40f8dc,_0x4d0743){return _0x1e9119(_0x18a486,_0x40f8dc,_0x4d0743);},'lhLom':'plugin','HBtmI':_0x24ff6f(0x1e1),'tLsZh':_0x24ff6f(0x1ff),'vZqwX':'win32','fvOOW':'close'};return new Promise(_0x736175=>{const _0x9b2ac7=_0x24ff6f,_0xbfb273={'QsZDs':function(_0x341818,_0x1688dd){return _0x341818(_0x1688dd);}},_0x4da9ec=_0x36e79f['ZlkVg'](spawn,'claude',[_0x36e79f['lhLom'],_0x36e79f['HBtmI'],_0x9b2ac7(0x1ee),_0x36e79f['tLsZh']],{'stdio':_0x9b2ac7(0x1ec),'shell':process[_0x9b2ac7(0x208)]===_0x36e79f[_0x9b2ac7(0x1d4)]});_0x4da9ec['on'](_0x36e79f['fvOOW'],_0x5418e4=>{const _0x150a85=_0x9b2ac7;_0x36e79f['NJpku'](_0x736175,_0x36e79f[_0x150a85(0x1e6)](_0x5418e4,0x0));}),_0x4da9ec['on']('error',()=>{_0xbfb273['QsZDs'](_0x736175,![]);});});}async function updateClaudePlugin(_0x30bad0){const _0x188486=_0x5ee8,_0x40f9ba={'yREmj':function(_0x434b9d,_0x5be433){return _0x434b9d(_0x5be433);},'tWMBr':function(_0x155a7b,_0x3ba51c){return _0x155a7b===_0x3ba51c;},'oaqDQ':function(_0x2ef2ae,_0x52a91b){return _0x2ef2ae(_0x52a91b);},'lpVme':_0x188486(0x1ee),'GIkvZ':'ranger@trailhead','BTBeG':_0x188486(0x1fa),'iYTFP':'claude','qhTKg':_0x188486(0x1d0),'wAqSI':'close','ulhap':'error'};return new Promise(_0x49fa83=>{const _0x29ba99=_0x188486,_0x122682={'yiPBB':function(_0x1b069c,_0x56b92f){return _0x40f9ba['oaqDQ'](_0x1b069c,_0x56b92f);}},_0x59abc3=['plugin',_0x40f9ba[_0x29ba99(0x1e4)],_0x40f9ba[_0x29ba99(0x1fc)]];_0x30bad0&&_0x59abc3['push'](_0x40f9ba['BTBeG'],_0x30bad0);const _0x4f08e1=spawn(_0x40f9ba['iYTFP'],_0x59abc3,{'stdio':'pipe','shell':_0x40f9ba[_0x29ba99(0x207)](process['platform'],_0x40f9ba['qhTKg'])});_0x4f08e1['on'](_0x40f9ba['wAqSI'],_0x5ee4c8=>{const _0x53a4b6=_0x29ba99;_0x40f9ba[_0x53a4b6(0x205)](_0x49fa83,_0x40f9ba[_0x53a4b6(0x207)](_0x5ee4c8,0x0));}),_0x4f08e1['on'](_0x40f9ba[_0x29ba99(0x1df)],()=>{_0x122682['yiPBB'](_0x49fa83,![]);});});}function _0x5ee8(_0x26b905,_0x4a930a){_0x26b905=_0x26b905-0x1cd;const _0xea9c6e=_0xea9c();let _0x5ee84a=_0xea9c6e[_0x26b905];return _0x5ee84a;}function isSkillInstalled(_0x36f698,_0x51da0a,_0x363104){const _0x18cfd3=_0x5ee8,_0x1e66eb={'vfHgS':function(_0x5dd7a1,_0x4aa2aa){return _0x5dd7a1===_0x4aa2aa;},'UfOYv':function(_0x3bf878,_0x2f44e3){return _0x3bf878(_0x2f44e3);},'xudUz':function(_0x443746,_0x1f9fa7){return _0x443746(_0x1f9fa7);},'UyADQ':function(_0x3e9a12,_0x5ee9bd,_0x4d0166){return _0x3e9a12(_0x5ee9bd,_0x4d0166);}},_0x5a6d4c=_0x1e66eb[_0x18cfd3(0x1f8)](_0x363104,'opencode')?_0x1e66eb[_0x18cfd3(0x201)](getOpencodeSkillsDir,_0x51da0a):_0x1e66eb['xudUz'](getSkillsDir,_0x51da0a),_0x18256b=_0x1e66eb[_0x18cfd3(0x1ed)](join,_0x5a6d4c,_0x36f698);return _0x1e66eb[_0x18cfd3(0x201)](existsSync,_0x18256b);}async function reinstallSkills(_0x5235ea){const _0x59ff0f=_0x5ee8,_0xe712a={'sJYiT':'project','lumft':function(_0x2eb3a2,_0x498464,_0xb16d7,_0x5184b8){return _0x2eb3a2(_0x498464,_0xb16d7,_0x5184b8);},'UMoJr':'claude','UynVv':function(_0x29b526,_0x20ac47,_0x457959,_0xb893ed){return _0x29b526(_0x20ac47,_0x457959,_0xb893ed);},'OBWCE':_0x59ff0f(0x202)},_0x461405=[_0xe712a['sJYiT'],'user'],_0x545bf5=[];for(const _0x34d395 of _0x461405){for(const _0x2733f8 of RANGER_MANAGED_SKILLS){_0xe712a['lumft'](isSkillInstalled,_0x2733f8,_0x34d395,_0xe712a['UMoJr'])&&_0x545bf5['push']({'skillName':_0x2733f8,'level':_0x34d395,'platform':_0x59ff0f(0x206)}),_0xe712a['UynVv'](isSkillInstalled,_0x2733f8,_0x34d395,'opencode')&&_0x545bf5['push']({'skillName':_0x2733f8,'level':_0x34d395,'platform':'opencode'});}}for(const _0x2911b4 of _0x461405){for(const _0x3d383f of DEPRECATED_SKILLS){await removeSkill(_0x3d383f,_0x2911b4);}}if(_0x545bf5['length']===0x0){console[_0x59ff0f(0x1e5)](_0xe712a[_0x59ff0f(0x1cf)]);return;}console['log'](_0x59ff0f(0x1ea)+_0x545bf5[_0x59ff0f(0x1f4)]+_0x59ff0f(0x1d8));for(const {skillName:_0x4e9cb9,level:_0x3b9a49,platform:_0x406f16}of _0x545bf5){try{await installSkill(_0x4e9cb9,{'level':_0x3b9a49,'cliVersion':_0x5235ea,'platform':_0x406f16});}catch(_0x14a713){console['warn'](_0x59ff0f(0x1f2)+_0x406f16+'\x20'+_0x3b9a49+'\x20skill\x20'+_0x4e9cb9+':',_0x14a713);}}}function _0xea9c(){const _0x729d0f=['EBPQM','UfOYv','\x0aNo\x20ranger-managed\x20skills\x20found\x20to\x20reinstall.','7563zsEXDx','920466TITvqH','yREmj','claude','tWMBr','platform','active-profile.txt','570SlnfXO','version','yhfyu','OBWCE','win32','11PwZkET','split','error','vZqwX','queGx','24350660nRrrpN','some','\x20ranger-managed\x20skill(s)...','Update\x20failed.','40VyYGNY','\x0aSuccessfully\x20installed\x20latest\x20version.','871912QVZWaY','oPCWw','XOKYj','ulhap','qWIZC','marketplace','close','\x0a✅\x20Update\x20complete!','lpVme','log','TLuKA','@latest','utf-8','3139036erLBqd','\x0aReinstalling\x20','@latest...\x0a','pipe','UyADQ','update','project','endsWith','npm','\x20\x20Failed\x20to\x20reinstall\x20','19920FzvKet','length','\x0aCould\x20not\x20check\x20latest\x20version:\x20','trim','active-feature.txt','vfHgS','install','--scope','6467629orDsxM','GIkvZ','Checking\x20for\x20updates...','152KINmOM','trailhead'];_0xea9c=function(){return _0x729d0f;};return _0xea9c();}async function ensureActiveProfileGitignored(){const _0x45d423=_0x5ee8,_0x2a138e={'queGx':function(_0x1da482){return _0x1da482();},'yhfyu':function(_0x4b59ac,_0x2bd6a2){return _0x4b59ac(_0x2bd6a2);},'yjOQV':function(_0x1914d0,_0x52d918,_0x5b4521){return _0x1914d0(_0x52d918,_0x5b4521);},'EBPQM':_0x45d423(0x1e8),'YSAvH':function(_0x369fd5,_0x3fa4e8,_0x5fb96,_0x536e0f){return _0x369fd5(_0x3fa4e8,_0x5fb96,_0x536e0f);}},_0x18d882=join(_0x2a138e[_0x45d423(0x1d5)](getRangerDir),'.gitignore');if(!_0x2a138e[_0x45d423(0x1ce)](existsSync,_0x18d882))return![];let _0x2ebb4b='';try{_0x2ebb4b=await _0x2a138e['yjOQV'](readFile,_0x18d882,_0x2a138e[_0x45d423(0x200)]);}catch{return![];}const _0x29eb0b=_0x2ebb4b[_0x45d423(0x1d2)](/\r?\n/);if(_0x29eb0b[_0x45d423(0x1d7)](_0x9222ce=>_0x9222ce[_0x45d423(0x1f6)]()==='active-profile.txt'))return![];let _0x48eabf=_0x29eb0b['findIndex'](_0x1225e8=>_0x1225e8['trim']()===_0x45d423(0x1f7));_0x48eabf===-0x1&&(_0x48eabf=_0x29eb0b['length']);_0x29eb0b['splice'](_0x48eabf,0x0,_0x45d423(0x209));let _0x473840=_0x29eb0b['join']('\x0a');!_0x473840[_0x45d423(0x1f0)]('\x0a')&&(_0x473840+='\x0a');try{await _0x2a138e['YSAvH'](writeFile,_0x18d882,_0x473840,_0x2a138e['EBPQM']);}catch{return![];}return!![];}export async function update(){const _0x1f8358=_0x5ee8,_0x59ed24={'dhanu':function(_0x2351fb){return _0x2351fb();},'rirFS':function(_0x24458b){return _0x24458b();},'sGhPB':_0x1f8358(0x1d9),'MOlVo':function(_0x1447ad,_0x4ac49f){return _0x1447ad(_0x4ac49f);},'mYuBw':'trailhead','Czuqf':'\x0aClaude\x20plugin\x20updated\x20(user\x20scope).','ZJZcg':_0x1f8358(0x1ef),'qWIZC':'✓\x20Migrated\x20active\x20profile\x20file'},_0x55db51=getCurrentVersion();console[_0x1f8358(0x1e5)]('\x0aCurrent\x20version:\x20'+_0x55db51),console[_0x1f8358(0x1e5)](_0x1f8358(0x1fd));const _0x5785f9=_0x59ed24['dhanu'](getLatestVersion);let _0x438f59=_0x55db51;if(!_0x5785f9['version']){console['warn'](_0x1f8358(0x1f5)+_0x5785f9['error']),console[_0x1f8358(0x1e5)]('Attempting\x20install\x20anyway...');const _0x4464c0=await runInstall();if(_0x4464c0)console[_0x1f8358(0x1e5)](_0x1f8358(0x1db)),_0x438f59=_0x59ed24['rirFS'](getCurrentVersion);else throw new Error('Update\x20failed:\x20'+_0x5785f9['error']);}else{const _0x2812b8=_0x5785f9[_0x1f8358(0x1cd)];console[_0x1f8358(0x1e5)]('Latest\x20version:\x20\x20'+_0x2812b8);const _0x35960b=compareVersions(_0x55db51,_0x2812b8);if(_0x35960b===0x0)console[_0x1f8358(0x1e5)]('\x0aYou\x20are\x20already\x20on\x20the\x20latest\x20version.');else{if(_0x35960b<0x0)console['log']('\x0aYour\x20version\x20('+_0x55db51+')\x20is\x20newer\x20than\x20the\x20published\x20version\x20('+_0x2812b8+').');else{const _0x5172c2=await _0x59ed24['rirFS'](runInstall);if(_0x5172c2)console['log']('\x0aSuccessfully\x20updated\x20to\x20version\x20'+_0x2812b8),_0x438f59=_0x2812b8;else throw new Error(_0x59ed24['sGhPB']);}}}await _0x59ed24['MOlVo'](reinstallSkills,_0x438f59);const _0x7f1d67=await isMarketplaceAdded(_0x59ed24['mYuBw']),_0xf24347=await isPluginInstalled('ranger@trailhead');if(_0x7f1d67){const _0x119168=await updateClaudeMarketplace();_0x119168&&console[_0x1f8358(0x1e5)]('\x0aClaude\x20marketplace\x20updated\x20(trailhead).');}if(_0xf24347){const _0x312228=await updateClaudePlugin();_0x312228&&console['log'](_0x59ed24['Czuqf']);const _0x4152f9=await updateClaudePlugin(_0x59ed24['ZJZcg']);_0x4152f9&&console[_0x1f8358(0x1e5)]((_0x312228?'':'\x0a')+'Claude\x20plugin\x20updated\x20(project\x20scope).');}const _0x3cf401=await migrateActiveProfileFile();_0x3cf401&&console['log'](_0x59ed24[_0x1f8358(0x1e0)]);const _0x46bd05=await ensureActiveProfileGitignored();console['log'](_0x1f8358(0x1e3));}
|
|
@@ -1 +1 @@
|
|
|
1
|
-
(function(
|
|
1
|
+
(function(_0x437e41,_0x5da857){const _0x233194=_0xcfe1,_0x212ade=_0x437e41();while(!![]){try{const _0x3dccb8=-parseInt(_0x233194(0x1c1))/0x1+parseInt(_0x233194(0x1be))/0x2+parseInt(_0x233194(0x1b3))/0x3+-parseInt(_0x233194(0x1a5))/0x4+-parseInt(_0x233194(0x1bf))/0x5*(parseInt(_0x233194(0x19c))/0x6)+-parseInt(_0x233194(0x1a1))/0x7*(parseInt(_0x233194(0x1cb))/0x8)+parseInt(_0x233194(0x1c0))/0x9;if(_0x3dccb8===_0x5da857)break;else _0x212ade['push'](_0x212ade['shift']());}catch(_0x43afff){_0x212ade['push'](_0x212ade['shift']());}}}(_0xa7eb,0x6287a));import{writeFile,readFile,unlink}from'fs/promises';import{join}from'path';import{existsSync}from'fs';import{chromium}from'playwright';import{encrypt}from'./utils/crypto.js';import{getToken}from'./utils/keychain.js';function _0xcfe1(_0x160699,_0x7d40fb){_0x160699=_0x160699-0x19b;const _0xa7ebb5=_0xa7eb();let _0xcfe1e7=_0xa7ebb5[_0x160699];return _0xcfe1e7;}function _0xa7eb(){const _0x5c8de7=['baseUrl','clHho','isTTY','1314204jVmShe','\x20\x20You\x20can\x20safely\x20commit\x20this\x20file\x20to\x20git.','vINfn','browser_auth','extraHTTPHeaders','18151VPzmrQ','\x20\x20\x20A\x20browser\x20will\x20open\x20with\x20your\x20existing\x20session\x20(if\x20any).','setupHeaders','contextOptions','90152tHDBHZ','\x20\x20Could\x20not\x20encrypt:\x20No\x20API\x20token\x20found.\x20Run:\x20ranger\x20setup\x20[token]','browser','Saving\x20authentication\x20state...','Config\x20not\x20found\x20at\x20','launch','Non-interactive\x20mode\x20detected.\x0aThe\x20\x22ranger\x20profile\x20update\x22\x20command\x20requires\x20interactive\x20browser\x20authentication\x20and\x20cannot\x20be\x20run\x20in\x20non-TTY\x20environments\x20(CI,\x20scripts,\x20Claude\x20Code).\x0aTo\x20update\x20profile\x20authentication:\x0a\x20\x201.\x20Run\x20\x22ranger\x20profile\x20update\x20<name>\x22\x20in\x20an\x20interactive\x20terminal\x0a\x20\x202.\x20Commit\x20the\x20updated\x20encrypted\x20auth\x20file\x20to\x20git','DMyDn','allowInsecureLocalhost','Enable\x20safe\x20mode\x20and\x20try\x20again:\x20ranger\x20profile\x20config\x20set\x20','gWdHe','SxiCs','newPage','rMvMR','2332656kxNpQE','stdin','close','error','safeMode','goto','WHSQo','cErjc','yiKHQ','auth.json','.\x20Run\x20first:\x20ranger\x20profile\x20add\x20','595280aNMpac','5htHYYT','1260216UVsysQ','339289TCtPVx','llPwM','settings.json','\x20safeMode\x20true\x0a','trackPhaseEnd','NELnU','storageState','Browser\x20closed\x20before\x20authentication\x20was\x20saved.','ADgct','trackPhaseStart','712uCJjrW','parse','log','catch','\x20\x20\x20Update\x20your\x20authentication\x20as\x20needed.','UWtdK','\x0a📋\x20Authentication\x20Update','✓\x20Auth\x20state\x20saved\x20to:\x20','ZiaDk','config_write'];_0xa7eb=function(){return _0x5c8de7;};return _0xa7eb();}import{buildBrowserOptionsFromSettings,getEnvDir,isEnvCi,resolveEnvVars}from'./utils/settings.js';import{addProfileSetupBanner}from'./utils/profileSetupBanner.js';export async function updateEnv(_0x9c474c,_0x3cd597,_0x231f4f){const _0x26e960=_0xcfe1,_0x286f3d={'llPwM':_0x26e960(0x1a8),'SxiCs':_0x26e960(0x1b5),'UWtdK':function(_0x302ee7,_0x4ee1b4){return _0x302ee7(_0x4ee1b4);},'cErjc':'.enc','WHSQo':function(_0x446836,_0x34e99f){return _0x446836===_0x34e99f;},'Gvfqi':'string','OcAbH':function(_0x81f60d,_0x480587){return _0x81f60d(_0x480587);},'eYGbS':_0x26e960(0x1cf),'NELnU':'\x20\x20\x20When\x20you\x20are\x20done,\x20close\x20the\x20browser.\x0a','yiKHQ':function(_0x1b3d48,_0x6f1fa9,_0x2f1198){return _0x1b3d48(_0x6f1fa9,_0x2f1198);},'rMvMR':'about:blank','clHho':'This\x20can\x20happen\x20due\x20to\x20a\x20browser\x20compatibility\x20issue\x20on\x20some\x20systems.\x0a','PCeiL':function(_0x4a3daa,_0x157d61,_0x1091fc){return _0x4a3daa(_0x157d61,_0x1091fc);},'ADgct':function(_0x266fd5){return _0x266fd5();},'DMyDn':_0x26e960(0x1a6),'gWdHe':function(_0x5a2700,_0x32ff68,_0x23e9df){return _0x5a2700(_0x32ff68,_0x23e9df);},'THPSA':_0x26e960(0x19d),'ZiaDk':_0x26e960(0x19f),'vINfn':_0x26e960(0x1d4),'jkuGg':function(_0x476d14,_0x5d78f0,_0xf9c3e4){return _0x476d14(_0x5d78f0,_0xf9c3e4);}},_0x4f9416=_0x286f3d[_0x26e960(0x1d0)](getEnvDir,_0x9c474c),_0x46712e=join(_0x4f9416,_0x26e960(0x1c3)),_0x32c3ae=join(_0x4f9416,_0x26e960(0x1bc)),_0x1197b8=_0x32c3ae+_0x286f3d[_0x26e960(0x1ba)],_0x171e64=process[_0x26e960(0x1b4)]['isTTY']&&process['stdout'][_0x26e960(0x19b)];if(!_0x171e64)throw new Error(_0x26e960(0x1ab));if(!existsSync(_0x4f9416))throw new Error('Profile\x20\x22'+_0x9c474c+'\x22\x20not\x20found.\x20Run\x20first:\x20ranger\x20profile\x20add\x20'+_0x9c474c);if(!_0x286f3d[_0x26e960(0x1d0)](existsSync,_0x46712e))throw new Error(_0x26e960(0x1a9)+_0x46712e+_0x26e960(0x1bd)+_0x9c474c);const _0x3861bf=await readFile(_0x46712e,'utf-8'),_0xae9e13=JSON[_0x26e960(0x1cc)](_0x3861bf),_0x8e76db=_0x286f3d[_0x26e960(0x1d0)](resolveEnvVars,_0xae9e13),_0x2a6fe7=_0x286f3d[_0x26e960(0x1b9)](typeof _0x8e76db['baseUrl'],_0x286f3d['Gvfqi'])?_0x8e76db[_0x26e960(0x1d5)]:undefined,_0x3018d1=existsSync(_0x32c3ae),_0x4ffa7d=_0x286f3d['OcAbH'](isEnvCi,_0x9c474c);_0x3cd597?.[_0x26e960(0x1ca)]('browser_auth'),console['log'](_0x26e960(0x1d1)),console[_0x26e960(0x1cd)](_0x26e960(0x1a2)),console[_0x26e960(0x1cd)](_0x286f3d['eYGbS']),console[_0x26e960(0x1cd)](_0x286f3d[_0x26e960(0x1c6)]);const {launchOptions:_0x427448,contextOptions:_0x581697}=_0x286f3d[_0x26e960(0x1bb)](buildBrowserOptionsFromSettings,_0x8e76db,{'headless':![],'storageStatePath':_0x3018d1?_0x32c3ae:undefined});_0x8e76db[_0x26e960(0x1a3)]&&(_0x581697['extraHTTPHeaders']={..._0x581697[_0x26e960(0x1a0)],..._0x8e76db[_0x26e960(0x1a3)]});const _0x3bcc79=await chromium[_0x26e960(0x1aa)](_0x427448);let _0x57dc33=null;try{_0x57dc33=await _0x3bcc79['newContext'](_0x581697),await addProfileSetupBanner(_0x57dc33);const _0x55cbdc=await _0x57dc33[_0x26e960(0x1b1)]();await _0x55cbdc[_0x26e960(0x1b8)](_0x2a6fe7||_0x286f3d[_0x26e960(0x1b2)]);let _0x531be3=![];await new Promise(_0x244f71=>{const _0x1eb850=_0x26e960;_0x55cbdc['on'](_0x286f3d[_0x1eb850(0x1b0)],async()=>{const _0x20ac00=_0x1eb850;try{console['log'](_0x286f3d[_0x20ac00(0x1c2)]),await _0x57dc33?.[_0x20ac00(0x1c7)]({'path':_0x32c3ae}),_0x531be3=!![];}catch{}_0x244f71();});});if(!_0x531be3){console['log']('\x0aThe\x20browser\x20closed\x20unexpectedly\x20before\x20authentication\x20could\x20be\x20saved.');!_0x8e76db[_0x26e960(0x1b7)]&&(console['log'](_0x286f3d[_0x26e960(0x1d6)]),console[_0x26e960(0x1cd)](_0x26e960(0x1ae)+_0x9c474c+_0x26e960(0x1c4)));throw new Error(_0x26e960(0x1c8));}}finally{_0x57dc33&&await _0x57dc33[_0x26e960(0x1b5)]()[_0x26e960(0x1ce)](()=>{}),await _0x3bcc79[_0x26e960(0x1b5)]()[_0x26e960(0x1ce)](()=>{});}if(_0x4ffa7d){const _0x2d8b54=await _0x286f3d['PCeiL'](readFile,_0x32c3ae,'utf-8'),_0x2b4dae=await _0x286f3d[_0x26e960(0x1c9)](getToken);if(!_0x2b4dae)console[_0x26e960(0x1b6)](_0x286f3d[_0x26e960(0x1ac)]),console[_0x26e960(0x1cd)]('✓\x20Auth\x20state\x20saved\x20to:\x20'+_0x32c3ae);else{const _0x492cb6=_0x286f3d['PCeiL'](encrypt,_0x2d8b54,_0x2b4dae);await _0x286f3d[_0x26e960(0x1af)](writeFile,_0x1197b8,_0x492cb6),await unlink(_0x32c3ae),console['log']('✓\x20Encrypted\x20auth\x20saved\x20to:\x20'+_0x1197b8),console[_0x26e960(0x1cd)](_0x286f3d['THPSA']),console['log']('\x20\x20Run\x20ranger\x20setup\x20in\x20CI\x20to\x20decrypt\x20at\x20runtime.');}}else console['log'](_0x26e960(0x1d2)+_0x32c3ae);_0x3cd597?.[_0x26e960(0x1c5)](_0x286f3d[_0x26e960(0x1d3)]),_0x3cd597?.[_0x26e960(0x1ca)](_0x286f3d['vINfn']),_0xae9e13['browser']=_0xae9e13[_0x26e960(0x1a7)]||{},_0xae9e13[_0x26e960(0x1a7)][_0x26e960(0x1a4)]=_0xae9e13['browser']['contextOptions']||{},_0xae9e13['browser']['contextOptions'][_0x26e960(0x1c7)]=_0x32c3ae,_0x286f3d['WHSQo'](_0x231f4f?.['allowInsecureLocalhost'],!![])&&(_0xae9e13[_0x26e960(0x1ad)]=!![]),await _0x286f3d['jkuGg'](writeFile,_0x46712e,JSON['stringify'](_0xae9e13,null,0x2)),console[_0x26e960(0x1cd)]('✓\x20Updated\x20config:\x20'+_0x46712e),_0x3cd597?.[_0x26e960(0x1c5)](_0x286f3d[_0x26e960(0x19e)]),console['log']('\x0a✅\x20Profile\x20\x22'+_0x9c474c+'\x22\x20authentication\x20updated');}
|
package/build/commands/useEnv.js
CHANGED
|
@@ -1 +1 @@
|
|
|
1
|
-
(function(
|
|
1
|
+
function _0xb0b7(_0x3b2ead,_0x42d256){_0x3b2ead=_0x3b2ead-0x137;const _0x12d141=_0x12d1();let _0xb0b7a7=_0x12d141[_0x3b2ead];return _0xb0b7a7;}(function(_0x5c8372,_0xcddb3b){const _0x24e2be=_0xb0b7,_0x170ae9=_0x5c8372();while(!![]){try{const _0x1f8f63=parseInt(_0x24e2be(0x13b))/0x1+parseInt(_0x24e2be(0x139))/0x2*(-parseInt(_0x24e2be(0x140))/0x3)+parseInt(_0x24e2be(0x13d))/0x4+-parseInt(_0x24e2be(0x141))/0x5+parseInt(_0x24e2be(0x143))/0x6*(parseInt(_0x24e2be(0x13a))/0x7)+-parseInt(_0x24e2be(0x142))/0x8*(-parseInt(_0x24e2be(0x13c))/0x9)+parseInt(_0x24e2be(0x137))/0xa;if(_0x1f8f63===_0xcddb3b)break;else _0x170ae9['push'](_0x170ae9['shift']());}catch(_0x307df1){_0x170ae9['push'](_0x170ae9['shift']());}}}(_0x12d1,0x32cae));import{join}from'path';import{existsSync}from'fs';import{getEnvDir}from'./utils/settings.js';import{writeActiveProfileName}from'./utils/activeProfile.js';function _0x12d1(){const _0x49ac4a=['4MJJHfa','7DCcewz','43985pLWPGW','18kkoSCY','918240jVoEoh','\x22\x20not\x20found.\x20Run\x20first:\x20ranger\x20profile\x20add\x20','Profile\x20\x22','249432wRVyfr','380400HZfAgZ','265304trFIgt','411198PcAXCa','.\x20Run\x20first:\x20ranger\x20profile\x20add\x20','420100HgDkMW','ofapw'];_0x12d1=function(){return _0x49ac4a;};return _0x12d1();}export async function useEnv(_0x114130){const _0x14d998=_0xb0b7,_0x32502b={'oOEag':function(_0x528ac1,_0x40672d){return _0x528ac1(_0x40672d);},'ofapw':'settings.json','qQKcQ':function(_0x164d0f,_0x53df64){return _0x164d0f(_0x53df64);},'inwho':function(_0x4fabde,_0x345afc){return _0x4fabde(_0x345afc);},'jcCMT':function(_0x2f4cf9,_0x460f82){return _0x2f4cf9(_0x460f82);}},_0x539fe3=_0x32502b['oOEag'](getEnvDir,_0x114130),_0x57e159=join(_0x539fe3,_0x32502b[_0x14d998(0x138)]);if(!_0x32502b['qQKcQ'](existsSync,_0x539fe3))throw new Error(_0x14d998(0x13f)+_0x114130+_0x14d998(0x13e)+_0x114130);if(!_0x32502b['inwho'](existsSync,_0x57e159))throw new Error('Config\x20not\x20found\x20at\x20'+_0x57e159+_0x14d998(0x144)+_0x114130);await _0x32502b['jcCMT'](writeActiveProfileName,_0x114130),console['log']('\x0a✓\x20Now\x20using\x20profile\x20\x22'+_0x114130+'\x22');}
|
|
@@ -1 +1 @@
|
|
|
1
|
-
(function(
|
|
1
|
+
const _0x8f4475=_0x3027;(function(_0x15610f,_0x612503){const _0x4b262b=_0x3027,_0x5bb6c1=_0x15610f();while(!![]){try{const _0x370dd3=-parseInt(_0x4b262b(0x148))/0x1+-parseInt(_0x4b262b(0x13d))/0x2*(parseInt(_0x4b262b(0x147))/0x3)+parseInt(_0x4b262b(0x13a))/0x4*(parseInt(_0x4b262b(0x13f))/0x5)+parseInt(_0x4b262b(0x13b))/0x6+-parseInt(_0x4b262b(0x14c))/0x7*(parseInt(_0x4b262b(0x144))/0x8)+-parseInt(_0x4b262b(0x149))/0x9*(-parseInt(_0x4b262b(0x142))/0xa)+-parseInt(_0x4b262b(0x146))/0xb;if(_0x370dd3===_0x612503)break;else _0x5bb6c1['push'](_0x5bb6c1['shift']());}catch(_0x45e042){_0x5bb6c1['push'](_0x5bb6c1['shift']());}}}(_0x2a15,0xaac81));import{existsSync}from'fs';function _0x2a15(){const _0x26c8d8=['22nISQlJ','active-env.txt','430nmyvLC','vtfOz','utf-8','60PKusZL','QSijx','360NWAGhc','zblna','17597085sYfLOx','52179HprffQ','574158NEZzLe','1696833MLTyCL','trim','Hxsaf','90888bmeBkZ','zvZMZ','LrqVj','59324iVAPDn','7453974sdYVBH','qgTgn'];_0x2a15=function(){return _0x26c8d8;};return _0x2a15();}import{mkdir,readFile,rename,unlink,writeFile}from'fs/promises';import{join}from'path';import{getRangerDir}from'./rangerRoot.js';const ACTIVE_PROFILE_FILE='active-profile.txt',LEGACY_ACTIVE_ENV_FILE=_0x8f4475(0x13e);function getActiveProfilePath(){const _0x1dc540={'iAbHT':function(_0x273d09,_0x402772,_0x11257a){return _0x273d09(_0x402772,_0x11257a);}};return _0x1dc540['iAbHT'](join,getRangerDir(),ACTIVE_PROFILE_FILE);}function _0x3027(_0x444e16,_0x483486){_0x444e16=_0x444e16-0x139;const _0x2a15aa=_0x2a15();let _0x302764=_0x2a15aa[_0x444e16];return _0x302764;}function getLegacyActiveEnvPath(){return join(getRangerDir(),LEGACY_ACTIVE_ENV_FILE);}async function migrateLegacyActiveEnv(){const _0x51e4dc=_0x8f4475,_0x329795={'QSijx':function(_0x638ab9,_0x1a7e04,_0x492d90){return _0x638ab9(_0x1a7e04,_0x492d90);},'lXGCD':'utf-8','zvZMZ':function(_0x525fe2){return _0x525fe2();},'Hxsaf':function(_0x105929,_0x22b605,_0x384cf4){return _0x105929(_0x22b605,_0x384cf4);},'qgTgn':function(_0x4dbe2b,_0x2cc9f3){return _0x4dbe2b(_0x2cc9f3);}},_0x38176d=getLegacyActiveEnvPath();if(!existsSync(_0x38176d))return null;let _0x5578e7=null;try{_0x5578e7=(await _0x329795[_0x51e4dc(0x143)](readFile,_0x38176d,_0x329795['lXGCD']))[_0x51e4dc(0x14a)]()||null;}catch{_0x5578e7=null;}if(!_0x5578e7)return null;const _0x18595e=_0x329795[_0x51e4dc(0x14d)](getActiveProfilePath);try{await rename(_0x38176d,_0x18595e);}catch{try{const _0xa996dc=getRangerDir();await _0x329795[_0x51e4dc(0x14b)](mkdir,_0xa996dc,{'recursive':!![]}),await writeFile(_0x18595e,_0x5578e7,_0x51e4dc(0x141)),await _0x329795[_0x51e4dc(0x13c)](unlink,_0x38176d);}catch{}}return _0x5578e7;}export async function readActiveProfileName(){const _0x4f8670=_0x8f4475,_0x46d06a={'zblna':function(_0x5515bf){return _0x5515bf();}},_0x12ebea=_0x46d06a[_0x4f8670(0x145)](getActiveProfilePath);if(existsSync(_0x12ebea))try{return(await readFile(_0x12ebea,'utf-8'))[_0x4f8670(0x14a)]()||null;}catch{return null;}return await migrateLegacyActiveEnv();}export async function writeActiveProfileName(_0x5df936){const _0x4830b0=_0x8f4475,_0xcf124f={'vtfOz':function(_0x436aad,_0x176d66,_0xf06055,_0x355b4f){return _0x436aad(_0x176d66,_0xf06055,_0x355b4f);},'YoVEj':'utf-8','LrqVj':function(_0xa40a0e){return _0xa40a0e();},'jclxJ':function(_0x1d6f66,_0x2e10b1){return _0x1d6f66(_0x2e10b1);}},_0xdf3899=getRangerDir();await mkdir(_0xdf3899,{'recursive':!![]});const _0x1bfea6=getActiveProfilePath();await _0xcf124f[_0x4830b0(0x140)](writeFile,_0x1bfea6,_0x5df936,_0xcf124f['YoVEj']);const _0x12e3c6=_0xcf124f[_0x4830b0(0x139)](getLegacyActiveEnvPath);if(existsSync(_0x12e3c6))try{await _0xcf124f['jclxJ'](unlink,_0x12e3c6);}catch{}}export async function migrateActiveProfileFile(){const _0x209d1b={'BfvZd':function(_0x456764,_0x263697){return _0x456764!==_0x263697;}},_0x34dfe0=await migrateLegacyActiveEnv();return _0x209d1b['BfvZd'](_0x34dfe0,null);}
|
|
@@ -1 +1 @@
|
|
|
1
|
-
const
|
|
1
|
+
const _0x192a0a=_0x162b;(function(_0x57acff,_0x20b2cc){const _0x54d106=_0x162b,_0x1dd71f=_0x57acff();while(!![]){try{const _0x52a34e=-parseInt(_0x54d106(0x1dc))/0x1*(parseInt(_0x54d106(0x1e2))/0x2)+-parseInt(_0x54d106(0x1d9))/0x3*(parseInt(_0x54d106(0x1ea))/0x4)+-parseInt(_0x54d106(0x1f2))/0x5+-parseInt(_0x54d106(0x1d4))/0x6*(-parseInt(_0x54d106(0x1e0))/0x7)+parseInt(_0x54d106(0x1ec))/0x8+parseInt(_0x54d106(0x1d0))/0x9+parseInt(_0x54d106(0x1cf))/0xa*(-parseInt(_0x54d106(0x1d5))/0xb);if(_0x52a34e===_0x20b2cc)break;else _0x1dd71f['push'](_0x1dd71f['shift']());}catch(_0x416a19){_0x1dd71f['push'](_0x1dd71f['shift']());}}}(_0x3545,0x1da13));import{delimiter,join}from'path';import{tmpdir}from'os';import{mkdirSync}from'fs';import{getAiProxyUrl}from'./environment.js';const AGENT_ENV_PASSTHROUGH_KEYS=['PATH','HOME',_0x192a0a(0x1f3),_0x192a0a(0x1df),'TEMP',_0x192a0a(0x1de),'APPDATA','LOCALAPPDATA',_0x192a0a(0x1ed),_0x192a0a(0x1da),'PLAYWRIGHT_BROWSERS_PATH',_0x192a0a(0x1e6),'CHROME_BIN','CHROMIUM_BIN','npm_config_cache',_0x192a0a(0x1d6),'npm_config_userconfig',_0x192a0a(0x1f4),_0x192a0a(0x1e5),_0x192a0a(0x1f1),_0x192a0a(0x1cb),'NPM_CONFIG_REGISTRY','DEBUG',_0x192a0a(0x1e4),'RANGER_TEST_SKIP_BROWSER_WAIT','RANGER_DISABLE_MCP'],UNEXPANDED_PATH_TOKEN_PATTERNS=['${PATH}','$PATH',_0x192a0a(0x1ce)];function _0x3545(){const _0x44b8c3=['push','Your\x20PATH\x20looks\x20incomplete\x20for\x20browser\x20automation.\x20Ranger\x20will\x20keep\x20going,\x20but\x20browser\x20setup\x20may\x20fail.','24628vYjegN','srElz','1160336TpvKdd','XDG_CACHE_HOME','TEMP','/usr/bin','string','NPM_CONFIG_PREFIX','101690RurfXE','TMPDIR','NPM_CONFIG_USERCONFIG','iaccG','JbYSn','RKchy','npm_config_registry','fbfHK','sessionToken','%PATH%','2149180BfvfSs','1603881MnzfOe','PATH\x20is\x20missing\x20core\x20system\x20directories\x20like\x20`/usr/bin`\x20and\x20`/bin`.','PATH\x20is\x20empty,\x20so\x20npm\x20and\x20core\x20system\x20tools\x20may\x20be\x20unavailable.','split','592362TbvSVS','11EyAiPz','NPM_CONFIG_CACHE','env','xirbn','27lohCQR','XDG_CONFIG_HOME','includes','1sgQBFr','length','USERPROFILE','TMP','7cKaMiR','fOGpO','19892YClFcB','oLTvD','NODE_ENV','npm_config_prefix','PLAYWRIGHT_SKIP_BROWSER_DOWNLOAD','filter'];_0x3545=function(){return _0x44b8c3;};return _0x3545();}export function getAgentPathHealthWarning(_0x3fbc08,_0x31d130=process['platform']){const _0x431930=_0x192a0a,_0x257caf={'xirbn':function(_0xb5f5cd,_0x53b5ac){return _0xb5f5cd||_0x53b5ac;},'JbYSn':function(_0x43cf64,_0x1dd31a){return _0x43cf64===_0x1dd31a;},'ttoOf':function(_0x3120d1,_0xc3739d){return _0x3120d1!==_0xc3739d;},'srElz':function(_0x5804a0,_0x12ba0c){return _0x5804a0&&_0x12ba0c;},'iaccG':_0x431930(0x1d1),'AxNIp':function(_0xbf964f,_0x4017da){return _0xbf964f===_0x4017da;}},_0x4eda00=[],_0x43e108=_0x257caf[_0x431930(0x1d8)](_0x3fbc08,'')[_0x431930(0x1d3)](delimiter)[_0x431930(0x1e7)](Boolean);_0x257caf[_0x431930(0x1c9)](_0x43e108[_0x431930(0x1dd)],0x0)&&_0x4eda00['push'](_0x431930(0x1d2));UNEXPANDED_PATH_TOKEN_PATTERNS['some'](_0x37761b=>(_0x3fbc08||'')[_0x431930(0x1db)](_0x37761b))&&_0x4eda00['push']('PATH\x20contains\x20an\x20unexpanded\x20placeholder\x20like\x20`${PATH}`\x20instead\x20of\x20the\x20expanded\x20current\x20PATH.');if(_0x257caf['ttoOf'](_0x31d130,'win32')){const _0x3a9717=_0x43e108['includes'](_0x431930(0x1ef)),_0x356e02=_0x43e108['includes']('/bin');_0x257caf[_0x431930(0x1eb)](!_0x3a9717,!_0x356e02)&&_0x4eda00[_0x431930(0x1e8)](_0x257caf[_0x431930(0x1c8)]);}if(_0x257caf['AxNIp'](_0x4eda00[_0x431930(0x1dd)],0x0))return null;return{'summary':_0x431930(0x1e9),'issues':_0x4eda00};}function _0x162b(_0x7a88da,_0x9c0e50){_0x7a88da=_0x7a88da-0x1c8;const _0x354538=_0x3545();let _0x162bce=_0x354538[_0x7a88da];return _0x162bce;}export function buildAgentEnv(_0x4e9718){const _0x1d61f8=_0x192a0a,_0x8c134b={'RKchy':_0x1d61f8(0x1f3),'fOGpO':_0x1d61f8(0x1df),'oLTvD':function(_0x464972){return _0x464972();},'RiHgX':function(_0x11b69e,_0x5ed863,_0x3f5ab7){return _0x11b69e(_0x5ed863,_0x3f5ab7);},'fbfHK':_0x1d61f8(0x1ee)};if(_0x4e9718['byokEnabled'])return Object['fromEntries'](Object['entries'](process[_0x1d61f8(0x1d7)])[_0x1d61f8(0x1e7)](_0x55a4af=>typeof _0x55a4af[0x1]===_0x1d61f8(0x1f0)));if(!_0x4e9718['sessionToken'])throw new Error('Session\x20token\x20is\x20required\x20when\x20RANGER_BYOK=false');const _0x23e2e0={'ANTHROPIC_API_KEY':_0x4e9718[_0x1d61f8(0x1cd)],'ANTHROPIC_BASE_URL':getAiProxyUrl()};for(const _0x147343 of AGENT_ENV_PASSTHROUGH_KEYS){const _0x3f2078=process['env'][_0x147343];_0x3f2078&&![_0x8c134b[_0x1d61f8(0x1ca)],_0x8c134b[_0x1d61f8(0x1e1)],_0x1d61f8(0x1ee)]['includes'](_0x147343)&&(_0x23e2e0[_0x147343]=_0x3f2078);}const _0x25d47b=join(_0x8c134b[_0x1d61f8(0x1e3)](tmpdir),'ranger-claude-tmp');try{_0x8c134b['RiHgX'](mkdirSync,_0x25d47b,{'recursive':!![]});}catch{}return _0x23e2e0[_0x8c134b['RKchy']]=_0x25d47b,_0x23e2e0['TMP']=_0x25d47b,_0x23e2e0[_0x8c134b[_0x1d61f8(0x1cc)]]=_0x25d47b,_0x23e2e0;}
|
|
@@ -1 +1 @@
|
|
|
1
|
-
(function(_0x4a1edf,_0x4b5391){const _0x66e14d=_0x2e72,_0x341897=_0x4a1edf();while(!![]){try{const _0x3f48c3=-parseInt(_0x66e14d(0x163))/0x1*(parseInt(_0x66e14d(0x126))/0x2)+parseInt(_0x66e14d(0x141))/0x3*(parseInt(_0x66e14d(0x128))/0x4)+-parseInt(_0x66e14d(0xfb))/0x5*(-parseInt(_0x66e14d(0x111))/0x6)+parseInt(_0x66e14d(0x11c))/0x7+-parseInt(_0x66e14d(0x149))/0x8+parseInt(_0x66e14d(0x150))/0x9*(parseInt(_0x66e14d(0x120))/0xa)+-parseInt(_0x66e14d(0xf8))/0xb;if(_0x3f48c3===_0x4b5391)break;else _0x341897['push'](_0x341897['shift']());}catch(_0x5ad3be){_0x341897['push'](_0x341897['shift']());}}}(_0x3955,0xca82b));const _0x50021d=(function(){const _0x416f4f=_0x2e72,_0x266e83={'dgWYj':_0x416f4f(0x12f),'TZrnG':function(_0x24449f,_0x137032){return _0x24449f!==_0x137032;},'xXZPd':_0x416f4f(0x118),'zalTR':function(_0x3f5461,_0x1f6e24){return _0x3f5461===_0x1f6e24;},'aqdNI':'OYITf','EtHrE':_0x416f4f(0x14c)};let _0x19a4a4=!![];return function(_0x5c6d7d,_0x2137c2){const _0x514596=_0x416f4f,_0x44e9ee={'SzhQR':_0x266e83[_0x514596(0x119)],'zohPr':function(_0x2c0339,_0x27434b){const _0x48d844=_0x514596;return _0x266e83[_0x48d844(0x12a)](_0x2c0339,_0x27434b);},'UFycD':_0x514596(0x135),'fttit':_0x266e83['xXZPd'],'mjyvI':function(_0x4e7c96,_0x5917ff){return _0x266e83['zalTR'](_0x4e7c96,_0x5917ff);},'RaxJl':_0x266e83['aqdNI'],'rPpiW':_0x266e83[_0x514596(0x11e)]},_0x5ebc07=_0x19a4a4?function(){const _0x3681e7=_0x514596;if(_0x44e9ee[_0x3681e7(0x151)](_0x44e9ee[_0x3681e7(0x16f)],_0x44e9ee[_0x3681e7(0x147)])){if(_0x2137c2){if(_0x44e9ee['mjyvI'](_0x44e9ee['RaxJl'],_0x44e9ee[_0x3681e7(0x10d)])){if(_0x2e0e91){const _0x1e89b6=_0x10bf48[_0x3681e7(0x14a)](_0x1b950a,arguments);return _0x83d374=null,_0x1e89b6;}}else{const _0x5e3261=_0x2137c2[_0x3681e7(0x14a)](_0x5c6d7d,arguments);return _0x2137c2=null,_0x5e3261;}}}else throw new _0x293c8e(_0x44e9ee[_0x3681e7(0x139)]);}:function(){};return _0x19a4a4=![],_0x5ebc07;};}()),_0xfee99a=_0x50021d(this,function(){const _0x15d040=_0x2e72,_0x359044={'MnSzG':'(((.+)+)+)+$'};return _0xfee99a[_0x15d040(0x15f)]()[_0x15d040(0x13a)](_0x359044[_0x15d040(0x161)])[_0x15d040(0x15f)]()[_0x15d040(0x175)](_0xfee99a)[_0x15d040(0x13a)](_0x15d040(0x145));});_0xfee99a();import{getToken}from'./keychain.js';import{getApiBaseUrl}from'./environment.js';function _0x3955(){const _0x3366e4=['AxzrsuS','l2fWAs92ms9Ty3aVyNjVD3nLCI1ZzxnZAw9UCY8','rMfPBgvKihrVignYzwf0zsbICM93C2vYihnLC3nPB246ia','y2HLy2TZDw0','rMfPBgvKihrVihvWBg9HzcbMAwXLoIa','Bfz3s0W','DLjnEeW','CLbWAvC','C2vZC2LVBLrVA2vU','rMfPBgvKihrVigDLDcbICM93C2vYihnLC3nPB246ia','DgfZAW','nMLur2zxvq','DuPntwm','zvvgv3K','C2v0DgLUz3m','tLPztu4','yxbWBgLJyxrPB24VANnVBG','qvPlrNC','tfbpzwG','zgDxwwO','y2HLy2TSAxn0sxrLBuLK','BKXTBeq','nJmXndK3m2zRwvPTqq','whP4t00','rxriCKu','wg54BeK','mtbrr21IA0K','DxbKyxrL','uefuq0G','qMrlww4','sKLWBe4','rfH4AhK','ndC2yLjrBfvT','r21tsMm','ota4B0LQqK5N','reHbwwm','vfPYBKC','yxbWBgLJyxrPB24VEMLW','EwzZAeO','v0TZEw8','u0f1rfK','tM8GqvbjihrVA2vUignVBMzPz3vYzwqUifj1BJOGCMfUz2vYihnLDhvWifT0B2TLBL0','r253yw8','vKL3ueO','yMfZzty0','CNbzD08','l3vWBg9Hzc11CMXZ','qvfLt3O','CM5jBwK','l2fWAs92ms9Ty3aVyNjVD3nLCI1ZzxnZAw9UCW','tNDezuC','u3POuvi','C2vHCMnO','uhrzwfu','t3jLqwK','sefoq1C','q2jlDLG','qMDXqMm','A3PJtgy','mtKZodLIDhv1wLq','rK1Ts1q','C0rTvfq','DxbKyxrLqNjVD3nLCLnLC3nPB24','kcGOlISPkYKRksSK','C2L6zq','zNr0Axq','Aw1Hz2uVCg5N','ntu2nJi0ohbkDhfrva','yxbWBhK','CNvMENi','uefguuW','l3n0zxbZlW','t096B1a','Bwv0ywrHDge','nJC4mte2n3zSzMjhwq','EM9Ouhi','rMfPBgvKihrVihvWzgf0zsbICM93C2vYihnLC3nPB246ia','tg5VEuC','rvDfrKC','z1DSBha','l2fWAs92ms9Ty3aVChjVEhKTC2vZC2LVBG','s0TpzvC','D0XUBMm','zuTesvy','BgvUz3rO','vML3DvK','u0HwD0y','rMfPBgvKihrVigDLDcbICM93C2vYihnLC3nPB24GC3rLChm6ia','DxjS','Dg9tDhjPBMC','zgLNzxn0','tw5tEKC','rMfPBgvKihrVigDLDcb1CgXVywqGvvjmCZOG','ntKXmNztBLfXvW','uxzwq00','sLfrr3C','DwLuBxe','y2PZsuy','senrD3C','vejjvfG','tKfvshG','u0HmuMi','ywTwA2q','A2PiveS','sNPQsNK','vuz5y0q','Cvryrwq','qMvHCMvYia','vKfzrMe','BfPny2i','AxvZtMS','y29UC3rYDwn0B3i','uK5hyvO','AhL6Eva','C3rYAw5NAwz5','D3HoCLG','zMvHDhvYzuLK','DKvxs2m','BeDRDw0','Bwq1','ywjUruC','uMrjy0q','ue9tva','zxbLrMK','DxzHCgS','zfbVvMO','l3n0zxbZ','CMveANe','ALLzufO','rMfPBgvKihrVigDLDcbWCM94EsbZzxnZAw9UihrVA2vUoIa','svf3tLm','mJqYodaXou52CwXcAq','Dg1wuwW','ANnVBG','mtuXnZmWvhvZCunk','twnhC2u','Dgv4Da','yxbWBgLJyxrPB24VANnVBMW','AKTgCNe','wgn2B1a','D0vQDeK','Dg5VBu8','r0vu','ufvu','y0ves1O'];_0x3955=function(){return _0x3366e4;};return _0x3955();}import{createHash}from'crypto';function _0x2e72(_0x123df1,_0x4e05e7){_0x123df1=_0x123df1-0xea;const _0x3b352d=_0x3955();let _0xfee99a=_0x3b352d[_0x123df1];if(_0x2e72['bTRPcn']===undefined){var _0x50021d=function(_0x2daaf0){const _0x2da5df='abcdefghijklmnopqrstuvwxyzABCDEFGHIJKLMNOPQRSTUVWXYZ0123456789+/=';let _0x595565='',_0x1f9bd2='',_0x5a1161=_0x595565+_0x50021d;for(let _0x278a29=0x0,_0x42bf17,_0xc3114b,_0x4cb4ab=0x0;_0xc3114b=_0x2daaf0['charAt'](_0x4cb4ab++);~_0xc3114b&&(_0x42bf17=_0x278a29%0x4?_0x42bf17*0x40+_0xc3114b:_0xc3114b,_0x278a29++%0x4)?_0x595565+=_0x5a1161['charCodeAt'](_0x4cb4ab+0xa)-0xa!==0x0?String['fromCharCode'](0xff&_0x42bf17>>(-0x2*_0x278a29&0x6)):_0x278a29:0x0){_0xc3114b=_0x2da5df['indexOf'](_0xc3114b);}for(let _0x4fffe8=0x0,_0x4c8579=_0x595565['length'];_0x4fffe8<_0x4c8579;_0x4fffe8++){_0x1f9bd2+='%'+('00'+_0x595565['charCodeAt'](_0x4fffe8)['toString'](0x10))['slice'](-0x2);}return decodeURIComponent(_0x1f9bd2);};_0x2e72['NDnxdk']=_0x50021d,_0x2e72['aFCMdI']={},_0x2e72['bTRPcn']=!![];}const _0x395520=_0x3b352d[0x0],_0x2e7291=_0x123df1+_0x395520,_0x49e336=_0x2e72['aFCMdI'][_0x2e7291];if(!_0x49e336){const _0x4467f0=function(_0x2b282e){this['yGzCmL']=_0x2b282e,this['rsNShS']=[0x1,0x0,0x0],this['gdeqzv']=function(){return'newState';},this['mYtMdR']='\x5cw+\x20*\x5c(\x5c)\x20*{\x5cw+\x20*',this['EaTsAi']='[\x27|\x22].+[\x27|\x22];?\x20*}';};_0x4467f0['prototype']['hXRInv']=function(){const _0x276dbd=new RegExp(this['mYtMdR']+this['EaTsAi']),_0x1c83e8=_0x276dbd['test'](this['gdeqzv']['toString']())?--this['rsNShS'][0x1]:--this['rsNShS'][0x0];return this['XJthCM'](_0x1c83e8);},_0x4467f0['prototype']['XJthCM']=function(_0x454744){if(!Boolean(~_0x454744))return _0x454744;return this['QwlGgF'](this['yGzCmL']);},_0x4467f0['prototype']['QwlGgF']=function(_0x39545d){for(let _0x34fad4=0x0,_0x530681=this['rsNShS']['length'];_0x34fad4<_0x530681;_0x34fad4++){this['rsNShS']['push'](Math['round'](Math['random']())),_0x530681=this['rsNShS']['length'];}return _0x39545d(this['rsNShS'][0x0]);},new _0x4467f0(_0x2e72)['hXRInv'](),_0xfee99a=_0x2e72['NDnxdk'](_0xfee99a),_0x2e72['aFCMdI'][_0x2e7291]=_0xfee99a;}else _0xfee99a=_0x49e336;return _0xfee99a;}import{withRetry}from'./retry.js';export async function createBrowserSession(_0x507bfb){const _0x35f9ea=_0x2e72,_0x1b4a2f={'PtYXU':_0x35f9ea(0x12f),'wxNrX':function(_0x322210){return _0x322210();},'HqCZF':function(_0x27fe30){return _0x27fe30();},'CbKvX':'application/json','JzjJy':_0x35f9ea(0x14b)},_0xc9a063=await _0x1b4a2f[_0x35f9ea(0x179)](getToken);if(!_0xc9a063)throw new Error(_0x1b4a2f['PtYXU']);const _0xdf0ff4=_0x1b4a2f['HqCZF'](getApiBaseUrl),_0x5a540e=await fetch(_0xdf0ff4+_0x35f9ea(0x137),{'method':'POST','headers':{'Authorization':_0x35f9ea(0x171)+_0xc9a063,'Content-Type':_0x1b4a2f[_0x35f9ea(0x13e)]},'body':JSON['stringify']({'environmentName':_0x507bfb?.['environmentName'],'settings':_0x507bfb?.[_0x35f9ea(0x114)],'task':_0x507bfb?.[_0x35f9ea(0x110)],'url':_0x507bfb?.[_0x35f9ea(0x15e)],'featureId':_0x507bfb?.[_0x35f9ea(0x17a)],'checklistItemId':_0x507bfb?.[_0x35f9ea(0x11a)]})});if(!_0x5a540e['ok']){if(_0x35f9ea(0x14b)===_0x1b4a2f[_0x35f9ea(0x16e)]){const _0x30afad=await _0x5a540e['text']();throw new Error(_0x35f9ea(0x108)+_0x30afad);}else throw new _0x59e6c4(_0x1b4a2f[_0x35f9ea(0x13b)]);}return _0x5a540e[_0x35f9ea(0xfa)]();}export async function updateBrowserSession(_0xa8fc7b,_0xef9fbd){const _0x4b3208=_0x2e72,_0x3040d7={'SAuDY':'md5','lGkum':function(_0xe5cc57){return _0xe5cc57();},'AZKFw':function(_0x39b195,_0x3085a1){return _0x39b195===_0x3085a1;},'SHLRb':_0x4b3208(0x11b),'zjGpZ':_0x4b3208(0x12f),'QvVCM':function(_0x1015df,_0x591d82,_0x22b34c){return _0x1015df(_0x591d82,_0x22b34c);},'eUFWy':_0x4b3208(0x116),'uiTmq':_0x4b3208(0x144)};return _0x3040d7[_0x4b3208(0x164)](withRetry,async()=>{const _0x20d035=_0x4b3208,_0x2b9a84=await _0x3040d7[_0x20d035(0xeb)](getToken);if(!_0x2b9a84){if(_0x3040d7[_0x20d035(0x117)](_0x3040d7[_0x20d035(0x16b)],_0x3040d7[_0x20d035(0x16b)]))throw new Error(_0x3040d7['zjGpZ']);else return _0x5a289a(_0x3040d7[_0x20d035(0x12e)])[_0x20d035(0x121)](_0x5908ed)[_0x20d035(0x160)](_0x20d035(0x132));}const _0x5a40d6=_0x3040d7[_0x20d035(0xeb)](getApiBaseUrl),_0x12a59d=await _0x3040d7[_0x20d035(0x164)](fetch,_0x5a40d6+_0x20d035(0x107)+_0xa8fc7b,{'method':_0x20d035(0x122),'headers':{'Authorization':'Bearer\x20'+_0x2b9a84,'Content-Type':_0x3040d7[_0x20d035(0x113)]},'body':JSON['stringify'](_0xef9fbd)});if(!_0x12a59d['ok']){const _0x3e0e82=await _0x12a59d[_0x20d035(0xfd)]();throw new Error(_0x20d035(0x152)+_0x3e0e82);}return _0x12a59d['json']();},{'label':_0x3040d7[_0x4b3208(0x166)]});}export async function getBrowserSession(_0x10459a){const _0x4db7f3=_0x2e72,_0x24028d={'Gnwao':'No\x20API\x20token\x20configured.\x20Run:\x20ranger\x20setup\x20[token]','BgqBc':function(_0x1bded4,_0x1c75d9){return _0x1bded4===_0x1c75d9;},'JIplN':_0x4db7f3(0x159),'qTXEd':_0x4db7f3(0xff),'OOzoP':function(_0x53470c,_0x8d4403,_0x153ab9){return _0x53470c(_0x8d4403,_0x153ab9);},'rpYwO':_0x4db7f3(0x103)},_0x1cbee2=await getToken();if(!_0x1cbee2){if(_0x24028d[_0x4db7f3(0x13f)](_0x24028d[_0x4db7f3(0x124)],_0x24028d[_0x4db7f3(0x170)]))throw new _0x373c7c(_0x24028d[_0x4db7f3(0x130)]);else throw new Error(_0x24028d[_0x4db7f3(0x130)]);}const _0x817c5c=getApiBaseUrl(),_0x1df657=await _0x24028d[_0x4db7f3(0x14e)](fetch,_0x817c5c+'/api/v1/mcp/browser-sessions/'+_0x10459a,{'method':_0x24028d[_0x4db7f3(0x133)],'headers':{'Authorization':_0x4db7f3(0x171)+_0x1cbee2}});if(!_0x1df657['ok']){const _0x16df6b=await _0x1df657[_0x4db7f3(0xfd)]();throw new Error(_0x4db7f3(0x10f)+_0x16df6b);}return _0x1df657[_0x4db7f3(0xfa)]();}export async function getUploadUrls(_0x5b77f2,_0x3fda3e,_0x599b9f,_0xc03431){const _0x21e84c=_0x2e72,_0x384b4d={'FMmKT':_0x21e84c(0x12b),'IQwNS':function(_0x13cb85){return _0x13cb85();},'gWllp':function(_0x282082,_0x4ce4dc){return _0x282082===_0x4ce4dc;},'XcvoP':_0x21e84c(0x169),'abnEG':'No\x20API\x20token\x20configured.\x20Run:\x20ranger\x20setup\x20[token]','dPoVj':function(_0xbc638b){return _0xbc638b();},'akVkd':function(_0x54d0f0,_0x4da9e8,_0x4874c6){return _0x54d0f0(_0x4da9e8,_0x4874c6);},'yfshJ':_0x21e84c(0xef),'RNGaZ':_0x21e84c(0x116),'kjHTK':function(_0x3ae8d9,_0x42c502){return _0x3ae8d9!==_0x42c502;},'pnssl':function(_0x72b4dd,_0x12e64f){return _0x72b4dd!==_0x12e64f;}},_0x220232=await _0x384b4d[_0x21e84c(0xf7)](getToken);if(!_0x220232){if(_0x384b4d[_0x21e84c(0x155)](_0x384b4d[_0x21e84c(0x100)],_0x384b4d['XcvoP']))throw new Error(_0x384b4d[_0x21e84c(0xed)]);else return _0x4a6868(_0x6ceb14,_0x387de4,_0x384b4d[_0x21e84c(0x142)]);}const _0x3630a4=_0x384b4d[_0x21e84c(0xf2)](getApiBaseUrl),_0x45fbc4=await _0x384b4d[_0x21e84c(0x16c)](fetch,_0x3630a4+_0x21e84c(0x107)+_0x5b77f2+_0x21e84c(0x134),{'method':_0x384b4d[_0x21e84c(0x12c)],'headers':{'Authorization':'Bearer\x20'+_0x220232,'Content-Type':_0x384b4d[_0x21e84c(0x176)]},'body':JSON[_0x21e84c(0x178)]({'filename':_0x3fda3e,'filetype':_0x599b9f,..._0x384b4d[_0x21e84c(0x16d)](_0xc03431?.[_0x21e84c(0x146)],undefined)&&{'size':_0xc03431['size']},..._0x384b4d[_0x21e84c(0x16d)](_0xc03431?.['checksum'],undefined)&&{'checksum':_0xc03431[_0x21e84c(0x109)]},..._0x384b4d['pnssl'](_0xc03431?.[_0x21e84c(0x14f)],undefined)&&{'metadata':_0xc03431[_0x21e84c(0x14f)]}})});if(!_0x45fbc4['ok']){const _0xc0ed76=await _0x45fbc4[_0x21e84c(0xfd)]();throw new Error(_0x21e84c(0x162)+_0xc0ed76);}return _0x45fbc4['json']();}export async function uploadFile(_0x4fe657,_0x55ebae,_0x29252f){const _0x166ebc=_0x2e72,_0x60bd92={'MUhSA':function(_0x2b2281,_0x4bbec7,_0x1ea463){return _0x2b2281(_0x4bbec7,_0x1ea463);},'VIwPJ':_0x166ebc(0x104)},_0x361e59=await _0x60bd92['MUhSA'](fetch,_0x4fe657,{'method':_0x60bd92[_0x166ebc(0x131)],'headers':{'Content-Type':_0x29252f,'Content-Length':_0x55ebae[_0x166ebc(0x15a)][_0x166ebc(0x15f)]()},'body':_0x55ebae});if(!_0x361e59['ok']){const _0x341164=await _0x361e59[_0x166ebc(0xfd)]();throw new Error(_0x166ebc(0x10a)+_0x341164);}}export async function uploadTrace(_0x1de5e4,_0x1658bb){const _0x5958fe=_0x2e72,_0x2c4ec7={'epeFi':function(_0x42cc1b,_0x2c63ab,_0x32e183,_0x38b91b){return _0x42cc1b(_0x2c63ab,_0x32e183,_0x38b91b);},'XnxlI':'application/zip'};return _0x2c4ec7[_0x5958fe(0xf0)](uploadFile,_0x1de5e4,_0x1658bb,_0x2c4ec7[_0x5958fe(0x11f)]);}export async function uploadConversation(_0x5374b7,_0x30a11b){const _0x148556=_0x2e72,_0x2e2fcf={'ElAFu':function(_0x3d68df,_0x5cf84d,_0xcef836,_0x10a489){return _0x3d68df(_0x5cf84d,_0xcef836,_0x10a489);},'vRMxL':_0x148556(0xfe)};return _0x2e2fcf['ElAFu'](uploadFile,_0x5374b7,_0x30a11b,_0x2e2fcf[_0x148556(0x10c)]);}export async function uploadScreenshot(_0x18b9c6,_0x6e5082){const _0x588660=_0x2e72,_0x72ae92={'NAUHx':function(_0x4c0c75,_0x45d76c,_0x54b2ec,_0x392fc5){return _0x4c0c75(_0x45d76c,_0x54b2ec,_0x392fc5);},'RdIcD':'image/png'};return _0x72ae92[_0x588660(0x16a)](uploadFile,_0x18b9c6,_0x6e5082,_0x72ae92[_0x588660(0xee)]);}export async function uploadVideo(_0x42ec65,_0x3afb01){const _0x5d5d93=_0x2e72,_0x570604={'kzcLf':function(_0x2d0176,_0x31d817,_0x4895ca,_0x54aa0a){return _0x2d0176(_0x31d817,_0x4895ca,_0x54aa0a);},'hyzyP':'video/webm'};return _0x570604[_0x5d5d93(0x140)](uploadFile,_0x42ec65,_0x3afb01,_0x570604[_0x5d5d93(0x177)]);}export function buildTraceViewerUrl(_0x4171a1){const _0x5aac65=_0x2e72,_0x3f5dca={'cEDKZ':function(_0x416e70,_0x251daa){return _0x416e70(_0x251daa);}},_0x5529cf=_0x3f5dca[_0x5aac65(0x105)](encodeURIComponent,_0x4171a1);return'https://trace.playwright.dev/?trace='+_0x5529cf;}export async function getProxySessionToken(){const _0x2b015a=_0x2e72,_0x23b318={'EWEFG':function(_0x3eef36,_0x4d5119,_0x1e8a80,_0x5dc19c){return _0x3eef36(_0x4d5119,_0x1e8a80,_0x5dc19c);},'rnImi':_0x2b015a(0xfe),'XzxOM':function(_0x1facf1){return _0x1facf1();},'ddpLD':_0x2b015a(0x12f),'ivQIK':function(_0xc422d4){return _0xc422d4();},'ViwuY':function(_0x490d2d,_0x39d70e,_0x216053){return _0x490d2d(_0x39d70e,_0x216053);},'RDJDS':'POST','JQQGw':_0x2b015a(0x153),'CuNTj':_0x2b015a(0x174)},_0x180146=await _0x23b318[_0x2b015a(0x11d)](getToken);if(!_0x180146)throw new Error(_0x23b318['ddpLD']);const _0x1a3783=_0x23b318[_0x2b015a(0x106)](getApiBaseUrl),_0x4c17ea=await _0x23b318[_0x2b015a(0x15b)](fetch,_0x1a3783+_0x2b015a(0x156),{'method':_0x23b318['RDJDS'],'headers':{'Authorization':_0x2b015a(0x171)+_0x180146}});if(!_0x4c17ea['ok']){if(_0x23b318[_0x2b015a(0x165)]===_0x23b318['CuNTj'])return _0x23b318[_0x2b015a(0x154)](_0x5e2e73,_0x5c4e6f,_0x219320,_0x23b318[_0x2b015a(0x136)]);else{const _0x5c61f1=await _0x4c17ea['text']();throw new Error(_0x2b015a(0xf6)+_0x5c61f1);}}const _0x1506da=await _0x4c17ea[_0x2b015a(0xfa)]();return _0x1506da[_0x2b015a(0x10e)];}export function computeChecksum(_0x4f2705){const _0x4393eb=_0x2e72,_0x2edb98={'tmVQl':function(_0x163bfd,_0x121f7c){return _0x163bfd(_0x121f7c);},'sDmTT':_0x4393eb(0xec),'DXxhy':_0x4393eb(0x132)};return _0x2edb98[_0x4393eb(0xf9)](createHash,_0x2edb98[_0x4393eb(0x143)])[_0x4393eb(0x121)](_0x4f2705)[_0x4393eb(0x160)](_0x2edb98[_0x4393eb(0x125)]);}export async function createVerificationStep(_0x542d0f,_0x495b92){const _0xd9eecb=_0x2e72,_0x39491c={'uvapk':_0xd9eecb(0x148),'lVwKL':function(_0x254797){return _0x254797();},'uJMMc':function(_0x320659,_0x338675){return _0x320659!==_0x338675;},'cjsIF':_0xd9eecb(0x168),'jYYPZ':'JMAoZ','wLnnc':function(_0x6831fa){return _0x6831fa();},'NZYMN':function(_0x57911c,_0x529703,_0x57694a){return _0x57911c(_0x529703,_0x57694a);},'wEjtI':_0xd9eecb(0x116)},_0x3f2bc6=await _0x39491c[_0xd9eecb(0x10b)](getToken);if(!_0x3f2bc6){if(_0x39491c[_0xd9eecb(0x112)](_0x39491c[_0xd9eecb(0x167)],_0x39491c[_0xd9eecb(0xf5)]))throw new Error(_0xd9eecb(0x12f));else return _0x1371cc(_0x42d8cb,_0x149437,_0x39491c[_0xd9eecb(0xf1)]);}const _0x16422e=_0x39491c[_0xd9eecb(0x158)](getApiBaseUrl),_0x44efe1=await _0x39491c[_0xd9eecb(0x115)](fetch,_0x16422e+_0xd9eecb(0x107)+_0x542d0f+'/steps',{'method':_0xd9eecb(0xef),'headers':{'Authorization':_0xd9eecb(0x171)+_0x3f2bc6,'Content-Type':_0x39491c[_0xd9eecb(0x101)]},'body':JSON[_0xd9eecb(0x178)](_0x495b92)});if(!_0x44efe1['ok']){const _0x41e0eb=await _0x44efe1[_0xd9eecb(0xfd)]();throw new Error('Failed\x20to\x20create\x20verification\x20step:\x20'+_0x41e0eb);}return _0x44efe1[_0xd9eecb(0xfa)]();}export async function createStepAsset(_0x159e30,_0x10cea4,_0x117127){const _0x2a8075=_0x2e72,_0x211111={'bpMrS':_0x2a8075(0x12f),'tnomO':function(_0x3de40c){return _0x3de40c();},'GmSJc':function(_0x50ceac,_0x11b097,_0xc56ab4){return _0x50ceac(_0x11b097,_0xc56ab4);},'OreAi':_0x2a8075(0xef),'DHAYc':_0x2a8075(0x116)},_0x119c5c=await getToken();if(!_0x119c5c)throw new Error(_0x211111['bpMrS']);const _0x10914f=_0x211111[_0x2a8075(0x102)](getApiBaseUrl),_0x3f643f=await _0x211111[_0x2a8075(0x127)](fetch,_0x10914f+_0x2a8075(0x107)+_0x159e30+_0x2a8075(0x14d)+_0x10cea4+'/assets',{'method':_0x211111[_0x2a8075(0x13c)],'headers':{'Authorization':'Bearer\x20'+_0x119c5c,'Content-Type':_0x211111[_0x2a8075(0x129)]},'body':JSON[_0x2a8075(0x178)](_0x117127)});if(!_0x3f643f['ok']){const _0x2c9021=await _0x3f643f[_0x2a8075(0xfd)]();throw new Error('Failed\x20to\x20create\x20step\x20asset:\x20'+_0x2c9021);}return _0x3f643f[_0x2a8075(0xfa)]();}export async function updateVerificationStep(_0x567029,_0x10fb6d,_0xd35602){const _0x185c51=_0x2e72,_0x5a4a97={'KKOeW':_0x185c51(0x123),'SHVwF':_0x185c51(0x12f),'vEWKc':function(_0x495b65){return _0x495b65();},'reDjq':function(_0xd10be0,_0x57f623,_0x195ee2){return _0xd10be0(_0x57f623,_0x195ee2);},'McGse':_0x185c51(0x122),'HANCW':_0x185c51(0x116)},_0x355197=await getToken();if(!_0x355197){if(_0x5a4a97[_0x185c51(0x157)]!==_0x5a4a97[_0x185c51(0x157)]){const _0x521425=_0x2585c7['apply'](_0xee27ea,arguments);return _0x581755=null,_0x521425;}else throw new Error(_0x5a4a97[_0x185c51(0x15c)]);}const _0x7513db=_0x5a4a97[_0x185c51(0xea)](getApiBaseUrl),_0x23b829=await _0x5a4a97[_0x185c51(0xf4)](fetch,_0x7513db+_0x185c51(0x107)+_0x567029+_0x185c51(0x14d)+_0x10fb6d,{'method':_0x5a4a97[_0x185c51(0xfc)],'headers':{'Authorization':_0x185c51(0x171)+_0x355197,'Content-Type':_0x5a4a97[_0x185c51(0x13d)]},'body':JSON[_0x185c51(0x178)](_0xd35602)});if(!_0x23b829['ok']){const _0x5c22db=await _0x23b829[_0x185c51(0xfd)]();throw new Error('Failed\x20to\x20update\x20verification\x20step:\x20'+_0x5c22db);}}export async function getBrowserSessionSteps(_0x2ac90b){const _0x34f798=_0x2e72,_0x466da8={'NwDeG':function(_0x5bbc31){return _0x5bbc31();},'lZMcb':function(_0x50e78f,_0x17b3c9){return _0x50e78f!==_0x17b3c9;},'VAYFa':_0x34f798(0x12f),'WKsyo':_0x34f798(0x103)},_0x233bb2=await _0x466da8['NwDeG'](getToken);if(!_0x233bb2){if(_0x466da8[_0x34f798(0x173)]('gGYff','gGYff'))throw new _0x24b5bd('No\x20API\x20token\x20configured.\x20Run:\x20ranger\x20setup\x20[token]');else throw new Error(_0x466da8[_0x34f798(0x172)]);}const _0x5bad37=_0x466da8[_0x34f798(0x138)](getApiBaseUrl),_0x156e6=await fetch(_0x5bad37+'/api/v1/mcp/browser-sessions/'+_0x2ac90b+_0x34f798(0xf3),{'method':_0x466da8[_0x34f798(0x12d)],'headers':{'Authorization':'Bearer\x20'+_0x233bb2}});if(!_0x156e6['ok']){const _0x111f6c=await _0x156e6[_0x34f798(0xfd)]();throw new Error(_0x34f798(0x15d)+_0x111f6c);}return _0x156e6[_0x34f798(0xfa)]();}
|
|
1
|
+
(function(_0x2b4718,_0x3dfe79){const _0x4117f5=_0x59a1,_0x40dbad=_0x2b4718();while(!![]){try{const _0x395d70=-parseInt(_0x4117f5(0x16b))/0x1+-parseInt(_0x4117f5(0x165))/0x2*(parseInt(_0x4117f5(0x126))/0x3)+-parseInt(_0x4117f5(0x14c))/0x4+parseInt(_0x4117f5(0x171))/0x5+-parseInt(_0x4117f5(0x17d))/0x6+parseInt(_0x4117f5(0x15e))/0x7*(-parseInt(_0x4117f5(0x166))/0x8)+parseInt(_0x4117f5(0x160))/0x9;if(_0x395d70===_0x3dfe79)break;else _0x40dbad['push'](_0x40dbad['shift']());}catch(_0x50ee2b){_0x40dbad['push'](_0x40dbad['shift']());}}}(_0x41e7,0x75184));const _0x1e05f4=(function(){const _0x3516f5=_0x59a1,_0x109870={'cgqaU':function(_0x2b7d1e,_0x15c21e,_0x5daffb,_0x574e6f){return _0x2b7d1e(_0x15c21e,_0x5daffb,_0x574e6f);},'JOfER':_0x3516f5(0x157),'qViru':'iGpKn'};let _0x4a515c=!![];return function(_0x2f9d01,_0x184f90){const _0x18c250=_0x3516f5,_0x44795f={'nyyXp':function(_0x44262c,_0x417c4f,_0x382062,_0x54588b){return _0x109870['cgqaU'](_0x44262c,_0x417c4f,_0x382062,_0x54588b);},'LvUVF':_0x109870['JOfER'],'BFUrU':_0x109870[_0x18c250(0x12f)]},_0x459599=_0x4a515c?function(){const _0x5eea06=_0x18c250;if(_0x44795f[_0x5eea06(0x189)]!==_0x44795f[_0x5eea06(0x189)])return _0x44795f[_0x5eea06(0x13d)](_0x4c990f,_0x441032,_0x2639b8,_0x44795f[_0x5eea06(0x17c)]);else{if(_0x184f90){const _0x2ce2fe=_0x184f90[_0x5eea06(0x132)](_0x2f9d01,arguments);return _0x184f90=null,_0x2ce2fe;}}}:function(){};return _0x4a515c=![],_0x459599;};}()),_0x268c5b=_0x1e05f4(this,function(){const _0x36a857=_0x59a1,_0x527892={'bRmKl':_0x36a857(0x154)};return _0x268c5b[_0x36a857(0x172)]()['search'](_0x527892[_0x36a857(0x162)])[_0x36a857(0x172)]()[_0x36a857(0x152)](_0x268c5b)[_0x36a857(0x16a)](_0x36a857(0x154));});_0x268c5b();import{getToken}from'./keychain.js';import{getApiBaseUrl}from'./environment.js';import{createHash}from'crypto';import{withRetry}from'./retry.js';export async function createBrowserSession(_0x35ba45){const _0xde4849=_0x59a1,_0x405ec3={'RtzvV':function(_0x12ee04){return _0x12ee04();},'hGedz':function(_0x3a7384,_0x1f288d,_0x2d20a3){return _0x3a7384(_0x1f288d,_0x2d20a3);},'zVmLG':_0xde4849(0x178),'MNhbk':_0xde4849(0x164),'aSWTH':function(_0x5428cc,_0x59897b){return _0x5428cc===_0x59897b;},'zkOEf':_0xde4849(0x190),'LBBVp':'LWXNK'},_0x2cd4e5=await _0x405ec3['RtzvV'](getToken);if(!_0x2cd4e5)throw new Error(_0xde4849(0x163));const _0x292800=getApiBaseUrl(),_0x5675d9=await _0x405ec3['hGedz'](fetch,_0x292800+_0xde4849(0x123),{'method':_0x405ec3[_0xde4849(0x139)],'headers':{'Authorization':'Bearer\x20'+_0x2cd4e5,'Content-Type':_0x405ec3[_0xde4849(0x150)]},'body':JSON[_0xde4849(0x17e)]({'environmentName':_0x35ba45?.['environmentName'],'settings':_0x35ba45?.[_0xde4849(0x134)],'task':_0x35ba45?.[_0xde4849(0x170)],'url':_0x35ba45?.[_0xde4849(0x124)],'featureId':_0x35ba45?.[_0xde4849(0x13f)],'checklistItemId':_0x35ba45?.[_0xde4849(0x155)]})});if(!_0x5675d9['ok']){if(_0x405ec3[_0xde4849(0x182)](_0x405ec3[_0xde4849(0x161)],_0x405ec3['LBBVp'])){const _0x1db774=_0x110266?function(){if(_0x53ebf1){const _0x58676b=_0x42e81c['apply'](_0x219995,arguments);return _0x1fb02f=null,_0x58676b;}}:function(){};return _0x3dd759=![],_0x1db774;}else{const _0x53db89=await _0x5675d9['text']();throw new Error('Failed\x20to\x20create\x20browser\x20session:\x20'+_0x53db89);}}return _0x5675d9[_0xde4849(0x175)]();}export async function updateBrowserSession(_0x284a55,_0x434ce3){const _0x5cce5f=_0x59a1,_0x477412={'BgxBD':function(_0x155348,_0x387145,_0x5e39d1,_0x528576){return _0x155348(_0x387145,_0x5e39d1,_0x528576);},'rOWLc':_0x5cce5f(0x18a),'IavUk':function(_0x4f3c3e){return _0x4f3c3e();},'hnHIO':_0x5cce5f(0x163),'IHJxf':_0x5cce5f(0x151),'OWjuM':'application/json','bFRFS':function(_0x2e2538,_0x2c4b9b){return _0x2e2538!==_0x2c4b9b;},'TLUzS':'YxoOG','QEmYs':_0x5cce5f(0x191),'KpJHg':function(_0x36c74f,_0x1e3e9c,_0x1aaaec){return _0x36c74f(_0x1e3e9c,_0x1aaaec);}};return _0x477412[_0x5cce5f(0x141)](withRetry,async()=>{const _0x4a2a24=_0x5cce5f,_0x814b63=await _0x477412[_0x4a2a24(0x13c)](getToken);if(!_0x814b63)throw new Error(_0x477412[_0x4a2a24(0x13b)]);const _0x1063d4=getApiBaseUrl(),_0x116542=await fetch(_0x1063d4+_0x4a2a24(0x14b)+_0x284a55,{'method':_0x477412[_0x4a2a24(0x18f)],'headers':{'Authorization':_0x4a2a24(0x125)+_0x814b63,'Content-Type':_0x477412['OWjuM']},'body':JSON[_0x4a2a24(0x17e)](_0x434ce3)});if(!_0x116542['ok']){if(_0x477412['bFRFS'](_0x477412[_0x4a2a24(0x16d)],_0x477412[_0x4a2a24(0x135)])){const _0x274f87=await _0x116542[_0x4a2a24(0x159)]();throw new Error(_0x4a2a24(0x13a)+_0x274f87);}else return _0x477412[_0x4a2a24(0x130)](_0x340a93,_0x461109,_0x51f264,_0x477412['rOWLc']);}return _0x116542[_0x4a2a24(0x175)]();},{'label':_0x5cce5f(0x149)});}export async function getBrowserSession(_0x84b270){const _0x4b08db=_0x59a1,_0x391038={'vNEoo':function(_0x2dc2a1){return _0x2dc2a1();},'SMzwx':function(_0x12998f,_0x1c4a25,_0x54cb7f){return _0x12998f(_0x1c4a25,_0x54cb7f);},'wSGtV':'GET'},_0x2ead1b=await getToken();if(!_0x2ead1b)throw new Error(_0x4b08db(0x163));const _0x36b1d1=_0x391038['vNEoo'](getApiBaseUrl),_0x4c19a3=await _0x391038[_0x4b08db(0x153)](fetch,_0x36b1d1+'/api/v1/mcp/browser-sessions/'+_0x84b270,{'method':_0x391038[_0x4b08db(0x138)],'headers':{'Authorization':_0x4b08db(0x125)+_0x2ead1b}});if(!_0x4c19a3['ok']){const _0x264589=await _0x4c19a3['text']();throw new Error(_0x4b08db(0x131)+_0x264589);}return _0x4c19a3['json']();}export async function getUploadUrls(_0x539dec,_0x51c304,_0x2151ed,_0x59f6bd){const _0x62d330=_0x59a1,_0x28ce79={'KVqhm':function(_0x3c72e5){return _0x3c72e5();},'xsskK':'No\x20API\x20token\x20configured.\x20Run:\x20ranger\x20setup\x20[token]','lfXMV':_0x62d330(0x178),'mZaGg':_0x62d330(0x164),'kEqds':function(_0x5174c0,_0x204a29){return _0x5174c0!==_0x204a29;},'JNWrF':function(_0x5e1286,_0x56fad1){return _0x5e1286!==_0x56fad1;}},_0x13df77=await _0x28ce79[_0x62d330(0x146)](getToken);if(!_0x13df77)throw new Error(_0x28ce79[_0x62d330(0x18e)]);const _0x472ffc=getApiBaseUrl(),_0x56bf1c=await fetch(_0x472ffc+_0x62d330(0x14b)+_0x539dec+_0x62d330(0x17a),{'method':_0x28ce79[_0x62d330(0x15d)],'headers':{'Authorization':'Bearer\x20'+_0x13df77,'Content-Type':_0x28ce79[_0x62d330(0x136)]},'body':JSON[_0x62d330(0x17e)]({'filename':_0x51c304,'filetype':_0x2151ed,..._0x28ce79['kEqds'](_0x59f6bd?.[_0x62d330(0x15b)],undefined)&&{'size':_0x59f6bd[_0x62d330(0x15b)]},..._0x59f6bd?.[_0x62d330(0x18c)]!==undefined&&{'checksum':_0x59f6bd[_0x62d330(0x18c)]},..._0x28ce79['JNWrF'](_0x59f6bd?.[_0x62d330(0x14a)],undefined)&&{'metadata':_0x59f6bd[_0x62d330(0x14a)]}})});if(!_0x56bf1c['ok']){const _0x55a9b2=await _0x56bf1c[_0x62d330(0x159)]();throw new Error(_0x62d330(0x15f)+_0x55a9b2);}return _0x56bf1c[_0x62d330(0x175)]();}export async function uploadFile(_0x1ac187,_0x33d724,_0x159712){const _0x3461c1=_0x59a1,_0x2c6c48={'yePiK':function(_0x2a433e,_0x430832,_0x4558c9){return _0x2a433e(_0x430832,_0x4558c9);}},_0x122b86=await _0x2c6c48[_0x3461c1(0x194)](fetch,_0x1ac187,{'method':_0x3461c1(0x14d),'headers':{'Content-Type':_0x159712,'Content-Length':_0x33d724['length'][_0x3461c1(0x172)]()},'body':_0x33d724});if(!_0x122b86['ok']){const _0x268ebc=await _0x122b86[_0x3461c1(0x159)]();throw new Error('Failed\x20to\x20upload\x20file:\x20'+_0x268ebc);}}export async function uploadTrace(_0x3d0cc0,_0x1e1342){const _0x1f0596=_0x59a1,_0x56f8f8={'UMKtf':function(_0x471566,_0x3a3493,_0x5c78fc,_0x4978c5){return _0x471566(_0x3a3493,_0x5c78fc,_0x4978c5);},'CvquF':_0x1f0596(0x18a)};return _0x56f8f8[_0x1f0596(0x17f)](uploadFile,_0x3d0cc0,_0x1e1342,_0x56f8f8['CvquF']);}export async function uploadConversation(_0x348134,_0x388ac1){const _0x340167=_0x59a1,_0x32ada5={'MAvWi':_0x340167(0x184)};return uploadFile(_0x348134,_0x388ac1,_0x32ada5[_0x340167(0x129)]);}function _0x41e7(){const _0x3ea2e3=['EwvqAuS','l2fWAs92ms9Ty3aVyNjVD3nLCI1ZzxnZAw9UCW','DxjS','qMvHCMvYia','odK4ogffru5RzG','C2vZC2LVBLrVA2vU','qLDqvgS','tuf2v2K','vw5HvNy','l2fWAs92ms9Ty3aVChjVEhKTC2vZC2LVBG','q2rzrvu','wgzcwey','DeHqsee','CvzPCNu','qMD4qKq','rMfPBgvKihrVigDLDcbICM93C2vYihnLC3nPB246ia','yxbWBhK','u1vntwO','C2v0DgLUz3m','uuvTwxm','BvPHr2C','CLLADgO','D1nhDfy','ELzTteC','rMfPBgvKihrVihvWzgf0zsbICM93C2vYihnLC3nPB246ia','Ag5isu8','swf2vwS','BNL5wha','rMfPBgvKihrVignYzwf0zsb2zxjPzMLJyxrPB24GC3rLCdOG','zMvHDhvYzuLK','yujSteO','s3bksgC','EK5dzLq','sfjmD2e','tLrXwhu','vhDcExC','s1zXAg0','r2XVqu0','DK12vhC','DxbKyxrLqNjVD3nLCLnLC3nPB24','Bwv0ywrHDge','l2fWAs92ms9Ty3aVyNjVD3nLCI1ZzxnZAw9UCY8','otaZodm2EvrwwNzg','ufvu','tgjyqvO','DxbKyxrL','tu5OyMS','uefuq0G','y29UC3rYDwn0B3i','u016D3G','kcGOlISPkYKRksSK','y2HLy2TSAxn0sxrLBuLK','q3nhtM4','DMLKzw8VD2vIBq','thbKvNK','Dgv4Da','ug9uExi','C2L6zq','t1vQDxi','Bgzytvy','mte5yLPJqLn0','rMfPBgvKihrVigDLDcb1CgXVywqGvvjmCZOG','mtuXodm0ntbUCeHPvuC','EMTprwy','yLjTs2W','tM8GqvbjihrVA2vUignVBMzPz3vYzwqUifj1BJOGCMfUz2vYihnLDhvWifT0B2TLBL0','yxbWBgLJyxrPB24VANnVBG','mte2B3zZv25M','mZy2mZq0C2XlCLDM','z2P0zxG','twvYtNO','rgHrt2u','C2vHCMnO','ndm5mZa2tgHXwfbj','r0vu','veXvELm','yunWueq','l3n0zxbZ','DgfZAW','mJa1odC0mgjsD3jUDa','Dg9tDhjPBMC','s3HLrKG','Ahr0Chm6lY90CMfJzs5WBgf5D3jPz2H0lMrLDI8/DhjHy2u9','ANnVBG','BLfNBvm','zwDWA20','ue9tva','wfflC00','l3vWBg9Hzc11CMXZ','v01Ts0u','thzvvKy','otK4nhHNsKrZCG','C3rYAw5NAwz5','vu1lDgy','rMfPBgvKihrVihvWzgf0zsb2zxjPzMLJyxrPB24GC3rLCdOG','teHvu1y','yvnxveG','l3n0zxbZlW','yxbWBgLJyxrPB24VANnVBMW','t3PXzKK','u2rbD2K','rMfPBgvKihrVignYzwf0zsbZDgvWigfZC2v0oIa','yMfZzty0','qKzvCLu','yxbWBgLJyxrPB24VEMLW','zgLNzxn0','y2HLy2TZDw0','ruP6suG','EhnZA0S','suHkEgy','DLPUEg4','vwToCeC','EwDuwxa','l2fZC2v0CW'];_0x41e7=function(){return _0x3ea2e3;};return _0x41e7();}export async function uploadScreenshot(_0x200866,_0x2892c0){const _0x214121=_0x59a1,_0x46d4f3={'OUjur':function(_0x49c374,_0x12090f,_0x51eb01,_0x294a0d){return _0x49c374(_0x12090f,_0x51eb01,_0x294a0d);},'fhaKE':'image/png'};return _0x46d4f3[_0x214121(0x15c)](uploadFile,_0x200866,_0x2892c0,_0x46d4f3['fhaKE']);}export async function uploadVideo(_0x337ced,_0x573edd){const _0x390bc2=_0x59a1,_0x2f12fd={'AmVHz':function(_0x1d6209,_0x5c74cf,_0xee3fb5,_0x19fc92){return _0x1d6209(_0x5c74cf,_0xee3fb5,_0x19fc92);},'nQgmS':'video/webm'};return _0x2f12fd['AmVHz'](uploadFile,_0x337ced,_0x573edd,_0x2f12fd[_0x390bc2(0x176)]);}export function buildTraceViewerUrl(_0x4cba28){const _0x1bf185=_0x59a1,_0x567864={'HRLwa':function(_0x3e4d86,_0x2d0114){return _0x3e4d86(_0x2d0114);}},_0x413e52=_0x567864[_0x1bf185(0x143)](encodeURIComponent,_0x4cba28);return _0x1bf185(0x174)+_0x413e52;}function _0x59a1(_0xaebd7e,_0x95fd8e){_0xaebd7e=_0xaebd7e-0x123;const _0x4fbd59=_0x41e7();let _0x268c5b=_0x4fbd59[_0xaebd7e];if(_0x59a1['AFsJLH']===undefined){var _0x1e05f4=function(_0x56c7c4){const _0x31bcde='abcdefghijklmnopqrstuvwxyzABCDEFGHIJKLMNOPQRSTUVWXYZ0123456789+/=';let _0x561fab='',_0x41d5ce='',_0x39433f=_0x561fab+_0x1e05f4;for(let _0x2e22d5=0x0,_0x3ff4cb,_0x260ba2,_0x4fcefe=0x0;_0x260ba2=_0x56c7c4['charAt'](_0x4fcefe++);~_0x260ba2&&(_0x3ff4cb=_0x2e22d5%0x4?_0x3ff4cb*0x40+_0x260ba2:_0x260ba2,_0x2e22d5++%0x4)?_0x561fab+=_0x39433f['charCodeAt'](_0x4fcefe+0xa)-0xa!==0x0?String['fromCharCode'](0xff&_0x3ff4cb>>(-0x2*_0x2e22d5&0x6)):_0x2e22d5:0x0){_0x260ba2=_0x31bcde['indexOf'](_0x260ba2);}for(let _0x3bbebc=0x0,_0x447e2f=_0x561fab['length'];_0x3bbebc<_0x447e2f;_0x3bbebc++){_0x41d5ce+='%'+('00'+_0x561fab['charCodeAt'](_0x3bbebc)['toString'](0x10))['slice'](-0x2);}return decodeURIComponent(_0x41d5ce);};_0x59a1['SzVRvY']=_0x1e05f4,_0x59a1['Eroqky']={},_0x59a1['AFsJLH']=!![];}const _0x41e70d=_0x4fbd59[0x0],_0x59a1f1=_0xaebd7e+_0x41e70d,_0x18bb10=_0x59a1['Eroqky'][_0x59a1f1];if(!_0x18bb10){const _0x110266=function(_0x1ae62b){this['mVfexm']=_0x1ae62b,this['LBcpzK']=[0x1,0x0,0x0],this['uTJvgc']=function(){return'newState';},this['GCXade']='\x5cw+\x20*\x5c(\x5c)\x20*{\x5cw+\x20*',this['NfZDIh']='[\x27|\x22].+[\x27|\x22];?\x20*}';};_0x110266['prototype']['uzxENy']=function(){const _0x43d06c=new RegExp(this['GCXade']+this['NfZDIh']),_0x1a1daf=_0x43d06c['test'](this['uTJvgc']['toString']())?--this['LBcpzK'][0x1]:--this['LBcpzK'][0x0];return this['powwex'](_0x1a1daf);},_0x110266['prototype']['powwex']=function(_0x278a46){if(!Boolean(~_0x278a46))return _0x278a46;return this['SGlsVT'](this['mVfexm']);},_0x110266['prototype']['SGlsVT']=function(_0x3dd759){for(let _0x53ebf1=0x0,_0x6152d4=this['LBcpzK']['length'];_0x53ebf1<_0x6152d4;_0x53ebf1++){this['LBcpzK']['push'](Math['round'](Math['random']())),_0x6152d4=this['LBcpzK']['length'];}return _0x3dd759(this['LBcpzK'][0x0]);},new _0x110266(_0x59a1)['uzxENy'](),_0x268c5b=_0x59a1['SzVRvY'](_0x268c5b),_0x59a1['Eroqky'][_0x59a1f1]=_0x268c5b;}else _0x268c5b=_0x18bb10;return _0x268c5b;}export async function getProxySessionToken(){const _0x393190=_0x59a1,_0xeabf40={'egpkm':_0x393190(0x163),'LbXAZ':'zLBLJ','rYZtj':function(_0x4df14f){return _0x4df14f();},'dgXeV':function(_0x2144bc,_0x3d209e,_0x12ca85){return _0x2144bc(_0x3d209e,_0x12ca85);},'mcFKc':_0x393190(0x178)},_0x5c3f23=await getToken();if(!_0x5c3f23){if(_0xeabf40[_0x393190(0x14e)]===_0xeabf40[_0x393190(0x14e)])throw new Error(_0xeabf40[_0x393190(0x177)]);else throw new _0x3e64dd(_0xeabf40[_0x393190(0x177)]);}const _0x501fa2=_0xeabf40[_0x393190(0x137)](getApiBaseUrl),_0x5c580a=await _0xeabf40['dgXeV'](fetch,_0x501fa2+_0x393190(0x12b),{'method':_0xeabf40['mcFKc'],'headers':{'Authorization':_0x393190(0x125)+_0x5c3f23}});if(!_0x5c580a['ok']){const _0x399229=await _0x5c580a[_0x393190(0x159)]();throw new Error('Failed\x20to\x20get\x20proxy\x20session\x20token:\x20'+_0x399229);}const _0x355f2a=await _0x5c580a[_0x393190(0x175)]();return _0x355f2a[_0x393190(0x127)];}export function computeChecksum(_0x9a2ace){const _0xa962e5=_0x59a1,_0x3a9110={'MerNz':'md5'};return createHash(_0x3a9110[_0xa962e5(0x168)])[_0xa962e5(0x14f)](_0x9a2ace)[_0xa962e5(0x18b)](_0xa962e5(0x188));}export async function createVerificationStep(_0x2bce3d,_0x121279){const _0x1516e6=_0x59a1,_0x3bdcdd={'GloAM':_0x1516e6(0x163),'KxeFH':function(_0x13ef37){return _0x13ef37();},'UnaVv':function(_0x190fe0,_0x78c8ef){return _0x190fe0!==_0x78c8ef;},'XQKsM':_0x1516e6(0x167),'PoTyr':function(_0x447fc6){return _0x447fc6();},'tHPHA':_0x1516e6(0x164),'sMujB':'ZfqfT','DhQOe':_0x1516e6(0x158)},_0x3a9b51=await _0x3bdcdd[_0x1516e6(0x173)](getToken);if(!_0x3a9b51){if(_0x3bdcdd[_0x1516e6(0x12a)](_0x1516e6(0x167),_0x3bdcdd[_0x1516e6(0x179)]))throw new _0x4231fe(_0x3bdcdd[_0x1516e6(0x147)]);else throw new Error(_0x3bdcdd[_0x1516e6(0x147)]);}const _0x4ffae7=_0x3bdcdd[_0x1516e6(0x15a)](getApiBaseUrl),_0x48fa33=await fetch(_0x4ffae7+_0x1516e6(0x14b)+_0x2bce3d+_0x1516e6(0x16f),{'method':'POST','headers':{'Authorization':_0x1516e6(0x125)+_0x3a9b51,'Content-Type':_0x3bdcdd[_0x1516e6(0x12e)]},'body':JSON[_0x1516e6(0x17e)](_0x121279)});if(!_0x48fa33['ok']){if(_0x3bdcdd['sMujB']!==_0x3bdcdd[_0x1516e6(0x169)]){const _0x3860ac=await _0x48fa33[_0x1516e6(0x159)]();throw new Error(_0x1516e6(0x13e)+_0x3860ac);}else throw new _0x2c66be(_0x3bdcdd[_0x1516e6(0x147)]);}return _0x48fa33[_0x1516e6(0x175)]();}export async function createStepAsset(_0x52ec2f,_0x3eba2a,_0x4cba90){const _0x218da6=_0x59a1,_0xb7a901={'SdAwi':'No\x20API\x20token\x20configured.\x20Run:\x20ranger\x20setup\x20[token]','NTqXu':function(_0x25a051){return _0x25a051();},'CsGNn':_0x218da6(0x192),'euLZT':_0x218da6(0x142),'aBlLJ':function(_0x4899ca){return _0x4899ca();},'TwByw':function(_0x42e997,_0x27e27c,_0x5d3026){return _0x42e997(_0x27e27c,_0x5d3026);},'dHnum':_0x218da6(0x178),'vMvTw':_0x218da6(0x164)},_0x479a09=await _0xb7a901[_0x218da6(0x144)](getToken);if(!_0x479a09){if(_0xb7a901[_0x218da6(0x156)]!==_0xb7a901['euLZT'])throw new Error(_0xb7a901[_0x218da6(0x186)]);else throw new _0x36a8d7(_0xb7a901[_0x218da6(0x186)]);}const _0x1d0e49=_0xb7a901[_0x218da6(0x140)](getApiBaseUrl),_0x331dd4=await _0xb7a901[_0x218da6(0x145)](fetch,_0x1d0e49+'/api/v1/mcp/browser-sessions/'+_0x52ec2f+_0x218da6(0x183)+_0x3eba2a+_0x218da6(0x193),{'method':_0xb7a901['dHnum'],'headers':{'Authorization':_0x218da6(0x125)+_0x479a09,'Content-Type':_0xb7a901[_0x218da6(0x148)]},'body':JSON[_0x218da6(0x17e)](_0x4cba90)});if(!_0x331dd4['ok']){const _0x2790cf=await _0x331dd4['text']();throw new Error(_0x218da6(0x187)+_0x2790cf);}return _0x331dd4[_0x218da6(0x175)]();}export async function updateVerificationStep(_0x376d7a,_0x35bd22,_0x517569){const _0x1465f9=_0x59a1,_0x1239e1={'LHUSV':'No\x20API\x20token\x20configured.\x20Run:\x20ranger\x20setup\x20[token]','pGcdR':function(_0xe40f01){return _0xe40f01();},'UnzZZ':function(_0xccd4dc,_0x304725,_0x4eceb5){return _0xccd4dc(_0x304725,_0x4eceb5);},'iOiVl':'application/json','BWPTk':function(_0x446195,_0x1ff5f6){return _0x446195!==_0x1ff5f6;},'WMmKE':'jaydZ'},_0x4cd35a=await getToken();if(!_0x4cd35a)throw new Error(_0x1239e1[_0x1465f9(0x181)]);const _0x34ce66=_0x1239e1['pGcdR'](getApiBaseUrl),_0x47cc51=await _0x1239e1['UnzZZ'](fetch,_0x34ce66+_0x1465f9(0x14b)+_0x376d7a+_0x1465f9(0x183)+_0x35bd22,{'method':_0x1465f9(0x151),'headers':{'Authorization':'Bearer\x20'+_0x4cd35a,'Content-Type':_0x1239e1['iOiVl']},'body':JSON[_0x1465f9(0x17e)](_0x517569)});if(!_0x47cc51['ok']){if(_0x1239e1[_0x1465f9(0x128)](_0x1465f9(0x12c),_0x1239e1[_0x1465f9(0x17b)])){const _0x168790=await _0x47cc51[_0x1465f9(0x159)]();throw new Error(_0x1465f9(0x180)+_0x168790);}else throw new _0x4af374(_0x1239e1['LHUSV']);}}export async function getBrowserSessionSteps(_0x179c03){const _0x199f19=_0x59a1,_0x230827={'EJzIH':function(_0x595ae9,_0x1d62d5,_0x4913e2,_0x7a3a49){return _0x595ae9(_0x1d62d5,_0x4913e2,_0x7a3a49);},'SUMMj':'application/jsonl','IYdGz':function(_0x4e113c){return _0x4e113c();},'OzqfI':_0x199f19(0x163),'tqZoX':function(_0xdfbbc2){return _0xdfbbc2();},'XfBXF':function(_0x22203d,_0x26e85c){return _0x22203d===_0x26e85c;},'owSpU':'ymorY','aCpPD':'YgDWH'},_0x29ce95=await _0x230827['IYdGz'](getToken);if(!_0x29ce95)throw new Error(_0x230827[_0x199f19(0x185)]);const _0x317545=_0x230827['tqZoX'](getApiBaseUrl),_0x296f8e=await fetch(_0x317545+'/api/v1/mcp/browser-sessions/'+_0x179c03+'/steps',{'method':_0x199f19(0x16c),'headers':{'Authorization':_0x199f19(0x125)+_0x29ce95}});if(!_0x296f8e['ok']){if(_0x230827[_0x199f19(0x12d)](_0x230827['owSpU'],_0x230827[_0x199f19(0x16e)]))return _0x230827[_0x199f19(0x18d)](_0x50d9db,_0x34b29c,_0x445b4f,_0x230827[_0x199f19(0x133)]);else{const _0x56588b=await _0x296f8e[_0x199f19(0x159)]();throw new Error('Failed\x20to\x20get\x20browser\x20session\x20steps:\x20'+_0x56588b);}}return _0x296f8e[_0x199f19(0x175)]();}
|
|
@@ -1 +1 @@
|
|
|
1
|
-
(function(
|
|
1
|
+
function _0xc8b7(_0x2a2d09,_0x4bda38){_0x2a2d09=_0x2a2d09-0x128;const _0x1fb4b7=_0x1fb4();let _0xc8b72a=_0x1fb4b7[_0x2a2d09];return _0xc8b72a;}(function(_0x575ec3,_0x1f0908){const _0x9a855=_0xc8b7,_0x5f3ffb=_0x575ec3();while(!![]){try{const _0x45650f=parseInt(_0x9a855(0x13f))/0x1+parseInt(_0x9a855(0x12f))/0x2+parseInt(_0x9a855(0x134))/0x3*(parseInt(_0x9a855(0x12e))/0x4)+parseInt(_0x9a855(0x136))/0x5*(-parseInt(_0x9a855(0x140))/0x6)+-parseInt(_0x9a855(0x135))/0x7*(-parseInt(_0x9a855(0x13d))/0x8)+parseInt(_0x9a855(0x133))/0x9+-parseInt(_0x9a855(0x132))/0xa;if(_0x45650f===_0x1f0908)break;else _0x5f3ffb['push'](_0x5f3ffb['shift']());}catch(_0x3341bc){_0x5f3ffb['push'](_0x5f3ffb['shift']());}}}(_0x1fb4,0x88e46));import{homedir}from'os';import{join,dirname,parse}from'path';import{existsSync}from'fs';import{readFile,writeFile,mkdir}from'fs/promises';export function getClaudeConfigDir(){const _0x14294d=_0xc8b7,_0x37d2ce={'EbzKn':function(_0x49658e,_0x2c7d31,_0x561074){return _0x49658e(_0x2c7d31,_0x561074);},'SBbzw':function(_0x2a39c5){return _0x2a39c5();}};return process['env']['CLAUDE_CONFIG_DIR']||_0x37d2ce[_0x14294d(0x12d)](join,_0x37d2ce['SBbzw'](homedir),'.claude');}export function getUserSkillsDir(){const _0xb20d5b=_0xc8b7,_0x3bae76={'lQXYf':function(_0xefd7d9,_0x48cd98,_0x38a92b){return _0xefd7d9(_0x48cd98,_0x38a92b);},'KGYKm':function(_0x354486){return _0x354486();}};return _0x3bae76['lQXYf'](join,_0x3bae76[_0xb20d5b(0x129)](getClaudeConfigDir),_0xb20d5b(0x12c));}export function getProjectRoot(){const _0x4c097e=_0xc8b7,_0x2f8f62={'vtxYu':function(_0x529267,_0x467fd0){return _0x529267(_0x467fd0);},'zncjb':function(_0x48d760,_0x248632){return _0x48d760(_0x248632);},'TxZwR':function(_0x28d3e6,_0x1113ef,_0x37fda9){return _0x28d3e6(_0x1113ef,_0x37fda9);},'nmuvD':'.claude','fJGNU':_0x4c097e(0x13a),'lzvUO':function(_0x34bcde,_0x2e8cb3){return _0x34bcde(_0x2e8cb3);}};let _0x39b415=process['cwd']();const _0x1fa92c=_0x2f8f62[_0x4c097e(0x139)](parse,_0x39b415)[_0x4c097e(0x13c)];while(_0x39b415!==_0x1fa92c){if(_0x2f8f62[_0x4c097e(0x128)](existsSync,_0x2f8f62['TxZwR'](join,_0x39b415,_0x2f8f62[_0x4c097e(0x137)])))return _0x39b415;if(_0x2f8f62[_0x4c097e(0x128)](existsSync,_0x2f8f62['TxZwR'](join,_0x39b415,_0x2f8f62[_0x4c097e(0x12a)])))return _0x39b415;_0x39b415=_0x2f8f62[_0x4c097e(0x131)](dirname,_0x39b415);}return process['cwd']();}export function getProjectSkillsDir(){const _0x2c9433=_0xc8b7,_0x19ab87={'TyDma':function(_0x3f61e0,_0x13d57c,_0x39ce21,_0xcf22cb){return _0x3f61e0(_0x13d57c,_0x39ce21,_0xcf22cb);},'mxrmY':_0x2c9433(0x12c)};return _0x19ab87[_0x2c9433(0x130)](join,getProjectRoot(),'.claude',_0x19ab87['mxrmY']);}export function getSkillsDir(_0x2bd64b){const _0xe2144f=_0xc8b7;return _0x2bd64b===_0xe2144f(0x141)?getUserSkillsDir():getProjectSkillsDir();}export function getSettingsPath(){const _0x5b6031=_0xc8b7,_0x5b7f83={'rbruJ':function(_0x2c14f0,_0x342238,_0x2c150b){return _0x2c14f0(_0x342238,_0x2c150b);}};return _0x5b7f83[_0x5b6031(0x142)](join,getClaudeConfigDir(),_0x5b6031(0x12b));}export async function loadClaudeSettings(){const _0x388e92=_0xc8b7,_0x271751={'GixDK':function(_0x30986b,_0x102d05){return _0x30986b(_0x102d05);},'drwhh':function(_0xca41df,_0x383af8,_0x1f76c0){return _0xca41df(_0x383af8,_0x1f76c0);},'rMVsw':'utf-8'},_0x179e20=getSettingsPath();if(!_0x271751[_0x388e92(0x138)](existsSync,_0x179e20))return{};try{const _0xdaaa03=await _0x271751['drwhh'](readFile,_0x179e20,_0x271751['rMVsw']);return JSON['parse'](_0xdaaa03);}catch{return{};}}export async function saveClaudeSettings(_0x114ec1){const _0x5c30e1=_0xc8b7,_0x1b8ffa={'idvxZ':function(_0x4bb431){return _0x4bb431();},'KZXGn':function(_0x38138d,_0x114b81,_0x18e84f){return _0x38138d(_0x114b81,_0x18e84f);},'hsgxN':function(_0xfdec20,_0x5ac018){return _0xfdec20+_0x5ac018;},'ENjSY':'utf-8'},_0x4deca6=_0x1b8ffa[_0x5c30e1(0x13e)](getSettingsPath),_0x680796=_0x1b8ffa[_0x5c30e1(0x13e)](getClaudeConfigDir);!existsSync(_0x680796)&&await _0x1b8ffa['KZXGn'](mkdir,_0x680796,{'recursive':!![]}),await writeFile(_0x4deca6,_0x1b8ffa['hsgxN'](JSON[_0x5c30e1(0x13b)](_0x114ec1,null,0x2),'\x0a'),_0x1b8ffa['ENjSY']);}function _0x1fb4(){const _0x1603c1=['7cDaJwT','2342740pMNduM','nmuvD','GixDK','vtxYu','.git','stringify','root','4871624ZuPqjv','idvxZ','653475sEQIOD','6awoSSf','user','rbruJ','zncjb','KGYKm','fJGNU','settings.json','skills','EbzKn','6268unMptM','2167870srMvsf','TyDma','lzvUO','17269020mlMPuF','458586nYndKo','687vVByWp'];_0x1fb4=function(){return _0x1603c1;};return _0x1fb4();}
|
|
@@ -1 +1 @@
|
|
|
1
|
-
(function(
|
|
1
|
+
(function(_0x2dd7c2,_0x4e0fc0){const _0x59e6bd=_0xa7d2,_0x8ba6dd=_0x2dd7c2();while(!![]){try{const _0xd34cf9=parseInt(_0x59e6bd(0x11d))/0x1*(-parseInt(_0x59e6bd(0x11a))/0x2)+parseInt(_0x59e6bd(0x11e))/0x3*(-parseInt(_0x59e6bd(0x120))/0x4)+-parseInt(_0x59e6bd(0x11c))/0x5*(parseInt(_0x59e6bd(0x118))/0x6)+parseInt(_0x59e6bd(0x117))/0x7+-parseInt(_0x59e6bd(0x11b))/0x8+parseInt(_0x59e6bd(0x11f))/0x9+parseInt(_0x59e6bd(0x116))/0xa*(parseInt(_0x59e6bd(0x119))/0xb);if(_0xd34cf9===_0x4e0fc0)break;else _0x8ba6dd['push'](_0x8ba6dd['shift']());}catch(_0x5075c9){_0x8ba6dd['push'](_0x8ba6dd['shift']());}}}(_0x2f47,0x91b1c));function _0xa7d2(_0xd86dee,_0x1f5ce6){_0xd86dee=_0xd86dee-0x116;const _0x2f47e6=_0x2f47();let _0xa7d215=_0x2f47e6[_0xd86dee];return _0xa7d215;}import{isByokEnabled}from'./environment.js';const RANGER_CLAUDE_OVERRIDE_SETTINGS={'env':{'CLAUDE_CODE_USE_BEDROCK':'0'}};export function buildClaudeOverrideExtraArgs(){const _0x3de840={'aDUeQ':function(_0x4ec2ee){return _0x4ec2ee();}};if(_0x3de840['aDUeQ'](isByokEnabled))return{};return{'settings':JSON['stringify'](RANGER_CLAUDE_OVERRIDE_SETTINGS)};}function _0x2f47(){const _0x478dd4=['6pymowu','6271596FLjlne','3236xDYvuX','8715210JzTIwk','6073165AjwBRx','1020qXtHpB','11CrvlJs','441428iyvltc','5295424upyqwT','2120KMZyyl','5fyfylb'];_0x2f47=function(){return _0x478dd4;};return _0x2f47();}
|
|
@@ -1 +1 @@
|
|
|
1
|
-
(function(
|
|
1
|
+
(function(_0x6329d6,_0x2867bf){const _0x189c62=_0x18e9,_0x4bbe90=_0x6329d6();while(!![]){try{const _0x18f425=parseInt(_0x189c62(0x11c))/0x1*(-parseInt(_0x189c62(0x135))/0x2)+-parseInt(_0x189c62(0x133))/0x3*(-parseInt(_0x189c62(0x126))/0x4)+-parseInt(_0x189c62(0x125))/0x5*(parseInt(_0x189c62(0x123))/0x6)+-parseInt(_0x189c62(0x138))/0x7*(parseInt(_0x189c62(0x137))/0x8)+-parseInt(_0x189c62(0x132))/0x9+-parseInt(_0x189c62(0x130))/0xa+-parseInt(_0x189c62(0x13a))/0xb*(-parseInt(_0x189c62(0x139))/0xc);if(_0x18f425===_0x2867bf)break;else _0x4bbe90['push'](_0x4bbe90['shift']());}catch(_0x31cf1b){_0x4bbe90['push'](_0x4bbe90['shift']());}}}(_0x7b8f,0xd9739));import{spawn}from'child_process';function _0x7b8f(){const _0x2fdfa0=['[\x5cs\x5cS]*?Version:\x5cs*([\x5cd.]+)','2miqxCS','stderr','784VEDoyo','114310vwNvox','63290916NIZjpO','11yETMko','pipe','UMVcJ','output','toString','1636563wIEnnp','enabled','KMYKo','list','includes','scope','plugin','1158102jKeyeb','match','15DvmXTE','4KhYIrP','HpkoJ','toLowerCase','[\x5cs\x5cS]*?Scope:\x5cs*(user|project|local)','inherit','llCFd','success','Command\x20exited\x20with\x20code\x20','marketplace','LeXFX','6274250VNrWwu','version','3711321vJPBSW','1416558EADSaR'];_0x7b8f=function(){return _0x2fdfa0;};return _0x7b8f();}export function runClaudeCommand(_0x24cf65,_0x22e76c){const _0x3d3d5a={'ZAcbA':function(_0x22f563,_0x3eee5d){return _0x22f563(_0x3eee5d);},'KMYKo':'claude','llCFd':'error'};return new Promise(_0x1c3467=>{const _0x374f1b=_0x18e9,_0x136c3b=_0x22e76c?.['captureOutput']?_0x374f1b(0x13b):_0x374f1b(0x12a),_0x331e13=spawn(_0x3d3d5a[_0x374f1b(0x11e)],_0x24cf65,{'stdio':_0x136c3b});let _0x32f1e4='';_0x22e76c?.['captureOutput']&&_0x331e13['stdout']&&_0x331e13['stdout']['on']('data',_0x394e3a=>{const _0x57df25=_0x374f1b;_0x32f1e4+=_0x394e3a[_0x57df25(0x11b)]();}),_0x22e76c?.['captureOutput']&&_0x331e13['stderr']&&_0x331e13[_0x374f1b(0x136)]['on']('data',_0x296bf4=>{_0x32f1e4+=_0x296bf4['toString']();}),_0x331e13['on']('close',_0x10d633=>{const _0x55a0be=_0x374f1b;_0x10d633===0x0?_0x1c3467({'success':!![],'output':_0x32f1e4}):_0x1c3467({'success':![],'error':_0x55a0be(0x12d)+_0x10d633,'output':_0x32f1e4});}),_0x331e13['on'](_0x3d3d5a[_0x374f1b(0x12b)],_0x36da95=>{_0x3d3d5a['ZAcbA'](_0x1c3467,{'success':![],'error':_0x36da95['message']});});});}export async function isMarketplaceAdded(_0x3bc9ad){const _0x528dad=_0x18e9,_0x3f66a0={'LeXFX':function(_0xd0e0c0,_0x99d9c4,_0x1f9a56){return _0xd0e0c0(_0x99d9c4,_0x1f9a56);}},_0x714aad=await _0x3f66a0[_0x528dad(0x12f)](runClaudeCommand,[_0x528dad(0x122),_0x528dad(0x12e),'list'],{'captureOutput':!![]});if(!_0x714aad[_0x528dad(0x12c)]||!_0x714aad[_0x528dad(0x13d)])return![];return _0x714aad['output'][_0x528dad(0x120)](_0x3bc9ad);}export async function isPluginInstalled(_0x3f4baa){const _0x2f0be8=_0x18e9,_0x39ff6d={'EtFzv':_0x2f0be8(0x122),'HpkoJ':_0x2f0be8(0x11f)},_0x5e9a4c=await runClaudeCommand([_0x39ff6d['EtFzv'],_0x39ff6d[_0x2f0be8(0x127)]],{'captureOutput':!![]});if(!_0x5e9a4c['success']||!_0x5e9a4c[_0x2f0be8(0x13d)])return![];return _0x5e9a4c[_0x2f0be8(0x13d)]['includes'](_0x3f4baa);}function _0x18e9(_0x4980e8,_0x2d7fa3){_0x4980e8=_0x4980e8-0x11b;const _0x7b8f8d=_0x7b8f();let _0x18e915=_0x7b8f8d[_0x4980e8];return _0x18e915;}export async function getPluginInfo(_0x57ffd7){const _0x315f94=_0x18e9,_0x300bda={'UMVcJ':function(_0x113e91,_0x2d08ad,_0x16faa5){return _0x113e91(_0x2d08ad,_0x16faa5);},'RKVDN':_0x315f94(0x122)},_0x2dcff0=await _0x300bda[_0x315f94(0x13c)](runClaudeCommand,[_0x300bda['RKVDN'],'list'],{'captureOutput':!![]});if(!_0x2dcff0['success']||!_0x2dcff0[_0x315f94(0x13d)])return null;if(!_0x2dcff0['output']['includes'](_0x57ffd7))return null;const _0x2a1b57={'name':_0x57ffd7},_0x5ce57b=_0x2dcff0['output'][_0x315f94(0x124)](new RegExp(_0x57ffd7+_0x315f94(0x129),'i'));_0x5ce57b&&(_0x2a1b57[_0x315f94(0x121)]=_0x5ce57b[0x1][_0x315f94(0x128)]());const _0x5db393=_0x2dcff0[_0x315f94(0x13d)][_0x315f94(0x124)](new RegExp(_0x57ffd7+_0x315f94(0x134),'i'));_0x5db393&&(_0x2a1b57[_0x315f94(0x131)]=_0x5db393[0x1]);const _0x4d387e=_0x2dcff0['output']['match'](new RegExp(_0x57ffd7+'[\x5cs\x5cS]*?(enabled|disabled)','i'));return _0x4d387e&&(_0x2a1b57[_0x315f94(0x11d)]=_0x4d387e[0x1]['toLowerCase']()===_0x315f94(0x11d)),_0x2a1b57;}
|
|
@@ -1 +1 @@
|
|
|
1
|
-
const
|
|
1
|
+
const _0x1c2db5=_0x44d0;(function(_0x478bc4,_0x2bfaf9){const _0x606c8e=_0x44d0,_0x527679=_0x478bc4();while(!![]){try{const _0xe4e577=parseInt(_0x606c8e(0x1f6))/0x1*(-parseInt(_0x606c8e(0x1f3))/0x2)+-parseInt(_0x606c8e(0x1f4))/0x3*(parseInt(_0x606c8e(0x208))/0x4)+parseInt(_0x606c8e(0x1ff))/0x5+-parseInt(_0x606c8e(0x1f5))/0x6+-parseInt(_0x606c8e(0x200))/0x7+-parseInt(_0x606c8e(0x207))/0x8*(-parseInt(_0x606c8e(0x204))/0x9)+-parseInt(_0x606c8e(0x1f7))/0xa*(-parseInt(_0x606c8e(0x1fb))/0xb);if(_0xe4e577===_0x2bfaf9)break;else _0x527679['push'](_0x527679['shift']());}catch(_0x583003){_0x527679['push'](_0x527679['shift']());}}}(_0x128c,0xb2fdc));function _0x128c(){const _0x594df9=['YGSBZ','utf8','506qzfWZX','sCxmj','final','sha256','3051735KoFLiW','5235517BBLmMw','setAuthTag','update','subarray','113085xXuTUX','jYDiA','sPgPM','392cZdvND','4bpUufu','concat','344VjfGnn','3987417YjPNPl','1295376GSydhg','5701BmUrZf','604490ELCATy','ranger-auth-encryption'];_0x128c=function(){return _0x594df9;};return _0x128c();}function _0x44d0(_0x4a1d52,_0x152978){_0x4a1d52=_0x4a1d52-0x1f3;const _0x128c93=_0x128c();let _0x44d0ae=_0x128c93[_0x4a1d52];return _0x44d0ae;}import{createCipheriv,createDecipheriv,randomBytes,pbkdf2Sync}from'crypto';const ALGORITHM='aes-256-gcm',SALT=_0x1c2db5(0x1f8),KEY_LENGTH=0x20,IV_LENGTH=0x10,TAG_LENGTH=0x10;export function deriveKey(_0x1be77b){const _0x1b9b6d=_0x1c2db5,_0x198f5d={'LxLNs':_0x1b9b6d(0x1fe)};return pbkdf2Sync(_0x1be77b,SALT,0x186a0,KEY_LENGTH,_0x198f5d['LxLNs']);}export function encrypt(_0x1e650e,_0x5a8047){const _0x4e882e=_0x1c2db5,_0x1e913f={'sPgPM':function(_0x33ed79,_0x58448b,_0x5be92f,_0x1d4790){return _0x33ed79(_0x58448b,_0x5be92f,_0x1d4790);},'sCxmj':_0x4e882e(0x1fa)},_0x47c0af=deriveKey(_0x5a8047),_0x502812=randomBytes(IV_LENGTH),_0x1dc1b0=_0x1e913f[_0x4e882e(0x206)](createCipheriv,ALGORITHM,_0x47c0af,_0x502812),_0x4d1c49=Buffer[_0x4e882e(0x209)]([_0x1dc1b0[_0x4e882e(0x202)](_0x1e650e,_0x1e913f[_0x4e882e(0x1fc)]),_0x1dc1b0[_0x4e882e(0x1fd)]()]),_0x2acee4=_0x1dc1b0['getAuthTag']();return Buffer[_0x4e882e(0x209)]([_0x502812,_0x2acee4,_0x4d1c49]);}export function decrypt(_0xbcad8d,_0x3cabdd){const _0xa7c337=_0x1c2db5,_0x53eafb={'YGSBZ':function(_0x272bd8,_0x233ec9){return _0x272bd8+_0x233ec9;},'jYDiA':function(_0x5eb523,_0x2ec8cd){return _0x5eb523+_0x2ec8cd;},'qsVIX':function(_0x2e9dbf,_0x4dc23a,_0x2b1ca8,_0x9def6){return _0x2e9dbf(_0x4dc23a,_0x2b1ca8,_0x9def6);}},_0x272bf1=deriveKey(_0x3cabdd),_0x221254=_0xbcad8d['subarray'](0x0,IV_LENGTH),_0xcd53a=_0xbcad8d['subarray'](IV_LENGTH,_0x53eafb[_0xa7c337(0x1f9)](IV_LENGTH,TAG_LENGTH)),_0x399413=_0xbcad8d[_0xa7c337(0x203)](_0x53eafb[_0xa7c337(0x205)](IV_LENGTH,TAG_LENGTH)),_0x496127=_0x53eafb['qsVIX'](createDecipheriv,ALGORITHM,_0x272bf1,_0x221254);return _0x496127[_0xa7c337(0x201)](_0xcd53a),_0x496127['update'](_0x399413)+_0x496127[_0xa7c337(0x1fd)]('utf8');}
|
|
@@ -1 +1 @@
|
|
|
1
|
-
const
|
|
1
|
+
const _0x8c356=_0x47eb;function _0x47eb(_0x3534b0,_0x56c9fe){_0x3534b0=_0x3534b0-0x185;const _0x292a7e=_0x292a();let _0x47ebde=_0x292a7e[_0x3534b0];return _0x47ebde;}(function(_0x3d70c2,_0x18ab8d){const _0x35b72c=_0x47eb,_0x418a8b=_0x3d70c2();while(!![]){try{const _0x4522a1=parseInt(_0x35b72c(0x1b7))/0x1*(-parseInt(_0x35b72c(0x1a7))/0x2)+-parseInt(_0x35b72c(0x187))/0x3+-parseInt(_0x35b72c(0x198))/0x4*(-parseInt(_0x35b72c(0x1a2))/0x5)+-parseInt(_0x35b72c(0x188))/0x6*(-parseInt(_0x35b72c(0x1b2))/0x7)+parseInt(_0x35b72c(0x1b4))/0x8*(parseInt(_0x35b72c(0x1b5))/0x9)+parseInt(_0x35b72c(0x1b6))/0xa+-parseInt(_0x35b72c(0x19a))/0xb;if(_0x4522a1===_0x18ab8d)break;else _0x418a8b['push'](_0x418a8b['shift']());}catch(_0x1f69b6){_0x418a8b['push'](_0x418a8b['shift']());}}}(_0x292a,0x640ce));import{getToken}from'./keychain.js';import{getApiBaseUrl}from'./environment.js';import{getCurrentVersion}from'./version.js';const SENSITIVE_FLAGS=new Set(['--token','-t','--secret','--api-key','--apikey',_0x8c356(0x1b0),_0x8c356(0x197),'--pass',_0x8c356(0x190),'--authorization','--header',_0x8c356(0x1ba),'--credentials']),TOKEN_PATTERNS=[/^(ranger_|rngr_|sk-|pk-|api[_-]?)/i,/^[a-zA-Z0-9_-]{32,}$/,/^eyJ[a-zA-Z0-9_-]+\.[a-zA-Z0-9_-]+/];function looksLikeToken(_0x249d30){const _0x2a4b00=_0x8c356;return TOKEN_PATTERNS['some'](_0x39b053=>_0x39b053[_0x2a4b00(0x191)](_0x249d30));}export function sanitizeArgs(_0x13f0ae){const _0x5974e2=_0x8c356,_0x3348e7={'TvNnw':function(_0x566a40,_0x582dc0){return _0x566a40!==_0x582dc0;},'ILbaA':'[REDACTED]'},_0x568e53=[];let _0x428400=![];for(let _0x56b92a=0x0;_0x56b92a<_0x13f0ae[_0x5974e2(0x1ab)];_0x56b92a++){const _0x1d3e9d=_0x13f0ae[_0x56b92a];if(_0x428400){_0x568e53['push'](_0x5974e2(0x185)),_0x428400=![];continue;}if(_0x1d3e9d['startsWith']('--')||_0x1d3e9d[_0x5974e2(0x186)]('-')){const _0x23da28=_0x1d3e9d['indexOf']('=');if(_0x3348e7[_0x5974e2(0x19f)](_0x23da28,-0x1)){const _0x56b955=_0x1d3e9d['slice'](0x0,_0x23da28)['toLowerCase']();if(SENSITIVE_FLAGS[_0x5974e2(0x1a5)](_0x56b955)){_0x568e53['push'](_0x1d3e9d[_0x5974e2(0x18f)](0x0,_0x23da28)+'=[REDACTED]');continue;}}else{const _0x3f437c=_0x1d3e9d['toLowerCase']();SENSITIVE_FLAGS['has'](_0x3f437c)&&(_0x428400=!![]);}_0x568e53[_0x5974e2(0x19b)](_0x1d3e9d);}else looksLikeToken(_0x1d3e9d)?_0x568e53[_0x5974e2(0x19b)](_0x3348e7[_0x5974e2(0x18d)]):_0x568e53[_0x5974e2(0x19b)](_0x1d3e9d);}return _0x568e53[_0x5974e2(0x199)]('\x20');}function _0x292a(){const _0x531abc=['285810fTgmUa','1vkWSHt','invalid_option_value','xTtVe','--cookie','[REDACTED]','startsWith','1697640VEqFPD','77016nLxrnO','no_token','isTTY','catch','stringify','ILbaA','includes','slice','--auth','test','UsTci','errorMessage','error','IncVQ','unknown_command','--password','359212WZhFXP','join','8631348HylcwU','push','POST','missing_option','Unknown\x20command','TvNnw','dSHxQ','env','25fMCHrF','/api/v1/mcp/desire-path-logs','runtime_error','has','featureId','54242xBLGJV','stdout','[desire-path]\x20Payload:\x20','split','length','syntax_error','ZNUft','application/json','sessionId','--key','QXITm','434CWcjVx','rawCommand','67416lXhBsf','549uYCZDo'];_0x292a=function(){return _0x531abc;};return _0x292a();}export async function logDesirePath(_0x5cf6b3){const _0x3424aa=_0x8c356,_0x4a42cb={'mJSbU':function(_0x3f6e27){return _0x3f6e27();},'TiMqr':function(_0x2acf4f){return _0x2acf4f();},'oZaOP':_0x3424aa(0x189),'MNlfU':_0x3424aa(0x1ae),'rEiJI':'Authorization','aYqyf':_0x3424aa(0x19c)};try{const _0x11e319=await getToken()[_0x3424aa(0x18b)](()=>null),_0x4f0d9f=_0x4a42cb['mJSbU'](getApiBaseUrl),_0xb74bb9=_0x4a42cb['TiMqr'](getCurrentVersion),_0x24264c=_0x11e319?'has_token':_0x4a42cb['oZaOP'],_0x57b1a7={..._0x5cf6b3['metadata'],'authStatus':_0x24264c,'isTty':process[_0x3424aa(0x1a8)][_0x3424aa(0x18a)]??![]},_0x4d1912={'Content-Type':_0x4a42cb['MNlfU']};_0x11e319&&(_0x4d1912[_0x4a42cb['rEiJI']]='Bearer\x20'+_0x11e319);const _0x2d4b48={'rawCommand':_0x5cf6b3[_0x3424aa(0x1b3)],'errorMessage':_0x5cf6b3[_0x3424aa(0x193)],'errorType':_0x5cf6b3['errorType'],'featureId':_0x5cf6b3[_0x3424aa(0x1a6)],'sessionId':_0x5cf6b3[_0x3424aa(0x1af)],'metadata':_0x57b1a7,'cliVersion':_0xb74bb9};process[_0x3424aa(0x1a1)]['DEBUG']&&(console['error']('[desire-path]\x20Sending\x20log\x20to\x20'+_0x4f0d9f+_0x3424aa(0x1a3)),console[_0x3424aa(0x194)](_0x3424aa(0x1a9)+JSON[_0x3424aa(0x18c)](_0x2d4b48,null,0x2))),await fetch(_0x4f0d9f+'/api/v1/mcp/desire-path-logs',{'method':_0x4a42cb['aYqyf'],'headers':_0x4d1912,'body':JSON['stringify'](_0x2d4b48)});}catch(_0x133c43){process['env']['DEBUG']&&console['error']('[desire-path]\x20Failed\x20to\x20send:\x20'+_0x133c43);}}export function getErrorType(_0x539c38,_0x3c7f0){const _0x2188f5=_0x8c356,_0x51f579={'shPEP':_0x2188f5(0x19e),'dSHxQ':'Missing\x20required\x20argument','ZNUft':'unknown','IkQlJ':'Invalid\x20values','UsTci':'unknown_argument','xTtVe':_0x2188f5(0x1ac),'IncVQ':'Not\x20enough\x20non-option\x20arguments','QXITm':'missing_required_argument'},_0x200cbb='2|3|0|5|7|4|1|6'[_0x2188f5(0x1aa)]('|');let _0x398f38=0x0;while(!![]){switch(_0x200cbb[_0x398f38++]){case'0':if(_0x539c38['includes'](_0x51f579['shPEP']))return _0x2188f5(0x196);continue;case'1':if(_0x539c38['includes'](_0x51f579[_0x2188f5(0x1a0)]))return _0x2188f5(0x19d);continue;case'2':if(_0x3c7f0)return _0x2188f5(0x1a4);continue;case'3':if(!_0x539c38)return _0x51f579[_0x2188f5(0x1ad)];continue;case'4':if(_0x539c38[_0x2188f5(0x18e)](_0x51f579['IkQlJ']))return _0x2188f5(0x1b8);continue;case'5':if(_0x539c38['includes']('Unknown\x20argument'))return _0x51f579[_0x2188f5(0x192)];continue;case'6':return _0x51f579[_0x2188f5(0x1b9)];case'7':if(_0x539c38[_0x2188f5(0x18e)](_0x51f579[_0x2188f5(0x195)]))return _0x51f579[_0x2188f5(0x1b1)];continue;}break;}}
|