@ranger-testing/ranger-cli 2.5.4-alpha.78800d3-3 → 2.5.4-alpha.bc88254-5

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
Files changed (79) 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/mcpBootstrap.js +1 -1
  25. package/build/commands/migrateProfile.js +1 -1
  26. package/build/commands/setup/claude.js +1 -1
  27. package/build/commands/setup/opencode.js +1 -1
  28. package/build/commands/setupCi.js +1 -1
  29. package/build/commands/skillup.js +1 -1
  30. package/build/commands/start.js +1 -1
  31. package/build/commands/status.js +1 -1
  32. package/build/commands/update.js +1 -1
  33. package/build/commands/updateEnv.js +1 -1
  34. package/build/commands/useEnv.js +1 -1
  35. package/build/commands/utils/activeProfile.js +1 -1
  36. package/build/commands/utils/agentEnv.js +1 -1
  37. package/build/commands/utils/browserSessionsApi.js +1 -1
  38. package/build/commands/utils/claudeConfig.js +1 -1
  39. package/build/commands/utils/claudeOverrideSettings.js +1 -1
  40. package/build/commands/utils/claudePlugin.js +1 -1
  41. package/build/commands/utils/cloudProfile.js +1 -1
  42. package/build/commands/utils/cloudProfileSession.js +1 -1
  43. package/build/commands/utils/crypto.js +1 -1
  44. package/build/commands/utils/desirePathLog.js +1 -1
  45. package/build/commands/utils/deviceAuth.js +1 -1
  46. package/build/commands/utils/environment.js +1 -1
  47. package/build/commands/utils/featureApi.js +1 -1
  48. package/build/commands/utils/fixWebmDuration.js +1 -1
  49. package/build/commands/utils/gitTracked.js +1 -1
  50. package/build/commands/utils/keychain.js +1 -1
  51. package/build/commands/utils/localAgentInstallationsApi.js +1 -1
  52. package/build/commands/utils/matchAuthEnvironment.js +1 -1
  53. package/build/commands/utils/mcpImageBase64.js +1 -1
  54. package/build/commands/utils/model.js +1 -1
  55. package/build/commands/utils/opencodeConfig.js +1 -1
  56. package/build/commands/utils/playwrightCli.js +1 -1
  57. package/build/commands/utils/profileMessages.js +1 -1
  58. package/build/commands/utils/profileSetupBanner.js +1 -1
  59. package/build/commands/utils/projectsConfig.js +1 -1
  60. package/build/commands/utils/rangerConfig.js +1 -1
  61. package/build/commands/utils/rangerRoot.js +1 -1
  62. package/build/commands/utils/resolveProfileContext.js +1 -1
  63. package/build/commands/utils/resolveProfileUrl.js +1 -1
  64. package/build/commands/utils/retry.js +1 -1
  65. package/build/commands/utils/sessionCache.js +1 -1
  66. package/build/commands/utils/settings.js +1 -1
  67. package/build/commands/utils/skillContent.js +1 -1
  68. package/build/commands/utils/skills.js +1 -1
  69. package/build/commands/utils/stitchWebmFiles.js +1 -1
  70. package/build/commands/utils/telemetry.js +1 -1
  71. package/build/commands/utils/tokenRefresh.js +1 -1
  72. package/build/commands/utils/traceSnapshotMapper.js +1 -1
  73. package/build/commands/utils/userApi.js +1 -1
  74. package/build/commands/utils/version.js +1 -1
  75. package/build/commands/verifyFeature.js +1 -1
  76. package/build/commands/verifyFeatureCli.js +1 -1
  77. package/build/skills/ranger/SKILL.md +5 -4
  78. package/build/skills/ranger/verify.md +15 -3
  79. package/package.json +1 -1
@@ -1 +1 @@
1
- (function(_0x1c7413,_0x4d222){const _0x25772c=_0xbe8e,_0x4e5d98=_0x1c7413();while(!![]){try{const _0x59ad4b=-parseInt(_0x25772c(0x12d))/0x1+-parseInt(_0x25772c(0x14c))/0x2+-parseInt(_0x25772c(0x13f))/0x3*(-parseInt(_0x25772c(0x14b))/0x4)+parseInt(_0x25772c(0x14a))/0x5+-parseInt(_0x25772c(0x158))/0x6+parseInt(_0x25772c(0x12e))/0x7*(parseInt(_0x25772c(0x157))/0x8)+parseInt(_0x25772c(0x146))/0x9;if(_0x59ad4b===_0x4d222)break;else _0x4e5d98['push'](_0x4e5d98['shift']());}catch(_0x70d488){_0x4e5d98['push'](_0x4e5d98['shift']());}}}(_0x4908,0xb9241));function _0x4908(){const _0x490d4c=['uWgPe','Rsyng','Bwelj','IBGja','Project\x20(shared\x20with\x20team\x20via\x20git)','✓\x20Claude\x20Code\x20plugin\x20enabled','pluginScope','AUVtk','1191757GFicwE','1687IOALpH','trailhead','user','hlzwu','uLTIJ','jHaRq','plugin','fKqmT','\x20\x20claude\x20plugin\x20marketplace\x20add\x20ranger-testing/trailhead','ranger','log','prompt','xRHCT','NOwBJ','QtGEb','ranger@trailhead','output','3pgZyET','\x20level)...\x0a','MEoXJ','VxdLc','User\x20(available\x20in\x20all\x20your\x20projects)','\x0aYou\x20can\x20install\x20manually\x20with:','project','21253509XCQqLp','push','marketplace','success','5706615TRMFUn','1645612zAghuz','2801098rEAvmo','wantsSkillup','❌\x20Failed\x20to\x20add\x20marketplace:','enable','confirm','kgBVw','SKILL.md','error','ranger-testing/trailhead','yACFZ','.claude','6224pUpTGE','4506492gjOjWW','FvYbO','Where\x20should\x20the\x20plugin\x20be\x20installed?','jdcJg','HfwlW'];_0x4908=function(){return _0x490d4c;};return _0x4908();}import{join}from'path';import{existsSync}from'fs';import _0x373e56 from'inquirer';function _0xbe8e(_0x3efd99,_0x17b385){_0x3efd99=_0x3efd99-0x121;const _0x49080c=_0x4908();let _0xbe8ec7=_0x49080c[_0x3efd99];return _0xbe8ec7;}import{skillup}from'../skillup.js';import{runClaudeCommand,isMarketplaceAdded,isPluginInstalled}from'../utils/claudePlugin.js';import{getProjectRoot,getSkillsDir}from'../utils/claudeConfig.js';export async function ensureClaudePlugin(_0x4ecbb9){const _0x3306ad=_0xbe8e,_0x54b62e={'AUVtk':_0x3306ad(0x13d),'SYyvL':'✓\x20Claude\x20Code\x20plugin\x20already\x20installed','MEoXJ':function(_0x236c1b,_0x233009){return _0x236c1b(_0x233009);},'HfwlW':function(_0x3e0058,_0x3ca165,_0x2e0bdb){return _0x3e0058(_0x3ca165,_0x2e0bdb);},'jdcJg':_0x3306ad(0x145),'QtGEb':'list','FcPCy':_0x3306ad(0x122),'qeQOG':'user','kgBVw':'plugin','Bwelj':_0x3306ad(0x148),'NOwBJ':'add','iKkrL':_0x3306ad(0x14e),'rRnzX':'--scope','ERWnP':'❌\x20Failed\x20to\x20install\x20plugin:','phmgt':'✓\x20Claude\x20Code\x20plugin\x20installed\x20successfully','hlzwu':function(_0x544083,_0x137efc){return _0x544083===_0x137efc;},'uWgPe':'already\x20enabled','fKqmT':'⚠\x20Failed\x20to\x20enable\x20plugin:','nEJLr':_0x3306ad(0x12a)},_0x288e7b=await isPluginInstalled(_0x54b62e[_0x3306ad(0x12c)]);if(_0x288e7b)return console[_0x3306ad(0x138)](_0x54b62e['SYyvL']),![];const _0x488335=_0x54b62e[_0x3306ad(0x141)](existsSync,_0x54b62e[_0x3306ad(0x124)](join,getProjectRoot(),'.claude'));let _0x1500dd;if(_0x4ecbb9)_0x1500dd=_0x4ecbb9;else{if(_0x488335)_0x1500dd=_0x54b62e['jdcJg'];else{console['log']('\x0a📦\x20Claude\x20Code\x20Plugin\x0a');const _0x34ecaf=await _0x373e56['prompt']([{'type':_0x54b62e[_0x3306ad(0x13c)],'name':'pluginScope','message':_0x54b62e['FcPCy'],'choices':[{'name':_0x3306ad(0x143),'value':_0x3306ad(0x130)},{'name':_0x3306ad(0x129),'value':'project'}],'default':_0x54b62e['qeQOG']}]);_0x1500dd=_0x34ecaf[_0x3306ad(0x12b)];}}console['log']('\x0aInstalling\x20Claude\x20Code\x20plugin\x20('+_0x1500dd+_0x3306ad(0x140));const _0x2a3b71=await _0x54b62e[_0x3306ad(0x141)](isMarketplaceAdded,_0x3306ad(0x12f));let _0x20c522=_0x2a3b71;if(_0x2a3b71)console['log']('✓\x20Marketplace\x20already\x20added');else{const _0x3b5fdd=await _0x54b62e['MEoXJ'](runClaudeCommand,[_0x54b62e['kgBVw'],_0x54b62e[_0x3306ad(0x127)],_0x54b62e[_0x3306ad(0x13b)],_0x3306ad(0x154)]);!_0x3b5fdd[_0x3306ad(0x149)]?(console[_0x3306ad(0x153)](_0x54b62e['iKkrL'],_0x3b5fdd['error']),console['log'](_0x3306ad(0x144)),console[_0x3306ad(0x138)](_0x3306ad(0x136)),console[_0x3306ad(0x138)]('\x20\x20claude\x20plugin\x20install\x20ranger@trailhead\x20--scope\x20'+_0x1500dd)):_0x20c522=!![];}if(_0x20c522){const _0x5ba596=await runClaudeCommand([_0x54b62e[_0x3306ad(0x151)],'install',_0x54b62e['AUVtk'],_0x54b62e['rRnzX'],_0x1500dd]);if(!_0x5ba596[_0x3306ad(0x149)])console[_0x3306ad(0x153)](_0x54b62e['ERWnP'],_0x5ba596['error']),console['log'](_0x3306ad(0x144)),console['log']('\x20\x20claude\x20plugin\x20install\x20ranger@trailhead\x20--scope\x20'+_0x1500dd);else{console['log'](_0x54b62e['phmgt']);const _0x25d5b3=[_0x3306ad(0x134),_0x3306ad(0x14f),_0x3306ad(0x13d)];_0x54b62e[_0x3306ad(0x131)](_0x1500dd,_0x54b62e[_0x3306ad(0x123)])&&_0x25d5b3[_0x3306ad(0x147)](_0x54b62e['rRnzX'],_0x3306ad(0x145));const _0x4288c3=await runClaudeCommand(_0x25d5b3,{'captureOutput':!![]}),_0x17ab74=_0x4288c3[_0x3306ad(0x13e)]?.['includes'](_0x54b62e[_0x3306ad(0x125)]);!_0x4288c3['success']&&!_0x17ab74?console[_0x3306ad(0x153)](_0x54b62e[_0x3306ad(0x135)],_0x4288c3['error']):console[_0x3306ad(0x138)](_0x54b62e['nEJLr']);}}return!![];}export async function ensureClaudeSkills(_0x5b5bcd){const _0xc865d9=_0xbe8e,_0x17ca0b={'xRHCT':function(_0x742e41,_0x21798e,_0x520cde,_0x26acf0){return _0x742e41(_0x21798e,_0x520cde,_0x26acf0);},'uLTIJ':_0xc865d9(0x130),'jHaRq':function(_0x33cc68,_0x56c880){return _0x33cc68(_0x56c880);},'Bqouc':'ranger','Rsyng':'SKILL.md','yACFZ':'✓\x20Ranger\x20skills\x20already\x20installed','FvYbO':function(_0x505403){return _0x505403();},'IBGja':_0xc865d9(0x156),'WkcNh':function(_0x1423e6,_0x7e8a71){return _0x1423e6(_0x7e8a71);},'YUQJe':_0xc865d9(0x14d),'VxdLc':'Would\x20you\x20like\x20to\x20install\x20skills?','PZeQc':function(_0x24e3d7,_0x442b26){return _0x24e3d7(_0x442b26);}},_0x5d1e92=existsSync(_0x17ca0b[_0xc865d9(0x13a)](join,getSkillsDir(_0x17ca0b[_0xc865d9(0x132)]),_0xc865d9(0x137),_0xc865d9(0x152))),_0x5d0f31=existsSync(join(_0x17ca0b['jHaRq'](getSkillsDir,_0xc865d9(0x145)),_0x17ca0b['Bqouc'],_0x17ca0b[_0xc865d9(0x126)]));if(_0x5d1e92||_0x5d0f31)return console[_0xc865d9(0x138)](_0x17ca0b[_0xc865d9(0x155)]),![];const _0x5c26ae=_0x17ca0b['jHaRq'](existsSync,join(_0x17ca0b[_0xc865d9(0x121)](getProjectRoot),_0x17ca0b[_0xc865d9(0x128)]));let _0x560d1a=!![];if(_0x5b5bcd)await _0x17ca0b['WkcNh'](skillup,{'autoInstall':_0x5b5bcd,'suppressUsage':!![]});else{if(_0x5c26ae)await _0x17ca0b[_0xc865d9(0x133)](skillup,{'autoInstall':'project','suppressUsage':!![]});else{const _0x25b25e=await _0x373e56[_0xc865d9(0x139)]([{'type':_0xc865d9(0x150),'name':_0x17ca0b['YUQJe'],'message':_0x17ca0b[_0xc865d9(0x142)],'default':!![]}]);_0x560d1a=_0x25b25e[_0xc865d9(0x14d)],_0x560d1a&&await _0x17ca0b['PZeQc'](skillup,{'suppressUsage':!![]});}}return _0x560d1a;}
1
+ (function(_0xd95e2e,_0x454ca9){const _0x467350=_0x4040,_0x49cfba=_0xd95e2e();while(!![]){try{const _0x5098ee=-parseInt(_0x467350(0x117))/0x1*(-parseInt(_0x467350(0x147))/0x2)+parseInt(_0x467350(0x116))/0x3+parseInt(_0x467350(0x146))/0x4*(parseInt(_0x467350(0x13b))/0x5)+-parseInt(_0x467350(0x13e))/0x6+parseInt(_0x467350(0x130))/0x7*(-parseInt(_0x467350(0x12b))/0x8)+-parseInt(_0x467350(0x145))/0x9+-parseInt(_0x467350(0x121))/0xa;if(_0x5098ee===_0x454ca9)break;else _0x49cfba['push'](_0x49cfba['shift']());}catch(_0x564f39){_0x49cfba['push'](_0x49cfba['shift']());}}}(_0x1c92,0xe829b));import{join}from'path';import{existsSync}from'fs';function _0x1c92(){const _0x4e2bf1=['user','9985vnaRxW','lOOZI','marketplace','1915722fpMzXS','glxzI','YQrRS','oPexQ','wVMOf','ranger','\x0aYou\x20can\x20install\x20manually\x20with:','395757MvvRQF','2084gGqgye','277898kauipW','PzrYD','Project\x20(shared\x20with\x20team\x20via\x20git)','eZGqq','ReMGa','gvTXP','❌\x20Failed\x20to\x20install\x20plugin:','rMhmJ','\x20\x20claude\x20plugin\x20marketplace\x20add\x20ranger-testing/trailhead','✓\x20Ranger\x20skills\x20already\x20installed','\x20level)...\x0a','4587132ArKlfW','7hbEoeF','✓\x20Claude\x20Code\x20plugin\x20already\x20installed','\x20\x20claude\x20plugin\x20install\x20ranger@trailhead\x20--scope\x20','ranger-testing/trailhead','ranger@trailhead','list','project','wantsSkillup','❌\x20Failed\x20to\x20add\x20marketplace:','SKILL.md','20817020gTiiaz','PrGHh','✓\x20Claude\x20Code\x20plugin\x20enabled','log','pluginScope','AtmvK','output','xjkDM','plugin','UGNKO','106344mKgQLe','success','CeUrZ','prompt','--scope','77JZbdjX','\x0a📦\x20Claude\x20Code\x20Plugin\x0a','.claude','error','LCgUY','User\x20(available\x20in\x20all\x20your\x20projects)','BaFqt','waatF','mqPDK','Would\x20you\x20like\x20to\x20install\x20skills?'];_0x1c92=function(){return _0x4e2bf1;};return _0x1c92();}import _0xcac262 from'inquirer';import{skillup}from'../skillup.js';import{runClaudeCommand,isMarketplaceAdded,isPluginInstalled}from'../utils/claudePlugin.js';function _0x4040(_0x84069d,_0x401085){_0x84069d=_0x84069d-0x10c;const _0x1c9281=_0x1c92();let _0x404022=_0x1c9281[_0x84069d];return _0x404022;}import{getProjectRoot,getSkillsDir}from'../utils/claudeConfig.js';export async function ensureClaudePlugin(_0x2f82a5){const _0x31c80a=_0x4040,_0x50e629={'rMhmJ':function(_0x5632fd,_0x1ca44c){return _0x5632fd(_0x1ca44c);},'FCZhn':'ranger@trailhead','PzrYD':function(_0x508431,_0x159794,_0x3439ae){return _0x508431(_0x159794,_0x3439ae);},'COhGk':_0x31c80a(0x131),'JJNyg':'pluginScope','bcbLc':_0x31c80a(0x10d),'wVMOf':'project','YQrRS':_0x31c80a(0x13a),'BaFqt':function(_0x376061,_0x4a5cf8){return _0x376061(_0x4a5cf8);},'OiebE':_0x31c80a(0x129),'OrcxF':_0x31c80a(0x13d),'gvTXP':'add','glxzI':_0x31c80a(0x11f),'eZGqq':'\x0aYou\x20can\x20install\x20manually\x20with:','ssHMe':_0x31c80a(0x111),'mqPDK':'✓\x20Claude\x20Code\x20plugin\x20installed\x20successfully','btKSM':'enable','UGNKO':_0x31c80a(0x123)},_0x51eab6=await _0x50e629[_0x31c80a(0x112)](isPluginInstalled,_0x50e629['FCZhn']);if(_0x51eab6)return console['log'](_0x31c80a(0x118)),![];const _0x3320a5=existsSync(_0x50e629[_0x31c80a(0x10c)](join,getProjectRoot(),'.claude'));let _0x33d13d;if(_0x2f82a5)_0x33d13d=_0x2f82a5;else{if(_0x3320a5)_0x33d13d=_0x31c80a(0x11d);else{console['log'](_0x50e629['COhGk']);const _0x34af08=await _0xcac262[_0x31c80a(0x12e)]([{'type':_0x31c80a(0x11c),'name':_0x50e629['JJNyg'],'message':'Where\x20should\x20the\x20plugin\x20be\x20installed?','choices':[{'name':_0x31c80a(0x135),'value':_0x31c80a(0x13a)},{'name':_0x50e629['bcbLc'],'value':_0x50e629[_0x31c80a(0x142)]}],'default':_0x50e629[_0x31c80a(0x140)]}]);_0x33d13d=_0x34af08[_0x31c80a(0x125)];}}console[_0x31c80a(0x124)]('\x0aInstalling\x20Claude\x20Code\x20plugin\x20('+_0x33d13d+_0x31c80a(0x115));const _0x39d3fc=await _0x50e629[_0x31c80a(0x112)](isMarketplaceAdded,'trailhead');let _0x515d84=_0x39d3fc;if(_0x39d3fc)console[_0x31c80a(0x124)]('✓\x20Marketplace\x20already\x20added');else{const _0x2a179f=await _0x50e629[_0x31c80a(0x136)](runClaudeCommand,[_0x50e629['OiebE'],_0x50e629['OrcxF'],_0x50e629[_0x31c80a(0x110)],_0x31c80a(0x11a)]);!_0x2a179f[_0x31c80a(0x12c)]?(console[_0x31c80a(0x133)](_0x50e629[_0x31c80a(0x13f)],_0x2a179f['error']),console['log'](_0x50e629[_0x31c80a(0x10e)]),console['log'](_0x31c80a(0x113)),console['log'](_0x31c80a(0x119)+_0x33d13d)):_0x515d84=!![];}if(_0x515d84){const _0x33fa18=await _0x50e629['BaFqt'](runClaudeCommand,['plugin','install','ranger@trailhead','--scope',_0x33d13d]);if(!_0x33fa18['success'])console['error'](_0x50e629['ssHMe'],_0x33fa18[_0x31c80a(0x133)]),console[_0x31c80a(0x124)](_0x31c80a(0x144)),console[_0x31c80a(0x124)]('\x20\x20claude\x20plugin\x20install\x20ranger@trailhead\x20--scope\x20'+_0x33d13d);else{console['log'](_0x50e629[_0x31c80a(0x138)]);const _0x2afdea=[_0x50e629['OiebE'],_0x50e629['btKSM'],_0x31c80a(0x11b)];_0x33d13d==='project'&&_0x2afdea['push'](_0x31c80a(0x12f),_0x50e629['wVMOf']);const _0xff0d0a=await runClaudeCommand(_0x2afdea,{'captureOutput':!![]}),_0xabaa2b=_0xff0d0a[_0x31c80a(0x127)]?.['includes']('already\x20enabled');!_0xff0d0a[_0x31c80a(0x12c)]&&!_0xabaa2b?console['error']('⚠\x20Failed\x20to\x20enable\x20plugin:',_0xff0d0a['error']):console['log'](_0x50e629[_0x31c80a(0x12a)]);}}return!![];}export async function ensureClaudeSkills(_0x38a7e6){const _0xdc43be=_0x4040,_0x5c8926={'LCgUY':'user','xjkDM':_0xdc43be(0x120),'waatF':function(_0x7e0e9,_0x33cf03){return _0x7e0e9(_0x33cf03);},'CeUrZ':function(_0x1fcbd7,_0x3308ee,_0x54c58c,_0x22cdb3){return _0x1fcbd7(_0x3308ee,_0x54c58c,_0x22cdb3);},'oPexQ':_0xdc43be(0x114),'ReMGa':function(_0x89b28f,_0x55396f,_0xff6d97){return _0x89b28f(_0x55396f,_0xff6d97);},'PrGHh':function(_0x36b640,_0x407fb4){return _0x36b640(_0x407fb4);},'izNju':'confirm','lOOZI':_0xdc43be(0x139),'AtmvK':function(_0x553d1f,_0x5577ef){return _0x553d1f(_0x5577ef);}},_0x4f09cf=existsSync(join(getSkillsDir(_0x5c8926[_0xdc43be(0x134)]),_0xdc43be(0x143),_0x5c8926[_0xdc43be(0x128)])),_0x19de23=_0x5c8926['waatF'](existsSync,_0x5c8926[_0xdc43be(0x12d)](join,_0x5c8926[_0xdc43be(0x137)](getSkillsDir,'project'),'ranger',_0xdc43be(0x120)));if(_0x4f09cf||_0x19de23)return console['log'](_0x5c8926[_0xdc43be(0x141)]),![];const _0x15792a=existsSync(_0x5c8926[_0xdc43be(0x10f)](join,getProjectRoot(),_0xdc43be(0x132)));let _0xa3b77a=!![];if(_0x38a7e6)await skillup({'autoInstall':_0x38a7e6,'suppressUsage':!![]});else{if(_0x15792a)await _0x5c8926[_0xdc43be(0x122)](skillup,{'autoInstall':_0xdc43be(0x11d),'suppressUsage':!![]});else{const _0x589f19=await _0xcac262[_0xdc43be(0x12e)]([{'type':_0x5c8926['izNju'],'name':'wantsSkillup','message':_0x5c8926[_0xdc43be(0x13c)],'default':!![]}]);_0xa3b77a=_0x589f19[_0xdc43be(0x11e)],_0xa3b77a&&await _0x5c8926[_0xdc43be(0x126)](skillup,{'suppressUsage':!![]});}}return _0xa3b77a;}
@@ -1 +1 @@
1
- (function(_0x3ece10,_0x276d5b){const _0x3f1d35=_0x35a0,_0x313b18=_0x3ece10();while(!![]){try{const _0x5c3c64=parseInt(_0x3f1d35(0xef))/0x1*(parseInt(_0x3f1d35(0xec))/0x2)+-parseInt(_0x3f1d35(0xf8))/0x3+parseInt(_0x3f1d35(0xdf))/0x4+parseInt(_0x3f1d35(0xf3))/0x5*(parseInt(_0x3f1d35(0xf0))/0x6)+parseInt(_0x3f1d35(0xf5))/0x7+parseInt(_0x3f1d35(0xf6))/0x8+-parseInt(_0x3f1d35(0xe8))/0x9*(parseInt(_0x3f1d35(0xe3))/0xa);if(_0x5c3c64===_0x276d5b)break;else _0x313b18['push'](_0x313b18['shift']());}catch(_0x56bc7f){_0x313b18['push'](_0x313b18['shift']());}}}(_0x3f6d,0x5fcce));function _0x35a0(_0x1d9299,_0x52c890){_0x1d9299=_0x1d9299-0xdf;const _0x3f6d5b=_0x3f6d();let _0x35a072=_0x3f6d5b[_0x1d9299];return _0x35a072;}import{join}from'path';function _0x3f6d(){const _0x23df46=['cicTw','User\x20(available\x20in\x20all\x20your\x20projects)','includes','11214099lKHXBS','bsMrm','BqxWk','ZKPlY','4sDoHiu','$schema','\x0a📦\x20OpenCode\x20Plugin\x0a','245137prxxdy','42VZTPnK','parse','Where\x20should\x20the\x20plugin\x20be\x20installed?','97410JOPVHx','pluginScope','4457089tbvyGp','4083128ZncuZg','@ranger-testing/opencode-plugin','1529199pZojHe','log','⚠\x20Failed\x20to\x20read\x20opencode.json.\x20Please\x20add\x20the\x20plugin\x20manually.','✓\x20OpenCode\x20plugin\x20already\x20configured','list','jvsCQ','opencode.json','✓\x20OpenCode\x20plugin\x20configured','FPqNr','1497504ooBDKd','wqzPu','user','plugin','10daYEDu','stringify'];_0x3f6d=function(){return _0x23df46;};return _0x3f6d();}import{existsSync}from'fs';import{mkdir,readFile,writeFile}from'fs/promises';import _0x848681 from'inquirer';import{getOpencodeConfigDir}from'../utils/opencodeConfig.js';export async function ensureOpencodePluginConfig(_0x5b5bdd){const _0x257df2=_0x35a0,_0x520621={'BqxWk':function(_0x4a32b1,_0x23ac59){return _0x4a32b1(_0x23ac59);},'pvQsP':function(_0x91dd48,_0xd5f0b1,_0x573521){return _0x91dd48(_0xd5f0b1,_0x573521);},'BGnzO':'project','ZKPlY':_0x257df2(0xfe),'jvsCQ':_0x257df2(0xee),'aRjEV':_0x257df2(0xf2),'bsMrm':_0x257df2(0xe6),'UxQtA':'user','cicTw':'Project\x20(shared\x20with\x20team\x20via\x20git)','kfIzg':function(_0x2d1357,_0x39011a,_0x3f7580){return _0x2d1357(_0x39011a,_0x3f7580);},'sKIpw':_0x257df2(0xf7),'MQcDf':'https://opencode.ai/config.json','wqzPu':_0x257df2(0xfa),'nPZwf':'Failed\x20to\x20read\x20opencode.json','FPqNr':_0x257df2(0xfb),'AknQC':function(_0x6dece6,_0x3c6e49){return _0x6dece6+_0x3c6e49;},'ulXfy':_0x257df2(0xff)},_0x2e72b2=_0x520621[_0x257df2(0xea)](existsSync,_0x520621['pvQsP'](join,getOpencodeConfigDir(_0x520621['BGnzO']),_0x520621[_0x257df2(0xeb)]));let _0x31166e;if(_0x5b5bdd)_0x31166e=_0x5b5bdd;else{if(_0x2e72b2)_0x31166e='project';else{console['log'](_0x520621[_0x257df2(0xfd)]);const _0x514f45=await _0x848681['prompt']([{'type':_0x257df2(0xfc),'name':_0x257df2(0xf4),'message':_0x520621['aRjEV'],'choices':[{'name':_0x520621[_0x257df2(0xe9)],'value':_0x520621['UxQtA']},{'name':_0x520621[_0x257df2(0xe5)],'value':'project'}],'default':_0x257df2(0xe1)}]);_0x31166e=_0x514f45[_0x257df2(0xf4)];}}const _0x5ce59a=_0x520621['kfIzg'](join,getOpencodeConfigDir(_0x31166e),'opencode.json'),_0x141fd7=_0x520621['sKIpw'],_0x559ded=_0x520621['MQcDf'];let _0x53c1d9={};if(_0x520621['BqxWk'](existsSync,_0x5ce59a))try{const _0x11daf0=await readFile(_0x5ce59a,'utf-8');_0x53c1d9=JSON[_0x257df2(0xf1)](_0x11daf0);}catch(_0x4db55f){return console['error'](_0x520621[_0x257df2(0xe0)]),{'configured':![],'scope':_0x31166e,'error':_0x520621['nPZwf'],'details':_0x4db55f};}const _0x7b063c=Array['isArray'](_0x53c1d9[_0x257df2(0xe2)])?_0x53c1d9['plugin']:[];if(_0x7b063c[_0x257df2(0xe7)](_0x141fd7))return console[_0x257df2(0xf9)](_0x520621[_0x257df2(0x100)]),{'configured':![],'scope':_0x31166e};return _0x53c1d9[_0x257df2(0xed)]=_0x53c1d9[_0x257df2(0xed)]||_0x559ded,_0x53c1d9[_0x257df2(0xe2)]=[..._0x7b063c,_0x141fd7],await mkdir(getOpencodeConfigDir(_0x31166e),{'recursive':!![]}),await writeFile(_0x5ce59a,_0x520621['AknQC'](JSON[_0x257df2(0xe4)](_0x53c1d9,null,0x2),'\x0a')),console['log'](_0x520621['ulXfy']),{'configured':!![],'scope':_0x31166e};}
1
+ (function(_0x509d9d,_0x4a231d){const _0x4d4758=_0x1b1c,_0x9dd1c3=_0x509d9d();while(!![]){try{const _0x5e55cf=-parseInt(_0x4d4758(0xe7))/0x1*(parseInt(_0x4d4758(0xf8))/0x2)+parseInt(_0x4d4758(0xf1))/0x3+parseInt(_0x4d4758(0xdc))/0x4*(-parseInt(_0x4d4758(0xf5))/0x5)+-parseInt(_0x4d4758(0xe3))/0x6*(parseInt(_0x4d4758(0xed))/0x7)+-parseInt(_0x4d4758(0xef))/0x8*(parseInt(_0x4d4758(0xfc))/0x9)+-parseInt(_0x4d4758(0xfb))/0xa*(parseInt(_0x4d4758(0xee))/0xb)+parseInt(_0x4d4758(0xe8))/0xc;if(_0x5e55cf===_0x4a231d)break;else _0x9dd1c3['push'](_0x9dd1c3['shift']());}catch(_0x208f39){_0x9dd1c3['push'](_0x9dd1c3['shift']());}}}(_0x43d5,0x88a87));import{join}from'path';import{existsSync}from'fs';import{mkdir,readFile,writeFile}from'fs/promises';function _0x1b1c(_0x4705d2,_0xbcb6fd){_0x4705d2=_0x4705d2-0xdb;const _0x43d554=_0x43d5();let _0x1b1c7c=_0x43d554[_0x4705d2];return _0x1b1c7c;}import _0x4184ba from'inquirer';import{getOpencodeConfigDir}from'../utils/opencodeConfig.js';function _0x43d5(){const _0x54bb06=['Where\x20should\x20the\x20plugin\x20be\x20installed?','prompt','38330HxvMCF','pOypP','error','1584OKrVSZ','ZDNOi','zUJgS','10AgKUgZ','20151DMWbhM','$schema','pluginScope','YumJd','172ulgUcW','stringify','includes','✓\x20OpenCode\x20plugin\x20configured','https://opencode.ai/config.json','QGHxm','iGVql','114MTDpJj','clfYN','njwRJ','QPsFw','40KfbFCc','17460720ytMYIn','log','list','parse','\x0a📦\x20OpenCode\x20Plugin\x0a','55643eBvWmV','8793488ZKqZgm','808snNUnB','VOWfC','1927761PoUZnq','project'];_0x43d5=function(){return _0x54bb06;};return _0x43d5();}export async function ensureOpencodePluginConfig(_0x4610d1){const _0x5f3c5e=_0x1b1c,_0x162d93={'YumJd':_0x5f3c5e(0xf2),'QPsFw':'opencode.json','pOypP':_0x5f3c5e(0xec),'QGukd':_0x5f3c5e(0xea),'noXnX':_0x5f3c5e(0xf3),'VOWfC':'User\x20(available\x20in\x20all\x20your\x20projects)','iGVql':'user','HWvti':'Project\x20(shared\x20with\x20team\x20via\x20git)','LsHFg':function(_0x4301cb,_0x466472,_0x3c8bda){return _0x4301cb(_0x466472,_0x3c8bda);},'bKTFQ':'@ranger-testing/opencode-plugin','okEXj':_0x5f3c5e(0xe0),'GhjSK':function(_0x385895,_0x31cdbf){return _0x385895(_0x31cdbf);},'clfYN':function(_0x2de9ef,_0x4727c7,_0x15ecbf){return _0x2de9ef(_0x4727c7,_0x15ecbf);},'QGHxm':'utf-8','zUJgS':'⚠\x20Failed\x20to\x20read\x20opencode.json.\x20Please\x20add\x20the\x20plugin\x20manually.','xhVAj':'✓\x20OpenCode\x20plugin\x20already\x20configured','njwRJ':function(_0x379b1d,_0x491ee4){return _0x379b1d(_0x491ee4);},'ZDNOi':_0x5f3c5e(0xdf)},_0x1b158c=existsSync(join(getOpencodeConfigDir(_0x162d93['YumJd']),_0x162d93['QPsFw']));let _0x4ed39c;if(_0x4610d1)_0x4ed39c=_0x4610d1;else{if(_0x1b158c)_0x4ed39c=_0x162d93[_0x5f3c5e(0xdb)];else{console[_0x5f3c5e(0xe9)](_0x162d93[_0x5f3c5e(0xf6)]);const _0x2306d2=await _0x4184ba[_0x5f3c5e(0xf4)]([{'type':_0x162d93['QGukd'],'name':_0x5f3c5e(0xfe),'message':_0x162d93['noXnX'],'choices':[{'name':_0x162d93[_0x5f3c5e(0xf0)],'value':_0x162d93[_0x5f3c5e(0xe2)]},{'name':_0x162d93['HWvti'],'value':_0x162d93[_0x5f3c5e(0xdb)]}],'default':_0x162d93['iGVql']}]);_0x4ed39c=_0x2306d2['pluginScope'];}}const _0x41b183=_0x162d93['LsHFg'](join,getOpencodeConfigDir(_0x4ed39c),_0x162d93[_0x5f3c5e(0xe6)]),_0x510a95=_0x162d93['bKTFQ'],_0x44e10e=_0x162d93['okEXj'];let _0x4bfc2e={};if(_0x162d93['GhjSK'](existsSync,_0x41b183))try{const _0x43a73e=await _0x162d93[_0x5f3c5e(0xe4)](readFile,_0x41b183,_0x162d93[_0x5f3c5e(0xe1)]);_0x4bfc2e=JSON[_0x5f3c5e(0xeb)](_0x43a73e);}catch(_0x540c0a){return console[_0x5f3c5e(0xf7)](_0x162d93[_0x5f3c5e(0xfa)]),{'configured':![],'scope':_0x4ed39c,'error':'Failed\x20to\x20read\x20opencode.json','details':_0x540c0a};}const _0x257b53=Array['isArray'](_0x4bfc2e['plugin'])?_0x4bfc2e['plugin']:[];if(_0x257b53[_0x5f3c5e(0xde)](_0x510a95))return console['log'](_0x162d93['xhVAj']),{'configured':![],'scope':_0x4ed39c};return _0x4bfc2e[_0x5f3c5e(0xfd)]=_0x4bfc2e[_0x5f3c5e(0xfd)]||_0x44e10e,_0x4bfc2e['plugin']=[..._0x257b53,_0x510a95],await mkdir(_0x162d93[_0x5f3c5e(0xe5)](getOpencodeConfigDir,_0x4ed39c),{'recursive':!![]}),await writeFile(_0x41b183,JSON[_0x5f3c5e(0xdd)](_0x4bfc2e,null,0x2)+'\x0a'),console[_0x5f3c5e(0xe9)](_0x162d93[_0x5f3c5e(0xf9)]),{'configured':!![],'scope':_0x4ed39c};}
@@ -1 +1 @@
1
- (function(_0x1fb5ff,_0x10ef82){const _0x2a3801=_0x16ff,_0x26e544=_0x1fb5ff();while(!![]){try{const _0x497705=-parseInt(_0x2a3801(0x100))/0x1*(parseInt(_0x2a3801(0x10f))/0x2)+-parseInt(_0x2a3801(0x129))/0x3+-parseInt(_0x2a3801(0x11b))/0x4*(-parseInt(_0x2a3801(0x12c))/0x5)+parseInt(_0x2a3801(0xf8))/0x6+-parseInt(_0x2a3801(0x12a))/0x7+-parseInt(_0x2a3801(0x127))/0x8*(-parseInt(_0x2a3801(0x10b))/0x9)+-parseInt(_0x2a3801(0x133))/0xa*(-parseInt(_0x2a3801(0x130))/0xb);if(_0x497705===_0x10ef82)break;else _0x26e544['push'](_0x26e544['shift']());}catch(_0x354b2a){_0x26e544['push'](_0x26e544['shift']());}}}(_0x4863,0xaf63c));import{mkdir,readFile,readdir}from'fs/promises';import{join}from'path';import{existsSync}from'fs';import{authenticate,ensureRangerDir,ensureChromium,writeRangerGitignore}from'./start.js';function _0x4863(){const _0x10c3a3=['RXRsB','UmRqV','trackPhaseStart','eQwIv','settings.json','lDBTB','chromium','dir_setup','log','profile_activate','\x0a🔧\x20Ranger\x20CI\x20Setup\x0a','12072lMrkuB','gqBGT','4106550zPTqsm','8923236LJeyWl','IddrW','5812405cFkpbO','trailhead','No\x20API\x20token\x20available\x20for\x20decryption','✓\x20Encrypted\x20auth\x20verified\x20(will\x20decrypt\x20at\x20runtime)','154bMulld','join','fmmtP','367390MylLZj','XZXZU','TbAFU','length','plugin','baseUrl','error','cPpLW','Or\x20specify\x20a\x20profile\x20name\x20with\x20--profile\x20and\x20--base-url\x20to\x20create\x20one.','ufxLb','OYcJN','skills','✓\x20Claude\x20Code\x20plugin\x20already\x20installed','success','UkAiS','ixCII','kJpPU','path','.\x20Use\x20--profile\x20to\x20specify\x20which\x20one.','6001008bXtCuu','✓\x20Claude\x20Code\x20plugin\x20installed','ySBHY','myFlD','message','✓\x20Created\x20profile\x20settings:\x20baseUrl=','Failed\x20to\x20add\x20marketplace:','UXVko','3TwUVAx','map','cJdOB','No\x20CI\x20profiles\x20found.\x20Create\x20one\x20first\x20with:\x20ranger\x20profile\x20add\x20<name>\x20--ci\x0a','auth.json.enc','VHAFT','trackPhaseEnd','✓\x20Auth\x20state\x20found','OHTxS','wzTSE','\x0a✅\x20Ranger\x20CI\x20setup\x20complete!\x0a','5337ILZNQt','Failed\x20to\x20verify\x20encrypted\x20auth\x20for\x20profile\x20\x22','RRCYY','filter','139892RkptzF','project','You\x20can\x20install\x20manually:\x20claude\x20plugin\x20marketplace\x20add\x20ranger-testing/trailhead','JVYUO','onlWs','name','HVzei','skipChromium','You\x20can\x20install\x20manually:\x20claude\x20plugin\x20install\x20ranger@trailhead\x20--scope\x20project','wYtOK','auth','No\x20CI\x20profiles\x20found\x20in\x20.ranger/ci/.\x20Create\x20one\x20first\x20with:\x20ranger\x20profile\x20add\x20<name>\x20--ci\x0a','4HJtLjg'];_0x4863=function(){return _0x10c3a3;};return _0x4863();}import{skillup}from'./skillup.js';import{getRangerDir}from'./utils/rangerRoot.js';import{writeActiveProfileName}from'./utils/activeProfile.js';function _0x16ff(_0x4a98d3,_0x433ae6){_0x4a98d3=_0x4a98d3-0xf3;const _0x4863de=_0x4863();let _0x16ff33=_0x4863de[_0x4a98d3];return _0x16ff33;}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(_0x34b2bf){const _0xaaa9cb=_0x16ff,_0x26f8b3={'NeMrx':function(_0x3ff3aa){return _0x3ff3aa();},'gqBGT':function(_0x4036bf,_0x3bc664,_0x58e9d8){return _0x4036bf(_0x3bc664,_0x58e9d8);},'ezjrh':_0xaaa9cb(0x103),'eQwIv':function(_0x4de6b7,_0x4615e8){return _0x4de6b7===_0x4615e8;},'lDBTB':function(_0x161e7a,_0x334c53){return _0x161e7a+_0x334c53;},'OHTxS':_0xaaa9cb(0x11a),'myFlD':'Or\x20specify\x20a\x20profile\x20name\x20with\x20--profile\x20and\x20--base-url\x20to\x20create\x20one.'},_0x310b04=_0x26f8b3['NeMrx'](getRangerDir),_0x458dd9=join(_0x310b04,'ci');if(_0x34b2bf){const _0x343a4c=_0x26f8b3[_0xaaa9cb(0x128)](join,_0x458dd9,_0x34b2bf);return{'name':_0x34b2bf,'path':_0x343a4c};}if(!existsSync(_0x458dd9))throw new Error(_0x26f8b3['ezjrh']+_0xaaa9cb(0x13b));const _0x5a3d9e=await readdir(_0x458dd9,{'withFileTypes':!![]}),_0x19c092=_0x5a3d9e[_0xaaa9cb(0x10e)](_0x42dacd=>_0x42dacd['isDirectory']())[_0xaaa9cb(0x101)](_0x32a46f=>_0x32a46f['name']);if(_0x26f8b3[_0xaaa9cb(0x11f)](_0x19c092[_0xaaa9cb(0x136)],0x0))throw new Error(_0x26f8b3[_0xaaa9cb(0x121)](_0x26f8b3[_0xaaa9cb(0x108)],_0x26f8b3[_0xaaa9cb(0xfb)]));if(_0x19c092[_0xaaa9cb(0x136)]===0x1){const _0x41325f=_0x19c092[0x0];return console[_0xaaa9cb(0x124)]('Auto-detected\x20CI\x20profile:\x20'+_0x41325f),{'name':_0x41325f,'path':join(_0x458dd9,_0x41325f)};}throw new Error('Multiple\x20CI\x20profiles\x20found:\x20'+_0x19c092[_0xaaa9cb(0x131)](',\x20')+_0xaaa9cb(0xf7));}async function installPluginNonInteractive(){const _0x36cdff=_0x16ff,_0x3fa74d={'IddrW':function(_0x481d20,_0x2b67db){return _0x481d20(_0x2b67db);},'UXVko':_0x36cdff(0x13f),'ixCII':'Installing\x20Claude\x20Code\x20plugin\x20(project\x20level)...','VHAFT':_0x36cdff(0x12d),'OYcJN':'✓\x20Marketplace\x20already\x20added','DpGBB':'marketplace','gFKfi':'ranger-testing/trailhead','ieojc':_0x36cdff(0xfe),'TbAFU':_0x36cdff(0x111),'RRCYY':'plugin','vSbfS':'install','wPsVU':'ranger@trailhead','onlWs':'--scope','XXLtt':'Failed\x20to\x20install\x20plugin:','ySBHY':_0x36cdff(0x117),'ufxLb':_0x36cdff(0xf9)},_0x262a88=await _0x3fa74d[_0x36cdff(0x12b)](isPluginInstalled,'ranger@trailhead');if(_0x262a88)return console['log'](_0x3fa74d[_0x36cdff(0xff)]),![];console['log'](_0x3fa74d[_0x36cdff(0xf4)]);const _0x424b0f=await isMarketplaceAdded(_0x3fa74d[_0x36cdff(0x105)]);let _0xcacc58=_0x424b0f;if(_0x424b0f)console[_0x36cdff(0x124)](_0x3fa74d[_0x36cdff(0x13d)]);else{const _0x3ee3a5=await _0x3fa74d['IddrW'](runClaudeCommand,[_0x36cdff(0x137),_0x3fa74d['DpGBB'],'add',_0x3fa74d['gFKfi']]);!_0x3ee3a5['success']?(console['error'](_0x3fa74d['ieojc'],_0x3ee3a5[_0x36cdff(0x139)]),console['log'](_0x3fa74d[_0x36cdff(0x135)])):_0xcacc58=!![];}if(_0xcacc58){const _0x332d03=await runClaudeCommand([_0x3fa74d[_0x36cdff(0x10d)],_0x3fa74d['vSbfS'],_0x3fa74d['wPsVU'],_0x3fa74d[_0x36cdff(0x113)],_0x36cdff(0x110)]);!_0x332d03[_0x36cdff(0x140)]?(console['error'](_0x3fa74d['XXLtt'],_0x332d03[_0x36cdff(0x139)]),console[_0x36cdff(0x124)](_0x3fa74d[_0x36cdff(0xfa)])):console['log'](_0x3fa74d[_0x36cdff(0x13c)]);}return!![];}export async function setupCi(_0x19ce0d,_0x4c1c59,_0x10bfea){const _0x415991=_0x16ff,_0x642f74={'wYtOK':_0x415991(0x119),'fmmtP':function(_0x16f84f,_0x16bae5){return _0x16f84f(_0x16bae5);},'UkAiS':function(_0xd70b64){return _0xd70b64();},'RXRsB':function(_0x36db1b,_0x142361){return _0x36db1b(_0x142361);},'cPpLW':function(_0x41d59,_0x3481f3,_0x182ea7){return _0x41d59(_0x3481f3,_0x182ea7);},'pebBx':'chromium','dKdLd':_0x415991(0x125),'HVzei':function(_0x5baa1c,_0x403e8f,_0x132bb1){return _0x5baa1c(_0x403e8f,_0x132bb1);},'UmRqV':_0x415991(0x120),'JVYUO':function(_0x39551b,_0x46cc58,_0x481a85){return _0x39551b(_0x46cc58,_0x481a85);},'cJdOB':'auth.json','NUBNA':_0x415991(0x104),'wzTSE':_0x415991(0x12e),'kJpPU':_0x415991(0x12f),'XZXZU':function(_0x2574d2,_0x563c42){return _0x2574d2 instanceof _0x563c42;},'VChAe':function(_0x30c34b,_0x4e9123){return _0x30c34b(_0x4e9123);},'TOnJF':_0x415991(0x13e),'rDXjd':_0x415991(0x10a)};console[_0x415991(0x124)](_0x415991(0x126)),_0x10bfea?.['trackPhaseStart'](_0x642f74['wYtOK']),await _0x642f74[_0x415991(0x132)](authenticate,_0x19ce0d),_0x10bfea?.[_0x415991(0x106)](_0x642f74[_0x415991(0x118)]),_0x10bfea?.['trackPhaseStart'](_0x415991(0x123));const {path:_0x1ce6ac,installed:_0x3fb084}=await _0x642f74[_0x415991(0xf3)](ensureRangerDir);await writeRangerGitignore(_0x1ce6ac);const _0x35ac06=join(_0x1ce6ac,'sessions');!_0x642f74[_0x415991(0x11c)](existsSync,_0x35ac06)&&await _0x642f74[_0x415991(0x13a)](mkdir,_0x35ac06,{'recursive':!![]});_0x10bfea?.['trackPhaseEnd'](_0x415991(0x123),{'installed':_0x3fb084}),_0x10bfea?.['trackPhaseStart'](_0x642f74['pebBx']);let _0x4953ff=![];_0x4c1c59?.[_0x415991(0x116)]?console[_0x415991(0x124)]('✓\x20Skipping\x20Chromium\x20check\x20(--skip-chromium)'):_0x4953ff=await ensureChromium();_0x10bfea?.[_0x415991(0x106)](_0x415991(0x122),{'installed':_0x4953ff,'skipped':!!_0x4c1c59?.['skipChromium']}),_0x10bfea?.[_0x415991(0x11e)](_0x642f74['dKdLd']);const _0x1c80e7=await _0x642f74['fmmtP'](findCiProfile,_0x4c1c59?.['profile']);let _0xd5cd49=![];_0x4c1c59?.['baseUrl']&&(await mkdir(_0x1c80e7['path'],{'recursive':!![]}),await _0x642f74['HVzei'](saveSettings,_0x1c80e7['name'],{'baseUrl':_0x4c1c59[_0x415991(0x138)],'headless':!![]}),console[_0x415991(0x124)](_0x415991(0xfd)+_0x4c1c59[_0x415991(0x138)]),_0xd5cd49=!![]);const _0x42dbe5=join(_0x1c80e7[_0x415991(0xf6)],_0x642f74[_0x415991(0x11d)]);if(!existsSync(_0x42dbe5)&&!_0xd5cd49)throw new Error('CI\x20profile\x20\x22'+_0x1c80e7['name']+'\x22\x20has\x20no\x20settings.json.\x20Use\x20--base-url\x20to\x20configure\x20it.');const _0x500d61=_0x642f74[_0x415991(0x112)](join,_0x1c80e7['path'],_0x642f74[_0x415991(0x102)]),_0x2c9f83=join(_0x1c80e7['path'],_0x642f74['NUBNA']),_0x514a97=_0x642f74['fmmtP'](existsSync,_0x500d61),_0x4b0c1b=_0x642f74[_0x415991(0x11c)](existsSync,_0x2c9f83);if(_0x4b0c1b)try{const _0x2d5b4f=await getToken();if(!_0x2d5b4f)throw new Error(_0x642f74[_0x415991(0x109)]);const _0x42273e=await readFile(_0x2c9f83);_0x642f74[_0x415991(0x115)](decrypt,_0x42273e,_0x2d5b4f),console['log'](_0x642f74[_0x415991(0xf5)]);}catch(_0x2537fd){const _0x28ba59=_0x642f74[_0x415991(0x134)](_0x2537fd,Error)?_0x2537fd[_0x415991(0xfc)]:String(_0x2537fd);throw new Error(_0x415991(0x10c)+_0x1c80e7['name']+'\x22:\x20'+_0x28ba59);}else _0x514a97?console[_0x415991(0x124)](_0x415991(0x107)):console['log']('\x20\x20No\x20auth\x20state\x20found\x20(app\x20may\x20not\x20require\x20authentication)');await _0x642f74['VChAe'](writeActiveProfileName,_0x1c80e7['name']),console[_0x415991(0x124)]('✓\x20Active\x20profile:\x20'+_0x1c80e7[_0x415991(0x114)]),_0x10bfea?.[_0x415991(0x106)](_0x415991(0x125),{'profileName':_0x1c80e7[_0x415991(0x114)],'hasAuth':_0x514a97,'hasEncryptedAuth':_0x4b0c1b,'createdSettings':_0xd5cd49}),_0x10bfea?.['trackPhaseStart']('plugin');const _0x1184b0=await _0x642f74['UkAiS'](installPluginNonInteractive);_0x10bfea?.[_0x415991(0x106)]('plugin',{'installed':_0x1184b0}),_0x10bfea?.['trackPhaseStart'](_0x642f74['TOnJF']),await _0x642f74['fmmtP'](skillup,{'autoInstall':_0x415991(0x110)}),_0x10bfea?.[_0x415991(0x106)](_0x415991(0x13e)),console[_0x415991(0x124)](_0x642f74['rDXjd']);}
1
+ function _0x57e1(){const _0x56eaf9=['dgsHq','.\x20Use\x20--profile\x20to\x20specify\x20which\x20one.','Installing\x20Claude\x20Code\x20plugin\x20(project\x20level)...','success','You\x20can\x20install\x20manually:\x20claude\x20plugin\x20marketplace\x20add\x20ranger-testing/trailhead','swBBO','✓\x20Marketplace\x20already\x20added','2pkmYAP','1170GIlCJe','\x0a🔧\x20Ranger\x20CI\x20Setup\x0a','✓\x20Auth\x20state\x20found','XqiOs','1109010BkcEAV','marketplace','chromium','dYJNG','Multiple\x20CI\x20profiles\x20found:\x20','✓\x20Created\x20profile\x20settings:\x20baseUrl=','jqFxB','log','CaAwQ','UUegs','settings.json','skipChromium','baseUrl','246057ixeFPY','\x22:\x20','Or\x20specify\x20a\x20profile\x20name\x20with\x20--profile\x20and\x20--base-url\x20to\x20create\x20one.','wZRKU','vpjqg','No\x20CI\x20profiles\x20found.\x20Create\x20one\x20first\x20with:\x20ranger\x20profile\x20add\x20<name>\x20--ci\x0a','RZOWn','6PfSpiQ','dir_setup','profile','KMkht','join','trackPhaseStart','Auto-detected\x20CI\x20profile:\x20','gmhvl','length','hYaoJ','20781HUjtnP','No\x20CI\x20profiles\x20found\x20in\x20.ranger/ci/.\x20Create\x20one\x20first\x20with:\x20ranger\x20profile\x20add\x20<name>\x20--ci\x0a','112532HdIgSE','Uwdiv','name','path','BqHBi','plugin','xGkfP','NQolB','QHeAW','PAHKi','trackPhaseEnd','ranger@trailhead','rewrt','2565234YLbAGG','project','cVphS','install','isDirectory','✓\x20Encrypted\x20auth\x20verified\x20(will\x20decrypt\x20at\x20runtime)','Failed\x20to\x20install\x20plugin:','auth.json.enc','profile_activate','1874745MorLgc','1323608MKIoXp','Failed\x20to\x20verify\x20encrypted\x20auth\x20for\x20profile\x20\x22'];_0x57e1=function(){return _0x56eaf9;};return _0x57e1();}(function(_0x45492b,_0x45b22d){const _0x2e0c35=_0x2400,_0x5dba16=_0x45492b();while(!![]){try{const _0x185812=-parseInt(_0x2e0c35(0x1f8))/0x1*(-parseInt(_0x2e0c35(0x1e6))/0x2)+-parseInt(_0x2e0c35(0x1eb))/0x3+parseInt(_0x2e0c35(0x1c6))/0x4+parseInt(_0x2e0c35(0x1dc))/0x5+parseInt(_0x2e0c35(0x1ba))/0x6*(parseInt(_0x2e0c35(0x1d3))/0x7)+-parseInt(_0x2e0c35(0x1dd))/0x8+-parseInt(_0x2e0c35(0x1c4))/0x9*(parseInt(_0x2e0c35(0x1e7))/0xa);if(_0x185812===_0x45b22d)break;else _0x5dba16['push'](_0x5dba16['shift']());}catch(_0x3ad1d4){_0x5dba16['push'](_0x5dba16['shift']());}}}(_0x57e1,0x33597));import{mkdir,readFile,readdir}from'fs/promises';import{join}from'path';import{existsSync}from'fs';function _0x2400(_0x33ffac,_0x11315b){_0x33ffac=_0x33ffac-0x1b6;const _0x57e17f=_0x57e1();let _0x240041=_0x57e17f[_0x33ffac];return _0x240041;}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';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(_0x3b25e8){const _0x129b05=_0x2400,_0x589f81={'dgsHq':function(_0x508c83,_0x160864,_0x561b30){return _0x508c83(_0x160864,_0x561b30);},'NQolB':function(_0x4f4d61,_0xdd217f){return _0x4f4d61+_0xdd217f;},'psLNk':_0x129b05(0x1b8),'rewrt':function(_0x38ce1a,_0x502466){return _0x38ce1a===_0x502466;}},_0xe0f4ef=getRangerDir(),_0x538259=_0x589f81[_0x129b05(0x1df)](join,_0xe0f4ef,'ci');if(_0x3b25e8){const _0x2774d0=join(_0x538259,_0x3b25e8);return{'name':_0x3b25e8,'path':_0x2774d0};}if(!existsSync(_0x538259))throw new Error(_0x589f81[_0x129b05(0x1cd)](_0x589f81['psLNk'],_0x129b05(0x1fa)));const _0x30177b=await readdir(_0x538259,{'withFileTypes':!![]}),_0x653b0f=_0x30177b['filter'](_0x10c5b5=>_0x10c5b5[_0x129b05(0x1d7)]())['map'](_0x3adefe=>_0x3adefe['name']);if(_0x589f81[_0x129b05(0x1d2)](_0x653b0f[_0x129b05(0x1c2)],0x0))throw new Error(_0x589f81[_0x129b05(0x1cd)](_0x129b05(0x1c5),'Or\x20specify\x20a\x20profile\x20name\x20with\x20--profile\x20and\x20--base-url\x20to\x20create\x20one.'));if(_0x653b0f['length']===0x1){const _0x28da3c=_0x653b0f[0x0];return console[_0x129b05(0x1f2)](_0x129b05(0x1c0)+_0x28da3c),{'name':_0x28da3c,'path':join(_0x538259,_0x28da3c)};}throw new Error(_0x129b05(0x1ef)+_0x653b0f[_0x129b05(0x1be)](',\x20')+_0x129b05(0x1e0));}async function installPluginNonInteractive(){const _0x501b59=_0x2400,_0xe59113={'MndbM':_0x501b59(0x1d1),'jqFxB':'✓\x20Claude\x20Code\x20plugin\x20already\x20installed','gmhvl':function(_0x22ef58,_0x144c25){return _0x22ef58(_0x144c25);},'fHrtR':'trailhead','BqHBi':_0x501b59(0x1e5),'XqiOs':_0x501b59(0x1ec),'UUegs':'add','UwIyS':'ranger-testing/trailhead','kKaxd':'Failed\x20to\x20add\x20marketplace:','cVphS':_0x501b59(0x1e3),'vpjqg':_0x501b59(0x1d6),'dYJNG':'--scope','CaAwQ':'project'},_0x383e9b=await isPluginInstalled(_0xe59113['MndbM']);if(_0x383e9b)return console[_0x501b59(0x1f2)](_0xe59113[_0x501b59(0x1f1)]),![];console[_0x501b59(0x1f2)](_0x501b59(0x1e1));const _0xa0689f=await _0xe59113[_0x501b59(0x1c1)](isMarketplaceAdded,_0xe59113['fHrtR']);let _0x1b8637=_0xa0689f;if(_0xa0689f)console[_0x501b59(0x1f2)](_0xe59113[_0x501b59(0x1ca)]);else{const _0x5a788e=await runClaudeCommand(['plugin',_0xe59113[_0x501b59(0x1ea)],_0xe59113[_0x501b59(0x1f4)],_0xe59113['UwIyS']]);!_0x5a788e['success']?(console['error'](_0xe59113['kKaxd'],_0x5a788e['error']),console[_0x501b59(0x1f2)](_0xe59113[_0x501b59(0x1d5)])):_0x1b8637=!![];}if(_0x1b8637){const _0x49a0c3=await runClaudeCommand([_0x501b59(0x1cb),_0xe59113[_0x501b59(0x1b7)],_0xe59113['MndbM'],_0xe59113[_0x501b59(0x1ee)],_0xe59113[_0x501b59(0x1f3)]]);!_0x49a0c3[_0x501b59(0x1e2)]?(console['error'](_0x501b59(0x1d9),_0x49a0c3['error']),console[_0x501b59(0x1f2)]('You\x20can\x20install\x20manually:\x20claude\x20plugin\x20install\x20ranger@trailhead\x20--scope\x20project')):console['log']('✓\x20Claude\x20Code\x20plugin\x20installed');}return!![];}export async function setupCi(_0x404568,_0x2eac80,_0x24818a){const _0x1d6135=_0x2400,_0x1c8d9a={'PAHKi':_0x1d6135(0x1e8),'Uwdiv':'auth','KMkht':function(_0x36983c){return _0x36983c();},'fnhhj':function(_0x136b98,_0x28eb03){return _0x136b98(_0x28eb03);},'khxME':function(_0x4b6640,_0xc802ff){return _0x4b6640(_0xc802ff);},'aRfHt':'dir_setup','UCsdi':'✓\x20Skipping\x20Chromium\x20check\x20(--skip-chromium)','wZRKU':_0x1d6135(0x1ed),'XUIVr':'profile_activate','QHeAW':function(_0x1b30e5,_0x449a35,_0x369424){return _0x1b30e5(_0x449a35,_0x369424);},'xGkfP':function(_0x5c7240,_0x1bfae4){return _0x5c7240(_0x1bfae4);},'ZxJbf':function(_0x1bd297,_0x2be2b9,_0xb43ee0){return _0x1bd297(_0x2be2b9,_0xb43ee0);},'PpPki':function(_0x674e18,_0x4a288e,_0xb9bfd3){return _0x674e18(_0x4a288e,_0xb9bfd3);},'lPkvS':_0x1d6135(0x1da),'QJcZa':function(_0x51c613,_0x4cbc21){return _0x51c613(_0x4cbc21);},'swBBO':function(_0x494eff){return _0x494eff();},'yjpex':'No\x20API\x20token\x20available\x20for\x20decryption','EMFDi':function(_0x503b84,_0x3d60fb){return _0x503b84 instanceof _0x3d60fb;},'FbRmk':function(_0x148d3f,_0x3021f9){return _0x148d3f(_0x3021f9);},'mnrES':'\x20\x20No\x20auth\x20state\x20found\x20(app\x20may\x20not\x20require\x20authentication)','RZOWn':'plugin','hYaoJ':function(_0x2120a1){return _0x2120a1();}};console['log'](_0x1c8d9a[_0x1d6135(0x1cf)]),_0x24818a?.[_0x1d6135(0x1bf)](_0x1c8d9a[_0x1d6135(0x1c7)]),await authenticate(_0x404568),_0x24818a?.['trackPhaseEnd'](_0x1c8d9a['Uwdiv']),_0x24818a?.[_0x1d6135(0x1bf)](_0x1d6135(0x1bb));const {path:_0x2e3dc2,installed:_0x3ff4c5}=await _0x1c8d9a['KMkht'](ensureRangerDir);await _0x1c8d9a['fnhhj'](writeRangerGitignore,_0x2e3dc2);const _0x5aaae6=join(_0x2e3dc2,'sessions');!_0x1c8d9a['khxME'](existsSync,_0x5aaae6)&&await mkdir(_0x5aaae6,{'recursive':!![]});_0x24818a?.['trackPhaseEnd'](_0x1c8d9a['aRfHt'],{'installed':_0x3ff4c5}),_0x24818a?.['trackPhaseStart']('chromium');let _0x3956c1=![];_0x2eac80?.[_0x1d6135(0x1f6)]?console[_0x1d6135(0x1f2)](_0x1c8d9a['UCsdi']):_0x3956c1=await _0x1c8d9a[_0x1d6135(0x1bd)](ensureChromium);_0x24818a?.[_0x1d6135(0x1d0)](_0x1c8d9a[_0x1d6135(0x1b6)],{'installed':_0x3956c1,'skipped':!!_0x2eac80?.[_0x1d6135(0x1f6)]}),_0x24818a?.['trackPhaseStart'](_0x1c8d9a['XUIVr']);const _0x29d565=await _0x1c8d9a['khxME'](findCiProfile,_0x2eac80?.[_0x1d6135(0x1bc)]);let _0x2238b6=![];_0x2eac80?.[_0x1d6135(0x1f7)]&&(await mkdir(_0x29d565['path'],{'recursive':!![]}),await saveSettings(_0x29d565[_0x1d6135(0x1c8)],{'baseUrl':_0x2eac80[_0x1d6135(0x1f7)],'headless':!![]}),console['log'](_0x1d6135(0x1f0)+_0x2eac80['baseUrl']),_0x2238b6=!![]);const _0x3c20d4=_0x1c8d9a[_0x1d6135(0x1ce)](join,_0x29d565['path'],_0x1d6135(0x1f5));if(!_0x1c8d9a[_0x1d6135(0x1cc)](existsSync,_0x3c20d4)&&!_0x2238b6)throw new Error('CI\x20profile\x20\x22'+_0x29d565['name']+'\x22\x20has\x20no\x20settings.json.\x20Use\x20--base-url\x20to\x20configure\x20it.');const _0x4fa772=_0x1c8d9a['ZxJbf'](join,_0x29d565['path'],'auth.json'),_0x4174ad=_0x1c8d9a['PpPki'](join,_0x29d565[_0x1d6135(0x1c9)],_0x1c8d9a['lPkvS']),_0xd150fb=existsSync(_0x4fa772),_0x5b77f0=_0x1c8d9a['QJcZa'](existsSync,_0x4174ad);if(_0x5b77f0)try{const _0x4b881c=await _0x1c8d9a[_0x1d6135(0x1e4)](getToken);if(!_0x4b881c)throw new Error(_0x1c8d9a['yjpex']);const _0x500241=await readFile(_0x4174ad);decrypt(_0x500241,_0x4b881c),console[_0x1d6135(0x1f2)](_0x1d6135(0x1d8));}catch(_0x32e39b){const _0xd6fa8a=_0x1c8d9a['EMFDi'](_0x32e39b,Error)?_0x32e39b['message']:_0x1c8d9a['FbRmk'](String,_0x32e39b);throw new Error(_0x1d6135(0x1de)+_0x29d565['name']+_0x1d6135(0x1f9)+_0xd6fa8a);}else _0xd150fb?console[_0x1d6135(0x1f2)](_0x1d6135(0x1e9)):console[_0x1d6135(0x1f2)](_0x1c8d9a['mnrES']);await _0x1c8d9a['khxME'](writeActiveProfileName,_0x29d565[_0x1d6135(0x1c8)]),console['log']('✓\x20Active\x20profile:\x20'+_0x29d565[_0x1d6135(0x1c8)]),_0x24818a?.['trackPhaseEnd'](_0x1d6135(0x1db),{'profileName':_0x29d565[_0x1d6135(0x1c8)],'hasAuth':_0xd150fb,'hasEncryptedAuth':_0x5b77f0,'createdSettings':_0x2238b6}),_0x24818a?.[_0x1d6135(0x1bf)](_0x1c8d9a[_0x1d6135(0x1b9)]);const _0x379853=await _0x1c8d9a[_0x1d6135(0x1c3)](installPluginNonInteractive);_0x24818a?.['trackPhaseEnd'](_0x1d6135(0x1cb),{'installed':_0x379853}),_0x24818a?.['trackPhaseStart']('skills'),await skillup({'autoInstall':_0x1d6135(0x1d4)}),_0x24818a?.[_0x1d6135(0x1d0)]('skills'),console['log']('\x0a✅\x20Ranger\x20CI\x20setup\x20complete!\x0a');}
@@ -1 +1 @@
1
- (function(_0x110155,_0xba47af){const _0x2e2fab=_0x59d5,_0x3779fb=_0x110155();while(!![]){try{const _0x43c1fd=-parseInt(_0x2e2fab(0x104))/0x1*(parseInt(_0x2e2fab(0x10f))/0x2)+parseInt(_0x2e2fab(0x116))/0x3+-parseInt(_0x2e2fab(0x113))/0x4+-parseInt(_0x2e2fab(0x117))/0x5+-parseInt(_0x2e2fab(0x11c))/0x6+parseInt(_0x2e2fab(0xfe))/0x7*(parseInt(_0x2e2fab(0x100))/0x8)+parseInt(_0x2e2fab(0xfa))/0x9;if(_0x43c1fd===_0xba47af)break;else _0x3779fb['push'](_0x3779fb['shift']());}catch(_0x5632a9){_0x3779fb['push'](_0x3779fb['shift']());}}}(_0x570e,0x6026c));import{basename}from'path';import _0x4d3038 from'inquirer';import{getToken}from'./utils/keychain.js';function _0x570e(){const _0x30e98e=['770655pvAPFI','\x20--opencode','isTTY','project-level','To\x20get\x20started:','4547418qoVXQa','MKjYi','/skills/','ENZdn','AWHbu','prompt','ErfHP','Where\x20should\x20skills\x20be\x20installed?','suppressUsage','❌\x20No\x20Ranger\x20API\x20token\x20found.\x0a','split','\x20successfully!\x0a','9720423xKfwoL','\x20skill','\x20\x20-\x20Start\x20OpenCode\x20and\x20run\x20the\x20`ranger_enable`\x20tool\x20to\x20enable\x20hooks.','\x20\x201.\x20Get\x20your\x20API\x20token\x20from\x20https://dashboard.ranger.net/cli','7qLDoeT','WkzCq','3129784NywopH','\x0a⚠️\x20\x20No\x20skills\x20were\x20installed.\x0a','txFaZ','user','31WjEksD','project','claude','To\x20use:','log','warn','Elkhu','iYGxD','\x20\x20Failed\x20to\x20install\x20ranger\x20skill:','\x20\x202.\x20Run:\x20ranger\x20setup','ByKLQ','17972URMOez','\x20<your-api-token>','dKYSx','\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!','1113544BUIsZK','installLevel','\x0a✅\x20Installed\x20','1174656Nahzmr'];_0x570e=function(){return _0x30e98e;};return _0x570e();}import{installSkill}from'./utils/skills.js';import{getCurrentVersion}from'./utils/version.js';import{getClaudeConfigDir,getProjectRoot}from'./utils/claudeConfig.js';function _0x59d5(_0x2b09c5,_0xa5c6b2){_0x2b09c5=_0x2b09c5-0xf3;const _0x570e05=_0x570e();let _0x59d566=_0x570e05[_0x2b09c5];return _0x59d566;}import{getOpencodeConfigDir}from'./utils/opencodeConfig.js';export async function skillup(_0x2b03c4={}){const _0x4dbae9=_0x59d5,_0x4029f3={'gYzhG':'\x0a🎯\x20Ranger\x20Skill\x20Setup\x0a','ErfHP':'3|1|2|4|5|0','dKYSx':'opencode','AWHbu':function(_0x124315,_0x16ef6c){return _0x124315===_0x16ef6c;},'ENZdn':function(_0x2d45ed,_0x83ce96){return _0x2d45ed===_0x83ce96;},'WkzCq':function(_0x4d5744,_0xad5056){return _0x4d5744(_0xad5056);},'MKjYi':_0x4dbae9(0x103),'Elkhu':function(_0x5e70f5){return _0x5e70f5();},'gNMSo':'list','rIVzR':_0x4dbae9(0xf5),'iHWrU':_0x4dbae9(0x105),'iYGxD':function(_0x398680,_0x4b8681,_0xd23939){return _0x398680(_0x4b8681,_0xd23939);},'jdIvk':_0x4dbae9(0x10c),'txFaZ':function(_0x4c6489,_0x30c500){return _0x4c6489>_0x30c500;},'SBnDK':'user-level','ByKLQ':function(_0x28b881,_0x5241c8){return _0x28b881===_0x5241c8;}};console['log'](_0x4029f3['gYzhG']);const _0x9ae306=_0x2b03c4['platform']??_0x4dbae9(0x106),_0x412503=await getToken();if(!_0x412503){const _0x5c5b8d=_0x4029f3[_0x4dbae9(0xf4)][_0x4dbae9(0xf8)]('|');let _0x4b2043=0x0;while(!![]){switch(_0x5c5b8d[_0x4b2043++]){case'0':return;case'1':console[_0x4dbae9(0x108)](_0x4dbae9(0x11b));continue;case'2':console['log'](_0x4dbae9(0xfd));continue;case'3':console[_0x4dbae9(0x108)](_0x4dbae9(0xf7));continue;case'4':console['log'](_0x4dbae9(0x10d)+(_0x9ae306===_0x4029f3['dKYSx']?'\x20--opencode':'')+_0x4dbae9(0x110));continue;case'5':console[_0x4dbae9(0x108)]('\x20\x203.\x20Run:\x20ranger\x20skillup'+(_0x4029f3[_0x4dbae9(0x120)](_0x9ae306,_0x4029f3['dKYSx'])?_0x4dbae9(0x118):'')+'\x0a');continue;}break;}}console[_0x4dbae9(0x108)]('✓\x20Found\x20API\x20token');const _0x5cebcb=getProjectRoot(),_0x13c01e=basename(_0x5cebcb),_0xf7bb90=_0x4029f3[_0x4dbae9(0x11f)](_0x9ae306,_0x4029f3['dKYSx'])?_0x4029f3[_0x4dbae9(0xff)](getOpencodeConfigDir,_0x4029f3[_0x4dbae9(0x11d)])+_0x4dbae9(0x11e):_0x4029f3[_0x4dbae9(0x10a)](getClaudeConfigDir)+_0x4dbae9(0x11e),_0x42544a=_0x9ae306===_0x4029f3[_0x4dbae9(0x111)]?_0x5cebcb+'/.opencode/skills/':_0x5cebcb+'/.claude/skills/',_0x1b3868=process['stdin'][_0x4dbae9(0x119)]&&process['stdout'][_0x4dbae9(0x119)];let _0x546324;if(_0x2b03c4['autoInstall'])_0x546324=_0x2b03c4['autoInstall'];else{if(_0x1b3868){const _0x354f20=await _0x4d3038[_0x4dbae9(0xf3)]([{'type':_0x4029f3['gNMSo'],'name':_0x4dbae9(0x114),'message':_0x4029f3['rIVzR'],'choices':[{'name':'All\x20projects\x20('+_0xf7bb90+')','value':_0x4029f3['MKjYi']},{'name':'This\x20project\x20only\x20('+_0x42544a+')','value':_0x4dbae9(0x105)}]}]);_0x546324=_0x354f20['installLevel'];}else _0x546324=_0x4029f3['iHWrU'],console['log']('Non-interactive\x20mode:\x20Installing\x20skills\x20at\x20project\x20level\x20('+_0x42544a+')');}let _0x1949ee=0x0;const _0x273e32=getCurrentVersion();console['log']('\x0a📦\x20Installing\x20skills...\x0a');try{const _0x1f6128=await _0x4029f3[_0x4dbae9(0x10b)](installSkill,'ranger',{'cliVersion':_0x273e32,'level':_0x546324,'platform':_0x9ae306});_0x1f6128&&_0x1949ee++;}catch(_0x44d9b2){console[_0x4dbae9(0x109)](_0x4029f3['jdIvk'],_0x44d9b2 instanceof Error?_0x44d9b2['message']:_0x44d9b2);}if(_0x4029f3[_0x4dbae9(0x102)](_0x1949ee,0x0)){const _0x118f00=_0x4029f3[_0x4dbae9(0x11f)](_0x546324,'user')?_0x4029f3['SBnDK']:_0x4dbae9(0x11a);console[_0x4dbae9(0x108)](_0x4dbae9(0x115)+_0x1949ee+'\x20'+_0x118f00+_0x4dbae9(0xfb)+(_0x1949ee>0x1?'s':'')+_0x4dbae9(0xf9)),!_0x2b03c4[_0x4dbae9(0xf6)]&&(console[_0x4dbae9(0x108)](_0x4dbae9(0x107)),_0x4029f3[_0x4dbae9(0x10e)](_0x9ae306,'opencode')?console[_0x4dbae9(0x108)](_0x4dbae9(0xfc)):console[_0x4dbae9(0x108)](_0x4dbae9(0x112)));}else console['log'](_0x4dbae9(0x101));}
1
+ (function(_0x2a8376,_0x39b488){const _0x39b0e0=_0xe1b7,_0x27156f=_0x2a8376();while(!![]){try{const _0x5d5527=-parseInt(_0x39b0e0(0x20c))/0x1*(parseInt(_0x39b0e0(0x1f1))/0x2)+-parseInt(_0x39b0e0(0x204))/0x3+parseInt(_0x39b0e0(0x215))/0x4+-parseInt(_0x39b0e0(0x206))/0x5+-parseInt(_0x39b0e0(0x1f4))/0x6+-parseInt(_0x39b0e0(0x202))/0x7*(-parseInt(_0x39b0e0(0x217))/0x8)+parseInt(_0x39b0e0(0x1ef))/0x9*(parseInt(_0x39b0e0(0x1fa))/0xa);if(_0x5d5527===_0x39b488)break;else _0x27156f['push'](_0x27156f['shift']());}catch(_0x10bafd){_0x27156f['push'](_0x27156f['shift']());}}}(_0x255a,0xbcc9a));import{basename}from'path';import _0x213d93 from'inquirer';import{getToken}from'./utils/keychain.js';import{installSkill}from'./utils/skills.js';function _0xe1b7(_0x51b342,_0x20413f){_0x51b342=_0x51b342-0x1ef;const _0x255a2b=_0x255a();let _0xe1b77d=_0x255a2b[_0x51b342];return _0xe1b77d;}import{getCurrentVersion}from'./utils/version.js';function _0x255a(){const _0x176306=['\x0a⚠️\x20\x20No\x20skills\x20were\x20installed.\x0a','8eUarEY','user','63wqMPAs','❌\x20No\x20Ranger\x20API\x20token\x20found.\x0a','1348knYNCP','Where\x20should\x20skills\x20be\x20installed?','Non-interactive\x20mode:\x20Installing\x20skills\x20at\x20project\x20level\x20(','8230356fpMgxk','QRehH','4|5|2|3|0|1','SmVHk','platform','\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!','4086480ZgXxSp','user-level','isTTY','prompt','ranger','\x20--opencode','/skills/','KbxBG','1907171hUPxSz','\x20\x201.\x20Get\x20your\x20API\x20token\x20from\x20https://dashboard.ranger.net/cli','1414614HgbkZh','message','1327460Qjxyup','LUVLo','IGGGS','oDSJq','WJiys','\x20\x20-\x20Start\x20OpenCode\x20and\x20run\x20the\x20`ranger_enable`\x20tool\x20to\x20enable\x20hooks.','1953AwsrBO','claude','\x20successfully!\x0a','\x0a🎯\x20Ranger\x20Skill\x20Setup\x0a','PBSee','stdin','FCbks','log','\x20\x203.\x20Run:\x20ranger\x20skillup','4261452RbhmqL'];_0x255a=function(){return _0x176306;};return _0x255a();}import{getClaudeConfigDir,getProjectRoot}from'./utils/claudeConfig.js';import{getOpencodeConfigDir}from'./utils/opencodeConfig.js';export async function skillup(_0x21d70b={}){const _0x103f2d=_0xe1b7,_0x431070={'SmVHk':_0x103f2d(0x20f),'dYnjT':_0x103f2d(0x20d),'qsuBD':function(_0x53a6ac){return _0x53a6ac();},'WJiys':_0x103f2d(0x1f6),'KbxBG':function(_0x22ba41,_0x30b7c7){return _0x22ba41===_0x30b7c7;},'PBSee':'opencode','FCbks':'To\x20get\x20started:','tdGuV':function(_0x31fdde){return _0x31fdde();},'OYSot':function(_0x2144f4,_0x5d1da6){return _0x2144f4(_0x5d1da6);},'oDSJq':function(_0x495cdb,_0x4f831d){return _0x495cdb===_0x4f831d;},'QRehH':_0x103f2d(0x218),'ceDBi':function(_0x4d73bf){return _0x4d73bf();},'iIZde':'list','LUVLo':'project','GvmcN':function(_0x37ee2c){return _0x37ee2c();},'JPieW':function(_0x5f5a1,_0x694a13){return _0x5f5a1 instanceof _0x694a13;},'pCdKk':_0x103f2d(0x1fb),'fyKDj':_0x103f2d(0x20b),'IGGGS':_0x103f2d(0x1f9)};console['log'](_0x431070[_0x103f2d(0x1f7)]);const _0x4a3b59=_0x21d70b[_0x103f2d(0x1f8)]??_0x431070['dYnjT'],_0x501505=await _0x431070['qsuBD'](getToken);if(!_0x501505){const _0x39bcc0=_0x431070[_0x103f2d(0x20a)]['split']('|');let _0x1a227c=0x0;while(!![]){switch(_0x39bcc0[_0x1a227c++]){case'0':console[_0x103f2d(0x213)](_0x103f2d(0x214)+(_0x431070['KbxBG'](_0x4a3b59,_0x431070[_0x103f2d(0x210)])?'\x20--opencode':'')+'\x0a');continue;case'1':return;case'2':console[_0x103f2d(0x213)](_0x103f2d(0x203));continue;case'3':console['log']('\x20\x202.\x20Run:\x20ranger\x20setup'+(_0x431070['KbxBG'](_0x4a3b59,_0x431070['PBSee'])?_0x103f2d(0x1ff):'')+'\x20<your-api-token>');continue;case'4':console['log'](_0x103f2d(0x1f0));continue;case'5':console['log'](_0x431070[_0x103f2d(0x212)]);continue;}break;}}console['log']('✓\x20Found\x20API\x20token');const _0x5c4f9d=_0x431070['tdGuV'](getProjectRoot),_0x3f5171=_0x431070['OYSot'](basename,_0x5c4f9d),_0x154874=_0x431070[_0x103f2d(0x209)](_0x4a3b59,_0x431070['PBSee'])?_0x431070['OYSot'](getOpencodeConfigDir,_0x431070[_0x103f2d(0x1f5)])+_0x103f2d(0x200):_0x431070['ceDBi'](getClaudeConfigDir)+'/skills/',_0x55b37d=_0x431070['KbxBG'](_0x4a3b59,_0x431070['PBSee'])?_0x5c4f9d+'/.opencode/skills/':_0x5c4f9d+'/.claude/skills/',_0x221912=process[_0x103f2d(0x211)]['isTTY']&&process['stdout'][_0x103f2d(0x1fc)];let _0x127e5d;if(_0x21d70b['autoInstall'])_0x127e5d=_0x21d70b['autoInstall'];else{if(_0x221912){const _0x516bc1=await _0x213d93[_0x103f2d(0x1fd)]([{'type':_0x431070['iIZde'],'name':'installLevel','message':_0x103f2d(0x1f2),'choices':[{'name':'All\x20projects\x20('+_0x154874+')','value':_0x431070[_0x103f2d(0x1f5)]},{'name':'This\x20project\x20only\x20('+_0x55b37d+')','value':_0x431070['LUVLo']}]}]);_0x127e5d=_0x516bc1['installLevel'];}else _0x127e5d=_0x431070[_0x103f2d(0x207)],console[_0x103f2d(0x213)](_0x103f2d(0x1f3)+_0x55b37d+')');}let _0x452f8e=0x0;const _0x60d470=_0x431070['GvmcN'](getCurrentVersion);console[_0x103f2d(0x213)]('\x0a📦\x20Installing\x20skills...\x0a');try{const _0x4320eb=await installSkill(_0x103f2d(0x1fe),{'cliVersion':_0x60d470,'level':_0x127e5d,'platform':_0x4a3b59});_0x4320eb&&_0x452f8e++;}catch(_0x2930c3){console['warn']('\x20\x20Failed\x20to\x20install\x20ranger\x20skill:',_0x431070['JPieW'](_0x2930c3,Error)?_0x2930c3[_0x103f2d(0x205)]:_0x2930c3);}if(_0x452f8e>0x0){const _0x4b222=_0x431070[_0x103f2d(0x201)](_0x127e5d,_0x431070[_0x103f2d(0x1f5)])?_0x431070['pCdKk']:'project-level';console[_0x103f2d(0x213)]('\x0a✅\x20Installed\x20'+_0x452f8e+'\x20'+_0x4b222+'\x20skill'+(_0x452f8e>0x1?'s':'')+_0x103f2d(0x20e)),!_0x21d70b['suppressUsage']&&(console[_0x103f2d(0x213)]('To\x20use:'),_0x4a3b59==='opencode'?console['log'](_0x431070['fyKDj']):console[_0x103f2d(0x213)](_0x431070[_0x103f2d(0x208)]));}else console[_0x103f2d(0x213)](_0x103f2d(0x216));}
@@ -1 +1 @@
1
- (function(_0x3cbded,_0x18f702){const _0x48e7f1=_0x34bd,_0x56b54c=_0x3cbded();while(!![]){try{const _0x25e0c1=parseInt(_0x48e7f1(0xb6))/0x1+parseInt(_0x48e7f1(0xe0))/0x2*(parseInt(_0x48e7f1(0xa5))/0x3)+-parseInt(_0x48e7f1(0xdf))/0x4+parseInt(_0x48e7f1(0xbb))/0x5+parseInt(_0x48e7f1(0xaf))/0x6*(parseInt(_0x48e7f1(0xcf))/0x7)+parseInt(_0x48e7f1(0xe2))/0x8*(-parseInt(_0x48e7f1(0x9a))/0x9)+-parseInt(_0x48e7f1(0xdd))/0xa*(parseInt(_0x48e7f1(0xd0))/0xb);if(_0x25e0c1===_0x18f702)break;else _0x56b54c['push'](_0x56b54c['shift']());}catch(_0x536256){_0x56b54c['push'](_0x56b54c['shift']());}}}(_0x5243,0xea9b8));import{mkdir,writeFile}from'fs/promises';import{join}from'path';import{existsSync}from'fs';import{createRequire}from'module';import{spawn}from'child_process';import _0x14a49 from'inquirer';import{getToken,storeToken}from'./utils/keychain.js';import{getCurrentUser}from'./utils/userApi.js';import{chromium}from'playwright';function _0x5243(){const _0x102791=['Could\x20not\x20determine\x20local\x20Playwright\x20version.\x20Install\x20Playwright\x20Chromium\x20using\x20fallback\x20version\x20','skills','You\x20will\x20need\x20to\x20install\x20it\x20before\x20using\x20Ranger:','SAuXB','message','gJZQV','6RInzdt',')\x20of\x20the\x20Playwright\x20Chromium\x20browser\x20is\x20not\x20installed.\x20Install\x20it\x20now?','voDvt','\x0aIn\x20Claude\x20Code,\x20run\x20','xbdli','error','\x0a❌\x20Failed\x20to\x20install\x20Chromium:','1889832bfhEnS','git_check','platform','install','Abemy','1476370nWOAZK','Failed\x20to\x20validate\x20provisioned\x20API\x20key:\x20','xfbdL','\x0a✓\x20Playwright\x20Chromium\x20installed\x20successfully','AUhdt','url','skipChromium','yoKAZ','plugin','playwright@','✓\x20Already\x20authenticated\x20to\x20','BiLcw','BjdBA','No\x20git\x20repository\x20found','wantsProfile','stdin','✓\x20Authenticated\x20to\x20','skipAuth','paaIB','XuYRV','13372121diKrlL','1368037jmrjlQ','No\x20git\x20repository\x20found.\x20Please\x20run\x20`ranger\x20setup`\x20from\x20inside\x20your\x20project\x20directory,\x0a','ranger','The\x20required\x20version\x20(','Make\x20sure\x20your\x20app\x20is\x20running\x20before\x20you\x20start.\x0a','nbesD','npx','\x0aIn\x20order\x20for\x20Ranger\x20to\x20verify\x20your\x20work,\x20you\x27ll\x20need\x20to\x20set\x20up\x20a\x20profile\x20later\x20with:','✓\x20.ranger/\x20directory\x20already\x20exists','✓\x20Local\x20profile\x20already\x20exists','qrJEk','opencode','ranger\x20profile\x20add\x20local','130SYjqAJ','log','6073620WlTuBr','67148mMtYBj','or\x20use\x20--scope\x20user\x20to\x20install\x20at\x20the\x20user\x20level\x20without\x20a\x20project.','256664CfSQbS','.\x20Please\x20check\x20your\x20network\x20connection\x20and\x20server\x20URL.','\x0ascenarios\x20describing\x20what\x20to\x20verify\x20and\x20then\x20run\x20browser','FiVvv','\x0aSkipping\x20profile\x20setup\x20(--skip-auth).\x20Run\x20`ranger\x20setup`\x20with\x20auth\x20to\x20add\x20a\x20profile\x20later.\x0a','trackPhaseStart','CvjmK','trackPhaseEnd','RhuWm','isTTY','ready','trackPhaseError','withDeps','Kidwe','rzRxt','scope','force','\x0a🚀\x20Ranger\x20Setup\x0a','organizationName','✓\x20Skipping\x20authentication\x20(--skip-auth)','chromium','uGdhf','confirm','aqApF','inherit','stdout','success','DQuZB','status','.\x20Please\x20check\x20your\x20API\x20token\x20and\x20try\x20again.','wKCyc','bzBWi','local','JXDys','207plWxrD','Failed\x20to\x20connect\x20to\x20MCP\x20server:\x20','skipped','user','BWhYW','auth','TlcIl','prompt','\x0aInstalling\x20Chromium\x20browser...\x0a','djUHM','\x20install\x20chromium','66DjyLLz','You\x27ll\x20need\x20the\x20app\x20to\x20be\x20running\x20to\x20set\x20up\x20the\x20profile.','\x20now?','UGoUt'];_0x5243=function(){return _0x102791;};return _0x5243();}import{addEnv}from'./addEnv.js';import{getRangerDir,getRangerHomeDir,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';import{installSkill}from'./utils/skills.js';const require=createRequire(import.meta.url);function _0x34bd(_0x5b2730,_0x236302){_0x5b2730=_0x5b2730-0x85;const _0x524368=_0x5243();let _0x34bdc2=_0x524368[_0x5b2730];return _0x34bdc2;}export const PLAYWRIGHT_CHROMIUM_INSTALL_FALLBACK_VERSION='1.58.2';const bold=_0x49ad42=>'\x1b[1m'+_0x49ad42+'\x1b[0m';export function getPlaywrightVersion(){const _0x1d9ba5={'iSGlC':'playwright/package.json','VKSMG':function(_0x29e086,_0x30aeb6){return _0x29e086(_0x30aeb6);}};try{const _0x1394ff=require['resolve'](_0x1d9ba5['iSGlC']),_0xfce0bc=_0x1d9ba5['VKSMG'](require,_0x1394ff);return _0xfce0bc['version'];}catch{return null;}}export function installChromiumBinary(_0x5df785,_0x3ec58c=![]){const _0x387c45=_0x34bd,_0x4014c5={'LrdzZ':function(_0x596823,_0x36ec1b){return _0x596823===_0x36ec1b;},'Ylplu':'--with-deps','BBGMW':'chromium','yoKAZ':function(_0x2395fb,_0x318cbf,_0x299d22,_0x58ff78){return _0x2395fb(_0x318cbf,_0x299d22,_0x58ff78);},'Abemy':'ignore','eoMzf':_0x387c45(0x90),'RhuWm':function(_0x2314a3,_0x3db73b){return _0x2314a3===_0x3db73b;},'DQuZB':'win32'};return new Promise((_0x592807,_0x44b43f)=>{const _0xf07d38=_0x387c45,_0x58b44f=[_0xf07d38(0xc4)+_0x5df785,_0xf07d38(0xb9),..._0x3ec58c?[_0x4014c5['Ylplu']]:[],_0x4014c5['BBGMW']],_0xbc947c=_0x4014c5[_0xf07d38(0xc2)](spawn,_0xf07d38(0xd6),_0x58b44f,{'stdio':[_0x4014c5[_0xf07d38(0xba)],_0xf07d38(0x90),_0x4014c5['eoMzf']],'shell':_0x4014c5[_0xf07d38(0xea)](process[_0xf07d38(0xb8)],_0x4014c5[_0xf07d38(0x93)])});_0xbc947c['on']('close',_0x503383=>{_0x4014c5['LrdzZ'](_0x503383,0x0)?_0x592807():_0x44b43f(new Error('Installation\x20failed\x20with\x20exit\x20code\x20'+_0x503383));}),_0xbc947c['on']('error',_0x2c0307=>{_0x44b43f(_0x2c0307);});});}export async function authenticate(_0x354002){const _0x4bf6b1=_0x34bd,_0x19d3ba={'NLSSX':function(_0x4d3807,_0x1c56f9){return _0x4d3807(_0x1c56f9);},'UGoUt':function(_0x55f57d,_0x559480){return _0x55f57d instanceof _0x559480;},'djUHM':'device_auth','snDRE':function(_0x127d29,_0x183671){return _0x127d29(_0x183671);},'BWhYW':'✓\x20Exported\x20credentials\x20for\x20CI'};if(!_0x354002){const _0xb52e49=await getToken();if(_0xb52e49){const _0x52976a=await _0x19d3ba['NLSSX'](getCurrentUser,_0xb52e49);if(_0x52976a[_0x4bf6b1(0x92)])return console['log'](_0x4bf6b1(0xc5)+_0x52976a['user'][_0x4bf6b1(0x8a)]),{'token':_0xb52e49,'method':'existing_token'};}try{_0x354002=await runDeviceAuthFlow();}catch(_0x240926){throw new Error('Authentication\x20failed:\x20'+(_0x19d3ba[_0x4bf6b1(0xa8)](_0x240926,Error)?_0x240926[_0x4bf6b1(0xad)]:_0x240926));}const _0x160a69=await getCurrentUser(_0x354002);if(!_0x160a69[_0x4bf6b1(0x92)])throw new Error(_0x4bf6b1(0xbc)+_0x160a69[_0x4bf6b1(0xb4)]);return console['log'](_0x4bf6b1(0xcb)+_0x160a69[_0x4bf6b1(0x9d)][_0x4bf6b1(0x8a)]),{'token':_0x354002,'method':_0x19d3ba[_0x4bf6b1(0xa3)]};}console['log']('Validating\x20API\x20token...');const _0x4f8d5f=await _0x19d3ba['NLSSX'](getCurrentUser,_0x354002);if(!_0x4f8d5f[_0x4bf6b1(0x92)]){if(_0x4f8d5f[_0x4bf6b1(0x94)])throw new Error('Authentication\x20failed:\x20'+_0x4f8d5f[_0x4bf6b1(0xb4)]+_0x4bf6b1(0x95));else throw new Error(_0x4bf6b1(0x9b)+_0x4f8d5f['error']+_0x4bf6b1(0xe3));}return console['log'](_0x4bf6b1(0xcb)+_0x4f8d5f[_0x4bf6b1(0x9d)][_0x4bf6b1(0x8a)]),await _0x19d3ba['snDRE'](storeToken,_0x354002),console['log'](process['env']['GITHUB_ENV']?_0x19d3ba[_0x4bf6b1(0x9e)]:'✓\x20Stored\x20credentials\x20locally'),{'token':_0x354002,'method':'provided_token'};}export async function ensureRangerDir(_0x2067f7){const _0x9118e1=_0x34bd,_0x355c5d={'paaIB':function(_0x2d7d4f){return _0x2d7d4f();},'wKCyc':function(_0x22f3d7,_0x4bebb9,_0x364573){return _0x22f3d7(_0x4bebb9,_0x364573);},'ASFGe':'.ranger','BjdBA':function(_0x50fa9b){return _0x50fa9b();},'TlcIl':'✓\x20Created\x20.ranger/\x20directory'};let _0x592bfd;if(_0x2067f7==='user')_0x592bfd=_0x355c5d[_0x9118e1(0xcd)](getRangerHomeDir);else{const _0x4df03=_0x355c5d['paaIB'](findGitRoot);_0x592bfd=_0x4df03?_0x355c5d[_0x9118e1(0x96)](join,_0x4df03,_0x355c5d['ASFGe']):_0x355c5d[_0x9118e1(0xc7)](getRangerDir);}return!existsSync(_0x592bfd)?(await _0x355c5d[_0x9118e1(0x96)](mkdir,_0x592bfd,{'recursive':!![]}),console[_0x9118e1(0xde)](_0x355c5d[_0x9118e1(0xa0)]),{'path':_0x592bfd,'installed':!![]}):(console['log'](_0x9118e1(0xd8)),{'path':_0x592bfd,'installed':![]});}export async function ensureChromium(_0xfb96a8=![]){const _0x141526=_0x34bd,_0x294d51={'BMBsf':function(_0x2088da,_0x450373){return _0x2088da(_0x450373);},'xfbdL':'✓\x20Playwright\x20Chromium\x20browser\x20found','XfIQs':function(_0x55f170){return _0x55f170();},'avNdZ':_0x141526(0xa2),'bzBWi':_0x141526(0xbe),'IIuRy':_0x141526(0xb5),'tsNGm':function(_0x19d409,_0x38fcab){return _0x19d409 instanceof _0x38fcab;},'JXDys':'You\x20can\x20install\x20it\x20manually\x20by\x20running:','YDDnc':'\x0a⚠\x20Skipping\x20Chromium\x20installation.'};let _0xfae1f2=![];try{const _0xf936b0=chromium['executablePath']();_0xfae1f2=_0x294d51['BMBsf'](existsSync,_0xf936b0);}catch{_0xfae1f2=![];}if(_0xfae1f2)return console['log'](_0x294d51[_0x141526(0xbd)]),![];const _0x530f22=_0x294d51['XfIQs'](getPlaywrightVersion),_0x203450=_0x530f22??PLAYWRIGHT_CHROMIUM_INSTALL_FALLBACK_VERSION,_0x1e3a2d=!_0x530f22,_0x18404a=process[_0x141526(0xca)][_0x141526(0xeb)]&&process[_0x141526(0x91)]['isTTY'];let _0x1ce09b=!![];if(_0x18404a){const {install:_0x2ca713}=await _0x14a49[_0x141526(0xa1)]([{'type':'confirm','name':'install','message':_0x1e3a2d?_0x141526(0xa9)+_0x203450+_0x141526(0xa7):_0x141526(0xd3)+_0x203450+_0x141526(0xb0),'default':!![]}]);_0x1ce09b=_0x2ca713;}else console[_0x141526(0xde)]('\x0aNon-interactive\x20mode:\x20Auto-installing\x20Playwright\x20Chromium\x20'+_0x203450+(_0x1e3a2d?'\x20(fallback\x20version)':'')+'...');if(_0x1ce09b){console['log'](_0x294d51['avNdZ']);try{await installChromiumBinary(_0x203450,_0xfb96a8),console[_0x141526(0xde)](_0x294d51[_0x141526(0x97)]);}catch(_0x408911){console['error'](_0x294d51['IIuRy'],_0x294d51['tsNGm'](_0x408911,Error)?_0x408911['message']:_0x408911),console['log'](_0x294d51[_0x141526(0x99)]),console[_0x141526(0xde)]('\x20\x20npx\x20playwright@'+_0x203450+_0x141526(0xa4));}}else console['log'](_0x294d51['YDDnc']),console[_0x141526(0xde)](_0x141526(0xab)),console['log']('\x20\x20npx\x20playwright@'+_0x203450+_0x141526(0xa4));return!![];}export async function writeRangerGitignore(_0x5040c5){const _0x25963c={'vWfEq':'.gitignore','nWBlX':'✓\x20Created\x20.ranger/.gitignore'},_0x4166ea=join(_0x5040c5,_0x25963c['vWfEq']),_0x3393f5='\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(_0x4166ea,_0x3393f5),console['log'](_0x25963c['nWBlX']);}function printProfileSetupLaterInstructions(){const _0x16be80=_0x34bd,_0x578865={'Tcogw':_0x16be80(0xdc),'FrzLC':_0x16be80(0xd4)};console['log'](_0x16be80(0xd7)),console[_0x16be80(0xde)]('\x20\x20'+bold(_0x578865['Tcogw'])),console[_0x16be80(0xde)](_0x578865['FrzLC']);}export async function ensureLocalEnv(_0xb969fa,_0x2322ef){const _0x42cb89=_0x34bd,_0x1b21ae={'smnZA':function(_0x82cc94){return _0x82cc94();},'xbKsb':function(_0x16ced6,_0x583d7,_0x2921e9){return _0x16ced6(_0x583d7,_0x2921e9);},'iwFUB':_0x42cb89(0x98),'yZRTe':'to\x20access\x20your\x20app.\x20If\x20the\x20part\x20of\x20your\x20app\x20you\x20want\x20to\x20test\x20is\x20behind','OrNcc':'auth,\x20you\x20can\x20log\x20in\x20and\x20we\x27ll\x20save\x20the\x20session\x20state\x20for\x20Ranger\x20to','kCXst':'use\x20until\x20the\x20session\x20expires.\x0a','hsPjt':_0x42cb89(0x8e),'wHHfA':_0x42cb89(0xc9),'uGdhf':'Would\x20you\x20like\x20to\x20set\x20up\x20the\x20profile\x20now?','xbdli':function(_0x5969f1){return _0x5969f1();}};if(!_0x1b21ae['smnZA'](findGitRoot))return console['log']('⚠\x20No\x20git\x20repository\x20found.\x20Run\x20`ranger\x20profile\x20add\x20local`\x20from\x20your\x20project\x20directory.'),{'ready':![],'skipped':!![]};const _0x245acc=_0xb969fa?.['scope']===_0x42cb89(0x9d)?_0x1b21ae['smnZA'](getRangerHomeDir):undefined;if(_0x1b21ae['xbKsb'](findExistingEnv,_0x42cb89(0x98),{'locations':[_0x1b21ae['iwFUB']],'rangerDir':_0x245acc}))return console['log'](_0x42cb89(0xd9)),{'ready':!![],'skipped':![]};const _0x339aa8=process[_0x42cb89(0xca)][_0x42cb89(0xeb)]&&process['stdout']['isTTY'];if(_0x339aa8&&!_0xb969fa?.['url']){console[_0x42cb89(0xde)]('\x0aA\x20profile\x20gives\x20Ranger\x27s\x20browser\x20agent\x20information\x20about\x20how'),console[_0x42cb89(0xde)](_0x1b21ae['yZRTe']),console['log'](_0x1b21ae['OrNcc']),console[_0x42cb89(0xde)](_0x1b21ae['kCXst']),console[_0x42cb89(0xde)](_0x42cb89(0xa6));const {wantsProfile:_0x34d828}=await _0x14a49[_0x42cb89(0xa1)]([{'type':_0x1b21ae['hsPjt'],'name':_0x1b21ae['wHHfA'],'message':_0x1b21ae[_0x42cb89(0x8d)],'default':!![]}]);if(!_0x34d828)return _0x1b21ae[_0x42cb89(0xb3)](printProfileSetupLaterInstructions),{'ready':![],'skipped':!![]};}try{return await addEnv(_0x42cb89(0x98),{'url':_0xb969fa?.[_0x42cb89(0xc0)],'force':_0xb969fa?.[_0x42cb89(0x88)],'allowInsecureLocalhost':_0xb969fa?.['allowInsecureLocalhost'],'scope':_0xb969fa?.['scope']},_0x2322ef),{'ready':!![],'skipped':![]};}catch(_0x55cd77){return console[_0x42cb89(0xb4)]('\x0a❌\x20Profile\x20setup\x20failed:',_0x55cd77 instanceof Error?_0x55cd77[_0x42cb89(0xad)]:_0x55cd77),printProfileSetupLaterInstructions(),{'ready':![],'skipped':![]};}}export async function start(_0x30c640,_0x4d267e,_0x50fdb0){const _0x16bb11=_0x34bd,_0x15f6ac={'zlaUY':_0x16bb11(0x89),'FiVvv':'user','pLpHA':function(_0x5f22b2,_0x3b897c){return _0x5f22b2===_0x3b897c;},'voDvt':'git_check','AUhdt':_0x16bb11(0xc8),'rzRxt':function(_0x4529b3,_0x2b4c84){return _0x4529b3+_0x2b4c84;},'pQAMB':_0x16bb11(0xe1),'PLBOV':function(_0x416cbb,_0x171e50){return _0x416cbb(_0x171e50);},'SAuXB':function(_0x554a8d,_0x23b179){return _0x554a8d(_0x23b179);},'BiLcw':_0x16bb11(0x9f),'iAmxY':_0x16bb11(0x8c),'CvjmK':_0x16bb11(0xc3),'uxQKJ':_0x16bb11(0xd2),'XuYRV':'skills','Kidwe':'\x20\x20Failed\x20to\x20install\x20OpenCode\x20skill:','SGObZ':'Non-interactive\x20mode:\x20Skipping\x20profile\x20setup.\x20To\x20set\x20up\x20a\x20profile,\x20pass\x20--url\x20or\x20run\x20later:','luwYr':function(_0x26d471,_0x4c5883){return _0x26d471(_0x4c5883);},'qrJEk':'profile','aqApF':'\x0aIn\x20OpenCode,\x20enable\x20Ranger\x20hooks\x20(run\x20the\x20`ranger_enable`\x20tool)','FwcAE':'and\x20prompt\x20the\x20agent\x20like\x20usual.\x20Ranger\x20will\x20create\x20a\x20feature\x20review','PWyUi':'with\x20scenarios\x20describing\x20what\x20to\x20verify\x20and\x20then\x20run\x20browser','nbesD':function(_0x5e4d0c,_0x755917){return _0x5e4d0c(_0x755917);},'gJZQV':'/ranger:enable','aulTv':function(_0x5a1237,_0x58789f){return _0x5a1237+_0x58789f;}};console[_0x16bb11(0xde)](_0x15f6ac['zlaUY']);const _0x410b12=process['stdin'][_0x16bb11(0xeb)]&&process[_0x16bb11(0x91)]['isTTY'];!_0x410b12&&!_0x4d267e?.['scope']&&(console['log']('Non-interactive\x20mode:\x20No\x20--scope\x20provided,\x20defaulting\x20to\x20user.'),_0x4d267e={..._0x4d267e,'scope':_0x15f6ac[_0x16bb11(0xe5)]});const _0x47692d=_0x15f6ac['pLpHA'](_0x4d267e?.['scope'],_0x15f6ac[_0x16bb11(0xe5)]);_0x50fdb0?.['trackPhaseStart'](_0x15f6ac[_0x16bb11(0xb1)]);const _0x1ce205=findGitRoot();if(!_0x1ce205&&!_0x47692d){await _0x50fdb0?.[_0x16bb11(0xed)]('git_check',new Error(_0x15f6ac[_0x16bb11(0xbf)]));throw new Error(_0x15f6ac[_0x16bb11(0x86)](_0x16bb11(0xd1),_0x15f6ac['pQAMB']));}_0x50fdb0?.['trackPhaseEnd'](_0x16bb11(0xb7));const _0x3aba9e=!existsSync(getRangerDir()),{path:_0x258783}=await _0x15f6ac['PLBOV'](ensureRangerDir,_0x47692d?_0x15f6ac['FiVvv']:undefined);if(_0x4d267e?.[_0x16bb11(0xcc)])console['log'](_0x16bb11(0x8b)),_0x50fdb0?.['trackPhaseEnd'](_0x16bb11(0x9f),{'isFirstRun':_0x3aba9e,'method':_0x16bb11(0x9c)});else{_0x50fdb0?.['trackPhaseStart'](_0x16bb11(0x9f));const _0x39dce8=await _0x15f6ac[_0x16bb11(0xac)](authenticate,_0x30c640);_0x50fdb0?.['trackPhaseEnd'](_0x15f6ac[_0x16bb11(0xc6)],{'isFirstRun':_0x3aba9e,'method':_0x39dce8['method']});}_0x50fdb0?.[_0x16bb11(0xe7)](_0x15f6ac['iAmxY']);_0x4d267e?.[_0x16bb11(0xc1)]?console[_0x16bb11(0xde)]('✓\x20Skipping\x20Chromium\x20check\x20(--skip-chromium)'):await ensureChromium(_0x4d267e?.[_0x16bb11(0xee)]);_0x50fdb0?.['trackPhaseEnd']('chromium',{'isFirstRun':_0x3aba9e,'skipped':!!_0x4d267e?.[_0x16bb11(0xc1)]});!_0x47692d&&await _0x15f6ac['SAuXB'](writeRangerGitignore,_0x258783);console[_0x16bb11(0xde)]('\x0a✅\x20Ranger\x20setup\x20complete!\x0a');const _0x255637=_0x4d267e?.[_0x16bb11(0x87)],_0x21fbbc=_0x4d267e?.[_0x16bb11(0xdb)]??![];let _0x326a36=null;_0x21fbbc?(_0x50fdb0?.[_0x16bb11(0xe7)](_0x15f6ac['CvjmK']),_0x326a36=await _0x15f6ac['PLBOV'](ensureOpencodePluginConfig,_0x255637),_0x50fdb0?.['trackPhaseEnd']('plugin',{'isFirstRun':_0x3aba9e,'opencode':!![]})):(_0x50fdb0?.['trackPhaseStart'](_0x15f6ac[_0x16bb11(0xe8)]),await ensureClaudePlugin(_0x255637),_0x50fdb0?.[_0x16bb11(0xe9)](_0x15f6ac['CvjmK'],{'isFirstRun':_0x3aba9e}));if(_0x21fbbc&&_0x326a36){_0x50fdb0?.['trackPhaseStart']('skills');try{await installSkill(_0x15f6ac['uxQKJ'],{'level':_0x326a36[_0x16bb11(0x87)],'cliVersion':getCurrentVersion(),'platform':'opencode'}),_0x50fdb0?.[_0x16bb11(0xe9)](_0x15f6ac[_0x16bb11(0xce)],{'isFirstRun':_0x3aba9e,'opencode':!![]});}catch(_0x8e25f3){console['warn'](_0x15f6ac[_0x16bb11(0x85)],_0x8e25f3 instanceof Error?_0x8e25f3[_0x16bb11(0xad)]:_0x8e25f3),_0x50fdb0?.[_0x16bb11(0xe9)](_0x15f6ac[_0x16bb11(0xce)],{'isFirstRun':_0x3aba9e,'opencode':!![],'failed':!![]});}}else _0x50fdb0?.[_0x16bb11(0xe7)]('skills'),await _0x15f6ac['SAuXB'](ensureClaudeSkills,_0x255637),_0x50fdb0?.['trackPhaseEnd'](_0x16bb11(0xaa),{'isFirstRun':_0x3aba9e});if(_0x4d267e?.['skipAuth'])console[_0x16bb11(0xde)](_0x16bb11(0xe6));else{if(!_0x410b12&&!_0x4d267e?.[_0x16bb11(0xc0)])console[_0x16bb11(0xde)](_0x15f6ac['SGObZ']),console['log']('\x20\x20'+_0x15f6ac['luwYr'](bold,_0x16bb11(0xdc))+'\x0a');else{_0x50fdb0?.['trackPhaseStart'](_0x15f6ac[_0x16bb11(0xda)]);const _0x15927b=await ensureLocalEnv({'url':_0x4d267e?.['url'],'force':_0x4d267e?.[_0x16bb11(0x88)],'allowInsecureLocalhost':_0x4d267e?.['allowInsecureLocalhost'],'scope':_0x4d267e?.['scope']==='user'?_0x15f6ac[_0x16bb11(0xe5)]:undefined},_0x50fdb0);_0x50fdb0?.['trackPhaseEnd'](_0x15f6ac['qrJEk'],{'isFirstRun':_0x3aba9e,'profileReady':_0x15927b['ready'],'userSkipped':_0x15927b[_0x16bb11(0x9c)]}),_0x15927b[_0x16bb11(0xec)]&&console['log']('\x0a✅\x20You\x27re\x20ready\x20to\x20start\x20using\x20Ranger\x20Feature\x20Review.');}}if(_0x21fbbc)console[_0x16bb11(0xde)](_0x15f6ac[_0x16bb11(0x8f)]),console[_0x16bb11(0xde)](_0x15f6ac['FwcAE']),console[_0x16bb11(0xde)](_0x15f6ac['PWyUi']),console[_0x16bb11(0xde)]('verification\x20to\x20check\x20its\x20work\x20as\x20it\x20builds.');else{const _0x207266=_0x15f6ac[_0x16bb11(0xd5)](bold,_0x15f6ac[_0x16bb11(0xae)]);console[_0x16bb11(0xde)](_0x15f6ac['aulTv'](_0x15f6ac[_0x16bb11(0x86)](_0x16bb11(0xb2)+_0x207266+'\x20and\x20prompt\x20the\x20coding','\x0aagent\x20like\x20usual.\x20Claude\x20will\x20create\x20a\x20feature\x20review\x20with')+_0x16bb11(0xe4),'\x0averification\x20to\x20check\x20its\x20work\x20as\x20it\x20builds.'));}}
1
+ const _0x4c87d1=_0xc11a;(function(_0xc38d6,_0x53665b){const _0x34f9ca=_0xc11a,_0x3c6d58=_0xc38d6();while(!![]){try{const _0x4dc06a=-parseInt(_0x34f9ca(0x194))/0x1*(parseInt(_0x34f9ca(0x185))/0x2)+-parseInt(_0x34f9ca(0x1b6))/0x3+-parseInt(_0x34f9ca(0x1d0))/0x4*(parseInt(_0x34f9ca(0x1b7))/0x5)+-parseInt(_0x34f9ca(0x181))/0x6+parseInt(_0x34f9ca(0x19c))/0x7*(parseInt(_0x34f9ca(0x1ef))/0x8)+parseInt(_0x34f9ca(0x199))/0x9+parseInt(_0x34f9ca(0x1f0))/0xa;if(_0x4dc06a===_0x53665b)break;else _0x3c6d58['push'](_0x3c6d58['shift']());}catch(_0x42e7f4){_0x3c6d58['push'](_0x3c6d58['shift']());}}}(_0x226a,0x4de0a));import{mkdir,writeFile}from'fs/promises';import{join}from'path';function _0x226a(){const _0x5d14e1=['resolve','Validating\x20API\x20token...','force','\x0aInstalling\x20Chromium\x20browser...\x0a','pQOpw','\x1b[0m','scope','git_check','Authentication\x20failed:\x20','evHlP','You\x20can\x20install\x20it\x20manually\x20by\x20running:','dHoQl','KmObV','profile','KnclH','Non-interactive\x20mode:\x20Skipping\x20profile\x20setup.\x20To\x20set\x20up\x20a\x20profile,\x20pass\x20--url\x20or\x20run\x20later:','1336hPVGTS','13081180NUlGkG','wspRe','warn','\x20now?','confirm','log','cRpVW','executablePath','dOpcP','stdout','tpSyU','.\x20Please\x20check\x20your\x20API\x20token\x20and\x20try\x20again.','trackPhaseEnd','stdin','✓\x20Local\x20profile\x20already\x20exists','KkxHe','\x0a✅\x20You\x27re\x20ready\x20to\x20start\x20using\x20Ranger\x20Feature\x20Review.','message','3529380sdVrRU','IqBaR','chromium','platform','280HaHUxe','win32','AHBpe','scdMl','prompt','BGUSU','install','--with-deps','CrRto','EuQux','\x0a❌\x20Profile\x20setup\x20failed:','eNecy','YzyUA','tJMnf','llaRQ','2117QbBiGa','YSECI','gGlUq','...','XibKL','356778oCEQnQ','iYQTU','\x0aIn\x20Claude\x20Code,\x20run\x20','15211bqSVHd','The\x20required\x20version\x20(','OpkOy','skipAuth',')\x20of\x20the\x20Playwright\x20Chromium\x20browser\x20is\x20not\x20installed.\x20Install\x20it\x20now?','withDeps','\x1b[1m','FYHBk','kWtfB','✓\x20Created\x20.ranger/\x20directory','WulAf','Non-interactive\x20mode:\x20No\x20--scope\x20provided,\x20defaulting\x20to\x20user.','1.58.2','plugin','playwright@','nYDdH','skipChromium','zVQNE','skills','version','fiXBr','gHcAH','Make\x20sure\x20your\x20app\x20is\x20running\x20before\x20you\x20start.\x0a','Nglbe','\x20and\x20prompt\x20the\x20coding','PAemA','721737SETEht','666190gtWotM','error','opencode','\x0aIn\x20order\x20for\x20Ranger\x20to\x20verify\x20your\x20work,\x20you\x27ll\x20need\x20to\x20set\x20up\x20a\x20profile\x20later\x20with:','SmGlu','shcsx','SRCfC','\x0a⚠\x20Skipping\x20Chromium\x20installation.','iQvdZ','ready','\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','ranger\x20profile\x20add\x20local','OpBZp','kzqQV','\x0a✓\x20Playwright\x20Chromium\x20installed\x20successfully','user','✓\x20Created\x20.ranger/.gitignore','kunpp','skipped','url','trackPhaseStart','⚠\x20No\x20git\x20repository\x20found.\x20Run\x20`ranger\x20profile\x20add\x20local`\x20from\x20your\x20project\x20directory.','isTTY','fZDLx','allowInsecureLocalhost','8yMTJnL','env','organizationName','GNyGo','QcIbD','auth,\x20you\x20can\x20log\x20in\x20and\x20we\x27ll\x20save\x20the\x20session\x20state\x20for\x20Ranger\x20to','success','\x0aagent\x20like\x20usual.\x20Claude\x20will\x20create\x20a\x20feature\x20review\x20with','\x20install\x20chromium','local','wantsProfile','Installation\x20failed\x20with\x20exit\x20code\x20','\x0a🚀\x20Ranger\x20Setup\x0a','✓\x20Already\x20authenticated\x20to\x20','XKLST'];_0x226a=function(){return _0x5d14e1;};return _0x226a();}import{existsSync}from'fs';import{createRequire}from'module';import{spawn}from'child_process';function _0xc11a(_0x2bbc06,_0x13f10f){_0x2bbc06=_0x2bbc06-0x17b;const _0x226a99=_0x226a();let _0xc11a25=_0x226a99[_0x2bbc06];return _0xc11a25;}import _0xe70602 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,getRangerHomeDir,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';import{installSkill}from'./utils/skills.js';const require=createRequire(import.meta.url);export const PLAYWRIGHT_CHROMIUM_INSTALL_FALLBACK_VERSION=_0x4c87d1(0x1a8);const bold=_0x28bd97=>_0x4c87d1(0x1a2)+_0x28bd97+_0x4c87d1(0x1e4);export function getPlaywrightVersion(){const _0x528d50=_0x4c87d1,_0x11ba46={'GNyGo':'playwright/package.json'};try{const _0x2bd6d9=require[_0x528d50(0x1df)](_0x11ba46[_0x528d50(0x1d3)]),_0xefdb18=require(_0x2bd6d9);return _0xefdb18[_0x528d50(0x1af)];}catch{return null;}}export function installChromiumBinary(_0x147623,_0x1c341f=![]){const _0x5800ff=_0x4c87d1,_0x52a8a0={'dHoQl':'install','gyUaW':_0x5800ff(0x18c),'kzqQV':function(_0x1fdf7b,_0x4d08b5,_0x3ac242,_0x10a5e5){return _0x1fdf7b(_0x4d08b5,_0x3ac242,_0x10a5e5);},'tpSyU':'inherit','dOpcP':'close','gxIab':'error'};return new Promise((_0xac7fe3,_0x1c5ad3)=>{const _0x437f17=_0x5800ff,_0x1d953d=[_0x437f17(0x1aa)+_0x147623,_0x52a8a0[_0x437f17(0x1ea)],..._0x1c341f?[_0x52a8a0['gyUaW']]:[],'chromium'],_0x40686d=_0x52a8a0[_0x437f17(0x1c4)](spawn,'npx',_0x1d953d,{'stdio':['ignore',_0x52a8a0['tpSyU'],_0x52a8a0[_0x437f17(0x1fa)]],'shell':process[_0x437f17(0x184)]===_0x437f17(0x186)});_0x40686d['on'](_0x52a8a0[_0x437f17(0x1f8)],_0x164e54=>{const _0x210efa=_0x437f17;_0x164e54===0x0?_0xac7fe3():_0x1c5ad3(new Error(_0x210efa(0x1db)+_0x164e54));}),_0x40686d['on'](_0x52a8a0['gxIab'],_0x414f2a=>{_0x1c5ad3(_0x414f2a);});});}export async function authenticate(_0x250886){const _0x3d39ee=_0x4c87d1,_0x47ee64={'WKLuR':function(_0x1a9a7d,_0x3c146a){return _0x1a9a7d instanceof _0x3c146a;},'KnclH':'device_auth','tJMnf':_0x3d39ee(0x1e0),'fZDLx':'✓\x20Exported\x20credentials\x20for\x20CI','XibKL':'✓\x20Stored\x20credentials\x20locally','iQvdZ':'provided_token'};if(!_0x250886){const _0x3d13c2=await getToken();if(_0x3d13c2){const _0x2124b9=await getCurrentUser(_0x3d13c2);if(_0x2124b9['success'])return console[_0x3d39ee(0x1f5)](_0x3d39ee(0x1dd)+_0x2124b9[_0x3d39ee(0x1c6)]['organizationName']),{'token':_0x3d13c2,'method':'existing_token'};}try{_0x250886=await runDeviceAuthFlow();}catch(_0x465e9f){throw new Error('Authentication\x20failed:\x20'+(_0x47ee64['WKLuR'](_0x465e9f,Error)?_0x465e9f[_0x3d39ee(0x180)]:_0x465e9f));}const _0x39259b=await getCurrentUser(_0x250886);if(!_0x39259b['success'])throw new Error('Failed\x20to\x20validate\x20provisioned\x20API\x20key:\x20'+_0x39259b['error']);return console[_0x3d39ee(0x1f5)]('✓\x20Authenticated\x20to\x20'+_0x39259b['user'][_0x3d39ee(0x1d2)]),{'token':_0x250886,'method':_0x47ee64[_0x3d39ee(0x1ed)]};}console[_0x3d39ee(0x1f5)](_0x47ee64[_0x3d39ee(0x192)]);const _0x4fb80a=await getCurrentUser(_0x250886);if(!_0x4fb80a[_0x3d39ee(0x1d6)]){if(_0x4fb80a['status'])throw new Error(_0x3d39ee(0x1e7)+_0x4fb80a[_0x3d39ee(0x1b8)]+_0x3d39ee(0x1fb));else throw new Error('Failed\x20to\x20connect\x20to\x20MCP\x20server:\x20'+_0x4fb80a[_0x3d39ee(0x1b8)]+'.\x20Please\x20check\x20your\x20network\x20connection\x20and\x20server\x20URL.');}return console['log']('✓\x20Authenticated\x20to\x20'+_0x4fb80a[_0x3d39ee(0x1c6)][_0x3d39ee(0x1d2)]),await storeToken(_0x250886),console['log'](process[_0x3d39ee(0x1d1)]['GITHUB_ENV']?_0x47ee64[_0x3d39ee(0x1ce)]:_0x47ee64[_0x3d39ee(0x198)]),{'token':_0x250886,'method':_0x47ee64[_0x3d39ee(0x1bf)]};}export async function ensureRangerDir(_0x4056ca){const _0x1381ea=_0x4c87d1,_0xf672a7={'BtgtA':'user','BGUSU':function(_0x5bc13d){return _0x5bc13d();},'evHlP':function(_0x3c3c0f){return _0x3c3c0f();},'KOdYY':'.ranger','YSECI':function(_0x2aaabd,_0xb42e05,_0x27288b){return _0x2aaabd(_0xb42e05,_0x27288b);},'wspRe':_0x1381ea(0x1a5),'gHcAH':'✓\x20.ranger/\x20directory\x20already\x20exists'};let _0x15f356;if(_0x4056ca===_0xf672a7['BtgtA'])_0x15f356=_0xf672a7[_0x1381ea(0x18a)](getRangerHomeDir);else{const _0x69b454=_0xf672a7[_0x1381ea(0x1e8)](findGitRoot);_0x15f356=_0x69b454?join(_0x69b454,_0xf672a7['KOdYY']):getRangerDir();}return!existsSync(_0x15f356)?(await _0xf672a7[_0x1381ea(0x195)](mkdir,_0x15f356,{'recursive':!![]}),console['log'](_0xf672a7[_0x1381ea(0x1f1)]),{'path':_0x15f356,'installed':!![]}):(console['log'](_0xf672a7[_0x1381ea(0x1b1)]),{'path':_0x15f356,'installed':![]});}export async function ensureChromium(_0x1de258=![]){const _0x1501b5=_0x4c87d1,_0xf3d612={'Nglbe':function(_0x5a16d2,_0x13630d){return _0x5a16d2(_0x13630d);},'nYDdH':function(_0x5e8045,_0xe7fdb6){return _0x5e8045??_0xe7fdb6;},'scdMl':'confirm','OpBZp':_0x1501b5(0x1e2),'XKLST':function(_0x3ac00c,_0x4b590c,_0x550c25){return _0x3ac00c(_0x4b590c,_0x550c25);},'SmGlu':'\x0a❌\x20Failed\x20to\x20install\x20Chromium:','uOmKR':function(_0x49ef27,_0x4d8fd5){return _0x49ef27 instanceof _0x4d8fd5;},'YzyUA':_0x1501b5(0x1e9),'yaIuP':_0x1501b5(0x1be),'WulAf':'You\x20will\x20need\x20to\x20install\x20it\x20before\x20using\x20Ranger:'};let _0x594037=![];try{const _0x519282=chromium[_0x1501b5(0x1f7)]();_0x594037=_0xf3d612[_0x1501b5(0x1b3)](existsSync,_0x519282);}catch{_0x594037=![];}if(_0x594037)return console['log']('✓\x20Playwright\x20Chromium\x20browser\x20found'),![];const _0xacf7c1=getPlaywrightVersion(),_0x468ad8=_0xf3d612[_0x1501b5(0x1ab)](_0xacf7c1,PLAYWRIGHT_CHROMIUM_INSTALL_FALLBACK_VERSION),_0x719354=!_0xacf7c1,_0x304197=process[_0x1501b5(0x17c)]['isTTY']&&process[_0x1501b5(0x1f9)]['isTTY'];let _0xf127a4=!![];if(_0x304197){const {install:_0x3fc377}=await _0xe70602[_0x1501b5(0x189)]([{'type':_0xf3d612[_0x1501b5(0x188)],'name':_0x1501b5(0x18b),'message':_0x719354?'Could\x20not\x20determine\x20local\x20Playwright\x20version.\x20Install\x20Playwright\x20Chromium\x20using\x20fallback\x20version\x20'+_0x468ad8+_0x1501b5(0x1f3):_0x1501b5(0x19d)+_0x468ad8+_0x1501b5(0x1a0),'default':!![]}]);_0xf127a4=_0x3fc377;}else console[_0x1501b5(0x1f5)]('\x0aNon-interactive\x20mode:\x20Auto-installing\x20Playwright\x20Chromium\x20'+_0x468ad8+(_0x719354?'\x20(fallback\x20version)':'')+_0x1501b5(0x197));if(_0xf127a4){console['log'](_0xf3d612[_0x1501b5(0x1c3)]);try{await _0xf3d612[_0x1501b5(0x1de)](installChromiumBinary,_0x468ad8,_0x1de258),console['log'](_0x1501b5(0x1c5));}catch(_0xefd230){console['error'](_0xf3d612[_0x1501b5(0x1bb)],_0xf3d612['uOmKR'](_0xefd230,Error)?_0xefd230[_0x1501b5(0x180)]:_0xefd230),console[_0x1501b5(0x1f5)](_0xf3d612[_0x1501b5(0x191)]),console['log']('\x20\x20npx\x20playwright@'+_0x468ad8+_0x1501b5(0x1d8));}}else console['log'](_0xf3d612['yaIuP']),console[_0x1501b5(0x1f5)](_0xf3d612[_0x1501b5(0x1a6)]),console[_0x1501b5(0x1f5)]('\x20\x20npx\x20playwright@'+_0x468ad8+_0x1501b5(0x1d8));return!![];}export async function writeRangerGitignore(_0x17f374){const _0x59f312=_0x4c87d1,_0x4e226a={'SRCfC':function(_0x1dc4fc,_0x36d5b6,_0x53d645){return _0x1dc4fc(_0x36d5b6,_0x53d645);}},_0x34dd46=_0x4e226a[_0x59f312(0x1bd)](join,_0x17f374,'.gitignore'),_0x438839=_0x59f312(0x1c1);await writeFile(_0x34dd46,_0x438839),console['log'](_0x59f312(0x1c7));}function printProfileSetupLaterInstructions(){const _0x22b5c4=_0x4c87d1,_0x547a98={'krMRm':_0x22b5c4(0x1ba),'bXQKo':'ranger\x20profile\x20add\x20local'};console['log'](_0x547a98['krMRm']),console[_0x22b5c4(0x1f5)]('\x20\x20'+bold(_0x547a98['bXQKo'])),console['log'](_0x22b5c4(0x1b2));}export async function ensureLocalEnv(_0x1bfdfb,_0x3faf70){const _0x21d0b=_0x4c87d1,_0x188d5e={'shcsx':function(_0x5b972a){return _0x5b972a();},'OpkOy':_0x21d0b(0x1cc),'ItPkb':function(_0x474a31,_0x3377f8){return _0x474a31===_0x3377f8;},'zcYNI':function(_0x4e3a12,_0x3a6b62,_0x437554){return _0x4e3a12(_0x3a6b62,_0x437554);},'CrRto':_0x21d0b(0x1d9),'hRaPD':'\x0aA\x20profile\x20gives\x20Ranger\x27s\x20browser\x20agent\x20information\x20about\x20how','QcRuR':'to\x20access\x20your\x20app.\x20If\x20the\x20part\x20of\x20your\x20app\x20you\x20want\x20to\x20test\x20is\x20behind','eNecy':'use\x20until\x20the\x20session\x20expires.\x0a','zVQNE':'Would\x20you\x20like\x20to\x20set\x20up\x20the\x20profile\x20now?','pQOpw':_0x21d0b(0x18f)};if(!_0x188d5e[_0x21d0b(0x1bc)](findGitRoot))return console['log'](_0x188d5e[_0x21d0b(0x19e)]),{'ready':![],'skipped':!![]};const _0x2994f6=_0x188d5e['ItPkb'](_0x1bfdfb?.['scope'],_0x21d0b(0x1c6))?_0x188d5e[_0x21d0b(0x1bc)](getRangerHomeDir):undefined;if(_0x188d5e['zcYNI'](findExistingEnv,_0x21d0b(0x1d9),{'locations':[_0x188d5e[_0x21d0b(0x18d)]],'rangerDir':_0x2994f6}))return console['log'](_0x21d0b(0x17d)),{'ready':!![],'skipped':![]};const _0x956d79=process['stdin'][_0x21d0b(0x1cd)]&&process['stdout'][_0x21d0b(0x1cd)];if(_0x956d79&&!_0x1bfdfb?.['url']){console[_0x21d0b(0x1f5)](_0x188d5e['hRaPD']),console[_0x21d0b(0x1f5)](_0x188d5e['QcRuR']),console[_0x21d0b(0x1f5)](_0x21d0b(0x1d5)),console[_0x21d0b(0x1f5)](_0x188d5e[_0x21d0b(0x190)]),console[_0x21d0b(0x1f5)]('You\x27ll\x20need\x20the\x20app\x20to\x20be\x20running\x20to\x20set\x20up\x20the\x20profile.');const {wantsProfile:_0x4c59aa}=await _0xe70602[_0x21d0b(0x189)]([{'type':_0x21d0b(0x1f4),'name':_0x21d0b(0x1da),'message':_0x188d5e[_0x21d0b(0x1ad)],'default':!![]}]);if(!_0x4c59aa)return printProfileSetupLaterInstructions(),{'ready':![],'skipped':!![]};}try{return await addEnv(_0x188d5e[_0x21d0b(0x18d)],{'url':_0x1bfdfb?.[_0x21d0b(0x1ca)],'force':_0x1bfdfb?.[_0x21d0b(0x1e1)],'allowInsecureLocalhost':_0x1bfdfb?.[_0x21d0b(0x1cf)],'scope':_0x1bfdfb?.[_0x21d0b(0x1e5)]},_0x3faf70),{'ready':!![],'skipped':![]};}catch(_0x21abdf){return console[_0x21d0b(0x1b8)](_0x188d5e[_0x21d0b(0x1e3)],_0x21abdf instanceof Error?_0x21abdf['message']:_0x21abdf),_0x188d5e[_0x21d0b(0x1bc)](printProfileSetupLaterInstructions),{'ready':![],'skipped':![]};}}export async function start(_0x41b724,_0x64b222,_0x2806b5){const _0x2b30f5=_0x4c87d1,_0x3cc94e={'gGlUq':function(_0x1ea920,_0x15e196){return _0x1ea920===_0x15e196;},'PAemA':'user','IqBaR':_0x2b30f5(0x1e6),'fiXBr':'No\x20git\x20repository\x20found.\x20Please\x20run\x20`ranger\x20setup`\x20from\x20inside\x20your\x20project\x20directory,\x0a','SKdVW':'or\x20use\x20--scope\x20user\x20to\x20install\x20at\x20the\x20user\x20level\x20without\x20a\x20project.','JQZPE':function(_0x3a9fca){return _0x3a9fca();},'KkxHe':'auth','llaRQ':function(_0x48038f,_0x45bf29){return _0x48038f(_0x45bf29);},'zHtjw':'\x0a✅\x20Ranger\x20setup\x20complete!\x0a','FYHBk':'plugin','EuQux':function(_0x43c193,_0x34b793){return _0x43c193(_0x34b793);},'QcIbD':function(_0x11d36b,_0x52fa57){return _0x11d36b&&_0x52fa57;},'cRpVW':'ranger','rysvD':'\x20\x20Failed\x20to\x20install\x20OpenCode\x20skill:','XkDlb':'\x0aSkipping\x20profile\x20setup\x20(--skip-auth).\x20Run\x20`ranger\x20setup`\x20with\x20auth\x20to\x20add\x20a\x20profile\x20later.\x0a','kunpp':_0x2b30f5(0x1ec),'kWtfB':'with\x20scenarios\x20describing\x20what\x20to\x20verify\x20and\x20then\x20run\x20browser','KmObV':'verification\x20to\x20check\x20its\x20work\x20as\x20it\x20builds.','AHBpe':function(_0xcbb3db,_0x2b2dc2){return _0xcbb3db(_0x2b2dc2);},'iYQTU':'/ranger:enable'};console['log'](_0x2b30f5(0x1dc));const _0x274282=process['stdin']['isTTY']&&process[_0x2b30f5(0x1f9)][_0x2b30f5(0x1cd)];!_0x274282&&!_0x64b222?.['scope']&&(console['log'](_0x2b30f5(0x1a7)),_0x64b222={..._0x64b222,'scope':'user'});const _0x53125f=_0x3cc94e[_0x2b30f5(0x196)](_0x64b222?.[_0x2b30f5(0x1e5)],_0x3cc94e[_0x2b30f5(0x1b5)]);_0x2806b5?.[_0x2b30f5(0x1cb)](_0x3cc94e[_0x2b30f5(0x182)]);const _0x30c6c8=findGitRoot();if(!_0x30c6c8&&!_0x53125f){await _0x2806b5?.['trackPhaseError']('git_check',new Error('No\x20git\x20repository\x20found'));throw new Error(_0x3cc94e[_0x2b30f5(0x1b0)]+_0x3cc94e['SKdVW']);}_0x2806b5?.['trackPhaseEnd'](_0x3cc94e['IqBaR']);const _0x5433a0=!existsSync(_0x3cc94e['JQZPE'](getRangerDir)),{path:_0x29f74b}=await ensureRangerDir(_0x53125f?_0x2b30f5(0x1c6):undefined);if(_0x64b222?.[_0x2b30f5(0x19f)])console[_0x2b30f5(0x1f5)]('✓\x20Skipping\x20authentication\x20(--skip-auth)'),_0x2806b5?.['trackPhaseEnd'](_0x3cc94e['KkxHe'],{'isFirstRun':_0x5433a0,'method':'skipped'});else{_0x2806b5?.['trackPhaseStart'](_0x3cc94e['KkxHe']);const _0x4941db=await _0x3cc94e[_0x2b30f5(0x193)](authenticate,_0x41b724);_0x2806b5?.[_0x2b30f5(0x17b)](_0x3cc94e[_0x2b30f5(0x17e)],{'isFirstRun':_0x5433a0,'method':_0x4941db['method']});}_0x2806b5?.['trackPhaseStart'](_0x2b30f5(0x183));_0x64b222?.['skipChromium']?console['log']('✓\x20Skipping\x20Chromium\x20check\x20(--skip-chromium)'):await _0x3cc94e['llaRQ'](ensureChromium,_0x64b222?.[_0x2b30f5(0x1a1)]);_0x2806b5?.[_0x2b30f5(0x17b)](_0x2b30f5(0x183),{'isFirstRun':_0x5433a0,'skipped':!!_0x64b222?.[_0x2b30f5(0x1ac)]});!_0x53125f&&await writeRangerGitignore(_0x29f74b);console[_0x2b30f5(0x1f5)](_0x3cc94e['zHtjw']);const _0x2388ba=_0x64b222?.[_0x2b30f5(0x1e5)],_0x5e6109=_0x64b222?.[_0x2b30f5(0x1b9)]??![];let _0x7eccbb=null;_0x5e6109?(_0x2806b5?.['trackPhaseStart'](_0x3cc94e[_0x2b30f5(0x1a3)]),_0x7eccbb=await _0x3cc94e[_0x2b30f5(0x18e)](ensureOpencodePluginConfig,_0x2388ba),_0x2806b5?.[_0x2b30f5(0x17b)]('plugin',{'isFirstRun':_0x5433a0,'opencode':!![]})):(_0x2806b5?.['trackPhaseStart'](_0x3cc94e['FYHBk']),await ensureClaudePlugin(_0x2388ba),_0x2806b5?.[_0x2b30f5(0x17b)](_0x2b30f5(0x1a9),{'isFirstRun':_0x5433a0}));if(_0x3cc94e[_0x2b30f5(0x1d4)](_0x5e6109,_0x7eccbb)){_0x2806b5?.[_0x2b30f5(0x1cb)](_0x2b30f5(0x1ae));try{await installSkill(_0x3cc94e[_0x2b30f5(0x1f6)],{'level':_0x7eccbb['scope'],'cliVersion':_0x3cc94e['JQZPE'](getCurrentVersion),'platform':'opencode'}),_0x2806b5?.[_0x2b30f5(0x17b)]('skills',{'isFirstRun':_0x5433a0,'opencode':!![]});}catch(_0x52ba6c){console[_0x2b30f5(0x1f2)](_0x3cc94e['rysvD'],_0x52ba6c instanceof Error?_0x52ba6c['message']:_0x52ba6c),_0x2806b5?.['trackPhaseEnd']('skills',{'isFirstRun':_0x5433a0,'opencode':!![],'failed':!![]});}}else _0x2806b5?.['trackPhaseStart'](_0x2b30f5(0x1ae)),await ensureClaudeSkills(_0x2388ba),_0x2806b5?.['trackPhaseEnd']('skills',{'isFirstRun':_0x5433a0});if(_0x64b222?.['skipAuth'])console['log'](_0x3cc94e['XkDlb']);else{if(!_0x274282&&!_0x64b222?.['url'])console['log'](_0x2b30f5(0x1ee)),console['log']('\x20\x20'+bold(_0x2b30f5(0x1c2))+'\x0a');else{_0x2806b5?.['trackPhaseStart']('profile');const _0x429803=await ensureLocalEnv({'url':_0x64b222?.[_0x2b30f5(0x1ca)],'force':_0x64b222?.['force'],'allowInsecureLocalhost':_0x64b222?.[_0x2b30f5(0x1cf)],'scope':_0x3cc94e['gGlUq'](_0x64b222?.['scope'],_0x3cc94e[_0x2b30f5(0x1b5)])?'user':undefined},_0x2806b5);_0x2806b5?.[_0x2b30f5(0x17b)](_0x3cc94e[_0x2b30f5(0x1c8)],{'isFirstRun':_0x5433a0,'profileReady':_0x429803[_0x2b30f5(0x1c0)],'userSkipped':_0x429803[_0x2b30f5(0x1c9)]}),_0x429803['ready']&&console[_0x2b30f5(0x1f5)](_0x2b30f5(0x17f));}}if(_0x5e6109)console[_0x2b30f5(0x1f5)]('\x0aIn\x20OpenCode,\x20enable\x20Ranger\x20hooks\x20(run\x20the\x20`ranger_enable`\x20tool)'),console[_0x2b30f5(0x1f5)]('and\x20prompt\x20the\x20agent\x20like\x20usual.\x20Ranger\x20will\x20create\x20a\x20feature\x20review'),console['log'](_0x3cc94e[_0x2b30f5(0x1a4)]),console[_0x2b30f5(0x1f5)](_0x3cc94e[_0x2b30f5(0x1eb)]);else{const _0x5a0e8c=_0x3cc94e[_0x2b30f5(0x187)](bold,_0x3cc94e[_0x2b30f5(0x19a)]);console['log'](_0x2b30f5(0x19b)+_0x5a0e8c+_0x2b30f5(0x1b4)+_0x2b30f5(0x1d7)+'\x0ascenarios\x20describing\x20what\x20to\x20verify\x20and\x20then\x20run\x20browser'+'\x0averification\x20to\x20check\x20its\x20work\x20as\x20it\x20builds.');}}
@@ -1 +1 @@
1
- (function(_0x537051,_0x4878f7){const _0x5790ee=_0x37c5,_0x28b3f5=_0x537051();while(!![]){try{const _0x2921b4=parseInt(_0x5790ee(0x1f7))/0x1*(parseInt(_0x5790ee(0x20d))/0x2)+parseInt(_0x5790ee(0x20a))/0x3*(parseInt(_0x5790ee(0x201))/0x4)+parseInt(_0x5790ee(0x1f4))/0x5+parseInt(_0x5790ee(0x229))/0x6*(-parseInt(_0x5790ee(0x22e))/0x7)+parseInt(_0x5790ee(0x221))/0x8+parseInt(_0x5790ee(0x206))/0x9+-parseInt(_0x5790ee(0x224))/0xa;if(_0x2921b4===_0x4878f7)break;else _0x28b3f5['push'](_0x28b3f5['shift']());}catch(_0x50b440){_0x28b3f5['push'](_0x28b3f5['shift']());}}}(_0x3a50,0xac8e1));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';function _0x3a50(){const _0x1bdbdc=['version','stderr','FlHAu','zbwfa','plugin','\x0aRanger\x20has\x20not\x20been\x20initialized\x20in\x20this\x20directory.','settingsPath','\x20(up\x20to\x20date)','plaintext','\x20\x20Not\x20configured','\x20\x20Run:\x20ranger\x20setup\x20[token]\x0a','\x20plugin(s)\x20configured','user','gWKBH','@ranger-testing/opencode-plugin','match','disabled','myegE','data','hasEncryptedAuth','close','\x0a---\x20Profiles\x20---','\x20\x20OpenCode\x20not\x20installed\x20or\x20not\x20available','lwEdD','pCsns','Version:\x20','not_installed','999795ciIgzJ','encrypted','\x20\x20Run:\x20ranger\x20profile\x20add\x20<profile-name>','97aoLKYT','auth.json.enc','\x20\x20Run:\x20ranger\x20profile\x20use\x20<profile-name>\x20\x20(available:\x20','string','configured','API\x20Token:\x20✗\x20Not\x20found','\x20\x20Run:\x20ranger\x20update','wytNO','isDirectory','details','2198080olFsnf','\x20(active)','name','oENQq','map','11730852RwHXLp','join','oqELa','RTIiU','3sBHldg','tmUbv','Organization:\x20','10882pppVtv','\x20\x20Run:\x20ranger\x20setup\x20[token]\x20\x20(includes\x20plugin\x20installation)','status','utf-8','\x0a\x20\x20No\x20active\x20profile\x20set','\x20\x20\x20\x20Auth:\x20','\x0a---\x20Claude\x20Code\x20Plugin\x20---','toString','\x20\x20Run:\x20ranger\x20setup\x20[token]','\x20\x20Not\x20installed','error','qQYbB','mzetZ','ranger@trailhead','filter','\x0a---\x20Skills\x20---','path','length','\x20\x20Run:\x20ranger\x20skillup','dAGsz','9402896KlhORc','ezBHa','\x0a---\x20OpenCode\x20Plugin\x20---','17974150aPrGYV','project','BbXkd','emEoD','Root:\x20','2503692irGwNH','push','includes','FiOJv','hasPlaintextAuth','21nTmijG','trim','ignore','some','log','cwd','SKILL.md','enabled','parse'];_0x3a50=function(){return _0x1bdbdc;};return _0x3a50();}import{getPluginInfo}from'./utils/claudePlugin.js';import{RANGER_MANAGED_SKILLS}from'./utils/skills.js';import{spawn}from'child_process';const bold=_0x452fcb=>'\x1b[1m'+_0x452fcb+'\x1b[0m',link=(_0x4ff34c,_0x346289)=>'\x1b]8;;file://'+_0x4ff34c+'\x07'+(_0x346289||_0x4ff34c)+'\x1b]8;;\x07';async function getOpencodePluginStatus(){const _0x1eec7e=_0x37c5,_0x3f013e={'zdFMs':_0x1eec7e(0x1f3),'KEakM':'configured','oQJKb':function(_0x4f1e5d,_0x3d9857){return _0x4f1e5d>_0x3d9857;},'zbwfa':function(_0x1ff95d,_0x5c3870){return _0x1ff95d(_0x5c3870);},'qQYbB':'not_configured','BbXkd':function(_0x1cf536,_0x38f378,_0x16b90f,_0x160821){return _0x1cf536(_0x38f378,_0x16b90f,_0x160821);},'bdGdQ':'opencode','tmUbv':'config','clWAp':'pipe','hRdzK':_0x1eec7e(0x217)};return new Promise(_0x57343a=>{const _0x167c92=_0x1eec7e,_0x4c5325={'BLZvd':function(_0x5e9332,_0x281952){return _0x5e9332(_0x281952);},'FiOJv':_0x3f013e['zdFMs']},_0x1b4959=_0x3f013e[_0x167c92(0x226)](spawn,_0x3f013e['bdGdQ'],['debug',_0x3f013e[_0x167c92(0x20b)]],{'stdio':[_0x167c92(0x230),_0x3f013e['clWAp'],'pipe']});let _0x5c1169='';_0x1b4959['stdout']?.['on'](_0x167c92(0x1eb),_0x5589ea=>{const _0x328280=_0x167c92;_0x5c1169+=_0x5589ea[_0x328280(0x214)]();}),_0x1b4959[_0x167c92(0x1da)]?.['on']('data',_0x41abae=>{const _0x839a8e=_0x167c92;_0x5c1169+=_0x41abae[_0x839a8e(0x214)]();}),_0x1b4959['on'](_0x3f013e['hRdzK'],()=>{const _0x5e1cb0=_0x167c92;_0x4c5325['BLZvd'](_0x57343a,{'status':_0x4c5325[_0x5e1cb0(0x22c)]});}),_0x1b4959['on'](_0x167c92(0x1ed),_0x20e0b1=>{const _0x32bb05=_0x167c92,_0x57cb9e={'FlHAu':'opencode-plugin'};if(_0x20e0b1!==0x0){_0x57343a({'status':_0x3f013e['zdFMs']});return;}const _0x414339=_0x5c1169[_0x32bb05(0x22f)]();let _0x4e8e47=null;if(_0x414339)try{_0x4e8e47=JSON[_0x32bb05(0x1d8)](_0x414339);}catch{const _0x58d596=_0x414339['match'](/\{[\s\S]*\}$/);if(_0x58d596)try{_0x4e8e47=JSON[_0x32bb05(0x1d8)](_0x58d596[0x0]);}catch{_0x4e8e47=null;}}const _0x168d16=Array['isArray'](_0x4e8e47?.[_0x32bb05(0x1dd)])?_0x4e8e47?.['plugin']:[],_0x54fbe5=_0x168d16[_0x32bb05(0x1d3)](_0x3ae68b=>{const _0x3a0c41=_0x32bb05;if(typeof _0x3ae68b!==_0x3a0c41(0x1fa))return![];return _0x3ae68b[_0x3a0c41(0x22b)]('@ranger-testing/opencode-plugin')||_0x3ae68b['includes'](_0x57cb9e[_0x3a0c41(0x1db)]);});if(_0x54fbe5){_0x57343a({'status':_0x3f013e['KEakM'],'details':_0x168d16['length']>0x0?_0x168d16[_0x32bb05(0x21e)]+_0x32bb05(0x1e4):undefined});return;}if(_0x3f013e['oQJKb'](_0x168d16[_0x32bb05(0x21e)],0x0)){_0x3f013e[_0x32bb05(0x1dc)](_0x57343a,{'status':_0x3f013e[_0x32bb05(0x218)],'details':_0x168d16['length']+_0x32bb05(0x1e4)});return;}_0x57343a({'status':_0x3f013e['qQYbB']});});});}async function getSkillsFromDir(_0x4e6ba0,_0x24132e){const _0x16b6ef=_0x37c5,_0x35101d={'FAqZX':function(_0x5b661e,_0x52773c,_0x19c319){return _0x5b661e(_0x52773c,_0x19c319);},'emEoD':_0x16b6ef(0x1d6),'GmTQp':function(_0x2580d3,_0x448b09){return _0x2580d3(_0x448b09);},'ALUIW':_0x16b6ef(0x210)};if(!existsSync(_0x4e6ba0))return[];const _0x231a92=[];try{const _0x4892a0=await _0x35101d['FAqZX'](readdir,_0x4e6ba0,{'withFileTypes':!![]});for(const _0x2edcf0 of _0x4892a0){if(_0x2edcf0[_0x16b6ef(0x1ff)]()){const _0x24d41d=join(_0x4e6ba0,_0x2edcf0[_0x16b6ef(0x203)],_0x35101d[_0x16b6ef(0x227)]);if(_0x35101d['GmTQp'](existsSync,_0x24d41d)){let _0x16ddea=_0x2edcf0['name'];try{const _0x317ced=await readFile(_0x24d41d,_0x35101d['ALUIW']),_0x4ca668=_0x317ced[_0x16b6ef(0x1e8)](/name:\s*(.+)/);_0x4ca668&&(_0x16ddea=_0x4ca668[0x1]['trim']());}catch{}_0x231a92[_0x16b6ef(0x22a)]({'name':_0x2edcf0[_0x16b6ef(0x203)],'displayName':_0x16ddea,'path':_0x24d41d,'level':_0x24132e});}}}}catch{return[];}return _0x231a92;}async function getInstalledSkills(){const _0x5d2069=_0x37c5,_0x145922={'FGxon':function(_0x3d312b,_0x1fffd5,_0xa88787){return _0x3d312b(_0x1fffd5,_0xa88787);},'ResuV':_0x5d2069(0x225),'oqELa':function(_0x5d9bee){return _0x5d9bee();}},[_0x21b357,_0x905514]=await Promise['all']([_0x145922['FGxon'](getSkillsFromDir,getProjectSkillsDir(),_0x145922['ResuV']),getSkillsFromDir(_0x145922[_0x5d2069(0x208)](getUserSkillsDir),_0x5d2069(0x1e5))]);return{'project':_0x21b357,'user':_0x905514};}async function getEnvironments(){const _0x2daaa9=_0x37c5,_0x438b5c={'dAGsz':function(_0x4be23c,_0x423f63,_0x3e5818){return _0x4be23c(_0x423f63,_0x3e5818);},'LELqk':'auth.json','nBZzz':'(not\x20found)','ezBHa':function(_0x40ac10){return _0x40ac10();},'EnwkB':function(_0x18235f){return _0x18235f();}},{envNames:_0x57f4fe,activeEnv:_0x3e0bd7}=await _0x438b5c[_0x2daaa9(0x222)](getEnvNames),_0x3b489c=_0x438b5c['EnwkB'](getRangerDir);if(!existsSync(_0x3b489c))return{'envs':[],'activeEnv':null};const _0x222ce0=_0x57f4fe['map'](_0x4703d6=>{const _0x68f36f=_0x2daaa9,_0x2b53c2=getEnvDir(_0x4703d6),_0x5e6add=join(_0x2b53c2,'settings.json'),_0x1f55f1=_0x438b5c[_0x68f36f(0x220)](join,_0x2b53c2,_0x438b5c['LELqk']),_0x89a4f5=join(_0x2b53c2,_0x68f36f(0x1f8));return{'name':_0x4703d6,'settingsPath':existsSync(_0x5e6add)?_0x5e6add:_0x438b5c['nBZzz'],'hasPlaintextAuth':existsSync(_0x1f55f1),'hasEncryptedAuth':existsSync(_0x89a4f5),'isActive':_0x4703d6===_0x3e0bd7};});return{'envs':_0x222ce0,'activeEnv':_0x3e0bd7};}function _0x37c5(_0x1a5327,_0x47f8c3){_0x1a5327=_0x1a5327-0x1d3;const _0x3a50db=_0x3a50();let _0x37c581=_0x3a50db[_0x1a5327];return _0x37c581;}export async function status(){const _0x327f24=_0x37c5,_0x41b1d5={'mzetZ':function(_0x2b3f44){return _0x2b3f44();},'wytNO':function(_0x2071a1,_0x116fc7){return _0x2071a1(_0x116fc7);},'dGOKj':function(_0x58ced4,_0x4fe732,_0x4dc6d0){return _0x58ced4(_0x4fe732,_0x4dc6d0);},'lwEdD':function(_0x433499,_0x2150a1){return _0x433499(_0x2150a1);},'pCsns':function(_0x4e5f71,_0x52ccc0){return _0x4e5f71===_0x52ccc0;},'YGOwj':_0x327f24(0x1fb),'kmnma':_0x327f24(0x1e2),'oENQq':'\x20\x20Run:\x20ranger\x20setup\x20--opencode','kdIFN':'ranger@trailhead','UAlXo':'unknown','uRNAz':_0x327f24(0x1e9),'RTIiU':function(_0x10b5c5,_0x48f533){return _0x10b5c5(_0x48f533);},'myegE':function(_0x522fa3){return _0x522fa3();},'rxGnz':function(_0x446417,_0x5aea8f){return _0x446417>_0x5aea8f;},'VudzM':'\x20\x20Project-level:','cSXIk':function(_0x49a660,_0x1eed77){return _0x49a660(_0x1eed77);},'gWKBH':function(_0x1079e9,_0x5cf078,_0xa09b5f){return _0x1079e9(_0x5cf078,_0xa09b5f);},'pydOh':_0x327f24(0x202),'OaaNw':_0x327f24(0x1e1),'raeYY':'none'};console[_0x327f24(0x1d4)]('\x0a📊\x20Ranger\x20Status\x0a');const _0x32c432=process[_0x327f24(0x1d5)](),_0x3979ef=_0x41b1d5['mzetZ'](getRangerDir);if(!existsSync(_0x3979ef)){console[_0x327f24(0x1d4)]('Root:\x20'+link(_0x32c432,bold(_0x41b1d5['wytNO'](basename,_0x32c432)))),console['log'](_0x327f24(0x1de)),console['log'](_0x327f24(0x1e3));return;}console['log'](_0x327f24(0x228)+_0x41b1d5['dGOKj'](link,_0x32c432,_0x41b1d5[_0x327f24(0x1fe)](bold,_0x41b1d5[_0x327f24(0x1f0)](basename,_0x32c432))));const _0x4c8f34=_0x41b1d5[_0x327f24(0x219)](getCurrentVersion),_0x3c6b2e=getLatestVersion();if(_0x3c6b2e[_0x327f24(0x1d9)]&&_0x3c6b2e['version']!==_0x4c8f34)console[_0x327f24(0x1d4)](_0x327f24(0x1f2)+_0x4c8f34+'\x20(latest:\x20'+_0x3c6b2e['version']+')'),console[_0x327f24(0x1d4)](_0x327f24(0x1fd));else _0x3c6b2e['version']?console['log'](_0x327f24(0x1f2)+_0x4c8f34+_0x327f24(0x1e0)):console['log']('Version:\x20'+_0x4c8f34);const _0x23d463=await getToken();if(_0x23d463){const _0x4b664f=await getCurrentUser(_0x23d463);_0x4b664f['success']?console['log'](_0x327f24(0x20c)+bold(_0x4b664f['user']['organizationName'])):(console['log']('API\x20Token:\x20✓\x20Found\x20but\x20invalid\x20or\x20expired'),console[_0x327f24(0x1d4)]('\x20\x20Run:\x20ranger\x20setup\x20[token]'));}else console['log'](_0x327f24(0x1fc)),console['log'](_0x327f24(0x215));process['env']['DEBUG']&&(console['log']('API\x20Environment:\x20'+getCurrentEnvironment()),console['log']('API\x20URL:\x20'+getApiBaseUrl()));console['log'](_0x327f24(0x223));const _0x357bfd=await getOpencodePluginStatus();if(_0x41b1d5[_0x327f24(0x1f1)](_0x357bfd[_0x327f24(0x20f)],_0x41b1d5['YGOwj']))console[_0x327f24(0x1d4)]('\x20\x20'+bold(_0x327f24(0x1e7))+':\x20configured'),_0x357bfd[_0x327f24(0x200)]&&console[_0x327f24(0x1d4)]('\x20\x20'+_0x357bfd['details']);else _0x41b1d5['pCsns'](_0x357bfd['status'],'not_configured')?(console['log'](_0x41b1d5['kmnma']),_0x357bfd[_0x327f24(0x200)]&&console[_0x327f24(0x1d4)]('\x20\x20'+_0x357bfd['details']),console['log'](_0x41b1d5[_0x327f24(0x204)])):console[_0x327f24(0x1d4)](_0x327f24(0x1ef));console[_0x327f24(0x1d4)](_0x327f24(0x213));const _0x567c79=await getPluginInfo(_0x41b1d5['kdIFN']);if(_0x567c79){const _0xa5748f=_0x567c79['scope']||_0x41b1d5['UAlXo'],_0x112d2a=_0x567c79[_0x327f24(0x1d7)]?'enabled':_0x41b1d5['uRNAz'];console['log']('\x20\x20'+_0x41b1d5[_0x327f24(0x209)](bold,_0x327f24(0x21a))+':\x20installed\x20('+_0xa5748f+',\x20'+_0x112d2a+')');}else console[_0x327f24(0x1d4)](_0x327f24(0x216)),console['log'](_0x327f24(0x20e));console['log'](_0x327f24(0x21c));const {project:_0x527f95,user:_0xb6eacb}=await _0x41b1d5[_0x327f24(0x1ea)](getInstalledSkills),_0x176392=_0x527f95['filter'](_0x130141=>RANGER_MANAGED_SKILLS[_0x327f24(0x22b)](_0x130141['name'])),_0x1b2c20=_0xb6eacb[_0x327f24(0x21b)](_0xd1959c=>RANGER_MANAGED_SKILLS[_0x327f24(0x22b)](_0xd1959c[_0x327f24(0x203)])),_0xd70cd3=_0x176392[_0x327f24(0x21e)]+_0x1b2c20['length'];if(_0xd70cd3===0x0)console['log']('No\x20skills\x20installed'),console[_0x327f24(0x1d4)](_0x327f24(0x21f));else{if(_0x41b1d5['rxGnz'](_0x176392['length'],0x0)){console[_0x327f24(0x1d4)](_0x41b1d5['VudzM']);for(const _0x2ea72b of _0x176392){console['log']('\x20\x20\x20\x20'+_0x41b1d5['cSXIk'](bold,_0x2ea72b['displayName'])+':\x20'+link(_0x2ea72b['path'],_0x41b1d5[_0x327f24(0x209)](basename,_0x2ea72b[_0x327f24(0x21d)])));}}if(_0x1b2c20['length']>0x0){console['log']('\x20\x20User-level:');for(const _0x209bdd of _0x1b2c20){console['log']('\x20\x20\x20\x20'+bold(_0x209bdd['displayName'])+':\x20'+_0x41b1d5[_0x327f24(0x1e6)](link,_0x209bdd['path'],basename(_0x209bdd['path'])));}}}console['log'](_0x327f24(0x1ee));const {envs:_0x1fdecc,activeEnv:_0x3d5bf7}=await getEnvironments();if(_0x41b1d5[_0x327f24(0x1f1)](_0x1fdecc[_0x327f24(0x21e)],0x0))console['log']('No\x20profiles\x20configured'),console['log'](_0x327f24(0x1f6));else{for(const _0x2ae0c3 of _0x1fdecc){const _0x2529e7=_0x2ae0c3['isActive']?_0x41b1d5['pydOh']:'',_0x4dce2f=_0x2ae0c3[_0x327f24(0x1ec)]?_0x327f24(0x1f5):_0x2ae0c3[_0x327f24(0x22d)]?_0x41b1d5['OaaNw']:_0x41b1d5['raeYY'];console['log']('\x20\x20'+bold(_0x2ae0c3['name'])+_0x2529e7),console[_0x327f24(0x1d4)](_0x327f24(0x212)+_0x4dce2f),_0x2ae0c3[_0x327f24(0x1df)]!=='(not\x20found)'&&console['log']('\x20\x20\x20\x20Settings:\x20'+link(_0x2ae0c3[_0x327f24(0x1df)],basename(_0x2ae0c3[_0x327f24(0x1df)])));}!_0x3d5bf7&&(console[_0x327f24(0x1d4)](_0x327f24(0x211)),console['log'](_0x327f24(0x1f9)+_0x1fdecc[_0x327f24(0x205)](_0x439628=>_0x439628[_0x327f24(0x203)])[_0x327f24(0x207)](',\x20')+')'));}console[_0x327f24(0x1d4)]('');}
1
+ const _0x4f436a=_0x10f6;(function(_0x534682,_0x1c617f){const _0x2a27a2=_0x10f6,_0x2d474a=_0x534682();while(!![]){try{const _0x16fb4c=parseInt(_0x2a27a2(0xf6))/0x1*(parseInt(_0x2a27a2(0xc0))/0x2)+-parseInt(_0x2a27a2(0x9e))/0x3*(parseInt(_0x2a27a2(0xe9))/0x4)+parseInt(_0x2a27a2(0xca))/0x5*(parseInt(_0x2a27a2(0xc3))/0x6)+-parseInt(_0x2a27a2(0xa5))/0x7+-parseInt(_0x2a27a2(0xed))/0x8+parseInt(_0x2a27a2(0xac))/0x9+-parseInt(_0x2a27a2(0xe4))/0xa;if(_0x16fb4c===_0x1c617f)break;else _0x2d474a['push'](_0x2d474a['shift']());}catch(_0x5ac758){_0x2d474a['push'](_0x2d474a['shift']());}}}(_0x4849,0x9df60));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';function _0x4849(){const _0x1de5b4=['JOpOz','\x20\x20\x20\x20Auth:\x20','@ranger-testing/opencode-plugin','Esytz','API\x20Token:\x20✓\x20Found\x20but\x20invalid\x20or\x20expired','success','\x1b[0m','6hbhNHy','UIOne','zenLy','\x20(up\x20to\x20date)','close','map','zfOeV','4829720BVedgJ','SNVvr','opencode-plugin','\x20(active)','\x20plugin(s)\x20configured','No\x20profiles\x20configured','\x0a---\x20Skills\x20---','630189ElVavX','lBICt','MtaWS','\x0a\x20\x20No\x20active\x20profile\x20set','GNhkc','data','enabled','plugin','DqiLE','debug','isActive','\x1b]8;;\x07','huUhf','oFGbU',':\x20installed\x20(','yKfkQ','wKdZI','gghnW','ranger@trailhead','join','281756ljLSVY','Version:\x20','Root:\x20','6CLltkr','isDirectory','\x0a---\x20Profiles\x20---','\x20\x20Run:\x20ranger\x20profile\x20use\x20<profile-name>\x20\x20(available:\x20','log','zLuEX','details','4634465vpqIXq','name','\x0aRanger\x20has\x20not\x20been\x20initialized\x20in\x20this\x20directory.','\x20\x20Run:\x20ranger\x20skillup','DEBUG','string','\x20\x20Run:\x20ranger\x20setup\x20[token]\x20\x20(includes\x20plugin\x20installation)','QchQB','path','cwd','zVoUL','all','sxqKh','XgNXT','\x20\x20\x20\x20','CLMDQ','aoldG','jOFjK','HaUuh','\x20\x20Run:\x20ranger\x20setup\x20[token]\x0a','toString','match','trim','error','\x20\x20Run:\x20ranger\x20setup\x20[token]','wktMY','23610vlWBFl','displayName','ZOdFI','not_configured','version','735092VSGWgK','includes','ignore','stdout','2209480mDhUIG','utf-8','\x1b[1m','wpXEp','organizationName','filter','\x20\x20Run:\x20ranger\x20update','not_installed','ERWOY','7meAeqx','status','length','unknown','settingsPath'];_0x4849=function(){return _0x1de5b4;};return _0x4849();}import{RANGER_MANAGED_SKILLS}from'./utils/skills.js';import{spawn}from'child_process';const bold=_0x2e5796=>_0x4f436a(0xef)+_0x2e5796+_0x4f436a(0x9d),link=(_0x1fc677,_0x350872)=>'\x1b]8;;file://'+_0x1fc677+'\x07'+(_0x350872||_0x1fc677)+_0x4f436a(0xb7);async function getOpencodePluginStatus(){const _0x3e12c2=_0x4f436a,_0x2ce29c={'KDyZg':function(_0x43030c,_0x3fa36a){return _0x43030c(_0x3fa36a);},'wktMY':_0x3e12c2(0xf4),'pJmuT':function(_0x1cb79a,_0x2d7612){return _0x1cb79a>_0x2d7612;},'lkuuK':'not_configured','GNhkc':function(_0x22215a,_0x212729){return _0x22215a(_0x212729);},'gghnW':function(_0x648cbe,_0x187131,_0x15eef2,_0x4ceef0){return _0x648cbe(_0x187131,_0x15eef2,_0x4ceef0);},'frtPO':'opencode','KJzSl':'config','huUhf':_0x3e12c2(0xeb),'QBPEZ':'pipe','gFyct':_0x3e12c2(0xb1),'lBICt':_0x3e12c2(0xa2)};return new Promise(_0x1d1f31=>{const _0x51b208=_0x3e12c2,_0x23afde={'wKdZI':function(_0x16b57a,_0x3ad71c){return _0x16b57a(_0x3ad71c);},'bbywT':_0x2ce29c[_0x51b208(0xe3)],'CLMDQ':_0x51b208(0xa7)},_0x587701=_0x2ce29c[_0x51b208(0xbd)](spawn,_0x2ce29c['frtPO'],[_0x51b208(0xb5),_0x2ce29c['KJzSl']],{'stdio':[_0x2ce29c[_0x51b208(0xb8)],'pipe',_0x2ce29c['QBPEZ']]});let _0x498d9b='';_0x587701[_0x51b208(0xec)]?.['on'](_0x2ce29c['gFyct'],_0x2c4662=>{_0x498d9b+=_0x2c4662['toString']();}),_0x587701['stderr']?.['on'](_0x2ce29c['gFyct'],_0x2dbc59=>{const _0x3257ae=_0x51b208;_0x498d9b+=_0x2dbc59[_0x3257ae(0xde)]();}),_0x587701['on'](_0x51b208(0xe1),()=>{const _0xf92899=_0x51b208;_0x23afde[_0xf92899(0xbc)](_0x1d1f31,{'status':_0x23afde['bbywT']});}),_0x587701['on'](_0x2ce29c[_0x51b208(0xad)],_0x3d7317=>{const _0xe95af3=_0x51b208;if(_0x3d7317!==0x0){_0x2ce29c['KDyZg'](_0x1d1f31,{'status':_0x2ce29c['wktMY']});return;}const _0x37f642=_0x498d9b['trim']();let _0x4404ea=null;if(_0x37f642)try{_0x4404ea=JSON['parse'](_0x37f642);}catch{const _0x58bda1=_0x37f642[_0xe95af3(0xdf)](/\{[\s\S]*\}$/);if(_0x58bda1)try{_0x4404ea=JSON['parse'](_0x58bda1[0x0]);}catch{_0x4404ea=null;}}const _0x26003e=Array['isArray'](_0x4404ea?.[_0xe95af3(0xb3)])?_0x4404ea?.['plugin']:[],_0x40ea59=_0x26003e['some'](_0xe8efd0=>{const _0x2c5ba2=_0xe95af3;if(typeof _0xe8efd0!==_0x2c5ba2(0xcf))return![];return _0xe8efd0[_0x2c5ba2(0xea)]('@ranger-testing/opencode-plugin')||_0xe8efd0['includes'](_0x23afde[_0x2c5ba2(0xd9)]);});if(_0x40ea59){_0x2ce29c['KDyZg'](_0x1d1f31,{'status':'configured','details':_0x2ce29c['pJmuT'](_0x26003e[_0xe95af3(0xf8)],0x0)?_0x26003e['length']+'\x20plugin(s)\x20configured':undefined});return;}if(_0x26003e[_0xe95af3(0xf8)]>0x0){_0x1d1f31({'status':_0x2ce29c['lkuuK'],'details':_0x26003e['length']+_0xe95af3(0xa9)});return;}_0x2ce29c[_0xe95af3(0xb0)](_0x1d1f31,{'status':'not_configured'});});});}async function getSkillsFromDir(_0x36047d,_0x188189){const _0x54233b=_0x4f436a,_0x2bab3c={'jOFjK':function(_0x72e67c,_0x24aa6b,_0x1e7d23,_0x173670){return _0x72e67c(_0x24aa6b,_0x1e7d23,_0x173670);},'SNVvr':'SKILL.md','FUXyg':function(_0x4cfcf3,_0x299ea7,_0x34228a){return _0x4cfcf3(_0x299ea7,_0x34228a);}};if(!existsSync(_0x36047d))return[];const _0x2f079d=[];try{const _0x5b238a=await readdir(_0x36047d,{'withFileTypes':!![]});for(const _0xf6978 of _0x5b238a){if(_0xf6978[_0x54233b(0xc4)]()){const _0x249bff=_0x2bab3c[_0x54233b(0xdb)](join,_0x36047d,_0xf6978['name'],_0x2bab3c[_0x54233b(0xa6)]);if(existsSync(_0x249bff)){let _0x332755=_0xf6978[_0x54233b(0xcb)];try{const _0x4a5eee=await _0x2bab3c['FUXyg'](readFile,_0x249bff,_0x54233b(0xee)),_0x25372c=_0x4a5eee['match'](/name:\s*(.+)/);_0x25372c&&(_0x332755=_0x25372c[0x1][_0x54233b(0xe0)]());}catch{}_0x2f079d['push']({'name':_0xf6978[_0x54233b(0xcb)],'displayName':_0x332755,'path':_0x249bff,'level':_0x188189});}}}}catch{return[];}return _0x2f079d;}async function getInstalledSkills(){const _0x21fbde=_0x4f436a,_0x96ca50={'QchQB':function(_0x536ace,_0xe5bc1f,_0x56c320){return _0x536ace(_0xe5bc1f,_0x56c320);},'Thmsm':function(_0x4984a0){return _0x4984a0();},'IkxSu':'project','ZOdFI':function(_0x59e795){return _0x59e795();},'sAAal':'user'},[_0xfac7af,_0x94d929]=await Promise[_0x21fbde(0xd5)]([_0x96ca50[_0x21fbde(0xd1)](getSkillsFromDir,_0x96ca50['Thmsm'](getProjectSkillsDir),_0x96ca50['IkxSu']),getSkillsFromDir(_0x96ca50[_0x21fbde(0xe6)](getUserSkillsDir),_0x96ca50['sAAal'])]);return{'project':_0xfac7af,'user':_0x94d929};}function _0x10f6(_0x1d97eb,_0x163c5d){_0x1d97eb=_0x1d97eb-0x97;const _0x4849bf=_0x4849();let _0x10f6f4=_0x4849bf[_0x1d97eb];return _0x10f6f4;}async function getEnvironments(){const _0x5c34e1={'EIyqo':function(_0x2e0938,_0x2bfe4e){return _0x2e0938(_0x2bfe4e);},'zenLy':'auth.json','kBGrY':function(_0x5934f3,_0x28cf87){return _0x5934f3(_0x28cf87);},'aoldG':'(not\x20found)','eSXvE':function(_0x2702f7,_0x59659f){return _0x2702f7(_0x59659f);},'hLxrk':function(_0xa8cb66){return _0xa8cb66();}},{envNames:_0x112cdf,activeEnv:_0x9580fa}=await _0x5c34e1['hLxrk'](getEnvNames),_0x21e3d7=getRangerDir();if(!_0x5c34e1['eSXvE'](existsSync,_0x21e3d7))return{'envs':[],'activeEnv':null};const _0x1d1dab=_0x112cdf['map'](_0x102478=>{const _0x149e73=_0x10f6,_0xa69836=_0x5c34e1['EIyqo'](getEnvDir,_0x102478),_0x5d0513=join(_0xa69836,'settings.json'),_0x50a36e=join(_0xa69836,_0x5c34e1[_0x149e73(0xa0)]),_0x2a285e=join(_0xa69836,'auth.json.enc');return{'name':_0x102478,'settingsPath':_0x5c34e1['kBGrY'](existsSync,_0x5d0513)?_0x5d0513:_0x5c34e1[_0x149e73(0xda)],'hasPlaintextAuth':_0x5c34e1['eSXvE'](existsSync,_0x50a36e),'hasEncryptedAuth':_0x5c34e1['kBGrY'](existsSync,_0x2a285e),'isActive':_0x102478===_0x9580fa};});return{'envs':_0x1d1dab,'activeEnv':_0x9580fa};}export async function status(){const _0x53508c=_0x4f436a,_0x110ddf={'zfOeV':function(_0x2d37e8){return _0x2d37e8();},'ERWOY':function(_0x490246,_0x5ca091){return _0x490246(_0x5ca091);},'UIOne':function(_0x36f74d,_0x5535b9,_0x186e8c){return _0x36f74d(_0x5535b9,_0x186e8c);},'oFGbU':function(_0x5558b3,_0x384239){return _0x5558b3(_0x384239);},'yzWkZ':function(_0xb3c6ca,_0x249d0c){return _0xb3c6ca(_0x249d0c);},'IbyhI':'\x0a---\x20OpenCode\x20Plugin\x20---','zfvgd':function(_0x3f3df6,_0x13d8d0){return _0x3f3df6===_0x13d8d0;},'XgNXT':'configured','Esytz':_0x53508c(0x99),'DqiLE':'\x20\x20Not\x20configured','zVoUL':'\x20\x20Run:\x20ranger\x20setup\x20--opencode','tyjca':'\x0a---\x20Claude\x20Code\x20Plugin\x20---','RrQUG':function(_0x24aefd,_0xb0fc55){return _0x24aefd(_0xb0fc55);},'ahnSX':_0x53508c(0xf9),'UNngg':function(_0x532b9c,_0x5e3b34){return _0x532b9c(_0x5e3b34);},'zTQmS':_0x53508c(0xbe),'JOpOz':_0x53508c(0xd0),'MtaWS':_0x53508c(0xab),'zLuEX':function(_0x36da31){return _0x36da31();},'WdxTc':'No\x20skills\x20installed','yKfkQ':function(_0x88c7c5,_0xc5cf60){return _0x88c7c5>_0xc5cf60;},'vllOH':function(_0x2f1d2b,_0x5bb1a6){return _0x2f1d2b>_0x5bb1a6;},'XqEru':'\x20\x20User-level:','HaUuh':function(_0x24515c){return _0x24515c();},'aHjTb':function(_0x17db55,_0x2ac41a){return _0x17db55===_0x2ac41a;},'wpXEp':_0x53508c(0xaa),'sxqKh':'none'};console['log']('\x0a📊\x20Ranger\x20Status\x0a');const _0x230948=process[_0x53508c(0xd3)](),_0x44f19b=_0x110ddf['zfOeV'](getRangerDir);if(!_0x110ddf[_0x53508c(0xf5)](existsSync,_0x44f19b)){console[_0x53508c(0xc7)](_0x53508c(0xc2)+_0x110ddf[_0x53508c(0x9f)](link,_0x230948,_0x110ddf[_0x53508c(0xf5)](bold,_0x110ddf[_0x53508c(0xb9)](basename,_0x230948)))),console[_0x53508c(0xc7)](_0x53508c(0xcc)),console['log'](_0x53508c(0xdd));return;}console[_0x53508c(0xc7)](_0x53508c(0xc2)+link(_0x230948,_0x110ddf['oFGbU'](bold,_0x110ddf[_0x53508c(0xb9)](basename,_0x230948))));const _0x311557=_0x110ddf[_0x53508c(0xa4)](getCurrentVersion),_0x40bad8=getLatestVersion();if(_0x40bad8[_0x53508c(0xe8)]&&_0x40bad8['version']!==_0x311557)console['log'](_0x53508c(0xc1)+_0x311557+'\x20(latest:\x20'+_0x40bad8[_0x53508c(0xe8)]+')'),console['log'](_0x53508c(0xf3));else _0x40bad8[_0x53508c(0xe8)]?console[_0x53508c(0xc7)](_0x53508c(0xc1)+_0x311557+_0x53508c(0xa1)):console[_0x53508c(0xc7)]('Version:\x20'+_0x311557);const _0x17d850=await getToken();if(_0x17d850){const _0x34dedb=await _0x110ddf['yzWkZ'](getCurrentUser,_0x17d850);_0x34dedb[_0x53508c(0x9c)]?console[_0x53508c(0xc7)]('Organization:\x20'+bold(_0x34dedb['user'][_0x53508c(0xf1)])):(console[_0x53508c(0xc7)](_0x53508c(0x9b)),console[_0x53508c(0xc7)]('\x20\x20Run:\x20ranger\x20setup\x20[token]'));}else console[_0x53508c(0xc7)]('API\x20Token:\x20✗\x20Not\x20found'),console[_0x53508c(0xc7)](_0x53508c(0xe2));process['env'][_0x53508c(0xce)]&&(console['log']('API\x20Environment:\x20'+getCurrentEnvironment()),console[_0x53508c(0xc7)]('API\x20URL:\x20'+_0x110ddf[_0x53508c(0xa4)](getApiBaseUrl)));console[_0x53508c(0xc7)](_0x110ddf['IbyhI']);const _0x1fd053=await getOpencodePluginStatus();if(_0x110ddf['zfvgd'](_0x1fd053[_0x53508c(0xf7)],_0x110ddf[_0x53508c(0xd7)]))console['log']('\x20\x20'+_0x110ddf['oFGbU'](bold,_0x110ddf[_0x53508c(0x9a)])+':\x20configured'),_0x1fd053['details']&&console['log']('\x20\x20'+_0x1fd053[_0x53508c(0xc9)]);else _0x110ddf['zfvgd'](_0x1fd053['status'],_0x53508c(0xe7))?(console[_0x53508c(0xc7)](_0x110ddf[_0x53508c(0xb4)]),_0x1fd053[_0x53508c(0xc9)]&&console['log']('\x20\x20'+_0x1fd053['details']),console[_0x53508c(0xc7)](_0x110ddf[_0x53508c(0xd4)])):console['log']('\x20\x20OpenCode\x20not\x20installed\x20or\x20not\x20available');console['log'](_0x110ddf['tyjca']);const _0x3f98d4=await _0x110ddf['RrQUG'](getPluginInfo,'ranger@trailhead');if(_0x3f98d4){const _0x456b14=_0x3f98d4['scope']||_0x110ddf['ahnSX'],_0x356b48=_0x3f98d4[_0x53508c(0xb2)]?'enabled':'disabled';console[_0x53508c(0xc7)]('\x20\x20'+_0x110ddf['UNngg'](bold,_0x110ddf['zTQmS'])+_0x53508c(0xba)+_0x456b14+',\x20'+_0x356b48+')');}else console['log']('\x20\x20Not\x20installed'),console[_0x53508c(0xc7)](_0x110ddf[_0x53508c(0x97)]);console['log'](_0x110ddf[_0x53508c(0xae)]);const {project:_0x23b763,user:_0x136f35}=await _0x110ddf[_0x53508c(0xc8)](getInstalledSkills),_0x5a3a4b=_0x23b763['filter'](_0x168461=>RANGER_MANAGED_SKILLS['includes'](_0x168461[_0x53508c(0xcb)])),_0xe404c8=_0x136f35[_0x53508c(0xf2)](_0x30efa1=>RANGER_MANAGED_SKILLS['includes'](_0x30efa1[_0x53508c(0xcb)])),_0x33e7f3=_0x5a3a4b[_0x53508c(0xf8)]+_0xe404c8['length'];if(_0x33e7f3===0x0)console[_0x53508c(0xc7)](_0x110ddf['WdxTc']),console['log'](_0x53508c(0xcd));else{if(_0x110ddf[_0x53508c(0xbb)](_0x5a3a4b[_0x53508c(0xf8)],0x0)){console[_0x53508c(0xc7)]('\x20\x20Project-level:');for(const _0x2f0936 of _0x5a3a4b){console['log'](_0x53508c(0xd8)+_0x110ddf[_0x53508c(0xb9)](bold,_0x2f0936[_0x53508c(0xe5)])+':\x20'+_0x110ddf[_0x53508c(0x9f)](link,_0x2f0936['path'],_0x110ddf['yzWkZ'](basename,_0x2f0936[_0x53508c(0xd2)])));}}if(_0x110ddf['vllOH'](_0xe404c8['length'],0x0)){console[_0x53508c(0xc7)](_0x110ddf['XqEru']);for(const _0x1245af of _0xe404c8){console['log'](_0x53508c(0xd8)+bold(_0x1245af['displayName'])+':\x20'+link(_0x1245af[_0x53508c(0xd2)],_0x110ddf[_0x53508c(0xb9)](basename,_0x1245af[_0x53508c(0xd2)])));}}}console['log'](_0x53508c(0xc5));const {envs:_0x121913,activeEnv:_0x52a479}=await _0x110ddf[_0x53508c(0xdc)](getEnvironments);if(_0x110ddf['aHjTb'](_0x121913['length'],0x0))console[_0x53508c(0xc7)](_0x110ddf[_0x53508c(0xf0)]),console['log']('\x20\x20Run:\x20ranger\x20profile\x20add\x20<profile-name>');else{for(const _0x49e693 of _0x121913){const _0x22b932=_0x49e693[_0x53508c(0xb6)]?_0x53508c(0xa8):'',_0x133256=_0x49e693['hasEncryptedAuth']?'encrypted':_0x49e693['hasPlaintextAuth']?'plaintext':_0x110ddf[_0x53508c(0xd6)];console[_0x53508c(0xc7)]('\x20\x20'+bold(_0x49e693[_0x53508c(0xcb)])+_0x22b932),console['log'](_0x53508c(0x98)+_0x133256),_0x49e693['settingsPath']!=='(not\x20found)'&&console[_0x53508c(0xc7)]('\x20\x20\x20\x20Settings:\x20'+_0x110ddf[_0x53508c(0x9f)](link,_0x49e693['settingsPath'],_0x110ddf[_0x53508c(0xb9)](basename,_0x49e693[_0x53508c(0xfa)])));}!_0x52a479&&(console['log'](_0x53508c(0xaf)),console[_0x53508c(0xc7)](_0x53508c(0xc6)+_0x121913[_0x53508c(0xa3)](_0x30e22b=>_0x30e22b[_0x53508c(0xcb)])[_0x53508c(0xbf)](',\x20')+')'));}console['log']('');}
@@ -1 +1 @@
1
- (function(_0x317fa6,_0x3b5bf0){const _0xf29dcc=_0x2217,_0x2354cd=_0x317fa6();while(!![]){try{const _0x56914f=-parseInt(_0xf29dcc(0x1e6))/0x1*(parseInt(_0xf29dcc(0x1c0))/0x2)+parseInt(_0xf29dcc(0x1c5))/0x3+parseInt(_0xf29dcc(0x1a6))/0x4*(parseInt(_0xf29dcc(0x1c6))/0x5)+parseInt(_0xf29dcc(0x1d7))/0x6*(-parseInt(_0xf29dcc(0x198))/0x7)+-parseInt(_0xf29dcc(0x1a5))/0x8*(parseInt(_0xf29dcc(0x19c))/0x9)+parseInt(_0xf29dcc(0x1bb))/0xa*(-parseInt(_0xf29dcc(0x1da))/0xb)+parseInt(_0xf29dcc(0x19d))/0xc;if(_0x56914f===_0x3b5bf0)break;else _0x2354cd['push'](_0x2354cd['shift']());}catch(_0x1185c8){_0x2354cd['push'](_0x2354cd['shift']());}}}(_0x53da,0xd8240));import{spawn}from'child_process';function _0x2217(_0x27a8fc,_0x2bb880){_0x27a8fc=_0x27a8fc-0x198;const _0x53da10=_0x53da();let _0x221783=_0x53da10[_0x27a8fc];return _0x221783;}import{existsSync}from'fs';import{readFile,writeFile}from'fs/promises';function _0x53da(){const _0x962ee0=['\x0a✅\x20Update\x20complete!','.gitignore','ignore','gGSUo','ulGbc','splice','npm','error','\x0aSuccessfully\x20installed\x20latest\x20version.','--scope','@latest','qPjCi','version','590AePwfx','vjsdY','log','rkyee','close','426526AjETmz','\x0aYour\x20version\x20(','\x0aCurrent\x20version:\x20','GXmBn','PqkiM','2655186UeMuJF','443175LJpXeL','TaWNW','sAzvF','kMevY','MqCjo','xXYvI',')\x20is\x20newer\x20than\x20the\x20published\x20version\x20(','\x20\x20Failed\x20to\x20reinstall\x20','ranger@trailhead','ZbGEv','inherit','CmJjM','claude','kill','wLLcp','trim','XmOuJ','2334ppWgFr','TqZLH','user','313489TKxTqh','project','Sgzbu','win32','VKyMo','Claude\x20marketplace\x20update\x20command\x20failed\x20(timed\x20out,\x20failed\x20to\x20start,\x20or\x20exited\x20with\x20a\x20non-zero\x20status).','join','plugin','active-feature.txt','findIndex','yayaM','opencode','2fTsWcL','29281wkpwkZ','utf-8','\x0aNo\x20ranger-managed\x20skills\x20found\x20to\x20reinstall.','BydvJ','369wmMoex','48216456pmQMzz','update','icmRR','\x0aInstalling\x20','platform','\x0aClaude\x20plugin\x20updated\x20(project\x20scope).','GaXrq','marketplace','107032hsMluI','12Acehnd','✓\x20Migrated\x20active\x20profile\x20file','XaYzO','Vantm','ZxogX','push','jtXZC','\x0aCould\x20not\x20check\x20latest\x20version:\x20'];_0x53da=function(){return _0x962ee0;};return _0x53da();}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{getPluginInfo,isMarketplaceAdded,isPluginInstalled}from'./utils/claudePlugin.js';const CLAUDE_COMMAND_TIMEOUT_MS=0x1d4c0;async function runCommand(_0x250f97,_0x15db6c,_0x23b549){const _0x34ce7f={'icmRR':function(_0x3bf76f,_0x2fe408){return _0x3bf76f(_0x2fe408);},'IZSdf':function(_0x2c505a,_0xd6294f){return _0x2c505a===_0xd6294f;},'yayaM':function(_0x194779,_0x2cd4d4){return _0x194779(_0x2cd4d4);},'QNimZ':function(_0x4ce6b5,_0x5c5f85,_0x40c431,_0x369494){return _0x4ce6b5(_0x5c5f85,_0x40c431,_0x369494);},'NqIIs':'inherit'};return new Promise(_0x5b67d1=>{const _0x5255f1=_0x2217,_0x3d5c05={'ulGbc':function(_0xa28d01,_0x402d3d){const _0x4c9923=_0x2217;return _0x34ce7f[_0x4c9923(0x1e4)](_0xa28d01,_0x402d3d);}};let _0x10111e=![],_0x348f4a;const _0x5eddde=_0x2b1f9e=>{const _0x39c4fe=_0x2217;if(_0x10111e)return;_0x10111e=!![],_0x348f4a&&clearTimeout(_0x348f4a),_0x34ce7f[_0x39c4fe(0x19f)](_0x5b67d1,_0x2b1f9e);},_0x27cc56=_0x34ce7f['QNimZ'](spawn,_0x250f97,_0x15db6c,{'stdio':[_0x5255f1(0x1b0),_0x23b549?.['stdio']??'inherit',_0x23b549?.['stdio']??_0x34ce7f['NqIIs']],'shell':process[_0x5255f1(0x1a1)]==='win32'});_0x348f4a=_0x23b549?.['timeoutMs']?setTimeout(()=>{const _0x45e1fd=_0x5255f1;_0x27cc56[_0x45e1fd(0x1d3)](),_0x27cc56['unref'](),_0x3d5c05[_0x45e1fd(0x1b2)](_0x5eddde,![]);},_0x23b549['timeoutMs']):undefined,_0x27cc56['on'](_0x5255f1(0x1bf),_0x4feb24=>{_0x5eddde(_0x34ce7f['IZSdf'](_0x4feb24,0x0));}),_0x27cc56['on']('error',()=>{_0x3d5c05['ulGbc'](_0x5eddde,![]);});});}async function runInstall(){const _0x44f70f=_0x2217,_0x2a82fb={'WcqoO':function(_0x501259,_0x419cf7){return _0x501259===_0x419cf7;},'IaMem':function(_0x5427ae,_0x380467,_0x4f31dd,_0x359a2f){return _0x5427ae(_0x380467,_0x4f31dd,_0x359a2f);},'jtXZC':_0x44f70f(0x1b4),'fgPEK':'ignore','rkyee':_0x44f70f(0x1d0),'GaXrq':function(_0x18fd66,_0x1f293d){return _0x18fd66===_0x1f293d;},'vjsdY':_0x44f70f(0x1dd),'tUiaB':'close'};return new Promise(_0x4abb5e=>{const _0x27c00a=_0x44f70f,_0x3d55eb={'qPjCi':function(_0x1ecc71,_0x2f7c3f){return _0x1ecc71(_0x2f7c3f);}};console[_0x27c00a(0x1bd)](_0x27c00a(0x1a0)+PACKAGE_NAME+'@latest...\x0a');const _0x29fb5c=_0x2a82fb['IaMem'](spawn,_0x2a82fb[_0x27c00a(0x1ac)],['install','-g',PACKAGE_NAME+_0x27c00a(0x1b8)],{'stdio':[_0x2a82fb['fgPEK'],_0x2a82fb[_0x27c00a(0x1be)],_0x2a82fb[_0x27c00a(0x1be)]],'shell':_0x2a82fb[_0x27c00a(0x1a3)](process[_0x27c00a(0x1a1)],_0x2a82fb[_0x27c00a(0x1bc)])});_0x29fb5c['on'](_0x2a82fb['tUiaB'],_0x338af3=>{_0x4abb5e(_0x2a82fb['WcqoO'](_0x338af3,0x0));}),_0x29fb5c['on'](_0x27c00a(0x1b5),()=>{const _0x56c51a=_0x27c00a;_0x3d55eb[_0x56c51a(0x1b9)](_0x4abb5e,![]);});});}async function updateClaudeMarketplace(){const _0x220c86=_0x2217,_0x1e0979={'MqCjo':_0x220c86(0x1d2),'xXYvI':_0x220c86(0x1e1),'oSlQF':_0x220c86(0x19e),'eXcCA':'trailhead'},_0x83296e=await runCommand(_0x1e0979[_0x220c86(0x1ca)],[_0x1e0979[_0x220c86(0x1cb)],_0x220c86(0x1a4),_0x1e0979['oSlQF'],_0x1e0979['eXcCA']],{'timeoutMs':CLAUDE_COMMAND_TIMEOUT_MS});if(!_0x83296e)throw new Error(_0x220c86(0x1df));}async function updateClaudePlugin(_0x44e102){const _0x420366=_0x2217,_0x1dcc99={'UWJGn':_0x420366(0x1e1),'MrPve':_0x420366(0x19e),'pZTxQ':_0x420366(0x1b7),'BydvJ':function(_0x2d680e,_0x21534c,_0x203c14,_0x2432ad){return _0x2d680e(_0x21534c,_0x203c14,_0x2432ad);},'JDOow':function(_0x4b506e,_0x444b1d){return _0x4b506e??_0x444b1d;},'TqZLH':_0x420366(0x1d9)},_0x5208b4=[_0x1dcc99['UWJGn'],_0x1dcc99['MrPve'],_0x420366(0x1ce)];_0x44e102&&_0x5208b4['push'](_0x1dcc99['pZTxQ'],_0x44e102);const _0x48e5d2=await _0x1dcc99[_0x420366(0x19b)](runCommand,_0x420366(0x1d2),_0x5208b4,{'timeoutMs':CLAUDE_COMMAND_TIMEOUT_MS});if(!_0x48e5d2){const _0x1d172c=_0x1dcc99['JDOow'](_0x44e102,_0x1dcc99[_0x420366(0x1d8)]);throw new Error('Claude\x20plugin\x20update\x20failed\x20for\x20'+_0x1d172c+'\x20scope\x20(timed\x20out,\x20failed\x20to\x20start,\x20or\x20exited\x20with\x20a\x20non-zero\x20status).');}}function isSkillInstalled(_0x591255,_0x1f6f7a,_0x149618){const _0x3bad00={'Qlsyn':function(_0x4fe7e7,_0xe954a3){return _0x4fe7e7(_0xe954a3);}},_0x3831fe=_0x149618==='opencode'?getOpencodeSkillsDir(_0x1f6f7a):getSkillsDir(_0x1f6f7a),_0x1a2353=join(_0x3831fe,_0x591255);return _0x3bad00['Qlsyn'](existsSync,_0x1a2353);}async function reinstallSkills(_0x2f009b){const _0x1dd615=_0x2217,_0x1e747f={'XaYzO':_0x1dd615(0x1db),'kXaDm':function(_0x27a036,_0x2a1f37,_0x408b78,_0x14a460){return _0x27a036(_0x2a1f37,_0x408b78,_0x14a460);},'PqkiM':'claude','RFqhi':function(_0x335d11,_0x3a1a70){return _0x335d11===_0x3a1a70;},'kMevY':function(_0x519d4f,_0x5e42e7,_0x498b65){return _0x519d4f(_0x5e42e7,_0x498b65);}},_0x527534=[_0x1e747f[_0x1dd615(0x1a8)],'user'],_0x1c4d2e=[];for(const _0x57a554 of _0x527534){for(const _0x59d27b of RANGER_MANAGED_SKILLS){_0x1e747f['kXaDm'](isSkillInstalled,_0x59d27b,_0x57a554,_0x1dd615(0x1d2))&&_0x1c4d2e['push']({'skillName':_0x59d27b,'level':_0x57a554,'platform':_0x1e747f[_0x1dd615(0x1c4)]}),isSkillInstalled(_0x59d27b,_0x57a554,_0x1dd615(0x1e5))&&_0x1c4d2e[_0x1dd615(0x1ab)]({'skillName':_0x59d27b,'level':_0x57a554,'platform':_0x1dd615(0x1e5)});}}for(const _0x2e3910 of _0x527534){for(const _0x41a17d of DEPRECATED_SKILLS){await removeSkill(_0x41a17d,_0x2e3910);}}if(_0x1e747f['RFqhi'](_0x1c4d2e['length'],0x0)){console['log'](_0x1dd615(0x19a));return;}console[_0x1dd615(0x1bd)]('\x0aReinstalling\x20'+_0x1c4d2e['length']+'\x20ranger-managed\x20skill(s)...');for(const {skillName:_0x1fbf99,level:_0x54f9b7,platform:_0x17c939}of _0x1c4d2e){try{await _0x1e747f[_0x1dd615(0x1c9)](installSkill,_0x1fbf99,{'level':_0x54f9b7,'cliVersion':_0x2f009b,'platform':_0x17c939});}catch(_0x30974b){console['warn'](_0x1dd615(0x1cd)+_0x17c939+'\x20'+_0x54f9b7+'\x20skill\x20'+_0x1fbf99+':',_0x30974b);}}}async function ensureActiveProfileGitignored(){const _0x123b25=_0x2217,_0x424052={'CmJjM':function(_0x2ed01d,_0x366065,_0x1bed24){return _0x2ed01d(_0x366065,_0x1bed24);},'ndAZP':_0x123b25(0x199),'kEGNp':function(_0x5957af,_0x15567e){return _0x5957af===_0x15567e;},'TaWNW':function(_0x50769b,_0x53a6a2,_0x471388,_0x45bf9c){return _0x50769b(_0x53a6a2,_0x471388,_0x45bf9c);}},_0x3b3153=_0x424052[_0x123b25(0x1d1)](join,getRangerDir(),_0x123b25(0x1af));if(!existsSync(_0x3b3153))return![];let _0x3737f5='';try{_0x3737f5=await readFile(_0x3b3153,_0x424052['ndAZP']);}catch{return![];}const _0x5abb36=_0x3737f5['split'](/\r?\n/);if(_0x5abb36['some'](_0x3448be=>_0x3448be['trim']()==='active-profile.txt'))return![];let _0x371a4b=_0x5abb36[_0x123b25(0x1e3)](_0x5483e0=>_0x5483e0[_0x123b25(0x1d5)]()===_0x123b25(0x1e2));_0x424052['kEGNp'](_0x371a4b,-0x1)&&(_0x371a4b=_0x5abb36['length']);_0x5abb36[_0x123b25(0x1b3)](_0x371a4b,0x0,'active-profile.txt');let _0x459c7f=_0x5abb36[_0x123b25(0x1e0)]('\x0a');!_0x459c7f['endsWith']('\x0a')&&(_0x459c7f+='\x0a');try{await _0x424052[_0x123b25(0x1c7)](writeFile,_0x3b3153,_0x459c7f,_0x123b25(0x199));}catch{return![];}return!![];}export async function update(){const _0x553475=_0x2217,_0x4c277c={'enSTR':'Checking\x20for\x20updates...','wLLcp':'Attempting\x20install\x20anyway...','gGSUo':_0x553475(0x1b6),'ZbGEv':function(_0x234c82,_0x3fcb37){return _0x234c82===_0x3fcb37;},'sAzvF':function(_0x1bd587,_0x4b15bb){return _0x1bd587<_0x4b15bb;},'yQkHo':function(_0x42874a,_0x397885){return _0x42874a(_0x397885);},'ZxogX':'trailhead','VKyMo':function(_0x2d7fed,_0x533249){return _0x2d7fed(_0x533249);},'GXmBn':'ranger@trailhead','Vantm':function(_0x620dd8){return _0x620dd8();},'Sgzbu':function(_0x20b40f,_0xfef018){return _0x20b40f(_0xfef018);},'UoUAK':_0x553475(0x1db),'NTwXo':_0x553475(0x1a2),'XmOuJ':function(_0x11a317){return _0x11a317();},'qDmFp':_0x553475(0x1ae)},_0x16dd49=getCurrentVersion();console[_0x553475(0x1bd)](_0x553475(0x1c2)+_0x16dd49),console['log'](_0x4c277c['enSTR']);const _0x2f191c=getLatestVersion();let _0x4d448c=_0x16dd49;if(!_0x2f191c[_0x553475(0x1ba)]){console['warn'](_0x553475(0x1ad)+_0x2f191c['error']),console[_0x553475(0x1bd)](_0x4c277c[_0x553475(0x1d4)]);const _0xa07f4d=await runInstall();if(_0xa07f4d)console['log'](_0x4c277c[_0x553475(0x1b1)]),_0x4d448c=getCurrentVersion();else throw new Error('Update\x20failed:\x20'+_0x2f191c['error']);}else{const _0x50b633=_0x2f191c[_0x553475(0x1ba)];console[_0x553475(0x1bd)]('Latest\x20version:\x20\x20'+_0x50b633);const _0x45323d=compareVersions(_0x16dd49,_0x50b633);if(_0x4c277c[_0x553475(0x1cf)](_0x45323d,0x0))console['log']('\x0aYou\x20are\x20already\x20on\x20the\x20latest\x20version.');else{if(_0x4c277c[_0x553475(0x1c8)](_0x45323d,0x0))console[_0x553475(0x1bd)](_0x553475(0x1c1)+_0x16dd49+_0x553475(0x1cc)+_0x50b633+').');else{const _0xafa4e6=await runInstall();if(_0xafa4e6)console[_0x553475(0x1bd)]('\x0aSuccessfully\x20updated\x20to\x20version\x20'+_0x50b633),_0x4d448c=_0x50b633;else throw new Error('Update\x20failed.');}}}await _0x4c277c['yQkHo'](reinstallSkills,_0x4d448c);const _0xed3248=await isMarketplaceAdded(_0x4c277c[_0x553475(0x1aa)]),_0x464a53=await _0x4c277c[_0x553475(0x1de)](isPluginInstalled,_0x4c277c['GXmBn']);_0xed3248&&(await _0x4c277c[_0x553475(0x1a9)](updateClaudeMarketplace),console['log']('\x0aClaude\x20marketplace\x20updated\x20(trailhead).'));if(_0x464a53){const _0xd81933=await _0x4c277c['yQkHo'](getPluginInfo,_0x4c277c[_0x553475(0x1c3)]);_0x4c277c[_0x553475(0x1cf)](_0xd81933?.['scope'],_0x553475(0x1db))?(await _0x4c277c[_0x553475(0x1dc)](updateClaudePlugin,_0x4c277c['UoUAK']),console['log'](_0x4c277c['NTwXo'])):(await _0x4c277c['XmOuJ'](updateClaudePlugin),console['log']('\x0aClaude\x20plugin\x20updated\x20(user\x20scope).'));}const _0xb7877c=await migrateActiveProfileFile();_0xb7877c&&console['log'](_0x553475(0x1a7));const _0x2159e2=await _0x4c277c[_0x553475(0x1d6)](ensureActiveProfileGitignored);console['log'](_0x4c277c['qDmFp']);}
1
+ const _0x4a9008=_0xd9cf;(function(_0x359c32,_0x17c605){const _0x7722ae=_0xd9cf,_0x53cc31=_0x359c32();while(!![]){try{const _0x2a6098=-parseInt(_0x7722ae(0x130))/0x1*(-parseInt(_0x7722ae(0x12f))/0x2)+parseInt(_0x7722ae(0xe3))/0x3*(parseInt(_0x7722ae(0x12a))/0x4)+parseInt(_0x7722ae(0x134))/0x5+parseInt(_0x7722ae(0x10f))/0x6+-parseInt(_0x7722ae(0xfb))/0x7*(-parseInt(_0x7722ae(0xe2))/0x8)+-parseInt(_0x7722ae(0x123))/0x9*(-parseInt(_0x7722ae(0xe7))/0xa)+-parseInt(_0x7722ae(0xf1))/0xb*(parseInt(_0x7722ae(0xec))/0xc);if(_0x2a6098===_0x17c605)break;else _0x53cc31['push'](_0x53cc31['shift']());}catch(_0x34686a){_0x53cc31['push'](_0x53cc31['shift']());}}}(_0x197a,0x869d8));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{getPluginInfo,isMarketplaceAdded,isPluginInstalled}from'./utils/claudePlugin.js';const CLAUDE_COMMAND_TIMEOUT_MS=0x1d4c0;async function runCommand(_0x110893,_0x270b88,_0x5d3b82){const _0x23be0c={'KdGuH':function(_0x2cf840,_0x1e6473){return _0x2cf840(_0x1e6473);},'OlLeQ':'ignore','DSBFV':function(_0x10d4ef,_0x39a8c8){return _0x10d4ef===_0x39a8c8;},'sXydo':'win32','FmAhg':'close'};return new Promise(_0x4d051e=>{const _0x4b7c59=_0xd9cf;let _0x4f7e11=![],_0x1a3dff;const _0x4d791e=_0x13a98e=>{if(_0x4f7e11)return;_0x4f7e11=!![],_0x1a3dff&&clearTimeout(_0x1a3dff),_0x4d051e(_0x13a98e);},_0x1f80e5=spawn(_0x110893,_0x270b88,{'stdio':[_0x23be0c[_0x4b7c59(0x125)],_0x5d3b82?.[_0x4b7c59(0x100)]??'inherit',_0x5d3b82?.[_0x4b7c59(0x100)]??_0x4b7c59(0xf2)],'shell':_0x23be0c[_0x4b7c59(0xfa)](process['platform'],_0x23be0c[_0x4b7c59(0x121)])});_0x1a3dff=_0x5d3b82?.[_0x4b7c59(0xf9)]?setTimeout(()=>{_0x1f80e5['kill'](),_0x1f80e5['unref'](),_0x4d791e(![]);},_0x5d3b82['timeoutMs']):undefined,_0x1f80e5['on'](_0x23be0c['FmAhg'],_0x5204f0=>{_0x4d791e(_0x5204f0===0x0);}),_0x1f80e5['on']('error',()=>{const _0x4cb6af=_0x4b7c59;_0x23be0c[_0x4cb6af(0xf4)](_0x4d791e,![]);});});}export function resolveDistTag(_0x461abe){const _0xbed4b6=_0xd9cf,_0x2eddfe={'seiEe':_0xbed4b6(0xeb)};if(/-alpha\./i['test'](_0x461abe))return _0xbed4b6(0x11b);if(/-beta\./i[_0xbed4b6(0xfc)](_0x461abe))return'beta';if(/-rc\./i[_0xbed4b6(0xfc)](_0x461abe))return'rc';return _0x2eddfe[_0xbed4b6(0xe6)];}async function runInstall(_0x32421d=_0x4a9008(0xeb)){const _0x3c19dd=_0x4a9008,_0x35f09b={'nMOEX':'npm','nPTOP':_0x3c19dd(0xf7),'hRuOl':'inherit','OTzeb':_0x3c19dd(0x131)};return new Promise(_0x57df4b=>{const _0x10bf31=_0x3c19dd,_0x10f224={'ZuWzW':function(_0x1fa80b,_0x568f51){return _0x1fa80b(_0x568f51);}};console['log']('\x0aInstalling\x20'+PACKAGE_NAME+'@'+_0x32421d+_0x10bf31(0x12d));const _0x5f2618=spawn(_0x35f09b['nMOEX'],[_0x35f09b['nPTOP'],'-g',PACKAGE_NAME+'@'+_0x32421d],{'stdio':[_0x10bf31(0xf6),_0x10bf31(0xf2),_0x35f09b['hRuOl']],'shell':process[_0x10bf31(0x102)]==='win32'});_0x5f2618['on']('close',_0x54de36=>{const _0x568cf3=_0x10bf31;_0x10f224[_0x568cf3(0x111)](_0x57df4b,_0x54de36===0x0);}),_0x5f2618['on'](_0x35f09b[_0x10bf31(0x124)],()=>{_0x57df4b(![]);});});}async function updateClaudeMarketplace(){const _0xbe89ee=_0x4a9008,_0x48c7e4={'yngFs':'plugin','jNjSi':_0xbe89ee(0x10c),'wYmtN':'trailhead'},_0x2df437=await runCommand('claude',[_0x48c7e4[_0xbe89ee(0x11e)],_0x48c7e4[_0xbe89ee(0x11c)],'update',_0x48c7e4[_0xbe89ee(0x135)]],{'timeoutMs':CLAUDE_COMMAND_TIMEOUT_MS});if(!_0x2df437)throw new Error(_0xbe89ee(0xe8));}async function updateClaudePlugin(_0x4cbca6){const _0x4b0f67=_0x4a9008,_0x6725f={'cPTIe':'update','QboNp':_0x4b0f67(0x105),'QjUPD':function(_0x238f94,_0x1b2f03,_0x36a0b4,_0x535d64){return _0x238f94(_0x1b2f03,_0x36a0b4,_0x535d64);},'GmVnC':'claude'},_0x3fe46e=['plugin',_0x6725f[_0x4b0f67(0x132)],_0x6725f[_0x4b0f67(0x10b)]];_0x4cbca6&&_0x3fe46e['push'](_0x4b0f67(0x10e),_0x4cbca6);const _0x1109f3=await _0x6725f[_0x4b0f67(0x106)](runCommand,_0x6725f['GmVnC'],_0x3fe46e,{'timeoutMs':CLAUDE_COMMAND_TIMEOUT_MS});if(!_0x1109f3){const _0x18f7c3=_0x4cbca6??'user';throw new Error('Claude\x20plugin\x20update\x20failed\x20for\x20'+_0x18f7c3+_0x4b0f67(0x119));}}function _0x197a(){const _0x404b59=['Update\x20failed\x20for\x20@','alpha','jNjSi','oQRIp','yngFs','version','agYNX','sXydo','Latest\x20version:\x20\x20','1593477EtiVav','OTzeb','OlLeQ','log','\x0aReinstalling\x20','aMHRd','OXZnB','39796DQQrRM','\x0aCould\x20not\x20check\x20latest\x20version:\x20','\x0aClaude\x20plugin\x20updated\x20(project\x20scope).','...\x0a','trailhead','2UtYOsg','694783VQARGy','error','cPTIe','length','1810450fOPqdm','wYmtN','KVraQ','4292656CfRKuR','54WSabVz','active-feature.txt','UkKNB','seiEe','40FgXjXE','Claude\x20marketplace\x20update\x20command\x20failed\x20(timed\x20out,\x20failed\x20to\x20start,\x20or\x20exited\x20with\x20a\x20non-zero\x20status).','trim','upkPs','latest','17639724yZJkHM','jXuEF','zDxaM','findIndex','CCfHB','22FQSIdm','inherit','join','KdGuH','pQxdS','ignore','install','\x0aSuccessfully\x20installed\x20latest\x20version.','timeoutMs','DSBFV','14CWmGER','test','rotjj','eKmmJ','.gitignore','stdio','\x20channel.','platform','push','\x0aCurrent\x20version:\x20','ranger@trailhead','QjUPD','qWkXq','scope','claude','opencode','QboNp','marketplace','\x0a✅\x20Update\x20complete!','--scope','2844042LZHyJi','KhnpP','ZuWzW','KGTpR','\x20ranger-managed\x20skill(s)...','mIlgI','warn','project','ZjUoI','Attempting\x20install\x20anyway...','\x20scope\x20(timed\x20out,\x20failed\x20to\x20start,\x20or\x20exited\x20with\x20a\x20non-zero\x20status).'];_0x197a=function(){return _0x404b59;};return _0x197a();}function isSkillInstalled(_0x1e3318,_0xe0f785,_0x16c315){const _0x5bfe66=_0x4a9008,_0x167797={'zturv':function(_0x1e886c,_0x2f8dd7){return _0x1e886c(_0x2f8dd7);}},_0x5a17e0=_0x16c315===_0x5bfe66(0x10a)?getOpencodeSkillsDir(_0xe0f785):_0x167797['zturv'](getSkillsDir,_0xe0f785),_0x1ece78=join(_0x5a17e0,_0x1e3318);return existsSync(_0x1ece78);}function _0xd9cf(_0xb03749,_0x35cd40){_0xb03749=_0xb03749-0xe1;const _0x197a1d=_0x197a();let _0xd9cf60=_0x197a1d[_0xb03749];return _0xd9cf60;}async function reinstallSkills(_0x4cc88d){const _0x189250=_0x4a9008,_0x3f0c08={'zdnul':'project','HMVAE':function(_0x4df697,_0x3f26d1,_0x29c7f9,_0x1a3117){return _0x4df697(_0x3f26d1,_0x29c7f9,_0x1a3117);},'agYNX':_0x189250(0x109),'XWtxH':function(_0x1ecc63,_0x257be4,_0xe86fbd,_0x39ee4d){return _0x1ecc63(_0x257be4,_0xe86fbd,_0x39ee4d);},'UkKNB':_0x189250(0x10a),'KGTpR':function(_0x1a8b96,_0x354c90,_0x49a116){return _0x1a8b96(_0x354c90,_0x49a116);},'mIlgI':function(_0x18c331,_0x2fb142){return _0x18c331===_0x2fb142;},'pQxdS':'\x0aNo\x20ranger-managed\x20skills\x20found\x20to\x20reinstall.'},_0x5dede8=[_0x3f0c08['zdnul'],'user'],_0x5bd9fd=[];for(const _0x4d02cd of _0x5dede8){for(const _0x24d276 of RANGER_MANAGED_SKILLS){_0x3f0c08['HMVAE'](isSkillInstalled,_0x24d276,_0x4d02cd,'claude')&&_0x5bd9fd['push']({'skillName':_0x24d276,'level':_0x4d02cd,'platform':_0x3f0c08[_0x189250(0x120)]}),_0x3f0c08['XWtxH'](isSkillInstalled,_0x24d276,_0x4d02cd,_0x189250(0x10a))&&_0x5bd9fd[_0x189250(0x103)]({'skillName':_0x24d276,'level':_0x4d02cd,'platform':_0x3f0c08[_0x189250(0xe5)]});}}for(const _0x662abf of _0x5dede8){for(const _0x5badcb of DEPRECATED_SKILLS){await _0x3f0c08[_0x189250(0x112)](removeSkill,_0x5badcb,_0x662abf);}}if(_0x3f0c08[_0x189250(0x114)](_0x5bd9fd[_0x189250(0x133)],0x0)){console['log'](_0x3f0c08[_0x189250(0xf5)]);return;}console['log'](_0x189250(0x127)+_0x5bd9fd[_0x189250(0x133)]+_0x189250(0x113));for(const {skillName:_0xf1fdab,level:_0x2d251e,platform:_0x5c8d51}of _0x5bd9fd){try{await _0x3f0c08[_0x189250(0x112)](installSkill,_0xf1fdab,{'level':_0x2d251e,'cliVersion':_0x4cc88d,'platform':_0x5c8d51});}catch(_0x5cee4d){console[_0x189250(0x115)]('\x20\x20Failed\x20to\x20reinstall\x20'+_0x5c8d51+'\x20'+_0x2d251e+'\x20skill\x20'+_0xf1fdab+':',_0x5cee4d);}}}async function ensureActiveProfileGitignored(){const _0xd03e62=_0x4a9008,_0x2bf148={'OXZnB':function(_0x2c2efd,_0x4732b3,_0x49b3b0){return _0x2c2efd(_0x4732b3,_0x49b3b0);},'eKmmJ':_0xd03e62(0xff),'zDxaM':function(_0x21d6cf,_0x31647b){return _0x21d6cf(_0x31647b);},'qWkXq':'utf-8'},_0x1d76dd=_0x2bf148[_0xd03e62(0x129)](join,getRangerDir(),_0x2bf148[_0xd03e62(0xfe)]);if(!_0x2bf148[_0xd03e62(0xee)](existsSync,_0x1d76dd))return![];let _0x550bbe='';try{_0x550bbe=await _0x2bf148[_0xd03e62(0x129)](readFile,_0x1d76dd,_0x2bf148[_0xd03e62(0x107)]);}catch{return![];}const _0x4d5d95=_0x550bbe['split'](/\r?\n/);if(_0x4d5d95['some'](_0x180ee8=>_0x180ee8[_0xd03e62(0xe9)]()==='active-profile.txt'))return![];let _0x20c719=_0x4d5d95[_0xd03e62(0xef)](_0x113a61=>_0x113a61[_0xd03e62(0xe9)]()===_0xd03e62(0xe4));_0x20c719===-0x1&&(_0x20c719=_0x4d5d95[_0xd03e62(0x133)]);_0x4d5d95['splice'](_0x20c719,0x0,'active-profile.txt');let _0x1fee5c=_0x4d5d95[_0xd03e62(0xf3)]('\x0a');!_0x1fee5c['endsWith']('\x0a')&&(_0x1fee5c+='\x0a');try{await writeFile(_0x1d76dd,_0x1fee5c,_0x2bf148['qWkXq']);}catch{return![];}return!![];}export async function update(){const _0x4b6589=_0x4a9008,_0x1f06d9={'YPzJc':function(_0x2b8db4,_0x3bb90c){return _0x2b8db4!==_0x3bb90c;},'rotjj':'latest','CCfHB':function(_0x1bdca8,_0x1aeca3){return _0x1bdca8(_0x1aeca3);},'jXuEF':function(_0x5d9773){return _0x5d9773();},'KVraQ':_0x4b6589(0x10d),'PhdwG':function(_0x301c3f){return _0x301c3f();},'aMHRd':_0x4b6589(0x118),'gBRzU':function(_0x4d1ab8,_0x1e77db,_0x35d772){return _0x4d1ab8(_0x1e77db,_0x35d772);},'iImTI':function(_0x32789,_0x2f55eb){return _0x32789===_0x2f55eb;},'oQRIp':'\x0aYou\x20are\x20already\x20on\x20the\x20latest\x20version.','KhnpP':'\x0aClaude\x20marketplace\x20updated\x20(trailhead).','ZjUoI':'ranger@trailhead','upkPs':'project','selNq':function(_0x1d5f64){return _0x1d5f64();},'QZQwi':'\x0aClaude\x20plugin\x20updated\x20(user\x20scope).'},_0x51d6db=getCurrentVersion();console[_0x4b6589(0x126)](_0x4b6589(0x104)+_0x51d6db);const _0x46dc36=resolveDistTag(_0x51d6db);if(_0x1f06d9['YPzJc'](_0x46dc36,_0x1f06d9[_0x4b6589(0xfd)])){console['log']('Prerelease\x20channel\x20detected\x20(@'+_0x46dc36+').\x20Staying\x20on\x20'+_0x46dc36+'\x20—\x20reinstalling\x20@'+_0x46dc36+'...');const _0x283084=await _0x1f06d9['CCfHB'](runInstall,_0x46dc36);if(!_0x283084)throw new Error(_0x4b6589(0x11a)+_0x46dc36+_0x4b6589(0x101));const _0x327fd7=_0x1f06d9[_0x4b6589(0xed)](getCurrentVersion);console[_0x4b6589(0x126)]('\x0aSuccessfully\x20installed\x20'+PACKAGE_NAME+'@'+_0x46dc36+'.'),await reinstallSkills(_0x327fd7);const _0x2726b7=await migrateActiveProfileFile();_0x2726b7&&console[_0x4b6589(0x126)]('✓\x20Migrated\x20active\x20profile\x20file');await ensureActiveProfileGitignored(),console['log'](_0x1f06d9[_0x4b6589(0xe1)]);return;}console[_0x4b6589(0x126)]('Checking\x20for\x20updates...');const _0x111d38=_0x1f06d9['PhdwG'](getLatestVersion);let _0x45be93=_0x51d6db;if(!_0x111d38[_0x4b6589(0x11f)]){console['warn'](_0x4b6589(0x12b)+_0x111d38['error']),console[_0x4b6589(0x126)](_0x1f06d9[_0x4b6589(0x128)]);const _0x1510ad=await runInstall();if(_0x1510ad)console['log'](_0x4b6589(0xf8)),_0x45be93=getCurrentVersion();else throw new Error('Update\x20failed:\x20'+_0x111d38['error']);}else{const _0x1ca525=_0x111d38['version'];console[_0x4b6589(0x126)](_0x4b6589(0x122)+_0x1ca525);const _0x22bd0b=_0x1f06d9['gBRzU'](compareVersions,_0x51d6db,_0x1ca525);if(_0x1f06d9['iImTI'](_0x22bd0b,0x0))console[_0x4b6589(0x126)](_0x1f06d9[_0x4b6589(0x11d)]);else{if(_0x22bd0b<0x0)console[_0x4b6589(0x126)]('\x0aYour\x20version\x20('+_0x51d6db+')\x20is\x20newer\x20than\x20the\x20published\x20version\x20('+_0x1ca525+').');else{const _0x577f0f=await _0x1f06d9[_0x4b6589(0xed)](runInstall);if(_0x577f0f)console['log']('\x0aSuccessfully\x20updated\x20to\x20version\x20'+_0x1ca525),_0x45be93=_0x1ca525;else throw new Error('Update\x20failed.');}}}await _0x1f06d9['CCfHB'](reinstallSkills,_0x45be93);const _0x36b535=await _0x1f06d9[_0x4b6589(0xf0)](isMarketplaceAdded,_0x4b6589(0x12e)),_0x5650e8=await _0x1f06d9['CCfHB'](isPluginInstalled,'ranger@trailhead');_0x36b535&&(await _0x1f06d9['jXuEF'](updateClaudeMarketplace),console['log'](_0x1f06d9[_0x4b6589(0x110)]));if(_0x5650e8){const _0x45aecb=await getPluginInfo(_0x1f06d9[_0x4b6589(0x117)]);_0x1f06d9['iImTI'](_0x45aecb?.[_0x4b6589(0x108)],_0x4b6589(0x116))?(await _0x1f06d9[_0x4b6589(0xf0)](updateClaudePlugin,_0x1f06d9[_0x4b6589(0xea)]),console[_0x4b6589(0x126)](_0x4b6589(0x12c))):(await _0x1f06d9['selNq'](updateClaudePlugin),console['log'](_0x1f06d9['QZQwi']));}const _0x333682=await migrateActiveProfileFile();_0x333682&&console[_0x4b6589(0x126)]('✓\x20Migrated\x20active\x20profile\x20file');const _0x470ced=await _0x1f06d9[_0x4b6589(0xed)](ensureActiveProfileGitignored);console['log'](_0x4b6589(0x10d));}
@@ -1 +1 @@
1
- (function(_0xe40305,_0x2faeb5){const _0x5567f6=_0x592f,_0x2c302a=_0xe40305();while(!![]){try{const _0x377b1b=parseInt(_0x5567f6(0x1d7))/0x1+parseInt(_0x5567f6(0x1a8))/0x2*(parseInt(_0x5567f6(0x1ca))/0x3)+-parseInt(_0x5567f6(0x1bd))/0x4*(-parseInt(_0x5567f6(0x1d6))/0x5)+-parseInt(_0x5567f6(0x1b7))/0x6+parseInt(_0x5567f6(0x1aa))/0x7+parseInt(_0x5567f6(0x1b3))/0x8+-parseInt(_0x5567f6(0x1c6))/0x9;if(_0x377b1b===_0x2faeb5)break;else _0x2c302a['push'](_0x2c302a['shift']());}catch(_0x1c933f){_0x2c302a['push'](_0x2c302a['shift']());}}}(_0x5bd9,0x22d18));import{writeFile,readFile,unlink}from'fs/promises';import{join}from'path';function _0x5bd9(){const _0x4c824c=['Non-interactive\x20mode\x20detected.\x0aThe\x20\x22ranger\x20profile\x20update\x22\x20command\x20requires\x20interactive\x20browser\x20authentication\x20and\x20cannot\x20be\x20run\x20in\x20non-TTY\x20environments\x20(CI,\x20scripts,\x20Claude\x20Code).\x0aTo\x20update\x20profile\x20authentication:\x0a\x20\x201.\x20Run\x20\x22ranger\x20profile\x20update\x20<name>\x22\x20in\x20an\x20interactive\x20terminal\x0a\x20\x202.\x20Commit\x20the\x20updated\x20encrypted\x20auth\x20file\x20to\x20git','\x20\x20Could\x20not\x20encrypt:\x20No\x20API\x20token\x20found.\x20Run:\x20ranger\x20setup\x20[token]','baseUrl','1517322BXCiHs','stringify','close','newPage','BEwac','utf-8','36XiFRAU','tjewN','goto','auth.json','config_write','\x20\x20\x20Update\x20your\x20authentication\x20as\x20needed.','\x0a📋\x20Authentication\x20Update','isTTY','ieYmi','1207116unrlWc','ftcbD','VPMeF','error','6otmzeI','allowInsecureLocalhost','✓\x20Updated\x20config:\x20','OetrF','stdin','launch','Saving\x20authentication\x20state...','browser_auth','newContext','ISSOk','contextOptions','settings.json','53495draPno','242775LhLVdl','catch','76126BrGrVo','rtNok','47796WZhsag','.\x20Run\x20first:\x20ranger\x20profile\x20add\x20','\x20\x20Run\x20ranger\x20setup\x20in\x20CI\x20to\x20decrypt\x20at\x20runtime.','log','extraHTTPHeaders','Browser\x20closed\x20before\x20authentication\x20was\x20saved.','trackPhaseStart','browser','tuGAm','860856OIdwpu'];_0x5bd9=function(){return _0x4c824c;};return _0x5bd9();}import{existsSync}from'fs';function _0x592f(_0x3be605,_0x294c40){_0x3be605=_0x3be605-0x1a8;const _0x5bd9d7=_0x5bd9();let _0x592fe5=_0x5bd9d7[_0x3be605];return _0x592fe5;}import{chromium}from'playwright';import{encrypt}from'./utils/crypto.js';import{getToken}from'./utils/keychain.js';import{buildBrowserOptionsFromSettings,getEnvDir,isEnvCi,resolveEnvVars}from'./utils/settings.js';import{addProfileSetupBanner}from'./utils/profileSetupBanner.js';export async function updateEnv(_0x3338d2,_0x1b6dad,_0x2ab4f){const _0x357fe8=_0x592f,_0x3e16b9={'BEWjF':function(_0xd05c92){return _0xd05c92();},'ieYmi':function(_0x248c6c,_0x3dc344){return _0x248c6c(_0x3dc344);},'rtNok':_0x357fe8(0x1d5),'mebvO':'.enc','VPMeF':function(_0x346bce,_0x210f9b){return _0x346bce(_0x210f9b);},'tjewN':function(_0x20b8fc,_0x4cf686,_0x1bc9e3){return _0x20b8fc(_0x4cf686,_0x1bc9e3);},'KtOCR':'utf-8','ilNyp':'string','kFDQv':_0x357fe8(0x1c3),'BEwac':_0x357fe8(0x1c2),'OetrF':'\x20\x20\x20When\x20you\x20are\x20done,\x20close\x20the\x20browser.\x0a','ISSOk':function(_0x2cec32,_0x374911){return _0x2cec32(_0x374911);},'JsTQp':function(_0x5edee6,_0x12e837){return _0x5edee6||_0x12e837;},'zcBtn':'This\x20can\x20happen\x20due\x20to\x20a\x20browser\x20compatibility\x20issue\x20on\x20some\x20systems.\x0a','QxEpK':function(_0x332313){return _0x332313();},'tuGAm':_0x357fe8(0x1b5),'ftcbD':'\x20\x20You\x20can\x20safely\x20commit\x20this\x20file\x20to\x20git.','FwYyr':_0x357fe8(0x1ac),'KZLiq':_0x357fe8(0x1d1),'lUCuw':function(_0x28abc7,_0x51dbfe){return _0x28abc7===_0x51dbfe;}},_0x4a8c71=_0x3e16b9[_0x357fe8(0x1c5)](getEnvDir,_0x3338d2),_0x4d3ec4=join(_0x4a8c71,_0x3e16b9[_0x357fe8(0x1a9)]),_0x25bb34=join(_0x4a8c71,_0x357fe8(0x1c0)),_0x4c6f0e=_0x25bb34+_0x3e16b9['mebvO'],_0x4a2f82=process[_0x357fe8(0x1ce)][_0x357fe8(0x1c4)]&&process['stdout'][_0x357fe8(0x1c4)];if(!_0x4a2f82)throw new Error(_0x357fe8(0x1b4));if(!_0x3e16b9[_0x357fe8(0x1c8)](existsSync,_0x4a8c71))throw new Error('Profile\x20\x22'+_0x3338d2+'\x22\x20not\x20found.\x20Run\x20first:\x20ranger\x20profile\x20add\x20'+_0x3338d2);if(!existsSync(_0x4d3ec4))throw new Error('Config\x20not\x20found\x20at\x20'+_0x4d3ec4+_0x357fe8(0x1ab)+_0x3338d2);const _0x29363f=await _0x3e16b9['tjewN'](readFile,_0x4d3ec4,_0x3e16b9['KtOCR']),_0x55b7b0=JSON['parse'](_0x29363f),_0xe4f5e2=resolveEnvVars(_0x55b7b0),_0x457844=typeof _0xe4f5e2[_0x357fe8(0x1b6)]===_0x3e16b9['ilNyp']?_0xe4f5e2['baseUrl']:undefined,_0xa752a=existsSync(_0x25bb34),_0x3c7f68=isEnvCi(_0x3338d2);_0x1b6dad?.[_0x357fe8(0x1b0)](_0x357fe8(0x1d1)),console['log'](_0x3e16b9['kFDQv']),console[_0x357fe8(0x1ad)]('\x20\x20\x20A\x20browser\x20will\x20open\x20with\x20your\x20existing\x20session\x20(if\x20any).'),console['log'](_0x3e16b9[_0x357fe8(0x1bb)]),console[_0x357fe8(0x1ad)](_0x3e16b9[_0x357fe8(0x1cd)]);const {launchOptions:_0x16a270,contextOptions:_0x37ceab}=buildBrowserOptionsFromSettings(_0xe4f5e2,{'headless':![],'storageStatePath':_0xa752a?_0x25bb34:undefined});_0xe4f5e2['setupHeaders']&&(_0x37ceab[_0x357fe8(0x1ae)]={..._0x37ceab[_0x357fe8(0x1ae)],..._0xe4f5e2['setupHeaders']});const _0x443be9=await chromium[_0x357fe8(0x1cf)](_0x16a270);let _0x2749ee=null;try{_0x2749ee=await _0x443be9[_0x357fe8(0x1d2)](_0x37ceab),await _0x3e16b9[_0x357fe8(0x1d3)](addProfileSetupBanner,_0x2749ee);const _0x278921=await _0x2749ee[_0x357fe8(0x1ba)]();await _0x278921[_0x357fe8(0x1bf)](_0x3e16b9['JsTQp'](_0x457844,'about:blank'));let _0x110c2b=![];await new Promise(_0x17005c=>{const _0x306cf1=_0x357fe8;_0x278921['on'](_0x306cf1(0x1b9),async()=>{const _0x2afa0c=_0x306cf1;try{console['log'](_0x2afa0c(0x1d0)),await _0x2749ee?.['storageState']({'path':_0x25bb34}),_0x110c2b=!![];}catch{}_0x3e16b9['BEWjF'](_0x17005c);});});if(!_0x110c2b){console['log']('\x0aThe\x20browser\x20closed\x20unexpectedly\x20before\x20authentication\x20could\x20be\x20saved.');!_0xe4f5e2['safeMode']&&(console['log'](_0x3e16b9['zcBtn']),console['log']('Enable\x20safe\x20mode\x20and\x20try\x20again:\x20ranger\x20profile\x20config\x20set\x20'+_0x3338d2+'\x20safeMode\x20true\x0a'));throw new Error(_0x357fe8(0x1af));}}finally{_0x2749ee&&await _0x2749ee[_0x357fe8(0x1b9)]()[_0x357fe8(0x1d8)](()=>{}),await _0x443be9['close']()['catch'](()=>{});}if(_0x3c7f68){const _0x182f2b=await readFile(_0x25bb34,_0x357fe8(0x1bc)),_0x2c7b36=await _0x3e16b9['QxEpK'](getToken);if(!_0x2c7b36)console[_0x357fe8(0x1c9)](_0x3e16b9[_0x357fe8(0x1b2)]),console['log']('✓\x20Auth\x20state\x20saved\x20to:\x20'+_0x25bb34);else{const _0x512acf=_0x3e16b9[_0x357fe8(0x1be)](encrypt,_0x182f2b,_0x2c7b36);await writeFile(_0x4c6f0e,_0x512acf),await _0x3e16b9['ISSOk'](unlink,_0x25bb34),console[_0x357fe8(0x1ad)]('✓\x20Encrypted\x20auth\x20saved\x20to:\x20'+_0x4c6f0e),console[_0x357fe8(0x1ad)](_0x3e16b9[_0x357fe8(0x1c7)]),console[_0x357fe8(0x1ad)](_0x3e16b9['FwYyr']);}}else console['log']('✓\x20Auth\x20state\x20saved\x20to:\x20'+_0x25bb34);_0x1b6dad?.['trackPhaseEnd'](_0x3e16b9['KZLiq']),_0x1b6dad?.[_0x357fe8(0x1b0)](_0x357fe8(0x1c1)),_0x55b7b0['browser']=_0x55b7b0[_0x357fe8(0x1b1)]||{},_0x55b7b0['browser'][_0x357fe8(0x1d4)]=_0x55b7b0['browser'][_0x357fe8(0x1d4)]||{},_0x55b7b0[_0x357fe8(0x1b1)]['contextOptions']['storageState']=_0x25bb34,_0x3e16b9['lUCuw'](_0x2ab4f?.[_0x357fe8(0x1cb)],!![])&&(_0x55b7b0['allowInsecureLocalhost']=!![]),await writeFile(_0x4d3ec4,JSON[_0x357fe8(0x1b8)](_0x55b7b0,null,0x2)),console['log'](_0x357fe8(0x1cc)+_0x4d3ec4),_0x1b6dad?.['trackPhaseEnd']('config_write'),console['log']('\x0a✅\x20Profile\x20\x22'+_0x3338d2+'\x22\x20authentication\x20updated');}
1
+ (function(_0x2de764,_0x1ef42f){const _0x18a9cb=_0x5d81,_0x3cd30d=_0x2de764();while(!![]){try{const _0x103462=-parseInt(_0x18a9cb(0x1d3))/0x1*(-parseInt(_0x18a9cb(0x1a2))/0x2)+parseInt(_0x18a9cb(0x1a8))/0x3*(-parseInt(_0x18a9cb(0x1c6))/0x4)+-parseInt(_0x18a9cb(0x1d5))/0x5*(-parseInt(_0x18a9cb(0x1b7))/0x6)+-parseInt(_0x18a9cb(0x1b1))/0x7+parseInt(_0x18a9cb(0x1c8))/0x8*(-parseInt(_0x18a9cb(0x1c5))/0x9)+parseInt(_0x18a9cb(0x1a3))/0xa*(-parseInt(_0x18a9cb(0x1ab))/0xb)+parseInt(_0x18a9cb(0x1ad))/0xc*(parseInt(_0x18a9cb(0x1bc))/0xd);if(_0x103462===_0x1ef42f)break;else _0x3cd30d['push'](_0x3cd30d['shift']());}catch(_0x53584d){_0x3cd30d['push'](_0x3cd30d['shift']());}}}(_0x1594,0x96cce));import{writeFile,readFile,unlink}from'fs/promises';import{join}from'path';import{existsSync}from'fs';import{chromium}from'playwright';function _0x1594(){const _0x2a9211=['\x20\x20\x20A\x20browser\x20will\x20open\x20with\x20your\x20existing\x20session\x20(if\x20any).','isTTY','541168BIGsgT','1889210pvpBKn','\x22\x20authentication\x20updated','bRTCS','goto','about:blank','3EqNQVE','trackPhaseStart','.\x20Run\x20first:\x20ranger\x20profile\x20add\x20','22aXyhSe','log','168zftUsx','\x20safeMode\x20true\x0a','baseUrl','\x20\x20Run\x20ranger\x20setup\x20in\x20CI\x20to\x20decrypt\x20at\x20runtime.','2153123AEHeui','newContext','stdout','storageState','extraHTTPHeaders','close','426XJLlPP','\x20\x20Could\x20not\x20encrypt:\x20No\x20API\x20token\x20found.\x20Run:\x20ranger\x20setup\x20[token]','dklZf','Profile\x20\x22','contextOptions','1583959RgLuaS','browser','error','launch','HluCZ','Config\x20not\x20found\x20at\x20','gWZZG','This\x20can\x20happen\x20due\x20to\x20a\x20browser\x20compatibility\x20issue\x20on\x20some\x20systems.\x0a','dJSIP','18RsWmAX','2789264HXjysA','setupHeaders','3957672EVvLys','browser_auth','\x20\x20\x20When\x20you\x20are\x20done,\x20close\x20the\x20browser.\x0a','trackPhaseEnd','safeMode','XiHlI','Browser\x20closed\x20before\x20authentication\x20was\x20saved.','yOwpv','\x20\x20You\x20can\x20safely\x20commit\x20this\x20file\x20to\x20git.','.enc','\x0a📋\x20Authentication\x20Update','2ARoyfz','lXxDW','52315WyNqNW','✓\x20Encrypted\x20auth\x20saved\x20to:\x20','ULjYj','utf-8'];_0x1594=function(){return _0x2a9211;};return _0x1594();}import{encrypt}from'./utils/crypto.js';function _0x5d81(_0x29f955,_0x373fbb){_0x29f955=_0x29f955-0x1a2;const _0x159463=_0x1594();let _0x5d81d0=_0x159463[_0x29f955];return _0x5d81d0;}import{getToken}from'./utils/keychain.js';import{buildBrowserOptionsFromSettings,getEnvDir,isEnvCi,resolveEnvVars}from'./utils/settings.js';import{addProfileSetupBanner}from'./utils/profileSetupBanner.js';export async function updateEnv(_0x25bd87,_0x10710a,_0x34f043){const _0x53e779=_0x5d81,_0x432cc1={'caeyF':_0x53e779(0x1b6),'ULjYj':function(_0x3de287,_0xbbbf52){return _0x3de287(_0xbbbf52);},'lXxDW':function(_0xffb940,_0x90db2c,_0x2b5825){return _0xffb940(_0x90db2c,_0x2b5825);},'XiHlI':'settings.json','xseGM':'auth.json','YznPh':function(_0x3fd136,_0x49efa4){return _0x3fd136+_0x49efa4;},'dklZf':_0x53e779(0x1d8),'yOwpv':function(_0x308490,_0x3b63db){return _0x308490(_0x3b63db);},'uuTdk':function(_0x46c6c2,_0x532943){return _0x46c6c2(_0x532943);},'HluCZ':_0x53e779(0x1c9),'hBzNh':_0x53e779(0x1d2),'gWZZG':_0x53e779(0x1d9),'bkurp':_0x53e779(0x1ca),'bRTCS':function(_0x51c0aa,_0x30da06){return _0x51c0aa||_0x30da06;},'dJSIP':_0x53e779(0x1ce),'vYuau':function(_0x29d316,_0x1dff21,_0x3c6efd){return _0x29d316(_0x1dff21,_0x3c6efd);},'qPDgT':_0x53e779(0x1b0),'tJMsX':'config_write'},_0x4c37e9=_0x432cc1[_0x53e779(0x1d7)](getEnvDir,_0x25bd87),_0x57ac40=_0x432cc1['lXxDW'](join,_0x4c37e9,_0x432cc1[_0x53e779(0x1cd)]),_0x5918a0=_0x432cc1[_0x53e779(0x1d4)](join,_0x4c37e9,_0x432cc1['xseGM']),_0x114097=_0x432cc1['YznPh'](_0x5918a0,_0x53e779(0x1d1)),_0x5f3692=process['stdin'][_0x53e779(0x1da)]&&process[_0x53e779(0x1b3)][_0x53e779(0x1da)];if(!_0x5f3692)throw new Error('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');if(!_0x432cc1['ULjYj'](existsSync,_0x4c37e9))throw new Error(_0x53e779(0x1ba)+_0x25bd87+'\x22\x20not\x20found.\x20Run\x20first:\x20ranger\x20profile\x20add\x20'+_0x25bd87);if(!_0x432cc1[_0x53e779(0x1d7)](existsSync,_0x57ac40))throw new Error(_0x53e779(0x1c1)+_0x57ac40+_0x53e779(0x1aa)+_0x25bd87);const _0x1c8d50=await _0x432cc1['lXxDW'](readFile,_0x57ac40,_0x432cc1[_0x53e779(0x1b9)]),_0x340f4a=JSON['parse'](_0x1c8d50),_0x4bbc25=resolveEnvVars(_0x340f4a),_0x1cca55=typeof _0x4bbc25[_0x53e779(0x1af)]==='string'?_0x4bbc25[_0x53e779(0x1af)]:undefined,_0x2e92ed=_0x432cc1['yOwpv'](existsSync,_0x5918a0),_0x5f4ccc=_0x432cc1['uuTdk'](isEnvCi,_0x25bd87);_0x10710a?.['trackPhaseStart'](_0x432cc1[_0x53e779(0x1c0)]),console['log'](_0x432cc1['hBzNh']),console['log'](_0x432cc1[_0x53e779(0x1c2)]),console[_0x53e779(0x1ac)]('\x20\x20\x20Update\x20your\x20authentication\x20as\x20needed.'),console[_0x53e779(0x1ac)](_0x432cc1['bkurp']);const {launchOptions:_0x375734,contextOptions:_0x53e713}=_0x432cc1['lXxDW'](buildBrowserOptionsFromSettings,_0x4bbc25,{'headless':![],'storageStatePath':_0x2e92ed?_0x5918a0:undefined});_0x4bbc25[_0x53e779(0x1c7)]&&(_0x53e713[_0x53e779(0x1b5)]={..._0x53e713['extraHTTPHeaders'],..._0x4bbc25[_0x53e779(0x1c7)]});const _0x1f1802=await chromium[_0x53e779(0x1bf)](_0x375734);let _0x99a933=null;try{_0x99a933=await _0x1f1802[_0x53e779(0x1b2)](_0x53e713),await _0x432cc1[_0x53e779(0x1cf)](addProfileSetupBanner,_0x99a933);const _0x3637c8=await _0x99a933['newPage']();await _0x3637c8[_0x53e779(0x1a6)](_0x432cc1[_0x53e779(0x1a5)](_0x1cca55,_0x53e779(0x1a7)));let _0xe2a091=![];await new Promise(_0x3fc052=>{const _0x385bdb={'PifRd':function(_0x305727){return _0x305727();}};_0x3637c8['on'](_0x432cc1['caeyF'],async()=>{const _0x19e0d5=_0x5d81;try{console[_0x19e0d5(0x1ac)]('Saving\x20authentication\x20state...'),await _0x99a933?.[_0x19e0d5(0x1b4)]({'path':_0x5918a0}),_0xe2a091=!![];}catch{}_0x385bdb['PifRd'](_0x3fc052);});});if(!_0xe2a091){console[_0x53e779(0x1ac)]('\x0aThe\x20browser\x20closed\x20unexpectedly\x20before\x20authentication\x20could\x20be\x20saved.');!_0x4bbc25[_0x53e779(0x1cc)]&&(console[_0x53e779(0x1ac)](_0x53e779(0x1c3)),console[_0x53e779(0x1ac)]('Enable\x20safe\x20mode\x20and\x20try\x20again:\x20ranger\x20profile\x20config\x20set\x20'+_0x25bd87+_0x53e779(0x1ae)));throw new Error(_0x432cc1[_0x53e779(0x1c4)]);}}finally{_0x99a933&&await _0x99a933['close']()['catch'](()=>{}),await _0x1f1802[_0x53e779(0x1b6)]()['catch'](()=>{});}if(_0x5f4ccc){const _0x4be7d3=await _0x432cc1[_0x53e779(0x1d4)](readFile,_0x5918a0,_0x432cc1[_0x53e779(0x1b9)]),_0x590314=await getToken();if(!_0x590314)console[_0x53e779(0x1be)](_0x53e779(0x1b8)),console[_0x53e779(0x1ac)]('✓\x20Auth\x20state\x20saved\x20to:\x20'+_0x5918a0);else{const _0x5c5115=_0x432cc1['vYuau'](encrypt,_0x4be7d3,_0x590314);await _0x432cc1['vYuau'](writeFile,_0x114097,_0x5c5115),await unlink(_0x5918a0),console[_0x53e779(0x1ac)](_0x53e779(0x1d6)+_0x114097),console[_0x53e779(0x1ac)](_0x53e779(0x1d0)),console[_0x53e779(0x1ac)](_0x432cc1['qPDgT']);}}else console['log']('✓\x20Auth\x20state\x20saved\x20to:\x20'+_0x5918a0);_0x10710a?.[_0x53e779(0x1cb)](_0x432cc1[_0x53e779(0x1c0)]),_0x10710a?.[_0x53e779(0x1a9)](_0x432cc1['tJMsX']),_0x340f4a['browser']=_0x340f4a[_0x53e779(0x1bd)]||{},_0x340f4a['browser']['contextOptions']=_0x340f4a['browser'][_0x53e779(0x1bb)]||{},_0x340f4a['browser'][_0x53e779(0x1bb)]['storageState']=_0x5918a0,_0x34f043?.['allowInsecureLocalhost']===!![]&&(_0x340f4a['allowInsecureLocalhost']=!![]),await writeFile(_0x57ac40,JSON['stringify'](_0x340f4a,null,0x2)),console['log']('✓\x20Updated\x20config:\x20'+_0x57ac40),_0x10710a?.[_0x53e779(0x1cb)](_0x432cc1['tJMsX']),console['log']('\x0a✅\x20Profile\x20\x22'+_0x25bd87+_0x53e779(0x1a4));}
@@ -1 +1 @@
1
- (function(_0xb8be55,_0x3b2296){const _0x5e8cd1=_0x2cdf,_0x2bb64c=_0xb8be55();while(!![]){try{const _0x1e507d=-parseInt(_0x5e8cd1(0x1ba))/0x1*(-parseInt(_0x5e8cd1(0x1af))/0x2)+-parseInt(_0x5e8cd1(0x1bc))/0x3*(parseInt(_0x5e8cd1(0x1ae))/0x4)+-parseInt(_0x5e8cd1(0x1b0))/0x5+-parseInt(_0x5e8cd1(0x1bb))/0x6+parseInt(_0x5e8cd1(0x1bd))/0x7*(-parseInt(_0x5e8cd1(0x1ad))/0x8)+parseInt(_0x5e8cd1(0x1b1))/0x9*(-parseInt(_0x5e8cd1(0x1b8))/0xa)+parseInt(_0x5e8cd1(0x1b7))/0xb*(parseInt(_0x5e8cd1(0x1b5))/0xc);if(_0x1e507d===_0x3b2296)break;else _0x2bb64c['push'](_0x2bb64c['shift']());}catch(_0x3ed95d){_0x2bb64c['push'](_0x2bb64c['shift']());}}}(_0x33ac,0xdb530));import{join}from'path';import{existsSync}from'fs';function _0x33ac(){const _0x122342=['10307ONOBYi','730WjIJtt','log','4yjOUOn','10212330KrgPjD','18NaHmGQ','4480yUkSXO','9496rqehnG','179836Hnklmc','538402rtlEZV','3384120hEodsW','48978JaPOlb','fHYQE','settings.json','Config\x20not\x20found\x20at\x20','46452UpMOoH','\x0a✓\x20Now\x20using\x20profile\x20\x22'];_0x33ac=function(){return _0x122342;};return _0x33ac();}import{getEnvDir}from'./utils/settings.js';import{writeActiveProfileName}from'./utils/activeProfile.js';function _0x2cdf(_0xc0939d,_0xc42664){_0xc0939d=_0xc0939d-0x1ad;const _0x33acc5=_0x33ac();let _0x2cdfbc=_0x33acc5[_0xc0939d];return _0x2cdfbc;}export async function useEnv(_0x4555e6){const _0x56caf5=_0x2cdf,_0x54f4c2={'gueQX':function(_0x45d585,_0x568f2a){return _0x45d585(_0x568f2a);},'fHYQE':function(_0x175085,_0x526daa,_0x3b0b68){return _0x175085(_0x526daa,_0x3b0b68);}},_0xbe561e=_0x54f4c2['gueQX'](getEnvDir,_0x4555e6),_0x461486=_0x54f4c2[_0x56caf5(0x1b2)](join,_0xbe561e,_0x56caf5(0x1b3));if(!_0x54f4c2['gueQX'](existsSync,_0xbe561e))throw new Error('Profile\x20\x22'+_0x4555e6+'\x22\x20not\x20found.\x20Run\x20first:\x20ranger\x20profile\x20add\x20'+_0x4555e6);if(!existsSync(_0x461486))throw new Error(_0x56caf5(0x1b4)+_0x461486+'.\x20Run\x20first:\x20ranger\x20profile\x20add\x20'+_0x4555e6);await writeActiveProfileName(_0x4555e6),console[_0x56caf5(0x1b9)](_0x56caf5(0x1b6)+_0x4555e6+'\x22');}
1
+ (function(_0x41b8fb,_0x4f8e77){const _0x261b84=_0x12a5,_0x239b80=_0x41b8fb();while(!![]){try{const _0x82e4b2=parseInt(_0x261b84(0xcb))/0x1+parseInt(_0x261b84(0xc7))/0x2*(-parseInt(_0x261b84(0xc3))/0x3)+-parseInt(_0x261b84(0xc1))/0x4*(-parseInt(_0x261b84(0xcc))/0x5)+-parseInt(_0x261b84(0xc4))/0x6+parseInt(_0x261b84(0xbf))/0x7*(parseInt(_0x261b84(0xc0))/0x8)+parseInt(_0x261b84(0xc9))/0x9+-parseInt(_0x261b84(0xc8))/0xa*(parseInt(_0x261b84(0xc5))/0xb);if(_0x82e4b2===_0x4f8e77)break;else _0x239b80['push'](_0x239b80['shift']());}catch(_0x1f928a){_0x239b80['push'](_0x239b80['shift']());}}}(_0x2596,0x4258d));import{join}from'path';function _0x2596(){const _0xe33fc=['616440vLXqAh','119823acybUr','Profile\x20\x22','48TNNAzC','1040VcjCPa','2181474MwGUbC','BOkjI','413817voDaKT','115IOEoaw','Config\x20not\x20found\x20at\x20','828562WhsgDV','32eacVzk','75784UxMVMa','settings.json','7257hstulK'];_0x2596=function(){return _0xe33fc;};return _0x2596();}import{existsSync}from'fs';import{getEnvDir}from'./utils/settings.js';import{writeActiveProfileName}from'./utils/activeProfile.js';function _0x12a5(_0x1b3d3b,_0x54f76d){_0x1b3d3b=_0x1b3d3b-0xbf;const _0x25969d=_0x2596();let _0x12a5bd=_0x25969d[_0x1b3d3b];return _0x12a5bd;}export async function useEnv(_0xfbbd6f){const _0x4ffbf6=_0x12a5,_0x3d54ca={'sCWYh':function(_0x53800f,_0x406041,_0x2217b5){return _0x53800f(_0x406041,_0x2217b5);},'BOkjI':function(_0x9321c1,_0x52a5cb){return _0x9321c1(_0x52a5cb);}},_0x13cf6f=getEnvDir(_0xfbbd6f),_0x44e7b5=_0x3d54ca['sCWYh'](join,_0x13cf6f,_0x4ffbf6(0xc2));if(!_0x3d54ca[_0x4ffbf6(0xca)](existsSync,_0x13cf6f))throw new Error(_0x4ffbf6(0xc6)+_0xfbbd6f+'\x22\x20not\x20found.\x20Run\x20first:\x20ranger\x20profile\x20add\x20'+_0xfbbd6f);if(!_0x3d54ca['BOkjI'](existsSync,_0x44e7b5))throw new Error(_0x4ffbf6(0xcd)+_0x44e7b5+'.\x20Run\x20first:\x20ranger\x20profile\x20add\x20'+_0xfbbd6f);await writeActiveProfileName(_0xfbbd6f),console['log']('\x0a✓\x20Now\x20using\x20profile\x20\x22'+_0xfbbd6f+'\x22');}