@ranger-testing/ranger-cli 2.3.2 → 2.4.0

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
Files changed (70) hide show
  1. package/build/cli.js +1 -1
  2. package/build/commands/addEnv.js +1 -1
  3. package/build/commands/authEncrypt.js +1 -1
  4. package/build/commands/clean.js +1 -1
  5. package/build/commands/config.js +1 -1
  6. package/build/commands/env.js +1 -1
  7. package/build/commands/feature.js +1 -1
  8. package/build/commands/hook.js +1 -1
  9. package/build/commands/hooks/autoPrompt.js +1 -1
  10. package/build/commands/hooks/disable.js +1 -1
  11. package/build/commands/hooks/enable.js +1 -1
  12. package/build/commands/hooks/exitPlanMode.js +1 -1
  13. package/build/commands/hooks/index.js +1 -1
  14. package/build/commands/hooks/output.js +1 -1
  15. package/build/commands/hooks/planReminder.js +1 -1
  16. package/build/commands/hooks/planStart.js +1 -1
  17. package/build/commands/hooks/postEdit.js +1 -1
  18. package/build/commands/hooks/preCompact.js +1 -1
  19. package/build/commands/hooks/sessionEnd.js +1 -1
  20. package/build/commands/hooks/sessionStart.js +1 -1
  21. package/build/commands/hooks/stopHook.js +1 -1
  22. package/build/commands/index.js +1 -1
  23. package/build/commands/login.js +1 -1
  24. package/build/commands/setup/claude.js +1 -1
  25. package/build/commands/setup/opencode.js +1 -1
  26. package/build/commands/setupCi.js +1 -1
  27. package/build/commands/skillup.js +1 -1
  28. package/build/commands/start.js +1 -1
  29. package/build/commands/status.js +1 -1
  30. package/build/commands/update.js +1 -1
  31. package/build/commands/updateEnv.js +1 -1
  32. package/build/commands/useEnv.js +1 -1
  33. package/build/commands/utils/activeProfile.js +1 -1
  34. package/build/commands/utils/agentEnv.js +1 -1
  35. package/build/commands/utils/browserSessionsApi.js +1 -1
  36. package/build/commands/utils/claudeConfig.js +1 -1
  37. package/build/commands/utils/claudePlugin.js +1 -1
  38. package/build/commands/utils/crypto.js +1 -1
  39. package/build/commands/utils/desirePathLog.js +1 -1
  40. package/build/commands/utils/deviceAuth.js +1 -1
  41. package/build/commands/utils/environment.js +1 -1
  42. package/build/commands/utils/featureApi.js +1 -1
  43. package/build/commands/utils/featureReportGenerator.js +1 -1
  44. package/build/commands/utils/fixWebmDuration.js +1 -1
  45. package/build/commands/utils/git.js +1 -1
  46. package/build/commands/utils/keychain.js +1 -1
  47. package/build/commands/utils/localAgentInstallationsApi.js +1 -1
  48. package/build/commands/utils/mcpImageBase64.js +1 -1
  49. package/build/commands/utils/model.js +1 -1
  50. package/build/commands/utils/opencodeConfig.js +1 -1
  51. package/build/commands/utils/playwrightCli.js +1 -1
  52. package/build/commands/utils/profileMessages.js +1 -1
  53. package/build/commands/utils/profileSetupBanner.js +1 -1
  54. package/build/commands/utils/rangerConfig.js +1 -1
  55. package/build/commands/utils/rangerRoot.js +1 -1
  56. package/build/commands/utils/reportGenerator.js +1 -1
  57. package/build/commands/utils/retry.js +1 -1
  58. package/build/commands/utils/sessionCache.js +1 -1
  59. package/build/commands/utils/settings.js +1 -1
  60. package/build/commands/utils/skillContent.js +1 -1
  61. package/build/commands/utils/skills.js +1 -1
  62. package/build/commands/utils/stitchWebmFiles.js +1 -1
  63. package/build/commands/utils/telemetry.js +1 -1
  64. package/build/commands/utils/traceSnapshotMapper.js +1 -1
  65. package/build/commands/utils/userApi.js +1 -1
  66. package/build/commands/utils/version.js +1 -1
  67. package/build/commands/verifyFeature.js +1 -1
  68. package/build/commands/verifyFeatureCli.js +1 -1
  69. package/build/commands/verifyInBrowser.js +1 -1
  70. package/package.json +1 -1
@@ -1 +1 @@
1
- (function(_0x2d8413,_0x3f8e7f){const _0x3ebb7c=_0x4685,_0x4fe2a2=_0x2d8413();while(!![]){try{const _0x436b12=-parseInt(_0x3ebb7c(0x10d))/0x1+-parseInt(_0x3ebb7c(0x10b))/0x2*(-parseInt(_0x3ebb7c(0x115))/0x3)+parseInt(_0x3ebb7c(0x109))/0x4+parseInt(_0x3ebb7c(0x117))/0x5+parseInt(_0x3ebb7c(0x10e))/0x6+parseInt(_0x3ebb7c(0x116))/0x7*(parseInt(_0x3ebb7c(0x113))/0x8)+parseInt(_0x3ebb7c(0x103))/0x9*(-parseInt(_0x3ebb7c(0x107))/0xa);if(_0x436b12===_0x3f8e7f)break;else _0x4fe2a2['push'](_0x4fe2a2['shift']());}catch(_0x14f92f){_0x4fe2a2['push'](_0x4fe2a2['shift']());}}}(_0xfdad,0x9574e));function _0xfdad(){const _0x4d5a85=['963436raQkiM','6011520ddYgMa','log','NQLzu','IlAVg','success','56jOroUc','session_id','1553190rRnetJ','809851TlcrfS','5354385fgWskT','13621806wYLLMM','iRHjI','qllTA','DasjZ','20FBIKRg','JFYYs','2738280SfTDmw','main','4HmGLPm','trackCommandStart'];_0xfdad=function(){return _0x4d5a85;};return _0xfdad();}import{appendFile}from'fs/promises';import{initBranchTracking,shouldAutoEnableAfterClear,autoEnableAfterClear,isSessionEnabled,getCurrentBranch}from'../utils/sessionCache.js';import{createTelemetryCollector}from'../utils/telemetry.js';function _0x4685(_0x2be0fb,_0x134fd7){_0x2be0fb=_0x2be0fb-0x103;const _0xfdad23=_0xfdad();let _0x468582=_0xfdad23[_0x2be0fb];return _0x468582;}const RANGER_AUTO_ENABLED_PROMPT='=================================================================\x0a\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20🚨\x20RANGER\x20IS\x20ACTIVE\x20🚨\x0a=================================================================\x0a\x0aThis\x20session\x20has\x20Ranger\x20ENABLED.\x20Before\x20doing\x20ANYTHING\x20else:\x0a\x0a1.\x20**READ\x20the\x20/ranger\x20skill\x20FIRST**\x20-\x20Run\x20the\x20skill\x20to\x20understand\x20the\x20required\x20workflow\x20for\x20UI\x20features\x0a\x0a2.\x20**Check\x20for\x20existing\x20feature\x20reviews**\x20-\x20Run\x20`ranger\x20list`\x20to\x20see\x20if\x20there\x27s\x20an\x20in-progress\x20feature\x20review\x20to\x20resume\x0a\x0a3.\x20**For\x20ANY\x20UI\x20work**:\x20You\x20MUST\x20either:\x0a\x20\x20\x20-\x20Resume\x20an\x20existing\x20feature\x20review:\x20`ranger\x20resume\x20<id>`\x0a\x20\x20\x20-\x20Create\x20a\x20new\x20feature\x20review:\x20`ranger\x20create\x20\x22<name>\x22\x20-d\x20\x22<desc>\x22\x20-c\x20\x22<scenario>\x22`\x0a\x0a4.\x20**If\x20resuming\x20a\x20feature\x20review\x20with\x20reviewer\x20comments**:\x20Run\x20`ranger\x20get-review`\x20to\x20see\x20what\x20reviewers\x20want\x20fixed\x20before\x20making\x20code\x20changes\x0a\x0a=================================================================';export async function sessionStart(_0x33b3cd){const _0xeb024a=_0x4685,_0x2cd485={'IlAVg':'source','LeylV':function(_0x2aac7b,_0x2ebde2){return _0x2aac7b&&_0x2ebde2;},'NQLzu':function(_0x475c72,_0x53f575,_0x661be7){return _0x475c72(_0x53f575,_0x661be7);},'iRHjI':function(_0x482e42,_0x6247a){return _0x482e42(_0x6247a);},'DasjZ':'hook:session-start','qllTA':_0xeb024a(0x10a),'yxVEK':'SessionStart','JFYYs':function(_0x2a5301,_0x45df2b){return _0x2a5301+_0x45df2b;}};let _0x3c53f0=_0x33b3cd||'',_0x35123a;if(!_0x33b3cd){let _0x226e1c='';for await(const _0x164fa6 of process['stdin']){_0x226e1c+=_0x164fa6;}try{const _0x4ec6be=JSON['parse'](_0x226e1c);_0x3c53f0=_0x4ec6be[_0xeb024a(0x114)]||'',_0x35123a=_0x4ec6be[_0x2cd485[_0xeb024a(0x111)]];}catch{}const _0x11559b=process['env']['CLAUDE_ENV_FILE'];if(_0x2cd485['LeylV'](_0x11559b,_0x3c53f0))try{await _0x2cd485[_0xeb024a(0x110)](appendFile,_0x11559b,'export\x20CLAUDE_SESSION_ID=\x22'+_0x3c53f0+'\x22\x0a');}catch{}}if(_0x3c53f0){shouldAutoEnableAfterClear(_0x35123a)&&_0x2cd485[_0xeb024a(0x104)](autoEnableAfterClear,_0x3c53f0);initBranchTracking(_0x3c53f0);const _0x3443a1=isSessionEnabled(_0x3c53f0);try{const _0x36b228=createTelemetryCollector(_0x2cd485[_0xeb024a(0x106)]);await _0x36b228[_0xeb024a(0x10c)]({'sessionId':_0x3c53f0,'hooksEnabled':_0x3443a1}),await _0x36b228['trackCommandEnd'](_0xeb024a(0x112));}catch{}if(_0x3443a1){const _0x57a4cb=getCurrentBranch(),_0x2fd631=_0x57a4cb&&_0x57a4cb!==_0x2cd485[_0xeb024a(0x105)]&&_0x57a4cb!=='master'?'\x20(Branch:\x20'+_0x57a4cb+')':'',_0x3223dc={'hookSpecificOutput':{'hookEventName':_0x2cd485['yxVEK'],'additionalContext':_0x2cd485[_0xeb024a(0x108)](RANGER_AUTO_ENABLED_PROMPT,_0x2fd631)}};console[_0xeb024a(0x10f)](JSON['stringify'](_0x3223dc));}}}
1
+ const _0x120a25=_0x3b01;(function(_0x3f1f0a,_0x1e031c){const _0x4a5542=_0x3b01,_0x7e2f5c=_0x3f1f0a();while(!![]){try{const _0x3b5ab1=parseInt(_0x4a5542(0x1aa))/0x1*(parseInt(_0x4a5542(0x1b4))/0x2)+parseInt(_0x4a5542(0x1a6))/0x3*(parseInt(_0x4a5542(0x1af))/0x4)+parseInt(_0x4a5542(0x1a5))/0x5*(parseInt(_0x4a5542(0x1ac))/0x6)+parseInt(_0x4a5542(0x1a8))/0x7*(parseInt(_0x4a5542(0x1b3))/0x8)+-parseInt(_0x4a5542(0x1ae))/0x9*(parseInt(_0x4a5542(0x1bb))/0xa)+parseInt(_0x4a5542(0x1ab))/0xb+-parseInt(_0x4a5542(0x1b0))/0xc;if(_0x3b5ab1===_0x1e031c)break;else _0x7e2f5c['push'](_0x7e2f5c['shift']());}catch(_0x5369e0){_0x7e2f5c['push'](_0x7e2f5c['shift']());}}}(_0x4a97,0x9cfca));import{appendFile}from'fs/promises';import{initBranchTracking,shouldAutoEnableAfterClear,autoEnableAfterClear,isSessionEnabled,getCurrentBranch}from'../utils/sessionCache.js';import{createTelemetryCollector}from'../utils/telemetry.js';const RANGER_AUTO_ENABLED_PROMPT=_0x120a25(0x1a3);function _0x4a97(){const _0x19d2f7=['master','dCprt','rQhcO','hook:session-start','2646790zFgxbE','=================================================================\x0a\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20🚨\x20RANGER\x20IS\x20ACTIVE\x20🚨\x0a=================================================================\x0a\x0aThis\x20session\x20has\x20Ranger\x20ENABLED.\x20Before\x20doing\x20ANYTHING\x20else:\x0a\x0a1.\x20**READ\x20the\x20/ranger\x20skill\x20FIRST**\x20-\x20Run\x20the\x20skill\x20to\x20understand\x20the\x20required\x20workflow\x20for\x20UI\x20features\x0a\x0a2.\x20**Check\x20for\x20existing\x20feature\x20reviews**\x20-\x20Run\x20`ranger\x20list`\x20to\x20see\x20if\x20there\x27s\x20an\x20in-progress\x20feature\x20review\x20to\x20resume\x0a\x0a3.\x20**For\x20ANY\x20UI\x20work**:\x20You\x20MUST\x20either:\x0a\x20\x20\x20-\x20Resume\x20an\x20existing\x20feature\x20review:\x20`ranger\x20resume\x20<id>`\x0a\x20\x20\x20-\x20Create\x20a\x20new\x20feature\x20review:\x20`ranger\x20create\x20\x22<name>\x22\x20-d\x20\x22<desc>\x22\x20-c\x20\x22<scenario>\x22`\x0a\x0a4.\x20**If\x20resuming\x20a\x20feature\x20review\x20with\x20reviewer\x20comments**:\x20Run\x20`ranger\x20get-review`\x20to\x20see\x20what\x20reviewers\x20want\x20fixed\x20before\x20making\x20code\x20changes\x0a\x0a=================================================================','\x20(Branch:\x20','1075880smkHzX','449706JyIYVy','trackCommandStart','1047529FilJHO','CLAUDE_ENV_FILE','117yazSVc','2054547qrbRee','18hzNUdd','fRUkr','27QaSQjw','32eCHuCT','25395708pQpZjy','main','log','48IASlqB','10666EcZGsH','rGybf','Onuur'];_0x4a97=function(){return _0x19d2f7;};return _0x4a97();}function _0x3b01(_0x594ddc,_0x3cb1c9){_0x594ddc=_0x594ddc-0x1a3;const _0x4a970f=_0x4a97();let _0x3b0114=_0x4a970f[_0x594ddc];return _0x3b0114;}export async function sessionStart(_0x58b6a7){const _0x16dd55=_0x120a25,_0x551e54={'IekJu':'session_id','WiryR':'source','hcZzn':function(_0x19e2e1,_0x43c87c){return _0x19e2e1&&_0x43c87c;},'Onuur':function(_0x819633,_0x5d6ded){return _0x819633(_0x5d6ded);},'rQhcO':_0x16dd55(0x1ba),'xoxRB':function(_0x59cccb){return _0x59cccb();},'rGybf':_0x16dd55(0x1b1),'fRUkr':function(_0x42e48f,_0x3ba249){return _0x42e48f!==_0x3ba249;},'fyYqt':_0x16dd55(0x1b7),'dCprt':'SessionStart','WKMwG':function(_0x281de4,_0x469f06){return _0x281de4+_0x469f06;}};let _0x3c0f19=_0x58b6a7||'',_0x16452c;if(!_0x58b6a7){let _0x4e2bcb='';for await(const _0x33c278 of process['stdin']){_0x4e2bcb+=_0x33c278;}try{const _0x2eceb9=JSON['parse'](_0x4e2bcb);_0x3c0f19=_0x2eceb9[_0x551e54['IekJu']]||'',_0x16452c=_0x2eceb9[_0x551e54['WiryR']];}catch{}const _0x31b96d=process['env'][_0x16dd55(0x1a9)];if(_0x551e54['hcZzn'](_0x31b96d,_0x3c0f19))try{await appendFile(_0x31b96d,'export\x20CLAUDE_SESSION_ID=\x22'+_0x3c0f19+'\x22\x0a');}catch{}}if(_0x3c0f19){_0x551e54[_0x16dd55(0x1b6)](shouldAutoEnableAfterClear,_0x16452c)&&autoEnableAfterClear(_0x3c0f19);initBranchTracking(_0x3c0f19);const _0x467cdb=isSessionEnabled(_0x3c0f19);try{const _0x6a0e8a=_0x551e54['Onuur'](createTelemetryCollector,_0x551e54[_0x16dd55(0x1b9)]);await _0x6a0e8a[_0x16dd55(0x1a7)]({'sessionId':_0x3c0f19,'hooksEnabled':_0x467cdb}),await _0x6a0e8a['trackCommandEnd']('success');}catch{}if(_0x467cdb){const _0x119132=_0x551e54['xoxRB'](getCurrentBranch),_0x553404=_0x119132&&_0x119132!==_0x551e54[_0x16dd55(0x1b5)]&&_0x551e54[_0x16dd55(0x1ad)](_0x119132,_0x551e54['fyYqt'])?_0x16dd55(0x1a4)+_0x119132+')':'',_0x43e7d6={'hookSpecificOutput':{'hookEventName':_0x551e54[_0x16dd55(0x1b8)],'additionalContext':_0x551e54['WKMwG'](RANGER_AUTO_ENABLED_PROMPT,_0x553404)}};console[_0x16dd55(0x1b2)](JSON['stringify'](_0x43e7d6));}}}
@@ -1 +1 @@
1
- (function(_0xba328b,_0x5a8548){const _0x241fa9=_0xfe9a,_0x1529b6=_0xba328b();while(!![]){try{const _0x117c50=parseInt(_0x241fa9(0xf7))/0x1+parseInt(_0x241fa9(0x10b))/0x2+-parseInt(_0x241fa9(0x101))/0x3+parseInt(_0x241fa9(0xfd))/0x4+-parseInt(_0x241fa9(0xfb))/0x5+-parseInt(_0x241fa9(0xf5))/0x6+parseInt(_0x241fa9(0x103))/0x7;if(_0x117c50===_0x5a8548)break;else _0x1529b6['push'](_0x1529b6['shift']());}catch(_0x2ebaa0){_0x1529b6['push'](_0x1529b6['shift']());}}}(_0x3adf,0x660b9));import{getToken}from'../utils/keychain.js';import{getFeature,concludeSession}from'../utils/featureApi.js';function _0xfe9a(_0x3603e6,_0x5cccb7){_0x3603e6=_0x3603e6-0xf5;const _0x3adf0c=_0x3adf();let _0xfe9ae4=_0x3adf0c[_0x3603e6];return _0xfe9ae4;}import{getSessionEntry,shouldShowStopReminder}from'../utils/sessionCache.js';import{getEnabledHookContext}from'./output.js';import{createTelemetryCollector}from'../utils/telemetry.js';function _0x3adf(){const _0x56c5fd=['2980215nujMlA','sessionId','773468hrWdmn','featureId','https://dashboard.ranger.net/features/','log','1867026YHjdwE','currentSessionId','7757680VDSQbW','incomplete','ZJDLT','HpgDT','success','some','trackCommandStart','blocked','965828tSHvGn','2438820fliOzz','status','258311anAduu','filter','closed','hook:stop'];_0x3adf=function(){return _0x56c5fd;};return _0x3adf();}export async function stopHook(_0x190a15){const _0x1a2ab0=_0xfe9a,_0x50b655={'ZJDLT':function(_0x1b1394,_0x28ea22){return _0x1b1394(_0x28ea22);},'Bysqy':function(_0x2ec679,_0x489de7,_0x2e7453,_0x4f9f9f){return _0x2ec679(_0x489de7,_0x2e7453,_0x4f9f9f);},'MBjAW':function(_0x3bf3fd){return _0x3bf3fd();},'HpgDT':function(_0x7a3934,_0x1108ad){return _0x7a3934&&_0x1108ad;},'gqDhP':function(_0x5f27a0,_0x3b7162,_0x447dac,_0x1ba9bf){return _0x5f27a0(_0x3b7162,_0x447dac,_0x1ba9bf);}},_0x4db23f=await _0x50b655['ZJDLT'](getEnabledHookContext,_0x190a15),_0x16ec79=_0x4db23f?.[_0x1a2ab0(0xfc)]??null;let _0x4513e6=!![];if(!_0x16ec79){await _0x50b655['Bysqy'](trackStop,_0x16ec79,![],_0x4513e6);return;}try{const _0x58b0bc=_0x50b655[_0x1a2ab0(0x105)](getSessionEntry,_0x16ec79);if(!_0x58b0bc){await trackStop(_0x16ec79,!![],_0x4513e6);return;}const _0x3e266d=await _0x50b655['MBjAW'](getToken),_0xc86170=_0x1a2ab0(0xff)+_0x58b0bc[_0x1a2ab0(0xfe)];let _0xe368a9=null,_0x166ead=![],_0x2eac1b=![];if(_0x3e266d)try{const _0x17ba72=await getFeature(_0x58b0bc['featureId']);_0xe368a9=_0x17ba72[_0x1a2ab0(0x102)]??null;const _0xfe9ece=_0x17ba72['checklistItems'][_0x1a2ab0(0xf8)](_0x2890e5=>_0x2890e5[_0x1a2ab0(0xfc)]===_0xe368a9);_0x166ead=_0xfe9ece[_0x1a2ab0(0x108)](_0x554820=>_0x554820[_0x1a2ab0(0xf6)]!=='verified'&&_0x554820[_0x1a2ab0(0xf6)]!==_0x1a2ab0(0x10a)&&_0x554820[_0x1a2ab0(0xf6)]!==_0x1a2ab0(0xf9)&&_0x554820[_0x1a2ab0(0xf6)]!==_0x1a2ab0(0x104)),_0x2eac1b=_0xfe9ece[_0x1a2ab0(0x108)](_0x42b908=>_0x42b908[_0x1a2ab0(0xf6)]==='verification_in_progress');}catch{}if(_0x50b655[_0x1a2ab0(0x106)](_0x3e266d,_0xe368a9)&&_0x166ead){if(!_0x2eac1b&&_0x50b655['ZJDLT'](shouldShowStopReminder,_0x16ec79)){const _0x395a16={'hookSpecificOutput':{'hookEventName':'Stop','additionalContext':'RANGER:\x20The\x20active\x20feature\x20review\x20still\x20has\x20unfinished\x20checklist\x20items.\x20Before\x20responding\x20to\x20the\x20user,\x20if\x20this\x20UI\x20work\x20is\x20ready,\x20run\x20`ranger\x20show`\x20and\x20then\x20`ranger\x20go`\x20for\x20the\x20relevant\x20scenario(s).\x20If\x20it\x20is\x20not\x20ready\x20for\x20browser\x20verification\x20yet,\x20continue\x20implementing.\x20Dashboard:\x20'+_0xc86170}};console[_0x1a2ab0(0x100)](JSON['stringify'](_0x395a16));}}if(_0x50b655['HpgDT'](_0x3e266d,_0xe368a9)&&!_0x166ead)try{await concludeSession(_0x58b0bc['featureId'],_0xe368a9);}catch{}await trackStop(_0x16ec79,!![],_0x4513e6);return;}catch{await _0x50b655['gqDhP'](trackStop,_0x16ec79,!![],_0x4513e6);return;}}async function trackStop(_0x2ae0fc,_0x37c93d,_0x63080c){const _0x5059e1=_0xfe9a;try{const _0x287e1f=createTelemetryCollector(_0x5059e1(0xfa));await _0x287e1f[_0x5059e1(0x109)]({'sessionId':_0x2ae0fc??undefined,'hooksEnabled':_0x37c93d,'stopAllowed':_0x63080c}),await _0x287e1f['trackCommandEnd'](_0x5059e1(0x107));}catch{}}
1
+ (function(_0x1c7f93,_0x264697){const _0x393d3b=_0x35c4,_0x5235ea=_0x1c7f93();while(!![]){try{const _0x1c5e0c=-parseInt(_0x393d3b(0x173))/0x1*(-parseInt(_0x393d3b(0x16c))/0x2)+parseInt(_0x393d3b(0x172))/0x3*(parseInt(_0x393d3b(0x16e))/0x4)+-parseInt(_0x393d3b(0x160))/0x5*(-parseInt(_0x393d3b(0x16f))/0x6)+parseInt(_0x393d3b(0x171))/0x7+-parseInt(_0x393d3b(0x15e))/0x8*(-parseInt(_0x393d3b(0x165))/0x9)+parseInt(_0x393d3b(0x177))/0xa*(parseInt(_0x393d3b(0x16a))/0xb)+-parseInt(_0x393d3b(0x16b))/0xc;if(_0x1c5e0c===_0x264697)break;else _0x5235ea['push'](_0x5235ea['shift']());}catch(_0x3286e6){_0x5235ea['push'](_0x5235ea['shift']());}}}(_0x4bf2,0x3fb5d));function _0x35c4(_0x5d5aad,_0x368656){_0x5d5aad=_0x5d5aad-0x15e;const _0x4bf249=_0x4bf2();let _0x35c447=_0x4bf249[_0x5d5aad];return _0x35c447;}import{getToken}from'../utils/keychain.js';function _0x4bf2(){const _0xa95747=['https://dashboard.ranger.net/features/','featureId','RANGER:\x20The\x20active\x20feature\x20review\x20still\x20has\x20unfinished\x20checklist\x20items.\x20Before\x20responding\x20to\x20the\x20user,\x20if\x20this\x20UI\x20work\x20is\x20ready,\x20run\x20`ranger\x20show`\x20and\x20then\x20`ranger\x20go`\x20for\x20the\x20relevant\x20scenario(s).\x20If\x20it\x20is\x20not\x20ready\x20for\x20browser\x20verification\x20yet,\x20continue\x20implementing.\x20Dashboard:\x20','9mtIEzQ','incomplete','trackCommandStart','verified','Stop','545149moeZWR','21127428rLqOGx','2dIZekN','sessionId','4jtMhpJ','90198uzUYLD','stringify','1856092hTUGDS','1090218Tuewer','282686HtJVOe','some','currentSessionId','status','100qCYsIp','2151832FtFrkP','raqFW','115suDgNj','success'];_0x4bf2=function(){return _0xa95747;};return _0x4bf2();}import{getFeature,concludeSession}from'../utils/featureApi.js';import{getSessionEntry,shouldShowStopReminder}from'../utils/sessionCache.js';import{getEnabledHookContext}from'./output.js';import{createTelemetryCollector}from'../utils/telemetry.js';export async function stopHook(_0x3f3edc){const _0x5e5033=_0x35c4,_0x51d82a={'raqFW':function(_0x98a853,_0x3c1b80){return _0x98a853(_0x3c1b80);},'OFTzU':function(_0x1c6e36,_0x7ba9a,_0x5589b7,_0x1dd6e2){return _0x1c6e36(_0x7ba9a,_0x5589b7,_0x1dd6e2);},'CEbHt':function(_0x32c8f6,_0x2e51d3){return _0x32c8f6&&_0x2e51d3;},'tLaNk':_0x5e5033(0x169),'mnEOB':function(_0x2e39f4,_0x44d938,_0x172120,_0x353f63){return _0x2e39f4(_0x44d938,_0x172120,_0x353f63);}},_0x4c27fa=await _0x51d82a[_0x5e5033(0x15f)](getEnabledHookContext,_0x3f3edc),_0x5ae976=_0x4c27fa?.[_0x5e5033(0x16d)]??null;let _0x1b9f2f=!![];if(!_0x5ae976){await trackStop(_0x5ae976,![],_0x1b9f2f);return;}try{const _0x206feb=_0x51d82a['raqFW'](getSessionEntry,_0x5ae976);if(!_0x206feb){await _0x51d82a['OFTzU'](trackStop,_0x5ae976,!![],_0x1b9f2f);return;}const _0x38d006=await getToken(),_0xad8a3d=_0x5e5033(0x162)+_0x206feb[_0x5e5033(0x163)];let _0x43eb38=null,_0x4a0d50=![],_0x5a4b40=![];if(_0x38d006)try{const _0x438c9d=await _0x51d82a['raqFW'](getFeature,_0x206feb[_0x5e5033(0x163)]);_0x43eb38=_0x438c9d[_0x5e5033(0x175)]??null;const _0x55205e=_0x438c9d['checklistItems']['filter'](_0x5ab31a=>_0x5ab31a[_0x5e5033(0x16d)]===_0x43eb38);_0x4a0d50=_0x55205e[_0x5e5033(0x174)](_0x1e582b=>_0x1e582b[_0x5e5033(0x176)]!==_0x5e5033(0x168)&&_0x1e582b['status']!=='blocked'&&_0x1e582b[_0x5e5033(0x176)]!=='closed'&&_0x1e582b[_0x5e5033(0x176)]!==_0x5e5033(0x166)),_0x5a4b40=_0x55205e['some'](_0x1b7b70=>_0x1b7b70[_0x5e5033(0x176)]==='verification_in_progress');}catch{}if(_0x51d82a['CEbHt'](_0x38d006,_0x43eb38)&&_0x4a0d50){if(!_0x5a4b40&&shouldShowStopReminder(_0x5ae976)){const _0x276889={'hookSpecificOutput':{'hookEventName':_0x51d82a['tLaNk'],'additionalContext':_0x5e5033(0x164)+_0xad8a3d}};console['log'](JSON[_0x5e5033(0x170)](_0x276889));}}if(_0x51d82a['CEbHt'](_0x38d006,_0x43eb38)&&!_0x4a0d50)try{await concludeSession(_0x206feb[_0x5e5033(0x163)],_0x43eb38);}catch{}await _0x51d82a['mnEOB'](trackStop,_0x5ae976,!![],_0x1b9f2f);return;}catch{await _0x51d82a['OFTzU'](trackStop,_0x5ae976,!![],_0x1b9f2f);return;}}async function trackStop(_0x3b9a68,_0x12d375,_0x21b7d1){const _0x2784d9=_0x35c4;try{const _0x330422=createTelemetryCollector('hook:stop');await _0x330422[_0x2784d9(0x167)]({'sessionId':_0x3b9a68??undefined,'hooksEnabled':_0x12d375,'stopAllowed':_0x21b7d1}),await _0x330422['trackCommandEnd'](_0x2784d9(0x161));}catch{}}
@@ -1 +1 @@
1
- (function(_0x79ce25,_0x596c61){var _0x26b186=_0x3aa2,_0x596e2=_0x79ce25();while(!![]){try{var _0x43f807=-parseInt(_0x26b186(0x152))/0x1+parseInt(_0x26b186(0x14f))/0x2+parseInt(_0x26b186(0x14d))/0x3*(-parseInt(_0x26b186(0x14e))/0x4)+parseInt(_0x26b186(0x14c))/0x5*(parseInt(_0x26b186(0x150))/0x6)+-parseInt(_0x26b186(0x149))/0x7*(-parseInt(_0x26b186(0x14b))/0x8)+-parseInt(_0x26b186(0x151))/0x9*(parseInt(_0x26b186(0x147))/0xa)+-parseInt(_0x26b186(0x14a))/0xb*(parseInt(_0x26b186(0x148))/0xc);if(_0x43f807===_0x596c61)break;else _0x596e2['push'](_0x596e2['shift']());}catch(_0x304a42){_0x596e2['push'](_0x596e2['shift']());}}}(_0x535b,0x256d2));export{addEnv}from'./addEnv.js';export{clean}from'./clean.js';export{login}from'./login.js';export{start}from'./start.js';export{useEnv}from'./useEnv.js';export{updateEnv}from'./updateEnv.js';export{update}from'./update.js';export{skillup}from'./skillup.js';export{envList}from'./env.js';export{hook}from'./hook.js';function _0x3aa2(_0x3974d3,_0x50aae2){_0x3974d3=_0x3974d3-0x147;var _0x535b0b=_0x535b();var _0x3aa255=_0x535b0b[_0x3974d3];return _0x3aa255;}function _0x535b(){var _0x3cd265=['56199tqCZzo','4eceHbA','311782lBkdFm','1014618AOPdQs','120762uMjptT','197735mLJegs','80qOqVMi','10212fbMgUi','7lUizEN','451vRxezN','1496056eSuqkd','5NqdMix'];_0x535b=function(){return _0x3cd265;};return _0x535b();}export{setupCi}from'./setupCi.js';
1
+ (function(_0x439bcf,_0x127b98){var _0x97ffd7=_0x30cd,_0x2748ef=_0x439bcf();while(!![]){try{var _0x18281e=-parseInt(_0x97ffd7(0x198))/0x1*(-parseInt(_0x97ffd7(0x196))/0x2)+parseInt(_0x97ffd7(0x19b))/0x3*(parseInt(_0x97ffd7(0x19d))/0x4)+-parseInt(_0x97ffd7(0x19a))/0x5+-parseInt(_0x97ffd7(0x197))/0x6+-parseInt(_0x97ffd7(0x19e))/0x7+-parseInt(_0x97ffd7(0x199))/0x8+parseInt(_0x97ffd7(0x19c))/0x9;if(_0x18281e===_0x127b98)break;else _0x2748ef['push'](_0x2748ef['shift']());}catch(_0xcf0737){_0x2748ef['push'](_0x2748ef['shift']());}}}(_0x172b,0x3051c));export{addEnv}from'./addEnv.js';export{clean}from'./clean.js';export{login}from'./login.js';export{start}from'./start.js';function _0x172b(){var _0x4a1624=['1VkGDvK','1096064qiQddc','1577990YpTXyn','543342bpMVsf','6067719SrtqIB','4jgCEff','1953119AUhSxU','160364uWNiho','35688pKhQzx'];_0x172b=function(){return _0x4a1624;};return _0x172b();}function _0x30cd(_0x129826,_0x4616d6){_0x129826=_0x129826-0x196;var _0x172be9=_0x172b();var _0x30cd91=_0x172be9[_0x129826];return _0x30cd91;}export{useEnv}from'./useEnv.js';export{updateEnv}from'./updateEnv.js';export{update}from'./update.js';export{skillup}from'./skillup.js';export{envList}from'./env.js';export{hook}from'./hook.js';export{setupCi}from'./setupCi.js';
@@ -1 +1 @@
1
- (function(_0x7a02b0,_0x4b4765){const _0x3b2ea1=_0x5869,_0x629711=_0x7a02b0();while(!![]){try{const _0x263b04=parseInt(_0x3b2ea1(0x6d))/0x1*(parseInt(_0x3b2ea1(0x77))/0x2)+parseInt(_0x3b2ea1(0x78))/0x3+-parseInt(_0x3b2ea1(0x6f))/0x4+-parseInt(_0x3b2ea1(0x76))/0x5+parseInt(_0x3b2ea1(0x74))/0x6+-parseInt(_0x3b2ea1(0x6e))/0x7+parseInt(_0x3b2ea1(0x79))/0x8*(-parseInt(_0x3b2ea1(0x70))/0x9);if(_0x263b04===_0x4b4765)break;else _0x629711['push'](_0x629711['shift']());}catch(_0x4d7811){_0x629711['push'](_0x629711['shift']());}}}(_0x232f,0xf0477));function _0x5869(_0x3e2d60,_0x2e89ee){_0x3e2d60=_0x3e2d60-0x6a;const _0x232f59=_0x232f();let _0x5869a0=_0x232f59[_0x3e2d60];return _0x5869a0;}function _0x232f(){const _0x39e897=['452336WQWiwb','Login\x20requires\x20an\x20interactive\x20terminal.\x20In\x20CI,\x20use:\x20ranger\x20setup\x20[token]\x20or\x20set\x20RANGER_CLI_TOKEN.','message','Login\x20failed:\x20','\x0a✅\x20API\x20key\x20stored\x20successfully','isTTY','log','390319bvisWA','8438682TKfRlO','187456jqQibM','279DYeoYb','stdout','stdin','ojnUM','8889126yVCLyF','success','3531835wCCiMh','8CxbYke','4958835JYFmCX'];_0x232f=function(){return _0x39e897;};return _0x232f();}import{runDeviceAuthFlow}from'./utils/deviceAuth.js';import{getCurrentUser}from'./utils/userApi.js';export async function login(){const _0x7b8666=_0x5869,_0x2c44d2={'ojnUM':function(_0x57d228){return _0x57d228();},'aSyGh':function(_0x50033e,_0x59b4ba){return _0x50033e(_0x59b4ba);},'egYGX':_0x7b8666(0x6a)},_0x5f59ae=process[_0x7b8666(0x72)][_0x7b8666(0x6b)]&&process[_0x7b8666(0x71)][_0x7b8666(0x6b)];if(!_0x5f59ae)throw new Error(_0x7b8666(0x7a));try{const _0x23f28d=await _0x2c44d2[_0x7b8666(0x73)](runDeviceAuthFlow),_0xcbb25e=await _0x2c44d2['aSyGh'](getCurrentUser,_0x23f28d);_0xcbb25e[_0x7b8666(0x75)]?console['log']('\x0a✅\x20Logged\x20in\x20to\x20'+_0xcbb25e['user']['organizationName']):console[_0x7b8666(0x6c)](_0x2c44d2['egYGX']);}catch(_0x7111a){throw new Error(_0x7b8666(0x7c)+(_0x7111a instanceof Error?_0x7111a[_0x7b8666(0x7b)]:_0x7111a));}}
1
+ (function(_0x51bc3b,_0xcfb28c){const _0x4dd9ca=_0x4a73,_0x4dfff3=_0x51bc3b();while(!![]){try{const _0x5da02c=parseInt(_0x4dd9ca(0x6e))/0x1*(-parseInt(_0x4dd9ca(0x6c))/0x2)+parseInt(_0x4dd9ca(0x73))/0x3+parseInt(_0x4dd9ca(0x70))/0x4+parseInt(_0x4dd9ca(0x71))/0x5*(-parseInt(_0x4dd9ca(0x78))/0x6)+parseInt(_0x4dd9ca(0x6a))/0x7+parseInt(_0x4dd9ca(0x77))/0x8+parseInt(_0x4dd9ca(0x74))/0x9;if(_0x5da02c===_0xcfb28c)break;else _0x4dfff3['push'](_0x4dfff3['shift']());}catch(_0x2503c2){_0x4dfff3['push'](_0x4dfff3['shift']());}}}(_0x14ba,0x62d82));import{runDeviceAuthFlow}from'./utils/deviceAuth.js';import{getCurrentUser}from'./utils/userApi.js';function _0x14ba(){const _0x12790c=['organizationName','599184iRMmub','3068958IEPTBg','1883308PPgNtH','AuDjJ','77020TjBSvz','success','19iTjPhA','hemsL','2731100RERQVT','5KXEqvq','user','495852pjgKDv','4104432yALhlO','isTTY'];_0x14ba=function(){return _0x12790c;};return _0x14ba();}function _0x4a73(_0x12f22a,_0x5078a6){_0x12f22a=_0x12f22a-0x6a;const _0x14ba10=_0x14ba();let _0x4a73ac=_0x14ba10[_0x12f22a];return _0x4a73ac;}export async function login(){const _0xefd648=_0x4a73,_0xa5abad={'ZzVja':function(_0x21a13d){return _0x21a13d();},'AuDjJ':function(_0x5480f0,_0x5e9de6){return _0x5480f0(_0x5e9de6);},'hemsL':'\x0a✅\x20API\x20key\x20stored\x20successfully','TAuMI':function(_0x1df2d2,_0x2bea98){return _0x1df2d2 instanceof _0x2bea98;}},_0xb69fc8=process['stdin'][_0xefd648(0x75)]&&process['stdout'][_0xefd648(0x75)];if(!_0xb69fc8)throw new Error('Login\x20requires\x20an\x20interactive\x20terminal.\x20In\x20CI,\x20use:\x20ranger\x20setup\x20[token]\x20or\x20set\x20RANGER_CLI_TOKEN.');try{const _0x2c6919=await _0xa5abad['ZzVja'](runDeviceAuthFlow),_0x2929df=await _0xa5abad[_0xefd648(0x6b)](getCurrentUser,_0x2c6919);_0x2929df[_0xefd648(0x6d)]?console['log']('\x0a✅\x20Logged\x20in\x20to\x20'+_0x2929df[_0xefd648(0x72)][_0xefd648(0x76)]):console['log'](_0xa5abad[_0xefd648(0x6f)]);}catch(_0x40e2b8){throw new Error('Login\x20failed:\x20'+(_0xa5abad['TAuMI'](_0x40e2b8,Error)?_0x40e2b8['message']:_0x40e2b8));}}
@@ -1 +1 @@
1
- function _0x2012(){const _0xe16f49=['log','321584CMvMqF','ZAmAU','pluginScope','output','wantsSkillup','✓\x20Claude\x20Code\x20plugin\x20already\x20installed','411mgyylc','2038400hgnHnw','aXRAU','ranger@trailhead','wRRWu','✓\x20Ranger\x20skills\x20already\x20installed','RZgqu','VFWYE','2209400LZCwjE','vMMMX','leWsZ','282760dtpSEB','8972CkIJiU','kkLWc','SKILL.md','ranger-testing/trailhead','✓\x20Claude\x20Code\x20plugin\x20installed\x20successfully','6756qFYbFS','install','sMLwy','5455UtOcjZ','yYAAL','XFqCH','User\x20(available\x20in\x20all\x20your\x20projects)','user','\x0aInstalling\x20Claude\x20Code\x20plugin\x20(','error','xSZrE','2793vuggDT','306WbkGdf','includes','.claude','YqDek','\x20level)...\x0a','already\x20enabled','\x20\x20claude\x20plugin\x20install\x20ranger@trailhead\x20--scope\x20','\x0aYou\x20can\x20install\x20manually\x20with:','\x0a📦\x20Claude\x20Code\x20Plugin\x0a','prompt','nLKoK','Where\x20should\x20the\x20plugin\x20be\x20installed?','rRuIN','vXJmO','confirm','IVZZB','project'];_0x2012=function(){return _0xe16f49;};return _0x2012();}(function(_0x1e2d76,_0x24e7a3){const _0x4c2ee6=_0x28cb,_0x4ae23a=_0x1e2d76();while(!![]){try{const _0x2d105d=-parseInt(_0x4c2ee6(0x199))/0x1+-parseInt(_0x4c2ee6(0x1b4))/0x2+parseInt(_0x4c2ee6(0x1ba))/0x3*(-parseInt(_0x4c2ee6(0x191))/0x4)+-parseInt(_0x4c2ee6(0x1bb))/0x5+-parseInt(_0x4c2ee6(0x196))/0x6*(-parseInt(_0x4c2ee6(0x1a1))/0x7)+-parseInt(_0x4c2ee6(0x1c2))/0x8+-parseInt(_0x4c2ee6(0x1a2))/0x9*(-parseInt(_0x4c2ee6(0x190))/0xa);if(_0x2d105d===_0x24e7a3)break;else _0x4ae23a['push'](_0x4ae23a['shift']());}catch(_0xfff93d){_0x4ae23a['push'](_0x4ae23a['shift']());}}}(_0x2012,0x3dd51));import{join}from'path';import{existsSync}from'fs';import _0x504dfa from'inquirer';import{skillup}from'../skillup.js';import{runClaudeCommand,isMarketplaceAdded,isPluginInstalled}from'../utils/claudePlugin.js';import{getProjectRoot,getSkillsDir}from'../utils/claudeConfig.js';export async function ensureClaudePlugin(_0x54f051){const _0x329a55=_0x28cb,_0x53a4af={'ZAmAU':function(_0x1b2a17,_0x246806){return _0x1b2a17(_0x246806);},'rRuIN':_0x329a55(0x1b9),'aXRAU':_0x329a55(0x1a4),'nLKoK':_0x329a55(0x1b2),'YqDek':'list','nZLar':_0x329a55(0x1b6),'SaMaM':_0x329a55(0x1ad),'Wbfcc':_0x329a55(0x19d),'RZgqu':'Project\x20(shared\x20with\x20team\x20via\x20git)','aYXfS':'trailhead','jtUPs':_0x329a55(0x194),'XFqCH':'\x20\x20claude\x20plugin\x20marketplace\x20add\x20ranger-testing/trailhead','yYAAL':'plugin','vXJmO':_0x329a55(0x197),'VBMLT':_0x329a55(0x1bd),'IjAoT':'❌\x20Failed\x20to\x20install\x20plugin:','IVZZB':_0x329a55(0x1a9),'ZKeiU':_0x329a55(0x1a7),'VQkZF':'✓\x20Claude\x20Code\x20plugin\x20enabled'},_0x198371=await _0x53a4af['ZAmAU'](isPluginInstalled,_0x329a55(0x1bd));if(_0x198371)return console['log'](_0x53a4af[_0x329a55(0x1ae)]),![];const _0x319bfb=existsSync(join(getProjectRoot(),_0x53a4af[_0x329a55(0x1bc)]));let _0x3e2576;if(_0x54f051)_0x3e2576=_0x54f051;else{if(_0x319bfb)_0x3e2576=_0x53a4af['nLKoK'];else{console['log'](_0x329a55(0x1aa));const _0x1cad56=await _0x504dfa[_0x329a55(0x1ab)]([{'type':_0x53a4af[_0x329a55(0x1a5)],'name':_0x53a4af['nZLar'],'message':_0x53a4af['SaMaM'],'choices':[{'name':_0x329a55(0x19c),'value':_0x53a4af['Wbfcc']},{'name':_0x53a4af[_0x329a55(0x1c0)],'value':_0x53a4af[_0x329a55(0x1ac)]}],'default':'user'}]);_0x3e2576=_0x1cad56[_0x329a55(0x1b6)];}}console['log'](_0x329a55(0x19e)+_0x3e2576+_0x329a55(0x1a6));const _0x1cd6a8=await _0x53a4af[_0x329a55(0x1b5)](isMarketplaceAdded,_0x53a4af['aYXfS']);let _0x54d943=_0x1cd6a8;if(_0x1cd6a8)console['log']('✓\x20Marketplace\x20already\x20added');else{const _0xcfbefa=await _0x53a4af['ZAmAU'](runClaudeCommand,['plugin','marketplace','add',_0x53a4af['jtUPs']]);!_0xcfbefa['success']?(console['error']('❌\x20Failed\x20to\x20add\x20marketplace:',_0xcfbefa['error']),console[_0x329a55(0x1b3)]('\x0aYou\x20can\x20install\x20manually\x20with:'),console['log'](_0x53a4af[_0x329a55(0x19b)]),console['log']('\x20\x20claude\x20plugin\x20install\x20ranger@trailhead\x20--scope\x20'+_0x3e2576)):_0x54d943=!![];}if(_0x54d943){const _0x91669a=await runClaudeCommand([_0x53a4af[_0x329a55(0x19a)],_0x53a4af[_0x329a55(0x1af)],_0x53a4af['VBMLT'],'--scope',_0x3e2576]);if(!_0x91669a['success'])console['error'](_0x53a4af['IjAoT'],_0x91669a['error']),console['log'](_0x53a4af[_0x329a55(0x1b1)]),console['log'](_0x329a55(0x1a8)+_0x3e2576);else{console[_0x329a55(0x1b3)](_0x329a55(0x195));const _0x54852d=[_0x53a4af[_0x329a55(0x19a)],'enable','ranger@trailhead'];_0x3e2576===_0x329a55(0x1b2)&&_0x54852d['push']('--scope',_0x53a4af[_0x329a55(0x1ac)]);const _0x30fab9=await runClaudeCommand(_0x54852d,{'captureOutput':!![]}),_0x62aa8c=_0x30fab9[_0x329a55(0x1b7)]?.[_0x329a55(0x1a3)](_0x53a4af['ZKeiU']);!_0x30fab9['success']&&!_0x62aa8c?console[_0x329a55(0x19f)]('⚠\x20Failed\x20to\x20enable\x20plugin:',_0x30fab9['error']):console['log'](_0x53a4af['VQkZF']);}}return!![];}function _0x28cb(_0x53c30c,_0x1e29be){_0x53c30c=_0x53c30c-0x18e;const _0x2012cf=_0x2012();let _0x28cbd3=_0x2012cf[_0x53c30c];return _0x28cbd3;}export async function ensureClaudeSkills(_0x39712c){const _0x2cfa66=_0x28cb,_0x32a9a1={'sMLwy':function(_0x4314c4,_0x4a2bd9){return _0x4314c4(_0x4a2bd9);},'gVpBI':'ranger','vMMMX':function(_0x448a10,_0x590447,_0x10e5f2,_0x4b2249){return _0x448a10(_0x590447,_0x10e5f2,_0x4b2249);},'haAwH':function(_0x4a1aac,_0x528b0e){return _0x4a1aac(_0x528b0e);},'VFWYE':_0x2cfa66(0x193),'TAdtl':function(_0x592a48,_0x2e9d3a){return _0x592a48||_0x2e9d3a;},'lBMKd':_0x2cfa66(0x1bf),'sBCfJ':function(_0x45bbef,_0x1a6888){return _0x45bbef(_0x1a6888);},'wRRWu':function(_0x3c3e40,_0x250853,_0x83c9c3){return _0x3c3e40(_0x250853,_0x83c9c3);},'xSZrE':function(_0xc888cc){return _0xc888cc();},'dvghZ':'.claude','kkLWc':function(_0x22ad2a,_0x1f8473){return _0x22ad2a(_0x1f8473);},'leWsZ':'wantsSkillup'},_0x184835=_0x32a9a1[_0x2cfa66(0x198)](existsSync,join(getSkillsDir('user'),_0x32a9a1['gVpBI'],_0x2cfa66(0x193))),_0x428f93=_0x32a9a1['sMLwy'](existsSync,_0x32a9a1[_0x2cfa66(0x18e)](join,_0x32a9a1['haAwH'](getSkillsDir,_0x2cfa66(0x1b2)),_0x32a9a1['gVpBI'],_0x32a9a1[_0x2cfa66(0x1c1)]));if(_0x32a9a1['TAdtl'](_0x184835,_0x428f93))return console['log'](_0x32a9a1['lBMKd']),![];const _0x56494e=_0x32a9a1['sBCfJ'](existsSync,_0x32a9a1[_0x2cfa66(0x1be)](join,_0x32a9a1[_0x2cfa66(0x1a0)](getProjectRoot),_0x32a9a1['dvghZ']));let _0x5b8be5=!![];if(_0x39712c)await skillup({'autoInstall':_0x39712c,'suppressUsage':!![]});else{if(_0x56494e)await _0x32a9a1[_0x2cfa66(0x192)](skillup,{'autoInstall':'project','suppressUsage':!![]});else{const _0x3f407f=await _0x504dfa[_0x2cfa66(0x1ab)]([{'type':_0x2cfa66(0x1b0),'name':_0x32a9a1[_0x2cfa66(0x18f)],'message':'Would\x20you\x20like\x20to\x20install\x20skills?','default':!![]}]);_0x5b8be5=_0x3f407f[_0x2cfa66(0x1b8)],_0x5b8be5&&await skillup({'suppressUsage':!![]});}}return _0x5b8be5;}
1
+ (function(_0x48cdfe,_0x1474d4){const _0x4dc123=_0x219d,_0x5042c8=_0x48cdfe();while(!![]){try{const _0x4a8146=-parseInt(_0x4dc123(0x1d1))/0x1*(parseInt(_0x4dc123(0x1bd))/0x2)+parseInt(_0x4dc123(0x1bb))/0x3*(-parseInt(_0x4dc123(0x1cf))/0x4)+parseInt(_0x4dc123(0x1aa))/0x5+-parseInt(_0x4dc123(0x1d5))/0x6+parseInt(_0x4dc123(0x1b6))/0x7+parseInt(_0x4dc123(0x1ae))/0x8*(-parseInt(_0x4dc123(0x1ca))/0x9)+parseInt(_0x4dc123(0x1d3))/0xa*(parseInt(_0x4dc123(0x1b2))/0xb);if(_0x4a8146===_0x1474d4)break;else _0x5042c8['push'](_0x5042c8['shift']());}catch(_0x2a707f){_0x5042c8['push'](_0x5042c8['shift']());}}}(_0x1c4c,0x5326e));import{join}from'path';import{existsSync}from'fs';import _0x28c2dc from'inquirer';function _0x1c4c(){const _0xbc1e2=['SKILL.md','already\x20enabled','project','KleEi','NADvL','Hoefw','81UklEXV','success','push','FdWFf','error','72EwGcgG','ranger','1ZMQWYi','enable','10OGkZRz','plugin','1678884lzwSlu','⚠\x20Failed\x20to\x20enable\x20plugin:','includes','wantsSkillup','install','\x20\x20claude\x20plugin\x20install\x20ranger@trailhead\x20--scope\x20','2197435ydpWCT','.claude','MDCqr','ranger@trailhead','301064QGbxaM','pluginScope','kxKyU','\x0a📦\x20Claude\x20Code\x20Plugin\x0a','9502339habPok','Project\x20(shared\x20with\x20team\x20via\x20git)','user','dQNas','2960594lngkZM','Where\x20should\x20the\x20plugin\x20be\x20installed?','❌\x20Failed\x20to\x20install\x20plugin:','rUpin','hzNRi','72549EOBbzD','YNugs','663766IBcOVF','ranger-testing/trailhead','\x0aYou\x20can\x20install\x20manually\x20with:','❌\x20Failed\x20to\x20add\x20marketplace:','log','Uyhee','GbCBe'];_0x1c4c=function(){return _0xbc1e2;};return _0x1c4c();}import{skillup}from'../skillup.js';import{runClaudeCommand,isMarketplaceAdded,isPluginInstalled}from'../utils/claudePlugin.js';import{getProjectRoot,getSkillsDir}from'../utils/claudeConfig.js';export async function ensureClaudePlugin(_0x4ef531){const _0x4c93df=_0x219d,_0x540404={'KleEi':function(_0x52b25c,_0x951d64,_0x6dd58){return _0x52b25c(_0x951d64,_0x6dd58);},'YNugs':function(_0x1db994){return _0x1db994();},'GbCBe':_0x4c93df(0x1c6),'BxnMg':_0x4c93df(0x1b1),'UirHJ':'list','Shzah':'pluginScope','pRhYa':_0x4c93df(0x1b7),'rUjIk':'User\x20(available\x20in\x20all\x20your\x20projects)','hzNRi':_0x4c93df(0x1b4),'Hoefw':'trailhead','OlVbG':'✓\x20Marketplace\x20already\x20added','vdBjc':_0x4c93df(0x1d4),'NcqWJ':'marketplace','Uyhee':'add','FdWFf':_0x4c93df(0x1be),'YXOAU':_0x4c93df(0x1bf),'MDCqr':'--scope','xipOg':function(_0x330ccb,_0x161216){return _0x330ccb===_0x161216;},'kxKyU':_0x4c93df(0x1c5),'dQNas':_0x4c93df(0x1d6),'ebCcP':'✓\x20Claude\x20Code\x20plugin\x20enabled'},_0x46c4ab=await isPluginInstalled(_0x4c93df(0x1ad));if(_0x46c4ab)return console['log']('✓\x20Claude\x20Code\x20plugin\x20already\x20installed'),![];const _0x4618cd=existsSync(_0x540404[_0x4c93df(0x1c7)](join,_0x540404[_0x4c93df(0x1bc)](getProjectRoot),_0x4c93df(0x1ab)));let _0x2c10ed;if(_0x4ef531)_0x2c10ed=_0x4ef531;else{if(_0x4618cd)_0x2c10ed=_0x540404[_0x4c93df(0x1c3)];else{console[_0x4c93df(0x1c1)](_0x540404['BxnMg']);const _0x2e459a=await _0x28c2dc['prompt']([{'type':_0x540404['UirHJ'],'name':_0x540404['Shzah'],'message':_0x540404['pRhYa'],'choices':[{'name':_0x540404['rUjIk'],'value':_0x4c93df(0x1b4)},{'name':_0x4c93df(0x1b3),'value':_0x540404['GbCBe']}],'default':_0x540404[_0x4c93df(0x1ba)]}]);_0x2c10ed=_0x2e459a[_0x4c93df(0x1af)];}}console['log']('\x0aInstalling\x20Claude\x20Code\x20plugin\x20('+_0x2c10ed+'\x20level)...\x0a');const _0x41170d=await isMarketplaceAdded(_0x540404[_0x4c93df(0x1c9)]);let _0x536caf=_0x41170d;if(_0x41170d)console['log'](_0x540404['OlVbG']);else{const _0x5650e8=await runClaudeCommand([_0x540404['vdBjc'],_0x540404['NcqWJ'],_0x540404[_0x4c93df(0x1c2)],_0x540404[_0x4c93df(0x1cd)]]);!_0x5650e8['success']?(console['error'](_0x4c93df(0x1c0),_0x5650e8[_0x4c93df(0x1ce)]),console['log'](_0x540404['YXOAU']),console[_0x4c93df(0x1c1)]('\x20\x20claude\x20plugin\x20marketplace\x20add\x20ranger-testing/trailhead'),console['log']('\x20\x20claude\x20plugin\x20install\x20ranger@trailhead\x20--scope\x20'+_0x2c10ed)):_0x536caf=!![];}if(_0x536caf){const _0x396319=await runClaudeCommand(['plugin',_0x4c93df(0x1a8),'ranger@trailhead',_0x540404[_0x4c93df(0x1ac)],_0x2c10ed]);if(!_0x396319[_0x4c93df(0x1cb)])console['error'](_0x4c93df(0x1b8),_0x396319[_0x4c93df(0x1ce)]),console[_0x4c93df(0x1c1)](_0x4c93df(0x1bf)),console[_0x4c93df(0x1c1)](_0x4c93df(0x1a9)+_0x2c10ed);else{console['log']('✓\x20Claude\x20Code\x20plugin\x20installed\x20successfully');const _0x182816=['plugin',_0x4c93df(0x1d2),'ranger@trailhead'];_0x540404['xipOg'](_0x2c10ed,_0x4c93df(0x1c6))&&_0x182816[_0x4c93df(0x1cc)]('--scope',_0x540404['GbCBe']);const _0x5164bf=await runClaudeCommand(_0x182816,{'captureOutput':!![]}),_0x1dae7c=_0x5164bf['output']?.[_0x4c93df(0x1d7)](_0x540404[_0x4c93df(0x1b0)]);!_0x5164bf[_0x4c93df(0x1cb)]&&!_0x1dae7c?console[_0x4c93df(0x1ce)](_0x540404[_0x4c93df(0x1b5)],_0x5164bf[_0x4c93df(0x1ce)]):console[_0x4c93df(0x1c1)](_0x540404['ebCcP']);}}return!![];}function _0x219d(_0x5a32c5,_0x11c036){_0x5a32c5=_0x5a32c5-0x1a7;const _0x1c4c49=_0x1c4c();let _0x219d0f=_0x1c4c49[_0x5a32c5];return _0x219d0f;}export async function ensureClaudeSkills(_0x5bd199){const _0x514dd8=_0x219d,_0x477074={'USeed':function(_0x3e7315,_0x518145,_0x1bca52,_0x369b13){return _0x3e7315(_0x518145,_0x1bca52,_0x369b13);},'NADvL':function(_0x328c7b,_0x2fe4a1){return _0x328c7b(_0x2fe4a1);},'rUpin':function(_0x48e542,_0x3903ef){return _0x48e542(_0x3903ef);},'tVuoz':_0x514dd8(0x1ab),'PJcxk':'confirm','rCjtF':'Would\x20you\x20like\x20to\x20install\x20skills?','sutqG':function(_0x37b75f,_0x46d2d2){return _0x37b75f(_0x46d2d2);}},_0x46981e=existsSync(_0x477074['USeed'](join,_0x477074[_0x514dd8(0x1c8)](getSkillsDir,_0x514dd8(0x1b4)),_0x514dd8(0x1d0),_0x514dd8(0x1c4))),_0x2ccf73=_0x477074[_0x514dd8(0x1b9)](existsSync,join(getSkillsDir(_0x514dd8(0x1c6)),_0x514dd8(0x1d0),'SKILL.md'));if(_0x46981e||_0x2ccf73)return console['log']('✓\x20Ranger\x20skills\x20already\x20installed'),![];const _0x516a46=_0x477074[_0x514dd8(0x1c8)](existsSync,join(getProjectRoot(),_0x477074['tVuoz']));let _0x4929b2=!![];if(_0x5bd199)await _0x477074['rUpin'](skillup,{'autoInstall':_0x5bd199,'suppressUsage':!![]});else{if(_0x516a46)await skillup({'autoInstall':_0x514dd8(0x1c6),'suppressUsage':!![]});else{const _0x5a0ff8=await _0x28c2dc['prompt']([{'type':_0x477074['PJcxk'],'name':_0x514dd8(0x1a7),'message':_0x477074['rCjtF'],'default':!![]}]);_0x4929b2=_0x5a0ff8['wantsSkillup'],_0x4929b2&&await _0x477074['sutqG'](skillup,{'suppressUsage':!![]});}}return _0x4929b2;}
@@ -1 +1 @@
1
- function _0x42e4(_0x213951,_0x549612){_0x213951=_0x213951-0xbd;const _0x2c6998=_0x2c69();let _0x42e470=_0x2c6998[_0x213951];return _0x42e470;}(function(_0x41d69d,_0x10ba14){const _0x5aa796=_0x42e4,_0x2f8aa8=_0x41d69d();while(!![]){try{const _0x47fb9c=-parseInt(_0x5aa796(0xca))/0x1+-parseInt(_0x5aa796(0xd2))/0x2*(-parseInt(_0x5aa796(0xdb))/0x3)+parseInt(_0x5aa796(0xc5))/0x4*(parseInt(_0x5aa796(0xcd))/0x5)+parseInt(_0x5aa796(0xc7))/0x6+parseInt(_0x5aa796(0xbd))/0x7+-parseInt(_0x5aa796(0xce))/0x8+parseInt(_0x5aa796(0xda))/0x9*(-parseInt(_0x5aa796(0xd7))/0xa);if(_0x47fb9c===_0x10ba14)break;else _0x2f8aa8['push'](_0x2f8aa8['shift']());}catch(_0x2a2b9f){_0x2f8aa8['push'](_0x2f8aa8['shift']());}}}(_0x2c69,0xf0869));function _0x2c69(){const _0x2972c3=['prompt','user','271179ptaTZs','389052NzQglW','AyGSr','✓\x20OpenCode\x20plugin\x20configured','opencode.json','Where\x20should\x20the\x20plugin\x20be\x20installed?','list','5907930RTJmqw','yDdtS','$schema','JcuCj','sApKw','Failed\x20to\x20read\x20opencode.json','https://opencode.ai/config.json','PqVKb','67400tptIkC','project','11788314gKevue','User\x20(available\x20in\x20all\x20your\x20projects)','ojUJf','906495UFpewK','stringify','parse','330JDDKeV','14429936FBOqDm','XtEQo','✓\x20OpenCode\x20plugin\x20already\x20configured','\x0a📦\x20OpenCode\x20Plugin\x0a','10NyotLY','log','plugin','iJtEA','UIkNr','290kiMuxi'];_0x2c69=function(){return _0x2972c3;};return _0x2c69();}import{join}from'path';import{existsSync}from'fs';import{mkdir,readFile,writeFile}from'fs/promises';import _0x1dc5c6 from'inquirer';import{getOpencodeConfigDir}from'../utils/opencodeConfig.js';export async function ensureOpencodePluginConfig(_0x5afd8e){const _0x594090=_0x42e4,_0x5b9f47={'JcuCj':_0x594090(0xc6),'czwUL':_0x594090(0xd1),'vmaer':_0x594090(0xe0),'AyGSr':'pluginScope','iJtEA':_0x594090(0xdf),'ARTVX':_0x594090(0xd9),'UIkNr':'opencode.json','yDdtS':_0x594090(0xc3),'XtEQo':function(_0x524422,_0x3ca898){return _0x524422(_0x3ca898);},'ojUJf':function(_0x4d1349,_0x490d17,_0x521d71){return _0x4d1349(_0x490d17,_0x521d71);},'KieEI':'utf-8','PqVKb':_0x594090(0xc2),'sApKw':_0x594090(0xdd)},_0x29cd06=existsSync(join(getOpencodeConfigDir(_0x5b9f47[_0x594090(0xc0)]),_0x594090(0xde)));let _0xbdc4d0;if(_0x5afd8e)_0xbdc4d0=_0x5afd8e;else{if(_0x29cd06)_0xbdc4d0=_0x594090(0xc6);else{console[_0x594090(0xd3)](_0x5b9f47['czwUL']);const _0x345fa8=await _0x1dc5c6[_0x594090(0xd8)]([{'type':_0x5b9f47['vmaer'],'name':_0x5b9f47[_0x594090(0xdc)],'message':_0x5b9f47[_0x594090(0xd5)],'choices':[{'name':_0x594090(0xc8),'value':_0x5b9f47['ARTVX']},{'name':'Project\x20(shared\x20with\x20team\x20via\x20git)','value':'project'}],'default':'user'}]);_0xbdc4d0=_0x345fa8['pluginScope'];}}const _0x530064=join(getOpencodeConfigDir(_0xbdc4d0),_0x5b9f47[_0x594090(0xd6)]),_0x8d2afb='@ranger-testing/opencode-plugin',_0x1cb4f0=_0x5b9f47[_0x594090(0xbe)];let _0x218d57={};if(_0x5b9f47[_0x594090(0xcf)](existsSync,_0x530064))try{const _0x3f7401=await _0x5b9f47[_0x594090(0xc9)](readFile,_0x530064,_0x5b9f47['KieEI']);_0x218d57=JSON[_0x594090(0xcc)](_0x3f7401);}catch(_0x1ea1e4){return console['error']('⚠\x20Failed\x20to\x20read\x20opencode.json.\x20Please\x20add\x20the\x20plugin\x20manually.'),{'configured':![],'scope':_0xbdc4d0,'error':_0x5b9f47[_0x594090(0xc4)],'details':_0x1ea1e4};}const _0x17f956=Array['isArray'](_0x218d57['plugin'])?_0x218d57[_0x594090(0xd4)]:[];if(_0x17f956['includes'](_0x8d2afb))return console[_0x594090(0xd3)](_0x594090(0xd0)),{'configured':![],'scope':_0xbdc4d0};return _0x218d57['$schema']=_0x218d57[_0x594090(0xbf)]||_0x1cb4f0,_0x218d57[_0x594090(0xd4)]=[..._0x17f956,_0x8d2afb],await _0x5b9f47[_0x594090(0xc9)](mkdir,_0x5b9f47['XtEQo'](getOpencodeConfigDir,_0xbdc4d0),{'recursive':!![]}),await writeFile(_0x530064,JSON[_0x594090(0xcb)](_0x218d57,null,0x2)+'\x0a'),console['log'](_0x5b9f47[_0x594090(0xc1)]),{'configured':!![],'scope':_0xbdc4d0};}
1
+ (function(_0x25af28,_0x4d351e){const _0xe6f98b=_0x6808,_0xe530ad=_0x25af28();while(!![]){try{const _0x15352a=-parseInt(_0xe6f98b(0xa4))/0x1*(-parseInt(_0xe6f98b(0xac))/0x2)+parseInt(_0xe6f98b(0x9f))/0x3+-parseInt(_0xe6f98b(0xba))/0x4*(parseInt(_0xe6f98b(0xbe))/0x5)+parseInt(_0xe6f98b(0xaf))/0x6*(-parseInt(_0xe6f98b(0xa2))/0x7)+parseInt(_0xe6f98b(0xad))/0x8*(parseInt(_0xe6f98b(0xb4))/0x9)+parseInt(_0xe6f98b(0xa3))/0xa+parseInt(_0xe6f98b(0xb3))/0xb*(-parseInt(_0xe6f98b(0xbd))/0xc);if(_0x15352a===_0x4d351e)break;else _0xe530ad['push'](_0xe530ad['shift']());}catch(_0x5e3a12){_0xe530ad['push'](_0xe530ad['shift']());}}}(_0x5125,0x3cd30));import{join}from'path';import{existsSync}from'fs';function _0x5125(){const _0x2df103=['user','7dIEaiz','3249010JWlfLC','7plUBUm','MyCNM','Failed\x20to\x20read\x20opencode.json','project','OfKOi','stringify','isArray','utf-8','134428oPheoM','440wgBCgE','error','582234dDNLKq','opencode.json','✓\x20OpenCode\x20plugin\x20configured','plugin','658757SbhruF','19458ioZfjc','RNyEu','parse','NuNWc','includes','log','8JYAhgU','@ranger-testing/opencode-plugin','pluginScope','144wdVdCu','607790AlKDFm','Project\x20(shared\x20with\x20team\x20via\x20git)','tOsZY','PPcVt','BTYVq','VJTfG','1180878wmNWRd','prompt'];_0x5125=function(){return _0x2df103;};return _0x5125();}import{mkdir,readFile,writeFile}from'fs/promises';import _0x177e9a from'inquirer';import{getOpencodeConfigDir}from'../utils/opencodeConfig.js';function _0x6808(_0x3b8dfb,_0x42df40){_0x3b8dfb=_0x3b8dfb-0x9f;const _0x5125e5=_0x5125();let _0x680809=_0x5125e5[_0x3b8dfb];return _0x680809;}export async function ensureOpencodePluginConfig(_0x4edaef){const _0x586fa5=_0x6808,_0x58eee7={'OfKOi':function(_0x453a45,_0x4b41f6){return _0x453a45(_0x4b41f6);},'NuNWc':function(_0x56fbbc,_0x34208b,_0x46205b){return _0x56fbbc(_0x34208b,_0x46205b);},'VJTfG':function(_0x332263,_0x359286){return _0x332263(_0x359286);},'RNyEu':_0x586fa5(0xa7),'tOsZY':'\x0a📦\x20OpenCode\x20Plugin\x0a','qRTpF':'list','EdQKO':'User\x20(available\x20in\x20all\x20your\x20projects)','MyCNM':_0x586fa5(0xbf),'lMwAP':_0x586fa5(0xbb),'BTYVq':'https://opencode.ai/config.json','OhVxW':function(_0x752fb6,_0x2c06b0){return _0x752fb6(_0x2c06b0);},'XwzKh':function(_0x47afe6,_0x2718a7,_0x4d2cb1){return _0x47afe6(_0x2718a7,_0x4d2cb1);},'EsWAe':function(_0x5d1ed9,_0x1160b5){return _0x5d1ed9+_0x1160b5;},'PPcVt':_0x586fa5(0xb1)},_0x4a3a89=_0x58eee7[_0x586fa5(0xa8)](existsSync,_0x58eee7[_0x586fa5(0xb7)](join,_0x58eee7[_0x586fa5(0xc3)](getOpencodeConfigDir,_0x586fa5(0xa7)),_0x586fa5(0xb0)));let _0x170a26;if(_0x4edaef)_0x170a26=_0x4edaef;else{if(_0x4a3a89)_0x170a26=_0x58eee7[_0x586fa5(0xb5)];else{console[_0x586fa5(0xb9)](_0x58eee7[_0x586fa5(0xc0)]);const _0x4931cb=await _0x177e9a[_0x586fa5(0xa0)]([{'type':_0x58eee7['qRTpF'],'name':_0x586fa5(0xbc),'message':'Where\x20should\x20the\x20plugin\x20be\x20installed?','choices':[{'name':_0x58eee7['EdQKO'],'value':'user'},{'name':_0x58eee7[_0x586fa5(0xa5)],'value':_0x58eee7['RNyEu']}],'default':_0x586fa5(0xa1)}]);_0x170a26=_0x4931cb['pluginScope'];}}const _0x102c79=join(_0x58eee7[_0x586fa5(0xa8)](getOpencodeConfigDir,_0x170a26),'opencode.json'),_0x3a5c1d=_0x58eee7['lMwAP'],_0x587008=_0x58eee7[_0x586fa5(0xc2)];let _0x2a269c={};if(_0x58eee7['OhVxW'](existsSync,_0x102c79))try{const _0x152288=await _0x58eee7['NuNWc'](readFile,_0x102c79,_0x586fa5(0xab));_0x2a269c=JSON[_0x586fa5(0xb6)](_0x152288);}catch(_0x4736af){return console[_0x586fa5(0xae)]('⚠\x20Failed\x20to\x20read\x20opencode.json.\x20Please\x20add\x20the\x20plugin\x20manually.'),{'configured':![],'scope':_0x170a26,'error':_0x586fa5(0xa6),'details':_0x4736af};}const _0x29726e=Array[_0x586fa5(0xaa)](_0x2a269c[_0x586fa5(0xb2)])?_0x2a269c['plugin']:[];if(_0x29726e[_0x586fa5(0xb8)](_0x3a5c1d))return console['log']('✓\x20OpenCode\x20plugin\x20already\x20configured'),{'configured':![],'scope':_0x170a26};return _0x2a269c['$schema']=_0x2a269c['$schema']||_0x587008,_0x2a269c['plugin']=[..._0x29726e,_0x3a5c1d],await _0x58eee7['XwzKh'](mkdir,getOpencodeConfigDir(_0x170a26),{'recursive':!![]}),await writeFile(_0x102c79,_0x58eee7['EsWAe'](JSON[_0x586fa5(0xa9)](_0x2a269c,null,0x2),'\x0a')),console['log'](_0x58eee7[_0x586fa5(0xc1)]),{'configured':!![],'scope':_0x170a26};}
@@ -1 +1 @@
1
- (function(_0x53d086,_0x480990){const _0x5a15ce=_0x1416,_0x2a2491=_0x53d086();while(!![]){try{const _0x279d97=-parseInt(_0x5a15ce(0x1d9))/0x1*(-parseInt(_0x5a15ce(0x1e1))/0x2)+-parseInt(_0x5a15ce(0x1d0))/0x3+parseInt(_0x5a15ce(0x1d4))/0x4+parseInt(_0x5a15ce(0x1e2))/0x5+-parseInt(_0x5a15ce(0x1f0))/0x6+parseInt(_0x5a15ce(0x1e4))/0x7+parseInt(_0x5a15ce(0x1bc))/0x8*(parseInt(_0x5a15ce(0x200))/0x9);if(_0x279d97===_0x480990)break;else _0x2a2491['push'](_0x2a2491['shift']());}catch(_0x1db7e7){_0x2a2491['push'](_0x2a2491['shift']());}}}(_0xc475,0x67a21));import{mkdir,readFile,readdir}from'fs/promises';function _0x1416(_0x225e76,_0x322f31){_0x225e76=_0x225e76-0x1bb;const _0xc47506=_0xc475();let _0x1416b6=_0xc47506[_0x225e76];return _0x1416b6;}import{join}from'path';import{existsSync}from'fs';function _0xc475(){const _0x13bb9a=['YTBqO','chromium','install','xsMNU','message','uyrle','✓\x20Marketplace\x20already\x20added','rswZh','add','isDirectory','MccjF','yOoRo','error','You\x20can\x20install\x20manually:\x20claude\x20plugin\x20install\x20ranger@trailhead\x20--scope\x20project','No\x20API\x20token\x20available\x20for\x20decryption','auth','2492205xRbKzD','map','Auto-detected\x20CI\x20profile:\x20','CsFio','2091892vknMYl','\x20\x20No\x20auth\x20state\x20found\x20(app\x20may\x20not\x20require\x20authentication)','trackPhaseEnd','✓\x20Created\x20profile\x20settings:\x20baseUrl=','RlddQ','1xDxcPc','baseUrl','yHfeo','skipChromium','nySEC','trailhead','✓\x20Claude\x20Code\x20plugin\x20already\x20installed','sessions','22886WqrFNt','910200XIOrqo','profile','4593603KefqgN','Dgoow','trackPhaseStart','NFCfX','Installing\x20Claude\x20Code\x20plugin\x20(project\x20level)...','profile_activate','iEdPU','vOuxK','\x0a✅\x20Ranger\x20CI\x20setup\x20complete!\x0a','name','\x0a🔧\x20Ranger\x20CI\x20Setup\x0a','udkfc','2778252PWVJmD','iIVdM','settings.json','plugin','length','--scope','LcnlX','You\x20can\x20install\x20manually:\x20claude\x20plugin\x20marketplace\x20add\x20ranger-testing/trailhead','Or\x20specify\x20a\x20profile\x20name\x20with\x20--profile\x20and\x20--base-url\x20to\x20create\x20one.','✓\x20Encrypted\x20auth\x20verified\x20(will\x20decrypt\x20at\x20runtime)','log','ktqvf','ranger-testing/trailhead','GTYXR','Failed\x20to\x20install\x20plugin:','path','27hzJEvp','join','921528wSDDyR','CI\x20profile\x20\x22','rxTIO','guEIB'];_0xc475=function(){return _0x13bb9a;};return _0xc475();}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(_0x37c76f){const _0x310388=_0x1416,_0xb500d9={'sNOlJ':function(_0x759853,_0x4b0cdf,_0x5a1c57){return _0x759853(_0x4b0cdf,_0x5a1c57);},'yHfeo':function(_0x5ad3c0,_0x10a24a){return _0x5ad3c0(_0x10a24a);},'rxTIO':function(_0x172350,_0x563110){return _0x172350+_0x563110;},'iIVdM':function(_0x5ac123,_0x369fba){return _0x5ac123===_0x369fba;},'nySEC':function(_0x284f02,_0x22426b){return _0x284f02+_0x22426b;}},_0x5827ad=getRangerDir(),_0x19d716=_0xb500d9['sNOlJ'](join,_0x5827ad,'ci');if(_0x37c76f){const _0x1d57e1=join(_0x19d716,_0x37c76f);return{'name':_0x37c76f,'path':_0x1d57e1};}if(!_0xb500d9[_0x310388(0x1db)](existsSync,_0x19d716))throw new Error(_0xb500d9[_0x310388(0x1be)]('No\x20CI\x20profiles\x20found.\x20Create\x20one\x20first\x20with:\x20ranger\x20profile\x20add\x20<name>\x20--ci\x0a','Or\x20specify\x20a\x20profile\x20name\x20with\x20--profile\x20and\x20--base-url\x20to\x20create\x20one.'));const _0x266490=await readdir(_0x19d716,{'withFileTypes':!![]}),_0x52bcde=_0x266490['filter'](_0x526b23=>_0x526b23[_0x310388(0x1c9)]())[_0x310388(0x1d1)](_0x24edfd=>_0x24edfd[_0x310388(0x1ed)]);if(_0xb500d9[_0x310388(0x1f1)](_0x52bcde[_0x310388(0x1f4)],0x0))throw new Error(_0xb500d9[_0x310388(0x1dd)]('No\x20CI\x20profiles\x20found\x20in\x20.ranger/ci/.\x20Create\x20one\x20first\x20with:\x20ranger\x20profile\x20add\x20<name>\x20--ci\x0a',_0x310388(0x1f8)));if(_0x52bcde[_0x310388(0x1f4)]===0x1){const _0xb6e93d=_0x52bcde[0x0];return console['log'](_0x310388(0x1d2)+_0xb6e93d),{'name':_0xb6e93d,'path':join(_0x19d716,_0xb6e93d)};}throw new Error('Multiple\x20CI\x20profiles\x20found:\x20'+_0x52bcde[_0x310388(0x1bb)](',\x20')+'.\x20Use\x20--profile\x20to\x20specify\x20which\x20one.');}async function installPluginNonInteractive(){const _0x26d69d=_0x1416,_0x1d7a2e={'RlddQ':function(_0x32ee78,_0xed79ae){return _0x32ee78(_0xed79ae);},'FgBlw':_0x26d69d(0x1df),'guEIB':_0x26d69d(0x1e8),'CsFio':_0x26d69d(0x1de),'FvWsA':_0x26d69d(0x1c6),'armvO':_0x26d69d(0x1fc),'WYYZt':'Failed\x20to\x20add\x20marketplace:','olGrc':_0x26d69d(0x1f7),'JKuRJ':'plugin','ktqvf':_0x26d69d(0x1c2),'gPmpX':'project','Racce':_0x26d69d(0x1fe),'PNKOW':'✓\x20Claude\x20Code\x20plugin\x20installed'},_0x2b6f23=await _0x1d7a2e[_0x26d69d(0x1d8)](isPluginInstalled,'ranger@trailhead');if(_0x2b6f23)return console[_0x26d69d(0x1fa)](_0x1d7a2e['FgBlw']),![];console[_0x26d69d(0x1fa)](_0x1d7a2e[_0x26d69d(0x1bf)]);const _0x48216f=await isMarketplaceAdded(_0x1d7a2e[_0x26d69d(0x1d3)]);let _0x1a9d4e=_0x48216f;if(_0x48216f)console[_0x26d69d(0x1fa)](_0x1d7a2e['FvWsA']);else{const _0x352d0c=await _0x1d7a2e[_0x26d69d(0x1d8)](runClaudeCommand,['plugin','marketplace',_0x26d69d(0x1c8),_0x1d7a2e['armvO']]);!_0x352d0c['success']?(console['error'](_0x1d7a2e['WYYZt'],_0x352d0c[_0x26d69d(0x1cc)]),console[_0x26d69d(0x1fa)](_0x1d7a2e['olGrc'])):_0x1a9d4e=!![];}if(_0x1a9d4e){const _0x47b4e8=await _0x1d7a2e['RlddQ'](runClaudeCommand,[_0x1d7a2e['JKuRJ'],_0x1d7a2e[_0x26d69d(0x1fb)],'ranger@trailhead',_0x26d69d(0x1f5),_0x1d7a2e['gPmpX']]);!_0x47b4e8['success']?(console['error'](_0x1d7a2e['Racce'],_0x47b4e8[_0x26d69d(0x1cc)]),console['log'](_0x26d69d(0x1cd))):console[_0x26d69d(0x1fa)](_0x1d7a2e['PNKOW']);}return!![];}export async function setupCi(_0x2d480f,_0x820fd3,_0x87be42){const _0x5556a3=_0x1416,_0x2d81ca={'udkfc':_0x5556a3(0x1cf),'rswZh':function(_0x43573c,_0x275ae3){return _0x43573c(_0x275ae3);},'oDmzb':'dir_setup','uyrle':function(_0x433cc9){return _0x433cc9();},'xsMNU':function(_0x2c0750,_0x5c08bb){return _0x2c0750(_0x5c08bb);},'qtTeu':function(_0xd84f7f,_0x5657b0,_0x3b2a4a){return _0xd84f7f(_0x5657b0,_0x3b2a4a);},'iEdPU':_0x5556a3(0x1c1),'UDaIa':'✓\x20Skipping\x20Chromium\x20check\x20(--skip-chromium)','uGtzp':function(_0x4f53d2){return _0x4f53d2();},'GTYXR':_0x5556a3(0x1e9),'NFCfX':function(_0x281893,_0x562da8){return _0x281893(_0x562da8);},'pCOxi':_0x5556a3(0x1f2),'wOcJj':'auth.json','vOuxK':function(_0x32be31,_0x4bd1f2,_0x29e19e){return _0x32be31(_0x4bd1f2,_0x29e19e);},'MccjF':function(_0x289732,_0x57d235){return _0x289732(_0x57d235);},'qfgEu':_0x5556a3(0x1ce),'yOoRo':function(_0xafe307,_0x256045){return _0xafe307(_0x256045);},'PyEVs':'✓\x20Auth\x20state\x20found','YTBqO':function(_0x12df83){return _0x12df83();},'Dgoow':'skills','LcnlX':'project'};console[_0x5556a3(0x1fa)](_0x5556a3(0x1ee)),_0x87be42?.[_0x5556a3(0x1e6)](_0x2d81ca[_0x5556a3(0x1ef)]),await _0x2d81ca[_0x5556a3(0x1c7)](authenticate,_0x2d480f),_0x87be42?.['trackPhaseEnd'](_0x2d81ca[_0x5556a3(0x1ef)]),_0x87be42?.[_0x5556a3(0x1e6)](_0x2d81ca['oDmzb']);const {path:_0x4b34cb,installed:_0x271b5e}=await _0x2d81ca[_0x5556a3(0x1c5)](ensureRangerDir);await _0x2d81ca[_0x5556a3(0x1c3)](writeRangerGitignore,_0x4b34cb);const _0x47acf9=_0x2d81ca['qtTeu'](join,_0x4b34cb,_0x5556a3(0x1e0));!existsSync(_0x47acf9)&&await mkdir(_0x47acf9,{'recursive':!![]});_0x87be42?.['trackPhaseEnd']('dir_setup',{'installed':_0x271b5e}),_0x87be42?.[_0x5556a3(0x1e6)](_0x2d81ca[_0x5556a3(0x1ea)]);let _0x466047=![];_0x820fd3?.['skipChromium']?console[_0x5556a3(0x1fa)](_0x2d81ca['UDaIa']):_0x466047=await _0x2d81ca['uGtzp'](ensureChromium);_0x87be42?.['trackPhaseEnd']('chromium',{'installed':_0x466047,'skipped':!!_0x820fd3?.[_0x5556a3(0x1dc)]}),_0x87be42?.[_0x5556a3(0x1e6)](_0x2d81ca[_0x5556a3(0x1fd)]);const _0x4e072c=await _0x2d81ca['NFCfX'](findCiProfile,_0x820fd3?.[_0x5556a3(0x1e3)]);let _0x3929d3=![];_0x820fd3?.['baseUrl']&&(await mkdir(_0x4e072c['path'],{'recursive':!![]}),await saveSettings(_0x4e072c[_0x5556a3(0x1ed)],{'baseUrl':_0x820fd3[_0x5556a3(0x1da)],'headless':!![]}),console[_0x5556a3(0x1fa)](_0x5556a3(0x1d7)+_0x820fd3['baseUrl']),_0x3929d3=!![]);const _0x2b987d=join(_0x4e072c['path'],_0x2d81ca['pCOxi']);if(!_0x2d81ca[_0x5556a3(0x1e7)](existsSync,_0x2b987d)&&!_0x3929d3)throw new Error(_0x5556a3(0x1bd)+_0x4e072c['name']+'\x22\x20has\x20no\x20settings.json.\x20Use\x20--base-url\x20to\x20configure\x20it.');const _0x1cbed6=join(_0x4e072c[_0x5556a3(0x1ff)],_0x2d81ca['wOcJj']),_0x544334=_0x2d81ca[_0x5556a3(0x1eb)](join,_0x4e072c[_0x5556a3(0x1ff)],'auth.json.enc'),_0x56ee23=_0x2d81ca[_0x5556a3(0x1ca)](existsSync,_0x1cbed6),_0x35a1e1=_0x2d81ca['NFCfX'](existsSync,_0x544334);if(_0x35a1e1)try{const _0x3e6b9f=await _0x2d81ca['uyrle'](getToken);if(!_0x3e6b9f)throw new Error(_0x2d81ca['qfgEu']);const _0x12e355=await _0x2d81ca[_0x5556a3(0x1cb)](readFile,_0x544334);_0x2d81ca[_0x5556a3(0x1eb)](decrypt,_0x12e355,_0x3e6b9f),console['log'](_0x5556a3(0x1f9));}catch(_0xa4d338){const _0x5d3470=_0xa4d338 instanceof Error?_0xa4d338[_0x5556a3(0x1c4)]:String(_0xa4d338);throw new Error('Failed\x20to\x20verify\x20encrypted\x20auth\x20for\x20profile\x20\x22'+_0x4e072c[_0x5556a3(0x1ed)]+'\x22:\x20'+_0x5d3470);}else _0x56ee23?console['log'](_0x2d81ca['PyEVs']):console[_0x5556a3(0x1fa)](_0x5556a3(0x1d5));await writeActiveProfileName(_0x4e072c['name']),console[_0x5556a3(0x1fa)]('✓\x20Active\x20profile:\x20'+_0x4e072c['name']),_0x87be42?.[_0x5556a3(0x1d6)](_0x2d81ca['GTYXR'],{'profileName':_0x4e072c['name'],'hasAuth':_0x56ee23,'hasEncryptedAuth':_0x35a1e1,'createdSettings':_0x3929d3}),_0x87be42?.[_0x5556a3(0x1e6)]('plugin');const _0x37e9d3=await _0x2d81ca[_0x5556a3(0x1c0)](installPluginNonInteractive);_0x87be42?.[_0x5556a3(0x1d6)](_0x5556a3(0x1f3),{'installed':_0x37e9d3}),_0x87be42?.['trackPhaseStart'](_0x2d81ca[_0x5556a3(0x1e5)]),await skillup({'autoInstall':_0x2d81ca[_0x5556a3(0x1f6)]}),_0x87be42?.['trackPhaseEnd'](_0x2d81ca[_0x5556a3(0x1e5)]),console[_0x5556a3(0x1fa)](_0x5556a3(0x1ec));}
1
+ (function(_0x57148c,_0x28ea47){const _0x41a133=_0x3a7a,_0xa9890c=_0x57148c();while(!![]){try{const _0x44569a=-parseInt(_0x41a133(0xf3))/0x1+-parseInt(_0x41a133(0x10a))/0x2*(-parseInt(_0x41a133(0x10e))/0x3)+-parseInt(_0x41a133(0x123))/0x4+-parseInt(_0x41a133(0x125))/0x5*(-parseInt(_0x41a133(0x112))/0x6)+parseInt(_0x41a133(0x11b))/0x7*(-parseInt(_0x41a133(0x131))/0x8)+-parseInt(_0x41a133(0x110))/0x9+-parseInt(_0x41a133(0x106))/0xa*(-parseInt(_0x41a133(0x105))/0xb);if(_0x44569a===_0x28ea47)break;else _0xa9890c['push'](_0xa9890c['shift']());}catch(_0x14f5d2){_0xa9890c['push'](_0xa9890c['shift']());}}}(_0x4855,0x7f0f0));import{mkdir,readFile,readdir}from'fs/promises';import{join}from'path';import{existsSync}from'fs';import{authenticate,ensureRangerDir,ensureChromium,writeRangerGitignore}from'./start.js';import{skillup}from'./skillup.js';import{getRangerDir}from'./utils/rangerRoot.js';import{writeActiveProfileName}from'./utils/activeProfile.js';function _0x3a7a(_0x5d081e,_0x5bb72c){_0x5d081e=_0x5d081e-0xf0;const _0x485556=_0x4855();let _0x3a7a4f=_0x485556[_0x5d081e];return _0x3a7a4f;}import{saveSettings}from'./utils/settings.js';import{decrypt}from'./utils/crypto.js';import{getToken}from'./utils/keychain.js';import{runClaudeCommand,isMarketplaceAdded,isPluginInstalled}from'./utils/claudePlugin.js';function _0x4855(){const _0x357884=['path','bgZih','40RSXtiA','sessions','length','HcqVr','PlBRd','604897Vkrapx','map','SYDlg','ZKQDW','✓\x20Encrypted\x20auth\x20verified\x20(will\x20decrypt\x20at\x20runtime)','Installing\x20Claude\x20Code\x20plugin\x20(project\x20level)...','message','skipChromium','UqsVl','No\x20API\x20token\x20available\x20for\x20decryption','chromium','vwLkp','\x22:\x20','profile','\x0a🔧\x20Ranger\x20CI\x20Setup\x0a','--scope','success','NVMjT','69663jwldqv','1360RprbUa','marketplace','Failed\x20to\x20verify\x20encrypted\x20auth\x20for\x20profile\x20\x22','Failed\x20to\x20add\x20marketplace:','261674GWzoBs','GwAtN','\x22\x20has\x20no\x20settings.json.\x20Use\x20--base-url\x20to\x20configure\x20it.','QgqBi','15lcfRGr','isDirectory','4505238UggudG','log','2454scSUia','name','trackPhaseStart','auth','plugin','✓\x20Marketplace\x20already\x20added','DSWyK','KbOGj','trackPhaseEnd','287469XHMINx','hMaXY','baseUrl','auth.json','lkogp','\x20\x20No\x20auth\x20state\x20found\x20(app\x20may\x20not\x20require\x20authentication)','wvDvv','✓\x20Claude\x20Code\x20plugin\x20installed','893156mvSSbs','profile_activate','6590zsQuNf','dir_setup','join','✓\x20Active\x20profile:\x20','error','Jufrp','qGFIU','yPdUE','CI\x20profile\x20\x22','✓\x20Claude\x20Code\x20plugin\x20already\x20installed'];_0x4855=function(){return _0x357884;};return _0x4855();}async function findCiProfile(_0x345d35){const _0x3ad714=_0x3a7a,_0x522517={'UqsVl':function(_0x53c237){return _0x53c237();},'KbOGj':function(_0x5b7ee9,_0x20731a,_0x4a47b1){return _0x5b7ee9(_0x20731a,_0x4a47b1);},'SYDlg':function(_0x5d34ba,_0x3a1a20){return _0x5d34ba===_0x3a1a20;},'HxRqt':function(_0x5ef5d6,_0x17d0ab){return _0x5ef5d6+_0x17d0ab;}},_0x34d2e7=_0x522517[_0x3ad714(0xfb)](getRangerDir),_0x4cfcf2=_0x522517['KbOGj'](join,_0x34d2e7,'ci');if(_0x345d35){const _0x545fe9=join(_0x4cfcf2,_0x345d35);return{'name':_0x345d35,'path':_0x545fe9};}if(!existsSync(_0x4cfcf2))throw new Error('No\x20CI\x20profiles\x20found.\x20Create\x20one\x20first\x20with:\x20ranger\x20profile\x20add\x20<name>\x20--ci\x0a'+'Or\x20specify\x20a\x20profile\x20name\x20with\x20--profile\x20and\x20--base-url\x20to\x20create\x20one.');const _0x37927f=await _0x522517[_0x3ad714(0x119)](readdir,_0x4cfcf2,{'withFileTypes':!![]}),_0x2c7fe1=_0x37927f['filter'](_0x2f9e5c=>_0x2f9e5c[_0x3ad714(0x10f)]())[_0x3ad714(0xf4)](_0x41d425=>_0x41d425['name']);if(_0x522517[_0x3ad714(0xf5)](_0x2c7fe1['length'],0x0))throw new Error(_0x522517['HxRqt']('No\x20CI\x20profiles\x20found\x20in\x20.ranger/ci/.\x20Create\x20one\x20first\x20with:\x20ranger\x20profile\x20add\x20<name>\x20--ci\x0a','Or\x20specify\x20a\x20profile\x20name\x20with\x20--profile\x20and\x20--base-url\x20to\x20create\x20one.'));if(_0x522517[_0x3ad714(0xf5)](_0x2c7fe1[_0x3ad714(0xf0)],0x1)){const _0x47b44e=_0x2c7fe1[0x0];return console[_0x3ad714(0x111)]('Auto-detected\x20CI\x20profile:\x20'+_0x47b44e),{'name':_0x47b44e,'path':join(_0x4cfcf2,_0x47b44e)};}throw new Error('Multiple\x20CI\x20profiles\x20found:\x20'+_0x2c7fe1[_0x3ad714(0x127)](',\x20')+'.\x20Use\x20--profile\x20to\x20specify\x20which\x20one.');}async function installPluginNonInteractive(){const _0x387800=_0x3a7a,_0x1d17e2={'RhKej':function(_0x2ac8a8,_0x56e752){return _0x2ac8a8(_0x56e752);},'GwAtN':_0x387800(0x12e),'qEEAy':_0x387800(0x117),'wvDvv':_0x387800(0x116),'QgqBi':_0x387800(0x107),'vwLkp':'ranger-testing/trailhead','hPLmO':'You\x20can\x20install\x20manually:\x20claude\x20plugin\x20marketplace\x20add\x20ranger-testing/trailhead','ifglm':'install','VlyYH':'Failed\x20to\x20install\x20plugin:'},_0x338da6=await _0x1d17e2['RhKej'](isPluginInstalled,'ranger@trailhead');if(_0x338da6)return console[_0x387800(0x111)](_0x1d17e2[_0x387800(0x10b)]),![];console['log'](_0x387800(0xf8));const _0x3afdb4=await isMarketplaceAdded('trailhead');let _0x2dec04=_0x3afdb4;if(_0x3afdb4)console['log'](_0x1d17e2['qEEAy']);else{const _0x21969a=await runClaudeCommand([_0x1d17e2[_0x387800(0x121)],_0x1d17e2[_0x387800(0x10d)],'add',_0x1d17e2[_0x387800(0xfe)]]);!_0x21969a[_0x387800(0x103)]?(console['error'](_0x387800(0x109),_0x21969a[_0x387800(0x129)]),console['log'](_0x1d17e2['hPLmO'])):_0x2dec04=!![];}if(_0x2dec04){const _0x2137b3=await runClaudeCommand(['plugin',_0x1d17e2['ifglm'],'ranger@trailhead',_0x387800(0x102),'project']);!_0x2137b3['success']?(console['error'](_0x1d17e2['VlyYH'],_0x2137b3['error']),console['log']('You\x20can\x20install\x20manually:\x20claude\x20plugin\x20install\x20ranger@trailhead\x20--scope\x20project')):console['log'](_0x387800(0x122));}return!![];}export async function setupCi(_0x1c7b4f,_0x3a3cbf,_0x1c0d00){const _0x24819f=_0x3a7a,_0x354091={'hMaXY':_0x24819f(0x101),'DSWyK':'auth','qGFIU':function(_0x102610,_0x3e8a0e){return _0x102610(_0x3e8a0e);},'NVMjT':function(_0x4f0567,_0x3b4513,_0x402567){return _0x4f0567(_0x3b4513,_0x402567);},'Jufrp':'dir_setup','lkogp':_0x24819f(0xfd),'ubTlr':'settings.json','ZKQDW':function(_0x1b1208,_0x4db326,_0x498d67){return _0x1b1208(_0x4db326,_0x498d67);},'HcqVr':function(_0x17d3f0,_0x57d040){return _0x17d3f0(_0x57d040);},'yPdUE':_0x24819f(0xfc),'Uslno':function(_0x4e31c1,_0x36e314){return _0x4e31c1(_0x36e314);},'OctDC':'✓\x20Auth\x20state\x20found','oofvL':_0x24819f(0x120),'bgZih':function(_0xf86ef4,_0x308aff){return _0xf86ef4(_0x308aff);},'PlBRd':_0x24819f(0x116),'jqgHV':'skills'};console[_0x24819f(0x111)](_0x354091[_0x24819f(0x11c)]),_0x1c0d00?.[_0x24819f(0x114)](_0x24819f(0x115)),await authenticate(_0x1c7b4f),_0x1c0d00?.['trackPhaseEnd'](_0x354091[_0x24819f(0x118)]),_0x1c0d00?.[_0x24819f(0x114)](_0x24819f(0x126));const {path:_0x2eca69,installed:_0x3ef9ba}=await ensureRangerDir();await writeRangerGitignore(_0x2eca69);const _0x432702=join(_0x2eca69,_0x24819f(0x132));!_0x354091[_0x24819f(0x12b)](existsSync,_0x432702)&&await _0x354091[_0x24819f(0x104)](mkdir,_0x432702,{'recursive':!![]});_0x1c0d00?.[_0x24819f(0x11a)](_0x354091[_0x24819f(0x12a)],{'installed':_0x3ef9ba}),_0x1c0d00?.['trackPhaseStart'](_0x24819f(0xfd));let _0x38d01c=![];_0x3a3cbf?.[_0x24819f(0xfa)]?console[_0x24819f(0x111)]('✓\x20Skipping\x20Chromium\x20check\x20(--skip-chromium)'):_0x38d01c=await ensureChromium();_0x1c0d00?.[_0x24819f(0x11a)](_0x354091[_0x24819f(0x11f)],{'installed':_0x38d01c,'skipped':!!_0x3a3cbf?.['skipChromium']}),_0x1c0d00?.['trackPhaseStart']('profile_activate');const _0x4c2c71=await _0x354091['qGFIU'](findCiProfile,_0x3a3cbf?.[_0x24819f(0x100)]);let _0x3c2d43=![];_0x3a3cbf?.[_0x24819f(0x11d)]&&(await mkdir(_0x4c2c71['path'],{'recursive':!![]}),await saveSettings(_0x4c2c71[_0x24819f(0x113)],{'baseUrl':_0x3a3cbf['baseUrl'],'headless':!![]}),console[_0x24819f(0x111)]('✓\x20Created\x20profile\x20settings:\x20baseUrl='+_0x3a3cbf['baseUrl']),_0x3c2d43=!![]);const _0xe302f2=_0x354091[_0x24819f(0x104)](join,_0x4c2c71['path'],_0x354091['ubTlr']);if(!_0x354091[_0x24819f(0x12b)](existsSync,_0xe302f2)&&!_0x3c2d43)throw new Error(_0x24819f(0x12d)+_0x4c2c71[_0x24819f(0x113)]+_0x24819f(0x10c));const _0x2d3d08=_0x354091[_0x24819f(0xf6)](join,_0x4c2c71[_0x24819f(0x12f)],_0x24819f(0x11e)),_0x50aa83=join(_0x4c2c71[_0x24819f(0x12f)],'auth.json.enc'),_0x2ae4a7=_0x354091[_0x24819f(0xf1)](existsSync,_0x2d3d08),_0x3e6503=existsSync(_0x50aa83);if(_0x3e6503)try{const _0x93b3df=await getToken();if(!_0x93b3df)throw new Error(_0x354091[_0x24819f(0x12c)]);const _0x2bc2f3=await _0x354091['Uslno'](readFile,_0x50aa83);decrypt(_0x2bc2f3,_0x93b3df),console[_0x24819f(0x111)](_0x24819f(0xf7));}catch(_0x4d28fe){const _0x213b51=_0x4d28fe instanceof Error?_0x4d28fe[_0x24819f(0xf9)]:String(_0x4d28fe);throw new Error(_0x24819f(0x108)+_0x4c2c71[_0x24819f(0x113)]+_0x24819f(0xff)+_0x213b51);}else _0x2ae4a7?console['log'](_0x354091['OctDC']):console[_0x24819f(0x111)](_0x354091['oofvL']);await _0x354091[_0x24819f(0x130)](writeActiveProfileName,_0x4c2c71[_0x24819f(0x113)]),console[_0x24819f(0x111)](_0x24819f(0x128)+_0x4c2c71[_0x24819f(0x113)]),_0x1c0d00?.[_0x24819f(0x11a)](_0x24819f(0x124),{'profileName':_0x4c2c71['name'],'hasAuth':_0x2ae4a7,'hasEncryptedAuth':_0x3e6503,'createdSettings':_0x3c2d43}),_0x1c0d00?.[_0x24819f(0x114)](_0x354091[_0x24819f(0xf2)]);const _0x3ee44e=await installPluginNonInteractive();_0x1c0d00?.[_0x24819f(0x11a)](_0x354091['PlBRd'],{'installed':_0x3ee44e}),_0x1c0d00?.['trackPhaseStart'](_0x354091['jqgHV']),await _0x354091[_0x24819f(0x130)](skillup,{'autoInstall':'project'}),_0x1c0d00?.[_0x24819f(0x11a)](_0x354091['jqgHV']),console[_0x24819f(0x111)]('\x0a✅\x20Ranger\x20CI\x20setup\x20complete!\x0a');}
@@ -1 +1 @@
1
- (function(_0x25071b,_0x26f740){const _0xddea61=_0xf4f8,_0x432021=_0x25071b();while(!![]){try{const _0x27ad64=-parseInt(_0xddea61(0x92))/0x1+-parseInt(_0xddea61(0x97))/0x2*(parseInt(_0xddea61(0x82))/0x3)+-parseInt(_0xddea61(0x9e))/0x4+-parseInt(_0xddea61(0x8d))/0x5+parseInt(_0xddea61(0x95))/0x6+-parseInt(_0xddea61(0xa0))/0x7*(parseInt(_0xddea61(0x7b))/0x8)+parseInt(_0xddea61(0x9f))/0x9;if(_0x27ad64===_0x26f740)break;else _0x432021['push'](_0x432021['shift']());}catch(_0x45627c){_0x432021['push'](_0x432021['shift']());}}}(_0x4305,0xc378f));import{basename}from'path';import _0x132d62 from'inquirer';import{getToken}from'./utils/keychain.js';import{installSkill}from'./utils/skills.js';import{getCurrentVersion}from'./utils/version.js';function _0x4305(){const _0x4575dd=['/.opencode/skills/','4873248VMBbMs','wLBkC','37694RmtcCC','\x0a📦\x20Installing\x20skills...\x0a','Zchxw','warn','\x20\x20-\x20Start\x20OpenCode\x20and\x20run\x20the\x20`ranger_enable`\x20tool\x20to\x20enable\x20hooks.','zkOsY','\x20skill','4027348OlKsgN','39676032upKquH','10242001mGaKat','fuDvQ','\x0a✅\x20Installed\x20','8sjeRON','\x20\x201.\x20Get\x20your\x20API\x20token\x20from\x20https://dashboard.ranger.net/cli','autoInstall','/.claude/skills/','\x0a🎯\x20Ranger\x20Skill\x20Setup\x0a','To\x20get\x20started:','vGhcg','60twuZmD','project','\x20--opencode','log','yMNtI','YNeMU','cieLq','ITDXf','yCHoC','stdin','/skills/','3072640uvNLiO','This\x20project\x20only\x20(','wYFvW','project-level','opencode','958553WRURCW','✓\x20Found\x20API\x20token'];_0x4305=function(){return _0x4575dd;};return _0x4305();}import{getClaudeConfigDir,getProjectRoot}from'./utils/claudeConfig.js';function _0xf4f8(_0x36eb1e,_0x4c1fb1){_0x36eb1e=_0x36eb1e-0x79;const _0x4305e6=_0x4305();let _0xf4f8ff=_0x4305e6[_0x36eb1e];return _0xf4f8ff;}import{getOpencodeConfigDir}from'./utils/opencodeConfig.js';export async function skillup(_0x39e673={}){const _0x431305=_0xf4f8,_0x38987b={'pfUNz':'claude','YNeMU':_0x431305(0x7c),'wLBkC':function(_0xc78d9d,_0x39dbd8){return _0xc78d9d===_0x39dbd8;},'wYFvW':_0x431305(0x91),'sWure':_0x431305(0x84),'fuDvQ':_0x431305(0x93),'vGhcg':function(_0xbc4038,_0x267056){return _0xbc4038(_0x267056);},'NqXKN':function(_0x5981b4,_0xdb40f9){return _0x5981b4(_0xdb40f9);},'Zchxw':'user','PjFSM':function(_0x2261a9){return _0x2261a9();},'wnCxJ':'list','aqBsS':'installLevel','YOWdB':_0x431305(0x98),'cieLq':'ranger','yMNtI':'\x20\x20Failed\x20to\x20install\x20ranger\x20skill:','yCHoC':'user-level','ITDXf':_0x431305(0x90),'gnTXU':function(_0x303814,_0x918e05){return _0x303814>_0x918e05;},'zkOsY':'\x20\x20-\x20Open\x20Claude\x20Code\x20in\x20plan\x20mode\x20and\x20run\x20/ranger:enable.\x20Plan\x20out\x20a\x20UI\x20feature\x20with\x20Ranger\x20and\x20watch\x20Ranger\x20test\x20it\x20for\x20you!'};console['log'](_0x431305(0x7f));const _0x7f851f=_0x39e673['platform']??_0x38987b['pfUNz'],_0x3cd3f2=await getToken();if(!_0x3cd3f2){console[_0x431305(0x85)]('❌\x20No\x20Ranger\x20API\x20token\x20found.\x0a'),console[_0x431305(0x85)](_0x431305(0x80)),console['log'](_0x38987b[_0x431305(0x87)]),console['log']('\x20\x202.\x20Run:\x20ranger\x20setup'+(_0x38987b[_0x431305(0x96)](_0x7f851f,_0x38987b['wYFvW'])?'\x20--opencode':'')+'\x20<your-api-token>'),console['log']('\x20\x203.\x20Run:\x20ranger\x20skillup'+(_0x7f851f===_0x38987b[_0x431305(0x8f)]?_0x38987b['sWure']:'')+'\x0a');return;}console['log'](_0x38987b[_0x431305(0x79)]);const _0x497c11=getProjectRoot(),_0x347380=_0x38987b[_0x431305(0x81)](basename,_0x497c11),_0x2f79d7=_0x7f851f===_0x38987b['wYFvW']?_0x38987b['NqXKN'](getOpencodeConfigDir,_0x38987b['Zchxw'])+_0x431305(0x8c):_0x38987b['PjFSM'](getClaudeConfigDir)+'/skills/',_0x422aa2=_0x7f851f==='opencode'?_0x497c11+_0x431305(0x94):_0x497c11+_0x431305(0x7e),_0x53f4c7=process[_0x431305(0x8b)]['isTTY']&&process['stdout']['isTTY'];let _0xe94e00;if(_0x39e673['autoInstall'])_0xe94e00=_0x39e673[_0x431305(0x7d)];else{if(_0x53f4c7){const _0x4227f8=await _0x132d62['prompt']([{'type':_0x38987b['wnCxJ'],'name':_0x38987b['aqBsS'],'message':'Where\x20should\x20skills\x20be\x20installed?','choices':[{'name':'All\x20projects\x20('+_0x2f79d7+')','value':'user'},{'name':_0x431305(0x8e)+_0x422aa2+')','value':_0x431305(0x83)}]}]);_0xe94e00=_0x4227f8['installLevel'];}else _0xe94e00=_0x431305(0x83),console[_0x431305(0x85)]('Non-interactive\x20mode:\x20Installing\x20skills\x20at\x20project\x20level\x20('+_0x422aa2+')');}let _0x276ca9=0x0;const _0xbe9624=getCurrentVersion();console[_0x431305(0x85)](_0x38987b['YOWdB']);try{const _0x2990db=await installSkill(_0x38987b[_0x431305(0x88)],{'cliVersion':_0xbe9624,'level':_0xe94e00,'platform':_0x7f851f});_0x2990db&&_0x276ca9++;}catch(_0x52f998){console[_0x431305(0x9a)](_0x38987b[_0x431305(0x86)],_0x52f998 instanceof Error?_0x52f998['message']:_0x52f998);}if(_0x276ca9>0x0){const _0x50b3cc=_0x38987b[_0x431305(0x96)](_0xe94e00,_0x38987b[_0x431305(0x99)])?_0x38987b[_0x431305(0x8a)]:_0x38987b[_0x431305(0x89)];console[_0x431305(0x85)](_0x431305(0x7a)+_0x276ca9+'\x20'+_0x50b3cc+_0x431305(0x9d)+(_0x38987b['gnTXU'](_0x276ca9,0x1)?'s':'')+'\x20successfully!\x0a'),!_0x39e673['suppressUsage']&&(console[_0x431305(0x85)]('To\x20use:'),_0x7f851f==='opencode'?console['log'](_0x431305(0x9b)):console['log'](_0x38987b[_0x431305(0x9c)]));}else console[_0x431305(0x85)]('\x0a⚠️\x20\x20No\x20skills\x20were\x20installed.\x0a');}
1
+ function _0x18bd(_0x5a849d,_0xad1de1){_0x5a849d=_0x5a849d-0x134;const _0x52160f=_0x5216();let _0x18bd1a=_0x52160f[_0x5a849d];return _0x18bd1a;}(function(_0x271c0b,_0x1e9ae3){const _0x1bae53=_0x18bd,_0x4f9a2e=_0x271c0b();while(!![]){try{const _0x4392ee=parseInt(_0x1bae53(0x148))/0x1+parseInt(_0x1bae53(0x13b))/0x2+parseInt(_0x1bae53(0x159))/0x3+parseInt(_0x1bae53(0x13a))/0x4+-parseInt(_0x1bae53(0x14e))/0x5+parseInt(_0x1bae53(0x156))/0x6*(-parseInt(_0x1bae53(0x15c))/0x7)+parseInt(_0x1bae53(0x143))/0x8;if(_0x4392ee===_0x1e9ae3)break;else _0x4f9a2e['push'](_0x4f9a2e['shift']());}catch(_0x3d1d64){_0x4f9a2e['push'](_0x4f9a2e['shift']());}}}(_0x5216,0xbd899));import{basename}from'path';import _0x3270b2 from'inquirer';import{getToken}from'./utils/keychain.js';import{installSkill}from'./utils/skills.js';function _0x5216(){const _0x351fb9=['message','\x20\x20-\x20Start\x20OpenCode\x20and\x20run\x20the\x20`ranger_enable`\x20tool\x20to\x20enable\x20hooks.','/skills/','log','313464JKbHRr','OCdvS','rOXzY','1089519SxutsW','DuTwd','\x20--opencode','147pSwFLC','user-level','/.opencode/skills/','ttlmO','\x0a🎯\x20Ranger\x20Skill\x20Setup\x0a','This\x20project\x20only\x20(','user','project','autoInstall','NURfb','2328380qIEkpi','849882TEzwUN','project-level','\x20\x20Failed\x20to\x20install\x20ranger\x20skill:','prompt','mjcFk','stdin','krEPf','/.claude/skills/','3264048Kgjtmd','\x0a⚠️\x20\x20No\x20skills\x20were\x20installed.\x0a','installLevel','sRKbC','❌\x20No\x20Ranger\x20API\x20token\x20found.\x0a','1155732zeYzvf','\x20\x201.\x20Get\x20your\x20API\x20token\x20from\x20https://dashboard.ranger.net/cli','stdout','\x20\x202.\x20Run:\x20ranger\x20setup','LfTtB','EBCzF','5302390hZJRSw','list','\x20skill','\x20\x203.\x20Run:\x20ranger\x20skillup'];_0x5216=function(){return _0x351fb9;};return _0x5216();}import{getCurrentVersion}from'./utils/version.js';import{getClaudeConfigDir,getProjectRoot}from'./utils/claudeConfig.js';import{getOpencodeConfigDir}from'./utils/opencodeConfig.js';export async function skillup(_0x192504={}){const _0x26f11d=_0x18bd,_0x3ec23b={'xbSYl':_0x26f11d(0x134),'ttlmO':'claude','LfTtB':function(_0x348481){return _0x348481();},'xjAIm':'5|2|1|4|3|0','GBoLd':_0x26f11d(0x149),'sRKbC':function(_0x1b8641,_0x1cf856){return _0x1b8641===_0x1cf856;},'krEPf':_0x26f11d(0x15b),'rOXzY':'opencode','NURfb':function(_0x1107db,_0x5e48c8){return _0x1107db(_0x5e48c8);},'OCdvS':_0x26f11d(0x136),'gwmVT':_0x26f11d(0x145),'uhllP':'Where\x20should\x20skills\x20be\x20installed?','HHOrA':_0x26f11d(0x137),'DuTwd':'\x0a📦\x20Installing\x20skills...\x0a','WTtCs':function(_0x1822b9,_0x52b3bc,_0x3540d2){return _0x1822b9(_0x52b3bc,_0x3540d2);},'mjcFk':_0x26f11d(0x13d),'LHVfe':function(_0x1fd91a,_0x212fbd){return _0x1fd91a instanceof _0x212fbd;},'JlyHq':function(_0x14824e,_0x21b3c1){return _0x14824e>_0x21b3c1;},'EBCzF':'To\x20use:','yvtiQ':_0x26f11d(0x153),'kUVHC':_0x26f11d(0x144)};console[_0x26f11d(0x155)](_0x3ec23b['xbSYl']);const _0x842632=_0x192504['platform']??_0x3ec23b[_0x26f11d(0x15f)],_0x3d0e5f=await _0x3ec23b['LfTtB'](getToken);if(!_0x3d0e5f){const _0x47f227=_0x3ec23b['xjAIm']['split']('|');let _0x11e61c=0x0;while(!![]){switch(_0x47f227[_0x11e61c++]){case'0':return;case'1':console['log'](_0x3ec23b['GBoLd']);continue;case'2':console['log']('To\x20get\x20started:');continue;case'3':console[_0x26f11d(0x155)](_0x26f11d(0x151)+(_0x3ec23b['sRKbC'](_0x842632,'opencode')?_0x3ec23b[_0x26f11d(0x141)]:'')+'\x0a');continue;case'4':console[_0x26f11d(0x155)](_0x26f11d(0x14b)+(_0x842632===_0x3ec23b['rOXzY']?_0x3ec23b[_0x26f11d(0x141)]:'')+'\x20<your-api-token>');continue;case'5':console[_0x26f11d(0x155)](_0x26f11d(0x147));continue;}break;}}console[_0x26f11d(0x155)]('✓\x20Found\x20API\x20token');const _0x35e271=getProjectRoot(),_0x590eed=_0x3ec23b[_0x26f11d(0x139)](basename,_0x35e271),_0x2bf9a3=_0x3ec23b[_0x26f11d(0x146)](_0x842632,_0x3ec23b[_0x26f11d(0x158)])?getOpencodeConfigDir(_0x3ec23b['OCdvS'])+'/skills/':_0x3ec23b[_0x26f11d(0x14c)](getClaudeConfigDir)+_0x26f11d(0x154),_0x11d466=_0x842632===_0x3ec23b['rOXzY']?_0x35e271+_0x26f11d(0x15e):_0x35e271+_0x26f11d(0x142),_0x58356e=process[_0x26f11d(0x140)]['isTTY']&&process[_0x26f11d(0x14a)]['isTTY'];let _0x512a57;if(_0x192504[_0x26f11d(0x138)])_0x512a57=_0x192504['autoInstall'];else{if(_0x58356e){const _0x1537d8=await _0x3270b2[_0x26f11d(0x13e)]([{'type':_0x26f11d(0x14f),'name':_0x3ec23b['gwmVT'],'message':_0x3ec23b['uhllP'],'choices':[{'name':'All\x20projects\x20('+_0x2bf9a3+')','value':_0x3ec23b['OCdvS']},{'name':_0x26f11d(0x135)+_0x11d466+')','value':'project'}]}]);_0x512a57=_0x1537d8['installLevel'];}else _0x512a57=_0x3ec23b['HHOrA'],console[_0x26f11d(0x155)]('Non-interactive\x20mode:\x20Installing\x20skills\x20at\x20project\x20level\x20('+_0x11d466+')');}let _0x302d64=0x0;const _0x1f0fde=_0x3ec23b['LfTtB'](getCurrentVersion);console[_0x26f11d(0x155)](_0x3ec23b[_0x26f11d(0x15a)]);try{const _0x58b8b7=await _0x3ec23b['WTtCs'](installSkill,'ranger',{'cliVersion':_0x1f0fde,'level':_0x512a57,'platform':_0x842632});_0x58b8b7&&_0x302d64++;}catch(_0x46ebe5){console['warn'](_0x3ec23b[_0x26f11d(0x13f)],_0x3ec23b['LHVfe'](_0x46ebe5,Error)?_0x46ebe5[_0x26f11d(0x152)]:_0x46ebe5);}if(_0x3ec23b['JlyHq'](_0x302d64,0x0)){const _0x1a61c7=_0x3ec23b[_0x26f11d(0x146)](_0x512a57,_0x3ec23b[_0x26f11d(0x157)])?_0x26f11d(0x15d):_0x26f11d(0x13c);console['log']('\x0a✅\x20Installed\x20'+_0x302d64+'\x20'+_0x1a61c7+_0x26f11d(0x150)+(_0x3ec23b['JlyHq'](_0x302d64,0x1)?'s':'')+'\x20successfully!\x0a'),!_0x192504['suppressUsage']&&(console[_0x26f11d(0x155)](_0x3ec23b[_0x26f11d(0x14d)]),_0x842632===_0x3ec23b['rOXzY']?console[_0x26f11d(0x155)](_0x3ec23b['yvtiQ']):console[_0x26f11d(0x155)]('\x20\x20-\x20Open\x20Claude\x20Code\x20in\x20plan\x20mode\x20and\x20run\x20/ranger:enable.\x20Plan\x20out\x20a\x20UI\x20feature\x20with\x20Ranger\x20and\x20watch\x20Ranger\x20test\x20it\x20for\x20you!'));}else console[_0x26f11d(0x155)](_0x3ec23b['kUVHC']);}
@@ -1 +1 @@
1
- const _0x4597ab=_0x40ee;(function(_0x46eb65,_0x45c22b){const _0x8a2a93=_0x40ee,_0x551c70=_0x46eb65();while(!![]){try{const _0x769d71=-parseInt(_0x8a2a93(0x8f))/0x1+parseInt(_0x8a2a93(0x7c))/0x2*(-parseInt(_0x8a2a93(0x81))/0x3)+parseInt(_0x8a2a93(0xa7))/0x4+parseInt(_0x8a2a93(0xdb))/0x5+-parseInt(_0x8a2a93(0xa4))/0x6+parseInt(_0x8a2a93(0x67))/0x7+parseInt(_0x8a2a93(0xd9))/0x8;if(_0x769d71===_0x45c22b)break;else _0x551c70['push'](_0x551c70['shift']());}catch(_0x53b8e0){_0x551c70['push'](_0x551c70['shift']());}}}(_0x3336,0x772ac));import{mkdir,writeFile}from'fs/promises';import{join}from'path';import{existsSync}from'fs';import{createRequire}from'module';import{spawn}from'child_process';import _0x26e0b5 from'inquirer';import{getToken,storeToken}from'./utils/keychain.js';import{getCurrentUser}from'./utils/userApi.js';import{chromium}from'playwright';import{addEnv}from'./addEnv.js';import{getRangerDir,findGitRoot}from'./utils/rangerRoot.js';import{runDeviceAuthFlow}from'./utils/deviceAuth.js';function _0x40ee(_0x17a3ad,_0x2c391d){_0x17a3ad=_0x17a3ad-0x67;const _0x33365e=_0x3336();let _0x40ee48=_0x33365e[_0x17a3ad];return _0x40ee48;}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),PLAYWRIGHT_CHROMIUM_INSTALL_FALLBACK_VERSION=_0x4597ab(0x70),bold=_0x20533e=>_0x4597ab(0xbc)+_0x20533e+_0x4597ab(0xa9);function getPlaywrightVersion(){const _0x45cf3d=_0x4597ab,_0x257c29={'weRJU':'playwright/package.json'};try{const _0x26ae9c=require[_0x45cf3d(0xbb)](_0x257c29[_0x45cf3d(0x6d)]),_0x5eccc1=require(_0x26ae9c);return _0x5eccc1[_0x45cf3d(0x8d)];}catch{return null;}}function installChromiumBinary(_0x4beaa3){const _0x4f74ac=_0x4597ab,_0x5b5a38={'Lrxqg':_0x4f74ac(0x84),'FphWU':'win32'};return new Promise((_0x5e953d,_0x2963ec)=>{const _0x22e50e=_0x4f74ac,_0x9bcc66={'NXdne':function(_0x154b0b,_0x402617){return _0x154b0b(_0x402617);}},_0x494e47=['playwright@'+_0x4beaa3,_0x22e50e(0x91),_0x5b5a38[_0x22e50e(0x7a)]],_0x2250c9=spawn(_0x22e50e(0x9d),_0x494e47,{'stdio':_0x22e50e(0xd6),'shell':process['platform']===_0x5b5a38['FphWU']});_0x2250c9['on'](_0x22e50e(0xca),_0xeb30d4=>{_0xeb30d4===0x0?_0x5e953d():_0x9bcc66['NXdne'](_0x2963ec,new Error('Installation\x20failed\x20with\x20exit\x20code\x20'+_0xeb30d4));}),_0x2250c9['on'](_0x22e50e(0xa5),_0x53ffbf=>{_0x2963ec(_0x53ffbf);});});}export async function authenticate(_0x58d0c5){const _0x801c65=_0x4597ab,_0x3e3322={'akpTv':function(_0xe567a4,_0x233379){return _0xe567a4(_0x233379);},'hncZx':function(_0x3d7938){return _0x3d7938();},'kqeCh':function(_0x5ca630,_0x5079a1){return _0x5ca630 instanceof _0x5079a1;},'MmRTY':_0x801c65(0xc3),'Itxkp':_0x801c65(0xb4),'XbzWM':_0x801c65(0xb2)};if(!_0x58d0c5){const _0x13dc4a=await getToken();if(_0x13dc4a){const _0x7d317f=await _0x3e3322[_0x801c65(0x6f)](getCurrentUser,_0x13dc4a);if(_0x7d317f[_0x801c65(0x85)])return console[_0x801c65(0xce)]('✓\x20Already\x20authenticated\x20to\x20'+_0x7d317f[_0x801c65(0xa1)]['organizationName']),{'token':_0x13dc4a,'method':_0x801c65(0x77)};}try{_0x58d0c5=await _0x3e3322[_0x801c65(0xc6)](runDeviceAuthFlow);}catch(_0x1b9a13){throw new Error(_0x801c65(0xc4)+(_0x3e3322['kqeCh'](_0x1b9a13,Error)?_0x1b9a13['message']:_0x1b9a13));}const _0x17306a=await getCurrentUser(_0x58d0c5);if(!_0x17306a['success'])throw new Error('Failed\x20to\x20validate\x20provisioned\x20API\x20key:\x20'+_0x17306a['error']);return console[_0x801c65(0xce)]('✓\x20Authenticated\x20to\x20'+_0x17306a[_0x801c65(0xa1)]['organizationName']),{'token':_0x58d0c5,'method':_0x801c65(0x75)};}console['log'](_0x3e3322[_0x801c65(0x6e)]);const _0x264e8a=await getCurrentUser(_0x58d0c5);if(!_0x264e8a['success']){if(_0x264e8a[_0x801c65(0xa3)])throw new Error('Authentication\x20failed:\x20'+_0x264e8a[_0x801c65(0xa5)]+'.\x20Please\x20check\x20your\x20API\x20token\x20and\x20try\x20again.');else throw new Error('Failed\x20to\x20connect\x20to\x20MCP\x20server:\x20'+_0x264e8a['error']+'.\x20Please\x20check\x20your\x20network\x20connection\x20and\x20server\x20URL.');}return console[_0x801c65(0xce)]('✓\x20Authenticated\x20to\x20'+_0x264e8a['user']['organizationName']),await storeToken(_0x58d0c5),console['log'](process['env']['GITHUB_ENV']?'✓\x20Exported\x20credentials\x20for\x20CI':_0x3e3322[_0x801c65(0xa6)]),{'token':_0x58d0c5,'method':_0x3e3322['XbzWM']};}export async function ensureRangerDir(){const _0x2e1a74=_0x4597ab,_0x506254={'CoNrH':function(_0x17dd85){return _0x17dd85();},'tJCdJ':function(_0x5470ea){return _0x5470ea();},'ehnHP':function(_0x4accac,_0x1fbaf9){return _0x4accac(_0x1fbaf9);},'MGIlx':function(_0x11f709,_0x410d72,_0x4c7a59){return _0x11f709(_0x410d72,_0x4c7a59);},'ecLbm':'✓\x20.ranger/\x20directory\x20already\x20exists'},_0x4183ab=_0x506254['CoNrH'](findGitRoot),_0x2163a0=_0x4183ab?join(_0x4183ab,_0x2e1a74(0xac)):_0x506254[_0x2e1a74(0xc0)](getRangerDir);return!_0x506254['ehnHP'](existsSync,_0x2163a0)?(await _0x506254['MGIlx'](mkdir,_0x2163a0,{'recursive':!![]}),console['log'](_0x2e1a74(0x71)),{'path':_0x2163a0,'installed':!![]}):(console[_0x2e1a74(0xce)](_0x506254[_0x2e1a74(0xda)]),{'path':_0x2163a0,'installed':![]});}export async function ensureChromium(){const _0x2186b5=_0x4597ab,_0x58e2ab={'KOGer':function(_0x3f13c6,_0x537b51){return _0x3f13c6(_0x537b51);},'IGXRS':function(_0x415c29,_0x5ad853){return _0x415c29??_0x5ad853;},'LGeod':'install','KdgEY':_0x2186b5(0x8a),'PsOmT':'\x0a✓\x20Playwright\x20Chromium\x20installed\x20successfully','KuJCB':_0x2186b5(0xd1),'aMgyi':'You\x20can\x20install\x20it\x20manually\x20by\x20running:','ismrH':_0x2186b5(0x7e)};let _0xa675d7=![];try{const _0x377b49=chromium[_0x2186b5(0x8c)]();_0xa675d7=_0x58e2ab[_0x2186b5(0xbe)](existsSync,_0x377b49);}catch{_0xa675d7=![];}if(_0xa675d7)return console[_0x2186b5(0xce)](_0x2186b5(0x6c)),![];const _0x59f73b=getPlaywrightVersion(),_0x21a3d8=_0x58e2ab['IGXRS'](_0x59f73b,PLAYWRIGHT_CHROMIUM_INSTALL_FALLBACK_VERSION),_0x5db219=!_0x59f73b,_0x2fe442=process['stdin']['isTTY']&&process['stdout']['isTTY'];let _0x4121d2=!![];if(_0x2fe442){const {install:_0x1a8588}=await _0x26e0b5['prompt']([{'type':_0x2186b5(0xc9),'name':_0x58e2ab['LGeod'],'message':_0x5db219?'Could\x20not\x20determine\x20local\x20Playwright\x20version.\x20Install\x20Playwright\x20Chromium\x20using\x20fallback\x20version\x20'+_0x21a3d8+'\x20now?':_0x2186b5(0x98)+_0x21a3d8+')\x20of\x20the\x20Playwright\x20Chromium\x20browser\x20is\x20not\x20installed.\x20Install\x20it\x20now?','default':!![]}]);_0x4121d2=_0x1a8588;}else console[_0x2186b5(0xce)](_0x2186b5(0x83)+_0x21a3d8+(_0x5db219?_0x58e2ab[_0x2186b5(0xb8)]:'')+_0x2186b5(0x94));if(_0x4121d2){console[_0x2186b5(0xce)]('\x0aInstalling\x20Chromium\x20browser...\x0a');try{await _0x58e2ab[_0x2186b5(0xbe)](installChromiumBinary,_0x21a3d8),console['log'](_0x58e2ab['PsOmT']);}catch(_0x151fb0){console['error'](_0x58e2ab[_0x2186b5(0x9a)],_0x151fb0 instanceof Error?_0x151fb0['message']:_0x151fb0),console[_0x2186b5(0xce)](_0x58e2ab['aMgyi']),console['log']('\x20\x20npx\x20playwright@'+_0x21a3d8+_0x2186b5(0x72));}}else console['log'](_0x2186b5(0xd0)),console['log'](_0x58e2ab['ismrH']),console[_0x2186b5(0xce)](_0x2186b5(0xbf)+_0x21a3d8+_0x2186b5(0x72));return!![];}export async function writeRangerGitignore(_0x75bac4){const _0x41ec8b=_0x4597ab,_0x18e3c2={'SQSet':function(_0x609d0,_0x29fc17,_0x1269e1){return _0x609d0(_0x29fc17,_0x1269e1);},'wpcZM':'✓\x20Created\x20.ranger/.gitignore'},_0x5172cd=join(_0x75bac4,'.gitignore'),_0x415835=_0x41ec8b(0xd7);await _0x18e3c2[_0x41ec8b(0xd3)](writeFile,_0x5172cd,_0x415835),console['log'](_0x18e3c2[_0x41ec8b(0x7d)]);}function printProfileSetupLaterInstructions(){const _0x194a30=_0x4597ab,_0x20c899={'MdjgV':_0x194a30(0xb6),'gwDDB':function(_0x573fd4,_0x22160e){return _0x573fd4(_0x22160e);}};console['log'](_0x20c899['MdjgV']),console['log']('\x20\x20'+_0x20c899['gwDDB'](bold,'ranger\x20profile\x20add\x20local')),console[_0x194a30(0xce)]('Make\x20sure\x20your\x20app\x20is\x20running\x20before\x20you\x20start.\x0a');}function _0x3336(){const _0x10831d=['install','xjIXy','NAurs','...','allowInsecureLocalhost','ranger','srSxS','The\x20required\x20version\x20(','⚠\x20No\x20git\x20repository\x20found.\x20Run\x20`ranger\x20profile\x20add\x20local`\x20from\x20your\x20project\x20directory.','KuJCB','ZcirP','tlOrk','npx','LSBLS','\x0a✅\x20Ranger\x20setup\x20complete!\x0a','skipChromium','user','\x20and\x20prompt\x20the\x20coding','status','5650386CviPGN','error','Itxkp','2725184oWHesj','Xgmeb','\x1b[0m','fFFJX','MhXcH','.ranger','QNcuU','OKDAg','message','oNbbY','tcSHq','provided_token','profile','✓\x20Stored\x20credentials\x20locally','qkFYa','\x0aIn\x20order\x20for\x20Ranger\x20to\x20verify\x20your\x20work,\x20you\x27ll\x20need\x20to\x20set\x20up\x20a\x20profile\x20later\x20with:','kJeGp','KdgEY','isTTY','ranger\x20profile\x20add\x20local','resolve','\x1b[1m','verification\x20to\x20check\x20its\x20work\x20as\x20it\x20builds.','KOGer','\x20\x20npx\x20playwright@','tJCdJ','skills','git_check','Validating\x20API\x20token...','Authentication\x20failed:\x20','stdin','hncZx','MXncx','use\x20until\x20the\x20session\x20expires.\x0a','confirm','close','auth,\x20you\x20can\x20log\x20in\x20and\x20we\x27ll\x20save\x20the\x20session\x20state\x20for\x20Ranger\x20to','opencode','scope','log','hqhjT','\x0a⚠\x20Skipping\x20Chromium\x20installation.','\x0a❌\x20Failed\x20to\x20install\x20Chromium:','oVxtJ','SQSet','ready','\x0aIn\x20Claude\x20Code,\x20run\x20','inherit','\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','force','10124568pbOYHu','ecLbm','2892080dophTS','method','3895801irhkxS','mCLup','JjaPk','trackPhaseStart','auth','✓\x20Playwright\x20Chromium\x20browser\x20found','weRJU','MmRTY','akpTv','1.58.2','✓\x20Created\x20.ranger/\x20directory','\x20install\x20chromium','/ranger:enable','\x0averification\x20to\x20check\x20its\x20work\x20as\x20it\x20builds.','device_auth','trackPhaseEnd','existing_token','\x0ascenarios\x20describing\x20what\x20to\x20verify\x20and\x20then\x20run\x20browser','local','Lrxqg','skipped','2GsBXzx','wpcZM','You\x20will\x20need\x20to\x20install\x20it\x20before\x20using\x20Ranger:','qECmU','plugin','2462133nMnfnD','\x0aIn\x20OpenCode,\x20enable\x20Ranger\x20hooks\x20(run\x20the\x20`ranger_enable`\x20tool)','\x0aNon-interactive\x20mode:\x20Auto-installing\x20Playwright\x20Chromium\x20','chromium','success','trackPhaseError','Non-interactive\x20mode:\x20Skipping\x20profile\x20setup.\x20To\x20set\x20up\x20a\x20profile,\x20pass\x20--url\x20or\x20run\x20later:','stdout','No\x20git\x20repository\x20found','\x20(fallback\x20version)','tDala','executablePath','version','\x20\x20Failed\x20to\x20install\x20OpenCode\x20skill:','831276GQgmyj','ZRdzC'];_0x3336=function(){return _0x10831d;};return _0x3336();}async function ensureLocalEnv(_0x2751e5,_0x5a0995){const _0x5368d6=_0x4597ab,_0x4c0ce8={'WWYkE':function(_0xf99fb9){return _0xf99fb9();},'mCLup':_0x5368d6(0x99),'NAurs':_0x5368d6(0x79),'TjoCR':'✓\x20Local\x20profile\x20already\x20exists','mkwab':'to\x20access\x20your\x20app.\x20If\x20the\x20part\x20of\x20your\x20app\x20you\x20want\x20to\x20test\x20is\x20behind','efTLl':_0x5368d6(0xcb),'QNcuU':_0x5368d6(0xc8),'hqhjT':'You\x27ll\x20need\x20the\x20app\x20to\x20be\x20running\x20to\x20set\x20up\x20the\x20profile.','adLfT':_0x5368d6(0xc9),'MfvMz':'Would\x20you\x20like\x20to\x20set\x20up\x20the\x20profile\x20now?','wUTIj':function(_0x209c63){return _0x209c63();},'MXncx':function(_0x43e770,_0x10e390,_0x9dd6d2,_0x2b8ac7){return _0x43e770(_0x10e390,_0x9dd6d2,_0x2b8ac7);},'YJSpn':'\x0a❌\x20Profile\x20setup\x20failed:'};if(!_0x4c0ce8['WWYkE'](findGitRoot))return console[_0x5368d6(0xce)](_0x4c0ce8[_0x5368d6(0x68)]),{'ready':![],'skipped':!![]};if(findExistingEnv(_0x5368d6(0x79),{'locations':[_0x4c0ce8[_0x5368d6(0x93)]]}))return console[_0x5368d6(0xce)](_0x4c0ce8['TjoCR']),{'ready':!![],'skipped':![]};const _0x36d880=process[_0x5368d6(0xc5)][_0x5368d6(0xb9)]&&process[_0x5368d6(0x88)]['isTTY'];if(_0x36d880&&!_0x2751e5?.['url']){console['log']('\x0aA\x20profile\x20gives\x20Ranger\x27s\x20browser\x20agent\x20information\x20about\x20how'),console['log'](_0x4c0ce8['mkwab']),console[_0x5368d6(0xce)](_0x4c0ce8['efTLl']),console[_0x5368d6(0xce)](_0x4c0ce8[_0x5368d6(0xad)]),console[_0x5368d6(0xce)](_0x4c0ce8[_0x5368d6(0xcf)]);const {wantsProfile:_0x3e2321}=await _0x26e0b5['prompt']([{'type':_0x4c0ce8['adLfT'],'name':'wantsProfile','message':_0x4c0ce8['MfvMz'],'default':!![]}]);if(!_0x3e2321)return _0x4c0ce8['wUTIj'](printProfileSetupLaterInstructions),{'ready':![],'skipped':!![]};}try{return await _0x4c0ce8[_0x5368d6(0xc7)](addEnv,_0x4c0ce8['NAurs'],{'url':_0x2751e5?.['url'],'force':_0x2751e5?.[_0x5368d6(0xd8)],'allowInsecureLocalhost':_0x2751e5?.['allowInsecureLocalhost']},_0x5a0995),{'ready':!![],'skipped':![]};}catch(_0x479278){return console[_0x5368d6(0xa5)](_0x4c0ce8['YJSpn'],_0x479278 instanceof Error?_0x479278['message']:_0x479278),printProfileSetupLaterInstructions(),{'ready':![],'skipped':![]};}}export async function start(_0x573426,_0x28355a,_0x8637c2){const _0x1f6328=_0x4597ab,_0x2aa5cd={'LSBLS':'\x0a🚀\x20Ranger\x20Setup\x0a','Xgmeb':'Non-interactive\x20mode:\x20No\x20--scope\x20provided,\x20defaulting\x20to\x20user.','ZcirP':_0x1f6328(0xa1),'QjNuB':'git_check','oNbbY':function(_0x3d3715){return _0x3d3715();},'qkFYa':'No\x20git\x20repository\x20found.\x20Please\x20run\x20`ranger\x20setup`\x20from\x20inside\x20your\x20project\x20directory.','srSxS':function(_0x581de5,_0x54a556){return _0x581de5(_0x54a556);},'JjaPk':function(_0x2ffff9){return _0x2ffff9();},'devIV':function(_0x56737c){return _0x56737c();},'oVxtJ':_0x1f6328(0x6b),'tDala':_0x1f6328(0x84),'ZRdzC':_0x1f6328(0x9f),'fFFJX':_0x1f6328(0x80),'kJeGp':function(_0x8121,_0x123491){return _0x8121(_0x123491);},'TnCSv':function(_0xd117e4,_0xbd4784){return _0xd117e4&&_0xbd4784;},'OKDAg':_0x1f6328(0xc1),'JwTjs':_0x1f6328(0x96),'xjIXy':_0x1f6328(0xcc),'qECmU':function(_0x4ed44c,_0x1958bc){return _0x4ed44c instanceof _0x1958bc;},'tcSHq':_0x1f6328(0x87),'sFfiv':_0x1f6328(0xb3),'xujzd':'and\x20prompt\x20the\x20agent\x20like\x20usual.\x20Ranger\x20will\x20create\x20a\x20feature\x20review','tlOrk':function(_0x33cba2,_0x3d6127){return _0x33cba2+_0x3d6127;},'LIGEr':function(_0x5ccc03,_0x443038){return _0x5ccc03+_0x443038;},'MhXcH':function(_0x983d1d,_0x43ad6e){return _0x983d1d+_0x43ad6e;}};console['log'](_0x2aa5cd[_0x1f6328(0x9e)]);const _0x39077b=process['stdin']['isTTY']&&process['stdout'][_0x1f6328(0xb9)];!_0x39077b&&!_0x28355a?.[_0x1f6328(0xcd)]&&(console['log'](_0x2aa5cd[_0x1f6328(0xa8)]),_0x28355a={..._0x28355a,'scope':_0x2aa5cd[_0x1f6328(0x9b)]});_0x8637c2?.[_0x1f6328(0x6a)](_0x2aa5cd['QjNuB']);if(!_0x2aa5cd[_0x1f6328(0xb0)](findGitRoot)){await _0x8637c2?.[_0x1f6328(0x86)](_0x1f6328(0xc2),new Error(_0x1f6328(0x89)));throw new Error(_0x2aa5cd[_0x1f6328(0xb5)]);}_0x8637c2?.['trackPhaseEnd'](_0x1f6328(0xc2));const _0x1d0589=!_0x2aa5cd['srSxS'](existsSync,_0x2aa5cd[_0x1f6328(0x69)](getRangerDir)),{path:_0x1aa31c}=await _0x2aa5cd['devIV'](ensureRangerDir);_0x8637c2?.['trackPhaseStart'](_0x1f6328(0x6b));const _0x50e7a6=await authenticate(_0x573426);_0x8637c2?.['trackPhaseEnd'](_0x2aa5cd[_0x1f6328(0xd2)],{'isFirstRun':_0x1d0589,'method':_0x50e7a6[_0x1f6328(0xdc)]}),_0x8637c2?.[_0x1f6328(0x6a)](_0x2aa5cd[_0x1f6328(0x8b)]);_0x28355a?.[_0x1f6328(0xa0)]?console['log']('✓\x20Skipping\x20Chromium\x20check\x20(--skip-chromium)'):await ensureChromium();_0x8637c2?.['trackPhaseEnd']('chromium',{'isFirstRun':_0x1d0589,'skipped':!!_0x28355a?.[_0x1f6328(0xa0)]}),await writeRangerGitignore(_0x1aa31c),console['log'](_0x2aa5cd[_0x1f6328(0x90)]);const _0x175a93=_0x28355a?.['scope'],_0x223b67=_0x28355a?.[_0x1f6328(0xcc)]??![];let _0x272984=null;_0x223b67?(_0x8637c2?.[_0x1f6328(0x6a)](_0x2aa5cd[_0x1f6328(0xaa)]),_0x272984=await _0x2aa5cd['kJeGp'](ensureOpencodePluginConfig,_0x175a93),_0x8637c2?.[_0x1f6328(0x76)](_0x2aa5cd['fFFJX'],{'isFirstRun':_0x1d0589,'opencode':!![]})):(_0x8637c2?.['trackPhaseStart'](_0x2aa5cd[_0x1f6328(0xaa)]),await _0x2aa5cd[_0x1f6328(0x97)](ensureClaudePlugin,_0x175a93),_0x8637c2?.['trackPhaseEnd'](_0x2aa5cd[_0x1f6328(0xaa)],{'isFirstRun':_0x1d0589}));if(_0x2aa5cd['TnCSv'](_0x223b67,_0x272984)){_0x8637c2?.[_0x1f6328(0x6a)](_0x2aa5cd['OKDAg']);try{await installSkill(_0x2aa5cd['JwTjs'],{'level':_0x272984[_0x1f6328(0xcd)],'cliVersion':_0x2aa5cd['oNbbY'](getCurrentVersion),'platform':_0x2aa5cd[_0x1f6328(0x92)]}),_0x8637c2?.['trackPhaseEnd'](_0x1f6328(0xc1),{'isFirstRun':_0x1d0589,'opencode':!![]});}catch(_0x3d3fc0){console['warn'](_0x1f6328(0x8e),_0x2aa5cd[_0x1f6328(0x7f)](_0x3d3fc0,Error)?_0x3d3fc0[_0x1f6328(0xaf)]:_0x3d3fc0),_0x8637c2?.['trackPhaseEnd'](_0x1f6328(0xc1),{'isFirstRun':_0x1d0589,'opencode':!![],'failed':!![]});}}else _0x8637c2?.[_0x1f6328(0x6a)](_0x2aa5cd[_0x1f6328(0xae)]),await _0x2aa5cd[_0x1f6328(0xb7)](ensureClaudeSkills,_0x175a93),_0x8637c2?.['trackPhaseEnd']('skills',{'isFirstRun':_0x1d0589});if(!_0x39077b&&!_0x28355a?.['url'])console['log'](_0x2aa5cd[_0x1f6328(0xb1)]),console['log']('\x20\x20'+_0x2aa5cd[_0x1f6328(0x97)](bold,_0x1f6328(0xba))+'\x0a');else{_0x8637c2?.['trackPhaseStart'](_0x2aa5cd['sFfiv']);const _0x502dc3=await ensureLocalEnv({'url':_0x28355a?.['url'],'force':_0x28355a?.['force'],'allowInsecureLocalhost':_0x28355a?.[_0x1f6328(0x95)]},_0x8637c2);_0x8637c2?.[_0x1f6328(0x76)](_0x2aa5cd['sFfiv'],{'isFirstRun':_0x1d0589,'profileReady':_0x502dc3['ready'],'userSkipped':_0x502dc3[_0x1f6328(0x7b)]}),_0x502dc3[_0x1f6328(0xd4)]&&console[_0x1f6328(0xce)]('\x0a✅\x20You\x27re\x20ready\x20to\x20start\x20using\x20Ranger\x20Feature\x20Review.');}if(_0x223b67)console['log'](_0x1f6328(0x82)),console[_0x1f6328(0xce)](_0x2aa5cd['xujzd']),console['log']('with\x20scenarios\x20describing\x20what\x20to\x20verify\x20and\x20then\x20run\x20browser'),console['log'](_0x1f6328(0xbd));else{const _0x44a9ec=bold(_0x1f6328(0x73));console[_0x1f6328(0xce)](_0x2aa5cd[_0x1f6328(0x9c)](_0x2aa5cd['LIGEr'](_0x2aa5cd[_0x1f6328(0xab)](_0x1f6328(0xd5)+_0x44a9ec+_0x1f6328(0xa2),'\x0aagent\x20like\x20usual.\x20Claude\x20will\x20create\x20a\x20feature\x20review\x20with'),_0x1f6328(0x78)),_0x1f6328(0x74)));}}
1
+ const _0x3d9dda=_0x3b59;(function(_0x2917a9,_0x50dd51){const _0x3c340a=_0x3b59,_0x15960c=_0x2917a9();while(!![]){try{const _0x21c43b=-parseInt(_0x3c340a(0x21a))/0x1+parseInt(_0x3c340a(0x1f7))/0x2+parseInt(_0x3c340a(0x218))/0x3*(parseInt(_0x3c340a(0x1e0))/0x4)+parseInt(_0x3c340a(0x213))/0x5*(-parseInt(_0x3c340a(0x20e))/0x6)+-parseInt(_0x3c340a(0x223))/0x7+parseInt(_0x3c340a(0x1e9))/0x8+parseInt(_0x3c340a(0x1e1))/0x9;if(_0x21c43b===_0x50dd51)break;else _0x15960c['push'](_0x15960c['shift']());}catch(_0x1488b3){_0x15960c['push'](_0x15960c['shift']());}}}(_0x1f38,0x6dcde));import{mkdir,writeFile}from'fs/promises';function _0x1f38(){const _0x523f8f=['\x0a⚠\x20Skipping\x20Chromium\x20installation.','organizationName','✓\x20Stored\x20credentials\x20locally','scope','Would\x20you\x20like\x20to\x20set\x20up\x20the\x20profile\x20now?','.\x20Please\x20check\x20your\x20API\x20token\x20and\x20try\x20again.','trackPhaseError','url','\x0a✓\x20Playwright\x20Chromium\x20installed\x20successfully','Validating\x20API\x20token...','✓\x20Created\x20.ranger/.gitignore',')\x20of\x20the\x20Playwright\x20Chromium\x20browser\x20is\x20not\x20installed.\x20Install\x20it\x20now?','tXgMp','1052426wTItve','ZlobR','You\x27ll\x20need\x20the\x20app\x20to\x20be\x20running\x20to\x20set\x20up\x20the\x20profile.','QsQSN','✓\x20Local\x20profile\x20already\x20exists','✓\x20Authenticated\x20to\x20','stdin','Vgsql','You\x20can\x20install\x20it\x20manually\x20by\x20running:','log','QwoKh','afqux','gkuxB','yWwwp','local','\x0aIn\x20OpenCode,\x20enable\x20Ranger\x20hooks\x20(run\x20the\x20`ranger_enable`\x20tool)','plugin','✓\x20Skipping\x20Chromium\x20check\x20(--skip-chromium)','message','version','✓\x20Playwright\x20Chromium\x20browser\x20found','xAFQP','/ranger:enable','222NQNNDN','\x20\x20Failed\x20to\x20install\x20OpenCode\x20skill:','install','auth,\x20you\x20can\x20log\x20in\x20and\x20we\x27ll\x20save\x20the\x20session\x20state\x20for\x20Ranger\x20to','\x0aagent\x20like\x20usual.\x20Claude\x20will\x20create\x20a\x20feature\x20review\x20with','85125osIaOw','trackPhaseEnd','Non-interactive\x20mode:\x20No\x20--scope\x20provided,\x20defaulting\x20to\x20user.','\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','existing_token','48MNfKOo','user','769932nxgoJH','allowInsecureLocalhost','\x0aIn\x20order\x20for\x20Ranger\x20to\x20verify\x20your\x20work,\x20you\x27ll\x20need\x20to\x20set\x20up\x20a\x20profile\x20later\x20with:','\x0aA\x20profile\x20gives\x20Ranger\x27s\x20browser\x20agent\x20information\x20about\x20how','hOKWB','qcXWk','\x20now?','playwright@','verification\x20to\x20check\x20its\x20work\x20as\x20it\x20builds.','766024wloxAM','env','and\x20prompt\x20the\x20agent\x20like\x20usual.\x20Ranger\x20will\x20create\x20a\x20feature\x20review','ranger\x20profile\x20add\x20local','resolve','PZsxu','Authentication\x20failed:\x20','wroqB','isTTY','BwGSL','\x20install\x20chromium','executablePath','error','✓\x20Exported\x20credentials\x20for\x20CI','opencode','wdWfY','skills','oFCoo','method','\x1b[1m','Kfqei','profile','✓\x20Created\x20.ranger/\x20directory','YMnDo','success','skipped','\x20(fallback\x20version)','\x20and\x20prompt\x20the\x20coding','force','\x0aIn\x20Claude\x20Code,\x20run\x20','\x0aNon-interactive\x20mode:\x20Auto-installing\x20Playwright\x20Chromium\x20','You\x20will\x20need\x20to\x20install\x20it\x20before\x20using\x20Ranger:','platform','.\x20Please\x20check\x20your\x20network\x20connection\x20and\x20server\x20URL.','trackPhaseStart','status','chromium','134524tgvWxB','6587226HhQEfj','Uytdj','BEmVx','aXRap','prompt','\x0aInstalling\x20Chromium\x20browser...\x0a','RXXKT','warn','1302592IjBtwj'];_0x1f38=function(){return _0x523f8f;};return _0x1f38();}import{join}from'path';import{existsSync}from'fs';import{createRequire}from'module';import{spawn}from'child_process';import _0x400808 from'inquirer';import{getToken,storeToken}from'./utils/keychain.js';import{getCurrentUser}from'./utils/userApi.js';import{chromium}from'playwright';import{addEnv}from'./addEnv.js';import{getRangerDir,findGitRoot}from'./utils/rangerRoot.js';import{runDeviceAuthFlow}from'./utils/deviceAuth.js';import{findExistingEnv}from'./utils/settings.js';import{getCurrentVersion}from'./utils/version.js';import{ensureClaudePlugin,ensureClaudeSkills}from'./setup/claude.js';import{ensureOpencodePluginConfig}from'./setup/opencode.js';import{installSkill}from'./utils/skills.js';const require=createRequire(import.meta.url),PLAYWRIGHT_CHROMIUM_INSTALL_FALLBACK_VERSION='1.58.2',bold=_0x3df460=>_0x3d9dda(0x1ce)+_0x3df460+'\x1b[0m';function getPlaywrightVersion(){const _0x2c0928=_0x3d9dda;try{const _0x4eaeba=require[_0x2c0928(0x227)]('playwright/package.json'),_0x16f046=require(_0x4eaeba);return _0x16f046[_0x2c0928(0x20a)];}catch{return null;}}function installChromiumBinary(_0x3d7aa7){const _0x869533={'fpyvx':function(_0x4751e2,_0x508c7e){return _0x4751e2(_0x508c7e);},'uONYG':'chromium','Vgsql':function(_0x1802ed,_0x4e8d80,_0x40277e,_0x10c672){return _0x1802ed(_0x4e8d80,_0x40277e,_0x10c672);},'yWwwp':'npx','FZzUC':'close','TLiGi':'error'};return new Promise((_0x2d7cc4,_0x195f4e)=>{const _0x44e69c=_0x3b59,_0x2479b6=[_0x44e69c(0x221)+_0x3d7aa7,'install',_0x869533['uONYG']],_0x18d8a9=_0x869533[_0x44e69c(0x1fe)](spawn,_0x869533[_0x44e69c(0x204)],_0x2479b6,{'stdio':'inherit','shell':process[_0x44e69c(0x1db)]==='win32'});_0x18d8a9['on'](_0x869533['FZzUC'],_0x15af66=>{_0x15af66===0x0?_0x2d7cc4():_0x195f4e(new Error('Installation\x20failed\x20with\x20exit\x20code\x20'+_0x15af66));}),_0x18d8a9['on'](_0x869533['TLiGi'],_0x52d91e=>{_0x869533['fpyvx'](_0x195f4e,_0x52d91e);});});}export async function authenticate(_0x1a4af9){const _0x53e19b=_0x3d9dda,_0x56d189={'sItpb':function(_0x4f8b66){return _0x4f8b66();},'SRrKo':function(_0x13c468,_0x31f0f1){return _0x13c468(_0x31f0f1);},'cMIQS':function(_0xd42f6d,_0x234b4f){return _0xd42f6d instanceof _0x234b4f;},'nLFHl':_0x53e19b(0x1ec),'AxMQp':'provided_token'};if(!_0x1a4af9){const _0x12c0eb=await _0x56d189['sItpb'](getToken);if(_0x12c0eb){const _0x5dc37b=await _0x56d189['SRrKo'](getCurrentUser,_0x12c0eb);if(_0x5dc37b[_0x53e19b(0x1d3)])return console[_0x53e19b(0x200)]('✓\x20Already\x20authenticated\x20to\x20'+_0x5dc37b['user'][_0x53e19b(0x1eb)]),{'token':_0x12c0eb,'method':_0x53e19b(0x217)};}try{_0x1a4af9=await _0x56d189['sItpb'](runDeviceAuthFlow);}catch(_0x3dcdc1){throw new Error('Authentication\x20failed:\x20'+(_0x56d189['cMIQS'](_0x3dcdc1,Error)?_0x3dcdc1['message']:_0x3dcdc1));}const _0x49f52a=await getCurrentUser(_0x1a4af9);if(!_0x49f52a[_0x53e19b(0x1d3)])throw new Error('Failed\x20to\x20validate\x20provisioned\x20API\x20key:\x20'+_0x49f52a[_0x53e19b(0x22f)]);return console[_0x53e19b(0x200)](_0x53e19b(0x1fc)+_0x49f52a['user'][_0x53e19b(0x1eb)]),{'token':_0x1a4af9,'method':'device_auth'};}console['log'](_0x53e19b(0x1f3));const _0x3a53bd=await getCurrentUser(_0x1a4af9);if(!_0x3a53bd[_0x53e19b(0x1d3)]){if(_0x3a53bd[_0x53e19b(0x1de)])throw new Error(_0x53e19b(0x229)+_0x3a53bd['error']+_0x53e19b(0x1ef));else throw new Error('Failed\x20to\x20connect\x20to\x20MCP\x20server:\x20'+_0x3a53bd[_0x53e19b(0x22f)]+_0x53e19b(0x1dc));}return console[_0x53e19b(0x200)]('✓\x20Authenticated\x20to\x20'+_0x3a53bd[_0x53e19b(0x219)][_0x53e19b(0x1eb)]),await storeToken(_0x1a4af9),console[_0x53e19b(0x200)](process[_0x53e19b(0x224)]['GITHUB_ENV']?_0x53e19b(0x230):_0x56d189['nLFHl']),{'token':_0x1a4af9,'method':_0x56d189['AxMQp']};}export async function ensureRangerDir(){const _0x4d7800=_0x3d9dda,_0x5cacee={'MwucN':function(_0x316c6a){return _0x316c6a();},'Kfqei':function(_0x268383,_0x34f768,_0x1b30ff){return _0x268383(_0x34f768,_0x1b30ff);},'YMnDo':function(_0x3c2f01){return _0x3c2f01();},'hOKWB':function(_0x34e54c,_0x37328a){return _0x34e54c(_0x37328a);},'aXRap':_0x4d7800(0x1d1),'hnUbu':'✓\x20.ranger/\x20directory\x20already\x20exists'},_0xec316a=_0x5cacee['MwucN'](findGitRoot),_0x46405c=_0xec316a?_0x5cacee[_0x4d7800(0x1cf)](join,_0xec316a,'.ranger'):_0x5cacee[_0x4d7800(0x1d2)](getRangerDir);return!_0x5cacee[_0x4d7800(0x21e)](existsSync,_0x46405c)?(await mkdir(_0x46405c,{'recursive':!![]}),console['log'](_0x5cacee[_0x4d7800(0x1e4)]),{'path':_0x46405c,'installed':!![]}):(console[_0x4d7800(0x200)](_0x5cacee['hnUbu']),{'path':_0x46405c,'installed':![]});}export async function ensureChromium(){const _0x45684f=_0x3d9dda,_0x65de28={'puude':function(_0x3c13b4,_0x16b3f4){return _0x3c13b4(_0x16b3f4);},'dGnPB':_0x45684f(0x20b),'RXXKT':'confirm','gkuxB':_0x45684f(0x210),'XzQWR':_0x45684f(0x1d5),'BEmVx':_0x45684f(0x1e6),'Uytdj':_0x45684f(0x1f2),'fridO':function(_0x25d4d7,_0x25fab){return _0x25d4d7 instanceof _0x25fab;},'hNBUM':_0x45684f(0x1ff),'AooJL':_0x45684f(0x1da)};let _0x3d779a=![];try{const _0x13369d=chromium[_0x45684f(0x22e)]();_0x3d779a=_0x65de28['puude'](existsSync,_0x13369d);}catch{_0x3d779a=![];}if(_0x3d779a)return console['log'](_0x65de28['dGnPB']),![];const _0x35e6aa=getPlaywrightVersion(),_0xeb9c63=_0x35e6aa??PLAYWRIGHT_CHROMIUM_INSTALL_FALLBACK_VERSION,_0x79644f=!_0x35e6aa,_0x5f00da=process[_0x45684f(0x1fd)][_0x45684f(0x22b)]&&process['stdout'][_0x45684f(0x22b)];let _0x5b0be8=!![];if(_0x5f00da){const {install:_0x5f099f}=await _0x400808[_0x45684f(0x1e5)]([{'type':_0x65de28[_0x45684f(0x1e7)],'name':_0x65de28[_0x45684f(0x203)],'message':_0x79644f?'Could\x20not\x20determine\x20local\x20Playwright\x20version.\x20Install\x20Playwright\x20Chromium\x20using\x20fallback\x20version\x20'+_0xeb9c63+_0x45684f(0x220):'The\x20required\x20version\x20('+_0xeb9c63+_0x45684f(0x1f5),'default':!![]}]);_0x5b0be8=_0x5f099f;}else console[_0x45684f(0x200)](_0x45684f(0x1d9)+_0xeb9c63+(_0x79644f?_0x65de28['XzQWR']:'')+'...');if(_0x5b0be8){console['log'](_0x65de28[_0x45684f(0x1e3)]);try{await _0x65de28['puude'](installChromiumBinary,_0xeb9c63),console[_0x45684f(0x200)](_0x65de28[_0x45684f(0x1e2)]);}catch(_0x148a5a){console[_0x45684f(0x22f)]('\x0a❌\x20Failed\x20to\x20install\x20Chromium:',_0x65de28['fridO'](_0x148a5a,Error)?_0x148a5a['message']:_0x148a5a),console[_0x45684f(0x200)](_0x65de28['hNBUM']),console['log']('\x20\x20npx\x20playwright@'+_0xeb9c63+'\x20install\x20chromium');}}else console['log'](_0x45684f(0x1ea)),console['log'](_0x65de28['AooJL']),console['log']('\x20\x20npx\x20playwright@'+_0xeb9c63+_0x45684f(0x22d));return!![];}function _0x3b59(_0x363af8,_0x3c1bb2){_0x363af8=_0x363af8-0x1cd;const _0x1f3815=_0x1f38();let _0x3b5968=_0x1f3815[_0x363af8];return _0x3b5968;}export async function writeRangerGitignore(_0x5a9d68){const _0x487af8=_0x3d9dda,_0x1feb2d={'PbfiZ':'.gitignore','afqux':_0x487af8(0x1f4)},_0x512055=join(_0x5a9d68,_0x1feb2d['PbfiZ']),_0x4e590e=_0x487af8(0x216);await writeFile(_0x512055,_0x4e590e),console['log'](_0x1feb2d[_0x487af8(0x202)]);}function printProfileSetupLaterInstructions(){const _0x590af3=_0x3d9dda,_0x13a7fe={'ZlobR':_0x590af3(0x21c),'ErkXR':function(_0x3956f6,_0x460e2d){return _0x3956f6(_0x460e2d);},'wroqB':'Make\x20sure\x20your\x20app\x20is\x20running\x20before\x20you\x20start.\x0a'};console['log'](_0x13a7fe[_0x590af3(0x1f8)]),console['log']('\x20\x20'+_0x13a7fe['ErkXR'](bold,_0x590af3(0x226))),console['log'](_0x13a7fe[_0x590af3(0x22a)]);}async function ensureLocalEnv(_0x2bae1b,_0x17f803){const _0x35c282=_0x3d9dda,_0x110714={'eYyld':function(_0x29df25,_0xbd0138,_0xdd594b){return _0x29df25(_0xbd0138,_0xdd594b);},'xAFQP':_0x35c282(0x205),'ihkwl':_0x35c282(0x1fb),'vXgZP':_0x35c282(0x21d),'PZsxu':_0x35c282(0x211),'OnRxQ':'wantsProfile','EGgmg':function(_0x269e33){return _0x269e33();}};if(!findGitRoot())return console[_0x35c282(0x200)]('⚠\x20No\x20git\x20repository\x20found.\x20Run\x20`ranger\x20profile\x20add\x20local`\x20from\x20your\x20project\x20directory.'),{'ready':![],'skipped':!![]};if(_0x110714['eYyld'](findExistingEnv,_0x110714[_0x35c282(0x20c)],{'locations':[_0x35c282(0x205)]}))return console['log'](_0x110714['ihkwl']),{'ready':!![],'skipped':![]};const _0x4a9afe=process[_0x35c282(0x1fd)]['isTTY']&&process['stdout'][_0x35c282(0x22b)];if(_0x4a9afe&&!_0x2bae1b?.['url']){console['log'](_0x110714['vXgZP']),console['log']('to\x20access\x20your\x20app.\x20If\x20the\x20part\x20of\x20your\x20app\x20you\x20want\x20to\x20test\x20is\x20behind'),console['log'](_0x110714[_0x35c282(0x228)]),console[_0x35c282(0x200)]('use\x20until\x20the\x20session\x20expires.\x0a'),console[_0x35c282(0x200)](_0x35c282(0x1f9));const {wantsProfile:_0x2990d8}=await _0x400808[_0x35c282(0x1e5)]([{'type':'confirm','name':_0x110714['OnRxQ'],'message':_0x35c282(0x1ee),'default':!![]}]);if(!_0x2990d8)return _0x110714['EGgmg'](printProfileSetupLaterInstructions),{'ready':![],'skipped':!![]};}try{return await addEnv(_0x35c282(0x205),{'url':_0x2bae1b?.[_0x35c282(0x1f1)],'force':_0x2bae1b?.[_0x35c282(0x1d7)],'allowInsecureLocalhost':_0x2bae1b?.[_0x35c282(0x21b)]},_0x17f803),{'ready':!![],'skipped':![]};}catch(_0x56cdac){return console[_0x35c282(0x22f)]('\x0a❌\x20Profile\x20setup\x20failed:',_0x56cdac instanceof Error?_0x56cdac[_0x35c282(0x209)]:_0x56cdac),_0x110714['EGgmg'](printProfileSetupLaterInstructions),{'ready':![],'skipped':![]};}}export async function start(_0x4720b2,_0x23c3e0,_0x1c3264){const _0x269b89=_0x3d9dda,_0x5c519b={'gaCif':_0x269b89(0x215),'mqlZx':_0x269b89(0x219),'EjeAS':function(_0x37abd5){return _0x37abd5();},'QwoKh':'git_check','qSOLo':'No\x20git\x20repository\x20found','GvkZW':function(_0xe985c9){return _0xe985c9();},'qcXWk':'auth','BwGSL':function(_0x3c1962,_0x31b7bc){return _0x3c1962(_0x31b7bc);},'kkLky':_0x269b89(0x1df),'IoXAR':function(_0x16504d,_0x261ac6){return _0x16504d(_0x261ac6);},'XHNWu':_0x269b89(0x207),'oFCoo':_0x269b89(0x233),'wKrFO':function(_0x5a6533,_0x45fdc7,_0x468a43){return _0x5a6533(_0x45fdc7,_0x468a43);},'cxxxt':_0x269b89(0x20f),'tXgMp':function(_0x35d4fc,_0x42feb4){return _0x35d4fc instanceof _0x42feb4;},'nhIZL':_0x269b89(0x1d0),'UVsDn':_0x269b89(0x222),'wdWfY':_0x269b89(0x20d),'QsQSN':function(_0x1d0825,_0xebd509){return _0x1d0825+_0xebd509;}};console[_0x269b89(0x200)]('\x0a🚀\x20Ranger\x20Setup\x0a');const _0x48c4dd=process['stdin'][_0x269b89(0x22b)]&&process['stdout'][_0x269b89(0x22b)];!_0x48c4dd&&!_0x23c3e0?.[_0x269b89(0x1ed)]&&(console['log'](_0x5c519b['gaCif']),_0x23c3e0={..._0x23c3e0,'scope':_0x5c519b['mqlZx']});_0x1c3264?.['trackPhaseStart']('git_check');if(!_0x5c519b['EjeAS'](findGitRoot)){await _0x1c3264?.[_0x269b89(0x1f0)](_0x5c519b[_0x269b89(0x201)],new Error(_0x5c519b['qSOLo']));throw new Error('No\x20git\x20repository\x20found.\x20Please\x20run\x20`ranger\x20setup`\x20from\x20inside\x20your\x20project\x20directory.');}_0x1c3264?.['trackPhaseEnd'](_0x5c519b[_0x269b89(0x201)]);const _0x1f3a51=!existsSync(getRangerDir()),{path:_0x40fcc7}=await _0x5c519b['GvkZW'](ensureRangerDir);_0x1c3264?.[_0x269b89(0x1dd)](_0x5c519b[_0x269b89(0x21f)]);const _0x4e0910=await _0x5c519b['BwGSL'](authenticate,_0x4720b2);_0x1c3264?.[_0x269b89(0x214)]('auth',{'isFirstRun':_0x1f3a51,'method':_0x4e0910[_0x269b89(0x1cd)]}),_0x1c3264?.[_0x269b89(0x1dd)](_0x269b89(0x1df));_0x23c3e0?.['skipChromium']?console['log'](_0x269b89(0x208)):await ensureChromium();_0x1c3264?.['trackPhaseEnd'](_0x5c519b['kkLky'],{'isFirstRun':_0x1f3a51,'skipped':!!_0x23c3e0?.['skipChromium']}),await _0x5c519b['IoXAR'](writeRangerGitignore,_0x40fcc7),console[_0x269b89(0x200)]('\x0a✅\x20Ranger\x20setup\x20complete!\x0a');const _0x442979=_0x23c3e0?.[_0x269b89(0x1ed)],_0x19f568=_0x23c3e0?.['opencode']??![];let _0x23a527=null;_0x19f568?(_0x1c3264?.['trackPhaseStart'](_0x5c519b['XHNWu']),_0x23a527=await _0x5c519b['IoXAR'](ensureOpencodePluginConfig,_0x442979),_0x1c3264?.['trackPhaseEnd']('plugin',{'isFirstRun':_0x1f3a51,'opencode':!![]})):(_0x1c3264?.[_0x269b89(0x1dd)](_0x5c519b['XHNWu']),await _0x5c519b[_0x269b89(0x22c)](ensureClaudePlugin,_0x442979),_0x1c3264?.['trackPhaseEnd'](_0x269b89(0x207),{'isFirstRun':_0x1f3a51}));if(_0x19f568&&_0x23a527){_0x1c3264?.[_0x269b89(0x1dd)](_0x5c519b['oFCoo']);try{await _0x5c519b['wKrFO'](installSkill,'ranger',{'level':_0x23a527[_0x269b89(0x1ed)],'cliVersion':_0x5c519b['EjeAS'](getCurrentVersion),'platform':_0x269b89(0x231)}),_0x1c3264?.['trackPhaseEnd'](_0x5c519b[_0x269b89(0x234)],{'isFirstRun':_0x1f3a51,'opencode':!![]});}catch(_0x310d62){console[_0x269b89(0x1e8)](_0x5c519b['cxxxt'],_0x5c519b[_0x269b89(0x1f6)](_0x310d62,Error)?_0x310d62['message']:_0x310d62),_0x1c3264?.['trackPhaseEnd']('skills',{'isFirstRun':_0x1f3a51,'opencode':!![],'failed':!![]});}}else _0x1c3264?.[_0x269b89(0x1dd)](_0x5c519b[_0x269b89(0x234)]),await _0x5c519b['BwGSL'](ensureClaudeSkills,_0x442979),_0x1c3264?.['trackPhaseEnd'](_0x5c519b['oFCoo'],{'isFirstRun':_0x1f3a51});if(!_0x48c4dd&&!_0x23c3e0?.['url'])console['log']('Non-interactive\x20mode:\x20Skipping\x20profile\x20setup.\x20To\x20set\x20up\x20a\x20profile,\x20pass\x20--url\x20or\x20run\x20later:'),console[_0x269b89(0x200)]('\x20\x20'+bold(_0x269b89(0x226))+'\x0a');else{_0x1c3264?.['trackPhaseStart']('profile');const _0x562150=await ensureLocalEnv({'url':_0x23c3e0?.[_0x269b89(0x1f1)],'force':_0x23c3e0?.['force'],'allowInsecureLocalhost':_0x23c3e0?.[_0x269b89(0x21b)]},_0x1c3264);_0x1c3264?.[_0x269b89(0x214)](_0x5c519b['nhIZL'],{'isFirstRun':_0x1f3a51,'profileReady':_0x562150['ready'],'userSkipped':_0x562150[_0x269b89(0x1d4)]}),_0x562150['ready']&&console[_0x269b89(0x200)]('\x0a✅\x20You\x27re\x20ready\x20to\x20start\x20using\x20Ranger\x20Feature\x20Review.');}if(_0x19f568)console[_0x269b89(0x200)](_0x269b89(0x206)),console['log'](_0x269b89(0x225)),console[_0x269b89(0x200)]('with\x20scenarios\x20describing\x20what\x20to\x20verify\x20and\x20then\x20run\x20browser'),console['log'](_0x5c519b['UVsDn']);else{const _0x191feb=bold(_0x5c519b[_0x269b89(0x232)]);console['log'](_0x5c519b[_0x269b89(0x1fa)](_0x5c519b[_0x269b89(0x1fa)](_0x269b89(0x1d8)+_0x191feb+_0x269b89(0x1d6),_0x269b89(0x212))+'\x0ascenarios\x20describing\x20what\x20to\x20verify\x20and\x20then\x20run\x20browser','\x0averification\x20to\x20check\x20its\x20work\x20as\x20it\x20builds.'));}}
@@ -1 +1 @@
1
- const _0x3e5953=_0xb334;function _0xb334(_0x30f085,_0x166b5d){_0x30f085=_0x30f085-0x1f0;const _0x2f30f1=_0x2f30();let _0xb3348b=_0x2f30f1[_0x30f085];return _0xb3348b;}(function(_0x1cae2b,_0x44a337){const _0x160d78=_0xb334,_0x5247a5=_0x1cae2b();while(!![]){try{const _0x14a8f0=parseInt(_0x160d78(0x217))/0x1+-parseInt(_0x160d78(0x1ff))/0x2+-parseInt(_0x160d78(0x210))/0x3+-parseInt(_0x160d78(0x216))/0x4*(parseInt(_0x160d78(0x240))/0x5)+parseInt(_0x160d78(0x22a))/0x6+parseInt(_0x160d78(0x239))/0x7+parseInt(_0x160d78(0x211))/0x8;if(_0x14a8f0===_0x44a337)break;else _0x5247a5['push'](_0x5247a5['shift']());}catch(_0x4a5ce3){_0x5247a5['push'](_0x5247a5['shift']());}}}(_0x2f30,0x8f0d7));import{readFile,readdir}from'fs/promises';import{join,basename}from'path';import{existsSync}from'fs';import{getToken}from'./utils/keychain.js';import{getCurrentVersion,getLatestVersion}from'./utils/version.js';import{getApiBaseUrl,getCurrentEnvironment}from'./utils/environment.js';import{getProjectSkillsDir,getUserSkillsDir}from'./utils/claudeConfig.js';import{getEnvNames}from'./env.js';import{getCurrentUser}from'./utils/userApi.js';import{getRangerDir}from'./utils/rangerRoot.js';import{getEnvDir}from'./utils/settings.js';import{getPluginInfo}from'./utils/claudePlugin.js';import{RANGER_MANAGED_SKILLS}from'./utils/skills.js';import{spawn}from'child_process';const bold=_0xd6f6dc=>_0x3e5953(0x214)+_0xd6f6dc+_0x3e5953(0x233),link=(_0x342cc2,_0xde77ee)=>_0x3e5953(0x1fe)+_0x342cc2+'\x07'+(_0xde77ee||_0x342cc2)+'\x1b]8;;\x07';async function getOpencodePluginStatus(){const _0x3c8854=_0x3e5953,_0x1cd082={'oENyc':function(_0x4a9af7,_0x181b4d){return _0x4a9af7!==_0x181b4d;},'fVgab':function(_0x159902,_0x1ae195){return _0x159902(_0x1ae195);},'oSRwi':_0x3c8854(0x20f),'jInhG':_0x3c8854(0x235),'nLaEB':function(_0xcd2742,_0x30c343){return _0xcd2742>_0x30c343;},'QUonH':_0x3c8854(0x20d),'JJjYg':function(_0x34899c,_0x3ba314,_0x1465a2,_0x3e7d3c){return _0x34899c(_0x3ba314,_0x1465a2,_0x3e7d3c);},'NCdCz':'opencode','RXkps':'ignore','tSIgX':'pipe','bcZQf':_0x3c8854(0x245)};return new Promise(_0x1be8b4=>{const _0x3c802b=_0x3c8854,_0x4052f2={'alQdh':_0x1cd082['oSRwi']},_0x182baf=_0x1cd082['JJjYg'](spawn,_0x1cd082[_0x3c802b(0x223)],[_0x3c802b(0x238),'config'],{'stdio':[_0x1cd082['RXkps'],_0x1cd082[_0x3c802b(0x21f)],_0x3c802b(0x20c)]});let _0x3aa170='';_0x182baf[_0x3c802b(0x1f5)]?.['on'](_0x3c802b(0x232),_0x2b3b9f=>{_0x3aa170+=_0x2b3b9f['toString']();}),_0x182baf[_0x3c802b(0x200)]?.['on'](_0x3c802b(0x232),_0x1e88a0=>{_0x3aa170+=_0x1e88a0['toString']();}),_0x182baf['on'](_0x3c802b(0x1fb),()=>{_0x1be8b4({'status':_0x4052f2['alQdh']});}),_0x182baf['on'](_0x1cd082['bcZQf'],_0x1dd673=>{const _0x49cc68=_0x3c802b,_0x5e5a5d={'xrqlu':'@ranger-testing/opencode-plugin','bkTFa':_0x49cc68(0x221)};if(_0x1cd082['oENyc'](_0x1dd673,0x0)){_0x1cd082[_0x49cc68(0x204)](_0x1be8b4,{'status':_0x1cd082[_0x49cc68(0x20e)]});return;}const _0x36dc45=_0x3aa170[_0x49cc68(0x248)]();let _0x500746=null;if(_0x36dc45)try{_0x500746=JSON[_0x49cc68(0x24d)](_0x36dc45);}catch{const _0x3fd884=_0x36dc45[_0x49cc68(0x225)](/\{[\s\S]*\}$/);if(_0x3fd884)try{_0x500746=JSON['parse'](_0x3fd884[0x0]);}catch{_0x500746=null;}}const _0x32fe33=Array[_0x49cc68(0x1f2)](_0x500746?.[_0x49cc68(0x206)])?_0x500746?.['plugin']:[],_0x4a0235=_0x32fe33[_0x49cc68(0x24e)](_0x10e685=>{const _0x175ac5=_0x49cc68;if(typeof _0x10e685!==_0x175ac5(0x1fa))return![];return _0x10e685['includes'](_0x5e5a5d[_0x175ac5(0x207)])||_0x10e685['includes'](_0x5e5a5d[_0x175ac5(0x230)]);});if(_0x4a0235){_0x1be8b4({'status':_0x1cd082['jInhG'],'details':_0x1cd082['nLaEB'](_0x32fe33['length'],0x0)?_0x32fe33['length']+_0x49cc68(0x23d):undefined});return;}if(_0x32fe33[_0x49cc68(0x226)]>0x0){_0x1be8b4({'status':_0x1cd082[_0x49cc68(0x219)],'details':_0x32fe33[_0x49cc68(0x226)]+'\x20plugin(s)\x20configured'});return;}_0x1be8b4({'status':_0x1cd082[_0x49cc68(0x219)]});});});}async function getSkillsFromDir(_0x3d96ec,_0xf73933){const _0x5dd0c2=_0x3e5953,_0xe9b1bf={'JagsN':function(_0x2f5f1c,_0x7718b1,_0x4b418d,_0x6b1104){return _0x2f5f1c(_0x7718b1,_0x4b418d,_0x6b1104);},'iideM':'SKILL.md','eqIJw':function(_0x3356f9,_0x32c3d0,_0x2d959f){return _0x3356f9(_0x32c3d0,_0x2d959f);}};if(!existsSync(_0x3d96ec))return[];const _0x696e13=[];try{const _0x345494=await readdir(_0x3d96ec,{'withFileTypes':!![]});for(const _0x27f095 of _0x345494){if(_0x27f095[_0x5dd0c2(0x220)]()){const _0x3a2678=_0xe9b1bf['JagsN'](join,_0x3d96ec,_0x27f095[_0x5dd0c2(0x22f)],_0xe9b1bf[_0x5dd0c2(0x23f)]);if(existsSync(_0x3a2678)){let _0x279e59=_0x27f095['name'];try{const _0x40f883=await _0xe9b1bf['eqIJw'](readFile,_0x3a2678,'utf-8'),_0x424f20=_0x40f883['match'](/name:\s*(.+)/);_0x424f20&&(_0x279e59=_0x424f20[0x1][_0x5dd0c2(0x248)]());}catch{}_0x696e13['push']({'name':_0x27f095['name'],'displayName':_0x279e59,'path':_0x3a2678,'level':_0xf73933});}}}}catch{return[];}return _0x696e13;}async function getInstalledSkills(){const _0x538f37=_0x3e5953,_0x437406={'VNhZU':function(_0x2bbe6e,_0x52ff19,_0xaacaa){return _0x2bbe6e(_0x52ff19,_0xaacaa);},'Svyha':'project','YoeoI':function(_0x42df52,_0x42da4b,_0x2b2827){return _0x42df52(_0x42da4b,_0x2b2827);},'oMNOM':function(_0x2449aa){return _0x2449aa();}},[_0x25c3a1,_0x5da5f2]=await Promise['all']([_0x437406[_0x538f37(0x24a)](getSkillsFromDir,getProjectSkillsDir(),_0x437406['Svyha']),_0x437406[_0x538f37(0x243)](getSkillsFromDir,_0x437406[_0x538f37(0x1f0)](getUserSkillsDir),_0x538f37(0x244))]);return{'project':_0x25c3a1,'user':_0x5da5f2};}function _0x2f30(){const _0x3aea89=['length','\x20\x20Run:\x20ranger\x20setup\x20--opencode','includes','ranger@trailhead','3520266fgQcKA','bUHtB','JzaYe','dPntQ','KveOf','name','bkTFa','jwGcx','data','\x1b[0m','hasEncryptedAuth','configured','@ranger-testing/opencode-plugin','WtTbS','debug','102816SVrOOO','filter','\x20\x20Run:\x20ranger\x20profile\x20add\x20<profile-name>','\x20\x20\x20\x20Auth:\x20','\x20plugin(s)\x20configured','settingsPath','iideM','10XxCAht','API\x20Environment:\x20','XSlzu','YoeoI','user','close','auth.json','version','trim','huXJb','VNhZU','DvXXH','iUgqW','parse','some','\x20\x20Not\x20installed','enabled','oMNOM','JYugC','isArray','\x0aRanger\x20has\x20not\x20been\x20initialized\x20in\x20this\x20directory.','\x20\x20\x20\x20','stdout','Version:\x20','KXQqI','\x0a---\x20Claude\x20Code\x20Plugin\x20---','disabled','string','error','wsslY','mIpzd','\x1b]8;;file://','2119506iqwUBf','stderr','isActive','cwd','API\x20Token:\x20✓\x20Found\x20but\x20invalid\x20or\x20expired','fVgab','env','plugin','xrqlu','Organization:\x20','mtlPJ','API\x20URL:\x20','(not\x20found)','pipe','not_configured','oSRwi','not_installed','2048016rcdyrt','10847600VgvrES','TcARY','UArNC','\x1b[1m','log','375364ZtovME','558701JSkhGC','Root:\x20','QUonH','ETbmz','details',':\x20configured','fsuTQ','\x20(up\x20to\x20date)','tSIgX','isDirectory','opencode-plugin','hasPlaintextAuth','NCdCz','plaintext','match'];_0x2f30=function(){return _0x3aea89;};return _0x2f30();}async function getEnvironments(){const _0x4687d3=_0x3e5953,_0x34f445={'jwGcx':function(_0x16ed97,_0x4d26bf){return _0x16ed97(_0x4d26bf);},'DvXXH':function(_0x295634,_0x5a6a15,_0x4a039a){return _0x295634(_0x5a6a15,_0x4a039a);},'wsslY':'settings.json','iUgqW':function(_0x597af7,_0x598964,_0xcd7f70){return _0x597af7(_0x598964,_0xcd7f70);},'bUHtB':_0x4687d3(0x246),'GgwJD':'auth.json.enc','huXJb':function(_0x60899c,_0x399385){return _0x60899c(_0x399385);},'UArNC':function(_0x47ba95,_0x904181){return _0x47ba95===_0x904181;},'DWTTF':function(_0xb2cef5){return _0xb2cef5();},'JYugC':function(_0x1b2377,_0x32af13){return _0x1b2377(_0x32af13);}},{envNames:_0x4d794c,activeEnv:_0x3705a7}=await _0x34f445['DWTTF'](getEnvNames),_0x22f958=getRangerDir();if(!_0x34f445[_0x4687d3(0x1f1)](existsSync,_0x22f958))return{'envs':[],'activeEnv':null};const _0x3339f3=_0x4d794c['map'](_0x3544cd=>{const _0x31e0af=_0x4687d3,_0x4641ad=_0x34f445['jwGcx'](getEnvDir,_0x3544cd),_0x5bf200=_0x34f445[_0x31e0af(0x24b)](join,_0x4641ad,_0x34f445[_0x31e0af(0x1fc)]),_0x469fdf=_0x34f445[_0x31e0af(0x24c)](join,_0x4641ad,_0x34f445[_0x31e0af(0x22b)]),_0x542b53=join(_0x4641ad,_0x34f445['GgwJD']);return{'name':_0x3544cd,'settingsPath':_0x34f445[_0x31e0af(0x249)](existsSync,_0x5bf200)?_0x5bf200:'(not\x20found)','hasPlaintextAuth':_0x34f445[_0x31e0af(0x231)](existsSync,_0x469fdf),'hasEncryptedAuth':existsSync(_0x542b53),'isActive':_0x34f445[_0x31e0af(0x213)](_0x3544cd,_0x3705a7)};});return{'envs':_0x3339f3,'activeEnv':_0x3705a7};}export async function status(){const _0x1c9c6b=_0x3e5953,_0x392b86={'JzaYe':'\x0a📊\x20Ranger\x20Status\x0a','dgtOG':function(_0x1762d0,_0x423ac4,_0x385a9b){return _0x1762d0(_0x423ac4,_0x385a9b);},'dPntQ':function(_0x152632){return _0x152632();},'mmWdH':'configured','XSlzu':_0x1c9c6b(0x236),'KveOf':function(_0x2d52f1,_0x2545d5){return _0x2d52f1===_0x2545d5;},'fXQdR':'\x20\x20OpenCode\x20not\x20installed\x20or\x20not\x20available','gLOuu':_0x1c9c6b(0x1f8),'WtTbS':function(_0x40d0e5,_0x306f4f){return _0x40d0e5(_0x306f4f);},'uRWym':_0x1c9c6b(0x229),'mtlPJ':'unknown','fsuTQ':'\x20\x20Run:\x20ranger\x20setup\x20[token]\x20\x20(includes\x20plugin\x20installation)','fICDo':function(_0xa106df,_0x3a7da1){return _0xa106df+_0x3a7da1;},'YTeBo':'No\x20skills\x20installed','LiBmO':function(_0x27cc96,_0x3f032c){return _0x27cc96>_0x3f032c;},'mIpzd':'\x20\x20Project-level:','CefXp':'\x20\x20User-level:','KXQqI':function(_0x4efa46,_0x1bd7bf,_0x117cb5){return _0x4efa46(_0x1bd7bf,_0x117cb5);},'uRTGm':function(_0x5d752a,_0x3442a5){return _0x5d752a(_0x3442a5);},'IdoVH':'\x0a---\x20Profiles\x20---','zRSCa':function(_0x398284,_0x2a9885){return _0x398284===_0x2a9885;},'ETbmz':'encrypted','OYtnR':_0x1c9c6b(0x20b),'TcARY':function(_0x286802,_0x2e5a42){return _0x286802(_0x2e5a42);}};console['log'](_0x392b86[_0x1c9c6b(0x22c)]);const _0x32b1b4=process[_0x1c9c6b(0x202)](),_0x18f166=getRangerDir();if(!existsSync(_0x18f166)){console['log'](_0x1c9c6b(0x218)+link(_0x32b1b4,bold(basename(_0x32b1b4)))),console['log'](_0x1c9c6b(0x1f3)),console['log']('\x20\x20Run:\x20ranger\x20setup\x20[token]\x0a');return;}console['log'](_0x1c9c6b(0x218)+_0x392b86['dgtOG'](link,_0x32b1b4,bold(basename(_0x32b1b4))));const _0x32ae21=_0x392b86[_0x1c9c6b(0x22d)](getCurrentVersion),_0x936747=getLatestVersion();if(_0x936747[_0x1c9c6b(0x247)]&&_0x936747[_0x1c9c6b(0x247)]!==_0x32ae21)console['log'](_0x1c9c6b(0x1f6)+_0x32ae21+'\x20(latest:\x20'+_0x936747['version']+')'),console[_0x1c9c6b(0x215)]('\x20\x20Run:\x20ranger\x20update');else _0x936747[_0x1c9c6b(0x247)]?console[_0x1c9c6b(0x215)]('Version:\x20'+_0x32ae21+_0x1c9c6b(0x21e)):console['log']('Version:\x20'+_0x32ae21);const _0x1e86f4=await getToken();if(_0x1e86f4){const _0x11db00=await getCurrentUser(_0x1e86f4);_0x11db00['success']?console['log'](_0x1c9c6b(0x208)+bold(_0x11db00['user']['organizationName'])):(console[_0x1c9c6b(0x215)](_0x1c9c6b(0x203)),console[_0x1c9c6b(0x215)]('\x20\x20Run:\x20ranger\x20setup\x20[token]'));}else console['log']('API\x20Token:\x20✗\x20Not\x20found'),console['log']('\x20\x20Run:\x20ranger\x20setup\x20[token]');process[_0x1c9c6b(0x205)]['DEBUG']&&(console[_0x1c9c6b(0x215)](_0x1c9c6b(0x241)+_0x392b86[_0x1c9c6b(0x22d)](getCurrentEnvironment)),console[_0x1c9c6b(0x215)](_0x1c9c6b(0x20a)+getApiBaseUrl()));console[_0x1c9c6b(0x215)]('\x0a---\x20OpenCode\x20Plugin\x20---');const _0x101621=await getOpencodePluginStatus();if(_0x101621['status']===_0x392b86['mmWdH'])console[_0x1c9c6b(0x215)]('\x20\x20'+bold(_0x392b86[_0x1c9c6b(0x242)])+_0x1c9c6b(0x21c)),_0x101621['details']&&console[_0x1c9c6b(0x215)]('\x20\x20'+_0x101621[_0x1c9c6b(0x21b)]);else _0x392b86[_0x1c9c6b(0x22e)](_0x101621['status'],'not_configured')?(console['log']('\x20\x20Not\x20configured'),_0x101621[_0x1c9c6b(0x21b)]&&console['log']('\x20\x20'+_0x101621[_0x1c9c6b(0x21b)]),console[_0x1c9c6b(0x215)](_0x1c9c6b(0x227))):console[_0x1c9c6b(0x215)](_0x392b86['fXQdR']);console['log'](_0x392b86['gLOuu']);const _0xcc5e31=await _0x392b86['WtTbS'](getPluginInfo,_0x392b86['uRWym']);if(_0xcc5e31){const _0x5920a9=_0xcc5e31['scope']||_0x392b86[_0x1c9c6b(0x209)],_0x3b9e8d=_0xcc5e31[_0x1c9c6b(0x250)]?_0x1c9c6b(0x250):_0x1c9c6b(0x1f9);console['log']('\x20\x20'+bold(_0x392b86['uRWym'])+':\x20installed\x20('+_0x5920a9+',\x20'+_0x3b9e8d+')');}else console['log'](_0x1c9c6b(0x24f)),console[_0x1c9c6b(0x215)](_0x392b86[_0x1c9c6b(0x21d)]);console['log']('\x0a---\x20Skills\x20---');const {project:_0x59a52b,user:_0x5d3c5e}=await getInstalledSkills(),_0x642e34=_0x59a52b[_0x1c9c6b(0x23a)](_0x665341=>RANGER_MANAGED_SKILLS['includes'](_0x665341[_0x1c9c6b(0x22f)])),_0xae2ef0=_0x5d3c5e['filter'](_0x5601ab=>RANGER_MANAGED_SKILLS[_0x1c9c6b(0x228)](_0x5601ab[_0x1c9c6b(0x22f)])),_0x33a370=_0x392b86['fICDo'](_0x642e34['length'],_0xae2ef0[_0x1c9c6b(0x226)]);if(_0x33a370===0x0)console['log'](_0x392b86['YTeBo']),console[_0x1c9c6b(0x215)]('\x20\x20Run:\x20ranger\x20skillup');else{if(_0x392b86['LiBmO'](_0x642e34[_0x1c9c6b(0x226)],0x0)){console[_0x1c9c6b(0x215)](_0x392b86[_0x1c9c6b(0x1fd)]);for(const _0x44adfc of _0x642e34){console[_0x1c9c6b(0x215)](_0x1c9c6b(0x1f4)+_0x392b86[_0x1c9c6b(0x237)](bold,_0x44adfc['displayName'])+':\x20'+link(_0x44adfc['path'],_0x392b86[_0x1c9c6b(0x237)](basename,_0x44adfc['path'])));}}if(_0xae2ef0[_0x1c9c6b(0x226)]>0x0){console['log'](_0x392b86['CefXp']);for(const _0x12a88c of _0xae2ef0){console[_0x1c9c6b(0x215)]('\x20\x20\x20\x20'+bold(_0x12a88c['displayName'])+':\x20'+_0x392b86['KXQqI'](link,_0x12a88c['path'],_0x392b86['uRTGm'](basename,_0x12a88c['path'])));}}}console['log'](_0x392b86['IdoVH']);const {envs:_0x78b573,activeEnv:_0x24eb0a}=await _0x392b86['dPntQ'](getEnvironments);if(_0x392b86['zRSCa'](_0x78b573[_0x1c9c6b(0x226)],0x0))console[_0x1c9c6b(0x215)]('No\x20profiles\x20configured'),console[_0x1c9c6b(0x215)](_0x1c9c6b(0x23b));else{for(const _0x3fe103 of _0x78b573){const _0x1a7d27=_0x3fe103[_0x1c9c6b(0x201)]?'\x20(active)':'',_0x8acc84=_0x3fe103[_0x1c9c6b(0x234)]?_0x392b86[_0x1c9c6b(0x21a)]:_0x3fe103[_0x1c9c6b(0x222)]?_0x1c9c6b(0x224):'none';console['log']('\x20\x20'+bold(_0x3fe103[_0x1c9c6b(0x22f)])+_0x1a7d27),console[_0x1c9c6b(0x215)](_0x1c9c6b(0x23c)+_0x8acc84),_0x3fe103[_0x1c9c6b(0x23e)]!==_0x392b86['OYtnR']&&console[_0x1c9c6b(0x215)]('\x20\x20\x20\x20Settings:\x20'+_0x392b86[_0x1c9c6b(0x1f7)](link,_0x3fe103[_0x1c9c6b(0x23e)],_0x392b86[_0x1c9c6b(0x212)](basename,_0x3fe103['settingsPath'])));}!_0x24eb0a&&(console['log']('\x0a\x20\x20No\x20active\x20profile\x20set'),console[_0x1c9c6b(0x215)]('\x20\x20Run:\x20ranger\x20profile\x20use\x20<profile-name>\x20\x20(available:\x20'+_0x78b573['map'](_0x2f4b4e=>_0x2f4b4e['name'])['join'](',\x20')+')'));}console[_0x1c9c6b(0x215)]('');}
1
+ const _0x57bda0=_0x44ff;(function(_0x5a78ba,_0x5ba2e4){const _0x1e56a9=_0x44ff,_0x38ebda=_0x5a78ba();while(!![]){try{const _0x2d7106=parseInt(_0x1e56a9(0xd3))/0x1*(-parseInt(_0x1e56a9(0xbc))/0x2)+-parseInt(_0x1e56a9(0xce))/0x3+-parseInt(_0x1e56a9(0xe5))/0x4+parseInt(_0x1e56a9(0xc1))/0x5*(parseInt(_0x1e56a9(0xd2))/0x6)+parseInt(_0x1e56a9(0xf9))/0x7+-parseInt(_0x1e56a9(0xf1))/0x8+-parseInt(_0x1e56a9(0xee))/0x9*(-parseInt(_0x1e56a9(0xbd))/0xa);if(_0x2d7106===_0x5ba2e4)break;else _0x38ebda['push'](_0x38ebda['shift']());}catch(_0x581960){_0x38ebda['push'](_0x38ebda['shift']());}}}(_0x1ab4,0x1e223));function _0x44ff(_0x4eeab0,_0x335711){_0x4eeab0=_0x4eeab0-0xa5;const _0x1ab43a=_0x1ab4();let _0x44ff15=_0x1ab43a[_0x4eeab0];return _0x44ff15;}import{readFile,readdir}from'fs/promises';import{join,basename}from'path';import{existsSync}from'fs';import{getToken}from'./utils/keychain.js';import{getCurrentVersion,getLatestVersion}from'./utils/version.js';import{getApiBaseUrl,getCurrentEnvironment}from'./utils/environment.js';import{getProjectSkillsDir,getUserSkillsDir}from'./utils/claudeConfig.js';import{getEnvNames}from'./env.js';import{getCurrentUser}from'./utils/userApi.js';import{getRangerDir}from'./utils/rangerRoot.js';import{getEnvDir}from'./utils/settings.js';import{getPluginInfo}from'./utils/claudePlugin.js';import{RANGER_MANAGED_SKILLS}from'./utils/skills.js';import{spawn}from'child_process';const bold=_0x592a93=>'\x1b[1m'+_0x592a93+_0x57bda0(0x100),link=(_0x26749,_0x453ecf)=>_0x57bda0(0x102)+_0x26749+'\x07'+(_0x453ecf||_0x26749)+'\x1b]8;;\x07';function _0x1ab4(){const _0x2cbe9d=['toString','organizationName','log','cpNWz','trim','isArray','769968eoFZHO','SasPL','project','SKILL.md','\x20\x20Not\x20installed','hasEncryptedAuth','auth.json','hiBsa','stdout','27CWvHUP','configured','hasPlaintextAuth','900824yOXZTy','name','parse','API\x20Environment:\x20','disabled','HIXNA','nMlvJ','HUtho','985957UCbHRh','details','jHppz','ignore','includes','join','none','\x1b[0m','scope','\x1b]8;;file://','lvkaH','length','nywBt','OLotT','gNjTw','version','status','\x0aRanger\x20has\x20not\x20been\x20initialized\x20in\x20this\x20directory.','\x20\x20Run:\x20ranger\x20profile\x20use\x20<profile-name>\x20\x20(available:\x20','not_configured','tutEw','\x20(active)','RtOQh','debug','PPYWp','ASfTc','PKnVm','some','mTXDG','ranger@trailhead','match','map','RWhEx','sjlND','YOKDO','262xfMRWH','1166170tzqjhm','@ranger-testing/opencode-plugin','VcXha','Version:\x20','229925ICPbed','gpbeK','\x20\x20Run:\x20ranger\x20update','enabled','data','qMrWw','PKVaU','\x0a---\x20Skills\x20---','hypJU','isActive','\x20\x20Run:\x20ranger\x20setup\x20[token]','settingsPath','auth.json.enc','204654IpZFol','DEBUG','DTAff','(not\x20found)','18UhEjBE','1007QAUugh','\x20\x20\x20\x20Auth:\x20','\x0a---\x20Profiles\x20---','nSxMc',':\x20configured','\x0a📊\x20Ranger\x20Status\x0a',':\x20installed\x20(','Root:\x20','uEZcm','\x20plugin(s)\x20configured','push','kGPVQ'];_0x1ab4=function(){return _0x2cbe9d;};return _0x1ab4();}async function getOpencodePluginStatus(){const _0x2462b8=_0x57bda0,_0x219baf={'nMlvJ':function(_0x52d715,_0x1b188f){return _0x52d715!==_0x1b188f;},'WtBeI':function(_0x4ceeed,_0x585b16){return _0x4ceeed(_0x585b16);},'IKVbt':'configured','cpNWz':function(_0x1d2045,_0x25b304){return _0x1d2045>_0x25b304;},'wkZNT':function(_0x4c44a2,_0x2e869a){return _0x4c44a2>_0x2e869a;},'ASfTc':'not_configured','rjIgy':function(_0x319065,_0x53a897){return _0x319065(_0x53a897);},'hiBsa':'not_installed','HUtho':'@ranger-testing/opencode-plugin','RtOQh':function(_0x2f1378,_0x478b74,_0x119d08,_0x21a1aa){return _0x2f1378(_0x478b74,_0x119d08,_0x21a1aa);},'McYTT':'opencode','nywBt':'config','sjlND':_0x2462b8(0xfc),'PPeJL':'pipe','gpbeK':_0x2462b8(0xc5)};return new Promise(_0x394802=>{const _0x56429a=_0x2462b8,_0x232eab={'gNjTw':function(_0x56ea99,_0x286f04){return _0x219baf['rjIgy'](_0x56ea99,_0x286f04);},'gardI':_0x219baf[_0x56429a(0xec)],'tutEw':_0x219baf[_0x56429a(0xf8)]},_0x4d86d1=_0x219baf[_0x56429a(0xaf)](spawn,_0x219baf['McYTT'],[_0x56429a(0xb0),_0x219baf[_0x56429a(0xa5)]],{'stdio':[_0x219baf[_0x56429a(0xba)],_0x219baf['PPeJL'],'pipe']});let _0x2291a8='';_0x4d86d1[_0x56429a(0xed)]?.['on']('data',_0x44a21c=>{_0x2291a8+=_0x44a21c['toString']();}),_0x4d86d1['stderr']?.['on'](_0x219baf[_0x56429a(0xc2)],_0x58c24f=>{const _0x5a0152=_0x56429a;_0x2291a8+=_0x58c24f[_0x5a0152(0xdf)]();}),_0x4d86d1['on']('error',()=>{const _0x4566b1=_0x56429a;_0x232eab[_0x4566b1(0xa7)](_0x394802,{'status':_0x232eab['gardI']});}),_0x4d86d1['on']('close',_0x1aab89=>{const _0x2c210e=_0x56429a;if(_0x219baf[_0x2c210e(0xf7)](_0x1aab89,0x0)){_0x219baf['WtBeI'](_0x394802,{'status':'not_installed'});return;}const _0x57cfd0=_0x2291a8['trim']();let _0xb38849=null;if(_0x57cfd0)try{_0xb38849=JSON['parse'](_0x57cfd0);}catch{const _0x209ec4=_0x57cfd0['match'](/\{[\s\S]*\}$/);if(_0x209ec4)try{_0xb38849=JSON[_0x2c210e(0xf3)](_0x209ec4[0x0]);}catch{_0xb38849=null;}}const _0x517b5a=Array[_0x2c210e(0xe4)](_0xb38849?.['plugin'])?_0xb38849?.['plugin']:[],_0x3efd02=_0x517b5a[_0x2c210e(0xb4)](_0x9837ab=>{const _0x3383ab=_0x2c210e;if(typeof _0x9837ab!=='string')return![];return _0x9837ab[_0x3383ab(0xfd)](_0x232eab[_0x3383ab(0xad)])||_0x9837ab[_0x3383ab(0xfd)]('opencode-plugin');});if(_0x3efd02){_0x394802({'status':_0x219baf['IKVbt'],'details':_0x219baf[_0x2c210e(0xe2)](_0x517b5a['length'],0x0)?_0x517b5a['length']+_0x2c210e(0xdc):undefined});return;}if(_0x219baf['wkZNT'](_0x517b5a['length'],0x0)){_0x394802({'status':_0x219baf[_0x2c210e(0xb2)],'details':_0x517b5a['length']+'\x20plugin(s)\x20configured'});return;}_0x219baf['rjIgy'](_0x394802,{'status':_0x2c210e(0xac)});});});}async function getSkillsFromDir(_0x444a10,_0x163577){const _0x5bbe4c=_0x57bda0,_0x335862={'CTihi':function(_0xcb4d77,_0x3aead2){return _0xcb4d77(_0x3aead2);},'RWhEx':function(_0x1e0aa2,_0x26027c,_0x16a56f,_0x4cd6fc){return _0x1e0aa2(_0x26027c,_0x16a56f,_0x4cd6fc);}};if(!_0x335862['CTihi'](existsSync,_0x444a10))return[];const _0x3f723e=[];try{const _0x16ea83=await readdir(_0x444a10,{'withFileTypes':!![]});for(const _0xe7963f of _0x16ea83){if(_0xe7963f['isDirectory']()){const _0x52dc7a=_0x335862[_0x5bbe4c(0xb9)](join,_0x444a10,_0xe7963f['name'],_0x5bbe4c(0xe8));if(existsSync(_0x52dc7a)){let _0x5c4bac=_0xe7963f['name'];try{const _0x3ab6ba=await readFile(_0x52dc7a,'utf-8'),_0xb31ae6=_0x3ab6ba[_0x5bbe4c(0xb7)](/name:\s*(.+)/);_0xb31ae6&&(_0x5c4bac=_0xb31ae6[0x1][_0x5bbe4c(0xe3)]());}catch{}_0x3f723e[_0x5bbe4c(0xdd)]({'name':_0xe7963f[_0x5bbe4c(0xf2)],'displayName':_0x5c4bac,'path':_0x52dc7a,'level':_0x163577});}}}}catch{return[];}return _0x3f723e;}async function getInstalledSkills(){const _0x52b06c=_0x57bda0,_0x10a94b={'mTXDG':function(_0x892095){return _0x892095();},'uEZcm':'user'},[_0x2597c5,_0x325fae]=await Promise['all']([getSkillsFromDir(_0x10a94b[_0x52b06c(0xb5)](getProjectSkillsDir),_0x52b06c(0xe7)),getSkillsFromDir(getUserSkillsDir(),_0x10a94b[_0x52b06c(0xdb)])]);return{'project':_0x2597c5,'user':_0x325fae};}async function getEnvironments(){const _0x5e7b27=_0x57bda0,_0xb964e4={'HIXNA':function(_0x59da0b,_0x1cd10f,_0x34791a){return _0x59da0b(_0x1cd10f,_0x34791a);},'lvkaH':'settings.json','nSxMc':_0x5e7b27(0xeb),'TNpSP':function(_0x19cadb,_0x15a31a,_0x218085){return _0x19cadb(_0x15a31a,_0x218085);},'OLotT':_0x5e7b27(0xcd),'HSMvO':function(_0x4501c4){return _0x4501c4();},'eBdaL':function(_0x6c5345,_0x37e851){return _0x6c5345(_0x37e851);}},{envNames:_0xc7b254,activeEnv:_0x2e8c04}=await _0xb964e4['HSMvO'](getEnvNames),_0x57e963=getRangerDir();if(!_0xb964e4['eBdaL'](existsSync,_0x57e963))return{'envs':[],'activeEnv':null};const _0x199e0c=_0xc7b254[_0x5e7b27(0xb8)](_0x57b483=>{const _0x543826=_0x5e7b27,_0x3a33ab=getEnvDir(_0x57b483),_0x30cbf3=_0xb964e4['HIXNA'](join,_0x3a33ab,_0xb964e4[_0x543826(0x103)]),_0x18e5b0=_0xb964e4[_0x543826(0xf6)](join,_0x3a33ab,_0xb964e4[_0x543826(0xd6)]),_0x32de7c=_0xb964e4['TNpSP'](join,_0x3a33ab,_0xb964e4[_0x543826(0xa6)]);return{'name':_0x57b483,'settingsPath':existsSync(_0x30cbf3)?_0x30cbf3:_0x543826(0xd1),'hasPlaintextAuth':existsSync(_0x18e5b0),'hasEncryptedAuth':existsSync(_0x32de7c),'isActive':_0x57b483===_0x2e8c04};});return{'envs':_0x199e0c,'activeEnv':_0x2e8c04};}export async function status(){const _0x3a0a8d=_0x57bda0,_0x5de284={'PPYWp':_0x3a0a8d(0xd8),'JiELu':function(_0x537a29){return _0x537a29();},'hypJU':function(_0x204db2,_0x2ac927){return _0x204db2(_0x2ac927);},'SasPL':function(_0x5b355d,_0x5e73c8,_0x317e08){return _0x5b355d(_0x5e73c8,_0x317e08);},'fKtWj':function(_0x1e5e2a,_0x4309f6){return _0x1e5e2a(_0x4309f6);},'kwsOx':_0x3a0a8d(0xef),'hURKG':_0x3a0a8d(0xbe),'qMrWw':function(_0x32e158,_0xa59d97){return _0x32e158===_0xa59d97;},'kGPVQ':'\x20\x20Not\x20configured','MYWYP':'\x20\x20OpenCode\x20not\x20installed\x20or\x20not\x20available','YOKDO':'unknown','PKnVm':_0x3a0a8d(0xf5),'WlUqW':_0x3a0a8d(0xe9),'jHppz':_0x3a0a8d(0xc8),'qwVpQ':function(_0x236f2b,_0x1ec457){return _0x236f2b+_0x1ec457;},'Dupjq':'\x20\x20Project-level:','ftnPp':function(_0x19e939,_0x50768b){return _0x19e939(_0x50768b);},'zYOXc':function(_0xbae9c1,_0x120594){return _0xbae9c1(_0x120594);},'vTYoT':function(_0x2c5c6b,_0x9f1e28,_0x3c0f93){return _0x2c5c6b(_0x9f1e28,_0x3c0f93);},'sonlF':_0x3a0a8d(0xd5),'paFMN':'No\x20profiles\x20configured','VcXha':'encrypted','PKVaU':'plaintext','DTAff':function(_0x2aae24,_0x114fce){return _0x2aae24(_0x114fce);},'Mpooa':_0x3a0a8d(0xd1)};console['log'](_0x5de284[_0x3a0a8d(0xb1)]);const _0x262f38=process['cwd'](),_0x32eaf7=_0x5de284['JiELu'](getRangerDir);if(!_0x5de284[_0x3a0a8d(0xc9)](existsSync,_0x32eaf7)){console['log']('Root:\x20'+_0x5de284[_0x3a0a8d(0xe6)](link,_0x262f38,bold(basename(_0x262f38)))),console[_0x3a0a8d(0xe1)](_0x3a0a8d(0xaa)),console['log']('\x20\x20Run:\x20ranger\x20setup\x20[token]\x0a');return;}console[_0x3a0a8d(0xe1)](_0x3a0a8d(0xda)+link(_0x262f38,bold(_0x5de284[_0x3a0a8d(0xc9)](basename,_0x262f38))));const _0x54ed85=getCurrentVersion(),_0x5adb88=getLatestVersion();if(_0x5adb88[_0x3a0a8d(0xa8)]&&_0x5adb88[_0x3a0a8d(0xa8)]!==_0x54ed85)console[_0x3a0a8d(0xe1)](_0x3a0a8d(0xc0)+_0x54ed85+'\x20(latest:\x20'+_0x5adb88[_0x3a0a8d(0xa8)]+')'),console[_0x3a0a8d(0xe1)](_0x3a0a8d(0xc3));else _0x5adb88[_0x3a0a8d(0xa8)]?console['log']('Version:\x20'+_0x54ed85+'\x20(up\x20to\x20date)'):console['log']('Version:\x20'+_0x54ed85);const _0x1fa0a8=await getToken();if(_0x1fa0a8){const _0x4ff379=await getCurrentUser(_0x1fa0a8);_0x4ff379['success']?console['log']('Organization:\x20'+_0x5de284['fKtWj'](bold,_0x4ff379['user'][_0x3a0a8d(0xe0)])):(console['log']('API\x20Token:\x20✓\x20Found\x20but\x20invalid\x20or\x20expired'),console[_0x3a0a8d(0xe1)](_0x3a0a8d(0xcb)));}else console[_0x3a0a8d(0xe1)]('API\x20Token:\x20✗\x20Not\x20found'),console[_0x3a0a8d(0xe1)]('\x20\x20Run:\x20ranger\x20setup\x20[token]');process['env'][_0x3a0a8d(0xcf)]&&(console[_0x3a0a8d(0xe1)](_0x3a0a8d(0xf4)+getCurrentEnvironment()),console['log']('API\x20URL:\x20'+getApiBaseUrl()));console['log']('\x0a---\x20OpenCode\x20Plugin\x20---');const _0x18338b=await getOpencodePluginStatus();if(_0x18338b['status']===_0x5de284['kwsOx'])console['log']('\x20\x20'+bold(_0x5de284['hURKG'])+_0x3a0a8d(0xd7)),_0x18338b[_0x3a0a8d(0xfa)]&&console['log']('\x20\x20'+_0x18338b['details']);else _0x5de284[_0x3a0a8d(0xc6)](_0x18338b[_0x3a0a8d(0xa9)],'not_configured')?(console[_0x3a0a8d(0xe1)](_0x5de284[_0x3a0a8d(0xde)]),_0x18338b[_0x3a0a8d(0xfa)]&&console['log']('\x20\x20'+_0x18338b[_0x3a0a8d(0xfa)]),console['log']('\x20\x20Run:\x20ranger\x20setup\x20--opencode')):console[_0x3a0a8d(0xe1)](_0x5de284['MYWYP']);console['log']('\x0a---\x20Claude\x20Code\x20Plugin\x20---');const _0x11ef58=await _0x5de284[_0x3a0a8d(0xc9)](getPluginInfo,_0x3a0a8d(0xb6));if(_0x11ef58){const _0x283e9a=_0x11ef58[_0x3a0a8d(0x101)]||_0x5de284[_0x3a0a8d(0xbb)],_0x52f290=_0x11ef58[_0x3a0a8d(0xc4)]?_0x3a0a8d(0xc4):_0x5de284[_0x3a0a8d(0xb3)];console['log']('\x20\x20'+bold('ranger@trailhead')+_0x3a0a8d(0xd9)+_0x283e9a+',\x20'+_0x52f290+')');}else console[_0x3a0a8d(0xe1)](_0x5de284['WlUqW']),console[_0x3a0a8d(0xe1)]('\x20\x20Run:\x20ranger\x20setup\x20[token]\x20\x20(includes\x20plugin\x20installation)');console[_0x3a0a8d(0xe1)](_0x5de284[_0x3a0a8d(0xfb)]);const {project:_0x429d60,user:_0x2eaa04}=await getInstalledSkills(),_0x41822f=_0x429d60['filter'](_0x321998=>RANGER_MANAGED_SKILLS['includes'](_0x321998[_0x3a0a8d(0xf2)])),_0x5aef8e=_0x2eaa04['filter'](_0x3d0518=>RANGER_MANAGED_SKILLS[_0x3a0a8d(0xfd)](_0x3d0518[_0x3a0a8d(0xf2)])),_0x34bbe0=_0x5de284['qwVpQ'](_0x41822f[_0x3a0a8d(0x104)],_0x5aef8e['length']);if(_0x34bbe0===0x0)console['log']('No\x20skills\x20installed'),console[_0x3a0a8d(0xe1)]('\x20\x20Run:\x20ranger\x20skillup');else{if(_0x41822f['length']>0x0){console[_0x3a0a8d(0xe1)](_0x5de284['Dupjq']);for(const _0xc6fafe of _0x41822f){console[_0x3a0a8d(0xe1)]('\x20\x20\x20\x20'+_0x5de284['ftnPp'](bold,_0xc6fafe['displayName'])+':\x20'+link(_0xc6fafe['path'],_0x5de284[_0x3a0a8d(0xc9)](basename,_0xc6fafe['path'])));}}if(_0x5aef8e['length']>0x0){console['log']('\x20\x20User-level:');for(const _0x12ff5b of _0x5aef8e){console['log']('\x20\x20\x20\x20'+_0x5de284['zYOXc'](bold,_0x12ff5b['displayName'])+':\x20'+_0x5de284['vTYoT'](link,_0x12ff5b['path'],basename(_0x12ff5b['path'])));}}}console[_0x3a0a8d(0xe1)](_0x5de284['sonlF']);const {envs:_0x49a57c,activeEnv:_0x390fcb}=await getEnvironments();if(_0x5de284['qMrWw'](_0x49a57c['length'],0x0))console['log'](_0x5de284['paFMN']),console[_0x3a0a8d(0xe1)]('\x20\x20Run:\x20ranger\x20profile\x20add\x20<profile-name>');else{for(const _0x771fd2 of _0x49a57c){const _0x4e459b=_0x771fd2[_0x3a0a8d(0xca)]?_0x3a0a8d(0xae):'',_0x118f41=_0x771fd2[_0x3a0a8d(0xea)]?_0x5de284[_0x3a0a8d(0xbf)]:_0x771fd2[_0x3a0a8d(0xf0)]?_0x5de284[_0x3a0a8d(0xc7)]:_0x3a0a8d(0xff);console[_0x3a0a8d(0xe1)]('\x20\x20'+_0x5de284[_0x3a0a8d(0xd0)](bold,_0x771fd2[_0x3a0a8d(0xf2)])+_0x4e459b),console[_0x3a0a8d(0xe1)](_0x3a0a8d(0xd4)+_0x118f41),_0x771fd2['settingsPath']!==_0x5de284['Mpooa']&&console['log']('\x20\x20\x20\x20Settings:\x20'+link(_0x771fd2[_0x3a0a8d(0xcc)],_0x5de284['ftnPp'](basename,_0x771fd2[_0x3a0a8d(0xcc)])));}!_0x390fcb&&(console[_0x3a0a8d(0xe1)]('\x0a\x20\x20No\x20active\x20profile\x20set'),console['log'](_0x3a0a8d(0xab)+_0x49a57c[_0x3a0a8d(0xb8)](_0x6ece43=>_0x6ece43['name'])[_0x3a0a8d(0xfe)](',\x20')+')'));}console['log']('');}
@@ -1 +1 @@
1
- (function(_0x59f44b,_0x12a14c){const _0x267e58=_0x3881,_0xb36bd2=_0x59f44b();while(!![]){try{const _0x4ff808=parseInt(_0x267e58(0x1c6))/0x1*(-parseInt(_0x267e58(0x1ea))/0x2)+parseInt(_0x267e58(0x1d9))/0x3*(-parseInt(_0x267e58(0x1ef))/0x4)+parseInt(_0x267e58(0x1e0))/0x5+-parseInt(_0x267e58(0x1d1))/0x6*(-parseInt(_0x267e58(0x1f1))/0x7)+parseInt(_0x267e58(0x1c1))/0x8*(parseInt(_0x267e58(0x1bf))/0x9)+parseInt(_0x267e58(0x1c9))/0xa+-parseInt(_0x267e58(0x1e5))/0xb*(parseInt(_0x267e58(0x1c5))/0xc);if(_0x4ff808===_0x12a14c)break;else _0xb36bd2['push'](_0xb36bd2['shift']());}catch(_0x2c681d){_0xb36bd2['push'](_0xb36bd2['shift']());}}}(_0x5d51,0xdc4d9));import{spawn}from'child_process';import{existsSync}from'fs';import{readFile,writeFile}from'fs/promises';import{installSkill,removeSkill,RANGER_MANAGED_SKILLS,DEPRECATED_SKILLS}from'./utils/skills.js';import{PACKAGE_NAME,getCurrentVersion,getLatestVersion,compareVersions}from'./utils/version.js';import{getSkillsDir}from'./utils/claudeConfig.js';import{getOpencodeSkillsDir}from'./utils/opencodeConfig.js';import{join}from'path';import{migrateActiveProfileFile}from'./utils/activeProfile.js';import{getRangerDir}from'./utils/rangerRoot.js';import{isMarketplaceAdded,isPluginInstalled}from'./utils/claudePlugin.js';function _0x5d51(){const _0x2a0fc1=['6uUpcDY','rElxd','\x0aClaude\x20plugin\x20updated\x20(user\x20scope).','Update\x20failed.','trim','\x0aClaude\x20marketplace\x20updated\x20(trailhead).','AMTho','mWmbN','590385sblIUl','some','fKpfK','inherit','keTnF','sNowk','push','2541795wQyxZL','Checking\x20for\x20updates...','\x0aInstalling\x20','cmqxm','active-profile.txt','12496BqlIbt','plugin','xuCNe','rsTVr','pipe','458EOxQSR','.gitignore','\x0aNo\x20ranger-managed\x20skills\x20found\x20to\x20reinstall.','user','@latest...\x0a','4cqQfmE','\x0aYou\x20are\x20already\x20on\x20the\x20latest\x20version.','253463SNNqoX','split','trailhead','yQLFI','teqWR','ZadLu','uEigv','zyMIT','\x0aReinstalling\x20','DdlvA','platform','length','claude','\x20ranger-managed\x20skill(s)...','error','oRIlV','99801hQTWxi','\x0aSuccessfully\x20updated\x20to\x20version\x20','808VCgOln','close','--scope','\x20skill\x20','2088kTqIfP','2427uzkOGb','GGjRs','\x0aCurrent\x20version:\x20','1880460QGLmyI','ranger@trailhead','✓\x20Migrated\x20active\x20profile\x20file','project','version','warn','splice','log'];_0x5d51=function(){return _0x2a0fc1;};return _0x5d51();}async function runInstall(){const _0x2ffaa4={'cmqxm':function(_0x3a7600,_0x59605b){return _0x3a7600(_0x59605b);},'RWIul':function(_0xae5c0f,_0x6dbbb1){return _0xae5c0f===_0x6dbbb1;},'sRfut':'npm','qvNHH':'close'};return new Promise(_0x1a3f34=>{const _0x396a70=_0x3881,_0x142d08={'oRIlV':function(_0x3a3000,_0x197b4b){return _0x3a3000(_0x197b4b);}};console['log'](_0x396a70(0x1e2)+PACKAGE_NAME+_0x396a70(0x1ee));const _0x55bc37=spawn(_0x2ffaa4['sRfut'],['install','-g',PACKAGE_NAME+'@latest'],{'stdio':_0x396a70(0x1dc),'shell':process['platform']==='win32'});_0x55bc37['on'](_0x2ffaa4['qvNHH'],_0x3df84c=>{const _0x5caf90=_0x396a70;_0x2ffaa4[_0x5caf90(0x1e3)](_0x1a3f34,_0x2ffaa4['RWIul'](_0x3df84c,0x0));}),_0x55bc37['on']('error',()=>{const _0x3806b7=_0x396a70;_0x142d08[_0x3806b7(0x1be)](_0x1a3f34,![]);});});}async function updateClaudeMarketplace(){const _0x3046d2=_0x3881,_0x56d923={'rElxd':function(_0x30d79d,_0x516cd3){return _0x30d79d===_0x516cd3;},'UUpzh':function(_0x57f5b2,_0xae5b76,_0x3ea3f2,_0x514e81){return _0x57f5b2(_0xae5b76,_0x3ea3f2,_0x514e81);},'SauoF':_0x3046d2(0x1bb),'CJcYu':'update','yQLFI':'win32','hXnWu':_0x3046d2(0x1bd)};return new Promise(_0x528ce3=>{const _0x158baa=_0x3046d2,_0x29e6f1=_0x56d923['UUpzh'](spawn,_0x56d923['SauoF'],[_0x158baa(0x1e6),'marketplace',_0x56d923['CJcYu'],'trailhead'],{'stdio':'pipe','shell':process[_0x158baa(0x1b9)]===_0x56d923[_0x158baa(0x1b2)]});_0x29e6f1['on']('close',_0x27b9a8=>{const _0x59eaa5=_0x158baa;_0x528ce3(_0x56d923[_0x59eaa5(0x1d2)](_0x27b9a8,0x0));}),_0x29e6f1['on'](_0x56d923['hXnWu'],()=>{_0x528ce3(![]);});});}async function updateClaudePlugin(_0x1afda0){const _0x5b4207=_0x3881,_0x3d0601={'RiEGP':_0x5b4207(0x1ca),'MiJaj':_0x5b4207(0x1c3),'uEigv':function(_0x4edc47,_0x4a1879,_0x4b18b0,_0x244fe6){return _0x4edc47(_0x4a1879,_0x4b18b0,_0x244fe6);},'keTnF':_0x5b4207(0x1e9),'sNowk':_0x5b4207(0x1bd)};return new Promise(_0x29e5c9=>{const _0x250d65=_0x5b4207,_0x29a54e={'Gksme':function(_0x1e5cf4,_0x14e21e){return _0x1e5cf4===_0x14e21e;}},_0x9934e9=[_0x250d65(0x1e6),'update',_0x3d0601['RiEGP']];_0x1afda0&&_0x9934e9['push'](_0x3d0601['MiJaj'],_0x1afda0);const _0x4f5c8d=_0x3d0601[_0x250d65(0x1b5)](spawn,'claude',_0x9934e9,{'stdio':_0x3d0601[_0x250d65(0x1dd)],'shell':process[_0x250d65(0x1b9)]==='win32'});_0x4f5c8d['on'](_0x250d65(0x1c2),_0x45d994=>{_0x29e5c9(_0x29a54e['Gksme'](_0x45d994,0x0));}),_0x4f5c8d['on'](_0x3d0601[_0x250d65(0x1de)],()=>{_0x29e5c9(![]);});});}function isSkillInstalled(_0x14013d,_0xd5cf05,_0x4f070d){const _0x45d5d8={'hbKaR':function(_0x291a77,_0x253c18){return _0x291a77(_0x253c18);},'kjePr':function(_0x44db00,_0x1206d7,_0x501083){return _0x44db00(_0x1206d7,_0x501083);}},_0x19ce1d=_0x4f070d==='opencode'?getOpencodeSkillsDir(_0xd5cf05):_0x45d5d8['hbKaR'](getSkillsDir,_0xd5cf05),_0x4ed66f=_0x45d5d8['kjePr'](join,_0x19ce1d,_0x14013d);return existsSync(_0x4ed66f);}function _0x3881(_0x5b3ad1,_0x12d5bb){_0x5b3ad1=_0x5b3ad1-0x1b2;const _0x5d51a8=_0x5d51();let _0x3881cc=_0x5d51a8[_0x5b3ad1];return _0x3881cc;}async function reinstallSkills(_0x1a06e9){const _0x7cf0b8=_0x3881,_0x61b999={'mbFSf':function(_0x10a3e5,_0x440c6e,_0x16c5ef,_0x1d8a0c){return _0x10a3e5(_0x440c6e,_0x16c5ef,_0x1d8a0c);},'dgsvs':'claude','rsTVr':'opencode','XfuOY':function(_0x1b4617,_0x31d1fb,_0x3757ec){return _0x1b4617(_0x31d1fb,_0x3757ec);},'zyMIT':function(_0xe2f36b,_0xfd0b26){return _0xe2f36b===_0xfd0b26;},'DdlvA':_0x7cf0b8(0x1ec)},_0x4d0a0f=[_0x7cf0b8(0x1cc),_0x7cf0b8(0x1ed)],_0x2af74a=[];for(const _0x558525 of _0x4d0a0f){for(const _0xbd5732 of RANGER_MANAGED_SKILLS){_0x61b999['mbFSf'](isSkillInstalled,_0xbd5732,_0x558525,'claude')&&_0x2af74a['push']({'skillName':_0xbd5732,'level':_0x558525,'platform':_0x61b999['dgsvs']}),isSkillInstalled(_0xbd5732,_0x558525,'opencode')&&_0x2af74a[_0x7cf0b8(0x1df)]({'skillName':_0xbd5732,'level':_0x558525,'platform':_0x61b999[_0x7cf0b8(0x1e8)]});}}for(const _0x36ced1 of _0x4d0a0f){for(const _0x52ee67 of DEPRECATED_SKILLS){await _0x61b999['XfuOY'](removeSkill,_0x52ee67,_0x36ced1);}}if(_0x61b999[_0x7cf0b8(0x1b6)](_0x2af74a[_0x7cf0b8(0x1ba)],0x0)){console[_0x7cf0b8(0x1d0)](_0x61b999[_0x7cf0b8(0x1b8)]);return;}console['log'](_0x7cf0b8(0x1b7)+_0x2af74a[_0x7cf0b8(0x1ba)]+_0x7cf0b8(0x1bc));for(const {skillName:_0x2968c4,level:_0x5ef3ed,platform:_0x52b375}of _0x2af74a){try{await _0x61b999['XfuOY'](installSkill,_0x2968c4,{'level':_0x5ef3ed,'cliVersion':_0x1a06e9,'platform':_0x52b375});}catch(_0x2670e6){console[_0x7cf0b8(0x1ce)]('\x20\x20Failed\x20to\x20reinstall\x20'+_0x52b375+'\x20'+_0x5ef3ed+_0x7cf0b8(0x1c4)+_0x2968c4+':',_0x2670e6);}}}async function ensureActiveProfileGitignored(){const _0x5a1781=_0x3881,_0x48a7e9={'GGjRs':function(_0x4432bd){return _0x4432bd();},'wUzht':_0x5a1781(0x1eb),'ELAFa':function(_0x54e3ef,_0x35bc56){return _0x54e3ef(_0x35bc56);},'xuCNe':function(_0x4d4c08,_0x206fec,_0xbc5e67){return _0x4d4c08(_0x206fec,_0xbc5e67);},'Srfja':function(_0x2d156b,_0x577c4f,_0x34c0c0,_0x2e721f){return _0x2d156b(_0x577c4f,_0x34c0c0,_0x2e721f);}},_0x4bd9e1=join(_0x48a7e9[_0x5a1781(0x1c7)](getRangerDir),_0x48a7e9['wUzht']);if(!_0x48a7e9['ELAFa'](existsSync,_0x4bd9e1))return![];let _0x4821d3='';try{_0x4821d3=await _0x48a7e9[_0x5a1781(0x1e7)](readFile,_0x4bd9e1,'utf-8');}catch{return![];}const _0x34b218=_0x4821d3[_0x5a1781(0x1f2)](/\r?\n/);if(_0x34b218[_0x5a1781(0x1da)](_0xa013ec=>_0xa013ec['trim']()==='active-profile.txt'))return![];let _0x47102f=_0x34b218['findIndex'](_0x4811bc=>_0x4811bc[_0x5a1781(0x1d5)]()==='active-feature.txt');_0x47102f===-0x1&&(_0x47102f=_0x34b218[_0x5a1781(0x1ba)]);_0x34b218[_0x5a1781(0x1cf)](_0x47102f,0x0,_0x5a1781(0x1e4));let _0x3a6ca6=_0x34b218['join']('\x0a');!_0x3a6ca6['endsWith']('\x0a')&&(_0x3a6ca6+='\x0a');try{await _0x48a7e9['Srfja'](writeFile,_0x4bd9e1,_0x3a6ca6,'utf-8');}catch{return![];}return!![];}export async function update(){const _0x50523b=_0x3881,_0x209aff={'teqWR':function(_0x35bdbc){return _0x35bdbc();},'hjdFz':'Attempting\x20install\x20anyway...','ZadLu':_0x50523b(0x1d4),'lVjaC':function(_0x3fc140,_0x116209){return _0x3fc140(_0x116209);},'mWmbN':function(_0x5d5a29,_0x28a65e){return _0x5d5a29(_0x28a65e);},'AMTho':_0x50523b(0x1d3),'pvxvq':_0x50523b(0x1cc),'fKpfK':function(_0x36b2d7){return _0x36b2d7();}},_0x1fa925=_0x209aff[_0x50523b(0x1b3)](getCurrentVersion);console['log'](_0x50523b(0x1c8)+_0x1fa925),console[_0x50523b(0x1d0)](_0x50523b(0x1e1));const _0x232c25=getLatestVersion();let _0x3e2296=_0x1fa925;if(!_0x232c25[_0x50523b(0x1cd)]){console['warn']('\x0aCould\x20not\x20check\x20latest\x20version:\x20'+_0x232c25[_0x50523b(0x1bd)]),console[_0x50523b(0x1d0)](_0x209aff['hjdFz']);const _0x56d2d2=await _0x209aff[_0x50523b(0x1b3)](runInstall);if(_0x56d2d2)console[_0x50523b(0x1d0)]('\x0aSuccessfully\x20installed\x20latest\x20version.'),_0x3e2296=_0x209aff[_0x50523b(0x1b3)](getCurrentVersion);else throw new Error('Update\x20failed:\x20'+_0x232c25[_0x50523b(0x1bd)]);}else{const _0x40bd0e=_0x232c25[_0x50523b(0x1cd)];console[_0x50523b(0x1d0)]('Latest\x20version:\x20\x20'+_0x40bd0e);const _0x27c80e=compareVersions(_0x1fa925,_0x40bd0e);if(_0x27c80e===0x0)console[_0x50523b(0x1d0)](_0x50523b(0x1f0));else{if(_0x27c80e<0x0)console[_0x50523b(0x1d0)]('\x0aYour\x20version\x20('+_0x1fa925+')\x20is\x20newer\x20than\x20the\x20published\x20version\x20('+_0x40bd0e+').');else{const _0x7c60f8=await runInstall();if(_0x7c60f8)console[_0x50523b(0x1d0)](_0x50523b(0x1c0)+_0x40bd0e),_0x3e2296=_0x40bd0e;else throw new Error(_0x209aff[_0x50523b(0x1b4)]);}}}await _0x209aff['lVjaC'](reinstallSkills,_0x3e2296);const _0x4d26e1=await _0x209aff['lVjaC'](isMarketplaceAdded,_0x50523b(0x1f3)),_0x295022=await _0x209aff[_0x50523b(0x1d8)](isPluginInstalled,'ranger@trailhead');if(_0x4d26e1){const _0x363216=await updateClaudeMarketplace();_0x363216&&console[_0x50523b(0x1d0)](_0x50523b(0x1d6));}if(_0x295022){const _0x1b7f1e=await updateClaudePlugin();_0x1b7f1e&&console['log'](_0x209aff[_0x50523b(0x1d7)]);const _0x54e234=await updateClaudePlugin(_0x209aff['pvxvq']);_0x54e234&&console[_0x50523b(0x1d0)]((_0x1b7f1e?'':'\x0a')+'Claude\x20plugin\x20updated\x20(project\x20scope).');}const _0x1bdea1=await migrateActiveProfileFile();_0x1bdea1&&console['log'](_0x50523b(0x1cb));const _0x293238=await _0x209aff[_0x50523b(0x1db)](ensureActiveProfileGitignored);console['log']('\x0a✅\x20Update\x20complete!');}
1
+ (function(_0x263138,_0x4be758){const _0x549f02=_0x3392,_0x422359=_0x263138();while(!![]){try{const _0x3a78d9=parseInt(_0x549f02(0x160))/0x1+parseInt(_0x549f02(0x147))/0x2+parseInt(_0x549f02(0x142))/0x3*(-parseInt(_0x549f02(0x13d))/0x4)+-parseInt(_0x549f02(0x162))/0x5+-parseInt(_0x549f02(0x146))/0x6*(parseInt(_0x549f02(0x135))/0x7)+parseInt(_0x549f02(0x15a))/0x8*(parseInt(_0x549f02(0x131))/0x9)+parseInt(_0x549f02(0x14a))/0xa;if(_0x3a78d9===_0x4be758)break;else _0x422359['push'](_0x422359['shift']());}catch(_0x3da7a5){_0x422359['push'](_0x422359['shift']());}}}(_0x3bb5,0x8698f));function _0x3392(_0x281333,_0xd9c009){_0x281333=_0x281333-0x12c;const _0x3bb52d=_0x3bb5();let _0x3392e3=_0x3bb52d[_0x281333];return _0x3392e3;}import{spawn}from'child_process';import{existsSync}from'fs';import{readFile,writeFile}from'fs/promises';import{installSkill,removeSkill,RANGER_MANAGED_SKILLS,DEPRECATED_SKILLS}from'./utils/skills.js';import{PACKAGE_NAME,getCurrentVersion,getLatestVersion,compareVersions}from'./utils/version.js';import{getSkillsDir}from'./utils/claudeConfig.js';import{getOpencodeSkillsDir}from'./utils/opencodeConfig.js';import{join}from'path';import{migrateActiveProfileFile}from'./utils/activeProfile.js';import{getRangerDir}from'./utils/rangerRoot.js';import{isMarketplaceAdded,isPluginInstalled}from'./utils/claudePlugin.js';async function runInstall(){const _0x39e327=_0x3392,_0x472d2b={'yLtbI':function(_0xdaed99,_0x1c76a3){return _0xdaed99(_0x1c76a3);},'EUXAK':function(_0x4bb294,_0x293290,_0x1f56ad,_0x1393e6){return _0x4bb294(_0x293290,_0x1f56ad,_0x1393e6);},'ipqAg':'npm','XqsIR':'install','aXDJS':_0x39e327(0x12c)};return new Promise(_0x52e2a5=>{const _0x4ed937=_0x39e327,_0x3014b1={'sXKim':function(_0xdcce95,_0x207004){return _0x472d2b['yLtbI'](_0xdcce95,_0x207004);}};console['log'](_0x4ed937(0x16a)+PACKAGE_NAME+_0x4ed937(0x139));const _0x4cf571=_0x472d2b['EUXAK'](spawn,_0x472d2b[_0x4ed937(0x145)],[_0x472d2b['XqsIR'],'-g',PACKAGE_NAME+'@latest'],{'stdio':'inherit','shell':process['platform']===_0x4ed937(0x15b)});_0x4cf571['on'](_0x4ed937(0x137),_0x2024d9=>{_0x52e2a5(_0x2024d9===0x0);}),_0x4cf571['on'](_0x472d2b['aXDJS'],()=>{const _0x3c567a=_0x4ed937;_0x3014b1[_0x3c567a(0x13a)](_0x52e2a5,![]);});});}async function updateClaudeMarketplace(){const _0x4dc349=_0x3392,_0x357d93={'aSReW':function(_0x5d69b1,_0xe24d26){return _0x5d69b1(_0xe24d26);},'XvVeR':'marketplace','aPxaI':_0x4dc349(0x13f),'lKaUa':function(_0x9b5e15,_0x367791){return _0x9b5e15===_0x367791;}};return new Promise(_0x4d9507=>{const _0x5abf33=_0x4dc349,_0x5225cc={'McMQY':function(_0x287a66,_0x4ff5a3){const _0x1b4cd6=_0x3392;return _0x357d93[_0x1b4cd6(0x16e)](_0x287a66,_0x4ff5a3);}},_0x4a415c=spawn(_0x5abf33(0x149),['plugin',_0x357d93[_0x5abf33(0x169)],'update',_0x357d93[_0x5abf33(0x134)]],{'stdio':'pipe','shell':_0x357d93[_0x5abf33(0x14c)](process[_0x5abf33(0x138)],_0x5abf33(0x15b))});_0x4a415c['on']('close',_0x2ef7f2=>{const _0x16a5f2=_0x5abf33;_0x5225cc[_0x16a5f2(0x12e)](_0x4d9507,_0x2ef7f2===0x0);}),_0x4a415c['on']('error',()=>{_0x4d9507(![]);});});}async function updateClaudePlugin(_0x4809ae){const _0x209221=_0x3392,_0x4baeb7={'edwGX':_0x209221(0x140),'mBaop':'--scope','gZbeA':function(_0x5b5e85,_0x5c8c19,_0x3c7866,_0x20670f){return _0x5b5e85(_0x5c8c19,_0x3c7866,_0x20670f);},'uuaxe':function(_0xbcd7d0,_0x38a786){return _0xbcd7d0===_0x38a786;},'WLixC':'win32','CVMKt':_0x209221(0x137),'uIztS':'error'};return new Promise(_0xd0d977=>{const _0x86f31a=_0x209221,_0x372fdb={'tMFWc':function(_0x5e3136,_0xe212ab){return _0x5e3136(_0xe212ab);}},_0x2a8d61=[_0x86f31a(0x14d),_0x86f31a(0x148),_0x4baeb7[_0x86f31a(0x150)]];_0x4809ae&&_0x2a8d61[_0x86f31a(0x167)](_0x4baeb7['mBaop'],_0x4809ae);const _0x858aa5=_0x4baeb7['gZbeA'](spawn,'claude',_0x2a8d61,{'stdio':'pipe','shell':_0x4baeb7['uuaxe'](process[_0x86f31a(0x138)],_0x4baeb7[_0x86f31a(0x143)])});_0x858aa5['on'](_0x4baeb7[_0x86f31a(0x153)],_0x13dc9f=>{const _0x30bbb3=_0x86f31a;_0x372fdb[_0x30bbb3(0x154)](_0xd0d977,_0x13dc9f===0x0);}),_0x858aa5['on'](_0x4baeb7[_0x86f31a(0x168)],()=>{_0xd0d977(![]);});});}function isSkillInstalled(_0x31a3ad,_0x113ff0,_0xab85bd){const _0x5819cf={'dEqXe':'opencode','wKNPO':function(_0x151ef8,_0x25830d){return _0x151ef8(_0x25830d);}},_0x3c0c11=_0xab85bd===_0x5819cf['dEqXe']?getOpencodeSkillsDir(_0x113ff0):getSkillsDir(_0x113ff0),_0x5620b4=join(_0x3c0c11,_0x31a3ad);return _0x5819cf['wKNPO'](existsSync,_0x5620b4);}function _0x3bb5(){const _0x2fecf4=['CVMKt','tMFWc','sJzdx','\x0aYou\x20are\x20already\x20on\x20the\x20latest\x20version.','eOVLv','Claude\x20plugin\x20updated\x20(project\x20scope).','Checking\x20for\x20updates...','56856JgKShR','win32','length','lHbUB','zLrBO','FDlnS','508034wlxGkn','lQUTl','5310550zBGCgw','\x0aSuccessfully\x20updated\x20to\x20version\x20','warn','active-feature.txt','nZdep','push','uIztS','XvVeR','\x0aInstalling\x20','trim','MubKc','Latest\x20version:\x20\x20','aSReW','error','.gitignore','McMQY','EpxJH','project','603IaDlMx','version','FUisZ','aPxaI','203MBOtWv','Update\x20failed:\x20','close','platform','@latest...\x0a','sXKim','DhtlI','opencode','1832DwBNZn','AIyyR','trailhead','ranger@trailhead','utf-8','3777bZpzDi','WLixC','\x0aClaude\x20plugin\x20updated\x20(user\x20scope).','ipqAg','84810nQXxtQ','525604qYlgPO','update','claude','13529530QyYVTD','\x0aNo\x20ranger-managed\x20skills\x20found\x20to\x20reinstall.','lKaUa','plugin','eawfq','cTCWL','edwGX','log','rnmhk'];_0x3bb5=function(){return _0x2fecf4;};return _0x3bb5();}async function reinstallSkills(_0xc5adfe){const _0x4b979d=_0x3392,_0x5b981d={'MubKc':'user','EpxJH':function(_0x170317,_0x376a41,_0x41e970,_0x3bb07b){return _0x170317(_0x376a41,_0x41e970,_0x3bb07b);},'EMAey':'opencode','PfXgF':function(_0x41579c,_0x5be68d,_0x2de601){return _0x41579c(_0x5be68d,_0x2de601);},'DhtlI':_0x4b979d(0x14b)},_0x2f63a6=['project',_0x5b981d[_0x4b979d(0x16c)]],_0x51b3f8=[];for(const _0x58b36b of _0x2f63a6){for(const _0x34d286 of RANGER_MANAGED_SKILLS){_0x5b981d[_0x4b979d(0x12f)](isSkillInstalled,_0x34d286,_0x58b36b,_0x4b979d(0x149))&&_0x51b3f8['push']({'skillName':_0x34d286,'level':_0x58b36b,'platform':_0x4b979d(0x149)}),_0x5b981d['EpxJH'](isSkillInstalled,_0x34d286,_0x58b36b,_0x4b979d(0x13c))&&_0x51b3f8['push']({'skillName':_0x34d286,'level':_0x58b36b,'platform':_0x5b981d['EMAey']});}}for(const _0x130d8a of _0x2f63a6){for(const _0xd49ce6 of DEPRECATED_SKILLS){await _0x5b981d['PfXgF'](removeSkill,_0xd49ce6,_0x130d8a);}}if(_0x51b3f8['length']===0x0){console['log'](_0x5b981d[_0x4b979d(0x13b)]);return;}console[_0x4b979d(0x151)]('\x0aReinstalling\x20'+_0x51b3f8['length']+'\x20ranger-managed\x20skill(s)...');for(const {skillName:_0x3d77fb,level:_0x590d4a,platform:_0x22ee58}of _0x51b3f8){try{await _0x5b981d['PfXgF'](installSkill,_0x3d77fb,{'level':_0x590d4a,'cliVersion':_0xc5adfe,'platform':_0x22ee58});}catch(_0x4837b5){console[_0x4b979d(0x164)]('\x20\x20Failed\x20to\x20reinstall\x20'+_0x22ee58+'\x20'+_0x590d4a+'\x20skill\x20'+_0x3d77fb+':',_0x4837b5);}}}async function ensureActiveProfileGitignored(){const _0x3209f7=_0x3392,_0x2ce22d={'zffCf':function(_0x3865dd,_0x2d2eb9,_0x1ef00a){return _0x3865dd(_0x2d2eb9,_0x1ef00a);},'nZdep':function(_0x4d31a0,_0x5a5903){return _0x4d31a0(_0x5a5903);},'cTCWL':function(_0x168091,_0x8fbed,_0x11f3cf){return _0x168091(_0x8fbed,_0x11f3cf);},'AIyyR':function(_0x5a8c5c,_0x908685){return _0x5a8c5c===_0x908685;},'lHbUB':function(_0x25e5fa,_0x4a6c13,_0x53c827,_0x1b8f87){return _0x25e5fa(_0x4a6c13,_0x53c827,_0x1b8f87);}},_0x16b5ab=_0x2ce22d['zffCf'](join,getRangerDir(),_0x3209f7(0x12d));if(!_0x2ce22d[_0x3209f7(0x166)](existsSync,_0x16b5ab))return![];let _0x4f9bbb='';try{_0x4f9bbb=await _0x2ce22d[_0x3209f7(0x14f)](readFile,_0x16b5ab,_0x3209f7(0x141));}catch{return![];}const _0x55a299=_0x4f9bbb['split'](/\r?\n/);if(_0x55a299['some'](_0x2d3da7=>_0x2d3da7['trim']()==='active-profile.txt'))return![];let _0x1808d7=_0x55a299['findIndex'](_0x51ca6d=>_0x51ca6d[_0x3209f7(0x16b)]()===_0x3209f7(0x165));_0x2ce22d[_0x3209f7(0x13e)](_0x1808d7,-0x1)&&(_0x1808d7=_0x55a299[_0x3209f7(0x15c)]);_0x55a299['splice'](_0x1808d7,0x0,'active-profile.txt');let _0x2414be=_0x55a299['join']('\x0a');!_0x2414be['endsWith']('\x0a')&&(_0x2414be+='\x0a');try{await _0x2ce22d[_0x3209f7(0x15d)](writeFile,_0x16b5ab,_0x2414be,'utf-8');}catch{return![];}return!![];}export async function update(){const _0x54f452=_0x3392,_0x4ebb81={'GvXZe':_0x54f452(0x159),'lQUTl':function(_0x418438){return _0x418438();},'sJzdx':function(_0x239071){return _0x239071();},'xKEpS':function(_0x33d2fc,_0x2108f5,_0x2e58d3){return _0x33d2fc(_0x2108f5,_0x2e58d3);},'eawfq':function(_0x238ea2,_0x1ce4ad){return _0x238ea2===_0x1ce4ad;},'zfxyH':function(_0x2628c5,_0x456bcc){return _0x2628c5<_0x456bcc;},'eOVLv':function(_0xa0276d){return _0xa0276d();},'FDlnS':'Update\x20failed.','FUisZ':function(_0x17d0be,_0x462eb8){return _0x17d0be(_0x462eb8);},'eoDFu':_0x54f452(0x13f),'zLrBO':'ranger@trailhead','ctiHo':function(_0x24502){return _0x24502();},'dSiZT':_0x54f452(0x130),'rnmhk':function(_0x23630f){return _0x23630f();},'QCRYI':'\x0a✅\x20Update\x20complete!'},_0x49baff=getCurrentVersion();console['log']('\x0aCurrent\x20version:\x20'+_0x49baff),console['log'](_0x4ebb81['GvXZe']);const _0x57fb54=_0x4ebb81['lQUTl'](getLatestVersion);let _0xb53f55=_0x49baff;if(!_0x57fb54['version']){console['warn']('\x0aCould\x20not\x20check\x20latest\x20version:\x20'+_0x57fb54[_0x54f452(0x12c)]),console['log']('Attempting\x20install\x20anyway...');const _0x2fbb6c=await _0x4ebb81[_0x54f452(0x161)](runInstall);if(_0x2fbb6c)console[_0x54f452(0x151)]('\x0aSuccessfully\x20installed\x20latest\x20version.'),_0xb53f55=_0x4ebb81[_0x54f452(0x155)](getCurrentVersion);else throw new Error(_0x54f452(0x136)+_0x57fb54[_0x54f452(0x12c)]);}else{const _0x1d90dd=_0x57fb54[_0x54f452(0x132)];console['log'](_0x54f452(0x16d)+_0x1d90dd);const _0x4fc8da=_0x4ebb81['xKEpS'](compareVersions,_0x49baff,_0x1d90dd);if(_0x4ebb81[_0x54f452(0x14e)](_0x4fc8da,0x0))console[_0x54f452(0x151)](_0x54f452(0x156));else{if(_0x4ebb81['zfxyH'](_0x4fc8da,0x0))console['log']('\x0aYour\x20version\x20('+_0x49baff+')\x20is\x20newer\x20than\x20the\x20published\x20version\x20('+_0x1d90dd+').');else{const _0x45c78b=await _0x4ebb81[_0x54f452(0x157)](runInstall);if(_0x45c78b)console[_0x54f452(0x151)](_0x54f452(0x163)+_0x1d90dd),_0xb53f55=_0x1d90dd;else throw new Error(_0x4ebb81[_0x54f452(0x15f)]);}}}await _0x4ebb81[_0x54f452(0x133)](reinstallSkills,_0xb53f55);const _0x2bbbee=await isMarketplaceAdded(_0x4ebb81['eoDFu']),_0x4f8115=await isPluginInstalled(_0x4ebb81[_0x54f452(0x15e)]);if(_0x2bbbee){const _0x3bfaf3=await updateClaudeMarketplace();_0x3bfaf3&&console[_0x54f452(0x151)]('\x0aClaude\x20marketplace\x20updated\x20(trailhead).');}if(_0x4f8115){const _0x248cf4=await _0x4ebb81['ctiHo'](updateClaudePlugin);_0x248cf4&&console['log'](_0x54f452(0x144));const _0x2025a1=await updateClaudePlugin(_0x4ebb81['dSiZT']);_0x2025a1&&console[_0x54f452(0x151)]((_0x248cf4?'':'\x0a')+_0x54f452(0x158));}const _0x43148c=await _0x4ebb81[_0x54f452(0x152)](migrateActiveProfileFile);_0x43148c&&console['log']('✓\x20Migrated\x20active\x20profile\x20file');const _0x4c0722=await ensureActiveProfileGitignored();console[_0x54f452(0x151)](_0x4ebb81['QCRYI']);}