@ranger-testing/ranger-cli 2.4.3 → 2.4.5

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
Files changed (72) hide show
  1. package/build/cli.js +1 -1
  2. package/build/commands/addEnv.js +1 -1
  3. package/build/commands/authEncrypt.js +1 -1
  4. package/build/commands/clean.js +1 -1
  5. package/build/commands/config.js +1 -1
  6. package/build/commands/env.js +1 -1
  7. package/build/commands/feature.js +1 -1
  8. package/build/commands/hook.js +1 -1
  9. package/build/commands/hooks/autoPrompt.js +1 -1
  10. package/build/commands/hooks/disable.js +1 -1
  11. package/build/commands/hooks/enable.js +1 -1
  12. package/build/commands/hooks/exitPlanMode.js +1 -1
  13. package/build/commands/hooks/index.js +1 -1
  14. package/build/commands/hooks/output.js +1 -1
  15. package/build/commands/hooks/planReminder.js +1 -1
  16. package/build/commands/hooks/planStart.js +1 -1
  17. package/build/commands/hooks/postEdit.js +1 -1
  18. package/build/commands/hooks/preCompact.js +1 -1
  19. package/build/commands/hooks/sessionEnd.js +1 -1
  20. package/build/commands/hooks/sessionStart.js +1 -1
  21. package/build/commands/hooks/stopHook.js +1 -1
  22. package/build/commands/index.js +1 -1
  23. package/build/commands/login.js +1 -1
  24. package/build/commands/setup/claude.js +1 -1
  25. package/build/commands/setup/opencode.js +1 -1
  26. package/build/commands/setupCi.js +1 -1
  27. package/build/commands/skillup.js +1 -1
  28. package/build/commands/start.js +1 -1
  29. package/build/commands/status.js +1 -1
  30. package/build/commands/update.js +1 -1
  31. package/build/commands/updateEnv.js +1 -1
  32. package/build/commands/useEnv.js +1 -1
  33. package/build/commands/utils/activeProfile.js +1 -1
  34. package/build/commands/utils/agentEnv.js +1 -1
  35. package/build/commands/utils/browserSessionsApi.js +1 -1
  36. package/build/commands/utils/claudeConfig.js +1 -1
  37. package/build/commands/utils/claudeOverrideSettings.js +1 -0
  38. package/build/commands/utils/claudePlugin.js +1 -1
  39. package/build/commands/utils/crypto.js +1 -1
  40. package/build/commands/utils/desirePathLog.js +1 -1
  41. package/build/commands/utils/deviceAuth.js +1 -1
  42. package/build/commands/utils/environment.js +1 -1
  43. package/build/commands/utils/featureApi.js +1 -1
  44. package/build/commands/utils/featureReportGenerator.js +1 -1
  45. package/build/commands/utils/fixWebmDuration.js +1 -1
  46. package/build/commands/utils/git.js +1 -1
  47. package/build/commands/utils/keychain.js +1 -1
  48. package/build/commands/utils/localAgentInstallationsApi.js +1 -1
  49. package/build/commands/utils/mcpImageBase64.js +1 -1
  50. package/build/commands/utils/model.js +1 -1
  51. package/build/commands/utils/opencodeConfig.js +1 -1
  52. package/build/commands/utils/playwrightCli.js +1 -1
  53. package/build/commands/utils/profileMessages.js +1 -1
  54. package/build/commands/utils/profileSetupBanner.js +1 -1
  55. package/build/commands/utils/rangerConfig.js +1 -1
  56. package/build/commands/utils/rangerRoot.js +1 -1
  57. package/build/commands/utils/reportGenerator.js +1 -1
  58. package/build/commands/utils/retry.js +1 -1
  59. package/build/commands/utils/sessionCache.js +1 -1
  60. package/build/commands/utils/settings.js +1 -1
  61. package/build/commands/utils/skillContent.js +1 -1
  62. package/build/commands/utils/skills.js +1 -1
  63. package/build/commands/utils/stitchWebmFiles.js +1 -1
  64. package/build/commands/utils/telemetry.js +1 -1
  65. package/build/commands/utils/tokenRefresh.js +1 -0
  66. package/build/commands/utils/traceSnapshotMapper.js +1 -1
  67. package/build/commands/utils/userApi.js +1 -1
  68. package/build/commands/utils/version.js +1 -1
  69. package/build/commands/verifyFeature.js +1 -1
  70. package/build/commands/verifyFeatureCli.js +1 -1
  71. package/build/commands/verifyInBrowser.js +1 -1
  72. package/package.json +1 -1
@@ -1 +1 @@
1
- (function(_0x5d7b60,_0x528e94){const _0x9c1012=_0xf92a,_0x32315f=_0x5d7b60();while(!![]){try{const _0x58c581=parseInt(_0x9c1012(0x115))/0x1+parseInt(_0x9c1012(0xfa))/0x2+-parseInt(_0x9c1012(0x10f))/0x3*(parseInt(_0x9c1012(0xe3))/0x4)+-parseInt(_0x9c1012(0xe0))/0x5*(-parseInt(_0x9c1012(0x110))/0x6)+parseInt(_0x9c1012(0x127))/0x7*(parseInt(_0x9c1012(0xe6))/0x8)+-parseInt(_0x9c1012(0x11b))/0x9+parseInt(_0x9c1012(0xeb))/0xa*(-parseInt(_0x9c1012(0x11e))/0xb);if(_0x58c581===_0x528e94)break;else _0x32315f['push'](_0x32315f['shift']());}catch(_0x1f47d6){_0x32315f['push'](_0x32315f['shift']());}}}(_0x4b5a,0x591cf));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';function _0xf92a(_0x2dc285,_0x4c1251){_0x2dc285=_0x2dc285-0xdf;const _0x4b5a18=_0x4b5a();let _0xf92a96=_0x4b5a18[_0x2dc285];return _0xf92a96;}function _0x4b5a(){const _0x265eb1=['\x0aCould\x20not\x20check\x20latest\x20version:\x20','35uGHySm','version','Update\x20failed.','236AlIWKg','VPFRA','@latest','117176qRYWOX','GtugG','Claude\x20plugin\x20updated\x20(project\x20scope).','Checking\x20for\x20updates...','log','8873190VUxUdx','tDjbr','active-feature.txt','some','oyylK','IWMJO','platform','endsWith','inherit','\x20skill\x20','equve','length','active-profile.txt','jdaBu','rkyMa','838446fACrzo','uOZbu','pipe','project','EQOZb','install','BCFXy','IkMYn','plugin','\x0aNo\x20ranger-managed\x20skills\x20found\x20to\x20reinstall.','dunGT','\x0aSuccessfully\x20updated\x20to\x20version\x20','\x0a✅\x20Update\x20complete!','join','error','\x0aCurrent\x20version:\x20','ranger@trailhead','\x0aReinstalling\x20','jJFnm','RAeEF','\x0aClaude\x20marketplace\x20updated\x20(trailhead).','5862NZFUyi','25512moxvFQ','claude','YAJcG','Attempting\x20install\x20anyway...','scYeD','716003LSWCPG','RMfCi','Egyrf','win32','ikJGD','update','3053853ZoujRF','push','nOtAJ','11lzEwaA','user','findIndex','opencode','EKSuW','HUZbI','gMgRO','split','npm','259QdwdYD','✓\x20Migrated\x20active\x20profile\x20file'];_0x4b5a=function(){return _0x265eb1;};return _0x4b5a();}import{isMarketplaceAdded,isPluginInstalled}from'./utils/claudePlugin.js';async function runInstall(){const _0x174f07=_0xf92a,_0x3001e1={'rkyMa':function(_0x263bf8,_0x19882c){return _0x263bf8(_0x19882c);},'HEZFf':function(_0x2760bd,_0x1a6dce){return _0x2760bd===_0x1a6dce;},'nOtAJ':function(_0x2641fe,_0x4c97a1,_0x5be600,_0x5211e5){return _0x2641fe(_0x4c97a1,_0x5be600,_0x5211e5);},'CAlUC':_0x174f07(0xff),'YAJcG':'win32','RAeEF':'close'};return new Promise(_0x30c996=>{const _0x54ba99=_0x174f07,_0x55709e={'GtugG':function(_0x4fb207,_0x1468e0){const _0x59cdca=_0xf92a;return _0x3001e1[_0x59cdca(0xf9)](_0x4fb207,_0x1468e0);},'sxWcb':function(_0x2398a9,_0x119e81){return _0x3001e1['HEZFf'](_0x2398a9,_0x119e81);}};console['log']('\x0aInstalling\x20'+PACKAGE_NAME+'@latest...\x0a');const _0x55ddc2=_0x3001e1[_0x54ba99(0x11d)](spawn,_0x54ba99(0x126),[_0x3001e1['CAlUC'],'-g',PACKAGE_NAME+_0x54ba99(0xe5)],{'stdio':_0x54ba99(0xf3),'shell':process[_0x54ba99(0xf1)]===_0x3001e1[_0x54ba99(0x112)]});_0x55ddc2['on'](_0x3001e1[_0x54ba99(0x10d)],_0x3014e4=>{const _0x43f7a3=_0x54ba99;_0x55709e[_0x43f7a3(0xe7)](_0x30c996,_0x55709e['sxWcb'](_0x3014e4,0x0));}),_0x55ddc2['on']('error',()=>{_0x30c996(![]);});});}async function updateClaudeMarketplace(){const _0x5cfa34=_0xf92a,_0x15b6ab={'YczMI':function(_0xcb5f0b,_0x3bac07){return _0xcb5f0b(_0x3bac07);},'RMfCi':function(_0x22865c,_0x67347d){return _0x22865c===_0x67347d;},'TKqyy':'claude','AmaMQ':_0x5cfa34(0x102),'IWMJO':'marketplace','Egyrf':_0x5cfa34(0x11a),'EQOZb':_0x5cfa34(0xfc),'DZnUh':_0x5cfa34(0x118),'ikJGD':'close'};return new Promise(_0x4e87c3=>{const _0x3cd924=_0x5cfa34,_0x37f5a2={'nZAtT':function(_0x4720e0,_0x3bdef8){const _0x51d413=_0xf92a;return _0x15b6ab[_0x51d413(0x116)](_0x4720e0,_0x3bdef8);}},_0x17fcfc=spawn(_0x15b6ab['TKqyy'],[_0x15b6ab['AmaMQ'],_0x15b6ab[_0x3cd924(0xf0)],_0x15b6ab[_0x3cd924(0x117)],'trailhead'],{'stdio':_0x15b6ab[_0x3cd924(0xfe)],'shell':process['platform']===_0x15b6ab['DZnUh']});_0x17fcfc['on'](_0x15b6ab[_0x3cd924(0x119)],_0x5f5d1a=>{_0x4e87c3(_0x37f5a2['nZAtT'](_0x5f5d1a,0x0));}),_0x17fcfc['on']('error',()=>{_0x15b6ab['YczMI'](_0x4e87c3,![]);});});}async function updateClaudePlugin(_0x2af212){const _0x4a86b9=_0xf92a,_0x4e7a5f={'itnsv':function(_0x49021d,_0x466730){return _0x49021d(_0x466730);},'qpFYa':_0x4a86b9(0x102),'gMgRO':'claude','EKSuW':_0x4a86b9(0x118),'scYeD':'close'};return new Promise(_0x29e9a9=>{const _0x443eed=_0x4a86b9,_0xdd44ec={'jyXzA':function(_0x416209,_0x175f7f){return _0x4e7a5f['itnsv'](_0x416209,_0x175f7f);}},_0x37ab99=[_0x4e7a5f['qpFYa'],_0x443eed(0x11a),'ranger@trailhead'];_0x2af212&&_0x37ab99[_0x443eed(0x11c)]('--scope',_0x2af212);const _0x4f1e96=spawn(_0x4e7a5f[_0x443eed(0x124)],_0x37ab99,{'stdio':'pipe','shell':process['platform']===_0x4e7a5f[_0x443eed(0x122)]});_0x4f1e96['on'](_0x4e7a5f[_0x443eed(0x114)],_0x1e003a=>{_0x29e9a9(_0x1e003a===0x0);}),_0x4f1e96['on']('error',()=>{_0xdd44ec['jyXzA'](_0x29e9a9,![]);});});}function isSkillInstalled(_0x124581,_0x26139d,_0x42beb4){const _0x571e80=_0xf92a,_0x2bf62f={'dunGT':_0x571e80(0x121),'tDjbr':function(_0x198518,_0xf3d753){return _0x198518(_0xf3d753);}},_0x5f5c08=_0x42beb4===_0x2bf62f[_0x571e80(0x104)]?getOpencodeSkillsDir(_0x26139d):_0x2bf62f[_0x571e80(0xec)](getSkillsDir,_0x26139d),_0x278936=join(_0x5f5c08,_0x124581);return existsSync(_0x278936);}async function reinstallSkills(_0x7381fe){const _0x416705=_0xf92a,_0x26e9cb={'ZUShG':_0x416705(0x11f),'qXBvx':function(_0xa22eb7,_0x43b1ee,_0x3f8dc5,_0x25316f){return _0xa22eb7(_0x43b1ee,_0x3f8dc5,_0x25316f);},'uOZbu':_0x416705(0x111),'hOfxN':function(_0x15a209,_0x4dd3cb,_0x348066,_0x5a912d){return _0x15a209(_0x4dd3cb,_0x348066,_0x5a912d);}},_0x2355c3=[_0x416705(0xfd),_0x26e9cb['ZUShG']],_0x28de9a=[];for(const _0x562963 of _0x2355c3){for(const _0x389334 of RANGER_MANAGED_SKILLS){_0x26e9cb['qXBvx'](isSkillInstalled,_0x389334,_0x562963,_0x26e9cb['uOZbu'])&&_0x28de9a['push']({'skillName':_0x389334,'level':_0x562963,'platform':_0x26e9cb[_0x416705(0xfb)]}),_0x26e9cb['hOfxN'](isSkillInstalled,_0x389334,_0x562963,'opencode')&&_0x28de9a[_0x416705(0x11c)]({'skillName':_0x389334,'level':_0x562963,'platform':_0x416705(0x121)});}}for(const _0x3feeba of _0x2355c3){for(const _0x10f53a of DEPRECATED_SKILLS){await removeSkill(_0x10f53a,_0x3feeba);}}if(_0x28de9a[_0x416705(0xf6)]===0x0){console[_0x416705(0xea)](_0x416705(0x103));return;}console[_0x416705(0xea)](_0x416705(0x10b)+_0x28de9a['length']+'\x20ranger-managed\x20skill(s)...');for(const {skillName:_0x2673ca,level:_0x54e2cb,platform:_0x2fcba0}of _0x28de9a){try{await installSkill(_0x2673ca,{'level':_0x54e2cb,'cliVersion':_0x7381fe,'platform':_0x2fcba0});}catch(_0x3fc84f){console['warn']('\x20\x20Failed\x20to\x20reinstall\x20'+_0x2fcba0+'\x20'+_0x54e2cb+_0x416705(0xf4)+_0x2673ca+':',_0x3fc84f);}}}async function ensureActiveProfileGitignored(){const _0x22607a=_0xf92a,_0x17eb01={'gCTsn':function(_0x2113c6){return _0x2113c6();},'fvOfk':function(_0x1ce346,_0x10a535){return _0x1ce346(_0x10a535);},'pDBZB':'utf-8','HUZbI':'active-profile.txt','oyylK':function(_0x358797,_0x402af6,_0x2e4dd8,_0x35498a){return _0x358797(_0x402af6,_0x2e4dd8,_0x35498a);}},_0x3c8e00=join(_0x17eb01['gCTsn'](getRangerDir),'.gitignore');if(!_0x17eb01['fvOfk'](existsSync,_0x3c8e00))return![];let _0x1894dd='';try{_0x1894dd=await readFile(_0x3c8e00,_0x17eb01['pDBZB']);}catch{return![];}const _0x31b3d2=_0x1894dd[_0x22607a(0x125)](/\r?\n/);if(_0x31b3d2[_0x22607a(0xee)](_0x36de9e=>_0x36de9e['trim']()===_0x22607a(0xf7)))return![];let _0x3bed99=_0x31b3d2[_0x22607a(0x120)](_0x2c9896=>_0x2c9896['trim']()===_0x22607a(0xed));_0x3bed99===-0x1&&(_0x3bed99=_0x31b3d2['length']);_0x31b3d2['splice'](_0x3bed99,0x0,_0x17eb01[_0x22607a(0x123)]);let _0x1c542b=_0x31b3d2[_0x22607a(0x107)]('\x0a');!_0x1c542b[_0x22607a(0xf2)]('\x0a')&&(_0x1c542b+='\x0a');try{await _0x17eb01[_0x22607a(0xef)](writeFile,_0x3c8e00,_0x1c542b,_0x17eb01['pDBZB']);}catch{return![];}return!![];}export async function update(){const _0xf5bcbb=_0xf92a,_0x46e50c={'VPFRA':function(_0x596489){return _0x596489();},'WlcfC':_0xf5bcbb(0xe9),'equve':_0xf5bcbb(0x113),'jJFnm':'\x0aSuccessfully\x20installed\x20latest\x20version.','IkMYn':function(_0x27f1a6){return _0x27f1a6();},'HXbzR':function(_0x45afa3,_0xcdb750,_0x4f5488){return _0x45afa3(_0xcdb750,_0x4f5488);},'BCFXy':function(_0x1bb36e,_0x3a0b4f){return _0x1bb36e===_0x3a0b4f;},'VkNRW':function(_0xa3136c,_0x5c6714){return _0xa3136c(_0x5c6714);},'avzoa':'trailhead','jdaBu':_0xf5bcbb(0x10e),'mhaLe':'\x0aClaude\x20plugin\x20updated\x20(user\x20scope).','lbWta':_0xf5bcbb(0xfd)},_0x18a57c=_0x46e50c[_0xf5bcbb(0xe4)](getCurrentVersion);console[_0xf5bcbb(0xea)](_0xf5bcbb(0x109)+_0x18a57c),console[_0xf5bcbb(0xea)](_0x46e50c['WlcfC']);const _0x2f350f=getLatestVersion();let _0x914923=_0x18a57c;if(!_0x2f350f[_0xf5bcbb(0xe1)]){console['warn'](_0xf5bcbb(0xdf)+_0x2f350f[_0xf5bcbb(0x108)]),console[_0xf5bcbb(0xea)](_0x46e50c[_0xf5bcbb(0xf5)]);const _0xab334b=await _0x46e50c['VPFRA'](runInstall);if(_0xab334b)console[_0xf5bcbb(0xea)](_0x46e50c[_0xf5bcbb(0x10c)]),_0x914923=_0x46e50c[_0xf5bcbb(0x101)](getCurrentVersion);else throw new Error('Update\x20failed:\x20'+_0x2f350f['error']);}else{const _0x508247=_0x2f350f[_0xf5bcbb(0xe1)];console[_0xf5bcbb(0xea)]('Latest\x20version:\x20\x20'+_0x508247);const _0x142be1=_0x46e50c['HXbzR'](compareVersions,_0x18a57c,_0x508247);if(_0x46e50c[_0xf5bcbb(0x100)](_0x142be1,0x0))console[_0xf5bcbb(0xea)]('\x0aYou\x20are\x20already\x20on\x20the\x20latest\x20version.');else{if(_0x142be1<0x0)console['log']('\x0aYour\x20version\x20('+_0x18a57c+')\x20is\x20newer\x20than\x20the\x20published\x20version\x20('+_0x508247+').');else{const _0x2710b8=await runInstall();if(_0x2710b8)console['log'](_0xf5bcbb(0x105)+_0x508247),_0x914923=_0x508247;else throw new Error(_0xf5bcbb(0xe2));}}}await reinstallSkills(_0x914923);const _0x5bee87=await _0x46e50c['VkNRW'](isMarketplaceAdded,_0x46e50c['avzoa']),_0x179af7=await _0x46e50c['VkNRW'](isPluginInstalled,_0xf5bcbb(0x10a));if(_0x5bee87){const _0x34a374=await _0x46e50c['IkMYn'](updateClaudeMarketplace);_0x34a374&&console[_0xf5bcbb(0xea)](_0x46e50c[_0xf5bcbb(0xf8)]);}if(_0x179af7){const _0x425ac0=await updateClaudePlugin();_0x425ac0&&console[_0xf5bcbb(0xea)](_0x46e50c['mhaLe']);const _0x3d5eaa=await updateClaudePlugin(_0x46e50c['lbWta']);_0x3d5eaa&&console['log']((_0x425ac0?'':'\x0a')+_0xf5bcbb(0xe8));}const _0x3a35ba=await _0x46e50c[_0xf5bcbb(0xe4)](migrateActiveProfileFile);_0x3a35ba&&console['log'](_0xf5bcbb(0x128));const _0x38776f=await ensureActiveProfileGitignored();console['log'](_0xf5bcbb(0x106));}
1
+ (function(_0x112c53,_0x1d963e){const _0xf89491=_0x49f4,_0x4f7df5=_0x112c53();while(!![]){try{const _0x385fe5=parseInt(_0xf89491(0x107))/0x1*(-parseInt(_0xf89491(0xec))/0x2)+parseInt(_0xf89491(0xf1))/0x3*(parseInt(_0xf89491(0x126))/0x4)+parseInt(_0xf89491(0x100))/0x5*(-parseInt(_0xf89491(0x106))/0x6)+parseInt(_0xf89491(0x11c))/0x7*(parseInt(_0xf89491(0xfe))/0x8)+parseInt(_0xf89491(0xea))/0x9*(parseInt(_0xf89491(0xee))/0xa)+-parseInt(_0xf89491(0x11f))/0xb*(parseInt(_0xf89491(0xff))/0xc)+parseInt(_0xf89491(0x115))/0xd;if(_0x385fe5===_0x1d963e)break;else _0x4f7df5['push'](_0x4f7df5['shift']());}catch(_0x3a818e){_0x4f7df5['push'](_0x4f7df5['shift']());}}}(_0x3f0b,0xf1340));function _0x3f0b(){const _0x68b23d=[')\x20is\x20newer\x20than\x20the\x20published\x20version\x20(','woYbp','1530692wqAZOE','ranger@trailhead','log','qiTUX','pipe','GPrZq','\x0aYou\x20are\x20already\x20on\x20the\x20latest\x20version.','warn','iaXZx','207HkhLkB','\x0aClaude\x20plugin\x20updated\x20(user\x20scope).','120IlBtqf','plugin','374660jVNdFm','gccjE','@latest','9OJiJPX','Xrioh','IlIPA','\x0aCould\x20not\x20check\x20latest\x20version:\x20','project','\x0aClaude\x20marketplace\x20updated\x20(trailhead).','split','marketplace','Update\x20failed.','luVay','\x20skill\x20','platform','SqNeM','6211768CFVBEI','12VuxRPt','138625XMLkxy','error','active-feature.txt','\x20ranger-managed\x20skill(s)...','hPkKm','Munti','36vTlTNr','27249CPfVgT','utf-8','length','gqoPi','zKffT','active-profile.txt','splice','SRmrS','DXUxA','close','isEci','update','RGFtu','\x0aCurrent\x20version:\x20','14106157eAfoUs','--scope','\x0aNo\x20ranger-managed\x20skills\x20found\x20to\x20reinstall.','version','EVhwy','Attempting\x20install\x20anyway...','join','7MutoLn','KQAwF','claude','11902429jrPNTY','push','fESCY','YvrCp','\x20\x20Failed\x20to\x20reinstall\x20'];_0x3f0b=function(){return _0x68b23d;};return _0x3f0b();}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 _0xda63cd={'isEci':function(_0xb89ee2,_0x30d0b1){return _0xb89ee2(_0x30d0b1);},'uucAd':function(_0x170beb,_0x1e730e){return _0x170beb===_0x1e730e;},'bKbfx':'npm','zKffT':function(_0xb9da46,_0x5bd84b){return _0xb9da46===_0x5bd84b;},'JvLfA':'win32'};return new Promise(_0x16c085=>{const _0x5e48ea=_0x49f4,_0x58640e={'qiTUX':function(_0x1e7ffb,_0x1ab2fe){return _0x1e7ffb(_0x1ab2fe);}};console['log']('\x0aInstalling\x20'+PACKAGE_NAME+'@latest...\x0a');const _0x1d50f2=spawn(_0xda63cd['bKbfx'],['install','-g',PACKAGE_NAME+_0x5e48ea(0xf0)],{'stdio':'inherit','shell':_0xda63cd[_0x5e48ea(0x10b)](process[_0x5e48ea(0xfc)],_0xda63cd['JvLfA'])});_0x1d50f2['on']('close',_0x43e9c0=>{const _0x3490dd=_0x5e48ea;_0xda63cd[_0x3490dd(0x111)](_0x16c085,_0xda63cd['uucAd'](_0x43e9c0,0x0));}),_0x1d50f2['on'](_0x5e48ea(0x101),()=>{const _0x35cea6=_0x5e48ea;_0x58640e[_0x35cea6(0x129)](_0x16c085,![]);});});}async function updateClaudeMarketplace(){const _0x53778e=_0x49f4,_0x616a11={'iaXZx':function(_0x1e868f,_0x3609fd){return _0x1e868f(_0x3609fd);},'RfhaC':'trailhead','trhCl':function(_0x2a7bfc,_0x3dcaea){return _0x2a7bfc===_0x3dcaea;},'PDayQ':_0x53778e(0x110)};return new Promise(_0x57ce3a=>{const _0x2882eb=_0x53778e,_0x3396ac={'UGhNJ':function(_0x4a5384,_0x3f91e9){return _0x4a5384(_0x3f91e9);},'Munti':function(_0x7b5b6e,_0x428ef2){return _0x7b5b6e===_0x428ef2;}},_0x19a943=spawn('claude',[_0x2882eb(0xed),_0x2882eb(0xf8),_0x2882eb(0x112),_0x616a11['RfhaC']],{'stdio':'pipe','shell':_0x616a11['trhCl'](process['platform'],'win32')});_0x19a943['on'](_0x616a11['PDayQ'],_0x27941a=>{const _0x3edc05=_0x2882eb;_0x3396ac['UGhNJ'](_0x57ce3a,_0x3396ac[_0x3edc05(0x105)](_0x27941a,0x0));}),_0x19a943['on'](_0x2882eb(0x101),()=>{const _0x825bc9=_0x2882eb;_0x616a11[_0x825bc9(0xe9)](_0x57ce3a,![]);});});}async function updateClaudePlugin(_0x177958){const _0x3d83fb=_0x49f4,_0x2f8755={'juAic':_0x3d83fb(0xed),'rMWjt':_0x3d83fb(0x116),'Ushbr':function(_0x51e05a,_0x5acb5e,_0x55be8d,_0x19deb4){return _0x51e05a(_0x5acb5e,_0x55be8d,_0x19deb4);},'luVay':_0x3d83fb(0xe5),'ilere':_0x3d83fb(0x110)};return new Promise(_0x168760=>{const _0x2b4623=_0x3d83fb,_0x575c36={'wfRGV':function(_0x5beb50,_0x56998e){return _0x5beb50(_0x56998e);},'SRmrS':function(_0x3a660d,_0x211cde){return _0x3a660d===_0x211cde;}},_0x24fbe9=[_0x2f8755['juAic'],'update',_0x2b4623(0x127)];_0x177958&&_0x24fbe9['push'](_0x2f8755['rMWjt'],_0x177958);const _0x11f0b6=_0x2f8755['Ushbr'](spawn,_0x2b4623(0x11e),_0x24fbe9,{'stdio':_0x2f8755[_0x2b4623(0xfa)],'shell':process['platform']==='win32'});_0x11f0b6['on'](_0x2f8755['ilere'],_0x4034d6=>{const _0x5249e9=_0x2b4623;_0x575c36['wfRGV'](_0x168760,_0x575c36[_0x5249e9(0x10e)](_0x4034d6,0x0));}),_0x11f0b6['on']('error',()=>{_0x168760(![]);});});}function _0x49f4(_0x349a2a,_0x3a17f4){_0x349a2a=_0x349a2a-0xe5;const _0x3f0baa=_0x3f0b();let _0x49f4e8=_0x3f0baa[_0x349a2a];return _0x49f4e8;}function isSkillInstalled(_0x15be4f,_0x165d4e,_0x52e336){const _0x42fed8=_0x49f4,_0x2e894b={'SqNeM':function(_0x5bf92e,_0x142e68){return _0x5bf92e===_0x142e68;},'dFIWo':'opencode','FPjkl':function(_0x59a089,_0x20c824,_0x1ebd88){return _0x59a089(_0x20c824,_0x1ebd88);}},_0x316bb2=_0x2e894b[_0x42fed8(0xfd)](_0x52e336,_0x2e894b['dFIWo'])?getOpencodeSkillsDir(_0x165d4e):getSkillsDir(_0x165d4e),_0x3b933d=_0x2e894b['FPjkl'](join,_0x316bb2,_0x15be4f);return existsSync(_0x3b933d);}async function reinstallSkills(_0x5bdd30){const _0x33e1ba=_0x49f4,_0x395f0a={'gqoPi':_0x33e1ba(0xf5),'WrMOY':'user','qZZlN':function(_0x4be098,_0x1c92b4,_0x35b689,_0x38388d){return _0x4be098(_0x1c92b4,_0x35b689,_0x38388d);},'CVHPF':'opencode','gWvOz':function(_0x4d7247,_0x5d7012,_0x524ca3){return _0x4d7247(_0x5d7012,_0x524ca3);},'Xrioh':_0x33e1ba(0x117)},_0x480179=[_0x395f0a[_0x33e1ba(0x10a)],_0x395f0a['WrMOY']],_0x210473=[];for(const _0x41c583 of _0x480179){for(const _0x41a97a of RANGER_MANAGED_SKILLS){isSkillInstalled(_0x41a97a,_0x41c583,'claude')&&_0x210473[_0x33e1ba(0x120)]({'skillName':_0x41a97a,'level':_0x41c583,'platform':'claude'}),_0x395f0a['qZZlN'](isSkillInstalled,_0x41a97a,_0x41c583,_0x395f0a['CVHPF'])&&_0x210473[_0x33e1ba(0x120)]({'skillName':_0x41a97a,'level':_0x41c583,'platform':_0x395f0a['CVHPF']});}}for(const _0x333de1 of _0x480179){for(const _0x2b683c of DEPRECATED_SKILLS){await _0x395f0a['gWvOz'](removeSkill,_0x2b683c,_0x333de1);}}if(_0x210473[_0x33e1ba(0x109)]===0x0){console[_0x33e1ba(0x128)](_0x395f0a[_0x33e1ba(0xf2)]);return;}console[_0x33e1ba(0x128)]('\x0aReinstalling\x20'+_0x210473[_0x33e1ba(0x109)]+_0x33e1ba(0x103));for(const {skillName:_0x2d430a,level:_0x3c4461,platform:_0xed6225}of _0x210473){try{await _0x395f0a['gWvOz'](installSkill,_0x2d430a,{'level':_0x3c4461,'cliVersion':_0x5bdd30,'platform':_0xed6225});}catch(_0x1dcf12){console[_0x33e1ba(0xe8)](_0x33e1ba(0x123)+_0xed6225+'\x20'+_0x3c4461+_0x33e1ba(0xfb)+_0x2d430a+':',_0x1dcf12);}}}async function ensureActiveProfileGitignored(){const _0x5f2b13=_0x49f4,_0x144208={'fESCY':function(_0xc98ca2,_0x148028,_0x2c1139){return _0xc98ca2(_0x148028,_0x2c1139);},'hPkKm':function(_0x386527){return _0x386527();},'GPrZq':function(_0x25897e,_0x5b1a0c){return _0x25897e===_0x5b1a0c;},'XRVUI':_0x5f2b13(0x10c)},_0x2a4e4c=_0x144208[_0x5f2b13(0x121)](join,_0x144208[_0x5f2b13(0x104)](getRangerDir),'.gitignore');if(!existsSync(_0x2a4e4c))return![];let _0x7501af='';try{_0x7501af=await readFile(_0x2a4e4c,_0x5f2b13(0x108));}catch{return![];}const _0x1cf62e=_0x7501af[_0x5f2b13(0xf7)](/\r?\n/);if(_0x1cf62e['some'](_0x3c654b=>_0x3c654b['trim']()===_0x5f2b13(0x10c)))return![];let _0x1a2416=_0x1cf62e['findIndex'](_0x4ef4ef=>_0x4ef4ef['trim']()===_0x5f2b13(0x102));_0x144208[_0x5f2b13(0xe6)](_0x1a2416,-0x1)&&(_0x1a2416=_0x1cf62e[_0x5f2b13(0x109)]);_0x1cf62e[_0x5f2b13(0x10d)](_0x1a2416,0x0,_0x144208['XRVUI']);let _0xf45621=_0x1cf62e[_0x5f2b13(0x11b)]('\x0a');!_0xf45621['endsWith']('\x0a')&&(_0xf45621+='\x0a');try{await writeFile(_0x2a4e4c,_0xf45621,_0x5f2b13(0x108));}catch{return![];}return!![];}export async function update(){const _0x339e5e=_0x49f4,_0x2812c6={'MVwMR':function(_0x22f164){return _0x22f164();},'KQAwF':function(_0x3830a5){return _0x3830a5();},'DXUxA':_0x339e5e(0x11a),'lQBDv':function(_0x3e0a4f){return _0x3e0a4f();},'EVhwy':function(_0x203c85,_0x274a8d,_0x4642d3){return _0x203c85(_0x274a8d,_0x4642d3);},'RGFtu':function(_0x2964a5,_0x28a210){return _0x2964a5<_0x28a210;},'pFEFj':function(_0x4f54e5,_0x3ac5f0){return _0x4f54e5(_0x3ac5f0);},'gccjE':function(_0x1de488){return _0x1de488();},'eFJaU':_0x339e5e(0xeb),'YvrCp':_0x339e5e(0xf5),'woYbp':function(_0x291589){return _0x291589();},'IlIPA':'\x0a✅\x20Update\x20complete!'},_0x2199f6=_0x2812c6['MVwMR'](getCurrentVersion);console['log'](_0x339e5e(0x114)+_0x2199f6),console['log']('Checking\x20for\x20updates...');const _0x5b9611=_0x2812c6[_0x339e5e(0x11d)](getLatestVersion);let _0x1d32b9=_0x2199f6;if(!_0x5b9611[_0x339e5e(0x118)]){console[_0x339e5e(0xe8)](_0x339e5e(0xf4)+_0x5b9611['error']),console[_0x339e5e(0x128)](_0x2812c6[_0x339e5e(0x10f)]);const _0x25b367=await runInstall();if(_0x25b367)console[_0x339e5e(0x128)]('\x0aSuccessfully\x20installed\x20latest\x20version.'),_0x1d32b9=_0x2812c6['lQBDv'](getCurrentVersion);else throw new Error('Update\x20failed:\x20'+_0x5b9611[_0x339e5e(0x101)]);}else{const _0xc49d30=_0x5b9611[_0x339e5e(0x118)];console['log']('Latest\x20version:\x20\x20'+_0xc49d30);const _0x2b3d8a=_0x2812c6[_0x339e5e(0x119)](compareVersions,_0x2199f6,_0xc49d30);if(_0x2b3d8a===0x0)console['log'](_0x339e5e(0xe7));else{if(_0x2812c6[_0x339e5e(0x113)](_0x2b3d8a,0x0))console[_0x339e5e(0x128)]('\x0aYour\x20version\x20('+_0x2199f6+_0x339e5e(0x124)+_0xc49d30+').');else{const _0xf6caa=await runInstall();if(_0xf6caa)console[_0x339e5e(0x128)]('\x0aSuccessfully\x20updated\x20to\x20version\x20'+_0xc49d30),_0x1d32b9=_0xc49d30;else throw new Error(_0x339e5e(0xf9));}}}await _0x2812c6['pFEFj'](reinstallSkills,_0x1d32b9);const _0x46a504=await isMarketplaceAdded('trailhead'),_0x1f46de=await isPluginInstalled('ranger@trailhead');if(_0x46a504){const _0x47fc24=await updateClaudeMarketplace();_0x47fc24&&console['log'](_0x339e5e(0xf6));}if(_0x1f46de){const _0x36df5f=await _0x2812c6[_0x339e5e(0xef)](updateClaudePlugin);_0x36df5f&&console[_0x339e5e(0x128)](_0x2812c6['eFJaU']);const _0x521e69=await updateClaudePlugin(_0x2812c6[_0x339e5e(0x122)]);_0x521e69&&console['log']((_0x36df5f?'':'\x0a')+'Claude\x20plugin\x20updated\x20(project\x20scope).');}const _0x12be69=await _0x2812c6[_0x339e5e(0x125)](migrateActiveProfileFile);_0x12be69&&console['log']('✓\x20Migrated\x20active\x20profile\x20file');const _0x3aaaed=await ensureActiveProfileGitignored();console['log'](_0x2812c6[_0x339e5e(0xf3)]);}
@@ -1 +1 @@
1
- (function(_0xadb0b8,_0x3b9f37){const _0x3bf010=_0xc387,_0x3e57bc=_0xadb0b8();while(!![]){try{const _0x500365=parseInt(_0x3bf010(0x1b7))/0x1*(-parseInt(_0x3bf010(0x19d))/0x2)+parseInt(_0x3bf010(0x1ad))/0x3+-parseInt(_0x3bf010(0x1bd))/0x4*(-parseInt(_0x3bf010(0x1b0))/0x5)+-parseInt(_0x3bf010(0x1c4))/0x6+parseInt(_0x3bf010(0x1a2))/0x7*(parseInt(_0x3bf010(0x1a1))/0x8)+-parseInt(_0x3bf010(0x1be))/0x9*(parseInt(_0x3bf010(0x199))/0xa)+parseInt(_0x3bf010(0x19c))/0xb;if(_0x500365===_0x3b9f37)break;else _0x3e57bc['push'](_0x3e57bc['shift']());}catch(_0x5f502e){_0x3e57bc['push'](_0x3e57bc['shift']());}}}(_0x5b25,0x3d4d3));function _0x5b25(){const _0x58ba84=['48140hIRzNU','2700LTLCjt','\x22\x20not\x20found.\x20Run\x20first:\x20ranger\x20profile\x20add\x20','stdin','\x20\x20Run\x20ranger\x20setup\x20in\x20CI\x20to\x20decrypt\x20at\x20runtime.','browser','browser_auth','1983804PTkrge','launch','rRuRK','\x20\x20\x20When\x20you\x20are\x20done,\x20close\x20the\x20browser.\x0a','error','3900FigXKC','\x0a✅\x20Profile\x20\x22','✓\x20Updated\x20config:\x20','2165702inVuvy','4fjDOmO','safeMode','baseUrl','stdout','56552lhvmUr','161xEworg','✓\x20Encrypted\x20auth\x20saved\x20to:\x20','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','\x20\x20You\x20can\x20safely\x20commit\x20this\x20file\x20to\x20git.','fnowo','string','\x0aThe\x20browser\x20closed\x20unexpectedly\x20before\x20authentication\x20could\x20be\x20saved.','\x20\x20\x20A\x20browser\x20will\x20open\x20with\x20your\x20existing\x20session\x20(if\x20any).','Jqlsi','YisnN','about:blank','59070QCpkLP','\x20\x20\x20Update\x20your\x20authentication\x20as\x20needed.','setupHeaders','140tFDCbE','storageState','VHiWM','QHSfI','\x0a📋\x20Authentication\x20Update','mVhxo','qcSjQ','8707mfpJoR','catch','extraHTTPHeaders','isTTY','log','yJcQJ'];_0x5b25=function(){return _0x58ba84;};return _0x5b25();}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';function _0xc387(_0x547777,_0xf15e54){_0x547777=_0x547777-0x198;const _0x5b25d4=_0x5b25();let _0xc387f9=_0x5b25d4[_0x547777];return _0xc387f9;}import{getToken}from'./utils/keychain.js';import{buildBrowserOptionsFromSettings,getEnvDir,isEnvCi,resolveEnvVars}from'./utils/settings.js';import{addProfileSetupBanner}from'./utils/profileSetupBanner.js';export async function updateEnv(_0x4479b9,_0x21732c,_0x5c859b){const _0x365fc9=_0xc387,_0xa8509f={'rRuRK':'Saving\x20authentication\x20state...','YisnN':'settings.json','QHSfI':'auth.json','yJcQJ':function(_0x28a8a6,_0x51a14d){return _0x28a8a6(_0x51a14d);},'mVhxo':function(_0x2fd609,_0xd2029,_0x4f1c92){return _0x2fd609(_0xd2029,_0x4f1c92);},'Jqlsi':function(_0xd7a2d3,_0x2f6c38){return _0xd7a2d3===_0x2f6c38;},'AtmKS':_0x365fc9(0x1c3),'VHiWM':_0x365fc9(0x1a9),'qcSjQ':_0x365fc9(0x1ae),'raKak':_0x365fc9(0x1c7),'ePWoe':_0x365fc9(0x1a8),'HGURB':'Browser\x20closed\x20before\x20authentication\x20was\x20saved.','YMmMC':'utf-8','jbWXE':function(_0x509fd3){return _0x509fd3();},'HBIwc':'\x20\x20Could\x20not\x20encrypt:\x20No\x20API\x20token\x20found.\x20Run:\x20ranger\x20setup\x20[token]','WiZco':function(_0x392080,_0x4c6084,_0xef6851){return _0x392080(_0x4c6084,_0xef6851);},'fnowo':'config_write'},_0x357fef=getEnvDir(_0x4479b9),_0x234ff9=join(_0x357fef,_0xa8509f[_0x365fc9(0x1ab)]),_0x12729c=join(_0x357fef,_0xa8509f[_0x365fc9(0x1b3)]),_0x560356=_0x12729c+'.enc',_0x1d2759=process[_0x365fc9(0x1c0)]['isTTY']&&process[_0x365fc9(0x1a0)][_0x365fc9(0x1ba)];if(!_0x1d2759)throw new Error(_0x365fc9(0x1a4));if(!_0xa8509f[_0x365fc9(0x1bc)](existsSync,_0x357fef))throw new Error('Profile\x20\x22'+_0x4479b9+_0x365fc9(0x1bf)+_0x4479b9);if(!existsSync(_0x234ff9))throw new Error('Config\x20not\x20found\x20at\x20'+_0x234ff9+'.\x20Run\x20first:\x20ranger\x20profile\x20add\x20'+_0x4479b9);const _0x3f9c73=await _0xa8509f[_0x365fc9(0x1b5)](readFile,_0x234ff9,'utf-8'),_0x5bdbfe=JSON['parse'](_0x3f9c73),_0x3237bb=resolveEnvVars(_0x5bdbfe),_0x29de9c=_0xa8509f[_0x365fc9(0x1aa)](typeof _0x3237bb['baseUrl'],_0x365fc9(0x1a7))?_0x3237bb[_0x365fc9(0x19f)]:undefined,_0x872119=existsSync(_0x12729c),_0x3a7760=_0xa8509f['yJcQJ'](isEnvCi,_0x4479b9);_0x21732c?.['trackPhaseStart'](_0xa8509f['AtmKS']),console['log'](_0x365fc9(0x1b4)),console['log'](_0xa8509f[_0x365fc9(0x1b2)]),console[_0x365fc9(0x1bb)](_0xa8509f[_0x365fc9(0x1b6)]),console['log'](_0xa8509f['raKak']);const {launchOptions:_0x14c90f,contextOptions:_0x2719ee}=buildBrowserOptionsFromSettings(_0x3237bb,{'headless':![],'storageStatePath':_0x872119?_0x12729c:undefined});_0x3237bb[_0x365fc9(0x1af)]&&(_0x2719ee[_0x365fc9(0x1b9)]={..._0x2719ee[_0x365fc9(0x1b9)],..._0x3237bb['setupHeaders']});const _0x326555=await chromium[_0x365fc9(0x1c5)](_0x14c90f);let _0x422699=null;try{_0x422699=await _0x326555['newContext'](_0x2719ee),await addProfileSetupBanner(_0x422699);const _0x210098=await _0x422699['newPage']();await _0x210098['goto'](_0x29de9c||_0x365fc9(0x1ac));let _0x124946=![];await new Promise(_0x17eff7=>{_0x210098['on']('close',async()=>{const _0x3e54a3=_0xc387;try{console[_0x3e54a3(0x1bb)](_0xa8509f[_0x3e54a3(0x1c6)]),await _0x422699?.[_0x3e54a3(0x1b1)]({'path':_0x12729c}),_0x124946=!![];}catch{}_0x17eff7();});});if(!_0x124946){console[_0x365fc9(0x1bb)](_0xa8509f['ePWoe']);!_0x3237bb[_0x365fc9(0x19e)]&&(console[_0x365fc9(0x1bb)]('This\x20can\x20happen\x20due\x20to\x20a\x20browser\x20compatibility\x20issue\x20on\x20some\x20systems.\x0a'),console[_0x365fc9(0x1bb)]('Enable\x20safe\x20mode\x20and\x20try\x20again:\x20ranger\x20profile\x20config\x20set\x20'+_0x4479b9+'\x20safeMode\x20true\x0a'));throw new Error(_0xa8509f['HGURB']);}}finally{_0x422699&&await _0x422699['close']()[_0x365fc9(0x1b8)](()=>{}),await _0x326555['close']()['catch'](()=>{});}if(_0x3a7760){const _0x23b16f=await readFile(_0x12729c,_0xa8509f['YMmMC']),_0x2328f0=await _0xa8509f['jbWXE'](getToken);if(!_0x2328f0)console[_0x365fc9(0x198)](_0xa8509f['HBIwc']),console['log']('✓\x20Auth\x20state\x20saved\x20to:\x20'+_0x12729c);else{const _0x2eca5b=encrypt(_0x23b16f,_0x2328f0);await _0xa8509f['WiZco'](writeFile,_0x560356,_0x2eca5b),await unlink(_0x12729c),console['log'](_0x365fc9(0x1a3)+_0x560356),console['log'](_0x365fc9(0x1a5)),console[_0x365fc9(0x1bb)](_0x365fc9(0x1c1));}}else console['log']('✓\x20Auth\x20state\x20saved\x20to:\x20'+_0x12729c);_0x21732c?.['trackPhaseEnd'](_0x365fc9(0x1c3)),_0x21732c?.['trackPhaseStart']('config_write'),_0x5bdbfe['browser']=_0x5bdbfe[_0x365fc9(0x1c2)]||{},_0x5bdbfe[_0x365fc9(0x1c2)]['contextOptions']=_0x5bdbfe[_0x365fc9(0x1c2)]['contextOptions']||{},_0x5bdbfe['browser']['contextOptions']['storageState']=_0x12729c,_0x5c859b?.['allowInsecureLocalhost']===!![]&&(_0x5bdbfe['allowInsecureLocalhost']=!![]),await writeFile(_0x234ff9,JSON['stringify'](_0x5bdbfe,null,0x2)),console[_0x365fc9(0x1bb)](_0x365fc9(0x19b)+_0x234ff9),_0x21732c?.['trackPhaseEnd'](_0xa8509f[_0x365fc9(0x1a6)]),console['log'](_0x365fc9(0x19a)+_0x4479b9+'\x22\x20authentication\x20updated');}
1
+ (function(_0x11ab76,_0x207d87){const _0x4c9cbb=_0x2892,_0xe161fe=_0x11ab76();while(!![]){try{const _0xb12cab=parseInt(_0x4c9cbb(0x96))/0x1+-parseInt(_0x4c9cbb(0x91))/0x2+parseInt(_0x4c9cbb(0x7c))/0x3*(-parseInt(_0x4c9cbb(0x92))/0x4)+-parseInt(_0x4c9cbb(0xa1))/0x5+-parseInt(_0x4c9cbb(0xa2))/0x6*(parseInt(_0x4c9cbb(0x8a))/0x7)+-parseInt(_0x4c9cbb(0xa8))/0x8*(-parseInt(_0x4c9cbb(0x89))/0x9)+-parseInt(_0x4c9cbb(0x87))/0xa*(-parseInt(_0x4c9cbb(0x9b))/0xb);if(_0xb12cab===_0x207d87)break;else _0xe161fe['push'](_0xe161fe['shift']());}catch(_0x4ff485){_0xe161fe['push'](_0xe161fe['shift']());}}}(_0x378c,0xd1e34));import{writeFile,readFile,unlink}from'fs/promises';import{join}from'path';import{existsSync}from'fs';import{chromium}from'playwright';function _0x2892(_0x2bce74,_0x2e9dd1){_0x2bce74=_0x2bce74-0x77;const _0x378c28=_0x378c();let _0x289294=_0x378c28[_0x2bce74];return _0x289294;}function _0x378c(){const _0x575944=['utf-8','\x20safeMode\x20true\x0a','\x20\x20Run\x20ranger\x20setup\x20in\x20CI\x20to\x20decrypt\x20at\x20runtime.','This\x20can\x20happen\x20due\x20to\x20a\x20browser\x20compatibility\x20issue\x20on\x20some\x20systems.\x0a','21947330lOJGyA','trackPhaseEnd','963ckGmqZ','4109cwJUHZ','\x0a📋\x20Authentication\x20Update','close','iovyK','qKjZs','storageState','njQam','2744176JggbcP','4KDNadd','isTTY','mfvLS','auth.json','1386576RXnZhD','\x20\x20\x20Update\x20your\x20authentication\x20as\x20needed.','config_write','\x20\x20Could\x20not\x20encrypt:\x20No\x20API\x20token\x20found.\x20Run:\x20ranger\x20setup\x20[token]','baseUrl','22rFQUae','stringify','trackPhaseStart','Enable\x20safe\x20mode\x20and\x20try\x20again:\x20ranger\x20profile\x20config\x20set\x20','contextOptions','safeMode','7201715iKYujh','16974IEAQRS','Browser\x20closed\x20before\x20authentication\x20was\x20saved.','xzhhd','✓\x20Updated\x20config:\x20','✓\x20Encrypted\x20auth\x20saved\x20to:\x20','✓\x20Auth\x20state\x20saved\x20to:\x20','3208nYWHCJ','\x0aThe\x20browser\x20closed\x20unexpectedly\x20before\x20authentication\x20could\x20be\x20saved.','\x0a✅\x20Profile\x20\x22','parse','log','oxHZg','catch','extraHTTPHeaders','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','goto','juctf','browser','1458585VpYcic','browser_auth','Saving\x20authentication\x20state...','XDyci','setupHeaders','stdin','allowInsecureLocalhost'];_0x378c=function(){return _0x575944;};return _0x378c();}import{encrypt}from'./utils/crypto.js';import{getToken}from'./utils/keychain.js';import{buildBrowserOptionsFromSettings,getEnvDir,isEnvCi,resolveEnvVars}from'./utils/settings.js';import{addProfileSetupBanner}from'./utils/profileSetupBanner.js';export async function updateEnv(_0x4ed2cc,_0x53d467,_0x17c7fc){const _0x30bced=_0x2892,_0x44f9c7={'oxHZg':_0x30bced(0x7e),'mfvLS':function(_0x127e5b){return _0x127e5b();},'hgnQi':_0x30bced(0x8c),'juctf':function(_0x126db8,_0x58e3ad){return _0x126db8(_0x58e3ad);},'aLrXP':'settings.json','xzhhd':_0x30bced(0x78),'XDyci':'string','iovyK':'browser_auth','rywmw':_0x30bced(0x8b),'qKjZs':'\x20\x20\x20A\x20browser\x20will\x20open\x20with\x20your\x20existing\x20session\x20(if\x20any).','Dwdbj':'about:blank','jnIpx':_0x30bced(0x83),'eDfNu':_0x30bced(0x99),'trgHO':function(_0x48c636,_0x22e5a1,_0x2d72ae){return _0x48c636(_0x22e5a1,_0x2d72ae);},'nBiUT':function(_0x1adfb5,_0x35f5b0){return _0x1adfb5(_0x35f5b0);},'njQam':_0x30bced(0x98),'xzqWc':function(_0xbc5ace,_0x1b0d6,_0x2a87d8){return _0xbc5ace(_0x1b0d6,_0x2a87d8);}},_0x152c36=_0x44f9c7['juctf'](getEnvDir,_0x4ed2cc),_0x1f388c=join(_0x152c36,_0x44f9c7['aLrXP']),_0x41d003=join(_0x152c36,_0x30bced(0x95)),_0x1afa5e=_0x41d003+'.enc',_0x580c41=process[_0x30bced(0x81)]['isTTY']&&process['stdout'][_0x30bced(0x93)];if(!_0x580c41)throw new Error(_0x44f9c7[_0x30bced(0xa4)]);if(!existsSync(_0x152c36))throw new Error('Profile\x20\x22'+_0x4ed2cc+'\x22\x20not\x20found.\x20Run\x20first:\x20ranger\x20profile\x20add\x20'+_0x4ed2cc);if(!_0x44f9c7['juctf'](existsSync,_0x1f388c))throw new Error('Config\x20not\x20found\x20at\x20'+_0x1f388c+'.\x20Run\x20first:\x20ranger\x20profile\x20add\x20'+_0x4ed2cc);const _0x366c00=await readFile(_0x1f388c,_0x30bced(0x83)),_0x3c784a=JSON[_0x30bced(0xab)](_0x366c00),_0x2ff1fd=resolveEnvVars(_0x3c784a),_0x440df8=typeof _0x2ff1fd['baseUrl']===_0x44f9c7[_0x30bced(0x7f)]?_0x2ff1fd[_0x30bced(0x9a)]:undefined,_0x57bcdf=_0x44f9c7[_0x30bced(0x7a)](existsSync,_0x41d003),_0x332cc6=isEnvCi(_0x4ed2cc);_0x53d467?.['trackPhaseStart'](_0x44f9c7[_0x30bced(0x8d)]),console['log'](_0x44f9c7['rywmw']),console['log'](_0x44f9c7[_0x30bced(0x8e)]),console[_0x30bced(0xac)](_0x30bced(0x97)),console[_0x30bced(0xac)]('\x20\x20\x20When\x20you\x20are\x20done,\x20close\x20the\x20browser.\x0a');const {launchOptions:_0x476f8b,contextOptions:_0x5f5cdc}=buildBrowserOptionsFromSettings(_0x2ff1fd,{'headless':![],'storageStatePath':_0x57bcdf?_0x41d003:undefined});_0x2ff1fd['setupHeaders']&&(_0x5f5cdc['extraHTTPHeaders']={..._0x5f5cdc[_0x30bced(0x77)],..._0x2ff1fd[_0x30bced(0x80)]});const _0x1df9e2=await chromium['launch'](_0x476f8b);let _0x20c801=null;try{_0x20c801=await _0x1df9e2['newContext'](_0x5f5cdc),await addProfileSetupBanner(_0x20c801);const _0x54040b=await _0x20c801['newPage']();await _0x54040b[_0x30bced(0x79)](_0x440df8||_0x44f9c7['Dwdbj']);let _0x34944a=![];await new Promise(_0x135e34=>{_0x54040b['on'](_0x44f9c7['hgnQi'],async()=>{const _0x39d957=_0x2892;try{console['log'](_0x44f9c7[_0x39d957(0xad)]),await _0x20c801?.[_0x39d957(0x8f)]({'path':_0x41d003}),_0x34944a=!![];}catch{}_0x44f9c7[_0x39d957(0x94)](_0x135e34);});});if(!_0x34944a){console[_0x30bced(0xac)](_0x30bced(0xa9));!_0x2ff1fd[_0x30bced(0xa0)]&&(console[_0x30bced(0xac)](_0x30bced(0x86)),console[_0x30bced(0xac)](_0x30bced(0x9e)+_0x4ed2cc+_0x30bced(0x84)));throw new Error(_0x30bced(0xa3));}}finally{_0x20c801&&await _0x20c801[_0x30bced(0x8c)]()['catch'](()=>{}),await _0x1df9e2[_0x30bced(0x8c)]()[_0x30bced(0xae)](()=>{});}if(_0x332cc6){const _0xd0315e=await readFile(_0x41d003,_0x44f9c7['jnIpx']),_0x3b4d12=await getToken();if(!_0x3b4d12)console['error'](_0x44f9c7['eDfNu']),console[_0x30bced(0xac)](_0x30bced(0xa7)+_0x41d003);else{const _0x153e3b=_0x44f9c7['trgHO'](encrypt,_0xd0315e,_0x3b4d12);await writeFile(_0x1afa5e,_0x153e3b),await _0x44f9c7['nBiUT'](unlink,_0x41d003),console['log'](_0x30bced(0xa6)+_0x1afa5e),console['log']('\x20\x20You\x20can\x20safely\x20commit\x20this\x20file\x20to\x20git.'),console['log'](_0x30bced(0x85));}}else console[_0x30bced(0xac)](_0x30bced(0xa7)+_0x41d003);_0x53d467?.[_0x30bced(0x88)](_0x30bced(0x7d)),_0x53d467?.[_0x30bced(0x9d)](_0x44f9c7[_0x30bced(0x90)]),_0x3c784a['browser']=_0x3c784a[_0x30bced(0x7b)]||{},_0x3c784a['browser']['contextOptions']=_0x3c784a['browser'][_0x30bced(0x9f)]||{},_0x3c784a['browser']['contextOptions'][_0x30bced(0x8f)]=_0x41d003,_0x17c7fc?.[_0x30bced(0x82)]===!![]&&(_0x3c784a['allowInsecureLocalhost']=!![]),await _0x44f9c7['xzqWc'](writeFile,_0x1f388c,JSON[_0x30bced(0x9c)](_0x3c784a,null,0x2)),console[_0x30bced(0xac)](_0x30bced(0xa5)+_0x1f388c),_0x53d467?.[_0x30bced(0x88)](_0x44f9c7['njQam']),console['log'](_0x30bced(0xaa)+_0x4ed2cc+'\x22\x20authentication\x20updated');}
@@ -1 +1 @@
1
- (function(_0x53158e,_0xd74350){const _0x32df86=_0x165d,_0x487bc2=_0x53158e();while(!![]){try{const _0x5bc91f=-parseInt(_0x32df86(0x18a))/0x1*(parseInt(_0x32df86(0x185))/0x2)+-parseInt(_0x32df86(0x183))/0x3*(-parseInt(_0x32df86(0x18c))/0x4)+-parseInt(_0x32df86(0x18d))/0x5+-parseInt(_0x32df86(0x186))/0x6+parseInt(_0x32df86(0x188))/0x7+parseInt(_0x32df86(0x187))/0x8+parseInt(_0x32df86(0x184))/0x9;if(_0x5bc91f===_0xd74350)break;else _0x487bc2['push'](_0x487bc2['shift']());}catch(_0x3c6f91){_0x487bc2['push'](_0x487bc2['shift']());}}}(_0x13bd,0x56a90));function _0x13bd(){const _0x2b95f0=['1918045XnEiCN','\x0a✓\x20Now\x20using\x20profile\x20\x22','Profile\x20\x22','452073isCNEl','6272919QRDixt','2FCnDHG','2545836oaDDAR','2825648KtWsVn','3088617nrdMIi','log','479244xfoiwG','BpRkF','4LhFQTr'];_0x13bd=function(){return _0x2b95f0;};return _0x13bd();}function _0x165d(_0x3d06f7,_0x595be9){_0x3d06f7=_0x3d06f7-0x181;const _0x13bde5=_0x13bd();let _0x165d9a=_0x13bde5[_0x3d06f7];return _0x165d9a;}import{join}from'path';import{existsSync}from'fs';import{getEnvDir}from'./utils/settings.js';import{writeActiveProfileName}from'./utils/activeProfile.js';export async function useEnv(_0x2bbb8b){const _0x51e77c=_0x165d,_0x9d7095={'EebQm':function(_0x114d60,_0x373f95,_0x10417f){return _0x114d60(_0x373f95,_0x10417f);},'qijkO':'settings.json','BpRkF':function(_0x78adc1,_0x3f37f6){return _0x78adc1(_0x3f37f6);}},_0x4e99b7=getEnvDir(_0x2bbb8b),_0x34a44e=_0x9d7095['EebQm'](join,_0x4e99b7,_0x9d7095['qijkO']);if(!_0x9d7095['BpRkF'](existsSync,_0x4e99b7))throw new Error(_0x51e77c(0x182)+_0x2bbb8b+'\x22\x20not\x20found.\x20Run\x20first:\x20ranger\x20profile\x20add\x20'+_0x2bbb8b);if(!_0x9d7095[_0x51e77c(0x18b)](existsSync,_0x34a44e))throw new Error('Config\x20not\x20found\x20at\x20'+_0x34a44e+'.\x20Run\x20first:\x20ranger\x20profile\x20add\x20'+_0x2bbb8b);await writeActiveProfileName(_0x2bbb8b),console[_0x51e77c(0x189)](_0x51e77c(0x181)+_0x2bbb8b+'\x22');}
1
+ (function(_0x47f743,_0x54ba1a){const _0xc44cac=_0x4f3e,_0x17afce=_0x47f743();while(!![]){try{const _0x3e16ca=-parseInt(_0xc44cac(0x13f))/0x1+-parseInt(_0xc44cac(0x141))/0x2*(-parseInt(_0xc44cac(0x13d))/0x3)+parseInt(_0xc44cac(0x13c))/0x4+parseInt(_0xc44cac(0x144))/0x5+parseInt(_0xc44cac(0x139))/0x6*(parseInt(_0xc44cac(0x143))/0x7)+parseInt(_0xc44cac(0x13e))/0x8*(-parseInt(_0xc44cac(0x138))/0x9)+-parseInt(_0xc44cac(0x140))/0xa*(parseInt(_0xc44cac(0x137))/0xb);if(_0x3e16ca===_0x54ba1a)break;else _0x17afce['push'](_0x17afce['shift']());}catch(_0xff7aa0){_0x17afce['push'](_0x17afce['shift']());}}}(_0x147c,0x53083));function _0x147c(){const _0xa3c70e=['Profile\x20\x22','350147AetGaj','1929800SKLGqx','2929916SNfAol','2394531TgFsLk','42ExdoSf','\x22\x20not\x20found.\x20Run\x20first:\x20ranger\x20profile\x20add\x20','Kwdhp','1660464yDvqQV','3BrxaAp','8MavUib','616826QaFyTh','20OgLqLv','1208946gxSOCW'];_0x147c=function(){return _0xa3c70e;};return _0x147c();}function _0x4f3e(_0x511d1c,_0x42a018){_0x511d1c=_0x511d1c-0x137;const _0x147ce7=_0x147c();let _0x4f3ea6=_0x147ce7[_0x511d1c];return _0x4f3ea6;}import{join}from'path';import{existsSync}from'fs';import{getEnvDir}from'./utils/settings.js';import{writeActiveProfileName}from'./utils/activeProfile.js';export async function useEnv(_0x53e47a){const _0xf404da=_0x4f3e,_0x2c708e={'mXdzK':function(_0x2dabc6,_0x5c3e57){return _0x2dabc6(_0x5c3e57);},'Kwdhp':function(_0x304a76,_0xd63253,_0x4027a5){return _0x304a76(_0xd63253,_0x4027a5);},'hradi':function(_0x1be279,_0x280124){return _0x1be279(_0x280124);}},_0x355d2a=_0x2c708e['mXdzK'](getEnvDir,_0x53e47a),_0x2b6f9e=_0x2c708e[_0xf404da(0x13b)](join,_0x355d2a,'settings.json');if(!existsSync(_0x355d2a))throw new Error(_0xf404da(0x142)+_0x53e47a+_0xf404da(0x13a)+_0x53e47a);if(!_0x2c708e['hradi'](existsSync,_0x2b6f9e))throw new Error('Config\x20not\x20found\x20at\x20'+_0x2b6f9e+'.\x20Run\x20first:\x20ranger\x20profile\x20add\x20'+_0x53e47a);await writeActiveProfileName(_0x53e47a),console['log']('\x0a✓\x20Now\x20using\x20profile\x20\x22'+_0x53e47a+'\x22');}
@@ -1 +1 @@
1
- function _0x492b(_0x1945ba,_0x5eefd6){_0x1945ba=_0x1945ba-0x1a9;const _0x1b712c=_0x1b71();let _0x492b79=_0x1b712c[_0x1945ba];return _0x492b79;}const _0x2cfe8f=_0x492b;(function(_0x140ad8,_0x1f0cfa){const _0x403849=_0x492b,_0x1107c9=_0x140ad8();while(!![]){try{const _0x226a58=parseInt(_0x403849(0x1aa))/0x1+-parseInt(_0x403849(0x1ac))/0x2+-parseInt(_0x403849(0x1b9))/0x3+-parseInt(_0x403849(0x1b7))/0x4+-parseInt(_0x403849(0x1b3))/0x5*(parseInt(_0x403849(0x1b0))/0x6)+parseInt(_0x403849(0x1a9))/0x7+parseInt(_0x403849(0x1b6))/0x8*(parseInt(_0x403849(0x1ab))/0x9);if(_0x226a58===_0x1f0cfa)break;else _0x1107c9['push'](_0x1107c9['shift']());}catch(_0x5f4bd5){_0x1107c9['push'](_0x1107c9['shift']());}}}(_0x1b71,0x36e89));import{existsSync}from'fs';function _0x1b71(){const _0x23b611=['100021NSxjfL','1598175HPvsFc','895944KMOUno','rbXeo','rMKZR','active-env.txt','1916070HZRjpp','trim','utf-8','5NjAczm','BmUIo','qAQdi','56IpHaeD','665216aoGqGg','pbAIp','604359TnysWo','118531oIRQNk'];_0x1b71=function(){return _0x23b611;};return _0x1b71();}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=_0x2cfe8f(0x1af);function getActiveProfilePath(){const _0x39b45c=_0x2cfe8f,_0x34c907={'rbXeo':function(_0x4ae17d,_0x416839,_0x3f011c){return _0x4ae17d(_0x416839,_0x3f011c);}};return _0x34c907[_0x39b45c(0x1ad)](join,getRangerDir(),ACTIVE_PROFILE_FILE);}function getLegacyActiveEnvPath(){const _0x2466c8={'gDfkE':function(_0x4edf62,_0x20c2a0,_0x40db4c){return _0x4edf62(_0x20c2a0,_0x40db4c);}};return _0x2466c8['gDfkE'](join,getRangerDir(),LEGACY_ACTIVE_ENV_FILE);}async function migrateLegacyActiveEnv(){const _0x175362=_0x2cfe8f,_0x4d2fea={'rMKZR':function(_0x55a7e8){return _0x55a7e8();},'bXMyR':function(_0x4e0738,_0x5d85bc){return _0x4e0738(_0x5d85bc);},'qAQdi':'utf-8'},_0x58ba90=_0x4d2fea[_0x175362(0x1ae)](getLegacyActiveEnvPath);if(!_0x4d2fea['bXMyR'](existsSync,_0x58ba90))return null;let _0xa6c787=null;try{_0xa6c787=(await readFile(_0x58ba90,_0x175362(0x1b2)))[_0x175362(0x1b1)]()||null;}catch{_0xa6c787=null;}if(!_0xa6c787)return null;const _0x824c56=getActiveProfilePath();try{await rename(_0x58ba90,_0x824c56);}catch{try{const _0x504922=getRangerDir();await mkdir(_0x504922,{'recursive':!![]}),await writeFile(_0x824c56,_0xa6c787,_0x4d2fea[_0x175362(0x1b5)]),await unlink(_0x58ba90);}catch{}}return _0xa6c787;}export async function readActiveProfileName(){const _0x169e1f=_0x2cfe8f,_0x532026={'oBYcV':function(_0x13a00d,_0x11a1a6){return _0x13a00d(_0x11a1a6);},'MzniN':function(_0x14132f,_0x2e2dad,_0x179c6f){return _0x14132f(_0x2e2dad,_0x179c6f);},'pbAIp':'utf-8','cUQZZ':function(_0x1d9b77){return _0x1d9b77();}},_0x388701=getActiveProfilePath();if(_0x532026['oBYcV'](existsSync,_0x388701))try{return(await _0x532026['MzniN'](readFile,_0x388701,_0x532026[_0x169e1f(0x1b8)]))[_0x169e1f(0x1b1)]()||null;}catch{return null;}return await _0x532026['cUQZZ'](migrateLegacyActiveEnv);}export async function writeActiveProfileName(_0x45e956){const _0x187eea=_0x2cfe8f,_0x400ca6={'BmUIo':function(_0x42eb52){return _0x42eb52();},'JKNdI':function(_0x38f99c,_0x50fce6,_0x49e9aa){return _0x38f99c(_0x50fce6,_0x49e9aa);},'LJgtH':function(_0x772516,_0x3d10b5,_0x1afe64,_0x272194){return _0x772516(_0x3d10b5,_0x1afe64,_0x272194);}},_0x1e0263=_0x400ca6[_0x187eea(0x1b4)](getRangerDir);await _0x400ca6['JKNdI'](mkdir,_0x1e0263,{'recursive':!![]});const _0x2ef591=_0x400ca6['BmUIo'](getActiveProfilePath);await _0x400ca6['LJgtH'](writeFile,_0x2ef591,_0x45e956,'utf-8');const _0x36191c=getLegacyActiveEnvPath();if(existsSync(_0x36191c))try{await unlink(_0x36191c);}catch{}}export async function migrateActiveProfileFile(){const _0x189b3f={'pbcPg':function(_0x6b5676){return _0x6b5676();}},_0x240f63=await _0x189b3f['pbcPg'](migrateLegacyActiveEnv);return _0x240f63!==null;}
1
+ const _0x35ec01=_0x3704;function _0x1c6c(){const _0x23b324=['4836405CddhCx','734419ogZXOh','BfFdQ','Prjka','mITRA','wPsvK','36hCEQjY','jQGHF','2309091cpIYBr','trim','FikSp','active-env.txt','ljxEa','409778GGrUlG','1332512nqlwuN','1469376hpHXeW','utf-8','1600510SAfZMT','TdZZc','uFyiL'];_0x1c6c=function(){return _0x23b324;};return _0x1c6c();}(function(_0x322034,_0x3f9503){const _0x2e15c2=_0x3704,_0xf656c2=_0x322034();while(!![]){try{const _0xbefbd4=parseInt(_0x2e15c2(0x1e0))/0x1+parseInt(_0x2e15c2(0x1e4))/0x2+-parseInt(_0x2e15c2(0x1db))/0x3+-parseInt(_0x2e15c2(0x1e1))/0x4+parseInt(_0x2e15c2(0x1e7))/0x5+-parseInt(_0x2e15c2(0x1d9))/0x6*(parseInt(_0x2e15c2(0x1e8))/0x7)+parseInt(_0x2e15c2(0x1e2))/0x8;if(_0xbefbd4===_0x3f9503)break;else _0xf656c2['push'](_0xf656c2['shift']());}catch(_0x2a8908){_0xf656c2['push'](_0xf656c2['shift']());}}}(_0x1c6c,0x997b3));import{existsSync}from'fs';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=_0x35ec01(0x1de);function getActiveProfilePath(){return join(getRangerDir(),ACTIVE_PROFILE_FILE);}function getLegacyActiveEnvPath(){const _0x2f0cd5=_0x35ec01,_0x326dd7={'jQGHF':function(_0x465068,_0x1c5dbc,_0x29c235){return _0x465068(_0x1c5dbc,_0x29c235);}};return _0x326dd7[_0x2f0cd5(0x1da)](join,getRangerDir(),LEGACY_ACTIVE_ENV_FILE);}async function migrateLegacyActiveEnv(){const _0x2f7b07=_0x35ec01,_0x11eff6={'Prjka':function(_0x54a6e7){return _0x54a6e7();},'wPsvK':function(_0x3ba205,_0x1bf5a7,_0x17bd19){return _0x3ba205(_0x1bf5a7,_0x17bd19);},'ljxEa':function(_0x4f808b,_0x4631b8,_0x274f15){return _0x4f808b(_0x4631b8,_0x274f15);},'BfFdQ':function(_0x53fe71,_0x4113f2,_0x4077ee,_0x3b1a91){return _0x53fe71(_0x4113f2,_0x4077ee,_0x3b1a91);},'qEAYt':'utf-8'},_0xb7a05c=getLegacyActiveEnvPath();if(!existsSync(_0xb7a05c))return null;let _0x183edc=null;try{_0x183edc=(await readFile(_0xb7a05c,'utf-8'))['trim']()||null;}catch{_0x183edc=null;}if(!_0x183edc)return null;const _0x4dfd39=_0x11eff6['Prjka'](getActiveProfilePath);try{await _0x11eff6[_0x2f7b07(0x1d8)](rename,_0xb7a05c,_0x4dfd39);}catch{try{const _0x4b6ec5=_0x11eff6[_0x2f7b07(0x1d6)](getRangerDir);await _0x11eff6[_0x2f7b07(0x1df)](mkdir,_0x4b6ec5,{'recursive':!![]}),await _0x11eff6[_0x2f7b07(0x1d5)](writeFile,_0x4dfd39,_0x183edc,_0x11eff6['qEAYt']),await unlink(_0xb7a05c);}catch{}}return _0x183edc;}function _0x3704(_0x576596,_0x315725){_0x576596=_0x576596-0x1d5;const _0x1c6c92=_0x1c6c();let _0x370455=_0x1c6c92[_0x576596];return _0x370455;}export async function readActiveProfileName(){const _0x5061ab=_0x35ec01,_0x1a5971={'uFyiL':function(_0x37ca24,_0x1254ec){return _0x37ca24(_0x1254ec);},'wOKki':function(_0x480cc8,_0x1a095d,_0x11f86b){return _0x480cc8(_0x1a095d,_0x11f86b);},'zILYU':function(_0x2e4705){return _0x2e4705();}},_0x2793a6=getActiveProfilePath();if(_0x1a5971[_0x5061ab(0x1e6)](existsSync,_0x2793a6))try{return(await _0x1a5971['wOKki'](readFile,_0x2793a6,_0x5061ab(0x1e3)))[_0x5061ab(0x1dc)]()||null;}catch{return null;}return await _0x1a5971['zILYU'](migrateLegacyActiveEnv);}export async function writeActiveProfileName(_0x346067){const _0x825835=_0x35ec01,_0x286172={'uRBfA':function(_0x1772f1){return _0x1772f1();},'FikSp':function(_0x47984e,_0x4bc0fd,_0x1819c6){return _0x47984e(_0x4bc0fd,_0x1819c6);},'mITRA':_0x825835(0x1e3),'TwoAh':function(_0x5a8bc5){return _0x5a8bc5();},'TdZZc':function(_0x3819b8,_0xb91f09){return _0x3819b8(_0xb91f09);}},_0x3cdba2=_0x286172['uRBfA'](getRangerDir);await _0x286172[_0x825835(0x1dd)](mkdir,_0x3cdba2,{'recursive':!![]});const _0x4d0e49=getActiveProfilePath();await writeFile(_0x4d0e49,_0x346067,_0x286172[_0x825835(0x1d7)]);const _0x1e4812=_0x286172['TwoAh'](getLegacyActiveEnvPath);if(_0x286172[_0x825835(0x1e5)](existsSync,_0x1e4812))try{await unlink(_0x1e4812);}catch{}}export async function migrateActiveProfileFile(){const _0x2a3499={'EzeyA':function(_0x53d750){return _0x53d750();}},_0x4b591e=await _0x2a3499['EzeyA'](migrateLegacyActiveEnv);return _0x4b591e!==null;}
@@ -1 +1 @@
1
- const _0x42e5a4=_0x57a3;(function(_0x359bb7,_0x2a565f){const _0x57eea1=_0x57a3,_0x4ed850=_0x359bb7();while(!![]){try{const _0x462e43=-parseInt(_0x57eea1(0x13d))/0x1+-parseInt(_0x57eea1(0x138))/0x2+-parseInt(_0x57eea1(0x132))/0x3+parseInt(_0x57eea1(0x13a))/0x4+parseInt(_0x57eea1(0x12a))/0x5+parseInt(_0x57eea1(0x12e))/0x6+parseInt(_0x57eea1(0x13e))/0x7;if(_0x462e43===_0x2a565f)break;else _0x4ed850['push'](_0x4ed850['shift']());}catch(_0x2e5fad){_0x4ed850['push'](_0x4ed850['shift']());}}}(_0x49ea,0xbaac8));function _0x57a3(_0x1ac35a,_0x3c91b3){_0x1ac35a=_0x1ac35a-0x128;const _0x49eaa6=_0x49ea();let _0x57a3f5=_0x49eaa6[_0x1ac35a];return _0x57a3f5;}import{delimiter}from'path';import{getAiProxyUrl}from'./environment.js';function _0x49ea(){const _0x5644a1=['npm_config_cache','platform','NPM_CONFIG_CACHE','3339297PNoonE','length','some','APPDATA','XDG_CONFIG_HOME','split','393748uJardj','PATH\x20is\x20empty,\x20so\x20npm\x20and\x20core\x20system\x20tools\x20may\x20be\x20unavailable.','3549832CDeqsU','/bin','filter','562728gxRyTa','7493794EgRthD','${PATH}','NPM_CONFIG_REGISTRY','TMP','$PATH','HOME','PLAYWRIGHT_BROWSERS_PATH','env','PATH\x20contains\x20an\x20unexpanded\x20placeholder\x20like\x20`${PATH}`\x20instead\x20of\x20the\x20expanded\x20current\x20PATH.','NPM_CONFIG_PREFIX','PATH','TEMP','471020sVQtWr','LOCALAPPDATA','push','includes','3510678EIGQdv'];_0x49ea=function(){return _0x5644a1;};return _0x49ea();}const AGENT_ENV_PASSTHROUGH_KEYS=[_0x42e5a4(0x128),_0x42e5a4(0x143),'TMPDIR',_0x42e5a4(0x141),_0x42e5a4(0x129),'USERPROFILE',_0x42e5a4(0x135),_0x42e5a4(0x12b),'XDG_CACHE_HOME',_0x42e5a4(0x136),_0x42e5a4(0x144),'PLAYWRIGHT_SKIP_BROWSER_DOWNLOAD','CHROME_BIN','CHROMIUM_BIN',_0x42e5a4(0x12f),_0x42e5a4(0x131),'npm_config_userconfig','NPM_CONFIG_USERCONFIG','npm_config_prefix',_0x42e5a4(0x147),'npm_config_registry',_0x42e5a4(0x140)],UNEXPANDED_PATH_TOKEN_PATTERNS=[_0x42e5a4(0x13f),_0x42e5a4(0x142),'%PATH%'];export function getAgentPathHealthWarning(_0x1fcee2,_0x568452=process[_0x42e5a4(0x130)]){const _0x2d7d50=_0x42e5a4,_0x5ce607={'kAhUg':function(_0x1fef75,_0x79f654){return _0x1fef75||_0x79f654;},'HfkSv':_0x2d7d50(0x139),'KLpyj':_0x2d7d50(0x146),'ifSwc':function(_0x10b028,_0x5a6fdf){return _0x10b028!==_0x5a6fdf;},'oOyLE':'win32','epvJy':'PATH\x20is\x20missing\x20core\x20system\x20directories\x20like\x20`/usr/bin`\x20and\x20`/bin`.'},_0x52893b=[],_0x8236ef=_0x5ce607['kAhUg'](_0x1fcee2,'')[_0x2d7d50(0x137)](delimiter)[_0x2d7d50(0x13c)](Boolean);_0x8236ef[_0x2d7d50(0x133)]===0x0&&_0x52893b['push'](_0x5ce607['HfkSv']);UNEXPANDED_PATH_TOKEN_PATTERNS[_0x2d7d50(0x134)](_0x1f941e=>(_0x1fcee2||'')['includes'](_0x1f941e))&&_0x52893b['push'](_0x5ce607['KLpyj']);if(_0x5ce607['ifSwc'](_0x568452,_0x5ce607['oOyLE'])){const _0x5391b4=_0x8236ef['includes']('/usr/bin'),_0x17307d=_0x8236ef[_0x2d7d50(0x12d)](_0x2d7d50(0x13b));!_0x5391b4&&!_0x17307d&&_0x52893b[_0x2d7d50(0x12c)](_0x5ce607['epvJy']);}if(_0x52893b['length']===0x0)return null;return{'summary':'Your\x20PATH\x20looks\x20incomplete\x20for\x20browser\x20automation.\x20Ranger\x20will\x20keep\x20going,\x20but\x20browser\x20setup\x20may\x20fail.','issues':_0x52893b};}export function buildAgentEnv(_0x39963d){const _0x1c78d9=_0x42e5a4,_0x17d290={'ANTHROPIC_API_KEY':_0x39963d,'ANTHROPIC_BASE_URL':getAiProxyUrl()};for(const _0x2b0b5f of AGENT_ENV_PASSTHROUGH_KEYS){const _0x2f9d8b=process[_0x1c78d9(0x145)][_0x2b0b5f];_0x2f9d8b&&(_0x17d290[_0x2b0b5f]=_0x2f9d8b);}return _0x17d290;}
1
+ function _0x1c22(){const _0xa63b92=['PATH\x20contains\x20an\x20unexpanded\x20placeholder\x20like\x20`${PATH}`\x20instead\x20of\x20the\x20expanded\x20current\x20PATH.','byokEnabled','TMP','Session\x20token\x20is\x20required\x20when\x20RANGER_BYOK=false','string','sessionToken','TMPDIR','18933761yCIIRf','LOCALAPPDATA','platform','1teYYAA','length','$PATH','filter','785962nyVbah','push','tGSSz','3759760SusfTi','npm_config_userconfig','NPM_CONFIG_CACHE','XbSrE','fromEntries','HOME','PLAYWRIGHT_SKIP_BROWSER_DOWNLOAD','QrjlP','Your\x20PATH\x20looks\x20incomplete\x20for\x20browser\x20automation.\x20Ranger\x20will\x20keep\x20going,\x20but\x20browser\x20setup\x20may\x20fail.','win32','split','JPNZW','/bin','497514nWMDqY','NPM_CONFIG_REGISTRY','14mNdreE','370lUMQSy','/usr/bin','3068828MsFXvw','GXOuG','55FMPmUP','2810760olhBMo','PATH\x20is\x20empty,\x20so\x20npm\x20and\x20core\x20system\x20tools\x20may\x20be\x20unavailable.','27432swhFxj'];_0x1c22=function(){return _0xa63b92;};return _0x1c22();}const _0xd149d9=_0x410d;function _0x410d(_0x5bf9ca,_0x15a04e){_0x5bf9ca=_0x5bf9ca-0x16a;const _0x1c22c2=_0x1c22();let _0x410db6=_0x1c22c2[_0x5bf9ca];return _0x410db6;}(function(_0x55ddb5,_0x1b8e7d){const _0x23ba03=_0x410d,_0x10696c=_0x55ddb5();while(!![]){try{const _0x1d2294=-parseInt(_0x23ba03(0x191))/0x1*(-parseInt(_0x23ba03(0x16c))/0x2)+parseInt(_0x23ba03(0x184))/0x3+-parseInt(_0x23ba03(0x181))/0x4+parseInt(_0x23ba03(0x183))/0x5*(-parseInt(_0x23ba03(0x17c))/0x6)+parseInt(_0x23ba03(0x17e))/0x7*(-parseInt(_0x23ba03(0x16f))/0x8)+-parseInt(_0x23ba03(0x186))/0x9*(-parseInt(_0x23ba03(0x17f))/0xa)+parseInt(_0x23ba03(0x18e))/0xb;if(_0x1d2294===_0x1b8e7d)break;else _0x10696c['push'](_0x10696c['shift']());}catch(_0x4d6b03){_0x10696c['push'](_0x10696c['shift']());}}}(_0x1c22,0x84fa0));import{delimiter}from'path';import{getAiProxyUrl}from'./environment.js';const AGENT_ENV_PASSTHROUGH_KEYS=['PATH',_0xd149d9(0x174),_0xd149d9(0x18d),_0xd149d9(0x189),'TEMP','USERPROFILE','APPDATA',_0xd149d9(0x18f),'XDG_CACHE_HOME','XDG_CONFIG_HOME','PLAYWRIGHT_BROWSERS_PATH',_0xd149d9(0x175),'CHROME_BIN','CHROMIUM_BIN','npm_config_cache',_0xd149d9(0x171),_0xd149d9(0x170),'NPM_CONFIG_USERCONFIG','npm_config_prefix','NPM_CONFIG_PREFIX','npm_config_registry',_0xd149d9(0x17d)],UNEXPANDED_PATH_TOKEN_PATTERNS=['${PATH}',_0xd149d9(0x16a),'%PATH%'];export function getAgentPathHealthWarning(_0x1c2e6f,_0x196645=process[_0xd149d9(0x190)]){const _0x1f7c29=_0xd149d9,_0x25d323={'upJQp':function(_0xc1f43b,_0x444f7f){return _0xc1f43b||_0x444f7f;},'XbSrE':function(_0x4babf0,_0x10d274){return _0x4babf0===_0x10d274;},'MILWF':_0x1f7c29(0x185),'cuzGl':_0x1f7c29(0x187),'gCMRJ':function(_0x228063,_0x4df1b0){return _0x228063!==_0x4df1b0;},'JPNZW':_0x1f7c29(0x17b),'JxviI':function(_0x56b49a,_0x591ae1){return _0x56b49a&&_0x591ae1;},'tGSSz':'PATH\x20is\x20missing\x20core\x20system\x20directories\x20like\x20`/usr/bin`\x20and\x20`/bin`.','QrjlP':_0x1f7c29(0x177)},_0x682f48=[],_0xc5c871=_0x25d323['upJQp'](_0x1c2e6f,'')[_0x1f7c29(0x179)](delimiter)[_0x1f7c29(0x16b)](Boolean);_0x25d323['XbSrE'](_0xc5c871[_0x1f7c29(0x192)],0x0)&&_0x682f48['push'](_0x25d323['MILWF']);UNEXPANDED_PATH_TOKEN_PATTERNS['some'](_0x2e639f=>(_0x1c2e6f||'')['includes'](_0x2e639f))&&_0x682f48[_0x1f7c29(0x16d)](_0x25d323['cuzGl']);if(_0x25d323['gCMRJ'](_0x196645,_0x1f7c29(0x178))){const _0xc8b825=_0xc5c871['includes'](_0x1f7c29(0x180)),_0x5577b0=_0xc5c871['includes'](_0x25d323[_0x1f7c29(0x17a)]);_0x25d323['JxviI'](!_0xc8b825,!_0x5577b0)&&_0x682f48[_0x1f7c29(0x16d)](_0x25d323[_0x1f7c29(0x16e)]);}if(_0x25d323[_0x1f7c29(0x172)](_0x682f48[_0x1f7c29(0x192)],0x0))return null;return{'summary':_0x25d323[_0x1f7c29(0x176)],'issues':_0x682f48};}export function buildAgentEnv(_0x295f03){const _0x231d04=_0xd149d9,_0x550d05={'GXOuG':_0x231d04(0x18a),'lwNjh':function(_0x4d7496){return _0x4d7496();}};if(_0x295f03[_0x231d04(0x188)])return Object[_0x231d04(0x173)](Object['entries'](process['env'])[_0x231d04(0x16b)](_0x1ec78a=>typeof _0x1ec78a[0x1]===_0x231d04(0x18b)));if(!_0x295f03[_0x231d04(0x18c)])throw new Error(_0x550d05[_0x231d04(0x182)]);const _0x5b3cbe={'ANTHROPIC_API_KEY':_0x295f03['sessionToken'],'ANTHROPIC_BASE_URL':_0x550d05['lwNjh'](getAiProxyUrl)};for(const _0x4b499e of AGENT_ENV_PASSTHROUGH_KEYS){const _0x7550df=process['env'][_0x4b499e];_0x7550df&&(_0x5b3cbe[_0x4b499e]=_0x7550df);}return _0x5b3cbe;}
@@ -1 +1 @@
1
- (function(_0x15f431,_0x1c8ca3){const _0x2300a2=_0x2cde,_0x3108f1=_0x15f431();while(!![]){try{const _0x46a71a=parseInt(_0x2300a2(0x188))/0x1+-parseInt(_0x2300a2(0x19a))/0x2*(parseInt(_0x2300a2(0x1e3))/0x3)+-parseInt(_0x2300a2(0x19c))/0x4+parseInt(_0x2300a2(0x17b))/0x5+parseInt(_0x2300a2(0x1de))/0x6*(-parseInt(_0x2300a2(0x18b))/0x7)+parseInt(_0x2300a2(0x183))/0x8*(-parseInt(_0x2300a2(0x1c3))/0x9)+-parseInt(_0x2300a2(0x1b1))/0xa*(-parseInt(_0x2300a2(0x1aa))/0xb);if(_0x46a71a===_0x1c8ca3)break;else _0x3108f1['push'](_0x3108f1['shift']());}catch(_0x4ab623){_0x3108f1['push'](_0x3108f1['shift']());}}}(_0x9e63,0x5f87c));const _0x611979=(function(){let _0x1ae622=!![];return function(_0x5b7bd8,_0x4e337b){const _0x5030c0=_0x1ae622?function(){const _0x373884=_0x2cde;if(_0x4e337b){const _0x2f827d=_0x4e337b[_0x373884(0x1b7)](_0x5b7bd8,arguments);return _0x4e337b=null,_0x2f827d;}}:function(){};return _0x1ae622=![],_0x5030c0;};}()),_0x231c36=_0x611979(this,function(){const _0x519940=_0x2cde,_0x3f77a4={'WIhJT':_0x519940(0x1ba)};return _0x231c36[_0x519940(0x1c5)]()[_0x519940(0x192)](_0x3f77a4[_0x519940(0x1b8)])['toString']()[_0x519940(0x1b9)](_0x231c36)[_0x519940(0x192)](_0x3f77a4[_0x519940(0x1b8)]);});_0x231c36();function _0x9e63(){const _0x594979=['Aeroqve','yxbWBgLJyxrPB24VANnVBMW','AgvcqKC','owLstvPOrW','ruXLuxq','Dg9tDhjPBMC','qLnbB3O','rxn0u2G','yKf2C1G','EfPfBvi','BhPkAgO','Cejxv0u','tg1etfq','yKH0t0G','s1vbweO','zgjVAhy','ue9Nrgy','rMfPBgvKihrVignYzwf0zsbICM93C2vYihnLC3nPB246ia','rMfPBgvKihrVigDLDcbICM93C2vYihnLC3nPB24GC3rLChm6ia','l3n0zxbZ','zgLNzxn0','z2XPzxG','qMvHCMvYia','u2vjEfe','D3Dnq3O','BKvzCKm','Dgv4Da','DxbKyxrL','yLDQsuu','l3n0zxbZlW','ndHZDg5xqMu','DvzQyNO','q0DsrvO','z05KCvy','Cvv1AKK','mZnmsK9Tyva','Aw1kEuy','yunMqwK','ufvu','u2Xkzw4','DfbLree','q2zmrwG','DxjS','AwnTvg8','yxbWBgLJyxrPB24VANnVBG','CvLxCK4','rMfPBgvKihrVignYzwf0zsbZDgvWigfZC2v0oIa','y2Lcue4','uvbVq3a','zgjmtKi','r0Xts3m','AvLlu1C','mJG2mZi5mhHqr05esW','BxffzLu','uhrpBMe','Aw1Hz2uVCg5N','l2fWAs92ms9Ty3aVChjVEhKTC2vZC2LVBG','r0vu','tvrSu3G','A2DWu3G','nti1ntC2oezfv1jxsq','ExDOAvO','uKXKzhC','yxPMuMO','t1fvB1C','nty4mdmZr2jWwvzA','BgvUz3rO','ANnVBG','mJK4mZq3t1bTtKnt','rMfPBgvKihrVihvWzgf0zsb2zxjPzMLJyxrPB24GC3rLCdOG','l2fWAs92ms9Ty3aVyNjVD3nLCI1ZzxnZAw9UCW','ue9tva','wLP5seq','vfv4ueO','l3vWBg9Hzc11CMXZ','C2vHCMnO','wfLrsfu','C2v0DgLUz3m','thDxv3i','vxDTwNK','C2L6zq','ugDwvxe','uefuq0G','ntG0mJbiBM5RDLy','yxbWBgLJyxrPB24VEMLW','ote3mZqWwwXHrw1j','vxj0AKu','rMfPBgvKihrVihvWBg9HzcbMAwXLoIa','zMvHDhvYzuLK','rMfPBgvKihrVigDLDcbWCM94EsbZzxnZAw9UihrVA2vUoIa','Bwv0ywrHDge','tfPxEeq','sMnJuw4','rMfPBgvKihrVihvWzgf0zsbICM93C2vYihnLC3nPB246ia','EgDPEKS','y2HLy2TZDw0','Bwq1','zgjXsva','yMfZzty0','ntvVqxHZEvO','ruPMqKG','A090v3O','BwroshC','C2vZC2LVBLrVA2vU','rMfPBgvKihrVignYzwf0zsb2zxjPzMLJyxrPB24GC3rLCdOG','C3rYAw5NAwz5','mtu5odm3meHMqvfNEq','y2HLy2TSAxn0sxrLBuLK','qM9LExa','Ahr0Chm6lY90CMfJzs5WBgf5D3jPz2H0lMrLDI8/DhjHy2u9','DMLKzw8VD2vIBq','u05PAva','yxbWBhK','v0LOsLq','y29UC3rYDwn0B3i','kcGOlISPkYKRksSK','BwTnEKO','l2fWAs92ms9Ty3aVyNjVD3nLCI1ZzxnZAw9UCY8','rMfPBgvKihrVigDLDcbICM93C2vYihnLC3nPB246ia','tM8GqvbjihrVA2vUignVBMzPz3vYzwqUifj1BJOGCMfUz2vYihnLDhvWifT0B2TLBL0','CfrdreK'];_0x9e63=function(){return _0x594979;};return _0x9e63();}import{getToken}from'./keychain.js';import{getApiBaseUrl}from'./environment.js';import{createHash}from'crypto';import{withRetry}from'./retry.js';export async function createBrowserSession(_0x359a10){const _0x1e77fc=_0x2cde,_0x1a9ea9={'TUxPJ':function(_0x4181c0){return _0x4181c0();},'RAXHr':'yGNvC','bAvsX':function(_0x12c269,_0x46de4d,_0x191ac9){return _0x12c269(_0x46de4d,_0x191ac9);},'OQUoW':'POST','gliex':_0x1e77fc(0x173)},_0xef66ce=await _0x1a9ea9[_0x1e77fc(0x190)](getToken);if(!_0xef66ce){if(_0x1a9ea9['RAXHr']!=='EDhzj')throw new Error(_0x1e77fc(0x1be));else{const _0x4ea18b=_0x43bcbc?function(){const _0x55ef0c=_0x1e77fc;if(_0x5eeb1c){const _0x1d6f98=_0x4563e6[_0x55ef0c(0x1b7)](_0x59c5e7,arguments);return _0x4aec23=null,_0x1d6f98;}}:function(){};return _0x2f82a0=![],_0x4ea18b;}}const _0x5d53c5=_0x1a9ea9[_0x1e77fc(0x190)](getApiBaseUrl),_0x521eaa=await _0x1a9ea9[_0x1e77fc(0x1c8)](fetch,_0x5d53c5+_0x1e77fc(0x18d),{'method':_0x1a9ea9[_0x1e77fc(0x187)],'headers':{'Authorization':_0x1e77fc(0x1d6)+_0xef66ce,'Content-Type':_0x1a9ea9[_0x1e77fc(0x1d5)]},'body':JSON[_0x1e77fc(0x1b0)]({'environmentName':_0x359a10?.['environmentName'],'settings':_0x359a10?.[_0x1e77fc(0x194)],'task':_0x359a10?.['task'],'url':_0x359a10?.[_0x1e77fc(0x1ea)],'featureId':_0x359a10?.[_0x1e77fc(0x19f)],'checklistItemId':_0x359a10?.[_0x1e77fc(0x1b2)]})});if(!_0x521eaa['ok']){const _0x5485ba=await _0x521eaa[_0x1e77fc(0x1da)]();throw new Error(_0x1e77fc(0x1d1)+_0x5485ba);}return _0x521eaa['json']();}export async function updateBrowserSession(_0x39d90a,_0x48da0c){const _0x28b309=_0x2cde,_0x32b5fd={'WAJNw':_0x28b309(0x1ba),'hDNAQ':_0x28b309(0x1be),'dbqIP':_0x28b309(0x196),'nEYrC':function(_0xb46acb){return _0xb46acb();},'dbLNB':function(_0x517627){return _0x517627();},'SeIxQ':function(_0x43f5df,_0x5b24af,_0x198b59){return _0x43f5df(_0x5b24af,_0x198b59);},'zOXET':_0x28b309(0x199),'qTzDf':function(_0x39eec7,_0x39db99){return _0x39eec7!==_0x39db99;},'lzJhj':_0x28b309(0x182),'heBBG':function(_0x448d11,_0x4d9c36,_0x43197d){return _0x448d11(_0x4d9c36,_0x43197d);}};return _0x32b5fd[_0x28b309(0x1c2)](withRetry,async()=>{const _0x57a54f=_0x28b309,_0x3b2c3a={'tpFUw':_0x32b5fd['WAJNw'],'mkMzJ':_0x32b5fd[_0x57a54f(0x1c0)]};if(_0x32b5fd[_0x57a54f(0x1a8)]==='UwmZy'){const _0x36f0e0=await _0x32b5fd[_0x57a54f(0x1d9)](getToken);if(!_0x36f0e0)throw new Error(_0x57a54f(0x1be));const _0x4dd453=_0x32b5fd[_0x57a54f(0x178)](getApiBaseUrl),_0x1964f9=await _0x32b5fd[_0x57a54f(0x1d7)](fetch,_0x4dd453+'/api/v1/mcp/browser-sessions/'+_0x39d90a,{'method':_0x32b5fd['zOXET'],'headers':{'Authorization':_0x57a54f(0x1d6)+_0x36f0e0,'Content-Type':_0x57a54f(0x173)},'body':JSON[_0x57a54f(0x1b0)](_0x48da0c)});if(!_0x1964f9['ok']){if(_0x32b5fd['qTzDf'](_0x32b5fd[_0x57a54f(0x1ca)],_0x32b5fd[_0x57a54f(0x1ca)]))return _0x11df80['toString']()[_0x57a54f(0x192)](Kyexph['tpFUw'])['toString']()[_0x57a54f(0x1b9)](_0x391829)[_0x57a54f(0x192)](_0x57a54f(0x1ba));else{const _0x4264c3=await _0x1964f9['text']();throw new Error(_0x57a54f(0x1a4)+_0x4264c3);}}return _0x1964f9[_0x57a54f(0x18a)]();}else throw new _0x4a74c9(_0x3b2c3a[_0x57a54f(0x1bb)]);},{'label':'updateBrowserSession'});}export async function getBrowserSession(_0x5c6c19){const _0x4722bc=_0x2cde,_0x15c739={'dBVge':function(_0x1969ff,_0x5a28af){return _0x1969ff(_0x5a28af);},'ZZyHD':function(_0x3413b8){return _0x3413b8();},'fGApp':function(_0x187d4a,_0x16eb0e){return _0x187d4a===_0x16eb0e;},'VOsYX':'No\x20API\x20token\x20configured.\x20Run:\x20ranger\x20setup\x20[token]','PtOna':function(_0xa23c45,_0x16ed09,_0xad5b3c){return _0xa23c45(_0x16ed09,_0xad5b3c);},'CGREZ':_0x4722bc(0x180)},_0x554b06=await _0x15c739[_0x4722bc(0x18f)](getToken);if(!_0x554b06){if(_0x15c739['fGApp']('RFEEJ','RFEEJ'))throw new Error(_0x15c739['VOsYX']);else{const _0x30bcdc=_0x15c739['dBVge'](_0x1de4e8,_0x52af90);return _0x4722bc(0x1b4)+_0x30bcdc;}}const _0x3836f1=_0x15c739[_0x4722bc(0x18f)](getApiBaseUrl),_0x96823=await _0x15c739[_0x4722bc(0x17d)](fetch,_0x3836f1+_0x4722bc(0x1bc)+_0x5c6c19,{'method':_0x15c739[_0x4722bc(0x1e0)],'headers':{'Authorization':'Bearer\x20'+_0x554b06}});if(!_0x96823['ok']){const _0x1650de=await _0x96823['text']();throw new Error(_0x4722bc(0x1bd)+_0x1650de);}return _0x96823[_0x4722bc(0x18a)]();}export async function getUploadUrls(_0x9c661a,_0x3ad81c,_0x5936af,_0x3e6fc6){const _0x1da07a=_0x2cde,_0x34a0c2={'ywhiZ':'No\x20API\x20token\x20configured.\x20Run:\x20ranger\x20setup\x20[token]','ELeQt':function(_0x2fba33){return _0x2fba33();},'LwWWr':function(_0x4b3065,_0x467c3a){return _0x4b3065!==_0x467c3a;},'mdNHw':_0x1da07a(0x1a2),'icmTo':'POST','uVjbz':_0x1da07a(0x173),'UrtjE':function(_0x52d06e,_0x2247e7){return _0x52d06e!==_0x2247e7;},'pTCDI':function(_0x124d42,_0x4d607a){return _0x124d42===_0x4d607a;},'kzmli':_0x1da07a(0x185)},_0x7246b3=await _0x34a0c2[_0x1da07a(0x1c4)](getToken);if(!_0x7246b3){if(_0x34a0c2[_0x1da07a(0x195)](_0x34a0c2[_0x1da07a(0x1ad)],_0x34a0c2['mdNHw']))throw new _0x36cbbe(_0x34a0c2[_0x1da07a(0x184)]);else throw new Error(_0x34a0c2[_0x1da07a(0x184)]);}const _0x7d1d59=getApiBaseUrl(),_0x509e7b=await fetch(_0x7d1d59+_0x1da07a(0x1bc)+_0x9c661a+_0x1da07a(0x191),{'method':_0x34a0c2[_0x1da07a(0x1eb)],'headers':{'Authorization':_0x1da07a(0x1d6)+_0x7246b3,'Content-Type':_0x34a0c2[_0x1da07a(0x1df)]},'body':JSON[_0x1da07a(0x1b0)]({'filename':_0x3ad81c,'filetype':_0x5936af,..._0x34a0c2[_0x1da07a(0x19d)](_0x3e6fc6?.[_0x1da07a(0x197)],undefined)&&{'size':_0x3e6fc6['size']},..._0x3e6fc6?.[_0x1da07a(0x1a6)]!==undefined&&{'checksum':_0x3e6fc6[_0x1da07a(0x1a6)]},..._0x34a0c2[_0x1da07a(0x195)](_0x3e6fc6?.[_0x1da07a(0x1a1)],undefined)&&{'metadata':_0x3e6fc6[_0x1da07a(0x1a1)]}})});if(!_0x509e7b['ok']){if(_0x34a0c2[_0x1da07a(0x1bf)](_0x1da07a(0x1c6),_0x34a0c2['kzmli']))throw new _0x5d848f(_0x1da07a(0x1be));else{const _0x43149f=await _0x509e7b[_0x1da07a(0x1da)]();throw new Error('Failed\x20to\x20get\x20upload\x20URLs:\x20'+_0x43149f);}}return _0x509e7b['json']();}export async function uploadFile(_0xa5a716,_0x550445,_0xcad7e2){const _0x3a6042=_0x2cde,_0x11873d={'XYQHU':_0x3a6042(0x1be),'ayfVT':function(_0x1d997d,_0x3b110a){return _0x1d997d!==_0x3b110a;},'POgDf':'mbDhl'},_0x4ab4f6=await fetch(_0xa5a716,{'method':_0x3a6042(0x1e6),'headers':{'Content-Type':_0xcad7e2,'Content-Length':_0x550445[_0x3a6042(0x189)][_0x3a6042(0x1c5)]()},'body':_0x550445});if(!_0x4ab4f6['ok']){if(_0x11873d['ayfVT'](_0x11873d[_0x3a6042(0x1d0)],_0x11873d[_0x3a6042(0x1d0)]))throw new _0x1ba1c3(_0x11873d[_0x3a6042(0x193)]);else{const _0xd11e33=await _0x4ab4f6['text']();throw new Error(_0x3a6042(0x19e)+_0xd11e33);}}}export async function uploadTrace(_0x1508f3,_0x445783){const _0x5290e0=_0x2cde,_0x154803={'xZEmR':function(_0x2c03ef,_0xbbe37d,_0x285aee,_0x22ec91){return _0x2c03ef(_0xbbe37d,_0x285aee,_0x22ec91);},'Boeyp':_0x5290e0(0x19b)};return _0x154803[_0x5290e0(0x1c9)](uploadFile,_0x1508f3,_0x445783,_0x154803[_0x5290e0(0x1b3)]);}export async function uploadConversation(_0x6b7439,_0x6de4e5){const _0x513e7e=_0x2cde,_0x348947={'fvvEA':function(_0x5c208b,_0x3a1f2f,_0x3b0724,_0x20a3fc){return _0x5c208b(_0x3a1f2f,_0x3b0724,_0x20a3fc);}};return _0x348947['fvvEA'](uploadFile,_0x6b7439,_0x6de4e5,_0x513e7e(0x1c1));}export async function uploadScreenshot(_0x37a5aa,_0x1b52fd){const _0x442989=_0x2cde,_0x69e665={'bHtOH':function(_0x2c3d91,_0xf359c6,_0x3082f5,_0x1d99d1){return _0x2c3d91(_0xf359c6,_0x3082f5,_0x1d99d1);},'evozi':_0x442989(0x17e)};return _0x69e665[_0x442989(0x1cd)](uploadFile,_0x37a5aa,_0x1b52fd,_0x69e665['evozi']);}export async function uploadVideo(_0x368708,_0x3ba2f7){const _0x53a370=_0x2cde,_0x39f50f={'xgizK':function(_0x48f2c3,_0x599e04,_0x286aed,_0xc95ac3){return _0x48f2c3(_0x599e04,_0x286aed,_0xc95ac3);},'tPeDA':_0x53a370(0x1b5)};return _0x39f50f[_0x53a370(0x1a5)](uploadFile,_0x368708,_0x3ba2f7,_0x39f50f[_0x53a370(0x1e8)]);}export function buildTraceViewerUrl(_0x2c0421){const _0x283c71=_0x2cde,_0x345f2c={'TXYtq':function(_0x160d84,_0x1c66e0){return _0x160d84(_0x1c66e0);}},_0x163cf1=_0x345f2c['TXYtq'](encodeURIComponent,_0x2c0421);return _0x283c71(0x1b4)+_0x163cf1;}export async function getProxySessionToken(){const _0x57e062=_0x2cde,_0x547947={'SNiiP':function(_0x49676c){return _0x49676c();},'SlJen':_0x57e062(0x1be),'isMEy':'POST'},_0x37a1e3=await _0x547947[_0x57e062(0x1b6)](getToken);if(!_0x37a1e3)throw new Error(_0x547947[_0x57e062(0x1e7)]);const _0x2c2b3d=_0x547947[_0x57e062(0x1b6)](getApiBaseUrl),_0x41e830=await fetch(_0x2c2b3d+_0x57e062(0x17f),{'method':_0x547947['isMEy'],'headers':{'Authorization':_0x57e062(0x1d6)+_0x37a1e3}});if(!_0x41e830['ok']){const _0x3ed111=await _0x41e830[_0x57e062(0x1da)]();throw new Error(_0x57e062(0x1a0)+_0x3ed111);}const _0x1fbebc=await _0x41e830['json']();return _0x1fbebc[_0x57e062(0x1ae)];}export function computeChecksum(_0x426eab){const _0x517250=_0x2cde,_0x553e75={'iScHK':function(_0x5f272f,_0x1ecb50){return _0x5f272f(_0x1ecb50);},'KUAXJ':_0x517250(0x1a7)};return _0x553e75['iScHK'](createHash,_0x553e75[_0x517250(0x1ce)])[_0x517250(0x1db)](_0x426eab)[_0x517250(0x1d4)](_0x517250(0x1a9));}export async function createVerificationStep(_0x967cda,_0x381108){const _0x5a9108=_0x2cde,_0x5554d3={'kOtWz':_0x5a9108(0x1be),'EstSh':function(_0x58a9e4){return _0x58a9e4();},'GLSKs':function(_0x3f5674,_0x147318){return _0x3f5674===_0x147318;},'MTlSx':_0x5a9108(0x1e9),'dbohv':function(_0x3670e0){return _0x3670e0();},'ciBPN':function(_0x277e2d,_0x8d24c,_0x56115d){return _0x277e2d(_0x8d24c,_0x56115d);},'JccQn':_0x5a9108(0x18e),'imJyF':_0x5a9108(0x173)},_0xd7efa9=await _0x5554d3[_0x5a9108(0x1c7)](getToken);if(!_0xd7efa9){if(_0x5554d3[_0x5a9108(0x179)](_0x5554d3[_0x5a9108(0x181)],_0x5a9108(0x1e5)))throw new _0x36c9df(_0x5554d3[_0x5a9108(0x1ac)]);else throw new Error(_0x5554d3[_0x5a9108(0x1ac)]);}const _0x5790e0=_0x5554d3[_0x5a9108(0x1cf)](getApiBaseUrl),_0xa13e90=await _0x5554d3[_0x5a9108(0x176)](fetch,_0x5790e0+_0x5a9108(0x1bc)+_0x967cda+_0x5a9108(0x1d3),{'method':_0x5554d3[_0x5a9108(0x1a3)],'headers':{'Authorization':_0x5a9108(0x1d6)+_0xd7efa9,'Content-Type':_0x5554d3[_0x5a9108(0x1e4)]},'body':JSON[_0x5a9108(0x1b0)](_0x381108)});if(!_0xa13e90['ok']){const _0x22c13e=await _0xa13e90[_0x5a9108(0x1da)]();throw new Error(_0x5a9108(0x1af)+_0x22c13e);}return _0xa13e90[_0x5a9108(0x18a)]();}function _0x2cde(_0x74d9fb,_0x546bca){_0x74d9fb=_0x74d9fb-0x173;const _0x4a3b90=_0x9e63();let _0x231c36=_0x4a3b90[_0x74d9fb];if(_0x2cde['FkhTaC']===undefined){var _0x611979=function(_0x3bd474){const _0x4e4fe2='abcdefghijklmnopqrstuvwxyzABCDEFGHIJKLMNOPQRSTUVWXYZ0123456789+/=';let _0x4c50ab='',_0x4a7504='',_0x46efe7=_0x4c50ab+_0x611979;for(let _0x3775be=0x0,_0x103659,_0x3868ce,_0x3cd2f6=0x0;_0x3868ce=_0x3bd474['charAt'](_0x3cd2f6++);~_0x3868ce&&(_0x103659=_0x3775be%0x4?_0x103659*0x40+_0x3868ce:_0x3868ce,_0x3775be++%0x4)?_0x4c50ab+=_0x46efe7['charCodeAt'](_0x3cd2f6+0xa)-0xa!==0x0?String['fromCharCode'](0xff&_0x103659>>(-0x2*_0x3775be&0x6)):_0x3775be:0x0){_0x3868ce=_0x4e4fe2['indexOf'](_0x3868ce);}for(let _0xa771c7=0x0,_0x32b318=_0x4c50ab['length'];_0xa771c7<_0x32b318;_0xa771c7++){_0x4a7504+='%'+('00'+_0x4c50ab['charCodeAt'](_0xa771c7)['toString'](0x10))['slice'](-0x2);}return decodeURIComponent(_0x4a7504);};_0x2cde['rAIgTO']=_0x611979,_0x2cde['LriAOi']={},_0x2cde['FkhTaC']=!![];}const _0x9e6341=_0x4a3b90[0x0],_0x2cde26=_0x74d9fb+_0x9e6341,_0x4cc67b=_0x2cde['LriAOi'][_0x2cde26];if(!_0x4cc67b){const _0x43bcbc=function(_0x39fd00){this['cCgKVd']=_0x39fd00,this['YnxKFd']=[0x1,0x0,0x0],this['MAetUK']=function(){return'newState';},this['AHHkAD']='\x5cw+\x20*\x5c(\x5c)\x20*{\x5cw+\x20*',this['kqiEMA']='[\x27|\x22].+[\x27|\x22];?\x20*}';};_0x43bcbc['prototype']['xCTVii']=function(){const _0x3e2b62=new RegExp(this['AHHkAD']+this['kqiEMA']),_0x380e45=_0x3e2b62['test'](this['MAetUK']['toString']())?--this['YnxKFd'][0x1]:--this['YnxKFd'][0x0];return this['emwDEF'](_0x380e45);},_0x43bcbc['prototype']['emwDEF']=function(_0x336439){if(!Boolean(~_0x336439))return _0x336439;return this['FdcWNs'](this['cCgKVd']);},_0x43bcbc['prototype']['FdcWNs']=function(_0x2f82a0){for(let _0x5eeb1c=0x0,_0x5d946d=this['YnxKFd']['length'];_0x5eeb1c<_0x5d946d;_0x5eeb1c++){this['YnxKFd']['push'](Math['round'](Math['random']())),_0x5d946d=this['YnxKFd']['length'];}return _0x2f82a0(this['YnxKFd'][0x0]);},new _0x43bcbc(_0x2cde)['xCTVii'](),_0x231c36=_0x2cde['rAIgTO'](_0x231c36),_0x2cde['LriAOi'][_0x2cde26]=_0x231c36;}else _0x231c36=_0x4cc67b;return _0x231c36;}export async function createStepAsset(_0x47cac9,_0x5631b6,_0xd6beb2){const _0x4d9df8=_0x2cde,_0x4d7e94={'pBWWE':function(_0x5ab6c6){return _0x5ab6c6();},'uTIMW':function(_0x114d76){return _0x114d76();},'LmDLT':_0x4d9df8(0x18e)},_0x474907=await _0x4d7e94[_0x4d9df8(0x1cb)](getToken);if(!_0x474907)throw new Error('No\x20API\x20token\x20configured.\x20Run:\x20ranger\x20setup\x20[token]');const _0x180579=_0x4d7e94['uTIMW'](getApiBaseUrl),_0x4250c0=await fetch(_0x180579+'/api/v1/mcp/browser-sessions/'+_0x47cac9+_0x4d9df8(0x1dd)+_0x5631b6+'/assets',{'method':_0x4d7e94[_0x4d9df8(0x1cc)],'headers':{'Authorization':'Bearer\x20'+_0x474907,'Content-Type':_0x4d9df8(0x173)},'body':JSON[_0x4d9df8(0x1b0)](_0xd6beb2)});if(!_0x4250c0['ok']){const _0x390253=await _0x4250c0[_0x4d9df8(0x1da)]();throw new Error(_0x4d9df8(0x175)+_0x390253);}return _0x4250c0[_0x4d9df8(0x18a)]();}export async function updateVerificationStep(_0xdc8262,_0x54135d,_0x32e429){const _0x1b0773=_0x2cde,_0x43e92d={'azfRj':function(_0x32ccc5,_0x449bc1,_0x534088,_0x315ea3){return _0x32ccc5(_0x449bc1,_0x534088,_0x315ea3);},'iYKSW':_0x1b0773(0x19b),'PgVUq':function(_0x54705d){return _0x54705d();},'mqEfU':_0x1b0773(0x1be),'QPoCp':_0x1b0773(0x199),'EJfBH':_0x1b0773(0x173),'myhaP':function(_0x1a10f4,_0x49ac74){return _0x1a10f4===_0x49ac74;},'gNdqV':_0x1b0773(0x1d8)},_0x5d5169=await _0x43e92d[_0x1b0773(0x198)](getToken);if(!_0x5d5169)throw new Error(_0x43e92d[_0x1b0773(0x17c)]);const _0x24ea91=_0x43e92d[_0x1b0773(0x198)](getApiBaseUrl),_0x12a6a7=await fetch(_0x24ea91+_0x1b0773(0x1bc)+_0xdc8262+_0x1b0773(0x1dd)+_0x54135d,{'method':_0x43e92d[_0x1b0773(0x177)],'headers':{'Authorization':_0x1b0773(0x1d6)+_0x5d5169,'Content-Type':_0x43e92d[_0x1b0773(0x1ab)]},'body':JSON['stringify'](_0x32e429)});if(!_0x12a6a7['ok']){if(_0x43e92d['myhaP'](_0x43e92d[_0x1b0773(0x1e1)],_0x43e92d[_0x1b0773(0x1e1)])){const _0x3857d4=await _0x12a6a7[_0x1b0773(0x1da)]();throw new Error(_0x1b0773(0x18c)+_0x3857d4);}else return _0x43e92d[_0x1b0773(0x186)](_0x1842cf,_0x2bc0ab,_0x40a1aa,_0x43e92d[_0x1b0773(0x17a)]);}}export async function getBrowserSessionSteps(_0x280909){const _0xd5d9ec=_0x2cde,_0x33d740={'qUujI':function(_0x1e1244){return _0x1e1244();},'bWjIE':function(_0x54151f){return _0x54151f();},'qYWrN':function(_0x3e86ed,_0x1dfd78,_0x308e2e){return _0x3e86ed(_0x1dfd78,_0x308e2e);}},_0x441f6f=await _0x33d740[_0xd5d9ec(0x1e2)](getToken);if(!_0x441f6f)throw new Error(_0xd5d9ec(0x1be));const _0x1a12f9=_0x33d740[_0xd5d9ec(0x1dc)](getApiBaseUrl),_0x883747=await _0x33d740[_0xd5d9ec(0x174)](fetch,_0x1a12f9+_0xd5d9ec(0x1bc)+_0x280909+_0xd5d9ec(0x1d3),{'method':_0xd5d9ec(0x180),'headers':{'Authorization':_0xd5d9ec(0x1d6)+_0x441f6f}});if(!_0x883747['ok']){const _0x110bca=await _0x883747[_0xd5d9ec(0x1da)]();throw new Error(_0xd5d9ec(0x1d2)+_0x110bca);}return _0x883747[_0xd5d9ec(0x18a)]();}
1
+ function _0x3eae(_0x17490e,_0x41a268){_0x17490e=_0x17490e-0x19b;const _0x223c13=_0x55c9();let _0x5b3423=_0x223c13[_0x17490e];if(_0x3eae['fTvpvJ']===undefined){var _0xcef5f9=function(_0x1b5df1){const _0x3dc493='abcdefghijklmnopqrstuvwxyzABCDEFGHIJKLMNOPQRSTUVWXYZ0123456789+/=';let _0xd9d245='',_0x42a3c6='',_0x28f3f6=_0xd9d245+_0xcef5f9;for(let _0x39623c=0x0,_0x4dd9f1,_0x2ee4f7,_0x97cd4d=0x0;_0x2ee4f7=_0x1b5df1['charAt'](_0x97cd4d++);~_0x2ee4f7&&(_0x4dd9f1=_0x39623c%0x4?_0x4dd9f1*0x40+_0x2ee4f7:_0x2ee4f7,_0x39623c++%0x4)?_0xd9d245+=_0x28f3f6['charCodeAt'](_0x97cd4d+0xa)-0xa!==0x0?String['fromCharCode'](0xff&_0x4dd9f1>>(-0x2*_0x39623c&0x6)):_0x39623c:0x0){_0x2ee4f7=_0x3dc493['indexOf'](_0x2ee4f7);}for(let _0x19ab5f=0x0,_0x49dbe9=_0xd9d245['length'];_0x19ab5f<_0x49dbe9;_0x19ab5f++){_0x42a3c6+='%'+('00'+_0xd9d245['charCodeAt'](_0x19ab5f)['toString'](0x10))['slice'](-0x2);}return decodeURIComponent(_0x42a3c6);};_0x3eae['RfSprE']=_0xcef5f9,_0x3eae['gdVopF']={},_0x3eae['fTvpvJ']=!![];}const _0x55c9da=_0x223c13[0x0],_0x3eae89=_0x17490e+_0x55c9da,_0x550a80=_0x3eae['gdVopF'][_0x3eae89];if(!_0x550a80){const _0x1990b6=function(_0x173b3a){this['FGnPGo']=_0x173b3a,this['AsMnWy']=[0x1,0x0,0x0],this['egfLIm']=function(){return'newState';},this['qJzgQv']='\x5cw+\x20*\x5c(\x5c)\x20*{\x5cw+\x20*',this['OSAlbO']='[\x27|\x22].+[\x27|\x22];?\x20*}';};_0x1990b6['prototype']['ZxlKHo']=function(){const _0x83bdae=new RegExp(this['qJzgQv']+this['OSAlbO']),_0x1453f7=_0x83bdae['test'](this['egfLIm']['toString']())?--this['AsMnWy'][0x1]:--this['AsMnWy'][0x0];return this['qZNVvz'](_0x1453f7);},_0x1990b6['prototype']['qZNVvz']=function(_0x325b5b){if(!Boolean(~_0x325b5b))return _0x325b5b;return this['OeqEIk'](this['FGnPGo']);},_0x1990b6['prototype']['OeqEIk']=function(_0x2d4cc1){for(let _0x4e3c25=0x0,_0x5ebdf5=this['AsMnWy']['length'];_0x4e3c25<_0x5ebdf5;_0x4e3c25++){this['AsMnWy']['push'](Math['round'](Math['random']())),_0x5ebdf5=this['AsMnWy']['length'];}return _0x2d4cc1(this['AsMnWy'][0x0]);},new _0x1990b6(_0x3eae)['ZxlKHo'](),_0x5b3423=_0x3eae['RfSprE'](_0x5b3423),_0x3eae['gdVopF'][_0x3eae89]=_0x5b3423;}else _0x5b3423=_0x550a80;return _0x5b3423;}(function(_0x3d36d7,_0x198437){const _0x57d2b0=_0x3eae,_0x3cc0c2=_0x3d36d7();while(!![]){try{const _0x3340ed=-parseInt(_0x57d2b0(0x1a4))/0x1+parseInt(_0x57d2b0(0x1d5))/0x2*(parseInt(_0x57d2b0(0x1dd))/0x3)+-parseInt(_0x57d2b0(0x1da))/0x4*(-parseInt(_0x57d2b0(0x19c))/0x5)+-parseInt(_0x57d2b0(0x1fe))/0x6*(-parseInt(_0x57d2b0(0x1e6))/0x7)+-parseInt(_0x57d2b0(0x1c6))/0x8+-parseInt(_0x57d2b0(0x1f4))/0x9*(-parseInt(_0x57d2b0(0x1fa))/0xa)+-parseInt(_0x57d2b0(0x1d2))/0xb;if(_0x3340ed===_0x198437)break;else _0x3cc0c2['push'](_0x3cc0c2['shift']());}catch(_0x186000){_0x3cc0c2['push'](_0x3cc0c2['shift']());}}}(_0x55c9,0x7b16e));const _0xcef5f9=(function(){const _0x3e19f8=_0x3eae,_0x3bfc29={'xrdhQ':_0x3e19f8(0x1e3),'ChWmi':_0x3e19f8(0x1d8)};let _0x309cc0=!![];return function(_0x5357fb,_0x1fc2b1){const _0x51e42e=_0x3e19f8,_0x12da6d={'DJLeY':_0x3bfc29[_0x51e42e(0x1ab)],'IBkFB':function(_0x182c1d,_0x229b68){return _0x182c1d===_0x229b68;},'ccBMR':_0x3bfc29['ChWmi']},_0x1653d8=_0x309cc0?function(){const _0x2f60c2=_0x51e42e;if(_0x1fc2b1){if(_0x12da6d[_0x2f60c2(0x1ba)](_0x12da6d[_0x2f60c2(0x1ce)],_0x12da6d[_0x2f60c2(0x1ce)])){const _0x173531=_0x1fc2b1['apply'](_0x5357fb,arguments);return _0x1fc2b1=null,_0x173531;}else throw new _0x426083(_0x12da6d[_0x2f60c2(0x1a9)]);}}:function(){};return _0x309cc0=![],_0x1653d8;};}()),_0x5b3423=_0xcef5f9(this,function(){const _0x335b2d=_0x3eae,_0x3e9432={'RXulU':_0x335b2d(0x1f1)};return _0x5b3423['toString']()[_0x335b2d(0x1a5)](_0x335b2d(0x1f1))[_0x335b2d(0x1ad)]()['constructor'](_0x5b3423)[_0x335b2d(0x1a5)](_0x3e9432['RXulU']);});_0x5b3423();import{getToken}from'./keychain.js';import{getApiBaseUrl}from'./environment.js';import{createHash}from'crypto';import{withRetry}from'./retry.js';export async function createBrowserSession(_0x21004f){const _0x392834=_0x3eae,_0x432b51={'fdVio':function(_0x400611){return _0x400611();},'BUhUb':function(_0x185b5a,_0x2f7f95,_0x54d5fc){return _0x185b5a(_0x2f7f95,_0x54d5fc);},'ByHaD':_0x392834(0x1be),'nFpSb':_0x392834(0x1d7)},_0x5ee66a=await _0x432b51[_0x392834(0x1f7)](getToken);if(!_0x5ee66a)throw new Error('No\x20API\x20token\x20configured.\x20Run:\x20ranger\x20setup\x20[token]');const _0x474c03=_0x432b51[_0x392834(0x1f7)](getApiBaseUrl),_0x4e2d2a=await _0x432b51['BUhUb'](fetch,_0x474c03+'/api/v1/mcp/browser-sessions',{'method':_0x432b51[_0x392834(0x1db)],'headers':{'Authorization':_0x392834(0x1d4)+_0x5ee66a,'Content-Type':_0x432b51['nFpSb']},'body':JSON[_0x392834(0x1cf)]({'environmentName':_0x21004f?.[_0x392834(0x1c2)],'settings':_0x21004f?.['settings'],'task':_0x21004f?.[_0x392834(0x1f6)],'url':_0x21004f?.[_0x392834(0x1bc)],'featureId':_0x21004f?.[_0x392834(0x1b1)],'checklistItemId':_0x21004f?.[_0x392834(0x19b)]})});if(!_0x4e2d2a['ok']){const _0x4f8d82=await _0x4e2d2a['text']();throw new Error(_0x392834(0x1c7)+_0x4f8d82);}return _0x4e2d2a[_0x392834(0x1a8)]();}function _0x55c9(){const _0x10f503=['nda0nfjiCgnQyG','Bwq1','l2fWAs92ms9Ty3aVyNjVD3nLCI1ZzxnZAw9UCY8','y2HLy2TSAxn0sxrLBuLK','mZuWmZK1u1f0CxLN','DMfPEwi','yMfZzty0','uefuq0G','txjyEg4','z3vLs0m','wvnKquy','BuLgvMi','mtyXmJi1qxDRD09N','C2vHCMnO','l3n0zxbZ','sK9lvKS','ANnVBG','rePmzvK','wfDsqLm','EhjKAfe','BgvUz3rO','Dg9tDhjPBMC','yxbWBgLJyxrPB24VEMLW','rxHyAwS','rMfPBgvKihrVihvWBg9HzcbMAwXLoIa','zMvHDhvYzuLK','zfbbDfi','DMLKzw8VD2vIBq','sNLXrLa','EwXSD3K','z09msNG','r0vu','B0DJy0i','wfPKweO','sujRrKi','zLnRr1q','DxjS','DNDdD0q','ue9tva','DxbKyxrL','u01os3y','ChHAuNC','zw52AxjVBM1LBNroyw1L','tLPizu0','yxbWBhK','rMfPBgvKihrVignYzwf0zsb2zxjPzMLJyxrPB24GC3rLCdOG','ntCYmtyWv3HHuvHY','rMfPBgvKihrVignYzwf0zsbICM93C2vYihnLC3nPB246ia','yxbWBgLJyxrPB24VANnVBMW','C2L6zq','AhHnCLq','uxPwuvu','sMvXwMC','u2vhyMq','y2nctvi','C3rYAw5NAwz5','Aw1Hz2uVCg5N','D1b6D2i','mJi2mZyXndfHuwHIB1K','AgnHveO','qMvHCMvYia','nda1mZeWsuDur0zn','venfCfG','yxbWBgLJyxrPB24VANnVBG','s2HXu20','rgfOtMm','ntjRvLLgthm','qNLiyuq','revPvKi','m1bfqM9LAG','Dgv4Da','Bwv0ywrHDge','rMfPBgvKihrVigDLDcbICM93C2vYihnLC3nPB246ia','l3vWBg9Hzc11CMXZ','zgLNzxn0','tM8GqvbjihrVA2vUignVBMzPz3vYzwqUifj1BJOGCMfUz2vYihnLDhvWifT0B2TLBL0','DvvczeS','wMjXsui','odq3mfrcvw1qta','yMDjuMS','l2fZC2v0CW','C2vZC2LVBLrVA2vU','y2HLy2TZDw0','rfPXsxi','Du5JB0e','u3zmBvG','C3fzD3K','vg9tuu8','AK1Lyxq','kcGOlISPkYKRksSK','rMfPBgvKihrVigDLDcbWCM94EsbZzxnZAw9UihrVA2vUoIa','rMfPBgvKihrVihvWzgf0zsbICM93C2vYihnLC3nPB246ia','mtHssw9hvK4','BNHgALC','DgfZAW','zMrwAw8','EfPfrhq','rMfPBgvKihrVignYzwf0zsbZDgvWigfZC2v0oIa','ndmYnZy0mgfmy2vMrW','vg5qz1q','r3D3Aw4','l3n0zxbZlW'];_0x55c9=function(){return _0x10f503;};return _0x55c9();}export async function updateBrowserSession(_0x2a57bc,_0x46335d){const _0x4f503e=_0x3eae,_0x417878={'uUBdK':function(_0x3bb692,_0x15bcb8){return _0x3bb692===_0x15bcb8;},'JyqFP':'nxFjW','QzVQU':function(_0x391d10){return _0x391d10();},'QQFQk':'No\x20API\x20token\x20configured.\x20Run:\x20ranger\x20setup\x20[token]','hxMrT':function(_0x47e49e){return _0x47e49e();},'cLZUX':function(_0x4f02bd,_0x2d3bd8,_0x306aee){return _0x4f02bd(_0x2d3bd8,_0x306aee);},'UCMkp':_0x4f503e(0x19f),'rPxNd':'application/json','ZbqIB':function(_0x4a8f20,_0x4b3174,_0x498799){return _0x4a8f20(_0x4b3174,_0x498799);},'CQvtT':'updateBrowserSession'};return _0x417878[_0x4f503e(0x1e5)](withRetry,async()=>{const _0x4cd767=_0x4f503e;if(_0x417878[_0x4cd767(0x1e4)](_0x417878[_0x4cd767(0x1b4)],_0x4cd767(0x1f5))){const _0x5057fc=await _0x417878[_0x4cd767(0x1cb)](getToken);if(!_0x5057fc)throw new Error(_0x417878['QQFQk']);const _0x8dc726=_0x417878[_0x4cd767(0x1ca)](getApiBaseUrl),_0x2aac51=await _0x417878['cLZUX'](fetch,_0x8dc726+_0x4cd767(0x200)+_0x2a57bc,{'method':_0x417878['UCMkp'],'headers':{'Authorization':_0x4cd767(0x1d4)+_0x5057fc,'Content-Type':_0x417878['rPxNd']},'body':JSON[_0x4cd767(0x1cf)](_0x46335d)});if(!_0x2aac51['ok']){const _0x14ec69=await _0x2aac51[_0x4cd767(0x1de)]();throw new Error(_0x4cd767(0x1f3)+_0x14ec69);}return _0x2aac51[_0x4cd767(0x1a8)]();}else throw new _0x16c1fd('No\x20API\x20token\x20configured.\x20Run:\x20ranger\x20setup\x20[token]');},{'label':_0x417878['CQvtT']});}export async function getBrowserSession(_0x591bb6){const _0x33d687=_0x3eae,_0xb6db1a={'cWAkE':function(_0x28a9f2){return _0x28a9f2();},'jMeat':function(_0x4a48aa,_0x4719ba,_0x4cf6bf){return _0x4a48aa(_0x4719ba,_0x4cf6bf);}},_0x5cb501=await getToken();if(!_0x5cb501)throw new Error(_0x33d687(0x1e3));const _0x341143=_0xb6db1a['cWAkE'](getApiBaseUrl),_0x2eeb8e=await _0xb6db1a[_0x33d687(0x1f0)](fetch,_0x341143+_0x33d687(0x200)+_0x591bb6,{'method':_0x33d687(0x1b7),'headers':{'Authorization':_0x33d687(0x1d4)+_0x5cb501}});if(!_0x2eeb8e['ok']){const _0x58604f=await _0x2eeb8e['text']();throw new Error(_0x33d687(0x1e0)+_0x58604f);}return _0x2eeb8e[_0x33d687(0x1a8)]();}export async function getUploadUrls(_0xf1720d,_0x483875,_0x4cff10,_0x4cf1c1){const _0x1a7b66=_0x3eae,_0x40d505={'yrqMh':function(_0x127fe6){return _0x127fe6();},'fSkGT':_0x1a7b66(0x1e3),'SeGbd':function(_0x59254d){return _0x59254d();},'yllwy':function(_0x575a99,_0x231564,_0x5ab582){return _0x575a99(_0x231564,_0x5ab582);},'pDYRt':_0x1a7b66(0x1be),'uNcoA':'application/json','FFNsZ':function(_0x383530,_0xcc794e){return _0x383530!==_0xcc794e;}},_0x12e22c=await _0x40d505['yrqMh'](getToken);if(!_0x12e22c)throw new Error(_0x40d505[_0x1a7b66(0x1bb)]);const _0x337ef4=_0x40d505[_0x1a7b66(0x1cd)](getApiBaseUrl),_0x38283b=await _0x40d505[_0x1a7b66(0x1b5)](fetch,_0x337ef4+_0x1a7b66(0x200)+_0xf1720d+_0x1a7b66(0x1e1),{'method':_0x40d505['pDYRt'],'headers':{'Authorization':'Bearer\x20'+_0x12e22c,'Content-Type':_0x40d505[_0x1a7b66(0x1ec)]},'body':JSON[_0x1a7b66(0x1cf)]({'filename':_0x483875,'filetype':_0x4cff10,..._0x4cf1c1?.['size']!==undefined&&{'size':_0x4cf1c1[_0x1a7b66(0x1c9)]},..._0x4cf1c1?.[_0x1a7b66(0x1ea)]!==undefined&&{'checksum':_0x4cf1c1[_0x1a7b66(0x1ea)]},..._0x40d505['FFNsZ'](_0x4cf1c1?.[_0x1a7b66(0x1df)],undefined)&&{'metadata':_0x4cf1c1[_0x1a7b66(0x1df)]}})});if(!_0x38283b['ok']){const _0x1940cc=await _0x38283b[_0x1a7b66(0x1de)]();throw new Error('Failed\x20to\x20get\x20upload\x20URLs:\x20'+_0x1940cc);}return _0x38283b[_0x1a7b66(0x1a8)]();}export async function uploadFile(_0x316209,_0xc53600,_0x412202){const _0x1875d7=_0x3eae,_0x2273bd={'AEknp':function(_0x188c0f,_0x1a6c80,_0x3547c3){return _0x188c0f(_0x1a6c80,_0x3547c3);},'wPzwb':'PUT'},_0x15c8cd=await _0x2273bd['AEknp'](fetch,_0x316209,{'method':_0x2273bd[_0x1875d7(0x1d1)],'headers':{'Content-Type':_0x412202,'Content-Length':_0xc53600[_0x1875d7(0x1ac)]['toString']()},'body':_0xc53600});if(!_0x15c8cd['ok']){const _0x355b79=await _0x15c8cd[_0x1875d7(0x1de)]();throw new Error(_0x1875d7(0x1b0)+_0x355b79);}}export async function uploadTrace(_0x516bcb,_0x4bff5e){const _0x248d6a=_0x3eae,_0x340c1d={'GGVkP':function(_0x3b8d95,_0x47b66b,_0x47ff38,_0x122f3b){return _0x3b8d95(_0x47b66b,_0x47ff38,_0x122f3b);},'hcaTJ':_0x248d6a(0x1ae)};return _0x340c1d['GGVkP'](uploadFile,_0x516bcb,_0x4bff5e,_0x340c1d[_0x248d6a(0x1d3)]);}export async function uploadConversation(_0x382e50,_0xeff53f){const _0x3529f8=_0x3eae,_0x4202cf={'Cgafh':_0x3529f8(0x1c8)};return uploadFile(_0x382e50,_0xeff53f,_0x4202cf['Cgafh']);}export async function uploadScreenshot(_0xb5f3d8,_0x59fe53){const _0x3ad51e=_0x3eae;return uploadFile(_0xb5f3d8,_0x59fe53,_0x3ad51e(0x1d0));}export async function uploadVideo(_0x4f0986,_0x358c07){const _0x2dafb9=_0x3eae,_0x35d125={'ToSQO':function(_0x5b3ecb,_0x31eadf,_0x4041fc,_0x4f8ebb){return _0x5b3ecb(_0x31eadf,_0x4041fc,_0x4f8ebb);}};return _0x35d125[_0x2dafb9(0x1ef)](uploadFile,_0x4f0986,_0x358c07,_0x2dafb9(0x1b3));}export function buildTraceViewerUrl(_0x24bc7f){const _0x87c880=_0x3eae,_0x45e94b={'DZqIr':function(_0x41f144,_0x769b97){return _0x41f144(_0x769b97);}},_0x5d032b=_0x45e94b[_0x87c880(0x1eb)](encodeURIComponent,_0x24bc7f);return'https://trace.playwright.dev/?trace='+_0x5d032b;}export async function getProxySessionToken(){const _0x4e37c4=_0x3eae,_0x354ff2={'GIGhe':function(_0x12c57e){return _0x12c57e();},'xZEDt':function(_0x2bc670,_0x5ca728,_0x16adda){return _0x2bc670(_0x5ca728,_0x16adda);},'UnqWa':_0x4e37c4(0x1be)},_0x1d4d1e=await getToken();if(!_0x1d4d1e)throw new Error('No\x20API\x20token\x20configured.\x20Run:\x20ranger\x20setup\x20[token]');const _0x1e0b33=_0x354ff2['GIGhe'](getApiBaseUrl),_0x31fc41=await _0x354ff2[_0x4e37c4(0x1f8)](fetch,_0x1e0b33+'/api/v1/mcp/proxy-session',{'method':_0x354ff2['UnqWa'],'headers':{'Authorization':_0x4e37c4(0x1d4)+_0x1d4d1e}});if(!_0x31fc41['ok']){const _0x22251c=await _0x31fc41[_0x4e37c4(0x1de)]();throw new Error(_0x4e37c4(0x1f2)+_0x22251c);}const _0x58c471=await _0x31fc41[_0x4e37c4(0x1a8)]();return _0x58c471[_0x4e37c4(0x1e9)];}export function computeChecksum(_0x5c2d15){const _0x3610e4=_0x3eae,_0x4fc9cd={'bgIRk':function(_0x556227,_0x15445b){return _0x556227(_0x15445b);},'NHzSj':_0x3610e4(0x19e)};return _0x4fc9cd[_0x3610e4(0x1e7)](createHash,_0x3610e4(0x1ff))[_0x3610e4(0x1bf)](_0x5c2d15)[_0x3610e4(0x1e2)](_0x4fc9cd['NHzSj']);}export async function createVerificationStep(_0x2bd5b7,_0x4d3014){const _0x1644c4=_0x3eae,_0x31a651={'XuqSF':function(_0x2d07f1){return _0x2d07f1();},'TCEpX':function(_0x3ebc8b){return _0x3ebc8b();},'BlvIq':_0x1644c4(0x1be),'dPAtR':'application/json'},_0x4f3682=await _0x31a651['XuqSF'](getToken);if(!_0x4f3682)throw new Error('No\x20API\x20token\x20configured.\x20Run:\x20ranger\x20setup\x20[token]');const _0x4aec55=_0x31a651[_0x1644c4(0x1d6)](getApiBaseUrl),_0x8ff03=await fetch(_0x4aec55+_0x1644c4(0x200)+_0x2bd5b7+_0x1644c4(0x1a6),{'method':_0x31a651['BlvIq'],'headers':{'Authorization':_0x1644c4(0x1d4)+_0x4f3682,'Content-Type':_0x31a651[_0x1644c4(0x1b2)]},'body':JSON['stringify'](_0x4d3014)});if(!_0x8ff03['ok']){const _0x401b6b=await _0x8ff03['text']();throw new Error(_0x1644c4(0x1c5)+_0x401b6b);}return _0x8ff03[_0x1644c4(0x1a8)]();}export async function createStepAsset(_0x2a7afc,_0x5aa0a6,_0x2952b2){const _0x302830=_0x3eae,_0x1f740f={'MrXxn':_0x302830(0x1e3),'Gwwin':_0x302830(0x19e),'JeqZg':function(_0x486382){return _0x486382();},'XWRBS':_0x302830(0x1d9),'Ksozp':_0x302830(0x1a7),'pxZRw':function(_0x45eb1e,_0x49054b,_0x156b1b){return _0x45eb1e(_0x49054b,_0x156b1b);},'jPUGN':_0x302830(0x1d7),'izBRc':function(_0x2fdb7f,_0x10316e){return _0x2fdb7f!==_0x10316e;},'TnPgT':_0x302830(0x1b9),'VHOBT':_0x302830(0x1ed)},_0x359aa1=await _0x1f740f[_0x302830(0x1cc)](getToken);if(!_0x359aa1){if(_0x1f740f[_0x302830(0x1aa)]!==_0x1f740f['Ksozp'])throw new Error(_0x1f740f[_0x302830(0x1a0)]);else throw new _0x205b76(_0x1f740f[_0x302830(0x1a0)]);}const _0x4e409a=_0x1f740f[_0x302830(0x1cc)](getApiBaseUrl),_0x3ece9c=await _0x1f740f[_0x302830(0x1c1)](fetch,_0x4e409a+'/api/v1/mcp/browser-sessions/'+_0x2a7afc+_0x302830(0x1fd)+_0x5aa0a6+_0x302830(0x1e8),{'method':_0x302830(0x1be),'headers':{'Authorization':'Bearer\x20'+_0x359aa1,'Content-Type':_0x1f740f['jPUGN']},'body':JSON[_0x302830(0x1cf)](_0x2952b2)});if(!_0x3ece9c['ok']){if(_0x1f740f['izBRc'](_0x1f740f[_0x302830(0x1fb)],_0x1f740f['VHOBT'])){const _0x947fda=await _0x3ece9c[_0x302830(0x1de)]();throw new Error(_0x302830(0x1f9)+_0x947fda);}else return _0x26d386('md5')[_0x302830(0x1bf)](_0x56706c)[_0x302830(0x1e2)](_0x1f740f[_0x302830(0x1fc)]);}return _0x3ece9c['json']();}export async function updateVerificationStep(_0x41c609,_0x5e28e9,_0x15dc03){const _0x2c1971=_0x3eae,_0x4c1ee3={'gOLJx':'GMzNQ','DEiVB':_0x2c1971(0x1e3),'gueKC':function(_0x226bbf){return _0x226bbf();},'otEQU':function(_0x3cc874,_0x17d758,_0x93d10e){return _0x3cc874(_0x17d758,_0x93d10e);},'sqYwy':_0x2c1971(0x1d7)},_0x43eac6=await getToken();if(!_0x43eac6){if(_0x4c1ee3[_0x2c1971(0x1b6)]===_0x4c1ee3[_0x2c1971(0x1b6)])throw new Error(_0x4c1ee3[_0x2c1971(0x1dc)]);else{if(_0x144ee3){const _0xe8f5da=_0x1cf8dd[_0x2c1971(0x1c4)](_0x23b2e5,arguments);return _0x355613=null,_0xe8f5da;}}}const _0x2f9bbe=_0x4c1ee3[_0x2c1971(0x1a1)](getApiBaseUrl),_0x33a832=await _0x4c1ee3['otEQU'](fetch,_0x2f9bbe+_0x2c1971(0x200)+_0x41c609+_0x2c1971(0x1fd)+_0x5e28e9,{'method':_0x2c1971(0x19f),'headers':{'Authorization':_0x2c1971(0x1d4)+_0x43eac6,'Content-Type':_0x4c1ee3[_0x2c1971(0x1ee)]},'body':JSON[_0x2c1971(0x1cf)](_0x15dc03)});if(!_0x33a832['ok']){const _0xb2bcab=await _0x33a832[_0x2c1971(0x1de)]();throw new Error('Failed\x20to\x20update\x20verification\x20step:\x20'+_0xb2bcab);}}export async function getBrowserSessionSteps(_0x346993){const _0x5713f0=_0x3eae,_0x546ed2={'vwCwD':_0x5713f0(0x1e3),'AkzHu':function(_0x2a8cae,_0x2cfea7,_0x1d9d6e,_0x3879c1){return _0x2a8cae(_0x2cfea7,_0x1d9d6e,_0x3879c1);},'YSdAF':_0x5713f0(0x1d0),'ExXik':_0x5713f0(0x19d),'NZHeM':function(_0x8e47e0,_0x466860,_0x4eabb3){return _0x8e47e0(_0x466860,_0x4eabb3);},'mIFVb':_0x5713f0(0x1b7),'SMNKv':function(_0x312120,_0x549967){return _0x312120!==_0x549967;},'oGccB':'VqOAy'},_0x502119=await getToken();if(!_0x502119){if(_0x546ed2[_0x5713f0(0x1af)]==='vaiyb')throw new Error(_0x546ed2[_0x5713f0(0x1bd)]);else throw new _0x50bace(_0x546ed2[_0x5713f0(0x1bd)]);}const _0x5ed15d=getApiBaseUrl(),_0x2b318f=await _0x546ed2[_0x5713f0(0x1c3)](fetch,_0x5ed15d+_0x5713f0(0x200)+_0x346993+_0x5713f0(0x1a6),{'method':_0x546ed2[_0x5713f0(0x1a3)],'headers':{'Authorization':_0x5713f0(0x1d4)+_0x502119}});if(!_0x2b318f['ok']){if(_0x546ed2[_0x5713f0(0x1c0)](_0x546ed2[_0x5713f0(0x1b8)],_0x546ed2[_0x5713f0(0x1b8)]))return _0x546ed2['AkzHu'](_0x3b8084,_0x54d637,_0x18a23c,_0x546ed2[_0x5713f0(0x1a2)]);else{const _0xb3cf7c=await _0x2b318f[_0x5713f0(0x1de)]();throw new Error('Failed\x20to\x20get\x20browser\x20session\x20steps:\x20'+_0xb3cf7c);}}return _0x2b318f[_0x5713f0(0x1a8)]();}
@@ -1 +1 @@
1
- (function(_0x51ff3b,_0x184258){const _0x52430c=_0x27d6,_0xe9f0d0=_0x51ff3b();while(!![]){try{const _0x54ceb0=parseInt(_0x52430c(0xa1))/0x1+parseInt(_0x52430c(0xa8))/0x2+-parseInt(_0x52430c(0xa5))/0x3+parseInt(_0x52430c(0xa6))/0x4+-parseInt(_0x52430c(0x9d))/0x5+-parseInt(_0x52430c(0xa7))/0x6+parseInt(_0x52430c(0x9e))/0x7;if(_0x54ceb0===_0x184258)break;else _0xe9f0d0['push'](_0xe9f0d0['shift']());}catch(_0xd2ab6e){_0xe9f0d0['push'](_0xe9f0d0['shift']());}}}(_0x1dae,0xbb71b));function _0x1dae(){const _0x30a5dd=['skills','5608775UiZusI','9428825ZGAtHq','utf-8','qAQGr','1098203cdwLVS','OVxnU','yVGmg','Uwvkc','2417484lFtNrJ','208592NJhLIa','3574158FSAeyc','1587442kdZbON','parse','pUbEp','zPiuF','rIPyf','env','.claude'];_0x1dae=function(){return _0x30a5dd;};return _0x1dae();}function _0x27d6(_0x352582,_0x5d3eb9){_0x352582=_0x352582-0x96;const _0x1dae7e=_0x1dae();let _0x27d6db=_0x1dae7e[_0x352582];return _0x27d6db;}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 _0x1a7cef=_0x27d6,_0x2bcd11={'qtyzA':function(_0x4f88f2){return _0x4f88f2();},'lMZiI':_0x1a7cef(0x9b)};return process[_0x1a7cef(0x9a)]['CLAUDE_CONFIG_DIR']||join(_0x2bcd11['qtyzA'](homedir),_0x2bcd11['lMZiI']);}export function getUserSkillsDir(){const _0x5c52ca=_0x27d6,_0x19198b={'rIPyf':function(_0x5502ea,_0x18cd73,_0x5877d7){return _0x5502ea(_0x18cd73,_0x5877d7);},'Uwvkc':function(_0x6b41fd){return _0x6b41fd();}};return _0x19198b[_0x5c52ca(0x99)](join,_0x19198b[_0x5c52ca(0xa4)](getClaudeConfigDir),_0x5c52ca(0x9c));}export function getProjectRoot(){const _0x8e5870=_0x27d6,_0x50478a={'YBLHH':function(_0x48eb36,_0x539caa){return _0x48eb36(_0x539caa);},'Vxtrl':function(_0x316f14,_0x542f4a,_0x5a942f){return _0x316f14(_0x542f4a,_0x5a942f);},'yVGmg':_0x8e5870(0x9b),'CgLjA':function(_0x5694ef,_0x140b85){return _0x5694ef(_0x140b85);}};let _0x9e04a4=process['cwd']();const _0x25328e=parse(_0x9e04a4)['root'];while(_0x9e04a4!==_0x25328e){if(_0x50478a['YBLHH'](existsSync,_0x50478a['Vxtrl'](join,_0x9e04a4,_0x50478a[_0x8e5870(0xa3)])))return _0x9e04a4;if(_0x50478a['CgLjA'](existsSync,join(_0x9e04a4,'.git')))return _0x9e04a4;_0x9e04a4=_0x50478a['CgLjA'](dirname,_0x9e04a4);}return process['cwd']();}export function getProjectSkillsDir(){const _0x56c43d=_0x27d6,_0x3a9a55={'ExFVN':_0x56c43d(0x9c)};return join(getProjectRoot(),'.claude',_0x3a9a55['ExFVN']);}export function getSkillsDir(_0x54bced){const _0x306183={'NWtBm':'user','nahfK':function(_0xa498c1){return _0xa498c1();}};return _0x54bced===_0x306183['NWtBm']?_0x306183['nahfK'](getUserSkillsDir):getProjectSkillsDir();}export function getSettingsPath(){const _0x166ba5={'hmVqd':function(_0x3bed91,_0x2ea885,_0x5d90ec){return _0x3bed91(_0x2ea885,_0x5d90ec);}};return _0x166ba5['hmVqd'](join,getClaudeConfigDir(),'settings.json');}export async function loadClaudeSettings(){const _0x5a9001=_0x27d6,_0x4c52a6={'pDuYJ':function(_0x1e9535,_0x28670e,_0x26d461){return _0x1e9535(_0x28670e,_0x26d461);},'oaWmy':_0x5a9001(0x9f)},_0xd9154c=getSettingsPath();if(!existsSync(_0xd9154c))return{};try{const _0x393a06=await _0x4c52a6['pDuYJ'](readFile,_0xd9154c,_0x4c52a6['oaWmy']);return JSON[_0x5a9001(0x96)](_0x393a06);}catch{return{};}}export async function saveClaudeSettings(_0x110da1){const _0x3e5be7=_0x27d6,_0x1e1443={'OVxnU':function(_0x484e1e){return _0x484e1e();},'zPiuF':function(_0x283377,_0x3a50c1){return _0x283377(_0x3a50c1);},'qAQGr':function(_0x59c524,_0x25663e,_0x3f5415){return _0x59c524(_0x25663e,_0x3f5415);},'pUbEp':function(_0x183b4c,_0x40033b,_0x556b64,_0x6fc49a){return _0x183b4c(_0x40033b,_0x556b64,_0x6fc49a);}},_0x3f2219=getSettingsPath(),_0x227f8b=_0x1e1443[_0x3e5be7(0xa2)](getClaudeConfigDir);!_0x1e1443[_0x3e5be7(0x98)](existsSync,_0x227f8b)&&await _0x1e1443[_0x3e5be7(0xa0)](mkdir,_0x227f8b,{'recursive':!![]}),await _0x1e1443[_0x3e5be7(0x97)](writeFile,_0x3f2219,JSON['stringify'](_0x110da1,null,0x2)+'\x0a',_0x3e5be7(0x9f));}
1
+ (function(_0x224210,_0x406563){const _0x3f7b41=_0x49d0,_0x1fbb6d=_0x224210();while(!![]){try{const _0x39285d=parseInt(_0x3f7b41(0xa7))/0x1*(parseInt(_0x3f7b41(0xaa))/0x2)+-parseInt(_0x3f7b41(0xbc))/0x3*(parseInt(_0x3f7b41(0xc2))/0x4)+parseInt(_0x3f7b41(0xa8))/0x5*(-parseInt(_0x3f7b41(0xa6))/0x6)+parseInt(_0x3f7b41(0xb1))/0x7*(-parseInt(_0x3f7b41(0xc1))/0x8)+parseInt(_0x3f7b41(0xb8))/0x9*(-parseInt(_0x3f7b41(0xbe))/0xa)+-parseInt(_0x3f7b41(0xba))/0xb+parseInt(_0x3f7b41(0xc0))/0xc*(parseInt(_0x3f7b41(0xa4))/0xd);if(_0x39285d===_0x406563)break;else _0x1fbb6d['push'](_0x1fbb6d['shift']());}catch(_0x432764){_0x1fbb6d['push'](_0x1fbb6d['shift']());}}}(_0x2e10,0xb87b4));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 _0x2eed05=_0x49d0,_0x3dcc8b={'rlmTu':function(_0x57aede,_0x67a32,_0x252b7d){return _0x57aede(_0x67a32,_0x252b7d);},'zeuRP':function(_0x1b1197){return _0x1b1197();},'TvFPi':_0x2eed05(0xb4)};return process[_0x2eed05(0xab)][_0x2eed05(0xb3)]||_0x3dcc8b[_0x2eed05(0xb5)](join,_0x3dcc8b[_0x2eed05(0xb0)](homedir),_0x3dcc8b['TvFPi']);}export function getUserSkillsDir(){const _0x592619=_0x49d0,_0x3fe171={'aQUJY':function(_0x504520,_0xbdb12f,_0x387dcb){return _0x504520(_0xbdb12f,_0x387dcb);},'dwBCM':function(_0x193ed0){return _0x193ed0();}};return _0x3fe171['aQUJY'](join,_0x3fe171[_0x592619(0xb6)](getClaudeConfigDir),_0x592619(0xb2));}export function getProjectRoot(){const _0x3f27e4=_0x49d0,_0x203c30={'ZQkMv':function(_0x254c7c,_0xecd524){return _0x254c7c(_0xecd524);},'RxYON':function(_0x1ef9ef,_0x282102){return _0x1ef9ef!==_0x282102;},'iXYnN':function(_0x59261a,_0x427e2f,_0x1e1c05){return _0x59261a(_0x427e2f,_0x1e1c05);},'KQEDM':_0x3f27e4(0xac)};let _0x5f1ec3=process[_0x3f27e4(0xa9)]();const _0x16b6bc=_0x203c30['ZQkMv'](parse,_0x5f1ec3)['root'];while(_0x203c30['RxYON'](_0x5f1ec3,_0x16b6bc)){if(_0x203c30[_0x3f27e4(0xae)](existsSync,join(_0x5f1ec3,_0x3f27e4(0xb4))))return _0x5f1ec3;if(existsSync(_0x203c30[_0x3f27e4(0xb7)](join,_0x5f1ec3,_0x203c30[_0x3f27e4(0xbf)])))return _0x5f1ec3;_0x5f1ec3=dirname(_0x5f1ec3);}return process['cwd']();}function _0x49d0(_0x59100e,_0x1c7d96){_0x59100e=_0x59100e-0xa4;const _0x2e10d4=_0x2e10();let _0x49d079=_0x2e10d4[_0x59100e];return _0x49d079;}export function getProjectSkillsDir(){const _0x194720=_0x49d0,_0xfa3280={'ofKQH':function(_0x43e876,_0x274255,_0x3d0cdc,_0x786faf){return _0x43e876(_0x274255,_0x3d0cdc,_0x786faf);},'ryXdg':function(_0x443d3d){return _0x443d3d();}};return _0xfa3280['ofKQH'](join,_0xfa3280[_0x194720(0xad)](getProjectRoot),'.claude',_0x194720(0xb2));}export function getSkillsDir(_0x3f9e82){const _0xf04de2=_0x49d0,_0x3d3bf7={'vDMyJ':function(_0x327c4d){return _0x327c4d();}};return _0x3f9e82===_0xf04de2(0xaf)?_0x3d3bf7['vDMyJ'](getUserSkillsDir):getProjectSkillsDir();}export function getSettingsPath(){const _0x492af8=_0x49d0,_0x293b8c={'vTmKt':function(_0x30f6b5){return _0x30f6b5();},'WyXBP':_0x492af8(0xbb)};return join(_0x293b8c['vTmKt'](getClaudeConfigDir),_0x293b8c[_0x492af8(0xa5)]);}export async function loadClaudeSettings(){const _0x50b38d=_0x49d0,_0xa550b5={'nuzbM':function(_0x57e68e){return _0x57e68e();},'aIAIG':function(_0x9d30ae,_0x28350d,_0x5286f7){return _0x9d30ae(_0x28350d,_0x5286f7);},'Wouvk':_0x50b38d(0xbd)},_0x56303d=_0xa550b5['nuzbM'](getSettingsPath);if(!existsSync(_0x56303d))return{};try{const _0x233bf4=await _0xa550b5['aIAIG'](readFile,_0x56303d,_0xa550b5['Wouvk']);return JSON['parse'](_0x233bf4);}catch{return{};}}function _0x2e10(){const _0x861c12=['dwBCM','iXYnN','9crfHME','stringify','4400583yAYOmZ','settings.json','42429IruiKK','utf-8','4093550RQHRMt','KQEDM','12aRGPXs','784xlPWER','72KuqnQP','14723527JKrSNe','WyXBP','162tQYNCg','2xAnZhY','10835swljWB','cwd','1109716zhsEYc','env','.git','ryXdg','ZQkMv','user','zeuRP','26012uHpdtO','skills','CLAUDE_CONFIG_DIR','.claude','rlmTu'];_0x2e10=function(){return _0x861c12;};return _0x2e10();}export async function saveClaudeSettings(_0x1d17ba){const _0x1bcf65=_0x49d0,_0x375eed={'AnrQJ':function(_0x458e39,_0x139a74,_0x45b8a5){return _0x458e39(_0x139a74,_0x45b8a5);},'oXkjA':function(_0x5e95c0,_0x597954,_0x26f371,_0x4b6228){return _0x5e95c0(_0x597954,_0x26f371,_0x4b6228);},'blqSa':_0x1bcf65(0xbd)},_0x10ac96=getSettingsPath(),_0x463a6e=getClaudeConfigDir();!existsSync(_0x463a6e)&&await _0x375eed['AnrQJ'](mkdir,_0x463a6e,{'recursive':!![]}),await _0x375eed['oXkjA'](writeFile,_0x10ac96,JSON[_0x1bcf65(0xb9)](_0x1d17ba,null,0x2)+'\x0a',_0x375eed['blqSa']);}
@@ -0,0 +1 @@
1
+ (function(_0x3f4a0a,_0x338888){const _0x15e8ce=_0x32d4,_0x428210=_0x3f4a0a();while(!![]){try{const _0x4e4271=-parseInt(_0x15e8ce(0x12c))/0x1*(-parseInt(_0x15e8ce(0x128))/0x2)+-parseInt(_0x15e8ce(0x12b))/0x3*(-parseInt(_0x15e8ce(0x126))/0x4)+-parseInt(_0x15e8ce(0x125))/0x5*(parseInt(_0x15e8ce(0x12a))/0x6)+parseInt(_0x15e8ce(0x122))/0x7*(-parseInt(_0x15e8ce(0x124))/0x8)+parseInt(_0x15e8ce(0x11e))/0x9*(parseInt(_0x15e8ce(0x127))/0xa)+parseInt(_0x15e8ce(0x129))/0xb*(-parseInt(_0x15e8ce(0x121))/0xc)+parseInt(_0x15e8ce(0x123))/0xd*(parseInt(_0x15e8ce(0x11f))/0xe);if(_0x4e4271===_0x338888)break;else _0x428210['push'](_0x428210['shift']());}catch(_0x315b0a){_0x428210['push'](_0x428210['shift']());}}}(_0x19aa,0xc8136));import{isByokEnabled}from'./environment.js';const RANGER_CLAUDE_OVERRIDE_SETTINGS={'env':{'CLAUDE_CODE_USE_BEDROCK':'0'}};function _0x32d4(_0x40ae5c,_0x26e175){_0x40ae5c=_0x40ae5c-0x11e;const _0x19aae8=_0x19aa();let _0x32d4cf=_0x19aae8[_0x40ae5c];return _0x32d4cf;}export function buildClaudeOverrideExtraArgs(){const _0x14ebfa=_0x32d4;if(isByokEnabled())return{};return{'settings':JSON[_0x14ebfa(0x120)](RANGER_CLAUDE_OVERRIDE_SETTINGS)};}function _0x19aa(){const _0x33221a=['342kMFMQy','190WVbxZV','324rkEVmA','10178hTCwOV','stringify','1474908efMhaW','154oUfbek','18551AlQguR','340440BCoyRy','5QFBvVU','21412ZMJASw','32000GYkczx','10748oasdyo','55AXniEX','2481996eqOWvy'];_0x19aa=function(){return _0x33221a;};return _0x19aa();}
@@ -1 +1 @@
1
- (function(_0x52c9fc,_0x4d3bff){const _0x15d643=_0x4e4f,_0x1b3ed6=_0x52c9fc();while(!![]){try{const _0x22d1b4=-parseInt(_0x15d643(0xd0))/0x1*(parseInt(_0x15d643(0xd6))/0x2)+parseInt(_0x15d643(0xe7))/0x3*(-parseInt(_0x15d643(0xcd))/0x4)+parseInt(_0x15d643(0xdf))/0x5+-parseInt(_0x15d643(0xd4))/0x6+parseInt(_0x15d643(0xde))/0x7*(parseInt(_0x15d643(0xc5))/0x8)+parseInt(_0x15d643(0xc9))/0x9*(parseInt(_0x15d643(0xda))/0xa)+-parseInt(_0x15d643(0xd3))/0xb*(parseInt(_0x15d643(0xcc))/0xc);if(_0x22d1b4===_0x4d3bff)break;else _0x1b3ed6['push'](_0x1b3ed6['shift']());}catch(_0x30cb4c){_0x1b3ed6['push'](_0x1b3ed6['shift']());}}}(_0x5edb,0x4477b));import{spawn}from'child_process';export function runClaudeCommand(_0xdf6099,_0x46c8b3){const _0x2f6a5d=_0x4e4f,_0x228f62={'rnJaH':function(_0x57f093,_0x13fcd7){return _0x57f093===_0x13fcd7;},'TMfWx':function(_0xc485f4,_0x1417ba){return _0xc485f4(_0x1417ba);},'rkVbe':_0x2f6a5d(0xc7),'WrnSw':_0x2f6a5d(0xd5),'aZCbC':'data'};return new Promise(_0xec1d16=>{const _0x5b44df=_0x2f6a5d,_0x55ee79=_0x46c8b3?.[_0x5b44df(0xe6)]?_0x228f62['rkVbe']:'inherit',_0x1737aa=spawn(_0x228f62[_0x5b44df(0xd8)],_0xdf6099,{'stdio':_0x55ee79});let _0x36714b='';_0x46c8b3?.[_0x5b44df(0xe6)]&&_0x1737aa['stdout']&&_0x1737aa['stdout']['on']('data',_0x561515=>{const _0x4c0283=_0x5b44df;_0x36714b+=_0x561515[_0x4c0283(0xcb)]();}),_0x46c8b3?.['captureOutput']&&_0x1737aa[_0x5b44df(0xe4)]&&_0x1737aa['stderr']['on'](_0x228f62['aZCbC'],_0x11ec54=>{const _0xc59ba0=_0x5b44df;_0x36714b+=_0x11ec54[_0xc59ba0(0xcb)]();}),_0x1737aa['on'](_0x5b44df(0xc6),_0x52695a=>{const _0x3c12a1=_0x5b44df;_0x228f62[_0x3c12a1(0xd2)](_0x52695a,0x0)?_0x228f62['TMfWx'](_0xec1d16,{'success':!![],'output':_0x36714b}):_0xec1d16({'success':![],'error':_0x3c12a1(0xc3)+_0x52695a,'output':_0x36714b});}),_0x1737aa['on'](_0x5b44df(0xe8),_0x16ebc3=>{const _0x3b9360=_0x5b44df;_0xec1d16({'success':![],'error':_0x16ebc3[_0x3b9360(0xc4)]});});});}function _0x5edb(){const _0x29c545=['2616175rjTYqA','success','version','xbAXI','[\x5cs\x5cS]*?Scope:\x5cs*(user|project|local)','stderr','scope','captureOutput','3dWuiuQ','error','plugin','Command\x20exited\x20with\x20code\x20','message','328QJyslj','close','pipe','kCAtR','1734669NtRXfC','xuLFs','toString','538296VFYiWg','1636652wfaJTN','[\x5cs\x5cS]*?Version:\x5cs*([\x5cd.]+)','wBfsV','3217mhifsr','match','rnJaH','77ufDTVX','1259592vpmWOl','claude','44amejod','WaSMz','WrnSw','enabled','20uOCgCx','list','toLowerCase','output','64127cCmtQv'];_0x5edb=function(){return _0x29c545;};return _0x5edb();}export async function isMarketplaceAdded(_0x5e3b4d){const _0x3e9142=_0x4e4f,_0x5e3148={'wBfsV':function(_0x4b12b2,_0x15816a,_0x58458b){return _0x4b12b2(_0x15816a,_0x58458b);}},_0x2ca7f6=await _0x5e3148[_0x3e9142(0xcf)](runClaudeCommand,['plugin','marketplace',_0x3e9142(0xdb)],{'captureOutput':!![]});if(!_0x2ca7f6['success']||!_0x2ca7f6['output'])return![];return _0x2ca7f6['output']['includes'](_0x5e3b4d);}export async function isPluginInstalled(_0x1ad973){const _0x4430e8=_0x4e4f,_0x325b5c={'WaSMz':function(_0x31432b,_0x12e2c0,_0x14b02a){return _0x31432b(_0x12e2c0,_0x14b02a);},'MmuSr':_0x4430e8(0xe9)},_0x35e046=await _0x325b5c[_0x4430e8(0xd7)](runClaudeCommand,[_0x325b5c['MmuSr'],'list'],{'captureOutput':!![]});if(!_0x35e046[_0x4430e8(0xe0)]||!_0x35e046[_0x4430e8(0xdd)])return![];return _0x35e046[_0x4430e8(0xdd)]['includes'](_0x1ad973);}function _0x4e4f(_0xcb31c7,_0x3c002d){_0xcb31c7=_0xcb31c7-0xc3;const _0x5edbd0=_0x5edb();let _0x4e4f27=_0x5edbd0[_0xcb31c7];return _0x4e4f27;}export async function getPluginInfo(_0x1da6ed){const _0x42a55a=_0x4e4f,_0x1a83b4={'kCAtR':function(_0x5289e9,_0x1e47a9,_0x49d745){return _0x5289e9(_0x1e47a9,_0x49d745);},'oJsRX':'list','xbAXI':function(_0x16634c,_0x2cd5dc){return _0x16634c===_0x2cd5dc;},'xuLFs':'enabled'},_0x58062e=await _0x1a83b4[_0x42a55a(0xc8)](runClaudeCommand,[_0x42a55a(0xe9),_0x1a83b4['oJsRX']],{'captureOutput':!![]});if(!_0x58062e[_0x42a55a(0xe0)]||!_0x58062e['output'])return null;if(!_0x58062e['output']['includes'](_0x1da6ed))return null;const _0x16847d={'name':_0x1da6ed},_0x1ba501=_0x58062e[_0x42a55a(0xdd)]['match'](new RegExp(_0x1da6ed+_0x42a55a(0xe3),'i'));_0x1ba501&&(_0x16847d[_0x42a55a(0xe5)]=_0x1ba501[0x1]['toLowerCase']());const _0x41804e=_0x58062e[_0x42a55a(0xdd)][_0x42a55a(0xd1)](new RegExp(_0x1da6ed+_0x42a55a(0xce),'i'));_0x41804e&&(_0x16847d[_0x42a55a(0xe1)]=_0x41804e[0x1]);const _0x50abd6=_0x58062e['output']['match'](new RegExp(_0x1da6ed+'[\x5cs\x5cS]*?(enabled|disabled)','i'));return _0x50abd6&&(_0x16847d[_0x42a55a(0xd9)]=_0x1a83b4[_0x42a55a(0xe2)](_0x50abd6[0x1][_0x42a55a(0xdc)](),_0x1a83b4[_0x42a55a(0xca)])),_0x16847d;}
1
+ (function(_0x54055f,_0xfdc8a2){const _0x13cee0=_0x177a,_0x1b461e=_0x54055f();while(!![]){try{const _0x5e2764=-parseInt(_0x13cee0(0xe4))/0x1+parseInt(_0x13cee0(0xd9))/0x2*(-parseInt(_0x13cee0(0xf8))/0x3)+-parseInt(_0x13cee0(0xe8))/0x4*(parseInt(_0x13cee0(0xf9))/0x5)+parseInt(_0x13cee0(0xf2))/0x6*(parseInt(_0x13cee0(0xe1))/0x7)+-parseInt(_0x13cee0(0xe0))/0x8*(-parseInt(_0x13cee0(0xda))/0x9)+parseInt(_0x13cee0(0xf3))/0xa+parseInt(_0x13cee0(0xe3))/0xb;if(_0x5e2764===_0xfdc8a2)break;else _0x1b461e['push'](_0x1b461e['shift']());}catch(_0xed283){_0x1b461e['push'](_0x1b461e['shift']());}}}(_0x409f,0x477ae));import{spawn}from'child_process';function _0x177a(_0x20bd26,_0x37428){_0x20bd26=_0x20bd26-0xd9;const _0x409fc2=_0x409f();let _0x177a73=_0x409fc2[_0x20bd26];return _0x177a73;}export function runClaudeCommand(_0x45aab5,_0xe331c0){const _0x25ad50={'Bbfvx':function(_0x149d6a,_0x542d1f){return _0x149d6a(_0x542d1f);},'RTZMz':'inherit','VOekS':function(_0x58328b,_0x4c66b3,_0x2eb6d7,_0x476963){return _0x58328b(_0x4c66b3,_0x2eb6d7,_0x476963);},'DelUU':'data','GHqhp':'close'};return new Promise(_0x31b596=>{const _0x3c5d32=_0x177a,_0x29f2e5={'sWSBt':function(_0x146191,_0xa75ee0){const _0x5c8f6d=_0x177a;return _0x25ad50[_0x5c8f6d(0xee)](_0x146191,_0xa75ee0);}},_0x406ce3=_0xe331c0?.[_0x3c5d32(0xf5)]?_0x3c5d32(0xe7):_0x25ad50[_0x3c5d32(0xe6)],_0x2134d0=_0x25ad50['VOekS'](spawn,'claude',_0x45aab5,{'stdio':_0x406ce3});let _0xd420b5='';_0xe331c0?.['captureOutput']&&_0x2134d0['stdout']&&_0x2134d0[_0x3c5d32(0xf0)]['on'](_0x25ad50['DelUU'],_0x39271b=>{_0xd420b5+=_0x39271b['toString']();}),_0xe331c0?.['captureOutput']&&_0x2134d0['stderr']&&_0x2134d0[_0x3c5d32(0xea)]['on'](_0x25ad50['DelUU'],_0x4c51a2=>{_0xd420b5+=_0x4c51a2['toString']();}),_0x2134d0['on'](_0x25ad50[_0x3c5d32(0xf7)],_0x524502=>{const _0x2a5905=_0x3c5d32;_0x524502===0x0?_0x29f2e5[_0x2a5905(0xe2)](_0x31b596,{'success':!![],'output':_0xd420b5}):_0x29f2e5[_0x2a5905(0xe2)](_0x31b596,{'success':![],'error':'Command\x20exited\x20with\x20code\x20'+_0x524502,'output':_0xd420b5});}),_0x2134d0['on'](_0x3c5d32(0xfc),_0x56f8c5=>{const _0xe25b4=_0x3c5d32;_0x29f2e5['sWSBt'](_0x31b596,{'success':![],'error':_0x56f8c5[_0xe25b4(0xdb)]});});});}export async function isMarketplaceAdded(_0x3c1aad){const _0x569731=_0x177a,_0x3e1091={'bsUeF':_0x569731(0xf1),'PtSwh':_0x569731(0xdc)},_0x31917d=await runClaudeCommand([_0x3e1091[_0x569731(0xde)],'marketplace',_0x3e1091[_0x569731(0xec)]],{'captureOutput':!![]});if(!_0x31917d[_0x569731(0xf4)]||!_0x31917d['output'])return![];return _0x31917d['output'][_0x569731(0xed)](_0x3c1aad);}export async function isPluginInstalled(_0x49e5e8){const _0x169b1f=_0x177a,_0xb8498d={'Jlrsf':_0x169b1f(0xf1)},_0x132dd5=await runClaudeCommand([_0xb8498d[_0x169b1f(0xe5)],'list'],{'captureOutput':!![]});if(!_0x132dd5[_0x169b1f(0xf4)]||!_0x132dd5[_0x169b1f(0xfb)])return![];return _0x132dd5['output'][_0x169b1f(0xed)](_0x49e5e8);}export async function getPluginInfo(_0x59499d){const _0x2dbd60=_0x177a,_0x4cdb23={'PmsLs':function(_0x4eb0fa,_0x270bd1,_0xd693e){return _0x4eb0fa(_0x270bd1,_0xd693e);},'MclWR':_0x2dbd60(0xf1),'wmGJf':'list'},_0x4a09af=await _0x4cdb23['PmsLs'](runClaudeCommand,[_0x4cdb23[_0x2dbd60(0xdd)],_0x4cdb23['wmGJf']],{'captureOutput':!![]});if(!_0x4a09af[_0x2dbd60(0xf4)]||!_0x4a09af['output'])return null;if(!_0x4a09af[_0x2dbd60(0xfb)]['includes'](_0x59499d))return null;const _0x322951={'name':_0x59499d},_0x5dbe55=_0x4a09af['output'][_0x2dbd60(0xfa)](new RegExp(_0x59499d+_0x2dbd60(0xeb),'i'));_0x5dbe55&&(_0x322951[_0x2dbd60(0xf6)]=_0x5dbe55[0x1]['toLowerCase']());const _0x451d56=_0x4a09af[_0x2dbd60(0xfb)]['match'](new RegExp(_0x59499d+_0x2dbd60(0xef),'i'));_0x451d56&&(_0x322951[_0x2dbd60(0xe9)]=_0x451d56[0x1]);const _0x420d83=_0x4a09af['output'][_0x2dbd60(0xfa)](new RegExp(_0x59499d+_0x2dbd60(0xdf),'i'));return _0x420d83&&(_0x322951['enabled']=_0x420d83[0x1]['toLowerCase']()==='enabled'),_0x322951;}function _0x409f(){const _0x5a9e75=['captureOutput','scope','GHqhp','15MiJsRb','7085MIYdGo','match','output','error','63238SRIOgD','9EMQkzv','message','list','MclWR','bsUeF','[\x5cs\x5cS]*?(enabled|disabled)','230032lRpIfT','966VcKXBo','sWSBt','7922915vhsdXI','574056hlhLJP','Jlrsf','RTZMz','pipe','76TCBGSi','version','stderr','[\x5cs\x5cS]*?Scope:\x5cs*(user|project|local)','PtSwh','includes','Bbfvx','[\x5cs\x5cS]*?Version:\x5cs*([\x5cd.]+)','stdout','plugin','9684pajSZD','801050XlegYf','success'];_0x409f=function(){return _0x5a9e75;};return _0x409f();}
@@ -1 +1 @@
1
- const _0x4fa9f3=_0x28a5;(function(_0x3fdf9f,_0x545540){const _0x31eca3=_0x28a5,_0x299aa2=_0x3fdf9f();while(!![]){try{const _0x5cbd74=-parseInt(_0x31eca3(0x109))/0x1*(-parseInt(_0x31eca3(0x106))/0x2)+parseInt(_0x31eca3(0x115))/0x3*(parseInt(_0x31eca3(0x10a))/0x4)+-parseInt(_0x31eca3(0x10f))/0x5*(parseInt(_0x31eca3(0x112))/0x6)+-parseInt(_0x31eca3(0x113))/0x7+parseInt(_0x31eca3(0x10c))/0x8*(-parseInt(_0x31eca3(0x117))/0x9)+parseInt(_0x31eca3(0x118))/0xa+parseInt(_0x31eca3(0x10b))/0xb;if(_0x5cbd74===_0x545540)break;else _0x299aa2['push'](_0x299aa2['shift']());}catch(_0x51102a){_0x299aa2['push'](_0x299aa2['shift']());}}}(_0x2aad,0xbdcf1));function _0x2aad(){const _0x248a15=['8973573GHsooD','update','3pKrmWh','aes-256-gcm','1931211hNBGvt','11856930kDcgDU','gCEVi','final','sha256','222368nUprxC','Vngvd','utf8','8NPZplX','2920208nkWqqB','3267297XzWDcP','32RAVnKC','wZtES','subarray','5QPZQyN','ranger-auth-encryption','getAuthTag','1107192GcIJhL'];_0x2aad=function(){return _0x248a15;};return _0x2aad();}function _0x28a5(_0x5a1504,_0x490aaa){_0x5a1504=_0x5a1504-0x104;const _0x2aadd3=_0x2aad();let _0x28a562=_0x2aadd3[_0x5a1504];return _0x28a562;}import{createCipheriv,createDecipheriv,randomBytes,pbkdf2Sync}from'crypto';const ALGORITHM=_0x4fa9f3(0x116),SALT=_0x4fa9f3(0x110),KEY_LENGTH=0x20,IV_LENGTH=0x10,TAG_LENGTH=0x10;export function deriveKey(_0x179371){const _0x291ecc=_0x4fa9f3,_0x5b0bd6={'dvcBT':_0x291ecc(0x105)};return pbkdf2Sync(_0x179371,SALT,0x186a0,KEY_LENGTH,_0x5b0bd6['dvcBT']);}export function encrypt(_0x34d9fe,_0x1ad4cc){const _0x2bcf1a=_0x4fa9f3,_0x5c6b90={'QwwIP':function(_0x24f1cb,_0x410fae){return _0x24f1cb(_0x410fae);},'gCEVi':function(_0x1c999f,_0x50e2a8){return _0x1c999f(_0x50e2a8);},'gjpZi':'utf8'},_0x2639e1=_0x5c6b90['QwwIP'](deriveKey,_0x1ad4cc),_0x55a01d=_0x5c6b90[_0x2bcf1a(0x119)](randomBytes,IV_LENGTH),_0x41efff=createCipheriv(ALGORITHM,_0x2639e1,_0x55a01d),_0x8fce2d=Buffer['concat']([_0x41efff[_0x2bcf1a(0x114)](_0x34d9fe,_0x5c6b90['gjpZi']),_0x41efff[_0x2bcf1a(0x104)]()]),_0xa4f18a=_0x41efff[_0x2bcf1a(0x111)]();return Buffer['concat']([_0x55a01d,_0xa4f18a,_0x8fce2d]);}export function decrypt(_0x70f812,_0x302b69){const _0x3a851f=_0x4fa9f3,_0x3cf899={'wZtES':function(_0x2af457,_0x7c37e7){return _0x2af457+_0x7c37e7;},'Vngvd':function(_0x425ffc,_0x1c5fc3){return _0x425ffc+_0x1c5fc3;}},_0x51a777=deriveKey(_0x302b69),_0x330b5c=_0x70f812['subarray'](0x0,IV_LENGTH),_0x43d580=_0x70f812[_0x3a851f(0x10e)](IV_LENGTH,_0x3cf899[_0x3a851f(0x10d)](IV_LENGTH,TAG_LENGTH)),_0x23c4b2=_0x70f812[_0x3a851f(0x10e)](IV_LENGTH+TAG_LENGTH),_0x27d9cf=createDecipheriv(ALGORITHM,_0x51a777,_0x330b5c);return _0x27d9cf['setAuthTag'](_0x43d580),_0x3cf899[_0x3a851f(0x107)](_0x27d9cf[_0x3a851f(0x114)](_0x23c4b2),_0x27d9cf['final'](_0x3a851f(0x108)));}
1
+ function _0x115a(_0x5ca5d2,_0x5d2993){_0x5ca5d2=_0x5ca5d2-0x89;const _0x2484b9=_0x2484();let _0x115abb=_0x2484b9[_0x5ca5d2];return _0x115abb;}function _0x2484(){const _0x272661=['57744cdGsqL','5PRHMdH','subarray','final','getAuthTag','1581876OjQPlt','240MHtMgF','36bZeYCw','ranger-auth-encryption','8rFmRlY','467814mqDGuS','update','setAuthTag','4836BdfwmD','598487PsUXLG','728HgSbYA','concat','sha256','1391880RIshbP','4448631eewfHU','aes-256-gcm'];_0x2484=function(){return _0x272661;};return _0x2484();}const _0x75f1bb=_0x115a;(function(_0x32dd7a,_0x2c731e){const _0x874cbd=_0x115a,_0x2c8b67=_0x32dd7a();while(!![]){try{const _0x5afdb5=parseInt(_0x874cbd(0x8e))/0x1+-parseInt(_0x874cbd(0x8f))/0x2*(parseInt(_0x874cbd(0x8d))/0x3)+-parseInt(_0x874cbd(0x9a))/0x4*(parseInt(_0x874cbd(0x96))/0x5)+-parseInt(_0x874cbd(0x8a))/0x6+parseInt(_0x874cbd(0x92))/0x7*(-parseInt(_0x874cbd(0x89))/0x8)+parseInt(_0x874cbd(0x95))/0x9*(-parseInt(_0x874cbd(0x9b))/0xa)+-parseInt(_0x874cbd(0x93))/0xb*(-parseInt(_0x874cbd(0x9c))/0xc);if(_0x5afdb5===_0x2c731e)break;else _0x2c8b67['push'](_0x2c8b67['shift']());}catch(_0x98d30e){_0x2c8b67['push'](_0x2c8b67['shift']());}}}(_0x2484,0x61580));import{createCipheriv,createDecipheriv,randomBytes,pbkdf2Sync}from'crypto';const ALGORITHM=_0x75f1bb(0x94),SALT=_0x75f1bb(0x9d),KEY_LENGTH=0x20,IV_LENGTH=0x10,TAG_LENGTH=0x10;export function deriveKey(_0x4990c9){const _0x5a5e5b=_0x75f1bb,_0x54c25d={'dIKFz':_0x5a5e5b(0x91)};return pbkdf2Sync(_0x4990c9,SALT,0x186a0,KEY_LENGTH,_0x54c25d['dIKFz']);}export function encrypt(_0x4dfa4a,_0x2d4ce3){const _0x14a4aa=_0x75f1bb,_0x12cc61={'qAAVL':function(_0x8d302c,_0x5235a3){return _0x8d302c(_0x5235a3);}},_0x521529=_0x12cc61['qAAVL'](deriveKey,_0x2d4ce3),_0x144583=randomBytes(IV_LENGTH),_0x3f43d1=createCipheriv(ALGORITHM,_0x521529,_0x144583),_0x1fb901=Buffer['concat']([_0x3f43d1[_0x14a4aa(0x8b)](_0x4dfa4a,'utf8'),_0x3f43d1['final']()]),_0x14a011=_0x3f43d1[_0x14a4aa(0x99)]();return Buffer[_0x14a4aa(0x90)]([_0x144583,_0x14a011,_0x1fb901]);}export function decrypt(_0xf84a89,_0x33737a){const _0x407454=_0x75f1bb,_0x438abf={'reFKA':function(_0x42acac,_0x29d664){return _0x42acac(_0x29d664);}},_0x55fe15=_0x438abf['reFKA'](deriveKey,_0x33737a),_0x544cfe=_0xf84a89['subarray'](0x0,IV_LENGTH),_0x9643ac=_0xf84a89['subarray'](IV_LENGTH,IV_LENGTH+TAG_LENGTH),_0x4fe67e=_0xf84a89[_0x407454(0x97)](IV_LENGTH+TAG_LENGTH),_0x2842d3=createDecipheriv(ALGORITHM,_0x55fe15,_0x544cfe);return _0x2842d3[_0x407454(0x8c)](_0x9643ac),_0x2842d3['update'](_0x4fe67e)+_0x2842d3[_0x407454(0x98)]('utf8');}
@@ -1 +1 @@
1
- const _0x2ffae3=_0x445d;(function(_0x3455a5,_0x284ffe){const _0x4cf575=_0x445d,_0x557201=_0x3455a5();while(!![]){try{const _0x1379fd=parseInt(_0x4cf575(0xfe))/0x1+parseInt(_0x4cf575(0xda))/0x2*(-parseInt(_0x4cf575(0xfb))/0x3)+-parseInt(_0x4cf575(0xdd))/0x4*(parseInt(_0x4cf575(0xf0))/0x5)+parseInt(_0x4cf575(0xf8))/0x6*(parseInt(_0x4cf575(0x100))/0x7)+-parseInt(_0x4cf575(0xdb))/0x8+-parseInt(_0x4cf575(0xec))/0x9*(parseInt(_0x4cf575(0xf3))/0xa)+parseInt(_0x4cf575(0xf2))/0xb*(parseInt(_0x4cf575(0xd8))/0xc);if(_0x1379fd===_0x284ffe)break;else _0x557201['push'](_0x557201['shift']());}catch(_0x3798e9){_0x557201['push'](_0x557201['shift']());}}}(_0x57fa,0x3dba3));function _0x445d(_0x291f7b,_0x43dd13){_0x291f7b=_0x291f7b-0xd4;const _0x57faed=_0x57fa();let _0x445d98=_0x57faed[_0x291f7b];return _0x445d98;}import{getToken}from'./keychain.js';import{getApiBaseUrl}from'./environment.js';import{getCurrentVersion}from'./version.js';const SENSITIVE_FLAGS=new Set([_0x2ffae3(0xdc),'-t',_0x2ffae3(0xe6),'--api-key',_0x2ffae3(0xe0),_0x2ffae3(0xe4),'--password',_0x2ffae3(0xe8),'--auth',_0x2ffae3(0xfc),_0x2ffae3(0xe9),'--cookie','--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(_0x32f698){return TOKEN_PATTERNS['some'](_0x411e0b=>_0x411e0b['test'](_0x32f698));}export function sanitizeArgs(_0x437a61){const _0x41a511=_0x2ffae3,_0x42d7a8={'BWFqT':function(_0x48bd71,_0x296867){return _0x48bd71<_0x296867;},'ZrlZq':_0x41a511(0xf6),'LtXai':function(_0x1568d4,_0x2f2515){return _0x1568d4(_0x2f2515);}},_0x3e4220=[];let _0x3949a6=![];for(let _0x24d067=0x0;_0x42d7a8[_0x41a511(0xd4)](_0x24d067,_0x437a61[_0x41a511(0xf5)]);_0x24d067++){const _0x390a0e=_0x437a61[_0x24d067];if(_0x3949a6){_0x3e4220[_0x41a511(0x103)](_0x42d7a8['ZrlZq']),_0x3949a6=![];continue;}if(_0x390a0e['startsWith']('--')||_0x390a0e['startsWith']('-')){const _0x540074=_0x390a0e['indexOf']('=');if(_0x540074!==-0x1){const _0x48b80b=_0x390a0e['slice'](0x0,_0x540074)['toLowerCase']();if(SENSITIVE_FLAGS[_0x41a511(0x107)](_0x48b80b)){_0x3e4220[_0x41a511(0x103)](_0x390a0e['slice'](0x0,_0x540074)+_0x41a511(0xff));continue;}}else{const _0x28ae7f=_0x390a0e['toLowerCase']();SENSITIVE_FLAGS['has'](_0x28ae7f)&&(_0x3949a6=!![]);}_0x3e4220['push'](_0x390a0e);}else _0x42d7a8[_0x41a511(0x104)](looksLikeToken,_0x390a0e)?_0x3e4220['push'](_0x41a511(0xf6)):_0x3e4220[_0x41a511(0x103)](_0x390a0e);}return _0x3e4220[_0x41a511(0xd5)]('\x20');}export async function logDesirePath(_0x4971c0){const _0x330380=_0x2ffae3,_0x48df97={'VZWum':function(_0x401bdb){return _0x401bdb();},'JFmub':'application/json','hnAVD':function(_0x265baf,_0x2e47ee,_0x1d8102){return _0x265baf(_0x2e47ee,_0x1d8102);},'eJJpE':'POST'};try{const _0x70e87c=await getToken()[_0x330380(0xf4)](()=>null),_0x1c3b81=getApiBaseUrl(),_0x18a8df=_0x48df97[_0x330380(0xd7)](getCurrentVersion),_0xc46e41=_0x70e87c?'has_token':_0x330380(0xee),_0x2a6d7f={..._0x4971c0['metadata'],'authStatus':_0xc46e41,'isTty':process[_0x330380(0xdf)][_0x330380(0xde)]??![]},_0x178586={'Content-Type':_0x48df97['JFmub']};_0x70e87c&&(_0x178586[_0x330380(0xe3)]='Bearer\x20'+_0x70e87c);const _0x254cd7={'rawCommand':_0x4971c0['rawCommand'],'errorMessage':_0x4971c0['errorMessage'],'errorType':_0x4971c0[_0x330380(0xd6)],'featureId':_0x4971c0['featureId'],'sessionId':_0x4971c0['sessionId'],'metadata':_0x2a6d7f,'cliVersion':_0x18a8df};process['env']['DEBUG']&&(console[_0x330380(0xe2)](_0x330380(0x105)+_0x1c3b81+_0x330380(0xe7)),console[_0x330380(0xe2)](_0x330380(0xef)+JSON[_0x330380(0xfa)](_0x254cd7,null,0x2))),await _0x48df97[_0x330380(0xf1)](fetch,_0x1c3b81+'/api/v1/mcp/desire-path-logs',{'method':_0x48df97['eJJpE'],'headers':_0x178586,'body':JSON['stringify'](_0x254cd7)});}catch(_0x4a39fe){process[_0x330380(0x101)][_0x330380(0xf9)]&&console['error']('[desire-path]\x20Failed\x20to\x20send:\x20'+_0x4a39fe);}}function _0x57fa(){const _0x10152b=['--header','5|1|4|7|6|0|3|2','zEiwb','99MxbNKk','includes','no_token','[desire-path]\x20Payload:\x20','1640sOSWWs','hnAVD','110VdQBYg','74950jTaIrM','catch','length','[REDACTED]','unknown_argument','197646rSwqhY','DEBUG','stringify','3uNzWUr','--authorization','oUlrD','424519HrTWUf','=[REDACTED]','98BFZjPU','env','Unknown\x20command','push','LtXai','[desire-path]\x20Sending\x20log\x20to\x20','syntax_error','has','BWFqT','join','errorType','VZWum','45096eTOWnW','GLwxZ','100828nAFBMq','2204056JHXiDi','--token','3196GPRzcH','isTTY','stdout','--apikey','missing_required_argument','error','Authorization','--key','missing_option','--secret','/api/v1/mcp/desire-path-logs','--pass'];_0x57fa=function(){return _0x10152b;};return _0x57fa();}export function getErrorType(_0x3e2d55,_0x5d5509){const _0x596364=_0x2ffae3,_0x23a30b={'GLwxZ':'Invalid\x20values','MxgGe':_0x596364(0x102),'oUlrD':'runtime_error','zEiwb':'Not\x20enough\x20non-option\x20arguments'},_0x1c990b=_0x596364(0xea)['split']('|');let _0x221d5f=0x0;while(!![]){switch(_0x1c990b[_0x221d5f++]){case'0':if(_0x3e2d55[_0x596364(0xed)](_0x23a30b[_0x596364(0xd9)]))return'invalid_option_value';continue;case'1':if(!_0x3e2d55)return'unknown';continue;case'2':return _0x596364(0x106);case'3':if(_0x3e2d55['includes']('Missing\x20required\x20argument'))return _0x596364(0xe5);continue;case'4':if(_0x3e2d55[_0x596364(0xed)](_0x23a30b['MxgGe']))return'unknown_command';continue;case'5':if(_0x5d5509)return _0x23a30b[_0x596364(0xfd)];continue;case'6':if(_0x3e2d55[_0x596364(0xed)](_0x23a30b[_0x596364(0xeb)]))return _0x596364(0xe1);continue;case'7':if(_0x3e2d55[_0x596364(0xed)]('Unknown\x20argument'))return _0x596364(0xf7);continue;}break;}}
1
+ const _0xfdae65=_0x2e00;(function(_0x208b29,_0x1d4822){const _0x2446a2=_0x2e00,_0x3a14b2=_0x208b29();while(!![]){try{const _0x958516=parseInt(_0x2446a2(0x20a))/0x1+parseInt(_0x2446a2(0x20c))/0x2+-parseInt(_0x2446a2(0x210))/0x3+parseInt(_0x2446a2(0x1f3))/0x4*(-parseInt(_0x2446a2(0x1fb))/0x5)+-parseInt(_0x2446a2(0x20b))/0x6*(-parseInt(_0x2446a2(0x1ec))/0x7)+parseInt(_0x2446a2(0x207))/0x8+-parseInt(_0x2446a2(0x20e))/0x9*(parseInt(_0x2446a2(0x1db))/0xa);if(_0x958516===_0x1d4822)break;else _0x3a14b2['push'](_0x3a14b2['shift']());}catch(_0x36ada7){_0x3a14b2['push'](_0x3a14b2['shift']());}}}(_0x33e9,0x4adbc));import{getToken}from'./keychain.js';import{getApiBaseUrl}from'./environment.js';import{getCurrentVersion}from'./version.js';const SENSITIVE_FLAGS=new Set(['--token','-t','--secret',_0xfdae65(0x209),'--apikey',_0xfdae65(0x1f2),'--password','--pass','--auth','--authorization',_0xfdae65(0x200),_0xfdae65(0x1ff),_0xfdae65(0x1fe)]),TOKEN_PATTERNS=[/^(ranger_|rngr_|sk-|pk-|api[_-]?)/i,/^[a-zA-Z0-9_-]{32,}$/,/^eyJ[a-zA-Z0-9_-]+\.[a-zA-Z0-9_-]+/];function _0x33e9(){const _0x3078b3=['803126TlsMux','IhqvF','954918rUWdHT','Authorization','200988gPJuvG','errorType','10YuWDIy','[desire-path]\x20Failed\x20to\x20send:\x20','Unknown\x20argument','ByBiK','isTTY','some','Unknown\x20command','DEBUG','push','=[REDACTED]','[REDACTED]','[desire-path]\x20Sending\x20log\x20to\x20','unknown_argument','JCiIX','Nivkx','slice','runtime_error','35vOFIMi','missing_option','startsWith','ivBqR','indexOf','env','--key','4bZYoTk','POST','test','XDBwq','unknown','toLowerCase','includes','/api/v1/mcp/desire-path-logs','2392185FnlinS','IjPzE','LbzaV','--credentials','--cookie','--header','stringify','error','metadata','catch','Invalid\x20values','[desire-path]\x20Payload:\x20','353688wPDKJx','missing_required_argument','--api-key','280131xFuZRK','278700TVCrqL'];_0x33e9=function(){return _0x3078b3;};return _0x33e9();}function looksLikeToken(_0x48a6ab){const _0x3290e1=_0xfdae65;return TOKEN_PATTERNS[_0x3290e1(0x1e0)](_0x33f0a1=>_0x33f0a1[_0x3290e1(0x1f5)](_0x48a6ab));}export function sanitizeArgs(_0x22bb23){const _0x384121=_0xfdae65,_0x33a99b={'ByBiK':_0x384121(0x1e5),'hzEYk':function(_0x57ed51,_0x5a58be){return _0x57ed51!==_0x5a58be;}},_0x285180=[];let _0x8f0a68=![];for(let _0xf0572a=0x0;_0xf0572a<_0x22bb23['length'];_0xf0572a++){const _0x379f4b=_0x22bb23[_0xf0572a];if(_0x8f0a68){_0x285180['push'](_0x33a99b[_0x384121(0x1de)]),_0x8f0a68=![];continue;}if(_0x379f4b[_0x384121(0x1ee)]('--')||_0x379f4b['startsWith']('-')){const _0x5af56a=_0x379f4b[_0x384121(0x1f0)]('=');if(_0x33a99b['hzEYk'](_0x5af56a,-0x1)){const _0x273762=_0x379f4b['slice'](0x0,_0x5af56a)['toLowerCase']();if(SENSITIVE_FLAGS['has'](_0x273762)){_0x285180['push'](_0x379f4b[_0x384121(0x1ea)](0x0,_0x5af56a)+_0x384121(0x1e4));continue;}}else{const _0x49f6b2=_0x379f4b[_0x384121(0x1f8)]();SENSITIVE_FLAGS['has'](_0x49f6b2)&&(_0x8f0a68=!![]);}_0x285180[_0x384121(0x1e3)](_0x379f4b);}else looksLikeToken(_0x379f4b)?_0x285180['push'](_0x384121(0x1e5)):_0x285180[_0x384121(0x1e3)](_0x379f4b);}return _0x285180['join']('\x20');}export async function logDesirePath(_0x134025){const _0x5961ac=_0xfdae65,_0x3590db={'LbzaV':function(_0x415c8a){return _0x415c8a();},'EyyFZ':'has_token','ivBqR':'no_token','Zyvkf':'application/json','EPeCO':_0x5961ac(0x20f),'sXnVK':function(_0x1ead61,_0x4e0b4b,_0x27244b){return _0x1ead61(_0x4e0b4b,_0x27244b);},'JCiIX':_0x5961ac(0x1f4)};try{const _0x4132a9=await getToken()[_0x5961ac(0x204)](()=>null),_0x554c64=getApiBaseUrl(),_0x408011=_0x3590db[_0x5961ac(0x1fd)](getCurrentVersion),_0x29ab78=_0x4132a9?_0x3590db['EyyFZ']:_0x3590db[_0x5961ac(0x1ef)],_0x2af11c={..._0x134025[_0x5961ac(0x203)],'authStatus':_0x29ab78,'isTty':process['stdout'][_0x5961ac(0x1df)]??![]},_0x201426={'Content-Type':_0x3590db['Zyvkf']};_0x4132a9&&(_0x201426[_0x3590db['EPeCO']]='Bearer\x20'+_0x4132a9);const _0xabc1e2={'rawCommand':_0x134025['rawCommand'],'errorMessage':_0x134025['errorMessage'],'errorType':_0x134025[_0x5961ac(0x1da)],'featureId':_0x134025['featureId'],'sessionId':_0x134025['sessionId'],'metadata':_0x2af11c,'cliVersion':_0x408011};process[_0x5961ac(0x1f1)][_0x5961ac(0x1e2)]&&(console['error'](_0x5961ac(0x1e6)+_0x554c64+'/api/v1/mcp/desire-path-logs'),console['error'](_0x5961ac(0x206)+JSON[_0x5961ac(0x201)](_0xabc1e2,null,0x2))),await _0x3590db['sXnVK'](fetch,_0x554c64+_0x5961ac(0x1fa),{'method':_0x3590db[_0x5961ac(0x1e8)],'headers':_0x201426,'body':JSON['stringify'](_0xabc1e2)});}catch(_0x180c3a){process[_0x5961ac(0x1f1)][_0x5961ac(0x1e2)]&&console[_0x5961ac(0x202)](_0x5961ac(0x1dc)+_0x180c3a);}}function _0x2e00(_0x5c31fc,_0x29409f){_0x5c31fc=_0x5c31fc-0x1da;const _0x33e9ca=_0x33e9();let _0x2e0044=_0x33e9ca[_0x5c31fc];return _0x2e0044;}export function getErrorType(_0x2d9f41,_0x121498){const _0x27af64=_0xfdae65,_0x52429d={'IhqvF':_0x27af64(0x1eb),'Nivkx':_0x27af64(0x1f7),'IftdS':_0x27af64(0x1e1),'UCRbG':_0x27af64(0x208),'IjPzE':_0x27af64(0x205),'EejiZ':'invalid_option_value','XDBwq':'syntax_error'};if(_0x121498)return _0x52429d[_0x27af64(0x20d)];if(!_0x2d9f41)return _0x52429d[_0x27af64(0x1e9)];if(_0x2d9f41[_0x27af64(0x1f9)](_0x52429d['IftdS']))return'unknown_command';if(_0x2d9f41['includes'](_0x27af64(0x1dd)))return _0x27af64(0x1e7);if(_0x2d9f41['includes']('Not\x20enough\x20non-option\x20arguments'))return _0x52429d['UCRbG'];if(_0x2d9f41[_0x27af64(0x1f9)](_0x52429d[_0x27af64(0x1fc)]))return _0x52429d['EejiZ'];if(_0x2d9f41['includes']('Missing\x20required\x20argument'))return _0x27af64(0x1ed);return _0x52429d[_0x27af64(0x1f6)];}
@@ -1 +1 @@
1
- const _0x52700b=_0x150b;(function(_0x4aa3e8,_0x5e6219){const _0x4b7f76=_0x150b,_0x4d008b=_0x4aa3e8();while(!![]){try{const _0x1c068e=parseInt(_0x4b7f76(0xb7))/0x1*(parseInt(_0x4b7f76(0x9f))/0x2)+-parseInt(_0x4b7f76(0x88))/0x3+-parseInt(_0x4b7f76(0x83))/0x4*(parseInt(_0x4b7f76(0x97))/0x5)+-parseInt(_0x4b7f76(0xb3))/0x6+parseInt(_0x4b7f76(0xb4))/0x7+parseInt(_0x4b7f76(0xbb))/0x8*(-parseInt(_0x4b7f76(0x8a))/0x9)+parseInt(_0x4b7f76(0x85))/0xa;if(_0x1c068e===_0x5e6219)break;else _0x4d008b['push'](_0x4d008b['shift']());}catch(_0x48eb68){_0x4d008b['push'](_0x4d008b['shift']());}}}(_0x5ca2,0x8872b));import{exec}from'child_process';import _0x4e443f from'inquirer';import{getCurrentEnvironment,ENVIRONMENT_CONFIGS,getApiBaseUrl}from'./environment.js';function _0x150b(_0x1e3a85,_0x2b8ef4){_0x1e3a85=_0x1e3a85-0x81;const _0x5ca25d=_0x5ca2();let _0x150bde=_0x5ca25d[_0x1e3a85];return _0x150bde;}import{storeToken,storeRefreshToken}from'./keychain.js';const WORKOS_DEVICE_AUTH_URL=_0x52700b(0x99),WORKOS_TOKEN_URL=_0x52700b(0x87);export async function requestDeviceCode(_0x4a4d11){const _0x117485=_0x52700b,_0x168650={'HThOg':function(_0x23fd42,_0xf93c60,_0x3a770d){return _0x23fd42(_0xf93c60,_0x3a770d);}},_0x20ea57=await _0x168650['HThOg'](fetch,WORKOS_DEVICE_AUTH_URL,{'method':'POST','headers':{'Content-Type':'application/x-www-form-urlencoded'},'body':new URLSearchParams({'client_id':_0x4a4d11})});if(!_0x20ea57['ok']){const _0x1996d7=await _0x20ea57[_0x117485(0xc0)]();throw new Error('Failed\x20to\x20request\x20device\x20code:\x20'+_0x20ea57[_0x117485(0xc7)]+'\x20'+_0x1996d7);}return _0x20ea57[_0x117485(0xcd)]();}export async function pollForTokens(_0x34143d,_0x33d4d8,_0x302732,_0x4b9852){const _0x2526df=_0x52700b,_0x354adc={'suchG':function(_0x548150,_0x24def0){return _0x548150+_0x24def0;},'JaxDC':function(_0x457821,_0x1b365a){return _0x457821*_0x1b365a;},'xiWKG':function(_0x29edab,_0x3abb74){return _0x29edab<_0x3abb74;},'PBPDt':function(_0x15d758,_0xe1ac4a,_0x3190e7){return _0x15d758(_0xe1ac4a,_0x3190e7);},'bummF':'urn:ietf:params:oauth:grant-type:device_code','SyoUO':_0x2526df(0xb0),'kYqBp':function(_0x58d382,_0x9481fc){return _0x58d382===_0x9481fc;},'ybDKc':'slow_down','mcFaV':'Authentication\x20failed','wsQtH':'Device\x20authorization\x20timed\x20out'},_0x173223=_0x354adc['suchG'](Date['now'](),_0x354adc['JaxDC'](_0x4b9852,0x3e8));let _0x22c1d0=_0x302732*0x3e8;while(_0x354adc['xiWKG'](Date['now'](),_0x173223)){await sleep(_0x22c1d0);const _0x22c0f8=await _0x354adc['PBPDt'](fetch,WORKOS_TOKEN_URL,{'method':'POST','headers':{'Content-Type':_0x2526df(0xbf)},'body':new URLSearchParams({'client_id':_0x34143d,'device_code':_0x33d4d8,'grant_type':_0x354adc['bummF']})});if(_0x22c0f8['ok'])return _0x22c0f8[_0x2526df(0xcd)]();const _0x366b07=await _0x22c0f8['json']();if(_0x366b07[_0x2526df(0xc6)]===_0x354adc[_0x2526df(0xc3)])continue;if(_0x354adc['kYqBp'](_0x366b07[_0x2526df(0xc6)],_0x354adc[_0x2526df(0xa0)])){_0x22c1d0+=0x3e8;continue;}throw new Error(_0x366b07['error_description']||_0x366b07['error']||_0x354adc['mcFaV']);}throw new Error(_0x354adc[_0x2526df(0xa2)]);}function _0x5ca2(){const _0x38d996=['\x27s\x20CLI\x20Key','/organization/self-serve-signup','PbkYx','length','Setting\x20up\x20your\x20organization...','write','ikuBx','authorization_pending','HfBcm','organizationId','27882yBczGs','633458nlpFTE','application/json','xnuij','36iXapUi','list','stringify','name','680ZvOPjO','startsWith','OPTVp','ghGME','application/x-www-form-urlencoded','text','FFOzT','apiKeys','SyoUO','org_id','access_token','error','status','stdin','/organization/my-memberships','filter','firstName','XBobm','json','xJlMQ','split','selected','99616aSatqs','/api-keys','16333420yepUIQ','YCCvH','https://api.workos.com/user_management/authenticate','2848023ItQyzo','isTTY','68121iEdfxj','kbCAx','log','toString','darwin','Waiting\x20for\x20authentication...','base64url','device_code','mcp:write','start','utf-8','Rmamr','Provisioning\x20API\x20key...','30YLudRS','Bynhz','https://api.workos.com/user_management/authorize/device','NDkCW','CLI\x20Key','xjUCi','GET','Multiple\x20organizations\x20available\x20but\x20cannot\x20prompt\x20for\x20selection\x20in\x20non-interactive\x20mode.\x0a','32324QGUJEc','ybDKc','xdg-open','wsQtH','email','ruGRc','POST','OXhad','dNwkV','interval'];_0x5ca2=function(){return _0x38d996;};return _0x5ca2();}async function fetchUserProfile(_0x4be645){const _0x1e12b5=_0x52700b,_0x48adf8={'iFPcp':function(_0x355903){return _0x355903();},'ikuBx':_0x1e12b5(0x9d)},_0x3bfd97=_0x48adf8['iFPcp'](getApiBaseUrl);try{const _0x431bc4=await fetch(_0x3bfd97+'/organization/me',{'method':_0x48adf8[_0x1e12b5(0xaf)],'headers':{'workos-token':_0x4be645}});if(_0x431bc4['ok'])return _0x431bc4[_0x1e12b5(0xcd)]();}catch{}return null;}function buildKeyName(_0x16500c,_0xb8772c){const _0x39e7d7=_0x52700b,_0x17eef8=_0xb8772c[_0x39e7d7(0xca)](_0x55bd38=>_0x55bd38[_0x39e7d7(0xba)]===_0x16500c||_0x55bd38['name'][_0x39e7d7(0xbc)](_0x16500c+'\x20('));if(_0x17eef8['length']===0x0)return _0x16500c;return _0x16500c+'\x20('+(_0x17eef8[_0x39e7d7(0xac)]+0x1)+')';}export async function provisionApiKey(_0xf0c07c){const _0x1b5f6c=_0x52700b,_0x3f8b99={'Bynhz':function(_0x43fb3b){return _0x43fb3b();},'xjUCi':_0x1b5f6c(0xb5),'xJlMQ':function(_0x400e23,_0x3c4106){return _0x400e23(_0x3c4106);},'ThGgy':_0x1b5f6c(0x9b),'MHNhy':function(_0x3af520,_0x219a73,_0x1f0709){return _0x3af520(_0x219a73,_0x1f0709);},'XBobm':_0x1b5f6c(0x92)},_0x5462b2=_0x3f8b99[_0x1b5f6c(0x98)](getApiBaseUrl),_0x38afa8={'Content-Type':_0x3f8b99[_0x1b5f6c(0x9c)],'workos-token':_0xf0c07c},_0x59ff8e=await _0x3f8b99[_0x1b5f6c(0xce)](fetchUserProfile,_0xf0c07c),_0x13b7e5=_0x59ff8e?.[_0x1b5f6c(0xcb)]||_0x59ff8e?.[_0x1b5f6c(0xa3)]?.[_0x1b5f6c(0x81)]('@')[0x0],_0x461826=_0x13b7e5?_0x13b7e5+_0x1b5f6c(0xa9):_0x3f8b99['ThGgy'];let _0xe9adfd=[];try{const _0x2d2fdd=await fetch(_0x5462b2+_0x1b5f6c(0x84),{'method':'GET','headers':_0x38afa8});if(_0x2d2fdd['ok']){const _0x3692eb=await _0x2d2fdd[_0x1b5f6c(0xcd)]();_0xe9adfd=_0x3692eb[_0x1b5f6c(0xc2)];}}catch{}const _0x13222f=_0x3f8b99['MHNhy'](buildKeyName,_0x461826,_0xe9adfd),_0x5ef6a2=await fetch(_0x5462b2+_0x1b5f6c(0x84),{'method':_0x1b5f6c(0xa5),'headers':_0x38afa8,'body':JSON['stringify']({'name':_0x13222f,'scope':_0x3f8b99[_0x1b5f6c(0xcc)]})});if(!_0x5ef6a2['ok']){const _0x124d26=await _0x5ef6a2['text']();throw new Error('Failed\x20to\x20provision\x20API\x20key:\x20'+_0x5ef6a2[_0x1b5f6c(0xc7)]+'\x20'+_0x124d26);}const _0x3e154c=await _0x5ef6a2['json']();return _0x3e154c['apiKey']['token'];}export function openBrowser(_0x6a9cca){const _0x530794=_0x52700b,_0x19e963={'xnuij':function(_0x314a73,_0x18ac1c){return _0x314a73===_0x18ac1c;},'kbCAx':_0x530794(0x8e),'WAMkl':function(_0x5c7a5b,_0x2ffb25){return _0x5c7a5b===_0x2ffb25;},'sfkJx':'win32','HfBcm':_0x530794(0x93),'ruGRc':function(_0x4d08ce,_0x57a042){return _0x4d08ce(_0x57a042);}},_0x51b180=process['platform'],_0x40087e=_0x19e963[_0x530794(0xb6)](_0x51b180,_0x19e963[_0x530794(0x8b)])?'open':_0x19e963['WAMkl'](_0x51b180,_0x19e963['sfkJx'])?_0x19e963[_0x530794(0xb1)]:_0x530794(0xa1);_0x19e963[_0x530794(0xa4)](exec,_0x40087e+'\x20'+JSON[_0x530794(0xb9)](_0x6a9cca));}function decodeJwtPayload(_0xb4086e){const _0x128a10=_0x52700b,_0x4d2746={'YDFek':'Invalid\x20JWT\x20format','dNwkV':_0x128a10(0x94)},_0x389aa2=_0xb4086e['split']('.');if(_0x389aa2['length']!==0x3)throw new Error(_0x4d2746['YDFek']);const _0x4ed92e=Buffer['from'](_0x389aa2[0x1],_0x128a10(0x90))[_0x128a10(0x8d)](_0x4d2746[_0x128a10(0xa7)]);return JSON['parse'](_0x4ed92e);}async function selfServeSignup(_0x19e09f){const _0x48594f=_0x52700b,_0x5159c3={'PbkYx':function(_0x578ed9){return _0x578ed9();},'UWJmm':'POST'},_0x26c9e7=_0x5159c3[_0x48594f(0xab)](getApiBaseUrl),_0x379329=await fetch(_0x26c9e7+_0x48594f(0xaa),{'method':_0x5159c3['UWJmm'],'headers':{'Content-Type':'application/json','workos-token':_0x19e09f}});if(!_0x379329['ok']){const _0x348098=await _0x379329[_0x48594f(0xc0)]();throw new Error('Failed\x20to\x20create\x20organization:\x20'+_0x379329['status']+'\x20'+_0x348098);}return _0x379329['json']();}async function fetchMyMemberships(_0x24054e){const _0x5d2770=_0x52700b,_0x3083a5={'nLChM':_0x5d2770(0x9d)},_0x33ff34=getApiBaseUrl(),_0x29e488=await fetch(_0x33ff34+_0x5d2770(0xc9),{'method':_0x3083a5['nLChM'],'headers':{'workos-token':_0x24054e}});if(!_0x29e488['ok']){const _0x2cd17a=await _0x29e488['text']();throw new Error('Failed\x20to\x20fetch\x20memberships:\x20'+_0x29e488[_0x5d2770(0xc7)]+'\x20'+_0x2cd17a);}const _0x4f05e7=await _0x29e488[_0x5d2770(0xcd)]();return _0x4f05e7['memberships'];}async function refreshTokenWithOrg(_0x4f2e0c,_0x4abef1,_0x4b7f78){const _0xa1a04=_0x52700b,_0x1a2fa8={'NDkCW':'POST'},_0x483759=await fetch(WORKOS_TOKEN_URL,{'method':_0x1a2fa8[_0xa1a04(0x9a)],'headers':{'Content-Type':_0xa1a04(0xbf)},'body':new URLSearchParams({'client_id':_0x4f2e0c,'grant_type':'refresh_token','refresh_token':_0x4abef1,'organization_id':_0x4b7f78})});if(!_0x483759['ok']){const _0x3e8e71=await _0x483759[_0xa1a04(0xc0)]();throw new Error('Failed\x20to\x20refresh\x20token\x20with\x20org:\x20'+_0x483759['status']+'\x20'+_0x3e8e71);}return _0x483759['json']();}export async function runDeviceAuthFlow(){const _0x2b0e4f=_0x52700b,_0x2a2471={'RbscH':function(_0x39dac7){return _0x39dac7();},'IEvZq':'\x0a🔐\x20Opening\x20browser\x20to\x20log\x20in...','FFOzT':'\x20\x20\x20A\x20human\x20needs\x20to\x20complete\x20authentication\x20in\x20the\x20browser.\x0a','Rmamr':function(_0x1c1850,_0x429b57){return _0x1c1850(_0x429b57);},'mbJFA':_0x2b0e4f(0x8f),'GWlYJ':function(_0x72f4b4,_0x416537,_0x4d01ff,_0x5e7501,_0x29594f){return _0x72f4b4(_0x416537,_0x4d01ff,_0x5e7501,_0x29594f);},'VREXz':function(_0x4341b9,_0x4e951c){return _0x4341b9===_0x4e951c;},'hHqAA':_0x2b0e4f(0xad),'OPTVp':function(_0xc4b3f6,_0x244e24){return _0xc4b3f6===_0x244e24;},'OXhad':function(_0x307fb8,_0x5d223b){return _0x307fb8+_0x5d223b;},'YCCvH':'Use:\x20ranger\x20setup\x20[token]\x20or\x20set\x20RANGER_CLI_TOKEN.','paAOs':_0x2b0e4f(0xb8),'rPTyY':_0x2b0e4f(0x82),'iYSDm':function(_0x5d4066,_0x3daa3b,_0x42344f,_0xc0685f){return _0x5d4066(_0x3daa3b,_0x42344f,_0xc0685f);},'ghGME':_0x2b0e4f(0x96)},_0x4e0d1e=_0x2a2471['RbscH'](getCurrentEnvironment),_0x4be022=ENVIRONMENT_CONFIGS[_0x4e0d1e]['workosClientId'],_0x16c9a6=await requestDeviceCode(_0x4be022);console[_0x2b0e4f(0x8c)](_0x2a2471['IEvZq']),console[_0x2b0e4f(0x8c)](_0x2a2471[_0x2b0e4f(0xc1)]),_0x2a2471[_0x2b0e4f(0x95)](openBrowser,_0x16c9a6['verification_uri_complete']),console[_0x2b0e4f(0x8c)]('If\x20the\x20browser\x20doesn\x27t\x20open,\x20visit:\x20'+_0x16c9a6['verification_uri_complete']),console[_0x2b0e4f(0x8c)]('Code:\x20'+_0x16c9a6['user_code']+'\x0a'),process['stdout'][_0x2b0e4f(0xae)](_0x2a2471['mbJFA']);let _0x58d529=await _0x2a2471['GWlYJ'](pollForTokens,_0x4be022,_0x16c9a6[_0x2b0e4f(0x91)],_0x16c9a6[_0x2b0e4f(0xa8)],_0x16c9a6['expires_in']);console['log']('\x20✓');const _0x1589a7=decodeJwtPayload(_0x58d529[_0x2b0e4f(0xc5)]);if(!_0x1589a7[_0x2b0e4f(0xc4)]){const _0x1e07c6=await fetchMyMemberships(_0x58d529['access_token']);let _0x12c314;if(_0x2a2471['VREXz'](_0x1e07c6[_0x2b0e4f(0xac)],0x0)){process['stdout'][_0x2b0e4f(0xae)](_0x2a2471['hHqAA']);const _0x39f029=await selfServeSignup(_0x58d529[_0x2b0e4f(0xc5)]);_0x12c314=_0x39f029['organizationId'],console['log']('\x20✓');}else{if(_0x2a2471[_0x2b0e4f(0xbd)](_0x1e07c6['length'],0x1))_0x12c314=_0x1e07c6[0x0]['organizationId'],console[_0x2b0e4f(0x8c)]('Using\x20organization:\x20'+_0x1e07c6[0x0]['name']);else{const _0xfa23ca=process[_0x2b0e4f(0xc8)]['isTTY']&&process['stdout'][_0x2b0e4f(0x89)];if(!_0xfa23ca)throw new Error(_0x2a2471[_0x2b0e4f(0xa6)](_0x2b0e4f(0x9e),_0x2a2471[_0x2b0e4f(0x86)]));const {selected:_0x878110}=await _0x4e443f['prompt']([{'type':_0x2a2471['paAOs'],'name':_0x2a2471['rPTyY'],'message':'Select\x20an\x20organization:','choices':_0x1e07c6['map'](_0x40fc23=>({'name':_0x40fc23[_0x2b0e4f(0xba)],'value':_0x40fc23[_0x2b0e4f(0xb2)]}))}]);_0x12c314=_0x878110;}}_0x58d529=await _0x2a2471['iYSDm'](refreshTokenWithOrg,_0x4be022,_0x58d529['refresh_token'],_0x12c314);}process['stdout'][_0x2b0e4f(0xae)](_0x2a2471[_0x2b0e4f(0xbe)]);const _0x11b8fc=await provisionApiKey(_0x58d529['access_token']);return console['log']('\x20✓'),await _0x2a2471['Rmamr'](storeToken,_0x11b8fc),_0x58d529['refresh_token']&&await storeRefreshToken(_0x58d529['refresh_token']),_0x11b8fc;}function sleep(_0x1f5139){return new Promise(_0x21d756=>setTimeout(_0x21d756,_0x1f5139));}
1
+ const _0x3a20e4=_0x5bdc;(function(_0x5ec19f,_0x4978bc){const _0x4c051d=_0x5bdc,_0x4ec6fc=_0x5ec19f();while(!![]){try{const _0x43e686=-parseInt(_0x4c051d(0x188))/0x1+-parseInt(_0x4c051d(0x1b1))/0x2+parseInt(_0x4c051d(0x17d))/0x3*(-parseInt(_0x4c051d(0x193))/0x4)+parseInt(_0x4c051d(0x169))/0x5+parseInt(_0x4c051d(0x19d))/0x6*(-parseInt(_0x4c051d(0x174))/0x7)+-parseInt(_0x4c051d(0x19a))/0x8*(parseInt(_0x4c051d(0x16b))/0x9)+parseInt(_0x4c051d(0x196))/0xa;if(_0x43e686===_0x4978bc)break;else _0x4ec6fc['push'](_0x4ec6fc['shift']());}catch(_0x20a98c){_0x4ec6fc['push'](_0x4ec6fc['shift']());}}}(_0x32e8,0x50602));import{exec}from'child_process';import _0x1c5610 from'inquirer';import{getCurrentEnvironment,ENVIRONMENT_CONFIGS,getApiBaseUrl}from'./environment.js';import{storeToken,storeRefreshToken}from'./keychain.js';const WORKOS_DEVICE_AUTH_URL=_0x3a20e4(0x171),WORKOS_TOKEN_URL=_0x3a20e4(0x1a3);function _0x32e8(){const _0x43e1ce=['OyDGi','interval','Provisioning\x20CLI\x20token...','https://api.workos.com/user_management/authorize/device','CUFIz','Flhec','91zRhrGw','bQYxC','OWAIW','wUHll','memberships','write','now','RbfnQ','SzmEi','201XIvQZW','organizationId','lKwFV','xdg-open','urn:ietf:params:oauth:grant-type:device_code','stdout','length','prompt','nUBhj','filter','RHbul','113164WKeunP','ETMSZ','oriih','Wkdwo','list','Setting\x20up\x20your\x20organization...','startsWith','QAdUT','from','/cli-auth/token','access_token','18356nHbsnt','base64url','email','14033370SKzShk','name','application/json','application/x-www-form-urlencoded','652760jMCsaI','slow_down','Select\x20an\x20organization:','82986IySKWt','error','POST','NpqGZ','Authentication\x20failed','zflOA','https://api.workos.com/user_management/authenticate','Using\x20organization:\x20','log','Failed\x20to\x20fetch\x20memberships:\x20','CLI\x20Key','device_code','status','/organization/my-memberships','ADntW','open','RWyEf','text','isTTY','toString','656934ZnMPvC','BtjCl','QpMcp','json','Failed\x20to\x20request\x20device\x20code:\x20','fdCJj','Failed\x20to\x20refresh\x20token\x20with\x20org:\x20','1313765PIAGqV','apiKey','45HvKKWp','/api-keys','apiKeys'];_0x32e8=function(){return _0x43e1ce;};return _0x32e8();}export async function requestDeviceCode(_0x5d5b3b){const _0x3a764d=_0x3a20e4,_0x469509=await fetch(WORKOS_DEVICE_AUTH_URL,{'method':_0x3a764d(0x19f),'headers':{'Content-Type':'application/x-www-form-urlencoded'},'body':new URLSearchParams({'client_id':_0x5d5b3b})});if(!_0x469509['ok']){const _0x27b468=await _0x469509['text']();throw new Error(_0x3a764d(0x166)+_0x469509['status']+'\x20'+_0x27b468);}return _0x469509[_0x3a764d(0x1b4)]();}export async function pollForTokens(_0x4f3e18,_0xa99e55,_0xf6b7e2,_0x5482ba){const _0x25099c=_0x3a20e4,_0xb90672={'Wkdwo':function(_0x354450,_0x35844a){return _0x354450+_0x35844a;},'oriih':function(_0x595b7c,_0x486db4){return _0x595b7c*_0x486db4;},'Flhec':function(_0x3c57ed,_0x56f8c2){return _0x3c57ed(_0x56f8c2);},'wUHll':'POST','RHbul':function(_0x5f3f33,_0x372621){return _0x5f3f33===_0x372621;},'RrJVh':'authorization_pending','RbfnQ':'Device\x20authorization\x20timed\x20out'},_0x1ee78f=_0xb90672[_0x25099c(0x18b)](Date['now'](),_0x5482ba*0x3e8);let _0x359c19=_0xb90672[_0x25099c(0x18a)](_0xf6b7e2,0x3e8);while(Date[_0x25099c(0x17a)]()<_0x1ee78f){await _0xb90672[_0x25099c(0x173)](sleep,_0x359c19);const _0x65aafa=await fetch(WORKOS_TOKEN_URL,{'method':_0xb90672[_0x25099c(0x177)],'headers':{'Content-Type':_0x25099c(0x199)},'body':new URLSearchParams({'client_id':_0x4f3e18,'device_code':_0xa99e55,'grant_type':_0x25099c(0x181)})});if(_0x65aafa['ok'])return _0x65aafa['json']();const _0x19a1bd=await _0x65aafa[_0x25099c(0x1b4)]();if(_0xb90672[_0x25099c(0x187)](_0x19a1bd[_0x25099c(0x19e)],_0xb90672['RrJVh']))continue;if(_0xb90672['RHbul'](_0x19a1bd[_0x25099c(0x19e)],_0x25099c(0x19b))){_0x359c19+=0x3e8;continue;}throw new Error(_0x19a1bd['error_description']||_0x19a1bd['error']||_0x25099c(0x1a1));}throw new Error(_0xb90672[_0x25099c(0x17b)]);}async function fetchUserProfile(_0x256da8){const _0x1f438e=_0x3a20e4,_0x2ccd18={'SzmEi':function(_0x1e2a8e){return _0x1e2a8e();},'bGsOQ':'GET'},_0xdeac4f=_0x2ccd18[_0x1f438e(0x17c)](getApiBaseUrl);try{const _0x399856=await fetch(_0xdeac4f+'/organization/me',{'method':_0x2ccd18['bGsOQ'],'headers':{'workos-token':_0x256da8}});if(_0x399856['ok'])return _0x399856['json']();}catch{}return null;}function buildKeyName(_0x45c224,_0x2bcd47){const _0xa9132a=_0x3a20e4,_0x5ded0b={'QpMcp':function(_0x5bdd74,_0x44d527){return _0x5bdd74+_0x44d527;}},_0x5f2507=_0x2bcd47[_0xa9132a(0x186)](_0x1ad8e9=>_0x1ad8e9[_0xa9132a(0x197)]===_0x45c224||_0x1ad8e9['name'][_0xa9132a(0x18e)](_0x45c224+'\x20('));if(_0x5f2507['length']===0x0)return _0x45c224;return _0x45c224+'\x20('+_0x5ded0b[_0xa9132a(0x1b3)](_0x5f2507['length'],0x1)+')';}export async function provisionApiKey(_0x5acb53){const _0x54e056=_0x3a20e4,_0x206b56={'nUBhj':function(_0x2ed44e,_0xbf355d,_0x4640db){return _0x2ed44e(_0xbf355d,_0x4640db);},'EBKMP':'POST','JUYpP':'mcp:write'},_0xa16aef=getApiBaseUrl(),_0x3afdf7={'Content-Type':'application/json','workos-token':_0x5acb53},_0x4ee426=await fetchUserProfile(_0x5acb53),_0x5d3a96=_0x4ee426?.['firstName']||_0x4ee426?.[_0x54e056(0x195)]?.['split']('@')[0x0],_0x17737a=_0x5d3a96?_0x5d3a96+'\x27s\x20CLI\x20Key':_0x54e056(0x1a7);let _0x5333b8=[];try{const _0x242c5f=await _0x206b56[_0x54e056(0x185)](fetch,_0xa16aef+_0x54e056(0x16c),{'method':'GET','headers':_0x3afdf7});if(_0x242c5f['ok']){const _0x30fbf4=await _0x242c5f['json']();_0x5333b8=_0x30fbf4[_0x54e056(0x16d)];}}catch{}const _0x1463ce=_0x206b56[_0x54e056(0x185)](buildKeyName,_0x17737a,_0x5333b8),_0x55b507=await fetch(_0xa16aef+_0x54e056(0x16c),{'method':_0x206b56['EBKMP'],'headers':_0x3afdf7,'body':JSON['stringify']({'name':_0x1463ce,'scope':_0x206b56['JUYpP']})});if(!_0x55b507['ok']){const _0xcdb608=await _0x55b507['text']();throw new Error('Failed\x20to\x20provision\x20API\x20key:\x20'+_0x55b507[_0x54e056(0x1a9)]+'\x20'+_0xcdb608);}const _0x4f7fd2=await _0x55b507['json']();return _0x4f7fd2[_0x54e056(0x16a)]['token'];}export function openBrowser(_0x5a47f7){const _0x54d6ed=_0x3a20e4,_0x1435aa={'ETMSZ':_0x54d6ed(0x1ac),'NFcgS':function(_0x39d933,_0x1021cc){return _0x39d933===_0x1021cc;},'lWgkD':'start'},_0x371cd9=process['platform'],_0x1770d4=_0x371cd9==='darwin'?_0x1435aa[_0x54d6ed(0x189)]:_0x1435aa['NFcgS'](_0x371cd9,'win32')?_0x1435aa['lWgkD']:_0x54d6ed(0x180);exec(_0x1770d4+'\x20'+JSON['stringify'](_0x5a47f7));}function decodeJwtPayload(_0x13f1b1){const _0x57b962=_0x3a20e4,_0x566f3b={'DryMD':function(_0x3b2714,_0x51c8c0){return _0x3b2714!==_0x51c8c0;},'OyDGi':_0x57b962(0x194),'EyNSh':'utf-8'},_0xe8fb95=_0x13f1b1['split']('.');if(_0x566f3b['DryMD'](_0xe8fb95[_0x57b962(0x183)],0x3))throw new Error('Invalid\x20JWT\x20format');const _0x3c59af=Buffer[_0x57b962(0x190)](_0xe8fb95[0x1],_0x566f3b[_0x57b962(0x16e)])[_0x57b962(0x1b0)](_0x566f3b['EyNSh']);return JSON['parse'](_0x3c59af);}function _0x5bdc(_0x3510b7,_0x2d9bd8){_0x3510b7=_0x3510b7-0x166;const _0x32e889=_0x32e8();let _0x5bdcb2=_0x32e889[_0x3510b7];return _0x5bdcb2;}async function selfServeSignup(_0x46b96c){const _0x222048=_0x3a20e4,_0xc25b42={'RWyEf':function(_0x583635){return _0x583635();},'EtLYv':function(_0x503e99,_0x1959e8,_0x2cbe2a){return _0x503e99(_0x1959e8,_0x2cbe2a);},'CUFIz':_0x222048(0x19f),'jiABK':_0x222048(0x198)},_0x150e63=_0xc25b42[_0x222048(0x1ad)](getApiBaseUrl),_0x55a7c0=await _0xc25b42['EtLYv'](fetch,_0x150e63+'/organization/self-serve-signup',{'method':_0xc25b42[_0x222048(0x172)],'headers':{'Content-Type':_0xc25b42['jiABK'],'workos-token':_0x46b96c}});if(!_0x55a7c0['ok']){const _0x1b7742=await _0x55a7c0['text']();throw new Error('Failed\x20to\x20create\x20organization:\x20'+_0x55a7c0['status']+'\x20'+_0x1b7742);}return _0x55a7c0[_0x222048(0x1b4)]();}async function fetchMyMemberships(_0x5988ad){const _0x3e1c9d=_0x3a20e4,_0x4ff708={'ADntW':function(_0x56143f){return _0x56143f();}},_0x219ea8=_0x4ff708[_0x3e1c9d(0x1ab)](getApiBaseUrl),_0x45d4d0=await fetch(_0x219ea8+_0x3e1c9d(0x1aa),{'method':'GET','headers':{'workos-token':_0x5988ad}});if(!_0x45d4d0['ok']){const _0x12489e=await _0x45d4d0[_0x3e1c9d(0x1ae)]();throw new Error(_0x3e1c9d(0x1a6)+_0x45d4d0['status']+'\x20'+_0x12489e);}const _0x366778=await _0x45d4d0[_0x3e1c9d(0x1b4)]();return _0x366778[_0x3e1c9d(0x178)];}async function refreshTokenWithOrg(_0x1fb21f,_0x125f55,_0x3f9a29){const _0x28ea50=_0x3a20e4,_0x4ca6af={'zMYQh':function(_0x53ab5b,_0x37b7f1,_0x3a088e){return _0x53ab5b(_0x37b7f1,_0x3a088e);},'QAdUT':'application/x-www-form-urlencoded'},_0x554dd8=await _0x4ca6af['zMYQh'](fetch,WORKOS_TOKEN_URL,{'method':_0x28ea50(0x19f),'headers':{'Content-Type':_0x4ca6af[_0x28ea50(0x18f)]},'body':new URLSearchParams({'client_id':_0x1fb21f,'grant_type':'refresh_token','refresh_token':_0x125f55,'organization_id':_0x3f9a29})});if(!_0x554dd8['ok']){const _0x34edde=await _0x554dd8['text']();throw new Error(_0x28ea50(0x168)+_0x554dd8[_0x28ea50(0x1a9)]+'\x20'+_0x34edde);}return _0x554dd8['json']();}async function provisionCliToken(_0x4e8b21){const _0x264c6c=_0x3a20e4,_0x2b0f0d={'OWAIW':function(_0x2d7d33,_0x26ab33,_0x5eff4b){return _0x2d7d33(_0x26ab33,_0x5eff4b);}},_0x5ec490=getApiBaseUrl(),_0x52f6c2=await _0x2b0f0d[_0x264c6c(0x176)](fetch,_0x5ec490+_0x264c6c(0x191),{'method':'POST','headers':{'Content-Type':'application/json','workos-token':_0x4e8b21}});if(!_0x52f6c2['ok']){const _0x2afac2=await _0x52f6c2['text']();throw new Error('Failed\x20to\x20provision\x20CLI\x20token:\x20'+_0x52f6c2[_0x264c6c(0x1a9)]+'\x20'+_0x2afac2);}return _0x52f6c2[_0x264c6c(0x1b4)]();}export async function runDeviceAuthFlow(){const _0x38d3b9=_0x3a20e4,_0x4a5ce1={'bQYxC':function(_0x421d18,_0x4e7ed3){return _0x421d18(_0x4e7ed3);},'zflOA':'\x20\x20\x20A\x20human\x20needs\x20to\x20complete\x20authentication\x20in\x20the\x20browser.\x0a','SoLph':function(_0x3a3a5b,_0x28b2e8,_0x412888,_0x54bf46,_0xd069e){return _0x3a3a5b(_0x28b2e8,_0x412888,_0x54bf46,_0xd069e);},'mMAhl':_0x38d3b9(0x18d),'BtjCl':function(_0x466f8d,_0x589a94){return _0x466f8d===_0x589a94;},'lKwFV':function(_0x4c8f76,_0x7bd70a){return _0x4c8f76+_0x7bd70a;},'PNRcp':_0x38d3b9(0x18c),'NpqGZ':_0x38d3b9(0x19c),'bAAJG':_0x38d3b9(0x170),'fdCJj':function(_0x3ba1b5,_0x3b6178){return _0x3ba1b5(_0x3b6178);}},_0x2c63bc=getCurrentEnvironment(),_0xa8ca2d=ENVIRONMENT_CONFIGS[_0x2c63bc]['workosClientId'],_0x5af7db=await _0x4a5ce1[_0x38d3b9(0x175)](requestDeviceCode,_0xa8ca2d);console['log']('\x0a🔐\x20Opening\x20browser\x20to\x20log\x20in...'),console[_0x38d3b9(0x1a5)](_0x4a5ce1[_0x38d3b9(0x1a2)]),_0x4a5ce1['bQYxC'](openBrowser,_0x5af7db['verification_uri_complete']),console['log']('If\x20the\x20browser\x20doesn\x27t\x20open,\x20visit:\x20'+_0x5af7db['verification_uri_complete']),console['log']('Code:\x20'+_0x5af7db['user_code']+'\x0a'),process['stdout']['write']('Waiting\x20for\x20authentication...');let _0x93fa2f=await _0x4a5ce1['SoLph'](pollForTokens,_0xa8ca2d,_0x5af7db[_0x38d3b9(0x1a8)],_0x5af7db[_0x38d3b9(0x16f)],_0x5af7db['expires_in']);console['log']('\x20✓');const _0x186407=_0x4a5ce1['bQYxC'](decodeJwtPayload,_0x93fa2f['access_token']);if(!_0x186407['org_id']){const _0x52c4e0=await fetchMyMemberships(_0x93fa2f[_0x38d3b9(0x192)]);let _0x45b6c3;if(_0x52c4e0[_0x38d3b9(0x183)]===0x0){process[_0x38d3b9(0x182)][_0x38d3b9(0x179)](_0x4a5ce1['mMAhl']);const _0xc7fe88=await selfServeSignup(_0x93fa2f[_0x38d3b9(0x192)]);_0x45b6c3=_0xc7fe88[_0x38d3b9(0x17e)],console['log']('\x20✓');}else{if(_0x4a5ce1[_0x38d3b9(0x1b2)](_0x52c4e0[_0x38d3b9(0x183)],0x1))_0x45b6c3=_0x52c4e0[0x0]['organizationId'],console['log'](_0x38d3b9(0x1a4)+_0x52c4e0[0x0][_0x38d3b9(0x197)]);else{const _0x26bcf3=process['stdin']['isTTY']&&process['stdout'][_0x38d3b9(0x1af)];if(!_0x26bcf3)throw new Error(_0x4a5ce1[_0x38d3b9(0x17f)]('Multiple\x20organizations\x20available\x20but\x20cannot\x20prompt\x20for\x20selection\x20in\x20non-interactive\x20mode.\x0a','Use:\x20ranger\x20setup\x20[token]\x20or\x20set\x20RANGER_CLI_TOKEN.'));const {selected:_0x42c743}=await _0x1c5610[_0x38d3b9(0x184)]([{'type':_0x4a5ce1['PNRcp'],'name':'selected','message':_0x4a5ce1[_0x38d3b9(0x1a0)],'choices':_0x52c4e0['map'](_0x217114=>({'name':_0x217114[_0x38d3b9(0x197)],'value':_0x217114['organizationId']}))}]);_0x45b6c3=_0x42c743;}}_0x93fa2f=await refreshTokenWithOrg(_0xa8ca2d,_0x93fa2f['refresh_token'],_0x45b6c3);}process['stdout'][_0x38d3b9(0x179)](_0x4a5ce1['bAAJG']);const _0x746bed=await _0x4a5ce1[_0x38d3b9(0x167)](provisionCliToken,_0x93fa2f['access_token']);return console['log']('\x20✓'),await storeToken(_0x746bed['token']),_0x93fa2f['refresh_token']&&await storeRefreshToken(_0x93fa2f['refresh_token']),_0x746bed['token'];}function sleep(_0x1883c1){return new Promise(_0x1038ed=>setTimeout(_0x1038ed,_0x1883c1));}