@ranger-testing/ranger-cli 2.0.7 → 2.1.0

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 (62) 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 -0
  25. package/build/commands/setup/opencode.js +1 -0
  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/browserSessionsApi.js +1 -1
  35. package/build/commands/utils/claudeConfig.js +1 -1
  36. package/build/commands/utils/claudePlugin.js +1 -1
  37. package/build/commands/utils/crypto.js +1 -1
  38. package/build/commands/utils/desirePathLog.js +1 -1
  39. package/build/commands/utils/deviceAuth.js +1 -1
  40. package/build/commands/utils/environment.js +1 -1
  41. package/build/commands/utils/featureApi.js +1 -1
  42. package/build/commands/utils/featureReportGenerator.js +1 -1
  43. package/build/commands/utils/fixWebmDuration.js +1 -1
  44. package/build/commands/utils/git.js +1 -1
  45. package/build/commands/utils/keychain.js +1 -1
  46. package/build/commands/utils/localAgentInstallationsApi.js +1 -1
  47. package/build/commands/utils/opencodeConfig.js +1 -0
  48. package/build/commands/utils/profileMessages.js +1 -1
  49. package/build/commands/utils/profileSetupBanner.js +1 -1
  50. package/build/commands/utils/rangerRoot.js +1 -1
  51. package/build/commands/utils/reportGenerator.js +1 -1
  52. package/build/commands/utils/retry.js +1 -1
  53. package/build/commands/utils/sessionCache.js +1 -1
  54. package/build/commands/utils/settings.js +1 -1
  55. package/build/commands/utils/skillContent.js +1 -1
  56. package/build/commands/utils/skills.js +1 -1
  57. package/build/commands/utils/telemetry.js +1 -1
  58. package/build/commands/utils/userApi.js +1 -1
  59. package/build/commands/utils/version.js +1 -1
  60. package/build/commands/verifyFeature.js +1 -1
  61. package/build/commands/verifyInBrowser.js +1 -1
  62. package/package.json +1 -1
@@ -1 +1 @@
1
- function _0x3da4(){const _0x1eab73=['\x0a✅\x20API\x20key\x20stored\x20successfully','success','485804AJScAn','592239OdtlYY','bkmet','2384816xPegUJ','Login\x20failed:\x20','3907075OLhOKU','stdin','isTTY','\x0a✅\x20Logged\x20in\x20to\x20','4942800uNuWKN','2uJdkjt','72rJXuov','1924239CUtNfc','log','user','294732sbsloF'];_0x3da4=function(){return _0x1eab73;};return _0x3da4();}function _0x1e82(_0x2b4fbf,_0x2e559e){_0x2b4fbf=_0x2b4fbf-0x1bc;const _0x3da438=_0x3da4();let _0x1e822d=_0x3da438[_0x2b4fbf];return _0x1e822d;}(function(_0x194849,_0x493c73){const _0x4354be=_0x1e82,_0x36495d=_0x194849();while(!![]){try{const _0x52bd4d=parseInt(_0x4354be(0x1bc))/0x1+parseInt(_0x4354be(0x1c5))/0x2*(parseInt(_0x4354be(0x1c7))/0x3)+-parseInt(_0x4354be(0x1cd))/0x4+parseInt(_0x4354be(0x1c0))/0x5+-parseInt(_0x4354be(0x1c4))/0x6+-parseInt(_0x4354be(0x1be))/0x7+-parseInt(_0x4354be(0x1c6))/0x8*(parseInt(_0x4354be(0x1ca))/0x9);if(_0x52bd4d===_0x493c73)break;else _0x36495d['push'](_0x36495d['shift']());}catch(_0x4738a1){_0x36495d['push'](_0x36495d['shift']());}}}(_0x3da4,0x6a0dc));import{runDeviceAuthFlow}from'./utils/deviceAuth.js';import{getCurrentUser}from'./utils/userApi.js';export async function login(){const _0x45fe64=_0x1e82,_0x41db5f={'bkmet':'Login\x20requires\x20an\x20interactive\x20terminal.\x20In\x20CI,\x20use:\x20ranger\x20setup\x20[token]\x20or\x20set\x20RANGER_CLI_TOKEN.'},_0x5e9986=process[_0x45fe64(0x1c1)]['isTTY']&&process['stdout'][_0x45fe64(0x1c2)];if(!_0x5e9986)throw new Error(_0x41db5f[_0x45fe64(0x1bd)]);try{const _0x1b4855=await runDeviceAuthFlow(),_0x390a30=await getCurrentUser(_0x1b4855);_0x390a30[_0x45fe64(0x1cc)]?console[_0x45fe64(0x1c8)](_0x45fe64(0x1c3)+_0x390a30[_0x45fe64(0x1c9)]['organizationName']):console[_0x45fe64(0x1c8)](_0x45fe64(0x1cb));}catch(_0x443026){throw new Error(_0x45fe64(0x1bf)+(_0x443026 instanceof Error?_0x443026['message']:_0x443026));}}
1
+ (function(_0x8da1e9,_0x514054){const _0x5dc6a2=_0x52dd,_0x51c68b=_0x8da1e9();while(!![]){try{const _0x22efa9=-parseInt(_0x5dc6a2(0x12d))/0x1+-parseInt(_0x5dc6a2(0x126))/0x2*(-parseInt(_0x5dc6a2(0x12b))/0x3)+-parseInt(_0x5dc6a2(0x122))/0x4*(-parseInt(_0x5dc6a2(0x128))/0x5)+-parseInt(_0x5dc6a2(0x127))/0x6*(parseInt(_0x5dc6a2(0x12a))/0x7)+-parseInt(_0x5dc6a2(0x123))/0x8+parseInt(_0x5dc6a2(0x125))/0x9+parseInt(_0x5dc6a2(0x129))/0xa;if(_0x22efa9===_0x514054)break;else _0x51c68b['push'](_0x51c68b['shift']());}catch(_0x5ec51b){_0x51c68b['push'](_0x51c68b['shift']());}}}(_0x3a76,0xa57b2));import{runDeviceAuthFlow}from'./utils/deviceAuth.js';function _0x3a76(){const _0x311d22=['9870000LGMYnv','7zplczy','29337HNjNSH','dexzR','981929XBSdZE','stdout','hHgUn','68Rgbvxq','6810584PFOpDN','isTTY','2486574IsKwnM','234QzxWAp','2355684WNrOIU','145955ANVODf'];_0x3a76=function(){return _0x311d22;};return _0x3a76();}import{getCurrentUser}from'./utils/userApi.js';function _0x52dd(_0x49a8c5,_0x3e102b){_0x49a8c5=_0x49a8c5-0x122;const _0x3a7669=_0x3a76();let _0x52dd9f=_0x3a7669[_0x49a8c5];return _0x52dd9f;}export async function login(){const _0x3b296c=_0x52dd,_0xfbd469={'nOumM':function(_0x154458,_0x438c44){return _0x154458(_0x438c44);},'dexzR':'\x0a✅\x20API\x20key\x20stored\x20successfully','hHgUn':function(_0x573f92,_0x33472b){return _0x573f92 instanceof _0x33472b;}},_0x3a31a0=process['stdin'][_0x3b296c(0x124)]&&process[_0x3b296c(0x12e)][_0x3b296c(0x124)];if(!_0x3a31a0)throw new Error('Login\x20requires\x20an\x20interactive\x20terminal.\x20In\x20CI,\x20use:\x20ranger\x20setup\x20[token]\x20or\x20set\x20RANGER_CLI_TOKEN.');try{const _0x3fc930=await runDeviceAuthFlow(),_0x3aedb2=await _0xfbd469['nOumM'](getCurrentUser,_0x3fc930);_0x3aedb2['success']?console['log']('\x0a✅\x20Logged\x20in\x20to\x20'+_0x3aedb2['user']['organizationName']):console['log'](_0xfbd469[_0x3b296c(0x12c)]);}catch(_0x2064c9){throw new Error('Login\x20failed:\x20'+(_0xfbd469[_0x3b296c(0x12f)](_0x2064c9,Error)?_0x2064c9['message']:_0x2064c9));}}
@@ -0,0 +1 @@
1
+ (function(_0x4ff4c3,_0x873ed4){const _0x3e98e9=_0x5045,_0x22266f=_0x4ff4c3();while(!![]){try{const _0x337205=-parseInt(_0x3e98e9(0x21d))/0x1*(parseInt(_0x3e98e9(0x1ea))/0x2)+-parseInt(_0x3e98e9(0x207))/0x3*(-parseInt(_0x3e98e9(0x219))/0x4)+parseInt(_0x3e98e9(0x20c))/0x5*(parseInt(_0x3e98e9(0x21b))/0x6)+-parseInt(_0x3e98e9(0x20f))/0x7+-parseInt(_0x3e98e9(0x211))/0x8+-parseInt(_0x3e98e9(0x200))/0x9+parseInt(_0x3e98e9(0x1f7))/0xa;if(_0x337205===_0x873ed4)break;else _0x22266f['push'](_0x22266f['shift']());}catch(_0x29fc05){_0x22266f['push'](_0x22266f['shift']());}}}(_0x3db1,0xdbc9c));import{join}from'path';import{existsSync}from'fs';import _0x3b8b3e from'inquirer';function _0x5045(_0x188867,_0x3deef3){_0x188867=_0x188867-0x1e7;const _0x3db1eb=_0x3db1();let _0x5045c0=_0x3db1eb[_0x188867];return _0x5045c0;}import{skillup}from'../skillup.js';import{runClaudeCommand,isMarketplaceAdded,isPluginInstalled}from'../utils/claudePlugin.js';import{getProjectRoot,getSkillsDir}from'../utils/claudeConfig.js';export async function ensureClaudePlugin(_0x847469){const _0x49525d=_0x5045,_0x28a2f4={'nKAfp':function(_0x2bd2e6,_0x2ff6cd){return _0x2bd2e6(_0x2ff6cd);},'WhecF':function(_0x35a205,_0x492914,_0x488044){return _0x35a205(_0x492914,_0x488044);},'yONVG':function(_0x5b69ad){return _0x5b69ad();},'hQMnU':'\x0a📦\x20Claude\x20Code\x20Plugin\x0a','HcRGM':'pluginScope','hmtPD':_0x49525d(0x217),'FBode':_0x49525d(0x21c),'rfDaE':_0x49525d(0x1ff),'xqhOt':'✓\x20Marketplace\x20already\x20added','ombxa':_0x49525d(0x21a),'HvhKk':_0x49525d(0x1fb),'bMqDO':_0x49525d(0x1e7),'hmKhW':'❌\x20Failed\x20to\x20add\x20marketplace:','RRPhX':function(_0x4c69f6,_0x22a0ca){return _0x4c69f6(_0x22a0ca);},'rHJsa':_0x49525d(0x204),'ecmhB':_0x49525d(0x1e8),'BWaTv':'\x0aYou\x20can\x20install\x20manually\x20with:','nVtrh':_0x49525d(0x208),'hYihy':_0x49525d(0x221)},_0xba7bdc=await isPluginInstalled('ranger@trailhead');if(_0xba7bdc)return console['log']('✓\x20Claude\x20Code\x20plugin\x20already\x20installed'),![];const _0x18f4eb=_0x28a2f4['nKAfp'](existsSync,_0x28a2f4['WhecF'](join,_0x28a2f4[_0x49525d(0x220)](getProjectRoot),'.claude'));let _0xd6c429;if(_0x847469)_0xd6c429=_0x847469;else{if(_0x18f4eb)_0xd6c429='project';else{console['log'](_0x28a2f4[_0x49525d(0x1ec)]);const _0x465767=await _0x3b8b3e['prompt']([{'type':'list','name':_0x28a2f4[_0x49525d(0x1f5)],'message':_0x28a2f4['hmtPD'],'choices':[{'name':_0x28a2f4[_0x49525d(0x1f4)],'value':'user'},{'name':_0x49525d(0x212),'value':_0x28a2f4['rfDaE']}],'default':_0x49525d(0x21e)}]);_0xd6c429=_0x465767['pluginScope'];}}console[_0x49525d(0x1eb)](_0x49525d(0x1ef)+_0xd6c429+_0x49525d(0x20b));const _0x5d7f53=await isMarketplaceAdded(_0x49525d(0x20a));let _0x10199b=_0x5d7f53;if(_0x5d7f53)console['log'](_0x28a2f4['xqhOt']);else{const _0x2a5ca8=await runClaudeCommand([_0x28a2f4[_0x49525d(0x1f8)],_0x28a2f4[_0x49525d(0x20e)],'add',_0x28a2f4['bMqDO']]);!_0x2a5ca8[_0x49525d(0x218)]?(console[_0x49525d(0x1fa)](_0x28a2f4[_0x49525d(0x205)],_0x2a5ca8[_0x49525d(0x1fa)]),console['log'](_0x49525d(0x21f)),console[_0x49525d(0x1eb)]('\x20\x20claude\x20plugin\x20marketplace\x20add\x20ranger-testing/trailhead'),console['log']('\x20\x20claude\x20plugin\x20install\x20ranger@trailhead\x20--scope\x20'+_0xd6c429)):_0x10199b=!![];}if(_0x10199b){const _0x3ebf15=await _0x28a2f4[_0x49525d(0x1f2)](runClaudeCommand,[_0x49525d(0x21a),_0x28a2f4[_0x49525d(0x210)],_0x49525d(0x208),_0x49525d(0x221),_0xd6c429]);if(!_0x3ebf15['success'])console[_0x49525d(0x1fa)](_0x28a2f4[_0x49525d(0x1f0)],_0x3ebf15[_0x49525d(0x1fa)]),console['log'](_0x28a2f4[_0x49525d(0x201)]),console['log']('\x20\x20claude\x20plugin\x20install\x20ranger@trailhead\x20--scope\x20'+_0xd6c429);else{console['log'](_0x49525d(0x1f3));const _0x273671=[_0x28a2f4['ombxa'],'enable',_0x28a2f4['nVtrh']];_0xd6c429==='project'&&_0x273671['push'](_0x28a2f4[_0x49525d(0x209)],_0x28a2f4[_0x49525d(0x216)]);const _0x4759e1=await runClaudeCommand(_0x273671,{'captureOutput':!![]}),_0x4662da=_0x4759e1[_0x49525d(0x1f1)]?.[_0x49525d(0x1f9)]('already\x20enabled');!_0x4759e1[_0x49525d(0x218)]&&!_0x4662da?console[_0x49525d(0x1fa)]('⚠\x20Failed\x20to\x20enable\x20plugin:',_0x4759e1[_0x49525d(0x1fa)]):console['log']('✓\x20Claude\x20Code\x20plugin\x20enabled');}}return!![];}function _0x3db1(){const _0x34d3be=['PwUco','18821710JHbcra','ombxa','includes','error','marketplace','eajui','Anxel','HQbwV','project','14645043nuihrQ','BWaTv','confirm','prompt','install','hmKhW','SKILL.md','14757vBFiNT','ranger@trailhead','hYihy','trailhead','\x20level)...\x0a','140925XssKSr','ranger','HvhKk','5834507yLrwSb','rHJsa','4645272FhfDHl','Project\x20(shared\x20with\x20team\x20via\x20git)','gnzDk','wantsSkillup','QfXVe','rfDaE','Where\x20should\x20the\x20plugin\x20be\x20installed?','success','680jKWIFz','plugin','282iSATto','User\x20(available\x20in\x20all\x20your\x20projects)','9tUKkVg','user','\x0aYou\x20can\x20install\x20manually\x20with:','yONVG','--scope','ranger-testing/trailhead','❌\x20Failed\x20to\x20install\x20plugin:','✓\x20Ranger\x20skills\x20already\x20installed','22546yWAtPN','log','hQMnU','.claude','afPpI','\x0aInstalling\x20Claude\x20Code\x20plugin\x20(','ecmhB','output','RRPhX','✓\x20Claude\x20Code\x20plugin\x20installed\x20successfully','FBode','HcRGM'];_0x3db1=function(){return _0x34d3be;};return _0x3db1();}export async function ensureClaudeSkills(_0x5586b3){const _0x1ba07d=_0x5045,_0x1f72d2={'afPpI':function(_0x1e883f,_0x2b22dd){return _0x1e883f(_0x2b22dd);},'eajui':'project','BvyxQ':_0x1ba07d(0x20d),'QfXVe':_0x1ba07d(0x206),'qVJcA':function(_0x54562d,_0xbb666f){return _0x54562d||_0xbb666f;},'PwUco':_0x1ba07d(0x1e9),'HQbwV':function(_0x25aa45,_0x4177da,_0x97603){return _0x25aa45(_0x4177da,_0x97603);},'ZsHxb':function(_0x39d644){return _0x39d644();},'UPoan':_0x1ba07d(0x1ed),'gnzDk':function(_0xde778c,_0x999d36){return _0xde778c(_0x999d36);},'Anxel':'wantsSkillup'},_0x3cc6fc=existsSync(join(getSkillsDir('user'),_0x1ba07d(0x20d),_0x1ba07d(0x206))),_0x3e6891=existsSync(join(_0x1f72d2[_0x1ba07d(0x1ee)](getSkillsDir,_0x1f72d2[_0x1ba07d(0x1fc)]),_0x1f72d2['BvyxQ'],_0x1f72d2[_0x1ba07d(0x215)]));if(_0x1f72d2['qVJcA'](_0x3cc6fc,_0x3e6891))return console['log'](_0x1f72d2[_0x1ba07d(0x1f6)]),![];const _0x5083db=existsSync(_0x1f72d2[_0x1ba07d(0x1fe)](join,_0x1f72d2['ZsHxb'](getProjectRoot),_0x1f72d2['UPoan']));let _0x510f35=!![];if(_0x5586b3)await _0x1f72d2['gnzDk'](skillup,{'autoInstall':_0x5586b3,'suppressUsage':!![]});else{if(_0x5083db)await _0x1f72d2[_0x1ba07d(0x213)](skillup,{'autoInstall':'project','suppressUsage':!![]});else{const _0x9b12f9=await _0x3b8b3e[_0x1ba07d(0x203)]([{'type':_0x1ba07d(0x202),'name':_0x1f72d2[_0x1ba07d(0x1fd)],'message':'Would\x20you\x20like\x20to\x20install\x20skills?','default':!![]}]);_0x510f35=_0x9b12f9[_0x1ba07d(0x214)],_0x510f35&&await skillup({'suppressUsage':!![]});}}return _0x510f35;}
@@ -0,0 +1 @@
1
+ (function(_0x134a2e,_0x2bd2a8){const _0x380d19=_0x265e,_0x1a86f6=_0x134a2e();while(!![]){try{const _0x3b5448=parseInt(_0x380d19(0xb7))/0x1+parseInt(_0x380d19(0xbf))/0x2+-parseInt(_0x380d19(0xae))/0x3*(-parseInt(_0x380d19(0xaf))/0x4)+-parseInt(_0x380d19(0xc3))/0x5*(parseInt(_0x380d19(0xb8))/0x6)+-parseInt(_0x380d19(0xc0))/0x7*(parseInt(_0x380d19(0xb1))/0x8)+parseInt(_0x380d19(0xb2))/0x9*(-parseInt(_0x380d19(0xb3))/0xa)+-parseInt(_0x380d19(0xb4))/0xb*(-parseInt(_0x380d19(0xc8))/0xc);if(_0x3b5448===_0x2bd2a8)break;else _0x1a86f6['push'](_0x1a86f6['shift']());}catch(_0x3ee51f){_0x1a86f6['push'](_0x1a86f6['shift']());}}}(_0x590e,0xb2380));import{join}from'path';function _0x265e(_0x418111,_0x23b790){_0x418111=_0x418111-0xae;const _0x590e6d=_0x590e();let _0x265e15=_0x590e6d[_0x418111];return _0x265e15;}import{existsSync}from'fs';import{mkdir,readFile,writeFile}from'fs/promises';import _0x3f4949 from'inquirer';function _0x590e(){const _0x14d712=['3268578fjSqYa','4qtHdye','opencode.json','12768dARkxX','336123MnmMee','140Mvwytf','99tJehYb','pluginScope','prompt','517100lsnbqm','462558dBWMmP','oHDwd','HIzoh','aguWB','@ranger-testing/opencode-plugin','Project\x20(shared\x20with\x20team\x20via\x20git)','Where\x20should\x20the\x20plugin\x20be\x20installed?','642146IgTnMo','1477yVVJFa','Failed\x20to\x20read\x20opencode.json','QOgBn','55DNgiWm','list','$schema','ogNft','isArray','679896GnQbab','user','plugin','log'];_0x590e=function(){return _0x14d712;};return _0x590e();}import{getOpencodeConfigDir}from'../utils/opencodeConfig.js';export async function ensureOpencodePluginConfig(_0xfba701){const _0x25c9ac=_0x265e,_0x5d5a52={'oHDwd':function(_0x10b999,_0x1f02c8){return _0x10b999(_0x1f02c8);},'aguWB':'project','ogNft':_0x25c9ac(0xc9),'QOgBn':function(_0x127cf5,_0x342397){return _0x127cf5(_0x342397);},'HIzoh':function(_0x295b3b,_0x1ad91a,_0x42bf33){return _0x295b3b(_0x1ad91a,_0x42bf33);},'YZICT':'✓\x20OpenCode\x20plugin\x20already\x20configured','zHgpw':function(_0x4b9f1b,_0x3d7ea6,_0x246aeb){return _0x4b9f1b(_0x3d7ea6,_0x246aeb);},'eFvlu':function(_0x5a6a7d,_0x56d29c){return _0x5a6a7d+_0x56d29c;}},_0x43d226=_0x5d5a52[_0x25c9ac(0xb9)](existsSync,join(_0x5d5a52['oHDwd'](getOpencodeConfigDir,_0x5d5a52[_0x25c9ac(0xbb)]),_0x25c9ac(0xb0)));let _0x213425;if(_0xfba701)_0x213425=_0xfba701;else{if(_0x43d226)_0x213425='project';else{console[_0x25c9ac(0xcb)]('\x0a📦\x20OpenCode\x20Plugin\x0a');const _0x313bbe=await _0x3f4949[_0x25c9ac(0xb6)]([{'type':_0x25c9ac(0xc4),'name':_0x25c9ac(0xb5),'message':_0x25c9ac(0xbe),'choices':[{'name':'User\x20(available\x20in\x20all\x20your\x20projects)','value':_0x5d5a52[_0x25c9ac(0xc6)]},{'name':_0x25c9ac(0xbd),'value':_0x5d5a52['aguWB']}],'default':_0x5d5a52['ogNft']}]);_0x213425=_0x313bbe['pluginScope'];}}const _0x5657b8=join(_0x5d5a52[_0x25c9ac(0xc2)](getOpencodeConfigDir,_0x213425),'opencode.json'),_0x57b165=_0x25c9ac(0xbc),_0x412de4='https://opencode.ai/config.json';let _0x145c84={};if(existsSync(_0x5657b8))try{const _0x3f197f=await _0x5d5a52[_0x25c9ac(0xba)](readFile,_0x5657b8,'utf-8');_0x145c84=JSON['parse'](_0x3f197f);}catch(_0x5777a5){return console['error']('⚠\x20Failed\x20to\x20read\x20opencode.json.\x20Please\x20add\x20the\x20plugin\x20manually.'),{'configured':![],'scope':_0x213425,'error':_0x25c9ac(0xc1),'details':_0x5777a5};}const _0x67ad7b=Array[_0x25c9ac(0xc7)](_0x145c84['plugin'])?_0x145c84['plugin']:[];if(_0x67ad7b['includes'](_0x57b165))return console[_0x25c9ac(0xcb)](_0x5d5a52['YZICT']),{'configured':![],'scope':_0x213425};return _0x145c84[_0x25c9ac(0xc5)]=_0x145c84[_0x25c9ac(0xc5)]||_0x412de4,_0x145c84[_0x25c9ac(0xca)]=[..._0x67ad7b,_0x57b165],await _0x5d5a52['zHgpw'](mkdir,getOpencodeConfigDir(_0x213425),{'recursive':!![]}),await _0x5d5a52['zHgpw'](writeFile,_0x5657b8,_0x5d5a52['eFvlu'](JSON['stringify'](_0x145c84,null,0x2),'\x0a')),console['log']('✓\x20OpenCode\x20plugin\x20configured'),{'configured':!![],'scope':_0x213425};}
@@ -1 +1 @@
1
- (function(_0x11baca,_0x49a749){const _0x15315c=_0x48b8,_0x1445ed=_0x11baca();while(!![]){try{const _0x9d37d0=-parseInt(_0x15315c(0x18f))/0x1+-parseInt(_0x15315c(0x195))/0x2+parseInt(_0x15315c(0x1a0))/0x3*(-parseInt(_0x15315c(0x191))/0x4)+parseInt(_0x15315c(0x1a4))/0x5*(parseInt(_0x15315c(0x178))/0x6)+parseInt(_0x15315c(0x17a))/0x7+-parseInt(_0x15315c(0x190))/0x8+parseInt(_0x15315c(0x18b))/0x9;if(_0x9d37d0===_0x49a749)break;else _0x1445ed['push'](_0x1445ed['shift']());}catch(_0x20c1ec){_0x1445ed['push'](_0x1445ed['shift']());}}}(_0x38ec,0xd210b));import{mkdir,readFile,readdir}from'fs/promises';import{join}from'path';import{existsSync}from'fs';import{authenticate,ensureRangerDir,ensureChromium,writeRangerGitignore}from'./start.js';import{skillup}from'./skillup.js';function _0x38ec(){const _0x4e151a=['install','\x20\x20No\x20auth\x20state\x20found\x20(app\x20may\x20not\x20require\x20authentication)','HsKmO','isDirectory','name','add','JbAhi','You\x20can\x20install\x20manually:\x20claude\x20plugin\x20marketplace\x20add\x20ranger-testing/trailhead','plugin','project','Auto-detected\x20CI\x20profile:\x20','6126HMBaTc','settings.json','11201862LmWabT','profile','baseUrl','CnXmE','trackPhaseStart','fTVxg','✓\x20Skipping\x20Chromium\x20check\x20(--skip-chromium)','✓\x20Claude\x20Code\x20plugin\x20already\x20installed','Or\x20specify\x20a\x20profile\x20name\x20with\x20--profile\x20and\x20--base-url\x20to\x20create\x20one.','ApoCl','trackPhaseEnd','auth.json','success','TrJbl','XCDAS','chromium','\x0a🔧\x20Ranger\x20CI\x20Setup\x0a','27275229UIsBJx','auth','error','✓\x20Auth\x20state\x20found','1535969KWxItf','1197624BESdIL','2709444oumnWz','xQzBn','AMiCk','CI\x20profile\x20\x22','1948090uCcwNB','filter','Qmxxt','log','ARjsM','✓\x20Encrypted\x20auth\x20verified\x20(will\x20decrypt\x20at\x20runtime)','dir_setup','length','ndTDq','message','No\x20API\x20token\x20available\x20for\x20decryption','6xahcoq','mRSTH','KkyfL','JLtVP','1195AoIAWF','ranger@trailhead','✓\x20Claude\x20Code\x20plugin\x20installed','skipChromium','Installing\x20Claude\x20Code\x20plugin\x20(project\x20level)...','QmEqH','ranger-testing/trailhead','profile_activate','MTxvb','snixi','uTZQh'];_0x38ec=function(){return _0x4e151a;};return _0x38ec();}import{getRangerDir}from'./utils/rangerRoot.js';import{writeActiveProfileName}from'./utils/activeProfile.js';function _0x48b8(_0x48f812,_0x5d5370){_0x48f812=_0x48f812-0x163;const _0x38ec44=_0x38ec();let _0x48b816=_0x38ec44[_0x48f812];return _0x48b816;}import{saveSettings}from'./utils/settings.js';import{decrypt}from'./utils/crypto.js';import{getToken}from'./utils/keychain.js';import{runClaudeCommand,isMarketplaceAdded,isPluginInstalled}from'./utils/claudePlugin.js';async function findCiProfile(_0x31ccb7){const _0x3491f7=_0x48b8,_0x52fefb={'bGiVn':function(_0x434054,_0x5a7a56,_0x23aba0){return _0x434054(_0x5a7a56,_0x23aba0);},'ASluF':function(_0x361d2b,_0x320486){return _0x361d2b===_0x320486;},'HHoPs':function(_0x5133cd,_0x1172d4){return _0x5133cd+_0x1172d4;},'snixi':'No\x20CI\x20profiles\x20found\x20in\x20.ranger/ci/.\x20Create\x20one\x20first\x20with:\x20ranger\x20profile\x20add\x20<name>\x20--ci\x0a','JbAhi':function(_0x2ea502,_0x3b0133){return _0x2ea502===_0x3b0133;}},_0x470f90=getRangerDir(),_0x5caa28=_0x52fefb['bGiVn'](join,_0x470f90,'ci');if(_0x31ccb7){const _0x13d3de=join(_0x5caa28,_0x31ccb7);return{'name':_0x31ccb7,'path':_0x13d3de};}if(!existsSync(_0x5caa28))throw new Error('No\x20CI\x20profiles\x20found.\x20Create\x20one\x20first\x20with:\x20ranger\x20profile\x20add\x20<name>\x20--ci\x0a'+_0x3491f7(0x182));const _0x3c0f6f=await readdir(_0x5caa28,{'withFileTypes':!![]}),_0x20d7f2=_0x3c0f6f[_0x3491f7(0x196)](_0x15f4e7=>_0x15f4e7[_0x3491f7(0x170)]())['map'](_0x5ade18=>_0x5ade18['name']);if(_0x52fefb['ASluF'](_0x20d7f2['length'],0x0))throw new Error(_0x52fefb['HHoPs'](_0x52fefb[_0x3491f7(0x16b)],_0x3491f7(0x182)));if(_0x52fefb[_0x3491f7(0x173)](_0x20d7f2[_0x3491f7(0x19c)],0x1)){const _0x42824c=_0x20d7f2[0x0];return console['log'](_0x3491f7(0x177)+_0x42824c),{'name':_0x42824c,'path':_0x52fefb['bGiVn'](join,_0x5caa28,_0x42824c)};}throw new Error('Multiple\x20CI\x20profiles\x20found:\x20'+_0x20d7f2['join'](',\x20')+'.\x20Use\x20--profile\x20to\x20specify\x20which\x20one.');}async function installPluginNonInteractive(){const _0x2ebfe5=_0x48b8,_0x2a824f={'lmQSB':'ranger@trailhead','fTVxg':_0x2ebfe5(0x181),'ARjsM':function(_0x3da53d,_0x29e12e){return _0x3da53d(_0x29e12e);},'KkyfL':'plugin','uTZQh':_0x2ebfe5(0x172),'dRzIU':_0x2ebfe5(0x168),'OGZWu':function(_0x47eac9,_0x3941c9){return _0x47eac9(_0x3941c9);},'ThNlq':_0x2ebfe5(0x16d),'DOTSw':'Failed\x20to\x20install\x20plugin:','GRrVt':_0x2ebfe5(0x164)},_0x51f9c1=await isPluginInstalled(_0x2a824f['lmQSB']);if(_0x51f9c1)return console[_0x2ebfe5(0x198)](_0x2a824f[_0x2ebfe5(0x17f)]),![];console['log'](_0x2ebfe5(0x166));const _0x41abda=await _0x2a824f['ARjsM'](isMarketplaceAdded,'trailhead');let _0x29eef1=_0x41abda;if(_0x41abda)console['log']('✓\x20Marketplace\x20already\x20added');else{const _0x3eb48c=await _0x2a824f[_0x2ebfe5(0x199)](runClaudeCommand,[_0x2a824f[_0x2ebfe5(0x1a2)],'marketplace',_0x2a824f[_0x2ebfe5(0x16c)],_0x2a824f['dRzIU']]);!_0x3eb48c['success']?(console['error']('Failed\x20to\x20add\x20marketplace:',_0x3eb48c[_0x2ebfe5(0x18d)]),console['log'](_0x2ebfe5(0x174))):_0x29eef1=!![];}if(_0x29eef1){const _0x41956b=await _0x2a824f['OGZWu'](runClaudeCommand,[_0x2a824f[_0x2ebfe5(0x1a2)],_0x2a824f['ThNlq'],_0x2ebfe5(0x163),'--scope',_0x2ebfe5(0x176)]);!_0x41956b[_0x2ebfe5(0x186)]?(console['error'](_0x2a824f['DOTSw'],_0x41956b['error']),console[_0x2ebfe5(0x198)]('You\x20can\x20install\x20manually:\x20claude\x20plugin\x20install\x20ranger@trailhead\x20--scope\x20project')):console['log'](_0x2a824f['GRrVt']);}return!![];}export async function setupCi(_0xf1be69,_0xeadcf3,_0x3f9355){const _0x7cf792=_0x48b8,_0x3e5770={'MTxvb':function(_0x5f1628,_0x4735f6){return _0x5f1628(_0x4735f6);},'HsKmO':_0x7cf792(0x18c),'TrJbl':function(_0x4caf20){return _0x4caf20();},'xQzBn':function(_0x16de65,_0x345de4,_0x11c07b){return _0x16de65(_0x345de4,_0x11c07b);},'vZXWm':_0x7cf792(0x189),'clJRH':_0x7cf792(0x180),'JLtVP':function(_0x25799b){return _0x25799b();},'pdFwI':function(_0x55fb11,_0x40e2f6,_0x3b1187){return _0x55fb11(_0x40e2f6,_0x3b1187);},'mRSTH':function(_0x122bde,_0x42c1f3,_0x12041f){return _0x122bde(_0x42c1f3,_0x12041f);},'GcGPI':function(_0x56f095,_0x1f32cd){return _0x56f095(_0x1f32cd);},'ndTDq':function(_0xc40ac5,_0x3f4e05,_0x5986b9){return _0xc40ac5(_0x3f4e05,_0x5986b9);},'ApoCl':function(_0x488f83,_0x474674){return _0x488f83(_0x474674);},'Qmxxt':_0x7cf792(0x19a),'lcAnp':function(_0x2a218b,_0x4bbedc){return _0x2a218b instanceof _0x4bbedc;},'XCDAS':_0x7cf792(0x169),'AMiCk':'plugin','CnXmE':function(_0x3fdf95){return _0x3fdf95();},'QmEqH':'skills'};console['log'](_0x7cf792(0x18a)),_0x3f9355?.['trackPhaseStart'](_0x7cf792(0x18c)),await _0x3e5770[_0x7cf792(0x16a)](authenticate,_0xf1be69),_0x3f9355?.[_0x7cf792(0x184)](_0x3e5770[_0x7cf792(0x16f)]),_0x3f9355?.[_0x7cf792(0x17e)](_0x7cf792(0x19b));const {path:_0x23b517,installed:_0x29939a}=await _0x3e5770[_0x7cf792(0x187)](ensureRangerDir);await _0x3e5770['MTxvb'](writeRangerGitignore,_0x23b517);const _0x35d6e8=join(_0x23b517,'sessions');!existsSync(_0x35d6e8)&&await _0x3e5770[_0x7cf792(0x192)](mkdir,_0x35d6e8,{'recursive':!![]});_0x3f9355?.[_0x7cf792(0x184)](_0x7cf792(0x19b),{'installed':_0x29939a}),_0x3f9355?.[_0x7cf792(0x17e)](_0x3e5770['vZXWm']);let _0x5db799=![];_0xeadcf3?.[_0x7cf792(0x165)]?console['log'](_0x3e5770['clJRH']):_0x5db799=await _0x3e5770[_0x7cf792(0x1a3)](ensureChromium);_0x3f9355?.['trackPhaseEnd'](_0x3e5770['vZXWm'],{'installed':_0x5db799,'skipped':!!_0xeadcf3?.[_0x7cf792(0x165)]}),_0x3f9355?.['trackPhaseStart']('profile_activate');const _0x41be97=await findCiProfile(_0xeadcf3?.[_0x7cf792(0x17b)]);let _0x42d625=![];_0xeadcf3?.[_0x7cf792(0x17c)]&&(await _0x3e5770['pdFwI'](mkdir,_0x41be97['path'],{'recursive':!![]}),await saveSettings(_0x41be97[_0x7cf792(0x171)],{'baseUrl':_0xeadcf3['baseUrl'],'headless':!![]}),console[_0x7cf792(0x198)]('✓\x20Created\x20profile\x20settings:\x20baseUrl='+_0xeadcf3['baseUrl']),_0x42d625=!![]);const _0x237747=_0x3e5770['mRSTH'](join,_0x41be97['path'],_0x7cf792(0x179));if(!_0x3e5770['GcGPI'](existsSync,_0x237747)&&!_0x42d625)throw new Error(_0x7cf792(0x194)+_0x41be97['name']+'\x22\x20has\x20no\x20settings.json.\x20Use\x20--base-url\x20to\x20configure\x20it.');const _0x227e59=_0x3e5770[_0x7cf792(0x1a1)](join,_0x41be97['path'],_0x7cf792(0x185)),_0x539ec1=_0x3e5770['ndTDq'](join,_0x41be97['path'],'auth.json.enc'),_0x504a8a=existsSync(_0x227e59),_0x3de929=_0x3e5770['GcGPI'](existsSync,_0x539ec1);if(_0x3de929)try{const _0x5ed41f=await getToken();if(!_0x5ed41f)throw new Error(_0x7cf792(0x19f));const _0x14d17a=await _0x3e5770[_0x7cf792(0x183)](readFile,_0x539ec1);_0x3e5770[_0x7cf792(0x19d)](decrypt,_0x14d17a,_0x5ed41f),console[_0x7cf792(0x198)](_0x3e5770[_0x7cf792(0x197)]);}catch(_0x50bbfd){const _0x2f007f=_0x3e5770['lcAnp'](_0x50bbfd,Error)?_0x50bbfd[_0x7cf792(0x19e)]:String(_0x50bbfd);throw new Error('Failed\x20to\x20verify\x20encrypted\x20auth\x20for\x20profile\x20\x22'+_0x41be97[_0x7cf792(0x171)]+'\x22:\x20'+_0x2f007f);}else _0x504a8a?console['log'](_0x7cf792(0x18e)):console[_0x7cf792(0x198)](_0x7cf792(0x16e));await writeActiveProfileName(_0x41be97[_0x7cf792(0x171)]),console[_0x7cf792(0x198)]('✓\x20Active\x20profile:\x20'+_0x41be97['name']),_0x3f9355?.[_0x7cf792(0x184)](_0x3e5770[_0x7cf792(0x188)],{'profileName':_0x41be97[_0x7cf792(0x171)],'hasAuth':_0x504a8a,'hasEncryptedAuth':_0x3de929,'createdSettings':_0x42d625}),_0x3f9355?.[_0x7cf792(0x17e)](_0x3e5770[_0x7cf792(0x193)]);const _0xb1783f=await _0x3e5770[_0x7cf792(0x17d)](installPluginNonInteractive);_0x3f9355?.[_0x7cf792(0x184)](_0x7cf792(0x175),{'installed':_0xb1783f}),_0x3f9355?.[_0x7cf792(0x17e)](_0x3e5770[_0x7cf792(0x167)]),await skillup({'autoInstall':_0x7cf792(0x176)}),_0x3f9355?.['trackPhaseEnd']('skills'),console[_0x7cf792(0x198)]('\x0a✅\x20Ranger\x20CI\x20setup\x20complete!\x0a');}
1
+ (function(_0x423bdf,_0x43c28d){const _0x24a6cb=_0x28c8,_0x29025d=_0x423bdf();while(!![]){try{const _0x52fc9d=-parseInt(_0x24a6cb(0x1df))/0x1+parseInt(_0x24a6cb(0x1e2))/0x2+-parseInt(_0x24a6cb(0x204))/0x3+parseInt(_0x24a6cb(0x20d))/0x4*(parseInt(_0x24a6cb(0x1fe))/0x5)+parseInt(_0x24a6cb(0x214))/0x6*(-parseInt(_0x24a6cb(0x206))/0x7)+-parseInt(_0x24a6cb(0x1ee))/0x8*(-parseInt(_0x24a6cb(0x207))/0x9)+parseInt(_0x24a6cb(0x200))/0xa*(parseInt(_0x24a6cb(0x202))/0xb);if(_0x52fc9d===_0x43c28d)break;else _0x29025d['push'](_0x29025d['shift']());}catch(_0x251d31){_0x29025d['push'](_0x29025d['shift']());}}}(_0xb39e,0x767e9));import{mkdir,readFile,readdir}from'fs/promises';import{join}from'path';import{existsSync}from'fs';import{authenticate,ensureRangerDir,ensureChromium,writeRangerGitignore}from'./start.js';import{skillup}from'./skillup.js';import{getRangerDir}from'./utils/rangerRoot.js';import{writeActiveProfileName}from'./utils/activeProfile.js';function _0x28c8(_0x50c0a5,_0x1f594d){_0x50c0a5=_0x50c0a5-0x1dd;const _0xb39e73=_0xb39e();let _0x28c86b=_0xb39e73[_0x50c0a5];return _0x28c86b;}import{saveSettings}from'./utils/settings.js';import{decrypt}from'./utils/crypto.js';import{getToken}from'./utils/keychain.js';import{runClaudeCommand,isMarketplaceAdded,isPluginInstalled}from'./utils/claudePlugin.js';function _0xb39e(){const _0x4e4d15=['Auto-detected\x20CI\x20profile:\x20','--scope','plugin','FlfwN','364266nOKKrk','baseUrl','ranger@trailhead','535500DlKlAh','ItKln','jLJSw','MWuPC','lXeqM','skills','rxaho','trailhead','YpcIC','chromium','path','project','28744BNcQJu','Multiple\x20CI\x20profiles\x20found:\x20','JvKkD','CHKxd','Ushxy','isDirectory','whUgf','log','uOHbW','mvPUw','marketplace','RseWK','name','success','✓\x20Claude\x20Code\x20plugin\x20installed','daRQK','443395OudINh','auth.json.enc','30UbWnqS','trackPhaseEnd','3067669ZMsuWO','\x0a✅\x20Ranger\x20CI\x20setup\x20complete!\x0a','2334801YrevGq','vJdwp','290668QrlCjZ','2295cQhdaF','EvIoQ','trackPhaseStart','qDkSP','error','profile_activate','16TkYPJM','vbhUN','No\x20API\x20token\x20available\x20for\x20decryption','✓\x20Active\x20profile:\x20','\x22\x20has\x20no\x20settings.json.\x20Use\x20--base-url\x20to\x20configure\x20it.','dir_setup','WujtH','108RLWmMu','\x20\x20No\x20auth\x20state\x20found\x20(app\x20may\x20not\x20require\x20authentication)','DlSNV','yPhKE'];_0xb39e=function(){return _0x4e4d15;};return _0xb39e();}async function findCiProfile(_0x559a62){const _0x5557ea=_0x28c8,_0x4130e3={'YpcIC':function(_0x5b70a2,_0x536fc3,_0x57e462){return _0x5b70a2(_0x536fc3,_0x57e462);},'Jgcwd':function(_0x20c423,_0x2e82aa){return _0x20c423+_0x2e82aa;},'jLJSw':'Or\x20specify\x20a\x20profile\x20name\x20with\x20--profile\x20and\x20--base-url\x20to\x20create\x20one.','JvKkD':function(_0x238fad,_0x3e385e){return _0x238fad+_0x3e385e;},'CHKxd':function(_0x3705da,_0x24d207){return _0x3705da===_0x24d207;},'qDkSP':function(_0x55b59b,_0x5a854b,_0x2e4874){return _0x55b59b(_0x5a854b,_0x2e4874);}},_0x5bfde5=getRangerDir(),_0x51ebc2=_0x4130e3[_0x5557ea(0x1ea)](join,_0x5bfde5,'ci');if(_0x559a62){const _0x538952=join(_0x51ebc2,_0x559a62);return{'name':_0x559a62,'path':_0x538952};}if(!existsSync(_0x51ebc2))throw new Error(_0x4130e3['Jgcwd']('No\x20CI\x20profiles\x20found.\x20Create\x20one\x20first\x20with:\x20ranger\x20profile\x20add\x20<name>\x20--ci\x0a',_0x4130e3['jLJSw']));const _0x2418f9=await readdir(_0x51ebc2,{'withFileTypes':!![]}),_0x5f15a8=_0x2418f9['filter'](_0x568c38=>_0x568c38[_0x5557ea(0x1f3)]())['map'](_0x50e0c4=>_0x50e0c4['name']);if(_0x5f15a8['length']===0x0)throw new Error(_0x4130e3[_0x5557ea(0x1f0)]('No\x20CI\x20profiles\x20found\x20in\x20.ranger/ci/.\x20Create\x20one\x20first\x20with:\x20ranger\x20profile\x20add\x20<name>\x20--ci\x0a',_0x4130e3[_0x5557ea(0x1e4)]));if(_0x4130e3[_0x5557ea(0x1f1)](_0x5f15a8['length'],0x1)){const _0x8763ef=_0x5f15a8[0x0];return console['log'](_0x5557ea(0x218)+_0x8763ef),{'name':_0x8763ef,'path':_0x4130e3[_0x5557ea(0x20a)](join,_0x51ebc2,_0x8763ef)};}throw new Error(_0x5557ea(0x1ef)+_0x5f15a8['join'](',\x20')+'.\x20Use\x20--profile\x20to\x20specify\x20which\x20one.');}async function installPluginNonInteractive(){const _0x44dcf0=_0x28c8,_0x24c3d4={'yPhKE':function(_0xc14215,_0x581d25){return _0xc14215(_0x581d25);},'UdvPk':_0x44dcf0(0x1e1),'WxwTS':'Installing\x20Claude\x20Code\x20plugin\x20(project\x20level)...','RseWK':'✓\x20Marketplace\x20already\x20added','whUgf':'plugin','lXeqM':_0x44dcf0(0x1f8),'vHmhn':'add','wDSpo':'ranger-testing/trailhead','JcuVc':'You\x20can\x20install\x20manually:\x20claude\x20plugin\x20marketplace\x20add\x20ranger-testing/trailhead','EvIoQ':_0x44dcf0(0x1fc)},_0x13fded=await _0x24c3d4[_0x44dcf0(0x217)](isPluginInstalled,_0x24c3d4['UdvPk']);if(_0x13fded)return console['log']('✓\x20Claude\x20Code\x20plugin\x20already\x20installed'),![];console['log'](_0x24c3d4['WxwTS']);const _0xef23cd=await isMarketplaceAdded(_0x44dcf0(0x1e9));let _0x2e359b=_0xef23cd;if(_0xef23cd)console[_0x44dcf0(0x1f5)](_0x24c3d4[_0x44dcf0(0x1f9)]);else{const _0x595c64=await _0x24c3d4['yPhKE'](runClaudeCommand,[_0x24c3d4[_0x44dcf0(0x1f4)],_0x24c3d4[_0x44dcf0(0x1e6)],_0x24c3d4['vHmhn'],_0x24c3d4['wDSpo']]);!_0x595c64['success']?(console[_0x44dcf0(0x20b)]('Failed\x20to\x20add\x20marketplace:',_0x595c64['error']),console['log'](_0x24c3d4['JcuVc'])):_0x2e359b=!![];}if(_0x2e359b){const _0x52763b=await runClaudeCommand(['plugin','install',_0x24c3d4['UdvPk'],_0x44dcf0(0x219),_0x44dcf0(0x1ed)]);!_0x52763b[_0x44dcf0(0x1fb)]?(console['error']('Failed\x20to\x20install\x20plugin:',_0x52763b[_0x44dcf0(0x20b)]),console['log']('You\x20can\x20install\x20manually:\x20claude\x20plugin\x20install\x20ranger@trailhead\x20--scope\x20project')):console['log'](_0x24c3d4[_0x44dcf0(0x208)]);}return!![];}export async function setupCi(_0x192862,_0x37d602,_0x9de248){const _0x32a7a5=_0x28c8,_0x1c696a={'CxEOT':'auth','UNOtV':function(_0xb001b1,_0x51af4d){return _0xb001b1(_0x51af4d);},'FlfwN':function(_0x56fb6f){return _0x56fb6f();},'daRQK':'sessions','MWuPC':function(_0x2df121,_0xe637fa){return _0x2df121(_0xe637fa);},'ItKln':function(_0x435c26,_0x4a5961,_0x558244){return _0x435c26(_0x4a5961,_0x558244);},'LBqQQ':'dir_setup','SMwET':_0x32a7a5(0x20c),'EKODp':'settings.json','uOHbW':function(_0x380a99,_0x31b274){return _0x380a99(_0x31b274);},'dwBBx':function(_0x3e7f90,_0x39e411,_0x57f608){return _0x3e7f90(_0x39e411,_0x57f608);},'jRjFd':'auth.json','vJdwp':function(_0x482173,_0x25db65,_0xbde687){return _0x482173(_0x25db65,_0xbde687);},'WujtH':_0x32a7a5(0x1ff),'SnJCm':function(_0xbb729d){return _0xbb729d();},'hEPkf':_0x32a7a5(0x20f),'DlSNV':function(_0x417fcb,_0xf2469c){return _0x417fcb(_0xf2469c);},'xGJIr':'✓\x20Encrypted\x20auth\x20verified\x20(will\x20decrypt\x20at\x20runtime)','rxaho':function(_0x43854d,_0x44ae6c){return _0x43854d instanceof _0x44ae6c;},'vbhUN':'✓\x20Auth\x20state\x20found','mvPUw':_0x32a7a5(0x215),'Ushxy':function(_0x5e9765,_0x165b68){return _0x5e9765(_0x165b68);},'WvmqR':function(_0xb616b5){return _0xb616b5();},'CQuWs':'project','QNExO':'skills','qDAfa':_0x32a7a5(0x203)};console['log']('\x0a🔧\x20Ranger\x20CI\x20Setup\x0a'),_0x9de248?.[_0x32a7a5(0x209)](_0x1c696a['CxEOT']),await _0x1c696a['UNOtV'](authenticate,_0x192862),_0x9de248?.[_0x32a7a5(0x201)](_0x1c696a['CxEOT']),_0x9de248?.['trackPhaseStart'](_0x32a7a5(0x212));const {path:_0x228bff,installed:_0x301cec}=await _0x1c696a[_0x32a7a5(0x1de)](ensureRangerDir);await writeRangerGitignore(_0x228bff);const _0x3fc9e9=join(_0x228bff,_0x1c696a[_0x32a7a5(0x1fd)]);!_0x1c696a['MWuPC'](existsSync,_0x3fc9e9)&&await _0x1c696a[_0x32a7a5(0x1e3)](mkdir,_0x3fc9e9,{'recursive':!![]});_0x9de248?.['trackPhaseEnd'](_0x1c696a['LBqQQ'],{'installed':_0x301cec}),_0x9de248?.['trackPhaseStart']('chromium');let _0x3dbf1c=![];_0x37d602?.['skipChromium']?console['log']('✓\x20Skipping\x20Chromium\x20check\x20(--skip-chromium)'):_0x3dbf1c=await ensureChromium();_0x9de248?.[_0x32a7a5(0x201)](_0x32a7a5(0x1eb),{'installed':_0x3dbf1c,'skipped':!!_0x37d602?.['skipChromium']}),_0x9de248?.[_0x32a7a5(0x209)](_0x1c696a['SMwET']);const _0x43a51c=await findCiProfile(_0x37d602?.['profile']);let _0x47cd74=![];_0x37d602?.['baseUrl']&&(await _0x1c696a[_0x32a7a5(0x1e3)](mkdir,_0x43a51c['path'],{'recursive':!![]}),await saveSettings(_0x43a51c[_0x32a7a5(0x1fa)],{'baseUrl':_0x37d602['baseUrl'],'headless':!![]}),console['log']('✓\x20Created\x20profile\x20settings:\x20baseUrl='+_0x37d602[_0x32a7a5(0x1e0)]),_0x47cd74=!![]);const _0x1c426f=_0x1c696a['ItKln'](join,_0x43a51c[_0x32a7a5(0x1ec)],_0x1c696a['EKODp']);if(!_0x1c696a[_0x32a7a5(0x1f6)](existsSync,_0x1c426f)&&!_0x47cd74)throw new Error('CI\x20profile\x20\x22'+_0x43a51c[_0x32a7a5(0x1fa)]+_0x32a7a5(0x211));const _0x1772bd=_0x1c696a['dwBBx'](join,_0x43a51c['path'],_0x1c696a['jRjFd']),_0x28635f=_0x1c696a[_0x32a7a5(0x205)](join,_0x43a51c['path'],_0x1c696a[_0x32a7a5(0x213)]),_0x4b7457=existsSync(_0x1772bd),_0x4e87f6=_0x1c696a[_0x32a7a5(0x1e5)](existsSync,_0x28635f);if(_0x4e87f6)try{const _0x2a5628=await _0x1c696a['SnJCm'](getToken);if(!_0x2a5628)throw new Error(_0x1c696a['hEPkf']);const _0x13ebc7=await _0x1c696a[_0x32a7a5(0x216)](readFile,_0x28635f);decrypt(_0x13ebc7,_0x2a5628),console[_0x32a7a5(0x1f5)](_0x1c696a['xGJIr']);}catch(_0x3e0fd9){const _0x1ea758=_0x1c696a[_0x32a7a5(0x1e8)](_0x3e0fd9,Error)?_0x3e0fd9['message']:String(_0x3e0fd9);throw new Error('Failed\x20to\x20verify\x20encrypted\x20auth\x20for\x20profile\x20\x22'+_0x43a51c['name']+'\x22:\x20'+_0x1ea758);}else _0x4b7457?console['log'](_0x1c696a[_0x32a7a5(0x20e)]):console['log'](_0x1c696a[_0x32a7a5(0x1f7)]);await _0x1c696a[_0x32a7a5(0x1f2)](writeActiveProfileName,_0x43a51c['name']),console[_0x32a7a5(0x1f5)](_0x32a7a5(0x210)+_0x43a51c[_0x32a7a5(0x1fa)]),_0x9de248?.[_0x32a7a5(0x201)](_0x32a7a5(0x20c),{'profileName':_0x43a51c[_0x32a7a5(0x1fa)],'hasAuth':_0x4b7457,'hasEncryptedAuth':_0x4e87f6,'createdSettings':_0x47cd74}),_0x9de248?.[_0x32a7a5(0x209)](_0x32a7a5(0x1dd));const _0x36f52b=await _0x1c696a['WvmqR'](installPluginNonInteractive);_0x9de248?.['trackPhaseEnd'](_0x32a7a5(0x1dd),{'installed':_0x36f52b}),_0x9de248?.['trackPhaseStart'](_0x32a7a5(0x1e7)),await skillup({'autoInstall':_0x1c696a['CQuWs']}),_0x9de248?.['trackPhaseEnd'](_0x1c696a['QNExO']),console['log'](_0x1c696a['qDAfa']);}
@@ -1 +1 @@
1
- function _0xfc37(){const _0x37442c=['To\x20get\x20started:','project','RRgAo','warn','5682870KuaJrz','\x20\x201.\x20Get\x20your\x20API\x20token\x20from\x20https://dashboard.ranger.net/cli','249604sWsaaM','488QEnXRt','split','list','\x20skill','aSmAk','ZroxZ','\x20\x203.\x20Run:\x20ranger\x20skillup\x0a','tGTnC','LhSeT','autoInstall','68841KabsvB','GwOKn','✓\x20Found\x20API\x20token','84LYtCzY','QdGxA','\x0a✅\x20Installed\x20','xBWCl','\x0a🎯\x20Ranger\x20Skill\x20Setup\x0a','9750530JcZjna','254990WpnoAw','aYuyW','Where\x20should\x20skills\x20be\x20installed?','suppressUsage','isTTY','ranger','47266GeLdqi','log','vKHrQ','kXVFA','RIbUX','❌\x20No\x20Ranger\x20API\x20token\x20found.\x0a','1065841FdZslS','55QKjBHv'];_0xfc37=function(){return _0x37442c;};return _0xfc37();}(function(_0xff02ce,_0x2415e2){const _0x55f19c=_0x24f1,_0xec451e=_0xff02ce();while(!![]){try{const _0x3a7192=parseInt(_0x55f19c(0x1d1))/0x1+parseInt(_0x55f19c(0x1d7))/0x2*(parseInt(_0x55f19c(0x1cb))/0x3)+-parseInt(_0x55f19c(0x1e5))/0x4*(parseInt(_0x55f19c(0x1de))/0x5)+-parseInt(_0x55f19c(0x1e3))/0x6+-parseInt(_0x55f19c(0x1dd))/0x7+parseInt(_0x55f19c(0x1e6))/0x8*(parseInt(_0x55f19c(0x1c8))/0x9)+parseInt(_0x55f19c(0x1d0))/0xa;if(_0x3a7192===_0x2415e2)break;else _0xec451e['push'](_0xec451e['shift']());}catch(_0x1c0cb1){_0xec451e['push'](_0xec451e['shift']());}}}(_0xfc37,0x8bc79));import{basename}from'path';import _0x411801 from'inquirer';import{getToken}from'./utils/keychain.js';function _0x24f1(_0x39ecee,_0xd3df6b){_0x39ecee=_0x39ecee-0x1c1;const _0xfc37ee=_0xfc37();let _0x24f1cc=_0xfc37ee[_0x39ecee];return _0x24f1cc;}import{installSkill}from'./utils/skills.js';import{getCurrentVersion}from'./utils/version.js';import{getClaudeConfigDir,getProjectRoot}from'./utils/claudeConfig.js';export async function skillup(_0x5abbe4={}){const _0x2edf33=_0x24f1,_0x3ecbf4={'RIbUX':function(_0x2855ac){return _0x2855ac();},'vKHrQ':'5|4|2|0|1|3','uelYp':'\x20\x202.\x20Run:\x20ranger\x20setup\x20<your-api-token>','QdGxA':_0x2edf33(0x1dc),'ZroxZ':_0x2edf33(0x1ca),'kXVFA':function(_0x5b32bb,_0x542d1c){return _0x5b32bb(_0x542d1c);},'geJsm':_0x2edf33(0x1e8),'tGTnC':_0x2edf33(0x1d3),'LhSeT':'user','aYuyW':function(_0x1c19e2,_0x187704,_0xa42799){return _0x1c19e2(_0x187704,_0xa42799);},'xBWCl':_0x2edf33(0x1d6),'hlJjj':'\x20\x20Failed\x20to\x20install\x20ranger\x20skill:','RRgAo':function(_0x336494,_0x3b76a7){return _0x336494 instanceof _0x3b76a7;},'LGFlj':function(_0xcc29cd,_0x426741){return _0xcc29cd>_0x426741;},'aSmAk':function(_0x55ba86,_0x53dac2){return _0x55ba86>_0x53dac2;},'GwOKn':'\x0a⚠️\x20\x20No\x20skills\x20were\x20installed.\x0a'};console[_0x2edf33(0x1d8)](_0x2edf33(0x1cf));const _0x261905=await _0x3ecbf4[_0x2edf33(0x1db)](getToken);if(!_0x261905){const _0x37e3cb=_0x3ecbf4[_0x2edf33(0x1d9)][_0x2edf33(0x1e7)]('|');let _0x3910e4=0x0;while(!![]){switch(_0x37e3cb[_0x3910e4++]){case'0':console['log'](_0x3ecbf4['uelYp']);continue;case'1':console[_0x2edf33(0x1d8)](_0x2edf33(0x1c4));continue;case'2':console['log'](_0x2edf33(0x1e4));continue;case'3':return;case'4':console['log'](_0x2edf33(0x1df));continue;case'5':console['log'](_0x3ecbf4[_0x2edf33(0x1cc)]);continue;}break;}}console['log'](_0x3ecbf4[_0x2edf33(0x1c3)]);const _0x5bef2c=getProjectRoot(),_0xd6ca49=_0x3ecbf4[_0x2edf33(0x1da)](basename,_0x5bef2c),_0x480e24=process['stdin'][_0x2edf33(0x1d5)]&&process['stdout']['isTTY'];let _0x34b1c0;if(_0x5abbe4['autoInstall'])_0x34b1c0=_0x5abbe4[_0x2edf33(0x1c7)];else{if(_0x480e24){const _0xd1c2bc=await _0x411801['prompt']([{'type':_0x3ecbf4['geJsm'],'name':'installLevel','message':_0x3ecbf4[_0x2edf33(0x1c5)],'choices':[{'name':'All\x20projects\x20('+getClaudeConfigDir()+'/skills/)','value':_0x3ecbf4['LhSeT']},{'name':'This\x20project\x20only\x20('+_0xd6ca49+'/.claude/skills/)','value':_0x2edf33(0x1e0)}]}]);_0x34b1c0=_0xd1c2bc['installLevel'];}else _0x34b1c0=_0x2edf33(0x1e0),console['log']('Non-interactive\x20mode:\x20Installing\x20skills\x20at\x20project\x20level\x20('+_0xd6ca49+'/.claude/skills/)');}let _0xe6fe83=0x0;const _0xd0c508=getCurrentVersion();console['log']('\x0a📦\x20Installing\x20skills...\x0a');try{const _0x3c16e8=await _0x3ecbf4[_0x2edf33(0x1d2)](installSkill,_0x3ecbf4[_0x2edf33(0x1ce)],{'cliVersion':_0xd0c508,'level':_0x34b1c0});_0x3c16e8&&_0xe6fe83++;}catch(_0x6cb015){console[_0x2edf33(0x1e2)](_0x3ecbf4['hlJjj'],_0x3ecbf4[_0x2edf33(0x1e1)](_0x6cb015,Error)?_0x6cb015['message']:_0x6cb015);}if(_0x3ecbf4['LGFlj'](_0xe6fe83,0x0)){const _0x139b13=_0x34b1c0===_0x3ecbf4[_0x2edf33(0x1c6)]?'user-level':'project-level';console[_0x2edf33(0x1d8)](_0x2edf33(0x1cd)+_0xe6fe83+'\x20'+_0x139b13+_0x2edf33(0x1c1)+(_0x3ecbf4[_0x2edf33(0x1c2)](_0xe6fe83,0x1)?'s':'')+'\x20successfully!\x0a'),!_0x5abbe4[_0x2edf33(0x1d4)]&&(console['log']('To\x20use:'),console['log']('\x20\x20-\x20Open\x20Claude\x20Code\x20in\x20plan\x20mode\x20and\x20run\x20/ranger:enable.\x20Plan\x20out\x20a\x20UI\x20feature\x20with\x20Ranger\x20and\x20watch\x20Ranger\x20test\x20it\x20for\x20you!'));}else console['log'](_0x3ecbf4[_0x2edf33(0x1c9)]);}
1
+ (function(_0x179a31,_0x3b09ed){const _0x11ef07=_0x28ad,_0x161c5f=_0x179a31();while(!![]){try{const _0x5cd496=parseInt(_0x11ef07(0x1d2))/0x1*(-parseInt(_0x11ef07(0x1d5))/0x2)+-parseInt(_0x11ef07(0x1ae))/0x3*(-parseInt(_0x11ef07(0x1ce))/0x4)+-parseInt(_0x11ef07(0x1da))/0x5*(-parseInt(_0x11ef07(0x1b8))/0x6)+parseInt(_0x11ef07(0x1ba))/0x7*(parseInt(_0x11ef07(0x1c5))/0x8)+parseInt(_0x11ef07(0x1c4))/0x9+-parseInt(_0x11ef07(0x1cf))/0xa+-parseInt(_0x11ef07(0x1d3))/0xb*(parseInt(_0x11ef07(0x1cd))/0xc);if(_0x5cd496===_0x3b09ed)break;else _0x161c5f['push'](_0x161c5f['shift']());}catch(_0x5d2d73){_0x161c5f['push'](_0x161c5f['shift']());}}}(_0x279d,0x4fac3));import{basename}from'path';function _0x279d(){const _0x801342=['61448zMQLRT','5811090QHgpjJ','icJui','\x20\x20-\x20Start\x20OpenCode\x20and\x20run\x20the\x20`ranger_enable`\x20tool\x20to\x20enable\x20hooks.','7NbcXxq','97625xqRAJo','claude','54826TumTNq','CyLYv','project','/.claude/skills/','PEvWj','2015600agZepX','autoInstall','suppressUsage','6VIhYde','eTAFa','\x20\x202.\x20Run:\x20ranger\x20setup','installLevel','KENZR','user','\x0a✅\x20Installed\x20','log','/skills/','\x20successfully!\x0a','6LTBFyd','stdin','61565IxPvuw','\x20--opencode','\x0a📦\x20Installing\x20skills...\x0a','❌\x20No\x20Ranger\x20API\x20token\x20found.\x0a','prompt','platform','list','opencode','This\x20project\x20only\x20(','\x20\x201.\x20Get\x20your\x20API\x20token\x20from\x20https://dashboard.ranger.net/cli','370170MAAfHM','576nMBXiY','HRPSa','Lqcon','tVQRs','To\x20use:','VCSKA','EUvPq','ZMdCc','12AoPBnr'];_0x279d=function(){return _0x801342;};return _0x279d();}import _0x45280c from'inquirer';function _0x28ad(_0x325236,_0x4c9f87){_0x325236=_0x325236-0x1ac;const _0x279d8e=_0x279d();let _0x28ad39=_0x279d8e[_0x325236];return _0x28ad39;}import{getToken}from'./utils/keychain.js';import{installSkill}from'./utils/skills.js';import{getCurrentVersion}from'./utils/version.js';import{getClaudeConfigDir,getProjectRoot}from'./utils/claudeConfig.js';import{getOpencodeConfigDir}from'./utils/opencodeConfig.js';export async function skillup(_0x21542e={}){const _0x54c4f2=_0x28ad,_0x9bc87f={'yyyJz':'\x0a🎯\x20Ranger\x20Skill\x20Setup\x0a','kOHuF':_0x54c4f2(0x1d4),'pDqOq':function(_0x52ee91){return _0x52ee91();},'hNDep':'5|0|1|3|4|2','NodNq':'To\x20get\x20started:','HzZnw':_0x54c4f2(0x1c3),'ZMdCc':_0x54c4f2(0x1bd),'vXUkz':'✓\x20Found\x20API\x20token','Lqcon':function(_0x11eda7,_0x521f2d){return _0x11eda7===_0x521f2d;},'XgKKa':'opencode','KENZR':function(_0x4ed86b,_0xfad7a){return _0x4ed86b(_0xfad7a);},'PEvWj':function(_0x3d7627,_0x36bc85){return _0x3d7627===_0x36bc85;},'MjmIA':_0x54c4f2(0x1c0),'eTAFa':_0x54c4f2(0x1b1),'ZZjft':'ranger','tVQRs':'\x20\x20Failed\x20to\x20install\x20ranger\x20skill:','CyLYv':function(_0x4eed0a,_0x2705b1){return _0x4eed0a instanceof _0x2705b1;},'EUvPq':function(_0x193a17,_0x526133){return _0x193a17>_0x526133;},'HRPSa':function(_0x501050,_0x16a604){return _0x501050===_0x16a604;},'icJui':'user-level','MBLLZ':_0x54c4f2(0x1c9),'VCSKA':'\x20\x20-\x20Open\x20Claude\x20Code\x20in\x20plan\x20mode\x20and\x20run\x20/ranger:enable.\x20Plan\x20out\x20a\x20UI\x20feature\x20with\x20Ranger\x20and\x20watch\x20Ranger\x20test\x20it\x20for\x20you!'};console['log'](_0x9bc87f['yyyJz']);const _0x54a835=_0x21542e[_0x54c4f2(0x1bf)]??_0x9bc87f['kOHuF'],_0x228d9e=await _0x9bc87f['pDqOq'](getToken);if(!_0x228d9e){const _0x31e8e6=_0x9bc87f['hNDep']['split']('|');let _0x46b780=0x0;while(!![]){switch(_0x31e8e6[_0x46b780++]){case'0':console[_0x54c4f2(0x1b5)](_0x9bc87f['NodNq']);continue;case'1':console[_0x54c4f2(0x1b5)](_0x9bc87f['HzZnw']);continue;case'2':return;case'3':console['log'](_0x54c4f2(0x1b0)+(_0x54a835==='opencode'?_0x54c4f2(0x1bb):'')+'\x20<your-api-token>');continue;case'4':console['log']('\x20\x203.\x20Run:\x20ranger\x20skillup'+(_0x54a835===_0x54c4f2(0x1c1)?'\x20--opencode':'')+'\x0a');continue;case'5':console[_0x54c4f2(0x1b5)](_0x9bc87f[_0x54c4f2(0x1cc)]);continue;}break;}}console[_0x54c4f2(0x1b5)](_0x9bc87f['vXUkz']);const _0x1d33ea=getProjectRoot(),_0x27d802=basename(_0x1d33ea),_0x330c0b=_0x9bc87f[_0x54c4f2(0x1c7)](_0x54a835,_0x9bc87f['XgKKa'])?_0x9bc87f[_0x54c4f2(0x1b2)](getOpencodeConfigDir,'user')+'/skills/':getClaudeConfigDir()+_0x54c4f2(0x1b6),_0x57e322=_0x9bc87f[_0x54c4f2(0x1d9)](_0x54a835,_0x9bc87f['XgKKa'])?_0x1d33ea+'/.opencode/skills/':_0x1d33ea+_0x54c4f2(0x1d8),_0x136249=process[_0x54c4f2(0x1b9)]['isTTY']&&process['stdout']['isTTY'];let _0x2b72d3;if(_0x21542e[_0x54c4f2(0x1ac)])_0x2b72d3=_0x21542e[_0x54c4f2(0x1ac)];else{if(_0x136249){const _0x35f214=await _0x45280c[_0x54c4f2(0x1be)]([{'type':_0x9bc87f['MjmIA'],'name':_0x9bc87f[_0x54c4f2(0x1af)],'message':'Where\x20should\x20skills\x20be\x20installed?','choices':[{'name':'All\x20projects\x20('+_0x330c0b+')','value':_0x54c4f2(0x1b3)},{'name':_0x54c4f2(0x1c2)+_0x57e322+')','value':_0x54c4f2(0x1d7)}]}]);_0x2b72d3=_0x35f214['installLevel'];}else _0x2b72d3='project',console['log']('Non-interactive\x20mode:\x20Installing\x20skills\x20at\x20project\x20level\x20('+_0x57e322+')');}let _0x46c5ff=0x0;const _0x2b9636=_0x9bc87f['pDqOq'](getCurrentVersion);console['log'](_0x54c4f2(0x1bc));try{const _0x20a917=await installSkill(_0x9bc87f['ZZjft'],{'cliVersion':_0x2b9636,'level':_0x2b72d3,'platform':_0x54a835});_0x20a917&&_0x46c5ff++;}catch(_0x507c23){console['warn'](_0x9bc87f[_0x54c4f2(0x1c8)],_0x9bc87f[_0x54c4f2(0x1d6)](_0x507c23,Error)?_0x507c23['message']:_0x507c23);}if(_0x9bc87f[_0x54c4f2(0x1cb)](_0x46c5ff,0x0)){const _0x2fc47e=_0x9bc87f[_0x54c4f2(0x1c6)](_0x2b72d3,_0x54c4f2(0x1b3))?_0x9bc87f[_0x54c4f2(0x1d0)]:'project-level';console['log'](_0x54c4f2(0x1b4)+_0x46c5ff+'\x20'+_0x2fc47e+'\x20skill'+(_0x46c5ff>0x1?'s':'')+_0x54c4f2(0x1b7)),!_0x21542e[_0x54c4f2(0x1ad)]&&(console[_0x54c4f2(0x1b5)](_0x9bc87f['MBLLZ']),_0x54a835===_0x9bc87f['XgKKa']?console[_0x54c4f2(0x1b5)](_0x54c4f2(0x1d1)):console['log'](_0x9bc87f[_0x54c4f2(0x1ca)]));}else console[_0x54c4f2(0x1b5)]('\x0a⚠️\x20\x20No\x20skills\x20were\x20installed.\x0a');}
@@ -1 +1 @@
1
- const _0xd2d2b0=_0x2f8c;(function(_0x262c7d,_0x8da2cb){const _0x3723c9=_0x2f8c,_0x338312=_0x262c7d();while(!![]){try{const _0x565b9b=parseInt(_0x3723c9(0x13f))/0x1*(parseInt(_0x3723c9(0x12c))/0x2)+-parseInt(_0x3723c9(0x15d))/0x3*(-parseInt(_0x3723c9(0xf7))/0x4)+-parseInt(_0x3723c9(0x161))/0x5*(parseInt(_0x3723c9(0x11a))/0x6)+-parseInt(_0x3723c9(0xf0))/0x7+parseInt(_0x3723c9(0xeb))/0x8*(-parseInt(_0x3723c9(0xf8))/0x9)+-parseInt(_0x3723c9(0x133))/0xa+-parseInt(_0x3723c9(0x11c))/0xb*(-parseInt(_0x3723c9(0x13d))/0xc);if(_0x565b9b===_0x8da2cb)break;else _0x338312['push'](_0x338312['shift']());}catch(_0x4c2f44){_0x338312['push'](_0x338312['shift']());}}}(_0x2268,0xd3179));import{mkdir,writeFile}from'fs/promises';function _0x2f8c(_0x4b2580,_0x4455da){_0x4b2580=_0x4b2580-0xe7;const _0x226855=_0x2268();let _0x2f8c1f=_0x226855[_0x4b2580];return _0x2f8c1f;}import{join}from'path';import{existsSync}from'fs';import{createRequire}from'module';import{spawn}from'child_process';import _0xa84b39 from'inquirer';import{getToken,storeToken}from'./utils/keychain.js';import{getCurrentUser}from'./utils/userApi.js';import{chromium}from'playwright';import{addEnv}from'./addEnv.js';import{skillup}from'./skillup.js';import{getRangerDir,findGitRoot}from'./utils/rangerRoot.js';import{runClaudeCommand,isMarketplaceAdded,isPluginInstalled}from'./utils/claudePlugin.js';import{getProjectRoot,getSkillsDir}from'./utils/claudeConfig.js';import{runDeviceAuthFlow}from'./utils/deviceAuth.js';import{findExistingEnv}from'./utils/settings.js';const require=createRequire(import.meta.url),bold=_0xb4ae64=>_0xd2d2b0(0xff)+_0xb4ae64+_0xd2d2b0(0x162);function getPlaywrightVersion(){const _0x4c091e=_0xd2d2b0;try{const _0x5efdf4=require['resolve']('playwright/package.json'),_0x355cce=require(_0x5efdf4);return _0x355cce[_0x4c091e(0x131)];}catch{return null;}}function installChromiumBinary(_0x11735c){const _0x305d9d=_0xd2d2b0,_0x5a041d={'BUTFm':_0x305d9d(0x121),'RhHgg':'playwright','UobsO':function(_0x425926,_0x2283a8,_0x493d56,_0xecdd21){return _0x425926(_0x2283a8,_0x493d56,_0xecdd21);},'IxMSp':'error'};return new Promise((_0x232325,_0x4a0880)=>{const _0x1307a7=_0x305d9d,_0xd5fe42=_0x11735c?['playwright@'+_0x11735c,_0x1307a7(0xe7),_0x5a041d['BUTFm']]:[_0x5a041d[_0x1307a7(0x144)],'install',_0x1307a7(0x121)],_0x521336=_0x5a041d['UobsO'](spawn,'npx',_0xd5fe42,{'stdio':_0x1307a7(0x16b),'shell':process['platform']===_0x1307a7(0x14c)});_0x521336['on'](_0x1307a7(0x11f),_0x45a87f=>{const _0x44bb08=_0x1307a7;_0x45a87f===0x0?_0x232325():_0x4a0880(new Error(_0x44bb08(0x101)+_0x45a87f));}),_0x521336['on'](_0x5a041d['IxMSp'],_0x12ec7e=>{_0x4a0880(_0x12ec7e);});});}export async function authenticate(_0xf79db8){const _0x55770e=_0xd2d2b0,_0xcc1dbe={'tIyZc':function(_0x27d9ae){return _0x27d9ae();},'WniLM':_0x55770e(0x117),'dTkTZ':function(_0x413629){return _0x413629();},'fPeIU':function(_0x5d3a0b,_0xdc57e){return _0x5d3a0b instanceof _0xdc57e;},'xIjew':'✓\x20Exported\x20credentials\x20for\x20CI','uTvwt':_0x55770e(0x15a)};if(!_0xf79db8){const _0x17d1f7=await _0xcc1dbe['tIyZc'](getToken);if(_0x17d1f7){const _0x5c16c1=await getCurrentUser(_0x17d1f7);if(_0x5c16c1[_0x55770e(0x129)])return console[_0x55770e(0x147)]('✓\x20Already\x20authenticated\x20to\x20'+_0x5c16c1[_0x55770e(0x139)][_0x55770e(0xef)]),{'token':_0x17d1f7,'method':_0xcc1dbe['WniLM']};}try{_0xf79db8=await _0xcc1dbe['dTkTZ'](runDeviceAuthFlow);}catch(_0x160560){throw new Error('Authentication\x20failed:\x20'+(_0xcc1dbe[_0x55770e(0x10e)](_0x160560,Error)?_0x160560[_0x55770e(0x15b)]:_0x160560));}const _0x40b5c6=await getCurrentUser(_0xf79db8);if(!_0x40b5c6['success'])throw new Error('Failed\x20to\x20validate\x20provisioned\x20API\x20key:\x20'+_0x40b5c6['error']);return console['log']('✓\x20Authenticated\x20to\x20'+_0x40b5c6[_0x55770e(0x139)]['organizationName']),{'token':_0xf79db8,'method':_0x55770e(0x15e)};}console['log'](_0x55770e(0x12b));const _0x3db898=await getCurrentUser(_0xf79db8);if(!_0x3db898['success']){if(_0x3db898['status'])throw new Error(_0x55770e(0x138)+_0x3db898['error']+'.\x20Please\x20check\x20your\x20API\x20token\x20and\x20try\x20again.');else throw new Error('Failed\x20to\x20connect\x20to\x20MCP\x20server:\x20'+_0x3db898['error']+'.\x20Please\x20check\x20your\x20network\x20connection\x20and\x20server\x20URL.');}return console[_0x55770e(0x147)](_0x55770e(0x112)+_0x3db898[_0x55770e(0x139)]['organizationName']),await storeToken(_0xf79db8),console[_0x55770e(0x147)](process['env']['GITHUB_ENV']?_0xcc1dbe[_0x55770e(0x149)]:_0xcc1dbe['uTvwt']),{'token':_0xf79db8,'method':_0x55770e(0x130)};}export async function ensureRangerDir(){const _0x30569c=_0xd2d2b0,_0x1992a7={'TtPNR':function(_0x56af34){return _0x56af34();},'bzUYt':function(_0x568210,_0x16dc75,_0x3f4f97){return _0x568210(_0x16dc75,_0x3f4f97);}},_0x87dc64=_0x1992a7['TtPNR'](getRangerDir);return!existsSync(_0x87dc64)?(await _0x1992a7['bzUYt'](mkdir,_0x87dc64,{'recursive':!![]}),console[_0x30569c(0x147)]('✓\x20Created\x20.ranger/\x20directory'),{'path':_0x87dc64,'installed':!![]}):(console[_0x30569c(0x147)]('✓\x20.ranger/\x20directory\x20already\x20exists'),{'path':_0x87dc64,'installed':![]});}export async function ensureChromium(){const _0x49fae8=_0xd2d2b0,_0x49283b={'DerdL':function(_0x53f6f9,_0x505b32){return _0x53f6f9(_0x505b32);},'TzsQw':function(_0x31d0cd){return _0x31d0cd();},'aLGab':_0x49fae8(0x10d),'SOUEu':'The\x20required\x20Playwright\x20Chromium\x20browser\x20is\x20not\x20installed.\x20Install\x20it\x20now?','ltUyG':'\x0aInstalling\x20Chromium\x20browser...\x0a','rYzJX':_0x49fae8(0x111),'BBfoz':function(_0x46e976,_0x57a781){return _0x46e976 instanceof _0x57a781;},'xcvfC':'You\x20can\x20install\x20it\x20manually\x20by\x20running:','yTLQM':'You\x20will\x20need\x20to\x20install\x20it\x20before\x20using\x20Ranger:'};let _0x1042a8=![];try{const _0x567aef=chromium[_0x49fae8(0xe9)]();_0x1042a8=_0x49283b[_0x49fae8(0x106)](existsSync,_0x567aef);}catch{_0x1042a8=![];}if(_0x1042a8)return console[_0x49fae8(0x147)](_0x49fae8(0x12f)),![];const _0x29408d=_0x49283b['TzsQw'](getPlaywrightVersion),_0x4cc3d4=process['stdin']['isTTY']&&process[_0x49fae8(0x123)]['isTTY'];let _0x309439=!![];if(_0x4cc3d4){const {install:_0x50cb63}=await _0xa84b39[_0x49fae8(0x100)]([{'type':_0x49283b['aLGab'],'name':'install','message':_0x29408d?_0x49fae8(0x122)+_0x29408d+_0x49fae8(0x158):_0x49283b['SOUEu'],'default':!![]}]);_0x309439=_0x50cb63;}else console[_0x49fae8(0x147)](_0x49fae8(0x119)+(_0x29408d?'\x20'+_0x29408d:'')+_0x49fae8(0x15f));if(_0x309439){console['log'](_0x49283b['ltUyG']);try{await installChromiumBinary(_0x29408d),console['log'](_0x49283b[_0x49fae8(0x107)]);}catch(_0x55500f){console['error']('\x0a❌\x20Failed\x20to\x20install\x20Chromium:',_0x49283b['BBfoz'](_0x55500f,Error)?_0x55500f[_0x49fae8(0x15b)]:_0x55500f),console[_0x49fae8(0x147)](_0x49283b[_0x49fae8(0x16a)]),_0x29408d?console[_0x49fae8(0x147)]('\x20\x20npx\x20playwright@'+_0x29408d+_0x49fae8(0x10b)):console[_0x49fae8(0x147)]('\x20\x20npx\x20playwright\x20install\x20chromium');}}else console[_0x49fae8(0x147)]('\x0a⚠\x20Skipping\x20Chromium\x20installation.'),console[_0x49fae8(0x147)](_0x49283b['yTLQM']),_0x29408d?console['log'](_0x49fae8(0x115)+_0x29408d+'\x20install\x20chromium'):console['log']('\x20\x20npx\x20playwright\x20install\x20chromium');return!![];}export async function writeRangerGitignore(_0x8887c){const _0x5cde13=_0xd2d2b0,_0x7f1c10={'fQnDK':function(_0x42070d,_0x5ed52a,_0x2a6df1){return _0x42070d(_0x5ed52a,_0x2a6df1);},'RTpux':_0x5cde13(0x109),'XWYMI':_0x5cde13(0x153)},_0x279bc5=_0x7f1c10['fQnDK'](join,_0x8887c,_0x7f1c10['RTpux']),_0x5a7445='\x0a\x0a#\x20Ignore\x20local-only\x20directories\x0alocal/\x0asessions/\x0abug-bashes/\x0areports/\x0afeedback-images/\x0a\x0aactive-profile.txt\x0aactive-feature.txt\x0a.gitignore\x0a\x0a#\x20Ignore\x20plaintext\x20auth\x20files\x20(encrypted\x20.enc\x20files\x20are\x20safe\x20to\x20commit)\x0a**/auth.json\x0a';await writeFile(_0x279bc5,_0x5a7445),console[_0x5cde13(0x147)](_0x7f1c10[_0x5cde13(0x118)]);}async function ensurePlugin(_0x390661){const _0x4cb554=_0xd2d2b0,_0x5612f3={'WVlsY':function(_0x496396,_0xd14f9d){return _0x496396(_0xd14f9d);},'PSFrc':'✓\x20Claude\x20Code\x20plugin\x20already\x20installed','YINTu':function(_0x5a015d,_0x1411d7,_0x52604f){return _0x5a015d(_0x1411d7,_0x52604f);},'ZeeuY':function(_0x405cc9){return _0x405cc9();},'evoQg':'\x0a📦\x20Claude\x20Code\x20Plugin\x0a','QlzAX':'list','sPnAV':'Where\x20should\x20the\x20plugin\x20be\x20installed?','haUyq':'User\x20(available\x20in\x20all\x20your\x20projects)','PZgvx':_0x4cb554(0x139),'daQpe':_0x4cb554(0xf5),'wqqpT':_0x4cb554(0xf2),'ozQHj':function(_0x2fb005,_0x1561c2){return _0x2fb005(_0x1561c2);},'RoCIz':'marketplace','UoIfK':'add','uXqyq':'❌\x20Failed\x20to\x20add\x20marketplace:','xEzMr':_0x4cb554(0xe7),'bSKgf':'ranger@trailhead','JxLrs':'--scope','FuRks':'❌\x20Failed\x20to\x20install\x20plugin:','DPDXz':_0x4cb554(0x143),'SQiqP':'enable','HUHrv':function(_0x572de7,_0x3184a9){return _0x572de7===_0x3184a9;},'GqAhE':function(_0x19a171,_0x23bd7f,_0x35f659){return _0x19a171(_0x23bd7f,_0x35f659);},'KKXtc':_0x4cb554(0x163)},_0x247a46=await _0x5612f3[_0x4cb554(0x135)](isPluginInstalled,_0x4cb554(0x167));if(_0x247a46)return console['log'](_0x5612f3[_0x4cb554(0xed)]),![];const _0x11d457=existsSync(_0x5612f3[_0x4cb554(0x10a)](join,_0x5612f3['ZeeuY'](getProjectRoot),'.claude'));let _0x544084;if(_0x390661)_0x544084=_0x390661;else{if(_0x11d457)_0x544084=_0x4cb554(0x159);else{console['log'](_0x5612f3['evoQg']);const _0x243a1c=await _0xa84b39[_0x4cb554(0x100)]([{'type':_0x5612f3['QlzAX'],'name':_0x4cb554(0x126),'message':_0x5612f3[_0x4cb554(0x14a)],'choices':[{'name':_0x5612f3['haUyq'],'value':_0x5612f3['PZgvx']},{'name':_0x5612f3[_0x4cb554(0x155)],'value':'project'}],'default':_0x5612f3[_0x4cb554(0xf6)]}]);_0x544084=_0x243a1c[_0x4cb554(0x126)];}}console[_0x4cb554(0x147)](_0x4cb554(0x11d)+_0x544084+_0x4cb554(0x169));const _0x2e59e3=await _0x5612f3[_0x4cb554(0x135)](isMarketplaceAdded,_0x4cb554(0x11b));let _0x23fb6b=_0x2e59e3;if(_0x2e59e3)console['log'](_0x5612f3[_0x4cb554(0x157)]);else{const _0x3b3cef=await _0x5612f3[_0x4cb554(0x156)](runClaudeCommand,['plugin',_0x5612f3[_0x4cb554(0x142)],_0x5612f3['UoIfK'],'ranger-testing/trailhead']);!_0x3b3cef['success']?(console['error'](_0x5612f3['uXqyq'],_0x3b3cef[_0x4cb554(0x12e)]),console[_0x4cb554(0x147)](_0x4cb554(0x166)),console['log']('\x20\x20claude\x20plugin\x20marketplace\x20add\x20ranger-testing/trailhead'),console['log']('\x20\x20claude\x20plugin\x20install\x20ranger@trailhead\x20--scope\x20'+_0x544084)):_0x23fb6b=!![];}if(_0x23fb6b){const _0x2d7a26=await runClaudeCommand([_0x4cb554(0x13c),_0x5612f3[_0x4cb554(0xee)],_0x5612f3[_0x4cb554(0x14d)],_0x5612f3[_0x4cb554(0x127)],_0x544084]);if(!_0x2d7a26[_0x4cb554(0x129)])console['error'](_0x5612f3['FuRks'],_0x2d7a26[_0x4cb554(0x12e)]),console[_0x4cb554(0x147)](_0x4cb554(0x166)),console['log']('\x20\x20claude\x20plugin\x20install\x20ranger@trailhead\x20--scope\x20'+_0x544084);else{console['log'](_0x5612f3['DPDXz']);const _0x17aeb4=['plugin',_0x5612f3[_0x4cb554(0x14f)],_0x5612f3[_0x4cb554(0x14d)]];_0x5612f3['HUHrv'](_0x544084,_0x4cb554(0x159))&&_0x17aeb4[_0x4cb554(0x128)](_0x5612f3['JxLrs'],_0x4cb554(0x159));const _0x4f612f=await _0x5612f3[_0x4cb554(0x145)](runClaudeCommand,_0x17aeb4,{'captureOutput':!![]});if(!_0x4f612f['success']){const _0x13f87d=_0x4f612f[_0x4cb554(0x151)]?.['includes']('already\x20enabled');!_0x13f87d&&console['error'](_0x4cb554(0xfb),_0x4f612f[_0x4cb554(0x12e)]);}console['log'](_0x5612f3[_0x4cb554(0x150)]);}}return!![];}function printProfileSetupLaterInstructions(){const _0x4ccf60=_0xd2d2b0,_0x346df9={'QDEmZ':function(_0x25520c,_0x1fdff2){return _0x25520c(_0x1fdff2);},'nBkdn':_0x4ccf60(0x154)};console[_0x4ccf60(0x147)]('\x0aIn\x20order\x20for\x20Ranger\x20to\x20verify\x20your\x20work,\x20you\x27ll\x20need\x20to\x20set\x20up\x20a\x20profile\x20later\x20with:'),console['log']('\x20\x20'+_0x346df9['QDEmZ'](bold,_0x4ccf60(0x105))),console[_0x4ccf60(0x147)](_0x346df9[_0x4ccf60(0x165)]);}function _0x2268(){const _0x4d7d70=['72jVUqPH','DUorr','1jVwYzC','git_check','GgDhk','RoCIz','✓\x20Claude\x20Code\x20plugin\x20installed\x20successfully','RhHgg','GqAhE','\x20and\x20prompt\x20the\x20coding','log','trackPhaseStart','xIjew','sPnAV','\x0ascenarios\x20describing\x20what\x20to\x20verify\x20and\x20then\x20run\x20browser','win32','bSKgf','oOzzA','SQiqP','KKXtc','output','Would\x20you\x20like\x20to\x20set\x20up\x20the\x20profile\x20now?','✓\x20Created\x20.ranger/.gitignore','Make\x20sure\x20your\x20app\x20is\x20running\x20before\x20you\x20start.\x0a','daQpe','ozQHj','wqqpT',')\x20of\x20the\x20Playwright\x20Chromium\x20browser\x20is\x20not\x20installed.\x20Install\x20it\x20now?','project','✓\x20Stored\x20credentials\x20locally','message','Non-interactive\x20mode:\x20Skipping\x20profile\x20setup.\x20To\x20set\x20up\x20a\x20profile,\x20pass\x20--url\x20or\x20run\x20later:','47343aPqcZf','device_auth','...','INhXS','1725AXWrSr','\x1b[0m','✓\x20Claude\x20Code\x20plugin\x20enabled','isTTY','nBkdn','\x0aYou\x20can\x20install\x20manually\x20with:','ranger@trailhead','KbkIZ','\x20level)...\x0a','xcvfC','inherit','install','ranger','executablePath','✓\x20Local\x20profile\x20already\x20exists','8jpVKlH','vedfN','PSFrc','xEzMr','organizationName','5105156hTaktq','JkNYN','✓\x20Marketplace\x20already\x20added','fQxQI','trackPhaseEnd','Project\x20(shared\x20with\x20team\x20via\x20git)','PZgvx','84JBVWlv','13336614SnDLAf','VXqcF','igeTG','⚠\x20Failed\x20to\x20enable\x20plugin:','\x0a✅\x20Ranger\x20setup\x20complete!\x0a','Awkzt','GHNeL','\x1b[1m','prompt','Installation\x20failed\x20with\x20exit\x20code\x20','skipped','\x0a❌\x20Profile\x20setup\x20failed:','url','ranger\x20profile\x20add\x20local','DerdL','rYzJX','xXXIG','.gitignore','YINTu','\x20install\x20chromium','force','confirm','fPeIU','jODGx','stdin','\x0a✓\x20Playwright\x20Chromium\x20installed\x20successfully','✓\x20Authenticated\x20to\x20','method','scope','\x20\x20npx\x20playwright@','skills','existing_token','XWYMI','\x0aNon-interactive\x20mode:\x20Auto-installing\x20Playwright\x20Chromium','5532rnXhEO','trailhead','5683326MoQIox','\x0aInstalling\x20Claude\x20Code\x20plugin\x20(','\x0aA\x20profile\x20gives\x20Ranger\x27s\x20browser\x20agent\x20information\x20about\x20how','close','ready','chromium','The\x20required\x20version\x20(','stdout','PeiyA','KAUmi','pluginScope','JxLrs','push','success','PndcZ','Validating\x20API\x20token...','603342OUriFz','auth','error','✓\x20Playwright\x20Chromium\x20browser\x20found','provided_token','version','/ranger:enable','3391910pTWFni','LHcoB','WVlsY','wantsProfile','gXbej','Authentication\x20failed:\x20','user','local','wantsSkillup','plugin'];_0x2268=function(){return _0x4d7d70;};return _0x2268();}async function ensureLocalEnv(_0x22107,_0x29a845){const _0x45a92e=_0xd2d2b0,_0x2e99a0={'ygiJA':function(_0x17d596,_0x37c6e8,_0x210d35){return _0x17d596(_0x37c6e8,_0x210d35);},'KAUmi':_0x45a92e(0x13a),'DUorr':_0x45a92e(0xea),'LhUYh':_0x45a92e(0x11e),'ewCgk':'auth,\x20you\x20can\x20log\x20in\x20and\x20we\x27ll\x20save\x20the\x20session\x20state\x20for\x20Ranger\x20to','UfQFl':'use\x20until\x20the\x20session\x20expires.\x0a','gXbej':'You\x27ll\x20need\x20the\x20app\x20to\x20be\x20running\x20to\x20set\x20up\x20the\x20profile.','LHcoB':_0x45a92e(0x10d),'OdJue':function(_0x8875a6){return _0x8875a6();},'hGDKT':function(_0x5e5451,_0xaee878,_0x1fe523,_0x158040){return _0x5e5451(_0xaee878,_0x1fe523,_0x158040);},'xXXIG':function(_0x45ec53,_0x4715d4){return _0x45ec53 instanceof _0x4715d4;},'GAalD':function(_0x3f364e){return _0x3f364e();}};if(!findGitRoot())return console['log']('⚠\x20No\x20git\x20repository\x20found.\x20Run\x20`ranger\x20profile\x20add\x20local`\x20from\x20your\x20project\x20directory.'),{'ready':![],'skipped':!![]};if(_0x2e99a0['ygiJA'](findExistingEnv,_0x2e99a0[_0x45a92e(0x125)],{'locations':[_0x45a92e(0x13a)]}))return console[_0x45a92e(0x147)](_0x2e99a0[_0x45a92e(0x13e)]),{'ready':!![],'skipped':![]};const _0x1369ec=process[_0x45a92e(0x110)][_0x45a92e(0x164)]&&process['stdout']['isTTY'];if(_0x1369ec&&!_0x22107?.['url']){console[_0x45a92e(0x147)](_0x2e99a0['LhUYh']),console[_0x45a92e(0x147)]('to\x20access\x20your\x20app.\x20If\x20the\x20part\x20of\x20your\x20app\x20you\x20want\x20to\x20test\x20is\x20behind'),console['log'](_0x2e99a0['ewCgk']),console['log'](_0x2e99a0['UfQFl']),console['log'](_0x2e99a0[_0x45a92e(0x137)]);const {wantsProfile:_0x1b8941}=await _0xa84b39[_0x45a92e(0x100)]([{'type':_0x2e99a0[_0x45a92e(0x134)],'name':_0x45a92e(0x136),'message':_0x45a92e(0x152),'default':!![]}]);if(!_0x1b8941)return _0x2e99a0['OdJue'](printProfileSetupLaterInstructions),{'ready':![],'skipped':!![]};}try{return await _0x2e99a0['hGDKT'](addEnv,_0x45a92e(0x13a),{'url':_0x22107?.[_0x45a92e(0x104)],'force':_0x22107?.[_0x45a92e(0x10c)]},_0x29a845),{'ready':!![],'skipped':![]};}catch(_0x94ef7a){return console['error'](_0x45a92e(0x103),_0x2e99a0[_0x45a92e(0x108)](_0x94ef7a,Error)?_0x94ef7a[_0x45a92e(0x15b)]:_0x94ef7a),_0x2e99a0['GAalD'](printProfileSetupLaterInstructions),{'ready':![],'skipped':![]};}}async function ensureSkills(_0x542216){const _0xab6834=_0xd2d2b0,_0x159ed6={'ahvhq':function(_0x31eb2b,_0xaf0042,_0x103b7b,_0x3998ad){return _0x31eb2b(_0xaf0042,_0x103b7b,_0x3998ad);},'jODGx':function(_0x588e7f,_0x2ed99b){return _0x588e7f(_0x2ed99b);},'rZyIE':'user','igeTG':_0xab6834(0xe8),'DdCRy':'SKILL.md','odsLC':function(_0x136550,_0x3d2540,_0x1e3c49,_0x15d5c4){return _0x136550(_0x3d2540,_0x1e3c49,_0x15d5c4);},'INhXS':function(_0x5d6dff,_0x22c64c,_0x30a9c6){return _0x5d6dff(_0x22c64c,_0x30a9c6);},'vedfN':function(_0x3f4623){return _0x3f4623();},'DZVCm':'.claude','GHNeL':'Would\x20you\x20like\x20to\x20install\x20skills?'},_0x36d7d0=existsSync(_0x159ed6['ahvhq'](join,_0x159ed6[_0xab6834(0x10f)](getSkillsDir,_0x159ed6['rZyIE']),_0x159ed6[_0xab6834(0xfa)],_0x159ed6['DdCRy'])),_0x2a1048=_0x159ed6['jODGx'](existsSync,_0x159ed6['odsLC'](join,getSkillsDir(_0xab6834(0x159)),_0xab6834(0xe8),'SKILL.md'));if(_0x36d7d0||_0x2a1048)return console['log']('✓\x20Ranger\x20skills\x20already\x20installed'),![];const _0x2da855=_0x159ed6[_0xab6834(0x10f)](existsSync,_0x159ed6[_0xab6834(0x160)](join,_0x159ed6[_0xab6834(0xec)](getProjectRoot),_0x159ed6['DZVCm']));if(_0x542216)await skillup({'autoInstall':_0x542216,'suppressUsage':!![]});else{if(_0x2da855)await _0x159ed6['jODGx'](skillup,{'autoInstall':'project','suppressUsage':!![]});else{const {wantsSkillup:_0x2ba67f}=await _0xa84b39[_0xab6834(0x100)]([{'type':_0xab6834(0x10d),'name':_0xab6834(0x13b),'message':_0x159ed6[_0xab6834(0xfe)],'default':!![]}]);_0x2ba67f&&await _0x159ed6[_0xab6834(0x10f)](skillup,{'suppressUsage':!![]});}}return!![];}export async function start(_0xbb5371,_0x1abca5,_0x336649){const _0x70990c=_0xd2d2b0,_0x5a9eaf={'wgzFb':_0x70990c(0x140),'fQxQI':function(_0x554b1f,_0x3388b5){return _0x554b1f(_0x3388b5);},'XDiWM':'auth','JkNYN':_0x70990c(0x121),'VXqcF':'✓\x20Skipping\x20Chromium\x20check\x20(--skip-chromium)','dzIXu':function(_0x28fd47,_0x260ca0){return _0x28fd47(_0x260ca0);},'KbkIZ':'plugin','PeiyA':function(_0x2c8d67,_0x41f3a9){return _0x2c8d67(_0x41f3a9);},'Awkzt':'skills','PndcZ':'.ranger','GgDhk':function(_0x5b88c5,_0xee36a3,_0x4a8c70){return _0x5b88c5(_0xee36a3,_0x4a8c70);},'TlTtr':_0x70990c(0x105),'oOzzA':function(_0x1acda0,_0x5f314a){return _0x1acda0+_0x5f314a;},'utXLT':function(_0x2455d9,_0x26e9b4){return _0x2455d9+_0x26e9b4;}};console['log']('\x0a🚀\x20Ranger\x20Setup\x0a');const _0x5be2ae=process['stdin']['isTTY']&&process['stdout'][_0x70990c(0x164)];!_0x5be2ae&&!_0x1abca5?.['scope']&&(console[_0x70990c(0x147)]('Non-interactive\x20mode:\x20No\x20--scope\x20provided,\x20defaulting\x20to\x20user.'),_0x1abca5={..._0x1abca5,'scope':'user'});_0x336649?.['trackPhaseStart'](_0x5a9eaf['wgzFb']);if(!findGitRoot()){await _0x336649?.['trackPhaseError'](_0x70990c(0x140),new Error('No\x20git\x20repository\x20found'));throw new Error('No\x20git\x20repository\x20found.\x20Please\x20run\x20`ranger\x20setup`\x20from\x20inside\x20your\x20project\x20directory.');}_0x336649?.[_0x70990c(0xf4)](_0x70990c(0x140));const _0x2b4c01=!_0x5a9eaf[_0x70990c(0xf3)](existsSync,getRangerDir()),{path:_0x246d4d}=await ensureRangerDir();_0x336649?.[_0x70990c(0x148)](_0x5a9eaf['XDiWM']);const _0x562f4a=await _0x5a9eaf[_0x70990c(0xf3)](authenticate,_0xbb5371);_0x336649?.[_0x70990c(0xf4)](_0x70990c(0x12d),{'isFirstRun':_0x2b4c01,'method':_0x562f4a[_0x70990c(0x113)]}),_0x336649?.[_0x70990c(0x148)](_0x5a9eaf[_0x70990c(0xf1)]);_0x1abca5?.['skipChromium']?console['log'](_0x5a9eaf[_0x70990c(0xf9)]):await ensureChromium();_0x336649?.[_0x70990c(0xf4)](_0x5a9eaf[_0x70990c(0xf1)],{'isFirstRun':_0x2b4c01,'skipped':!!_0x1abca5?.['skipChromium']}),await _0x5a9eaf['dzIXu'](writeRangerGitignore,_0x246d4d),console[_0x70990c(0x147)](_0x70990c(0xfc));const _0x22dcf9=_0x1abca5?.[_0x70990c(0x114)];_0x336649?.[_0x70990c(0x148)](_0x5a9eaf[_0x70990c(0x168)]),await ensurePlugin(_0x22dcf9),_0x336649?.['trackPhaseEnd']('plugin',{'isFirstRun':_0x2b4c01}),_0x336649?.['trackPhaseStart'](_0x70990c(0x116)),await _0x5a9eaf['PeiyA'](ensureSkills,_0x22dcf9),_0x336649?.[_0x70990c(0xf4)](_0x5a9eaf[_0x70990c(0xfd)],{'isFirstRun':_0x2b4c01});const _0x1ffaab=findGitRoot();if(_0x1ffaab){const _0xf805d9=join(_0x1ffaab,_0x5a9eaf[_0x70990c(0x12a)]);!_0x5a9eaf[_0x70990c(0x124)](existsSync,_0xf805d9)&&await _0x5a9eaf[_0x70990c(0x141)](mkdir,_0xf805d9,{'recursive':!![]});}if(!_0x5be2ae&&!_0x1abca5?.['url'])console['log'](_0x70990c(0x15c)),console['log']('\x20\x20'+bold(_0x5a9eaf['TlTtr'])+'\x0a');else{_0x336649?.[_0x70990c(0x148)]('profile');const _0x29561c=await _0x5a9eaf['GgDhk'](ensureLocalEnv,{'url':_0x1abca5?.[_0x70990c(0x104)],'force':_0x1abca5?.['force']},_0x336649);_0x336649?.['trackPhaseEnd']('profile',{'isFirstRun':_0x2b4c01,'profileReady':_0x29561c[_0x70990c(0x120)],'userSkipped':_0x29561c[_0x70990c(0x102)]}),_0x29561c['ready']&&console[_0x70990c(0x147)]('\x0a✅\x20You\x27re\x20ready\x20to\x20start\x20using\x20Ranger\x20Feature\x20Review.');}const _0x46e5ac=bold(_0x70990c(0x132));console['log'](_0x5a9eaf[_0x70990c(0x14e)](_0x5a9eaf['utXLT'](_0x5a9eaf['oOzzA']('\x0aIn\x20Claude\x20Code,\x20run\x20'+_0x46e5ac+_0x70990c(0x146),'\x0aagent\x20like\x20usual.\x20Claude\x20will\x20create\x20a\x20feature\x20review\x20with'),_0x70990c(0x14b)),'\x0averification\x20to\x20check\x20its\x20work\x20as\x20it\x20builds.'));}
1
+ const _0x3f6777=_0x405d;(function(_0x24bafa,_0x4eb7b4){const _0x2e48d5=_0x405d,_0x5dbb0c=_0x24bafa();while(!![]){try{const _0x3d4090=-parseInt(_0x2e48d5(0x1e6))/0x1+-parseInt(_0x2e48d5(0x222))/0x2+parseInt(_0x2e48d5(0x1d6))/0x3+parseInt(_0x2e48d5(0x227))/0x4+parseInt(_0x2e48d5(0x1f8))/0x5+parseInt(_0x2e48d5(0x1f1))/0x6+-parseInt(_0x2e48d5(0x1c0))/0x7*(parseInt(_0x2e48d5(0x221))/0x8);if(_0x3d4090===_0x4eb7b4)break;else _0x5dbb0c['push'](_0x5dbb0c['shift']());}catch(_0x4163c0){_0x5dbb0c['push'](_0x5dbb0c['shift']());}}}(_0x4705,0x878ce));import{mkdir,writeFile}from'fs/promises';import{join}from'path';import{existsSync}from'fs';import{createRequire}from'module';import{spawn}from'child_process';import _0x352a9f from'inquirer';import{getToken,storeToken}from'./utils/keychain.js';import{getCurrentUser}from'./utils/userApi.js';import{chromium}from'playwright';import{addEnv}from'./addEnv.js';import{getRangerDir,findGitRoot}from'./utils/rangerRoot.js';import{runDeviceAuthFlow}from'./utils/deviceAuth.js';import{findExistingEnv}from'./utils/settings.js';import{getCurrentVersion}from'./utils/version.js';import{ensureClaudePlugin,ensureClaudeSkills}from'./setup/claude.js';import{ensureOpencodePluginConfig}from'./setup/opencode.js';function _0x405d(_0x251187,_0x193159){_0x251187=_0x251187-0x1b9;const _0x47054c=_0x4705();let _0x405db7=_0x47054c[_0x251187];return _0x405db7;}function _0x4705(){const _0x5ab38f=['BYGgb','existing_token','6601662epwBjV','env','xNIVC','organizationName','.ranger','\x1b[1m','ready','700895zZfbio','skills','BDmNT','error','DwxIN','Installation\x20failed\x20with\x20exit\x20code\x20','.gitignore','You\x20can\x20install\x20it\x20manually\x20by\x20running:','JLNzU','JOzIM','FloBC','trackPhaseError','chromium','\x0aagent\x20like\x20usual.\x20Claude\x20will\x20create\x20a\x20feature\x20review\x20with','✓\x20Playwright\x20Chromium\x20browser\x20found','verification\x20to\x20check\x20its\x20work\x20as\x20it\x20builds.','...','isTTY','log','XAsPG','⚠\x20No\x20git\x20repository\x20found.\x20Run\x20`ranger\x20profile\x20add\x20local`\x20from\x20your\x20project\x20directory.','✓\x20Created\x20.ranger/\x20directory','auth','Make\x20sure\x20your\x20app\x20is\x20running\x20before\x20you\x20start.\x0a','You\x20will\x20need\x20to\x20install\x20it\x20before\x20using\x20Ranger:','.\x20Please\x20check\x20your\x20API\x20token\x20and\x20try\x20again.','skipChromium','ranger\x20profile\x20add\x20local','install','\x0a✅\x20Ranger\x20setup\x20complete!\x0a','prompt','pQNrv','✓\x20Stored\x20credentials\x20locally','opencode','\x20\x20npx\x20playwright\x20install\x20chromium','platform','✓\x20Already\x20authenticated\x20to\x20','Authentication\x20failed:\x20','force','IGwUn','OQorh','24YwfLJk','1994870CbLdXV','XgSBA','Failed\x20to\x20validate\x20provisioned\x20API\x20key:\x20','No\x20git\x20repository\x20found','user','971856YrjdcM','stdin','version','stdout','provided_token','scope','to\x20access\x20your\x20app.\x20If\x20the\x20part\x20of\x20your\x20app\x20you\x20want\x20to\x20test\x20is\x20behind','You\x27ll\x20need\x20the\x20app\x20to\x20be\x20running\x20to\x20set\x20up\x20the\x20profile.','url','REAUA','success','uMOMT','auth,\x20you\x20can\x20log\x20in\x20and\x20we\x27ll\x20save\x20the\x20session\x20state\x20for\x20Ranger\x20to','✓\x20Local\x20profile\x20already\x20exists','XITWI','✓\x20Created\x20.ranger/.gitignore','85253zWomSi','\x0ascenarios\x20describing\x20what\x20to\x20verify\x20and\x20then\x20run\x20browser','\x0a❌\x20Profile\x20setup\x20failed:','dkNuH','LTpDT','aOAqK','.\x20Please\x20check\x20your\x20network\x20connection\x20and\x20server\x20URL.','WQMqv','NVxix','qjzmT','GITHUB_ENV','qAaDX','resolve','plugin','message','oYnma','✓\x20Exported\x20credentials\x20for\x20CI','\x0a⚠\x20Skipping\x20Chromium\x20installation.','warn','✓\x20Authenticated\x20to\x20','AMWJI','\x20install\x20chromium','1767174uOvUGS','eXTJV','\x0averification\x20to\x20check\x20its\x20work\x20as\x20it\x20builds.','\x0a✓\x20Playwright\x20Chromium\x20installed\x20successfully','\x0aIn\x20order\x20for\x20Ranger\x20to\x20verify\x20your\x20work,\x20you\x27ll\x20need\x20to\x20set\x20up\x20a\x20profile\x20later\x20with:','\x20\x20npx\x20playwright@','\x0a✅\x20You\x27re\x20ready\x20to\x20start\x20using\x20Ranger\x20Feature\x20Review.','TOCDr','trackPhaseStart','The\x20required\x20version\x20(','method','cXsVd','playwright@','\x20\x20Failed\x20to\x20install\x20OpenCode\x20skill:','ranger','\x0aNon-interactive\x20mode:\x20Auto-installing\x20Playwright\x20Chromium','483292yHaoks','The\x20required\x20Playwright\x20Chromium\x20browser\x20is\x20not\x20installed.\x20Install\x20it\x20now?','✓\x20Skipping\x20Chromium\x20check\x20(--skip-chromium)','GsFAw','lGpSW','QPXDg','trackPhaseEnd','VaWZK','profile'];_0x4705=function(){return _0x5ab38f;};return _0x4705();}import{installSkill}from'./utils/skills.js';const require=createRequire(import.meta.url),bold=_0x2c0f0c=>_0x3f6777(0x1f6)+_0x2c0f0c+'\x1b[0m';function getPlaywrightVersion(){const _0x4ae0b4=_0x3f6777,_0x320741={'oQGqg':'playwright/package.json','xNIVC':function(_0x87ec1f,_0x1b4606){return _0x87ec1f(_0x1b4606);}};try{const _0x1ed282=require[_0x4ae0b4(0x1cc)](_0x320741['oQGqg']),_0x5bc468=_0x320741[_0x4ae0b4(0x1f3)](require,_0x1ed282);return _0x5bc468[_0x4ae0b4(0x229)];}catch{return null;}}function installChromiumBinary(_0x2ff176){const _0x3b966d={'aKMlf':function(_0x455f6a,_0x32878c){return _0x455f6a===_0x32878c;},'yvoWL':function(_0x31141c,_0x3407a6){return _0x31141c(_0x3407a6);},'mtTMB':'playwright','dcsVR':'chromium','Uhins':function(_0x19ee2d,_0x1bd162,_0x2e54d2,_0x144656){return _0x19ee2d(_0x1bd162,_0x2e54d2,_0x144656);},'IGwUn':'npx','qAaDX':function(_0x4f14f9,_0x25fa14){return _0x4f14f9===_0x25fa14;},'uyhXF':'win32'};return new Promise((_0x212498,_0x37f80a)=>{const _0x1dded1=_0x405d,_0x50ec34=_0x2ff176?[_0x1dded1(0x1e2)+_0x2ff176,'install','chromium']:[_0x3b966d['mtTMB'],_0x1dded1(0x214),_0x3b966d['dcsVR']],_0x56414a=_0x3b966d['Uhins'](spawn,_0x3b966d[_0x1dded1(0x21f)],_0x50ec34,{'stdio':'inherit','shell':_0x3b966d[_0x1dded1(0x1cb)](process[_0x1dded1(0x21b)],_0x3b966d['uyhXF'])});_0x56414a['on']('close',_0x539a6f=>{const _0x2798e8=_0x1dded1;_0x3b966d['aKMlf'](_0x539a6f,0x0)?_0x212498():_0x3b966d['yvoWL'](_0x37f80a,new Error(_0x2798e8(0x1fd)+_0x539a6f));}),_0x56414a['on']('error',_0x2c795a=>{_0x37f80a(_0x2c795a);});});}export async function authenticate(_0x30a3e9){const _0x42b7ca=_0x3f6777,_0x5ae061={'JopPE':function(_0x5e90f8){return _0x5e90f8();},'XAsPG':_0x42b7ca(0x1f0),'oKaob':function(_0xf8b60a){return _0xf8b60a();},'tfWPc':function(_0x53bafa,_0x4faced){return _0x53bafa instanceof _0x4faced;},'GsFAw':function(_0x263812,_0x5cba0b){return _0x263812(_0x5cba0b);},'CDySN':_0x42b7ca(0x1d0),'XITWI':_0x42b7ca(0x218),'ehUfi':_0x42b7ca(0x22b)};if(!_0x30a3e9){const _0x392c57=await _0x5ae061['JopPE'](getToken);if(_0x392c57){const _0x5994ad=await getCurrentUser(_0x392c57);if(_0x5994ad[_0x42b7ca(0x1ba)])return console[_0x42b7ca(0x20a)](_0x42b7ca(0x21c)+_0x5994ad[_0x42b7ca(0x226)][_0x42b7ca(0x1f4)]),{'token':_0x392c57,'method':_0x5ae061[_0x42b7ca(0x20b)]};}try{_0x30a3e9=await _0x5ae061['oKaob'](runDeviceAuthFlow);}catch(_0x59fc4c){throw new Error(_0x42b7ca(0x21d)+(_0x5ae061['tfWPc'](_0x59fc4c,Error)?_0x59fc4c[_0x42b7ca(0x1ce)]:_0x59fc4c));}const _0x30e6a2=await getCurrentUser(_0x30a3e9);if(!_0x30e6a2['success'])throw new Error(_0x42b7ca(0x224)+_0x30e6a2[_0x42b7ca(0x1fb)]);return console['log'](_0x42b7ca(0x1d3)+_0x30e6a2[_0x42b7ca(0x226)][_0x42b7ca(0x1f4)]),{'token':_0x30a3e9,'method':'device_auth'};}console['log']('Validating\x20API\x20token...');const _0x2a77a2=await _0x5ae061[_0x42b7ca(0x1e9)](getCurrentUser,_0x30a3e9);if(!_0x2a77a2['success']){if(_0x2a77a2['status'])throw new Error(_0x42b7ca(0x21d)+_0x2a77a2['error']+_0x42b7ca(0x211));else throw new Error('Failed\x20to\x20connect\x20to\x20MCP\x20server:\x20'+_0x2a77a2[_0x42b7ca(0x1fb)]+_0x42b7ca(0x1c6));}return console['log'](_0x42b7ca(0x1d3)+_0x2a77a2[_0x42b7ca(0x226)]['organizationName']),await _0x5ae061[_0x42b7ca(0x1e9)](storeToken,_0x30a3e9),console[_0x42b7ca(0x20a)](process[_0x42b7ca(0x1f2)][_0x42b7ca(0x1ca)]?_0x5ae061['CDySN']:_0x5ae061[_0x42b7ca(0x1be)]),{'token':_0x30a3e9,'method':_0x5ae061['ehUfi']};}export async function ensureRangerDir(){const _0x4caa4b=_0x3f6777,_0x44a06b={'iUrkr':function(_0x2dbeb9){return _0x2dbeb9();},'SJWXr':function(_0x1fa50f,_0x9bffa1){return _0x1fa50f(_0x9bffa1);},'dxEBB':function(_0x55254e,_0x548419,_0x23487f){return _0x55254e(_0x548419,_0x23487f);},'zNUml':'✓\x20.ranger/\x20directory\x20already\x20exists'},_0x1af432=_0x44a06b['iUrkr'](getRangerDir);return!_0x44a06b['SJWXr'](existsSync,_0x1af432)?(await _0x44a06b['dxEBB'](mkdir,_0x1af432,{'recursive':!![]}),console['log'](_0x4caa4b(0x20d)),{'path':_0x1af432,'installed':!![]}):(console['log'](_0x44a06b['zNUml']),{'path':_0x1af432,'installed':![]});}export async function ensureChromium(){const _0x43bcf8=_0x3f6777,_0x289d7b={'WQMqv':function(_0x50c2a7,_0x2b10a4){return _0x50c2a7(_0x2b10a4);},'eXTJV':_0x43bcf8(0x206),'oYnma':'confirm','HaRxN':function(_0x29aef6,_0x52ceae){return _0x29aef6 instanceof _0x52ceae;},'OQorh':_0x43bcf8(0x1ff),'aRKkv':_0x43bcf8(0x210),'XgSBA':_0x43bcf8(0x21a)};let _0x570865=![];try{const _0x2c03c0=chromium['executablePath']();_0x570865=_0x289d7b[_0x43bcf8(0x1c7)](existsSync,_0x2c03c0);}catch{_0x570865=![];}if(_0x570865)return console[_0x43bcf8(0x20a)](_0x289d7b[_0x43bcf8(0x1d7)]),![];const _0x1b1218=getPlaywrightVersion(),_0x225aa0=process[_0x43bcf8(0x228)]['isTTY']&&process[_0x43bcf8(0x22a)][_0x43bcf8(0x209)];let _0x4bed33=!![];if(_0x225aa0){const {install:_0x3769ba}=await _0x352a9f['prompt']([{'type':_0x289d7b[_0x43bcf8(0x1cf)],'name':_0x43bcf8(0x214),'message':_0x1b1218?_0x43bcf8(0x1df)+_0x1b1218+')\x20of\x20the\x20Playwright\x20Chromium\x20browser\x20is\x20not\x20installed.\x20Install\x20it\x20now?':_0x43bcf8(0x1e7),'default':!![]}]);_0x4bed33=_0x3769ba;}else console[_0x43bcf8(0x20a)](_0x43bcf8(0x1e5)+(_0x1b1218?'\x20'+_0x1b1218:'')+_0x43bcf8(0x208));if(_0x4bed33){console[_0x43bcf8(0x20a)]('\x0aInstalling\x20Chromium\x20browser...\x0a');try{await _0x289d7b['WQMqv'](installChromiumBinary,_0x1b1218),console['log'](_0x43bcf8(0x1d9));}catch(_0x5bb0f1){console[_0x43bcf8(0x1fb)]('\x0a❌\x20Failed\x20to\x20install\x20Chromium:',_0x289d7b['HaRxN'](_0x5bb0f1,Error)?_0x5bb0f1['message']:_0x5bb0f1),console[_0x43bcf8(0x20a)](_0x289d7b[_0x43bcf8(0x220)]),_0x1b1218?console['log']('\x20\x20npx\x20playwright@'+_0x1b1218+_0x43bcf8(0x1d5)):console['log']('\x20\x20npx\x20playwright\x20install\x20chromium');}}else console['log'](_0x43bcf8(0x1d1)),console[_0x43bcf8(0x20a)](_0x289d7b['aRKkv']),_0x1b1218?console['log'](_0x43bcf8(0x1db)+_0x1b1218+'\x20install\x20chromium'):console[_0x43bcf8(0x20a)](_0x289d7b[_0x43bcf8(0x223)]);return!![];}export async function writeRangerGitignore(_0x369983){const _0x3e3857=_0x3f6777,_0x4395fe={'JOzIM':function(_0x3d4a40,_0x42028d,_0x43ee05){return _0x3d4a40(_0x42028d,_0x43ee05);},'QNRLP':_0x3e3857(0x1bf)},_0xc4e581=_0x4395fe['JOzIM'](join,_0x369983,_0x3e3857(0x1fe)),_0x414a74='\x0a\x0a#\x20Ignore\x20local-only\x20directories\x0alocal/\x0asessions/\x0abug-bashes/\x0areports/\x0afeedback-images/\x0a\x0aactive-profile.txt\x0aactive-feature.txt\x0a.gitignore\x0a\x0a#\x20Ignore\x20plaintext\x20auth\x20files\x20(encrypted\x20.enc\x20files\x20are\x20safe\x20to\x20commit)\x0a**/auth.json\x0a';await _0x4395fe[_0x3e3857(0x201)](writeFile,_0xc4e581,_0x414a74),console['log'](_0x4395fe['QNRLP']);}function printProfileSetupLaterInstructions(){const _0x26c3f7=_0x3f6777,_0x21b4d7={'LTpDT':_0x26c3f7(0x1da),'kZULg':_0x26c3f7(0x20f)};console[_0x26c3f7(0x20a)](_0x21b4d7[_0x26c3f7(0x1c4)]),console[_0x26c3f7(0x20a)]('\x20\x20'+bold(_0x26c3f7(0x213))),console[_0x26c3f7(0x20a)](_0x21b4d7['kZULg']);}async function ensureLocalEnv(_0x424f12,_0x538272){const _0x5d168a=_0x3f6777,_0x536ab0={'JLNzU':function(_0xaee11b){return _0xaee11b();},'DwxIN':_0x5d168a(0x20c),'YhyCX':function(_0x42a94c,_0x138973,_0x548a68){return _0x42a94c(_0x138973,_0x548a68);},'pQNrv':_0x5d168a(0x1bd),'jlaYe':_0x5d168a(0x1bc),'YCULr':_0x5d168a(0x22e),'REAUA':function(_0x50a10d,_0x8732bf,_0x1909fa,_0x40c678){return _0x50a10d(_0x8732bf,_0x1909fa,_0x40c678);},'TuMym':'local','UHRZy':function(_0x3bbdaf){return _0x3bbdaf();}};if(!_0x536ab0[_0x5d168a(0x200)](findGitRoot))return console['log'](_0x536ab0[_0x5d168a(0x1fc)]),{'ready':![],'skipped':!![]};if(_0x536ab0['YhyCX'](findExistingEnv,'local',{'locations':['local']}))return console[_0x5d168a(0x20a)](_0x536ab0[_0x5d168a(0x217)]),{'ready':!![],'skipped':![]};const _0x407c3a=process['stdin']['isTTY']&&process[_0x5d168a(0x22a)][_0x5d168a(0x209)];if(_0x407c3a&&!_0x424f12?.[_0x5d168a(0x22f)]){console['log']('\x0aA\x20profile\x20gives\x20Ranger\x27s\x20browser\x20agent\x20information\x20about\x20how'),console[_0x5d168a(0x20a)](_0x5d168a(0x22d)),console['log'](_0x536ab0['jlaYe']),console[_0x5d168a(0x20a)]('use\x20until\x20the\x20session\x20expires.\x0a'),console[_0x5d168a(0x20a)](_0x536ab0['YCULr']);const {wantsProfile:_0x584860}=await _0x352a9f[_0x5d168a(0x216)]([{'type':'confirm','name':'wantsProfile','message':'Would\x20you\x20like\x20to\x20set\x20up\x20the\x20profile\x20now?','default':!![]}]);if(!_0x584860)return printProfileSetupLaterInstructions(),{'ready':![],'skipped':!![]};}try{return await _0x536ab0[_0x5d168a(0x1b9)](addEnv,_0x536ab0['TuMym'],{'url':_0x424f12?.[_0x5d168a(0x22f)],'force':_0x424f12?.['force']},_0x538272),{'ready':!![],'skipped':![]};}catch(_0x2ea350){return console['error'](_0x5d168a(0x1c2),_0x2ea350 instanceof Error?_0x2ea350['message']:_0x2ea350),_0x536ab0['UHRZy'](printProfileSetupLaterInstructions),{'ready':![],'skipped':![]};}}export async function start(_0x37a315,_0x33aebd,_0x58b8a2){const _0x11e736=_0x3f6777,_0x534e64={'FsYaS':'Non-interactive\x20mode:\x20No\x20--scope\x20provided,\x20defaulting\x20to\x20user.','aOAqK':'git_check','QPXDg':function(_0x554f87){return _0x554f87();},'cXsVd':'No\x20git\x20repository\x20found.\x20Please\x20run\x20`ranger\x20setup`\x20from\x20inside\x20your\x20project\x20directory.','DXsCP':function(_0x1abdf1){return _0x1abdf1();},'NVxix':function(_0x5a6ac8,_0x1b2dca){return _0x5a6ac8(_0x1b2dca);},'BYGgb':_0x11e736(0x20e),'AMWJI':_0x11e736(0x204),'RYzrT':_0x11e736(0x1cd),'WlwZn':function(_0x1572c9,_0x240541){return _0x1572c9(_0x240541);},'VaWZK':function(_0x34b776,_0x22ca8a){return _0x34b776&&_0x22ca8a;},'kfDty':_0x11e736(0x1e4),'dkNuH':'skills','lGpSW':_0x11e736(0x1e3),'DZBel':function(_0x53966a,_0x105005){return _0x53966a instanceof _0x105005;},'nnFjU':function(_0x518443,_0x280b2a,_0x523d9c){return _0x518443(_0x280b2a,_0x523d9c);},'NLuBf':'Non-interactive\x20mode:\x20Skipping\x20profile\x20setup.\x20To\x20set\x20up\x20a\x20profile,\x20pass\x20--url\x20or\x20run\x20later:','TOCDr':'ranger\x20profile\x20add\x20local','FloBC':_0x11e736(0x1ee),'BDmNT':_0x11e736(0x207),'YLUvy':function(_0x152b65,_0xb2fdf0){return _0x152b65(_0xb2fdf0);},'IgzsG':'/ranger:enable','qjzmT':function(_0x35e537,_0x372fb1){return _0x35e537+_0x372fb1;},'uMOMT':function(_0x2698ab,_0x21b857){return _0x2698ab+_0x21b857;}};console['log']('\x0a🚀\x20Ranger\x20Setup\x0a');const _0x3f7392=process[_0x11e736(0x228)]['isTTY']&&process[_0x11e736(0x22a)]['isTTY'];!_0x3f7392&&!_0x33aebd?.[_0x11e736(0x22c)]&&(console['log'](_0x534e64['FsYaS']),_0x33aebd={..._0x33aebd,'scope':_0x11e736(0x226)});_0x58b8a2?.['trackPhaseStart'](_0x534e64[_0x11e736(0x1c5)]);if(!_0x534e64[_0x11e736(0x1eb)](findGitRoot)){await _0x58b8a2?.[_0x11e736(0x203)]('git_check',new Error(_0x11e736(0x225)));throw new Error(_0x534e64[_0x11e736(0x1e1)]);}_0x58b8a2?.['trackPhaseEnd']('git_check');const _0x2cb3bb=!existsSync(_0x534e64['DXsCP'](getRangerDir)),{path:_0x54be5a}=await ensureRangerDir();_0x58b8a2?.['trackPhaseStart']('auth');const _0x189549=await _0x534e64[_0x11e736(0x1c8)](authenticate,_0x37a315);_0x58b8a2?.[_0x11e736(0x1ec)](_0x534e64[_0x11e736(0x1ef)],{'isFirstRun':_0x2cb3bb,'method':_0x189549[_0x11e736(0x1e0)]}),_0x58b8a2?.[_0x11e736(0x1de)](_0x534e64[_0x11e736(0x1d4)]);_0x33aebd?.[_0x11e736(0x212)]?console[_0x11e736(0x20a)](_0x11e736(0x1e8)):await ensureChromium();_0x58b8a2?.[_0x11e736(0x1ec)](_0x534e64[_0x11e736(0x1d4)],{'isFirstRun':_0x2cb3bb,'skipped':!!_0x33aebd?.['skipChromium']}),await writeRangerGitignore(_0x54be5a),console[_0x11e736(0x20a)](_0x11e736(0x215));const _0x5e9154=_0x33aebd?.[_0x11e736(0x22c)],_0xb24671=_0x33aebd?.['opencode']??![];let _0xacb182=null;_0xb24671?(_0x58b8a2?.[_0x11e736(0x1de)](_0x534e64['RYzrT']),_0xacb182=await _0x534e64['WlwZn'](ensureOpencodePluginConfig,_0x5e9154),_0x58b8a2?.['trackPhaseEnd'](_0x11e736(0x1cd),{'isFirstRun':_0x2cb3bb,'opencode':!![]})):(_0x58b8a2?.['trackPhaseStart'](_0x11e736(0x1cd)),await _0x534e64['WlwZn'](ensureClaudePlugin,_0x5e9154),_0x58b8a2?.['trackPhaseEnd'](_0x11e736(0x1cd),{'isFirstRun':_0x2cb3bb}));if(_0x534e64[_0x11e736(0x1ed)](_0xb24671,_0xacb182)){_0x58b8a2?.[_0x11e736(0x1de)]('skills');try{await installSkill(_0x534e64['kfDty'],{'level':_0xacb182[_0x11e736(0x22c)],'cliVersion':_0x534e64['QPXDg'](getCurrentVersion),'platform':_0x11e736(0x219)}),_0x58b8a2?.[_0x11e736(0x1ec)](_0x534e64['dkNuH'],{'isFirstRun':_0x2cb3bb,'opencode':!![]});}catch(_0x49cb7a){console[_0x11e736(0x1d2)](_0x534e64[_0x11e736(0x1ea)],_0x534e64['DZBel'](_0x49cb7a,Error)?_0x49cb7a[_0x11e736(0x1ce)]:_0x49cb7a),_0x58b8a2?.['trackPhaseEnd'](_0x534e64[_0x11e736(0x1c3)],{'isFirstRun':_0x2cb3bb,'opencode':!![],'failed':!![]});}}else _0x58b8a2?.[_0x11e736(0x1de)](_0x534e64[_0x11e736(0x1c3)]),await ensureClaudeSkills(_0x5e9154),_0x58b8a2?.['trackPhaseEnd'](_0x11e736(0x1f9),{'isFirstRun':_0x2cb3bb});const _0x58a82b=findGitRoot();if(_0x58a82b){const _0x1c6de1=join(_0x58a82b,_0x11e736(0x1f5));!_0x534e64['WlwZn'](existsSync,_0x1c6de1)&&await _0x534e64['nnFjU'](mkdir,_0x1c6de1,{'recursive':!![]});}if(!_0x3f7392&&!_0x33aebd?.[_0x11e736(0x22f)])console['log'](_0x534e64['NLuBf']),console[_0x11e736(0x20a)]('\x20\x20'+_0x534e64['NVxix'](bold,_0x534e64[_0x11e736(0x1dd)])+'\x0a');else{_0x58b8a2?.['trackPhaseStart'](_0x534e64[_0x11e736(0x202)]);const _0x35f53a=await _0x534e64['nnFjU'](ensureLocalEnv,{'url':_0x33aebd?.[_0x11e736(0x22f)],'force':_0x33aebd?.[_0x11e736(0x21e)]},_0x58b8a2);_0x58b8a2?.[_0x11e736(0x1ec)](_0x534e64[_0x11e736(0x202)],{'isFirstRun':_0x2cb3bb,'profileReady':_0x35f53a['ready'],'userSkipped':_0x35f53a['skipped']}),_0x35f53a[_0x11e736(0x1f7)]&&console[_0x11e736(0x20a)](_0x11e736(0x1dc));}if(_0xb24671)console['log']('\x0aIn\x20OpenCode,\x20enable\x20Ranger\x20hooks\x20(run\x20the\x20`ranger_enable`\x20tool)'),console['log']('and\x20prompt\x20the\x20agent\x20like\x20usual.\x20Ranger\x20will\x20create\x20a\x20feature\x20review'),console[_0x11e736(0x20a)]('with\x20scenarios\x20describing\x20what\x20to\x20verify\x20and\x20then\x20run\x20browser'),console['log'](_0x534e64[_0x11e736(0x1fa)]);else{const _0x5c9eda=_0x534e64['YLUvy'](bold,_0x534e64['IgzsG']);console[_0x11e736(0x20a)](_0x534e64[_0x11e736(0x1c9)](_0x534e64[_0x11e736(0x1c9)](_0x534e64[_0x11e736(0x1bb)]('\x0aIn\x20Claude\x20Code,\x20run\x20'+_0x5c9eda+'\x20and\x20prompt\x20the\x20coding',_0x11e736(0x205)),_0x11e736(0x1c1)),_0x11e736(0x1d8)));}}
@@ -1 +1 @@
1
- const _0x411736=_0x496e;(function(_0x59045f,_0x1e80e2){const _0x2c78d2=_0x496e,_0x4475ec=_0x59045f();while(!![]){try{const _0x3ea31e=-parseInt(_0x2c78d2(0x13d))/0x1+parseInt(_0x2c78d2(0x11b))/0x2+-parseInt(_0x2c78d2(0x10d))/0x3*(parseInt(_0x2c78d2(0x13a))/0x4)+parseInt(_0x2c78d2(0x130))/0x5*(parseInt(_0x2c78d2(0x120))/0x6)+parseInt(_0x2c78d2(0x107))/0x7+-parseInt(_0x2c78d2(0x113))/0x8+-parseInt(_0x2c78d2(0x145))/0x9;if(_0x3ea31e===_0x1e80e2)break;else _0x4475ec['push'](_0x4475ec['shift']());}catch(_0x1ec1ac){_0x4475ec['push'](_0x4475ec['shift']());}}}(_0xec5b,0x5adf6));import{readFile,readdir}from'fs/promises';import{join,basename}from'path';import{existsSync}from'fs';import{getToken}from'./utils/keychain.js';import{getCurrentVersion,getLatestVersion}from'./utils/version.js';import{getApiBaseUrl,getCurrentEnvironment}from'./utils/environment.js';function _0xec5b(){const _0xc5949f=['Root:\x20','settingsPath','\x20(up\x20to\x20date)','cwd','scope','enabled','encrypted','name','API\x20Token:\x20✗\x20Not\x20found','XuSnl','lnPup','33535OtSqSR','nRUbU','\x0a---\x20Claude\x20Code\x20Plugin\x20---','utf-8','\x0a---\x20Profiles\x20---','ranger@trailhead','organizationName','\x1b]8;;\x07','aVRzL','CKUjE','404lARvgR','kYwgK','No\x20skills\x20installed','157542pVHZkn','path','log','user','\x20\x20User-level:','mEBSt','\x20\x20Run:\x20ranger\x20setup\x20[token]','IUTgN','2674017dHrNCi','DEBUG','includes','hTdwn','\x0a---\x20Skills\x20---','BwjIv','settings.json','\x0a\x20\x20No\x20active\x20profile\x20set','EdkSX','Version:\x20','tGdUD','jfBne','5184613MxViPt','\x20(active)','KeEda','project','FOJzH','mZIAS','8907kCVgDs','unknown','yVHkn','push','hnYdw','none','2256416BiwwiF','SKILL.md','map','trim','API\x20Environment:\x20','hasPlaintextAuth','auth.json','\x20\x20\x20\x20','504594hUnPeC','auth.json.enc','length','VYHRo','disabled','372uVeojQ','\x20\x20Run:\x20ranger\x20profile\x20add\x20<profile-name>','xTIgT','LMZMl','uGpTM'];_0xec5b=function(){return _0xc5949f;};return _0xec5b();}import{getProjectSkillsDir,getUserSkillsDir}from'./utils/claudeConfig.js';import{getEnvNames}from'./env.js';function _0x496e(_0xcba30e,_0xeeaaa){_0xcba30e=_0xcba30e-0x107;const _0xec5bb7=_0xec5b();let _0x496ed5=_0xec5bb7[_0xcba30e];return _0x496ed5;}import{getCurrentUser}from'./utils/userApi.js';import{getRangerDir}from'./utils/rangerRoot.js';import{getEnvDir}from'./utils/settings.js';import{getPluginInfo}from'./utils/claudePlugin.js';import{RANGER_MANAGED_SKILLS}from'./utils/skills.js';const bold=_0x1f96bd=>'\x1b[1m'+_0x1f96bd+'\x1b[0m',link=(_0x393fc1,_0x4660ef)=>'\x1b]8;;file://'+_0x393fc1+'\x07'+(_0x4660ef||_0x393fc1)+_0x411736(0x137);async function getSkillsFromDir(_0x326eb5,_0x852e75){const _0x530269=_0x411736,_0x14f711={'aVRzL':function(_0x4385af,_0x4fdad1,_0xb5368e){return _0x4385af(_0x4fdad1,_0xb5368e);},'uGpTM':function(_0x4d9338,_0x317f87,_0xc3c8c7,_0x56d667){return _0x4d9338(_0x317f87,_0xc3c8c7,_0x56d667);}};if(!existsSync(_0x326eb5))return[];const _0x4c87fd=[];try{const _0x10e1c7=await _0x14f711[_0x530269(0x138)](readdir,_0x326eb5,{'withFileTypes':!![]});for(const _0x26499e of _0x10e1c7){if(_0x26499e['isDirectory']()){const _0x3110fb=_0x14f711[_0x530269(0x124)](join,_0x326eb5,_0x26499e[_0x530269(0x12c)],_0x530269(0x114));if(existsSync(_0x3110fb)){let _0x18a81a=_0x26499e[_0x530269(0x12c)];try{const _0x410fc7=await readFile(_0x3110fb,_0x530269(0x133)),_0x4980b1=_0x410fc7['match'](/name:\s*(.+)/);_0x4980b1&&(_0x18a81a=_0x4980b1[0x1][_0x530269(0x116)]());}catch{}_0x4c87fd[_0x530269(0x110)]({'name':_0x26499e[_0x530269(0x12c)],'displayName':_0x18a81a,'path':_0x3110fb,'level':_0x852e75});}}}}catch{return[];}return _0x4c87fd;}async function getInstalledSkills(){const _0xf58d21=_0x411736,_0x372940={'CKUjE':function(_0xe21708,_0x1d63ae,_0xa3a74e){return _0xe21708(_0x1d63ae,_0xa3a74e);},'MCano':function(_0x131a6c){return _0x131a6c();},'LzQxF':_0xf58d21(0x10a)},[_0x4ffd35,_0x4477ee]=await Promise['all']([_0x372940[_0xf58d21(0x139)](getSkillsFromDir,_0x372940['MCano'](getProjectSkillsDir),_0x372940['LzQxF']),getSkillsFromDir(getUserSkillsDir(),'user')]);return{'project':_0x4ffd35,'user':_0x4477ee};}async function getEnvironments(){const _0x158a0e=_0x411736,_0x1219ac={'EDzCe':_0x158a0e(0x14b),'KeEda':function(_0x2d58ac,_0x42cff1,_0x29fbad){return _0x2d58ac(_0x42cff1,_0x29fbad);},'VYHRo':_0x158a0e(0x11c),'kOmlR':function(_0x3a13dc,_0x49ac2a){return _0x3a13dc(_0x49ac2a);},'XKoYA':function(_0x107bc0,_0xe8a0e5){return _0x107bc0===_0xe8a0e5;},'mEBSt':function(_0x1ab9b4){return _0x1ab9b4();}},{envNames:_0x271d5f,activeEnv:_0x556441}=await getEnvNames(),_0x2cff94=_0x1219ac[_0x158a0e(0x142)](getRangerDir);if(!existsSync(_0x2cff94))return{'envs':[],'activeEnv':null};const _0x2069e8=_0x271d5f[_0x158a0e(0x115)](_0x573bcf=>{const _0x4190ca=_0x158a0e,_0x21f397=getEnvDir(_0x573bcf),_0x724767=join(_0x21f397,_0x1219ac['EDzCe']),_0x557f96=_0x1219ac[_0x4190ca(0x109)](join,_0x21f397,_0x4190ca(0x119)),_0x79056c=_0x1219ac['KeEda'](join,_0x21f397,_0x1219ac[_0x4190ca(0x11e)]);return{'name':_0x573bcf,'settingsPath':_0x1219ac['kOmlR'](existsSync,_0x724767)?_0x724767:'(not\x20found)','hasPlaintextAuth':_0x1219ac['kOmlR'](existsSync,_0x557f96),'hasEncryptedAuth':existsSync(_0x79056c),'isActive':_0x1219ac['XKoYA'](_0x573bcf,_0x556441)};});return{'envs':_0x2069e8,'activeEnv':_0x556441};}export async function status(){const _0x357d7e=_0x411736,_0x3cd957={'XuSnl':'\x0a📊\x20Ranger\x20Status\x0a','IfUsO':function(_0x1a75d6,_0x46840a,_0x5bada5){return _0x1a75d6(_0x46840a,_0x5bada5);},'EdkSX':function(_0x4d54f6,_0x2e69fd){return _0x4d54f6(_0x2e69fd);},'FOJzH':function(_0x431f68,_0x390605){return _0x431f68(_0x390605);},'lnPup':function(_0x4a21e1,_0x5d8ad6){return _0x4a21e1(_0x5d8ad6);},'jfBne':function(_0x58df2c){return _0x58df2c();},'dgjLr':function(_0x5e429f,_0x1a91e6){return _0x5e429f(_0x1a91e6);},'kYwgK':function(_0x5a0085){return _0x5a0085();},'NzmZQ':_0x357d7e(0x132),'xTIgT':'ranger@trailhead','pnefR':_0x357d7e(0x10e),'oDBES':_0x357d7e(0x11f),'hnYdw':'\x20\x20Run:\x20ranger\x20setup\x20[token]\x20\x20(includes\x20plugin\x20installation)','yVHkn':function(_0x451ec1){return _0x451ec1();},'YfVQG':_0x357d7e(0x13c),'IUTgN':function(_0x4d673a,_0x27f9d1){return _0x4d673a>_0x27f9d1;},'nRUbU':'\x20\x20Project-level:','tGdUD':function(_0x217ab9,_0x958bef){return _0x217ab9(_0x958bef);},'mZIAS':_0x357d7e(0x141),'hTdwn':function(_0xb0d7fc,_0x59fd50){return _0xb0d7fc(_0x59fd50);},'LMZMl':_0x357d7e(0x12b),'iUFBm':'plaintext','ZKArt':function(_0x2a4302,_0x38d2ad){return _0x2a4302(_0x38d2ad);},'BqZTP':function(_0x317f4d,_0x18bd00){return _0x317f4d!==_0x18bd00;},'BwjIv':function(_0x457c65,_0x17dd26,_0x25fd30){return _0x457c65(_0x17dd26,_0x25fd30);}};console[_0x357d7e(0x13f)](_0x3cd957[_0x357d7e(0x12e)]);const _0xc794a0=process[_0x357d7e(0x128)](),_0x584bf5=getRangerDir();if(!existsSync(_0x584bf5)){console['log']('Root:\x20'+_0x3cd957['IfUsO'](link,_0xc794a0,_0x3cd957[_0x357d7e(0x14d)](bold,basename(_0xc794a0)))),console['log']('\x0aRanger\x20has\x20not\x20been\x20initialized\x20in\x20this\x20directory.'),console[_0x357d7e(0x13f)]('\x20\x20Run:\x20ranger\x20setup\x20[token]\x0a');return;}console[_0x357d7e(0x13f)](_0x357d7e(0x125)+link(_0xc794a0,_0x3cd957[_0x357d7e(0x10b)](bold,_0x3cd957[_0x357d7e(0x12f)](basename,_0xc794a0))));const _0x47e33c=_0x3cd957[_0x357d7e(0x150)](getCurrentVersion),_0x4c3172=getLatestVersion();if(_0x4c3172&&_0x4c3172!==_0x47e33c)console['log'](_0x357d7e(0x14e)+_0x47e33c+'\x20(latest:\x20'+_0x4c3172+')'),console['log']('\x20\x20Run:\x20ranger\x20update');else _0x4c3172?console[_0x357d7e(0x13f)](_0x357d7e(0x14e)+_0x47e33c+_0x357d7e(0x127)):console['log'](_0x357d7e(0x14e)+_0x47e33c);const _0x3bfd55=await _0x3cd957['jfBne'](getToken);if(_0x3bfd55){const _0x4687ba=await getCurrentUser(_0x3bfd55);_0x4687ba['success']?console['log']('Organization:\x20'+_0x3cd957['dgjLr'](bold,_0x4687ba[_0x357d7e(0x140)][_0x357d7e(0x136)])):(console[_0x357d7e(0x13f)]('API\x20Token:\x20✓\x20Found\x20but\x20invalid\x20or\x20expired'),console['log'](_0x357d7e(0x143)));}else console['log'](_0x357d7e(0x12d)),console[_0x357d7e(0x13f)](_0x357d7e(0x143));process['env'][_0x357d7e(0x146)]&&(console[_0x357d7e(0x13f)](_0x357d7e(0x117)+_0x3cd957[_0x357d7e(0x13b)](getCurrentEnvironment)),console['log']('API\x20URL:\x20'+getApiBaseUrl()));console[_0x357d7e(0x13f)](_0x3cd957['NzmZQ']);const _0x3e2661=await getPluginInfo(_0x3cd957[_0x357d7e(0x122)]);if(_0x3e2661){const _0x248117=_0x3e2661[_0x357d7e(0x129)]||_0x3cd957['pnefR'],_0x2c3b39=_0x3e2661[_0x357d7e(0x12a)]?'enabled':_0x3cd957['oDBES'];console[_0x357d7e(0x13f)]('\x20\x20'+bold(_0x357d7e(0x135))+':\x20installed\x20('+_0x248117+',\x20'+_0x2c3b39+')');}else console['log']('\x20\x20Not\x20installed'),console[_0x357d7e(0x13f)](_0x3cd957[_0x357d7e(0x111)]);console['log'](_0x357d7e(0x149));const {project:_0x276baf,user:_0x24e794}=await _0x3cd957[_0x357d7e(0x10f)](getInstalledSkills),_0x506470=_0x276baf['filter'](_0x1af733=>RANGER_MANAGED_SKILLS['includes'](_0x1af733['name'])),_0x5b009b=_0x24e794['filter'](_0x308336=>RANGER_MANAGED_SKILLS[_0x357d7e(0x147)](_0x308336['name'])),_0x4c4231=_0x506470[_0x357d7e(0x11d)]+_0x5b009b[_0x357d7e(0x11d)];if(_0x4c4231===0x0)console[_0x357d7e(0x13f)](_0x3cd957['YfVQG']),console['log']('\x20\x20Run:\x20ranger\x20skillup');else{if(_0x3cd957[_0x357d7e(0x144)](_0x506470[_0x357d7e(0x11d)],0x0)){console['log'](_0x3cd957[_0x357d7e(0x131)]);for(const _0x1fe8df of _0x506470){console[_0x357d7e(0x13f)]('\x20\x20\x20\x20'+_0x3cd957[_0x357d7e(0x14f)](bold,_0x1fe8df['displayName'])+':\x20'+link(_0x1fe8df[_0x357d7e(0x13e)],_0x3cd957[_0x357d7e(0x12f)](basename,_0x1fe8df[_0x357d7e(0x13e)])));}}if(_0x5b009b['length']>0x0){console['log'](_0x3cd957[_0x357d7e(0x10c)]);for(const _0x29ce47 of _0x5b009b){console[_0x357d7e(0x13f)](_0x357d7e(0x11a)+bold(_0x29ce47['displayName'])+':\x20'+link(_0x29ce47[_0x357d7e(0x13e)],_0x3cd957[_0x357d7e(0x148)](basename,_0x29ce47[_0x357d7e(0x13e)])));}}}console[_0x357d7e(0x13f)](_0x357d7e(0x134));const {envs:_0x191844,activeEnv:_0x204e88}=await _0x3cd957[_0x357d7e(0x10f)](getEnvironments);if(_0x191844[_0x357d7e(0x11d)]===0x0)console[_0x357d7e(0x13f)]('No\x20profiles\x20configured'),console['log'](_0x357d7e(0x121));else{for(const _0x3110c5 of _0x191844){const _0x24a464=_0x3110c5['isActive']?_0x357d7e(0x108):'',_0x541c15=_0x3110c5['hasEncryptedAuth']?_0x3cd957[_0x357d7e(0x123)]:_0x3110c5[_0x357d7e(0x118)]?_0x3cd957['iUFBm']:_0x357d7e(0x112);console['log']('\x20\x20'+_0x3cd957['ZKArt'](bold,_0x3110c5[_0x357d7e(0x12c)])+_0x24a464),console['log']('\x20\x20\x20\x20Auth:\x20'+_0x541c15),_0x3cd957['BqZTP'](_0x3110c5[_0x357d7e(0x126)],'(not\x20found)')&&console['log']('\x20\x20\x20\x20Settings:\x20'+_0x3cd957[_0x357d7e(0x14a)](link,_0x3110c5['settingsPath'],basename(_0x3110c5['settingsPath'])));}!_0x204e88&&(console[_0x357d7e(0x13f)](_0x357d7e(0x14c)),console[_0x357d7e(0x13f)]('\x20\x20Run:\x20ranger\x20profile\x20use\x20<profile-name>\x20\x20(available:\x20'+_0x191844['map'](_0x14629d=>_0x14629d[_0x357d7e(0x12c)])['join'](',\x20')+')'));}console['log']('');}
1
+ function _0x1c3f(_0xdd6d2f,_0xe35472){_0xdd6d2f=_0xdd6d2f-0xee;const _0x5a7c57=_0x5a7c();let _0x1c3fd0=_0x5a7c57[_0xdd6d2f];return _0x1c3fd0;}(function(_0xb4798f,_0x3b9a15){const _0x39bace=_0x1c3f,_0x368d66=_0xb4798f();while(!![]){try{const _0x969da3=parseInt(_0x39bace(0x137))/0x1*(-parseInt(_0x39bace(0x11d))/0x2)+-parseInt(_0x39bace(0x11e))/0x3+-parseInt(_0x39bace(0x124))/0x4+-parseInt(_0x39bace(0xf2))/0x5+-parseInt(_0x39bace(0x10b))/0x6*(-parseInt(_0x39bace(0x132))/0x7)+parseInt(_0x39bace(0x12b))/0x8+parseInt(_0x39bace(0x13b))/0x9*(parseInt(_0x39bace(0x120))/0xa);if(_0x969da3===_0x3b9a15)break;else _0x368d66['push'](_0x368d66['shift']());}catch(_0x48d311){_0x368d66['push'](_0x368d66['shift']());}}}(_0x5a7c,0x86921));import{readFile,readdir}from'fs/promises';import{join,basename}from'path';import{existsSync}from'fs';import{getToken}from'./utils/keychain.js';import{getCurrentVersion,getLatestVersion}from'./utils/version.js';import{getApiBaseUrl,getCurrentEnvironment}from'./utils/environment.js';import{getProjectSkillsDir,getUserSkillsDir}from'./utils/claudeConfig.js';import{getEnvNames}from'./env.js';import{getCurrentUser}from'./utils/userApi.js';import{getRangerDir}from'./utils/rangerRoot.js';import{getEnvDir}from'./utils/settings.js';import{getPluginInfo}from'./utils/claudePlugin.js';import{RANGER_MANAGED_SKILLS}from'./utils/skills.js';import{spawn}from'child_process';const bold=_0x3b1b1f=>'\x1b[1m'+_0x3b1b1f+'\x1b[0m',link=(_0x435b4b,_0xc3e3d2)=>'\x1b]8;;file://'+_0x435b4b+'\x07'+(_0xc3e3d2||_0x435b4b)+'\x1b]8;;\x07';async function getOpencodePluginStatus(){const _0x41cdaf=_0x1c3f,_0x3616a7={'MGzDP':function(_0x4248cc,_0xd8bc0e){return _0x4248cc(_0xd8bc0e);},'MMrvG':'not_configured','gXZla':'string','jVxqu':function(_0x25ee42,_0x1a007d,_0x159fa3,_0x44211d){return _0x25ee42(_0x1a007d,_0x159fa3,_0x44211d);},'mMvDh':_0x41cdaf(0x129),'SLVSt':_0x41cdaf(0xee)};return new Promise(_0x15a62c=>{const _0x159e2d=_0x41cdaf,_0x5087fb={'sadhO':_0x3616a7['gXZla'],'XgCbw':_0x159e2d(0xf3)},_0x3dc739=_0x3616a7[_0x159e2d(0x119)](spawn,'opencode',[_0x159e2d(0x131),_0x159e2d(0xfb)],{'stdio':[_0x159e2d(0x11b),'pipe',_0x159e2d(0x145)]});let _0x4ddee9='';_0x3dc739[_0x159e2d(0x141)]?.['on']('data',_0x42a621=>{_0x4ddee9+=_0x42a621['toString']();}),_0x3dc739['stderr']?.['on']('data',_0x4ff21f=>{_0x4ddee9+=_0x4ff21f['toString']();}),_0x3dc739['on'](_0x3616a7['mMvDh'],()=>{_0x15a62c({'status':'not_installed'});}),_0x3dc739['on'](_0x3616a7['SLVSt'],_0x22ef7d=>{const _0x3cf469=_0x159e2d;if(_0x22ef7d!==0x0){_0x3616a7['MGzDP'](_0x15a62c,{'status':_0x3cf469(0x10d)});return;}const _0x2a1730=_0x4ddee9[_0x3cf469(0x148)]();let _0x3f7c01=null;if(_0x2a1730)try{_0x3f7c01=JSON[_0x3cf469(0x146)](_0x2a1730);}catch{const _0x2fdf21=_0x2a1730['match'](/\{[\s\S]*\}$/);if(_0x2fdf21)try{_0x3f7c01=JSON['parse'](_0x2fdf21[0x0]);}catch{_0x3f7c01=null;}}const _0x52ad59=Array[_0x3cf469(0x13f)](_0x3f7c01?.[_0x3cf469(0xff)])?_0x3f7c01?.[_0x3cf469(0xff)]:[],_0x45d63c=_0x52ad59[_0x3cf469(0x123)](_0x150020=>{const _0x1a06f2=_0x3cf469;if(typeof _0x150020!==_0x5087fb[_0x1a06f2(0xfa)])return![];return _0x150020[_0x1a06f2(0xf9)](_0x5087fb[_0x1a06f2(0x138)])||_0x150020[_0x1a06f2(0xf9)]('opencode-plugin');});if(_0x45d63c){_0x3616a7[_0x3cf469(0x10a)](_0x15a62c,{'status':_0x3cf469(0x140),'details':_0x52ad59['length']>0x0?_0x52ad59[_0x3cf469(0x13d)]+'\x20plugin(s)\x20configured':undefined});return;}if(_0x52ad59[_0x3cf469(0x13d)]>0x0){_0x3616a7['MGzDP'](_0x15a62c,{'status':_0x3616a7['MMrvG'],'details':_0x52ad59[_0x3cf469(0x13d)]+'\x20plugin(s)\x20configured'});return;}_0x15a62c({'status':'not_configured'});});});}async function getSkillsFromDir(_0x2b69ee,_0x35d019){const _0xeefeca=_0x1c3f,_0x11a614={'ZdpBu':function(_0x9b2f75,_0xbe848e,_0x53717e){return _0x9b2f75(_0xbe848e,_0x53717e);},'aKIMe':'utf-8'};if(!existsSync(_0x2b69ee))return[];const _0x352cfd=[];try{const _0x208f79=await _0x11a614['ZdpBu'](readdir,_0x2b69ee,{'withFileTypes':!![]});for(const _0x113899 of _0x208f79){if(_0x113899[_0xeefeca(0x109)]()){const _0x4fabb6=join(_0x2b69ee,_0x113899['name'],'SKILL.md');if(existsSync(_0x4fabb6)){let _0x23c726=_0x113899['name'];try{const _0x47bb07=await readFile(_0x4fabb6,_0x11a614['aKIMe']),_0x5465c6=_0x47bb07[_0xeefeca(0x11f)](/name:\s*(.+)/);_0x5465c6&&(_0x23c726=_0x5465c6[0x1][_0xeefeca(0x148)]());}catch{}_0x352cfd[_0xeefeca(0x125)]({'name':_0x113899['name'],'displayName':_0x23c726,'path':_0x4fabb6,'level':_0x35d019});}}}}catch{return[];}return _0x352cfd;}async function getInstalledSkills(){const _0xf122d6=_0x1c3f,_0x5b2f59={'JmDwb':_0xf122d6(0x11c),'sxcgA':function(_0x1761d2,_0x53b38f,_0x3d0d0c){return _0x1761d2(_0x53b38f,_0x3d0d0c);},'bFdZJ':function(_0x135c31){return _0x135c31();},'vhkFv':_0xf122d6(0x143)},[_0x406057,_0x20e85c]=await Promise[_0xf122d6(0x12d)]([getSkillsFromDir(getProjectSkillsDir(),_0x5b2f59[_0xf122d6(0x103)]),_0x5b2f59['sxcgA'](getSkillsFromDir,_0x5b2f59['bFdZJ'](getUserSkillsDir),_0x5b2f59[_0xf122d6(0x135)])]);return{'project':_0x406057,'user':_0x20e85c};}async function getEnvironments(){const _0x5a46ed=_0x1c3f,_0x20a4e4={'Rnkwm':_0x5a46ed(0x127),'wnzTQ':_0x5a46ed(0x12e),'DQlKC':function(_0xf4eac8,_0x54fe70){return _0xf4eac8(_0x54fe70);},'OKLUX':_0x5a46ed(0x112),'zSXZP':function(_0x264496,_0x2ded91){return _0x264496(_0x2ded91);},'vMCdg':function(_0x2a82d3){return _0x2a82d3();}},{envNames:_0x17e993,activeEnv:_0x34c1f5}=await _0x20a4e4[_0x5a46ed(0x113)](getEnvNames),_0x1e5342=_0x20a4e4[_0x5a46ed(0x113)](getRangerDir);if(!existsSync(_0x1e5342))return{'envs':[],'activeEnv':null};const _0x2f497=_0x17e993['map'](_0x204f35=>{const _0x5c723c=_0x5a46ed,_0x58430c=getEnvDir(_0x204f35),_0xb4ff6f=join(_0x58430c,'settings.json'),_0x259ed1=join(_0x58430c,_0x20a4e4[_0x5c723c(0x102)]),_0x1b1653=join(_0x58430c,_0x20a4e4['wnzTQ']);return{'name':_0x204f35,'settingsPath':_0x20a4e4[_0x5c723c(0x110)](existsSync,_0xb4ff6f)?_0xb4ff6f:_0x20a4e4['OKLUX'],'hasPlaintextAuth':_0x20a4e4[_0x5c723c(0x110)](existsSync,_0x259ed1),'hasEncryptedAuth':_0x20a4e4['zSXZP'](existsSync,_0x1b1653),'isActive':_0x204f35===_0x34c1f5};});return{'envs':_0x2f497,'activeEnv':_0x34c1f5};}export async function status(){const _0x3b51a4=_0x1c3f,_0x3a79c5={'fJEzq':'\x0a📊\x20Ranger\x20Status\x0a','VmgAo':function(_0x4a32ed,_0x41cc00){return _0x4a32ed(_0x41cc00);},'ZmcRv':function(_0x314aba,_0x3ef941){return _0x314aba(_0x3ef941);},'kbgnN':function(_0x3fa034,_0x559f30){return _0x3fa034(_0x559f30);},'wazuh':function(_0x242812){return _0x242812();},'MpDQz':function(_0x2c4525){return _0x2c4525();},'sPDWf':_0x3b51a4(0xfc),'byNph':function(_0x445943,_0x5a56ce){return _0x445943===_0x5a56ce;},'EzUUA':_0x3b51a4(0x107),'yxUIt':'disabled','AxlIz':_0x3b51a4(0x139),'thTBn':_0x3b51a4(0xf1),'dZrrV':function(_0x162c9b,_0x6065df){return _0x162c9b(_0x6065df);},'XAouv':function(_0x2a38c6,_0x380fb0,_0x28c2b3){return _0x2a38c6(_0x380fb0,_0x28c2b3);},'ZGBRv':'\x20\x20User-level:','pURzN':_0x3b51a4(0x118),'TyLCb':'No\x20profiles\x20configured','QIUrl':'\x20(active)','aAKOj':'encrypted','HLMDj':'plaintext','krUXN':function(_0x2ae4ef,_0x2f80b1){return _0x2ae4ef!==_0x2f80b1;},'rpxnl':function(_0x23e4e9,_0x2a2c79,_0x59515f){return _0x23e4e9(_0x2a2c79,_0x59515f);},'rRePJ':function(_0x45eedb,_0x55e811){return _0x45eedb(_0x55e811);}};console['log'](_0x3a79c5[_0x3b51a4(0x128)]);const _0x14a861=process[_0x3b51a4(0x12c)](),_0x204084=getRangerDir();if(!_0x3a79c5[_0x3b51a4(0x12a)](existsSync,_0x204084)){console['log'](_0x3b51a4(0x126)+link(_0x14a861,_0x3a79c5[_0x3b51a4(0x121)](bold,_0x3a79c5[_0x3b51a4(0x122)](basename,_0x14a861)))),console['log'](_0x3b51a4(0xfe)),console['log'](_0x3b51a4(0x106));return;}console[_0x3b51a4(0xfd)](_0x3b51a4(0x126)+link(_0x14a861,_0x3a79c5['kbgnN'](bold,basename(_0x14a861))));const _0x4e8848=getCurrentVersion(),_0x394776=getLatestVersion();if(_0x394776&&_0x394776!==_0x4e8848)console[_0x3b51a4(0xfd)]('Version:\x20'+_0x4e8848+_0x3b51a4(0x105)+_0x394776+')'),console['log']('\x20\x20Run:\x20ranger\x20update');else _0x394776?console['log'](_0x3b51a4(0xf4)+_0x4e8848+_0x3b51a4(0x116)):console['log'](_0x3b51a4(0xf4)+_0x4e8848);const _0x156952=await _0x3a79c5['wazuh'](getToken);if(_0x156952){const _0x37236c=await _0x3a79c5[_0x3b51a4(0x121)](getCurrentUser,_0x156952);_0x37236c[_0x3b51a4(0x13c)]?console['log'](_0x3b51a4(0x130)+_0x3a79c5[_0x3b51a4(0x12a)](bold,_0x37236c[_0x3b51a4(0x143)][_0x3b51a4(0x142)])):(console[_0x3b51a4(0xfd)]('API\x20Token:\x20✓\x20Found\x20but\x20invalid\x20or\x20expired'),console['log'](_0x3b51a4(0x115)));}else console['log']('API\x20Token:\x20✗\x20Not\x20found'),console['log']('\x20\x20Run:\x20ranger\x20setup\x20[token]');process['env']['DEBUG']&&(console['log']('API\x20Environment:\x20'+_0x3a79c5['MpDQz'](getCurrentEnvironment)),console['log']('API\x20URL:\x20'+getApiBaseUrl()));console[_0x3b51a4(0xfd)](_0x3a79c5[_0x3b51a4(0xf5)]);const _0x1f395e=await getOpencodePluginStatus();if(_0x3a79c5['byNph'](_0x1f395e['status'],'configured'))console['log']('\x20\x20'+bold('@ranger-testing/opencode-plugin')+_0x3b51a4(0x133)),_0x1f395e['details']&&console['log']('\x20\x20'+_0x1f395e[_0x3b51a4(0x104)]);else _0x1f395e['status']===_0x3b51a4(0x144)?(console[_0x3b51a4(0xfd)](_0x3a79c5[_0x3b51a4(0xf6)]),_0x1f395e[_0x3b51a4(0x104)]&&console['log']('\x20\x20'+_0x1f395e['details']),console[_0x3b51a4(0xfd)](_0x3b51a4(0x134))):console[_0x3b51a4(0xfd)]('\x20\x20OpenCode\x20not\x20installed\x20or\x20not\x20available');console['log']('\x0a---\x20Claude\x20Code\x20Plugin\x20---');const _0x3a4f8c=await getPluginInfo('ranger@trailhead');if(_0x3a4f8c){const _0x113aff=_0x3a4f8c[_0x3b51a4(0xef)]||_0x3b51a4(0x13a),_0x2e8d50=_0x3a4f8c['enabled']?'enabled':_0x3a79c5[_0x3b51a4(0x12f)];console['log']('\x20\x20'+_0x3a79c5['kbgnN'](bold,'ranger@trailhead')+_0x3b51a4(0x13e)+_0x113aff+',\x20'+_0x2e8d50+')');}else console['log'](_0x3a79c5['AxlIz']),console['log']('\x20\x20Run:\x20ranger\x20setup\x20[token]\x20\x20(includes\x20plugin\x20installation)');console['log']('\x0a---\x20Skills\x20---');const {project:_0x4c0fbf,user:_0x5f35c4}=await _0x3a79c5['wazuh'](getInstalledSkills),_0x1eac89=_0x4c0fbf['filter'](_0xf4d67a=>RANGER_MANAGED_SKILLS['includes'](_0xf4d67a['name'])),_0x5974f3=_0x5f35c4[_0x3b51a4(0x11a)](_0x38abec=>RANGER_MANAGED_SKILLS[_0x3b51a4(0xf9)](_0x38abec[_0x3b51a4(0x108)])),_0x34e2db=_0x1eac89['length']+_0x5974f3['length'];if(_0x3a79c5['byNph'](_0x34e2db,0x0))console[_0x3b51a4(0xfd)](_0x3a79c5[_0x3b51a4(0x136)]),console['log']('\x20\x20Run:\x20ranger\x20skillup');else{if(_0x1eac89['length']>0x0){console['log'](_0x3b51a4(0xf8));for(const _0x2c9937 of _0x1eac89){console[_0x3b51a4(0xfd)]('\x20\x20\x20\x20'+_0x3a79c5['dZrrV'](bold,_0x2c9937[_0x3b51a4(0xf0)])+':\x20'+_0x3a79c5[_0x3b51a4(0x147)](link,_0x2c9937['path'],basename(_0x2c9937[_0x3b51a4(0x100)])));}}if(_0x5974f3['length']>0x0){console[_0x3b51a4(0xfd)](_0x3a79c5[_0x3b51a4(0x10e)]);for(const _0x51ba91 of _0x5974f3){console['log']('\x20\x20\x20\x20'+bold(_0x51ba91['displayName'])+':\x20'+_0x3a79c5['XAouv'](link,_0x51ba91['path'],basename(_0x51ba91[_0x3b51a4(0x100)])));}}}console[_0x3b51a4(0xfd)](_0x3a79c5['pURzN']);const {envs:_0x46910b,activeEnv:_0x425f64}=await getEnvironments();if(_0x3a79c5['byNph'](_0x46910b['length'],0x0))console['log'](_0x3a79c5['TyLCb']),console[_0x3b51a4(0xfd)](_0x3b51a4(0x114));else{for(const _0x4b647b of _0x46910b){const _0x447ec9=_0x4b647b['isActive']?_0x3a79c5[_0x3b51a4(0x117)]:'',_0x3ab18b=_0x4b647b['hasEncryptedAuth']?_0x3a79c5['aAKOj']:_0x4b647b['hasPlaintextAuth']?_0x3a79c5['HLMDj']:'none';console['log']('\x20\x20'+bold(_0x4b647b[_0x3b51a4(0x108)])+_0x447ec9),console['log'](_0x3b51a4(0xf7)+_0x3ab18b),_0x3a79c5[_0x3b51a4(0x101)](_0x4b647b['settingsPath'],'(not\x20found)')&&console[_0x3b51a4(0xfd)]('\x20\x20\x20\x20Settings:\x20'+_0x3a79c5[_0x3b51a4(0x111)](link,_0x4b647b[_0x3b51a4(0x10c)],_0x3a79c5['rRePJ'](basename,_0x4b647b['settingsPath'])));}!_0x425f64&&(console['log']('\x0a\x20\x20No\x20active\x20profile\x20set'),console['log']('\x20\x20Run:\x20ranger\x20profile\x20use\x20<profile-name>\x20\x20(available:\x20'+_0x46910b[_0x3b51a4(0x10f)](_0x4f95e9=>_0x4f95e9[_0x3b51a4(0x108)])['join'](',\x20')+')'));}console['log']('');}function _0x5a7c(){const _0x33aa9b=['\x0a---\x20OpenCode\x20Plugin\x20---','log','\x0aRanger\x20has\x20not\x20been\x20initialized\x20in\x20this\x20directory.','plugin','path','krUXN','Rnkwm','JmDwb','details','\x20(latest:\x20','\x20\x20Run:\x20ranger\x20setup\x20[token]\x0a','\x20\x20Not\x20configured','name','isDirectory','MGzDP','137892gfljGp','settingsPath','not_installed','ZGBRv','map','DQlKC','rpxnl','(not\x20found)','vMCdg','\x20\x20Run:\x20ranger\x20profile\x20add\x20<profile-name>','\x20\x20Run:\x20ranger\x20setup\x20[token]','\x20(up\x20to\x20date)','QIUrl','\x0a---\x20Profiles\x20---','jVxqu','filter','ignore','project','12WUxZcz','2973360uvUoFH','match','17488840PoTUQg','ZmcRv','kbgnN','some','4033888njHtHw','push','Root:\x20','auth.json','fJEzq','error','VmgAo','2110696rWEteF','cwd','all','auth.json.enc','yxUIt','Organization:\x20','debug','308qLAzdO',':\x20configured','\x20\x20Run:\x20ranger\x20setup\x20--opencode','vhkFv','thTBn','47692ZcAqaE','XgCbw','\x20\x20Not\x20installed','unknown','9JaqTkr','success','length',':\x20installed\x20(','isArray','configured','stdout','organizationName','user','not_configured','pipe','parse','XAouv','trim','close','scope','displayName','No\x20skills\x20installed','934920doPDMy','@ranger-testing/opencode-plugin','Version:\x20','sPDWf','EzUUA','\x20\x20\x20\x20Auth:\x20','\x20\x20Project-level:','includes','sadhO','config'];_0x5a7c=function(){return _0x33aa9b;};return _0x5a7c();}
@@ -1 +1 @@
1
- (function(_0x4ba947,_0x302c43){const _0x22d168=_0x7da3,_0x20e8ef=_0x4ba947();while(!![]){try{const _0x3940d6=parseInt(_0x22d168(0x168))/0x1+parseInt(_0x22d168(0x17b))/0x2*(-parseInt(_0x22d168(0x16e))/0x3)+parseInt(_0x22d168(0x182))/0x4+parseInt(_0x22d168(0x179))/0x5*(-parseInt(_0x22d168(0x15e))/0x6)+-parseInt(_0x22d168(0x151))/0x7*(-parseInt(_0x22d168(0x187))/0x8)+-parseInt(_0x22d168(0x14e))/0x9+-parseInt(_0x22d168(0x15a))/0xa;if(_0x3940d6===_0x302c43)break;else _0x20e8ef['push'](_0x20e8ef['shift']());}catch(_0x4bdb78){_0x20e8ef['push'](_0x20e8ef['shift']());}}}(_0xef6f,0x315f0));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';function _0x7da3(_0x1e8046,_0x231b41){_0x1e8046=_0x1e8046-0x14c;const _0xef6fec=_0xef6f();let _0x7da30d=_0xef6fec[_0x1e8046];return _0x7da30d;}import{PACKAGE_NAME,getCurrentVersion,getLatestVersion,compareVersions}from'./utils/version.js';function _0xef6f(){const _0x3c9040=['trim','some','pXJav','ayRuJ','mzPLL','\x0aClaude\x20plugin\x20updated\x20(user\x20scope).','utf-8','haSDa','length','RyPWj','1593144MCNYTR','nFoAL','Update\x20failed.\x20You\x20may\x20need\x20to\x20run\x20with\x20sudo:\x20sudo\x20npm\x20install\x20-g\x20','350ZdeFTA','eZEze','user',')\x20is\x20newer\x20than\x20the\x20published\x20version\x20(','\x0aYour\x20version\x20(','error','cOUpF','iAaVW','qeCvK','3080LskxrK','jPJhh','CpwFF','PmUIZ','18mYMrNx','split','\x0aYou\x20are\x20already\x20on\x20the\x20latest\x20version.','\x0aReinstalling\x20','log','\x20skill\x20','\x0aSuccessfully\x20updated\x20to\x20version\x20','acoLa','splice','KuXAL','72517fvvPyU','trailhead','qxjUD','.gitignore','update','JcPbT','301299wqyRap','MdCPA','marketplace','WneVk','sTJOR','Claude\x20plugin\x20updated\x20(project\x20scope).','wnJIO','juJvy','NAWTt','oMZhN','@latest','15430nfTWQO','Latest\x20version:\x20\x20','2ivpaFf','project','@latest...\x0a','sVyDv','win32','qrqEy','\x0a✅\x20Update\x20complete!','896688ZMUvqW','YXBRP','inherit','findIndex','close','30808KaMQRx'];_0xef6f=function(){return _0x3c9040;};return _0xef6f();}import{getSkillsDir}from'./utils/claudeConfig.js';import{join}from'path';import{migrateActiveProfileFile}from'./utils/activeProfile.js';import{getRangerDir}from'./utils/rangerRoot.js';async function runInstall(){const _0x3d1b5f=_0x7da3,_0x1ba296={'iAaVW':function(_0x41ed31,_0x602f7a){return _0x41ed31(_0x602f7a);},'KuXAL':function(_0x4def97,_0x33dc45,_0x948159,_0x1223a7){return _0x4def97(_0x33dc45,_0x948159,_0x1223a7);},'pXJav':_0x3d1b5f(0x184),'iJyYb':function(_0x1b36d5,_0x537703){return _0x1b36d5===_0x537703;},'mzPLL':'error'};return new Promise(_0x35617a=>{const _0x59ea0f=_0x3d1b5f;console['log']('\x0aInstalling\x20'+PACKAGE_NAME+_0x59ea0f(0x17d));const _0x2f1fbb=_0x1ba296[_0x59ea0f(0x167)](spawn,'npm',['install','-g',PACKAGE_NAME+_0x59ea0f(0x178)],{'stdio':_0x1ba296[_0x59ea0f(0x18a)],'shell':_0x1ba296['iJyYb'](process['platform'],'win32')});_0x2f1fbb['on'](_0x59ea0f(0x186),_0x11be2c=>{_0x35617a(_0x11be2c===0x0);}),_0x2f1fbb['on'](_0x1ba296[_0x59ea0f(0x18c)],()=>{const _0x4e405e=_0x59ea0f;_0x1ba296[_0x4e405e(0x158)](_0x35617a,![]);});});}async function updateClaudeMarketplace(){const _0x5c592b=_0x7da3,_0x4de13f={'tAmQS':function(_0x19dd1b,_0x4e79aa){return _0x19dd1b(_0x4e79aa);},'kIJlT':'claude','EYOge':'plugin','iKEOe':_0x5c592b(0x170),'YXBRP':_0x5c592b(0x169),'sVyDv':'pipe','ayRuJ':function(_0x5bdf97,_0x22f89c){return _0x5bdf97===_0x22f89c;},'HpwQn':_0x5c592b(0x17f),'jWKWr':_0x5c592b(0x156)};return new Promise(_0x7b6368=>{const _0x4d7b17=_0x5c592b,_0x54afc1={'CpwFF':function(_0x582ce2,_0x5abd69){return _0x582ce2(_0x5abd69);}},_0x4fbcfd=spawn(_0x4de13f['kIJlT'],[_0x4de13f['EYOge'],_0x4de13f['iKEOe'],'update',_0x4de13f[_0x4d7b17(0x183)]],{'stdio':_0x4de13f[_0x4d7b17(0x17e)],'shell':_0x4de13f[_0x4d7b17(0x18b)](process['platform'],_0x4de13f['HpwQn'])});_0x4fbcfd['on']('close',_0x5d8529=>{_0x4de13f['tAmQS'](_0x7b6368,_0x5d8529===0x0);}),_0x4fbcfd['on'](_0x4de13f['jWKWr'],()=>{const _0x48ae62=_0x4d7b17;_0x54afc1[_0x48ae62(0x15c)](_0x7b6368,![]);});});}async function updateClaudePlugin(_0x29b19d){const _0x3101e9=_0x7da3,_0x453393={'acoLa':function(_0x1e761d,_0x156673){return _0x1e761d(_0x156673);},'NAWTt':function(_0x2a6bb2,_0x509d40){return _0x2a6bb2===_0x509d40;},'oMZhN':'ranger@trailhead','slrQC':'--scope','mQgMG':'claude','qeCvK':_0x3101e9(0x17f)};return new Promise(_0x4048b7=>{const _0x5b5268=_0x3101e9,_0x4a0157={'wnJIO':function(_0x471d3b,_0x45f213){const _0x5921e1=_0x7da3;return _0x453393[_0x5921e1(0x165)](_0x471d3b,_0x45f213);},'sTJOR':function(_0x3d5f49,_0x1686fd){return _0x453393['NAWTt'](_0x3d5f49,_0x1686fd);}},_0x3334eb=['plugin',_0x5b5268(0x16c),_0x453393[_0x5b5268(0x177)]];_0x29b19d&&_0x3334eb['push'](_0x453393['slrQC'],_0x29b19d);const _0x401451=spawn(_0x453393['mQgMG'],_0x3334eb,{'stdio':'pipe','shell':_0x453393[_0x5b5268(0x176)](process['platform'],_0x453393[_0x5b5268(0x159)])});_0x401451['on'](_0x5b5268(0x186),_0x132fd5=>{const _0x530e94=_0x5b5268;_0x4a0157[_0x530e94(0x174)](_0x4048b7,_0x4a0157[_0x530e94(0x172)](_0x132fd5,0x0));}),_0x401451['on']('error',()=>{_0x4048b7(![]);});});}function isSkillInstalled(_0x2cf2c1,_0x4e0174){const _0xc99206=_0x7da3,_0x430915={'eZEze':function(_0x4e5470,_0x262f71,_0x11fbe5){return _0x4e5470(_0x262f71,_0x11fbe5);},'RyPWj':function(_0x36da5e,_0x57d8b5){return _0x36da5e(_0x57d8b5);}},_0x33ccd3=_0x430915[_0xc99206(0x152)](join,_0x430915[_0xc99206(0x14d)](getSkillsDir,_0x4e0174),_0x2cf2c1);return existsSync(_0x33ccd3);}async function reinstallSkills(_0x3c34ce){const _0xa8f7f5=_0x7da3,_0x3c7f20={'MDZCU':_0xa8f7f5(0x17c),'Naqrj':_0xa8f7f5(0x153),'JcPbT':function(_0x74d750,_0x57da7a,_0x28c34){return _0x74d750(_0x57da7a,_0x28c34);},'kORwr':function(_0x141bab,_0x58c962){return _0x141bab===_0x58c962;},'aPTIS':'\x0aNo\x20ranger-managed\x20skills\x20found\x20to\x20reinstall.','nFoAL':function(_0x42701f,_0x13ca1f,_0x33d5ae){return _0x42701f(_0x13ca1f,_0x33d5ae);}},_0x3ab0b9=[_0x3c7f20['MDZCU'],_0x3c7f20['Naqrj']],_0x2d6ee4=[];for(const _0x89a16f of _0x3ab0b9){for(const _0x5c1466 of RANGER_MANAGED_SKILLS){_0x3c7f20[_0xa8f7f5(0x16d)](isSkillInstalled,_0x5c1466,_0x89a16f)&&_0x2d6ee4['push']({'skillName':_0x5c1466,'level':_0x89a16f});}}for(const _0x8f6088 of _0x3ab0b9){for(const _0x2f7059 of DEPRECATED_SKILLS){await _0x3c7f20['JcPbT'](removeSkill,_0x2f7059,_0x8f6088);}}if(_0x3c7f20['kORwr'](_0x2d6ee4['length'],0x0)){console[_0xa8f7f5(0x162)](_0x3c7f20['aPTIS']);return;}console['log'](_0xa8f7f5(0x161)+_0x2d6ee4['length']+'\x20ranger-managed\x20skill(s)...');for(const {skillName:_0x43342d,level:_0x3d1417}of _0x2d6ee4){try{await _0x3c7f20[_0xa8f7f5(0x14f)](installSkill,_0x43342d,{'level':_0x3d1417,'cliVersion':_0x3c34ce});}catch(_0x5343f9){console['warn']('\x20\x20Failed\x20to\x20reinstall\x20'+_0x3d1417+_0xa8f7f5(0x163)+_0x43342d+':',_0x5343f9);}}}async function ensureActiveProfileGitignored(){const _0x32016b=_0x7da3,_0x1284dc={'qrqEy':function(_0x421d07,_0x420bf6,_0x1fa939){return _0x421d07(_0x420bf6,_0x1fa939);},'WneVk':function(_0x12b693){return _0x12b693();},'GJBkN':_0x32016b(0x16b),'PmUIZ':function(_0x7cb61f,_0x2a80f7,_0x496e77){return _0x7cb61f(_0x2a80f7,_0x496e77);},'juJvy':_0x32016b(0x18e),'InXKj':function(_0x13f859,_0x35e958){return _0x13f859===_0x35e958;}},_0x5d7d3b=_0x1284dc[_0x32016b(0x180)](join,_0x1284dc[_0x32016b(0x171)](getRangerDir),_0x1284dc['GJBkN']);if(!existsSync(_0x5d7d3b))return![];let _0x161bd3='';try{_0x161bd3=await _0x1284dc[_0x32016b(0x15d)](readFile,_0x5d7d3b,_0x1284dc[_0x32016b(0x175)]);}catch{return![];}const _0x24c71c=_0x161bd3[_0x32016b(0x15f)](/\r?\n/);if(_0x24c71c[_0x32016b(0x189)](_0x6beaa3=>_0x6beaa3[_0x32016b(0x188)]()==='active-profile.txt'))return![];let _0x51404c=_0x24c71c[_0x32016b(0x185)](_0x5a6813=>_0x5a6813[_0x32016b(0x188)]()==='active-feature.txt');_0x1284dc['InXKj'](_0x51404c,-0x1)&&(_0x51404c=_0x24c71c[_0x32016b(0x14c)]);_0x24c71c[_0x32016b(0x166)](_0x51404c,0x0,'active-profile.txt');let _0x3c459d=_0x24c71c['join']('\x0a');!_0x3c459d['endsWith']('\x0a')&&(_0x3c459d+='\x0a');try{await writeFile(_0x5d7d3b,_0x3c459d,'utf-8');}catch{return![];}return!![];}export async function update(){const _0x3bb28b=_0x7da3,_0x11cb2a={'qxjUD':function(_0x5f4ad5){return _0x5f4ad5();},'rtLPj':'Failed\x20to\x20check\x20for\x20updates.\x20Please\x20check\x20your\x20network\x20connection.','MdCPA':_0x3bb28b(0x160),'cOUpF':function(_0x27c3c7,_0x49391c){return _0x27c3c7<_0x49391c;},'jPJhh':'\x0aClaude\x20marketplace\x20updated\x20(trailhead).','haSDa':'✓\x20Migrated\x20active\x20profile\x20file'},_0x7f9025=_0x11cb2a[_0x3bb28b(0x16a)](getCurrentVersion);console[_0x3bb28b(0x162)]('\x0aCurrent\x20version:\x20'+_0x7f9025),console['log']('Checking\x20for\x20updates...');const _0x2fe9c0=_0x11cb2a[_0x3bb28b(0x16a)](getLatestVersion);if(!_0x2fe9c0)throw new Error(_0x11cb2a['rtLPj']);console['log'](_0x3bb28b(0x17a)+_0x2fe9c0);const _0x325729=compareVersions(_0x7f9025,_0x2fe9c0);let _0x248a8d=_0x7f9025;if(_0x325729===0x0)console[_0x3bb28b(0x162)](_0x11cb2a[_0x3bb28b(0x16f)]);else{if(_0x11cb2a[_0x3bb28b(0x157)](_0x325729,0x0))console[_0x3bb28b(0x162)](_0x3bb28b(0x155)+_0x7f9025+_0x3bb28b(0x154)+_0x2fe9c0+').');else{const _0x57546f=await runInstall();if(_0x57546f)console['log'](_0x3bb28b(0x164)+_0x2fe9c0),_0x248a8d=_0x2fe9c0;else throw new Error(_0x3bb28b(0x150)+PACKAGE_NAME+'@latest');}}await reinstallSkills(_0x248a8d);const _0x214daa=await _0x11cb2a['qxjUD'](updateClaudeMarketplace);_0x214daa&&console[_0x3bb28b(0x162)](_0x11cb2a[_0x3bb28b(0x15b)]);const _0x12c925=await updateClaudePlugin();_0x12c925&&console['log'](_0x3bb28b(0x18d));const _0x193062=await updateClaudePlugin(_0x3bb28b(0x17c));_0x193062&&console['log']((_0x12c925?'':'\x0a')+_0x3bb28b(0x173));const _0x4974bf=await _0x11cb2a['qxjUD'](migrateActiveProfileFile);_0x4974bf&&console[_0x3bb28b(0x162)](_0x11cb2a[_0x3bb28b(0x18f)]);const _0x45cdd2=await ensureActiveProfileGitignored();console['log'](_0x3bb28b(0x181));}
1
+ (function(_0x52ca44,_0x3cf5d5){const _0x452a3b=_0x1773,_0x21f676=_0x52ca44();while(!![]){try{const _0x5b44d6=-parseInt(_0x452a3b(0xc1))/0x1*(parseInt(_0x452a3b(0xec))/0x2)+parseInt(_0x452a3b(0xe7))/0x3+parseInt(_0x452a3b(0xb3))/0x4*(parseInt(_0x452a3b(0xd4))/0x5)+parseInt(_0x452a3b(0xb4))/0x6+-parseInt(_0x452a3b(0xc6))/0x7*(parseInt(_0x452a3b(0xca))/0x8)+parseInt(_0x452a3b(0xd0))/0x9+-parseInt(_0x452a3b(0xd7))/0xa;if(_0x5b44d6===_0x3cf5d5)break;else _0x21f676['push'](_0x21f676['shift']());}catch(_0x4726f4){_0x21f676['push'](_0x21f676['shift']());}}}(_0xba67,0x78f13));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 _0x5653e7=_0x1773,_0x7b25bc={'lFdwh':function(_0x54ce99,_0x2ff208){return _0x54ce99(_0x2ff208);},'PQoiZ':function(_0x1e844b,_0x3172ae){return _0x1e844b===_0x3172ae;},'GahgV':function(_0x3f646a,_0x162a1d,_0x342797,_0x195dac){return _0x3f646a(_0x162a1d,_0x342797,_0x195dac);},'BxrVb':_0x5653e7(0xe9),'AfbXJ':'inherit'};return new Promise(_0x1bd47e=>{const _0x4822cd=_0x5653e7;console['log']('\x0aInstalling\x20'+PACKAGE_NAME+'@latest...\x0a');const _0x183cc8=_0x7b25bc['GahgV'](spawn,'npm',[_0x7b25bc[_0x4822cd(0xc0)],'-g',PACKAGE_NAME+_0x4822cd(0xe0)],{'stdio':_0x7b25bc[_0x4822cd(0xcb)],'shell':process[_0x4822cd(0xb0)]===_0x4822cd(0xba)});_0x183cc8['on']('close',_0x2702a1=>{_0x7b25bc['lFdwh'](_0x1bd47e,_0x7b25bc['PQoiZ'](_0x2702a1,0x0));}),_0x183cc8['on']('error',()=>{_0x1bd47e(![]);});});}async function updateClaudeMarketplace(){const _0x11347b=_0x1773,_0x5a625b={'vMJBk':function(_0x4c43c1,_0x3ab966,_0x35b30c,_0x15db46){return _0x4c43c1(_0x3ab966,_0x35b30c,_0x15db46);},'jYwfF':_0x11347b(0xc5),'OhSlw':'plugin','ZxdDE':_0x11347b(0xbb),'UOHPs':'update','iMchv':'pipe','voSrO':_0x11347b(0xba),'iPFGe':_0x11347b(0xcc)};return new Promise(_0x2c168d=>{const _0x59bc19=_0x11347b,_0x5286d2=_0x5a625b['vMJBk'](spawn,_0x5a625b[_0x59bc19(0xdc)],[_0x5a625b[_0x59bc19(0xc3)],_0x5a625b[_0x59bc19(0xeb)],_0x5a625b[_0x59bc19(0xb2)],'trailhead'],{'stdio':_0x5a625b[_0x59bc19(0xd5)],'shell':process[_0x59bc19(0xb0)]===_0x5a625b['voSrO']});_0x5286d2['on']('close',_0xbb934d=>{_0x2c168d(_0xbb934d===0x0);}),_0x5286d2['on'](_0x5a625b['iPFGe'],()=>{_0x2c168d(![]);});});}async function updateClaudePlugin(_0x361117){const _0x10a82b=_0x1773,_0x368358={'KuLuL':function(_0x1fa256,_0x454f81){return _0x1fa256(_0x454f81);},'Dvhqv':_0x10a82b(0xad),'iFLmK':'update','wasOI':_0x10a82b(0xd3),'oBltO':'claude','KIPHZ':_0x10a82b(0xb9),'caeIC':_0x10a82b(0xba),'sChnq':'close','ImMFo':_0x10a82b(0xcc)};return new Promise(_0x55cef9=>{const _0x205891=_0x10a82b,_0x15e0e7=[_0x368358['Dvhqv'],_0x368358[_0x205891(0xbd)],_0x368358['wasOI']];_0x361117&&_0x15e0e7[_0x205891(0xd8)]('--scope',_0x361117);const _0x1cecd6=spawn(_0x368358['oBltO'],_0x15e0e7,{'stdio':_0x368358[_0x205891(0xe8)],'shell':process[_0x205891(0xb0)]===_0x368358[_0x205891(0xdd)]});_0x1cecd6['on'](_0x368358['sChnq'],_0x1b5255=>{_0x55cef9(_0x1b5255===0x0);}),_0x1cecd6['on'](_0x368358['ImMFo'],()=>{const _0x16c437=_0x205891;_0x368358[_0x16c437(0xe1)](_0x55cef9,![]);});});}function isSkillInstalled(_0x137e02,_0x270679,_0x4a4a53){const _0x468977=_0x1773,_0x5e2837={'aXgHn':function(_0x2ce18a,_0x6f77ee){return _0x2ce18a===_0x6f77ee;},'jkhzY':'opencode'},_0x383e5f=_0x5e2837['aXgHn'](_0x4a4a53,_0x5e2837[_0x468977(0xb8)])?getOpencodeSkillsDir(_0x270679):getSkillsDir(_0x270679),_0x5a5280=join(_0x383e5f,_0x137e02);return existsSync(_0x5a5280);}async function reinstallSkills(_0x5c16b5){const _0x2c6482=_0x1773,_0x3b249f={'gsUbB':'user','ZqiWK':function(_0x571508,_0x29104e,_0x51ec50,_0x126a5a){return _0x571508(_0x29104e,_0x51ec50,_0x126a5a);},'mcSvT':_0x2c6482(0xc5),'WCGgq':function(_0x1161e3,_0x28b90b,_0x518210,_0x1e9406){return _0x1161e3(_0x28b90b,_0x518210,_0x1e9406);},'RXcNJ':function(_0x274520,_0x162464,_0x573755){return _0x274520(_0x162464,_0x573755);},'eRqiS':_0x2c6482(0xcf),'ccswY':function(_0x40f6d8,_0x189f23,_0x9af0db){return _0x40f6d8(_0x189f23,_0x9af0db);}},_0x4de03c=['project',_0x3b249f[_0x2c6482(0xbf)]],_0x405f6c=[];for(const _0x1e0f06 of _0x4de03c){for(const _0x483089 of RANGER_MANAGED_SKILLS){_0x3b249f['ZqiWK'](isSkillInstalled,_0x483089,_0x1e0f06,_0x2c6482(0xc5))&&_0x405f6c['push']({'skillName':_0x483089,'level':_0x1e0f06,'platform':_0x3b249f['mcSvT']}),_0x3b249f[_0x2c6482(0xde)](isSkillInstalled,_0x483089,_0x1e0f06,_0x2c6482(0xbc))&&_0x405f6c[_0x2c6482(0xd8)]({'skillName':_0x483089,'level':_0x1e0f06,'platform':'opencode'});}}for(const _0x109526 of _0x4de03c){for(const _0x24e76a of DEPRECATED_SKILLS){await _0x3b249f['RXcNJ'](removeSkill,_0x24e76a,_0x109526);}}if(_0x405f6c[_0x2c6482(0xc9)]===0x0){console['log'](_0x3b249f[_0x2c6482(0xb7)]);return;}console['log']('\x0aReinstalling\x20'+_0x405f6c['length']+'\x20ranger-managed\x20skill(s)...');for(const {skillName:_0x284931,level:_0x4e4e59,platform:_0x5b653}of _0x405f6c){try{await _0x3b249f['ccswY'](installSkill,_0x284931,{'level':_0x4e4e59,'cliVersion':_0x5c16b5,'platform':_0x5b653});}catch(_0x4bd77f){console[_0x2c6482(0xc8)]('\x20\x20Failed\x20to\x20reinstall\x20'+_0x5b653+'\x20'+_0x4e4e59+_0x2c6482(0xc4)+_0x284931+':',_0x4bd77f);}}}function _0xba67(){const _0x56ab32=['Checking\x20for\x20updates...','plugin','active-feature.txt','tZXOD','platform','\x0aSuccessfully\x20updated\x20to\x20version\x20','UOHPs','4DArlzH','5944338hCyBAD','MpEfQ','Update\x20failed.\x20You\x20may\x20need\x20to\x20run\x20with\x20sudo:\x20sudo\x20npm\x20install\x20-g\x20','eRqiS','jkhzY','pipe','win32','marketplace','opencode','iFLmK','split','gsUbB','BxrVb','135pJycBy','\x0a✅\x20Update\x20complete!','OhSlw','\x20skill\x20','claude','3325959wXwjnh','some','warn','length','8hBGeIR','AfbXJ','error','\x0aYou\x20are\x20already\x20on\x20the\x20latest\x20version.','active-profile.txt','\x0aNo\x20ranger-managed\x20skills\x20found\x20to\x20reinstall.','6735906VGdnjt','qjPMN','Claude\x20plugin\x20updated\x20(project\x20scope).','ranger@trailhead','1571010PVMZQC','iMchv','project','20004590CJPOKA','push','EKeoU','\x0aYour\x20version\x20(','\x0aClaude\x20plugin\x20updated\x20(user\x20scope).','jYwfF','caeIC','WCGgq','eQRWa','@latest','KuLuL','utf-8','log','✓\x20Migrated\x20active\x20profile\x20file',')\x20is\x20newer\x20than\x20the\x20published\x20version\x20(','uKLwS','2767833IlhfMB','KIPHZ','install','YXgmM','ZxdDE','74lFwwZS'];_0xba67=function(){return _0x56ab32;};return _0xba67();}function _0x1773(_0x2b8551,_0x139a31){_0x2b8551=_0x2b8551-0xac;const _0xba6733=_0xba67();let _0x1773b6=_0xba6733[_0x2b8551];return _0x1773b6;}async function ensureActiveProfileGitignored(){const _0x51690e=_0x1773,_0x4e6691={'uKLwS':function(_0x39f249,_0x1003e4,_0x3ee704){return _0x39f249(_0x1003e4,_0x3ee704);},'DkHlL':_0x51690e(0xe2),'MpEfQ':function(_0x35863a,_0x246c73){return _0x35863a===_0x246c73;}},_0x44b648=join(getRangerDir(),'.gitignore');if(!existsSync(_0x44b648))return![];let _0xed126d='';try{_0xed126d=await _0x4e6691[_0x51690e(0xe6)](readFile,_0x44b648,_0x4e6691['DkHlL']);}catch{return![];}const _0x245188=_0xed126d[_0x51690e(0xbe)](/\r?\n/);if(_0x245188[_0x51690e(0xc7)](_0x107941=>_0x107941['trim']()===_0x51690e(0xce)))return![];let _0x529db2=_0x245188['findIndex'](_0x1749c7=>_0x1749c7['trim']()===_0x51690e(0xae));_0x4e6691[_0x51690e(0xb5)](_0x529db2,-0x1)&&(_0x529db2=_0x245188['length']);_0x245188['splice'](_0x529db2,0x0,_0x51690e(0xce));let _0xe0fc9a=_0x245188['join']('\x0a');!_0xe0fc9a['endsWith']('\x0a')&&(_0xe0fc9a+='\x0a');try{await writeFile(_0x44b648,_0xe0fc9a,'utf-8');}catch{return![];}return!![];}export async function update(){const _0x4cbab9=_0x1773,_0x5e324b={'eQRWa':function(_0x191edc){return _0x191edc();},'EKeoU':_0x4cbab9(0xac),'Ojpfz':function(_0x46dfe5,_0x3e8fa5,_0x1ce6e0){return _0x46dfe5(_0x3e8fa5,_0x1ce6e0);},'sArog':_0x4cbab9(0xcd),'qjPMN':function(_0x1efd3a){return _0x1efd3a();},'YXgmM':function(_0x3b25aa,_0x5882da){return _0x3b25aa(_0x5882da);},'rdtqd':_0x4cbab9(0xdb),'wzXYF':function(_0x2c813a,_0x4e5d1c){return _0x2c813a(_0x4e5d1c);},'tZXOD':_0x4cbab9(0xe4)},_0x307451=_0x5e324b['eQRWa'](getCurrentVersion);console['log']('\x0aCurrent\x20version:\x20'+_0x307451),console['log'](_0x5e324b[_0x4cbab9(0xd9)]);const _0x3a67f7=_0x5e324b[_0x4cbab9(0xdf)](getLatestVersion);if(!_0x3a67f7)throw new Error('Failed\x20to\x20check\x20for\x20updates.\x20Please\x20check\x20your\x20network\x20connection.');console[_0x4cbab9(0xe3)]('Latest\x20version:\x20\x20'+_0x3a67f7);const _0x2bd014=_0x5e324b['Ojpfz'](compareVersions,_0x307451,_0x3a67f7);let _0x74fa3b=_0x307451;if(_0x2bd014===0x0)console['log'](_0x5e324b['sArog']);else{if(_0x2bd014<0x0)console[_0x4cbab9(0xe3)](_0x4cbab9(0xda)+_0x307451+_0x4cbab9(0xe5)+_0x3a67f7+').');else{const _0x3f987b=await _0x5e324b[_0x4cbab9(0xd1)](runInstall);if(_0x3f987b)console['log'](_0x4cbab9(0xb1)+_0x3a67f7),_0x74fa3b=_0x3a67f7;else throw new Error(_0x4cbab9(0xb6)+PACKAGE_NAME+'@latest');}}await reinstallSkills(_0x74fa3b);const _0x143bea=await isMarketplaceAdded('trailhead'),_0x9c61ca=await _0x5e324b[_0x4cbab9(0xea)](isPluginInstalled,'ranger@trailhead');if(_0x143bea){const _0x2403f5=await updateClaudeMarketplace();_0x2403f5&&console['log']('\x0aClaude\x20marketplace\x20updated\x20(trailhead).');}if(_0x9c61ca){const _0x7a894b=await updateClaudePlugin();_0x7a894b&&console['log'](_0x5e324b['rdtqd']);const _0x1c5330=await _0x5e324b['wzXYF'](updateClaudePlugin,_0x4cbab9(0xd6));_0x1c5330&&console['log']((_0x7a894b?'':'\x0a')+_0x4cbab9(0xd2));}const _0x568377=await migrateActiveProfileFile();_0x568377&&console['log'](_0x5e324b[_0x4cbab9(0xaf)]);const _0xfb3b89=await ensureActiveProfileGitignored();console[_0x4cbab9(0xe3)](_0x4cbab9(0xc2));}
@@ -1 +1 @@
1
- (function(_0x354ea0,_0x4fb433){const _0xebce74=_0x132d,_0x552faa=_0x354ea0();while(!![]){try{const _0x5e91e8=-parseInt(_0xebce74(0x1b8))/0x1*(-parseInt(_0xebce74(0x1a0))/0x2)+-parseInt(_0xebce74(0x1bb))/0x3*(parseInt(_0xebce74(0x1bd))/0x4)+-parseInt(_0xebce74(0x1b3))/0x5*(-parseInt(_0xebce74(0x1ac))/0x6)+-parseInt(_0xebce74(0x1ab))/0x7*(-parseInt(_0xebce74(0x1b7))/0x8)+-parseInt(_0xebce74(0x19a))/0x9+-parseInt(_0xebce74(0x1bc))/0xa+parseInt(_0xebce74(0x198))/0xb;if(_0x5e91e8===_0x4fb433)break;else _0x552faa['push'](_0x552faa['shift']());}catch(_0x24965f){_0x552faa['push'](_0x552faa['shift']());}}}(_0x178c,0x78130));import{writeFile,readFile,unlink}from'fs/promises';function _0x178c(){const _0x39b285=['trackPhaseEnd','918104XbqoEs','1cfAELI','\x20\x20\x20A\x20browser\x20will\x20open\x20with\x20your\x20existing\x20session\x20(if\x20any).','trackPhaseStart','191379rNgTWG','6862890wSuTWy','28BpEmQq','\x20\x20\x20Update\x20your\x20authentication\x20as\x20needed.','settings.json','\x0a✅\x20Profile\x20\x22','about:blank','JOGYd','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','yRlda','VkJUR','pUEZE','2963213ZQpdst','OJZLO','6961797xAczMr','catch','✓\x20Auth\x20state\x20saved\x20to:\x20','browser_auth','FsAMf','contextOptions','1880722kbZIWy','.enc','isTTY','✓\x20Encrypted\x20auth\x20saved\x20to:\x20','Qzhzz','browser','KLZvV','log','goto','QpVTl','baseUrl','42pqDNiQ','39990gdLNmZ','\x22\x20not\x20found.\x20Run\x20first:\x20ranger\x20profile\x20add\x20','wHfGl','utf-8','mMIlM','parse','Config\x20not\x20found\x20at\x20','375pCQLJT','Profile\x20\x22','auth.json'];_0x178c=function(){return _0x39b285;};return _0x178c();}import{join}from'path';import{existsSync}from'fs';import{chromium}from'playwright';import{encrypt}from'./utils/crypto.js';import{getToken}from'./utils/keychain.js';import{getEnvDir,isEnvCi}from'./utils/settings.js';import{addProfileSetupBanner}from'./utils/profileSetupBanner.js';function _0x132d(_0xb2fa35,_0x5b63a2){_0xb2fa35=_0xb2fa35-0x198;const _0x178c87=_0x178c();let _0x132d3d=_0x178c87[_0xb2fa35];return _0x132d3d;}export async function updateEnv(_0x25f8c2,_0x5a5f46){const _0x3a9f7e=_0x132d,_0x2240bc={'pUEZE':function(_0xe1ba9a,_0x56952a){return _0xe1ba9a(_0x56952a);},'mMIlM':_0x3a9f7e(0x1bf),'OdYFD':_0x3a9f7e(0x1b5),'KedcG':function(_0x1b32ae,_0x59c9a9){return _0x1b32ae+_0x59c9a9;},'lTTiC':function(_0x2cb6e0,_0x1eb9a8){return _0x2cb6e0(_0x1eb9a8);},'KLZvV':function(_0x2fbb99,_0x2d5c96,_0x4153e3){return _0x2fbb99(_0x2d5c96,_0x4153e3);},'VkJUR':'utf-8','Qzhzz':function(_0x517b75,_0x534e1e){return _0x517b75===_0x534e1e;},'McxYc':'\x0a📋\x20Authentication\x20Update','etHpy':_0x3a9f7e(0x1b9),'QpVTl':_0x3a9f7e(0x1be),'JOGYd':'\x20\x20\x20When\x20you\x20are\x20done,\x20close\x20the\x20browser.\x0a','yRlda':function(_0x46b3e0,_0x46a0d3){return _0x46b3e0(_0x46a0d3);},'NpRbR':function(_0x3f8c58,_0x1784b3){return _0x3f8c58||_0x1784b3;},'GBrqM':function(_0x14297b,_0x1954ef,_0x223e5f){return _0x14297b(_0x1954ef,_0x223e5f);},'wHfGl':'\x20\x20You\x20can\x20safely\x20commit\x20this\x20file\x20to\x20git.','IChiE':'\x20\x20Run\x20ranger\x20setup\x20in\x20CI\x20to\x20decrypt\x20at\x20runtime.','FsAMf':'browser_auth','OJZLO':'config_write'},_0x17e26d=_0x2240bc[_0x3a9f7e(0x1c6)](getEnvDir,_0x25f8c2),_0x584238=join(_0x17e26d,_0x2240bc[_0x3a9f7e(0x1b0)]),_0x179b97=join(_0x17e26d,_0x2240bc['OdYFD']),_0x43d253=_0x2240bc['KedcG'](_0x179b97,_0x3a9f7e(0x1a1)),_0x5a3379=process['stdin'][_0x3a9f7e(0x1a2)]&&process['stdout'][_0x3a9f7e(0x1a2)];if(!_0x5a3379)throw new Error(_0x3a9f7e(0x1c3));if(!_0x2240bc[_0x3a9f7e(0x1c6)](existsSync,_0x17e26d))throw new Error(_0x3a9f7e(0x1b4)+_0x25f8c2+_0x3a9f7e(0x1ad)+_0x25f8c2);if(!_0x2240bc['lTTiC'](existsSync,_0x584238))throw new Error(_0x3a9f7e(0x1b2)+_0x584238+'.\x20Run\x20first:\x20ranger\x20profile\x20add\x20'+_0x25f8c2);const _0x4c7eee=await _0x2240bc[_0x3a9f7e(0x1a6)](readFile,_0x584238,_0x2240bc[_0x3a9f7e(0x1c5)]),_0x864c2e=JSON[_0x3a9f7e(0x1b1)](_0x4c7eee),_0x569283=_0x2240bc[_0x3a9f7e(0x1a4)](typeof _0x864c2e[_0x3a9f7e(0x1aa)],'string')?_0x864c2e[_0x3a9f7e(0x1aa)]:undefined,_0xc7b6d2=_0x2240bc['pUEZE'](existsSync,_0x179b97),_0x3f0911=_0x2240bc[_0x3a9f7e(0x1c6)](isEnvCi,_0x25f8c2);_0x5a5f46?.['trackPhaseStart'](_0x3a9f7e(0x19d)),console[_0x3a9f7e(0x1a7)](_0x2240bc['McxYc']),console['log'](_0x2240bc['etHpy']),console[_0x3a9f7e(0x1a7)](_0x2240bc[_0x3a9f7e(0x1a9)]),console['log'](_0x2240bc[_0x3a9f7e(0x1c2)]);const _0x56d8cb=await chromium['launch']({'headless':![]}),_0x3e030d=_0xc7b6d2?{'storageState':_0x179b97}:{};let _0x3421c1=null;try{_0x3421c1=await _0x56d8cb['newContext'](_0x3e030d),await _0x2240bc[_0x3a9f7e(0x1c4)](addProfileSetupBanner,_0x3421c1);const _0xe45a15=await _0x3421c1['newPage']();await _0xe45a15[_0x3a9f7e(0x1a8)](_0x2240bc['NpRbR'](_0x569283,_0x3a9f7e(0x1c1))),await new Promise(_0x523cc8=>{_0xe45a15['on']('close',async()=>{try{console['log']('Saving\x20authentication\x20state...'),await _0x3421c1?.['storageState']({'path':_0x179b97}),_0x523cc8();}catch{_0x523cc8();}});});}finally{_0x3421c1&&await _0x3421c1['close']()[_0x3a9f7e(0x19b)](()=>{}),await _0x56d8cb['close']()['catch'](()=>{});}if(_0x3f0911){const _0x22eded=await _0x2240bc['GBrqM'](readFile,_0x179b97,_0x3a9f7e(0x1af)),_0x568a5b=await getToken();if(!_0x568a5b)console['error']('\x20\x20Could\x20not\x20encrypt:\x20No\x20API\x20token\x20found.\x20Run:\x20ranger\x20setup\x20[token]'),console['log'](_0x3a9f7e(0x19c)+_0x179b97);else{const _0x5a39bf=encrypt(_0x22eded,_0x568a5b);await _0x2240bc[_0x3a9f7e(0x1a6)](writeFile,_0x43d253,_0x5a39bf),await unlink(_0x179b97),console[_0x3a9f7e(0x1a7)](_0x3a9f7e(0x1a3)+_0x43d253),console['log'](_0x2240bc[_0x3a9f7e(0x1ae)]),console[_0x3a9f7e(0x1a7)](_0x2240bc['IChiE']);}}else console['log'](_0x3a9f7e(0x19c)+_0x179b97);_0x5a5f46?.['trackPhaseEnd'](_0x2240bc[_0x3a9f7e(0x19e)]),_0x5a5f46?.[_0x3a9f7e(0x1ba)](_0x2240bc['OJZLO']),_0x864c2e[_0x3a9f7e(0x1a5)]=_0x864c2e[_0x3a9f7e(0x1a5)]||{},_0x864c2e['browser']['contextOptions']=_0x864c2e[_0x3a9f7e(0x1a5)][_0x3a9f7e(0x19f)]||{},_0x864c2e['browser'][_0x3a9f7e(0x19f)]['storageState']=_0x179b97,await writeFile(_0x584238,JSON['stringify'](_0x864c2e,null,0x2)),console['log']('✓\x20Updated\x20config:\x20'+_0x584238),_0x5a5f46?.[_0x3a9f7e(0x1b6)](_0x2240bc[_0x3a9f7e(0x199)]),console['log'](_0x3a9f7e(0x1c0)+_0x25f8c2+'\x22\x20authentication\x20updated');}
1
+ (function(_0x89dbe5,_0x2b4902){const _0x3f752b=_0x3ef6,_0x70a361=_0x89dbe5();while(!![]){try{const _0xc3bb3a=parseInt(_0x3f752b(0x1b0))/0x1+-parseInt(_0x3f752b(0x1a7))/0x2+parseInt(_0x3f752b(0x1b2))/0x3+-parseInt(_0x3f752b(0x199))/0x4*(-parseInt(_0x3f752b(0x198))/0x5)+-parseInt(_0x3f752b(0x1bd))/0x6*(parseInt(_0x3f752b(0x19d))/0x7)+-parseInt(_0x3f752b(0x191))/0x8+parseInt(_0x3f752b(0x1b7))/0x9;if(_0xc3bb3a===_0x2b4902)break;else _0x70a361['push'](_0x70a361['shift']());}catch(_0x205c5f){_0x70a361['push'](_0x70a361['shift']());}}}(_0x45dd,0xa8e6c));import{writeFile,readFile,unlink}from'fs/promises';import{join}from'path';import{existsSync}from'fs';function _0x45dd(){const _0x3f1037=['browser_auth','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','stdout','.enc','close','WBVyD','\x0a✅\x20Profile\x20\x22','tzrlK','kODlN','744008sXjzPY','kIJsn','stdin','hRIzZ','Config\x20not\x20found\x20at\x20','browser','Profile\x20\x22','SvcNl','✓\x20Auth\x20state\x20saved\x20to:\x20','743822kGeRga','VCroY','3070065BXFxjw','\x20\x20\x20Update\x20your\x20authentication\x20as\x20needed.','utf-8','trackPhaseStart','hacVC','16246152hfUcYS','lbpag','isTTY','\x20\x20You\x20can\x20safely\x20commit\x20this\x20file\x20to\x20git.','OisFR','faCvf','6ASIpKf','log','\x22\x20authentication\x20updated','FMWBf','goto','faKSw','Saving\x20authentication\x20state...','10400736SJUApY','JOabE','launch','.\x20Run\x20first:\x20ranger\x20profile\x20add\x20','contextOptions','string','\x20\x20\x20When\x20you\x20are\x20done,\x20close\x20the\x20browser.\x0a','15mcUKaK','32nXNCnV','ygXLC','error','\x20\x20Run\x20ranger\x20setup\x20in\x20CI\x20to\x20decrypt\x20at\x20runtime.','8458891DIWmwI'];_0x45dd=function(){return _0x3f1037;};return _0x45dd();}import{chromium}from'playwright';function _0x3ef6(_0x294b7d,_0x48bb72){_0x294b7d=_0x294b7d-0x18f;const _0x45dd0f=_0x45dd();let _0x3ef6da=_0x45dd0f[_0x294b7d];return _0x3ef6da;}import{encrypt}from'./utils/crypto.js';import{getToken}from'./utils/keychain.js';import{getEnvDir,isEnvCi}from'./utils/settings.js';import{addProfileSetupBanner}from'./utils/profileSetupBanner.js';export async function updateEnv(_0x3e6a1c,_0x3c9b21){const _0x51c5b5=_0x3ef6,_0x2e1b3d={'FMWBf':_0x51c5b5(0x1a2),'ygXLC':function(_0x49cb5c,_0x53c19a){return _0x49cb5c(_0x53c19a);},'tzrlK':'settings.json','faCvf':function(_0x1e2efc,_0x1a71c0,_0x3bb9b7){return _0x1e2efc(_0x1a71c0,_0x3bb9b7);},'hacVC':'auth.json','fLhGJ':function(_0x544bbf,_0x142042){return _0x544bbf+_0x142042;},'kIJsn':_0x51c5b5(0x1a1),'hRIzZ':function(_0x2d344c,_0x4ff59d){return _0x2d344c(_0x4ff59d);},'mjMUb':_0x51c5b5(0x1b4),'SvcNl':_0x51c5b5(0x196),'kODlN':function(_0x308bef,_0x469ade){return _0x308bef(_0x469ade);},'KAHrQ':_0x51c5b5(0x19e),'JOabE':'\x0a📋\x20Authentication\x20Update','OisFR':'\x20\x20\x20A\x20browser\x20will\x20open\x20with\x20your\x20existing\x20session\x20(if\x20any).','jBDlW':_0x51c5b5(0x1b3),'WBVyD':function(_0x4e9ee5,_0x2ab33f){return _0x4e9ee5(_0x2ab33f);},'bvaJn':function(_0x3d6ac1){return _0x3d6ac1();},'fzmgK':'\x20\x20Could\x20not\x20encrypt:\x20No\x20API\x20token\x20found.\x20Run:\x20ranger\x20setup\x20[token]','ReFeE':_0x51c5b5(0x1ba),'VCroY':'config_write'},_0x2d32b9=_0x2e1b3d[_0x51c5b5(0x19a)](getEnvDir,_0x3e6a1c),_0x103672=join(_0x2d32b9,_0x2e1b3d[_0x51c5b5(0x1a5)]),_0x4004b2=_0x2e1b3d[_0x51c5b5(0x1bc)](join,_0x2d32b9,_0x2e1b3d[_0x51c5b5(0x1b6)]),_0x176a20=_0x2e1b3d['fLhGJ'](_0x4004b2,_0x2e1b3d[_0x51c5b5(0x1a8)]),_0x4966ff=process[_0x51c5b5(0x1a9)]['isTTY']&&process[_0x51c5b5(0x1a0)][_0x51c5b5(0x1b9)];if(!_0x4966ff)throw new Error(_0x51c5b5(0x19f));if(!existsSync(_0x2d32b9))throw new Error(_0x51c5b5(0x1ad)+_0x3e6a1c+'\x22\x20not\x20found.\x20Run\x20first:\x20ranger\x20profile\x20add\x20'+_0x3e6a1c);if(!_0x2e1b3d[_0x51c5b5(0x1aa)](existsSync,_0x103672))throw new Error(_0x51c5b5(0x1ab)+_0x103672+_0x51c5b5(0x194)+_0x3e6a1c);const _0x4ca18f=await readFile(_0x103672,_0x2e1b3d['mjMUb']),_0x48232e=JSON['parse'](_0x4ca18f),_0x82218a=typeof _0x48232e['baseUrl']===_0x2e1b3d[_0x51c5b5(0x1ae)]?_0x48232e['baseUrl']:undefined,_0x136806=_0x2e1b3d[_0x51c5b5(0x1a6)](existsSync,_0x4004b2),_0x1ea808=_0x2e1b3d['kODlN'](isEnvCi,_0x3e6a1c);_0x3c9b21?.[_0x51c5b5(0x1b5)](_0x2e1b3d['KAHrQ']),console[_0x51c5b5(0x1be)](_0x2e1b3d[_0x51c5b5(0x192)]),console[_0x51c5b5(0x1be)](_0x2e1b3d[_0x51c5b5(0x1bb)]),console[_0x51c5b5(0x1be)](_0x2e1b3d['jBDlW']),console[_0x51c5b5(0x1be)](_0x51c5b5(0x197));const _0x421815=await chromium[_0x51c5b5(0x193)]({'headless':![]}),_0xe96227=_0x136806?{'storageState':_0x4004b2}:{};let _0x254d19=null;try{_0x254d19=await _0x421815['newContext'](_0xe96227),await _0x2e1b3d['WBVyD'](addProfileSetupBanner,_0x254d19);const _0x2447bb=await _0x254d19['newPage']();await _0x2447bb[_0x51c5b5(0x1c1)](_0x82218a||'about:blank'),await new Promise(_0x536191=>{const _0x21a356=_0x51c5b5,_0xc269ed={'faKSw':_0x21a356(0x190),'lbpag':function(_0x119e6a){return _0x119e6a();}};_0x2447bb['on'](_0x2e1b3d[_0x21a356(0x1c0)],async()=>{const _0x32632a=_0x21a356;try{console['log'](_0xc269ed[_0x32632a(0x18f)]),await _0x254d19?.['storageState']({'path':_0x4004b2}),_0xc269ed[_0x32632a(0x1b8)](_0x536191);}catch{_0xc269ed[_0x32632a(0x1b8)](_0x536191);}});});}finally{_0x254d19&&await _0x254d19[_0x51c5b5(0x1a2)]()['catch'](()=>{}),await _0x421815[_0x51c5b5(0x1a2)]()['catch'](()=>{});}if(_0x1ea808){const _0xcec198=await readFile(_0x4004b2,_0x2e1b3d['mjMUb']),_0x4ff7bd=await _0x2e1b3d['bvaJn'](getToken);if(!_0x4ff7bd)console[_0x51c5b5(0x19b)](_0x2e1b3d['fzmgK']),console['log'](_0x51c5b5(0x1af)+_0x4004b2);else{const _0x482289=_0x2e1b3d['faCvf'](encrypt,_0xcec198,_0x4ff7bd);await writeFile(_0x176a20,_0x482289),await _0x2e1b3d[_0x51c5b5(0x1a3)](unlink,_0x4004b2),console[_0x51c5b5(0x1be)]('✓\x20Encrypted\x20auth\x20saved\x20to:\x20'+_0x176a20),console[_0x51c5b5(0x1be)](_0x2e1b3d['ReFeE']),console['log'](_0x51c5b5(0x19c));}}else console[_0x51c5b5(0x1be)]('✓\x20Auth\x20state\x20saved\x20to:\x20'+_0x4004b2);_0x3c9b21?.['trackPhaseEnd'](_0x51c5b5(0x19e)),_0x3c9b21?.['trackPhaseStart'](_0x2e1b3d[_0x51c5b5(0x1b1)]),_0x48232e['browser']=_0x48232e['browser']||{},_0x48232e[_0x51c5b5(0x1ac)][_0x51c5b5(0x195)]=_0x48232e['browser']['contextOptions']||{},_0x48232e[_0x51c5b5(0x1ac)][_0x51c5b5(0x195)]['storageState']=_0x4004b2,await writeFile(_0x103672,JSON['stringify'](_0x48232e,null,0x2)),console['log']('✓\x20Updated\x20config:\x20'+_0x103672),_0x3c9b21?.['trackPhaseEnd'](_0x2e1b3d['VCroY']),console[_0x51c5b5(0x1be)](_0x51c5b5(0x1a4)+_0x3e6a1c+_0x51c5b5(0x1bf));}
@@ -1 +1 @@
1
- (function(_0x5199ec,_0x46f536){const _0x5aaa20=_0x3bcf,_0x4028d9=_0x5199ec();while(!![]){try{const _0x5962f1=parseInt(_0x5aaa20(0x151))/0x1+-parseInt(_0x5aaa20(0x157))/0x2*(-parseInt(_0x5aaa20(0x154))/0x3)+-parseInt(_0x5aaa20(0x14f))/0x4*(parseInt(_0x5aaa20(0x158))/0x5)+parseInt(_0x5aaa20(0x15a))/0x6+parseInt(_0x5aaa20(0x150))/0x7*(parseInt(_0x5aaa20(0x15b))/0x8)+parseInt(_0x5aaa20(0x159))/0x9+-parseInt(_0x5aaa20(0x14e))/0xa;if(_0x5962f1===_0x46f536)break;else _0x4028d9['push'](_0x4028d9['shift']());}catch(_0x57005b){_0x4028d9['push'](_0x4028d9['shift']());}}}(_0x564f,0x5cb7b));function _0x564f(){const _0x2ac6f4=['3156dejlIp','5kuScBE','3681936DGGRCx','1460868fYizif','8HjvskC','13748930OTFGaQ','308332veJFsM','5132057HgfuaN','229828vRvmbq','vSHwO','Profile\x20\x22','411mTIQBl','.\x20Run\x20first:\x20ranger\x20profile\x20add\x20','Config\x20not\x20found\x20at\x20'];_0x564f=function(){return _0x2ac6f4;};return _0x564f();}import{join}from'path';function _0x3bcf(_0x345da7,_0xd5d4d3){_0x345da7=_0x345da7-0x14e;const _0x564f6c=_0x564f();let _0x3bcf4f=_0x564f6c[_0x345da7];return _0x3bcf4f;}import{existsSync}from'fs';import{getEnvDir}from'./utils/settings.js';import{writeActiveProfileName}from'./utils/activeProfile.js';export async function useEnv(_0x518720){const _0x555614=_0x3bcf,_0x11006d={'vSHwO':function(_0x5891b1,_0x380f67){return _0x5891b1(_0x380f67);},'XRNln':'settings.json','kIPhH':function(_0x295e62,_0x201f6f){return _0x295e62(_0x201f6f);}},_0x4595b5=_0x11006d[_0x555614(0x152)](getEnvDir,_0x518720),_0x31015a=join(_0x4595b5,_0x11006d['XRNln']);if(!existsSync(_0x4595b5))throw new Error(_0x555614(0x153)+_0x518720+'\x22\x20not\x20found.\x20Run\x20first:\x20ranger\x20profile\x20add\x20'+_0x518720);if(!_0x11006d['kIPhH'](existsSync,_0x31015a))throw new Error(_0x555614(0x156)+_0x31015a+_0x555614(0x155)+_0x518720);await _0x11006d[_0x555614(0x152)](writeActiveProfileName,_0x518720),console['log']('\x0a✓\x20Now\x20using\x20profile\x20\x22'+_0x518720+'\x22');}
1
+ (function(_0x17e663,_0x50bf41){const _0x4f4842=_0x9419,_0x19cc9f=_0x17e663();while(!![]){try{const _0x33d1fa=parseInt(_0x4f4842(0x1be))/0x1+-parseInt(_0x4f4842(0x1bc))/0x2*(parseInt(_0x4f4842(0x1c3))/0x3)+-parseInt(_0x4f4842(0x1c2))/0x4+parseInt(_0x4f4842(0x1bf))/0x5*(-parseInt(_0x4f4842(0x1bb))/0x6)+parseInt(_0x4f4842(0x1b9))/0x7+-parseInt(_0x4f4842(0x1c5))/0x8+parseInt(_0x4f4842(0x1c6))/0x9*(parseInt(_0x4f4842(0x1c4))/0xa);if(_0x33d1fa===_0x50bf41)break;else _0x19cc9f['push'](_0x19cc9f['shift']());}catch(_0x2b3584){_0x19cc9f['push'](_0x19cc9f['shift']());}}}(_0x3642,0x42701));import{join}from'path';import{existsSync}from'fs';function _0x9419(_0x418e8d,_0x5b3adb){_0x418e8d=_0x418e8d-0x1b8;const _0x36423c=_0x3642();let _0x9419a9=_0x36423c[_0x418e8d];return _0x9419a9;}import{getEnvDir}from'./utils/settings.js';function _0x3642(){const _0x4a9c3c=['3549288HEztEc','7587NfDIYO','settings.json','1504118YaJKNz','vkyLe','18918yPeNFp','66Iieyqs','Profile\x20\x22','455884LKcwgI','95LujeQy','UgeMf','\x22\x20not\x20found.\x20Run\x20first:\x20ranger\x20profile\x20add\x20','1308184SceoeY','15447NVIPTh','7140SqYVzv'];_0x3642=function(){return _0x4a9c3c;};return _0x3642();}import{writeActiveProfileName}from'./utils/activeProfile.js';export async function useEnv(_0x3ea8f0){const _0x1c9cd6=_0x9419,_0x264b21={'UgeMf':function(_0x387542,_0x2406f0){return _0x387542(_0x2406f0);},'vkyLe':function(_0x45783d,_0x5b14c8,_0x4472d8){return _0x45783d(_0x5b14c8,_0x4472d8);},'vyody':_0x1c9cd6(0x1b8),'mZvRr':function(_0x53b989,_0x36adac){return _0x53b989(_0x36adac);}},_0x446b29=_0x264b21['UgeMf'](getEnvDir,_0x3ea8f0),_0xf26941=_0x264b21[_0x1c9cd6(0x1ba)](join,_0x446b29,_0x264b21['vyody']);if(!_0x264b21['UgeMf'](existsSync,_0x446b29))throw new Error(_0x1c9cd6(0x1bd)+_0x3ea8f0+_0x1c9cd6(0x1c1)+_0x3ea8f0);if(!_0x264b21['mZvRr'](existsSync,_0xf26941))throw new Error('Config\x20not\x20found\x20at\x20'+_0xf26941+'.\x20Run\x20first:\x20ranger\x20profile\x20add\x20'+_0x3ea8f0);await _0x264b21[_0x1c9cd6(0x1c0)](writeActiveProfileName,_0x3ea8f0),console['log']('\x0a✓\x20Now\x20using\x20profile\x20\x22'+_0x3ea8f0+'\x22');}
@@ -1 +1 @@
1
- function _0x12f2(){const _0x2fb943=['tXMfI','fWUkz','osvsc','82884svIHqk','bQEyk','bbDqD','ryaXy','207726vyJOzP','1503336waVYEv','63eYHKln','NPoLf','77054YnPiiD','10FVaEUt','hpKbN','70AvyVMr','active-profile.txt','2379861DtQNmT','720459GmqOFt','trim','utf-8','eEmsf','IscSj','153268nXMylS'];_0x12f2=function(){return _0x2fb943;};return _0x12f2();}const _0x499817=_0x3d2b;function _0x3d2b(_0x2b28c1,_0x3ecf6e){_0x2b28c1=_0x2b28c1-0xf1;const _0x12f279=_0x12f2();let _0x3d2bc3=_0x12f279[_0x2b28c1];return _0x3d2bc3;}(function(_0x464915,_0x65d35f){const _0x5497f6=_0x3d2b,_0x306db9=_0x464915();while(!![]){try{const _0x27e6cf=-parseInt(_0x5497f6(0x103))/0x1+parseInt(_0x5497f6(0xf8))/0x2+-parseInt(_0x5497f6(0xfe))/0x3+-parseInt(_0x5497f6(0x107))/0x4*(-parseInt(_0x5497f6(0xfb))/0x5)+parseInt(_0x5497f6(0xf4))/0x6*(parseInt(_0x5497f6(0xf6))/0x7)+parseInt(_0x5497f6(0xf5))/0x8+-parseInt(_0x5497f6(0xfd))/0x9*(parseInt(_0x5497f6(0xf9))/0xa);if(_0x27e6cf===_0x65d35f)break;else _0x306db9['push'](_0x306db9['shift']());}catch(_0x126da1){_0x306db9['push'](_0x306db9['shift']());}}}(_0x12f2,0x29925));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=_0x499817(0xfc),LEGACY_ACTIVE_ENV_FILE='active-env.txt';function getActiveProfilePath(){return join(getRangerDir(),ACTIVE_PROFILE_FILE);}function getLegacyActiveEnvPath(){const _0x370690=_0x499817,_0x525ff8={'GKDJq':function(_0x5bb2f1,_0x53b1e4,_0x428e9b){return _0x5bb2f1(_0x53b1e4,_0x428e9b);},'bbDqD':function(_0x31306b){return _0x31306b();}};return _0x525ff8['GKDJq'](join,_0x525ff8[_0x370690(0xf2)](getRangerDir),LEGACY_ACTIVE_ENV_FILE);}async function migrateLegacyActiveEnv(){const _0x5aff95=_0x499817,_0x1564af={'NPoLf':function(_0x511938){return _0x511938();},'eEmsf':function(_0x4becd8,_0x274d38){return _0x4becd8(_0x274d38);},'oOxEU':function(_0x192fdd,_0x19f67a,_0x2a3072){return _0x192fdd(_0x19f67a,_0x2a3072);},'cEMDM':_0x5aff95(0x100),'RGJTt':function(_0x49611a,_0x4a802c,_0x4314fd,_0x2fb685){return _0x49611a(_0x4a802c,_0x4314fd,_0x2fb685);}},_0x466d7d=_0x1564af[_0x5aff95(0xf7)](getLegacyActiveEnvPath);if(!_0x1564af[_0x5aff95(0x101)](existsSync,_0x466d7d))return null;let _0x27ede6=null;try{_0x27ede6=(await _0x1564af['oOxEU'](readFile,_0x466d7d,_0x1564af['cEMDM']))['trim']()||null;}catch{_0x27ede6=null;}if(!_0x27ede6)return null;const _0x1767c1=_0x1564af['NPoLf'](getActiveProfilePath);try{await rename(_0x466d7d,_0x1767c1);}catch{try{const _0x3fa428=getRangerDir();await _0x1564af['oOxEU'](mkdir,_0x3fa428,{'recursive':!![]}),await _0x1564af['RGJTt'](writeFile,_0x1767c1,_0x27ede6,'utf-8'),await unlink(_0x466d7d);}catch{}}return _0x27ede6;}export async function readActiveProfileName(){const _0x17263d=_0x499817,_0x3687ff={'tXMfI':function(_0x5ef719,_0x374cc5){return _0x5ef719(_0x374cc5);},'osvsc':_0x17263d(0x100),'mIxgI':function(_0x3b7eaf){return _0x3b7eaf();}},_0x29bb78=getActiveProfilePath();if(_0x3687ff[_0x17263d(0x104)](existsSync,_0x29bb78))try{return(await readFile(_0x29bb78,_0x3687ff[_0x17263d(0x106)]))[_0x17263d(0xff)]()||null;}catch{return null;}return await _0x3687ff['mIxgI'](migrateLegacyActiveEnv);}export async function writeActiveProfileName(_0x48cadd){const _0x45a153=_0x499817,_0x149cb9={'AWfVb':function(_0x4a06d8){return _0x4a06d8();},'bQEyk':function(_0xd683ca,_0xb0f116,_0x1d1279){return _0xd683ca(_0xb0f116,_0x1d1279);},'IscSj':function(_0x1baa4b,_0x55fefd,_0x43fb3e,_0x1f51ca){return _0x1baa4b(_0x55fefd,_0x43fb3e,_0x1f51ca);},'gZwHX':function(_0x401a54){return _0x401a54();},'hpKbN':function(_0x4be058,_0x71b90){return _0x4be058(_0x71b90);}},_0x432014=_0x149cb9['AWfVb'](getRangerDir);await _0x149cb9[_0x45a153(0xf1)](mkdir,_0x432014,{'recursive':!![]});const _0x559bdb=getActiveProfilePath();await _0x149cb9[_0x45a153(0x102)](writeFile,_0x559bdb,_0x48cadd,_0x45a153(0x100));const _0x184877=_0x149cb9['gZwHX'](getLegacyActiveEnvPath);if(existsSync(_0x184877))try{await _0x149cb9[_0x45a153(0xfa)](unlink,_0x184877);}catch{}}export async function migrateActiveProfileFile(){const _0x4914a6=_0x499817,_0x22de69={'fWUkz':function(_0x5842c9){return _0x5842c9();},'ryaXy':function(_0x477386,_0x229288){return _0x477386!==_0x229288;}},_0x359d12=await _0x22de69[_0x4914a6(0x105)](migrateLegacyActiveEnv);return _0x22de69[_0x4914a6(0xf3)](_0x359d12,null);}
1
+ const _0x2d58df=_0x338e;(function(_0x47e687,_0x407ba3){const _0x5a898d=_0x338e,_0x410c29=_0x47e687();while(!![]){try{const _0xe14091=-parseInt(_0x5a898d(0x1b0))/0x1+-parseInt(_0x5a898d(0x1b3))/0x2+parseInt(_0x5a898d(0x1b1))/0x3+-parseInt(_0x5a898d(0x1b4))/0x4+parseInt(_0x5a898d(0x1bf))/0x5*(parseInt(_0x5a898d(0x1b7))/0x6)+parseInt(_0x5a898d(0x1ad))/0x7+parseInt(_0x5a898d(0x1c0))/0x8*(parseInt(_0x5a898d(0x1b6))/0x9);if(_0xe14091===_0x407ba3)break;else _0x410c29['push'](_0x410c29['shift']());}catch(_0x4ed3ba){_0x410c29['push'](_0x410c29['shift']());}}}(_0x1695,0x420c0));import{existsSync}from'fs';function _0x1695(){const _0x4bfecb=['utf-8','661726jJXhpS','1328140ajzSgt','aqWzY','27SmTZtP','3714jJkLbG','yAOiv','active-env.txt','HREEz','elvFU','iQTNq','xiRIu','XQcvp','155xpVDVh','2994296ZWSpQv','kuNyF','1299032uyEpyy','trim','YkmJs','477819xDaIBa','250857GnwwDi'];_0x1695=function(){return _0x4bfecb;};return _0x1695();}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=_0x2d58df(0x1b9);function getActiveProfilePath(){const _0x3c7e35=_0x2d58df,_0x60b42f={'FsuLT':function(_0x31dac2,_0x7fb434,_0x4c0165){return _0x31dac2(_0x7fb434,_0x4c0165);},'XQcvp':function(_0x4ac0f6){return _0x4ac0f6();}};return _0x60b42f['FsuLT'](join,_0x60b42f[_0x3c7e35(0x1be)](getRangerDir),ACTIVE_PROFILE_FILE);}function getLegacyActiveEnvPath(){const _0x3dcef0=_0x2d58df,_0x1a5596={'mSJxe':function(_0x2edbb1,_0x28517c,_0x206a40){return _0x2edbb1(_0x28517c,_0x206a40);},'HREEz':function(_0x38fb4e){return _0x38fb4e();}};return _0x1a5596['mSJxe'](join,_0x1a5596[_0x3dcef0(0x1ba)](getRangerDir),LEGACY_ACTIVE_ENV_FILE);}async function migrateLegacyActiveEnv(){const _0x4001d9=_0x2d58df,_0x123670={'aqWzY':function(_0x16cb36){return _0x16cb36();},'YkmJs':'utf-8','xiRIu':function(_0x5f40ed,_0x1f69dc,_0x348647){return _0x5f40ed(_0x1f69dc,_0x348647);},'phQSM':function(_0x5b9535,_0x4cd530,_0x469c45,_0x1adf5f){return _0x5b9535(_0x4cd530,_0x469c45,_0x1adf5f);}},_0x3fae3c=_0x123670[_0x4001d9(0x1b5)](getLegacyActiveEnvPath);if(!existsSync(_0x3fae3c))return null;let _0x2414b6=null;try{_0x2414b6=(await readFile(_0x3fae3c,_0x123670[_0x4001d9(0x1af)]))[_0x4001d9(0x1ae)]()||null;}catch{_0x2414b6=null;}if(!_0x2414b6)return null;const _0x542a08=getActiveProfilePath();try{await _0x123670[_0x4001d9(0x1bd)](rename,_0x3fae3c,_0x542a08);}catch{try{const _0x13ba99=getRangerDir();await mkdir(_0x13ba99,{'recursive':!![]}),await _0x123670['phQSM'](writeFile,_0x542a08,_0x2414b6,_0x123670['YkmJs']),await unlink(_0x3fae3c);}catch{}}return _0x2414b6;}export async function readActiveProfileName(){const _0x4eb7aa=_0x2d58df,_0x6b89f7={'elvFU':function(_0x949a3d){return _0x949a3d();},'BulEn':function(_0x42b88f,_0x40729b){return _0x42b88f(_0x40729b);},'hWtXa':function(_0x466b0a,_0x5f437f,_0x2c1f4f){return _0x466b0a(_0x5f437f,_0x2c1f4f);}},_0x12ed83=_0x6b89f7[_0x4eb7aa(0x1bb)](getActiveProfilePath);if(_0x6b89f7['BulEn'](existsSync,_0x12ed83))try{return(await _0x6b89f7['hWtXa'](readFile,_0x12ed83,'utf-8'))['trim']()||null;}catch{return null;}return await _0x6b89f7['elvFU'](migrateLegacyActiveEnv);}export async function writeActiveProfileName(_0x4bea1f){const _0xc04e32=_0x2d58df,_0x2152a3={'yAOiv':function(_0xe638ae){return _0xe638ae();},'iQTNq':function(_0x4094ba,_0x416460,_0x17f6f1,_0x10fcde){return _0x4094ba(_0x416460,_0x17f6f1,_0x10fcde);}},_0x48a039=_0x2152a3[_0xc04e32(0x1b8)](getRangerDir);await mkdir(_0x48a039,{'recursive':!![]});const _0x3e2371=_0x2152a3['yAOiv'](getActiveProfilePath);await _0x2152a3[_0xc04e32(0x1bc)](writeFile,_0x3e2371,_0x4bea1f,_0xc04e32(0x1b2));const _0x456d71=getLegacyActiveEnvPath();if(existsSync(_0x456d71))try{await unlink(_0x456d71);}catch{}}function _0x338e(_0xbc35a9,_0x2a6547){_0xbc35a9=_0xbc35a9-0x1ac;const _0x169539=_0x1695();let _0x338ef6=_0x169539[_0xbc35a9];return _0x338ef6;}export async function migrateActiveProfileFile(){const _0x36e7c3=_0x2d58df,_0x522d2d={'kuNyF':function(_0x5ad8fb){return _0x5ad8fb();},'QHqho':function(_0x123389,_0x3ee007){return _0x123389!==_0x3ee007;}},_0x42666a=await _0x522d2d[_0x36e7c3(0x1ac)](migrateLegacyActiveEnv);return _0x522d2d['QHqho'](_0x42666a,null);}